diff --git a/node_modules/.cache/babel-loader/00d8d0fb19ee5b3322ab78d411751655.json b/node_modules/.cache/babel-loader/00d8d0fb19ee5b3322ab78d411751655.json new file mode 100644 index 0000000000000000000000000000000000000000..78e9e1d94c9d52d2d64c2e6aebe4594e7249a9a8 --- /dev/null +++ b/node_modules/.cache/babel-loader/00d8d0fb19ee5b3322ab78d411751655.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/Selection.js\";\nimport React, { useContext, Fragment } from 'react';\nimport ExperimentContext from '../context/experiment/experimentContext';\n\nconst Selection = () => {\n const experimentContext = useContext(ExperimentContext);\n const selection = experimentContext.selection,\n data = experimentContext.data,\n experiment = experimentContext.experiment; // const { model, branch, hpc } = experiment;\n //var currentSelection = \"Node: \"\n\n var currentNode = \"\";\n var selectedNode = null;\n\n if (selection) {\n //console.log(\"Current selection \" + selection)\n selection.map(node => // currentSelection += node + \", \"\n currentNode = node); //console.log(\"Current node \" + currentNode)\n\n selectedNode = data.nodes.find(node => node.id === currentNode); //console.log(\"Selected node\")\n //console.log(\"Data: \" + selectedNode.id + \" \" + selectedNode.platform_name)\n }\n\n return React.createElement(Fragment, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 23\n },\n __self: this\n }, selectedNode && React.createElement(Fragment, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 25\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 26\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-12\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 27\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"card text-white bg-info\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 28\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"card-header text-center p-0\",\n style: headerCard,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 29\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"mh-100 px-0 mx-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 30\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 31\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 31\n },\n __self: this\n }, selectedNode.id)))), React.createElement(\"div\", {\n className: \"card-body py-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 34\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 35\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Date:\"), \" \", selectedNode.date)), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 38\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 39\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-12\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 40\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 41\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 41\n },\n __self: this\n }, \"Section:\"), \" \", selectedNode.section)))), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 45\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 46\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-12\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 47\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 48\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 48\n },\n __self: this\n }, \"Platform:\"), \" \", selectedNode.platform_name && selectedNode.platform_name, \" \", !selectedNode.platform_name && experiment.hpc)))), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 55\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 56\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-6\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 57\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 58\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 58\n },\n __self: this\n }, \"Processors:\"), \" \", selectedNode.processors)), React.createElement(\"div\", {\n className: \"col-6\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 60\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 61\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 61\n },\n __self: this\n }, \"Wallclock:\"), \" \", selectedNode.wallclock)))), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 65\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 66\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-6\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 67\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 68\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 68\n },\n __self: this\n }, \"Level:\"), \" \", selectedNode.level)), React.createElement(\"div\", {\n className: \"col-6\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 70\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 71\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 71\n },\n __self: this\n }, \"Out:\"), \" \", selectedNode.children, \" \", React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 71\n },\n __self: this\n }, \"In:\"), \" \", selectedNode.parents, \" \")))), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 76\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 77\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-12\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 78\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 79\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 79\n },\n __self: this\n }, \"Status:\")), \" \", selectedNode.status))), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 86\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 87\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-4\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 88\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 89\n },\n __self: this\n }, \"c:\", data.max_children, \"/p:\", data.max_parents, \" \")), React.createElement(\"div\", {\n className: \"col-4\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 91\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 92\n },\n __self: this\n }, \"ac:\", data.avg_children, \"/ap:\", data.avg_parents, \" \")), React.createElement(\"div\", {\n className: \"col-4\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 94\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 95\n },\n __self: this\n }, \"tj:\", data.total_jobs, \" \"))))))))), !selectedNode && data && React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 106\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-12\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 107\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"card text-white bg-info\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 108\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"card-header text-center py-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 109\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 110\n },\n __self: this\n }, \"Here goes the Job Id\")), React.createElement(\"div\", {\n className: \"card-body\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 112\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"text-center\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 113\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 114\n },\n __self: this\n }, \"Select a Node to see more information.\")))))));\n};\n\nconst experimentStyle = {\n height: 200\n};\nconst headerCard = {\n height: 30\n};\nexport default Selection;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/Selection.js"],"names":["React","useContext","Fragment","ExperimentContext","Selection","experimentContext","selection","data","experiment","currentNode","selectedNode","map","node","nodes","find","id","experimentStyle","headerCard","date","section","platform_name","hpc","processors","wallclock","level","children","parents","status","max_children","max_parents","avg_children","avg_parents","total_jobs","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,UAAhB,EAA4BC,QAA5B,QAA4C,OAA5C;AACA,OAAOC,iBAAP,MAA8B,yCAA9B;;AAEA,MAAMC,SAAS,GAAG,MAAM;AACp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AAA;AAAA,KACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,8CADA,CADJ,CAJJ,CADJ,CADJ,CAnFZ,CADJ;AAwGH,CA1HD;;AA4HA,MAAMA,eAAe,GAAG;AACpBiB,EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,MAAMhB,UAAU,GAAG;AACfgB,EAAAA,MAAM,EAAE;AADO,CAAnB;AAIA,eAAe7B,SAAf","sourcesContent":["import React, { useContext, Fragment } from 'react'\nimport ExperimentContext from '../context/experiment/experimentContext';\n\nconst Selection = () => {\n const experimentContext = useContext(ExperimentContext);\n const { selection, data, experiment } = experimentContext;\n // const { model, branch, hpc } = experiment;\n //var currentSelection = \"Node: \"\n var currentNode = \"\"\n var selectedNode = null\n if (selection) {\n //console.log(\"Current selection \" + selection)\n selection.map(node => (\n // currentSelection += node + \", \"\n currentNode = node\n ));\n //console.log(\"Current node \" + currentNode)\n selectedNode = data.nodes.find(node => node.id === currentNode) \n //console.log(\"Selected node\")\n //console.log(\"Data: \" + selectedNode.id + \" \" + selectedNode.platform_name)\n } \n return (\n \n {selectedNode &&\n \n
\n
\n
\n
\n
\n {selectedNode.id}\n
\n
\n
\n
\n Date: {selectedNode.date}\n
\n
\n
\n
\n Section: {selectedNode.section}\n
\n
\n
\n
\n
\n
\n Platform: {selectedNode.platform_name && selectedNode.platform_name} {!selectedNode.platform_name && experiment.hpc}\n
\n
\n
\n {/*
\n Priority: {selectedNode.priority}\n
*/}\n
\n
\n
\n Processors: {selectedNode.processors}\n
\n
\n Wallclock: {selectedNode.wallclock}\n
\n
\n
\n
\n
\n
\n Level: {selectedNode.level}\n
\n
\n Out: {selectedNode.children} In: {selectedNode.parents} \n
\n \n
\n
\n
\n
\n
\n Status: {selectedNode.status}\n
\n {/*
\n c:{data.max_children}/p:{data.max_parents}\n
*/}\n
\n
\n
\n
\n
\n c:{data.max_children}/p:{data.max_parents} \n
\n
\n ac:{data.avg_children}/ap:{data.avg_parents} \n
\n
\n tj:{data.total_jobs} \n
\n
\n
\n
\n
\n
\n
\n
\n } \n {!selectedNode && data &&\n
\n
\n
\n
\n Here goes the Job Id\n
\n
\n
\n Select a Node to see more information. \n
\n
\n
\n
\n
\n } \n
\n \n \n\n )\n}\n\nconst experimentStyle = {\n height: 200\n };\n\nconst headerCard = {\n height: 30\n}\n\nexport default Selection;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/012e50ded4eeea77fd39d407f173bf2d.json b/node_modules/.cache/babel-loader/012e50ded4eeea77fd39d407f173bf2d.json new file mode 100644 index 0000000000000000000000000000000000000000..617a8b4273922a57566b0dcf4a84217cf9340e3b --- /dev/null +++ b/node_modules/.cache/babel-loader/012e50ded4eeea77fd39d407f173bf2d.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js\";\nimport React, { Component } from \"react\"; // import vis from \"vis-network\";\n\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n constructor(...args) {\n super(...args);\n\n this.updateVisNodes = nodes => {\n this.props.setVisData(nodes);\n };\n }\n\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else if (nextProps.data && this.props.data && nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp) {\n console.log(\"Rerendering\");\n return true;\n } else if (nextProps.loadingGraph !== this.props.loadingGraph) {\n return true;\n } else {\n return false;\n }\n }\n\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n render() {\n if (this.props.loadingGraph) return React.createElement(Spinner, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 32\n },\n __self: this\n });\n\n if (this.props.data == null) {\n return React.createElement(\"div\", {\n className: \"card-body text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 35\n },\n __self: this\n }, React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Press \", React.createElement(\"span\", {\n className: \"badge badge-info\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Show Graph\"), \" to see the graph representation of the experiment.\"), React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"If the experiment is running, press \", React.createElement(\"span\", {\n className: \"badge badge-dark\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"Start Job Monitor\"), \" to start a live tracker of the changes on the experiment's jobs. This process will automatically update the graph's nodes colors and show a log of the detected changes.\"));\n }\n\n var nodes_array = [];\n var edges_array = [];\n\n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: {\n background: node.status_color,\n border: \"black\"\n },\n level: node.level\n }));\n this.props.data.edges.map(edge => edges_array.push({\n from: edge.from,\n to: edge.to\n }));\n }\n\n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n const options = {\n edges: {\n arrows: {\n to: {\n enabled: true\n }\n }\n },\n layout: {\n //improvedLayout: true,\n hierarchical: {\n // enabled: true,\n nodeSpacing: 250,\n //edgeMinimization: true,\n //parentCentralization: true,\n direction: 'UD'\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true\n },\n physics: {\n enabled: false\n },\n nodes: {\n shape: 'dot'\n }\n };\n const graph = {\n nodes: nodes,\n edges: edges\n };\n\n class VisNetwork extends Component {\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else {\n return false;\n }\n }\n\n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", params => {\n //console.log(params);\n if (params.nodes) {\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n });\n } // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n\n\n render() {\n return React.createElement(\"div\", {\n className: \"card-body p-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 129\n },\n __self: this\n }, React.createElement(\"div\", {\n ref: \"myRef\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 130\n },\n __self: this\n }));\n }\n\n }\n\n this.updateVisNodes(nodes);\n return React.createElement(VisNetwork, {\n graph: graph,\n options: options,\n updateSelection: this.props.updateSelection,\n shouldUpdateGraph: this.props.shouldUpdateGraph,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 138\n },\n __self: this\n });\n }\n\n}\n\nconst experimentStyle = {\n height: 600\n};\nexport default GraphNativeRep;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js"],"names":["React","Component","Spinner","vis","GraphNativeRep","updateVisNodes","nodes","props","setVisData","shouldComponentUpdate","nextProps","nextState","shouldUpdateGraph","data","pkl_timestamp","console","log","loadingGraph","componentWillUnmount","cleanGraphData","render","nodes_array","edges_array","edges","map","node","push","id","label","color","background","status_color","border","level","edge","from","to","DataSet","options","arrows","enabled","layout","hierarchical","nodeSpacing","direction","interaction","dragNodes","hoverConnectedEdges","navigationButtons","physics","shape","graph","VisNetwork","componentDidMount","network","Network","refs","myRef","on","params","updateSelection","experimentStyle","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,SAAhB,QAAiC,OAAjC,C,CACA;;AACA,OAAOC,OAAP,MAAoB,mBAApB;AACA,OAAOC,GAAP,MAAgB,KAAhB;;AAEA,MAAMC,cAAN,SAA6BH,SAA7B,CAAuC;AAAA;AAAA;;AAAA,SAmBnCI,cAnBmC,GAmBjBC,KAAD,IAAW;AACxB,WAAKC,KAAL,CAAWC,UAAX,CAAsBF,KAAtB;AACH,KArBkC;AAAA;;AAEnCG,EAAAA,qB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K,EAAEyC,eAAxB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,UADJ,CADJ;AAKH;;AAjC8B;;AAoCnC,SAAKxD,cAAL,CAAoBC,KAApB;AAEA,WAAO,oBAAC,UAAD;AACH,MAAA,KAAK,EAAE6C,KADJ;AAEH,MAAA,OAAO,EAAEb,OAFN;AAGH,MAAA,eAAe,EAAE,KAAK/B,KAAL,CAAWqD,eAHzB;AAIH,MAAA,iBAAiB,EAAE,KAAKrD,KAAL,CAAWK,iBAJ3B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAAP;AAOH;;AA3IkC;;AAyJvC,MAAMiD,eAAe,GAAG;AACpBC,EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,eAAe1D,cAAf","sourcesContent":["import React, { Component } from \"react\";\n// import vis from \"vis-network\";\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n\n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true\n }else if (nextProps.data && this.props.data && (nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp)){\n console.log(\"Rerendering\")\n return true;\n }else if (nextProps.loadingGraph !== this.props.loadingGraph){\n return true; \n }else{\n return false;\n }\n }\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n updateVisNodes = (nodes) => {\n this.props.setVisData(nodes);\n }\n\n\n\n render () {\n if (this.props.loadingGraph) return ;\n if (this.props.data == null){\n return (\n
\n

Press Show Graph to see the graph representation of the experiment.

\n

If the experiment is running, press Start Job Monitor to start a live tracker of the changes on the experiment's jobs.\n This process will automatically update the graph's nodes colors and show a log of the detected changes.\n

\n
\n );\n }\n\n var nodes_array = [];\n var edges_array = [];\n \n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: { background: node.status_color, border: \"black\" },\n level: node.level,\n })\n );\n \n this.props.data.edges.map(edge => \n edges_array.push({ from: edge.from, to: edge.to })\n );\n }\n \n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n\n\n const options = {\n edges: {\n arrows: {\n to: { enabled: true }\n }\n },\n layout: {\n //improvedLayout: true,\n hierarchical: {\n // enabled: true,\n nodeSpacing: 250,\n //edgeMinimization: true,\n //parentCentralization: true,\n direction: 'UD',\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true,\n },\n physics: {\n enabled: false,\n },\n nodes: {\n shape: 'dot',\n }\n };\n \n const graph = {\n nodes : nodes,\n edges : edges,\n };\n\n class VisNetwork extends Component {\n \n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true;\n } else {\n return false;\n }\n }\n \n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", (params) => {\n //console.log(params);\n if (params.nodes){\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n \n });\n }\n \n // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n \n render() { \n return (\n
\n
\n
\n );\n }\n }\n\n this.updateVisNodes(nodes);\n \n return ;\n\n }\n\n\n \n\n \n\n \n \n\n \n\n}\n\nconst experimentStyle = {\n height: 600\n };\n\nexport default GraphNativeRep;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/02ace5201d8b3c78d7ad037b19001ef6.json b/node_modules/.cache/babel-loader/02ace5201d8b3c78d7ad037b19001ef6.json new file mode 100644 index 0000000000000000000000000000000000000000..e2459bf8881fb81cbe48800c07f9480fcafce1db --- /dev/null +++ b/node_modules/.cache/babel-loader/02ace5201d8b3c78d7ad037b19001ef6.json @@ -0,0 +1 @@ +{"ast":null,"code":"import _slicedToArray from \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/node_modules/@babel/runtime/helpers/esm/slicedToArray\";\nvar _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/context/experiment/ExperimentState.js\";\nimport React, { useReducer } from 'react';\nimport axios from 'axios';\nimport ExperimentContext from './experimentContext';\nimport ExperimentReducer from './experimentReducer';\nimport { SEARCH_EXPERIMENTS, SET_LOADING, CLEAR_EXPERIMENTS, GET_EXPERIMENT, GET_GRAPH, SET_LOADING_GRAPH, CLEAN_GRAPH_DATA, UPDATE_SELECTION, GET_EXPERIMENT_RUN, SET_LOADING_RUN, CLEAN_RUN_DATA, SET_AUTOUPDATE_RUN, GET_PKL_DATA, SET_LOADING_PKL, UPDATE_NODES, SHOULD_UPDATE_GRAPH, SET_AUTOUPDATE_PKL, CLEAN_PKL_DATA, SET_PKL_CHANGES, UPDATE_EXPERIMENT_TS, SET_VIS_DATA } from '../types';\n\nconst ExperimentState = props => {\n const initialState = {\n experiments: [],\n experiment: {},\n loading: false,\n data: null,\n rundata: null,\n pkldata: null,\n pklchanges: null,\n loadingGraph: false,\n loadingRun: false,\n loadingPkl: false,\n selection: null,\n enabledGraphSearch: true,\n startAutoUpdateRun: false,\n startAutoUpdatePkl: false,\n shouldUpdateGraph: false,\n visNodes: null\n };\n\n const _useReducer = useReducer(ExperimentReducer, initialState),\n _useReducer2 = _slicedToArray(_useReducer, 2),\n state = _useReducer2[0],\n dispatch = _useReducer2[1]; // Search Experiments\n\n\n const searchExperiments = async text => {\n setLoading();\n const res = await axios.get(\"http://84.88.185.30:8888/search/\".concat(text));\n dispatch({\n type: SEARCH_EXPERIMENTS,\n payload: res.data.experiment\n });\n }; // Get Experiment\n\n\n const getExperiment = async expid => {\n setLoading(); //cleanGraphData();\n\n const res = await axios.get(\"http://84.88.185.30:8888/expinfo/\".concat(expid));\n dispatch({\n type: GET_EXPERIMENT,\n payload: res.data\n });\n }; // Get Experiment Graph\n\n\n const getExperimentGraph = async expid => {\n setLoadingGraph();\n const res = await axios.get(\"http://84.88.185.30:8888/graph/\".concat(expid));\n console.log(res.data);\n dispatch({\n type: GET_GRAPH,\n payload: res.data\n }); //this.setState({ data: res.data, loading: false, showGraph: !res.data.error });\n }; // Get Experiment Run\n\n\n const getExperimentRun = async expid => {\n setLoadingRun();\n const res = await axios.get(\"http://84.88.185.30:8888/exprun/\".concat(expid));\n console.log(res.data);\n dispatch({\n type: GET_EXPERIMENT_RUN,\n payload: res.data\n });\n }; // Get Experiment Pkl Data\n\n\n const getExperimentPkl = async (expid, timeStamp) => {\n setLoadingPkl(); //timeStamp = 1000;\n\n const res = await axios.get(\"http://84.88.185.30:8888/pklinfo/\".concat(expid, \"/\").concat(timeStamp));\n console.log(res.data); // const actualPkl = res.data;\n\n let retrievedPkl = null;\n var jobs = {};\n var colorChanges = {};\n var changes = \"\";\n retrievedPkl = res.data;\n\n if (state.data !== null && retrievedPkl.has_changed === true && retrievedPkl.pkl_content.length > 0) {\n //console.log(retrievedPkl.pkl_content.length);\n for (var j = 0, job; j < retrievedPkl.pkl_content.length; j++) {\n job = retrievedPkl.pkl_content[j]; //console.log(job);\n\n jobs[job.name] = job; //console.log(jobs[job.name]);\n }\n\n let requireUpdate = false;\n console.log('Current ts: ' + state.data.pkl_timestamp);\n var newData = state.data; //console.log(newData.nodes);\n\n var expData = state.experiment;\n\n if (newData.nodes) {\n for (var i = 0; i < newData.nodes.length; i++) {\n // console.log(newNodes[i].id);\n //console.log(newData.nodes[i]);\n // console.log(jobs[ newNodes[i].id ]);\n if (newData.nodes[i].status_code !== jobs[newData.nodes[i].id].status_code) {\n // changes += newData.nodes[i].id + \" from \" + newData.nodes[i].status + \" to \" + jobs[ newData.nodes[i].id ].status + \" || \";\n changes += timeStampToDate(retrievedPkl.pkl_timestamp) + \": \" + newData.nodes[i].id + \" to \" + jobs[newData.nodes[i].id].status + \"\\n\";\n newData.nodes[i].status_code = jobs[newData.nodes[i].id].status_code;\n newData.nodes[i].status_color = jobs[newData.nodes[i].id].status_color;\n newData.nodes[i].status = jobs[newData.nodes[i].id].status; //console.log(newData.nodes[i].status_color)\n\n colorChanges[newData.nodes[i].id] = jobs[newData.nodes[i].id].status_color;\n requireUpdate = true;\n }\n }\n\n if (requireUpdate) {\n // console.log(newData.pkl_timestamp);\n // console.log(expData.pkl_timestamp);\n console.log(\"New ts: \" + retrievedPkl.pkl_timestamp);\n newData.pkl_timestamp = retrievedPkl.pkl_timestamp;\n expData.pkl_timestamp = retrievedPkl.pkl_timestamp; // console.log(newData.pkl_timestamp);\n // console.log(expData.pkl_timestamp);\n // console.log('Call Update');\n\n updateNodes(newData);\n updateExperimentTimeStamp(expData); // setUpdateGraph(true);\n // setUpdateGraph(false);\n\n if (state.pklchanges) {\n setPklChanges(changes + state.pklchanges);\n } else {\n setPklChanges(changes);\n }\n\n for (var key in colorChanges) {\n console.log(key, colorChanges[key]);\n }\n } else {\n console.log('No changes but updating pkl anyway.');\n expData.pkl_timestamp = retrievedPkl.pkl_timestamp;\n updateExperimentTimeStamp(expData);\n }\n }\n } // } else {\n // var t = new Date( retrievedPkl.pkl_timestamp );\n // var formatted = t.toISOString();\n // setPklChanges(\"No news yet... \" + formatted)\n // }\n\n\n dispatch({\n type: GET_PKL_DATA,\n payload: res.data\n });\n };\n\n const updateGraphColor = (idChange, newColor) => {\n this.state.visNodes.update({\n id: idChange,\n color: {\n background: newColor\n }\n });\n }; // Cleaning\n\n\n const clearExperiments = () => dispatch({\n type: CLEAR_EXPERIMENTS\n });\n\n const cleanGraphData = () => dispatch({\n type: CLEAN_GRAPH_DATA\n });\n\n const cleanRunData = () => dispatch({\n type: CLEAN_RUN_DATA\n });\n\n const cleanPklData = () => dispatch({\n type: CLEAN_PKL_DATA\n }); // Set Loading\n\n\n const setLoading = () => dispatch({\n type: SET_LOADING\n });\n\n const setLoadingGraph = () => dispatch({\n type: SET_LOADING_GRAPH\n });\n\n const setLoadingRun = () => dispatch({\n type: SET_LOADING_RUN\n });\n\n const setLoadingPkl = () => dispatch({\n type: SET_LOADING_PKL\n }); // Action Things\n\n\n const updateSelection = currentSelection => dispatch({\n type: UPDATE_SELECTION,\n payload: currentSelection\n });\n\n const updateNodes = newdata => dispatch({\n type: UPDATE_NODES,\n payload: newdata\n });\n\n const updateExperimentTimeStamp = newExperiment => dispatch({\n type: UPDATE_EXPERIMENT_TS,\n payload: newExperiment\n });\n\n const setAutoUpdateRun = value => dispatch({\n type: SET_AUTOUPDATE_RUN,\n payload: value\n });\n\n const setAutoUpdatePkl = value => dispatch({\n type: SET_AUTOUPDATE_PKL,\n payload: value\n });\n\n const setUpdateGraph = value => dispatch({\n type: SHOULD_UPDATE_GRAPH,\n payload: value\n });\n\n const setPklChanges = value => dispatch({\n type: SET_PKL_CHANGES,\n payload: value\n });\n\n const setVisData = value => dispatch({\n type: SET_VIS_DATA,\n payload: value\n }); // Other Utils\n\n\n const hashCode = value => {\n var hash = 0,\n i,\n chr;\n if (value.length === 0) return hash;\n\n for (i = 0; i < value.length; i++) {\n chr = value.charCodeAt(i);\n hash = (hash << 5) - hash + chr;\n hash |= 0; // Convert to 32bit integer\n }\n\n console.log(hash);\n return hash;\n };\n\n const timeStampToDate = value => {\n //console.log('Setting new format: ' + value);\n let formattedDate = \"\";\n var date = new Date(value * 1000);\n var hours = date.getHours();\n var minutes = \"0\" + date.getMinutes();\n var seconds = \"0\" + date.getSeconds();\n formattedDate = hours + ':' + minutes.substr(-2) + ':' + seconds.substr(-2); // formattedDate = date.toISOString();\n\n return formattedDate;\n };\n\n return React.createElement(ExperimentContext.Provider, {\n value: {\n experiments: state.experiments,\n experiment: state.experiment,\n loading: state.loading,\n loadingGraph: state.loadingGraph,\n loadingRun: state.loadingRun,\n loadingPkl: state.loadingPkl,\n data: state.data,\n rundata: state.rundata,\n pklchanges: state.pklchanges,\n selection: state.selection,\n enabledGraphSearch: state.enabledGraphSearch,\n startAutoUpdateRun: state.startAutoUpdateRun,\n startAutoUpdatePkl: state.startAutoUpdatePkl,\n shouldUpdateGraph: state.shouldUpdateGraph,\n visNodes: state.visNodes,\n setAutoUpdateRun,\n setAutoUpdatePkl,\n searchExperiments,\n clearExperiments,\n getExperiment,\n getExperimentGraph,\n cleanGraphData,\n cleanRunData,\n cleanPklData,\n setPklChanges,\n updateSelection,\n getExperimentRun,\n getExperimentPkl,\n hashCode,\n timeStampToDate,\n setVisData,\n updateGraphColor\n },\n __source: {\n fileName: _jsxFileName,\n lineNumber: 240\n },\n __self: this\n }, props.children);\n};\n\nexport default ExperimentState;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/context/experiment/ExperimentState.js"],"names":["React","useReducer","axios","ExperimentContext","ExperimentReducer","SEARCH_EXPERIMENTS","SET_LOADING","CLEAR_EXPERIMENTS","GET_EXPERIMENT","GET_GRAPH","SET_LOADING_GRAPH","CLEAN_GRAPH_DATA","UPDATE_SELECTION","GET_EXPERIMENT_RUN","SET_LOADING_RUN","CLEAN_RUN_DATA","SET_AUTOUPDATE_RUN","GET_PKL_DATA","SET_LOADING_PKL","UPDATE_NODES","SHOULD_UPDATE_GRAPH","SET_AUTOUPDATE_PKL","CLEAN_PKL_DATA","SET_PKL_CHANGES","UPDATE_EXPERIMENT_TS","SET_VIS_DATA","ExperimentState","props","initialState","experiments","experiment","loading","data","rundata","pkldata","pklchanges","loadingGraph","loadingRun","loadingPkl","selection","enabledGraphSearch","startAutoUpdateRun","startAutoUpdatePkl","shouldUpdateGraph","visNodes","state","dispatch","searchExperiments","text","setLoading","res","get","type","payload","getExperiment","expid","getExperimentGraph","setLoadingGraph","console","log","getExperimentRun","setLoadingRun","getExperimentPkl","timeStamp","setLoadingPkl","retrievedPkl","jobs","colorChanges","changes","has_changed","pkl_content","length","j","job","name","requireUpdate","pkl_timestamp","newData","expData","nodes","i","status_code","id","timeStampToDate","status","status_color","updateNodes","updateExperimentTimeStamp","setPklChanges","key","updateGraphColor","idChange","newColor","update","color","background","clearExperiments","cleanGraphData","cleanRunData","cleanPklData","updateSelection","currentSelection","newdata","newExperiment","setAutoUpdateRun","value","setAutoUpdatePkl","setUpdateGraph","setVisData","hashCode","hash","chr","charCodeAt","formattedDate","date","Date","hours","getHours","minutes","getMinutes","seconds","getSeconds","substr","children"],"mappings":";;AAAA,OAAOA,KAAP,IAAgBC,UAAhB,QAAkC,OAAlC;AACA,OAAOC,KAAP,MAAkB,OAAlB;AACA,OAAOC,iBAAP,MAA8B,qBAA9B;AACA,OAAOC,iBAAP,MAA8B,qBAA9B;AACA,SACEC,kBADF,EAEEC,WAFF,EAGEC,iBAHF,EAIEC,cAJF,EAKEC,SALF,EAMEC,iBANF,EAOEC,gBAPF,EAQEC,gBARF,EASEC,kBATF,EAUEC,eAVF,EAWEC,cAXF,EAYEC,kBAZF,EAaEC,YAbF,EAcEC,eAdF,EAeEC,YAfF,EAgBEC,mBAhBF,EAiBEC,kBAjBF,EAkBEC,cAlBF,EAmBEC,eAnBF,EAoBEC,oBApBF,EAqBEC,YArBF,QAsBO,UAtBP;;AAwBA,MAAMC,eAAe,GAAGC,KAAK,IAAI;AAC7B,QAAMC,YAAY,GAAG;AACjBC,IAAAA,WAAW,EAAE,EADI;AAEjBC,IAAAA,UAAU,EAAE,EAFK;AAGjBC,IAAAA,OAAO,EAAE,KAHQ;AAIjBC,IAAAA,IAAI,EAAE,IAJW;AAKjBC,IAAAA,OAAO,EAAE,IALQ;AAMjBC,IAAAA,OAAO,EAAE,IANQ;AAOjBC,IAAAA,UAAU,EAAE,IAPK;AAQjBC,IAAAA,YAAY,EAAE,KARG;AASjBC,IAAAA,UAAU,EAAE,KATK;AAUjBC,IAAAA,UAAU,EAAE,KAVK;AAWjBC,IAAAA,SAAS,EAAE,IAXM;AAYjBC,IAAAA,kBAAkB,EAAE,IAZH;AAajBC,IAAAA,kBAAkB,EAAE,KAbH;AAcjBC,IAAAA,kBAAkB,EAAE,KAdH;AAejBC,IAAAA,iBAAiB,EAAE,KAfF;AAgBjBC,IAAAA,QAAQ,EAAE;AAhBO,GAArB;;AAD6B,sBAoBH3C,UAAU,CAACG,iBAAD,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,SAVb;AAWJC,MAAAA,kBAAkB,EAAEK,KAAK,CAACL,kBAXtB;AAYJC,MAAAA,kBAAkB,EAAEI,KAAK,CAACJ,kBAZtB;AAaJC,MAAAA,kBAAkB,EAAEG,KAAK,CAACH,kBAbtB;AAcJC,MAAAA,iBAAiB,EAAEE,KAAK,CAACF,iBAdrB;AAeJC,MAAAA,QAAQ,EAAEC,KAAK,CAACD,QAfZ;AAgBJ4D,MAAAA,gBAhBI;AAiBJE,MAAAA,gBAjBI;AAkBJ3D,MAAAA,iBAlBI;AAmBJiD,MAAAA,gBAnBI;AAoBJ1C,MAAAA,aApBI;AAqBJE,MAAAA,kBArBI;AAsBJyC,MAAAA,cAtBI;AAuBJC,MAAAA,YAvBI;AAwBJC,MAAAA,YAxBI;AAyBJX,MAAAA,aAzBI;AA0BJY,MAAAA,eA1BI;AA2BJxC,MAAAA,gBA3BI;AA4BJE,MAAAA,gBA5BI;AA6BJ+C,MAAAA,QA7BI;AA8BJ1B,MAAAA,eA9BI;AA+BJyB,MAAAA,UA/BI;AAgCJlB,MAAAA;AAhCI,KADR;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KAmCK/D,KAAK,CAACgG,QAnCX,CADJ;AAuCH,CAzPD;;AA2PA,eAAejG,eAAf","sourcesContent":["import React, { useReducer } from 'react';\nimport axios from 'axios';\nimport ExperimentContext from './experimentContext';\nimport ExperimentReducer from './experimentReducer';\nimport {\n SEARCH_EXPERIMENTS,\n SET_LOADING,\n CLEAR_EXPERIMENTS,\n GET_EXPERIMENT,\n GET_GRAPH,\n SET_LOADING_GRAPH,\n CLEAN_GRAPH_DATA,\n UPDATE_SELECTION,\n GET_EXPERIMENT_RUN,\n SET_LOADING_RUN,\n CLEAN_RUN_DATA,\n SET_AUTOUPDATE_RUN,\n GET_PKL_DATA,\n SET_LOADING_PKL,\n UPDATE_NODES,\n SHOULD_UPDATE_GRAPH,\n SET_AUTOUPDATE_PKL,\n CLEAN_PKL_DATA,\n SET_PKL_CHANGES,\n UPDATE_EXPERIMENT_TS,\n SET_VIS_DATA,\n} from '../types';\n\nconst ExperimentState = props => {\n const initialState = {\n experiments: [],\n experiment: {},\n loading: false,\n data: null,\n rundata: null,\n pkldata: null,\n pklchanges: null,\n loadingGraph: false,\n loadingRun: false,\n loadingPkl: false,\n selection: null,\n enabledGraphSearch: true, \n startAutoUpdateRun: false, \n startAutoUpdatePkl: false,\n shouldUpdateGraph: false, \n visNodes: null, \n }\n\n const [state, dispatch] = useReducer(ExperimentReducer, initialState);\n\n // Search Experiments\n const searchExperiments = async text => {\n setLoading();\n const res = await axios.get(`http://84.88.185.30:8888/search/${text}`);\n dispatch({\n type: SEARCH_EXPERIMENTS,\n payload: res.data.experiment,\n });\n };\n\n // Get Experiment\n const getExperiment = async expid => {\n setLoading();\n //cleanGraphData();\n const res = await axios.get(`http://84.88.185.30:8888/expinfo/${expid}`); \n dispatch({\n type: GET_EXPERIMENT,\n payload: res.data,\n });\n };\n \n // Get Experiment Graph\n const getExperimentGraph = async expid => {\n setLoadingGraph();\n \n const res = await axios.get(`http://84.88.185.30:8888/graph/${expid}`);\n console.log(res.data);\n dispatch({\n type: GET_GRAPH,\n payload: res.data,\n });\n //this.setState({ data: res.data, loading: false, showGraph: !res.data.error });\n };\n\n // Get Experiment Run\n const getExperimentRun = async expid => {\n setLoadingRun();\n const res = await axios.get(`http://84.88.185.30:8888/exprun/${expid}`);\n console.log(res.data);\n dispatch({\n type: GET_EXPERIMENT_RUN,\n payload: res.data,\n });\n }\n\n // Get Experiment Pkl Data\n const getExperimentPkl = async (expid, timeStamp) => {\n setLoadingPkl();\n //timeStamp = 1000;\n const res = await axios.get(`http://84.88.185.30:8888/pklinfo/${expid}/${timeStamp}`);\n console.log(res.data);\n // const actualPkl = res.data;\n \n let retrievedPkl = null;\n var jobs = {};\n var colorChanges = {};\n var changes = \"\"\n retrievedPkl = res.data;\n if (state.data !== null && retrievedPkl.has_changed === true && retrievedPkl.pkl_content.length > 0){\n //console.log(retrievedPkl.pkl_content.length);\n for(var j = 0, job; j < retrievedPkl.pkl_content.length; j++){\n job = retrievedPkl.pkl_content[j];\n //console.log(job);\n jobs[ job.name ] = job;\n //console.log(jobs[job.name]);\n }\n let requireUpdate = false;\n console.log('Current ts: '+ state.data.pkl_timestamp); \n var newData = state.data;\n //console.log(newData.nodes);\n var expData = state.experiment;\n if (newData.nodes){\n for(var i = 0; i < newData.nodes.length; i++){\n // console.log(newNodes[i].id);\n //console.log(newData.nodes[i]);\n // console.log(jobs[ newNodes[i].id ]);\n\n if (newData.nodes[i].status_code !== jobs[ newData.nodes[i].id ].status_code){\n // changes += newData.nodes[i].id + \" from \" + newData.nodes[i].status + \" to \" + jobs[ newData.nodes[i].id ].status + \" || \";\n changes += timeStampToDate(retrievedPkl.pkl_timestamp) + \": \"+ newData.nodes[i].id + \" to \" + jobs[ newData.nodes[i].id ].status + \"\\n\";\n newData.nodes[i].status_code = jobs[ newData.nodes[i].id ].status_code;\n newData.nodes[i].status_color = jobs[ newData.nodes[i].id ].status_color;\n newData.nodes[i].status = jobs[ newData.nodes[i].id ].status;\n //console.log(newData.nodes[i].status_color)\n colorChanges[ newData.nodes[i].id ] = jobs[ newData.nodes[i].id ].status_color;\n requireUpdate = true;\n }\n }\n\n\n if (requireUpdate){ \n // console.log(newData.pkl_timestamp);\n // console.log(expData.pkl_timestamp);\n console.log(\"New ts: \" + retrievedPkl.pkl_timestamp)\n newData.pkl_timestamp = retrievedPkl.pkl_timestamp;\n expData.pkl_timestamp = retrievedPkl.pkl_timestamp;\n // console.log(newData.pkl_timestamp);\n // console.log(expData.pkl_timestamp);\n \n // console.log('Call Update');\n updateNodes(newData);\n updateExperimentTimeStamp(expData);\n // setUpdateGraph(true);\n // setUpdateGraph(false);\n if (state.pklchanges){\n setPklChanges(changes + state.pklchanges);\n } else {\n setPklChanges(changes);\n }\n\n for(var key in colorChanges) {\n console.log( key, colorChanges[key] );\n }\n \n \n } else { \n console.log('No changes but updating pkl anyway.')\n expData.pkl_timestamp = retrievedPkl.pkl_timestamp;\n updateExperimentTimeStamp(expData);\n }\n }\n }\n // } else {\n // var t = new Date( retrievedPkl.pkl_timestamp );\n // var formatted = t.toISOString();\n // setPklChanges(\"No news yet... \" + formatted)\n // }\n\n\n dispatch({\n type: GET_PKL_DATA,\n payload: res.data,\n });\n }\n\n const updateGraphColor = (idChange, newColor) => {\n this.state.visNodes.update({id:idChange, color: { background: newColor }});\n }\n\n\n // Cleaning\n const clearExperiments = () => dispatch({ type: CLEAR_EXPERIMENTS });\n const cleanGraphData = () => dispatch({ type: CLEAN_GRAPH_DATA });\n const cleanRunData = () => dispatch({ type: CLEAN_RUN_DATA });\n const cleanPklData = () => dispatch({ type: CLEAN_PKL_DATA });\n\n // Set Loading\n const setLoading = () => dispatch({ type: SET_LOADING });\n const setLoadingGraph = () => dispatch({ type: SET_LOADING_GRAPH });\n const setLoadingRun = () => dispatch({ type: SET_LOADING_RUN });\n const setLoadingPkl = () => dispatch({ type: SET_LOADING_PKL });\n\n\n // Action Things\n const updateSelection = (currentSelection) => dispatch({ type: UPDATE_SELECTION, payload: currentSelection });\n const updateNodes = (newdata) => dispatch({ type: UPDATE_NODES, payload: newdata });\n const updateExperimentTimeStamp = (newExperiment) => dispatch({ type: UPDATE_EXPERIMENT_TS, payload: newExperiment});\n const setAutoUpdateRun = (value) => dispatch({ type: SET_AUTOUPDATE_RUN, payload: value });\n const setAutoUpdatePkl = (value) => dispatch({ type: SET_AUTOUPDATE_PKL, payload: value });\n const setUpdateGraph = (value) => dispatch({ type: SHOULD_UPDATE_GRAPH, payload: value });\n const setPklChanges = (value) => dispatch({ type: SET_PKL_CHANGES, payload: value });\n const setVisData = (value) => dispatch({ type: SET_VIS_DATA, payload: value});\n\n // Other Utils\n const hashCode = (value) => {\n var hash = 0, i, chr;\n if (value.length === 0) return hash;\n for (i = 0; i < value.length; i++) {\n chr = value.charCodeAt(i);\n hash = ((hash << 5) - hash) + chr;\n hash |= 0; // Convert to 32bit integer\n }\n console.log(hash);\n return hash;\n };\n \n const timeStampToDate = (value) => {\n //console.log('Setting new format: ' + value);\n let formattedDate = \"\";\n var date = new Date( value * 1000);\n var hours = date.getHours();\n var minutes = \"0\" + date.getMinutes();\n var seconds = \"0\" + date.getSeconds();\n formattedDate = hours + ':' + minutes.substr(-2) + ':' + seconds.substr(-2);\n // formattedDate = date.toISOString();\n return formattedDate;\n }\n\n return (\n \n {props.children}\n \n );\n};\n\nexport default ExperimentState;"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/04c1f2a89ec47b7bf2c713b694eb80a8.json b/node_modules/.cache/babel-loader/04c1f2a89ec47b7bf2c713b694eb80a8.json new file mode 100644 index 0000000000000000000000000000000000000000..522dca1561f48eb8aa130d00e11078a336182790 --- /dev/null +++ b/node_modules/.cache/babel-loader/04c1f2a89ec47b7bf2c713b694eb80a8.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/pages/ExperimentCentral.js\";\nimport React, { Fragment, useContext } from 'react';\nimport Experiment from '../experiment/Experiment';\nimport GraphRepresentation from '../experiment/GraphRepresentation';\nimport GraphNativeRep from '../experiment/GraphNativeRep';\nimport ExperimentContext from '../context/experiment/experimentContext';\nimport Selection from '../experiment/Selection'; // import OpenRun from '../experiment/OpenRun';\n\nimport Running from '../experiment/Running';\nimport JobMonitor from '../experiment/JobMonitor';\n\nconst ExperimentCentral = ({\n match\n}) => {\n const expid = match.params.expid;\n const experimentContext = useContext(ExperimentContext);\n const data = experimentContext.data,\n updateSelection = experimentContext.updateSelection,\n loadingGraph = experimentContext.loadingGraph,\n loadingRun = experimentContext.loadingRun,\n shouldUpdateGraph = experimentContext.shouldUpdateGraph,\n cleanGraphData = experimentContext.cleanGraphData,\n cleanRunData = experimentContext.cleanRunData,\n getExperimentRun = experimentContext.getExperimentRun,\n getExperimentPkl = experimentContext.getExperimentPkl,\n cleanPklData = experimentContext.cleanPklData,\n startAutoUpdateRun = experimentContext.startAutoUpdateRun,\n startAutoUpdatePkl = experimentContext.startAutoUpdatePkl,\n setAutoUpdateRun = experimentContext.setAutoUpdateRun,\n rundata = experimentContext.rundata,\n pklchanges = experimentContext.pklchanges,\n experiment = experimentContext.experiment;\n return React.createElement(Fragment, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 32\n },\n __self: this\n }, React.createElement(Experiment, {\n expidToken: expid,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 33\n },\n __self: this\n }), React.createElement(\"div\", {\n className: \"row mt-2\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 34\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-12\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 35\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"card\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-9 pr-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 38\n },\n __self: this\n }, React.createElement(GraphNativeRep, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 39\n },\n __self: this\n })), React.createElement(\"div\", {\n className: \"col-3 pl-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 48\n },\n __self: this\n }, data && React.createElement(Selection, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 49\n },\n __self: this\n }), startAutoUpdatePkl && React.createElement(JobMonitor, {\n experiment: experiment,\n getExperimentPkl: getExperimentPkl,\n cleanPklData: cleanPklData,\n pklchanges: pklchanges,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 51\n },\n __self: this\n }))), React.createElement(\"div\", {\n className: \"card-footer p-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 59\n },\n __self: this\n }, startAutoUpdateRun && React.createElement(Running, {\n rundata: rundata,\n loadingRun: loadingRun,\n cleanRunData: cleanRunData,\n getExperimentRun: getExperimentRun,\n experiment: experiment,\n startAutoUpdateRun: startAutoUpdateRun,\n setAutoUpdateRun: setAutoUpdateRun,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 62\n },\n __self: this\n }), !startAutoUpdateRun && React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 73\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-12 text-center\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 74\n },\n __self: this\n }, React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 75\n },\n __self: this\n }, \"Press \", React.createElement(\"span\", {\n className: \"badge badge-dark\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 76\n },\n __self: this\n }, \"Show Log\"), \" to see the last 50 lines of the running log of this experiment. If the experiment is running, the log will update automatically.\"))))))));\n};\n\nexport default ExperimentCentral;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/pages/ExperimentCentral.js"],"names":["React","Fragment","useContext","Experiment","GraphRepresentation","GraphNativeRep","ExperimentContext","Selection","Running","JobMonitor","ExperimentCentral","match","expid","params","experimentContext","data","updateSelection","loadingGraph","loadingRun","shouldUpdateGraph","cleanGraphData","cleanRunData","getExperimentRun","getExperimentPkl","cleanPklData","startAutoUpdateRun","startAutoUpdatePkl","setAutoUpdateRun","rundata","pklchanges","experiment"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,QAAhB,EAA0BC,UAA1B,QAA4C,OAA5C;AACA,OAAOC,UAAP,MAAuB,0BAAvB;AACA,OAAOC,mBAAP,MAAgC,mCAAhC;AACA,OAAOC,cAAP,MAA2B,8BAA3B;AACA,OAAOC,iBAAP,MAA8B,yCAA9B;AACA,OAAOC,SAAP,MAAsB,yBAAtB,C,CACA;;AACA,OAAOC,OAAP,MAAoB,uBAApB;AACA,OAAOC,UA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AD,IACG;AAAK,IAAA,SAAS,EAAC,KAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACI;AAAK,IAAA,SAAS,EAAC,oBAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACI;AAAG,IAAA,SAAS,EAAC,MAAb;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,eACU;AAAM,IAAA,SAAS,EAAC,kBAAhB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gBADV,sIADJ,CADJ,CAdR,CAvBJ,CADJ,CADJ,CAFJ,CADA;AAgEH,CApFD;;AAsFA,eAAef,iBAAf","sourcesContent":["import React, { Fragment, useContext } from 'react';\nimport Experiment from '../experiment/Experiment';\nimport GraphRepresentation from '../experiment/GraphRepresentation';\nimport GraphNativeRep from '../experiment/GraphNativeRep';\nimport ExperimentContext from '../context/experiment/experimentContext';\nimport Selection from '../experiment/Selection';\n// import OpenRun from '../experiment/OpenRun';\nimport Running from '../experiment/Running';\nimport JobMonitor from '../experiment/JobMonitor';\n\nconst ExperimentCentral = ({ match }) => {\n const expid = match.params.expid;\n const experimentContext = useContext(ExperimentContext);\n const {data, \n updateSelection, \n loadingGraph, \n loadingRun, \n shouldUpdateGraph,\n cleanGraphData, \n cleanRunData, \n getExperimentRun,\n getExperimentPkl, \n cleanPklData,\n startAutoUpdateRun, \n startAutoUpdatePkl,\n setAutoUpdateRun,\n rundata,\n pklchanges,\n experiment } = experimentContext;\n \n return (\n \n \n
\n
\n
\n
\n
\n \n {/* */}\n
\n
\n {data && }\n {startAutoUpdatePkl &&\n \n } \n
\n
\n
\n\n\n {startAutoUpdateRun && } \n\n {!startAutoUpdateRun &&\n
\n
\n

\n Press Show Log to see the last 50 lines of the running log of this experiment. \n If the experiment is running, the log will update automatically.\n

\n
\n
\n }\n \n\n
\n
\n
\n
\n \n {/* */}\n \n \n \n
\n );\n}; \n\nexport default ExperimentCentral;"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/063a9feba42c86277f6cc14690ebfd49.json b/node_modules/.cache/babel-loader/063a9feba42c86277f6cc14690ebfd49.json new file mode 100644 index 0000000000000000000000000000000000000000..c61a871f4b1b370a275b5dff76532b5dc6752331 --- /dev/null +++ b/node_modules/.cache/babel-loader/063a9feba42c86277f6cc14690ebfd49.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js\";\nimport React, { Component } from \"react\"; // import vis from \"vis-network\";\n\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n constructor(...args) {\n super(...args);\n\n this.updateVisNodes = nodes => {\n this.props.setVisData(nodes);\n };\n }\n\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else if (nextProps.data && this.props.data && nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp) {\n console.log(\"Rerendering\");\n return true;\n } else if (nextProps.loadingGraph !== this.props.loadingGraph) {\n return true;\n } else {\n return false;\n }\n }\n\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n render() {\n if (this.props.loadingGraph) return React.createElement(Spinner, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 32\n },\n __self: this\n });\n\n if (this.props.data == null) {\n return React.createElement(\"div\", {\n className: \"card-body text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 35\n },\n __self: this\n }, React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Press \", React.createElement(\"span\", {\n className: \"badge badge-info\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Show Graph\"), \" to see the graph representation of the experiment.\"), React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"If the experiment is running, press \", React.createElement(\"span\", {\n className: \"badge badge-dark\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"Start Job Monitor\"), \" to start a live tracker of the changes on the experiment's jobs. This process will automatically update the graph's nodes colors and show a log of the detected changes.\"));\n }\n\n var nodes_array = [];\n var edges_array = [];\n\n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: {\n background: node.status_color,\n border: \"black\"\n },\n level: node.level\n }));\n this.props.data.edges.map(edge => edges_array.push({\n from: edge.from,\n to: edge.to\n }));\n }\n\n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n const options = {\n edges: {\n arrows: {\n to: {\n enabled: true\n }\n }\n },\n layout: {\n improvedLayout: true,\n hierarchical: {\n // enabled: true,\n //levelSeparation: 150,\n nodeSpacing: 250,\n blockShifting: true,\n edgeMinimization: true,\n parentCentralization: true,\n direction: 'UD'\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true\n },\n physics: {\n enabled: false\n },\n nodes: {\n shape: 'dot'\n }\n };\n const graph = {\n nodes: nodes,\n edges: edges\n };\n\n class VisNetwork extends Component {\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else {\n return false;\n }\n }\n\n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", params => {\n //console.log(params);\n if (params.nodes) {\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n });\n } // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n\n\n render() {\n return React.createElement(\"div\", {\n className: \"card-body p-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 131\n },\n __self: this\n }, React.createElement(\"div\", {\n ref: \"myRef\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 132\n },\n __self: this\n }));\n }\n\n }\n\n this.updateVisNodes(nodes);\n return React.createElement(VisNetwork, {\n graph: graph,\n options: options,\n updateSelection: this.props.updateSelection,\n shouldUpdateGraph: this.props.shouldUpdateGraph,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 140\n },\n __self: this\n });\n }\n\n}\n\nconst experimentStyle = {\n height: 600\n};\nexport default GraphNativeRep;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js"],"names":["React","Component","Spinner","vis","GraphNativeRep","updateVisNodes","nodes","props","setVisData","shouldComponentUpdate","nextProps","nextState","shouldUpdateGraph","data","pkl_timestamp","console","log","loadingGraph","componentWillUnmount","cleanGraphData","render","nodes_array","edges_array","edges","map","node","push","id","label","color","background","status_color","border","level","edge","from","to","DataSet","options","arrows","enabled","layout","improvedLayout","hierarchical","nodeSpacing","blockShifting","edgeMinimization","parentCentralization","direction","interaction","dragNodes","hoverConnectedEdges","navigationButtons","physics","shape","graph","VisNetwork","componentDidMount","network","Network","refs","myRef","on","params","updateSelection","experimentStyle","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,SAAhB,QAAiC,OAAjC,C,CACA;;AACA,OAAOC,OAAP,MAAoB,mBAApB;AACA,OAAOC,GAAP,MAAgB,KAAhB;;AAEA,MAAMC,cAAN,SAA6BH,SAA7B,CAAuC;AAAA;AAAA;;AAAA,SAmBnCI,cAnBmC,GAmBjBC,KAAD,IAAW;AACxB,WAAKC,KAAL,CAAWC,UAAX,CAAsBF,KAAtB;AACH,KArBkC;AAAA;;AAEnCG,EAAAA,qBAAqB,CAACC,SAAD,EAAYC,SAAZ,EAAsB;AACvC,QAAI,KAAKJ,KAAL,CAAWK,iBAAX,KAAiC,IAArC,EAA0C;AACtC,aAAO,IAAP;AACD,KAFH,MAEQ,IAAIF,SAAS,CAACG,IAAV,IAAkB,KAAKN,KAAL,CAAWM,IAA7B,IAAsCH,SAAS,C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AAK5D,cAAL,CAAoBC,KAApB;AAEA,WAAO,oBAAC,UAAD;AACH,MAAA,KAAK,EAAEiD,KADJ;AAEH,MAAA,OAAO,EAAEjB,OAFN;AAGH,MAAA,eAAe,EAAE,KAAK/B,KAAL,CAAWyD,eAHzB;AAIH,MAAA,iBAAiB,EAAE,KAAKzD,KAAL,CAAWK,iBAJ3B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAAP;AAOH;;AA7IkC;;AA2JvC,MAAMqD,eAAe,GAAG;AACpBC,EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,eAAe9D,cAAf","sourcesContent":["import React, { Component } from \"react\";\n// import vis from \"vis-network\";\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n\n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true\n }else if (nextProps.data && this.props.data && (nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp)){\n console.log(\"Rerendering\")\n return true;\n }else if (nextProps.loadingGraph !== this.props.loadingGraph){\n return true; \n }else{\n return false;\n }\n }\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n updateVisNodes = (nodes) => {\n this.props.setVisData(nodes);\n }\n\n\n\n render () {\n if (this.props.loadingGraph) return ;\n if (this.props.data == null){\n return (\n
\n

Press Show Graph to see the graph representation of the experiment.

\n

If the experiment is running, press Start Job Monitor to start a live tracker of the changes on the experiment's jobs.\n This process will automatically update the graph's nodes colors and show a log of the detected changes.\n

\n
\n );\n }\n\n var nodes_array = [];\n var edges_array = [];\n \n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: { background: node.status_color, border: \"black\" },\n level: node.level,\n })\n );\n \n this.props.data.edges.map(edge => \n edges_array.push({ from: edge.from, to: edge.to })\n );\n }\n \n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n\n\n const options = {\n edges: {\n arrows: {\n to: { enabled: true }\n }\n },\n layout: {\n improvedLayout: true,\n hierarchical: {\n // enabled: true,\n //levelSeparation: 150,\n nodeSpacing: 250,\n blockShifting: true,\n edgeMinimization: true,\n parentCentralization: true,\n direction: 'UD',\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true,\n },\n physics: {\n enabled: false,\n },\n nodes: {\n shape: 'dot',\n }\n };\n \n const graph = {\n nodes : nodes,\n edges : edges,\n };\n\n class VisNetwork extends Component {\n \n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true;\n } else {\n return false;\n }\n }\n \n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", (params) => {\n //console.log(params);\n if (params.nodes){\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n \n });\n }\n \n // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n \n render() { \n return (\n
\n
\n
\n );\n }\n }\n\n this.updateVisNodes(nodes);\n \n return ;\n\n }\n\n\n \n\n \n\n \n \n\n \n\n}\n\nconst experimentStyle = {\n height: 600\n };\n\nexport default GraphNativeRep;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/08943c82458aaf1a03a10f562fafc701.json b/node_modules/.cache/babel-loader/08943c82458aaf1a03a10f562fafc701.json new file mode 100644 index 0000000000000000000000000000000000000000..12a94c6d55b1a6e5244c8ab8e1aff36f1c2d0751 --- /dev/null +++ b/node_modules/.cache/babel-loader/08943c82458aaf1a03a10f562fafc701.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js\";\nimport React, { Component } from \"react\"; // import vis from \"vis-network\";\n\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n constructor(...args) {\n super(...args);\n\n this.updateVisNodes = nodes => {\n this.props.setVisData(nodes);\n };\n }\n\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else if (nextProps.data && this.props.data && nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp) {\n console.log(\"Rerendering\");\n return true;\n } else if (nextProps.loadingGraph !== this.props.loadingGraph) {\n return true;\n } else {\n return false;\n }\n }\n\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n render() {\n if (this.props.loadingGraph) return React.createElement(Spinner, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 32\n },\n __self: this\n });\n\n if (this.props.data == null) {\n return React.createElement(\"div\", {\n className: \"card-body text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 35\n },\n __self: this\n }, React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Press \", React.createElement(\"span\", {\n className: \"badge badge-info\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Show Graph\"), \" to see the graph representation of the experiment.\"), React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"If the experiment is running, press \", React.createElement(\"span\", {\n className: \"badge badge-dark\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"Start Job Monitor\"), \" to start a live tracker of the changes on the experiment's jobs. This process will automatically update the graph's nodes colors and show a log of the detected changes.\"));\n }\n\n var nodes_array = [];\n var edges_array = [];\n\n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: {\n background: node.status_color,\n border: \"black\"\n },\n level: node.level\n }));\n this.props.data.edges.map(edge => edges_array.push({\n from: edge.from,\n to: edge.to\n }));\n }\n\n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n const options = {\n edges: {\n arrows: {\n to: {\n enabled: true\n }\n }\n },\n layout: {\n //improvedLayout: true,\n hierarchical: {\n // enabled: true,\n nodeSpacing: 250,\n //edgeMinimization: true,\n parentCentralization: true,\n direction: 'UD',\n sortMethod: 'hubsize'\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true\n },\n physics: {\n enabled: false\n },\n nodes: {\n shape: 'dot'\n }\n };\n const graph = {\n nodes: nodes,\n edges: edges\n };\n\n class VisNetwork extends Component {\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else {\n return false;\n }\n }\n\n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", params => {\n //console.log(params);\n if (params.nodes) {\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n });\n } // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n\n\n render() {\n return React.createElement(\"div\", {\n className: \"card-body p-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 130\n },\n __self: this\n }, React.createElement(\"div\", {\n ref: \"myRef\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 131\n },\n __self: this\n }));\n }\n\n }\n\n this.updateVisNodes(nodes);\n return React.createElement(VisNetwork, {\n graph: graph,\n options: options,\n updateSelection: this.props.updateSelection,\n shouldUpdateGraph: this.props.shouldUpdateGraph,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 139\n },\n __self: this\n });\n }\n\n}\n\nconst experimentStyle = {\n height: 600\n};\nexport default GraphNativeRep;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js"],"names":["React","Component","Spinner","vis","GraphNativeRep","updateVisNodes","nodes","props","setVisData","shouldComponentUpdate","nextProps","nextState","shouldUpdateGraph","data","pkl_timestamp","console","log","loadingGraph","componentWillUnmount","cleanGraphData","render","nodes_array","edges_array","edges","map","node","push","id","label","color","background","status_color","border","level","edge","from","to","DataSet","options","arrows","enabled","layout","hierarchical","nodeSpacing","parentCentralization","direction","sortMethod","interaction","dragNodes","hoverConnectedEdges","navigationButtons","physics","shape","graph","VisNetwork","componentDidMount","network","Network","refs","myRef","on","params","updateSelection","experimentStyle","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,SAAhB,QAAiC,OAAjC,C,CACA;;AACA,OAAOC,OAAP,MAAoB,mBAApB;AACA,OAAOC,GAAP,MAAgB,KAAhB;;AAEA,MAAMC,cAAN,SAA6BH,SAA7B,CAAuC;AAAA;AAAA;;AAAA,SAmBnCI,cAnBmC,GAmBjBC,KAAD,IAAW;AACxB,WAAKC,KAAL,CAAWC,UAAX,CAAsBF,KAAtB;AACH,KArBkC;AAAA;;AAEnCG,EAAAA,qBAAqB,CAACC,SAAD,EAAYC,SAAZ,EAAsB;AACvC,QAAI,KAAKJ,KAAL,CAAWK,iBAAX,KAAiC,IAArC,EAA0C;AACtC,aAAO,IAAP;AACD,KAFH,MAEQ,IAAIF,SAAS,CAACG,IAAV,IAAkB,KAAKN,KAAL,CAAWM,IAA7B,IAAsCH,SAAS,CAACG,IAAV,CAAeC,aAAf,KAAiC,KAAKP,KAAL,CAAWM,IAAX,CAAgBC,aAA3F,EAA0G;AAC9GC,MAAAA,OAAO,CAACC,GAAR,CAAY,aAAZ;AACA,aAAO,IAAP;AACD,KAHK,MAGA,IAAIN,SAAS,CAACO,YAAV,KAA2B,KAAKV,KAAL,CAAWU,YAA1C,EAAuD;AAC3D,aAAO,IAAP;AACD,KAFK,MAED;AACH,aAAO,KAAP;AACD;AACN;;AACDC,EAAAA,oBAAoB,GAAG;AACnBH,IAAAA,OAAO,CAACC,GAAR,CAAY,YAAZ;AACA,SAAKT,KAAL,CAAWY,cAAX;AACH;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BAAX,KAAiC,IAArC,EAA0C;AACrC,iBAAO,IAAP;AACH,SAFF,MAEQ;AACH,iBAAO,KAAP;AACH;AACJ;;AAED2C,MAAAA,iBAAiB,GAAG;AAChB,YAAIC,OAAO,GAAG,IAAIrD,GAAG,CAACsD,OAAR,CAAgB,KAAKC,IAAL,CAAUC,KAA1B,EAAiC,KAAKpD,KAAL,CAAW8C,KAA5C,EAAmD,KAAK9C,KAAL,CAAW+B,OAA9D,CAAd;AACAkB,QAAAA,OAAO,CAACI,EAAR,CAAW,OAAX,EAAqBC,MAAD,IAAY;AAC5B;AACA,cAAIA,MAAM,CAACvD,KAAX,EAAiB;AACb;AACA,iBAAKC,KAAL,CAAWuD,eAAX,CAA2BD,MAAM,CAACvD,KAAlC;AACH;AAEJ,SAPD;AAQH,OApB8B,CAsB/B;AACA;AACA;AACA;;;AAEAc,MAAAA,MAAM,GAAG;AACL,eACI;AAAK,UAAA,SAAS,EAAC,eAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,WACI;AAAK,UAAA,GAAG,EAAC,OAAT;AAAiB,UAAA,KAAK,EAAE2C,eAAxB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,UADJ,CADJ;AAKH;;AAjC8B;;AAoCnC,SAAK1D,cAAL,CAAoBC,KAApB;AAEA,WAAO,oBAAC,UAAD;AACH,MAAA,KAAK,EAAE+C,KADJ;AAEH,MAAA,OAAO,EAAEf,OAFN;AAGH,MAAA,eAAe,EAAE,KAAK/B,KAAL,CAAWuD,eAHzB;AAIH,MAAA,iBAAiB,EAAE,KAAKvD,KAAL,CAAWK,iBAJ3B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAAP;AAOH;;AA5IkC;;AA0JvC,MAAMmD,eAAe,GAAG;AACpBC,EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,eAAe5D,cAAf","sourcesContent":["import React, { Component } from \"react\";\n// import vis from \"vis-network\";\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n\n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true\n }else if (nextProps.data && this.props.data && (nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp)){\n console.log(\"Rerendering\")\n return true;\n }else if (nextProps.loadingGraph !== this.props.loadingGraph){\n return true; \n }else{\n return false;\n }\n }\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n updateVisNodes = (nodes) => {\n this.props.setVisData(nodes);\n }\n\n\n\n render () {\n if (this.props.loadingGraph) return ;\n if (this.props.data == null){\n return (\n
\n

Press Show Graph to see the graph representation of the experiment.

\n

If the experiment is running, press Start Job Monitor to start a live tracker of the changes on the experiment's jobs.\n This process will automatically update the graph's nodes colors and show a log of the detected changes.\n

\n
\n );\n }\n\n var nodes_array = [];\n var edges_array = [];\n \n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: { background: node.status_color, border: \"black\" },\n level: node.level,\n })\n );\n \n this.props.data.edges.map(edge => \n edges_array.push({ from: edge.from, to: edge.to })\n );\n }\n \n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n\n\n const options = {\n edges: {\n arrows: {\n to: { enabled: true }\n }\n },\n layout: {\n //improvedLayout: true,\n hierarchical: {\n // enabled: true,\n nodeSpacing: 250,\n //edgeMinimization: true,\n parentCentralization: true,\n direction: 'UD',\n sortMethod: 'hubsize',\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true,\n },\n physics: {\n enabled: false,\n },\n nodes: {\n shape: 'dot',\n }\n };\n \n const graph = {\n nodes : nodes,\n edges : edges,\n };\n\n class VisNetwork extends Component {\n \n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true;\n } else {\n return false;\n }\n }\n \n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", (params) => {\n //console.log(params);\n if (params.nodes){\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n \n });\n }\n \n // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n \n render() { \n return (\n
\n
\n
\n );\n }\n }\n\n this.updateVisNodes(nodes);\n \n return ;\n\n }\n\n\n \n\n \n\n \n \n\n \n\n}\n\nconst experimentStyle = {\n height: 600\n };\n\nexport default GraphNativeRep;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/0aa58441dabc0e1fabf092b7cae77c93.json b/node_modules/.cache/babel-loader/0aa58441dabc0e1fabf092b7cae77c93.json new file mode 100644 index 0000000000000000000000000000000000000000..b4820118d9cad609aa04b15858d7d66a445d29f1 --- /dev/null +++ b/node_modules/.cache/babel-loader/0aa58441dabc0e1fabf092b7cae77c93.json @@ -0,0 +1 @@ +{"ast":null,"code":"import _objectSpread from \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/node_modules/@babel/runtime/helpers/esm/objectSpread\";\nimport { SEARCH_EXPERIMENTS, SET_LOADING, CLEAR_EXPERIMENTS, GET_EXPERIMENT, GET_GRAPH, SET_LOADING_GRAPH, CLEAN_GRAPH_DATA, CLEAN_RUN_DATA, UPDATE_SELECTION, SET_LOADING_RUN, GET_EXPERIMENT_RUN, SET_AUTOUPDATE_RUN, GET_PKL_DATA, SET_LOADING_PKL, UPDATE_NODES, SHOULD_UPDATE_GRAPH, SET_AUTOUPDATE_PKL, CLEAN_PKL_DATA, SET_PKL_CHANGES, UPDATE_EXPERIMENT_TS, SET_VIS_DATA } from '../types';\nexport default ((state, action) => {\n switch (action.type) {\n case CLEAN_GRAPH_DATA:\n return _objectSpread({}, state, {\n data: null,\n selection: null,\n enabledGraphSearch: true,\n loadingGraph: false,\n loadingPkl: false,\n visNodes: null\n });\n\n case CLEAN_RUN_DATA:\n return _objectSpread({}, state, {\n rundata: null,\n startAutoUpdateRun: false\n });\n\n case CLEAN_PKL_DATA:\n return _objectSpread({}, state, {\n shouldUpdateGraph: false,\n startAutoUpdatePkl: false,\n pklchanges: null\n });\n\n case UPDATE_SELECTION:\n return _objectSpread({}, state, {\n selection: action.payload\n });\n\n case SEARCH_EXPERIMENTS:\n return _objectSpread({}, state, {\n experiments: action.payload,\n loading: false\n });\n\n case SET_AUTOUPDATE_RUN:\n return _objectSpread({}, state, {\n startAutoUpdateRun: action.payload\n });\n\n case SET_AUTOUPDATE_PKL:\n return _objectSpread({}, state, {\n startAutoUpdatePkl: action.payload\n });\n\n case SET_LOADING:\n return _objectSpread({}, state, {\n loading: true\n });\n\n case SET_LOADING_PKL:\n return _objectSpread({}, state, {\n loadingPkl: true\n });\n\n case SET_LOADING_GRAPH:\n return _objectSpread({}, state, {\n loadingGraph: true,\n enabledGraphSearch: false\n });\n\n case SET_LOADING_RUN:\n return _objectSpread({}, state, {\n loadingRun: true\n });\n\n case SHOULD_UPDATE_GRAPH:\n return _objectSpread({}, state, {\n shouldUpdateGraph: action.payload\n });\n\n case CLEAR_EXPERIMENTS:\n return _objectSpread({}, state, {\n experiments: [],\n loading: false\n });\n\n case GET_EXPERIMENT:\n return _objectSpread({}, state, {\n experiment: action.payload,\n loading: false,\n data: null\n });\n\n case GET_GRAPH:\n return _objectSpread({}, state, {\n data: action.payload,\n loadingGraph: false,\n enabledGraphSearch: true\n });\n\n case GET_EXPERIMENT_RUN:\n return _objectSpread({}, state, {\n rundata: action.payload,\n loadingRun: false\n });\n\n case GET_PKL_DATA:\n return _objectSpread({}, state, {\n pkldata: action.payload,\n loadingPkl: false\n });\n\n case UPDATE_NODES:\n return _objectSpread({}, state, {\n data: action.payload\n });\n\n case UPDATE_EXPERIMENT_TS:\n return _objectSpread({}, state, {\n experiment: action.payload\n });\n\n case SET_PKL_CHANGES:\n return _objectSpread({}, state, {\n pklchanges: action.payload\n });\n\n case SET_VIS_DATA:\n return _objectSpread({}, state, {\n visNodes: action.payload\n });\n\n default:\n return null;\n }\n\n ;\n});","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/context/experiment/experimentReducer.js"],"names":["SEARCH_EXPERIMENTS","SET_LOADING","CLEAR_EXPERIMENTS","GET_EXPERIMENT","GET_GRAPH","SET_LOADING_GRAPH","CLEAN_GRAPH_DATA","CLEAN_RUN_DATA","UPDATE_SELECTION","SET_LOADING_RUN","GET_EXPERIMENT_RUN","SET_AUTOUPDATE_RUN","GET_PKL_DATA","SET_LOADING_PKL","UPDATE_NODES","SHOULD_UPDATE_GRAPH","SET_AUTOUPDATE_PKL","CLEAN_PKL_DATA","SET_PKL_CHANGES","UPDATE_EXPERIMENT_TS","SET_VIS_DATA","state","action","type","data","selection","enabledGraphSearch","loadingGraph","loadingPkl","visNodes","rundata","startAutoUpdateRun","shouldUpdateGraph","startAutoUpdatePkl","pklchanges","payload","experiments","loading","loadingRun","experiment","pkldata"],"mappings":";AAAA,SACIA,kBADJ,EAEIC,WAFJ,EAGIC,iBAHJ,EAIIC,cAJJ,EAKIC,SALJ,EAMIC,iBANJ,EAOIC,gBAPJ,EAQIC,cARJ,EASIC,gBATJ,EAUIC,eAVJ,EAWIC,kBAXJ,EAYIC,kBAZJ,EAaIC,YAbJ,EAcIC,eAdJ,EAeIC,YAfJ,EAgBIC,mBAhBJ,EAiBIC,kBAjBJ,EAkBIC,cAlBJ,EAmBIC,eAnBJ,EAoBIC,oBApBJ,EAqBIC,YArBJ,QAsBO,UAtBP;AAwBA,gBAAe,CAACC,KAAD,EAAQC,MAAR,KAAmB;AAC9B,UAAQA,MAAM,CAACC,IAAf;AACI,SAAKjB,gBAAL;AACI,+BACOe,KADP;AAEIG,QAAAA,IAAI,EAAE,IAFV;AAGIC,QAAAA,SAAS,EAAE,IAHf;AAIIC,QAAAA,kBAAkB,EAAE,IAJxB;AAKIC,QAAAA,YAAY,EAAE,KALlB;AAMIC,QAAAA,UAAU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,cAAL;AACI,+BACOkB,KADP;AAEIkB,QAAAA,UAAU,EAAEjB,MAAM,CAACa,OAFvB;AAGIE,QAAAA,OAAO,EAAE,KAHb;AAIIb,QAAAA,IAAI,EAAE;AAJV;;AAMJ,SAAKpB,SAAL;AACI,+BACOiB,KADP;AAEIG,QAAAA,IAAI,EAAEF,MAAM,CAACa,OAFjB;AAGIR,QAAAA,YAAY,EAAE,KAHlB;AAIID,QAAAA,kBAAkB,EAAE;AAJxB;;AAMJ,SAAKhB,kBAAL;AACI,+BACOW,KADP;AAEIS,QAAAA,OAAO,EAAER,MAAM,CAACa,OAFpB;AAGIG,QAAAA,UAAU,EAAE;AAHhB;;AAKJ,SAAK1B,YAAL;AACI,+BACOS,KADP;AAEImB,QAAAA,OAAO,EAAElB,MAAM,CAACa,OAFpB;AAGIP,QAAAA,UAAU,EAAE;AAHhB;;AAKJ,SAAKd,YAAL;AACI,+BACOO,KADP;AAEIG,QAAAA,IAAI,EAAEF,MAAM,CAACa;AAFjB;;AAIJ,SAAKhB,oBAAL;AACI,+BACOE,KADP;AAEIkB,QAAAA,UAAU,EAAEjB,MAAM,CAACa;AAFvB;;AAIJ,SAAKjB,eAAL;AACI,+BACOG,KADP;AAEIa,QAAAA,UAAU,EAAEZ,MAAM,CAACa;AAFvB;;AAIJ,SAAKf,YAAL;AACI,+BACOC,KADP;AAEIQ,QAAAA,QAAQ,EAAEP,MAAM,CAACa;AAFrB;;AAIJ;AACI,aAAO,IAAP;AA5HR;;AA6HC;AACJ,CA/HD","sourcesContent":["import {\n SEARCH_EXPERIMENTS,\n SET_LOADING,\n CLEAR_EXPERIMENTS,\n GET_EXPERIMENT,\n GET_GRAPH,\n SET_LOADING_GRAPH,\n CLEAN_GRAPH_DATA,\n CLEAN_RUN_DATA,\n UPDATE_SELECTION,\n SET_LOADING_RUN,\n GET_EXPERIMENT_RUN,\n SET_AUTOUPDATE_RUN,\n GET_PKL_DATA,\n SET_LOADING_PKL,\n UPDATE_NODES,\n SHOULD_UPDATE_GRAPH,\n SET_AUTOUPDATE_PKL,\n CLEAN_PKL_DATA,\n SET_PKL_CHANGES,\n UPDATE_EXPERIMENT_TS,\n SET_VIS_DATA,\n} from '../types';\n\nexport default (state, action) => {\n switch (action.type) {\n case CLEAN_GRAPH_DATA:\n return {\n ...state,\n data: null,\n selection: null,\n enabledGraphSearch: true,\n loadingGraph: false,\n loadingPkl: false,\n visNodes: null,\n };\n case CLEAN_RUN_DATA:\n return {\n ...state,\n rundata: null, \n startAutoUpdateRun: false,\n };\n case CLEAN_PKL_DATA:\n return {\n ...state,\n shouldUpdateGraph: false, \n startAutoUpdatePkl: false,\n pklchanges: null,\n };\n case UPDATE_SELECTION:\n return {\n ...state,\n selection: action.payload,\n };\n case SEARCH_EXPERIMENTS:\n return {\n ...state,\n experiments: action.payload,\n loading: false,\n };\n case SET_AUTOUPDATE_RUN:\n return {\n ...state,\n startAutoUpdateRun: action.payload,\n };\n case SET_AUTOUPDATE_PKL:\n return {\n ...state,\n startAutoUpdatePkl: action.payload,\n }\n case SET_LOADING:\n return {\n ...state,\n loading: true,\n };\n case SET_LOADING_PKL:\n return {\n ...state,\n loadingPkl: true,\n };\n case SET_LOADING_GRAPH:\n return {\n ...state,\n loadingGraph: true,\n enabledGraphSearch: false,\n };\n case SET_LOADING_RUN:\n return {\n ...state,\n loadingRun: true, \n };\n case SHOULD_UPDATE_GRAPH:\n return {\n ...state,\n shouldUpdateGraph: action.payload,\n };\n case CLEAR_EXPERIMENTS:\n return {\n ...state,\n experiments: [],\n loading: false,\n };\n case GET_EXPERIMENT:\n return {\n ...state, \n experiment: action.payload,\n loading: false,\n data: null,\n };\n case GET_GRAPH:\n return {\n ...state,\n data: action.payload,\n loadingGraph: false,\n enabledGraphSearch: true,\n };\n case GET_EXPERIMENT_RUN:\n return {\n ...state,\n rundata: action.payload,\n loadingRun: false,\n };\n case GET_PKL_DATA:\n return {\n ...state,\n pkldata: action.payload,\n loadingPkl: false,\n };\n case UPDATE_NODES:\n return {\n ...state,\n data: action.payload,\n };\n case UPDATE_EXPERIMENT_TS:\n return {\n ...state,\n experiment: action.payload,\n }\n case SET_PKL_CHANGES:\n return {\n ...state,\n pklchanges: action.payload,\n };\n case SET_VIS_DATA:\n return {\n ...state,\n visNodes: action.payload,\n };\n default:\n return null;\n };\n};\n\n "]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/0dad263afdacc674ab0d58cb83549359.json b/node_modules/.cache/babel-loader/0dad263afdacc674ab0d58cb83549359.json new file mode 100644 index 0000000000000000000000000000000000000000..1be9e2f989198fb36c6b5e9b703c7c20c7ddc07b --- /dev/null +++ b/node_modules/.cache/babel-loader/0dad263afdacc674ab0d58cb83549359.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/pages/ExperimentCentral.js\";\nimport React, { Fragment, useContext } from 'react';\nimport Experiment from '../experiment/Experiment'; // import GraphRepresentation from '../experiment/GraphRepresentation';\n\nimport GraphNativeRep from '../experiment/GraphNativeRep';\nimport ExperimentContext from '../context/experiment/experimentContext';\nimport Selection from '../experiment/Selection'; // import OpenRun from '../experiment/OpenRun';\n\nimport Running from '../experiment/Running';\nimport JobMonitor from '../experiment/JobMonitor';\n\nconst ExperimentCentral = ({\n match\n}) => {\n const expid = match.params.expid;\n const experimentContext = useContext(ExperimentContext);\n const data = experimentContext.data,\n updateSelection = experimentContext.updateSelection,\n loadingGraph = experimentContext.loadingGraph,\n loadingRun = experimentContext.loadingRun,\n shouldUpdateGraph = experimentContext.shouldUpdateGraph,\n cleanGraphData = experimentContext.cleanGraphData,\n cleanRunData = experimentContext.cleanRunData,\n getExperimentRun = experimentContext.getExperimentRun,\n getExperimentPkl = experimentContext.getExperimentPkl,\n cleanPklData = experimentContext.cleanPklData,\n startAutoUpdateRun = experimentContext.startAutoUpdateRun,\n startAutoUpdatePkl = experimentContext.startAutoUpdatePkl,\n setAutoUpdateRun = experimentContext.setAutoUpdateRun,\n rundata = experimentContext.rundata,\n pklchanges = experimentContext.pklchanges,\n experiment = experimentContext.experiment;\n return React.createElement(Fragment, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 32\n },\n __self: this\n }, React.createElement(Experiment, {\n expidToken: expid,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 33\n },\n __self: this\n }), React.createElement(\"div\", {\n className: \"row mt-2\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 34\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-12\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 35\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"card\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-9 pr-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 38\n },\n __self: this\n }, React.createElement(GraphNativeRep, {\n data: data,\n updateSelection: updateSelection,\n loadingGraph: loadingGraph,\n cleanGraphData: cleanGraphData,\n shouldUpdateGraph: shouldUpdateGraph,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 39\n },\n __self: this\n })), React.createElement(\"div\", {\n className: \"col-3 pl-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 54\n },\n __self: this\n }, data && React.createElement(Selection, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 55\n },\n __self: this\n }), startAutoUpdatePkl && React.createElement(JobMonitor, {\n experiment: experiment,\n getExperimentPkl: getExperimentPkl,\n cleanPklData: cleanPklData,\n pklchanges: pklchanges,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 57\n },\n __self: this\n }))), React.createElement(\"div\", {\n className: \"card-footer p-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 65\n },\n __self: this\n }, startAutoUpdateRun && React.createElement(Running, {\n rundata: rundata,\n loadingRun: loadingRun,\n cleanRunData: cleanRunData,\n getExperimentRun: getExperimentRun,\n experiment: experiment,\n startAutoUpdateRun: startAutoUpdateRun,\n setAutoUpdateRun: setAutoUpdateRun,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 68\n },\n __self: this\n }), !startAutoUpdateRun && React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 79\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-12 text-center\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 80\n },\n __self: this\n }, React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 81\n },\n __self: this\n }, \"Press \", React.createElement(\"span\", {\n className: \"badge badge-dark\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 82\n },\n __self: this\n }, \"Show Log\"), \" to see the last 50 lines of the running log of this experiment. If the experiment is running, the log will update automatically.\"))))))));\n};\n\nexport default ExperimentCentral;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/pages/ExperimentCentral.js"],"names":["React","Fragment","useContext","Experiment","GraphNativeRep","ExperimentContext","Selection","Running","JobMonitor","ExperimentCentral","match","expid","params","experimentContext","data","updateSelection","loadingGraph","loadingRun","shouldUpdateGraph","cleanGraphData","cleanRunData","getExperimentRun","getExperimentPkl","cleanPklData","startAutoUpdateRun","startAutoUpdatePkl","setAutoUpdateRun","rundata","pklchanges","experiment"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,QAAhB,EAA0BC,UAA1B,QAA4C,OAA5C;AACA,OAAOC,UAAP,MAAuB,0BAAvB,C,CACA;;AACA,OAAOC,cAAP,MAA2B,8BAA3B;AACA,OAAOC,iBAAP,MAA8B,yCAA9B;AACA,OAAOC,SAAP,MAAsB,yBAAtB,C,CACA;;AACA,OAAOC,OAAP,MAAoB,uBAApB;AACA,OAAOC,UAAP,MAAuB,0BAAvB;;AAEA,MAAMC,iBAAiB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AA,kBAAkB,EAAEL,kBAND;AAOnB,IAAA,gBAAgB,EAAEE,gBAPC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAH3B,EAaK,CAACF,kBAAD,IACG;AAAK,IAAA,SAAS,EAAC,KAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACI;AAAK,IAAA,SAAS,EAAC,oBAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACI;AAAG,IAAA,SAAS,EAAC,MAAb;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,eACU;AAAM,IAAA,SAAS,EAAC,kBAAhB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gBADV,sIADJ,CADJ,CAdR,CA7BJ,CADJ,CADJ,CAFJ,CADA;AAsEH,CA1FD;;AA4FA,eAAef,iBAAf","sourcesContent":["import React, { Fragment, useContext } from 'react';\nimport Experiment from '../experiment/Experiment';\n// import GraphRepresentation from '../experiment/GraphRepresentation';\nimport GraphNativeRep from '../experiment/GraphNativeRep';\nimport ExperimentContext from '../context/experiment/experimentContext';\nimport Selection from '../experiment/Selection';\n// import OpenRun from '../experiment/OpenRun';\nimport Running from '../experiment/Running';\nimport JobMonitor from '../experiment/JobMonitor';\n\nconst ExperimentCentral = ({ match }) => {\n const expid = match.params.expid;\n const experimentContext = useContext(ExperimentContext);\n const {data, \n updateSelection, \n loadingGraph, \n loadingRun, \n shouldUpdateGraph,\n cleanGraphData, \n cleanRunData, \n getExperimentRun,\n getExperimentPkl, \n cleanPklData,\n startAutoUpdateRun, \n startAutoUpdatePkl,\n setAutoUpdateRun,\n rundata,\n pklchanges,\n experiment } = experimentContext;\n \n return (\n \n \n
\n
\n
\n
\n
\n \n {/* */}\n
\n
\n {data && }\n {startAutoUpdatePkl &&\n \n } \n
\n
\n
\n\n\n {startAutoUpdateRun && } \n\n {!startAutoUpdateRun &&\n
\n
\n

\n Press Show Log to see the last 50 lines of the running log of this experiment. \n If the experiment is running, the log will update automatically.\n

\n
\n
\n }\n \n\n
\n
\n
\n
\n \n {/* */}\n \n \n \n
\n );\n}; \n\nexport default ExperimentCentral;"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/0fc6cad538a2d17e4a5e1e43add645f0.json b/node_modules/.cache/babel-loader/0fc6cad538a2d17e4a5e1e43add645f0.json new file mode 100644 index 0000000000000000000000000000000000000000..6e70501449545d120e1064f80998d7557000c699 --- /dev/null +++ b/node_modules/.cache/babel-loader/0fc6cad538a2d17e4a5e1e43add645f0.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js\";\nimport React, { Component } from \"react\"; // import vis from \"vis-network\";\n\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n constructor(...args) {\n super(...args);\n\n this.updateVisNodes = nodes => {\n this.props.setVisData(nodes);\n };\n }\n\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else if (nextProps.data && this.props.data && nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp) {\n console.log(\"Rerendering\");\n return true;\n } else if (nextProps.loadingGraph !== this.props.loadingGraph) {\n return true;\n } else {\n return false;\n }\n }\n\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n render() {\n if (this.props.loadingGraph) return React.createElement(Spinner, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 32\n },\n __self: this\n });\n\n if (this.props.data == null) {\n return React.createElement(\"div\", {\n className: \"card-body text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 35\n },\n __self: this\n }, React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Press \", React.createElement(\"span\", {\n className: \"badge badge-info\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Show Graph\"), \" to see the graph representation of the experiment.\"), React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"If the experiment is running, press \", React.createElement(\"span\", {\n className: \"badge badge-dark\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"Start Job Monitor\"), \" to start a live tracker of the changes on the experiment's jobs. This process will automatically update the graph's nodes colors and show a log of the detected changes.\"));\n }\n\n var nodes_array = [];\n var edges_array = [];\n\n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: {\n background: node.status_color,\n border: \"black\"\n },\n level: node.level\n }));\n this.props.data.edges.map(edge => edges_array.push({\n from: edge.from,\n to: edge.to\n }));\n }\n\n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n const options = {\n edges: {\n arrows: {\n to: {\n enabled: true\n }\n }\n },\n layout: {\n improvedLayout: true,\n hierarchical: {\n // enabled: true,\n // nodeSpacing: 250,\n // edgeMinimization: false,\n // blockShifting: true,\n // parentCentralization: true,\n direction: 'UD'\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true\n },\n physics: {\n enabled: false\n },\n nodes: {\n shape: 'dot'\n }\n };\n const graph = {\n nodes: nodes,\n edges: edges\n };\n\n class VisNetwork extends Component {\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else {\n return false;\n }\n }\n\n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", params => {\n //console.log(params);\n if (params.nodes) {\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n });\n } // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n\n\n render() {\n return React.createElement(\"div\", {\n className: \"card-body p-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 130\n },\n __self: this\n }, React.createElement(\"div\", {\n ref: \"myRef\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 131\n },\n __self: this\n }));\n }\n\n }\n\n this.updateVisNodes(nodes);\n return React.createElement(VisNetwork, {\n graph: graph,\n options: options,\n updateSelection: this.props.updateSelection,\n shouldUpdateGraph: this.props.shouldUpdateGraph,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 139\n },\n __self: this\n });\n }\n\n}\n\nconst experimentStyle = {\n height: 600\n};\nexport default GraphNativeRep;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js"],"names":["React","Component","Spinner","vis","GraphNativeRep","updateVisNodes","nodes","props","setVisData","shouldComponentUpdate","nextProps","nextState","shouldUpdateGraph","data","pkl_timestamp","console","log","loadingGraph","componentWillUnmount","cleanGraphData","render","nodes_array","edges_array","edges","map","node","push","id","label","color","background","status_color","border","level","edge","from","to","DataSet","options","arrows","enabled","layout","improvedLayout","hierarchical","direction","interaction","dragNodes","hoverConnectedEdges","navigationButtons","physics","shape","graph","VisNetwork","componentDidMount","network","Network","refs","myRef","on","params","updateSelection","experimentStyle","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,SAAhB,QAAiC,OAAjC,C,CACA;;AACA,OAAOC,OAAP,MAAoB,mBAApB;AACA,OAAOC,GAAP,MAAgB,KAAhB;;AAEA,MAAMC,cAAN,SAA6BH,SAA7B,CAAuC;AAAA;AAAA;;AAAA,SAmBnCI,cAnBmC,GAmBjBC,KAAD,IAAW;AACxB,WAAKC,KAAL,CAAWC,UAAX,CAAsBF,KAAtB;AACH,KArBkC;AAAA;;AAEnCG,EAAAA,qBAAqB,CAACC,SAAD,EAAYC,SAAZ,EAAsB;AACvC,QAAI,KAAKJ,KAAL,CAAWK,iBAAX,KAAiC,IAArC,EAA0C;AACtC,aAAO,IAAP;AACD,KAFH,MA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,oBAAC,UAAD;AACH,MAAA,KAAK,EAAE6C,KADJ;AAEH,MAAA,OAAO,EAAEb,OAFN;AAGH,MAAA,eAAe,EAAE,KAAK/B,KAAL,CAAWqD,eAHzB;AAIH,MAAA,iBAAiB,EAAE,KAAKrD,KAAL,CAAWK,iBAJ3B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAAP;AAOH;;AA5IkC;;AA0JvC,MAAMiD,eAAe,GAAG;AACpBC,EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,eAAe1D,cAAf","sourcesContent":["import React, { Component } from \"react\";\n// import vis from \"vis-network\";\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n\n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true\n }else if (nextProps.data && this.props.data && (nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp)){\n console.log(\"Rerendering\")\n return true;\n }else if (nextProps.loadingGraph !== this.props.loadingGraph){\n return true; \n }else{\n return false;\n }\n }\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n updateVisNodes = (nodes) => {\n this.props.setVisData(nodes);\n }\n\n\n\n render () {\n if (this.props.loadingGraph) return ;\n if (this.props.data == null){\n return (\n
\n

Press Show Graph to see the graph representation of the experiment.

\n

If the experiment is running, press Start Job Monitor to start a live tracker of the changes on the experiment's jobs.\n This process will automatically update the graph's nodes colors and show a log of the detected changes.\n

\n
\n );\n }\n\n var nodes_array = [];\n var edges_array = [];\n \n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: { background: node.status_color, border: \"black\" },\n level: node.level,\n })\n );\n \n this.props.data.edges.map(edge => \n edges_array.push({ from: edge.from, to: edge.to })\n );\n }\n \n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n\n\n const options = {\n edges: {\n arrows: {\n to: { enabled: true }\n }\n },\n layout: {\n improvedLayout: true,\n hierarchical: {\n // enabled: true,\n // nodeSpacing: 250,\n // edgeMinimization: false,\n // blockShifting: true,\n // parentCentralization: true,\n direction: 'UD',\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true,\n },\n physics: {\n enabled: false,\n },\n nodes: {\n shape: 'dot',\n }\n };\n \n const graph = {\n nodes : nodes,\n edges : edges,\n };\n\n class VisNetwork extends Component {\n \n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true;\n } else {\n return false;\n }\n }\n \n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", (params) => {\n //console.log(params);\n if (params.nodes){\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n \n });\n }\n \n // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n \n render() { \n return (\n
\n
\n
\n );\n }\n }\n\n this.updateVisNodes(nodes);\n \n return ;\n\n }\n\n\n \n\n \n\n \n \n\n \n\n}\n\nconst experimentStyle = {\n height: 600\n };\n\nexport default GraphNativeRep;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/1213dab181e19aa290dd87f6c6ea09ab.json b/node_modules/.cache/babel-loader/1213dab181e19aa290dd87f6c6ea09ab.json new file mode 100644 index 0000000000000000000000000000000000000000..7cc65f384d647d4ada78e101134a47feca3e4793 --- /dev/null +++ b/node_modules/.cache/babel-loader/1213dab181e19aa290dd87f6c6ea09ab.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/Selection.js\";\nimport React, { useContext, Fragment } from 'react';\nimport ExperimentContext from '../context/experiment/experimentContext';\n\nconst Selection = () => {\n const experimentContext = useContext(ExperimentContext);\n const selection = experimentContext.selection,\n data = experimentContext.data,\n experiment = experimentContext.experiment; // const { model, branch, hpc } = experiment;\n //var currentSelection = \"Node: \"\n\n var currentNode = \"\";\n var selectedNode = null;\n\n if (selection) {\n //console.log(\"Current selection \" + selection)\n selection.map(node => // currentSelection += node + \", \"\n currentNode = node); //console.log(\"Current node \" + currentNode)\n\n selectedNode = data.nodes.find(node => node.id === currentNode); //console.log(\"Selected node\")\n //console.log(\"Data: \" + selectedNode.id + \" \" + selectedNode.platform_name)\n }\n\n return React.createElement(Fragment, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 23\n },\n __self: this\n }, selectedNode && React.createElement(Fragment, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 25\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 26\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-12\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 27\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"card text-white bg-info\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 28\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"card-header text-center p-0\",\n style: headerCard,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 29\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"mh-100 px-0 mx-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 30\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 31\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 31\n },\n __self: this\n }, selectedNode.id)))), React.createElement(\"div\", {\n className: \"card-body py-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 34\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"text-center\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 35\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Date:\"), \" \", selectedNode.date)), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 38\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 39\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-12\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 40\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 41\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 41\n },\n __self: this\n }, \"Section:\"), \" \", selectedNode.section)))), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 45\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 46\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-8\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 47\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 48\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 48\n },\n __self: this\n }, \"Platform:\"), \" \", selectedNode.platform_name && selectedNode.platform_name, \" \", !selectedNode.platform_name && experiment.hpc)), React.createElement(\"div\", {\n className: \"col-4 text-right\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 50\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 51\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 51\n },\n __self: this\n }, \"c:\", data.max_children, \"/p:\", data.max_parents))))), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 58\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 59\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-6\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 60\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 61\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 61\n },\n __self: this\n }, \"Processors:\"), \" \", selectedNode.processors)), React.createElement(\"div\", {\n className: \"col-6\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 63\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 64\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 64\n },\n __self: this\n }, \"Wallclock:\"), \" \", selectedNode.wallclock)))), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 68\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 69\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-6\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 70\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 71\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 71\n },\n __self: this\n }, \"Level:\"), \" \", selectedNode.level)), React.createElement(\"div\", {\n className: \"col-6\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 73\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 74\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 74\n },\n __self: this\n }, \"Out:\"), \" \", selectedNode.children, \" \", React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 74\n },\n __self: this\n }, \"In:\"), \" \", selectedNode.parents, \" \")))), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 79\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 80\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-8\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 81\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 82\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 82\n },\n __self: this\n }, \"Status:\")), \" \", selectedNode.status), React.createElement(\"div\", {\n className: \"col-4 text-right\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 84\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 85\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 85\n },\n __self: this\n }, \"c:\", data.max_children, \"/p:\", data.max_parents)))))))))), !selectedNode && data && React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 96\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-12\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 97\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"card text-white bg-info\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 98\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"card-header text-center py-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 99\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 100\n },\n __self: this\n }, \"Here goes the Job Id\")), React.createElement(\"div\", {\n className: \"card-body\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 102\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"text-center\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 103\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 104\n },\n __self: this\n }, \"Select a Node to see more information.\")))))));\n};\n\nconst experimentStyle = {\n height: 200\n};\nconst headerCard = {\n height: 30\n};\nexport default Selection;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/Selection.js"],"names":["React","useContext","Fragment","ExperimentContext","Selection","experimentContext","selection","data","experiment","currentNode","selectedNode","map","node","nodes","find","id","experimentStyle","headerCard","date","section","platform_name","hpc","max_children","max_parents","processors","wallclock","level","children","parents","status","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,UAAhB,EAA4BC,QAA5B,QAA4C,OAA5C;AACA,OAAOC,iBAAP,MAA8B,yCAA9B;;AAEA,MAAMC,SAAS,GAAG,MAAM;AACpB,QAAMC,iBAAiB,GAAGJ,UAAU,CAACE,iBAAD,CAApC;AADoB,QAEZG,SAFY,GAEoBD,iBAFpB,CAEZC,SAFY;AAAA,QAEDC,IAFC,GAEoBF,iBAFpB,CAEDE,IAFC;AAAA,QAEKC,UAFL,GAEoBH,iBAFpB,CAEKG,UAFL,EAGpB;AACA;;AACA,MAAIC,WAAW,GAAG,EAAlB;AACA,MAAIC,YAAY,GAAG,IAAnB;;AACA,MAAIJ,SAAJ,EAAe;AACX;AACAA,IAAAA,SAAS,CAACK,GAAV,CAAcC,IAAI,IACd;AACAH,IAAAA,WAAW,GAAGG,IAFlB,EAFW,CAMX;;AACAF,IAAAA,YAAY,GAAGH,IAAI,CAACM,KAAL,CAAWC,IAAX,CAAgBF,IAAI,IAAIA,IAAI,CAACG,EAAL,KAAYN,WAApC,CAAf,CAPW,CAQX;AACA;AACH;;AACD,SACI,oBAAC,QAAD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACSC,YAAY,IACb,oBAAC,QAAD;AAAA;AAAA;AAAA;AAAA;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A;AAAA;AAAA;AAAA;AAAA,KACI;AAAK,IAAA,SAAS,EAAC,yBAAf;AAAyC,IAAA,KAAK,EAAES,eAAhD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACI;AAAK,IAAA,SAAS,EAAC,8BAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACI;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,4BADJ,CADJ,EAII;AAAK,IAAA,SAAS,EAAC,WAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACI;AAAK,IAAA,SAAS,EAAC,aAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,8CADA,CADJ,CAJJ,CADJ,CADJ,CAzEZ,CADJ;AA8FH,CAhHD;;AAkHA,MAAMA,eAAe,GAAG;AACpBc,EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,MAAMb,UAAU,GAAG;AACfa,EAAAA,MAAM,EAAE;AADO,CAAnB;AAIA,eAAe1B,SAAf","sourcesContent":["import React, { useContext, Fragment } from 'react'\nimport ExperimentContext from '../context/experiment/experimentContext';\n\nconst Selection = () => {\n const experimentContext = useContext(ExperimentContext);\n const { selection, data, experiment } = experimentContext;\n // const { model, branch, hpc } = experiment;\n //var currentSelection = \"Node: \"\n var currentNode = \"\"\n var selectedNode = null\n if (selection) {\n //console.log(\"Current selection \" + selection)\n selection.map(node => (\n // currentSelection += node + \", \"\n currentNode = node\n ));\n //console.log(\"Current node \" + currentNode)\n selectedNode = data.nodes.find(node => node.id === currentNode) \n //console.log(\"Selected node\")\n //console.log(\"Data: \" + selectedNode.id + \" \" + selectedNode.platform_name)\n } \n return (\n \n {selectedNode &&\n \n
\n
\n
\n
\n
\n {selectedNode.id}\n
\n
\n
\n
\n Date: {selectedNode.date}\n
\n
\n
\n
\n Section: {selectedNode.section}\n
\n
\n
\n
\n
\n
\n Platform: {selectedNode.platform_name && selectedNode.platform_name} {!selectedNode.platform_name && experiment.hpc}\n
\n
\n c:{data.max_children}/p:{data.max_parents}\n
\n
\n
\n {/*
\n Priority: {selectedNode.priority}\n
*/}\n
\n
\n
\n Processors: {selectedNode.processors}\n
\n
\n Wallclock: {selectedNode.wallclock}\n
\n
\n
\n
\n
\n
\n Level: {selectedNode.level}\n
\n
\n Out: {selectedNode.children} In: {selectedNode.parents} \n
\n \n
\n
\n
\n
\n
\n Status: {selectedNode.status}\n
\n
\n c:{data.max_children}/p:{data.max_parents}\n
\n
\n
\n
\n
\n
\n
\n
\n } \n {!selectedNode && data &&\n
\n
\n
\n
\n Here goes the Job Id\n
\n
\n
\n Select a Node to see more information. \n
\n
\n
\n
\n
\n } \n
\n \n \n\n )\n}\n\nconst experimentStyle = {\n height: 200\n };\n\nconst headerCard = {\n height: 30\n}\n\nexport default Selection;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/12686b19bdbde8178c70b1c7f101e081.json b/node_modules/.cache/babel-loader/12686b19bdbde8178c70b1c7f101e081.json new file mode 100644 index 0000000000000000000000000000000000000000..ae1f652fef07e89afb951cb289c7b73135698fca --- /dev/null +++ b/node_modules/.cache/babel-loader/12686b19bdbde8178c70b1c7f101e081.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/Selection.js\";\nimport React, { useContext, Fragment } from 'react';\nimport ExperimentContext from '../context/experiment/experimentContext';\n\nconst Selection = () => {\n const experimentContext = useContext(ExperimentContext);\n const selection = experimentContext.selection,\n data = experimentContext.data,\n experiment = experimentContext.experiment; // const { model, branch, hpc } = experiment;\n //var currentSelection = \"Node: \"\n\n var currentNode = \"\";\n var selectedNode = null;\n\n if (selection) {\n //console.log(\"Current selection \" + selection)\n selection.map(node => // currentSelection += node + \", \"\n currentNode = node); //console.log(\"Current node \" + currentNode)\n\n selectedNode = data.nodes.find(node => node.id === currentNode); //console.log(\"Selected node\")\n //console.log(\"Data: \" + selectedNode.id + \" \" + selectedNode.platform_name)\n }\n\n return React.createElement(Fragment, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 23\n },\n __self: this\n }, selectedNode && React.createElement(Fragment, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 25\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 26\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-12\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 27\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"card text-white bg-info\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 28\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"card-header text-center p-0\",\n style: headerCard,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 29\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"mh-100 px-0 mx-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 30\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 31\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 31\n },\n __self: this\n }, selectedNode.id)))), React.createElement(\"div\", {\n className: \"card-body py-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 34\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"text-left px-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 35\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Date:\"), \" \", selectedNode.date)), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 38\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 39\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-12 px-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 40\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 41\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 41\n },\n __self: this\n }, \"Section:\"), \" \", selectedNode.section)))), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 45\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 46\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-8 px-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 47\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 48\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 48\n },\n __self: this\n }, \"Platform:\"), \" \", selectedNode.platform_name && selectedNode.platform_name, \" \", !selectedNode.platform_name && experiment.hpc)), React.createElement(\"div\", {\n className: \"col-4 text-right\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 50\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 51\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 51\n },\n __self: this\n }, \"c:\", data.max_children, \"/p:\", data.max_parents))))), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 58\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 59\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-6 px-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 60\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 61\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 61\n },\n __self: this\n }, \"Processors:\"), \" \", selectedNode.processors)), React.createElement(\"div\", {\n className: \"col-6\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 63\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 64\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 64\n },\n __self: this\n }, \"Wallclock:\"), \" \", selectedNode.wallclock)))), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 68\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 69\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-6 px-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 70\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 71\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 71\n },\n __self: this\n }, \"Level:\"), \" \", selectedNode.level)), React.createElement(\"div\", {\n className: \"col-6\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 73\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 74\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 74\n },\n __self: this\n }, \"Out:\"), \" \", selectedNode.children, \" \", React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 74\n },\n __self: this\n }, \"In:\"), \" \", selectedNode.parents, \" \")))), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 79\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 80\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 80\n },\n __self: this\n }, \"Status:\")), \" \", selectedNode.status)))))), !selectedNode && data && React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 89\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-12\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 90\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"card text-white bg-info\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 91\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"card-header text-center py-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 92\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 93\n },\n __self: this\n }, \"Here goes the Job Id\")), React.createElement(\"div\", {\n className: \"card-body\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 95\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"text-center\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 96\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 97\n },\n __self: this\n }, \"Select a Node to see more information.\")))))));\n};\n\nconst experimentStyle = {\n height: 200\n};\nconst headerCard = {\n height: 30\n};\nexport default Selection;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/Selection.js"],"names":["React","useContext","Fragment","ExperimentContext","Selection","experimentContext","selection","data","experiment","currentNode","selectedNode","map","node","nodes","find","id","experimentStyle","headerCard","date","section","platform_name","hpc","max_children","max_parents","processors","wallclock","level","children","parents","status","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,UAAhB,EAA4BC,QAA5B,QAA4C,OAA5C;AACA,OAAOC,iBAAP,MAA8B,yCAA9B;;AAEA,MAAMC,SAAS,GAAG,MAAM;AACpB,QAAMC,iBAAiB,GAAGJ,UAAU,CAACE,iBAAD,CAApC;A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ADJ,OAC6ClB,YAAY,CAACmB,MAD1D,CA7CJ,CANJ,CADH,CADJ,CADL,CAFR,EAiES,CAACnB,YAAD,IAAiBH,IAAjB,IACG;AAAK,IAAA,SAAS,EAAC,KAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACI;AAAK,IAAA,SAAS,EAAC,QAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACI;AAAK,IAAA,SAAS,EAAC,yBAAf;AAAyC,IAAA,KAAK,EAAES,eAAhD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACI;AAAK,IAAA,SAAS,EAAC,8BAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACI;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,4BADJ,CADJ,EAII;AAAK,IAAA,SAAS,EAAC,WAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACI;AAAK,IAAA,SAAS,EAAC,aAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,8CADA,CADJ,CAJJ,CADJ,CADJ,CAlEZ,CADJ;AAuFH,CAzGD;;AA2GA,MAAMA,eAAe,GAAG;AACpBc,EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,MAAMb,UAAU,GAAG;AACfa,EAAAA,MAAM,EAAE;AADO,CAAnB;AAIA,eAAe1B,SAAf","sourcesContent":["import React, { useContext, Fragment } from 'react'\nimport ExperimentContext from '../context/experiment/experimentContext';\n\nconst Selection = () => {\n const experimentContext = useContext(ExperimentContext);\n const { selection, data, experiment } = experimentContext;\n // const { model, branch, hpc } = experiment;\n //var currentSelection = \"Node: \"\n var currentNode = \"\"\n var selectedNode = null\n if (selection) {\n //console.log(\"Current selection \" + selection)\n selection.map(node => (\n // currentSelection += node + \", \"\n currentNode = node\n ));\n //console.log(\"Current node \" + currentNode)\n selectedNode = data.nodes.find(node => node.id === currentNode) \n //console.log(\"Selected node\")\n //console.log(\"Data: \" + selectedNode.id + \" \" + selectedNode.platform_name)\n } \n return (\n \n {selectedNode &&\n \n
\n
\n
\n
\n
\n {selectedNode.id}\n
\n
\n
\n
\n Date: {selectedNode.date}\n
\n
\n
\n
\n Section: {selectedNode.section}\n
\n
\n
\n
\n
\n
\n Platform: {selectedNode.platform_name && selectedNode.platform_name} {!selectedNode.platform_name && experiment.hpc}\n
\n
\n c:{data.max_children}/p:{data.max_parents}\n
\n
\n
\n {/*
\n Priority: {selectedNode.priority}\n
*/}\n
\n
\n
\n Processors: {selectedNode.processors}\n
\n
\n Wallclock: {selectedNode.wallclock}\n
\n
\n
\n
\n
\n
\n Level: {selectedNode.level}\n
\n
\n Out: {selectedNode.children} In: {selectedNode.parents} \n
\n \n
\n
\n
\n Status: {selectedNode.status}\n
\n
\n
\n
\n
\n
\n } \n {!selectedNode && data &&\n
\n
\n
\n
\n Here goes the Job Id\n
\n
\n
\n Select a Node to see more information. \n
\n
\n
\n
\n
\n } \n
\n \n \n\n )\n}\n\nconst experimentStyle = {\n height: 200\n };\n\nconst headerCard = {\n height: 30\n}\n\nexport default Selection;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/1282e1b82e694eaf2004efeda6c066cd.json b/node_modules/.cache/babel-loader/1282e1b82e694eaf2004efeda6c066cd.json new file mode 100644 index 0000000000000000000000000000000000000000..eddb6dd5abd0dfdf95be3e27c9be5a75288ddf58 --- /dev/null +++ b/node_modules/.cache/babel-loader/1282e1b82e694eaf2004efeda6c066cd.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js\";\nimport React, { Component } from \"react\"; // import vis from \"vis-network\";\n\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else if (nextProps.data && this.props.data && nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp) {\n console.log(\"Rerendering\");\n return true;\n } else if (nextProps.loadingGraph !== this.props.loadingGraph) {\n return true;\n } else {\n return false;\n }\n }\n\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n render() {\n if (this.props.loadingGraph) return React.createElement(Spinner, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 29\n },\n __self: this\n });\n\n if (this.props.data == null) {\n return React.createElement(\"div\", {\n className: \"card-body text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 32\n },\n __self: this\n }, React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 33\n },\n __self: this\n }, \"Press \", React.createElement(\"span\", {\n className: \"badge badge-info\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 33\n },\n __self: this\n }, \"Show Graph\"), \" to see the graph representation of the experiment.\"), React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 34\n },\n __self: this\n }, \"If the experiment is running, press \", React.createElement(\"span\", {\n className: \"badge badge-dark\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 34\n },\n __self: this\n }, \"Start Job Monitor\"), \" to start a live tracker of the changes on the experiment's jobs. This process will automatically update the graph's nodes colors and show a log of the detected changes.\"));\n }\n\n var nodes_array = [];\n var edges_array = [];\n\n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: {\n background: node.status_color,\n border: \"black\"\n } //level: node.priority,\n\n }));\n this.props.data.edges.map(edge => edges_array.push({\n from: edge.from,\n to: edge.to\n }));\n }\n\n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n const options = {\n edges: {\n arrows: {\n to: {\n enabled: true\n }\n }\n },\n layout: {\n improvedLayout: true,\n hierarchical: {\n nodeSpacing: 250,\n edgeMinimization: false,\n blockShifting: false,\n parentCentralization: false,\n direction: 'UD',\n sortMethod: 'directed'\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true\n },\n physics: {\n enabled: false\n },\n nodes: {\n shape: 'dot'\n }\n };\n const graph = {\n nodes: nodes,\n edges: edges\n };\n\n class VisNetwork extends Component {\n // shouldComponentUpdate(nextProps, nextState){ \n // if (nextProps.loadingGraph !== this.props.loadingGraph){\n // return true; \n // }else{\n // return false;\n // }\n // }\n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", params => {\n //console.log(params);\n if (params.nodes) {\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n });\n } // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n\n\n render() {\n return React.createElement(\"div\", {\n className: \"card-body p-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 127\n },\n __self: this\n }, React.createElement(\"div\", {\n ref: \"myRef\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 128\n },\n __self: this\n }));\n }\n\n }\n\n return React.createElement(VisNetwork, {\n graph: graph,\n options: options,\n updateSelection: this.props.updateSelection,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 134\n },\n __self: this\n });\n }\n\n}\n\nconst experimentStyle = {\n height: 600\n};\nexport default GraphNativeRep;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js"],"names":["React","Component","Spinner","vis","GraphNativeRep","shouldComponentUpdate","nextProps","nextState","props","shouldUpdateGraph","data","pkl_timestamp","console","log","loadingGraph","componentWillUnmount","cleanGraphData","render","nodes_array","edges_array","nodes","edges","map","node","push","id","label","color","background","status_color","border","edge","from","to","DataSet","options","arrows","enabled","layout","improvedLayout","hierarchical","nodeSpacing","edgeMinimization","blockShifting","parentCentralization","direction","sortMethod","interaction","dragNodes","hoverConnectedEdges","navigationButtons","physics","shape","graph","VisNetwork","componentDidMount","network","Network","refs","myRef","on","params","updateSelection","experimentStyle","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,SAAhB,QAAiC,OAAjC,C,CACA;;AACA,OAAOC,OAAP,MAAoB,mBAApB;AACA,OAAOC,GAAP,MAAgB,KAAhB;;AAEA,MAAMC,cAAN,SAA6BH,SAA7B,CAAuC;AAEnCI,EAAAA,qBAAqB,CAACC,SAAD,EAAYC,SAAZ,EAAsB;AAEvC,QAAI,KAAKC,KAAL,CAAWC,iBAAX,KAAiC,IAArC,EAA0C;AACxC,aAAO,IAAP;AACD,KAFD,MAEM,IAAIH,SAAS,CAACI,IAAV,IAAkB,KAAKF,KAAL,CAAWE,IAA7B,IAAsCJ,SAAS,CAACI,IAAV,CAAeC,aAAf,KAAiC,KAAKH,KAAL,CAAWE,IAAX,CAAgBC,aAA3F,EAA0G;AAC9GC,MAAAA,OAAO,CAACC,GAAR,CAAY,aAAZ;AACA,aAAO,IAAP;AACD,KAHK,MAGA,IAAIP,SAAS,CAACQ,YAAV,KAA2B,KAAKN,KAAL,CAAWM,YAA1C,EAAuD;AAC3D,aAAO,IAAP;AACD,KAFK,MAED;AACH,aAAO,KAAP;AACD;AACJ;;AACDC,EAAAA,oBAAoB,GAAG;AACnBH,IAAAA,OAAO,CAACC,GAAR,CAAY,YAAZ;AACA,SAAKL,KAAL,CAAWQ,cAAX;AACH;;AAIDC,EAAAA,MAAM,GAAG;AACL,QAAI,KAAKT,KAAL,CAAWM,YAAf,EAA6B,OAAO,oBAAC,OAAD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAAP;;AAC7B,QAAI,KAAKN,KAAL,CAAWE,IAAX,IAAmB,IAAvB,EAA4B;AACxB,aACI;AAAK,QAAA,SAAS,EAAC,qBAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,SACI;AAAG,QAAA,SAAS,EAAC,MAAb;AAAA;AAAA;AAAA;AAAA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WsD,eAAX,CAA2BD,MAAM,CAACzC,KAAlC;AACH;AAEJ,SAPD;AAQH,OApB8B,CAsB/B;AACA;AACA;AACA;;;AAEAH,MAAAA,MAAM,GAAG;AACL,eACI;AAAK,UAAA,SAAS,EAAC,eAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,WACI;AAAK,UAAA,GAAG,EAAC,OAAT;AAAiB,UAAA,KAAK,EAAE8C,eAAxB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,UADJ,CADJ;AAKH;;AAjC8B;;AAoCnC,WAAO,oBAAC,UAAD;AAAY,MAAA,KAAK,EAAEV,KAAnB;AAA0B,MAAA,OAAO,EAAElB,OAAnC;AAA4C,MAAA,eAAe,EAAE,KAAK3B,KAAL,CAAWsD,eAAxE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAAP;AAEH;;AAlIkC;;AAgJvC,MAAMC,eAAe,GAAG;AACpBC,EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,eAAe5D,cAAf","sourcesContent":["import React, { Component } from \"react\";\n// import vis from \"vis-network\";\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n\n shouldComponentUpdate(nextProps, nextState){ \n \n if (this.props.shouldUpdateGraph === true){\n return true\n }else if (nextProps.data && this.props.data && (nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp)){\n console.log(\"Rerendering\")\n return true;\n }else if (nextProps.loadingGraph !== this.props.loadingGraph){\n return true; \n }else{\n return false;\n }\n }\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n\n\n render() {\n if (this.props.loadingGraph) return ;\n if (this.props.data == null){\n return (\n
\n

Press Show Graph to see the graph representation of the experiment.

\n

If the experiment is running, press Start Job Monitor to start a live tracker of the changes on the experiment's jobs.\n This process will automatically update the graph's nodes colors and show a log of the detected changes.\n

\n
\n );\n }\n\n var nodes_array = [];\n var edges_array = [];\n \n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: { background: node.status_color, border: \"black\" },\n //level: node.priority,\n })\n );\n \n this.props.data.edges.map(edge => \n edges_array.push({ from: edge.from, to: edge.to })\n );\n }\n \n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n\n const options = {\n edges: {\n arrows: {\n to: { enabled: true }\n }\n },\n layout: {\n improvedLayout: true,\n hierarchical: {\n \n nodeSpacing: 250,\n edgeMinimization: false,\n blockShifting: false,\n parentCentralization: false,\n direction: 'UD',\n sortMethod: 'directed',\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true,\n },\n physics: {\n enabled: false,\n },\n nodes: {\n shape: 'dot',\n }\n };\n \n const graph = {\n nodes : nodes,\n edges : edges,\n };\n\n class VisNetwork extends Component {\n \n // shouldComponentUpdate(nextProps, nextState){ \n // if (nextProps.loadingGraph !== this.props.loadingGraph){\n // return true; \n // }else{\n // return false;\n // }\n // }\n \n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", (params) => {\n //console.log(params);\n if (params.nodes){\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n \n });\n }\n \n // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n \n render() { \n return (\n
\n
\n
\n );\n }\n }\n \n return ;\n\n }\n\n\n \n\n \n\n \n \n\n \n\n}\n\nconst experimentStyle = {\n height: 600\n };\n\nexport default GraphNativeRep;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/13ead7e41d0a5ac795b29659cf0fae38.json b/node_modules/.cache/babel-loader/13ead7e41d0a5ac795b29659cf0fae38.json new file mode 100644 index 0000000000000000000000000000000000000000..eb500aba34f824275d9d33515c9fe5dd6d494348 --- /dev/null +++ b/node_modules/.cache/babel-loader/13ead7e41d0a5ac795b29659cf0fae38.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/Selection.js\";\nimport React, { useContext, Fragment } from 'react';\nimport ExperimentContext from '../context/experiment/experimentContext';\n\nconst Selection = () => {\n const experimentContext = useContext(ExperimentContext);\n const selection = experimentContext.selection,\n data = experimentContext.data,\n experiment = experimentContext.experiment; // const { model, branch, hpc } = experiment;\n //var currentSelection = \"Node: \"\n\n var currentNode = \"\";\n var selectedNode = null;\n\n if (selection) {\n //console.log(\"Current selection \" + selection)\n selection.map(node => // currentSelection += node + \", \"\n currentNode = node); //console.log(\"Current node \" + currentNode)\n\n selectedNode = data.nodes.find(node => node.id === currentNode); //console.log(\"Selected node\")\n //console.log(\"Data: \" + selectedNode.id + \" \" + selectedNode.platform_name)\n }\n\n return React.createElement(Fragment, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 23\n },\n __self: this\n }, selectedNode && React.createElement(Fragment, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 25\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 26\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-12\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 27\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"card text-white bg-info\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 28\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"card-header text-center py-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 29\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 30\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 30\n },\n __self: this\n }, selectedNode.id))), React.createElement(\"div\", {\n className: \"card-body py-0 mh-90\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 32\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 33\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 34\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 34\n },\n __self: this\n }, \"Date:\"), \" \", selectedNode.date)), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-12\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 38\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 39\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 39\n },\n __self: this\n }, \"Section:\"), \" \", selectedNode.section)))), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 43\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 44\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-8\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 45\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 46\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 46\n },\n __self: this\n }, \"Platform:\"), \" \", selectedNode.platform_name && selectedNode.platform_name, \" \", !selectedNode.platform_name && experiment.hpc)), React.createElement(\"div\", {\n className: \"col-4 text-right\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 48\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 49\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 49\n },\n __self: this\n }, \"c:\", data.max_children, \"/p:\", data.max_parents))))), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 56\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 57\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-6\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 58\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 59\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 59\n },\n __self: this\n }, \"Processors:\"), \" \", selectedNode.processors)), React.createElement(\"div\", {\n className: \"col-6\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 61\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 62\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 62\n },\n __self: this\n }, \"Wallclock:\"), \" \", selectedNode.wallclock)))), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 66\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 67\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-6\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 68\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 69\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 69\n },\n __self: this\n }, \"Level:\"), \" \", selectedNode.level)), React.createElement(\"div\", {\n className: \"col-6\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 71\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 72\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 72\n },\n __self: this\n }, \"Out:\"), \" \", selectedNode.children, \" \", React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 72\n },\n __self: this\n }, \"In:\"), \" \", selectedNode.parents, \" \")))), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 77\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 78\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 78\n },\n __self: this\n }, \"Status:\")), \" \", selectedNode.status)))))), !selectedNode && data && React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 87\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-12\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 88\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"card text-white bg-info\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 89\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"card-header text-center py-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 90\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 91\n },\n __self: this\n }, \"Here goes the Job Id\")), React.createElement(\"div\", {\n className: \"card-body\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 93\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"text-center\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 94\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 95\n },\n __self: this\n }, \"Select a Node to see more information.\")))))));\n};\n\nconst experimentStyle = {\n height: 200\n};\nexport default Selection;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/Selection.js"],"names":["React","useContext","Fragment","ExperimentContext","Selection","experimentContext","selection","data","experiment","currentNode","selectedNode","map","node","nodes","find","id","experimentStyle","date","section","platform_name","hpc","max_children","max_parents","processors","wallclock","level","children","parents","status","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,UAAhB,EAA4BC,QAA5B,QAA4C,OAA5C;AACA,OAAOC,iBAAP,MAA8B,yCAA9B;;AAEA,MAAMC,SAAS,GAAG,MAAM;AACpB,QAAMC,iBAAiB,GAAGJ,UAAU,CAACE,iBAAD,CAApC;AADoB,QAEZG,SAFY,GAEoBD,iBAFpB,CAEZC,SAFY;AAAA,QAEDC,IAFC,GAEoBF,iBAFpB,CAEDE,IAFC;AAAA,QAEKC,UAFL,GAEoBH,iBAFpB,CAEKG,UAFL,EAGpB;AACA;;AACA,MAAIC,WAAW,GAAG,EAAlB;AACA,MAAIC,YAAY,GAAG,IAAnB;;AACA,MAAIJ,SAAJ,EAAe;AACX;AACAA,IAAAA,SAAS,CAACK,GAAV,CAAcC,IAAI,IACd;AACAH,IAAAA,WAAW,GAAGG,IAFlB,EAFW,CAMX;;AACAF,IAAAA,YAAY,GAAGH,IAAI,CAACM,KAAL,CAAWC,IAAX,CAAgBF,IAAI,IAAIA,IAAI,CAACG,EAAL,KAAYN,WAApC,CAAf,CAPW,CAQX;AACA;AACH;;AACD,SACI,oBAAC,QAAD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACSC,YAAY,IACb,oBAAC,QAAD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACK;AAAK,IAAA,SAAS,EAAC,KAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACI;AAAK,IAAA,SAAS,EAAC,QAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACG;AAAK,IAAA,SAAS,EAAC,yBAAf;AAAyC,IAAA,KAAK,EAAEM,eAAhD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACI;AAAK,IAAA,SAAS,EA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AAAA;AAAA;AAAA;AAAA;AAAA,WAArD,OAA2EhB,YAAY,CAACiB,OAAxF,MADJ,CAJJ,CADJ,CAlCJ,EA6CI;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACI;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,eAAP,CADJ,OAC6CjB,YAAY,CAACkB,MAD1D,CA7CJ,CAJJ,CADH,CADJ,CADL,CAFR,EA+DS,CAAClB,YAAD,IAAiBH,IAAjB,IACG;AAAK,IAAA,SAAS,EAAC,KAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACI;AAAK,IAAA,SAAS,EAAC,QAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACI;AAAK,IAAA,SAAS,EAAC,yBAAf;AAAyC,IAAA,KAAK,EAAES,eAAhD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACI;AAAK,IAAA,SAAS,EAAC,8BAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACI;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,4BADJ,CADJ,EAII;AAAK,IAAA,SAAS,EAAC,WAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACI;AAAK,IAAA,SAAS,EAAC,aAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,8CADA,CADJ,CAJJ,CADJ,CADJ,CAhEZ,CADJ;AAqFH,CAvGD;;AAyGA,MAAMA,eAAe,GAAG;AACpBa,EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,eAAezB,SAAf","sourcesContent":["import React, { useContext, Fragment } from 'react'\nimport ExperimentContext from '../context/experiment/experimentContext';\n\nconst Selection = () => {\n const experimentContext = useContext(ExperimentContext);\n const { selection, data, experiment } = experimentContext;\n // const { model, branch, hpc } = experiment;\n //var currentSelection = \"Node: \"\n var currentNode = \"\"\n var selectedNode = null\n if (selection) {\n //console.log(\"Current selection \" + selection)\n selection.map(node => (\n // currentSelection += node + \", \"\n currentNode = node\n ));\n //console.log(\"Current node \" + currentNode)\n selectedNode = data.nodes.find(node => node.id === currentNode) \n //console.log(\"Selected node\")\n //console.log(\"Data: \" + selectedNode.id + \" \" + selectedNode.platform_name)\n } \n return (\n \n {selectedNode &&\n \n
\n
\n
\n
\n {selectedNode.id}\n
\n
\n
\n Date: {selectedNode.date}\n
\n
\n
\n
\n Section: {selectedNode.section}\n
\n
\n
\n
\n
\n
\n Platform: {selectedNode.platform_name && selectedNode.platform_name} {!selectedNode.platform_name && experiment.hpc}\n
\n
\n c:{data.max_children}/p:{data.max_parents}\n
\n
\n
\n {/*
\n Priority: {selectedNode.priority}\n
*/}\n
\n
\n
\n Processors: {selectedNode.processors}\n
\n
\n Wallclock: {selectedNode.wallclock}\n
\n
\n
\n
\n
\n
\n Level: {selectedNode.level}\n
\n
\n Out: {selectedNode.children} In: {selectedNode.parents} \n
\n \n
\n
\n
\n Status: {selectedNode.status}\n
\n
\n
\n
\n
\n
\n } \n {!selectedNode && data &&\n
\n
\n
\n
\n Here goes the Job Id\n
\n
\n
\n Select a Node to see more information. \n
\n
\n
\n
\n
\n } \n
\n \n \n\n )\n}\n\nconst experimentStyle = {\n height: 200\n };\n\nexport default Selection;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/1404c4e229dc096bde8ae105276caae2.json b/node_modules/.cache/babel-loader/1404c4e229dc096bde8ae105276caae2.json new file mode 100644 index 0000000000000000000000000000000000000000..c04568af8510f195d5a1e20ddce86894bb2f13cd --- /dev/null +++ b/node_modules/.cache/babel-loader/1404c4e229dc096bde8ae105276caae2.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js\";\nimport React, { Component, useContext } from \"react\"; // import vis from \"vis-network\";\n\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else if (nextProps.data && this.props.data && nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp) {\n console.log(\"Rerendering\");\n return true;\n } else if (nextProps.loadingGraph !== this.props.loadingGraph) {\n return true;\n } else {\n return false;\n }\n }\n\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n render() {\n if (this.props.loadingGraph) return React.createElement(Spinner, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 29\n },\n __self: this\n });\n\n if (this.props.data == null) {\n return React.createElement(\"div\", {\n className: \"card-body text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 32\n },\n __self: this\n }, React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 33\n },\n __self: this\n }, \"Press \", React.createElement(\"span\", {\n className: \"badge badge-info\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 33\n },\n __self: this\n }, \"Show Graph\"), \" to see the graph representation of the experiment.\"), React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 34\n },\n __self: this\n }, \"If the experiment is running, press \", React.createElement(\"span\", {\n className: \"badge badge-dark\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 34\n },\n __self: this\n }, \"Start Job Monitor\"), \" to start a live tracker of the changes on the experiment's jobs. This process will automatically update the graph's nodes colors and show a log of the detected changes.\"));\n }\n\n var nodes_array = [];\n var edges_array = [];\n\n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: {\n background: node.status_color,\n border: \"black\"\n } //level: node.priority,\n\n }));\n this.props.data.edges.map(edge => edges_array.push({\n from: edge.from,\n to: edge.to\n }));\n }\n\n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n const options = {\n edges: {\n arrows: {\n to: {\n enabled: true\n }\n }\n },\n layout: {\n improvedLayout: true,\n hierarchical: {\n nodeSpacing: 250,\n edgeMinimization: false,\n blockShifting: false,\n parentCentralization: false,\n direction: 'UD',\n sortMethod: 'directed'\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true\n },\n physics: {\n enabled: false\n },\n nodes: {\n shape: 'dot'\n }\n };\n const graph = {\n nodes: nodes,\n edges: edges\n };\n\n class VisNetwork extends Component {\n // shouldComponentUpdate(nextProps, nextState){ \n // if (nextProps.loadingGraph !== this.props.loadingGraph){\n // return true; \n // }else{\n // return false;\n // }\n // }\n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", params => {\n console.log(params);\n\n if (params.nodes) {\n console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n });\n } // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n\n\n render() {\n return React.createElement(\"div\", {\n className: \"card-body p-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 127\n },\n __self: this\n }, React.createElement(\"div\", {\n ref: \"myRef\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 128\n },\n __self: this\n }));\n }\n\n }\n\n return React.createElement(VisNetwork, {\n graph: graph,\n options: options,\n updateSelection: this.props.updateSelection,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 134\n },\n __self: this\n });\n }\n\n}\n\nconst experimentStyle = {\n height: 600\n};\nexport default GraphNativeRep;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js"],"names":["React","Component","useContext","Spinner","vis","GraphNativeRep","shouldComponentUpdate","nextProps","nextState","props","shouldUpdateGraph","data","pkl_timestamp","console","log","loadingGraph","componentWillUnmount","cleanGraphData","render","nodes_array","edges_array","nodes","edges","map","node","push","id","label","color","background","status_color","border","edge","from","to","DataSet","options","arrows","enabled","layout","improvedLayout","hierarchical","nodeSpacing","edgeMinimization","blockShifting","parentCentralization","direction","sortMethod","interaction","dragNodes","hoverConnectedEdges","navigationButtons","physics","shape","graph","VisNetwork","componentDidMount","network","Network","refs","myRef","on","params","updateSelection","experimentStyle","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,SAAhB,EAA2BC,UAA3B,QAA6C,OAA7C,C,CACA;;AACA,OAAOC,OAAP,MAAoB,mBAApB;AACA,OAAOC,GAAP,MAAgB,KAAhB;;AAEA,MAAMC,cAAN,SAA6BJ,SAA7B,CAAuC;AAEnCK,EAAAA,qBAAqB,CAACC,SAAD,EAAYC,SAAZ,EAAsB;AAEvC,QAAI,KAAKC,KAAL,CAAWC,iBAAX,KAAiC,IAArC,EAA0C;AACxC,aAAO,IAAP;AACD,KAFD,MAEM,IAAIH,SAAS,CAACI,IAAV,IAAkB,KAAKF,KAAL,CAAWE,IAA7B,IAAsCJ,SAAS,CAACI,IAAV,CAAeC,aAAf,KAAiC,KAAKH,KAAL,CAAWE,IAAX,CAAgBC,aAA3F,EAA0G;AAC9GC,MAAAA,OAAO,CAACC,GAAR,CAAY,aAAZ;AACA,aAAO,IAAP;AACD,KAHK,MAGA,IAAIP,SAAS,CAACQ,YAAV,KAA2B,KAAKN,KAAL,CAAWM,YAA1C,EAAuD;AAC3D,aAAO,IAAP;AACD,KAFK,MAED;AACH,aAAO,KAAP;AACD;AACJ;;AACDC,EAAAA,oBAAoB,GAAG;AACnBH,IAAAA,OAAO,CAACC,GAAR,CAAY,YAAZ;AACA,SAAKL,KAAL,CAAWQ,cAAX;AACH;;AAIDC,EAAAA,MAAM,GAAG;AACL,QAAI,KAAKT,KAAL,CAAWM,YAAf,EAA6B,OAAO,oBAAC,OAAD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAAP;;AAC7B,QAAI,KAAKN,KAAL,CAAWE,IAAX,IAAmB,IAA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,CAAd;AACAqB,QAAAA,OAAO,CAACI,EAAR,CAAW,OAAX,EAAqBC,MAAD,IAAY;AAC5BjD,UAAAA,OAAO,CAACC,GAAR,CAAYgD,MAAZ;;AACA,cAAIA,MAAM,CAACzC,KAAX,EAAiB;AACbR,YAAAA,OAAO,CAACC,GAAR,CAAYgD,MAAM,CAACzC,KAAnB;AACA,iBAAKZ,KAAL,CAAWsD,eAAX,CAA2BD,MAAM,CAACzC,KAAlC;AACH;AAEJ,SAPD;AAQH,OApB8B,CAsB/B;AACA;AACA;AACA;;;AAEAH,MAAAA,MAAM,GAAG;AACL,eACI;AAAK,UAAA,SAAS,EAAC,eAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,WACI;AAAK,UAAA,GAAG,EAAC,OAAT;AAAiB,UAAA,KAAK,EAAE8C,eAAxB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,UADJ,CADJ;AAKH;;AAjC8B;;AAoCnC,WAAO,oBAAC,UAAD;AAAY,MAAA,KAAK,EAAEV,KAAnB;AAA0B,MAAA,OAAO,EAAElB,OAAnC;AAA4C,MAAA,eAAe,EAAE,KAAK3B,KAAL,CAAWsD,eAAxE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAAP;AAEH;;AAlIkC;;AAgJvC,MAAMC,eAAe,GAAG;AACpBC,EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,eAAe5D,cAAf","sourcesContent":["import React, { Component, useContext } from \"react\";\n// import vis from \"vis-network\";\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n\n shouldComponentUpdate(nextProps, nextState){ \n \n if (this.props.shouldUpdateGraph === true){\n return true\n }else if (nextProps.data && this.props.data && (nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp)){\n console.log(\"Rerendering\")\n return true;\n }else if (nextProps.loadingGraph !== this.props.loadingGraph){\n return true; \n }else{\n return false;\n }\n }\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n\n\n render() {\n if (this.props.loadingGraph) return ;\n if (this.props.data == null){\n return (\n
\n

Press Show Graph to see the graph representation of the experiment.

\n

If the experiment is running, press Start Job Monitor to start a live tracker of the changes on the experiment's jobs.\n This process will automatically update the graph's nodes colors and show a log of the detected changes.\n

\n
\n );\n }\n\n var nodes_array = [];\n var edges_array = [];\n \n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: { background: node.status_color, border: \"black\" },\n //level: node.priority,\n })\n );\n \n this.props.data.edges.map(edge => \n edges_array.push({ from: edge.from, to: edge.to })\n );\n }\n \n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n\n const options = {\n edges: {\n arrows: {\n to: { enabled: true }\n }\n },\n layout: {\n improvedLayout: true,\n hierarchical: {\n \n nodeSpacing: 250,\n edgeMinimization: false,\n blockShifting: false,\n parentCentralization: false,\n direction: 'UD',\n sortMethod: 'directed',\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true,\n },\n physics: {\n enabled: false,\n },\n nodes: {\n shape: 'dot',\n }\n };\n \n const graph = {\n nodes : nodes,\n edges : edges,\n };\n\n class VisNetwork extends Component {\n \n // shouldComponentUpdate(nextProps, nextState){ \n // if (nextProps.loadingGraph !== this.props.loadingGraph){\n // return true; \n // }else{\n // return false;\n // }\n // }\n \n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", (params) => {\n console.log(params);\n if (params.nodes){\n console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n \n });\n }\n \n // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n \n render() { \n return (\n
\n
\n
\n );\n }\n }\n \n return ;\n\n }\n\n\n \n\n \n\n \n \n\n \n\n}\n\nconst experimentStyle = {\n height: 600\n };\n\nexport default GraphNativeRep;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/16c4f5b8ef7147a3032d41adc49977a4.json b/node_modules/.cache/babel-loader/16c4f5b8ef7147a3032d41adc49977a4.json new file mode 100644 index 0000000000000000000000000000000000000000..8a4c192b5aa4829fddf4f42fd76067dc447e1f50 --- /dev/null +++ b/node_modules/.cache/babel-loader/16c4f5b8ef7147a3032d41adc49977a4.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js\";\nimport React, { Component } from \"react\"; // import vis from \"vis-network\";\n\nimport Spinner from \"../layout/Spinner\"; // import ExperimentContext from '../context/experiment/experimentContext';\n\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else if (nextProps.data && this.props.data && nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp) {\n console.log(\"Rerendering\");\n return true;\n } else if (nextProps.loadingGraph !== this.props.loadingGraph) {\n return true;\n } else {\n return false;\n }\n }\n\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n render() {\n if (this.props.loadingGraph) return React.createElement(Spinner, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 30\n },\n __self: this\n });\n\n if (this.props.data == null) {\n return React.createElement(\"div\", {\n className: \"card-body text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 33\n },\n __self: this\n }, React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 34\n },\n __self: this\n }, \"Press \", React.createElement(\"span\", {\n className: \"badge badge-info\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 34\n },\n __self: this\n }, \"Show Graph\"), \" to see the graph representation of the experiment.\"), React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 35\n },\n __self: this\n }, \"If the experiment is running, press \", React.createElement(\"span\", {\n className: \"badge badge-dark\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 35\n },\n __self: this\n }, \"Start Job Monitor\"), \" to start a live tracker of the changes on the experiment's jobs. This process will automatically update the graph's nodes colors and show a log of the detected changes.\"));\n }\n\n var nodes_array = [];\n var edges_array = [];\n\n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: {\n background: node.status_color,\n border: \"black\"\n } //level: node.priority,\n\n }));\n this.props.data.edges.map(edge => edges_array.push({\n from: edge.from,\n to: edge.to\n }));\n }\n\n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n const options = {\n edges: {\n arrows: {\n to: {\n enabled: true\n }\n }\n },\n layout: {\n improvedLayout: true,\n hierarchical: {\n nodeSpacing: 250,\n edgeMinimization: false,\n blockShifting: false,\n parentCentralization: false,\n direction: 'UD',\n sortMethod: 'directed'\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true\n },\n physics: {\n enabled: false\n },\n nodes: {\n shape: 'dot'\n }\n };\n const graph = {\n nodes: nodes,\n edges: edges\n };\n\n class VisNetwork extends Component {\n // shouldComponentUpdate(nextProps, nextState){ \n // if (nextProps.loadingGraph !== this.props.loadingGraph){\n // return true; \n // }else{\n // return false;\n // }\n // }\n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", function (params) {\n console.log(params);\n\n if (params.nodes) {\n console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n });\n }\n\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n render() {\n return React.createElement(\"div\", {\n className: \"card-body p-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 128\n },\n __self: this\n }, React.createElement(\"div\", {\n ref: \"myRef\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 129\n },\n __self: this\n }));\n }\n\n }\n\n return React.createElement(VisNetwork, {\n graph: graph,\n options: options,\n updateSelection: this.props.updateSelection,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 135\n },\n __self: this\n });\n }\n\n}\n\nconst experimentStyle = {\n height: 600\n};\nexport default GraphNativeRep;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js"],"names":["React","Component","Spinner","vis","GraphNativeRep","shouldComponentUpdate","nextProps","nextState","props","shouldUpdateGraph","data","pkl_timestamp","console","log","loadingGraph","componentWillUnmount","cleanGraphData","render","nodes_array","edges_array","nodes","edges","map","node","push","id","label","color","background","status_color","border","edge","from","to","DataSet","options","arrows","enabled","layout","improvedLayout","hierarchical","nodeSpacing","edgeMinimization","blockShifting","parentCentralization","direction","sortMethod","interaction","dragNodes","hoverConnectedEdges","navigationButtons","physics","shape","graph","VisNetwork","componentDidMount","network","Network","refs","myRef","on","params","updateSelection","experimentStyle","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,SAAhB,QAAiC,OAAjC,C,CACA;;AACA,OAAOC,OAAP,MAAoB,mBAApB,C,CACA;;AACA,OAAOC,GAAP,MAAgB,KAAhB;;AAEA,MAAMC,cAAN,SAA6BH,SAA7B,CAAuC;AAEnCI,EAAAA,qBAAqB,CAACC,SAAD,EAAYC,SAAZ,EAAsB;AAEvC,QAAI,KAAKC,KAAL,CAAWC,iBAAX,KAAiC,IAArC,EAA0C;AACxC,aAAO,IAAP;AACD,KAFD,MAEM,IAAIH,SAAS,CAACI,IAAV,IAAkB,KAAKF,KAAL,CAAWE,IAA7B,IAAsCJ,SAAS,CAACI,IAAV,CAAeC,aAAf,KAAiC,KAAKH,KAAL,CAAWE,IAAX,CAAgBC,aAA3F,EAA0G;AAC9GC,MAAAA,OAAO,CAACC,GAAR,CAAY,aAAZ;AACA,aAA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,EAAE,KAAK3B,KAAL,CAAWsD,eAAxE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAAP;AAEH;;AAlIkC;;AAgJvC,MAAMC,eAAe,GAAG;AACpBC,EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,eAAe5D,cAAf","sourcesContent":["import React, { Component } from \"react\";\n// import vis from \"vis-network\";\nimport Spinner from \"../layout/Spinner\";\n// import ExperimentContext from '../context/experiment/experimentContext';\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n\n shouldComponentUpdate(nextProps, nextState){ \n \n if (this.props.shouldUpdateGraph === true){\n return true\n }else if (nextProps.data && this.props.data && (nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp)){\n console.log(\"Rerendering\")\n return true;\n }else if (nextProps.loadingGraph !== this.props.loadingGraph){\n return true; \n }else{\n return false;\n }\n }\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n\n\n render() {\n if (this.props.loadingGraph) return ;\n if (this.props.data == null){\n return (\n
\n

Press Show Graph to see the graph representation of the experiment.

\n

If the experiment is running, press Start Job Monitor to start a live tracker of the changes on the experiment's jobs.\n This process will automatically update the graph's nodes colors and show a log of the detected changes.\n

\n
\n );\n }\n\n var nodes_array = [];\n var edges_array = [];\n \n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: { background: node.status_color, border: \"black\" },\n //level: node.priority,\n })\n );\n \n this.props.data.edges.map(edge => \n edges_array.push({ from: edge.from, to: edge.to })\n );\n }\n \n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n\n const options = {\n edges: {\n arrows: {\n to: { enabled: true }\n }\n },\n layout: {\n improvedLayout: true,\n hierarchical: {\n \n nodeSpacing: 250,\n edgeMinimization: false,\n blockShifting: false,\n parentCentralization: false,\n direction: 'UD',\n sortMethod: 'directed',\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true,\n },\n physics: {\n enabled: false,\n },\n nodes: {\n shape: 'dot',\n }\n };\n \n const graph = {\n nodes : nodes,\n edges : edges,\n };\n\n class VisNetwork extends Component {\n \n // shouldComponentUpdate(nextProps, nextState){ \n // if (nextProps.loadingGraph !== this.props.loadingGraph){\n // return true; \n // }else{\n // return false;\n // }\n // }\n \n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", function(params) {\n console.log(params);\n if (params.nodes){\n console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n \n });\n }\n \n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n \n render() { \n return (\n
\n
\n
\n );\n }\n }\n \n return ;\n\n }\n\n\n \n\n \n\n \n \n\n \n\n}\n\nconst experimentStyle = {\n height: 600\n };\n\nexport default GraphNativeRep;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/1765c309e45cb41919b88018388f5601.json b/node_modules/.cache/babel-loader/1765c309e45cb41919b88018388f5601.json new file mode 100644 index 0000000000000000000000000000000000000000..ba69260470f370fec5d3bc10ef1a85e04cea30df --- /dev/null +++ b/node_modules/.cache/babel-loader/1765c309e45cb41919b88018388f5601.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js\";\nimport React, { Component } from \"react\"; // import vis from \"vis-network\";\n\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n constructor(...args) {\n super(...args);\n\n this.updateVisNodes = nodes => {\n this.props.setVisData(nodes);\n };\n }\n\n shouldComponentUpdate(nextProps, nextState) {\n if (nextProps.data && this.props.data) {\n console.log(\"Rerendering\");\n return true;\n } else if (nextProps.loadingGraph !== this.props.loadingGraph) {\n return true;\n } else {\n return false;\n }\n }\n\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n render() {\n if (this.props.loadingGraph) return React.createElement(Spinner, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 31\n },\n __self: this\n });\n\n if (this.props.data == null) {\n return React.createElement(\"div\", {\n className: \"card-body text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 34\n },\n __self: this\n }, React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 35\n },\n __self: this\n }, \"Press \", React.createElement(\"span\", {\n className: \"badge badge-info\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 35\n },\n __self: this\n }, \"Show Graph\"), \" to see the graph representation of the experiment.\"), React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"If the experiment is running, press \", React.createElement(\"span\", {\n className: \"badge badge-dark\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Start Job Monitor\"), \" to start a live tracker of the changes on the experiment's jobs. This process will automatically update the graph's nodes colors and show a log of the detected changes.\"));\n }\n\n var nodes_array = [];\n var edges_array = [];\n\n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: {\n background: node.status_color,\n border: \"black\"\n } //level: node.priority,\n\n }));\n this.props.data.edges.map(edge => edges_array.push({\n from: edge.from,\n to: edge.to\n }));\n }\n\n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n this.updateVisNodes(nodes);\n const options = {\n edges: {\n arrows: {\n to: {\n enabled: true\n }\n }\n },\n layout: {\n improvedLayout: true,\n hierarchical: {\n nodeSpacing: 250,\n edgeMinimization: false,\n blockShifting: false,\n parentCentralization: false,\n direction: 'UD',\n sortMethod: 'directed'\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true\n },\n physics: {\n enabled: false\n },\n nodes: {\n shape: 'dot'\n }\n };\n const graph = {\n nodes: nodes,\n edges: edges\n };\n\n class VisNetwork extends Component {\n // shouldComponentUpdate(nextProps, nextState){ \n // if (this.props.shouldUpdateGraph === true){\n // return true;\n // } else {\n // return false;\n // }\n // }\n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", params => {\n //console.log(params);\n if (params.nodes) {\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n });\n } // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n\n\n render() {\n return React.createElement(\"div\", {\n className: \"card-body p-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 130\n },\n __self: this\n }, React.createElement(\"div\", {\n ref: \"myRef\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 131\n },\n __self: this\n }));\n }\n\n }\n\n return React.createElement(VisNetwork, {\n graph: graph,\n options: options,\n updateSelection: this.props.updateSelection,\n shouldUpdateGraph: this.props.shouldUpdateGraph,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 137\n },\n __self: this\n });\n }\n\n}\n\nconst experimentStyle = {\n height: 600\n};\nexport default GraphNativeRep;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js"],"names":["React","Component","Spinner","vis","GraphNativeRep","updateVisNodes","nodes","props","setVisData","shouldComponentUpdate","nextProps","nextState","data","console","log","loadingGraph","componentWillUnmount","cleanGraphData","render","nodes_array","edges_array","edges","map","node","push","id","label","color","background","status_color","border","edge","from","to","DataSet","options","arrows","enabled","layout","improvedLayout","hierarchical","nodeSpacing","edgeMinimization","blockShifting","parentCentralization","direction","sortMethod","interaction","dragNodes","hoverConnectedEdges","navigationButtons","physics","shape","graph","VisNetwork","componentDidMount","network","Network","refs","myRef","on","params","updateSelection","experimentStyle","shouldUpdateGra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,MAAM,GAAG;AACL,eACI;AAAK,UAAA,SAAS,EAAC,eAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,WACI;AAAK,UAAA,GAAG,EAAC,OAAT;AAAiB,UAAA,KAAK,EAAE6C,eAAxB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,UADJ,CADJ;AAKH;;AAjC8B;;AAoCnC,WAAO,oBAAC,UAAD;AACH,MAAA,KAAK,EAAEV,KADJ;AAEH,MAAA,OAAO,EAAElB,OAFN;AAGH,MAAA,eAAe,EAAE,KAAK5B,KAAL,CAAWuD,eAHzB;AAIH,MAAA,iBAAiB,EAAE,KAAKvD,KAAL,CAAWyD,iBAJ3B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAAP;AAOH;;AA1IkC;;AAwJvC,MAAMD,eAAe,GAAG;AACpBE,EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,eAAe7D,cAAf","sourcesContent":["import React, { Component } from \"react\";\n// import vis from \"vis-network\";\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n\n shouldComponentUpdate(nextProps, nextState){ \n \n if (nextProps.data && this.props.data){\n console.log(\"Rerendering\")\n return true;\n }else if (nextProps.loadingGraph !== this.props.loadingGraph){\n return true; \n }else{\n return false;\n }\n }\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n updateVisNodes = (nodes) => {\n this.props.setVisData(nodes);\n }\n\n\n\n render () {\n if (this.props.loadingGraph) return ;\n if (this.props.data == null){\n return (\n
\n

Press Show Graph to see the graph representation of the experiment.

\n

If the experiment is running, press Start Job Monitor to start a live tracker of the changes on the experiment's jobs.\n This process will automatically update the graph's nodes colors and show a log of the detected changes.\n

\n
\n );\n }\n\n var nodes_array = [];\n var edges_array = [];\n \n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: { background: node.status_color, border: \"black\" },\n //level: node.priority,\n })\n );\n \n this.props.data.edges.map(edge => \n edges_array.push({ from: edge.from, to: edge.to })\n );\n }\n \n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n this.updateVisNodes(nodes);\n\n const options = {\n edges: {\n arrows: {\n to: { enabled: true }\n }\n },\n layout: {\n improvedLayout: true,\n hierarchical: {\n \n nodeSpacing: 250,\n edgeMinimization: false,\n blockShifting: false,\n parentCentralization: false,\n direction: 'UD',\n sortMethod: 'directed',\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true,\n },\n physics: {\n enabled: false,\n },\n nodes: {\n shape: 'dot',\n }\n };\n \n const graph = {\n nodes : nodes,\n edges : edges,\n };\n\n class VisNetwork extends Component {\n \n // shouldComponentUpdate(nextProps, nextState){ \n // if (this.props.shouldUpdateGraph === true){\n // return true;\n // } else {\n // return false;\n // }\n // }\n \n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", (params) => {\n //console.log(params);\n if (params.nodes){\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n \n });\n }\n \n // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n \n render() { \n return (\n
\n
\n
\n );\n }\n }\n \n return ;\n\n }\n\n\n \n\n \n\n \n \n\n \n\n}\n\nconst experimentStyle = {\n height: 600\n };\n\nexport default GraphNativeRep;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/177a9b88443b2496039119575ebe97c4.json b/node_modules/.cache/babel-loader/177a9b88443b2496039119575ebe97c4.json new file mode 100644 index 0000000000000000000000000000000000000000..9f05c85a6c78ac6891d4afdfefbb8b1eeaeb655d --- /dev/null +++ b/node_modules/.cache/babel-loader/177a9b88443b2496039119575ebe97c4.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js\";\nimport React, { Component } from \"react\"; // import vis from \"vis-network\";\n\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis-network\";\n\nclass GraphNativeRep extends Component {\n constructor(...args) {\n super(...args);\n\n this.updateVisNodes = nodes => {\n this.props.setVisData(nodes);\n };\n }\n\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else if (nextProps.data && this.props.data && nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp) {\n console.log(\"Rerendering\");\n return true;\n } else if (nextProps.loadingGraph !== this.props.loadingGraph) {\n return true;\n } else {\n return false;\n }\n }\n\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n render() {\n if (this.props.loadingGraph) return React.createElement(Spinner, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 32\n },\n __self: this\n });\n\n if (this.props.data == null) {\n return React.createElement(\"div\", {\n className: \"card-body text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 35\n },\n __self: this\n }, React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Press \", React.createElement(\"span\", {\n className: \"badge badge-info\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Show Graph\"), \" to see the graph representation of the experiment.\"), React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"If the experiment is running, press \", React.createElement(\"span\", {\n className: \"badge badge-dark\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"Start Job Monitor\"), \" to start a live tracker of the changes on the experiment's jobs. This process will automatically update the graph's nodes colors and show a log of the detected changes.\"));\n }\n\n var nodes_array = [];\n var edges_array = [];\n\n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: {\n background: node.status_color,\n border: \"black\"\n },\n level: node.level\n }));\n this.props.data.edges.map(edge => edges_array.push({\n from: edge.from,\n to: edge.to\n }));\n }\n\n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n const options = {\n edges: {\n arrows: {\n to: {\n enabled: true\n }\n }\n },\n layout: {\n //improvedLayout: true,\n hierarchical: {\n // nodeSpacing: 190,\n blockShifting: true,\n edgeMinimization: true,\n parentCentralization: true,\n sortMethod: 'directed',\n direction: 'UD' // work on vis current version\n // nodeSpacing: 190,\n // blockShifting: false,\n // edgeMinimization: false,\n // parentCentralization: true,\n // sortMethod: 'hubsize',\n // direction: 'UD',\n\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true\n },\n physics: {\n enabled: false\n },\n nodes: {\n shape: 'dot',\n font: {\n size: 10\n }\n }\n };\n const graph = {\n nodes: nodes,\n edges: edges\n };\n\n class VisNetwork extends Component {\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else {\n return false;\n }\n }\n\n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", params => {\n //console.log(params);\n if (params.nodes) {\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n });\n } // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n\n\n render() {\n return React.createElement(\"div\", {\n className: \"card-body p-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 140\n },\n __self: this\n }, React.createElement(\"div\", {\n ref: \"myRef\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 141\n },\n __self: this\n }));\n }\n\n }\n\n this.updateVisNodes(nodes);\n return React.createElement(VisNetwork, {\n graph: graph,\n options: options,\n updateSelection: this.props.updateSelection,\n shouldUpdateGraph: this.props.shouldUpdateGraph,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 149\n },\n __self: this\n });\n }\n\n}\n\nconst experimentStyle = {\n height: 600\n};\nexport default GraphNativeRep;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js"],"names":["React","Component","Spinner","vis","GraphNativeRep","updateVisNodes","nodes","props","setVisData","shouldComponentUpdate","nextProps","nextState","shouldUpdateGraph","data","pkl_timestamp","console","log","loadingGraph","componentWillUnmount","cleanGraphData","render","nodes_array","edges_array","edges","map","node","push","id","label","color","background","status_color","border","level","edge","from","to","DataSet","options","arrows","enabled","layout","hierarchical","blockShifting","edgeMinimization","parentCentralization","sortMethod","direction","interaction","dragNodes","hoverConnectedEdges","navigationButtons","physics","shape","font","size","graph","VisNetwork","componentDidMount","network","Network","refs","myRef","on","params","updateSelection","experimentStyle","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,SAAhB,QAAiC,OAAjC,C,CACA;;AACA,OAAOC,OAAP,MAAoB,mBAApB;AACA,OAAOC,GAAP,MAAgB,aAAhB;;AAEA,MAAMC,cAAN,SAA6BH,SAA7B,CAAuC;AAAA;AAAA;;AAAA,SAmBnCI,cAnBmC,GAmBjBC,KAAD,IAAW;AACxB,WAAKC,KAAL,CAAWC,UAAX,CAAsBF,KAAtB;AACH,KArBkC;AAAA;;AAEnCG,EAAAA,qBAAqB,CAACC,SAAD,EAAYC,SAAZ,EAAsB;AACvC,QAAI,KAAKJ,KAAL,CAAWK,iBAAX,KAAiC,IAArC,EAA0C;AACtC,aAAO,IAAP;AACD,KAFH,MAEQ,IAAIF,SAAS,CAACG,IAAV,IAAkB,KAAKN,KAAL,CAAWM,IAA7B,IAAsCH,SAAS,CAACG,IAAV,CAAeC,aAAf,KAAiC,KAAKP,KAAL,CAAWM,IAAX,CAAgBC,aAA3F,EAA0G;AAC9GC,MAAAA,OAAO,CAACC,GAAR,CAAY,aAAZ;AACA,aAAO,IAAP;AACD,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AAEkD,KADJ;AAEH,MAAA,OAAO,EAAElB,OAFN;AAGH,MAAA,eAAe,EAAE,KAAK/B,KAAL,CAAW0D,eAHzB;AAIH,MAAA,iBAAiB,EAAE,KAAK1D,KAAL,CAAWK,iBAJ3B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAAP;AAOH;;AAtJkC;;AAoKvC,MAAMsD,eAAe,GAAG;AACpBC,EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,eAAe/D,cAAf","sourcesContent":["import React, { Component } from \"react\";\n// import vis from \"vis-network\";\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis-network\";\n\nclass GraphNativeRep extends Component {\n\n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true\n }else if (nextProps.data && this.props.data && (nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp)){\n console.log(\"Rerendering\")\n return true;\n }else if (nextProps.loadingGraph !== this.props.loadingGraph){\n return true; \n }else{\n return false;\n }\n }\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n updateVisNodes = (nodes) => {\n this.props.setVisData(nodes);\n }\n\n\n\n render () {\n if (this.props.loadingGraph) return ;\n if (this.props.data == null){\n return (\n
\n

Press Show Graph to see the graph representation of the experiment.

\n

If the experiment is running, press Start Job Monitor to start a live tracker of the changes on the experiment's jobs.\n This process will automatically update the graph's nodes colors and show a log of the detected changes.\n

\n
\n );\n }\n\n var nodes_array = [];\n var edges_array = [];\n \n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: { background: node.status_color, border: \"black\" },\n level: node.level,\n })\n );\n \n this.props.data.edges.map(edge => \n edges_array.push({ from: edge.from, to: edge.to })\n );\n }\n \n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n\n\n const options = {\n edges: {\n arrows: {\n to: { enabled: true }\n }\n },\n layout: {\n //improvedLayout: true,\n hierarchical: {\n // nodeSpacing: 190,\n blockShifting: true,\n edgeMinimization: true,\n parentCentralization: true,\n sortMethod: 'directed',\n direction: 'UD',\n // work on vis current version\n // nodeSpacing: 190,\n // blockShifting: false,\n // edgeMinimization: false,\n // parentCentralization: true,\n // sortMethod: 'hubsize',\n // direction: 'UD',\n }\n }, \n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true,\n },\n physics: {\n enabled: false,\n },\n nodes: {\n shape: 'dot',\n font: {\n size: 10,\n },\n }\n };\n \n const graph = {\n nodes : nodes,\n edges : edges,\n };\n\n class VisNetwork extends Component {\n \n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true;\n } else {\n return false;\n }\n }\n \n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", (params) => {\n //console.log(params);\n if (params.nodes){\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n \n });\n }\n \n // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n \n render() { \n return (\n
\n
\n
\n );\n }\n }\n\n this.updateVisNodes(nodes);\n \n return ;\n\n }\n\n\n \n\n \n\n \n \n\n \n\n}\n\nconst experimentStyle = {\n height: 600\n };\n\nexport default GraphNativeRep;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/18fc0540b39e246a88a90ed42f369f09.json b/node_modules/.cache/babel-loader/18fc0540b39e246a88a90ed42f369f09.json new file mode 100644 index 0000000000000000000000000000000000000000..fab80ed9dffa1a8c0df01a58fa419b5979f3e5e7 --- /dev/null +++ b/node_modules/.cache/babel-loader/18fc0540b39e246a88a90ed42f369f09.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js\";\nimport React, { Component } from \"react\"; // import vis from \"vis-network\";\n\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis-network\";\n\nclass GraphNativeRep extends Component {\n constructor(...args) {\n super(...args);\n\n this.updateVisNodes = nodes => {\n this.props.setVisData(nodes);\n };\n }\n\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else if (nextProps.data && this.props.data && nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp) {\n console.log(\"Rerendering\");\n return true;\n } else if (nextProps.loadingGraph !== this.props.loadingGraph) {\n return true;\n } else {\n return false;\n }\n }\n\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n render() {\n if (this.props.loadingGraph) return React.createElement(Spinner, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 32\n },\n __self: this\n });\n\n if (this.props.data == null) {\n return React.createElement(\"div\", {\n className: \"card-body text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 35\n },\n __self: this\n }, React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Press \", React.createElement(\"span\", {\n className: \"badge badge-info\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Show Graph\"), \" to see the graph representation of the experiment.\"), React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"If the experiment is running, press \", React.createElement(\"span\", {\n className: \"badge badge-dark\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"Start Job Monitor\"), \" to start a live tracker of the changes on the experiment's jobs. This process will automatically update the graph's nodes colors and show a log of the detected changes.\"));\n }\n\n var nodes_array = [];\n var edges_array = [];\n\n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: {\n background: node.status_color,\n border: \"black\"\n },\n level: node.level\n }));\n this.props.data.edges.map(edge => edges_array.push({\n from: edge.from,\n to: edge.to\n }));\n }\n\n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n const options = {\n edges: {\n arrows: {\n to: {\n enabled: true\n }\n }\n },\n layout: {\n improvedLayout: false,\n hierarchical: {\n nodeSpacing: 190,\n blockShifting: true,\n edgeMinimization: true,\n parentCentralization: false,\n sortMethod: 'hubsize',\n direction: 'UD' // work on vis current version\n // nodeSpacing: 190,\n // blockShifting: false,\n // edgeMinimization: false,\n // parentCentralization: true,\n // sortMethod: 'hubsize',\n // direction: 'UD',\n\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true\n },\n physics: {\n enabled: false\n },\n nodes: {\n shape: 'dot',\n font: {\n size: 10\n }\n }\n };\n const graph = {\n nodes: nodes,\n edges: edges\n };\n\n class VisNetwork extends Component {\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else {\n return false;\n }\n }\n\n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", params => {\n //console.log(params);\n if (params.nodes) {\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n });\n } // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n\n\n render() {\n return React.createElement(\"div\", {\n className: \"card-body p-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 140\n },\n __self: this\n }, React.createElement(\"div\", {\n ref: \"myRef\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 141\n },\n __self: this\n }));\n }\n\n }\n\n this.updateVisNodes(nodes);\n return React.createElement(VisNetwork, {\n graph: graph,\n options: options,\n updateSelection: this.props.updateSelection,\n shouldUpdateGraph: this.props.shouldUpdateGraph,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 149\n },\n __self: this\n });\n }\n\n}\n\nconst experimentStyle = {\n height: 600\n};\nexport default GraphNativeRep;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js"],"names":["React","Component","Spinner","vis","GraphNativeRep","updateVisNodes","nodes","props","setVisData","shouldComponentUpdate","nextProps","nextState","shouldUpdateGraph","data","pkl_timestamp","console","log","loadingGraph","componentWillUnmount","cleanGraphData","render","nodes_array","edges_array","edges","map","node","push","id","label","color","background","status_color","border","level","edge","from","to","DataSet","options","arrows","enabled","layout","improvedLayout","hierarchical","nodeSpacing","blockShifting","edgeMinimization","parentCentralization","sortMethod","direction","interaction","dragNodes","hoverConnectedEdges","navigationButtons","physics","shape","font","size","graph","VisNetwork","componentDidMount","network","Network","refs","myRef","on","params","updateSelection","experimentStyle","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,SAAhB,QAAiC,OAAjC,C,CACA;;AACA,OAAOC,OAAP,MAAoB,mBAApB;AACA,OAAOC,GAAP,MAAgB,aAAhB;;AAEA,MAAMC,cAAN,SAA6BH,SAA7B,CAAuC;AAAA;AAAA;;AAAA,SAmBnCI,cAnBmC,GAmBjBC,KAAD,IAAW;AACxB,WAAKC,KAAL,CAAWC,UAAX,CAAsBF,KAAtB;AACH,KArBkC;AAAA;;AAEnCG,EAAAA,qBAAqB,CAACC,SAAD,EAAYC,SAAZ,EAAsB;AACvC,QAAI,KAAKJ,KAAL,CAAWK,iBAAX,KAAiC,IAArC,EAA0C;AACtC,aAAO,IAAP;AACD,KAFH,MAEQ,IAAIF,SAAS,CAACG,IAAV,IAAkB,KAAKN,KAAL,CAAWM,IAA7B,IAAsCH,SAAS,CAACG,IAAV,CAAeC,aAAf,KAAiC,KAAKP,KAAL,CAAWM,IAAX,CAAgBC,aAA3F,EAA0G;AAC9GC,MAAAA,OAAO,CAACC,GAAR,CAAY,aAAZ;AACA,aAAO,IAAP;AACD,KAHK,MAGA,IAAIN,SAAS,CAACO,YAAV,KAA2B,KAAKV,K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AEoD,KADJ;AAEH,MAAA,OAAO,EAAEpB,OAFN;AAGH,MAAA,eAAe,EAAE,KAAK/B,KAAL,CAAW4D,eAHzB;AAIH,MAAA,iBAAiB,EAAE,KAAK5D,KAAL,CAAWK,iBAJ3B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAAP;AAOH;;AAtJkC;;AAoKvC,MAAMwD,eAAe,GAAG;AACpBC,EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,eAAejE,cAAf","sourcesContent":["import React, { Component } from \"react\";\n// import vis from \"vis-network\";\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis-network\";\n\nclass GraphNativeRep extends Component {\n\n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true\n }else if (nextProps.data && this.props.data && (nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp)){\n console.log(\"Rerendering\")\n return true;\n }else if (nextProps.loadingGraph !== this.props.loadingGraph){\n return true; \n }else{\n return false;\n }\n }\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n updateVisNodes = (nodes) => {\n this.props.setVisData(nodes);\n }\n\n\n\n render () {\n if (this.props.loadingGraph) return ;\n if (this.props.data == null){\n return (\n
\n

Press Show Graph to see the graph representation of the experiment.

\n

If the experiment is running, press Start Job Monitor to start a live tracker of the changes on the experiment's jobs.\n This process will automatically update the graph's nodes colors and show a log of the detected changes.\n

\n
\n );\n }\n\n var nodes_array = [];\n var edges_array = [];\n \n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: { background: node.status_color, border: \"black\" },\n level: node.level,\n })\n );\n \n this.props.data.edges.map(edge => \n edges_array.push({ from: edge.from, to: edge.to })\n );\n }\n \n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n\n\n const options = {\n edges: {\n arrows: {\n to: { enabled: true }\n }\n },\n layout: {\n improvedLayout: false,\n hierarchical: {\n nodeSpacing: 190, \n blockShifting: true,\n edgeMinimization: true,\n parentCentralization: false,\n sortMethod: 'hubsize',\n direction: 'UD',\n // work on vis current version\n // nodeSpacing: 190,\n // blockShifting: false,\n // edgeMinimization: false,\n // parentCentralization: true,\n // sortMethod: 'hubsize',\n // direction: 'UD',\n }\n }, \n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true,\n },\n physics: {\n enabled: false,\n },\n nodes: {\n shape: 'dot',\n font: {\n size: 10,\n },\n }\n };\n \n const graph = {\n nodes : nodes,\n edges : edges,\n };\n\n class VisNetwork extends Component {\n \n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true;\n } else {\n return false;\n }\n }\n \n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", (params) => {\n //console.log(params);\n if (params.nodes){\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n \n });\n }\n \n // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n \n render() { \n return (\n
\n
\n
\n );\n }\n }\n\n this.updateVisNodes(nodes);\n \n return ;\n\n }\n\n\n \n\n \n\n \n \n\n \n\n}\n\nconst experimentStyle = {\n height: 600\n };\n\nexport default GraphNativeRep;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/1924ee61934855ae12d721af73cbfd7b.json b/node_modules/.cache/babel-loader/1924ee61934855ae12d721af73cbfd7b.json new file mode 100644 index 0000000000000000000000000000000000000000..5a443ce19c09136a407150dd3b0c6c762f21f3e1 --- /dev/null +++ b/node_modules/.cache/babel-loader/1924ee61934855ae12d721af73cbfd7b.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/Selection.js\";\nimport React, { useContext, Fragment } from 'react';\nimport ExperimentContext from '../context/experiment/experimentContext';\n\nconst Selection = () => {\n const experimentContext = useContext(ExperimentContext);\n const selection = experimentContext.selection,\n data = experimentContext.data,\n experiment = experimentContext.experiment; // const { model, branch, hpc } = experiment;\n //var currentSelection = \"Node: \"\n\n var currentNode = \"\";\n var selectedNode = null;\n\n if (selection) {\n //console.log(\"Current selection \" + selection)\n selection.map(node => // currentSelection += node + \", \"\n currentNode = node); //console.log(\"Current node \" + currentNode)\n\n selectedNode = data.nodes.find(node => node.id === currentNode); //console.log(\"Selected node\")\n //console.log(\"Data: \" + selectedNode.id + \" \" + selectedNode.platform_name)\n }\n\n return React.createElement(Fragment, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 23\n },\n __self: this\n }, selectedNode && React.createElement(Fragment, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 25\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 26\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-12\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 27\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"card text-white bg-info\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 28\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"card-header text-center p-0\",\n style: headerCard,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 29\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"mh-100 px-0 mx-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 30\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 31\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 31\n },\n __self: this\n }, selectedNode.id)))), React.createElement(\"div\", {\n className: \"card-body py-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 34\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 35\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Date:\"), \" \", selectedNode.date)), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 38\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 39\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-12\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 40\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 41\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 41\n },\n __self: this\n }, \"Section:\"), \" \", selectedNode.section)))), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 45\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 46\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-12\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 47\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 48\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 48\n },\n __self: this\n }, \"Platform:\"), \" \", selectedNode.platform_name && selectedNode.platform_name, \" \", !selectedNode.platform_name && experiment.hpc)))), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 55\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 56\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-6\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 57\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 58\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 58\n },\n __self: this\n }, \"Processors:\"), \" \", selectedNode.processors)), React.createElement(\"div\", {\n className: \"col-6\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 60\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 61\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 61\n },\n __self: this\n }, \"Wallclock:\"), \" \", selectedNode.wallclock)))), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 65\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 66\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-6\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 67\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 68\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 68\n },\n __self: this\n }, \"Level:\"), \" \", selectedNode.level)), React.createElement(\"div\", {\n className: \"col-6\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 70\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 71\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 71\n },\n __self: this\n }, \"Out:\"), \" \", selectedNode.children, \" \", React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 71\n },\n __self: this\n }, \"In:\"), \" \", selectedNode.parents, \" \")))), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 76\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 77\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-12\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 78\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 79\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 79\n },\n __self: this\n }, \"Status:\")), \" \", selectedNode.status))), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 86\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 87\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-4\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 88\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 89\n },\n __self: this\n }, \"o:\", data.max_children, \"/i:\", data.max_parents, \" \")), React.createElement(\"div\", {\n className: \"col-4\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 91\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 92\n },\n __self: this\n }, \"o:\", data.avg_children, \"/i:\", data.avg_parents, \" \")), React.createElement(\"div\", {\n className: \"col-4\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 94\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 95\n },\n __self: this\n }, data.total_jobs))))))))), !selectedNode && data && React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 106\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-12\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 107\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"card text-white bg-info\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 108\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"card-header text-center py-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 109\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 110\n },\n __self: this\n }, \"Here goes the Job Id\")), React.createElement(\"div\", {\n className: \"card-body\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 112\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"text-center\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 113\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 114\n },\n __self: this\n }, \"Select a Node to see more information.\")))))));\n};\n\nconst experimentStyle = {\n height: 200\n};\nconst headerCard = {\n height: 30\n};\nexport default Selection;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/Selection.js"],"names":["React","useContext","Fragment","ExperimentContext","Selection","experimentContext","selection","data","experiment","currentNode","selectedNode","map","node","nodes","find","id","experimentStyle","headerCard","date","section","platform_name","hpc","processors","wallclock","level","children","parents","status","max_children","max_parents","avg_children","avg_parents","total_jobs","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,UAAhB,EAA4BC,QAA5B,QAA4C,OAA5C;AACA,OAAOC,iBAAP,MAA8B,yCAA9B;;AAEA,MAAMC,SAAS,GAAG,MAAM;AACpB,QAAMC,iBAAiB,GAAGJ,UAAU,CAACE,iBAAD,CAApC;AADoB,QAEZG,SAFY,GAEoBD,iBAFpB,CAEZC,SAFY;AAAA,QAEDC,IAFC,GAEoBF,iBAFpB,CAEDE,IAFC;AAAA,QAEKC,UAFL,GAEoBH,iBAFpB,CAEKG,UAFL,EAGpB;AACA;;AACA,MAAIC,WAAW,GAAG,EAAlB;AACA,MAAIC,YAAY,GAAG,IAAnB;;AACA,MAAIJ,SAAJ,EAAe;AACX;AACAA,IAAAA,SAAS,CAACK,GAAV,CAAcC,IAAI,IACd;AACAH,IAAAA,WAAW,GA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AA,KACI;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,WAAUtB,IAAI,CAACuB,YAAf,SAAgCvB,IAAI,CAACwB,WAArC,MADJ,CAJJ,EAOI;AAAK,IAAA,SAAS,EAAC,OAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACI;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KAAQxB,IAAI,CAACyB,UAAb,CADJ,CAPJ,CADJ,CApDJ,CANJ,CADH,CADJ,CADL,CAFR,EAkFS,CAACtB,YAAD,IAAiBH,IAAjB,IACG;AAAK,IAAA,SAAS,EAAC,KAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACI;AAAK,IAAA,SAAS,EAAC,QAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACI;AAAK,IAAA,SAAS,EAAC,yBAAf;AAAyC,IAAA,KAAK,EAAES,eAAhD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACI;AAAK,IAAA,SAAS,EAAC,8BAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACI;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,4BADJ,CADJ,EAII;AAAK,IAAA,SAAS,EAAC,WAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACI;AAAK,IAAA,SAAS,EAAC,aAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,8CADA,CADJ,CAJJ,CADJ,CADJ,CAnFZ,CADJ;AAwGH,CA1HD;;AA4HA,MAAMA,eAAe,GAAG;AACpBiB,EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,MAAMhB,UAAU,GAAG;AACfgB,EAAAA,MAAM,EAAE;AADO,CAAnB;AAIA,eAAe7B,SAAf","sourcesContent":["import React, { useContext, Fragment } from 'react'\nimport ExperimentContext from '../context/experiment/experimentContext';\n\nconst Selection = () => {\n const experimentContext = useContext(ExperimentContext);\n const { selection, data, experiment } = experimentContext;\n // const { model, branch, hpc } = experiment;\n //var currentSelection = \"Node: \"\n var currentNode = \"\"\n var selectedNode = null\n if (selection) {\n //console.log(\"Current selection \" + selection)\n selection.map(node => (\n // currentSelection += node + \", \"\n currentNode = node\n ));\n //console.log(\"Current node \" + currentNode)\n selectedNode = data.nodes.find(node => node.id === currentNode) \n //console.log(\"Selected node\")\n //console.log(\"Data: \" + selectedNode.id + \" \" + selectedNode.platform_name)\n } \n return (\n \n {selectedNode &&\n \n
\n
\n
\n
\n
\n {selectedNode.id}\n
\n
\n
\n
\n Date: {selectedNode.date}\n
\n
\n
\n
\n Section: {selectedNode.section}\n
\n
\n
\n
\n
\n
\n Platform: {selectedNode.platform_name && selectedNode.platform_name} {!selectedNode.platform_name && experiment.hpc}\n
\n
\n
\n {/*
\n Priority: {selectedNode.priority}\n
*/}\n
\n
\n
\n Processors: {selectedNode.processors}\n
\n
\n Wallclock: {selectedNode.wallclock}\n
\n
\n
\n
\n
\n
\n Level: {selectedNode.level}\n
\n
\n Out: {selectedNode.children} In: {selectedNode.parents} \n
\n \n
\n
\n
\n
\n
\n Status: {selectedNode.status}\n
\n {/*
\n c:{data.max_children}/p:{data.max_parents}\n
*/}\n
\n
\n
\n
\n
\n o:{data.max_children}/i:{data.max_parents} \n
\n
\n o:{data.avg_children}/i:{data.avg_parents} \n
\n
\n {data.total_jobs}\n
\n
\n
\n
\n
\n
\n
\n
\n } \n {!selectedNode && data &&\n
\n
\n
\n
\n Here goes the Job Id\n
\n
\n
\n Select a Node to see more information. \n
\n
\n
\n
\n
\n } \n
\n \n \n\n )\n}\n\nconst experimentStyle = {\n height: 200\n };\n\nconst headerCard = {\n height: 30\n}\n\nexport default Selection;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/1a05aac1866814954ec6ff536dba42f6.json b/node_modules/.cache/babel-loader/1a05aac1866814954ec6ff536dba42f6.json new file mode 100644 index 0000000000000000000000000000000000000000..3b91d28b021092fc28041d3b750bea6c19660be0 --- /dev/null +++ b/node_modules/.cache/babel-loader/1a05aac1866814954ec6ff536dba42f6.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js\";\nimport React, { Component } from \"react\"; // import vis from \"vis-network\";\n\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis-network\";\n\nclass GraphNativeRep extends Component {\n constructor(...args) {\n super(...args);\n\n this.updateVisNodes = nodes => {\n this.props.setVisData(nodes);\n };\n }\n\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else if (nextProps.data && this.props.data && nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp) {\n console.log(\"Rerendering\");\n return true;\n } else if (nextProps.loadingGraph !== this.props.loadingGraph) {\n return true;\n } else {\n return false;\n }\n }\n\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n render() {\n if (this.props.loadingGraph) return React.createElement(Spinner, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 32\n },\n __self: this\n });\n\n if (this.props.data == null) {\n return React.createElement(\"div\", {\n className: \"card-body text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 35\n },\n __self: this\n }, React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Press \", React.createElement(\"span\", {\n className: \"badge badge-info\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Show Graph\"), \" to see the graph representation of the experiment.\"), React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"If the experiment is running, press \", React.createElement(\"span\", {\n className: \"badge badge-dark\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"Start Job Monitor\"), \" to start a live tracker of the changes on the experiment's jobs. This process will automatically update the graph's nodes colors and show a log of the detected changes.\"));\n }\n\n var nodes_array = [];\n var edges_array = [];\n\n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: {\n background: node.status_color,\n border: \"black\"\n },\n level: node.level\n }));\n this.props.data.edges.map(edge => edges_array.push({\n from: edge.from,\n to: edge.to\n }));\n }\n\n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n const options = {\n edges: {\n arrows: {\n to: {\n enabled: true\n }\n }\n },\n layout: {\n improvedLayout: false,\n hierarchical: {\n nodeSpacing: 190,\n blockShifting: false,\n edgeMinimization: false,\n parentCentralization: true,\n sortMethod: 'directed',\n direction: 'UD' // work on vis current version\n // nodeSpacing: 190,\n // blockShifting: false,\n // edgeMinimization: false,\n // parentCentralization: true,\n // sortMethod: 'hubsize',\n // direction: 'UD',\n\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true\n },\n physics: {\n enabled: false\n },\n nodes: {\n shape: 'dot',\n font: {\n size: 10\n }\n }\n };\n const graph = {\n nodes: nodes,\n edges: edges\n };\n\n class VisNetwork extends Component {\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else {\n return false;\n }\n }\n\n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", params => {\n //console.log(params);\n if (params.nodes) {\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n });\n } // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n\n\n render() {\n return React.createElement(\"div\", {\n className: \"card-body p-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 140\n },\n __self: this\n }, React.createElement(\"div\", {\n ref: \"myRef\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 141\n },\n __self: this\n }));\n }\n\n }\n\n this.updateVisNodes(nodes);\n return React.createElement(VisNetwork, {\n graph: graph,\n options: options,\n updateSelection: this.props.updateSelection,\n shouldUpdateGraph: this.props.shouldUpdateGraph,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 149\n },\n __self: this\n });\n }\n\n}\n\nconst experimentStyle = {\n height: 600\n};\nexport default GraphNativeRep;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js"],"names":["React","Component","Spinner","vis","GraphNativeRep","updateVisNodes","nodes","props","setVisData","shouldComponentUpdate","nextProps","nextState","shouldUpdateGraph","data","pkl_timestamp","console","log","loadingGraph","componentWillUnmount","cleanGraphData","render","nodes_array","edges_array","edges","map","node","push","id","label","color","background","status_color","border","level","edge","from","to","DataSet","options","arrows","enabled","layout","improvedLayout","hierarchical","nodeSpacing","blockShifting","edgeMinimization","parentCentralization","sortMethod","direction","interaction","dragNodes","hoverConnectedEdges","navigationButtons","physics","shape","font","size","graph","VisNetwork","componentDidMount","network","Network","refs","myRef","on","params","updateSelection","experimentStyle","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,SAAhB,QAAiC,OAAjC,C,CACA;;AACA,OAAOC,OAAP,MAAoB,mBAApB;AACA,OAAOC,GAAP,MAAgB,aAAhB;;AAEA,MAAMC,cAAN,SAA6BH,SAA7B,CAAuC;AAAA;AAAA;;AAAA,SAmBnCI,cAnBmC,GAmBjBC,KAAD,IAAW;AACxB,WAAKC,KAAL,CAAWC,UAAX,CAAsBF,KAAtB;AACH,KArBkC;AAAA;;AAEnCG,EAAAA,qBAAqB,CAACC,SAAD,EAAYC,SAAZ,EAAsB;AACvC,QAAI,KAAKJ,KAAL,CAAWK,iBAAX,KAAiC,IAArC,EAA0C;AACtC,aAAO,IAAP;AACD,KAFH,MAEQ,IAAIF,SAAS,CAACG,IAAV,IAAkB,KAAKN,KAAL,CAAWM,IAA7B,IAAsCH,SAAS,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AA,GAAG,EAAC,OAAT;AAAiB,UAAA,KAAK,EAAEgD,eAAxB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,UADJ,CADJ;AAKH;;AAjC8B;;AAoCnC,SAAK/D,cAAL,CAAoBC,KAApB;AAEA,WAAO,oBAAC,UAAD;AACH,MAAA,KAAK,EAAEoD,KADJ;AAEH,MAAA,OAAO,EAAEpB,OAFN;AAGH,MAAA,eAAe,EAAE,KAAK/B,KAAL,CAAW4D,eAHzB;AAIH,MAAA,iBAAiB,EAAE,KAAK5D,KAAL,CAAWK,iBAJ3B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAAP;AAOH;;AAtJkC;;AAoKvC,MAAMwD,eAAe,GAAG;AACpBC,EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,eAAejE,cAAf","sourcesContent":["import React, { Component } from \"react\";\n// import vis from \"vis-network\";\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis-network\";\n\nclass GraphNativeRep extends Component {\n\n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true\n }else if (nextProps.data && this.props.data && (nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp)){\n console.log(\"Rerendering\")\n return true;\n }else if (nextProps.loadingGraph !== this.props.loadingGraph){\n return true; \n }else{\n return false;\n }\n }\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n updateVisNodes = (nodes) => {\n this.props.setVisData(nodes);\n }\n\n\n\n render () {\n if (this.props.loadingGraph) return ;\n if (this.props.data == null){\n return (\n
\n

Press Show Graph to see the graph representation of the experiment.

\n

If the experiment is running, press Start Job Monitor to start a live tracker of the changes on the experiment's jobs.\n This process will automatically update the graph's nodes colors and show a log of the detected changes.\n

\n
\n );\n }\n\n var nodes_array = [];\n var edges_array = [];\n \n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: { background: node.status_color, border: \"black\" },\n level: node.level,\n })\n );\n \n this.props.data.edges.map(edge => \n edges_array.push({ from: edge.from, to: edge.to })\n );\n }\n \n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n\n\n const options = {\n edges: {\n arrows: {\n to: { enabled: true }\n }\n },\n layout: {\n improvedLayout: false,\n hierarchical: {\n nodeSpacing: 190, \n blockShifting: false,\n edgeMinimization: false,\n parentCentralization: true,\n sortMethod: 'directed',\n direction: 'UD',\n // work on vis current version\n // nodeSpacing: 190,\n // blockShifting: false,\n // edgeMinimization: false,\n // parentCentralization: true,\n // sortMethod: 'hubsize',\n // direction: 'UD',\n }\n }, \n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true,\n },\n physics: {\n enabled: false,\n },\n nodes: {\n shape: 'dot',\n font: {\n size: 10,\n },\n }\n };\n \n const graph = {\n nodes : nodes,\n edges : edges,\n };\n\n class VisNetwork extends Component {\n \n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true;\n } else {\n return false;\n }\n }\n \n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", (params) => {\n //console.log(params);\n if (params.nodes){\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n \n });\n }\n \n // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n \n render() { \n return (\n
\n
\n
\n );\n }\n }\n\n this.updateVisNodes(nodes);\n \n return ;\n\n }\n\n\n \n\n \n\n \n \n\n \n\n}\n\nconst experimentStyle = {\n height: 600\n };\n\nexport default GraphNativeRep;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/1b062f5a4d4b50cb5f5f9e787269199a.json b/node_modules/.cache/babel-loader/1b062f5a4d4b50cb5f5f9e787269199a.json new file mode 100644 index 0000000000000000000000000000000000000000..c6b734e3b4ce2e44fa00d6bfe59027496b8e58d7 --- /dev/null +++ b/node_modules/.cache/babel-loader/1b062f5a4d4b50cb5f5f9e787269199a.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js\";\nimport React, { Component } from \"react\"; // import vis from \"vis-network\";\n\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n constructor(...args) {\n super(...args);\n\n this.updateVisNodes = nodes => {\n this.props.setVisData(nodes);\n };\n }\n\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else if (nextProps.data && this.props.data && nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp) {\n console.log(\"Rerendering\");\n return true;\n } else if (nextProps.loadingGraph !== this.props.loadingGraph) {\n return true;\n } else {\n return false;\n }\n }\n\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n render() {\n if (this.props.loadingGraph) return React.createElement(Spinner, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 32\n },\n __self: this\n });\n\n if (this.props.data == null) {\n return React.createElement(\"div\", {\n className: \"card-body text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 35\n },\n __self: this\n }, React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Press \", React.createElement(\"span\", {\n className: \"badge badge-info\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Show Graph\"), \" to see the graph representation of the experiment.\"), React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"If the experiment is running, press \", React.createElement(\"span\", {\n className: \"badge badge-dark\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"Start Job Monitor\"), \" to start a live tracker of the changes on the experiment's jobs. This process will automatically update the graph's nodes colors and show a log of the detected changes.\"));\n }\n\n var nodes_array = [];\n var edges_array = [];\n\n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: {\n background: node.status_color,\n border: \"black\"\n },\n level: node.level\n }));\n this.props.data.edges.map(edge => edges_array.push({\n from: edge.from,\n to: edge.to\n }));\n }\n\n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n const options = {\n edges: {\n arrows: {\n to: {\n enabled: true\n }\n }\n },\n layout: {\n //improvedLayout: true,\n hierarchical: {\n nodeSpacing: 190,\n treeSpacing: 200,\n blockShifting: true,\n edgeMinimization: false,\n parentCentralization: false,\n sortMethod: 'hubsize',\n direction: 'UD'\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true\n },\n physics: {\n enabled: false\n },\n nodes: {\n shape: 'dot',\n font: {\n size: 10\n }\n }\n };\n const graph = {\n nodes: nodes,\n edges: edges\n };\n\n class VisNetwork extends Component {\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else {\n return false;\n }\n }\n\n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", params => {\n //console.log(params);\n if (params.nodes) {\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n });\n } // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n\n\n render() {\n return React.createElement(\"div\", {\n className: \"card-body p-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 134\n },\n __self: this\n }, React.createElement(\"div\", {\n ref: \"myRef\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 135\n },\n __self: this\n }));\n }\n\n }\n\n this.updateVisNodes(nodes);\n return React.createElement(VisNetwork, {\n graph: graph,\n options: options,\n updateSelection: this.props.updateSelection,\n shouldUpdateGraph: this.props.shouldUpdateGraph,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 143\n },\n __self: this\n });\n }\n\n}\n\nconst experimentStyle = {\n height: 600\n};\nexport default GraphNativeRep;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js"],"names":["React","Component","Spinner","vis","GraphNativeRep","updateVisNodes","nodes","props","setVisData","shouldComponentUpdate","nextProps","nextState","shouldUpdateGraph","data","pkl_timestamp","console","log","loadingGraph","componentWillUnmount","cleanGraphData","render","nodes_array","edges_array","edges","map","node","push","id","label","color","background","status_color","border","level","edge","from","to","DataSet","options","arrows","enabled","layout","hierarchical","nodeSpacing","treeSpacing","blockShifting","edgeMinimization","parentCentralization","sortMethod","direction","interaction","dragNodes","hoverConnectedEdges","navigationButtons","physics","shape","font","size","graph","VisNetwork","componentDidMount","network","Network","refs","myRef","on","params","updateSelection","experimentStyle","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,SAAhB,QAAiC,OAAjC,C,CACA;;AACA,OAAOC,OAAP,MAAoB,mBAApB;AACA,OAAOC,GAAP,MAAgB,KAAhB;;AAEA,MAAMC,cAAN,SAA6BH,SAA7B,CAAuC;AAAA;AAAA;;AAAA,SAmBnCI,cAnBmC,GAmBjBC,KAAD,IAAW;AACxB,WAAKC,KAAL,CAAWC,UAAX,CAAsBF,KAAtB;AACH,KArBkC;AAAA;;AAEnCG,EAAAA,qBAAqB,CAACC,SAAD,EAAYC,SAAZ,EAAsB;AACvC,QAAI,KAAKJ,KAAL,CAAWK,iBAAX,KAAiC,IAArC,EAA0C;AACtC,aAAO,IAAP;AACD,KAFH,MAEQ,IAAIF,SAAS,CAACG,IAAV,IAAkB,KAAKN,KAAL,CAAWM,IAA7B,IAAsCH,SAAS,CAACG,IAAV,CAAeC,aAAf,KAAiC,KAAKP,KAAL,CAAWM,IAAX,CAAgBC,aAA3F,EAA0G;A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;;AAoCnC,SAAK/D,cAAL,CAAoBC,KAApB;AAEA,WAAO,oBAAC,UAAD;AACH,MAAA,KAAK,EAAEoD,KADJ;AAEH,MAAA,OAAO,EAAEpB,OAFN;AAGH,MAAA,eAAe,EAAE,KAAK/B,KAAL,CAAW4D,eAHzB;AAIH,MAAA,iBAAiB,EAAE,KAAK5D,KAAL,CAAWK,iBAJ3B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAAP;AAOH;;AAhJkC;;AA8JvC,MAAMwD,eAAe,GAAG;AACpBC,EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,eAAejE,cAAf","sourcesContent":["import React, { Component } from \"react\";\n// import vis from \"vis-network\";\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n\n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true\n }else if (nextProps.data && this.props.data && (nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp)){\n console.log(\"Rerendering\")\n return true;\n }else if (nextProps.loadingGraph !== this.props.loadingGraph){\n return true; \n }else{\n return false;\n }\n }\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n updateVisNodes = (nodes) => {\n this.props.setVisData(nodes);\n }\n\n\n\n render () {\n if (this.props.loadingGraph) return ;\n if (this.props.data == null){\n return (\n
\n

Press Show Graph to see the graph representation of the experiment.

\n

If the experiment is running, press Start Job Monitor to start a live tracker of the changes on the experiment's jobs.\n This process will automatically update the graph's nodes colors and show a log of the detected changes.\n

\n
\n );\n }\n\n var nodes_array = [];\n var edges_array = [];\n \n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: { background: node.status_color, border: \"black\" },\n level: node.level,\n })\n );\n \n this.props.data.edges.map(edge => \n edges_array.push({ from: edge.from, to: edge.to })\n );\n }\n \n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n\n\n const options = {\n edges: {\n arrows: {\n to: { enabled: true }\n }\n },\n layout: {\n //improvedLayout: true,\n hierarchical: {\n nodeSpacing: 190,\n treeSpacing: 200,\n blockShifting: true,\n edgeMinimization: false,\n parentCentralization: false,\n sortMethod: 'hubsize',\n direction: 'UD',\n }\n }, \n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true,\n },\n physics: {\n enabled: false,\n },\n nodes: {\n shape: 'dot',\n font: {\n size: 10,\n },\n }\n };\n \n const graph = {\n nodes : nodes,\n edges : edges,\n };\n\n class VisNetwork extends Component {\n \n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true;\n } else {\n return false;\n }\n }\n \n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", (params) => {\n //console.log(params);\n if (params.nodes){\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n \n });\n }\n \n // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n \n render() { \n return (\n
\n
\n
\n );\n }\n }\n\n this.updateVisNodes(nodes);\n \n return ;\n\n }\n\n\n \n\n \n\n \n \n\n \n\n}\n\nconst experimentStyle = {\n height: 600\n };\n\nexport default GraphNativeRep;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/1cc1208f7c80dde520360cf37dfd56d2.json b/node_modules/.cache/babel-loader/1cc1208f7c80dde520360cf37dfd56d2.json new file mode 100644 index 0000000000000000000000000000000000000000..1b0b09cbbd6571d6afbad9445f5a44399327fbbf --- /dev/null +++ b/node_modules/.cache/babel-loader/1cc1208f7c80dde520360cf37dfd56d2.json @@ -0,0 +1 @@ +{"ast":null,"code":"import _slicedToArray from \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/node_modules/@babel/runtime/helpers/esm/slicedToArray\";\nvar _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/context/experiment/ExperimentState.js\";\nimport React, { useReducer } from 'react';\nimport axios from 'axios';\nimport ExperimentContext from './experimentContext';\nimport ExperimentReducer from './experimentReducer';\nimport { SEARCH_EXPERIMENTS, SET_LOADING, CLEAR_EXPERIMENTS, GET_EXPERIMENT, GET_GRAPH, SET_LOADING_GRAPH, CLEAN_GRAPH_DATA, UPDATE_SELECTION, GET_EXPERIMENT_RUN, SET_LOADING_RUN, CLEAN_RUN_DATA, SET_AUTOUPDATE_RUN, GET_PKL_DATA, SET_LOADING_PKL, UPDATE_NODES, SHOULD_UPDATE_GRAPH, SET_AUTOUPDATE_PKL, CLEAN_PKL_DATA, SET_PKL_CHANGES, UPDATE_EXPERIMENT_TS, SET_VIS_DATA } from '../types';\n\nconst ExperimentState = props => {\n const initialState = {\n experiments: [],\n experiment: {},\n loading: false,\n data: null,\n rundata: null,\n pkldata: null,\n pklchanges: null,\n loadingGraph: false,\n loadingRun: false,\n loadingPkl: false,\n selection: null,\n enabledGraphSearch: true,\n startAutoUpdateRun: false,\n startAutoUpdatePkl: false,\n shouldUpdateGraph: false,\n visNodes: null\n };\n\n const _useReducer = useReducer(ExperimentReducer, initialState),\n _useReducer2 = _slicedToArray(_useReducer, 2),\n state = _useReducer2[0],\n dispatch = _useReducer2[1]; // Search Experiments\n\n\n const searchExperiments = async text => {\n setLoading();\n const res = await axios.get(\"http://84.88.185.30:8888/search/\".concat(text));\n dispatch({\n type: SEARCH_EXPERIMENTS,\n payload: res.data.experiment\n });\n }; // Get Experiment\n\n\n const getExperiment = async expid => {\n setLoading(); //cleanGraphData();\n\n const res = await axios.get(\"http://84.88.185.30:8888/expinfo/\".concat(expid));\n dispatch({\n type: GET_EXPERIMENT,\n payload: res.data\n });\n }; // Get Experiment Graph\n\n\n const getExperimentGraph = async expid => {\n setLoadingGraph();\n const res = await axios.get(\"http://84.88.185.30:8888/graph/\".concat(expid));\n console.log(res.data);\n dispatch({\n type: GET_GRAPH,\n payload: res.data\n }); //this.setState({ data: res.data, loading: false, showGraph: !res.data.error });\n }; // Get Experiment Run\n\n\n const getExperimentRun = async expid => {\n setLoadingRun();\n const res = await axios.get(\"http://84.88.185.30:8888/exprun/\".concat(expid));\n console.log(res.data);\n dispatch({\n type: GET_EXPERIMENT_RUN,\n payload: res.data\n });\n }; // Get Experiment Pkl Data\n\n\n const getExperimentPkl = async (expid, timeStamp) => {\n setLoadingPkl(); //timeStamp = 1000;\n\n const res = await axios.get(\"http://84.88.185.30:8888/pklinfo/\".concat(expid, \"/\").concat(timeStamp));\n console.log(res.data); // const actualPkl = res.data;\n\n let retrievedPkl = null;\n var jobs = {};\n var colorChanges = {};\n var changes = \"\";\n retrievedPkl = res.data;\n\n if (state.data !== null && retrievedPkl.has_changed === true && retrievedPkl.pkl_content.length > 0) {\n //console.log(retrievedPkl.pkl_content.length);\n for (var j = 0, job; j < retrievedPkl.pkl_content.length; j++) {\n job = retrievedPkl.pkl_content[j]; //console.log(job);\n\n jobs[job.name] = job; //console.log(jobs[job.name]);\n }\n\n let requireUpdate = false;\n console.log('Current ts: ' + state.data.pkl_timestamp);\n var newData = state.data; //console.log(newData.nodes);\n\n var expData = state.experiment;\n\n if (newData.nodes) {\n for (var i = 0; i < newData.nodes.length; i++) {\n // console.log(newNodes[i].id);\n //console.log(newData.nodes[i]);\n // console.log(jobs[ newNodes[i].id ]);\n if (newData.nodes[i].status_code !== jobs[newData.nodes[i].id].status_code) {\n // changes += newData.nodes[i].id + \" from \" + newData.nodes[i].status + \" to \" + jobs[ newData.nodes[i].id ].status + \" || \";\n changes += timeStampToDate(retrievedPkl.pkl_timestamp) + \": \" + newData.nodes[i].id + \" to \" + jobs[newData.nodes[i].id].status + \"\\n\";\n newData.nodes[i].status_code = jobs[newData.nodes[i].id].status_code;\n newData.nodes[i].status_color = jobs[newData.nodes[i].id].status_color;\n newData.nodes[i].status = jobs[newData.nodes[i].id].status; //console.log(newData.nodes[i].status_color)\n\n colorChanges[newData.nodes[i].id] = jobs[newData.nodes[i].id].status_color;\n requireUpdate = true;\n }\n }\n\n if (requireUpdate) {\n // console.log(newData.pkl_timestamp);\n // console.log(expData.pkl_timestamp);\n console.log(\"New ts: \" + retrievedPkl.pkl_timestamp);\n newData.pkl_timestamp = retrievedPkl.pkl_timestamp;\n expData.pkl_timestamp = retrievedPkl.pkl_timestamp; // console.log(newData.pkl_timestamp);\n // console.log(expData.pkl_timestamp);\n // console.log('Call Update');\n\n updateNodes(newData);\n updateExperimentTimeStamp(expData); // setUpdateGraph(true);\n // setUpdateGraph(false);\n\n if (state.pklchanges) {\n setPklChanges(changes + state.pklchanges);\n } else {\n setPklChanges(changes);\n }\n\n for (var key in colorChanges) {\n //console.log( key, colorChanges[key] );\n updateGraphColor(key, colorChanges[key]);\n }\n } else {\n console.log('No changes but updating pkl anyway.');\n expData.pkl_timestamp = retrievedPkl.pkl_timestamp;\n updateExperimentTimeStamp(expData);\n }\n }\n } // } else {\n // var t = new Date( retrievedPkl.pkl_timestamp );\n // var formatted = t.toISOString();\n // setPklChanges(\"No news yet... \" + formatted)\n // }\n\n\n dispatch({\n type: GET_PKL_DATA,\n payload: res.data\n });\n };\n\n const updateGraphColor = (idChange, newColor) => {\n this.state.visNodes.update({\n id: idChange,\n color: {\n background: newColor\n }\n });\n }; // Cleaning\n\n\n const clearExperiments = () => dispatch({\n type: CLEAR_EXPERIMENTS\n });\n\n const cleanGraphData = () => dispatch({\n type: CLEAN_GRAPH_DATA\n });\n\n const cleanRunData = () => dispatch({\n type: CLEAN_RUN_DATA\n });\n\n const cleanPklData = () => dispatch({\n type: CLEAN_PKL_DATA\n }); // Set Loading\n\n\n const setLoading = () => dispatch({\n type: SET_LOADING\n });\n\n const setLoadingGraph = () => dispatch({\n type: SET_LOADING_GRAPH\n });\n\n const setLoadingRun = () => dispatch({\n type: SET_LOADING_RUN\n });\n\n const setLoadingPkl = () => dispatch({\n type: SET_LOADING_PKL\n }); // Action Things\n\n\n const updateSelection = currentSelection => dispatch({\n type: UPDATE_SELECTION,\n payload: currentSelection\n });\n\n const updateNodes = newdata => dispatch({\n type: UPDATE_NODES,\n payload: newdata\n });\n\n const updateExperimentTimeStamp = newExperiment => dispatch({\n type: UPDATE_EXPERIMENT_TS,\n payload: newExperiment\n });\n\n const setAutoUpdateRun = value => dispatch({\n type: SET_AUTOUPDATE_RUN,\n payload: value\n });\n\n const setAutoUpdatePkl = value => dispatch({\n type: SET_AUTOUPDATE_PKL,\n payload: value\n });\n\n const setUpdateGraph = value => dispatch({\n type: SHOULD_UPDATE_GRAPH,\n payload: value\n });\n\n const setPklChanges = value => dispatch({\n type: SET_PKL_CHANGES,\n payload: value\n });\n\n const setVisData = value => dispatch({\n type: SET_VIS_DATA,\n payload: value\n }); // Other Utils\n\n\n const hashCode = value => {\n var hash = 0,\n i,\n chr;\n if (value.length === 0) return hash;\n\n for (i = 0; i < value.length; i++) {\n chr = value.charCodeAt(i);\n hash = (hash << 5) - hash + chr;\n hash |= 0; // Convert to 32bit integer\n }\n\n console.log(hash);\n return hash;\n };\n\n const timeStampToDate = value => {\n //console.log('Setting new format: ' + value);\n let formattedDate = \"\";\n var date = new Date(value * 1000);\n var hours = date.getHours();\n var minutes = \"0\" + date.getMinutes();\n var seconds = \"0\" + date.getSeconds();\n formattedDate = hours + ':' + minutes.substr(-2) + ':' + seconds.substr(-2); // formattedDate = date.toISOString();\n\n return formattedDate;\n };\n\n return React.createElement(ExperimentContext.Provider, {\n value: {\n experiments: state.experiments,\n experiment: state.experiment,\n loading: state.loading,\n loadingGraph: state.loadingGraph,\n loadingRun: state.loadingRun,\n loadingPkl: state.loadingPkl,\n data: state.data,\n rundata: state.rundata,\n pklchanges: state.pklchanges,\n selection: state.selection,\n enabledGraphSearch: state.enabledGraphSearch,\n startAutoUpdateRun: state.startAutoUpdateRun,\n startAutoUpdatePkl: state.startAutoUpdatePkl,\n shouldUpdateGraph: state.shouldUpdateGraph,\n visNodes: state.visNodes,\n setAutoUpdateRun,\n setAutoUpdatePkl,\n searchExperiments,\n clearExperiments,\n getExperiment,\n getExperimentGraph,\n cleanGraphData,\n cleanRunData,\n cleanPklData,\n setPklChanges,\n updateSelection,\n getExperimentRun,\n getExperimentPkl,\n hashCode,\n timeStampToDate,\n setVisData,\n updateGraphColor\n },\n __source: {\n fileName: _jsxFileName,\n lineNumber: 241\n },\n __self: this\n }, props.children);\n};\n\nexport default ExperimentState;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/context/experiment/ExperimentState.js"],"names":["React","useReducer","axios","ExperimentContext","ExperimentReducer","SEARCH_EXPERIMENTS","SET_LOADING","CLEAR_EXPERIMENTS","GET_EXPERIMENT","GET_GRAPH","SET_LOADING_GRAPH","CLEAN_GRAPH_DATA","UPDATE_SELECTION","GET_EXPERIMENT_RUN","SET_LOADING_RUN","CLEAN_RUN_DATA","SET_AUTOUPDATE_RUN","GET_PKL_DATA","SET_LOADING_PKL","UPDATE_NODES","SHOULD_UPDATE_GRAPH","SET_AUTOUPDATE_PKL","CLEAN_PKL_DATA","SET_PKL_CHANGES","UPDATE_EXPERIMENT_TS","SET_VIS_DATA","ExperimentState","props","initialState","experiments","experiment","loading","data","rundata","pkldata","pklchanges","loadingGraph","loadingRun","loadingPkl","selection","enabledGraphSearch","startAutoUpdateRun","startAutoUpdatePkl","shouldUpdateGraph","visNodes","state","dispatch","searchExperiments","text","setLoading","res","get","type","payload","getExperiment","expid","getExperimentGraph","setLoadingGraph","console","log","getExperimentRun","setLoadingRun","getExperimentPkl","timeStamp","setLoadingPkl","retrievedPkl","jobs","colorChanges","changes","has_changed","pkl_content","length","j","job","name","requireUpdate","pkl_timestamp","newData","expData","nodes","i","status_code","id","timeStampToDate","status","status_color","updateNodes","updateExperimentTimeStamp","setPklChanges","key","updateGraphColor","idChange","newColor","update","color","background","clearExperiments","cleanGraphData","cleanRunData","cleanPklData","updateSelection","currentSelection","newdata","newExperiment","setAutoUpdateRun","value","setAutoUpdatePkl","setUpdateGraph","setVisData","hashCode","hash","chr","charCodeAt","formattedDate","date","Date","hours","getHours","minutes","getMinutes","seconds","getSeconds","substr","children"],"mappings":";;AAAA,OAAOA,KAAP,IAAgBC,UAAhB,QAAkC,OAAlC;AACA,OAAOC,KAAP,MAAkB,OAAlB;AACA,OAAOC,iBAAP,MAA8B,qBAA9B;AACA,OAAOC,iBAAP,MAA8B,qBAA9B;AACA,SACEC,kBADF,EAEEC,WAFF,EAGEC,iBAHF,EAIEC,cAJF,EAKEC,SALF,EAMEC,iBANF,EAOEC,gBAPF,EAQEC,gBARF,EASEC,kBATF,EAUEC,eAVF,EAWEC,cAXF,EAYEC,kBAZF,EAaEC,YAbF,EAcEC,eAdF,EAeEC,YAfF,EAgBEC,mBAhBF,EAiBEC,kBAjBF,EAkBEC,cAlBF,EAmBEC,eAnBF,EAoBEC,oBApBF,EAqBEC,YArBF,QAsBO,UAtBP;;AAwBA,MAAMC,eAAe,GAAGC,KAAK,IAAI;AAC7B,QAAMC,YAAY,GAAG;AACjBC,IAAAA,WAAW,EAAE,EADI;AAEjBC,IAAAA,UAAU,EAAE,EAFK;AAGjBC,IAAAA,OAAO,EAAE,KAHQ;AAIjBC,IAAAA,IAAI,EAAE,IAJW;AAKjBC,IAAAA,OAAO,EAAE,IALQ;AAMjBC,IAAAA,OAAO,EAAE,IANQ;AAOjBC,IAAAA,UAAU,EAAE,IAPK;AAQjBC,IAAAA,YAAY,EAAE,KARG;AASjBC,IAAAA,UAAU,EAAE,KATK;AAUjBC,IAAAA,UAAU,EAAE,KAVK;AAWjBC,IAAAA,SAAS,EAAE,IAXM;AAYjBC,IAAAA,kBAAkB,EAAE,IAZH;AAajBC,IAAAA,kBAAkB,EAAE,KAbH;AAcjBC,IAAAA,kBAAkB,EAAE,KAdH;AAejBC,IAAAA,iBAAiB,EAAE,KAfF;AAgBjBC,IAAAA,QAAQ,EAAE;AAhBO,GAArB;;AAD6B,sBAoBH3C,UAAU,CAACG,iBAAD,E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SAVb;AAWJC,MAAAA,kBAAkB,EAAEK,KAAK,CAACL,kBAXtB;AAYJC,MAAAA,kBAAkB,EAAEI,KAAK,CAACJ,kBAZtB;AAaJC,MAAAA,kBAAkB,EAAEG,KAAK,CAACH,kBAbtB;AAcJC,MAAAA,iBAAiB,EAAEE,KAAK,CAACF,iBAdrB;AAeJC,MAAAA,QAAQ,EAAEC,KAAK,CAACD,QAfZ;AAgBJ4D,MAAAA,gBAhBI;AAiBJE,MAAAA,gBAjBI;AAkBJ3D,MAAAA,iBAlBI;AAmBJiD,MAAAA,gBAnBI;AAoBJ1C,MAAAA,aApBI;AAqBJE,MAAAA,kBArBI;AAsBJyC,MAAAA,cAtBI;AAuBJC,MAAAA,YAvBI;AAwBJC,MAAAA,YAxBI;AAyBJX,MAAAA,aAzBI;AA0BJY,MAAAA,eA1BI;AA2BJxC,MAAAA,gBA3BI;AA4BJE,MAAAA,gBA5BI;AA6BJ+C,MAAAA,QA7BI;AA8BJ1B,MAAAA,eA9BI;AA+BJyB,MAAAA,UA/BI;AAgCJlB,MAAAA;AAhCI,KADR;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KAmCK/D,KAAK,CAACgG,QAnCX,CADJ;AAuCH,CA1PD;;AA4PA,eAAejG,eAAf","sourcesContent":["import React, { useReducer } from 'react';\nimport axios from 'axios';\nimport ExperimentContext from './experimentContext';\nimport ExperimentReducer from './experimentReducer';\nimport {\n SEARCH_EXPERIMENTS,\n SET_LOADING,\n CLEAR_EXPERIMENTS,\n GET_EXPERIMENT,\n GET_GRAPH,\n SET_LOADING_GRAPH,\n CLEAN_GRAPH_DATA,\n UPDATE_SELECTION,\n GET_EXPERIMENT_RUN,\n SET_LOADING_RUN,\n CLEAN_RUN_DATA,\n SET_AUTOUPDATE_RUN,\n GET_PKL_DATA,\n SET_LOADING_PKL,\n UPDATE_NODES,\n SHOULD_UPDATE_GRAPH,\n SET_AUTOUPDATE_PKL,\n CLEAN_PKL_DATA,\n SET_PKL_CHANGES,\n UPDATE_EXPERIMENT_TS,\n SET_VIS_DATA,\n} from '../types';\n\nconst ExperimentState = props => {\n const initialState = {\n experiments: [],\n experiment: {},\n loading: false,\n data: null,\n rundata: null,\n pkldata: null,\n pklchanges: null,\n loadingGraph: false,\n loadingRun: false,\n loadingPkl: false,\n selection: null,\n enabledGraphSearch: true, \n startAutoUpdateRun: false, \n startAutoUpdatePkl: false,\n shouldUpdateGraph: false, \n visNodes: null, \n }\n\n const [state, dispatch] = useReducer(ExperimentReducer, initialState);\n\n // Search Experiments\n const searchExperiments = async text => {\n setLoading();\n const res = await axios.get(`http://84.88.185.30:8888/search/${text}`);\n dispatch({\n type: SEARCH_EXPERIMENTS,\n payload: res.data.experiment,\n });\n };\n\n // Get Experiment\n const getExperiment = async expid => {\n setLoading();\n //cleanGraphData();\n const res = await axios.get(`http://84.88.185.30:8888/expinfo/${expid}`); \n dispatch({\n type: GET_EXPERIMENT,\n payload: res.data,\n });\n };\n \n // Get Experiment Graph\n const getExperimentGraph = async expid => {\n setLoadingGraph();\n \n const res = await axios.get(`http://84.88.185.30:8888/graph/${expid}`);\n console.log(res.data);\n dispatch({\n type: GET_GRAPH,\n payload: res.data,\n });\n //this.setState({ data: res.data, loading: false, showGraph: !res.data.error });\n };\n\n // Get Experiment Run\n const getExperimentRun = async expid => {\n setLoadingRun();\n const res = await axios.get(`http://84.88.185.30:8888/exprun/${expid}`);\n console.log(res.data);\n dispatch({\n type: GET_EXPERIMENT_RUN,\n payload: res.data,\n });\n }\n\n // Get Experiment Pkl Data\n const getExperimentPkl = async (expid, timeStamp) => {\n setLoadingPkl();\n //timeStamp = 1000;\n const res = await axios.get(`http://84.88.185.30:8888/pklinfo/${expid}/${timeStamp}`);\n console.log(res.data);\n // const actualPkl = res.data;\n \n let retrievedPkl = null;\n var jobs = {};\n var colorChanges = {};\n var changes = \"\"\n retrievedPkl = res.data;\n if (state.data !== null && retrievedPkl.has_changed === true && retrievedPkl.pkl_content.length > 0){\n //console.log(retrievedPkl.pkl_content.length);\n for(var j = 0, job; j < retrievedPkl.pkl_content.length; j++){\n job = retrievedPkl.pkl_content[j];\n //console.log(job);\n jobs[ job.name ] = job;\n //console.log(jobs[job.name]);\n }\n let requireUpdate = false;\n console.log('Current ts: '+ state.data.pkl_timestamp); \n var newData = state.data;\n //console.log(newData.nodes);\n var expData = state.experiment;\n if (newData.nodes){\n for(var i = 0; i < newData.nodes.length; i++){\n // console.log(newNodes[i].id);\n //console.log(newData.nodes[i]);\n // console.log(jobs[ newNodes[i].id ]);\n\n if (newData.nodes[i].status_code !== jobs[ newData.nodes[i].id ].status_code){\n // changes += newData.nodes[i].id + \" from \" + newData.nodes[i].status + \" to \" + jobs[ newData.nodes[i].id ].status + \" || \";\n changes += timeStampToDate(retrievedPkl.pkl_timestamp) + \": \"+ newData.nodes[i].id + \" to \" + jobs[ newData.nodes[i].id ].status + \"\\n\";\n newData.nodes[i].status_code = jobs[ newData.nodes[i].id ].status_code;\n newData.nodes[i].status_color = jobs[ newData.nodes[i].id ].status_color;\n newData.nodes[i].status = jobs[ newData.nodes[i].id ].status;\n //console.log(newData.nodes[i].status_color)\n colorChanges[ newData.nodes[i].id ] = jobs[ newData.nodes[i].id ].status_color;\n requireUpdate = true;\n }\n }\n\n\n if (requireUpdate){ \n // console.log(newData.pkl_timestamp);\n // console.log(expData.pkl_timestamp);\n console.log(\"New ts: \" + retrievedPkl.pkl_timestamp)\n newData.pkl_timestamp = retrievedPkl.pkl_timestamp;\n expData.pkl_timestamp = retrievedPkl.pkl_timestamp;\n // console.log(newData.pkl_timestamp);\n // console.log(expData.pkl_timestamp);\n \n // console.log('Call Update');\n updateNodes(newData);\n updateExperimentTimeStamp(expData);\n // setUpdateGraph(true);\n // setUpdateGraph(false);\n if (state.pklchanges){\n setPklChanges(changes + state.pklchanges);\n } else {\n setPklChanges(changes);\n }\n\n for(var key in colorChanges) {\n //console.log( key, colorChanges[key] );\n updateGraphColor(key, colorChanges[key]);\n }\n \n \n } else { \n console.log('No changes but updating pkl anyway.')\n expData.pkl_timestamp = retrievedPkl.pkl_timestamp;\n updateExperimentTimeStamp(expData);\n }\n }\n }\n // } else {\n // var t = new Date( retrievedPkl.pkl_timestamp );\n // var formatted = t.toISOString();\n // setPklChanges(\"No news yet... \" + formatted)\n // }\n\n\n dispatch({\n type: GET_PKL_DATA,\n payload: res.data,\n });\n }\n\n const updateGraphColor = (idChange, newColor) => {\n this.state.visNodes.update({id:idChange, color: { background: newColor }});\n }\n\n\n // Cleaning\n const clearExperiments = () => dispatch({ type: CLEAR_EXPERIMENTS });\n const cleanGraphData = () => dispatch({ type: CLEAN_GRAPH_DATA });\n const cleanRunData = () => dispatch({ type: CLEAN_RUN_DATA });\n const cleanPklData = () => dispatch({ type: CLEAN_PKL_DATA });\n\n // Set Loading\n const setLoading = () => dispatch({ type: SET_LOADING });\n const setLoadingGraph = () => dispatch({ type: SET_LOADING_GRAPH });\n const setLoadingRun = () => dispatch({ type: SET_LOADING_RUN });\n const setLoadingPkl = () => dispatch({ type: SET_LOADING_PKL });\n\n\n // Action Things\n const updateSelection = (currentSelection) => dispatch({ type: UPDATE_SELECTION, payload: currentSelection });\n const updateNodes = (newdata) => dispatch({ type: UPDATE_NODES, payload: newdata });\n const updateExperimentTimeStamp = (newExperiment) => dispatch({ type: UPDATE_EXPERIMENT_TS, payload: newExperiment});\n const setAutoUpdateRun = (value) => dispatch({ type: SET_AUTOUPDATE_RUN, payload: value });\n const setAutoUpdatePkl = (value) => dispatch({ type: SET_AUTOUPDATE_PKL, payload: value });\n const setUpdateGraph = (value) => dispatch({ type: SHOULD_UPDATE_GRAPH, payload: value });\n const setPklChanges = (value) => dispatch({ type: SET_PKL_CHANGES, payload: value });\n const setVisData = (value) => dispatch({ type: SET_VIS_DATA, payload: value});\n\n // Other Utils\n const hashCode = (value) => {\n var hash = 0, i, chr;\n if (value.length === 0) return hash;\n for (i = 0; i < value.length; i++) {\n chr = value.charCodeAt(i);\n hash = ((hash << 5) - hash) + chr;\n hash |= 0; // Convert to 32bit integer\n }\n console.log(hash);\n return hash;\n };\n \n const timeStampToDate = (value) => {\n //console.log('Setting new format: ' + value);\n let formattedDate = \"\";\n var date = new Date( value * 1000);\n var hours = date.getHours();\n var minutes = \"0\" + date.getMinutes();\n var seconds = \"0\" + date.getSeconds();\n formattedDate = hours + ':' + minutes.substr(-2) + ':' + seconds.substr(-2);\n // formattedDate = date.toISOString();\n return formattedDate;\n }\n\n return (\n \n {props.children}\n \n );\n};\n\nexport default ExperimentState;"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/1cd2787fff5a18731803b0af205dae98.json b/node_modules/.cache/babel-loader/1cd2787fff5a18731803b0af205dae98.json new file mode 100644 index 0000000000000000000000000000000000000000..abc5cb516e5d44f01834dc92d688ca6328aed586 --- /dev/null +++ b/node_modules/.cache/babel-loader/1cd2787fff5a18731803b0af205dae98.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/Selection.js\";\nimport React, { useContext, Fragment } from 'react';\nimport ExperimentContext from '../context/experiment/experimentContext';\n\nconst Selection = () => {\n const experimentContext = useContext(ExperimentContext);\n const selection = experimentContext.selection,\n data = experimentContext.data,\n experiment = experimentContext.experiment; // const { model, branch, hpc } = experiment;\n //var currentSelection = \"Node: \"\n\n var currentNode = \"\";\n var selectedNode = null;\n\n if (selection) {\n //console.log(\"Current selection \" + selection)\n selection.map(node => // currentSelection += node + \", \"\n currentNode = node); //console.log(\"Current node \" + currentNode)\n\n selectedNode = data.nodes.find(node => node.id === currentNode); //console.log(\"Selected node\")\n //console.log(\"Data: \" + selectedNode.id + \" \" + selectedNode.platform_name)\n }\n\n return React.createElement(Fragment, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 23\n },\n __self: this\n }, selectedNode && React.createElement(Fragment, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 25\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 26\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-12\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 27\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"card text-white bg-info\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 28\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"card-header text-center p-0\",\n style: headerCard,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 29\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"mh-100 px-0 mx-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 30\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 31\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 31\n },\n __self: this\n }, selectedNode.id)))), React.createElement(\"div\", {\n className: \"card-body py-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 34\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 35\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Date:\"), \" \", selectedNode.date)), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 38\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 39\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-12\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 40\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 41\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 41\n },\n __self: this\n }, \"Section:\"), \" \", selectedNode.section)))), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 45\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 46\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-8 px-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 47\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 48\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 48\n },\n __self: this\n }, \"Platform:\"), \" \", selectedNode.platform_name && selectedNode.platform_name, \" \", !selectedNode.platform_name && experiment.hpc)), React.createElement(\"div\", {\n className: \"col-4 text-right\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 50\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 51\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 51\n },\n __self: this\n }, \"c:\", data.max_children, \"/p:\", data.max_parents))))), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 58\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 59\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-6\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 60\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 61\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 61\n },\n __self: this\n }, \"Processors:\"), \" \", selectedNode.processors)), React.createElement(\"div\", {\n className: \"col-6\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 63\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 64\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 64\n },\n __self: this\n }, \"Wallclock:\"), \" \", selectedNode.wallclock)))), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 68\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 69\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-6\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 70\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 71\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 71\n },\n __self: this\n }, \"Level:\"), \" \", selectedNode.level)), React.createElement(\"div\", {\n className: \"col-6\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 73\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 74\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 74\n },\n __self: this\n }, \"Out:\"), \" \", selectedNode.children, \" \", React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 74\n },\n __self: this\n }, \"In:\"), \" \", selectedNode.parents, \" \")))), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 79\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 80\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 80\n },\n __self: this\n }, \"Status:\")), \" \", selectedNode.status)))))), !selectedNode && data && React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 89\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-12\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 90\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"card text-white bg-info\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 91\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"card-header text-center py-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 92\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 93\n },\n __self: this\n }, \"Here goes the Job Id\")), React.createElement(\"div\", {\n className: \"card-body\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 95\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"text-center\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 96\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 97\n },\n __self: this\n }, \"Select a Node to see more information.\")))))));\n};\n\nconst experimentStyle = {\n height: 200\n};\nconst headerCard = {\n height: 30\n};\nexport default Selection;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/Selection.js"],"names":["React","useContext","Fragment","ExperimentContext","Selection","experimentContext","selection","data","experiment","currentNode","selectedNode","map","node","nodes","find","id","experimentStyle","headerCard","date","section","platform_name","hpc","max_children","max_parents","processors","wallclock","level","children","parents","status","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,UAAhB,EAA4BC,QAA5B,QAA4C,OAA5C;AACA,OAAOC,iBAAP,MAA8B,yCAA9B;;AAEA,MAAMC,SAAS,GAAG,MAAM;AACpB,QAAMC,iBAAiB,GAAGJ,UAAU,CAACE,iBAAD,CAApC;AADoB,QAEZG,SAFY,GAEoBD,iBAFpB,CAEZC,SAFY;AAAA,QAEDC,IAFC,GAEoBF,iBAFpB,CAEDE,IAFC;AAAA,QAEKC,UAFL,GAEoBH,iBAFpB,CAEKG,UAFL,EAGpB;AACA;;AACA,MAAIC,WAAW,GAAG,EAAlB;AACA,MAAIC,YAAY,GAAG,IAAn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A;AAAA;AAAA;AAAA;AAAA,KACI;AAAK,IAAA,SAAS,EAAC,yBAAf;AAAyC,IAAA,KAAK,EAAES,eAAhD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACI;AAAK,IAAA,SAAS,EAAC,8BAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACI;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,4BADJ,CADJ,EAII;AAAK,IAAA,SAAS,EAAC,WAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACI;AAAK,IAAA,SAAS,EAAC,aAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,8CADA,CADJ,CAJJ,CADJ,CADJ,CAlEZ,CADJ;AAuFH,CAzGD;;AA2GA,MAAMA,eAAe,GAAG;AACpBc,EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,MAAMb,UAAU,GAAG;AACfa,EAAAA,MAAM,EAAE;AADO,CAAnB;AAIA,eAAe1B,SAAf","sourcesContent":["import React, { useContext, Fragment } from 'react'\nimport ExperimentContext from '../context/experiment/experimentContext';\n\nconst Selection = () => {\n const experimentContext = useContext(ExperimentContext);\n const { selection, data, experiment } = experimentContext;\n // const { model, branch, hpc } = experiment;\n //var currentSelection = \"Node: \"\n var currentNode = \"\"\n var selectedNode = null\n if (selection) {\n //console.log(\"Current selection \" + selection)\n selection.map(node => (\n // currentSelection += node + \", \"\n currentNode = node\n ));\n //console.log(\"Current node \" + currentNode)\n selectedNode = data.nodes.find(node => node.id === currentNode) \n //console.log(\"Selected node\")\n //console.log(\"Data: \" + selectedNode.id + \" \" + selectedNode.platform_name)\n } \n return (\n \n {selectedNode &&\n \n
\n
\n
\n
\n
\n {selectedNode.id}\n
\n
\n
\n
\n Date: {selectedNode.date}\n
\n
\n
\n
\n Section: {selectedNode.section}\n
\n
\n
\n
\n
\n
\n Platform: {selectedNode.platform_name && selectedNode.platform_name} {!selectedNode.platform_name && experiment.hpc}\n
\n
\n c:{data.max_children}/p:{data.max_parents}\n
\n
\n
\n {/*
\n Priority: {selectedNode.priority}\n
*/}\n
\n
\n
\n Processors: {selectedNode.processors}\n
\n
\n Wallclock: {selectedNode.wallclock}\n
\n
\n
\n
\n
\n
\n Level: {selectedNode.level}\n
\n
\n Out: {selectedNode.children} In: {selectedNode.parents} \n
\n \n
\n
\n
\n Status: {selectedNode.status}\n
\n
\n
\n
\n
\n
\n } \n {!selectedNode && data &&\n
\n
\n
\n
\n Here goes the Job Id\n
\n
\n
\n Select a Node to see more information. \n
\n
\n
\n
\n
\n } \n
\n \n \n\n )\n}\n\nconst experimentStyle = {\n height: 200\n };\n\nconst headerCard = {\n height: 30\n}\n\nexport default Selection;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/1dc03a4986b3d82d4d23879181f61463.json b/node_modules/.cache/babel-loader/1dc03a4986b3d82d4d23879181f61463.json new file mode 100644 index 0000000000000000000000000000000000000000..88f1e12afef8237592f2f2ad79c3061b19e1d717 --- /dev/null +++ b/node_modules/.cache/babel-loader/1dc03a4986b3d82d4d23879181f61463.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js\";\nimport React, { useContext, Component } from \"react\"; // import vis from \"vis-network\";\n\nimport Spinner from \"../layout/Spinner\";\nimport ExperimentContext from '../context/experiment/experimentContext';\nimport vis from \"vis\";\n\nconst GraphNativeRep = () => {\n const experimentContext = useContext(ExperimentContext);\n const data = experimentContext.data,\n loadingGraph = experimentContext.loadingGraph,\n cleanGraphData = experimentContext.cleanGraphData,\n updateSelection = experimentContext.updateSelection;\n if (loadingGraph) return React.createElement(Spinner, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 11\n },\n __self: this\n });\n\n if (data === null) {\n return React.createElement(\"div\", {\n className: \"card-body text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 14\n },\n __self: this\n }, React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 15\n },\n __self: this\n }, \"Press \", React.createElement(\"span\", {\n className: \"badge badge-info\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 15\n },\n __self: this\n }, \"Show Graph\"), \" to see the graph representation of the experiment.\"), React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 16\n },\n __self: this\n }, \"If the experiment is running, press \", React.createElement(\"span\", {\n className: \"badge badge-dark\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 16\n },\n __self: this\n }, \"Start Job Monitor\"), \" to start a live tracker of the changes on the experiment's jobs. This process will automatically update the graph's nodes colors and show a log of the detected changes.\"));\n }\n\n var nodes_array = [];\n var edges_array = [];\n\n if (data.nodes !== null || data.edges !== null) {\n data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: {\n background: node.status_color,\n border: \"black\"\n } //level: node.priority,\n\n }));\n data.edges.map(edge => edges_array.push({\n from: edge.from,\n to: edge.to\n }));\n }\n\n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n const options = {\n edges: {\n arrows: {\n to: {\n enabled: true\n }\n }\n },\n layout: {\n improvedLayout: true,\n hierarchical: {\n nodeSpacing: 250,\n edgeMinimization: false,\n blockShifting: false,\n parentCentralization: false,\n direction: 'UD',\n sortMethod: 'directed'\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true\n },\n physics: {\n enabled: false\n },\n nodes: {\n shape: 'dot'\n }\n };\n const graph = {\n nodes: nodes,\n edges: edges\n };\n\n class VisNetwork extends Component {\n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, graph, options);\n network.on(\"click\", function (params) {\n console.log(params);\n\n if (params.nodes) {\n console.log(params.nodes[0].id);\n updateSelection(params.nodes[0].id);\n }\n });\n }\n\n componentWillUnmount() {\n cleanGraphData();\n }\n\n render() {\n return React.createElement(\"div\", {\n className: \"card-body p-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 101\n },\n __self: this\n }, React.createElement(\"div\", {\n ref: \"myRef\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 102\n },\n __self: this\n }));\n }\n\n }\n\n return React.createElement(VisNetwork, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 108\n },\n __self: this\n });\n};\n\nconst experimentStyle = {\n height: 600\n};\nexport default GraphNativeRep;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js"],"names":["React","useContext","Component","Spinner","ExperimentContext","vis","GraphNativeRep","experimentContext","data","loadingGraph","cleanGraphData","updateSelection","nodes_array","edges_array","nodes","edges","map","node","push","id","label","color","background","status_color","border","edge","from","to","DataSet","options","arrows","enabled","layout","improvedLayout","hierarchical","nodeSpacing","edgeMinimization","blockShifting","parentCentralization","direction","sortMethod","interaction","dragNodes","hoverConnectedEdges","navigationButtons","physics","shape","graph","VisNetwork","componentDidMount","network","Network","refs","myRef","on","params","console","log","componentWillUnmount","render","experimentStyle","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,UAAhB,EAA4BC,SAA5B,QAA6C,OAA7C,C,CACA;;AACA,OAAOC,OAAP,MAAoB,mBAApB;AACA,OAAOC,iBAAP,MAA8B,yCAA9B;AACA,OAAOC,GAAP,MAAgB,KAAhB;;AAEA,MAAMC,cAAc,GAAG,MAAM;AAEzB,QAAMC,iBAAiB,GAAGN,UAAU,CAACG,iBAAD,CAApC;AAFyB,QAGjBI,IAHiB,GAGuCD,iBAHvC,CAGjBC,IAHiB;AAAA,QAGXC,YAHW,GAGuCF,iBAHvC,CAGXE,YAHW;AAAA,QAGGC,cAHH,GAGuCH,iBAHvC,CAGGG,cAHH;AAAA,QAGmBC,eAHnB,GAGuCJ,iBAHvC,CAGmBI,eAHnB;AAI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ASC,MAAT,EAAiB;AACjCC,QAAAA,OAAO,CAACC,GAAR,CAAYF,MAAZ;;AACA,YAAIA,MAAM,CAACzC,KAAX,EAAiB;AACb0C,UAAAA,OAAO,CAACC,GAAR,CAAYF,MAAM,CAACzC,KAAP,CAAa,CAAb,EAAgBK,EAA5B;AACAR,UAAAA,eAAe,CAAC4C,MAAM,CAACzC,KAAP,CAAa,CAAb,EAAgBK,EAAjB,CAAf;AACH;AAEJ,OAPD;AAQH;;AAEDuC,IAAAA,oBAAoB,GAAG;AACnBhD,MAAAA,cAAc;AACjB;;AAEDiD,IAAAA,MAAM,GAAG;AACL,aACI;AAAK,QAAA,SAAS,EAAC,eAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,SACI;AAAK,QAAA,GAAG,EAAC,OAAT;AAAiB,QAAA,KAAK,EAAEC,eAAxB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,QADJ,CADJ;AAKH;;AAxB8B;;AA2BnC,SAAO,oBAAC,UAAD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAAP;AAEH,CAvGD;;AAyGA,MAAMA,eAAe,GAAG;AACpBC,EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,eAAevD,cAAf","sourcesContent":["import React, { useContext, Component } from \"react\";\n// import vis from \"vis-network\";\nimport Spinner from \"../layout/Spinner\";\nimport ExperimentContext from '../context/experiment/experimentContext';\nimport vis from \"vis\";\n\nconst GraphNativeRep = () => {\n\n const experimentContext = useContext(ExperimentContext); \n const { data, loadingGraph, cleanGraphData, updateSelection } = experimentContext;\n if (loadingGraph) return \n if (data === null) {\n return (\n
\n

Press Show Graph to see the graph representation of the experiment.

\n

If the experiment is running, press Start Job Monitor to start a live tracker of the changes on the experiment's jobs.\n This process will automatically update the graph's nodes colors and show a log of the detected changes.\n

\n
\n );\n }\n\n var nodes_array = [];\n var edges_array = [];\n\n if (data.nodes !== null || data.edges !== null) {\n data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: { background: node.status_color, border: \"black\" },\n //level: node.priority,\n })\n );\n \n data.edges.map(edge => \n edges_array.push({ from: edge.from, to: edge.to })\n );\n }\n\n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n\n const options = {\n edges: {\n arrows: {\n to: { enabled: true }\n }\n },\n layout: {\n improvedLayout: true,\n hierarchical: {\n \n nodeSpacing: 250,\n edgeMinimization: false,\n blockShifting: false,\n parentCentralization: false,\n direction: 'UD',\n sortMethod: 'directed',\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true,\n },\n physics: {\n enabled: false,\n },\n nodes: {\n shape: 'dot',\n }\n };\n\n const graph = {\n nodes : nodes,\n edges : edges,\n };\n \n\n class VisNetwork extends Component {\n \n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, graph, options);\n network.on(\"click\", function(params) {\n console.log(params);\n if (params.nodes){\n console.log(params.nodes[0].id);\n updateSelection(params.nodes[0].id);\n }\n \n });\n }\n\n componentWillUnmount() {\n cleanGraphData();\n }\n\n render() { \n return (\n
\n
\n
\n );\n }\n }\n\n return ;\n\n}\n\nconst experimentStyle = {\n height: 600\n };\n\nexport default GraphNativeRep;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/1e1e90dd2ae05054212ca15e86aaf481.json b/node_modules/.cache/babel-loader/1e1e90dd2ae05054212ca15e86aaf481.json new file mode 100644 index 0000000000000000000000000000000000000000..5b4b22c96ae277536876adf96ef17dbdcfba53a2 --- /dev/null +++ b/node_modules/.cache/babel-loader/1e1e90dd2ae05054212ca15e86aaf481.json @@ -0,0 +1 @@ +{"ast":null,"code":"import _slicedToArray from \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/node_modules/@babel/runtime/helpers/esm/slicedToArray\";\nvar _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/context/experiment/ExperimentState.js\";\nimport React, { useReducer } from 'react';\nimport axios from 'axios';\nimport ExperimentContext from './experimentContext';\nimport ExperimentReducer from './experimentReducer';\nimport { SEARCH_EXPERIMENTS, SET_LOADING, CLEAR_EXPERIMENTS, GET_EXPERIMENT, GET_GRAPH, SET_LOADING_GRAPH, CLEAN_GRAPH_DATA, UPDATE_SELECTION, GET_EXPERIMENT_RUN, SET_LOADING_RUN, CLEAN_RUN_DATA, SET_AUTOUPDATE_RUN, GET_PKL_DATA, SET_LOADING_PKL, UPDATE_NODES, SHOULD_UPDATE_GRAPH, SET_AUTOUPDATE_PKL, CLEAN_PKL_DATA, SET_PKL_CHANGES, UPDATE_EXPERIMENT_TS, SET_VIS_DATA } from '../types';\n\nconst ExperimentState = props => {\n const initialState = {\n experiments: [],\n experiment: {},\n loading: false,\n data: null,\n rundata: null,\n pkldata: null,\n pklchanges: null,\n loadingGraph: false,\n loadingRun: false,\n loadingPkl: false,\n selection: null,\n enabledGraphSearch: true,\n startAutoUpdateRun: false,\n startAutoUpdatePkl: false,\n shouldUpdateGraph: false,\n visNodes: null\n };\n\n const _useReducer = useReducer(ExperimentReducer, initialState),\n _useReducer2 = _slicedToArray(_useReducer, 2),\n state = _useReducer2[0],\n dispatch = _useReducer2[1]; // Search Experiments\n\n\n const searchExperiments = async text => {\n setLoading();\n const res = await axios.get(\"http://84.88.185.30:8888/search/\".concat(text));\n dispatch({\n type: SEARCH_EXPERIMENTS,\n payload: res.data.experiment\n });\n }; // Get Experiment\n\n\n const getExperiment = async expid => {\n setLoading(); //cleanGraphData();\n\n const res = await axios.get(\"http://84.88.185.30:8888/expinfo/\".concat(expid));\n dispatch({\n type: GET_EXPERIMENT,\n payload: res.data\n });\n }; // Get Experiment Graph\n\n\n const getExperimentGraph = async expid => {\n setLoadingGraph();\n const res = await axios.get(\"http://84.88.185.30:8888/graph/\".concat(expid));\n console.log(res.data);\n dispatch({\n type: GET_GRAPH,\n payload: res.data\n }); //this.setState({ data: res.data, loading: false, showGraph: !res.data.error });\n }; // Get Experiment Run\n\n\n const getExperimentRun = async expid => {\n setLoadingRun();\n const res = await axios.get(\"http://84.88.185.30:8888/exprun/\".concat(expid));\n console.log(res.data);\n dispatch({\n type: GET_EXPERIMENT_RUN,\n payload: res.data\n });\n }; // Get Experiment Pkl Data\n\n\n const getExperimentPkl = async (expid, timeStamp) => {\n setLoadingPkl(); //timeStamp = 1000;\n\n const res = await axios.get(\"http://84.88.185.30:8888/pklinfo/\".concat(expid, \"/\").concat(timeStamp));\n console.log(res.data); // const actualPkl = res.data;\n\n let retrievedPkl = null;\n var jobs = {};\n var changes = \"\";\n retrievedPkl = res.data;\n\n if (state.data !== null && retrievedPkl.has_changed === true && retrievedPkl.pkl_content.length > 0) {\n //console.log(retrievedPkl.pkl_content.length);\n for (var j = 0, job; j < retrievedPkl.pkl_content.length; j++) {\n job = retrievedPkl.pkl_content[j]; //console.log(job);\n\n jobs[job.name] = job; //console.log(jobs[job.name]);\n }\n\n let requireUpdate = false;\n console.log('Current ts: ' + state.data.pkl_timestamp);\n var newData = state.data; //console.log(newData.nodes);\n\n var expData = state.experiment;\n\n if (newData.nodes) {\n for (var i = 0; i < newData.nodes.length; i++) {\n // console.log(newNodes[i].id);\n //console.log(newData.nodes[i]);\n // console.log(jobs[ newNodes[i].id ]);\n if (newData.nodes[i].status_code !== jobs[newData.nodes[i].id].status_code) {\n // changes += newData.nodes[i].id + \" from \" + newData.nodes[i].status + \" to \" + jobs[ newData.nodes[i].id ].status + \" || \";\n changes += timeStampToDate(retrievedPkl.pkl_timestamp) + \": \" + newData.nodes[i].id + \" to \" + jobs[newData.nodes[i].id].status + \"\\n\";\n newData.nodes[i].status_code = jobs[newData.nodes[i].id].status_code;\n newData.nodes[i].status_color = jobs[newData.nodes[i].id].status_color;\n newData.nodes[i].status = jobs[newData.nodes[i].id].status; //console.log(newData.nodes[i].status_color)\n\n requireUpdate = true;\n }\n }\n\n if (requireUpdate) {\n // console.log(newData.pkl_timestamp);\n // console.log(expData.pkl_timestamp);\n console.log(\"New ts: \" + retrievedPkl.pkl_timestamp);\n newData.pkl_timestamp = retrievedPkl.pkl_timestamp;\n expData.pkl_timestamp = retrievedPkl.pkl_timestamp; // console.log(newData.pkl_timestamp);\n // console.log(expData.pkl_timestamp);\n // console.log('Call Update');\n\n updateNodes(newData);\n updateExperimentTimeStamp(expData); // setUpdateGraph(true);\n // setUpdateGraph(false);\n\n if (state.pklchanges) {\n setPklChanges(changes + state.pklchanges);\n } else {\n setPklChanges(changes);\n }\n } else {\n console.log('No changes but updating pkl anyway.');\n expData.pkl_timestamp = retrievedPkl.pkl_timestamp;\n updateExperimentTimeStamp(expData);\n }\n }\n } // } else {\n // var t = new Date( retrievedPkl.pkl_timestamp );\n // var formatted = t.toISOString();\n // setPklChanges(\"No news yet... \" + formatted)\n // }\n\n\n dispatch({\n type: GET_PKL_DATA,\n payload: res.data\n });\n };\n\n const updateGraphColor = (idChange, newColor) => {\n this.state.visNodes.update({\n id: idChange,\n color: {\n background: newColor\n }\n });\n }; // Cleaning\n\n\n const clearExperiments = () => dispatch({\n type: CLEAR_EXPERIMENTS\n });\n\n const cleanGraphData = () => dispatch({\n type: CLEAN_GRAPH_DATA\n });\n\n const cleanRunData = () => dispatch({\n type: CLEAN_RUN_DATA\n });\n\n const cleanPklData = () => dispatch({\n type: CLEAN_PKL_DATA\n }); // Set Loading\n\n\n const setLoading = () => dispatch({\n type: SET_LOADING\n });\n\n const setLoadingGraph = () => dispatch({\n type: SET_LOADING_GRAPH\n });\n\n const setLoadingRun = () => dispatch({\n type: SET_LOADING_RUN\n });\n\n const setLoadingPkl = () => dispatch({\n type: SET_LOADING_PKL\n }); // Action Things\n\n\n const updateSelection = currentSelection => dispatch({\n type: UPDATE_SELECTION,\n payload: currentSelection\n });\n\n const updateNodes = newdata => dispatch({\n type: UPDATE_NODES,\n payload: newdata\n });\n\n const updateExperimentTimeStamp = newExperiment => dispatch({\n type: UPDATE_EXPERIMENT_TS,\n payload: newExperiment\n });\n\n const setAutoUpdateRun = value => dispatch({\n type: SET_AUTOUPDATE_RUN,\n payload: value\n });\n\n const setAutoUpdatePkl = value => dispatch({\n type: SET_AUTOUPDATE_PKL,\n payload: value\n });\n\n const setUpdateGraph = value => dispatch({\n type: SHOULD_UPDATE_GRAPH,\n payload: value\n });\n\n const setPklChanges = value => dispatch({\n type: SET_PKL_CHANGES,\n payload: value\n });\n\n const setVisData = value => dispatch({\n type: SET_VIS_DATA,\n payload: value\n }); // Other Utils\n\n\n const hashCode = value => {\n var hash = 0,\n i,\n chr;\n if (value.length === 0) return hash;\n\n for (i = 0; i < value.length; i++) {\n chr = value.charCodeAt(i);\n hash = (hash << 5) - hash + chr;\n hash |= 0; // Convert to 32bit integer\n }\n\n console.log(hash);\n return hash;\n };\n\n const timeStampToDate = value => {\n //console.log('Setting new format: ' + value);\n let formattedDate = \"\";\n var date = new Date(value * 1000);\n var hours = date.getHours();\n var minutes = \"0\" + date.getMinutes();\n var seconds = \"0\" + date.getSeconds();\n formattedDate = hours + ':' + minutes.substr(-2) + ':' + seconds.substr(-2); // formattedDate = date.toISOString();\n\n return formattedDate;\n };\n\n return React.createElement(ExperimentContext.Provider, {\n value: {\n experiments: state.experiments,\n experiment: state.experiment,\n loading: state.loading,\n loadingGraph: state.loadingGraph,\n loadingRun: state.loadingRun,\n loadingPkl: state.loadingPkl,\n data: state.data,\n rundata: state.rundata,\n pklchanges: state.pklchanges,\n selection: state.selection,\n enabledGraphSearch: state.enabledGraphSearch,\n startAutoUpdateRun: state.startAutoUpdateRun,\n startAutoUpdatePkl: state.startAutoUpdatePkl,\n shouldUpdateGraph: state.shouldUpdateGraph,\n setAutoUpdateRun,\n setAutoUpdatePkl,\n searchExperiments,\n clearExperiments,\n getExperiment,\n getExperimentGraph,\n cleanGraphData,\n cleanRunData,\n cleanPklData,\n setPklChanges,\n updateSelection,\n getExperimentRun,\n getExperimentPkl,\n hashCode,\n timeStampToDate,\n setVisData,\n updateGraphColor\n },\n __source: {\n fileName: _jsxFileName,\n lineNumber: 232\n },\n __self: this\n }, props.children);\n};\n\nexport default ExperimentState;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/context/experiment/ExperimentState.js"],"names":["React","useReducer","axios","ExperimentContext","ExperimentReducer","SEARCH_EXPERIMENTS","SET_LOADING","CLEAR_EXPERIMENTS","GET_EXPERIMENT","GET_GRAPH","SET_LOADING_GRAPH","CLEAN_GRAPH_DATA","UPDATE_SELECTION","GET_EXPERIMENT_RUN","SET_LOADING_RUN","CLEAN_RUN_DATA","SET_AUTOUPDATE_RUN","GET_PKL_DATA","SET_LOADING_PKL","UPDATE_NODES","SHOULD_UPDATE_GRAPH","SET_AUTOUPDATE_PKL","CLEAN_PKL_DATA","SET_PKL_CHANGES","UPDATE_EXPERIMENT_TS","SET_VIS_DATA","ExperimentState","props","initialState","experiments","experiment","loading","data","rundata","pkldata","pklchanges","loadingGraph","loadingRun","loadingPkl","selection","enabledGraphSearch","startAutoUpdateRun","startAutoUpdatePkl","shouldUpdateGraph","visNodes","state","dispatch","searchExperiments","text","setLoading","res","get","type","payload","getExperiment","expid","getExperimentGraph","setLoadingGraph","console","log","getExperimentRun","setLoadingRun","getExperimentPkl","timeStamp","setLoadingPkl","retrievedPkl","jobs","changes","has_changed","pkl_content","length","j","job","name","requireUpdate","pkl_timestamp","newData","expData","nodes","i","status_code","id","timeStampToDate","status","status_color","updateNodes","updateExperimentTimeStamp","setPklChanges","updateGraphColor","idChange","newColor","update","color","background","clearExperiments","cleanGraphData","cleanRunData","cleanPklData","updateSelection","currentSelection","newdata","newExperiment","setAutoUpdateRun","value","setAutoUpdatePkl","setUpdateGraph","setVisData","hashCode","hash","chr","charCodeAt","formattedDate","date","Date","hours","getHours","minutes","getMinutes","seconds","getSeconds","substr","children"],"mappings":";;AAAA,OAAOA,KAAP,IAAgBC,UAAhB,QAAkC,OAAlC;AACA,OAAOC,KAAP,MAAkB,OAAlB;AACA,OAAOC,iBAAP,MAA8B,qBAA9B;AAC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AAAA,UA9BI;AA+BJlB,MAAAA;AA/BI,KADR;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KAkCK7D,KAAK,CAAC8F,QAlCX,CADJ;AAsCH,CAhPD;;AAkPA,eAAe/F,eAAf","sourcesContent":["import React, { useReducer } from 'react';\nimport axios from 'axios';\nimport ExperimentContext from './experimentContext';\nimport ExperimentReducer from './experimentReducer';\nimport {\n SEARCH_EXPERIMENTS,\n SET_LOADING,\n CLEAR_EXPERIMENTS,\n GET_EXPERIMENT,\n GET_GRAPH,\n SET_LOADING_GRAPH,\n CLEAN_GRAPH_DATA,\n UPDATE_SELECTION,\n GET_EXPERIMENT_RUN,\n SET_LOADING_RUN,\n CLEAN_RUN_DATA,\n SET_AUTOUPDATE_RUN,\n GET_PKL_DATA,\n SET_LOADING_PKL,\n UPDATE_NODES,\n SHOULD_UPDATE_GRAPH,\n SET_AUTOUPDATE_PKL,\n CLEAN_PKL_DATA,\n SET_PKL_CHANGES,\n UPDATE_EXPERIMENT_TS,\n SET_VIS_DATA,\n} from '../types';\n\nconst ExperimentState = props => {\n const initialState = {\n experiments: [],\n experiment: {},\n loading: false,\n data: null,\n rundata: null,\n pkldata: null,\n pklchanges: null,\n loadingGraph: false,\n loadingRun: false,\n loadingPkl: false,\n selection: null,\n enabledGraphSearch: true, \n startAutoUpdateRun: false, \n startAutoUpdatePkl: false,\n shouldUpdateGraph: false, \n visNodes: null, \n }\n\n const [state, dispatch] = useReducer(ExperimentReducer, initialState);\n\n // Search Experiments\n const searchExperiments = async text => {\n setLoading();\n const res = await axios.get(`http://84.88.185.30:8888/search/${text}`);\n dispatch({\n type: SEARCH_EXPERIMENTS,\n payload: res.data.experiment,\n });\n };\n\n // Get Experiment\n const getExperiment = async expid => {\n setLoading();\n //cleanGraphData();\n const res = await axios.get(`http://84.88.185.30:8888/expinfo/${expid}`); \n dispatch({\n type: GET_EXPERIMENT,\n payload: res.data,\n });\n };\n \n // Get Experiment Graph\n const getExperimentGraph = async expid => {\n setLoadingGraph();\n \n const res = await axios.get(`http://84.88.185.30:8888/graph/${expid}`);\n console.log(res.data);\n dispatch({\n type: GET_GRAPH,\n payload: res.data,\n });\n //this.setState({ data: res.data, loading: false, showGraph: !res.data.error });\n };\n\n // Get Experiment Run\n const getExperimentRun = async expid => {\n setLoadingRun();\n const res = await axios.get(`http://84.88.185.30:8888/exprun/${expid}`);\n console.log(res.data);\n dispatch({\n type: GET_EXPERIMENT_RUN,\n payload: res.data,\n });\n }\n\n // Get Experiment Pkl Data\n const getExperimentPkl = async (expid, timeStamp) => {\n setLoadingPkl();\n //timeStamp = 1000;\n const res = await axios.get(`http://84.88.185.30:8888/pklinfo/${expid}/${timeStamp}`);\n console.log(res.data);\n // const actualPkl = res.data;\n \n let retrievedPkl = null;\n var jobs = {}\n var changes = \"\"\n retrievedPkl = res.data;\n if (state.data !== null && retrievedPkl.has_changed === true && retrievedPkl.pkl_content.length > 0){\n //console.log(retrievedPkl.pkl_content.length);\n for(var j = 0, job; j < retrievedPkl.pkl_content.length; j++){\n job = retrievedPkl.pkl_content[j];\n //console.log(job);\n jobs[ job.name ] = job;\n //console.log(jobs[job.name]);\n }\n let requireUpdate = false;\n console.log('Current ts: '+ state.data.pkl_timestamp); \n var newData = state.data;\n //console.log(newData.nodes);\n var expData = state.experiment;\n if (newData.nodes){\n for(var i = 0; i < newData.nodes.length; i++){\n // console.log(newNodes[i].id);\n //console.log(newData.nodes[i]);\n // console.log(jobs[ newNodes[i].id ]);\n\n if (newData.nodes[i].status_code !== jobs[ newData.nodes[i].id ].status_code){\n // changes += newData.nodes[i].id + \" from \" + newData.nodes[i].status + \" to \" + jobs[ newData.nodes[i].id ].status + \" || \";\n changes += timeStampToDate(retrievedPkl.pkl_timestamp) + \": \"+ newData.nodes[i].id + \" to \" + jobs[ newData.nodes[i].id ].status + \"\\n\";\n newData.nodes[i].status_code = jobs[ newData.nodes[i].id ].status_code;\n newData.nodes[i].status_color = jobs[ newData.nodes[i].id ].status_color;\n newData.nodes[i].status = jobs[ newData.nodes[i].id ].status;\n //console.log(newData.nodes[i].status_color)\n requireUpdate = true;\n }\n }\n if (requireUpdate){ \n // console.log(newData.pkl_timestamp);\n // console.log(expData.pkl_timestamp);\n console.log(\"New ts: \" + retrievedPkl.pkl_timestamp)\n newData.pkl_timestamp = retrievedPkl.pkl_timestamp;\n expData.pkl_timestamp = retrievedPkl.pkl_timestamp;\n // console.log(newData.pkl_timestamp);\n // console.log(expData.pkl_timestamp);\n \n // console.log('Call Update');\n updateNodes(newData);\n updateExperimentTimeStamp(expData);\n // setUpdateGraph(true);\n // setUpdateGraph(false);\n if (state.pklchanges){\n setPklChanges(changes + state.pklchanges);\n } else {\n setPklChanges(changes);\n }\n \n \n } else { \n console.log('No changes but updating pkl anyway.')\n expData.pkl_timestamp = retrievedPkl.pkl_timestamp;\n updateExperimentTimeStamp(expData);\n }\n }\n }\n // } else {\n // var t = new Date( retrievedPkl.pkl_timestamp );\n // var formatted = t.toISOString();\n // setPklChanges(\"No news yet... \" + formatted)\n // }\n\n\n dispatch({\n type: GET_PKL_DATA,\n payload: res.data,\n });\n }\n\n const updateGraphColor = (idChange, newColor) => {\n this.state.visNodes.update({id:idChange, color: { background: newColor }});\n }\n\n\n // Cleaning\n const clearExperiments = () => dispatch({ type: CLEAR_EXPERIMENTS });\n const cleanGraphData = () => dispatch({ type: CLEAN_GRAPH_DATA });\n const cleanRunData = () => dispatch({ type: CLEAN_RUN_DATA });\n const cleanPklData = () => dispatch({ type: CLEAN_PKL_DATA });\n\n // Set Loading\n const setLoading = () => dispatch({ type: SET_LOADING });\n const setLoadingGraph = () => dispatch({ type: SET_LOADING_GRAPH });\n const setLoadingRun = () => dispatch({ type: SET_LOADING_RUN });\n const setLoadingPkl = () => dispatch({ type: SET_LOADING_PKL });\n\n\n // Action Things\n const updateSelection = (currentSelection) => dispatch({ type: UPDATE_SELECTION, payload: currentSelection });\n const updateNodes = (newdata) => dispatch({ type: UPDATE_NODES, payload: newdata });\n const updateExperimentTimeStamp = (newExperiment) => dispatch({ type: UPDATE_EXPERIMENT_TS, payload: newExperiment});\n const setAutoUpdateRun = (value) => dispatch({ type: SET_AUTOUPDATE_RUN, payload: value });\n const setAutoUpdatePkl = (value) => dispatch({ type: SET_AUTOUPDATE_PKL, payload: value });\n const setUpdateGraph = (value) => dispatch({ type: SHOULD_UPDATE_GRAPH, payload: value });\n const setPklChanges = (value) => dispatch({ type: SET_PKL_CHANGES, payload: value });\n const setVisData = (value) => dispatch({ type: SET_VIS_DATA, payload: value});\n\n // Other Utils\n const hashCode = (value) => {\n var hash = 0, i, chr;\n if (value.length === 0) return hash;\n for (i = 0; i < value.length; i++) {\n chr = value.charCodeAt(i);\n hash = ((hash << 5) - hash) + chr;\n hash |= 0; // Convert to 32bit integer\n }\n console.log(hash);\n return hash;\n };\n \n const timeStampToDate = (value) => {\n //console.log('Setting new format: ' + value);\n let formattedDate = \"\";\n var date = new Date( value * 1000);\n var hours = date.getHours();\n var minutes = \"0\" + date.getMinutes();\n var seconds = \"0\" + date.getSeconds();\n formattedDate = hours + ':' + minutes.substr(-2) + ':' + seconds.substr(-2);\n // formattedDate = date.toISOString();\n return formattedDate;\n }\n\n return (\n \n {props.children}\n \n );\n};\n\nexport default ExperimentState;"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/1eb9b7bb802766baec59c3eb0239a3c7.json b/node_modules/.cache/babel-loader/1eb9b7bb802766baec59c3eb0239a3c7.json new file mode 100644 index 0000000000000000000000000000000000000000..8f021a3759a4aa89b43e1c4481e9e1539a7179f8 --- /dev/null +++ b/node_modules/.cache/babel-loader/1eb9b7bb802766baec59c3eb0239a3c7.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js\";\nimport React, { Component } from \"react\"; // import vis from \"vis-network\";\n\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n constructor(...args) {\n super(...args);\n\n this.updateVisNodes = nodes => {\n this.props.setVisData(nodes);\n };\n }\n\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else if (nextProps.data && this.props.data && nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp) {\n console.log(\"Rerendering\");\n return true;\n } else if (nextProps.loadingGraph !== this.props.loadingGraph) {\n return true;\n } else {\n return false;\n }\n }\n\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n render() {\n if (this.props.loadingGraph) return React.createElement(Spinner, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 32\n },\n __self: this\n });\n\n if (this.props.data == null) {\n return React.createElement(\"div\", {\n className: \"card-body text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 35\n },\n __self: this\n }, React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Press \", React.createElement(\"span\", {\n className: \"badge badge-info\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Show Graph\"), \" to see the graph representation of the experiment.\"), React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"If the experiment is running, press \", React.createElement(\"span\", {\n className: \"badge badge-dark\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"Start Job Monitor\"), \" to start a live tracker of the changes on the experiment's jobs. This process will automatically update the graph's nodes colors and show a log of the detected changes.\"));\n }\n\n var nodes_array = [];\n var edges_array = [];\n\n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: {\n background: node.status_color,\n border: \"black\"\n },\n level: node.level\n }));\n this.props.data.edges.map(edge => edges_array.push({\n from: edge.from,\n to: edge.to\n }));\n }\n\n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n const options = {\n edges: {\n arrows: {\n to: {\n enabled: true\n }\n }\n },\n layout: {\n //improvedLayout: true,\n hierarchical: {\n // enabled: true,\n nodeSpacing: 250,\n edgeMinimization: true,\n parentCentralization: true,\n direction: 'UD'\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true\n },\n physics: {\n enabled: false\n },\n nodes: {\n shape: 'dot'\n }\n };\n const graph = {\n nodes: nodes,\n edges: edges\n };\n\n class VisNetwork extends Component {\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else {\n return false;\n }\n }\n\n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", params => {\n //console.log(params);\n if (params.nodes) {\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n });\n } // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n\n\n render() {\n return React.createElement(\"div\", {\n className: \"card-body p-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 129\n },\n __self: this\n }, React.createElement(\"div\", {\n ref: \"myRef\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 130\n },\n __self: this\n }));\n }\n\n }\n\n this.updateVisNodes(nodes);\n return React.createElement(VisNetwork, {\n graph: graph,\n options: options,\n updateSelection: this.props.updateSelection,\n shouldUpdateGraph: this.props.shouldUpdateGraph,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 138\n },\n __self: this\n });\n }\n\n}\n\nconst experimentStyle = {\n height: 600\n};\nexport default GraphNativeRep;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js"],"names":["React","Component","Spinner","vis","GraphNativeRep","updateVisNodes","nodes","props","setVisData","shouldComponentUpdate","nextProps","nextState","shouldUpdateGraph","data","pkl_timestamp","console","log","loadingGraph","componentWillUnmount","cleanGraphData","render","nodes_array","edges_array","edges","map","node","push","id","label","color","background","status_color","border","level","edge","from","to","DataSet","options","arrows","enabled","layout","hierarchical","nodeSpacing","edgeMinimization","parentCentralization","direction","interaction","dragNodes","hoverConnectedEdges","navigationButtons","physics","shape","graph","VisNetwork","componentDidMount","network","Network","refs","myRef","on","params","updateSelection","experimentStyle","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,SAAhB,QAAiC,OAAjC,C,CACA;;AACA,OAAOC,OAAP,MAAoB,mBAApB;AACA,OAAOC,GAAP,MAAgB,KAAhB;;AAEA,MAAMC,cAAN,SAA6BH,SAA7B,CAAuC;AAAA;AAAA;;AAAA,SAmBnCI,cAnBmC,GAmBjBC,KAAD,IAAW;AACxB,WAAKC,KAAL,CAAWC,UAAX,CAAsBF,KAAtB;AACH,KArBkC;AAAA;;AAEnCG,EAAAA,qBAAqB,CAACC,SAAD,EAAYC,SAAZ,EAAsB;AACvC,QAAI,KAAKJ,KAAL,CAAWK,iBAAX,KAAiC,IAArC,EAA0C;AACtC,aAAO,IAAP;AACD,KAFH,MAEQ,IAAIF,SAAS,CAACG,IAAV,IAAkB,KAAKN,KAAL,CAAWM,IAA7B,IAAsCH,SAAS,CAACG,IAAV,CAAeC,aAAf,KAAiC,KAAKP,KAAL,CAAWM,IAAX,CAAgBC,aAA3F,EAA0G;AAC9GC,MAAAA,OAAO,CAACC,GAAR,CAAY,aAAZ;AACA,aAAO,IAAP;AACD,KAHK,MAGA,IAAIN,SAAS,CAACO,YAAV,KAA2B,KAAKV,KAAL,CAAWU,YAA1C,EAAuD;AAC3D,aAAO,IAAP;AACD,KAFK,MAED;AACH,aAAO,KAAP;AACD;AACN;;AACDC,EAAAA,oBAAoB,GAAG;AACnBH,IAAAA,OAAO,CAACC,GAAR,CAAY,YAAZ;AACA,SAAKT,KAAL,CAAWY,cAAX;AACH;;AAQDC,EAAAA,MAAM,GAAI;AAC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iBAAO,IAAP;AACH,SAFF,MAEQ;AACH,iBAAO,KAAP;AACH;AACJ;;AAED2C,MAAAA,iBAAiB,GAAG;AAChB,YAAIC,OAAO,GAAG,IAAIrD,GAAG,CAACsD,OAAR,CAAgB,KAAKC,IAAL,CAAUC,KAA1B,EAAiC,KAAKpD,KAAL,CAAW8C,KAA5C,EAAmD,KAAK9C,KAAL,CAAW+B,OAA9D,CAAd;AACAkB,QAAAA,OAAO,CAACI,EAAR,CAAW,OAAX,EAAqBC,MAAD,IAAY;AAC5B;AACA,cAAIA,MAAM,CAACvD,KAAX,EAAiB;AACb;AACA,iBAAKC,KAAL,CAAWuD,eAAX,CAA2BD,MAAM,CAACvD,KAAlC;AACH;AAEJ,SAPD;AAQH,OApB8B,CAsB/B;AACA;AACA;AACA;;;AAEAc,MAAAA,MAAM,GAAG;AACL,eACI;AAAK,UAAA,SAAS,EAAC,eAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,WACI;AAAK,UAAA,GAAG,EAAC,OAAT;AAAiB,UAAA,KAAK,EAAE2C,eAAxB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,UADJ,CADJ;AAKH;;AAjC8B;;AAoCnC,SAAK1D,cAAL,CAAoBC,KAApB;AAEA,WAAO,oBAAC,UAAD;AACH,MAAA,KAAK,EAAE+C,KADJ;AAEH,MAAA,OAAO,EAAEf,OAFN;AAGH,MAAA,eAAe,EAAE,KAAK/B,KAAL,CAAWuD,eAHzB;AAIH,MAAA,iBAAiB,EAAE,KAAKvD,KAAL,CAAWK,iBAJ3B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAAP;AAOH;;AA3IkC;;AAyJvC,MAAMmD,eAAe,GAAG;AACpBC,EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,eAAe5D,cAAf","sourcesContent":["import React, { Component } from \"react\";\n// import vis from \"vis-network\";\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n\n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true\n }else if (nextProps.data && this.props.data && (nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp)){\n console.log(\"Rerendering\")\n return true;\n }else if (nextProps.loadingGraph !== this.props.loadingGraph){\n return true; \n }else{\n return false;\n }\n }\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n updateVisNodes = (nodes) => {\n this.props.setVisData(nodes);\n }\n\n\n\n render () {\n if (this.props.loadingGraph) return ;\n if (this.props.data == null){\n return (\n
\n

Press Show Graph to see the graph representation of the experiment.

\n

If the experiment is running, press Start Job Monitor to start a live tracker of the changes on the experiment's jobs.\n This process will automatically update the graph's nodes colors and show a log of the detected changes.\n

\n
\n );\n }\n\n var nodes_array = [];\n var edges_array = [];\n \n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: { background: node.status_color, border: \"black\" },\n level: node.level,\n })\n );\n \n this.props.data.edges.map(edge => \n edges_array.push({ from: edge.from, to: edge.to })\n );\n }\n \n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n\n\n const options = {\n edges: {\n arrows: {\n to: { enabled: true }\n }\n },\n layout: {\n //improvedLayout: true,\n hierarchical: {\n // enabled: true,\n nodeSpacing: 250,\n edgeMinimization: true,\n parentCentralization: true,\n direction: 'UD',\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true,\n },\n physics: {\n enabled: false,\n },\n nodes: {\n shape: 'dot',\n }\n };\n \n const graph = {\n nodes : nodes,\n edges : edges,\n };\n\n class VisNetwork extends Component {\n \n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true;\n } else {\n return false;\n }\n }\n \n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", (params) => {\n //console.log(params);\n if (params.nodes){\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n \n });\n }\n \n // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n \n render() { \n return (\n
\n
\n
\n );\n }\n }\n\n this.updateVisNodes(nodes);\n \n return ;\n\n }\n\n\n \n\n \n\n \n \n\n \n\n}\n\nconst experimentStyle = {\n height: 600\n };\n\nexport default GraphNativeRep;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/1fc54b7e8cf5e384604a6ecd70f06cf0.json b/node_modules/.cache/babel-loader/1fc54b7e8cf5e384604a6ecd70f06cf0.json new file mode 100644 index 0000000000000000000000000000000000000000..c4106e329df6627654bf8eac5858d0098b0852e5 --- /dev/null +++ b/node_modules/.cache/babel-loader/1fc54b7e8cf5e384604a6ecd70f06cf0.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js\";\nimport React, { Component } from \"react\"; // import vis from \"vis-network\";\n\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n constructor(...args) {\n super(...args);\n\n this.updateVisNodes = nodes => {\n this.props.setVisData(nodes);\n };\n }\n\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else if (nextProps.data && this.props.data && nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp) {\n console.log(\"Rerendering\");\n return true;\n } else if (nextProps.loadingGraph !== this.props.loadingGraph) {\n return true;\n } else {\n return false;\n }\n }\n\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n render() {\n if (this.props.loadingGraph) return React.createElement(Spinner, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 32\n },\n __self: this\n });\n\n if (this.props.data == null) {\n return React.createElement(\"div\", {\n className: \"card-body text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 35\n },\n __self: this\n }, React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Press \", React.createElement(\"span\", {\n className: \"badge badge-info\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Show Graph\"), \" to see the graph representation of the experiment.\"), React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"If the experiment is running, press \", React.createElement(\"span\", {\n className: \"badge badge-dark\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"Start Job Monitor\"), \" to start a live tracker of the changes on the experiment's jobs. This process will automatically update the graph's nodes colors and show a log of the detected changes.\"));\n }\n\n var nodes_array = [];\n var edges_array = [];\n\n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: {\n background: node.status_color,\n border: \"black\"\n },\n level: node.level\n }));\n this.props.data.edges.map(edge => edges_array.push({\n from: edge.from,\n to: edge.to\n }));\n }\n\n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n const options = {\n edges: {\n arrows: {\n to: {\n enabled: true\n }\n }\n },\n layout: {\n //improvedLayout: true,\n hierarchical: {\n // enabled: true,\n nodeSpacing: 250,\n treeSpacing: 200,\n blockShifting: false,\n edgeMinimization: false,\n parentCentralization: true,\n direction: 'UD',\n sortMethod: 'directed'\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true\n },\n physics: {\n enabled: false\n },\n nodes: {\n shape: 'dot'\n }\n };\n const graph = {\n nodes: nodes,\n edges: edges\n };\n\n class VisNetwork extends Component {\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else {\n return false;\n }\n }\n\n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", params => {\n //console.log(params);\n if (params.nodes) {\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n });\n } // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n\n\n render() {\n return React.createElement(\"div\", {\n className: \"card-body p-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 132\n },\n __self: this\n }, React.createElement(\"div\", {\n ref: \"myRef\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 133\n },\n __self: this\n }));\n }\n\n }\n\n this.updateVisNodes(nodes);\n return React.createElement(VisNetwork, {\n graph: graph,\n options: options,\n updateSelection: this.props.updateSelection,\n shouldUpdateGraph: this.props.shouldUpdateGraph,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 141\n },\n __self: this\n });\n }\n\n}\n\nconst experimentStyle = {\n height: 600\n};\nexport default GraphNativeRep;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js"],"names":["React","Component","Spinner","vis","GraphNativeRep","updateVisNodes","nodes","props","setVisData","shouldComponentUpdate","nextProps","nextState","shouldUpdateGraph","data","pkl_timestamp","console","log","loadingGraph","componentWillUnmount","cleanGraphData","render","nodes_array","edges_array","edges","map","node","push","id","label","color","background","status_color","border","level","edge","from","to","DataSet","options","arrows","enabled","layout","hierarchical","nodeSpacing","treeSpacing","blockShifting","edgeMinimization","parentCentralization","direction","sortMethod","interaction","dragNodes","hoverConnectedEdges","navigationButtons","physics","shape","graph","VisNetwork","componentDidMount","network","Network","refs","myRef","on","params","updateSelection","experimentStyle","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,SAAhB,QAAiC,OAAjC,C,CACA;;AACA,OAAOC,OAAP,MAAoB,mBAApB;AACA,OAAOC,GAAP,MAAgB,KAAhB;;AAEA,MAAMC,cAAN,SAA6BH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A,cAAIA,MAAM,CAAC1D,KAAX,EAAiB;AACb;AACA,iBAAKC,KAAL,CAAW0D,eAAX,CAA2BD,MAAM,CAAC1D,KAAlC;AACH;AAEJ,SAPD;AAQH,OApB8B,CAsB/B;AACA;AACA;AACA;;;AAEAc,MAAAA,MAAM,GAAG;AACL,eACI;AAAK,UAAA,SAAS,EAAC,eAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,WACI;AAAK,UAAA,GAAG,EAAC,OAAT;AAAiB,UAAA,KAAK,EAAE8C,eAAxB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,UADJ,CADJ;AAKH;;AAjC8B;;AAoCnC,SAAK7D,cAAL,CAAoBC,KAApB;AAEA,WAAO,oBAAC,UAAD;AACH,MAAA,KAAK,EAAEkD,KADJ;AAEH,MAAA,OAAO,EAAElB,OAFN;AAGH,MAAA,eAAe,EAAE,KAAK/B,KAAL,CAAW0D,eAHzB;AAIH,MAAA,iBAAiB,EAAE,KAAK1D,KAAL,CAAWK,iBAJ3B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAAP;AAOH;;AA9IkC;;AA4JvC,MAAMsD,eAAe,GAAG;AACpBC,EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,eAAe/D,cAAf","sourcesContent":["import React, { Component } from \"react\";\n// import vis from \"vis-network\";\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n\n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true\n }else if (nextProps.data && this.props.data && (nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp)){\n console.log(\"Rerendering\")\n return true;\n }else if (nextProps.loadingGraph !== this.props.loadingGraph){\n return true; \n }else{\n return false;\n }\n }\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n updateVisNodes = (nodes) => {\n this.props.setVisData(nodes);\n }\n\n\n\n render () {\n if (this.props.loadingGraph) return ;\n if (this.props.data == null){\n return (\n
\n

Press Show Graph to see the graph representation of the experiment.

\n

If the experiment is running, press Start Job Monitor to start a live tracker of the changes on the experiment's jobs.\n This process will automatically update the graph's nodes colors and show a log of the detected changes.\n

\n
\n );\n }\n\n var nodes_array = [];\n var edges_array = [];\n \n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: { background: node.status_color, border: \"black\" },\n level: node.level,\n })\n );\n \n this.props.data.edges.map(edge => \n edges_array.push({ from: edge.from, to: edge.to })\n );\n }\n \n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n\n\n const options = {\n edges: {\n arrows: {\n to: { enabled: true }\n }\n },\n layout: {\n //improvedLayout: true,\n hierarchical: {\n // enabled: true,\n nodeSpacing: 250,\n treeSpacing: 200,\n blockShifting: false,\n edgeMinimization: false,\n parentCentralization: true,\n direction: 'UD',\n sortMethod: 'directed',\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true,\n },\n physics: {\n enabled: false,\n },\n nodes: {\n shape: 'dot',\n }\n };\n \n const graph = {\n nodes : nodes,\n edges : edges,\n };\n\n class VisNetwork extends Component {\n \n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true;\n } else {\n return false;\n }\n }\n \n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", (params) => {\n //console.log(params);\n if (params.nodes){\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n \n });\n }\n \n // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n \n render() { \n return (\n
\n
\n
\n );\n }\n }\n\n this.updateVisNodes(nodes);\n \n return ;\n\n }\n\n\n \n\n \n\n \n \n\n \n\n}\n\nconst experimentStyle = {\n height: 600\n };\n\nexport default GraphNativeRep;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/1fea3d06b93eec8415b13be1b17a937e.json b/node_modules/.cache/babel-loader/1fea3d06b93eec8415b13be1b17a937e.json new file mode 100644 index 0000000000000000000000000000000000000000..95c55067a1303a6ae34df7ed4a2727f37027248e --- /dev/null +++ b/node_modules/.cache/babel-loader/1fea3d06b93eec8415b13be1b17a937e.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js\";\nimport React, { Component } from \"react\"; // import vis from \"vis-network\";\n\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n constructor(...args) {\n super(...args);\n\n this.updateVisNodes = nodes => {\n this.props.setVisData(nodes);\n };\n }\n\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else if (nextProps.data && this.props.data && nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp) {\n console.log(\"Rerendering\");\n return true;\n } else if (nextProps.loadingGraph !== this.props.loadingGraph) {\n return true;\n } else {\n return false;\n }\n }\n\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n render() {\n if (this.props.loadingGraph) return React.createElement(Spinner, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 32\n },\n __self: this\n });\n\n if (this.props.data == null) {\n return React.createElement(\"div\", {\n className: \"card-body text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 35\n },\n __self: this\n }, React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Press \", React.createElement(\"span\", {\n className: \"badge badge-info\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Show Graph\"), \" to see the graph representation of the experiment.\"), React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"If the experiment is running, press \", React.createElement(\"span\", {\n className: \"badge badge-dark\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"Start Job Monitor\"), \" to start a live tracker of the changes on the experiment's jobs. This process will automatically update the graph's nodes colors and show a log of the detected changes.\"));\n }\n\n var nodes_array = [];\n var edges_array = [];\n\n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: {\n background: node.status_color,\n border: \"black\"\n } //level: node.level,\n\n }));\n this.props.data.edges.map(edge => edges_array.push({\n from: edge.from,\n to: edge.to\n }));\n }\n\n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n const options = {\n edges: {\n arrows: {\n to: {\n enabled: true\n }\n }\n },\n layout: {\n //improvedLayout: true,\n hierarchical: {\n // enabled: true,\n nodeSpacing: 250,\n edgeMinimization: false,\n blockShifting: true,\n parentCentralization: true,\n direction: 'UD',\n sortMethod: 'directed'\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true\n },\n physics: {\n enabled: false\n },\n nodes: {\n shape: 'dot'\n }\n };\n const graph = {\n nodes: nodes,\n edges: edges\n };\n\n class VisNetwork extends Component {\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else {\n return false;\n }\n }\n\n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", params => {\n //console.log(params);\n if (params.nodes) {\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n });\n } // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n\n\n render() {\n return React.createElement(\"div\", {\n className: \"card-body p-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 131\n },\n __self: this\n }, React.createElement(\"div\", {\n ref: \"myRef\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 132\n },\n __self: this\n }));\n }\n\n }\n\n this.updateVisNodes(nodes);\n return React.createElement(VisNetwork, {\n graph: graph,\n options: options,\n updateSelection: this.props.updateSelection,\n shouldUpdateGraph: this.props.shouldUpdateGraph,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 140\n },\n __self: this\n });\n }\n\n}\n\nconst experimentStyle = {\n height: 600\n};\nexport default GraphNativeRep;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js"],"names":["React","Component","Spinner","vis","GraphNativeRep","updateVisNodes","nodes","props","setVisData","shouldComponentUpdate","nextProps","nextState","shouldUpdateGraph","data","pkl_timestamp","console","log","loadingGraph","componentWillUnmount","cleanGraphData","render","nodes_array","edges_array","edges","map","node","push","id","label","color","background","status_color","border","edge","from","to","DataSet","options","arrows","enabled","layout","hierarchical","nodeSpacing","edgeMinimization","blockShifting","parentCentralization","direction","sortMethod","interaction","dragNodes","hoverConnectedEdges","navigationButtons","physics","shape","graph","VisNetwork","componentDidMount","network","Network","refs","myRef","on","params","updateSelection","experimentStyle","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,SAAhB,QAAiC,OAAjC,C,CACA;;AACA,OAAOC,OAAP,MAAoB,mBAApB;AACA,OAAOC,GAAP,MAAgB,KAAhB;;AAEA,MAAMC,cAAN,SAA6BH,SAA7B,CAAuC;AAAA;AAAA;;AAAA,SAmBnCI,cAnBmC,GAmBjBC,KAAD,IAAW;AACxB,WAAKC,KAAL,CAAWC,UAAX,CAAsBF,KAAtB;AACH,KArBkC;AAAA;;AAEnCG,EAAAA,qBAAqB,CAACC,SAAD,EAAYC,SAAZ,EAAsB;AACvC,QAAI,KAAKJ,KAAL,CAAWK,iBAAX,KAAiC,IAArC,EAA0C;AACtC,aAAO,IAAP;AACD,KAFH,MAEQ,IAAIF,SAAS,CAACG,IAAV,IAA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8B;;AAoCnC,SAAK3D,cAAL,CAAoBC,KAApB;AAEA,WAAO,oBAAC,UAAD;AACH,MAAA,KAAK,EAAEgD,KADJ;AAEH,MAAA,OAAO,EAAEjB,OAFN;AAGH,MAAA,eAAe,EAAE,KAAK9B,KAAL,CAAWwD,eAHzB;AAIH,MAAA,iBAAiB,EAAE,KAAKxD,KAAL,CAAWK,iBAJ3B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAAP;AAOH;;AA7IkC;;AA2JvC,MAAMoD,eAAe,GAAG;AACpBC,EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,eAAe7D,cAAf","sourcesContent":["import React, { Component } from \"react\";\n// import vis from \"vis-network\";\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n\n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true\n }else if (nextProps.data && this.props.data && (nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp)){\n console.log(\"Rerendering\")\n return true;\n }else if (nextProps.loadingGraph !== this.props.loadingGraph){\n return true; \n }else{\n return false;\n }\n }\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n updateVisNodes = (nodes) => {\n this.props.setVisData(nodes);\n }\n\n\n\n render () {\n if (this.props.loadingGraph) return ;\n if (this.props.data == null){\n return (\n
\n

Press Show Graph to see the graph representation of the experiment.

\n

If the experiment is running, press Start Job Monitor to start a live tracker of the changes on the experiment's jobs.\n This process will automatically update the graph's nodes colors and show a log of the detected changes.\n

\n
\n );\n }\n\n var nodes_array = [];\n var edges_array = [];\n \n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: { background: node.status_color, border: \"black\" },\n //level: node.level,\n })\n );\n \n this.props.data.edges.map(edge => \n edges_array.push({ from: edge.from, to: edge.to })\n );\n }\n \n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n\n\n const options = {\n edges: {\n arrows: {\n to: { enabled: true }\n }\n },\n layout: {\n //improvedLayout: true,\n hierarchical: {\n // enabled: true,\n nodeSpacing: 250,\n edgeMinimization: false,\n blockShifting: true,\n parentCentralization: true,\n direction: 'UD',\n sortMethod: 'directed',\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true,\n },\n physics: {\n enabled: false,\n },\n nodes: {\n shape: 'dot',\n }\n };\n \n const graph = {\n nodes : nodes,\n edges : edges,\n };\n\n class VisNetwork extends Component {\n \n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true;\n } else {\n return false;\n }\n }\n \n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", (params) => {\n //console.log(params);\n if (params.nodes){\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n \n });\n }\n \n // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n \n render() { \n return (\n
\n
\n
\n );\n }\n }\n\n this.updateVisNodes(nodes);\n \n return ;\n\n }\n\n\n \n\n \n\n \n \n\n \n\n}\n\nconst experimentStyle = {\n height: 600\n };\n\nexport default GraphNativeRep;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/2014224005fb7415385ca2dc80bcd816.json b/node_modules/.cache/babel-loader/2014224005fb7415385ca2dc80bcd816.json new file mode 100644 index 0000000000000000000000000000000000000000..27d9476ef56191920ecea11ebcc567a759fb08e4 --- /dev/null +++ b/node_modules/.cache/babel-loader/2014224005fb7415385ca2dc80bcd816.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js\";\nimport React, { Component } from \"react\"; // import vis from \"vis-network\";\n\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n constructor(...args) {\n super(...args);\n\n this.updateVisNodes = nodes => {\n this.props.setVisData(nodes);\n };\n }\n\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else if (nextProps.data && this.props.data && nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp) {\n console.log(\"Rerendering\");\n return true;\n } else if (nextProps.loadingGraph !== this.props.loadingGraph) {\n return true;\n } else {\n return false;\n }\n }\n\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n render() {\n if (this.props.loadingGraph) return React.createElement(Spinner, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 32\n },\n __self: this\n });\n\n if (this.props.data == null) {\n return React.createElement(\"div\", {\n className: \"card-body text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 35\n },\n __self: this\n }, React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Press \", React.createElement(\"span\", {\n className: \"badge badge-info\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Show Graph\"), \" to see the graph representation of the experiment.\"), React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"If the experiment is running, press \", React.createElement(\"span\", {\n className: \"badge badge-dark\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"Start Job Monitor\"), \" to start a live tracker of the changes on the experiment's jobs. This process will automatically update the graph's nodes colors and show a log of the detected changes.\"));\n }\n\n var nodes_array = [];\n var edges_array = [];\n\n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: {\n background: node.status_color,\n border: \"black\"\n },\n level: node.level\n }));\n this.props.data.edges.map(edge => edges_array.push({\n from: edge.from,\n to: edge.to\n }));\n }\n\n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n const options = {\n edges: {\n arrows: {\n to: {\n enabled: true\n }\n }\n },\n layout: {\n improvedLayout: true,\n hierarchical: {\n nodeSpacing: 200,\n blockShifting: true,\n edgeMinimization: true,\n //parentCentralization: true,\n sortMethod: 'hubsize',\n direction: 'UD'\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true\n },\n physics: {\n enabled: false\n },\n nodes: {\n shape: 'dot'\n }\n };\n const graph = {\n nodes: nodes,\n edges: edges\n };\n\n class VisNetwork extends Component {\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else {\n return false;\n }\n }\n\n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", params => {\n //console.log(params);\n if (params.nodes) {\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n });\n } // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n\n\n render() {\n return React.createElement(\"div\", {\n className: \"card-body p-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 130\n },\n __self: this\n }, React.createElement(\"div\", {\n ref: \"myRef\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 131\n },\n __self: this\n }));\n }\n\n }\n\n this.updateVisNodes(nodes);\n return React.createElement(VisNetwork, {\n graph: graph,\n options: options,\n updateSelection: this.props.updateSelection,\n shouldUpdateGraph: this.props.shouldUpdateGraph,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 139\n },\n __self: this\n });\n }\n\n}\n\nconst experimentStyle = {\n height: 600\n};\nexport default GraphNativeRep;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js"],"names":["React","Component","Spinner","vis","GraphNativeRep","updateVisNodes","nodes","props","setVisData","shouldComponentUpdate","nextProps","nextState","shouldUpdateGraph","data","pkl_timestamp","console","log","loadingGraph","componentWillUnmount","cleanGraphData","render","nodes_array","edges_array","edges","map","node","push","id","label","color","background","status_color","border","level","edge","from","to","DataSet","options","arrows","enabled","layout","improvedLayout","hierarchical","nodeSpacing","blockShifting","edgeMinimization","sortMethod","direction","interaction","dragNodes","hoverConnectedEdges","navigationButtons","physics","shape","graph","VisNetwork","componentDidMount","network","Network","refs","myRef","on","params","updateSelection","experimentStyle","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,SAAhB,QAAiC,OAAjC,C,CACA;;AACA,OAAOC,OAAP,MAAoB,mBAApB;AACA,OAAOC,GAAP,MAAgB,KAAhB;;AAEA,MAAMC,cAAN,SAA6BH,SAA7B,CAAuC;AAAA;AAAA;;AAAA,SAmBnCI,cAnBmC,GAmBjBC,KAAD,IAAW;AACxB,WAAKC,KAAL,CAAWC,UAAX,CAAsBF,KAAtB;AACH,KArBkC;AAAA;;AAEnCG,EAAAA,qBAAqB,CAACC,SAAD,EAAYC,SAAZ,EAAsB;AACvC,QAAI,KAAKJ,KAAL,CAAWK,iBAAX,KAAiC,IAArC,EAA0C;AACtC,aAAO,IAAP;AACD,KAFH,MAEQ,IAAIF,SAAS,CAACG,IAAV,IAAkB,KAAKN,KAAL,CAAWM,IAA7B,IAAsCH,SAAS,CAACG,IAAV,CAAeC,aAAf,KAAiC,KAAKP,KAAL,CAAWM,IAAX,CAAgBC,aAA3F,EAA0G;AAC9GC,MAAAA,OAAO,CAACC,GAAR,CAAY,aAAZ;AACA,aAAO,IAAP;AACD,KAHK,MAGA,IAAIN,SAAS,CAACO,YAAV,KAA2B,KAAKV,KAAL,CAAWU,YAA1C,EAAuD;AAC3D,aAAO,IAAP;AACD,KAFK,MAED;AACH,aAAO,KAAP;AACD;AACN;;AACDC,EAAAA,oBAAoB,GAAG;AACnBH,IAAAA,OAAO,CAACC,GAAR,CAAY,YAAZ;AACA,SAAK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":["import React, { Component } from \"react\";\n// import vis from \"vis-network\";\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n\n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true\n }else if (nextProps.data && this.props.data && (nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp)){\n console.log(\"Rerendering\")\n return true;\n }else if (nextProps.loadingGraph !== this.props.loadingGraph){\n return true; \n }else{\n return false;\n }\n }\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n updateVisNodes = (nodes) => {\n this.props.setVisData(nodes);\n }\n\n\n\n render () {\n if (this.props.loadingGraph) return ;\n if (this.props.data == null){\n return (\n
\n

Press Show Graph to see the graph representation of the experiment.

\n

If the experiment is running, press Start Job Monitor to start a live tracker of the changes on the experiment's jobs.\n This process will automatically update the graph's nodes colors and show a log of the detected changes.\n

\n
\n );\n }\n\n var nodes_array = [];\n var edges_array = [];\n \n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: { background: node.status_color, border: \"black\" },\n level: node.level,\n })\n );\n \n this.props.data.edges.map(edge => \n edges_array.push({ from: edge.from, to: edge.to })\n );\n }\n \n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n\n\n const options = {\n edges: {\n arrows: {\n to: { enabled: true }\n }\n },\n layout: {\n improvedLayout: true,\n hierarchical: {\n nodeSpacing: 200,\n blockShifting: true,\n edgeMinimization: true,\n //parentCentralization: true,\n sortMethod: 'hubsize',\n direction: 'UD',\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true,\n },\n physics: {\n enabled: false,\n },\n nodes: {\n shape: 'dot',\n }\n };\n \n const graph = {\n nodes : nodes,\n edges : edges,\n };\n\n class VisNetwork extends Component {\n \n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true;\n } else {\n return false;\n }\n }\n \n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", (params) => {\n //console.log(params);\n if (params.nodes){\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n \n });\n }\n \n // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n \n render() { \n return (\n
\n
\n
\n );\n }\n }\n\n this.updateVisNodes(nodes);\n \n return ;\n\n }\n\n\n \n\n \n\n \n \n\n \n\n}\n\nconst experimentStyle = {\n height: 600\n };\n\nexport default GraphNativeRep;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/2086ce37555982936d977a2d76732ff9.json b/node_modules/.cache/babel-loader/2086ce37555982936d977a2d76732ff9.json new file mode 100644 index 0000000000000000000000000000000000000000..ea67620b8d81b93bd54c614527e685007b7def69 --- /dev/null +++ b/node_modules/.cache/babel-loader/2086ce37555982936d977a2d76732ff9.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/Selection.js\";\nimport React, { useContext, Fragment } from 'react';\nimport ExperimentContext from '../context/experiment/experimentContext';\n\nconst Selection = () => {\n const experimentContext = useContext(ExperimentContext);\n const selection = experimentContext.selection,\n data = experimentContext.data,\n experiment = experimentContext.experiment; // const { model, branch, hpc } = experiment;\n //var currentSelection = \"Node: \"\n\n var currentNode = \"\";\n var selectedNode = null;\n\n if (selection) {\n //console.log(\"Current selection \" + selection)\n selection.map(node => // currentSelection += node + \", \"\n currentNode = node); //console.log(\"Current node \" + currentNode)\n\n selectedNode = data.nodes.find(node => node.id === currentNode); //console.log(\"Selected node\")\n //console.log(\"Data: \" + selectedNode.id + \" \" + selectedNode.platform_name)\n }\n\n return React.createElement(Fragment, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 23\n },\n __self: this\n }, selectedNode && React.createElement(Fragment, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 25\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 26\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-12\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 27\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"card text-white bg-info\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 28\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"card-header text-center p-0\",\n style: headerCard,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 29\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"mh-100 px-0 mx-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 30\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 31\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 31\n },\n __self: this\n }, selectedNode.id)))), React.createElement(\"div\", {\n className: \"card-body py-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 34\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 35\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Date:\"), \" \", selectedNode.date)), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 38\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 39\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-12\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 40\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 41\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 41\n },\n __self: this\n }, \"Section:\"), \" \", selectedNode.section)))), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 45\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 46\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-12\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 47\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 48\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 48\n },\n __self: this\n }, \"Platform:\"), \" \", selectedNode.platform_name && selectedNode.platform_name, \" \", !selectedNode.platform_name && experiment.hpc)))), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 55\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 56\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-6\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 57\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 58\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 58\n },\n __self: this\n }, \"Processors:\"), \" \", selectedNode.processors)), React.createElement(\"div\", {\n className: \"col-6\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 60\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 61\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 61\n },\n __self: this\n }, \"Wallclock:\"), \" \", selectedNode.wallclock)))), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 65\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 66\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-6\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 67\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 68\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 68\n },\n __self: this\n }, \"Level:\"), \" \", selectedNode.level)), React.createElement(\"div\", {\n className: \"col-6\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 70\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 71\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 71\n },\n __self: this\n }, \"Out:\"), \" \", selectedNode.children, \" \", React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 71\n },\n __self: this\n }, \"In:\"), \" \", selectedNode.parents, \" \")))), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 76\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 77\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-12\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 78\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 79\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 79\n },\n __self: this\n }, \"Status:\")), \" \", selectedNode.status))), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 86\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 87\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-4\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 88\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 89\n },\n __self: this\n }, \"o:\", data.max_children, \"/i:\", data.max_parents, \" \")), React.createElement(\"div\", {\n className: \"col-4\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 94\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 95\n },\n __self: this\n }, data.total_jobs))))))))), !selectedNode && data && React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 106\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-12\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 107\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"card text-white bg-info\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 108\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"card-header text-center py-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 109\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 110\n },\n __self: this\n }, \"Here goes the Job Id\")), React.createElement(\"div\", {\n className: \"card-body\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 112\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"text-center\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 113\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 114\n },\n __self: this\n }, \"Select a Node to see more information.\")))))));\n};\n\nconst experimentStyle = {\n height: 200\n};\nconst headerCard = {\n height: 30\n};\nexport default Selection;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/Selection.js"],"names":["React","useContext","Fragment","ExperimentContext","Selection","experimentContext","selection","data","experiment","currentNode","selectedNode","map","node","nodes","find","id","experimentStyle","headerCard","date","section","platform_name","hpc","processors","wallclock","level","children","parents","status","max_children","max_parents","total_jobs","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,UAAhB,EAA4BC,QAA5B,QAA4C,OAA5C;AACA,OAAOC,iBAAP,MAA8B,yCAA9B;;AAEA,MAAMC,SAAS,GAAG,MAAM;AACpB,QAAMC,iBAAiB,GAAGJ,UAAU,CAACE,iBAAD,CAApC;AADoB,QAEZG,SAFY,GAEoBD,iBAFpB,CAEZC,SAFY;AAAA,QAEDC,IAFC,GAEoBF,iBAFpB,CAEDE,IAFC;AAAA,QAEKC,UAFL,GAEoBH,iBAFpB,CAEKG,UAFL,EAGpB;AACA;;AACA,MAAIC,WAAW,GAAG,EAAlB;AACA,MAAIC,YAAY,GAAG,IAAnB;;AACA,MAAIJ,SAAJ,EAAe;AACX;AACAA,IAAAA,SAAS,CAACK,GAAV,CAAcC,IAAI,IACd;AACAH,IAAAA,WAAW,GAAGG,IAFlB,EAFW,CAMX;;AACAF,IAAAA,YAAY,GAAGH,IAAI,CAACM,KAAL,CAAWC,IAAX,CAAgBF,IAAI,IAAIA,IAAI,CAACG,EAAL,KAAYN,WAApC,CAAf,CAPW,CAQX;AACA;AACH;;AACD,SACI,oBAAC,QAAD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACSC,YAAY,IACb,oBAAC,QAAD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACK;AAAK,IAAA,SAAS,EAAC,KAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACI;AAAK,IAAA,SAAS,EAAC,QAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACG;AAAK,IAAA,SAAS,EAAC,yBAAf;AAAyC,IAAA,KAAK,EAAEM,eAAhD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACI;AAAK,IAAA,SAAS,EAAC,6BAAf;AAA6C,IAAA,KAAK,EAAEC,UAApD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,K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AAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,8CADA,CADJ,CAJJ,CADJ,CADJ,CAnFZ,CADJ;AAwGH,CA1HD;;AA4HA,MAAMA,eAAe,GAAG;AACpBe,EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,MAAMd,UAAU,GAAG;AACfc,EAAAA,MAAM,EAAE;AADO,CAAnB;AAIA,eAAe3B,SAAf","sourcesContent":["import React, { useContext, Fragment } from 'react'\nimport ExperimentContext from '../context/experiment/experimentContext';\n\nconst Selection = () => {\n const experimentContext = useContext(ExperimentContext);\n const { selection, data, experiment } = experimentContext;\n // const { model, branch, hpc } = experiment;\n //var currentSelection = \"Node: \"\n var currentNode = \"\"\n var selectedNode = null\n if (selection) {\n //console.log(\"Current selection \" + selection)\n selection.map(node => (\n // currentSelection += node + \", \"\n currentNode = node\n ));\n //console.log(\"Current node \" + currentNode)\n selectedNode = data.nodes.find(node => node.id === currentNode) \n //console.log(\"Selected node\")\n //console.log(\"Data: \" + selectedNode.id + \" \" + selectedNode.platform_name)\n } \n return (\n \n {selectedNode &&\n \n
\n
\n
\n
\n
\n {selectedNode.id}\n
\n
\n
\n
\n Date: {selectedNode.date}\n
\n
\n
\n
\n Section: {selectedNode.section}\n
\n
\n
\n
\n
\n
\n Platform: {selectedNode.platform_name && selectedNode.platform_name} {!selectedNode.platform_name && experiment.hpc}\n
\n
\n
\n {/*
\n Priority: {selectedNode.priority}\n
*/}\n
\n
\n
\n Processors: {selectedNode.processors}\n
\n
\n Wallclock: {selectedNode.wallclock}\n
\n
\n
\n
\n
\n
\n Level: {selectedNode.level}\n
\n
\n Out: {selectedNode.children} In: {selectedNode.parents} \n
\n \n
\n
\n
\n
\n
\n Status: {selectedNode.status}\n
\n {/*
\n c:{data.max_children}/p:{data.max_parents}\n
*/}\n
\n
\n
\n
\n
\n o:{data.max_children}/i:{data.max_parents} \n
\n {/*
\n o:{data.avg_children}/i:{data.avg_parents} \n
*/}\n
\n {data.total_jobs}\n
\n
\n
\n
\n
\n
\n
\n
\n } \n {!selectedNode && data &&\n
\n
\n
\n
\n Here goes the Job Id\n
\n
\n
\n Select a Node to see more information. \n
\n
\n
\n
\n
\n } \n
\n \n \n\n )\n}\n\nconst experimentStyle = {\n height: 200\n };\n\nconst headerCard = {\n height: 30\n}\n\nexport default Selection;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/2269e5fb7736d3974b05835075db9eaf.json b/node_modules/.cache/babel-loader/2269e5fb7736d3974b05835075db9eaf.json new file mode 100644 index 0000000000000000000000000000000000000000..33f9f765de5b410e64ab6e4f2542881a92849989 --- /dev/null +++ b/node_modules/.cache/babel-loader/2269e5fb7736d3974b05835075db9eaf.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js\";\nimport React, { Component } from \"react\"; // import vis from \"vis-network\";\n\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n constructor(...args) {\n super(...args);\n\n this.updateVisNodes = nodes => {\n this.props.setVisData(nodes);\n };\n }\n\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else if (nextProps.data && this.props.data && nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp) {\n console.log(\"Rerendering\");\n return true;\n } else if (nextProps.loadingGraph !== this.props.loadingGraph) {\n return true;\n } else {\n return false;\n }\n }\n\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n render() {\n if (this.props.loadingGraph) return React.createElement(Spinner, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 32\n },\n __self: this\n });\n\n if (this.props.data == null) {\n return React.createElement(\"div\", {\n className: \"card-body text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 35\n },\n __self: this\n }, React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Press \", React.createElement(\"span\", {\n className: \"badge badge-info\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Show Graph\"), \" to see the graph representation of the experiment.\"), React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"If the experiment is running, press \", React.createElement(\"span\", {\n className: \"badge badge-dark\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"Start Job Monitor\"), \" to start a live tracker of the changes on the experiment's jobs. This process will automatically update the graph's nodes colors and show a log of the detected changes.\"));\n }\n\n var nodes_array = [];\n var edges_array = [];\n\n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: {\n background: node.status_color,\n border: \"black\"\n },\n level: node.level\n }));\n this.props.data.edges.map(edge => edges_array.push({\n from: edge.from,\n to: edge.to\n }));\n }\n\n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n const options = {\n edges: {\n arrows: {\n to: {\n enabled: true\n }\n }\n },\n layout: {\n //improvedLayout: true,\n hierarchical: {\n // enabled: true,\n nodeSpacing: 250,\n edgeMinimization: true,\n parentCentralization: true,\n direction: 'UD',\n sortMethod: 'directed'\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true\n },\n physics: {\n enabled: false\n },\n nodes: {\n shape: 'dot'\n }\n };\n const graph = {\n nodes: nodes,\n edges: edges\n };\n\n class VisNetwork extends Component {\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else {\n return false;\n }\n }\n\n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", params => {\n //console.log(params);\n if (params.nodes) {\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n });\n } // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n\n\n render() {\n return React.createElement(\"div\", {\n className: \"card-body p-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 130\n },\n __self: this\n }, React.createElement(\"div\", {\n ref: \"myRef\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 131\n },\n __self: this\n }));\n }\n\n }\n\n this.updateVisNodes(nodes);\n return React.createElement(VisNetwork, {\n graph: graph,\n options: options,\n updateSelection: this.props.updateSelection,\n shouldUpdateGraph: this.props.shouldUpdateGraph,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 139\n },\n __self: this\n });\n }\n\n}\n\nconst experimentStyle = {\n height: 600\n};\nexport default GraphNativeRep;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js"],"names":["React","Component","Spinner","vis","GraphNativeRep","updateVisNodes","nodes","props","setVisData","shouldComponentUpdate","nextProps","nextState","shouldUpdateGraph","data","pkl_timestamp","console","log","loadingGraph","componentWillUnmount","cleanGraphData","render","nodes_array","edges_array","edges","map","node","push","id","label","color","background","status_color","border","level","edge","from","to","DataSet","options","arrows","enabled","layout","hierarchical","nodeSpacing","edgeMinimization","parentCentralization","direction","sortMethod","interaction","dragNodes","hoverConnectedEdges","navigationButtons","physics","shape","graph","VisNetwork","componentDidMount","network","Network","refs","myRef","on","params","updateSelection","experimentStyle","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,SAAhB,QAAiC,OAAjC,C,CACA;;AACA,OAAOC,OAAP,MAAoB,mBAApB;AACA,OAAOC,GAAP,MAAgB,KAAhB;;AAEA,MAAMC,cAAN,SAA6BH,SAA7B,CAAuC;AAAA;AAAA;;AAAA,SAmBnCI,cAnBmC,GAmBjBC,KAAD,IAAW;AACxB,WAAKC,KAAL,CAAWC,UAA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AAAA,MAAM,GAAG;AACL,eACI;AAAK,UAAA,SAAS,EAAC,eAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,WACI;AAAK,UAAA,GAAG,EAAC,OAAT;AAAiB,UAAA,KAAK,EAAE4C,eAAxB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,UADJ,CADJ;AAKH;;AAjC8B;;AAoCnC,SAAK3D,cAAL,CAAoBC,KAApB;AAEA,WAAO,oBAAC,UAAD;AACH,MAAA,KAAK,EAAEgD,KADJ;AAEH,MAAA,OAAO,EAAEhB,OAFN;AAGH,MAAA,eAAe,EAAE,KAAK/B,KAAL,CAAWwD,eAHzB;AAIH,MAAA,iBAAiB,EAAE,KAAKxD,KAAL,CAAWK,iBAJ3B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAAP;AAOH;;AA5IkC;;AA0JvC,MAAMoD,eAAe,GAAG;AACpBC,EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,eAAe7D,cAAf","sourcesContent":["import React, { Component } from \"react\";\n// import vis from \"vis-network\";\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n\n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true\n }else if (nextProps.data && this.props.data && (nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp)){\n console.log(\"Rerendering\")\n return true;\n }else if (nextProps.loadingGraph !== this.props.loadingGraph){\n return true; \n }else{\n return false;\n }\n }\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n updateVisNodes = (nodes) => {\n this.props.setVisData(nodes);\n }\n\n\n\n render () {\n if (this.props.loadingGraph) return ;\n if (this.props.data == null){\n return (\n
\n

Press Show Graph to see the graph representation of the experiment.

\n

If the experiment is running, press Start Job Monitor to start a live tracker of the changes on the experiment's jobs.\n This process will automatically update the graph's nodes colors and show a log of the detected changes.\n

\n
\n );\n }\n\n var nodes_array = [];\n var edges_array = [];\n \n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: { background: node.status_color, border: \"black\" },\n level: node.level,\n })\n );\n \n this.props.data.edges.map(edge => \n edges_array.push({ from: edge.from, to: edge.to })\n );\n }\n \n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n\n\n const options = {\n edges: {\n arrows: {\n to: { enabled: true }\n }\n },\n layout: {\n //improvedLayout: true,\n hierarchical: {\n // enabled: true,\n nodeSpacing: 250,\n edgeMinimization: true,\n parentCentralization: true,\n direction: 'UD',\n sortMethod: 'directed',\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true,\n },\n physics: {\n enabled: false,\n },\n nodes: {\n shape: 'dot',\n }\n };\n \n const graph = {\n nodes : nodes,\n edges : edges,\n };\n\n class VisNetwork extends Component {\n \n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true;\n } else {\n return false;\n }\n }\n \n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", (params) => {\n //console.log(params);\n if (params.nodes){\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n \n });\n }\n \n // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n \n render() { \n return (\n
\n
\n
\n );\n }\n }\n\n this.updateVisNodes(nodes);\n \n return ;\n\n }\n\n\n \n\n \n\n \n \n\n \n\n}\n\nconst experimentStyle = {\n height: 600\n };\n\nexport default GraphNativeRep;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/234284dac09fbc6bd485de3596de8594.json b/node_modules/.cache/babel-loader/234284dac09fbc6bd485de3596de8594.json new file mode 100644 index 0000000000000000000000000000000000000000..041f0b4f5237fd10cb8ea8d80b37560b2e91eef9 --- /dev/null +++ b/node_modules/.cache/babel-loader/234284dac09fbc6bd485de3596de8594.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js\";\nimport React, { Component } from \"react\"; // import vis from \"vis-network\";\n\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis-network\";\n\nclass GraphNativeRep extends Component {\n constructor(...args) {\n super(...args);\n\n this.updateVisNodes = nodes => {\n this.props.setVisData(nodes);\n };\n }\n\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else if (nextProps.data && this.props.data && nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp) {\n console.log(\"Rerendering\");\n return true;\n } else if (nextProps.loadingGraph !== this.props.loadingGraph) {\n return true;\n } else {\n return false;\n }\n }\n\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n render() {\n if (this.props.loadingGraph) return React.createElement(Spinner, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 32\n },\n __self: this\n });\n\n if (this.props.data == null) {\n return React.createElement(\"div\", {\n className: \"card-body text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 35\n },\n __self: this\n }, React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Press \", React.createElement(\"span\", {\n className: \"badge badge-info\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Show Graph\"), \" to see the graph representation of the experiment.\"), React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"If the experiment is running, press \", React.createElement(\"span\", {\n className: \"badge badge-dark\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"Start Job Monitor\"), \" to start a live tracker of the changes on the experiment's jobs. This process will automatically update the graph's nodes colors and show a log of the detected changes.\"));\n }\n\n var nodes_array = [];\n var edges_array = [];\n\n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: {\n background: node.status_color,\n border: \"black\"\n },\n level: node.level\n }));\n this.props.data.edges.map(edge => edges_array.push({\n from: edge.from,\n to: edge.to\n }));\n }\n\n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n const options = {\n edges: {\n arrows: {\n to: {\n enabled: true\n }\n }\n },\n layout: {\n //improvedLayout: true,\n hierarchical: {\n nodeSpacing: 190,\n blockShifting: true,\n edgeMinimization: true,\n parentCentralization: true,\n sortMethod: 'directed',\n direction: 'UD' // work on vis current version\n // nodeSpacing: 190,\n // blockShifting: false,\n // edgeMinimization: false,\n // parentCentralization: true,\n // sortMethod: 'hubsize',\n // direction: 'UD',\n\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true\n },\n physics: {\n enabled: false\n },\n nodes: {\n shape: 'dot',\n font: {\n size: 10\n }\n }\n };\n const graph = {\n nodes: nodes,\n edges: edges\n };\n\n class VisNetwork extends Component {\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else {\n return false;\n }\n }\n\n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", params => {\n //console.log(params);\n if (params.nodes) {\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n });\n } // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n\n\n render() {\n return React.createElement(\"div\", {\n className: \"card-body p-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 140\n },\n __self: this\n }, React.createElement(\"div\", {\n ref: \"myRef\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 141\n },\n __self: this\n }));\n }\n\n }\n\n this.updateVisNodes(nodes);\n return React.createElement(VisNetwork, {\n graph: graph,\n options: options,\n updateSelection: this.props.updateSelection,\n shouldUpdateGraph: this.props.shouldUpdateGraph,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 149\n },\n __self: this\n });\n }\n\n}\n\nconst experimentStyle = {\n height: 600\n};\nexport default GraphNativeRep;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js"],"names":["React","Component","Spinner","vis","GraphNativeRep","updateVisNodes","nodes","props","setVisData","shouldComponentUpdate","nextProps","nextState","shouldUpdateGraph","data","pkl_timestamp","console","log","loadingGraph","componentWillUnmount","cleanGraphData","render","nodes_array","edges_array","edges","map","node","push","id","label","color","background","status_color","border","level","edge","from","to","DataSet","options","arrows","enabled","layout","hierarchical","nodeSpacing","blockShifting","edgeMinimization","parentCentralization","sortMethod","direction","interaction","dragNodes","hoverConnectedEdges","navigationButtons","physics","shape","font","size","graph","VisNetwork","componentDidMount","network","Network","refs","myRef","on","params","updateSelection","experimentStyle","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,SAAhB,QAAiC,OAAjC,C,CACA;;AACA,OAAOC,OAAP,MAAoB,mBAApB;AACA,OAAOC,GAAP,MAAgB,aAAhB;;AAEA,MAAMC,cAAN,SAA6BH,SAA7B,CAAuC;AAAA;AAAA;;AAAA,SAmBnCI,cAnBmC,GAmBjBC,KAAD,IAAW;AACxB,WAAKC,KAAL,CAAWC,UAAX,CAAsBF,KAAtB;AACH,KArBkC;AAAA;;AAEnCG,EAAAA,qBAAqB,CAACC,SAAD,EAAYC,SAAZ,EAAsB;AACvC,QAAI,KAAKJ,KAAL,CAAWK,iBAAX,KAAiC,IAArC,EAA0C;AACtC,aAAO,IAAP;AACD,KAFH,MAEQ,IAAIF,SAAS,CAACG,IAAV,IAAkB,KAAKN,KAAL,CAAWM,IAA7B,IAAsCH,SAAS,CAACG,IAAV,CAAeC,aAAf,KAAiC,KAAKP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AA;AAAA;AAAA;AAAA;AAAA,UADJ,CADJ;AAKH;;AAjC8B;;AAoCnC,SAAK9D,cAAL,CAAoBC,KAApB;AAEA,WAAO,oBAAC,UAAD;AACH,MAAA,KAAK,EAAEmD,KADJ;AAEH,MAAA,OAAO,EAAEnB,OAFN;AAGH,MAAA,eAAe,EAAE,KAAK/B,KAAL,CAAW2D,eAHzB;AAIH,MAAA,iBAAiB,EAAE,KAAK3D,KAAL,CAAWK,iBAJ3B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAAP;AAOH;;AAtJkC;;AAoKvC,MAAMuD,eAAe,GAAG;AACpBC,EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,eAAehE,cAAf","sourcesContent":["import React, { Component } from \"react\";\n// import vis from \"vis-network\";\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis-network\";\n\nclass GraphNativeRep extends Component {\n\n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true\n }else if (nextProps.data && this.props.data && (nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp)){\n console.log(\"Rerendering\")\n return true;\n }else if (nextProps.loadingGraph !== this.props.loadingGraph){\n return true; \n }else{\n return false;\n }\n }\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n updateVisNodes = (nodes) => {\n this.props.setVisData(nodes);\n }\n\n\n\n render () {\n if (this.props.loadingGraph) return ;\n if (this.props.data == null){\n return (\n
\n

Press Show Graph to see the graph representation of the experiment.

\n

If the experiment is running, press Start Job Monitor to start a live tracker of the changes on the experiment's jobs.\n This process will automatically update the graph's nodes colors and show a log of the detected changes.\n

\n
\n );\n }\n\n var nodes_array = [];\n var edges_array = [];\n \n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: { background: node.status_color, border: \"black\" },\n level: node.level,\n })\n );\n \n this.props.data.edges.map(edge => \n edges_array.push({ from: edge.from, to: edge.to })\n );\n }\n \n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n\n\n const options = {\n edges: {\n arrows: {\n to: { enabled: true }\n }\n },\n layout: {\n //improvedLayout: true,\n hierarchical: {\n nodeSpacing: 190,\n blockShifting: true,\n edgeMinimization: true,\n parentCentralization: true,\n sortMethod: 'directed',\n direction: 'UD',\n // work on vis current version\n // nodeSpacing: 190,\n // blockShifting: false,\n // edgeMinimization: false,\n // parentCentralization: true,\n // sortMethod: 'hubsize',\n // direction: 'UD',\n }\n }, \n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true,\n },\n physics: {\n enabled: false,\n },\n nodes: {\n shape: 'dot',\n font: {\n size: 10,\n },\n }\n };\n \n const graph = {\n nodes : nodes,\n edges : edges,\n };\n\n class VisNetwork extends Component {\n \n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true;\n } else {\n return false;\n }\n }\n \n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", (params) => {\n //console.log(params);\n if (params.nodes){\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n \n });\n }\n \n // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n \n render() { \n return (\n
\n
\n
\n );\n }\n }\n\n this.updateVisNodes(nodes);\n \n return ;\n\n }\n\n\n \n\n \n\n \n \n\n \n\n}\n\nconst experimentStyle = {\n height: 600\n };\n\nexport default GraphNativeRep;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/246018a64e3d4c4a53085d4bdd6b5133.json b/node_modules/.cache/babel-loader/246018a64e3d4c4a53085d4bdd6b5133.json new file mode 100644 index 0000000000000000000000000000000000000000..7d1c0c09a9ab439fb2e2d05b119c4f02984629ba --- /dev/null +++ b/node_modules/.cache/babel-loader/246018a64e3d4c4a53085d4bdd6b5133.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js\";\nimport React, { Component } from \"react\"; // import vis from \"vis-network\";\n\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n constructor(...args) {\n super(...args);\n\n this.updateVisNodes = nodes => {\n this.props.setVisData(nodes);\n };\n }\n\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else if (nextProps.data && this.props.data && nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp) {\n console.log(\"Rerendering\");\n return true;\n } else if (nextProps.loadingGraph !== this.props.loadingGraph) {\n return true;\n } else {\n return false;\n }\n }\n\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n render() {\n if (this.props.loadingGraph) return React.createElement(Spinner, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 32\n },\n __self: this\n });\n\n if (this.props.data == null) {\n return React.createElement(\"div\", {\n className: \"card-body text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 35\n },\n __self: this\n }, React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Press \", React.createElement(\"span\", {\n className: \"badge badge-info\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Show Graph\"), \" to see the graph representation of the experiment.\"), React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"If the experiment is running, press \", React.createElement(\"span\", {\n className: \"badge badge-dark\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"Start Job Monitor\"), \" to start a live tracker of the changes on the experiment's jobs. This process will automatically update the graph's nodes colors and show a log of the detected changes.\"));\n }\n\n var nodes_array = [];\n var edges_array = [];\n\n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: {\n background: node.status_color,\n border: \"black\"\n },\n level: node.level\n }));\n this.props.data.edges.map(edge => edges_array.push({\n from: edge.from,\n to: edge.to\n }));\n }\n\n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n const options = {\n edges: {\n arrows: {\n to: {\n enabled: true\n }\n }\n },\n layout: {\n improvedLayout: false,\n hierarchical: {\n nodeSpacing: 150,\n blockShifting: true,\n edgeMinimization: true,\n //parentCentralization: true,\n sortMethod: 'hubsize',\n direction: 'UD'\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true\n },\n physics: {\n enabled: false\n },\n nodes: {\n shape: 'dot',\n font: {\n size: 8\n }\n }\n };\n const graph = {\n nodes: nodes,\n edges: edges\n };\n\n class VisNetwork extends Component {\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else {\n return false;\n }\n }\n\n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", params => {\n //console.log(params);\n if (params.nodes) {\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n });\n } // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n\n\n render() {\n return React.createElement(\"div\", {\n className: \"card-body p-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 133\n },\n __self: this\n }, React.createElement(\"div\", {\n ref: \"myRef\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 134\n },\n __self: this\n }));\n }\n\n }\n\n this.updateVisNodes(nodes);\n return React.createElement(VisNetwork, {\n graph: graph,\n options: options,\n updateSelection: this.props.updateSelection,\n shouldUpdateGraph: this.props.shouldUpdateGraph,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 142\n },\n __self: this\n });\n }\n\n}\n\nconst experimentStyle = {\n height: 600\n};\nexport default GraphNativeRep;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js"],"names":["React","Component","Spinner","vis","GraphNativeRep","updateVisNodes","nodes","props","setVisData","shouldComponentUpdate","nextProps","nextState","shouldUpdateGraph","data","pkl_timestamp","console","log","loadingGraph","componentWillUnmount","cleanGraphData","render","nodes_array","edges_array","edges","map","node","push","id","label","color","background","status_color","border","level","edge","from","to","DataSet","options","arrows","enabled","layout","improvedLayout","hierarchical","nodeSpacing","blockShifting","edgeMinimization","sortMethod","direction","interaction","dragNodes","hoverConnectedEdges","navigationButtons","physics","shape","font","size","graph","VisNetwork","componentDidMount","network","Network","refs","myRef","on","params","updateSelection","experimentStyle","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,SAAhB,QAAiC,OAAjC,C,CACA;;AACA,OAAOC,OAAP,MAAoB,mBAApB;AACA,OAAOC,GAAP,MAAgB,KAAhB;;AAEA,MAAMC,cAAN,SAA6BH,SAA7B,CAAuC;AAAA;AAAA;;AAAA,SAmBnCI,cAnBmC,GAmBjBC,KAAD,IAAW;AACxB,WAAKC,KAAL,CAAWC,UAAX,CAAsBF,KAAtB;AACH,KArBkC;AAAA;;AAEnCG,EAAAA,qBAAqB,CAACC,SAAD,EAAYC,SAAZ,EAAsB;AACvC,QAAI,KAAKJ,KAAL,CAAWK,iBAAX,KAAiC,IAArC,EAA0C;AACtC,aAAO,IAAP;AACD,KAFH,MAEQ,IAAIF,SAAS,CAACG,IAAV,IAAkB,KAAKN,KAAL,CAAWM,IAA7B,IAAsCH,SAAS,CAACG,IAAV,CAAeC,aAAf,KAAiC,KAAKP,KAAL,CAAWM,IAAX,CAAgBC,aAA3F,EAA0G;AAC9GC,MAAAA,OAAO,CAACC,GAAR,CAAY,aAAZ;AACA,aAAO,IAAP;AACD,KAHK,MAGA,IAAIN,SAAS,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AGH,MAAA,eAAe,EAAE,KAAK/B,KAAL,CAAW2D,eAHzB;AAIH,MAAA,iBAAiB,EAAE,KAAK3D,KAAL,CAAWK,iBAJ3B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAAP;AAOH;;AA/IkC;;AA6JvC,MAAMuD,eAAe,GAAG;AACpBC,EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,eAAehE,cAAf","sourcesContent":["import React, { Component } from \"react\";\n// import vis from \"vis-network\";\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n\n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true\n }else if (nextProps.data && this.props.data && (nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp)){\n console.log(\"Rerendering\")\n return true;\n }else if (nextProps.loadingGraph !== this.props.loadingGraph){\n return true; \n }else{\n return false;\n }\n }\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n updateVisNodes = (nodes) => {\n this.props.setVisData(nodes);\n }\n\n\n\n render () {\n if (this.props.loadingGraph) return ;\n if (this.props.data == null){\n return (\n
\n

Press Show Graph to see the graph representation of the experiment.

\n

If the experiment is running, press Start Job Monitor to start a live tracker of the changes on the experiment's jobs.\n This process will automatically update the graph's nodes colors and show a log of the detected changes.\n

\n
\n );\n }\n\n var nodes_array = [];\n var edges_array = [];\n \n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: { background: node.status_color, border: \"black\" },\n level: node.level,\n })\n );\n \n this.props.data.edges.map(edge => \n edges_array.push({ from: edge.from, to: edge.to })\n );\n }\n \n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n\n\n const options = {\n edges: {\n arrows: {\n to: { enabled: true }\n }\n },\n layout: {\n improvedLayout: false,\n hierarchical: {\n nodeSpacing: 150,\n blockShifting: true,\n edgeMinimization: true,\n //parentCentralization: true,\n sortMethod: 'hubsize',\n direction: 'UD',\n }\n }, \n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true,\n },\n physics: {\n enabled: false,\n },\n nodes: {\n shape: 'dot',\n font: {\n size: 8,\n },\n }\n };\n \n const graph = {\n nodes : nodes,\n edges : edges,\n };\n\n class VisNetwork extends Component {\n \n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true;\n } else {\n return false;\n }\n }\n \n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", (params) => {\n //console.log(params);\n if (params.nodes){\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n \n });\n }\n \n // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n \n render() { \n return (\n
\n
\n
\n );\n }\n }\n\n this.updateVisNodes(nodes);\n \n return ;\n\n }\n\n\n \n\n \n\n \n \n\n \n\n}\n\nconst experimentStyle = {\n height: 600\n };\n\nexport default GraphNativeRep;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/2544ed02b31b51a74712f1ccb31fd30f.json b/node_modules/.cache/babel-loader/2544ed02b31b51a74712f1ccb31fd30f.json new file mode 100644 index 0000000000000000000000000000000000000000..ae3e3ac73f3ba99cd054b8f8780c6b2a45d53686 --- /dev/null +++ b/node_modules/.cache/babel-loader/2544ed02b31b51a74712f1ccb31fd30f.json @@ -0,0 +1 @@ +{"ast":null,"code":"import _slicedToArray from \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/node_modules/@babel/runtime/helpers/esm/slicedToArray\";\nvar _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/context/experiment/ExperimentState.js\";\nimport React, { useReducer } from 'react';\nimport axios from 'axios';\nimport ExperimentContext from './experimentContext';\nimport ExperimentReducer from './experimentReducer';\nimport { SEARCH_EXPERIMENTS, SET_LOADING, CLEAR_EXPERIMENTS, GET_EXPERIMENT, GET_GRAPH, SET_LOADING_GRAPH, CLEAN_GRAPH_DATA, UPDATE_SELECTION, GET_EXPERIMENT_RUN, SET_LOADING_RUN, CLEAN_RUN_DATA, SET_AUTOUPDATE_RUN, GET_PKL_DATA, SET_LOADING_PKL, UPDATE_NODES, SHOULD_UPDATE_GRAPH, SET_AUTOUPDATE_PKL, CLEAN_PKL_DATA, SET_PKL_CHANGES, UPDATE_EXPERIMENT_TS, SET_VIS_DATA } from '../types';\n\nconst ExperimentState = props => {\n const initialState = {\n experiments: [],\n experiment: {},\n loading: false,\n data: null,\n rundata: null,\n pkldata: null,\n pklchanges: null,\n loadingGraph: false,\n loadingRun: false,\n loadingPkl: false,\n selection: null,\n enabledGraphSearch: true,\n startAutoUpdateRun: false,\n startAutoUpdatePkl: false,\n shouldUpdateGraph: false,\n visNodes: null\n };\n\n const _useReducer = useReducer(ExperimentReducer, initialState),\n _useReducer2 = _slicedToArray(_useReducer, 2),\n state = _useReducer2[0],\n dispatch = _useReducer2[1]; // Search Experiments\n\n\n const searchExperiments = async text => {\n setLoading();\n const res = await axios.get(\"http://84.88.185.30:8888/search/\".concat(text));\n dispatch({\n type: SEARCH_EXPERIMENTS,\n payload: res.data.experiment\n });\n }; // Get Experiment\n\n\n const getExperiment = async expid => {\n setLoading(); //cleanGraphData();\n\n const res = await axios.get(\"http://84.88.185.30:8888/expinfo/\".concat(expid));\n dispatch({\n type: GET_EXPERIMENT,\n payload: res.data\n });\n }; // Get Experiment Graph\n\n\n const getExperimentGraph = async expid => {\n setLoadingGraph();\n const res = await axios.get(\"http://84.88.185.30:8888/graph/\".concat(expid));\n console.log(res.data);\n dispatch({\n type: GET_GRAPH,\n payload: res.data\n }); //this.setState({ data: res.data, loading: false, showGraph: !res.data.error });\n }; // Get Experiment Run\n\n\n const getExperimentRun = async expid => {\n setLoadingRun();\n const res = await axios.get(\"http://84.88.185.30:8888/exprun/\".concat(expid));\n console.log(res.data);\n dispatch({\n type: GET_EXPERIMENT_RUN,\n payload: res.data\n });\n }; // Get Experiment Pkl Data\n\n\n const getExperimentPkl = async (expid, timeStamp) => {\n setLoadingPkl(); //timeStamp = 1000;\n\n const res = await axios.get(\"http://84.88.185.30:8888/pklinfo/\".concat(expid, \"/\").concat(timeStamp));\n console.log(res.data); // const actualPkl = res.data;\n\n let retrievedPkl = null;\n var jobs = {};\n var changes = \"\";\n retrievedPkl = res.data;\n\n if (state.data !== null && retrievedPkl.has_changed === true && retrievedPkl.pkl_content.length > 0) {\n //console.log(retrievedPkl.pkl_content.length);\n for (var j = 0, job; j < retrievedPkl.pkl_content.length; j++) {\n job = retrievedPkl.pkl_content[j]; //console.log(job);\n\n jobs[job.name] = job; //console.log(jobs[job.name]);\n }\n\n let requireUpdate = false;\n console.log('Current ts: ' + state.data.pkl_timestamp);\n var newData = state.data; //console.log(newData.nodes);\n\n var expData = state.experiment;\n\n if (newData.nodes) {\n for (var i = 0; i < newData.nodes.length; i++) {\n // console.log(newNodes[i].id);\n //console.log(newData.nodes[i]);\n // console.log(jobs[ newNodes[i].id ]);\n if (newData.nodes[i].status_code !== jobs[newData.nodes[i].id].status_code) {\n // changes += newData.nodes[i].id + \" from \" + newData.nodes[i].status + \" to \" + jobs[ newData.nodes[i].id ].status + \" || \";\n changes += timeStampToDate(retrievedPkl.pkl_timestamp) + \": \" + newData.nodes[i].id + \" to \" + jobs[newData.nodes[i].id].status + \"\\n\";\n newData.nodes[i].status_code = jobs[newData.nodes[i].id].status_code;\n newData.nodes[i].status_color = jobs[newData.nodes[i].id].status_color;\n newData.nodes[i].status = jobs[newData.nodes[i].id].status; //console.log(newData.nodes[i].status_color)\n\n requireUpdate = true;\n }\n }\n\n if (requireUpdate) {\n // console.log(newData.pkl_timestamp);\n // console.log(expData.pkl_timestamp);\n console.log(\"New ts: \" + retrievedPkl.pkl_timestamp);\n newData.pkl_timestamp = retrievedPkl.pkl_timestamp;\n expData.pkl_timestamp = retrievedPkl.pkl_timestamp; // console.log(newData.pkl_timestamp);\n // console.log(expData.pkl_timestamp);\n // console.log('Call Update');\n\n updateNodes(newData);\n updateExperimentTimeStamp(expData);\n setUpdateGraph(true);\n setUpdateGraph(false);\n\n if (state.pklchanges) {\n setPklChanges(changes + state.pklchanges);\n } else {\n setPklChanges(changes);\n }\n } else {\n console.log('No changes but updating pkl anyway.');\n expData.pkl_timestamp = retrievedPkl.pkl_timestamp;\n updateExperimentTimeStamp(expData);\n }\n }\n } // } else {\n // var t = new Date( retrievedPkl.pkl_timestamp );\n // var formatted = t.toISOString();\n // setPklChanges(\"No news yet... \" + formatted)\n // }\n\n\n dispatch({\n type: GET_PKL_DATA,\n payload: res.data\n });\n };\n\n const updateGraphColor = (idChange, newColor) => {\n this.state.visNodes.update({\n id: idChange,\n color: {\n background: newColor\n }\n });\n }; // Cleaning\n\n\n const clearExperiments = () => dispatch({\n type: CLEAR_EXPERIMENTS\n });\n\n const cleanGraphData = () => dispatch({\n type: CLEAN_GRAPH_DATA\n });\n\n const cleanRunData = () => dispatch({\n type: CLEAN_RUN_DATA\n });\n\n const cleanPklData = () => dispatch({\n type: CLEAN_PKL_DATA\n }); // Set Loading\n\n\n const setLoading = () => dispatch({\n type: SET_LOADING\n });\n\n const setLoadingGraph = () => dispatch({\n type: SET_LOADING_GRAPH\n });\n\n const setLoadingRun = () => dispatch({\n type: SET_LOADING_RUN\n });\n\n const setLoadingPkl = () => dispatch({\n type: SET_LOADING_PKL\n }); // Action Things\n\n\n const updateSelection = currentSelection => dispatch({\n type: UPDATE_SELECTION,\n payload: currentSelection\n });\n\n const updateNodes = newdata => dispatch({\n type: UPDATE_NODES,\n payload: newdata\n });\n\n const updateExperimentTimeStamp = newExperiment => dispatch({\n type: UPDATE_EXPERIMENT_TS,\n payload: newExperiment\n });\n\n const setAutoUpdateRun = value => dispatch({\n type: SET_AUTOUPDATE_RUN,\n payload: value\n });\n\n const setAutoUpdatePkl = value => dispatch({\n type: SET_AUTOUPDATE_PKL,\n payload: value\n });\n\n const setUpdateGraph = value => dispatch({\n type: SHOULD_UPDATE_GRAPH,\n payload: value\n });\n\n const setPklChanges = value => dispatch({\n type: SET_PKL_CHANGES,\n payload: value\n });\n\n const setVisData = value => dispatch({\n type: SET_VIS_DATA,\n payload: value\n }); // Other Utils\n\n\n const hashCode = value => {\n var hash = 0,\n i,\n chr;\n if (value.length === 0) return hash;\n\n for (i = 0; i < value.length; i++) {\n chr = value.charCodeAt(i);\n hash = (hash << 5) - hash + chr;\n hash |= 0; // Convert to 32bit integer\n }\n\n console.log(hash);\n return hash;\n };\n\n const timeStampToDate = value => {\n //console.log('Setting new format: ' + value);\n let formattedDate = \"\";\n var date = new Date(value * 1000);\n var hours = date.getHours();\n var minutes = \"0\" + date.getMinutes();\n var seconds = \"0\" + date.getSeconds();\n formattedDate = hours + ':' + minutes.substr(-2) + ':' + seconds.substr(-2); // formattedDate = date.toISOString();\n\n return formattedDate;\n };\n\n return React.createElement(ExperimentContext.Provider, {\n value: {\n experiments: state.experiments,\n experiment: state.experiment,\n loading: state.loading,\n loadingGraph: state.loadingGraph,\n loadingRun: state.loadingRun,\n loadingPkl: state.loadingPkl,\n data: state.data,\n rundata: state.rundata,\n pklchanges: state.pklchanges,\n selection: state.selection,\n enabledGraphSearch: state.enabledGraphSearch,\n startAutoUpdateRun: state.startAutoUpdateRun,\n startAutoUpdatePkl: state.startAutoUpdatePkl,\n shouldUpdateGraph: state.shouldUpdateGraph,\n visNodes: state.visNodes,\n setAutoUpdateRun,\n setAutoUpdatePkl,\n searchExperiments,\n clearExperiments,\n getExperiment,\n getExperimentGraph,\n cleanGraphData,\n cleanRunData,\n cleanPklData,\n setPklChanges,\n updateSelection,\n getExperimentRun,\n getExperimentPkl,\n hashCode,\n timeStampToDate,\n setVisData,\n updateGraphColor\n },\n __source: {\n fileName: _jsxFileName,\n lineNumber: 232\n },\n __self: this\n }, props.children);\n};\n\nexport default ExperimentState;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/context/experiment/ExperimentState.js"],"names":["React","useReducer","axios","ExperimentContext","ExperimentReducer","SEARCH_EXPERIMENTS","SET_LOADING","CLEAR_EXPERIMENTS","GET_EXPERIMENT","GET_GRAPH","SET_LOADING_GRAPH","CLEAN_GRAPH_DATA","UPDATE_SELECTION","GET_EXPERIMENT_RUN","SET_LOADING_RUN","CLEAN_RUN_DATA","SET_AUTOUPDATE_RUN","GET_PKL_DATA","SET_LOADING_PKL","UPDATE_NODES","SHOULD_UPDATE_GRAPH","SET_AUTOUPDATE_PKL","CLEAN_PKL_DATA","SET_PKL_CHANGES","UPDATE_EXPERIMENT_TS","SET_VIS_DATA","ExperimentState","props","initialState","experiments","experiment","loading","data","rundata","pkldata","pklchanges","loadingGraph","loadingRun","loadingPkl","selection","enabledGraphSearch","startAutoUpdateRun","startAutoUpdatePkl","shouldUpdateGraph","visNodes","state","dispatch","searchExperiments","text","setLoading","res","get","type","payload","getExperiment","expid","getExperimentGraph","setLoadingGraph","console","log","getExperimentRun","setLoadingRun","getExperimentPkl","timeStamp","setLoadingPkl","retrievedPkl","jobs","changes","has_changed","pkl_content","length","j","job","name","requireUpdate","pkl_timestamp","newData","expData","nodes","i","status_code","id","timeStampToDate","status","status_color","updateNodes","updateExperimentTimeStamp","setUpdateGraph","setPklChanges","updateGraphColor","idChange","newColor","update","color","background","clearExperiments","cleanGraphData","cleanRunData","cleanPklData","updateSelection","currentSelection","newdata","newExperiment","setAutoUpdateRun","value","setAutoUpdatePkl","setVisData","hashCode","hash","chr","charCodeAt","formattedDate","date","Date","hours","getHours","minutes","getMinutes","seconds","getSeconds","substr","children"],"mappings":";;AAAA,OAAOA,KAAP,IAAgBC,UAAhB,QAAkC,OAAlC;AACA,OAAOC,KAAP,MAAkB,OAAlB;AACA,OAAOC,iBAAP,MAA8B,qBAA9B;AACA,OAAOC,iBAAP,MAA8B,qBAA9B;AACA,SACEC,kBADF,EA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6C,MAAAA,QA7BI;AA8BJzB,MAAAA,eA9BI;AA+BJwB,MAAAA,UA/BI;AAgCJjB,MAAAA;AAhCI,KADR;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KAmCK9D,KAAK,CAAC8F,QAnCX,CADJ;AAuCH,CAjPD;;AAmPA,eAAe/F,eAAf","sourcesContent":["import React, { useReducer } from 'react';\nimport axios from 'axios';\nimport ExperimentContext from './experimentContext';\nimport ExperimentReducer from './experimentReducer';\nimport {\n SEARCH_EXPERIMENTS,\n SET_LOADING,\n CLEAR_EXPERIMENTS,\n GET_EXPERIMENT,\n GET_GRAPH,\n SET_LOADING_GRAPH,\n CLEAN_GRAPH_DATA,\n UPDATE_SELECTION,\n GET_EXPERIMENT_RUN,\n SET_LOADING_RUN,\n CLEAN_RUN_DATA,\n SET_AUTOUPDATE_RUN,\n GET_PKL_DATA,\n SET_LOADING_PKL,\n UPDATE_NODES,\n SHOULD_UPDATE_GRAPH,\n SET_AUTOUPDATE_PKL,\n CLEAN_PKL_DATA,\n SET_PKL_CHANGES,\n UPDATE_EXPERIMENT_TS,\n SET_VIS_DATA,\n} from '../types';\n\nconst ExperimentState = props => {\n const initialState = {\n experiments: [],\n experiment: {},\n loading: false,\n data: null,\n rundata: null,\n pkldata: null,\n pklchanges: null,\n loadingGraph: false,\n loadingRun: false,\n loadingPkl: false,\n selection: null,\n enabledGraphSearch: true, \n startAutoUpdateRun: false, \n startAutoUpdatePkl: false,\n shouldUpdateGraph: false, \n visNodes: null, \n }\n\n const [state, dispatch] = useReducer(ExperimentReducer, initialState);\n\n // Search Experiments\n const searchExperiments = async text => {\n setLoading();\n const res = await axios.get(`http://84.88.185.30:8888/search/${text}`);\n dispatch({\n type: SEARCH_EXPERIMENTS,\n payload: res.data.experiment,\n });\n };\n\n // Get Experiment\n const getExperiment = async expid => {\n setLoading();\n //cleanGraphData();\n const res = await axios.get(`http://84.88.185.30:8888/expinfo/${expid}`); \n dispatch({\n type: GET_EXPERIMENT,\n payload: res.data,\n });\n };\n \n // Get Experiment Graph\n const getExperimentGraph = async expid => {\n setLoadingGraph();\n \n const res = await axios.get(`http://84.88.185.30:8888/graph/${expid}`);\n console.log(res.data);\n dispatch({\n type: GET_GRAPH,\n payload: res.data,\n });\n //this.setState({ data: res.data, loading: false, showGraph: !res.data.error });\n };\n\n // Get Experiment Run\n const getExperimentRun = async expid => {\n setLoadingRun();\n const res = await axios.get(`http://84.88.185.30:8888/exprun/${expid}`);\n console.log(res.data);\n dispatch({\n type: GET_EXPERIMENT_RUN,\n payload: res.data,\n });\n }\n\n // Get Experiment Pkl Data\n const getExperimentPkl = async (expid, timeStamp) => {\n setLoadingPkl();\n //timeStamp = 1000;\n const res = await axios.get(`http://84.88.185.30:8888/pklinfo/${expid}/${timeStamp}`);\n console.log(res.data);\n // const actualPkl = res.data;\n \n let retrievedPkl = null;\n var jobs = {}\n var changes = \"\"\n retrievedPkl = res.data;\n if (state.data !== null && retrievedPkl.has_changed === true && retrievedPkl.pkl_content.length > 0){\n //console.log(retrievedPkl.pkl_content.length);\n for(var j = 0, job; j < retrievedPkl.pkl_content.length; j++){\n job = retrievedPkl.pkl_content[j];\n //console.log(job);\n jobs[ job.name ] = job;\n //console.log(jobs[job.name]);\n }\n let requireUpdate = false;\n console.log('Current ts: '+ state.data.pkl_timestamp); \n var newData = state.data;\n //console.log(newData.nodes);\n var expData = state.experiment;\n if (newData.nodes){\n for(var i = 0; i < newData.nodes.length; i++){\n // console.log(newNodes[i].id);\n //console.log(newData.nodes[i]);\n // console.log(jobs[ newNodes[i].id ]);\n\n if (newData.nodes[i].status_code !== jobs[ newData.nodes[i].id ].status_code){\n // changes += newData.nodes[i].id + \" from \" + newData.nodes[i].status + \" to \" + jobs[ newData.nodes[i].id ].status + \" || \";\n changes += timeStampToDate(retrievedPkl.pkl_timestamp) + \": \"+ newData.nodes[i].id + \" to \" + jobs[ newData.nodes[i].id ].status + \"\\n\";\n newData.nodes[i].status_code = jobs[ newData.nodes[i].id ].status_code;\n newData.nodes[i].status_color = jobs[ newData.nodes[i].id ].status_color;\n newData.nodes[i].status = jobs[ newData.nodes[i].id ].status;\n //console.log(newData.nodes[i].status_color)\n requireUpdate = true;\n }\n }\n if (requireUpdate){ \n // console.log(newData.pkl_timestamp);\n // console.log(expData.pkl_timestamp);\n console.log(\"New ts: \" + retrievedPkl.pkl_timestamp)\n newData.pkl_timestamp = retrievedPkl.pkl_timestamp;\n expData.pkl_timestamp = retrievedPkl.pkl_timestamp;\n // console.log(newData.pkl_timestamp);\n // console.log(expData.pkl_timestamp);\n \n // console.log('Call Update');\n updateNodes(newData);\n updateExperimentTimeStamp(expData);\n setUpdateGraph(true);\n setUpdateGraph(false);\n if (state.pklchanges){\n setPklChanges(changes + state.pklchanges);\n } else {\n setPklChanges(changes);\n }\n \n \n } else { \n console.log('No changes but updating pkl anyway.')\n expData.pkl_timestamp = retrievedPkl.pkl_timestamp;\n updateExperimentTimeStamp(expData);\n }\n }\n }\n // } else {\n // var t = new Date( retrievedPkl.pkl_timestamp );\n // var formatted = t.toISOString();\n // setPklChanges(\"No news yet... \" + formatted)\n // }\n\n\n dispatch({\n type: GET_PKL_DATA,\n payload: res.data,\n });\n }\n\n const updateGraphColor = (idChange, newColor) => {\n this.state.visNodes.update({id:idChange, color: { background: newColor }});\n }\n\n\n // Cleaning\n const clearExperiments = () => dispatch({ type: CLEAR_EXPERIMENTS });\n const cleanGraphData = () => dispatch({ type: CLEAN_GRAPH_DATA });\n const cleanRunData = () => dispatch({ type: CLEAN_RUN_DATA });\n const cleanPklData = () => dispatch({ type: CLEAN_PKL_DATA });\n\n // Set Loading\n const setLoading = () => dispatch({ type: SET_LOADING });\n const setLoadingGraph = () => dispatch({ type: SET_LOADING_GRAPH });\n const setLoadingRun = () => dispatch({ type: SET_LOADING_RUN });\n const setLoadingPkl = () => dispatch({ type: SET_LOADING_PKL });\n\n\n // Action Things\n const updateSelection = (currentSelection) => dispatch({ type: UPDATE_SELECTION, payload: currentSelection });\n const updateNodes = (newdata) => dispatch({ type: UPDATE_NODES, payload: newdata });\n const updateExperimentTimeStamp = (newExperiment) => dispatch({ type: UPDATE_EXPERIMENT_TS, payload: newExperiment});\n const setAutoUpdateRun = (value) => dispatch({ type: SET_AUTOUPDATE_RUN, payload: value });\n const setAutoUpdatePkl = (value) => dispatch({ type: SET_AUTOUPDATE_PKL, payload: value });\n const setUpdateGraph = (value) => dispatch({ type: SHOULD_UPDATE_GRAPH, payload: value });\n const setPklChanges = (value) => dispatch({ type: SET_PKL_CHANGES, payload: value });\n const setVisData = (value) => dispatch({ type: SET_VIS_DATA, payload: value});\n\n // Other Utils\n const hashCode = (value) => {\n var hash = 0, i, chr;\n if (value.length === 0) return hash;\n for (i = 0; i < value.length; i++) {\n chr = value.charCodeAt(i);\n hash = ((hash << 5) - hash) + chr;\n hash |= 0; // Convert to 32bit integer\n }\n console.log(hash);\n return hash;\n };\n \n const timeStampToDate = (value) => {\n //console.log('Setting new format: ' + value);\n let formattedDate = \"\";\n var date = new Date( value * 1000);\n var hours = date.getHours();\n var minutes = \"0\" + date.getMinutes();\n var seconds = \"0\" + date.getSeconds();\n formattedDate = hours + ':' + minutes.substr(-2) + ':' + seconds.substr(-2);\n // formattedDate = date.toISOString();\n return formattedDate;\n }\n\n return (\n \n {props.children}\n \n );\n};\n\nexport default ExperimentState;"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/2545473beb0fdd7a33dba616997a80a3.json b/node_modules/.cache/babel-loader/2545473beb0fdd7a33dba616997a80a3.json new file mode 100644 index 0000000000000000000000000000000000000000..b443a06b9d29269dcb392eab2c5559fb164373de --- /dev/null +++ b/node_modules/.cache/babel-loader/2545473beb0fdd7a33dba616997a80a3.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js\";\nimport React, { Component } from \"react\"; // import vis from \"vis-network\";\n\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis-network\";\n\nclass GraphNativeRep extends Component {\n constructor(...args) {\n super(...args);\n\n this.updateVisNodes = nodes => {\n this.props.setVisData(nodes);\n };\n }\n\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else if (nextProps.data && this.props.data && nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp) {\n console.log(\"Rerendering\");\n return true;\n } else if (nextProps.loadingGraph !== this.props.loadingGraph) {\n return true;\n } else {\n return false;\n }\n }\n\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n render() {\n if (this.props.loadingGraph) return React.createElement(Spinner, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 32\n },\n __self: this\n });\n\n if (this.props.data == null) {\n return React.createElement(\"div\", {\n className: \"card-body text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 35\n },\n __self: this\n }, React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Press \", React.createElement(\"span\", {\n className: \"badge badge-info\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Show Graph\"), \" to see the graph representation of the experiment.\"), React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"If the experiment is running, press \", React.createElement(\"span\", {\n className: \"badge badge-dark\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"Start Job Monitor\"), \" to start a live tracker of the changes on the experiment's jobs. This process will automatically update the graph's nodes colors and show a log of the detected changes.\"));\n }\n\n var nodes_array = [];\n var edges_array = [];\n\n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: {\n background: node.status_color,\n border: \"black\"\n },\n level: node.level\n }));\n this.props.data.edges.map(edge => edges_array.push({\n from: edge.from,\n to: edge.to\n }));\n }\n\n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n const options = {\n edges: {\n arrows: {\n to: {\n enabled: true\n }\n }\n },\n layout: {\n //improvedLayout: true,\n hierarchical: {\n nodeSpacing: 190,\n blockShifting: false,\n edgeMinimization: true,\n parentCentralization: true,\n sortMethod: 'hubsize',\n direction: 'UD' // work on vis current version\n // nodeSpacing: 190,\n // blockShifting: false,\n // edgeMinimization: false,\n // parentCentralization: true,\n // sortMethod: 'hubsize',\n // direction: 'UD',\n\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true\n },\n physics: {\n enabled: false\n },\n nodes: {\n shape: 'dot',\n font: {\n size: 10\n }\n }\n };\n const graph = {\n nodes: nodes,\n edges: edges\n };\n\n class VisNetwork extends Component {\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else {\n return false;\n }\n }\n\n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", params => {\n //console.log(params);\n if (params.nodes) {\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n });\n } // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n\n\n render() {\n return React.createElement(\"div\", {\n className: \"card-body p-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 140\n },\n __self: this\n }, React.createElement(\"div\", {\n ref: \"myRef\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 141\n },\n __self: this\n }));\n }\n\n }\n\n this.updateVisNodes(nodes);\n return React.createElement(VisNetwork, {\n graph: graph,\n options: options,\n updateSelection: this.props.updateSelection,\n shouldUpdateGraph: this.props.shouldUpdateGraph,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 149\n },\n __self: this\n });\n }\n\n}\n\nconst experimentStyle = {\n height: 600\n};\nexport default GraphNativeRep;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js"],"names":["React","Component","Spinner","vis","GraphNativeRep","updateVisNodes","nodes","props","setVisData","shouldComponentUpdate","nextProps","nextState","shouldUpdateGraph","data","pkl_timestamp","console","log","loadingGraph","componentWillUnmount","cleanGraphData","render","nodes_array","edges_array","edges","map","node","push","id","label","color","background","status_color","border","level","edge","from","to","DataSet","options","arrows","enabled","layout","hierarchical","nodeSpacing","blockShifting","edgeMinimization","parentCentralization","sortMethod","direction","interaction","dragNodes","hoverConnectedEdges","navigationButtons","physics","shape","font","size","graph","VisNetwork","componentDidMount","network","Network","refs","myRef","on","params","updateSelection","experimentStyle","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,SAAhB,QAAiC,OAAjC,C,CACA;;AACA,OAAOC,OAAP,MAAoB,mBAApB;AACA,OAAOC,GAAP,MAAgB,aAAhB;;AAEA,MAAMC,cAAN,SAA6BH,SAA7B,CAAuC;AAAA;AAAA;;AAAA,SAmBnCI,cAnBmC,GAmBjBC,KAAD,IAAW;AACxB,WAAKC,KAAL,CAAWC,UAAX,CAAsBF,KAAtB;AACH,KArBkC;AAAA;;AAEnCG,EAAAA,qBAAqB,CAACC,SAAD,EAAYC,SAAZ,EAAsB;AACvC,QAAI,KAAKJ,KAAL,CAAWK,iBAAX,KAAiC,IAArC,EAA0C;AACtC,aAAO,IAAP;AACD,KAFH,MAEQ,IAAIF,SAAS,CAACG,IAAV,IAAkB,KAAKN,KAAL,CAAWM,IAA7B,IAAsCH,SAAS,CAACG,IAAV,CAAeC,aAAf,KAAiC,KAAKP,KAAL,CAAWM,IAAX,CAAgBC,aAA3F,EAA0G;AAC9GC,MAAAA,OAAO,CAACC,GAAR,CAAY,aAAZ;AACA,aAAO,IAAP;AACD,KAHK,MAGA,IAAIN,SAAS,CAACO,YAAV,KAA2B,KAAKV,KAAL,CAAWU,YAA1C,EAAuD;AAC3D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Ae,EAAE,KAAK/B,KAAL,CAAW2D,eAHzB;AAIH,MAAA,iBAAiB,EAAE,KAAK3D,KAAL,CAAWK,iBAJ3B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAAP;AAOH;;AAtJkC;;AAoKvC,MAAMuD,eAAe,GAAG;AACpBC,EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,eAAehE,cAAf","sourcesContent":["import React, { Component } from \"react\";\n// import vis from \"vis-network\";\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis-network\";\n\nclass GraphNativeRep extends Component {\n\n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true\n }else if (nextProps.data && this.props.data && (nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp)){\n console.log(\"Rerendering\")\n return true;\n }else if (nextProps.loadingGraph !== this.props.loadingGraph){\n return true; \n }else{\n return false;\n }\n }\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n updateVisNodes = (nodes) => {\n this.props.setVisData(nodes);\n }\n\n\n\n render () {\n if (this.props.loadingGraph) return ;\n if (this.props.data == null){\n return (\n
\n

Press Show Graph to see the graph representation of the experiment.

\n

If the experiment is running, press Start Job Monitor to start a live tracker of the changes on the experiment's jobs.\n This process will automatically update the graph's nodes colors and show a log of the detected changes.\n

\n
\n );\n }\n\n var nodes_array = [];\n var edges_array = [];\n \n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: { background: node.status_color, border: \"black\" },\n level: node.level,\n })\n );\n \n this.props.data.edges.map(edge => \n edges_array.push({ from: edge.from, to: edge.to })\n );\n }\n \n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n\n\n const options = {\n edges: {\n arrows: {\n to: { enabled: true }\n }\n },\n layout: {\n //improvedLayout: true,\n hierarchical: {\n nodeSpacing: 190,\n blockShifting: false,\n edgeMinimization: true,\n parentCentralization: true,\n sortMethod: 'hubsize',\n direction: 'UD',\n // work on vis current version\n // nodeSpacing: 190,\n // blockShifting: false,\n // edgeMinimization: false,\n // parentCentralization: true,\n // sortMethod: 'hubsize',\n // direction: 'UD',\n }\n }, \n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true,\n },\n physics: {\n enabled: false,\n },\n nodes: {\n shape: 'dot',\n font: {\n size: 10,\n },\n }\n };\n \n const graph = {\n nodes : nodes,\n edges : edges,\n };\n\n class VisNetwork extends Component {\n \n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true;\n } else {\n return false;\n }\n }\n \n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", (params) => {\n //console.log(params);\n if (params.nodes){\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n \n });\n }\n \n // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n \n render() { \n return (\n
\n
\n
\n );\n }\n }\n\n this.updateVisNodes(nodes);\n \n return ;\n\n }\n\n\n \n\n \n\n \n \n\n \n\n}\n\nconst experimentStyle = {\n height: 600\n };\n\nexport default GraphNativeRep;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/2810c9fb515d4f42652f70b6e0499580.json b/node_modules/.cache/babel-loader/2810c9fb515d4f42652f70b6e0499580.json new file mode 100644 index 0000000000000000000000000000000000000000..ce1832dbec76738c4b89961f9195a39ad1dbab76 --- /dev/null +++ b/node_modules/.cache/babel-loader/2810c9fb515d4f42652f70b6e0499580.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js\";\nimport React, { Component, useContext } from \"react\"; // import vis from \"vis-network\";\n\nimport Spinner from \"../layout/Spinner\";\nimport ExperimentContext from '../context/experiment/experimentContext';\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n constructor(...args) {\n super(...args);\n\n this.componentWillUnmount = () => {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n };\n }\n\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else if (nextProps.data && this.props.data && nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp) {\n console.log(\"Rerendering\");\n return true;\n } else if (nextProps.loadingGraph !== this.props.loadingGraph) {\n return true;\n } else {\n return false;\n }\n }\n\n render() {\n if (this.props.loadingGraph) return React.createElement(Spinner, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 30\n },\n __self: this\n });\n\n if (this.props.data == null) {\n return React.createElement(\"div\", {\n className: \"card-body text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 33\n },\n __self: this\n }, React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 34\n },\n __self: this\n }, \"Press \", React.createElement(\"span\", {\n className: \"badge badge-info\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 34\n },\n __self: this\n }, \"Show Graph\"), \" to see the graph representation of the experiment.\"), React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 35\n },\n __self: this\n }, \"If the experiment is running, press \", React.createElement(\"span\", {\n className: \"badge badge-dark\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 35\n },\n __self: this\n }, \"Start Job Monitor\"), \" to start a live tracker of the changes on the experiment's jobs. This process will automatically update the graph's nodes colors and show a log of the detected changes.\"));\n }\n\n var nodes_array = [];\n var edges_array = [];\n\n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: {\n background: node.status_color,\n border: \"black\"\n } //level: node.priority,\n\n }));\n this.props.data.edges.map(edge => edges_array.push({\n from: edge.from,\n to: edge.to\n }));\n }\n\n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n const options = {\n edges: {\n arrows: {\n to: {\n enabled: true\n }\n }\n },\n layout: {\n improvedLayout: true,\n hierarchical: {\n nodeSpacing: 250,\n edgeMinimization: false,\n blockShifting: false,\n parentCentralization: false,\n direction: 'UD',\n sortMethod: 'directed'\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true\n },\n physics: {\n enabled: false\n },\n nodes: {\n shape: 'dot'\n }\n };\n const graph = {\n nodes: nodes,\n edges: edges\n };\n\n class VisNetwork extends Component {\n // shouldComponentUpdate(nextProps, nextState){ \n // if (nextProps.loadingGraph !== this.props.loadingGraph){\n // return true; \n // }else{\n // return false;\n // }\n // }\n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", params => {\n console.log(params);\n\n if (params.nodes) {\n console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n });\n }\n\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n render() {\n return React.createElement(\"div\", {\n className: \"card-body p-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 128\n },\n __self: this\n }, React.createElement(\"div\", {\n ref: \"myRef\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 129\n },\n __self: this\n }));\n }\n\n }\n\n return React.createElement(VisNetwork, {\n graph: graph,\n options: options,\n updateSelection: this.props.updateSelection,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 135\n },\n __self: this\n });\n }\n\n}\n\nconst experimentStyle = {\n height: 600\n};\nexport default GraphNativeRep;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js"],"names":["React","Component","useContext","Spinner","ExperimentContext","vis","GraphNativeRep","componentWillUnmount","console","log","props","cleanGraphData","shouldComponentUpdate","nextProps","nextState","shouldUpdateGraph","data","pkl_timestamp","loadingGraph","render","nodes_array","edges_array","nodes","edges","map","node","push","id","label","color","background","status_color","border","edge","from","to","DataSet","options","arrows","enabled","layout","improvedLayout","hierarchical","nodeSpacing","edgeMinimization","blockShifting","parentCentralization","direction","sortMethod","interaction","dragNodes","hoverConnectedEdges","navigationButtons","physics","shape","graph","VisNetwork","componentDidMount","network","Network","refs","myRef","on","params","updateSelection","experimentStyle","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,SAAhB,EAA2BC,UAA3B,QAA6C,OAA7C,C,CACA;;AACA,OAAOC,OAAP,MAAoB,mBAApB;AACA,OAAOC,iBAAP,MAA8B,yCAA9B;AACA,OAAOC,GAAP,MAAgB,KAAhB;;AAEA,MAAMC,cAAN,SAA6BL,SAA7B,CAAuC;AAAA;AAAA;;AAAA,SAenCM,oBAfmC,GAeZ,MAAM;AACzBC,MAAAA,OAAO,CAACC,GAAR,CAAY,YAAZ;AACA,WAAKC,KAAL,CAAWC,cAAX;AACH,KAlBkC;AAAA;;AAEnCC,EAAAA,qBAAqB,CAACC,SAAD,EAAYC,SAAZ,EAAsB;AAEvC,QAAI,KAAKJ,KAAL,CAAWK,iBAAX,KAAiC,IAArC,EAA0C;AACxC,aAAO,IAAP;AACD,KAFD,MAEM,IAAIF,SAAS,CAACG,IAAV,IAAkB,KAAKN,KAAL,CAAWM,IAA7B,IAAsCH,SAAS,CAACG,IAAV,CAAeC,aAAf,KAAiC,KAAKP,KAAL,CAAWM,IAAX,CAAgBC,aAA3F,EAA0G;AAC9GT,MAAAA,OAAO,CAACC,GAAR,CAAY,aAAZ;AACA,aAAO,IAAP;AACD,KAHK,MAGA,IAAII,SAAS,CAACK,YAAV,KAA2B,KAAKR,KAAL,CAAWQ,YAA1C,EAAuD;AAC3D,aAAO,IAAP;AACD,KAFK,MAED;AACH,aAAO,KAAP;AACD;AACJ;;AAQDC,EAAAA,MAAM,GAAG;AACL,QAAI,KAAKT,KAAL,CAAWQ,YAAf,EAA6B,OAAO,o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B,KAAKC,IAAL,CAAUC,KAA1B,EAAiC,KAAKnD,KAAL,CAAW6C,KAA5C,EAAmD,KAAK7C,KAAL,CAAW2B,OAA9D,CAAd;AACAqB,QAAAA,OAAO,CAACI,EAAR,CAAW,OAAX,EAAqBC,MAAD,IAAY;AAC5BvD,UAAAA,OAAO,CAACC,GAAR,CAAYsD,MAAZ;;AACA,cAAIA,MAAM,CAACzC,KAAX,EAAiB;AACbd,YAAAA,OAAO,CAACC,GAAR,CAAYsD,MAAM,CAACzC,KAAnB;AACA,iBAAKZ,KAAL,CAAWsD,eAAX,CAA2BD,MAAM,CAACzC,KAAlC;AACH;AAEJ,SAPD;AAQH;;AAEDf,MAAAA,oBAAoB,GAAG;AACnBC,QAAAA,OAAO,CAACC,GAAR,CAAY,YAAZ;AACA,aAAKC,KAAL,CAAWC,cAAX;AACH;;AAEDQ,MAAAA,MAAM,GAAG;AACL,eACI;AAAK,UAAA,SAAS,EAAC,eAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,WACI;AAAK,UAAA,GAAG,EAAC,OAAT;AAAiB,UAAA,KAAK,EAAE8C,eAAxB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,UADJ,CADJ;AAKH;;AAjC8B;;AAoCnC,WAAO,oBAAC,UAAD;AAAY,MAAA,KAAK,EAAEV,KAAnB;AAA0B,MAAA,OAAO,EAAElB,OAAnC;AAA4C,MAAA,eAAe,EAAE,KAAK3B,KAAL,CAAWsD,eAAxE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAAP;AAEH;;AAlIkC;;AAgJvC,MAAMC,eAAe,GAAG;AACpBC,EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,eAAe5D,cAAf","sourcesContent":["import React, { Component, useContext } from \"react\";\n// import vis from \"vis-network\";\nimport Spinner from \"../layout/Spinner\";\nimport ExperimentContext from '../context/experiment/experimentContext';\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n\n shouldComponentUpdate(nextProps, nextState){ \n \n if (this.props.shouldUpdateGraph === true){\n return true\n }else if (nextProps.data && this.props.data && (nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp)){\n console.log(\"Rerendering\")\n return true;\n }else if (nextProps.loadingGraph !== this.props.loadingGraph){\n return true; \n }else{\n return false;\n }\n }\n componentWillUnmount = () => {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n\n\n render() {\n if (this.props.loadingGraph) return ;\n if (this.props.data == null){\n return (\n
\n

Press Show Graph to see the graph representation of the experiment.

\n

If the experiment is running, press Start Job Monitor to start a live tracker of the changes on the experiment's jobs.\n This process will automatically update the graph's nodes colors and show a log of the detected changes.\n

\n
\n );\n }\n\n var nodes_array = [];\n var edges_array = [];\n \n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: { background: node.status_color, border: \"black\" },\n //level: node.priority,\n })\n );\n \n this.props.data.edges.map(edge => \n edges_array.push({ from: edge.from, to: edge.to })\n );\n }\n \n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n\n const options = {\n edges: {\n arrows: {\n to: { enabled: true }\n }\n },\n layout: {\n improvedLayout: true,\n hierarchical: {\n \n nodeSpacing: 250,\n edgeMinimization: false,\n blockShifting: false,\n parentCentralization: false,\n direction: 'UD',\n sortMethod: 'directed',\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true,\n },\n physics: {\n enabled: false,\n },\n nodes: {\n shape: 'dot',\n }\n };\n \n const graph = {\n nodes : nodes,\n edges : edges,\n };\n\n class VisNetwork extends Component {\n \n // shouldComponentUpdate(nextProps, nextState){ \n // if (nextProps.loadingGraph !== this.props.loadingGraph){\n // return true; \n // }else{\n // return false;\n // }\n // }\n \n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", (params) => {\n console.log(params);\n if (params.nodes){\n console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n \n });\n }\n \n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n \n render() { \n return (\n
\n
\n
\n );\n }\n }\n \n return ;\n\n }\n\n\n \n\n \n\n \n \n\n \n\n}\n\nconst experimentStyle = {\n height: 600\n };\n\nexport default GraphNativeRep;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/2aba933447eb6140cb5f4f44f6300f22.json b/node_modules/.cache/babel-loader/2aba933447eb6140cb5f4f44f6300f22.json new file mode 100644 index 0000000000000000000000000000000000000000..cb153dcc6066555fcf121fed792c4408bb81cc20 --- /dev/null +++ b/node_modules/.cache/babel-loader/2aba933447eb6140cb5f4f44f6300f22.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js\";\nimport React, { Component } from \"react\"; // import vis from \"vis-network\";\n\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n constructor(...args) {\n super(...args);\n\n this.updateVisNodes = nodes => {\n this.props.setVisData(nodes);\n };\n }\n\n shouldComponentUpdate(nextProps, nextState) {\n if (nextProps.data && this.props.data) {\n console.log(\"Rerendering\");\n return true;\n } else if (nextProps.loadingGraph !== this.props.loadingGraph) {\n return true;\n } else {\n return false;\n }\n }\n\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n render() {\n if (this.props.loadingGraph) return React.createElement(Spinner, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 31\n },\n __self: this\n });\n\n if (this.props.data == null) {\n return React.createElement(\"div\", {\n className: \"card-body text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 34\n },\n __self: this\n }, React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 35\n },\n __self: this\n }, \"Press \", React.createElement(\"span\", {\n className: \"badge badge-info\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 35\n },\n __self: this\n }, \"Show Graph\"), \" to see the graph representation of the experiment.\"), React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"If the experiment is running, press \", React.createElement(\"span\", {\n className: \"badge badge-dark\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Start Job Monitor\"), \" to start a live tracker of the changes on the experiment's jobs. This process will automatically update the graph's nodes colors and show a log of the detected changes.\"));\n }\n\n var nodes_array = [];\n var edges_array = [];\n\n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: {\n background: node.status_color,\n border: \"black\"\n } //level: node.priority,\n\n }));\n this.props.data.edges.map(edge => edges_array.push({\n from: edge.from,\n to: edge.to\n }));\n }\n\n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n const options = {\n edges: {\n arrows: {\n to: {\n enabled: true\n }\n }\n },\n layout: {\n improvedLayout: true,\n hierarchical: {\n nodeSpacing: 250,\n edgeMinimization: false,\n blockShifting: false,\n parentCentralization: false,\n direction: 'UD',\n sortMethod: 'directed'\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true\n },\n physics: {\n enabled: false\n },\n nodes: {\n shape: 'dot'\n }\n };\n const graph = {\n nodes: nodes,\n edges: edges\n };\n\n class VisNetwork extends Component {\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else {\n return false;\n }\n }\n\n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", params => {\n //console.log(params);\n if (params.nodes) {\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n });\n } // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n\n\n render() {\n return React.createElement(\"div\", {\n className: \"card-body p-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 130\n },\n __self: this\n }, React.createElement(\"div\", {\n ref: \"myRef\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 131\n },\n __self: this\n }));\n }\n\n }\n\n this.updateVisNodes(nodes);\n return React.createElement(VisNetwork, {\n graph: graph,\n options: options,\n updateSelection: this.props.updateSelection,\n shouldUpdateGraph: this.props.shouldUpdateGraph,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 139\n },\n __self: this\n });\n }\n\n}\n\nconst experimentStyle = {\n height: 600\n};\nexport default GraphNativeRep;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js"],"names":["React","Component","Spinner","vis","GraphNativeRep","updateVisNodes","nodes","props","setVisData","shouldComponentUpdate","nextProps","nextState","data","console","log","loadingGraph","componentWillUnmount","cleanGraphData","render","nodes_array","edges_array","edges","map","node","push","id","label","color","background","status_color","border","edge","from","to","DataSet","options","arrows","enabled","layout","improvedLayout","hierarchical","nodeSpacing","edgeMinimization","blockShifting","parentCentralization","direction","sortMethod","interaction","dragNodes","hoverConnectedEdges","navigationButtons","physics","shape","graph","VisNetwork","shouldUpdateGraph","componentDidMount","network","Network","refs","myRef","on","params","updateSelection","experimentStyle","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,SAAhB,QAAiC,OAAjC,C,CACA;;AACA,OAAOC,OAAP,MAAoB,mBAApB;AACA,OAAOC,GAAP,MAAgB,KAAhB;;AAEA,MAAMC,cAAN,SAA6BH,SAA7B,CAAuC;AAAA;AAAA;;AAAA,SAkBnCI,cAlBmC,GAkBjBC,KAAD,IAAW;AACxB,WAAKC,KAAL,CAAWC,UAAX,CAAsBF,KAAtB;AACH,KApBkC;AAAA;;AAEnCG,EAAAA,qBAAqB,CAACC,SA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;;AAoCnC,SAAK3D,cAAL,CAAoBC,KAApB;AAEA,WAAO,oBAAC,UAAD;AACH,MAAA,KAAK,EAAE+C,KADJ;AAEH,MAAA,OAAO,EAAElB,OAFN;AAGH,MAAA,eAAe,EAAE,KAAK5B,KAAL,CAAWwD,eAHzB;AAIH,MAAA,iBAAiB,EAAE,KAAKxD,KAAL,CAAWgD,iBAJ3B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAAP;AAOH;;AA5IkC;;AA0JvC,MAAMS,eAAe,GAAG;AACpBC,EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,eAAe7D,cAAf","sourcesContent":["import React, { Component } from \"react\";\n// import vis from \"vis-network\";\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n\n shouldComponentUpdate(nextProps, nextState){ \n \n if (nextProps.data && this.props.data){\n console.log(\"Rerendering\")\n return true;\n }else if (nextProps.loadingGraph !== this.props.loadingGraph){\n return true; \n }else{\n return false;\n }\n }\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n updateVisNodes = (nodes) => {\n this.props.setVisData(nodes);\n }\n\n\n\n render () {\n if (this.props.loadingGraph) return ;\n if (this.props.data == null){\n return (\n
\n

Press Show Graph to see the graph representation of the experiment.

\n

If the experiment is running, press Start Job Monitor to start a live tracker of the changes on the experiment's jobs.\n This process will automatically update the graph's nodes colors and show a log of the detected changes.\n

\n
\n );\n }\n\n var nodes_array = [];\n var edges_array = [];\n \n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: { background: node.status_color, border: \"black\" },\n //level: node.priority,\n })\n );\n \n this.props.data.edges.map(edge => \n edges_array.push({ from: edge.from, to: edge.to })\n );\n }\n \n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n\n\n const options = {\n edges: {\n arrows: {\n to: { enabled: true }\n }\n },\n layout: {\n improvedLayout: true,\n hierarchical: {\n \n nodeSpacing: 250,\n edgeMinimization: false,\n blockShifting: false,\n parentCentralization: false,\n direction: 'UD',\n sortMethod: 'directed',\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true,\n },\n physics: {\n enabled: false,\n },\n nodes: {\n shape: 'dot',\n }\n };\n \n const graph = {\n nodes : nodes,\n edges : edges,\n };\n\n class VisNetwork extends Component {\n \n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true;\n } else {\n return false;\n }\n }\n \n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", (params) => {\n //console.log(params);\n if (params.nodes){\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n \n });\n }\n \n // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n \n render() { \n return (\n
\n
\n
\n );\n }\n }\n\n this.updateVisNodes(nodes);\n \n return ;\n\n }\n\n\n \n\n \n\n \n \n\n \n\n}\n\nconst experimentStyle = {\n height: 600\n };\n\nexport default GraphNativeRep;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/2cf1b562f3046325ef0863cc0e34b11f.json b/node_modules/.cache/babel-loader/2cf1b562f3046325ef0863cc0e34b11f.json new file mode 100644 index 0000000000000000000000000000000000000000..e78369f8ba8bbdddc7a72ede3d1d3fff0ffb391f --- /dev/null +++ b/node_modules/.cache/babel-loader/2cf1b562f3046325ef0863cc0e34b11f.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js\";\nimport React, { Component } from \"react\"; // import vis from \"vis-network\";\n\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n constructor(...args) {\n super(...args);\n\n this.updateVisNodes = nodes => {\n this.props.setVisData(nodes);\n };\n }\n\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else if (nextProps.data && this.props.data && nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp) {\n console.log(\"Rerendering\");\n return true;\n } else if (nextProps.loadingGraph !== this.props.loadingGraph) {\n return true;\n } else {\n return false;\n }\n }\n\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n render() {\n if (this.props.loadingGraph) return React.createElement(Spinner, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 32\n },\n __self: this\n });\n\n if (this.props.data == null) {\n return React.createElement(\"div\", {\n className: \"card-body text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 35\n },\n __self: this\n }, React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Press \", React.createElement(\"span\", {\n className: \"badge badge-info\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Show Graph\"), \" to see the graph representation of the experiment.\"), React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"If the experiment is running, press \", React.createElement(\"span\", {\n className: \"badge badge-dark\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"Start Job Monitor\"), \" to start a live tracker of the changes on the experiment's jobs. This process will automatically update the graph's nodes colors and show a log of the detected changes.\"));\n }\n\n var nodes_array = [];\n var edges_array = [];\n\n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: {\n background: node.status_color,\n border: \"black\"\n },\n level: node.level\n }));\n this.props.data.edges.map(edge => edges_array.push({\n from: edge.from,\n to: edge.to\n }));\n }\n\n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n const options = {\n edges: {\n arrows: {\n to: {\n enabled: true\n }\n }\n },\n layout: {\n improvedLayout: true,\n hierarchical: {\n nodeSpacing: 190,\n blockShifting: true,\n edgeMinimization: true,\n //parentCentralization: true,\n sortMethod: 'directed',\n direction: 'UD'\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true\n },\n physics: {\n enabled: false\n },\n nodes: {\n shape: 'dot',\n font: {\n size: 10\n }\n }\n };\n const graph = {\n nodes: nodes,\n edges: edges\n };\n\n class VisNetwork extends Component {\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else {\n return false;\n }\n }\n\n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", params => {\n //console.log(params);\n if (params.nodes) {\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n });\n } // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n\n\n render() {\n return React.createElement(\"div\", {\n className: \"card-body p-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 133\n },\n __self: this\n }, React.createElement(\"div\", {\n ref: \"myRef\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 134\n },\n __self: this\n }));\n }\n\n }\n\n this.updateVisNodes(nodes);\n return React.createElement(VisNetwork, {\n graph: graph,\n options: options,\n updateSelection: this.props.updateSelection,\n shouldUpdateGraph: this.props.shouldUpdateGraph,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 142\n },\n __self: this\n });\n }\n\n}\n\nconst experimentStyle = {\n height: 600\n};\nexport default GraphNativeRep;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js"],"names":["React","Component","Spinner","vis","GraphNativeRep","updateVisNodes","nodes","props","setVisData","shouldComponentUpdate","nextProps","nextState","shouldUpdateGraph","data","pkl_timestamp","console","log","loadingGraph","componentWillUnmount","cleanGraphData","render","nodes_array","edges_array","edges","map","node","push","id","label","color","background","status_color","border","level","edge","from","to","DataSet","options","arrows","enabled","layout","improvedLayout","hierarchical","nodeSpacing","blockShifting","edgeMinimization","sortMethod","direction","interaction","dragNodes","hoverConnectedEdges","navigationButtons","physics","shape","font","size","graph","VisNetwork","componentDidMount","network","Network","refs","myRef","on","params","updateSelection","experimentStyle","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,SAAhB,QAAiC,OAAjC,C,CACA;;AACA,OAAOC,OAAP,MAAoB,mBAApB;AACA,OAAOC,GAAP,MAAgB,KAAhB;;AAEA,MAAMC,cAAN,SAA6BH,SAA7B,CAAuC;AAAA;AAAA;;AAAA,SAmBnCI,cAnBmC,GAmBjBC,KAAD,IAAW;AACxB,WAAKC,KAAL,CAAWC,UAAX,CAAsBF,KAAtB;AACH,KArBkC;AAAA;;AAEnCG,EAAAA,qBAAqB,CAACC,SAAD,EAAYC,SAAZ,EAAsB;AACvC,QAAI,KAAKJ,KAAL,CAAWK,iBAAX,KAAiC,IAArC,EAA0C;AACtC,aAAO,IAAP;AACD,KAFH,MAEQ,IAAIF,SAAS,CAACG,IAAV,IAAkB,KAAKN,KAAL,CAAWM,IAA7B,IAAsCH,SAAS,CAACG,IAAV,CAAeC,aAAf,KAAiC,KAAKP,KAAL,CAAWM,IAAX,CAAgBC,aAA3F,EAA0G;AAC9GC,MAAAA,OAAO,CAACC,GAAR,CAAY,aAAZ;AACA,aAAO,IAAP;AACD,KAHK,MAGA,IAAIN,SAAS,CAACO,YAAV,KAA2B,KAAKV,KAAL,CAAWU,YAA1C,EAAuD;AAC3D,aAAO,IAAP;AACD,KAFK,MAED;AACH,aAAO,KAAP;AACD;AACN;;AACDC,EAAAA,oBAAoB,GAAG;AACnBH,IAAAA,OAAO,CAACC,GAAR,CAAY,YAAZ;AACA,SAAKT,KAAL,CAAWY,cAAX;AACH;;AAQDC,EAAAA,MAAM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ehE,cAAf","sourcesContent":["import React, { Component } from \"react\";\n// import vis from \"vis-network\";\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n\n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true\n }else if (nextProps.data && this.props.data && (nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp)){\n console.log(\"Rerendering\")\n return true;\n }else if (nextProps.loadingGraph !== this.props.loadingGraph){\n return true; \n }else{\n return false;\n }\n }\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n updateVisNodes = (nodes) => {\n this.props.setVisData(nodes);\n }\n\n\n\n render () {\n if (this.props.loadingGraph) return ;\n if (this.props.data == null){\n return (\n
\n

Press Show Graph to see the graph representation of the experiment.

\n

If the experiment is running, press Start Job Monitor to start a live tracker of the changes on the experiment's jobs.\n This process will automatically update the graph's nodes colors and show a log of the detected changes.\n

\n
\n );\n }\n\n var nodes_array = [];\n var edges_array = [];\n \n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: { background: node.status_color, border: \"black\" },\n level: node.level,\n })\n );\n \n this.props.data.edges.map(edge => \n edges_array.push({ from: edge.from, to: edge.to })\n );\n }\n \n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n\n\n const options = {\n edges: {\n arrows: {\n to: { enabled: true }\n }\n },\n layout: {\n improvedLayout: true,\n hierarchical: {\n nodeSpacing: 190,\n blockShifting: true,\n edgeMinimization: true,\n //parentCentralization: true,\n sortMethod: 'directed',\n direction: 'UD',\n }\n }, \n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true,\n },\n physics: {\n enabled: false,\n },\n nodes: {\n shape: 'dot',\n font: {\n size: 10,\n },\n }\n };\n \n const graph = {\n nodes : nodes,\n edges : edges,\n };\n\n class VisNetwork extends Component {\n \n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true;\n } else {\n return false;\n }\n }\n \n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", (params) => {\n //console.log(params);\n if (params.nodes){\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n \n });\n }\n \n // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n \n render() { \n return (\n
\n
\n
\n );\n }\n }\n\n this.updateVisNodes(nodes);\n \n return ;\n\n }\n\n\n \n\n \n\n \n \n\n \n\n}\n\nconst experimentStyle = {\n height: 600\n };\n\nexport default GraphNativeRep;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/2f3d7827ca162c72fb0e9df7de773d54.json b/node_modules/.cache/babel-loader/2f3d7827ca162c72fb0e9df7de773d54.json new file mode 100644 index 0000000000000000000000000000000000000000..76ad5fc8cffe78103188d0c742d77989ec1a715d --- /dev/null +++ b/node_modules/.cache/babel-loader/2f3d7827ca162c72fb0e9df7de773d54.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js\";\nimport React, { Component } from \"react\"; // import vis from \"vis-network\";\n\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n constructor(...args) {\n super(...args);\n\n this.updateVisNodes = nodes => {\n this.props.setVisData(nodes);\n };\n }\n\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else if (nextProps.data && this.props.data && nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp) {\n console.log(\"Rerendering\");\n return true;\n } else if (nextProps.loadingGraph !== this.props.loadingGraph) {\n return true;\n } else {\n return false;\n }\n }\n\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n render() {\n if (this.props.loadingGraph) return React.createElement(Spinner, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 32\n },\n __self: this\n });\n\n if (this.props.data == null) {\n return React.createElement(\"div\", {\n className: \"card-body text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 35\n },\n __self: this\n }, React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Press \", React.createElement(\"span\", {\n className: \"badge badge-info\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Show Graph\"), \" to see the graph representation of the experiment.\"), React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"If the experiment is running, press \", React.createElement(\"span\", {\n className: \"badge badge-dark\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"Start Job Monitor\"), \" to start a live tracker of the changes on the experiment's jobs. This process will automatically update the graph's nodes colors and show a log of the detected changes.\"));\n }\n\n var nodes_array = [];\n var edges_array = [];\n\n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: {\n background: node.status_color,\n border: \"black\"\n },\n level: node.level\n }));\n this.props.data.edges.map(edge => edges_array.push({\n from: edge.from,\n to: edge.to\n }));\n }\n\n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n const options = {\n edges: {\n arrows: {\n to: {\n enabled: true\n }\n }\n },\n layout: {\n //improvedLayout: true,\n hierarchical: {\n // enabled: true,\n nodeSpacing: 250,\n edgeMinimization: true,\n parentCentralization: true,\n direction: 'UD' //sortMethod: 'hubsize',\n\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true\n },\n physics: {\n enabled: false\n },\n nodes: {\n shape: 'dot'\n }\n };\n const graph = {\n nodes: nodes,\n edges: edges\n };\n\n class VisNetwork extends Component {\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else {\n return false;\n }\n }\n\n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", params => {\n //console.log(params);\n if (params.nodes) {\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n });\n } // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n\n\n render() {\n return React.createElement(\"div\", {\n className: \"card-body p-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 130\n },\n __self: this\n }, React.createElement(\"div\", {\n ref: \"myRef\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 131\n },\n __self: this\n }));\n }\n\n }\n\n this.updateVisNodes(nodes);\n return React.createElement(VisNetwork, {\n graph: graph,\n options: options,\n updateSelection: this.props.updateSelection,\n shouldUpdateGraph: this.props.shouldUpdateGraph,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 139\n },\n __self: this\n });\n }\n\n}\n\nconst experimentStyle = {\n height: 600\n};\nexport default GraphNativeRep;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js"],"names":["React","Component","Spinner","vis","GraphNativeRep","updateVisNodes","nodes","props","setVisData","shouldComponentUpdate","nextProps","nextState","shouldUpdateGraph","data","pkl_timestamp","console","log","loadingGraph","componentWillUnmount","cleanGraphData","render","nodes_array","edges_array","edges","map","node","push","id","label","color","background","status_color","border","level","edge","from","to","DataSet","options","arrows","enabled","layout","hierarchical","nodeSpacing","edgeMinimization","parentCentralization","direction","interaction","dragNodes","hoverConnectedEdges","navigationButtons","physics","shape","graph","VisNetwork","componentDidMount","network","Network","refs","myRef","on","params","updateSelection","experimentStyle","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,SAAhB,QAAiC,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qBC,MAAD,IAAY;AAC5B;AACA,cAAIA,MAAM,CAACvD,KAAX,EAAiB;AACb;AACA,iBAAKC,KAAL,CAAWuD,eAAX,CAA2BD,MAAM,CAACvD,KAAlC;AACH;AAEJ,SAPD;AAQH,OApB8B,CAsB/B;AACA;AACA;AACA;;;AAEAc,MAAAA,MAAM,GAAG;AACL,eACI;AAAK,UAAA,SAAS,EAAC,eAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,WACI;AAAK,UAAA,GAAG,EAAC,OAAT;AAAiB,UAAA,KAAK,EAAE2C,eAAxB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,UADJ,CADJ;AAKH;;AAjC8B;;AAoCnC,SAAK1D,cAAL,CAAoBC,KAApB;AAEA,WAAO,oBAAC,UAAD;AACH,MAAA,KAAK,EAAE+C,KADJ;AAEH,MAAA,OAAO,EAAEf,OAFN;AAGH,MAAA,eAAe,EAAE,KAAK/B,KAAL,CAAWuD,eAHzB;AAIH,MAAA,iBAAiB,EAAE,KAAKvD,KAAL,CAAWK,iBAJ3B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAAP;AAOH;;AA5IkC;;AA0JvC,MAAMmD,eAAe,GAAG;AACpBC,EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,eAAe5D,cAAf","sourcesContent":["import React, { Component } from \"react\";\n// import vis from \"vis-network\";\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n\n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true\n }else if (nextProps.data && this.props.data && (nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp)){\n console.log(\"Rerendering\")\n return true;\n }else if (nextProps.loadingGraph !== this.props.loadingGraph){\n return true; \n }else{\n return false;\n }\n }\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n updateVisNodes = (nodes) => {\n this.props.setVisData(nodes);\n }\n\n\n\n render () {\n if (this.props.loadingGraph) return ;\n if (this.props.data == null){\n return (\n
\n

Press Show Graph to see the graph representation of the experiment.

\n

If the experiment is running, press Start Job Monitor to start a live tracker of the changes on the experiment's jobs.\n This process will automatically update the graph's nodes colors and show a log of the detected changes.\n

\n
\n );\n }\n\n var nodes_array = [];\n var edges_array = [];\n \n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: { background: node.status_color, border: \"black\" },\n level: node.level,\n })\n );\n \n this.props.data.edges.map(edge => \n edges_array.push({ from: edge.from, to: edge.to })\n );\n }\n \n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n\n\n const options = {\n edges: {\n arrows: {\n to: { enabled: true }\n }\n },\n layout: {\n //improvedLayout: true,\n hierarchical: {\n // enabled: true,\n nodeSpacing: 250,\n edgeMinimization: true,\n parentCentralization: true,\n direction: 'UD',\n //sortMethod: 'hubsize',\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true,\n },\n physics: {\n enabled: false,\n },\n nodes: {\n shape: 'dot',\n }\n };\n \n const graph = {\n nodes : nodes,\n edges : edges,\n };\n\n class VisNetwork extends Component {\n \n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true;\n } else {\n return false;\n }\n }\n \n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", (params) => {\n //console.log(params);\n if (params.nodes){\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n \n });\n }\n \n // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n \n render() { \n return (\n
\n
\n
\n );\n }\n }\n\n this.updateVisNodes(nodes);\n \n return ;\n\n }\n\n\n \n\n \n\n \n \n\n \n\n}\n\nconst experimentStyle = {\n height: 600\n };\n\nexport default GraphNativeRep;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/3033bdb4b659da82de76bcccf12e2727.json b/node_modules/.cache/babel-loader/3033bdb4b659da82de76bcccf12e2727.json new file mode 100644 index 0000000000000000000000000000000000000000..377dcc60489c300c7adf5dd7f893be086be6345f --- /dev/null +++ b/node_modules/.cache/babel-loader/3033bdb4b659da82de76bcccf12e2727.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js\";\nimport React, { Component } from \"react\"; // import vis from \"vis-network\";\n\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n constructor(...args) {\n super(...args);\n\n this.updateVisNodes = nodes => {\n this.props.setVisData(nodes);\n };\n }\n\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else if (nextProps.data && this.props.data && nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp) {\n console.log(\"Rerendering\");\n return true;\n } else if (nextProps.loadingGraph !== this.props.loadingGraph) {\n return true;\n } else {\n return false;\n }\n }\n\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n render() {\n if (this.props.loadingGraph) return React.createElement(Spinner, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 32\n },\n __self: this\n });\n\n if (this.props.data == null) {\n return React.createElement(\"div\", {\n className: \"card-body text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 35\n },\n __self: this\n }, React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Press \", React.createElement(\"span\", {\n className: \"badge badge-info\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Show Graph\"), \" to see the graph representation of the experiment.\"), React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"If the experiment is running, press \", React.createElement(\"span\", {\n className: \"badge badge-dark\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"Start Job Monitor\"), \" to start a live tracker of the changes on the experiment's jobs. This process will automatically update the graph's nodes colors and show a log of the detected changes.\"));\n }\n\n var nodes_array = [];\n var edges_array = [];\n\n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: {\n background: node.status_color,\n border: \"black\"\n },\n level: node.level\n }));\n this.props.data.edges.map(edge => edges_array.push({\n from: edge.from,\n to: edge.to\n }));\n }\n\n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n const options = {\n edges: {\n arrows: {\n to: {\n enabled: true\n }\n }\n },\n layout: {\n //improvedLayout: true,\n hierarchical: {\n nodeSpacing: 190,\n blockShifting: false,\n edgeMinimization: false,\n parentCentralization: true,\n sortMethod: 'hubsize',\n direction: 'UD'\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true\n },\n physics: {\n enabled: false\n },\n nodes: {\n shape: 'dot',\n font: {\n size: 10\n }\n }\n };\n const graph = {\n nodes: nodes,\n edges: edges\n };\n\n class VisNetwork extends Component {\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else {\n return false;\n }\n }\n\n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", params => {\n //console.log(params);\n if (params.nodes) {\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n });\n } // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n\n\n render() {\n return React.createElement(\"div\", {\n className: \"card-body p-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 133\n },\n __self: this\n }, React.createElement(\"div\", {\n ref: \"myRef\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 134\n },\n __self: this\n }));\n }\n\n }\n\n this.updateVisNodes(nodes);\n return React.createElement(VisNetwork, {\n graph: graph,\n options: options,\n updateSelection: this.props.updateSelection,\n shouldUpdateGraph: this.props.shouldUpdateGraph,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 142\n },\n __self: this\n });\n }\n\n}\n\nconst experimentStyle = {\n height: 600\n};\nexport default GraphNativeRep;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js"],"names":["React","Component","Spinner","vis","GraphNativeRep","updateVisNodes","nodes","props","setVisData","shouldComponentUpdate","nextProps","nextState","shouldUpdateGraph","data","pkl_timestamp","console","log","loadingGraph","componentWillUnmount","cleanGraphData","render","nodes_array","edges_array","edges","map","node","push","id","label","color","background","status_color","border","level","edge","from","to","DataSet","options","arrows","enabled","layout","hierarchical","nodeSpacing","blockShifting","edgeMinimization","parentCentralization","sortMethod","direction","interaction","dragNodes","hoverConnectedEdges","navigationButtons","physics","shape","font","size","graph","VisNetwork","componentDidMount","network","Network","refs","myRef","on","params","updateSelection","experimentStyle","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,SAAhB,QAAiC,OAAjC,C,CACA;;AACA,OAAOC,OAAP,MAAoB,mBAApB;AACA,OAAOC,GAAP,MAAgB,KAAhB;;AAEA,MAAMC,cAAN,SAA6BH,SAA7B,CAAuC;AAAA;AAAA;;AAAA,SAmBnCI,cAnBmC,GAmBjBC,KAAD,IAAW;AACxB,WAAKC,KAAL,CAAWC,UAAX,CAAsBF,KAAtB;AACH,KArBkC;AAAA;;AAEnCG,EAAAA,qBAAqB,CAACC,SAAD,EAAYC,SAAZ,EAAsB;AACvC,QAAI,KAAKJ,KAAL,CAAWK,iBAAX,KAAiC,IAArC,EAA0C;AACtC,aAAO,IAAP;AACD,KAFH,MAEQ,IAAIF,SAAS,CAACG,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,OAAT;AAAiB,UAAA,KAAK,EAAE+C,eAAxB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,UADJ,CADJ;AAKH;;AAjC8B;;AAoCnC,SAAK9D,cAAL,CAAoBC,KAApB;AAEA,WAAO,oBAAC,UAAD;AACH,MAAA,KAAK,EAAEmD,KADJ;AAEH,MAAA,OAAO,EAAEnB,OAFN;AAGH,MAAA,eAAe,EAAE,KAAK/B,KAAL,CAAW2D,eAHzB;AAIH,MAAA,iBAAiB,EAAE,KAAK3D,KAAL,CAAWK,iBAJ3B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAAP;AAOH;;AA/IkC;;AA6JvC,MAAMuD,eAAe,GAAG;AACpBC,EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,eAAehE,cAAf","sourcesContent":["import React, { Component } from \"react\";\n// import vis from \"vis-network\";\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n\n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true\n }else if (nextProps.data && this.props.data && (nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp)){\n console.log(\"Rerendering\")\n return true;\n }else if (nextProps.loadingGraph !== this.props.loadingGraph){\n return true; \n }else{\n return false;\n }\n }\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n updateVisNodes = (nodes) => {\n this.props.setVisData(nodes);\n }\n\n\n\n render () {\n if (this.props.loadingGraph) return ;\n if (this.props.data == null){\n return (\n
\n

Press Show Graph to see the graph representation of the experiment.

\n

If the experiment is running, press Start Job Monitor to start a live tracker of the changes on the experiment's jobs.\n This process will automatically update the graph's nodes colors and show a log of the detected changes.\n

\n
\n );\n }\n\n var nodes_array = [];\n var edges_array = [];\n \n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: { background: node.status_color, border: \"black\" },\n level: node.level,\n })\n );\n \n this.props.data.edges.map(edge => \n edges_array.push({ from: edge.from, to: edge.to })\n );\n }\n \n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n\n\n const options = {\n edges: {\n arrows: {\n to: { enabled: true }\n }\n },\n layout: {\n //improvedLayout: true,\n hierarchical: {\n nodeSpacing: 190,\n blockShifting: false,\n edgeMinimization: false,\n parentCentralization: true,\n sortMethod: 'hubsize',\n direction: 'UD',\n }\n }, \n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true,\n },\n physics: {\n enabled: false,\n },\n nodes: {\n shape: 'dot',\n font: {\n size: 10,\n },\n }\n };\n \n const graph = {\n nodes : nodes,\n edges : edges,\n };\n\n class VisNetwork extends Component {\n \n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true;\n } else {\n return false;\n }\n }\n \n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", (params) => {\n //console.log(params);\n if (params.nodes){\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n \n });\n }\n \n // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n \n render() { \n return (\n
\n
\n
\n );\n }\n }\n\n this.updateVisNodes(nodes);\n \n return ;\n\n }\n\n\n \n\n \n\n \n \n\n \n\n}\n\nconst experimentStyle = {\n height: 600\n };\n\nexport default GraphNativeRep;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/3124775e9a828bd4efe425f7e67deda8.json b/node_modules/.cache/babel-loader/3124775e9a828bd4efe425f7e67deda8.json new file mode 100644 index 0000000000000000000000000000000000000000..2d5e9df6fb9cbe8e3bf50798221b1e7758e37c34 --- /dev/null +++ b/node_modules/.cache/babel-loader/3124775e9a828bd4efe425f7e67deda8.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js\";\nimport React, { Component } from \"react\"; // import vis from \"vis-network\";\n\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis-network\";\n\nclass GraphNativeRep extends Component {\n constructor(...args) {\n super(...args);\n\n this.updateVisNodes = nodes => {\n this.props.setVisData(nodes);\n };\n }\n\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else if (nextProps.data && this.props.data && nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp) {\n console.log(\"Rerendering\");\n return true;\n } else if (nextProps.loadingGraph !== this.props.loadingGraph) {\n return true;\n } else {\n return false;\n }\n }\n\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n render() {\n if (this.props.loadingGraph) return React.createElement(Spinner, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 32\n },\n __self: this\n });\n\n if (this.props.data == null) {\n return React.createElement(\"div\", {\n className: \"card-body text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 35\n },\n __self: this\n }, React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Press \", React.createElement(\"span\", {\n className: \"badge badge-info\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Show Graph\"), \" to see the graph representation of the experiment.\"), React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"If the experiment is running, press \", React.createElement(\"span\", {\n className: \"badge badge-dark\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"Start Job Monitor\"), \" to start a live tracker of the changes on the experiment's jobs. This process will automatically update the graph's nodes colors and show a log of the detected changes.\"));\n }\n\n var nodes_array = [];\n var edges_array = [];\n\n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: {\n background: node.status_color,\n border: \"black\"\n },\n level: node.level\n }));\n this.props.data.edges.map(edge => edges_array.push({\n from: edge.from,\n to: edge.to\n }));\n }\n\n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n const options = {\n edges: {\n arrows: {\n to: {\n enabled: true\n }\n }\n },\n layout: {\n improvedLayout: false,\n hierarchical: {\n nodeSpacing: 190,\n blockShifting: false,\n edgeMinimization: false,\n parentCentralization: true,\n sortMethod: 'directed',\n direction: 'LR' // work on vis current version\n // nodeSpacing: 190,\n // blockShifting: false,\n // edgeMinimization: false,\n // parentCentralization: true,\n // sortMethod: 'hubsize',\n // direction: 'UD',\n\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true\n },\n physics: {\n enabled: false\n },\n nodes: {\n shape: 'dot',\n font: {\n size: 10\n }\n }\n };\n const graph = {\n nodes: nodes,\n edges: edges\n };\n\n class VisNetwork extends Component {\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else {\n return false;\n }\n }\n\n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", params => {\n //console.log(params);\n if (params.nodes) {\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n });\n } // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n\n\n render() {\n return React.createElement(\"div\", {\n className: \"card-body p-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 140\n },\n __self: this\n }, React.createElement(\"div\", {\n ref: \"myRef\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 141\n },\n __self: this\n }));\n }\n\n }\n\n this.updateVisNodes(nodes);\n return React.createElement(VisNetwork, {\n graph: graph,\n options: options,\n updateSelection: this.props.updateSelection,\n shouldUpdateGraph: this.props.shouldUpdateGraph,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 149\n },\n __self: this\n });\n }\n\n}\n\nconst experimentStyle = {\n height: 600\n};\nexport default GraphNativeRep;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js"],"names":["React","Component","Spinner","vis","GraphNativeRep","updateVisNodes","nodes","props","setVisData","shouldComponentUpdate","nextProps","nextState","shouldUpdateGraph","data","pkl_timestamp","console","log","loadingGraph","componentWillUnmount","cleanGraphData","render","nodes_array","edges_array","edges","map","node","push","id","label","color","background","status_color","border","level","edge","from","to","DataSet","options","arrows","enabled","layout","improvedLayout","hierarchical","nodeSpacing","blockShifting","edgeMinimization","parentCentralization","sortMethod","direction","interaction","dragNodes","hoverConnectedEdges","navigationButtons","physics","shape","font","size","graph","VisNetwork","componentDidMount","network","Network","refs","myRef","on","params","updateSelection","experimentStyle","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,SAAhB,QAAiC,OAAjC,C,CACA;;AACA,OAAOC,OAAP,MAAoB,mBAApB;AACA,OAAOC,GAAP,MAAgB,aAAhB;;AAEA,MAAMC,cAAN,SAA6BH,SAA7B,CAAuC;AAAA;AAAA;;AAAA,SAmBnCI,cAnBmC,GAmBjBC,KAAD,IAAW;AACxB,WAAKC,KAAL,CAAWC,UAAX,CAAsBF,KAAtB;AACH,KArBkC;AAAA;;AAEnCG,EAAAA,qBAAqB,CAACC,SAAD,EAAYC,SAAZ,EAAsB;AACvC,QAAI,KAAKJ,KAAL,CAAWK,iBAAX,KAAiC,IAArC,EAA0C;AACtC,aAAO,IAAP;AACD,KAFH,MAEQ,IAAIF,SAAS,CAACG,IAAV,IAAkB,KAAKN,KAAL,CAAWM,IAA7B,IAAsCH,SAAS,CAACG,IAAV,CAAeC,aAAf,KAAiC,KAAKP,KAAL,CAAWM,IAAX,CAAgBC,aAA3F,EAA0G;AAC9GC,MAAAA,OAAO,CAACC,GAAR,CAAY,a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AoCnC,SAAK/D,cAAL,CAAoBC,KAApB;AAEA,WAAO,oBAAC,UAAD;AACH,MAAA,KAAK,EAAEoD,KADJ;AAEH,MAAA,OAAO,EAAEpB,OAFN;AAGH,MAAA,eAAe,EAAE,KAAK/B,KAAL,CAAW4D,eAHzB;AAIH,MAAA,iBAAiB,EAAE,KAAK5D,KAAL,CAAWK,iBAJ3B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAAP;AAOH;;AAtJkC;;AAoKvC,MAAMwD,eAAe,GAAG;AACpBC,EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,eAAejE,cAAf","sourcesContent":["import React, { Component } from \"react\";\n// import vis from \"vis-network\";\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis-network\";\n\nclass GraphNativeRep extends Component {\n\n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true\n }else if (nextProps.data && this.props.data && (nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp)){\n console.log(\"Rerendering\")\n return true;\n }else if (nextProps.loadingGraph !== this.props.loadingGraph){\n return true; \n }else{\n return false;\n }\n }\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n updateVisNodes = (nodes) => {\n this.props.setVisData(nodes);\n }\n\n\n\n render () {\n if (this.props.loadingGraph) return ;\n if (this.props.data == null){\n return (\n
\n

Press Show Graph to see the graph representation of the experiment.

\n

If the experiment is running, press Start Job Monitor to start a live tracker of the changes on the experiment's jobs.\n This process will automatically update the graph's nodes colors and show a log of the detected changes.\n

\n
\n );\n }\n\n var nodes_array = [];\n var edges_array = [];\n \n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: { background: node.status_color, border: \"black\" },\n level: node.level,\n })\n );\n \n this.props.data.edges.map(edge => \n edges_array.push({ from: edge.from, to: edge.to })\n );\n }\n \n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n\n\n const options = {\n edges: {\n arrows: {\n to: { enabled: true }\n }\n },\n layout: {\n improvedLayout: false,\n hierarchical: {\n nodeSpacing: 190, \n blockShifting: false,\n edgeMinimization: false,\n parentCentralization: true,\n sortMethod: 'directed',\n direction: 'LR',\n // work on vis current version\n // nodeSpacing: 190,\n // blockShifting: false,\n // edgeMinimization: false,\n // parentCentralization: true,\n // sortMethod: 'hubsize',\n // direction: 'UD',\n }\n }, \n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true,\n },\n physics: {\n enabled: false,\n },\n nodes: {\n shape: 'dot',\n font: {\n size: 10,\n },\n }\n };\n \n const graph = {\n nodes : nodes,\n edges : edges,\n };\n\n class VisNetwork extends Component {\n \n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true;\n } else {\n return false;\n }\n }\n \n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", (params) => {\n //console.log(params);\n if (params.nodes){\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n \n });\n }\n \n // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n \n render() { \n return (\n
\n
\n
\n );\n }\n }\n\n this.updateVisNodes(nodes);\n \n return ;\n\n }\n\n\n \n\n \n\n \n \n\n \n\n}\n\nconst experimentStyle = {\n height: 600\n };\n\nexport default GraphNativeRep;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/31f2f84d32528b9de267781c768ad25a.json b/node_modules/.cache/babel-loader/31f2f84d32528b9de267781c768ad25a.json new file mode 100644 index 0000000000000000000000000000000000000000..46f84e34e3af9ce135c219eed13010a4ace2fc80 --- /dev/null +++ b/node_modules/.cache/babel-loader/31f2f84d32528b9de267781c768ad25a.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js\";\nimport React, { useContext, Component } from \"react\"; // import vis from \"vis-network\";\n\nimport Spinner from \"../layout/Spinner\";\nimport ExperimentContext from '../context/experiment/experimentContext';\nimport vis from \"vis\";\n\nconst GraphNativeRep = () => {\n const experimentContext = useContext(ExperimentContext);\n const data = experimentContext.data,\n loadingGraph = experimentContext.loadingGraph,\n cleanGraphData = experimentContext.cleanGraphData,\n updateSelection = experimentContext.updateSelection;\n if (loadingGraph) return React.createElement(Spinner, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 11\n },\n __self: this\n });\n\n if (data === null) {\n return React.createElement(\"div\", {\n className: \"card-body text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 14\n },\n __self: this\n }, React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 15\n },\n __self: this\n }, \"Press \", React.createElement(\"span\", {\n className: \"badge badge-info\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 15\n },\n __self: this\n }, \"Show Graph\"), \" to see the graph representation of the experiment.\"), React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 16\n },\n __self: this\n }, \"If the experiment is running, press \", React.createElement(\"span\", {\n className: \"badge badge-dark\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 16\n },\n __self: this\n }, \"Start Job Monitor\"), \" to start a live tracker of the changes on the experiment's jobs. This process will automatically update the graph's nodes colors and show a log of the detected changes.\"));\n }\n\n var nodes_array = [];\n var edges_array = [];\n\n if (data.nodes !== null || data.edges !== null) {\n data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: {\n background: node.status_color,\n border: \"black\"\n } //level: node.priority,\n\n }));\n data.edges.map(edge => edges_array.push({\n from: edge.from,\n to: edge.to\n }));\n }\n\n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n const options = {\n edges: {\n arrows: {\n to: {\n enabled: true\n }\n }\n },\n layout: {\n improvedLayout: true,\n hierarchical: {\n nodeSpacing: 250,\n edgeMinimization: false,\n blockShifting: false,\n parentCentralization: false,\n direction: 'UD',\n sortMethod: 'directed'\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true\n },\n physics: {\n enabled: false\n },\n nodes: {\n shape: 'dot'\n }\n };\n const graph = {\n nodes: nodes,\n edges: edges\n };\n\n class VisNetwork extends Component {\n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, graph, options);\n network.on(\"click\", function (params) {\n console.log(params);\n\n if (params.nodes) {\n console.log(params.nodes);\n console.log(params.nodes.id);\n updateSelection(params.nodes[0].id);\n }\n });\n }\n\n componentWillUnmount() {\n cleanGraphData();\n }\n\n render() {\n return React.createElement(\"div\", {\n className: \"card-body p-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 102\n },\n __self: this\n }, React.createElement(\"div\", {\n ref: \"myRef\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 103\n },\n __self: this\n }));\n }\n\n }\n\n return React.createElement(VisNetwork, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 109\n },\n __self: this\n });\n};\n\nconst experimentStyle = {\n height: 600\n};\nexport default GraphNativeRep;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js"],"names":["React","useContext","Component","Spinner","ExperimentContext","vis","GraphNativeRep","experimentContext","data","loadingGraph","cleanGraphData","updateSelection","nodes_array","edges_array","nodes","edges","map","node","push","id","label","color","background","status_color","border","edge","from","to","DataSet","options","arrows","enabled","layout","improvedLayout","hierarchical","nodeSpacing","edgeMinimization","blockShifting","parentCentralization","direction","sortMethod","interaction","dragNodes","hoverConnectedEdges","navigationButtons","physics","shape","graph","VisNetwork","componentDidMount","network","Network","refs","myRef","on","params","console","log","componentWillUnmount","render","experimentStyle","height"],"mappings":";AAAA,OAAO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AAE;AADY,CAAxB;AAIA,eAAevD,cAAf","sourcesContent":["import React, { useContext, Component } from \"react\";\n// import vis from \"vis-network\";\nimport Spinner from \"../layout/Spinner\";\nimport ExperimentContext from '../context/experiment/experimentContext';\nimport vis from \"vis\";\n\nconst GraphNativeRep = () => {\n\n const experimentContext = useContext(ExperimentContext); \n const { data, loadingGraph, cleanGraphData, updateSelection } = experimentContext;\n if (loadingGraph) return \n if (data === null) {\n return (\n
\n

Press Show Graph to see the graph representation of the experiment.

\n

If the experiment is running, press Start Job Monitor to start a live tracker of the changes on the experiment's jobs.\n This process will automatically update the graph's nodes colors and show a log of the detected changes.\n

\n
\n );\n }\n\n var nodes_array = [];\n var edges_array = [];\n\n if (data.nodes !== null || data.edges !== null) {\n data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: { background: node.status_color, border: \"black\" },\n //level: node.priority,\n })\n );\n \n data.edges.map(edge => \n edges_array.push({ from: edge.from, to: edge.to })\n );\n }\n\n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n\n const options = {\n edges: {\n arrows: {\n to: { enabled: true }\n }\n },\n layout: {\n improvedLayout: true,\n hierarchical: {\n \n nodeSpacing: 250,\n edgeMinimization: false,\n blockShifting: false,\n parentCentralization: false,\n direction: 'UD',\n sortMethod: 'directed',\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true,\n },\n physics: {\n enabled: false,\n },\n nodes: {\n shape: 'dot',\n }\n };\n\n const graph = {\n nodes : nodes,\n edges : edges,\n };\n \n\n class VisNetwork extends Component {\n \n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, graph, options);\n network.on(\"click\", function(params) {\n console.log(params);\n if (params.nodes){\n console.log(params.nodes);\n console.log(params.nodes.id);\n updateSelection(params.nodes[0].id);\n }\n \n });\n }\n\n componentWillUnmount() {\n cleanGraphData();\n }\n\n render() { \n return (\n
\n
\n
\n );\n }\n }\n\n return ;\n\n}\n\nconst experimentStyle = {\n height: 600\n };\n\nexport default GraphNativeRep;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/32cc3b5f44175947a45a8b0ef9c91a7e.json b/node_modules/.cache/babel-loader/32cc3b5f44175947a45a8b0ef9c91a7e.json new file mode 100644 index 0000000000000000000000000000000000000000..eb843158b38ec1c3154fe587cbaefcb3d6388733 --- /dev/null +++ b/node_modules/.cache/babel-loader/32cc3b5f44175947a45a8b0ef9c91a7e.json @@ -0,0 +1 @@ +{"ast":null,"code":"import _slicedToArray from \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/node_modules/@babel/runtime/helpers/esm/slicedToArray\";\nvar _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/context/experiment/ExperimentState.js\";\nimport React, { useReducer } from 'react';\nimport axios from 'axios';\nimport ExperimentContext from './experimentContext';\nimport ExperimentReducer from './experimentReducer';\nimport { SEARCH_EXPERIMENTS, SET_LOADING, CLEAR_EXPERIMENTS, GET_EXPERIMENT, GET_GRAPH, SET_LOADING_GRAPH, CLEAN_GRAPH_DATA, UPDATE_SELECTION, GET_EXPERIMENT_RUN, SET_LOADING_RUN, CLEAN_RUN_DATA, SET_AUTOUPDATE_RUN, GET_PKL_DATA, SET_LOADING_PKL, UPDATE_NODES, SHOULD_UPDATE_GRAPH, SET_AUTOUPDATE_PKL, CLEAN_PKL_DATA, SET_PKL_CHANGES, UPDATE_EXPERIMENT_TS } from '../types';\n\nconst ExperimentState = props => {\n const initialState = {\n experiments: [],\n experiment: {},\n loading: false,\n data: null,\n rundata: null,\n pkldata: null,\n pklchanges: null,\n loadingGraph: false,\n loadingRun: false,\n loadingPkl: false,\n selection: null,\n enabledGraphSearch: true,\n startAutoUpdateRun: false,\n startAutoUpdatePkl: false,\n shouldUpdateGraph: false\n };\n\n const _useReducer = useReducer(ExperimentReducer, initialState),\n _useReducer2 = _slicedToArray(_useReducer, 2),\n state = _useReducer2[0],\n dispatch = _useReducer2[1]; // Search Experiments\n\n\n const searchExperiments = async text => {\n setLoading();\n const res = await axios.get(\"http://84.88.185.30:8888/search/\".concat(text));\n dispatch({\n type: SEARCH_EXPERIMENTS,\n payload: res.data.experiment\n });\n }; // Get Experiment\n\n\n const getExperiment = async expid => {\n setLoading(); //cleanGraphData();\n\n const res = await axios.get(\"http://84.88.185.30:8888/expinfo/\".concat(expid));\n dispatch({\n type: GET_EXPERIMENT,\n payload: res.data\n });\n }; // Get Experiment Graph\n\n\n const getExperimentGraph = async expid => {\n setLoadingGraph();\n const res = await axios.get(\"http://84.88.185.30:8888/graph/\".concat(expid));\n console.log(res.data);\n dispatch({\n type: GET_GRAPH,\n payload: res.data\n }); //this.setState({ data: res.data, loading: false, showGraph: !res.data.error });\n }; // Get Experiment Run\n\n\n const getExperimentRun = async expid => {\n setLoadingRun();\n const res = await axios.get(\"http://84.88.185.30:8888/exprun/\".concat(expid));\n console.log(res.data);\n dispatch({\n type: GET_EXPERIMENT_RUN,\n payload: res.data\n });\n }; // Get Experiment Pkl Data\n\n\n const getExperimentPkl = async (expid, timeStamp) => {\n setLoadingPkl(); //timeStamp = 1000;\n\n const res = await axios.get(\"http://84.88.185.30:8888/pklinfo/\".concat(expid, \"/\").concat(timeStamp));\n console.log(res.data); // const actualPkl = res.data;\n\n let retrievedPkl = null;\n var jobs = {};\n var changes = \"\";\n retrievedPkl = res.data;\n\n if (state.data !== null && retrievedPkl.has_changed === true && retrievedPkl.pkl_content.length > 0) {\n //console.log(retrievedPkl.pkl_content.length);\n for (var j = 0, job; j < retrievedPkl.pkl_content.length; j++) {\n job = retrievedPkl.pkl_content[j]; //console.log(job);\n\n jobs[job.name] = job; //console.log(jobs[job.name]);\n }\n\n let requireUpdate = false;\n console.log('Current ts: ' + state.data.pkl_timestamp);\n var newData = state.data; //console.log(newData.nodes);\n\n var expData = state.experiment;\n\n if (newData.nodes) {\n for (var i = 0; i < newData.nodes.length; i++) {\n // console.log(newNodes[i].id);\n //console.log(newData.nodes[i]);\n // console.log(jobs[ newNodes[i].id ]);\n if (newData.nodes[i].status_code !== jobs[newData.nodes[i].id].status_code) {\n // changes += newData.nodes[i].id + \" from \" + newData.nodes[i].status + \" to \" + jobs[ newData.nodes[i].id ].status + \" || \";\n changes += timeStampToDate(retrievedPkl.pkl_timestamp) + \": \" + newData.nodes[i].id + \" to \" + jobs[newData.nodes[i].id].status + \"\\n\";\n newData.nodes[i].status_code = jobs[newData.nodes[i].id].status_code;\n newData.nodes[i].status_color = jobs[newData.nodes[i].id].status_color;\n newData.nodes[i].status = jobs[newData.nodes[i].id].status; //console.log(newData.nodes[i].status_color)\n\n requireUpdate = true;\n }\n }\n\n if (requireUpdate) {\n // console.log(newData.pkl_timestamp);\n // console.log(expData.pkl_timestamp);\n console.log(\"New ts: \" + retrievedPkl.pkl_timestamp);\n newData.pkl_timestamp = retrievedPkl.pkl_timestamp;\n expData.pkl_timestamp = retrievedPkl.pkl_timestamp; // console.log(newData.pkl_timestamp);\n // console.log(expData.pkl_timestamp);\n // console.log('Call Update');\n\n updateNodes(newData);\n updateExperimentTimeStamp(expData); // setUpdateGraph(true);\n // setUpdateGraph(false);\n\n if (state.pklchanges) {\n setPklChanges(changes + state.pklchanges);\n } else {\n setPklChanges(changes);\n }\n } else {\n console.log('No changes but updating pkl anyway.');\n expData.pkl_timestamp = retrievedPkl.pkl_timestamp;\n updateExperimentTimeStamp(expData);\n }\n }\n } // } else {\n // var t = new Date( retrievedPkl.pkl_timestamp );\n // var formatted = t.toISOString();\n // setPklChanges(\"No news yet... \" + formatted)\n // }\n\n\n dispatch({\n type: GET_PKL_DATA,\n payload: res.data\n });\n }; // Cleaning\n\n\n const clearExperiments = () => dispatch({\n type: CLEAR_EXPERIMENTS\n });\n\n const cleanGraphData = () => dispatch({\n type: CLEAN_GRAPH_DATA\n });\n\n const cleanRunData = () => dispatch({\n type: CLEAN_RUN_DATA\n });\n\n const cleanPklData = () => dispatch({\n type: CLEAN_PKL_DATA\n }); // Set Loading\n\n\n const setLoading = () => dispatch({\n type: SET_LOADING\n });\n\n const setLoadingGraph = () => dispatch({\n type: SET_LOADING_GRAPH\n });\n\n const setLoadingRun = () => dispatch({\n type: SET_LOADING_RUN\n });\n\n const setLoadingPkl = () => dispatch({\n type: SET_LOADING_PKL\n }); // Action Things\n\n\n const updateSelection = currentSelection => dispatch({\n type: UPDATE_SELECTION,\n payload: currentSelection\n });\n\n const updateNodes = newdata => dispatch({\n type: UPDATE_NODES,\n payload: newdata\n });\n\n const updateExperimentTimeStamp = newExperiment => dispatch({\n type: UPDATE_EXPERIMENT_TS,\n payload: newExperiment\n });\n\n const setAutoUpdateRun = value => dispatch({\n type: SET_AUTOUPDATE_RUN,\n payload: value\n });\n\n const setAutoUpdatePkl = value => dispatch({\n type: SET_AUTOUPDATE_PKL,\n payload: value\n });\n\n const setUpdateGraph = value => dispatch({\n type: SHOULD_UPDATE_GRAPH,\n payload: value\n });\n\n const setPklChanges = value => dispatch({\n type: SET_PKL_CHANGES,\n payload: value\n }); // Other Utils\n\n\n const hashCode = value => {\n var hash = 0,\n i,\n chr;\n if (value.length === 0) return hash;\n\n for (i = 0; i < value.length; i++) {\n chr = value.charCodeAt(i);\n hash = (hash << 5) - hash + chr;\n hash |= 0; // Convert to 32bit integer\n }\n\n console.log(hash);\n return hash;\n };\n\n const timeStampToDate = value => {\n //console.log('Setting new format: ' + value);\n let formattedDate = \"\";\n var date = new Date(value * 1000);\n var hours = date.getHours();\n var minutes = \"0\" + date.getMinutes();\n var seconds = \"0\" + date.getSeconds();\n formattedDate = hours + ':' + minutes.substr(-2) + ':' + seconds.substr(-2); // formattedDate = date.toISOString();\n\n return formattedDate;\n };\n\n return React.createElement(ExperimentContext.Provider, {\n value: {\n experiments: state.experiments,\n experiment: state.experiment,\n loading: state.loading,\n loadingGraph: state.loadingGraph,\n loadingRun: state.loadingRun,\n loadingPkl: state.loadingPkl,\n data: state.data,\n rundata: state.rundata,\n pklchanges: state.pklchanges,\n selection: state.selection,\n enabledGraphSearch: state.enabledGraphSearch,\n startAutoUpdateRun: state.startAutoUpdateRun,\n startAutoUpdatePkl: state.startAutoUpdatePkl,\n shouldUpdateGraph: state.shouldUpdateGraph,\n setAutoUpdateRun,\n setAutoUpdatePkl,\n searchExperiments,\n clearExperiments,\n getExperiment,\n getExperimentGraph,\n cleanGraphData,\n cleanRunData,\n cleanPklData,\n setPklChanges,\n updateSelection,\n getExperimentRun,\n getExperimentPkl,\n hashCode,\n timeStampToDate\n },\n __source: {\n fileName: _jsxFileName,\n lineNumber: 226\n },\n __self: this\n }, props.children);\n};\n\nexport default ExperimentState;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/context/experiment/ExperimentState.js"],"names":["React","useReducer","axios","ExperimentContext","ExperimentReducer","SEARCH_EXPERIMENTS","SET_LOADING","CLEAR_EXPERIMENTS","GET_EXPERIMENT","GET_GRAPH","SET_LOADING_GRAPH","CLEAN_GRAPH_DATA","UPDATE_SELECTION","GET_EXPERIMENT_RUN","SET_LOADING_RUN","CLEAN_RUN_DATA","SET_AUTOUPDATE_RUN","GET_PKL_DATA","SET_LOADING_PKL","UPDATE_NODES","SHOULD_UPDATE_GRAPH","SET_AUTOUPDATE_PKL","CLEAN_PKL_DATA","SET_PKL_CHANGES","UPDATE_EXPERIMENT_TS","ExperimentState","props","initialState","experiments","experiment","loading","data","rundata","pkldata","pklchanges","loadingGraph","loadingRun","loadingPkl","selection","enabledGraphSearch","startAutoUpdateRun","startAutoUpdatePkl","shouldUpdateGraph","state","dispatch","searchExperiments","text","setLoading","res","get","type","payload","getExperiment","expid","getExperimentGraph","setLoadingGraph","console","log","getExperimentRun","setLoadingRun","getExperimentPkl","timeStamp","setLoadingPkl","retrievedPkl","jobs","changes","has_changed","pkl_content","length","j","job","name","requireUpdate","pkl_timestamp","newData","expData","nodes","i","status_code","id","timeStampToDate","status","status_color","updateNodes","updateExperimentTimeStamp","setPklChanges","clearExperiments","cleanGraphData","cleanRunData","cleanPklData","updateSelection","currentSelection","newdata","newExperiment","setAutoUpdateRun","value","setAutoUpdatePkl","setUpdateGraph","hashCode","hash","chr","charCodeAt","formattedDate","date","Date","hours","getHours","minutes","getMinutes","seconds","getSeconds","substr","children"],"mappings":";;AAAA,OAAOA,KAAP,IAAgBC,UAAhB,QAAkC,OAAlC;AACA,OAAOC,KAAP,MAAkB,OAAlB;AACA,OAAOC,iBAAP,MAA8B,qBAA9B;AACA,OAAOC,iBAAP,MAA8B,qBAA9B;AACA,SACEC,kBADF,EAEEC,WAFF,EAGEC,iBAHF,EAIEC,cAJF,EAKEC,SALF,EAMEC,iBANF,EAOEC,gBAPF,EAQEC,gBARF,EASEC,kBATF,EAUEC,eAVF,EAWEC,cAXF,EAYEC,kBAZF,EAaEC,YAbF,EAcEC,eAdF,EAeEC,YAfF,EAgBEC,mBAhBF,EAiBEC,kBAjBF,EAkBEC,cAlBF,EAmBEC,eAnBF,EAoBEC,oBApBF,QAqBO,UArBP;;AAuBA,MAAMC,eAAe,GAAGC,KAAK,IAAI;AAC7B,QAAMC,YAAY,GAAG;AACjBC,IAAAA,WAAW,EAAE,EADI;AAEjBC,IAAAA,UAAU,EAAE,EAFK;AAGjBC,IAAAA,OAAO,EAAE,KAHQ;AAIjBC,IAAAA,IAAI,EAAE,IAJW;AAKjBC,IAAAA,OAAO,EAAE,IALQ;AAMjBC,IAAAA,OAAO,EAAE,IANQ;AAOjBC,IAAAA,UAAU,EAAE,IAPK;AAQjBC,IAAAA,YAAY,EAAE,KARG;AASjBC,IAAAA,UAAU,EAAE,KATK;AAUjBC,IAAAA,UAAU,EAAE,KAVK;AAWjBC,IAAAA,SAAS,EAAE,IAXM;AAYjBC,IAAAA,kBAAkB,EAAE,IAZH;AAajBC,IAAAA,kBAAkB,EAAE,KAbH;AAcjBC,IAAAA,kBAAkB,EAAE,KAdH;AAejBC,IAAAA,iBAAiB,EAAE;AAfF,GAArB;;AAD6B,sBAmBHzC,U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'react';\nimport axios from 'axios';\nimport ExperimentContext from './experimentContext';\nimport ExperimentReducer from './experimentReducer';\nimport {\n SEARCH_EXPERIMENTS,\n SET_LOADING,\n CLEAR_EXPERIMENTS,\n GET_EXPERIMENT,\n GET_GRAPH,\n SET_LOADING_GRAPH,\n CLEAN_GRAPH_DATA,\n UPDATE_SELECTION,\n GET_EXPERIMENT_RUN,\n SET_LOADING_RUN,\n CLEAN_RUN_DATA,\n SET_AUTOUPDATE_RUN,\n GET_PKL_DATA,\n SET_LOADING_PKL,\n UPDATE_NODES,\n SHOULD_UPDATE_GRAPH,\n SET_AUTOUPDATE_PKL,\n CLEAN_PKL_DATA,\n SET_PKL_CHANGES,\n UPDATE_EXPERIMENT_TS,\n} from '../types';\n\nconst ExperimentState = props => {\n const initialState = {\n experiments: [],\n experiment: {},\n loading: false,\n data: null,\n rundata: null,\n pkldata: null,\n pklchanges: null,\n loadingGraph: false,\n loadingRun: false,\n loadingPkl: false,\n selection: null,\n enabledGraphSearch: true, \n startAutoUpdateRun: false, \n startAutoUpdatePkl: false,\n shouldUpdateGraph: false, \n }\n\n const [state, dispatch] = useReducer(ExperimentReducer, initialState);\n\n // Search Experiments\n const searchExperiments = async text => {\n setLoading();\n const res = await axios.get(`http://84.88.185.30:8888/search/${text}`);\n dispatch({\n type: SEARCH_EXPERIMENTS,\n payload: res.data.experiment,\n });\n };\n\n // Get Experiment\n const getExperiment = async expid => {\n setLoading();\n //cleanGraphData();\n const res = await axios.get(`http://84.88.185.30:8888/expinfo/${expid}`); \n dispatch({\n type: GET_EXPERIMENT,\n payload: res.data,\n });\n };\n \n // Get Experiment Graph\n const getExperimentGraph = async expid => {\n setLoadingGraph();\n \n const res = await axios.get(`http://84.88.185.30:8888/graph/${expid}`);\n console.log(res.data);\n dispatch({\n type: GET_GRAPH,\n payload: res.data,\n });\n //this.setState({ data: res.data, loading: false, showGraph: !res.data.error });\n };\n\n // Get Experiment Run\n const getExperimentRun = async expid => {\n setLoadingRun();\n const res = await axios.get(`http://84.88.185.30:8888/exprun/${expid}`);\n console.log(res.data);\n dispatch({\n type: GET_EXPERIMENT_RUN,\n payload: res.data,\n });\n }\n\n // Get Experiment Pkl Data\n const getExperimentPkl = async (expid, timeStamp) => {\n setLoadingPkl();\n //timeStamp = 1000;\n const res = await axios.get(`http://84.88.185.30:8888/pklinfo/${expid}/${timeStamp}`);\n console.log(res.data);\n // const actualPkl = res.data;\n \n let retrievedPkl = null;\n var jobs = {}\n var changes = \"\"\n retrievedPkl = res.data;\n if (state.data !== null && retrievedPkl.has_changed === true && retrievedPkl.pkl_content.length > 0){\n //console.log(retrievedPkl.pkl_content.length);\n for(var j = 0, job; j < retrievedPkl.pkl_content.length; j++){\n job = retrievedPkl.pkl_content[j];\n //console.log(job);\n jobs[ job.name ] = job;\n //console.log(jobs[job.name]);\n }\n let requireUpdate = false;\n console.log('Current ts: '+ state.data.pkl_timestamp); \n var newData = state.data;\n //console.log(newData.nodes);\n var expData = state.experiment;\n if (newData.nodes){\n for(var i = 0; i < newData.nodes.length; i++){\n // console.log(newNodes[i].id);\n //console.log(newData.nodes[i]);\n // console.log(jobs[ newNodes[i].id ]);\n\n if (newData.nodes[i].status_code !== jobs[ newData.nodes[i].id ].status_code){\n // changes += newData.nodes[i].id + \" from \" + newData.nodes[i].status + \" to \" + jobs[ newData.nodes[i].id ].status + \" || \";\n changes += timeStampToDate(retrievedPkl.pkl_timestamp) + \": \"+ newData.nodes[i].id + \" to \" + jobs[ newData.nodes[i].id ].status + \"\\n\";\n newData.nodes[i].status_code = jobs[ newData.nodes[i].id ].status_code;\n newData.nodes[i].status_color = jobs[ newData.nodes[i].id ].status_color;\n newData.nodes[i].status = jobs[ newData.nodes[i].id ].status;\n //console.log(newData.nodes[i].status_color)\n requireUpdate = true;\n }\n }\n if (requireUpdate){ \n // console.log(newData.pkl_timestamp);\n // console.log(expData.pkl_timestamp);\n console.log(\"New ts: \" + retrievedPkl.pkl_timestamp)\n newData.pkl_timestamp = retrievedPkl.pkl_timestamp;\n expData.pkl_timestamp = retrievedPkl.pkl_timestamp;\n // console.log(newData.pkl_timestamp);\n // console.log(expData.pkl_timestamp);\n \n // console.log('Call Update');\n updateNodes(newData);\n updateExperimentTimeStamp(expData);\n // setUpdateGraph(true);\n // setUpdateGraph(false);\n if (state.pklchanges){\n setPklChanges(changes + state.pklchanges);\n } else {\n setPklChanges(changes);\n }\n \n \n } else { \n console.log('No changes but updating pkl anyway.')\n expData.pkl_timestamp = retrievedPkl.pkl_timestamp;\n updateExperimentTimeStamp(expData);\n }\n }\n }\n // } else {\n // var t = new Date( retrievedPkl.pkl_timestamp );\n // var formatted = t.toISOString();\n // setPklChanges(\"No news yet... \" + formatted)\n // }\n\n\n dispatch({\n type: GET_PKL_DATA,\n payload: res.data,\n });\n }\n\n\n\n // Cleaning\n const clearExperiments = () => dispatch({ type: CLEAR_EXPERIMENTS });\n const cleanGraphData = () => dispatch({ type: CLEAN_GRAPH_DATA });\n const cleanRunData = () => dispatch({ type: CLEAN_RUN_DATA });\n const cleanPklData = () => dispatch({ type: CLEAN_PKL_DATA });\n\n // Set Loading\n const setLoading = () => dispatch({ type: SET_LOADING });\n const setLoadingGraph = () => dispatch({ type: SET_LOADING_GRAPH });\n const setLoadingRun = () => dispatch({ type: SET_LOADING_RUN });\n const setLoadingPkl = () => dispatch({ type: SET_LOADING_PKL });\n\n\n // Action Things\n const updateSelection = (currentSelection) => dispatch({ type: UPDATE_SELECTION, payload: currentSelection });\n const updateNodes = (newdata) => dispatch({ type: UPDATE_NODES, payload: newdata });\n const updateExperimentTimeStamp = (newExperiment) => dispatch({ type: UPDATE_EXPERIMENT_TS, payload: newExperiment});\n const setAutoUpdateRun = (value) => dispatch({ type: SET_AUTOUPDATE_RUN, payload: value });\n const setAutoUpdatePkl = (value) => dispatch({ type: SET_AUTOUPDATE_PKL, payload: value });\n const setUpdateGraph = (value) => dispatch({ type: SHOULD_UPDATE_GRAPH, payload: value });\n const setPklChanges = (value) => dispatch({ type: SET_PKL_CHANGES, payload: value });\n\n // Other Utils\n const hashCode = (value) => {\n var hash = 0, i, chr;\n if (value.length === 0) return hash;\n for (i = 0; i < value.length; i++) {\n chr = value.charCodeAt(i);\n hash = ((hash << 5) - hash) + chr;\n hash |= 0; // Convert to 32bit integer\n }\n console.log(hash);\n return hash;\n };\n \n const timeStampToDate = (value) => {\n //console.log('Setting new format: ' + value);\n let formattedDate = \"\";\n var date = new Date( value * 1000);\n var hours = date.getHours();\n var minutes = \"0\" + date.getMinutes();\n var seconds = \"0\" + date.getSeconds();\n formattedDate = hours + ':' + minutes.substr(-2) + ':' + seconds.substr(-2);\n // formattedDate = date.toISOString();\n return formattedDate;\n }\n\n return (\n \n {props.children}\n \n );\n};\n\nexport default ExperimentState;"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/349f22ceadd6e143400e3497e5e519dd.json b/node_modules/.cache/babel-loader/349f22ceadd6e143400e3497e5e519dd.json new file mode 100644 index 0000000000000000000000000000000000000000..a8622edcd0d220b9c27d3140023d2f39212ec8b6 --- /dev/null +++ b/node_modules/.cache/babel-loader/349f22ceadd6e143400e3497e5e519dd.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js\";\nimport React, { Component } from \"react\"; // import vis from \"vis-network\";\n\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n constructor(...args) {\n super(...args);\n\n this.updateVisNodes = nodes => {\n this.props.setVisData(nodes);\n };\n }\n\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else if (nextProps.data && this.props.data && nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp) {\n console.log(\"Rerendering\");\n return true;\n } else if (nextProps.loadingGraph !== this.props.loadingGraph) {\n return true;\n } else {\n return false;\n }\n }\n\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n render() {\n if (this.props.loadingGraph) return React.createElement(Spinner, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 32\n },\n __self: this\n });\n\n if (this.props.data == null) {\n return React.createElement(\"div\", {\n className: \"card-body text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 35\n },\n __self: this\n }, React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Press \", React.createElement(\"span\", {\n className: \"badge badge-info\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Show Graph\"), \" to see the graph representation of the experiment.\"), React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"If the experiment is running, press \", React.createElement(\"span\", {\n className: \"badge badge-dark\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"Start Job Monitor\"), \" to start a live tracker of the changes on the experiment's jobs. This process will automatically update the graph's nodes colors and show a log of the detected changes.\"));\n }\n\n var nodes_array = [];\n var edges_array = [];\n\n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: {\n background: node.status_color,\n border: \"black\"\n },\n level: node.level\n }));\n this.props.data.edges.map(edge => edges_array.push({\n from: edge.from,\n to: edge.to\n }));\n }\n\n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n const options = {\n edges: {\n arrows: {\n to: {\n enabled: true\n }\n }\n },\n layout: {\n //improvedLayout: true,\n hierarchical: {\n nodeSpacing: 190,\n blockShifting: true,\n edgeMinimization: true,\n parentCentralization: false,\n sortMethod: 'hubsize',\n direction: 'UD'\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true\n },\n physics: {\n enabled: false\n },\n nodes: {\n shape: 'dot',\n font: {\n size: 10\n }\n }\n };\n const graph = {\n nodes: nodes,\n edges: edges\n };\n\n class VisNetwork extends Component {\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else {\n return false;\n }\n }\n\n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", params => {\n //console.log(params);\n if (params.nodes) {\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n });\n } // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n\n\n render() {\n return React.createElement(\"div\", {\n className: \"card-body p-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 133\n },\n __self: this\n }, React.createElement(\"div\", {\n ref: \"myRef\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 134\n },\n __self: this\n }));\n }\n\n }\n\n this.updateVisNodes(nodes);\n return React.createElement(VisNetwork, {\n graph: graph,\n options: options,\n updateSelection: this.props.updateSelection,\n shouldUpdateGraph: this.props.shouldUpdateGraph,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 142\n },\n __self: this\n });\n }\n\n}\n\nconst experimentStyle = {\n height: 600\n};\nexport default GraphNativeRep;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js"],"names":["React","Component","Spinner","vis","GraphNativeRep","updateVisNodes","nodes","props","setVisData","shouldComponentUpdate","nextProps","nextState","shouldUpdateGraph","data","pkl_timestamp","console","log","loadingGraph","componentWillUnmount","cleanGraphData","render","nodes_array","edges_array","edges","map","node","push","id","label","color","background","status_color","border","level","edge","from","to","DataSet","options","arrows","enabled","layout","hierarchical","nodeSpacing","blockShifting","edgeMinimization","parentCentralization","sortMethod","direction","interaction","dragNodes","hoverConnectedEdges","navigationButtons","physics","shape","font","size","graph","VisNetwork","componentDidMount","network","Network","refs","myRef","on","params","updateSelection","experimentStyle","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B,KAAKC,IAAL,CAAUC,KAA1B,EAAiC,KAAKxD,KAAL,CAAWkD,KAA5C,EAAmD,KAAKlD,KAAL,CAAW+B,OAA9D,CAAd;AACAsB,QAAAA,OAAO,CAACI,EAAR,CAAW,OAAX,EAAqBC,MAAD,IAAY;AAC5B;AACA,cAAIA,MAAM,CAAC3D,KAAX,EAAiB;AACb;AACA,iBAAKC,KAAL,CAAW2D,eAAX,CAA2BD,MAAM,CAAC3D,KAAlC;AACH;AAEJ,SAPD;AAQH,OApB8B,CAsB/B;AACA;AACA;AACA;;;AAEAc,MAAAA,MAAM,GAAG;AACL,eACI;AAAK,UAAA,SAAS,EAAC,eAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,WACI;AAAK,UAAA,GAAG,EAAC,OAAT;AAAiB,UAAA,KAAK,EAAE+C,eAAxB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,UADJ,CADJ;AAKH;;AAjC8B;;AAoCnC,SAAK9D,cAAL,CAAoBC,KAApB;AAEA,WAAO,oBAAC,UAAD;AACH,MAAA,KAAK,EAAEmD,KADJ;AAEH,MAAA,OAAO,EAAEnB,OAFN;AAGH,MAAA,eAAe,EAAE,KAAK/B,KAAL,CAAW2D,eAHzB;AAIH,MAAA,iBAAiB,EAAE,KAAK3D,KAAL,CAAWK,iBAJ3B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAAP;AAOH;;AA/IkC;;AA6JvC,MAAMuD,eAAe,GAAG;AACpBC,EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,eAAehE,cAAf","sourcesContent":["import React, { Component } from \"react\";\n// import vis from \"vis-network\";\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n\n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true\n }else if (nextProps.data && this.props.data && (nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp)){\n console.log(\"Rerendering\")\n return true;\n }else if (nextProps.loadingGraph !== this.props.loadingGraph){\n return true; \n }else{\n return false;\n }\n }\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n updateVisNodes = (nodes) => {\n this.props.setVisData(nodes);\n }\n\n\n\n render () {\n if (this.props.loadingGraph) return ;\n if (this.props.data == null){\n return (\n
\n

Press Show Graph to see the graph representation of the experiment.

\n

If the experiment is running, press Start Job Monitor to start a live tracker of the changes on the experiment's jobs.\n This process will automatically update the graph's nodes colors and show a log of the detected changes.\n

\n
\n );\n }\n\n var nodes_array = [];\n var edges_array = [];\n \n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: { background: node.status_color, border: \"black\" },\n level: node.level,\n })\n );\n \n this.props.data.edges.map(edge => \n edges_array.push({ from: edge.from, to: edge.to })\n );\n }\n \n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n\n\n const options = {\n edges: {\n arrows: {\n to: { enabled: true }\n }\n },\n layout: {\n //improvedLayout: true,\n hierarchical: {\n nodeSpacing: 190,\n blockShifting: true,\n edgeMinimization: true,\n parentCentralization: false,\n sortMethod: 'hubsize',\n direction: 'UD',\n }\n }, \n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true,\n },\n physics: {\n enabled: false,\n },\n nodes: {\n shape: 'dot',\n font: {\n size: 10,\n },\n }\n };\n \n const graph = {\n nodes : nodes,\n edges : edges,\n };\n\n class VisNetwork extends Component {\n \n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true;\n } else {\n return false;\n }\n }\n \n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", (params) => {\n //console.log(params);\n if (params.nodes){\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n \n });\n }\n \n // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n \n render() { \n return (\n
\n
\n
\n );\n }\n }\n\n this.updateVisNodes(nodes);\n \n return ;\n\n }\n\n\n \n\n \n\n \n \n\n \n\n}\n\nconst experimentStyle = {\n height: 600\n };\n\nexport default GraphNativeRep;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/34d44c861d851174a5a59cc8f9e17fca.json b/node_modules/.cache/babel-loader/34d44c861d851174a5a59cc8f9e17fca.json new file mode 100644 index 0000000000000000000000000000000000000000..1f81d59a8b95e0c290c671eaa61a9cf9c6d24762 --- /dev/null +++ b/node_modules/.cache/babel-loader/34d44c861d851174a5a59cc8f9e17fca.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js\";\nimport React, { Component } from \"react\"; // import vis from \"vis-network\";\n\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n constructor(...args) {\n super(...args);\n\n this.updateVisNodes = nodes => {\n this.props.setVisData(nodes);\n };\n }\n\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else if (nextProps.data && this.props.data && nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp) {\n console.log(\"Rerendering\");\n return true;\n } else if (nextProps.loadingGraph !== this.props.loadingGraph) {\n return true;\n } else {\n return false;\n }\n }\n\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n render() {\n if (this.props.loadingGraph) return React.createElement(Spinner, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 32\n },\n __self: this\n });\n\n if (this.props.data == null) {\n return React.createElement(\"div\", {\n className: \"card-body text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 35\n },\n __self: this\n }, React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Press \", React.createElement(\"span\", {\n className: \"badge badge-info\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Show Graph\"), \" to see the graph representation of the experiment.\"), React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"If the experiment is running, press \", React.createElement(\"span\", {\n className: \"badge badge-dark\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"Start Job Monitor\"), \" to start a live tracker of the changes on the experiment's jobs. This process will automatically update the graph's nodes colors and show a log of the detected changes.\"));\n }\n\n var nodes_array = [];\n var edges_array = [];\n\n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: {\n background: node.status_color,\n border: \"black\"\n },\n level: node.level\n }));\n this.props.data.edges.map(edge => edges_array.push({\n from: edge.from,\n to: edge.to\n }));\n }\n\n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n const options = {\n edges: {\n arrows: {\n to: {\n enabled: true\n }\n }\n },\n layout: {\n improvedLayout: false,\n hierarchical: {\n nodeSpacing: 170,\n blockShifting: true,\n edgeMinimization: true,\n //parentCentralization: true,\n sortMethod: 'hubsize',\n direction: 'UD'\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true\n },\n physics: {\n enabled: false\n },\n nodes: {\n shape: 'dot',\n font: {\n size: 8\n }\n }\n };\n const graph = {\n nodes: nodes,\n edges: edges\n };\n\n class VisNetwork extends Component {\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else {\n return false;\n }\n }\n\n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", params => {\n //console.log(params);\n if (params.nodes) {\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n });\n } // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n\n\n render() {\n return React.createElement(\"div\", {\n className: \"card-body p-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 133\n },\n __self: this\n }, React.createElement(\"div\", {\n ref: \"myRef\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 134\n },\n __self: this\n }));\n }\n\n }\n\n this.updateVisNodes(nodes);\n return React.createElement(VisNetwork, {\n graph: graph,\n options: options,\n updateSelection: this.props.updateSelection,\n shouldUpdateGraph: this.props.shouldUpdateGraph,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 142\n },\n __self: this\n });\n }\n\n}\n\nconst experimentStyle = {\n height: 600\n};\nexport default GraphNativeRep;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js"],"names":["React","Component","Spinner","vis","GraphNativeRep","updateVisNodes","nodes","props","setVisData","shouldComponentUpdate","nextProps","nextState","shouldUpdateGraph","data","pkl_timestamp","console","log","loadingGraph","componentWillUnmount","cleanGraphData","render","nodes_array","edges_array","edges","map","node","push","id","label","color","background","status_color","border","level","edge","from","to","DataSet","options","arrows","enabled","layout","improvedLayout","hierarchical","nodeSpacing","blockShifting","edgeMinimization","sortMethod","direction","interaction","dragNodes","hoverConnectedEdges","navigationButtons","physics","shape","font","size","graph","VisNetwork","componentDidMount","network","Network","refs","myRef","on","params","updateSelection","experimentStyle","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,SAAhB,QAAiC,OAAjC,C,CACA;;AACA,OAAOC,OAAP,MAAoB,mBAApB;AACA,OAAOC,GAAP,MAAgB,KAAhB;;AAEA,MAAMC,cAAN,SAA6BH,SAA7B,CAAuC;AAAA;AAAA;;AAAA,SAmBnCI,cAnBmC,GAmBjBC,KAAD,IAAW;AACxB,WAAKC,KAAL,CAAWC,UAAX,CAAsBF,KAAtB;AAC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;AACH;AAEJ,SAPD;AAQH,OApB8B,CAsB/B;AACA;AACA;AACA;;;AAEAc,MAAAA,MAAM,GAAG;AACL,eACI;AAAK,UAAA,SAAS,EAAC,eAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,WACI;AAAK,UAAA,GAAG,EAAC,OAAT;AAAiB,UAAA,KAAK,EAAE+C,eAAxB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,UADJ,CADJ;AAKH;;AAjC8B;;AAoCnC,SAAK9D,cAAL,CAAoBC,KAApB;AAEA,WAAO,oBAAC,UAAD;AACH,MAAA,KAAK,EAAEmD,KADJ;AAEH,MAAA,OAAO,EAAEnB,OAFN;AAGH,MAAA,eAAe,EAAE,KAAK/B,KAAL,CAAW2D,eAHzB;AAIH,MAAA,iBAAiB,EAAE,KAAK3D,KAAL,CAAWK,iBAJ3B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAAP;AAOH;;AA/IkC;;AA6JvC,MAAMuD,eAAe,GAAG;AACpBC,EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,eAAehE,cAAf","sourcesContent":["import React, { Component } from \"react\";\n// import vis from \"vis-network\";\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n\n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true\n }else if (nextProps.data && this.props.data && (nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp)){\n console.log(\"Rerendering\")\n return true;\n }else if (nextProps.loadingGraph !== this.props.loadingGraph){\n return true; \n }else{\n return false;\n }\n }\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n updateVisNodes = (nodes) => {\n this.props.setVisData(nodes);\n }\n\n\n\n render () {\n if (this.props.loadingGraph) return ;\n if (this.props.data == null){\n return (\n
\n

Press Show Graph to see the graph representation of the experiment.

\n

If the experiment is running, press Start Job Monitor to start a live tracker of the changes on the experiment's jobs.\n This process will automatically update the graph's nodes colors and show a log of the detected changes.\n

\n
\n );\n }\n\n var nodes_array = [];\n var edges_array = [];\n \n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: { background: node.status_color, border: \"black\" },\n level: node.level,\n })\n );\n \n this.props.data.edges.map(edge => \n edges_array.push({ from: edge.from, to: edge.to })\n );\n }\n \n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n\n\n const options = {\n edges: {\n arrows: {\n to: { enabled: true }\n }\n },\n layout: {\n improvedLayout: false,\n hierarchical: {\n nodeSpacing: 170,\n blockShifting: true,\n edgeMinimization: true,\n //parentCentralization: true,\n sortMethod: 'hubsize',\n direction: 'UD',\n }\n }, \n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true,\n },\n physics: {\n enabled: false,\n },\n nodes: {\n shape: 'dot',\n font: {\n size: 8,\n },\n }\n };\n \n const graph = {\n nodes : nodes,\n edges : edges,\n };\n\n class VisNetwork extends Component {\n \n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true;\n } else {\n return false;\n }\n }\n \n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", (params) => {\n //console.log(params);\n if (params.nodes){\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n \n });\n }\n \n // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n \n render() { \n return (\n
\n
\n
\n );\n }\n }\n\n this.updateVisNodes(nodes);\n \n return ;\n\n }\n\n\n \n\n \n\n \n \n\n \n\n}\n\nconst experimentStyle = {\n height: 600\n };\n\nexport default GraphNativeRep;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/3638a2a7dcdc2fa1d104a5d5508393d0.json b/node_modules/.cache/babel-loader/3638a2a7dcdc2fa1d104a5d5508393d0.json new file mode 100644 index 0000000000000000000000000000000000000000..39fdbf0710264a3c034d54054bff46c2fda83a3f --- /dev/null +++ b/node_modules/.cache/babel-loader/3638a2a7dcdc2fa1d104a5d5508393d0.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js\";\nimport React, { Component } from \"react\"; // import vis from \"vis-network\";\n\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n constructor(...args) {\n super(...args);\n\n this.updateVisNodes = nodes => {\n this.props.setVisData(nodes);\n };\n }\n\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else if (nextProps.data && this.props.data && nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp) {\n console.log(\"Rerendering\");\n return true;\n } else if (nextProps.loadingGraph !== this.props.loadingGraph) {\n return true;\n } else {\n return false;\n }\n }\n\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n render() {\n if (this.props.loadingGraph) return React.createElement(Spinner, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 32\n },\n __self: this\n });\n\n if (this.props.data == null) {\n return React.createElement(\"div\", {\n className: \"card-body text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 35\n },\n __self: this\n }, React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Press \", React.createElement(\"span\", {\n className: \"badge badge-info\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Show Graph\"), \" to see the graph representation of the experiment.\"), React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"If the experiment is running, press \", React.createElement(\"span\", {\n className: \"badge badge-dark\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"Start Job Monitor\"), \" to start a live tracker of the changes on the experiment's jobs. This process will automatically update the graph's nodes colors and show a log of the detected changes.\"));\n }\n\n var nodes_array = [];\n var edges_array = [];\n\n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: {\n background: node.status_color,\n border: \"black\"\n },\n level: node.level\n }));\n this.props.data.edges.map(edge => edges_array.push({\n from: edge.from,\n to: edge.to\n }));\n }\n\n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n const options = {\n edges: {\n arrows: {\n to: {\n enabled: true\n }\n }\n },\n layout: {\n improvedLayout: true,\n hierarchical: {\n nodeSpacing: 250,\n edgeMinimization: false,\n blockShifting: false,\n parentCentralization: true,\n sortMethod: 'directed'\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true\n },\n physics: {\n enabled: false\n },\n nodes: {\n shape: 'dot'\n }\n };\n const graph = {\n nodes: nodes,\n edges: edges\n };\n\n class VisNetwork extends Component {\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else {\n return false;\n }\n }\n\n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", params => {\n //console.log(params);\n if (params.nodes) {\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n });\n } // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n\n\n render() {\n return React.createElement(\"div\", {\n className: \"card-body p-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 130\n },\n __self: this\n }, React.createElement(\"div\", {\n ref: \"myRef\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 131\n },\n __self: this\n }));\n }\n\n }\n\n this.updateVisNodes(nodes);\n return React.createElement(VisNetwork, {\n graph: graph,\n options: options,\n updateSelection: this.props.updateSelection,\n shouldUpdateGraph: this.props.shouldUpdateGraph,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 139\n },\n __self: this\n });\n }\n\n}\n\nconst experimentStyle = {\n height: 600\n};\nexport default GraphNativeRep;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js"],"names":["React","Component","Spinner","vis","GraphNativeRep","updateVisNodes","nodes","props","setVisData","shouldComponentUpdate","nextProps","nextState","shouldUpdateGraph","data","pkl_timestamp","console","log","loadingGraph","componentWillUnmount","cleanGraphData","render","nodes_array","edges_array","edges","map","node","push","id","label","color","background","status_color","border","level","edge","from","to","DataSet","options","arrows","enabled","layout","improvedLayout","hierarchical","nodeSpacing","edgeMinimization","blockShifting","parentCentralization","sortMethod","interaction","dragNodes","hoverConnectedEdges","navigationButtons","physics","shape","graph","VisNetwork","componentDidMount","network","Network","refs","myRef","on","params","updateSelection","experimentStyle","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,SAAhB,QAAiC,OAAjC,C,CACA;;AACA,OAAOC,OAAP,MAAoB,mBAApB;AACA,OAAOC,GAAP,MAAgB,KAAhB;;AAEA,MAAMC,cAAN,SAA6BH,SAA7B,CAAuC;AAAA;AAAA;;AAAA,SAmBnCI,cAnBmC,GAmBjBC,KAAD,IAAW;AACxB,WAAKC,KAAL,CAAWC,UAAX,CAAsBF,KAAtB;AACH,KArBkC;AAAA;;AAEnCG,EAAAA,qBAAqB,CAACC,SAAD,EAAYC,SAAZ,EAAsB;AACvC,QAAI,KAAKJ,KAAL,CAAWK,iBAAX,KAAiC,IAArC,EAA0C;AACtC,aAAO,IAAP;AACD,KAFH,MAEQ,IAAIF,SAAS,CAACG,IAAV,IAAkB,KAAKN,KAAL,CAAWM,IAA7B,IAAsCH,SAAS,CAACG,IAAV,CAAeC,aAAf,KAAiC,KAAKP,KAAL,CAAWM,IAAX,CAAgBC,aA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KADJ;AAEH,MAAA,OAAO,EAAEjB,OAFN;AAGH,MAAA,eAAe,EAAE,KAAK/B,KAAL,CAAWyD,eAHzB;AAIH,MAAA,iBAAiB,EAAE,KAAKzD,KAAL,CAAWK,iBAJ3B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAAP;AAOH;;AA5IkC;;AA0JvC,MAAMqD,eAAe,GAAG;AACpBC,EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,eAAe9D,cAAf","sourcesContent":["import React, { Component } from \"react\";\n// import vis from \"vis-network\";\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n\n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true\n }else if (nextProps.data && this.props.data && (nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp)){\n console.log(\"Rerendering\")\n return true;\n }else if (nextProps.loadingGraph !== this.props.loadingGraph){\n return true; \n }else{\n return false;\n }\n }\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n updateVisNodes = (nodes) => {\n this.props.setVisData(nodes);\n }\n\n\n\n render () {\n if (this.props.loadingGraph) return ;\n if (this.props.data == null){\n return (\n
\n

Press Show Graph to see the graph representation of the experiment.

\n

If the experiment is running, press Start Job Monitor to start a live tracker of the changes on the experiment's jobs.\n This process will automatically update the graph's nodes colors and show a log of the detected changes.\n

\n
\n );\n }\n\n var nodes_array = [];\n var edges_array = [];\n \n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: { background: node.status_color, border: \"black\" },\n level: node.level,\n })\n );\n \n this.props.data.edges.map(edge => \n edges_array.push({ from: edge.from, to: edge.to })\n );\n }\n \n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n\n\n const options = {\n edges: {\n arrows: {\n to: { enabled: true }\n }\n },\n layout: {\n improvedLayout: true,\n hierarchical: {\n \n nodeSpacing: 250,\n edgeMinimization: false,\n blockShifting: false,\n parentCentralization: true,\n sortMethod: 'directed',\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true,\n },\n physics: {\n enabled: false,\n },\n nodes: {\n shape: 'dot',\n }\n };\n \n const graph = {\n nodes : nodes,\n edges : edges,\n };\n\n class VisNetwork extends Component {\n \n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true;\n } else {\n return false;\n }\n }\n \n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", (params) => {\n //console.log(params);\n if (params.nodes){\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n \n });\n }\n \n // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n \n render() { \n return (\n
\n
\n
\n );\n }\n }\n\n this.updateVisNodes(nodes);\n \n return ;\n\n }\n\n\n \n\n \n\n \n \n\n \n\n}\n\nconst experimentStyle = {\n height: 600\n };\n\nexport default GraphNativeRep;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/3651677275ca832f30ad643700103a61.json b/node_modules/.cache/babel-loader/3651677275ca832f30ad643700103a61.json new file mode 100644 index 0000000000000000000000000000000000000000..062e9776e834a6fa4f99f1e2ee699241dc4f832b --- /dev/null +++ b/node_modules/.cache/babel-loader/3651677275ca832f30ad643700103a61.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js\";\nimport React, { Component } from \"react\"; // import vis from \"vis-network\";\n\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n constructor(...args) {\n super(...args);\n\n this.updateVisNodes = nodes => {\n this.props.setVisData(nodes);\n };\n }\n\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else if (nextProps.data && this.props.data && nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp) {\n console.log(\"Rerendering\");\n return true;\n } else if (nextProps.loadingGraph !== this.props.loadingGraph) {\n return true;\n } else {\n return false;\n }\n }\n\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n render() {\n if (this.props.loadingGraph) return React.createElement(Spinner, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 32\n },\n __self: this\n });\n\n if (this.props.data == null) {\n return React.createElement(\"div\", {\n className: \"card-body text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 35\n },\n __self: this\n }, React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Press \", React.createElement(\"span\", {\n className: \"badge badge-info\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Show Graph\"), \" to see the graph representation of the experiment.\"), React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"If the experiment is running, press \", React.createElement(\"span\", {\n className: \"badge badge-dark\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"Start Job Monitor\"), \" to start a live tracker of the changes on the experiment's jobs. This process will automatically update the graph's nodes colors and show a log of the detected changes.\"));\n }\n\n var nodes_array = [];\n var edges_array = [];\n\n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: {\n background: node.status_color,\n border: \"black\"\n },\n level: node.level\n }));\n this.props.data.edges.map(edge => edges_array.push({\n from: edge.from,\n to: edge.to\n }));\n }\n\n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n const options = {\n edges: {\n arrows: {\n to: {\n enabled: true\n }\n }\n },\n layout: {\n //improvedLayout: true,\n hierarchical: {\n nodeSpacing: 190,\n //blockShifting: true,\n edgeMinimization: false,\n //parentCentralization: true,\n sortMethod: 'hubsize',\n direction: 'UD'\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true\n },\n physics: {\n enabled: false\n },\n nodes: {\n shape: 'dot',\n font: {\n size: 10\n }\n }\n };\n const graph = {\n nodes: nodes,\n edges: edges\n };\n\n class VisNetwork extends Component {\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else {\n return false;\n }\n }\n\n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", params => {\n //console.log(params);\n if (params.nodes) {\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n });\n } // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n\n\n render() {\n return React.createElement(\"div\", {\n className: \"card-body p-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 133\n },\n __self: this\n }, React.createElement(\"div\", {\n ref: \"myRef\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 134\n },\n __self: this\n }));\n }\n\n }\n\n this.updateVisNodes(nodes);\n return React.createElement(VisNetwork, {\n graph: graph,\n options: options,\n updateSelection: this.props.updateSelection,\n shouldUpdateGraph: this.props.shouldUpdateGraph,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 142\n },\n __self: this\n });\n }\n\n}\n\nconst experimentStyle = {\n height: 600\n};\nexport default GraphNativeRep;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js"],"names":["React","Component","Spinner","vis","GraphNativeRep","updateVisNodes","nodes","props","setVisData","shouldComponentUpdate","nextProps","nextState","shouldUpdateGraph","data","pkl_timestamp","console","log","loadingGraph","componentWillUnmount","cleanGraphData","render","nodes_array","edges_array","edges","map","node","push","id","label","color","background","status_color","border","level","edge","from","to","DataSet","options","arrows","enabled","layout","hierarchical","nodeSpacing","edgeMinimization","sortMethod","direction","interaction","dragNodes","hoverConnectedEdges","navigationButtons","physics","shape","font","size","graph","VisNetwork","componentDidMount","network","Network","refs","myRef","on","params","updateSelection","experimentStyle","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,SAAhB,QAAiC,OAAjC,C,CACA;;AACA,OAAOC,OAAP,MAAoB,mBAApB;AACA,OAAOC,GAAP,MAAgB,KAAhB;;AAEA,MAAMC,cAAN,SAA6BH,SAA7B,CAAuC;AAAA;AAAA;;AAAA,SAmBnCI,cAnBmC,GAmBjBC,KAAD,IAAW;AACxB,WAAKC,KAAL,CAAWC,UAAX,CAAsBF,KAAtB;AACH,KArBkC;AAAA;;AAEnCG,EAAAA,qBAAqB,CAACC,SAAD,EAAYC,SAAZ,EAAsB;AACvC,QAAI,KAAKJ,KAAL,CAAWK,iBAAX,KAAiC,IAArC,EAA0C;AACtC,aAAO,IAAP;AACD,KAFH,MAEQ,IAAIF,SAAS,CAACG,IAAV,IAAkB,KAAKN,KAAL,CAAWM,IAA7B,IAAsCH,SAAS,CAACG,IAAV,CAAeC,aAAf,KAAiC,KAAKP,KAAL,CAAWM,IAAX,CAAgBC,aAA3F,EAA0G;AAC9GC,MAAAA,OAAO,CAACC,GAAR,CAAY,aAAZ;AACA,aAAO,IAAP;AACD,KAHK,MAGA,IAAIN,SAAS,CAACO,YAAV,KAA2B,KAAKV,KAAL,CAAWU,YAA1C,EAAuD;AAC3D,aAAO,IAAP;AACD,KAFK,MAED;AACH,aAAO,KAAP;AACD;AACN;;AACDC,EAAAA,oBAAoB,GAAG;AACnBH,IAAAA,OAAO,CAACC,GAAR,CAAY,YAAZ;AACA,SAAKT,KAAL,CAAWY,cAAX;AACH;;AAQDC,EAAAA,MAAM,GAAI;AACN,QAAI,KAAKb,KAAL,CAAWU,YAAf,EAA6B,OAAO,oBAAC,OAAD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C,iBAAO,IAAP;AACH,SAFF,MAEQ;AACH,iBAAO,KAAP;AACH;AACJ;;AAED6C,MAAAA,iBAAiB,GAAG;AAChB,YAAIC,OAAO,GAAG,IAAIvD,GAAG,CAACwD,OAAR,CAAgB,KAAKC,IAAL,CAAUC,KAA1B,EAAiC,KAAKtD,KAAL,CAAWgD,KAA5C,EAAmD,KAAKhD,KAAL,CAAW+B,OAA9D,CAAd;AACAoB,QAAAA,OAAO,CAACI,EAAR,CAAW,OAAX,EAAqBC,MAAD,IAAY;AAC5B;AACA,cAAIA,MAAM,CAACzD,KAAX,EAAiB;AACb;AACA,iBAAKC,KAAL,CAAWyD,eAAX,CAA2BD,MAAM,CAACzD,KAAlC;AACH;AAEJ,SAPD;AAQH,OApB8B,CAsB/B;AACA;AACA;AACA;;;AAEAc,MAAAA,MAAM,GAAG;AACL,eACI;AAAK,UAAA,SAAS,EAAC,eAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,WACI;AAAK,UAAA,GAAG,EAAC,OAAT;AAAiB,UAAA,KAAK,EAAE6C,eAAxB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,UADJ,CADJ;AAKH;;AAjC8B;;AAoCnC,SAAK5D,cAAL,CAAoBC,KAApB;AAEA,WAAO,oBAAC,UAAD;AACH,MAAA,KAAK,EAAEiD,KADJ;AAEH,MAAA,OAAO,EAAEjB,OAFN;AAGH,MAAA,eAAe,EAAE,KAAK/B,KAAL,CAAWyD,eAHzB;AAIH,MAAA,iBAAiB,EAAE,KAAKzD,KAAL,CAAWK,iBAJ3B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAAP;AAOH;;AA/IkC;;AA6JvC,MAAMqD,eAAe,GAAG;AACpBC,EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,eAAe9D,cAAf","sourcesContent":["import React, { Component } from \"react\";\n// import vis from \"vis-network\";\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n\n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true\n }else if (nextProps.data && this.props.data && (nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp)){\n console.log(\"Rerendering\")\n return true;\n }else if (nextProps.loadingGraph !== this.props.loadingGraph){\n return true; \n }else{\n return false;\n }\n }\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n updateVisNodes = (nodes) => {\n this.props.setVisData(nodes);\n }\n\n\n\n render () {\n if (this.props.loadingGraph) return ;\n if (this.props.data == null){\n return (\n
\n

Press Show Graph to see the graph representation of the experiment.

\n

If the experiment is running, press Start Job Monitor to start a live tracker of the changes on the experiment's jobs.\n This process will automatically update the graph's nodes colors and show a log of the detected changes.\n

\n
\n );\n }\n\n var nodes_array = [];\n var edges_array = [];\n \n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: { background: node.status_color, border: \"black\" },\n level: node.level,\n })\n );\n \n this.props.data.edges.map(edge => \n edges_array.push({ from: edge.from, to: edge.to })\n );\n }\n \n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n\n\n const options = {\n edges: {\n arrows: {\n to: { enabled: true }\n }\n },\n layout: {\n //improvedLayout: true,\n hierarchical: {\n nodeSpacing: 190,\n //blockShifting: true,\n edgeMinimization: false,\n //parentCentralization: true,\n sortMethod: 'hubsize',\n direction: 'UD',\n }\n }, \n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true,\n },\n physics: {\n enabled: false,\n },\n nodes: {\n shape: 'dot',\n font: {\n size: 10,\n },\n }\n };\n \n const graph = {\n nodes : nodes,\n edges : edges,\n };\n\n class VisNetwork extends Component {\n \n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true;\n } else {\n return false;\n }\n }\n \n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", (params) => {\n //console.log(params);\n if (params.nodes){\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n \n });\n }\n \n // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n \n render() { \n return (\n
\n
\n
\n );\n }\n }\n\n this.updateVisNodes(nodes);\n \n return ;\n\n }\n\n\n \n\n \n\n \n \n\n \n\n}\n\nconst experimentStyle = {\n height: 600\n };\n\nexport default GraphNativeRep;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/36b359d07821699eea8e44472b7070d7.json b/node_modules/.cache/babel-loader/36b359d07821699eea8e44472b7070d7.json new file mode 100644 index 0000000000000000000000000000000000000000..0f30b3c72ad05ae2d8a288a51dfc32e9ce001efb --- /dev/null +++ b/node_modules/.cache/babel-loader/36b359d07821699eea8e44472b7070d7.json @@ -0,0 +1 @@ +{"ast":null,"code":"/**\n * vis-network - network\n * http://visjs.org/\n *\n * A dynamic, browser-based visualization library.\n *\n * @version 5.2.4\n * @date 2019-08-18T08:11:56Z\n *\n * @copyright (c) 2011-2017 Almende B.V, http://almende.com\n * @copyright (c) 2018-2019 visjs contributors, https://github.com/visjs\n *\n * @license \n * vis.js is dual licensed under both\n *\n * 1. The Apache 2.0 License\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * and\n *\n * 2. The MIT License\n * http://opensource.org/licenses/MIT\n *\n * vis.js may be distributed under either license.\n */\nvar commonjsGlobal = \"undefined\" == typeof globalThis ? \"undefined\" == typeof window ? \"undefined\" == typeof global ? \"undefined\" == typeof self ? {} : self : global : window : globalThis;\n\nfunction commonjsRequire() {\n throw new Error(\"Dynamic requires are not currently supported by rollup-plugin-commonjs\");\n}\n\nfunction createCommonjsModule(e, t) {\n return t = {\n exports: {}\n }, e(t, t.exports), t.exports;\n}\n\nvar _global = createCommonjsModule(function (e) {\n var t = e.exports = \"undefined\" != typeof window && window.Math == Math ? window : \"undefined\" != typeof self && self.Math == Math ? self : Function(\"return this\")();\n \"number\" == typeof __g && (__g = t);\n}),\n _core = createCommonjsModule(function (e) {\n var t = e.exports = {\n version: \"2.6.9\"\n };\n \"number\" == typeof __e && (__e = t);\n}),\n _core_1 = _core.version,\n _library = !1,\n _shared = createCommonjsModule(function (e) {\n var t = _global[\"__core-js_shared__\"] || (_global[\"__core-js_shared__\"] = {});\n (e.exports = function (e, o) {\n return t[e] || (t[e] = o === void 0 ? {} : o);\n })(\"versions\", []).push({\n version: _core.version,\n mode: \"global\",\n copyright: \"\\xA9 2019 Denis Pushkarev (zloirock.ru)\"\n });\n}),\n id = 0,\n px = Math.random(),\n _uid = function (e) {\n return \"Symbol(\".concat(e === void 0 ? \"\" : e, \")_\", (++id + px).toString(36));\n},\n _wks = createCommonjsModule(function (e) {\n var t = _shared(\"wks\"),\n o = _global.Symbol,\n n = \"function\" == typeof o,\n i = e.exports = function (e) {\n return t[e] || (t[e] = n && o[e] || (n ? o : _uid)(\"Symbol.\" + e));\n };\n\n i.store = t;\n}),\n f = _wks,\n _wksExt = {\n f: f\n},\n _isObject = function (e) {\n return \"object\" == typeof e ? null !== e : \"function\" == typeof e;\n},\n _anObject = function (e) {\n if (!_isObject(e)) throw TypeError(e + \" is not an object!\");\n return e;\n},\n _fails = function (e) {\n try {\n return !!e();\n } catch (t) {\n return !0;\n }\n},\n _descriptors = !_fails(function () {\n return 7 != Object.defineProperty({}, \"a\", {\n get: function () {\n return 7;\n }\n }).a;\n}),\n document$1 = _global.document,\n is = _isObject(document$1) && _isObject(document$1.createElement),\n _domCreate = function (e) {\n return is ? document$1.createElement(e) : {};\n},\n _ie8DomDefine = !_descriptors && !_fails(function () {\n return 7 != Object.defineProperty(_domCreate(\"div\"), \"a\", {\n get: function () {\n return 7;\n }\n }).a;\n}),\n _toPrimitive = function (e, t) {\n if (!_isObject(e)) return e;\n var o, n;\n if (t && \"function\" == typeof (o = e.toString) && !_isObject(n = o.call(e))) return n;\n if (\"function\" == typeof (o = e.valueOf) && !_isObject(n = o.call(e))) return n;\n if (!t && \"function\" == typeof (o = e.toString) && !_isObject(n = o.call(e))) return n;\n throw TypeError(\"Can't convert object to primitive value\");\n},\n dP = Object.defineProperty,\n f$1 = _descriptors ? Object.defineProperty : function (e, t, o) {\n if (_anObject(e), t = _toPrimitive(t, !0), _anObject(o), _ie8DomDefine) try {\n return dP(e, t, o);\n } catch (t) {}\n if (\"get\" in o || \"set\" in o) throw TypeError(\"Accessors not supported!\");\n return \"value\" in o && (e[t] = o.value), e;\n},\n _objectDp = {\n f: f$1\n},\n defineProperty = _objectDp.f,\n _wksDefine = function (e) {\n var t = _core.Symbol || (_core.Symbol = _global.Symbol || {});\n \"_\" == e.charAt(0) || e in t || defineProperty(t, e, {\n value: _wksExt.f(e)\n });\n};\n\n_wksDefine(\"asyncIterator\");\n\nvar hasOwnProperty = {}.hasOwnProperty,\n _has = function (e, t) {\n return hasOwnProperty.call(e, t);\n},\n _propertyDesc = function (e, t) {\n return {\n enumerable: !(1 & e),\n configurable: !(2 & e),\n writable: !(4 & e),\n value: t\n };\n},\n _hide = _descriptors ? function (e, t, o) {\n return _objectDp.f(e, t, _propertyDesc(1, o));\n} : function (e, t, o) {\n return e[t] = o, e;\n},\n _functionToString = _shared(\"native-function-to-string\", Function.toString),\n _redefine = createCommonjsModule(function (e) {\n var t = _uid(\"src\"),\n o = \"toString\",\n n = (\"\" + _functionToString).split(o);\n\n _core.inspectSource = function (e) {\n return _functionToString.call(e);\n }, (e.exports = function (e, o, i, a) {\n var d = \"function\" == typeof i;\n d && (_has(i, \"name\") || _hide(i, \"name\", o));\n e[o] === i || (d && (_has(i, t) || _hide(i, t, e[o] ? \"\" + e[o] : n.join(o + \"\"))), e === _global ? e[o] = i : a ? e[o] ? e[o] = i : _hide(e, o, i) : (delete e[o], _hide(e, o, i)));\n })(Function.prototype, o, function () {\n return \"function\" == typeof this && this[t] || _functionToString.call(this);\n });\n}),\n _aFunction = function (e) {\n if (\"function\" != typeof e) throw TypeError(e + \" is not a function!\");\n return e;\n},\n _ctx = function (e, t, o) {\n return (_aFunction(e), void 0 === t) ? e : 1 === o ? function (o) {\n return e.call(t, o);\n } : 2 === o ? function (o, n) {\n return e.call(t, o, n);\n } : 3 === o ? function (o, n, i) {\n return e.call(t, o, n, i);\n } : function () {\n return e.apply(t, arguments);\n };\n},\n PROTOTYPE = \"prototype\",\n $export = function (e, t, o) {\n var n = e & $export.F,\n i = e & $export.G,\n a = e & $export.S,\n d = e & $export.P,\n s = e & $export.B,\n r = i ? _global : a ? _global[t] || (_global[t] = {}) : (_global[t] || {})[PROTOTYPE],\n l = i ? _core : _core[t] || (_core[t] = {}),\n c = l[PROTOTYPE] || (l[PROTOTYPE] = {}),\n u,\n p,\n h,\n m;\n\n for (u in i && (o = t), o) p = !n && r && void 0 !== r[u], h = (p ? r : o)[u], m = s && p ? _ctx(h, _global) : d && \"function\" == typeof h ? _ctx(Function.call, h) : h, r && _redefine(r, u, h, e & $export.U), l[u] != h && _hide(l, u, m), d && c[u] != h && (c[u] = h);\n};\n\n_global.core = _core, $export.F = 1, $export.G = 2, $export.S = 4, $export.P = 8, $export.B = 16, $export.W = 32, $export.U = 64, $export.R = 128;\n\nvar _export = $export,\n _meta = createCommonjsModule(function (e) {\n var t = _uid(\"meta\"),\n o = _objectDp.f,\n n = 0,\n i = Object.isExtensible || function () {\n return !0;\n },\n a = !_fails(function () {\n return i(Object.preventExtensions({}));\n }),\n d = function (e) {\n o(e, t, {\n value: {\n i: \"O\" + ++n,\n w: {}\n }\n });\n },\n s = e.exports = {\n KEY: t,\n NEED: !1,\n fastKey: function (e, o) {\n if (!_isObject(e)) return \"symbol\" == typeof e ? e : (\"string\" == typeof e ? \"S\" : \"P\") + e;\n\n if (!_has(e, t)) {\n if (!i(e)) return \"F\";\n if (!o) return \"E\";\n d(e);\n }\n\n return e[t].i;\n },\n getWeak: function (e, o) {\n if (!_has(e, t)) {\n if (!i(e)) return !0;\n if (!o) return !1;\n d(e);\n }\n\n return e[t].w;\n },\n onFreeze: function (e) {\n return a && s.NEED && i(e) && !_has(e, t) && d(e), e;\n }\n };\n}),\n _meta_1 = _meta.KEY,\n _meta_2 = _meta.NEED,\n _meta_3 = _meta.fastKey,\n _meta_4 = _meta.getWeak,\n _meta_5 = _meta.onFreeze,\n def = _objectDp.f,\n TAG = _wks(\"toStringTag\"),\n _setToStringTag = function (e, t, o) {\n e && !_has(e = o ? e : e.prototype, TAG) && def(e, TAG, {\n configurable: !0,\n value: t\n });\n},\n toString = {}.toString,\n _cof = function (e) {\n return toString.call(e).slice(8, -1);\n},\n _iobject = Object(\"z\").propertyIsEnumerable(0) ? Object : function (e) {\n return \"String\" == _cof(e) ? e.split(\"\") : Object(e);\n},\n _defined = function (e) {\n if (e == null) throw TypeError(\"Can't call method on \" + e);\n return e;\n},\n _toIobject = function (e) {\n return _iobject(_defined(e));\n},\n ceil = Math.ceil,\n floor = Math.floor,\n _toInteger = function (e) {\n return isNaN(e = +e) ? 0 : (0 < e ? floor : ceil)(e);\n},\n min = Math.min,\n _toLength = function (e) {\n return 0 < e ? min(_toInteger(e), 9007199254740991) : 0;\n},\n max = Math.max,\n min$1 = Math.min,\n _toAbsoluteIndex = function (e, t) {\n return e = _toInteger(e), 0 > e ? max(e + t, 0) : min$1(e, t);\n},\n _arrayIncludes = function (e) {\n return function (t, o, n) {\n var i = _toIobject(t),\n a = _toLength(i.length),\n d = _toAbsoluteIndex(n, a),\n s;\n\n if (e && o != o) {\n for (; a > d;) if (s = i[d++], s != s) return !0;\n } else for (; a > d; d++) if ((e || d in i) && i[d] === o) return e || d || 0;\n\n return !e && -1;\n };\n},\n shared = _shared(\"keys\"),\n _sharedKey = function (e) {\n return shared[e] || (shared[e] = _uid(e));\n},\n arrayIndexOf = _arrayIncludes(!1),\n IE_PROTO = _sharedKey(\"IE_PROTO\"),\n _objectKeysInternal = function (e, t) {\n var o = _toIobject(e),\n n = 0,\n a = [],\n d;\n\n for (d in o) d != IE_PROTO && _has(o, d) && a.push(d);\n\n for (; t.length > n;) _has(o, d = t[n++]) && (~arrayIndexOf(a, d) || a.push(d));\n\n return a;\n},\n _enumBugKeys = [\"constructor\", \"hasOwnProperty\", \"isPrototypeOf\", \"propertyIsEnumerable\", \"toLocaleString\", \"toString\", \"valueOf\"],\n _objectKeys = Object.keys || function (e) {\n return _objectKeysInternal(e, _enumBugKeys);\n},\n f$2 = Object.getOwnPropertySymbols,\n _objectGops = {\n f: f$2\n},\n f$3 = {}.propertyIsEnumerable,\n _objectPie = {\n f: f$3\n},\n _enumKeys = function (e) {\n var t = _objectKeys(e),\n o = _objectGops.f;\n\n if (o) for (var n = o(e), a = _objectPie.f, d = 0, s; n.length > d;) a.call(e, s = n[d++]) && t.push(s);\n return t;\n},\n _isArray = Array.isArray || function (e) {\n return \"Array\" == _cof(e);\n},\n _toObject = function (e) {\n return Object(_defined(e));\n},\n _objectDps = _descriptors ? Object.defineProperties : function (e, t) {\n _anObject(e);\n\n for (var o = _objectKeys(t), n = o.length, a = 0, d; n > a;) _objectDp.f(e, d = o[a++], t[d]);\n\n return e;\n},\n document$2 = _global.document,\n _html = document$2 && document$2.documentElement,\n IE_PROTO$1 = _sharedKey(\"IE_PROTO\"),\n Empty = function () {},\n PROTOTYPE$1 = \"prototype\",\n createDict = function () {\n var e = _domCreate(\"iframe\"),\n t = _enumBugKeys.length,\n o = \"<\",\n n = \">\",\n a;\n\n for (e.style.display = \"none\", _html.appendChild(e), e.src = \"javascript:\", a = e.contentWindow.document, a.open(), a.write(o + \"script\" + n + \"document.F=Object\" + o + \"/script\" + n), a.close(), createDict = a.F; t--;) delete createDict[PROTOTYPE$1][_enumBugKeys[t]];\n\n return createDict();\n},\n _objectCreate = Object.create || function (e, t) {\n var o;\n return null === e ? o = createDict() : (Empty[PROTOTYPE$1] = _anObject(e), o = new Empty(), Empty[PROTOTYPE$1] = null, o[IE_PROTO$1] = e), void 0 === t ? o : _objectDps(o, t);\n},\n hiddenKeys = _enumBugKeys.concat(\"length\", \"prototype\"),\n f$4 = Object.getOwnPropertyNames || function (e) {\n return _objectKeysInternal(e, hiddenKeys);\n},\n _objectGopn = {\n f: f$4\n},\n gOPN = _objectGopn.f,\n toString$1 = {}.toString,\n windowNames = \"object\" == typeof window && window && Object.getOwnPropertyNames ? Object.getOwnPropertyNames(window) : [],\n getWindowNames = function (e) {\n try {\n return gOPN(e);\n } catch (t) {\n return windowNames.slice();\n }\n},\n f$5 = function (e) {\n return windowNames && \"[object Window]\" == toString$1.call(e) ? getWindowNames(e) : gOPN(_toIobject(e));\n},\n _objectGopnExt = {\n f: f$5\n},\n gOPD = Object.getOwnPropertyDescriptor,\n f$6 = _descriptors ? gOPD : function (e, t) {\n if (e = _toIobject(e), t = _toPrimitive(t, !0), _ie8DomDefine) try {\n return gOPD(e, t);\n } catch (t) {}\n return _has(e, t) ? _propertyDesc(!_objectPie.f.call(e, t), e[t]) : void 0;\n},\n _objectGopd = {\n f: f$6\n},\n META = _meta.KEY,\n gOPD$1 = _objectGopd.f,\n dP$1 = _objectDp.f,\n gOPN$1 = _objectGopnExt.f,\n $Symbol = _global.Symbol,\n $JSON = _global.JSON,\n _stringify = $JSON && $JSON.stringify,\n PROTOTYPE$2 = \"prototype\",\n HIDDEN = _wks(\"_hidden\"),\n TO_PRIMITIVE = _wks(\"toPrimitive\"),\n isEnum = {}.propertyIsEnumerable,\n SymbolRegistry = _shared(\"symbol-registry\"),\n AllSymbols = _shared(\"symbols\"),\n OPSymbols = _shared(\"op-symbols\"),\n ObjectProto = Object[PROTOTYPE$2],\n USE_NATIVE = \"function\" == typeof $Symbol && !!_objectGops.f,\n QObject = _global.QObject,\n setter = !QObject || !QObject[PROTOTYPE$2] || !QObject[PROTOTYPE$2].findChild,\n setSymbolDesc = _descriptors && _fails(function () {\n return 7 != _objectCreate(dP$1({}, \"a\", {\n get: function () {\n return dP$1(this, \"a\", {\n value: 7\n }).a;\n }\n })).a;\n}) ? function (e, t, o) {\n var n = gOPD$1(ObjectProto, t);\n n && delete ObjectProto[t], dP$1(e, t, o), n && e !== ObjectProto && dP$1(ObjectProto, t, n);\n} : dP$1,\n wrap = function (e) {\n var t = AllSymbols[e] = _objectCreate($Symbol[PROTOTYPE$2]);\n\n return t._k = e, t;\n},\n isSymbol = USE_NATIVE && \"symbol\" == typeof $Symbol.iterator ? function (e) {\n return \"symbol\" == typeof e;\n} : function (e) {\n return e instanceof $Symbol;\n},\n $defineProperty = function (e, t, o) {\n return e === ObjectProto && $defineProperty(OPSymbols, t, o), _anObject(e), t = _toPrimitive(t, !0), _anObject(o), _has(AllSymbols, t) ? (o.enumerable ? (_has(e, HIDDEN) && e[HIDDEN][t] && (e[HIDDEN][t] = !1), o = _objectCreate(o, {\n enumerable: _propertyDesc(0, !1)\n })) : (!_has(e, HIDDEN) && dP$1(e, HIDDEN, _propertyDesc(1, {})), e[HIDDEN][t] = !0), setSymbolDesc(e, t, o)) : dP$1(e, t, o);\n},\n $defineProperties = function (e, t) {\n _anObject(e);\n\n for (var o = _enumKeys(t = _toIobject(t)), n = 0, a = o.length, d; a > n;) $defineProperty(e, d = o[n++], t[d]);\n\n return e;\n},\n $create = function (e, t) {\n return t === void 0 ? _objectCreate(e) : $defineProperties(_objectCreate(e), t);\n},\n $propertyIsEnumerable = function (e) {\n var t = isEnum.call(this, e = _toPrimitive(e, !0));\n return (this !== ObjectProto || !_has(AllSymbols, e) || _has(OPSymbols, e)) && (!(t || !_has(this, e) || !_has(AllSymbols, e) || _has(this, HIDDEN) && this[HIDDEN][e]) || t);\n},\n $getOwnPropertyDescriptor = function (e, t) {\n if (e = _toIobject(e), t = _toPrimitive(t, !0), e !== ObjectProto || !_has(AllSymbols, t) || _has(OPSymbols, t)) {\n var o = gOPD$1(e, t);\n return o && _has(AllSymbols, t) && !(_has(e, HIDDEN) && e[HIDDEN][t]) && (o.enumerable = !0), o;\n }\n},\n $getOwnPropertyNames = function (e) {\n for (var t = gOPN$1(_toIobject(e)), o = [], n = 0, a; t.length > n;) _has(AllSymbols, a = t[n++]) || a == HIDDEN || a == META || o.push(a);\n\n return o;\n},\n $getOwnPropertySymbols = function (e) {\n for (var t = e === ObjectProto, o = gOPN$1(t ? OPSymbols : _toIobject(e)), n = [], a = 0, d; o.length > a;) _has(AllSymbols, d = o[a++]) && (!t || _has(ObjectProto, d)) && n.push(AllSymbols[d]);\n\n return n;\n};\n\nUSE_NATIVE || ($Symbol = function () {\n if (this instanceof $Symbol) throw TypeError(\"Symbol is not a constructor!\");\n\n var e = _uid(0 < arguments.length ? arguments[0] : void 0),\n t = function (o) {\n this === ObjectProto && t.call(OPSymbols, o), _has(this, HIDDEN) && _has(this[HIDDEN], e) && (this[HIDDEN][e] = !1), setSymbolDesc(this, e, _propertyDesc(1, o));\n };\n\n return _descriptors && setter && setSymbolDesc(ObjectProto, e, {\n configurable: !0,\n set: t\n }), wrap(e);\n}, _redefine($Symbol[PROTOTYPE$2], \"toString\", function () {\n return this._k;\n}), _objectGopd.f = $getOwnPropertyDescriptor, _objectDp.f = $defineProperty, _objectGopn.f = _objectGopnExt.f = $getOwnPropertyNames, _objectPie.f = $propertyIsEnumerable, _objectGops.f = $getOwnPropertySymbols, _descriptors && !_library && _redefine(ObjectProto, \"propertyIsEnumerable\", $propertyIsEnumerable, !0), _wksExt.f = function (e) {\n return wrap(_wks(e));\n}), _export(_export.G + _export.W + _export.F * !USE_NATIVE, {\n Symbol: $Symbol\n});\n\nfor (var es6Symbols = [\"hasInstance\", \"isConcatSpreadable\", \"iterator\", \"match\", \"replace\", \"search\", \"species\", \"split\", \"toPrimitive\", \"toStringTag\", \"unscopables\"], j = 0; es6Symbols.length > j;) _wks(es6Symbols[j++]);\n\nfor (var wellKnownSymbols = _objectKeys(_wks.store), k = 0; wellKnownSymbols.length > k;) _wksDefine(wellKnownSymbols[k++]);\n\n_export(_export.S + _export.F * !USE_NATIVE, \"Symbol\", {\n for: function (e) {\n return _has(SymbolRegistry, e += \"\") ? SymbolRegistry[e] : SymbolRegistry[e] = $Symbol(e);\n },\n keyFor: function (e) {\n if (!isSymbol(e)) throw TypeError(e + \" is not a symbol!\");\n\n for (var t in SymbolRegistry) if (SymbolRegistry[t] === e) return t;\n },\n useSetter: function () {\n setter = !0;\n },\n useSimple: function () {\n setter = !1;\n }\n}), _export(_export.S + _export.F * !USE_NATIVE, \"Object\", {\n create: $create,\n defineProperty: $defineProperty,\n defineProperties: $defineProperties,\n getOwnPropertyDescriptor: $getOwnPropertyDescriptor,\n getOwnPropertyNames: $getOwnPropertyNames,\n getOwnPropertySymbols: $getOwnPropertySymbols\n});\n\nvar FAILS_ON_PRIMITIVES = _fails(function () {\n _objectGops.f(1);\n});\n\n_export(_export.S + _export.F * FAILS_ON_PRIMITIVES, \"Object\", {\n getOwnPropertySymbols: function (e) {\n return _objectGops.f(_toObject(e));\n }\n}), $JSON && _export(_export.S + _export.F * (!USE_NATIVE || _fails(function () {\n var e = $Symbol();\n return \"[null]\" != _stringify([e]) || \"{}\" != _stringify({\n a: e\n }) || \"{}\" != _stringify(Object(e));\n})), \"JSON\", {\n stringify: function (e) {\n for (var t = [e], o = 1, n, a; arguments.length > o;) t.push(arguments[o++]);\n\n if (a = n = t[1], (_isObject(n) || void 0 !== e) && !isSymbol(e)) return _isArray(n) || (n = function (e, t) {\n if (\"function\" == typeof a && (t = a.call(this, e, t)), !isSymbol(t)) return t;\n }), t[1] = n, _stringify.apply($JSON, t);\n }\n}), $Symbol[PROTOTYPE$2][TO_PRIMITIVE] || _hide($Symbol[PROTOTYPE$2], TO_PRIMITIVE, $Symbol[PROTOTYPE$2].valueOf), _setToStringTag($Symbol, \"Symbol\"), _setToStringTag(Math, \"Math\", !0), _setToStringTag(_global.JSON, \"JSON\", !0);\n\nfunction _typeof(e) {\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (e) {\n return typeof e;\n } : function (e) {\n return e && \"function\" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? \"symbol\" : typeof e;\n }, _typeof(e);\n}\n\nfunction _defineProperty(e, t, o) {\n return t in e ? Object.defineProperty(e, t, {\n value: o,\n enumerable: !0,\n configurable: !0,\n writable: !0\n }) : e[t] = o, e;\n}\n\nfunction ownKeys(e, t) {\n var o = Object.keys(e);\n return Object.getOwnPropertySymbols && o.push.apply(o, Object.getOwnPropertySymbols(e)), t && (o = o.filter(function (t) {\n return Object.getOwnPropertyDescriptor(e, t).enumerable;\n })), o;\n}\n\nfunction _objectSpread2(e) {\n for (var t = 1, o; t < arguments.length; t++) o = null == arguments[t] ? {} : arguments[t], t % 2 ? ownKeys(o, !0).forEach(function (t) {\n _defineProperty(e, t, o[t]);\n }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(o)) : ownKeys(o).forEach(function (t) {\n Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(o, t));\n });\n\n return e;\n}\n\nfunction _toConsumableArray(e) {\n return _arrayWithoutHoles(e) || _iterableToArray(e) || _nonIterableSpread();\n}\n\nfunction _arrayWithoutHoles(e) {\n if (Array.isArray(e)) {\n for (var t = 0, o = Array(e.length); t < e.length; t++) o[t] = e[t];\n\n return o;\n }\n}\n\nfunction _iterableToArray(e) {\n if (Symbol.iterator in Object(e) || \"[object Arguments]\" === Object.prototype.toString.call(e)) return Array.from(e);\n}\n\nfunction _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance\");\n}\n\nvar _objectSap = function (e, t) {\n var o = (_core.Object || {})[e] || Object[e],\n n = {};\n n[e] = t(o), _export(_export.S + _export.F * _fails(function () {\n o(1);\n }), \"Object\", n);\n};\n\n_objectSap(\"keys\", function () {\n return function (e) {\n return _objectKeys(_toObject(e));\n };\n});\n\nvar _flags = function () {\n var e = _anObject(this),\n t = \"\";\n\n return e.global && (t += \"g\"), e.ignoreCase && (t += \"i\"), e.multiline && (t += \"m\"), e.unicode && (t += \"u\"), e.sticky && (t += \"y\"), t;\n};\n\n_descriptors && \"g\" != /./g.flags && _objectDp.f(RegExp.prototype, \"flags\", {\n configurable: !0,\n get: _flags\n});\n\nvar TO_STRING = \"toString\",\n $toString = /./.toString,\n define = function (e) {\n _redefine(RegExp.prototype, TO_STRING, e, !0);\n};\n\n_fails(function () {\n return \"/a/b\" != $toString.call({\n source: \"a\",\n flags: \"b\"\n });\n}) ? define(function () {\n var e = _anObject(this);\n\n return \"/\".concat(e.source, \"/\", \"flags\" in e ? e.flags : !_descriptors && e instanceof RegExp ? _flags.call(e) : void 0);\n}) : $toString.name != \"toString\" && define(function () {\n return $toString.call(this);\n});\n\nvar _stringAt = function (e) {\n return function (t, o) {\n var n = _defined(t) + \"\",\n d = _toInteger(o),\n i = n.length,\n s,\n r;\n\n return 0 > d || d >= i ? e ? \"\" : void 0 : (s = n.charCodeAt(d), 55296 > s || 56319 < s || d + 1 === i || 56320 > (r = n.charCodeAt(d + 1)) || 57343 < r ? e ? n.charAt(d) : s : e ? n.slice(d, d + 2) : (s - 55296 << 10) + (r - 56320) + 65536);\n };\n},\n at = _stringAt(!0),\n _advanceStringIndex = function (e, t, o) {\n return t + (o ? at(e, t).length : 1);\n},\n TAG$1 = _wks(\"toStringTag\"),\n ARG = \"Arguments\" == _cof(function () {\n return arguments;\n}()),\n tryGet = function (e, t) {\n try {\n return e[t];\n } catch (t) {}\n},\n _classof = function (e) {\n var t, o, n;\n return e === void 0 ? \"Undefined\" : null === e ? \"Null\" : \"string\" == typeof (o = tryGet(t = Object(e), TAG$1)) ? o : ARG ? _cof(t) : \"Object\" == (n = _cof(t)) && \"function\" == typeof t.callee ? \"Arguments\" : n;\n},\n builtinExec = RegExp.prototype.exec,\n _regexpExecAbstract = function (e, t) {\n var o = e.exec;\n\n if (\"function\" == typeof o) {\n var n = o.call(e, t);\n if (\"object\" != typeof n) throw new TypeError(\"RegExp exec method returned something other than an Object or null\");\n return n;\n }\n\n if (\"RegExp\" !== _classof(e)) throw new TypeError(\"RegExp#exec called on incompatible receiver\");\n return builtinExec.call(e, t);\n},\n nativeExec = RegExp.prototype.exec,\n nativeReplace = String.prototype.replace,\n patchedExec = nativeExec,\n LAST_INDEX = \"lastIndex\",\n UPDATES_LAST_INDEX_WRONG = function () {\n var e = /a/,\n t = /b*/g;\n return nativeExec.call(e, \"a\"), nativeExec.call(t, \"a\"), 0 !== e[LAST_INDEX] || 0 !== t[LAST_INDEX];\n}(),\n NPCG_INCLUDED = /()??/.exec(\"\")[1] !== void 0,\n PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED;\n\nPATCH && (patchedExec = function (e) {\n var t = this,\n o,\n n,\n a,\n d;\n return NPCG_INCLUDED && (n = new RegExp(\"^\" + t.source + \"$(?!\\\\s)\", _flags.call(t))), UPDATES_LAST_INDEX_WRONG && (o = t[LAST_INDEX]), a = nativeExec.call(t, e), UPDATES_LAST_INDEX_WRONG && a && (t[LAST_INDEX] = t.global ? a.index + a[0].length : o), NPCG_INCLUDED && a && 1 < a.length && nativeReplace.call(a[0], n, function () {\n for (d = 1; d < arguments.length - 2; d++) void 0 === arguments[d] && (a[d] = void 0);\n }), a;\n});\nvar _regexpExec = patchedExec;\n\n_export({\n target: \"RegExp\",\n proto: !0,\n forced: _regexpExec !== /./.exec\n}, {\n exec: _regexpExec\n});\n\nvar SPECIES = _wks(\"species\"),\n REPLACE_SUPPORTS_NAMED_GROUPS = !_fails(function () {\n var e = /./;\n return e.exec = function () {\n var e = [];\n return e.groups = {\n a: \"7\"\n }, e;\n }, \"7\" !== \"\".replace(e, \"$\");\n}),\n SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = function () {\n var e = /(?:)/,\n t = e.exec;\n\n e.exec = function () {\n return t.apply(this, arguments);\n };\n\n var o = \"ab\".split(e);\n return 2 === o.length && \"a\" === o[0] && \"b\" === o[1];\n}(),\n _fixReWks = function (e, t, o) {\n var n = _wks(e),\n i = !_fails(function () {\n var t = {};\n return t[n] = function () {\n return 7;\n }, 7 != \"\"[e](t);\n }),\n a = i ? !_fails(function () {\n var t = !1,\n o = /a/;\n return o.exec = function () {\n return t = !0, null;\n }, \"split\" === e && (o.constructor = {}, o.constructor[SPECIES] = function () {\n return o;\n }), o[n](\"\"), !t;\n }) : void 0;\n\n if (!i || !a || \"replace\" === e && !REPLACE_SUPPORTS_NAMED_GROUPS || \"split\" === e && !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC) {\n var d = /./[n],\n s = o(_defined, n, \"\"[e], function (e, t, o, n, a) {\n return t.exec === _regexpExec ? i && !a ? {\n done: !0,\n value: d.call(t, o, n)\n } : {\n done: !0,\n value: e.call(o, t, n)\n } : {\n done: !1\n };\n }),\n r = s[0],\n l = s[1];\n _redefine(String.prototype, e, r), _hide(RegExp.prototype, n, 2 == t ? function (e, t) {\n return l.call(e, this, t);\n } : function (e) {\n return l.call(e, this);\n });\n }\n},\n max$1 = Math.max,\n min$2 = Math.min,\n floor$1 = Math.floor,\n SUBSTITUTION_SYMBOLS = /\\$([$&`']|\\d\\d?|<[^>]*>)/g,\n SUBSTITUTION_SYMBOLS_NO_NAMED = /\\$([$&`']|\\d\\d?)/g,\n maybeToString = function (e) {\n return e === void 0 ? e : e + \"\";\n};\n\n_fixReWks(\"replace\", 2, function (e, t, o, n) {\n function a(e, t, i, a, d, s) {\n var r = i + e.length,\n l = a.length,\n n = SUBSTITUTION_SYMBOLS_NO_NAMED;\n return void 0 !== d && (d = _toObject(d), n = SUBSTITUTION_SYMBOLS), o.call(s, n, function (o, s) {\n var c;\n\n switch (s.charAt(0)) {\n case \"$\":\n return \"$\";\n\n case \"&\":\n return e;\n\n case \"`\":\n return t.slice(0, i);\n\n case \"'\":\n return t.slice(r);\n\n case \"<\":\n c = d[s.slice(1, -1)];\n break;\n\n default:\n var u = +s;\n if (0 == u) return o;\n\n if (u > l) {\n var n = floor$1(u / 10);\n return 0 === n ? o : n <= l ? void 0 === a[n - 1] ? s.charAt(1) : a[n - 1] + s.charAt(1) : o;\n }\n\n c = a[u - 1];\n }\n\n return void 0 === c ? \"\" : c;\n });\n }\n\n return [function (n, i) {\n var a = e(this),\n d = n == null ? void 0 : n[t];\n return d === void 0 ? o.call(a + \"\", n, i) : d.call(n, a, i);\n }, function (e, t) {\n var d = n(o, e, this, t);\n if (d.done) return d.value;\n\n var s = _anObject(e),\n r = this + \"\",\n l = \"function\" == typeof t;\n\n l || (t = t + \"\");\n var c = s.global;\n\n if (c) {\n var u = s.unicode;\n s.lastIndex = 0;\n }\n\n for (var p = [], h; (h = _regexpExecAbstract(s, r), null !== h) && !(p.push(h), !c);) {\n var m = h[0] + \"\";\n \"\" == m && (s.lastIndex = _advanceStringIndex(r, _toLength(s.lastIndex), u));\n }\n\n for (var g = \"\", y = 0, f = 0; f < p.length; f++) {\n h = p[f];\n\n for (var b = h[0] + \"\", _ = max$1(min$2(_toInteger(h.index), r.length), 0), v = [], k = 1; k < h.length; k++) v.push(maybeToString(h[k]));\n\n var w = h.groups;\n\n if (l) {\n var x = [b].concat(v, _, r);\n w !== void 0 && x.push(w);\n var S = t.apply(void 0, x) + \"\";\n } else S = a(b, r, _, v, w, t);\n\n _ >= y && (g += r.slice(y, _) + S, y = _ + b.length);\n }\n\n return g + r.slice(y);\n }];\n});\n\nvar UNSCOPABLES = _wks(\"unscopables\"),\n ArrayProto = Array.prototype;\n\nArrayProto[UNSCOPABLES] == null && _hide(ArrayProto, UNSCOPABLES, {});\n\nvar _addToUnscopables = function (e) {\n ArrayProto[UNSCOPABLES][e] = !0;\n},\n _iterStep = function (e, t) {\n return {\n value: t,\n done: !!e\n };\n},\n _iterators = {},\n IteratorPrototype = {};\n\n_hide(IteratorPrototype, _wks(\"iterator\"), function () {\n return this;\n});\n\nvar _iterCreate = function (e, t, o) {\n e.prototype = _objectCreate(IteratorPrototype, {\n next: _propertyDesc(1, o)\n }), _setToStringTag(e, t + \" Iterator\");\n},\n IE_PROTO$2 = _sharedKey(\"IE_PROTO\"),\n ObjectProto$1 = Object.prototype,\n _objectGpo = Object.getPrototypeOf || function (e) {\n return e = _toObject(e), _has(e, IE_PROTO$2) ? e[IE_PROTO$2] : \"function\" == typeof e.constructor && e instanceof e.constructor ? e.constructor.prototype : e instanceof Object ? ObjectProto$1 : null;\n},\n ITERATOR = _wks(\"iterator\"),\n BUGGY = !([].keys && \"next\" in [].keys()),\n FF_ITERATOR = \"@@iterator\",\n KEYS = \"keys\",\n VALUES = \"values\",\n returnThis = function () {\n return this;\n},\n _iterDefine = function (e, t, o, n, i, a, d) {\n _iterCreate(o, t, n);\n\n var s = function (e) {\n return !BUGGY && e in u ? u[e] : e === KEYS ? function () {\n return new o(this, e);\n } : e === VALUES ? function () {\n return new o(this, e);\n } : function () {\n return new o(this, e);\n };\n },\n r = t + \" Iterator\",\n l = i == VALUES,\n c = !1,\n u = e.prototype,\n p = u[ITERATOR] || u[FF_ITERATOR] || i && u[i],\n h = p || s(i),\n m = i ? l ? s(\"entries\") : h : void 0,\n g = \"Array\" == t ? u.entries || p : p,\n y,\n f,\n b;\n\n if (g && (b = _objectGpo(g.call(new e())), b !== Object.prototype && b.next && (_setToStringTag(b, r, !0), \"function\" != typeof b[ITERATOR] && _hide(b, ITERATOR, returnThis))), l && p && p.name !== VALUES && (c = !0, h = function () {\n return p.call(this);\n }), (BUGGY || c || !u[ITERATOR]) && _hide(u, ITERATOR, h), _iterators[t] = h, _iterators[r] = returnThis, i) if (y = {\n values: l ? h : s(VALUES),\n keys: a ? h : s(KEYS),\n entries: m\n }, d) for (f in y) f in u || _redefine(u, f, y[f]);else _export(_export.P + _export.F * (BUGGY || c), t, y);\n return y;\n},\n es6_array_iterator = _iterDefine(Array, \"Array\", function (e, t) {\n this._t = _toIobject(e), this._i = 0, this._k = t;\n}, function () {\n var e = this._t,\n t = this._k,\n o = this._i++;\n return !e || o >= e.length ? (this._t = void 0, _iterStep(1)) : \"keys\" == t ? _iterStep(0, o) : \"values\" == t ? _iterStep(0, e[o]) : _iterStep(0, [o, e[o]]);\n}, \"values\");\n\n_iterators.Arguments = _iterators.Array, _addToUnscopables(\"keys\"), _addToUnscopables(\"values\"), _addToUnscopables(\"entries\");\n\nfor (var ITERATOR$1 = _wks(\"iterator\"), TO_STRING_TAG = _wks(\"toStringTag\"), ArrayValues = _iterators.Array, DOMIterables = {\n CSSRuleList: !0,\n CSSStyleDeclaration: !1,\n CSSValueList: !1,\n ClientRectList: !1,\n DOMRectList: !1,\n DOMStringList: !1,\n DOMTokenList: !0,\n DataTransferItemList: !1,\n FileList: !1,\n HTMLAllCollection: !1,\n HTMLCollection: !1,\n HTMLFormElement: !1,\n HTMLSelectElement: !1,\n MediaList: !0,\n MimeTypeArray: !1,\n NamedNodeMap: !1,\n NodeList: !0,\n PaintRequestList: !1,\n Plugin: !1,\n PluginArray: !1,\n SVGLengthList: !1,\n SVGNumberList: !1,\n SVGPathSegList: !1,\n SVGPointList: !1,\n SVGStringList: !1,\n SVGTransformList: !1,\n SourceBufferList: !1,\n StyleSheetList: !0,\n TextTrackCueList: !1,\n TextTrackList: !1,\n TouchList: !1\n}, collections = _objectKeys(DOMIterables), i = 0; i < collections.length; i++) {\n var NAME = collections[i],\n explicit = DOMIterables[NAME],\n Collection = _global[NAME],\n proto = Collection && Collection.prototype,\n key;\n if (proto && (proto[ITERATOR$1] || _hide(proto, ITERATOR$1, ArrayValues), proto[TO_STRING_TAG] || _hide(proto, TO_STRING_TAG, NAME), _iterators[NAME] = ArrayValues, explicit)) for (key in es6_array_iterator) proto[key] || _redefine(proto, key, es6_array_iterator[key], !0);\n}\n\nvar test = {};\ntest[_wks(\"toStringTag\")] = \"z\", _redefine(Object.prototype, \"toString\", function () {\n return \"[object \" + _classof(this) + \"]\";\n}, !0);\n\nvar isEnum$1 = _objectPie.f,\n _objectToArray = function (e) {\n return function (t) {\n for (var o = _toIobject(t), n = _objectKeys(o), a = n.length, d = 0, s = [], r; a > d;) r = n[d++], (!_descriptors || isEnum$1.call(o, r)) && s.push(e ? [r, o[r]] : o[r]);\n\n return s;\n };\n},\n $values = _objectToArray(!1);\n\n_export(_export.S, \"Object\", {\n values: function (e) {\n return $values(e);\n }\n});\n\nvar MATCH = _wks(\"match\"),\n _isRegexp = function (e) {\n var t;\n return _isObject(e) && ((t = e[MATCH]) === void 0 ? \"RegExp\" == _cof(e) : !!t);\n},\n SPECIES$1 = _wks(\"species\"),\n _speciesConstructor = function (e, t) {\n var o = _anObject(e).constructor,\n n;\n\n return o === void 0 || (n = _anObject(o)[SPECIES$1]) == null ? t : _aFunction(n);\n},\n $min = Math.min,\n $push = [].push,\n $SPLIT = \"split\",\n LENGTH = \"length\",\n LAST_INDEX$1 = \"lastIndex\",\n MAX_UINT32 = 4294967295,\n SUPPORTS_Y = !_fails(function () {\n RegExp(MAX_UINT32, \"y\");\n});\n\n_fixReWks(\"split\", 2, function (e, t, o, n) {\n var a;\n return a = \"c\" == \"abbc\"[$SPLIT](/(b)*/)[1] || 4 != \"test\"[$SPLIT](/(?:)/, -1)[LENGTH] || 2 != \"ab\"[$SPLIT](/(?:ab)*/)[LENGTH] || 4 != \".\"[$SPLIT](/(.?)(.?)/)[LENGTH] || 1 < \".\"[$SPLIT](/()()/)[LENGTH] || \"\"[$SPLIT](/.?/)[LENGTH] ? function (e, t) {\n var n = this + \"\";\n if (void 0 === e && 0 === t) return [];\n if (!_isRegexp(e)) return o.call(n, e, t);\n\n for (var i = [], a = (e.ignoreCase ? \"i\" : \"\") + (e.multiline ? \"m\" : \"\") + (e.unicode ? \"u\" : \"\") + (e.sticky ? \"y\" : \"\"), d = 0, s = void 0 === t ? MAX_UINT32 : t >>> 0, r = new RegExp(e.source, a + \"g\"), l, c, u; (l = _regexpExec.call(r, n)) && (c = r[LAST_INDEX$1], !(c > d && (i.push(n.slice(d, l.index)), 1 < l[LENGTH] && l.index < n[LENGTH] && $push.apply(i, l.slice(1)), u = l[0][LENGTH], d = c, i[LENGTH] >= s)));) r[LAST_INDEX$1] === l.index && r[LAST_INDEX$1]++;\n\n return d === n[LENGTH] ? (u || !r.test(\"\")) && i.push(\"\") : i.push(n.slice(d)), i[LENGTH] > s ? i.slice(0, s) : i;\n } : \"0\"[$SPLIT](void 0, 0)[LENGTH] ? function (e, t) {\n return void 0 === e && 0 === t ? [] : o.call(this, e, t);\n } : o, [function (o, n) {\n var i = e(this),\n d = null == o ? void 0 : o[t];\n return void 0 === d ? a.call(i + \"\", o, n) : d.call(o, i, n);\n }, function (t, d) {\n var s = n(a, t, this, d, a !== o);\n if (s.done) return s.value;\n\n var r = _anObject(t),\n l = this + \"\",\n c = _speciesConstructor(r, RegExp),\n u = r.unicode,\n h = (r.ignoreCase ? \"i\" : \"\") + (r.multiline ? \"m\" : \"\") + (r.unicode ? \"u\" : \"\") + (SUPPORTS_Y ? \"y\" : \"g\"),\n m = new c(SUPPORTS_Y ? r : \"^(?:\" + r.source + \")\", h),\n g = void 0 === d ? MAX_UINT32 : d >>> 0;\n\n if (0 === g) return [];\n if (0 === l.length) return null === _regexpExecAbstract(m, l) ? [l] : [];\n\n for (var y = 0, f = 0, b = []; f < l.length;) {\n m.lastIndex = SUPPORTS_Y ? f : 0;\n\n var _ = _regexpExecAbstract(m, SUPPORTS_Y ? l : l.slice(f)),\n v;\n\n if (null === _ || (v = $min(_toLength(m.lastIndex + (SUPPORTS_Y ? 0 : f)), l.length)) === y) f = _advanceStringIndex(l, f, u);else {\n if (b.push(l.slice(y, f)), b.length === g) return b;\n\n for (var k = 1; k <= _.length - 1; k++) if (b.push(_[k]), b.length === g) return b;\n\n f = y = v;\n }\n }\n\n return b.push(l.slice(y)), b;\n }];\n});\n\nvar $assign = Object.assign,\n _objectAssign = !$assign || _fails(function () {\n var e = {},\n t = {},\n o = Symbol(),\n n = \"abcdefghijklmnopqrst\";\n return e[o] = 7, n.split(\"\").forEach(function (e) {\n t[e] = e;\n }), 7 != $assign({}, e)[o] || Object.keys($assign({}, t)).join(\"\") != n;\n}) ? function (e) {\n for (var t = _toObject(e), o = arguments.length, n = 1, i = _objectGops.f, a = _objectPie.f; o > n;) for (var d = _iobject(arguments[n++]), s = i ? _objectKeys(d).concat(i(d)) : _objectKeys(d), r = s.length, l = 0, c; r > l;) c = s[l++], (!_descriptors || a.call(d, c)) && (t[c] = d[c]);\n\n return t;\n} : $assign;\n\n_export(_export.S + _export.F, \"Object\", {\n assign: _objectAssign\n});\n\nvar check = function (e, t) {\n if (_anObject(e), !_isObject(t) && null !== t) throw TypeError(t + \": can't set as prototype!\");\n},\n _setProto = {\n set: Object.setPrototypeOf || (\"__proto__\" in {} ? function (e, t, o) {\n try {\n o = _ctx(Function.call, _objectGopd.f(Object.prototype, \"__proto__\").set, 2), o(e, []), t = !(e instanceof Array);\n } catch (o) {\n t = !0;\n }\n\n return function (e, n) {\n return check(e, n), t ? e.__proto__ = n : o(e, n), e;\n };\n }({}, !1) : void 0),\n check: check\n},\n setPrototypeOf = _setProto.set,\n _inheritIfRequired = function (e, t, o) {\n var n = t.constructor,\n i;\n return n !== o && \"function\" == typeof n && (i = n.prototype) !== o.prototype && _isObject(i) && setPrototypeOf && setPrototypeOf(e, i), e;\n},\n _stringWs = \"\\t\\n\\x0B\\f\\r \\xA0\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF\",\n space = \"[\" + _stringWs + \"]\",\n non = \"\\u200B\\x85\",\n ltrim = RegExp(\"^\" + space + space + \"*\"),\n rtrim = RegExp(space + space + \"*$\"),\n exporter = function (e, t, o) {\n var n = {},\n i = _fails(function () {\n return !!_stringWs[e]() || non[e]() != non;\n }),\n a = n[e] = i ? t(trim) : _stringWs[e];\n\n o && (n[o] = a), _export(_export.P + _export.F * i, \"String\", n);\n},\n trim = exporter.trim = function (e, t) {\n return e = _defined(e) + \"\", 1 & t && (e = e.replace(ltrim, \"\")), 2 & t && (e = e.replace(rtrim, \"\")), e;\n},\n _stringTrim = exporter,\n gOPN$2 = _objectGopn.f,\n gOPD$2 = _objectGopd.f,\n dP$2 = _objectDp.f,\n $trim = _stringTrim.trim,\n NUMBER = \"Number\",\n $Number = _global[NUMBER],\n Base = $Number,\n proto$1 = $Number.prototype,\n BROKEN_COF = _cof(_objectCreate(proto$1)) == NUMBER,\n TRIM = \"trim\" in String.prototype,\n toNumber = function (e) {\n var t = _toPrimitive(e, !1);\n\n if (\"string\" == typeof t && 2 < t.length) {\n t = TRIM ? t.trim() : $trim(t, 3);\n var o = t.charCodeAt(0),\n n,\n a,\n d;\n\n if (43 === o || 45 === o) {\n if (n = t.charCodeAt(2), 88 === n || 120 === n) return NaN;\n } else if (48 === o) {\n switch (t.charCodeAt(1)) {\n case 66:\n case 98:\n a = 2, d = 49;\n break;\n\n case 79:\n case 111:\n a = 8, d = 55;\n break;\n\n default:\n return +t;\n }\n\n for (var s = t.slice(2), r = 0, c = s.length, l; r < c; r++) if (l = s.charCodeAt(r), 48 > l || l > d) return NaN;\n\n return parseInt(s, a);\n }\n }\n\n return +t;\n};\n\nif (!$Number(\" 0o1\") || !$Number(\"0b1\") || $Number(\"+0x1\")) {\n $Number = function (e) {\n var t = 1 > arguments.length ? 0 : e,\n o = this;\n return o instanceof $Number && (BROKEN_COF ? _fails(function () {\n proto$1.valueOf.call(o);\n }) : _cof(o) != NUMBER) ? _inheritIfRequired(new Base(toNumber(t)), o, $Number) : toNumber(t);\n };\n\n for (var keys = _descriptors ? gOPN$2(Base) : \"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger\".split(\",\"), j$1 = 0, key$1; keys.length > j$1; j$1++) _has(Base, key$1 = keys[j$1]) && !_has($Number, key$1) && dP$2($Number, key$1, gOPD$2(Base, key$1));\n\n $Number.prototype = proto$1, proto$1.constructor = $Number, _redefine(_global, NUMBER, $Number);\n}\n\nfor (var moment = createCommonjsModule(function (e) {\n var t = Math.round,\n o = Math.pow,\n n = Math.max,\n a = Math.abs,\n d = Math.min,\n s = Math.floor,\n r = Math.ceil;\n\n (function (t, o) {\n e.exports = o();\n })(commonjsGlobal, function () {\n function l() {\n return $t.apply(null, arguments);\n }\n\n function u(e) {\n return e instanceof Array || \"[object Array]\" === Object.prototype.toString.call(e);\n }\n\n function p(e) {\n return null != e && \"[object Object]\" === Object.prototype.toString.call(e);\n }\n\n function h(e) {\n if (Object.getOwnPropertyNames) return 0 === Object.getOwnPropertyNames(e).length;\n\n for (var t in e) if (e.hasOwnProperty(t)) return !1;\n\n return !0;\n }\n\n function m(e) {\n return void 0 === e;\n }\n\n function g(e) {\n return \"number\" == typeof e || \"[object Number]\" === Object.prototype.toString.call(e);\n }\n\n function y(e) {\n return e instanceof Date || \"[object Date]\" === Object.prototype.toString.call(e);\n }\n\n function f(e, t) {\n var o = [],\n n;\n\n for (n = 0; n < e.length; ++n) o.push(t(e[n], n));\n\n return o;\n }\n\n function _(e, t) {\n return Object.prototype.hasOwnProperty.call(e, t);\n }\n\n function v(e, t) {\n for (var o in t) _(t, o) && (e[o] = t[o]);\n\n return _(t, \"toString\") && (e.toString = t.toString), _(t, \"valueOf\") && (e.valueOf = t.valueOf), e;\n }\n\n function k(e, t, o, n) {\n return dt(e, t, o, n, !0).utc();\n }\n\n function w() {\n return {\n empty: !1,\n unusedTokens: [],\n unusedInput: [],\n overflow: -2,\n charsLeftOver: 0,\n nullInput: !1,\n invalidMonth: null,\n invalidFormat: !1,\n userInvalidated: !1,\n iso: !1,\n parsedDateParts: [],\n meridiem: null,\n rfc2822: !1,\n weekdayMismatch: !1\n };\n }\n\n function x(e) {\n return null == e._pf && (e._pf = w()), e._pf;\n }\n\n function S(e) {\n if (null == e._isValid) {\n var t = x(e),\n o = Kt.call(t.parsedDateParts, function (e) {\n return null != e;\n }),\n n = !isNaN(e._d.getTime()) && 0 > t.overflow && !t.empty && !t.invalidMonth && !t.invalidWeekday && !t.weekdayMismatch && !t.nullInput && !t.invalidFormat && !t.userInvalidated && (!t.meridiem || t.meridiem && o);\n if (e._strict && (n = n && 0 === t.charsLeftOver && 0 === t.unusedTokens.length && void 0 === t.bigHour), null == Object.isFrozen || !Object.isFrozen(e)) e._isValid = n;else return n;\n }\n\n return e._isValid;\n }\n\n function O(e) {\n var t = k(NaN);\n return null == e ? x(t).userInvalidated = !0 : v(x(t), e), t;\n }\n\n function D(e, t) {\n var o, n, a;\n if (m(t._isAMomentObject) || (e._isAMomentObject = t._isAMomentObject), m(t._i) || (e._i = t._i), m(t._f) || (e._f = t._f), m(t._l) || (e._l = t._l), m(t._strict) || (e._strict = t._strict), m(t._tzm) || (e._tzm = t._tzm), m(t._isUTC) || (e._isUTC = t._isUTC), m(t._offset) || (e._offset = t._offset), m(t._pf) || (e._pf = x(t)), m(t._locale) || (e._locale = t._locale), 0 < Qt.length) for (o = 0; o < Qt.length; o++) n = Qt[o], a = t[n], m(a) || (e[n] = a);\n return e;\n }\n\n function T(e) {\n D(this, e), this._d = new Date(null == e._d ? NaN : e._d.getTime()), this.isValid() || (this._d = new Date(NaN)), !1 === Jt && (Jt = !0, l.updateOffset(this), Jt = !1);\n }\n\n function E(e) {\n return e instanceof T || null != e && null != e._isAMomentObject;\n }\n\n function C(e) {\n return 0 > e ? r(e) || 0 : s(e);\n }\n\n function M(e) {\n var t = +e,\n o = 0;\n return 0 != t && isFinite(t) && (o = C(t)), o;\n }\n\n function I(e, t, o) {\n var n = d(e.length, t.length),\n s = a(e.length - t.length),\n r = 0,\n l;\n\n for (l = 0; l < n; l++) (o && e[l] !== t[l] || !o && M(e[l]) !== M(t[l])) && r++;\n\n return r + s;\n }\n\n function P(e) {\n !1 === l.suppressDeprecationWarnings && \"undefined\" != typeof console && console.warn && console.warn(\"Deprecation warning: \" + e);\n }\n\n function F(e, t) {\n var o = !0;\n return v(function () {\n if (null != l.deprecationHandler && l.deprecationHandler(null, e), o) {\n for (var n = [], a = 0, d; a < arguments.length; a++) {\n if (d = \"\", \"object\" == typeof arguments[a]) {\n for (var s in d += \"\\n[\" + a + \"] \", arguments[0]) d += s + \": \" + arguments[0][s] + \", \";\n\n d = d.slice(0, -2);\n } else d = arguments[a];\n\n n.push(d);\n }\n\n P(e + \"\\nArguments: \" + Array.prototype.slice.call(n).join(\"\") + \"\\n\" + new Error().stack), o = !1;\n }\n\n return t.apply(this, arguments);\n }, t);\n }\n\n function N(e, t) {\n null != l.deprecationHandler && l.deprecationHandler(e, t), eo[e] || (P(t), eo[e] = !0);\n }\n\n function Y(e) {\n return e instanceof Function || \"[object Function]\" === Object.prototype.toString.call(e);\n }\n\n function R(e) {\n var t, o;\n\n for (o in e) t = e[o], Y(t) ? this[o] = t : this[\"_\" + o] = t;\n\n this._config = e, this._dayOfMonthOrdinalParseLenient = new RegExp((this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) + \"|\" + /\\d{1,2}/.source);\n }\n\n function z(e, t) {\n var o = v({}, e),\n n;\n\n for (n in t) _(t, n) && (p(e[n]) && p(t[n]) ? (o[n] = {}, v(o[n], e[n]), v(o[n], t[n])) : null == t[n] ? delete o[n] : o[n] = t[n]);\n\n for (n in e) _(e, n) && !_(t, n) && p(e[n]) && (o[n] = v({}, o[n]));\n\n return o;\n }\n\n function B(e) {\n null != e && this.set(e);\n }\n\n function L(e, t, o) {\n var n = this._calendar[e] || this._calendar.sameElse;\n return Y(n) ? n.call(t, o) : n;\n }\n\n function A(e) {\n var t = this._longDateFormat[e],\n o = this._longDateFormat[e.toUpperCase()];\n\n return t || !o ? t : (this._longDateFormat[e] = o.replace(/MMMM|MM|DD|dddd/g, function (e) {\n return e.slice(1);\n }), this._longDateFormat[e]);\n }\n\n function H(e, t) {\n var o = e.toLowerCase();\n no[o] = no[o + \"s\"] = no[t] = e;\n }\n\n function j(e) {\n return \"string\" == typeof e ? no[e] || no[e.toLowerCase()] : void 0;\n }\n\n function W(e) {\n var t = {},\n o,\n n;\n\n for (n in e) _(e, n) && (o = j(n), o && (t[o] = e[n]));\n\n return t;\n }\n\n function U(e, t) {\n io[e] = t;\n }\n\n function V(e) {\n var t = [];\n\n for (var o in e) t.push({\n unit: o,\n priority: io[o]\n });\n\n return t.sort(function (e, t) {\n return e.priority - t.priority;\n }), t;\n }\n\n function G(e, t, i) {\n var d = \"\" + a(e),\n s = t - d.length;\n return (0 <= e ? i ? \"+\" : \"\" : \"-\") + o(10, n(0, s)).toString().substr(1) + d;\n }\n\n function q(e, t, o, n) {\n var i = n;\n \"string\" == typeof n && (i = function () {\n return this[n]();\n }), e && (lo[e] = i), t && (lo[t[0]] = function () {\n return G(i.apply(this, arguments), t[1], t[2]);\n }), o && (lo[o] = function () {\n return this.localeData().ordinal(i.apply(this, arguments), e);\n });\n }\n\n function X(e) {\n return e.match(/\\[[\\s\\S]/) ? e.replace(/^\\[|\\]$/g, \"\") : e.replace(/\\\\/g, \"\");\n }\n\n function Z(e) {\n var t = e.match(ao),\n o,\n n;\n\n for (o = 0, n = t.length; o < n; o++) t[o] = lo[t[o]] ? lo[t[o]] : X(t[o]);\n\n return function (o) {\n var a = \"\",\n d;\n\n for (d = 0; d < n; d++) a += Y(t[d]) ? t[d].call(o, e) : t[d];\n\n return a;\n };\n }\n\n function $(e, t) {\n return e.isValid() ? (t = K(t, e.localeData()), ro[t] = ro[t] || Z(t), ro[t](e)) : e.localeData().invalidDate();\n }\n\n function K(e, t) {\n function o(e) {\n return t.longDateFormat(e) || e;\n }\n\n var n = 5;\n\n for (so.lastIndex = 0; 0 <= n && so.test(e);) e = e.replace(so, o), so.lastIndex = 0, n -= 1;\n\n return e;\n }\n\n function Q(e, t, o) {\n To[e] = Y(t) ? t : function (e) {\n return e && o ? o : t;\n };\n }\n\n function J(e, t) {\n return _(To, e) ? To[e](t._strict, t._locale) : new RegExp(ee(e));\n }\n\n function ee(e) {\n return te(e.replace(\"\\\\\", \"\").replace(/\\\\(\\[)|\\\\(\\])|\\[([^\\]\\[]*)\\]|\\\\(.)/g, function (e, t, o, n, i) {\n return t || o || n || i;\n }));\n }\n\n function te(e) {\n return e.replace(/[-\\/\\\\^$*+?.()|[\\]{}]/g, \"\\\\$&\");\n }\n\n function oe(e, t) {\n var o = t,\n n;\n\n for (\"string\" == typeof e && (e = [e]), g(t) && (o = function (e, o) {\n o[t] = M(e);\n }), n = 0; n < e.length; n++) Eo[e[n]] = o;\n }\n\n function ne(e, t) {\n oe(e, function (e, o, n, i) {\n n._w = n._w || {}, t(e, n._w, n, i);\n });\n }\n\n function ie(e, t, o) {\n null != t && _(Eo, e) && Eo[e](t, o._a, o, e);\n }\n\n function ae(e) {\n return de(e) ? 366 : 365;\n }\n\n function de(e) {\n return 0 == e % 4 && 0 != e % 100 || 0 == e % 400;\n }\n\n function se(e, t) {\n return function (o) {\n return null == o ? re(this, e) : (le(this, e, o), l.updateOffset(this, t), this);\n };\n }\n\n function re(e, t) {\n return e.isValid() ? e._d[\"get\" + (e._isUTC ? \"UTC\" : \"\") + t]() : NaN;\n }\n\n function le(e, t, o) {\n e.isValid() && !isNaN(o) && (\"FullYear\" === t && de(e.year()) && 1 === e.month() && 29 === e.date() ? e._d[\"set\" + (e._isUTC ? \"UTC\" : \"\") + t](o, e.month(), pe(o, e.month())) : e._d[\"set\" + (e._isUTC ? \"UTC\" : \"\") + t](o));\n }\n\n function ce(e, t) {\n if (\"object\" == typeof e) {\n e = W(e);\n\n for (var o = V(e), n = 0; n < o.length; n++) this[o[n].unit](e[o[n].unit]);\n } else if (e = j(e), Y(this[e])) return this[e](t);\n\n return this;\n }\n\n function ue(e, t) {\n return (e % t + t) % t;\n }\n\n function pe(e, t) {\n if (isNaN(e) || isNaN(t)) return NaN;\n var o = ue(t, 12);\n return e += (t - o) / 12, 1 === o ? de(e) ? 29 : 28 : 31 - o % 7 % 2;\n }\n\n function he(e, t, o) {\n var n = e.toLocaleLowerCase(),\n a,\n d,\n s;\n if (!this._monthsParse) for (this._monthsParse = [], this._longMonthsParse = [], this._shortMonthsParse = [], a = 0; 12 > a; ++a) s = k([2e3, a]), this._shortMonthsParse[a] = this.monthsShort(s, \"\").toLocaleLowerCase(), this._longMonthsParse[a] = this.months(s, \"\").toLocaleLowerCase();\n return o ? \"MMM\" === t ? (d = Ro.call(this._shortMonthsParse, n), -1 === d ? null : d) : (d = Ro.call(this._longMonthsParse, n), -1 === d ? null : d) : \"MMM\" === t ? (d = Ro.call(this._shortMonthsParse, n), -1 !== d) ? d : (d = Ro.call(this._longMonthsParse, n), -1 === d ? null : d) : (d = Ro.call(this._longMonthsParse, n), -1 !== d) ? d : (d = Ro.call(this._shortMonthsParse, n), -1 === d ? null : d);\n }\n\n function me(e, t, o) {\n var n, a, d;\n if (this._monthsParseExact) return he.call(this, e, t, o);\n\n for (this._monthsParse || (this._monthsParse = [], this._longMonthsParse = [], this._shortMonthsParse = []), n = 0; 12 > n; n++) {\n if (a = k([2e3, n]), o && !this._longMonthsParse[n] && (this._longMonthsParse[n] = new RegExp(\"^\" + this.months(a, \"\").replace(\".\", \"\") + \"$\", \"i\"), this._shortMonthsParse[n] = new RegExp(\"^\" + this.monthsShort(a, \"\").replace(\".\", \"\") + \"$\", \"i\")), o || this._monthsParse[n] || (d = \"^\" + this.months(a, \"\") + \"|^\" + this.monthsShort(a, \"\"), this._monthsParse[n] = new RegExp(d.replace(\".\", \"\"), \"i\")), o && \"MMMM\" === t && this._longMonthsParse[n].test(e)) return n;\n if (o && \"MMM\" === t && this._shortMonthsParse[n].test(e)) return n;\n if (!o && this._monthsParse[n].test(e)) return n;\n }\n }\n\n function ge(e, t) {\n var o;\n if (!e.isValid()) return e;\n if (\"string\" == typeof t) if (/^\\d+$/.test(t)) t = M(t);else if (t = e.localeData().monthsParse(t), !g(t)) return e;\n return o = d(e.date(), pe(e.year(), t)), e._d[\"set\" + (e._isUTC ? \"UTC\" : \"\") + \"Month\"](t, o), e;\n }\n\n function ye(e) {\n return null == e ? re(this, \"Month\") : (ge(this, e), l.updateOffset(this, !0), this);\n }\n\n function fe() {\n function e(e, t) {\n return t.length - e.length;\n }\n\n var t = [],\n o = [],\n n = [],\n a,\n d;\n\n for (a = 0; 12 > a; a++) d = k([2e3, a]), t.push(this.monthsShort(d, \"\")), o.push(this.months(d, \"\")), n.push(this.months(d, \"\")), n.push(this.monthsShort(d, \"\"));\n\n for (t.sort(e), o.sort(e), n.sort(e), a = 0; 12 > a; a++) t[a] = te(t[a]), o[a] = te(o[a]);\n\n for (a = 0; 24 > a; a++) n[a] = te(n[a]);\n\n this._monthsRegex = new RegExp(\"^(\" + n.join(\"|\") + \")\", \"i\"), this._monthsShortRegex = this._monthsRegex, this._monthsStrictRegex = new RegExp(\"^(\" + o.join(\"|\") + \")\", \"i\"), this._monthsShortStrictRegex = new RegExp(\"^(\" + t.join(\"|\") + \")\", \"i\");\n }\n\n function be(e, t, o, n, i, a, d) {\n var s;\n return 100 > e && 0 <= e ? (s = new Date(e + 400, t, o, n, i, a, d), isFinite(s.getFullYear()) && s.setFullYear(e)) : s = new Date(e, t, o, n, i, a, d), s;\n }\n\n function _e(e) {\n var t;\n\n if (100 > e && 0 <= e) {\n var o = Array.prototype.slice.call(arguments);\n o[0] = e + 400, t = new Date(Date.UTC.apply(null, o)), isFinite(t.getUTCFullYear()) && t.setUTCFullYear(e);\n } else t = new Date(Date.UTC.apply(null, arguments));\n\n return t;\n }\n\n function ve(e, t, o) {\n var n = 7 + t - o,\n i = (7 + _e(e, 0, n).getUTCDay() - t) % 7;\n return -i + n - 1;\n }\n\n function ke(e, t, o, n, i) {\n var a = ve(e, n, i),\n d = 1 + 7 * (t - 1) + (7 + o - n) % 7 + a,\n s,\n r;\n return 0 >= d ? (s = e - 1, r = ae(s) + d) : d > ae(e) ? (s = e + 1, r = d - ae(e)) : (s = e, r = d), {\n year: s,\n dayOfYear: r\n };\n }\n\n function we(e, t, o) {\n var n = ve(e.year(), t, o),\n i = s((e.dayOfYear() - n - 1) / 7) + 1,\n a,\n d;\n return 1 > i ? (d = e.year() - 1, a = i + xe(d, t, o)) : i > xe(e.year(), t, o) ? (a = i - xe(e.year(), t, o), d = e.year() + 1) : (d = e.year(), a = i), {\n week: a,\n year: d\n };\n }\n\n function xe(e, t, o) {\n var n = ve(e, t, o),\n i = ve(e + 1, t, o);\n return (ae(e) - n + i) / 7;\n }\n\n function Se(e, t) {\n return \"string\" == typeof e ? isNaN(e) ? (e = t.weekdaysParse(e), \"number\" == typeof e ? e : null) : parseInt(e, 10) : e;\n }\n\n function Oe(e, t) {\n return \"string\" == typeof e ? t.weekdaysParse(e) % 7 || 7 : isNaN(e) ? null : e;\n }\n\n function De(e, t) {\n return e.slice(t, 7).concat(e.slice(0, t));\n }\n\n function Te(e, t, o) {\n var n = e.toLocaleLowerCase(),\n a,\n d,\n s;\n if (!this._weekdaysParse) for (this._weekdaysParse = [], this._shortWeekdaysParse = [], this._minWeekdaysParse = [], a = 0; 7 > a; ++a) s = k([2e3, 1]).day(a), this._minWeekdaysParse[a] = this.weekdaysMin(s, \"\").toLocaleLowerCase(), this._shortWeekdaysParse[a] = this.weekdaysShort(s, \"\").toLocaleLowerCase(), this._weekdaysParse[a] = this.weekdays(s, \"\").toLocaleLowerCase();\n return o ? \"dddd\" === t ? (d = Ro.call(this._weekdaysParse, n), -1 === d ? null : d) : \"ddd\" === t ? (d = Ro.call(this._shortWeekdaysParse, n), -1 === d ? null : d) : (d = Ro.call(this._minWeekdaysParse, n), -1 === d ? null : d) : \"dddd\" === t ? (d = Ro.call(this._weekdaysParse, n), -1 !== d) ? d : (d = Ro.call(this._shortWeekdaysParse, n), -1 !== d) ? d : (d = Ro.call(this._minWeekdaysParse, n), -1 === d ? null : d) : \"ddd\" === t ? (d = Ro.call(this._shortWeekdaysParse, n), -1 !== d) ? d : (d = Ro.call(this._weekdaysParse, n), -1 !== d) ? d : (d = Ro.call(this._minWeekdaysParse, n), -1 === d ? null : d) : (d = Ro.call(this._minWeekdaysParse, n), -1 !== d) ? d : (d = Ro.call(this._weekdaysParse, n), -1 !== d) ? d : (d = Ro.call(this._shortWeekdaysParse, n), -1 === d ? null : d);\n }\n\n function Ee(e, t, o) {\n var n, a, d;\n if (this._weekdaysParseExact) return Te.call(this, e, t, o);\n\n for (this._weekdaysParse || (this._weekdaysParse = [], this._minWeekdaysParse = [], this._shortWeekdaysParse = [], this._fullWeekdaysParse = []), n = 0; 7 > n; n++) {\n if (a = k([2e3, 1]).day(n), o && !this._fullWeekdaysParse[n] && (this._fullWeekdaysParse[n] = new RegExp(\"^\" + this.weekdays(a, \"\").replace(\".\", \"\\\\.?\") + \"$\", \"i\"), this._shortWeekdaysParse[n] = new RegExp(\"^\" + this.weekdaysShort(a, \"\").replace(\".\", \"\\\\.?\") + \"$\", \"i\"), this._minWeekdaysParse[n] = new RegExp(\"^\" + this.weekdaysMin(a, \"\").replace(\".\", \"\\\\.?\") + \"$\", \"i\")), this._weekdaysParse[n] || (d = \"^\" + this.weekdays(a, \"\") + \"|^\" + this.weekdaysShort(a, \"\") + \"|^\" + this.weekdaysMin(a, \"\"), this._weekdaysParse[n] = new RegExp(d.replace(\".\", \"\"), \"i\")), o && \"dddd\" === t && this._fullWeekdaysParse[n].test(e)) return n;\n if (o && \"ddd\" === t && this._shortWeekdaysParse[n].test(e)) return n;\n if (o && \"dd\" === t && this._minWeekdaysParse[n].test(e)) return n;\n if (!o && this._weekdaysParse[n].test(e)) return n;\n }\n }\n\n function Ce() {\n function e(e, t) {\n return t.length - e.length;\n }\n\n var t = [],\n o = [],\n n = [],\n a = [],\n d,\n s,\n r,\n l,\n c;\n\n for (d = 0; 7 > d; d++) s = k([2e3, 1]).day(d), r = this.weekdaysMin(s, \"\"), l = this.weekdaysShort(s, \"\"), c = this.weekdays(s, \"\"), t.push(r), o.push(l), n.push(c), a.push(r), a.push(l), a.push(c);\n\n for (t.sort(e), o.sort(e), n.sort(e), a.sort(e), d = 0; 7 > d; d++) o[d] = te(o[d]), n[d] = te(n[d]), a[d] = te(a[d]);\n\n this._weekdaysRegex = new RegExp(\"^(\" + a.join(\"|\") + \")\", \"i\"), this._weekdaysShortRegex = this._weekdaysRegex, this._weekdaysMinRegex = this._weekdaysRegex, this._weekdaysStrictRegex = new RegExp(\"^(\" + n.join(\"|\") + \")\", \"i\"), this._weekdaysShortStrictRegex = new RegExp(\"^(\" + o.join(\"|\") + \")\", \"i\"), this._weekdaysMinStrictRegex = new RegExp(\"^(\" + t.join(\"|\") + \")\", \"i\");\n }\n\n function Me() {\n return this.hours() % 12 || 12;\n }\n\n function Ie(e, t) {\n q(e, 0, 0, function () {\n return this.localeData().meridiem(this.hours(), this.minutes(), t);\n });\n }\n\n function Pe(e, t) {\n return t._meridiemParse;\n }\n\n function Fe(e) {\n return e ? e.toLowerCase().replace(\"_\", \"-\") : e;\n }\n\n function Ne(e) {\n for (var t = 0, o, n, a, d; t < e.length;) {\n for (d = Fe(e[t]).split(\"-\"), o = d.length, n = Fe(e[t + 1]), n = n ? n.split(\"-\") : null; 0 < o;) {\n if (a = Ye(d.slice(0, o).join(\"-\")), a) return a;\n if (n && n.length >= o && I(d, n, !0) >= o - 1) break;\n o--;\n }\n\n t++;\n }\n\n return Jo;\n }\n\n function Ye(t) {\n var o = null;\n if (!Wo[t] && !0 && e && e.exports) try {\n o = Jo._abbr;\n commonjsRequire(\"./locale/\" + t), Re(o);\n } catch (t) {}\n return Wo[t];\n }\n\n function Re(e, t) {\n var o;\n return e && (o = m(t) ? Be(e) : ze(e, t), o ? Jo = o : \"undefined\" != typeof console && console.warn && console.warn(\"Locale \" + e + \" not found. Did you forget to load it?\")), Jo._abbr;\n }\n\n function ze(e, t) {\n if (null !== t) {\n var o = jo,\n n;\n if (t.abbr = e, null != Wo[e]) N(\"defineLocaleOverride\", \"use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info.\"), o = Wo[e]._config;else if (null != t.parentLocale) if (null != Wo[t.parentLocale]) o = Wo[t.parentLocale]._config;else if (n = Ye(t.parentLocale), null != n) o = n._config;else return Uo[t.parentLocale] || (Uo[t.parentLocale] = []), Uo[t.parentLocale].push({\n name: e,\n config: t\n }), null;\n return Wo[e] = new B(z(o, t)), Uo[e] && Uo[e].forEach(function (e) {\n ze(e.name, e.config);\n }), Re(e), Wo[e];\n }\n\n return delete Wo[e], null;\n }\n\n function Be(e) {\n var t;\n if (e && e._locale && e._locale._abbr && (e = e._locale._abbr), !e) return Jo;\n\n if (!u(e)) {\n if (t = Ye(e), t) return t;\n e = [e];\n }\n\n return Ne(e);\n }\n\n function Le() {\n return to(Wo);\n }\n\n function Ae(e) {\n var t = e._a,\n o;\n return t && -2 === x(e).overflow && (o = 0 > t[1] || 11 < t[1] ? 1 : 1 > t[2] || t[2] > pe(t[0], t[1]) ? 2 : 0 > t[3] || 24 < t[3] || 24 === t[3] && (0 !== t[4] || 0 !== t[5] || 0 !== t[6]) ? 3 : 0 > t[4] || 59 < t[4] ? 4 : 0 > t[5] || 59 < t[5] ? 5 : 0 > t[6] || 999 < t[6] ? 6 : -1, x(e)._overflowDayOfYear && (0 > o || 2 < o) && (o = 2), x(e)._overflowWeeks && -1 === o && (o = 7), x(e)._overflowWeekday && -1 === o && (o = 8), x(e).overflow = o), e;\n }\n\n function He(e, t, o) {\n return null == e ? null == t ? o : t : e;\n }\n\n function je(e) {\n var t = new Date(l.now());\n return e._useUTC ? [t.getUTCFullYear(), t.getUTCMonth(), t.getUTCDate()] : [t.getFullYear(), t.getMonth(), t.getDate()];\n }\n\n function We(e) {\n var t = [],\n o,\n n,\n a,\n d,\n s;\n\n if (!e._d) {\n for (a = je(e), e._w && null == e._a[2] && null == e._a[1] && Ue(e), null != e._dayOfYear && (s = He(e._a[0], a[0]), (e._dayOfYear > ae(s) || 0 === e._dayOfYear) && (x(e)._overflowDayOfYear = !0), n = _e(s, 0, e._dayOfYear), e._a[1] = n.getUTCMonth(), e._a[2] = n.getUTCDate()), o = 0; 3 > o && null == e._a[o]; ++o) e._a[o] = t[o] = a[o];\n\n for (; 7 > o; o++) e._a[o] = t[o] = null == e._a[o] ? 2 === o ? 1 : 0 : e._a[o];\n\n 24 === e._a[3] && 0 === e._a[4] && 0 === e._a[5] && 0 === e._a[6] && (e._nextDay = !0, e._a[3] = 0), e._d = (e._useUTC ? _e : be).apply(null, t), d = e._useUTC ? e._d.getUTCDay() : e._d.getDay(), null != e._tzm && e._d.setUTCMinutes(e._d.getUTCMinutes() - e._tzm), e._nextDay && (e._a[3] = 24), e._w && \"undefined\" != typeof e._w.d && e._w.d !== d && (x(e).weekdayMismatch = !0);\n }\n }\n\n function Ue(e) {\n var t, o, n, i, a, d, s, r;\n if (t = e._w, null != t.GG || null != t.W || null != t.E) a = 1, d = 4, o = He(t.GG, e._a[0], we(st(), 1, 4).year), n = He(t.W, 1), i = He(t.E, 1), (1 > i || 7 < i) && (r = !0);else {\n a = e._locale._week.dow, d = e._locale._week.doy;\n var l = we(st(), a, d);\n o = He(t.gg, e._a[0], l.year), n = He(t.w, l.week), null == t.d ? null == t.e ? i = a : (i = t.e + a, (0 > t.e || 6 < t.e) && (r = !0)) : (i = t.d, (0 > i || 6 < i) && (r = !0));\n }\n 1 > n || n > xe(o, a, d) ? x(e)._overflowWeeks = !0 : null == r ? (s = ke(o, n, i, a, d), e._a[0] = s.year, e._dayOfYear = s.dayOfYear) : x(e)._overflowWeekday = !0;\n }\n\n function Ve(e) {\n var t = e._i,\n o = Vo.exec(t) || Go.exec(t),\n n,\n a,\n d,\n s,\n r,\n c;\n\n if (o) {\n for (x(e).iso = !0, n = 0, a = Xo.length; n < a; n++) if (Xo[n][1].exec(o[1])) {\n s = Xo[n][0], d = !1 !== Xo[n][2];\n break;\n }\n\n if (null == s) return void (e._isValid = !1);\n\n if (o[3]) {\n for (n = 0, a = Zo.length; n < a; n++) if (Zo[n][1].exec(o[3])) {\n r = (o[2] || \" \") + Zo[n][0];\n break;\n }\n\n if (null == r) return void (e._isValid = !1);\n }\n\n if (!d && null != r) return void (e._isValid = !1);\n if (o[4]) if (qo.exec(o[4])) c = \"Z\";else return void (e._isValid = !1);\n e._f = s + (r || \"\") + (c || \"\"), Je(e);\n } else e._isValid = !1;\n }\n\n function Ge(e, t, o, n, i, a) {\n var d = [qe(e), Bo.indexOf(t), parseInt(o, 10), parseInt(n, 10), parseInt(i, 10)];\n return a && d.push(parseInt(a, 10)), d;\n }\n\n function qe(e) {\n var t = parseInt(e, 10);\n return 49 >= t ? 2e3 + t : 999 >= t ? 1900 + t : t;\n }\n\n function Xe(e) {\n return e.replace(/\\([^)]*\\)|[\\n\\t]/g, \" \").replace(/(\\s\\s+)/g, \" \").replace(/^\\s\\s*/, \"\").replace(/\\s\\s*$/, \"\");\n }\n\n function Ze(e, t, o) {\n if (e) {\n var n = Lo.indexOf(e),\n i = new Date(t[0], t[1], t[2]).getDay();\n if (n !== i) return x(o).weekdayMismatch = !0, o._isValid = !1, !1;\n }\n\n return !0;\n }\n\n function $e(e, t, o) {\n if (e) return Qo[e];\n if (t) return 0;\n var n = parseInt(o, 10),\n i = n % 100;\n return 60 * ((n - i) / 100) + i;\n }\n\n function Ke(e) {\n var t = Ko.exec(Xe(e._i));\n\n if (t) {\n var o = Ge(t[4], t[3], t[2], t[5], t[6], t[7]);\n if (!Ze(t[1], o, e)) return;\n e._a = o, e._tzm = $e(t[8], t[9], t[10]), e._d = _e.apply(null, e._a), e._d.setUTCMinutes(e._d.getUTCMinutes() - e._tzm), x(e).rfc2822 = !0;\n } else e._isValid = !1;\n }\n\n function Qe(e) {\n var t = $o.exec(e._i);\n if (null !== t) return void (e._d = new Date(+t[1]));\n if (Ve(e), !1 === e._isValid) delete e._isValid;else return;\n if (Ke(e), !1 === e._isValid) delete e._isValid;else return;\n l.createFromInputFallback(e);\n }\n\n function Je(e) {\n if (e._f === l.ISO_8601) return void Ve(e);\n if (e._f === l.RFC_2822) return void Ke(e);\n e._a = [], x(e).empty = !0;\n var t = \"\" + e._i,\n o = t.length,\n n = 0,\n a,\n d,\n s,\n r,\n c;\n\n for (s = K(e._f, e._locale).match(ao) || [], a = 0; a < s.length; a++) r = s[a], d = (t.match(J(r, e)) || [])[0], d && (c = t.substr(0, t.indexOf(d)), 0 < c.length && x(e).unusedInput.push(c), t = t.slice(t.indexOf(d) + d.length), n += d.length), lo[r] ? (d ? x(e).empty = !1 : x(e).unusedTokens.push(r), ie(r, d, e)) : e._strict && !d && x(e).unusedTokens.push(r);\n\n x(e).charsLeftOver = o - n, 0 < t.length && x(e).unusedInput.push(t), 12 >= e._a[3] && !0 === x(e).bigHour && 0 < e._a[3] && (x(e).bigHour = void 0), x(e).parsedDateParts = e._a.slice(0), x(e).meridiem = e._meridiem, e._a[3] = et(e._locale, e._a[3], e._meridiem), We(e), Ae(e);\n }\n\n function et(e, t, o) {\n var n;\n return null == o ? t : null == e.meridiemHour ? null == e.isPM ? t : (n = e.isPM(o), n && 12 > t && (t += 12), n || 12 !== t || (t = 0), t) : e.meridiemHour(t, o);\n }\n\n function tt(e) {\n var t, o, n, a, d;\n if (0 === e._f.length) return x(e).invalidFormat = !0, void (e._d = new Date(NaN));\n\n for (a = 0; a < e._f.length; a++) (d = 0, t = D({}, e), null != e._useUTC && (t._useUTC = e._useUTC), t._f = e._f[a], Je(t), !!S(t)) && (d += x(t).charsLeftOver, d += 10 * x(t).unusedTokens.length, x(t).score = d, (null == n || d < n) && (n = d, o = t));\n\n v(e, o || t);\n }\n\n function ot(e) {\n if (!e._d) {\n var t = W(e._i);\n e._a = f([t.year, t.month, t.day || t.date, t.hour, t.minute, t.second, t.millisecond], function (e) {\n return e && parseInt(e, 10);\n }), We(e);\n }\n }\n\n function nt(e) {\n var t = new T(Ae(it(e)));\n return t._nextDay && (t.add(1, \"d\"), t._nextDay = void 0), t;\n }\n\n function it(e) {\n var t = e._i,\n o = e._f;\n return (e._locale = e._locale || Be(e._l), null === t || void 0 === o && \"\" === t) ? O({\n nullInput: !0\n }) : (\"string\" == typeof t && (e._i = t = e._locale.preparse(t)), E(t)) ? new T(Ae(t)) : (y(t) ? e._d = t : u(o) ? tt(e) : o ? Je(e) : at(e), S(e) || (e._d = null), e);\n }\n\n function at(e) {\n var t = e._i;\n m(t) ? e._d = new Date(l.now()) : y(t) ? e._d = new Date(t.valueOf()) : \"string\" == typeof t ? Qe(e) : u(t) ? (e._a = f(t.slice(0), function (e) {\n return parseInt(e, 10);\n }), We(e)) : p(t) ? ot(e) : g(t) ? e._d = new Date(t) : l.createFromInputFallback(e);\n }\n\n function dt(e, t, o, n, i) {\n var a = {};\n return (!0 === o || !1 === o) && (n = o, o = void 0), (p(e) && h(e) || u(e) && 0 === e.length) && (e = void 0), a._isAMomentObject = !0, a._useUTC = a._isUTC = i, a._l = o, a._i = e, a._f = t, a._strict = n, nt(a);\n }\n\n function st(e, t, o, n) {\n return dt(e, t, o, n, !1);\n }\n\n function rt(e, t) {\n var o, n;\n if (1 === t.length && u(t[0]) && (t = t[0]), !t.length) return st();\n\n for (o = t[0], n = 1; n < t.length; ++n) (!t[n].isValid() || t[n][e](o)) && (o = t[n]);\n\n return o;\n }\n\n function lt(e) {\n for (var t in e) if (-1 === Ro.call(on, t) || null != e[t] && isNaN(e[t])) return !1;\n\n for (var o = !1, n = 0; n < on.length; ++n) if (e[on[n]]) {\n if (o) return !1;\n parseFloat(e[on[n]]) !== M(e[on[n]]) && (o = !0);\n }\n\n return !0;\n }\n\n function ct(e) {\n var t = W(e),\n o = t.year || 0,\n n = t.quarter || 0,\n i = t.month || 0,\n a = t.week || t.isoWeek || 0,\n d = t.day || 0,\n s = t.hour || 0,\n r = t.minute || 0,\n l = t.second || 0,\n c = t.millisecond || 0;\n this._isValid = lt(t), this._milliseconds = +c + 1e3 * l + 6e4 * r + 60 * (60 * (1e3 * s)), this._days = +d + 7 * a, this._months = +i + 3 * n + 12 * o, this._data = {}, this._locale = Be(), this._bubble();\n }\n\n function ut(e) {\n return e instanceof ct;\n }\n\n function pt(e) {\n return 0 > e ? -1 * t(-1 * e) : t(e);\n }\n\n function ht(e, t) {\n q(e, 0, 0, function () {\n var e = this.utcOffset(),\n o = \"+\";\n return 0 > e && (e = -e, o = \"-\"), o + G(~~(e / 60), 2) + t + G(~~e % 60, 2);\n });\n }\n\n function mt(e, t) {\n var o = (t || \"\").match(e);\n if (null === o) return null;\n var n = o[o.length - 1] || [],\n i = (n + \"\").match(nn) || [\"-\", 0, 0],\n a = +(60 * i[1]) + M(i[2]);\n return 0 === a ? 0 : \"+\" === i[0] ? a : -a;\n }\n\n function gt(e, t) {\n var o, n;\n return t._isUTC ? (o = t.clone(), n = (E(e) || y(e) ? e.valueOf() : st(e).valueOf()) - o.valueOf(), o._d.setTime(o._d.valueOf() + n), l.updateOffset(o, !1), o) : st(e).local();\n }\n\n function yt(e) {\n return 15 * -t(e._d.getTimezoneOffset() / 15);\n }\n\n function ft() {\n if (!m(this._isDSTShifted)) return this._isDSTShifted;\n var e = {};\n\n if (D(e, this), e = it(e), e._a) {\n var t = e._isUTC ? k(e._a) : st(e._a);\n this._isDSTShifted = this.isValid() && 0 < I(e._a, t.toArray());\n } else this._isDSTShifted = !1;\n\n return this._isDSTShifted;\n }\n\n function bt() {\n return !!this.isValid() && this._isUTC && 0 === this._offset;\n }\n\n function _t(e, t) {\n var o = e,\n n = null,\n i,\n a,\n d;\n return ut(e) ? o = {\n ms: e._milliseconds,\n d: e._days,\n M: e._months\n } : g(e) ? (o = {}, t ? o[t] = e : o.milliseconds = e) : (n = an.exec(e)) ? (i = \"-\" === n[1] ? -1 : 1, o = {\n y: 0,\n d: M(n[2]) * i,\n h: M(n[3]) * i,\n m: M(n[4]) * i,\n s: M(n[5]) * i,\n ms: M(pt(1e3 * n[6])) * i\n }) : (n = dn.exec(e)) ? (i = \"-\" === n[1] ? -1 : 1, o = {\n y: vt(n[2], i),\n M: vt(n[3], i),\n w: vt(n[4], i),\n d: vt(n[5], i),\n h: vt(n[6], i),\n m: vt(n[7], i),\n s: vt(n[8], i)\n }) : null == o ? o = {} : \"object\" == typeof o && ((\"from\" in o) || (\"to\" in o)) && (d = wt(st(o.from), st(o.to)), o = {}, o.ms = d.milliseconds, o.M = d.months), a = new ct(o), ut(e) && _(e, \"_locale\") && (a._locale = e._locale), a;\n }\n\n function vt(e, t) {\n var o = e && parseFloat(e.replace(\",\", \".\"));\n return (isNaN(o) ? 0 : o) * t;\n }\n\n function kt(e, t) {\n var o = {};\n return o.months = t.month() - e.month() + 12 * (t.year() - e.year()), e.clone().add(o.months, \"M\").isAfter(t) && --o.months, o.milliseconds = +t - +e.clone().add(o.months, \"M\"), o;\n }\n\n function wt(e, t) {\n var o;\n return e.isValid() && t.isValid() ? (t = gt(t, e), e.isBefore(t) ? o = kt(e, t) : (o = kt(t, e), o.milliseconds = -o.milliseconds, o.months = -o.months), o) : {\n milliseconds: 0,\n months: 0\n };\n }\n\n function xt(e, t) {\n return function (o, n) {\n var i, a;\n return null === n || isNaN(+n) || (N(t, \"moment().\" + t + \"(period, number) is deprecated. Please use moment().\" + t + \"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.\"), a = o, o = n, n = a), o = \"string\" == typeof o ? +o : o, i = _t(o, n), St(this, i, e), this;\n };\n }\n\n function St(e, t, o, n) {\n var i = t._milliseconds,\n a = pt(t._days),\n d = pt(t._months);\n e.isValid() && (n = null == n || n, d && ge(e, re(e, \"Month\") + d * o), a && le(e, \"Date\", re(e, \"Date\") + a * o), i && e._d.setTime(e._d.valueOf() + i * o), n && l.updateOffset(e, a || d));\n }\n\n function Ot(e, t) {\n var o = 12 * (t.year() - e.year()) + (t.month() - e.month()),\n n = e.clone().add(o, \"months\"),\n i,\n a;\n return 0 > t - n ? (i = e.clone().add(o - 1, \"months\"), a = (t - n) / (n - i)) : (i = e.clone().add(o + 1, \"months\"), a = (t - n) / (i - n)), -(o + a) || 0;\n }\n\n function Dt(e) {\n var t;\n return void 0 === e ? this._locale._abbr : (t = Be(e), null != t && (this._locale = t), this);\n }\n\n function Tt() {\n return this._locale;\n }\n\n function Et(e, t) {\n return (e % t + t) % t;\n }\n\n function Ct(e, t, o) {\n return 100 > e && 0 <= e ? new Date(e + 400, t, o) - 12622780800000 : new Date(e, t, o).valueOf();\n }\n\n function Mt(e, t, o) {\n return 100 > e && 0 <= e ? Date.UTC(e + 400, t, o) - 12622780800000 : Date.UTC(e, t, o);\n }\n\n function It(e, t) {\n q(0, [e, e.length], 0, t);\n }\n\n function Pt(e, t, o, n, i) {\n var a;\n return null == e ? we(this, n, i).year : (a = xe(e, n, i), t > a && (t = a), Ft.call(this, e, t, o, n, i));\n }\n\n function Ft(e, t, o, n, i) {\n var a = ke(e, t, o, n, i),\n d = _e(a.year, 0, a.dayOfYear);\n\n return this.year(d.getUTCFullYear()), this.month(d.getUTCMonth()), this.date(d.getUTCDate()), this;\n }\n\n function Nt(e, t) {\n t[6] = M(1e3 * (\"0.\" + e));\n }\n\n function Yt(e) {\n return e;\n }\n\n function Rt(e, t, o, n) {\n var i = Be(),\n a = k().set(n, t);\n return i[o](a, e);\n }\n\n function zt(e, t, o) {\n if (g(e) && (t = e, e = void 0), e = e || \"\", null != t) return Rt(e, t, o, \"month\");\n var n = [],\n a;\n\n for (a = 0; 12 > a; a++) n[a] = Rt(e, a, o, \"month\");\n\n return n;\n }\n\n function Bt(e, t, o, n) {\n \"boolean\" == typeof e ? (g(t) && (o = t, t = void 0), t = t || \"\") : (t = e, o = t, e = !1, g(t) && (o = t, t = void 0), t = t || \"\");\n var a = Be(),\n d = e ? a._week.dow : 0;\n if (null != o) return Rt(t, (o + d) % 7, n, \"day\");\n var s = [],\n r;\n\n for (r = 0; 7 > r; r++) s[r] = Rt(t, (r + d) % 7, n, \"day\");\n\n return s;\n }\n\n function Lt(e, t, o, n) {\n var i = _t(t, o);\n\n return e._milliseconds += n * i._milliseconds, e._days += n * i._days, e._months += n * i._months, e._bubble();\n }\n\n function At(e) {\n return 0 > e ? s(e) : r(e);\n }\n\n function Ht(e) {\n return 4800 * e / 146097;\n }\n\n function jt(e) {\n return 146097 * e / 4800;\n }\n\n function Wt(e) {\n return function () {\n return this.as(e);\n };\n }\n\n function Ut(e) {\n return function () {\n return this.isValid() ? this._data[e] : NaN;\n };\n }\n\n function Vt(e, t, o, n, i) {\n return i.relativeTime(t || 1, !!o, e, n);\n }\n\n function Gt(e, t, o) {\n var n = _t(e).abs(),\n i = Nn(n.as(\"s\")),\n d = Nn(n.as(\"m\")),\n s = Nn(n.as(\"h\")),\n r = Nn(n.as(\"d\")),\n l = Nn(n.as(\"M\")),\n c = Nn(n.as(\"y\")),\n u = i <= Yn.ss && [\"s\", i] || i < Yn.s && [\"ss\", i] || 1 >= d && [\"m\"] || d < Yn.m && [\"mm\", d] || 1 >= s && [\"h\"] || s < Yn.h && [\"hh\", s] || 1 >= r && [\"d\"] || r < Yn.d && [\"dd\", r] || 1 >= l && [\"M\"] || l < Yn.M && [\"MM\", l] || 1 >= c && [\"y\"] || [\"yy\", c];\n\n return u[2] = t, u[3] = 0 < +e, u[4] = o, Vt.apply(null, u);\n }\n\n function qt(e) {\n return void 0 === e ? Nn : \"function\" == typeof e && (Nn = e, !0);\n }\n\n function Xt(e) {\n return (0 < e) - (0 > e) || +e;\n }\n\n function Zt() {\n if (!this.isValid()) return this.localeData().invalidDate();\n var e = Rn(this._milliseconds) / 1e3,\n t = Rn(this._days),\n o = Rn(this._months),\n n,\n i,\n a;\n n = C(e / 60), i = C(n / 60), e %= 60, n %= 60, a = C(o / 12), o %= 12;\n var d = a,\n r = o,\n l = t,\n c = i,\n u = n,\n p = e ? e.toFixed(3).replace(/\\.?0+$/, \"\") : \"\",\n s = this.asSeconds();\n if (!s) return \"P0D\";\n var h = 0 > s ? \"-\" : \"\",\n m = Xt(this._months) === Xt(s) ? \"\" : \"-\",\n g = Xt(this._days) === Xt(s) ? \"\" : \"-\",\n y = Xt(this._milliseconds) === Xt(s) ? \"\" : \"-\";\n return h + \"P\" + (d ? m + d + \"Y\" : \"\") + (r ? m + r + \"M\" : \"\") + (l ? g + l + \"D\" : \"\") + (c || u || p ? \"T\" : \"\") + (c ? y + c + \"H\" : \"\") + (u ? y + u + \"M\" : \"\") + (p ? y + p + \"S\" : \"\");\n }\n\n var $t, Kt;\n Kt = Array.prototype.some ? Array.prototype.some : function (e) {\n for (var o = Object(this), t = o.length >>> 0, n = 0; n < t; n++) if ((n in o) && e.call(this, o[n], n, o)) return !0;\n\n return !1;\n };\n var Qt = l.momentProperties = [],\n Jt = !1,\n eo = {};\n l.suppressDeprecationWarnings = !1, l.deprecationHandler = null;\n var to = Object.keys ? Object.keys : function (e) {\n var t = [],\n o;\n\n for (o in e) _(e, o) && t.push(o);\n\n return t;\n };\n var oo = /\\d{1,2}/,\n no = {},\n io = {},\n ao = /(\\[[^\\[]*\\])|(\\\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,\n so = /(\\[[^\\[]*\\])|(\\\\)?(LTS|LT|LL?L?L?|l{1,4})/g,\n ro = {},\n lo = {},\n co = /\\d/,\n uo = /\\d\\d/,\n po = /\\d{3}/,\n ho = /\\d{4}/,\n mo = /[+-]?\\d{6}/,\n go = /\\d\\d?/,\n yo = /\\d\\d\\d\\d?/,\n fo = /\\d\\d\\d\\d\\d\\d?/,\n bo = /\\d{1,3}/,\n _o = /\\d{1,4}/,\n vo = /[+-]?\\d{1,6}/,\n ko = /\\d+/,\n wo = /[+-]?\\d+/,\n xo = /Z|[+-]\\d\\d:?\\d\\d/gi,\n So = /Z|[+-]\\d\\d(?::?\\d\\d)?/gi,\n Oo = /[+-]?\\d+(\\.\\d{1,3})?/,\n Do = /[0-9]{0,256}['a-z\\u00A0-\\u05FF\\u0700-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFF07\\uFF10-\\uFFEF]{1,256}|[\\u0600-\\u06FF\\/]{1,256}(\\s*?[\\u0600-\\u06FF]{1,256}){1,2}/i,\n To = {},\n Eo = {},\n Co = 0,\n Mo = 1,\n Io = 2,\n Po = 3,\n Fo = 4,\n No = 5;\n q(\"Y\", 0, 0, function () {\n var e = this.year();\n return 9999 >= e ? \"\" + e : \"+\" + e;\n }), q(0, [\"YY\", 2], 0, function () {\n return this.year() % 100;\n }), q(0, [\"YYYY\", 4], 0, \"year\"), q(0, [\"YYYYY\", 5], 0, \"year\"), q(0, [\"YYYYYY\", 6, !0], 0, \"year\"), H(\"year\", \"y\"), U(\"year\", 1), Q(\"Y\", wo), Q(\"YY\", go, uo), Q(\"YYYY\", _o, ho), Q(\"YYYYY\", vo, mo), Q(\"YYYYYY\", vo, mo), oe([\"YYYYY\", \"YYYYYY\"], Co), oe(\"YYYY\", function (e, t) {\n t[Co] = 2 === e.length ? l.parseTwoDigitYear(e) : M(e);\n }), oe(\"YY\", function (e, t) {\n t[Co] = l.parseTwoDigitYear(e);\n }), oe(\"Y\", function (e, t) {\n t[Co] = parseInt(e, 10);\n }), l.parseTwoDigitYear = function (e) {\n return M(e) + (68 < M(e) ? 1900 : 2e3);\n };\n var Yo = se(\"FullYear\", !0),\n Ro;\n Ro = Array.prototype.indexOf ? Array.prototype.indexOf : function (e) {\n var t;\n\n for (t = 0; t < this.length; ++t) if (this[t] === e) return t;\n\n return -1;\n }, q(\"M\", [\"MM\", 2], \"Mo\", function () {\n return this.month() + 1;\n }), q(\"MMM\", 0, 0, function (e) {\n return this.localeData().monthsShort(this, e);\n }), q(\"MMMM\", 0, 0, function (e) {\n return this.localeData().months(this, e);\n }), H(\"month\", \"M\"), U(\"month\", 8), Q(\"M\", go), Q(\"MM\", go, uo), Q(\"MMM\", function (e, t) {\n return t.monthsShortRegex(e);\n }), Q(\"MMMM\", function (e, t) {\n return t.monthsRegex(e);\n }), oe([\"M\", \"MM\"], function (e, t) {\n t[Mo] = M(e) - 1;\n }), oe([\"MMM\", \"MMMM\"], function (e, t, o, n) {\n var i = o._locale.monthsParse(e, n, o._strict);\n\n null == i ? x(o).invalidMonth = e : t[Mo] = i;\n });\n var zo = /D[oD]?(\\[[^\\[\\]]*\\]|\\s)+MMMM?/,\n Bo = [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"];\n q(\"w\", [\"ww\", 2], \"wo\", \"week\"), q(\"W\", [\"WW\", 2], \"Wo\", \"isoWeek\"), H(\"week\", \"w\"), H(\"isoWeek\", \"W\"), U(\"week\", 5), U(\"isoWeek\", 5), Q(\"w\", go), Q(\"ww\", go, uo), Q(\"W\", go), Q(\"WW\", go, uo), ne([\"w\", \"ww\", \"W\", \"WW\"], function (e, t, o, n) {\n t[n.substr(0, 1)] = M(e);\n });\n q(\"d\", 0, \"do\", \"day\"), q(\"dd\", 0, 0, function (e) {\n return this.localeData().weekdaysMin(this, e);\n }), q(\"ddd\", 0, 0, function (e) {\n return this.localeData().weekdaysShort(this, e);\n }), q(\"dddd\", 0, 0, function (e) {\n return this.localeData().weekdays(this, e);\n }), q(\"e\", 0, 0, \"weekday\"), q(\"E\", 0, 0, \"isoWeekday\"), H(\"day\", \"d\"), H(\"weekday\", \"e\"), H(\"isoWeekday\", \"E\"), U(\"day\", 11), U(\"weekday\", 11), U(\"isoWeekday\", 11), Q(\"d\", go), Q(\"e\", go), Q(\"E\", go), Q(\"dd\", function (e, t) {\n return t.weekdaysMinRegex(e);\n }), Q(\"ddd\", function (e, t) {\n return t.weekdaysShortRegex(e);\n }), Q(\"dddd\", function (e, t) {\n return t.weekdaysRegex(e);\n }), ne([\"dd\", \"ddd\", \"dddd\"], function (e, t, o, n) {\n var i = o._locale.weekdaysParse(e, n, o._strict);\n\n null == i ? x(o).invalidWeekday = e : t.d = i;\n }), ne([\"d\", \"e\", \"E\"], function (e, t, o, n) {\n t[n] = M(e);\n });\n var Lo = [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"];\n q(\"H\", [\"HH\", 2], 0, \"hour\"), q(\"h\", [\"hh\", 2], 0, Me), q(\"k\", [\"kk\", 2], 0, function () {\n return this.hours() || 24;\n }), q(\"hmm\", 0, 0, function () {\n return \"\" + Me.apply(this) + G(this.minutes(), 2);\n }), q(\"hmmss\", 0, 0, function () {\n return \"\" + Me.apply(this) + G(this.minutes(), 2) + G(this.seconds(), 2);\n }), q(\"Hmm\", 0, 0, function () {\n return \"\" + this.hours() + G(this.minutes(), 2);\n }), q(\"Hmmss\", 0, 0, function () {\n return \"\" + this.hours() + G(this.minutes(), 2) + G(this.seconds(), 2);\n }), Ie(\"a\", !0), Ie(\"A\", !1), H(\"hour\", \"h\"), U(\"hour\", 13), Q(\"a\", Pe), Q(\"A\", Pe), Q(\"H\", go), Q(\"h\", go), Q(\"k\", go), Q(\"HH\", go, uo), Q(\"hh\", go, uo), Q(\"kk\", go, uo), Q(\"hmm\", yo), Q(\"hmmss\", fo), Q(\"Hmm\", yo), Q(\"Hmmss\", fo), oe([\"H\", \"HH\"], Po), oe([\"k\", \"kk\"], function (e, t) {\n var o = M(e);\n t[Po] = 24 === o ? 0 : o;\n }), oe([\"a\", \"A\"], function (e, t, o) {\n o._isPm = o._locale.isPM(e), o._meridiem = e;\n }), oe([\"h\", \"hh\"], function (e, t, o) {\n t[Po] = M(e), x(o).bigHour = !0;\n }), oe(\"hmm\", function (e, t, o) {\n var n = e.length - 2;\n t[Po] = M(e.substr(0, n)), t[Fo] = M(e.substr(n)), x(o).bigHour = !0;\n }), oe(\"hmmss\", function (e, t, o) {\n var n = e.length - 4,\n i = e.length - 2;\n t[Po] = M(e.substr(0, n)), t[Fo] = M(e.substr(n, 2)), t[No] = M(e.substr(i)), x(o).bigHour = !0;\n }), oe(\"Hmm\", function (e, t) {\n var o = e.length - 2;\n t[Po] = M(e.substr(0, o)), t[Fo] = M(e.substr(o));\n }), oe(\"Hmmss\", function (e, t) {\n var o = e.length - 4,\n n = e.length - 2;\n t[Po] = M(e.substr(0, o)), t[Fo] = M(e.substr(o, 2)), t[No] = M(e.substr(n));\n });\n var Ao = /[ap]\\.?m?\\.?/i,\n Ho = se(\"Hours\", !0),\n jo = {\n calendar: {\n sameDay: \"[Today at] LT\",\n nextDay: \"[Tomorrow at] LT\",\n nextWeek: \"dddd [at] LT\",\n lastDay: \"[Yesterday at] LT\",\n lastWeek: \"[Last] dddd [at] LT\",\n sameElse: \"L\"\n },\n longDateFormat: {\n LTS: \"h:mm:ss A\",\n LT: \"h:mm A\",\n L: \"MM/DD/YYYY\",\n LL: \"MMMM D, YYYY\",\n LLL: \"MMMM D, YYYY h:mm A\",\n LLLL: \"dddd, MMMM D, YYYY h:mm A\"\n },\n invalidDate: \"Invalid date\",\n ordinal: \"%d\",\n dayOfMonthOrdinalParse: oo,\n relativeTime: {\n future: \"in %s\",\n past: \"%s ago\",\n s: \"a few seconds\",\n ss: \"%d seconds\",\n m: \"a minute\",\n mm: \"%d minutes\",\n h: \"an hour\",\n hh: \"%d hours\",\n d: \"a day\",\n dd: \"%d days\",\n M: \"a month\",\n MM: \"%d months\",\n y: \"a year\",\n yy: \"%d years\"\n },\n months: [\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"],\n monthsShort: Bo,\n week: {\n dow: 0,\n doy: 6\n },\n weekdays: [\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"],\n weekdaysMin: [\"Su\", \"Mo\", \"Tu\", \"We\", \"Th\", \"Fr\", \"Sa\"],\n weekdaysShort: Lo,\n meridiemParse: Ao\n },\n Wo = {},\n Uo = {},\n Vo = /^\\s*((?:[+-]\\d{6}|\\d{4})-(?:\\d\\d-\\d\\d|W\\d\\d-\\d|W\\d\\d|\\d\\d\\d|\\d\\d))(?:(T| )(\\d\\d(?::\\d\\d(?::\\d\\d(?:[.,]\\d+)?)?)?)([\\+\\-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,\n Go = /^\\s*((?:[+-]\\d{6}|\\d{4})(?:\\d\\d\\d\\d|W\\d\\d\\d|W\\d\\d|\\d\\d\\d|\\d\\d))(?:(T| )(\\d\\d(?:\\d\\d(?:\\d\\d(?:[.,]\\d+)?)?)?)([\\+\\-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,\n qo = /Z|[+-]\\d\\d(?::?\\d\\d)?/,\n Xo = [[\"YYYYYY-MM-DD\", /[+-]\\d{6}-\\d\\d-\\d\\d/], [\"YYYY-MM-DD\", /\\d{4}-\\d\\d-\\d\\d/], [\"GGGG-[W]WW-E\", /\\d{4}-W\\d\\d-\\d/], [\"GGGG-[W]WW\", /\\d{4}-W\\d\\d/, !1], [\"YYYY-DDD\", /\\d{4}-\\d{3}/], [\"YYYY-MM\", /\\d{4}-\\d\\d/, !1], [\"YYYYYYMMDD\", /[+-]\\d{10}/], [\"YYYYMMDD\", /\\d{8}/], [\"GGGG[W]WWE\", /\\d{4}W\\d{3}/], [\"GGGG[W]WW\", /\\d{4}W\\d{2}/, !1], [\"YYYYDDD\", /\\d{7}/]],\n Zo = [[\"HH:mm:ss.SSSS\", /\\d\\d:\\d\\d:\\d\\d\\.\\d+/], [\"HH:mm:ss,SSSS\", /\\d\\d:\\d\\d:\\d\\d,\\d+/], [\"HH:mm:ss\", /\\d\\d:\\d\\d:\\d\\d/], [\"HH:mm\", /\\d\\d:\\d\\d/], [\"HHmmss.SSSS\", /\\d\\d\\d\\d\\d\\d\\.\\d+/], [\"HHmmss,SSSS\", /\\d\\d\\d\\d\\d\\d,\\d+/], [\"HHmmss\", /\\d\\d\\d\\d\\d\\d/], [\"HHmm\", /\\d\\d\\d\\d/], [\"HH\", /\\d\\d/]],\n $o = /^\\/?Date\\((\\-?\\d+)/i,\n Ko = /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\\s)?(\\d{1,2})\\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\\s(\\d{2,4})\\s(\\d\\d):(\\d\\d)(?::(\\d\\d))?\\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\\d{4}))$/,\n Qo = {\n UT: 0,\n GMT: 0,\n EDT: -240,\n EST: -300,\n CDT: -300,\n CST: -360,\n MDT: -360,\n MST: -420,\n PDT: -420,\n PST: -480\n },\n Jo;\n l.createFromInputFallback = F(\"value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.\", function (e) {\n e._d = new Date(e._i + (e._useUTC ? \" UTC\" : \"\"));\n }), l.ISO_8601 = function () {}, l.RFC_2822 = function () {};\n var en = F(\"moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/\", function () {\n var e = st.apply(null, arguments);\n return this.isValid() && e.isValid() ? e < this ? this : e : O();\n }),\n tn = F(\"moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/\", function () {\n var e = st.apply(null, arguments);\n return this.isValid() && e.isValid() ? e > this ? this : e : O();\n }),\n on = [\"year\", \"quarter\", \"month\", \"week\", \"day\", \"hour\", \"minute\", \"second\", \"millisecond\"];\n ht(\"Z\", \":\"), ht(\"ZZ\", \"\"), Q(\"Z\", So), Q(\"ZZ\", So), oe([\"Z\", \"ZZ\"], function (e, t, o) {\n o._useUTC = !0, o._tzm = mt(So, e);\n });\n var nn = /([\\+\\-]|\\d\\d)/gi;\n\n l.updateOffset = function () {};\n\n var an = /^(\\-|\\+)?(?:(\\d*)[. ])?(\\d+)\\:(\\d+)(?:\\:(\\d+)(\\.\\d*)?)?$/,\n dn = /^(-|\\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;\n _t.fn = ct.prototype, _t.invalid = function () {\n return _t(NaN);\n };\n var sn = xt(1, \"add\"),\n rn = xt(-1, \"subtract\");\n l.defaultFormat = \"YYYY-MM-DDTHH:mm:ssZ\", l.defaultFormatUtc = \"YYYY-MM-DDTHH:mm:ss[Z]\";\n var ln = F(\"moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.\", function (e) {\n return void 0 === e ? this.localeData() : this.locale(e);\n });\n q(0, [\"gg\", 2], 0, function () {\n return this.weekYear() % 100;\n }), q(0, [\"GG\", 2], 0, function () {\n return this.isoWeekYear() % 100;\n }), It(\"gggg\", \"weekYear\"), It(\"ggggg\", \"weekYear\"), It(\"GGGG\", \"isoWeekYear\"), It(\"GGGGG\", \"isoWeekYear\"), H(\"weekYear\", \"gg\"), H(\"isoWeekYear\", \"GG\"), U(\"weekYear\", 1), U(\"isoWeekYear\", 1), Q(\"G\", wo), Q(\"g\", wo), Q(\"GG\", go, uo), Q(\"gg\", go, uo), Q(\"GGGG\", _o, ho), Q(\"gggg\", _o, ho), Q(\"GGGGG\", vo, mo), Q(\"ggggg\", vo, mo), ne([\"gggg\", \"ggggg\", \"GGGG\", \"GGGGG\"], function (e, t, o, n) {\n t[n.substr(0, 2)] = M(e);\n }), ne([\"gg\", \"GG\"], function (e, t, o, n) {\n t[n] = l.parseTwoDigitYear(e);\n }), q(\"Q\", 0, \"Qo\", \"quarter\"), H(\"quarter\", \"Q\"), U(\"quarter\", 7), Q(\"Q\", co), oe(\"Q\", function (e, t) {\n t[Mo] = 3 * (M(e) - 1);\n }), q(\"D\", [\"DD\", 2], \"Do\", \"date\"), H(\"date\", \"D\"), U(\"date\", 9), Q(\"D\", go), Q(\"DD\", go, uo), Q(\"Do\", function (e, t) {\n return e ? t._dayOfMonthOrdinalParse || t._ordinalParse : t._dayOfMonthOrdinalParseLenient;\n }), oe([\"D\", \"DD\"], Io), oe(\"Do\", function (e, t) {\n t[Io] = M(e.match(go)[0]);\n });\n var cn = se(\"Date\", !0);\n q(\"DDD\", [\"DDDD\", 3], \"DDDo\", \"dayOfYear\"), H(\"dayOfYear\", \"DDD\"), U(\"dayOfYear\", 4), Q(\"DDD\", bo), Q(\"DDDD\", po), oe([\"DDD\", \"DDDD\"], function (e, t, o) {\n o._dayOfYear = M(e);\n }), q(\"m\", [\"mm\", 2], 0, \"minute\"), H(\"minute\", \"m\"), U(\"minute\", 14), Q(\"m\", go), Q(\"mm\", go, uo), oe([\"m\", \"mm\"], Fo);\n var un = se(\"Minutes\", !1);\n q(\"s\", [\"ss\", 2], 0, \"second\"), H(\"second\", \"s\"), U(\"second\", 15), Q(\"s\", go), Q(\"ss\", go, uo), oe([\"s\", \"ss\"], No);\n var pn = se(\"Seconds\", !1);\n q(\"S\", 0, 0, function () {\n return ~~(this.millisecond() / 100);\n }), q(0, [\"SS\", 2], 0, function () {\n return ~~(this.millisecond() / 10);\n }), q(0, [\"SSS\", 3], 0, \"millisecond\"), q(0, [\"SSSS\", 4], 0, function () {\n return 10 * this.millisecond();\n }), q(0, [\"SSSSS\", 5], 0, function () {\n return 100 * this.millisecond();\n }), q(0, [\"SSSSSS\", 6], 0, function () {\n return 1e3 * this.millisecond();\n }), q(0, [\"SSSSSSS\", 7], 0, function () {\n return 1e4 * this.millisecond();\n }), q(0, [\"SSSSSSSS\", 8], 0, function () {\n return 1e5 * this.millisecond();\n }), q(0, [\"SSSSSSSSS\", 9], 0, function () {\n return 1e6 * this.millisecond();\n }), H(\"millisecond\", \"ms\"), U(\"millisecond\", 16), Q(\"S\", bo, co), Q(\"SS\", bo, uo), Q(\"SSS\", bo, po);\n var hn;\n\n for (hn = \"SSSS\"; 9 >= hn.length; hn += \"S\") Q(hn, ko);\n\n for (hn = \"S\"; 9 >= hn.length; hn += \"S\") oe(hn, Nt);\n\n var mn = se(\"Milliseconds\", !1);\n q(\"z\", 0, 0, \"zoneAbbr\"), q(\"zz\", 0, 0, \"zoneName\");\n var gn = T.prototype;\n gn.add = sn, gn.calendar = function (e, t) {\n var o = e || st(),\n n = gt(o, this).startOf(\"day\"),\n i = l.calendarFormat(this, n) || \"sameElse\",\n a = t && (Y(t[i]) ? t[i].call(this, o) : t[i]);\n return this.format(a || this.localeData().calendar(i, this, st(o)));\n }, gn.clone = function () {\n return new T(this);\n }, gn.diff = function (e, t, o) {\n var n, i, a;\n return this.isValid() ? (n = gt(e, this), !n.isValid()) ? NaN : (i = 6e4 * (n.utcOffset() - this.utcOffset()), t = j(t), (a = \"year\" === t ? Ot(this, n) / 12 : \"month\" === t ? Ot(this, n) : \"quarter\" === t ? Ot(this, n) / 3 : \"second\" === t ? (this - n) / 1e3 : \"minute\" === t ? (this - n) / 6e4 : \"hour\" === t ? (this - n) / 36e5 : \"day\" === t ? (this - n - i) / 864e5 : \"week\" === t ? (this - n - i) / 6048e5 : this - n, o ? a : C(a))) : NaN;\n }, gn.endOf = function (e) {\n var t;\n if (e = j(e), void 0 === e || \"millisecond\" === e || !this.isValid()) return this;\n var o = this._isUTC ? Mt : Ct;\n return \"year\" === e ? t = o(this.year() + 1, 0, 1) - 1 : \"quarter\" === e ? t = o(this.year(), this.month() - this.month() % 3 + 3, 1) - 1 : \"month\" === e ? t = o(this.year(), this.month() + 1, 1) - 1 : \"week\" === e ? t = o(this.year(), this.month(), this.date() - this.weekday() + 7) - 1 : \"isoWeek\" === e ? t = o(this.year(), this.month(), this.date() - (this.isoWeekday() - 1) + 7) - 1 : \"day\" === e || \"date\" === e ? t = o(this.year(), this.month(), this.date() + 1) - 1 : \"hour\" === e ? (t = this._d.valueOf(), t += 3600000 - Et(t + (this._isUTC ? 0 : 60000 * this.utcOffset()), 3600000) - 1) : \"minute\" === e ? (t = this._d.valueOf(), t += 60000 - Et(t, 60000) - 1) : \"second\" === e ? (t = this._d.valueOf(), t += 1000 - Et(t, 1000) - 1) : void 0, this._d.setTime(t), l.updateOffset(this, !0), this;\n }, gn.format = function (e) {\n e || (e = this.isUtc() ? l.defaultFormatUtc : l.defaultFormat);\n var t = $(this, e);\n return this.localeData().postformat(t);\n }, gn.from = function (e, t) {\n return this.isValid() && (E(e) && e.isValid() || st(e).isValid()) ? _t({\n to: this,\n from: e\n }).locale(this.locale()).humanize(!t) : this.localeData().invalidDate();\n }, gn.fromNow = function (e) {\n return this.from(st(), e);\n }, gn.to = function (e, t) {\n return this.isValid() && (E(e) && e.isValid() || st(e).isValid()) ? _t({\n from: this,\n to: e\n }).locale(this.locale()).humanize(!t) : this.localeData().invalidDate();\n }, gn.toNow = function (e) {\n return this.to(st(), e);\n }, gn.get = function (e) {\n return e = j(e), Y(this[e]) ? this[e]() : this;\n }, gn.invalidAt = function () {\n return x(this).overflow;\n }, gn.isAfter = function (e, t) {\n var o = E(e) ? e : st(e);\n return !!(this.isValid() && o.isValid()) && (t = j(t) || \"millisecond\", \"millisecond\" === t ? this.valueOf() > o.valueOf() : o.valueOf() < this.clone().startOf(t).valueOf());\n }, gn.isBefore = function (e, t) {\n var o = E(e) ? e : st(e);\n return !!(this.isValid() && o.isValid()) && (t = j(t) || \"millisecond\", \"millisecond\" === t ? this.valueOf() < o.valueOf() : this.clone().endOf(t).valueOf() < o.valueOf());\n }, gn.isBetween = function (e, t, o, n) {\n var i = E(e) ? e : st(e),\n a = E(t) ? t : st(t);\n return !!(this.isValid() && i.isValid() && a.isValid()) && (n = n || \"()\", (\"(\" === n[0] ? this.isAfter(i, o) : !this.isBefore(i, o)) && (\")\" === n[1] ? this.isBefore(a, o) : !this.isAfter(a, o)));\n }, gn.isSame = function (e, t) {\n var o = E(e) ? e : st(e),\n n;\n return !!(this.isValid() && o.isValid()) && (t = j(t) || \"millisecond\", \"millisecond\" === t ? this.valueOf() === o.valueOf() : (n = o.valueOf(), this.clone().startOf(t).valueOf() <= n && n <= this.clone().endOf(t).valueOf()));\n }, gn.isSameOrAfter = function (e, t) {\n return this.isSame(e, t) || this.isAfter(e, t);\n }, gn.isSameOrBefore = function (e, t) {\n return this.isSame(e, t) || this.isBefore(e, t);\n }, gn.isValid = function () {\n return S(this);\n }, gn.lang = ln, gn.locale = Dt, gn.localeData = Tt, gn.max = tn, gn.min = en, gn.parsingFlags = function () {\n return v({}, x(this));\n }, gn.set = ce, gn.startOf = function (e) {\n var t;\n if (e = j(e), void 0 === e || \"millisecond\" === e || !this.isValid()) return this;\n var o = this._isUTC ? Mt : Ct;\n return \"year\" === e ? t = o(this.year(), 0, 1) : \"quarter\" === e ? t = o(this.year(), this.month() - this.month() % 3, 1) : \"month\" === e ? t = o(this.year(), this.month(), 1) : \"week\" === e ? t = o(this.year(), this.month(), this.date() - this.weekday()) : \"isoWeek\" === e ? t = o(this.year(), this.month(), this.date() - (this.isoWeekday() - 1)) : \"day\" === e || \"date\" === e ? t = o(this.year(), this.month(), this.date()) : \"hour\" === e ? (t = this._d.valueOf(), t -= Et(t + (this._isUTC ? 0 : 60000 * this.utcOffset()), 3600000)) : \"minute\" === e ? (t = this._d.valueOf(), t -= Et(t, 60000)) : \"second\" === e ? (t = this._d.valueOf(), t -= Et(t, 1000)) : void 0, this._d.setTime(t), l.updateOffset(this, !0), this;\n }, gn.subtract = rn, gn.toArray = function () {\n var e = this;\n return [e.year(), e.month(), e.date(), e.hour(), e.minute(), e.second(), e.millisecond()];\n }, gn.toObject = function () {\n var e = this;\n return {\n years: e.year(),\n months: e.month(),\n date: e.date(),\n hours: e.hours(),\n minutes: e.minutes(),\n seconds: e.seconds(),\n milliseconds: e.milliseconds()\n };\n }, gn.toDate = function () {\n return new Date(this.valueOf());\n }, gn.toISOString = function (e) {\n if (!this.isValid()) return null;\n var t = !0 !== e,\n o = t ? this.clone().utc() : this;\n return 0 > o.year() || 9999 < o.year() ? $(o, t ? \"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]\" : \"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ\") : Y(Date.prototype.toISOString) ? t ? this.toDate().toISOString() : new Date(this.valueOf() + 1e3 * (60 * this.utcOffset())).toISOString().replace(\"Z\", $(o, \"Z\")) : $(o, t ? \"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]\" : \"YYYY-MM-DD[T]HH:mm:ss.SSSZ\");\n }, gn.inspect = function () {\n if (!this.isValid()) return \"moment.invalid(/* \" + this._i + \" */)\";\n var e = \"moment\",\n t = \"\";\n this.isLocal() || (e = 0 === this.utcOffset() ? \"moment.utc\" : \"moment.parseZone\", t = \"Z\");\n var o = \"[\" + e + \"(\\\"]\",\n n = 0 <= this.year() && 9999 >= this.year() ? \"YYYY\" : \"YYYYYY\",\n i = t + \"[\\\")]\";\n return this.format(o + n + \"-MM-DD[T]HH:mm:ss.SSS\" + i);\n }, gn.toJSON = function () {\n return this.isValid() ? this.toISOString() : null;\n }, gn.toString = function () {\n return this.clone().locale(\"en\").format(\"ddd MMM DD YYYY HH:mm:ss [GMT]ZZ\");\n }, gn.unix = function () {\n return s(this.valueOf() / 1e3);\n }, gn.valueOf = function () {\n return this._d.valueOf() - 6e4 * (this._offset || 0);\n }, gn.creationData = function () {\n return {\n input: this._i,\n format: this._f,\n locale: this._locale,\n isUTC: this._isUTC,\n strict: this._strict\n };\n }, gn.year = Yo, gn.isLeapYear = function () {\n return de(this.year());\n }, gn.weekYear = function (e) {\n return Pt.call(this, e, this.week(), this.weekday(), this.localeData()._week.dow, this.localeData()._week.doy);\n }, gn.isoWeekYear = function (e) {\n return Pt.call(this, e, this.isoWeek(), this.isoWeekday(), 1, 4);\n }, gn.quarter = gn.quarters = function (e) {\n return null == e ? r((this.month() + 1) / 3) : this.month(3 * (e - 1) + this.month() % 3);\n }, gn.month = ye, gn.daysInMonth = function () {\n return pe(this.year(), this.month());\n }, gn.week = gn.weeks = function (e) {\n var t = this.localeData().week(this);\n return null == e ? t : this.add(7 * (e - t), \"d\");\n }, gn.isoWeek = gn.isoWeeks = function (e) {\n var t = we(this, 1, 4).week;\n return null == e ? t : this.add(7 * (e - t), \"d\");\n }, gn.weeksInYear = function () {\n var e = this.localeData()._week;\n\n return xe(this.year(), e.dow, e.doy);\n }, gn.isoWeeksInYear = function () {\n return xe(this.year(), 1, 4);\n }, gn.date = cn, gn.day = gn.days = function (e) {\n if (!this.isValid()) return null == e ? NaN : this;\n var t = this._isUTC ? this._d.getUTCDay() : this._d.getDay();\n return null == e ? t : (e = Se(e, this.localeData()), this.add(e - t, \"d\"));\n }, gn.weekday = function (e) {\n if (!this.isValid()) return null == e ? NaN : this;\n var t = (this.day() + 7 - this.localeData()._week.dow) % 7;\n return null == e ? t : this.add(e - t, \"d\");\n }, gn.isoWeekday = function (e) {\n if (!this.isValid()) return null == e ? NaN : this;\n\n if (null != e) {\n var t = Oe(e, this.localeData());\n return this.day(this.day() % 7 ? t : t - 7);\n }\n\n return this.day() || 7;\n }, gn.dayOfYear = function (e) {\n var o = t((this.clone().startOf(\"day\") - this.clone().startOf(\"year\")) / 864e5) + 1;\n return null == e ? o : this.add(e - o, \"d\");\n }, gn.hour = gn.hours = Ho, gn.minute = gn.minutes = un, gn.second = gn.seconds = pn, gn.millisecond = gn.milliseconds = mn, gn.utcOffset = function (e, t, o) {\n var n = this._offset || 0,\n i;\n if (!this.isValid()) return null == e ? NaN : this;\n\n if (null != e) {\n if (\"string\" != typeof e) 16 > a(e) && !o && (e *= 60);else if (e = mt(So, e), null === e) return this;\n return !this._isUTC && t && (i = yt(this)), this._offset = e, this._isUTC = !0, null != i && this.add(i, \"m\"), n !== e && (!t || this._changeInProgress ? St(this, _t(e - n, \"m\"), 1, !1) : !this._changeInProgress && (this._changeInProgress = !0, l.updateOffset(this, !0), this._changeInProgress = null)), this;\n }\n\n return this._isUTC ? n : yt(this);\n }, gn.utc = function (e) {\n return this.utcOffset(0, e);\n }, gn.local = function (e) {\n return this._isUTC && (this.utcOffset(0, e), this._isUTC = !1, e && this.subtract(yt(this), \"m\")), this;\n }, gn.parseZone = function () {\n if (null != this._tzm) this.utcOffset(this._tzm, !1, !0);else if (\"string\" == typeof this._i) {\n var e = mt(xo, this._i);\n null == e ? this.utcOffset(0, !0) : this.utcOffset(e);\n }\n return this;\n }, gn.hasAlignedHourOffset = function (e) {\n return !!this.isValid() && (e = e ? st(e).utcOffset() : 0, 0 == (this.utcOffset() - e) % 60);\n }, gn.isDST = function () {\n return this.utcOffset() > this.clone().month(0).utcOffset() || this.utcOffset() > this.clone().month(5).utcOffset();\n }, gn.isLocal = function () {\n return !!this.isValid() && !this._isUTC;\n }, gn.isUtcOffset = function () {\n return !!this.isValid() && this._isUTC;\n }, gn.isUtc = bt, gn.isUTC = bt, gn.zoneAbbr = function () {\n return this._isUTC ? \"UTC\" : \"\";\n }, gn.zoneName = function () {\n return this._isUTC ? \"Coordinated Universal Time\" : \"\";\n }, gn.dates = F(\"dates accessor is deprecated. Use date instead.\", cn), gn.months = F(\"months accessor is deprecated. Use month instead\", ye), gn.years = F(\"years accessor is deprecated. Use year instead\", Yo), gn.zone = F(\"moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/\", function (e, t) {\n return null == e ? -this.utcOffset() : (\"string\" != typeof e && (e = -e), this.utcOffset(e, t), this);\n }), gn.isDSTShifted = F(\"isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information\", ft);\n var yn = B.prototype;\n yn.calendar = L, yn.longDateFormat = A, yn.invalidDate = function () {\n return this._invalidDate;\n }, yn.ordinal = function (e) {\n return this._ordinal.replace(\"%d\", e);\n }, yn.preparse = Yt, yn.postformat = Yt, yn.relativeTime = function (e, t, o, n) {\n var i = this._relativeTime[o];\n return Y(i) ? i(e, t, o, n) : i.replace(/%d/i, e);\n }, yn.pastFuture = function (e, t) {\n var o = this._relativeTime[0 < e ? \"future\" : \"past\"];\n return Y(o) ? o(t) : o.replace(/%s/i, t);\n }, yn.set = R, yn.months = function (e, t) {\n return e ? u(this._months) ? this._months[e.month()] : this._months[(this._months.isFormat || zo).test(t) ? \"format\" : \"standalone\"][e.month()] : u(this._months) ? this._months : this._months.standalone;\n }, yn.monthsShort = function (e, t) {\n return e ? u(this._monthsShort) ? this._monthsShort[e.month()] : this._monthsShort[zo.test(t) ? \"format\" : \"standalone\"][e.month()] : u(this._monthsShort) ? this._monthsShort : this._monthsShort.standalone;\n }, yn.monthsParse = me, yn.monthsRegex = function (e) {\n return this._monthsParseExact ? (_(this, \"_monthsRegex\") || fe.call(this), e ? this._monthsStrictRegex : this._monthsRegex) : (_(this, \"_monthsRegex\") || (this._monthsRegex = Do), this._monthsStrictRegex && e ? this._monthsStrictRegex : this._monthsRegex);\n }, yn.monthsShortRegex = function (e) {\n return this._monthsParseExact ? (_(this, \"_monthsRegex\") || fe.call(this), e ? this._monthsShortStrictRegex : this._monthsShortRegex) : (_(this, \"_monthsShortRegex\") || (this._monthsShortRegex = Do), this._monthsShortStrictRegex && e ? this._monthsShortStrictRegex : this._monthsShortRegex);\n }, yn.week = function (e) {\n return we(e, this._week.dow, this._week.doy).week;\n }, yn.firstDayOfYear = function () {\n return this._week.doy;\n }, yn.firstDayOfWeek = function () {\n return this._week.dow;\n }, yn.weekdays = function (e, t) {\n var o = u(this._weekdays) ? this._weekdays : this._weekdays[e && !0 !== e && this._weekdays.isFormat.test(t) ? \"format\" : \"standalone\"];\n return !0 === e ? De(o, this._week.dow) : e ? o[e.day()] : o;\n }, yn.weekdaysMin = function (e) {\n return !0 === e ? De(this._weekdaysMin, this._week.dow) : e ? this._weekdaysMin[e.day()] : this._weekdaysMin;\n }, yn.weekdaysShort = function (e) {\n return !0 === e ? De(this._weekdaysShort, this._week.dow) : e ? this._weekdaysShort[e.day()] : this._weekdaysShort;\n }, yn.weekdaysParse = Ee, yn.weekdaysRegex = function (e) {\n return this._weekdaysParseExact ? (_(this, \"_weekdaysRegex\") || Ce.call(this), e ? this._weekdaysStrictRegex : this._weekdaysRegex) : (_(this, \"_weekdaysRegex\") || (this._weekdaysRegex = Do), this._weekdaysStrictRegex && e ? this._weekdaysStrictRegex : this._weekdaysRegex);\n }, yn.weekdaysShortRegex = function (e) {\n return this._weekdaysParseExact ? (_(this, \"_weekdaysRegex\") || Ce.call(this), e ? this._weekdaysShortStrictRegex : this._weekdaysShortRegex) : (_(this, \"_weekdaysShortRegex\") || (this._weekdaysShortRegex = Do), this._weekdaysShortStrictRegex && e ? this._weekdaysShortStrictRegex : this._weekdaysShortRegex);\n }, yn.weekdaysMinRegex = function (e) {\n return this._weekdaysParseExact ? (_(this, \"_weekdaysRegex\") || Ce.call(this), e ? this._weekdaysMinStrictRegex : this._weekdaysMinRegex) : (_(this, \"_weekdaysMinRegex\") || (this._weekdaysMinRegex = Do), this._weekdaysMinStrictRegex && e ? this._weekdaysMinStrictRegex : this._weekdaysMinRegex);\n }, yn.isPM = function (e) {\n return \"p\" === (e + \"\").toLowerCase().charAt(0);\n }, yn.meridiem = function (e, t, o) {\n return 11 < e ? o ? \"pm\" : \"PM\" : o ? \"am\" : \"AM\";\n }, Re(\"en\", {\n dayOfMonthOrdinalParse: /\\d{1,2}(th|st|nd|rd)/,\n ordinal: function (e) {\n var t = e % 10,\n o = 1 === M(e % 100 / 10) ? \"th\" : 1 == t ? \"st\" : 2 == t ? \"nd\" : 3 == t ? \"rd\" : \"th\";\n return e + o;\n }\n }), l.lang = F(\"moment.lang is deprecated. Use moment.locale instead.\", Re), l.langData = F(\"moment.langData is deprecated. Use moment.localeData instead.\", Be);\n\n var fn = a,\n bn = Wt(\"ms\"),\n _n = Wt(\"s\"),\n vn = Wt(\"m\"),\n kn = Wt(\"h\"),\n wn = Wt(\"d\"),\n xn = Wt(\"w\"),\n Sn = Wt(\"M\"),\n On = Wt(\"Q\"),\n Dn = Wt(\"y\"),\n Tn = Ut(\"milliseconds\"),\n En = Ut(\"seconds\"),\n Cn = Ut(\"minutes\"),\n Mn = Ut(\"hours\"),\n In = Ut(\"days\"),\n Pn = Ut(\"months\"),\n Fn = Ut(\"years\"),\n Nn = t,\n Yn = {\n ss: 44,\n s: 45,\n m: 45,\n h: 22,\n d: 26,\n M: 11\n },\n Rn = a,\n zn = ct.prototype;\n\n return zn.isValid = function () {\n return this._isValid;\n }, zn.abs = function () {\n var e = this._data;\n return this._milliseconds = fn(this._milliseconds), this._days = fn(this._days), this._months = fn(this._months), e.milliseconds = fn(e.milliseconds), e.seconds = fn(e.seconds), e.minutes = fn(e.minutes), e.hours = fn(e.hours), e.months = fn(e.months), e.years = fn(e.years), this;\n }, zn.add = function (e, t) {\n return Lt(this, e, t, 1);\n }, zn.subtract = function (e, t) {\n return Lt(this, e, t, -1);\n }, zn.as = function (e) {\n if (!this.isValid()) return NaN;\n var o = this._milliseconds,\n n,\n i;\n if (e = j(e), \"month\" === e || \"quarter\" === e || \"year\" === e) switch (n = this._days + o / 864e5, i = this._months + Ht(n), e) {\n case \"month\":\n return i;\n\n case \"quarter\":\n return i / 3;\n\n case \"year\":\n return i / 12;\n } else switch (n = this._days + t(jt(this._months)), e) {\n case \"week\":\n return n / 7 + o / 6048e5;\n\n case \"day\":\n return n + o / 864e5;\n\n case \"hour\":\n return 24 * n + o / 36e5;\n\n case \"minute\":\n return 1440 * n + o / 6e4;\n\n case \"second\":\n return 86400 * n + o / 1e3;\n\n case \"millisecond\":\n return s(864e5 * n) + o;\n\n default:\n throw new Error(\"Unknown unit \" + e);\n }\n }, zn.asMilliseconds = bn, zn.asSeconds = _n, zn.asMinutes = vn, zn.asHours = kn, zn.asDays = wn, zn.asWeeks = xn, zn.asMonths = Sn, zn.asQuarters = On, zn.asYears = Dn, zn.valueOf = function () {\n return this.isValid() ? this._milliseconds + 864e5 * this._days + 2592e6 * (this._months % 12) + 31536e6 * M(this._months / 12) : NaN;\n }, zn._bubble = function () {\n var e = this._milliseconds,\n t = this._days,\n o = this._months,\n n = this._data,\n i,\n a,\n d,\n s,\n r;\n return 0 <= e && 0 <= t && 0 <= o || 0 >= e && 0 >= t && 0 >= o || (e += 864e5 * At(jt(o) + t), t = 0, o = 0), n.milliseconds = e % 1e3, i = C(e / 1e3), n.seconds = i % 60, a = C(i / 60), n.minutes = a % 60, d = C(a / 60), n.hours = d % 24, t += C(d / 24), r = C(Ht(t)), o += r, t -= At(jt(r)), s = C(o / 12), o %= 12, n.days = t, n.months = o, n.years = s, this;\n }, zn.clone = function () {\n return _t(this);\n }, zn.get = function (e) {\n return e = j(e), this.isValid() ? this[e + \"s\"]() : NaN;\n }, zn.milliseconds = Tn, zn.seconds = En, zn.minutes = Cn, zn.hours = Mn, zn.days = In, zn.weeks = function () {\n return C(this.days() / 7);\n }, zn.months = Pn, zn.years = Fn, zn.humanize = function (e) {\n if (!this.isValid()) return this.localeData().invalidDate();\n var t = this.localeData(),\n o = Gt(this, !e, t);\n return e && (o = t.pastFuture(+this, o)), t.postformat(o);\n }, zn.toISOString = Zt, zn.toString = Zt, zn.toJSON = Zt, zn.locale = Dt, zn.localeData = Tt, zn.toIsoString = F(\"toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)\", Zt), zn.lang = ln, q(\"X\", 0, 0, \"unix\"), q(\"x\", 0, 0, \"valueOf\"), Q(\"x\", wo), Q(\"X\", Oo), oe(\"X\", function (e, t, o) {\n o._d = new Date(1e3 * parseFloat(e, 10));\n }), oe(\"x\", function (e, t, o) {\n o._d = new Date(M(e));\n }), l.version = \"2.24.0\", function (e) {\n $t = e;\n }(st), l.fn = gn, l.min = function () {\n var e = [].slice.call(arguments, 0);\n return rt(\"isBefore\", e);\n }, l.max = function () {\n var e = [].slice.call(arguments, 0);\n return rt(\"isAfter\", e);\n }, l.now = function () {\n return Date.now ? Date.now() : +new Date();\n }, l.utc = k, l.unix = function (e) {\n return st(1e3 * e);\n }, l.months = function (e, t) {\n return zt(e, t, \"months\");\n }, l.isDate = y, l.locale = Re, l.invalid = O, l.duration = _t, l.isMoment = E, l.weekdays = function (e, t, o) {\n return Bt(e, t, o, \"weekdays\");\n }, l.parseZone = function () {\n return st.apply(null, arguments).parseZone();\n }, l.localeData = Be, l.isDuration = ut, l.monthsShort = function (e, t) {\n return zt(e, t, \"monthsShort\");\n }, l.weekdaysMin = function (e, t, o) {\n return Bt(e, t, o, \"weekdaysMin\");\n }, l.defineLocale = ze, l.updateLocale = function (e, t) {\n if (null != t) {\n var o = jo,\n n,\n i;\n i = Ye(e), null != i && (o = i._config), t = z(o, t), n = new B(t), n.parentLocale = Wo[e], Wo[e] = n, Re(e);\n } else null != Wo[e] && (null == Wo[e].parentLocale ? null != Wo[e] && delete Wo[e] : Wo[e] = Wo[e].parentLocale);\n\n return Wo[e];\n }, l.locales = Le, l.weekdaysShort = function (e, t, o) {\n return Bt(e, t, o, \"weekdaysShort\");\n }, l.normalizeUnits = j, l.relativeTimeRounding = qt, l.relativeTimeThreshold = function (e, t) {\n return void 0 !== Yn[e] && (void 0 === t ? Yn[e] : (Yn[e] = t, \"s\" === e && (Yn.ss = t - 1), !0));\n }, l.calendarFormat = function (e, t) {\n var o = e.diff(t, \"days\", !0);\n return -6 > o ? \"sameElse\" : -1 > o ? \"lastWeek\" : 0 > o ? \"lastDay\" : 1 > o ? \"sameDay\" : 2 > o ? \"nextDay\" : 7 > o ? \"nextWeek\" : \"sameElse\";\n }, l.prototype = gn, l.HTML5_FMT = {\n DATETIME_LOCAL: \"YYYY-MM-DDTHH:mm\",\n DATETIME_LOCAL_SECONDS: \"YYYY-MM-DDTHH:mm:ss\",\n DATETIME_LOCAL_MS: \"YYYY-MM-DDTHH:mm:ss.SSS\",\n DATE: \"YYYY-MM-DD\",\n TIME: \"HH:mm\",\n TIME_SECONDS: \"HH:mm:ss\",\n TIME_MS: \"HH:mm:ss.SSS\",\n WEEK: \"GGGG-[W]WW\",\n MONTH: \"YYYY-MM\"\n }, l;\n });\n}), byteToHex = [], i$1 = 0; 256 > i$1; i$1++) byteToHex[i$1] = (i$1 + 256).toString(16).substr(1);\n\nfunction stringifyUUID(e, t) {\n var o = t || 0,\n n = byteToHex;\n return n[e[o++]] + n[e[o++]] + n[e[o++]] + n[e[o++]] + \"-\" + n[e[o++]] + n[e[o++]] + \"-\" + n[e[o++]] + n[e[o++]] + \"-\" + n[e[o++]] + n[e[o++]] + \"-\" + n[e[o++]] + n[e[o++]] + n[e[o++]] + n[e[o++]] + n[e[o++]] + n[e[o++]];\n}\n\nfor (var random = function () {\n if (\"undefined\" != typeof crypto && crypto.getRandomValues) {\n var e = new Uint8Array(16);\n return function () {\n return crypto.getRandomValues(e), e;\n };\n }\n\n var t = Array(16);\n return function () {\n for (var e = 0, o; 16 > e; e++) 0 == (3 & e) && (o = 4294967296 * Math.random()), t[e] = 255 & o >>> ((3 & e) << 3);\n\n return t;\n };\n}(), byteToHex$1 = [], i$1$1 = 0; 256 > i$1$1; i$1$1++) byteToHex$1[i$1$1] = (i$1$1 + 256).toString(16).substr(1);\n\nvar seedBytes = random(),\n defaultNodeId = [1 | seedBytes[0], seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]],\n defaultClockseq = 16383 & (seedBytes[6] << 8 | seedBytes[7]);\n\nfunction uuid4() {\n var e = 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : {},\n t = 1 < arguments.length ? arguments[1] : void 0,\n o = 2 < arguments.length ? arguments[2] : void 0,\n n = t && o || 0;\n \"string\" == typeof e && (t = \"binary\" === e ? Array(16) : void 0, e = {});\n var i = e.random || (e.rng || random)();\n if (i[6] = 64 | 15 & i[6], i[8] = 128 | 63 & i[8], t) for (var a = 0; 16 > a; a++) t[n + a] = i[a];\n return t || stringifyUUID(i);\n}\n\nvar ASPDateRegex = /^\\/?Date\\((-?\\d+)/i,\n fullHexRE = /^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i,\n shortHexRE = /^#?([a-f\\d])([a-f\\d])([a-f\\d])$/i,\n rgbRE = /^rgb\\( *(1?\\d{1,2}|2[0-4]\\d|25[0-5]) *, *(1?\\d{1,2}|2[0-4]\\d|25[0-5]) *, *(1?\\d{1,2}|2[0-4]\\d|25[0-5]) *\\)$/i,\n rgbaRE = /^rgba\\( *(1?\\d{1,2}|2[0-4]\\d|25[0-5]) *, *(1?\\d{1,2}|2[0-4]\\d|25[0-5]) *, *(1?\\d{1,2}|2[0-4]\\d|25[0-5]) *, *([01]|0?\\.\\d+) *\\)$/i;\n\nfunction isNumber(e) {\n return e instanceof Number || \"number\" == typeof e;\n}\n\nfunction recursiveDOMDelete(e) {\n if (e) for (; !0 === e.hasChildNodes();) {\n var t = e.firstChild;\n t && (recursiveDOMDelete(t), e.removeChild(t));\n }\n}\n\nfunction isString(e) {\n return e instanceof String || \"string\" == typeof e;\n}\n\nfunction isObject(e) {\n return \"object\" === _typeof(e) && null !== e;\n}\n\nfunction isDate(e) {\n if (e instanceof Date) return !0;\n\n if (isString(e)) {\n var t = ASPDateRegex.exec(e);\n if (t) return !0;\n if (!isNaN(Date.parse(e))) return !0;\n }\n\n return !1;\n}\n\nfunction isMoment(e) {\n return moment.isMoment(e);\n}\n\nfunction copyOrDelete(e, t, o, n) {\n var i = !1;\n !0 === n && (i = null === t[o] && e[o] !== void 0), i ? delete e[o] : e[o] = t[o];\n}\n\nfunction fillIfDefined(e, t) {\n var o = !!(2 < arguments.length && arguments[2] !== void 0) && arguments[2];\n\n for (var n in e) if (t[n] !== void 0) if (null === t[n] || \"object\" !== _typeof(t[n])) copyOrDelete(e, t, n, o);else {\n var i = e[n],\n a = t[n];\n isObject(i) && isObject(a) && fillIfDefined(i, a, o);\n }\n}\n\nvar extend = Object.assign;\n\nfunction selectiveExtend(e, t) {\n if (!Array.isArray(e)) throw new Error(\"Array with property names expected as first argument\");\n\n for (var o = arguments.length, n = Array(2 < o ? o - 2 : 0), i = 2; i < o; i++) n[i - 2] = arguments[i];\n\n for (var a = 0, d = n, s; a < d.length; a++) {\n s = d[a];\n\n for (var r = 0, l; r < e.length; r++) l = e[r], s && Object.prototype.hasOwnProperty.call(s, l) && (t[l] = s[l]);\n }\n\n return t;\n}\n\nfunction selectiveDeepExtend(e, t, o) {\n var n = !!(3 < arguments.length && arguments[3] !== void 0) && arguments[3];\n if (Array.isArray(o)) throw new TypeError(\"Arrays are not supported by deepExtend\");\n\n for (var i = 0, a; i < e.length; i++) if (a = e[i], Object.prototype.hasOwnProperty.call(o, a)) if (o[a] && o[a].constructor === Object) void 0 === t[a] && (t[a] = {}), t[a].constructor === Object ? deepExtend(t[a], o[a], !1, n) : copyOrDelete(t, o, a, n);else if (Array.isArray(o[a])) throw new TypeError(\"Arrays are not supported by deepExtend\");else copyOrDelete(t, o, a, n);\n\n return t;\n}\n\nfunction selectiveNotDeepExtend(e, t, o) {\n var n = !!(3 < arguments.length && arguments[3] !== void 0) && arguments[3];\n if (Array.isArray(o)) throw new TypeError(\"Arrays are not supported by deepExtend\");\n\n for (var a in o) if (Object.prototype.hasOwnProperty.call(o, a) && -1 === e.indexOf(a)) if (o[a] && o[a].constructor === Object) void 0 === t[a] && (t[a] = {}), t[a].constructor === Object ? deepExtend(t[a], o[a]) : copyOrDelete(t, o, a, n);else if (Array.isArray(o[a])) {\n t[a] = [];\n\n for (var d = 0; d < o[a].length; d++) t[a].push(o[a][d]);\n } else copyOrDelete(t, o, a, n);\n\n return t;\n}\n\nfunction deepExtend(e, t) {\n var o = !!(2 < arguments.length && arguments[2] !== void 0) && arguments[2],\n n = !!(3 < arguments.length && arguments[3] !== void 0) && arguments[3];\n\n for (var i in t) (Object.prototype.hasOwnProperty.call(t, i) || !0 === o) && (t[i] && Object.getPrototypeOf(t[i]) === Object.prototype ? void 0 === e[i] ? e[i] = deepExtend({}, t[i], o) : e[i] && Object.getPrototypeOf(e[i]) === Object.prototype ? deepExtend(e[i], t[i], o) : copyOrDelete(e, t, i, n) : Array.isArray(t[i]) ? e[i] = t[i].slice() : copyOrDelete(e, t, i, n));\n\n return e;\n}\n\nfunction equalArray(e, t) {\n if (e.length !== t.length) return !1;\n\n for (var o = 0, n = e.length; o < n; o++) if (e[o] != t[o]) return !1;\n\n return !0;\n}\n\nfunction convert(e, t) {\n var o;\n\n if (void 0 !== e) {\n if (null === e) return null;\n if (!t) return e;\n if (\"string\" != typeof t && !(t instanceof String)) throw new Error(\"Type must be a string\");\n\n switch (t) {\n case \"boolean\":\n case \"Boolean\":\n return !!e;\n\n case \"number\":\n case \"Number\":\n return isString(e) && !isNaN(Date.parse(e)) ? moment(e).valueOf() : +e.valueOf();\n\n case \"string\":\n case \"String\":\n return e + \"\";\n\n case \"Date\":\n if (isNumber(e)) return new Date(e);\n if (e instanceof Date) return new Date(e.valueOf());\n if (isMoment(e)) return new Date(e.valueOf());\n if (isString(e)) return o = ASPDateRegex.exec(e), o ? new Date(+o[1]) : moment(new Date(e)).toDate();\n throw new Error(\"Cannot convert object of type \" + getType(e) + \" to type Date\");\n\n case \"Moment\":\n if (isNumber(e)) return moment(e);\n if (e instanceof Date) return moment(e.valueOf());\n if (isMoment(e)) return moment(e);\n if (isString(e)) return o = ASPDateRegex.exec(e), o ? moment(+o[1]) : moment(e);\n throw new Error(\"Cannot convert object of type \" + getType(e) + \" to type Date\");\n\n case \"ISODate\":\n if (isNumber(e)) return new Date(e);\n if (e instanceof Date) return e.toISOString();\n if (isMoment(e)) return e.toDate().toISOString();\n if (isString(e)) return o = ASPDateRegex.exec(e), o ? new Date(+o[1]).toISOString() : moment(e).format();\n throw new Error(\"Cannot convert object of type \" + getType(e) + \" to type ISODate\");\n\n case \"ASPDate\":\n if (isNumber(e)) return \"/Date(\" + e + \")/\";\n if (e instanceof Date || isMoment(e)) return \"/Date(\" + e.valueOf() + \")/\";\n\n if (isString(e)) {\n o = ASPDateRegex.exec(e);\n var n;\n return n = o ? new Date(+o[1]).valueOf() : new Date(e).valueOf(), \"/Date(\" + n + \")/\";\n }\n\n throw new Error(\"Cannot convert object of type \" + getType(e) + \" to type ASPDate\");\n\n default:\n throw new Error(\"Unknown type \".concat(t));\n }\n }\n}\n\nfunction getType(e) {\n var t = _typeof(e);\n\n return \"object\" === t ? null === e ? \"null\" : e instanceof Boolean ? \"Boolean\" : e instanceof Number ? \"Number\" : e instanceof String ? \"String\" : Array.isArray(e) ? \"Array\" : e instanceof Date ? \"Date\" : \"Object\" : \"number\" === t ? \"Number\" : \"boolean\" === t ? \"Boolean\" : \"string\" === t ? \"String\" : void 0 === t ? \"undefined\" : t;\n}\n\nfunction copyAndExtendArray(e, t) {\n return [].concat(_toConsumableArray(e), [t]);\n}\n\nfunction copyArray(e) {\n return e.slice();\n}\n\nfunction getAbsoluteLeft(e) {\n return e.getBoundingClientRect().left;\n}\n\nfunction getAbsoluteRight(e) {\n return e.getBoundingClientRect().right;\n}\n\nfunction getAbsoluteTop(e) {\n return e.getBoundingClientRect().top;\n}\n\nfunction addClassName(e, t) {\n var o = e.className.split(\" \"),\n n = t.split(\" \");\n o = o.concat(n.filter(function (e) {\n return 0 > o.indexOf(e);\n })), e.className = o.join(\" \");\n}\n\nfunction removeClassName(e, t) {\n var o = e.className.split(\" \"),\n n = t.split(\" \");\n o = o.filter(function (e) {\n return 0 > n.indexOf(e);\n }), e.className = o.join(\" \");\n}\n\nfunction forEach(e, t) {\n if (Array.isArray(e)) for (var o = e.length, n = 0; n < o; n++) t(e[n], n, e);else for (var a in e) Object.prototype.hasOwnProperty.call(e, a) && t(e[a], a, e);\n}\n\nvar toArray = Object.values;\n\nfunction updateProperty(e, t, o) {\n return e[t] !== o && (e[t] = o, !0);\n}\n\nfunction throttle(e) {\n var t = !1;\n return function () {\n t || (t = !0, requestAnimationFrame(function () {\n t = !1, e();\n }));\n };\n}\n\nfunction addEventListener(e, t, o, n) {\n e.addEventListener ? (n === void 0 && (n = !1), \"mousewheel\" === t && 0 <= navigator.userAgent.indexOf(\"Firefox\") && (t = \"DOMMouseScroll\"), e.addEventListener(t, o, n)) : e.attachEvent(\"on\" + t, o);\n}\n\nfunction removeEventListener(e, t, o, n) {\n e.removeEventListener ? (n === void 0 && (n = !1), \"mousewheel\" === t && 0 <= navigator.userAgent.indexOf(\"Firefox\") && (t = \"DOMMouseScroll\"), e.removeEventListener(t, o, n)) : e.detachEvent(\"on\" + t, o);\n}\n\nfunction preventDefault(e) {\n if (e || (e = window.event), !e) ;else e.preventDefault ? e.preventDefault() : e.returnValue = !1;\n}\n\nfunction getTarget() {\n var e = 0 < arguments.length && arguments[0] !== void 0 ? arguments[0] : window.event,\n t = null;\n if (!e) ;else e.target ? t = e.target : e.srcElement && (t = e.srcElement);\n return t instanceof Element ? null != t.nodeType && 3 == t.nodeType && (t = t.parentNode, !(t instanceof Element)) ? null : t : null;\n}\n\nfunction hasParent(e, t) {\n for (var o = e; o;) {\n if (o === t) return !0;\n if (o.parentNode) o = o.parentNode;else return !1;\n }\n\n return !1;\n}\n\nvar option = {\n asBoolean: function (e, t) {\n return \"function\" == typeof e && (e = e()), null == e ? t || null : !1 != e;\n },\n asNumber: function (e, t) {\n return \"function\" == typeof e && (e = e()), null == e ? t || null : +e || t || null;\n },\n asString: function (e, t) {\n return \"function\" == typeof e && (e = e()), null == e ? t || null : e + \"\";\n },\n asSize: function (e, t) {\n return \"function\" == typeof e && (e = e()), isString(e) ? e : isNumber(e) ? e + \"px\" : t || null;\n },\n asElement: function (e, t) {\n return \"function\" == typeof e && (e = e()), e || t || null;\n }\n};\n\nfunction hexToRGB(e) {\n var t;\n\n switch (e.length) {\n case 3:\n case 4:\n return t = shortHexRE.exec(e), t ? {\n r: parseInt(t[1] + t[1], 16),\n g: parseInt(t[2] + t[2], 16),\n b: parseInt(t[3] + t[3], 16)\n } : null;\n\n case 6:\n case 7:\n return t = fullHexRE.exec(e), t ? {\n r: parseInt(t[1], 16),\n g: parseInt(t[2], 16),\n b: parseInt(t[3], 16)\n } : null;\n\n default:\n return null;\n }\n}\n\nfunction overrideOpacity(e, t) {\n if (-1 !== e.indexOf(\"rgba\")) return e;\n\n if (-1 !== e.indexOf(\"rgb\")) {\n var o = e.substr(e.indexOf(\"(\") + 1).replace(\")\", \"\").split(\",\");\n return \"rgba(\" + o[0] + \",\" + o[1] + \",\" + o[2] + \",\" + t + \")\";\n }\n\n var n = hexToRGB(e);\n return null == n ? e : \"rgba(\" + n.r + \",\" + n.g + \",\" + n.b + \",\" + t + \")\";\n}\n\nfunction RGBToHex(e, t, o) {\n return \"#\" + (16777216 + (e << 16) + (t << 8) + o).toString(16).slice(1);\n}\n\nfunction parseColor(e, t) {\n var o = Math.min;\n\n if (isString(e)) {\n var n = e;\n\n if (isValidRGB(n)) {\n var i = n.substr(4).substr(0, n.length - 5).split(\",\").map(function (e) {\n return parseInt(e);\n });\n n = RGBToHex(i[0], i[1], i[2]);\n }\n\n if (!0 === isValidHex(n)) {\n var a = hexToHSV(n),\n d = {\n h: a.h,\n s: .8 * a.s,\n v: o(1, 1.02 * a.v)\n },\n s = {\n h: a.h,\n s: o(1, 1.25 * a.s),\n v: .8 * a.v\n },\n r = HSVToHex(s.h, s.s, s.v),\n l = HSVToHex(d.h, d.s, d.v);\n return {\n background: n,\n border: r,\n highlight: {\n background: l,\n border: r\n },\n hover: {\n background: l,\n border: r\n }\n };\n }\n\n return {\n background: n,\n border: n,\n highlight: {\n background: n,\n border: n\n },\n hover: {\n background: n,\n border: n\n }\n };\n }\n\n if (t) {\n var c = {\n background: e.background || t.background,\n border: e.border || t.border,\n highlight: isString(e.highlight) ? {\n border: e.highlight,\n background: e.highlight\n } : {\n background: e.highlight && e.highlight.background || t.highlight.background,\n border: e.highlight && e.highlight.border || t.highlight.border\n },\n hover: isString(e.hover) ? {\n border: e.hover,\n background: e.hover\n } : {\n border: e.hover && e.hover.border || t.hover.border,\n background: e.hover && e.hover.background || t.hover.background\n }\n };\n return c;\n }\n\n var u = {\n background: e.background || void 0,\n border: e.border || void 0,\n highlight: isString(e.highlight) ? {\n border: e.highlight,\n background: e.highlight\n } : {\n background: e.highlight && e.highlight.background || void 0,\n border: e.highlight && e.highlight.border || void 0\n },\n hover: isString(e.hover) ? {\n border: e.hover,\n background: e.hover\n } : {\n border: e.hover && e.hover.border || void 0,\n background: e.hover && e.hover.background || void 0\n }\n };\n return u;\n}\n\nfunction RGBToHSV(e, t, o) {\n var n = Math.max,\n i = Math.min;\n e /= 255, t /= 255, o /= 255;\n var a = i(e, i(t, o)),\n s = n(e, n(t, o));\n if (a === s) return {\n h: 0,\n s: 0,\n v: a\n };\n var r = e === a ? t - o : o === a ? e - t : o - e,\n d = e === a ? 3 : o === a ? 1 : 5;\n return {\n h: 60 * (d - r / (s - a)) / 360,\n s: (s - a) / s,\n v: s\n };\n}\n\nvar cssUtil = {\n split: function (e) {\n var t = {};\n return e.split(\";\").forEach(function (e) {\n if (\"\" != e.trim()) {\n var o = e.split(\":\"),\n n = o[0].trim(),\n i = o[1].trim();\n t[n] = i;\n }\n }), t;\n },\n join: function (e) {\n return Object.keys(e).map(function (t) {\n return t + \": \" + e[t];\n }).join(\"; \");\n }\n};\n\nfunction addCssText(e, t) {\n var o = cssUtil.split(e.style.cssText),\n n = cssUtil.split(t),\n i = _objectSpread2({}, o, {}, n);\n\n e.style.cssText = cssUtil.join(i);\n}\n\nfunction removeCssText(e, t) {\n var o = cssUtil.split(e.style.cssText),\n n = cssUtil.split(t);\n\n for (var i in n) Object.prototype.hasOwnProperty.call(n, i) && delete o[i];\n\n e.style.cssText = cssUtil.join(o);\n}\n\nfunction HSVToRGB(e, o, n) {\n var a = Math.floor,\n d = a(6 * e),\n i = 6 * e - d,\n s = n * (1 - o),\n l = n * (1 - i * o),\n c = n * (1 - (1 - i) * o),\n t,\n u,\n p;\n\n switch (d % 6) {\n case 0:\n t = n, u = c, p = s;\n break;\n\n case 1:\n t = l, u = n, p = s;\n break;\n\n case 2:\n t = s, u = n, p = c;\n break;\n\n case 3:\n t = s, u = l, p = n;\n break;\n\n case 4:\n t = c, u = s, p = n;\n break;\n\n case 5:\n t = n, u = s, p = l;\n }\n\n return {\n r: a(255 * t),\n g: a(255 * u),\n b: a(255 * p)\n };\n}\n\nfunction HSVToHex(e, t, o) {\n var n = HSVToRGB(e, t, o);\n return RGBToHex(n.r, n.g, n.b);\n}\n\nfunction hexToHSV(e) {\n var t = hexToRGB(e);\n if (!t) throw new TypeError(\"'\".concat(e, \"' is not a valid color.\"));\n return RGBToHSV(t.r, t.g, t.b);\n}\n\nfunction isValidHex(e) {\n var t = /(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(e);\n return t;\n}\n\nfunction isValidRGB(e) {\n return rgbRE.test(e);\n}\n\nfunction isValidRGBA(e) {\n return rgbaRE.test(e);\n}\n\nfunction selectiveBridgeObject(e, t) {\n if (null !== t && \"object\" === _typeof(t)) {\n for (var o = Object.create(t), n = 0; n < e.length; n++) Object.prototype.hasOwnProperty.call(t, e[n]) && \"object\" == _typeof(t[e[n]]) && (o[e[n]] = bridgeObject(t[e[n]]));\n\n return o;\n }\n\n return null;\n}\n\nfunction bridgeObject(e) {\n if (null === e || \"object\" !== _typeof(e)) return null;\n if (e instanceof Element) return e;\n var t = Object.create(e);\n\n for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && \"object\" == _typeof(e[o]) && (t[o] = bridgeObject(e[o]));\n\n return t;\n}\n\nfunction insertSort(e, t) {\n for (var o = 0; o < e.length; o++) {\n var n = e[o],\n a = void 0;\n\n for (a = o; 0 < a && 0 > t(n, e[a - 1]); a--) e[a] = e[a - 1];\n\n e[a] = n;\n }\n\n return e;\n}\n\nfunction mergeOptions(e, t, o) {\n var n = 3 < arguments.length && arguments[3] !== void 0 ? arguments[3] : {},\n i = function (e) {\n return null !== e && e !== void 0;\n },\n a = function (e) {\n return null !== e && \"object\" === _typeof(e);\n };\n\n if (!a(e)) throw new Error(\"Parameter mergeTarget must be an object\");\n if (!a(t)) throw new Error(\"Parameter options must be an object\");\n if (!i(o)) throw new Error(\"Parameter option must have a value\");\n if (!a(n)) throw new Error(\"Parameter globalOptions must be an object\");\n\n var d = function (e, t, o) {\n a(e[o]) || (e[o] = {});\n var n = t[o],\n i = e[o];\n\n for (var d in n) Object.prototype.hasOwnProperty.call(n, d) && (i[d] = n[d]);\n },\n s = t[o],\n r = a(n) && !function (e) {\n for (var t in e) if (Object.prototype.hasOwnProperty.call(e, t)) return !1;\n\n return !0;\n }(n),\n l = r ? n[o] : void 0,\n c = l ? l.enabled : void 0;\n\n if (void 0 !== s) {\n if (\"boolean\" == typeof s) return a(e[o]) || (e[o] = {}), void (e[o].enabled = s);\n if (null === s && !a(e[o])) if (i(l)) e[o] = Object.create(l);else return;\n\n if (a(s)) {\n var u = !0;\n void 0 === s.enabled ? void 0 !== c && (u = l.enabled) : u = s.enabled, d(e, t, o), e[o].enabled = u;\n }\n }\n}\n\nfunction binarySearchCustom(e, t, o, n) {\n for (var i = 0, a = 0, d = e.length - 1; a <= d && i < 1e4;) {\n var s = Math.floor((a + d) / 2),\n r = e[s],\n l = n === void 0 ? r[o] : r[o][n],\n c = t(l);\n if (0 == c) return s;\n -1 == c ? a = s + 1 : d = s - 1;\n i++;\n }\n\n return -1;\n}\n\nfunction binarySearchValue(e, t, o, n, i) {\n var a = Math.max,\n d = Math.min,\n s = Math.floor,\n r = 0,\n l = 0,\n c = e.length - 1,\n u,\n p,\n h,\n m;\n\n for (i = null == i ? function (e, t) {\n return e == t ? 0 : e < t ? -1 : 1;\n } : i; l <= c && 10000 > r;) {\n if (m = s(.5 * (c + l)), u = e[a(0, m - 1)][o], p = e[m][o], h = e[d(e.length - 1, m + 1)][o], 0 == i(p, t)) return m;\n if (0 > i(u, t) && 0 < i(p, t)) return \"before\" == n ? a(0, m - 1) : m;\n if (0 > i(p, t) && 0 < i(h, t)) return \"before\" == n ? m : d(e.length - 1, m + 1);\n 0 > i(p, t) ? l = m + 1 : c = m - 1, r++;\n }\n\n return -1;\n}\n\nvar easingFunctions = {\n linear: function (e) {\n return e;\n },\n easeInQuad: function (e) {\n return e * e;\n },\n easeOutQuad: function (e) {\n return e * (2 - e);\n },\n easeInOutQuad: function (e) {\n return .5 > e ? 2 * e * e : -1 + (4 - 2 * e) * e;\n },\n easeInCubic: function (e) {\n return e * e * e;\n },\n easeOutCubic: function (e) {\n return --e * e * e + 1;\n },\n easeInOutCubic: function (e) {\n return .5 > e ? 4 * e * e * e : (e - 1) * (2 * e - 2) * (2 * e - 2) + 1;\n },\n easeInQuart: function (e) {\n return e * e * e * e;\n },\n easeOutQuart: function (e) {\n return 1 - --e * e * e * e;\n },\n easeInOutQuart: function (e) {\n return .5 > e ? 8 * e * e * e * e : 1 - 8 * --e * e * e * e;\n },\n easeInQuint: function (e) {\n return e * e * e * e * e;\n },\n easeOutQuint: function (e) {\n return 1 + --e * e * e * e * e;\n },\n easeInOutQuint: function (e) {\n return .5 > e ? 16 * e * e * e * e * e : 1 + 16 * --e * e * e * e * e;\n }\n};\n\nfunction getScrollBarWidth() {\n var e = document.createElement(\"p\");\n e.style.width = \"100%\", e.style.height = \"200px\";\n var t = document.createElement(\"div\");\n t.style.position = \"absolute\", t.style.top = \"0px\", t.style.left = \"0px\", t.style.visibility = \"hidden\", t.style.width = \"200px\", t.style.height = \"150px\", t.style.overflow = \"hidden\", t.appendChild(e), document.body.appendChild(t);\n var o = e.offsetWidth;\n t.style.overflow = \"scroll\";\n var n = e.offsetWidth;\n return o == n && (n = t.clientWidth), document.body.removeChild(t), o - n;\n}\n\nfunction topMost(e, t) {\n var o;\n Array.isArray(t) || (t = [t]);\n var n = !0,\n a = !1,\n d = void 0;\n\n try {\n for (var s = e[Symbol.iterator](), r, l; !(n = (r = s.next()).done); n = !0) if (l = r.value, l) {\n o = l[t[0]];\n\n for (var c = 1; c < t.length; c++) o && (o = o[t[c]]);\n\n if (\"undefined\" != typeof o) break;\n }\n } catch (e) {\n a = !0, d = e;\n } finally {\n try {\n n || null == s.return || s.return();\n } finally {\n if (a) throw d;\n }\n }\n\n return o;\n}\n\nvar util = Object.freeze({\n isNumber: isNumber,\n recursiveDOMDelete: recursiveDOMDelete,\n isString: isString,\n isObject: isObject,\n isDate: isDate,\n isMoment: isMoment,\n fillIfDefined: fillIfDefined,\n extend: extend,\n selectiveExtend: selectiveExtend,\n selectiveDeepExtend: selectiveDeepExtend,\n selectiveNotDeepExtend: selectiveNotDeepExtend,\n deepExtend: deepExtend,\n equalArray: equalArray,\n convert: convert,\n getType: getType,\n copyAndExtendArray: copyAndExtendArray,\n copyArray: copyArray,\n getAbsoluteLeft: getAbsoluteLeft,\n getAbsoluteRight: getAbsoluteRight,\n getAbsoluteTop: getAbsoluteTop,\n addClassName: addClassName,\n removeClassName: removeClassName,\n forEach: forEach,\n toArray: toArray,\n updateProperty: updateProperty,\n throttle: throttle,\n addEventListener: addEventListener,\n removeEventListener: removeEventListener,\n preventDefault: preventDefault,\n getTarget: getTarget,\n hasParent: hasParent,\n option: option,\n hexToRGB: hexToRGB,\n overrideOpacity: overrideOpacity,\n RGBToHex: RGBToHex,\n parseColor: parseColor,\n RGBToHSV: RGBToHSV,\n addCssText: addCssText,\n removeCssText: removeCssText,\n HSVToRGB: HSVToRGB,\n HSVToHex: HSVToHex,\n hexToHSV: hexToHSV,\n isValidHex: isValidHex,\n isValidRGB: isValidRGB,\n isValidRGBA: isValidRGBA,\n selectiveBridgeObject: selectiveBridgeObject,\n bridgeObject: bridgeObject,\n insertSort: insertSort,\n mergeOptions: mergeOptions,\n binarySearchCustom: binarySearchCustom,\n binarySearchValue: binarySearchValue,\n easingFunctions: easingFunctions,\n getScrollBarWidth: getScrollBarWidth,\n topMost: topMost,\n randomUUID: uuid4\n}),\n esm = Object.freeze({\n default: util,\n HSVToHex: HSVToHex,\n HSVToRGB: HSVToRGB,\n RGBToHSV: RGBToHSV,\n RGBToHex: RGBToHex,\n addClassName: addClassName,\n addCssText: addCssText,\n addEventListener: addEventListener,\n binarySearchCustom: binarySearchCustom,\n binarySearchValue: binarySearchValue,\n bridgeObject: bridgeObject,\n convert: convert,\n copyAndExtendArray: copyAndExtendArray,\n copyArray: copyArray,\n deepExtend: deepExtend,\n easingFunctions: easingFunctions,\n equalArray: equalArray,\n extend: extend,\n fillIfDefined: fillIfDefined,\n forEach: forEach,\n getAbsoluteLeft: getAbsoluteLeft,\n getAbsoluteRight: getAbsoluteRight,\n getAbsoluteTop: getAbsoluteTop,\n getScrollBarWidth: getScrollBarWidth,\n getTarget: getTarget,\n getType: getType,\n hasParent: hasParent,\n hexToHSV: hexToHSV,\n hexToRGB: hexToRGB,\n insertSort: insertSort,\n isDate: isDate,\n isMoment: isMoment,\n isNumber: isNumber,\n isObject: isObject,\n isString: isString,\n isValidHex: isValidHex,\n isValidRGB: isValidRGB,\n isValidRGBA: isValidRGBA,\n mergeOptions: mergeOptions,\n option: option,\n overrideOpacity: overrideOpacity,\n parseColor: parseColor,\n preventDefault: preventDefault,\n randomUUID: uuid4,\n recursiveDOMDelete: recursiveDOMDelete,\n removeClassName: removeClassName,\n removeCssText: removeCssText,\n removeEventListener: removeEventListener,\n selectiveBridgeObject: selectiveBridgeObject,\n selectiveDeepExtend: selectiveDeepExtend,\n selectiveExtend: selectiveExtend,\n selectiveNotDeepExtend: selectiveNotDeepExtend,\n throttle: throttle,\n toArray: toArray,\n topMost: topMost,\n updateProperty: updateProperty\n});\n\nfunction _defineProperty$1(e, t, o) {\n return t in e ? Object.defineProperty(e, t, {\n value: o,\n enumerable: !0,\n configurable: !0,\n writable: !0\n }) : e[t] = o, e;\n}\n\nvar defineProperty$1 = _defineProperty$1;\n\nfunction createCommonjsModule$1(e, t) {\n return t = {\n exports: {}\n }, e(t, t.exports), t.exports;\n}\n\nvar _typeof_1 = createCommonjsModule$1(function (e) {\n function t(e) {\n return t = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (e) {\n return typeof e;\n } : function (e) {\n return e && \"function\" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? \"symbol\" : typeof e;\n }, t(e);\n }\n\n function o(n) {\n return e.exports = \"function\" == typeof Symbol && \"symbol\" === t(Symbol.iterator) ? o = function (e) {\n return t(e);\n } : o = function (e) {\n return e && \"function\" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? \"symbol\" : t(e);\n }, o(n);\n }\n\n e.exports = o;\n});\n\nfunction _classCallCheck(e, t) {\n if (!(e instanceof t)) throw new TypeError(\"Cannot call a class as a function\");\n}\n\nvar classCallCheck = _classCallCheck;\n\nfunction _defineProperties(e, t) {\n for (var o = 0, n; o < t.length; o++) n = t[o], n.enumerable = n.enumerable || !1, n.configurable = !0, \"value\" in n && (n.writable = !0), Object.defineProperty(e, n.key, n);\n}\n\nfunction _createClass(e, t, o) {\n return t && _defineProperties(e.prototype, t), o && _defineProperties(e, o), e;\n}\n\nvar createClass = _createClass;\n\nfunction _assertThisInitialized(e) {\n if (void 0 === e) throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n return e;\n}\n\nvar assertThisInitialized = _assertThisInitialized;\n\nfunction _possibleConstructorReturn(e, t) {\n return t && (\"object\" === _typeof_1(t) || \"function\" == typeof t) ? t : assertThisInitialized(e);\n}\n\nvar possibleConstructorReturn = _possibleConstructorReturn,\n getPrototypeOf = createCommonjsModule$1(function (e) {\n function t(n) {\n return e.exports = t = Object.setPrototypeOf ? Object.getPrototypeOf : function (e) {\n return e.__proto__ || Object.getPrototypeOf(e);\n }, t(n);\n }\n\n e.exports = t;\n}),\n setPrototypeOf$1 = createCommonjsModule$1(function (e) {\n function t(n, o) {\n return e.exports = t = Object.setPrototypeOf || function (e, t) {\n return e.__proto__ = t, e;\n }, t(n, o);\n }\n\n e.exports = t;\n});\n\nfunction _inherits(e, t) {\n if (\"function\" != typeof t && null !== t) throw new TypeError(\"Super expression must either be null or a function\");\n e.prototype = Object.create(t && t.prototype, {\n constructor: {\n value: e,\n writable: !0,\n configurable: !0\n }\n }), t && setPrototypeOf$1(e, t);\n}\n\nfor (var inherits = _inherits, byteToHex$2 = [], i$2 = 0; 256 > i$2; i$2++) byteToHex$2[i$2] = (i$2 + 256).toString(16).substr(1);\n\nfunction stringifyUUID$1(e, t) {\n var o = t || 0,\n n = byteToHex$2;\n return n[e[o++]] + n[e[o++]] + n[e[o++]] + n[e[o++]] + \"-\" + n[e[o++]] + n[e[o++]] + \"-\" + n[e[o++]] + n[e[o++]] + \"-\" + n[e[o++]] + n[e[o++]] + \"-\" + n[e[o++]] + n[e[o++]] + n[e[o++]] + n[e[o++]] + n[e[o++]] + n[e[o++]];\n}\n\nfor (var random$1 = function () {\n if (\"undefined\" != typeof crypto && crypto.getRandomValues) {\n var e = new Uint8Array(16);\n return function () {\n return crypto.getRandomValues(e), e;\n };\n }\n\n var t = Array(16);\n return function () {\n for (var e = 0, o; 16 > e; e++) 0 == (3 & e) && (o = 4294967296 * Math.random()), t[e] = 255 & o >>> ((3 & e) << 3);\n\n return t;\n };\n}(), byteToHex$1$1 = [], i$1$2 = 0; 256 > i$1$2; i$1$2++) byteToHex$1$1[i$1$2] = (i$1$2 + 256).toString(16).substr(1);\n\nvar seedBytes$1 = random$1(),\n defaultNodeId$1 = [1 | seedBytes$1[0], seedBytes$1[1], seedBytes$1[2], seedBytes$1[3], seedBytes$1[4], seedBytes$1[5]],\n defaultClockseq$1 = 16383 & (seedBytes$1[6] << 8 | seedBytes$1[7]);\n\nfunction uuid4$1() {\n var e = 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : {},\n t = 1 < arguments.length ? arguments[1] : void 0,\n o = 2 < arguments.length ? arguments[2] : void 0,\n n = t && o || 0;\n \"string\" == typeof e && (t = \"binary\" === e ? Array(16) : void 0, e = {});\n var i = e.random || (e.rng || random$1)();\n if (i[6] = 64 | 15 & i[6], i[8] = 128 | 63 & i[8], t) for (var a = 0; 16 > a; a++) t[n + a] = i[a];\n return t || stringifyUUID$1(i);\n}\n\nfunction _typeof$1(e) {\n return _typeof$1 = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (e) {\n return typeof e;\n } : function (e) {\n return e && \"function\" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? \"symbol\" : typeof e;\n }, _typeof$1(e);\n}\n\nvar commonjsGlobal$1 = \"undefined\" == typeof globalThis ? \"undefined\" == typeof window ? \"undefined\" == typeof global ? \"undefined\" == typeof self ? {} : self : global : window : globalThis;\n\nfunction commonjsRequire$1() {\n throw new Error(\"Dynamic requires are not currently supported by rollup-plugin-commonjs\");\n}\n\nfunction createCommonjsModule$1$1(e, t) {\n return t = {\n exports: {}\n }, e(t, t.exports), t.exports;\n}\n\nfor (var moment$1 = createCommonjsModule$1$1(function (e) {\n var t = Math.round,\n o = Math.pow,\n n = Math.max,\n a = Math.abs,\n d = Math.min,\n s = Math.floor,\n r = Math.ceil;\n\n (function (t, o) {\n e.exports = o();\n })(commonjsGlobal$1, function () {\n function l() {\n return $t.apply(null, arguments);\n }\n\n function u(e) {\n return e instanceof Array || \"[object Array]\" === Object.prototype.toString.call(e);\n }\n\n function p(e) {\n return null != e && \"[object Object]\" === Object.prototype.toString.call(e);\n }\n\n function h(e) {\n if (Object.getOwnPropertyNames) return 0 === Object.getOwnPropertyNames(e).length;\n\n for (var t in e) if (e.hasOwnProperty(t)) return !1;\n\n return !0;\n }\n\n function m(e) {\n return void 0 === e;\n }\n\n function g(e) {\n return \"number\" == typeof e || \"[object Number]\" === Object.prototype.toString.call(e);\n }\n\n function y(e) {\n return e instanceof Date || \"[object Date]\" === Object.prototype.toString.call(e);\n }\n\n function f(e, t) {\n var o = [],\n n;\n\n for (n = 0; n < e.length; ++n) o.push(t(e[n], n));\n\n return o;\n }\n\n function _(e, t) {\n return Object.prototype.hasOwnProperty.call(e, t);\n }\n\n function v(e, t) {\n for (var o in t) _(t, o) && (e[o] = t[o]);\n\n return _(t, \"toString\") && (e.toString = t.toString), _(t, \"valueOf\") && (e.valueOf = t.valueOf), e;\n }\n\n function k(e, t, o, n) {\n return dt(e, t, o, n, !0).utc();\n }\n\n function w() {\n return {\n empty: !1,\n unusedTokens: [],\n unusedInput: [],\n overflow: -2,\n charsLeftOver: 0,\n nullInput: !1,\n invalidMonth: null,\n invalidFormat: !1,\n userInvalidated: !1,\n iso: !1,\n parsedDateParts: [],\n meridiem: null,\n rfc2822: !1,\n weekdayMismatch: !1\n };\n }\n\n function x(e) {\n return null == e._pf && (e._pf = w()), e._pf;\n }\n\n function S(e) {\n if (null == e._isValid) {\n var t = x(e),\n o = Kt.call(t.parsedDateParts, function (e) {\n return null != e;\n }),\n n = !isNaN(e._d.getTime()) && 0 > t.overflow && !t.empty && !t.invalidMonth && !t.invalidWeekday && !t.weekdayMismatch && !t.nullInput && !t.invalidFormat && !t.userInvalidated && (!t.meridiem || t.meridiem && o);\n if (e._strict && (n = n && 0 === t.charsLeftOver && 0 === t.unusedTokens.length && void 0 === t.bigHour), null == Object.isFrozen || !Object.isFrozen(e)) e._isValid = n;else return n;\n }\n\n return e._isValid;\n }\n\n function O(e) {\n var t = k(NaN);\n return null == e ? x(t).userInvalidated = !0 : v(x(t), e), t;\n }\n\n function D(e, t) {\n var o, n, a;\n if (m(t._isAMomentObject) || (e._isAMomentObject = t._isAMomentObject), m(t._i) || (e._i = t._i), m(t._f) || (e._f = t._f), m(t._l) || (e._l = t._l), m(t._strict) || (e._strict = t._strict), m(t._tzm) || (e._tzm = t._tzm), m(t._isUTC) || (e._isUTC = t._isUTC), m(t._offset) || (e._offset = t._offset), m(t._pf) || (e._pf = x(t)), m(t._locale) || (e._locale = t._locale), 0 < Qt.length) for (o = 0; o < Qt.length; o++) n = Qt[o], a = t[n], m(a) || (e[n] = a);\n return e;\n }\n\n function T(e) {\n D(this, e), this._d = new Date(null == e._d ? NaN : e._d.getTime()), this.isValid() || (this._d = new Date(NaN)), !1 === Jt && (Jt = !0, l.updateOffset(this), Jt = !1);\n }\n\n function E(e) {\n return e instanceof T || null != e && null != e._isAMomentObject;\n }\n\n function C(e) {\n return 0 > e ? r(e) || 0 : s(e);\n }\n\n function M(e) {\n var t = +e,\n o = 0;\n return 0 != t && isFinite(t) && (o = C(t)), o;\n }\n\n function I(e, t, o) {\n var n = d(e.length, t.length),\n s = a(e.length - t.length),\n r = 0,\n l;\n\n for (l = 0; l < n; l++) (o && e[l] !== t[l] || !o && M(e[l]) !== M(t[l])) && r++;\n\n return r + s;\n }\n\n function P(e) {\n !1 === l.suppressDeprecationWarnings && \"undefined\" != typeof console && console.warn && console.warn(\"Deprecation warning: \" + e);\n }\n\n function F(e, t) {\n var o = !0;\n return v(function () {\n if (null != l.deprecationHandler && l.deprecationHandler(null, e), o) {\n for (var n = [], a = 0, d; a < arguments.length; a++) {\n if (d = \"\", \"object\" == typeof arguments[a]) {\n for (var s in d += \"\\n[\" + a + \"] \", arguments[0]) d += s + \": \" + arguments[0][s] + \", \";\n\n d = d.slice(0, -2);\n } else d = arguments[a];\n\n n.push(d);\n }\n\n P(e + \"\\nArguments: \" + Array.prototype.slice.call(n).join(\"\") + \"\\n\" + new Error().stack), o = !1;\n }\n\n return t.apply(this, arguments);\n }, t);\n }\n\n function N(e, t) {\n null != l.deprecationHandler && l.deprecationHandler(e, t), eo[e] || (P(t), eo[e] = !0);\n }\n\n function Y(e) {\n return e instanceof Function || \"[object Function]\" === Object.prototype.toString.call(e);\n }\n\n function R(e) {\n var t, o;\n\n for (o in e) t = e[o], Y(t) ? this[o] = t : this[\"_\" + o] = t;\n\n this._config = e, this._dayOfMonthOrdinalParseLenient = new RegExp((this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) + \"|\" + /\\d{1,2}/.source);\n }\n\n function z(e, t) {\n var o = v({}, e),\n n;\n\n for (n in t) _(t, n) && (p(e[n]) && p(t[n]) ? (o[n] = {}, v(o[n], e[n]), v(o[n], t[n])) : null == t[n] ? delete o[n] : o[n] = t[n]);\n\n for (n in e) _(e, n) && !_(t, n) && p(e[n]) && (o[n] = v({}, o[n]));\n\n return o;\n }\n\n function B(e) {\n null != e && this.set(e);\n }\n\n function L(e, t, o) {\n var n = this._calendar[e] || this._calendar.sameElse;\n return Y(n) ? n.call(t, o) : n;\n }\n\n function A(e) {\n var t = this._longDateFormat[e],\n o = this._longDateFormat[e.toUpperCase()];\n\n return t || !o ? t : (this._longDateFormat[e] = o.replace(/MMMM|MM|DD|dddd/g, function (e) {\n return e.slice(1);\n }), this._longDateFormat[e]);\n }\n\n function H(e, t) {\n var o = e.toLowerCase();\n no[o] = no[o + \"s\"] = no[t] = e;\n }\n\n function j(e) {\n return \"string\" == typeof e ? no[e] || no[e.toLowerCase()] : void 0;\n }\n\n function W(e) {\n var t = {},\n o,\n n;\n\n for (n in e) _(e, n) && (o = j(n), o && (t[o] = e[n]));\n\n return t;\n }\n\n function U(e, t) {\n io[e] = t;\n }\n\n function V(e) {\n var t = [];\n\n for (var o in e) t.push({\n unit: o,\n priority: io[o]\n });\n\n return t.sort(function (e, t) {\n return e.priority - t.priority;\n }), t;\n }\n\n function G(e, t, i) {\n var d = \"\" + a(e),\n s = t - d.length;\n return (0 <= e ? i ? \"+\" : \"\" : \"-\") + o(10, n(0, s)).toString().substr(1) + d;\n }\n\n function q(e, t, o, n) {\n var i = n;\n \"string\" == typeof n && (i = function () {\n return this[n]();\n }), e && (lo[e] = i), t && (lo[t[0]] = function () {\n return G(i.apply(this, arguments), t[1], t[2]);\n }), o && (lo[o] = function () {\n return this.localeData().ordinal(i.apply(this, arguments), e);\n });\n }\n\n function X(e) {\n return e.match(/\\[[\\s\\S]/) ? e.replace(/^\\[|\\]$/g, \"\") : e.replace(/\\\\/g, \"\");\n }\n\n function Z(e) {\n var t = e.match(ao),\n o,\n n;\n\n for (o = 0, n = t.length; o < n; o++) t[o] = lo[t[o]] ? lo[t[o]] : X(t[o]);\n\n return function (o) {\n var a = \"\",\n d;\n\n for (d = 0; d < n; d++) a += Y(t[d]) ? t[d].call(o, e) : t[d];\n\n return a;\n };\n }\n\n function $(e, t) {\n return e.isValid() ? (t = K(t, e.localeData()), ro[t] = ro[t] || Z(t), ro[t](e)) : e.localeData().invalidDate();\n }\n\n function K(e, t) {\n function o(e) {\n return t.longDateFormat(e) || e;\n }\n\n var n = 5;\n\n for (so.lastIndex = 0; 0 <= n && so.test(e);) e = e.replace(so, o), so.lastIndex = 0, n -= 1;\n\n return e;\n }\n\n function Q(e, t, o) {\n To[e] = Y(t) ? t : function (e) {\n return e && o ? o : t;\n };\n }\n\n function J(e, t) {\n return _(To, e) ? To[e](t._strict, t._locale) : new RegExp(ee(e));\n }\n\n function ee(e) {\n return te(e.replace(\"\\\\\", \"\").replace(/\\\\(\\[)|\\\\(\\])|\\[([^\\]\\[]*)\\]|\\\\(.)/g, function (e, t, o, n, i) {\n return t || o || n || i;\n }));\n }\n\n function te(e) {\n return e.replace(/[-\\/\\\\^$*+?.()|[\\]{}]/g, \"\\\\$&\");\n }\n\n function oe(e, t) {\n var o = t,\n n;\n\n for (\"string\" == typeof e && (e = [e]), g(t) && (o = function (e, o) {\n o[t] = M(e);\n }), n = 0; n < e.length; n++) Eo[e[n]] = o;\n }\n\n function ne(e, t) {\n oe(e, function (e, o, n, i) {\n n._w = n._w || {}, t(e, n._w, n, i);\n });\n }\n\n function ie(e, t, o) {\n null != t && _(Eo, e) && Eo[e](t, o._a, o, e);\n }\n\n function ae(e) {\n return de(e) ? 366 : 365;\n }\n\n function de(e) {\n return 0 == e % 4 && 0 != e % 100 || 0 == e % 400;\n }\n\n function se(e, t) {\n return function (o) {\n return null == o ? re(this, e) : (le(this, e, o), l.updateOffset(this, t), this);\n };\n }\n\n function re(e, t) {\n return e.isValid() ? e._d[\"get\" + (e._isUTC ? \"UTC\" : \"\") + t]() : NaN;\n }\n\n function le(e, t, o) {\n e.isValid() && !isNaN(o) && (\"FullYear\" === t && de(e.year()) && 1 === e.month() && 29 === e.date() ? e._d[\"set\" + (e._isUTC ? \"UTC\" : \"\") + t](o, e.month(), pe(o, e.month())) : e._d[\"set\" + (e._isUTC ? \"UTC\" : \"\") + t](o));\n }\n\n function ce(e, t) {\n if (\"object\" == typeof e) {\n e = W(e);\n\n for (var o = V(e), n = 0; n < o.length; n++) this[o[n].unit](e[o[n].unit]);\n } else if (e = j(e), Y(this[e])) return this[e](t);\n\n return this;\n }\n\n function ue(e, t) {\n return (e % t + t) % t;\n }\n\n function pe(e, t) {\n if (isNaN(e) || isNaN(t)) return NaN;\n var o = ue(t, 12);\n return e += (t - o) / 12, 1 === o ? de(e) ? 29 : 28 : 31 - o % 7 % 2;\n }\n\n function he(e, t, o) {\n var n = e.toLocaleLowerCase(),\n a,\n d,\n s;\n if (!this._monthsParse) for (this._monthsParse = [], this._longMonthsParse = [], this._shortMonthsParse = [], a = 0; 12 > a; ++a) s = k([2e3, a]), this._shortMonthsParse[a] = this.monthsShort(s, \"\").toLocaleLowerCase(), this._longMonthsParse[a] = this.months(s, \"\").toLocaleLowerCase();\n return o ? \"MMM\" === t ? (d = Ro.call(this._shortMonthsParse, n), -1 === d ? null : d) : (d = Ro.call(this._longMonthsParse, n), -1 === d ? null : d) : \"MMM\" === t ? (d = Ro.call(this._shortMonthsParse, n), -1 !== d) ? d : (d = Ro.call(this._longMonthsParse, n), -1 === d ? null : d) : (d = Ro.call(this._longMonthsParse, n), -1 !== d) ? d : (d = Ro.call(this._shortMonthsParse, n), -1 === d ? null : d);\n }\n\n function me(e, t, o) {\n var n, a, d;\n if (this._monthsParseExact) return he.call(this, e, t, o);\n\n for (this._monthsParse || (this._monthsParse = [], this._longMonthsParse = [], this._shortMonthsParse = []), n = 0; 12 > n; n++) {\n if (a = k([2e3, n]), o && !this._longMonthsParse[n] && (this._longMonthsParse[n] = new RegExp(\"^\" + this.months(a, \"\").replace(\".\", \"\") + \"$\", \"i\"), this._shortMonthsParse[n] = new RegExp(\"^\" + this.monthsShort(a, \"\").replace(\".\", \"\") + \"$\", \"i\")), o || this._monthsParse[n] || (d = \"^\" + this.months(a, \"\") + \"|^\" + this.monthsShort(a, \"\"), this._monthsParse[n] = new RegExp(d.replace(\".\", \"\"), \"i\")), o && \"MMMM\" === t && this._longMonthsParse[n].test(e)) return n;\n if (o && \"MMM\" === t && this._shortMonthsParse[n].test(e)) return n;\n if (!o && this._monthsParse[n].test(e)) return n;\n }\n }\n\n function ge(e, t) {\n var o;\n if (!e.isValid()) return e;\n if (\"string\" == typeof t) if (/^\\d+$/.test(t)) t = M(t);else if (t = e.localeData().monthsParse(t), !g(t)) return e;\n return o = d(e.date(), pe(e.year(), t)), e._d[\"set\" + (e._isUTC ? \"UTC\" : \"\") + \"Month\"](t, o), e;\n }\n\n function ye(e) {\n return null == e ? re(this, \"Month\") : (ge(this, e), l.updateOffset(this, !0), this);\n }\n\n function fe() {\n function e(e, t) {\n return t.length - e.length;\n }\n\n var t = [],\n o = [],\n n = [],\n a,\n d;\n\n for (a = 0; 12 > a; a++) d = k([2e3, a]), t.push(this.monthsShort(d, \"\")), o.push(this.months(d, \"\")), n.push(this.months(d, \"\")), n.push(this.monthsShort(d, \"\"));\n\n for (t.sort(e), o.sort(e), n.sort(e), a = 0; 12 > a; a++) t[a] = te(t[a]), o[a] = te(o[a]);\n\n for (a = 0; 24 > a; a++) n[a] = te(n[a]);\n\n this._monthsRegex = new RegExp(\"^(\" + n.join(\"|\") + \")\", \"i\"), this._monthsShortRegex = this._monthsRegex, this._monthsStrictRegex = new RegExp(\"^(\" + o.join(\"|\") + \")\", \"i\"), this._monthsShortStrictRegex = new RegExp(\"^(\" + t.join(\"|\") + \")\", \"i\");\n }\n\n function be(e, t, o, n, i, a, d) {\n var s;\n return 100 > e && 0 <= e ? (s = new Date(e + 400, t, o, n, i, a, d), isFinite(s.getFullYear()) && s.setFullYear(e)) : s = new Date(e, t, o, n, i, a, d), s;\n }\n\n function _e(e) {\n var t;\n\n if (100 > e && 0 <= e) {\n var o = Array.prototype.slice.call(arguments);\n o[0] = e + 400, t = new Date(Date.UTC.apply(null, o)), isFinite(t.getUTCFullYear()) && t.setUTCFullYear(e);\n } else t = new Date(Date.UTC.apply(null, arguments));\n\n return t;\n }\n\n function ve(e, t, o) {\n var n = 7 + t - o,\n i = (7 + _e(e, 0, n).getUTCDay() - t) % 7;\n return -i + n - 1;\n }\n\n function ke(e, t, o, n, i) {\n var a = ve(e, n, i),\n d = 1 + 7 * (t - 1) + (7 + o - n) % 7 + a,\n s,\n r;\n return 0 >= d ? (s = e - 1, r = ae(s) + d) : d > ae(e) ? (s = e + 1, r = d - ae(e)) : (s = e, r = d), {\n year: s,\n dayOfYear: r\n };\n }\n\n function we(e, t, o) {\n var n = ve(e.year(), t, o),\n i = s((e.dayOfYear() - n - 1) / 7) + 1,\n a,\n d;\n return 1 > i ? (d = e.year() - 1, a = i + xe(d, t, o)) : i > xe(e.year(), t, o) ? (a = i - xe(e.year(), t, o), d = e.year() + 1) : (d = e.year(), a = i), {\n week: a,\n year: d\n };\n }\n\n function xe(e, t, o) {\n var n = ve(e, t, o),\n i = ve(e + 1, t, o);\n return (ae(e) - n + i) / 7;\n }\n\n function Se(e, t) {\n return \"string\" == typeof e ? isNaN(e) ? (e = t.weekdaysParse(e), \"number\" == typeof e ? e : null) : parseInt(e, 10) : e;\n }\n\n function Oe(e, t) {\n return \"string\" == typeof e ? t.weekdaysParse(e) % 7 || 7 : isNaN(e) ? null : e;\n }\n\n function De(e, t) {\n return e.slice(t, 7).concat(e.slice(0, t));\n }\n\n function Te(e, t, o) {\n var n = e.toLocaleLowerCase(),\n a,\n d,\n s;\n if (!this._weekdaysParse) for (this._weekdaysParse = [], this._shortWeekdaysParse = [], this._minWeekdaysParse = [], a = 0; 7 > a; ++a) s = k([2e3, 1]).day(a), this._minWeekdaysParse[a] = this.weekdaysMin(s, \"\").toLocaleLowerCase(), this._shortWeekdaysParse[a] = this.weekdaysShort(s, \"\").toLocaleLowerCase(), this._weekdaysParse[a] = this.weekdays(s, \"\").toLocaleLowerCase();\n return o ? \"dddd\" === t ? (d = Ro.call(this._weekdaysParse, n), -1 === d ? null : d) : \"ddd\" === t ? (d = Ro.call(this._shortWeekdaysParse, n), -1 === d ? null : d) : (d = Ro.call(this._minWeekdaysParse, n), -1 === d ? null : d) : \"dddd\" === t ? (d = Ro.call(this._weekdaysParse, n), -1 !== d) ? d : (d = Ro.call(this._shortWeekdaysParse, n), -1 !== d) ? d : (d = Ro.call(this._minWeekdaysParse, n), -1 === d ? null : d) : \"ddd\" === t ? (d = Ro.call(this._shortWeekdaysParse, n), -1 !== d) ? d : (d = Ro.call(this._weekdaysParse, n), -1 !== d) ? d : (d = Ro.call(this._minWeekdaysParse, n), -1 === d ? null : d) : (d = Ro.call(this._minWeekdaysParse, n), -1 !== d) ? d : (d = Ro.call(this._weekdaysParse, n), -1 !== d) ? d : (d = Ro.call(this._shortWeekdaysParse, n), -1 === d ? null : d);\n }\n\n function Ee(e, t, o) {\n var n, a, d;\n if (this._weekdaysParseExact) return Te.call(this, e, t, o);\n\n for (this._weekdaysParse || (this._weekdaysParse = [], this._minWeekdaysParse = [], this._shortWeekdaysParse = [], this._fullWeekdaysParse = []), n = 0; 7 > n; n++) {\n if (a = k([2e3, 1]).day(n), o && !this._fullWeekdaysParse[n] && (this._fullWeekdaysParse[n] = new RegExp(\"^\" + this.weekdays(a, \"\").replace(\".\", \"\\\\.?\") + \"$\", \"i\"), this._shortWeekdaysParse[n] = new RegExp(\"^\" + this.weekdaysShort(a, \"\").replace(\".\", \"\\\\.?\") + \"$\", \"i\"), this._minWeekdaysParse[n] = new RegExp(\"^\" + this.weekdaysMin(a, \"\").replace(\".\", \"\\\\.?\") + \"$\", \"i\")), this._weekdaysParse[n] || (d = \"^\" + this.weekdays(a, \"\") + \"|^\" + this.weekdaysShort(a, \"\") + \"|^\" + this.weekdaysMin(a, \"\"), this._weekdaysParse[n] = new RegExp(d.replace(\".\", \"\"), \"i\")), o && \"dddd\" === t && this._fullWeekdaysParse[n].test(e)) return n;\n if (o && \"ddd\" === t && this._shortWeekdaysParse[n].test(e)) return n;\n if (o && \"dd\" === t && this._minWeekdaysParse[n].test(e)) return n;\n if (!o && this._weekdaysParse[n].test(e)) return n;\n }\n }\n\n function Ce() {\n function e(e, t) {\n return t.length - e.length;\n }\n\n var t = [],\n o = [],\n n = [],\n a = [],\n d,\n s,\n r,\n l,\n c;\n\n for (d = 0; 7 > d; d++) s = k([2e3, 1]).day(d), r = this.weekdaysMin(s, \"\"), l = this.weekdaysShort(s, \"\"), c = this.weekdays(s, \"\"), t.push(r), o.push(l), n.push(c), a.push(r), a.push(l), a.push(c);\n\n for (t.sort(e), o.sort(e), n.sort(e), a.sort(e), d = 0; 7 > d; d++) o[d] = te(o[d]), n[d] = te(n[d]), a[d] = te(a[d]);\n\n this._weekdaysRegex = new RegExp(\"^(\" + a.join(\"|\") + \")\", \"i\"), this._weekdaysShortRegex = this._weekdaysRegex, this._weekdaysMinRegex = this._weekdaysRegex, this._weekdaysStrictRegex = new RegExp(\"^(\" + n.join(\"|\") + \")\", \"i\"), this._weekdaysShortStrictRegex = new RegExp(\"^(\" + o.join(\"|\") + \")\", \"i\"), this._weekdaysMinStrictRegex = new RegExp(\"^(\" + t.join(\"|\") + \")\", \"i\");\n }\n\n function Me() {\n return this.hours() % 12 || 12;\n }\n\n function Ie(e, t) {\n q(e, 0, 0, function () {\n return this.localeData().meridiem(this.hours(), this.minutes(), t);\n });\n }\n\n function Pe(e, t) {\n return t._meridiemParse;\n }\n\n function Fe(e) {\n return e ? e.toLowerCase().replace(\"_\", \"-\") : e;\n }\n\n function Ne(e) {\n for (var t = 0, o, n, a, d; t < e.length;) {\n for (d = Fe(e[t]).split(\"-\"), o = d.length, n = Fe(e[t + 1]), n = n ? n.split(\"-\") : null; 0 < o;) {\n if (a = Ye(d.slice(0, o).join(\"-\")), a) return a;\n if (n && n.length >= o && I(d, n, !0) >= o - 1) break;\n o--;\n }\n\n t++;\n }\n\n return Jo;\n }\n\n function Ye(t) {\n var o = null;\n if (!Wo[t] && !0 && e && e.exports) try {\n o = Jo._abbr;\n commonjsRequire$1(\"./locale/\" + t), Re(o);\n } catch (t) {}\n return Wo[t];\n }\n\n function Re(e, t) {\n var o;\n return e && (o = m(t) ? Be(e) : ze(e, t), o ? Jo = o : \"undefined\" != typeof console && console.warn && console.warn(\"Locale \" + e + \" not found. Did you forget to load it?\")), Jo._abbr;\n }\n\n function ze(e, t) {\n if (null !== t) {\n var o = jo,\n n;\n if (t.abbr = e, null != Wo[e]) N(\"defineLocaleOverride\", \"use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info.\"), o = Wo[e]._config;else if (null != t.parentLocale) if (null != Wo[t.parentLocale]) o = Wo[t.parentLocale]._config;else if (n = Ye(t.parentLocale), null != n) o = n._config;else return Uo[t.parentLocale] || (Uo[t.parentLocale] = []), Uo[t.parentLocale].push({\n name: e,\n config: t\n }), null;\n return Wo[e] = new B(z(o, t)), Uo[e] && Uo[e].forEach(function (e) {\n ze(e.name, e.config);\n }), Re(e), Wo[e];\n }\n\n return delete Wo[e], null;\n }\n\n function Be(e) {\n var t;\n if (e && e._locale && e._locale._abbr && (e = e._locale._abbr), !e) return Jo;\n\n if (!u(e)) {\n if (t = Ye(e), t) return t;\n e = [e];\n }\n\n return Ne(e);\n }\n\n function Le() {\n return to(Wo);\n }\n\n function Ae(e) {\n var t = e._a,\n o;\n return t && -2 === x(e).overflow && (o = 0 > t[1] || 11 < t[1] ? 1 : 1 > t[2] || t[2] > pe(t[0], t[1]) ? 2 : 0 > t[3] || 24 < t[3] || 24 === t[3] && (0 !== t[4] || 0 !== t[5] || 0 !== t[6]) ? 3 : 0 > t[4] || 59 < t[4] ? 4 : 0 > t[5] || 59 < t[5] ? 5 : 0 > t[6] || 999 < t[6] ? 6 : -1, x(e)._overflowDayOfYear && (0 > o || 2 < o) && (o = 2), x(e)._overflowWeeks && -1 === o && (o = 7), x(e)._overflowWeekday && -1 === o && (o = 8), x(e).overflow = o), e;\n }\n\n function He(e, t, o) {\n return null == e ? null == t ? o : t : e;\n }\n\n function je(e) {\n var t = new Date(l.now());\n return e._useUTC ? [t.getUTCFullYear(), t.getUTCMonth(), t.getUTCDate()] : [t.getFullYear(), t.getMonth(), t.getDate()];\n }\n\n function We(e) {\n var t = [],\n o,\n n,\n a,\n d,\n s;\n\n if (!e._d) {\n for (a = je(e), e._w && null == e._a[2] && null == e._a[1] && Ue(e), null != e._dayOfYear && (s = He(e._a[0], a[0]), (e._dayOfYear > ae(s) || 0 === e._dayOfYear) && (x(e)._overflowDayOfYear = !0), n = _e(s, 0, e._dayOfYear), e._a[1] = n.getUTCMonth(), e._a[2] = n.getUTCDate()), o = 0; 3 > o && null == e._a[o]; ++o) e._a[o] = t[o] = a[o];\n\n for (; 7 > o; o++) e._a[o] = t[o] = null == e._a[o] ? 2 === o ? 1 : 0 : e._a[o];\n\n 24 === e._a[3] && 0 === e._a[4] && 0 === e._a[5] && 0 === e._a[6] && (e._nextDay = !0, e._a[3] = 0), e._d = (e._useUTC ? _e : be).apply(null, t), d = e._useUTC ? e._d.getUTCDay() : e._d.getDay(), null != e._tzm && e._d.setUTCMinutes(e._d.getUTCMinutes() - e._tzm), e._nextDay && (e._a[3] = 24), e._w && \"undefined\" != typeof e._w.d && e._w.d !== d && (x(e).weekdayMismatch = !0);\n }\n }\n\n function Ue(e) {\n var t, o, n, i, a, d, s, r;\n if (t = e._w, null != t.GG || null != t.W || null != t.E) a = 1, d = 4, o = He(t.GG, e._a[0], we(st(), 1, 4).year), n = He(t.W, 1), i = He(t.E, 1), (1 > i || 7 < i) && (r = !0);else {\n a = e._locale._week.dow, d = e._locale._week.doy;\n var l = we(st(), a, d);\n o = He(t.gg, e._a[0], l.year), n = He(t.w, l.week), null == t.d ? null == t.e ? i = a : (i = t.e + a, (0 > t.e || 6 < t.e) && (r = !0)) : (i = t.d, (0 > i || 6 < i) && (r = !0));\n }\n 1 > n || n > xe(o, a, d) ? x(e)._overflowWeeks = !0 : null == r ? (s = ke(o, n, i, a, d), e._a[0] = s.year, e._dayOfYear = s.dayOfYear) : x(e)._overflowWeekday = !0;\n }\n\n function Ve(e) {\n var t = e._i,\n o = Vo.exec(t) || Go.exec(t),\n n,\n a,\n d,\n s,\n r,\n c;\n\n if (o) {\n for (x(e).iso = !0, n = 0, a = Xo.length; n < a; n++) if (Xo[n][1].exec(o[1])) {\n s = Xo[n][0], d = !1 !== Xo[n][2];\n break;\n }\n\n if (null == s) return void (e._isValid = !1);\n\n if (o[3]) {\n for (n = 0, a = Zo.length; n < a; n++) if (Zo[n][1].exec(o[3])) {\n r = (o[2] || \" \") + Zo[n][0];\n break;\n }\n\n if (null == r) return void (e._isValid = !1);\n }\n\n if (!d && null != r) return void (e._isValid = !1);\n if (o[4]) if (qo.exec(o[4])) c = \"Z\";else return void (e._isValid = !1);\n e._f = s + (r || \"\") + (c || \"\"), Je(e);\n } else e._isValid = !1;\n }\n\n function Ge(e, t, o, n, i, a) {\n var d = [qe(e), Bo.indexOf(t), parseInt(o, 10), parseInt(n, 10), parseInt(i, 10)];\n return a && d.push(parseInt(a, 10)), d;\n }\n\n function qe(e) {\n var t = parseInt(e, 10);\n return 49 >= t ? 2e3 + t : 999 >= t ? 1900 + t : t;\n }\n\n function Xe(e) {\n return e.replace(/\\([^)]*\\)|[\\n\\t]/g, \" \").replace(/(\\s\\s+)/g, \" \").replace(/^\\s\\s*/, \"\").replace(/\\s\\s*$/, \"\");\n }\n\n function Ze(e, t, o) {\n if (e) {\n var n = Lo.indexOf(e),\n i = new Date(t[0], t[1], t[2]).getDay();\n if (n !== i) return x(o).weekdayMismatch = !0, o._isValid = !1, !1;\n }\n\n return !0;\n }\n\n function $e(e, t, o) {\n if (e) return Qo[e];\n if (t) return 0;\n var n = parseInt(o, 10),\n i = n % 100;\n return 60 * ((n - i) / 100) + i;\n }\n\n function Ke(e) {\n var t = Ko.exec(Xe(e._i));\n\n if (t) {\n var o = Ge(t[4], t[3], t[2], t[5], t[6], t[7]);\n if (!Ze(t[1], o, e)) return;\n e._a = o, e._tzm = $e(t[8], t[9], t[10]), e._d = _e.apply(null, e._a), e._d.setUTCMinutes(e._d.getUTCMinutes() - e._tzm), x(e).rfc2822 = !0;\n } else e._isValid = !1;\n }\n\n function Qe(e) {\n var t = $o.exec(e._i);\n if (null !== t) return void (e._d = new Date(+t[1]));\n if (Ve(e), !1 === e._isValid) delete e._isValid;else return;\n if (Ke(e), !1 === e._isValid) delete e._isValid;else return;\n l.createFromInputFallback(e);\n }\n\n function Je(e) {\n if (e._f === l.ISO_8601) return void Ve(e);\n if (e._f === l.RFC_2822) return void Ke(e);\n e._a = [], x(e).empty = !0;\n var t = \"\" + e._i,\n o = t.length,\n n = 0,\n a,\n d,\n s,\n r,\n c;\n\n for (s = K(e._f, e._locale).match(ao) || [], a = 0; a < s.length; a++) r = s[a], d = (t.match(J(r, e)) || [])[0], d && (c = t.substr(0, t.indexOf(d)), 0 < c.length && x(e).unusedInput.push(c), t = t.slice(t.indexOf(d) + d.length), n += d.length), lo[r] ? (d ? x(e).empty = !1 : x(e).unusedTokens.push(r), ie(r, d, e)) : e._strict && !d && x(e).unusedTokens.push(r);\n\n x(e).charsLeftOver = o - n, 0 < t.length && x(e).unusedInput.push(t), 12 >= e._a[3] && !0 === x(e).bigHour && 0 < e._a[3] && (x(e).bigHour = void 0), x(e).parsedDateParts = e._a.slice(0), x(e).meridiem = e._meridiem, e._a[3] = et(e._locale, e._a[3], e._meridiem), We(e), Ae(e);\n }\n\n function et(e, t, o) {\n var n;\n return null == o ? t : null == e.meridiemHour ? null == e.isPM ? t : (n = e.isPM(o), n && 12 > t && (t += 12), n || 12 !== t || (t = 0), t) : e.meridiemHour(t, o);\n }\n\n function tt(e) {\n var t, o, n, a, d;\n if (0 === e._f.length) return x(e).invalidFormat = !0, void (e._d = new Date(NaN));\n\n for (a = 0; a < e._f.length; a++) (d = 0, t = D({}, e), null != e._useUTC && (t._useUTC = e._useUTC), t._f = e._f[a], Je(t), !!S(t)) && (d += x(t).charsLeftOver, d += 10 * x(t).unusedTokens.length, x(t).score = d, (null == n || d < n) && (n = d, o = t));\n\n v(e, o || t);\n }\n\n function ot(e) {\n if (!e._d) {\n var t = W(e._i);\n e._a = f([t.year, t.month, t.day || t.date, t.hour, t.minute, t.second, t.millisecond], function (e) {\n return e && parseInt(e, 10);\n }), We(e);\n }\n }\n\n function nt(e) {\n var t = new T(Ae(it(e)));\n return t._nextDay && (t.add(1, \"d\"), t._nextDay = void 0), t;\n }\n\n function it(e) {\n var t = e._i,\n o = e._f;\n return (e._locale = e._locale || Be(e._l), null === t || void 0 === o && \"\" === t) ? O({\n nullInput: !0\n }) : (\"string\" == typeof t && (e._i = t = e._locale.preparse(t)), E(t)) ? new T(Ae(t)) : (y(t) ? e._d = t : u(o) ? tt(e) : o ? Je(e) : at(e), S(e) || (e._d = null), e);\n }\n\n function at(e) {\n var t = e._i;\n m(t) ? e._d = new Date(l.now()) : y(t) ? e._d = new Date(t.valueOf()) : \"string\" == typeof t ? Qe(e) : u(t) ? (e._a = f(t.slice(0), function (e) {\n return parseInt(e, 10);\n }), We(e)) : p(t) ? ot(e) : g(t) ? e._d = new Date(t) : l.createFromInputFallback(e);\n }\n\n function dt(e, t, o, n, i) {\n var a = {};\n return (!0 === o || !1 === o) && (n = o, o = void 0), (p(e) && h(e) || u(e) && 0 === e.length) && (e = void 0), a._isAMomentObject = !0, a._useUTC = a._isUTC = i, a._l = o, a._i = e, a._f = t, a._strict = n, nt(a);\n }\n\n function st(e, t, o, n) {\n return dt(e, t, o, n, !1);\n }\n\n function rt(e, t) {\n var o, n;\n if (1 === t.length && u(t[0]) && (t = t[0]), !t.length) return st();\n\n for (o = t[0], n = 1; n < t.length; ++n) (!t[n].isValid() || t[n][e](o)) && (o = t[n]);\n\n return o;\n }\n\n function lt(e) {\n for (var t in e) if (-1 === Ro.call(on, t) || null != e[t] && isNaN(e[t])) return !1;\n\n for (var o = !1, n = 0; n < on.length; ++n) if (e[on[n]]) {\n if (o) return !1;\n parseFloat(e[on[n]]) !== M(e[on[n]]) && (o = !0);\n }\n\n return !0;\n }\n\n function ct(e) {\n var t = W(e),\n o = t.year || 0,\n n = t.quarter || 0,\n i = t.month || 0,\n a = t.week || t.isoWeek || 0,\n d = t.day || 0,\n s = t.hour || 0,\n r = t.minute || 0,\n l = t.second || 0,\n c = t.millisecond || 0;\n this._isValid = lt(t), this._milliseconds = +c + 1e3 * l + 6e4 * r + 60 * (60 * (1e3 * s)), this._days = +d + 7 * a, this._months = +i + 3 * n + 12 * o, this._data = {}, this._locale = Be(), this._bubble();\n }\n\n function ut(e) {\n return e instanceof ct;\n }\n\n function pt(e) {\n return 0 > e ? -1 * t(-1 * e) : t(e);\n }\n\n function ht(e, t) {\n q(e, 0, 0, function () {\n var e = this.utcOffset(),\n o = \"+\";\n return 0 > e && (e = -e, o = \"-\"), o + G(~~(e / 60), 2) + t + G(~~e % 60, 2);\n });\n }\n\n function mt(e, t) {\n var o = (t || \"\").match(e);\n if (null === o) return null;\n var n = o[o.length - 1] || [],\n i = (n + \"\").match(nn) || [\"-\", 0, 0],\n a = +(60 * i[1]) + M(i[2]);\n return 0 === a ? 0 : \"+\" === i[0] ? a : -a;\n }\n\n function gt(e, t) {\n var o, n;\n return t._isUTC ? (o = t.clone(), n = (E(e) || y(e) ? e.valueOf() : st(e).valueOf()) - o.valueOf(), o._d.setTime(o._d.valueOf() + n), l.updateOffset(o, !1), o) : st(e).local();\n }\n\n function yt(e) {\n return 15 * -t(e._d.getTimezoneOffset() / 15);\n }\n\n function ft() {\n if (!m(this._isDSTShifted)) return this._isDSTShifted;\n var e = {};\n\n if (D(e, this), e = it(e), e._a) {\n var t = e._isUTC ? k(e._a) : st(e._a);\n this._isDSTShifted = this.isValid() && 0 < I(e._a, t.toArray());\n } else this._isDSTShifted = !1;\n\n return this._isDSTShifted;\n }\n\n function bt() {\n return !!this.isValid() && this._isUTC && 0 === this._offset;\n }\n\n function _t(e, t) {\n var o = e,\n n = null,\n i,\n a,\n d;\n return ut(e) ? o = {\n ms: e._milliseconds,\n d: e._days,\n M: e._months\n } : g(e) ? (o = {}, t ? o[t] = e : o.milliseconds = e) : (n = an.exec(e)) ? (i = \"-\" === n[1] ? -1 : 1, o = {\n y: 0,\n d: M(n[2]) * i,\n h: M(n[3]) * i,\n m: M(n[4]) * i,\n s: M(n[5]) * i,\n ms: M(pt(1e3 * n[6])) * i\n }) : (n = dn.exec(e)) ? (i = \"-\" === n[1] ? -1 : 1, o = {\n y: vt(n[2], i),\n M: vt(n[3], i),\n w: vt(n[4], i),\n d: vt(n[5], i),\n h: vt(n[6], i),\n m: vt(n[7], i),\n s: vt(n[8], i)\n }) : null == o ? o = {} : \"object\" == typeof o && ((\"from\" in o) || (\"to\" in o)) && (d = wt(st(o.from), st(o.to)), o = {}, o.ms = d.milliseconds, o.M = d.months), a = new ct(o), ut(e) && _(e, \"_locale\") && (a._locale = e._locale), a;\n }\n\n function vt(e, t) {\n var o = e && parseFloat(e.replace(\",\", \".\"));\n return (isNaN(o) ? 0 : o) * t;\n }\n\n function kt(e, t) {\n var o = {};\n return o.months = t.month() - e.month() + 12 * (t.year() - e.year()), e.clone().add(o.months, \"M\").isAfter(t) && --o.months, o.milliseconds = +t - +e.clone().add(o.months, \"M\"), o;\n }\n\n function wt(e, t) {\n var o;\n return e.isValid() && t.isValid() ? (t = gt(t, e), e.isBefore(t) ? o = kt(e, t) : (o = kt(t, e), o.milliseconds = -o.milliseconds, o.months = -o.months), o) : {\n milliseconds: 0,\n months: 0\n };\n }\n\n function xt(e, t) {\n return function (o, n) {\n var i, a;\n return null === n || isNaN(+n) || (N(t, \"moment().\" + t + \"(period, number) is deprecated. Please use moment().\" + t + \"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.\"), a = o, o = n, n = a), o = \"string\" == typeof o ? +o : o, i = _t(o, n), St(this, i, e), this;\n };\n }\n\n function St(e, t, o, n) {\n var i = t._milliseconds,\n a = pt(t._days),\n d = pt(t._months);\n e.isValid() && (n = null == n || n, d && ge(e, re(e, \"Month\") + d * o), a && le(e, \"Date\", re(e, \"Date\") + a * o), i && e._d.setTime(e._d.valueOf() + i * o), n && l.updateOffset(e, a || d));\n }\n\n function Ot(e, t) {\n var o = 12 * (t.year() - e.year()) + (t.month() - e.month()),\n n = e.clone().add(o, \"months\"),\n i,\n a;\n return 0 > t - n ? (i = e.clone().add(o - 1, \"months\"), a = (t - n) / (n - i)) : (i = e.clone().add(o + 1, \"months\"), a = (t - n) / (i - n)), -(o + a) || 0;\n }\n\n function Dt(e) {\n var t;\n return void 0 === e ? this._locale._abbr : (t = Be(e), null != t && (this._locale = t), this);\n }\n\n function Tt() {\n return this._locale;\n }\n\n function Et(e, t) {\n return (e % t + t) % t;\n }\n\n function Ct(e, t, o) {\n return 100 > e && 0 <= e ? new Date(e + 400, t, o) - 12622780800000 : new Date(e, t, o).valueOf();\n }\n\n function Mt(e, t, o) {\n return 100 > e && 0 <= e ? Date.UTC(e + 400, t, o) - 12622780800000 : Date.UTC(e, t, o);\n }\n\n function It(e, t) {\n q(0, [e, e.length], 0, t);\n }\n\n function Pt(e, t, o, n, i) {\n var a;\n return null == e ? we(this, n, i).year : (a = xe(e, n, i), t > a && (t = a), Ft.call(this, e, t, o, n, i));\n }\n\n function Ft(e, t, o, n, i) {\n var a = ke(e, t, o, n, i),\n d = _e(a.year, 0, a.dayOfYear);\n\n return this.year(d.getUTCFullYear()), this.month(d.getUTCMonth()), this.date(d.getUTCDate()), this;\n }\n\n function Nt(e, t) {\n t[6] = M(1e3 * (\"0.\" + e));\n }\n\n function Yt(e) {\n return e;\n }\n\n function Rt(e, t, o, n) {\n var i = Be(),\n a = k().set(n, t);\n return i[o](a, e);\n }\n\n function zt(e, t, o) {\n if (g(e) && (t = e, e = void 0), e = e || \"\", null != t) return Rt(e, t, o, \"month\");\n var n = [],\n a;\n\n for (a = 0; 12 > a; a++) n[a] = Rt(e, a, o, \"month\");\n\n return n;\n }\n\n function Bt(e, t, o, n) {\n \"boolean\" == typeof e ? (g(t) && (o = t, t = void 0), t = t || \"\") : (t = e, o = t, e = !1, g(t) && (o = t, t = void 0), t = t || \"\");\n var a = Be(),\n d = e ? a._week.dow : 0;\n if (null != o) return Rt(t, (o + d) % 7, n, \"day\");\n var s = [],\n r;\n\n for (r = 0; 7 > r; r++) s[r] = Rt(t, (r + d) % 7, n, \"day\");\n\n return s;\n }\n\n function Lt(e, t, o, n) {\n var i = _t(t, o);\n\n return e._milliseconds += n * i._milliseconds, e._days += n * i._days, e._months += n * i._months, e._bubble();\n }\n\n function At(e) {\n return 0 > e ? s(e) : r(e);\n }\n\n function Ht(e) {\n return 4800 * e / 146097;\n }\n\n function jt(e) {\n return 146097 * e / 4800;\n }\n\n function Wt(e) {\n return function () {\n return this.as(e);\n };\n }\n\n function Ut(e) {\n return function () {\n return this.isValid() ? this._data[e] : NaN;\n };\n }\n\n function Vt(e, t, o, n, i) {\n return i.relativeTime(t || 1, !!o, e, n);\n }\n\n function Gt(e, t, o) {\n var n = _t(e).abs(),\n i = Nn(n.as(\"s\")),\n d = Nn(n.as(\"m\")),\n s = Nn(n.as(\"h\")),\n r = Nn(n.as(\"d\")),\n l = Nn(n.as(\"M\")),\n c = Nn(n.as(\"y\")),\n u = i <= Yn.ss && [\"s\", i] || i < Yn.s && [\"ss\", i] || 1 >= d && [\"m\"] || d < Yn.m && [\"mm\", d] || 1 >= s && [\"h\"] || s < Yn.h && [\"hh\", s] || 1 >= r && [\"d\"] || r < Yn.d && [\"dd\", r] || 1 >= l && [\"M\"] || l < Yn.M && [\"MM\", l] || 1 >= c && [\"y\"] || [\"yy\", c];\n\n return u[2] = t, u[3] = 0 < +e, u[4] = o, Vt.apply(null, u);\n }\n\n function qt(e) {\n return void 0 === e ? Nn : \"function\" == typeof e && (Nn = e, !0);\n }\n\n function Xt(e) {\n return (0 < e) - (0 > e) || +e;\n }\n\n function Zt() {\n if (!this.isValid()) return this.localeData().invalidDate();\n var e = Rn(this._milliseconds) / 1e3,\n t = Rn(this._days),\n o = Rn(this._months),\n n,\n i,\n a;\n n = C(e / 60), i = C(n / 60), e %= 60, n %= 60, a = C(o / 12), o %= 12;\n var d = a,\n r = o,\n l = t,\n c = i,\n u = n,\n p = e ? e.toFixed(3).replace(/\\.?0+$/, \"\") : \"\",\n s = this.asSeconds();\n if (!s) return \"P0D\";\n var h = 0 > s ? \"-\" : \"\",\n m = Xt(this._months) === Xt(s) ? \"\" : \"-\",\n g = Xt(this._days) === Xt(s) ? \"\" : \"-\",\n y = Xt(this._milliseconds) === Xt(s) ? \"\" : \"-\";\n return h + \"P\" + (d ? m + d + \"Y\" : \"\") + (r ? m + r + \"M\" : \"\") + (l ? g + l + \"D\" : \"\") + (c || u || p ? \"T\" : \"\") + (c ? y + c + \"H\" : \"\") + (u ? y + u + \"M\" : \"\") + (p ? y + p + \"S\" : \"\");\n }\n\n var $t, Kt;\n Kt = Array.prototype.some ? Array.prototype.some : function (e) {\n for (var o = Object(this), t = o.length >>> 0, n = 0; n < t; n++) if ((n in o) && e.call(this, o[n], n, o)) return !0;\n\n return !1;\n };\n var Qt = l.momentProperties = [],\n Jt = !1,\n eo = {};\n l.suppressDeprecationWarnings = !1, l.deprecationHandler = null;\n var to = Object.keys ? Object.keys : function (e) {\n var t = [],\n o;\n\n for (o in e) _(e, o) && t.push(o);\n\n return t;\n };\n var oo = /\\d{1,2}/,\n no = {},\n io = {},\n ao = /(\\[[^\\[]*\\])|(\\\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,\n so = /(\\[[^\\[]*\\])|(\\\\)?(LTS|LT|LL?L?L?|l{1,4})/g,\n ro = {},\n lo = {},\n co = /\\d/,\n uo = /\\d\\d/,\n po = /\\d{3}/,\n ho = /\\d{4}/,\n mo = /[+-]?\\d{6}/,\n go = /\\d\\d?/,\n yo = /\\d\\d\\d\\d?/,\n fo = /\\d\\d\\d\\d\\d\\d?/,\n bo = /\\d{1,3}/,\n _o = /\\d{1,4}/,\n vo = /[+-]?\\d{1,6}/,\n ko = /\\d+/,\n wo = /[+-]?\\d+/,\n xo = /Z|[+-]\\d\\d:?\\d\\d/gi,\n So = /Z|[+-]\\d\\d(?::?\\d\\d)?/gi,\n Oo = /[+-]?\\d+(\\.\\d{1,3})?/,\n Do = /[0-9]{0,256}['a-z\\u00A0-\\u05FF\\u0700-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFF07\\uFF10-\\uFFEF]{1,256}|[\\u0600-\\u06FF\\/]{1,256}(\\s*?[\\u0600-\\u06FF]{1,256}){1,2}/i,\n To = {},\n Eo = {},\n Co = 0,\n Mo = 1,\n Io = 2,\n Po = 3,\n Fo = 4,\n No = 5;\n q(\"Y\", 0, 0, function () {\n var e = this.year();\n return 9999 >= e ? \"\" + e : \"+\" + e;\n }), q(0, [\"YY\", 2], 0, function () {\n return this.year() % 100;\n }), q(0, [\"YYYY\", 4], 0, \"year\"), q(0, [\"YYYYY\", 5], 0, \"year\"), q(0, [\"YYYYYY\", 6, !0], 0, \"year\"), H(\"year\", \"y\"), U(\"year\", 1), Q(\"Y\", wo), Q(\"YY\", go, uo), Q(\"YYYY\", _o, ho), Q(\"YYYYY\", vo, mo), Q(\"YYYYYY\", vo, mo), oe([\"YYYYY\", \"YYYYYY\"], Co), oe(\"YYYY\", function (e, t) {\n t[Co] = 2 === e.length ? l.parseTwoDigitYear(e) : M(e);\n }), oe(\"YY\", function (e, t) {\n t[Co] = l.parseTwoDigitYear(e);\n }), oe(\"Y\", function (e, t) {\n t[Co] = parseInt(e, 10);\n }), l.parseTwoDigitYear = function (e) {\n return M(e) + (68 < M(e) ? 1900 : 2e3);\n };\n var Yo = se(\"FullYear\", !0),\n Ro;\n Ro = Array.prototype.indexOf ? Array.prototype.indexOf : function (e) {\n var t;\n\n for (t = 0; t < this.length; ++t) if (this[t] === e) return t;\n\n return -1;\n }, q(\"M\", [\"MM\", 2], \"Mo\", function () {\n return this.month() + 1;\n }), q(\"MMM\", 0, 0, function (e) {\n return this.localeData().monthsShort(this, e);\n }), q(\"MMMM\", 0, 0, function (e) {\n return this.localeData().months(this, e);\n }), H(\"month\", \"M\"), U(\"month\", 8), Q(\"M\", go), Q(\"MM\", go, uo), Q(\"MMM\", function (e, t) {\n return t.monthsShortRegex(e);\n }), Q(\"MMMM\", function (e, t) {\n return t.monthsRegex(e);\n }), oe([\"M\", \"MM\"], function (e, t) {\n t[Mo] = M(e) - 1;\n }), oe([\"MMM\", \"MMMM\"], function (e, t, o, n) {\n var i = o._locale.monthsParse(e, n, o._strict);\n\n null == i ? x(o).invalidMonth = e : t[Mo] = i;\n });\n var zo = /D[oD]?(\\[[^\\[\\]]*\\]|\\s)+MMMM?/,\n Bo = [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"];\n q(\"w\", [\"ww\", 2], \"wo\", \"week\"), q(\"W\", [\"WW\", 2], \"Wo\", \"isoWeek\"), H(\"week\", \"w\"), H(\"isoWeek\", \"W\"), U(\"week\", 5), U(\"isoWeek\", 5), Q(\"w\", go), Q(\"ww\", go, uo), Q(\"W\", go), Q(\"WW\", go, uo), ne([\"w\", \"ww\", \"W\", \"WW\"], function (e, t, o, n) {\n t[n.substr(0, 1)] = M(e);\n });\n q(\"d\", 0, \"do\", \"day\"), q(\"dd\", 0, 0, function (e) {\n return this.localeData().weekdaysMin(this, e);\n }), q(\"ddd\", 0, 0, function (e) {\n return this.localeData().weekdaysShort(this, e);\n }), q(\"dddd\", 0, 0, function (e) {\n return this.localeData().weekdays(this, e);\n }), q(\"e\", 0, 0, \"weekday\"), q(\"E\", 0, 0, \"isoWeekday\"), H(\"day\", \"d\"), H(\"weekday\", \"e\"), H(\"isoWeekday\", \"E\"), U(\"day\", 11), U(\"weekday\", 11), U(\"isoWeekday\", 11), Q(\"d\", go), Q(\"e\", go), Q(\"E\", go), Q(\"dd\", function (e, t) {\n return t.weekdaysMinRegex(e);\n }), Q(\"ddd\", function (e, t) {\n return t.weekdaysShortRegex(e);\n }), Q(\"dddd\", function (e, t) {\n return t.weekdaysRegex(e);\n }), ne([\"dd\", \"ddd\", \"dddd\"], function (e, t, o, n) {\n var i = o._locale.weekdaysParse(e, n, o._strict);\n\n null == i ? x(o).invalidWeekday = e : t.d = i;\n }), ne([\"d\", \"e\", \"E\"], function (e, t, o, n) {\n t[n] = M(e);\n });\n var Lo = [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"];\n q(\"H\", [\"HH\", 2], 0, \"hour\"), q(\"h\", [\"hh\", 2], 0, Me), q(\"k\", [\"kk\", 2], 0, function () {\n return this.hours() || 24;\n }), q(\"hmm\", 0, 0, function () {\n return \"\" + Me.apply(this) + G(this.minutes(), 2);\n }), q(\"hmmss\", 0, 0, function () {\n return \"\" + Me.apply(this) + G(this.minutes(), 2) + G(this.seconds(), 2);\n }), q(\"Hmm\", 0, 0, function () {\n return \"\" + this.hours() + G(this.minutes(), 2);\n }), q(\"Hmmss\", 0, 0, function () {\n return \"\" + this.hours() + G(this.minutes(), 2) + G(this.seconds(), 2);\n }), Ie(\"a\", !0), Ie(\"A\", !1), H(\"hour\", \"h\"), U(\"hour\", 13), Q(\"a\", Pe), Q(\"A\", Pe), Q(\"H\", go), Q(\"h\", go), Q(\"k\", go), Q(\"HH\", go, uo), Q(\"hh\", go, uo), Q(\"kk\", go, uo), Q(\"hmm\", yo), Q(\"hmmss\", fo), Q(\"Hmm\", yo), Q(\"Hmmss\", fo), oe([\"H\", \"HH\"], Po), oe([\"k\", \"kk\"], function (e, t) {\n var o = M(e);\n t[Po] = 24 === o ? 0 : o;\n }), oe([\"a\", \"A\"], function (e, t, o) {\n o._isPm = o._locale.isPM(e), o._meridiem = e;\n }), oe([\"h\", \"hh\"], function (e, t, o) {\n t[Po] = M(e), x(o).bigHour = !0;\n }), oe(\"hmm\", function (e, t, o) {\n var n = e.length - 2;\n t[Po] = M(e.substr(0, n)), t[Fo] = M(e.substr(n)), x(o).bigHour = !0;\n }), oe(\"hmmss\", function (e, t, o) {\n var n = e.length - 4,\n i = e.length - 2;\n t[Po] = M(e.substr(0, n)), t[Fo] = M(e.substr(n, 2)), t[No] = M(e.substr(i)), x(o).bigHour = !0;\n }), oe(\"Hmm\", function (e, t) {\n var o = e.length - 2;\n t[Po] = M(e.substr(0, o)), t[Fo] = M(e.substr(o));\n }), oe(\"Hmmss\", function (e, t) {\n var o = e.length - 4,\n n = e.length - 2;\n t[Po] = M(e.substr(0, o)), t[Fo] = M(e.substr(o, 2)), t[No] = M(e.substr(n));\n });\n var Ao = /[ap]\\.?m?\\.?/i,\n Ho = se(\"Hours\", !0),\n jo = {\n calendar: {\n sameDay: \"[Today at] LT\",\n nextDay: \"[Tomorrow at] LT\",\n nextWeek: \"dddd [at] LT\",\n lastDay: \"[Yesterday at] LT\",\n lastWeek: \"[Last] dddd [at] LT\",\n sameElse: \"L\"\n },\n longDateFormat: {\n LTS: \"h:mm:ss A\",\n LT: \"h:mm A\",\n L: \"MM/DD/YYYY\",\n LL: \"MMMM D, YYYY\",\n LLL: \"MMMM D, YYYY h:mm A\",\n LLLL: \"dddd, MMMM D, YYYY h:mm A\"\n },\n invalidDate: \"Invalid date\",\n ordinal: \"%d\",\n dayOfMonthOrdinalParse: oo,\n relativeTime: {\n future: \"in %s\",\n past: \"%s ago\",\n s: \"a few seconds\",\n ss: \"%d seconds\",\n m: \"a minute\",\n mm: \"%d minutes\",\n h: \"an hour\",\n hh: \"%d hours\",\n d: \"a day\",\n dd: \"%d days\",\n M: \"a month\",\n MM: \"%d months\",\n y: \"a year\",\n yy: \"%d years\"\n },\n months: [\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"],\n monthsShort: Bo,\n week: {\n dow: 0,\n doy: 6\n },\n weekdays: [\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"],\n weekdaysMin: [\"Su\", \"Mo\", \"Tu\", \"We\", \"Th\", \"Fr\", \"Sa\"],\n weekdaysShort: Lo,\n meridiemParse: Ao\n },\n Wo = {},\n Uo = {},\n Vo = /^\\s*((?:[+-]\\d{6}|\\d{4})-(?:\\d\\d-\\d\\d|W\\d\\d-\\d|W\\d\\d|\\d\\d\\d|\\d\\d))(?:(T| )(\\d\\d(?::\\d\\d(?::\\d\\d(?:[.,]\\d+)?)?)?)([\\+\\-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,\n Go = /^\\s*((?:[+-]\\d{6}|\\d{4})(?:\\d\\d\\d\\d|W\\d\\d\\d|W\\d\\d|\\d\\d\\d|\\d\\d))(?:(T| )(\\d\\d(?:\\d\\d(?:\\d\\d(?:[.,]\\d+)?)?)?)([\\+\\-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,\n qo = /Z|[+-]\\d\\d(?::?\\d\\d)?/,\n Xo = [[\"YYYYYY-MM-DD\", /[+-]\\d{6}-\\d\\d-\\d\\d/], [\"YYYY-MM-DD\", /\\d{4}-\\d\\d-\\d\\d/], [\"GGGG-[W]WW-E\", /\\d{4}-W\\d\\d-\\d/], [\"GGGG-[W]WW\", /\\d{4}-W\\d\\d/, !1], [\"YYYY-DDD\", /\\d{4}-\\d{3}/], [\"YYYY-MM\", /\\d{4}-\\d\\d/, !1], [\"YYYYYYMMDD\", /[+-]\\d{10}/], [\"YYYYMMDD\", /\\d{8}/], [\"GGGG[W]WWE\", /\\d{4}W\\d{3}/], [\"GGGG[W]WW\", /\\d{4}W\\d{2}/, !1], [\"YYYYDDD\", /\\d{7}/]],\n Zo = [[\"HH:mm:ss.SSSS\", /\\d\\d:\\d\\d:\\d\\d\\.\\d+/], [\"HH:mm:ss,SSSS\", /\\d\\d:\\d\\d:\\d\\d,\\d+/], [\"HH:mm:ss\", /\\d\\d:\\d\\d:\\d\\d/], [\"HH:mm\", /\\d\\d:\\d\\d/], [\"HHmmss.SSSS\", /\\d\\d\\d\\d\\d\\d\\.\\d+/], [\"HHmmss,SSSS\", /\\d\\d\\d\\d\\d\\d,\\d+/], [\"HHmmss\", /\\d\\d\\d\\d\\d\\d/], [\"HHmm\", /\\d\\d\\d\\d/], [\"HH\", /\\d\\d/]],\n $o = /^\\/?Date\\((\\-?\\d+)/i,\n Ko = /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\\s)?(\\d{1,2})\\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\\s(\\d{2,4})\\s(\\d\\d):(\\d\\d)(?::(\\d\\d))?\\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\\d{4}))$/,\n Qo = {\n UT: 0,\n GMT: 0,\n EDT: -240,\n EST: -300,\n CDT: -300,\n CST: -360,\n MDT: -360,\n MST: -420,\n PDT: -420,\n PST: -480\n },\n Jo;\n l.createFromInputFallback = F(\"value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.\", function (e) {\n e._d = new Date(e._i + (e._useUTC ? \" UTC\" : \"\"));\n }), l.ISO_8601 = function () {}, l.RFC_2822 = function () {};\n var en = F(\"moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/\", function () {\n var e = st.apply(null, arguments);\n return this.isValid() && e.isValid() ? e < this ? this : e : O();\n }),\n tn = F(\"moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/\", function () {\n var e = st.apply(null, arguments);\n return this.isValid() && e.isValid() ? e > this ? this : e : O();\n }),\n on = [\"year\", \"quarter\", \"month\", \"week\", \"day\", \"hour\", \"minute\", \"second\", \"millisecond\"];\n ht(\"Z\", \":\"), ht(\"ZZ\", \"\"), Q(\"Z\", So), Q(\"ZZ\", So), oe([\"Z\", \"ZZ\"], function (e, t, o) {\n o._useUTC = !0, o._tzm = mt(So, e);\n });\n var nn = /([\\+\\-]|\\d\\d)/gi;\n\n l.updateOffset = function () {};\n\n var an = /^(\\-|\\+)?(?:(\\d*)[. ])?(\\d+)\\:(\\d+)(?:\\:(\\d+)(\\.\\d*)?)?$/,\n dn = /^(-|\\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;\n _t.fn = ct.prototype, _t.invalid = function () {\n return _t(NaN);\n };\n var sn = xt(1, \"add\"),\n rn = xt(-1, \"subtract\");\n l.defaultFormat = \"YYYY-MM-DDTHH:mm:ssZ\", l.defaultFormatUtc = \"YYYY-MM-DDTHH:mm:ss[Z]\";\n var ln = F(\"moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.\", function (e) {\n return void 0 === e ? this.localeData() : this.locale(e);\n });\n q(0, [\"gg\", 2], 0, function () {\n return this.weekYear() % 100;\n }), q(0, [\"GG\", 2], 0, function () {\n return this.isoWeekYear() % 100;\n }), It(\"gggg\", \"weekYear\"), It(\"ggggg\", \"weekYear\"), It(\"GGGG\", \"isoWeekYear\"), It(\"GGGGG\", \"isoWeekYear\"), H(\"weekYear\", \"gg\"), H(\"isoWeekYear\", \"GG\"), U(\"weekYear\", 1), U(\"isoWeekYear\", 1), Q(\"G\", wo), Q(\"g\", wo), Q(\"GG\", go, uo), Q(\"gg\", go, uo), Q(\"GGGG\", _o, ho), Q(\"gggg\", _o, ho), Q(\"GGGGG\", vo, mo), Q(\"ggggg\", vo, mo), ne([\"gggg\", \"ggggg\", \"GGGG\", \"GGGGG\"], function (e, t, o, n) {\n t[n.substr(0, 2)] = M(e);\n }), ne([\"gg\", \"GG\"], function (e, t, o, n) {\n t[n] = l.parseTwoDigitYear(e);\n }), q(\"Q\", 0, \"Qo\", \"quarter\"), H(\"quarter\", \"Q\"), U(\"quarter\", 7), Q(\"Q\", co), oe(\"Q\", function (e, t) {\n t[Mo] = 3 * (M(e) - 1);\n }), q(\"D\", [\"DD\", 2], \"Do\", \"date\"), H(\"date\", \"D\"), U(\"date\", 9), Q(\"D\", go), Q(\"DD\", go, uo), Q(\"Do\", function (e, t) {\n return e ? t._dayOfMonthOrdinalParse || t._ordinalParse : t._dayOfMonthOrdinalParseLenient;\n }), oe([\"D\", \"DD\"], Io), oe(\"Do\", function (e, t) {\n t[Io] = M(e.match(go)[0]);\n });\n var cn = se(\"Date\", !0);\n q(\"DDD\", [\"DDDD\", 3], \"DDDo\", \"dayOfYear\"), H(\"dayOfYear\", \"DDD\"), U(\"dayOfYear\", 4), Q(\"DDD\", bo), Q(\"DDDD\", po), oe([\"DDD\", \"DDDD\"], function (e, t, o) {\n o._dayOfYear = M(e);\n }), q(\"m\", [\"mm\", 2], 0, \"minute\"), H(\"minute\", \"m\"), U(\"minute\", 14), Q(\"m\", go), Q(\"mm\", go, uo), oe([\"m\", \"mm\"], Fo);\n var un = se(\"Minutes\", !1);\n q(\"s\", [\"ss\", 2], 0, \"second\"), H(\"second\", \"s\"), U(\"second\", 15), Q(\"s\", go), Q(\"ss\", go, uo), oe([\"s\", \"ss\"], No);\n var pn = se(\"Seconds\", !1);\n q(\"S\", 0, 0, function () {\n return ~~(this.millisecond() / 100);\n }), q(0, [\"SS\", 2], 0, function () {\n return ~~(this.millisecond() / 10);\n }), q(0, [\"SSS\", 3], 0, \"millisecond\"), q(0, [\"SSSS\", 4], 0, function () {\n return 10 * this.millisecond();\n }), q(0, [\"SSSSS\", 5], 0, function () {\n return 100 * this.millisecond();\n }), q(0, [\"SSSSSS\", 6], 0, function () {\n return 1e3 * this.millisecond();\n }), q(0, [\"SSSSSSS\", 7], 0, function () {\n return 1e4 * this.millisecond();\n }), q(0, [\"SSSSSSSS\", 8], 0, function () {\n return 1e5 * this.millisecond();\n }), q(0, [\"SSSSSSSSS\", 9], 0, function () {\n return 1e6 * this.millisecond();\n }), H(\"millisecond\", \"ms\"), U(\"millisecond\", 16), Q(\"S\", bo, co), Q(\"SS\", bo, uo), Q(\"SSS\", bo, po);\n var hn;\n\n for (hn = \"SSSS\"; 9 >= hn.length; hn += \"S\") Q(hn, ko);\n\n for (hn = \"S\"; 9 >= hn.length; hn += \"S\") oe(hn, Nt);\n\n var mn = se(\"Milliseconds\", !1);\n q(\"z\", 0, 0, \"zoneAbbr\"), q(\"zz\", 0, 0, \"zoneName\");\n var gn = T.prototype;\n gn.add = sn, gn.calendar = function (e, t) {\n var o = e || st(),\n n = gt(o, this).startOf(\"day\"),\n i = l.calendarFormat(this, n) || \"sameElse\",\n a = t && (Y(t[i]) ? t[i].call(this, o) : t[i]);\n return this.format(a || this.localeData().calendar(i, this, st(o)));\n }, gn.clone = function () {\n return new T(this);\n }, gn.diff = function (e, t, o) {\n var n, i, a;\n return this.isValid() ? (n = gt(e, this), !n.isValid()) ? NaN : (i = 6e4 * (n.utcOffset() - this.utcOffset()), t = j(t), (a = \"year\" === t ? Ot(this, n) / 12 : \"month\" === t ? Ot(this, n) : \"quarter\" === t ? Ot(this, n) / 3 : \"second\" === t ? (this - n) / 1e3 : \"minute\" === t ? (this - n) / 6e4 : \"hour\" === t ? (this - n) / 36e5 : \"day\" === t ? (this - n - i) / 864e5 : \"week\" === t ? (this - n - i) / 6048e5 : this - n, o ? a : C(a))) : NaN;\n }, gn.endOf = function (e) {\n var t;\n if (e = j(e), void 0 === e || \"millisecond\" === e || !this.isValid()) return this;\n var o = this._isUTC ? Mt : Ct;\n return \"year\" === e ? t = o(this.year() + 1, 0, 1) - 1 : \"quarter\" === e ? t = o(this.year(), this.month() - this.month() % 3 + 3, 1) - 1 : \"month\" === e ? t = o(this.year(), this.month() + 1, 1) - 1 : \"week\" === e ? t = o(this.year(), this.month(), this.date() - this.weekday() + 7) - 1 : \"isoWeek\" === e ? t = o(this.year(), this.month(), this.date() - (this.isoWeekday() - 1) + 7) - 1 : \"day\" === e || \"date\" === e ? t = o(this.year(), this.month(), this.date() + 1) - 1 : \"hour\" === e ? (t = this._d.valueOf(), t += 3600000 - Et(t + (this._isUTC ? 0 : 60000 * this.utcOffset()), 3600000) - 1) : \"minute\" === e ? (t = this._d.valueOf(), t += 60000 - Et(t, 60000) - 1) : \"second\" === e ? (t = this._d.valueOf(), t += 1000 - Et(t, 1000) - 1) : void 0, this._d.setTime(t), l.updateOffset(this, !0), this;\n }, gn.format = function (e) {\n e || (e = this.isUtc() ? l.defaultFormatUtc : l.defaultFormat);\n var t = $(this, e);\n return this.localeData().postformat(t);\n }, gn.from = function (e, t) {\n return this.isValid() && (E(e) && e.isValid() || st(e).isValid()) ? _t({\n to: this,\n from: e\n }).locale(this.locale()).humanize(!t) : this.localeData().invalidDate();\n }, gn.fromNow = function (e) {\n return this.from(st(), e);\n }, gn.to = function (e, t) {\n return this.isValid() && (E(e) && e.isValid() || st(e).isValid()) ? _t({\n from: this,\n to: e\n }).locale(this.locale()).humanize(!t) : this.localeData().invalidDate();\n }, gn.toNow = function (e) {\n return this.to(st(), e);\n }, gn.get = function (e) {\n return e = j(e), Y(this[e]) ? this[e]() : this;\n }, gn.invalidAt = function () {\n return x(this).overflow;\n }, gn.isAfter = function (e, t) {\n var o = E(e) ? e : st(e);\n return !!(this.isValid() && o.isValid()) && (t = j(t) || \"millisecond\", \"millisecond\" === t ? this.valueOf() > o.valueOf() : o.valueOf() < this.clone().startOf(t).valueOf());\n }, gn.isBefore = function (e, t) {\n var o = E(e) ? e : st(e);\n return !!(this.isValid() && o.isValid()) && (t = j(t) || \"millisecond\", \"millisecond\" === t ? this.valueOf() < o.valueOf() : this.clone().endOf(t).valueOf() < o.valueOf());\n }, gn.isBetween = function (e, t, o, n) {\n var i = E(e) ? e : st(e),\n a = E(t) ? t : st(t);\n return !!(this.isValid() && i.isValid() && a.isValid()) && (n = n || \"()\", (\"(\" === n[0] ? this.isAfter(i, o) : !this.isBefore(i, o)) && (\")\" === n[1] ? this.isBefore(a, o) : !this.isAfter(a, o)));\n }, gn.isSame = function (e, t) {\n var o = E(e) ? e : st(e),\n n;\n return !!(this.isValid() && o.isValid()) && (t = j(t) || \"millisecond\", \"millisecond\" === t ? this.valueOf() === o.valueOf() : (n = o.valueOf(), this.clone().startOf(t).valueOf() <= n && n <= this.clone().endOf(t).valueOf()));\n }, gn.isSameOrAfter = function (e, t) {\n return this.isSame(e, t) || this.isAfter(e, t);\n }, gn.isSameOrBefore = function (e, t) {\n return this.isSame(e, t) || this.isBefore(e, t);\n }, gn.isValid = function () {\n return S(this);\n }, gn.lang = ln, gn.locale = Dt, gn.localeData = Tt, gn.max = tn, gn.min = en, gn.parsingFlags = function () {\n return v({}, x(this));\n }, gn.set = ce, gn.startOf = function (e) {\n var t;\n if (e = j(e), void 0 === e || \"millisecond\" === e || !this.isValid()) return this;\n var o = this._isUTC ? Mt : Ct;\n return \"year\" === e ? t = o(this.year(), 0, 1) : \"quarter\" === e ? t = o(this.year(), this.month() - this.month() % 3, 1) : \"month\" === e ? t = o(this.year(), this.month(), 1) : \"week\" === e ? t = o(this.year(), this.month(), this.date() - this.weekday()) : \"isoWeek\" === e ? t = o(this.year(), this.month(), this.date() - (this.isoWeekday() - 1)) : \"day\" === e || \"date\" === e ? t = o(this.year(), this.month(), this.date()) : \"hour\" === e ? (t = this._d.valueOf(), t -= Et(t + (this._isUTC ? 0 : 60000 * this.utcOffset()), 3600000)) : \"minute\" === e ? (t = this._d.valueOf(), t -= Et(t, 60000)) : \"second\" === e ? (t = this._d.valueOf(), t -= Et(t, 1000)) : void 0, this._d.setTime(t), l.updateOffset(this, !0), this;\n }, gn.subtract = rn, gn.toArray = function () {\n var e = this;\n return [e.year(), e.month(), e.date(), e.hour(), e.minute(), e.second(), e.millisecond()];\n }, gn.toObject = function () {\n var e = this;\n return {\n years: e.year(),\n months: e.month(),\n date: e.date(),\n hours: e.hours(),\n minutes: e.minutes(),\n seconds: e.seconds(),\n milliseconds: e.milliseconds()\n };\n }, gn.toDate = function () {\n return new Date(this.valueOf());\n }, gn.toISOString = function (e) {\n if (!this.isValid()) return null;\n var t = !0 !== e,\n o = t ? this.clone().utc() : this;\n return 0 > o.year() || 9999 < o.year() ? $(o, t ? \"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]\" : \"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ\") : Y(Date.prototype.toISOString) ? t ? this.toDate().toISOString() : new Date(this.valueOf() + 1e3 * (60 * this.utcOffset())).toISOString().replace(\"Z\", $(o, \"Z\")) : $(o, t ? \"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]\" : \"YYYY-MM-DD[T]HH:mm:ss.SSSZ\");\n }, gn.inspect = function () {\n if (!this.isValid()) return \"moment.invalid(/* \" + this._i + \" */)\";\n var e = \"moment\",\n t = \"\";\n this.isLocal() || (e = 0 === this.utcOffset() ? \"moment.utc\" : \"moment.parseZone\", t = \"Z\");\n var o = \"[\" + e + \"(\\\"]\",\n n = 0 <= this.year() && 9999 >= this.year() ? \"YYYY\" : \"YYYYYY\",\n i = t + \"[\\\")]\";\n return this.format(o + n + \"-MM-DD[T]HH:mm:ss.SSS\" + i);\n }, gn.toJSON = function () {\n return this.isValid() ? this.toISOString() : null;\n }, gn.toString = function () {\n return this.clone().locale(\"en\").format(\"ddd MMM DD YYYY HH:mm:ss [GMT]ZZ\");\n }, gn.unix = function () {\n return s(this.valueOf() / 1e3);\n }, gn.valueOf = function () {\n return this._d.valueOf() - 6e4 * (this._offset || 0);\n }, gn.creationData = function () {\n return {\n input: this._i,\n format: this._f,\n locale: this._locale,\n isUTC: this._isUTC,\n strict: this._strict\n };\n }, gn.year = Yo, gn.isLeapYear = function () {\n return de(this.year());\n }, gn.weekYear = function (e) {\n return Pt.call(this, e, this.week(), this.weekday(), this.localeData()._week.dow, this.localeData()._week.doy);\n }, gn.isoWeekYear = function (e) {\n return Pt.call(this, e, this.isoWeek(), this.isoWeekday(), 1, 4);\n }, gn.quarter = gn.quarters = function (e) {\n return null == e ? r((this.month() + 1) / 3) : this.month(3 * (e - 1) + this.month() % 3);\n }, gn.month = ye, gn.daysInMonth = function () {\n return pe(this.year(), this.month());\n }, gn.week = gn.weeks = function (e) {\n var t = this.localeData().week(this);\n return null == e ? t : this.add(7 * (e - t), \"d\");\n }, gn.isoWeek = gn.isoWeeks = function (e) {\n var t = we(this, 1, 4).week;\n return null == e ? t : this.add(7 * (e - t), \"d\");\n }, gn.weeksInYear = function () {\n var e = this.localeData()._week;\n\n return xe(this.year(), e.dow, e.doy);\n }, gn.isoWeeksInYear = function () {\n return xe(this.year(), 1, 4);\n }, gn.date = cn, gn.day = gn.days = function (e) {\n if (!this.isValid()) return null == e ? NaN : this;\n var t = this._isUTC ? this._d.getUTCDay() : this._d.getDay();\n return null == e ? t : (e = Se(e, this.localeData()), this.add(e - t, \"d\"));\n }, gn.weekday = function (e) {\n if (!this.isValid()) return null == e ? NaN : this;\n var t = (this.day() + 7 - this.localeData()._week.dow) % 7;\n return null == e ? t : this.add(e - t, \"d\");\n }, gn.isoWeekday = function (e) {\n if (!this.isValid()) return null == e ? NaN : this;\n\n if (null != e) {\n var t = Oe(e, this.localeData());\n return this.day(this.day() % 7 ? t : t - 7);\n }\n\n return this.day() || 7;\n }, gn.dayOfYear = function (e) {\n var o = t((this.clone().startOf(\"day\") - this.clone().startOf(\"year\")) / 864e5) + 1;\n return null == e ? o : this.add(e - o, \"d\");\n }, gn.hour = gn.hours = Ho, gn.minute = gn.minutes = un, gn.second = gn.seconds = pn, gn.millisecond = gn.milliseconds = mn, gn.utcOffset = function (e, t, o) {\n var n = this._offset || 0,\n i;\n if (!this.isValid()) return null == e ? NaN : this;\n\n if (null != e) {\n if (\"string\" != typeof e) 16 > a(e) && !o && (e *= 60);else if (e = mt(So, e), null === e) return this;\n return !this._isUTC && t && (i = yt(this)), this._offset = e, this._isUTC = !0, null != i && this.add(i, \"m\"), n !== e && (!t || this._changeInProgress ? St(this, _t(e - n, \"m\"), 1, !1) : !this._changeInProgress && (this._changeInProgress = !0, l.updateOffset(this, !0), this._changeInProgress = null)), this;\n }\n\n return this._isUTC ? n : yt(this);\n }, gn.utc = function (e) {\n return this.utcOffset(0, e);\n }, gn.local = function (e) {\n return this._isUTC && (this.utcOffset(0, e), this._isUTC = !1, e && this.subtract(yt(this), \"m\")), this;\n }, gn.parseZone = function () {\n if (null != this._tzm) this.utcOffset(this._tzm, !1, !0);else if (\"string\" == typeof this._i) {\n var e = mt(xo, this._i);\n null == e ? this.utcOffset(0, !0) : this.utcOffset(e);\n }\n return this;\n }, gn.hasAlignedHourOffset = function (e) {\n return !!this.isValid() && (e = e ? st(e).utcOffset() : 0, 0 == (this.utcOffset() - e) % 60);\n }, gn.isDST = function () {\n return this.utcOffset() > this.clone().month(0).utcOffset() || this.utcOffset() > this.clone().month(5).utcOffset();\n }, gn.isLocal = function () {\n return !!this.isValid() && !this._isUTC;\n }, gn.isUtcOffset = function () {\n return !!this.isValid() && this._isUTC;\n }, gn.isUtc = bt, gn.isUTC = bt, gn.zoneAbbr = function () {\n return this._isUTC ? \"UTC\" : \"\";\n }, gn.zoneName = function () {\n return this._isUTC ? \"Coordinated Universal Time\" : \"\";\n }, gn.dates = F(\"dates accessor is deprecated. Use date instead.\", cn), gn.months = F(\"months accessor is deprecated. Use month instead\", ye), gn.years = F(\"years accessor is deprecated. Use year instead\", Yo), gn.zone = F(\"moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/\", function (e, t) {\n return null == e ? -this.utcOffset() : (\"string\" != typeof e && (e = -e), this.utcOffset(e, t), this);\n }), gn.isDSTShifted = F(\"isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information\", ft);\n var yn = B.prototype;\n yn.calendar = L, yn.longDateFormat = A, yn.invalidDate = function () {\n return this._invalidDate;\n }, yn.ordinal = function (e) {\n return this._ordinal.replace(\"%d\", e);\n }, yn.preparse = Yt, yn.postformat = Yt, yn.relativeTime = function (e, t, o, n) {\n var i = this._relativeTime[o];\n return Y(i) ? i(e, t, o, n) : i.replace(/%d/i, e);\n }, yn.pastFuture = function (e, t) {\n var o = this._relativeTime[0 < e ? \"future\" : \"past\"];\n return Y(o) ? o(t) : o.replace(/%s/i, t);\n }, yn.set = R, yn.months = function (e, t) {\n return e ? u(this._months) ? this._months[e.month()] : this._months[(this._months.isFormat || zo).test(t) ? \"format\" : \"standalone\"][e.month()] : u(this._months) ? this._months : this._months.standalone;\n }, yn.monthsShort = function (e, t) {\n return e ? u(this._monthsShort) ? this._monthsShort[e.month()] : this._monthsShort[zo.test(t) ? \"format\" : \"standalone\"][e.month()] : u(this._monthsShort) ? this._monthsShort : this._monthsShort.standalone;\n }, yn.monthsParse = me, yn.monthsRegex = function (e) {\n return this._monthsParseExact ? (_(this, \"_monthsRegex\") || fe.call(this), e ? this._monthsStrictRegex : this._monthsRegex) : (_(this, \"_monthsRegex\") || (this._monthsRegex = Do), this._monthsStrictRegex && e ? this._monthsStrictRegex : this._monthsRegex);\n }, yn.monthsShortRegex = function (e) {\n return this._monthsParseExact ? (_(this, \"_monthsRegex\") || fe.call(this), e ? this._monthsShortStrictRegex : this._monthsShortRegex) : (_(this, \"_monthsShortRegex\") || (this._monthsShortRegex = Do), this._monthsShortStrictRegex && e ? this._monthsShortStrictRegex : this._monthsShortRegex);\n }, yn.week = function (e) {\n return we(e, this._week.dow, this._week.doy).week;\n }, yn.firstDayOfYear = function () {\n return this._week.doy;\n }, yn.firstDayOfWeek = function () {\n return this._week.dow;\n }, yn.weekdays = function (e, t) {\n var o = u(this._weekdays) ? this._weekdays : this._weekdays[e && !0 !== e && this._weekdays.isFormat.test(t) ? \"format\" : \"standalone\"];\n return !0 === e ? De(o, this._week.dow) : e ? o[e.day()] : o;\n }, yn.weekdaysMin = function (e) {\n return !0 === e ? De(this._weekdaysMin, this._week.dow) : e ? this._weekdaysMin[e.day()] : this._weekdaysMin;\n }, yn.weekdaysShort = function (e) {\n return !0 === e ? De(this._weekdaysShort, this._week.dow) : e ? this._weekdaysShort[e.day()] : this._weekdaysShort;\n }, yn.weekdaysParse = Ee, yn.weekdaysRegex = function (e) {\n return this._weekdaysParseExact ? (_(this, \"_weekdaysRegex\") || Ce.call(this), e ? this._weekdaysStrictRegex : this._weekdaysRegex) : (_(this, \"_weekdaysRegex\") || (this._weekdaysRegex = Do), this._weekdaysStrictRegex && e ? this._weekdaysStrictRegex : this._weekdaysRegex);\n }, yn.weekdaysShortRegex = function (e) {\n return this._weekdaysParseExact ? (_(this, \"_weekdaysRegex\") || Ce.call(this), e ? this._weekdaysShortStrictRegex : this._weekdaysShortRegex) : (_(this, \"_weekdaysShortRegex\") || (this._weekdaysShortRegex = Do), this._weekdaysShortStrictRegex && e ? this._weekdaysShortStrictRegex : this._weekdaysShortRegex);\n }, yn.weekdaysMinRegex = function (e) {\n return this._weekdaysParseExact ? (_(this, \"_weekdaysRegex\") || Ce.call(this), e ? this._weekdaysMinStrictRegex : this._weekdaysMinRegex) : (_(this, \"_weekdaysMinRegex\") || (this._weekdaysMinRegex = Do), this._weekdaysMinStrictRegex && e ? this._weekdaysMinStrictRegex : this._weekdaysMinRegex);\n }, yn.isPM = function (e) {\n return \"p\" === (e + \"\").toLowerCase().charAt(0);\n }, yn.meridiem = function (e, t, o) {\n return 11 < e ? o ? \"pm\" : \"PM\" : o ? \"am\" : \"AM\";\n }, Re(\"en\", {\n dayOfMonthOrdinalParse: /\\d{1,2}(th|st|nd|rd)/,\n ordinal: function (e) {\n var t = e % 10,\n o = 1 === M(e % 100 / 10) ? \"th\" : 1 == t ? \"st\" : 2 == t ? \"nd\" : 3 == t ? \"rd\" : \"th\";\n return e + o;\n }\n }), l.lang = F(\"moment.lang is deprecated. Use moment.locale instead.\", Re), l.langData = F(\"moment.langData is deprecated. Use moment.localeData instead.\", Be);\n\n var fn = a,\n bn = Wt(\"ms\"),\n _n = Wt(\"s\"),\n vn = Wt(\"m\"),\n kn = Wt(\"h\"),\n wn = Wt(\"d\"),\n xn = Wt(\"w\"),\n Sn = Wt(\"M\"),\n On = Wt(\"Q\"),\n Dn = Wt(\"y\"),\n Tn = Ut(\"milliseconds\"),\n En = Ut(\"seconds\"),\n Cn = Ut(\"minutes\"),\n Mn = Ut(\"hours\"),\n In = Ut(\"days\"),\n Pn = Ut(\"months\"),\n Fn = Ut(\"years\"),\n Nn = t,\n Yn = {\n ss: 44,\n s: 45,\n m: 45,\n h: 22,\n d: 26,\n M: 11\n },\n Rn = a,\n zn = ct.prototype;\n\n return zn.isValid = function () {\n return this._isValid;\n }, zn.abs = function () {\n var e = this._data;\n return this._milliseconds = fn(this._milliseconds), this._days = fn(this._days), this._months = fn(this._months), e.milliseconds = fn(e.milliseconds), e.seconds = fn(e.seconds), e.minutes = fn(e.minutes), e.hours = fn(e.hours), e.months = fn(e.months), e.years = fn(e.years), this;\n }, zn.add = function (e, t) {\n return Lt(this, e, t, 1);\n }, zn.subtract = function (e, t) {\n return Lt(this, e, t, -1);\n }, zn.as = function (e) {\n if (!this.isValid()) return NaN;\n var o = this._milliseconds,\n n,\n i;\n if (e = j(e), \"month\" === e || \"quarter\" === e || \"year\" === e) switch (n = this._days + o / 864e5, i = this._months + Ht(n), e) {\n case \"month\":\n return i;\n\n case \"quarter\":\n return i / 3;\n\n case \"year\":\n return i / 12;\n } else switch (n = this._days + t(jt(this._months)), e) {\n case \"week\":\n return n / 7 + o / 6048e5;\n\n case \"day\":\n return n + o / 864e5;\n\n case \"hour\":\n return 24 * n + o / 36e5;\n\n case \"minute\":\n return 1440 * n + o / 6e4;\n\n case \"second\":\n return 86400 * n + o / 1e3;\n\n case \"millisecond\":\n return s(864e5 * n) + o;\n\n default:\n throw new Error(\"Unknown unit \" + e);\n }\n }, zn.asMilliseconds = bn, zn.asSeconds = _n, zn.asMinutes = vn, zn.asHours = kn, zn.asDays = wn, zn.asWeeks = xn, zn.asMonths = Sn, zn.asQuarters = On, zn.asYears = Dn, zn.valueOf = function () {\n return this.isValid() ? this._milliseconds + 864e5 * this._days + 2592e6 * (this._months % 12) + 31536e6 * M(this._months / 12) : NaN;\n }, zn._bubble = function () {\n var e = this._milliseconds,\n t = this._days,\n o = this._months,\n n = this._data,\n i,\n a,\n d,\n s,\n r;\n return 0 <= e && 0 <= t && 0 <= o || 0 >= e && 0 >= t && 0 >= o || (e += 864e5 * At(jt(o) + t), t = 0, o = 0), n.milliseconds = e % 1e3, i = C(e / 1e3), n.seconds = i % 60, a = C(i / 60), n.minutes = a % 60, d = C(a / 60), n.hours = d % 24, t += C(d / 24), r = C(Ht(t)), o += r, t -= At(jt(r)), s = C(o / 12), o %= 12, n.days = t, n.months = o, n.years = s, this;\n }, zn.clone = function () {\n return _t(this);\n }, zn.get = function (e) {\n return e = j(e), this.isValid() ? this[e + \"s\"]() : NaN;\n }, zn.milliseconds = Tn, zn.seconds = En, zn.minutes = Cn, zn.hours = Mn, zn.days = In, zn.weeks = function () {\n return C(this.days() / 7);\n }, zn.months = Pn, zn.years = Fn, zn.humanize = function (e) {\n if (!this.isValid()) return this.localeData().invalidDate();\n var t = this.localeData(),\n o = Gt(this, !e, t);\n return e && (o = t.pastFuture(+this, o)), t.postformat(o);\n }, zn.toISOString = Zt, zn.toString = Zt, zn.toJSON = Zt, zn.locale = Dt, zn.localeData = Tt, zn.toIsoString = F(\"toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)\", Zt), zn.lang = ln, q(\"X\", 0, 0, \"unix\"), q(\"x\", 0, 0, \"valueOf\"), Q(\"x\", wo), Q(\"X\", Oo), oe(\"X\", function (e, t, o) {\n o._d = new Date(1e3 * parseFloat(e, 10));\n }), oe(\"x\", function (e, t, o) {\n o._d = new Date(M(e));\n }), l.version = \"2.24.0\", function (e) {\n $t = e;\n }(st), l.fn = gn, l.min = function () {\n var e = [].slice.call(arguments, 0);\n return rt(\"isBefore\", e);\n }, l.max = function () {\n var e = [].slice.call(arguments, 0);\n return rt(\"isAfter\", e);\n }, l.now = function () {\n return Date.now ? Date.now() : +new Date();\n }, l.utc = k, l.unix = function (e) {\n return st(1e3 * e);\n }, l.months = function (e, t) {\n return zt(e, t, \"months\");\n }, l.isDate = y, l.locale = Re, l.invalid = O, l.duration = _t, l.isMoment = E, l.weekdays = function (e, t, o) {\n return Bt(e, t, o, \"weekdays\");\n }, l.parseZone = function () {\n return st.apply(null, arguments).parseZone();\n }, l.localeData = Be, l.isDuration = ut, l.monthsShort = function (e, t) {\n return zt(e, t, \"monthsShort\");\n }, l.weekdaysMin = function (e, t, o) {\n return Bt(e, t, o, \"weekdaysMin\");\n }, l.defineLocale = ze, l.updateLocale = function (e, t) {\n if (null != t) {\n var o = jo,\n n,\n i;\n i = Ye(e), null != i && (o = i._config), t = z(o, t), n = new B(t), n.parentLocale = Wo[e], Wo[e] = n, Re(e);\n } else null != Wo[e] && (null == Wo[e].parentLocale ? null != Wo[e] && delete Wo[e] : Wo[e] = Wo[e].parentLocale);\n\n return Wo[e];\n }, l.locales = Le, l.weekdaysShort = function (e, t, o) {\n return Bt(e, t, o, \"weekdaysShort\");\n }, l.normalizeUnits = j, l.relativeTimeRounding = qt, l.relativeTimeThreshold = function (e, t) {\n return void 0 !== Yn[e] && (void 0 === t ? Yn[e] : (Yn[e] = t, \"s\" === e && (Yn.ss = t - 1), !0));\n }, l.calendarFormat = function (e, t) {\n var o = e.diff(t, \"days\", !0);\n return -6 > o ? \"sameElse\" : -1 > o ? \"lastWeek\" : 0 > o ? \"lastDay\" : 1 > o ? \"sameDay\" : 2 > o ? \"nextDay\" : 7 > o ? \"nextWeek\" : \"sameElse\";\n }, l.prototype = gn, l.HTML5_FMT = {\n DATETIME_LOCAL: \"YYYY-MM-DDTHH:mm\",\n DATETIME_LOCAL_SECONDS: \"YYYY-MM-DDTHH:mm:ss\",\n DATETIME_LOCAL_MS: \"YYYY-MM-DDTHH:mm:ss.SSS\",\n DATE: \"YYYY-MM-DD\",\n TIME: \"HH:mm\",\n TIME_SECONDS: \"HH:mm:ss\",\n TIME_MS: \"HH:mm:ss.SSS\",\n WEEK: \"GGGG-[W]WW\",\n MONTH: \"YYYY-MM\"\n }, l;\n });\n}), byteToHex$2$1 = [], i$2$1 = 0; 256 > i$2$1; i$2$1++) byteToHex$2$1[i$2$1] = (i$2$1 + 256).toString(16).substr(1);\n\nfor (var random$1$1 = function () {\n if (\"undefined\" != typeof crypto && crypto.getRandomValues) {\n var e = new Uint8Array(16);\n return function () {\n return crypto.getRandomValues(e), e;\n };\n }\n\n var t = Array(16);\n return function () {\n for (var e = 0, o; 16 > e; e++) 0 == (3 & e) && (o = 4294967296 * Math.random()), t[e] = 255 & o >>> ((3 & e) << 3);\n\n return t;\n };\n}(), byteToHex$1$1$1 = [], i$1$1$1 = 0; 256 > i$1$1$1; i$1$1$1++) byteToHex$1$1$1[i$1$1$1] = (i$1$1$1 + 256).toString(16).substr(1);\n\nvar seedBytes$1$1 = random$1$1(),\n defaultNodeId$1$1 = [1 | seedBytes$1$1[0], seedBytes$1$1[1], seedBytes$1$1[2], seedBytes$1$1[3], seedBytes$1$1[4], seedBytes$1$1[5]],\n defaultClockseq$1$1 = 16383 & (seedBytes$1$1[6] << 8 | seedBytes$1$1[7]),\n ASPDateRegex$1 = /^\\/?Date\\((-?\\d+)/i;\n\nfunction isNumber$1(e) {\n return e instanceof Number || \"number\" == typeof e;\n}\n\nfunction isString$1(e) {\n return e instanceof String || \"string\" == typeof e;\n}\n\nfunction isMoment$1(e) {\n return moment$1.isMoment(e);\n}\n\nfunction convert$1(e, t) {\n var o;\n\n if (void 0 !== e) {\n if (null === e) return null;\n if (!t) return e;\n if (\"string\" != typeof t && !(t instanceof String)) throw new Error(\"Type must be a string\");\n\n switch (t) {\n case \"boolean\":\n case \"Boolean\":\n return !!e;\n\n case \"number\":\n case \"Number\":\n return isString$1(e) && !isNaN(Date.parse(e)) ? moment$1(e).valueOf() : +e.valueOf();\n\n case \"string\":\n case \"String\":\n return e + \"\";\n\n case \"Date\":\n if (isNumber$1(e)) return new Date(e);\n if (e instanceof Date) return new Date(e.valueOf());\n if (isMoment$1(e)) return new Date(e.valueOf());\n if (isString$1(e)) return o = ASPDateRegex$1.exec(e), o ? new Date(+o[1]) : moment$1(new Date(e)).toDate();\n throw new Error(\"Cannot convert object of type \" + getType$1(e) + \" to type Date\");\n\n case \"Moment\":\n if (isNumber$1(e)) return moment$1(e);\n if (e instanceof Date) return moment$1(e.valueOf());\n if (isMoment$1(e)) return moment$1(e);\n if (isString$1(e)) return o = ASPDateRegex$1.exec(e), o ? moment$1(+o[1]) : moment$1(e);\n throw new Error(\"Cannot convert object of type \" + getType$1(e) + \" to type Date\");\n\n case \"ISODate\":\n if (isNumber$1(e)) return new Date(e);\n if (e instanceof Date) return e.toISOString();\n if (isMoment$1(e)) return e.toDate().toISOString();\n if (isString$1(e)) return o = ASPDateRegex$1.exec(e), o ? new Date(+o[1]).toISOString() : moment$1(e).format();\n throw new Error(\"Cannot convert object of type \" + getType$1(e) + \" to type ISODate\");\n\n case \"ASPDate\":\n if (isNumber$1(e)) return \"/Date(\" + e + \")/\";\n if (e instanceof Date) return \"/Date(\" + e.valueOf() + \")/\";\n\n if (isString$1(e)) {\n o = ASPDateRegex$1.exec(e);\n var n;\n return n = o ? new Date(+o[1]).valueOf() : new Date(e).valueOf(), \"/Date(\" + n + \")/\";\n }\n\n throw new Error(\"Cannot convert object of type \" + getType$1(e) + \" to type ASPDate\");\n\n default:\n throw new Error(\"Unknown type \".concat(t));\n }\n }\n}\n\nfunction getType$1(e) {\n var t = _typeof$1(e);\n\n return \"object\" === t ? null === e ? \"null\" : e instanceof Boolean ? \"Boolean\" : e instanceof Number ? \"Number\" : e instanceof String ? \"String\" : Array.isArray(e) ? \"Array\" : e instanceof Date ? \"Date\" : \"Object\" : \"number\" === t ? \"Number\" : \"boolean\" === t ? \"Boolean\" : \"string\" === t ? \"String\" : void 0 === t ? \"undefined\" : t;\n}\n\nfunction isId(e) {\n return \"string\" == typeof e || \"number\" == typeof e;\n}\n\nvar Queue = function () {\n function e(t) {\n classCallCheck(this, e), this._queue = [], this._timeout = null, this._extended = null, this.delay = null, this.max = 1 / 0, this.setOptions(t);\n }\n\n return createClass(e, [{\n key: \"setOptions\",\n value: function (e) {\n e && \"undefined\" != typeof e.delay && (this.delay = e.delay), e && \"undefined\" != typeof e.max && (this.max = e.max), this._flushIfNeeded();\n }\n }, {\n key: \"destroy\",\n value: function () {\n if (this.flush(), this._extended) {\n for (var e = this._extended.object, t = this._extended.methods, o = 0, n; o < t.length; o++) n = t[o], n.original ? e[n.name] = n.original : delete e[n.name];\n\n this._extended = null;\n }\n }\n }, {\n key: \"replace\",\n value: function (e, t) {\n var o = this,\n n = e[t];\n if (!n) throw new Error(\"Method \" + t + \" undefined\");\n\n e[t] = function () {\n for (var e = arguments.length, t = Array(e), i = 0; i < e; i++) t[i] = arguments[i];\n\n o.queue({\n args: t,\n fn: n,\n context: this\n });\n };\n }\n }, {\n key: \"queue\",\n value: function (e) {\n \"function\" == typeof e ? this._queue.push({\n fn: e\n }) : this._queue.push(e), this._flushIfNeeded();\n }\n }, {\n key: \"_flushIfNeeded\",\n value: function () {\n var e = this;\n this._queue.length > this.max && this.flush(), null != this._timeout && (clearTimeout(this._timeout), this._timeout = null), 0 < this.queue.length && \"number\" == typeof this.delay && (this._timeout = setTimeout(function () {\n e.flush();\n }, this.delay));\n }\n }, {\n key: \"flush\",\n value: function () {\n this._queue.splice(0).forEach(function (e) {\n e.fn.apply(e.context || e.fn, e.args || []);\n });\n }\n }], [{\n key: \"extend\",\n value: function (t, o) {\n var n = new e(o);\n if (void 0 !== t.flush) throw new Error(\"Target object already has a property flush\");\n\n t.flush = function () {\n n.flush();\n };\n\n var a = [{\n name: \"flush\",\n original: void 0\n }];\n if (o && o.replace) for (var d = 0, s; d < o.replace.length; d++) s = o.replace[d], a.push({\n name: s,\n original: t[s]\n }), n.replace(t, s);\n return n._extended = {\n object: t,\n methods: a\n }, n;\n }\n }]), e;\n}();\n\nfunction _arrayWithoutHoles$1(e) {\n if (Array.isArray(e)) {\n for (var t = 0, o = Array(e.length); t < e.length; t++) o[t] = e[t];\n\n return o;\n }\n}\n\nvar arrayWithoutHoles = _arrayWithoutHoles$1;\n\nfunction _iterableToArray$1(e) {\n if (Symbol.iterator in Object(e) || \"[object Arguments]\" === Object.prototype.toString.call(e)) return Array.from(e);\n}\n\nvar iterableToArray = _iterableToArray$1;\n\nfunction _nonIterableSpread$1() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance\");\n}\n\nvar nonIterableSpread = _nonIterableSpread$1;\n\nfunction _toConsumableArray$1(e) {\n return arrayWithoutHoles(e) || iterableToArray(e) || nonIterableSpread();\n}\n\nvar toConsumableArray = _toConsumableArray$1,\n DataSetPart = function () {\n function e() {\n classCallCheck(this, e), this._subscribers = {\n \"*\": [],\n add: [],\n remove: [],\n update: []\n }, this.subscribe = e.prototype.on, this.unsubscribe = e.prototype.off;\n }\n\n return createClass(e, [{\n key: \"_trigger\",\n value: function (e, t, o) {\n if (\"*\" === e) throw new Error(\"Cannot trigger event *\");\n\n for (var n = [].concat(toConsumableArray(this._subscribers[e]), toConsumableArray(this._subscribers[\"*\"])), a = 0, d = n.length, s; a < d; a++) s = n[a], s.callback && s.callback(e, t, null == o ? null : o);\n }\n }, {\n key: \"on\",\n value: function (e, t) {\n this._subscribers[e].push({\n callback: t\n });\n }\n }, {\n key: \"off\",\n value: function (e, t) {\n this._subscribers[e] = this._subscribers[e].filter(function (e) {\n return e.callback !== t;\n });\n }\n }]), e;\n}();\n\nfunction ownKeys$1(e, t) {\n var o = Object.keys(e);\n return Object.getOwnPropertySymbols && o.push.apply(o, Object.getOwnPropertySymbols(e)), t && (o = o.filter(function (t) {\n return Object.getOwnPropertyDescriptor(e, t).enumerable;\n })), o;\n}\n\nfunction _objectSpread(e) {\n for (var t = 1, o; t < arguments.length; t++) o = null == arguments[t] ? {} : arguments[t], t % 2 ? ownKeys$1(o, !0).forEach(function (t) {\n defineProperty$1(e, t, o[t]);\n }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(o)) : ownKeys$1(o).forEach(function (t) {\n Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(o, t));\n });\n\n return e;\n}\n\nvar DataSet = function (e) {\n function t(e, o) {\n var n;\n if (classCallCheck(this, t), n = possibleConstructorReturn(this, getPrototypeOf(t).call(this)), e && !Array.isArray(e) && (o = e, e = []), n._options = o || {}, n._data = Object.create({}), n.length = 0, n._idProp = n._options.fieldId || \"id\", n._type = {}, n._options.type) for (var a = Object.keys(n._options.type), d = 0, s = a.length; d < s; d++) {\n var r = a[d],\n l = n._options.type[r];\n n._type[r] = \"Date\" == l || \"ISODate\" == l || \"ASPDate\" == l ? \"Date\" : l;\n }\n return e && e.length && n.add(e), n.setOptions(o), n;\n }\n\n return inherits(t, e), createClass(t, [{\n key: \"setOptions\",\n value: function (e) {\n e && void 0 !== e.queue && (!1 === e.queue ? this._queue && (this._queue.destroy(), delete this._queue) : (!this._queue && (this._queue = Queue.extend(this, {\n replace: [\"add\", \"update\", \"remove\"]\n })), e.queue && \"object\" === _typeof_1(e.queue) && this._queue.setOptions(e.queue)));\n }\n }, {\n key: \"add\",\n value: function (e, t) {\n var o = [],\n n;\n if (Array.isArray(e)) for (var a = 0, d = e.length; a < d; a++) n = this._addItem(e[a]), o.push(n);else if (e && \"object\" === _typeof_1(e)) n = this._addItem(e), o.push(n);else throw new Error(\"Unknown dataType\");\n return o.length && this._trigger(\"add\", {\n items: o\n }, t), o;\n }\n }, {\n key: \"update\",\n value: function (e, t) {\n var o = this,\n n = [],\n a = [],\n d = [],\n s = [],\n r = this._idProp,\n l = function (e) {\n var t = e[r];\n\n if (null != t && o._data[t]) {\n var i = e,\n l = Object.assign({}, o._data[t]),\n c = o._updateItem(i);\n\n a.push(c), s.push(i), d.push(l);\n } else {\n var u = o._addItem(e);\n\n n.push(u);\n }\n };\n\n if (Array.isArray(e)) for (var c = 0, u = e.length; c < u; c++) e[c] && \"object\" === _typeof_1(e[c]) ? l(e[c]) : console.warn(\"Ignoring input item, which is not an object at index \" + c);else if (e && \"object\" === _typeof_1(e)) l(e);else throw new Error(\"Unknown dataType\");\n\n if (n.length && this._trigger(\"add\", {\n items: n\n }, t), a.length) {\n this._trigger(\"update\", {\n items: a,\n oldData: d,\n data: s\n }, t);\n }\n\n return n.concat(a);\n }\n }, {\n key: \"get\",\n value: function (e, t) {\n var o = void 0,\n n = void 0,\n a = void 0;\n isId(e) ? (o = e, a = t) : Array.isArray(e) ? (n = e, a = t) : a = e;\n var d = a && \"Object\" === a.returnType ? \"Object\" : \"Array\",\n s = a && a.type || this._options.type,\n r = a && a.filter,\n l = [],\n c = null,\n u = null,\n p = null;\n if (null != o) c = this._getItem(o, s), c && r && !r(c) && (c = null);else if (null != n) for (var h = 0, m = n.length; h < m; h++) c = this._getItem(n[h], s), null != c && (!r || r(c)) && l.push(c);else {\n u = Object.keys(this._data);\n\n for (var g = 0, y = u.length; g < y; g++) p = u[g], c = this._getItem(p, s), null != c && (!r || r(c)) && l.push(c);\n }\n\n if (a && a.order && null == o && this._sort(l, a.order), a && a.fields) {\n var f = a.fields;\n if (null != o && null != c) c = this._filterFields(c, f);else for (var b = 0, _ = l.length; b < _; b++) l[b] = this._filterFields(l[b], f);\n }\n\n if (\"Object\" == d) {\n for (var v = {}, k = 0, w = l.length; k < w; k++) {\n var x = l[k],\n S = x[this._idProp];\n v[S] = x;\n }\n\n return v;\n }\n\n return null == o ? l : c;\n }\n }, {\n key: \"getIds\",\n value: function (e) {\n var t = this._data,\n o = e && e.filter,\n n = e && e.order,\n a = e && e.type || this._options.type,\n d = Object.keys(t),\n s = [],\n r,\n l;\n\n if (o) {\n if (n) {\n l = [];\n\n for (var c = 0, u = d.length, p; c < u; c++) p = d[c], r = this._getItem(p, a), o(r) && l.push(r);\n\n this._sort(l, n);\n\n for (var h = 0, m = l.length; h < m; h++) s.push(l[h][this._idProp]);\n } else for (var g = 0, y = d.length, f; g < y; g++) f = d[g], r = this._getItem(f, a), o(r) && s.push(r[this._idProp]);\n } else if (n) {\n l = [];\n\n for (var b = 0, _ = d.length, v; b < _; b++) v = d[b], l.push(t[v]);\n\n this._sort(l, n);\n\n for (var k = 0, w = l.length; k < w; k++) s.push(l[k][this._idProp]);\n } else for (var x = 0, S = d.length, O; x < S; x++) O = d[x], r = t[O], s.push(r[this._idProp]);\n\n return s;\n }\n }, {\n key: \"getDataSet\",\n value: function () {\n return this;\n }\n }, {\n key: \"forEach\",\n value: function (e, t) {\n var o = t && t.filter,\n n = t && t.type || this._options.type,\n a = this._data,\n d = Object.keys(a);\n if (t && t.order) for (var s = this.get(t), r = 0, l = s.length; r < l; r++) {\n var c = s[r],\n u = c[this._idProp];\n e(c, u);\n } else for (var p = 0, h = d.length; p < h; p++) {\n var m = d[p],\n g = this._getItem(m, n);\n\n (!o || o(g)) && e(g, m);\n }\n }\n }, {\n key: \"map\",\n value: function (e, t) {\n for (var o = t && t.filter, n = t && t.type || this._options.type, a = [], d = this._data, s = Object.keys(d), r = 0, l = s.length; r < l; r++) {\n var c = s[r],\n u = this._getItem(c, n);\n\n (!o || o(u)) && a.push(e(u, c));\n }\n\n return t && t.order && this._sort(a, t.order), a;\n }\n }, {\n key: \"_filterFields\",\n value: function (e, t) {\n return e ? (Array.isArray(t) ? t : Object.keys(t)).reduce(function (t, o) {\n return t[o] = e[o], t;\n }, {}) : e;\n }\n }, {\n key: \"_sort\",\n value: function (e, t) {\n if (\"string\" == typeof t) {\n var o = t;\n e.sort(function (e, t) {\n var n = e[o],\n i = t[o];\n return n > i ? 1 : n < i ? -1 : 0;\n });\n } else if (\"function\" == typeof t) e.sort(t);else throw new TypeError(\"Order must be a function or a string\");\n }\n }, {\n key: \"remove\",\n value: function (e, t) {\n for (var o = [], n = [], a = Array.isArray(e) ? e : [e], d = 0, s = a.length, r; d < s; d++) if (r = this._remove(a[d]), r) {\n var l = r[this._idProp];\n null != l && (o.push(l), n.push(r));\n }\n\n return o.length && this._trigger(\"remove\", {\n items: o,\n oldData: n\n }, t), o;\n }\n }, {\n key: \"_remove\",\n value: function (e) {\n var t;\n\n if (isId(e) ? t = e : e && \"object\" === _typeof_1(e) && (t = e[this._idProp]), null != t && this._data[t]) {\n var o = this._data[t];\n return delete this._data[t], --this.length, o;\n }\n\n return null;\n }\n }, {\n key: \"clear\",\n value: function (e) {\n for (var t = Object.keys(this._data), o = [], n = 0, a = t.length; n < a; n++) o.push(this._data[t[n]]);\n\n return this._data = {}, this.length = 0, this._trigger(\"remove\", {\n items: t,\n oldData: o\n }, e), t;\n }\n }, {\n key: \"max\",\n value: function e(t) {\n for (var o = this._data, n = Object.keys(o), e = null, a = null, d = 0, s = n.length; d < s; d++) {\n var r = n[d],\n l = o[r],\n c = l[t];\n null != c && (null == a || c > a) && (e = l, a = c);\n }\n\n return e;\n }\n }, {\n key: \"min\",\n value: function e(t) {\n for (var o = this._data, n = Object.keys(o), e = null, a = null, d = 0, s = n.length; d < s; d++) {\n var r = n[d],\n l = o[r],\n c = l[t];\n null != c && (null == a || c < a) && (e = l, a = c);\n }\n\n return e;\n }\n }, {\n key: \"distinct\",\n value: function (e) {\n for (var t = this._data, o = Object.keys(t), n = [], a = this._options.type && this._options.type[e] || null, d = 0, s = 0, r = o.length; s < r; s++) {\n for (var l = o[s], c = t[l], u = c[e], p = !1, h = 0; h < d; h++) if (n[h] == u) {\n p = !0;\n break;\n }\n\n p || void 0 === u || (n[d] = u, d++);\n }\n\n if (a) for (var m = 0, g = n.length; m < g; m++) n[m] = convert$1(n[m], a);\n return n;\n }\n }, {\n key: \"_addItem\",\n value: function (e) {\n var t = e[this._idProp];\n if (null == t) t = uuid4$1(), e[this._idProp] = t;else if (this._data[t]) throw new Error(\"Cannot add item: item with id \" + t + \" already exists\");\n\n for (var o = {}, n = Object.keys(e), a = 0, d = n.length; a < d; a++) {\n var s = n[a],\n r = this._type[s];\n o[s] = convert$1(e[s], r);\n }\n\n return this._data[t] = o, this.length++, t;\n }\n }, {\n key: \"_getItem\",\n value: function (e, t) {\n var o = this._data[e];\n if (!o) return null;\n var n = Object.keys(o),\n a;\n\n if (t) {\n a = {};\n\n for (var d = 0, s = n.length; d < s; d++) {\n var r = n[d],\n l = o[r];\n a[r] = convert$1(l, t[r]);\n }\n } else a = _objectSpread({}, o);\n\n return null == a[this._idProp] && (a[this._idProp] = o.id), a;\n }\n }, {\n key: \"_updateItem\",\n value: function (e) {\n var t = e[this._idProp];\n if (null == t) throw new Error(\"Cannot update item: item has no id (item: \" + JSON.stringify(e) + \")\");\n var o = this._data[t];\n if (!o) throw new Error(\"Cannot update item: no item with id \" + t + \" found\");\n\n for (var n = Object.keys(e), a = 0, d = n.length; a < d; a++) {\n var s = n[a],\n r = this._type[s];\n o[s] = convert$1(e[s], r);\n }\n\n return t;\n }\n }]), t;\n}(DataSetPart),\n DataView = function (e) {\n function t(e, o) {\n var n;\n return classCallCheck(this, t), n = possibleConstructorReturn(this, getPrototypeOf(t).call(this)), n.length = 0, n._ids = {}, n._options = o || {}, n.listener = n._onEvent.bind(assertThisInitialized(n)), n.setData(e), n;\n }\n\n return inherits(t, e), createClass(t, [{\n key: \"setData\",\n value: function (e) {\n if (this._data) {\n this._data.off && this._data.off(\"*\", this.listener);\n\n var t = this._data.getIds({\n filter: this._options.filter\n }),\n o = this._data.get(t);\n\n this._ids = {}, this.length = 0, this._trigger(\"remove\", {\n items: t,\n oldData: o\n });\n }\n\n if (null != e) {\n this._data = e;\n\n for (var n = this._data.getIds({\n filter: this._options.filter\n }), a = 0, d = n.length, s; a < d; a++) s = n[a], this._ids[s] = !0;\n\n this.length = n.length, this._trigger(\"add\", {\n items: n\n });\n } else this._data = new DataSet();\n\n this._data.on && this._data.on(\"*\", this.listener);\n }\n }, {\n key: \"refresh\",\n value: function () {\n for (var e = this._data.getIds({\n filter: this._options.filter\n }), t = Object.keys(this._ids), o = {}, n = [], a = [], d = [], s = 0, r = e.length, l; s < r; s++) l = e[s], o[l] = !0, this._ids[l] || (n.push(l), this._ids[l] = !0);\n\n for (var c = 0, u = t.length; c < u; c++) {\n var p = t[c],\n h = this._data.get(p);\n\n null == h ? console.error(\"If you see this, report it please.\") : !o[p] && (a.push(p), d.push(h), delete this._ids[p]);\n }\n\n this.length += n.length - a.length, n.length && this._trigger(\"add\", {\n items: n\n }), a.length && this._trigger(\"remove\", {\n items: a,\n oldData: d\n });\n }\n }, {\n key: \"get\",\n value: function (e, t) {\n if (null == this._data) return null;\n var o = null,\n n;\n isId(e) || Array.isArray(e) ? (o = e, n = t) : n = e;\n var i = Object.assign({}, this._options, n),\n a = this._options.filter,\n d = n && n.filter;\n return a && d && (i.filter = function (e) {\n return a(e) && d(e);\n }), null == o ? this._data.get(i) : this._data.get(o, i);\n }\n }, {\n key: \"getIds\",\n value: function (e) {\n if (this._data.length) {\n var t = this._options.filter,\n o = null == e ? null : e.filter,\n n;\n return n = o ? t ? function (e) {\n return t(e) && o(e);\n } : o : t, this._data.getIds({\n filter: n,\n order: e && e.order\n });\n }\n\n return [];\n }\n }, {\n key: \"forEach\",\n value: function (e, t) {\n if (this._data) {\n var o = this._options.filter,\n n = t && t.filter,\n i;\n i = n ? o ? function (e) {\n return o(e) && n(e);\n } : n : o, this._data.forEach(e, {\n filter: i,\n order: t && t.order\n });\n }\n }\n }, {\n key: \"map\",\n value: function (e, t) {\n if (this._data) {\n var o = this._options.filter,\n n = t && t.filter,\n i;\n return i = n ? o ? function (e) {\n return o(e) && n(e);\n } : n : o, this._data.map(e, {\n filter: i,\n order: t && t.order\n });\n }\n\n return [];\n }\n }, {\n key: \"getDataSet\",\n value: function () {\n return this._data.getDataSet();\n }\n }, {\n key: \"_onEvent\",\n value: function (e, t, o) {\n if (t && t.items && this._data) {\n var n = t.items,\n a = [],\n d = [],\n s = [],\n r = [],\n l = [],\n c = [];\n\n switch (e) {\n case \"add\":\n for (var u = 0, p = n.length; u < p; u++) {\n var h = n[u],\n m = this.get(h);\n m && (this._ids[h] = !0, a.push(h));\n }\n\n break;\n\n case \"update\":\n for (var g = 0, y = n.length; g < y; g++) {\n var f = n[g],\n b = this.get(f);\n b ? this._ids[f] ? (d.push(f), l.push(t.data[g]), r.push(t.oldData[g])) : (this._ids[f] = !0, a.push(f)) : this._ids[f] && (delete this._ids[f], s.push(f), c.push(t.oldData[g]));\n }\n\n break;\n\n case \"remove\":\n for (var _ = 0, v = n.length, k; _ < v; _++) k = n[_], this._ids[k] && (delete this._ids[k], s.push(k), c.push(t.oldData[_]));\n\n }\n\n this.length += a.length - s.length, a.length && this._trigger(\"add\", {\n items: a\n }, o), d.length && this._trigger(\"update\", {\n items: d,\n oldData: r,\n data: l\n }, o), s.length && this._trigger(\"remove\", {\n items: s,\n oldData: c\n }, o);\n }\n }\n }]), t;\n}(DataSetPart),\n index = {\n DataSet: DataSet,\n DataView: DataView,\n Queue: Queue\n},\n esm$1 = Object.freeze({\n default: index,\n DataSet: DataSet,\n DataView: DataView,\n Queue: Queue\n});\n\n\"undefined\" != typeof CanvasRenderingContext2D && (CanvasRenderingContext2D.prototype.circle = function (e, t, o) {\n this.beginPath(), this.arc(e, t, o, 0, 2 * Math.PI, !1), this.closePath();\n}, CanvasRenderingContext2D.prototype.square = function (e, t, o) {\n this.beginPath(), this.rect(e - o, t - o, 2 * o, 2 * o), this.closePath();\n}, CanvasRenderingContext2D.prototype.triangle = function (e, t, o) {\n var n = Math.sqrt;\n this.beginPath(), o *= 1.15, t += .275 * o;\n var i = 2 * o,\n a = i / 2,\n d = n(3) / 6 * i,\n s = n(i * i - a * a);\n this.moveTo(e, t - (s - d)), this.lineTo(e + a, t + d), this.lineTo(e - a, t + d), this.lineTo(e, t - (s - d)), this.closePath();\n}, CanvasRenderingContext2D.prototype.triangleDown = function (e, t, o) {\n var n = Math.sqrt;\n this.beginPath(), o *= 1.15, t -= .275 * o;\n var i = 2 * o,\n a = i / 2,\n d = n(3) / 6 * i,\n s = n(i * i - a * a);\n this.moveTo(e, t + (s - d)), this.lineTo(e + a, t - d), this.lineTo(e - a, t - d), this.lineTo(e, t + (s - d)), this.closePath();\n}, CanvasRenderingContext2D.prototype.star = function (e, t, o) {\n var i = Math.cos,\n a = Math.sin,\n d = Math.PI;\n this.beginPath(), o *= .82, t += .1 * o;\n\n for (var s = 0, l; 10 > s; s++) l = 0 == s % 2 ? 1.3 * o : .5 * o, this.lineTo(e + l * a(2 * s * d / 10), t - l * i(2 * s * d / 10));\n\n this.closePath();\n}, CanvasRenderingContext2D.prototype.diamond = function (e, t, o) {\n this.beginPath(), this.lineTo(e, t + o), this.lineTo(e + o, t), this.lineTo(e, t - o), this.lineTo(e - o, t), this.closePath();\n}, CanvasRenderingContext2D.prototype.roundRect = function (e, t, o, n, i) {\n var a = Math.PI / 180;\n 0 > o - 2 * i && (i = o / 2), 0 > n - 2 * i && (i = n / 2), this.beginPath(), this.moveTo(e + i, t), this.lineTo(e + o - i, t), this.arc(e + o - i, t + i, i, 270 * a, 360 * a, !1), this.lineTo(e + o, t + n - i), this.arc(e + o - i, t + n - i, i, 0, 90 * a, !1), this.lineTo(e + i, t + n), this.arc(e + i, t + n - i, i, 90 * a, 180 * a, !1), this.lineTo(e, t + i), this.arc(e + i, t + i, i, 180 * a, 270 * a, !1), this.closePath();\n}, CanvasRenderingContext2D.prototype.ellipse_vis = function (e, t, o, n) {\n var i = .5522848,\n a = o / 2 * i,\n d = n / 2 * i,\n s = e + o,\n r = t + n,\n l = e + o / 2,\n c = t + n / 2;\n this.beginPath(), this.moveTo(e, c), this.bezierCurveTo(e, c - d, l - a, t, l, t), this.bezierCurveTo(l + a, t, s, c - d, s, c), this.bezierCurveTo(s, c + d, l + a, r, l, r), this.bezierCurveTo(l - a, r, e, c + d, e, c), this.closePath();\n}, CanvasRenderingContext2D.prototype.database = function (e, t, o, n) {\n var i = o,\n a = n * (1 / 3),\n d = .5522848,\n s = i / 2 * d,\n r = a / 2 * d,\n l = e + i,\n c = t + a,\n u = e + i / 2,\n p = t + a / 2,\n h = t + (n - a / 2),\n m = t + n;\n this.beginPath(), this.moveTo(l, p), this.bezierCurveTo(l, p + r, u + s, c, u, c), this.bezierCurveTo(u - s, c, e, p + r, e, p), this.bezierCurveTo(e, p - r, u - s, t, u, t), this.bezierCurveTo(u + s, t, l, p - r, l, p), this.lineTo(l, h), this.bezierCurveTo(l, h + r, u + s, m, u, m), this.bezierCurveTo(u - s, m, e, h + r, e, h), this.lineTo(e, p);\n}, CanvasRenderingContext2D.prototype.dashedLine = function (e, t, o, n, i) {\n var a = Math.sqrt;\n this.beginPath(), this.moveTo(e, t);\n\n for (var d = i.length, s = o - e, r = n - t, l = r / s, c = a(s * s + r * r), u = 0, p = !0, h = 0, m = i[0]; .1 <= c;) m = i[u++ % d], m > c && (m = c), h = a(m * m / (1 + l * l)), h = 0 > s ? -h : h, e += h, t += l * h, !0 === p ? this.lineTo(e, t) : this.moveTo(e, t), c -= m, p = !p;\n}, CanvasRenderingContext2D.prototype.hexagon = function (e, t, o) {\n this.beginPath();\n var n = 2 * Math.PI / 6;\n this.moveTo(e + o, t);\n\n for (var a = 1; a < 6; a++) this.lineTo(e + o * Math.cos(n * a), t + o * Math.sin(n * a));\n\n this.closePath();\n});\nvar commonjsGlobal$2 = \"undefined\" == typeof globalThis ? \"undefined\" == typeof window ? \"undefined\" == typeof global ? \"undefined\" == typeof self ? {} : self : global : window : globalThis;\n\nfunction commonjsRequire$2() {\n throw new Error(\"Dynamic requires are not currently supported by rollup-plugin-commonjs\");\n}\n\nfunction unwrapExports(e) {\n return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, \"default\") ? e[\"default\"] : e;\n}\n\nfunction createCommonjsModule$2(e, t) {\n return t = {\n exports: {}\n }, e(t, t.exports), t.exports;\n}\n\nfunction getCjsExportFromNamespace(e) {\n return e && e[\"default\"] || e;\n}\n\nvar componentEmitter = createCommonjsModule$2(function (e) {\n function t(e) {\n if (e) return o(e);\n }\n\n function o(e) {\n for (var o in t.prototype) e[o] = t.prototype[o];\n\n return e;\n }\n\n e.exports = t, t.prototype.on = t.prototype.addEventListener = function (e, t) {\n return this._callbacks = this._callbacks || {}, (this._callbacks[\"$\" + e] = this._callbacks[\"$\" + e] || []).push(t), this;\n }, t.prototype.once = function (e, t) {\n function o() {\n this.off(e, o), t.apply(this, arguments);\n }\n\n return o.fn = t, this.on(e, o), this;\n }, t.prototype.off = t.prototype.removeListener = t.prototype.removeAllListeners = t.prototype.removeEventListener = function (e, t) {\n if (this._callbacks = this._callbacks || {}, 0 == arguments.length) return this._callbacks = {}, this;\n var o = this._callbacks[\"$\" + e];\n if (!o) return this;\n if (1 == arguments.length) return delete this._callbacks[\"$\" + e], this;\n\n for (var n = 0, a; n < o.length; n++) if (a = o[n], a === t || a.fn === t) {\n o.splice(n, 1);\n break;\n }\n\n return 0 === o.length && delete this._callbacks[\"$\" + e], this;\n }, t.prototype.emit = function (e) {\n this._callbacks = this._callbacks || {};\n\n for (var t = Array(arguments.length - 1), o = this._callbacks[\"$\" + e], n = 1; n < arguments.length; n++) t[n - 1] = arguments[n];\n\n if (o) {\n o = o.slice(0);\n\n for (var n = 0, a = o.length; n < a; ++n) o[n].apply(this, t);\n }\n\n return this;\n }, t.prototype.listeners = function (e) {\n return this._callbacks = this._callbacks || {}, this._callbacks[\"$\" + e] || [];\n }, t.prototype.hasListeners = function (e) {\n return !!this.listeners(e).length;\n };\n});\n\nfunction parseDOT(e) {\n return dot = e, parseGraph();\n}\n\nvar NODE_ATTR_MAPPING = {\n fontsize: \"font.size\",\n fontcolor: \"font.color\",\n labelfontcolor: \"font.color\",\n fontname: \"font.face\",\n color: [\"color.border\", \"color.background\"],\n fillcolor: \"color.background\",\n tooltip: \"title\",\n labeltooltip: \"title\"\n},\n EDGE_ATTR_MAPPING = Object.create(NODE_ATTR_MAPPING);\nEDGE_ATTR_MAPPING.color = \"color.color\", EDGE_ATTR_MAPPING.style = \"dashes\";\nvar TOKENTYPE = {\n NULL: 0,\n DELIMITER: 1,\n IDENTIFIER: 2,\n UNKNOWN: 3\n},\n DELIMITERS = {\n \"{\": !0,\n \"}\": !0,\n \"[\": !0,\n \"]\": !0,\n \";\": !0,\n \"=\": !0,\n \",\": !0,\n \"->\": !0,\n \"--\": !0\n},\n dot = \"\",\n index$1 = 0,\n c = \"\",\n token = \"\",\n tokenType = TOKENTYPE.NULL;\n\nfunction first() {\n index$1 = 0, c = dot.charAt(0);\n}\n\nfunction next() {\n index$1++, c = dot.charAt(index$1);\n}\n\nfunction nextPreview() {\n return dot.charAt(index$1 + 1);\n}\n\nvar regexAlphaNumeric = /[a-zA-Z_0-9.:#]/;\n\nfunction isAlphaNumeric(e) {\n return regexAlphaNumeric.test(e);\n}\n\nfunction merge(e, t) {\n if (e || (e = {}), t) for (var o in t) t.hasOwnProperty(o) && (e[o] = t[o]);\n return e;\n}\n\nfunction setValue(e, t, n) {\n for (var i = t.split(\".\"), a = e; i.length;) {\n var d = i.shift();\n i.length ? (!a[d] && (a[d] = {}), a = a[d]) : a[d] = n;\n }\n}\n\nfunction addNode(e, t) {\n for (var o = null, n = [e], a = e, d, s; a.parent;) n.push(a.parent), a = a.parent;\n\n if (a.nodes) for (d = 0, s = a.nodes.length; d < s; d++) if (t.id === a.nodes[d].id) {\n o = a.nodes[d];\n break;\n }\n\n for (o || (o = {\n id: t.id\n }, e.node && (o.attr = merge(o.attr, e.node))), d = n.length - 1; 0 <= d; d--) {\n var r = n[d];\n r.nodes || (r.nodes = []), -1 === r.nodes.indexOf(o) && r.nodes.push(o);\n }\n\n t.attr && (o.attr = merge(o.attr, t.attr));\n}\n\nfunction addEdge(e, t) {\n if (e.edges || (e.edges = []), e.edges.push(t), e.edge) {\n var o = merge({}, e.edge);\n t.attr = merge(o, t.attr);\n }\n}\n\nfunction createEdge(e, t, o, n, i) {\n var a = {\n from: t,\n to: o,\n type: n\n };\n return e.edge && (a.attr = merge({}, e.edge)), a.attr = merge(a.attr || {}, i), null != i && i.hasOwnProperty(\"arrows\") && null != i.arrows && (a.arrows = {\n to: {\n enabled: !0,\n type: i.arrows.type\n }\n }, i.arrows = null), a;\n}\n\nfunction getToken() {\n for (tokenType = TOKENTYPE.NULL, token = \"\"; \" \" === c || \"\\t\" === c || \"\\n\" === c || \"\\r\" === c;) next();\n\n do {\n var e = !1;\n\n if (\"#\" === c) {\n for (var t = index$1 - 1; \" \" === dot.charAt(t) || \"\\t\" === dot.charAt(t);) t--;\n\n if (\"\\n\" === dot.charAt(t) || \"\" === dot.charAt(t)) {\n for (; \"\" != c && \"\\n\" != c;) next();\n\n e = !0;\n }\n }\n\n if (\"/\" === c && \"/\" === nextPreview()) {\n for (; \"\" != c && \"\\n\" != c;) next();\n\n e = !0;\n }\n\n if (\"/\" === c && \"*\" === nextPreview()) {\n for (; \"\" != c;) if (\"*\" === c && \"/\" === nextPreview()) {\n next(), next();\n break;\n } else next();\n\n e = !0;\n }\n\n for (; \" \" === c || \"\\t\" === c || \"\\n\" === c || \"\\r\" === c;) next();\n } while (e);\n\n if (\"\" === c) return void (tokenType = TOKENTYPE.DELIMITER);\n var o = c + nextPreview();\n if (DELIMITERS[o]) return tokenType = TOKENTYPE.DELIMITER, token = o, next(), void next();\n if (DELIMITERS[c]) return tokenType = TOKENTYPE.DELIMITER, token = c, void next();\n\n if (isAlphaNumeric(c) || \"-\" === c) {\n for (token += c, next(); isAlphaNumeric(c);) token += c, next();\n\n return \"false\" === token ? token = !1 : \"true\" === token ? token = !0 : !isNaN(+token) && (token = +token), void (tokenType = TOKENTYPE.IDENTIFIER);\n }\n\n if (\"\\\"\" === c) {\n for (next(); \"\" != c && (\"\\\"\" != c || \"\\\"\" === c && \"\\\"\" === nextPreview());) \"\\\"\" === c ? (token += c, next()) : \"\\\\\" === c && \"n\" === nextPreview() ? (token += \"\\n\", next()) : token += c, next();\n\n if (\"\\\"\" != c) throw newSyntaxError(\"End of string \\\" expected\");\n return next(), void (tokenType = TOKENTYPE.IDENTIFIER);\n }\n\n for (tokenType = TOKENTYPE.UNKNOWN; \"\" != c;) token += c, next();\n\n throw new SyntaxError(\"Syntax error in part \\\"\" + chop(token, 30) + \"\\\"\");\n}\n\nfunction parseGraph() {\n var e = {};\n if (first(), getToken(), \"strict\" === token && (e.strict = !0, getToken()), (\"graph\" === token || \"digraph\" === token) && (e.type = token, getToken()), tokenType === TOKENTYPE.IDENTIFIER && (e.id = token, getToken()), \"{\" != token) throw newSyntaxError(\"Angle bracket { expected\");\n if (getToken(), parseStatements(e), \"}\" != token) throw newSyntaxError(\"Angle bracket } expected\");\n if (getToken(), \"\" !== token) throw newSyntaxError(\"End of file expected\");\n return getToken(), delete e.node, delete e.edge, delete e.graph, e;\n}\n\nfunction parseStatements(e) {\n for (; \"\" !== token && \"}\" != token;) parseStatement(e), \";\" === token && getToken();\n}\n\nfunction parseStatement(e) {\n var t = parseSubgraph(e);\n if (t) return void parseEdge(e, t);\n var o = parseAttributeStatement(e);\n\n if (!o) {\n if (tokenType != TOKENTYPE.IDENTIFIER) throw newSyntaxError(\"Identifier expected\");\n var n = token;\n\n if (getToken(), \"=\" === token) {\n if (getToken(), tokenType != TOKENTYPE.IDENTIFIER) throw newSyntaxError(\"Identifier expected\");\n e[n] = token, getToken();\n } else parseNodeStatement(e, n);\n }\n}\n\nfunction parseSubgraph(e) {\n var t = null;\n\n if (\"subgraph\" === token && (t = {}, t.type = \"subgraph\", getToken(), tokenType === TOKENTYPE.IDENTIFIER && (t.id = token, getToken())), \"{\" === token) {\n if (getToken(), t || (t = {}), t.parent = e, t.node = e.node, t.edge = e.edge, t.graph = e.graph, parseStatements(t), \"}\" != token) throw newSyntaxError(\"Angle bracket } expected\");\n getToken(), delete t.node, delete t.edge, delete t.graph, delete t.parent, e.subgraphs || (e.subgraphs = []), e.subgraphs.push(t);\n }\n\n return t;\n}\n\nfunction parseAttributeStatement(e) {\n return \"node\" === token ? (getToken(), e.node = parseAttributeList(), \"node\") : \"edge\" === token ? (getToken(), e.edge = parseAttributeList(), \"edge\") : \"graph\" === token ? (getToken(), e.graph = parseAttributeList(), \"graph\") : null;\n}\n\nfunction parseNodeStatement(e, t) {\n var o = {\n id: t\n },\n n = parseAttributeList();\n n && (o.attr = n), addNode(e, o), parseEdge(e, t);\n}\n\nfunction parseEdge(e, t) {\n for (; \"->\" === token || \"--\" === token;) {\n var o = token,\n n;\n getToken();\n var i = parseSubgraph(e);\n if (i) n = i;else {\n if (tokenType != TOKENTYPE.IDENTIFIER) throw newSyntaxError(\"Identifier or subgraph expected\");\n n = token, addNode(e, {\n id: n\n }), getToken();\n }\n var a = parseAttributeList(),\n d = createEdge(e, t, n, o, a);\n addEdge(e, d), t = n;\n }\n}\n\nfunction parseAttributeList() {\n for (var e = null, t = {\n dashed: !0,\n solid: !1,\n dotted: [1, 5]\n }, o = {\n dot: \"circle\",\n box: \"box\",\n crow: \"crow\",\n curve: \"curve\",\n icurve: \"inv_curve\",\n normal: \"triangle\",\n inv: \"inv_triangle\",\n diamond: \"diamond\",\n tee: \"bar\",\n vee: \"vee\"\n }, n = [], a = [], d; \"[\" === token;) {\n for (getToken(), e = {}; \"\" !== token && \"]\" != token;) {\n if (tokenType != TOKENTYPE.IDENTIFIER) throw newSyntaxError(\"Attribute name expected\");\n var s = token;\n if (getToken(), \"=\" != token) throw newSyntaxError(\"Equal sign = expected\");\n if (getToken(), tokenType != TOKENTYPE.IDENTIFIER) throw newSyntaxError(\"Attribute value expected\");\n var r = token;\n \"style\" === s && (r = t[r]);\n var l;\n \"arrowhead\" === s && (l = o[r], s = \"arrows\", r = {\n to: {\n enabled: !0,\n type: l\n }\n }), \"arrowtail\" === s && (l = o[r], s = \"arrows\", r = {\n from: {\n enabled: !0,\n type: l\n }\n }), n.push({\n attr: e,\n name: s,\n value: r\n }), a.push(s), getToken(), \",\" == token && getToken();\n }\n\n if (\"]\" != token) throw newSyntaxError(\"Bracket ] expected\");\n getToken();\n }\n\n if (a.includes(\"dir\")) {\n var c = {\n arrows: {}\n };\n\n for (d = 0; d < n.length; d++) if (!(\"arrows\" === n[d].name)) \"dir\" === n[d].name && (c.dir = d);else if (null != n[d].value.to) c.arrows.to = d;else if (null != n[d].value.from) c.arrows.from = d;else throw newSyntaxError(\"Invalid value of arrows\");\n\n var u = n[c.dir].value;\n if (!a.includes(\"arrows\")) if (\"both\" === u) n.push({\n attr: n[c.dir].attr,\n name: \"arrows\",\n value: {\n to: {\n enabled: !0\n }\n }\n }), c.arrows.to = n.length - 1, n.push({\n attr: n[c.dir].attr,\n name: \"arrows\",\n value: {\n from: {\n enabled: !0\n }\n }\n }), c.arrows.from = n.length - 1;else if (\"forward\" === u) n.push({\n attr: n[c.dir].attr,\n name: \"arrows\",\n value: {\n to: {\n enabled: !0\n }\n }\n }), c.arrows.to = n.length - 1;else if (\"back\" === u) n.push({\n attr: n[c.dir].attr,\n name: \"arrows\",\n value: {\n from: {\n enabled: !0\n }\n }\n }), c.arrows.from = n.length - 1;else if (\"none\" === u) n.push({\n attr: n[c.dir].attr,\n name: \"arrows\",\n value: \"\"\n }), c.arrows.to = n.length - 1;else throw newSyntaxError(\"Invalid dir type \\\"\" + u + \"\\\"\");\n var p, h;\n if (\"both\" === u) c.arrows.to && c.arrows.from ? (h = n[c.arrows.to].value.to.type, p = n[c.arrows.from].value.from.type, n[c.arrows.to] = {\n attr: n[c.arrows.to].attr,\n name: n[c.arrows.to].name,\n value: {\n to: {\n enabled: !0,\n type: h\n },\n from: {\n enabled: !0,\n type: p\n }\n }\n }, n.splice(c.arrows.from, 1)) : c.arrows.to ? (h = n[c.arrows.to].value.to.type, p = \"arrow\", n[c.arrows.to] = {\n attr: n[c.arrows.to].attr,\n name: n[c.arrows.to].name,\n value: {\n to: {\n enabled: !0,\n type: h\n },\n from: {\n enabled: !0,\n type: p\n }\n }\n }) : c.arrows.from && (h = \"arrow\", p = n[c.arrows.from].value.from.type, n[c.arrows.from] = {\n attr: n[c.arrows.from].attr,\n name: n[c.arrows.from].name,\n value: {\n to: {\n enabled: !0,\n type: h\n },\n from: {\n enabled: !0,\n type: p\n }\n }\n });else if (\"back\" === u) c.arrows.to && c.arrows.from ? (h = \"\", p = n[c.arrows.from].value.from.type, n[c.arrows.from] = {\n attr: n[c.arrows.from].attr,\n name: n[c.arrows.from].name,\n value: {\n to: {\n enabled: !0,\n type: h\n },\n from: {\n enabled: !0,\n type: p\n }\n }\n }) : c.arrows.to ? (h = \"\", p = \"arrow\", c.arrows.from = c.arrows.to, n[c.arrows.from] = {\n attr: n[c.arrows.from].attr,\n name: n[c.arrows.from].name,\n value: {\n to: {\n enabled: !0,\n type: h\n },\n from: {\n enabled: !0,\n type: p\n }\n }\n }) : c.arrows.from && (h = \"\", p = n[c.arrows.from].value.from.type, n[c.arrows.to] = {\n attr: n[c.arrows.from].attr,\n name: n[c.arrows.from].name,\n value: {\n to: {\n enabled: !0,\n type: h\n },\n from: {\n enabled: !0,\n type: p\n }\n }\n }), n[c.arrows.from] = {\n attr: n[c.arrows.from].attr,\n name: n[c.arrows.from].name,\n value: {\n from: {\n enabled: !0,\n type: n[c.arrows.from].value.from.type\n }\n }\n };else if (\"none\" === u) {\n var m;\n m = c.arrows.to ? c.arrows.to : c.arrows.from, n[m] = {\n attr: n[m].attr,\n name: n[m].name,\n value: \"\"\n };\n } else if (\"forward\" === u) c.arrows.to && c.arrows.from ? (h = n[c.arrows.to].value.to.type, p = \"\", n[c.arrows.to] = {\n attr: n[c.arrows.to].attr,\n name: n[c.arrows.to].name,\n value: {\n to: {\n enabled: !0,\n type: h\n },\n from: {\n enabled: !0,\n type: p\n }\n }\n }) : c.arrows.to ? (h = n[c.arrows.to].value.to.type, p = \"\", n[c.arrows.to] = {\n attr: n[c.arrows.to].attr,\n name: n[c.arrows.to].name,\n value: {\n to: {\n enabled: !0,\n type: h\n },\n from: {\n enabled: !0,\n type: p\n }\n }\n }) : c.arrows.from && (h = \"arrow\", p = \"\", c.arrows.to = c.arrows.from, n[c.arrows.to] = {\n attr: n[c.arrows.to].attr,\n name: n[c.arrows.to].name,\n value: {\n to: {\n enabled: !0,\n type: h\n },\n from: {\n enabled: !0,\n type: p\n }\n }\n }), n[c.arrows.to] = {\n attr: n[c.arrows.to].attr,\n name: n[c.arrows.to].name,\n value: {\n to: {\n enabled: !0,\n type: n[c.arrows.to].value.to.type\n }\n }\n };else throw newSyntaxError(\"Invalid dir type \\\"\" + u + \"\\\"\");\n n.splice(c.dir, 1);\n }\n\n var g;\n\n if (a.includes(\"penwidth\")) {\n var y = [];\n\n for (g = n.length, d = 0; d < g; d++) \"width\" !== n[d].name && (\"penwidth\" === n[d].name && (n[d].name = \"width\"), y.push(n[d]));\n\n n = y;\n }\n\n for (g = n.length, d = 0; d < g; d++) setValue(n[d].attr, n[d].name, n[d].value);\n\n return e;\n}\n\nfunction newSyntaxError(e) {\n return new SyntaxError(e + \", got \\\"\" + chop(token, 30) + \"\\\" (char \" + index$1 + \")\");\n}\n\nfunction chop(e, t) {\n return e.length <= t ? e : e.substr(0, 27) + \"...\";\n}\n\nfunction forEach2(e, t, o) {\n Array.isArray(e) ? e.forEach(function (e) {\n Array.isArray(t) ? t.forEach(function (t) {\n o(e, t);\n }) : o(e, t);\n }) : Array.isArray(t) ? t.forEach(function (t) {\n o(e, t);\n }) : o(e, t);\n}\n\nfunction setProp(e, t, o) {\n for (var n = t.split(\".\"), a = n.pop(), d = e, s = 0, r; s < n.length; s++) r = n[s], r in d || (d[r] = {}), d = d[r];\n\n return d[a] = o, e;\n}\n\nfunction convertAttr(e, t) {\n var o = {};\n\n for (var n in e) if (e.hasOwnProperty(n)) {\n var i = t[n];\n Array.isArray(i) ? i.forEach(function (t) {\n setProp(o, t, e[n]);\n }) : \"string\" == typeof i ? setProp(o, i, e[n]) : setProp(o, n, e[n]);\n }\n\n return o;\n}\n\nfunction DOTToGraph(e) {\n var t = parseDOT(e),\n o = {\n nodes: [],\n edges: [],\n options: {}\n };\n\n if (t.nodes && t.nodes.forEach(function (e) {\n var t = {\n id: e.id,\n label: (e.label || e.id) + \"\"\n };\n merge(t, convertAttr(e.attr, NODE_ATTR_MAPPING)), t.image && (t.shape = \"image\"), o.nodes.push(t);\n }), t.edges) {\n var n = function (e) {\n var t = {\n from: e.from,\n to: e.to\n };\n return merge(t, convertAttr(e.attr, EDGE_ATTR_MAPPING)), null == t.arrows && \"->\" === e.type && (t.arrows = \"to\"), t;\n };\n\n t.edges.forEach(function (e) {\n var t, i;\n t = e.from instanceof Object ? e.from.nodes : {\n id: e.from\n }, i = e.to instanceof Object ? e.to.nodes : {\n id: e.to\n }, e.from instanceof Object && e.from.edges && e.from.edges.forEach(function (e) {\n var t = n(e);\n o.edges.push(t);\n }), forEach2(t, i, function (t, i) {\n var a = createEdge(o, t.id, i.id, e.type, e.attr),\n d = n(a);\n o.edges.push(d);\n }), e.to instanceof Object && e.to.edges && e.to.edges.forEach(function (e) {\n var t = n(e);\n o.edges.push(t);\n });\n });\n }\n\n return t.attr && (o.options = t.attr), o;\n}\n\nvar parseDOT_1 = parseDOT,\n DOTToGraph_1 = DOTToGraph,\n dotparser = {\n parseDOT: parseDOT_1,\n DOTToGraph: DOTToGraph_1\n},\n dotparser$1 = Object.freeze({\n default: dotparser,\n __moduleExports: dotparser,\n parseDOT: parseDOT_1,\n DOTToGraph: DOTToGraph_1\n});\n\nfunction parseGephi(e, t) {\n var o = {\n edges: {\n inheritColor: !1\n },\n nodes: {\n fixed: !1,\n parseColor: !1\n }\n };\n null != t && (null != t.fixed && (o.nodes.fixed = t.fixed), null != t.parseColor && (o.nodes.parseColor = t.parseColor), null != t.inheritColor && (o.edges.inheritColor = t.inheritColor));\n var n = e.edges,\n i = n.map(function (e) {\n var t = {\n from: e.source,\n id: e.id,\n to: e.target\n };\n return null != e.attributes && (t.attributes = e.attributes), null != e.label && (t.label = e.label), null != e.attributes && null != e.attributes.title && (t.title = e.attributes.title), \"Directed\" === e.type && (t.arrows = \"to\"), e.color && !1 === o.edges.inheritColor && (t.color = e.color), t;\n }),\n a = e.nodes.map(function (e) {\n var t = {\n id: e.id,\n fixed: o.nodes.fixed && null != e.x && null != e.y\n };\n return null != e.attributes && (t.attributes = e.attributes), null != e.label && (t.label = e.label), null != e.size && (t.size = e.size), null != e.attributes && null != e.attributes.title && (t.title = e.attributes.title), null != e.title && (t.title = e.title), null != e.x && (t.x = e.x), null != e.y && (t.y = e.y), null != e.color && (!0 === o.nodes.parseColor ? t.color = e.color : t.color = {\n background: e.color,\n border: e.color,\n highlight: {\n background: e.color,\n border: e.color\n },\n hover: {\n background: e.color,\n border: e.color\n }\n }), t;\n });\n return {\n nodes: a,\n edges: i\n };\n}\n\nvar gephiParser = Object.freeze({\n parseGephi: parseGephi\n}),\n Activator = Object.freeze({}),\n keycharm = createCommonjsModule$2(function (e) {\n (function (t, o) {\n e.exports = o();\n })(commonjsGlobal$2, function () {\n function e(e) {\n var t = String.fromCharCode,\n o = e && e.preventDefault || !1,\n n = e && e.container || window,\n a = {},\n d = {\n keydown: {},\n keyup: {}\n },\n s = {},\n r;\n\n for (r = 97; 122 >= r; r++) s[t(r)] = {\n code: 65 + (r - 97),\n shift: !1\n };\n\n for (r = 65; 90 >= r; r++) s[t(r)] = {\n code: r,\n shift: !0\n };\n\n for (r = 0; 9 >= r; r++) s[\"\" + r] = {\n code: 48 + r,\n shift: !1\n };\n\n for (r = 1; 12 >= r; r++) s[\"F\" + r] = {\n code: 111 + r,\n shift: !1\n };\n\n for (r = 0; 9 >= r; r++) s[\"num\" + r] = {\n code: 96 + r,\n shift: !1\n };\n\n s[\"num*\"] = {\n code: 106,\n shift: !1\n }, s[\"num+\"] = {\n code: 107,\n shift: !1\n }, s[\"num-\"] = {\n code: 109,\n shift: !1\n }, s[\"num/\"] = {\n code: 111,\n shift: !1\n }, s[\"num.\"] = {\n code: 110,\n shift: !1\n }, s.left = {\n code: 37,\n shift: !1\n }, s.up = {\n code: 38,\n shift: !1\n }, s.right = {\n code: 39,\n shift: !1\n }, s.down = {\n code: 40,\n shift: !1\n }, s.space = {\n code: 32,\n shift: !1\n }, s.enter = {\n code: 13,\n shift: !1\n }, s.shift = {\n code: 16,\n shift: void 0\n }, s.esc = {\n code: 27,\n shift: !1\n }, s.backspace = {\n code: 8,\n shift: !1\n }, s.tab = {\n code: 9,\n shift: !1\n }, s.ctrl = {\n code: 17,\n shift: !1\n }, s.alt = {\n code: 18,\n shift: !1\n }, s[\"delete\"] = {\n code: 46,\n shift: !1\n }, s.pageup = {\n code: 33,\n shift: !1\n }, s.pagedown = {\n code: 34,\n shift: !1\n }, s[\"=\"] = {\n code: 187,\n shift: !1\n }, s[\"-\"] = {\n code: 189,\n shift: !1\n }, s[\"]\"] = {\n code: 221,\n shift: !1\n }, s[\"[\"] = {\n code: 219,\n shift: !1\n };\n\n var l = function (e) {\n u(e, \"keydown\");\n },\n c = function (e) {\n u(e, \"keyup\");\n },\n u = function (e, t) {\n if (void 0 !== d[t][e.keyCode]) {\n for (var n = d[t][e.keyCode], a = 0; a < n.length; a++) void 0 === n[a].shift ? n[a].fn(e) : !0 == n[a].shift && !0 == e.shiftKey ? n[a].fn(e) : !1 == n[a].shift && !1 == e.shiftKey && n[a].fn(e);\n\n !0 == o && e.preventDefault();\n }\n };\n\n return a.bind = function (e, t, o) {\n if (void 0 === o && (o = \"keydown\"), void 0 === s[e]) throw new Error(\"unsupported key: \" + e);\n void 0 === d[o][s[e].code] && (d[o][s[e].code] = []), d[o][s[e].code].push({\n fn: t,\n shift: s[e].shift\n });\n }, a.bindAll = function (e, t) {\n for (var o in void 0 === t && (t = \"keydown\"), s) s.hasOwnProperty(o) && a.bind(o, e, t);\n }, a.getKey = function (e) {\n for (var t in s) if (s.hasOwnProperty(t)) {\n if (!0 == e.shiftKey && !0 == s[t].shift && e.keyCode == s[t].code) return t;\n if (!1 == e.shiftKey && !1 == s[t].shift && e.keyCode == s[t].code) return t;\n if (e.keyCode == s[t].code && \"shift\" == t) return t;\n }\n\n return \"unknown key, currently not supported\";\n }, a.unbind = function (e, t, o) {\n if (void 0 === o && (o = \"keydown\"), void 0 === s[e]) throw new Error(\"unsupported key: \" + e);\n\n if (void 0 !== t) {\n var n = [],\n a = d[o][s[e].code];\n if (void 0 !== a) for (var r = 0; r < a.length; r++) (a[r].fn != t || a[r].shift != s[e].shift) && n.push(d[o][s[e].code][r]);\n d[o][s[e].code] = n;\n } else d[o][s[e].code] = [];\n }, a.reset = function () {\n d = {\n keydown: {},\n keyup: {}\n };\n }, a.destroy = function () {\n d = {\n keydown: {},\n keyup: {}\n }, n.removeEventListener(\"keydown\", l, !0), n.removeEventListener(\"keyup\", c, !0);\n }, n.addEventListener(\"keydown\", l, !0), n.addEventListener(\"keyup\", c, !0), a;\n }\n\n return e;\n });\n}),\n keycharm$1 = Object.freeze({\n default: keycharm,\n __moduleExports: keycharm\n});\n\nfunction _extends() {\n return _extends = Object.assign || function (e) {\n for (var t = 1, o; t < arguments.length; t++) for (var n in o = arguments[t], o) Object.prototype.hasOwnProperty.call(o, n) && (e[n] = o[n]);\n\n return e;\n }, _extends.apply(this, arguments);\n}\n\nfunction _inheritsLoose(e, t) {\n e.prototype = Object.create(t.prototype), e.prototype.constructor = e, e.__proto__ = t;\n}\n\nfunction _assertThisInitialized$1(e) {\n if (void 0 === e) throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n return e;\n}\n\nvar assign = \"function\" == typeof Object.assign ? Object.assign : function (e) {\n if (void 0 === e || null === e) throw new TypeError(\"Cannot convert undefined or null to object\");\n\n for (var t = Object(e), o = 1, n; o < arguments.length; o++) if (n = arguments[o], void 0 !== n && null !== n) for (var i in n) n.hasOwnProperty(i) && (t[i] = n[i]);\n\n return t;\n};\nvar assign$1 = assign,\n VENDOR_PREFIXES = [\"\", \"webkit\", \"Moz\", \"MS\", \"ms\", \"o\"],\n TEST_ELEMENT = \"undefined\" == typeof document ? {\n style: {}\n} : document.createElement(\"div\"),\n TYPE_FUNCTION = \"function\",\n round = Math.round,\n abs = Math.abs,\n now = Date.now;\n\nfunction prefixed(e, t) {\n for (var o = t[0].toUpperCase() + t.slice(1), n = 0, a, d; n < VENDOR_PREFIXES.length;) {\n if (a = VENDOR_PREFIXES[n], d = a ? a + o : t, d in e) return d;\n n++;\n }\n}\n\nvar win = \"undefined\" == typeof window ? {} : window;\nvar PREFIXED_TOUCH_ACTION = prefixed(TEST_ELEMENT.style, \"touchAction\"),\n NATIVE_TOUCH_ACTION = PREFIXED_TOUCH_ACTION !== void 0;\n\nfunction getTouchActionProps() {\n if (!NATIVE_TOUCH_ACTION) return !1;\n var e = {},\n t = win.CSS && win.CSS.supports;\n return [\"auto\", \"manipulation\", \"pan-y\", \"pan-x\", \"pan-x pan-y\", \"none\"].forEach(function (o) {\n return e[o] = !t || win.CSS.supports(\"touch-action\", o);\n }), e;\n}\n\nvar TOUCH_ACTION_COMPUTE = \"compute\",\n TOUCH_ACTION_AUTO = \"auto\",\n TOUCH_ACTION_MANIPULATION = \"manipulation\",\n TOUCH_ACTION_NONE = \"none\",\n TOUCH_ACTION_PAN_X = \"pan-x\",\n TOUCH_ACTION_PAN_Y = \"pan-y\",\n TOUCH_ACTION_MAP = getTouchActionProps(),\n MOBILE_REGEX = /mobile|tablet|ip(ad|hone|od)|android/i,\n SUPPORT_TOUCH = \"ontouchstart\" in win,\n SUPPORT_POINTER_EVENTS = prefixed(win, \"PointerEvent\") !== void 0,\n SUPPORT_ONLY_TOUCH = SUPPORT_TOUCH && MOBILE_REGEX.test(navigator.userAgent),\n INPUT_TYPE_TOUCH = \"touch\",\n INPUT_TYPE_PEN = \"pen\",\n INPUT_TYPE_MOUSE = \"mouse\",\n INPUT_TYPE_KINECT = \"kinect\",\n COMPUTE_INTERVAL = 25,\n INPUT_START = 1,\n INPUT_MOVE = 2,\n INPUT_END = 4,\n INPUT_CANCEL = 8,\n DIRECTION_NONE = 1,\n DIRECTION_LEFT = 2,\n DIRECTION_RIGHT = 4,\n DIRECTION_UP = 8,\n DIRECTION_DOWN = 16,\n DIRECTION_HORIZONTAL = DIRECTION_LEFT | DIRECTION_RIGHT,\n DIRECTION_VERTICAL = DIRECTION_UP | DIRECTION_DOWN,\n DIRECTION_ALL = DIRECTION_HORIZONTAL | DIRECTION_VERTICAL,\n PROPS_XY = [\"x\", \"y\"],\n PROPS_CLIENT_XY = [\"clientX\", \"clientY\"];\n\nfunction each(e, t, o) {\n if (e) if (e.forEach) e.forEach(t, o);else if (void 0 !== e.length) for (n = 0; n < e.length;) t.call(o, e[n], n, e), n++;else for (var n in e) e.hasOwnProperty(n) && t.call(o, e[n], n, e);\n}\n\nfunction boolOrFn(e, t) {\n return typeof e === TYPE_FUNCTION ? e.apply(t ? t[0] || void 0 : void 0, t) : e;\n}\n\nfunction inStr(e, t) {\n return -1 < e.indexOf(t);\n}\n\nfunction cleanTouchActions(e) {\n if (inStr(e, TOUCH_ACTION_NONE)) return TOUCH_ACTION_NONE;\n var t = inStr(e, TOUCH_ACTION_PAN_X),\n o = inStr(e, TOUCH_ACTION_PAN_Y);\n return t && o ? TOUCH_ACTION_NONE : t || o ? t ? TOUCH_ACTION_PAN_X : TOUCH_ACTION_PAN_Y : inStr(e, TOUCH_ACTION_MANIPULATION) ? TOUCH_ACTION_MANIPULATION : TOUCH_ACTION_AUTO;\n}\n\nvar TouchAction = function () {\n function e(e, t) {\n this.manager = e, this.set(t);\n }\n\n var t = e.prototype;\n return t.set = function (e) {\n e === TOUCH_ACTION_COMPUTE && (e = this.compute()), NATIVE_TOUCH_ACTION && this.manager.element.style && TOUCH_ACTION_MAP[e] && (this.manager.element.style[PREFIXED_TOUCH_ACTION] = e), this.actions = e.toLowerCase().trim();\n }, t.update = function () {\n this.set(this.manager.options.touchAction);\n }, t.compute = function () {\n var e = [];\n return each(this.manager.recognizers, function (t) {\n boolOrFn(t.options.enable, [t]) && (e = e.concat(t.getTouchAction()));\n }), cleanTouchActions(e.join(\" \"));\n }, t.preventDefaults = function (e) {\n var t = e.srcEvent,\n o = e.offsetDirection;\n if (this.manager.session.prevented) return void t.preventDefault();\n var n = this.actions,\n i = inStr(n, TOUCH_ACTION_NONE) && !TOUCH_ACTION_MAP[TOUCH_ACTION_NONE],\n a = inStr(n, TOUCH_ACTION_PAN_Y) && !TOUCH_ACTION_MAP[TOUCH_ACTION_PAN_Y],\n d = inStr(n, TOUCH_ACTION_PAN_X) && !TOUCH_ACTION_MAP[TOUCH_ACTION_PAN_X];\n\n if (i) {\n var s = 1 === e.pointers.length,\n r = 2 > e.distance,\n l = 250 > e.deltaTime;\n if (s && r && l) return;\n }\n\n return d && a ? void 0 : i || a && o & DIRECTION_HORIZONTAL || d && o & DIRECTION_VERTICAL ? this.preventSrc(t) : void 0;\n }, t.preventSrc = function (e) {\n this.manager.session.prevented = !0, e.preventDefault();\n }, e;\n}();\n\nfunction hasParent$1(e, t) {\n for (; e;) {\n if (e === t) return !0;\n e = e.parentNode;\n }\n\n return !1;\n}\n\nfunction getCenter(e) {\n var t = e.length;\n if (1 === t) return {\n x: round(e[0].clientX),\n y: round(e[0].clientY)\n };\n\n for (var o = 0, n = 0, a = 0; a < t;) o += e[a].clientX, n += e[a].clientY, a++;\n\n return {\n x: round(o / t),\n y: round(n / t)\n };\n}\n\nfunction simpleCloneInputData(e) {\n for (var t = [], o = 0; o < e.pointers.length;) t[o] = {\n clientX: round(e.pointers[o].clientX),\n clientY: round(e.pointers[o].clientY)\n }, o++;\n\n return {\n timeStamp: now(),\n pointers: t,\n center: getCenter(t),\n deltaX: e.deltaX,\n deltaY: e.deltaY\n };\n}\n\nfunction getDistance(e, t, o) {\n o || (o = PROPS_XY);\n var n = t[o[0]] - e[o[0]],\n i = t[o[1]] - e[o[1]];\n return Math.sqrt(n * n + i * i);\n}\n\nfunction getAngle(e, t, o) {\n o || (o = PROPS_XY);\n var n = t[o[0]] - e[o[0]],\n i = t[o[1]] - e[o[1]];\n return 180 * Math.atan2(i, n) / Math.PI;\n}\n\nfunction getDirection(e, t) {\n return e === t ? DIRECTION_NONE : abs(e) >= abs(t) ? 0 > e ? DIRECTION_LEFT : DIRECTION_RIGHT : 0 > t ? DIRECTION_UP : DIRECTION_DOWN;\n}\n\nfunction computeDeltaXY(e, t) {\n var o = t.center,\n n = e.offsetDelta || {},\n i = e.prevDelta || {},\n a = e.prevInput || {};\n (t.eventType === INPUT_START || a.eventType === INPUT_END) && (i = e.prevDelta = {\n x: a.deltaX || 0,\n y: a.deltaY || 0\n }, n = e.offsetDelta = {\n x: o.x,\n y: o.y\n }), t.deltaX = i.x + (o.x - n.x), t.deltaY = i.y + (o.y - n.y);\n}\n\nfunction getVelocity(e, t, o) {\n return {\n x: t / e || 0,\n y: o / e || 0\n };\n}\n\nfunction getScale(e, t) {\n return getDistance(t[0], t[1], PROPS_CLIENT_XY) / getDistance(e[0], e[1], PROPS_CLIENT_XY);\n}\n\nfunction getRotation(e, t) {\n return getAngle(t[1], t[0], PROPS_CLIENT_XY) + getAngle(e[1], e[0], PROPS_CLIENT_XY);\n}\n\nfunction computeIntervalInputData(e, t) {\n var o = e.lastInterval || t,\n n = t.timeStamp - o.timeStamp,\n i,\n a,\n d,\n s;\n\n if (t.eventType !== INPUT_CANCEL && (n > COMPUTE_INTERVAL || o.velocity === void 0)) {\n var r = t.deltaX - o.deltaX,\n l = t.deltaY - o.deltaY,\n c = getVelocity(n, r, l);\n a = c.x, d = c.y, i = abs(c.x) > abs(c.y) ? c.x : c.y, s = getDirection(r, l), e.lastInterval = t;\n } else i = o.velocity, a = o.velocityX, d = o.velocityY, s = o.direction;\n\n t.velocity = i, t.velocityX = a, t.velocityY = d, t.direction = s;\n}\n\nfunction computeInputData(e, t) {\n var o = e.session,\n n = t.pointers,\n i = n.length;\n o.firstInput || (o.firstInput = simpleCloneInputData(t)), 1 < i && !o.firstMultiple ? o.firstMultiple = simpleCloneInputData(t) : 1 === i && (o.firstMultiple = !1);\n var a = o.firstInput,\n d = o.firstMultiple,\n s = d ? d.center : a.center,\n r = t.center = getCenter(n);\n t.timeStamp = now(), t.deltaTime = t.timeStamp - a.timeStamp, t.angle = getAngle(s, r), t.distance = getDistance(s, r), computeDeltaXY(o, t), t.offsetDirection = getDirection(t.deltaX, t.deltaY);\n var l = getVelocity(t.deltaTime, t.deltaX, t.deltaY);\n t.overallVelocityX = l.x, t.overallVelocityY = l.y, t.overallVelocity = abs(l.x) > abs(l.y) ? l.x : l.y, t.scale = d ? getScale(d.pointers, n) : 1, t.rotation = d ? getRotation(d.pointers, n) : 0, t.maxPointers = o.prevInput ? t.pointers.length > o.prevInput.maxPointers ? t.pointers.length : o.prevInput.maxPointers : t.pointers.length, computeIntervalInputData(o, t);\n var c = e.element;\n hasParent$1(t.srcEvent.target, c) && (c = t.srcEvent.target), t.target = c;\n}\n\nfunction inputHandler(e, t, o) {\n var n = o.pointers.length,\n i = o.changedPointers.length,\n a = t & INPUT_START && 0 == n - i;\n o.isFirst = !!a, o.isFinal = !!(t & (INPUT_END | INPUT_CANCEL) && 0 == n - i), a && (e.session = {}), o.eventType = t, computeInputData(e, o), e.emit(\"hammer.input\", o), e.recognize(o), e.session.prevInput = o;\n}\n\nfunction splitStr(e) {\n return e.trim().split(/\\s+/g);\n}\n\nfunction addEventListeners(e, t, o) {\n each(splitStr(t), function (t) {\n e.addEventListener(t, o, !1);\n });\n}\n\nfunction removeEventListeners(e, t, o) {\n each(splitStr(t), function (t) {\n e.removeEventListener(t, o, !1);\n });\n}\n\nfunction getWindowForElement(e) {\n var t = e.ownerDocument || e;\n return t.defaultView || t.parentWindow || window;\n}\n\nvar Input = function () {\n function e(e, t) {\n var o = this;\n this.manager = e, this.callback = t, this.element = e.element, this.target = e.options.inputTarget, this.domHandler = function (t) {\n boolOrFn(e.options.enable, [e]) && o.handler(t);\n }, this.init();\n }\n\n var t = e.prototype;\n return t.handler = function () {}, t.init = function () {\n this.evEl && addEventListeners(this.element, this.evEl, this.domHandler), this.evTarget && addEventListeners(this.target, this.evTarget, this.domHandler), this.evWin && addEventListeners(getWindowForElement(this.element), this.evWin, this.domHandler);\n }, t.destroy = function () {\n this.evEl && removeEventListeners(this.element, this.evEl, this.domHandler), this.evTarget && removeEventListeners(this.target, this.evTarget, this.domHandler), this.evWin && removeEventListeners(getWindowForElement(this.element), this.evWin, this.domHandler);\n }, e;\n}();\n\nfunction inArray(e, t, o) {\n if (e.indexOf && !o) return e.indexOf(t);\n\n for (var n = 0; n < e.length;) {\n if (o && e[n][o] == t || !o && e[n] === t) return n;\n n++;\n }\n\n return -1;\n}\n\nvar POINTER_INPUT_MAP = {\n pointerdown: INPUT_START,\n pointermove: INPUT_MOVE,\n pointerup: INPUT_END,\n pointercancel: INPUT_CANCEL,\n pointerout: INPUT_CANCEL\n},\n IE10_POINTER_TYPE_ENUM = {\n 2: INPUT_TYPE_TOUCH,\n 3: INPUT_TYPE_PEN,\n 4: INPUT_TYPE_MOUSE,\n 5: INPUT_TYPE_KINECT\n},\n POINTER_ELEMENT_EVENTS = \"pointerdown\",\n POINTER_WINDOW_EVENTS = \"pointermove pointerup pointercancel\";\nwin.MSPointerEvent && !win.PointerEvent && (POINTER_ELEMENT_EVENTS = \"MSPointerDown\", POINTER_WINDOW_EVENTS = \"MSPointerMove MSPointerUp MSPointerCancel\");\n\nvar PointerEventInput = function (e) {\n function t() {\n var o = t.prototype,\n n;\n return o.evEl = POINTER_ELEMENT_EVENTS, o.evWin = POINTER_WINDOW_EVENTS, n = e.apply(this, arguments) || this, n.store = n.manager.session.pointerEvents = [], n;\n }\n\n _inheritsLoose(t, e);\n\n var o = t.prototype;\n return o.handler = function (e) {\n var t = this.store,\n o = !1,\n n = e.type.toLowerCase().replace(\"ms\", \"\"),\n i = POINTER_INPUT_MAP[n],\n a = IE10_POINTER_TYPE_ENUM[e.pointerType] || e.pointerType,\n d = inArray(t, e.pointerId, \"pointerId\");\n i & INPUT_START && (0 === e.button || a === INPUT_TYPE_TOUCH) ? 0 > d && (t.push(e), d = t.length - 1) : i & (INPUT_END | INPUT_CANCEL) && (o = !0), 0 > d || (t[d] = e, this.callback(this.manager, i, {\n pointers: t,\n changedPointers: [e],\n pointerType: a,\n srcEvent: e\n }), o && t.splice(d, 1));\n }, t;\n}(Input);\n\nfunction toArray$1(e) {\n return Array.prototype.slice.call(e, 0);\n}\n\nfunction uniqueArray(e, t, o) {\n for (var n = [], a = [], d = 0, s; d < e.length;) s = t ? e[d][t] : e[d], 0 > inArray(a, s) && n.push(e[d]), a[d] = s, d++;\n\n return o && (t ? n = n.sort(function (e, o) {\n return e[t] > o[t];\n }) : n = n.sort()), n;\n}\n\nvar TOUCH_INPUT_MAP = {\n touchstart: INPUT_START,\n touchmove: INPUT_MOVE,\n touchend: INPUT_END,\n touchcancel: INPUT_CANCEL\n},\n TOUCH_TARGET_EVENTS = \"touchstart touchmove touchend touchcancel\",\n TouchInput = function (e) {\n function t() {\n var o;\n return t.prototype.evTarget = TOUCH_TARGET_EVENTS, o = e.apply(this, arguments) || this, o.targetIds = {}, o;\n }\n\n _inheritsLoose(t, e);\n\n var o = t.prototype;\n return o.handler = function (e) {\n var t = TOUCH_INPUT_MAP[e.type],\n o = getTouches.call(this, e, t);\n o && this.callback(this.manager, t, {\n pointers: o[0],\n changedPointers: o[1],\n pointerType: INPUT_TYPE_TOUCH,\n srcEvent: e\n });\n }, t;\n}(Input);\n\nfunction getTouches(e, t) {\n var o = toArray$1(e.touches),\n n = this.targetIds;\n if (t & (INPUT_START | INPUT_MOVE) && 1 === o.length) return n[o[0].identifier] = !0, [o, o];\n var a = toArray$1(e.changedTouches),\n d = [],\n s = this.target,\n r,\n l;\n if (l = o.filter(function (e) {\n return hasParent$1(e.target, s);\n }), t === INPUT_START) for (r = 0; r < l.length;) n[l[r].identifier] = !0, r++;\n\n for (r = 0; r < a.length;) n[a[r].identifier] && d.push(a[r]), t & (INPUT_END | INPUT_CANCEL) && delete n[a[r].identifier], r++;\n\n return d.length ? [uniqueArray(l.concat(d), \"identifier\", !0), d] : void 0;\n}\n\nvar MOUSE_INPUT_MAP = {\n mousedown: INPUT_START,\n mousemove: INPUT_MOVE,\n mouseup: INPUT_END\n},\n MOUSE_ELEMENT_EVENTS = \"mousedown\",\n MOUSE_WINDOW_EVENTS = \"mousemove mouseup\",\n MouseInput = function (e) {\n function t() {\n var o = t.prototype,\n n;\n return o.evEl = MOUSE_ELEMENT_EVENTS, o.evWin = MOUSE_WINDOW_EVENTS, n = e.apply(this, arguments) || this, n.pressed = !1, n;\n }\n\n _inheritsLoose(t, e);\n\n var o = t.prototype;\n return o.handler = function (e) {\n var t = MOUSE_INPUT_MAP[e.type];\n t & INPUT_START && 0 === e.button && (this.pressed = !0), t & INPUT_MOVE && 1 !== e.which && (t = INPUT_END), this.pressed && (t & INPUT_END && (this.pressed = !1), this.callback(this.manager, t, {\n pointers: [e],\n changedPointers: [e],\n pointerType: INPUT_TYPE_MOUSE,\n srcEvent: e\n }));\n }, t;\n}(Input),\n DEDUP_TIMEOUT = 2500,\n DEDUP_DISTANCE = 25;\n\nfunction setLastTouch(e) {\n var t = e.changedPointers,\n o = t[0];\n\n if (o.identifier === this.primaryTouch) {\n var n = {\n x: o.clientX,\n y: o.clientY\n },\n a = this.lastTouches;\n this.lastTouches.push(n);\n\n var d = function () {\n var e = a.indexOf(n);\n -1 < e && a.splice(e, 1);\n };\n\n setTimeout(d, DEDUP_TIMEOUT);\n }\n}\n\nfunction recordTouches(e, t) {\n e & INPUT_START ? (this.primaryTouch = t.changedPointers[0].identifier, setLastTouch.call(this, t)) : e & (INPUT_END | INPUT_CANCEL) && setLastTouch.call(this, t);\n}\n\nfunction isSyntheticEvent(e) {\n for (var o = Math.abs, n = e.srcEvent.clientX, a = e.srcEvent.clientY, d = 0; d < this.lastTouches.length; d++) {\n var s = this.lastTouches[d],\n t = o(n - s.x),\n r = o(a - s.y);\n if (t <= DEDUP_DISTANCE && r <= DEDUP_DISTANCE) return !0;\n }\n\n return !1;\n}\n\nvar TouchMouseInput = function () {\n var e = function (e) {\n function t(t, o) {\n var n;\n return n = e.call(this, t, o) || this, n.handler = function (e, t, o) {\n var i = o.pointerType === INPUT_TYPE_TOUCH,\n a = o.pointerType === INPUT_TYPE_MOUSE;\n\n if (!(a && o.sourceCapabilities && o.sourceCapabilities.firesTouchEvents)) {\n if (i) recordTouches.call(_assertThisInitialized$1(_assertThisInitialized$1(n)), t, o);else if (a && isSyntheticEvent.call(_assertThisInitialized$1(_assertThisInitialized$1(n)), o)) return;\n n.callback(e, t, o);\n }\n }, n.touch = new TouchInput(n.manager, n.handler), n.mouse = new MouseInput(n.manager, n.handler), n.primaryTouch = null, n.lastTouches = [], n;\n }\n\n _inheritsLoose(t, e);\n\n var o = t.prototype;\n return o.destroy = function () {\n this.touch.destroy(), this.mouse.destroy();\n }, t;\n }(Input);\n\n return e;\n}();\n\nfunction createInputInstance(e) {\n var t = e.options.inputClass,\n o;\n return o = t ? t : SUPPORT_POINTER_EVENTS ? PointerEventInput : SUPPORT_ONLY_TOUCH ? TouchInput : SUPPORT_TOUCH ? TouchMouseInput : MouseInput, new o(e, inputHandler);\n}\n\nfunction invokeArrayArg(e, t, o) {\n return !!Array.isArray(e) && (each(e, o[t], o), !0);\n}\n\nvar STATE_POSSIBLE = 1,\n STATE_BEGAN = 2,\n STATE_CHANGED = 4,\n STATE_ENDED = 8,\n STATE_RECOGNIZED = STATE_ENDED,\n STATE_CANCELLED = 16,\n STATE_FAILED = 32,\n _uniqueId = 1;\n\nfunction uniqueId() {\n return _uniqueId++;\n}\n\nfunction getRecognizerByNameIfManager(e, t) {\n var o = t.manager;\n return o ? o.get(e) : e;\n}\n\nfunction stateStr(e) {\n if (e & STATE_CANCELLED) return \"cancel\";\n return e & STATE_ENDED ? \"end\" : e & STATE_CHANGED ? \"move\" : e & STATE_BEGAN ? \"start\" : \"\";\n}\n\nvar Recognizer = function () {\n function e(e) {\n void 0 === e && (e = {}), this.options = _extends({\n enable: !0\n }, e), this.id = uniqueId(), this.manager = null, this.state = STATE_POSSIBLE, this.simultaneous = {}, this.requireFail = [];\n }\n\n var t = e.prototype;\n return t.set = function (e) {\n return assign$1(this.options, e), this.manager && this.manager.touchAction.update(), this;\n }, t.recognizeWith = function (e) {\n if (invokeArrayArg(e, \"recognizeWith\", this)) return this;\n var t = this.simultaneous;\n return e = getRecognizerByNameIfManager(e, this), t[e.id] || (t[e.id] = e, e.recognizeWith(this)), this;\n }, t.dropRecognizeWith = function (e) {\n return invokeArrayArg(e, \"dropRecognizeWith\", this) ? this : (e = getRecognizerByNameIfManager(e, this), delete this.simultaneous[e.id], this);\n }, t.requireFailure = function (e) {\n if (invokeArrayArg(e, \"requireFailure\", this)) return this;\n var t = this.requireFail;\n return e = getRecognizerByNameIfManager(e, this), -1 === inArray(t, e) && (t.push(e), e.requireFailure(this)), this;\n }, t.dropRequireFailure = function (e) {\n if (invokeArrayArg(e, \"dropRequireFailure\", this)) return this;\n e = getRecognizerByNameIfManager(e, this);\n var t = inArray(this.requireFail, e);\n return -1 < t && this.requireFail.splice(t, 1), this;\n }, t.hasRequireFailures = function () {\n return 0 < this.requireFail.length;\n }, t.canRecognizeWith = function (e) {\n return !!this.simultaneous[e.id];\n }, t.emit = function e(t) {\n function e(n) {\n o.manager.emit(n, t);\n }\n\n var o = this,\n n = this.state;\n n < STATE_ENDED && e(o.options.event + stateStr(n)), e(o.options.event), t.additionalEvent && e(t.additionalEvent), n >= STATE_ENDED && e(o.options.event + stateStr(n));\n }, t.tryEmit = function (e) {\n return this.canEmit() ? this.emit(e) : void (this.state = STATE_FAILED);\n }, t.canEmit = function () {\n for (var e = 0; e < this.requireFail.length;) {\n if (!(this.requireFail[e].state & (STATE_FAILED | STATE_POSSIBLE))) return !1;\n e++;\n }\n\n return !0;\n }, t.recognize = function (e) {\n var t = assign$1({}, e);\n return boolOrFn(this.options.enable, [this, t]) ? void (this.state & (STATE_RECOGNIZED | STATE_CANCELLED | STATE_FAILED) && (this.state = STATE_POSSIBLE), this.state = this.process(t), this.state & (STATE_BEGAN | STATE_CHANGED | STATE_ENDED | STATE_CANCELLED) && this.tryEmit(t)) : (this.reset(), void (this.state = STATE_FAILED));\n }, t.process = function () {}, t.getTouchAction = function () {}, t.reset = function () {}, e;\n}(),\n defaults = {\n domEvents: !1,\n touchAction: \"compute\",\n enable: !0,\n inputTarget: null,\n inputClass: null,\n preset: [],\n cssProps: {\n userSelect: \"none\",\n touchSelect: \"none\",\n touchCallout: \"none\",\n contentZooming: \"none\",\n userDrag: \"none\",\n tapHighlightColor: \"rgba(0,0,0,0)\"\n }\n},\n STOP = 1,\n FORCED_STOP = 2;\n\nfunction toggleCssProps(e, t) {\n var o = e.element;\n\n if (o.style) {\n var n;\n each(e.options.cssProps, function (i, a) {\n n = prefixed(o.style, a), t ? (e.oldCssProps[n] = o.style[n], o.style[n] = i) : o.style[n] = e.oldCssProps[n] || \"\";\n }), t || (e.oldCssProps = {});\n }\n}\n\nfunction triggerDomEvent(e, t) {\n var o = document.createEvent(\"Event\");\n o.initEvent(e, !0, !0), o.gesture = t, t.target.dispatchEvent(o);\n}\n\nvar Manager = function () {\n function e(e, t) {\n var o = this;\n this.options = assign$1({}, defaults, t || {}), this.options.inputTarget = this.options.inputTarget || e, this.handlers = {}, this.session = {}, this.recognizers = [], this.oldCssProps = {}, this.element = e, this.input = createInputInstance(this), this.touchAction = new TouchAction(this, this.options.touchAction), toggleCssProps(this, !0), each(this.options.recognizers, function (e) {\n var t = o.add(new e[0](e[1]));\n e[2] && t.recognizeWith(e[2]), e[3] && t.requireFailure(e[3]);\n }, this);\n }\n\n var t = e.prototype;\n return t.set = function (e) {\n return assign$1(this.options, e), e.touchAction && this.touchAction.update(), e.inputTarget && (this.input.destroy(), this.input.target = e.inputTarget, this.input.init()), this;\n }, t.stop = function (e) {\n this.session.stopped = e ? FORCED_STOP : STOP;\n }, t.recognize = function (e) {\n var t = this.session;\n\n if (!t.stopped) {\n this.touchAction.preventDefaults(e);\n var o = this.recognizers,\n n = t.curRecognizer,\n a;\n (!n || n && n.state & STATE_RECOGNIZED) && (t.curRecognizer = null, n = null);\n\n for (var d = 0; d < o.length;) a = o[d], t.stopped !== FORCED_STOP && (!n || a === n || a.canRecognizeWith(n)) ? a.recognize(e) : a.reset(), !n && a.state & (STATE_BEGAN | STATE_CHANGED | STATE_ENDED) && (t.curRecognizer = a, n = a), d++;\n }\n }, t.get = function (e) {\n if (e instanceof Recognizer) return e;\n\n for (var t = this.recognizers, o = 0; o < t.length; o++) if (t[o].options.event === e) return t[o];\n\n return null;\n }, t.add = function (e) {\n if (invokeArrayArg(e, \"add\", this)) return this;\n var t = this.get(e.options.event);\n return t && this.remove(t), this.recognizers.push(e), e.manager = this, this.touchAction.update(), e;\n }, t.remove = function (e) {\n if (invokeArrayArg(e, \"remove\", this)) return this;\n var t = this.get(e);\n\n if (e) {\n var o = this.recognizers,\n n = inArray(o, t);\n -1 !== n && (o.splice(n, 1), this.touchAction.update());\n }\n\n return this;\n }, t.on = function (e, t) {\n if (void 0 === e || void 0 === t) return this;\n var o = this.handlers;\n return each(splitStr(e), function (e) {\n o[e] = o[e] || [], o[e].push(t);\n }), this;\n }, t.off = function (e, t) {\n if (void 0 === e) return this;\n var o = this.handlers;\n return each(splitStr(e), function (e) {\n t ? o[e] && o[e].splice(inArray(o[e], t), 1) : delete o[e];\n }), this;\n }, t.emit = function (e, t) {\n this.options.domEvents && triggerDomEvent(e, t);\n var o = this.handlers[e] && this.handlers[e].slice();\n\n if (o && o.length) {\n t.type = e, t.preventDefault = function () {\n t.srcEvent.preventDefault();\n };\n\n for (var n = 0; n < o.length;) o[n](t), n++;\n }\n }, t.destroy = function () {\n this.element && toggleCssProps(this, !1), this.handlers = {}, this.session = {}, this.input.destroy(), this.element = null;\n }, e;\n}(),\n SINGLE_TOUCH_INPUT_MAP = {\n touchstart: INPUT_START,\n touchmove: INPUT_MOVE,\n touchend: INPUT_END,\n touchcancel: INPUT_CANCEL\n},\n SINGLE_TOUCH_TARGET_EVENTS = \"touchstart\",\n SINGLE_TOUCH_WINDOW_EVENTS = \"touchstart touchmove touchend touchcancel\",\n SingleTouchInput = function (e) {\n function t() {\n var o = t.prototype,\n n;\n return o.evTarget = SINGLE_TOUCH_TARGET_EVENTS, o.evWin = SINGLE_TOUCH_WINDOW_EVENTS, n = e.apply(this, arguments) || this, n.started = !1, n;\n }\n\n _inheritsLoose(t, e);\n\n var o = t.prototype;\n return o.handler = function (e) {\n var t = SINGLE_TOUCH_INPUT_MAP[e.type];\n\n if (t === INPUT_START && (this.started = !0), !!this.started) {\n var o = normalizeSingleTouches.call(this, e, t);\n t & (INPUT_END | INPUT_CANCEL) && 0 == o[0].length - o[1].length && (this.started = !1), this.callback(this.manager, t, {\n pointers: o[0],\n changedPointers: o[1],\n pointerType: INPUT_TYPE_TOUCH,\n srcEvent: e\n });\n }\n }, t;\n}(Input);\n\nfunction normalizeSingleTouches(e, t) {\n var o = toArray$1(e.touches),\n n = toArray$1(e.changedTouches);\n return t & (INPUT_END | INPUT_CANCEL) && (o = uniqueArray(o.concat(n), \"identifier\", !0)), [o, n];\n}\n\nvar AttrRecognizer = function (e) {\n function t(t) {\n return void 0 === t && (t = {}), e.call(this, _extends({\n pointers: 1\n }, t)) || this;\n }\n\n _inheritsLoose(t, e);\n\n var o = t.prototype;\n return o.attrTest = function (e) {\n var t = this.options.pointers;\n return 0 === t || e.pointers.length === t;\n }, o.process = function (e) {\n var t = this.state,\n o = e.eventType,\n n = t & (STATE_BEGAN | STATE_CHANGED),\n i = this.attrTest(e);\n return n && (o & INPUT_CANCEL || !i) ? t | STATE_CANCELLED : n || i ? o & INPUT_END ? t | STATE_ENDED : t & STATE_BEGAN ? t | STATE_CHANGED : STATE_BEGAN : STATE_FAILED;\n }, t;\n}(Recognizer),\n TapRecognizer = function (e) {\n function t(t) {\n var o;\n return void 0 === t && (t = {}), o = e.call(this, _extends({\n event: \"tap\",\n pointers: 1,\n taps: 1,\n interval: 300,\n time: 250,\n threshold: 9,\n posThreshold: 10\n }, t)) || this, o.pTime = !1, o.pCenter = !1, o._timer = null, o._input = null, o.count = 0, o;\n }\n\n _inheritsLoose(t, e);\n\n var o = t.prototype;\n return o.getTouchAction = function () {\n return [TOUCH_ACTION_MANIPULATION];\n }, o.process = function (e) {\n var t = this,\n o = this.options,\n n = e.pointers.length === o.pointers,\n i = e.distance < o.threshold,\n a = e.deltaTime < o.time;\n if (this.reset(), e.eventType & INPUT_START && 0 === this.count) return this.failTimeout();\n\n if (i && a && n) {\n if (e.eventType !== INPUT_END) return this.failTimeout();\n var d = !this.pTime || e.timeStamp - this.pTime < o.interval,\n s = !this.pCenter || getDistance(this.pCenter, e.center) < o.posThreshold;\n this.pTime = e.timeStamp, this.pCenter = e.center, s && d ? this.count += 1 : this.count = 1, this._input = e;\n var r = this.count % o.taps;\n if (0 == r) return this.hasRequireFailures() ? (this._timer = setTimeout(function () {\n t.state = STATE_RECOGNIZED, t.tryEmit();\n }, o.interval), STATE_BEGAN) : STATE_RECOGNIZED;\n }\n\n return STATE_FAILED;\n }, o.failTimeout = function () {\n var e = this;\n return this._timer = setTimeout(function () {\n e.state = STATE_FAILED;\n }, this.options.interval), STATE_FAILED;\n }, o.reset = function () {\n clearTimeout(this._timer);\n }, o.emit = function () {\n this.state === STATE_RECOGNIZED && (this._input.tapCount = this.count, this.manager.emit(this.options.event, this._input));\n }, t;\n}(Recognizer);\n\nfunction directionStr(e) {\n if (e === DIRECTION_DOWN) return \"down\";\n return e === DIRECTION_UP ? \"up\" : e === DIRECTION_LEFT ? \"left\" : e === DIRECTION_RIGHT ? \"right\" : \"\";\n}\n\nvar PanRecognizer = function (e) {\n var o = Math.abs;\n\n function t(t) {\n var o;\n return void 0 === t && (t = {}), o = e.call(this, _extends({\n event: \"pan\",\n threshold: 10,\n pointers: 1,\n direction: DIRECTION_ALL\n }, t)) || this, o.pX = null, o.pY = null, o;\n }\n\n _inheritsLoose(t, e);\n\n var n = t.prototype;\n return n.getTouchAction = function () {\n var e = this.options.direction,\n t = [];\n return e & DIRECTION_HORIZONTAL && t.push(TOUCH_ACTION_PAN_Y), e & DIRECTION_VERTICAL && t.push(TOUCH_ACTION_PAN_X), t;\n }, n.directionTest = function (e) {\n var t = this.options,\n n = !0,\n i = e.distance,\n a = e.direction,\n d = e.deltaX,\n s = e.deltaY;\n return a & t.direction || (t.direction & DIRECTION_HORIZONTAL ? (a = 0 === d ? DIRECTION_NONE : 0 > d ? DIRECTION_LEFT : DIRECTION_RIGHT, n = d !== this.pX, i = o(e.deltaX)) : (a = 0 === s ? DIRECTION_NONE : 0 > s ? DIRECTION_UP : DIRECTION_DOWN, n = s !== this.pY, i = o(e.deltaY))), e.direction = a, n && i > t.threshold && a & t.direction;\n }, n.attrTest = function (e) {\n return AttrRecognizer.prototype.attrTest.call(this, e) && (this.state & STATE_BEGAN || !(this.state & STATE_BEGAN) && this.directionTest(e));\n }, n.emit = function (t) {\n this.pX = t.deltaX, this.pY = t.deltaY;\n var o = directionStr(t.direction);\n o && (t.additionalEvent = this.options.event + o), e.prototype.emit.call(this, t);\n }, t;\n}(AttrRecognizer),\n SwipeRecognizer = function (e) {\n function t(t) {\n return void 0 === t && (t = {}), e.call(this, _extends({\n event: \"swipe\",\n threshold: 10,\n velocity: .3,\n direction: DIRECTION_HORIZONTAL | DIRECTION_VERTICAL,\n pointers: 1\n }, t)) || this;\n }\n\n _inheritsLoose(t, e);\n\n var o = t.prototype;\n return o.getTouchAction = function () {\n return PanRecognizer.prototype.getTouchAction.call(this);\n }, o.attrTest = function (t) {\n var o = this.options.direction,\n n;\n return o & (DIRECTION_HORIZONTAL | DIRECTION_VERTICAL) ? n = t.overallVelocity : o & DIRECTION_HORIZONTAL ? n = t.overallVelocityX : o & DIRECTION_VERTICAL && (n = t.overallVelocityY), e.prototype.attrTest.call(this, t) && o & t.offsetDirection && t.distance > this.options.threshold && t.maxPointers === this.options.pointers && abs(n) > this.options.velocity && t.eventType & INPUT_END;\n }, o.emit = function (e) {\n var t = directionStr(e.offsetDirection);\n t && this.manager.emit(this.options.event + t, e), this.manager.emit(this.options.event, e);\n }, t;\n}(AttrRecognizer),\n PinchRecognizer = function (e) {\n var o = Math.abs;\n\n function t(t) {\n return void 0 === t && (t = {}), e.call(this, _extends({\n event: \"pinch\",\n threshold: 0,\n pointers: 2\n }, t)) || this;\n }\n\n _inheritsLoose(t, e);\n\n var n = t.prototype;\n return n.getTouchAction = function () {\n return [TOUCH_ACTION_NONE];\n }, n.attrTest = function (t) {\n return e.prototype.attrTest.call(this, t) && (o(t.scale - 1) > this.options.threshold || this.state & STATE_BEGAN);\n }, n.emit = function (t) {\n if (1 !== t.scale) {\n var o = 1 > t.scale ? \"in\" : \"out\";\n t.additionalEvent = this.options.event + o;\n }\n\n e.prototype.emit.call(this, t);\n }, t;\n}(AttrRecognizer),\n RotateRecognizer = function (e) {\n var o = Math.abs;\n\n function t(t) {\n return void 0 === t && (t = {}), e.call(this, _extends({\n event: \"rotate\",\n threshold: 0,\n pointers: 2\n }, t)) || this;\n }\n\n _inheritsLoose(t, e);\n\n var n = t.prototype;\n return n.getTouchAction = function () {\n return [TOUCH_ACTION_NONE];\n }, n.attrTest = function (t) {\n return e.prototype.attrTest.call(this, t) && (o(t.rotation) > this.options.threshold || this.state & STATE_BEGAN);\n }, t;\n}(AttrRecognizer),\n PressRecognizer = function (e) {\n function t(t) {\n var o;\n return void 0 === t && (t = {}), o = e.call(this, _extends({\n event: \"press\",\n pointers: 1,\n time: 251,\n threshold: 9\n }, t)) || this, o._timer = null, o._input = null, o;\n }\n\n _inheritsLoose(t, e);\n\n var o = t.prototype;\n return o.getTouchAction = function () {\n return [TOUCH_ACTION_AUTO];\n }, o.process = function (e) {\n var t = this,\n o = this.options,\n n = e.pointers.length === o.pointers,\n i = e.distance < o.threshold,\n a = e.deltaTime > o.time;\n if (this._input = e, !i || !n || e.eventType & (INPUT_END | INPUT_CANCEL) && !a) this.reset();else if (e.eventType & INPUT_START) this.reset(), this._timer = setTimeout(function () {\n t.state = STATE_RECOGNIZED, t.tryEmit();\n }, o.time);else if (e.eventType & INPUT_END) return STATE_RECOGNIZED;\n return STATE_FAILED;\n }, o.reset = function () {\n clearTimeout(this._timer);\n }, o.emit = function (e) {\n this.state !== STATE_RECOGNIZED || (e && e.eventType & INPUT_END ? this.manager.emit(this.options.event + \"up\", e) : (this._input.timeStamp = now(), this.manager.emit(this.options.event, this._input)));\n }, t;\n}(Recognizer);\n\nfunction deprecate(t, o, n) {\n return function () {\n var i = new Error(\"get-stack-trace\"),\n e = i && i.stack ? i.stack.replace(/^[^\\(]+?[\\n$]/gm, \"\").replace(/^\\s+at\\s+/gm, \"\").replace(/^Object.\\s*\\(/gm, \"{anonymous}()@\") : \"Unknown Stack Trace\",\n a = window.console && (window.console.warn || window.console.log);\n return a && a.call(window.console, \"DEPRECATED METHOD: \" + o + \"\\n\" + n + \" AT \\n\", e), t.apply(this, arguments);\n };\n}\n\nvar extend$1 = deprecate(function (e, t, o) {\n for (var n = Object.keys(t), a = 0; a < n.length;) (!o || o && void 0 === e[n[a]]) && (e[n[a]] = t[n[a]]), a++;\n\n return e;\n}, \"extend\", \"Use `assign`.\"),\n merge$1 = deprecate(function (e, t) {\n return extend$1(e, t, !0);\n}, \"merge\", \"Use `assign`.\");\n\nfunction inherit(e, t, o) {\n var n = t.prototype,\n i;\n i = e.prototype = Object.create(n), i.constructor = e, i._super = n, o && assign$1(i, o);\n}\n\nfunction bindFn(e, t) {\n return function () {\n return e.apply(t, arguments);\n };\n}\n\nvar Hammer = function () {\n var e = function (e, t) {\n return void 0 === t && (t = {}), new Manager(e, _extends({\n recognizers: [[RotateRecognizer, {\n enable: !1\n }], [PinchRecognizer, {\n enable: !1\n }, [\"rotate\"]], [SwipeRecognizer, {\n direction: DIRECTION_HORIZONTAL\n }], [PanRecognizer, {\n direction: DIRECTION_HORIZONTAL\n }, [\"swipe\"]], [TapRecognizer], [TapRecognizer, {\n event: \"doubletap\",\n taps: 2\n }, [\"tap\"]], [PressRecognizer]]\n }, t));\n };\n\n return e.VERSION = \"2.0.15\", e.DIRECTION_ALL = DIRECTION_ALL, e.DIRECTION_DOWN = DIRECTION_DOWN, e.DIRECTION_LEFT = DIRECTION_LEFT, e.DIRECTION_RIGHT = DIRECTION_RIGHT, e.DIRECTION_UP = DIRECTION_UP, e.DIRECTION_HORIZONTAL = DIRECTION_HORIZONTAL, e.DIRECTION_VERTICAL = DIRECTION_VERTICAL, e.DIRECTION_NONE = DIRECTION_NONE, e.DIRECTION_DOWN = DIRECTION_DOWN, e.INPUT_START = INPUT_START, e.INPUT_MOVE = INPUT_MOVE, e.INPUT_END = INPUT_END, e.INPUT_CANCEL = INPUT_CANCEL, e.STATE_POSSIBLE = STATE_POSSIBLE, e.STATE_BEGAN = STATE_BEGAN, e.STATE_CHANGED = STATE_CHANGED, e.STATE_ENDED = STATE_ENDED, e.STATE_RECOGNIZED = STATE_RECOGNIZED, e.STATE_CANCELLED = STATE_CANCELLED, e.STATE_FAILED = STATE_FAILED, e.Manager = Manager, e.Input = Input, e.TouchAction = TouchAction, e.TouchInput = TouchInput, e.MouseInput = MouseInput, e.PointerEventInput = PointerEventInput, e.TouchMouseInput = TouchMouseInput, e.SingleTouchInput = SingleTouchInput, e.Recognizer = Recognizer, e.AttrRecognizer = AttrRecognizer, e.Tap = TapRecognizer, e.Pan = PanRecognizer, e.Swipe = SwipeRecognizer, e.Pinch = PinchRecognizer, e.Rotate = RotateRecognizer, e.Press = PressRecognizer, e.on = addEventListeners, e.off = removeEventListeners, e.each = each, e.merge = merge$1, e.extend = extend$1, e.bindFn = bindFn, e.assign = assign$1, e.inherit = inherit, e.bindFn = bindFn, e.prefixed = prefixed, e.toArray = toArray$1, e.inArray = inArray, e.uniqueArray = uniqueArray, e.splitStr = splitStr, e.boolOrFn = boolOrFn, e.hasParent = hasParent$1, e.addEventListeners = addEventListeners, e.removeEventListeners = removeEventListeners, e.defaults = defaults, e;\n}(),\n hammer = createCommonjsModule$2(function (e) {\n function t() {\n var e = function () {};\n\n return {\n on: e,\n off: e,\n destroy: e,\n emit: e,\n get: function () {\n return {\n set: e\n };\n }\n };\n }\n\n if (\"undefined\" != typeof window) {\n var o = window.Hammer || Hammer;\n e.exports = o;\n } else e.exports = function () {\n return t();\n };\n}),\n hammer$1 = Object.freeze({\n default: hammer,\n __moduleExports: hammer\n});\n\ngetCjsExportFromNamespace(Activator);\n\nfunction Activator$1(e) {\n this.active = !1, this.dom = {\n container: e\n }, this.dom.overlay = document.createElement(\"div\"), this.dom.overlay.className = \"vis-overlay\", this.dom.container.appendChild(this.dom.overlay), this.hammer = hammer(this.dom.overlay), this.hammer.on(\"tap\", this._onTapOverlay.bind(this));\n var t = this;\n [\"tap\", \"doubletap\", \"press\", \"pinch\", \"pan\", \"panstart\", \"panmove\", \"panend\"].forEach(function (e) {\n t.hammer.on(e, function (e) {\n e.stopPropagation();\n });\n }), document && document.body && (this.onClick = function (o) {\n _hasParent(o.target, e) || t.deactivate();\n }, document.body.addEventListener(\"click\", this.onClick)), this.keycharm !== void 0 && this.keycharm.destroy(), this.keycharm = keycharm(), this.escListener = this.deactivate.bind(this);\n}\n\ncomponentEmitter(Activator$1.prototype), Activator$1.current = null, Activator$1.prototype.destroy = function () {\n this.deactivate(), this.dom.overlay.parentNode.removeChild(this.dom.overlay), this.onClick && document.body.removeEventListener(\"click\", this.onClick), this.keycharm !== void 0 && this.keycharm.destroy(), this.keycharm = null, this.hammer.destroy(), this.hammer = null;\n}, Activator$1.prototype.activate = function () {\n Activator$1.current && Activator$1.current.deactivate(), Activator$1.current = this, this.active = !0, this.dom.overlay.style.display = \"none\", util.addClassName(this.dom.container, \"vis-active\"), this.emit(\"change\"), this.emit(\"activate\"), this.keycharm.bind(\"esc\", this.escListener);\n}, Activator$1.prototype.deactivate = function () {\n this.active = !1, this.dom.overlay.style.display = \"\", util.removeClassName(this.dom.container, \"vis-active\"), this.keycharm.unbind(\"esc\", this.escListener), this.emit(\"change\"), this.emit(\"deactivate\");\n}, Activator$1.prototype._onTapOverlay = function (e) {\n this.activate(), e.stopPropagation();\n};\n\nfunction _hasParent(e, t) {\n for (; e;) {\n if (e === t) return !0;\n e = e.parentNode;\n }\n\n return !1;\n}\n\nvar Activator_1 = Activator$1,\n locales = createCommonjsModule$2(function (e, t) {\n t.en = {\n edit: \"Edit\",\n del: \"Delete selected\",\n back: \"Back\",\n addNode: \"Add Node\",\n addEdge: \"Add Edge\",\n editNode: \"Edit Node\",\n editEdge: \"Edit Edge\",\n addDescription: \"Click in an empty space to place a new node.\",\n edgeDescription: \"Click on a node and drag the edge to another node to connect them.\",\n editEdgeDescription: \"Click on the control points and drag them to a node to connect to it.\",\n createEdgeError: \"Cannot link edges to a cluster.\",\n deleteClusterError: \"Clusters cannot be deleted.\",\n editClusterError: \"Clusters cannot be edited.\"\n }, t.en_EN = t.en, t.en_US = t.en, t.de = {\n edit: \"Editieren\",\n del: \"L\\xF6sche Auswahl\",\n back: \"Zur\\xFCck\",\n addNode: \"Knoten hinzuf\\xFCgen\",\n addEdge: \"Kante hinzuf\\xFCgen\",\n editNode: \"Knoten editieren\",\n editEdge: \"Kante editieren\",\n addDescription: \"Klicke auf eine freie Stelle, um einen neuen Knoten zu plazieren.\",\n edgeDescription: \"Klicke auf einen Knoten und ziehe die Kante zu einem anderen Knoten, um diese zu verbinden.\",\n editEdgeDescription: \"Klicke auf die Verbindungspunkte und ziehe diese auf einen Knoten, um sie zu verbinden.\",\n createEdgeError: \"Es ist nicht m\\xF6glich, Kanten mit Clustern zu verbinden.\",\n deleteClusterError: \"Cluster k\\xF6nnen nicht gel\\xF6scht werden.\",\n editClusterError: \"Cluster k\\xF6nnen nicht editiert werden.\"\n }, t.de_DE = t.de, t.es = {\n edit: \"Editar\",\n del: \"Eliminar selecci\\xF3n\",\n back: \"Atr\\xE1s\",\n addNode: \"A\\xF1adir nodo\",\n addEdge: \"A\\xF1adir arista\",\n editNode: \"Editar nodo\",\n editEdge: \"Editar arista\",\n addDescription: \"Haga clic en un lugar vac\\xEDo para colocar un nuevo nodo.\",\n edgeDescription: \"Haga clic en un nodo y arrastre la arista hacia otro nodo para conectarlos.\",\n editEdgeDescription: \"Haga clic en un punto de control y arrastrelo a un nodo para conectarlo.\",\n createEdgeError: \"No se puede conectar una arista a un grupo.\",\n deleteClusterError: \"No es posible eliminar grupos.\",\n editClusterError: \"No es posible editar grupos.\"\n }, t.es_ES = t.es, t.it = {\n edit: \"Modifica\",\n del: \"Cancella la selezione\",\n back: \"Indietro\",\n addNode: \"Aggiungi un nodo\",\n addEdge: \"Aggiungi un vertice\",\n editNode: \"Modifica il nodo\",\n editEdge: \"Modifica il vertice\",\n addDescription: \"Clicca per aggiungere un nuovo nodo\",\n edgeDescription: \"Clicca su un nodo e trascinalo ad un altro nodo per connetterli.\",\n editEdgeDescription: \"Clicca sui Punti di controllo e trascinali ad un nodo per connetterli.\",\n createEdgeError: \"Non si possono collegare vertici ad un cluster\",\n deleteClusterError: \"I cluster non possono essere cancellati\",\n editClusterError: \"I clusters non possono essere modificati.\"\n }, t.it_IT = t.it, t.nl = {\n edit: \"Wijzigen\",\n del: \"Selectie verwijderen\",\n back: \"Terug\",\n addNode: \"Node toevoegen\",\n addEdge: \"Link toevoegen\",\n editNode: \"Node wijzigen\",\n editEdge: \"Link wijzigen\",\n addDescription: \"Klik op een leeg gebied om een nieuwe node te maken.\",\n edgeDescription: \"Klik op een node en sleep de link naar een andere node om ze te verbinden.\",\n editEdgeDescription: \"Klik op de verbindingspunten en sleep ze naar een node om daarmee te verbinden.\",\n createEdgeError: \"Kan geen link maken naar een cluster.\",\n deleteClusterError: \"Clusters kunnen niet worden verwijderd.\",\n editClusterError: \"Clusters kunnen niet worden aangepast.\"\n }, t.nl_NL = t.nl, t.nl_BE = t.nl, t[\"pt-br\"] = {\n edit: \"Editar\",\n del: \"Remover selecionado\",\n back: \"Voltar\",\n addNode: \"Adicionar n\\xF3\",\n addEdge: \"Adicionar aresta\",\n editNode: \"Editar n\\xF3\",\n editEdge: \"Editar aresta\",\n addDescription: \"Clique em um espa\\xE7o em branco para adicionar um novo n\\xF3\",\n edgeDescription: \"Clique em um n\\xF3 e arraste a aresta at\\xE9 outro n\\xF3 para conect\\xE1-los\",\n editEdgeDescription: \"Clique nos pontos de controle e os arraste para um n\\xF3 para conect\\xE1-los\",\n createEdgeError: \"N\\xE3o foi poss\\xEDvel linkar arestas a um cluster.\",\n deleteClusterError: \"Clusters n\\xE3o puderam ser removidos.\",\n editClusterError: \"Clusters n\\xE3o puderam ser editados.\"\n }, t[\"pt-BR\"] = t[\"pt-br\"], t.pt_BR = t[\"pt-br\"], t.pt_br = t[\"pt-br\"], t.ru = {\n edit: \"\\u0420\\u0435\\u0434\\u0430\\u043A\\u0442\\u0438\\u0440\\u043E\\u0432\\u0430\\u0442\\u044C\",\n del: \"\\u0423\\u0434\\u0430\\u043B\\u0438\\u0442\\u044C \\u0432\\u044B\\u0431\\u0440\\u0430\\u043D\\u043D\\u043E\\u0435\",\n back: \"\\u041D\\u0430\\u0437\\u0430\\u0434\",\n addNode: \"\\u0414\\u043E\\u0431\\u0430\\u0432\\u0438\\u0442\\u044C \\u0443\\u0437\\u0435\\u043B\",\n addEdge: \"\\u0414\\u043E\\u0431\\u0430\\u0432\\u0438\\u0442\\u044C \\u0440\\u0435\\u0431\\u0440\\u043E\",\n editNode: \"\\u0420\\u0435\\u0434\\u0430\\u043A\\u0442\\u0438\\u0440\\u043E\\u0432\\u0430\\u0442\\u044C \\u0443\\u0437\\u0435\\u043B\",\n editEdge: \"\\u0420\\u0435\\u0434\\u0430\\u043A\\u0442\\u0438\\u0440\\u043E\\u0432\\u0430\\u0442\\u044C \\u0440\\u0435\\u0431\\u0440\\u043E\",\n addDescription: \"\\u041A\\u043B\\u0438\\u043A\\u043D\\u0438\\u0442\\u0435 \\u0432 \\u0441\\u0432\\u043E\\u0431\\u043E\\u0434\\u043D\\u043E\\u0435 \\u043C\\u0435\\u0441\\u0442\\u043E, \\u0447\\u0442\\u043E\\u0431\\u044B \\u0434\\u043E\\u0431\\u0430\\u0432\\u0438\\u0442\\u044C \\u043D\\u043E\\u0432\\u044B\\u0439 \\u0443\\u0437\\u0435\\u043B.\",\n edgeDescription: \"\\u041A\\u043B\\u0438\\u043A\\u043D\\u0438\\u0442\\u0435 \\u043D\\u0430 \\u0443\\u0437\\u0435\\u043B \\u0438 \\u043F\\u0440\\u043E\\u0442\\u044F\\u043D\\u0438\\u0442\\u0435 \\u0440\\u0435\\u0431\\u0440\\u043E \\u043A \\u0434\\u0440\\u0443\\u0433\\u043E\\u043C\\u0443 \\u0443\\u0437\\u043B\\u0443, \\u0447\\u0442\\u043E\\u0431\\u044B \\u0441\\u043E\\u0435\\u0434\\u0438\\u043D\\u0438\\u0442\\u044C \\u0438\\u0445.\",\n editEdgeDescription: \"\\u041A\\u043B\\u0438\\u043A\\u043D\\u0438\\u0442\\u0435 \\u043D\\u0430 \\u043A\\u043E\\u043D\\u0442\\u0440\\u043E\\u043B\\u044C\\u043D\\u044B\\u0435 \\u0442\\u043E\\u0447\\u043A\\u0438 \\u0438 \\u043F\\u0435\\u0440\\u0435\\u0442\\u0430\\u0449\\u0438\\u0442\\u0435 \\u0438\\u0445 \\u0432 \\u0443\\u0437\\u0435\\u043B, \\u0447\\u0442\\u043E\\u0431\\u044B \\u043F\\u043E\\u0434\\u043A\\u043B\\u044E\\u0447\\u0438\\u0442\\u044C\\u0441\\u044F \\u043A \\u043D\\u0435\\u043C\\u0443.\",\n createEdgeError: \"\\u041D\\u0435\\u0432\\u043E\\u0437\\u043C\\u043E\\u0436\\u043D\\u043E \\u0441\\u043E\\u0435\\u0434\\u0438\\u043D\\u0438\\u0442\\u044C \\u0440\\u0435\\u0431\\u0440\\u0430 \\u0432 \\u043A\\u043B\\u0430\\u0441\\u0442\\u0435\\u0440.\",\n deleteClusterError: \"\\u041A\\u043B\\u0430\\u0441\\u0442\\u0435\\u0440\\u044B \\u043D\\u0435 \\u043C\\u043E\\u0433\\u0443\\u0442 \\u0431\\u044B\\u0442\\u044C \\u0443\\u0434\\u0430\\u043B\\u0435\\u043D\\u044B\",\n editClusterError: \"\\u041A\\u043B\\u0430\\u0441\\u0442\\u0435\\u0440\\u044B \\u043D\\u0435\\u0434\\u043E\\u0441\\u0442\\u0443\\u043F\\u043D\\u044B \\u0434\\u043B\\u044F \\u0440\\u0435\\u0434\\u0430\\u043A\\u0442\\u0438\\u0440\\u043E\\u0432\\u0430\\u043D\\u0438\\u044F.\"\n }, t.ru_RU = t.ru, t.cn = {\n edit: \"\\u7F16\\u8F91\",\n del: \"\\u5220\\u9664\\u9009\\u5B9A\",\n back: \"\\u8FD4\\u56DE\",\n addNode: \"\\u6DFB\\u52A0\\u8282\\u70B9\",\n addEdge: \"\\u6DFB\\u52A0\\u8FDE\\u63A5\\u7EBF\",\n editNode: \"\\u7F16\\u8F91\\u8282\\u70B9\",\n editEdge: \"\\u7F16\\u8F91\\u8FDE\\u63A5\\u7EBF\",\n addDescription: \"\\u5355\\u51FB\\u7A7A\\u767D\\u5904\\u653E\\u7F6E\\u65B0\\u8282\\u70B9\\u3002\",\n edgeDescription: \"\\u5355\\u51FB\\u67D0\\u4E2A\\u8282\\u70B9\\u5E76\\u5C06\\u8BE5\\u8FDE\\u63A5\\u7EBF\\u62D6\\u52A8\\u5230\\u53E6\\u4E00\\u4E2A\\u8282\\u70B9\\u4EE5\\u8FDE\\u63A5\\u5B83\\u4EEC\\u3002\",\n editEdgeDescription: \"\\u5355\\u51FB\\u63A7\\u5236\\u8282\\u70B9\\u5E76\\u5C06\\u5B83\\u4EEC\\u62D6\\u5230\\u8282\\u70B9\\u4E0A\\u8FDE\\u63A5\\u3002\",\n createEdgeError: \"\\u65E0\\u6CD5\\u5C06\\u8FDE\\u63A5\\u7EBF\\u8FDE\\u63A5\\u5230\\u7FA4\\u96C6\\u3002\",\n deleteClusterError: \"\\u65E0\\u6CD5\\u5220\\u9664\\u7FA4\\u96C6\\u3002\",\n editClusterError: \"\\u65E0\\u6CD5\\u7F16\\u8F91\\u7FA4\\u96C6\\u3002\"\n }, t.zh_CN = t.cn, t.uk = {\n edit: \"\\u0420\\u0435\\u0434\\u0430\\u0433\\u0443\\u0432\\u0430\\u0442\\u0438\",\n del: \"\\u0412\\u0438\\u0434\\u0430\\u043B\\u0438\\u0442\\u0438 \\u043E\\u0431\\u0440\\u0430\\u043D\\u0435\",\n back: \"\\u041D\\u0430\\u0437\\u0430\\u0434\",\n addNode: \"\\u0414\\u043E\\u0434\\u0430\\u0442\\u0438 \\u0432\\u0443\\u0437\\u043E\\u043B\",\n addEdge: \"\\u0414\\u043E\\u0434\\u0430\\u0442\\u0438 \\u043A\\u0440\\u0430\\u0439\",\n editNode: \"\\u0420\\u0435\\u0434\\u0430\\u0433\\u0443\\u0432\\u0430\\u0442\\u0438 \\u0432\\u0443\\u0437\\u043E\\u043B\",\n editEdge: \"\\u0420\\u0435\\u0434\\u0430\\u0433\\u0443\\u0432\\u0430\\u0442\\u0438 \\u043A\\u0440\\u0430\\u0439\",\n addDescription: \"K\\u043B\\u0456\\u043A\\u043D\\u0456\\u0442\\u044C \\u043D\\u0430 \\u0432\\u0456\\u043B\\u044C\\u043D\\u0435 \\u043C\\u0456\\u0441\\u0446\\u0435, \\u0449\\u043E\\u0431 \\u0434\\u043E\\u0434\\u0430\\u0442\\u0438 \\u043D\\u043E\\u0432\\u0438\\u0439 \\u0432\\u0443\\u0437\\u043E\\u043B.\",\n edgeDescription: \"\\u041A\\u043B\\u0456\\u043A\\u043D\\u0456\\u0442\\u044C \\u043D\\u0430 \\u0432\\u0443\\u0437\\u043E\\u043B \\u0456 \\u043F\\u0435\\u0440\\u0435\\u0442\\u044F\\u0433\\u043D\\u0456\\u0442\\u044C \\u043A\\u0440\\u0430\\u0439 \\u0434\\u043E \\u0456\\u043D\\u0448\\u043E\\u0433\\u043E \\u0432\\u0443\\u0437\\u043B\\u0430, \\u0449\\u043E\\u0431 \\u0457\\u0445 \\u0437'\\u0454\\u0434\\u043D\\u0430\\u0442\\u0438.\",\n editEdgeDescription: \"\\u041A\\u043B\\u0456\\u043A\\u043D\\u0456\\u0442\\u044C \\u043D\\u0430 \\u043A\\u043E\\u043D\\u0442\\u0440\\u043E\\u043B\\u044C\\u043D\\u0456 \\u0442\\u043E\\u0447\\u043A\\u0438 \\u0456 \\u043F\\u0435\\u0440\\u0435\\u0442\\u044F\\u0433\\u043D\\u0456\\u0442\\u044C \\u0457\\u0445 \\u0443 \\u0432\\u0443\\u0437\\u043E\\u043B, \\u0449\\u043E\\u0431 \\u043F\\u0456\\u0434\\u043A\\u043B\\u044E\\u0447\\u0438\\u0442\\u0438\\u0441\\u044F \\u0434\\u043E \\u043D\\u044C\\u043E\\u0433\\u043E.\",\n createEdgeError: \"\\u041D\\u0435 \\u043C\\u043E\\u0436\\u043B\\u0438\\u0432\\u043E \\u043E\\u0431'\\u0454\\u0434\\u043D\\u0430\\u0442\\u0438 \\u043A\\u0440\\u0430\\u0457 \\u0432 \\u0433\\u0440\\u0443\\u043F\\u0443.\",\n deleteClusterError: \"\\u0413\\u0440\\u0443\\u043F\\u0438 \\u043D\\u0435 \\u043C\\u043E\\u0436\\u0443\\u0442\\u044C \\u0431\\u0443\\u0442\\u0438 \\u0432\\u0438\\u0434\\u0430\\u043B\\u0435\\u043D\\u0456.\",\n editClusterError: \"\\u0413\\u0440\\u0443\\u043F\\u0438 \\u043D\\u0435\\u0434\\u043E\\u0441\\u0442\\u0443\\u043F\\u043D\\u0456 \\u0434\\u043B\\u044F \\u0440\\u0435\\u0434\\u0430\\u0433\\u0443\\u0432\\u0430\\u043D\\u043D\\u044F.\"\n }, t.uk_UA = t.uk, t.fr = {\n edit: \"Editer\",\n del: \"Effacer la selection\",\n back: \"Retour\",\n addNode: \"Ajouter un noeud\",\n addEdge: \"Ajouter un lien\",\n editNode: \"Editer le noeud\",\n editEdge: \"Editer le lien\",\n addDescription: \"Cliquez dans un endroit vide pour placer un noeud.\",\n edgeDescription: \"Cliquez sur un noeud et glissez le lien vers un autre noeud pour les connecter.\",\n editEdgeDescription: \"Cliquez sur les points de contr\\xF4le et glissez-les pour connecter un noeud.\",\n createEdgeError: \"Impossible de cr\\xE9er un lien vers un cluster.\",\n deleteClusterError: \"Les clusters ne peuvent pas \\xEAtre \\xE9ffac\\xE9s.\",\n editClusterError: \"Les clusters ne peuvent pas \\xEAtre \\xE9dites.\"\n }, t.fr_FR = t.fr, t.cs = {\n edit: \"Upravit\",\n del: \"Smazat v\\xFDb\\u011Br\",\n back: \"Zp\\u011Bt\",\n addNode: \"P\\u0159idat vrchol\",\n addEdge: \"P\\u0159idat hranu\",\n editNode: \"Upravit vrchol\",\n editEdge: \"Upravit hranu\",\n addDescription: \"Kluknut\\xEDm do pr\\xE1zdn\\xE9ho prostoru m\\u016F\\u017Eete p\\u0159idat nov\\xFD vrchol.\",\n edgeDescription: \"P\\u0159eta\\u017Een\\xEDm z jednoho vrcholu do druh\\xE9ho m\\u016F\\u017Eete spojit tyto vrcholy novou hranou.\",\n editEdgeDescription: \"P\\u0159eta\\u017Een\\xEDm kontroln\\xEDho vrcholu hrany ji m\\u016F\\u017Eete p\\u0159ipojit k jin\\xE9mu vrcholu.\",\n createEdgeError: \"Nelze p\\u0159ipojit hranu ke shluku.\",\n deleteClusterError: \"Nelze mazat shluky.\",\n editClusterError: \"Nelze upravovat shluky.\"\n }, t.cs_CZ = t.cs;\n});\n\nfunction _classCallCheck$1(e, t) {\n if (!(e instanceof t)) throw new TypeError(\"Cannot call a class as a function\");\n}\n\nvar classCallCheck$1 = _classCallCheck$1;\n\nfunction _defineProperties$1(e, t) {\n for (var o = 0, n; o < t.length; o++) n = t[o], n.enumerable = n.enumerable || !1, n.configurable = !0, \"value\" in n && (n.writable = !0), Object.defineProperty(e, n.key, n);\n}\n\nfunction _createClass$1(e, t, o) {\n return t && _defineProperties$1(e.prototype, t), o && _defineProperties$1(e, o), e;\n}\n\nvar createClass$1 = _createClass$1,\n CachedImage = function () {\n var t = Math.floor;\n\n function e() {\n classCallCheck$1(this, e), this.NUM_ITERATIONS = 4, this.image = new Image(), this.canvas = document.createElement(\"canvas\");\n }\n\n return createClass$1(e, [{\n key: \"init\",\n value: function () {\n if (!this.initialized()) {\n this.src = this.image.src;\n var e = this.image.width,\n o = this.image.height;\n this.width = e, this.height = o;\n var n = t(o / 2),\n i = t(o / 4),\n a = t(o / 8),\n d = t(o / 16),\n s = t(e / 2),\n r = t(e / 4),\n l = t(e / 8),\n c = t(e / 16);\n this.canvas.width = 3 * r, this.canvas.height = n, this.coordinates = [[0, 0, s, n], [s, 0, r, i], [s, i, l, a], [5 * l, i, c, d]], this._fillMipMap();\n }\n }\n }, {\n key: \"initialized\",\n value: function () {\n return void 0 !== this.coordinates;\n }\n }, {\n key: \"_fillMipMap\",\n value: function () {\n var e = this.canvas.getContext(\"2d\"),\n t = this.coordinates[0];\n e.drawImage(this.image, t[0], t[1], t[2], t[3]);\n\n for (var o = 1; o < this.NUM_ITERATIONS; o++) {\n var n = this.coordinates[o - 1],\n i = this.coordinates[o];\n e.drawImage(this.canvas, n[0], n[1], n[2], n[3], i[0], i[1], i[2], i[3]);\n }\n }\n }, {\n key: \"drawImageAtPosition\",\n value: function (e, t, o, n, i, a) {\n if (this.initialized()) if (2 < t) {\n t *= .5;\n\n for (var d = 0; 2 < t && d < this.NUM_ITERATIONS;) t *= .5, d += 1;\n\n d >= this.NUM_ITERATIONS && (d = this.NUM_ITERATIONS - 1);\n var s = this.coordinates[d];\n e.drawImage(this.canvas, s[0], s[1], s[2], s[3], o, n, i, a);\n } else e.drawImage(this.image, o, n, i, a);\n }\n }]), e;\n}(),\n Images = function () {\n function e(t) {\n classCallCheck$1(this, e), this.images = {}, this.imageBroken = {}, this.callback = t;\n }\n\n return createClass$1(e, [{\n key: \"_tryloadBrokenUrl\",\n value: function (e, t, o) {\n return void 0 === e || void 0 === o ? void 0 : void 0 === t ? void console.warn(\"No broken url image defined\") : void (o.image.onerror = function () {\n console.error(\"Could not load brokenImage:\", t);\n }, o.image.src = t);\n }\n }, {\n key: \"_redrawWithImage\",\n value: function (e) {\n this.callback && this.callback(e);\n }\n }, {\n key: \"load\",\n value: function (e, t) {\n var o = this,\n n = this.images[e];\n if (n) return n;\n var i = new CachedImage();\n return this.images[e] = i, i.image.onload = function () {\n o._fixImageCoordinates(i.image), i.init(), o._redrawWithImage(i);\n }, i.image.onerror = function () {\n console.error(\"Could not load image:\", e), o._tryloadBrokenUrl(e, t, i);\n }, i.image.src = e, i;\n }\n }, {\n key: \"_fixImageCoordinates\",\n value: function (e) {\n 0 === e.width && (document.body.appendChild(e), e.width = e.offsetWidth, e.height = e.offsetHeight, document.body.removeChild(e));\n }\n }]), e;\n}(),\n Groups = function () {\n function e() {\n classCallCheck$1(this, e), this.clear(), this.defaultIndex = 0, this.groupsArray = [], this.groupIndex = 0, this.defaultGroups = [{\n border: \"#2B7CE9\",\n background: \"#97C2FC\",\n highlight: {\n border: \"#2B7CE9\",\n background: \"#D2E5FF\"\n },\n hover: {\n border: \"#2B7CE9\",\n background: \"#D2E5FF\"\n }\n }, {\n border: \"#FFA500\",\n background: \"#FFFF00\",\n highlight: {\n border: \"#FFA500\",\n background: \"#FFFFA3\"\n },\n hover: {\n border: \"#FFA500\",\n background: \"#FFFFA3\"\n }\n }, {\n border: \"#FA0A10\",\n background: \"#FB7E81\",\n highlight: {\n border: \"#FA0A10\",\n background: \"#FFAFB1\"\n },\n hover: {\n border: \"#FA0A10\",\n background: \"#FFAFB1\"\n }\n }, {\n border: \"#41A906\",\n background: \"#7BE141\",\n highlight: {\n border: \"#41A906\",\n background: \"#A1EC76\"\n },\n hover: {\n border: \"#41A906\",\n background: \"#A1EC76\"\n }\n }, {\n border: \"#E129F0\",\n background: \"#EB7DF4\",\n highlight: {\n border: \"#E129F0\",\n background: \"#F0B3F5\"\n },\n hover: {\n border: \"#E129F0\",\n background: \"#F0B3F5\"\n }\n }, {\n border: \"#7C29F0\",\n background: \"#AD85E4\",\n highlight: {\n border: \"#7C29F0\",\n background: \"#D3BDF0\"\n },\n hover: {\n border: \"#7C29F0\",\n background: \"#D3BDF0\"\n }\n }, {\n border: \"#C37F00\",\n background: \"#FFA807\",\n highlight: {\n border: \"#C37F00\",\n background: \"#FFCA66\"\n },\n hover: {\n border: \"#C37F00\",\n background: \"#FFCA66\"\n }\n }, {\n border: \"#4220FB\",\n background: \"#6E6EFD\",\n highlight: {\n border: \"#4220FB\",\n background: \"#9B9BFD\"\n },\n hover: {\n border: \"#4220FB\",\n background: \"#9B9BFD\"\n }\n }, {\n border: \"#FD5A77\",\n background: \"#FFC0CB\",\n highlight: {\n border: \"#FD5A77\",\n background: \"#FFD1D9\"\n },\n hover: {\n border: \"#FD5A77\",\n background: \"#FFD1D9\"\n }\n }, {\n border: \"#4AD63A\",\n background: \"#C2FABC\",\n highlight: {\n border: \"#4AD63A\",\n background: \"#E6FFE3\"\n },\n hover: {\n border: \"#4AD63A\",\n background: \"#E6FFE3\"\n }\n }, {\n border: \"#990000\",\n background: \"#EE0000\",\n highlight: {\n border: \"#BB0000\",\n background: \"#FF3333\"\n },\n hover: {\n border: \"#BB0000\",\n background: \"#FF3333\"\n }\n }, {\n border: \"#FF6000\",\n background: \"#FF6000\",\n highlight: {\n border: \"#FF6000\",\n background: \"#FF6000\"\n },\n hover: {\n border: \"#FF6000\",\n background: \"#FF6000\"\n }\n }, {\n border: \"#97C2FC\",\n background: \"#2B7CE9\",\n highlight: {\n border: \"#D2E5FF\",\n background: \"#2B7CE9\"\n },\n hover: {\n border: \"#D2E5FF\",\n background: \"#2B7CE9\"\n }\n }, {\n border: \"#399605\",\n background: \"#255C03\",\n highlight: {\n border: \"#399605\",\n background: \"#255C03\"\n },\n hover: {\n border: \"#399605\",\n background: \"#255C03\"\n }\n }, {\n border: \"#B70054\",\n background: \"#FF007E\",\n highlight: {\n border: \"#B70054\",\n background: \"#FF007E\"\n },\n hover: {\n border: \"#B70054\",\n background: \"#FF007E\"\n }\n }, {\n border: \"#AD85E4\",\n background: \"#7C29F0\",\n highlight: {\n border: \"#D3BDF0\",\n background: \"#7C29F0\"\n },\n hover: {\n border: \"#D3BDF0\",\n background: \"#7C29F0\"\n }\n }, {\n border: \"#4557FA\",\n background: \"#000EA1\",\n highlight: {\n border: \"#6E6EFD\",\n background: \"#000EA1\"\n },\n hover: {\n border: \"#6E6EFD\",\n background: \"#000EA1\"\n }\n }, {\n border: \"#FFC0CB\",\n background: \"#FD5A77\",\n highlight: {\n border: \"#FFD1D9\",\n background: \"#FD5A77\"\n },\n hover: {\n border: \"#FFD1D9\",\n background: \"#FD5A77\"\n }\n }, {\n border: \"#C2FABC\",\n background: \"#74D66A\",\n highlight: {\n border: \"#E6FFE3\",\n background: \"#74D66A\"\n },\n hover: {\n border: \"#E6FFE3\",\n background: \"#74D66A\"\n }\n }, {\n border: \"#EE0000\",\n background: \"#990000\",\n highlight: {\n border: \"#FF3333\",\n background: \"#BB0000\"\n },\n hover: {\n border: \"#FF3333\",\n background: \"#BB0000\"\n }\n }], this.options = {}, this.defaultOptions = {\n useDefaultGroups: !0\n }, util.extend(this.options, this.defaultOptions);\n }\n\n return createClass$1(e, [{\n key: \"setOptions\",\n value: function (e) {\n var t = [\"useDefaultGroups\"];\n if (void 0 !== e) for (var o in e) if (e.hasOwnProperty(o) && -1 === t.indexOf(o)) {\n var n = e[o];\n this.add(o, n);\n }\n }\n }, {\n key: \"clear\",\n value: function () {\n this.groups = {}, this.groupsArray = [];\n }\n }, {\n key: \"get\",\n value: function (e) {\n var t = !(1 < arguments.length && void 0 !== arguments[1]) || arguments[1],\n o = this.groups[e];\n if (void 0 === o && t) if (!1 === this.options.useDefaultGroups && 0 < this.groupsArray.length) {\n var n = this.groupIndex % this.groupsArray.length;\n this.groupIndex++, o = {}, o.color = this.groups[this.groupsArray[n]], this.groups[e] = o;\n } else {\n var i = this.defaultIndex % this.defaultGroups.length;\n this.defaultIndex++, o = {}, o.color = this.defaultGroups[i], this.groups[e] = o;\n }\n return o;\n }\n }, {\n key: \"add\",\n value: function (e, t) {\n return this.groups[e] = t, this.groupsArray.push(e), t;\n }\n }]), e;\n}();\n\nfunction _arrayWithHoles(e) {\n if (Array.isArray(e)) return e;\n}\n\nvar arrayWithHoles = _arrayWithHoles;\n\nfunction _iterableToArrayLimit(e, t) {\n var o = [],\n n = !0,\n i = !1,\n a = void 0;\n\n try {\n for (var d = e[Symbol.iterator](), s; !(n = (s = d.next()).done) && (o.push(s.value), !(t && o.length === t)); n = !0);\n } catch (e) {\n i = !0, a = e;\n } finally {\n try {\n n || null == d[\"return\"] || d[\"return\"]();\n } finally {\n if (i) throw a;\n }\n }\n\n return o;\n}\n\nvar iterableToArrayLimit = _iterableToArrayLimit;\n\nfunction _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance\");\n}\n\nvar nonIterableRest = _nonIterableRest;\n\nfunction _slicedToArray(e, t) {\n return arrayWithHoles(e) || iterableToArrayLimit(e, t) || nonIterableRest();\n}\n\nvar slicedToArray = _slicedToArray,\n _typeof_1$1 = createCommonjsModule$2(function (e) {\n function t(e) {\n return t = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (e) {\n return typeof e;\n } : function (e) {\n return e && \"function\" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? \"symbol\" : typeof e;\n }, t(e);\n }\n\n function o(n) {\n return e.exports = \"function\" == typeof Symbol && \"symbol\" === t(Symbol.iterator) ? o = function (e) {\n return t(e);\n } : o = function (e) {\n return e && \"function\" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? \"symbol\" : t(e);\n }, o(n);\n }\n\n e.exports = o;\n}),\n ComponentUtil = function () {\n var t = Math.cos,\n o = Math.sin;\n\n function e() {\n classCallCheck$1(this, e);\n }\n\n return createClass$1(e, null, [{\n key: \"choosify\",\n value: function (e, t) {\n var o = [\"node\", \"edge\", \"label\"],\n n = !0,\n i = util.topMost(t, \"chosen\");\n if (\"boolean\" == typeof i) n = i;else if (\"object\" === _typeof_1$1(i)) {\n if (-1 === o.indexOf(e)) throw new Error(\"choosify: subOption '\" + e + \"' should be one of '\" + o.join(\"', '\") + \"'\");\n var a = util.topMost(t, [\"chosen\", e]);\n (\"boolean\" == typeof a || \"function\" == typeof a) && (n = a);\n }\n return n;\n }\n }, {\n key: \"pointInRect\",\n value: function (e, n, i) {\n if (0 >= e.width || 0 >= e.height) return !1;\n\n if (void 0 !== i) {\n var a = {\n x: n.x - i.x,\n y: n.y - i.y\n };\n\n if (0 !== i.angle) {\n var d = -i.angle,\n s = {\n x: t(d) * a.x - o(d) * a.y,\n y: o(d) * a.x + t(d) * a.y\n };\n n = s;\n } else n = a;\n }\n\n var r = e.x + e.width,\n l = e.y + e.width;\n return e.left < n.x && r > n.x && e.top < n.y && l > n.y;\n }\n }, {\n key: \"isValidLabel\",\n value: function (e) {\n return \"string\" == typeof e && \"\" !== e;\n }\n }]), e;\n}(),\n LabelAccumulator = function () {\n function e(t) {\n classCallCheck$1(this, e), this.measureText = t, this.current = 0, this.width = 0, this.height = 0, this.lines = [];\n }\n\n return createClass$1(e, [{\n key: \"_add\",\n value: function (e, t) {\n var o = 2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : \"normal\";\n void 0 === this.lines[e] && (this.lines[e] = {\n width: 0,\n height: 0,\n blocks: []\n });\n var n = t;\n (void 0 === t || \"\" === t) && (n = \" \");\n var i = this.measureText(n, o),\n a = Object.assign({}, i.values);\n a.text = t, a.width = i.width, a.mod = o, (void 0 === t || \"\" === t) && (a.width = 0), this.lines[e].blocks.push(a), this.lines[e].width += a.width;\n }\n }, {\n key: \"curWidth\",\n value: function () {\n var e = this.lines[this.current];\n return void 0 === e ? 0 : e.width;\n }\n }, {\n key: \"append\",\n value: function (e) {\n var t = 1 < arguments.length && void 0 !== arguments[1] ? arguments[1] : \"normal\";\n\n this._add(this.current, e, t);\n }\n }, {\n key: \"newLine\",\n value: function (e) {\n var t = 1 < arguments.length && void 0 !== arguments[1] ? arguments[1] : \"normal\";\n this._add(this.current, e, t), this.current++;\n }\n }, {\n key: \"determineLineHeights\",\n value: function () {\n for (var e = 0; e < this.lines.length; e++) {\n var t = this.lines[e],\n o = 0;\n if (void 0 !== t.blocks) for (var n = 0, i; n < t.blocks.length; n++) i = t.blocks[n], o < i.height && (o = i.height);\n t.height = o;\n }\n }\n }, {\n key: \"determineLabelSize\",\n value: function () {\n for (var e = 0, t = 0, o = 0, n; o < this.lines.length; o++) n = this.lines[o], n.width > e && (e = n.width), t += n.height;\n\n this.width = e, this.height = t;\n }\n }, {\n key: \"removeEmptyBlocks\",\n value: function () {\n for (var e = [], t = 0, o; t < this.lines.length; t++) if (o = this.lines[t], 0 !== o.blocks.length) {\n if (t == this.lines.length - 1 && 0 === o.width) continue;\n var n = {};\n Object.assign(n, o), n.blocks = [];\n\n for (var i = void 0, a = [], d = 0, s; d < o.blocks.length; d++) s = o.blocks[d], 0 === s.width ? void 0 === i && (i = s) : a.push(s);\n\n 0 === a.length && void 0 !== i && a.push(i), n.blocks = a, e.push(n);\n }\n\n return e;\n }\n }, {\n key: \"finalize\",\n value: function () {\n this.determineLineHeights(), this.determineLabelSize();\n var e = this.removeEmptyBlocks();\n return {\n width: this.width,\n height: this.height,\n lines: e\n };\n }\n }]), e;\n}(),\n tagPattern = {\n \"\": //,\n \"\": //,\n \"\": //,\n \"\": /<\\/b>/,\n \"\": /<\\/i>/,\n \"\": /<\\/code>/,\n \"*\": /\\*/,\n _: /\\_/,\n \"`\": /`/,\n afterBold: /[^\\*]/,\n afterItal: /[^_]/,\n afterMono: /[^`]/\n},\n MarkupAccumulator = function () {\n function e(t) {\n classCallCheck$1(this, e), this.text = t, this.bold = !1, this.ital = !1, this.mono = !1, this.spacing = !1, this.position = 0, this.buffer = \"\", this.modStack = [], this.blocks = [];\n }\n\n return createClass$1(e, [{\n key: \"mod\",\n value: function () {\n return 0 === this.modStack.length ? \"normal\" : this.modStack[0];\n }\n }, {\n key: \"modName\",\n value: function () {\n return 0 === this.modStack.length ? \"normal\" : \"mono\" === this.modStack[0] ? \"mono\" : this.bold && this.ital ? \"boldital\" : this.bold ? \"bold\" : this.ital ? \"ital\" : void 0;\n }\n }, {\n key: \"emitBlock\",\n value: function () {\n this.spacing && (this.add(\" \"), this.spacing = !1), 0 < this.buffer.length && (this.blocks.push({\n text: this.buffer,\n mod: this.modName()\n }), this.buffer = \"\");\n }\n }, {\n key: \"add\",\n value: function (e) {\n \" \" === e && (this.spacing = !0), this.spacing && (this.buffer += \" \", this.spacing = !1), \" \" != e && (this.buffer += e);\n }\n }, {\n key: \"parseWS\",\n value: function (e) {\n return !!/[ \\t]/.test(e) && (this.mono ? this.add(e) : this.spacing = !0, !0);\n }\n }, {\n key: \"setTag\",\n value: function (e) {\n this.emitBlock(), this[e] = !0, this.modStack.unshift(e);\n }\n }, {\n key: \"unsetTag\",\n value: function (e) {\n this.emitBlock(), this[e] = !1, this.modStack.shift();\n }\n }, {\n key: \"parseStartTag\",\n value: function (e, t) {\n return !(this.mono || this[e] || !this.match(t)) && (this.setTag(e), !0);\n }\n }, {\n key: \"match\",\n value: function (e) {\n var t = !(1 < arguments.length && void 0 !== arguments[1]) || arguments[1],\n o = this.prepareRegExp(e),\n n = slicedToArray(o, 2),\n i = n[0],\n a = n[1],\n d = i.test(this.text.substr(this.position, a));\n return d && t && (this.position += a - 1), d;\n }\n }, {\n key: \"parseEndTag\",\n value: function (e, t, o) {\n var n = this.mod() === e;\n return n = \"mono\" === e ? n && this.mono : n && !this.mono, !!(n && this.match(t)) && (void 0 === o ? this.unsetTag(e) : (this.position === this.text.length - 1 || this.match(o, !1)) && this.unsetTag(e), !0);\n }\n }, {\n key: \"replace\",\n value: function (e, t) {\n return !!this.match(e) && (this.add(t), this.position += length - 1, !0);\n }\n }, {\n key: \"prepareRegExp\",\n value: function (e) {\n var t, o;\n if (e instanceof RegExp) o = e, t = 1;else {\n var n = tagPattern[e];\n o = void 0 === n ? new RegExp(e) : n, t = e.length;\n }\n return [o, t];\n }\n }]), e;\n}(),\n LabelSplitter = function () {\n function e(t, o, n, i) {\n var a = this;\n classCallCheck$1(this, e), this.ctx = t, this.parent = o, this.selected = n, this.hover = i;\n this.lines = new LabelAccumulator(function (e, o) {\n if (void 0 === e) return 0;\n var d = a.parent.getFormattingValues(t, n, i, o),\n s = 0;\n\n if (\"\" !== e) {\n var r = a.ctx.measureText(e);\n s = r.width;\n }\n\n return {\n width: s,\n values: d\n };\n });\n }\n\n return createClass$1(e, [{\n key: \"process\",\n value: function (e) {\n if (!ComponentUtil.isValidLabel(e)) return this.lines.finalize();\n var t = this.parent.fontOptions;\n e = e.replace(/\\r\\n/g, \"\\n\"), e = e.replace(/\\r/g, \"\\n\");\n var o = (e + \"\").split(\"\\n\"),\n n = o.length;\n\n if (t.multi) {\n for (var a = 0, d; a < n; a++) if (d = this.splitBlocks(o[a], t.multi), void 0 !== d) {\n if (0 === d.length) {\n this.lines.newLine(\"\");\n continue;\n }\n\n if (0 < t.maxWdt) for (var s = 0; s < d.length; s++) {\n var r = d[s].mod,\n l = d[s].text;\n this.splitStringIntoLines(l, r, !0);\n } else for (var c = 0; c < d.length; c++) {\n var u = d[c].mod,\n p = d[c].text;\n this.lines.append(p, u);\n }\n this.lines.newLine();\n }\n } else if (0 < t.maxWdt) for (var h = 0; h < n; h++) this.splitStringIntoLines(o[h]);else for (var m = 0; m < n; m++) this.lines.newLine(o[m]);\n\n return this.lines.finalize();\n }\n }, {\n key: \"decodeMarkupSystem\",\n value: function (e) {\n var t = \"none\";\n return \"markdown\" === e || \"md\" === e ? t = \"markdown\" : (!0 === e || \"html\" === e) && (t = \"html\"), t;\n }\n }, {\n key: \"splitHtmlBlocks\",\n value: function (e) {\n for (var t = new MarkupAccumulator(e), o = function (e) {\n if (/&/.test(e)) {\n var o = t.replace(t.text, \"<\", \"<\") || t.replace(t.text, \"&\", \"&\");\n return o || t.add(\"&\"), !0;\n }\n\n return !1;\n }; t.position < t.text.length;) {\n var n = t.text.charAt(t.position),\n i = t.parseWS(n) || /\") || t.parseStartTag(\"ital\", \"\") || t.parseStartTag(\"mono\", \"\") || t.parseEndTag(\"bold\", \"\") || t.parseEndTag(\"ital\", \"\") || t.parseEndTag(\"mono\", \"\")) || o(n);\n i || t.add(n), t.position++;\n }\n\n return t.emitBlock(), t.blocks;\n }\n }, {\n key: \"splitMarkdownBlocks\",\n value: function (e) {\n for (var t = this, o = new MarkupAccumulator(e), n = !0, i = function (e) {\n return !!/\\\\/.test(e) && (o.position < t.text.length + 1 && (o.position++, e = t.text.charAt(o.position), / \\t/.test(e) ? o.spacing = !0 : (o.add(e), n = !1)), !0);\n }; o.position < o.text.length;) {\n var a = o.text.charAt(o.position),\n d = o.parseWS(a) || i(a) || (n || o.spacing) && (o.parseStartTag(\"bold\", \"*\") || o.parseStartTag(\"ital\", \"_\") || o.parseStartTag(\"mono\", \"`\")) || o.parseEndTag(\"bold\", \"*\", \"afterBold\") || o.parseEndTag(\"ital\", \"_\", \"afterItal\") || o.parseEndTag(\"mono\", \"`\", \"afterMono\");\n d || (o.add(a), n = !1), o.position++;\n }\n\n return o.emitBlock(), o.blocks;\n }\n }, {\n key: \"splitBlocks\",\n value: function (e, t) {\n var o = this.decodeMarkupSystem(t);\n return \"none\" === o ? [{\n text: e,\n mod: \"normal\"\n }] : \"markdown\" === o ? this.splitMarkdownBlocks(e) : \"html\" === o ? this.splitHtmlBlocks(e) : void 0;\n }\n }, {\n key: \"overMaxWidth\",\n value: function (e) {\n var t = this.ctx.measureText(e).width;\n return this.lines.curWidth() + t > this.parent.fontOptions.maxWdt;\n }\n }, {\n key: \"getLongestFit\",\n value: function (e) {\n for (var t = \"\", o = 0; o < e.length;) {\n var n = \"\" === t ? \"\" : \" \",\n i = t + n + e[o];\n if (this.overMaxWidth(i)) break;\n t = i, o++;\n }\n\n return o;\n }\n }, {\n key: \"getLongestFitWord\",\n value: function (e) {\n for (var t = 0; t < e.length && !this.overMaxWidth(e.slice(0, t));) t++;\n\n return t;\n }\n }, {\n key: \"splitStringIntoLines\",\n value: function (e) {\n var t = 1 < arguments.length && void 0 !== arguments[1] ? arguments[1] : \"normal\",\n o = !!(2 < arguments.length && void 0 !== arguments[2]) && arguments[2];\n this.parent.getFormattingValues(this.ctx, this.selected, this.hover, t), e = e.replace(/^( +)/g, \"$1\\r\"), e = e.replace(/([^\\r][^ ]*)( +)/g, \"$1\\r$2\\r\");\n\n for (var n = e.split(\"\\r\"), i; 0 < n.length;) if (i = this.getLongestFit(n), 0 === i) {\n var a = n[0],\n d = this.getLongestFitWord(a);\n this.lines.newLine(a.slice(0, d), t), n[0] = a.slice(d);\n } else {\n var s = i;\n \" \" === n[i - 1] ? i-- : \" \" === n[s] && s++;\n var r = n.slice(0, i).join(\"\");\n i == n.length && o ? this.lines.append(r, t) : this.lines.newLine(r, t), n = n.slice(s);\n }\n }\n }]), e;\n}(),\n multiFontStyle = [\"bold\", \"ital\", \"boldital\", \"mono\"],\n Label = function () {\n var t = Math.max,\n o = Math.min;\n\n function e(t, o) {\n var n = !!(2 < arguments.length && void 0 !== arguments[2]) && arguments[2];\n classCallCheck$1(this, e), this.body = t, this.pointToSelf = !1, this.baseSize = void 0, this.fontOptions = {}, this.setOptions(o), this.size = {\n top: 0,\n left: 0,\n width: 0,\n height: 0,\n yLine: 0\n }, this.isEdgeLabel = n;\n }\n\n return createClass$1(e, [{\n key: \"setOptions\",\n value: function (e) {\n if (this.elementOptions = e, this.initFontOptions(e.font), ComponentUtil.isValidLabel(e.label) ? this.labelDirty = !0 : e.label = void 0, void 0 !== e.font && null !== e.font) if (\"string\" == typeof e.font) this.baseSize = this.fontOptions.size;else if (\"object\" === _typeof_1$1(e.font)) {\n var t = e.font.size;\n void 0 !== t && (this.baseSize = t);\n }\n }\n }, {\n key: \"initFontOptions\",\n value: function (t) {\n var o = this;\n return util.forEach(multiFontStyle, function (e) {\n o.fontOptions[e] = {};\n }), e.parseFontString(this.fontOptions, t) ? void (this.fontOptions.vadjust = 0) : void util.forEach(t, function (e, t) {\n void 0 !== e && null !== e && \"object\" !== _typeof_1$1(e) && (o.fontOptions[t] = e);\n });\n }\n }, {\n key: \"constrain\",\n value: function (e) {\n var t = {\n constrainWidth: !1,\n maxWdt: -1,\n minWdt: -1,\n constrainHeight: !1,\n minHgt: -1,\n valign: \"middle\"\n },\n o = util.topMost(e, \"widthConstraint\");\n if (\"number\" == typeof o) t.maxWdt = +o, t.minWdt = +o;else if (\"object\" === _typeof_1$1(o)) {\n var n = util.topMost(e, [\"widthConstraint\", \"maximum\"]);\n \"number\" == typeof n && (t.maxWdt = +n);\n var i = util.topMost(e, [\"widthConstraint\", \"minimum\"]);\n \"number\" == typeof i && (t.minWdt = +i);\n }\n var a = util.topMost(e, \"heightConstraint\");\n if (\"number\" == typeof a) t.minHgt = +a;else if (\"object\" === _typeof_1$1(a)) {\n var d = util.topMost(e, [\"heightConstraint\", \"minimum\"]);\n \"number\" == typeof d && (t.minHgt = +d);\n var s = util.topMost(e, [\"heightConstraint\", \"valign\"]);\n \"string\" == typeof s && (\"top\" === s || \"bottom\" === s) && (t.valign = s);\n }\n return t;\n }\n }, {\n key: \"update\",\n value: function (e, t) {\n this.setOptions(e, !0), this.propagateFonts(t), util.deepExtend(this.fontOptions, this.constrain(t)), this.fontOptions.chooser = ComponentUtil.choosify(\"label\", t);\n }\n }, {\n key: \"adjustSizes\",\n value: function (e) {\n var t = e ? e.right + e.left : 0;\n this.fontOptions.constrainWidth && (this.fontOptions.maxWdt -= t, this.fontOptions.minWdt -= t);\n var o = e ? e.top + e.bottom : 0;\n this.fontOptions.constrainHeight && (this.fontOptions.minHgt -= o);\n }\n }, {\n key: \"addFontOptionsToPile\",\n value: function (e, t) {\n for (var o = 0; o < t.length; ++o) this.addFontToPile(e, t[o]);\n }\n }, {\n key: \"addFontToPile\",\n value: function (e, t) {\n if (void 0 !== t && void 0 !== t.font && null !== t.font) {\n var o = t.font;\n e.push(o);\n }\n }\n }, {\n key: \"getBasicOptions\",\n value: function (t) {\n for (var o = {}, i = 0; i < t.length; ++i) {\n var a = t[i],\n d = {};\n e.parseFontString(d, a) && (a = d), util.forEach(a, function (e, t) {\n void 0 === e || o.hasOwnProperty(t) || (-1 === multiFontStyle.indexOf(t) ? o[t] = e : o[t] = {});\n });\n }\n\n return o;\n }\n }, {\n key: \"getFontOption\",\n value: function (t, o, i) {\n for (var a = 0, d, s; a < t.length; ++a) if (s = t[a], s.hasOwnProperty(o)) {\n if (d = s[o], void 0 === d || null === d) continue;\n var r = {};\n if (e.parseFontString(r, d) && (d = r), d.hasOwnProperty(i)) return d[i];\n }\n\n if (this.fontOptions.hasOwnProperty(i)) return this.fontOptions[i];\n throw new Error(\"Did not find value for multi-font for property: '\" + i + \"'\");\n }\n }, {\n key: \"getFontOptions\",\n value: function (e, t) {\n for (var o = {}, n = [\"color\", \"size\", \"face\", \"mod\", \"vadjust\"], a = 0, d; a < n.length; ++a) d = n[a], o[d] = this.getFontOption(e, t, d);\n\n return o;\n }\n }, {\n key: \"propagateFonts\",\n value: function (e) {\n var t = this,\n o = [];\n this.addFontOptionsToPile(o, e), this.fontOptions = this.getBasicOptions(o);\n\n for (var n = function (e) {\n var n = multiFontStyle[e],\n i = t.fontOptions[n],\n a = t.getFontOptions(o, n);\n util.forEach(a, function (e, t) {\n i[t] = e;\n }), i.size = +i.size, i.vadjust = +i.vadjust;\n }, a = 0; a < multiFontStyle.length; ++a) n(a);\n }\n }, {\n key: \"draw\",\n value: function (e, t, o, n, i) {\n var a = 5 < arguments.length && void 0 !== arguments[5] ? arguments[5] : \"middle\";\n\n if (void 0 !== this.elementOptions.label) {\n var d = this.fontOptions.size * this.body.view.scale;\n this.elementOptions.label && d < this.elementOptions.scaling.label.drawThreshold - 1 || (d >= this.elementOptions.scaling.label.maxVisible && (d = +this.elementOptions.scaling.label.maxVisible / this.body.view.scale), this.calculateLabelSize(e, n, i, t, o, a), this._drawBackground(e), this._drawText(e, t, this.size.yLine, a, d));\n }\n }\n }, {\n key: \"_drawBackground\",\n value: function (e) {\n if (void 0 !== this.fontOptions.background && \"none\" !== this.fontOptions.background) {\n e.fillStyle = this.fontOptions.background;\n var t = this.getSize();\n e.fillRect(t.left, t.top, t.width, t.height);\n }\n }\n }, {\n key: \"_drawText\",\n value: function (e, t, o) {\n var n = 3 < arguments.length && void 0 !== arguments[3] ? arguments[3] : \"middle\",\n a = 4 < arguments.length ? arguments[4] : void 0,\n d = this._setAlignment(e, t, o, n),\n s = slicedToArray(d, 2);\n\n t = s[0], o = s[1], e.textAlign = \"left\", t -= this.size.width / 2, this.fontOptions.valign && this.size.height > this.size.labelHeight && (\"top\" === this.fontOptions.valign && (o -= (this.size.height - this.size.labelHeight) / 2), \"bottom\" === this.fontOptions.valign && (o += (this.size.height - this.size.labelHeight) / 2));\n\n for (var r = 0, l; r < this.lineCount; r++) if (l = this.lines[r], l && l.blocks) {\n var c = 0;\n this.isEdgeLabel || \"center\" === this.fontOptions.align ? c += (this.size.width - l.width) / 2 : \"right\" === this.fontOptions.align && (c += this.size.width - l.width);\n\n for (var u = 0, p; u < l.blocks.length; u++) {\n p = l.blocks[u], e.font = p.font;\n\n var h = this._getColor(p.color, a, p.strokeColor),\n m = slicedToArray(h, 2),\n g = m[0],\n f = m[1];\n\n 0 < p.strokeWidth && (e.lineWidth = p.strokeWidth, e.strokeStyle = f, e.lineJoin = \"round\"), e.fillStyle = g, 0 < p.strokeWidth && e.strokeText(p.text, t + c, o + p.vadjust), e.fillText(p.text, t + c, o + p.vadjust), c += p.width;\n }\n\n o += l.height;\n }\n }\n }, {\n key: \"_setAlignment\",\n value: function (e, t, o, n) {\n if (this.isEdgeLabel && \"horizontal\" !== this.fontOptions.align && !1 === this.pointToSelf) {\n t = 0, o = 0;\n \"top\" === this.fontOptions.align ? (e.textBaseline = \"alphabetic\", o -= 4) : \"bottom\" === this.fontOptions.align ? (e.textBaseline = \"hanging\", o += 4) : e.textBaseline = \"middle\";\n } else e.textBaseline = n;\n\n return [t, o];\n }\n }, {\n key: \"_getColor\",\n value: function (e, n, i) {\n var a = e || \"#000000\",\n d = i || \"#ffffff\";\n\n if (n <= this.elementOptions.scaling.label.drawThreshold) {\n var s = t(0, o(1, 1 - (this.elementOptions.scaling.label.drawThreshold - n)));\n a = util.overrideOpacity(a, s), d = util.overrideOpacity(d, s);\n }\n\n return [a, d];\n }\n }, {\n key: \"getTextSize\",\n value: function (e) {\n var t = !!(1 < arguments.length && void 0 !== arguments[1]) && arguments[1],\n o = !!(2 < arguments.length && void 0 !== arguments[2]) && arguments[2];\n return this._processLabel(e, t, o), {\n width: this.size.width,\n height: this.size.height,\n lineCount: this.lineCount\n };\n }\n }, {\n key: \"getSize\",\n value: function () {\n var e = this.size.left,\n t = this.size.top - 1;\n\n if (this.isEdgeLabel) {\n var o = .5 * -this.size.width;\n\n switch (this.fontOptions.align) {\n case \"middle\":\n e = o, t = .5 * -this.size.height;\n break;\n\n case \"top\":\n e = o, t = -(this.size.height + 2);\n break;\n\n case \"bottom\":\n e = o, t = 2;\n }\n }\n\n var n = {\n left: e,\n top: t,\n width: this.size.width,\n height: this.size.height\n };\n return n;\n }\n }, {\n key: \"calculateLabelSize\",\n value: function (e, t, o) {\n var n = 3 < arguments.length && void 0 !== arguments[3] ? arguments[3] : 0,\n i = 4 < arguments.length && void 0 !== arguments[4] ? arguments[4] : 0,\n a = 5 < arguments.length && void 0 !== arguments[5] ? arguments[5] : \"middle\";\n this._processLabel(e, t, o), this.size.left = n - .5 * this.size.width, this.size.top = i - .5 * this.size.height, this.size.yLine = i + .5 * (1 - this.lineCount) * this.fontOptions.size, \"hanging\" === a && (this.size.top += .5 * this.fontOptions.size, this.size.top += 4, this.size.yLine += 4);\n }\n }, {\n key: \"getFormattingValues\",\n value: function (e, t, o, n) {\n var i = function (e, t, o) {\n return \"normal\" === t ? \"mod\" === o ? \"\" : e[o] : void 0 === e[t][o] ? e[o] : e[t][o];\n },\n a = {\n color: i(this.fontOptions, n, \"color\"),\n size: i(this.fontOptions, n, \"size\"),\n face: i(this.fontOptions, n, \"face\"),\n mod: i(this.fontOptions, n, \"mod\"),\n vadjust: i(this.fontOptions, n, \"vadjust\"),\n strokeWidth: this.fontOptions.strokeWidth,\n strokeColor: this.fontOptions.strokeColor\n };\n\n (t || o) && (\"normal\" === n && !0 === this.fontOptions.chooser && this.elementOptions.labelHighlightBold ? a.mod = \"bold\" : \"function\" == typeof this.fontOptions.chooser && this.fontOptions.chooser(a, this.elementOptions.id, t, o));\n var d = \"\";\n return void 0 !== a.mod && \"\" !== a.mod && (d += a.mod + \" \"), d += a.size + \"px \" + a.face, e.font = d.replace(/\"/g, \"\"), a.font = e.font, a.height = a.size, a;\n }\n }, {\n key: \"differentState\",\n value: function (e, t) {\n return e !== this.selectedState || t !== this.hoverState;\n }\n }, {\n key: \"_processLabelText\",\n value: function (e, t, o, n) {\n var i = new LabelSplitter(e, this, t, o);\n return i.process(n);\n }\n }, {\n key: \"_processLabel\",\n value: function (e, t, o) {\n if (!1 !== this.labelDirty || this.differentState(t, o)) {\n var n = this._processLabelText(e, t, o, this.elementOptions.label);\n\n 0 < this.fontOptions.minWdt && n.width < this.fontOptions.minWdt && (n.width = this.fontOptions.minWdt), this.size.labelHeight = n.height, 0 < this.fontOptions.minHgt && n.height < this.fontOptions.minHgt && (n.height = this.fontOptions.minHgt), this.lines = n.lines, this.lineCount = n.lines.length, this.size.width = n.width, this.size.height = n.height, this.selectedState = t, this.hoverState = o, this.labelDirty = !1;\n }\n }\n }, {\n key: \"visible\",\n value: function () {\n if (0 === this.size.width || 0 === this.size.height || void 0 === this.elementOptions.label) return !1;\n var e = this.fontOptions.size * this.body.view.scale;\n return !(e < this.elementOptions.scaling.label.drawThreshold - 1);\n }\n }], [{\n key: \"parseFontString\",\n value: function (e, t) {\n if (!t || \"string\" != typeof t) return !1;\n var o = t.split(\" \");\n return e.size = +o[0].replace(\"px\", \"\"), e.face = o[1], e.color = o[2], !0;\n }\n }]), e;\n}();\n\nfunction _assertThisInitialized$2(e) {\n if (void 0 === e) throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n return e;\n}\n\nvar assertThisInitialized$1 = _assertThisInitialized$2;\n\nfunction _possibleConstructorReturn$1(e, t) {\n return t && (\"object\" === _typeof_1$1(t) || \"function\" == typeof t) ? t : assertThisInitialized$1(e);\n}\n\nvar possibleConstructorReturn$1 = _possibleConstructorReturn$1,\n getPrototypeOf$1 = createCommonjsModule$2(function (e) {\n function t(n) {\n return e.exports = t = Object.setPrototypeOf ? Object.getPrototypeOf : function (e) {\n return e.__proto__ || Object.getPrototypeOf(e);\n }, t(n);\n }\n\n e.exports = t;\n}),\n setPrototypeOf$2 = createCommonjsModule$2(function (e) {\n function t(n, o) {\n return e.exports = t = Object.setPrototypeOf || function (e, t) {\n return e.__proto__ = t, e;\n }, t(n, o);\n }\n\n e.exports = t;\n});\n\nfunction _inherits$1(e, t) {\n if (\"function\" != typeof t && null !== t) throw new TypeError(\"Super expression must either be null or a function\");\n e.prototype = Object.create(t && t.prototype, {\n constructor: {\n value: e,\n writable: !0,\n configurable: !0\n }\n }), t && setPrototypeOf$2(e, t);\n}\n\nvar inherits$1 = _inherits$1,\n NodeBase = function () {\n var t = Math.cos,\n o = Math.sin,\n n = Math.abs,\n i = Math.min;\n\n function e(t, o, n) {\n classCallCheck$1(this, e), this.body = o, this.labelModule = n, this.setOptions(t), this.top = void 0, this.left = void 0, this.height = void 0, this.width = void 0, this.radius = void 0, this.margin = void 0, this.refreshNeeded = !0, this.boundingBox = {\n top: 0,\n left: 0,\n right: 0,\n bottom: 0\n };\n }\n\n return createClass$1(e, [{\n key: \"setOptions\",\n value: function (e) {\n this.options = e;\n }\n }, {\n key: \"_setMargins\",\n value: function (e) {\n this.margin = {}, this.options.margin && (\"object\" == _typeof_1$1(this.options.margin) ? (this.margin.top = this.options.margin.top, this.margin.right = this.options.margin.right, this.margin.bottom = this.options.margin.bottom, this.margin.left = this.options.margin.left) : (this.margin.top = this.options.margin, this.margin.right = this.options.margin, this.margin.bottom = this.options.margin, this.margin.left = this.options.margin)), e.adjustSizes(this.margin);\n }\n }, {\n key: \"_distanceToBorder\",\n value: function (e, a) {\n var d = this.options.borderWidth;\n return this.resize(e), i(n(this.width / 2 / t(a)), n(this.height / 2 / o(a))) + d;\n }\n }, {\n key: \"enableShadow\",\n value: function (e, t) {\n t.shadow && (e.shadowColor = t.shadowColor, e.shadowBlur = t.shadowSize, e.shadowOffsetX = t.shadowX, e.shadowOffsetY = t.shadowY);\n }\n }, {\n key: \"disableShadow\",\n value: function (e, t) {\n t.shadow && (e.shadowColor = \"rgba(0,0,0,0)\", e.shadowBlur = 0, e.shadowOffsetX = 0, e.shadowOffsetY = 0);\n }\n }, {\n key: \"enableBorderDashes\",\n value: function (e, t) {\n if (!1 !== t.borderDashes) if (void 0 !== e.setLineDash) {\n var o = t.borderDashes;\n !0 === o && (o = [5, 15]), e.setLineDash(o);\n } else console.warn(\"setLineDash is not supported in this browser. The dashed borders cannot be used.\"), this.options.shapeProperties.borderDashes = !1, t.borderDashes = !1;\n }\n }, {\n key: \"disableBorderDashes\",\n value: function (e, t) {\n !1 !== t.borderDashes && (void 0 === e.setLineDash ? (console.warn(\"setLineDash is not supported in this browser. The dashed borders cannot be used.\"), this.options.shapeProperties.borderDashes = !1, t.borderDashes = !1) : e.setLineDash([0]));\n }\n }, {\n key: \"needsRefresh\",\n value: function (e, t) {\n return !0 === this.refreshNeeded ? (this.refreshNeeded = !1, !0) : void 0 === this.width || this.labelModule.differentState(e, t);\n }\n }, {\n key: \"initContextForDraw\",\n value: function (e, t) {\n var o = t.borderWidth / this.body.view.scale;\n e.lineWidth = i(this.width, o), e.strokeStyle = t.borderColor, e.fillStyle = t.color;\n }\n }, {\n key: \"performStroke\",\n value: function (e, t) {\n var o = t.borderWidth / this.body.view.scale;\n e.save(), 0 < o && (this.enableBorderDashes(e, t), e.stroke(), this.disableBorderDashes(e, t)), e.restore();\n }\n }, {\n key: \"performFill\",\n value: function (e, t) {\n this.enableShadow(e, t), e.fill(), this.disableShadow(e, t), this.performStroke(e, t);\n }\n }, {\n key: \"_addBoundingBoxMargin\",\n value: function (e) {\n this.boundingBox.left -= e, this.boundingBox.top -= e, this.boundingBox.bottom += e, this.boundingBox.right += e;\n }\n }, {\n key: \"_updateBoundingBox\",\n value: function (e, t, o, n, i) {\n void 0 !== o && this.resize(o, n, i), this.left = e - this.width / 2, this.top = t - this.height / 2, this.boundingBox.left = this.left, this.boundingBox.top = this.top, this.boundingBox.bottom = this.top + this.height, this.boundingBox.right = this.left + this.width;\n }\n }, {\n key: \"updateBoundingBox\",\n value: function (e, t, o, n, i) {\n this._updateBoundingBox(e, t, o, n, i);\n }\n }, {\n key: \"getDimensionsFromLabel\",\n value: function (e, t, o) {\n this.textSize = this.labelModule.getTextSize(e, t, o);\n var n = this.textSize.width,\n i = this.textSize.height,\n a = 14;\n return 0 === n && (n = a, i = a), {\n width: n,\n height: i\n };\n }\n }]), e;\n}(),\n Box = function (e) {\n var o = Math.cos,\n n = Math.sin,\n i = Math.abs,\n a = Math.min;\n\n function t(e, o, n) {\n var i;\n return classCallCheck$1(this, t), i = possibleConstructorReturn$1(this, getPrototypeOf$1(t).call(this, e, o, n)), i._setMargins(n), i;\n }\n\n return inherits$1(t, e), createClass$1(t, [{\n key: \"resize\",\n value: function (e) {\n var t = 1 < arguments.length && void 0 !== arguments[1] ? arguments[1] : this.selected,\n o = 2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : this.hover;\n\n if (this.needsRefresh(t, o)) {\n var n = this.getDimensionsFromLabel(e, t, o);\n this.width = n.width + this.margin.right + this.margin.left, this.height = n.height + this.margin.top + this.margin.bottom, this.radius = this.width / 2;\n }\n }\n }, {\n key: \"draw\",\n value: function (e, t, o, n, i, a) {\n this.resize(e, n, i), this.left = t - this.width / 2, this.top = o - this.height / 2, this.initContextForDraw(e, a), e.roundRect(this.left, this.top, this.width, this.height, a.borderRadius), this.performFill(e, a), this.updateBoundingBox(t, o, e, n, i), this.labelModule.draw(e, this.left + this.textSize.width / 2 + this.margin.left, this.top + this.textSize.height / 2 + this.margin.top, n, i);\n }\n }, {\n key: \"updateBoundingBox\",\n value: function (e, t, o, n, i) {\n this._updateBoundingBox(e, t, o, n, i);\n\n var a = this.options.shapeProperties.borderRadius;\n\n this._addBoundingBoxMargin(a);\n }\n }, {\n key: \"distanceToBorder\",\n value: function (e, t) {\n this.resize(e);\n var d = this.options.borderWidth;\n return a(i(this.width / 2 / o(t)), i(this.height / 2 / n(t))) + d;\n }\n }]), t;\n}(NodeBase),\n CircleImageBase = function (e) {\n function t(e, o, n) {\n var i;\n return classCallCheck$1(this, t), i = possibleConstructorReturn$1(this, getPrototypeOf$1(t).call(this, e, o, n)), i.labelOffset = 0, i.selected = !1, i;\n }\n\n return inherits$1(t, e), createClass$1(t, [{\n key: \"setOptions\",\n value: function (e, t, o) {\n this.options = e, void 0 === t && void 0 === o || this.setImages(t, o);\n }\n }, {\n key: \"setImages\",\n value: function (e, t) {\n t && this.selected ? (this.imageObj = t, this.imageObjAlt = e) : (this.imageObj = e, this.imageObjAlt = t);\n }\n }, {\n key: \"switchImages\",\n value: function (e) {\n var t = e && !this.selected || !e && this.selected;\n\n if (this.selected = e, void 0 !== this.imageObjAlt && t) {\n var o = this.imageObj;\n this.imageObj = this.imageObjAlt, this.imageObjAlt = o;\n }\n }\n }, {\n key: \"_resizeImage\",\n value: function () {\n var e, t;\n\n if (!1 === this.options.shapeProperties.useImageSize) {\n var o = 1,\n n = 1;\n this.imageObj.width && this.imageObj.height && (this.imageObj.width > this.imageObj.height ? o = this.imageObj.width / this.imageObj.height : n = this.imageObj.height / this.imageObj.width), e = 2 * this.options.size * o, t = 2 * this.options.size * n;\n } else e = this.imageObj.width, t = this.imageObj.height;\n\n this.width = e, this.height = t, this.radius = .5 * this.width;\n }\n }, {\n key: \"_drawRawCircle\",\n value: function (e, t, o, n) {\n this.initContextForDraw(e, n), e.circle(t, o, n.size), this.performFill(e, n);\n }\n }, {\n key: \"_drawImageAtPosition\",\n value: function (e, t) {\n if (0 != this.imageObj.width) {\n e.globalAlpha = 1, this.enableShadow(e, t);\n var o = 1;\n !0 === this.options.shapeProperties.interpolation && (o = this.imageObj.width / this.width / this.body.view.scale), this.imageObj.drawImageAtPosition(e, o, this.left, this.top, this.width, this.height), this.disableShadow(e, t);\n }\n }\n }, {\n key: \"_drawImageLabel\",\n value: function (e, t, o, n, i) {\n var a = 0,\n d;\n\n if (void 0 !== this.height) {\n a = .5 * this.height;\n var s = this.labelModule.getTextSize(e, n, i);\n 1 <= s.lineCount && (a += s.height / 2);\n }\n\n d = o + a, this.options.label && (this.labelOffset = a), this.labelModule.draw(e, t, d, n, i, \"hanging\");\n }\n }]), t;\n}(NodeBase),\n Circle = function (e) {\n var o = Math.max;\n\n function t(e, o, n) {\n var i;\n return classCallCheck$1(this, t), i = possibleConstructorReturn$1(this, getPrototypeOf$1(t).call(this, e, o, n)), i._setMargins(n), i;\n }\n\n return inherits$1(t, e), createClass$1(t, [{\n key: \"resize\",\n value: function (e) {\n var t = 1 < arguments.length && void 0 !== arguments[1] ? arguments[1] : this.selected,\n n = 2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : this.hover;\n\n if (this.needsRefresh(t, n)) {\n var i = this.getDimensionsFromLabel(e, t, n),\n a = o(i.width + this.margin.right + this.margin.left, i.height + this.margin.top + this.margin.bottom);\n this.options.size = a / 2, this.width = a, this.height = a, this.radius = this.width / 2;\n }\n }\n }, {\n key: \"draw\",\n value: function (e, t, o, n, i, a) {\n this.resize(e, n, i), this.left = t - this.width / 2, this.top = o - this.height / 2, this._drawRawCircle(e, t, o, a), this.updateBoundingBox(t, o), this.labelModule.draw(e, this.left + this.textSize.width / 2 + this.margin.left, o, n, i);\n }\n }, {\n key: \"updateBoundingBox\",\n value: function (e, t) {\n this.boundingBox.top = t - this.options.size, this.boundingBox.left = e - this.options.size, this.boundingBox.right = e + this.options.size, this.boundingBox.bottom = t + this.options.size;\n }\n }, {\n key: \"distanceToBorder\",\n value: function (e) {\n return this.resize(e), .5 * this.width;\n }\n }]), t;\n}(CircleImageBase),\n CircularImage = function (e) {\n var o = Math.max,\n n = Math.min;\n\n function t(e, o, n, i, a) {\n var d;\n return classCallCheck$1(this, t), d = possibleConstructorReturn$1(this, getPrototypeOf$1(t).call(this, e, o, n)), d.setImages(i, a), d;\n }\n\n return inherits$1(t, e), createClass$1(t, [{\n key: \"resize\",\n value: function () {\n var e = 1 < arguments.length && void 0 !== arguments[1] ? arguments[1] : this.selected,\n t = 2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : this.hover,\n o = void 0 === this.imageObj.src || void 0 === this.imageObj.width || void 0 === this.imageObj.height;\n\n if (o) {\n var n = 2 * this.options.size;\n return this.width = n, this.height = n, void (this.radius = .5 * this.width);\n }\n\n this.needsRefresh(e, t) && this._resizeImage();\n }\n }, {\n key: \"draw\",\n value: function (e, t, o, n, i, a) {\n this.switchImages(n), this.resize(), this.left = t - this.width / 2, this.top = o - this.height / 2, this._drawRawCircle(e, t, o, a), e.save(), e.clip(), this._drawImageAtPosition(e, a), e.restore(), this._drawImageLabel(e, t, o, n, i), this.updateBoundingBox(t, o);\n }\n }, {\n key: \"updateBoundingBox\",\n value: function (e, t) {\n this.boundingBox.top = t - this.options.size, this.boundingBox.left = e - this.options.size, this.boundingBox.right = e + this.options.size, this.boundingBox.bottom = t + this.options.size, this.boundingBox.left = n(this.boundingBox.left, this.labelModule.size.left), this.boundingBox.right = o(this.boundingBox.right, this.labelModule.size.left + this.labelModule.size.width), this.boundingBox.bottom = o(this.boundingBox.bottom, this.boundingBox.bottom + this.labelOffset);\n }\n }, {\n key: \"distanceToBorder\",\n value: function (e) {\n return this.resize(e), .5 * this.width;\n }\n }]), t;\n}(CircleImageBase),\n Database = function (e) {\n function t(e, o, n) {\n var i;\n return classCallCheck$1(this, t), i = possibleConstructorReturn$1(this, getPrototypeOf$1(t).call(this, e, o, n)), i._setMargins(n), i;\n }\n\n return inherits$1(t, e), createClass$1(t, [{\n key: \"resize\",\n value: function (e, t, o) {\n if (this.needsRefresh(t, o)) {\n var n = this.getDimensionsFromLabel(e, t, o),\n i = n.width + this.margin.right + this.margin.left;\n this.width = i, this.height = i, this.radius = this.width / 2;\n }\n }\n }, {\n key: \"draw\",\n value: function (e, t, o, n, i, a) {\n this.resize(e, n, i), this.left = t - this.width / 2, this.top = o - this.height / 2, this.initContextForDraw(e, a), e.database(t - this.width / 2, o - this.height / 2, this.width, this.height), this.performFill(e, a), this.updateBoundingBox(t, o, e, n, i), this.labelModule.draw(e, this.left + this.textSize.width / 2 + this.margin.left, this.top + this.textSize.height / 2 + this.margin.top, n, i);\n }\n }, {\n key: \"distanceToBorder\",\n value: function (e, t) {\n return this._distanceToBorder(e, t);\n }\n }]), t;\n}(NodeBase),\n ShapeBase = function (e) {\n var o = Math.max,\n n = Math.min;\n\n function t(e, o, n) {\n return classCallCheck$1(this, t), possibleConstructorReturn$1(this, getPrototypeOf$1(t).call(this, e, o, n));\n }\n\n return inherits$1(t, e), createClass$1(t, [{\n key: \"resize\",\n value: function (e) {\n var t = 1 < arguments.length && void 0 !== arguments[1] ? arguments[1] : this.selected,\n o = 2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : this.hover,\n n = 3 < arguments.length && void 0 !== arguments[3] ? arguments[3] : {\n size: this.options.size\n };\n\n if (this.needsRefresh(t, o)) {\n this.labelModule.getTextSize(e, t, o);\n var i = 2 * n.size;\n this.width = i, this.height = i, this.radius = .5 * this.width;\n }\n }\n }, {\n key: \"_drawShape\",\n value: function (e, t, o, n, i, a, d, s) {\n if (this.resize(e, a, d, s), this.left = n - this.width / 2, this.top = i - this.height / 2, this.initContextForDraw(e, s), e[t](n, i, s.size), this.performFill(e, s), void 0 !== this.options.icon && void 0 !== this.options.icon.code && (e.font = (a ? \"bold \" : \"\") + this.height / 2 + \"px \" + (this.options.icon.face || \"FontAwesome\"), e.fillStyle = this.options.icon.color || \"black\", e.textAlign = \"center\", e.textBaseline = \"middle\", e.fillText(this.options.icon.code, n, i)), void 0 !== this.options.label) {\n this.labelModule.calculateLabelSize(e, a, d, n, i, \"hanging\");\n var r = i + .5 * this.height + .5 * this.labelModule.size.height;\n this.labelModule.draw(e, n, r, a, d, \"hanging\");\n }\n\n this.updateBoundingBox(n, i);\n }\n }, {\n key: \"updateBoundingBox\",\n value: function (e, t) {\n this.boundingBox.top = t - this.options.size, this.boundingBox.left = e - this.options.size, this.boundingBox.right = e + this.options.size, this.boundingBox.bottom = t + this.options.size, void 0 !== this.options.label && 0 < this.labelModule.size.width && (this.boundingBox.left = n(this.boundingBox.left, this.labelModule.size.left), this.boundingBox.right = o(this.boundingBox.right, this.labelModule.size.left + this.labelModule.size.width), this.boundingBox.bottom = o(this.boundingBox.bottom, this.boundingBox.bottom + this.labelModule.size.height));\n }\n }]), t;\n}(NodeBase),\n Diamond = function (e) {\n function t(e, o, n) {\n return classCallCheck$1(this, t), possibleConstructorReturn$1(this, getPrototypeOf$1(t).call(this, e, o, n));\n }\n\n return inherits$1(t, e), createClass$1(t, [{\n key: \"draw\",\n value: function (e, t, o, n, i, a) {\n this._drawShape(e, \"diamond\", 4, t, o, n, i, a);\n }\n }, {\n key: \"distanceToBorder\",\n value: function (e, t) {\n return this._distanceToBorder(e, t);\n }\n }]), t;\n}(ShapeBase),\n Dot = function (e) {\n function t(e, o, n) {\n return classCallCheck$1(this, t), possibleConstructorReturn$1(this, getPrototypeOf$1(t).call(this, e, o, n));\n }\n\n return inherits$1(t, e), createClass$1(t, [{\n key: \"draw\",\n value: function (e, t, o, n, i, a) {\n this._drawShape(e, \"circle\", 2, t, o, n, i, a);\n }\n }, {\n key: \"distanceToBorder\",\n value: function (e) {\n return this.resize(e), this.options.size;\n }\n }]), t;\n}(ShapeBase),\n Ellipse = function (e) {\n var o = Math.cos,\n n = Math.sin,\n i = Math.sqrt;\n\n function t(e, o, n) {\n return classCallCheck$1(this, t), possibleConstructorReturn$1(this, getPrototypeOf$1(t).call(this, e, o, n));\n }\n\n return inherits$1(t, e), createClass$1(t, [{\n key: \"resize\",\n value: function (e) {\n var t = 1 < arguments.length && void 0 !== arguments[1] ? arguments[1] : this.selected,\n o = 2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : this.hover;\n\n if (this.needsRefresh(t, o)) {\n var n = this.getDimensionsFromLabel(e, t, o);\n this.height = 2 * n.height, this.width = n.width + n.height, this.radius = .5 * this.width;\n }\n }\n }, {\n key: \"draw\",\n value: function (e, t, o, n, i, a) {\n this.resize(e, n, i), this.left = t - .5 * this.width, this.top = o - .5 * this.height, this.initContextForDraw(e, a), e.ellipse_vis(this.left, this.top, this.width, this.height), this.performFill(e, a), this.updateBoundingBox(t, o, e, n, i), this.labelModule.draw(e, t, o, n, i);\n }\n }, {\n key: \"distanceToBorder\",\n value: function (e, t) {\n this.resize(e);\n var d = .5 * this.width,\n a = .5 * this.height,\n s = n(t) * d,\n r = o(t) * a;\n return d * a / i(s * s + r * r);\n }\n }]), t;\n}(NodeBase),\n Icon = function (e) {\n var o = Math.max,\n n = Math.min;\n\n function t(e, o, n) {\n var i;\n return classCallCheck$1(this, t), i = possibleConstructorReturn$1(this, getPrototypeOf$1(t).call(this, e, o, n)), i._setMargins(n), i;\n }\n\n return inherits$1(t, e), createClass$1(t, [{\n key: \"resize\",\n value: function (e, t, o) {\n this.needsRefresh(t, o) && (this.iconSize = {\n width: +this.options.icon.size,\n height: +this.options.icon.size\n }, this.width = this.iconSize.width + this.margin.right + this.margin.left, this.height = this.iconSize.height + this.margin.top + this.margin.bottom, this.radius = .5 * this.width);\n }\n }, {\n key: \"draw\",\n value: function (e, t, o, n, i, a) {\n if (this.resize(e, n, i), this.options.icon.size = this.options.icon.size || 50, this.left = t - this.width / 2, this.top = o - this.height / 2, this._icon(e, t, o, n, i, a), void 0 !== this.options.label) {\n this.labelModule.draw(e, this.left + this.iconSize.width / 2 + this.margin.left, o + this.height / 2 + 5, n);\n }\n\n this.updateBoundingBox(t, o);\n }\n }, {\n key: \"updateBoundingBox\",\n value: function (e, t) {\n if (this.boundingBox.top = t - .5 * this.options.icon.size, this.boundingBox.left = e - .5 * this.options.icon.size, this.boundingBox.right = e + .5 * this.options.icon.size, this.boundingBox.bottom = t + .5 * this.options.icon.size, void 0 !== this.options.label && 0 < this.labelModule.size.width) {\n this.boundingBox.left = n(this.boundingBox.left, this.labelModule.size.left), this.boundingBox.right = o(this.boundingBox.right, this.labelModule.size.left + this.labelModule.size.width), this.boundingBox.bottom = o(this.boundingBox.bottom, this.boundingBox.bottom + this.labelModule.size.height + 5);\n }\n }\n }, {\n key: \"_icon\",\n value: function (e, t, o, n, i, a) {\n var d = +this.options.icon.size;\n void 0 === this.options.icon.code ? console.error(\"When using the icon shape, you need to define the code in the icon options object. This can be done per node or globally.\") : (e.font = (n ? \"bold \" : \"\") + d + \"px \" + this.options.icon.face, e.fillStyle = this.options.icon.color || \"black\", e.textAlign = \"center\", e.textBaseline = \"middle\", this.enableShadow(e, a), e.fillText(this.options.icon.code, t, o), this.disableShadow(e, a));\n }\n }, {\n key: \"distanceToBorder\",\n value: function (e, t) {\n return this._distanceToBorder(e, t);\n }\n }]), t;\n}(NodeBase),\n Image$1 = function (e) {\n var o = Math.max,\n n = Math.min;\n\n function t(e, o, n, i, a) {\n var d;\n return classCallCheck$1(this, t), d = possibleConstructorReturn$1(this, getPrototypeOf$1(t).call(this, e, o, n)), d.setImages(i, a), d;\n }\n\n return inherits$1(t, e), createClass$1(t, [{\n key: \"resize\",\n value: function () {\n var e = 1 < arguments.length && void 0 !== arguments[1] ? arguments[1] : this.selected,\n t = 2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : this.hover,\n o = void 0 === this.imageObj.src || void 0 === this.imageObj.width || void 0 === this.imageObj.height;\n\n if (o) {\n var n = 2 * this.options.size;\n return this.width = n, void (this.height = n);\n }\n\n this.needsRefresh(e, t) && this._resizeImage();\n }\n }, {\n key: \"draw\",\n value: function (e, t, o, i, a, d) {\n if (this.switchImages(i), this.resize(), this.left = t - this.width / 2, this.top = o - this.height / 2, !0 === this.options.shapeProperties.useBorderWithImage) {\n var s = this.options.borderWidth,\n r = this.options.borderWidthSelected || 2 * this.options.borderWidth,\n l = (i ? r : s) / this.body.view.scale;\n e.lineWidth = n(this.width, l), e.beginPath(), e.strokeStyle = i ? this.options.color.highlight.border : a ? this.options.color.hover.border : this.options.color.border, e.fillStyle = i ? this.options.color.highlight.background : a ? this.options.color.hover.background : this.options.color.background, e.rect(this.left - .5 * e.lineWidth, this.top - .5 * e.lineWidth, this.width + e.lineWidth, this.height + e.lineWidth), e.fill(), this.performStroke(e, d), e.closePath();\n }\n\n this._drawImageAtPosition(e, d), this._drawImageLabel(e, t, o, i, a), this.updateBoundingBox(t, o);\n }\n }, {\n key: \"updateBoundingBox\",\n value: function (e, t) {\n this.resize(), this._updateBoundingBox(e, t), void 0 !== this.options.label && 0 < this.labelModule.size.width && (this.boundingBox.left = n(this.boundingBox.left, this.labelModule.size.left), this.boundingBox.right = o(this.boundingBox.right, this.labelModule.size.left + this.labelModule.size.width), this.boundingBox.bottom = o(this.boundingBox.bottom, this.boundingBox.bottom + this.labelOffset));\n }\n }, {\n key: \"distanceToBorder\",\n value: function (e, t) {\n return this._distanceToBorder(e, t);\n }\n }]), t;\n}(CircleImageBase),\n Square = function (e) {\n function t(e, o, n) {\n return classCallCheck$1(this, t), possibleConstructorReturn$1(this, getPrototypeOf$1(t).call(this, e, o, n));\n }\n\n return inherits$1(t, e), createClass$1(t, [{\n key: \"draw\",\n value: function (e, t, o, n, i, a) {\n this._drawShape(e, \"square\", 2, t, o, n, i, a);\n }\n }, {\n key: \"distanceToBorder\",\n value: function (e, t) {\n return this._distanceToBorder(e, t);\n }\n }]), t;\n}(ShapeBase),\n Hexagon = function (e) {\n function t(e, o, n) {\n return classCallCheck$1(this, t), possibleConstructorReturn$1(this, getPrototypeOf$1(t).call(this, e, o, n));\n }\n\n return inherits$1(t, e), createClass$1(t, [{\n key: \"draw\",\n value: function (e, t, o, n, i, a) {\n this._drawShape(e, \"hexagon\", 4, t, o, n, i, a);\n }\n }, {\n key: \"distanceToBorder\",\n value: function (e, t) {\n return this._distanceToBorder(e, t);\n }\n }]), t;\n}(ShapeBase),\n Star = function (e) {\n function t(e, o, n) {\n return classCallCheck$1(this, t), possibleConstructorReturn$1(this, getPrototypeOf$1(t).call(this, e, o, n));\n }\n\n return inherits$1(t, e), createClass$1(t, [{\n key: \"draw\",\n value: function (e, t, o, n, i, a) {\n this._drawShape(e, \"star\", 4, t, o, n, i, a);\n }\n }, {\n key: \"distanceToBorder\",\n value: function (e, t) {\n return this._distanceToBorder(e, t);\n }\n }]), t;\n}(ShapeBase),\n Text = function (e) {\n function t(e, o, n) {\n var i;\n return classCallCheck$1(this, t), i = possibleConstructorReturn$1(this, getPrototypeOf$1(t).call(this, e, o, n)), i._setMargins(n), i;\n }\n\n return inherits$1(t, e), createClass$1(t, [{\n key: \"resize\",\n value: function (e, t, o) {\n this.needsRefresh(t, o) && (this.textSize = this.labelModule.getTextSize(e, t, o), this.width = this.textSize.width + this.margin.right + this.margin.left, this.height = this.textSize.height + this.margin.top + this.margin.bottom, this.radius = .5 * this.width);\n }\n }, {\n key: \"draw\",\n value: function (e, t, o, n, i, a) {\n this.resize(e, n, i), this.left = t - this.width / 2, this.top = o - this.height / 2, this.enableShadow(e, a), this.labelModule.draw(e, this.left + this.textSize.width / 2 + this.margin.left, this.top + this.textSize.height / 2 + this.margin.top, n, i), this.disableShadow(e, a), this.updateBoundingBox(t, o, e, n, i);\n }\n }, {\n key: \"distanceToBorder\",\n value: function (e, t) {\n return this._distanceToBorder(e, t);\n }\n }]), t;\n}(NodeBase),\n Triangle = function (e) {\n function t(e, o, n) {\n return classCallCheck$1(this, t), possibleConstructorReturn$1(this, getPrototypeOf$1(t).call(this, e, o, n));\n }\n\n return inherits$1(t, e), createClass$1(t, [{\n key: \"draw\",\n value: function (e, t, o, n, i, a) {\n this._drawShape(e, \"triangle\", 3, t, o, n, i, a);\n }\n }, {\n key: \"distanceToBorder\",\n value: function (e, t) {\n return this._distanceToBorder(e, t);\n }\n }]), t;\n}(ShapeBase),\n TriangleDown = function (e) {\n function t(e, o, n) {\n return classCallCheck$1(this, t), possibleConstructorReturn$1(this, getPrototypeOf$1(t).call(this, e, o, n));\n }\n\n return inherits$1(t, e), createClass$1(t, [{\n key: \"draw\",\n value: function (e, t, o, n, i, a) {\n this._drawShape(e, \"triangleDown\", 3, t, o, n, i, a);\n }\n }, {\n key: \"distanceToBorder\",\n value: function (e, t) {\n return this._distanceToBorder(e, t);\n }\n }]), t;\n}(ShapeBase),\n errorFound = !1,\n printStyle = \"background: #FFeeee; color: #dd0000\",\n Validator = function () {\n var t = Math.min;\n\n function e() {\n classCallCheck$1(this, e);\n }\n\n return createClass$1(e, null, [{\n key: \"validate\",\n value: function (t, o, n) {\n errorFound = !1, allOptions = o;\n var i = o;\n return void 0 !== n && (i = o[n]), e.parse(t, i, []), errorFound;\n }\n }, {\n key: \"parse\",\n value: function (t, o, n) {\n for (var i in t) t.hasOwnProperty(i) && e.check(i, t, o, n);\n }\n }, {\n key: \"check\",\n value: function (t, o, n, i) {\n if (void 0 === n[t] && void 0 === n.__any__) return void e.getSuggestion(t, n, i);\n var a = t,\n d = !0;\n void 0 === n[t] && void 0 !== n.__any__ && (a = \"__any__\", d = \"object\" === e.getType(o[t]));\n var s = n[a];\n d && void 0 !== s.__type__ && (s = s.__type__), e.checkFields(t, o, n, a, s, i);\n }\n }, {\n key: \"checkFields\",\n value: function (t, o, n, i, a, d) {\n var s = function (o) {\n console.log(\"%c\" + o + e.printLocation(d, t), printStyle);\n },\n r = e.getType(o[t]),\n l = a[r];\n\n void 0 === l ? void 0 === a.any && (s(\"Invalid type received for \\\"\" + t + \"\\\". Expected: \" + e.print(Object.keys(a)) + \". Received [\" + r + \"] \\\"\" + o[t] + \"\\\"\"), errorFound = !0) : \"array\" === e.getType(l) && -1 === l.indexOf(o[t]) ? (s(\"Invalid option detected in \\\"\" + t + \"\\\". Allowed values are:\" + e.print(l) + \" not \\\"\" + o[t] + \"\\\". \"), errorFound = !0) : \"object\" === r && \"__any__\" !== i && (d = util.copyAndExtendArray(d, t), e.parse(o[t], n[i], d));\n }\n }, {\n key: \"getType\",\n value: function (e) {\n var t = _typeof_1$1(e);\n\n return \"object\" === t ? null === e ? \"null\" : e instanceof Boolean ? \"boolean\" : e instanceof Number ? \"number\" : e instanceof String ? \"string\" : Array.isArray(e) ? \"array\" : e instanceof Date ? \"date\" : void 0 === e.nodeType ? !0 === e._isAMomentObject ? \"moment\" : \"object\" : \"dom\" : \"number\" === t ? \"number\" : \"boolean\" === t ? \"boolean\" : \"string\" === t ? \"string\" : void 0 === t ? \"undefined\" : t;\n }\n }, {\n key: \"getSuggestion\",\n value: function (t, o, n) {\n var i = e.findInOptions(t, o, n, !1),\n a = e.findInOptions(t, allOptions, [], !0),\n d;\n d = void 0 === i.indexMatch ? a.distance <= 4 && i.distance > a.distance ? \" in \" + e.printLocation(i.path, t, \"\") + \"Perhaps it was misplaced? Matching option found at: \" + e.printLocation(a.path, a.closestMatch, \"\") : i.distance <= 8 ? \". Did you mean \\\"\" + i.closestMatch + \"\\\"?\" + e.printLocation(i.path, t) : \". Did you mean one of these: \" + e.print(Object.keys(o)) + e.printLocation(n, t) : \" in \" + e.printLocation(i.path, t, \"\") + \"Perhaps it was incomplete? Did you mean: \\\"\" + i.indexMatch + \"\\\"?\\n\\n\", console.log(\"%cUnknown option detected: \\\"\" + t + \"\\\"\" + d, printStyle), errorFound = !0;\n }\n }, {\n key: \"findInOptions\",\n value: function (t, o, n) {\n var i = !!(3 < arguments.length && void 0 !== arguments[3]) && arguments[3],\n a = 1e9,\n d = \"\",\n s = [],\n r = t.toLowerCase(),\n l = void 0;\n\n for (var c in o) {\n var u = void 0;\n\n if (void 0 !== o[c].__type__ && !0 === i) {\n var p = e.findInOptions(t, o[c], util.copyAndExtendArray(n, c));\n a > p.distance && (d = p.closestMatch, s = p.path, a = p.distance, l = p.indexMatch);\n } else -1 !== c.toLowerCase().indexOf(r) && (l = c), u = e.levenshteinDistance(t, c), a > u && (d = c, s = util.copyArray(n), a = u);\n }\n\n return {\n closestMatch: d,\n path: s,\n distance: a,\n indexMatch: l\n };\n }\n }, {\n key: \"printLocation\",\n value: function (e, t) {\n for (var o = 2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : \"Problem value found at: \\n\", n = \"\\n\\n\" + o + \"options = {\\n\", a = 0; a < e.length; a++) {\n for (var d = 0; d < a + 1; d++) n += \" \";\n\n n += e[a] + \": {\\n\";\n }\n\n for (var s = 0; s < e.length + 1; s++) n += \" \";\n\n n += t + \"\\n\";\n\n for (var r = 0; r < e.length + 1; r++) {\n for (var l = 0; l < e.length - r; l++) n += \" \";\n\n n += \"}\\n\";\n }\n\n return n + \"\\n\\n\";\n }\n }, {\n key: \"print\",\n value: function (e) {\n return JSON.stringify(e).replace(/(\\\")|(\\[)|(\\])|(,\"__type__\")/g, \"\").replace(/(\\,)/g, \", \");\n }\n }, {\n key: \"levenshteinDistance\",\n value: function (e, o) {\n if (0 === e.length) return o.length;\n if (0 === o.length) return e.length;\n var n = [],\n a;\n\n for (a = 0; a <= o.length; a++) n[a] = [a];\n\n var d;\n\n for (d = 0; d <= e.length; d++) n[0][d] = d;\n\n for (a = 1; a <= o.length; a++) for (d = 1; d <= e.length; d++) n[a][d] = o.charAt(a - 1) == e.charAt(d - 1) ? n[a - 1][d - 1] : t(n[a - 1][d - 1] + 1, t(n[a][d - 1] + 1, n[a - 1][d] + 1));\n\n return n[o.length][e.length];\n }\n }]), e;\n}(),\n Node = function () {\n function e(t, o, n, i, a, d) {\n classCallCheck$1(this, e), this.options = util.bridgeObject(a), this.globalOptions = a, this.defaultOptions = d, this.body = o, this.edges = [], this.id = void 0, this.imagelist = n, this.grouplist = i, this.x = void 0, this.y = void 0, this.baseSize = this.options.size, this.baseFontSize = this.options.font.size, this.predefinedPosition = !1, this.selected = !1, this.hover = !1, this.labelModule = new Label(this.body, this.options, !1), this.setOptions(t);\n }\n\n return createClass$1(e, [{\n key: \"attachEdge\",\n value: function (e) {\n -1 === this.edges.indexOf(e) && this.edges.push(e);\n }\n }, {\n key: \"detachEdge\",\n value: function (e) {\n var t = this.edges.indexOf(e);\n -1 != t && this.edges.splice(t, 1);\n }\n }, {\n key: \"setOptions\",\n value: function (t) {\n var o = this.options.shape;\n\n if (t) {\n if (void 0 !== t.id && (this.id = t.id), void 0 === this.id) throw new Error(\"Node must have an id\");\n e.checkMass(t, this.id), void 0 !== t.x && (null === t.x ? (this.x = void 0, this.predefinedPosition = !1) : (this.x = parseInt(t.x), this.predefinedPosition = !0)), void 0 !== t.y && (null === t.y ? (this.y = void 0, this.predefinedPosition = !1) : (this.y = parseInt(t.y), this.predefinedPosition = !0)), void 0 !== t.size && (this.baseSize = t.size), void 0 !== t.value && (t.value = parseFloat(t.value)), e.parseOptions(this.options, t, !0, this.globalOptions, this.grouplist);\n var n = [t, this.options, this.defaultOptions];\n return this.chooser = ComponentUtil.choosify(\"node\", n), this._load_images(), this.updateLabelModule(t), this.updateShape(o), void 0 !== t.hidden || void 0 !== t.physics;\n }\n }\n }, {\n key: \"_load_images\",\n value: function () {\n if ((\"circularImage\" === this.options.shape || \"image\" === this.options.shape) && void 0 === this.options.image) throw new Error(\"Option image must be defined for node type '\" + this.options.shape + \"'\");\n\n if (void 0 !== this.options.image) {\n if (void 0 === this.imagelist) throw new Error(\"Internal Error: No images provided\");\n if (\"string\" == typeof this.options.image) this.imageObj = this.imagelist.load(this.options.image, this.options.brokenImage, this.id);else {\n if (void 0 === this.options.image.unselected) throw new Error(\"No unselected image provided\");\n this.imageObj = this.imagelist.load(this.options.image.unselected, this.options.brokenImage, this.id), this.imageObjAlt = void 0 === this.options.image.selected ? void 0 : this.imagelist.load(this.options.image.selected, this.options.brokenImage, this.id);\n }\n }\n }\n }, {\n key: \"getFormattingValues\",\n value: function () {\n var e = {\n color: this.options.color.background,\n borderWidth: this.options.borderWidth,\n borderColor: this.options.color.border,\n size: this.options.size,\n borderDashes: this.options.shapeProperties.borderDashes,\n borderRadius: this.options.shapeProperties.borderRadius,\n shadow: this.options.shadow.enabled,\n shadowColor: this.options.shadow.color,\n shadowSize: this.options.shadow.size,\n shadowX: this.options.shadow.x,\n shadowY: this.options.shadow.y\n };\n return this.selected || this.hover ? !0 === this.chooser ? this.selected ? (e.borderWidth *= 2, e.color = this.options.color.highlight.background, e.borderColor = this.options.color.highlight.border, e.shadow = this.options.shadow.enabled) : this.hover && (e.color = this.options.color.hover.background, e.borderColor = this.options.color.hover.border, e.shadow = this.options.shadow.enabled) : \"function\" == typeof this.chooser && (this.chooser(e, this.options.id, this.selected, this.hover), !1 === e.shadow && (e.shadowColor !== this.options.shadow.color || e.shadowSize !== this.options.shadow.size || e.shadowX !== this.options.shadow.x || e.shadowY !== this.options.shadow.y) && (e.shadow = !0)) : e.shadow = this.options.shadow.enabled, e;\n }\n }, {\n key: \"updateLabelModule\",\n value: function (t) {\n (void 0 === this.options.label || null === this.options.label) && (this.options.label = \"\"), e.updateGroupOptions(this.options, t, this.grouplist);\n var o = this.grouplist.get(this.options.group, !1),\n n = [t, this.options, o, this.globalOptions, this.defaultOptions];\n this.labelModule.update(this.options, n), void 0 !== this.labelModule.baseSize && (this.baseFontSize = this.labelModule.baseSize);\n }\n }, {\n key: \"updateShape\",\n value: function (e) {\n if (e === this.options.shape && this.shape) this.shape.setOptions(this.options, this.imageObj, this.imageObjAlt);else switch (this.options.shape) {\n case \"box\":\n this.shape = new Box(this.options, this.body, this.labelModule);\n break;\n\n case \"circle\":\n this.shape = new Circle(this.options, this.body, this.labelModule);\n break;\n\n case \"circularImage\":\n this.shape = new CircularImage(this.options, this.body, this.labelModule, this.imageObj, this.imageObjAlt);\n break;\n\n case \"database\":\n this.shape = new Database(this.options, this.body, this.labelModule);\n break;\n\n case \"diamond\":\n this.shape = new Diamond(this.options, this.body, this.labelModule);\n break;\n\n case \"dot\":\n this.shape = new Dot(this.options, this.body, this.labelModule);\n break;\n\n case \"ellipse\":\n this.shape = new Ellipse(this.options, this.body, this.labelModule);\n break;\n\n case \"icon\":\n this.shape = new Icon(this.options, this.body, this.labelModule);\n break;\n\n case \"image\":\n this.shape = new Image$1(this.options, this.body, this.labelModule, this.imageObj, this.imageObjAlt);\n break;\n\n case \"square\":\n this.shape = new Square(this.options, this.body, this.labelModule);\n break;\n\n case \"hexagon\":\n this.shape = new Hexagon(this.options, this.body, this.labelModule);\n break;\n\n case \"star\":\n this.shape = new Star(this.options, this.body, this.labelModule);\n break;\n\n case \"text\":\n this.shape = new Text(this.options, this.body, this.labelModule);\n break;\n\n case \"triangle\":\n this.shape = new Triangle(this.options, this.body, this.labelModule);\n break;\n\n case \"triangleDown\":\n this.shape = new TriangleDown(this.options, this.body, this.labelModule);\n break;\n\n default:\n this.shape = new Ellipse(this.options, this.body, this.labelModule);\n }\n this.needsRefresh();\n }\n }, {\n key: \"select\",\n value: function () {\n this.selected = !0, this.needsRefresh();\n }\n }, {\n key: \"unselect\",\n value: function () {\n this.selected = !1, this.needsRefresh();\n }\n }, {\n key: \"needsRefresh\",\n value: function () {\n this.shape.refreshNeeded = !0;\n }\n }, {\n key: \"getTitle\",\n value: function () {\n return this.options.title;\n }\n }, {\n key: \"distanceToBorder\",\n value: function (e, t) {\n return this.shape.distanceToBorder(e, t);\n }\n }, {\n key: \"isFixed\",\n value: function () {\n return this.options.fixed.x && this.options.fixed.y;\n }\n }, {\n key: \"isSelected\",\n value: function () {\n return this.selected;\n }\n }, {\n key: \"getValue\",\n value: function () {\n return this.options.value;\n }\n }, {\n key: \"getLabelSize\",\n value: function () {\n return this.labelModule.size();\n }\n }, {\n key: \"setValueRange\",\n value: function (e, t, o) {\n if (void 0 !== this.options.value) {\n var n = this.options.scaling.customScalingFunction(e, t, o, this.options.value),\n i = this.options.scaling.max - this.options.scaling.min;\n\n if (!0 === this.options.scaling.label.enabled) {\n var a = this.options.scaling.label.max - this.options.scaling.label.min;\n this.options.font.size = this.options.scaling.label.min + n * a;\n }\n\n this.options.size = this.options.scaling.min + n * i;\n } else this.options.size = this.baseSize, this.options.font.size = this.baseFontSize;\n\n this.updateLabelModule();\n }\n }, {\n key: \"draw\",\n value: function (e) {\n var t = this.getFormattingValues();\n this.shape.draw(e, this.x, this.y, this.selected, this.hover, t);\n }\n }, {\n key: \"updateBoundingBox\",\n value: function (e) {\n this.shape.updateBoundingBox(this.x, this.y, e);\n }\n }, {\n key: \"resize\",\n value: function (e) {\n var t = this.getFormattingValues();\n this.shape.resize(e, this.selected, this.hover, t);\n }\n }, {\n key: \"getItemsOnPoint\",\n value: function (e) {\n var t = [];\n return this.labelModule.visible() && ComponentUtil.pointInRect(this.labelModule.getSize(), e) && t.push({\n nodeId: this.id,\n labelId: 0\n }), ComponentUtil.pointInRect(this.shape.boundingBox, e) && t.push({\n nodeId: this.id\n }), t;\n }\n }, {\n key: \"isOverlappingWith\",\n value: function (e) {\n return this.shape.left < e.right && this.shape.left + this.shape.width > e.left && this.shape.top < e.bottom && this.shape.top + this.shape.height > e.top;\n }\n }, {\n key: \"isBoundingBoxOverlappingWith\",\n value: function (e) {\n return this.shape.boundingBox.left < e.right && this.shape.boundingBox.right > e.left && this.shape.boundingBox.top < e.bottom && this.shape.boundingBox.bottom > e.top;\n }\n }], [{\n key: \"updateGroupOptions\",\n value: function (e, t, o) {\n if (void 0 !== o) {\n var n = e.group;\n if (void 0 !== t && void 0 !== t.group && n !== t.group) throw new Error(\"updateGroupOptions: group values in options don't match.\");\n\n if (\"number\" == typeof n || \"string\" == typeof n && \"\" != n) {\n var i = o.get(n),\n a = [\"font\"];\n void 0 !== t && void 0 !== t.color && null != t.color && a.push(\"color\"), util.selectiveNotDeepExtend(a, e, i), e.color = util.parseColor(e.color);\n }\n }\n }\n }, {\n key: \"parseOptions\",\n value: function (t, o) {\n var n = !!(2 < arguments.length && void 0 !== arguments[2]) && arguments[2],\n i = 3 < arguments.length && void 0 !== arguments[3] ? arguments[3] : {},\n a = 4 < arguments.length ? arguments[4] : void 0;\n\n if (util.selectiveNotDeepExtend([\"color\", \"fixed\", \"shadow\"], t, o, n), e.checkMass(o), util.mergeOptions(t, o, \"shadow\", i), void 0 !== o.color && null !== o.color) {\n var d = util.parseColor(o.color);\n util.fillIfDefined(t.color, d);\n } else !0 === n && null === o.color && (t.color = util.bridgeObject(i.color));\n\n void 0 !== o.fixed && null !== o.fixed && (\"boolean\" == typeof o.fixed ? (t.fixed.x = o.fixed, t.fixed.y = o.fixed) : (void 0 !== o.fixed.x && \"boolean\" == typeof o.fixed.x && (t.fixed.x = o.fixed.x), void 0 !== o.fixed.y && \"boolean\" == typeof o.fixed.y && (t.fixed.y = o.fixed.y))), !0 === n && null === o.font && (t.font = util.bridgeObject(i.font)), e.updateGroupOptions(t, o, a), void 0 !== o.scaling && util.mergeOptions(t.scaling, o.scaling, \"label\", i.scaling);\n }\n }, {\n key: \"checkMass\",\n value: function (e, t) {\n if (void 0 !== e.mass && 0 >= e.mass) {\n var o = \"\";\n void 0 !== t && (o = \" in node id: \" + t), console.log(\"%cNegative or zero mass disallowed\" + o + \", setting mass to 1.\", printStyle), e.mass = 1;\n }\n }\n }]), e;\n}(),\n NodesHandler = function () {\n var t = Math.round,\n o = Math.max;\n\n function e(t, n, i, a) {\n var d = this;\n if (classCallCheck$1(this, e), this.body = t, this.images = n, this.groups = i, this.layoutEngine = a, this.body.functions.createNode = this.create.bind(this), this.nodesListeners = {\n add: function (e, t) {\n d.add(t.items);\n },\n update: function (e, t) {\n d.update(t.items, t.data, t.oldData);\n },\n remove: function (e, t) {\n d.remove(t.items);\n }\n }, this.defaultOptions = {\n borderWidth: 1,\n borderWidthSelected: 2,\n brokenImage: void 0,\n color: {\n border: \"#2B7CE9\",\n background: \"#97C2FC\",\n highlight: {\n border: \"#2B7CE9\",\n background: \"#D2E5FF\"\n },\n hover: {\n border: \"#2B7CE9\",\n background: \"#D2E5FF\"\n }\n },\n fixed: {\n x: !1,\n y: !1\n },\n font: {\n color: \"#343434\",\n size: 14,\n face: \"arial\",\n background: \"none\",\n strokeWidth: 0,\n strokeColor: \"#ffffff\",\n align: \"center\",\n vadjust: 0,\n multi: !1,\n bold: {\n mod: \"bold\"\n },\n boldital: {\n mod: \"bold italic\"\n },\n ital: {\n mod: \"italic\"\n },\n mono: {\n mod: \"\",\n size: 15,\n face: \"monospace\",\n vadjust: 2\n }\n },\n group: void 0,\n hidden: !1,\n icon: {\n face: \"FontAwesome\",\n code: void 0,\n size: 50,\n color: \"#2B7CE9\"\n },\n image: void 0,\n label: void 0,\n labelHighlightBold: !0,\n level: void 0,\n margin: {\n top: 5,\n right: 5,\n bottom: 5,\n left: 5\n },\n mass: 1,\n physics: !0,\n scaling: {\n min: 10,\n max: 30,\n label: {\n enabled: !1,\n min: 14,\n max: 30,\n maxVisible: 30,\n drawThreshold: 5\n },\n customScalingFunction: function (e, t, n, i) {\n if (t === e) return .5;\n return o(0, (i - e) * (1 / (t - e)));\n }\n },\n shadow: {\n enabled: !1,\n color: \"rgba(0,0,0,0.5)\",\n size: 10,\n x: 5,\n y: 5\n },\n shape: \"ellipse\",\n shapeProperties: {\n borderDashes: !1,\n borderRadius: 6,\n interpolation: !0,\n useImageSize: !1,\n useBorderWithImage: !1\n },\n size: 25,\n title: void 0,\n value: void 0,\n x: void 0,\n y: void 0\n }, 0 >= this.defaultOptions.mass) throw \"Internal error: mass in defaultOptions of NodesHandler may not be zero or negative\";\n this.options = util.bridgeObject(this.defaultOptions), this.bindEventListeners();\n }\n\n return createClass$1(e, [{\n key: \"bindEventListeners\",\n value: function () {\n var e = this;\n this.body.emitter.on(\"refreshNodes\", this.refresh.bind(this)), this.body.emitter.on(\"refresh\", this.refresh.bind(this)), this.body.emitter.on(\"destroy\", function () {\n util.forEach(e.nodesListeners, function (t, o) {\n e.body.data.nodes && e.body.data.nodes.off(o, t);\n }), delete e.body.functions.createNode, delete e.nodesListeners.add, delete e.nodesListeners.update, delete e.nodesListeners.remove, delete e.nodesListeners;\n });\n }\n }, {\n key: \"setOptions\",\n value: function (e) {\n if (void 0 !== e) {\n if (Node.parseOptions(this.options, e), void 0 !== e.shape) for (var t in this.body.nodes) this.body.nodes.hasOwnProperty(t) && this.body.nodes[t].updateShape();\n if (void 0 !== e.font) for (var o in this.body.nodes) this.body.nodes.hasOwnProperty(o) && (this.body.nodes[o].updateLabelModule(), this.body.nodes[o].needsRefresh());\n if (void 0 !== e.size) for (var n in this.body.nodes) this.body.nodes.hasOwnProperty(n) && this.body.nodes[n].needsRefresh();\n (void 0 !== e.hidden || void 0 !== e.physics) && this.body.emitter.emit(\"_dataChanged\");\n }\n }\n }, {\n key: \"setData\",\n value: function (e) {\n var t = !!(1 < arguments.length && void 0 !== arguments[1]) && arguments[1],\n o = this.body.data.nodes;\n if (e instanceof DataSet || e instanceof DataView) this.body.data.nodes = e;else if (Array.isArray(e)) this.body.data.nodes = new DataSet(), this.body.data.nodes.add(e);else if (!e) this.body.data.nodes = new DataSet();else throw new TypeError(\"Array or DataSet expected\");\n\n if (o && util.forEach(this.nodesListeners, function (e, t) {\n o.off(t, e);\n }), this.body.nodes = {}, this.body.data.nodes) {\n var n = this;\n util.forEach(this.nodesListeners, function (e, t) {\n n.body.data.nodes.on(t, e);\n });\n var i = this.body.data.nodes.getIds();\n this.add(i, !0);\n }\n\n !1 === t && this.body.emitter.emit(\"_dataChanged\");\n }\n }, {\n key: \"add\",\n value: function (e) {\n for (var t = !!(1 < arguments.length && void 0 !== arguments[1]) && arguments[1], o = [], n = 0, a; n < e.length; n++) {\n a = e[n];\n var d = this.body.data.nodes.get(a),\n s = this.create(d);\n o.push(s), this.body.nodes[a] = s;\n }\n\n this.layoutEngine.positionInitially(o), !1 === t && this.body.emitter.emit(\"_dataChanged\");\n }\n }, {\n key: \"update\",\n value: function (e, t, o) {\n for (var n = this.body.nodes, a = !1, d = 0; d < e.length; d++) {\n var s = e[d],\n r = n[s],\n l = t[d];\n void 0 === r ? (a = !0, r = this.create(l), n[s] = r) : r.setOptions(l) && (a = !0);\n }\n\n a || void 0 === o || (a = t.some(function (e, t) {\n var n = o[t];\n return n && n.level !== e.level;\n })), !0 === a ? this.body.emitter.emit(\"_dataChanged\") : this.body.emitter.emit(\"_dataUpdated\");\n }\n }, {\n key: \"remove\",\n value: function (e) {\n for (var t = this.body.nodes, o = 0, n; o < e.length; o++) n = e[o], delete t[n];\n\n this.body.emitter.emit(\"_dataChanged\");\n }\n }, {\n key: \"create\",\n value: function (e) {\n var t = 1 < arguments.length && void 0 !== arguments[1] ? arguments[1] : Node;\n return new t(e, this.body, this.images, this.groups, this.options, this.defaultOptions);\n }\n }, {\n key: \"refresh\",\n value: function () {\n var e = this,\n t = !!(0 < arguments.length && void 0 !== arguments[0]) && arguments[0];\n util.forEach(this.body.nodes, function (o, n) {\n var i = e.body.data.nodes.get(n);\n void 0 !== i && (!0 === t && o.setOptions({\n x: null,\n y: null\n }), o.setOptions({\n fixed: !1\n }), o.setOptions(i));\n });\n }\n }, {\n key: \"getPositions\",\n value: function (e) {\n var o = {};\n if (void 0 === e) for (var n = 0, a; n < this.body.nodeIndices.length; n++) a = this.body.nodes[this.body.nodeIndices[n]], o[this.body.nodeIndices[n]] = {\n x: t(a.x),\n y: t(a.y)\n };else if (!0 === Array.isArray(e)) {\n for (var d = 0; d < e.length; d++) if (void 0 !== this.body.nodes[e[d]]) {\n var s = this.body.nodes[e[d]];\n o[e[d]] = {\n x: t(s.x),\n y: t(s.y)\n };\n }\n } else if (void 0 !== this.body.nodes[e]) {\n var r = this.body.nodes[e];\n o[e] = {\n x: t(r.x),\n y: t(r.y)\n };\n }\n return o;\n }\n }, {\n key: \"storePositions\",\n value: function () {\n var e = [],\n o = this.body.data.nodes.getDataSet();\n\n for (var n in o._data) if (o._data.hasOwnProperty(n)) {\n var i = this.body.nodes[n];\n (o._data[n].x != t(i.x) || o._data[n].y != t(i.y)) && e.push({\n id: i.id,\n x: t(i.x),\n y: t(i.y)\n });\n }\n\n o.update(e);\n }\n }, {\n key: \"getBoundingBox\",\n value: function (e) {\n if (void 0 !== this.body.nodes[e]) return this.body.nodes[e].shape.boundingBox;\n }\n }, {\n key: \"getConnectedNodes\",\n value: function (e, t) {\n var o = [];\n if (void 0 !== this.body.nodes[e]) for (var n = this.body.nodes[e], a = {}, d = 0, s; d < n.edges.length; d++) s = n.edges[d], \"to\" !== t && s.toId == n.id ? void 0 === a[s.fromId] && (o.push(s.fromId), a[s.fromId] = !0) : \"from\" !== t && s.fromId == n.id && void 0 === a[s.toId] && (o.push(s.toId), a[s.toId] = !0);\n return o;\n }\n }, {\n key: \"getConnectedEdges\",\n value: function (e) {\n var t = [];\n if (void 0 !== this.body.nodes[e]) for (var o = this.body.nodes[e], n = 0; n < o.edges.length; n++) t.push(o.edges[n].id);else console.log(\"NodeId provided for getConnectedEdges does not exist. Provided: \", e);\n return t;\n }\n }, {\n key: \"moveNode\",\n value: function (e, t, o) {\n var n = this;\n void 0 === this.body.nodes[e] ? console.log(\"Node id supplied to moveNode does not exist. Provided: \", e) : (this.body.nodes[e].x = +t, this.body.nodes[e].y = +o, setTimeout(function () {\n n.body.emitter.emit(\"startSimulation\");\n }, 0));\n }\n }]), e;\n}(),\n EndPoint = function () {\n var t = Math.cos,\n o = Math.sin;\n\n function e() {\n classCallCheck$1(this, e);\n }\n\n return createClass$1(e, null, [{\n key: \"transform\",\n value: function (e, n) {\n e instanceof Array || (e = [e]);\n\n for (var a = n.point.x, d = n.point.y, s = n.angle, r = n.length, l = 0; l < e.length; ++l) {\n var c = e[l],\n u = c.x * t(s) - c.y * o(s),\n p = c.x * o(s) + c.y * t(s);\n c.x = a + r * u, c.y = d + r * p;\n }\n }\n }, {\n key: \"drawPath\",\n value: function (e, t) {\n e.beginPath(), e.moveTo(t[0].x, t[0].y);\n\n for (var o = 1; o < t.length; ++o) e.lineTo(t[o].x, t[o].y);\n\n e.closePath();\n }\n }]), e;\n}(),\n Arrow = function (e) {\n function t() {\n return classCallCheck$1(this, t), possibleConstructorReturn$1(this, getPrototypeOf$1(t).apply(this, arguments));\n }\n\n return inherits$1(t, e), createClass$1(t, null, [{\n key: \"draw\",\n value: function (e, t) {\n var o = [{\n x: 0,\n y: 0\n }, {\n x: -1,\n y: .3\n }, {\n x: -.9,\n y: 0\n }, {\n x: -1,\n y: -.3\n }];\n EndPoint.transform(o, t), EndPoint.drawPath(e, o);\n }\n }]), t;\n}(EndPoint),\n Crow = function () {\n function e() {\n classCallCheck$1(this, e);\n }\n\n return createClass$1(e, null, [{\n key: \"draw\",\n value: function (e, t) {\n var o = [{\n x: -1,\n y: 0\n }, {\n x: 0,\n y: .3\n }, {\n x: -.4,\n y: 0\n }, {\n x: 0,\n y: -.3\n }];\n EndPoint.transform(o, t), EndPoint.drawPath(e, o);\n }\n }]), e;\n}(),\n Curve = function () {\n var t = Math.PI;\n\n function e() {\n classCallCheck$1(this, e);\n }\n\n return createClass$1(e, null, [{\n key: \"draw\",\n value: function (e, o) {\n var n = {\n x: -.4,\n y: 0\n };\n EndPoint.transform(n, o), e.strokeStyle = e.fillStyle, e.fillStyle = \"rgba(0, 0, 0, 0)\";\n var i = t,\n a = o.angle - i / 2,\n d = o.angle + i / 2;\n e.beginPath(), e.arc(n.x, n.y, .4 * o.length, a, d, !1), e.stroke();\n }\n }]), e;\n}(),\n InvertedCurve = function () {\n var t = Math.PI;\n\n function e() {\n classCallCheck$1(this, e);\n }\n\n return createClass$1(e, null, [{\n key: \"draw\",\n value: function (e, o) {\n var n = {\n x: -.3,\n y: 0\n };\n EndPoint.transform(n, o), e.strokeStyle = e.fillStyle, e.fillStyle = \"rgba(0, 0, 0, 0)\";\n var i = t,\n a = o.angle + i / 2,\n d = o.angle + 3 * i / 2;\n e.beginPath(), e.arc(n.x, n.y, .4 * o.length, a, d, !1), e.stroke();\n }\n }]), e;\n}(),\n Triangle$1 = function () {\n function e() {\n classCallCheck$1(this, e);\n }\n\n return createClass$1(e, null, [{\n key: \"draw\",\n value: function (e, t) {\n var o = [{\n x: .02,\n y: 0\n }, {\n x: -1,\n y: .3\n }, {\n x: -1,\n y: -.3\n }];\n EndPoint.transform(o, t), EndPoint.drawPath(e, o);\n }\n }]), e;\n}(),\n InvertedTriangle = function () {\n function e() {\n classCallCheck$1(this, e);\n }\n\n return createClass$1(e, null, [{\n key: \"draw\",\n value: function (e, t) {\n var o = [{\n x: 0,\n y: .3\n }, {\n x: 0,\n y: -.3\n }, {\n x: -1,\n y: 0\n }];\n EndPoint.transform(o, t), EndPoint.drawPath(e, o);\n }\n }]), e;\n}(),\n Circle$1 = function () {\n function e() {\n classCallCheck$1(this, e);\n }\n\n return createClass$1(e, null, [{\n key: \"draw\",\n value: function (e, t) {\n var o = {\n x: -.4,\n y: 0\n };\n EndPoint.transform(o, t), e.circle(o.x, o.y, .4 * t.length);\n }\n }]), e;\n}(),\n Bar = function () {\n function e() {\n classCallCheck$1(this, e);\n }\n\n return createClass$1(e, null, [{\n key: \"draw\",\n value: function (e, t) {\n var o = [{\n x: 0,\n y: .5\n }, {\n x: 0,\n y: -.5\n }, {\n x: -.15,\n y: -.5\n }, {\n x: -.15,\n y: .5\n }];\n EndPoint.transform(o, t), EndPoint.drawPath(e, o);\n }\n }]), e;\n}(),\n Box$1 = function () {\n function e() {\n classCallCheck$1(this, e);\n }\n\n return createClass$1(e, null, [{\n key: \"draw\",\n value: function (e, t) {\n var o = [{\n x: 0,\n y: .3\n }, {\n x: 0,\n y: -.3\n }, {\n x: -.6,\n y: -.3\n }, {\n x: -.6,\n y: .3\n }];\n EndPoint.transform(o, t), EndPoint.drawPath(e, o);\n }\n }]), e;\n}(),\n Diamond$1 = function () {\n function e() {\n classCallCheck$1(this, e);\n }\n\n return createClass$1(e, null, [{\n key: \"draw\",\n value: function (e, t) {\n var o = [{\n x: 0,\n y: 0\n }, {\n x: -.5,\n y: -.3\n }, {\n x: -1,\n y: 0\n }, {\n x: -.5,\n y: .3\n }];\n EndPoint.transform(o, t), EndPoint.drawPath(e, o);\n }\n }]), e;\n}(),\n Vee = function () {\n function e() {\n classCallCheck$1(this, e);\n }\n\n return createClass$1(e, null, [{\n key: \"draw\",\n value: function (e, t) {\n var o = [{\n x: -1,\n y: .3\n }, {\n x: -.5,\n y: 0\n }, {\n x: -1,\n y: -.3\n }, {\n x: 0,\n y: 0\n }];\n EndPoint.transform(o, t), EndPoint.drawPath(e, o);\n }\n }]), e;\n}(),\n EndPoints = function () {\n function e() {\n classCallCheck$1(this, e);\n }\n\n return createClass$1(e, null, [{\n key: \"draw\",\n value: function (e, t) {\n var o;\n\n switch (t.type && (o = t.type.toLowerCase()), o) {\n case \"circle\":\n Circle$1.draw(e, t);\n break;\n\n case \"box\":\n Box$1.draw(e, t);\n break;\n\n case \"crow\":\n Crow.draw(e, t);\n break;\n\n case \"curve\":\n Curve.draw(e, t);\n break;\n\n case \"diamond\":\n Diamond$1.draw(e, t);\n break;\n\n case \"inv_curve\":\n InvertedCurve.draw(e, t);\n break;\n\n case \"triangle\":\n Triangle$1.draw(e, t);\n break;\n\n case \"inv_triangle\":\n InvertedTriangle.draw(e, t);\n break;\n\n case \"bar\":\n Bar.draw(e, t);\n break;\n\n case \"vee\":\n Vee.draw(e, t);\n break;\n\n case \"arrow\":\n default:\n Arrow.draw(e, t);\n }\n }\n }]), e;\n}(),\n EdgeBase = function () {\n var t = Math.atan2,\n o = Math.cos,\n n = Math.sin,\n i = Math.sqrt,\n a = Math.PI,\n d = Math.pow,\n s = Math.max,\n r = Math.abs,\n l = Math.min;\n\n function e(t, o, n) {\n classCallCheck$1(this, e), this.body = o, this.labelModule = n, this.options = {}, this.setOptions(t), this.colorDirty = !0, this.color = {}, this.selectionWidth = 2, this.hoverWidth = 1.5, this.fromPoint = this.from, this.toPoint = this.to;\n }\n\n return createClass$1(e, [{\n key: \"connect\",\n value: function () {\n this.from = this.body.nodes[this.options.from], this.to = this.body.nodes[this.options.to];\n }\n }, {\n key: \"cleanup\",\n value: function () {\n return !1;\n }\n }, {\n key: \"setOptions\",\n value: function (e) {\n this.options = e, this.from = this.body.nodes[this.options.from], this.to = this.body.nodes[this.options.to], this.id = this.options.id;\n }\n }, {\n key: \"drawLine\",\n value: function (e, t, o, n, i) {\n e.strokeStyle = this.getColor(e, t, o, n), e.lineWidth = t.width, !1 === t.dashes ? this._drawLine(e, t, i) : this._drawDashedLine(e, t, i);\n }\n }, {\n key: \"_drawLine\",\n value: function (e, t, o, n, i) {\n if (this.from != this.to) this._line(e, t, o, n, i);else {\n var a = this._getCircleData(e),\n d = slicedToArray(a, 3),\n s = d[0],\n r = d[1],\n l = d[2];\n\n this._circle(e, t, s, r, l);\n }\n }\n }, {\n key: \"_drawDashedLine\",\n value: function (e, t, o) {\n e.lineCap = \"round\";\n var n = [5, 5];\n\n if (!0 === Array.isArray(t.dashes) && (n = t.dashes), void 0 !== e.setLineDash) {\n if (e.save(), e.setLineDash(n), e.lineDashOffset = 0, this.from != this.to) this._line(e, t, o);else {\n var i = this._getCircleData(e),\n a = slicedToArray(i, 3),\n d = a[0],\n s = a[1],\n r = a[2];\n\n this._circle(e, t, d, s, r);\n }\n e.setLineDash([0]), e.lineDashOffset = 0, e.restore();\n } else {\n if (this.from != this.to) e.dashedLine(this.from.x, this.from.y, this.to.x, this.to.y, n);else {\n var l = this._getCircleData(e),\n c = slicedToArray(l, 3),\n u = c[0],\n p = c[1],\n h = c[2];\n\n this._circle(e, t, u, p, h);\n }\n this.enableShadow(e, t), e.stroke(), this.disableShadow(e, t);\n }\n }\n }, {\n key: \"findBorderPosition\",\n value: function (e, t, o) {\n return this.from == this.to ? this._findBorderPositionCircle(e, t, o) : this._findBorderPosition(e, t, o);\n }\n }, {\n key: \"findBorderPositions\",\n value: function (e) {\n var t = {},\n o = {};\n if (this.from != this.to) t = this._findBorderPosition(this.from, e), o = this._findBorderPosition(this.to, e);else {\n var n = this._getCircleData(e).slice(0, 2),\n i = slicedToArray(n, 2),\n a = i[0],\n d = i[1];\n\n t = this._findBorderPositionCircle(this.from, e, {\n x: a,\n y: d,\n low: .25,\n high: .6,\n direction: -1\n }), o = this._findBorderPositionCircle(this.from, e, {\n x: a,\n y: d,\n low: .6,\n high: .8,\n direction: 1\n });\n }\n return {\n from: t,\n to: o\n };\n }\n }, {\n key: \"_getCircleData\",\n value: function (e) {\n var t = this.from,\n o = this.options.selfReferenceSize,\n n,\n i;\n return void 0 !== e && void 0 === t.shape.width && t.shape.resize(e), t.shape.width > t.shape.height ? (n = t.x + .5 * t.shape.width, i = t.y - o) : (n = t.x + o, i = t.y - .5 * t.shape.height), [n, i, o];\n }\n }, {\n key: \"_pointOnCircle\",\n value: function (e, t, i, d) {\n var s = 2 * d * a;\n return {\n x: e + i * o(s),\n y: t - i * n(s)\n };\n }\n }, {\n key: \"_findBorderPositionCircle\",\n value: function (e, o, n) {\n for (var a = n.x, s = n.y, l = n.low, c = n.high, u = n.direction, p = 0, h = this.options.selfReferenceSize, m = .5 * (l + c), g, y, f, b, _; l <= c && p < 10 && (m = .5 * (l + c), g = this._pointOnCircle(a, s, h, m), y = t(e.y - g.y, e.x - g.x), f = e.distanceToBorder(o, y), b = i(d(g.x - e.x, 2) + d(g.y - e.y, 2)), _ = f - b, !(r(_) < .05));) 0 < _ ? 0 < u ? l = m : c = m : 0 < u ? c = m : l = m, p++;\n\n return g.t = m, g;\n }\n }, {\n key: \"getLineWidth\",\n value: function (e, t) {\n return !0 === e ? s(this.selectionWidth, .3 / this.body.view.scale) : !0 === t ? s(this.hoverWidth, .3 / this.body.view.scale) : s(this.options.width, .3 / this.body.view.scale);\n }\n }, {\n key: \"getColor\",\n value: function (e, t) {\n if (!1 !== t.inheritsColor) {\n if (\"both\" === t.inheritsColor && this.from.id !== this.to.id) {\n var o = e.createLinearGradient(this.from.x, this.from.y, this.to.x, this.to.y),\n n,\n i;\n return n = this.from.options.color.highlight.border, i = this.to.options.color.highlight.border, !1 === this.from.selected && !1 === this.to.selected ? (n = util.overrideOpacity(this.from.options.color.border, t.opacity), i = util.overrideOpacity(this.to.options.color.border, t.opacity)) : !0 === this.from.selected && !1 === this.to.selected ? i = this.to.options.color.border : !1 === this.from.selected && !0 === this.to.selected && (n = this.from.options.color.border), o.addColorStop(0, n), o.addColorStop(1, i), o;\n }\n\n return \"to\" === t.inheritsColor ? util.overrideOpacity(this.to.options.color.border, t.opacity) : util.overrideOpacity(this.from.options.color.border, t.opacity);\n }\n\n return util.overrideOpacity(t.color, t.opacity);\n }\n }, {\n key: \"_circle\",\n value: function (e, t, o, n, i) {\n this.enableShadow(e, t), e.beginPath(), e.arc(o, n, i, 0, 2 * a, !1), e.stroke(), this.disableShadow(e, t);\n }\n }, {\n key: \"getDistanceToEdge\",\n value: function (e, t, o, n, a, d, s) {\n var l = 0;\n if (this.from != this.to) l = this._getDistanceToEdge(e, t, o, n, a, d, s);else {\n var c = this._getCircleData(void 0),\n u = slicedToArray(c, 3),\n p = u[0],\n h = u[1],\n m = u[2],\n g = p - a,\n y = h - d;\n\n l = r(i(g * g + y * y) - m);\n }\n return l;\n }\n }, {\n key: \"_getDistanceToLine\",\n value: function (e, t, o, n, a, d) {\n var s = o - e,\n r = n - t,\n l = ((a - e) * s + (d - t) * r) / (s * s + r * r);\n 1 < l ? l = 1 : 0 > l && (l = 0);\n var c = e + l * s,\n p = t + l * r,\n h = c - a,\n m = p - d;\n return i(h * h + m * m);\n }\n }, {\n key: \"getArrowData\",\n value: function (e, i, d, r, c, u) {\n var p = u.width,\n h,\n m,\n g,\n f,\n b,\n _,\n v;\n\n if (\"from\" === i ? (g = this.from, f = this.to, b = .1, _ = u.fromArrowScale, v = u.fromArrowType) : \"to\" === i ? (g = this.to, f = this.from, b = -.1, _ = u.toArrowScale, v = u.toArrowType) : (g = this.to, f = this.from, _ = u.middleArrowScale, v = u.middleArrowType), g == f) {\n var k = this._getCircleData(e),\n w = slicedToArray(k, 3),\n S = w[0],\n x = w[1],\n y = w[2];\n\n \"from\" === i ? (m = this.findBorderPosition(this.from, e, {\n x: S,\n y: x,\n low: .25,\n high: .6,\n direction: -1\n }), h = -2 * m.t * a + 1.5 * a + .1 * a) : \"to\" === i ? (m = this.findBorderPosition(this.from, e, {\n x: S,\n y: x,\n low: .6,\n high: 1,\n direction: 1\n }), h = -2 * m.t * a + 1.5 * a - 1.1 * a) : (m = this._pointOnCircle(S, x, y, .175), h = 3.9269908169872414);\n } else if (\"middle\" === i) h = t(g.y - f.y, g.x - f.x), m = this.getPoint(.5, d);else if (!0 === this.options.smooth.enabled) {\n m = this.findBorderPosition(g, e, {\n via: d\n });\n var O = this.getPoint(s(0, l(1, m.t + b)), d);\n h = t(m.y - O.y, m.x - O.x);\n } else h = t(g.y - f.y, g.x - f.x), m = this.findBorderPosition(g, e);\n\n \"middle\" === i && 0 > _ && (p *= -1);\n var D = 15 * _ + 3 * p,\n T = m.x - .9 * D * o(h),\n E = m.y - .9 * D * n(h);\n return {\n point: m,\n core: {\n x: T,\n y: E\n },\n angle: h,\n length: D,\n type: v\n };\n }\n }, {\n key: \"drawArrowHead\",\n value: function (e, t, o, n, i) {\n e.strokeStyle = this.getColor(e, t, o, n), e.fillStyle = e.strokeStyle, e.lineWidth = t.width, EndPoints.draw(e, i), this.enableShadow(e, t), e.fill(), this.disableShadow(e, t);\n }\n }, {\n key: \"enableShadow\",\n value: function (e, t) {\n !0 === t.shadow && (e.shadowColor = t.shadowColor, e.shadowBlur = t.shadowSize, e.shadowOffsetX = t.shadowX, e.shadowOffsetY = t.shadowY);\n }\n }, {\n key: \"disableShadow\",\n value: function (e, t) {\n !0 === t.shadow && (e.shadowColor = \"rgba(0,0,0,0)\", e.shadowBlur = 0, e.shadowOffsetX = 0, e.shadowOffsetY = 0);\n }\n }, {\n key: \"drawBackground\",\n value: function (e, t) {\n if (!1 !== t.background) {\n var o = [\"strokeStyle\", \"lineWidth\", \"dashes\"],\n n = {};\n o.forEach(function (t) {\n n[t] = e[t];\n }), e.strokeStyle = t.backgroundColor, e.lineWidth = t.backgroundSize, this.setStrokeDashed(e, t.backgroundDashes), e.stroke(), o.forEach(function (t) {\n e[t] = n[t];\n }), this.setStrokeDashed(e, t.dashes);\n }\n }\n }, {\n key: \"setStrokeDashed\",\n value: function (e, t) {\n if (!1 === t) void 0 === e.setLineDash ? console.warn(\"setLineDash is not supported in this browser. The dashed stroke cannot be used.\") : e.setLineDash([]);else if (void 0 !== e.setLineDash) {\n var o = [5, 5];\n !0 === Array.isArray(t) && (o = t), e.setLineDash(o);\n } else console.warn(\"setLineDash is not supported in this browser. The dashed stroke cannot be used.\");\n }\n }]), e;\n}(),\n BezierEdgeBase = function (e) {\n var o = Math.atan2,\n n = Math.sqrt,\n a = Math.pow,\n d = Math.abs;\n\n function t(e, o, n) {\n return classCallCheck$1(this, t), possibleConstructorReturn$1(this, getPrototypeOf$1(t).call(this, e, o, n));\n }\n\n return inherits$1(t, e), createClass$1(t, [{\n key: \"_findBorderPositionBezier\",\n value: function (e, t) {\n var i = 2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : this._getViaCoordinates(),\n s = 0,\n r = 0,\n l = 1,\n c = this.to,\n u = !1,\n p,\n h,\n m,\n g,\n y;\n\n for (e.id === this.from.id && (c = this.from, u = !0); r <= l && s < 10;) {\n var f = .5 * (r + l);\n if (p = this.getPoint(f, i), h = o(c.y - p.y, c.x - p.x), m = c.distanceToBorder(t, h), g = n(a(p.x - c.x, 2) + a(p.y - c.y, 2)), y = m - g, d(y) < .2) break;else 0 > y ? !1 === u ? r = f : l = f : !1 === u ? l = f : r = f;\n s++;\n }\n\n return p.t = f, p;\n }\n }, {\n key: \"_getDistanceToBezierEdge\",\n value: function (e, o, n, d, s, r, l) {\n var c = 1e9,\n u = e,\n p = o,\n h,\n m,\n g,\n f,\n b;\n\n for (m = 1; 10 > m; m++) g = .1 * m, f = a(1 - g, 2) * e + 2 * g * (1 - g) * l.x + a(g, 2) * n, b = a(1 - g, 2) * o + 2 * g * (1 - g) * l.y + a(g, 2) * d, 0 < m && (h = this._getDistanceToLine(u, p, f, b, s, r), c = h < c ? h : c), u = f, p = b;\n\n return c;\n }\n }, {\n key: \"_bezierCurve\",\n value: function (e, t, o, n) {\n var i = void 0 !== o && void 0 !== o.x,\n a = void 0 !== n && void 0 !== n.x;\n e.beginPath(), e.moveTo(this.fromPoint.x, this.fromPoint.y), i && a ? e.bezierCurveTo(o.x, o.y, n.x, n.y, this.toPoint.x, this.toPoint.y) : i ? e.quadraticCurveTo(o.x, o.y, this.toPoint.x, this.toPoint.y) : e.lineTo(this.toPoint.x, this.toPoint.y), this.drawBackground(e, t), this.enableShadow(e, t), e.stroke(), this.disableShadow(e, t);\n }\n }, {\n key: \"getViaNode\",\n value: function () {\n return this._getViaCoordinates();\n }\n }]), t;\n}(EdgeBase),\n CubicBezierEdgeBase = function (e) {\n var o = Math.pow;\n\n function t(e, o, n) {\n return classCallCheck$1(this, t), possibleConstructorReturn$1(this, getPrototypeOf$1(t).call(this, e, o, n));\n }\n\n return inherits$1(t, e), createClass$1(t, [{\n key: \"_getDistanceToBezierEdge\",\n value: function (e, n, a, d, s, r, l, c) {\n var u = 1e9,\n p = e,\n h = n,\n m = [0, 0, 0, 0],\n g,\n f,\n b,\n _,\n v;\n\n for (f = 1; 10 > f; f++) b = .1 * f, m[0] = o(1 - b, 3), m[1] = 3 * b * o(1 - b, 2), m[2] = 3 * o(b, 2) * (1 - b), m[3] = o(b, 3), _ = m[0] * e + m[1] * l.x + m[2] * c.x + m[3] * a, v = m[0] * n + m[1] * l.y + m[2] * c.y + m[3] * d, 0 < f && (g = this._getDistanceToLine(p, h, _, v, s, r), u = g < u ? g : u), p = _, h = v;\n\n return u;\n }\n }]), t;\n}(BezierEdgeBase),\n CubicBezierEdge = function (e) {\n var o = Math.pow,\n n = Math.abs;\n\n function t(e, o, n) {\n return classCallCheck$1(this, t), possibleConstructorReturn$1(this, getPrototypeOf$1(t).call(this, e, o, n));\n }\n\n return inherits$1(t, e), createClass$1(t, [{\n key: \"_line\",\n value: function (e, t, o) {\n var n = o[0],\n i = o[1];\n\n this._bezierCurve(e, t, n, i);\n }\n }, {\n key: \"_getViaCoordinates\",\n value: function () {\n var e = this.from.x - this.to.x,\n t = this.from.y - this.to.y,\n o = this.options.smooth.roundness,\n i,\n a,\n d,\n s;\n return (n(e) > n(t) || !0 === this.options.smooth.forceDirection || \"horizontal\" === this.options.smooth.forceDirection) && \"vertical\" !== this.options.smooth.forceDirection ? (a = this.from.y, s = this.to.y, i = this.from.x - o * e, d = this.to.x + o * e) : (a = this.from.y - o * t, s = this.to.y + o * t, i = this.from.x, d = this.to.x), [{\n x: i,\n y: a\n }, {\n x: d,\n y: s\n }];\n }\n }, {\n key: \"getViaNode\",\n value: function () {\n return this._getViaCoordinates();\n }\n }, {\n key: \"_findBorderPosition\",\n value: function (e, t) {\n return this._findBorderPositionBezier(e, t);\n }\n }, {\n key: \"_getDistanceToEdge\",\n value: function (e, t, o, n, i, a) {\n var d = 6 < arguments.length && void 0 !== arguments[6] ? arguments[6] : this._getViaCoordinates(),\n s = slicedToArray(d, 2),\n r = s[0],\n l = s[1];\n return this._getDistanceToBezierEdge(e, t, o, n, i, a, r, l);\n }\n }, {\n key: \"getPoint\",\n value: function (e) {\n var n = 1 < arguments.length && void 0 !== arguments[1] ? arguments[1] : this._getViaCoordinates(),\n i = slicedToArray(n, 2),\n a = i[0],\n d = i[1],\n s = e,\n t = [];\n t[0] = o(1 - s, 3), t[1] = 3 * s * o(1 - s, 2), t[2] = 3 * o(s, 2) * (1 - s), t[3] = o(s, 3);\n var r = t[0] * this.fromPoint.x + t[1] * a.x + t[2] * d.x + t[3] * this.toPoint.x,\n l = t[0] * this.fromPoint.y + t[1] * a.y + t[2] * d.y + t[3] * this.toPoint.y;\n return {\n x: r,\n y: l\n };\n }\n }]), t;\n}(CubicBezierEdgeBase),\n BezierEdgeDynamic = function (e) {\n var o = Math.cos,\n n = Math.sin,\n i = Math.PI,\n d = Math.pow;\n\n function t(e, o, n) {\n var i;\n return classCallCheck$1(this, t), i = possibleConstructorReturn$1(this, getPrototypeOf$1(t).call(this, e, o, n)), i._boundFunction = function () {\n i.positionBezierNode();\n }, i.body.emitter.on(\"_repositionBezierNodes\", i._boundFunction), i;\n }\n\n return inherits$1(t, e), createClass$1(t, [{\n key: \"setOptions\",\n value: function (e) {\n var t = !1;\n this.options.physics !== e.physics && (t = !0), this.options = e, this.id = this.options.id, this.from = this.body.nodes[this.options.from], this.to = this.body.nodes[this.options.to], this.setupSupportNode(), this.connect(), !0 == t && (this.via.setOptions({\n physics: this.options.physics\n }), this.positionBezierNode());\n }\n }, {\n key: \"connect\",\n value: function () {\n this.from = this.body.nodes[this.options.from], this.to = this.body.nodes[this.options.to], void 0 === this.from || void 0 === this.to || !1 === this.options.physics ? this.via.setOptions({\n physics: !1\n }) : this.from.id === this.to.id ? this.via.setOptions({\n physics: !1\n }) : this.via.setOptions({\n physics: !0\n });\n }\n }, {\n key: \"cleanup\",\n value: function () {\n return this.body.emitter.off(\"_repositionBezierNodes\", this._boundFunction), void 0 !== this.via && (delete this.body.nodes[this.via.id], this.via = void 0, !0);\n }\n }, {\n key: \"setupSupportNode\",\n value: function () {\n if (void 0 === this.via) {\n var e = \"edgeId:\" + this.id,\n t = this.body.functions.createNode({\n id: e,\n shape: \"circle\",\n physics: !0,\n hidden: !0\n });\n this.body.nodes[e] = t, this.via = t, this.via.parentEdgeId = this.id, this.positionBezierNode();\n }\n }\n }, {\n key: \"positionBezierNode\",\n value: function () {\n void 0 !== this.via && void 0 !== this.from && void 0 !== this.to ? (this.via.x = .5 * (this.from.x + this.to.x), this.via.y = .5 * (this.from.y + this.to.y)) : void 0 !== this.via && (this.via.x = 0, this.via.y = 0);\n }\n }, {\n key: \"_line\",\n value: function (e, t, o) {\n this._bezierCurve(e, t, o);\n }\n }, {\n key: \"getViaNode\",\n value: function () {\n return this.via;\n }\n }, {\n key: \"getPoint\",\n value: function (e) {\n var s = 1 < arguments.length && void 0 !== arguments[1] ? arguments[1] : this.via,\n r = e,\n t,\n l;\n\n if (this.from === this.to) {\n var c = this._getCircleData(this.from),\n u = slicedToArray(c, 3),\n p = u[0],\n h = u[1],\n m = u[2],\n g = 2 * i * (1 - r);\n\n t = p + m * n(g), l = h + m - m * (1 - o(g));\n } else t = d(1 - r, 2) * this.fromPoint.x + 2 * r * (1 - r) * s.x + d(r, 2) * this.toPoint.x, l = d(1 - r, 2) * this.fromPoint.y + 2 * r * (1 - r) * s.y + d(r, 2) * this.toPoint.y;\n\n return {\n x: t,\n y: l\n };\n }\n }, {\n key: \"_findBorderPosition\",\n value: function (e, t) {\n return this._findBorderPositionBezier(e, t, this.via);\n }\n }, {\n key: \"_getDistanceToEdge\",\n value: function (e, t, o, n, i, a) {\n return this._getDistanceToBezierEdge(e, t, o, n, i, a, this.via);\n }\n }]), t;\n}(BezierEdgeBase),\n BezierEdgeStatic = function (e) {\n var o = Math.atan2,\n n = Math.cos,\n i = Math.sin,\n a = Math.sqrt,\n d = Math.PI,\n s = Math.pow,\n r = Math.abs;\n\n function t(e, o, n) {\n return classCallCheck$1(this, t), possibleConstructorReturn$1(this, getPrototypeOf$1(t).call(this, e, o, n));\n }\n\n return inherits$1(t, e), createClass$1(t, [{\n key: \"_line\",\n value: function (e, t, o) {\n this._bezierCurve(e, t, o);\n }\n }, {\n key: \"getViaNode\",\n value: function () {\n return this._getViaCoordinates();\n }\n }, {\n key: \"_getViaCoordinates\",\n value: function () {\n var e = void 0,\n t = void 0,\n s = this.options.smooth.roundness,\n l = this.options.smooth.type,\n c = r(this.from.x - this.to.x),\n u = r(this.from.y - this.to.y);\n\n if (\"discrete\" === l || \"diagonalCross\" === l) {\n var p, h;\n p = c <= u ? h = s * u : h = s * c, this.from.x > this.to.x && (p = -p), this.from.y >= this.to.y && (h = -h), e = this.from.x + p, t = this.from.y + h, \"discrete\" === l && (c <= u ? e = c < s * u ? this.from.x : e : t = u < s * c ? this.from.y : t);\n } else if (\"straightCross\" === l) {\n var m = (1 - s) * c,\n g = (1 - s) * u;\n c <= u ? (m = 0, this.from.y < this.to.y && (g = -g)) : (this.from.x < this.to.x && (m = -m), g = 0), e = this.to.x + m, t = this.to.y + g;\n } else if (\"horizontal\" === l) {\n var y = (1 - s) * c;\n this.from.x < this.to.x && (y = -y), e = this.to.x + y, t = this.from.y;\n } else if (\"vertical\" === l) {\n var f = (1 - s) * u;\n this.from.y < this.to.y && (f = -f), e = this.from.x, t = this.to.y + f;\n } else if (\"curvedCW\" === l) {\n c = this.to.x - this.from.x, u = this.from.y - this.to.y;\n var b = a(c * c + u * u),\n _ = d,\n v = o(u, c),\n k = (v + (.5 * s + .5) * _) % (2 * _);\n e = this.from.x + (.5 * s + .5) * b * i(k), t = this.from.y + (.5 * s + .5) * b * n(k);\n } else if (\"curvedCCW\" === l) {\n c = this.to.x - this.from.x, u = this.from.y - this.to.y;\n var w = a(c * c + u * u),\n x = d,\n S = o(u, c),\n O = (S + (.5 * -s + .5) * x) % (2 * x);\n e = this.from.x + (.5 * s + .5) * w * i(O), t = this.from.y + (.5 * s + .5) * w * n(O);\n } else {\n var D, T;\n D = c <= u ? T = s * u : T = s * c, this.from.x > this.to.x && (D = -D), this.from.y >= this.to.y && (T = -T), e = this.from.x + D, t = this.from.y + T, c <= u ? this.from.x <= this.to.x ? e = this.to.x < e ? this.to.x : e : e = this.to.x > e ? this.to.x : e : this.from.y >= this.to.y ? t = this.to.y > t ? this.to.y : t : t = this.to.y < t ? this.to.y : t;\n }\n\n return {\n x: e,\n y: t\n };\n }\n }, {\n key: \"_findBorderPosition\",\n value: function (e, t) {\n var o = 2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : {};\n return this._findBorderPositionBezier(e, t, o.via);\n }\n }, {\n key: \"_getDistanceToEdge\",\n value: function (e, t, o, n, i, a) {\n var d = 6 < arguments.length && void 0 !== arguments[6] ? arguments[6] : this._getViaCoordinates();\n return this._getDistanceToBezierEdge(e, t, o, n, i, a, d);\n }\n }, {\n key: \"getPoint\",\n value: function (e) {\n var o = 1 < arguments.length && void 0 !== arguments[1] ? arguments[1] : this._getViaCoordinates(),\n n = e,\n t = s(1 - n, 2) * this.fromPoint.x + 2 * n * (1 - n) * o.x + s(n, 2) * this.toPoint.x,\n i = s(1 - n, 2) * this.fromPoint.y + 2 * n * (1 - n) * o.y + s(n, 2) * this.toPoint.y;\n return {\n x: t,\n y: i\n };\n }\n }]), t;\n}(BezierEdgeBase),\n StraightEdge = function (e) {\n var o = Math.atan2,\n n = Math.sqrt;\n\n function t(e, o, n) {\n return classCallCheck$1(this, t), possibleConstructorReturn$1(this, getPrototypeOf$1(t).call(this, e, o, n));\n }\n\n return inherits$1(t, e), createClass$1(t, [{\n key: \"_line\",\n value: function (e, t) {\n e.beginPath(), e.moveTo(this.fromPoint.x, this.fromPoint.y), e.lineTo(this.toPoint.x, this.toPoint.y), this.enableShadow(e, t), e.stroke(), this.disableShadow(e, t);\n }\n }, {\n key: \"getViaNode\",\n value: function () {}\n }, {\n key: \"getPoint\",\n value: function (e) {\n return {\n x: (1 - e) * this.fromPoint.x + e * this.toPoint.x,\n y: (1 - e) * this.fromPoint.y + e * this.toPoint.y\n };\n }\n }, {\n key: \"_findBorderPosition\",\n value: function (e, t) {\n var i = this.to,\n a = this.from;\n e.id === this.from.id && (i = this.from, a = this.to);\n var d = o(i.y - a.y, i.x - a.x),\n s = i.x - a.x,\n r = i.y - a.y,\n l = n(s * s + r * r),\n c = e.distanceToBorder(t, d),\n u = (l - c) / l,\n p = {};\n return p.x = (1 - u) * a.x + u * i.x, p.y = (1 - u) * a.y + u * i.y, p;\n }\n }, {\n key: \"_getDistanceToEdge\",\n value: function (e, t, o, n, i, a) {\n return this._getDistanceToLine(e, t, o, n, i, a);\n }\n }]), t;\n}(EdgeBase),\n Edge = function () {\n var t = Math.atan2,\n o = Math.cos,\n n = Math.sin,\n i = Math.PI,\n a = Math.max,\n d = Math.min;\n\n function e(t, o, n, i) {\n if (classCallCheck$1(this, e), void 0 === o) throw new Error(\"No body provided\");\n this.options = util.bridgeObject(n), this.globalOptions = n, this.defaultOptions = i, this.body = o, this.id = void 0, this.fromId = void 0, this.toId = void 0, this.selected = !1, this.hover = !1, this.labelDirty = !0, this.baseWidth = this.options.width, this.baseFontSize = this.options.font.size, this.from = void 0, this.to = void 0, this.edgeType = void 0, this.connected = !1, this.labelModule = new Label(this.body, this.options, !0), this.setOptions(t);\n }\n\n return createClass$1(e, [{\n key: \"setOptions\",\n value: function (t) {\n if (t) {\n var o = this.options.hidden;\n (void 0 === o || null === o) && (o = !1), e.parseOptions(this.options, t, !0, this.globalOptions), void 0 !== t.id && (this.id = t.id), void 0 !== t.from && (this.fromId = t.from), void 0 !== t.to && (this.toId = t.to), void 0 !== t.title && (this.title = t.title), void 0 !== t.value && (t.value = parseFloat(t.value));\n var n = [t, this.options, this.defaultOptions];\n this.chooser = ComponentUtil.choosify(\"edge\", n), this.updateLabelModule(t);\n var i = this.updateEdgeType();\n this._setInteractionWidths(), this.connect();\n var a = this.options.hidden;\n return (void 0 === a || null === a) && (a = !1), (a != o || void 0 !== t.physics) && (i = !0), void 0 !== t.physics && (i = !0), i;\n }\n }\n }, {\n key: \"getFormattingValues\",\n value: function () {\n var e = !0 === this.options.arrows.to || !0 === this.options.arrows.to.enabled,\n t = !0 === this.options.arrows.from || !0 === this.options.arrows.from.enabled,\n o = !0 === this.options.arrows.middle || !0 === this.options.arrows.middle.enabled,\n n = this.options.color.inherit,\n i = {\n toArrow: e,\n toArrowScale: this.options.arrows.to.scaleFactor,\n toArrowType: this.options.arrows.to.type,\n middleArrow: o,\n middleArrowScale: this.options.arrows.middle.scaleFactor,\n middleArrowType: this.options.arrows.middle.type,\n fromArrow: t,\n fromArrowScale: this.options.arrows.from.scaleFactor,\n fromArrowType: this.options.arrows.from.type,\n arrowStrikethrough: this.options.arrowStrikethrough,\n color: n ? void 0 : this.options.color.color,\n inheritsColor: n,\n opacity: this.options.color.opacity,\n hidden: this.options.hidden,\n length: this.options.length,\n shadow: this.options.shadow.enabled,\n shadowColor: this.options.shadow.color,\n shadowSize: this.options.shadow.size,\n shadowX: this.options.shadow.x,\n shadowY: this.options.shadow.y,\n dashes: this.options.dashes,\n width: this.options.width,\n background: this.options.background.enabled,\n backgroundColor: this.options.background.color,\n backgroundSize: this.options.background.size,\n backgroundDashes: this.options.background.dashes\n };\n if (!(this.selected || this.hover)) i.shadow = this.options.shadow.enabled, i.width = a(i.width, .3 / this.body.view.scale);else if (!0 !== this.chooser) \"function\" == typeof this.chooser && (this.chooser(i, this.options.id, this.selected, this.hover), void 0 !== i.color && (i.inheritsColor = !1), !1 === i.shadow && (i.shadowColor !== this.options.shadow.color || i.shadowSize !== this.options.shadow.size || i.shadowX !== this.options.shadow.x || i.shadowY !== this.options.shadow.y) && (i.shadow = !0));else if (this.selected) {\n var d = this.options.selectionWidth;\n \"function\" == typeof d ? i.width = d(i.width) : \"number\" == typeof d && (i.width += d), i.width = a(i.width, .3 / this.body.view.scale), i.color = this.options.color.highlight, i.shadow = this.options.shadow.enabled;\n } else if (this.hover) {\n var s = this.options.hoverWidth;\n \"function\" == typeof s ? i.width = s(i.width) : \"number\" == typeof s && (i.width += s), i.width = a(i.width, .3 / this.body.view.scale), i.color = this.options.color.hover, i.shadow = this.options.shadow.enabled;\n }\n return i;\n }\n }, {\n key: \"updateLabelModule\",\n value: function (e) {\n var t = [e, this.options, this.globalOptions, this.defaultOptions];\n this.labelModule.update(this.options, t), void 0 !== this.labelModule.baseSize && (this.baseFontSize = this.labelModule.baseSize);\n }\n }, {\n key: \"updateEdgeType\",\n value: function () {\n var e = this.options.smooth,\n t = !1,\n o = !0;\n return void 0 !== this.edgeType && ((this.edgeType instanceof BezierEdgeDynamic && !0 === e.enabled && \"dynamic\" === e.type || this.edgeType instanceof CubicBezierEdge && !0 === e.enabled && \"cubicBezier\" === e.type || this.edgeType instanceof BezierEdgeStatic && !0 === e.enabled && \"dynamic\" !== e.type && \"cubicBezier\" !== e.type || this.edgeType instanceof StraightEdge && !1 === e.type.enabled) && (o = !1), !0 === o && (t = this.cleanup())), !0 === o ? !0 === e.enabled ? \"dynamic\" === e.type ? (t = !0, this.edgeType = new BezierEdgeDynamic(this.options, this.body, this.labelModule)) : \"cubicBezier\" === e.type ? this.edgeType = new CubicBezierEdge(this.options, this.body, this.labelModule) : this.edgeType = new BezierEdgeStatic(this.options, this.body, this.labelModule) : this.edgeType = new StraightEdge(this.options, this.body, this.labelModule) : this.edgeType.setOptions(this.options), t;\n }\n }, {\n key: \"connect\",\n value: function () {\n this.disconnect(), this.from = this.body.nodes[this.fromId] || void 0, this.to = this.body.nodes[this.toId] || void 0, this.connected = void 0 !== this.from && void 0 !== this.to, !0 === this.connected ? (this.from.attachEdge(this), this.to.attachEdge(this)) : (this.from && this.from.detachEdge(this), this.to && this.to.detachEdge(this)), this.edgeType.connect();\n }\n }, {\n key: \"disconnect\",\n value: function () {\n this.from && (this.from.detachEdge(this), this.from = void 0), this.to && (this.to.detachEdge(this), this.to = void 0), this.connected = !1;\n }\n }, {\n key: \"getTitle\",\n value: function () {\n return this.title;\n }\n }, {\n key: \"isSelected\",\n value: function () {\n return this.selected;\n }\n }, {\n key: \"getValue\",\n value: function () {\n return this.options.value;\n }\n }, {\n key: \"setValueRange\",\n value: function (e, t, o) {\n if (void 0 !== this.options.value) {\n var n = this.options.scaling.customScalingFunction(e, t, o, this.options.value),\n i = this.options.scaling.max - this.options.scaling.min;\n\n if (!0 === this.options.scaling.label.enabled) {\n var a = this.options.scaling.label.max - this.options.scaling.label.min;\n this.options.font.size = this.options.scaling.label.min + n * a;\n }\n\n this.options.width = this.options.scaling.min + n * i;\n } else this.options.width = this.baseWidth, this.options.font.size = this.baseFontSize;\n\n this._setInteractionWidths(), this.updateLabelModule();\n }\n }, {\n key: \"_setInteractionWidths\",\n value: function () {\n this.edgeType.hoverWidth = \"function\" == typeof this.options.hoverWidth ? this.options.hoverWidth(this.options.width) : this.options.hoverWidth + this.options.width, this.edgeType.selectionWidth = \"function\" == typeof this.options.selectionWidth ? this.options.selectionWidth(this.options.width) : this.options.selectionWidth + this.options.width;\n }\n }, {\n key: \"draw\",\n value: function (e) {\n var t = this.getFormattingValues();\n\n if (!t.hidden) {\n var o = this.edgeType.getViaNode(),\n n = {};\n this.edgeType.fromPoint = this.edgeType.from, this.edgeType.toPoint = this.edgeType.to, t.fromArrow && (n.from = this.edgeType.getArrowData(e, \"from\", o, this.selected, this.hover, t), !1 === t.arrowStrikethrough && (this.edgeType.fromPoint = n.from.core)), t.toArrow && (n.to = this.edgeType.getArrowData(e, \"to\", o, this.selected, this.hover, t), !1 === t.arrowStrikethrough && (this.edgeType.toPoint = n.to.core)), t.middleArrow && (n.middle = this.edgeType.getArrowData(e, \"middle\", o, this.selected, this.hover, t)), this.edgeType.drawLine(e, t, this.selected, this.hover, o), this.drawArrows(e, n, t), this.drawLabel(e, o);\n }\n }\n }, {\n key: \"drawArrows\",\n value: function (e, t, o) {\n o.fromArrow && this.edgeType.drawArrowHead(e, o, this.selected, this.hover, t.from), o.middleArrow && this.edgeType.drawArrowHead(e, o, this.selected, this.hover, t.middle), o.toArrow && this.edgeType.drawArrowHead(e, o, this.selected, this.hover, t.to);\n }\n }, {\n key: \"drawLabel\",\n value: function (e, t) {\n if (void 0 !== this.options.label) {\n var o = this.from,\n n = this.to;\n\n if (this.labelModule.differentState(this.selected, this.hover) && this.labelModule.getTextSize(e, this.selected, this.hover), o.id != n.id) {\n this.labelModule.pointToSelf = !1;\n var i = this.edgeType.getPoint(.5, t);\n e.save();\n\n var a = this._getRotation(e);\n\n 0 != a.angle && (e.translate(a.x, a.y), e.rotate(a.angle)), this.labelModule.draw(e, i.x, i.y, this.selected, this.hover), e.restore();\n } else {\n this.labelModule.pointToSelf = !0;\n var d = this.options.selfReferenceSize,\n s,\n r;\n o.shape.width > o.shape.height ? (s = o.x + .5 * o.shape.width, r = o.y - d) : (s = o.x + d, r = o.y - .5 * o.shape.height), i = this._pointOnCircle(s, r, d, .125), this.labelModule.draw(e, i.x, i.y, this.selected, this.hover);\n }\n }\n }\n }, {\n key: \"getItemsOnPoint\",\n value: function (e) {\n var t = [];\n\n if (this.labelModule.visible()) {\n var o = this._getRotation();\n\n ComponentUtil.pointInRect(this.labelModule.getSize(), e, o) && t.push({\n edgeId: this.id,\n labelId: 0\n });\n }\n\n var n = {\n left: e.x,\n top: e.y\n };\n return this.isOverlappingWith(n) && t.push({\n edgeId: this.id\n }), t;\n }\n }, {\n key: \"isOverlappingWith\",\n value: function (e) {\n if (this.connected) {\n var t = this.from.x,\n o = this.from.y,\n n = this.to.x,\n i = this.to.y,\n a = e.left,\n d = e.top,\n s = this.edgeType.getDistanceToEdge(t, o, n, i, a, d);\n return 10 > s;\n }\n\n return !1;\n }\n }, {\n key: \"_getRotation\",\n value: function (e) {\n var o = this.edgeType.getViaNode(),\n n = this.edgeType.getPoint(.5, o);\n void 0 !== e && this.labelModule.calculateLabelSize(e, this.selected, this.hover, n.x, n.y);\n var a = {\n x: n.x,\n y: this.labelModule.size.yLine,\n angle: 0\n };\n if (!this.labelModule.visible()) return a;\n if (\"horizontal\" === this.options.font.align) return a;\n var d = this.from.y - this.to.y,\n s = this.from.x - this.to.x,\n r = t(d, s);\n return (-1 > r && 0 > s || 0 < r && 0 > s) && (r += i), a.angle = r, a;\n }\n }, {\n key: \"_pointOnCircle\",\n value: function (e, t, a, d) {\n var s = 2 * d * i;\n return {\n x: e + a * o(s),\n y: t - a * n(s)\n };\n }\n }, {\n key: \"select\",\n value: function () {\n this.selected = !0;\n }\n }, {\n key: \"unselect\",\n value: function () {\n this.selected = !1;\n }\n }, {\n key: \"cleanup\",\n value: function () {\n return this.edgeType.cleanup();\n }\n }, {\n key: \"remove\",\n value: function () {\n this.cleanup(), this.disconnect(), delete this.body.edges[this.id];\n }\n }, {\n key: \"endPointsValid\",\n value: function () {\n return void 0 !== this.body.nodes[this.fromId] && void 0 !== this.body.nodes[this.toId];\n }\n }], [{\n key: \"parseOptions\",\n value: function (e, t) {\n var o = !!(2 < arguments.length && void 0 !== arguments[2]) && arguments[2],\n n = 3 < arguments.length && void 0 !== arguments[3] ? arguments[3] : {},\n s = !!(4 < arguments.length && void 0 !== arguments[4]) && arguments[4];\n if (util.selectiveDeepExtend([\"arrowStrikethrough\", \"id\", \"from\", \"hidden\", \"hoverWidth\", \"labelHighlightBold\", \"length\", \"line\", \"opacity\", \"physics\", \"scaling\", \"selectionWidth\", \"selfReferenceSize\", \"to\", \"title\", \"value\", \"width\", \"font\", \"chosen\", \"widthConstraint\"], e, t, o), ComponentUtil.isValidLabel(t.label) ? e.label = t.label : !ComponentUtil.isValidLabel(e.label) && (e.label = void 0), util.mergeOptions(e, t, \"smooth\", n), util.mergeOptions(e, t, \"shadow\", n), util.mergeOptions(e, t, \"background\", n), void 0 !== t.dashes && null !== t.dashes ? e.dashes = t.dashes : !0 === o && null === t.dashes && (e.dashes = Object.create(n.dashes)), void 0 !== t.scaling && null !== t.scaling ? (void 0 !== t.scaling.min && (e.scaling.min = t.scaling.min), void 0 !== t.scaling.max && (e.scaling.max = t.scaling.max), util.mergeOptions(e.scaling, t.scaling, \"label\", n.scaling)) : !0 === o && null === t.scaling && (e.scaling = Object.create(n.scaling)), void 0 === t.arrows || null === t.arrows) !0 === o && null === t.arrows && (e.arrows = Object.create(n.arrows));else if (\"string\" == typeof t.arrows) {\n var r = t.arrows.toLowerCase();\n e.arrows.to.enabled = -1 != r.indexOf(\"to\"), e.arrows.middle.enabled = -1 != r.indexOf(\"middle\"), e.arrows.from.enabled = -1 != r.indexOf(\"from\");\n } else if (\"object\" === _typeof_1$1(t.arrows)) util.mergeOptions(e.arrows, t.arrows, \"to\", n.arrows), util.mergeOptions(e.arrows, t.arrows, \"middle\", n.arrows), util.mergeOptions(e.arrows, t.arrows, \"from\", n.arrows);else throw new Error(\"The arrow newOptions can only be an object or a string. Refer to the documentation. You used:\" + JSON.stringify(t.arrows));\n\n if (void 0 !== t.color && null !== t.color) {\n var l = t.color,\n c = e.color;\n if (s) util.deepExtend(c, n.color, !1, o);else for (var u in c) c.hasOwnProperty(u) && delete c[u];\n if (util.isString(c)) c.color = c, c.highlight = c, c.hover = c, c.inherit = !1, void 0 === l.opacity && (c.opacity = 1);else {\n var i = !1;\n void 0 !== l.color && (c.color = l.color, i = !0), void 0 !== l.highlight && (c.highlight = l.highlight, i = !0), void 0 !== l.hover && (c.hover = l.hover, i = !0), void 0 !== l.inherit && (c.inherit = l.inherit), void 0 !== l.opacity && (c.opacity = d(1, a(0, l.opacity))), !0 == i ? c.inherit = !1 : void 0 === c.inherit && (c.inherit = \"from\");\n }\n } else !0 === o && null === t.color && (e.color = util.bridgeObject(n.color));\n\n !0 === o && null === t.font && (e.font = util.bridgeObject(n.font));\n }\n }]), e;\n}(),\n EdgesHandler = function () {\n var t = Math.max;\n\n function e(o, n, i) {\n var a = this;\n classCallCheck$1(this, e), this.body = o, this.images = n, this.groups = i, this.body.functions.createEdge = this.create.bind(this), this.edgesListeners = {\n add: function (e, t) {\n a.add(t.items);\n },\n update: function (e, t) {\n a.update(t.items);\n },\n remove: function (e, t) {\n a.remove(t.items);\n }\n }, this.options = {}, this.defaultOptions = {\n arrows: {\n to: {\n enabled: !1,\n scaleFactor: 1,\n type: \"arrow\"\n },\n middle: {\n enabled: !1,\n scaleFactor: 1,\n type: \"arrow\"\n },\n from: {\n enabled: !1,\n scaleFactor: 1,\n type: \"arrow\"\n }\n },\n arrowStrikethrough: !0,\n color: {\n color: \"#848484\",\n highlight: \"#848484\",\n hover: \"#848484\",\n inherit: \"from\",\n opacity: 1\n },\n dashes: !1,\n font: {\n color: \"#343434\",\n size: 14,\n face: \"arial\",\n background: \"none\",\n strokeWidth: 2,\n strokeColor: \"#ffffff\",\n align: \"horizontal\",\n multi: !1,\n vadjust: 0,\n bold: {\n mod: \"bold\"\n },\n boldital: {\n mod: \"bold italic\"\n },\n ital: {\n mod: \"italic\"\n },\n mono: {\n mod: \"\",\n size: 15,\n face: \"courier new\",\n vadjust: 2\n }\n },\n hidden: !1,\n hoverWidth: 1.5,\n label: void 0,\n labelHighlightBold: !0,\n length: void 0,\n physics: !0,\n scaling: {\n min: 1,\n max: 15,\n label: {\n enabled: !0,\n min: 14,\n max: 30,\n maxVisible: 30,\n drawThreshold: 5\n },\n customScalingFunction: function (e, o, n, i) {\n if (o === e) return .5;\n return t(0, (i - e) * (1 / (o - e)));\n }\n },\n selectionWidth: 1.5,\n selfReferenceSize: 20,\n shadow: {\n enabled: !1,\n color: \"rgba(0,0,0,0.5)\",\n size: 10,\n x: 5,\n y: 5\n },\n background: {\n enabled: !1,\n color: \"rgba(111,111,111,1)\",\n size: 10,\n dashes: !1\n },\n smooth: {\n enabled: !0,\n type: \"dynamic\",\n forceDirection: \"none\",\n roundness: .5\n },\n title: void 0,\n width: 1,\n value: void 0\n }, util.deepExtend(this.options, this.defaultOptions), this.bindEventListeners();\n }\n\n return createClass$1(e, [{\n key: \"bindEventListeners\",\n value: function () {\n var e = this;\n this.body.emitter.on(\"_forceDisableDynamicCurves\", function (t) {\n var o = !(1 < arguments.length && void 0 !== arguments[1]) || arguments[1];\n \"dynamic\" === t && (t = \"continuous\");\n var n = !1;\n\n for (var i in e.body.edges) if (e.body.edges.hasOwnProperty(i)) {\n var a = e.body.edges[i],\n d = e.body.data.edges._data[i];\n\n if (void 0 !== d) {\n var s = d.smooth;\n void 0 !== s && !0 === s.enabled && \"dynamic\" === s.type && (void 0 === t ? a.setOptions({\n smooth: !1\n }) : a.setOptions({\n smooth: {\n type: t\n }\n }), n = !0);\n }\n }\n\n !0 === o && !0 == n && e.body.emitter.emit(\"_dataChanged\");\n }), this.body.emitter.on(\"_dataUpdated\", function () {\n e.reconnectEdges();\n }), this.body.emitter.on(\"refreshEdges\", this.refresh.bind(this)), this.body.emitter.on(\"refresh\", this.refresh.bind(this)), this.body.emitter.on(\"destroy\", function () {\n util.forEach(e.edgesListeners, function (t, o) {\n e.body.data.edges && e.body.data.edges.off(o, t);\n }), delete e.body.functions.createEdge, delete e.edgesListeners.add, delete e.edgesListeners.update, delete e.edgesListeners.remove, delete e.edgesListeners;\n });\n }\n }, {\n key: \"setOptions\",\n value: function (e) {\n if (void 0 !== e) {\n Edge.parseOptions(this.options, e, !0, this.defaultOptions, !0);\n var t = !1;\n if (void 0 !== e.smooth) for (var o in this.body.edges) this.body.edges.hasOwnProperty(o) && (t = this.body.edges[o].updateEdgeType() || t);\n if (void 0 !== e.font) for (var n in this.body.edges) this.body.edges.hasOwnProperty(n) && this.body.edges[n].updateLabelModule();\n (void 0 !== e.hidden || void 0 !== e.physics || !0 === t) && this.body.emitter.emit(\"_dataChanged\");\n }\n }\n }, {\n key: \"setData\",\n value: function (e) {\n var t = this,\n o = !!(1 < arguments.length && void 0 !== arguments[1]) && arguments[1],\n n = this.body.data.edges;\n if (e instanceof DataSet || e instanceof DataView) this.body.data.edges = e;else if (Array.isArray(e)) this.body.data.edges = new DataSet(), this.body.data.edges.add(e);else if (!e) this.body.data.edges = new DataSet();else throw new TypeError(\"Array or DataSet expected\");\n\n if (n && util.forEach(this.edgesListeners, function (e, t) {\n n.off(t, e);\n }), this.body.edges = {}, this.body.data.edges) {\n util.forEach(this.edgesListeners, function (e, o) {\n t.body.data.edges.on(o, e);\n });\n var i = this.body.data.edges.getIds();\n this.add(i, !0);\n }\n\n this.body.emitter.emit(\"_adjustEdgesForHierarchicalLayout\"), !1 === o && this.body.emitter.emit(\"_dataChanged\");\n }\n }, {\n key: \"add\",\n value: function (e) {\n for (var t = !!(1 < arguments.length && void 0 !== arguments[1]) && arguments[1], o = this.body.edges, n = this.body.data.edges, a = 0; a < e.length; a++) {\n var d = e[a],\n s = o[d];\n s && s.disconnect();\n var r = n.get(d, {\n showInternalIds: !0\n });\n o[d] = this.create(r);\n }\n\n this.body.emitter.emit(\"_adjustEdgesForHierarchicalLayout\"), !1 === t && this.body.emitter.emit(\"_dataChanged\");\n }\n }, {\n key: \"update\",\n value: function (e) {\n for (var t = this.body.edges, o = this.body.data.edges, n = !1, a = 0; a < e.length; a++) {\n var d = e[a],\n s = o.get(d),\n r = t[d];\n void 0 === r ? (this.body.edges[d] = this.create(s), n = !0) : (r.disconnect(), n = r.setOptions(s) || n, r.connect());\n }\n\n !0 === n ? (this.body.emitter.emit(\"_adjustEdgesForHierarchicalLayout\"), this.body.emitter.emit(\"_dataChanged\")) : this.body.emitter.emit(\"_dataUpdated\");\n }\n }, {\n key: \"remove\",\n value: function (e) {\n var t = !(1 < arguments.length && void 0 !== arguments[1]) || arguments[1];\n\n if (0 !== e.length) {\n var o = this.body.edges;\n util.forEach(e, function (e) {\n var t = o[e];\n void 0 !== t && t.remove();\n }), t && this.body.emitter.emit(\"_dataChanged\");\n }\n }\n }, {\n key: \"refresh\",\n value: function () {\n var e = this;\n util.forEach(this.body.edges, function (t, o) {\n var n = e.body.data.edges._data[o];\n void 0 !== n && t.setOptions(n);\n });\n }\n }, {\n key: \"create\",\n value: function (e) {\n return new Edge(e, this.body, this.options, this.defaultOptions);\n }\n }, {\n key: \"reconnectEdges\",\n value: function () {\n var e = this.body.nodes,\n t = this.body.edges,\n o;\n\n for (o in e) e.hasOwnProperty(o) && (e[o].edges = []);\n\n for (o in t) if (t.hasOwnProperty(o)) {\n var n = t[o];\n n.from = null, n.to = null, n.connect();\n }\n }\n }, {\n key: \"getConnectedNodes\",\n value: function (e) {\n var t = [];\n\n if (void 0 !== this.body.edges[e]) {\n var o = this.body.edges[e];\n void 0 !== o.fromId && t.push(o.fromId), void 0 !== o.toId && t.push(o.toId);\n }\n\n return t;\n }\n }, {\n key: \"_updateState\",\n value: function () {\n this._addMissingEdges(), this._removeInvalidEdges();\n }\n }, {\n key: \"_removeInvalidEdges\",\n value: function () {\n var e = this,\n t = [];\n util.forEach(this.body.edges, function (o, n) {\n var i = e.body.nodes[o.toId],\n a = e.body.nodes[o.fromId];\n void 0 !== i && !0 === i.isCluster || void 0 !== a && !0 === a.isCluster || (void 0 === i || void 0 === a) && t.push(n);\n }), this.remove(t, !1);\n }\n }, {\n key: \"_addMissingEdges\",\n value: function () {\n var e = this.body.data.edges;\n\n if (void 0 !== e && null !== e) {\n var t = this.body.edges,\n o = [];\n e.forEach(function (e, n) {\n var i = t[n];\n void 0 === i && o.push(n);\n }), this.add(o, !0);\n }\n }\n }]), e;\n}(),\n BarnesHutSolver = function () {\n var t = Math.sin,\n o = Math.sqrt,\n n = Math.pow,\n a = Math.max,\n d = Math.abs,\n s = Math.min,\n r = Math.floor;\n\n function e(t, o, n) {\n classCallCheck$1(this, e), this.body = t, this.physicsBody = o, this.barnesHutTree, this.setOptions(n), this.randomSeed = 5;\n }\n\n return createClass$1(e, [{\n key: \"setOptions\",\n value: function (e) {\n this.options = e, this.thetaInversed = 1 / this.options.theta, this.overlapAvoidanceFactor = 1 - a(0, s(1, this.options.avoidOverlap));\n }\n }, {\n key: \"seededRandom\",\n value: function () {\n var e = 1e4 * t(this.randomSeed++);\n return e - r(e);\n }\n }, {\n key: \"solve\",\n value: function () {\n if (0 !== this.options.gravitationalConstant && 0 < this.physicsBody.physicsNodeIndices.length) {\n var e = this.body.nodes,\n t = this.physicsBody.physicsNodeIndices,\n o = t.length,\n n = this._formBarnesHutTree(e, t),\n a;\n\n this.barnesHutTree = n;\n\n for (var d = 0; d < o; d++) a = e[t[d]], 0 < a.options.mass && this._getForceContributions(n.root, a);\n }\n }\n }, {\n key: \"_getForceContributions\",\n value: function (e, t) {\n this._getForceContribution(e.children.NW, t), this._getForceContribution(e.children.NE, t), this._getForceContribution(e.children.SW, t), this._getForceContribution(e.children.SE, t);\n }\n }, {\n key: \"_getForceContribution\",\n value: function (e, t) {\n if (0 < e.childrenCount) {\n var n, i, a;\n n = e.centerOfMass.x - t.x, i = e.centerOfMass.y - t.y, a = o(n * n + i * i), a * e.calcSize > this.thetaInversed ? this._calculateForces(a, n, i, t, e) : 4 === e.childrenCount ? this._getForceContributions(e, t) : e.children.data.id != t.id && this._calculateForces(a, n, i, t, e);\n }\n }\n }, {\n key: \"_calculateForces\",\n value: function (e, t, o, i, d) {\n 0 === e && (e = .1, t = e), 1 > this.overlapAvoidanceFactor && i.shape.radius && (e = a(.1 + this.overlapAvoidanceFactor * i.shape.radius, e - i.shape.radius));\n var s = this.options.gravitationalConstant * d.mass * i.options.mass / n(e, 3),\n r = t * s;\n this.physicsBody.forces[i.id].x += r, this.physicsBody.forces[i.id].y += o * s;\n }\n }, {\n key: \"_formBarnesHutTree\",\n value: function (e, t) {\n for (var o = t.length, n = e[t[0]].x, s = e[t[0]].y, r = e[t[0]].x, l = e[t[0]].y, c = 1, u; c < o; c++) {\n var p = e[t[c]],\n h = p.x,\n m = p.y;\n 0 < p.options.mass && (h < n && (n = h), h > r && (r = h), m < s && (s = m), m > l && (l = m));\n }\n\n var g = d(r - n) - d(l - s);\n 0 < g ? (s -= .5 * g, l += .5 * g) : (n += .5 * g, r -= .5 * g);\n\n var y = a(1e-5, d(r - n)),\n f = .5 * y,\n b = .5 * (n + r),\n _ = .5 * (s + l),\n v = {\n root: {\n centerOfMass: {\n x: 0,\n y: 0\n },\n mass: 0,\n range: {\n minX: b - f,\n maxX: b + f,\n minY: _ - f,\n maxY: _ + f\n },\n size: y,\n calcSize: 1 / y,\n children: {\n data: null\n },\n maxWidth: 0,\n level: 0,\n childrenCount: 4\n }\n };\n\n this._splitBranch(v.root);\n\n for (var k = 0; k < o; k++) u = e[t[k]], 0 < u.options.mass && this._placeInTree(v.root, u);\n\n return v;\n }\n }, {\n key: \"_updateBranchMass\",\n value: function (e, t) {\n var o = e.centerOfMass,\n n = e.mass + t.options.mass,\n i = 1 / n;\n o.x = o.x * e.mass + t.x * t.options.mass, o.x *= i, o.y = o.y * e.mass + t.y * t.options.mass, o.y *= i, e.mass = n;\n var d = a(a(t.height, t.radius), t.width);\n e.maxWidth = e.maxWidth < d ? d : e.maxWidth;\n }\n }, {\n key: \"_placeInTree\",\n value: function (e, t, o) {\n (!0 != o || void 0 === o) && this._updateBranchMass(e, t);\n var n = e.children.NW.range,\n i;\n i = n.maxX > t.x ? n.maxY > t.y ? \"NW\" : \"SW\" : n.maxY > t.y ? \"NE\" : \"SE\", this._placeInRegion(e, t, i);\n }\n }, {\n key: \"_placeInRegion\",\n value: function (e, t, o) {\n var n = e.children[o];\n\n switch (n.childrenCount) {\n case 0:\n n.children.data = t, n.childrenCount = 1, this._updateBranchMass(n, t);\n break;\n\n case 1:\n n.children.data.x === t.x && n.children.data.y === t.y ? (t.x += this.seededRandom(), t.y += this.seededRandom()) : (this._splitBranch(n), this._placeInTree(n, t));\n break;\n\n case 4:\n this._placeInTree(n, t);\n\n }\n }\n }, {\n key: \"_splitBranch\",\n value: function (e) {\n var t = null;\n 1 === e.childrenCount && (t = e.children.data, e.mass = 0, e.centerOfMass.x = 0, e.centerOfMass.y = 0), e.childrenCount = 4, e.children.data = null, this._insertRegion(e, \"NW\"), this._insertRegion(e, \"NE\"), this._insertRegion(e, \"SW\"), this._insertRegion(e, \"SE\"), null != t && this._placeInTree(e, t);\n }\n }, {\n key: \"_insertRegion\",\n value: function (e, t) {\n var o = .5 * e.size,\n n,\n i,\n a,\n d;\n \"NW\" === t ? (n = e.range.minX, i = e.range.minX + o, a = e.range.minY, d = e.range.minY + o) : \"NE\" === t ? (n = e.range.minX + o, i = e.range.maxX, a = e.range.minY, d = e.range.minY + o) : \"SW\" === t ? (n = e.range.minX, i = e.range.minX + o, a = e.range.minY + o, d = e.range.maxY) : \"SE\" === t ? (n = e.range.minX + o, i = e.range.maxX, a = e.range.minY + o, d = e.range.maxY) : void 0, e.children[t] = {\n centerOfMass: {\n x: 0,\n y: 0\n },\n mass: 0,\n range: {\n minX: n,\n maxX: i,\n minY: a,\n maxY: d\n },\n size: .5 * e.size,\n calcSize: 2 * e.calcSize,\n children: {\n data: null\n },\n maxWidth: 0,\n level: e.level + 1,\n childrenCount: 0\n };\n }\n }, {\n key: \"_debug\",\n value: function (e, t) {\n void 0 !== this.barnesHutTree && (e.lineWidth = 1, this._drawBranch(this.barnesHutTree.root, e, t));\n }\n }, {\n key: \"_drawBranch\",\n value: function (e, t, o) {\n void 0 === o && (o = \"#FF0000\"), 4 === e.childrenCount && (this._drawBranch(e.children.NW, t), this._drawBranch(e.children.NE, t), this._drawBranch(e.children.SE, t), this._drawBranch(e.children.SW, t)), t.strokeStyle = o, t.beginPath(), t.moveTo(e.range.minX, e.range.minY), t.lineTo(e.range.maxX, e.range.minY), t.stroke(), t.beginPath(), t.moveTo(e.range.maxX, e.range.minY), t.lineTo(e.range.maxX, e.range.maxY), t.stroke(), t.beginPath(), t.moveTo(e.range.maxX, e.range.maxY), t.lineTo(e.range.minX, e.range.maxY), t.stroke(), t.beginPath(), t.moveTo(e.range.minX, e.range.maxY), t.lineTo(e.range.minX, e.range.minY), t.stroke();\n }\n }]), e;\n}(),\n RepulsionSolver = function () {\n var t = Math.sqrt;\n\n function e(t, o, n) {\n classCallCheck$1(this, e), this.body = t, this.physicsBody = o, this.setOptions(n);\n }\n\n return createClass$1(e, [{\n key: \"setOptions\",\n value: function (e) {\n this.options = e;\n }\n }, {\n key: \"solve\",\n value: function () {\n for (var e = this.body.nodes, o = this.physicsBody.physicsNodeIndices, n = this.physicsBody.forces, a = this.options.nodeDistance, d = 0, s, r, l, c, u, p, h, m; d < o.length - 1; d++) {\n h = e[o[d]];\n\n for (var g = d + 1; g < o.length; g++) m = e[o[g]], s = m.x - h.x, r = m.y - h.y, l = t(s * s + r * r), 0 === l && (l = .1 * Math.random(), s = l), l < 2 * a && (p = l < .5 * a ? 1 : -2 / 3 / a * l + 4 / 3, p /= l, c = s * p, u = r * p, n[h.id].x -= c, n[h.id].y -= u, n[m.id].x += c, n[m.id].y += u);\n }\n }\n }]), e;\n}(),\n HierarchicalRepulsionSolver = function () {\n var t = Math.sqrt,\n o = Math.pow;\n\n function e(t, o, n) {\n classCallCheck$1(this, e), this.body = t, this.physicsBody = o, this.setOptions(n);\n }\n\n return createClass$1(e, [{\n key: \"setOptions\",\n value: function (e) {\n this.options = e;\n }\n }, {\n key: \"solve\",\n value: function () {\n var e = this.body.nodes,\n n = this.physicsBody.physicsNodeIndices,\n a = this.physicsBody.forces,\n d = this.options.nodeDistance,\n s,\n r,\n l,\n c,\n u,\n p,\n h,\n m,\n g,\n y;\n\n for (g = 0; g < n.length - 1; g++) for (h = e[n[g]], y = g + 1; y < n.length; y++) if (m = e[n[y]], h.level === m.level) {\n s = m.x - h.x, r = m.y - h.y, l = t(s * s + r * r);\n var f = .05;\n p = l < d ? -o(f * l, 2) + o(f * d, 2) : 0, 0 === l ? l = .01 : p /= l, c = s * p, u = r * p, a[h.id].x -= c, a[h.id].y -= u, a[m.id].x += c, a[m.id].y += u;\n }\n }\n }]), e;\n}(),\n SpringSolver = function () {\n var t = Math.sqrt,\n o = Math.max;\n\n function e(t, o, n) {\n classCallCheck$1(this, e), this.body = t, this.physicsBody = o, this.setOptions(n);\n }\n\n return createClass$1(e, [{\n key: \"setOptions\",\n value: function (e) {\n this.options = e;\n }\n }, {\n key: \"solve\",\n value: function () {\n for (var e = this.physicsBody.physicsEdgeIndices, t = this.body.edges, o = 0, n, a, d, s, r; o < e.length; o++) a = t[e[o]], !0 === a.connected && a.toId !== a.fromId && void 0 !== this.body.nodes[a.toId] && void 0 !== this.body.nodes[a.fromId] && (void 0 === a.edgeType.via ? (n = void 0 === a.options.length ? 1.5 * this.options.springLength : a.options.length, this._calculateSpringForce(a.from, a.to, n)) : (n = void 0 === a.options.length ? this.options.springLength : a.options.length, d = a.to, s = a.edgeType.via, r = a.from, this._calculateSpringForce(d, s, .5 * n), this._calculateSpringForce(s, r, .5 * n)));\n }\n }, {\n key: \"_calculateSpringForce\",\n value: function (e, n, i) {\n var a = e.x - n.x,\n d = e.y - n.y,\n s = o(t(a * a + d * d), .01),\n r = this.options.springConstant * (i - s) / s,\n l = a * r,\n c = d * r;\n void 0 !== this.physicsBody.forces[e.id] && (this.physicsBody.forces[e.id].x += l, this.physicsBody.forces[e.id].y += c), void 0 !== this.physicsBody.forces[n.id] && (this.physicsBody.forces[n.id].x -= l, this.physicsBody.forces[n.id].y -= c);\n }\n }]), e;\n}(),\n HierarchicalSpringSolver = function () {\n var t = Math.sqrt,\n o = Math.max,\n n = Math.min;\n\n function e(t, o, n) {\n classCallCheck$1(this, e), this.body = t, this.physicsBody = o, this.setOptions(n);\n }\n\n return createClass$1(e, [{\n key: \"setOptions\",\n value: function (e) {\n this.options = e;\n }\n }, {\n key: \"solve\",\n value: function () {\n for (var e = this.body.edges, a = .5, d = this.physicsBody.physicsEdgeIndices, s = this.physicsBody.physicsNodeIndices, r = this.physicsBody.forces, l = 0, c, u, p, h, m, g, y, f, b; l < s.length; l++) b = s[l], r[b].springFx = 0, r[b].springFy = 0;\n\n for (var _ = 0; _ < d.length; _++) u = e[d[_]], !0 === u.connected && (c = void 0 === u.options.length ? this.options.springLength : u.options.length, p = u.from.x - u.to.x, h = u.from.y - u.to.y, f = t(p * p + h * h), f = 0 === f ? .01 : f, y = this.options.springConstant * (c - f) / f, m = p * y, g = h * y, u.to.level == u.from.level ? (void 0 !== r[u.toId] && (r[u.toId].x -= a * m, r[u.toId].y -= a * g), void 0 !== r[u.fromId] && (r[u.fromId].x += a * m, r[u.fromId].y += a * g)) : (void 0 !== r[u.toId] && (r[u.toId].springFx -= m, r[u.toId].springFy -= g), void 0 !== r[u.fromId] && (r[u.fromId].springFx += m, r[u.fromId].springFy += g)));\n\n y = 1;\n\n for (var v = 0, k, w, x; v < s.length; v++) x = s[v], k = n(y, o(-y, r[x].springFx)), w = n(y, o(-y, r[x].springFy)), r[x].x += k, r[x].y += w;\n\n for (var S = 0, O = 0, D = 0, T; D < s.length; D++) T = s[D], S += r[T].x, O += r[T].y;\n\n for (var E = S / s.length, C = O / s.length, M = 0, I; M < s.length; M++) I = s[M], r[I].x -= E, r[I].y -= C;\n }\n }]), e;\n}(),\n CentralGravitySolver = function () {\n var t = Math.sqrt;\n\n function e(t, o, n) {\n classCallCheck$1(this, e), this.body = t, this.physicsBody = o, this.setOptions(n);\n }\n\n return createClass$1(e, [{\n key: \"setOptions\",\n value: function (e) {\n this.options = e;\n }\n }, {\n key: \"solve\",\n value: function () {\n for (var e = this.body.nodes, o = this.physicsBody.physicsNodeIndices, n = this.physicsBody.forces, a = 0, d, s, r, l, c; a < o.length; a++) c = o[a], l = e[c], d = -l.x, s = -l.y, r = t(d * d + s * s), this._calculateForces(r, d, s, n, l);\n }\n }, {\n key: \"_calculateForces\",\n value: function (e, t, o, n, i) {\n var a = 0 === e ? 0 : this.options.centralGravity / e;\n n[i.id].x = t * a, n[i.id].y = o * a;\n }\n }]), e;\n}(),\n ForceAtlas2BasedRepulsionSolver = function (e) {\n var o = Math.pow,\n n = Math.max;\n\n function t(e, o, n) {\n return classCallCheck$1(this, t), possibleConstructorReturn$1(this, getPrototypeOf$1(t).call(this, e, o, n));\n }\n\n return inherits$1(t, e), createClass$1(t, [{\n key: \"_calculateForces\",\n value: function (e, t, i, a, d) {\n 0 === e && (e = .1 * Math.random(), t = e), 1 > this.overlapAvoidanceFactor && a.shape.radius && (e = n(.1 + this.overlapAvoidanceFactor * a.shape.radius, e - a.shape.radius));\n var s = a.edges.length + 1,\n r = this.options.gravitationalConstant * d.mass * a.options.mass * s / o(e, 2),\n l = t * r;\n this.physicsBody.forces[a.id].x += l, this.physicsBody.forces[a.id].y += i * r;\n }\n }]), t;\n}(BarnesHutSolver),\n ForceAtlas2BasedCentralGravitySolver = function (e) {\n function t(e, o, n) {\n return classCallCheck$1(this, t), possibleConstructorReturn$1(this, getPrototypeOf$1(t).call(this, e, o, n));\n }\n\n return inherits$1(t, e), createClass$1(t, [{\n key: \"_calculateForces\",\n value: function (e, t, o, n, i) {\n if (0 < e) {\n var a = i.edges.length + 1,\n d = this.options.centralGravity * a * i.options.mass;\n n[i.id].x = t * d, n[i.id].y = o * d;\n }\n }\n }]), t;\n}(CentralGravitySolver),\n PhysicsEngine = function () {\n var t = Math.atan2,\n o = Math.sqrt,\n n = Math.pow,\n a = Math.max,\n d = Math.abs,\n s = Math.min;\n\n function e(t) {\n classCallCheck$1(this, e), this.body = t, this.physicsBody = {\n physicsNodeIndices: [],\n physicsEdgeIndices: [],\n forces: {},\n velocities: {}\n }, this.physicsEnabled = !0, this.simulationInterval = 1e3 / 60, this.requiresTimeout = !0, this.previousStates = {}, this.referenceState = {}, this.freezeCache = {}, this.renderTimer = void 0, this.adaptiveTimestep = !1, this.adaptiveTimestepEnabled = !1, this.adaptiveCounter = 0, this.adaptiveInterval = 3, this.stabilized = !1, this.startedStabilization = !1, this.stabilizationIterations = 0, this.ready = !1, this.options = {}, this.defaultOptions = {\n enabled: !0,\n barnesHut: {\n theta: .5,\n gravitationalConstant: -2e3,\n centralGravity: .3,\n springLength: 95,\n springConstant: .04,\n damping: .09,\n avoidOverlap: 0\n },\n forceAtlas2Based: {\n theta: .5,\n gravitationalConstant: -50,\n centralGravity: .01,\n springConstant: .08,\n springLength: 100,\n damping: .4,\n avoidOverlap: 0\n },\n repulsion: {\n centralGravity: .2,\n springLength: 200,\n springConstant: .05,\n nodeDistance: 100,\n damping: .09,\n avoidOverlap: 0\n },\n hierarchicalRepulsion: {\n centralGravity: 0,\n springLength: 100,\n springConstant: .01,\n nodeDistance: 120,\n damping: .09\n },\n maxVelocity: 50,\n minVelocity: .75,\n solver: \"barnesHut\",\n stabilization: {\n enabled: !0,\n iterations: 1e3,\n updateInterval: 50,\n onlyDynamicEdges: !1,\n fit: !0\n },\n timestep: .5,\n adaptiveTimestep: !0\n }, util.extend(this.options, this.defaultOptions), this.timestep = .5, this.layoutFailed = !1, this.bindEventListeners();\n }\n\n return createClass$1(e, [{\n key: \"bindEventListeners\",\n value: function () {\n var e = this;\n this.body.emitter.on(\"initPhysics\", function () {\n e.initPhysics();\n }), this.body.emitter.on(\"_layoutFailed\", function () {\n e.layoutFailed = !0;\n }), this.body.emitter.on(\"resetPhysics\", function () {\n e.stopSimulation(), e.ready = !1;\n }), this.body.emitter.on(\"disablePhysics\", function () {\n e.physicsEnabled = !1, e.stopSimulation();\n }), this.body.emitter.on(\"restorePhysics\", function () {\n e.setOptions(e.options), !0 === e.ready && e.startSimulation();\n }), this.body.emitter.on(\"startSimulation\", function () {\n !0 === e.ready && e.startSimulation();\n }), this.body.emitter.on(\"stopSimulation\", function () {\n e.stopSimulation();\n }), this.body.emitter.on(\"destroy\", function () {\n e.stopSimulation(!1), e.body.emitter.off();\n }), this.body.emitter.on(\"_dataChanged\", function () {\n e.updatePhysicsData();\n });\n }\n }, {\n key: \"setOptions\",\n value: function (e) {\n void 0 !== e && (!1 === e ? (this.options.enabled = !1, this.physicsEnabled = !1, this.stopSimulation()) : !0 === e ? (this.options.enabled = !0, this.physicsEnabled = !0, this.startSimulation()) : (this.physicsEnabled = !0, util.selectiveNotDeepExtend([\"stabilization\"], this.options, e), util.mergeOptions(this.options, e, \"stabilization\"), void 0 === e.enabled && (this.options.enabled = !0), !1 === this.options.enabled && (this.physicsEnabled = !1, this.stopSimulation()), this.timestep = this.options.timestep)), this.init();\n }\n }, {\n key: \"init\",\n value: function () {\n var e;\n \"forceAtlas2Based\" === this.options.solver ? (e = this.options.forceAtlas2Based, this.nodesSolver = new ForceAtlas2BasedRepulsionSolver(this.body, this.physicsBody, e), this.edgesSolver = new SpringSolver(this.body, this.physicsBody, e), this.gravitySolver = new ForceAtlas2BasedCentralGravitySolver(this.body, this.physicsBody, e)) : \"repulsion\" === this.options.solver ? (e = this.options.repulsion, this.nodesSolver = new RepulsionSolver(this.body, this.physicsBody, e), this.edgesSolver = new SpringSolver(this.body, this.physicsBody, e), this.gravitySolver = new CentralGravitySolver(this.body, this.physicsBody, e)) : \"hierarchicalRepulsion\" === this.options.solver ? (e = this.options.hierarchicalRepulsion, this.nodesSolver = new HierarchicalRepulsionSolver(this.body, this.physicsBody, e), this.edgesSolver = new HierarchicalSpringSolver(this.body, this.physicsBody, e), this.gravitySolver = new CentralGravitySolver(this.body, this.physicsBody, e)) : (e = this.options.barnesHut, this.nodesSolver = new BarnesHutSolver(this.body, this.physicsBody, e), this.edgesSolver = new SpringSolver(this.body, this.physicsBody, e), this.gravitySolver = new CentralGravitySolver(this.body, this.physicsBody, e)), this.modelOptions = e;\n }\n }, {\n key: \"initPhysics\",\n value: function () {\n !0 === this.physicsEnabled && !0 === this.options.enabled ? !0 === this.options.stabilization.enabled ? this.stabilize() : (this.stabilized = !1, this.ready = !0, this.body.emitter.emit(\"fit\", {}, this.layoutFailed), this.startSimulation()) : (this.ready = !0, this.body.emitter.emit(\"fit\"));\n }\n }, {\n key: \"startSimulation\",\n value: function () {\n !0 === this.physicsEnabled && !0 === this.options.enabled ? (this.stabilized = !1, this.adaptiveTimestep = !1, this.body.emitter.emit(\"_resizeNodes\"), void 0 === this.viewFunction && (this.viewFunction = this.simulationStep.bind(this), this.body.emitter.on(\"initRedraw\", this.viewFunction), this.body.emitter.emit(\"_startRendering\"))) : this.body.emitter.emit(\"_redraw\");\n }\n }, {\n key: \"stopSimulation\",\n value: function () {\n var e = !(0 < arguments.length && void 0 !== arguments[0]) || arguments[0];\n this.stabilized = !0, !0 === e && this._emitStabilized(), void 0 !== this.viewFunction && (this.body.emitter.off(\"initRedraw\", this.viewFunction), this.viewFunction = void 0, !0 === e && this.body.emitter.emit(\"_stopRendering\"));\n }\n }, {\n key: \"simulationStep\",\n value: function () {\n var e = Date.now();\n this.physicsTick();\n var t = Date.now() - e;\n (t < .4 * this.simulationInterval || !0 === this.runDoubleSpeed) && !1 === this.stabilized && (this.physicsTick(), this.runDoubleSpeed = !0), !0 === this.stabilized && this.stopSimulation();\n }\n }, {\n key: \"_emitStabilized\",\n value: function () {\n var e = this,\n t = 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : this.stabilizationIterations;\n (1 < this.stabilizationIterations || !0 === this.startedStabilization) && setTimeout(function () {\n e.body.emitter.emit(\"stabilized\", {\n iterations: t\n }), e.startedStabilization = !1, e.stabilizationIterations = 0;\n }, 0);\n }\n }, {\n key: \"physicsStep\",\n value: function () {\n this.gravitySolver.solve(), this.nodesSolver.solve(), this.edgesSolver.solve(), this.moveNodes();\n }\n }, {\n key: \"adjustTimeStep\",\n value: function () {\n var e = 1.2;\n !0 === this._evaluateStepQuality() ? this.timestep = e * this.timestep : this.timestep / e < this.options.timestep ? this.timestep = this.options.timestep : (this.adaptiveCounter = -1, this.timestep = a(this.options.timestep, this.timestep / e));\n }\n }, {\n key: \"physicsTick\",\n value: function () {\n if (this._startStabilizing(), !0 !== this.stabilized) {\n if (!0 === this.adaptiveTimestep && !0 === this.adaptiveTimestepEnabled) {\n var e = 0 == this.adaptiveCounter % this.adaptiveInterval;\n e ? (this.timestep = 2 * this.timestep, this.physicsStep(), this.revert(), this.timestep = .5 * this.timestep, this.physicsStep(), this.physicsStep(), this.adjustTimeStep()) : this.physicsStep(), this.adaptiveCounter += 1;\n } else this.timestep = this.options.timestep, this.physicsStep();\n\n !0 === this.stabilized && this.revert(), this.stabilizationIterations++;\n }\n }\n }, {\n key: \"updatePhysicsData\",\n value: function () {\n this.physicsBody.forces = {}, this.physicsBody.physicsNodeIndices = [], this.physicsBody.physicsEdgeIndices = [];\n var e = this.body.nodes,\n t = this.body.edges;\n\n for (var o in e) e.hasOwnProperty(o) && !0 === e[o].options.physics && this.physicsBody.physicsNodeIndices.push(e[o].id);\n\n for (var n in t) t.hasOwnProperty(n) && !0 === t[n].options.physics && this.physicsBody.physicsEdgeIndices.push(t[n].id);\n\n for (var a = 0, d; a < this.physicsBody.physicsNodeIndices.length; a++) d = this.physicsBody.physicsNodeIndices[a], this.physicsBody.forces[d] = {\n x: 0,\n y: 0\n }, void 0 === this.physicsBody.velocities[d] && (this.physicsBody.velocities[d] = {\n x: 0,\n y: 0\n });\n\n for (var s in this.physicsBody.velocities) void 0 === e[s] && delete this.physicsBody.velocities[s];\n }\n }, {\n key: \"revert\",\n value: function () {\n var e = Object.keys(this.previousStates),\n t = this.body.nodes,\n o = this.physicsBody.velocities;\n this.referenceState = {};\n\n for (var n = 0, a; n < e.length; n++) a = e[n], void 0 === t[a] ? delete this.previousStates[a] : !0 === t[a].options.physics && (this.referenceState[a] = {\n positions: {\n x: t[a].x,\n y: t[a].y\n }\n }, o[a].x = this.previousStates[a].vx, o[a].y = this.previousStates[a].vy, t[a].x = this.previousStates[a].x, t[a].y = this.previousStates[a].y);\n }\n }, {\n key: \"_evaluateStepQuality\",\n value: function () {\n var e = this.body.nodes,\n t = this.referenceState,\n i,\n a,\n d;\n\n for (var s in this.referenceState) if (this.referenceState.hasOwnProperty(s) && void 0 !== e[s] && (i = e[s].x - t[s].positions.x, a = e[s].y - t[s].positions.y, d = o(n(i, 2) + n(a, 2)), d > .3)) return !1;\n\n return !0;\n }\n }, {\n key: \"moveNodes\",\n value: function () {\n for (var e = this.physicsBody.physicsNodeIndices, t = 0, o = 0, n = 5, d = 0; d < e.length; d++) {\n var s = e[d],\n r = this._performStep(s);\n\n t = a(t, r), o += r;\n }\n\n this.adaptiveTimestepEnabled = o / e.length < n, this.stabilized = t < this.options.minVelocity;\n }\n }, {\n key: \"calculateComponentVelocity\",\n value: function (e, t, o) {\n var n = this.modelOptions.damping * e;\n e += (t - n) / o * this.timestep;\n var i = this.options.maxVelocity || 1e9;\n return d(e) > i && (e = 0 < e ? i : -i), e;\n }\n }, {\n key: \"_performStep\",\n value: function (e) {\n var t = this.body.nodes[e],\n i = this.physicsBody.forces[e],\n a = this.physicsBody.velocities[e];\n this.previousStates[e] = {\n x: t.x,\n y: t.y,\n vx: a.x,\n vy: a.y\n }, !1 === t.options.fixed.x ? (a.x = this.calculateComponentVelocity(a.x, i.x, t.options.mass), t.x += a.x * this.timestep) : (i.x = 0, a.x = 0), !1 === t.options.fixed.y ? (a.y = this.calculateComponentVelocity(a.y, i.y, t.options.mass), t.y += a.y * this.timestep) : (i.y = 0, a.y = 0);\n var d = o(n(a.x, 2) + n(a.y, 2));\n return d;\n }\n }, {\n key: \"_freezeNodes\",\n value: function () {\n var e = this.body.nodes;\n\n for (var t in e) if (e.hasOwnProperty(t) && e[t].x && e[t].y) {\n var o = e[t].options.fixed;\n this.freezeCache[t] = {\n x: o.x,\n y: o.y\n }, o.x = !0, o.y = !0;\n }\n }\n }, {\n key: \"_restoreFrozenNodes\",\n value: function () {\n var e = this.body.nodes;\n\n for (var t in e) e.hasOwnProperty(t) && void 0 !== this.freezeCache[t] && (e[t].options.fixed.x = this.freezeCache[t].x, e[t].options.fixed.y = this.freezeCache[t].y);\n\n this.freezeCache = {};\n }\n }, {\n key: \"stabilize\",\n value: function () {\n var e = this,\n t = 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : this.options.stabilization.iterations;\n return \"number\" != typeof t && (t = this.options.stabilization.iterations, console.log(\"The stabilize method needs a numeric amount of iterations. Switching to default: \", t)), 0 === this.physicsBody.physicsNodeIndices.length ? void (this.ready = !0) : void (this.adaptiveTimestep = this.options.adaptiveTimestep, this.body.emitter.emit(\"_resizeNodes\"), this.stopSimulation(), this.stabilized = !1, this.body.emitter.emit(\"_blockRedraw\"), this.targetIterations = t, !0 === this.options.stabilization.onlyDynamicEdges && this._freezeNodes(), this.stabilizationIterations = 0, setTimeout(function () {\n return e._stabilizationBatch();\n }, 0));\n }\n }, {\n key: \"_startStabilizing\",\n value: function () {\n return !0 !== this.startedStabilization && (this.body.emitter.emit(\"startStabilizing\"), this.startedStabilization = !0, !0);\n }\n }, {\n key: \"_stabilizationBatch\",\n value: function () {\n var e = this,\n t = function () {\n return !1 === e.stabilized && e.stabilizationIterations < e.targetIterations;\n },\n o = function () {\n e.body.emitter.emit(\"stabilizationProgress\", {\n iterations: e.stabilizationIterations,\n total: e.targetIterations\n });\n };\n\n this._startStabilizing() && o();\n\n for (var n = 0; t() && n < this.options.stabilization.updateInterval;) this.physicsTick(), n++;\n\n o(), t() ? setTimeout(this._stabilizationBatch.bind(this), 0) : this._finalizeStabilization();\n }\n }, {\n key: \"_finalizeStabilization\",\n value: function () {\n this.body.emitter.emit(\"_allowRedraw\"), !0 === this.options.stabilization.fit && this.body.emitter.emit(\"fit\"), !0 === this.options.stabilization.onlyDynamicEdges && this._restoreFrozenNodes(), this.body.emitter.emit(\"stabilizationIterationsDone\"), this.body.emitter.emit(\"_requestRedraw\"), !0 === this.stabilized ? this._emitStabilized() : this.startSimulation(), this.ready = !0;\n }\n }, {\n key: \"_drawForces\",\n value: function (e) {\n for (var d = 0; d < this.physicsBody.physicsNodeIndices.length; d++) {\n var r = this.physicsBody.physicsNodeIndices[d],\n l = this.body.nodes[r],\n c = this.physicsBody.forces[r],\n u = 20,\n p = o(n(c.x, 2) + n(c.x, 2)),\n h = s(a(5, p), 15),\n m = util.HSVToHex((180 - 180 * s(1, a(0, .03 * p))) / 360, 1, 1),\n g = {\n x: l.x + u * c.x,\n y: l.y + u * c.y\n };\n e.lineWidth = h, e.strokeStyle = m, e.beginPath(), e.moveTo(l.x, l.y), e.lineTo(g.x, g.y), e.stroke();\n var y = t(c.y, c.x);\n e.fillStyle = m, EndPoints.draw(e, {\n type: \"arrow\",\n point: g,\n angle: y,\n length: 3 * h\n }), e.fill();\n }\n }\n }]), e;\n}(),\n NetworkUtil = function () {\n function e() {\n classCallCheck$1(this, e);\n }\n\n return createClass$1(e, null, [{\n key: \"getRange\",\n value: function (e) {\n var t = 1 < arguments.length && void 0 !== arguments[1] ? arguments[1] : [],\n o = 1e9,\n n = -1e9,\n a = 1e9,\n d = -1e9,\n s;\n if (0 < t.length) for (var r = 0; r < t.length; r++) s = e[t[r]], a > s.shape.boundingBox.left && (a = s.shape.boundingBox.left), d < s.shape.boundingBox.right && (d = s.shape.boundingBox.right), o > s.shape.boundingBox.top && (o = s.shape.boundingBox.top), n < s.shape.boundingBox.bottom && (n = s.shape.boundingBox.bottom);\n return 1e9 === a && -1e9 === d && 1e9 === o && -1e9 === n && (o = 0, n = 0, a = 0, d = 0), {\n minX: a,\n maxX: d,\n minY: o,\n maxY: n\n };\n }\n }, {\n key: \"getRangeCore\",\n value: function (e) {\n var t = 1 < arguments.length && void 0 !== arguments[1] ? arguments[1] : [],\n o = 1e9,\n n = -1e9,\n a = 1e9,\n d = -1e9,\n s;\n if (0 < t.length) for (var r = 0; r < t.length; r++) s = e[t[r]], a > s.x && (a = s.x), d < s.x && (d = s.x), o > s.y && (o = s.y), n < s.y && (n = s.y);\n return 1e9 === a && -1e9 === d && 1e9 === o && -1e9 === n && (o = 0, n = 0, a = 0, d = 0), {\n minX: a,\n maxX: d,\n minY: o,\n maxY: n\n };\n }\n }, {\n key: \"findCenter\",\n value: function (e) {\n return {\n x: .5 * (e.maxX + e.minX),\n y: .5 * (e.maxY + e.minY)\n };\n }\n }, {\n key: \"cloneOptions\",\n value: function (e, t) {\n var o = {};\n return void 0 === t || \"node\" === t ? (util.deepExtend(o, e.options, !0), o.x = e.x, o.y = e.y, o.amountOfConnections = e.edges.length) : util.deepExtend(o, e.options, !0), o;\n }\n }]), e;\n}(),\n Cluster = function (e) {\n function t(e, o, n, i, a, d) {\n var s;\n return classCallCheck$1(this, t), s = possibleConstructorReturn$1(this, getPrototypeOf$1(t).call(this, e, o, n, i, a, d)), s.isCluster = !0, s.containedNodes = {}, s.containedEdges = {}, s;\n }\n\n return inherits$1(t, e), createClass$1(t, [{\n key: \"_openChildCluster\",\n value: function (e) {\n var t = this,\n o = this.body.nodes[e];\n if (void 0 === this.containedNodes[e]) throw new Error(\"node with id: \" + e + \" not in current cluster\");\n if (!o.isCluster) throw new Error(\"node with id: \" + e + \" is not a cluster\");\n delete this.containedNodes[e], util.forEach(o.edges, function (e) {\n delete t.containedEdges[e.id];\n }), util.forEach(o.containedNodes, function (e, o) {\n t.containedNodes[o] = e;\n }), o.containedNodes = {}, util.forEach(o.containedEdges, function (e, o) {\n t.containedEdges[o] = e;\n }), o.containedEdges = {}, util.forEach(o.edges, function (e) {\n util.forEach(t.edges, function (o) {\n var n = o.clusteringEdgeReplacingIds.indexOf(e.id);\n -1 === n || (util.forEach(e.clusteringEdgeReplacingIds, function (e) {\n o.clusteringEdgeReplacingIds.push(e), t.body.edges[e].edgeReplacedById = o.id;\n }), o.clusteringEdgeReplacingIds.splice(n, 1));\n });\n }), o.edges = [];\n }\n }]), t;\n}(Node),\n ClusterEngine = function () {\n var t = Math.sqrt,\n o = Math.pow,\n n = Math.floor;\n\n function e(t) {\n var o = this;\n classCallCheck$1(this, e), this.body = t, this.clusteredNodes = {}, this.clusteredEdges = {}, this.options = {}, this.defaultOptions = {}, util.extend(this.options, this.defaultOptions), this.body.emitter.on(\"_resetData\", function () {\n o.clusteredNodes = {}, o.clusteredEdges = {};\n });\n }\n\n return createClass$1(e, [{\n key: \"clusterByHubsize\",\n value: function (e, t) {\n void 0 === e ? e = this._getHubSize() : \"object\" === _typeof_1$1(e) && (t = this._checkOptions(e), e = this._getHubSize());\n\n for (var o = [], n = 0, a; n < this.body.nodeIndices.length; n++) a = this.body.nodes[this.body.nodeIndices[n]], a.edges.length >= e && o.push(a.id);\n\n for (var d = 0; d < o.length; d++) this.clusterByConnection(o[d], t, !0);\n\n this.body.emitter.emit(\"_dataChanged\");\n }\n }, {\n key: \"cluster\",\n value: function () {\n var e = this,\n t = 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : {},\n o = !(1 < arguments.length && void 0 !== arguments[1]) || arguments[1];\n if (void 0 === t.joinCondition) throw new Error(\"Cannot call clusterByNodeData without a joinCondition function in the options.\");\n t = this._checkOptions(t);\n var n = {},\n i = {};\n util.forEach(this.body.nodes, function (o, a) {\n o.options && !0 === t.joinCondition(o.options) && (n[a] = o, util.forEach(o.edges, function (t) {\n void 0 === e.clusteredEdges[t.id] && (i[t.id] = t);\n }));\n }), this._cluster(n, i, t, o);\n }\n }, {\n key: \"clusterByEdgeCount\",\n value: function (e, t) {\n var o = this,\n n = !(2 < arguments.length && void 0 !== arguments[2]) || arguments[2];\n t = this._checkOptions(t);\n\n for (var a = [], d = {}, s = function (n) {\n var i = {},\n s = {},\n r = o.body.nodeIndices[n],\n y = o.body.nodes[r];\n\n if (void 0 === d[r]) {\n u = 0, c = [];\n\n for (var f = 0; f < y.edges.length; f++) l = y.edges[f], void 0 === o.clusteredEdges[l.id] && (l.toId !== l.fromId && u++, c.push(l));\n\n if (u === e) {\n p = function (e) {\n if (void 0 === t.joinCondition || null === t.joinCondition) return !0;\n var o = NetworkUtil.cloneOptions(e);\n return t.joinCondition(o);\n };\n\n for (var b = !0, _ = 0; _ < c.length; _++) {\n l = c[_];\n\n var v = o._getConnectedId(l, r);\n\n if (p(y)) s[l.id] = l, i[r] = y, i[v] = o.body.nodes[v], d[r] = !0;else {\n b = !1;\n break;\n }\n }\n\n if (0 < Object.keys(i).length && 0 < Object.keys(s).length && !0 === b) if (h = function () {\n for (var e = 0; e < a.length; ++e) for (var t in i) if (void 0 !== a[e].nodes[t]) return a[e];\n }, g = h(), void 0 !== g) {\n for (var k in i) void 0 === g.nodes[k] && (g.nodes[k] = i[k]);\n\n for (var m in s) void 0 === g.edges[m] && (g.edges[m] = s[m]);\n } else a.push({\n nodes: i,\n edges: s\n });\n }\n }\n }, r = 0, l, c, u; r < this.body.nodeIndices.length; r++) {\n var p, h, g;\n s(r);\n }\n\n for (var r = 0; r < a.length; r++) this._cluster(a[r].nodes, a[r].edges, t, !1);\n\n !0 === n && this.body.emitter.emit(\"_dataChanged\");\n }\n }, {\n key: \"clusterOutliers\",\n value: function (e) {\n var t = !(1 < arguments.length && void 0 !== arguments[1]) || arguments[1];\n this.clusterByEdgeCount(1, e, t);\n }\n }, {\n key: \"clusterBridges\",\n value: function (e) {\n var t = !(1 < arguments.length && void 0 !== arguments[1]) || arguments[1];\n this.clusterByEdgeCount(2, e, t);\n }\n }, {\n key: \"clusterByConnection\",\n value: function (e, t) {\n var o = !(2 < arguments.length && void 0 !== arguments[2]) || arguments[2];\n if (void 0 === e) throw new Error(\"No nodeId supplied to clusterByConnection!\");\n if (void 0 === this.body.nodes[e]) throw new Error(\"The nodeId given to clusterByConnection does not exist!\");\n var n = this.body.nodes[e];\n t = this._checkOptions(t, n), void 0 === t.clusterNodeProperties.x && (t.clusterNodeProperties.x = n.x), void 0 === t.clusterNodeProperties.y && (t.clusterNodeProperties.y = n.y), void 0 === t.clusterNodeProperties.fixed && (t.clusterNodeProperties.fixed = {}, t.clusterNodeProperties.fixed.x = n.options.fixed.x, t.clusterNodeProperties.fixed.y = n.options.fixed.y);\n var a = {},\n d = {},\n s = n.id,\n r = NetworkUtil.cloneOptions(n);\n a[s] = n;\n\n for (var l = 0, c; l < n.edges.length; l++) if (c = n.edges[l], void 0 === this.clusteredEdges[c.id]) {\n var u = this._getConnectedId(c, s);\n\n if (void 0 === this.clusteredNodes[u]) if (u === s) d[c.id] = c;else if (void 0 === t.joinCondition) d[c.id] = c, a[u] = this.body.nodes[u];else {\n var p = NetworkUtil.cloneOptions(this.body.nodes[u]);\n !0 === t.joinCondition(r, p) && (d[c.id] = c, a[u] = this.body.nodes[u]);\n }\n }\n\n var h = Object.keys(a).map(function (e) {\n return a[e].id;\n });\n\n for (m in a) if (a.hasOwnProperty(m)) for (var m = a[m], g = 0, f; g < m.edges.length; g++) f = m.edges[g], -1 < h.indexOf(this._getConnectedId(f, m.id)) && (d[f.id] = f);\n\n this._cluster(a, d, t, o);\n }\n }, {\n key: \"_createClusterEdges\",\n value: function (e, t, o, n) {\n for (var a = Object.keys(e), d = [], s = 0, r, l, c, u, p, h; s < a.length; s++) {\n l = a[s], c = e[l];\n\n for (var m = 0; m < c.edges.length; m++) r = c.edges[m], void 0 === this.clusteredEdges[r.id] && (r.toId == r.fromId ? t[r.id] = r : r.toId == l ? (u = o.id, p = r.fromId, h = p) : (u = r.toId, p = o.id, h = u), void 0 === e[h] && d.push({\n edge: r,\n fromId: p,\n toId: u\n }));\n }\n\n for (var g = [], y = function (e) {\n for (var t = 0; t < g.length; t++) {\n var o = g[t],\n n = e.fromId === o.fromId && e.toId === o.toId,\n i = e.fromId === o.toId && e.toId === o.fromId;\n if (n || i) return o;\n }\n\n return null;\n }, f = 0; f < d.length; f++) {\n var b = d[f],\n _ = b.edge,\n v = y(b);\n null === v ? (v = this._createClusteredEdge(b.fromId, b.toId, _, n), g.push(v)) : v.clusteringEdgeReplacingIds.push(_.id), this.body.edges[_.id].edgeReplacedById = v.id, this._backupEdgeOptions(_), _.setOptions({\n physics: !1\n });\n }\n }\n }, {\n key: \"_checkOptions\",\n value: function () {\n var e = 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : {};\n return void 0 === e.clusterEdgeProperties && (e.clusterEdgeProperties = {}), void 0 === e.clusterNodeProperties && (e.clusterNodeProperties = {}), e;\n }\n }, {\n key: \"_cluster\",\n value: function (e, t, o) {\n var i = !(3 < arguments.length && void 0 !== arguments[3]) || arguments[3],\n a = [];\n\n for (var d in e) e.hasOwnProperty(d) && void 0 !== this.clusteredNodes[d] && a.push(d);\n\n for (var s = 0; s < a.length; ++s) delete e[a[s]];\n\n if (0 != Object.keys(e).length && (1 != Object.keys(e).length || !0 == o.clusterNodeProperties.allowSingleNodeCluster)) {\n var r = util.deepExtend({}, o.clusterNodeProperties);\n\n if (void 0 !== o.processProperties) {\n var l = [];\n\n for (var c in e) if (e.hasOwnProperty(c)) {\n var u = NetworkUtil.cloneOptions(e[c]);\n l.push(u);\n }\n\n var p = [];\n\n for (var h in t) if (t.hasOwnProperty(h) && \"clusterEdge:\" !== h.substr(0, 12)) {\n var m = NetworkUtil.cloneOptions(t[h], \"edge\");\n p.push(m);\n }\n\n if (r = o.processProperties(r, l, p), !r) throw new Error(\"The processProperties function does not return properties!\");\n }\n\n void 0 === r.id && (r.id = \"cluster:\" + util.randomUUID());\n var g = r.id;\n void 0 === r.label && (r.label = \"cluster\");\n var y;\n void 0 === r.x && (y = this._getClusterPosition(e), r.x = y.x), void 0 === r.y && (void 0 === y && (y = this._getClusterPosition(e)), r.y = y.y), r.id = g;\n var f = this.body.functions.createNode(r, Cluster);\n f.containedNodes = e, f.containedEdges = t, f.clusterEdgeProperties = o.clusterEdgeProperties, this.body.nodes[r.id] = f, this._clusterEdges(e, t, r, o.clusterEdgeProperties), r.id = void 0, !0 === i && this.body.emitter.emit(\"_dataChanged\");\n }\n }\n }, {\n key: \"_backupEdgeOptions\",\n value: function (e) {\n void 0 === this.clusteredEdges[e.id] && (this.clusteredEdges[e.id] = {\n physics: e.options.physics\n });\n }\n }, {\n key: \"_restoreEdge\",\n value: function (e) {\n var t = this.clusteredEdges[e.id];\n void 0 !== t && (e.setOptions({\n physics: t.physics\n }), delete this.clusteredEdges[e.id]);\n }\n }, {\n key: \"isCluster\",\n value: function (e) {\n return void 0 === this.body.nodes[e] ? (console.log(\"Node does not exist.\"), !1) : !0 === this.body.nodes[e].isCluster;\n }\n }, {\n key: \"_getClusterPosition\",\n value: function (e) {\n for (var t = Object.keys(e), o = e[t[0]].x, n = e[t[0]].x, a = e[t[0]].y, d = e[t[0]].y, s = 1, r; s < t.length; s++) r = e[t[s]], o = r.x < o ? r.x : o, n = r.x > n ? r.x : n, a = r.y < a ? r.y : a, d = r.y > d ? r.y : d;\n\n return {\n x: .5 * (o + n),\n y: .5 * (a + d)\n };\n }\n }, {\n key: \"openCluster\",\n value: function (e, t) {\n var o = !(2 < arguments.length && void 0 !== arguments[2]) || arguments[2];\n if (void 0 === e) throw new Error(\"No clusterNodeId supplied to openCluster.\");\n var n = this.body.nodes[e];\n if (void 0 === n) throw new Error(\"The clusterNodeId supplied to openCluster does not exist.\");\n if (!0 !== n.isCluster || void 0 === n.containedNodes || void 0 === n.containedEdges) throw new Error(\"The node:\" + e + \" is not a valid cluster.\");\n var a = this.findNode(e),\n d = a.indexOf(e) - 1;\n\n if (0 <= d) {\n var s = a[d],\n r = this.body.nodes[s];\n return r._openChildCluster(e), delete this.body.nodes[e], void (!0 === o && this.body.emitter.emit(\"_dataChanged\"));\n }\n\n var l = n.containedNodes,\n c = n.containedEdges;\n\n if (void 0 !== t && void 0 !== t.releaseFunction && \"function\" == typeof t.releaseFunction) {\n var u = {},\n p = {\n x: n.x,\n y: n.y\n };\n\n for (var h in l) if (l.hasOwnProperty(h)) {\n var m = this.body.nodes[h];\n u[h] = {\n x: m.x,\n y: m.y\n };\n }\n\n var g = t.releaseFunction(p, u);\n\n for (var y in l) if (l.hasOwnProperty(y)) {\n var f = this.body.nodes[y];\n void 0 !== g[y] && (f.x = void 0 === g[y].x ? n.x : g[y].x, f.y = void 0 === g[y].y ? n.y : g[y].y);\n }\n } else util.forEach(l, function (e) {\n !1 === e.options.fixed.x && (e.x = n.x), !1 === e.options.fixed.y && (e.y = n.y);\n });\n\n for (var b in l) if (l.hasOwnProperty(b)) {\n var _ = this.body.nodes[b];\n _.vx = n.vx, _.vy = n.vy, _.setOptions({\n physics: !0\n }), delete this.clusteredNodes[b];\n }\n\n for (var v = [], k = 0; k < n.edges.length; k++) v.push(n.edges[k]);\n\n for (var w = 0; w < v.length; w++) {\n for (var x = v[w], S = this._getConnectedId(x, e), O = this.clusteredNodes[S], D = 0; D < x.clusteringEdgeReplacingIds.length; D++) {\n var T = x.clusteringEdgeReplacingIds[D],\n E = this.body.edges[T];\n if (void 0 !== E) if (void 0 !== O) {\n var C = this.body.nodes[O.clusterId];\n C.containedEdges[E.id] = E, delete c[E.id];\n var M = E.fromId,\n I = E.toId;\n E.toId == S ? I = O.clusterId : M = O.clusterId, this._createClusteredEdge(M, I, E, C.clusterEdgeProperties, {\n hidden: !1,\n physics: !0\n });\n } else this._restoreEdge(E);\n }\n\n x.remove();\n }\n\n for (var P in c) c.hasOwnProperty(P) && this._restoreEdge(c[P]);\n\n delete this.body.nodes[e], !0 === o && this.body.emitter.emit(\"_dataChanged\");\n }\n }, {\n key: \"getNodesInCluster\",\n value: function (e) {\n var t = [];\n\n if (!0 === this.isCluster(e)) {\n var o = this.body.nodes[e].containedNodes;\n\n for (var n in o) o.hasOwnProperty(n) && t.push(this.body.nodes[n].id);\n }\n\n return t;\n }\n }, {\n key: \"findNode\",\n value: function (e) {\n for (var t = [], o = 0, n; void 0 !== this.clusteredNodes[e] && o < 100;) {\n if (n = this.body.nodes[e], void 0 === n) return [];\n t.push(n.id), e = this.clusteredNodes[e].clusterId, o++;\n }\n\n return (n = this.body.nodes[e], void 0 === n) ? [] : (t.push(n.id), t.reverse(), t);\n }\n }, {\n key: \"updateClusteredNode\",\n value: function (e, t) {\n if (void 0 === e) throw new Error(\"No clusteredNodeId supplied to updateClusteredNode.\");\n if (void 0 === t) throw new Error(\"No newOptions supplied to updateClusteredNode.\");\n if (void 0 === this.body.nodes[e]) throw new Error(\"The clusteredNodeId supplied to updateClusteredNode does not exist.\");\n this.body.nodes[e].setOptions(t), this.body.emitter.emit(\"_dataChanged\");\n }\n }, {\n key: \"updateEdge\",\n value: function (e, t) {\n if (void 0 === e) throw new Error(\"No startEdgeId supplied to updateEdge.\");\n if (void 0 === t) throw new Error(\"No newOptions supplied to updateEdge.\");\n if (void 0 === this.body.edges[e]) throw new Error(\"The startEdgeId supplied to updateEdge does not exist.\");\n\n for (var o = this.getClusteredEdges(e), n = 0, a; n < o.length; n++) a = this.body.edges[o[n]], a.setOptions(t);\n\n this.body.emitter.emit(\"_dataChanged\");\n }\n }, {\n key: \"getClusteredEdges\",\n value: function (e) {\n for (var t = [], o = 0; void 0 !== e && void 0 !== this.body.edges[e] && o < 100;) t.push(this.body.edges[e].id), e = this.body.edges[e].edgeReplacedById, o++;\n\n return t.reverse(), t;\n }\n }, {\n key: \"getBaseEdge\",\n value: function (e) {\n return this.getBaseEdges(e)[0];\n }\n }, {\n key: \"getBaseEdges\",\n value: function (e) {\n for (var t = [e], o = [], n = [], a = 0, d; 0 < t.length && a < 100;) if (d = t.pop(), void 0 !== d) {\n var s = this.body.edges[d];\n\n if (void 0 !== s) {\n a++;\n var r = s.clusteringEdgeReplacingIds;\n if (void 0 === r) n.push(d);else for (var l = 0, c; l < r.length; ++l) (c = r[l], -1 === t.indexOf(r) && -1 === o.indexOf(r)) && t.push(c);\n o.push(d);\n }\n }\n\n return n;\n }\n }, {\n key: \"_getConnectedId\",\n value: function (e, t) {\n return e.toId == t ? e.fromId == t ? e.fromId : e.fromId : e.toId;\n }\n }, {\n key: \"_getHubSize\",\n value: function () {\n for (var e = 0, a = 0, d = 0, s = 0, r = 0, l; r < this.body.nodeIndices.length; r++) l = this.body.nodes[this.body.nodeIndices[r]], l.edges.length > s && (s = l.edges.length), e += l.edges.length, a += o(l.edges.length, 2), d += 1;\n\n e /= d, a /= d;\n var c = a - o(e, 2),\n u = t(c),\n p = n(e + 2 * u);\n return p > s && (p = s), p;\n }\n }, {\n key: \"_createClusteredEdge\",\n value: function (e, t, o, n, i) {\n var a = NetworkUtil.cloneOptions(o, \"edge\");\n util.deepExtend(a, n), a.from = e, a.to = t, a.id = \"clusterEdge:\" + util.randomUUID(), void 0 !== i && util.deepExtend(a, i);\n var d = this.body.functions.createEdge(a);\n return d.clusteringEdgeReplacingIds = [o.id], d.connect(), this.body.edges[d.id] = d, d;\n }\n }, {\n key: \"_clusterEdges\",\n value: function (e, t, o, n) {\n if (t instanceof Edge) {\n var i = t,\n a = {};\n a[i.id] = i, t = a;\n }\n\n if (e instanceof Node) {\n var d = e,\n s = {};\n s[d.id] = d, e = s;\n }\n\n if (void 0 === o || null === o) throw new Error(\"_clusterEdges: parameter clusterNode required\");\n\n for (var r in void 0 === n && (n = o.clusterEdgeProperties), this._createClusterEdges(e, t, o, n), t) if (t.hasOwnProperty(r) && void 0 !== this.body.edges[r]) {\n var l = this.body.edges[r];\n this._backupEdgeOptions(l), l.setOptions({\n physics: !1\n });\n }\n\n for (var c in e) e.hasOwnProperty(c) && (this.clusteredNodes[c] = {\n clusterId: o.id,\n node: this.body.nodes[c]\n }, this.body.nodes[c].setOptions({\n physics: !1\n }));\n }\n }, {\n key: \"_getClusterNodeForNode\",\n value: function (e) {\n if (void 0 !== e) {\n var t = this.clusteredNodes[e];\n\n if (void 0 !== t) {\n var o = t.clusterId;\n return void 0 === o ? void 0 : this.body.nodes[o];\n }\n }\n }\n }, {\n key: \"_filter\",\n value: function (e, t) {\n var o = [];\n return util.forEach(e, function (e) {\n t(e) && o.push(e);\n }), o;\n }\n }, {\n key: \"_updateState\",\n value: function () {\n var e = this,\n t = [],\n o = {},\n i = function (t) {\n util.forEach(e.body.nodes, function (e) {\n !0 === e.isCluster && t(e);\n });\n },\n a;\n\n for (a in this.clusteredNodes) if (this.clusteredNodes.hasOwnProperty(a)) {\n var d = this.body.nodes[a];\n void 0 === d && t.push(a);\n }\n\n i(function (e) {\n for (var o = 0; o < t.length; o++) delete e.containedNodes[t[o]];\n });\n\n for (var s = 0; s < t.length; s++) delete this.clusteredNodes[t[s]];\n\n util.forEach(this.clusteredEdges, function (t) {\n var n = e.body.edges[t];\n void 0 !== n && n.endPointsValid() || (o[t] = t);\n }), i(function (e) {\n util.forEach(e.containedEdges, function (e, t) {\n e.endPointsValid() || o[t] || (o[t] = t);\n });\n }), util.forEach(this.body.edges, function (t, n) {\n var i = !0,\n a = t.clusteringEdgeReplacingIds;\n\n if (void 0 !== a) {\n var d = 0;\n util.forEach(a, function (t) {\n var o = e.body.edges[t];\n void 0 !== o && o.endPointsValid() && (d += 1);\n }), i = 0 < d;\n }\n\n t.endPointsValid() && i || (o[n] = n);\n }), i(function (t) {\n util.forEach(o, function (n) {\n delete t.containedEdges[n], util.forEach(t.edges, function (i, a) {\n return i.id === n ? void (t.edges[a] = null) : void (i.clusteringEdgeReplacingIds = e._filter(i.clusteringEdgeReplacingIds, function (e) {\n return !o[e];\n }));\n }), t.edges = e._filter(t.edges, function (e) {\n return null !== e;\n });\n });\n }), util.forEach(o, function (t) {\n delete e.clusteredEdges[t];\n }), util.forEach(o, function (t) {\n delete e.body.edges[t];\n });\n var r = Object.keys(this.body.edges);\n util.forEach(r, function (t) {\n var o = e.body.edges[t],\n n = e._isClusteredNode(o.fromId) || e._isClusteredNode(o.toId);\n\n if (n !== e._isClusteredEdge(o.id)) if (n) {\n var i = e._getClusterNodeForNode(o.fromId);\n\n void 0 !== i && e._clusterEdges(e.body.nodes[o.fromId], o, i);\n\n var a = e._getClusterNodeForNode(o.toId);\n\n void 0 !== a && e._clusterEdges(e.body.nodes[o.toId], o, a);\n } else delete e._clusterEdges[t], e._restoreEdge(o);\n });\n\n for (var l = !1, c = !0, u = function () {\n var t = [];\n i(function (e) {\n var o = Object.keys(e.containedNodes).length,\n n = !0 === e.options.allowSingleNodeCluster;\n (n && 1 > o || !n && 2 > o) && t.push(e.id);\n });\n\n for (var o = 0; o < t.length; ++o) e.openCluster(t[o], {}, !1);\n\n c = 0 < t.length, l = l || c;\n }; c;) u();\n\n l && this._updateState();\n }\n }, {\n key: \"_isClusteredNode\",\n value: function (e) {\n return void 0 !== this.clusteredNodes[e];\n }\n }, {\n key: \"_isClusteredEdge\",\n value: function (e) {\n return void 0 !== this.clusteredEdges[e];\n }\n }]), e;\n}(),\n allOptions;\n\nfunction _initRequestAnimationFrame() {\n var e;\n window !== void 0 && (e = window.requestAnimationFrame || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame || window.msRequestAnimationFrame), window.requestAnimationFrame = void 0 === e ? function (e) {\n e();\n } : e;\n}\n\nvar CanvasRenderer = function () {\n function e(t, o) {\n classCallCheck$1(this, e), _initRequestAnimationFrame(), this.body = t, this.canvas = o, this.redrawRequested = !1, this.renderTimer = void 0, this.requiresTimeout = !0, this.renderingActive = !1, this.renderRequests = 0, this.allowRedraw = !0, this.dragging = !1, this.zooming = !1, this.options = {}, this.defaultOptions = {\n hideEdgesOnDrag: !1,\n hideEdgesOnZoom: !1,\n hideNodesOnDrag: !1\n }, util.extend(this.options, this.defaultOptions), this._determineBrowserMethod(), this.bindEventListeners();\n }\n\n return createClass$1(e, [{\n key: \"bindEventListeners\",\n value: function () {\n var e = this;\n this.body.emitter.on(\"dragStart\", function () {\n e.dragging = !0;\n }), this.body.emitter.on(\"dragEnd\", function () {\n e.dragging = !1;\n }), this.body.emitter.on(\"zoom\", function () {\n e.zooming = !0, window.clearTimeout(e.zoomTimeoutId), e.zoomTimeoutId = window.setTimeout(function () {\n e.zooming = !1, e._requestRedraw.bind(e)();\n }, 250);\n }), this.body.emitter.on(\"_resizeNodes\", function () {\n e._resizeNodes();\n }), this.body.emitter.on(\"_redraw\", function () {\n !1 === e.renderingActive && e._redraw();\n }), this.body.emitter.on(\"_blockRedraw\", function () {\n e.allowRedraw = !1;\n }), this.body.emitter.on(\"_allowRedraw\", function () {\n e.allowRedraw = !0, e.redrawRequested = !1;\n }), this.body.emitter.on(\"_requestRedraw\", this._requestRedraw.bind(this)), this.body.emitter.on(\"_startRendering\", function () {\n e.renderRequests += 1, e.renderingActive = !0, e._startRendering();\n }), this.body.emitter.on(\"_stopRendering\", function () {\n e.renderRequests -= 1, e.renderingActive = 0 < e.renderRequests, e.renderTimer = void 0;\n }), this.body.emitter.on(\"destroy\", function () {\n e.renderRequests = 0, e.allowRedraw = !1, e.renderingActive = !1, !0 === e.requiresTimeout ? clearTimeout(e.renderTimer) : window.cancelAnimationFrame(e.renderTimer), e.body.emitter.off();\n });\n }\n }, {\n key: \"setOptions\",\n value: function (e) {\n if (void 0 !== e) {\n util.selectiveDeepExtend([\"hideEdgesOnDrag\", \"hideEdgesOnZoom\", \"hideNodesOnDrag\"], this.options, e);\n }\n }\n }, {\n key: \"_requestNextFrame\",\n value: function (e, t) {\n if (\"undefined\" != typeof window) {\n var o = window,\n n;\n return !0 === this.requiresTimeout ? n = o.setTimeout(e, t) : o.requestAnimationFrame && (n = o.requestAnimationFrame(e)), n;\n }\n }\n }, {\n key: \"_startRendering\",\n value: function () {\n !0 === this.renderingActive && void 0 === this.renderTimer && (this.renderTimer = this._requestNextFrame(this._renderStep.bind(this), this.simulationInterval));\n }\n }, {\n key: \"_renderStep\",\n value: function () {\n !0 === this.renderingActive && (this.renderTimer = void 0, !0 === this.requiresTimeout && this._startRendering(), this._redraw(), !1 === this.requiresTimeout && this._startRendering());\n }\n }, {\n key: \"redraw\",\n value: function () {\n this.body.emitter.emit(\"setSize\"), this._redraw();\n }\n }, {\n key: \"_requestRedraw\",\n value: function () {\n var e = this;\n !0 !== this.redrawRequested && !1 === this.renderingActive && !0 === this.allowRedraw && (this.redrawRequested = !0, this._requestNextFrame(function () {\n e._redraw(!1);\n }, 0));\n }\n }, {\n key: \"_redraw\",\n value: function () {\n var e = !!(0 < arguments.length && void 0 !== arguments[0]) && arguments[0];\n\n if (!0 === this.allowRedraw) {\n this.body.emitter.emit(\"initRedraw\"), this.redrawRequested = !1, (0 === this.canvas.frame.canvas.width || 0 === this.canvas.frame.canvas.height) && this.canvas.setSize(), this.canvas.setTransform();\n var t = this.canvas.getContext(),\n o = this.canvas.frame.canvas.clientWidth,\n n = this.canvas.frame.canvas.clientHeight;\n if (t.clearRect(0, 0, o, n), 0 === this.canvas.frame.clientWidth) return;\n t.save(), t.translate(this.body.view.translation.x, this.body.view.translation.y), t.scale(this.body.view.scale, this.body.view.scale), t.beginPath(), this.body.emitter.emit(\"beforeDrawing\", t), t.closePath(), !1 === e && (!1 === this.dragging || !0 === this.dragging && !1 === this.options.hideEdgesOnDrag) && (!1 === this.zooming || !0 === this.zooming && !1 === this.options.hideEdgesOnZoom) && this._drawEdges(t), (!1 === this.dragging || !0 === this.dragging && !1 === this.options.hideNodesOnDrag) && this._drawNodes(t, e), t.beginPath(), this.body.emitter.emit(\"afterDrawing\", t), t.closePath(), t.restore(), !0 === e && t.clearRect(0, 0, o, n);\n }\n }\n }, {\n key: \"_resizeNodes\",\n value: function () {\n this.canvas.setTransform();\n var e = this.canvas.getContext();\n e.save(), e.translate(this.body.view.translation.x, this.body.view.translation.y), e.scale(this.body.view.scale, this.body.view.scale);\n var t = this.body.nodes,\n o;\n\n for (var n in t) t.hasOwnProperty(n) && (o = t[n], o.resize(e), o.updateBoundingBox(e, o.selected));\n\n e.restore();\n }\n }, {\n key: \"_drawNodes\",\n value: function (e) {\n for (var t = !!(1 < arguments.length && void 0 !== arguments[1]) && arguments[1], o = this.body.nodes, n = this.body.nodeIndices, a = [], d = 20, s = this.canvas.DOMtoCanvas({\n x: -d,\n y: -d\n }), r = this.canvas.DOMtoCanvas({\n x: this.canvas.frame.canvas.clientWidth + d,\n y: this.canvas.frame.canvas.clientHeight + d\n }), l = {\n top: s.y,\n left: s.x,\n bottom: r.y,\n right: r.x\n }, c = 0, u; c < n.length; c++) u = o[n[c]], u.isSelected() ? a.push(n[c]) : !0 === t ? u.draw(e) : !0 === u.isBoundingBoxOverlappingWith(l) ? u.draw(e) : u.updateBoundingBox(e, u.selected);\n\n for (var p = 0; p < a.length; p++) u = o[a[p]], u.draw(e);\n }\n }, {\n key: \"_drawEdges\",\n value: function (e) {\n for (var t = this.body.edges, o = this.body.edgeIndices, n = 0, a; n < o.length; n++) a = t[o[n]], !0 === a.connected && a.draw(e);\n }\n }, {\n key: \"_determineBrowserMethod\",\n value: function () {\n if (\"undefined\" != typeof window) {\n var e = navigator.userAgent.toLowerCase();\n this.requiresTimeout = !1, -1 == e.indexOf(\"msie 9.0\") ? -1 != e.indexOf(\"safari\") && -1 >= e.indexOf(\"chrome\") && (this.requiresTimeout = !0) : this.requiresTimeout = !0;\n } else this.requiresTimeout = !0;\n }\n }]), e;\n}(),\n hammerUtil = createCommonjsModule$2(function (e, t) {\n t.onTouch = function (e, t) {\n t.inputHandler = function (e) {\n e.isFirst && t(e);\n }, e.on(\"hammer.input\", t.inputHandler);\n }, t.onRelease = function (e, t) {\n return t.inputHandler = function (e) {\n e.isFinal && t(e);\n }, e.on(\"hammer.input\", t.inputHandler);\n }, t.offTouch = function (e, t) {\n e.off(\"hammer.input\", t.inputHandler);\n }, t.offRelease = t.offTouch, t.disablePreventDefaultVertically = function (e) {\n return e.getTouchAction = function () {\n return [\"pan-y\"];\n }, e;\n };\n}),\n hammerUtil_1 = hammerUtil.onTouch,\n hammerUtil_2 = hammerUtil.onRelease,\n hammerUtil_3 = hammerUtil.offTouch,\n hammerUtil_4 = hammerUtil.offRelease,\n hammerUtil_5 = hammerUtil.disablePreventDefaultVertically,\n Canvas = function () {\n var t = Math.round;\n\n function e(t) {\n classCallCheck$1(this, e), this.body = t, this.pixelRatio = 1, this.resizeTimer = void 0, this.resizeFunction = this._onResize.bind(this), this.cameraState = {}, this.initialized = !1, this.canvasViewCenter = {}, this.options = {}, this.defaultOptions = {\n autoResize: !0,\n height: \"100%\",\n width: \"100%\"\n }, util.extend(this.options, this.defaultOptions), this.bindEventListeners();\n }\n\n return createClass$1(e, [{\n key: \"bindEventListeners\",\n value: function () {\n var e = this;\n this.body.emitter.once(\"resize\", function (t) {\n 0 !== t.width && (e.body.view.translation.x = .5 * t.width), 0 !== t.height && (e.body.view.translation.y = .5 * t.height);\n }), this.body.emitter.on(\"setSize\", this.setSize.bind(this)), this.body.emitter.on(\"destroy\", function () {\n e.hammerFrame.destroy(), e.hammer.destroy(), e._cleanUp();\n });\n }\n }, {\n key: \"setOptions\",\n value: function (e) {\n var t = this;\n\n if (void 0 !== e) {\n util.selectiveDeepExtend([\"width\", \"height\", \"autoResize\"], this.options, e);\n }\n\n !0 === this.options.autoResize && (this._cleanUp(), this.resizeTimer = setInterval(function () {\n var e = t.setSize();\n !0 === e && t.body.emitter.emit(\"_requestRedraw\");\n }, 1e3), this.resizeFunction = this._onResize.bind(this), util.addEventListener(window, \"resize\", this.resizeFunction));\n }\n }, {\n key: \"_cleanUp\",\n value: function () {\n void 0 !== this.resizeTimer && clearInterval(this.resizeTimer), util.removeEventListener(window, \"resize\", this.resizeFunction), this.resizeFunction = void 0;\n }\n }, {\n key: \"_onResize\",\n value: function () {\n this.setSize(), this.body.emitter.emit(\"_redraw\");\n }\n }, {\n key: \"_getCameraState\",\n value: function () {\n var e = 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : this.pixelRatio;\n !0 === this.initialized && (this.cameraState.previousWidth = this.frame.canvas.width / e, this.cameraState.previousHeight = this.frame.canvas.height / e, this.cameraState.scale = this.body.view.scale, this.cameraState.position = this.DOMtoCanvas({\n x: .5 * this.frame.canvas.width / e,\n y: .5 * this.frame.canvas.height / e\n }));\n }\n }, {\n key: \"_setCameraState\",\n value: function () {\n if (void 0 !== this.cameraState.scale && 0 !== this.frame.canvas.clientWidth && 0 !== this.frame.canvas.clientHeight && 0 !== this.pixelRatio && 0 < this.cameraState.previousWidth) {\n var e = this.frame.canvas.width / this.pixelRatio / this.cameraState.previousWidth,\n t = this.frame.canvas.height / this.pixelRatio / this.cameraState.previousHeight,\n o = this.cameraState.scale;\n 1 != e && 1 != t ? o = .5 * this.cameraState.scale * (e + t) : 1 == e ? 1 != t && (o = this.cameraState.scale * t) : o = this.cameraState.scale * e, this.body.view.scale = o;\n var n = this.DOMtoCanvas({\n x: .5 * this.frame.canvas.clientWidth,\n y: .5 * this.frame.canvas.clientHeight\n }),\n i = {\n x: n.x - this.cameraState.position.x,\n y: n.y - this.cameraState.position.y\n };\n this.body.view.translation.x += i.x * this.body.view.scale, this.body.view.translation.y += i.y * this.body.view.scale;\n }\n }\n }, {\n key: \"_prepareValue\",\n value: function (e) {\n if (\"number\" == typeof e) return e + \"px\";\n\n if (\"string\" == typeof e) {\n if (-1 !== e.indexOf(\"%\") || -1 !== e.indexOf(\"px\")) return e;\n if (-1 === e.indexOf(\"%\")) return e + \"px\";\n }\n\n throw new Error(\"Could not use the value supplied for width or height:\" + e);\n }\n }, {\n key: \"_create\",\n value: function () {\n for (; this.body.container.hasChildNodes();) this.body.container.removeChild(this.body.container.firstChild);\n\n if (this.frame = document.createElement(\"div\"), this.frame.className = \"vis-network\", this.frame.style.position = \"relative\", this.frame.style.overflow = \"hidden\", this.frame.tabIndex = 900, this.frame.canvas = document.createElement(\"canvas\"), this.frame.canvas.style.position = \"relative\", this.frame.appendChild(this.frame.canvas), !this.frame.canvas.getContext) {\n var e = document.createElement(\"DIV\");\n e.style.color = \"red\", e.style.fontWeight = \"bold\", e.style.padding = \"10px\", e.innerHTML = \"Error: your browser does not support HTML canvas\", this.frame.canvas.appendChild(e);\n } else this._setPixelRatio(), this.setTransform();\n\n this.body.container.appendChild(this.frame), this.body.view.scale = 1, this.body.view.translation = {\n x: .5 * this.frame.canvas.clientWidth,\n y: .5 * this.frame.canvas.clientHeight\n }, this._bindHammer();\n }\n }, {\n key: \"_bindHammer\",\n value: function () {\n var e = this;\n void 0 !== this.hammer && this.hammer.destroy(), this.drag = {}, this.pinch = {}, this.hammer = new hammer(this.frame.canvas), this.hammer.get(\"pinch\").set({\n enable: !0\n }), this.hammer.get(\"pan\").set({\n threshold: 5,\n direction: hammer.DIRECTION_ALL\n }), hammerUtil.onTouch(this.hammer, function (t) {\n e.body.eventListeners.onTouch(t);\n }), this.hammer.on(\"tap\", function (t) {\n e.body.eventListeners.onTap(t);\n }), this.hammer.on(\"doubletap\", function (t) {\n e.body.eventListeners.onDoubleTap(t);\n }), this.hammer.on(\"press\", function (t) {\n e.body.eventListeners.onHold(t);\n }), this.hammer.on(\"panstart\", function (t) {\n e.body.eventListeners.onDragStart(t);\n }), this.hammer.on(\"panmove\", function (t) {\n e.body.eventListeners.onDrag(t);\n }), this.hammer.on(\"panend\", function (t) {\n e.body.eventListeners.onDragEnd(t);\n }), this.hammer.on(\"pinch\", function (t) {\n e.body.eventListeners.onPinch(t);\n }), this.frame.canvas.addEventListener(\"mousewheel\", function (t) {\n e.body.eventListeners.onMouseWheel(t);\n }), this.frame.canvas.addEventListener(\"DOMMouseScroll\", function (t) {\n e.body.eventListeners.onMouseWheel(t);\n }), this.frame.canvas.addEventListener(\"mousemove\", function (t) {\n e.body.eventListeners.onMouseMove(t);\n }), this.frame.canvas.addEventListener(\"contextmenu\", function (t) {\n e.body.eventListeners.onContext(t);\n }), this.hammerFrame = new hammer(this.frame), hammerUtil.onRelease(this.hammerFrame, function (t) {\n e.body.eventListeners.onRelease(t);\n });\n }\n }, {\n key: \"setSize\",\n value: function () {\n var e = 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : this.options.width,\n o = 1 < arguments.length && void 0 !== arguments[1] ? arguments[1] : this.options.height;\n e = this._prepareValue(e), o = this._prepareValue(o);\n var n = !1,\n i = this.frame.canvas.width,\n a = this.frame.canvas.height,\n d = this.pixelRatio;\n if (this._setPixelRatio(), e != this.options.width || o != this.options.height || this.frame.style.width != e || this.frame.style.height != o) this._getCameraState(d), this.frame.style.width = e, this.frame.style.height = o, this.frame.canvas.style.width = \"100%\", this.frame.canvas.style.height = \"100%\", this.frame.canvas.width = t(this.frame.canvas.clientWidth * this.pixelRatio), this.frame.canvas.height = t(this.frame.canvas.clientHeight * this.pixelRatio), this.options.width = e, this.options.height = o, this.canvasViewCenter = {\n x: .5 * this.frame.clientWidth,\n y: .5 * this.frame.clientHeight\n }, n = !0;else {\n var s = t(this.frame.canvas.clientWidth * this.pixelRatio),\n r = t(this.frame.canvas.clientHeight * this.pixelRatio);\n (this.frame.canvas.width !== s || this.frame.canvas.height !== r) && this._getCameraState(d), this.frame.canvas.width !== s && (this.frame.canvas.width = s, n = !0), this.frame.canvas.height !== r && (this.frame.canvas.height = r, n = !0);\n }\n return !0 == n && (this.body.emitter.emit(\"resize\", {\n width: t(this.frame.canvas.width / this.pixelRatio),\n height: t(this.frame.canvas.height / this.pixelRatio),\n oldWidth: t(i / this.pixelRatio),\n oldHeight: t(a / this.pixelRatio)\n }), this._setCameraState()), this.initialized = !0, n;\n }\n }, {\n key: \"getContext\",\n value: function () {\n return this.frame.canvas.getContext(\"2d\");\n }\n }, {\n key: \"_determinePixelRatio\",\n value: function () {\n var e = this.getContext();\n if (void 0 === e) throw new Error(\"Could not get canvax context\");\n var t = 1;\n \"undefined\" != typeof window && (t = window.devicePixelRatio || 1);\n var o = e.webkitBackingStorePixelRatio || e.mozBackingStorePixelRatio || e.msBackingStorePixelRatio || e.oBackingStorePixelRatio || e.backingStorePixelRatio || 1;\n return t / o;\n }\n }, {\n key: \"_setPixelRatio\",\n value: function () {\n this.pixelRatio = this._determinePixelRatio();\n }\n }, {\n key: \"setTransform\",\n value: function () {\n var e = this.getContext();\n if (void 0 === e) throw new Error(\"Could not get canvax context\");\n e.setTransform(this.pixelRatio, 0, 0, this.pixelRatio, 0, 0);\n }\n }, {\n key: \"_XconvertDOMtoCanvas\",\n value: function (e) {\n return (e - this.body.view.translation.x) / this.body.view.scale;\n }\n }, {\n key: \"_XconvertCanvasToDOM\",\n value: function (e) {\n return e * this.body.view.scale + this.body.view.translation.x;\n }\n }, {\n key: \"_YconvertDOMtoCanvas\",\n value: function (e) {\n return (e - this.body.view.translation.y) / this.body.view.scale;\n }\n }, {\n key: \"_YconvertCanvasToDOM\",\n value: function (e) {\n return e * this.body.view.scale + this.body.view.translation.y;\n }\n }, {\n key: \"canvasToDOM\",\n value: function (e) {\n return {\n x: this._XconvertCanvasToDOM(e.x),\n y: this._YconvertCanvasToDOM(e.y)\n };\n }\n }, {\n key: \"DOMtoCanvas\",\n value: function (e) {\n return {\n x: this._XconvertDOMtoCanvas(e.x),\n y: this._YconvertDOMtoCanvas(e.y)\n };\n }\n }]), e;\n}(),\n View = function () {\n var t = Math.abs,\n o = Math.min;\n\n function e(t, o) {\n var n = this;\n classCallCheck$1(this, e), this.body = t, this.canvas = o, this.animationSpeed = 1 / this.renderRefreshRate, this.animationEasingFunction = \"easeInOutQuint\", this.easingTime = 0, this.sourceScale = 0, this.targetScale = 0, this.sourceTranslation = 0, this.targetTranslation = 0, this.lockedOnNodeId = void 0, this.lockedOnNodeOffset = void 0, this.touchTime = 0, this.viewFunction = void 0, this.body.emitter.on(\"fit\", this.fit.bind(this)), this.body.emitter.on(\"animationFinished\", function () {\n n.body.emitter.emit(\"_stopRendering\");\n }), this.body.emitter.on(\"unlockNode\", this.releaseNode.bind(this));\n }\n\n return createClass$1(e, [{\n key: \"setOptions\",\n value: function () {\n var e = 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : {};\n this.options = e;\n }\n }, {\n key: \"fit\",\n value: function () {\n var e = 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : {\n nodes: []\n },\n n = !!(1 < arguments.length && void 0 !== arguments[1]) && arguments[1],\n i,\n a;\n\n if (e = Object.assign({}, e), (void 0 === e.nodes || 0 === e.nodes.length) && (e.nodes = this.body.nodeIndices), !0 === n) {\n var d = 0;\n\n for (var s in this.body.nodes) if (this.body.nodes.hasOwnProperty(s)) {\n var r = this.body.nodes[s];\n !0 === r.predefinedPosition && (d += 1);\n }\n\n if (d > .5 * this.body.nodeIndices.length) return void this.fit(e, !1);\n i = NetworkUtil.getRange(this.body.nodes, e.nodes);\n var l = this.body.nodeIndices.length;\n a = 12.662 / (l + 7.4147) + .0964822;\n var c = o(this.canvas.frame.canvas.clientWidth / 600, this.canvas.frame.canvas.clientHeight / 600);\n a *= c;\n } else {\n this.body.emitter.emit(\"_resizeNodes\"), i = NetworkUtil.getRange(this.body.nodes, e.nodes);\n var u = 1.1 * t(i.maxX - i.minX),\n p = 1.1 * t(i.maxY - i.minY),\n h = this.canvas.frame.canvas.clientWidth / u,\n m = this.canvas.frame.canvas.clientHeight / p;\n a = h <= m ? h : m;\n }\n\n 1 < a ? a = 1 : 0 === a && (a = 1);\n var g = NetworkUtil.findCenter(i),\n y = {\n position: g,\n scale: a,\n animation: e.animation\n };\n this.moveTo(y);\n }\n }, {\n key: \"focus\",\n value: function (e) {\n var t = 1 < arguments.length && void 0 !== arguments[1] ? arguments[1] : {};\n\n if (void 0 !== this.body.nodes[e]) {\n var o = {\n x: this.body.nodes[e].x,\n y: this.body.nodes[e].y\n };\n t.position = o, t.lockedOnNode = e, this.moveTo(t);\n } else console.log(\"Node: \" + e + \" cannot be found.\");\n }\n }, {\n key: \"moveTo\",\n value: function (e) {\n var t = Number.isFinite;\n if (void 0 === e) return void (e = {});\n\n if (null != e.offset) {\n if (null == e.offset.x) e.offset.x = 0;else if (e.offset.x = +e.offset.x, !t(e.offset.x)) throw new TypeError(\"The option \\\"offset.x\\\" has to be a finite number.\");\n if (null == e.offset.y) e.offset.x = 0;else if (e.offset.y = +e.offset.y, !t(e.offset.y)) throw new TypeError(\"The option \\\"offset.y\\\" has to be a finite number.\");\n } else e.offset = {\n x: 0,\n y: 0\n };\n\n if (null != e.position) {\n if (null == e.position.x) e.position.x = 0;else if (e.position.x = +e.position.x, !t(e.position.x)) throw new TypeError(\"The option \\\"position.x\\\" has to be a finite number.\");\n if (null == e.position.y) e.position.x = 0;else if (e.position.y = +e.position.y, !t(e.position.y)) throw new TypeError(\"The option \\\"position.y\\\" has to be a finite number.\");\n } else e.position = this.getViewPosition();\n\n if (null == e.scale) e.scale = this.body.view.scale;else if (e.scale = +e.scale, !(0 < e.scale)) throw new TypeError(\"The option \\\"scale\\\" has to be a number greater than zero.\");\n void 0 === e.animation && (e.animation = {\n duration: 0\n }), !1 === e.animation && (e.animation = {\n duration: 0\n }), !0 === e.animation && (e.animation = {}), void 0 === e.animation.duration && (e.animation.duration = 1e3), void 0 === e.animation.easingFunction && (e.animation.easingFunction = \"easeInOutQuad\"), this.animateView(e);\n }\n }, {\n key: \"animateView\",\n value: function (e) {\n if (void 0 !== e) {\n this.animationEasingFunction = e.animation.easingFunction, this.releaseNode(), !0 === e.locked && (this.lockedOnNodeId = e.lockedOnNode, this.lockedOnNodeOffset = e.offset), 0 != this.easingTime && this._transitionRedraw(!0), this.sourceScale = this.body.view.scale, this.sourceTranslation = this.body.view.translation, this.targetScale = e.scale, this.body.view.scale = this.targetScale;\n var t = this.canvas.DOMtoCanvas({\n x: .5 * this.canvas.frame.canvas.clientWidth,\n y: .5 * this.canvas.frame.canvas.clientHeight\n }),\n o = {\n x: t.x - e.position.x,\n y: t.y - e.position.y\n };\n this.targetTranslation = {\n x: this.sourceTranslation.x + o.x * this.targetScale + e.offset.x,\n y: this.sourceTranslation.y + o.y * this.targetScale + e.offset.y\n }, 0 === e.animation.duration ? null == this.lockedOnNodeId ? (this.body.view.scale = this.targetScale, this.body.view.translation = this.targetTranslation, this.body.emitter.emit(\"_requestRedraw\")) : (this.viewFunction = this._lockedRedraw.bind(this), this.body.emitter.on(\"initRedraw\", this.viewFunction)) : (this.animationSpeed = 1 / (.001 * (60 * e.animation.duration)) || 1 / 60, this.animationEasingFunction = e.animation.easingFunction, this.viewFunction = this._transitionRedraw.bind(this), this.body.emitter.on(\"initRedraw\", this.viewFunction), this.body.emitter.emit(\"_startRendering\"));\n }\n }\n }, {\n key: \"_lockedRedraw\",\n value: function () {\n var e = {\n x: this.body.nodes[this.lockedOnNodeId].x,\n y: this.body.nodes[this.lockedOnNodeId].y\n },\n t = this.canvas.DOMtoCanvas({\n x: .5 * this.canvas.frame.canvas.clientWidth,\n y: .5 * this.canvas.frame.canvas.clientHeight\n }),\n o = {\n x: t.x - e.x,\n y: t.y - e.y\n },\n n = this.body.view.translation,\n i = {\n x: n.x + o.x * this.body.view.scale + this.lockedOnNodeOffset.x,\n y: n.y + o.y * this.body.view.scale + this.lockedOnNodeOffset.y\n };\n this.body.view.translation = i;\n }\n }, {\n key: \"releaseNode\",\n value: function () {\n void 0 !== this.lockedOnNodeId && void 0 !== this.viewFunction && (this.body.emitter.off(\"initRedraw\", this.viewFunction), this.lockedOnNodeId = void 0, this.lockedOnNodeOffset = void 0);\n }\n }, {\n key: \"_transitionRedraw\",\n value: function () {\n var e = !!(0 < arguments.length && void 0 !== arguments[0]) && arguments[0];\n this.easingTime += this.animationSpeed, this.easingTime = !0 === e ? 1 : this.easingTime;\n var t = util.easingFunctions[this.animationEasingFunction](this.easingTime);\n this.body.view.scale = this.sourceScale + (this.targetScale - this.sourceScale) * t, this.body.view.translation = {\n x: this.sourceTranslation.x + (this.targetTranslation.x - this.sourceTranslation.x) * t,\n y: this.sourceTranslation.y + (this.targetTranslation.y - this.sourceTranslation.y) * t\n }, 1 <= this.easingTime && (this.body.emitter.off(\"initRedraw\", this.viewFunction), this.easingTime = 0, null != this.lockedOnNodeId && (this.viewFunction = this._lockedRedraw.bind(this), this.body.emitter.on(\"initRedraw\", this.viewFunction)), this.body.emitter.emit(\"animationFinished\"));\n }\n }, {\n key: \"getScale\",\n value: function () {\n return this.body.view.scale;\n }\n }, {\n key: \"getViewPosition\",\n value: function () {\n return this.canvas.DOMtoCanvas({\n x: .5 * this.canvas.frame.canvas.clientWidth,\n y: .5 * this.canvas.frame.canvas.clientHeight\n });\n }\n }]), e;\n}(),\n NavigationHandler = function () {\n function e(t, o) {\n var n = this;\n classCallCheck$1(this, e), this.body = t, this.canvas = o, this.iconsCreated = !1, this.navigationHammers = [], this.boundFunctions = {}, this.touchTime = 0, this.activated = !1, this.body.emitter.on(\"activate\", function () {\n n.activated = !0, n.configureKeyboardBindings();\n }), this.body.emitter.on(\"deactivate\", function () {\n n.activated = !1, n.configureKeyboardBindings();\n }), this.body.emitter.on(\"destroy\", function () {\n void 0 !== n.keycharm && n.keycharm.destroy();\n }), this.options = {};\n }\n\n return createClass$1(e, [{\n key: \"setOptions\",\n value: function (e) {\n void 0 !== e && (this.options = e, this.create());\n }\n }, {\n key: \"create\",\n value: function () {\n !0 === this.options.navigationButtons ? !1 === this.iconsCreated && this.loadNavigationElements() : !0 === this.iconsCreated && this.cleanNavigation(), this.configureKeyboardBindings();\n }\n }, {\n key: \"cleanNavigation\",\n value: function () {\n if (0 != this.navigationHammers.length) {\n for (var e = 0; e < this.navigationHammers.length; e++) this.navigationHammers[e].destroy();\n\n this.navigationHammers = [];\n }\n\n this.navigationDOM && this.navigationDOM.wrapper && this.navigationDOM.wrapper.parentNode && this.navigationDOM.wrapper.parentNode.removeChild(this.navigationDOM.wrapper), this.iconsCreated = !1;\n }\n }, {\n key: \"loadNavigationElements\",\n value: function () {\n var e = this;\n this.cleanNavigation(), this.navigationDOM = {};\n var t = [\"up\", \"down\", \"left\", \"right\", \"zoomIn\", \"zoomOut\", \"zoomExtends\"],\n o = [\"_moveUp\", \"_moveDown\", \"_moveLeft\", \"_moveRight\", \"_zoomIn\", \"_zoomOut\", \"_fit\"];\n this.navigationDOM.wrapper = document.createElement(\"div\"), this.navigationDOM.wrapper.className = \"vis-navigation\", this.canvas.frame.appendChild(this.navigationDOM.wrapper);\n\n for (var n = 0; n < t.length; n++) {\n this.navigationDOM[t[n]] = document.createElement(\"div\"), this.navigationDOM[t[n]].className = \"vis-button vis-\" + t[n], this.navigationDOM.wrapper.appendChild(this.navigationDOM[t[n]]);\n var a = new hammer(this.navigationDOM[t[n]]);\n \"_fit\" === o[n] ? hammerUtil.onTouch(a, this._fit.bind(this)) : hammerUtil.onTouch(a, this.bindToRedraw.bind(this, o[n])), this.navigationHammers.push(a);\n }\n\n var d = new hammer(this.canvas.frame);\n hammerUtil.onRelease(d, function () {\n e._stopMovement();\n }), this.navigationHammers.push(d), this.iconsCreated = !0;\n }\n }, {\n key: \"bindToRedraw\",\n value: function (e) {\n void 0 === this.boundFunctions[e] && (this.boundFunctions[e] = this[e].bind(this), this.body.emitter.on(\"initRedraw\", this.boundFunctions[e]), this.body.emitter.emit(\"_startRendering\"));\n }\n }, {\n key: \"unbindFromRedraw\",\n value: function (e) {\n void 0 !== this.boundFunctions[e] && (this.body.emitter.off(\"initRedraw\", this.boundFunctions[e]), this.body.emitter.emit(\"_stopRendering\"), delete this.boundFunctions[e]);\n }\n }, {\n key: \"_fit\",\n value: function () {\n 700 < new Date().valueOf() - this.touchTime && (this.body.emitter.emit(\"fit\", {\n duration: 700\n }), this.touchTime = new Date().valueOf());\n }\n }, {\n key: \"_stopMovement\",\n value: function () {\n for (var e in this.boundFunctions) this.boundFunctions.hasOwnProperty(e) && (this.body.emitter.off(\"initRedraw\", this.boundFunctions[e]), this.body.emitter.emit(\"_stopRendering\"));\n\n this.boundFunctions = {};\n }\n }, {\n key: \"_moveUp\",\n value: function () {\n this.body.view.translation.y += this.options.keyboard.speed.y;\n }\n }, {\n key: \"_moveDown\",\n value: function () {\n this.body.view.translation.y -= this.options.keyboard.speed.y;\n }\n }, {\n key: \"_moveLeft\",\n value: function () {\n this.body.view.translation.x += this.options.keyboard.speed.x;\n }\n }, {\n key: \"_moveRight\",\n value: function () {\n this.body.view.translation.x -= this.options.keyboard.speed.x;\n }\n }, {\n key: \"_zoomIn\",\n value: function () {\n var e = this.body.view.scale,\n t = this.body.view.scale * (1 + this.options.keyboard.speed.zoom),\n o = this.body.view.translation,\n n = t / e,\n i = (1 - n) * this.canvas.canvasViewCenter.x + o.x * n,\n a = (1 - n) * this.canvas.canvasViewCenter.y + o.y * n;\n this.body.view.scale = t, this.body.view.translation = {\n x: i,\n y: a\n }, this.body.emitter.emit(\"zoom\", {\n direction: \"+\",\n scale: this.body.view.scale,\n pointer: null\n });\n }\n }, {\n key: \"_zoomOut\",\n value: function () {\n var e = this.body.view.scale,\n t = this.body.view.scale / (1 + this.options.keyboard.speed.zoom),\n o = this.body.view.translation,\n n = t / e,\n i = (1 - n) * this.canvas.canvasViewCenter.x + o.x * n,\n a = (1 - n) * this.canvas.canvasViewCenter.y + o.y * n;\n this.body.view.scale = t, this.body.view.translation = {\n x: i,\n y: a\n }, this.body.emitter.emit(\"zoom\", {\n direction: \"-\",\n scale: this.body.view.scale,\n pointer: null\n });\n }\n }, {\n key: \"configureKeyboardBindings\",\n value: function () {\n var e = this;\n void 0 !== this.keycharm && this.keycharm.destroy(), !0 === this.options.keyboard.enabled && (this.keycharm = !0 === this.options.keyboard.bindToWindow ? keycharm({\n container: window,\n preventDefault: !0\n }) : keycharm({\n container: this.canvas.frame,\n preventDefault: !0\n }), this.keycharm.reset(), !0 === this.activated && (this.keycharm.bind(\"up\", function () {\n e.bindToRedraw(\"_moveUp\");\n }, \"keydown\"), this.keycharm.bind(\"down\", function () {\n e.bindToRedraw(\"_moveDown\");\n }, \"keydown\"), this.keycharm.bind(\"left\", function () {\n e.bindToRedraw(\"_moveLeft\");\n }, \"keydown\"), this.keycharm.bind(\"right\", function () {\n e.bindToRedraw(\"_moveRight\");\n }, \"keydown\"), this.keycharm.bind(\"=\", function () {\n e.bindToRedraw(\"_zoomIn\");\n }, \"keydown\"), this.keycharm.bind(\"num+\", function () {\n e.bindToRedraw(\"_zoomIn\");\n }, \"keydown\"), this.keycharm.bind(\"num-\", function () {\n e.bindToRedraw(\"_zoomOut\");\n }, \"keydown\"), this.keycharm.bind(\"-\", function () {\n e.bindToRedraw(\"_zoomOut\");\n }, \"keydown\"), this.keycharm.bind(\"[\", function () {\n e.bindToRedraw(\"_zoomOut\");\n }, \"keydown\"), this.keycharm.bind(\"]\", function () {\n e.bindToRedraw(\"_zoomIn\");\n }, \"keydown\"), this.keycharm.bind(\"pageup\", function () {\n e.bindToRedraw(\"_zoomIn\");\n }, \"keydown\"), this.keycharm.bind(\"pagedown\", function () {\n e.bindToRedraw(\"_zoomOut\");\n }, \"keydown\"), this.keycharm.bind(\"up\", function () {\n e.unbindFromRedraw(\"_moveUp\");\n }, \"keyup\"), this.keycharm.bind(\"down\", function () {\n e.unbindFromRedraw(\"_moveDown\");\n }, \"keyup\"), this.keycharm.bind(\"left\", function () {\n e.unbindFromRedraw(\"_moveLeft\");\n }, \"keyup\"), this.keycharm.bind(\"right\", function () {\n e.unbindFromRedraw(\"_moveRight\");\n }, \"keyup\"), this.keycharm.bind(\"=\", function () {\n e.unbindFromRedraw(\"_zoomIn\");\n }, \"keyup\"), this.keycharm.bind(\"num+\", function () {\n e.unbindFromRedraw(\"_zoomIn\");\n }, \"keyup\"), this.keycharm.bind(\"num-\", function () {\n e.unbindFromRedraw(\"_zoomOut\");\n }, \"keyup\"), this.keycharm.bind(\"-\", function () {\n e.unbindFromRedraw(\"_zoomOut\");\n }, \"keyup\"), this.keycharm.bind(\"[\", function () {\n e.unbindFromRedraw(\"_zoomOut\");\n }, \"keyup\"), this.keycharm.bind(\"]\", function () {\n e.unbindFromRedraw(\"_zoomIn\");\n }, \"keyup\"), this.keycharm.bind(\"pageup\", function () {\n e.unbindFromRedraw(\"_zoomIn\");\n }, \"keyup\"), this.keycharm.bind(\"pagedown\", function () {\n e.unbindFromRedraw(\"_zoomOut\");\n }, \"keyup\")));\n }\n }]), e;\n}(),\n Popup = function () {\n function e(t, o) {\n classCallCheck$1(this, e), this.container = t, this.overflowMethod = o || \"cap\", this.x = 0, this.y = 0, this.padding = 5, this.hidden = !1, this.frame = document.createElement(\"div\"), this.frame.className = \"vis-tooltip\", this.container.appendChild(this.frame);\n }\n\n return createClass$1(e, [{\n key: \"setPosition\",\n value: function (e, t) {\n this.x = parseInt(e), this.y = parseInt(t);\n }\n }, {\n key: \"setText\",\n value: function (e) {\n e instanceof Element ? (this.frame.innerHTML = \"\", this.frame.appendChild(e)) : this.frame.innerHTML = e;\n }\n }, {\n key: \"show\",\n value: function (e) {\n if (void 0 === e && (e = !0), !0 === e) {\n var t = this.frame.clientHeight,\n o = this.frame.clientWidth,\n n = this.frame.parentNode.clientHeight,\n i = this.frame.parentNode.clientWidth,\n a = 0,\n d = 0;\n\n if (\"flip\" == this.overflowMethod) {\n var s = !1,\n r = !0;\n this.y - t < this.padding && (r = !1), this.x + o > i - this.padding && (s = !0), a = s ? this.x - o : this.x, d = r ? this.y - t : this.y;\n } else d = this.y - t, d + t + this.padding > n && (d = n - t - this.padding), d < this.padding && (d = this.padding), a = this.x, a + o + this.padding > i && (a = i - o - this.padding), a < this.padding && (a = this.padding);\n\n this.frame.style.left = a + \"px\", this.frame.style.top = d + \"px\", this.frame.style.visibility = \"visible\", this.hidden = !1;\n } else this.hide();\n }\n }, {\n key: \"hide\",\n value: function () {\n this.hidden = !0, this.frame.style.left = \"0\", this.frame.style.top = \"0\", this.frame.style.visibility = \"hidden\";\n }\n }, {\n key: \"destroy\",\n value: function () {\n this.frame.parentNode.removeChild(this.frame);\n }\n }]), e;\n}(),\n InteractionHandler = function () {\n function e(t, o, n) {\n classCallCheck$1(this, e), this.body = t, this.canvas = o, this.selectionHandler = n, this.navigationHandler = new NavigationHandler(t, o), this.body.eventListeners.onTap = this.onTap.bind(this), this.body.eventListeners.onTouch = this.onTouch.bind(this), this.body.eventListeners.onDoubleTap = this.onDoubleTap.bind(this), this.body.eventListeners.onHold = this.onHold.bind(this), this.body.eventListeners.onDragStart = this.onDragStart.bind(this), this.body.eventListeners.onDrag = this.onDrag.bind(this), this.body.eventListeners.onDragEnd = this.onDragEnd.bind(this), this.body.eventListeners.onMouseWheel = this.onMouseWheel.bind(this), this.body.eventListeners.onPinch = this.onPinch.bind(this), this.body.eventListeners.onMouseMove = this.onMouseMove.bind(this), this.body.eventListeners.onRelease = this.onRelease.bind(this), this.body.eventListeners.onContext = this.onContext.bind(this), this.touchTime = 0, this.drag = {}, this.pinch = {}, this.popup = void 0, this.popupObj = void 0, this.popupTimer = void 0, this.body.functions.getPointer = this.getPointer.bind(this), this.options = {}, this.defaultOptions = {\n dragNodes: !0,\n dragView: !0,\n hover: !1,\n keyboard: {\n enabled: !1,\n speed: {\n x: 10,\n y: 10,\n zoom: .02\n },\n bindToWindow: !0\n },\n navigationButtons: !1,\n tooltipDelay: 300,\n zoomView: !0,\n zoomSpeed: 1\n }, util.extend(this.options, this.defaultOptions), this.bindEventListeners();\n }\n\n return createClass$1(e, [{\n key: \"bindEventListeners\",\n value: function () {\n var e = this;\n this.body.emitter.on(\"destroy\", function () {\n clearTimeout(e.popupTimer), delete e.body.functions.getPointer;\n });\n }\n }, {\n key: \"setOptions\",\n value: function (e) {\n if (void 0 !== e) {\n util.selectiveNotDeepExtend([\"hideEdgesOnDrag\", \"hideEdgesOnZoom\", \"hideNodesOnDrag\", \"keyboard\", \"multiselect\", \"selectable\", \"selectConnectedEdges\"], this.options, e), util.mergeOptions(this.options, e, \"keyboard\"), e.tooltip && (util.extend(this.options.tooltip, e.tooltip), e.tooltip.color && (this.options.tooltip.color = util.parseColor(e.tooltip.color)));\n }\n\n this.navigationHandler.setOptions(this.options);\n }\n }, {\n key: \"getPointer\",\n value: function (e) {\n return {\n x: e.x - util.getAbsoluteLeft(this.canvas.frame.canvas),\n y: e.y - util.getAbsoluteTop(this.canvas.frame.canvas)\n };\n }\n }, {\n key: \"onTouch\",\n value: function (e) {\n 50 < new Date().valueOf() - this.touchTime && (this.drag.pointer = this.getPointer(e.center), this.drag.pinched = !1, this.pinch.scale = this.body.view.scale, this.touchTime = new Date().valueOf());\n }\n }, {\n key: \"onTap\",\n value: function (e) {\n var t = this.getPointer(e.center),\n o = this.selectionHandler.options.multiselect && (e.changedPointers[0].ctrlKey || e.changedPointers[0].metaKey);\n this.checkSelectionChanges(t, e, o), this.selectionHandler._generateClickEvent(\"click\", e, t);\n }\n }, {\n key: \"onDoubleTap\",\n value: function (e) {\n var t = this.getPointer(e.center);\n\n this.selectionHandler._generateClickEvent(\"doubleClick\", e, t);\n }\n }, {\n key: \"onHold\",\n value: function (e) {\n var t = this.getPointer(e.center),\n o = this.selectionHandler.options.multiselect;\n this.checkSelectionChanges(t, e, o), this.selectionHandler._generateClickEvent(\"click\", e, t), this.selectionHandler._generateClickEvent(\"hold\", e, t);\n }\n }, {\n key: \"onRelease\",\n value: function (e) {\n if (10 < new Date().valueOf() - this.touchTime) {\n var t = this.getPointer(e.center);\n this.selectionHandler._generateClickEvent(\"release\", e, t), this.touchTime = new Date().valueOf();\n }\n }\n }, {\n key: \"onContext\",\n value: function (e) {\n var t = this.getPointer({\n x: e.clientX,\n y: e.clientY\n });\n\n this.selectionHandler._generateClickEvent(\"oncontext\", e, t);\n }\n }, {\n key: \"checkSelectionChanges\",\n value: function (e, t) {\n var o = !!(2 < arguments.length && void 0 !== arguments[2]) && arguments[2],\n n = this.selectionHandler.getSelection(),\n i = !1;\n i = !0 === o ? this.selectionHandler.selectAdditionalOnPoint(e) : this.selectionHandler.selectOnPoint(e);\n\n var a = this.selectionHandler.getSelection(),\n d = this._determineDifference(n, a),\n s = this._determineDifference(a, n);\n\n 0 < d.edges.length && (this.selectionHandler._generateClickEvent(\"deselectEdge\", t, e, n), i = !0), 0 < d.nodes.length && (this.selectionHandler._generateClickEvent(\"deselectNode\", t, e, n), i = !0), 0 < s.nodes.length && (this.selectionHandler._generateClickEvent(\"selectNode\", t, e), i = !0), 0 < s.edges.length && (this.selectionHandler._generateClickEvent(\"selectEdge\", t, e), i = !0), !0 === i && this.selectionHandler._generateClickEvent(\"select\", t, e);\n }\n }, {\n key: \"_determineDifference\",\n value: function (e, t) {\n var o = function (e, t) {\n for (var o = [], n = 0, a; n < e.length; n++) a = e[n], -1 === t.indexOf(a) && o.push(a);\n\n return o;\n };\n\n return {\n nodes: o(e.nodes, t.nodes),\n edges: o(e.edges, t.edges)\n };\n }\n }, {\n key: \"onDragStart\",\n value: function (e) {\n void 0 === this.drag.pointer && this.onTouch(e);\n var t = this.selectionHandler.getNodeAt(this.drag.pointer);\n\n if (this.drag.dragging = !0, this.drag.selection = [], this.drag.translation = util.extend({}, this.body.view.translation), this.drag.nodeId = void 0, void 0 !== t && !0 === this.options.dragNodes) {\n this.drag.nodeId = t.id, !1 === t.isSelected() && (this.selectionHandler.unselectAll(), this.selectionHandler.selectObject(t)), this.selectionHandler._generateClickEvent(\"dragStart\", e, this.drag.pointer);\n var o = this.selectionHandler.selectionObj.nodes;\n\n for (var n in o) if (o.hasOwnProperty(n)) {\n var i = o[n],\n a = {\n id: i.id,\n node: i,\n x: i.x,\n y: i.y,\n xFixed: i.options.fixed.x,\n yFixed: i.options.fixed.y\n };\n i.options.fixed.x = !0, i.options.fixed.y = !0, this.drag.selection.push(a);\n }\n } else this.selectionHandler._generateClickEvent(\"dragStart\", e, this.drag.pointer, void 0, !0);\n }\n }, {\n key: \"onDrag\",\n value: function (e) {\n var t = this;\n\n if (!0 !== this.drag.pinched) {\n this.body.emitter.emit(\"unlockNode\");\n var o = this.getPointer(e.center),\n n = this.drag.selection;\n\n if (n && n.length && !0 === this.options.dragNodes) {\n this.selectionHandler._generateClickEvent(\"dragging\", e, o);\n\n var i = o.x - this.drag.pointer.x,\n a = o.y - this.drag.pointer.y;\n n.forEach(function (e) {\n var o = e.node;\n !1 === e.xFixed && (o.x = t.canvas._XconvertDOMtoCanvas(t.canvas._XconvertCanvasToDOM(e.x) + i)), !1 === e.yFixed && (o.y = t.canvas._YconvertDOMtoCanvas(t.canvas._YconvertCanvasToDOM(e.y) + a));\n }), this.body.emitter.emit(\"startSimulation\");\n } else if (!0 === this.options.dragView) {\n if (this.selectionHandler._generateClickEvent(\"dragging\", e, o, void 0, !0), void 0 === this.drag.pointer) return void this.onDragStart(e);\n var d = o.x - this.drag.pointer.x,\n s = o.y - this.drag.pointer.y;\n this.body.view.translation = {\n x: this.drag.translation.x + d,\n y: this.drag.translation.y + s\n }, this.body.emitter.emit(\"_requestRedraw\");\n }\n }\n }\n }, {\n key: \"onDragEnd\",\n value: function (e) {\n this.drag.dragging = !1;\n var t = this.drag.selection;\n t && t.length ? (t.forEach(function (e) {\n e.node.options.fixed.x = e.xFixed, e.node.options.fixed.y = e.yFixed;\n }), this.selectionHandler._generateClickEvent(\"dragEnd\", e, this.getPointer(e.center)), this.body.emitter.emit(\"startSimulation\")) : (this.selectionHandler._generateClickEvent(\"dragEnd\", e, this.getPointer(e.center), void 0, !0), this.body.emitter.emit(\"_requestRedraw\"));\n }\n }, {\n key: \"onPinch\",\n value: function (e) {\n var t = this.getPointer(e.center);\n this.drag.pinched = !0, void 0 === this.pinch.scale && (this.pinch.scale = 1);\n var o = this.pinch.scale * e.scale;\n this.zoom(o, t);\n }\n }, {\n key: \"zoom\",\n value: function (e, t) {\n if (!0 === this.options.zoomView) {\n var o = this.body.view.scale;\n 1e-5 > e && (e = 1e-5), 10 < e && (e = 10);\n var n;\n void 0 !== this.drag && !0 === this.drag.dragging && (n = this.canvas.DOMtoCanvas(this.drag.pointer));\n var i = this.body.view.translation,\n a = e / o,\n d = (1 - a) * t.x + i.x * a,\n s = (1 - a) * t.y + i.y * a;\n\n if (this.body.view.scale = e, this.body.view.translation = {\n x: d,\n y: s\n }, null != n) {\n var r = this.canvas.canvasToDOM(n);\n this.drag.pointer.x = r.x, this.drag.pointer.y = r.y;\n }\n\n this.body.emitter.emit(\"_requestRedraw\"), o < e ? this.body.emitter.emit(\"zoom\", {\n direction: \"+\",\n scale: this.body.view.scale,\n pointer: t\n }) : this.body.emitter.emit(\"zoom\", {\n direction: \"-\",\n scale: this.body.view.scale,\n pointer: t\n });\n }\n }\n }, {\n key: \"onMouseWheel\",\n value: function (e) {\n if (!0 === this.options.zoomView) {\n var t = 0;\n\n if (e.wheelDelta ? t = e.wheelDelta / 120 : e.detail && (t = -e.detail / 3), 0 != t) {\n var o = this.body.view.scale,\n n = t * (this.options.zoomSpeed / 10);\n 0 > t && (n /= 1 - n), o *= 1 + n;\n var i = this.getPointer({\n x: e.clientX,\n y: e.clientY\n });\n this.zoom(o, i);\n }\n\n e.preventDefault();\n }\n }\n }, {\n key: \"onMouseMove\",\n value: function (e) {\n var t = this,\n o = this.getPointer({\n x: e.clientX,\n y: e.clientY\n }),\n n = !1;\n void 0 !== this.popup && (!1 === this.popup.hidden && this._checkHidePopup(o), !1 === this.popup.hidden && (n = !0, this.popup.setPosition(o.x + 3, o.y - 5), this.popup.show())), !1 === this.options.keyboard.bindToWindow && !0 === this.options.keyboard.enabled && this.canvas.frame.focus(), !1 === n && (void 0 !== this.popupTimer && (clearInterval(this.popupTimer), this.popupTimer = void 0), !this.drag.dragging && (this.popupTimer = setTimeout(function () {\n return t._checkShowPopup(o);\n }, this.options.tooltipDelay))), !0 === this.options.hover && this.selectionHandler.hoverObject(e, o);\n }\n }, {\n key: \"_checkShowPopup\",\n value: function (e) {\n var t = this.canvas._XconvertDOMtoCanvas(e.x),\n o = this.canvas._YconvertDOMtoCanvas(e.y),\n n = {\n left: t,\n top: o,\n right: t,\n bottom: o\n },\n a = void 0 === this.popupObj ? void 0 : this.popupObj.id,\n d = !1,\n s = \"node\";\n\n if (void 0 === this.popupObj) {\n for (var r = this.body.nodeIndices, l = this.body.nodes, c = [], u = 0, p; u < r.length; u++) p = l[r[u]], !0 === p.isOverlappingWith(n) && (d = !0, void 0 !== p.getTitle() && c.push(r[u]));\n\n 0 < c.length && (this.popupObj = l[c[c.length - 1]], d = !0);\n }\n\n if (void 0 === this.popupObj && !1 === d) {\n for (var h = this.body.edgeIndices, m = this.body.edges, g = [], y = 0, f; y < h.length; y++) f = m[h[y]], !0 === f.isOverlappingWith(n) && !0 === f.connected && void 0 !== f.getTitle() && g.push(h[y]);\n\n 0 < g.length && (this.popupObj = m[g[g.length - 1]], s = \"edge\");\n }\n\n void 0 === this.popupObj ? void 0 !== this.popup && (this.popup.hide(), this.body.emitter.emit(\"hidePopup\")) : this.popupObj.id !== a && (void 0 === this.popup && (this.popup = new Popup(this.canvas.frame)), this.popup.popupTargetType = s, this.popup.popupTargetId = this.popupObj.id, this.popup.setPosition(e.x + 3, e.y - 5), this.popup.setText(this.popupObj.getTitle()), this.popup.show(), this.body.emitter.emit(\"showPopup\", this.popupObj.id));\n }\n }, {\n key: \"_checkHidePopup\",\n value: function (e) {\n var t = this.selectionHandler._pointerToPositionObject(e),\n o = !1;\n\n if (\"node\" !== this.popup.popupTargetType) void 0 === this.selectionHandler.getNodeAt(e) && void 0 !== this.body.edges[this.popup.popupTargetId] && (o = this.body.edges[this.popup.popupTargetId].isOverlappingWith(t));else if (void 0 !== this.body.nodes[this.popup.popupTargetId] && (o = this.body.nodes[this.popup.popupTargetId].isOverlappingWith(t), !0 === o)) {\n var n = this.selectionHandler.getNodeAt(e);\n o = void 0 !== n && n.id === this.popup.popupTargetId;\n }\n !1 === o && (this.popupObj = void 0, this.popup.hide(), this.body.emitter.emit(\"hidePopup\"));\n }\n }]), e;\n}(),\n SelectionHandler = function () {\n function e(t, o) {\n var n = this;\n classCallCheck$1(this, e), this.body = t, this.canvas = o, this.selectionObj = {\n nodes: [],\n edges: []\n }, this.hoverObj = {\n nodes: {},\n edges: {}\n }, this.options = {}, this.defaultOptions = {\n multiselect: !1,\n selectable: !0,\n selectConnectedEdges: !0,\n hoverConnectedEdges: !0\n }, util.extend(this.options, this.defaultOptions), this.body.emitter.on(\"_dataChanged\", function () {\n n.updateSelection();\n });\n }\n\n return createClass$1(e, [{\n key: \"setOptions\",\n value: function (e) {\n if (void 0 !== e) {\n util.selectiveDeepExtend([\"multiselect\", \"hoverConnectedEdges\", \"selectable\", \"selectConnectedEdges\"], this.options, e);\n }\n }\n }, {\n key: \"selectOnPoint\",\n value: function (e) {\n var t = !1;\n\n if (!0 === this.options.selectable) {\n var o = this.getNodeAt(e) || this.getEdgeAt(e);\n this.unselectAll(), void 0 !== o && (t = this.selectObject(o)), this.body.emitter.emit(\"_requestRedraw\");\n }\n\n return t;\n }\n }, {\n key: \"selectAdditionalOnPoint\",\n value: function (e) {\n var t = !1;\n\n if (!0 === this.options.selectable) {\n var o = this.getNodeAt(e) || this.getEdgeAt(e);\n void 0 !== o && (t = !0, !0 === o.isSelected() ? this.deselectObject(o) : this.selectObject(o), this.body.emitter.emit(\"_requestRedraw\"));\n }\n\n return t;\n }\n }, {\n key: \"_initBaseEvent\",\n value: function (e, t) {\n var o = {\n pointer: {\n DOM: {\n x: t.x,\n y: t.y\n },\n canvas: this.canvas.DOMtoCanvas(t)\n },\n event: e\n };\n return o;\n }\n }, {\n key: \"_generateClickEvent\",\n value: function (e, t, o, n) {\n var i = !!(4 < arguments.length && void 0 !== arguments[4]) && arguments[4],\n a = this._initBaseEvent(t, o);\n\n if (!0 === i) a.nodes = [], a.edges = [];else {\n var d = this.getSelection();\n a.nodes = d.nodes, a.edges = d.edges;\n }\n void 0 !== n && (a.previousSelection = n), \"click\" == e && (a.items = this.getClickedItems(o)), void 0 !== t.controlEdge && (a.controlEdge = t.controlEdge), this.body.emitter.emit(e, a);\n }\n }, {\n key: \"selectObject\",\n value: function (e) {\n var t = 1 < arguments.length && void 0 !== arguments[1] ? arguments[1] : this.options.selectConnectedEdges;\n return void 0 !== e && (e instanceof Node && !0 === t && this._selectConnectedEdges(e), e.select(), this._addToSelection(e), !0);\n }\n }, {\n key: \"deselectObject\",\n value: function (e) {\n !0 === e.isSelected() && (e.selected = !1, this._removeFromSelection(e));\n }\n }, {\n key: \"_getAllNodesOverlappingWith\",\n value: function (e) {\n for (var t = [], o = this.body.nodes, n = 0, a; n < this.body.nodeIndices.length; n++) a = this.body.nodeIndices[n], o[a].isOverlappingWith(e) && t.push(a);\n\n return t;\n }\n }, {\n key: \"_pointerToPositionObject\",\n value: function (e) {\n var t = this.canvas.DOMtoCanvas(e);\n return {\n left: t.x - 1,\n top: t.y + 1,\n right: t.x + 1,\n bottom: t.y - 1\n };\n }\n }, {\n key: \"getNodeAt\",\n value: function (e) {\n var t = !(1 < arguments.length && void 0 !== arguments[1]) || arguments[1],\n o = this._pointerToPositionObject(e),\n n = this._getAllNodesOverlappingWith(o);\n\n return 0 < n.length ? !0 === t ? this.body.nodes[n[n.length - 1]] : n[n.length - 1] : void 0;\n }\n }, {\n key: \"_getEdgesOverlappingWith\",\n value: function (e, t) {\n for (var o = this.body.edges, n = 0, a; n < this.body.edgeIndices.length; n++) a = this.body.edgeIndices[n], o[a].isOverlappingWith(e) && t.push(a);\n }\n }, {\n key: \"_getAllEdgesOverlappingWith\",\n value: function (e) {\n var t = [];\n return this._getEdgesOverlappingWith(e, t), t;\n }\n }, {\n key: \"getEdgeAt\",\n value: function (e) {\n for (var t = !(1 < arguments.length && void 0 !== arguments[1]) || arguments[1], o = this.canvas.DOMtoCanvas(e), n = 10, a = null, d = this.body.edges, s = 0; s < this.body.edgeIndices.length; s++) {\n var r = this.body.edgeIndices[s],\n l = d[r];\n\n if (l.connected) {\n var c = l.from.x,\n u = l.from.y,\n p = l.to.x,\n h = l.to.y,\n m = l.edgeType.getDistanceToEdge(c, u, p, h, o.x, o.y);\n m < n && (a = r, n = m);\n }\n }\n\n return null === a ? void 0 : !0 === t ? this.body.edges[a] : a;\n }\n }, {\n key: \"_addToSelection\",\n value: function (e) {\n e instanceof Node ? this.selectionObj.nodes[e.id] = e : this.selectionObj.edges[e.id] = e;\n }\n }, {\n key: \"_addToHover\",\n value: function (e) {\n e instanceof Node ? this.hoverObj.nodes[e.id] = e : this.hoverObj.edges[e.id] = e;\n }\n }, {\n key: \"_removeFromSelection\",\n value: function (e) {\n e instanceof Node ? (delete this.selectionObj.nodes[e.id], this._unselectConnectedEdges(e)) : delete this.selectionObj.edges[e.id];\n }\n }, {\n key: \"unselectAll\",\n value: function () {\n for (var e in this.selectionObj.nodes) this.selectionObj.nodes.hasOwnProperty(e) && this.selectionObj.nodes[e].unselect();\n\n for (var t in this.selectionObj.edges) this.selectionObj.edges.hasOwnProperty(t) && this.selectionObj.edges[t].unselect();\n\n this.selectionObj = {\n nodes: {},\n edges: {}\n };\n }\n }, {\n key: \"_getSelectedNodeCount\",\n value: function () {\n var e = 0;\n\n for (var t in this.selectionObj.nodes) this.selectionObj.nodes.hasOwnProperty(t) && (e += 1);\n\n return e;\n }\n }, {\n key: \"_getSelectedNode\",\n value: function () {\n for (var e in this.selectionObj.nodes) if (this.selectionObj.nodes.hasOwnProperty(e)) return this.selectionObj.nodes[e];\n }\n }, {\n key: \"_getSelectedEdge\",\n value: function () {\n for (var e in this.selectionObj.edges) if (this.selectionObj.edges.hasOwnProperty(e)) return this.selectionObj.edges[e];\n }\n }, {\n key: \"_getSelectedEdgeCount\",\n value: function () {\n var e = 0;\n\n for (var t in this.selectionObj.edges) this.selectionObj.edges.hasOwnProperty(t) && (e += 1);\n\n return e;\n }\n }, {\n key: \"_getSelectedObjectCount\",\n value: function () {\n var e = 0;\n\n for (var t in this.selectionObj.nodes) this.selectionObj.nodes.hasOwnProperty(t) && (e += 1);\n\n for (var o in this.selectionObj.edges) this.selectionObj.edges.hasOwnProperty(o) && (e += 1);\n\n return e;\n }\n }, {\n key: \"_selectionIsEmpty\",\n value: function () {\n for (var e in this.selectionObj.nodes) if (this.selectionObj.nodes.hasOwnProperty(e)) return !1;\n\n for (var t in this.selectionObj.edges) if (this.selectionObj.edges.hasOwnProperty(t)) return !1;\n\n return !0;\n }\n }, {\n key: \"_clusterInSelection\",\n value: function () {\n for (var e in this.selectionObj.nodes) if (this.selectionObj.nodes.hasOwnProperty(e) && 1 < this.selectionObj.nodes[e].clusterSize) return !0;\n\n return !1;\n }\n }, {\n key: \"_selectConnectedEdges\",\n value: function (e) {\n for (var t = 0, o; t < e.edges.length; t++) o = e.edges[t], o.select(), this._addToSelection(o);\n }\n }, {\n key: \"_hoverConnectedEdges\",\n value: function (e) {\n for (var t = 0, o; t < e.edges.length; t++) o = e.edges[t], o.hover = !0, this._addToHover(o);\n }\n }, {\n key: \"_unselectConnectedEdges\",\n value: function (e) {\n for (var t = 0, o; t < e.edges.length; t++) o = e.edges[t], o.unselect(), this._removeFromSelection(o);\n }\n }, {\n key: \"emitBlurEvent\",\n value: function (e, t, o) {\n var n = this._initBaseEvent(e, t);\n\n !0 === o.hover && (o.hover = !1, o instanceof Node ? (n.node = o.id, this.body.emitter.emit(\"blurNode\", n)) : (n.edge = o.id, this.body.emitter.emit(\"blurEdge\", n)));\n }\n }, {\n key: \"emitHoverEvent\",\n value: function (e, t, o) {\n var n = this._initBaseEvent(e, t),\n i = !1;\n\n return !1 === o.hover && (o.hover = !0, this._addToHover(o), i = !0, o instanceof Node ? (n.node = o.id, this.body.emitter.emit(\"hoverNode\", n)) : (n.edge = o.id, this.body.emitter.emit(\"hoverEdge\", n))), i;\n }\n }, {\n key: \"hoverObject\",\n value: function (e, t) {\n var o = this.getNodeAt(t);\n void 0 === o && (o = this.getEdgeAt(t));\n var n = !1;\n\n for (var i in this.hoverObj.nodes) this.hoverObj.nodes.hasOwnProperty(i) && (void 0 === o || o instanceof Node && o.id != i || o instanceof Edge) && (this.emitBlurEvent(e, t, this.hoverObj.nodes[i]), delete this.hoverObj.nodes[i], n = !0);\n\n for (var a in this.hoverObj.edges) this.hoverObj.edges.hasOwnProperty(a) && (!0 === n ? (this.hoverObj.edges[a].hover = !1, delete this.hoverObj.edges[a]) : (void 0 === o || o instanceof Edge && o.id != a || o instanceof Node && !o.hover) && (this.emitBlurEvent(e, t, this.hoverObj.edges[a]), delete this.hoverObj.edges[a], n = !0));\n\n if (void 0 !== o) {\n var d = Object.keys(this.hoverObj.edges).length,\n s = Object.keys(this.hoverObj.nodes).length,\n r = o instanceof Edge && 0 === d && 0 === s,\n l = o instanceof Node && 0 === d && 0 === s;\n (n || r || l) && (n = this.emitHoverEvent(e, t, o)), o instanceof Node && !0 === this.options.hoverConnectedEdges && this._hoverConnectedEdges(o);\n }\n\n !0 === n && this.body.emitter.emit(\"_requestRedraw\");\n }\n }, {\n key: \"getSelection\",\n value: function () {\n var e = this.getSelectedNodes(),\n t = this.getSelectedEdges();\n return {\n nodes: e,\n edges: t\n };\n }\n }, {\n key: \"getSelectedNodes\",\n value: function () {\n var e = [];\n if (!0 === this.options.selectable) for (var t in this.selectionObj.nodes) this.selectionObj.nodes.hasOwnProperty(t) && e.push(this.selectionObj.nodes[t].id);\n return e;\n }\n }, {\n key: \"getSelectedEdges\",\n value: function () {\n var e = [];\n if (!0 === this.options.selectable) for (var t in this.selectionObj.edges) this.selectionObj.edges.hasOwnProperty(t) && e.push(this.selectionObj.edges[t].id);\n return e;\n }\n }, {\n key: \"setSelection\",\n value: function (e) {\n var t = 1 < arguments.length && void 0 !== arguments[1] ? arguments[1] : {},\n o,\n n;\n if (!e || !e.nodes && !e.edges) throw \"Selection must be an object with nodes and/or edges properties\";\n if ((t.unselectAll || void 0 === t.unselectAll) && this.unselectAll(), e.nodes) for (o = 0; o < e.nodes.length; o++) {\n n = e.nodes[o];\n var a = this.body.nodes[n];\n if (!a) throw new RangeError(\"Node with id \\\"\" + n + \"\\\" not found\");\n this.selectObject(a, t.highlightEdges);\n }\n if (e.edges) for (o = 0; o < e.edges.length; o++) {\n n = e.edges[o];\n var d = this.body.edges[n];\n if (!d) throw new RangeError(\"Edge with id \\\"\" + n + \"\\\" not found\");\n this.selectObject(d);\n }\n this.body.emitter.emit(\"_requestRedraw\");\n }\n }, {\n key: \"selectNodes\",\n value: function (e) {\n var t = !(1 < arguments.length && void 0 !== arguments[1]) || arguments[1];\n if (!e || void 0 === e.length) throw \"Selection must be an array with ids\";\n this.setSelection({\n nodes: e\n }, {\n highlightEdges: t\n });\n }\n }, {\n key: \"selectEdges\",\n value: function (e) {\n if (!e || void 0 === e.length) throw \"Selection must be an array with ids\";\n this.setSelection({\n edges: e\n });\n }\n }, {\n key: \"updateSelection\",\n value: function () {\n for (var e in this.selectionObj.nodes) this.selectionObj.nodes.hasOwnProperty(e) && (this.body.nodes.hasOwnProperty(e) || delete this.selectionObj.nodes[e]);\n\n for (var t in this.selectionObj.edges) this.selectionObj.edges.hasOwnProperty(t) && (this.body.edges.hasOwnProperty(t) || delete this.selectionObj.edges[t]);\n }\n }, {\n key: \"getClickedItems\",\n value: function (e) {\n for (var t = this.canvas.DOMtoCanvas(e), o = [], n = this.body.nodeIndices, a = this.body.nodes, d = n.length - 1; 0 <= d; d--) {\n var s = a[n[d]],\n r = s.getItemsOnPoint(t);\n o.push.apply(o, r);\n }\n\n for (var l = this.body.edgeIndices, c = this.body.edges, u = l.length - 1; 0 <= u; u--) {\n var p = c[l[u]],\n h = p.getItemsOnPoint(t);\n o.push.apply(o, h);\n }\n\n return o;\n }\n }]), e;\n}(),\n timsort = createCommonjsModule$2(function (e, t) {\n (function (e, o) {\n o(t);\n })(commonjsGlobal$2, function (e) {\n function t(e, t) {\n if (!(e instanceof t)) throw new TypeError(\"Cannot call a class as a function\");\n }\n\n function o(e) {\n return 1e5 > e ? 100 > e ? 10 > e ? 0 : 1 : 1e4 > e ? 1e3 > e ? 2 : 3 : 4 : 1e7 > e ? 1e6 > e ? 5 : 6 : 1e9 > e ? 1e8 > e ? 7 : 8 : 9;\n }\n\n function n(e, n) {\n if (e === n) return 0;\n\n if (~~e === e && ~~n === n) {\n if (0 === e || 0 === n) return e < n ? -1 : 1;\n\n if (0 > e || 0 > n) {\n if (0 <= n) return -1;\n if (0 <= e) return 1;\n e = -e, n = -n;\n }\n\n var i = o(e),\n d = o(n),\n s = 0;\n return i < d ? (e *= p[d - i - 1], n /= 10, s = -1) : i > d && (n *= p[i - d - 1], e /= 10, s = 1), e === n ? s : e < n ? -1 : 1;\n }\n\n var r = e + \"\",\n l = n + \"\";\n return r === l ? 0 : r < l ? -1 : 1;\n }\n\n function i(e) {\n for (var t = 0; e >= 32;) t |= 1 & e, e >>= 1;\n\n return e + t;\n }\n\n function a(e, t, o, n) {\n var i = t + 1;\n if (i === o) return 1;\n\n if (0 > n(e[i++], e[t])) {\n for (; i < o && 0 > n(e[i], e[i - 1]);) i++;\n\n d(e, t, i);\n } else for (; i < o && 0 <= n(e[i], e[i - 1]);) i++;\n\n return i - t;\n }\n\n function d(e, o, n) {\n for (n--; o < n;) {\n var i = e[o];\n e[o++] = e[n], e[n--] = i;\n }\n }\n\n function s(e, t, o, i, a) {\n for (i === t && i++; i < o; i++) {\n for (var d = e[i], s = t, r = i; s < r;) {\n var l = s + r >>> 1;\n 0 > a(d, e[l]) ? r = l : s = l + 1;\n }\n\n var c = i - s;\n\n switch (c) {\n case 3:\n e[s + 3] = e[s + 2];\n\n case 2:\n e[s + 2] = e[s + 1];\n\n case 1:\n e[s + 1] = e[s];\n break;\n\n default:\n for (; 0 < c;) e[s + c] = e[s + c - 1], c--;\n\n }\n\n e[s] = d;\n }\n }\n\n function r(e, t, o, n, i, a) {\n var d = 0,\n s = 0,\n r = 1;\n\n if (0 < a(e, t[o + i])) {\n for (s = n - i; r < s && 0 < a(e, t[o + i + r]);) d = r, r = (r << 1) + 1, 0 >= r && (r = s);\n\n r > s && (r = s), d += i, r += i;\n } else {\n for (s = i + 1; r < s && 0 >= a(e, t[o + i - r]);) d = r, r = (r << 1) + 1, 0 >= r && (r = s);\n\n r > s && (r = s);\n var l = d;\n d = i - r, r = i - l;\n }\n\n for (d++; d < r;) {\n var c = d + (r - d >>> 1);\n 0 < a(e, t[o + c]) ? d = c + 1 : r = c;\n }\n\n return r;\n }\n\n function l(e, t, o, n, i, a) {\n var d = 0,\n s = 0,\n r = 1;\n\n if (0 > a(e, t[o + i])) {\n for (s = i + 1; r < s && 0 > a(e, t[o + i - r]);) d = r, r = (r << 1) + 1, 0 >= r && (r = s);\n\n r > s && (r = s);\n var l = d;\n d = i - r, r = i - l;\n } else {\n for (s = n - i; r < s && 0 <= a(e, t[o + i + r]);) d = r, r = (r << 1) + 1, 0 >= r && (r = s);\n\n r > s && (r = s), d += i, r += i;\n }\n\n for (d++; d < r;) {\n var c = d + (r - d >>> 1);\n 0 > a(e, t[o + c]) ? r = c : d = c + 1;\n }\n\n return r;\n }\n\n e.__esModule = !0, e.sort = function (e, t, o, d) {\n if (!Array.isArray(e)) throw new TypeError(\"Can only sort arrays\");\n t ? \"function\" != typeof t && (d = o, o = t, t = n) : t = n, o || (o = 0), d || (d = e.length);\n var r = d - o;\n\n if (!(2 > r)) {\n var l = 0;\n if (32 > r) return l = a(e, o, d, t), void s(e, o, d, o + l, t);\n var c = new h(e, t),\n u = i(r);\n\n do {\n if (l = a(e, o, d, t), l < u) {\n var p = r;\n p > u && (p = u), s(e, o, o + p, o + l, t), l = p;\n }\n\n c.pushRun(o, l), c.mergeRuns(), r -= l, o += l;\n } while (0 !== r);\n\n c.forceMergeRuns();\n }\n };\n\n var c = 7,\n u = 256,\n p = [1, 10, 100, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9],\n h = function () {\n function e(o, n) {\n t(this, e), this.array = null, this.compare = null, this.minGallop = c, this.length = 0, this.tmpStorageLength = u, this.stackLength = 0, this.runStart = null, this.runLength = null, this.stackSize = 0, this.array = o, this.compare = n, this.length = o.length, this.length < 2 * u && (this.tmpStorageLength = this.length >>> 1), this.tmp = Array(this.tmpStorageLength), this.stackLength = 120 > this.length ? 5 : 1542 > this.length ? 10 : 119151 > this.length ? 19 : 40, this.runStart = Array(this.stackLength), this.runLength = Array(this.stackLength);\n }\n\n return e.prototype.pushRun = function (e, t) {\n this.runStart[this.stackSize] = e, this.runLength[this.stackSize] = t, this.stackSize += 1;\n }, e.prototype.mergeRuns = function () {\n for (; 1 < this.stackSize;) {\n var e = this.stackSize - 2;\n if (1 <= e && this.runLength[e - 1] <= this.runLength[e] + this.runLength[e + 1] || 2 <= e && this.runLength[e - 2] <= this.runLength[e] + this.runLength[e - 1]) this.runLength[e - 1] < this.runLength[e + 1] && e--;else if (this.runLength[e] > this.runLength[e + 1]) break;\n this.mergeAt(e);\n }\n }, e.prototype.forceMergeRuns = function () {\n for (; 1 < this.stackSize;) {\n var e = this.stackSize - 2;\n 0 < e && this.runLength[e - 1] < this.runLength[e + 1] && e--, this.mergeAt(e);\n }\n }, e.prototype.mergeAt = function (e) {\n var t = this.compare,\n o = this.array,\n n = this.runStart[e],\n i = this.runLength[e],\n a = this.runStart[e + 1],\n d = this.runLength[e + 1];\n this.runLength[e] = i + d, e === this.stackSize - 3 && (this.runStart[e + 1] = this.runStart[e + 2], this.runLength[e + 1] = this.runLength[e + 2]), this.stackSize--;\n var s = l(o[a], o, n, i, 0, t);\n (n += s, i -= s, 0 !== i) && (d = r(o[n + i - 1], o, a, d, d - 1, t), 0 === d || (i <= d ? this.mergeLow(n, i, a, d) : this.mergeHigh(n, i, a, d)));\n }, e.prototype.mergeLow = function (e, t, o, n) {\n var a = this.compare,\n d = this.array,\n s = this.tmp,\n u = 0;\n\n for (u = 0; u < t; u++) s[u] = d[e + u];\n\n var p = 0,\n h = o,\n m = e;\n\n if (d[m++] = d[h++], 0 == --n) {\n for (u = 0; u < t; u++) d[m + u] = s[p + u];\n\n return;\n }\n\n if (1 === t) {\n for (u = 0; u < n; u++) d[m + u] = d[h + u];\n\n return void (d[m + n] = s[p]);\n }\n\n for (var g = this.minGallop;;) {\n var y = 0,\n f = 0,\n b = !1;\n\n do if (0 > a(d[h], s[p])) {\n if (d[m++] = d[h++], f++, y = 0, 0 == --n) {\n b = !0;\n break;\n }\n } else if (d[m++] = s[p++], y++, f = 0, 1 == --t) {\n b = !0;\n break;\n } while ((y | f) < g);\n\n if (b) break;\n\n do {\n if (y = l(d[h], s, p, t, 0, a), 0 !== y) {\n for (u = 0; u < y; u++) d[m + u] = s[p + u];\n\n if (m += y, p += y, t -= y, 1 >= t) {\n b = !0;\n break;\n }\n }\n\n if (d[m++] = d[h++], 0 == --n) {\n b = !0;\n break;\n }\n\n if (f = r(s[p], d, h, n, 0, a), 0 !== f) {\n for (u = 0; u < f; u++) d[m + u] = d[h + u];\n\n if (m += f, h += f, n -= f, 0 === n) {\n b = !0;\n break;\n }\n }\n\n if (d[m++] = s[p++], 1 == --t) {\n b = !0;\n break;\n }\n\n g--;\n } while (y >= c || f >= c);\n\n if (b) break;\n 0 > g && (g = 0), g += 2;\n }\n\n if (this.minGallop = g, 1 > g && (this.minGallop = 1), 1 === t) {\n for (u = 0; u < n; u++) d[m + u] = d[h + u];\n\n d[m + n] = s[p];\n } else if (0 === t) throw new Error(\"mergeLow preconditions were not respected\");else for (u = 0; u < t; u++) d[m + u] = s[p + u];\n }, e.prototype.mergeHigh = function (e, t, o, n) {\n var a = this.compare,\n d = this.array,\n s = this.tmp,\n u = 0;\n\n for (u = 0; u < n; u++) s[u] = d[o + u];\n\n var p = e + t - 1,\n h = n - 1,\n m = o + n - 1,\n g = 0,\n y = 0;\n\n if (d[m--] = d[p--], 0 == --t) {\n for (g = m - (n - 1), u = 0; u < n; u++) d[g + u] = s[u];\n\n return;\n }\n\n if (1 === n) {\n for (m -= t, p -= t, y = m + 1, g = p + 1, u = t - 1; 0 <= u; u--) d[y + u] = d[g + u];\n\n return void (d[m] = s[h]);\n }\n\n for (var f = this.minGallop;;) {\n var b = 0,\n _ = 0,\n v = !1;\n\n do if (0 > a(s[h], d[p])) {\n if (d[m--] = d[p--], b++, _ = 0, 0 == --t) {\n v = !0;\n break;\n }\n } else if (d[m--] = s[h--], _++, b = 0, 1 == --n) {\n v = !0;\n break;\n } while ((b | _) < f);\n\n if (v) break;\n\n do {\n if (b = t - l(s[h], d, e, t, t - 1, a), 0 != b) {\n for (m -= b, p -= b, t -= b, y = m + 1, g = p + 1, u = b - 1; 0 <= u; u--) d[y + u] = d[g + u];\n\n if (0 === t) {\n v = !0;\n break;\n }\n }\n\n if (d[m--] = s[h--], 1 == --n) {\n v = !0;\n break;\n }\n\n if (_ = n - r(d[p], s, 0, n, n - 1, a), 0 !== _) {\n for (m -= _, h -= _, n -= _, y = m + 1, g = h + 1, u = 0; u < _; u++) d[y + u] = s[g + u];\n\n if (1 >= n) {\n v = !0;\n break;\n }\n }\n\n if (d[m--] = d[p--], 0 == --t) {\n v = !0;\n break;\n }\n\n f--;\n } while (b >= c || _ >= c);\n\n if (v) break;\n 0 > f && (f = 0), f += 2;\n }\n\n if (this.minGallop = f, 1 > f && (this.minGallop = 1), 1 === n) {\n for (m -= t, p -= t, y = m + 1, g = p + 1, u = t - 1; 0 <= u; u--) d[y + u] = d[g + u];\n\n d[m] = s[h];\n } else if (0 === n) throw new Error(\"mergeHigh preconditions were not respected\");else for (g = m - (n - 1), u = 0; u < n; u++) d[g + u] = s[u];\n }, e;\n }();\n });\n});\n\nunwrapExports(timsort);\n\nvar timsort$1 = timsort,\n DirectionInterface = function () {\n function e() {\n classCallCheck$1(this, e);\n }\n\n return createClass$1(e, [{\n key: \"abstract\",\n value: function () {\n throw new Error(\"Can't instantiate abstract class!\");\n }\n }, {\n key: \"fake_use\",\n value: function () {}\n }, {\n key: \"curveType\",\n value: function () {\n return this.abstract();\n }\n }, {\n key: \"getPosition\",\n value: function (e) {\n return this.fake_use(e), this.abstract();\n }\n }, {\n key: \"setPosition\",\n value: function (e, t) {\n var o = 2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : void 0;\n this.fake_use(e, t, o), this.abstract();\n }\n }, {\n key: \"getTreeSize\",\n value: function (e) {\n return this.fake_use(e), this.abstract();\n }\n }, {\n key: \"sort\",\n value: function (e) {\n this.fake_use(e), this.abstract();\n }\n }, {\n key: \"fix\",\n value: function (e, t) {\n this.fake_use(e, t), this.abstract();\n }\n }, {\n key: \"shift\",\n value: function (e, t) {\n this.fake_use(e, t), this.abstract();\n }\n }]), e;\n}(),\n VerticalStrategy = function (e) {\n function t(e) {\n var o;\n return classCallCheck$1(this, t), o = possibleConstructorReturn$1(this, getPrototypeOf$1(t).call(this)), o.layout = e, o;\n }\n\n return inherits$1(t, e), createClass$1(t, [{\n key: \"curveType\",\n value: function () {\n return \"horizontal\";\n }\n }, {\n key: \"getPosition\",\n value: function (e) {\n return e.x;\n }\n }, {\n key: \"setPosition\",\n value: function (e, t) {\n var o = 2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : void 0;\n void 0 !== o && this.layout.hierarchical.addToOrdering(e, o), e.x = t;\n }\n }, {\n key: \"getTreeSize\",\n value: function (e) {\n var t = this.layout.hierarchical.getTreeSize(this.layout.body.nodes, e);\n return {\n min: t.min_x,\n max: t.max_x\n };\n }\n }, {\n key: \"sort\",\n value: function (e) {\n timsort$1.sort(e, function (e, t) {\n return e.x - t.x;\n });\n }\n }, {\n key: \"fix\",\n value: function (e, t) {\n e.y = this.layout.options.hierarchical.levelSeparation * t, e.options.fixed.y = !0;\n }\n }, {\n key: \"shift\",\n value: function (e, t) {\n this.layout.body.nodes[e].x += t;\n }\n }]), t;\n}(DirectionInterface),\n HorizontalStrategy = function (e) {\n function t(e) {\n var o;\n return classCallCheck$1(this, t), o = possibleConstructorReturn$1(this, getPrototypeOf$1(t).call(this)), o.layout = e, o;\n }\n\n return inherits$1(t, e), createClass$1(t, [{\n key: \"curveType\",\n value: function () {\n return \"vertical\";\n }\n }, {\n key: \"getPosition\",\n value: function (e) {\n return e.y;\n }\n }, {\n key: \"setPosition\",\n value: function (e, t) {\n var o = 2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : void 0;\n void 0 !== o && this.layout.hierarchical.addToOrdering(e, o), e.y = t;\n }\n }, {\n key: \"getTreeSize\",\n value: function (e) {\n var t = this.layout.hierarchical.getTreeSize(this.layout.body.nodes, e);\n return {\n min: t.min_y,\n max: t.max_y\n };\n }\n }, {\n key: \"sort\",\n value: function (e) {\n timsort$1.sort(e, function (e, t) {\n return e.y - t.y;\n });\n }\n }, {\n key: \"fix\",\n value: function (e, t) {\n e.x = this.layout.options.hierarchical.levelSeparation * t, e.options.fixed.x = !0;\n }\n }, {\n key: \"shift\",\n value: function (e, t) {\n this.layout.body.nodes[e].y += t;\n }\n }]), t;\n}(DirectionInterface),\n HierarchicalStatus = function () {\n var t = Math.max,\n o = Math.min;\n\n function e() {\n classCallCheck$1(this, e), this.childrenReference = {}, this.parentReference = {}, this.trees = {}, this.distributionOrdering = {}, this.levels = {}, this.distributionIndex = {}, this.isTree = !1, this.treeIndex = -1;\n }\n\n return createClass$1(e, [{\n key: \"addRelation\",\n value: function (e, t) {\n void 0 === this.childrenReference[e] && (this.childrenReference[e] = []), this.childrenReference[e].push(t), void 0 === this.parentReference[t] && (this.parentReference[t] = []), this.parentReference[t].push(e);\n }\n }, {\n key: \"checkIfTree\",\n value: function () {\n for (var e in this.parentReference) if (1 < this.parentReference[e].length) return void (this.isTree = !1);\n\n this.isTree = !0;\n }\n }, {\n key: \"numTrees\",\n value: function () {\n return this.treeIndex + 1;\n }\n }, {\n key: \"setTreeIndex\",\n value: function (e, o) {\n void 0 === o || void 0 === this.trees[e.id] && (this.trees[e.id] = o, this.treeIndex = t(o, this.treeIndex));\n }\n }, {\n key: \"ensureLevel\",\n value: function (e) {\n void 0 === this.levels[e] && (this.levels[e] = 0);\n }\n }, {\n key: \"getMaxLevel\",\n value: function (e) {\n var o = this,\n n = {},\n i = function e(a) {\n if (void 0 !== n[a]) return n[a];\n var d = o.levels[a];\n\n if (o.childrenReference[a]) {\n var s = o.childrenReference[a];\n if (0 < s.length) for (var r = 0; r < s.length; r++) d = t(d, e(s[r]));\n }\n\n return n[a] = d, d;\n };\n\n return i(e);\n }\n }, {\n key: \"levelDownstream\",\n value: function (e, t) {\n void 0 === this.levels[t.id] && (void 0 === this.levels[e.id] && (this.levels[e.id] = 0), this.levels[t.id] = this.levels[e.id] + 1);\n }\n }, {\n key: \"setMinLevelToZero\",\n value: function (e) {\n var t = 1e9;\n\n for (var n in e) e.hasOwnProperty(n) && void 0 !== this.levels[n] && (t = o(this.levels[n], t));\n\n for (var i in e) e.hasOwnProperty(i) && void 0 !== this.levels[i] && (this.levels[i] -= t);\n }\n }, {\n key: \"getTreeSize\",\n value: function (e, n) {\n var i = 1e9,\n a = -1e9,\n d = 1e9,\n s = -1e9;\n\n for (var r in this.trees) if (this.trees.hasOwnProperty(r) && this.trees[r] === n) {\n var l = e[r];\n i = o(l.x, i), a = t(l.x, a), d = o(l.y, d), s = t(l.y, s);\n }\n\n return {\n min_x: i,\n max_x: a,\n min_y: d,\n max_y: s\n };\n }\n }, {\n key: \"hasSameParent\",\n value: function (e, t) {\n var o = this.parentReference[e.id],\n n = this.parentReference[t.id];\n if (void 0 === o || void 0 === n) return !1;\n\n for (var a = 0; a < o.length; a++) for (var d = 0; d < n.length; d++) if (o[a] == n[d]) return !0;\n\n return !1;\n }\n }, {\n key: \"inSameSubNetwork\",\n value: function (e, t) {\n return this.trees[e.id] === this.trees[t.id];\n }\n }, {\n key: \"getLevels\",\n value: function () {\n return Object.keys(this.distributionOrdering);\n }\n }, {\n key: \"addToOrdering\",\n value: function (e, t) {\n void 0 === this.distributionOrdering[t] && (this.distributionOrdering[t] = []);\n var o = !1,\n i = this.distributionOrdering[t];\n\n for (var a in i) if (i[a] === e) {\n o = !0;\n break;\n }\n\n o || (this.distributionOrdering[t].push(e), this.distributionIndex[e.id] = this.distributionOrdering[t].length - 1);\n }\n }]), e;\n}(),\n LayoutEngine = function () {\n var t = Math.cos,\n o = Math.sin,\n n = Math.sqrt,\n a = Math.PI,\n d = Math.round,\n s = Math.pow,\n r = Math.max,\n l = Math.abs,\n c = Math.min,\n u = Math.floor;\n\n function e(t) {\n classCallCheck$1(this, e), this.body = t, this.initialRandomSeed = d(1e6 * Math.random()), this.randomSeed = this.initialRandomSeed, this.setPhysics = !1, this.options = {}, this.optionsBackup = {\n physics: {}\n }, this.defaultOptions = {\n randomSeed: void 0,\n improvedLayout: !0,\n hierarchical: {\n enabled: !1,\n levelSeparation: 150,\n nodeSpacing: 100,\n treeSpacing: 200,\n blockShifting: !0,\n edgeMinimization: !0,\n parentCentralization: !0,\n direction: \"UD\",\n sortMethod: \"hubsize\"\n }\n }, util.extend(this.options, this.defaultOptions), this.bindEventListeners();\n }\n\n return createClass$1(e, [{\n key: \"bindEventListeners\",\n value: function () {\n var e = this;\n this.body.emitter.on(\"_dataChanged\", function () {\n e.setupHierarchicalLayout();\n }), this.body.emitter.on(\"_dataLoaded\", function () {\n e.layoutNetwork();\n }), this.body.emitter.on(\"_resetHierarchicalLayout\", function () {\n e.setupHierarchicalLayout();\n }), this.body.emitter.on(\"_adjustEdgesForHierarchicalLayout\", function () {\n if (!0 === e.options.hierarchical.enabled) {\n var t = e.direction.curveType();\n e.body.emitter.emit(\"_forceDisableDynamicCurves\", t, !1);\n }\n });\n }\n }, {\n key: \"setOptions\",\n value: function (e, t) {\n if (void 0 !== e) {\n var o = this.options.hierarchical,\n n = o.enabled;\n if (util.selectiveDeepExtend([\"randomSeed\", \"improvedLayout\"], this.options, e), util.mergeOptions(this.options, e, \"hierarchical\"), void 0 !== e.randomSeed && (this.initialRandomSeed = e.randomSeed), !0 === o.enabled) return !0 === n && this.body.emitter.emit(\"refresh\", !0), \"RL\" === o.direction || \"DU\" === o.direction ? 0 < o.levelSeparation && (o.levelSeparation *= -1) : 0 > o.levelSeparation && (o.levelSeparation *= -1), this.setDirectionStrategy(), this.body.emitter.emit(\"_resetHierarchicalLayout\"), this.adaptAllOptionsForHierarchicalLayout(t);\n if (!0 === n) return this.body.emitter.emit(\"refresh\"), util.deepExtend(t, this.optionsBackup);\n }\n\n return t;\n }\n }, {\n key: \"adaptAllOptionsForHierarchicalLayout\",\n value: function (e) {\n if (!0 === this.options.hierarchical.enabled) {\n var t = this.optionsBackup.physics;\n void 0 === e.physics || !0 === e.physics ? (e.physics = {\n enabled: void 0 === t.enabled || t.enabled,\n solver: \"hierarchicalRepulsion\"\n }, t.enabled = void 0 === t.enabled || t.enabled, t.solver = t.solver || \"barnesHut\") : \"object\" === _typeof_1$1(e.physics) ? (t.enabled = void 0 === e.physics.enabled || e.physics.enabled, t.solver = e.physics.solver || \"barnesHut\", e.physics.solver = \"hierarchicalRepulsion\") : !1 !== e.physics && (t.solver = \"barnesHut\", e.physics = {\n solver: \"hierarchicalRepulsion\"\n });\n var o = this.direction.curveType();\n if (void 0 === e.edges) this.optionsBackup.edges = {\n smooth: {\n enabled: !0,\n type: \"dynamic\"\n }\n }, e.edges = {\n smooth: !1\n };else if (void 0 === e.edges.smooth) this.optionsBackup.edges = {\n smooth: {\n enabled: !0,\n type: \"dynamic\"\n }\n }, e.edges.smooth = !1;else if (\"boolean\" == typeof e.edges.smooth) this.optionsBackup.edges = {\n smooth: e.edges.smooth\n }, e.edges.smooth = {\n enabled: e.edges.smooth,\n type: o\n };else {\n var n = e.edges.smooth;\n void 0 !== n.type && \"dynamic\" !== n.type && (o = n.type), this.optionsBackup.edges = {\n smooth: void 0 === n.enabled || n.enabled,\n type: void 0 === n.type ? \"dynamic\" : n.type,\n roundness: void 0 === n.roundness ? .5 : n.roundness,\n forceDirection: void 0 !== n.forceDirection && n.forceDirection\n }, e.edges.smooth = {\n enabled: void 0 === n.enabled || n.enabled,\n type: o,\n roundness: void 0 === n.roundness ? .5 : n.roundness,\n forceDirection: void 0 !== n.forceDirection && n.forceDirection\n };\n }\n this.body.emitter.emit(\"_forceDisableDynamicCurves\", o);\n }\n\n return e;\n }\n }, {\n key: \"seededRandom\",\n value: function () {\n var e = 1e4 * o(this.randomSeed++);\n return e - u(e);\n }\n }, {\n key: \"positionInitially\",\n value: function (e) {\n if (!0 !== this.options.hierarchical.enabled) {\n this.randomSeed = this.initialRandomSeed;\n\n for (var n = e.length + 50, d = 0; d < e.length; d++) {\n var s = e[d],\n r = 2 * a * this.seededRandom();\n void 0 === s.x && (s.x = n * t(r)), void 0 === s.y && (s.y = n * o(r));\n }\n }\n }\n }, {\n key: \"layoutNetwork\",\n value: function () {\n if (!0 !== this.options.hierarchical.enabled && !0 === this.options.improvedLayout) {\n for (var e = this.body.nodeIndices, t = 0, o = 0, n; o < e.length; o++) n = this.body.nodes[e[o]], !0 === n.predefinedPosition && (t += 1);\n\n if (t < .5 * e.length) {\n var a = 0,\n d = 150,\n s = {\n clusterNodeProperties: {\n shape: \"ellipse\",\n label: \"\",\n group: \"\",\n font: {\n multi: !1\n }\n },\n clusterEdgeProperties: {\n label: \"\",\n font: {\n multi: !1\n },\n smooth: {\n enabled: !1\n }\n }\n };\n\n if (e.length > d) {\n for (var l = e.length; e.length > d && 10 >= a;) {\n a += 1;\n var c = e.length;\n 0 == a % 3 ? this.body.modules.clustering.clusterBridges(s) : this.body.modules.clustering.clusterOutliers(s);\n var u = e.length;\n if (c == u && 0 != a % 3) return this._declusterAll(), this.body.emitter.emit(\"_layoutFailed\"), void console.info(\"This network could not be positioned by this version of the improved layout algorithm. Please disable improvedLayout for better performance.\");\n }\n\n this.body.modules.kamadaKawai.setOptions({\n springLength: r(150, 2 * l)\n });\n }\n\n 10 < a && console.info(\"The clustering didn't succeed within the amount of interations allowed, progressing with partial result.\"), this.body.modules.kamadaKawai.solve(e, this.body.edgeIndices, !0), this._shiftToCenter();\n\n for (var p = 70, h = 0, m; h < e.length; h++) m = this.body.nodes[e[h]], !1 === m.predefinedPosition && (m.x += (.5 - this.seededRandom()) * p, m.y += (.5 - this.seededRandom()) * p);\n\n this._declusterAll(), this.body.emitter.emit(\"_repositionBezierNodes\");\n }\n }\n }\n }, {\n key: \"_shiftToCenter\",\n value: function () {\n for (var e = NetworkUtil.getRangeCore(this.body.nodes, this.body.nodeIndices), t = NetworkUtil.findCenter(e), o = 0, n; o < this.body.nodeIndices.length; o++) n = this.body.nodes[this.body.nodeIndices[o]], n.x -= t.x, n.y -= t.y;\n }\n }, {\n key: \"_declusterAll\",\n value: function () {\n for (var e = !0; !0 === e;) {\n e = !1;\n\n for (var t = 0; t < this.body.nodeIndices.length; t++) !0 === this.body.nodes[this.body.nodeIndices[t]].isCluster && (e = !0, this.body.modules.clustering.openCluster(this.body.nodeIndices[t], {}, !1));\n\n !0 === e && this.body.emitter.emit(\"_dataChanged\");\n }\n }\n }, {\n key: \"getSeed\",\n value: function () {\n return this.initialRandomSeed;\n }\n }, {\n key: \"setupHierarchicalLayout\",\n value: function () {\n if (!0 === this.options.hierarchical.enabled && 0 < this.body.nodeIndices.length) {\n var e = !1,\n t = !1,\n o,\n n;\n\n for (n in this.lastNodeOnLevel = {}, this.hierarchical = new HierarchicalStatus(), this.body.nodes) this.body.nodes.hasOwnProperty(n) && (o = this.body.nodes[n], void 0 === o.options.level ? t = !0 : (e = !0, this.hierarchical.levels[n] = o.options.level));\n\n if (!0 === t && !0 === e) throw new Error(\"To use the hierarchical layout, nodes require either no predefined levels or levels have to be defined for all nodes.\");else {\n if (!0 === t) {\n var i = this.options.hierarchical.sortMethod;\n \"hubsize\" === i ? this._determineLevelsByHubsize() : \"directed\" === i ? this._determineLevelsDirected() : \"custom\" === i && this._determineLevelsCustomCallback();\n }\n\n for (var a in this.body.nodes) this.body.nodes.hasOwnProperty(a) && this.hierarchical.ensureLevel(a);\n\n var d = this._getDistribution();\n\n this._generateMap(), this._placeNodesByHierarchy(d), this._condenseHierarchy(), this._shiftToCenter();\n }\n }\n }\n }, {\n key: \"_condenseHierarchy\",\n value: function () {\n var e = this,\n t = !1,\n o = {},\n i = function () {\n for (var t = u(), o = 0, n = 0, d; n < t.length - 1; n++) d = t[n].max - t[n + 1].min, o += d + e.options.hierarchical.treeSpacing, a(n + 1, o);\n },\n a = function (t, o) {\n var n = e.hierarchical.trees;\n\n for (var i in n) n.hasOwnProperty(i) && n[i] === t && e.direction.shift(i, o);\n },\n u = function () {\n for (var t = [], o = 0; o < e.hierarchical.numTrees(); o++) t.push(e.direction.getTreeSize(o));\n\n return t;\n },\n p = function t(o, n) {\n if (!n[o.id] && (n[o.id] = !0, e.hierarchical.childrenReference[o.id])) {\n var a = e.hierarchical.childrenReference[o.id];\n if (0 < a.length) for (var d = 0; d < a.length; d++) t(e.body.nodes[a[d]], n);\n }\n },\n h = function (t) {\n var o = 1 < arguments.length && void 0 !== arguments[1] ? arguments[1] : 1e9,\n n = 1e9,\n i = 1e9,\n a = 1e9,\n d = -1e9;\n\n for (var s in t) if (t.hasOwnProperty(s)) {\n var l = e.body.nodes[s],\n u = e.hierarchical.levels[l.id],\n p = e.direction.getPosition(l),\n h = e._getSpaceAroundNode(l, t),\n m = slicedToArray(h, 2),\n g = m[0],\n y = m[1];\n\n n = c(g, n), i = c(y, i), u <= o && (a = c(p, a), d = r(p, d));\n }\n\n return [a, d, n, i];\n },\n m = function (t, o) {\n var n = e.hierarchical.getMaxLevel(t.id),\n i = e.hierarchical.getMaxLevel(o.id);\n return c(n, i);\n },\n g = function (t, o, n) {\n for (var a = e.hierarchical, d = 0; d < o.length; d++) {\n var s = o[d],\n r = a.distributionOrdering[s];\n if (1 < r.length) for (var l = 0; l < r.length - 1; l++) {\n var c = r[l],\n u = r[l + 1];\n a.hasSameParent(c, u) && a.inSameSubNetwork(c, u) && t(c, u, n);\n }\n }\n },\n y = function (o, n) {\n var i = !!(2 < arguments.length && void 0 !== arguments[2]) && arguments[2],\n a = e.direction.getPosition(o),\n d = e.direction.getPosition(n),\n s = l(d - a),\n r = e.options.hierarchical.nodeSpacing;\n\n if (s > r) {\n var c = {},\n u = {};\n p(o, c), p(n, u);\n var g = m(o, n),\n y = h(c, g),\n f = h(u, g),\n b = y[1],\n _ = f[0],\n v = f[2],\n k = l(b - _);\n\n if (k > r) {\n var w = b - _ + r;\n w < -v + r && (w = -v + r), 0 > w && (e._shiftBlock(n.id, w), t = !0, !0 === i && e._centerParent(n));\n }\n }\n },\n f = function (a, l) {\n for (var u = l.id, m = l.edges, g = e.hierarchical.levels[l.id], y = e.options.hierarchical.levelSeparation * e.options.hierarchical.levelSeparation, f = {}, b = [], _ = 0, v; _ < m.length; _++) if (v = m[_], v.toId != v.fromId) {\n var k = v.toId == u ? v.from : v.to;\n f[m[_].id] = k, e.hierarchical.levels[k.id] < g && b.push(v);\n }\n\n var w = function (t, o) {\n for (var i = 0, d = 0; d < o.length; d++) if (void 0 !== f[o[d].id]) {\n var s = e.direction.getPosition(f[o[d].id]) - t;\n i += s / n(s * s + y);\n }\n\n return i;\n },\n x = function (t, o) {\n for (var n = 0, i = 0; i < o.length; i++) if (void 0 !== f[o[i].id]) {\n var d = e.direction.getPosition(f[o[i].id]) - t;\n n -= y * s(d * d + y, -1.5);\n }\n\n return n;\n },\n S = function (t, o) {\n for (var n = e.direction.getPosition(l), i = {}, a = 0; a < t; a++) {\n var s = w(n, o),\n u = x(n, o),\n p = 40,\n h = r(-p, c(p, d(s / u)));\n if (n -= h, void 0 !== i[n]) break;\n i[n] = a;\n }\n\n return n;\n },\n O = function (n) {\n var i = e.direction.getPosition(l);\n\n if (void 0 === o[l.id]) {\n var a = {};\n p(l, a), o[l.id] = a;\n }\n\n var d = h(o[l.id]),\n s = d[2],\n r = d[3],\n u = n - i,\n m = 0;\n 0 < u ? m = c(u, r - e.options.hierarchical.nodeSpacing) : 0 > u && (m = -c(-u, s - e.options.hierarchical.nodeSpacing)), 0 != m && (e._shiftBlock(l.id, m), t = !0);\n },\n D = function (o) {\n var n = e.direction.getPosition(l),\n i = e._getSpaceAroundNode(l),\n a = slicedToArray(i, 2),\n d = a[0],\n s = a[1],\n u = o - n,\n p = n;\n\n 0 < u ? p = c(n + (s - e.options.hierarchical.nodeSpacing), o) : 0 > u && (p = r(n - (d - e.options.hierarchical.nodeSpacing), o)), p !== n && (e.direction.setPosition(l, p), t = !0);\n },\n T = S(a, b);\n\n O(T), T = S(a, m), D(T);\n },\n b = function (o) {\n var n = e.hierarchical.getLevels();\n n = n.reverse();\n\n for (var a = 0; a < o; a++) {\n t = !1;\n\n for (var d = 0; d < n.length; d++) for (var s = n[d], r = e.hierarchical.distributionOrdering[s], l = 0; l < r.length; l++) f(1e3, r[l]);\n\n if (!0 !== t) break;\n }\n },\n _ = function (o) {\n var n = e.hierarchical.getLevels();\n n = n.reverse();\n\n for (var a = 0; a < o && (t = !1, g(y, n, !0), !0 === t); a++);\n },\n v = function () {\n var t = e.hierarchical.getLevels();\n t = t.reverse();\n\n for (var o = 0; o < t.length; o++) for (var n = t[o], a = e.hierarchical.distributionOrdering[n], d = 0; d < a.length; d++) e._centerParent(a[d]);\n };\n\n !0 === this.options.hierarchical.blockShifting && (_(5), function () {\n for (var t in e.body.nodes) e.body.nodes.hasOwnProperty(t) && e._centerParent(e.body.nodes[t]);\n }()), !0 === this.options.hierarchical.edgeMinimization && b(20), !0 === this.options.hierarchical.parentCentralization && v(), i();\n }\n }, {\n key: \"_getSpaceAroundNode\",\n value: function (e, t) {\n var o = !0;\n void 0 === t && (o = !1);\n var n = this.hierarchical.levels[e.id];\n\n if (void 0 !== n) {\n var i = this.hierarchical.distributionIndex[e.id],\n a = this.direction.getPosition(e),\n d = this.hierarchical.distributionOrdering[n],\n s = 1e9,\n r = 1e9;\n\n if (0 !== i) {\n var l = d[i - 1];\n\n if (!0 == o && void 0 === t[l.id] || !1 == o) {\n var u = this.direction.getPosition(l);\n s = a - u;\n }\n }\n\n if (i != d.length - 1) {\n var p = d[i + 1];\n\n if (!0 == o && void 0 === t[p.id] || !1 == o) {\n var h = this.direction.getPosition(p);\n r = c(r, h - a);\n }\n }\n\n return [s, r];\n }\n\n return [0, 0];\n }\n }, {\n key: \"_centerParent\",\n value: function (e) {\n if (this.hierarchical.parentReference[e.id]) for (var t = this.hierarchical.parentReference[e.id], o = 0; o < t.length; o++) {\n var n = t[o],\n a = this.body.nodes[n],\n d = this.hierarchical.childrenReference[n];\n\n if (void 0 !== d) {\n var s = this._getCenterPosition(d),\n r = this.direction.getPosition(a),\n c = this._getSpaceAroundNode(a),\n u = slicedToArray(c, 2),\n p = u[0],\n h = u[1],\n m = r - s;\n\n (0 > m && l(m) < h - this.options.hierarchical.nodeSpacing || 0 < m && l(m) < p - this.options.hierarchical.nodeSpacing) && this.direction.setPosition(a, s);\n }\n }\n }\n }, {\n key: \"_placeNodesByHierarchy\",\n value: function (e) {\n for (var t in this.positionedNodes = {}, e) if (e.hasOwnProperty(t)) {\n var o = Object.keys(e[t]);\n o = this._indexArrayToNodes(o), this.direction.sort(o);\n\n for (var n = 0, a = 0, d; a < o.length; a++) if (d = o[a], void 0 === this.positionedNodes[d.id]) {\n var s = this.options.hierarchical.nodeSpacing,\n r = s * n;\n 0 < n && (r = this.direction.getPosition(o[a - 1]) + s), this.direction.setPosition(d, r, t), this._validatePositionAndContinue(d, t, r), n++;\n }\n }\n }\n }, {\n key: \"_placeBranchNodes\",\n value: function (e, t) {\n var o = this.hierarchical.childrenReference[e];\n\n if (void 0 !== o) {\n for (var n = [], a = 0; a < o.length; a++) n.push(this.body.nodes[o[a]]);\n\n this.direction.sort(n);\n\n for (var d = 0; d < n.length; d++) {\n var s = n[d],\n r = this.hierarchical.levels[s.id];\n\n if (r > t && void 0 === this.positionedNodes[s.id]) {\n var l = this.options.hierarchical.nodeSpacing,\n c = void 0;\n c = 0 == d ? this.direction.getPosition(this.body.nodes[e]) : this.direction.getPosition(n[d - 1]) + l, this.direction.setPosition(s, c, r), this._validatePositionAndContinue(s, r, c);\n } else return;\n }\n\n var u = this._getCenterPosition(n);\n\n this.direction.setPosition(this.body.nodes[e], u, t);\n }\n }\n }, {\n key: \"_validatePositionAndContinue\",\n value: function (e, t, o) {\n if (this.hierarchical.isTree) {\n if (void 0 !== this.lastNodeOnLevel[t]) {\n var n = this.direction.getPosition(this.body.nodes[this.lastNodeOnLevel[t]]);\n\n if (o - n < this.options.hierarchical.nodeSpacing) {\n var i = n + this.options.hierarchical.nodeSpacing - o,\n a = this._findCommonParent(this.lastNodeOnLevel[t], e.id);\n\n this._shiftBlock(a.withChild, i);\n }\n }\n\n this.lastNodeOnLevel[t] = e.id, this.positionedNodes[e.id] = !0, this._placeBranchNodes(e.id, t);\n }\n }\n }, {\n key: \"_indexArrayToNodes\",\n value: function (e) {\n for (var t = [], o = 0; o < e.length; o++) t.push(this.body.nodes[e[o]]);\n\n return t;\n }\n }, {\n key: \"_getDistribution\",\n value: function () {\n var e = {},\n t,\n o;\n\n for (t in this.body.nodes) if (this.body.nodes.hasOwnProperty(t)) {\n o = this.body.nodes[t];\n var n = void 0 === this.hierarchical.levels[t] ? 0 : this.hierarchical.levels[t];\n this.direction.fix(o, n), void 0 === e[n] && (e[n] = {}), e[n][t] = o;\n }\n\n return e;\n }\n }, {\n key: \"_getActiveEdges\",\n value: function (e) {\n var t = this,\n o = [];\n return util.forEach(e.edges, function (e) {\n -1 !== t.body.edgeIndices.indexOf(e.id) && o.push(e);\n }), o;\n }\n }, {\n key: \"_getHubSizes\",\n value: function () {\n var e = this,\n t = {},\n o = this.body.nodeIndices;\n util.forEach(o, function (o) {\n var n = e.body.nodes[o],\n i = e._getActiveEdges(n).length;\n\n t[i] = !0;\n });\n var n = [];\n return util.forEach(t, function (e) {\n n.push(+e);\n }), timsort$1.sort(n, function (e, t) {\n return t - e;\n }), n;\n }\n }, {\n key: \"_determineLevelsByHubsize\",\n value: function () {\n for (var e = this, t = function (t, o) {\n e.hierarchical.levelDownstream(t, o);\n }, o = this._getHubSizes(), n = function (n) {\n var i = o[n];\n return 0 === i ? \"break\" : void util.forEach(e.body.nodeIndices, function (o) {\n var n = e.body.nodes[o];\n i === e._getActiveEdges(n).length && e._crawlNetwork(t, o);\n });\n }, a = 0, d; a < o.length && (d = n(a), \"break\" !== d); ++a);\n }\n }, {\n key: \"_determineLevelsCustomCallback\",\n value: function () {\n var e = this,\n t = function () {};\n\n this._crawlNetwork(function (o, n, i) {\n var a = e.hierarchical.levels[o.id];\n void 0 === a && (a = e.hierarchical.levels[o.id] = 1e5);\n var d = t(NetworkUtil.cloneOptions(o, \"node\"), NetworkUtil.cloneOptions(n, \"node\"), NetworkUtil.cloneOptions(i, \"edge\"));\n e.hierarchical.levels[n.id] = a + d;\n }), this.hierarchical.setMinLevelToZero(this.body.nodes);\n }\n }, {\n key: \"_determineLevelsDirected\",\n value: function () {\n var e = this,\n t = function (t) {\n return util.forEach(e.body.edges, function (e) {\n if (e.toId === t.fromId && e.fromId === t.toId) return !0;\n }), !1;\n };\n\n this._crawlNetwork(function (o, n, i) {\n var a = e.hierarchical.levels[o.id],\n d = e.hierarchical.levels[n.id];\n if (t(i)) ;\n void 0 === a && (a = e.hierarchical.levels[o.id] = 1e4), e.hierarchical.levels[n.id] = i.toId == n.id ? a + 1 : a - 1;\n }), this.hierarchical.setMinLevelToZero(this.body.nodes);\n }\n }, {\n key: \"_generateMap\",\n value: function () {\n var e = this;\n this._crawlNetwork(function (t, o) {\n e.hierarchical.levels[o.id] > e.hierarchical.levels[t.id] && e.hierarchical.addRelation(t.id, o.id);\n }), this.hierarchical.checkIfTree();\n }\n }, {\n key: \"_crawlNetwork\",\n value: function () {\n var e = this,\n t = 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : function () {},\n o = 1 < arguments.length ? arguments[1] : void 0,\n n = {},\n a = function o(a, d) {\n if (void 0 === n[a.id]) {\n e.hierarchical.setTreeIndex(a, d), n[a.id] = !0;\n\n for (var s = e._getActiveEdges(a), r = 0, l, c; r < s.length; r++) c = s[r], !0 === c.connected && (l = c.toId == a.id ? c.from : c.to, a.id != l.id && (t(a, l, c), o(l, d)));\n }\n };\n\n if (void 0 === o) {\n for (var d = 0, s = 0, r; s < this.body.nodeIndices.length; s++) if (r = this.body.nodeIndices[s], void 0 === n[r]) {\n var l = this.body.nodes[r];\n a(l, d), d += 1;\n }\n } else {\n var c = this.body.nodes[o];\n if (void 0 === c) return void console.error(\"Node not found:\", o);\n a(c);\n }\n }\n }, {\n key: \"_shiftBlock\",\n value: function (e, t) {\n var o = this,\n n = {},\n i = function e(a) {\n if (!n[a]) {\n n[a] = !0, o.direction.shift(a, t);\n var d = o.hierarchical.childrenReference[a];\n if (void 0 !== d) for (var s = 0; s < d.length; s++) e(d[s]);\n }\n };\n\n i(e);\n }\n }, {\n key: \"_findCommonParent\",\n value: function (e, t) {\n var o = this,\n n = {},\n i = function e(t, n) {\n var a = o.hierarchical.parentReference[n];\n if (void 0 !== a) for (var d = 0, s; d < a.length; d++) s = a[d], t[s] = !0, e(t, s);\n },\n a = function e(t, n) {\n var a = o.hierarchical.parentReference[n];\n if (void 0 !== a) for (var d = 0, s; d < a.length; d++) {\n if (s = a[d], void 0 !== t[s]) return {\n foundParent: s,\n withChild: n\n };\n var r = e(t, s);\n if (null !== r.foundParent) return r;\n }\n return {\n foundParent: null,\n withChild: n\n };\n };\n\n return i(n, e), a(n, t);\n }\n }, {\n key: \"setDirectionStrategy\",\n value: function () {\n var e = \"UD\" === this.options.hierarchical.direction || \"DU\" === this.options.hierarchical.direction;\n this.direction = e ? new VerticalStrategy(this) : new HorizontalStrategy(this);\n }\n }, {\n key: \"_getCenterPosition\",\n value: function (e) {\n for (var t = 1e9, o = -1e9, n = 0, a; n < e.length; n++) {\n if (a = void 0, void 0 !== e[n].id) a = e[n];else {\n var d = e[n];\n a = this.body.nodes[d];\n }\n var s = this.direction.getPosition(a);\n t = c(t, s), o = r(o, s);\n }\n\n return .5 * (t + o);\n }\n }]), e;\n}(),\n ManipulationSystem = function () {\n function e(t, o, n) {\n var i = this;\n classCallCheck$1(this, e), this.body = t, this.canvas = o, this.selectionHandler = n, this.editMode = !1, this.manipulationDiv = void 0, this.editModeDiv = void 0, this.closeDiv = void 0, this.manipulationHammers = [], this.temporaryUIFunctions = {}, this.temporaryEventFunctions = [], this.touchTime = 0, this.temporaryIds = {\n nodes: [],\n edges: []\n }, this.guiEnabled = !1, this.inMode = !1, this.selectedControlNode = void 0, this.options = {}, this.defaultOptions = {\n enabled: !1,\n initiallyActive: !1,\n addNode: !0,\n addEdge: !0,\n editNode: void 0,\n editEdge: !0,\n deleteNode: !0,\n deleteEdge: !0,\n controlNodeStyle: {\n shape: \"dot\",\n size: 6,\n color: {\n background: \"#ff0000\",\n border: \"#3c3c3c\",\n highlight: {\n background: \"#07f968\",\n border: \"#3c3c3c\"\n }\n },\n borderWidth: 2,\n borderWidthSelected: 2\n }\n }, util.extend(this.options, this.defaultOptions), this.body.emitter.on(\"destroy\", function () {\n i._clean();\n }), this.body.emitter.on(\"_dataChanged\", this._restore.bind(this)), this.body.emitter.on(\"_resetData\", this._restore.bind(this));\n }\n\n return createClass$1(e, [{\n key: \"_restore\",\n value: function () {\n !1 !== this.inMode && (!0 === this.options.initiallyActive ? this.enableEditMode() : this.disableEditMode());\n }\n }, {\n key: \"setOptions\",\n value: function (e, t, o) {\n void 0 !== t && (this.options.locale = void 0 === t.locale ? o.locale : t.locale, this.options.locales = void 0 === t.locales ? o.locales : t.locales), void 0 !== e && (\"boolean\" == typeof e ? this.options.enabled = e : (this.options.enabled = !0, util.deepExtend(this.options, e)), !0 === this.options.initiallyActive && (this.editMode = !0), this._setup());\n }\n }, {\n key: \"toggleEditMode\",\n value: function () {\n !0 === this.editMode ? this.disableEditMode() : this.enableEditMode();\n }\n }, {\n key: \"enableEditMode\",\n value: function () {\n this.editMode = !0, this._clean(), !0 === this.guiEnabled && (this.manipulationDiv.style.display = \"block\", this.closeDiv.style.display = \"block\", this.editModeDiv.style.display = \"none\", this.showManipulatorToolbar());\n }\n }, {\n key: \"disableEditMode\",\n value: function () {\n this.editMode = !1, this._clean(), !0 === this.guiEnabled && (this.manipulationDiv.style.display = \"none\", this.closeDiv.style.display = \"none\", this.editModeDiv.style.display = \"block\", this._createEditButton());\n }\n }, {\n key: \"showManipulatorToolbar\",\n value: function () {\n if (this._clean(), this.manipulationDOM = {}, !0 === this.guiEnabled) {\n this.editMode = !0, this.manipulationDiv.style.display = \"block\", this.closeDiv.style.display = \"block\";\n\n var e = this.selectionHandler._getSelectedNodeCount(),\n t = this.selectionHandler._getSelectedEdgeCount(),\n o = this.options.locales[this.options.locale],\n n = !1;\n\n !1 !== this.options.addNode && (this._createAddNodeButton(o), n = !0), !1 !== this.options.addEdge && (!0 === n ? this._createSeperator(1) : n = !0, this._createAddEdgeButton(o)), 1 === e && \"function\" == typeof this.options.editNode ? (!0 === n ? this._createSeperator(2) : n = !0, this._createEditNodeButton(o)) : 1 === t && 0 === e && !1 !== this.options.editEdge && (!0 === n ? this._createSeperator(3) : n = !0, this._createEditEdgeButton(o)), 0 !== e + t && (0 < e && !1 !== this.options.deleteNode ? (!0 === n && this._createSeperator(4), this._createDeleteButton(o)) : 0 === e && !1 !== this.options.deleteEdge && (!0 === n && this._createSeperator(4), this._createDeleteButton(o))), this._bindHammerToDiv(this.closeDiv, this.toggleEditMode.bind(this)), this._temporaryBindEvent(\"select\", this.showManipulatorToolbar.bind(this));\n }\n\n this.body.emitter.emit(\"_redraw\");\n }\n }, {\n key: \"addNodeMode\",\n value: function () {\n if (!0 !== this.editMode && this.enableEditMode(), this._clean(), this.inMode = \"addNode\", !0 === this.guiEnabled) {\n var e = this.options.locales[this.options.locale];\n this.manipulationDOM = {}, this._createBackButton(e), this._createSeperator(), this._createDescription(e.addDescription || this.options.locales.en.addDescription), this._bindHammerToDiv(this.closeDiv, this.toggleEditMode.bind(this));\n }\n\n this._temporaryBindEvent(\"click\", this._performAddNode.bind(this));\n }\n }, {\n key: \"editNode\",\n value: function () {\n var e = this;\n !0 !== this.editMode && this.enableEditMode(), this._clean();\n\n var t = this.selectionHandler._getSelectedNode();\n\n if (void 0 === t) this.showManipulatorToolbar();else if (this.inMode = \"editNode\", \"function\" != typeof this.options.editNode) throw new Error(\"No function has been configured to handle the editing of nodes.\");else if (!0 !== t.isCluster) {\n var o = util.deepExtend({}, t.options, !1);\n if (o.x = t.x, o.y = t.y, 2 === this.options.editNode.length) this.options.editNode(o, function (t) {\n null !== t && void 0 !== t && \"editNode\" === e.inMode && e.body.data.nodes.getDataSet().update(t), e.showManipulatorToolbar();\n });else throw new Error(\"The function for edit does not support two arguments (data, callback)\");\n } else alert(this.options.locales[this.options.locale].editClusterError || this.options.locales.en.editClusterError);\n }\n }, {\n key: \"addEdgeMode\",\n value: function () {\n if (!0 !== this.editMode && this.enableEditMode(), this._clean(), this.inMode = \"addEdge\", !0 === this.guiEnabled) {\n var e = this.options.locales[this.options.locale];\n this.manipulationDOM = {}, this._createBackButton(e), this._createSeperator(), this._createDescription(e.edgeDescription || this.options.locales.en.edgeDescription), this._bindHammerToDiv(this.closeDiv, this.toggleEditMode.bind(this));\n }\n\n this._temporaryBindUI(\"onTouch\", this._handleConnect.bind(this)), this._temporaryBindUI(\"onDragEnd\", this._finishConnect.bind(this)), this._temporaryBindUI(\"onDrag\", this._dragControlNode.bind(this)), this._temporaryBindUI(\"onRelease\", this._finishConnect.bind(this)), this._temporaryBindUI(\"onDragStart\", this._dragStartEdge.bind(this)), this._temporaryBindUI(\"onHold\", function () {});\n }\n }, {\n key: \"editEdgeMode\",\n value: function () {\n if (!0 !== this.editMode && this.enableEditMode(), this._clean(), this.inMode = \"editEdge\", \"object\" === _typeof_1$1(this.options.editEdge) && \"function\" == typeof this.options.editEdge.editWithoutDrag && (this.edgeBeingEditedId = this.selectionHandler.getSelectedEdges()[0], void 0 !== this.edgeBeingEditedId)) {\n var e = this.body.edges[this.edgeBeingEditedId];\n return void this._performEditEdge(e.from, e.to);\n }\n\n if (!0 === this.guiEnabled) {\n var t = this.options.locales[this.options.locale];\n this.manipulationDOM = {}, this._createBackButton(t), this._createSeperator(), this._createDescription(t.editEdgeDescription || this.options.locales.en.editEdgeDescription), this._bindHammerToDiv(this.closeDiv, this.toggleEditMode.bind(this));\n }\n\n if (this.edgeBeingEditedId = this.selectionHandler.getSelectedEdges()[0], void 0 !== this.edgeBeingEditedId) {\n var o = this.body.edges[this.edgeBeingEditedId],\n n = this._getNewTargetNode(o.from.x, o.from.y),\n i = this._getNewTargetNode(o.to.x, o.to.y);\n\n this.temporaryIds.nodes.push(n.id), this.temporaryIds.nodes.push(i.id), this.body.nodes[n.id] = n, this.body.nodeIndices.push(n.id), this.body.nodes[i.id] = i, this.body.nodeIndices.push(i.id), this._temporaryBindUI(\"onTouch\", this._controlNodeTouch.bind(this)), this._temporaryBindUI(\"onTap\", function () {}), this._temporaryBindUI(\"onHold\", function () {}), this._temporaryBindUI(\"onDragStart\", this._controlNodeDragStart.bind(this)), this._temporaryBindUI(\"onDrag\", this._controlNodeDrag.bind(this)), this._temporaryBindUI(\"onDragEnd\", this._controlNodeDragEnd.bind(this)), this._temporaryBindUI(\"onMouseMove\", function () {}), this._temporaryBindEvent(\"beforeDrawing\", function (e) {\n var t = o.edgeType.findBorderPositions(e);\n !1 === n.selected && (n.x = t.from.x, n.y = t.from.y), !1 === i.selected && (i.x = t.to.x, i.y = t.to.y);\n }), this.body.emitter.emit(\"_redraw\");\n } else this.showManipulatorToolbar();\n }\n }, {\n key: \"deleteSelected\",\n value: function () {\n var e = this;\n !0 !== this.editMode && this.enableEditMode(), this._clean(), this.inMode = \"delete\";\n var t = this.selectionHandler.getSelectedNodes(),\n o = this.selectionHandler.getSelectedEdges(),\n n = void 0;\n\n if (0 < t.length) {\n for (var a = 0; a < t.length; a++) if (!0 === this.body.nodes[t[a]].isCluster) return void alert(this.options.locales[this.options.locale].deleteClusterError || this.options.locales.en.deleteClusterError);\n\n \"function\" == typeof this.options.deleteNode && (n = this.options.deleteNode);\n } else 0 < o.length && \"function\" == typeof this.options.deleteEdge && (n = this.options.deleteEdge);\n\n if (\"function\" == typeof n) {\n if (2 === n.length) n({\n nodes: t,\n edges: o\n }, function (t) {\n null !== t && void 0 !== t && \"delete\" === e.inMode ? (e.body.data.edges.getDataSet().remove(t.edges), e.body.data.nodes.getDataSet().remove(t.nodes), e.body.emitter.emit(\"startSimulation\"), e.showManipulatorToolbar()) : (e.body.emitter.emit(\"startSimulation\"), e.showManipulatorToolbar());\n });else throw new Error(\"The function for delete does not support two arguments (data, callback)\");\n } else this.body.data.edges.getDataSet().remove(o), this.body.data.nodes.getDataSet().remove(t), this.body.emitter.emit(\"startSimulation\"), this.showManipulatorToolbar();\n }\n }, {\n key: \"_setup\",\n value: function () {\n !0 === this.options.enabled ? (this.guiEnabled = !0, this._createWrappers(), !1 === this.editMode ? this._createEditButton() : this.showManipulatorToolbar()) : (this._removeManipulationDOM(), this.guiEnabled = !1);\n }\n }, {\n key: \"_createWrappers\",\n value: function () {\n void 0 === this.manipulationDiv && (this.manipulationDiv = document.createElement(\"div\"), this.manipulationDiv.className = \"vis-manipulation\", this.manipulationDiv.style.display = !0 === this.editMode ? \"block\" : \"none\", this.canvas.frame.appendChild(this.manipulationDiv)), void 0 === this.editModeDiv && (this.editModeDiv = document.createElement(\"div\"), this.editModeDiv.className = \"vis-edit-mode\", this.editModeDiv.style.display = !0 === this.editMode ? \"none\" : \"block\", this.canvas.frame.appendChild(this.editModeDiv)), void 0 === this.closeDiv && (this.closeDiv = document.createElement(\"div\"), this.closeDiv.className = \"vis-close\", this.closeDiv.style.display = this.manipulationDiv.style.display, this.canvas.frame.appendChild(this.closeDiv));\n }\n }, {\n key: \"_getNewTargetNode\",\n value: function (e, t) {\n var o = util.deepExtend({}, this.options.controlNodeStyle);\n o.id = \"targetNode\" + util.randomUUID(), o.hidden = !1, o.physics = !1, o.x = e, o.y = t;\n var n = this.body.functions.createNode(o);\n return n.shape.boundingBox = {\n left: e,\n right: e,\n top: t,\n bottom: t\n }, n;\n }\n }, {\n key: \"_createEditButton\",\n value: function () {\n this._clean(), this.manipulationDOM = {}, util.recursiveDOMDelete(this.editModeDiv);\n\n var e = this.options.locales[this.options.locale],\n t = this._createButton(\"editMode\", \"vis-button vis-edit vis-edit-mode\", e.edit || this.options.locales.en.edit);\n\n this.editModeDiv.appendChild(t), this._bindHammerToDiv(t, this.toggleEditMode.bind(this));\n }\n }, {\n key: \"_clean\",\n value: function () {\n this.inMode = !1, !0 === this.guiEnabled && (util.recursiveDOMDelete(this.editModeDiv), util.recursiveDOMDelete(this.manipulationDiv), this._cleanManipulatorHammers()), this._cleanupTemporaryNodesAndEdges(), this._unbindTemporaryUIs(), this._unbindTemporaryEvents(), this.body.emitter.emit(\"restorePhysics\");\n }\n }, {\n key: \"_cleanManipulatorHammers\",\n value: function () {\n if (0 != this.manipulationHammers.length) {\n for (var e = 0; e < this.manipulationHammers.length; e++) this.manipulationHammers[e].destroy();\n\n this.manipulationHammers = [];\n }\n }\n }, {\n key: \"_removeManipulationDOM\",\n value: function () {\n this._clean(), util.recursiveDOMDelete(this.manipulationDiv), util.recursiveDOMDelete(this.editModeDiv), util.recursiveDOMDelete(this.closeDiv), this.manipulationDiv && this.canvas.frame.removeChild(this.manipulationDiv), this.editModeDiv && this.canvas.frame.removeChild(this.editModeDiv), this.closeDiv && this.canvas.frame.removeChild(this.closeDiv), this.manipulationDiv = void 0, this.editModeDiv = void 0, this.closeDiv = void 0;\n }\n }, {\n key: \"_createSeperator\",\n value: function () {\n var e = 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : 1;\n this.manipulationDOM[\"seperatorLineDiv\" + e] = document.createElement(\"div\"), this.manipulationDOM[\"seperatorLineDiv\" + e].className = \"vis-separator-line\", this.manipulationDiv.appendChild(this.manipulationDOM[\"seperatorLineDiv\" + e]);\n }\n }, {\n key: \"_createAddNodeButton\",\n value: function (e) {\n var t = this._createButton(\"addNode\", \"vis-button vis-add\", e.addNode || this.options.locales.en.addNode);\n\n this.manipulationDiv.appendChild(t), this._bindHammerToDiv(t, this.addNodeMode.bind(this));\n }\n }, {\n key: \"_createAddEdgeButton\",\n value: function (e) {\n var t = this._createButton(\"addEdge\", \"vis-button vis-connect\", e.addEdge || this.options.locales.en.addEdge);\n\n this.manipulationDiv.appendChild(t), this._bindHammerToDiv(t, this.addEdgeMode.bind(this));\n }\n }, {\n key: \"_createEditNodeButton\",\n value: function (e) {\n var t = this._createButton(\"editNode\", \"vis-button vis-edit\", e.editNode || this.options.locales.en.editNode);\n\n this.manipulationDiv.appendChild(t), this._bindHammerToDiv(t, this.editNode.bind(this));\n }\n }, {\n key: \"_createEditEdgeButton\",\n value: function (e) {\n var t = this._createButton(\"editEdge\", \"vis-button vis-edit\", e.editEdge || this.options.locales.en.editEdge);\n\n this.manipulationDiv.appendChild(t), this._bindHammerToDiv(t, this.editEdgeMode.bind(this));\n }\n }, {\n key: \"_createDeleteButton\",\n value: function (e) {\n var t = this.options.rtl ? \"vis-button vis-delete-rtl\" : \"vis-button vis-delete\";\n\n var o = this._createButton(\"delete\", t, e.del || this.options.locales.en.del);\n\n this.manipulationDiv.appendChild(o), this._bindHammerToDiv(o, this.deleteSelected.bind(this));\n }\n }, {\n key: \"_createBackButton\",\n value: function (e) {\n var t = this._createButton(\"back\", \"vis-button vis-back\", e.back || this.options.locales.en.back);\n\n this.manipulationDiv.appendChild(t), this._bindHammerToDiv(t, this.showManipulatorToolbar.bind(this));\n }\n }, {\n key: \"_createButton\",\n value: function (e, t, o) {\n var n = 3 < arguments.length && void 0 !== arguments[3] ? arguments[3] : \"vis-label\";\n return this.manipulationDOM[e + \"Div\"] = document.createElement(\"div\"), this.manipulationDOM[e + \"Div\"].className = t, this.manipulationDOM[e + \"Label\"] = document.createElement(\"div\"), this.manipulationDOM[e + \"Label\"].className = n, this.manipulationDOM[e + \"Label\"].innerHTML = o, this.manipulationDOM[e + \"Div\"].appendChild(this.manipulationDOM[e + \"Label\"]), this.manipulationDOM[e + \"Div\"];\n }\n }, {\n key: \"_createDescription\",\n value: function (e) {\n this.manipulationDiv.appendChild(this._createButton(\"description\", \"vis-button vis-none\", e));\n }\n }, {\n key: \"_temporaryBindEvent\",\n value: function (e, t) {\n this.temporaryEventFunctions.push({\n event: e,\n boundFunction: t\n }), this.body.emitter.on(e, t);\n }\n }, {\n key: \"_temporaryBindUI\",\n value: function (e, t) {\n if (void 0 !== this.body.eventListeners[e]) this.temporaryUIFunctions[e] = this.body.eventListeners[e], this.body.eventListeners[e] = t;else throw new Error(\"This UI function does not exist. Typo? You tried: \" + e + \" possible are: \" + JSON.stringify(Object.keys(this.body.eventListeners)));\n }\n }, {\n key: \"_unbindTemporaryUIs\",\n value: function () {\n for (var e in this.temporaryUIFunctions) this.temporaryUIFunctions.hasOwnProperty(e) && (this.body.eventListeners[e] = this.temporaryUIFunctions[e], delete this.temporaryUIFunctions[e]);\n\n this.temporaryUIFunctions = {};\n }\n }, {\n key: \"_unbindTemporaryEvents\",\n value: function () {\n for (var e = 0; e < this.temporaryEventFunctions.length; e++) {\n var t = this.temporaryEventFunctions[e].event,\n o = this.temporaryEventFunctions[e].boundFunction;\n this.body.emitter.off(t, o);\n }\n\n this.temporaryEventFunctions = [];\n }\n }, {\n key: \"_bindHammerToDiv\",\n value: function (e, t) {\n var o = new hammer(e, {});\n hammerUtil.onTouch(o, t), this.manipulationHammers.push(o);\n }\n }, {\n key: \"_cleanupTemporaryNodesAndEdges\",\n value: function () {\n for (var e = 0; e < this.temporaryIds.edges.length; e++) {\n this.body.edges[this.temporaryIds.edges[e]].disconnect(), delete this.body.edges[this.temporaryIds.edges[e]];\n var t = this.body.edgeIndices.indexOf(this.temporaryIds.edges[e]);\n -1 !== t && this.body.edgeIndices.splice(t, 1);\n }\n\n for (var o = 0; o < this.temporaryIds.nodes.length; o++) {\n delete this.body.nodes[this.temporaryIds.nodes[o]];\n var n = this.body.nodeIndices.indexOf(this.temporaryIds.nodes[o]);\n -1 !== n && this.body.nodeIndices.splice(n, 1);\n }\n\n this.temporaryIds = {\n nodes: [],\n edges: []\n };\n }\n }, {\n key: \"_controlNodeTouch\",\n value: function (e) {\n this.selectionHandler.unselectAll(), this.lastTouch = this.body.functions.getPointer(e.center), this.lastTouch.translation = util.extend({}, this.body.view.translation);\n }\n }, {\n key: \"_controlNodeDragStart\",\n value: function () {\n var e = this.lastTouch,\n t = this.selectionHandler._pointerToPositionObject(e),\n o = this.body.nodes[this.temporaryIds.nodes[0]],\n n = this.body.nodes[this.temporaryIds.nodes[1]],\n i = this.body.edges[this.edgeBeingEditedId];\n\n this.selectedControlNode = void 0;\n var a = o.isOverlappingWith(t),\n d = n.isOverlappingWith(t);\n !0 === a ? (this.selectedControlNode = o, i.edgeType.from = o) : !0 === d && (this.selectedControlNode = n, i.edgeType.to = n), void 0 !== this.selectedControlNode && this.selectionHandler.selectObject(this.selectedControlNode), this.body.emitter.emit(\"_redraw\");\n }\n }, {\n key: \"_controlNodeDrag\",\n value: function (e) {\n this.body.emitter.emit(\"disablePhysics\");\n var t = this.body.functions.getPointer(e.center),\n o = this.canvas.DOMtoCanvas(t);\n if (void 0 !== this.selectedControlNode) this.selectedControlNode.x = o.x, this.selectedControlNode.y = o.y;else {\n var n = t.x - this.lastTouch.x,\n i = t.y - this.lastTouch.y;\n this.body.view.translation = {\n x: this.lastTouch.translation.x + n,\n y: this.lastTouch.translation.y + i\n };\n }\n this.body.emitter.emit(\"_redraw\");\n }\n }, {\n key: \"_controlNodeDragEnd\",\n value: function (e) {\n var t = this.body.functions.getPointer(e.center),\n o = this.selectionHandler._pointerToPositionObject(t),\n n = this.body.edges[this.edgeBeingEditedId];\n\n if (void 0 !== this.selectedControlNode) {\n this.selectionHandler.unselectAll();\n\n for (var a = this.selectionHandler._getAllNodesOverlappingWith(o), d = void 0, s = a.length - 1; 0 <= s; s--) if (a[s] !== this.selectedControlNode.id) {\n d = this.body.nodes[a[s]];\n break;\n }\n\n if (void 0 === d || void 0 === this.selectedControlNode) n.updateEdgeType(), this.body.emitter.emit(\"restorePhysics\");else if (!0 === d.isCluster) alert(this.options.locales[this.options.locale].createEdgeError || this.options.locales.en.createEdgeError);else {\n var r = this.body.nodes[this.temporaryIds.nodes[0]];\n this.selectedControlNode.id === r.id ? this._performEditEdge(d.id, n.to.id) : this._performEditEdge(n.from.id, d.id);\n }\n this.body.emitter.emit(\"_redraw\");\n }\n }\n }, {\n key: \"_handleConnect\",\n value: function (e) {\n if (100 < new Date().valueOf() - this.touchTime) {\n this.lastTouch = this.body.functions.getPointer(e.center), this.lastTouch.translation = util.extend({}, this.body.view.translation);\n var t = this.lastTouch,\n o = this.selectionHandler.getNodeAt(t);\n if (void 0 !== o) if (!0 === o.isCluster) alert(this.options.locales[this.options.locale].createEdgeError || this.options.locales.en.createEdgeError);else {\n var n = this._getNewTargetNode(o.x, o.y);\n\n this.body.nodes[n.id] = n, this.body.nodeIndices.push(n.id);\n var i = this.body.functions.createEdge({\n id: \"connectionEdge\" + util.randomUUID(),\n from: o.id,\n to: n.id,\n physics: !1,\n smooth: {\n enabled: !0,\n type: \"continuous\",\n roundness: .5\n }\n });\n this.body.edges[i.id] = i, this.body.edgeIndices.push(i.id), this.temporaryIds.nodes.push(n.id), this.temporaryIds.edges.push(i.id);\n }\n this.touchTime = new Date().valueOf();\n }\n }\n }, {\n key: \"_dragControlNode\",\n value: function (e) {\n var t = this.body.functions.getPointer(e.center),\n o = this.selectionHandler._pointerToPositionObject(t),\n n = void 0;\n\n void 0 !== this.temporaryIds.edges[0] && (n = this.body.edges[this.temporaryIds.edges[0]].fromId);\n\n for (var a = this.selectionHandler._getAllNodesOverlappingWith(o), d = void 0, s = a.length - 1; 0 <= s; s--) if (-1 === this.temporaryIds.nodes.indexOf(a[s])) {\n d = this.body.nodes[a[s]];\n break;\n }\n\n if (e.controlEdge = {\n from: n,\n to: d ? d.id : void 0\n }, this.selectionHandler._generateClickEvent(\"controlNodeDragging\", e, t), void 0 !== this.temporaryIds.nodes[0]) {\n var r = this.body.nodes[this.temporaryIds.nodes[0]];\n r.x = this.canvas._XconvertDOMtoCanvas(t.x), r.y = this.canvas._YconvertDOMtoCanvas(t.y), this.body.emitter.emit(\"_redraw\");\n } else {\n var l = t.x - this.lastTouch.x,\n c = t.y - this.lastTouch.y;\n this.body.view.translation = {\n x: this.lastTouch.translation.x + l,\n y: this.lastTouch.translation.y + c\n };\n }\n }\n }, {\n key: \"_finishConnect\",\n value: function (e) {\n var t = this.body.functions.getPointer(e.center),\n o = this.selectionHandler._pointerToPositionObject(t),\n n = void 0;\n\n void 0 !== this.temporaryIds.edges[0] && (n = this.body.edges[this.temporaryIds.edges[0]].fromId);\n\n for (var a = this.selectionHandler._getAllNodesOverlappingWith(o), d = void 0, s = a.length - 1; 0 <= s; s--) if (-1 === this.temporaryIds.nodes.indexOf(a[s])) {\n d = this.body.nodes[a[s]];\n break;\n }\n\n this._cleanupTemporaryNodesAndEdges(), void 0 !== d && (!0 === d.isCluster ? alert(this.options.locales[this.options.locale].createEdgeError || this.options.locales.en.createEdgeError) : void 0 !== this.body.nodes[n] && void 0 !== this.body.nodes[d.id] && this._performAddEdge(n, d.id)), e.controlEdge = {\n from: n,\n to: d ? d.id : void 0\n }, this.selectionHandler._generateClickEvent(\"controlNodeDragEnd\", e, t), this.body.emitter.emit(\"_redraw\");\n }\n }, {\n key: \"_dragStartEdge\",\n value: function (e) {\n var t = this.lastTouch;\n\n this.selectionHandler._generateClickEvent(\"dragStart\", e, t, void 0, !0);\n }\n }, {\n key: \"_performAddNode\",\n value: function (e) {\n var t = this,\n o = {\n id: util.randomUUID(),\n x: e.pointer.canvas.x,\n y: e.pointer.canvas.y,\n label: \"new\"\n };\n if (\"function\" != typeof this.options.addNode) this.body.data.nodes.getDataSet().add(o), this.showManipulatorToolbar();else if (2 === this.options.addNode.length) this.options.addNode(o, function (e) {\n null !== e && void 0 !== e && \"addNode\" === t.inMode && t.body.data.nodes.getDataSet().add(e), t.showManipulatorToolbar();\n });else throw this.showManipulatorToolbar(), new Error(\"The function for add does not support two arguments (data,callback)\");\n }\n }, {\n key: \"_performAddEdge\",\n value: function (e, t) {\n var o = this,\n n = {\n from: e,\n to: t\n };\n if (\"function\" != typeof this.options.addEdge) this.body.data.edges.getDataSet().add(n), this.selectionHandler.unselectAll(), this.showManipulatorToolbar();else if (2 === this.options.addEdge.length) this.options.addEdge(n, function (e) {\n null !== e && void 0 !== e && \"addEdge\" === o.inMode && (o.body.data.edges.getDataSet().add(e), o.selectionHandler.unselectAll(), o.showManipulatorToolbar());\n });else throw new Error(\"The function for connect does not support two arguments (data,callback)\");\n }\n }, {\n key: \"_performEditEdge\",\n value: function (e, t) {\n var o = this,\n n = {\n id: this.edgeBeingEditedId,\n from: e,\n to: t,\n label: this.body.data.edges._data[this.edgeBeingEditedId].label\n },\n i = this.options.editEdge;\n if (\"object\" === _typeof_1$1(i) && (i = i.editWithoutDrag), \"function\" != typeof i) this.body.data.edges.getDataSet().update(n), this.selectionHandler.unselectAll(), this.showManipulatorToolbar();else if (2 === i.length) i(n, function (e) {\n null === e || void 0 === e || \"editEdge\" !== o.inMode ? (o.body.edges[n.id].updateEdgeType(), o.body.emitter.emit(\"_redraw\"), o.showManipulatorToolbar()) : (o.body.data.edges.getDataSet().update(e), o.selectionHandler.unselectAll(), o.showManipulatorToolbar());\n });else throw new Error(\"The function for edit does not support two arguments (data, callback)\");\n }\n }]), e;\n}(),\n htmlColors = {\n black: \"#000000\",\n navy: \"#000080\",\n darkblue: \"#00008B\",\n mediumblue: \"#0000CD\",\n blue: \"#0000FF\",\n darkgreen: \"#006400\",\n green: \"#008000\",\n teal: \"#008080\",\n darkcyan: \"#008B8B\",\n deepskyblue: \"#00BFFF\",\n darkturquoise: \"#00CED1\",\n mediumspringgreen: \"#00FA9A\",\n lime: \"#00FF00\",\n springgreen: \"#00FF7F\",\n aqua: \"#00FFFF\",\n cyan: \"#00FFFF\",\n midnightblue: \"#191970\",\n dodgerblue: \"#1E90FF\",\n lightseagreen: \"#20B2AA\",\n forestgreen: \"#228B22\",\n seagreen: \"#2E8B57\",\n darkslategray: \"#2F4F4F\",\n limegreen: \"#32CD32\",\n mediumseagreen: \"#3CB371\",\n turquoise: \"#40E0D0\",\n royalblue: \"#4169E1\",\n steelblue: \"#4682B4\",\n darkslateblue: \"#483D8B\",\n mediumturquoise: \"#48D1CC\",\n indigo: \"#4B0082\",\n darkolivegreen: \"#556B2F\",\n cadetblue: \"#5F9EA0\",\n cornflowerblue: \"#6495ED\",\n mediumaquamarine: \"#66CDAA\",\n dimgray: \"#696969\",\n slateblue: \"#6A5ACD\",\n olivedrab: \"#6B8E23\",\n slategray: \"#708090\",\n lightslategray: \"#778899\",\n mediumslateblue: \"#7B68EE\",\n lawngreen: \"#7CFC00\",\n chartreuse: \"#7FFF00\",\n aquamarine: \"#7FFFD4\",\n maroon: \"#800000\",\n purple: \"#800080\",\n olive: \"#808000\",\n gray: \"#808080\",\n skyblue: \"#87CEEB\",\n lightskyblue: \"#87CEFA\",\n blueviolet: \"#8A2BE2\",\n darkred: \"#8B0000\",\n darkmagenta: \"#8B008B\",\n saddlebrown: \"#8B4513\",\n darkseagreen: \"#8FBC8F\",\n lightgreen: \"#90EE90\",\n mediumpurple: \"#9370D8\",\n darkviolet: \"#9400D3\",\n palegreen: \"#98FB98\",\n darkorchid: \"#9932CC\",\n yellowgreen: \"#9ACD32\",\n sienna: \"#A0522D\",\n brown: \"#A52A2A\",\n darkgray: \"#A9A9A9\",\n lightblue: \"#ADD8E6\",\n greenyellow: \"#ADFF2F\",\n paleturquoise: \"#AFEEEE\",\n lightsteelblue: \"#B0C4DE\",\n powderblue: \"#B0E0E6\",\n firebrick: \"#B22222\",\n darkgoldenrod: \"#B8860B\",\n mediumorchid: \"#BA55D3\",\n rosybrown: \"#BC8F8F\",\n darkkhaki: \"#BDB76B\",\n silver: \"#C0C0C0\",\n mediumvioletred: \"#C71585\",\n indianred: \"#CD5C5C\",\n peru: \"#CD853F\",\n chocolate: \"#D2691E\",\n tan: \"#D2B48C\",\n lightgrey: \"#D3D3D3\",\n palevioletred: \"#D87093\",\n thistle: \"#D8BFD8\",\n orchid: \"#DA70D6\",\n goldenrod: \"#DAA520\",\n crimson: \"#DC143C\",\n gainsboro: \"#DCDCDC\",\n plum: \"#DDA0DD\",\n burlywood: \"#DEB887\",\n lightcyan: \"#E0FFFF\",\n lavender: \"#E6E6FA\",\n darksalmon: \"#E9967A\",\n violet: \"#EE82EE\",\n palegoldenrod: \"#EEE8AA\",\n lightcoral: \"#F08080\",\n khaki: \"#F0E68C\",\n aliceblue: \"#F0F8FF\",\n honeydew: \"#F0FFF0\",\n azure: \"#F0FFFF\",\n sandybrown: \"#F4A460\",\n wheat: \"#F5DEB3\",\n beige: \"#F5F5DC\",\n whitesmoke: \"#F5F5F5\",\n mintcream: \"#F5FFFA\",\n ghostwhite: \"#F8F8FF\",\n salmon: \"#FA8072\",\n antiquewhite: \"#FAEBD7\",\n linen: \"#FAF0E6\",\n lightgoldenrodyellow: \"#FAFAD2\",\n oldlace: \"#FDF5E6\",\n red: \"#FF0000\",\n fuchsia: \"#FF00FF\",\n magenta: \"#FF00FF\",\n deeppink: \"#FF1493\",\n orangered: \"#FF4500\",\n tomato: \"#FF6347\",\n hotpink: \"#FF69B4\",\n coral: \"#FF7F50\",\n darkorange: \"#FF8C00\",\n lightsalmon: \"#FFA07A\",\n orange: \"#FFA500\",\n lightpink: \"#FFB6C1\",\n pink: \"#FFC0CB\",\n gold: \"#FFD700\",\n peachpuff: \"#FFDAB9\",\n navajowhite: \"#FFDEAD\",\n moccasin: \"#FFE4B5\",\n bisque: \"#FFE4C4\",\n mistyrose: \"#FFE4E1\",\n blanchedalmond: \"#FFEBCD\",\n papayawhip: \"#FFEFD5\",\n lavenderblush: \"#FFF0F5\",\n seashell: \"#FFF5EE\",\n cornsilk: \"#FFF8DC\",\n lemonchiffon: \"#FFFACD\",\n floralwhite: \"#FFFAF0\",\n snow: \"#FFFAFA\",\n yellow: \"#FFFF00\",\n lightyellow: \"#FFFFE0\",\n ivory: \"#FFFFF0\",\n white: \"#FFFFFF\"\n},\n ColorPicker = function () {\n var t = Math.atan2,\n o = Math.cos,\n n = Math.sin,\n i = Math.sqrt,\n a = Math.PI,\n d = Math.min;\n\n function e() {\n var t = 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : 1;\n classCallCheck$1(this, e), this.pixelRatio = t, this.generated = !1, this.centerCoordinates = {\n x: 289 / 2,\n y: 289 / 2\n }, this.r = 289 * .49, this.color = {\n r: 255,\n g: 255,\n b: 255,\n a: 1\n }, this.hueCircle = void 0, this.initialColor = {\n r: 255,\n g: 255,\n b: 255,\n a: 1\n }, this.previousColor = void 0, this.applied = !1, this.updateCallback = function () {}, this.closeCallback = function () {}, this._create();\n }\n\n return createClass$1(e, [{\n key: \"insertTo\",\n value: function (e) {\n void 0 !== this.hammer && (this.hammer.destroy(), this.hammer = void 0), this.container = e, this.container.appendChild(this.frame), this._bindHammer(), this._setSize();\n }\n }, {\n key: \"setUpdateCallback\",\n value: function (e) {\n if (\"function\" == typeof e) this.updateCallback = e;else throw new Error(\"Function attempted to set as colorPicker update callback is not a function.\");\n }\n }, {\n key: \"setCloseCallback\",\n value: function (e) {\n if (\"function\" == typeof e) this.closeCallback = e;else throw new Error(\"Function attempted to set as colorPicker closing callback is not a function.\");\n }\n }, {\n key: \"_isColorString\",\n value: function (e) {\n if (\"string\" == typeof e) return htmlColors[e];\n }\n }, {\n key: \"setColor\",\n value: function (e) {\n var t = !(1 < arguments.length && void 0 !== arguments[1]) || arguments[1];\n\n if (\"none\" !== e) {\n var o = this._isColorString(e),\n n;\n\n if (void 0 !== o && (e = o), !0 === util.isString(e)) {\n if (!0 === util.isValidRGB(e)) {\n var i = e.substr(4).substr(0, e.length - 5).split(\",\");\n n = {\n r: i[0],\n g: i[1],\n b: i[2],\n a: 1\n };\n } else if (!0 === util.isValidRGBA(e)) {\n var a = e.substr(5).substr(0, e.length - 6).split(\",\");\n n = {\n r: a[0],\n g: a[1],\n b: a[2],\n a: a[3]\n };\n } else if (!0 === util.isValidHex(e)) {\n var d = util.hexToRGB(e);\n n = {\n r: d.r,\n g: d.g,\n b: d.b,\n a: 1\n };\n }\n } else if (e instanceof Object && void 0 !== e.r && void 0 !== e.g && void 0 !== e.b) {\n var s = void 0 === e.a ? \"1.0\" : e.a;\n n = {\n r: e.r,\n g: e.g,\n b: e.b,\n a: s\n };\n }\n\n if (void 0 === n) throw new Error(\"Unknown color passed to the colorPicker. Supported are strings: rgb, hex, rgba. Object: rgb ({r:r,g:g,b:b,[a:a]}). Supplied: \" + JSON.stringify(e));else this._setColor(n, t);\n }\n }\n }, {\n key: \"show\",\n value: function () {\n void 0 !== this.closeCallback && (this.closeCallback(), this.closeCallback = void 0), this.applied = !1, this.frame.style.display = \"block\", this._generateHueCircle();\n }\n }, {\n key: \"_hide\",\n value: function () {\n var e = this,\n t = !(0 < arguments.length && void 0 !== arguments[0]) || arguments[0];\n !0 === t && (this.previousColor = util.extend({}, this.color)), !0 === this.applied && this.updateCallback(this.initialColor), this.frame.style.display = \"none\", setTimeout(function () {\n void 0 !== e.closeCallback && (e.closeCallback(), e.closeCallback = void 0);\n }, 0);\n }\n }, {\n key: \"_save\",\n value: function () {\n this.updateCallback(this.color), this.applied = !1, this._hide();\n }\n }, {\n key: \"_apply\",\n value: function () {\n this.applied = !0, this.updateCallback(this.color), this._updatePicker(this.color);\n }\n }, {\n key: \"_loadLast\",\n value: function () {\n void 0 === this.previousColor ? alert(\"There is no last color to load...\") : this.setColor(this.previousColor, !1);\n }\n }, {\n key: \"_setColor\",\n value: function (e) {\n var t = !(1 < arguments.length && void 0 !== arguments[1]) || arguments[1];\n !0 === t && (this.initialColor = util.extend({}, e)), this.color = e;\n var i = util.RGBToHSV(e.r, e.g, e.b),\n d = 2 * a,\n s = this.r * i.s,\n r = this.centerCoordinates.x + s * n(d * i.h),\n l = this.centerCoordinates.y + s * o(d * i.h);\n this.colorPickerSelector.style.left = r - .5 * this.colorPickerSelector.clientWidth + \"px\", this.colorPickerSelector.style.top = l - .5 * this.colorPickerSelector.clientHeight + \"px\", this._updatePicker(e);\n }\n }, {\n key: \"_setOpacity\",\n value: function (e) {\n this.color.a = e / 100, this._updatePicker(this.color);\n }\n }, {\n key: \"_setBrightness\",\n value: function (e) {\n var t = util.RGBToHSV(this.color.r, this.color.g, this.color.b);\n t.v = e / 100;\n var o = util.HSVToRGB(t.h, t.s, t.v);\n o.a = this.color.a, this.color = o, this._updatePicker();\n }\n }, {\n key: \"_updatePicker\",\n value: function () {\n var e = 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : this.color,\n t = util.RGBToHSV(e.r, e.g, e.b),\n o = this.colorPickerCanvas.getContext(\"2d\");\n void 0 === this.pixelRation && (this.pixelRatio = (window.devicePixelRatio || 1) / (o.webkitBackingStorePixelRatio || o.mozBackingStorePixelRatio || o.msBackingStorePixelRatio || o.oBackingStorePixelRatio || o.backingStorePixelRatio || 1)), o.setTransform(this.pixelRatio, 0, 0, this.pixelRatio, 0, 0);\n var n = this.colorPickerCanvas.clientWidth,\n i = this.colorPickerCanvas.clientHeight;\n o.clearRect(0, 0, n, i), o.putImageData(this.hueCircle, 0, 0), o.fillStyle = \"rgba(0,0,0,\" + (1 - t.v) + \")\", o.circle(this.centerCoordinates.x, this.centerCoordinates.y, this.r), o.fill(), this.brightnessRange.value = 100 * t.v, this.opacityRange.value = 100 * e.a, this.initialColorDiv.style.backgroundColor = \"rgba(\" + this.initialColor.r + \",\" + this.initialColor.g + \",\" + this.initialColor.b + \",\" + this.initialColor.a + \")\", this.newColorDiv.style.backgroundColor = \"rgba(\" + this.color.r + \",\" + this.color.g + \",\" + this.color.b + \",\" + this.color.a + \")\";\n }\n }, {\n key: \"_setSize\",\n value: function () {\n this.colorPickerCanvas.style.width = \"100%\", this.colorPickerCanvas.style.height = \"100%\", this.colorPickerCanvas.width = 289 * this.pixelRatio, this.colorPickerCanvas.height = 289 * this.pixelRatio;\n }\n }, {\n key: \"_create\",\n value: function () {\n if (this.frame = document.createElement(\"div\"), this.frame.className = \"vis-color-picker\", this.colorPickerDiv = document.createElement(\"div\"), this.colorPickerSelector = document.createElement(\"div\"), this.colorPickerSelector.className = \"vis-selector\", this.colorPickerDiv.appendChild(this.colorPickerSelector), this.colorPickerCanvas = document.createElement(\"canvas\"), this.colorPickerDiv.appendChild(this.colorPickerCanvas), !this.colorPickerCanvas.getContext) {\n var e = document.createElement(\"DIV\");\n e.style.color = \"red\", e.style.fontWeight = \"bold\", e.style.padding = \"10px\", e.innerHTML = \"Error: your browser does not support HTML canvas\", this.colorPickerCanvas.appendChild(e);\n } else {\n var t = this.colorPickerCanvas.getContext(\"2d\");\n this.pixelRatio = (window.devicePixelRatio || 1) / (t.webkitBackingStorePixelRatio || t.mozBackingStorePixelRatio || t.msBackingStorePixelRatio || t.oBackingStorePixelRatio || t.backingStorePixelRatio || 1), this.colorPickerCanvas.getContext(\"2d\").setTransform(this.pixelRatio, 0, 0, this.pixelRatio, 0, 0);\n }\n\n this.colorPickerDiv.className = \"vis-color\", this.opacityDiv = document.createElement(\"div\"), this.opacityDiv.className = \"vis-opacity\", this.brightnessDiv = document.createElement(\"div\"), this.brightnessDiv.className = \"vis-brightness\", this.arrowDiv = document.createElement(\"div\"), this.arrowDiv.className = \"vis-arrow\", this.opacityRange = document.createElement(\"input\");\n\n try {\n this.opacityRange.type = \"range\", this.opacityRange.min = \"0\", this.opacityRange.max = \"100\";\n } catch (e) {}\n\n this.opacityRange.value = \"100\", this.opacityRange.className = \"vis-range\", this.brightnessRange = document.createElement(\"input\");\n\n try {\n this.brightnessRange.type = \"range\", this.brightnessRange.min = \"0\", this.brightnessRange.max = \"100\";\n } catch (e) {}\n\n this.brightnessRange.value = \"100\", this.brightnessRange.className = \"vis-range\", this.opacityDiv.appendChild(this.opacityRange), this.brightnessDiv.appendChild(this.brightnessRange);\n var o = this;\n this.opacityRange.onchange = function () {\n o._setOpacity(this.value);\n }, this.opacityRange.oninput = function () {\n o._setOpacity(this.value);\n }, this.brightnessRange.onchange = function () {\n o._setBrightness(this.value);\n }, this.brightnessRange.oninput = function () {\n o._setBrightness(this.value);\n }, this.brightnessLabel = document.createElement(\"div\"), this.brightnessLabel.className = \"vis-label vis-brightness\", this.brightnessLabel.innerHTML = \"brightness:\", this.opacityLabel = document.createElement(\"div\"), this.opacityLabel.className = \"vis-label vis-opacity\", this.opacityLabel.innerHTML = \"opacity:\", this.newColorDiv = document.createElement(\"div\"), this.newColorDiv.className = \"vis-new-color\", this.newColorDiv.innerHTML = \"new\", this.initialColorDiv = document.createElement(\"div\"), this.initialColorDiv.className = \"vis-initial-color\", this.initialColorDiv.innerHTML = \"initial\", this.cancelButton = document.createElement(\"div\"), this.cancelButton.className = \"vis-button vis-cancel\", this.cancelButton.innerHTML = \"cancel\", this.cancelButton.onclick = this._hide.bind(this, !1), this.applyButton = document.createElement(\"div\"), this.applyButton.className = \"vis-button vis-apply\", this.applyButton.innerHTML = \"apply\", this.applyButton.onclick = this._apply.bind(this), this.saveButton = document.createElement(\"div\"), this.saveButton.className = \"vis-button vis-save\", this.saveButton.innerHTML = \"save\", this.saveButton.onclick = this._save.bind(this), this.loadButton = document.createElement(\"div\"), this.loadButton.className = \"vis-button vis-load\", this.loadButton.innerHTML = \"load last\", this.loadButton.onclick = this._loadLast.bind(this), this.frame.appendChild(this.colorPickerDiv), this.frame.appendChild(this.arrowDiv), this.frame.appendChild(this.brightnessLabel), this.frame.appendChild(this.brightnessDiv), this.frame.appendChild(this.opacityLabel), this.frame.appendChild(this.opacityDiv), this.frame.appendChild(this.newColorDiv), this.frame.appendChild(this.initialColorDiv), this.frame.appendChild(this.cancelButton), this.frame.appendChild(this.applyButton), this.frame.appendChild(this.saveButton), this.frame.appendChild(this.loadButton);\n }\n }, {\n key: \"_bindHammer\",\n value: function () {\n var e = this;\n this.drag = {}, this.pinch = {}, this.hammer = new hammer(this.colorPickerCanvas), this.hammer.get(\"pinch\").set({\n enable: !0\n }), hammerUtil.onTouch(this.hammer, function (t) {\n e._moveSelector(t);\n }), this.hammer.on(\"tap\", function (t) {\n e._moveSelector(t);\n }), this.hammer.on(\"panstart\", function (t) {\n e._moveSelector(t);\n }), this.hammer.on(\"panmove\", function (t) {\n e._moveSelector(t);\n }), this.hammer.on(\"panend\", function (t) {\n e._moveSelector(t);\n });\n }\n }, {\n key: \"_generateHueCircle\",\n value: function () {\n if (!1 === this.generated) {\n var e = this.colorPickerCanvas.getContext(\"2d\");\n void 0 === this.pixelRation && (this.pixelRatio = (window.devicePixelRatio || 1) / (e.webkitBackingStorePixelRatio || e.mozBackingStorePixelRatio || e.msBackingStorePixelRatio || e.oBackingStorePixelRatio || e.backingStorePixelRatio || 1)), e.setTransform(this.pixelRatio, 0, 0, this.pixelRatio, 0, 0);\n var t = this.colorPickerCanvas.clientWidth,\n i = this.colorPickerCanvas.clientHeight;\n e.clearRect(0, 0, t, i);\n var d, s, r, l;\n this.centerCoordinates = {\n x: .5 * t,\n y: .5 * i\n }, this.r = .49 * t;\n var c = 2 * a / 360,\n u = 1 / this.r,\n p;\n\n for (r = 0; 360 > r; r++) for (l = 0; l < this.r; l++) d = this.centerCoordinates.x + l * n(c * r), s = this.centerCoordinates.y + l * o(c * r), p = util.HSVToRGB(r * (1 / 360), l * u, 1), e.fillStyle = \"rgb(\" + p.r + \",\" + p.g + \",\" + p.b + \")\", e.fillRect(d - .5, s - .5, 2, 2);\n\n e.strokeStyle = \"rgba(0,0,0,1)\", e.circle(this.centerCoordinates.x, this.centerCoordinates.y, this.r), e.stroke(), this.hueCircle = e.getImageData(0, 0, t, i);\n }\n\n this.generated = !0;\n }\n }, {\n key: \"_moveSelector\",\n value: function (e) {\n var r = this.colorPickerDiv.getBoundingClientRect(),\n l = e.center.x - r.left,\n c = e.center.y - r.top,\n u = .5 * this.colorPickerDiv.clientHeight,\n p = .5 * this.colorPickerDiv.clientWidth,\n m = l - p,\n g = c - u,\n y = t(m, g),\n f = .98 * d(i(m * m + g * g), p),\n b = o(y) * f + u,\n _ = n(y) * f + p;\n\n this.colorPickerSelector.style.top = b - .5 * this.colorPickerSelector.clientHeight + \"px\", this.colorPickerSelector.style.left = _ - .5 * this.colorPickerSelector.clientWidth + \"px\";\n var v = y / (2 * a);\n v = 0 > v ? v + 1 : v;\n var k = f / this.r,\n s = util.RGBToHSV(this.color.r, this.color.g, this.color.b);\n s.h = v, s.s = k;\n var w = util.HSVToRGB(s.h, s.s, s.v);\n w.a = this.color.a, this.color = w, this.initialColorDiv.style.backgroundColor = \"rgba(\" + this.initialColor.r + \",\" + this.initialColor.g + \",\" + this.initialColor.b + \",\" + this.initialColor.a + \")\", this.newColorDiv.style.backgroundColor = \"rgba(\" + this.color.r + \",\" + this.color.g + \",\" + this.color.b + \",\" + this.color.a + \")\";\n }\n }]), e;\n}(),\n Configurator = function () {\n var t = Math.ceil;\n\n function e(t, o, n) {\n var i = 3 < arguments.length && void 0 !== arguments[3] ? arguments[3] : 1;\n classCallCheck$1(this, e), this.parent = t, this.changedOptions = [], this.container = o, this.allowCreation = !1, this.options = {}, this.initialized = !1, this.popupCounter = 0, this.defaultOptions = {\n enabled: !1,\n filter: !0,\n container: void 0,\n showButton: !0\n }, util.extend(this.options, this.defaultOptions), this.configureOptions = n, this.moduleOptions = {}, this.domElements = [], this.popupDiv = {}, this.popupLimit = 5, this.popupHistory = {}, this.colorPicker = new ColorPicker(i), this.wrapper = void 0;\n }\n\n return createClass$1(e, [{\n key: \"setOptions\",\n value: function (e) {\n if (void 0 !== e) {\n this.popupHistory = {}, this._removePopup();\n var t = !0;\n if (\"string\" == typeof e) this.options.filter = e;else if (e instanceof Array) this.options.filter = e.join();else if (\"object\" === _typeof_1$1(e)) {\n if (null == e) throw new TypeError(\"options cannot be null\");\n void 0 !== e.container && (this.options.container = e.container), void 0 !== e.filter && (this.options.filter = e.filter), void 0 !== e.showButton && (this.options.showButton = e.showButton), void 0 !== e.enabled && (t = e.enabled);\n } else \"boolean\" == typeof e ? (this.options.filter = !0, t = e) : \"function\" == typeof e && (this.options.filter = e, t = !0);\n !1 === this.options.filter && (t = !1), this.options.enabled = t;\n }\n\n this._clean();\n }\n }, {\n key: \"setModuleOptions\",\n value: function (e) {\n this.moduleOptions = e, !0 === this.options.enabled && (this._clean(), void 0 !== this.options.container && (this.container = this.options.container), this._create());\n }\n }, {\n key: \"_create\",\n value: function () {\n this._clean(), this.changedOptions = [];\n var e = this.options.filter,\n t = 0,\n o = !1;\n\n for (var n in this.configureOptions) this.configureOptions.hasOwnProperty(n) && (this.allowCreation = !1, o = !1, \"function\" == typeof e ? (o = e(n, []), o = o || this._handleObject(this.configureOptions[n], [n], !0)) : (!0 === e || -1 !== e.indexOf(n)) && (o = !0), !1 !== o && (this.allowCreation = !0, 0 < t && this._makeItem([]), this._makeHeader(n), this._handleObject(this.configureOptions[n], [n])), t++);\n\n this._makeButton(), this._push();\n }\n }, {\n key: \"_push\",\n value: function () {\n this.wrapper = document.createElement(\"div\"), this.wrapper.className = \"vis-configuration-wrapper\", this.container.appendChild(this.wrapper);\n\n for (var e = 0; e < this.domElements.length; e++) this.wrapper.appendChild(this.domElements[e]);\n\n this._showPopupIfNeeded();\n }\n }, {\n key: \"_clean\",\n value: function () {\n for (var e = 0; e < this.domElements.length; e++) this.wrapper.removeChild(this.domElements[e]);\n\n void 0 !== this.wrapper && (this.container.removeChild(this.wrapper), this.wrapper = void 0), this.domElements = [], this._removePopup();\n }\n }, {\n key: \"_getValue\",\n value: function (e) {\n for (var t = this.moduleOptions, o = 0; o < e.length; o++) if (void 0 !== t[e[o]]) t = t[e[o]];else {\n t = void 0;\n break;\n }\n\n return t;\n }\n }, {\n key: \"_makeItem\",\n value: function (e) {\n if (!0 === this.allowCreation) {\n var t = document.createElement(\"div\");\n t.className = \"vis-configuration vis-config-item vis-config-s\" + e.length;\n\n for (var o = arguments.length, n = Array(1 < o ? o - 1 : 0), i = 1; i < o; i++) n[i - 1] = arguments[i];\n\n return n.forEach(function (e) {\n t.appendChild(e);\n }), this.domElements.push(t), this.domElements.length;\n }\n\n return 0;\n }\n }, {\n key: \"_makeHeader\",\n value: function (e) {\n var t = document.createElement(\"div\");\n t.className = \"vis-configuration vis-config-header\", t.innerHTML = e, this._makeItem([], t);\n }\n }, {\n key: \"_makeLabel\",\n value: function (e, t) {\n var o = !!(2 < arguments.length && void 0 !== arguments[2]) && arguments[2],\n n = document.createElement(\"div\");\n return n.className = \"vis-configuration vis-config-label vis-config-s\" + t.length, n.innerHTML = !0 === o ? \"\" + e + \":\" : e + \":\", n;\n }\n }, {\n key: \"_makeDropdown\",\n value: function (e, t, o) {\n var n = document.createElement(\"select\");\n n.className = \"vis-configuration vis-config-select\";\n var a = 0;\n void 0 !== t && -1 !== e.indexOf(t) && (a = e.indexOf(t));\n\n for (var d = 0, s; d < e.length; d++) s = document.createElement(\"option\"), s.value = e[d], d == a && (s.selected = \"selected\"), s.innerHTML = e[d], n.appendChild(s);\n\n var r = this;\n\n n.onchange = function () {\n r._update(this.value, o);\n };\n\n var l = this._makeLabel(o[o.length - 1], o);\n\n this._makeItem(o, l, n);\n }\n }, {\n key: \"_makeRange\",\n value: function (e, o, n) {\n var i = e[0],\n a = e[1],\n d = e[2],\n s = e[3],\n r = document.createElement(\"input\");\n r.className = \"vis-configuration vis-config-range\";\n\n try {\n r.type = \"range\", r.min = a, r.max = d;\n } catch (e) {}\n\n r.step = s;\n var l = \"\",\n c = 0;\n\n if (void 0 !== o) {\n var u = 1.2;\n 0 > o && o * u < a ? (r.min = t(o * u), c = r.min, l = \"range increased\") : o / u < a && (r.min = t(o / u), c = r.min, l = \"range increased\"), o * u > d && 1 !== d && (r.max = t(o * u), c = r.max, l = \"range increased\"), r.value = o;\n } else r.value = i;\n\n var p = document.createElement(\"input\");\n p.className = \"vis-configuration vis-config-rangeinput\", p.value = r.value;\n var h = this;\n r.onchange = function () {\n p.value = this.value, h._update(+this.value, n);\n }, r.oninput = function () {\n p.value = this.value;\n };\n\n var m = this._makeLabel(n[n.length - 1], n),\n g = this._makeItem(n, m, r, p);\n\n \"\" != l && this.popupHistory[g] !== c && (this.popupHistory[g] = c, this._setupPopup(l, g));\n }\n }, {\n key: \"_makeButton\",\n value: function () {\n var e = this;\n\n if (!0 === this.options.showButton) {\n var t = document.createElement(\"div\");\n t.className = \"vis-configuration vis-config-button\", t.innerHTML = \"generate options\", t.onclick = function () {\n e._printOptions();\n }, t.onmouseover = function () {\n t.className = \"vis-configuration vis-config-button hover\";\n }, t.onmouseout = function () {\n t.className = \"vis-configuration vis-config-button\";\n }, this.optionsContainer = document.createElement(\"div\"), this.optionsContainer.className = \"vis-configuration vis-config-option-container\", this.domElements.push(this.optionsContainer), this.domElements.push(t);\n }\n }\n }, {\n key: \"_setupPopup\",\n value: function (e, t) {\n var o = this;\n\n if (!0 === this.initialized && !0 === this.allowCreation && this.popupCounter < this.popupLimit) {\n var n = document.createElement(\"div\");\n n.id = \"vis-configuration-popup\", n.className = \"vis-configuration-popup\", n.innerHTML = e, n.onclick = function () {\n o._removePopup();\n }, this.popupCounter += 1, this.popupDiv = {\n html: n,\n index: t\n };\n }\n }\n }, {\n key: \"_removePopup\",\n value: function () {\n void 0 !== this.popupDiv.html && (this.popupDiv.html.parentNode.removeChild(this.popupDiv.html), clearTimeout(this.popupDiv.hideTimeout), clearTimeout(this.popupDiv.deleteTimeout), this.popupDiv = {});\n }\n }, {\n key: \"_showPopupIfNeeded\",\n value: function () {\n var e = this;\n\n if (void 0 !== this.popupDiv.html) {\n var t = this.domElements[this.popupDiv.index],\n o = t.getBoundingClientRect();\n this.popupDiv.html.style.left = o.left + \"px\", this.popupDiv.html.style.top = o.top - 30 + \"px\", document.body.appendChild(this.popupDiv.html), this.popupDiv.hideTimeout = setTimeout(function () {\n e.popupDiv.html.style.opacity = 0;\n }, 1500), this.popupDiv.deleteTimeout = setTimeout(function () {\n e._removePopup();\n }, 1800);\n }\n }\n }, {\n key: \"_makeCheckbox\",\n value: function (e, t, o) {\n var n = document.createElement(\"input\");\n n.type = \"checkbox\", n.className = \"vis-configuration vis-config-checkbox\", n.checked = e, void 0 !== t && (n.checked = t, t !== e && (\"object\" === _typeof_1$1(e) ? t !== e.enabled && this.changedOptions.push({\n path: o,\n value: t\n }) : this.changedOptions.push({\n path: o,\n value: t\n })));\n var i = this;\n\n n.onchange = function () {\n i._update(this.checked, o);\n };\n\n var a = this._makeLabel(o[o.length - 1], o);\n\n this._makeItem(o, a, n);\n }\n }, {\n key: \"_makeTextInput\",\n value: function (e, t, o) {\n var n = document.createElement(\"input\");\n n.type = \"text\", n.className = \"vis-configuration vis-config-text\", n.value = t, t !== e && this.changedOptions.push({\n path: o,\n value: t\n });\n var i = this;\n\n n.onchange = function () {\n i._update(this.value, o);\n };\n\n var a = this._makeLabel(o[o.length - 1], o);\n\n this._makeItem(o, a, n);\n }\n }, {\n key: \"_makeColorField\",\n value: function (e, t, o) {\n var n = this,\n i = e[1],\n a = document.createElement(\"div\");\n t = void 0 === t ? i : t, \"none\" === t ? a.className = \"vis-configuration vis-config-colorBlock none\" : (a.className = \"vis-configuration vis-config-colorBlock\", a.style.backgroundColor = t), t = void 0 === t ? i : t, a.onclick = function () {\n n._showColorPicker(t, a, o);\n };\n\n var d = this._makeLabel(o[o.length - 1], o);\n\n this._makeItem(o, d, a);\n }\n }, {\n key: \"_showColorPicker\",\n value: function (e, t, o) {\n var n = this;\n t.onclick = function () {}, this.colorPicker.insertTo(t), this.colorPicker.show(), this.colorPicker.setColor(e), this.colorPicker.setUpdateCallback(function (e) {\n var i = \"rgba(\" + e.r + \",\" + e.g + \",\" + e.b + \",\" + e.a + \")\";\n t.style.backgroundColor = i, n._update(i, o);\n }), this.colorPicker.setCloseCallback(function () {\n t.onclick = function () {\n n._showColorPicker(e, t, o);\n };\n });\n }\n }, {\n key: \"_handleObject\",\n value: function (e) {\n var t = 1 < arguments.length && void 0 !== arguments[1] ? arguments[1] : [],\n o = !!(2 < arguments.length && void 0 !== arguments[2]) && arguments[2],\n n = !1,\n i = this.options.filter,\n a = !1;\n\n for (var d in e) if (e.hasOwnProperty(d)) {\n n = !0;\n var s = e[d],\n r = util.copyAndExtendArray(t, d);\n\n if (\"function\" == typeof i && (n = i(d, t), !1 === n && !(s instanceof Array) && \"string\" != typeof s && \"boolean\" != typeof s && s instanceof Object && (this.allowCreation = !1, n = this._handleObject(s, r, !0), this.allowCreation = !1 === o)), !1 !== n) {\n a = !0;\n\n var l = this._getValue(r);\n\n if (s instanceof Array) this._handleArray(s, l, r);else if (\"string\" == typeof s) this._makeTextInput(s, l, r);else if (\"boolean\" == typeof s) this._makeCheckbox(s, l, r);else if (s instanceof Object) {\n var c = !0;\n if (-1 !== t.indexOf(\"physics\") && this.moduleOptions.physics.solver !== d && (c = !1), !0 == c) if (void 0 !== s.enabled) {\n var u = util.copyAndExtendArray(r, \"enabled\"),\n p = this._getValue(u);\n\n if (!0 === p) {\n var h = this._makeLabel(d, r, !0);\n\n this._makeItem(r, h), a = this._handleObject(s, r) || a;\n } else this._makeCheckbox(s, p, r);\n } else {\n var m = this._makeLabel(d, r, !0);\n\n this._makeItem(r, m), a = this._handleObject(s, r) || a;\n }\n } else console.error(\"dont know how to handle\", s, d, r);\n }\n }\n\n return a;\n }\n }, {\n key: \"_handleArray\",\n value: function (e, t, o) {\n \"string\" == typeof e[0] && \"color\" === e[0] ? (this._makeColorField(e, t, o), e[1] !== t && this.changedOptions.push({\n path: o,\n value: t\n })) : \"string\" == typeof e[0] ? (this._makeDropdown(e, t, o), e[0] !== t && this.changedOptions.push({\n path: o,\n value: t\n })) : \"number\" == typeof e[0] && (this._makeRange(e, t, o), e[0] !== t && this.changedOptions.push({\n path: o,\n value: +t\n }));\n }\n }, {\n key: \"_update\",\n value: function (e, t) {\n var o = this._constructOptions(e, t);\n\n this.parent.body && this.parent.body.emitter && this.parent.body.emitter.emit && this.parent.body.emitter.emit(\"configChange\", o), this.initialized = !0, this.parent.setOptions(o);\n }\n }, {\n key: \"_constructOptions\",\n value: function (e, t) {\n var o = 2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : {},\n n = o;\n e = \"true\" === e || e, e = \"false\" !== e && e;\n\n for (var a = 0; a < t.length; a++) \"global\" !== t[a] && (void 0 === n[t[a]] && (n[t[a]] = {}), a == t.length - 1 ? n[t[a]] = e : n = n[t[a]]);\n\n return o;\n }\n }, {\n key: \"_printOptions\",\n value: function () {\n var e = this.getOptions();\n this.optionsContainer.innerHTML = \"
var options = \" + JSON.stringify(e, null, 2) + \"
\";\n }\n }, {\n key: \"getOptions\",\n value: function () {\n for (var e = {}, t = 0; t < this.changedOptions.length; t++) this._constructOptions(this.changedOptions[t].value, this.changedOptions[t].path, e);\n\n return e;\n }\n }]), e;\n}(),\n string = \"string\",\n bool = \"boolean\",\n number = \"number\",\n array = \"array\",\n object = \"object\",\n dom = \"dom\",\n any = \"any\",\n endPoints = [\"arrow\", \"circle\", \"bar\"],\n allOptions$1 = {\n configure: {\n enabled: {\n boolean: bool\n },\n filter: {\n boolean: bool,\n string: string,\n array: array,\n function: \"function\"\n },\n container: {\n dom: dom\n },\n showButton: {\n boolean: bool\n },\n __type__: {\n object: object,\n boolean: bool,\n string: string,\n array: array,\n function: \"function\"\n }\n },\n edges: {\n arrows: {\n to: {\n enabled: {\n boolean: bool\n },\n scaleFactor: {\n number: number\n },\n type: {\n string: endPoints\n },\n __type__: {\n object: object,\n boolean: bool\n }\n },\n middle: {\n enabled: {\n boolean: bool\n },\n scaleFactor: {\n number: number\n },\n type: {\n string: endPoints\n },\n __type__: {\n object: object,\n boolean: bool\n }\n },\n from: {\n enabled: {\n boolean: bool\n },\n scaleFactor: {\n number: number\n },\n type: {\n string: endPoints\n },\n __type__: {\n object: object,\n boolean: bool\n }\n },\n __type__: {\n string: [\"from\", \"to\", \"middle\"],\n object: object\n }\n },\n arrowStrikethrough: {\n boolean: bool\n },\n background: {\n enabled: {\n boolean: bool\n },\n color: {\n string: string\n },\n size: {\n number: number\n },\n dashes: {\n boolean: bool,\n array: array\n },\n __type__: {\n object: object,\n boolean: bool\n }\n },\n chosen: {\n label: {\n boolean: bool,\n function: \"function\"\n },\n edge: {\n boolean: bool,\n function: \"function\"\n },\n __type__: {\n object: object,\n boolean: bool\n }\n },\n color: {\n color: {\n string: string\n },\n highlight: {\n string: string\n },\n hover: {\n string: string\n },\n inherit: {\n string: [\"from\", \"to\", \"both\"],\n boolean: bool\n },\n opacity: {\n number: number\n },\n __type__: {\n object: object,\n string: string\n }\n },\n dashes: {\n boolean: bool,\n array: array\n },\n font: {\n color: {\n string: string\n },\n size: {\n number: number\n },\n face: {\n string: string\n },\n background: {\n string: string\n },\n strokeWidth: {\n number: number\n },\n strokeColor: {\n string: string\n },\n align: {\n string: [\"horizontal\", \"top\", \"middle\", \"bottom\"]\n },\n vadjust: {\n number: number\n },\n multi: {\n boolean: bool,\n string: string\n },\n bold: {\n color: {\n string: string\n },\n size: {\n number: number\n },\n face: {\n string: string\n },\n mod: {\n string: string\n },\n vadjust: {\n number: number\n },\n __type__: {\n object: object,\n string: string\n }\n },\n boldital: {\n color: {\n string: string\n },\n size: {\n number: number\n },\n face: {\n string: string\n },\n mod: {\n string: string\n },\n vadjust: {\n number: number\n },\n __type__: {\n object: object,\n string: string\n }\n },\n ital: {\n color: {\n string: string\n },\n size: {\n number: number\n },\n face: {\n string: string\n },\n mod: {\n string: string\n },\n vadjust: {\n number: number\n },\n __type__: {\n object: object,\n string: string\n }\n },\n mono: {\n color: {\n string: string\n },\n size: {\n number: number\n },\n face: {\n string: string\n },\n mod: {\n string: string\n },\n vadjust: {\n number: number\n },\n __type__: {\n object: object,\n string: string\n }\n },\n __type__: {\n object: object,\n string: string\n }\n },\n hidden: {\n boolean: bool\n },\n hoverWidth: {\n function: \"function\",\n number: number\n },\n label: {\n string: string,\n undefined: \"undefined\"\n },\n labelHighlightBold: {\n boolean: bool\n },\n length: {\n number: number,\n undefined: \"undefined\"\n },\n physics: {\n boolean: bool\n },\n scaling: {\n min: {\n number: number\n },\n max: {\n number: number\n },\n label: {\n enabled: {\n boolean: bool\n },\n min: {\n number: number\n },\n max: {\n number: number\n },\n maxVisible: {\n number: number\n },\n drawThreshold: {\n number: number\n },\n __type__: {\n object: object,\n boolean: bool\n }\n },\n customScalingFunction: {\n function: \"function\"\n },\n __type__: {\n object: object\n }\n },\n selectionWidth: {\n function: \"function\",\n number: number\n },\n selfReferenceSize: {\n number: number\n },\n shadow: {\n enabled: {\n boolean: bool\n },\n color: {\n string: string\n },\n size: {\n number: number\n },\n x: {\n number: number\n },\n y: {\n number: number\n },\n __type__: {\n object: object,\n boolean: bool\n }\n },\n smooth: {\n enabled: {\n boolean: bool\n },\n type: {\n string: [\"dynamic\", \"continuous\", \"discrete\", \"diagonalCross\", \"straightCross\", \"horizontal\", \"vertical\", \"curvedCW\", \"curvedCCW\", \"cubicBezier\"]\n },\n roundness: {\n number: number\n },\n forceDirection: {\n string: [\"horizontal\", \"vertical\", \"none\"],\n boolean: bool\n },\n __type__: {\n object: object,\n boolean: bool\n }\n },\n title: {\n string: string,\n undefined: \"undefined\"\n },\n width: {\n number: number\n },\n widthConstraint: {\n maximum: {\n number: number\n },\n __type__: {\n object: object,\n boolean: bool,\n number: number\n }\n },\n value: {\n number: number,\n undefined: \"undefined\"\n },\n __type__: {\n object: object\n }\n },\n groups: {\n useDefaultGroups: {\n boolean: bool\n },\n __any__: \"get from nodes, will be overwritten below\",\n __type__: {\n object: object\n }\n },\n interaction: {\n dragNodes: {\n boolean: bool\n },\n dragView: {\n boolean: bool\n },\n hideEdgesOnDrag: {\n boolean: bool\n },\n hideEdgesOnZoom: {\n boolean: bool\n },\n hideNodesOnDrag: {\n boolean: bool\n },\n hover: {\n boolean: bool\n },\n keyboard: {\n enabled: {\n boolean: bool\n },\n speed: {\n x: {\n number: number\n },\n y: {\n number: number\n },\n zoom: {\n number: number\n },\n __type__: {\n object: object\n }\n },\n bindToWindow: {\n boolean: bool\n },\n __type__: {\n object: object,\n boolean: bool\n }\n },\n multiselect: {\n boolean: bool\n },\n navigationButtons: {\n boolean: bool\n },\n selectable: {\n boolean: bool\n },\n selectConnectedEdges: {\n boolean: bool\n },\n hoverConnectedEdges: {\n boolean: bool\n },\n tooltipDelay: {\n number: number\n },\n zoomView: {\n boolean: bool\n },\n zoomSpeed: {\n number: number\n },\n __type__: {\n object: object\n }\n },\n layout: {\n randomSeed: {\n undefined: \"undefined\",\n number: number\n },\n improvedLayout: {\n boolean: bool\n },\n hierarchical: {\n enabled: {\n boolean: bool\n },\n levelSeparation: {\n number: number\n },\n nodeSpacing: {\n number: number\n },\n treeSpacing: {\n number: number\n },\n blockShifting: {\n boolean: bool\n },\n edgeMinimization: {\n boolean: bool\n },\n parentCentralization: {\n boolean: bool\n },\n direction: {\n string: [\"UD\", \"DU\", \"LR\", \"RL\"]\n },\n sortMethod: {\n string: [\"hubsize\", \"directed\"]\n },\n __type__: {\n object: object,\n boolean: bool\n }\n },\n __type__: {\n object: object\n }\n },\n manipulation: {\n enabled: {\n boolean: bool\n },\n initiallyActive: {\n boolean: bool\n },\n addNode: {\n boolean: bool,\n function: \"function\"\n },\n addEdge: {\n boolean: bool,\n function: \"function\"\n },\n editNode: {\n function: \"function\"\n },\n editEdge: {\n editWithoutDrag: {\n function: \"function\"\n },\n __type__: {\n object: object,\n boolean: bool,\n function: \"function\"\n }\n },\n deleteNode: {\n boolean: bool,\n function: \"function\"\n },\n deleteEdge: {\n boolean: bool,\n function: \"function\"\n },\n controlNodeStyle: \"get from nodes, will be overwritten below\",\n __type__: {\n object: object,\n boolean: bool\n }\n },\n nodes: {\n borderWidth: {\n number: number\n },\n borderWidthSelected: {\n number: number,\n undefined: \"undefined\"\n },\n brokenImage: {\n string: string,\n undefined: \"undefined\"\n },\n chosen: {\n label: {\n boolean: bool,\n function: \"function\"\n },\n node: {\n boolean: bool,\n function: \"function\"\n },\n __type__: {\n object: object,\n boolean: bool\n }\n },\n color: {\n border: {\n string: string\n },\n background: {\n string: string\n },\n highlight: {\n border: {\n string: string\n },\n background: {\n string: string\n },\n __type__: {\n object: object,\n string: string\n }\n },\n hover: {\n border: {\n string: string\n },\n background: {\n string: string\n },\n __type__: {\n object: object,\n string: string\n }\n },\n __type__: {\n object: object,\n string: string\n }\n },\n fixed: {\n x: {\n boolean: bool\n },\n y: {\n boolean: bool\n },\n __type__: {\n object: object,\n boolean: bool\n }\n },\n font: {\n align: {\n string: string\n },\n color: {\n string: string\n },\n size: {\n number: number\n },\n face: {\n string: string\n },\n background: {\n string: string\n },\n strokeWidth: {\n number: number\n },\n strokeColor: {\n string: string\n },\n vadjust: {\n number: number\n },\n multi: {\n boolean: bool,\n string: string\n },\n bold: {\n color: {\n string: string\n },\n size: {\n number: number\n },\n face: {\n string: string\n },\n mod: {\n string: string\n },\n vadjust: {\n number: number\n },\n __type__: {\n object: object,\n string: string\n }\n },\n boldital: {\n color: {\n string: string\n },\n size: {\n number: number\n },\n face: {\n string: string\n },\n mod: {\n string: string\n },\n vadjust: {\n number: number\n },\n __type__: {\n object: object,\n string: string\n }\n },\n ital: {\n color: {\n string: string\n },\n size: {\n number: number\n },\n face: {\n string: string\n },\n mod: {\n string: string\n },\n vadjust: {\n number: number\n },\n __type__: {\n object: object,\n string: string\n }\n },\n mono: {\n color: {\n string: string\n },\n size: {\n number: number\n },\n face: {\n string: string\n },\n mod: {\n string: string\n },\n vadjust: {\n number: number\n },\n __type__: {\n object: object,\n string: string\n }\n },\n __type__: {\n object: object,\n string: string\n }\n },\n group: {\n string: string,\n number: number,\n undefined: \"undefined\"\n },\n heightConstraint: {\n minimum: {\n number: number\n },\n valign: {\n string: string\n },\n __type__: {\n object: object,\n boolean: bool,\n number: number\n }\n },\n hidden: {\n boolean: bool\n },\n icon: {\n face: {\n string: string\n },\n code: {\n string: string\n },\n size: {\n number: number\n },\n color: {\n string: string\n },\n __type__: {\n object: object\n }\n },\n id: {\n string: string,\n number: number\n },\n image: {\n selected: {\n string: string,\n undefined: \"undefined\"\n },\n unselected: {\n string: string,\n undefined: \"undefined\"\n },\n __type__: {\n object: object,\n string: string\n }\n },\n label: {\n string: string,\n undefined: \"undefined\"\n },\n labelHighlightBold: {\n boolean: bool\n },\n level: {\n number: number,\n undefined: \"undefined\"\n },\n margin: {\n top: {\n number: number\n },\n right: {\n number: number\n },\n bottom: {\n number: number\n },\n left: {\n number: number\n },\n __type__: {\n object: object,\n number: number\n }\n },\n mass: {\n number: number\n },\n physics: {\n boolean: bool\n },\n scaling: {\n min: {\n number: number\n },\n max: {\n number: number\n },\n label: {\n enabled: {\n boolean: bool\n },\n min: {\n number: number\n },\n max: {\n number: number\n },\n maxVisible: {\n number: number\n },\n drawThreshold: {\n number: number\n },\n __type__: {\n object: object,\n boolean: bool\n }\n },\n customScalingFunction: {\n function: \"function\"\n },\n __type__: {\n object: object\n }\n },\n shadow: {\n enabled: {\n boolean: bool\n },\n color: {\n string: string\n },\n size: {\n number: number\n },\n x: {\n number: number\n },\n y: {\n number: number\n },\n __type__: {\n object: object,\n boolean: bool\n }\n },\n shape: {\n string: [\"ellipse\", \"circle\", \"database\", \"box\", \"text\", \"image\", \"circularImage\", \"diamond\", \"dot\", \"star\", \"triangle\", \"triangleDown\", \"square\", \"icon\", \"hexagon\"]\n },\n shapeProperties: {\n borderDashes: {\n boolean: bool,\n array: array\n },\n borderRadius: {\n number: number\n },\n interpolation: {\n boolean: bool\n },\n useImageSize: {\n boolean: bool\n },\n useBorderWithImage: {\n boolean: bool\n },\n __type__: {\n object: object\n }\n },\n size: {\n number: number\n },\n title: {\n string: string,\n dom: dom,\n undefined: \"undefined\"\n },\n value: {\n number: number,\n undefined: \"undefined\"\n },\n widthConstraint: {\n minimum: {\n number: number\n },\n maximum: {\n number: number\n },\n __type__: {\n object: object,\n boolean: bool,\n number: number\n }\n },\n x: {\n number: number\n },\n y: {\n number: number\n },\n __type__: {\n object: object\n }\n },\n physics: {\n enabled: {\n boolean: bool\n },\n barnesHut: {\n gravitationalConstant: {\n number: number\n },\n centralGravity: {\n number: number\n },\n springLength: {\n number: number\n },\n springConstant: {\n number: number\n },\n damping: {\n number: number\n },\n avoidOverlap: {\n number: number\n },\n __type__: {\n object: object\n }\n },\n forceAtlas2Based: {\n gravitationalConstant: {\n number: number\n },\n centralGravity: {\n number: number\n },\n springLength: {\n number: number\n },\n springConstant: {\n number: number\n },\n damping: {\n number: number\n },\n avoidOverlap: {\n number: number\n },\n __type__: {\n object: object\n }\n },\n repulsion: {\n centralGravity: {\n number: number\n },\n springLength: {\n number: number\n },\n springConstant: {\n number: number\n },\n nodeDistance: {\n number: number\n },\n damping: {\n number: number\n },\n __type__: {\n object: object\n }\n },\n hierarchicalRepulsion: {\n centralGravity: {\n number: number\n },\n springLength: {\n number: number\n },\n springConstant: {\n number: number\n },\n nodeDistance: {\n number: number\n },\n damping: {\n number: number\n },\n __type__: {\n object: object\n }\n },\n maxVelocity: {\n number: number\n },\n minVelocity: {\n number: number\n },\n solver: {\n string: [\"barnesHut\", \"repulsion\", \"hierarchicalRepulsion\", \"forceAtlas2Based\"]\n },\n stabilization: {\n enabled: {\n boolean: bool\n },\n iterations: {\n number: number\n },\n updateInterval: {\n number: number\n },\n onlyDynamicEdges: {\n boolean: bool\n },\n fit: {\n boolean: bool\n },\n __type__: {\n object: object,\n boolean: bool\n }\n },\n timestep: {\n number: number\n },\n adaptiveTimestep: {\n boolean: bool\n },\n __type__: {\n object: object,\n boolean: bool\n }\n },\n autoResize: {\n boolean: bool\n },\n clickToUse: {\n boolean: bool\n },\n locale: {\n string: string\n },\n locales: {\n __any__: {\n any: any\n },\n __type__: {\n object: object\n }\n },\n height: {\n string: string\n },\n width: {\n string: string\n },\n __type__: {\n object: object\n }\n};\n\nallOptions$1.groups.__any__ = allOptions$1.nodes, allOptions$1.manipulation.controlNodeStyle = allOptions$1.nodes;\n\nvar configureOptions = {\n nodes: {\n borderWidth: [1, 0, 10, 1],\n borderWidthSelected: [2, 0, 10, 1],\n color: {\n border: [\"color\", \"#2B7CE9\"],\n background: [\"color\", \"#97C2FC\"],\n highlight: {\n border: [\"color\", \"#2B7CE9\"],\n background: [\"color\", \"#D2E5FF\"]\n },\n hover: {\n border: [\"color\", \"#2B7CE9\"],\n background: [\"color\", \"#D2E5FF\"]\n }\n },\n fixed: {\n x: !1,\n y: !1\n },\n font: {\n color: [\"color\", \"#343434\"],\n size: [14, 0, 100, 1],\n face: [\"arial\", \"verdana\", \"tahoma\"],\n background: [\"color\", \"none\"],\n strokeWidth: [0, 0, 50, 1],\n strokeColor: [\"color\", \"#ffffff\"]\n },\n hidden: !1,\n labelHighlightBold: !0,\n physics: !0,\n scaling: {\n min: [10, 0, 200, 1],\n max: [30, 0, 200, 1],\n label: {\n enabled: !1,\n min: [14, 0, 200, 1],\n max: [30, 0, 200, 1],\n maxVisible: [30, 0, 200, 1],\n drawThreshold: [5, 0, 20, 1]\n }\n },\n shadow: {\n enabled: !1,\n color: \"rgba(0,0,0,0.5)\",\n size: [10, 0, 20, 1],\n x: [5, -30, 30, 1],\n y: [5, -30, 30, 1]\n },\n shape: [\"ellipse\", \"box\", \"circle\", \"database\", \"diamond\", \"dot\", \"square\", \"star\", \"text\", \"triangle\", \"triangleDown\", \"hexagon\"],\n shapeProperties: {\n borderDashes: !1,\n borderRadius: [6, 0, 20, 1],\n interpolation: !0,\n useImageSize: !1\n },\n size: [25, 0, 200, 1]\n },\n edges: {\n arrows: {\n to: {\n enabled: !1,\n scaleFactor: [1, 0, 3, .05],\n type: \"arrow\"\n },\n middle: {\n enabled: !1,\n scaleFactor: [1, 0, 3, .05],\n type: \"arrow\"\n },\n from: {\n enabled: !1,\n scaleFactor: [1, 0, 3, .05],\n type: \"arrow\"\n }\n },\n arrowStrikethrough: !0,\n color: {\n color: [\"color\", \"#848484\"],\n highlight: [\"color\", \"#848484\"],\n hover: [\"color\", \"#848484\"],\n inherit: [\"from\", \"to\", \"both\", !0, !1],\n opacity: [1, 0, 1, .05]\n },\n dashes: !1,\n font: {\n color: [\"color\", \"#343434\"],\n size: [14, 0, 100, 1],\n face: [\"arial\", \"verdana\", \"tahoma\"],\n background: [\"color\", \"none\"],\n strokeWidth: [2, 0, 50, 1],\n strokeColor: [\"color\", \"#ffffff\"],\n align: [\"horizontal\", \"top\", \"middle\", \"bottom\"]\n },\n hidden: !1,\n hoverWidth: [1.5, 0, 5, .1],\n labelHighlightBold: !0,\n physics: !0,\n scaling: {\n min: [1, 0, 100, 1],\n max: [15, 0, 100, 1],\n label: {\n enabled: !0,\n min: [14, 0, 200, 1],\n max: [30, 0, 200, 1],\n maxVisible: [30, 0, 200, 1],\n drawThreshold: [5, 0, 20, 1]\n }\n },\n selectionWidth: [1.5, 0, 5, .1],\n selfReferenceSize: [20, 0, 200, 1],\n shadow: {\n enabled: !1,\n color: \"rgba(0,0,0,0.5)\",\n size: [10, 0, 20, 1],\n x: [5, -30, 30, 1],\n y: [5, -30, 30, 1]\n },\n smooth: {\n enabled: !0,\n type: [\"dynamic\", \"continuous\", \"discrete\", \"diagonalCross\", \"straightCross\", \"horizontal\", \"vertical\", \"curvedCW\", \"curvedCCW\", \"cubicBezier\"],\n forceDirection: [\"horizontal\", \"vertical\", \"none\"],\n roundness: [.5, 0, 1, .05]\n },\n width: [1, 0, 30, 1]\n },\n layout: {\n hierarchical: {\n enabled: !1,\n levelSeparation: [150, 20, 500, 5],\n nodeSpacing: [100, 20, 500, 5],\n treeSpacing: [200, 20, 500, 5],\n blockShifting: !0,\n edgeMinimization: !0,\n parentCentralization: !0,\n direction: [\"UD\", \"DU\", \"LR\", \"RL\"],\n sortMethod: [\"hubsize\", \"directed\"]\n }\n },\n interaction: {\n dragNodes: !0,\n dragView: !0,\n hideEdgesOnDrag: !1,\n hideEdgesOnZoom: !1,\n hideNodesOnDrag: !1,\n hover: !1,\n keyboard: {\n enabled: !1,\n speed: {\n x: [10, 0, 40, 1],\n y: [10, 0, 40, 1],\n zoom: [.02, 0, .1, .005]\n },\n bindToWindow: !0\n },\n multiselect: !1,\n navigationButtons: !1,\n selectable: !0,\n selectConnectedEdges: !0,\n hoverConnectedEdges: !0,\n tooltipDelay: [300, 0, 1e3, 25],\n zoomView: !0,\n zoomSpeed: [1, 1, 1, 1]\n },\n manipulation: {\n enabled: !1,\n initiallyActive: !1\n },\n physics: {\n enabled: !0,\n barnesHut: {\n gravitationalConstant: [-2e3, -3e4, 0, 50],\n centralGravity: [.3, 0, 10, .05],\n springLength: [95, 0, 500, 5],\n springConstant: [.04, 0, 1.2, .005],\n damping: [.09, 0, 1, .01],\n avoidOverlap: [0, 0, 1, .01]\n },\n forceAtlas2Based: {\n gravitationalConstant: [-50, -500, 0, 1],\n centralGravity: [.01, 0, 1, .005],\n springLength: [95, 0, 500, 5],\n springConstant: [.08, 0, 1.2, .005],\n damping: [.4, 0, 1, .01],\n avoidOverlap: [0, 0, 1, .01]\n },\n repulsion: {\n centralGravity: [.2, 0, 10, .05],\n springLength: [200, 0, 500, 5],\n springConstant: [.05, 0, 1.2, .005],\n nodeDistance: [100, 0, 500, 5],\n damping: [.09, 0, 1, .01]\n },\n hierarchicalRepulsion: {\n centralGravity: [.2, 0, 10, .05],\n springLength: [100, 0, 500, 5],\n springConstant: [.01, 0, 1.2, .005],\n nodeDistance: [120, 0, 500, 5],\n damping: [.09, 0, 1, .01]\n },\n maxVelocity: [50, 0, 150, 1],\n minVelocity: [.1, .01, .5, .01],\n solver: [\"barnesHut\", \"forceAtlas2Based\", \"repulsion\", \"hierarchicalRepulsion\"],\n timestep: [.5, .01, 1, .01]\n }\n},\n allOptions$2 = Object.freeze({\n allOptions: allOptions$1,\n configureOptions: configureOptions\n}),\n FloydWarshall = function () {\n var t = Math.min;\n\n function e() {\n classCallCheck$1(this, e);\n }\n\n return createClass$1(e, [{\n key: \"getDistances\",\n value: function (e, o, n) {\n for (var a = {}, d = e.edges, s = 0; s < o.length; s++) {\n var r = o[s],\n l = {};\n a[r] = l;\n\n for (var c = 0; c < o.length; c++) l[o[c]] = s == c ? 0 : 1e9;\n }\n\n for (var u = 0, p; u < n.length; u++) p = d[n[u]], !0 === p.connected && void 0 !== a[p.fromId] && void 0 !== a[p.toId] && (a[p.fromId][p.toId] = 1, a[p.toId][p.fromId] = 1);\n\n for (var h = o.length, m = 0; m < h; m++) for (var g = o[m], y = a[g], f = 0; f < h - 1; f++) for (var b = o[f], _ = a[b], v = f + 1; v < h; v++) {\n var w = o[v],\n x = a[w],\n S = t(_[w], _[g] + y[w]);\n _[w] = S, x[b] = S;\n }\n\n return a;\n }\n }]), e;\n}(),\n KamadaKawai = function () {\n var t = Math.sqrt,\n o = Math.pow,\n n = Math.max,\n i = Math.min;\n\n function e(t, o, n) {\n classCallCheck$1(this, e), this.body = t, this.springLength = o, this.springConstant = n, this.distanceSolver = new FloydWarshall();\n }\n\n return createClass$1(e, [{\n key: \"setOptions\",\n value: function (e) {\n e && (e.springLength && (this.springLength = e.springLength), e.springConstant && (this.springConstant = e.springConstant));\n }\n }, {\n key: \"solve\",\n value: function (e, t) {\n var o = !!(2 < arguments.length && void 0 !== arguments[2]) && arguments[2],\n a = this.distanceSolver.getDistances(this.body, e, t);\n this._createL_matrix(a), this._createK_matrix(a), this._createE_matrix();\n\n for (var d = 0, s = n(1e3, i(10 * this.body.nodeIndices.length, 6e3)), r = 1e9, l = 0, c = 0, u = 0, p = 0, h = 0; r > .01 && d < s;) {\n d += 1;\n\n var m = this._getHighestEnergyNode(o),\n g = slicedToArray(m, 4);\n\n for (l = g[0], r = g[1], c = g[2], u = g[3], p = r, h = 0; p > 1 && h < 5;) {\n h += 1, this._moveNode(l, c, u);\n\n var y = this._getEnergy(l),\n f = slicedToArray(y, 3);\n\n p = f[0], c = f[1], u = f[2];\n }\n }\n }\n }, {\n key: \"_getHighestEnergyNode\",\n value: function (e) {\n for (var t = this.body.nodeIndices, o = this.body.nodes, n = 0, i = t[0], a = 0, d = 0, s = 0, r; s < t.length; s++) if (r = t[s], !1 === o[r].predefinedPosition || !0 === o[r].isCluster && !0 === e || !0 === o[r].options.fixed.x || !0 === o[r].options.fixed.y) {\n var l = this._getEnergy(r),\n c = slicedToArray(l, 3),\n u = c[0],\n p = c[1],\n h = c[2];\n\n n < u && (n = u, i = r, a = p, d = h);\n }\n\n return [i, n, a, d];\n }\n }, {\n key: \"_getEnergy\",\n value: function (e) {\n var n = slicedToArray(this.E_sums[e], 2),\n i = n[0],\n a = n[1],\n d = t(o(i, 2) + o(a, 2));\n return [d, i, a];\n }\n }, {\n key: \"_moveNode\",\n value: function (e, t, n) {\n for (var a = this.body.nodeIndices, d = this.body.nodes, s = 0, r = 0, l = 0, c = d[e].x, u = d[e].y, p = this.K_matrix[e], h = this.L_matrix[e], m = 0, g; m < a.length; m++) if (g = a[m], g !== e) {\n var y = d[g].x,\n f = d[g].y,\n b = p[g],\n _ = h[g],\n v = 1 / o(o(c - y, 2) + o(u - f, 2), 1.5);\n s += b * (1 - _ * o(u - f, 2) * v), r += b * (_ * (c - y) * (u - f) * v), l += b * (1 - _ * o(c - y, 2) * v);\n }\n\n var k = s,\n w = r,\n x = t,\n S = l,\n O = (x / k + n / w) / (w / k - S / w);\n d[e].x += -(w * O + x) / k, d[e].y += O, this._updateE_matrix(e);\n }\n }, {\n key: \"_createL_matrix\",\n value: function (e) {\n var t = this.body.nodeIndices,\n o = this.springLength;\n this.L_matrix = [];\n\n for (var n = 0; n < t.length; n++) {\n this.L_matrix[t[n]] = {};\n\n for (var a = 0; a < t.length; a++) this.L_matrix[t[n]][t[a]] = o * e[t[n]][t[a]];\n }\n }\n }, {\n key: \"_createK_matrix\",\n value: function (e) {\n var t = this.body.nodeIndices,\n n = this.springConstant;\n this.K_matrix = [];\n\n for (var a = 0; a < t.length; a++) {\n this.K_matrix[t[a]] = {};\n\n for (var d = 0; d < t.length; d++) this.K_matrix[t[a]][t[d]] = n * o(e[t[a]][t[d]], -2);\n }\n }\n }, {\n key: \"_createE_matrix\",\n value: function () {\n var e = this.body.nodeIndices,\n n = this.body.nodes;\n this.E_matrix = {}, this.E_sums = {};\n\n for (var a = 0; a < e.length; a++) this.E_matrix[e[a]] = [];\n\n for (var d = 0; d < e.length; d++) {\n for (var s = e[d], r = n[s].x, l = n[s].y, c = 0, u = 0, p = d, h; p < e.length; p++) if (h = e[p], h !== s) {\n var m = n[h].x,\n g = n[h].y,\n y = 1 / t(o(r - m, 2) + o(l - g, 2));\n this.E_matrix[s][p] = [this.K_matrix[s][h] * (r - m - this.L_matrix[s][h] * (r - m) * y), this.K_matrix[s][h] * (l - g - this.L_matrix[s][h] * (l - g) * y)], this.E_matrix[h][d] = this.E_matrix[s][p], c += this.E_matrix[s][p][0], u += this.E_matrix[s][p][1];\n }\n\n this.E_sums[s] = [c, u];\n }\n }\n }, {\n key: \"_updateE_matrix\",\n value: function (e) {\n for (var n = this.body.nodeIndices, a = this.body.nodes, d = this.E_matrix[e], s = this.K_matrix[e], r = this.L_matrix[e], l = a[e].x, c = a[e].y, u = 0, p = 0, h = 0, m; h < n.length; h++) if (m = n[h], m !== e) {\n var g = d[h],\n y = g[0],\n f = g[1],\n b = a[m].x,\n _ = a[m].y,\n v = 1 / t(o(l - b, 2) + o(c - _, 2)),\n k = s[m] * (l - b - r[m] * (l - b) * v),\n w = s[m] * (c - _ - r[m] * (c - _) * v);\n d[h] = [k, w], u += k, p += w;\n var x = this.E_sums[m];\n x[0] += k - y, x[1] += w - f;\n }\n\n this.E_sums[e] = [u, p];\n }\n }]), e;\n}();\n\nfunction Network(e, t, o) {\n var n = this;\n if (!(this instanceof Network)) throw new SyntaxError(\"Constructor must be called with the new operator\");\n this.options = {}, this.defaultOptions = {\n locale: \"en\",\n locales: locales,\n clickToUse: !1\n }, util.extend(this.options, this.defaultOptions), this.body = {\n container: e,\n nodes: {},\n nodeIndices: [],\n edges: {},\n edgeIndices: [],\n emitter: {\n on: this.on.bind(this),\n off: this.off.bind(this),\n emit: this.emit.bind(this),\n once: this.once.bind(this)\n },\n eventListeners: {\n onTap: function () {},\n onTouch: function () {},\n onDoubleTap: function () {},\n onHold: function () {},\n onDragStart: function () {},\n onDrag: function () {},\n onDragEnd: function () {},\n onMouseWheel: function () {},\n onPinch: function () {},\n onMouseMove: function () {},\n onRelease: function () {},\n onContext: function () {}\n },\n data: {\n nodes: null,\n edges: null\n },\n functions: {\n createNode: function () {},\n createEdge: function () {},\n getPointer: function () {}\n },\n modules: {},\n view: {\n scale: 1,\n translation: {\n x: 0,\n y: 0\n }\n }\n }, this.bindEventListeners(), this.images = new Images(function () {\n return n.body.emitter.emit(\"_requestRedraw\");\n }), this.groups = new Groups(), this.canvas = new Canvas(this.body), this.selectionHandler = new SelectionHandler(this.body, this.canvas), this.interactionHandler = new InteractionHandler(this.body, this.canvas, this.selectionHandler), this.view = new View(this.body, this.canvas), this.renderer = new CanvasRenderer(this.body, this.canvas), this.physics = new PhysicsEngine(this.body), this.layoutEngine = new LayoutEngine(this.body), this.clustering = new ClusterEngine(this.body), this.manipulation = new ManipulationSystem(this.body, this.canvas, this.selectionHandler), this.nodesHandler = new NodesHandler(this.body, this.images, this.groups, this.layoutEngine), this.edgesHandler = new EdgesHandler(this.body, this.images, this.groups), this.body.modules.kamadaKawai = new KamadaKawai(this.body, 150, .05), this.body.modules.clustering = this.clustering, this.canvas._create(), this.setOptions(o), this.setData(t);\n}\n\ncomponentEmitter(Network.prototype), Network.prototype.setOptions = function (e) {\n var t = this;\n\n if (null === e && (e = void 0), void 0 !== e) {\n var o = Validator.validate(e, allOptions$1);\n !0 === o && console.log(\"%cErrors have been found in the supplied options object.\", printStyle);\n\n if (util.selectiveDeepExtend([\"locale\", \"locales\", \"clickToUse\"], this.options, e), e = this.layoutEngine.setOptions(e.layout, e), this.canvas.setOptions(e), this.groups.setOptions(e.groups), this.nodesHandler.setOptions(e.nodes), this.edgesHandler.setOptions(e.edges), this.physics.setOptions(e.physics), this.manipulation.setOptions(e.manipulation, e, this.options), this.interactionHandler.setOptions(e.interaction), this.renderer.setOptions(e.interaction), this.selectionHandler.setOptions(e.interaction), void 0 !== e.groups && this.body.emitter.emit(\"refreshNodes\"), \"configure\" in e && (!this.configurator && (this.configurator = new Configurator(this, this.body.container, configureOptions, this.canvas.pixelRatio)), this.configurator.setOptions(e.configure)), this.configurator && !0 === this.configurator.options.enabled) {\n var n = {\n nodes: {},\n edges: {},\n layout: {},\n interaction: {},\n manipulation: {},\n physics: {},\n global: {}\n };\n util.deepExtend(n.nodes, this.nodesHandler.options), util.deepExtend(n.edges, this.edgesHandler.options), util.deepExtend(n.layout, this.layoutEngine.options), util.deepExtend(n.interaction, this.selectionHandler.options), util.deepExtend(n.interaction, this.renderer.options), util.deepExtend(n.interaction, this.interactionHandler.options), util.deepExtend(n.manipulation, this.manipulation.options), util.deepExtend(n.physics, this.physics.options), util.deepExtend(n.global, this.canvas.options), util.deepExtend(n.global, this.options), this.configurator.setModuleOptions(n);\n }\n\n void 0 === e.clickToUse ? this.body.emitter.emit(\"activate\") : !0 === e.clickToUse ? void 0 === this.activator && (this.activator = new Activator_1(this.canvas.frame), this.activator.on(\"change\", function () {\n t.body.emitter.emit(\"activate\");\n })) : (void 0 !== this.activator && (this.activator.destroy(), delete this.activator), this.body.emitter.emit(\"activate\")), this.canvas.setSize(), this.body.emitter.emit(\"startSimulation\");\n }\n}, Network.prototype._updateVisibleIndices = function () {\n var e = this.body.nodes,\n t = this.body.edges;\n\n for (var o in this.body.nodeIndices = [], this.body.edgeIndices = [], e) e.hasOwnProperty(o) && (this.clustering._isClusteredNode(o) || !1 !== e[o].options.hidden || this.body.nodeIndices.push(e[o].id));\n\n for (var n in t) if (t.hasOwnProperty(n)) {\n var i = t[n],\n a = e[i.fromId],\n d = e[i.toId],\n s = !this.clustering._isClusteredEdge(n) && !1 === i.options.hidden && void 0 !== a && void 0 !== d && !1 === a.options.hidden && !1 === d.options.hidden;\n s && this.body.edgeIndices.push(i.id);\n }\n}, Network.prototype.bindEventListeners = function () {\n var e = this;\n this.body.emitter.on(\"_dataChanged\", function () {\n e.edgesHandler._updateState(), e.body.emitter.emit(\"_dataUpdated\");\n }), this.body.emitter.on(\"_dataUpdated\", function () {\n e.clustering._updateState(), e._updateVisibleIndices(), e._updateValueRange(e.body.nodes), e._updateValueRange(e.body.edges), e.body.emitter.emit(\"startSimulation\"), e.body.emitter.emit(\"_requestRedraw\");\n });\n}, Network.prototype.setData = function (e) {\n if (this.body.emitter.emit(\"resetPhysics\"), this.body.emitter.emit(\"_resetData\"), this.selectionHandler.unselectAll(), e && e.dot && (e.nodes || e.edges)) throw new SyntaxError(\"Data must contain either parameter \\\"dot\\\" or parameter pair \\\"nodes\\\" and \\\"edges\\\", but not both.\");\n\n if (this.setOptions(e && e.options), e && e.dot) {\n console.log(\"The dot property has been deprecated. Please use the static convertDot method to convert DOT into vis.network format and use the normal data format with nodes and edges. This converter is used like this: var data = vis.network.convertDot(dotString);\");\n var t = dotparser.DOTToGraph(e.dot);\n return void this.setData(t);\n }\n\n if (e && e.gephi) {\n console.log(\"The gephi property has been deprecated. Please use the static convertGephi method to convert gephi into vis.network format and use the normal data format with nodes and edges. This converter is used like this: var data = vis.network.convertGephi(gephiJson);\");\n var o = parseGephi(e.gephi);\n return void this.setData(o);\n }\n\n this.nodesHandler.setData(e && e.nodes, !0), this.edgesHandler.setData(e && e.edges, !0), this.body.emitter.emit(\"_dataChanged\"), this.body.emitter.emit(\"_dataLoaded\"), this.body.emitter.emit(\"initPhysics\");\n}, Network.prototype.destroy = function () {\n for (var e in this.body.emitter.emit(\"destroy\"), this.body.emitter.off(), this.off(), delete this.groups, delete this.canvas, delete this.selectionHandler, delete this.interactionHandler, delete this.view, delete this.renderer, delete this.physics, delete this.layoutEngine, delete this.clustering, delete this.manipulation, delete this.nodesHandler, delete this.edgesHandler, delete this.configurator, delete this.images, this.body.nodes) this.body.nodes.hasOwnProperty(e) && delete this.body.nodes[e];\n\n for (var t in this.body.edges) this.body.edges.hasOwnProperty(t) && delete this.body.edges[t];\n\n util.recursiveDOMDelete(this.body.container);\n}, Network.prototype._updateValueRange = function (e) {\n var t = void 0,\n o = void 0,\n n = 0,\n i;\n\n for (i in e) if (e.hasOwnProperty(i)) {\n var a = e[i].getValue();\n a !== void 0 && (t = t === void 0 ? a : Math.min(a, t), o = o === void 0 ? a : Math.max(a, o), n += a);\n }\n\n if (t !== void 0 && o !== void 0) for (i in e) e.hasOwnProperty(i) && e[i].setValueRange(t, o, n);\n}, Network.prototype.isActive = function () {\n return !this.activator || this.activator.active;\n}, Network.prototype.setSize = function () {\n return this.canvas.setSize.apply(this.canvas, arguments);\n}, Network.prototype.canvasToDOM = function () {\n return this.canvas.canvasToDOM.apply(this.canvas, arguments);\n}, Network.prototype.DOMtoCanvas = function () {\n return this.canvas.DOMtoCanvas.apply(this.canvas, arguments);\n}, Network.prototype.findNode = function () {\n return this.clustering.findNode.apply(this.clustering, arguments);\n}, Network.prototype.isCluster = function () {\n return this.clustering.isCluster.apply(this.clustering, arguments);\n}, Network.prototype.openCluster = function () {\n return this.clustering.openCluster.apply(this.clustering, arguments);\n}, Network.prototype.cluster = function () {\n return this.clustering.cluster.apply(this.clustering, arguments);\n}, Network.prototype.getNodesInCluster = function () {\n return this.clustering.getNodesInCluster.apply(this.clustering, arguments);\n}, Network.prototype.clusterByConnection = function () {\n return this.clustering.clusterByConnection.apply(this.clustering, arguments);\n}, Network.prototype.clusterByHubsize = function () {\n return this.clustering.clusterByHubsize.apply(this.clustering, arguments);\n}, Network.prototype.clusterOutliers = function () {\n return this.clustering.clusterOutliers.apply(this.clustering, arguments);\n}, Network.prototype.getSeed = function () {\n return this.layoutEngine.getSeed.apply(this.layoutEngine, arguments);\n}, Network.prototype.enableEditMode = function () {\n return this.manipulation.enableEditMode.apply(this.manipulation, arguments);\n}, Network.prototype.disableEditMode = function () {\n return this.manipulation.disableEditMode.apply(this.manipulation, arguments);\n}, Network.prototype.addNodeMode = function () {\n return this.manipulation.addNodeMode.apply(this.manipulation, arguments);\n}, Network.prototype.editNode = function () {\n return this.manipulation.editNode.apply(this.manipulation, arguments);\n}, Network.prototype.editNodeMode = function () {\n return console.log(\"Deprecated: Please use editNode instead of editNodeMode.\"), this.manipulation.editNode.apply(this.manipulation, arguments);\n}, Network.prototype.addEdgeMode = function () {\n return this.manipulation.addEdgeMode.apply(this.manipulation, arguments);\n}, Network.prototype.editEdgeMode = function () {\n return this.manipulation.editEdgeMode.apply(this.manipulation, arguments);\n}, Network.prototype.deleteSelected = function () {\n return this.manipulation.deleteSelected.apply(this.manipulation, arguments);\n}, Network.prototype.getPositions = function () {\n return this.nodesHandler.getPositions.apply(this.nodesHandler, arguments);\n}, Network.prototype.storePositions = function () {\n return this.nodesHandler.storePositions.apply(this.nodesHandler, arguments);\n}, Network.prototype.moveNode = function () {\n return this.nodesHandler.moveNode.apply(this.nodesHandler, arguments);\n}, Network.prototype.getBoundingBox = function () {\n return this.nodesHandler.getBoundingBox.apply(this.nodesHandler, arguments);\n}, Network.prototype.getConnectedNodes = function (e) {\n return void 0 === this.body.nodes[e] ? this.edgesHandler.getConnectedNodes.apply(this.edgesHandler, arguments) : this.nodesHandler.getConnectedNodes.apply(this.nodesHandler, arguments);\n}, Network.prototype.getConnectedEdges = function () {\n return this.nodesHandler.getConnectedEdges.apply(this.nodesHandler, arguments);\n}, Network.prototype.startSimulation = function () {\n return this.physics.startSimulation.apply(this.physics, arguments);\n}, Network.prototype.stopSimulation = function () {\n return this.physics.stopSimulation.apply(this.physics, arguments);\n}, Network.prototype.stabilize = function () {\n return this.physics.stabilize.apply(this.physics, arguments);\n}, Network.prototype.getSelection = function () {\n return this.selectionHandler.getSelection.apply(this.selectionHandler, arguments);\n}, Network.prototype.setSelection = function () {\n return this.selectionHandler.setSelection.apply(this.selectionHandler, arguments);\n}, Network.prototype.getSelectedNodes = function () {\n return this.selectionHandler.getSelectedNodes.apply(this.selectionHandler, arguments);\n}, Network.prototype.getSelectedEdges = function () {\n return this.selectionHandler.getSelectedEdges.apply(this.selectionHandler, arguments);\n}, Network.prototype.getNodeAt = function () {\n var e = this.selectionHandler.getNodeAt.apply(this.selectionHandler, arguments);\n return void 0 !== e && void 0 !== e.id ? e.id : e;\n}, Network.prototype.getEdgeAt = function () {\n var e = this.selectionHandler.getEdgeAt.apply(this.selectionHandler, arguments);\n return void 0 !== e && void 0 !== e.id ? e.id : e;\n}, Network.prototype.selectNodes = function () {\n return this.selectionHandler.selectNodes.apply(this.selectionHandler, arguments);\n}, Network.prototype.selectEdges = function () {\n return this.selectionHandler.selectEdges.apply(this.selectionHandler, arguments);\n}, Network.prototype.unselectAll = function () {\n this.selectionHandler.unselectAll.apply(this.selectionHandler, arguments), this.redraw();\n}, Network.prototype.redraw = function () {\n return this.renderer.redraw.apply(this.renderer, arguments);\n}, Network.prototype.getScale = function () {\n return this.view.getScale.apply(this.view, arguments);\n}, Network.prototype.getViewPosition = function () {\n return this.view.getViewPosition.apply(this.view, arguments);\n}, Network.prototype.fit = function () {\n return this.view.fit.apply(this.view, arguments);\n}, Network.prototype.moveTo = function () {\n return this.view.moveTo.apply(this.view, arguments);\n}, Network.prototype.focus = function () {\n return this.view.focus.apply(this.view, arguments);\n}, Network.prototype.releaseNode = function () {\n return this.view.releaseNode.apply(this.view, arguments);\n}, Network.prototype.getOptionsFromConfigurator = function () {\n var e = {};\n return this.configurator && (e = this.configurator.getOptions.apply(this.configurator)), e;\n};\nvar DOMutil = createCommonjsModule$2(function (e, t) {\n t.prepareElements = function (e) {\n for (var t in e) e.hasOwnProperty(t) && (e[t].redundant = e[t].used, e[t].used = []);\n }, t.cleanupElements = function (e) {\n for (var t in e) if (e.hasOwnProperty(t) && e[t].redundant) {\n for (var o = 0; o < e[t].redundant.length; o++) e[t].redundant[o].parentNode.removeChild(e[t].redundant[o]);\n\n e[t].redundant = [];\n }\n }, t.resetElements = function (e) {\n t.prepareElements(e), t.cleanupElements(e), t.prepareElements(e);\n }, t.getSVGElement = function (e, t, o) {\n var n;\n return t.hasOwnProperty(e) ? 0 < t[e].redundant.length ? (n = t[e].redundant[0], t[e].redundant.shift()) : (n = document.createElementNS(\"http://www.w3.org/2000/svg\", e), o.appendChild(n)) : (n = document.createElementNS(\"http://www.w3.org/2000/svg\", e), t[e] = {\n used: [],\n redundant: []\n }, o.appendChild(n)), t[e].used.push(n), n;\n }, t.getDOMElement = function (e, t, o, n) {\n var i;\n return t.hasOwnProperty(e) ? 0 < t[e].redundant.length ? (i = t[e].redundant[0], t[e].redundant.shift()) : (i = document.createElement(e), void 0 === n ? o.appendChild(i) : o.insertBefore(i, n)) : (i = document.createElement(e), t[e] = {\n used: [],\n redundant: []\n }, void 0 === n ? o.appendChild(i) : o.insertBefore(i, n)), t[e].used.push(i), i;\n }, t.drawPoint = function (e, o, n, i, a, d) {\n var s;\n\n if (\"circle\" == n.style ? (s = t.getSVGElement(\"circle\", i, a), s.setAttributeNS(null, \"cx\", e), s.setAttributeNS(null, \"cy\", o), s.setAttributeNS(null, \"r\", .5 * n.size)) : (s = t.getSVGElement(\"rect\", i, a), s.setAttributeNS(null, \"x\", e - .5 * n.size), s.setAttributeNS(null, \"y\", o - .5 * n.size), s.setAttributeNS(null, \"width\", n.size), s.setAttributeNS(null, \"height\", n.size)), void 0 !== n.styles && s.setAttributeNS(null, \"style\", n.styles), s.setAttributeNS(null, \"class\", n.className + \" vis-point\"), d) {\n var r = t.getSVGElement(\"text\", i, a);\n d.xOffset && (e += d.xOffset), d.yOffset && (o += d.yOffset), d.content && (r.textContent = d.content), d.className && r.setAttributeNS(null, \"class\", d.className + \" vis-label\"), r.setAttributeNS(null, \"x\", e), r.setAttributeNS(null, \"y\", o);\n }\n\n return s;\n }, t.drawBar = function (e, o, n, i, a, d, s, r) {\n if (0 != i) {\n 0 > i && (i *= -1, o -= i);\n var l = t.getSVGElement(\"rect\", d, s);\n l.setAttributeNS(null, \"x\", e - .5 * n), l.setAttributeNS(null, \"y\", o), l.setAttributeNS(null, \"width\", n), l.setAttributeNS(null, \"height\", i), l.setAttributeNS(null, \"class\", a), r && l.setAttributeNS(null, \"style\", r);\n }\n };\n}),\n DOMutil_1 = DOMutil.prepareElements,\n DOMutil_2 = DOMutil.cleanupElements,\n DOMutil_3 = DOMutil.resetElements,\n DOMutil_4 = DOMutil.getSVGElement,\n DOMutil_5 = DOMutil.getDOMElement,\n DOMutil_6 = DOMutil.drawPoint,\n DOMutil_7 = DOMutil.drawBar,\n DOMutil$1 = Object.freeze({\n default: DOMutil,\n __moduleExports: DOMutil,\n prepareElements: DOMutil_1,\n cleanupElements: DOMutil_2,\n resetElements: DOMutil_3,\n getSVGElement: DOMutil_4,\n getDOMElement: DOMutil_5,\n drawPoint: DOMutil_6,\n drawBar: DOMutil_7\n}),\n moment$2 = createCommonjsModule$2(function (e) {\n var t = Math.round,\n o = Math.pow,\n n = Math.max,\n a = Math.abs,\n d = Math.min,\n s = Math.floor,\n r = Math.ceil;\n\n (function (t, o) {\n e.exports = o();\n })(commonjsGlobal$2, function () {\n function l() {\n return $t.apply(null, arguments);\n }\n\n function u(e) {\n return e instanceof Array || \"[object Array]\" === Object.prototype.toString.call(e);\n }\n\n function p(e) {\n return null != e && \"[object Object]\" === Object.prototype.toString.call(e);\n }\n\n function h(e) {\n if (Object.getOwnPropertyNames) return 0 === Object.getOwnPropertyNames(e).length;\n\n for (var t in e) if (e.hasOwnProperty(t)) return !1;\n\n return !0;\n }\n\n function m(e) {\n return void 0 === e;\n }\n\n function g(e) {\n return \"number\" == typeof e || \"[object Number]\" === Object.prototype.toString.call(e);\n }\n\n function y(e) {\n return e instanceof Date || \"[object Date]\" === Object.prototype.toString.call(e);\n }\n\n function f(e, t) {\n var o = [],\n n;\n\n for (n = 0; n < e.length; ++n) o.push(t(e[n], n));\n\n return o;\n }\n\n function _(e, t) {\n return Object.prototype.hasOwnProperty.call(e, t);\n }\n\n function v(e, t) {\n for (var o in t) _(t, o) && (e[o] = t[o]);\n\n return _(t, \"toString\") && (e.toString = t.toString), _(t, \"valueOf\") && (e.valueOf = t.valueOf), e;\n }\n\n function k(e, t, o, n) {\n return dt(e, t, o, n, !0).utc();\n }\n\n function w() {\n return {\n empty: !1,\n unusedTokens: [],\n unusedInput: [],\n overflow: -2,\n charsLeftOver: 0,\n nullInput: !1,\n invalidMonth: null,\n invalidFormat: !1,\n userInvalidated: !1,\n iso: !1,\n parsedDateParts: [],\n meridiem: null,\n rfc2822: !1,\n weekdayMismatch: !1\n };\n }\n\n function x(e) {\n return null == e._pf && (e._pf = w()), e._pf;\n }\n\n function S(e) {\n if (null == e._isValid) {\n var t = x(e),\n o = Kt.call(t.parsedDateParts, function (e) {\n return null != e;\n }),\n n = !isNaN(e._d.getTime()) && 0 > t.overflow && !t.empty && !t.invalidMonth && !t.invalidWeekday && !t.weekdayMismatch && !t.nullInput && !t.invalidFormat && !t.userInvalidated && (!t.meridiem || t.meridiem && o);\n if (e._strict && (n = n && 0 === t.charsLeftOver && 0 === t.unusedTokens.length && void 0 === t.bigHour), null == Object.isFrozen || !Object.isFrozen(e)) e._isValid = n;else return n;\n }\n\n return e._isValid;\n }\n\n function O(e) {\n var t = k(NaN);\n return null == e ? x(t).userInvalidated = !0 : v(x(t), e), t;\n }\n\n function D(e, t) {\n var o, n, a;\n if (m(t._isAMomentObject) || (e._isAMomentObject = t._isAMomentObject), m(t._i) || (e._i = t._i), m(t._f) || (e._f = t._f), m(t._l) || (e._l = t._l), m(t._strict) || (e._strict = t._strict), m(t._tzm) || (e._tzm = t._tzm), m(t._isUTC) || (e._isUTC = t._isUTC), m(t._offset) || (e._offset = t._offset), m(t._pf) || (e._pf = x(t)), m(t._locale) || (e._locale = t._locale), 0 < Qt.length) for (o = 0; o < Qt.length; o++) n = Qt[o], a = t[n], m(a) || (e[n] = a);\n return e;\n }\n\n function T(e) {\n D(this, e), this._d = new Date(null == e._d ? NaN : e._d.getTime()), this.isValid() || (this._d = new Date(NaN)), !1 === Jt && (Jt = !0, l.updateOffset(this), Jt = !1);\n }\n\n function E(e) {\n return e instanceof T || null != e && null != e._isAMomentObject;\n }\n\n function C(e) {\n return 0 > e ? r(e) || 0 : s(e);\n }\n\n function M(e) {\n var t = +e,\n o = 0;\n return 0 != t && isFinite(t) && (o = C(t)), o;\n }\n\n function I(e, t, o) {\n var n = d(e.length, t.length),\n s = a(e.length - t.length),\n r = 0,\n l;\n\n for (l = 0; l < n; l++) (o && e[l] !== t[l] || !o && M(e[l]) !== M(t[l])) && r++;\n\n return r + s;\n }\n\n function P(e) {\n !1 === l.suppressDeprecationWarnings && \"undefined\" != typeof console && console.warn && console.warn(\"Deprecation warning: \" + e);\n }\n\n function F(e, t) {\n var o = !0;\n return v(function () {\n if (null != l.deprecationHandler && l.deprecationHandler(null, e), o) {\n for (var n = [], a = 0, d; a < arguments.length; a++) {\n if (d = \"\", \"object\" == typeof arguments[a]) {\n for (var s in d += \"\\n[\" + a + \"] \", arguments[0]) d += s + \": \" + arguments[0][s] + \", \";\n\n d = d.slice(0, -2);\n } else d = arguments[a];\n\n n.push(d);\n }\n\n P(e + \"\\nArguments: \" + Array.prototype.slice.call(n).join(\"\") + \"\\n\" + new Error().stack), o = !1;\n }\n\n return t.apply(this, arguments);\n }, t);\n }\n\n function N(e, t) {\n null != l.deprecationHandler && l.deprecationHandler(e, t), eo[e] || (P(t), eo[e] = !0);\n }\n\n function Y(e) {\n return e instanceof Function || \"[object Function]\" === Object.prototype.toString.call(e);\n }\n\n function R(e) {\n var t, o;\n\n for (o in e) t = e[o], Y(t) ? this[o] = t : this[\"_\" + o] = t;\n\n this._config = e, this._dayOfMonthOrdinalParseLenient = new RegExp((this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) + \"|\" + /\\d{1,2}/.source);\n }\n\n function z(e, t) {\n var o = v({}, e),\n n;\n\n for (n in t) _(t, n) && (p(e[n]) && p(t[n]) ? (o[n] = {}, v(o[n], e[n]), v(o[n], t[n])) : null == t[n] ? delete o[n] : o[n] = t[n]);\n\n for (n in e) _(e, n) && !_(t, n) && p(e[n]) && (o[n] = v({}, o[n]));\n\n return o;\n }\n\n function B(e) {\n null != e && this.set(e);\n }\n\n function L(e, t, o) {\n var n = this._calendar[e] || this._calendar.sameElse;\n return Y(n) ? n.call(t, o) : n;\n }\n\n function A(e) {\n var t = this._longDateFormat[e],\n o = this._longDateFormat[e.toUpperCase()];\n\n return t || !o ? t : (this._longDateFormat[e] = o.replace(/MMMM|MM|DD|dddd/g, function (e) {\n return e.slice(1);\n }), this._longDateFormat[e]);\n }\n\n function H(e, t) {\n var o = e.toLowerCase();\n no[o] = no[o + \"s\"] = no[t] = e;\n }\n\n function j(e) {\n return \"string\" == typeof e ? no[e] || no[e.toLowerCase()] : void 0;\n }\n\n function W(e) {\n var t = {},\n o,\n n;\n\n for (n in e) _(e, n) && (o = j(n), o && (t[o] = e[n]));\n\n return t;\n }\n\n function U(e, t) {\n io[e] = t;\n }\n\n function V(e) {\n var t = [];\n\n for (var o in e) t.push({\n unit: o,\n priority: io[o]\n });\n\n return t.sort(function (e, t) {\n return e.priority - t.priority;\n }), t;\n }\n\n function G(e, t, i) {\n var d = \"\" + a(e),\n s = t - d.length;\n return (0 <= e ? i ? \"+\" : \"\" : \"-\") + o(10, n(0, s)).toString().substr(1) + d;\n }\n\n function q(e, t, o, n) {\n var i = n;\n \"string\" == typeof n && (i = function () {\n return this[n]();\n }), e && (lo[e] = i), t && (lo[t[0]] = function () {\n return G(i.apply(this, arguments), t[1], t[2]);\n }), o && (lo[o] = function () {\n return this.localeData().ordinal(i.apply(this, arguments), e);\n });\n }\n\n function X(e) {\n return e.match(/\\[[\\s\\S]/) ? e.replace(/^\\[|\\]$/g, \"\") : e.replace(/\\\\/g, \"\");\n }\n\n function Z(e) {\n var t = e.match(ao),\n o,\n n;\n\n for (o = 0, n = t.length; o < n; o++) t[o] = lo[t[o]] ? lo[t[o]] : X(t[o]);\n\n return function (o) {\n var a = \"\",\n d;\n\n for (d = 0; d < n; d++) a += Y(t[d]) ? t[d].call(o, e) : t[d];\n\n return a;\n };\n }\n\n function $(e, t) {\n return e.isValid() ? (t = K(t, e.localeData()), ro[t] = ro[t] || Z(t), ro[t](e)) : e.localeData().invalidDate();\n }\n\n function K(e, t) {\n function o(e) {\n return t.longDateFormat(e) || e;\n }\n\n var n = 5;\n\n for (so.lastIndex = 0; 0 <= n && so.test(e);) e = e.replace(so, o), so.lastIndex = 0, n -= 1;\n\n return e;\n }\n\n function Q(e, t, o) {\n To[e] = Y(t) ? t : function (e) {\n return e && o ? o : t;\n };\n }\n\n function J(e, t) {\n return _(To, e) ? To[e](t._strict, t._locale) : new RegExp(ee(e));\n }\n\n function ee(e) {\n return te(e.replace(\"\\\\\", \"\").replace(/\\\\(\\[)|\\\\(\\])|\\[([^\\]\\[]*)\\]|\\\\(.)/g, function (e, t, o, n, i) {\n return t || o || n || i;\n }));\n }\n\n function te(e) {\n return e.replace(/[-\\/\\\\^$*+?.()|[\\]{}]/g, \"\\\\$&\");\n }\n\n function oe(e, t) {\n var o = t,\n n;\n\n for (\"string\" == typeof e && (e = [e]), g(t) && (o = function (e, o) {\n o[t] = M(e);\n }), n = 0; n < e.length; n++) Eo[e[n]] = o;\n }\n\n function ne(e, t) {\n oe(e, function (e, o, n, i) {\n n._w = n._w || {}, t(e, n._w, n, i);\n });\n }\n\n function ie(e, t, o) {\n null != t && _(Eo, e) && Eo[e](t, o._a, o, e);\n }\n\n function ae(e) {\n return de(e) ? 366 : 365;\n }\n\n function de(e) {\n return 0 == e % 4 && 0 != e % 100 || 0 == e % 400;\n }\n\n function se(e, t) {\n return function (o) {\n return null == o ? re(this, e) : (le(this, e, o), l.updateOffset(this, t), this);\n };\n }\n\n function re(e, t) {\n return e.isValid() ? e._d[\"get\" + (e._isUTC ? \"UTC\" : \"\") + t]() : NaN;\n }\n\n function le(e, t, o) {\n e.isValid() && !isNaN(o) && (\"FullYear\" === t && de(e.year()) && 1 === e.month() && 29 === e.date() ? e._d[\"set\" + (e._isUTC ? \"UTC\" : \"\") + t](o, e.month(), pe(o, e.month())) : e._d[\"set\" + (e._isUTC ? \"UTC\" : \"\") + t](o));\n }\n\n function ce(e, t) {\n if (\"object\" == typeof e) {\n e = W(e);\n\n for (var o = V(e), n = 0; n < o.length; n++) this[o[n].unit](e[o[n].unit]);\n } else if (e = j(e), Y(this[e])) return this[e](t);\n\n return this;\n }\n\n function ue(e, t) {\n return (e % t + t) % t;\n }\n\n function pe(e, t) {\n if (isNaN(e) || isNaN(t)) return NaN;\n var o = ue(t, 12);\n return e += (t - o) / 12, 1 === o ? de(e) ? 29 : 28 : 31 - o % 7 % 2;\n }\n\n function he(e, t, o) {\n var n = e.toLocaleLowerCase(),\n a,\n d,\n s;\n if (!this._monthsParse) for (this._monthsParse = [], this._longMonthsParse = [], this._shortMonthsParse = [], a = 0; 12 > a; ++a) s = k([2e3, a]), this._shortMonthsParse[a] = this.monthsShort(s, \"\").toLocaleLowerCase(), this._longMonthsParse[a] = this.months(s, \"\").toLocaleLowerCase();\n return o ? \"MMM\" === t ? (d = Ro.call(this._shortMonthsParse, n), -1 === d ? null : d) : (d = Ro.call(this._longMonthsParse, n), -1 === d ? null : d) : \"MMM\" === t ? (d = Ro.call(this._shortMonthsParse, n), -1 !== d) ? d : (d = Ro.call(this._longMonthsParse, n), -1 === d ? null : d) : (d = Ro.call(this._longMonthsParse, n), -1 !== d) ? d : (d = Ro.call(this._shortMonthsParse, n), -1 === d ? null : d);\n }\n\n function me(e, t, o) {\n var n, a, d;\n if (this._monthsParseExact) return he.call(this, e, t, o);\n\n for (this._monthsParse || (this._monthsParse = [], this._longMonthsParse = [], this._shortMonthsParse = []), n = 0; 12 > n; n++) {\n if (a = k([2e3, n]), o && !this._longMonthsParse[n] && (this._longMonthsParse[n] = new RegExp(\"^\" + this.months(a, \"\").replace(\".\", \"\") + \"$\", \"i\"), this._shortMonthsParse[n] = new RegExp(\"^\" + this.monthsShort(a, \"\").replace(\".\", \"\") + \"$\", \"i\")), o || this._monthsParse[n] || (d = \"^\" + this.months(a, \"\") + \"|^\" + this.monthsShort(a, \"\"), this._monthsParse[n] = new RegExp(d.replace(\".\", \"\"), \"i\")), o && \"MMMM\" === t && this._longMonthsParse[n].test(e)) return n;\n if (o && \"MMM\" === t && this._shortMonthsParse[n].test(e)) return n;\n if (!o && this._monthsParse[n].test(e)) return n;\n }\n }\n\n function ge(e, t) {\n var o;\n if (!e.isValid()) return e;\n if (\"string\" == typeof t) if (/^\\d+$/.test(t)) t = M(t);else if (t = e.localeData().monthsParse(t), !g(t)) return e;\n return o = d(e.date(), pe(e.year(), t)), e._d[\"set\" + (e._isUTC ? \"UTC\" : \"\") + \"Month\"](t, o), e;\n }\n\n function ye(e) {\n return null == e ? re(this, \"Month\") : (ge(this, e), l.updateOffset(this, !0), this);\n }\n\n function fe() {\n function e(e, t) {\n return t.length - e.length;\n }\n\n var t = [],\n o = [],\n n = [],\n a,\n d;\n\n for (a = 0; 12 > a; a++) d = k([2e3, a]), t.push(this.monthsShort(d, \"\")), o.push(this.months(d, \"\")), n.push(this.months(d, \"\")), n.push(this.monthsShort(d, \"\"));\n\n for (t.sort(e), o.sort(e), n.sort(e), a = 0; 12 > a; a++) t[a] = te(t[a]), o[a] = te(o[a]);\n\n for (a = 0; 24 > a; a++) n[a] = te(n[a]);\n\n this._monthsRegex = new RegExp(\"^(\" + n.join(\"|\") + \")\", \"i\"), this._monthsShortRegex = this._monthsRegex, this._monthsStrictRegex = new RegExp(\"^(\" + o.join(\"|\") + \")\", \"i\"), this._monthsShortStrictRegex = new RegExp(\"^(\" + t.join(\"|\") + \")\", \"i\");\n }\n\n function be(e, t, o, n, i, a, d) {\n var s;\n return 100 > e && 0 <= e ? (s = new Date(e + 400, t, o, n, i, a, d), isFinite(s.getFullYear()) && s.setFullYear(e)) : s = new Date(e, t, o, n, i, a, d), s;\n }\n\n function _e(e) {\n var t;\n\n if (100 > e && 0 <= e) {\n var o = Array.prototype.slice.call(arguments);\n o[0] = e + 400, t = new Date(Date.UTC.apply(null, o)), isFinite(t.getUTCFullYear()) && t.setUTCFullYear(e);\n } else t = new Date(Date.UTC.apply(null, arguments));\n\n return t;\n }\n\n function ve(e, t, o) {\n var n = 7 + t - o,\n i = (7 + _e(e, 0, n).getUTCDay() - t) % 7;\n return -i + n - 1;\n }\n\n function ke(e, t, o, n, i) {\n var a = ve(e, n, i),\n d = 1 + 7 * (t - 1) + (7 + o - n) % 7 + a,\n s,\n r;\n return 0 >= d ? (s = e - 1, r = ae(s) + d) : d > ae(e) ? (s = e + 1, r = d - ae(e)) : (s = e, r = d), {\n year: s,\n dayOfYear: r\n };\n }\n\n function we(e, t, o) {\n var n = ve(e.year(), t, o),\n i = s((e.dayOfYear() - n - 1) / 7) + 1,\n a,\n d;\n return 1 > i ? (d = e.year() - 1, a = i + xe(d, t, o)) : i > xe(e.year(), t, o) ? (a = i - xe(e.year(), t, o), d = e.year() + 1) : (d = e.year(), a = i), {\n week: a,\n year: d\n };\n }\n\n function xe(e, t, o) {\n var n = ve(e, t, o),\n i = ve(e + 1, t, o);\n return (ae(e) - n + i) / 7;\n }\n\n function Se(e, t) {\n return \"string\" == typeof e ? isNaN(e) ? (e = t.weekdaysParse(e), \"number\" == typeof e ? e : null) : parseInt(e, 10) : e;\n }\n\n function Oe(e, t) {\n return \"string\" == typeof e ? t.weekdaysParse(e) % 7 || 7 : isNaN(e) ? null : e;\n }\n\n function De(e, t) {\n return e.slice(t, 7).concat(e.slice(0, t));\n }\n\n function Te(e, t, o) {\n var n = e.toLocaleLowerCase(),\n a,\n d,\n s;\n if (!this._weekdaysParse) for (this._weekdaysParse = [], this._shortWeekdaysParse = [], this._minWeekdaysParse = [], a = 0; 7 > a; ++a) s = k([2e3, 1]).day(a), this._minWeekdaysParse[a] = this.weekdaysMin(s, \"\").toLocaleLowerCase(), this._shortWeekdaysParse[a] = this.weekdaysShort(s, \"\").toLocaleLowerCase(), this._weekdaysParse[a] = this.weekdays(s, \"\").toLocaleLowerCase();\n return o ? \"dddd\" === t ? (d = Ro.call(this._weekdaysParse, n), -1 === d ? null : d) : \"ddd\" === t ? (d = Ro.call(this._shortWeekdaysParse, n), -1 === d ? null : d) : (d = Ro.call(this._minWeekdaysParse, n), -1 === d ? null : d) : \"dddd\" === t ? (d = Ro.call(this._weekdaysParse, n), -1 !== d) ? d : (d = Ro.call(this._shortWeekdaysParse, n), -1 !== d) ? d : (d = Ro.call(this._minWeekdaysParse, n), -1 === d ? null : d) : \"ddd\" === t ? (d = Ro.call(this._shortWeekdaysParse, n), -1 !== d) ? d : (d = Ro.call(this._weekdaysParse, n), -1 !== d) ? d : (d = Ro.call(this._minWeekdaysParse, n), -1 === d ? null : d) : (d = Ro.call(this._minWeekdaysParse, n), -1 !== d) ? d : (d = Ro.call(this._weekdaysParse, n), -1 !== d) ? d : (d = Ro.call(this._shortWeekdaysParse, n), -1 === d ? null : d);\n }\n\n function Ee(e, t, o) {\n var n, a, d;\n if (this._weekdaysParseExact) return Te.call(this, e, t, o);\n\n for (this._weekdaysParse || (this._weekdaysParse = [], this._minWeekdaysParse = [], this._shortWeekdaysParse = [], this._fullWeekdaysParse = []), n = 0; 7 > n; n++) {\n if (a = k([2e3, 1]).day(n), o && !this._fullWeekdaysParse[n] && (this._fullWeekdaysParse[n] = new RegExp(\"^\" + this.weekdays(a, \"\").replace(\".\", \"\\\\.?\") + \"$\", \"i\"), this._shortWeekdaysParse[n] = new RegExp(\"^\" + this.weekdaysShort(a, \"\").replace(\".\", \"\\\\.?\") + \"$\", \"i\"), this._minWeekdaysParse[n] = new RegExp(\"^\" + this.weekdaysMin(a, \"\").replace(\".\", \"\\\\.?\") + \"$\", \"i\")), this._weekdaysParse[n] || (d = \"^\" + this.weekdays(a, \"\") + \"|^\" + this.weekdaysShort(a, \"\") + \"|^\" + this.weekdaysMin(a, \"\"), this._weekdaysParse[n] = new RegExp(d.replace(\".\", \"\"), \"i\")), o && \"dddd\" === t && this._fullWeekdaysParse[n].test(e)) return n;\n if (o && \"ddd\" === t && this._shortWeekdaysParse[n].test(e)) return n;\n if (o && \"dd\" === t && this._minWeekdaysParse[n].test(e)) return n;\n if (!o && this._weekdaysParse[n].test(e)) return n;\n }\n }\n\n function Ce() {\n function e(e, t) {\n return t.length - e.length;\n }\n\n var t = [],\n o = [],\n n = [],\n a = [],\n d,\n s,\n r,\n l,\n c;\n\n for (d = 0; 7 > d; d++) s = k([2e3, 1]).day(d), r = this.weekdaysMin(s, \"\"), l = this.weekdaysShort(s, \"\"), c = this.weekdays(s, \"\"), t.push(r), o.push(l), n.push(c), a.push(r), a.push(l), a.push(c);\n\n for (t.sort(e), o.sort(e), n.sort(e), a.sort(e), d = 0; 7 > d; d++) o[d] = te(o[d]), n[d] = te(n[d]), a[d] = te(a[d]);\n\n this._weekdaysRegex = new RegExp(\"^(\" + a.join(\"|\") + \")\", \"i\"), this._weekdaysShortRegex = this._weekdaysRegex, this._weekdaysMinRegex = this._weekdaysRegex, this._weekdaysStrictRegex = new RegExp(\"^(\" + n.join(\"|\") + \")\", \"i\"), this._weekdaysShortStrictRegex = new RegExp(\"^(\" + o.join(\"|\") + \")\", \"i\"), this._weekdaysMinStrictRegex = new RegExp(\"^(\" + t.join(\"|\") + \")\", \"i\");\n }\n\n function Me() {\n return this.hours() % 12 || 12;\n }\n\n function Ie(e, t) {\n q(e, 0, 0, function () {\n return this.localeData().meridiem(this.hours(), this.minutes(), t);\n });\n }\n\n function Pe(e, t) {\n return t._meridiemParse;\n }\n\n function Fe(e) {\n return e ? e.toLowerCase().replace(\"_\", \"-\") : e;\n }\n\n function Ne(e) {\n for (var t = 0, o, n, a, d; t < e.length;) {\n for (d = Fe(e[t]).split(\"-\"), o = d.length, n = Fe(e[t + 1]), n = n ? n.split(\"-\") : null; 0 < o;) {\n if (a = Ye(d.slice(0, o).join(\"-\")), a) return a;\n if (n && n.length >= o && I(d, n, !0) >= o - 1) break;\n o--;\n }\n\n t++;\n }\n\n return Jo;\n }\n\n function Ye(t) {\n var o = null;\n if (!Wo[t] && !0 && e && e.exports) try {\n o = Jo._abbr;\n commonjsRequire$2(\"./locale/\" + t), Re(o);\n } catch (t) {}\n return Wo[t];\n }\n\n function Re(e, t) {\n var o;\n return e && (o = m(t) ? Be(e) : ze(e, t), o ? Jo = o : \"undefined\" != typeof console && console.warn && console.warn(\"Locale \" + e + \" not found. Did you forget to load it?\")), Jo._abbr;\n }\n\n function ze(e, t) {\n if (null !== t) {\n var o = jo,\n n;\n if (t.abbr = e, null != Wo[e]) N(\"defineLocaleOverride\", \"use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info.\"), o = Wo[e]._config;else if (null != t.parentLocale) if (null != Wo[t.parentLocale]) o = Wo[t.parentLocale]._config;else if (n = Ye(t.parentLocale), null != n) o = n._config;else return Uo[t.parentLocale] || (Uo[t.parentLocale] = []), Uo[t.parentLocale].push({\n name: e,\n config: t\n }), null;\n return Wo[e] = new B(z(o, t)), Uo[e] && Uo[e].forEach(function (e) {\n ze(e.name, e.config);\n }), Re(e), Wo[e];\n }\n\n return delete Wo[e], null;\n }\n\n function Be(e) {\n var t;\n if (e && e._locale && e._locale._abbr && (e = e._locale._abbr), !e) return Jo;\n\n if (!u(e)) {\n if (t = Ye(e), t) return t;\n e = [e];\n }\n\n return Ne(e);\n }\n\n function Le() {\n return to(Wo);\n }\n\n function Ae(e) {\n var t = e._a,\n o;\n return t && -2 === x(e).overflow && (o = 0 > t[1] || 11 < t[1] ? 1 : 1 > t[2] || t[2] > pe(t[0], t[1]) ? 2 : 0 > t[3] || 24 < t[3] || 24 === t[3] && (0 !== t[4] || 0 !== t[5] || 0 !== t[6]) ? 3 : 0 > t[4] || 59 < t[4] ? 4 : 0 > t[5] || 59 < t[5] ? 5 : 0 > t[6] || 999 < t[6] ? 6 : -1, x(e)._overflowDayOfYear && (0 > o || 2 < o) && (o = 2), x(e)._overflowWeeks && -1 === o && (o = 7), x(e)._overflowWeekday && -1 === o && (o = 8), x(e).overflow = o), e;\n }\n\n function He(e, t, o) {\n return null == e ? null == t ? o : t : e;\n }\n\n function je(e) {\n var t = new Date(l.now());\n return e._useUTC ? [t.getUTCFullYear(), t.getUTCMonth(), t.getUTCDate()] : [t.getFullYear(), t.getMonth(), t.getDate()];\n }\n\n function We(e) {\n var t = [],\n o,\n n,\n a,\n d,\n s;\n\n if (!e._d) {\n for (a = je(e), e._w && null == e._a[2] && null == e._a[1] && Ue(e), null != e._dayOfYear && (s = He(e._a[0], a[0]), (e._dayOfYear > ae(s) || 0 === e._dayOfYear) && (x(e)._overflowDayOfYear = !0), n = _e(s, 0, e._dayOfYear), e._a[1] = n.getUTCMonth(), e._a[2] = n.getUTCDate()), o = 0; 3 > o && null == e._a[o]; ++o) e._a[o] = t[o] = a[o];\n\n for (; 7 > o; o++) e._a[o] = t[o] = null == e._a[o] ? 2 === o ? 1 : 0 : e._a[o];\n\n 24 === e._a[3] && 0 === e._a[4] && 0 === e._a[5] && 0 === e._a[6] && (e._nextDay = !0, e._a[3] = 0), e._d = (e._useUTC ? _e : be).apply(null, t), d = e._useUTC ? e._d.getUTCDay() : e._d.getDay(), null != e._tzm && e._d.setUTCMinutes(e._d.getUTCMinutes() - e._tzm), e._nextDay && (e._a[3] = 24), e._w && \"undefined\" != typeof e._w.d && e._w.d !== d && (x(e).weekdayMismatch = !0);\n }\n }\n\n function Ue(e) {\n var t, o, n, i, a, d, s, r;\n if (t = e._w, null != t.GG || null != t.W || null != t.E) a = 1, d = 4, o = He(t.GG, e._a[0], we(st(), 1, 4).year), n = He(t.W, 1), i = He(t.E, 1), (1 > i || 7 < i) && (r = !0);else {\n a = e._locale._week.dow, d = e._locale._week.doy;\n var l = we(st(), a, d);\n o = He(t.gg, e._a[0], l.year), n = He(t.w, l.week), null == t.d ? null == t.e ? i = a : (i = t.e + a, (0 > t.e || 6 < t.e) && (r = !0)) : (i = t.d, (0 > i || 6 < i) && (r = !0));\n }\n 1 > n || n > xe(o, a, d) ? x(e)._overflowWeeks = !0 : null == r ? (s = ke(o, n, i, a, d), e._a[0] = s.year, e._dayOfYear = s.dayOfYear) : x(e)._overflowWeekday = !0;\n }\n\n function Ve(e) {\n var t = e._i,\n o = Vo.exec(t) || Go.exec(t),\n n,\n a,\n d,\n s,\n r,\n c;\n\n if (o) {\n for (x(e).iso = !0, n = 0, a = Xo.length; n < a; n++) if (Xo[n][1].exec(o[1])) {\n s = Xo[n][0], d = !1 !== Xo[n][2];\n break;\n }\n\n if (null == s) return void (e._isValid = !1);\n\n if (o[3]) {\n for (n = 0, a = Zo.length; n < a; n++) if (Zo[n][1].exec(o[3])) {\n r = (o[2] || \" \") + Zo[n][0];\n break;\n }\n\n if (null == r) return void (e._isValid = !1);\n }\n\n if (!d && null != r) return void (e._isValid = !1);\n if (o[4]) if (qo.exec(o[4])) c = \"Z\";else return void (e._isValid = !1);\n e._f = s + (r || \"\") + (c || \"\"), Je(e);\n } else e._isValid = !1;\n }\n\n function Ge(e, t, o, n, i, a) {\n var d = [qe(e), Bo.indexOf(t), parseInt(o, 10), parseInt(n, 10), parseInt(i, 10)];\n return a && d.push(parseInt(a, 10)), d;\n }\n\n function qe(e) {\n var t = parseInt(e, 10);\n return 49 >= t ? 2e3 + t : 999 >= t ? 1900 + t : t;\n }\n\n function Xe(e) {\n return e.replace(/\\([^)]*\\)|[\\n\\t]/g, \" \").replace(/(\\s\\s+)/g, \" \").replace(/^\\s\\s*/, \"\").replace(/\\s\\s*$/, \"\");\n }\n\n function Ze(e, t, o) {\n if (e) {\n var n = Lo.indexOf(e),\n i = new Date(t[0], t[1], t[2]).getDay();\n if (n !== i) return x(o).weekdayMismatch = !0, o._isValid = !1, !1;\n }\n\n return !0;\n }\n\n function $e(e, t, o) {\n if (e) return Qo[e];\n if (t) return 0;\n var n = parseInt(o, 10),\n i = n % 100;\n return 60 * ((n - i) / 100) + i;\n }\n\n function Ke(e) {\n var t = Ko.exec(Xe(e._i));\n\n if (t) {\n var o = Ge(t[4], t[3], t[2], t[5], t[6], t[7]);\n if (!Ze(t[1], o, e)) return;\n e._a = o, e._tzm = $e(t[8], t[9], t[10]), e._d = _e.apply(null, e._a), e._d.setUTCMinutes(e._d.getUTCMinutes() - e._tzm), x(e).rfc2822 = !0;\n } else e._isValid = !1;\n }\n\n function Qe(e) {\n var t = $o.exec(e._i);\n if (null !== t) return void (e._d = new Date(+t[1]));\n if (Ve(e), !1 === e._isValid) delete e._isValid;else return;\n if (Ke(e), !1 === e._isValid) delete e._isValid;else return;\n l.createFromInputFallback(e);\n }\n\n function Je(e) {\n if (e._f === l.ISO_8601) return void Ve(e);\n if (e._f === l.RFC_2822) return void Ke(e);\n e._a = [], x(e).empty = !0;\n var t = \"\" + e._i,\n o = t.length,\n n = 0,\n a,\n d,\n s,\n r,\n c;\n\n for (s = K(e._f, e._locale).match(ao) || [], a = 0; a < s.length; a++) r = s[a], d = (t.match(J(r, e)) || [])[0], d && (c = t.substr(0, t.indexOf(d)), 0 < c.length && x(e).unusedInput.push(c), t = t.slice(t.indexOf(d) + d.length), n += d.length), lo[r] ? (d ? x(e).empty = !1 : x(e).unusedTokens.push(r), ie(r, d, e)) : e._strict && !d && x(e).unusedTokens.push(r);\n\n x(e).charsLeftOver = o - n, 0 < t.length && x(e).unusedInput.push(t), 12 >= e._a[3] && !0 === x(e).bigHour && 0 < e._a[3] && (x(e).bigHour = void 0), x(e).parsedDateParts = e._a.slice(0), x(e).meridiem = e._meridiem, e._a[3] = et(e._locale, e._a[3], e._meridiem), We(e), Ae(e);\n }\n\n function et(e, t, o) {\n var n;\n return null == o ? t : null == e.meridiemHour ? null == e.isPM ? t : (n = e.isPM(o), n && 12 > t && (t += 12), n || 12 !== t || (t = 0), t) : e.meridiemHour(t, o);\n }\n\n function tt(e) {\n var t, o, n, a, d;\n if (0 === e._f.length) return x(e).invalidFormat = !0, void (e._d = new Date(NaN));\n\n for (a = 0; a < e._f.length; a++) (d = 0, t = D({}, e), null != e._useUTC && (t._useUTC = e._useUTC), t._f = e._f[a], Je(t), !!S(t)) && (d += x(t).charsLeftOver, d += 10 * x(t).unusedTokens.length, x(t).score = d, (null == n || d < n) && (n = d, o = t));\n\n v(e, o || t);\n }\n\n function ot(e) {\n if (!e._d) {\n var t = W(e._i);\n e._a = f([t.year, t.month, t.day || t.date, t.hour, t.minute, t.second, t.millisecond], function (e) {\n return e && parseInt(e, 10);\n }), We(e);\n }\n }\n\n function nt(e) {\n var t = new T(Ae(it(e)));\n return t._nextDay && (t.add(1, \"d\"), t._nextDay = void 0), t;\n }\n\n function it(e) {\n var t = e._i,\n o = e._f;\n return (e._locale = e._locale || Be(e._l), null === t || void 0 === o && \"\" === t) ? O({\n nullInput: !0\n }) : (\"string\" == typeof t && (e._i = t = e._locale.preparse(t)), E(t)) ? new T(Ae(t)) : (y(t) ? e._d = t : u(o) ? tt(e) : o ? Je(e) : at(e), S(e) || (e._d = null), e);\n }\n\n function at(e) {\n var t = e._i;\n m(t) ? e._d = new Date(l.now()) : y(t) ? e._d = new Date(t.valueOf()) : \"string\" == typeof t ? Qe(e) : u(t) ? (e._a = f(t.slice(0), function (e) {\n return parseInt(e, 10);\n }), We(e)) : p(t) ? ot(e) : g(t) ? e._d = new Date(t) : l.createFromInputFallback(e);\n }\n\n function dt(e, t, o, n, i) {\n var a = {};\n return (!0 === o || !1 === o) && (n = o, o = void 0), (p(e) && h(e) || u(e) && 0 === e.length) && (e = void 0), a._isAMomentObject = !0, a._useUTC = a._isUTC = i, a._l = o, a._i = e, a._f = t, a._strict = n, nt(a);\n }\n\n function st(e, t, o, n) {\n return dt(e, t, o, n, !1);\n }\n\n function rt(e, t) {\n var o, n;\n if (1 === t.length && u(t[0]) && (t = t[0]), !t.length) return st();\n\n for (o = t[0], n = 1; n < t.length; ++n) (!t[n].isValid() || t[n][e](o)) && (o = t[n]);\n\n return o;\n }\n\n function lt(e) {\n for (var t in e) if (-1 === Ro.call(on, t) || null != e[t] && isNaN(e[t])) return !1;\n\n for (var o = !1, n = 0; n < on.length; ++n) if (e[on[n]]) {\n if (o) return !1;\n parseFloat(e[on[n]]) !== M(e[on[n]]) && (o = !0);\n }\n\n return !0;\n }\n\n function ct(e) {\n var t = W(e),\n o = t.year || 0,\n n = t.quarter || 0,\n i = t.month || 0,\n a = t.week || t.isoWeek || 0,\n d = t.day || 0,\n s = t.hour || 0,\n r = t.minute || 0,\n l = t.second || 0,\n c = t.millisecond || 0;\n this._isValid = lt(t), this._milliseconds = +c + 1e3 * l + 6e4 * r + 60 * (60 * (1e3 * s)), this._days = +d + 7 * a, this._months = +i + 3 * n + 12 * o, this._data = {}, this._locale = Be(), this._bubble();\n }\n\n function ut(e) {\n return e instanceof ct;\n }\n\n function pt(e) {\n return 0 > e ? -1 * t(-1 * e) : t(e);\n }\n\n function ht(e, t) {\n q(e, 0, 0, function () {\n var e = this.utcOffset(),\n o = \"+\";\n return 0 > e && (e = -e, o = \"-\"), o + G(~~(e / 60), 2) + t + G(~~e % 60, 2);\n });\n }\n\n function mt(e, t) {\n var o = (t || \"\").match(e);\n if (null === o) return null;\n var n = o[o.length - 1] || [],\n i = (n + \"\").match(nn) || [\"-\", 0, 0],\n a = +(60 * i[1]) + M(i[2]);\n return 0 === a ? 0 : \"+\" === i[0] ? a : -a;\n }\n\n function gt(e, t) {\n var o, n;\n return t._isUTC ? (o = t.clone(), n = (E(e) || y(e) ? e.valueOf() : st(e).valueOf()) - o.valueOf(), o._d.setTime(o._d.valueOf() + n), l.updateOffset(o, !1), o) : st(e).local();\n }\n\n function yt(e) {\n return 15 * -t(e._d.getTimezoneOffset() / 15);\n }\n\n function ft() {\n if (!m(this._isDSTShifted)) return this._isDSTShifted;\n var e = {};\n\n if (D(e, this), e = it(e), e._a) {\n var t = e._isUTC ? k(e._a) : st(e._a);\n this._isDSTShifted = this.isValid() && 0 < I(e._a, t.toArray());\n } else this._isDSTShifted = !1;\n\n return this._isDSTShifted;\n }\n\n function bt() {\n return !!this.isValid() && this._isUTC && 0 === this._offset;\n }\n\n function _t(e, t) {\n var o = e,\n n = null,\n i,\n a,\n d;\n return ut(e) ? o = {\n ms: e._milliseconds,\n d: e._days,\n M: e._months\n } : g(e) ? (o = {}, t ? o[t] = e : o.milliseconds = e) : (n = an.exec(e)) ? (i = \"-\" === n[1] ? -1 : 1, o = {\n y: 0,\n d: M(n[2]) * i,\n h: M(n[3]) * i,\n m: M(n[4]) * i,\n s: M(n[5]) * i,\n ms: M(pt(1e3 * n[6])) * i\n }) : (n = dn.exec(e)) ? (i = \"-\" === n[1] ? -1 : 1, o = {\n y: vt(n[2], i),\n M: vt(n[3], i),\n w: vt(n[4], i),\n d: vt(n[5], i),\n h: vt(n[6], i),\n m: vt(n[7], i),\n s: vt(n[8], i)\n }) : null == o ? o = {} : \"object\" == typeof o && (\"from\" in o || \"to\" in o) && (d = wt(st(o.from), st(o.to)), o = {}, o.ms = d.milliseconds, o.M = d.months), a = new ct(o), ut(e) && _(e, \"_locale\") && (a._locale = e._locale), a;\n }\n\n function vt(e, t) {\n var o = e && parseFloat(e.replace(\",\", \".\"));\n return (isNaN(o) ? 0 : o) * t;\n }\n\n function kt(e, t) {\n var o = {};\n return o.months = t.month() - e.month() + 12 * (t.year() - e.year()), e.clone().add(o.months, \"M\").isAfter(t) && --o.months, o.milliseconds = +t - +e.clone().add(o.months, \"M\"), o;\n }\n\n function wt(e, t) {\n var o;\n return e.isValid() && t.isValid() ? (t = gt(t, e), e.isBefore(t) ? o = kt(e, t) : (o = kt(t, e), o.milliseconds = -o.milliseconds, o.months = -o.months), o) : {\n milliseconds: 0,\n months: 0\n };\n }\n\n function xt(e, t) {\n return function (o, n) {\n var i, a;\n return null === n || isNaN(+n) || (N(t, \"moment().\" + t + \"(period, number) is deprecated. Please use moment().\" + t + \"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.\"), a = o, o = n, n = a), o = \"string\" == typeof o ? +o : o, i = _t(o, n), St(this, i, e), this;\n };\n }\n\n function St(e, t, o, n) {\n var i = t._milliseconds,\n a = pt(t._days),\n d = pt(t._months);\n e.isValid() && (n = null == n || n, d && ge(e, re(e, \"Month\") + d * o), a && le(e, \"Date\", re(e, \"Date\") + a * o), i && e._d.setTime(e._d.valueOf() + i * o), n && l.updateOffset(e, a || d));\n }\n\n function Ot(e, t) {\n var o = 12 * (t.year() - e.year()) + (t.month() - e.month()),\n n = e.clone().add(o, \"months\"),\n i,\n a;\n return 0 > t - n ? (i = e.clone().add(o - 1, \"months\"), a = (t - n) / (n - i)) : (i = e.clone().add(o + 1, \"months\"), a = (t - n) / (i - n)), -(o + a) || 0;\n }\n\n function Dt(e) {\n var t;\n return void 0 === e ? this._locale._abbr : (t = Be(e), null != t && (this._locale = t), this);\n }\n\n function Tt() {\n return this._locale;\n }\n\n function Et(e, t) {\n return (e % t + t) % t;\n }\n\n function Ct(e, t, o) {\n return 100 > e && 0 <= e ? new Date(e + 400, t, o) - 12622780800000 : new Date(e, t, o).valueOf();\n }\n\n function Mt(e, t, o) {\n return 100 > e && 0 <= e ? Date.UTC(e + 400, t, o) - 12622780800000 : Date.UTC(e, t, o);\n }\n\n function It(e, t) {\n q(0, [e, e.length], 0, t);\n }\n\n function Pt(e, t, o, n, i) {\n var a;\n return null == e ? we(this, n, i).year : (a = xe(e, n, i), t > a && (t = a), Ft.call(this, e, t, o, n, i));\n }\n\n function Ft(e, t, o, n, i) {\n var a = ke(e, t, o, n, i),\n d = _e(a.year, 0, a.dayOfYear);\n\n return this.year(d.getUTCFullYear()), this.month(d.getUTCMonth()), this.date(d.getUTCDate()), this;\n }\n\n function Nt(e, t) {\n t[6] = M(1e3 * (\"0.\" + e));\n }\n\n function Yt(e) {\n return e;\n }\n\n function Rt(e, t, o, n) {\n var i = Be(),\n a = k().set(n, t);\n return i[o](a, e);\n }\n\n function zt(e, t, o) {\n if (g(e) && (t = e, e = void 0), e = e || \"\", null != t) return Rt(e, t, o, \"month\");\n var n = [],\n a;\n\n for (a = 0; 12 > a; a++) n[a] = Rt(e, a, o, \"month\");\n\n return n;\n }\n\n function Bt(e, t, o, n) {\n \"boolean\" == typeof e ? (g(t) && (o = t, t = void 0), t = t || \"\") : (t = e, o = t, e = !1, g(t) && (o = t, t = void 0), t = t || \"\");\n var a = Be(),\n d = e ? a._week.dow : 0;\n if (null != o) return Rt(t, (o + d) % 7, n, \"day\");\n var s = [],\n r;\n\n for (r = 0; 7 > r; r++) s[r] = Rt(t, (r + d) % 7, n, \"day\");\n\n return s;\n }\n\n function Lt(e, t, o, n) {\n var i = _t(t, o);\n\n return e._milliseconds += n * i._milliseconds, e._days += n * i._days, e._months += n * i._months, e._bubble();\n }\n\n function At(e) {\n return 0 > e ? s(e) : r(e);\n }\n\n function Ht(e) {\n return 4800 * e / 146097;\n }\n\n function jt(e) {\n return 146097 * e / 4800;\n }\n\n function Wt(e) {\n return function () {\n return this.as(e);\n };\n }\n\n function Ut(e) {\n return function () {\n return this.isValid() ? this._data[e] : NaN;\n };\n }\n\n function Vt(e, t, o, n, i) {\n return i.relativeTime(t || 1, !!o, e, n);\n }\n\n function Gt(e, t, o) {\n var n = _t(e).abs(),\n i = Nn(n.as(\"s\")),\n d = Nn(n.as(\"m\")),\n s = Nn(n.as(\"h\")),\n r = Nn(n.as(\"d\")),\n l = Nn(n.as(\"M\")),\n c = Nn(n.as(\"y\")),\n u = i <= Yn.ss && [\"s\", i] || i < Yn.s && [\"ss\", i] || 1 >= d && [\"m\"] || d < Yn.m && [\"mm\", d] || 1 >= s && [\"h\"] || s < Yn.h && [\"hh\", s] || 1 >= r && [\"d\"] || r < Yn.d && [\"dd\", r] || 1 >= l && [\"M\"] || l < Yn.M && [\"MM\", l] || 1 >= c && [\"y\"] || [\"yy\", c];\n\n return u[2] = t, u[3] = 0 < +e, u[4] = o, Vt.apply(null, u);\n }\n\n function qt(e) {\n return void 0 === e ? Nn : \"function\" == typeof e && (Nn = e, !0);\n }\n\n function Xt(e) {\n return (0 < e) - (0 > e) || +e;\n }\n\n function Zt() {\n if (!this.isValid()) return this.localeData().invalidDate();\n var e = Rn(this._milliseconds) / 1e3,\n t = Rn(this._days),\n o = Rn(this._months),\n n,\n i,\n a;\n n = C(e / 60), i = C(n / 60), e %= 60, n %= 60, a = C(o / 12), o %= 12;\n var d = a,\n r = o,\n l = t,\n c = i,\n u = n,\n p = e ? e.toFixed(3).replace(/\\.?0+$/, \"\") : \"\",\n s = this.asSeconds();\n if (!s) return \"P0D\";\n var h = 0 > s ? \"-\" : \"\",\n m = Xt(this._months) === Xt(s) ? \"\" : \"-\",\n g = Xt(this._days) === Xt(s) ? \"\" : \"-\",\n y = Xt(this._milliseconds) === Xt(s) ? \"\" : \"-\";\n return h + \"P\" + (d ? m + d + \"Y\" : \"\") + (r ? m + r + \"M\" : \"\") + (l ? g + l + \"D\" : \"\") + (c || u || p ? \"T\" : \"\") + (c ? y + c + \"H\" : \"\") + (u ? y + u + \"M\" : \"\") + (p ? y + p + \"S\" : \"\");\n }\n\n var $t, Kt;\n Kt = Array.prototype.some ? Array.prototype.some : function (e) {\n for (var o = Object(this), t = o.length >>> 0, n = 0; n < t; n++) if (n in o && e.call(this, o[n], n, o)) return !0;\n\n return !1;\n };\n var Qt = l.momentProperties = [],\n Jt = !1,\n eo = {};\n l.suppressDeprecationWarnings = !1, l.deprecationHandler = null;\n var to = Object.keys ? Object.keys : function (e) {\n var t = [],\n o;\n\n for (o in e) _(e, o) && t.push(o);\n\n return t;\n };\n var oo = /\\d{1,2}/,\n no = {},\n io = {},\n ao = /(\\[[^\\[]*\\])|(\\\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,\n so = /(\\[[^\\[]*\\])|(\\\\)?(LTS|LT|LL?L?L?|l{1,4})/g,\n ro = {},\n lo = {},\n co = /\\d/,\n uo = /\\d\\d/,\n po = /\\d{3}/,\n ho = /\\d{4}/,\n mo = /[+-]?\\d{6}/,\n go = /\\d\\d?/,\n yo = /\\d\\d\\d\\d?/,\n fo = /\\d\\d\\d\\d\\d\\d?/,\n bo = /\\d{1,3}/,\n _o = /\\d{1,4}/,\n vo = /[+-]?\\d{1,6}/,\n ko = /\\d+/,\n wo = /[+-]?\\d+/,\n xo = /Z|[+-]\\d\\d:?\\d\\d/gi,\n So = /Z|[+-]\\d\\d(?::?\\d\\d)?/gi,\n Oo = /[+-]?\\d+(\\.\\d{1,3})?/,\n Do = /[0-9]{0,256}['a-z\\u00A0-\\u05FF\\u0700-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFF07\\uFF10-\\uFFEF]{1,256}|[\\u0600-\\u06FF\\/]{1,256}(\\s*?[\\u0600-\\u06FF]{1,256}){1,2}/i,\n To = {},\n Eo = {},\n Co = 0,\n Mo = 1,\n Io = 2,\n Po = 3,\n Fo = 4,\n No = 5;\n q(\"Y\", 0, 0, function () {\n var e = this.year();\n return 9999 >= e ? \"\" + e : \"+\" + e;\n }), q(0, [\"YY\", 2], 0, function () {\n return this.year() % 100;\n }), q(0, [\"YYYY\", 4], 0, \"year\"), q(0, [\"YYYYY\", 5], 0, \"year\"), q(0, [\"YYYYYY\", 6, !0], 0, \"year\"), H(\"year\", \"y\"), U(\"year\", 1), Q(\"Y\", wo), Q(\"YY\", go, uo), Q(\"YYYY\", _o, ho), Q(\"YYYYY\", vo, mo), Q(\"YYYYYY\", vo, mo), oe([\"YYYYY\", \"YYYYYY\"], Co), oe(\"YYYY\", function (e, t) {\n t[Co] = 2 === e.length ? l.parseTwoDigitYear(e) : M(e);\n }), oe(\"YY\", function (e, t) {\n t[Co] = l.parseTwoDigitYear(e);\n }), oe(\"Y\", function (e, t) {\n t[Co] = parseInt(e, 10);\n }), l.parseTwoDigitYear = function (e) {\n return M(e) + (68 < M(e) ? 1900 : 2e3);\n };\n var Yo = se(\"FullYear\", !0),\n Ro;\n Ro = Array.prototype.indexOf ? Array.prototype.indexOf : function (e) {\n var t;\n\n for (t = 0; t < this.length; ++t) if (this[t] === e) return t;\n\n return -1;\n }, q(\"M\", [\"MM\", 2], \"Mo\", function () {\n return this.month() + 1;\n }), q(\"MMM\", 0, 0, function (e) {\n return this.localeData().monthsShort(this, e);\n }), q(\"MMMM\", 0, 0, function (e) {\n return this.localeData().months(this, e);\n }), H(\"month\", \"M\"), U(\"month\", 8), Q(\"M\", go), Q(\"MM\", go, uo), Q(\"MMM\", function (e, t) {\n return t.monthsShortRegex(e);\n }), Q(\"MMMM\", function (e, t) {\n return t.monthsRegex(e);\n }), oe([\"M\", \"MM\"], function (e, t) {\n t[Mo] = M(e) - 1;\n }), oe([\"MMM\", \"MMMM\"], function (e, t, o, n) {\n var i = o._locale.monthsParse(e, n, o._strict);\n\n null == i ? x(o).invalidMonth = e : t[Mo] = i;\n });\n var zo = /D[oD]?(\\[[^\\[\\]]*\\]|\\s)+MMMM?/,\n Bo = [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"];\n q(\"w\", [\"ww\", 2], \"wo\", \"week\"), q(\"W\", [\"WW\", 2], \"Wo\", \"isoWeek\"), H(\"week\", \"w\"), H(\"isoWeek\", \"W\"), U(\"week\", 5), U(\"isoWeek\", 5), Q(\"w\", go), Q(\"ww\", go, uo), Q(\"W\", go), Q(\"WW\", go, uo), ne([\"w\", \"ww\", \"W\", \"WW\"], function (e, t, o, n) {\n t[n.substr(0, 1)] = M(e);\n });\n q(\"d\", 0, \"do\", \"day\"), q(\"dd\", 0, 0, function (e) {\n return this.localeData().weekdaysMin(this, e);\n }), q(\"ddd\", 0, 0, function (e) {\n return this.localeData().weekdaysShort(this, e);\n }), q(\"dddd\", 0, 0, function (e) {\n return this.localeData().weekdays(this, e);\n }), q(\"e\", 0, 0, \"weekday\"), q(\"E\", 0, 0, \"isoWeekday\"), H(\"day\", \"d\"), H(\"weekday\", \"e\"), H(\"isoWeekday\", \"E\"), U(\"day\", 11), U(\"weekday\", 11), U(\"isoWeekday\", 11), Q(\"d\", go), Q(\"e\", go), Q(\"E\", go), Q(\"dd\", function (e, t) {\n return t.weekdaysMinRegex(e);\n }), Q(\"ddd\", function (e, t) {\n return t.weekdaysShortRegex(e);\n }), Q(\"dddd\", function (e, t) {\n return t.weekdaysRegex(e);\n }), ne([\"dd\", \"ddd\", \"dddd\"], function (e, t, o, n) {\n var i = o._locale.weekdaysParse(e, n, o._strict);\n\n null == i ? x(o).invalidWeekday = e : t.d = i;\n }), ne([\"d\", \"e\", \"E\"], function (e, t, o, n) {\n t[n] = M(e);\n });\n var Lo = [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"];\n q(\"H\", [\"HH\", 2], 0, \"hour\"), q(\"h\", [\"hh\", 2], 0, Me), q(\"k\", [\"kk\", 2], 0, function () {\n return this.hours() || 24;\n }), q(\"hmm\", 0, 0, function () {\n return \"\" + Me.apply(this) + G(this.minutes(), 2);\n }), q(\"hmmss\", 0, 0, function () {\n return \"\" + Me.apply(this) + G(this.minutes(), 2) + G(this.seconds(), 2);\n }), q(\"Hmm\", 0, 0, function () {\n return \"\" + this.hours() + G(this.minutes(), 2);\n }), q(\"Hmmss\", 0, 0, function () {\n return \"\" + this.hours() + G(this.minutes(), 2) + G(this.seconds(), 2);\n }), Ie(\"a\", !0), Ie(\"A\", !1), H(\"hour\", \"h\"), U(\"hour\", 13), Q(\"a\", Pe), Q(\"A\", Pe), Q(\"H\", go), Q(\"h\", go), Q(\"k\", go), Q(\"HH\", go, uo), Q(\"hh\", go, uo), Q(\"kk\", go, uo), Q(\"hmm\", yo), Q(\"hmmss\", fo), Q(\"Hmm\", yo), Q(\"Hmmss\", fo), oe([\"H\", \"HH\"], Po), oe([\"k\", \"kk\"], function (e, t) {\n var o = M(e);\n t[Po] = 24 === o ? 0 : o;\n }), oe([\"a\", \"A\"], function (e, t, o) {\n o._isPm = o._locale.isPM(e), o._meridiem = e;\n }), oe([\"h\", \"hh\"], function (e, t, o) {\n t[Po] = M(e), x(o).bigHour = !0;\n }), oe(\"hmm\", function (e, t, o) {\n var n = e.length - 2;\n t[Po] = M(e.substr(0, n)), t[Fo] = M(e.substr(n)), x(o).bigHour = !0;\n }), oe(\"hmmss\", function (e, t, o) {\n var n = e.length - 4,\n i = e.length - 2;\n t[Po] = M(e.substr(0, n)), t[Fo] = M(e.substr(n, 2)), t[No] = M(e.substr(i)), x(o).bigHour = !0;\n }), oe(\"Hmm\", function (e, t) {\n var o = e.length - 2;\n t[Po] = M(e.substr(0, o)), t[Fo] = M(e.substr(o));\n }), oe(\"Hmmss\", function (e, t) {\n var o = e.length - 4,\n n = e.length - 2;\n t[Po] = M(e.substr(0, o)), t[Fo] = M(e.substr(o, 2)), t[No] = M(e.substr(n));\n });\n var Ao = /[ap]\\.?m?\\.?/i,\n Ho = se(\"Hours\", !0),\n jo = {\n calendar: {\n sameDay: \"[Today at] LT\",\n nextDay: \"[Tomorrow at] LT\",\n nextWeek: \"dddd [at] LT\",\n lastDay: \"[Yesterday at] LT\",\n lastWeek: \"[Last] dddd [at] LT\",\n sameElse: \"L\"\n },\n longDateFormat: {\n LTS: \"h:mm:ss A\",\n LT: \"h:mm A\",\n L: \"MM/DD/YYYY\",\n LL: \"MMMM D, YYYY\",\n LLL: \"MMMM D, YYYY h:mm A\",\n LLLL: \"dddd, MMMM D, YYYY h:mm A\"\n },\n invalidDate: \"Invalid date\",\n ordinal: \"%d\",\n dayOfMonthOrdinalParse: oo,\n relativeTime: {\n future: \"in %s\",\n past: \"%s ago\",\n s: \"a few seconds\",\n ss: \"%d seconds\",\n m: \"a minute\",\n mm: \"%d minutes\",\n h: \"an hour\",\n hh: \"%d hours\",\n d: \"a day\",\n dd: \"%d days\",\n M: \"a month\",\n MM: \"%d months\",\n y: \"a year\",\n yy: \"%d years\"\n },\n months: [\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"],\n monthsShort: Bo,\n week: {\n dow: 0,\n doy: 6\n },\n weekdays: [\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"],\n weekdaysMin: [\"Su\", \"Mo\", \"Tu\", \"We\", \"Th\", \"Fr\", \"Sa\"],\n weekdaysShort: Lo,\n meridiemParse: Ao\n },\n Wo = {},\n Uo = {},\n Vo = /^\\s*((?:[+-]\\d{6}|\\d{4})-(?:\\d\\d-\\d\\d|W\\d\\d-\\d|W\\d\\d|\\d\\d\\d|\\d\\d))(?:(T| )(\\d\\d(?::\\d\\d(?::\\d\\d(?:[.,]\\d+)?)?)?)([\\+\\-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,\n Go = /^\\s*((?:[+-]\\d{6}|\\d{4})(?:\\d\\d\\d\\d|W\\d\\d\\d|W\\d\\d|\\d\\d\\d|\\d\\d))(?:(T| )(\\d\\d(?:\\d\\d(?:\\d\\d(?:[.,]\\d+)?)?)?)([\\+\\-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,\n qo = /Z|[+-]\\d\\d(?::?\\d\\d)?/,\n Xo = [[\"YYYYYY-MM-DD\", /[+-]\\d{6}-\\d\\d-\\d\\d/], [\"YYYY-MM-DD\", /\\d{4}-\\d\\d-\\d\\d/], [\"GGGG-[W]WW-E\", /\\d{4}-W\\d\\d-\\d/], [\"GGGG-[W]WW\", /\\d{4}-W\\d\\d/, !1], [\"YYYY-DDD\", /\\d{4}-\\d{3}/], [\"YYYY-MM\", /\\d{4}-\\d\\d/, !1], [\"YYYYYYMMDD\", /[+-]\\d{10}/], [\"YYYYMMDD\", /\\d{8}/], [\"GGGG[W]WWE\", /\\d{4}W\\d{3}/], [\"GGGG[W]WW\", /\\d{4}W\\d{2}/, !1], [\"YYYYDDD\", /\\d{7}/]],\n Zo = [[\"HH:mm:ss.SSSS\", /\\d\\d:\\d\\d:\\d\\d\\.\\d+/], [\"HH:mm:ss,SSSS\", /\\d\\d:\\d\\d:\\d\\d,\\d+/], [\"HH:mm:ss\", /\\d\\d:\\d\\d:\\d\\d/], [\"HH:mm\", /\\d\\d:\\d\\d/], [\"HHmmss.SSSS\", /\\d\\d\\d\\d\\d\\d\\.\\d+/], [\"HHmmss,SSSS\", /\\d\\d\\d\\d\\d\\d,\\d+/], [\"HHmmss\", /\\d\\d\\d\\d\\d\\d/], [\"HHmm\", /\\d\\d\\d\\d/], [\"HH\", /\\d\\d/]],\n $o = /^\\/?Date\\((\\-?\\d+)/i,\n Ko = /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\\s)?(\\d{1,2})\\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\\s(\\d{2,4})\\s(\\d\\d):(\\d\\d)(?::(\\d\\d))?\\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\\d{4}))$/,\n Qo = {\n UT: 0,\n GMT: 0,\n EDT: -240,\n EST: -300,\n CDT: -300,\n CST: -360,\n MDT: -360,\n MST: -420,\n PDT: -420,\n PST: -480\n },\n Jo;\n l.createFromInputFallback = F(\"value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.\", function (e) {\n e._d = new Date(e._i + (e._useUTC ? \" UTC\" : \"\"));\n }), l.ISO_8601 = function () {}, l.RFC_2822 = function () {};\n var en = F(\"moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/\", function () {\n var e = st.apply(null, arguments);\n return this.isValid() && e.isValid() ? e < this ? this : e : O();\n }),\n tn = F(\"moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/\", function () {\n var e = st.apply(null, arguments);\n return this.isValid() && e.isValid() ? e > this ? this : e : O();\n }),\n on = [\"year\", \"quarter\", \"month\", \"week\", \"day\", \"hour\", \"minute\", \"second\", \"millisecond\"];\n ht(\"Z\", \":\"), ht(\"ZZ\", \"\"), Q(\"Z\", So), Q(\"ZZ\", So), oe([\"Z\", \"ZZ\"], function (e, t, o) {\n o._useUTC = !0, o._tzm = mt(So, e);\n });\n var nn = /([\\+\\-]|\\d\\d)/gi;\n\n l.updateOffset = function () {};\n\n var an = /^(\\-|\\+)?(?:(\\d*)[. ])?(\\d+)\\:(\\d+)(?:\\:(\\d+)(\\.\\d*)?)?$/,\n dn = /^(-|\\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;\n _t.fn = ct.prototype, _t.invalid = function () {\n return _t(NaN);\n };\n var sn = xt(1, \"add\"),\n rn = xt(-1, \"subtract\");\n l.defaultFormat = \"YYYY-MM-DDTHH:mm:ssZ\", l.defaultFormatUtc = \"YYYY-MM-DDTHH:mm:ss[Z]\";\n var ln = F(\"moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.\", function (e) {\n return void 0 === e ? this.localeData() : this.locale(e);\n });\n q(0, [\"gg\", 2], 0, function () {\n return this.weekYear() % 100;\n }), q(0, [\"GG\", 2], 0, function () {\n return this.isoWeekYear() % 100;\n }), It(\"gggg\", \"weekYear\"), It(\"ggggg\", \"weekYear\"), It(\"GGGG\", \"isoWeekYear\"), It(\"GGGGG\", \"isoWeekYear\"), H(\"weekYear\", \"gg\"), H(\"isoWeekYear\", \"GG\"), U(\"weekYear\", 1), U(\"isoWeekYear\", 1), Q(\"G\", wo), Q(\"g\", wo), Q(\"GG\", go, uo), Q(\"gg\", go, uo), Q(\"GGGG\", _o, ho), Q(\"gggg\", _o, ho), Q(\"GGGGG\", vo, mo), Q(\"ggggg\", vo, mo), ne([\"gggg\", \"ggggg\", \"GGGG\", \"GGGGG\"], function (e, t, o, n) {\n t[n.substr(0, 2)] = M(e);\n }), ne([\"gg\", \"GG\"], function (e, t, o, n) {\n t[n] = l.parseTwoDigitYear(e);\n }), q(\"Q\", 0, \"Qo\", \"quarter\"), H(\"quarter\", \"Q\"), U(\"quarter\", 7), Q(\"Q\", co), oe(\"Q\", function (e, t) {\n t[Mo] = 3 * (M(e) - 1);\n }), q(\"D\", [\"DD\", 2], \"Do\", \"date\"), H(\"date\", \"D\"), U(\"date\", 9), Q(\"D\", go), Q(\"DD\", go, uo), Q(\"Do\", function (e, t) {\n return e ? t._dayOfMonthOrdinalParse || t._ordinalParse : t._dayOfMonthOrdinalParseLenient;\n }), oe([\"D\", \"DD\"], Io), oe(\"Do\", function (e, t) {\n t[Io] = M(e.match(go)[0]);\n });\n var cn = se(\"Date\", !0);\n q(\"DDD\", [\"DDDD\", 3], \"DDDo\", \"dayOfYear\"), H(\"dayOfYear\", \"DDD\"), U(\"dayOfYear\", 4), Q(\"DDD\", bo), Q(\"DDDD\", po), oe([\"DDD\", \"DDDD\"], function (e, t, o) {\n o._dayOfYear = M(e);\n }), q(\"m\", [\"mm\", 2], 0, \"minute\"), H(\"minute\", \"m\"), U(\"minute\", 14), Q(\"m\", go), Q(\"mm\", go, uo), oe([\"m\", \"mm\"], Fo);\n var un = se(\"Minutes\", !1);\n q(\"s\", [\"ss\", 2], 0, \"second\"), H(\"second\", \"s\"), U(\"second\", 15), Q(\"s\", go), Q(\"ss\", go, uo), oe([\"s\", \"ss\"], No);\n var pn = se(\"Seconds\", !1);\n q(\"S\", 0, 0, function () {\n return ~~(this.millisecond() / 100);\n }), q(0, [\"SS\", 2], 0, function () {\n return ~~(this.millisecond() / 10);\n }), q(0, [\"SSS\", 3], 0, \"millisecond\"), q(0, [\"SSSS\", 4], 0, function () {\n return 10 * this.millisecond();\n }), q(0, [\"SSSSS\", 5], 0, function () {\n return 100 * this.millisecond();\n }), q(0, [\"SSSSSS\", 6], 0, function () {\n return 1e3 * this.millisecond();\n }), q(0, [\"SSSSSSS\", 7], 0, function () {\n return 1e4 * this.millisecond();\n }), q(0, [\"SSSSSSSS\", 8], 0, function () {\n return 1e5 * this.millisecond();\n }), q(0, [\"SSSSSSSSS\", 9], 0, function () {\n return 1e6 * this.millisecond();\n }), H(\"millisecond\", \"ms\"), U(\"millisecond\", 16), Q(\"S\", bo, co), Q(\"SS\", bo, uo), Q(\"SSS\", bo, po);\n var hn;\n\n for (hn = \"SSSS\"; 9 >= hn.length; hn += \"S\") Q(hn, ko);\n\n for (hn = \"S\"; 9 >= hn.length; hn += \"S\") oe(hn, Nt);\n\n var mn = se(\"Milliseconds\", !1);\n q(\"z\", 0, 0, \"zoneAbbr\"), q(\"zz\", 0, 0, \"zoneName\");\n var gn = T.prototype;\n gn.add = sn, gn.calendar = function (e, t) {\n var o = e || st(),\n n = gt(o, this).startOf(\"day\"),\n i = l.calendarFormat(this, n) || \"sameElse\",\n a = t && (Y(t[i]) ? t[i].call(this, o) : t[i]);\n return this.format(a || this.localeData().calendar(i, this, st(o)));\n }, gn.clone = function () {\n return new T(this);\n }, gn.diff = function (e, t, o) {\n var n, i, a;\n return this.isValid() ? (n = gt(e, this), !n.isValid()) ? NaN : (i = 6e4 * (n.utcOffset() - this.utcOffset()), t = j(t), (a = \"year\" === t ? Ot(this, n) / 12 : \"month\" === t ? Ot(this, n) : \"quarter\" === t ? Ot(this, n) / 3 : \"second\" === t ? (this - n) / 1e3 : \"minute\" === t ? (this - n) / 6e4 : \"hour\" === t ? (this - n) / 36e5 : \"day\" === t ? (this - n - i) / 864e5 : \"week\" === t ? (this - n - i) / 6048e5 : this - n, o ? a : C(a))) : NaN;\n }, gn.endOf = function (e) {\n var t;\n if (e = j(e), void 0 === e || \"millisecond\" === e || !this.isValid()) return this;\n var o = this._isUTC ? Mt : Ct;\n return \"year\" === e ? t = o(this.year() + 1, 0, 1) - 1 : \"quarter\" === e ? t = o(this.year(), this.month() - this.month() % 3 + 3, 1) - 1 : \"month\" === e ? t = o(this.year(), this.month() + 1, 1) - 1 : \"week\" === e ? t = o(this.year(), this.month(), this.date() - this.weekday() + 7) - 1 : \"isoWeek\" === e ? t = o(this.year(), this.month(), this.date() - (this.isoWeekday() - 1) + 7) - 1 : \"day\" === e || \"date\" === e ? t = o(this.year(), this.month(), this.date() + 1) - 1 : \"hour\" === e ? (t = this._d.valueOf(), t += 3600000 - Et(t + (this._isUTC ? 0 : 60000 * this.utcOffset()), 3600000) - 1) : \"minute\" === e ? (t = this._d.valueOf(), t += 60000 - Et(t, 60000) - 1) : \"second\" === e ? (t = this._d.valueOf(), t += 1000 - Et(t, 1000) - 1) : void 0, this._d.setTime(t), l.updateOffset(this, !0), this;\n }, gn.format = function (e) {\n e || (e = this.isUtc() ? l.defaultFormatUtc : l.defaultFormat);\n var t = $(this, e);\n return this.localeData().postformat(t);\n }, gn.from = function (e, t) {\n return this.isValid() && (E(e) && e.isValid() || st(e).isValid()) ? _t({\n to: this,\n from: e\n }).locale(this.locale()).humanize(!t) : this.localeData().invalidDate();\n }, gn.fromNow = function (e) {\n return this.from(st(), e);\n }, gn.to = function (e, t) {\n return this.isValid() && (E(e) && e.isValid() || st(e).isValid()) ? _t({\n from: this,\n to: e\n }).locale(this.locale()).humanize(!t) : this.localeData().invalidDate();\n }, gn.toNow = function (e) {\n return this.to(st(), e);\n }, gn.get = function (e) {\n return e = j(e), Y(this[e]) ? this[e]() : this;\n }, gn.invalidAt = function () {\n return x(this).overflow;\n }, gn.isAfter = function (e, t) {\n var o = E(e) ? e : st(e);\n return !!(this.isValid() && o.isValid()) && (t = j(t) || \"millisecond\", \"millisecond\" === t ? this.valueOf() > o.valueOf() : o.valueOf() < this.clone().startOf(t).valueOf());\n }, gn.isBefore = function (e, t) {\n var o = E(e) ? e : st(e);\n return !!(this.isValid() && o.isValid()) && (t = j(t) || \"millisecond\", \"millisecond\" === t ? this.valueOf() < o.valueOf() : this.clone().endOf(t).valueOf() < o.valueOf());\n }, gn.isBetween = function (e, t, o, n) {\n var i = E(e) ? e : st(e),\n a = E(t) ? t : st(t);\n return !!(this.isValid() && i.isValid() && a.isValid()) && (n = n || \"()\", (\"(\" === n[0] ? this.isAfter(i, o) : !this.isBefore(i, o)) && (\")\" === n[1] ? this.isBefore(a, o) : !this.isAfter(a, o)));\n }, gn.isSame = function (e, t) {\n var o = E(e) ? e : st(e),\n n;\n return !!(this.isValid() && o.isValid()) && (t = j(t) || \"millisecond\", \"millisecond\" === t ? this.valueOf() === o.valueOf() : (n = o.valueOf(), this.clone().startOf(t).valueOf() <= n && n <= this.clone().endOf(t).valueOf()));\n }, gn.isSameOrAfter = function (e, t) {\n return this.isSame(e, t) || this.isAfter(e, t);\n }, gn.isSameOrBefore = function (e, t) {\n return this.isSame(e, t) || this.isBefore(e, t);\n }, gn.isValid = function () {\n return S(this);\n }, gn.lang = ln, gn.locale = Dt, gn.localeData = Tt, gn.max = tn, gn.min = en, gn.parsingFlags = function () {\n return v({}, x(this));\n }, gn.set = ce, gn.startOf = function (e) {\n var t;\n if (e = j(e), void 0 === e || \"millisecond\" === e || !this.isValid()) return this;\n var o = this._isUTC ? Mt : Ct;\n return \"year\" === e ? t = o(this.year(), 0, 1) : \"quarter\" === e ? t = o(this.year(), this.month() - this.month() % 3, 1) : \"month\" === e ? t = o(this.year(), this.month(), 1) : \"week\" === e ? t = o(this.year(), this.month(), this.date() - this.weekday()) : \"isoWeek\" === e ? t = o(this.year(), this.month(), this.date() - (this.isoWeekday() - 1)) : \"day\" === e || \"date\" === e ? t = o(this.year(), this.month(), this.date()) : \"hour\" === e ? (t = this._d.valueOf(), t -= Et(t + (this._isUTC ? 0 : 60000 * this.utcOffset()), 3600000)) : \"minute\" === e ? (t = this._d.valueOf(), t -= Et(t, 60000)) : \"second\" === e ? (t = this._d.valueOf(), t -= Et(t, 1000)) : void 0, this._d.setTime(t), l.updateOffset(this, !0), this;\n }, gn.subtract = rn, gn.toArray = function () {\n var e = this;\n return [e.year(), e.month(), e.date(), e.hour(), e.minute(), e.second(), e.millisecond()];\n }, gn.toObject = function () {\n var e = this;\n return {\n years: e.year(),\n months: e.month(),\n date: e.date(),\n hours: e.hours(),\n minutes: e.minutes(),\n seconds: e.seconds(),\n milliseconds: e.milliseconds()\n };\n }, gn.toDate = function () {\n return new Date(this.valueOf());\n }, gn.toISOString = function (e) {\n if (!this.isValid()) return null;\n var t = !0 !== e,\n o = t ? this.clone().utc() : this;\n return 0 > o.year() || 9999 < o.year() ? $(o, t ? \"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]\" : \"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ\") : Y(Date.prototype.toISOString) ? t ? this.toDate().toISOString() : new Date(this.valueOf() + 1e3 * (60 * this.utcOffset())).toISOString().replace(\"Z\", $(o, \"Z\")) : $(o, t ? \"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]\" : \"YYYY-MM-DD[T]HH:mm:ss.SSSZ\");\n }, gn.inspect = function () {\n if (!this.isValid()) return \"moment.invalid(/* \" + this._i + \" */)\";\n var e = \"moment\",\n t = \"\";\n this.isLocal() || (e = 0 === this.utcOffset() ? \"moment.utc\" : \"moment.parseZone\", t = \"Z\");\n var o = \"[\" + e + \"(\\\"]\",\n n = 0 <= this.year() && 9999 >= this.year() ? \"YYYY\" : \"YYYYYY\",\n i = t + \"[\\\")]\";\n return this.format(o + n + \"-MM-DD[T]HH:mm:ss.SSS\" + i);\n }, gn.toJSON = function () {\n return this.isValid() ? this.toISOString() : null;\n }, gn.toString = function () {\n return this.clone().locale(\"en\").format(\"ddd MMM DD YYYY HH:mm:ss [GMT]ZZ\");\n }, gn.unix = function () {\n return s(this.valueOf() / 1e3);\n }, gn.valueOf = function () {\n return this._d.valueOf() - 6e4 * (this._offset || 0);\n }, gn.creationData = function () {\n return {\n input: this._i,\n format: this._f,\n locale: this._locale,\n isUTC: this._isUTC,\n strict: this._strict\n };\n }, gn.year = Yo, gn.isLeapYear = function () {\n return de(this.year());\n }, gn.weekYear = function (e) {\n return Pt.call(this, e, this.week(), this.weekday(), this.localeData()._week.dow, this.localeData()._week.doy);\n }, gn.isoWeekYear = function (e) {\n return Pt.call(this, e, this.isoWeek(), this.isoWeekday(), 1, 4);\n }, gn.quarter = gn.quarters = function (e) {\n return null == e ? r((this.month() + 1) / 3) : this.month(3 * (e - 1) + this.month() % 3);\n }, gn.month = ye, gn.daysInMonth = function () {\n return pe(this.year(), this.month());\n }, gn.week = gn.weeks = function (e) {\n var t = this.localeData().week(this);\n return null == e ? t : this.add(7 * (e - t), \"d\");\n }, gn.isoWeek = gn.isoWeeks = function (e) {\n var t = we(this, 1, 4).week;\n return null == e ? t : this.add(7 * (e - t), \"d\");\n }, gn.weeksInYear = function () {\n var e = this.localeData()._week;\n\n return xe(this.year(), e.dow, e.doy);\n }, gn.isoWeeksInYear = function () {\n return xe(this.year(), 1, 4);\n }, gn.date = cn, gn.day = gn.days = function (e) {\n if (!this.isValid()) return null == e ? NaN : this;\n var t = this._isUTC ? this._d.getUTCDay() : this._d.getDay();\n return null == e ? t : (e = Se(e, this.localeData()), this.add(e - t, \"d\"));\n }, gn.weekday = function (e) {\n if (!this.isValid()) return null == e ? NaN : this;\n var t = (this.day() + 7 - this.localeData()._week.dow) % 7;\n return null == e ? t : this.add(e - t, \"d\");\n }, gn.isoWeekday = function (e) {\n if (!this.isValid()) return null == e ? NaN : this;\n\n if (null != e) {\n var t = Oe(e, this.localeData());\n return this.day(this.day() % 7 ? t : t - 7);\n }\n\n return this.day() || 7;\n }, gn.dayOfYear = function (e) {\n var o = t((this.clone().startOf(\"day\") - this.clone().startOf(\"year\")) / 864e5) + 1;\n return null == e ? o : this.add(e - o, \"d\");\n }, gn.hour = gn.hours = Ho, gn.minute = gn.minutes = un, gn.second = gn.seconds = pn, gn.millisecond = gn.milliseconds = mn, gn.utcOffset = function (e, t, o) {\n var n = this._offset || 0,\n i;\n if (!this.isValid()) return null == e ? NaN : this;\n\n if (null != e) {\n if (\"string\" != typeof e) 16 > a(e) && !o && (e *= 60);else if (e = mt(So, e), null === e) return this;\n return !this._isUTC && t && (i = yt(this)), this._offset = e, this._isUTC = !0, null != i && this.add(i, \"m\"), n !== e && (!t || this._changeInProgress ? St(this, _t(e - n, \"m\"), 1, !1) : !this._changeInProgress && (this._changeInProgress = !0, l.updateOffset(this, !0), this._changeInProgress = null)), this;\n }\n\n return this._isUTC ? n : yt(this);\n }, gn.utc = function (e) {\n return this.utcOffset(0, e);\n }, gn.local = function (e) {\n return this._isUTC && (this.utcOffset(0, e), this._isUTC = !1, e && this.subtract(yt(this), \"m\")), this;\n }, gn.parseZone = function () {\n if (null != this._tzm) this.utcOffset(this._tzm, !1, !0);else if (\"string\" == typeof this._i) {\n var e = mt(xo, this._i);\n null == e ? this.utcOffset(0, !0) : this.utcOffset(e);\n }\n return this;\n }, gn.hasAlignedHourOffset = function (e) {\n return !!this.isValid() && (e = e ? st(e).utcOffset() : 0, 0 == (this.utcOffset() - e) % 60);\n }, gn.isDST = function () {\n return this.utcOffset() > this.clone().month(0).utcOffset() || this.utcOffset() > this.clone().month(5).utcOffset();\n }, gn.isLocal = function () {\n return !!this.isValid() && !this._isUTC;\n }, gn.isUtcOffset = function () {\n return !!this.isValid() && this._isUTC;\n }, gn.isUtc = bt, gn.isUTC = bt, gn.zoneAbbr = function () {\n return this._isUTC ? \"UTC\" : \"\";\n }, gn.zoneName = function () {\n return this._isUTC ? \"Coordinated Universal Time\" : \"\";\n }, gn.dates = F(\"dates accessor is deprecated. Use date instead.\", cn), gn.months = F(\"months accessor is deprecated. Use month instead\", ye), gn.years = F(\"years accessor is deprecated. Use year instead\", Yo), gn.zone = F(\"moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/\", function (e, t) {\n return null == e ? -this.utcOffset() : (\"string\" != typeof e && (e = -e), this.utcOffset(e, t), this);\n }), gn.isDSTShifted = F(\"isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information\", ft);\n var yn = B.prototype;\n yn.calendar = L, yn.longDateFormat = A, yn.invalidDate = function () {\n return this._invalidDate;\n }, yn.ordinal = function (e) {\n return this._ordinal.replace(\"%d\", e);\n }, yn.preparse = Yt, yn.postformat = Yt, yn.relativeTime = function (e, t, o, n) {\n var i = this._relativeTime[o];\n return Y(i) ? i(e, t, o, n) : i.replace(/%d/i, e);\n }, yn.pastFuture = function (e, t) {\n var o = this._relativeTime[0 < e ? \"future\" : \"past\"];\n return Y(o) ? o(t) : o.replace(/%s/i, t);\n }, yn.set = R, yn.months = function (e, t) {\n return e ? u(this._months) ? this._months[e.month()] : this._months[(this._months.isFormat || zo).test(t) ? \"format\" : \"standalone\"][e.month()] : u(this._months) ? this._months : this._months.standalone;\n }, yn.monthsShort = function (e, t) {\n return e ? u(this._monthsShort) ? this._monthsShort[e.month()] : this._monthsShort[zo.test(t) ? \"format\" : \"standalone\"][e.month()] : u(this._monthsShort) ? this._monthsShort : this._monthsShort.standalone;\n }, yn.monthsParse = me, yn.monthsRegex = function (e) {\n return this._monthsParseExact ? (_(this, \"_monthsRegex\") || fe.call(this), e ? this._monthsStrictRegex : this._monthsRegex) : (_(this, \"_monthsRegex\") || (this._monthsRegex = Do), this._monthsStrictRegex && e ? this._monthsStrictRegex : this._monthsRegex);\n }, yn.monthsShortRegex = function (e) {\n return this._monthsParseExact ? (_(this, \"_monthsRegex\") || fe.call(this), e ? this._monthsShortStrictRegex : this._monthsShortRegex) : (_(this, \"_monthsShortRegex\") || (this._monthsShortRegex = Do), this._monthsShortStrictRegex && e ? this._monthsShortStrictRegex : this._monthsShortRegex);\n }, yn.week = function (e) {\n return we(e, this._week.dow, this._week.doy).week;\n }, yn.firstDayOfYear = function () {\n return this._week.doy;\n }, yn.firstDayOfWeek = function () {\n return this._week.dow;\n }, yn.weekdays = function (e, t) {\n var o = u(this._weekdays) ? this._weekdays : this._weekdays[e && !0 !== e && this._weekdays.isFormat.test(t) ? \"format\" : \"standalone\"];\n return !0 === e ? De(o, this._week.dow) : e ? o[e.day()] : o;\n }, yn.weekdaysMin = function (e) {\n return !0 === e ? De(this._weekdaysMin, this._week.dow) : e ? this._weekdaysMin[e.day()] : this._weekdaysMin;\n }, yn.weekdaysShort = function (e) {\n return !0 === e ? De(this._weekdaysShort, this._week.dow) : e ? this._weekdaysShort[e.day()] : this._weekdaysShort;\n }, yn.weekdaysParse = Ee, yn.weekdaysRegex = function (e) {\n return this._weekdaysParseExact ? (_(this, \"_weekdaysRegex\") || Ce.call(this), e ? this._weekdaysStrictRegex : this._weekdaysRegex) : (_(this, \"_weekdaysRegex\") || (this._weekdaysRegex = Do), this._weekdaysStrictRegex && e ? this._weekdaysStrictRegex : this._weekdaysRegex);\n }, yn.weekdaysShortRegex = function (e) {\n return this._weekdaysParseExact ? (_(this, \"_weekdaysRegex\") || Ce.call(this), e ? this._weekdaysShortStrictRegex : this._weekdaysShortRegex) : (_(this, \"_weekdaysShortRegex\") || (this._weekdaysShortRegex = Do), this._weekdaysShortStrictRegex && e ? this._weekdaysShortStrictRegex : this._weekdaysShortRegex);\n }, yn.weekdaysMinRegex = function (e) {\n return this._weekdaysParseExact ? (_(this, \"_weekdaysRegex\") || Ce.call(this), e ? this._weekdaysMinStrictRegex : this._weekdaysMinRegex) : (_(this, \"_weekdaysMinRegex\") || (this._weekdaysMinRegex = Do), this._weekdaysMinStrictRegex && e ? this._weekdaysMinStrictRegex : this._weekdaysMinRegex);\n }, yn.isPM = function (e) {\n return \"p\" === (e + \"\").toLowerCase().charAt(0);\n }, yn.meridiem = function (e, t, o) {\n return 11 < e ? o ? \"pm\" : \"PM\" : o ? \"am\" : \"AM\";\n }, Re(\"en\", {\n dayOfMonthOrdinalParse: /\\d{1,2}(th|st|nd|rd)/,\n ordinal: function (e) {\n var t = e % 10,\n o = 1 === M(e % 100 / 10) ? \"th\" : 1 == t ? \"st\" : 2 == t ? \"nd\" : 3 == t ? \"rd\" : \"th\";\n return e + o;\n }\n }), l.lang = F(\"moment.lang is deprecated. Use moment.locale instead.\", Re), l.langData = F(\"moment.langData is deprecated. Use moment.localeData instead.\", Be);\n\n var fn = a,\n bn = Wt(\"ms\"),\n _n = Wt(\"s\"),\n vn = Wt(\"m\"),\n kn = Wt(\"h\"),\n wn = Wt(\"d\"),\n xn = Wt(\"w\"),\n Sn = Wt(\"M\"),\n On = Wt(\"Q\"),\n Dn = Wt(\"y\"),\n Tn = Ut(\"milliseconds\"),\n En = Ut(\"seconds\"),\n Cn = Ut(\"minutes\"),\n Mn = Ut(\"hours\"),\n In = Ut(\"days\"),\n Pn = Ut(\"months\"),\n Fn = Ut(\"years\"),\n Nn = t,\n Yn = {\n ss: 44,\n s: 45,\n m: 45,\n h: 22,\n d: 26,\n M: 11\n },\n Rn = a,\n zn = ct.prototype;\n\n return zn.isValid = function () {\n return this._isValid;\n }, zn.abs = function () {\n var e = this._data;\n return this._milliseconds = fn(this._milliseconds), this._days = fn(this._days), this._months = fn(this._months), e.milliseconds = fn(e.milliseconds), e.seconds = fn(e.seconds), e.minutes = fn(e.minutes), e.hours = fn(e.hours), e.months = fn(e.months), e.years = fn(e.years), this;\n }, zn.add = function (e, t) {\n return Lt(this, e, t, 1);\n }, zn.subtract = function (e, t) {\n return Lt(this, e, t, -1);\n }, zn.as = function (e) {\n if (!this.isValid()) return NaN;\n var o = this._milliseconds,\n n,\n i;\n if (e = j(e), \"month\" === e || \"quarter\" === e || \"year\" === e) switch (n = this._days + o / 864e5, i = this._months + Ht(n), e) {\n case \"month\":\n return i;\n\n case \"quarter\":\n return i / 3;\n\n case \"year\":\n return i / 12;\n } else switch (n = this._days + t(jt(this._months)), e) {\n case \"week\":\n return n / 7 + o / 6048e5;\n\n case \"day\":\n return n + o / 864e5;\n\n case \"hour\":\n return 24 * n + o / 36e5;\n\n case \"minute\":\n return 1440 * n + o / 6e4;\n\n case \"second\":\n return 86400 * n + o / 1e3;\n\n case \"millisecond\":\n return s(864e5 * n) + o;\n\n default:\n throw new Error(\"Unknown unit \" + e);\n }\n }, zn.asMilliseconds = bn, zn.asSeconds = _n, zn.asMinutes = vn, zn.asHours = kn, zn.asDays = wn, zn.asWeeks = xn, zn.asMonths = Sn, zn.asQuarters = On, zn.asYears = Dn, zn.valueOf = function () {\n return this.isValid() ? this._milliseconds + 864e5 * this._days + 2592e6 * (this._months % 12) + 31536e6 * M(this._months / 12) : NaN;\n }, zn._bubble = function () {\n var e = this._milliseconds,\n t = this._days,\n o = this._months,\n n = this._data,\n i,\n a,\n d,\n s,\n r;\n return 0 <= e && 0 <= t && 0 <= o || 0 >= e && 0 >= t && 0 >= o || (e += 864e5 * At(jt(o) + t), t = 0, o = 0), n.milliseconds = e % 1e3, i = C(e / 1e3), n.seconds = i % 60, a = C(i / 60), n.minutes = a % 60, d = C(a / 60), n.hours = d % 24, t += C(d / 24), r = C(Ht(t)), o += r, t -= At(jt(r)), s = C(o / 12), o %= 12, n.days = t, n.months = o, n.years = s, this;\n }, zn.clone = function () {\n return _t(this);\n }, zn.get = function (e) {\n return e = j(e), this.isValid() ? this[e + \"s\"]() : NaN;\n }, zn.milliseconds = Tn, zn.seconds = En, zn.minutes = Cn, zn.hours = Mn, zn.days = In, zn.weeks = function () {\n return C(this.days() / 7);\n }, zn.months = Pn, zn.years = Fn, zn.humanize = function (e) {\n if (!this.isValid()) return this.localeData().invalidDate();\n var t = this.localeData(),\n o = Gt(this, !e, t);\n return e && (o = t.pastFuture(+this, o)), t.postformat(o);\n }, zn.toISOString = Zt, zn.toString = Zt, zn.toJSON = Zt, zn.locale = Dt, zn.localeData = Tt, zn.toIsoString = F(\"toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)\", Zt), zn.lang = ln, q(\"X\", 0, 0, \"unix\"), q(\"x\", 0, 0, \"valueOf\"), Q(\"x\", wo), Q(\"X\", Oo), oe(\"X\", function (e, t, o) {\n o._d = new Date(1e3 * parseFloat(e, 10));\n }), oe(\"x\", function (e, t, o) {\n o._d = new Date(M(e));\n }), l.version = \"2.24.0\", function (e) {\n $t = e;\n }(st), l.fn = gn, l.min = function () {\n var e = [].slice.call(arguments, 0);\n return rt(\"isBefore\", e);\n }, l.max = function () {\n var e = [].slice.call(arguments, 0);\n return rt(\"isAfter\", e);\n }, l.now = function () {\n return Date.now ? Date.now() : +new Date();\n }, l.utc = k, l.unix = function (e) {\n return st(1e3 * e);\n }, l.months = function (e, t) {\n return zt(e, t, \"months\");\n }, l.isDate = y, l.locale = Re, l.invalid = O, l.duration = _t, l.isMoment = E, l.weekdays = function (e, t, o) {\n return Bt(e, t, o, \"weekdays\");\n }, l.parseZone = function () {\n return st.apply(null, arguments).parseZone();\n }, l.localeData = Be, l.isDuration = ut, l.monthsShort = function (e, t) {\n return zt(e, t, \"monthsShort\");\n }, l.weekdaysMin = function (e, t, o) {\n return Bt(e, t, o, \"weekdaysMin\");\n }, l.defineLocale = ze, l.updateLocale = function (e, t) {\n if (null != t) {\n var o = jo,\n n,\n i;\n i = Ye(e), null != i && (o = i._config), t = z(o, t), n = new B(t), n.parentLocale = Wo[e], Wo[e] = n, Re(e);\n } else null != Wo[e] && (null == Wo[e].parentLocale ? null != Wo[e] && delete Wo[e] : Wo[e] = Wo[e].parentLocale);\n\n return Wo[e];\n }, l.locales = Le, l.weekdaysShort = function (e, t, o) {\n return Bt(e, t, o, \"weekdaysShort\");\n }, l.normalizeUnits = j, l.relativeTimeRounding = qt, l.relativeTimeThreshold = function (e, t) {\n return void 0 !== Yn[e] && (void 0 === t ? Yn[e] : (Yn[e] = t, \"s\" === e && (Yn.ss = t - 1), !0));\n }, l.calendarFormat = function (e, t) {\n var o = e.diff(t, \"days\", !0);\n return -6 > o ? \"sameElse\" : -1 > o ? \"lastWeek\" : 0 > o ? \"lastDay\" : 1 > o ? \"sameDay\" : 2 > o ? \"nextDay\" : 7 > o ? \"nextWeek\" : \"sameElse\";\n }, l.prototype = gn, l.HTML5_FMT = {\n DATETIME_LOCAL: \"YYYY-MM-DDTHH:mm\",\n DATETIME_LOCAL_SECONDS: \"YYYY-MM-DDTHH:mm:ss\",\n DATETIME_LOCAL_MS: \"YYYY-MM-DDTHH:mm:ss.SSS\",\n DATE: \"YYYY-MM-DD\",\n TIME: \"HH:mm\",\n TIME_SECONDS: \"HH:mm:ss\",\n TIME_MS: \"HH:mm:ss.SSS\",\n WEEK: \"GGGG-[W]WW\",\n MONTH: \"YYYY-MM\"\n }, l;\n });\n}),\n moment$3 = \"undefined\" != typeof window && window.moment || moment$2,\n moment$4 = Object.freeze({\n default: moment$3,\n __moduleExports: moment$3\n}),\n network = {\n Images: Images,\n dotparser: dotparser$1,\n gephiParser: gephiParser,\n allOptions: allOptions$2,\n convertDot: DOTToGraph_1,\n convertGephi: parseGephi\n},\n index$2 = Object.freeze({\n util: esm,\n data: esm$1,\n network: network,\n DOMutil: DOMutil$1,\n moment: moment$4,\n Hammer: hammer$1,\n keycharm: keycharm$1,\n DataSet: DataSet,\n DataView: DataView,\n Queue: Queue,\n Network: Network\n});\nexport default index$2;\nexport { DOMutil$1 as DOMutil, DataSet, DataView, hammer$1 as Hammer, Network, Queue, esm$1 as data, keycharm$1 as keycharm, moment$4 as moment, network, esm as util };","map":null,"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/36f1ce5ee4344a19a7c117fb0bf522bd.json b/node_modules/.cache/babel-loader/36f1ce5ee4344a19a7c117fb0bf522bd.json new file mode 100644 index 0000000000000000000000000000000000000000..545e8c87d5036ed0399e0aa1f4fd11f319acc71a --- /dev/null +++ b/node_modules/.cache/babel-loader/36f1ce5ee4344a19a7c117fb0bf522bd.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js\";\nimport React, { Component } from \"react\"; // import vis from \"vis-network\";\n\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n constructor(...args) {\n super(...args);\n\n this.updateVisNodes = nodes => {\n this.props.setVisData(nodes);\n };\n }\n\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else if (nextProps.data && this.props.data && nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp) {\n console.log(\"Rerendering\");\n return true;\n } else if (nextProps.loadingGraph !== this.props.loadingGraph) {\n return true;\n } else {\n return false;\n }\n }\n\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n render() {\n if (this.props.loadingGraph) return React.createElement(Spinner, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 32\n },\n __self: this\n });\n\n if (this.props.data == null) {\n return React.createElement(\"div\", {\n className: \"card-body text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 35\n },\n __self: this\n }, React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Press \", React.createElement(\"span\", {\n className: \"badge badge-info\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Show Graph\"), \" to see the graph representation of the experiment.\"), React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"If the experiment is running, press \", React.createElement(\"span\", {\n className: \"badge badge-dark\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"Start Job Monitor\"), \" to start a live tracker of the changes on the experiment's jobs. This process will automatically update the graph's nodes colors and show a log of the detected changes.\"));\n }\n\n var nodes_array = [];\n var edges_array = [];\n\n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: {\n background: node.status_color,\n border: \"black\"\n },\n level: node.level\n }));\n this.props.data.edges.map(edge => edges_array.push({\n from: edge.from,\n to: edge.to\n }));\n }\n\n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n const options = {\n edges: {\n arrows: {\n to: {\n enabled: true\n }\n }\n },\n layout: {\n //improvedLayout: true,\n hierarchical: {\n // enabled: true,\n nodeSpacing: 250,\n treeSpacing: 200,\n edgeMinimization: true,\n parentCentralization: true,\n direction: 'UD',\n sortMethod: 'directed'\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true\n },\n physics: {\n enabled: false\n },\n nodes: {\n shape: 'dot'\n }\n };\n const graph = {\n nodes: nodes,\n edges: edges\n };\n\n class VisNetwork extends Component {\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else {\n return false;\n }\n }\n\n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", params => {\n //console.log(params);\n if (params.nodes) {\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n });\n } // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n\n\n render() {\n return React.createElement(\"div\", {\n className: \"card-body p-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 131\n },\n __self: this\n }, React.createElement(\"div\", {\n ref: \"myRef\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 132\n },\n __self: this\n }));\n }\n\n }\n\n this.updateVisNodes(nodes);\n return React.createElement(VisNetwork, {\n graph: graph,\n options: options,\n updateSelection: this.props.updateSelection,\n shouldUpdateGraph: this.props.shouldUpdateGraph,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 140\n },\n __self: this\n });\n }\n\n}\n\nconst experimentStyle = {\n height: 600\n};\nexport default GraphNativeRep;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js"],"names":["React","Component","Spinner","vis","GraphNativeRep","updateVisNodes","nodes","props","setVisData","shouldComponentUpdate","nextProps","nextState","shouldUpdateGraph","data","pkl_timestamp","console","log","loadingGraph","componentWillUnmount","cleanGraphData","render","nodes_array","edges_array","edges","map","node","push","id","label","color","background","status_color","border","level","edge","from","to","DataSet","options","arrows","enabled","layout","hierarchical","nodeSpacing","treeSpacing","edgeMinimization","parentCentralization","direction","sortMethod","interaction","dragNodes","hoverConnectedEdges","navigationButtons","physics","shape","graph","VisNetwork","componentDidMount","network","Network","refs","myRef","on","params","updateSelection","experimentStyle","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,SAAhB,QAAiC,OAAjC,C,CACA;;AACA,OAAOC,OAAP,MAAoB,mBAApB;AACA,OAAOC,GAAP,MAAgB,KAAhB;;AAEA,MAAMC,cAAN,SAA6BH,SAA7B,CAAuC;AAAA;AAAA;;AAAA,SAmBnCI,cAnBmC,GAmBjBC,KAAD,IAAW;AACxB,WAAKC,KAAL,CAAWC,UAAX,CAAsBF,KAAtB;AACH,KArBkC;AAAA;;AAEnCG,EAAAA,qBAAqB,CAACC,SAAD,EAAYC,SAAZ,EAAsB;AACvC,QAAI,KAAKJ,KAAL,CAAWK,iBAAX,KAAiC,IAArC,EAA0C;AACtC,aAAO,IAAP;AACD,KAFH,MAEQ,IAAIF,S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;AAAA;AAAA;AAAA;AAAA;AAAA,UADJ,CADJ;AAKH;;AAjC8B;;AAoCnC,SAAK5D,cAAL,CAAoBC,KAApB;AAEA,WAAO,oBAAC,UAAD;AACH,MAAA,KAAK,EAAEiD,KADJ;AAEH,MAAA,OAAO,EAAEjB,OAFN;AAGH,MAAA,eAAe,EAAE,KAAK/B,KAAL,CAAWyD,eAHzB;AAIH,MAAA,iBAAiB,EAAE,KAAKzD,KAAL,CAAWK,iBAJ3B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAAP;AAOH;;AA7IkC;;AA2JvC,MAAMqD,eAAe,GAAG;AACpBC,EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,eAAe9D,cAAf","sourcesContent":["import React, { Component } from \"react\";\n// import vis from \"vis-network\";\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n\n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true\n }else if (nextProps.data && this.props.data && (nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp)){\n console.log(\"Rerendering\")\n return true;\n }else if (nextProps.loadingGraph !== this.props.loadingGraph){\n return true; \n }else{\n return false;\n }\n }\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n updateVisNodes = (nodes) => {\n this.props.setVisData(nodes);\n }\n\n\n\n render () {\n if (this.props.loadingGraph) return ;\n if (this.props.data == null){\n return (\n
\n

Press Show Graph to see the graph representation of the experiment.

\n

If the experiment is running, press Start Job Monitor to start a live tracker of the changes on the experiment's jobs.\n This process will automatically update the graph's nodes colors and show a log of the detected changes.\n

\n
\n );\n }\n\n var nodes_array = [];\n var edges_array = [];\n \n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: { background: node.status_color, border: \"black\" },\n level: node.level,\n })\n );\n \n this.props.data.edges.map(edge => \n edges_array.push({ from: edge.from, to: edge.to })\n );\n }\n \n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n\n\n const options = {\n edges: {\n arrows: {\n to: { enabled: true }\n }\n },\n layout: {\n //improvedLayout: true,\n hierarchical: {\n // enabled: true,\n nodeSpacing: 250,\n treeSpacing: 200,\n edgeMinimization: true,\n parentCentralization: true,\n direction: 'UD',\n sortMethod: 'directed',\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true,\n },\n physics: {\n enabled: false,\n },\n nodes: {\n shape: 'dot',\n }\n };\n \n const graph = {\n nodes : nodes,\n edges : edges,\n };\n\n class VisNetwork extends Component {\n \n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true;\n } else {\n return false;\n }\n }\n \n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", (params) => {\n //console.log(params);\n if (params.nodes){\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n \n });\n }\n \n // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n \n render() { \n return (\n
\n
\n
\n );\n }\n }\n\n this.updateVisNodes(nodes);\n \n return ;\n\n }\n\n\n \n\n \n\n \n \n\n \n\n}\n\nconst experimentStyle = {\n height: 600\n };\n\nexport default GraphNativeRep;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/36f806c9b531731ebfad21026e2b8532.json b/node_modules/.cache/babel-loader/36f806c9b531731ebfad21026e2b8532.json new file mode 100644 index 0000000000000000000000000000000000000000..79143c18bb1df00d6bdf106a1adc79ebc4f00737 --- /dev/null +++ b/node_modules/.cache/babel-loader/36f806c9b531731ebfad21026e2b8532.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/Selection.js\";\nimport React, { useContext, Fragment } from 'react';\nimport ExperimentContext from '../context/experiment/experimentContext';\n\nconst Selection = () => {\n const experimentContext = useContext(ExperimentContext);\n const selection = experimentContext.selection,\n data = experimentContext.data,\n experiment = experimentContext.experiment; // const { model, branch, hpc } = experiment;\n //var currentSelection = \"Node: \"\n\n var currentNode = \"\";\n var selectedNode = null;\n\n if (selection) {\n //console.log(\"Current selection \" + selection)\n selection.map(node => // currentSelection += node + \", \"\n currentNode = node); //console.log(\"Current node \" + currentNode)\n\n selectedNode = data.nodes.find(node => node.id === currentNode); //console.log(\"Selected node\")\n //console.log(\"Data: \" + selectedNode.id + \" \" + selectedNode.platform_name)\n }\n\n return React.createElement(Fragment, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 23\n },\n __self: this\n }, selectedNode && React.createElement(Fragment, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 25\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 26\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-12\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 27\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"card text-white bg-info\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 28\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"card-header text-center py-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 29\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 30\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 30\n },\n __self: this\n }, selectedNode.id))), React.createElement(\"div\", {\n className: \"card-body py-0 mh-100\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 32\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 33\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 34\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 34\n },\n __self: this\n }, \"Date:\"), \" \", selectedNode.date)), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-12\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 38\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 39\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 39\n },\n __self: this\n }, \"Section:\"), \" \", selectedNode.section)))), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 43\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 44\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-8\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 45\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 46\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 46\n },\n __self: this\n }, \"Platform:\"), \" \", selectedNode.platform_name && selectedNode.platform_name, \" \", !selectedNode.platform_name && experiment.hpc)), React.createElement(\"div\", {\n className: \"col-4 text-right\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 48\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 49\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 49\n },\n __self: this\n }, \"c:\", data.max_children, \"/p:\", data.max_parents))))), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 56\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 57\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-6\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 58\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 59\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 59\n },\n __self: this\n }, \"Processors:\"), \" \", selectedNode.processors)), React.createElement(\"div\", {\n className: \"col-6\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 61\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 62\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 62\n },\n __self: this\n }, \"Wallclock:\"), \" \", selectedNode.wallclock)))), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 66\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 67\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-6\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 68\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 69\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 69\n },\n __self: this\n }, \"Level:\"), \" \", selectedNode.level)), React.createElement(\"div\", {\n className: \"col-6\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 71\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 72\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 72\n },\n __self: this\n }, \"Out:\"), \" \", selectedNode.children, \" \", React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 72\n },\n __self: this\n }, \"In:\"), \" \", selectedNode.parents, \" \")))), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 77\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 78\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 78\n },\n __self: this\n }, \"Status:\")), \" \", selectedNode.status)))))), !selectedNode && data && React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 87\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-12\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 88\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"card text-white bg-info\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 89\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"card-header text-center py-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 90\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 91\n },\n __self: this\n }, \"Here goes the Job Id\")), React.createElement(\"div\", {\n className: \"card-body\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 93\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"text-center\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 94\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 95\n },\n __self: this\n }, \"Select a Node to see more information.\")))))));\n};\n\nconst experimentStyle = {\n height: 200\n};\nexport default Selection;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/Selection.js"],"names":["React","useContext","Fragment","ExperimentContext","Selection","experimentContext","selection","data","experiment","currentNode","selectedNode","map","node","nodes","find","id","experimentStyle","date","section","platform_name","hpc","max_children","max_parents","processors","wallclock","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AAA,KACI;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,eAAP,CADJ,OAC6CjB,YAAY,CAACkB,MAD1D,CA7CJ,CAJJ,CADH,CADJ,CADL,CAFR,EA+DS,CAAClB,YAAD,IAAiBH,IAAjB,IACG;AAAK,IAAA,SAAS,EAAC,KAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACI;AAAK,IAAA,SAAS,EAAC,QAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACI;AAAK,IAAA,SAAS,EAAC,yBAAf;AAAyC,IAAA,KAAK,EAAES,eAAhD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACI;AAAK,IAAA,SAAS,EAAC,8BAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACI;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,4BADJ,CADJ,EAII;AAAK,IAAA,SAAS,EAAC,WAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACI;AAAK,IAAA,SAAS,EAAC,aAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,8CADA,CADJ,CAJJ,CADJ,CADJ,CAhEZ,CADJ;AAqFH,CAvGD;;AAyGA,MAAMA,eAAe,GAAG;AACpBa,EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,eAAezB,SAAf","sourcesContent":["import React, { useContext, Fragment } from 'react'\nimport ExperimentContext from '../context/experiment/experimentContext';\n\nconst Selection = () => {\n const experimentContext = useContext(ExperimentContext);\n const { selection, data, experiment } = experimentContext;\n // const { model, branch, hpc } = experiment;\n //var currentSelection = \"Node: \"\n var currentNode = \"\"\n var selectedNode = null\n if (selection) {\n //console.log(\"Current selection \" + selection)\n selection.map(node => (\n // currentSelection += node + \", \"\n currentNode = node\n ));\n //console.log(\"Current node \" + currentNode)\n selectedNode = data.nodes.find(node => node.id === currentNode) \n //console.log(\"Selected node\")\n //console.log(\"Data: \" + selectedNode.id + \" \" + selectedNode.platform_name)\n } \n return (\n \n {selectedNode &&\n \n
\n
\n
\n
\n {selectedNode.id}\n
\n
\n
\n Date: {selectedNode.date}\n
\n
\n
\n
\n Section: {selectedNode.section}\n
\n
\n
\n
\n
\n
\n Platform: {selectedNode.platform_name && selectedNode.platform_name} {!selectedNode.platform_name && experiment.hpc}\n
\n
\n c:{data.max_children}/p:{data.max_parents}\n
\n
\n
\n {/*
\n Priority: {selectedNode.priority}\n
*/}\n
\n
\n
\n Processors: {selectedNode.processors}\n
\n
\n Wallclock: {selectedNode.wallclock}\n
\n
\n
\n
\n
\n
\n Level: {selectedNode.level}\n
\n
\n Out: {selectedNode.children} In: {selectedNode.parents} \n
\n \n
\n
\n
\n Status: {selectedNode.status}\n
\n
\n
\n
\n
\n
\n } \n {!selectedNode && data &&\n
\n
\n
\n
\n Here goes the Job Id\n
\n
\n
\n Select a Node to see more information. \n
\n
\n
\n
\n
\n } \n
\n \n \n\n )\n}\n\nconst experimentStyle = {\n height: 200\n };\n\nexport default Selection;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/3951fe233b364beca955c589edf1f031.json b/node_modules/.cache/babel-loader/3951fe233b364beca955c589edf1f031.json new file mode 100644 index 0000000000000000000000000000000000000000..b0c926d82b4e01c1ac1751d7f86c683fa0320fd0 --- /dev/null +++ b/node_modules/.cache/babel-loader/3951fe233b364beca955c589edf1f031.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js\";\nimport React, { Component } from \"react\"; // import vis from \"vis-network\";\n\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n constructor(...args) {\n super(...args);\n\n this.updateVisNodes = nodes => {\n this.props.setVisData(nodes);\n };\n }\n\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else if (nextProps.data && this.props.data && nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp) {\n console.log(\"Rerendering\");\n return true;\n } else if (nextProps.loadingGraph !== this.props.loadingGraph) {\n return true;\n } else {\n return false;\n }\n }\n\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n render() {\n if (this.props.loadingGraph) return React.createElement(Spinner, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 32\n },\n __self: this\n });\n\n if (this.props.data == null) {\n return React.createElement(\"div\", {\n className: \"card-body text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 35\n },\n __self: this\n }, React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Press \", React.createElement(\"span\", {\n className: \"badge badge-info\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Show Graph\"), \" to see the graph representation of the experiment.\"), React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"If the experiment is running, press \", React.createElement(\"span\", {\n className: \"badge badge-dark\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"Start Job Monitor\"), \" to start a live tracker of the changes on the experiment's jobs. This process will automatically update the graph's nodes colors and show a log of the detected changes.\"));\n }\n\n var nodes_array = [];\n var edges_array = [];\n\n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: {\n background: node.status_color,\n border: \"black\"\n },\n level: node.level\n }));\n this.props.data.edges.map(edge => edges_array.push({\n from: edge.from,\n to: edge.to\n }));\n }\n\n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n const options = {\n edges: {\n arrows: {\n to: {\n enabled: true\n }\n }\n },\n layout: {\n //improvedLayout: true,\n hierarchical: {\n nodeSpacing: 190,\n blockShifting: true,\n edgeMinimization: false,\n parentCentralization: false,\n sortMethod: 'hubsize',\n direction: 'UD'\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true\n },\n physics: {\n enabled: false\n },\n nodes: {\n shape: 'dot',\n font: {\n size: 10\n }\n }\n };\n const graph = {\n nodes: nodes,\n edges: edges\n };\n\n class VisNetwork extends Component {\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else {\n return false;\n }\n }\n\n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", params => {\n //console.log(params);\n if (params.nodes) {\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n });\n } // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n\n\n render() {\n return React.createElement(\"div\", {\n className: \"card-body p-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 133\n },\n __self: this\n }, React.createElement(\"div\", {\n ref: \"myRef\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 134\n },\n __self: this\n }));\n }\n\n }\n\n this.updateVisNodes(nodes);\n return React.createElement(VisNetwork, {\n graph: graph,\n options: options,\n updateSelection: this.props.updateSelection,\n shouldUpdateGraph: this.props.shouldUpdateGraph,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 142\n },\n __self: this\n });\n }\n\n}\n\nconst experimentStyle = {\n height: 600\n};\nexport default GraphNativeRep;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js"],"names":["React","Component","Spinner","vis","GraphNativeRep","updateVisNodes","nodes","props","setVisData","shouldComponentUpdate","nextProps","nextState","shouldUpdateGraph","data","pkl_timestamp","console","log","loadingGraph","componentWillUnmount","cleanGraphData","render","nodes_array","edges_array","edges","map","node","push","id","label","color","background","status_color","border","level","edge","from","to","DataSet","options","arrows","enabled","layout","hierarchical","nodeSpacing","blockShifting","edgeMinimization","parentCentralization","sortMethod","direction","interaction","dragNodes","hoverConnectedEdges","navigationButtons","physics","shape","font","size","graph","VisNetwork","componentDidMount","network","Network","refs","myRef","on","params","updateSelection","experimentStyle","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,SAAhB,QAAiC,OAAjC,C,CACA;;AACA,OAAOC,OAAP,MAAoB,mBAApB;AACA,OAAOC,GAAP,MAAgB,KAAhB;;AAEA,MAAMC,cAAN,SAA6BH,SAA7B,CAAuC;AAAA;AAAA;;AAAA,SAmBnCI,cAnBmC,GAmBjBC,KAAD,IAAW;AACxB,WAAKC,KAAL,CAAWC,UAAX,CAAsBF,KAAtB;AACH,KArBkC;AAAA;;AAEnCG,EAAAA,qBAAqB,CAACC,SAAD,EAAYC,SAAZ,EAAsB;AACvC,QAAI,KAAKJ,KAAL,CAAWK,iBAAX,KAAiC,IAArC,EAA0C;AACtC,aAAO,IAAP;AACD,KAFH,MAEQ,IAAIF,SAAS,CAACG,IAAV,IAAkB,KAAKN,KAAL,CAAWM,IAA7B,IAAsCH,SAAS,CAACG,IAAV,CAAeC,aAAf,KAAiC,KAAKP,KAAL,CAAWM,IAAX,CAAgBC,aAA3F,EAA0G;AAC9GC,MAAAA,OAAO,CAACC,GAAR,CAAY,aAAZ;AACA,aAAO,IAAP;AACD,KAHK,MAGA,IAAIN,SAAS,CAACO,YAAV,KAA2B,KAAKV,KAAL,CAAWU,YAA1C,EAAuD;AAC3D,aAAO,IAAP;AACD,KAFK,MAED;AACH,aAAO,KAAP;AACD;AACN;;AACDC,EAAAA,oBAAoB,GAAG;AACnBH,IAAAA,OAAO,CAACC,GAAR,CAAY,YAAZ;AACA,SAAKT,KAAL,CAAWY,cAAX;AACH;;AAQDC,EAAAA,MAAM,GAAI;AACN,QAAI,KAAKb,KAAL,CAAWU,YAAf,EAA6B,OAAO,oBA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Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n\n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true\n }else if (nextProps.data && this.props.data && (nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp)){\n console.log(\"Rerendering\")\n return true;\n }else if (nextProps.loadingGraph !== this.props.loadingGraph){\n return true; \n }else{\n return false;\n }\n }\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n updateVisNodes = (nodes) => {\n this.props.setVisData(nodes);\n }\n\n\n\n render () {\n if (this.props.loadingGraph) return ;\n if (this.props.data == null){\n return (\n
\n

Press Show Graph to see the graph representation of the experiment.

\n

If the experiment is running, press Start Job Monitor to start a live tracker of the changes on the experiment's jobs.\n This process will automatically update the graph's nodes colors and show a log of the detected changes.\n

\n
\n );\n }\n\n var nodes_array = [];\n var edges_array = [];\n \n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: { background: node.status_color, border: \"black\" },\n level: node.level,\n })\n );\n \n this.props.data.edges.map(edge => \n edges_array.push({ from: edge.from, to: edge.to })\n );\n }\n \n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n\n\n const options = {\n edges: {\n arrows: {\n to: { enabled: true }\n }\n },\n layout: {\n //improvedLayout: true,\n hierarchical: {\n nodeSpacing: 190,\n blockShifting: true,\n edgeMinimization: false,\n parentCentralization: false,\n sortMethod: 'hubsize',\n direction: 'UD',\n }\n }, \n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true,\n },\n physics: {\n enabled: false,\n },\n nodes: {\n shape: 'dot',\n font: {\n size: 10,\n },\n }\n };\n \n const graph = {\n nodes : nodes,\n edges : edges,\n };\n\n class VisNetwork extends Component {\n \n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true;\n } else {\n return false;\n }\n }\n \n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", (params) => {\n //console.log(params);\n if (params.nodes){\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n \n });\n }\n \n // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n \n render() { \n return (\n
\n
\n
\n );\n }\n }\n\n this.updateVisNodes(nodes);\n \n return ;\n\n }\n\n\n \n\n \n\n \n \n\n \n\n}\n\nconst experimentStyle = {\n height: 600\n };\n\nexport default GraphNativeRep;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/3b84185588c7ec55a45585c50b56862b.json b/node_modules/.cache/babel-loader/3b84185588c7ec55a45585c50b56862b.json new file mode 100644 index 0000000000000000000000000000000000000000..65c36c00c099dd91db798dc495b8668819a2ebff --- /dev/null +++ b/node_modules/.cache/babel-loader/3b84185588c7ec55a45585c50b56862b.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js\";\nimport React, { Component } from \"react\"; // import vis from \"vis-network\";\n\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n constructor(...args) {\n super(...args);\n\n this.render = () => {\n if (this.props.loadingGraph) return React.createElement(Spinner, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 27\n },\n __self: this\n });\n\n if (this.props.data == null) {\n return React.createElement(\"div\", {\n className: \"card-body text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 30\n },\n __self: this\n }, React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 31\n },\n __self: this\n }, \"Press \", React.createElement(\"span\", {\n className: \"badge badge-info\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 31\n },\n __self: this\n }, \"Show Graph\"), \" to see the graph representation of the experiment.\"), React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 32\n },\n __self: this\n }, \"If the experiment is running, press \", React.createElement(\"span\", {\n className: \"badge badge-dark\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 32\n },\n __self: this\n }, \"Start Job Monitor\"), \" to start a live tracker of the changes on the experiment's jobs. This process will automatically update the graph's nodes colors and show a log of the detected changes.\"));\n }\n\n var nodes_array = [];\n var edges_array = [];\n\n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: {\n background: node.status_color,\n border: \"black\"\n } //level: node.priority,\n\n }));\n this.props.data.edges.map(edge => edges_array.push({\n from: edge.from,\n to: edge.to\n }));\n }\n\n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n this.props.setVisData(nodes);\n const options = {\n edges: {\n arrows: {\n to: {\n enabled: true\n }\n }\n },\n layout: {\n improvedLayout: true,\n hierarchical: {\n nodeSpacing: 250,\n edgeMinimization: false,\n blockShifting: false,\n parentCentralization: false,\n direction: 'UD',\n sortMethod: 'directed'\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true\n },\n physics: {\n enabled: false\n },\n nodes: {\n shape: 'dot'\n }\n };\n const graph = {\n nodes: nodes,\n edges: edges\n };\n\n class VisNetwork extends Component {\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else {\n return false;\n }\n }\n\n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", params => {\n //console.log(params);\n if (params.nodes) {\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n });\n } // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n\n\n render() {\n return React.createElement(\"div\", {\n className: \"card-body p-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 126\n },\n __self: this\n }, React.createElement(\"div\", {\n ref: \"myRef\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 127\n },\n __self: this\n }));\n }\n\n }\n\n return React.createElement(VisNetwork, {\n graph: graph,\n options: options,\n updateSelection: this.props.updateSelection,\n shouldUpdateGraph: this.props.shouldUpdateGraph,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 133\n },\n __self: this\n });\n };\n }\n\n shouldComponentUpdate(nextProps, nextState) {\n if (nextProps.data && this.props.data) {\n console.log(\"Rerendering\");\n return true;\n } else if (nextProps.loadingGraph !== this.props.loadingGraph) {\n return true;\n } else {\n return false;\n }\n }\n\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n}\n\nconst experimentStyle = {\n height: 600\n};\nexport default GraphNativeRep;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js"],"names":["React","Component","Spinner","vis","GraphNativeRep","render","props","loadingGraph","data","nodes_array","edges_array","nodes","edges","map","node","push","id","label","color","background","status_color","border","edge","from","to","DataSet","setVisData","options","arrows","enabled","layout","improvedLayout","hierarchical","nodeSpacing","edgeMinimization","blockShifting","parentCentralization","direction","sortMethod","interaction","dragNodes","hoverConnectedEdges","navigationButtons","physics","shape","graph","VisNetwork","shouldComponentUpdate","nextProps","nextState","shouldUpdateGraph","componentDidMount","network","Network","refs","myRef","on","params","updateSelection","experimentStyle","console","log","componentWillUnmount","cleanGraphData","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,SAAhB,QAAiC,OAAjC,C,CACA;;AACA,OAAOC,OAAP,MAAoB,mBAApB;AACA,OAAOC,GAAP,MAAgB,KAAhB;;AAEA,MAAMC,cAAN,SAA6BH,SAA7B,CAAuC;AAAA;AAAA;;AAAA,SAoBnCI,MApBmC,GAoB1B,MAAM;AACX,UAA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oD,MAAAA,OAAO,CAACC,GAAR,CAAY,aAAZ;AACA,aAAO,IAAP;AACD,KAHD,MAGM,IAAIb,SAAS,CAACzC,YAAV,KAA2B,KAAKD,KAAL,CAAWC,YAA1C,EAAuD;AAC3D,aAAO,IAAP;AACD,KAFK,MAED;AACH,aAAO,KAAP;AACD;AACJ;;AACDuD,EAAAA,oBAAoB,GAAG;AACnBF,IAAAA,OAAO,CAACC,GAAR,CAAY,YAAZ;AACA,SAAKvD,KAAL,CAAWyD,cAAX;AACH;;AAhBkC;;AAoJvC,MAAMJ,eAAe,GAAG;AACpBK,EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,eAAe5D,cAAf","sourcesContent":["import React, { Component } from \"react\";\n// import vis from \"vis-network\";\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n\n shouldComponentUpdate(nextProps, nextState){ \n \n if (nextProps.data && this.props.data){\n console.log(\"Rerendering\")\n return true;\n }else if (nextProps.loadingGraph !== this.props.loadingGraph){\n return true; \n }else{\n return false;\n }\n }\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n\n\n render = () => {\n if (this.props.loadingGraph) return ;\n if (this.props.data == null){\n return (\n
\n

Press Show Graph to see the graph representation of the experiment.

\n

If the experiment is running, press Start Job Monitor to start a live tracker of the changes on the experiment's jobs.\n This process will automatically update the graph's nodes colors and show a log of the detected changes.\n

\n
\n );\n }\n\n var nodes_array = [];\n var edges_array = [];\n \n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: { background: node.status_color, border: \"black\" },\n //level: node.priority,\n })\n );\n \n this.props.data.edges.map(edge => \n edges_array.push({ from: edge.from, to: edge.to })\n );\n }\n \n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n this.props.setVisData(nodes);\n\n const options = {\n edges: {\n arrows: {\n to: { enabled: true }\n }\n },\n layout: {\n improvedLayout: true,\n hierarchical: {\n \n nodeSpacing: 250,\n edgeMinimization: false,\n blockShifting: false,\n parentCentralization: false,\n direction: 'UD',\n sortMethod: 'directed',\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true,\n },\n physics: {\n enabled: false,\n },\n nodes: {\n shape: 'dot',\n }\n };\n \n const graph = {\n nodes : nodes,\n edges : edges,\n };\n\n class VisNetwork extends Component {\n \n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true;\n } else {\n return false;\n }\n }\n \n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", (params) => {\n //console.log(params);\n if (params.nodes){\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n \n });\n }\n \n // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n \n render() { \n return (\n
\n
\n
\n );\n }\n }\n \n return ;\n\n }\n\n\n \n\n \n\n \n \n\n \n\n}\n\nconst experimentStyle = {\n height: 600\n };\n\nexport default GraphNativeRep;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/3e93ec491806888ae6676badbe4e145a.json b/node_modules/.cache/babel-loader/3e93ec491806888ae6676badbe4e145a.json new file mode 100644 index 0000000000000000000000000000000000000000..c16ca7a2fec9ac91c4f352dd929d7a848d28326a --- /dev/null +++ b/node_modules/.cache/babel-loader/3e93ec491806888ae6676badbe4e145a.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js\";\nimport React, { useContenxt } from \"react\"; // import vis from \"vis-network\";\n\nimport Spinner from \"../layout/Spinner\";\nimport ExperimentContext from '../context/experiment/experimentContext';\nimport vis from \"vis\";\n\nconst GraphNativeRep = () => {\n const experimentContext = useContenxt(ExperimentContext);\n const data = experimentContext.data,\n loadingGraph = experimentContext.loadingGraph;\n if (loadingGraph) return React.createElement(Spinner, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 11\n },\n __self: this\n });\n\n if (data === null) {\n return React.createElement(\"div\", {\n className: \"card-body text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 14\n },\n __self: this\n }, React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 15\n },\n __self: this\n }, \"Press \", React.createElement(\"span\", {\n className: \"badge badge-info\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 15\n },\n __self: this\n }, \"Show Graph\"), \" to see the graph representation of the experiment.\"), React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 16\n },\n __self: this\n }, \"If the experiment is running, press \", React.createElement(\"span\", {\n className: \"badge badge-dark\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 16\n },\n __self: this\n }, \"Start Job Monitor\"), \" to start a live tracker of the changes on the experiment's jobs. This process will automatically update the graph's nodes colors and show a log of the detected changes.\"));\n }\n\n var nodes_array = [];\n var edges_array = [];\n\n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: {\n background: node.status_color,\n border: \"black\"\n } //level: node.priority,\n\n }));\n this.props.data.edges.map(edge => edges_array.push({\n from: edge.from,\n to: edge.to\n }));\n }\n\n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n const options = {\n edges: {\n arrows: {\n to: {\n enabled: true\n }\n }\n },\n layout: {\n improvedLayout: true,\n hierarchical: {\n nodeSpacing: 250,\n edgeMinimization: false,\n blockShifting: false,\n parentCentralization: false,\n direction: 'UD',\n sortMethod: 'directed'\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true\n },\n physics: {\n enabled: false\n },\n nodes: {\n shape: 'dot'\n }\n };\n const graph = {\n nodes: nodes,\n edges: edges\n };\n var VisNetwork = React.createClass({\n displayName: \"VisNetwork\",\n\n componentDidMount() {\n var network = new vis.Network(this.ref.myRef, graph, options);\n },\n\n render: function () {\n return React.createElement(\"div\", {\n className: \"card-body p-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 88\n },\n __self: this\n }, React.createElement(\"div\", {\n ref: \"myRef\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 89\n },\n __self: this\n }));\n }\n });\n return React.createElement(VisNetwork, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 95\n },\n __self: this\n });\n};\n\nconst experimentStyle = {\n height: 600\n};\nexport default GraphNativeRep;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js"],"names":["React","useContenxt","Spinner","ExperimentContext","vis","GraphNativeRep","experimentContext","data","loadingGraph","nodes_array","edges_array","props","nodes","edges","map","node","push","id","label","color","background","status_color","border","edge","from","to","DataSet","options","arrows","enabled","layout","improvedLayout","hierarchical","nodeSpacing","edgeMinimization","blockShifting","parentCentralization","direction","sortMethod","interaction","dragNodes","hoverConnectedEdges","navigationButtons","physics","shape","graph","VisNetwork","createClass","componentDidMount","network","Network","ref","myRef","render","experimentStyle","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,WAAhB,QAAmC,OAAnC,C,CACA;;AACA,OAAOC,OAAP,MAAoB,mBAApB;AACA,OAAOC,iBAAP,MAA8B,yCAA9B;AACA,OAAOC,GAAP,MAAgB,KAAhB;;AAEA,MAAMC,cAAc,GAAG,MAAM;AAEzB,QAAMC,iBAAiB,GAAGL,WAAW,CAACE,iBAAD,CAArC;AAFyB,QAGjBI,IAHiB,GAGMD,iBAHN,CAGjBC,IAHiB;AAAA,QAGXC,YAHW,GAGMF,iBAHN,CAGXE,YAHW;AAIzB,MAAIA,YAAJ,EAAkB,OAAO,oBAAC,OAAD;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AvC,CAAd;AACH,KAH8B;;AAK/B0B,IAAAA,MAAM,EAAE,YAAW;AACf,aACI;AAAK,QAAA,SAAS,EAAC,eAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,SACI;AAAK,QAAA,GAAG,EAAC,OAAT;AAAiB,QAAA,KAAK,EAAEC,eAAxB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,QADJ,CADJ;AAKH;AAX8B,GAAlB,CAAjB;AAcA,SAAO,oBAAC,UAAD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAAP;AAEH,CA1FD;;AA4FA,MAAMA,eAAe,GAAG;AACpBC,EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,eAAelD,cAAf","sourcesContent":["import React, { useContenxt } from \"react\";\n// import vis from \"vis-network\";\nimport Spinner from \"../layout/Spinner\";\nimport ExperimentContext from '../context/experiment/experimentContext';\nimport vis from \"vis\";\n\nconst GraphNativeRep = () => {\n\n const experimentContext = useContenxt(ExperimentContext); \n const { data, loadingGraph } = experimentContext;\n if (loadingGraph) return \n if (data === null) {\n return (\n
\n

Press Show Graph to see the graph representation of the experiment.

\n

If the experiment is running, press Start Job Monitor to start a live tracker of the changes on the experiment's jobs.\n This process will automatically update the graph's nodes colors and show a log of the detected changes.\n

\n
\n );\n }\n\n var nodes_array = [];\n var edges_array = [];\n\n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: { background: node.status_color, border: \"black\" },\n //level: node.priority,\n })\n );\n \n this.props.data.edges.map(edge => \n edges_array.push({ from: edge.from, to: edge.to })\n );\n }\n\n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n\n const options = {\n edges: {\n arrows: {\n to: { enabled: true }\n }\n },\n layout: {\n improvedLayout: true,\n hierarchical: {\n \n nodeSpacing: 250,\n edgeMinimization: false,\n blockShifting: false,\n parentCentralization: false,\n direction: 'UD',\n sortMethod: 'directed',\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true,\n },\n physics: {\n enabled: false,\n },\n nodes: {\n shape: 'dot',\n }\n };\n\n const graph = {\n nodes : nodes,\n edges : edges,\n };\n \n\n var VisNetwork = React.createClass({\n componentDidMount() {\n var network = new vis.Network(this.ref.myRef, graph, options);\n },\n\n render: function() { \n return (\n
\n
\n
\n );\n }\n });\n\n return ;\n\n}\n\nconst experimentStyle = {\n height: 600\n };\n\nexport default GraphNativeRep;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/3f37621c04254332d39b1b992e86d51a.json b/node_modules/.cache/babel-loader/3f37621c04254332d39b1b992e86d51a.json new file mode 100644 index 0000000000000000000000000000000000000000..e432f9a35c3728a9ee50716fa140b1ac024d0e8c --- /dev/null +++ b/node_modules/.cache/babel-loader/3f37621c04254332d39b1b992e86d51a.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js\";\nimport React, { Component } from \"react\"; // import vis from \"vis-network\";\n\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n constructor(...args) {\n super(...args);\n\n this.updateVisNodes = nodes => {\n this.props.setVisData(nodes);\n };\n }\n\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else if (nextProps.data && this.props.data && nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp) {\n console.log(\"Rerendering\");\n return true;\n } else if (nextProps.loadingGraph !== this.props.loadingGraph) {\n return true;\n } else {\n return false;\n }\n }\n\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n render() {\n if (this.props.loadingGraph) return React.createElement(Spinner, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 32\n },\n __self: this\n });\n\n if (this.props.data == null) {\n return React.createElement(\"div\", {\n className: \"card-body text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 35\n },\n __self: this\n }, React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Press \", React.createElement(\"span\", {\n className: \"badge badge-info\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Show Graph\"), \" to see the graph representation of the experiment.\"), React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"If the experiment is running, press \", React.createElement(\"span\", {\n className: \"badge badge-dark\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"Start Job Monitor\"), \" to start a live tracker of the changes on the experiment's jobs. This process will automatically update the graph's nodes colors and show a log of the detected changes.\"));\n }\n\n var nodes_array = [];\n var edges_array = [];\n\n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: {\n background: node.status_color,\n border: \"black\"\n },\n level: node.level\n }));\n this.props.data.edges.map(edge => edges_array.push({\n from: edge.from,\n to: edge.to\n }));\n }\n\n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n const options = {\n edges: {\n arrows: {\n to: {\n enabled: true\n }\n }\n },\n layout: {\n //improvedLayout: true,\n hierarchical: {\n // enabled: true,\n nodeSpacing: 250,\n treeSpacing: 200,\n blockShifting: true,\n edgeMinimization: true,\n parentCentralization: true,\n direction: 'UD'\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true\n },\n physics: {\n enabled: false\n },\n nodes: {\n shape: 'dot'\n }\n };\n const graph = {\n nodes: nodes,\n edges: edges\n };\n\n class VisNetwork extends Component {\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else {\n return false;\n }\n }\n\n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", params => {\n //console.log(params);\n if (params.nodes) {\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n });\n } // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n\n\n render() {\n return React.createElement(\"div\", {\n className: \"card-body p-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 131\n },\n __self: this\n }, React.createElement(\"div\", {\n ref: \"myRef\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 132\n },\n __self: this\n }));\n }\n\n }\n\n this.updateVisNodes(nodes);\n return React.createElement(VisNetwork, {\n graph: graph,\n options: options,\n updateSelection: this.props.updateSelection,\n shouldUpdateGraph: this.props.shouldUpdateGraph,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 140\n },\n __self: this\n });\n }\n\n}\n\nconst experimentStyle = {\n height: 600\n};\nexport default GraphNativeRep;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js"],"names":["React","Component","Spinner","vis","GraphNativeRep","updateVisNodes","nodes","props","setVisData","shouldComponentUpdate","nextProps","nextState","shouldUpdateGraph","data","pkl_timestamp","console","log","loadingGraph","componentWillUnmount","cleanGraphData","render","nodes_array","edges_array","edges","map","node","push","id","label","color","background","status_color","border","level","edge","from","to","DataSet","options","arrows","enabled","layout","hierarchical","nodeSpacing","treeSpacing","blockShifting","edgeMinimization","parentCentralization","direction","interaction","dragNodes","hoverConnectedEdges","navigationButtons","physics","shape","graph","VisNetwork","componentDidMount","network","Network","refs","myRef","on","params","updateSelection","experimentStyle","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,SAAhB,QAAiC,OAAjC,C,CACA;;AACA,OAAOC,OAAP,MAAoB,mBAApB;AACA,OAAOC,GAAP,MAAgB,KAAhB;;AAEA,MAAMC,cA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D,KAAX,EAAiB;AACb;AACA,iBAAKC,KAAL,CAAWyD,eAAX,CAA2BD,MAAM,CAACzD,KAAlC;AACH;AAEJ,SAPD;AAQH,OApB8B,CAsB/B;AACA;AACA;AACA;;;AAEAc,MAAAA,MAAM,GAAG;AACL,eACI;AAAK,UAAA,SAAS,EAAC,eAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,WACI;AAAK,UAAA,GAAG,EAAC,OAAT;AAAiB,UAAA,KAAK,EAAE6C,eAAxB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,UADJ,CADJ;AAKH;;AAjC8B;;AAoCnC,SAAK5D,cAAL,CAAoBC,KAApB;AAEA,WAAO,oBAAC,UAAD;AACH,MAAA,KAAK,EAAEiD,KADJ;AAEH,MAAA,OAAO,EAAEjB,OAFN;AAGH,MAAA,eAAe,EAAE,KAAK/B,KAAL,CAAWyD,eAHzB;AAIH,MAAA,iBAAiB,EAAE,KAAKzD,KAAL,CAAWK,iBAJ3B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAAP;AAOH;;AA7IkC;;AA2JvC,MAAMqD,eAAe,GAAG;AACpBC,EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,eAAe9D,cAAf","sourcesContent":["import React, { Component } from \"react\";\n// import vis from \"vis-network\";\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n\n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true\n }else if (nextProps.data && this.props.data && (nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp)){\n console.log(\"Rerendering\")\n return true;\n }else if (nextProps.loadingGraph !== this.props.loadingGraph){\n return true; \n }else{\n return false;\n }\n }\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n updateVisNodes = (nodes) => {\n this.props.setVisData(nodes);\n }\n\n\n\n render () {\n if (this.props.loadingGraph) return ;\n if (this.props.data == null){\n return (\n
\n

Press Show Graph to see the graph representation of the experiment.

\n

If the experiment is running, press Start Job Monitor to start a live tracker of the changes on the experiment's jobs.\n This process will automatically update the graph's nodes colors and show a log of the detected changes.\n

\n
\n );\n }\n\n var nodes_array = [];\n var edges_array = [];\n \n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: { background: node.status_color, border: \"black\" },\n level: node.level,\n })\n );\n \n this.props.data.edges.map(edge => \n edges_array.push({ from: edge.from, to: edge.to })\n );\n }\n \n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n\n\n const options = {\n edges: {\n arrows: {\n to: { enabled: true }\n }\n },\n layout: {\n //improvedLayout: true,\n hierarchical: {\n // enabled: true,\n nodeSpacing: 250,\n treeSpacing: 200,\n blockShifting: true,\n edgeMinimization: true,\n parentCentralization: true,\n direction: 'UD',\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true,\n },\n physics: {\n enabled: false,\n },\n nodes: {\n shape: 'dot',\n }\n };\n \n const graph = {\n nodes : nodes,\n edges : edges,\n };\n\n class VisNetwork extends Component {\n \n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true;\n } else {\n return false;\n }\n }\n \n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", (params) => {\n //console.log(params);\n if (params.nodes){\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n \n });\n }\n \n // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n \n render() { \n return (\n
\n
\n
\n );\n }\n }\n\n this.updateVisNodes(nodes);\n \n return ;\n\n }\n\n\n \n\n \n\n \n \n\n \n\n}\n\nconst experimentStyle = {\n height: 600\n };\n\nexport default GraphNativeRep;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/3f7bf370580b629c7059e128324599a8.json b/node_modules/.cache/babel-loader/3f7bf370580b629c7059e128324599a8.json new file mode 100644 index 0000000000000000000000000000000000000000..1127c9ef5c273bfa14a983f1cca86fa85e34c371 --- /dev/null +++ b/node_modules/.cache/babel-loader/3f7bf370580b629c7059e128324599a8.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/Selection.js\";\nimport React, { useContext, Fragment } from 'react';\nimport ExperimentContext from '../context/experiment/experimentContext';\n\nconst Selection = () => {\n const experimentContext = useContext(ExperimentContext);\n const selection = experimentContext.selection,\n data = experimentContext.data,\n experiment = experimentContext.experiment; // const { model, branch, hpc } = experiment;\n //var currentSelection = \"Node: \"\n\n var currentNode = \"\";\n var selectedNode = null;\n\n if (selection) {\n //console.log(\"Current selection \" + selection)\n selection.map(node => // currentSelection += node + \", \"\n currentNode = node); //console.log(\"Current node \" + currentNode)\n\n selectedNode = data.nodes.find(node => node.id === currentNode); //console.log(\"Selected node\")\n //console.log(\"Data: \" + selectedNode.id + \" \" + selectedNode.platform_name)\n }\n\n return React.createElement(Fragment, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 23\n },\n __self: this\n }, selectedNode && React.createElement(Fragment, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 25\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 26\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-12\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 27\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"card text-white bg-info\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 28\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"card-header text-center py-0\",\n style: headerCard,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 29\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 30\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 30\n },\n __self: this\n }, selectedNode.id))), React.createElement(\"div\", {\n className: \"card-body py-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 32\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 33\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 34\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 34\n },\n __self: this\n }, \"Date:\"), \" \", selectedNode.date)), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-12\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 38\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 39\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 39\n },\n __self: this\n }, \"Section:\"), \" \", selectedNode.section)))), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 43\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 44\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-8\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 45\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 46\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 46\n },\n __self: this\n }, \"Platform:\"), \" \", selectedNode.platform_name && selectedNode.platform_name, \" \", !selectedNode.platform_name && experiment.hpc)), React.createElement(\"div\", {\n className: \"col-4 text-right\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 48\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 49\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 49\n },\n __self: this\n }, \"c:\", data.max_children, \"/p:\", data.max_parents))))), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 56\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 57\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-6\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 58\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 59\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 59\n },\n __self: this\n }, \"Processors:\"), \" \", selectedNode.processors)), React.createElement(\"div\", {\n className: \"col-6\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 61\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 62\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 62\n },\n __self: this\n }, \"Wallclock:\"), \" \", selectedNode.wallclock)))), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 66\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 67\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-6\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 68\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 69\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 69\n },\n __self: this\n }, \"Level:\"), \" \", selectedNode.level)), React.createElement(\"div\", {\n className: \"col-6\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 71\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 72\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 72\n },\n __self: this\n }, \"Out:\"), \" \", selectedNode.children, \" \", React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 72\n },\n __self: this\n }, \"In:\"), \" \", selectedNode.parents, \" \")))), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 77\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 78\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 78\n },\n __self: this\n }, \"Status:\")), \" \", selectedNode.status)))))), !selectedNode && data && React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 87\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-12\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 88\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"card text-white bg-info\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 89\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"card-header text-center py-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 90\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 91\n },\n __self: this\n }, \"Here goes the Job Id\")), React.createElement(\"div\", {\n className: \"card-body\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 93\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"text-center\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 94\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 95\n },\n __self: this\n }, \"Select a Node to see more information.\")))))));\n};\n\nconst experimentStyle = {\n height: 200\n};\nconst headerCard = {\n height: 35\n};\nexport default Selection;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/Selection.js"],"names":["React","useContext","Fragment","ExperimentContext","Selection","experimentContext","selection","data","experiment","currentNode","selectedNode","map","node","nodes","find","id","experimentStyle","headerCard","date","section","platform_name","hpc","max_children","max_parents","processors","wallclock","level","children","parents","status","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,UAAhB,EAA4BC,QAA5B,QAA4C,OAA5C;AACA,OAAOC,iBAAP,MAA8B,yCAA9B;;AAEA,MAAMC,SAAS,GAAG,MAAM;AACpB,QAAMC,iBAAiB,GAAGJ,UAAU,CAACE,iBAAD,CAApC;AADoB,QAEZG,SAFY,GAEoBD,iBAFpB,CAEZC,SAFY;AAAA,QAEDC,IAFC,GAEoBF,iBAFpB,CAEDE,IAFC;AAAA,QAEKC,UAFL,GAEoBH,iBAFpB,CAEKG,UAFL,EAGpB;AACA;;AACA,MAAIC,WAAW,GAAG,EAAlB;AACA,MAAIC,YAAY,GAAG,IAAnB;;AACA,MAAIJ,SAAJ,EAAe;AACX;AACAA,IAAAA,SAAS,CAACK,GAAV,CAAcC,IAAI,IACd;AACAH,IAAAA,WAAW,GAAGG,IAFlB,EAFW,CAMX;;AACAF,IAAAA,YAAY,GAAGH,IAAI,CAACM,KAAL,CAAWC,IAAX,CAAgBF,IAAI,IAAIA,IAAI,CAACG,EAAL,KAAYN,WAApC,CAAf,CAPW,CAQX;AACA;AACH;;AACD,SACI,oBAAC,QAAD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACSC,YAAY,IACb,oBAAC,QAAD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACK;AAAK,IAAA,SAAS,EAAC,KAAf;AAAA;AAAA;AAAA;AAAA;AAA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EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,MAAMb,UAAU,GAAG;AACfa,EAAAA,MAAM,EAAE;AADO,CAAnB;AAIA,eAAe1B,SAAf","sourcesContent":["import React, { useContext, Fragment } from 'react'\nimport ExperimentContext from '../context/experiment/experimentContext';\n\nconst Selection = () => {\n const experimentContext = useContext(ExperimentContext);\n const { selection, data, experiment } = experimentContext;\n // const { model, branch, hpc } = experiment;\n //var currentSelection = \"Node: \"\n var currentNode = \"\"\n var selectedNode = null\n if (selection) {\n //console.log(\"Current selection \" + selection)\n selection.map(node => (\n // currentSelection += node + \", \"\n currentNode = node\n ));\n //console.log(\"Current node \" + currentNode)\n selectedNode = data.nodes.find(node => node.id === currentNode) \n //console.log(\"Selected node\")\n //console.log(\"Data: \" + selectedNode.id + \" \" + selectedNode.platform_name)\n } \n return (\n \n {selectedNode &&\n \n
\n
\n
\n
\n {selectedNode.id}\n
\n
\n
\n Date: {selectedNode.date}\n
\n
\n
\n
\n Section: {selectedNode.section}\n
\n
\n
\n
\n
\n
\n Platform: {selectedNode.platform_name && selectedNode.platform_name} {!selectedNode.platform_name && experiment.hpc}\n
\n
\n c:{data.max_children}/p:{data.max_parents}\n
\n
\n
\n {/*
\n Priority: {selectedNode.priority}\n
*/}\n
\n
\n
\n Processors: {selectedNode.processors}\n
\n
\n Wallclock: {selectedNode.wallclock}\n
\n
\n
\n
\n
\n
\n Level: {selectedNode.level}\n
\n
\n Out: {selectedNode.children} In: {selectedNode.parents} \n
\n \n
\n
\n
\n Status: {selectedNode.status}\n
\n
\n
\n
\n
\n
\n } \n {!selectedNode && data &&\n
\n
\n
\n
\n Here goes the Job Id\n
\n
\n
\n Select a Node to see more information. \n
\n
\n
\n
\n
\n } \n
\n \n \n\n )\n}\n\nconst experimentStyle = {\n height: 200\n };\n\nconst headerCard = {\n height: 35\n}\n\nexport default Selection;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/3f9f30d6fb8a139662df00be0f74e372.json b/node_modules/.cache/babel-loader/3f9f30d6fb8a139662df00be0f74e372.json new file mode 100644 index 0000000000000000000000000000000000000000..5fa6a20501e69f31c9cfff77368ab97a31b3c6eb --- /dev/null +++ b/node_modules/.cache/babel-loader/3f9f30d6fb8a139662df00be0f74e372.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js\";\nimport React, { Component } from \"react\"; // import vis from \"vis-network\";\n\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n constructor(...args) {\n super(...args);\n\n this.updateVisNodes = nodes => {\n this.props.setVisData(nodes);\n };\n }\n\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else if (nextProps.data && this.props.data && nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp) {\n console.log(\"Rerendering\");\n return true;\n } else if (nextProps.loadingGraph !== this.props.loadingGraph) {\n return true;\n } else {\n return false;\n }\n }\n\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n render() {\n if (this.props.loadingGraph) return React.createElement(Spinner, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 32\n },\n __self: this\n });\n\n if (this.props.data == null) {\n return React.createElement(\"div\", {\n className: \"card-body text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 35\n },\n __self: this\n }, React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Press \", React.createElement(\"span\", {\n className: \"badge badge-info\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Show Graph\"), \" to see the graph representation of the experiment.\"), React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"If the experiment is running, press \", React.createElement(\"span\", {\n className: \"badge badge-dark\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"Start Job Monitor\"), \" to start a live tracker of the changes on the experiment's jobs. This process will automatically update the graph's nodes colors and show a log of the detected changes.\"));\n }\n\n var nodes_array = [];\n var edges_array = [];\n\n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: {\n background: node.status_color,\n border: \"black\"\n },\n level: node.level\n }));\n this.props.data.edges.map(edge => edges_array.push({\n from: edge.from,\n to: edge.to\n }));\n }\n\n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n const options = {\n edges: {\n arrows: {\n to: {\n enabled: true\n }\n }\n },\n layout: {\n //improvedLayout: true,\n hierarchical: {\n // enabled: true,\n levelSeparation: 150,\n nodeSpacing: 250,\n blockShifting: true,\n edgeMinimization: true,\n parentCentralization: true,\n direction: 'UD'\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true\n },\n physics: {\n enabled: false\n },\n nodes: {\n shape: 'dot'\n }\n };\n const graph = {\n nodes: nodes,\n edges: edges\n };\n\n class VisNetwork extends Component {\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else {\n return false;\n }\n }\n\n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", params => {\n //console.log(params);\n if (params.nodes) {\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n });\n } // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n\n\n render() {\n return React.createElement(\"div\", {\n className: \"card-body p-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 131\n },\n __self: this\n }, React.createElement(\"div\", {\n ref: \"myRef\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 132\n },\n __self: this\n }));\n }\n\n }\n\n this.updateVisNodes(nodes);\n return React.createElement(VisNetwork, {\n graph: graph,\n options: options,\n updateSelection: this.props.updateSelection,\n shouldUpdateGraph: this.props.shouldUpdateGraph,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 140\n },\n __self: this\n });\n }\n\n}\n\nconst experimentStyle = {\n height: 600\n};\nexport default GraphNativeRep;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js"],"names":["React","Component","Spinner","vis","GraphNativeRep","updateVisNodes","nodes","props","setVisData","shouldComponentUpdate","nextProps","nextState","shouldUpdateGraph","data","pkl_timestamp","console","log","loadingGraph","componentWillUnmount","cleanGraphData","render","nodes_array","edges_array","edges","map","node","push","id","label","color","background","status_color","border","level","edge","from","to","DataSet","options","arrows","enabled","layout","hierarchical","levelSeparation","nodeSpacing","blockShifting","edgeMinimization","parentCentralization","direction","interaction","dragNodes","hoverConnectedEdges","navigationButtons","physics","shape","graph","VisNetwork","componentDidMount","network","Network","refs","myRef","on","params","updateSelection","experimentStyle","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,SAAhB,QAAiC,OAAjC,C,CACA;;AACA,OAAOC,OAAP,MAAoB,mBAApB;AACA,OAAOC,GAAP,MAAgB,KAAhB;;AAEA,MAAMC,cAAN,SAA6BH,SAA7B,CAAuC;AAAA;AAAA;;AAAA,SAmBnCI,cAnBmC,GAmBjBC,KAAD,IAAW;AACxB,WAAKC,KAAL,CAAWC,UAAX,CAAsBF,KAAtB;AACH,KArBkC;AAAA;;AAEnCG,EAAAA,qBAAqB,CAACC,SAAD,EAAYC,SAAZ,EAAsB;AACvC,QAAI,KAAKJ,KAAL,CAAWK,iBAAX,KAAiC,IAArC,EAA0C;AACtC,aAAO,IAAP;AACD,KAFH,MAEQ,IAAIF,SAAS,CAACG,IAAV,IAAkB,KAAKN,KAAL,CAAWM,IAA7B,IAAsCH,SAAS,CAACG,IAAV,CAAe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CAAoBC,KAApB;AAEA,WAAO,oBAAC,UAAD;AACH,MAAA,KAAK,EAAEiD,KADJ;AAEH,MAAA,OAAO,EAAEjB,OAFN;AAGH,MAAA,eAAe,EAAE,KAAK/B,KAAL,CAAWyD,eAHzB;AAIH,MAAA,iBAAiB,EAAE,KAAKzD,KAAL,CAAWK,iBAJ3B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAAP;AAOH;;AA7IkC;;AA2JvC,MAAMqD,eAAe,GAAG;AACpBC,EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,eAAe9D,cAAf","sourcesContent":["import React, { Component } from \"react\";\n// import vis from \"vis-network\";\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n\n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true\n }else if (nextProps.data && this.props.data && (nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp)){\n console.log(\"Rerendering\")\n return true;\n }else if (nextProps.loadingGraph !== this.props.loadingGraph){\n return true; \n }else{\n return false;\n }\n }\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n updateVisNodes = (nodes) => {\n this.props.setVisData(nodes);\n }\n\n\n\n render () {\n if (this.props.loadingGraph) return ;\n if (this.props.data == null){\n return (\n
\n

Press Show Graph to see the graph representation of the experiment.

\n

If the experiment is running, press Start Job Monitor to start a live tracker of the changes on the experiment's jobs.\n This process will automatically update the graph's nodes colors and show a log of the detected changes.\n

\n
\n );\n }\n\n var nodes_array = [];\n var edges_array = [];\n \n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: { background: node.status_color, border: \"black\" },\n level: node.level,\n })\n );\n \n this.props.data.edges.map(edge => \n edges_array.push({ from: edge.from, to: edge.to })\n );\n }\n \n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n\n\n const options = {\n edges: {\n arrows: {\n to: { enabled: true }\n }\n },\n layout: {\n //improvedLayout: true,\n hierarchical: {\n // enabled: true,\n levelSeparation: 150,\n nodeSpacing: 250,\n blockShifting: true,\n edgeMinimization: true,\n parentCentralization: true,\n direction: 'UD',\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true,\n },\n physics: {\n enabled: false,\n },\n nodes: {\n shape: 'dot',\n }\n };\n \n const graph = {\n nodes : nodes,\n edges : edges,\n };\n\n class VisNetwork extends Component {\n \n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true;\n } else {\n return false;\n }\n }\n \n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", (params) => {\n //console.log(params);\n if (params.nodes){\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n \n });\n }\n \n // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n \n render() { \n return (\n
\n
\n
\n );\n }\n }\n\n this.updateVisNodes(nodes);\n \n return ;\n\n }\n\n\n \n\n \n\n \n \n\n \n\n}\n\nconst experimentStyle = {\n height: 600\n };\n\nexport default GraphNativeRep;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/3fc851c6890794598459d26daa98b565.json b/node_modules/.cache/babel-loader/3fc851c6890794598459d26daa98b565.json new file mode 100644 index 0000000000000000000000000000000000000000..8e9d0bc1e0664b7b1d9a5c7651033c6bd4f6dc71 --- /dev/null +++ b/node_modules/.cache/babel-loader/3fc851c6890794598459d26daa98b565.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/Selection.js\";\nimport React, { useContext, Fragment } from 'react';\nimport ExperimentContext from '../context/experiment/experimentContext';\n\nconst Selection = () => {\n const experimentContext = useContext(ExperimentContext);\n const selection = experimentContext.selection,\n data = experimentContext.data,\n experiment = experimentContext.experiment; // const { model, branch, hpc } = experiment;\n //var currentSelection = \"Node: \"\n\n var currentNode = \"\";\n var selectedNode = null;\n\n if (selection) {\n //console.log(\"Current selection \" + selection)\n selection.map(node => // currentSelection += node + \", \"\n currentNode = node); //console.log(\"Current node \" + currentNode)\n\n selectedNode = data.nodes.find(node => node.id === currentNode); //console.log(\"Selected node\")\n //console.log(\"Data: \" + selectedNode.id + \" \" + selectedNode.platform_name)\n }\n\n return React.createElement(Fragment, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 23\n },\n __self: this\n }, selectedNode && React.createElement(Fragment, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 25\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 26\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-12\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 27\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"card text-white bg-info\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 28\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"card-header text-center py-0\",\n style: headerCard,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 29\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"mh-100\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 30\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 31\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 31\n },\n __self: this\n }, selectedNode.id)))), React.createElement(\"div\", {\n className: \"card-body py-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 35\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"Date:\"), \" \", selectedNode.date)), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 39\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 40\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-12\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 41\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 42\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 42\n },\n __self: this\n }, \"Section:\"), \" \", selectedNode.section)))), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 46\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 47\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-8\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 48\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 49\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 49\n },\n __self: this\n }, \"Platform:\"), \" \", selectedNode.platform_name && selectedNode.platform_name, \" \", !selectedNode.platform_name && experiment.hpc)), React.createElement(\"div\", {\n className: \"col-4 text-right\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 51\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 52\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 52\n },\n __self: this\n }, \"c:\", data.max_children, \"/p:\", data.max_parents))))), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 59\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 60\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-6\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 61\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 62\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 62\n },\n __self: this\n }, \"Processors:\"), \" \", selectedNode.processors)), React.createElement(\"div\", {\n className: \"col-6\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 64\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 65\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 65\n },\n __self: this\n }, \"Wallclock:\"), \" \", selectedNode.wallclock)))), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 69\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 70\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-6\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 71\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 72\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 72\n },\n __self: this\n }, \"Level:\"), \" \", selectedNode.level)), React.createElement(\"div\", {\n className: \"col-6\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 74\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 75\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 75\n },\n __self: this\n }, \"Out:\"), \" \", selectedNode.children, \" \", React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 75\n },\n __self: this\n }, \"In:\"), \" \", selectedNode.parents, \" \")))), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 80\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 81\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 81\n },\n __self: this\n }, \"Status:\")), \" \", selectedNode.status)))))), !selectedNode && data && React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 90\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-12\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 91\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"card text-white bg-info\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 92\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"card-header text-center py-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 93\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 94\n },\n __self: this\n }, \"Here goes the Job Id\")), React.createElement(\"div\", {\n className: \"card-body\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 96\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"text-center\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 97\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 98\n },\n __self: this\n }, \"Select a Node to see more information.\")))))));\n};\n\nconst experimentStyle = {\n height: 200\n};\nconst headerCard = {\n height: 30\n};\nexport default Selection;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/Selection.js"],"names":["React","useContext","Fragment","ExperimentContext","Selection","experimentContext","selection","data","experiment","currentNode","selectedNode","map","node","nodes","find","id","experimentStyle","headerCard","date","section","platform_name","hpc","max_children","max_parents","processors","wallclock","level","children","parents","status","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,UAAhB,EAA4BC,QAA5B,QAA4C,OAA5C;AACA,OAAOC,iBAAP,MAA8B,yCAA9B;;AAEA,MAAMC,SAAS,GAAG,MAAM;AACpB,QAAMC,iBAAiB,GAAGJ,UAAU,CAACE,iBAAD,CAApC;AADoB,QAEZG,SAFY,GAEoBD,iBAFpB,CAEZC,SAFY;AAAA,QAEDC,IAFC,GAEoBF,iBAFpB,CAEDE,IAFC;AAAA,QAEKC,UAFL,GAEoBH,iBAFpB,CAEKG,UAFL,EAGpB;AACA;;AACA,MAAIC,WAAW,GAAG,EAAlB;AACA,MAAIC,YAAY,GAAG,IAAnB;;AACA,MAAIJ,SAAJ,EAAe;AACX;AACAA,IAAAA,SAAS,CAACK,GAAV,CAAcC,IAAI,IACd;AACAH,IAAAA,WAAW,GAAGG,IAFlB,EAFW,CAMX;;AACAF,IAAAA,YAAY,GAAGH,IAAI,CAACM,KAAL,CAAWC,IAAX,CAAgBF,IAAI,IAAIA,IAAI,CAACG,EAAL,KAAYN,WAApC,CAAf,CAPW,CAQX;AACA;AACH;;AACD,SACI,oBAAC,QAAD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACSC,YAAY,IACb,oBAAC,QAAD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACK;AAAK,IAAA,SAAS,EAAC,KAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACI;AAAK,IAAA,SAAS,EAAC,QAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACG;AAAK,IAAA,SAAS,EAAC,yBAAf;AAAyC,IAAA,KAAK,EAAEM,eAAhD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACI;AAAK,IAAA,SAAS,EAAC,8BAAf;AAA8C,IAAA,KAAK,EAAEC,UAArD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACI;AAAK,IAAA,SAAS,E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qD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,WAArD,OAA2EjB,YAAY,CAACkB,OAAxF,MADJ,CAJJ,CADJ,CAlCJ,EA6CI;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACI;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,eAAP,CADJ,OAC6ClB,YAAY,CAACmB,MAD1D,CA7CJ,CAPJ,CADH,CADJ,CADL,CAFR,EAkES,CAACnB,YAAD,IAAiBH,IAAjB,IACG;AAAK,IAAA,SAAS,EAAC,KAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACI;AAAK,IAAA,SAAS,EAAC,QAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACI;AAAK,IAAA,SAAS,EAAC,yBAAf;AAAyC,IAAA,KAAK,EAAES,eAAhD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACI;AAAK,IAAA,SAAS,EAAC,8BAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACI;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,4BADJ,CADJ,EAII;AAAK,IAAA,SAAS,EAAC,WAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACI;AAAK,IAAA,SAAS,EAAC,aAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,8CADA,CADJ,CAJJ,CADJ,CADJ,CAnEZ,CADJ;AAwFH,CA1GD;;AA4GA,MAAMA,eAAe,GAAG;AACpBc,EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,MAAMb,UAAU,GAAG;AACfa,EAAAA,MAAM,EAAE;AADO,CAAnB;AAIA,eAAe1B,SAAf","sourcesContent":["import React, { useContext, Fragment } from 'react'\nimport ExperimentContext from '../context/experiment/experimentContext';\n\nconst Selection = () => {\n const experimentContext = useContext(ExperimentContext);\n const { selection, data, experiment } = experimentContext;\n // const { model, branch, hpc } = experiment;\n //var currentSelection = \"Node: \"\n var currentNode = \"\"\n var selectedNode = null\n if (selection) {\n //console.log(\"Current selection \" + selection)\n selection.map(node => (\n // currentSelection += node + \", \"\n currentNode = node\n ));\n //console.log(\"Current node \" + currentNode)\n selectedNode = data.nodes.find(node => node.id === currentNode) \n //console.log(\"Selected node\")\n //console.log(\"Data: \" + selectedNode.id + \" \" + selectedNode.platform_name)\n } \n return (\n \n {selectedNode &&\n \n
\n
\n
\n
\n
\n {selectedNode.id}\n
\n \n
\n
\n
\n Date: {selectedNode.date}\n
\n
\n
\n
\n Section: {selectedNode.section}\n
\n
\n
\n
\n
\n
\n Platform: {selectedNode.platform_name && selectedNode.platform_name} {!selectedNode.platform_name && experiment.hpc}\n
\n
\n c:{data.max_children}/p:{data.max_parents}\n
\n
\n
\n {/*
\n Priority: {selectedNode.priority}\n
*/}\n
\n
\n
\n Processors: {selectedNode.processors}\n
\n
\n Wallclock: {selectedNode.wallclock}\n
\n
\n
\n
\n
\n
\n Level: {selectedNode.level}\n
\n
\n Out: {selectedNode.children} In: {selectedNode.parents} \n
\n \n
\n
\n
\n Status: {selectedNode.status}\n
\n
\n
\n
\n
\n
\n } \n {!selectedNode && data &&\n
\n
\n
\n
\n Here goes the Job Id\n
\n
\n
\n Select a Node to see more information. \n
\n
\n
\n
\n
\n } \n
\n \n \n\n )\n}\n\nconst experimentStyle = {\n height: 200\n };\n\nconst headerCard = {\n height: 30\n}\n\nexport default Selection;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/3fca13e70c8ebbbfacaf0cc50353ebdb.json b/node_modules/.cache/babel-loader/3fca13e70c8ebbbfacaf0cc50353ebdb.json new file mode 100644 index 0000000000000000000000000000000000000000..914c8ab8c5d2cf47cd742e428502ee2040412a45 --- /dev/null +++ b/node_modules/.cache/babel-loader/3fca13e70c8ebbbfacaf0cc50353ebdb.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js\";\nimport React, { Component } from \"react\"; // import vis from \"vis-network\";\n\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else if (nextProps.data && this.props.data) {\n console.log(\"Rerendering\");\n return true;\n } else if (nextProps.loadingGraph !== this.props.loadingGraph) {\n return true;\n } else {\n return false;\n }\n }\n\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n render() {\n if (this.props.loadingGraph) return React.createElement(Spinner, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 29\n },\n __self: this\n });\n\n if (this.props.data == null) {\n return React.createElement(\"div\", {\n className: \"card-body text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 32\n },\n __self: this\n }, React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 33\n },\n __self: this\n }, \"Press \", React.createElement(\"span\", {\n className: \"badge badge-info\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 33\n },\n __self: this\n }, \"Show Graph\"), \" to see the graph representation of the experiment.\"), React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 34\n },\n __self: this\n }, \"If the experiment is running, press \", React.createElement(\"span\", {\n className: \"badge badge-dark\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 34\n },\n __self: this\n }, \"Start Job Monitor\"), \" to start a live tracker of the changes on the experiment's jobs. This process will automatically update the graph's nodes colors and show a log of the detected changes.\"));\n }\n\n var nodes_array = [];\n var edges_array = [];\n\n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: {\n background: node.status_color,\n border: \"black\"\n } //level: node.priority,\n\n }));\n this.props.data.edges.map(edge => edges_array.push({\n from: edge.from,\n to: edge.to\n }));\n }\n\n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n const options = {\n edges: {\n arrows: {\n to: {\n enabled: true\n }\n }\n },\n layout: {\n improvedLayout: true,\n hierarchical: {\n nodeSpacing: 250,\n edgeMinimization: false,\n blockShifting: false,\n parentCentralization: false,\n direction: 'UD',\n sortMethod: 'directed'\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true\n },\n physics: {\n enabled: false\n },\n nodes: {\n shape: 'dot'\n }\n };\n const graph = {\n nodes: nodes,\n edges: edges\n };\n\n class VisNetwork extends Component {\n // shouldComponentUpdate(nextProps, nextState){ \n // if (nextProps.loadingGraph !== this.props.loadingGraph){\n // return true; \n // }else{\n // return false;\n // }\n // }\n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", params => {\n //console.log(params);\n if (params.nodes) {\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n });\n } // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n\n\n render() {\n return React.createElement(\"div\", {\n className: \"card-body p-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 127\n },\n __self: this\n }, React.createElement(\"div\", {\n ref: \"myRef\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 128\n },\n __self: this\n }));\n }\n\n }\n\n return React.createElement(VisNetwork, {\n graph: graph,\n options: options,\n updateSelection: this.props.updateSelection,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 134\n },\n __self: this\n });\n }\n\n}\n\nconst experimentStyle = {\n height: 600\n};\nexport default GraphNativeRep;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js"],"names":["React","Component","Spinner","vis","GraphNativeRep","shouldComponentUpdate","nextProps","nextState","props","shouldUpdateGraph","data","console","log","loadingGraph","componentWillUnmount","cleanGraphData","render","nodes_array","edges_array","nodes","edges","map","node","push","id","label","color","background","status_color","border","edge","from","to","DataSet","options","arrows","enabled","layout","improvedLayout","hierarchical","nodeSpacing","edgeMinimization","blockShifting","parentCentralization","direction","sortMethod","interaction","dragNodes","hoverConnectedEdges","navigationButtons","physics","shape","graph","VisNetwork","componentDidMount","network","Network","refs","myRef","on","params","updateSelection","experimentStyle","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,SAAhB,QAAiC,OAAjC,C,CACA;;AACA,OAAOC,OAAP,MAAoB,mBAApB;AACA,OAAOC,GAAP,MAAgB,KAAhB;;AAEA,MAAMC,cAAN,SAA6BH,SAA7B,CAAuC;AAEnCI,EAAAA,qBAAqB,CAACC,SAAD,EAAYC,SAAZ,EAAsB;AAEvC,QAAI,KAAKC,KAAL,CAAWC,iBAAX,KAAiC,IAArC,EAA0C;AACxC,aAAO,IAAP;AACD,KAFD,MAEM,IAAIH,SAAS,CAACI,IAAV,IAAkB,KAAKF,KAAL,CAAWE,IAAjC,EAAsC;AAC1CC,MAAAA,OAAO,CAACC,GAAR,CAAY,aAAZ;AACA,aAAO,IAAP;AACD,KAHK,MAGA,IAAIN,SAAS,CAACO,YAAV,KAA2B,KAAKL,KAAL,CAAWK,YAA1C,EAAuD;AAC3D,aAAO,IAAP;AACD,KAFK,MAED;AACH,aAAO,KAAP;AACD;AACJ;;AACDC,EAAAA,oBAAoB,GAAG;AACnBH,IAAAA,OAAO,CAACC,GAAR,CAAY,YAAZ;AACA,SAAKJ,KAAL,CAAWO,cAAX;AACH;;AAIDC,EAAAA,MAAM,GAAG;AACL,QAAI,KAAKR,KAAL,CAAWK,YAAf,EAA6B,OAAO,oBAAC,OAAD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAAP;;AAC7B,QAAI,KAAKL,KAAL,CAAWE,IAAX,IAAmB,IAAvB,EAA4B;AACxB,aACI;AAAK,QAAA,SAA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,CAAW,OAAX,EAAqBC,MAAD,IAAY;AAC5B;AACA,cAAIA,MAAM,CAACzC,KAAX,EAAiB;AACb;AACA,iBAAKX,KAAL,CAAWqD,eAAX,CAA2BD,MAAM,CAACzC,KAAlC;AACH;AAEJ,SAPD;AAQH,OApB8B,CAsB/B;AACA;AACA;AACA;;;AAEAH,MAAAA,MAAM,GAAG;AACL,eACI;AAAK,UAAA,SAAS,EAAC,eAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,WACI;AAAK,UAAA,GAAG,EAAC,OAAT;AAAiB,UAAA,KAAK,EAAE8C,eAAxB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,UADJ,CADJ;AAKH;;AAjC8B;;AAoCnC,WAAO,oBAAC,UAAD;AAAY,MAAA,KAAK,EAAEV,KAAnB;AAA0B,MAAA,OAAO,EAAElB,OAAnC;AAA4C,MAAA,eAAe,EAAE,KAAK1B,KAAL,CAAWqD,eAAxE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAAP;AAEH;;AAlIkC;;AAgJvC,MAAMC,eAAe,GAAG;AACpBC,EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,eAAe3D,cAAf","sourcesContent":["import React, { Component } from \"react\";\n// import vis from \"vis-network\";\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n\n shouldComponentUpdate(nextProps, nextState){ \n \n if (this.props.shouldUpdateGraph === true){\n return true\n }else if (nextProps.data && this.props.data){\n console.log(\"Rerendering\")\n return true;\n }else if (nextProps.loadingGraph !== this.props.loadingGraph){\n return true; \n }else{\n return false;\n }\n }\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n\n\n render() {\n if (this.props.loadingGraph) return ;\n if (this.props.data == null){\n return (\n
\n

Press Show Graph to see the graph representation of the experiment.

\n

If the experiment is running, press Start Job Monitor to start a live tracker of the changes on the experiment's jobs.\n This process will automatically update the graph's nodes colors and show a log of the detected changes.\n

\n
\n );\n }\n\n var nodes_array = [];\n var edges_array = [];\n \n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: { background: node.status_color, border: \"black\" },\n //level: node.priority,\n })\n );\n \n this.props.data.edges.map(edge => \n edges_array.push({ from: edge.from, to: edge.to })\n );\n }\n \n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n\n const options = {\n edges: {\n arrows: {\n to: { enabled: true }\n }\n },\n layout: {\n improvedLayout: true,\n hierarchical: {\n \n nodeSpacing: 250,\n edgeMinimization: false,\n blockShifting: false,\n parentCentralization: false,\n direction: 'UD',\n sortMethod: 'directed',\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true,\n },\n physics: {\n enabled: false,\n },\n nodes: {\n shape: 'dot',\n }\n };\n \n const graph = {\n nodes : nodes,\n edges : edges,\n };\n\n class VisNetwork extends Component {\n \n // shouldComponentUpdate(nextProps, nextState){ \n // if (nextProps.loadingGraph !== this.props.loadingGraph){\n // return true; \n // }else{\n // return false;\n // }\n // }\n \n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", (params) => {\n //console.log(params);\n if (params.nodes){\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n \n });\n }\n \n // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n \n render() { \n return (\n
\n
\n
\n );\n }\n }\n \n return ;\n\n }\n\n\n \n\n \n\n \n \n\n \n\n}\n\nconst experimentStyle = {\n height: 600\n };\n\nexport default GraphNativeRep;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/41fea9f9e004ee24021a55222dcc9b03.json b/node_modules/.cache/babel-loader/41fea9f9e004ee24021a55222dcc9b03.json new file mode 100644 index 0000000000000000000000000000000000000000..38f2a996a2aa66c4f6132db140d396e9d135eb30 --- /dev/null +++ b/node_modules/.cache/babel-loader/41fea9f9e004ee24021a55222dcc9b03.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js\";\nimport React, { Component } from \"react\"; // import vis from \"vis-network\";\n\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis-network\";\n\nclass GraphNativeRep extends Component {\n constructor(...args) {\n super(...args);\n\n this.updateVisNodes = nodes => {\n this.props.setVisData(nodes);\n };\n }\n\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else if (nextProps.data && this.props.data && nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp) {\n console.log(\"Rerendering\");\n return true;\n } else if (nextProps.loadingGraph !== this.props.loadingGraph) {\n return true;\n } else {\n return false;\n }\n }\n\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n render() {\n if (this.props.loadingGraph) return React.createElement(Spinner, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 32\n },\n __self: this\n });\n\n if (this.props.data == null) {\n return React.createElement(\"div\", {\n className: \"card-body text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 35\n },\n __self: this\n }, React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Press \", React.createElement(\"span\", {\n className: \"badge badge-info\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Show Graph\"), \" to see the graph representation of the experiment.\"), React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"If the experiment is running, press \", React.createElement(\"span\", {\n className: \"badge badge-dark\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"Start Job Monitor\"), \" to start a live tracker of the changes on the experiment's jobs. This process will automatically update the graph's nodes colors and show a log of the detected changes.\"));\n }\n\n var nodes_array = [];\n var edges_array = [];\n\n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: {\n background: node.status_color,\n border: \"black\"\n },\n level: node.level\n }));\n this.props.data.edges.map(edge => edges_array.push({\n from: edge.from,\n to: edge.to\n }));\n }\n\n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n const options = {\n edges: {\n arrows: {\n to: {\n enabled: true\n }\n }\n },\n layout: {\n //improvedLayout: true,\n hierarchical: {\n nodeSpacing: 190,\n blockShifting: false,\n edgeMinimization: false,\n parentCentralization: true,\n sortMethod: 'hubsize',\n direction: 'UD'\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true\n },\n physics: {\n enabled: false\n },\n nodes: {\n shape: 'dot',\n font: {\n size: 10\n }\n }\n };\n const graph = {\n nodes: nodes,\n edges: edges\n };\n\n class VisNetwork extends Component {\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else {\n return false;\n }\n }\n\n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", params => {\n //console.log(params);\n if (params.nodes) {\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n });\n } // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n\n\n render() {\n return React.createElement(\"div\", {\n className: \"card-body p-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 133\n },\n __self: this\n }, React.createElement(\"div\", {\n ref: \"myRef\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 134\n },\n __self: this\n }));\n }\n\n }\n\n this.updateVisNodes(nodes);\n return React.createElement(VisNetwork, {\n graph: graph,\n options: options,\n updateSelection: this.props.updateSelection,\n shouldUpdateGraph: this.props.shouldUpdateGraph,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 142\n },\n __self: this\n });\n }\n\n}\n\nconst experimentStyle = {\n height: 600\n};\nexport default GraphNativeRep;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js"],"names":["React","Component","Spinner","vis","GraphNativeRep","updateVisNodes","nodes","props","setVisData","shouldComponentUpdate","nextProps","nextState","shouldUpdateGraph","data","pkl_timestamp","console","log","loadingGraph","componentWillUnmount","cleanGraphData","render","nodes_array","edges_array","edges","map","node","push","id","label","color","background","status_color","border","level","edge","from","to","DataSet","options","arrows","enabled","layout","hierarchical","nodeSpacing","blockShifting","edgeMinimization","parentCentralization","sortMethod","direction","interaction","dragNodes","hoverConnectedEdges","navigationButtons","physics","shape","font","size","graph","VisNetwork","componentDidMount","network","Network","refs","myRef","on","params","updateSelection","experimentStyle","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,SAAhB,QAAiC,OAAjC,C,CACA;;AACA,OAAOC,OAAP,MAAoB,mBAApB;AACA,OAAOC,GAAP,MAAgB,aAAhB;;AAEA,MAAMC,cAAN,SAA6BH,SAA7B,CAAuC;AAAA;AAAA;;AAAA,SAmBnCI,cAnBmC,GAmBjBC,KAAD,IAAW;AACxB,WAAKC,KAAL,CAAWC,UAAX,CAAsBF,KAAtB;AACH,KArBkC;AAAA;;AAEnCG,EAAAA,qBAAqB,CAACC,SAAD,EAAYC,SAAZ,EAAsB;AACvC,QAAI,KAAKJ,KAAL,CAAWK,iBAAX,KAAiC,IAArC,EAA0C;AACtC,aAAO,IAAP;AACD,KAFH,MAEQ,IAAIF,SAAS,CAACG,IAAV,IAAkB,KAAKN,KAAL,CAAWM,IAA7B,IAAsCH,SAAS,CAACG,IAAV,CAAeC,aAAf,KAAiC,KAAKP,KAAL,CAAWM,IAAX,CAAgBC,aAA3F,EAA0G;AAC9GC,MAAAA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AAO,oBAAC,UAAD;AACH,MAAA,KAAK,EAAEmD,KADJ;AAEH,MAAA,OAAO,EAAEnB,OAFN;AAGH,MAAA,eAAe,EAAE,KAAK/B,KAAL,CAAW2D,eAHzB;AAIH,MAAA,iBAAiB,EAAE,KAAK3D,KAAL,CAAWK,iBAJ3B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAAP;AAOH;;AA/IkC;;AA6JvC,MAAMuD,eAAe,GAAG;AACpBC,EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,eAAehE,cAAf","sourcesContent":["import React, { Component } from \"react\";\n// import vis from \"vis-network\";\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis-network\";\n\nclass GraphNativeRep extends Component {\n\n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true\n }else if (nextProps.data && this.props.data && (nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp)){\n console.log(\"Rerendering\")\n return true;\n }else if (nextProps.loadingGraph !== this.props.loadingGraph){\n return true; \n }else{\n return false;\n }\n }\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n updateVisNodes = (nodes) => {\n this.props.setVisData(nodes);\n }\n\n\n\n render () {\n if (this.props.loadingGraph) return ;\n if (this.props.data == null){\n return (\n
\n

Press Show Graph to see the graph representation of the experiment.

\n

If the experiment is running, press Start Job Monitor to start a live tracker of the changes on the experiment's jobs.\n This process will automatically update the graph's nodes colors and show a log of the detected changes.\n

\n
\n );\n }\n\n var nodes_array = [];\n var edges_array = [];\n \n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: { background: node.status_color, border: \"black\" },\n level: node.level,\n })\n );\n \n this.props.data.edges.map(edge => \n edges_array.push({ from: edge.from, to: edge.to })\n );\n }\n \n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n\n\n const options = {\n edges: {\n arrows: {\n to: { enabled: true }\n }\n },\n layout: {\n //improvedLayout: true,\n hierarchical: {\n nodeSpacing: 190,\n blockShifting: false,\n edgeMinimization: false,\n parentCentralization: true,\n sortMethod: 'hubsize',\n direction: 'UD',\n }\n }, \n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true,\n },\n physics: {\n enabled: false,\n },\n nodes: {\n shape: 'dot',\n font: {\n size: 10,\n },\n }\n };\n \n const graph = {\n nodes : nodes,\n edges : edges,\n };\n\n class VisNetwork extends Component {\n \n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true;\n } else {\n return false;\n }\n }\n \n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", (params) => {\n //console.log(params);\n if (params.nodes){\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n \n });\n }\n \n // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n \n render() { \n return (\n
\n
\n
\n );\n }\n }\n\n this.updateVisNodes(nodes);\n \n return ;\n\n }\n\n\n \n\n \n\n \n \n\n \n\n}\n\nconst experimentStyle = {\n height: 600\n };\n\nexport default GraphNativeRep;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/43ca65a6ff1be76bff30622f2ea0d008.json b/node_modules/.cache/babel-loader/43ca65a6ff1be76bff30622f2ea0d008.json new file mode 100644 index 0000000000000000000000000000000000000000..b42056c2192edf7fbb31fe6d944f4b3de7b29864 --- /dev/null +++ b/node_modules/.cache/babel-loader/43ca65a6ff1be76bff30622f2ea0d008.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js\";\nimport React, { Component } from \"react\"; // import vis from \"vis-network\";\n\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n constructor(...args) {\n super(...args);\n\n this.updateVisNodes = nodes => {\n this.props.setVisData(nodes);\n };\n }\n\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else if (nextProps.data && this.props.data && nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp) {\n console.log(\"Rerendering\");\n return true;\n } else if (nextProps.loadingGraph !== this.props.loadingGraph) {\n return true;\n } else {\n return false;\n }\n }\n\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n render() {\n if (this.props.loadingGraph) return React.createElement(Spinner, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 32\n },\n __self: this\n });\n\n if (this.props.data == null) {\n return React.createElement(\"div\", {\n className: \"card-body text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 35\n },\n __self: this\n }, React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Press \", React.createElement(\"span\", {\n className: \"badge badge-info\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Show Graph\"), \" to see the graph representation of the experiment.\"), React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"If the experiment is running, press \", React.createElement(\"span\", {\n className: \"badge badge-dark\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"Start Job Monitor\"), \" to start a live tracker of the changes on the experiment's jobs. This process will automatically update the graph's nodes colors and show a log of the detected changes.\"));\n }\n\n var nodes_array = [];\n var edges_array = [];\n\n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: {\n background: node.status_color,\n border: \"black\"\n },\n level: node.level\n }));\n this.props.data.edges.map(edge => edges_array.push({\n from: edge.from,\n to: edge.to\n }));\n }\n\n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n const options = {\n edges: {\n arrows: {\n to: {\n enabled: true\n }\n }\n },\n layout: {\n //improvedLayout: true,\n hierarchical: {\n nodeSpacing: 190,\n blockShifting: false,\n edgeMinimization: false,\n parentCentralization: false,\n sortMethod: 'hubsize',\n direction: 'UD'\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true\n },\n physics: {\n enabled: false\n },\n nodes: {\n shape: 'dot',\n font: {\n size: 10\n }\n }\n };\n const graph = {\n nodes: nodes,\n edges: edges\n };\n\n class VisNetwork extends Component {\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else {\n return false;\n }\n }\n\n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", params => {\n //console.log(params);\n if (params.nodes) {\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n });\n } // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n\n\n render() {\n return React.createElement(\"div\", {\n className: \"card-body p-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 133\n },\n __self: this\n }, React.createElement(\"div\", {\n ref: \"myRef\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 134\n },\n __self: this\n }));\n }\n\n }\n\n this.updateVisNodes(nodes);\n return React.createElement(VisNetwork, {\n graph: graph,\n options: options,\n updateSelection: this.props.updateSelection,\n shouldUpdateGraph: this.props.shouldUpdateGraph,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 142\n },\n __self: this\n });\n }\n\n}\n\nconst experimentStyle = {\n height: 600\n};\nexport default GraphNativeRep;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js"],"names":["React","Component","Spinner","vis","GraphNativeRep","updateVisNodes","nodes","props","setVisData","shouldComponentUpdate","nextProps","nextState","shouldUpdateGraph","data","pkl_timestamp","console","log","loadingGraph","componentWillUnmount","cleanGraphData","render","nodes_array","edges_array","edges","map","node","push","id","label","color","background","status_color","border","level","edge","from","to","DataSet","options","arrows","enabled","layout","hierarchical","nodeSpacing","blockShifting","edgeMinimization","parentCentralization","sortMethod","direction","interaction","dragNodes","hoverConnectedEdges","navigationButtons","physics","shape","font","size","graph","VisNetwork","componentDidMount","network","Network","refs","myRef","on","params","updateSelection","experimentStyle","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,SAAhB,QAAiC,OAAjC,C,CACA;;AACA,OAAOC,OAAP,MAAoB,mBAApB;AACA,OAAOC,GAAP,MAAgB,KAAhB;;AAEA,MAAMC,cAAN,SAA6BH,SAA7B,CAAuC;AAAA;AAAA;;AAAA,SAmBnCI,cAnBmC,GAmBjBC,KAAD,IAAW;AACxB,WAAKC,KAAL,CAAWC,UAAX,CAAsBF,KAAtB;AACH,KArBkC;AAAA;;AAEnCG,EAAAA,qBAAqB,CAACC,SAAD,EAAYC,SAAZ,EAAsB;AACvC,QAAI,KAAKJ,KAAL,CAAWK,iBAAX,KAAiC,IAArC,EAA0C;AACtC,aAAO,IAAP;AACD,KAFH,MAEQ,IAAIF,SAAS,CAACG,IAAV,IAAkB,KAAKN,KAAL,CAAWM,IAA7B,IAAsCH,SAAS,CAACG,IAAV,CAAeC,aAAf,KAAiC,KAAKP,KAAL,CAAWM,IAAX,CAAgBC,aAA3F,EAA0G;AAC9GC,MAAAA,OAAO,CAACC,GAAR,CAAY,aAAZ;AACA,aAAO,IAAP;AACD,KAHK,MAGA,IAAIN,SAAS,CAACO,YAAV,KAA2B,KAAKV,KAAL,CAAWU,YAA1C,EAAuD;AAC3D,aAAO,IAAP;AACD,KAFK,MAED;AACH,aAAO,KAAP;AACD;AACN;;AACDC,EAAAA,oBAAoB,GAAG;AACnBH,IAAAA,OAAO,CAACC,GAAR,CAAY,YAAZ;AACA,SAAKT,K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ACpBC,EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,eAAehE,cAAf","sourcesContent":["import React, { Component } from \"react\";\n// import vis from \"vis-network\";\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n\n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true\n }else if (nextProps.data && this.props.data && (nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp)){\n console.log(\"Rerendering\")\n return true;\n }else if (nextProps.loadingGraph !== this.props.loadingGraph){\n return true; \n }else{\n return false;\n }\n }\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n updateVisNodes = (nodes) => {\n this.props.setVisData(nodes);\n }\n\n\n\n render () {\n if (this.props.loadingGraph) return ;\n if (this.props.data == null){\n return (\n
\n

Press Show Graph to see the graph representation of the experiment.

\n

If the experiment is running, press Start Job Monitor to start a live tracker of the changes on the experiment's jobs.\n This process will automatically update the graph's nodes colors and show a log of the detected changes.\n

\n
\n );\n }\n\n var nodes_array = [];\n var edges_array = [];\n \n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: { background: node.status_color, border: \"black\" },\n level: node.level,\n })\n );\n \n this.props.data.edges.map(edge => \n edges_array.push({ from: edge.from, to: edge.to })\n );\n }\n \n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n\n\n const options = {\n edges: {\n arrows: {\n to: { enabled: true }\n }\n },\n layout: {\n //improvedLayout: true,\n hierarchical: {\n nodeSpacing: 190,\n blockShifting: false,\n edgeMinimization: false,\n parentCentralization: false,\n sortMethod: 'hubsize',\n direction: 'UD',\n }\n }, \n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true,\n },\n physics: {\n enabled: false,\n },\n nodes: {\n shape: 'dot',\n font: {\n size: 10,\n },\n }\n };\n \n const graph = {\n nodes : nodes,\n edges : edges,\n };\n\n class VisNetwork extends Component {\n \n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true;\n } else {\n return false;\n }\n }\n \n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", (params) => {\n //console.log(params);\n if (params.nodes){\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n \n });\n }\n \n // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n \n render() { \n return (\n
\n
\n
\n );\n }\n }\n\n this.updateVisNodes(nodes);\n \n return ;\n\n }\n\n\n \n\n \n\n \n \n\n \n\n}\n\nconst experimentStyle = {\n height: 600\n };\n\nexport default GraphNativeRep;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/44c1028b23cdbdbaaaa6b00cafab4822.json b/node_modules/.cache/babel-loader/44c1028b23cdbdbaaaa6b00cafab4822.json new file mode 100644 index 0000000000000000000000000000000000000000..5182d38998b9bf688b183f9add7b9d2cd34b52a5 --- /dev/null +++ b/node_modules/.cache/babel-loader/44c1028b23cdbdbaaaa6b00cafab4822.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js\";\nimport React, { Component } from \"react\"; // import vis from \"vis-network\";\n\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis-network\";\n\nclass GraphNativeRep extends Component {\n constructor(...args) {\n super(...args);\n\n this.updateVisNodes = nodes => {\n this.props.setVisData(nodes);\n };\n }\n\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else if (nextProps.data && this.props.data && nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp) {\n console.log(\"Rerendering\");\n return true;\n } else if (nextProps.loadingGraph !== this.props.loadingGraph) {\n return true;\n } else {\n return false;\n }\n }\n\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n render() {\n if (this.props.loadingGraph) return React.createElement(Spinner, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 32\n },\n __self: this\n });\n\n if (this.props.data == null) {\n return React.createElement(\"div\", {\n className: \"card-body text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 35\n },\n __self: this\n }, React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Press \", React.createElement(\"span\", {\n className: \"badge badge-info\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Show Graph\"), \" to see the graph representation of the experiment.\"), React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"If the experiment is running, press \", React.createElement(\"span\", {\n className: \"badge badge-dark\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"Start Job Monitor\"), \" to start a live tracker of the changes on the experiment's jobs. This process will automatically update the graph's nodes colors and show a log of the detected changes.\"));\n }\n\n var nodes_array = [];\n var edges_array = [];\n\n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: {\n background: node.status_color,\n border: \"black\"\n },\n level: node.level\n }));\n this.props.data.edges.map(edge => edges_array.push({\n from: edge.from,\n to: edge.to\n }));\n }\n\n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n const options = {\n edges: {\n arrows: {\n to: {\n enabled: true\n }\n }\n },\n layout: {\n improvedLayout: false,\n hierarchical: {\n nodeSpacing: 190,\n blockShifting: false,\n edgeMinimization: false,\n parentCentralization: false,\n sortMethod: 'hubsize',\n direction: 'UD' // work on vis current version\n // nodeSpacing: 190,\n // blockShifting: false,\n // edgeMinimization: false,\n // parentCentralization: true,\n // sortMethod: 'hubsize',\n // direction: 'UD',\n\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true\n },\n physics: {\n enabled: false\n },\n nodes: {\n shape: 'dot',\n font: {\n size: 10\n }\n }\n };\n const graph = {\n nodes: nodes,\n edges: edges\n };\n\n class VisNetwork extends Component {\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else {\n return false;\n }\n }\n\n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", params => {\n //console.log(params);\n if (params.nodes) {\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n });\n } // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n\n\n render() {\n return React.createElement(\"div\", {\n className: \"card-body p-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 140\n },\n __self: this\n }, React.createElement(\"div\", {\n ref: \"myRef\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 141\n },\n __self: this\n }));\n }\n\n }\n\n this.updateVisNodes(nodes);\n return React.createElement(VisNetwork, {\n graph: graph,\n options: options,\n updateSelection: this.props.updateSelection,\n shouldUpdateGraph: this.props.shouldUpdateGraph,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 149\n },\n __self: this\n });\n }\n\n}\n\nconst experimentStyle = {\n height: 600\n};\nexport default GraphNativeRep;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js"],"names":["React","Component","Spinner","vis","GraphNativeRep","updateVisNodes","nodes","props","setVisData","shouldComponentUpdate","nextProps","nextState","shouldUpdateGraph","data","pkl_timestamp","console","log","loadingGraph","componentWillUnmount","cleanGraphData","render","nodes_array","edges_array","edges","map","node","push","id","label","color","background","status_color","border","level","edge","from","to","DataSet","options","arrows","enabled","layout","improvedLayout","hierarchical","nodeSpacing","blockShifting","edgeMinimization","parentCentralization","sortMethod","direction","interaction","dragNodes","hoverConnectedEdges","navigationButtons","physics","shape","font","size","graph","VisNetwork","componentDidMount","network","Network","refs","myRef","on","params","updateSelection","experimentStyle","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,SAAhB,QAAiC,OAAjC,C,CACA;;AACA,OAAOC,OAAP,MAAoB,mBAApB;AACA,OAAOC,GAAP,MAAgB,aAAhB;;AAEA,MAAMC,cAAN,SAA6BH,SAA7B,CAAuC;AAAA;AAAA;;AAAA,SAmBnCI,cAnBmC,GAmBjBC,KAAD,IAAW;AACxB,WAAKC,KAAL,CAAWC,UAAX,CAAsBF,KAAtB;AACH,KArBkC;AAAA;;AAEnCG,EAAAA,qBAAqB,CAACC,SAAD,EAAYC,SAAZ,EAAsB;AACvC,QAAI,KAAKJ,KAAL,CAAWK,iBAAX,KAAiC,IAArC,EAA0C;AACtC,aAAO,IAAP;AACD,KAFH,MAEQ,IAAIF,SAAS,CAACG,IAAV,IAAkB,KAAKN,KAAL,CAAWM,IAA7B,IAAsCH,SAAS,CAACG,IAAV,CAAeC,aAAf,KAAiC,KAAKP,KAAL,CAAWM,IAAX,CAAgBC,aAA3F,EAA0G;AAC9GC,MAAAA,OAAO,CAACC,GAAR,CAAY,aAAZ;AACA,aAAO,IAAP;AACD,KAHK,MAGA,IAAIN,SAAS,CAACO,YAAV,KAA2B,KAAKV,KAAL,CAAWU,YAA1C,EAAuD;AAC3D,aAAO,IAAP;AACD,KAFK,MAED;AACH,aAAO,KAAP;AACD;AACN;;AACDC,EAAAA,oBAAoB,GAAG;AACnBH,IAAAA,OAAO,CAACC,GAAR,CAAY,YAAZ;AACA,SAAKT,KAAL,CAAWY,cAAX;AACH;;AAQDC,EAAAA,MAAM,GAAI;AACN,QAAI,KAAKb,KAAL,CAAWU,YAAf,EAA6B,OAAO,oBAAC,OAAD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAAP;;AAC7B,QAA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";\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis-network\";\n\nclass GraphNativeRep extends Component {\n\n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true\n }else if (nextProps.data && this.props.data && (nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp)){\n console.log(\"Rerendering\")\n return true;\n }else if (nextProps.loadingGraph !== this.props.loadingGraph){\n return true; \n }else{\n return false;\n }\n }\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n updateVisNodes = (nodes) => {\n this.props.setVisData(nodes);\n }\n\n\n\n render () {\n if (this.props.loadingGraph) return ;\n if (this.props.data == null){\n return (\n
\n

Press Show Graph to see the graph representation of the experiment.

\n

If the experiment is running, press Start Job Monitor to start a live tracker of the changes on the experiment's jobs.\n This process will automatically update the graph's nodes colors and show a log of the detected changes.\n

\n
\n );\n }\n\n var nodes_array = [];\n var edges_array = [];\n \n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: { background: node.status_color, border: \"black\" },\n level: node.level,\n })\n );\n \n this.props.data.edges.map(edge => \n edges_array.push({ from: edge.from, to: edge.to })\n );\n }\n \n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n\n\n const options = {\n edges: {\n arrows: {\n to: { enabled: true }\n }\n },\n layout: {\n improvedLayout: false,\n hierarchical: {\n nodeSpacing: 190, \n blockShifting: false,\n edgeMinimization: false,\n parentCentralization: false,\n sortMethod: 'hubsize',\n direction: 'UD',\n // work on vis current version\n // nodeSpacing: 190,\n // blockShifting: false,\n // edgeMinimization: false,\n // parentCentralization: true,\n // sortMethod: 'hubsize',\n // direction: 'UD',\n }\n }, \n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true,\n },\n physics: {\n enabled: false,\n },\n nodes: {\n shape: 'dot',\n font: {\n size: 10,\n },\n }\n };\n \n const graph = {\n nodes : nodes,\n edges : edges,\n };\n\n class VisNetwork extends Component {\n \n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true;\n } else {\n return false;\n }\n }\n \n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", (params) => {\n //console.log(params);\n if (params.nodes){\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n \n });\n }\n \n // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n \n render() { \n return (\n
\n
\n
\n );\n }\n }\n\n this.updateVisNodes(nodes);\n \n return ;\n\n }\n\n\n \n\n \n\n \n \n\n \n\n}\n\nconst experimentStyle = {\n height: 600\n };\n\nexport default GraphNativeRep;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/45527d4db4fe4c8ab697da4c03cacc41.json b/node_modules/.cache/babel-loader/45527d4db4fe4c8ab697da4c03cacc41.json new file mode 100644 index 0000000000000000000000000000000000000000..d33abcc5db899dd0b8791d28bceaceb25ac1f03d --- /dev/null +++ b/node_modules/.cache/babel-loader/45527d4db4fe4c8ab697da4c03cacc41.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js\";\nimport React, { Component } from \"react\"; // import vis from \"vis-network\";\n\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n constructor(...args) {\n super(...args);\n\n this.updateVisNodes = nodes => {\n this.props.setVisData(nodes);\n };\n }\n\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else if (nextProps.data && this.props.data && nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp) {\n console.log(\"Rerendering\");\n return true;\n } else if (nextProps.loadingGraph !== this.props.loadingGraph) {\n return true;\n } else {\n return false;\n }\n }\n\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n render() {\n if (this.props.loadingGraph) return React.createElement(Spinner, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 32\n },\n __self: this\n });\n\n if (this.props.data == null) {\n return React.createElement(\"div\", {\n className: \"card-body text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 35\n },\n __self: this\n }, React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Press \", React.createElement(\"span\", {\n className: \"badge badge-info\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Show Graph\"), \" to see the graph representation of the experiment.\"), React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"If the experiment is running, press \", React.createElement(\"span\", {\n className: \"badge badge-dark\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"Start Job Monitor\"), \" to start a live tracker of the changes on the experiment's jobs. This process will automatically update the graph's nodes colors and show a log of the detected changes.\"));\n }\n\n var nodes_array = [];\n var edges_array = [];\n\n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: {\n background: node.status_color,\n border: \"black\"\n },\n level: node.level\n }));\n this.props.data.edges.map(edge => edges_array.push({\n from: edge.from,\n to: edge.to\n }));\n }\n\n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n const options = {\n edges: {\n arrows: {\n to: {\n enabled: true\n }\n }\n },\n layout: {\n improvedLayout: true,\n hierarchical: {\n nodeSpacing: 150,\n blockShifting: true,\n edgeMinimization: true,\n //parentCentralization: true,\n sortMethod: 'hubsize',\n direction: 'UD'\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true\n },\n physics: {\n enabled: false\n },\n nodes: {\n shape: 'dot'\n }\n };\n const graph = {\n nodes: nodes,\n edges: edges\n };\n\n class VisNetwork extends Component {\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else {\n return false;\n }\n }\n\n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", params => {\n //console.log(params);\n if (params.nodes) {\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n });\n } // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n\n\n render() {\n return React.createElement(\"div\", {\n className: \"card-body p-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 130\n },\n __self: this\n }, React.createElement(\"div\", {\n ref: \"myRef\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 131\n },\n __self: this\n }));\n }\n\n }\n\n this.updateVisNodes(nodes);\n return React.createElement(VisNetwork, {\n graph: graph,\n options: options,\n updateSelection: this.props.updateSelection,\n shouldUpdateGraph: this.props.shouldUpdateGraph,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 139\n },\n __self: this\n });\n }\n\n}\n\nconst experimentStyle = {\n height: 600\n};\nexport default GraphNativeRep;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js"],"names":["React","Component","Spinner","vis","GraphNativeRep","updateVisNodes","nodes","props","setVisData","shouldComponentUpdate","nextProps","nextState","shouldUpdateGraph","data","pkl_timestamp","console","log","loadingGraph","componentWillUnmount","cleanGraphData","render","nodes_array","edges_array","edges","map","node","push","id","label","color","background","status_color","border","level","edge","from","to","DataSet","options","arrows","enabled","layout","improvedLayout","hierarchical","nodeSpacing","blockShifting","edgeMinimization","sortMethod","direction","interaction","dragNodes","hoverConnectedEdges","navigationButtons","physics","shape","graph","VisNetwork","componentDidMount","network","Network","refs","myRef","on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AAL,CAAWgD,KAA5C,EAAmD,KAAKhD,KAAL,CAAW+B,OAA9D,CAAd;AACAoB,QAAAA,OAAO,CAACI,EAAR,CAAW,OAAX,EAAqBC,MAAD,IAAY;AAC5B;AACA,cAAIA,MAAM,CAACzD,KAAX,EAAiB;AACb;AACA,iBAAKC,KAAL,CAAWyD,eAAX,CAA2BD,MAAM,CAACzD,KAAlC;AACH;AAEJ,SAPD;AAQH,OApB8B,CAsB/B;AACA;AACA;AACA;;;AAEAc,MAAAA,MAAM,GAAG;AACL,eACI;AAAK,UAAA,SAAS,EAAC,eAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,WACI;AAAK,UAAA,GAAG,EAAC,OAAT;AAAiB,UAAA,KAAK,EAAE6C,eAAxB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,UADJ,CADJ;AAKH;;AAjC8B;;AAoCnC,SAAK5D,cAAL,CAAoBC,KAApB;AAEA,WAAO,oBAAC,UAAD;AACH,MAAA,KAAK,EAAEiD,KADJ;AAEH,MAAA,OAAO,EAAEjB,OAFN;AAGH,MAAA,eAAe,EAAE,KAAK/B,KAAL,CAAWyD,eAHzB;AAIH,MAAA,iBAAiB,EAAE,KAAKzD,KAAL,CAAWK,iBAJ3B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAAP;AAOH;;AA5IkC;;AA0JvC,MAAMqD,eAAe,GAAG;AACpBC,EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,eAAe9D,cAAf","sourcesContent":["import React, { Component } from \"react\";\n// import vis from \"vis-network\";\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n\n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true\n }else if (nextProps.data && this.props.data && (nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp)){\n console.log(\"Rerendering\")\n return true;\n }else if (nextProps.loadingGraph !== this.props.loadingGraph){\n return true; \n }else{\n return false;\n }\n }\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n updateVisNodes = (nodes) => {\n this.props.setVisData(nodes);\n }\n\n\n\n render () {\n if (this.props.loadingGraph) return ;\n if (this.props.data == null){\n return (\n
\n

Press Show Graph to see the graph representation of the experiment.

\n

If the experiment is running, press Start Job Monitor to start a live tracker of the changes on the experiment's jobs.\n This process will automatically update the graph's nodes colors and show a log of the detected changes.\n

\n
\n );\n }\n\n var nodes_array = [];\n var edges_array = [];\n \n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: { background: node.status_color, border: \"black\" },\n level: node.level,\n })\n );\n \n this.props.data.edges.map(edge => \n edges_array.push({ from: edge.from, to: edge.to })\n );\n }\n \n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n\n\n const options = {\n edges: {\n arrows: {\n to: { enabled: true }\n }\n },\n layout: {\n improvedLayout: true,\n hierarchical: {\n nodeSpacing: 150,\n blockShifting: true,\n edgeMinimization: true,\n //parentCentralization: true,\n sortMethod: 'hubsize',\n direction: 'UD',\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true,\n },\n physics: {\n enabled: false,\n },\n nodes: {\n shape: 'dot',\n }\n };\n \n const graph = {\n nodes : nodes,\n edges : edges,\n };\n\n class VisNetwork extends Component {\n \n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true;\n } else {\n return false;\n }\n }\n \n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", (params) => {\n //console.log(params);\n if (params.nodes){\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n \n });\n }\n \n // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n \n render() { \n return (\n
\n
\n
\n );\n }\n }\n\n this.updateVisNodes(nodes);\n \n return ;\n\n }\n\n\n \n\n \n\n \n \n\n \n\n}\n\nconst experimentStyle = {\n height: 600\n };\n\nexport default GraphNativeRep;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/4cd4802ef2831ec32a9e7af36144bda4.json b/node_modules/.cache/babel-loader/4cd4802ef2831ec32a9e7af36144bda4.json new file mode 100644 index 0000000000000000000000000000000000000000..3e32a34ac53f241a440c12e8b7d717f786dbdc35 --- /dev/null +++ b/node_modules/.cache/babel-loader/4cd4802ef2831ec32a9e7af36144bda4.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js\";\nimport React, { Component } from \"react\"; // import vis from \"vis-network\";\n\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n constructor(...args) {\n super(...args);\n\n this.updateVisNodes = nodes => {\n this.props.setVisData(nodes);\n };\n }\n\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else if (nextProps.data && this.props.data && nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp) {\n console.log(\"Rerendering\");\n return true;\n } else if (nextProps.loadingGraph !== this.props.loadingGraph) {\n return true;\n } else {\n return false;\n }\n }\n\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n render() {\n if (this.props.loadingGraph) return React.createElement(Spinner, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 32\n },\n __self: this\n });\n\n if (this.props.data == null) {\n return React.createElement(\"div\", {\n className: \"card-body text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 35\n },\n __self: this\n }, React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Press \", React.createElement(\"span\", {\n className: \"badge badge-info\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Show Graph\"), \" to see the graph representation of the experiment.\"), React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"If the experiment is running, press \", React.createElement(\"span\", {\n className: \"badge badge-dark\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"Start Job Monitor\"), \" to start a live tracker of the changes on the experiment's jobs. This process will automatically update the graph's nodes colors and show a log of the detected changes.\"));\n }\n\n var nodes_array = [];\n var edges_array = [];\n\n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: {\n background: node.status_color,\n border: \"black\"\n },\n level: node.level\n }));\n this.props.data.edges.map(edge => edges_array.push({\n from: edge.from,\n to: edge.to\n }));\n }\n\n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n const options = {\n edges: {\n arrows: {\n to: {\n enabled: true\n }\n }\n },\n layout: {\n improvedLayout: false,\n hierarchical: {\n nodeSpacing: 170,\n blockShifting: true,\n edgeMinimization: true,\n //parentCentralization: true,\n sortMethod: 'hubsize',\n direction: 'UD'\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true\n },\n physics: {\n enabled: false\n },\n nodes: {\n shape: 'dot',\n font: {\n size: 10\n }\n }\n };\n const graph = {\n nodes: nodes,\n edges: edges\n };\n\n class VisNetwork extends Component {\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else {\n return false;\n }\n }\n\n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", params => {\n //console.log(params);\n if (params.nodes) {\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n });\n } // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n\n\n render() {\n return React.createElement(\"div\", {\n className: \"card-body p-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 133\n },\n __self: this\n }, React.createElement(\"div\", {\n ref: \"myRef\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 134\n },\n __self: this\n }));\n }\n\n }\n\n this.updateVisNodes(nodes);\n return React.createElement(VisNetwork, {\n graph: graph,\n options: options,\n updateSelection: this.props.updateSelection,\n shouldUpdateGraph: this.props.shouldUpdateGraph,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 142\n },\n __self: this\n });\n }\n\n}\n\nconst experimentStyle = {\n height: 600\n};\nexport default GraphNativeRep;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js"],"names":["React","Component","Spinner","vis","GraphNativeRep","updateVisNodes","nodes","props","setVisData","shouldComponentUpdate","nextProps","nextState","shouldUpdateGraph","data","pkl_timestamp","console","log","loadingGraph","componentWillUnmount","cleanGraphData","render","nodes_array","edges_array","edges","map","node","push","id","label","color","background","status_color","border","level","edge","from","to","DataSet","options","arrows","enabled","layout","improvedLayout","hierarchical","nodeSpacing","blockShifting","edgeMinimization","sortMethod","direction","interaction","dragNodes","hoverConnectedEdges","navigationButtons","physics","shape","font","size","graph","VisNetwork","componentDidMount","network","Network","refs","myRef","on","params","updateSelection","experimentStyle","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,SAAhB,QAAiC,OAAjC,C,CACA;;AACA,OAAOC,OAAP,MAAoB,mBAApB;AACA,OAAOC,GAAP,MAAgB,KAAhB;;AAEA,MAAMC,cAAN,SAA6BH,SAA7B,CAAuC;AAAA;AAAA;;AAAA,SAmBnCI,cAnBmC,GAmBjBC,KAAD,IAAW;AACxB,WAAKC,KAAL,CAAWC,UAAX,CAAsBF,KAAtB;AACH,KArBkC;AAAA;;AAEnCG,EAAAA,qBAAqB,CAACC,SAAD,EAAYC,SAAZ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AAAA,MAAM,GAAG;AACL,eACI;AAAK,UAAA,SAAS,EAAC,eAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,WACI;AAAK,UAAA,GAAG,EAAC,OAAT;AAAiB,UAAA,KAAK,EAAE+C,eAAxB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,UADJ,CADJ;AAKH;;AAjC8B;;AAoCnC,SAAK9D,cAAL,CAAoBC,KAApB;AAEA,WAAO,oBAAC,UAAD;AACH,MAAA,KAAK,EAAEmD,KADJ;AAEH,MAAA,OAAO,EAAEnB,OAFN;AAGH,MAAA,eAAe,EAAE,KAAK/B,KAAL,CAAW2D,eAHzB;AAIH,MAAA,iBAAiB,EAAE,KAAK3D,KAAL,CAAWK,iBAJ3B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAAP;AAOH;;AA/IkC;;AA6JvC,MAAMuD,eAAe,GAAG;AACpBC,EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,eAAehE,cAAf","sourcesContent":["import React, { Component } from \"react\";\n// import vis from \"vis-network\";\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n\n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true\n }else if (nextProps.data && this.props.data && (nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp)){\n console.log(\"Rerendering\")\n return true;\n }else if (nextProps.loadingGraph !== this.props.loadingGraph){\n return true; \n }else{\n return false;\n }\n }\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n updateVisNodes = (nodes) => {\n this.props.setVisData(nodes);\n }\n\n\n\n render () {\n if (this.props.loadingGraph) return ;\n if (this.props.data == null){\n return (\n
\n

Press Show Graph to see the graph representation of the experiment.

\n

If the experiment is running, press Start Job Monitor to start a live tracker of the changes on the experiment's jobs.\n This process will automatically update the graph's nodes colors and show a log of the detected changes.\n

\n
\n );\n }\n\n var nodes_array = [];\n var edges_array = [];\n \n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: { background: node.status_color, border: \"black\" },\n level: node.level,\n })\n );\n \n this.props.data.edges.map(edge => \n edges_array.push({ from: edge.from, to: edge.to })\n );\n }\n \n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n\n\n const options = {\n edges: {\n arrows: {\n to: { enabled: true }\n }\n },\n layout: {\n improvedLayout: false,\n hierarchical: {\n nodeSpacing: 170,\n blockShifting: true,\n edgeMinimization: true,\n //parentCentralization: true,\n sortMethod: 'hubsize',\n direction: 'UD',\n }\n }, \n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true,\n },\n physics: {\n enabled: false,\n },\n nodes: {\n shape: 'dot',\n font: {\n size: 10,\n },\n }\n };\n \n const graph = {\n nodes : nodes,\n edges : edges,\n };\n\n class VisNetwork extends Component {\n \n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true;\n } else {\n return false;\n }\n }\n \n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", (params) => {\n //console.log(params);\n if (params.nodes){\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n \n });\n }\n \n // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n \n render() { \n return (\n
\n
\n
\n );\n }\n }\n\n this.updateVisNodes(nodes);\n \n return ;\n\n }\n\n\n \n\n \n\n \n \n\n \n\n}\n\nconst experimentStyle = {\n height: 600\n };\n\nexport default GraphNativeRep;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/4e9b842208e0b7fc407fdd3cdcb08075.json b/node_modules/.cache/babel-loader/4e9b842208e0b7fc407fdd3cdcb08075.json new file mode 100644 index 0000000000000000000000000000000000000000..8996c241b21ffda7c83328dc253ae03d29460fd4 --- /dev/null +++ b/node_modules/.cache/babel-loader/4e9b842208e0b7fc407fdd3cdcb08075.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js\";\nimport React, { Component } from \"react\"; // import vis from \"vis-network\";\n\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n constructor(...args) {\n super(...args);\n\n this.updateVisNodes = nodes => {\n this.props.setVisData(nodes);\n };\n }\n\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else if (nextProps.data && this.props.data && nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp) {\n console.log(\"Rerendering\");\n return true;\n } else if (nextProps.loadingGraph !== this.props.loadingGraph) {\n return true;\n } else {\n return false;\n }\n }\n\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n render() {\n if (this.props.loadingGraph) return React.createElement(Spinner, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 32\n },\n __self: this\n });\n\n if (this.props.data == null) {\n return React.createElement(\"div\", {\n className: \"card-body text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 35\n },\n __self: this\n }, React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Press \", React.createElement(\"span\", {\n className: \"badge badge-info\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Show Graph\"), \" to see the graph representation of the experiment.\"), React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"If the experiment is running, press \", React.createElement(\"span\", {\n className: \"badge badge-dark\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"Start Job Monitor\"), \" to start a live tracker of the changes on the experiment's jobs. This process will automatically update the graph's nodes colors and show a log of the detected changes.\"));\n }\n\n var nodes_array = [];\n var edges_array = [];\n\n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: {\n background: node.status_color,\n border: \"black\"\n },\n level: node.level\n }));\n this.props.data.edges.map(edge => edges_array.push({\n from: edge.from,\n to: edge.to\n }));\n }\n\n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n const options = {\n edges: {\n arrows: {\n to: {\n enabled: true\n }\n }\n },\n layout: {\n improvedLayout: false,\n hierarchical: {\n //nodeSpacing: 150,\n blockShifting: true,\n edgeMinimization: true,\n //parentCentralization: true,\n sortMethod: 'hubsize',\n direction: 'UD'\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true\n },\n physics: {\n enabled: false\n },\n nodes: {\n shape: 'dot',\n font: {\n size: 8\n }\n }\n };\n const graph = {\n nodes: nodes,\n edges: edges\n };\n\n class VisNetwork extends Component {\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else {\n return false;\n }\n }\n\n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", params => {\n //console.log(params);\n if (params.nodes) {\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n });\n } // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n\n\n render() {\n return React.createElement(\"div\", {\n className: \"card-body p-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 133\n },\n __self: this\n }, React.createElement(\"div\", {\n ref: \"myRef\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 134\n },\n __self: this\n }));\n }\n\n }\n\n this.updateVisNodes(nodes);\n return React.createElement(VisNetwork, {\n graph: graph,\n options: options,\n updateSelection: this.props.updateSelection,\n shouldUpdateGraph: this.props.shouldUpdateGraph,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 142\n },\n __self: this\n });\n }\n\n}\n\nconst experimentStyle = {\n height: 600\n};\nexport default GraphNativeRep;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js"],"names":["React","Component","Spinner","vis","GraphNativeRep","updateVisNodes","nodes","props","setVisData","shouldComponentUpdate","nextProps","nextState","shouldUpdateGraph","data","pkl_timestamp","console","log","loadingGraph","componentWillUnmount","cleanGraphData","render","nodes_array","edges_array","edges","map","node","push","id","label","color","background","status_color","border","level","edge","from","to","DataSet","options","arrows","enabled","layout","improvedLayout","hierarchical","blockShifting","edgeMinimization","sortMethod","direction","interaction","dragNodes","hoverConnectedEdges","navigationButtons","physics","shape","font","size","graph","VisNetwork","componentDidMount","network","Network","refs","myRef","on","params","updateSelection","experimentStyle","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,SAAhB,QAAiC,OAAjC,C,CACA;;AACA,OAAOC,OAAP,MAAoB,mBAApB;AACA,OAAOC,GAAP,MAAgB,KAAhB;;AAEA,MAAMC,cAAN,SAA6BH,SAA7B,CAAuC;AAAA;AAAA;;AAAA,SAmBnCI,cAnBmC,GAmBjBC,KAAD,IAAW;AACxB,WAAKC,KAAL,CAAWC,UAAX,CAAsBF,KAAtB;AACH,KArBkC;AAAA;;AAEnCG,EAAAA,qBAAqB,CAACC,SAAD,EAAYC,SAAZ,EAAsB;AACvC,QAAI,KAAKJ,KAAL,CAAWK,iBAAX,KAAiC,IAArC,EAA0C;AACtC,aAAO,IAAP;AACD,KAFH,MAEQ,IAAIF,SAAS,CAACG,IAAV,IAAkB,KAAKN,KAAL,CAAWM,IAA7B,IAAsCH,SAAS,CAACG,IAAV,CAAeC,aAAf,KAAiC,KAAKP,KAAL,CAAWM,IAAX,CAAgBC,aAA3F,EAA0G;AAC9GC,MAAAA,OAAO,CAACC,GAAR,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;AAEH,MAAA,OAAO,EAAElB,OAFN;AAGH,MAAA,eAAe,EAAE,KAAK/B,KAAL,CAAW0D,eAHzB;AAIH,MAAA,iBAAiB,EAAE,KAAK1D,KAAL,CAAWK,iBAJ3B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAAP;AAOH;;AA/IkC;;AA6JvC,MAAMsD,eAAe,GAAG;AACpBC,EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,eAAe/D,cAAf","sourcesContent":["import React, { Component } from \"react\";\n// import vis from \"vis-network\";\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n\n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true\n }else if (nextProps.data && this.props.data && (nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp)){\n console.log(\"Rerendering\")\n return true;\n }else if (nextProps.loadingGraph !== this.props.loadingGraph){\n return true; \n }else{\n return false;\n }\n }\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n updateVisNodes = (nodes) => {\n this.props.setVisData(nodes);\n }\n\n\n\n render () {\n if (this.props.loadingGraph) return ;\n if (this.props.data == null){\n return (\n
\n

Press Show Graph to see the graph representation of the experiment.

\n

If the experiment is running, press Start Job Monitor to start a live tracker of the changes on the experiment's jobs.\n This process will automatically update the graph's nodes colors and show a log of the detected changes.\n

\n
\n );\n }\n\n var nodes_array = [];\n var edges_array = [];\n \n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: { background: node.status_color, border: \"black\" },\n level: node.level,\n })\n );\n \n this.props.data.edges.map(edge => \n edges_array.push({ from: edge.from, to: edge.to })\n );\n }\n \n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n\n\n const options = {\n edges: {\n arrows: {\n to: { enabled: true }\n }\n },\n layout: {\n improvedLayout: false,\n hierarchical: {\n //nodeSpacing: 150,\n blockShifting: true,\n edgeMinimization: true,\n //parentCentralization: true,\n sortMethod: 'hubsize',\n direction: 'UD',\n }\n }, \n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true,\n },\n physics: {\n enabled: false,\n },\n nodes: {\n shape: 'dot',\n font: {\n size: 8,\n },\n }\n };\n \n const graph = {\n nodes : nodes,\n edges : edges,\n };\n\n class VisNetwork extends Component {\n \n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true;\n } else {\n return false;\n }\n }\n \n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", (params) => {\n //console.log(params);\n if (params.nodes){\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n \n });\n }\n \n // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n \n render() { \n return (\n
\n
\n
\n );\n }\n }\n\n this.updateVisNodes(nodes);\n \n return ;\n\n }\n\n\n \n\n \n\n \n \n\n \n\n}\n\nconst experimentStyle = {\n height: 600\n };\n\nexport default GraphNativeRep;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/4f1f229897ab183e0635f5b142a9124d.json b/node_modules/.cache/babel-loader/4f1f229897ab183e0635f5b142a9124d.json new file mode 100644 index 0000000000000000000000000000000000000000..02d9337c6b29858f73ba1f47f9d06fbc98d54c80 --- /dev/null +++ b/node_modules/.cache/babel-loader/4f1f229897ab183e0635f5b142a9124d.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js\";\nimport React, { useContext, Component } from \"react\"; // import vis from \"vis-network\";\n\nimport Spinner from \"../layout/Spinner\";\nimport ExperimentContext from '../context/experiment/experimentContext';\nimport vis from \"vis\";\n\nconst GraphNativeRep = () => {\n const experimentContext = useContext(ExperimentContext);\n const data = experimentContext.data,\n loadingGraph = experimentContext.loadingGraph;\n if (loadingGraph) return React.createElement(Spinner, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 11\n },\n __self: this\n });\n\n if (data === null) {\n return React.createElement(\"div\", {\n className: \"card-body text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 14\n },\n __self: this\n }, React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 15\n },\n __self: this\n }, \"Press \", React.createElement(\"span\", {\n className: \"badge badge-info\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 15\n },\n __self: this\n }, \"Show Graph\"), \" to see the graph representation of the experiment.\"), React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 16\n },\n __self: this\n }, \"If the experiment is running, press \", React.createElement(\"span\", {\n className: \"badge badge-dark\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 16\n },\n __self: this\n }, \"Start Job Monitor\"), \" to start a live tracker of the changes on the experiment's jobs. This process will automatically update the graph's nodes colors and show a log of the detected changes.\"));\n }\n\n var nodes_array = [];\n var edges_array = [];\n\n if (data.nodes !== null || data.edges !== null) {\n data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: {\n background: node.status_color,\n border: \"black\"\n } //level: node.priority,\n\n }));\n data.edges.map(edge => edges_array.push({\n from: edge.from,\n to: edge.to\n }));\n }\n\n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n const options = {\n edges: {\n arrows: {\n to: {\n enabled: true\n }\n }\n },\n layout: {\n improvedLayout: true,\n hierarchical: {\n nodeSpacing: 250,\n edgeMinimization: false,\n blockShifting: false,\n parentCentralization: false,\n direction: 'UD',\n sortMethod: 'directed'\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true\n },\n physics: {\n enabled: false\n },\n nodes: {\n shape: 'dot'\n }\n };\n const graph = {\n nodes: nodes,\n edges: edges\n };\n\n class VisNetwork extends Component {\n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, graph, options);\n }\n\n render() {\n return React.createElement(\"div\", {\n className: \"card-body p-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 89\n },\n __self: this\n }, React.createElement(\"div\", {\n ref: \"myRef\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 90\n },\n __self: this\n }));\n }\n\n }\n\n return React.createElement(VisNetwork, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 96\n },\n __self: this\n });\n};\n\nconst experimentStyle = {\n height: 600\n};\nexport default GraphNativeRep;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js"],"names":["React","useContext","Component","Spinner","ExperimentContext","vis","GraphNativeRep","experimentContext","data","loadingGraph","nodes_array","edges_array","nodes","edges","map","node","push","id","label","color","background","status_color","border","edge","from","to","DataSet","options","arrows","enabled","layout","improvedLayout","hierarchical","nodeSpacing","edgeMinimization","blockShifting","parentCentralization","direction","sortMethod","interaction","dragNodes","hoverConnectedEdges","navigationButtons","physics","shape","graph","VisNetwork","componentDidMount","network","Network","refs","myRef","render","experimentStyle","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,UAAhB,EAA4BC,SAA5B,QAA6C,OAA7C,C,CACA;;AACA,OAAOC,OAAP,MAAoB,mBAApB;AACA,OAAOC,iBAAP,MAA8B,yCAA9B;AACA,OAAOC,GAAP,MAAgB,KAAhB;;AAEA,MAAMC,cAAc,GAAG,MAAM;AAEzB,QAAMC,iBAAiB,GAAGN,UAAU,CAACG,iBAAD,CAApC;AAFyB,QAGjBI,IAHiB,GAGMD,iBAHN,CAGjBC,IAHiB;AAAA,QAGXC,YAHW,GAGMF,iBAHN,CAGXE,YAHW;AAIzB,MAAIA,YAAJ,EAAkB,OAAO,oBAAC,OAAD;AAAA;AAAA;AAA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;AAAK,QAAA,GAAG,EAAC,OAAT;AAAiB,QAAA,KAAK,EAAEC,eAAxB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,QADJ,CADJ;AAKH;;AAZ8B;;AAenC,SAAO,oBAAC,UAAD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAAP;AAEH,CA3FD;;AA6FA,MAAMA,eAAe,GAAG;AACpBC,EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,eAAehD,cAAf","sourcesContent":["import React, { useContext, Component } from \"react\";\n// import vis from \"vis-network\";\nimport Spinner from \"../layout/Spinner\";\nimport ExperimentContext from '../context/experiment/experimentContext';\nimport vis from \"vis\";\n\nconst GraphNativeRep = () => {\n\n const experimentContext = useContext(ExperimentContext); \n const { data, loadingGraph } = experimentContext;\n if (loadingGraph) return \n if (data === null) {\n return (\n
\n

Press Show Graph to see the graph representation of the experiment.

\n

If the experiment is running, press Start Job Monitor to start a live tracker of the changes on the experiment's jobs.\n This process will automatically update the graph's nodes colors and show a log of the detected changes.\n

\n
\n );\n }\n\n var nodes_array = [];\n var edges_array = [];\n\n if (data.nodes !== null || data.edges !== null) {\n data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: { background: node.status_color, border: \"black\" },\n //level: node.priority,\n })\n );\n \n data.edges.map(edge => \n edges_array.push({ from: edge.from, to: edge.to })\n );\n }\n\n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n\n const options = {\n edges: {\n arrows: {\n to: { enabled: true }\n }\n },\n layout: {\n improvedLayout: true,\n hierarchical: {\n \n nodeSpacing: 250,\n edgeMinimization: false,\n blockShifting: false,\n parentCentralization: false,\n direction: 'UD',\n sortMethod: 'directed',\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true,\n },\n physics: {\n enabled: false,\n },\n nodes: {\n shape: 'dot',\n }\n };\n\n const graph = {\n nodes : nodes,\n edges : edges,\n };\n \n\n class VisNetwork extends Component {\n \n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, graph, options);\n }\n\n render() { \n return (\n
\n
\n
\n );\n }\n }\n\n return ;\n\n}\n\nconst experimentStyle = {\n height: 600\n };\n\nexport default GraphNativeRep;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/4f82c8a4d0d4d4b6537dbb0917d39025.json b/node_modules/.cache/babel-loader/4f82c8a4d0d4d4b6537dbb0917d39025.json new file mode 100644 index 0000000000000000000000000000000000000000..d84cd08b44ea41a1dd6cf9e04d3bc57e6b697d40 --- /dev/null +++ b/node_modules/.cache/babel-loader/4f82c8a4d0d4d4b6537dbb0917d39025.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/Selection.js\";\nimport React, { useContext, Fragment } from 'react';\nimport ExperimentContext from '../context/experiment/experimentContext';\n\nconst Selection = () => {\n const experimentContext = useContext(ExperimentContext);\n const selection = experimentContext.selection,\n data = experimentContext.data,\n experiment = experimentContext.experiment; // const { model, branch, hpc } = experiment;\n //var currentSelection = \"Node: \"\n\n var currentNode = \"\";\n var selectedNode = null;\n\n if (selection) {\n //console.log(\"Current selection \" + selection)\n selection.map(node => // currentSelection += node + \", \"\n currentNode = node); //console.log(\"Current node \" + currentNode)\n\n selectedNode = data.nodes.find(node => node.id === currentNode); //console.log(\"Selected node\")\n //console.log(\"Data: \" + selectedNode.id + \" \" + selectedNode.platform_name)\n }\n\n return React.createElement(Fragment, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 23\n },\n __self: this\n }, selectedNode && React.createElement(Fragment, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 25\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 26\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-12\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 27\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"card text-white bg-info\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 28\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"card-header text-center p-0\",\n style: headerCard,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 29\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"mh-100 px-0 mx-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 30\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 31\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 31\n },\n __self: this\n }, selectedNode.id)))), React.createElement(\"div\", {\n className: \"card-body\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 34\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 35\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Date:\"), \" \", selectedNode.date)), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 38\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 39\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-12\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 40\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 41\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 41\n },\n __self: this\n }, \"Section:\"), \" \", selectedNode.section)))), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 45\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 46\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-12\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 47\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 48\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 48\n },\n __self: this\n }, \"Platform:\"), \" \", selectedNode.platform_name && selectedNode.platform_name, \" \", !selectedNode.platform_name && experiment.hpc)))), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 55\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 56\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-6\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 57\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 58\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 58\n },\n __self: this\n }, \"Processors:\"), \" \", selectedNode.processors)), React.createElement(\"div\", {\n className: \"col-6\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 60\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 61\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 61\n },\n __self: this\n }, \"Wallclock:\"), \" \", selectedNode.wallclock)))), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 65\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 66\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-6\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 67\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 68\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 68\n },\n __self: this\n }, \"Level:\"), \" \", selectedNode.level)), React.createElement(\"div\", {\n className: \"col-6\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 70\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 71\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 71\n },\n __self: this\n }, \"Out:\"), \" \", selectedNode.children, \" \", React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 71\n },\n __self: this\n }, \"In:\"), \" \", selectedNode.parents, \" \")))), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 76\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 77\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-8\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 78\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 79\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 79\n },\n __self: this\n }, \"Status:\")), \" \", selectedNode.status), React.createElement(\"div\", {\n className: \"col-4 text-right\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 81\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 82\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 82\n },\n __self: this\n }, \"c:\", data.max_children, \"/p:\", data.max_parents)))))))))), !selectedNode && data && React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 93\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-12\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 94\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"card text-white bg-info\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 95\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"card-header text-center py-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 96\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 97\n },\n __self: this\n }, \"Here goes the Job Id\")), React.createElement(\"div\", {\n className: \"card-body\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 99\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"text-center\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 100\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 101\n },\n __self: this\n }, \"Select a Node to see more information.\")))))));\n};\n\nconst experimentStyle = {\n height: 200\n};\nconst headerCard = {\n height: 30\n};\nexport default Selection;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/Selection.js"],"names":["React","useContext","Fragment","ExperimentContext","Selection","experimentContext","selection","data","experiment","currentNode","selectedNode","map","node","nodes","find","id","experimentStyle","headerCard","date","section","platform_name","hpc","processors","wallclock","level","children","parents","status","max_children","max_parents","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,UAAhB,EAA4BC,QAA5B,QAA4C,OAA5C;AACA,OAAOC,iBAAP,MAA8B,yCAA9B;;AAEA,MAAMC,SAAS,GAAG,MAAM;AACpB,QAAMC,iBAAiB,GAAGJ,UAAU,CAACE,iBAAD,CAApC;AADoB,QAEZG,SAFY,GAEoBD,iBAFpB,CAEZC,SAFY;AAAA,QAEDC,IAFC,GAEoBF,iBAFpB,CAEDE,IAFC;AAAA,QAEKC,UAFL,GAEoBH,iBAFpB,CAEKG,UAFL,EAGpB;AACA;;AACA,MAAIC,WAAW,GAAG,EAAlB;AACA,MAA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,CADH,CADJ,CADL,CAFR,EAqES,CAACnB,YAAD,IAAiBH,IAAjB,IACG;AAAK,IAAA,SAAS,EAAC,KAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACI;AAAK,IAAA,SAAS,EAAC,QAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACI;AAAK,IAAA,SAAS,EAAC,yBAAf;AAAyC,IAAA,KAAK,EAAES,eAAhD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACI;AAAK,IAAA,SAAS,EAAC,8BAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACI;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,4BADJ,CADJ,EAII;AAAK,IAAA,SAAS,EAAC,WAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACI;AAAK,IAAA,SAAS,EAAC,aAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,8CADA,CADJ,CAJJ,CADJ,CADJ,CAtEZ,CADJ;AA2FH,CA7GD;;AA+GA,MAAMA,eAAe,GAAG;AACpBc,EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,MAAMb,UAAU,GAAG;AACfa,EAAAA,MAAM,EAAE;AADO,CAAnB;AAIA,eAAe1B,SAAf","sourcesContent":["import React, { useContext, Fragment } from 'react'\nimport ExperimentContext from '../context/experiment/experimentContext';\n\nconst Selection = () => {\n const experimentContext = useContext(ExperimentContext);\n const { selection, data, experiment } = experimentContext;\n // const { model, branch, hpc } = experiment;\n //var currentSelection = \"Node: \"\n var currentNode = \"\"\n var selectedNode = null\n if (selection) {\n //console.log(\"Current selection \" + selection)\n selection.map(node => (\n // currentSelection += node + \", \"\n currentNode = node\n ));\n //console.log(\"Current node \" + currentNode)\n selectedNode = data.nodes.find(node => node.id === currentNode) \n //console.log(\"Selected node\")\n //console.log(\"Data: \" + selectedNode.id + \" \" + selectedNode.platform_name)\n } \n return (\n \n {selectedNode &&\n \n
\n
\n
\n
\n
\n {selectedNode.id}\n
\n
\n
\n
\n Date: {selectedNode.date}\n
\n
\n
\n
\n Section: {selectedNode.section}\n
\n
\n
\n
\n
\n
\n Platform: {selectedNode.platform_name && selectedNode.platform_name} {!selectedNode.platform_name && experiment.hpc}\n
\n
\n
\n {/*
\n Priority: {selectedNode.priority}\n
*/}\n
\n
\n
\n Processors: {selectedNode.processors}\n
\n
\n Wallclock: {selectedNode.wallclock}\n
\n
\n
\n
\n
\n
\n Level: {selectedNode.level}\n
\n
\n Out: {selectedNode.children} In: {selectedNode.parents} \n
\n \n
\n
\n
\n
\n
\n Status: {selectedNode.status}\n
\n
\n c:{data.max_children}/p:{data.max_parents}\n
\n
\n
\n
\n
\n
\n
\n
\n } \n {!selectedNode && data &&\n
\n
\n
\n
\n Here goes the Job Id\n
\n
\n
\n Select a Node to see more information. \n
\n
\n
\n
\n
\n } \n
\n \n \n\n )\n}\n\nconst experimentStyle = {\n height: 200\n };\n\nconst headerCard = {\n height: 30\n}\n\nexport default Selection;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/520a2b3270705c7d80dbb490c3d74ab7.json b/node_modules/.cache/babel-loader/520a2b3270705c7d80dbb490c3d74ab7.json new file mode 100644 index 0000000000000000000000000000000000000000..3c7f55b64d1215d900e2ce68bdc7055a71348c02 --- /dev/null +++ b/node_modules/.cache/babel-loader/520a2b3270705c7d80dbb490c3d74ab7.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/Selection.js\";\nimport React, { useContext, Fragment } from 'react';\nimport ExperimentContext from '../context/experiment/experimentContext';\n\nconst Selection = () => {\n const experimentContext = useContext(ExperimentContext);\n const selection = experimentContext.selection,\n data = experimentContext.data,\n experiment = experimentContext.experiment; // const { model, branch, hpc } = experiment;\n //var currentSelection = \"Node: \"\n\n var currentNode = \"\";\n var selectedNode = null;\n\n if (selection) {\n //console.log(\"Current selection \" + selection)\n selection.map(node => // currentSelection += node + \", \"\n currentNode = node); //console.log(\"Current node \" + currentNode)\n\n selectedNode = data.nodes.find(node => node.id === currentNode); //console.log(\"Selected node\")\n //console.log(\"Data: \" + selectedNode.id + \" \" + selectedNode.platform_name)\n }\n\n return React.createElement(Fragment, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 23\n },\n __self: this\n }, selectedNode && React.createElement(Fragment, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 25\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 26\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-12\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 27\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"card text-white bg-info\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 28\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"card-header text-center py-0\",\n style: headerCard,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 29\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 30\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 30\n },\n __self: this\n }, selectedNode.id))), React.createElement(\"div\", {\n className: \"card-body py-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 32\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 33\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 34\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 34\n },\n __self: this\n }, \"Date:\"), \" \", selectedNode.date)), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-12\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 38\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 39\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 39\n },\n __self: this\n }, \"Section:\"), \" \", selectedNode.section)))), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 43\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 44\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-8\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 45\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 46\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 46\n },\n __self: this\n }, \"Platform:\"), \" \", selectedNode.platform_name && selectedNode.platform_name, \" \", !selectedNode.platform_name && experiment.hpc)), React.createElement(\"div\", {\n className: \"col-4 text-right\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 48\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 49\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 49\n },\n __self: this\n }, \"c:\", data.max_children, \"/p:\", data.max_parents))))), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 56\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 57\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-6\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 58\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 59\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 59\n },\n __self: this\n }, \"Processors:\"), \" \", selectedNode.processors)), React.createElement(\"div\", {\n className: \"col-6\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 61\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 62\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 62\n },\n __self: this\n }, \"Wallclock:\"), \" \", selectedNode.wallclock)))), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 66\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 67\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-6\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 68\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 69\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 69\n },\n __self: this\n }, \"Level:\"), \" \", selectedNode.level)), React.createElement(\"div\", {\n className: \"col-6\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 71\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 72\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 72\n },\n __self: this\n }, \"Out:\"), \" \", selectedNode.children, \" \", React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 72\n },\n __self: this\n }, \"In:\"), \" \", selectedNode.parents, \" \")))), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 77\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 78\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 78\n },\n __self: this\n }, \"Status:\")), \" \", selectedNode.status)))))), !selectedNode && data && React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 87\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-12\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 88\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"card text-white bg-info\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 89\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"card-header text-center py-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 90\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 91\n },\n __self: this\n }, \"Here goes the Job Id\")), React.createElement(\"div\", {\n className: \"card-body\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 93\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"text-center\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 94\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 95\n },\n __self: this\n }, \"Select a Node to see more information.\")))))));\n};\n\nconst experimentStyle = {\n height: 200\n};\nconst headerCard = {\n height: 30\n};\nexport default Selection;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/Selection.js"],"names":["React","useContext","Fragment","ExperimentContext","Selection","experimentContext","selection","data","experiment","currentNode","selectedNode","map","node","nodes","find","id","experimentStyle","headerCard","date","section","platform_name","hpc","max_children","max_parents","processors","wallclock","level","children","parents","status","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,UAAhB,EAA4BC,QAA5B,QAA4C,OAA5C;AACA,OAAOC,iBAAP,MAA8B,yCAA9B;;AAEA,MAAMC,SAAS,GAAG,MAAM;AACpB,QAAMC,iBAAi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CAJJ,CADH,CADJ,CADL,CAFR,EA+DS,CAACnB,YAAD,IAAiBH,IAAjB,IACG;AAAK,IAAA,SAAS,EAAC,KAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACI;AAAK,IAAA,SAAS,EAAC,QAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACI;AAAK,IAAA,SAAS,EAAC,yBAAf;AAAyC,IAAA,KAAK,EAAES,eAAhD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACI;AAAK,IAAA,SAAS,EAAC,8BAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACI;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,4BADJ,CADJ,EAII;AAAK,IAAA,SAAS,EAAC,WAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACI;AAAK,IAAA,SAAS,EAAC,aAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,8CADA,CADJ,CAJJ,CADJ,CADJ,CAhEZ,CADJ;AAqFH,CAvGD;;AAyGA,MAAMA,eAAe,GAAG;AACpBc,EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,MAAMb,UAAU,GAAG;AACfa,EAAAA,MAAM,EAAE;AADO,CAAnB;AAIA,eAAe1B,SAAf","sourcesContent":["import React, { useContext, Fragment } from 'react'\nimport ExperimentContext from '../context/experiment/experimentContext';\n\nconst Selection = () => {\n const experimentContext = useContext(ExperimentContext);\n const { selection, data, experiment } = experimentContext;\n // const { model, branch, hpc } = experiment;\n //var currentSelection = \"Node: \"\n var currentNode = \"\"\n var selectedNode = null\n if (selection) {\n //console.log(\"Current selection \" + selection)\n selection.map(node => (\n // currentSelection += node + \", \"\n currentNode = node\n ));\n //console.log(\"Current node \" + currentNode)\n selectedNode = data.nodes.find(node => node.id === currentNode) \n //console.log(\"Selected node\")\n //console.log(\"Data: \" + selectedNode.id + \" \" + selectedNode.platform_name)\n } \n return (\n \n {selectedNode &&\n \n
\n
\n
\n
\n {selectedNode.id}\n
\n
\n
\n Date: {selectedNode.date}\n
\n
\n
\n
\n Section: {selectedNode.section}\n
\n
\n
\n
\n
\n
\n Platform: {selectedNode.platform_name && selectedNode.platform_name} {!selectedNode.platform_name && experiment.hpc}\n
\n
\n c:{data.max_children}/p:{data.max_parents}\n
\n
\n
\n {/*
\n Priority: {selectedNode.priority}\n
*/}\n
\n
\n
\n Processors: {selectedNode.processors}\n
\n
\n Wallclock: {selectedNode.wallclock}\n
\n
\n
\n
\n
\n
\n Level: {selectedNode.level}\n
\n
\n Out: {selectedNode.children} In: {selectedNode.parents} \n
\n \n
\n
\n
\n Status: {selectedNode.status}\n
\n
\n
\n
\n
\n
\n } \n {!selectedNode && data &&\n
\n
\n
\n
\n Here goes the Job Id\n
\n
\n
\n Select a Node to see more information. \n
\n
\n
\n
\n
\n } \n
\n \n \n\n )\n}\n\nconst experimentStyle = {\n height: 200\n };\n\nconst headerCard = {\n height: 30\n}\n\nexport default Selection;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/524f71e144a57e26dcf4e41f26d82cb9.json b/node_modules/.cache/babel-loader/524f71e144a57e26dcf4e41f26d82cb9.json new file mode 100644 index 0000000000000000000000000000000000000000..0aad66b72fc608cf3935e9cd1f7a2cecc806a49c --- /dev/null +++ b/node_modules/.cache/babel-loader/524f71e144a57e26dcf4e41f26d82cb9.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js\";\nimport React, { Component } from \"react\"; // import vis from \"vis-network\";\n\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n constructor(...args) {\n super(...args);\n\n this.updateVisNodes = nodes => {\n this.props.setVisData(nodes);\n };\n }\n\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else if (nextProps.data && this.props.data && nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp) {\n console.log(\"Rerendering\");\n return true;\n } else if (nextProps.loadingGraph !== this.props.loadingGraph) {\n return true;\n } else {\n return false;\n }\n }\n\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n render() {\n if (this.props.loadingGraph) return React.createElement(Spinner, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 32\n },\n __self: this\n });\n\n if (this.props.data == null) {\n return React.createElement(\"div\", {\n className: \"card-body text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 35\n },\n __self: this\n }, React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Press \", React.createElement(\"span\", {\n className: \"badge badge-info\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Show Graph\"), \" to see the graph representation of the experiment.\"), React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"If the experiment is running, press \", React.createElement(\"span\", {\n className: \"badge badge-dark\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"Start Job Monitor\"), \" to start a live tracker of the changes on the experiment's jobs. This process will automatically update the graph's nodes colors and show a log of the detected changes.\"));\n }\n\n var nodes_array = [];\n var edges_array = [];\n\n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: {\n background: node.status_color,\n border: \"black\"\n },\n level: node.level\n }));\n this.props.data.edges.map(edge => edges_array.push({\n from: edge.from,\n to: edge.to\n }));\n }\n\n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n const options = {\n edges: {\n arrows: {\n to: {\n enabled: true\n }\n }\n },\n layout: {\n improvedLayout: true,\n hierarchical: {\n nodeSpacing: 250,\n blockShifting: true,\n edgeMinimization: true,\n //parentCentralization: true,\n sortMethod: 'hubsize',\n direction: 'UD'\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true\n },\n physics: {\n enabled: false\n },\n nodes: {\n shape: 'dot'\n }\n };\n const graph = {\n nodes: nodes,\n edges: edges\n };\n\n class VisNetwork extends Component {\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else {\n return false;\n }\n }\n\n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", params => {\n //console.log(params);\n if (params.nodes) {\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n });\n } // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n\n\n render() {\n return React.createElement(\"div\", {\n className: \"card-body p-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 130\n },\n __self: this\n }, React.createElement(\"div\", {\n ref: \"myRef\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 131\n },\n __self: this\n }));\n }\n\n }\n\n this.updateVisNodes(nodes);\n return React.createElement(VisNetwork, {\n graph: graph,\n options: options,\n updateSelection: this.props.updateSelection,\n shouldUpdateGraph: this.props.shouldUpdateGraph,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 139\n },\n __self: this\n });\n }\n\n}\n\nconst experimentStyle = {\n height: 600\n};\nexport default GraphNativeRep;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js"],"names":["React","Component","Spinner","vis","GraphNativeRep","updateVisNodes","nodes","props","setVisData","shouldComponentUpdate","nextProps","nextState","shouldUpdateGraph","data","pkl_timestamp","console","log","loadingGraph","componentWillUnmount","cleanGraphData","render","nodes_array","edges_array","edges","map","node","push","id","label","color","background","status_color","border","level","edge","from","to","DataSet","options","arrows","enabled","layout","improvedLayout","hierarchical","nodeSpacing","blockShifting","edgeMinimization","sortMethod","direction","interaction","dragNodes","hoverConnectedEdges","navigationButtons","physics","shape","graph","VisNetwork","componentDidMount","network","Network","refs","myRef","on","params","updateSelection","experimentStyle","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,SAAhB,QAAiC,OAAjC,C,CACA;;AACA,OAAOC,OAAP,MAAoB,mBAApB;AACA,OAAOC,GAAP,MAAgB,KAAhB;;AAEA,MAAMC,cAAN,SAA6BH,SAA7B,CAAuC;AAAA;AAAA;;AAAA,SAmBnCI,cAnBmC,GAmBjBC,KAAD,IAAW;AACxB,WAAKC,KAAL,CAAWC,UAAX,CAAsBF,KAAtB;AACH,KArBkC;AAAA;;AAEnCG,EAAAA,qBAAqB,CAACC,SAAD,EAAYC,SAAZ,EAAsB;AACvC,QAAI,KAAKJ,KAAL,CAAWK,iBAAX,KAAiC,IAArC,EAA0C;AACtC,aAAO,IAAP;AACD,KAFH,MAEQ,IAAIF,SAAS,CAACG,IAAV,IAAkB,KAAKN,KAAL,CAAWM,IAA7B,IAAsCH,SAAS,CAACG,IAAV,CAAeC,aAAf,KAAiC,KAAKP,KAAL,CAAWM,IAAX,CAAgBC,aAA3F,EAA0G;AAC9GC,MAAAA,OAAO,CAACC,GAAR,CAAY,aAAZ;AACA,aAAO,IAAP;AACD,KAHK,MAGA,IAAIN,SAAS,CAACO,YAAV,KAA2B,KAAKV,KAAL,CAAWU,YAA1C,EAAuD;AAC3D,aAAO,IAAP;AACD,KAFK,MAED;AACH,aAAO,KAAP;AACD;AACN;;AACDC,EAAAA,oBAAoB,GAAG;AACnBH,IAAAA,OAAO,CAACC,GAAR,CAAY,YAAZ;AACA,SAAKT,KAAL,CAAWY,cAAX;AACH;;AAQDC,EAAAA,MAAM,GAAI;AACN,QAAI,KAAKb,KAAL,CAAWU,YAAf,EAA6B,OAAO,oBAAC,OAAD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAAP;;A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;AACJ;;AAED6C,MAAAA,iBAAiB,GAAG;AAChB,YAAIC,OAAO,GAAG,IAAIvD,GAAG,CAACwD,OAAR,CAAgB,KAAKC,IAAL,CAAUC,KAA1B,EAAiC,KAAKtD,KAAL,CAAWgD,KAA5C,EAAmD,KAAKhD,KAAL,CAAW+B,OAA9D,CAAd;AACAoB,QAAAA,OAAO,CAACI,EAAR,CAAW,OAAX,EAAqBC,MAAD,IAAY;AAC5B;AACA,cAAIA,MAAM,CAACzD,KAAX,EAAiB;AACb;AACA,iBAAKC,KAAL,CAAWyD,eAAX,CAA2BD,MAAM,CAACzD,KAAlC;AACH;AAEJ,SAPD;AAQH,OApB8B,CAsB/B;AACA;AACA;AACA;;;AAEAc,MAAAA,MAAM,GAAG;AACL,eACI;AAAK,UAAA,SAAS,EAAC,eAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,WACI;AAAK,UAAA,GAAG,EAAC,OAAT;AAAiB,UAAA,KAAK,EAAE6C,eAAxB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,UADJ,CADJ;AAKH;;AAjC8B;;AAoCnC,SAAK5D,cAAL,CAAoBC,KAApB;AAEA,WAAO,oBAAC,UAAD;AACH,MAAA,KAAK,EAAEiD,KADJ;AAEH,MAAA,OAAO,EAAEjB,OAFN;AAGH,MAAA,eAAe,EAAE,KAAK/B,KAAL,CAAWyD,eAHzB;AAIH,MAAA,iBAAiB,EAAE,KAAKzD,KAAL,CAAWK,iBAJ3B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAAP;AAOH;;AA5IkC;;AA0JvC,MAAMqD,eAAe,GAAG;AACpBC,EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,eAAe9D,cAAf","sourcesContent":["import React, { Component } from \"react\";\n// import vis from \"vis-network\";\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n\n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true\n }else if (nextProps.data && this.props.data && (nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp)){\n console.log(\"Rerendering\")\n return true;\n }else if (nextProps.loadingGraph !== this.props.loadingGraph){\n return true; \n }else{\n return false;\n }\n }\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n updateVisNodes = (nodes) => {\n this.props.setVisData(nodes);\n }\n\n\n\n render () {\n if (this.props.loadingGraph) return ;\n if (this.props.data == null){\n return (\n
\n

Press Show Graph to see the graph representation of the experiment.

\n

If the experiment is running, press Start Job Monitor to start a live tracker of the changes on the experiment's jobs.\n This process will automatically update the graph's nodes colors and show a log of the detected changes.\n

\n
\n );\n }\n\n var nodes_array = [];\n var edges_array = [];\n \n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: { background: node.status_color, border: \"black\" },\n level: node.level,\n })\n );\n \n this.props.data.edges.map(edge => \n edges_array.push({ from: edge.from, to: edge.to })\n );\n }\n \n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n\n\n const options = {\n edges: {\n arrows: {\n to: { enabled: true }\n }\n },\n layout: {\n improvedLayout: true,\n hierarchical: {\n nodeSpacing: 250,\n blockShifting: true,\n edgeMinimization: true,\n //parentCentralization: true,\n sortMethod: 'hubsize',\n direction: 'UD',\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true,\n },\n physics: {\n enabled: false,\n },\n nodes: {\n shape: 'dot',\n }\n };\n \n const graph = {\n nodes : nodes,\n edges : edges,\n };\n\n class VisNetwork extends Component {\n \n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true;\n } else {\n return false;\n }\n }\n \n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", (params) => {\n //console.log(params);\n if (params.nodes){\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n \n });\n }\n \n // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n \n render() { \n return (\n
\n
\n
\n );\n }\n }\n\n this.updateVisNodes(nodes);\n \n return ;\n\n }\n\n\n \n\n \n\n \n \n\n \n\n}\n\nconst experimentStyle = {\n height: 600\n };\n\nexport default GraphNativeRep;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/554c59469e7bdbc3b970da4bf1f33f2a.json b/node_modules/.cache/babel-loader/554c59469e7bdbc3b970da4bf1f33f2a.json new file mode 100644 index 0000000000000000000000000000000000000000..632b504063b47df6044611c191e17e32e0389bac --- /dev/null +++ b/node_modules/.cache/babel-loader/554c59469e7bdbc3b970da4bf1f33f2a.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/JobMonitor.js\";\nimport React, { Component } from 'react';\n\nclass JobMonitor extends Component {\n // const experimentContext = useContext(ExperimentContext);\n // const { pkldata, loadingPkl } = experimentContext;\n componentDidMount() {\n if (this.props.experiment) {\n this.props.getExperimentPkl(this.props.experiment.expid, this.props.experiment.pkl_timestamp);\n\n if (this.props.experiment.running) {\n this.interval = setInterval(() => this.props.getExperimentPkl(this.props.experiment.expid, this.props.experiment.pkl_timestamp), this.props.experiment.updateTime * 2000);\n }\n } // if (this.props.rundata){\n // console.log('DidMount Running.')\n // }\n\n }\n\n componentWillUnmount() {\n this.props.cleanPklData();\n\n if (this.props.experiment.running) {\n clearInterval(this.interval);\n }\n }\n\n render() {\n const _this$props = this.props,\n loadingPkl = _this$props.loadingPkl,\n pklchanges = _this$props.pklchanges; // if (loadingPkl) return
Loading...
\n // const currentDate = new Date();\n // const datetime = currentDate.getHours() + \":\"\n // + currentDate.getMinutes() + \":\"\n // + currentDate.getSeconds();\n // if (pklchanges) { \n // return
{pklchanges}
\n // } \n\n return React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 40\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-12\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 41\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"card\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 42\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"card-header text-center py-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 43\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 44\n },\n __self: this\n }, \"Monitoring jobs...\")), React.createElement(\"div\", {\n className: \"card-body p-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 46\n },\n __self: this\n }, pklchanges && React.createElement(\"textarea\", {\n value: pklchanges,\n className: \"monitorArea\",\n style: monitorStyle,\n readOnly: true,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 49\n },\n __self: this\n }), loadingPkl && React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 57\n },\n __self: this\n }, \"Loading...\")))));\n }\n\n}\n\nconst experimentStyle = {\n height: 400\n};\nconst monitorStyle = {\n height: 375\n};\nexport default JobMonitor;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/JobMonitor.js"],"names":["React","Component","JobMonitor","componentDidMount","props","experiment","getExperimentPkl","expid","pkl_timestamp","running","interval","setInterval","updateTime","componentWillUnmount","cleanPklData","clearInterval","render","loadingPkl","pklchanges","experimentStyle","monitorStyle","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,SAAhB,QAAiC,OAAjC;;AAEA,MAAMC,UAAN,SAAyBD,SAAzB,CAAmC;AAC/B;AACA;AACAE,EAAAA,iBAAiB,GAAE;AACf,QAAI,KAAKC,KAAL,CAAWC,UAAf,EAA2B;AACvB,WAAKD,KAAL,CAAWE,gBAAX,CAA4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D,UAAU,IAEP;AACI,MAAA,KAAK,EAAEA,UADX;AAEI,MAAA,SAAS,EAAC,aAFd;AAGI,MAAA,KAAK,EAAEE,YAHX;AAII,MAAA,QAAQ,MAJZ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAHR,EAUKH,UAAU,IACX;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oBAXJ,CAJJ,CADJ,CADJ,CADJ;AAyBH;;AA7D8B;;AAiEnC,MAAME,eAAe,GAAG;AACpBE,EAAAA,MAAM,EAAE;AADY,CAAxB;AAGA,MAAMD,YAAY,GAAG;AACjBC,EAAAA,MAAM,EAAE;AADS,CAArB;AAIA,eAAenB,UAAf","sourcesContent":["import React, { Component } from 'react';\n\nclass JobMonitor extends Component {\n // const experimentContext = useContext(ExperimentContext);\n // const { pkldata, loadingPkl } = experimentContext;\n componentDidMount(){\n if (this.props.experiment) {\n this.props.getExperimentPkl(this.props.experiment.expid, this.props.experiment.pkl_timestamp);\n if (this.props.experiment.running) {\n this.interval = setInterval(() => this.props.getExperimentPkl(this.props.experiment.expid, this.props.experiment.pkl_timestamp) , this.props.experiment.updateTime * 2000);\n }\n }\n \n \n // if (this.props.rundata){\n // console.log('DidMount Running.')\n // }\n }\n\n componentWillUnmount() {\n this.props.cleanPklData();\n if (this.props.experiment.running) {\n clearInterval(this.interval);\n } \n }\n\n render() {\n const { loadingPkl, pklchanges } = this.props;\n // if (loadingPkl) return
Loading...
\n // const currentDate = new Date();\n // const datetime = currentDate.getHours() + \":\"\n // + currentDate.getMinutes() + \":\"\n // + currentDate.getSeconds();\n\n\n // if (pklchanges) { \n // return
{pklchanges}
\n // } \n return (\n
\n
\n
\n
\n Monitoring jobs...\n
\n
\n {pklchanges && \n\n \n }\n {loadingPkl &&\n Loading...}\n
\n
\n
\n \n
\n );\n }\n \n}\n\nconst experimentStyle = {\n height: 400\n };\nconst monitorStyle = {\n height: 375\n}\n\nexport default JobMonitor\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/555b42178562b2cd3a2d2176b8211402.json b/node_modules/.cache/babel-loader/555b42178562b2cd3a2d2176b8211402.json new file mode 100644 index 0000000000000000000000000000000000000000..491b34f94f0941c3e675cc8508d6dc0f72116328 --- /dev/null +++ b/node_modules/.cache/babel-loader/555b42178562b2cd3a2d2176b8211402.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js\";\nimport React, { useContext, Component } from \"react\"; // import vis from \"vis-network\";\n\nimport Spinner from \"../layout/Spinner\";\nimport ExperimentContext from '../context/experiment/experimentContext';\nimport vis from \"vis\";\n\nconst GraphNativeRep = () => {\n const experimentContext = useContext(ExperimentContext);\n const data = experimentContext.data,\n loadingGraph = experimentContext.loadingGraph;\n if (loadingGraph) return React.createElement(Spinner, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 11\n },\n __self: this\n });\n\n if (data === null) {\n return React.createElement(\"div\", {\n className: \"card-body text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 14\n },\n __self: this\n }, React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 15\n },\n __self: this\n }, \"Press \", React.createElement(\"span\", {\n className: \"badge badge-info\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 15\n },\n __self: this\n }, \"Show Graph\"), \" to see the graph representation of the experiment.\"), React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 16\n },\n __self: this\n }, \"If the experiment is running, press \", React.createElement(\"span\", {\n className: \"badge badge-dark\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 16\n },\n __self: this\n }, \"Start Job Monitor\"), \" to start a live tracker of the changes on the experiment's jobs. This process will automatically update the graph's nodes colors and show a log of the detected changes.\"));\n }\n\n var nodes_array = [];\n var edges_array = [];\n\n if (data.nodes !== null || data.edges !== null) {\n data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: {\n background: node.status_color,\n border: \"black\"\n } //level: node.priority,\n\n }));\n data.edges.map(edge => edges_array.push({\n from: edge.from,\n to: edge.to\n }));\n }\n\n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n const options = {\n edges: {\n arrows: {\n to: {\n enabled: true\n }\n }\n },\n layout: {\n improvedLayout: true,\n hierarchical: {\n nodeSpacing: 250,\n edgeMinimization: false,\n blockShifting: false,\n parentCentralization: false,\n direction: 'UD',\n sortMethod: 'directed'\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true\n },\n physics: {\n enabled: false\n },\n nodes: {\n shape: 'dot'\n }\n };\n const graph = {\n nodes: nodes,\n edges: edges\n };\n\n class VisNetwork extends Component {\n componentDidMount() {\n var network = new vis.Network(this.ref.myRef, graph, options);\n }\n\n render() {\n return React.createElement(\"div\", {\n className: \"card-body p-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 89\n },\n __self: this\n }, React.createElement(\"div\", {\n ref: \"myRef\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 90\n },\n __self: this\n }));\n }\n\n }\n\n return React.createElement(VisNetwork, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 96\n },\n __self: this\n });\n};\n\nconst experimentStyle = {\n height: 600\n};\nexport default GraphNativeRep;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js"],"names":["React","useContext","Component","Spinner","ExperimentContext","vis","GraphNativeRep","experimentContext","data","loadingGraph","nodes_array","edges_array","nodes","edges","map","node","push","id","label","color","background","status_color","border","edge","from","to","DataSet","options","arrows","enabled","layout","improvedLayout","hierarchical","nodeSpacing","edgeMinimization","blockShifting","parentCentralization","direction","sortMethod","interaction","dragNodes","hoverConnectedEdges","navigationButtons","physics","shape","graph","VisNetwork","componentDid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AE;AACLgC,MAAAA,KAAK,EAAE;AADF;AA3BK,GAAhB;AAgCA,QAAMC,KAAK,GAAG;AACVjC,IAAAA,KAAK,EAAGA,KADE;AAEVC,IAAAA,KAAK,EAAGA;AAFE,GAAd;;AAMA,QAAMiC,UAAN,SAAyB5C,SAAzB,CAAmC;AAE/B6C,IAAAA,iBAAiB,GAAG;AAChB,UAAIC,OAAO,GAAG,IAAI3C,GAAG,CAAC4C,OAAR,CAAgB,KAAKC,GAAL,CAASC,KAAzB,EAAgCN,KAAhC,EAAuClB,OAAvC,CAAd;AACH;;AAEDyB,IAAAA,MAAM,GAAG;AACL,aACI;AAAK,QAAA,SAAS,EAAC,eAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,SACI;AAAK,QAAA,GAAG,EAAC,OAAT;AAAiB,QAAA,KAAK,EAAEC,eAAxB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,QADJ,CADJ;AAKH;;AAZ8B;;AAenC,SAAO,oBAAC,UAAD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAAP;AAEH,CA3FD;;AA6FA,MAAMA,eAAe,GAAG;AACpBC,EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,eAAehD,cAAf","sourcesContent":["import React, { useContext, Component } from \"react\";\n// import vis from \"vis-network\";\nimport Spinner from \"../layout/Spinner\";\nimport ExperimentContext from '../context/experiment/experimentContext';\nimport vis from \"vis\";\n\nconst GraphNativeRep = () => {\n\n const experimentContext = useContext(ExperimentContext); \n const { data, loadingGraph } = experimentContext;\n if (loadingGraph) return \n if (data === null) {\n return (\n
\n

Press Show Graph to see the graph representation of the experiment.

\n

If the experiment is running, press Start Job Monitor to start a live tracker of the changes on the experiment's jobs.\n This process will automatically update the graph's nodes colors and show a log of the detected changes.\n

\n
\n );\n }\n\n var nodes_array = [];\n var edges_array = [];\n\n if (data.nodes !== null || data.edges !== null) {\n data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: { background: node.status_color, border: \"black\" },\n //level: node.priority,\n })\n );\n \n data.edges.map(edge => \n edges_array.push({ from: edge.from, to: edge.to })\n );\n }\n\n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n\n const options = {\n edges: {\n arrows: {\n to: { enabled: true }\n }\n },\n layout: {\n improvedLayout: true,\n hierarchical: {\n \n nodeSpacing: 250,\n edgeMinimization: false,\n blockShifting: false,\n parentCentralization: false,\n direction: 'UD',\n sortMethod: 'directed',\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true,\n },\n physics: {\n enabled: false,\n },\n nodes: {\n shape: 'dot',\n }\n };\n\n const graph = {\n nodes : nodes,\n edges : edges,\n };\n \n\n class VisNetwork extends Component {\n \n componentDidMount() {\n var network = new vis.Network(this.ref.myRef, graph, options);\n }\n\n render() { \n return (\n
\n
\n
\n );\n }\n }\n\n return ;\n\n}\n\nconst experimentStyle = {\n height: 600\n };\n\nexport default GraphNativeRep;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/56804b9976bae11def1e583251a5b0e8.json b/node_modules/.cache/babel-loader/56804b9976bae11def1e583251a5b0e8.json new file mode 100644 index 0000000000000000000000000000000000000000..6eca5c164843c896bf46267c618a23c98664879c --- /dev/null +++ b/node_modules/.cache/babel-loader/56804b9976bae11def1e583251a5b0e8.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js\";\nimport React, { useContext, Component } from \"react\"; // import vis from \"vis-network\";\n\nimport Spinner from \"../layout/Spinner\";\nimport ExperimentContext from '../context/experiment/experimentContext';\nimport vis from \"vis\";\n\nconst GraphNativeRep = () => {\n const experimentContext = useContext(ExperimentContext);\n const data = experimentContext.data,\n loadingGraph = experimentContext.loadingGraph,\n cleanGraphData = experimentContext.cleanGraphData,\n updateSelection = experimentContext.updateSelection;\n if (loadingGraph) return React.createElement(Spinner, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 11\n },\n __self: this\n });\n\n if (data === null) {\n return React.createElement(\"div\", {\n className: \"card-body text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 14\n },\n __self: this\n }, React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 15\n },\n __self: this\n }, \"Press \", React.createElement(\"span\", {\n className: \"badge badge-info\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 15\n },\n __self: this\n }, \"Show Graph\"), \" to see the graph representation of the experiment.\"), React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 16\n },\n __self: this\n }, \"If the experiment is running, press \", React.createElement(\"span\", {\n className: \"badge badge-dark\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 16\n },\n __self: this\n }, \"Start Job Monitor\"), \" to start a live tracker of the changes on the experiment's jobs. This process will automatically update the graph's nodes colors and show a log of the detected changes.\"));\n }\n\n var nodes_array = [];\n var edges_array = [];\n\n if (data.nodes !== null || data.edges !== null) {\n data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: {\n background: node.status_color,\n border: \"black\"\n } //level: node.priority,\n\n }));\n data.edges.map(edge => edges_array.push({\n from: edge.from,\n to: edge.to\n }));\n }\n\n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n const options = {\n edges: {\n arrows: {\n to: {\n enabled: true\n }\n }\n },\n layout: {\n improvedLayout: true,\n hierarchical: {\n nodeSpacing: 250,\n edgeMinimization: false,\n blockShifting: false,\n parentCentralization: false,\n direction: 'UD',\n sortMethod: 'directed'\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true\n },\n physics: {\n enabled: false\n },\n nodes: {\n shape: 'dot'\n }\n };\n const graph = {\n nodes: nodes,\n edges: edges\n };\n\n class VisNetwork extends Component {\n // shouldComponentUpdate(nextProps, nextState){ \n // if (nextProps.loadingGraph !== this.props.loadingGraph){\n // return true; \n // }else{\n // return false;\n // }\n // }\n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, graph, options);\n network.on(\"click\", function (params) {\n console.log(params);\n\n if (params.nodes) {\n console.log(params.nodes);\n updateSelection(params.nodes);\n }\n });\n }\n\n componentWillUnmount() {\n cleanGraphData();\n }\n\n render() {\n return React.createElement(\"div\", {\n className: \"card-body p-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 109\n },\n __self: this\n }, React.createElement(\"div\", {\n ref: \"myRef\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 110\n },\n __self: this\n }));\n }\n\n }\n\n return React.createElement(VisNetwork, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 116\n },\n __self: this\n });\n};\n\nconst experimentStyle = {\n height: 600\n};\nexport default GraphNativeRep;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js"],"names":["React","useContext","Component","Spinner","ExperimentContext","vis","GraphNativeRep","experimentContext","data","loadingGraph","cleanGraphData","updateSelection","nodes_array","edges_array","nodes","edges","map","node","push","id","label","color","background","status_color","border","edge","from","to","DataSet","options","arrows","enabled","layout","improvedLayout","hierarchical","nodeSpacing","edgeMinimization","blockShifting","parentCentralization","direction","sortMethod","interaction","dragNodes","hoverConnectedEdges","navigationButtons","physics","shape","graph","VisNetwork","componentDidMount","network","Network","refs","myRef","on","params","console","log","componentWillUnmount","render","experimentStyle","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,UAAhB,EAA4BC,SAA5B,QAA6C,OAA7C,C,CACA;;AACA,OAAOC,OAAP,MAAoB,mBAApB;AACA,OAAOC,iBAAP,MAA8B,yCAA9B;AACA,OAAOC,GAAP,MAAgB,KAAhB;;AAEA,MAAMC,cAAc,GAAG,MAAM;AAEzB,QAAMC,iBAAiB,GAAGN,UAAU,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yB9C,SAAzB,CAAmC;AAE/B;AACA;AACA;AACA;AACA;AACA;AACA;AAEA+C,IAAAA,iBAAiB,GAAG;AAChB,UAAIC,OAAO,GAAG,IAAI7C,GAAG,CAAC8C,OAAR,CAAgB,KAAKC,IAAL,CAAUC,KAA1B,EAAiCN,KAAjC,EAAwClB,OAAxC,CAAd;AACAqB,MAAAA,OAAO,CAACI,EAAR,CAAW,OAAX,EAAoB,UAASC,MAAT,EAAiB;AACjCC,QAAAA,OAAO,CAACC,GAAR,CAAYF,MAAZ;;AACA,YAAIA,MAAM,CAACzC,KAAX,EAAiB;AACb0C,UAAAA,OAAO,CAACC,GAAR,CAAYF,MAAM,CAACzC,KAAnB;AACAH,UAAAA,eAAe,CAAC4C,MAAM,CAACzC,KAAR,CAAf;AACH;AAEJ,OAPD;AAQH;;AAED4C,IAAAA,oBAAoB,GAAG;AACnBhD,MAAAA,cAAc;AACjB;;AAEDiD,IAAAA,MAAM,GAAG;AACL,aACI;AAAK,QAAA,SAAS,EAAC,eAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,SACI;AAAK,QAAA,GAAG,EAAC,OAAT;AAAiB,QAAA,KAAK,EAAEC,eAAxB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,QADJ,CADJ;AAKH;;AAhC8B;;AAmCnC,SAAO,oBAAC,UAAD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAAP;AAEH,CA/GD;;AAiHA,MAAMA,eAAe,GAAG;AACpBC,EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,eAAevD,cAAf","sourcesContent":["import React, { useContext, Component } from \"react\";\n// import vis from \"vis-network\";\nimport Spinner from \"../layout/Spinner\";\nimport ExperimentContext from '../context/experiment/experimentContext';\nimport vis from \"vis\";\n\nconst GraphNativeRep = () => {\n\n const experimentContext = useContext(ExperimentContext); \n const { data, loadingGraph, cleanGraphData, updateSelection } = experimentContext;\n if (loadingGraph) return \n if (data === null) {\n return (\n
\n

Press Show Graph to see the graph representation of the experiment.

\n

If the experiment is running, press Start Job Monitor to start a live tracker of the changes on the experiment's jobs.\n This process will automatically update the graph's nodes colors and show a log of the detected changes.\n

\n
\n );\n }\n\n var nodes_array = [];\n var edges_array = [];\n\n if (data.nodes !== null || data.edges !== null) {\n data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: { background: node.status_color, border: \"black\" },\n //level: node.priority,\n })\n );\n \n data.edges.map(edge => \n edges_array.push({ from: edge.from, to: edge.to })\n );\n }\n\n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n\n const options = {\n edges: {\n arrows: {\n to: { enabled: true }\n }\n },\n layout: {\n improvedLayout: true,\n hierarchical: {\n \n nodeSpacing: 250,\n edgeMinimization: false,\n blockShifting: false,\n parentCentralization: false,\n direction: 'UD',\n sortMethod: 'directed',\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true,\n },\n physics: {\n enabled: false,\n },\n nodes: {\n shape: 'dot',\n }\n };\n\n const graph = {\n nodes : nodes,\n edges : edges,\n };\n \n\n class VisNetwork extends Component {\n \n // shouldComponentUpdate(nextProps, nextState){ \n // if (nextProps.loadingGraph !== this.props.loadingGraph){\n // return true; \n // }else{\n // return false;\n // }\n // }\n\n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, graph, options);\n network.on(\"click\", function(params) {\n console.log(params);\n if (params.nodes){\n console.log(params.nodes);\n updateSelection(params.nodes);\n }\n \n });\n }\n\n componentWillUnmount() {\n cleanGraphData();\n }\n\n render() { \n return (\n
\n
\n
\n );\n }\n }\n\n return ;\n\n}\n\nconst experimentStyle = {\n height: 600\n };\n\nexport default GraphNativeRep;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/57e7d6173d49e11c02aea55bca0684a2.json b/node_modules/.cache/babel-loader/57e7d6173d49e11c02aea55bca0684a2.json new file mode 100644 index 0000000000000000000000000000000000000000..2378e44327bc37a3f1c453eb62b20ecf3a2d3b4a --- /dev/null +++ b/node_modules/.cache/babel-loader/57e7d6173d49e11c02aea55bca0684a2.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js\";\nimport React, { Component } from \"react\"; // import vis from \"vis-network\";\n\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n constructor(...args) {\n super(...args);\n\n this.updateVisNodes = nodes => {\n this.props.setVisData(nodes);\n };\n }\n\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else if (nextProps.data && this.props.data && nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp) {\n console.log(\"Rerendering\");\n return true;\n } else if (nextProps.loadingGraph !== this.props.loadingGraph) {\n return true;\n } else {\n return false;\n }\n }\n\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n render() {\n if (this.props.loadingGraph) return React.createElement(Spinner, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 32\n },\n __self: this\n });\n\n if (this.props.data == null) {\n return React.createElement(\"div\", {\n className: \"card-body text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 35\n },\n __self: this\n }, React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Press \", React.createElement(\"span\", {\n className: \"badge badge-info\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Show Graph\"), \" to see the graph representation of the experiment.\"), React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"If the experiment is running, press \", React.createElement(\"span\", {\n className: \"badge badge-dark\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"Start Job Monitor\"), \" to start a live tracker of the changes on the experiment's jobs. This process will automatically update the graph's nodes colors and show a log of the detected changes.\"));\n }\n\n var nodes_array = [];\n var edges_array = [];\n\n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: {\n background: node.status_color,\n border: \"black\"\n },\n level: node.level\n }));\n this.props.data.edges.map(edge => edges_array.push({\n from: edge.from,\n to: edge.to\n }));\n }\n\n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n const options = {\n edges: {\n arrows: {\n to: {\n enabled: true\n }\n }\n },\n layout: {\n //improvedLayout: true,\n hierarchical: {\n // enabled: true,\n nodeSpacing: 250,\n blockShifting: true,\n edgeMinimization: true,\n parentCentralization: true,\n direction: 'UD'\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true\n },\n physics: {\n enabled: true,\n solver: 'hierarchicalRepulsion'\n },\n nodes: {\n shape: 'dot'\n }\n };\n const graph = {\n nodes: nodes,\n edges: edges\n };\n\n class VisNetwork extends Component {\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else {\n return false;\n }\n }\n\n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", params => {\n //console.log(params);\n if (params.nodes) {\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n });\n } // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n\n\n render() {\n return React.createElement(\"div\", {\n className: \"card-body p-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 131\n },\n __self: this\n }, React.createElement(\"div\", {\n ref: \"myRef\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 132\n },\n __self: this\n }));\n }\n\n }\n\n this.updateVisNodes(nodes);\n return React.createElement(VisNetwork, {\n graph: graph,\n options: options,\n updateSelection: this.props.updateSelection,\n shouldUpdateGraph: this.props.shouldUpdateGraph,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 140\n },\n __self: this\n });\n }\n\n}\n\nconst experimentStyle = {\n height: 600\n};\nexport default GraphNativeRep;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js"],"names":["React","Component","Spinner","vis","GraphNativeRep","updateVisNodes","nodes","props","setVisData","shouldComponentUpdate","nextProps","nextState","shouldUpdateGraph","data","pkl_timestamp","console","log","loadingGraph","componentWillUnmount","cleanGraphData","render","nodes_array","edges_array","edges","map","node","push","id","label","color","background","status_color","border","level","edge","from","to","DataSet","options","arrows","enabled","layout","hierarchical","nodeSpacing","blockShifting","edgeMinimization","parentCentralization","direction","interaction","dragNodes","hoverConnectedEdges","navigationButtons","physics","solver","shape","graph","VisNetwork","componentDidMount","network","Network","refs","myRef","on","params","updateSelection","experimentStyle","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,SAAhB,QAAiC,OAAjC,C,CACA;;AACA,OAAOC,OAAP,MAAoB,mBAApB;AACA,OAAOC,GAAP,MAAgB,KAAhB;;AAEA,MAAMC,cAAN,SAA6BH,SAA7B,CAAuC;AAAA;AAAA;;AAAA,SAmBnCI,cAnBmC,GAmBjBC,KAAD,IAAW;AACxB,WAAKC,KAAL,CAAWC,UAAX,CAAsBF,KAAtB;AACH,KArBkC;AAAA;;AAEnCG,EAAAA,qBAAqB,CAACC,SAAD,EAAYC,SAAZ,EAAsB;AACvC,QAAI,KAAKJ,KAAL,CAAWK,iBAAX,KAAiC,IAArC,EAA0C;AACtC,aAAO,IAAP;AACD,KAFH,MAEQ,IAAIF,SAAS,CAACG,IAAV,IAAkB,KAAKN,KAAL,CAAWM,IAA7B,IAAsCH,SAAS,CAACG,IAAV,CAAeC,aAAf,KAAiC,KAAKP,KAAL,CAAWM,IAAX,CAAgBC,aAA3F,EAA0G;AAC9GC,MAAAA,OAAO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OAAO,EAAEjB,OAFN;AAGH,MAAA,eAAe,EAAE,KAAK/B,KAAL,CAAWyD,eAHzB;AAIH,MAAA,iBAAiB,EAAE,KAAKzD,KAAL,CAAWK,iBAJ3B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAAP;AAOH;;AA7IkC;;AA2JvC,MAAMqD,eAAe,GAAG;AACpBC,EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,eAAe9D,cAAf","sourcesContent":["import React, { Component } from \"react\";\n// import vis from \"vis-network\";\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n\n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true\n }else if (nextProps.data && this.props.data && (nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp)){\n console.log(\"Rerendering\")\n return true;\n }else if (nextProps.loadingGraph !== this.props.loadingGraph){\n return true; \n }else{\n return false;\n }\n }\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n updateVisNodes = (nodes) => {\n this.props.setVisData(nodes);\n }\n\n\n\n render () {\n if (this.props.loadingGraph) return ;\n if (this.props.data == null){\n return (\n
\n

Press Show Graph to see the graph representation of the experiment.

\n

If the experiment is running, press Start Job Monitor to start a live tracker of the changes on the experiment's jobs.\n This process will automatically update the graph's nodes colors and show a log of the detected changes.\n

\n
\n );\n }\n\n var nodes_array = [];\n var edges_array = [];\n \n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: { background: node.status_color, border: \"black\" },\n level: node.level,\n })\n );\n \n this.props.data.edges.map(edge => \n edges_array.push({ from: edge.from, to: edge.to })\n );\n }\n \n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n\n\n const options = {\n edges: {\n arrows: {\n to: { enabled: true }\n }\n },\n layout: {\n //improvedLayout: true,\n hierarchical: {\n // enabled: true,\n nodeSpacing: 250,\n blockShifting: true,\n edgeMinimization: true,\n parentCentralization: true,\n direction: 'UD',\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true,\n },\n physics: {\n enabled: true,\n solver: 'hierarchicalRepulsion',\n },\n nodes: {\n shape: 'dot',\n }\n };\n \n const graph = {\n nodes : nodes,\n edges : edges,\n };\n\n class VisNetwork extends Component {\n \n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true;\n } else {\n return false;\n }\n }\n \n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", (params) => {\n //console.log(params);\n if (params.nodes){\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n \n });\n }\n \n // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n \n render() { \n return (\n
\n
\n
\n );\n }\n }\n\n this.updateVisNodes(nodes);\n \n return ;\n\n }\n\n\n \n\n \n\n \n \n\n \n\n}\n\nconst experimentStyle = {\n height: 600\n };\n\nexport default GraphNativeRep;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/59208311c8b941714640daa70a22e4e2.json b/node_modules/.cache/babel-loader/59208311c8b941714640daa70a22e4e2.json new file mode 100644 index 0000000000000000000000000000000000000000..dc3e12d08a878a473999cd33f0b6bfb070612011 --- /dev/null +++ b/node_modules/.cache/babel-loader/59208311c8b941714640daa70a22e4e2.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js\";\nimport React, { Component } from \"react\"; // import vis from \"vis-network\";\n\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis-network\";\n\nclass GraphNativeRep extends Component {\n constructor(...args) {\n super(...args);\n\n this.updateVisNodes = nodes => {\n this.props.setVisData(nodes);\n };\n }\n\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else if (nextProps.data && this.props.data && nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp) {\n console.log(\"Rerendering\");\n return true;\n } else if (nextProps.loadingGraph !== this.props.loadingGraph) {\n return true;\n } else {\n return false;\n }\n }\n\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n render() {\n if (this.props.loadingGraph) return React.createElement(Spinner, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 32\n },\n __self: this\n });\n\n if (this.props.data == null) {\n return React.createElement(\"div\", {\n className: \"card-body text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 35\n },\n __self: this\n }, React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Press \", React.createElement(\"span\", {\n className: \"badge badge-info\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Show Graph\"), \" to see the graph representation of the experiment.\"), React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"If the experiment is running, press \", React.createElement(\"span\", {\n className: \"badge badge-dark\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"Start Job Monitor\"), \" to start a live tracker of the changes on the experiment's jobs. This process will automatically update the graph's nodes colors and show a log of the detected changes.\"));\n }\n\n var nodes_array = [];\n var edges_array = [];\n\n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: {\n background: node.status_color,\n border: \"black\"\n },\n level: node.level\n }));\n this.props.data.edges.map(edge => edges_array.push({\n from: edge.from,\n to: edge.to\n }));\n }\n\n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n var shouldEdge = false;\n\n if (this.props.data.total_jobs <= 500) {\n shouldEdge = true;\n }\n\n const options = {\n edges: {\n arrows: {\n to: {\n enabled: true\n }\n }\n },\n layout: {\n improvedLayout: false,\n hierarchical: {\n nodeSpacing: 190,\n blockShifting: false,\n edgeMinimization: shouldEdge,\n parentCentralization: true,\n sortMethod: 'hubsize',\n direction: 'UD' // work on vis current version\n // nodeSpacing: 190,\n // blockShifting: false,\n // edgeMinimization: false,\n // parentCentralization: true,\n // sortMethod: 'hubsize',\n // direction: 'UD',\n\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true\n },\n physics: {\n enabled: false\n },\n nodes: {\n shape: 'dot',\n font: {\n size: 10\n }\n }\n };\n const graph = {\n nodes: nodes,\n edges: edges\n };\n\n class VisNetwork extends Component {\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else {\n return false;\n }\n }\n\n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", params => {\n //console.log(params);\n if (params.nodes) {\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n });\n } // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n\n\n render() {\n return React.createElement(\"div\", {\n className: \"card-body p-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 143\n },\n __self: this\n }, React.createElement(\"div\", {\n ref: \"myRef\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 144\n },\n __self: this\n }));\n }\n\n }\n\n this.updateVisNodes(nodes);\n return React.createElement(VisNetwork, {\n graph: graph,\n options: options,\n updateSelection: this.props.updateSelection,\n shouldUpdateGraph: this.props.shouldUpdateGraph,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 152\n },\n __self: this\n });\n }\n\n}\n\nconst experimentStyle = {\n height: 600\n};\nexport default GraphNativeRep;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js"],"names":["React","Component","Spinner","vis","GraphNativeRep","updateVisNodes","nodes","props","setVisData","shouldComponentUpdate","nextProps","nextState","shouldUpdateGraph","data","pkl_timestamp","console","log","loadingGraph","componentWillUnmount","cleanGraphData","render","nodes_array","edges_array","edges","map","node","push","id","label","color","background","status_color","border","level","edge","from","to","DataSet","shouldEdge","total_jobs","options","arrows","enabled","layout","improvedLayout","hierarchical","nodeSpacing","blockShifting","edgeMinimization","parentCentralization","sortMethod","direction","interaction","dragNodes","hoverConnectedEdges","navigationButtons","physics","shape","font","size","graph","VisNetwork","componentDidMount","network","Network","refs","myRef","on","params","updateSelection","experimentStyle","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,SAAhB,QAAiC,OAAjC,C,CACA;;AACA,OAAOC,OAAP,MAAoB,mBAApB;AACA,OAAOC,GAAP,MAAgB,aAAhB;;AAEA,MAAMC,cAAN,SAA6BH,SAA7B,CAAuC;AAAA;AAAA;;AAAA,SAmBnCI,cAnBmC,GAmBjBC,KAAD,IAAW;AACxB,WAAKC,KAAL,CAAWC,UAAX,CAAsBF,KAAtB;AACH,KArBkC;AAAA;;AAEnCG,EAAAA,qBAAqB,CAACC,SAAD,EAAYC,SAAZ,EAAsB;AACvC,QAAI,KAAKJ,KAAL,CAAWK,iBAAX,KAAiC,IAArC,EAA0C;AACtC,aAAO,IAAP;AACD,KAFH,MAEQ,IAAIF,SAAS,CAACG,IAAV,IAAkB,KAAKN,KAAL,CAAWM,IAA7B,IAAsCH,SAAS,CAACG,IAAV,CAAeC,aAAf,KAAiC,KAAKP,KAAL,CAAWM,IAAX,CAAgBC,aAA3F,EAA0G;AAC9GC,MAAAA,OAAO,CAACC,GAAR,CAAY,aAAZ;AACA,aAAO,IAAP;AACD,KAHK,MAGA,IAAIN,SAAS,CAACO,YAAV,KAA2B,KAAKV,KAAL,CAAWU,YAA1C,EAAuD;AAC3D,aAAO,IAAP;AACD,KAFK,MAED;A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8B;;AAoCnC,SAAKjE,cAAL,CAAoBC,KAApB;AAEA,WAAO,oBAAC,UAAD;AACH,MAAA,KAAK,EAAEsD,KADJ;AAEH,MAAA,OAAO,EAAEpB,OAFN;AAGH,MAAA,eAAe,EAAE,KAAKjC,KAAL,CAAW8D,eAHzB;AAIH,MAAA,iBAAiB,EAAE,KAAK9D,KAAL,CAAWK,iBAJ3B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAAP;AAOH;;AAzJkC;;AAuKvC,MAAM0D,eAAe,GAAG;AACpBC,EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,eAAenE,cAAf","sourcesContent":["import React, { Component } from \"react\";\n// import vis from \"vis-network\";\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis-network\";\n\nclass GraphNativeRep extends Component {\n\n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true\n }else if (nextProps.data && this.props.data && (nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp)){\n console.log(\"Rerendering\")\n return true;\n }else if (nextProps.loadingGraph !== this.props.loadingGraph){\n return true; \n }else{\n return false;\n }\n }\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n updateVisNodes = (nodes) => {\n this.props.setVisData(nodes);\n }\n\n\n\n render () {\n if (this.props.loadingGraph) return ;\n if (this.props.data == null){\n return (\n
\n

Press Show Graph to see the graph representation of the experiment.

\n

If the experiment is running, press Start Job Monitor to start a live tracker of the changes on the experiment's jobs.\n This process will automatically update the graph's nodes colors and show a log of the detected changes.\n

\n
\n );\n }\n\n var nodes_array = [];\n var edges_array = [];\n \n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: { background: node.status_color, border: \"black\" },\n level: node.level,\n })\n );\n \n this.props.data.edges.map(edge => \n edges_array.push({ from: edge.from, to: edge.to })\n );\n }\n \n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n\n var shouldEdge = false;\n if (this.props.data.total_jobs <= 500){\n shouldEdge = true;\n }\n const options = {\n edges: {\n arrows: {\n to: { enabled: true }\n }\n },\n layout: {\n improvedLayout: false,\n hierarchical: {\n nodeSpacing: 190, \n blockShifting: false,\n edgeMinimization: shouldEdge,\n parentCentralization: true,\n sortMethod: 'hubsize',\n direction: 'UD',\n // work on vis current version\n // nodeSpacing: 190,\n // blockShifting: false,\n // edgeMinimization: false,\n // parentCentralization: true,\n // sortMethod: 'hubsize',\n // direction: 'UD',\n }\n }, \n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true,\n },\n physics: {\n enabled: false,\n },\n nodes: {\n shape: 'dot',\n font: {\n size: 10,\n },\n }\n };\n \n const graph = {\n nodes : nodes,\n edges : edges,\n };\n\n class VisNetwork extends Component {\n \n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true;\n } else {\n return false;\n }\n }\n \n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", (params) => {\n //console.log(params);\n if (params.nodes){\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n \n });\n }\n \n // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n \n render() { \n return (\n
\n
\n
\n );\n }\n }\n\n this.updateVisNodes(nodes);\n \n return ;\n\n }\n\n\n \n\n \n\n \n \n\n \n\n}\n\nconst experimentStyle = {\n height: 600\n };\n\nexport default GraphNativeRep;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/5c08cedf68e423b9790c27f7bfdaa90f.json b/node_modules/.cache/babel-loader/5c08cedf68e423b9790c27f7bfdaa90f.json new file mode 100644 index 0000000000000000000000000000000000000000..dea8869f29e2f7010e3ff999aed9ce975fa96789 --- /dev/null +++ b/node_modules/.cache/babel-loader/5c08cedf68e423b9790c27f7bfdaa90f.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js\";\nimport React, { Component } from \"react\"; // import vis from \"vis-network\";\n\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis-network\";\n\nclass GraphNativeRep extends Component {\n constructor(...args) {\n super(...args);\n\n this.updateVisNodes = nodes => {\n this.props.setVisData(nodes);\n };\n }\n\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else if (nextProps.data && this.props.data && nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp) {\n console.log(\"Rerendering\");\n return true;\n } else if (nextProps.loadingGraph !== this.props.loadingGraph) {\n return true;\n } else {\n return false;\n }\n }\n\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n render() {\n if (this.props.loadingGraph) return React.createElement(Spinner, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 32\n },\n __self: this\n });\n\n if (this.props.data == null) {\n return React.createElement(\"div\", {\n className: \"card-body text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 35\n },\n __self: this\n }, React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Press \", React.createElement(\"span\", {\n className: \"badge badge-info\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Show Graph\"), \" to see the graph representation of the experiment.\"), React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"If the experiment is running, press \", React.createElement(\"span\", {\n className: \"badge badge-dark\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"Start Job Monitor\"), \" to start a live tracker of the changes on the experiment's jobs. This process will automatically update the graph's nodes colors and show a log of the detected changes.\"));\n }\n\n var nodes_array = [];\n var edges_array = [];\n\n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: {\n background: node.status_color,\n border: \"black\"\n },\n level: node.level\n }));\n this.props.data.edges.map(edge => edges_array.push({\n from: edge.from,\n to: edge.to\n }));\n }\n\n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n const options = {\n edges: {\n arrows: {\n to: {\n enabled: true\n }\n }\n },\n layout: {\n improvedLayout: false,\n hierarchical: {\n nodeSpacing: 190,\n blockShifting: false,\n edgeMinimization: true,\n parentCentralization: true,\n sortMethod: 'hubsize',\n direction: 'UD' // work on vis current version\n // nodeSpacing: 190,\n // blockShifting: false,\n // edgeMinimization: false,\n // parentCentralization: true,\n // sortMethod: 'hubsize',\n // direction: 'UD',\n\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true\n },\n physics: {\n enabled: false\n },\n nodes: {\n shape: 'dot',\n font: {\n size: 10\n }\n }\n };\n const graph = {\n nodes: nodes,\n edges: edges\n };\n\n class VisNetwork extends Component {\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else {\n return false;\n }\n }\n\n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", params => {\n //console.log(params);\n if (params.nodes) {\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n });\n } // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n\n\n render() {\n return React.createElement(\"div\", {\n className: \"card-body p-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 140\n },\n __self: this\n }, React.createElement(\"div\", {\n ref: \"myRef\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 141\n },\n __self: this\n }));\n }\n\n }\n\n this.updateVisNodes(nodes);\n return React.createElement(VisNetwork, {\n graph: graph,\n options: options,\n updateSelection: this.props.updateSelection,\n shouldUpdateGraph: this.props.shouldUpdateGraph,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 149\n },\n __self: this\n });\n }\n\n}\n\nconst experimentStyle = {\n height: 600\n};\nexport default GraphNativeRep;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js"],"names":["React","Component","Spinner","vis","GraphNativeRep","updateVisNodes","nodes","props","setVisData","shouldComponentUpdate","nextProps","nextState","shouldUpdateGraph","data","pkl_timestamp","console","log","loadingGraph","componentWillUnmount","cleanGraphData","render","nodes_array","edges_array","edges","map","node","push","id","label","color","background","status_color","border","level","edge","from","to","DataSet","options","arrows","enabled","layout","improvedLayout","hierarchical","nodeSpacing","blockShifting","edgeMinimization","parentCentralization","sortMethod","direction","interaction","dragNodes","hoverConnectedEdges","navigationButtons","physics","shape","font","size","graph","VisNetwork","componentDidMount","network","Network","refs","myRef","on","params","updateSelection","experimentStyle","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,SAAhB,QAAiC,OAAjC,C,CACA;;AACA,OAAOC,OAAP,MAAoB,mBAApB;AACA,OAAOC,GAAP,MAAgB,aAAhB;;AAEA,MAAMC,cAAN,SAA6BH,SAA7B,CAAuC;AAAA;AAAA;;AAAA,SAmBnCI,cAnBmC,GAmBjBC,KAAD,IAAW;AACxB,WAAKC,KAAL,CAAWC,UAAX,CAAsBF,KAAtB;AACH,KArBkC;AAAA;;AAEnCG,EAAAA,qBAAqB,CAACC,SAAD,EAAYC,SAAZ,EAAsB;AACvC,QAAI,KAAKJ,KAAL,CAAWK,iBAAX,KAAiC,IAArC,EAA0C;AACtC,aAAO,IAAP;AACD,KAFH,MAEQ,IAAIF,SAAS,CAACG,IAAV,IAAkB,KAAKN,KAAL,CAAWM,IAA7B,IAAsCH,SAAS,CAACG,IAAV,CAAeC,aAAf,KAAiC,KAAKP,KAAL,CAAWM,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xB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,UADJ,CADJ;AAKH;;AAjC8B;;AAoCnC,SAAK/D,cAAL,CAAoBC,KAApB;AAEA,WAAO,oBAAC,UAAD;AACH,MAAA,KAAK,EAAEoD,KADJ;AAEH,MAAA,OAAO,EAAEpB,OAFN;AAGH,MAAA,eAAe,EAAE,KAAK/B,KAAL,CAAW4D,eAHzB;AAIH,MAAA,iBAAiB,EAAE,KAAK5D,KAAL,CAAWK,iBAJ3B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAAP;AAOH;;AAtJkC;;AAoKvC,MAAMwD,eAAe,GAAG;AACpBC,EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,eAAejE,cAAf","sourcesContent":["import React, { Component } from \"react\";\n// import vis from \"vis-network\";\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis-network\";\n\nclass GraphNativeRep extends Component {\n\n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true\n }else if (nextProps.data && this.props.data && (nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp)){\n console.log(\"Rerendering\")\n return true;\n }else if (nextProps.loadingGraph !== this.props.loadingGraph){\n return true; \n }else{\n return false;\n }\n }\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n updateVisNodes = (nodes) => {\n this.props.setVisData(nodes);\n }\n\n\n\n render () {\n if (this.props.loadingGraph) return ;\n if (this.props.data == null){\n return (\n
\n

Press Show Graph to see the graph representation of the experiment.

\n

If the experiment is running, press Start Job Monitor to start a live tracker of the changes on the experiment's jobs.\n This process will automatically update the graph's nodes colors and show a log of the detected changes.\n

\n
\n );\n }\n\n var nodes_array = [];\n var edges_array = [];\n \n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: { background: node.status_color, border: \"black\" },\n level: node.level,\n })\n );\n \n this.props.data.edges.map(edge => \n edges_array.push({ from: edge.from, to: edge.to })\n );\n }\n \n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n\n\n const options = {\n edges: {\n arrows: {\n to: { enabled: true }\n }\n },\n layout: {\n improvedLayout: false,\n hierarchical: {\n nodeSpacing: 190, \n blockShifting: false,\n edgeMinimization: true,\n parentCentralization: true,\n sortMethod: 'hubsize',\n direction: 'UD',\n // work on vis current version\n // nodeSpacing: 190,\n // blockShifting: false,\n // edgeMinimization: false,\n // parentCentralization: true,\n // sortMethod: 'hubsize',\n // direction: 'UD',\n }\n }, \n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true,\n },\n physics: {\n enabled: false,\n },\n nodes: {\n shape: 'dot',\n font: {\n size: 10,\n },\n }\n };\n \n const graph = {\n nodes : nodes,\n edges : edges,\n };\n\n class VisNetwork extends Component {\n \n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true;\n } else {\n return false;\n }\n }\n \n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", (params) => {\n //console.log(params);\n if (params.nodes){\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n \n });\n }\n \n // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n \n render() { \n return (\n
\n
\n
\n );\n }\n }\n\n this.updateVisNodes(nodes);\n \n return ;\n\n }\n\n\n \n\n \n\n \n \n\n \n\n}\n\nconst experimentStyle = {\n height: 600\n };\n\nexport default GraphNativeRep;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/5ca62fe636e010c734ef06f61271c855.json b/node_modules/.cache/babel-loader/5ca62fe636e010c734ef06f61271c855.json new file mode 100644 index 0000000000000000000000000000000000000000..d0ad0ce7d03e905969fab95bdd95fc48f9bfc9d0 --- /dev/null +++ b/node_modules/.cache/babel-loader/5ca62fe636e010c734ef06f61271c855.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js\";\nimport React, { Component } from \"react\"; // import vis from \"vis-network\";\n\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis-network\";\n\nclass GraphNativeRep extends Component {\n constructor(...args) {\n super(...args);\n\n this.updateVisNodes = nodes => {\n this.props.setVisData(nodes);\n };\n }\n\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else if (nextProps.data && this.props.data && nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp) {\n console.log(\"Rerendering\");\n return true;\n } else if (nextProps.loadingGraph !== this.props.loadingGraph) {\n return true;\n } else {\n return false;\n }\n }\n\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n render() {\n if (this.props.loadingGraph) return React.createElement(Spinner, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 32\n },\n __self: this\n });\n\n if (this.props.data == null) {\n return React.createElement(\"div\", {\n className: \"card-body text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 35\n },\n __self: this\n }, React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Press \", React.createElement(\"span\", {\n className: \"badge badge-info\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Show Graph\"), \" to see the graph representation of the experiment.\"), React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"If the experiment is running, press \", React.createElement(\"span\", {\n className: \"badge badge-dark\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"Start Job Monitor\"), \" to start a live tracker of the changes on the experiment's jobs. This process will automatically update the graph's nodes colors and show a log of the detected changes.\"));\n }\n\n var nodes_array = [];\n var edges_array = [];\n\n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: {\n background: node.status_color,\n border: \"black\"\n },\n level: node.level\n }));\n this.props.data.edges.map(edge => edges_array.push({\n from: edge.from,\n to: edge.to\n }));\n }\n\n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n const options = {\n edges: {\n arrows: {\n to: {\n enabled: true\n }\n }\n },\n layout: {\n improvedLayout: false,\n hierarchical: {\n nodeSpacing: 190,\n blockShifting: false,\n edgeMinimization: false,\n parentCentralization: true,\n sortMethod: 'hubsize',\n direction: 'UD' // work on vis current version\n // nodeSpacing: 190,\n // blockShifting: false,\n // edgeMinimization: false,\n // parentCentralization: true,\n // sortMethod: 'hubsize',\n // direction: 'UD',\n\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true\n },\n physics: {\n enabled: false\n },\n nodes: {\n shape: 'dot',\n font: {\n size: 10\n }\n }\n };\n const graph = {\n nodes: nodes,\n edges: edges\n };\n\n class VisNetwork extends Component {\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else {\n return false;\n }\n }\n\n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", params => {\n //console.log(params);\n if (params.nodes) {\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n });\n } // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n\n\n render() {\n return React.createElement(\"div\", {\n className: \"card-body p-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 140\n },\n __self: this\n }, React.createElement(\"div\", {\n ref: \"myRef\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 141\n },\n __self: this\n }));\n }\n\n }\n\n this.updateVisNodes(nodes);\n return React.createElement(VisNetwork, {\n graph: graph,\n options: options,\n updateSelection: this.props.updateSelection,\n shouldUpdateGraph: this.props.shouldUpdateGraph,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 149\n },\n __self: this\n });\n }\n\n}\n\nconst experimentStyle = {\n height: 600\n};\nexport default GraphNativeRep;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js"],"names":["React","Component","Spinner","vis","GraphNativeRep","updateVisNodes","nodes","props","setVisData","shouldComponentUpdate","nextProps","nextState","shouldUpdateGraph","data","pkl_timestamp","console","log","loadingGraph","componentWillUnmount","cleanGraphData","render","nodes_array","edges_array","edges","map","node","push","id","label","color","background","status_color","border","level","edge","from","to","DataSet","options","arrows","enabled","layout","improvedLayout","hierarchical","nodeSpacing","blockShifting","edgeMinimization","parentCentralization","sortMethod","direction","interaction","dragNodes","hoverConnectedEdges","navigationButtons","physics","shape","font","size","graph","VisNetwork","componentDidMount","network","Network","refs","myRef","on","params","updateSelection","experimentStyle","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,SAAhB,QAAiC,OAAjC,C,CACA;;AACA,OAAOC,OAAP,MAAoB,mBAApB;AACA,OAAOC,GAAP,MAAgB,aAAhB;;AAEA,MAAMC,cAAN,SAA6BH,SAA7B,CAAuC;AAAA;AAAA;;AAAA,SAmBnCI,cAnBmC,GAmBjBC,KAAD,IAAW;AACxB,WAAKC,KAAL,CAAWC,UAAX,CAAsBF,KAAtB;AACH,KArBkC;AAAA;;AAEnCG,EAAAA,qBAAqB,CAACC,SAAD,EAAYC,SAAZ,EAAsB;AACvC,QAAI,KAAKJ,KAAL,CAAWK,iBAAX,KAAiC,IAArC,EAA0C;AACtC,aAAO,IAAP;AACD,KAFH,MAEQ,IAAIF,SAAS,CAACG,IAAV,IAAkB,KAAKN,KAAL,CAAWM,IAA7B,IAAsCH,SAAS,CAACG,IAAV,CAAeC,aAAf,KAAiC,KAAKP,KAAL,CAAWM,IAA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AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,UADJ,CADJ;AAKH;;AAjC8B;;AAoCnC,SAAK/D,cAAL,CAAoBC,KAApB;AAEA,WAAO,oBAAC,UAAD;AACH,MAAA,KAAK,EAAEoD,KADJ;AAEH,MAAA,OAAO,EAAEpB,OAFN;AAGH,MAAA,eAAe,EAAE,KAAK/B,KAAL,CAAW4D,eAHzB;AAIH,MAAA,iBAAiB,EAAE,KAAK5D,KAAL,CAAWK,iBAJ3B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAAP;AAOH;;AAtJkC;;AAoKvC,MAAMwD,eAAe,GAAG;AACpBC,EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,eAAejE,cAAf","sourcesContent":["import React, { Component } from \"react\";\n// import vis from \"vis-network\";\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis-network\";\n\nclass GraphNativeRep extends Component {\n\n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true\n }else if (nextProps.data && this.props.data && (nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp)){\n console.log(\"Rerendering\")\n return true;\n }else if (nextProps.loadingGraph !== this.props.loadingGraph){\n return true; \n }else{\n return false;\n }\n }\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n updateVisNodes = (nodes) => {\n this.props.setVisData(nodes);\n }\n\n\n\n render () {\n if (this.props.loadingGraph) return ;\n if (this.props.data == null){\n return (\n
\n

Press Show Graph to see the graph representation of the experiment.

\n

If the experiment is running, press Start Job Monitor to start a live tracker of the changes on the experiment's jobs.\n This process will automatically update the graph's nodes colors and show a log of the detected changes.\n

\n
\n );\n }\n\n var nodes_array = [];\n var edges_array = [];\n \n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: { background: node.status_color, border: \"black\" },\n level: node.level,\n })\n );\n \n this.props.data.edges.map(edge => \n edges_array.push({ from: edge.from, to: edge.to })\n );\n }\n \n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n\n\n const options = {\n edges: {\n arrows: {\n to: { enabled: true }\n }\n },\n layout: {\n improvedLayout: false,\n hierarchical: {\n nodeSpacing: 190, \n blockShifting: false,\n edgeMinimization: false,\n parentCentralization: true,\n sortMethod: 'hubsize',\n direction: 'UD',\n // work on vis current version\n // nodeSpacing: 190,\n // blockShifting: false,\n // edgeMinimization: false,\n // parentCentralization: true,\n // sortMethod: 'hubsize',\n // direction: 'UD',\n }\n }, \n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true,\n },\n physics: {\n enabled: false,\n },\n nodes: {\n shape: 'dot',\n font: {\n size: 10,\n },\n }\n };\n \n const graph = {\n nodes : nodes,\n edges : edges,\n };\n\n class VisNetwork extends Component {\n \n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true;\n } else {\n return false;\n }\n }\n \n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", (params) => {\n //console.log(params);\n if (params.nodes){\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n \n });\n }\n \n // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n \n render() { \n return (\n
\n
\n
\n );\n }\n }\n\n this.updateVisNodes(nodes);\n \n return ;\n\n }\n\n\n \n\n \n\n \n \n\n \n\n}\n\nconst experimentStyle = {\n height: 600\n };\n\nexport default GraphNativeRep;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/5cc0d336871e7bf5b351e8553e69f1fe.json b/node_modules/.cache/babel-loader/5cc0d336871e7bf5b351e8553e69f1fe.json new file mode 100644 index 0000000000000000000000000000000000000000..e5ce007155d6429133ec5a783d2c1ce2d5b6dcab --- /dev/null +++ b/node_modules/.cache/babel-loader/5cc0d336871e7bf5b351e8553e69f1fe.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/Selection.js\";\nimport React, { useContext, Fragment } from 'react';\nimport ExperimentContext from '../context/experiment/experimentContext';\n\nconst Selection = () => {\n const experimentContext = useContext(ExperimentContext);\n const selection = experimentContext.selection,\n data = experimentContext.data,\n experiment = experimentContext.experiment; // const { model, branch, hpc } = experiment;\n //var currentSelection = \"Node: \"\n\n var currentNode = \"\";\n var selectedNode = null;\n\n if (selection) {\n //console.log(\"Current selection \" + selection)\n selection.map(node => // currentSelection += node + \", \"\n currentNode = node); //console.log(\"Current node \" + currentNode)\n\n selectedNode = data.nodes.find(node => node.id === currentNode); //console.log(\"Selected node\")\n //console.log(\"Data: \" + selectedNode.id + \" \" + selectedNode.platform_name)\n }\n\n return React.createElement(Fragment, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 23\n },\n __self: this\n }, selectedNode && React.createElement(Fragment, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 25\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 26\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-12\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 27\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"card text-white bg-info\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 28\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"card-header text-center py-0 mh-5\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 29\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 30\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 30\n },\n __self: this\n }, selectedNode.id))), React.createElement(\"div\", {\n className: \"card-body py-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 32\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 33\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 34\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 34\n },\n __self: this\n }, \"Date:\"), \" \", selectedNode.date)), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-12\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 38\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 39\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 39\n },\n __self: this\n }, \"Section:\"), \" \", selectedNode.section)))), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 43\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 44\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-8\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 45\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 46\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 46\n },\n __self: this\n }, \"Platform:\"), \" \", selectedNode.platform_name && selectedNode.platform_name, \" \", !selectedNode.platform_name && experiment.hpc)), React.createElement(\"div\", {\n className: \"col-4 text-right\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 48\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 49\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 49\n },\n __self: this\n }, \"c:\", data.max_children, \"/p:\", data.max_parents))))), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 56\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 57\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-6\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 58\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 59\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 59\n },\n __self: this\n }, \"Processors:\"), \" \", selectedNode.processors)), React.createElement(\"div\", {\n className: \"col-6\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 61\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 62\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 62\n },\n __self: this\n }, \"Wallclock:\"), \" \", selectedNode.wallclock)))), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 66\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 67\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-6\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 68\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 69\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 69\n },\n __self: this\n }, \"Level:\"), \" \", selectedNode.level)), React.createElement(\"div\", {\n className: \"col-6\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 71\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 72\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 72\n },\n __self: this\n }, \"Out:\"), \" \", selectedNode.children, \" \", React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 72\n },\n __self: this\n }, \"In:\"), \" \", selectedNode.parents, \" \")))), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 77\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 78\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 78\n },\n __self: this\n }, \"Status:\")), \" \", selectedNode.status)))))), !selectedNode && data && React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 87\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-12\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 88\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"card text-white bg-info\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 89\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"card-header text-center py-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 90\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 91\n },\n __self: this\n }, \"Here goes the Job Id\")), React.createElement(\"div\", {\n className: \"card-body\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 93\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"text-center\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 94\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 95\n },\n __self: this\n }, \"Select a Node to see more information.\")))))));\n};\n\nconst experimentStyle = {\n height: 200\n};\nexport default Selection;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/Selection.js"],"names":["React","useContext","Fragment","ExperimentContext","Selection","experimentContext","selection","data","experiment","currentNode","selectedNode","map","node","nodes","find","id","experimentStyle","date","section","platform_name","hpc","max_children","max_parents","processors","wallclock","level","children","parents","status","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,UAAhB,EAA4BC,QAA5B,QAA4C,OAA5C;AACA,OAAOC,iBAAP,MAA8B,yCAA9B;;AAEA,MAAMC,SAAS,GAAG,MAAM;AACpB,QAAMC,iBAAiB,GAAGJ,UAAU,CAACE,iBAAD,CAApC;AADoB,QAEZG,SAFY,GAEoBD,iBAFpB,CAEZC,SAFY;AAAA,QAEDC,IAFC,GAEoBF,iBAFpB,CAEDE,IAFC;AAAA,QAEKC,UAFL,GAEoBH,iBAFpB,CAEKG,UAFL,EAGpB;AACA;;AACA,MAAIC,WAAW,GAAG,EAAlB;AACA,MAAIC,YAAY,GAAG,IAAnB;;AACA,MAAIJ,SAAJ,EAAe;AACX;AACAA,IAAAA,SAAS,CAACK,GAAV,CAAcC,IAAI,IACd;AACAH,IAAAA,WAAW,GAAGG,IAFlB,EAFW,CAMX;;AACAF,IAAAA,YAAY,GAAGH,IAAI,CAACM,KAAL,CAAWC,IAAX,CAAgBF,IAAI,IAAIA,IAAI,CAACG,EAAL,KAAYN,WAApC,CAAf,CAPW,CAQX;AACA;AACH;;AACD,SACI,oBAAC,QAAD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACSC,YAAY,IACb,oBAAC,QAAD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACK;AAAK,IAAA,SAAS,EAAC,KAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACI;AAAK,IAAA,SAAS,EAAC,QAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACG;AAAK,IAAA,SAAS,EAAC,yBAAf;AAAyC,IAAA,KAAK,EAAEM,eAAhD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACI;AAAK,IAAA,SAAS,EA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AAAA;AAAA;AAAA;AAAA;AAAA,WAArD,OAA2EhB,YAAY,CAACiB,OAAxF,MADJ,CAJJ,CADJ,CAlCJ,EA6CI;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACI;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,eAAP,CADJ,OAC6CjB,YAAY,CAACkB,MAD1D,CA7CJ,CAJJ,CADH,CADJ,CADL,CAFR,EA+DS,CAAClB,YAAD,IAAiBH,IAAjB,IACG;AAAK,IAAA,SAAS,EAAC,KAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACI;AAAK,IAAA,SAAS,EAAC,QAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACI;AAAK,IAAA,SAAS,EAAC,yBAAf;AAAyC,IAAA,KAAK,EAAES,eAAhD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACI;AAAK,IAAA,SAAS,EAAC,8BAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACI;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,4BADJ,CADJ,EAII;AAAK,IAAA,SAAS,EAAC,WAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACI;AAAK,IAAA,SAAS,EAAC,aAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,8CADA,CADJ,CAJJ,CADJ,CADJ,CAhEZ,CADJ;AAqFH,CAvGD;;AAyGA,MAAMA,eAAe,GAAG;AACpBa,EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,eAAezB,SAAf","sourcesContent":["import React, { useContext, Fragment } from 'react'\nimport ExperimentContext from '../context/experiment/experimentContext';\n\nconst Selection = () => {\n const experimentContext = useContext(ExperimentContext);\n const { selection, data, experiment } = experimentContext;\n // const { model, branch, hpc } = experiment;\n //var currentSelection = \"Node: \"\n var currentNode = \"\"\n var selectedNode = null\n if (selection) {\n //console.log(\"Current selection \" + selection)\n selection.map(node => (\n // currentSelection += node + \", \"\n currentNode = node\n ));\n //console.log(\"Current node \" + currentNode)\n selectedNode = data.nodes.find(node => node.id === currentNode) \n //console.log(\"Selected node\")\n //console.log(\"Data: \" + selectedNode.id + \" \" + selectedNode.platform_name)\n } \n return (\n \n {selectedNode &&\n \n
\n
\n
\n
\n {selectedNode.id}\n
\n
\n
\n Date: {selectedNode.date}\n
\n
\n
\n
\n Section: {selectedNode.section}\n
\n
\n
\n
\n
\n
\n Platform: {selectedNode.platform_name && selectedNode.platform_name} {!selectedNode.platform_name && experiment.hpc}\n
\n
\n c:{data.max_children}/p:{data.max_parents}\n
\n
\n
\n {/*
\n Priority: {selectedNode.priority}\n
*/}\n
\n
\n
\n Processors: {selectedNode.processors}\n
\n
\n Wallclock: {selectedNode.wallclock}\n
\n
\n
\n
\n
\n
\n Level: {selectedNode.level}\n
\n
\n Out: {selectedNode.children} In: {selectedNode.parents} \n
\n \n
\n
\n
\n Status: {selectedNode.status}\n
\n
\n
\n
\n
\n
\n } \n {!selectedNode && data &&\n
\n
\n
\n
\n Here goes the Job Id\n
\n
\n
\n Select a Node to see more information. \n
\n
\n
\n
\n
\n } \n
\n \n \n\n )\n}\n\nconst experimentStyle = {\n height: 200\n };\n\nexport default Selection;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/5cd850fa7af6479adedd58fbae45c457.json b/node_modules/.cache/babel-loader/5cd850fa7af6479adedd58fbae45c457.json new file mode 100644 index 0000000000000000000000000000000000000000..70bc40850caa9ccb844e9940a59b4c1571f7a68a --- /dev/null +++ b/node_modules/.cache/babel-loader/5cd850fa7af6479adedd58fbae45c457.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js\";\nimport React, { Component } from \"react\"; // import vis from \"vis-network\";\n\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n constructor(...args) {\n super(...args);\n\n this.updateVisNodes = nodes => {\n this.props.setVisData(nodes);\n };\n }\n\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else if (nextProps.data && this.props.data && nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp) {\n console.log(\"Rerendering\");\n return true;\n } else if (nextProps.loadingGraph !== this.props.loadingGraph) {\n return true;\n } else {\n return false;\n }\n }\n\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n render() {\n if (this.props.loadingGraph) return React.createElement(Spinner, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 32\n },\n __self: this\n });\n\n if (this.props.data == null) {\n return React.createElement(\"div\", {\n className: \"card-body text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 35\n },\n __self: this\n }, React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Press \", React.createElement(\"span\", {\n className: \"badge badge-info\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Show Graph\"), \" to see the graph representation of the experiment.\"), React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"If the experiment is running, press \", React.createElement(\"span\", {\n className: \"badge badge-dark\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"Start Job Monitor\"), \" to start a live tracker of the changes on the experiment's jobs. This process will automatically update the graph's nodes colors and show a log of the detected changes.\"));\n }\n\n var nodes_array = [];\n var edges_array = [];\n\n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: {\n background: node.status_color,\n border: \"black\"\n },\n level: node.level\n }));\n this.props.data.edges.map(edge => edges_array.push({\n from: edge.from,\n to: edge.to\n }));\n }\n\n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n const options = {\n edges: {\n arrows: {\n to: {\n enabled: true\n }\n }\n },\n layout: {\n improvedLayout: true,\n hierarchical: {\n enabled: true,\n nodeSpacing: 250,\n edgeMinimization: false,\n blockShifting: true,\n parentCentralization: true,\n direction: 'UD'\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true\n },\n physics: {\n enabled: false\n },\n nodes: {\n shape: 'dot'\n }\n };\n const graph = {\n nodes: nodes,\n edges: edges\n };\n\n class VisNetwork extends Component {\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else {\n return false;\n }\n }\n\n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", params => {\n //console.log(params);\n if (params.nodes) {\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n });\n } // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n\n\n render() {\n return React.createElement(\"div\", {\n className: \"card-body p-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 130\n },\n __self: this\n }, React.createElement(\"div\", {\n ref: \"myRef\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 131\n },\n __self: this\n }));\n }\n\n }\n\n this.updateVisNodes(nodes);\n return React.createElement(VisNetwork, {\n graph: graph,\n options: options,\n updateSelection: this.props.updateSelection,\n shouldUpdateGraph: this.props.shouldUpdateGraph,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 139\n },\n __self: this\n });\n }\n\n}\n\nconst experimentStyle = {\n height: 600\n};\nexport default GraphNativeRep;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js"],"names":["React","Component","Spinner","vis","GraphNativeRep","updateVisNodes","nodes","props","setVisData","shouldComponentUpdate","nextProps","nextState","shouldUpdateGraph","data","pkl_timestamp","console","log","loadingGraph","componentWillUnmount","cleanGraphData","render","nodes_array","edges_array","edges","map","node","push","id","label","color","background","status_color","border","level","edge","from","to","DataSet","options","arrows","enabled","layout","improvedLayout","hierarchical","nodeSpacing","edgeMinimization","blockShifting","parentCentralization","direction","interaction","dragNodes","hoverConnectedEdges","navigationButtons","physics","shape","graph","VisNetwork","componentDidMount","network","Network","refs","myRef","on","params","updateSelection","experimentStyle","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,SAAhB,QAAiC,OAAjC,C,CACA;;AACA,OAAOC,OAAP,MAAoB,mBAApB;AACA,OAAOC,GAAP,MAAgB,KAAhB;;AAEA,MAAMC,cAAN,SAA6BH,SAA7B,CAAuC;AAAA;AAAA;;AAAA,SAmBnCI,cAnBmC,GAmBjBC,KAAD,IAAW;AACxB,WAAKC,KAAL,CAAWC,UAAX,CAAsBF,KAAtB;AACH,KArBkC;AAAA;;AAEnCG,EAAAA,qBAAqB,CAACC,SAAD,EAAYC,SAAZ,EAAsB;AACvC,QAAI,KAAKJ,KAAL,CAAWK,iBAAX,KAAiC,IAArC,EAA0C;AACtC,aAAO,IAAP;AACD,KAFH,MAEQ,IAAIF,SAAS,CAACG,IAAV,IAAkB,KAAKN,KAAL,CAAWM,IAA7B,IAAsCH,SAAS,CAACG,IAAV,CAAeC,aAAf,KAAiC,KAAKP,KAAL,CAAWM,IAAX,CAAgBC,aAA3F,EAA0G;AAC9GC,MAAAA,OAAO,CAACC,GAAR,CAAY,aAAZ;AACA,aAAO,IAAP;AACD,KAHK,MAGA,IAAIN,SAAS,CAACO,YAAV,KAA2B,KAAKV,KAAL,CAAWU,YAA1C,EAAuD;AAC3D,aAAO,IAAP;AACD,KAFK,MAED;AACH,aAAO,KAAP;AACD;AACN;;AACDC,EAAAA,oBAAoB,GAAG;AACnBH,IAAAA,OAAO,CAACC,GAAR,CAAY,YAAZ;AACA,SAA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B;AAIA,eAAe9D,cAAf","sourcesContent":["import React, { Component } from \"react\";\n// import vis from \"vis-network\";\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n\n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true\n }else if (nextProps.data && this.props.data && (nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp)){\n console.log(\"Rerendering\")\n return true;\n }else if (nextProps.loadingGraph !== this.props.loadingGraph){\n return true; \n }else{\n return false;\n }\n }\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n updateVisNodes = (nodes) => {\n this.props.setVisData(nodes);\n }\n\n\n\n render () {\n if (this.props.loadingGraph) return ;\n if (this.props.data == null){\n return (\n
\n

Press Show Graph to see the graph representation of the experiment.

\n

If the experiment is running, press Start Job Monitor to start a live tracker of the changes on the experiment's jobs.\n This process will automatically update the graph's nodes colors and show a log of the detected changes.\n

\n
\n );\n }\n\n var nodes_array = [];\n var edges_array = [];\n \n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: { background: node.status_color, border: \"black\" },\n level: node.level,\n })\n );\n \n this.props.data.edges.map(edge => \n edges_array.push({ from: edge.from, to: edge.to })\n );\n }\n \n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n\n\n const options = {\n edges: {\n arrows: {\n to: { enabled: true }\n }\n },\n layout: {\n improvedLayout: true,\n hierarchical: {\n enabled: true,\n nodeSpacing: 250,\n edgeMinimization: false,\n blockShifting: true,\n parentCentralization: true,\n direction: 'UD',\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true,\n },\n physics: {\n enabled: false,\n },\n nodes: {\n shape: 'dot',\n }\n };\n \n const graph = {\n nodes : nodes,\n edges : edges,\n };\n\n class VisNetwork extends Component {\n \n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true;\n } else {\n return false;\n }\n }\n \n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", (params) => {\n //console.log(params);\n if (params.nodes){\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n \n });\n }\n \n // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n \n render() { \n return (\n
\n
\n
\n );\n }\n }\n\n this.updateVisNodes(nodes);\n \n return ;\n\n }\n\n\n \n\n \n\n \n \n\n \n\n}\n\nconst experimentStyle = {\n height: 600\n };\n\nexport default GraphNativeRep;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/5d00d14a164a4bca4a1f50b15aebbc20.json b/node_modules/.cache/babel-loader/5d00d14a164a4bca4a1f50b15aebbc20.json new file mode 100644 index 0000000000000000000000000000000000000000..3d3ae8f3cd514260be8d477993d8e970d7b8f267 --- /dev/null +++ b/node_modules/.cache/babel-loader/5d00d14a164a4bca4a1f50b15aebbc20.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js\";\nimport React, { Component } from \"react\"; // import vis from \"vis-network\";\n\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n constructor(...args) {\n super(...args);\n\n this.updateVisNodes = nodes => {\n this.props.setVisData(nodes);\n };\n }\n\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else if (nextProps.data && this.props.data && nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp) {\n console.log(\"Rerendering\");\n return true;\n } else if (nextProps.loadingGraph !== this.props.loadingGraph) {\n return true;\n } else {\n return false;\n }\n }\n\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n render() {\n if (this.props.loadingGraph) return React.createElement(Spinner, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 32\n },\n __self: this\n });\n\n if (this.props.data == null) {\n return React.createElement(\"div\", {\n className: \"card-body text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 35\n },\n __self: this\n }, React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Press \", React.createElement(\"span\", {\n className: \"badge badge-info\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Show Graph\"), \" to see the graph representation of the experiment.\"), React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"If the experiment is running, press \", React.createElement(\"span\", {\n className: \"badge badge-dark\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"Start Job Monitor\"), \" to start a live tracker of the changes on the experiment's jobs. This process will automatically update the graph's nodes colors and show a log of the detected changes.\"));\n }\n\n var nodes_array = [];\n var edges_array = [];\n\n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: {\n background: node.status_color,\n border: \"black\"\n },\n level: node.level\n }));\n this.props.data.edges.map(edge => edges_array.push({\n from: edge.from,\n to: edge.to\n }));\n }\n\n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n const options = {\n edges: {\n arrows: {\n to: {\n enabled: true\n }\n }\n },\n layout: {\n improvedLayout: true,\n hierarchical: {\n nodeSpacing: 250,\n blockShifting: true,\n edgeMinimization: true,\n parentCentralization: true,\n direction: 'UD'\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true\n },\n physics: {\n enabled: false\n },\n nodes: {\n shape: 'dot'\n }\n };\n const graph = {\n nodes: nodes,\n edges: edges\n };\n\n class VisNetwork extends Component {\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else {\n return false;\n }\n }\n\n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", params => {\n //console.log(params);\n if (params.nodes) {\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n });\n } // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n\n\n render() {\n return React.createElement(\"div\", {\n className: \"card-body p-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 129\n },\n __self: this\n }, React.createElement(\"div\", {\n ref: \"myRef\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 130\n },\n __self: this\n }));\n }\n\n }\n\n this.updateVisNodes(nodes);\n return React.createElement(VisNetwork, {\n graph: graph,\n options: options,\n updateSelection: this.props.updateSelection,\n shouldUpdateGraph: this.props.shouldUpdateGraph,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 138\n },\n __self: this\n });\n }\n\n}\n\nconst experimentStyle = {\n height: 600\n};\nexport default GraphNativeRep;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js"],"names":["React","Component","Spinner","vis","GraphNativeRep","updateVisNodes","nodes","props","setVisData","shouldComponentUpdate","nextProps","nextState","shouldUpdateGraph","data","pkl_timestamp","console","log","loadingGraph","componentWillUnmount","cleanGraphData","render","nodes_array","edges_array","edges","map","node","push","id","label","color","background","status_color","border","level","edge","from","to","DataSet","options","arrows","enabled","layout","improvedLayout","hierarchical","nodeSpacing","blockShifting","edgeMinimization","parentCentralization","direction","interaction","dragNodes","hoverConnectedEdges","navigationButtons","physics","shape","graph","VisNetwork","componentDidMount","network","Network","refs","myRef","on","params","updateSelection","experimentStyle","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,SAAhB,QAAiC,OAAjC,C,C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AACI,EAAR,CAAW,OAAX,EAAqBC,MAAD,IAAY;AAC5B;AACA,cAAIA,MAAM,CAACzD,KAAX,EAAiB;AACb;AACA,iBAAKC,KAAL,CAAWyD,eAAX,CAA2BD,MAAM,CAACzD,KAAlC;AACH;AAEJ,SAPD;AAQH,OApB8B,CAsB/B;AACA;AACA;AACA;;;AAEAc,MAAAA,MAAM,GAAG;AACL,eACI;AAAK,UAAA,SAAS,EAAC,eAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,WACI;AAAK,UAAA,GAAG,EAAC,OAAT;AAAiB,UAAA,KAAK,EAAE6C,eAAxB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,UADJ,CADJ;AAKH;;AAjC8B;;AAoCnC,SAAK5D,cAAL,CAAoBC,KAApB;AAEA,WAAO,oBAAC,UAAD;AACH,MAAA,KAAK,EAAEiD,KADJ;AAEH,MAAA,OAAO,EAAEjB,OAFN;AAGH,MAAA,eAAe,EAAE,KAAK/B,KAAL,CAAWyD,eAHzB;AAIH,MAAA,iBAAiB,EAAE,KAAKzD,KAAL,CAAWK,iBAJ3B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAAP;AAOH;;AA3IkC;;AAyJvC,MAAMqD,eAAe,GAAG;AACpBC,EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,eAAe9D,cAAf","sourcesContent":["import React, { Component } from \"react\";\n// import vis from \"vis-network\";\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n\n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true\n }else if (nextProps.data && this.props.data && (nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp)){\n console.log(\"Rerendering\")\n return true;\n }else if (nextProps.loadingGraph !== this.props.loadingGraph){\n return true; \n }else{\n return false;\n }\n }\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n updateVisNodes = (nodes) => {\n this.props.setVisData(nodes);\n }\n\n\n\n render () {\n if (this.props.loadingGraph) return ;\n if (this.props.data == null){\n return (\n
\n

Press Show Graph to see the graph representation of the experiment.

\n

If the experiment is running, press Start Job Monitor to start a live tracker of the changes on the experiment's jobs.\n This process will automatically update the graph's nodes colors and show a log of the detected changes.\n

\n
\n );\n }\n\n var nodes_array = [];\n var edges_array = [];\n \n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: { background: node.status_color, border: \"black\" },\n level: node.level,\n })\n );\n \n this.props.data.edges.map(edge => \n edges_array.push({ from: edge.from, to: edge.to })\n );\n }\n \n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n\n\n const options = {\n edges: {\n arrows: {\n to: { enabled: true }\n }\n },\n layout: {\n improvedLayout: true,\n hierarchical: {\n nodeSpacing: 250,\n blockShifting: true,\n edgeMinimization: true,\n parentCentralization: true,\n direction: 'UD',\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true,\n },\n physics: {\n enabled: false,\n },\n nodes: {\n shape: 'dot',\n }\n };\n \n const graph = {\n nodes : nodes,\n edges : edges,\n };\n\n class VisNetwork extends Component {\n \n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true;\n } else {\n return false;\n }\n }\n \n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", (params) => {\n //console.log(params);\n if (params.nodes){\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n \n });\n }\n \n // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n \n render() { \n return (\n
\n
\n
\n );\n }\n }\n\n this.updateVisNodes(nodes);\n \n return ;\n\n }\n\n\n \n\n \n\n \n \n\n \n\n}\n\nconst experimentStyle = {\n height: 600\n };\n\nexport default GraphNativeRep;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/5d021b83129310a287c44641ef15e7c1.json b/node_modules/.cache/babel-loader/5d021b83129310a287c44641ef15e7c1.json new file mode 100644 index 0000000000000000000000000000000000000000..f0a433374cd9b90d27af1db73c77fddd22bd37be --- /dev/null +++ b/node_modules/.cache/babel-loader/5d021b83129310a287c44641ef15e7c1.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/Selection.js\";\nimport React, { useContext, Fragment } from 'react';\nimport ExperimentContext from '../context/experiment/experimentContext';\n\nconst Selection = () => {\n const experimentContext = useContext(ExperimentContext);\n const selection = experimentContext.selection,\n data = experimentContext.data,\n experiment = experimentContext.experiment; // const { model, branch, hpc } = experiment;\n //var currentSelection = \"Node: \"\n\n var currentNode = \"\";\n var selectedNode = null;\n\n if (selection) {\n //console.log(\"Current selection \" + selection)\n selection.map(node => // currentSelection += node + \", \"\n currentNode = node); //console.log(\"Current node \" + currentNode)\n\n selectedNode = data.nodes.find(node => node.id === currentNode); //console.log(\"Selected node\")\n //console.log(\"Data: \" + selectedNode.id + \" \" + selectedNode.platform_name)\n }\n\n return React.createElement(Fragment, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 23\n },\n __self: this\n }, selectedNode && React.createElement(Fragment, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 25\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 26\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-12\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 27\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"card text-white bg-info\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 28\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"card-header text-center p-0\",\n style: headerCard,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 29\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"mh-100 px-0 mx-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 30\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 31\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 31\n },\n __self: this\n }, selectedNode.id)))), React.createElement(\"div\", {\n className: \"card-body py-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 34\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"text-center px-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 35\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Date:\"), \" \", selectedNode.date)), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 38\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 39\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-12 px-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 40\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 41\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 41\n },\n __self: this\n }, \"Section:\"), \" \", selectedNode.section)))), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 45\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 46\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-8 px-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 47\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 48\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 48\n },\n __self: this\n }, \"Platform:\"), \" \", selectedNode.platform_name && selectedNode.platform_name, \" \", !selectedNode.platform_name && experiment.hpc)), React.createElement(\"div\", {\n className: \"col-4 text-right\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 50\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 51\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 51\n },\n __self: this\n }, \"c:\", data.max_children, \"/p:\", data.max_parents))))), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 58\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 59\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-6 px-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 60\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 61\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 61\n },\n __self: this\n }, \"Processors:\"), \" \", selectedNode.processors)), React.createElement(\"div\", {\n className: \"col-6\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 63\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 64\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 64\n },\n __self: this\n }, \"Wallclock:\"), \" \", selectedNode.wallclock)))), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 68\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 69\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-6 px-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 70\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 71\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 71\n },\n __self: this\n }, \"Level:\"), \" \", selectedNode.level)), React.createElement(\"div\", {\n className: \"col-6\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 73\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 74\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 74\n },\n __self: this\n }, \"Out:\"), \" \", selectedNode.children, \" \", React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 74\n },\n __self: this\n }, \"In:\"), \" \", selectedNode.parents, \" \")))), React.createElement(\"div\", {\n className: \"text-center px-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 79\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 80\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 80\n },\n __self: this\n }, \"Status:\")), \" \", selectedNode.status)))))), !selectedNode && data && React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 89\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-12\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 90\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"card text-white bg-info\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 91\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"card-header text-center py-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 92\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 93\n },\n __self: this\n }, \"Here goes the Job Id\")), React.createElement(\"div\", {\n className: \"card-body\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 95\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"text-center\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 96\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 97\n },\n __self: this\n }, \"Select a Node to see more information.\")))))));\n};\n\nconst experimentStyle = {\n height: 200\n};\nconst headerCard = {\n height: 30\n};\nexport default Selection;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/Selection.js"],"names":["React","useContext","Fragment","ExperimentContext","Selection","experimentContext","selection","data","experiment","currentNode","selectedNode","map","node","nodes","find","id","experimentStyle","headerCard","date","section","platform_name","hpc","max_children","max_parents","processors","wallclock","level","children","parents","status","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,UAAhB,EAA4BC,QAA5B,QAA4C,OAA5C;AACA,OAAOC,iBAAP,MAA8B,yCAA9B;;AAEA,MAAMC,SAAS,GAAG,MAAM;AACpB,QAAMC,iBAAiB,GAAGJ,UAAU,CAACE,iBAAD,CAApC;AADoB,QAEZG,SAFY,GAEoBD,iBAFpB,CAEZC,SAFY;AAAA,QAEDC,IAFC,GAEoBF,iBAFpB,CAEDE,IAFC;AAAA,QAEKC,UAFL,GAEoBH,iBAFpB,CAEKG,UAFL,EAGpB;AACA;;AACA,MAAIC,WAAW,GAAG,EAAlB;AACA,MAAIC,YAAY,GAAG,IAAnB;;AACA,MAAIJ,SAAJ,EAAe;AACX;AACAA,IAAAA,SAAS,CAACK,GAAV,CAAcC,IAAI,IACd;AACAH,IAAAA,WAAW,GAAGG,IAFlB,EAFW,CAMX;;AACAF,IAAAA,YAAY,GAAGH,IAAI,CAACM,KAAL,CAAWC,IAAX,CAAgBF,IAAI,IAAIA,IAAI,CAACG,EAAL,KAAYN,WAApC,CAAf,CAPW,CAQX;AACA;AACH;;AACD,SAC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BADJ,CADJ,EAII;AAAK,IAAA,SAAS,EAAC,WAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACI;AAAK,IAAA,SAAS,EAAC,aAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,8CADA,CADJ,CAJJ,CADJ,CADJ,CAlEZ,CADJ;AAuFH,CAzGD;;AA2GA,MAAMA,eAAe,GAAG;AACpBc,EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,MAAMb,UAAU,GAAG;AACfa,EAAAA,MAAM,EAAE;AADO,CAAnB;AAIA,eAAe1B,SAAf","sourcesContent":["import React, { useContext, Fragment } from 'react'\nimport ExperimentContext from '../context/experiment/experimentContext';\n\nconst Selection = () => {\n const experimentContext = useContext(ExperimentContext);\n const { selection, data, experiment } = experimentContext;\n // const { model, branch, hpc } = experiment;\n //var currentSelection = \"Node: \"\n var currentNode = \"\"\n var selectedNode = null\n if (selection) {\n //console.log(\"Current selection \" + selection)\n selection.map(node => (\n // currentSelection += node + \", \"\n currentNode = node\n ));\n //console.log(\"Current node \" + currentNode)\n selectedNode = data.nodes.find(node => node.id === currentNode) \n //console.log(\"Selected node\")\n //console.log(\"Data: \" + selectedNode.id + \" \" + selectedNode.platform_name)\n } \n return (\n \n {selectedNode &&\n \n
\n
\n
\n
\n
\n {selectedNode.id}\n
\n
\n
\n
\n Date: {selectedNode.date}\n
\n
\n
\n
\n Section: {selectedNode.section}\n
\n
\n
\n
\n
\n
\n Platform: {selectedNode.platform_name && selectedNode.platform_name} {!selectedNode.platform_name && experiment.hpc}\n
\n
\n c:{data.max_children}/p:{data.max_parents}\n
\n
\n
\n {/*
\n Priority: {selectedNode.priority}\n
*/}\n
\n
\n
\n Processors: {selectedNode.processors}\n
\n
\n Wallclock: {selectedNode.wallclock}\n
\n
\n
\n
\n
\n
\n Level: {selectedNode.level}\n
\n
\n Out: {selectedNode.children} In: {selectedNode.parents} \n
\n \n
\n
\n
\n Status: {selectedNode.status}\n
\n
\n
\n
\n
\n
\n } \n {!selectedNode && data &&\n
\n
\n
\n
\n Here goes the Job Id\n
\n
\n
\n Select a Node to see more information. \n
\n
\n
\n
\n
\n } \n
\n \n \n\n )\n}\n\nconst experimentStyle = {\n height: 200\n };\n\nconst headerCard = {\n height: 30\n}\n\nexport default Selection;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/5e3662d57a998ebf6d5cd004d41baa55.json b/node_modules/.cache/babel-loader/5e3662d57a998ebf6d5cd004d41baa55.json new file mode 100644 index 0000000000000000000000000000000000000000..62b2520836756a454d4a3458dda8d71e40a809ee --- /dev/null +++ b/node_modules/.cache/babel-loader/5e3662d57a998ebf6d5cd004d41baa55.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js\";\nimport React, { Component } from \"react\"; // import vis from \"vis-network\";\n\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n constructor(...args) {\n super(...args);\n\n this.updateVisNodes = nodes => {\n this.props.setVisData(nodes);\n };\n }\n\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else if (nextProps.data && this.props.data && nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp) {\n console.log(\"Rerendering\");\n return true;\n } else if (nextProps.loadingGraph !== this.props.loadingGraph) {\n return true;\n } else {\n return false;\n }\n }\n\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n render() {\n if (this.props.loadingGraph) return React.createElement(Spinner, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 32\n },\n __self: this\n });\n\n if (this.props.data == null) {\n return React.createElement(\"div\", {\n className: \"card-body text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 35\n },\n __self: this\n }, React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Press \", React.createElement(\"span\", {\n className: \"badge badge-info\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Show Graph\"), \" to see the graph representation of the experiment.\"), React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"If the experiment is running, press \", React.createElement(\"span\", {\n className: \"badge badge-dark\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"Start Job Monitor\"), \" to start a live tracker of the changes on the experiment's jobs. This process will automatically update the graph's nodes colors and show a log of the detected changes.\"));\n }\n\n var nodes_array = [];\n var edges_array = [];\n\n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: {\n background: node.status_color,\n border: \"black\"\n },\n level: node.level\n }));\n this.props.data.edges.map(edge => edges_array.push({\n from: edge.from,\n to: edge.to\n }));\n }\n\n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n const options = {\n edges: {\n arrows: {\n to: {\n enabled: true\n }\n }\n },\n layout: {\n improvedLayout: true,\n hierarchical: {\n nodeSpacing: 250,\n edgeMinimization: false,\n blockShifting: true,\n parentCentralization: true,\n sortMethod: 'directed',\n direction: 'UD'\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true\n },\n physics: {\n enabled: false\n },\n nodes: {\n shape: 'dot'\n }\n };\n const graph = {\n nodes: nodes,\n edges: edges\n };\n\n class VisNetwork extends Component {\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else {\n return false;\n }\n }\n\n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", params => {\n //console.log(params);\n if (params.nodes) {\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n });\n } // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n\n\n render() {\n return React.createElement(\"div\", {\n className: \"card-body p-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 131\n },\n __self: this\n }, React.createElement(\"div\", {\n ref: \"myRef\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 132\n },\n __self: this\n }));\n }\n\n }\n\n this.updateVisNodes(nodes);\n return React.createElement(VisNetwork, {\n graph: graph,\n options: options,\n updateSelection: this.props.updateSelection,\n shouldUpdateGraph: this.props.shouldUpdateGraph,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 140\n },\n __self: this\n });\n }\n\n}\n\nconst experimentStyle = {\n height: 600\n};\nexport default GraphNativeRep;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js"],"names":["React","Component","Spinner","vis","GraphNativeRep","updateVisNodes","nodes","props","setVisData","shouldComponentUpdate","nextProps","nextState","shouldUpdateGraph","data","pkl_timestamp","console","log","loadingGraph","componentWillUnmount","cleanGraphData","render","nodes_array","edges_array","edges","map","node","push","id","label","color","background","status_color","border","level","edge","from","to","DataSet","options","arrows","enabled","layout","improvedLayout","hierarchical","nodeSpacing","edgeMinimization","blockShifting","parentCentralization","sortMethod","direction","interaction","dragNodes","hoverConnectedEdges","navigationButtons","physics","shape","graph","VisNetwork","componentDidMount","network","Network","refs","myRef","on","params","updateSelection","experimentStyle","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,SAAhB,QAAiC,OAAjC,C,CACA;;AACA,OAAOC,OAAP,MAAoB,mBAApB;AACA,OAAOC,GAAP,MAAgB,KAAhB;;AAEA,MAAMC,cAAN,SAA6BH,SAA7B,CAAuC;AAAA;AAAA;;AAAA,SAmBnCI,cAnBmC,GAmBjBC,KAAD,IAAW;AACxB,WAAKC,KAAL,CAA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H;AAEJ,SAPD;AAQH,OApB8B,CAsB/B;AACA;AACA;AACA;;;AAEAc,MAAAA,MAAM,GAAG;AACL,eACI;AAAK,UAAA,SAAS,EAAC,eAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,WACI;AAAK,UAAA,GAAG,EAAC,OAAT;AAAiB,UAAA,KAAK,EAAE8C,eAAxB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,UADJ,CADJ;AAKH;;AAjC8B;;AAoCnC,SAAK7D,cAAL,CAAoBC,KAApB;AAEA,WAAO,oBAAC,UAAD;AACH,MAAA,KAAK,EAAEkD,KADJ;AAEH,MAAA,OAAO,EAAElB,OAFN;AAGH,MAAA,eAAe,EAAE,KAAK/B,KAAL,CAAW0D,eAHzB;AAIH,MAAA,iBAAiB,EAAE,KAAK1D,KAAL,CAAWK,iBAJ3B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAAP;AAOH;;AA7IkC;;AA2JvC,MAAMsD,eAAe,GAAG;AACpBC,EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,eAAe/D,cAAf","sourcesContent":["import React, { Component } from \"react\";\n// import vis from \"vis-network\";\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n\n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true\n }else if (nextProps.data && this.props.data && (nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp)){\n console.log(\"Rerendering\")\n return true;\n }else if (nextProps.loadingGraph !== this.props.loadingGraph){\n return true; \n }else{\n return false;\n }\n }\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n updateVisNodes = (nodes) => {\n this.props.setVisData(nodes);\n }\n\n\n\n render () {\n if (this.props.loadingGraph) return ;\n if (this.props.data == null){\n return (\n
\n

Press Show Graph to see the graph representation of the experiment.

\n

If the experiment is running, press Start Job Monitor to start a live tracker of the changes on the experiment's jobs.\n This process will automatically update the graph's nodes colors and show a log of the detected changes.\n

\n
\n );\n }\n\n var nodes_array = [];\n var edges_array = [];\n \n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: { background: node.status_color, border: \"black\" },\n level: node.level,\n })\n );\n \n this.props.data.edges.map(edge => \n edges_array.push({ from: edge.from, to: edge.to })\n );\n }\n \n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n\n\n const options = {\n edges: {\n arrows: {\n to: { enabled: true }\n }\n },\n layout: {\n improvedLayout: true,\n hierarchical: {\n \n nodeSpacing: 250,\n edgeMinimization: false,\n blockShifting: true,\n parentCentralization: true,\n sortMethod: 'directed',\n direction: 'UD',\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true,\n },\n physics: {\n enabled: false,\n },\n nodes: {\n shape: 'dot',\n }\n };\n \n const graph = {\n nodes : nodes,\n edges : edges,\n };\n\n class VisNetwork extends Component {\n \n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true;\n } else {\n return false;\n }\n }\n \n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", (params) => {\n //console.log(params);\n if (params.nodes){\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n \n });\n }\n \n // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n \n render() { \n return (\n
\n
\n
\n );\n }\n }\n\n this.updateVisNodes(nodes);\n \n return ;\n\n }\n\n\n \n\n \n\n \n \n\n \n\n}\n\nconst experimentStyle = {\n height: 600\n };\n\nexport default GraphNativeRep;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/5f7495b4572b0e68225c14c23fc8d138.json b/node_modules/.cache/babel-loader/5f7495b4572b0e68225c14c23fc8d138.json new file mode 100644 index 0000000000000000000000000000000000000000..7be9afd47957b56d7ed2563c41fc2c411666a3c8 --- /dev/null +++ b/node_modules/.cache/babel-loader/5f7495b4572b0e68225c14c23fc8d138.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js\";\nimport React, { Component } from \"react\"; // import vis from \"vis-network\";\n\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n constructor(...args) {\n super(...args);\n\n this.updateVisNodes = nodes => {\n this.props.setVisData(nodes);\n };\n }\n\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else if (nextProps.data && this.props.data && nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp) {\n console.log(\"Rerendering\");\n return true;\n } else if (nextProps.loadingGraph !== this.props.loadingGraph) {\n return true;\n } else {\n return false;\n }\n }\n\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n render() {\n if (this.props.loadingGraph) return React.createElement(Spinner, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 32\n },\n __self: this\n });\n\n if (this.props.data == null) {\n return React.createElement(\"div\", {\n className: \"card-body text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 35\n },\n __self: this\n }, React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Press \", React.createElement(\"span\", {\n className: \"badge badge-info\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Show Graph\"), \" to see the graph representation of the experiment.\"), React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"If the experiment is running, press \", React.createElement(\"span\", {\n className: \"badge badge-dark\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"Start Job Monitor\"), \" to start a live tracker of the changes on the experiment's jobs. This process will automatically update the graph's nodes colors and show a log of the detected changes.\"));\n }\n\n var nodes_array = [];\n var edges_array = [];\n\n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: {\n background: node.status_color,\n border: \"black\"\n },\n level: node.level\n }));\n this.props.data.edges.map(edge => edges_array.push({\n from: edge.from,\n to: edge.to\n }));\n }\n\n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n const options = {\n edges: {\n arrows: {\n to: {\n enabled: true\n }\n }\n },\n layout: {\n //improvedLayout: true,\n hierarchical: {\n nodeSpacing: 190,\n blockShifting: true,\n edgeMinimization: false,\n parentCentralization: true,\n sortMethod: 'hubsize',\n direction: 'UD'\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true\n },\n physics: {\n enabled: false\n },\n nodes: {\n shape: 'dot',\n font: {\n size: 10\n }\n }\n };\n const graph = {\n nodes: nodes,\n edges: edges\n };\n\n class VisNetwork extends Component {\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else {\n return false;\n }\n }\n\n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", params => {\n //console.log(params);\n if (params.nodes) {\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n });\n } // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n\n\n render() {\n return React.createElement(\"div\", {\n className: \"card-body p-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 133\n },\n __self: this\n }, React.createElement(\"div\", {\n ref: \"myRef\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 134\n },\n __self: this\n }));\n }\n\n }\n\n this.updateVisNodes(nodes);\n return React.createElement(VisNetwork, {\n graph: graph,\n options: options,\n updateSelection: this.props.updateSelection,\n shouldUpdateGraph: this.props.shouldUpdateGraph,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 142\n },\n __self: this\n });\n }\n\n}\n\nconst experimentStyle = {\n height: 600\n};\nexport default GraphNativeRep;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js"],"names":["React","Component","Spinner","vis","GraphNativeRep","updateVisNodes","nodes","props","setVisData","shouldComponentUpdate","nextProps","nextState","shouldUpdateGraph","data","pkl_timestamp","console","log","loadingGraph","componentWillUnmount","cleanGraphData","render","nodes_array","edges_array","edges","map","node","push","id","label","color","background","status_color","border","level","edge","from","to","DataSet","options","arrows","enabled","layout","hierarchical","nodeSpacing","blockShifting","edgeMinimization","parentCentralization","sortMethod","direction","interaction","dragNodes","hoverConnectedEdges","navigationButtons","physics","shape","font","size","graph","VisNetwork","componentDidMount","network","Network","refs","myRef","on","params","updateSelection","experimentStyle","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,SAAhB,QAAiC,OAAjC,C,CACA;;AACA,OAAOC,OAAP,MAAoB,mBAApB;AACA,OAAOC,GAAP,MAAgB,KAAhB;;AAEA,MAAMC,cAAN,SAA6BH,SAA7B,CAAuC;AAAA;AAAA;;AAAA,SAmBnCI,cAnBmC,GAmBjBC,KAAD,IAAW;AACxB,WAAKC,KAAL,CAAWC,UAAX,CAAsBF,KAAtB;AACH,KArBkC;AAAA;;AAEnCG,EAAAA,qBAAqB,CAACC,SAAD,EAAYC,SAAZ,EAAsB;AACvC,QAAI,KAAKJ,KAAL,CAAWK,iBAAX,KAAiC,IAArC,EAA0C;AACtC,aAAO,IAAP;AACD,KAFH,MAEQ,IAAIF,SAAS,CAACG,IAAV,IAAkB,KAAKN,KAAL,CAAWM,IAA7B,IAAsCH,SAAS,CAACG,IAAV,CAAeC,aAAf,KAAiC,KAAKP,KAAL,CAAWM,IAAX,CAAgBC,aA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AAL,CAAoBC,KAApB;AAEA,WAAO,oBAAC,UAAD;AACH,MAAA,KAAK,EAAEmD,KADJ;AAEH,MAAA,OAAO,EAAEnB,OAFN;AAGH,MAAA,eAAe,EAAE,KAAK/B,KAAL,CAAW2D,eAHzB;AAIH,MAAA,iBAAiB,EAAE,KAAK3D,KAAL,CAAWK,iBAJ3B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAAP;AAOH;;AA/IkC;;AA6JvC,MAAMuD,eAAe,GAAG;AACpBC,EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,eAAehE,cAAf","sourcesContent":["import React, { Component } from \"react\";\n// import vis from \"vis-network\";\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n\n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true\n }else if (nextProps.data && this.props.data && (nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp)){\n console.log(\"Rerendering\")\n return true;\n }else if (nextProps.loadingGraph !== this.props.loadingGraph){\n return true; \n }else{\n return false;\n }\n }\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n updateVisNodes = (nodes) => {\n this.props.setVisData(nodes);\n }\n\n\n\n render () {\n if (this.props.loadingGraph) return ;\n if (this.props.data == null){\n return (\n
\n

Press Show Graph to see the graph representation of the experiment.

\n

If the experiment is running, press Start Job Monitor to start a live tracker of the changes on the experiment's jobs.\n This process will automatically update the graph's nodes colors and show a log of the detected changes.\n

\n
\n );\n }\n\n var nodes_array = [];\n var edges_array = [];\n \n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: { background: node.status_color, border: \"black\" },\n level: node.level,\n })\n );\n \n this.props.data.edges.map(edge => \n edges_array.push({ from: edge.from, to: edge.to })\n );\n }\n \n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n\n\n const options = {\n edges: {\n arrows: {\n to: { enabled: true }\n }\n },\n layout: {\n //improvedLayout: true,\n hierarchical: {\n nodeSpacing: 190,\n blockShifting: true,\n edgeMinimization: false,\n parentCentralization: true,\n sortMethod: 'hubsize',\n direction: 'UD',\n }\n }, \n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true,\n },\n physics: {\n enabled: false,\n },\n nodes: {\n shape: 'dot',\n font: {\n size: 10,\n },\n }\n };\n \n const graph = {\n nodes : nodes,\n edges : edges,\n };\n\n class VisNetwork extends Component {\n \n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true;\n } else {\n return false;\n }\n }\n \n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", (params) => {\n //console.log(params);\n if (params.nodes){\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n \n });\n }\n \n // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n \n render() { \n return (\n
\n
\n
\n );\n }\n }\n\n this.updateVisNodes(nodes);\n \n return ;\n\n }\n\n\n \n\n \n\n \n \n\n \n\n}\n\nconst experimentStyle = {\n height: 600\n };\n\nexport default GraphNativeRep;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/5ff7cc05ac20c8726ca9247937921ca5.json b/node_modules/.cache/babel-loader/5ff7cc05ac20c8726ca9247937921ca5.json new file mode 100644 index 0000000000000000000000000000000000000000..25e6235f5342214de4913b6d57ebc27b0f714c0f --- /dev/null +++ b/node_modules/.cache/babel-loader/5ff7cc05ac20c8726ca9247937921ca5.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/Selection.js\";\nimport React, { useContext, Fragment } from 'react';\nimport ExperimentContext from '../context/experiment/experimentContext';\n\nconst Selection = () => {\n const experimentContext = useContext(ExperimentContext);\n const selection = experimentContext.selection,\n data = experimentContext.data,\n experiment = experimentContext.experiment; // const { model, branch, hpc } = experiment;\n //var currentSelection = \"Node: \"\n\n var currentNode = \"\";\n var selectedNode = null;\n\n if (selection) {\n //console.log(\"Current selection \" + selection)\n selection.map(node => // currentSelection += node + \", \"\n currentNode = node); //console.log(\"Current node \" + currentNode)\n\n selectedNode = data.nodes.find(node => node.id === currentNode); //console.log(\"Selected node\")\n //console.log(\"Data: \" + selectedNode.id + \" \" + selectedNode.platform_name)\n }\n\n return React.createElement(Fragment, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 23\n },\n __self: this\n }, selectedNode && React.createElement(Fragment, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 25\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 26\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-12\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 27\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"card text-white bg-info\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 28\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"card-header text-center py-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 29\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 30\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 30\n },\n __self: this\n }, selectedNode.id))), React.createElement(\"div\", {\n className: \"card-body py-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 32\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 33\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 34\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 34\n },\n __self: this\n }, \"Date:\"), \" \", selectedNode.date)), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-12\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 38\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 39\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 39\n },\n __self: this\n }, \"Section:\"), \" \", selectedNode.section)))), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 43\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 44\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-8\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 45\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 46\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 46\n },\n __self: this\n }, \"Platform:\"), \" \", selectedNode.platform_name && selectedNode.platform_name, \" \", !selectedNode.platform_name && experiment.hpc)), React.createElement(\"div\", {\n className: \"col-4 text-right\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 48\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 49\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 49\n },\n __self: this\n }, \"c:\", data.max_children, \"/p:\", data.max_parents))))), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 53\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 54\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 54\n },\n __self: this\n }, \"Priority:\"), \" \", selectedNode.priority)), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 56\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 57\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-6\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 58\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 59\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 59\n },\n __self: this\n }, \"Processors:\"), \" \", selectedNode.processors)), React.createElement(\"div\", {\n className: \"col-6\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 61\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 62\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 62\n },\n __self: this\n }, \"Wallclock:\"), \" \", selectedNode.wallclock)))), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 66\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 67\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-6\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 68\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 69\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 69\n },\n __self: this\n }, \"Level:\"), \" \", selectedNode.level)), React.createElement(\"div\", {\n className: \"col-6\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 71\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 72\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 72\n },\n __self: this\n }, \"Out:\"), \" \", selectedNode.children, \" \", React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 72\n },\n __self: this\n }, \"In:\"), \" \", selectedNode.parents, \" \")))), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 77\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 78\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 78\n },\n __self: this\n }, \"Status:\")), \" \", selectedNode.status)))))), !selectedNode && data && React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 89\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-12\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 90\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"card text-white bg-info\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 91\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"card-header text-center py-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 92\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 93\n },\n __self: this\n }, \"Here goes the Job Id\")), React.createElement(\"div\", {\n className: \"card-body\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 95\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"text-center\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 96\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 97\n },\n __self: this\n }, \"Select a Node to see more information.\")))))));\n};\n\nconst experimentStyle = {\n height: 200\n};\nexport default Selection;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/Selection.js"],"names":["React","useContext","Fragment","ExperimentContext","Selection","experimentContext","selection","data","experiment","currentNode","selectedNode","map","node","nodes","find","id","experimentStyle","date","section","platform_name","hpc","max_children","max_parents","priority","processors","wallclock","level","children","parents","status","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,UAAhB,EAA4BC,QAA5B,QAA4C,OAA5C;AACA,OAAOC,iBAAP,MAA8B,yCAA9B;;AAEA,MAAMC,SAAS,GAAG,MAAM;AACpB,QAAMC,iBAAiB,GAAGJ,UAAU,CAACE,iBAAD,CAApC;AADoB,QAEZG,SAFY,GAEoBD,iBAFpB,CAEZC,SAFY;AAAA,QAEDC,IAFC,GAEoBF,iBAFpB,CAEDE,IAFC;AAAA,QAEKC,UAFL,GAEoBH,iBAFpB,CAEKG,UAFL,EAGpB;AACA;;AACA,MAAIC,WAAW,GAAG,EAAlB;AACA,MAAIC,YAAY,GAAG,IAAnB;;AACA,MAAIJ,SAAJ,EAAe;AACX;AACAA,IAAAA,SAAS,CAACK,GAAV,CAAcC,IAAI,IACd;AACAH,IAAAA,WAAW,GAAGG,IAFlB,EAFW,CAMX;;AACAF,IAAAA,YAAY,GAAGH,IAAI,CAACM,KAAL,CAAWC,IAAX,CAAgBF,IAAI,IAAIA,IAAI,CAACG,EAAL,KAAYN,WAApC,CAAf,CAPW,CAQX;AACA;AACH;;AACD,SACI,oBAAC,QAAD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACSC,YAAY,IACb,oBAAC,QAAD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACK;AAAK,IAAA,SAAS,EAAC,KAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACI;AAAK,IAAA,SAAS,EAAC,QAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACG;AAAK,IAAA,SAAS,EAAC,yBAAf;AAAyC,IAAA,KAAK,EAAEM,eAAhD;AAAA;AAAA;AAAA;AAAA;AAAA;A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1B,SAAf","sourcesContent":["import React, { useContext, Fragment } from 'react'\nimport ExperimentContext from '../context/experiment/experimentContext';\n\nconst Selection = () => {\n const experimentContext = useContext(ExperimentContext);\n const { selection, data, experiment } = experimentContext;\n // const { model, branch, hpc } = experiment;\n //var currentSelection = \"Node: \"\n var currentNode = \"\"\n var selectedNode = null\n if (selection) {\n //console.log(\"Current selection \" + selection)\n selection.map(node => (\n // currentSelection += node + \", \"\n currentNode = node\n ));\n //console.log(\"Current node \" + currentNode)\n selectedNode = data.nodes.find(node => node.id === currentNode) \n //console.log(\"Selected node\")\n //console.log(\"Data: \" + selectedNode.id + \" \" + selectedNode.platform_name)\n } \n return (\n \n {selectedNode &&\n \n
\n
\n
\n
\n {selectedNode.id}\n
\n
\n
\n Date: {selectedNode.date}\n
\n
\n
\n
\n Section: {selectedNode.section}\n
\n
\n
\n
\n
\n
\n Platform: {selectedNode.platform_name && selectedNode.platform_name} {!selectedNode.platform_name && experiment.hpc}\n
\n
\n c:{data.max_children}/p:{data.max_parents}\n
\n
\n
\n
\n Priority: {selectedNode.priority}\n
\n
\n
\n
\n Processors: {selectedNode.processors}\n
\n
\n Wallclock: {selectedNode.wallclock}\n
\n
\n
\n
\n
\n
\n Level: {selectedNode.level}\n
\n
\n Out: {selectedNode.children} In: {selectedNode.parents} \n
\n \n
\n
\n
\n Status: {selectedNode.status}\n
\n \n \n
\n
\n
\n
\n
\n } \n {!selectedNode && data &&\n
\n
\n
\n
\n Here goes the Job Id\n
\n
\n
\n Select a Node to see more information. \n
\n
\n
\n
\n
\n } \n
\n \n \n\n )\n}\n\nconst experimentStyle = {\n height: 200\n };\n\nexport default Selection;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/625504c8d026d86e839ebcfa274acc30.json b/node_modules/.cache/babel-loader/625504c8d026d86e839ebcfa274acc30.json new file mode 100644 index 0000000000000000000000000000000000000000..b3a1d4cd733b0d02a1c6fd1c077d4f49178546b2 --- /dev/null +++ b/node_modules/.cache/babel-loader/625504c8d026d86e839ebcfa274acc30.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js\";\nimport React, { Component } from \"react\"; // import vis from \"vis-network\";\n\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n constructor(...args) {\n super(...args);\n\n this.updateVisNodes = nodes => {\n this.props.setVisData(nodes);\n };\n }\n\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else if (nextProps.data && this.props.data && nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp) {\n console.log(\"Rerendering\");\n return true;\n } else if (nextProps.loadingGraph !== this.props.loadingGraph) {\n return true;\n } else {\n return false;\n }\n }\n\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n render() {\n if (this.props.loadingGraph) return React.createElement(Spinner, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 32\n },\n __self: this\n });\n\n if (this.props.data == null) {\n return React.createElement(\"div\", {\n className: \"card-body text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 35\n },\n __self: this\n }, React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Press \", React.createElement(\"span\", {\n className: \"badge badge-info\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Show Graph\"), \" to see the graph representation of the experiment.\"), React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"If the experiment is running, press \", React.createElement(\"span\", {\n className: \"badge badge-dark\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"Start Job Monitor\"), \" to start a live tracker of the changes on the experiment's jobs. This process will automatically update the graph's nodes colors and show a log of the detected changes.\"));\n }\n\n var nodes_array = [];\n var edges_array = [];\n\n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: {\n background: node.status_color,\n border: \"black\"\n },\n level: node.level\n }));\n this.props.data.edges.map(edge => edges_array.push({\n from: edge.from,\n to: edge.to\n }));\n }\n\n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n const options = {\n edges: {\n arrows: {\n to: {\n enabled: true\n }\n }\n },\n layout: {\n //improvedLayout: true,\n hierarchical: {\n nodeSpacing: 190,\n blockShifting: true,\n edgeMinimization: true,\n //parentCentralization: true,\n sortMethod: 'hubsize',\n direction: 'UD'\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true\n },\n physics: {\n enabled: false\n },\n nodes: {\n shape: 'dot',\n font: {\n size: 10\n }\n }\n };\n const graph = {\n nodes: nodes,\n edges: edges\n };\n\n class VisNetwork extends Component {\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else {\n return false;\n }\n }\n\n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", params => {\n //console.log(params);\n if (params.nodes) {\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n });\n } // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n\n\n render() {\n return React.createElement(\"div\", {\n className: \"card-body p-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 133\n },\n __self: this\n }, React.createElement(\"div\", {\n ref: \"myRef\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 134\n },\n __self: this\n }));\n }\n\n }\n\n this.updateVisNodes(nodes);\n return React.createElement(VisNetwork, {\n graph: graph,\n options: options,\n updateSelection: this.props.updateSelection,\n shouldUpdateGraph: this.props.shouldUpdateGraph,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 142\n },\n __self: this\n });\n }\n\n}\n\nconst experimentStyle = {\n height: 600\n};\nexport default GraphNativeRep;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js"],"names":["React","Component","Spinner","vis","GraphNativeRep","updateVisNodes","nodes","props","setVisData","shouldComponentUpdate","nextProps","nextState","shouldUpdateGraph","data","pkl_timestamp","console","log","loadingGraph","componentWillUnmount","cleanGraphData","render","nodes_array","edges_array","edges","map","node","push","id","label","color","background","status_color","border","level","edge","from","to","DataSet","options","arrows","enabled","layout","hierarchical","nodeSpacing","blockShifting","edgeMinimization","sortMethod","direction","interaction","dragNodes","hoverConnectedEdges","navigationButtons","physics","shape","font","size","graph","VisNetwork","componentDidMount","network","Network","refs","myRef","on","params","updateSelection","experimentStyle","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,SAAhB,QAAiC,OAAjC,C,CACA;;AACA,OAAOC,OAAP,MAAoB,mBAApB;AACA,OAAOC,GAAP,MAAgB,KAAhB;;AAEA,MAAMC,cAAN,SAA6BH,SAA7B,CAAuC;AAAA;AAAA;;AAAA,SAmBnCI,cAnBmC,GAmBjBC,KAAD,IAAW;AACxB,WAAKC,KAAL,CAAWC,UAAX,CAAsBF,KAAtB;AACH,KArBkC;AAAA;;AAEnCG,EAAAA,qBAAqB,CAACC,SAAD,EAAYC,SAAZ,EAAsB;AACvC,QAAI,KAAKJ,KAAL,CAAWK,iBAAX,KAAiC,IAArC,EAA0C;AACtC,aAAO,IAAP;AACD,KAFH,MAEQ,IAAIF,SAAS,CAACG,IAAV,IAAkB,KAAKN,KAAL,CAAWM,IAA7B,IAAsCH,SAAS,CAACG,IAAV,CAAeC,aAAf,KAAiC,KAAKP,KAAL,CAAWM,IAAX,CAAgBC,aAA3F,EAA0G;AAC9GC,MAAAA,OAAO,CAACC,GAAR,CAAY,aAAZ;AACA,aAAO,IAAP;AAC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AAGH,MAAA,eAAe,EAAE,KAAK/B,KAAL,CAAW0D,eAHzB;AAIH,MAAA,iBAAiB,EAAE,KAAK1D,KAAL,CAAWK,iBAJ3B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAAP;AAOH;;AA/IkC;;AA6JvC,MAAMsD,eAAe,GAAG;AACpBC,EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,eAAe/D,cAAf","sourcesContent":["import React, { Component } from \"react\";\n// import vis from \"vis-network\";\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n\n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true\n }else if (nextProps.data && this.props.data && (nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp)){\n console.log(\"Rerendering\")\n return true;\n }else if (nextProps.loadingGraph !== this.props.loadingGraph){\n return true; \n }else{\n return false;\n }\n }\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n updateVisNodes = (nodes) => {\n this.props.setVisData(nodes);\n }\n\n\n\n render () {\n if (this.props.loadingGraph) return ;\n if (this.props.data == null){\n return (\n
\n

Press Show Graph to see the graph representation of the experiment.

\n

If the experiment is running, press Start Job Monitor to start a live tracker of the changes on the experiment's jobs.\n This process will automatically update the graph's nodes colors and show a log of the detected changes.\n

\n
\n );\n }\n\n var nodes_array = [];\n var edges_array = [];\n \n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: { background: node.status_color, border: \"black\" },\n level: node.level,\n })\n );\n \n this.props.data.edges.map(edge => \n edges_array.push({ from: edge.from, to: edge.to })\n );\n }\n \n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n\n\n const options = {\n edges: {\n arrows: {\n to: { enabled: true }\n }\n },\n layout: {\n //improvedLayout: true,\n hierarchical: {\n nodeSpacing: 190,\n blockShifting: true,\n edgeMinimization: true,\n //parentCentralization: true,\n sortMethod: 'hubsize',\n direction: 'UD',\n }\n }, \n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true,\n },\n physics: {\n enabled: false,\n },\n nodes: {\n shape: 'dot',\n font: {\n size: 10,\n },\n }\n };\n \n const graph = {\n nodes : nodes,\n edges : edges,\n };\n\n class VisNetwork extends Component {\n \n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true;\n } else {\n return false;\n }\n }\n \n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", (params) => {\n //console.log(params);\n if (params.nodes){\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n \n });\n }\n \n // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n \n render() { \n return (\n
\n
\n
\n );\n }\n }\n\n this.updateVisNodes(nodes);\n \n return ;\n\n }\n\n\n \n\n \n\n \n \n\n \n\n}\n\nconst experimentStyle = {\n height: 600\n };\n\nexport default GraphNativeRep;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/633b87c27a4f05e1de92993bdf874f2e.json b/node_modules/.cache/babel-loader/633b87c27a4f05e1de92993bdf874f2e.json new file mode 100644 index 0000000000000000000000000000000000000000..4cd6c96abd43a58d18f6ca00a1a2df2ddd4c2e33 --- /dev/null +++ b/node_modules/.cache/babel-loader/633b87c27a4f05e1de92993bdf874f2e.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js\";\nimport React, { Component } from \"react\"; // import vis from \"vis-network\";\n\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n constructor(...args) {\n super(...args);\n\n this.updateVisNodes = nodes => {\n this.props.setVisData(nodes);\n };\n }\n\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else if (nextProps.data && this.props.data && nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp) {\n console.log(\"Rerendering\");\n return true;\n } else if (nextProps.loadingGraph !== this.props.loadingGraph) {\n return true;\n } else {\n return false;\n }\n }\n\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n render() {\n if (this.props.loadingGraph) return React.createElement(Spinner, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 32\n },\n __self: this\n });\n\n if (this.props.data == null) {\n return React.createElement(\"div\", {\n className: \"card-body text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 35\n },\n __self: this\n }, React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Press \", React.createElement(\"span\", {\n className: \"badge badge-info\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Show Graph\"), \" to see the graph representation of the experiment.\"), React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"If the experiment is running, press \", React.createElement(\"span\", {\n className: \"badge badge-dark\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"Start Job Monitor\"), \" to start a live tracker of the changes on the experiment's jobs. This process will automatically update the graph's nodes colors and show a log of the detected changes.\"));\n }\n\n var nodes_array = [];\n var edges_array = [];\n\n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: {\n background: node.status_color,\n border: \"black\"\n },\n level: node.level\n }));\n this.props.data.edges.map(edge => edges_array.push({\n from: edge.from,\n to: edge.to\n }));\n }\n\n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n const options = {\n edges: {\n arrows: {\n to: {\n enabled: true\n }\n }\n },\n layout: {\n //improvedLayout: true,\n hierarchical: {\n nodeSpacing: 190,\n //blockShifting: true,\n edgeMinimization: true,\n //parentCentralization: true,\n sortMethod: 'hubsize',\n direction: 'UD'\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true\n },\n physics: {\n enabled: false\n },\n nodes: {\n shape: 'dot',\n font: {\n size: 10\n }\n }\n };\n const graph = {\n nodes: nodes,\n edges: edges\n };\n\n class VisNetwork extends Component {\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else {\n return false;\n }\n }\n\n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", params => {\n //console.log(params);\n if (params.nodes) {\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n });\n } // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n\n\n render() {\n return React.createElement(\"div\", {\n className: \"card-body p-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 133\n },\n __self: this\n }, React.createElement(\"div\", {\n ref: \"myRef\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 134\n },\n __self: this\n }));\n }\n\n }\n\n this.updateVisNodes(nodes);\n return React.createElement(VisNetwork, {\n graph: graph,\n options: options,\n updateSelection: this.props.updateSelection,\n shouldUpdateGraph: this.props.shouldUpdateGraph,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 142\n },\n __self: this\n });\n }\n\n}\n\nconst experimentStyle = {\n height: 600\n};\nexport default GraphNativeRep;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js"],"names":["React","Component","Spinner","vis","GraphNativeRep","updateVisNodes","nodes","props","setVisData","shouldComponentUpdate","nextProps","nextState","shouldUpdateGraph","data","pkl_timestamp","console","log","loadingGraph","componentWillUnmount","cleanGraphData","render","nodes_array","edges_array","edges","map","node","push","id","label","color","background","status_color","border","level","edge","from","to","DataSet","options","arrows","enabled","layout","hierarchical","nodeSpacing","edgeMinimization","sortMethod","direction","interaction","dragNodes","hoverConnectedEdges","navigationButtons","physics","shape","font","size","graph","VisNetwork","componentDidMount","network","Network","refs","myRef","on","params","updateSelection","experimentStyle","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,SAAhB,QAAiC,OAAjC,C,CACA;;AACA,OAAOC,OAAP,MAAoB,mBAApB;AACA,OAAOC,GAAP,MAAgB,KAAhB;;AAEA,MAAMC,cAAN,SAA6BH,SAA7B,CAAuC;AAAA;AAAA;;AAAA,SAmBnCI,cAnBmC,GAmBjBC,KAAD,IAAW;AACxB,WAAKC,KAAL,CAAWC,UAAX,CAAsBF,KAAtB;AACH,KArBkC;AAAA;;AAEnCG,EAAAA,qBAAqB,CAACC,SAAD,EAAYC,SAAZ,EAAsB;AACvC,QAAI,KAAKJ,KAAL,CAAWK,iBAAX,KAAiC,IAArC,EAA0C;AACtC,aAAO,IAAP;AACD,KAFH,MAEQ,IAAIF,SAAS,CAACG,IAAV,IAAkB,KAAKN,KAAL,CAAWM,IAA7B,IAAsCH,SAAS,CAACG,IAAV,CAAeC,aAAf,KAAiC,KAAKP,KAAL,CAAWM,IAAX,CAAgBC,aAA3F,EAA0G;AAC9GC,MAAAA,OAAO,CAACC,GAAR,CAAY,aAAZ;AACA,aAAO,IAAP;AACD,KAHK,MAGA,IAAIN,SAAS,CAACO,YAAV,KAA2B,KAAKV,KAAL,CAAWU,YAA1C,EAAuD;AAC3D,aAAO,IAAP;AACD,KAFK,MAED;AACH,aAAO,KAAP;AACD;AACN;;AACDC,EAAAA,oBAAoB,GAAG;AACnBH,IAAAA,OAAO,CAACC,GAAR,CAAY,YAAZ;AACA,SAAKT,KAAL,CAAWY,cAAX;AACH;;AAQDC,EAAAA,MAAM,GAAI;AACN,QAAI,KAAKb,KAAL,CAAWU,YAAf,EAA6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iC,IAArC,EAA0C;AACrC,iBAAO,IAAP;AACH,SAFF,MAEQ;AACH,iBAAO,KAAP;AACH;AACJ;;AAED6C,MAAAA,iBAAiB,GAAG;AAChB,YAAIC,OAAO,GAAG,IAAIvD,GAAG,CAACwD,OAAR,CAAgB,KAAKC,IAAL,CAAUC,KAA1B,EAAiC,KAAKtD,KAAL,CAAWgD,KAA5C,EAAmD,KAAKhD,KAAL,CAAW+B,OAA9D,CAAd;AACAoB,QAAAA,OAAO,CAACI,EAAR,CAAW,OAAX,EAAqBC,MAAD,IAAY;AAC5B;AACA,cAAIA,MAAM,CAACzD,KAAX,EAAiB;AACb;AACA,iBAAKC,KAAL,CAAWyD,eAAX,CAA2BD,MAAM,CAACzD,KAAlC;AACH;AAEJ,SAPD;AAQH,OApB8B,CAsB/B;AACA;AACA;AACA;;;AAEAc,MAAAA,MAAM,GAAG;AACL,eACI;AAAK,UAAA,SAAS,EAAC,eAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,WACI;AAAK,UAAA,GAAG,EAAC,OAAT;AAAiB,UAAA,KAAK,EAAE6C,eAAxB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,UADJ,CADJ;AAKH;;AAjC8B;;AAoCnC,SAAK5D,cAAL,CAAoBC,KAApB;AAEA,WAAO,oBAAC,UAAD;AACH,MAAA,KAAK,EAAEiD,KADJ;AAEH,MAAA,OAAO,EAAEjB,OAFN;AAGH,MAAA,eAAe,EAAE,KAAK/B,KAAL,CAAWyD,eAHzB;AAIH,MAAA,iBAAiB,EAAE,KAAKzD,KAAL,CAAWK,iBAJ3B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAAP;AAOH;;AA/IkC;;AA6JvC,MAAMqD,eAAe,GAAG;AACpBC,EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,eAAe9D,cAAf","sourcesContent":["import React, { Component } from \"react\";\n// import vis from \"vis-network\";\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n\n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true\n }else if (nextProps.data && this.props.data && (nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp)){\n console.log(\"Rerendering\")\n return true;\n }else if (nextProps.loadingGraph !== this.props.loadingGraph){\n return true; \n }else{\n return false;\n }\n }\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n updateVisNodes = (nodes) => {\n this.props.setVisData(nodes);\n }\n\n\n\n render () {\n if (this.props.loadingGraph) return ;\n if (this.props.data == null){\n return (\n
\n

Press Show Graph to see the graph representation of the experiment.

\n

If the experiment is running, press Start Job Monitor to start a live tracker of the changes on the experiment's jobs.\n This process will automatically update the graph's nodes colors and show a log of the detected changes.\n

\n
\n );\n }\n\n var nodes_array = [];\n var edges_array = [];\n \n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: { background: node.status_color, border: \"black\" },\n level: node.level,\n })\n );\n \n this.props.data.edges.map(edge => \n edges_array.push({ from: edge.from, to: edge.to })\n );\n }\n \n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n\n\n const options = {\n edges: {\n arrows: {\n to: { enabled: true }\n }\n },\n layout: {\n //improvedLayout: true,\n hierarchical: {\n nodeSpacing: 190,\n //blockShifting: true,\n edgeMinimization: true,\n //parentCentralization: true,\n sortMethod: 'hubsize',\n direction: 'UD',\n }\n }, \n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true,\n },\n physics: {\n enabled: false,\n },\n nodes: {\n shape: 'dot',\n font: {\n size: 10,\n },\n }\n };\n \n const graph = {\n nodes : nodes,\n edges : edges,\n };\n\n class VisNetwork extends Component {\n \n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true;\n } else {\n return false;\n }\n }\n \n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", (params) => {\n //console.log(params);\n if (params.nodes){\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n \n });\n }\n \n // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n \n render() { \n return (\n
\n
\n
\n );\n }\n }\n\n this.updateVisNodes(nodes);\n \n return ;\n\n }\n\n\n \n\n \n\n \n \n\n \n\n}\n\nconst experimentStyle = {\n height: 600\n };\n\nexport default GraphNativeRep;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/6469fa3c7dbb0fddb8de29b2e229f181.json b/node_modules/.cache/babel-loader/6469fa3c7dbb0fddb8de29b2e229f181.json new file mode 100644 index 0000000000000000000000000000000000000000..a42d5418f945271be60afa0adc763df307d9ea88 --- /dev/null +++ b/node_modules/.cache/babel-loader/6469fa3c7dbb0fddb8de29b2e229f181.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js\";\nimport React, { Component } from \"react\"; // import vis from \"vis-network\";\n\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n constructor(...args) {\n super(...args);\n\n this.updateVisNodes = nodes => {\n this.props.setVisData(nodes);\n };\n }\n\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else if (nextProps.data && this.props.data && nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp) {\n console.log(\"Rerendering\");\n return true;\n } else if (nextProps.loadingGraph !== this.props.loadingGraph) {\n return true;\n } else {\n return false;\n }\n }\n\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n render() {\n if (this.props.loadingGraph) return React.createElement(Spinner, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 32\n },\n __self: this\n });\n\n if (this.props.data == null) {\n return React.createElement(\"div\", {\n className: \"card-body text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 35\n },\n __self: this\n }, React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Press \", React.createElement(\"span\", {\n className: \"badge badge-info\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Show Graph\"), \" to see the graph representation of the experiment.\"), React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"If the experiment is running, press \", React.createElement(\"span\", {\n className: \"badge badge-dark\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"Start Job Monitor\"), \" to start a live tracker of the changes on the experiment's jobs. This process will automatically update the graph's nodes colors and show a log of the detected changes.\"));\n }\n\n var nodes_array = [];\n var edges_array = [];\n\n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: {\n background: node.status_color,\n border: \"black\"\n },\n level: node.level\n }));\n this.props.data.edges.map(edge => edges_array.push({\n from: edge.from,\n to: edge.to\n }));\n }\n\n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n const options = {\n edges: {\n arrows: {\n to: {\n enabled: true\n }\n }\n },\n layout: {\n improvedLayout: true,\n hierarchical: {\n nodeSpacing: 250,\n edgeMinimization: false,\n blockShifting: false,\n parentCentralization: false,\n direction: 'UD',\n sortMethod: 'directed'\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true\n },\n physics: {\n enabled: false\n },\n nodes: {\n shape: 'dot'\n }\n };\n const graph = {\n nodes: nodes,\n edges: edges\n };\n\n class VisNetwork extends Component {\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else {\n return false;\n }\n }\n\n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", params => {\n //console.log(params);\n if (params.nodes) {\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n });\n } // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n\n\n render() {\n return React.createElement(\"div\", {\n className: \"card-body p-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 131\n },\n __self: this\n }, React.createElement(\"div\", {\n ref: \"myRef\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 132\n },\n __self: this\n }));\n }\n\n }\n\n this.updateVisNodes(nodes);\n return React.createElement(VisNetwork, {\n graph: graph,\n options: options,\n updateSelection: this.props.updateSelection,\n shouldUpdateGraph: this.props.shouldUpdateGraph,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 140\n },\n __self: this\n });\n }\n\n}\n\nconst experimentStyle = {\n height: 600\n};\nexport default GraphNativeRep;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js"],"names":["React","Component","Spinner","vis","GraphNativeRep","updateVisNodes","nodes","props","setVisData","shouldComponentUpdate","nextProps","nextState","shouldUpdateGraph","data","pkl_timestamp","console","log","loadingGraph","componentWillUnmount","cleanGraphData","render","nodes_array","edges_array","edges","map","node","push","id","label","color","background","status_color","border","level","edge","from","to","DataSet","options","arrows","enabled","layout","improvedLayout","hierarchical","nodeSpacing","edgeMinimization","blockShifting","parentCentralization","direction","sortMethod","interaction","dragNodes","hoverConnectedEdges","navigationButtons","physics","shape","graph","VisNetwork","componentDidMount","network","Network","refs","myRef","on","params","updateSelection","experimentStyle","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,SAAhB,QAAiC,OAAjC,C,CACA;;AACA,OAAOC,OAAP,MAAoB,mBAApB;AACA,OAAOC,GAAP,MAAgB,KAAh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AD,IAAY;AAC5B;AACA,cAAIA,MAAM,CAAC1D,KAAX,EAAiB;AACb;AACA,iBAAKC,KAAL,CAAW0D,eAAX,CAA2BD,MAAM,CAAC1D,KAAlC;AACH;AAEJ,SAPD;AAQH,OApB8B,CAsB/B;AACA;AACA;AACA;;;AAEAc,MAAAA,MAAM,GAAG;AACL,eACI;AAAK,UAAA,SAAS,EAAC,eAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,WACI;AAAK,UAAA,GAAG,EAAC,OAAT;AAAiB,UAAA,KAAK,EAAE8C,eAAxB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,UADJ,CADJ;AAKH;;AAjC8B;;AAoCnC,SAAK7D,cAAL,CAAoBC,KAApB;AAEA,WAAO,oBAAC,UAAD;AACH,MAAA,KAAK,EAAEkD,KADJ;AAEH,MAAA,OAAO,EAAElB,OAFN;AAGH,MAAA,eAAe,EAAE,KAAK/B,KAAL,CAAW0D,eAHzB;AAIH,MAAA,iBAAiB,EAAE,KAAK1D,KAAL,CAAWK,iBAJ3B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAAP;AAOH;;AA7IkC;;AA2JvC,MAAMsD,eAAe,GAAG;AACpBC,EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,eAAe/D,cAAf","sourcesContent":["import React, { Component } from \"react\";\n// import vis from \"vis-network\";\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n\n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true\n }else if (nextProps.data && this.props.data && (nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp)){\n console.log(\"Rerendering\")\n return true;\n }else if (nextProps.loadingGraph !== this.props.loadingGraph){\n return true; \n }else{\n return false;\n }\n }\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n updateVisNodes = (nodes) => {\n this.props.setVisData(nodes);\n }\n\n\n\n render () {\n if (this.props.loadingGraph) return ;\n if (this.props.data == null){\n return (\n
\n

Press Show Graph to see the graph representation of the experiment.

\n

If the experiment is running, press Start Job Monitor to start a live tracker of the changes on the experiment's jobs.\n This process will automatically update the graph's nodes colors and show a log of the detected changes.\n

\n
\n );\n }\n\n var nodes_array = [];\n var edges_array = [];\n \n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: { background: node.status_color, border: \"black\" },\n level: node.level,\n })\n );\n \n this.props.data.edges.map(edge => \n edges_array.push({ from: edge.from, to: edge.to })\n );\n }\n \n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n\n\n const options = {\n edges: {\n arrows: {\n to: { enabled: true }\n }\n },\n layout: {\n improvedLayout: true,\n hierarchical: {\n \n nodeSpacing: 250,\n edgeMinimization: false,\n blockShifting: false,\n parentCentralization: false,\n direction: 'UD',\n sortMethod: 'directed',\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true,\n },\n physics: {\n enabled: false,\n },\n nodes: {\n shape: 'dot',\n }\n };\n \n const graph = {\n nodes : nodes,\n edges : edges,\n };\n\n class VisNetwork extends Component {\n \n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true;\n } else {\n return false;\n }\n }\n \n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", (params) => {\n //console.log(params);\n if (params.nodes){\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n \n });\n }\n \n // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n \n render() { \n return (\n
\n
\n
\n );\n }\n }\n\n this.updateVisNodes(nodes);\n \n return ;\n\n }\n\n\n \n\n \n\n \n \n\n \n\n}\n\nconst experimentStyle = {\n height: 600\n };\n\nexport default GraphNativeRep;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/65bf1a2a705db375f38e27a90c1bce7f.json b/node_modules/.cache/babel-loader/65bf1a2a705db375f38e27a90c1bce7f.json new file mode 100644 index 0000000000000000000000000000000000000000..22aa7b85040ee48757690896ce261261c9e40684 --- /dev/null +++ b/node_modules/.cache/babel-loader/65bf1a2a705db375f38e27a90c1bce7f.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js\";\nimport React, { useContext, Component } from \"react\"; // import vis from \"vis-network\";\n\nimport Spinner from \"../layout/Spinner\";\nimport ExperimentContext from '../context/experiment/experimentContext';\nimport vis from \"vis\";\n\nconst GraphNativeRep = () => {\n const experimentContext = useContext(ExperimentContext);\n const data = experimentContext.data,\n loadingGraph = experimentContext.loadingGraph,\n cleanGraphData = experimentContext.cleanGraphData;\n if (loadingGraph) return React.createElement(Spinner, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 11\n },\n __self: this\n });\n\n if (data === null) {\n return React.createElement(\"div\", {\n className: \"card-body text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 14\n },\n __self: this\n }, React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 15\n },\n __self: this\n }, \"Press \", React.createElement(\"span\", {\n className: \"badge badge-info\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 15\n },\n __self: this\n }, \"Show Graph\"), \" to see the graph representation of the experiment.\"), React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 16\n },\n __self: this\n }, \"If the experiment is running, press \", React.createElement(\"span\", {\n className: \"badge badge-dark\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 16\n },\n __self: this\n }, \"Start Job Monitor\"), \" to start a live tracker of the changes on the experiment's jobs. This process will automatically update the graph's nodes colors and show a log of the detected changes.\"));\n }\n\n var nodes_array = [];\n var edges_array = [];\n\n if (data.nodes !== null || data.edges !== null) {\n data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: {\n background: node.status_color,\n border: \"black\"\n } //level: node.priority,\n\n }));\n data.edges.map(edge => edges_array.push({\n from: edge.from,\n to: edge.to\n }));\n }\n\n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n const options = {\n edges: {\n arrows: {\n to: {\n enabled: true\n }\n }\n },\n layout: {\n improvedLayout: true,\n hierarchical: {\n nodeSpacing: 250,\n edgeMinimization: false,\n blockShifting: false,\n parentCentralization: false,\n direction: 'UD',\n sortMethod: 'directed'\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true\n },\n physics: {\n enabled: false\n },\n nodes: {\n shape: 'dot'\n }\n };\n const graph = {\n nodes: nodes,\n edges: edges\n };\n\n class VisNetwork extends Component {\n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, graph, options);\n network.on(\"click\", function (params) {\n console.log(params);\n });\n }\n\n componentWillUnmount() {\n cleanGraphData();\n }\n\n render() {\n return React.createElement(\"div\", {\n className: \"card-body p-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 96\n },\n __self: this\n }, React.createElement(\"div\", {\n ref: \"myRef\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 97\n },\n __self: this\n }));\n }\n\n }\n\n return React.createElement(VisNetwork, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 103\n },\n __self: this\n });\n};\n\nconst experimentStyle = {\n height: 600\n};\nexport default GraphNativeRep;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js"],"names":["React","useContext","Component","Spinner","ExperimentContext","vis","GraphNativeRep","experimentContext","data","loadingGraph","cleanGraphData","nodes_array","edges_array","nodes","edges","map","node","push","id","label","color","background","status_color","border","edge","from","to","DataSet","options","arrows","enabled","layout","improvedLayout","hierarchical","nodeSpacing","edgeMinimization","blockShifting","parentCentralization","direction","sortMethod","interaction","dragNodes","hoverConnectedEdges","navigationButtons","physics","shape","graph","VisNetwork","componentDidMount","network","Network","refs","myRef","on","params","console","log","componentWillUnmount","render","experimentStyle","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,UAAhB,EAA4BC,SAA5B,QAA6C,OAA7C,C,CACA;;AACA,OAAOC,OAAP,MAAoB,mBAApB;AACA,OAAOC,iBAAP,MAA8B,yCAA9B;AACA,OAAOC,GAAP,MAAgB,KAAhB;;AAEA,MAAMC,cAAc,GAAG,MAAM;AAEzB,QAAMC,iBAAiB,GAAGN,UAAU,CAACG,iBAAD,CAApC;AAFyB,QAGjBI,IAHiB,GAGsBD,iBAHtB,CAGjBC,IAHiB;AAAA,QAGXC,YAHW,GAGsBF,iBAHtB,CAGXE,YAHW;AAAA,QAGGC,cAHH,GAGsBH,iBAHtB,CAGGG,cAHH;AAIzB,MAAID,YAAJ,EAAkB,OAAO,oBAAC,OAAD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAAP;;AAClB,MAAID,IAAI,KAAK,IAAb,EAAmB;AACf,WACI;AAAK,MAAA,SAAS,EAAC,qBAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,OACI;AAAG,MAAA,SAAS,EAAC,MAAb;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,iBAA0B;AAAM,MAAA,SAAS,EAAC,kBAAhB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oBAA1B,wDADJ,EAEI;AAAG,MAAA,SAAS,EAAC,MAAb;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,+CAAwD;AAAM,MAAA,SAAS,EAAC,kBAAhB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,2BAAxD,8KAFJ,CADJ;AAQH;;AAED,MAAIG,WAAW,GAAG,EAAlB;AACA,MAAIC,WAAW,GAAG,EAAlB;;AAEA,MAAIJ,IA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AACXC,MAAAA,SAAS,EAAE,IADA;AAEXC,MAAAA,mBAAmB,EAAE,IAFV;AAGX;AACAC,MAAAA,iBAAiB,EAAE;AAJR,KAlBD;AAwBZC,IAAAA,OAAO,EAAE;AACPd,MAAAA,OAAO,EAAE;AADF,KAxBG;AA2BZjB,IAAAA,KAAK,EAAE;AACLgC,MAAAA,KAAK,EAAE;AADF;AA3BK,GAAhB;AAgCA,QAAMC,KAAK,GAAG;AACVjC,IAAAA,KAAK,EAAGA,KADE;AAEVC,IAAAA,KAAK,EAAGA;AAFE,GAAd;;AAMA,QAAMiC,UAAN,SAAyB7C,SAAzB,CAAmC;AAE/B8C,IAAAA,iBAAiB,GAAG;AAChB,UAAIC,OAAO,GAAG,IAAI5C,GAAG,CAAC6C,OAAR,CAAgB,KAAKC,IAAL,CAAUC,KAA1B,EAAiCN,KAAjC,EAAwClB,OAAxC,CAAd;AACAqB,MAAAA,OAAO,CAACI,EAAR,CAAW,OAAX,EAAoB,UAASC,MAAT,EAAiB;AACjCC,QAAAA,OAAO,CAACC,GAAR,CAAYF,MAAZ;AACH,OAFD;AAGH;;AAEDG,IAAAA,oBAAoB,GAAG;AACnB/C,MAAAA,cAAc;AACjB;;AAEDgD,IAAAA,MAAM,GAAG;AACL,aACI;AAAK,QAAA,SAAS,EAAC,eAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,SACI;AAAK,QAAA,GAAG,EAAC,OAAT;AAAiB,QAAA,KAAK,EAAEC,eAAxB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,QADJ,CADJ;AAKH;;AAnB8B;;AAsBnC,SAAO,oBAAC,UAAD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAAP;AAEH,CAlGD;;AAoGA,MAAMA,eAAe,GAAG;AACpBC,EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,eAAetD,cAAf","sourcesContent":["import React, { useContext, Component } from \"react\";\n// import vis from \"vis-network\";\nimport Spinner from \"../layout/Spinner\";\nimport ExperimentContext from '../context/experiment/experimentContext';\nimport vis from \"vis\";\n\nconst GraphNativeRep = () => {\n\n const experimentContext = useContext(ExperimentContext); \n const { data, loadingGraph, cleanGraphData } = experimentContext;\n if (loadingGraph) return \n if (data === null) {\n return (\n
\n

Press Show Graph to see the graph representation of the experiment.

\n

If the experiment is running, press Start Job Monitor to start a live tracker of the changes on the experiment's jobs.\n This process will automatically update the graph's nodes colors and show a log of the detected changes.\n

\n
\n );\n }\n\n var nodes_array = [];\n var edges_array = [];\n\n if (data.nodes !== null || data.edges !== null) {\n data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: { background: node.status_color, border: \"black\" },\n //level: node.priority,\n })\n );\n \n data.edges.map(edge => \n edges_array.push({ from: edge.from, to: edge.to })\n );\n }\n\n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n\n const options = {\n edges: {\n arrows: {\n to: { enabled: true }\n }\n },\n layout: {\n improvedLayout: true,\n hierarchical: {\n \n nodeSpacing: 250,\n edgeMinimization: false,\n blockShifting: false,\n parentCentralization: false,\n direction: 'UD',\n sortMethod: 'directed',\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true,\n },\n physics: {\n enabled: false,\n },\n nodes: {\n shape: 'dot',\n }\n };\n\n const graph = {\n nodes : nodes,\n edges : edges,\n };\n \n\n class VisNetwork extends Component {\n \n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, graph, options);\n network.on(\"click\", function(params) {\n console.log(params);\n });\n }\n\n componentWillUnmount() {\n cleanGraphData();\n }\n\n render() { \n return (\n
\n
\n
\n );\n }\n }\n\n return ;\n\n}\n\nconst experimentStyle = {\n height: 600\n };\n\nexport default GraphNativeRep;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/67427c249933434d5aeb060f2a8979d2.json b/node_modules/.cache/babel-loader/67427c249933434d5aeb060f2a8979d2.json new file mode 100644 index 0000000000000000000000000000000000000000..4ceed5349459dd04349b02e2c0fb7de6e9220315 --- /dev/null +++ b/node_modules/.cache/babel-loader/67427c249933434d5aeb060f2a8979d2.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js\";\nimport React, { Component } from \"react\"; // import vis from \"vis-network\";\n\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n constructor(...args) {\n super(...args);\n\n this.updateVisNodes = nodes => {\n this.props.setVisData(nodes);\n };\n }\n\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else if (nextProps.data && this.props.data && nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp) {\n console.log(\"Rerendering\");\n return true;\n } else if (nextProps.loadingGraph !== this.props.loadingGraph) {\n return true;\n } else {\n return false;\n }\n }\n\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n render() {\n if (this.props.loadingGraph) return React.createElement(Spinner, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 32\n },\n __self: this\n });\n\n if (this.props.data == null) {\n return React.createElement(\"div\", {\n className: \"card-body text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 35\n },\n __self: this\n }, React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Press \", React.createElement(\"span\", {\n className: \"badge badge-info\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Show Graph\"), \" to see the graph representation of the experiment.\"), React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"If the experiment is running, press \", React.createElement(\"span\", {\n className: \"badge badge-dark\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"Start Job Monitor\"), \" to start a live tracker of the changes on the experiment's jobs. This process will automatically update the graph's nodes colors and show a log of the detected changes.\"));\n }\n\n var nodes_array = [];\n var edges_array = [];\n\n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: {\n background: node.status_color,\n border: \"black\"\n } //level: node.level,\n\n }));\n this.props.data.edges.map(edge => edges_array.push({\n from: edge.from,\n to: edge.to\n }));\n }\n\n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n const options = {\n edges: {\n arrows: {\n to: {\n enabled: true\n }\n }\n },\n layout: {\n //improvedLayout: true,\n hierarchical: {\n // enabled: true,\n nodeSpacing: 250,\n edgeMinimization: false,\n blockShifting: true,\n parentCentralization: true,\n direction: 'UD'\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true\n },\n physics: {\n enabled: false\n },\n nodes: {\n shape: 'dot'\n }\n };\n const graph = {\n nodes: nodes,\n edges: edges\n };\n\n class VisNetwork extends Component {\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else {\n return false;\n }\n }\n\n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", params => {\n //console.log(params);\n if (params.nodes) {\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n });\n } // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n\n\n render() {\n return React.createElement(\"div\", {\n className: \"card-body p-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 130\n },\n __self: this\n }, React.createElement(\"div\", {\n ref: \"myRef\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 131\n },\n __self: this\n }));\n }\n\n }\n\n this.updateVisNodes(nodes);\n return React.createElement(VisNetwork, {\n graph: graph,\n options: options,\n updateSelection: this.props.updateSelection,\n shouldUpdateGraph: this.props.shouldUpdateGraph,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 139\n },\n __self: this\n });\n }\n\n}\n\nconst experimentStyle = {\n height: 600\n};\nexport default GraphNativeRep;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js"],"names":["React","Component","Spinner","vis","GraphNativeRep","updateVisNodes","nodes","props","setVisData","shouldComponentUpdate","nextProps","nextState","shouldUpdateGraph","data","pkl_timestamp","console","log","loadingGraph","componentWillUnmount","cleanGraphData","render","nodes_array","edges_array","edges","map","node","push","id","label","color","background","status_color","border","edge","from","to","DataSet","options","arrows","enabled","layout","hierarchical","nodeSpacing","edgeMinimization","blockShifting","parentCentralization","direction","interaction","dragNodes","hoverConnectedEdges","navigationButtons","physics","shape","graph","VisNetwork","componentDidMount","network","Network","refs","myRef","on","params","updateSelection","experimentStyle","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,SAAhB,QAAiC,OAAjC,C,CACA;;AACA,OAAOC,OAAP,MAAoB,mBAApB;AACA,OAAOC,GAAP,MAAgB,KAAhB;;AAEA,MAAMC,cAAN,SAA6BH,SAA7B,CAAuC;AAAA;AAAA;;AAAA,SAmBnCI,cAnBmC,GAmBjBC,KAAD,IAAW;AACxB,WAAKC,KAAL,CAAWC,UAAX,CAAsBF,KAAtB;AACH,KArBkC;AAAA;;AAEnCG,EAAAA,qBAAqB,CAACC,SAAD,EAAYC,SAAZ,EAAsB;AACvC,QAAI,KAAKJ,KAAL,CAAWK,iBAAX,KAAiC,IAArC,EAA0C;AACtC,aAAO,IAAP;AACD,KAFH,MAEQ,IAAIF,SAAS,CAACG,IAAV,IAAkB,KAAKN,KAAL,CAAWM,IAA7B,IAAsCH,SAAS,CAACG,IAAV,CAAeC,aAAf,KAAiC,KAAKP,KAAL,CAAWM,IAAX,CAAgBC,aAA3F,EAA0G;AAC9GC,MAAAA,OAAO,CAACC,GAAR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,MAAA,iBAAiB,EAAE,KAAKvD,KAAL,CAAWK,iBAJ3B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAAP;AAOH;;AA5IkC;;AA0JvC,MAAMmD,eAAe,GAAG;AACpBC,EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,eAAe5D,cAAf","sourcesContent":["import React, { Component } from \"react\";\n// import vis from \"vis-network\";\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n\n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true\n }else if (nextProps.data && this.props.data && (nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp)){\n console.log(\"Rerendering\")\n return true;\n }else if (nextProps.loadingGraph !== this.props.loadingGraph){\n return true; \n }else{\n return false;\n }\n }\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n updateVisNodes = (nodes) => {\n this.props.setVisData(nodes);\n }\n\n\n\n render () {\n if (this.props.loadingGraph) return ;\n if (this.props.data == null){\n return (\n
\n

Press Show Graph to see the graph representation of the experiment.

\n

If the experiment is running, press Start Job Monitor to start a live tracker of the changes on the experiment's jobs.\n This process will automatically update the graph's nodes colors and show a log of the detected changes.\n

\n
\n );\n }\n\n var nodes_array = [];\n var edges_array = [];\n \n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: { background: node.status_color, border: \"black\" },\n //level: node.level,\n })\n );\n \n this.props.data.edges.map(edge => \n edges_array.push({ from: edge.from, to: edge.to })\n );\n }\n \n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n\n\n const options = {\n edges: {\n arrows: {\n to: { enabled: true }\n }\n },\n layout: {\n //improvedLayout: true,\n hierarchical: {\n // enabled: true,\n nodeSpacing: 250,\n edgeMinimization: false,\n blockShifting: true,\n parentCentralization: true,\n direction: 'UD',\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true,\n },\n physics: {\n enabled: false,\n },\n nodes: {\n shape: 'dot',\n }\n };\n \n const graph = {\n nodes : nodes,\n edges : edges,\n };\n\n class VisNetwork extends Component {\n \n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true;\n } else {\n return false;\n }\n }\n \n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", (params) => {\n //console.log(params);\n if (params.nodes){\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n \n });\n }\n \n // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n \n render() { \n return (\n
\n
\n
\n );\n }\n }\n\n this.updateVisNodes(nodes);\n \n return ;\n\n }\n\n\n \n\n \n\n \n \n\n \n\n}\n\nconst experimentStyle = {\n height: 600\n };\n\nexport default GraphNativeRep;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/675f70dc9de709b71496b3cc88b44468.json b/node_modules/.cache/babel-loader/675f70dc9de709b71496b3cc88b44468.json new file mode 100644 index 0000000000000000000000000000000000000000..e4c16494eb5a42647dfc3c93d5d81985bad639b3 --- /dev/null +++ b/node_modules/.cache/babel-loader/675f70dc9de709b71496b3cc88b44468.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js\";\nimport React, { Component } from \"react\"; // import vis from \"vis-network\";\n\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n constructor(...args) {\n super(...args);\n\n this.updateVisNodes = nodes => {\n this.props.setVisData(nodes);\n };\n }\n\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else if (nextProps.data && this.props.data && nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp) {\n console.log(\"Rerendering\");\n return true;\n } else if (nextProps.loadingGraph !== this.props.loadingGraph) {\n return true;\n } else {\n return false;\n }\n }\n\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n render() {\n if (this.props.loadingGraph) return React.createElement(Spinner, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 32\n },\n __self: this\n });\n\n if (this.props.data == null) {\n return React.createElement(\"div\", {\n className: \"card-body text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 35\n },\n __self: this\n }, React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Press \", React.createElement(\"span\", {\n className: \"badge badge-info\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Show Graph\"), \" to see the graph representation of the experiment.\"), React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"If the experiment is running, press \", React.createElement(\"span\", {\n className: \"badge badge-dark\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"Start Job Monitor\"), \" to start a live tracker of the changes on the experiment's jobs. This process will automatically update the graph's nodes colors and show a log of the detected changes.\"));\n }\n\n var nodes_array = [];\n var edges_array = [];\n\n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: {\n background: node.status_color,\n border: \"black\"\n },\n level: node.level\n }));\n this.props.data.edges.map(edge => edges_array.push({\n from: edge.from,\n to: edge.to\n }));\n }\n\n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n const options = {\n edges: {\n arrows: {\n to: {\n enabled: true\n }\n }\n },\n layout: {\n //improvedLayout: true,\n hierarchical: {\n // enabled: true,\n nodeSpacing: 250,\n treeSpacing: 200,\n edgeMinimization: true,\n parentCentralization: true,\n direction: 'UD'\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true\n },\n physics: {\n enabled: false\n },\n nodes: {\n shape: 'dot'\n }\n };\n const graph = {\n nodes: nodes,\n edges: edges\n };\n\n class VisNetwork extends Component {\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else {\n return false;\n }\n }\n\n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", params => {\n //console.log(params);\n if (params.nodes) {\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n });\n } // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n\n\n render() {\n return React.createElement(\"div\", {\n className: \"card-body p-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 130\n },\n __self: this\n }, React.createElement(\"div\", {\n ref: \"myRef\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 131\n },\n __self: this\n }));\n }\n\n }\n\n this.updateVisNodes(nodes);\n return React.createElement(VisNetwork, {\n graph: graph,\n options: options,\n updateSelection: this.props.updateSelection,\n shouldUpdateGraph: this.props.shouldUpdateGraph,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 139\n },\n __self: this\n });\n }\n\n}\n\nconst experimentStyle = {\n height: 600\n};\nexport default GraphNativeRep;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js"],"names":["React","Component","Spinner","vis","GraphNativeRep","updateVisNodes","nodes","props","setVisData","shouldComponentUpdate","nextProps","nextState","shouldUpdateGraph","data","pkl_timestamp","console","log","loadingGraph","componentWillUnmount","cleanGraphData","render","nodes_array","edges_array","edges","map","node","push","id","label","color","background","status_color","border","level","edge","from","to","DataSet","options","arrows","enabled","layout","hierarchical","nodeSpacing","treeSpacing","edgeMinimization","parentCentralization","direction","interaction","dragNodes","hoverConnectedEdges","navigationButtons","physics","shape","graph","VisNetwork","componentDidMount","network","Network","refs","myRef","on","params","updateSelection","experimentStyle","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,SAAhB,QAAiC,OAAjC,C,CACA;;AACA,OAAOC,OAAP,MAAoB,mBAApB;AACA,OAAOC,GAAP,MAAgB,KAAhB;;AAEA,MAAMC,cAAN,SAA6BH,SAA7B,CAAuC;AAAA;AAAA;;AAAA,SAmBnCI,cAnBmC,GAmBjBC,KAAD,IAAW;AACxB,WAAKC,KAAL,CAAWC,UAAX,CAAsBF,KAAtB;AACH,KArBkC;AAAA;;AAEnCG,EAAAA,qBAAqB,CAACC,SAAD,EAAYC,SAAZ,EAAsB;AACvC,QAAI,KAAKJ,KAAL,CAAWK,iBAAX,KAAiC,IAArC,EAA0C;AACtC,aAAO,IAAP;AACD,KAFH,MAEQ,IAAIF,SAAS,CAACG,IAAV,IAAkB,KAAKN,KAAL,CAAWM,IAA7B,IAAsCH,SAAS,CAACG,IAAV,CAAeC,aAAf,KAAiC,KAAKP,KAAL,CAAWM,IAAX,CAAgBC,aAA3F,EAA0G;AAC9GC,MAAAA,OAAO,CAACC,GAAR,CAAY,aAAZ;AACA,aAAO,IAAP;AACD,KAHK,MAGA,IAAIN,SAAS,CAACO,YAAV,KAA2B,KAAKV,KAAL,CAAWU,YAA1C,EAAuD;AAC3D,aAAO,IAAP;AACD,KAFK,MAED;AACH,aAAO,KAAP;AACD;AACN;;AACDC,EAAAA,oBAAoB,GAAG;AACnBH,IAAAA,OAAO,CAACC,GAAR,CAAY,YAAZ;AACA,SAAKT,KAAL,CAAWY,cAAX;AACH;;AAQDC,EAAAA,MAAM,GAAI;AACN,QAAI,KAAKb,KAAL,CAAWU,YAAf,EAA6B,OAAO,oBAAC,OAAD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAAP;;AAC7B,QAAI,KAAKV,KAAL,CAAWM,IAAX,IAAmB,IAAvB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AG,CAACuD,OAAR,CAAgB,KAAKC,IAAL,CAAUC,KAA1B,EAAiC,KAAKrD,KAAL,CAAW+C,KAA5C,EAAmD,KAAK/C,KAAL,CAAW+B,OAA9D,CAAd;AACAmB,QAAAA,OAAO,CAACI,EAAR,CAAW,OAAX,EAAqBC,MAAD,IAAY;AAC5B;AACA,cAAIA,MAAM,CAACxD,KAAX,EAAiB;AACb;AACA,iBAAKC,KAAL,CAAWwD,eAAX,CAA2BD,MAAM,CAACxD,KAAlC;AACH;AAEJ,SAPD;AAQH,OApB8B,CAsB/B;AACA;AACA;AACA;;;AAEAc,MAAAA,MAAM,GAAG;AACL,eACI;AAAK,UAAA,SAAS,EAAC,eAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,WACI;AAAK,UAAA,GAAG,EAAC,OAAT;AAAiB,UAAA,KAAK,EAAE4C,eAAxB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,UADJ,CADJ;AAKH;;AAjC8B;;AAoCnC,SAAK3D,cAAL,CAAoBC,KAApB;AAEA,WAAO,oBAAC,UAAD;AACH,MAAA,KAAK,EAAEgD,KADJ;AAEH,MAAA,OAAO,EAAEhB,OAFN;AAGH,MAAA,eAAe,EAAE,KAAK/B,KAAL,CAAWwD,eAHzB;AAIH,MAAA,iBAAiB,EAAE,KAAKxD,KAAL,CAAWK,iBAJ3B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAAP;AAOH;;AA5IkC;;AA0JvC,MAAMoD,eAAe,GAAG;AACpBC,EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,eAAe7D,cAAf","sourcesContent":["import React, { Component } from \"react\";\n// import vis from \"vis-network\";\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n\n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true\n }else if (nextProps.data && this.props.data && (nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp)){\n console.log(\"Rerendering\")\n return true;\n }else if (nextProps.loadingGraph !== this.props.loadingGraph){\n return true; \n }else{\n return false;\n }\n }\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n updateVisNodes = (nodes) => {\n this.props.setVisData(nodes);\n }\n\n\n\n render () {\n if (this.props.loadingGraph) return ;\n if (this.props.data == null){\n return (\n
\n

Press Show Graph to see the graph representation of the experiment.

\n

If the experiment is running, press Start Job Monitor to start a live tracker of the changes on the experiment's jobs.\n This process will automatically update the graph's nodes colors and show a log of the detected changes.\n

\n
\n );\n }\n\n var nodes_array = [];\n var edges_array = [];\n \n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: { background: node.status_color, border: \"black\" },\n level: node.level,\n })\n );\n \n this.props.data.edges.map(edge => \n edges_array.push({ from: edge.from, to: edge.to })\n );\n }\n \n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n\n\n const options = {\n edges: {\n arrows: {\n to: { enabled: true }\n }\n },\n layout: {\n //improvedLayout: true,\n hierarchical: {\n // enabled: true,\n nodeSpacing: 250,\n treeSpacing: 200,\n edgeMinimization: true,\n parentCentralization: true,\n direction: 'UD',\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true,\n },\n physics: {\n enabled: false,\n },\n nodes: {\n shape: 'dot',\n }\n };\n \n const graph = {\n nodes : nodes,\n edges : edges,\n };\n\n class VisNetwork extends Component {\n \n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true;\n } else {\n return false;\n }\n }\n \n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", (params) => {\n //console.log(params);\n if (params.nodes){\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n \n });\n }\n \n // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n \n render() { \n return (\n
\n
\n
\n );\n }\n }\n\n this.updateVisNodes(nodes);\n \n return ;\n\n }\n\n\n \n\n \n\n \n \n\n \n\n}\n\nconst experimentStyle = {\n height: 600\n };\n\nexport default GraphNativeRep;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/67c4ec61a789d0199d338c42c7fd5c47.json b/node_modules/.cache/babel-loader/67c4ec61a789d0199d338c42c7fd5c47.json new file mode 100644 index 0000000000000000000000000000000000000000..3ce03d6c5cc027b0fce228f2833ff0e7c9bc1286 --- /dev/null +++ b/node_modules/.cache/babel-loader/67c4ec61a789d0199d338c42c7fd5c47.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js\";\nimport React, { Component } from \"react\"; // import vis from \"vis-network\";\n\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n shouldComponentUpdate(nextProps, nextState) {\n if (nextProps.data && this.props.data) {\n console.log(\"Rerendering\");\n return true;\n } else if (nextProps.loadingGraph !== this.props.loadingGraph) {\n return true;\n } else {\n return false;\n }\n }\n\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n render() {\n if (this.props.loadingGraph) return React.createElement(Spinner, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 27\n },\n __self: this\n });\n\n if (this.props.data == null) {\n return React.createElement(\"div\", {\n className: \"card-body text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 30\n },\n __self: this\n }, React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 31\n },\n __self: this\n }, \"Press \", React.createElement(\"span\", {\n className: \"badge badge-info\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 31\n },\n __self: this\n }, \"Show Graph\"), \" to see the graph representation of the experiment.\"), React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 32\n },\n __self: this\n }, \"If the experiment is running, press \", React.createElement(\"span\", {\n className: \"badge badge-dark\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 32\n },\n __self: this\n }, \"Start Job Monitor\"), \" to start a live tracker of the changes on the experiment's jobs. This process will automatically update the graph's nodes colors and show a log of the detected changes.\"));\n }\n\n var nodes_array = [];\n var edges_array = [];\n\n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: {\n background: node.status_color,\n border: \"black\"\n } //level: node.priority,\n\n }));\n this.props.data.edges.map(edge => edges_array.push({\n from: edge.from,\n to: edge.to\n }));\n }\n\n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n this.props.setVisData(nodes);\n const options = {\n edges: {\n arrows: {\n to: {\n enabled: true\n }\n }\n },\n layout: {\n improvedLayout: true,\n hierarchical: {\n nodeSpacing: 250,\n edgeMinimization: false,\n blockShifting: false,\n parentCentralization: false,\n direction: 'UD',\n sortMethod: 'directed'\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true\n },\n physics: {\n enabled: false\n },\n nodes: {\n shape: 'dot'\n }\n };\n const graph = {\n nodes: nodes,\n edges: edges\n };\n\n class VisNetwork extends Component {\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else {\n return false;\n }\n }\n\n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", params => {\n //console.log(params);\n if (params.nodes) {\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n });\n } // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n\n\n render() {\n return React.createElement(\"div\", {\n className: \"card-body p-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 126\n },\n __self: this\n }, React.createElement(\"div\", {\n ref: \"myRef\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 127\n },\n __self: this\n }));\n }\n\n }\n\n return React.createElement(VisNetwork, {\n graph: graph,\n options: options,\n updateSelection: this.props.updateSelection,\n shouldUpdateGraph: this.props.shouldUpdateGraph,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 133\n },\n __self: this\n });\n }\n\n}\n\nconst experimentStyle = {\n height: 600\n};\nexport default GraphNativeRep;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js"],"names":["React","Component","Spinner","vis","GraphNativeRep","shouldComponentUpdate","nextProps","nextState","data","props","console","log","loadingGraph","componentWillUnmount","cleanGraphData","render","nodes_array","edges_array","nodes","edges","map","node","push","id","label","color","background","status_color","border","edge","from","to","DataSet","setVisData","options","arrows","enabled","layout","improvedLayout","hierarchical","nodeSpacing","edgeMinimization","blockShifting","parentCentralization","direction","sortMethod","interaction","dragNodes","hoverConnectedEdges","navigationButtons","physics","shape","graph","VisNetwork","shouldUpdateGraph","componentDidMount","network","Network","refs","myRef","on","params","updateSelection","experimentStyle","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,SAAhB,QAAiC,OAAjC,C,CACA;;AACA,OAAOC,OAAP,MAAoB,mBAApB;AACA,OAAOC,GAAP,MAAgB,KAAhB;;AAEA,MAAMC,cAAN,SAA6BH,SAA7B,CAAuC;AAEnCI,EAAAA,qBAAqB,CAACC,SAAD,EAAYC,SAAZ,EAAsB;AAEvC,QAAID,SAAS,CAACE,IAAV,IAAkB,KAAKC,KAAL,CAAWD,IAAjC,EAAsC;AACpCE,MAAAA,OAAO,CAACC,GAAR,CAAY,aAAZ;AACA,aAAO,IAAP;AACD,KAHD,MAGM,IAAIL,SAAS,CAACM,YAAV,KAA2B,KAAKH,KAAL,CAAWG,YAA1C,EAAuD;AAC3D,aAAO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;AAAA;AAAA;AAAA;AAAA;AAAA,MAAP;AAOH;;AAtIkC;;AAoJvC,MAAMS,eAAe,GAAG;AACpBC,EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,eAAe5D,cAAf","sourcesContent":["import React, { Component } from \"react\";\n// import vis from \"vis-network\";\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n\n shouldComponentUpdate(nextProps, nextState){ \n \n if (nextProps.data && this.props.data){\n console.log(\"Rerendering\")\n return true;\n }else if (nextProps.loadingGraph !== this.props.loadingGraph){\n return true; \n }else{\n return false;\n }\n }\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n\n\n render() {\n if (this.props.loadingGraph) return ;\n if (this.props.data == null){\n return (\n
\n

Press Show Graph to see the graph representation of the experiment.

\n

If the experiment is running, press Start Job Monitor to start a live tracker of the changes on the experiment's jobs.\n This process will automatically update the graph's nodes colors and show a log of the detected changes.\n

\n
\n );\n }\n\n var nodes_array = [];\n var edges_array = [];\n \n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: { background: node.status_color, border: \"black\" },\n //level: node.priority,\n })\n );\n \n this.props.data.edges.map(edge => \n edges_array.push({ from: edge.from, to: edge.to })\n );\n }\n \n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n this.props.setVisData(nodes);\n \n const options = {\n edges: {\n arrows: {\n to: { enabled: true }\n }\n },\n layout: {\n improvedLayout: true,\n hierarchical: {\n \n nodeSpacing: 250,\n edgeMinimization: false,\n blockShifting: false,\n parentCentralization: false,\n direction: 'UD',\n sortMethod: 'directed',\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true,\n },\n physics: {\n enabled: false,\n },\n nodes: {\n shape: 'dot',\n }\n };\n \n const graph = {\n nodes : nodes,\n edges : edges,\n };\n\n class VisNetwork extends Component {\n \n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true;\n } else {\n return false;\n }\n }\n \n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", (params) => {\n //console.log(params);\n if (params.nodes){\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n \n });\n }\n \n // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n \n render() { \n return (\n
\n
\n
\n );\n }\n }\n \n return ;\n\n }\n\n\n \n\n \n\n \n \n\n \n\n}\n\nconst experimentStyle = {\n height: 600\n };\n\nexport default GraphNativeRep;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/67f7de44a242df74ff4a67f043dcd34f.json b/node_modules/.cache/babel-loader/67f7de44a242df74ff4a67f043dcd34f.json new file mode 100644 index 0000000000000000000000000000000000000000..4adb2ba83e7b0def8e073ffbd7b7dd24314318ed --- /dev/null +++ b/node_modules/.cache/babel-loader/67f7de44a242df74ff4a67f043dcd34f.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js\";\nimport React, { Component } from \"react\"; // import vis from \"vis-network\";\n\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n constructor(...args) {\n super(...args);\n\n this.updateVisNodes = nodes => {\n this.props.setVisData(nodes);\n };\n }\n\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else if (nextProps.data && this.props.data && nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp) {\n console.log(\"Rerendering\");\n return true;\n } else if (nextProps.loadingGraph !== this.props.loadingGraph) {\n return true;\n } else {\n return false;\n }\n }\n\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n render() {\n if (this.props.loadingGraph) return React.createElement(Spinner, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 32\n },\n __self: this\n });\n\n if (this.props.data == null) {\n return React.createElement(\"div\", {\n className: \"card-body text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 35\n },\n __self: this\n }, React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Press \", React.createElement(\"span\", {\n className: \"badge badge-info\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Show Graph\"), \" to see the graph representation of the experiment.\"), React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"If the experiment is running, press \", React.createElement(\"span\", {\n className: \"badge badge-dark\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"Start Job Monitor\"), \" to start a live tracker of the changes on the experiment's jobs. This process will automatically update the graph's nodes colors and show a log of the detected changes.\"));\n }\n\n var nodes_array = [];\n var edges_array = [];\n\n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: {\n background: node.status_color,\n border: \"black\"\n },\n level: node.level\n }));\n this.props.data.edges.map(edge => edges_array.push({\n from: edge.from,\n to: edge.to\n }));\n }\n\n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n const options = {\n edges: {\n arrows: {\n to: {\n enabled: true\n }\n }\n },\n layout: {\n //improvedLayout: true,\n hierarchical: {\n nodeSpacing: 190,\n blockShifting: false,\n edgeMinimization: true,\n parentCentralization: true,\n sortMethod: 'directed',\n direction: 'UD'\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true\n },\n physics: {\n enabled: false\n },\n nodes: {\n shape: 'dot',\n font: {\n size: 10\n }\n }\n };\n const graph = {\n nodes: nodes,\n edges: edges\n };\n\n class VisNetwork extends Component {\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else {\n return false;\n }\n }\n\n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", params => {\n //console.log(params);\n if (params.nodes) {\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n });\n } // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n\n\n render() {\n return React.createElement(\"div\", {\n className: \"card-body p-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 133\n },\n __self: this\n }, React.createElement(\"div\", {\n ref: \"myRef\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 134\n },\n __self: this\n }));\n }\n\n }\n\n this.updateVisNodes(nodes);\n return React.createElement(VisNetwork, {\n graph: graph,\n options: options,\n updateSelection: this.props.updateSelection,\n shouldUpdateGraph: this.props.shouldUpdateGraph,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 142\n },\n __self: this\n });\n }\n\n}\n\nconst experimentStyle = {\n height: 600\n};\nexport default GraphNativeRep;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js"],"names":["React","Component","Spinner","vis","GraphNativeRep","updateVisNodes","nodes","props","setVisData","shouldComponentUpdate","nextProps","nextState","shouldUpdateGraph","data","pkl_timestamp","console","log","loadingGraph","componentWillUnmount","cleanGraphData","render","nodes_array","edges_array","edges","map","node","push","id","label","color","background","status_color","border","level","edge","from","to","DataSet","options","arrows","enabled","layout","hierarchical","nodeSpacing","blockShifting","edgeMinimization","parentCentralization","sortMethod","direction","interaction","dragNodes","hoverConnectedEdges","navigationButtons","physics","shape","font","size","graph","VisNetwork","componentDidMount","network","Network","refs","myRef","on","params","updateSelection","experimentStyle","height"],"mappings":";AAAA,OAAOA,K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A1B,EAAiC,KAAKxD,KAAL,CAAWkD,KAA5C,EAAmD,KAAKlD,KAAL,CAAW+B,OAA9D,CAAd;AACAsB,QAAAA,OAAO,CAACI,EAAR,CAAW,OAAX,EAAqBC,MAAD,IAAY;AAC5B;AACA,cAAIA,MAAM,CAAC3D,KAAX,EAAiB;AACb;AACA,iBAAKC,KAAL,CAAW2D,eAAX,CAA2BD,MAAM,CAAC3D,KAAlC;AACH;AAEJ,SAPD;AAQH,OApB8B,CAsB/B;AACA;AACA;AACA;;;AAEAc,MAAAA,MAAM,GAAG;AACL,eACI;AAAK,UAAA,SAAS,EAAC,eAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,WACI;AAAK,UAAA,GAAG,EAAC,OAAT;AAAiB,UAAA,KAAK,EAAE+C,eAAxB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,UADJ,CADJ;AAKH;;AAjC8B;;AAoCnC,SAAK9D,cAAL,CAAoBC,KAApB;AAEA,WAAO,oBAAC,UAAD;AACH,MAAA,KAAK,EAAEmD,KADJ;AAEH,MAAA,OAAO,EAAEnB,OAFN;AAGH,MAAA,eAAe,EAAE,KAAK/B,KAAL,CAAW2D,eAHzB;AAIH,MAAA,iBAAiB,EAAE,KAAK3D,KAAL,CAAWK,iBAJ3B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAAP;AAOH;;AA/IkC;;AA6JvC,MAAMuD,eAAe,GAAG;AACpBC,EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,eAAehE,cAAf","sourcesContent":["import React, { Component } from \"react\";\n// import vis from \"vis-network\";\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n\n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true\n }else if (nextProps.data && this.props.data && (nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp)){\n console.log(\"Rerendering\")\n return true;\n }else if (nextProps.loadingGraph !== this.props.loadingGraph){\n return true; \n }else{\n return false;\n }\n }\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n updateVisNodes = (nodes) => {\n this.props.setVisData(nodes);\n }\n\n\n\n render () {\n if (this.props.loadingGraph) return ;\n if (this.props.data == null){\n return (\n
\n

Press Show Graph to see the graph representation of the experiment.

\n

If the experiment is running, press Start Job Monitor to start a live tracker of the changes on the experiment's jobs.\n This process will automatically update the graph's nodes colors and show a log of the detected changes.\n

\n
\n );\n }\n\n var nodes_array = [];\n var edges_array = [];\n \n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: { background: node.status_color, border: \"black\" },\n level: node.level,\n })\n );\n \n this.props.data.edges.map(edge => \n edges_array.push({ from: edge.from, to: edge.to })\n );\n }\n \n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n\n\n const options = {\n edges: {\n arrows: {\n to: { enabled: true }\n }\n },\n layout: {\n //improvedLayout: true,\n hierarchical: {\n nodeSpacing: 190,\n blockShifting: false,\n edgeMinimization: true,\n parentCentralization: true,\n sortMethod: 'directed',\n direction: 'UD',\n }\n }, \n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true,\n },\n physics: {\n enabled: false,\n },\n nodes: {\n shape: 'dot',\n font: {\n size: 10,\n },\n }\n };\n \n const graph = {\n nodes : nodes,\n edges : edges,\n };\n\n class VisNetwork extends Component {\n \n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true;\n } else {\n return false;\n }\n }\n \n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", (params) => {\n //console.log(params);\n if (params.nodes){\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n \n });\n }\n \n // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n \n render() { \n return (\n
\n
\n
\n );\n }\n }\n\n this.updateVisNodes(nodes);\n \n return ;\n\n }\n\n\n \n\n \n\n \n \n\n \n\n}\n\nconst experimentStyle = {\n height: 600\n };\n\nexport default GraphNativeRep;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/70600f07927a51bc541cd3a37f378580.json b/node_modules/.cache/babel-loader/70600f07927a51bc541cd3a37f378580.json new file mode 100644 index 0000000000000000000000000000000000000000..95d62b3983123be2f62afb628697bf78c0e74b47 --- /dev/null +++ b/node_modules/.cache/babel-loader/70600f07927a51bc541cd3a37f378580.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js\";\nimport React, { Component } from \"react\"; // import vis from \"vis-network\";\n\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n constructor(...args) {\n super(...args);\n\n this.updateVisNodes = nodes => {\n this.props.setVisData(nodes);\n };\n }\n\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else if (nextProps.data && this.props.data && nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp) {\n console.log(\"Rerendering\");\n return true;\n } else if (nextProps.loadingGraph !== this.props.loadingGraph) {\n return true;\n } else {\n return false;\n }\n }\n\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n render() {\n if (this.props.loadingGraph) return React.createElement(Spinner, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 32\n },\n __self: this\n });\n\n if (this.props.data == null) {\n return React.createElement(\"div\", {\n className: \"card-body text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 35\n },\n __self: this\n }, React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Press \", React.createElement(\"span\", {\n className: \"badge badge-info\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Show Graph\"), \" to see the graph representation of the experiment.\"), React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"If the experiment is running, press \", React.createElement(\"span\", {\n className: \"badge badge-dark\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"Start Job Monitor\"), \" to start a live tracker of the changes on the experiment's jobs. This process will automatically update the graph's nodes colors and show a log of the detected changes.\"));\n }\n\n var nodes_array = [];\n var edges_array = [];\n\n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: {\n background: node.status_color,\n border: \"black\"\n },\n level: node.level\n }));\n this.props.data.edges.map(edge => edges_array.push({\n from: edge.from,\n to: edge.to\n }));\n }\n\n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n const options = {\n edges: {\n arrows: {\n to: {\n enabled: true\n }\n }\n },\n layout: {\n improvedLayout: true,\n hierarchical: {\n //nodeSpacing: 250,\n blockShifting: true,\n edgeMinimization: true,\n //parentCentralization: true,\n sortMethod: 'hubsize',\n direction: 'UD'\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true\n },\n physics: {\n enabled: false\n },\n nodes: {\n shape: 'dot'\n }\n };\n const graph = {\n nodes: nodes,\n edges: edges\n };\n\n class VisNetwork extends Component {\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else {\n return false;\n }\n }\n\n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", params => {\n //console.log(params);\n if (params.nodes) {\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n });\n } // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n\n\n render() {\n return React.createElement(\"div\", {\n className: \"card-body p-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 130\n },\n __self: this\n }, React.createElement(\"div\", {\n ref: \"myRef\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 131\n },\n __self: this\n }));\n }\n\n }\n\n this.updateVisNodes(nodes);\n return React.createElement(VisNetwork, {\n graph: graph,\n options: options,\n updateSelection: this.props.updateSelection,\n shouldUpdateGraph: this.props.shouldUpdateGraph,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 139\n },\n __self: this\n });\n }\n\n}\n\nconst experimentStyle = {\n height: 600\n};\nexport default GraphNativeRep;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js"],"names":["React","Component","Spinner","vis","GraphNativeRep","updateVisNodes","nodes","props","setVisData","shouldComponentUpdate","nextProps","nextState","shouldUpdateGraph","data","pkl_timestamp","console","log","loadingGraph","componentWillUnmount","cleanGraphData","render","nodes_array","edges_array","edges","map","node","push","id","label","color","background","status_color","border","level","edge","from","to","DataSet","options","arrows","enabled","layout","improvedLayout","hierarchical","blockShifting","edgeMinimization","sortMethod","direction","interaction","dragNodes","hoverConnectedEdges","navigationButtons","physics","shape","graph","VisNetwork","componentDidMount","network","Network","refs","myRef","on","params","updateSelection","experimentStyle","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,SAAhB,QAAiC,OAAjC,C,CACA;;AACA,OAAOC,OAAP,MAAoB,mBAApB;AACA,OAAOC,GAAP,MAAgB,KAAhB;;AAEA,MAAMC,cAAN,SAA6BH,SAA7B,CAAuC;AAAA;AAAA;;AAAA,SAmBnCI,cAnBmC,GAmBjBC,KAAD,IAAW;AACxB,WAAKC,KAAL,CAAWC,UAAX,CAAsBF,KAAtB;AACH,KArBkC;AAAA;;AAEnCG,EAAAA,qBAAqB,CAACC,SAAD,EAAYC,SAAZ,EAAsB;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AAAK,UAAA,GAAG,EAAC,OAAT;AAAiB,UAAA,KAAK,EAAE4C,eAAxB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,UADJ,CADJ;AAKH;;AAjC8B;;AAoCnC,SAAK3D,cAAL,CAAoBC,KAApB;AAEA,WAAO,oBAAC,UAAD;AACH,MAAA,KAAK,EAAEgD,KADJ;AAEH,MAAA,OAAO,EAAEhB,OAFN;AAGH,MAAA,eAAe,EAAE,KAAK/B,KAAL,CAAWwD,eAHzB;AAIH,MAAA,iBAAiB,EAAE,KAAKxD,KAAL,CAAWK,iBAJ3B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAAP;AAOH;;AA5IkC;;AA0JvC,MAAMoD,eAAe,GAAG;AACpBC,EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,eAAe7D,cAAf","sourcesContent":["import React, { Component } from \"react\";\n// import vis from \"vis-network\";\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n\n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true\n }else if (nextProps.data && this.props.data && (nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp)){\n console.log(\"Rerendering\")\n return true;\n }else if (nextProps.loadingGraph !== this.props.loadingGraph){\n return true; \n }else{\n return false;\n }\n }\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n updateVisNodes = (nodes) => {\n this.props.setVisData(nodes);\n }\n\n\n\n render () {\n if (this.props.loadingGraph) return ;\n if (this.props.data == null){\n return (\n
\n

Press Show Graph to see the graph representation of the experiment.

\n

If the experiment is running, press Start Job Monitor to start a live tracker of the changes on the experiment's jobs.\n This process will automatically update the graph's nodes colors and show a log of the detected changes.\n

\n
\n );\n }\n\n var nodes_array = [];\n var edges_array = [];\n \n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: { background: node.status_color, border: \"black\" },\n level: node.level,\n })\n );\n \n this.props.data.edges.map(edge => \n edges_array.push({ from: edge.from, to: edge.to })\n );\n }\n \n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n\n\n const options = {\n edges: {\n arrows: {\n to: { enabled: true }\n }\n },\n layout: {\n improvedLayout: true,\n hierarchical: {\n //nodeSpacing: 250,\n blockShifting: true,\n edgeMinimization: true,\n //parentCentralization: true,\n sortMethod: 'hubsize',\n direction: 'UD',\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true,\n },\n physics: {\n enabled: false,\n },\n nodes: {\n shape: 'dot',\n }\n };\n \n const graph = {\n nodes : nodes,\n edges : edges,\n };\n\n class VisNetwork extends Component {\n \n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true;\n } else {\n return false;\n }\n }\n \n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", (params) => {\n //console.log(params);\n if (params.nodes){\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n \n });\n }\n \n // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n \n render() { \n return (\n
\n
\n
\n );\n }\n }\n\n this.updateVisNodes(nodes);\n \n return ;\n\n }\n\n\n \n\n \n\n \n \n\n \n\n}\n\nconst experimentStyle = {\n height: 600\n };\n\nexport default GraphNativeRep;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/7135f43badd876647f2b3e7060322d56.json b/node_modules/.cache/babel-loader/7135f43badd876647f2b3e7060322d56.json new file mode 100644 index 0000000000000000000000000000000000000000..f73eaa47f698f6fce0a9ee20cb0be8e6bfbcfebd --- /dev/null +++ b/node_modules/.cache/babel-loader/7135f43badd876647f2b3e7060322d56.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js\";\nimport React, { Component } from \"react\"; // import vis from \"vis-network\";\n\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n constructor(...args) {\n super(...args);\n\n this.updateVisNodes = nodes => {\n this.props.setVisData(nodes);\n };\n }\n\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else if (nextProps.data && this.props.data && nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp) {\n console.log(\"Rerendering\");\n return true;\n } else if (nextProps.loadingGraph !== this.props.loadingGraph) {\n return true;\n } else {\n return false;\n }\n }\n\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n render() {\n if (this.props.loadingGraph) return React.createElement(Spinner, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 32\n },\n __self: this\n });\n\n if (this.props.data == null) {\n return React.createElement(\"div\", {\n className: \"card-body text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 35\n },\n __self: this\n }, React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Press \", React.createElement(\"span\", {\n className: \"badge badge-info\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Show Graph\"), \" to see the graph representation of the experiment.\"), React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"If the experiment is running, press \", React.createElement(\"span\", {\n className: \"badge badge-dark\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"Start Job Monitor\"), \" to start a live tracker of the changes on the experiment's jobs. This process will automatically update the graph's nodes colors and show a log of the detected changes.\"));\n }\n\n var nodes_array = [];\n var edges_array = [];\n\n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: {\n background: node.status_color,\n border: \"black\"\n },\n level: node.level\n }));\n this.props.data.edges.map(edge => edges_array.push({\n from: edge.from,\n to: edge.to\n }));\n }\n\n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n const options = {\n edges: {\n arrows: {\n to: {\n enabled: true\n }\n }\n },\n layout: {\n //improvedLayout: true,\n hierarchical: {\n // enabled: true,\n nodeSpacing: 250,\n treeSpacing: 200,\n blockShifting: false,\n edgeMinimization: true,\n parentCentralization: true,\n direction: 'UD',\n sortMethod: 'directed'\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true\n },\n physics: {\n enabled: false\n },\n nodes: {\n shape: 'dot'\n }\n };\n const graph = {\n nodes: nodes,\n edges: edges\n };\n\n class VisNetwork extends Component {\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else {\n return false;\n }\n }\n\n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", params => {\n //console.log(params);\n if (params.nodes) {\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n });\n } // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n\n\n render() {\n return React.createElement(\"div\", {\n className: \"card-body p-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 132\n },\n __self: this\n }, React.createElement(\"div\", {\n ref: \"myRef\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 133\n },\n __self: this\n }));\n }\n\n }\n\n this.updateVisNodes(nodes);\n return React.createElement(VisNetwork, {\n graph: graph,\n options: options,\n updateSelection: this.props.updateSelection,\n shouldUpdateGraph: this.props.shouldUpdateGraph,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 141\n },\n __self: this\n });\n }\n\n}\n\nconst experimentStyle = {\n height: 600\n};\nexport default GraphNativeRep;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js"],"names":["React","Component","Spinner","vis","GraphNativeRep","updateVisNodes","nodes","props","setVisData","shouldComponentUpdate","nextProps","nextState","shouldUpdateGraph","data","pkl_timestamp","console","log","loadingGraph","componentWillUnmount","cleanGraphData","render","nodes_array","edges_array","edges","map","node","push","id","label","color","background","status_color","border","level","edge","from","to","DataSet","options","arrows","enabled","layout","hierarchical","nodeSpacing","treeSpacing","blockShifting","edgeMinimization","parentCentralization","direction","sortMethod","interaction","dragNodes","hoverConnectedEdges","navigationButtons","physics","shape","graph","VisNetwork","componentDidMount","network","Network","refs","myRef","on","params","updateSelection","experimentStyle","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,SAAhB,QAAiC,OAAjC,C,CACA;;AACA,OAAOC,OAAP,MAAoB,mBAApB;AACA,OAAOC,GAAP,MAAgB,KAAhB;;AAEA,MAAMC,cAAN,SAA6BH,SAA7B,CAAuC;AAAA;AAAA;;AAAA,SAmBnCI,cAnBmC,GAmBjBC,KAAD,IAAW;AACxB,WAAKC,KAAL,CAAWC,UAAX,CAAsBF,KAAtB;AACH,KArBkC;AAAA;;AAEnCG,EAAAA,qBAAqB,CAACC,SAAD,EAAYC,SAAZ,EAAsB;AACvC,QAAI,KAAKJ,KAAL,CAAWK,iBAAX,KAAiC,IAArC,EAA0C;AACtC,aAAO,IAAP;AACD,KAFH,MAEQ,IAAIF,SAAS,CAACG,IAAV,IAAkB,KAAKN,KAAL,CAAWM,IAA7B,IAAsCH,SAAS,CAACG,IAAV,CAAeC,aAAf,KAAiC,KAAKP,KAAL,CAAWM,IAAX,CAAgBC,aAA3F,EAA0G;AAC9GC,MAAAA,OAAO,CAACC,GAAR,CAAY,aAAZ;AACA,aAAO,IAAP;AACD,KAHK,MAGA,IAAIN,SAAS,CAACO,YAAV,KAA2B,KAAKV,KAAL,CAAWU,YAA1C,E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iB,EAAE,KAAK1D,KAAL,CAAWK,iBAJ3B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAAP;AAOH;;AA9IkC;;AA4JvC,MAAMsD,eAAe,GAAG;AACpBC,EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,eAAe/D,cAAf","sourcesContent":["import React, { Component } from \"react\";\n// import vis from \"vis-network\";\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n\n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true\n }else if (nextProps.data && this.props.data && (nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp)){\n console.log(\"Rerendering\")\n return true;\n }else if (nextProps.loadingGraph !== this.props.loadingGraph){\n return true; \n }else{\n return false;\n }\n }\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n updateVisNodes = (nodes) => {\n this.props.setVisData(nodes);\n }\n\n\n\n render () {\n if (this.props.loadingGraph) return ;\n if (this.props.data == null){\n return (\n
\n

Press Show Graph to see the graph representation of the experiment.

\n

If the experiment is running, press Start Job Monitor to start a live tracker of the changes on the experiment's jobs.\n This process will automatically update the graph's nodes colors and show a log of the detected changes.\n

\n
\n );\n }\n\n var nodes_array = [];\n var edges_array = [];\n \n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: { background: node.status_color, border: \"black\" },\n level: node.level,\n })\n );\n \n this.props.data.edges.map(edge => \n edges_array.push({ from: edge.from, to: edge.to })\n );\n }\n \n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n\n\n const options = {\n edges: {\n arrows: {\n to: { enabled: true }\n }\n },\n layout: {\n //improvedLayout: true,\n hierarchical: {\n // enabled: true,\n nodeSpacing: 250,\n treeSpacing: 200,\n blockShifting: false,\n edgeMinimization: true,\n parentCentralization: true,\n direction: 'UD',\n sortMethod: 'directed',\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true,\n },\n physics: {\n enabled: false,\n },\n nodes: {\n shape: 'dot',\n }\n };\n \n const graph = {\n nodes : nodes,\n edges : edges,\n };\n\n class VisNetwork extends Component {\n \n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true;\n } else {\n return false;\n }\n }\n \n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", (params) => {\n //console.log(params);\n if (params.nodes){\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n \n });\n }\n \n // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n \n render() { \n return (\n
\n
\n
\n );\n }\n }\n\n this.updateVisNodes(nodes);\n \n return ;\n\n }\n\n\n \n\n \n\n \n \n\n \n\n}\n\nconst experimentStyle = {\n height: 600\n };\n\nexport default GraphNativeRep;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/7b6cc4a1ab1b4207cad2075b1315cce8.json b/node_modules/.cache/babel-loader/7b6cc4a1ab1b4207cad2075b1315cce8.json new file mode 100644 index 0000000000000000000000000000000000000000..54b1a527715d44fa41a0aeb849fd72f47e62b6de --- /dev/null +++ b/node_modules/.cache/babel-loader/7b6cc4a1ab1b4207cad2075b1315cce8.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js\";\nimport React, { Component } from \"react\"; // import vis from \"vis-network\";\n\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n constructor(...args) {\n super(...args);\n\n this.updateVisNodes = nodes => {\n this.props.setVisData(nodes);\n };\n }\n\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else if (nextProps.data && this.props.data && nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp) {\n console.log(\"Rerendering\");\n return true;\n } else if (nextProps.loadingGraph !== this.props.loadingGraph) {\n return true;\n } else {\n return false;\n }\n }\n\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n render() {\n if (this.props.loadingGraph) return React.createElement(Spinner, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 32\n },\n __self: this\n });\n\n if (this.props.data == null) {\n return React.createElement(\"div\", {\n className: \"card-body text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 35\n },\n __self: this\n }, React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Press \", React.createElement(\"span\", {\n className: \"badge badge-info\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Show Graph\"), \" to see the graph representation of the experiment.\"), React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"If the experiment is running, press \", React.createElement(\"span\", {\n className: \"badge badge-dark\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"Start Job Monitor\"), \" to start a live tracker of the changes on the experiment's jobs. This process will automatically update the graph's nodes colors and show a log of the detected changes.\"));\n }\n\n var nodes_array = [];\n var edges_array = [];\n\n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: {\n background: node.status_color,\n border: \"black\"\n },\n level: node.level\n }));\n this.props.data.edges.map(edge => edges_array.push({\n from: edge.from,\n to: edge.to\n }));\n }\n\n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n const options = {\n edges: {\n arrows: {\n to: {\n enabled: true\n }\n }\n },\n layout: {\n improvedLayout: true,\n hierarchical: {\n nodeSpacing: 190,\n blockShifting: true,\n edgeMinimization: true,\n parentCentralization: true,\n sortMethod: 'hubsize',\n direction: 'UD'\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true\n },\n physics: {\n enabled: false\n },\n nodes: {\n shape: 'dot',\n font: {\n size: 10\n }\n }\n };\n const graph = {\n nodes: nodes,\n edges: edges\n };\n\n class VisNetwork extends Component {\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else {\n return false;\n }\n }\n\n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", params => {\n //console.log(params);\n if (params.nodes) {\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n });\n } // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n\n\n render() {\n return React.createElement(\"div\", {\n className: \"card-body p-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 133\n },\n __self: this\n }, React.createElement(\"div\", {\n ref: \"myRef\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 134\n },\n __self: this\n }));\n }\n\n }\n\n this.updateVisNodes(nodes);\n return React.createElement(VisNetwork, {\n graph: graph,\n options: options,\n updateSelection: this.props.updateSelection,\n shouldUpdateGraph: this.props.shouldUpdateGraph,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 142\n },\n __self: this\n });\n }\n\n}\n\nconst experimentStyle = {\n height: 600\n};\nexport default GraphNativeRep;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js"],"names":["React","Component","Spinner","vis","GraphNativeRep","updateVisNodes","nodes","props","setVisData","shouldComponentUpdate","nextProps","nextState","shouldUpdateGraph","data","pkl_timestamp","console","log","loadingGraph","componentWillUnmount","cleanGraphData","render","nodes_array","edges_array","edges","map","node","push","id","label","color","background","status_color","border","level","edge","from","to","DataSet","options","arrows","enabled","layout","improvedLayout","hierarchical","nodeSpacing","blockShifting","edgeMinimization","parentCentralization","sortMethod","direction","interaction","dragNodes","hoverConnectedEdges","navigationButtons","physics","shape","font","size","graph","VisNetwork","componentDidMount","network","Network","refs","myRef","on","params","updateSelection","experimentStyle","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,SAAhB,QAAiC,OAAjC,C,CACA;;AACA,OAAOC,OAAP,MAAoB,mBAApB;AACA,OAAOC,GAAP,MAAgB,KAAhB;;AAEA,MAAMC,cAAN,SAA6BH,SAA7B,CAAuC;AAAA;AAAA;;AAAA,SAmBnCI,cAnBmC,GAmBjBC,KAAD,IAAW;AACxB,WAAKC,KAAL,CAAWC,UAAX,CAAsBF,KAAtB;AACH,KArBkC;AAAA;;AAEnCG,EAAAA,qBAAqB,CAACC,SAAD,EAAYC,SAAZ,EAAsB;AACvC,QAAI,KAAKJ,KAAL,CAAWK,iBAAX,KAAiC,IAArC,EAA0C;AACtC,aAAO,IAAP;AACD,KAFH,MAEQ,IAAIF,SAAS,CAACG,IAAV,IAAkB,KAAKN,KAAL,CAAWM,IAA7B,IAAsCH,SAAS,CAACG,IAAV,CAAeC,aAAf,KAAiC,KAAKP,KAAL,CAAWM,IAAX,CAAgBC,aAA3F,EAA0G;AAC9GC,MAAAA,OAAO,CAACC,GAAR,CAAY,aAAZ;AACA,aAAO,IAAP;AACD,KAHK,MAGA,IAAIN,SAAS,CAACO,YAAV,KAA2B,KAAKV,KAAL,CAAWU,YAA1C,EAAuD;AAC3D,aAAO,IAAP;AACD,KAFK,MAED;AACH,aAAO,KAAP;AACD;AACN;;AACDC,EAAAA,oBAAoB,GAAG;AACnBH,IAAAA,OAAO,CAACC,GAAR,CAAY,YAAZ;AACA,SAAKT,KAAL,CAAWY,cAAX;AACH;;AAQDC,EAAAA,MAAM,GAAI;AACN,QAAI,KAAKb,KAAL,CAAWU,YAAf,EAA6B,OAAO,oBAAC,OAAD;AAAA;AAAA;AAAA;AAAA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\"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n\n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true\n }else if (nextProps.data && this.props.data && (nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp)){\n console.log(\"Rerendering\")\n return true;\n }else if (nextProps.loadingGraph !== this.props.loadingGraph){\n return true; \n }else{\n return false;\n }\n }\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n updateVisNodes = (nodes) => {\n this.props.setVisData(nodes);\n }\n\n\n\n render () {\n if (this.props.loadingGraph) return ;\n if (this.props.data == null){\n return (\n
\n

Press Show Graph to see the graph representation of the experiment.

\n

If the experiment is running, press Start Job Monitor to start a live tracker of the changes on the experiment's jobs.\n This process will automatically update the graph's nodes colors and show a log of the detected changes.\n

\n
\n );\n }\n\n var nodes_array = [];\n var edges_array = [];\n \n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: { background: node.status_color, border: \"black\" },\n level: node.level,\n })\n );\n \n this.props.data.edges.map(edge => \n edges_array.push({ from: edge.from, to: edge.to })\n );\n }\n \n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n\n\n const options = {\n edges: {\n arrows: {\n to: { enabled: true }\n }\n },\n layout: {\n improvedLayout: true,\n hierarchical: {\n nodeSpacing: 190,\n blockShifting: true,\n edgeMinimization: true,\n parentCentralization: true,\n sortMethod: 'hubsize',\n direction: 'UD',\n }\n }, \n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true,\n },\n physics: {\n enabled: false,\n },\n nodes: {\n shape: 'dot',\n font: {\n size: 10,\n },\n }\n };\n \n const graph = {\n nodes : nodes,\n edges : edges,\n };\n\n class VisNetwork extends Component {\n \n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true;\n } else {\n return false;\n }\n }\n \n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", (params) => {\n //console.log(params);\n if (params.nodes){\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n \n });\n }\n \n // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n \n render() { \n return (\n
\n
\n
\n );\n }\n }\n\n this.updateVisNodes(nodes);\n \n return ;\n\n }\n\n\n \n\n \n\n \n \n\n \n\n}\n\nconst experimentStyle = {\n height: 600\n };\n\nexport default GraphNativeRep;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/7c7c74d5ce8902ad6bb13ce815a43300.json b/node_modules/.cache/babel-loader/7c7c74d5ce8902ad6bb13ce815a43300.json new file mode 100644 index 0000000000000000000000000000000000000000..dc2d1606b61ede1f99efe54d75b21e6772f745d5 --- /dev/null +++ b/node_modules/.cache/babel-loader/7c7c74d5ce8902ad6bb13ce815a43300.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js\";\nimport React, { Component } from \"react\"; // import vis from \"vis-network\";\n\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n constructor(...args) {\n super(...args);\n\n this.updateVisNodes = nodes => {\n this.props.setVisData(nodes);\n };\n }\n\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else if (nextProps.data && this.props.data && nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp) {\n console.log(\"Rerendering\");\n return true;\n } else if (nextProps.loadingGraph !== this.props.loadingGraph) {\n return true;\n } else {\n return false;\n }\n }\n\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n render() {\n if (this.props.loadingGraph) return React.createElement(Spinner, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 32\n },\n __self: this\n });\n\n if (this.props.data == null) {\n return React.createElement(\"div\", {\n className: \"card-body text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 35\n },\n __self: this\n }, React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Press \", React.createElement(\"span\", {\n className: \"badge badge-info\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Show Graph\"), \" to see the graph representation of the experiment.\"), React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"If the experiment is running, press \", React.createElement(\"span\", {\n className: \"badge badge-dark\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"Start Job Monitor\"), \" to start a live tracker of the changes on the experiment's jobs. This process will automatically update the graph's nodes colors and show a log of the detected changes.\"));\n }\n\n var nodes_array = [];\n var edges_array = [];\n\n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: {\n background: node.status_color,\n border: \"black\"\n },\n level: node.level\n }));\n this.props.data.edges.map(edge => edges_array.push({\n from: edge.from,\n to: edge.to\n }));\n }\n\n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n const options = {\n edges: {\n arrows: {\n to: {\n enabled: true\n }\n }\n },\n layout: {\n //improvedLayout: true,\n hierarchical: {\n // enabled: true,\n nodeSpacing: 250,\n blockShifting: true,\n edgeMinimization: true,\n //parentCentralization: true,\n direction: 'UD'\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true\n },\n physics: {\n enabled: false\n },\n nodes: {\n shape: 'dot'\n }\n };\n const graph = {\n nodes: nodes,\n edges: edges\n };\n\n class VisNetwork extends Component {\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else {\n return false;\n }\n }\n\n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", params => {\n //console.log(params);\n if (params.nodes) {\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n });\n } // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n\n\n render() {\n return React.createElement(\"div\", {\n className: \"card-body p-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 130\n },\n __self: this\n }, React.createElement(\"div\", {\n ref: \"myRef\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 131\n },\n __self: this\n }));\n }\n\n }\n\n this.updateVisNodes(nodes);\n return React.createElement(VisNetwork, {\n graph: graph,\n options: options,\n updateSelection: this.props.updateSelection,\n shouldUpdateGraph: this.props.shouldUpdateGraph,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 139\n },\n __self: this\n });\n }\n\n}\n\nconst experimentStyle = {\n height: 600\n};\nexport default GraphNativeRep;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js"],"names":["React","Component","Spinner","vis","GraphNativeRep","updateVisNodes","nodes","props","setVisData","shouldComponentUpdate","nextProps","nextState","shouldUpdateGraph","data","pkl_timestamp","console","log","loadingGraph","componentWillUnmount","cleanGraphData","render","nodes_array","edges_array","edges","map","node","push","id","label","color","background","status_color","border","level","edge","from","to","DataSet","options","arrows","enabled","layout","hierarchical","nodeSpacing","blockShifting","edgeMinimization","direction","interaction","dragNodes","hoverConnectedEdges","navigationButtons","physics","shape","graph","VisNetwork","componentDidMount","network","Network","refs","myRef","on","params","updateSelection","experimentStyle","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,SAAhB,QAAiC,OAAjC,C,CACA;;AACA,OAAOC,OAAP,MAAoB,mBAApB;AACA,OAAOC,GAA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BAAKC,KAAL,CAAWuD,eAAX,CAA2BD,MAAM,CAACvD,KAAlC;AACH;AAEJ,SAPD;AAQH,OApB8B,CAsB/B;AACA;AACA;AACA;;;AAEAc,MAAAA,MAAM,GAAG;AACL,eACI;AAAK,UAAA,SAAS,EAAC,eAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,WACI;AAAK,UAAA,GAAG,EAAC,OAAT;AAAiB,UAAA,KAAK,EAAE2C,eAAxB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,UADJ,CADJ;AAKH;;AAjC8B;;AAoCnC,SAAK1D,cAAL,CAAoBC,KAApB;AAEA,WAAO,oBAAC,UAAD;AACH,MAAA,KAAK,EAAE+C,KADJ;AAEH,MAAA,OAAO,EAAEf,OAFN;AAGH,MAAA,eAAe,EAAE,KAAK/B,KAAL,CAAWuD,eAHzB;AAIH,MAAA,iBAAiB,EAAE,KAAKvD,KAAL,CAAWK,iBAJ3B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAAP;AAOH;;AA5IkC;;AA0JvC,MAAMmD,eAAe,GAAG;AACpBC,EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,eAAe5D,cAAf","sourcesContent":["import React, { Component } from \"react\";\n// import vis from \"vis-network\";\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n\n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true\n }else if (nextProps.data && this.props.data && (nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp)){\n console.log(\"Rerendering\")\n return true;\n }else if (nextProps.loadingGraph !== this.props.loadingGraph){\n return true; \n }else{\n return false;\n }\n }\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n updateVisNodes = (nodes) => {\n this.props.setVisData(nodes);\n }\n\n\n\n render () {\n if (this.props.loadingGraph) return ;\n if (this.props.data == null){\n return (\n
\n

Press Show Graph to see the graph representation of the experiment.

\n

If the experiment is running, press Start Job Monitor to start a live tracker of the changes on the experiment's jobs.\n This process will automatically update the graph's nodes colors and show a log of the detected changes.\n

\n
\n );\n }\n\n var nodes_array = [];\n var edges_array = [];\n \n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: { background: node.status_color, border: \"black\" },\n level: node.level,\n })\n );\n \n this.props.data.edges.map(edge => \n edges_array.push({ from: edge.from, to: edge.to })\n );\n }\n \n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n\n\n const options = {\n edges: {\n arrows: {\n to: { enabled: true }\n }\n },\n layout: {\n //improvedLayout: true,\n hierarchical: {\n // enabled: true,\n nodeSpacing: 250,\n blockShifting: true,\n edgeMinimization: true,\n //parentCentralization: true,\n direction: 'UD',\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true,\n },\n physics: {\n enabled: false,\n },\n nodes: {\n shape: 'dot',\n }\n };\n \n const graph = {\n nodes : nodes,\n edges : edges,\n };\n\n class VisNetwork extends Component {\n \n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true;\n } else {\n return false;\n }\n }\n \n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", (params) => {\n //console.log(params);\n if (params.nodes){\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n \n });\n }\n \n // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n \n render() { \n return (\n
\n
\n
\n );\n }\n }\n\n this.updateVisNodes(nodes);\n \n return ;\n\n }\n\n\n \n\n \n\n \n \n\n \n\n}\n\nconst experimentStyle = {\n height: 600\n };\n\nexport default GraphNativeRep;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/7d215fe502bb6ddfa634dd0197854cab.json b/node_modules/.cache/babel-loader/7d215fe502bb6ddfa634dd0197854cab.json new file mode 100644 index 0000000000000000000000000000000000000000..54523c3a507f3059f057fa2fe498d4cd3460795c --- /dev/null +++ b/node_modules/.cache/babel-loader/7d215fe502bb6ddfa634dd0197854cab.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js\";\nimport React, { Component } from \"react\"; // import vis from \"vis-network\";\n\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n constructor(...args) {\n super(...args);\n\n this.updateVisNodes = nodes => {\n this.props.setVisData(nodes);\n };\n }\n\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else if (nextProps.data && this.props.data && nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp) {\n console.log(\"Rerendering\");\n return true;\n } else if (nextProps.loadingGraph !== this.props.loadingGraph) {\n return true;\n } else {\n return false;\n }\n }\n\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n render() {\n if (this.props.loadingGraph) return React.createElement(Spinner, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 32\n },\n __self: this\n });\n\n if (this.props.data == null) {\n return React.createElement(\"div\", {\n className: \"card-body text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 35\n },\n __self: this\n }, React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Press \", React.createElement(\"span\", {\n className: \"badge badge-info\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Show Graph\"), \" to see the graph representation of the experiment.\"), React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"If the experiment is running, press \", React.createElement(\"span\", {\n className: \"badge badge-dark\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"Start Job Monitor\"), \" to start a live tracker of the changes on the experiment's jobs. This process will automatically update the graph's nodes colors and show a log of the detected changes.\"));\n }\n\n var nodes_array = [];\n var edges_array = [];\n\n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: {\n background: node.status_color,\n border: \"black\"\n } //level: node.level,\n\n }));\n this.props.data.edges.map(edge => edges_array.push({\n from: edge.from,\n to: edge.to\n }));\n }\n\n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n const options = {\n edges: {\n arrows: {\n to: {\n enabled: true\n }\n }\n },\n layout: {\n //improvedLayout: true,\n hierarchical: {\n // enabled: true,\n nodeSpacing: 250,\n edgeMinimization: false,\n parentCentralization: true,\n direction: 'UD'\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true\n },\n physics: {\n enabled: false\n },\n nodes: {\n shape: 'dot'\n }\n };\n const graph = {\n nodes: nodes,\n edges: edges\n };\n\n class VisNetwork extends Component {\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else {\n return false;\n }\n }\n\n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", params => {\n //console.log(params);\n if (params.nodes) {\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n });\n } // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n\n\n render() {\n return React.createElement(\"div\", {\n className: \"card-body p-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 129\n },\n __self: this\n }, React.createElement(\"div\", {\n ref: \"myRef\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 130\n },\n __self: this\n }));\n }\n\n }\n\n this.updateVisNodes(nodes);\n return React.createElement(VisNetwork, {\n graph: graph,\n options: options,\n updateSelection: this.props.updateSelection,\n shouldUpdateGraph: this.props.shouldUpdateGraph,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 138\n },\n __self: this\n });\n }\n\n}\n\nconst experimentStyle = {\n height: 600\n};\nexport default GraphNativeRep;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js"],"names":["React","Component","Spinner","vis","GraphNativeRep","updateVisNodes","nodes","props","setVisData","shouldComponentUpdate","nextProps","nextState","shouldUpdateGraph","data","pkl_timestamp","console","log","loadingGraph","componentWillUnmount","cleanGraphData","render","nodes_array","edges_array","edges","map","node","push","id","label","color","background","status_color","border","edge","from","to","DataSet","options","arrows","enabled","layout","hierarchical","nodeSpacing","edgeMinimization","parentCentralization","direction","interaction","dragNodes","hoverConnectedEdges","navigationButtons","physics","shape","graph","VisNetwork","componentDidMount","network","Network","refs","myRef","on","params","updateSelection","experimentStyle","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,SAAhB,QAAiC,OAAjC,C,CACA;;AACA,OAAOC,OAAP,MAAoB,mBAApB;AACA,OAAOC,GAAP,MAAgB,KAAhB;;AAEA,MAAMC,cAAN,SAA6BH,SAA7B,CAAuC;AAAA;AAAA;;AAAA,SAmBnCI,cAnBmC,GAmBjBC,KAAD,IAAW;AACxB,WAAKC,KAAL,CAAWC,UAAX,CAAsBF,KAAtB;AACH,KArBkC;AAAA;;AAEnCG,EAAAA,qBAAqB,CAACC,SAAD,EAAYC,SAAZ,EAAsB;AACvC,QAAI,KAAKJ,KAAL,CAAWK,iBAAX,KAAiC,IAArC,EAA0C;AACtC,aAAO,IAAP;AACD,KAFH,MAEQ,IAAIF,SAAS,CAACG,IAAV,IAAkB,KAAKN,KAAL,CAAWM,IAA7B,IAAsCH,SAAS,CAACG,IAAV,CAAeC,aAAf,KAAiC,KAAKP,KAAL,CAAWM,IAAX,CAAgBC,aAA3F,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;AAIH,MAAA,iBAAiB,EAAE,KAAKtD,KAAL,CAAWK,iBAJ3B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAAP;AAOH;;AA3IkC;;AAyJvC,MAAMkD,eAAe,GAAG;AACpBC,EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,eAAe3D,cAAf","sourcesContent":["import React, { Component } from \"react\";\n// import vis from \"vis-network\";\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n\n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true\n }else if (nextProps.data && this.props.data && (nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp)){\n console.log(\"Rerendering\")\n return true;\n }else if (nextProps.loadingGraph !== this.props.loadingGraph){\n return true; \n }else{\n return false;\n }\n }\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n updateVisNodes = (nodes) => {\n this.props.setVisData(nodes);\n }\n\n\n\n render () {\n if (this.props.loadingGraph) return ;\n if (this.props.data == null){\n return (\n
\n

Press Show Graph to see the graph representation of the experiment.

\n

If the experiment is running, press Start Job Monitor to start a live tracker of the changes on the experiment's jobs.\n This process will automatically update the graph's nodes colors and show a log of the detected changes.\n

\n
\n );\n }\n\n var nodes_array = [];\n var edges_array = [];\n \n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: { background: node.status_color, border: \"black\" },\n //level: node.level,\n })\n );\n \n this.props.data.edges.map(edge => \n edges_array.push({ from: edge.from, to: edge.to })\n );\n }\n \n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n\n\n const options = {\n edges: {\n arrows: {\n to: { enabled: true }\n }\n },\n layout: {\n //improvedLayout: true,\n hierarchical: {\n // enabled: true,\n nodeSpacing: 250,\n edgeMinimization: false,\n parentCentralization: true,\n direction: 'UD',\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true,\n },\n physics: {\n enabled: false,\n },\n nodes: {\n shape: 'dot',\n }\n };\n \n const graph = {\n nodes : nodes,\n edges : edges,\n };\n\n class VisNetwork extends Component {\n \n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true;\n } else {\n return false;\n }\n }\n \n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", (params) => {\n //console.log(params);\n if (params.nodes){\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n \n });\n }\n \n // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n \n render() { \n return (\n
\n
\n
\n );\n }\n }\n\n this.updateVisNodes(nodes);\n \n return ;\n\n }\n\n\n \n\n \n\n \n \n\n \n\n}\n\nconst experimentStyle = {\n height: 600\n };\n\nexport default GraphNativeRep;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/7e3609814cd8b7eef25b9685fd598c8e.json b/node_modules/.cache/babel-loader/7e3609814cd8b7eef25b9685fd598c8e.json new file mode 100644 index 0000000000000000000000000000000000000000..98e2a5320e7893bc370b141de8c1f84dce72bbcc --- /dev/null +++ b/node_modules/.cache/babel-loader/7e3609814cd8b7eef25b9685fd598c8e.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js\";\nimport React, { Component, useContext } from \"react\"; // import vis from \"vis-network\";\n\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else if (nextProps.data && this.props.data && nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp) {\n console.log(\"Rerendering\");\n return true;\n } else if (nextProps.loadingGraph !== this.props.loadingGraph) {\n return true;\n } else {\n return false;\n }\n }\n\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n render() {\n if (this.props.loadingGraph) return React.createElement(Spinner, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 29\n },\n __self: this\n });\n\n if (this.props.data == null) {\n return React.createElement(\"div\", {\n className: \"card-body text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 32\n },\n __self: this\n }, React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 33\n },\n __self: this\n }, \"Press \", React.createElement(\"span\", {\n className: \"badge badge-info\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 33\n },\n __self: this\n }, \"Show Graph\"), \" to see the graph representation of the experiment.\"), React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 34\n },\n __self: this\n }, \"If the experiment is running, press \", React.createElement(\"span\", {\n className: \"badge badge-dark\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 34\n },\n __self: this\n }, \"Start Job Monitor\"), \" to start a live tracker of the changes on the experiment's jobs. This process will automatically update the graph's nodes colors and show a log of the detected changes.\"));\n }\n\n var nodes_array = [];\n var edges_array = [];\n\n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: {\n background: node.status_color,\n border: \"black\"\n } //level: node.priority,\n\n }));\n this.props.data.edges.map(edge => edges_array.push({\n from: edge.from,\n to: edge.to\n }));\n }\n\n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n const options = {\n edges: {\n arrows: {\n to: {\n enabled: true\n }\n }\n },\n layout: {\n improvedLayout: true,\n hierarchical: {\n nodeSpacing: 250,\n edgeMinimization: false,\n blockShifting: false,\n parentCentralization: false,\n direction: 'UD',\n sortMethod: 'directed'\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true\n },\n physics: {\n enabled: false\n },\n nodes: {\n shape: 'dot'\n }\n };\n const graph = {\n nodes: nodes,\n edges: edges\n };\n\n class VisNetwork extends Component {\n // shouldComponentUpdate(nextProps, nextState){ \n // if (nextProps.loadingGraph !== this.props.loadingGraph){\n // return true; \n // }else{\n // return false;\n // }\n // }\n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", params => {\n //console.log(params);\n if (params.nodes) {\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n });\n } // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n\n\n render() {\n return React.createElement(\"div\", {\n className: \"card-body p-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 127\n },\n __self: this\n }, React.createElement(\"div\", {\n ref: \"myRef\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 128\n },\n __self: this\n }));\n }\n\n }\n\n return React.createElement(VisNetwork, {\n graph: graph,\n options: options,\n updateSelection: this.props.updateSelection,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 134\n },\n __self: this\n });\n }\n\n}\n\nconst experimentStyle = {\n height: 600\n};\nexport default GraphNativeRep;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js"],"names":["React","Component","useContext","Spinner","vis","GraphNativeRep","shouldComponentUpdate","nextProps","nextState","props","shouldUpdateGraph","data","pkl_timestamp","console","log","loadingGraph","componentWillUnmount","cleanGraphData","render","nodes_array","edges_array","nodes","edges","map","node","push","id","label","color","background","status_color","border","edge","from","to","DataSet","options","arrows","enabled","layout","improvedLayout","hierarchical","nodeSpacing","edgeMinimization","blockShifting","parentCentralization","direction","sortMethod","interaction","dragNodes","hoverConnectedEdges","navigationButtons","physics","shape","graph","VisNetwork","componentDidMount","network","Network","refs","myRef","on","params","update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AAQH,OApB8B,CAsB/B;AACA;AACA;AACA;;;AAEAH,MAAAA,MAAM,GAAG;AACL,eACI;AAAK,UAAA,SAAS,EAAC,eAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,WACI;AAAK,UAAA,GAAG,EAAC,OAAT;AAAiB,UAAA,KAAK,EAAE8C,eAAxB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,UADJ,CADJ;AAKH;;AAjC8B;;AAoCnC,WAAO,oBAAC,UAAD;AAAY,MAAA,KAAK,EAAEV,KAAnB;AAA0B,MAAA,OAAO,EAAElB,OAAnC;AAA4C,MAAA,eAAe,EAAE,KAAK3B,KAAL,CAAWsD,eAAxE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAAP;AAEH;;AAlIkC;;AAgJvC,MAAMC,eAAe,GAAG;AACpBC,EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,eAAe5D,cAAf","sourcesContent":["import React, { Component, useContext } from \"react\";\n// import vis from \"vis-network\";\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n\n shouldComponentUpdate(nextProps, nextState){ \n \n if (this.props.shouldUpdateGraph === true){\n return true\n }else if (nextProps.data && this.props.data && (nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp)){\n console.log(\"Rerendering\")\n return true;\n }else if (nextProps.loadingGraph !== this.props.loadingGraph){\n return true; \n }else{\n return false;\n }\n }\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n\n\n render() {\n if (this.props.loadingGraph) return ;\n if (this.props.data == null){\n return (\n
\n

Press Show Graph to see the graph representation of the experiment.

\n

If the experiment is running, press Start Job Monitor to start a live tracker of the changes on the experiment's jobs.\n This process will automatically update the graph's nodes colors and show a log of the detected changes.\n

\n
\n );\n }\n\n var nodes_array = [];\n var edges_array = [];\n \n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: { background: node.status_color, border: \"black\" },\n //level: node.priority,\n })\n );\n \n this.props.data.edges.map(edge => \n edges_array.push({ from: edge.from, to: edge.to })\n );\n }\n \n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n\n const options = {\n edges: {\n arrows: {\n to: { enabled: true }\n }\n },\n layout: {\n improvedLayout: true,\n hierarchical: {\n \n nodeSpacing: 250,\n edgeMinimization: false,\n blockShifting: false,\n parentCentralization: false,\n direction: 'UD',\n sortMethod: 'directed',\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true,\n },\n physics: {\n enabled: false,\n },\n nodes: {\n shape: 'dot',\n }\n };\n \n const graph = {\n nodes : nodes,\n edges : edges,\n };\n\n class VisNetwork extends Component {\n \n // shouldComponentUpdate(nextProps, nextState){ \n // if (nextProps.loadingGraph !== this.props.loadingGraph){\n // return true; \n // }else{\n // return false;\n // }\n // }\n \n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", (params) => {\n //console.log(params);\n if (params.nodes){\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n \n });\n }\n \n // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n \n render() { \n return (\n
\n
\n
\n );\n }\n }\n \n return ;\n\n }\n\n\n \n\n \n\n \n \n\n \n\n}\n\nconst experimentStyle = {\n height: 600\n };\n\nexport default GraphNativeRep;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/7e7650e231d408c341a71df672f69764.json b/node_modules/.cache/babel-loader/7e7650e231d408c341a71df672f69764.json new file mode 100644 index 0000000000000000000000000000000000000000..4f0e2a96acaf28181d033e1836a78d126a6886c4 --- /dev/null +++ b/node_modules/.cache/babel-loader/7e7650e231d408c341a71df672f69764.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js\";\nimport React, { Component } from \"react\"; // import vis from \"vis-network\";\n\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis-network\";\n\nclass GraphNativeRep extends Component {\n constructor(...args) {\n super(...args);\n\n this.updateVisNodes = nodes => {\n this.props.setVisData(nodes);\n };\n }\n\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else if (nextProps.data && this.props.data && nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp) {\n console.log(\"Rerendering\");\n return true;\n } else if (nextProps.loadingGraph !== this.props.loadingGraph) {\n return true;\n } else {\n return false;\n }\n }\n\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n render() {\n if (this.props.loadingGraph) return React.createElement(Spinner, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 32\n },\n __self: this\n });\n\n if (this.props.data == null) {\n return React.createElement(\"div\", {\n className: \"card-body text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 35\n },\n __self: this\n }, React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Press \", React.createElement(\"span\", {\n className: \"badge badge-info\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Show Graph\"), \" to see the graph representation of the experiment.\"), React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"If the experiment is running, press \", React.createElement(\"span\", {\n className: \"badge badge-dark\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"Start Job Monitor\"), \" to start a live tracker of the changes on the experiment's jobs. This process will automatically update the graph's nodes colors and show a log of the detected changes.\"));\n }\n\n var nodes_array = [];\n var edges_array = [];\n\n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: {\n background: node.status_color,\n border: \"black\"\n },\n level: node.level\n }));\n this.props.data.edges.map(edge => edges_array.push({\n from: edge.from,\n to: edge.to\n }));\n }\n\n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n const options = {\n edges: {\n arrows: {\n to: {\n enabled: true\n }\n }\n },\n layout: {\n improvedLayout: false,\n hierarchical: {\n nodeSpacing: 190,\n blockShifting: true,\n edgeMinimization: true,\n parentCentralization: true,\n sortMethod: 'hubsize',\n direction: 'UD' // work on vis current version\n // nodeSpacing: 190,\n // blockShifting: false,\n // edgeMinimization: false,\n // parentCentralization: true,\n // sortMethod: 'hubsize',\n // direction: 'UD',\n\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true\n },\n physics: {\n enabled: false\n },\n nodes: {\n shape: 'dot',\n font: {\n size: 10\n }\n }\n };\n const graph = {\n nodes: nodes,\n edges: edges\n };\n\n class VisNetwork extends Component {\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else {\n return false;\n }\n }\n\n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", params => {\n //console.log(params);\n if (params.nodes) {\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n });\n } // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n\n\n render() {\n return React.createElement(\"div\", {\n className: \"card-body p-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 140\n },\n __self: this\n }, React.createElement(\"div\", {\n ref: \"myRef\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 141\n },\n __self: this\n }));\n }\n\n }\n\n this.updateVisNodes(nodes);\n return React.createElement(VisNetwork, {\n graph: graph,\n options: options,\n updateSelection: this.props.updateSelection,\n shouldUpdateGraph: this.props.shouldUpdateGraph,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 149\n },\n __self: this\n });\n }\n\n}\n\nconst experimentStyle = {\n height: 600\n};\nexport default GraphNativeRep;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js"],"names":["React","Component","Spinner","vis","GraphNativeRep","updateVisNodes","nodes","props","setVisData","shouldComponentUpdate","nextProps","nextState","shouldUpdateGraph","data","pkl_timestamp","console","log","loadingGraph","componentWillUnmount","cleanGraphData","render","nodes_array","edges_array","edges","map","node","push","id","label","color","background","status_color","border","level","edge","from","to","DataSet","options","arrows","enabled","layout","improvedLayout","hierarchical","nodeSpacing","blockShifting","edgeMinimization","parentCentralization","sortMethod","direction","interaction","dragNodes","hoverConnectedEdges","navigationButtons","physics","shape","font","size","graph","VisNetwork","componentDidMount","network","Network","refs","myRef","on","params","updateSelection","experimentStyle","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,SAAhB,QAAiC,OAAjC,C,CACA;;AACA,OAAOC,OAAP,MAAoB,mBAApB;AACA,OAAOC,GAAP,MAAgB,aAAhB;;AAEA,MAAMC,cAAN,SAA6BH,SAA7B,CAAuC;AAAA;AAAA;;AAAA,SAmBnCI,cAnBmC,GAmBjBC,KAAD,IAAW;AACxB,WAAKC,KAAL,CAAWC,UAAX,CAAsBF,KAAtB;AACH,KArBkC;AAAA;;AAEnCG,EAAAA,qBAAqB,CAACC,SAAD,EAAYC,SAAZ,EAAsB;AACvC,QAAI,KAAKJ,KAAL,CAAWK,iBAAX,KAAiC,IAArC,EAA0C;AACtC,aAAO,IAAP;AACD,KAFH,MAEQ,IAAIF,SAAS,CAACG,IAAV,IAAkB,KAAKN,KAAL,CAAWM,IAA7B,IAAsCH,SAAS,CAACG,IAAV,CAAeC,aAAf,KAAiC,KAAKP,KAAL,CAAWM,IAAX,CAAgBC,aAA3F,EAA0G;AAC9GC,MAAAA,OAAO,CAACC,GAAR,CAA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;;AAoCnC,SAAK/D,cAAL,CAAoBC,KAApB;AAEA,WAAO,oBAAC,UAAD;AACH,MAAA,KAAK,EAAEoD,KADJ;AAEH,MAAA,OAAO,EAAEpB,OAFN;AAGH,MAAA,eAAe,EAAE,KAAK/B,KAAL,CAAW4D,eAHzB;AAIH,MAAA,iBAAiB,EAAE,KAAK5D,KAAL,CAAWK,iBAJ3B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAAP;AAOH;;AAtJkC;;AAoKvC,MAAMwD,eAAe,GAAG;AACpBC,EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,eAAejE,cAAf","sourcesContent":["import React, { Component } from \"react\";\n// import vis from \"vis-network\";\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis-network\";\n\nclass GraphNativeRep extends Component {\n\n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true\n }else if (nextProps.data && this.props.data && (nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp)){\n console.log(\"Rerendering\")\n return true;\n }else if (nextProps.loadingGraph !== this.props.loadingGraph){\n return true; \n }else{\n return false;\n }\n }\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n updateVisNodes = (nodes) => {\n this.props.setVisData(nodes);\n }\n\n\n\n render () {\n if (this.props.loadingGraph) return ;\n if (this.props.data == null){\n return (\n
\n

Press Show Graph to see the graph representation of the experiment.

\n

If the experiment is running, press Start Job Monitor to start a live tracker of the changes on the experiment's jobs.\n This process will automatically update the graph's nodes colors and show a log of the detected changes.\n

\n
\n );\n }\n\n var nodes_array = [];\n var edges_array = [];\n \n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: { background: node.status_color, border: \"black\" },\n level: node.level,\n })\n );\n \n this.props.data.edges.map(edge => \n edges_array.push({ from: edge.from, to: edge.to })\n );\n }\n \n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n\n\n const options = {\n edges: {\n arrows: {\n to: { enabled: true }\n }\n },\n layout: {\n improvedLayout: false,\n hierarchical: {\n nodeSpacing: 190, \n blockShifting: true,\n edgeMinimization: true,\n parentCentralization: true,\n sortMethod: 'hubsize',\n direction: 'UD',\n // work on vis current version\n // nodeSpacing: 190,\n // blockShifting: false,\n // edgeMinimization: false,\n // parentCentralization: true,\n // sortMethod: 'hubsize',\n // direction: 'UD',\n }\n }, \n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true,\n },\n physics: {\n enabled: false,\n },\n nodes: {\n shape: 'dot',\n font: {\n size: 10,\n },\n }\n };\n \n const graph = {\n nodes : nodes,\n edges : edges,\n };\n\n class VisNetwork extends Component {\n \n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true;\n } else {\n return false;\n }\n }\n \n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", (params) => {\n //console.log(params);\n if (params.nodes){\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n \n });\n }\n \n // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n \n render() { \n return (\n
\n
\n
\n );\n }\n }\n\n this.updateVisNodes(nodes);\n \n return ;\n\n }\n\n\n \n\n \n\n \n \n\n \n\n}\n\nconst experimentStyle = {\n height: 600\n };\n\nexport default GraphNativeRep;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/84dcf09a822b832efe79c97b6129d4fc.json b/node_modules/.cache/babel-loader/84dcf09a822b832efe79c97b6129d4fc.json new file mode 100644 index 0000000000000000000000000000000000000000..dc9c8fbda9be65de9d56f7ad9639e97521b54afd --- /dev/null +++ b/node_modules/.cache/babel-loader/84dcf09a822b832efe79c97b6129d4fc.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js\";\nimport React, { Component } from \"react\"; // import vis from \"vis-network\";\n\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n constructor(...args) {\n super(...args);\n\n this.updateVisNodes = nodes => {\n this.props.setVisData(nodes);\n };\n }\n\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else if (nextProps.data && this.props.data && nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp) {\n console.log(\"Rerendering\");\n return true;\n } else if (nextProps.loadingGraph !== this.props.loadingGraph) {\n return true;\n } else {\n return false;\n }\n }\n\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n render() {\n if (this.props.loadingGraph) return React.createElement(Spinner, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 32\n },\n __self: this\n });\n\n if (this.props.data == null) {\n return React.createElement(\"div\", {\n className: \"card-body text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 35\n },\n __self: this\n }, React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Press \", React.createElement(\"span\", {\n className: \"badge badge-info\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Show Graph\"), \" to see the graph representation of the experiment.\"), React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"If the experiment is running, press \", React.createElement(\"span\", {\n className: \"badge badge-dark\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"Start Job Monitor\"), \" to start a live tracker of the changes on the experiment's jobs. This process will automatically update the graph's nodes colors and show a log of the detected changes.\"));\n }\n\n var nodes_array = [];\n var edges_array = [];\n\n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: {\n background: node.status_color,\n border: \"black\"\n },\n level: node.level\n }));\n this.props.data.edges.map(edge => edges_array.push({\n from: edge.from,\n to: edge.to\n }));\n }\n\n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n const options = {\n edges: {\n arrows: {\n to: {\n enabled: true\n }\n }\n },\n layout: {\n //improvedLayout: true,\n hierarchical: {\n // enabled: true,\n //levelSeparation: 150,\n nodeSpacing: 250,\n blockShifting: true,\n edgeMinimization: true,\n parentCentralization: true,\n direction: 'UD'\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true\n },\n physics: {\n enabled: false\n },\n nodes: {\n shape: 'dot'\n }\n };\n const graph = {\n nodes: nodes,\n edges: edges\n };\n\n class VisNetwork extends Component {\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else {\n return false;\n }\n }\n\n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", params => {\n //console.log(params);\n if (params.nodes) {\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n });\n } // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n\n\n render() {\n return React.createElement(\"div\", {\n className: \"card-body p-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 131\n },\n __self: this\n }, React.createElement(\"div\", {\n ref: \"myRef\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 132\n },\n __self: this\n }));\n }\n\n }\n\n this.updateVisNodes(nodes);\n return React.createElement(VisNetwork, {\n graph: graph,\n options: options,\n updateSelection: this.props.updateSelection,\n shouldUpdateGraph: this.props.shouldUpdateGraph,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 140\n },\n __self: this\n });\n }\n\n}\n\nconst experimentStyle = {\n height: 600\n};\nexport default GraphNativeRep;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js"],"names":["React","Component","Spinner","vis","GraphNativeRep","updateVisNodes","nodes","props","setVisData","shouldComponentUpdate","nextProps","nextState","shouldUpdateGraph","data","pkl_timestamp","console","log","loadingGraph","componentWillUnmount","cleanGraphData","render","nodes_array","edges_array","edges","map","node","push","id","label","color","background","status_color","border","level","edge","from","to","DataSet","options","arrows","enabled","layout","hierarchical","nodeSpacing","blockShifting","edgeMinimization","parentCentralization","direction","interaction","dragNodes","hoverConnectedEdges","navigationButtons","physics","shape","graph","VisNetwork","componentDidMount","network","Network","refs","myRef","on","params","updateSelection","experimentStyle","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,SAAhB,QAAiC,OAAjC,C,CACA;;AACA,OAAOC,OAAP,MAAoB,mBAApB;AACA,OAAOC,GAAP,MAAgB,KAAhB;;AAEA,MAAMC,cAAN,SAA6BH,SAA7B,CAAuC;AAAA;AAAA;;AAAA,SAmBnCI,cAnBmC,GAmBjBC,KAAD,IAAW;AACxB,WAAKC,KAAL,CAAWC,UAAX,CAAsBF,KAAtB;AACH,KArBkC;AAAA;;AAEnCG,EAAAA,qBAAqB,CAACC,SAAD,EAAYC,SAAZ,EAAsB;AACvC,QAAI,KAAKJ,KAAL,CAAWK,iBAAX,KAAiC,IAArC,EAA0C;AACtC,aAAO,IAAP;AACD,KAFH,MAEQ,IAAIF,SAAS,CAACG,IAAV,IAAkB,KAAKN,KAAL,CAAWM,IAA7B,IAAsCH,SAAS,CAACG,IAAV,CAAeC,aAAf,KAAiC,KAAKP,KAAL,CAAWM,IAAX,CAAgBC,aAA3F,EAA0G;AAC9GC,MAAAA,OAAO,CAACC,GAAR,CAAY,aAAZ;AACA,aAAO,IAAP;AACD,KAHK,MAGA,IAAIN,SAAS,CAACO,YAAV,KAA2B,KAAKV,KAAL,CAAWU,YAA1C,EAAuD;AAC3D,aAAO,IAAP;AACD,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AA7IkC;;AA2JvC,MAAMoD,eAAe,GAAG;AACpBC,EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,eAAe7D,cAAf","sourcesContent":["import React, { Component } from \"react\";\n// import vis from \"vis-network\";\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n\n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true\n }else if (nextProps.data && this.props.data && (nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp)){\n console.log(\"Rerendering\")\n return true;\n }else if (nextProps.loadingGraph !== this.props.loadingGraph){\n return true; \n }else{\n return false;\n }\n }\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n updateVisNodes = (nodes) => {\n this.props.setVisData(nodes);\n }\n\n\n\n render () {\n if (this.props.loadingGraph) return ;\n if (this.props.data == null){\n return (\n
\n

Press Show Graph to see the graph representation of the experiment.

\n

If the experiment is running, press Start Job Monitor to start a live tracker of the changes on the experiment's jobs.\n This process will automatically update the graph's nodes colors and show a log of the detected changes.\n

\n
\n );\n }\n\n var nodes_array = [];\n var edges_array = [];\n \n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: { background: node.status_color, border: \"black\" },\n level: node.level,\n })\n );\n \n this.props.data.edges.map(edge => \n edges_array.push({ from: edge.from, to: edge.to })\n );\n }\n \n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n\n\n const options = {\n edges: {\n arrows: {\n to: { enabled: true }\n }\n },\n layout: {\n //improvedLayout: true,\n hierarchical: {\n // enabled: true,\n //levelSeparation: 150,\n nodeSpacing: 250,\n blockShifting: true,\n edgeMinimization: true,\n parentCentralization: true,\n direction: 'UD',\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true,\n },\n physics: {\n enabled: false,\n },\n nodes: {\n shape: 'dot',\n }\n };\n \n const graph = {\n nodes : nodes,\n edges : edges,\n };\n\n class VisNetwork extends Component {\n \n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true;\n } else {\n return false;\n }\n }\n \n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", (params) => {\n //console.log(params);\n if (params.nodes){\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n \n });\n }\n \n // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n \n render() { \n return (\n
\n
\n
\n );\n }\n }\n\n this.updateVisNodes(nodes);\n \n return ;\n\n }\n\n\n \n\n \n\n \n \n\n \n\n}\n\nconst experimentStyle = {\n height: 600\n };\n\nexport default GraphNativeRep;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/85e10eb8f0dddb19dcd8c51cc17f9bce.json b/node_modules/.cache/babel-loader/85e10eb8f0dddb19dcd8c51cc17f9bce.json new file mode 100644 index 0000000000000000000000000000000000000000..41f58aee88f439ce10592c0be74a23e148480087 --- /dev/null +++ b/node_modules/.cache/babel-loader/85e10eb8f0dddb19dcd8c51cc17f9bce.json @@ -0,0 +1 @@ +{"ast":null,"code":"import _slicedToArray from \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/node_modules/@babel/runtime/helpers/esm/slicedToArray\";\nvar _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/context/experiment/ExperimentState.js\";\nimport React, { useReducer } from 'react';\nimport axios from 'axios';\nimport ExperimentContext from './experimentContext';\nimport ExperimentReducer from './experimentReducer';\nimport { SEARCH_EXPERIMENTS, SET_LOADING, CLEAR_EXPERIMENTS, GET_EXPERIMENT, GET_GRAPH, SET_LOADING_GRAPH, CLEAN_GRAPH_DATA, UPDATE_SELECTION, GET_EXPERIMENT_RUN, SET_LOADING_RUN, CLEAN_RUN_DATA, SET_AUTOUPDATE_RUN, GET_PKL_DATA, SET_LOADING_PKL, UPDATE_NODES, SHOULD_UPDATE_GRAPH, SET_AUTOUPDATE_PKL, CLEAN_PKL_DATA, SET_PKL_CHANGES, UPDATE_EXPERIMENT_TS, SET_VIS_DATA } from '../types';\n\nconst ExperimentState = props => {\n const initialState = {\n experiments: [],\n experiment: {},\n loading: false,\n data: null,\n rundata: null,\n pkldata: null,\n pklchanges: null,\n loadingGraph: false,\n loadingRun: false,\n loadingPkl: false,\n selection: null,\n enabledGraphSearch: true,\n startAutoUpdateRun: false,\n startAutoUpdatePkl: false,\n shouldUpdateGraph: false,\n visNodes: null\n };\n\n const _useReducer = useReducer(ExperimentReducer, initialState),\n _useReducer2 = _slicedToArray(_useReducer, 2),\n state = _useReducer2[0],\n dispatch = _useReducer2[1]; // Search Experiments\n\n\n const searchExperiments = async text => {\n setLoading();\n const res = await axios.get(\"http://84.88.185.30:8888/search/\".concat(text));\n dispatch({\n type: SEARCH_EXPERIMENTS,\n payload: res.data.experiment\n });\n }; // Get Experiment\n\n\n const getExperiment = async expid => {\n setLoading(); //cleanGraphData();\n\n const res = await axios.get(\"http://84.88.185.30:8888/expinfo/\".concat(expid));\n dispatch({\n type: GET_EXPERIMENT,\n payload: res.data\n });\n }; // Get Experiment Graph\n\n\n const getExperimentGraph = async expid => {\n setLoadingGraph();\n const res = await axios.get(\"http://84.88.185.30:8888/graph/\".concat(expid));\n console.log(res.data);\n dispatch({\n type: GET_GRAPH,\n payload: res.data\n }); //this.setState({ data: res.data, loading: false, showGraph: !res.data.error });\n }; // Get Experiment Run\n\n\n const getExperimentRun = async expid => {\n setLoadingRun();\n const res = await axios.get(\"http://84.88.185.30:8888/exprun/\".concat(expid));\n console.log(res.data);\n dispatch({\n type: GET_EXPERIMENT_RUN,\n payload: res.data\n });\n }; // Get Experiment Pkl Data\n\n\n const getExperimentPkl = async (expid, timeStamp) => {\n setLoadingPkl(); //timeStamp = 1000;\n\n const res = await axios.get(\"http://84.88.185.30:8888/pklinfo/\".concat(expid, \"/\").concat(timeStamp));\n console.log(res.data); // const actualPkl = res.data;\n\n let retrievedPkl = null;\n var jobs = {};\n var colorChanges = {};\n var changes = \"\";\n retrievedPkl = res.data;\n\n if (state.data !== null && retrievedPkl.has_changed === true && retrievedPkl.pkl_content.length > 0) {\n //console.log(retrievedPkl.pkl_content.length);\n for (var j = 0, job; j < retrievedPkl.pkl_content.length; j++) {\n job = retrievedPkl.pkl_content[j]; //console.log(job);\n\n jobs[job.name] = job; //console.log(jobs[job.name]);\n }\n\n let requireUpdate = false;\n console.log('Current ts: ' + state.experiment.pkl_timestamp);\n var newData = state.data; //console.log(newData.nodes);\n\n var expData = state.experiment;\n\n if (newData.nodes) {\n for (var i = 0; i < newData.nodes.length; i++) {\n // console.log(newNodes[i].id);\n //console.log(newData.nodes[i]);\n // console.log(jobs[ newNodes[i].id ]);\n if (newData.nodes[i].status_code !== jobs[newData.nodes[i].id].status_code) {\n // changes += newData.nodes[i].id + \" from \" + newData.nodes[i].status + \" to \" + jobs[ newData.nodes[i].id ].status + \" || \";\n changes += timeStampToDate(retrievedPkl.pkl_timestamp) + \": \" + newData.nodes[i].id + \" to \" + jobs[newData.nodes[i].id].status + \"\\n\";\n newData.nodes[i].status_code = jobs[newData.nodes[i].id].status_code;\n newData.nodes[i].status_color = jobs[newData.nodes[i].id].status_color;\n newData.nodes[i].status = jobs[newData.nodes[i].id].status; //console.log(newData.nodes[i].status_color)\n\n colorChanges[newData.nodes[i].id] = jobs[newData.nodes[i].id].status_color;\n requireUpdate = true;\n }\n }\n\n if (requireUpdate) {\n // console.log(newData.pkl_timestamp);\n // console.log(expData.pkl_timestamp);\n console.log(\"New ts: \" + retrievedPkl.pkl_timestamp);\n newData.pkl_timestamp = retrievedPkl.pkl_timestamp;\n expData.pkl_timestamp = retrievedPkl.pkl_timestamp; // console.log(newData.pkl_timestamp);\n // console.log(expData.pkl_timestamp);\n // console.log('Call Update');\n\n updateNodes(newData);\n updateExperimentTimeStamp(expData); // setUpdateGraph(true);\n // setUpdateGraph(false);\n\n if (state.pklchanges) {\n setPklChanges(changes + state.pklchanges);\n } else {\n setPklChanges(changes);\n }\n\n for (var key in colorChanges) {\n //console.log( key, colorChanges[key] );\n updateGraphColor(key, colorChanges[key]);\n }\n } else {\n console.log('No changes but updating pkl anyway.');\n expData.pkl_timestamp = retrievedPkl.pkl_timestamp;\n updateExperimentTimeStamp(expData);\n }\n }\n } // } else {\n // var t = new Date( retrievedPkl.pkl_timestamp );\n // var formatted = t.toISOString();\n // setPklChanges(\"No news yet... \" + formatted)\n // }\n\n\n dispatch({\n type: GET_PKL_DATA,\n payload: res.data\n });\n };\n\n const updateGraphColor = (idChange, newColor) => {\n state.visNodes.update({\n id: idChange,\n color: {\n background: newColor\n }\n });\n }; // Cleaning\n\n\n const clearExperiments = () => dispatch({\n type: CLEAR_EXPERIMENTS\n });\n\n const cleanGraphData = () => dispatch({\n type: CLEAN_GRAPH_DATA\n });\n\n const cleanRunData = () => dispatch({\n type: CLEAN_RUN_DATA\n });\n\n const cleanPklData = () => dispatch({\n type: CLEAN_PKL_DATA\n }); // Set Loading\n\n\n const setLoading = () => dispatch({\n type: SET_LOADING\n });\n\n const setLoadingGraph = () => dispatch({\n type: SET_LOADING_GRAPH\n });\n\n const setLoadingRun = () => dispatch({\n type: SET_LOADING_RUN\n });\n\n const setLoadingPkl = () => dispatch({\n type: SET_LOADING_PKL\n }); // Action Things\n\n\n const updateSelection = currentSelection => dispatch({\n type: UPDATE_SELECTION,\n payload: currentSelection\n });\n\n const updateNodes = newdata => dispatch({\n type: UPDATE_NODES,\n payload: newdata\n });\n\n const updateExperimentTimeStamp = newExperiment => dispatch({\n type: UPDATE_EXPERIMENT_TS,\n payload: newExperiment\n });\n\n const setAutoUpdateRun = value => dispatch({\n type: SET_AUTOUPDATE_RUN,\n payload: value\n });\n\n const setAutoUpdatePkl = value => dispatch({\n type: SET_AUTOUPDATE_PKL,\n payload: value\n });\n\n const setUpdateGraph = value => dispatch({\n type: SHOULD_UPDATE_GRAPH,\n payload: value\n });\n\n const setPklChanges = value => dispatch({\n type: SET_PKL_CHANGES,\n payload: value\n });\n\n const setVisData = value => dispatch({\n type: SET_VIS_DATA,\n payload: value\n }); // Other Utils\n\n\n const hashCode = value => {\n var hash = 0,\n i,\n chr;\n if (value.length === 0) return hash;\n\n for (i = 0; i < value.length; i++) {\n chr = value.charCodeAt(i);\n hash = (hash << 5) - hash + chr;\n hash |= 0; // Convert to 32bit integer\n }\n\n console.log(hash);\n return hash;\n };\n\n const timeStampToDate = value => {\n //console.log('Setting new format: ' + value);\n let formattedDate = \"\";\n var date = new Date(value * 1000);\n var hours = date.getHours();\n var minutes = \"0\" + date.getMinutes();\n var seconds = \"0\" + date.getSeconds();\n formattedDate = hours + ':' + minutes.substr(-2) + ':' + seconds.substr(-2); // formattedDate = date.toISOString();\n\n return formattedDate;\n };\n\n return React.createElement(ExperimentContext.Provider, {\n value: {\n experiments: state.experiments,\n experiment: state.experiment,\n loading: state.loading,\n loadingGraph: state.loadingGraph,\n loadingRun: state.loadingRun,\n loadingPkl: state.loadingPkl,\n data: state.data,\n rundata: state.rundata,\n pklchanges: state.pklchanges,\n selection: state.selection,\n enabledGraphSearch: state.enabledGraphSearch,\n startAutoUpdateRun: state.startAutoUpdateRun,\n startAutoUpdatePkl: state.startAutoUpdatePkl,\n shouldUpdateGraph: state.shouldUpdateGraph,\n visNodes: state.visNodes,\n setAutoUpdateRun,\n setAutoUpdatePkl,\n searchExperiments,\n clearExperiments,\n getExperiment,\n getExperimentGraph,\n cleanGraphData,\n cleanRunData,\n cleanPklData,\n setPklChanges,\n updateSelection,\n getExperimentRun,\n getExperimentPkl,\n hashCode,\n timeStampToDate,\n setVisData,\n updateGraphColor\n },\n __source: {\n fileName: _jsxFileName,\n lineNumber: 241\n },\n __self: this\n }, props.children);\n};\n\nexport default ExperimentState;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/context/experiment/ExperimentState.js"],"names":["React","useReducer","axios","ExperimentContext","ExperimentReducer","SEARCH_EXPERIMENTS","SET_LOADING","CLEAR_EXPERIMENTS","GET_EXPERIMENT","GET_GRAPH","SET_LOADING_GRAPH","CLEAN_GRAPH_DATA","UPDATE_SELECTION","GET_EXPERIMENT_RUN","SET_LOADING_RUN","CLEAN_RUN_DATA","SET_AUTOUPDATE_RUN","GET_PKL_DATA","SET_LOADING_PKL","UPDATE_NODES","SHOULD_UPDATE_GRAPH","SET_AUTOUPDATE_PKL","CLEAN_PKL_DATA","SET_PKL_CHANGES","UPDATE_EXPERIMENT_TS","SET_VIS_DATA","ExperimentState","props","initialState","experiments","experiment","loading","data","rundata","pkldata","pklchanges","loadingGraph","loadingRun","loadingPkl","selection","enabledGraphSearch","startAutoUpdateRun","startAutoUpdatePkl","shouldUpdateGraph","visNodes","state","dispatch","searchExperiments","text","setLoading","res","get","type","payload","getExperiment","expid","getExperimentGraph","setLoadingGraph","console","log","getExperimentRun","setLoadingRun","getExperimentPkl","timeStamp","setLoadingPkl","retrievedPkl","jobs","colorChanges","changes","has_changed","pkl_content","length","j","job","name","requireUpdate","pkl_timestamp","newData","expData","nodes","i","status_code","id","timeStampToDate","status","status_color","updateNodes","updateExperimentTimeStamp","setPklChanges","key","updateGraphColor","idChange","newColor","update","color","background","clearExperiments","cleanGraphData","cleanRunData","cleanPklData","updateSelection","currentSelection","newdata","newExperiment","setAutoUpdateRun","value","setAutoUpdatePkl","setUpdateGraph","setVisData","hashCode","hash","chr","charCodeAt","formattedDate","date","Date","hours","getHours","minutes","getMinutes","seconds","getSeconds","substr","children"],"mappings":";;AAAA,OAAOA,KAAP,IAAgBC,UAAhB,QAAkC,OAAlC;AACA,OAAOC,KAAP,MAAkB,OAAlB;AACA,OAAOC,iBAAP,MAA8B,qBAA9B;AACA,OAAOC,iBAAP,MAA8B,qBAA9B;AACA,SACEC,kBADF,EAEEC,WAFF,EAGEC,iBAHF,EAI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AkBJ3D,MAAAA,iBAlBI;AAmBJiD,MAAAA,gBAnBI;AAoBJ1C,MAAAA,aApBI;AAqBJE,MAAAA,kBArBI;AAsBJyC,MAAAA,cAtBI;AAuBJC,MAAAA,YAvBI;AAwBJC,MAAAA,YAxBI;AAyBJX,MAAAA,aAzBI;AA0BJY,MAAAA,eA1BI;AA2BJxC,MAAAA,gBA3BI;AA4BJE,MAAAA,gBA5BI;AA6BJ+C,MAAAA,QA7BI;AA8BJ1B,MAAAA,eA9BI;AA+BJyB,MAAAA,UA/BI;AAgCJlB,MAAAA;AAhCI,KADR;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KAmCK/D,KAAK,CAACgG,QAnCX,CADJ;AAuCH,CA1PD;;AA4PA,eAAejG,eAAf","sourcesContent":["import React, { useReducer } from 'react';\nimport axios from 'axios';\nimport ExperimentContext from './experimentContext';\nimport ExperimentReducer from './experimentReducer';\nimport {\n SEARCH_EXPERIMENTS,\n SET_LOADING,\n CLEAR_EXPERIMENTS,\n GET_EXPERIMENT,\n GET_GRAPH,\n SET_LOADING_GRAPH,\n CLEAN_GRAPH_DATA,\n UPDATE_SELECTION,\n GET_EXPERIMENT_RUN,\n SET_LOADING_RUN,\n CLEAN_RUN_DATA,\n SET_AUTOUPDATE_RUN,\n GET_PKL_DATA,\n SET_LOADING_PKL,\n UPDATE_NODES,\n SHOULD_UPDATE_GRAPH,\n SET_AUTOUPDATE_PKL,\n CLEAN_PKL_DATA,\n SET_PKL_CHANGES,\n UPDATE_EXPERIMENT_TS,\n SET_VIS_DATA,\n} from '../types';\n\nconst ExperimentState = props => {\n const initialState = {\n experiments: [],\n experiment: {},\n loading: false,\n data: null,\n rundata: null,\n pkldata: null,\n pklchanges: null,\n loadingGraph: false,\n loadingRun: false,\n loadingPkl: false,\n selection: null,\n enabledGraphSearch: true, \n startAutoUpdateRun: false, \n startAutoUpdatePkl: false,\n shouldUpdateGraph: false, \n visNodes: null, \n }\n\n const [state, dispatch] = useReducer(ExperimentReducer, initialState);\n\n // Search Experiments\n const searchExperiments = async text => {\n setLoading();\n const res = await axios.get(`http://84.88.185.30:8888/search/${text}`);\n dispatch({\n type: SEARCH_EXPERIMENTS,\n payload: res.data.experiment,\n });\n };\n\n // Get Experiment\n const getExperiment = async expid => {\n setLoading();\n //cleanGraphData();\n const res = await axios.get(`http://84.88.185.30:8888/expinfo/${expid}`); \n dispatch({\n type: GET_EXPERIMENT,\n payload: res.data,\n });\n };\n \n // Get Experiment Graph\n const getExperimentGraph = async expid => {\n setLoadingGraph();\n \n const res = await axios.get(`http://84.88.185.30:8888/graph/${expid}`);\n console.log(res.data);\n dispatch({\n type: GET_GRAPH,\n payload: res.data,\n });\n //this.setState({ data: res.data, loading: false, showGraph: !res.data.error });\n };\n\n // Get Experiment Run\n const getExperimentRun = async expid => {\n setLoadingRun();\n const res = await axios.get(`http://84.88.185.30:8888/exprun/${expid}`);\n console.log(res.data);\n dispatch({\n type: GET_EXPERIMENT_RUN,\n payload: res.data,\n });\n }\n\n // Get Experiment Pkl Data\n const getExperimentPkl = async (expid, timeStamp) => {\n setLoadingPkl();\n //timeStamp = 1000;\n const res = await axios.get(`http://84.88.185.30:8888/pklinfo/${expid}/${timeStamp}`);\n console.log(res.data);\n // const actualPkl = res.data;\n \n let retrievedPkl = null;\n var jobs = {};\n var colorChanges = {};\n var changes = \"\"\n retrievedPkl = res.data;\n if (state.data !== null && retrievedPkl.has_changed === true && retrievedPkl.pkl_content.length > 0){\n //console.log(retrievedPkl.pkl_content.length);\n for(var j = 0, job; j < retrievedPkl.pkl_content.length; j++){\n job = retrievedPkl.pkl_content[j];\n //console.log(job);\n jobs[ job.name ] = job;\n //console.log(jobs[job.name]);\n }\n let requireUpdate = false;\n console.log('Current ts: '+ state.experiment.pkl_timestamp); \n var newData = state.data;\n //console.log(newData.nodes);\n var expData = state.experiment;\n if (newData.nodes){\n for(var i = 0; i < newData.nodes.length; i++){\n // console.log(newNodes[i].id);\n //console.log(newData.nodes[i]);\n // console.log(jobs[ newNodes[i].id ]);\n\n if (newData.nodes[i].status_code !== jobs[ newData.nodes[i].id ].status_code){\n // changes += newData.nodes[i].id + \" from \" + newData.nodes[i].status + \" to \" + jobs[ newData.nodes[i].id ].status + \" || \";\n changes += timeStampToDate(retrievedPkl.pkl_timestamp) + \": \"+ newData.nodes[i].id + \" to \" + jobs[ newData.nodes[i].id ].status + \"\\n\";\n newData.nodes[i].status_code = jobs[ newData.nodes[i].id ].status_code;\n newData.nodes[i].status_color = jobs[ newData.nodes[i].id ].status_color;\n newData.nodes[i].status = jobs[ newData.nodes[i].id ].status;\n //console.log(newData.nodes[i].status_color)\n colorChanges[ newData.nodes[i].id ] = jobs[ newData.nodes[i].id ].status_color;\n requireUpdate = true;\n }\n }\n\n\n if (requireUpdate){ \n // console.log(newData.pkl_timestamp);\n // console.log(expData.pkl_timestamp);\n console.log(\"New ts: \" + retrievedPkl.pkl_timestamp)\n newData.pkl_timestamp = retrievedPkl.pkl_timestamp;\n expData.pkl_timestamp = retrievedPkl.pkl_timestamp;\n // console.log(newData.pkl_timestamp);\n // console.log(expData.pkl_timestamp);\n \n // console.log('Call Update');\n updateNodes(newData);\n updateExperimentTimeStamp(expData);\n // setUpdateGraph(true);\n // setUpdateGraph(false);\n if (state.pklchanges){\n setPklChanges(changes + state.pklchanges);\n } else {\n setPklChanges(changes);\n }\n\n for(var key in colorChanges) {\n //console.log( key, colorChanges[key] );\n updateGraphColor(key, colorChanges[key]);\n }\n \n \n } else { \n console.log('No changes but updating pkl anyway.')\n expData.pkl_timestamp = retrievedPkl.pkl_timestamp;\n updateExperimentTimeStamp(expData);\n }\n }\n }\n // } else {\n // var t = new Date( retrievedPkl.pkl_timestamp );\n // var formatted = t.toISOString();\n // setPklChanges(\"No news yet... \" + formatted)\n // }\n\n\n dispatch({\n type: GET_PKL_DATA,\n payload: res.data,\n });\n }\n\n const updateGraphColor = (idChange, newColor) => {\n state.visNodes.update({id:idChange, color: { background: newColor }});\n }\n\n\n // Cleaning\n const clearExperiments = () => dispatch({ type: CLEAR_EXPERIMENTS });\n const cleanGraphData = () => dispatch({ type: CLEAN_GRAPH_DATA });\n const cleanRunData = () => dispatch({ type: CLEAN_RUN_DATA });\n const cleanPklData = () => dispatch({ type: CLEAN_PKL_DATA });\n\n // Set Loading\n const setLoading = () => dispatch({ type: SET_LOADING });\n const setLoadingGraph = () => dispatch({ type: SET_LOADING_GRAPH });\n const setLoadingRun = () => dispatch({ type: SET_LOADING_RUN });\n const setLoadingPkl = () => dispatch({ type: SET_LOADING_PKL });\n\n\n // Action Things\n const updateSelection = (currentSelection) => dispatch({ type: UPDATE_SELECTION, payload: currentSelection });\n const updateNodes = (newdata) => dispatch({ type: UPDATE_NODES, payload: newdata });\n const updateExperimentTimeStamp = (newExperiment) => dispatch({ type: UPDATE_EXPERIMENT_TS, payload: newExperiment});\n const setAutoUpdateRun = (value) => dispatch({ type: SET_AUTOUPDATE_RUN, payload: value });\n const setAutoUpdatePkl = (value) => dispatch({ type: SET_AUTOUPDATE_PKL, payload: value });\n const setUpdateGraph = (value) => dispatch({ type: SHOULD_UPDATE_GRAPH, payload: value });\n const setPklChanges = (value) => dispatch({ type: SET_PKL_CHANGES, payload: value });\n const setVisData = (value) => dispatch({ type: SET_VIS_DATA, payload: value});\n\n // Other Utils\n const hashCode = (value) => {\n var hash = 0, i, chr;\n if (value.length === 0) return hash;\n for (i = 0; i < value.length; i++) {\n chr = value.charCodeAt(i);\n hash = ((hash << 5) - hash) + chr;\n hash |= 0; // Convert to 32bit integer\n }\n console.log(hash);\n return hash;\n };\n \n const timeStampToDate = (value) => {\n //console.log('Setting new format: ' + value);\n let formattedDate = \"\";\n var date = new Date( value * 1000);\n var hours = date.getHours();\n var minutes = \"0\" + date.getMinutes();\n var seconds = \"0\" + date.getSeconds();\n formattedDate = hours + ':' + minutes.substr(-2) + ':' + seconds.substr(-2);\n // formattedDate = date.toISOString();\n return formattedDate;\n }\n\n return (\n \n {props.children}\n \n );\n};\n\nexport default ExperimentState;"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/86cc20ace53e8f2b5f7de2a6cee01b4c.json b/node_modules/.cache/babel-loader/86cc20ace53e8f2b5f7de2a6cee01b4c.json new file mode 100644 index 0000000000000000000000000000000000000000..2e79cfc56634603dbeaffbba19639e458f55528d --- /dev/null +++ b/node_modules/.cache/babel-loader/86cc20ace53e8f2b5f7de2a6cee01b4c.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js\";\nimport React, { Component } from \"react\"; // import vis from \"vis-network\";\n\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n constructor(...args) {\n super(...args);\n\n this.updateVisNodes = nodes => {\n this.props.setVisData(nodes);\n };\n }\n\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else if (nextProps.data && this.props.data && nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp) {\n console.log(\"Rerendering\");\n return true;\n } else if (nextProps.loadingGraph !== this.props.loadingGraph) {\n return true;\n } else {\n return false;\n }\n }\n\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n render() {\n if (this.props.loadingGraph) return React.createElement(Spinner, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 32\n },\n __self: this\n });\n\n if (this.props.data == null) {\n return React.createElement(\"div\", {\n className: \"card-body text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 35\n },\n __self: this\n }, React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Press \", React.createElement(\"span\", {\n className: \"badge badge-info\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Show Graph\"), \" to see the graph representation of the experiment.\"), React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"If the experiment is running, press \", React.createElement(\"span\", {\n className: \"badge badge-dark\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"Start Job Monitor\"), \" to start a live tracker of the changes on the experiment's jobs. This process will automatically update the graph's nodes colors and show a log of the detected changes.\"));\n }\n\n var nodes_array = [];\n var edges_array = [];\n\n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: {\n background: node.status_color,\n border: \"black\"\n },\n level: node.level\n }));\n this.props.data.edges.map(edge => edges_array.push({\n from: edge.from,\n to: edge.to\n }));\n }\n\n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n const options = {\n edges: {\n arrows: {\n to: {\n enabled: true\n }\n }\n },\n layout: {\n //improvedLayout: true,\n hierarchical: {\n // enabled: true,\n nodeSpacing: 250,\n treeSpacing: 200,\n blockShifting: true,\n edgeMinimization: true,\n parentCentralization: false,\n direction: 'UD',\n sortMethod: 'directed'\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true\n },\n physics: {\n enabled: false\n },\n nodes: {\n shape: 'dot'\n }\n };\n const graph = {\n nodes: nodes,\n edges: edges\n };\n\n class VisNetwork extends Component {\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else {\n return false;\n }\n }\n\n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", params => {\n //console.log(params);\n if (params.nodes) {\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n });\n } // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n\n\n render() {\n return React.createElement(\"div\", {\n className: \"card-body p-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 132\n },\n __self: this\n }, React.createElement(\"div\", {\n ref: \"myRef\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 133\n },\n __self: this\n }));\n }\n\n }\n\n this.updateVisNodes(nodes);\n return React.createElement(VisNetwork, {\n graph: graph,\n options: options,\n updateSelection: this.props.updateSelection,\n shouldUpdateGraph: this.props.shouldUpdateGraph,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 141\n },\n __self: this\n });\n }\n\n}\n\nconst experimentStyle = {\n height: 600\n};\nexport default GraphNativeRep;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js"],"names":["React","Component","Spinner","vis","GraphNativeRep","updateVisNodes","nodes","props","setVisData","shouldComponentUpdate","nextProps","nextState","shouldUpdateGraph","data","pkl_timestamp","console","log","loadingGraph","componentWillUnmount","cleanGraphData","render","nodes_array","edges_array","edges","map","node","push","id","label","color","background","status_color","border","level","edge","from","to","DataSet","options","arrows","enabled","layout","hierarchical","nodeSpacing","treeSpacing","blockShifting","edgeMinimization","parentCentralization","direction","sortMethod","interaction","dragNodes","hoverConnectedEdges","navigationButtons","physics","shape","graph","VisNetwork","componentDidMount","network","Network","refs","myRef","on","params","updateSelection","experimentStyle","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,SAAhB,QAAiC,OAAjC,C,CACA;;AACA,OAAOC,OAAP,MAAoB,mBAApB;AACA,OAAOC,GAAP,MAAgB,KAAhB;;AAEA,MAAMC,cAAN,SAA6BH,SAA7B,CAAuC;AAAA;AAAA;;AAAA,SAmBnCI,cAnBmC,GAmBjBC,KAAD,IAAW;AACxB,WAAKC,KAAL,CAAWC,UAAX,CAAsBF,KAAtB;AACH,KArBkC;AAAA;;AAEnCG,EAAAA,qBAAqB,CAACC,SAAD,EAAYC,SAAZ,EAAsB;AACvC,QAAI,KAAKJ,KAAL,CAAWK,iBAAX,KAAiC,IAArC,EAA0C;AACtC,aAAO,IAA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AAA,GAAG,EAAC,OAAT;AAAiB,UAAA,KAAK,EAAE8C,eAAxB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,UADJ,CADJ;AAKH;;AAjC8B;;AAoCnC,SAAK7D,cAAL,CAAoBC,KAApB;AAEA,WAAO,oBAAC,UAAD;AACH,MAAA,KAAK,EAAEkD,KADJ;AAEH,MAAA,OAAO,EAAElB,OAFN;AAGH,MAAA,eAAe,EAAE,KAAK/B,KAAL,CAAW0D,eAHzB;AAIH,MAAA,iBAAiB,EAAE,KAAK1D,KAAL,CAAWK,iBAJ3B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAAP;AAOH;;AA9IkC;;AA4JvC,MAAMsD,eAAe,GAAG;AACpBC,EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,eAAe/D,cAAf","sourcesContent":["import React, { Component } from \"react\";\n// import vis from \"vis-network\";\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n\n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true\n }else if (nextProps.data && this.props.data && (nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp)){\n console.log(\"Rerendering\")\n return true;\n }else if (nextProps.loadingGraph !== this.props.loadingGraph){\n return true; \n }else{\n return false;\n }\n }\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n updateVisNodes = (nodes) => {\n this.props.setVisData(nodes);\n }\n\n\n\n render () {\n if (this.props.loadingGraph) return ;\n if (this.props.data == null){\n return (\n
\n

Press Show Graph to see the graph representation of the experiment.

\n

If the experiment is running, press Start Job Monitor to start a live tracker of the changes on the experiment's jobs.\n This process will automatically update the graph's nodes colors and show a log of the detected changes.\n

\n
\n );\n }\n\n var nodes_array = [];\n var edges_array = [];\n \n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: { background: node.status_color, border: \"black\" },\n level: node.level,\n })\n );\n \n this.props.data.edges.map(edge => \n edges_array.push({ from: edge.from, to: edge.to })\n );\n }\n \n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n\n\n const options = {\n edges: {\n arrows: {\n to: { enabled: true }\n }\n },\n layout: {\n //improvedLayout: true,\n hierarchical: {\n // enabled: true,\n nodeSpacing: 250,\n treeSpacing: 200,\n blockShifting: true,\n edgeMinimization: true,\n parentCentralization: false,\n direction: 'UD',\n sortMethod: 'directed',\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true,\n },\n physics: {\n enabled: false,\n },\n nodes: {\n shape: 'dot',\n }\n };\n \n const graph = {\n nodes : nodes,\n edges : edges,\n };\n\n class VisNetwork extends Component {\n \n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true;\n } else {\n return false;\n }\n }\n \n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", (params) => {\n //console.log(params);\n if (params.nodes){\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n \n });\n }\n \n // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n \n render() { \n return (\n
\n
\n
\n );\n }\n }\n\n this.updateVisNodes(nodes);\n \n return ;\n\n }\n\n\n \n\n \n\n \n \n\n \n\n}\n\nconst experimentStyle = {\n height: 600\n };\n\nexport default GraphNativeRep;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/892d835cf50815b39991cc66f2436177.json b/node_modules/.cache/babel-loader/892d835cf50815b39991cc66f2436177.json new file mode 100644 index 0000000000000000000000000000000000000000..c0cb96b40020bab11817407c90f93e4b8ed05eb9 --- /dev/null +++ b/node_modules/.cache/babel-loader/892d835cf50815b39991cc66f2436177.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js\";\nimport React, { useContext } from \"react\"; // import vis from \"vis-network\";\n\nimport Spinner from \"../layout/Spinner\";\nimport ExperimentContext from '../context/experiment/experimentContext';\nimport vis from \"vis\";\n\nconst GraphNativeRep = () => {\n const experimentContext = useContext(ExperimentContext);\n const data = experimentContext.data,\n loadingGraph = experimentContext.loadingGraph;\n if (loadingGraph) return React.createElement(Spinner, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 11\n },\n __self: this\n });\n\n if (data === null) {\n return React.createElement(\"div\", {\n className: \"card-body text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 14\n },\n __self: this\n }, React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 15\n },\n __self: this\n }, \"Press \", React.createElement(\"span\", {\n className: \"badge badge-info\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 15\n },\n __self: this\n }, \"Show Graph\"), \" to see the graph representation of the experiment.\"), React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 16\n },\n __self: this\n }, \"If the experiment is running, press \", React.createElement(\"span\", {\n className: \"badge badge-dark\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 16\n },\n __self: this\n }, \"Start Job Monitor\"), \" to start a live tracker of the changes on the experiment's jobs. This process will automatically update the graph's nodes colors and show a log of the detected changes.\"));\n }\n\n var nodes_array = [];\n var edges_array = [];\n\n if (data.nodes !== null || data.edges !== null) {\n data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: {\n background: node.status_color,\n border: \"black\"\n } //level: node.priority,\n\n }));\n data.edges.map(edge => edges_array.push({\n from: edge.from,\n to: edge.to\n }));\n }\n\n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n const options = {\n edges: {\n arrows: {\n to: {\n enabled: true\n }\n }\n },\n layout: {\n improvedLayout: true,\n hierarchical: {\n nodeSpacing: 250,\n edgeMinimization: false,\n blockShifting: false,\n parentCentralization: false,\n direction: 'UD',\n sortMethod: 'directed'\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true\n },\n physics: {\n enabled: false\n },\n nodes: {\n shape: 'dot'\n }\n };\n const graph = {\n nodes: nodes,\n edges: edges\n };\n var VisNetwork = React.createClass({\n displayName: \"VisNetwork\",\n\n componentDidMount() {\n var network = new vis.Network(this.ref.myRef, graph, options);\n },\n\n render: function () {\n return React.createElement(\"div\", {\n className: \"card-body p-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 88\n },\n __self: this\n }, React.createElement(\"div\", {\n ref: \"myRef\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 89\n },\n __self: this\n }));\n }\n });\n return React.createElement(VisNetwork, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 95\n },\n __self: this\n });\n};\n\nconst experimentStyle = {\n height: 600\n};\nexport default GraphNativeRep;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js"],"names":["React","useContext","Spinner","ExperimentContext","vis","GraphNativeRep","experimentContext","data","loadingGraph","nodes_array","edges_array","nodes","edges","map","node","push","id","label","color","background","status_color","border","edge","from","to","DataSet","options","arrows","enabled","layout","improvedLayout","hierarchical","nodeSpacing","edgeMinimization","blockShifting","parentCentralization","direction","sortMethod","interaction","dragNodes","hoverConnectedEdges","navigationButtons","physics","shape","graph","VisNetwork","createClass","componentDidMount","network","Network","ref","myRef","render","experimentStyle","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,UAAhB,QAAkC,OAAlC,C,CACA;;AACA,OAAOC,OAAP,MAAoB,mBAApB;AACA,OAAOC,iBAAP,MAA8B,yCAA9B;AACA,OAAOC,GAAP,MAAgB,KAAhB;;AAEA,MAAMC,cAAc,GAAG,MAAM;AAEzB,QAAM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AO,GAAG,IAAI5C,GAAG,CAAC6C,OAAR,CAAgB,KAAKC,GAAL,CAASC,KAAzB,EAAgCP,KAAhC,EAAuClB,OAAvC,CAAd;AACH,KAH8B;;AAK/B0B,IAAAA,MAAM,EAAE,YAAW;AACf,aACI;AAAK,QAAA,SAAS,EAAC,eAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,SACI;AAAK,QAAA,GAAG,EAAC,OAAT;AAAiB,QAAA,KAAK,EAAEC,eAAxB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,QADJ,CADJ;AAKH;AAX8B,GAAlB,CAAjB;AAcA,SAAO,oBAAC,UAAD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAAP;AAEH,CA1FD;;AA4FA,MAAMA,eAAe,GAAG;AACpBC,EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,eAAejD,cAAf","sourcesContent":["import React, { useContext } from \"react\";\n// import vis from \"vis-network\";\nimport Spinner from \"../layout/Spinner\";\nimport ExperimentContext from '../context/experiment/experimentContext';\nimport vis from \"vis\";\n\nconst GraphNativeRep = () => {\n\n const experimentContext = useContext(ExperimentContext); \n const { data, loadingGraph } = experimentContext;\n if (loadingGraph) return \n if (data === null) {\n return (\n
\n

Press Show Graph to see the graph representation of the experiment.

\n

If the experiment is running, press Start Job Monitor to start a live tracker of the changes on the experiment's jobs.\n This process will automatically update the graph's nodes colors and show a log of the detected changes.\n

\n
\n );\n }\n\n var nodes_array = [];\n var edges_array = [];\n\n if (data.nodes !== null || data.edges !== null) {\n data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: { background: node.status_color, border: \"black\" },\n //level: node.priority,\n })\n );\n \n data.edges.map(edge => \n edges_array.push({ from: edge.from, to: edge.to })\n );\n }\n\n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n\n const options = {\n edges: {\n arrows: {\n to: { enabled: true }\n }\n },\n layout: {\n improvedLayout: true,\n hierarchical: {\n \n nodeSpacing: 250,\n edgeMinimization: false,\n blockShifting: false,\n parentCentralization: false,\n direction: 'UD',\n sortMethod: 'directed',\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true,\n },\n physics: {\n enabled: false,\n },\n nodes: {\n shape: 'dot',\n }\n };\n\n const graph = {\n nodes : nodes,\n edges : edges,\n };\n \n\n var VisNetwork = React.createClass({\n componentDidMount() {\n var network = new vis.Network(this.ref.myRef, graph, options);\n },\n\n render: function() { \n return (\n
\n
\n
\n );\n }\n });\n\n return ;\n\n}\n\nconst experimentStyle = {\n height: 600\n };\n\nexport default GraphNativeRep;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/89b8e41a2a939a193329b50d44e0c9c3.json b/node_modules/.cache/babel-loader/89b8e41a2a939a193329b50d44e0c9c3.json new file mode 100644 index 0000000000000000000000000000000000000000..0e2eaaae406377ba630ab1d7479b997353325e2c --- /dev/null +++ b/node_modules/.cache/babel-loader/89b8e41a2a939a193329b50d44e0c9c3.json @@ -0,0 +1 @@ +{"ast":null,"code":"import _slicedToArray from \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/node_modules/@babel/runtime/helpers/esm/slicedToArray\";\nvar _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/context/experiment/ExperimentState.js\";\nimport React, { useReducer } from 'react';\nimport axios from 'axios';\nimport ExperimentContext from './experimentContext';\nimport ExperimentReducer from './experimentReducer';\nimport { SEARCH_EXPERIMENTS, SET_LOADING, CLEAR_EXPERIMENTS, GET_EXPERIMENT, GET_GRAPH, SET_LOADING_GRAPH, CLEAN_GRAPH_DATA, UPDATE_SELECTION, GET_EXPERIMENT_RUN, SET_LOADING_RUN, CLEAN_RUN_DATA, SET_AUTOUPDATE_RUN, GET_PKL_DATA, SET_LOADING_PKL, UPDATE_NODES, SHOULD_UPDATE_GRAPH, SET_AUTOUPDATE_PKL, CLEAN_PKL_DATA, SET_PKL_CHANGES, UPDATE_EXPERIMENT_TS, SET_VIS_DATA } from '../types';\n\nconst ExperimentState = props => {\n const initialState = {\n experiments: [],\n experiment: {},\n loading: false,\n data: null,\n rundata: null,\n pkldata: null,\n pklchanges: null,\n loadingGraph: false,\n loadingRun: false,\n loadingPkl: false,\n selection: null,\n enabledGraphSearch: true,\n startAutoUpdateRun: false,\n startAutoUpdatePkl: false,\n shouldUpdateGraph: false,\n visNodes: null\n };\n\n const _useReducer = useReducer(ExperimentReducer, initialState),\n _useReducer2 = _slicedToArray(_useReducer, 2),\n state = _useReducer2[0],\n dispatch = _useReducer2[1]; // Search Experiments\n\n\n const searchExperiments = async text => {\n setLoading();\n const res = await axios.get(\"http://84.88.185.30:8888/search/\".concat(text));\n dispatch({\n type: SEARCH_EXPERIMENTS,\n payload: res.data.experiment\n });\n }; // Get Experiment\n\n\n const getExperiment = async expid => {\n setLoading(); //cleanGraphData();\n\n const res = await axios.get(\"http://84.88.185.30:8888/expinfo/\".concat(expid));\n dispatch({\n type: GET_EXPERIMENT,\n payload: res.data\n });\n }; // Get Experiment Graph\n\n\n const getExperimentGraph = async expid => {\n setLoadingGraph();\n const res = await axios.get(\"http://84.88.185.30:8888/graph/\".concat(expid));\n console.log(res.data);\n dispatch({\n type: GET_GRAPH,\n payload: res.data\n }); //this.setState({ data: res.data, loading: false, showGraph: !res.data.error });\n }; // Get Experiment Run\n\n\n const getExperimentRun = async expid => {\n setLoadingRun();\n const res = await axios.get(\"http://84.88.185.30:8888/exprun/\".concat(expid));\n console.log(res.data);\n dispatch({\n type: GET_EXPERIMENT_RUN,\n payload: res.data\n });\n }; // Get Experiment Pkl Data\n\n\n const getExperimentPkl = async (expid, timeStamp) => {\n setLoadingPkl(); //timeStamp = 1000;\n\n const res = await axios.get(\"http://84.88.185.30:8888/pklinfo/\".concat(expid, \"/\").concat(timeStamp));\n console.log(res.data); // const actualPkl = res.data;\n\n let retrievedPkl = null;\n var jobs = {};\n var colorChanges = {};\n var changes = \"\";\n retrievedPkl = res.data;\n\n if (state.data !== null && retrievedPkl.has_changed === true && retrievedPkl.pkl_content.length > 0) {\n //console.log(retrievedPkl.pkl_content.length);\n for (var j = 0, job; j < retrievedPkl.pkl_content.length; j++) {\n job = retrievedPkl.pkl_content[j]; //console.log(job);\n\n jobs[job.name] = job; //console.log(jobs[job.name]);\n }\n\n let requireUpdate = false;\n console.log('Current ts: ' + state.data.pkl_timestamp);\n var newData = state.data; //console.log(newData.nodes);\n\n var expData = state.experiment;\n\n if (newData.nodes) {\n for (var i = 0; i < newData.nodes.length; i++) {\n // console.log(newNodes[i].id);\n //console.log(newData.nodes[i]);\n // console.log(jobs[ newNodes[i].id ]);\n if (newData.nodes[i].status_code !== jobs[newData.nodes[i].id].status_code) {\n // changes += newData.nodes[i].id + \" from \" + newData.nodes[i].status + \" to \" + jobs[ newData.nodes[i].id ].status + \" || \";\n changes += timeStampToDate(retrievedPkl.pkl_timestamp) + \": \" + newData.nodes[i].id + \" to \" + jobs[newData.nodes[i].id].status + \"\\n\";\n newData.nodes[i].status_code = jobs[newData.nodes[i].id].status_code;\n newData.nodes[i].status_color = jobs[newData.nodes[i].id].status_color;\n newData.nodes[i].status = jobs[newData.nodes[i].id].status; //console.log(newData.nodes[i].status_color)\n\n colorChanges[newData.nodes[i].id] = jobs[newData.nodes[i].id].status_color;\n requireUpdate = true;\n }\n }\n\n if (requireUpdate) {\n // console.log(newData.pkl_timestamp);\n // console.log(expData.pkl_timestamp);\n console.log(\"New ts: \" + retrievedPkl.pkl_timestamp);\n newData.pkl_timestamp = retrievedPkl.pkl_timestamp;\n expData.pkl_timestamp = retrievedPkl.pkl_timestamp; // console.log(newData.pkl_timestamp);\n // console.log(expData.pkl_timestamp);\n // console.log('Call Update');\n\n updateNodes(newData);\n updateExperimentTimeStamp(expData); // setUpdateGraph(true);\n // setUpdateGraph(false);\n\n if (state.pklchanges) {\n setPklChanges(changes + state.pklchanges);\n } else {\n setPklChanges(changes);\n }\n\n for (var key in colorChanges) {\n //console.log( key, colorChanges[key] );\n updateGraphColor(key, colorChanges[key]);\n }\n } else {\n console.log('No changes but updating pkl anyway.');\n expData.pkl_timestamp = retrievedPkl.pkl_timestamp;\n updateExperimentTimeStamp(expData);\n }\n }\n } // } else {\n // var t = new Date( retrievedPkl.pkl_timestamp );\n // var formatted = t.toISOString();\n // setPklChanges(\"No news yet... \" + formatted)\n // }\n\n\n dispatch({\n type: GET_PKL_DATA,\n payload: res.data\n });\n };\n\n const updateGraphColor = (idChange, newColor) => {\n state.visNodes.update({\n id: idChange,\n color: {\n background: newColor\n }\n });\n }; // Cleaning\n\n\n const clearExperiments = () => dispatch({\n type: CLEAR_EXPERIMENTS\n });\n\n const cleanGraphData = () => dispatch({\n type: CLEAN_GRAPH_DATA\n });\n\n const cleanRunData = () => dispatch({\n type: CLEAN_RUN_DATA\n });\n\n const cleanPklData = () => dispatch({\n type: CLEAN_PKL_DATA\n }); // Set Loading\n\n\n const setLoading = () => dispatch({\n type: SET_LOADING\n });\n\n const setLoadingGraph = () => dispatch({\n type: SET_LOADING_GRAPH\n });\n\n const setLoadingRun = () => dispatch({\n type: SET_LOADING_RUN\n });\n\n const setLoadingPkl = () => dispatch({\n type: SET_LOADING_PKL\n }); // Action Things\n\n\n const updateSelection = currentSelection => dispatch({\n type: UPDATE_SELECTION,\n payload: currentSelection\n });\n\n const updateNodes = newdata => dispatch({\n type: UPDATE_NODES,\n payload: newdata\n });\n\n const updateExperimentTimeStamp = newExperiment => dispatch({\n type: UPDATE_EXPERIMENT_TS,\n payload: newExperiment\n });\n\n const setAutoUpdateRun = value => dispatch({\n type: SET_AUTOUPDATE_RUN,\n payload: value\n });\n\n const setAutoUpdatePkl = value => dispatch({\n type: SET_AUTOUPDATE_PKL,\n payload: value\n });\n\n const setUpdateGraph = value => dispatch({\n type: SHOULD_UPDATE_GRAPH,\n payload: value\n });\n\n const setPklChanges = value => dispatch({\n type: SET_PKL_CHANGES,\n payload: value\n });\n\n const setVisData = value => dispatch({\n type: SET_VIS_DATA,\n payload: value\n }); // Other Utils\n\n\n const hashCode = value => {\n var hash = 0,\n i,\n chr;\n if (value.length === 0) return hash;\n\n for (i = 0; i < value.length; i++) {\n chr = value.charCodeAt(i);\n hash = (hash << 5) - hash + chr;\n hash |= 0; // Convert to 32bit integer\n }\n\n console.log(hash);\n return hash;\n };\n\n const timeStampToDate = value => {\n //console.log('Setting new format: ' + value);\n let formattedDate = \"\";\n var date = new Date(value * 1000);\n var hours = date.getHours();\n var minutes = \"0\" + date.getMinutes();\n var seconds = \"0\" + date.getSeconds();\n formattedDate = hours + ':' + minutes.substr(-2) + ':' + seconds.substr(-2); // formattedDate = date.toISOString();\n\n return formattedDate;\n };\n\n return React.createElement(ExperimentContext.Provider, {\n value: {\n experiments: state.experiments,\n experiment: state.experiment,\n loading: state.loading,\n loadingGraph: state.loadingGraph,\n loadingRun: state.loadingRun,\n loadingPkl: state.loadingPkl,\n data: state.data,\n rundata: state.rundata,\n pklchanges: state.pklchanges,\n selection: state.selection,\n enabledGraphSearch: state.enabledGraphSearch,\n startAutoUpdateRun: state.startAutoUpdateRun,\n startAutoUpdatePkl: state.startAutoUpdatePkl,\n shouldUpdateGraph: state.shouldUpdateGraph,\n visNodes: state.visNodes,\n setAutoUpdateRun,\n setAutoUpdatePkl,\n searchExperiments,\n clearExperiments,\n getExperiment,\n getExperimentGraph,\n cleanGraphData,\n cleanRunData,\n cleanPklData,\n setPklChanges,\n updateSelection,\n getExperimentRun,\n getExperimentPkl,\n hashCode,\n timeStampToDate,\n setVisData,\n updateGraphColor\n },\n __source: {\n fileName: _jsxFileName,\n lineNumber: 241\n },\n __self: this\n }, props.children);\n};\n\nexport default ExperimentState;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/context/experiment/ExperimentState.js"],"names":["React","useReducer","axios","ExperimentContext","ExperimentReducer","SEARCH_EXPERIMENTS","SET_LOADING","CLEAR_EXPERIMENTS","GET_EXPERIMENT","GET_GRAPH","SET_LOADING_GRAPH","CLEAN_GRAPH_DATA","UPDATE_SELECTION","GET_EXPERIMENT_RUN","SET_LOADING_RUN","CLEAN_RUN_DATA","SET_AUTOUPDATE_RUN","GET_PKL_DATA","SET_LOADING_PKL","UPDATE_NODES","SHOULD_UPDATE_GRAPH","SET_AUTOUPDATE_PKL","CLEAN_PKL_DATA","SET_PKL_CHANGES","UPDATE_EXPERIMENT_TS","SET_VIS_DATA","ExperimentState","props","initialState","experiments","experiment","loading","data","rundata","pkldata","pklchanges","loadingGraph","loadingRun","loadingPkl","selection","enabledGraphSearch","startAutoUpdateRun","startAutoUpdatePkl","shouldUpdateGraph","visNodes","state","dispatch","searchExperiments","text","setLoading","res","get","type","payload","getExperiment","expid","getExperimentGraph","setLoadingGraph","console","log","getExperimentRun","setLoadingRun","getExperimentPkl","timeStamp","setLoadingPkl","retrievedPkl","jobs","colorChanges","changes","has_changed","pkl_content","length","j","job","name","requireUpdate","pkl_timestamp","newData","expData","nodes","i","status_code","id","timeStampToDate","status","status_color","updateNodes","updateExperimentTimeStamp","setPklChanges","key","updateGraphColor","idChange","newColor","update","color","background","clearExperiments","cleanGraphData","cleanRunData","cleanPklData","updateSelection","currentSelection","newdata","newExperiment","setAutoUpdateRun","value","setAutoUpdatePkl","setUpdateGraph","setVisData","hashCode","hash","chr","charCodeAt","formattedDate","date","Date","hours","getHours","minutes","getMinutes","seconds","getSeconds","substr","children"],"mappings":";;AAAA,OAAOA,KAAP,IAAgBC,UAAhB,QAAkC,OAAlC;AACA,OAAOC,KAAP,MAAkB,OAAlB;AACA,OAAOC,iBAAP,MAA8B,qBAA9B;AACA,OAAOC,iBAAP,MAA8B,qBAA9B;AACA,SACEC,kBADF,EAEEC,WAFF,EAGEC,iBAHF,EAIEC,cAJF,EAKEC,SALF,EAMEC,iBANF,EAOEC,gBAPF,EAQEC,gBARF,EASEC,kBATF,EAUEC,eAVF,EAWEC,cAXF,EAYEC,kBAZF,EAaEC,YAbF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,MAAAA,YAvBI;AAwBJC,MAAAA,YAxBI;AAyBJX,MAAAA,aAzBI;AA0BJY,MAAAA,eA1BI;AA2BJxC,MAAAA,gBA3BI;AA4BJE,MAAAA,gBA5BI;AA6BJ+C,MAAAA,QA7BI;AA8BJ1B,MAAAA,eA9BI;AA+BJyB,MAAAA,UA/BI;AAgCJlB,MAAAA;AAhCI,KADR;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KAmCK/D,KAAK,CAACgG,QAnCX,CADJ;AAuCH,CA1PD;;AA4PA,eAAejG,eAAf","sourcesContent":["import React, { useReducer } from 'react';\nimport axios from 'axios';\nimport ExperimentContext from './experimentContext';\nimport ExperimentReducer from './experimentReducer';\nimport {\n SEARCH_EXPERIMENTS,\n SET_LOADING,\n CLEAR_EXPERIMENTS,\n GET_EXPERIMENT,\n GET_GRAPH,\n SET_LOADING_GRAPH,\n CLEAN_GRAPH_DATA,\n UPDATE_SELECTION,\n GET_EXPERIMENT_RUN,\n SET_LOADING_RUN,\n CLEAN_RUN_DATA,\n SET_AUTOUPDATE_RUN,\n GET_PKL_DATA,\n SET_LOADING_PKL,\n UPDATE_NODES,\n SHOULD_UPDATE_GRAPH,\n SET_AUTOUPDATE_PKL,\n CLEAN_PKL_DATA,\n SET_PKL_CHANGES,\n UPDATE_EXPERIMENT_TS,\n SET_VIS_DATA,\n} from '../types';\n\nconst ExperimentState = props => {\n const initialState = {\n experiments: [],\n experiment: {},\n loading: false,\n data: null,\n rundata: null,\n pkldata: null,\n pklchanges: null,\n loadingGraph: false,\n loadingRun: false,\n loadingPkl: false,\n selection: null,\n enabledGraphSearch: true, \n startAutoUpdateRun: false, \n startAutoUpdatePkl: false,\n shouldUpdateGraph: false, \n visNodes: null, \n }\n\n const [state, dispatch] = useReducer(ExperimentReducer, initialState);\n\n // Search Experiments\n const searchExperiments = async text => {\n setLoading();\n const res = await axios.get(`http://84.88.185.30:8888/search/${text}`);\n dispatch({\n type: SEARCH_EXPERIMENTS,\n payload: res.data.experiment,\n });\n };\n\n // Get Experiment\n const getExperiment = async expid => {\n setLoading();\n //cleanGraphData();\n const res = await axios.get(`http://84.88.185.30:8888/expinfo/${expid}`); \n dispatch({\n type: GET_EXPERIMENT,\n payload: res.data,\n });\n };\n \n // Get Experiment Graph\n const getExperimentGraph = async expid => {\n setLoadingGraph();\n \n const res = await axios.get(`http://84.88.185.30:8888/graph/${expid}`);\n console.log(res.data);\n dispatch({\n type: GET_GRAPH,\n payload: res.data,\n });\n //this.setState({ data: res.data, loading: false, showGraph: !res.data.error });\n };\n\n // Get Experiment Run\n const getExperimentRun = async expid => {\n setLoadingRun();\n const res = await axios.get(`http://84.88.185.30:8888/exprun/${expid}`);\n console.log(res.data);\n dispatch({\n type: GET_EXPERIMENT_RUN,\n payload: res.data,\n });\n }\n\n // Get Experiment Pkl Data\n const getExperimentPkl = async (expid, timeStamp) => {\n setLoadingPkl();\n //timeStamp = 1000;\n const res = await axios.get(`http://84.88.185.30:8888/pklinfo/${expid}/${timeStamp}`);\n console.log(res.data);\n // const actualPkl = res.data;\n \n let retrievedPkl = null;\n var jobs = {};\n var colorChanges = {};\n var changes = \"\"\n retrievedPkl = res.data;\n if (state.data !== null && retrievedPkl.has_changed === true && retrievedPkl.pkl_content.length > 0){\n //console.log(retrievedPkl.pkl_content.length);\n for(var j = 0, job; j < retrievedPkl.pkl_content.length; j++){\n job = retrievedPkl.pkl_content[j];\n //console.log(job);\n jobs[ job.name ] = job;\n //console.log(jobs[job.name]);\n }\n let requireUpdate = false;\n console.log('Current ts: '+ state.data.pkl_timestamp); \n var newData = state.data;\n //console.log(newData.nodes);\n var expData = state.experiment;\n if (newData.nodes){\n for(var i = 0; i < newData.nodes.length; i++){\n // console.log(newNodes[i].id);\n //console.log(newData.nodes[i]);\n // console.log(jobs[ newNodes[i].id ]);\n\n if (newData.nodes[i].status_code !== jobs[ newData.nodes[i].id ].status_code){\n // changes += newData.nodes[i].id + \" from \" + newData.nodes[i].status + \" to \" + jobs[ newData.nodes[i].id ].status + \" || \";\n changes += timeStampToDate(retrievedPkl.pkl_timestamp) + \": \"+ newData.nodes[i].id + \" to \" + jobs[ newData.nodes[i].id ].status + \"\\n\";\n newData.nodes[i].status_code = jobs[ newData.nodes[i].id ].status_code;\n newData.nodes[i].status_color = jobs[ newData.nodes[i].id ].status_color;\n newData.nodes[i].status = jobs[ newData.nodes[i].id ].status;\n //console.log(newData.nodes[i].status_color)\n colorChanges[ newData.nodes[i].id ] = jobs[ newData.nodes[i].id ].status_color;\n requireUpdate = true;\n }\n }\n\n\n if (requireUpdate){ \n // console.log(newData.pkl_timestamp);\n // console.log(expData.pkl_timestamp);\n console.log(\"New ts: \" + retrievedPkl.pkl_timestamp)\n newData.pkl_timestamp = retrievedPkl.pkl_timestamp;\n expData.pkl_timestamp = retrievedPkl.pkl_timestamp;\n // console.log(newData.pkl_timestamp);\n // console.log(expData.pkl_timestamp);\n \n // console.log('Call Update');\n updateNodes(newData);\n updateExperimentTimeStamp(expData);\n // setUpdateGraph(true);\n // setUpdateGraph(false);\n if (state.pklchanges){\n setPklChanges(changes + state.pklchanges);\n } else {\n setPklChanges(changes);\n }\n\n for(var key in colorChanges) {\n //console.log( key, colorChanges[key] );\n updateGraphColor(key, colorChanges[key]);\n }\n \n \n } else { \n console.log('No changes but updating pkl anyway.')\n expData.pkl_timestamp = retrievedPkl.pkl_timestamp;\n updateExperimentTimeStamp(expData);\n }\n }\n }\n // } else {\n // var t = new Date( retrievedPkl.pkl_timestamp );\n // var formatted = t.toISOString();\n // setPklChanges(\"No news yet... \" + formatted)\n // }\n\n\n dispatch({\n type: GET_PKL_DATA,\n payload: res.data,\n });\n }\n\n const updateGraphColor = (idChange, newColor) => {\n state.visNodes.update({id:idChange, color: { background: newColor }});\n }\n\n\n // Cleaning\n const clearExperiments = () => dispatch({ type: CLEAR_EXPERIMENTS });\n const cleanGraphData = () => dispatch({ type: CLEAN_GRAPH_DATA });\n const cleanRunData = () => dispatch({ type: CLEAN_RUN_DATA });\n const cleanPklData = () => dispatch({ type: CLEAN_PKL_DATA });\n\n // Set Loading\n const setLoading = () => dispatch({ type: SET_LOADING });\n const setLoadingGraph = () => dispatch({ type: SET_LOADING_GRAPH });\n const setLoadingRun = () => dispatch({ type: SET_LOADING_RUN });\n const setLoadingPkl = () => dispatch({ type: SET_LOADING_PKL });\n\n\n // Action Things\n const updateSelection = (currentSelection) => dispatch({ type: UPDATE_SELECTION, payload: currentSelection });\n const updateNodes = (newdata) => dispatch({ type: UPDATE_NODES, payload: newdata });\n const updateExperimentTimeStamp = (newExperiment) => dispatch({ type: UPDATE_EXPERIMENT_TS, payload: newExperiment});\n const setAutoUpdateRun = (value) => dispatch({ type: SET_AUTOUPDATE_RUN, payload: value });\n const setAutoUpdatePkl = (value) => dispatch({ type: SET_AUTOUPDATE_PKL, payload: value });\n const setUpdateGraph = (value) => dispatch({ type: SHOULD_UPDATE_GRAPH, payload: value });\n const setPklChanges = (value) => dispatch({ type: SET_PKL_CHANGES, payload: value });\n const setVisData = (value) => dispatch({ type: SET_VIS_DATA, payload: value});\n\n // Other Utils\n const hashCode = (value) => {\n var hash = 0, i, chr;\n if (value.length === 0) return hash;\n for (i = 0; i < value.length; i++) {\n chr = value.charCodeAt(i);\n hash = ((hash << 5) - hash) + chr;\n hash |= 0; // Convert to 32bit integer\n }\n console.log(hash);\n return hash;\n };\n \n const timeStampToDate = (value) => {\n //console.log('Setting new format: ' + value);\n let formattedDate = \"\";\n var date = new Date( value * 1000);\n var hours = date.getHours();\n var minutes = \"0\" + date.getMinutes();\n var seconds = \"0\" + date.getSeconds();\n formattedDate = hours + ':' + minutes.substr(-2) + ':' + seconds.substr(-2);\n // formattedDate = date.toISOString();\n return formattedDate;\n }\n\n return (\n \n {props.children}\n \n );\n};\n\nexport default ExperimentState;"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/89ced12535697984506322e2181131f7.json b/node_modules/.cache/babel-loader/89ced12535697984506322e2181131f7.json new file mode 100644 index 0000000000000000000000000000000000000000..8092ab7395fdc3e16706f497fd54ae61563a59c6 --- /dev/null +++ b/node_modules/.cache/babel-loader/89ced12535697984506322e2181131f7.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js\";\nimport React, { Component } from \"react\"; // import vis from \"vis-network\";\n\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n constructor(...args) {\n super(...args);\n\n this.updateVisNodes = nodes => {\n this.props.setVisData(nodes);\n };\n }\n\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else if (nextProps.data && this.props.data && nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp) {\n console.log(\"Rerendering\");\n return true;\n } else if (nextProps.loadingGraph !== this.props.loadingGraph) {\n return true;\n } else {\n return false;\n }\n }\n\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n render() {\n if (this.props.loadingGraph) return React.createElement(Spinner, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 32\n },\n __self: this\n });\n\n if (this.props.data == null) {\n return React.createElement(\"div\", {\n className: \"card-body text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 35\n },\n __self: this\n }, React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Press \", React.createElement(\"span\", {\n className: \"badge badge-info\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Show Graph\"), \" to see the graph representation of the experiment.\"), React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"If the experiment is running, press \", React.createElement(\"span\", {\n className: \"badge badge-dark\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"Start Job Monitor\"), \" to start a live tracker of the changes on the experiment's jobs. This process will automatically update the graph's nodes colors and show a log of the detected changes.\"));\n }\n\n var nodes_array = [];\n var edges_array = [];\n\n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: {\n background: node.status_color,\n border: \"black\"\n },\n level: node.level\n }));\n this.props.data.edges.map(edge => edges_array.push({\n from: edge.from,\n to: edge.to\n }));\n }\n\n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n const options = {\n edges: {\n arrows: {\n to: {\n enabled: true\n }\n }\n },\n layout: {\n //improvedLayout: true,\n hierarchical: {\n nodeSpacing: 190,\n blockShifting: false,\n edgeMinimization: true,\n parentCentralization: false,\n sortMethod: 'hubsize',\n direction: 'UD'\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true\n },\n physics: {\n enabled: false\n },\n nodes: {\n shape: 'dot',\n font: {\n size: 10\n }\n }\n };\n const graph = {\n nodes: nodes,\n edges: edges\n };\n\n class VisNetwork extends Component {\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else {\n return false;\n }\n }\n\n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", params => {\n //console.log(params);\n if (params.nodes) {\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n });\n } // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n\n\n render() {\n return React.createElement(\"div\", {\n className: \"card-body p-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 133\n },\n __self: this\n }, React.createElement(\"div\", {\n ref: \"myRef\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 134\n },\n __self: this\n }));\n }\n\n }\n\n this.updateVisNodes(nodes);\n return React.createElement(VisNetwork, {\n graph: graph,\n options: options,\n updateSelection: this.props.updateSelection,\n shouldUpdateGraph: this.props.shouldUpdateGraph,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 142\n },\n __self: this\n });\n }\n\n}\n\nconst experimentStyle = {\n height: 600\n};\nexport default GraphNativeRep;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js"],"names":["React","Component","Spinner","vis","GraphNativeRep","updateVisNodes","nodes","props","setVisData","shouldComponentUpdate","nextProps","nextState","shouldUpdateGraph","data","pkl_timestamp","console","log","loadingGraph","componentWillUnmount","cleanGraphData","render","nodes_array","edges_array","edges","map","node","push","id","label","color","background","status_color","border","level","edge","from","to","DataSet","options","arrows","enabled","layout","hierarchical","nodeSpacing","blockShifting","edgeMinimization","parentCentralization","sortMethod","direction","interaction","dragNodes","hoverConnectedEdges","navigationButtons","physics","shape","font","size","graph","VisNetwork","componentDidMount","network","Network","refs","myRef","on","params","updateSelection","experimentStyle","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,SAAhB,QAAiC,OAAjC,C,CACA;;AACA,OAAOC,OAAP,MAAoB,mBAApB;AACA,OAAOC,GAAP,MAAgB,KAAhB;;AAEA,MAAMC,cAAN,SAA6BH,SAA7B,CAAuC;AAAA;AAAA;;AAAA,SAmBnCI,cAnBmC,GAmBjBC,KAAD,IAAW;AACxB,WAAKC,KAAL,CAAWC,UAAX,CAAsBF,KAAtB;AACH,KArBkC;AAAA;;AAEnCG,EAAAA,qBAAqB,CAACC,SAAD,EAAYC,SAAZ,EAAsB;AACvC,QAAI,KAAKJ,KAAL,CAAWK,iBAAX,KAAiC,IAArC,EAA0C;AACtC,aAAO,IAAP;AACD,KAFH,MAEQ,IAAIF,SAAS,CAACG,IAAV,IAAkB,KAAKN,KAAL,CAAWM,IAA7B,IAAsCH,SAAS,CAACG,IAAV,CAAeC,aAAf,KAAiC,KAAKP,KAAL,CAAWM,IAAX,CAAgBC,aAA3F,EAA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oBC,KAApB;AAEA,WAAO,oBAAC,UAAD;AACH,MAAA,KAAK,EAAEmD,KADJ;AAEH,MAAA,OAAO,EAAEnB,OAFN;AAGH,MAAA,eAAe,EAAE,KAAK/B,KAAL,CAAW2D,eAHzB;AAIH,MAAA,iBAAiB,EAAE,KAAK3D,KAAL,CAAWK,iBAJ3B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAAP;AAOH;;AA/IkC;;AA6JvC,MAAMuD,eAAe,GAAG;AACpBC,EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,eAAehE,cAAf","sourcesContent":["import React, { Component } from \"react\";\n// import vis from \"vis-network\";\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n\n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true\n }else if (nextProps.data && this.props.data && (nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp)){\n console.log(\"Rerendering\")\n return true;\n }else if (nextProps.loadingGraph !== this.props.loadingGraph){\n return true; \n }else{\n return false;\n }\n }\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n updateVisNodes = (nodes) => {\n this.props.setVisData(nodes);\n }\n\n\n\n render () {\n if (this.props.loadingGraph) return ;\n if (this.props.data == null){\n return (\n
\n

Press Show Graph to see the graph representation of the experiment.

\n

If the experiment is running, press Start Job Monitor to start a live tracker of the changes on the experiment's jobs.\n This process will automatically update the graph's nodes colors and show a log of the detected changes.\n

\n
\n );\n }\n\n var nodes_array = [];\n var edges_array = [];\n \n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: { background: node.status_color, border: \"black\" },\n level: node.level,\n })\n );\n \n this.props.data.edges.map(edge => \n edges_array.push({ from: edge.from, to: edge.to })\n );\n }\n \n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n\n\n const options = {\n edges: {\n arrows: {\n to: { enabled: true }\n }\n },\n layout: {\n //improvedLayout: true,\n hierarchical: {\n nodeSpacing: 190,\n blockShifting: false,\n edgeMinimization: true,\n parentCentralization: false,\n sortMethod: 'hubsize',\n direction: 'UD',\n }\n }, \n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true,\n },\n physics: {\n enabled: false,\n },\n nodes: {\n shape: 'dot',\n font: {\n size: 10,\n },\n }\n };\n \n const graph = {\n nodes : nodes,\n edges : edges,\n };\n\n class VisNetwork extends Component {\n \n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true;\n } else {\n return false;\n }\n }\n \n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", (params) => {\n //console.log(params);\n if (params.nodes){\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n \n });\n }\n \n // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n \n render() { \n return (\n
\n
\n
\n );\n }\n }\n\n this.updateVisNodes(nodes);\n \n return ;\n\n }\n\n\n \n\n \n\n \n \n\n \n\n}\n\nconst experimentStyle = {\n height: 600\n };\n\nexport default GraphNativeRep;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/8b07470978ab244bf690a70f6a1a4c73.json b/node_modules/.cache/babel-loader/8b07470978ab244bf690a70f6a1a4c73.json new file mode 100644 index 0000000000000000000000000000000000000000..a797278aa2ea54014a76f76318dae7a008350cbc --- /dev/null +++ b/node_modules/.cache/babel-loader/8b07470978ab244bf690a70f6a1a4c73.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js\";\nimport React, { Component } from \"react\"; // import vis from \"vis-network\";\n\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n constructor(...args) {\n super(...args);\n\n this.updateVisNodes = nodes => {\n this.props.setVisData(nodes);\n };\n }\n\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else if (nextProps.data && this.props.data && nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp) {\n console.log(\"Rerendering\");\n return true;\n } else if (nextProps.loadingGraph !== this.props.loadingGraph) {\n return true;\n } else {\n return false;\n }\n }\n\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n render() {\n if (this.props.loadingGraph) return React.createElement(Spinner, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 32\n },\n __self: this\n });\n\n if (this.props.data == null) {\n return React.createElement(\"div\", {\n className: \"card-body text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 35\n },\n __self: this\n }, React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Press \", React.createElement(\"span\", {\n className: \"badge badge-info\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Show Graph\"), \" to see the graph representation of the experiment.\"), React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"If the experiment is running, press \", React.createElement(\"span\", {\n className: \"badge badge-dark\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"Start Job Monitor\"), \" to start a live tracker of the changes on the experiment's jobs. This process will automatically update the graph's nodes colors and show a log of the detected changes.\"));\n }\n\n var nodes_array = [];\n var edges_array = [];\n\n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: {\n background: node.status_color,\n border: \"black\"\n },\n level: node.level\n }));\n this.props.data.edges.map(edge => edges_array.push({\n from: edge.from,\n to: edge.to\n }));\n }\n\n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n const options = {\n edges: {\n arrows: {\n to: {\n enabled: true\n }\n }\n },\n layout: {\n //improvedLayout: true,\n hierarchical: {\n nodeSpacing: 190,\n blockShifting: true,\n edgeMinimization: true,\n parentCentralization: true,\n sortMethod: 'hubsize',\n direction: 'UD'\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true\n },\n physics: {\n enabled: false\n },\n nodes: {\n shape: 'dot',\n font: {\n size: 10\n }\n }\n };\n const graph = {\n nodes: nodes,\n edges: edges\n };\n\n class VisNetwork extends Component {\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else {\n return false;\n }\n }\n\n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", params => {\n //console.log(params);\n if (params.nodes) {\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n });\n } // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n\n\n render() {\n return React.createElement(\"div\", {\n className: \"card-body p-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 133\n },\n __self: this\n }, React.createElement(\"div\", {\n ref: \"myRef\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 134\n },\n __self: this\n }));\n }\n\n }\n\n this.updateVisNodes(nodes);\n return React.createElement(VisNetwork, {\n graph: graph,\n options: options,\n updateSelection: this.props.updateSelection,\n shouldUpdateGraph: this.props.shouldUpdateGraph,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 142\n },\n __self: this\n });\n }\n\n}\n\nconst experimentStyle = {\n height: 600\n};\nexport default GraphNativeRep;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js"],"names":["React","Component","Spinner","vis","GraphNativeRep","updateVisNodes","nodes","props","setVisData","shouldComponentUpdate","nextProps","nextState","shouldUpdateGraph","data","pkl_timestamp","console","log","loadingGraph","componentWillUnmount","cleanGraphData","render","nodes_array","edges_array","edges","map","node","push","id","label","color","background","status_color","border","level","edge","from","to","DataSet","options","arrows","enabled","layout","hierarchical","nodeSpacing","blockShifting","edgeMinimization","parentCentralization","sortMethod","direction","interaction","dragNodes","hoverConnectedEdges","navigationButtons","physics","shape","font","size","graph","VisNetwork","componentDidMount","network","Network","refs","myRef","on","params","updateSelection","experimentStyle","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,SAAhB,QAAiC,OAAjC,C,CACA;;AACA,OAAOC,OAAP,MAAoB,mBAApB;AACA,OAAOC,GAAP,MAAgB,KAAhB;;AAEA,MAAMC,cAAN,SAA6BH,SAA7B,CAAuC;AAAA;AAAA;;AAAA,SAmBnCI,cAnBmC,GAmBjBC,KAAD,IAAW;AACxB,WAAKC,KAAL,CAAWC,UAAX,CAAsBF,KAAtB;AACH,KArBkC;AAAA;;AAEnCG,EAAAA,qBAAqB,CAACC,SAAD,EAAYC,SAAZ,EAAsB;AACvC,QAAI,KAAKJ,KAAL,CAAWK,iBAAX,KAAiC,IAArC,EAA0C;AACtC,aAAO,IAAP;AACD,KAFH,MAEQ,IAAIF,SAAS,CAACG,IAAV,IAAkB,KAAKN,KAAL,CAAWM,IAA7B,IAAsCH,SAAS,CAACG,IAAV,CAAeC,aAAf,KAAiC,KAAKP,KAAL,CAAWM,IAAX,CAAgBC,aAA3F,EAA0G;AAC9GC,MAAAA,OAAO,CAACC,GAAR,CAAY,aAAZ;AACA,aAAO,IAAP;AACD,KAHK,MAGA,IAAIN,SAAS,CAACO,YAAV,KAA2B,KAAKV,KAAL,CAAWU,YAA1C,EAAuD;AAC3D,aAAO,IAAP;AACD,KAFK,MAED;AACH,aAAO,KAAP;AACD;AACN;;AACDC,EAAAA,oBAAoB,GAAG;AACnBH,IAAAA,OAAO,CAACC,GAAR,CAAY,YAAZ;AACA,S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GAAG;AACpBC,EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,eAAehE,cAAf","sourcesContent":["import React, { Component } from \"react\";\n// import vis from \"vis-network\";\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n\n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true\n }else if (nextProps.data && this.props.data && (nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp)){\n console.log(\"Rerendering\")\n return true;\n }else if (nextProps.loadingGraph !== this.props.loadingGraph){\n return true; \n }else{\n return false;\n }\n }\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n updateVisNodes = (nodes) => {\n this.props.setVisData(nodes);\n }\n\n\n\n render () {\n if (this.props.loadingGraph) return ;\n if (this.props.data == null){\n return (\n
\n

Press Show Graph to see the graph representation of the experiment.

\n

If the experiment is running, press Start Job Monitor to start a live tracker of the changes on the experiment's jobs.\n This process will automatically update the graph's nodes colors and show a log of the detected changes.\n

\n
\n );\n }\n\n var nodes_array = [];\n var edges_array = [];\n \n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: { background: node.status_color, border: \"black\" },\n level: node.level,\n })\n );\n \n this.props.data.edges.map(edge => \n edges_array.push({ from: edge.from, to: edge.to })\n );\n }\n \n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n\n\n const options = {\n edges: {\n arrows: {\n to: { enabled: true }\n }\n },\n layout: {\n //improvedLayout: true,\n hierarchical: {\n nodeSpacing: 190,\n blockShifting: true,\n edgeMinimization: true,\n parentCentralization: true,\n sortMethod: 'hubsize',\n direction: 'UD',\n }\n }, \n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true,\n },\n physics: {\n enabled: false,\n },\n nodes: {\n shape: 'dot',\n font: {\n size: 10,\n },\n }\n };\n \n const graph = {\n nodes : nodes,\n edges : edges,\n };\n\n class VisNetwork extends Component {\n \n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true;\n } else {\n return false;\n }\n }\n \n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", (params) => {\n //console.log(params);\n if (params.nodes){\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n \n });\n }\n \n // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n \n render() { \n return (\n
\n
\n
\n );\n }\n }\n\n this.updateVisNodes(nodes);\n \n return ;\n\n }\n\n\n \n\n \n\n \n \n\n \n\n}\n\nconst experimentStyle = {\n height: 600\n };\n\nexport default GraphNativeRep;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/8b0b46e8d467fa95b29fba1b504b2c59.json b/node_modules/.cache/babel-loader/8b0b46e8d467fa95b29fba1b504b2c59.json new file mode 100644 index 0000000000000000000000000000000000000000..f062cde9a0ca1e8c98b8c7ed5add04997c489238 --- /dev/null +++ b/node_modules/.cache/babel-loader/8b0b46e8d467fa95b29fba1b504b2c59.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js\";\nimport React, { Component } from \"react\"; // import vis from \"vis-network\";\n\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n constructor(...args) {\n super(...args);\n\n this.updateVisNodes = nodes => {\n this.props.setVisData(nodes);\n };\n }\n\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else if (nextProps.data && this.props.data && nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp) {\n console.log(\"Rerendering\");\n return true;\n } else if (nextProps.loadingGraph !== this.props.loadingGraph) {\n return true;\n } else {\n return false;\n }\n }\n\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n render() {\n if (this.props.loadingGraph) return React.createElement(Spinner, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 32\n },\n __self: this\n });\n\n if (this.props.data == null) {\n return React.createElement(\"div\", {\n className: \"card-body text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 35\n },\n __self: this\n }, React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Press \", React.createElement(\"span\", {\n className: \"badge badge-info\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Show Graph\"), \" to see the graph representation of the experiment.\"), React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"If the experiment is running, press \", React.createElement(\"span\", {\n className: \"badge badge-dark\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"Start Job Monitor\"), \" to start a live tracker of the changes on the experiment's jobs. This process will automatically update the graph's nodes colors and show a log of the detected changes.\"));\n }\n\n var nodes_array = [];\n var edges_array = [];\n\n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: {\n background: node.status_color,\n border: \"black\"\n },\n level: node.level\n }));\n this.props.data.edges.map(edge => edges_array.push({\n from: edge.from,\n to: edge.to\n }));\n }\n\n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n const options = {\n edges: {\n arrows: {\n to: {\n enabled: true\n }\n }\n },\n layout: {\n //improvedLayout: true,\n hierarchical: {\n // enabled: true,\n nodeSpacing: 250,\n //edgeMinimization: true,\n parentCentralization: true,\n direction: 'UD',\n sortMethod: 'directed'\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true\n },\n physics: {\n enabled: false\n },\n nodes: {\n shape: 'dot'\n }\n };\n const graph = {\n nodes: nodes,\n edges: edges\n };\n\n class VisNetwork extends Component {\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else {\n return false;\n }\n }\n\n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", params => {\n //console.log(params);\n if (params.nodes) {\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n });\n } // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n\n\n render() {\n return React.createElement(\"div\", {\n className: \"card-body p-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 130\n },\n __self: this\n }, React.createElement(\"div\", {\n ref: \"myRef\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 131\n },\n __self: this\n }));\n }\n\n }\n\n this.updateVisNodes(nodes);\n return React.createElement(VisNetwork, {\n graph: graph,\n options: options,\n updateSelection: this.props.updateSelection,\n shouldUpdateGraph: this.props.shouldUpdateGraph,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 139\n },\n __self: this\n });\n }\n\n}\n\nconst experimentStyle = {\n height: 600\n};\nexport default GraphNativeRep;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js"],"names":["React","Component","Spinner","vis","GraphNativeRep","updateVisNodes","nodes","props","setVisData","shouldComponentUpdate","nextProps","nextState","shouldUpdateGraph","data","pkl_timestamp","console","log","loadingGraph","componentWillUnmount","cleanGraphData","render","nodes_array","edges_array","edges","map","node","push","id","label","color","background","status_color","border","level","edge","from","to","DataSet","options","arrows","enabled","layout","hierarchical","nodeSpacing","parentCentralization","direction","sortMethod","interaction","dragNodes","hoverConnectedEdges","navigationButtons","physics","shape","graph","VisNetwork","componentDidMount","network","Network","refs","myRef","on","params","updateSelection","experiment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ACAkB,QAAAA,OAAO,CAACI,EAAR,CAAW,OAAX,EAAqBC,MAAD,IAAY;AAC5B;AACA,cAAIA,MAAM,CAACvD,KAAX,EAAiB;AACb;AACA,iBAAKC,KAAL,CAAWuD,eAAX,CAA2BD,MAAM,CAACvD,KAAlC;AACH;AAEJ,SAPD;AAQH,OApB8B,CAsB/B;AACA;AACA;AACA;;;AAEAc,MAAAA,MAAM,GAAG;AACL,eACI;AAAK,UAAA,SAAS,EAAC,eAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,WACI;AAAK,UAAA,GAAG,EAAC,OAAT;AAAiB,UAAA,KAAK,EAAE2C,eAAxB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,UADJ,CADJ;AAKH;;AAjC8B;;AAoCnC,SAAK1D,cAAL,CAAoBC,KAApB;AAEA,WAAO,oBAAC,UAAD;AACH,MAAA,KAAK,EAAE+C,KADJ;AAEH,MAAA,OAAO,EAAEf,OAFN;AAGH,MAAA,eAAe,EAAE,KAAK/B,KAAL,CAAWuD,eAHzB;AAIH,MAAA,iBAAiB,EAAE,KAAKvD,KAAL,CAAWK,iBAJ3B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAAP;AAOH;;AA5IkC;;AA0JvC,MAAMmD,eAAe,GAAG;AACpBC,EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,eAAe5D,cAAf","sourcesContent":["import React, { Component } from \"react\";\n// import vis from \"vis-network\";\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n\n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true\n }else if (nextProps.data && this.props.data && (nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp)){\n console.log(\"Rerendering\")\n return true;\n }else if (nextProps.loadingGraph !== this.props.loadingGraph){\n return true; \n }else{\n return false;\n }\n }\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n updateVisNodes = (nodes) => {\n this.props.setVisData(nodes);\n }\n\n\n\n render () {\n if (this.props.loadingGraph) return ;\n if (this.props.data == null){\n return (\n
\n

Press Show Graph to see the graph representation of the experiment.

\n

If the experiment is running, press Start Job Monitor to start a live tracker of the changes on the experiment's jobs.\n This process will automatically update the graph's nodes colors and show a log of the detected changes.\n

\n
\n );\n }\n\n var nodes_array = [];\n var edges_array = [];\n \n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: { background: node.status_color, border: \"black\" },\n level: node.level,\n })\n );\n \n this.props.data.edges.map(edge => \n edges_array.push({ from: edge.from, to: edge.to })\n );\n }\n \n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n\n\n const options = {\n edges: {\n arrows: {\n to: { enabled: true }\n }\n },\n layout: {\n //improvedLayout: true,\n hierarchical: {\n // enabled: true,\n nodeSpacing: 250,\n //edgeMinimization: true,\n parentCentralization: true,\n direction: 'UD',\n sortMethod: 'directed',\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true,\n },\n physics: {\n enabled: false,\n },\n nodes: {\n shape: 'dot',\n }\n };\n \n const graph = {\n nodes : nodes,\n edges : edges,\n };\n\n class VisNetwork extends Component {\n \n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true;\n } else {\n return false;\n }\n }\n \n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", (params) => {\n //console.log(params);\n if (params.nodes){\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n \n });\n }\n \n // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n \n render() { \n return (\n
\n
\n
\n );\n }\n }\n\n this.updateVisNodes(nodes);\n \n return ;\n\n }\n\n\n \n\n \n\n \n \n\n \n\n}\n\nconst experimentStyle = {\n height: 600\n };\n\nexport default GraphNativeRep;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/8cc4c24f9c582ee5d81eb5c8fcc5c33b.json b/node_modules/.cache/babel-loader/8cc4c24f9c582ee5d81eb5c8fcc5c33b.json new file mode 100644 index 0000000000000000000000000000000000000000..a43095af13cc484bb07360026c8cea1681a5805a --- /dev/null +++ b/node_modules/.cache/babel-loader/8cc4c24f9c582ee5d81eb5c8fcc5c33b.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js\";\nimport React, { Component } from \"react\"; // import vis from \"vis-network\";\n\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n constructor(...args) {\n super(...args);\n\n this.updateVisNodes = nodes => {\n this.props.setVisData(nodes);\n };\n }\n\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else if (nextProps.data && this.props.data && nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp) {\n console.log(\"Rerendering\");\n return true;\n } else if (nextProps.loadingGraph !== this.props.loadingGraph) {\n return true;\n } else {\n return false;\n }\n }\n\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n render() {\n if (this.props.loadingGraph) return React.createElement(Spinner, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 32\n },\n __self: this\n });\n\n if (this.props.data == null) {\n return React.createElement(\"div\", {\n className: \"card-body text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 35\n },\n __self: this\n }, React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Press \", React.createElement(\"span\", {\n className: \"badge badge-info\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Show Graph\"), \" to see the graph representation of the experiment.\"), React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"If the experiment is running, press \", React.createElement(\"span\", {\n className: \"badge badge-dark\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"Start Job Monitor\"), \" to start a live tracker of the changes on the experiment's jobs. This process will automatically update the graph's nodes colors and show a log of the detected changes.\"));\n }\n\n var nodes_array = [];\n var edges_array = [];\n\n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: {\n background: node.status_color,\n border: \"black\"\n },\n level: node.level\n }));\n this.props.data.edges.map(edge => edges_array.push({\n from: edge.from,\n to: edge.to\n }));\n }\n\n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n const options = {\n edges: {\n arrows: {\n to: {\n enabled: true\n }\n }\n },\n layout: {\n //improvedLayout: true,\n hierarchical: {\n nodeSpacing: 190,\n treeSpacing: 200,\n blockShifting: true,\n edgeMinimization: false,\n parentCentralization: false,\n sortMethod: 'hubsize',\n direction: 'UD'\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true\n },\n physics: {\n stabilization: true\n },\n nodes: {\n shape: 'dot',\n font: {\n size: 10\n }\n }\n };\n const graph = {\n nodes: nodes,\n edges: edges\n };\n\n class VisNetwork extends Component {\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else {\n return false;\n }\n }\n\n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", params => {\n //console.log(params);\n if (params.nodes) {\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n });\n } // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n\n\n render() {\n return React.createElement(\"div\", {\n className: \"card-body p-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 134\n },\n __self: this\n }, React.createElement(\"div\", {\n ref: \"myRef\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 135\n },\n __self: this\n }));\n }\n\n }\n\n this.updateVisNodes(nodes);\n return React.createElement(VisNetwork, {\n graph: graph,\n options: options,\n updateSelection: this.props.updateSelection,\n shouldUpdateGraph: this.props.shouldUpdateGraph,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 143\n },\n __self: this\n });\n }\n\n}\n\nconst experimentStyle = {\n height: 600\n};\nexport default GraphNativeRep;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js"],"names":["React","Component","Spinner","vis","GraphNativeRep","updateVisNodes","nodes","props","setVisData","shouldComponentUpdate","nextProps","nextState","shouldUpdateGraph","data","pkl_timestamp","console","log","loadingGraph","componentWillUnmount","cleanGraphData","render","nodes_array","edges_array","edges","map","node","push","id","label","color","background","status_color","border","level","edge","from","to","DataSet","options","arrows","enabled","layout","hierarchical","nodeSpacing","treeSpacing","blockShifting","edgeMinimization","parentCentralization","sortMethod","direction","interaction","dragNodes","hoverConnectedEdges","navigationButtons","physics","stabilization","shape","font","size","graph","VisNetwork","componentDidMount","network","Network","refs","myRef","on","params","updateSelection","experimentStyle","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,SAAhB,QAAiC,OAAjC,C,CACA;;AACA,OAAOC,OAAP,MAAoB,mBAApB;AACA,OAAOC,GAAP,MAAgB,KAAhB;;AAEA,MAAMC,cAAN,SAA6BH,SAA7B,CAAuC;AAAA;AAAA;;AAAA,SAmBnCI,cAnBmC,GAmBjBC,KAAD,IAAW;AACxB,WAAKC,KAAL,CAAWC,UAAX,CAAsBF,KAAtB;AACH,KArBkC;AAAA;;AAEnCG,EAAAA,qBAAqB,CAACC,SAAD,EAAYC,SAAZ,EAAsB;AACvC,QAAI,KAAKJ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;;AAEAc,MAAAA,MAAM,GAAG;AACL,eACI;AAAK,UAAA,SAAS,EAAC,eAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,WACI;AAAK,UAAA,GAAG,EAAC,OAAT;AAAiB,UAAA,KAAK,EAAEiD,eAAxB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,UADJ,CADJ;AAKH;;AAjC8B;;AAoCnC,SAAKhE,cAAL,CAAoBC,KAApB;AAEA,WAAO,oBAAC,UAAD;AACH,MAAA,KAAK,EAAEqD,KADJ;AAEH,MAAA,OAAO,EAAErB,OAFN;AAGH,MAAA,eAAe,EAAE,KAAK/B,KAAL,CAAW6D,eAHzB;AAIH,MAAA,iBAAiB,EAAE,KAAK7D,KAAL,CAAWK,iBAJ3B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAAP;AAOH;;AAhJkC;;AA8JvC,MAAMyD,eAAe,GAAG;AACpBC,EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,eAAelE,cAAf","sourcesContent":["import React, { Component } from \"react\";\n// import vis from \"vis-network\";\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n\n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true\n }else if (nextProps.data && this.props.data && (nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp)){\n console.log(\"Rerendering\")\n return true;\n }else if (nextProps.loadingGraph !== this.props.loadingGraph){\n return true; \n }else{\n return false;\n }\n }\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n updateVisNodes = (nodes) => {\n this.props.setVisData(nodes);\n }\n\n\n\n render () {\n if (this.props.loadingGraph) return ;\n if (this.props.data == null){\n return (\n
\n

Press Show Graph to see the graph representation of the experiment.

\n

If the experiment is running, press Start Job Monitor to start a live tracker of the changes on the experiment's jobs.\n This process will automatically update the graph's nodes colors and show a log of the detected changes.\n

\n
\n );\n }\n\n var nodes_array = [];\n var edges_array = [];\n \n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: { background: node.status_color, border: \"black\" },\n level: node.level,\n })\n );\n \n this.props.data.edges.map(edge => \n edges_array.push({ from: edge.from, to: edge.to })\n );\n }\n \n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n\n\n const options = {\n edges: {\n arrows: {\n to: { enabled: true }\n }\n },\n layout: {\n //improvedLayout: true,\n hierarchical: {\n nodeSpacing: 190,\n treeSpacing: 200,\n blockShifting: true,\n edgeMinimization: false,\n parentCentralization: false,\n sortMethod: 'hubsize',\n direction: 'UD',\n }\n }, \n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true,\n },\n physics: {\n stabilization: true,\n },\n nodes: {\n shape: 'dot',\n font: {\n size: 10,\n },\n }\n };\n \n const graph = {\n nodes : nodes,\n edges : edges,\n };\n\n class VisNetwork extends Component {\n \n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true;\n } else {\n return false;\n }\n }\n \n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", (params) => {\n //console.log(params);\n if (params.nodes){\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n \n });\n }\n \n // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n \n render() { \n return (\n
\n
\n
\n );\n }\n }\n\n this.updateVisNodes(nodes);\n \n return ;\n\n }\n\n\n \n\n \n\n \n \n\n \n\n}\n\nconst experimentStyle = {\n height: 600\n };\n\nexport default GraphNativeRep;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/8ddbe864b2b3049c4b716c19443e874f.json b/node_modules/.cache/babel-loader/8ddbe864b2b3049c4b716c19443e874f.json new file mode 100644 index 0000000000000000000000000000000000000000..4c361e2364872c3f9eeba71e1e45d34c90c0f17c --- /dev/null +++ b/node_modules/.cache/babel-loader/8ddbe864b2b3049c4b716c19443e874f.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js\";\nimport React, { Component } from \"react\"; // import vis from \"vis-network\";\n\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n constructor(...args) {\n super(...args);\n\n this.updateVisNodes = nodes => {\n this.props.setVisData(nodes);\n };\n }\n\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else if (nextProps.data && this.props.data && nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp) {\n console.log(\"Rerendering\");\n return true;\n } else if (nextProps.loadingGraph !== this.props.loadingGraph) {\n return true;\n } else {\n return false;\n }\n }\n\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n render() {\n if (this.props.loadingGraph) return React.createElement(Spinner, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 32\n },\n __self: this\n });\n\n if (this.props.data == null) {\n return React.createElement(\"div\", {\n className: \"card-body text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 35\n },\n __self: this\n }, React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Press \", React.createElement(\"span\", {\n className: \"badge badge-info\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Show Graph\"), \" to see the graph representation of the experiment.\"), React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"If the experiment is running, press \", React.createElement(\"span\", {\n className: \"badge badge-dark\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"Start Job Monitor\"), \" to start a live tracker of the changes on the experiment's jobs. This process will automatically update the graph's nodes colors and show a log of the detected changes.\"));\n }\n\n var nodes_array = [];\n var edges_array = [];\n\n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: {\n background: node.status_color,\n border: \"black\"\n } //level: node.level,\n\n }));\n this.props.data.edges.map(edge => edges_array.push({\n from: edge.from,\n to: edge.to\n }));\n }\n\n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n const options = {\n edges: {\n arrows: {\n to: {\n enabled: true\n }\n }\n },\n layout: {\n //improvedLayout: true,\n hierarchical: {\n // enabled: true,\n nodeSpacing: 250,\n // edgeMinimization: false,\n blockShifting: true,\n parentCentralization: true,\n direction: 'UD'\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true\n },\n physics: {\n enabled: false\n },\n nodes: {\n shape: 'dot'\n }\n };\n const graph = {\n nodes: nodes,\n edges: edges\n };\n\n class VisNetwork extends Component {\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else {\n return false;\n }\n }\n\n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", params => {\n //console.log(params);\n if (params.nodes) {\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n });\n } // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n\n\n render() {\n return React.createElement(\"div\", {\n className: \"card-body p-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 130\n },\n __self: this\n }, React.createElement(\"div\", {\n ref: \"myRef\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 131\n },\n __self: this\n }));\n }\n\n }\n\n this.updateVisNodes(nodes);\n return React.createElement(VisNetwork, {\n graph: graph,\n options: options,\n updateSelection: this.props.updateSelection,\n shouldUpdateGraph: this.props.shouldUpdateGraph,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 139\n },\n __self: this\n });\n }\n\n}\n\nconst experimentStyle = {\n height: 600\n};\nexport default GraphNativeRep;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js"],"names":["React","Component","Spinner","vis","GraphNativeRep","updateVisNodes","nodes","props","setVisData","shouldComponentUpdate","nextProps","nextState","shouldUpdateGraph","data","pkl_timestamp","console","log","loadingGraph","componentWillUnmount","cleanGraphData","render","nodes_array","edges_array","edges","map","node","push","id","label","color","background","status_color","border","edge","from","to","DataSet","options","arrows","enabled","layout","hierarchical","nodeSpacing","blockShifting","parentCentralization","direction","interaction","dragNodes","hoverConnectedEdges","navigationButtons","physics","shape","graph","VisNetwork","componentDidMount","network","Network","refs","myRef","on","params","updateSelection","experimentStyle","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,SAAhB,QAAiC,OAAjC,C,CACA;;AACA,OAAOC,OAAP,MAAoB,mBAApB;AACA,OAAOC,GAAP,MAAgB,KAAhB;;AAEA,MAAMC,cAAN,SAA6BH,SAA7B,CAAuC;AAAA;AAAA;;AAAA,SAmBnCI,cAnBmC,GAmBjBC,KAAD,IAAW;AACxB,WAAKC,KAAL,CAAWC,UAAX,CAAsBF,KAAtB;AACH,KArBkC;AAAA;;AAEnCG,EAAAA,qBAAqB,CAACC,SAAD,EAAYC,SAAZ,EAAsB;AACvC,QAAI,KAAKJ,KAAL,CAAWK,iBAAX,KAAiC,IAArC,EAA0C;AACtC,aAAO,IAAP;AACD,KAFH,MAEQ,IAAIF,SAAS,CAACG,IAAV,IAAkB,KAAKN,KAAL,CAAWM,IAA7B,IAAsCH,SAAS,CAACG,IAAV,CAAeC,aAAf,KAAiC,KAAKP,KAAL,CAAWM,IAAX,CAAgBC,aAA3F,EAA0G;AAC9GC,MAAAA,OAAO,CAACC,GAAR,CAAY,aAAZ;AAC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3B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAAP;AAOH;;AA5IkC;;AA0JvC,MAAMkD,eAAe,GAAG;AACpBC,EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,eAAe3D,cAAf","sourcesContent":["import React, { Component } from \"react\";\n// import vis from \"vis-network\";\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n\n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true\n }else if (nextProps.data && this.props.data && (nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp)){\n console.log(\"Rerendering\")\n return true;\n }else if (nextProps.loadingGraph !== this.props.loadingGraph){\n return true; \n }else{\n return false;\n }\n }\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n updateVisNodes = (nodes) => {\n this.props.setVisData(nodes);\n }\n\n\n\n render () {\n if (this.props.loadingGraph) return ;\n if (this.props.data == null){\n return (\n
\n

Press Show Graph to see the graph representation of the experiment.

\n

If the experiment is running, press Start Job Monitor to start a live tracker of the changes on the experiment's jobs.\n This process will automatically update the graph's nodes colors and show a log of the detected changes.\n

\n
\n );\n }\n\n var nodes_array = [];\n var edges_array = [];\n \n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: { background: node.status_color, border: \"black\" },\n //level: node.level,\n })\n );\n \n this.props.data.edges.map(edge => \n edges_array.push({ from: edge.from, to: edge.to })\n );\n }\n \n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n\n\n const options = {\n edges: {\n arrows: {\n to: { enabled: true }\n }\n },\n layout: {\n //improvedLayout: true,\n hierarchical: {\n // enabled: true,\n nodeSpacing: 250,\n // edgeMinimization: false,\n blockShifting: true,\n parentCentralization: true,\n direction: 'UD',\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true,\n },\n physics: {\n enabled: false,\n },\n nodes: {\n shape: 'dot',\n }\n };\n \n const graph = {\n nodes : nodes,\n edges : edges,\n };\n\n class VisNetwork extends Component {\n \n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true;\n } else {\n return false;\n }\n }\n \n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", (params) => {\n //console.log(params);\n if (params.nodes){\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n \n });\n }\n \n // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n \n render() { \n return (\n
\n
\n
\n );\n }\n }\n\n this.updateVisNodes(nodes);\n \n return ;\n\n }\n\n\n \n\n \n\n \n \n\n \n\n}\n\nconst experimentStyle = {\n height: 600\n };\n\nexport default GraphNativeRep;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/91c0aebf5e4649cfe0378d862d5dd332.json b/node_modules/.cache/babel-loader/91c0aebf5e4649cfe0378d862d5dd332.json new file mode 100644 index 0000000000000000000000000000000000000000..0e1363ad3d89b58acbf6ce9bcc26f0fd49860022 --- /dev/null +++ b/node_modules/.cache/babel-loader/91c0aebf5e4649cfe0378d862d5dd332.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js\";\nimport React, { Component } from \"react\"; // import vis from \"vis-network\";\n\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n constructor(...args) {\n super(...args);\n\n this.updateVisNodes = nodes => {\n this.props.setVisData(nodes);\n };\n }\n\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else if (nextProps.data && this.props.data && nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp) {\n console.log(\"Rerendering\");\n return true;\n } else if (nextProps.loadingGraph !== this.props.loadingGraph) {\n return true;\n } else {\n return false;\n }\n }\n\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n render() {\n if (this.props.loadingGraph) return React.createElement(Spinner, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 32\n },\n __self: this\n });\n\n if (this.props.data == null) {\n return React.createElement(\"div\", {\n className: \"card-body text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 35\n },\n __self: this\n }, React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Press \", React.createElement(\"span\", {\n className: \"badge badge-info\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Show Graph\"), \" to see the graph representation of the experiment.\"), React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"If the experiment is running, press \", React.createElement(\"span\", {\n className: \"badge badge-dark\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"Start Job Monitor\"), \" to start a live tracker of the changes on the experiment's jobs. This process will automatically update the graph's nodes colors and show a log of the detected changes.\"));\n }\n\n var nodes_array = [];\n var edges_array = [];\n\n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: {\n background: node.status_color,\n border: \"black\"\n } //level: node.priority,\n\n }));\n this.props.data.edges.map(edge => edges_array.push({\n from: edge.from,\n to: edge.to\n }));\n }\n\n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n const options = {\n edges: {\n arrows: {\n to: {\n enabled: true\n }\n }\n },\n layout: {\n improvedLayout: true,\n hierarchical: {\n nodeSpacing: 250,\n edgeMinimization: false,\n blockShifting: false,\n parentCentralization: false,\n direction: 'UD',\n sortMethod: 'directed'\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true\n },\n physics: {\n enabled: false\n },\n nodes: {\n shape: 'dot'\n }\n };\n const graph = {\n nodes: nodes,\n edges: edges\n };\n\n class VisNetwork extends Component {\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else {\n return false;\n }\n }\n\n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", params => {\n //console.log(params);\n if (params.nodes) {\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n });\n } // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n\n\n render() {\n return React.createElement(\"div\", {\n className: \"card-body p-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 131\n },\n __self: this\n }, React.createElement(\"div\", {\n ref: \"myRef\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 132\n },\n __self: this\n }));\n }\n\n }\n\n this.updateVisNodes(nodes);\n return React.createElement(VisNetwork, {\n graph: graph,\n options: options,\n updateSelection: this.props.updateSelection,\n shouldUpdateGraph: this.props.shouldUpdateGraph,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 140\n },\n __self: this\n });\n }\n\n}\n\nconst experimentStyle = {\n height: 600\n};\nexport default GraphNativeRep;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js"],"names":["React","Component","Spinner","vis","GraphNativeRep","updateVisNodes","nodes","props","setVisData","shouldComponentUpdate","nextProps","nextState","shouldUpdateGraph","data","pkl_timestamp","console","log","loadingGraph","componentWillUnmount","cleanGraphData","render","nodes_array","edges_array","edges","map","node","push","id","label","color","background","status_color","border","edge","from","to","DataSet","options","arrows","enabled","layout","improvedLayout","hierarchical","nodeSpacing","edgeMinimization","blockShifting","parentCentralization","direction","sortMethod","interaction","dragNodes","hoverConnectedEdges","navigationButtons","physics","shape","graph","VisNetwork","componentDidMount","network","Network","refs","myRef","on","params","updateSelection","experimentStyle","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,SAAhB,QAAiC,OAAjC,C,CACA;;AACA,OAAOC,OAAP,MAAoB,mBAApB;AACA,OAAOC,GAAP,MAAgB,KAAhB;;AAEA,MAAMC,cAAN,SAA6BH,SAA7B,CAAuC;AAAA;AAAA;;AAAA,SAmBnCI,cAnBmC,GAmBjBC,KAAD,IAAW;AACxB,WAAKC,KAAL,CAAWC,UAAX,CAAsBF,KAAtB;AACH,KArBkC;AAAA;;AAEnCG,EAAAA,qBAAqB,CAACC,SAAD,EAAYC,SAAZ,EAAsB;AACvC,QAAI,KAAKJ,KAAL,CAAWK,iBAAX,KAAiC,IAArC,EAA0C;AACtC,aAAO,IAAP;AACD,KAFH,MAEQ,IAAIF,SAAS,CAACG,IAAV,IAAkB,KAAKN,KAAL,CAAWM,IAA7B,IAAsCH,SAAS,CAACG,IAAV,CAAeC,aAAf,KAAiC,KAAKP,KAAL,CAAWM,IAAX,CAAgBC,aAA3F,EAA0G;AAC9GC,MAAAA,OAAO,CAACC,GAAR,CAAY,aAAZ;AACA,aAAO,IAAP;AACD,KAHK,MAGA,IAAIN,SAAS,CAACO,YAAV,KAA2B,KAAKV,KAAL,CAAWU,YAA1C,EAAuD;AAC3D,aAAO,IAAP;AACD,KAFK,MAED;AACH,aAAO,KAAP;AACD;AACN;;AACDC,EAAAA,oBAAoB,GAAG;AACnBH,IAAAA,OAAO,CAACC,GAAR,CAAY,YAAZ;AACA,SAAKT,KAAL,CAAWY,cAAX;AACH;;AAQDC,EAAAA,MAAM,GAAI;AACN,QAAI,KAAKb,KAAL,CAAWU,YAAf,EAA6B,OAAO,oBAAC,OAAD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAAP;;AAC7B,QAAI,KAAKV,KAAL,CAAWM,IAAX,IAAmB,IAAvB,EAA4B;AACxB,aAC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GAAG,CAACwD,OAAR,CAAgB,KAAKC,IAAL,CAAUC,KAA1B,EAAiC,KAAKtD,KAAL,CAAWgD,KAA5C,EAAmD,KAAKhD,KAAL,CAAW8B,OAA9D,CAAd;AACAqB,QAAAA,OAAO,CAACI,EAAR,CAAW,OAAX,EAAqBC,MAAD,IAAY;AAC5B;AACA,cAAIA,MAAM,CAACzD,KAAX,EAAiB;AACb;AACA,iBAAKC,KAAL,CAAWyD,eAAX,CAA2BD,MAAM,CAACzD,KAAlC;AACH;AAEJ,SAPD;AAQH,OApB8B,CAsB/B;AACA;AACA;AACA;;;AAEAc,MAAAA,MAAM,GAAG;AACL,eACI;AAAK,UAAA,SAAS,EAAC,eAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,WACI;AAAK,UAAA,GAAG,EAAC,OAAT;AAAiB,UAAA,KAAK,EAAE6C,eAAxB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,UADJ,CADJ;AAKH;;AAjC8B;;AAoCnC,SAAK5D,cAAL,CAAoBC,KAApB;AAEA,WAAO,oBAAC,UAAD;AACH,MAAA,KAAK,EAAEiD,KADJ;AAEH,MAAA,OAAO,EAAElB,OAFN;AAGH,MAAA,eAAe,EAAE,KAAK9B,KAAL,CAAWyD,eAHzB;AAIH,MAAA,iBAAiB,EAAE,KAAKzD,KAAL,CAAWK,iBAJ3B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAAP;AAOH;;AA7IkC;;AA2JvC,MAAMqD,eAAe,GAAG;AACpBC,EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,eAAe9D,cAAf","sourcesContent":["import React, { Component } from \"react\";\n// import vis from \"vis-network\";\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n\n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true\n }else if (nextProps.data && this.props.data && (nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp)){\n console.log(\"Rerendering\")\n return true;\n }else if (nextProps.loadingGraph !== this.props.loadingGraph){\n return true; \n }else{\n return false;\n }\n }\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n updateVisNodes = (nodes) => {\n this.props.setVisData(nodes);\n }\n\n\n\n render () {\n if (this.props.loadingGraph) return ;\n if (this.props.data == null){\n return (\n
\n

Press Show Graph to see the graph representation of the experiment.

\n

If the experiment is running, press Start Job Monitor to start a live tracker of the changes on the experiment's jobs.\n This process will automatically update the graph's nodes colors and show a log of the detected changes.\n

\n
\n );\n }\n\n var nodes_array = [];\n var edges_array = [];\n \n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: { background: node.status_color, border: \"black\" },\n //level: node.priority,\n })\n );\n \n this.props.data.edges.map(edge => \n edges_array.push({ from: edge.from, to: edge.to })\n );\n }\n \n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n\n\n const options = {\n edges: {\n arrows: {\n to: { enabled: true }\n }\n },\n layout: {\n improvedLayout: true,\n hierarchical: {\n \n nodeSpacing: 250,\n edgeMinimization: false,\n blockShifting: false,\n parentCentralization: false,\n direction: 'UD',\n sortMethod: 'directed',\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true,\n },\n physics: {\n enabled: false,\n },\n nodes: {\n shape: 'dot',\n }\n };\n \n const graph = {\n nodes : nodes,\n edges : edges,\n };\n\n class VisNetwork extends Component {\n \n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true;\n } else {\n return false;\n }\n }\n \n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", (params) => {\n //console.log(params);\n if (params.nodes){\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n \n });\n }\n \n // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n \n render() { \n return (\n
\n
\n
\n );\n }\n }\n\n this.updateVisNodes(nodes);\n \n return ;\n\n }\n\n\n \n\n \n\n \n \n\n \n\n}\n\nconst experimentStyle = {\n height: 600\n };\n\nexport default GraphNativeRep;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/951bbcae9c59fe96555086c86fd98106.json b/node_modules/.cache/babel-loader/951bbcae9c59fe96555086c86fd98106.json new file mode 100644 index 0000000000000000000000000000000000000000..b541183dadf95fff52d15ca65d0aad66ba3cf63e --- /dev/null +++ b/node_modules/.cache/babel-loader/951bbcae9c59fe96555086c86fd98106.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js\";\nimport React, { Component } from \"react\"; // import vis from \"vis-network\";\n\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n constructor(...args) {\n super(...args);\n\n this.updateVisNodes = nodes => {\n this.props.setVisData(nodes);\n };\n }\n\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else if (nextProps.data && this.props.data && nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp) {\n console.log(\"Rerendering\");\n return true;\n } else if (nextProps.loadingGraph !== this.props.loadingGraph) {\n return true;\n } else {\n return false;\n }\n }\n\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n render() {\n if (this.props.loadingGraph) return React.createElement(Spinner, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 32\n },\n __self: this\n });\n\n if (this.props.data == null) {\n return React.createElement(\"div\", {\n className: \"card-body text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 35\n },\n __self: this\n }, React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Press \", React.createElement(\"span\", {\n className: \"badge badge-info\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Show Graph\"), \" to see the graph representation of the experiment.\"), React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"If the experiment is running, press \", React.createElement(\"span\", {\n className: \"badge badge-dark\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"Start Job Monitor\"), \" to start a live tracker of the changes on the experiment's jobs. This process will automatically update the graph's nodes colors and show a log of the detected changes.\"));\n }\n\n var nodes_array = [];\n var edges_array = [];\n\n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: {\n background: node.status_color,\n border: \"black\"\n },\n level: node.level\n }));\n this.props.data.edges.map(edge => edges_array.push({\n from: edge.from,\n to: edge.to\n }));\n }\n\n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n const options = {\n edges: {\n arrows: {\n to: {\n enabled: true\n }\n }\n },\n layout: {\n improvedLayout: false,\n hierarchical: {\n nodeSpacing: 190,\n blockShifting: true,\n edgeMinimization: true,\n //parentCentralization: true,\n sortMethod: 'hubsize',\n direction: 'UD'\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true\n },\n physics: {\n enabled: false\n },\n nodes: {\n shape: 'dot',\n font: {\n size: 10\n }\n }\n };\n const graph = {\n nodes: nodes,\n edges: edges\n };\n\n class VisNetwork extends Component {\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else {\n return false;\n }\n }\n\n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", params => {\n //console.log(params);\n if (params.nodes) {\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n });\n } // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n\n\n render() {\n return React.createElement(\"div\", {\n className: \"card-body p-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 133\n },\n __self: this\n }, React.createElement(\"div\", {\n ref: \"myRef\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 134\n },\n __self: this\n }));\n }\n\n }\n\n this.updateVisNodes(nodes);\n return React.createElement(VisNetwork, {\n graph: graph,\n options: options,\n updateSelection: this.props.updateSelection,\n shouldUpdateGraph: this.props.shouldUpdateGraph,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 142\n },\n __self: this\n });\n }\n\n}\n\nconst experimentStyle = {\n height: 600\n};\nexport default GraphNativeRep;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js"],"names":["React","Component","Spinner","vis","GraphNativeRep","updateVisNodes","nodes","props","setVisData","shouldComponentUpdate","nextProps","nextState","shouldUpdateGraph","data","pkl_timestamp","console","log","loadingGraph","componentWillUnmount","cleanGraphData","render","nodes_array","edges_array","edges","map","node","push","id","label","color","background","status_color","border","level","edge","from","to","DataSet","options","arrows","enabled","layout","improvedLayout","hierarchical","nodeSpacing","blockShifting","edgeMinimization","sortMethod","direction","interaction","dragNodes","hoverConnectedEdges","navigationButtons","physics","shape","font","size","graph","VisNetwork","componentDidMount","network","Network","refs","myRef","on","params","updateSelection","experimentStyle","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,SAAhB,QAAiC,OAAjC,C,CACA;;AACA,OAAOC,OAAP,MAAoB,mBAApB;AACA,OAAOC,GAAP,MAAgB,KAAhB;;AAEA,MAAMC,cAAN,SAA6BH,SAA7B,CAAuC;AAAA;AAAA;;AAAA,SAmBnCI,cAnBmC,GAmBjBC,KAAD,IAAW;AACxB,WAAKC,KAAL,CAAWC,UAAX,CAAsBF,KAAtB;AACH,KArBk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AEJ,SAPD;AAQH,OApB8B,CAsB/B;AACA;AACA;AACA;;;AAEAc,MAAAA,MAAM,GAAG;AACL,eACI;AAAK,UAAA,SAAS,EAAC,eAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,WACI;AAAK,UAAA,GAAG,EAAC,OAAT;AAAiB,UAAA,KAAK,EAAE+C,eAAxB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,UADJ,CADJ;AAKH;;AAjC8B;;AAoCnC,SAAK9D,cAAL,CAAoBC,KAApB;AAEA,WAAO,oBAAC,UAAD;AACH,MAAA,KAAK,EAAEmD,KADJ;AAEH,MAAA,OAAO,EAAEnB,OAFN;AAGH,MAAA,eAAe,EAAE,KAAK/B,KAAL,CAAW2D,eAHzB;AAIH,MAAA,iBAAiB,EAAE,KAAK3D,KAAL,CAAWK,iBAJ3B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAAP;AAOH;;AA/IkC;;AA6JvC,MAAMuD,eAAe,GAAG;AACpBC,EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,eAAehE,cAAf","sourcesContent":["import React, { Component } from \"react\";\n// import vis from \"vis-network\";\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n\n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true\n }else if (nextProps.data && this.props.data && (nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp)){\n console.log(\"Rerendering\")\n return true;\n }else if (nextProps.loadingGraph !== this.props.loadingGraph){\n return true; \n }else{\n return false;\n }\n }\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n updateVisNodes = (nodes) => {\n this.props.setVisData(nodes);\n }\n\n\n\n render () {\n if (this.props.loadingGraph) return ;\n if (this.props.data == null){\n return (\n
\n

Press Show Graph to see the graph representation of the experiment.

\n

If the experiment is running, press Start Job Monitor to start a live tracker of the changes on the experiment's jobs.\n This process will automatically update the graph's nodes colors and show a log of the detected changes.\n

\n
\n );\n }\n\n var nodes_array = [];\n var edges_array = [];\n \n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: { background: node.status_color, border: \"black\" },\n level: node.level,\n })\n );\n \n this.props.data.edges.map(edge => \n edges_array.push({ from: edge.from, to: edge.to })\n );\n }\n \n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n\n\n const options = {\n edges: {\n arrows: {\n to: { enabled: true }\n }\n },\n layout: {\n improvedLayout: false,\n hierarchical: {\n nodeSpacing: 190,\n blockShifting: true,\n edgeMinimization: true,\n //parentCentralization: true,\n sortMethod: 'hubsize',\n direction: 'UD',\n }\n }, \n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true,\n },\n physics: {\n enabled: false,\n },\n nodes: {\n shape: 'dot',\n font: {\n size: 10,\n },\n }\n };\n \n const graph = {\n nodes : nodes,\n edges : edges,\n };\n\n class VisNetwork extends Component {\n \n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true;\n } else {\n return false;\n }\n }\n \n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", (params) => {\n //console.log(params);\n if (params.nodes){\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n \n });\n }\n \n // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n \n render() { \n return (\n
\n
\n
\n );\n }\n }\n\n this.updateVisNodes(nodes);\n \n return ;\n\n }\n\n\n \n\n \n\n \n \n\n \n\n}\n\nconst experimentStyle = {\n height: 600\n };\n\nexport default GraphNativeRep;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/9521f11aefa4ff5bb844f16908e0dff3.json b/node_modules/.cache/babel-loader/9521f11aefa4ff5bb844f16908e0dff3.json new file mode 100644 index 0000000000000000000000000000000000000000..adf67d7da0923fd41d780ad736ed543d4b15fd79 --- /dev/null +++ b/node_modules/.cache/babel-loader/9521f11aefa4ff5bb844f16908e0dff3.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js\";\nimport React, { Component } from \"react\"; // import vis from \"vis-network\";\n\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis-network\";\n\nclass GraphNativeRep extends Component {\n constructor(...args) {\n super(...args);\n\n this.updateVisNodes = nodes => {\n this.props.setVisData(nodes);\n };\n }\n\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else if (nextProps.data && this.props.data && nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp) {\n console.log(\"Rerendering\");\n return true;\n } else if (nextProps.loadingGraph !== this.props.loadingGraph) {\n return true;\n } else {\n return false;\n }\n }\n\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n render() {\n if (this.props.loadingGraph) return React.createElement(Spinner, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 32\n },\n __self: this\n });\n\n if (this.props.data == null) {\n return React.createElement(\"div\", {\n className: \"card-body text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 35\n },\n __self: this\n }, React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Press \", React.createElement(\"span\", {\n className: \"badge badge-info\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Show Graph\"), \" to see the graph representation of the experiment.\"), React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"If the experiment is running, press \", React.createElement(\"span\", {\n className: \"badge badge-dark\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"Start Job Monitor\"), \" to start a live tracker of the changes on the experiment's jobs. This process will automatically update the graph's nodes colors and show a log of the detected changes.\"));\n }\n\n var nodes_array = [];\n var edges_array = [];\n\n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: {\n background: node.status_color,\n border: \"black\"\n },\n level: node.level\n }));\n this.props.data.edges.map(edge => edges_array.push({\n from: edge.from,\n to: edge.to\n }));\n }\n\n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n const options = {\n edges: {\n arrows: {\n to: {\n enabled: true\n }\n }\n },\n layout: {\n //improvedLayout: true,\n hierarchical: {\n nodeSpacing: 190,\n blockShifting: false,\n edgeMinimization: false,\n parentCentralization: true,\n sortMethod: 'hubsize',\n direction: 'UD' // work on vis current version\n // nodeSpacing: 190,\n // blockShifting: false,\n // edgeMinimization: false,\n // parentCentralization: true,\n // sortMethod: 'hubsize',\n // direction: 'UD',\n\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true\n },\n physics: {\n enabled: false\n },\n nodes: {\n shape: 'dot',\n font: {\n size: 10\n }\n }\n };\n const graph = {\n nodes: nodes,\n edges: edges\n };\n\n class VisNetwork extends Component {\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else {\n return false;\n }\n }\n\n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", params => {\n //console.log(params);\n if (params.nodes) {\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n });\n } // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n\n\n render() {\n return React.createElement(\"div\", {\n className: \"card-body p-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 140\n },\n __self: this\n }, React.createElement(\"div\", {\n ref: \"myRef\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 141\n },\n __self: this\n }));\n }\n\n }\n\n this.updateVisNodes(nodes);\n return React.createElement(VisNetwork, {\n graph: graph,\n options: options,\n updateSelection: this.props.updateSelection,\n shouldUpdateGraph: this.props.shouldUpdateGraph,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 149\n },\n __self: this\n });\n }\n\n}\n\nconst experimentStyle = {\n height: 600\n};\nexport default GraphNativeRep;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js"],"names":["React","Component","Spinner","vis","GraphNativeRep","updateVisNodes","nodes","props","setVisData","shouldComponentUpdate","nextProps","nextState","shouldUpdateGraph","data","pkl_timestamp","console","log","loadingGraph","componentWillUnmount","cleanGraphData","render","nodes_array","edges_array","edges","map","node","push","id","label","color","background","status_color","border","level","edge","from","to","DataSet","options","arrows","enabled","layout","hierarchical","nodeSpacing","blockShifting","edgeMinimization","parentCentralization","sortMethod","direction","interaction","dragNodes","hoverConnectedEdges","navigationButtons","physics","shape","font","size","graph","VisNetwork","componentDidMount","network","Network","refs","myRef","on","params","updateSelection","experimentStyle","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,SAAhB,QAAiC,OAAjC,C,CACA;;AACA,OAAOC,OAAP,MAAoB,mBAApB;AACA,OAAOC,GAAP,MAAgB,aAAhB;;AAEA,MAAMC,cAAN,SAA6BH,SAA7B,CAAuC;AAAA;AAAA;;AAAA,SAmBnCI,cAnBmC,GAmBjBC,KAAD,IAAW;AACxB,WAAKC,KAAL,CAAWC,UAAX,CAAsBF,KAAtB;AACH,KArBkC;AAAA;;AAEnCG,EAAAA,qBAAqB,CAACC,SAAD,EAAYC,SAAZ,EAAsB;AACvC,QAAI,KAAKJ,KAAL,CAAWK,iBAAX,KAAiC,IAArC,EAA0C;AACtC,aAAO,IAAP;AACD,KAFH,MAEQ,IAAIF,SAAS,CAACG,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AA;AAAA;AAAA,WACI;AAAK,UAAA,GAAG,EAAC,OAAT;AAAiB,UAAA,KAAK,EAAE+C,eAAxB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,UADJ,CADJ;AAKH;;AAjC8B;;AAoCnC,SAAK9D,cAAL,CAAoBC,KAApB;AAEA,WAAO,oBAAC,UAAD;AACH,MAAA,KAAK,EAAEmD,KADJ;AAEH,MAAA,OAAO,EAAEnB,OAFN;AAGH,MAAA,eAAe,EAAE,KAAK/B,KAAL,CAAW2D,eAHzB;AAIH,MAAA,iBAAiB,EAAE,KAAK3D,KAAL,CAAWK,iBAJ3B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAAP;AAOH;;AAtJkC;;AAoKvC,MAAMuD,eAAe,GAAG;AACpBC,EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,eAAehE,cAAf","sourcesContent":["import React, { Component } from \"react\";\n// import vis from \"vis-network\";\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis-network\";\n\nclass GraphNativeRep extends Component {\n\n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true\n }else if (nextProps.data && this.props.data && (nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp)){\n console.log(\"Rerendering\")\n return true;\n }else if (nextProps.loadingGraph !== this.props.loadingGraph){\n return true; \n }else{\n return false;\n }\n }\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n updateVisNodes = (nodes) => {\n this.props.setVisData(nodes);\n }\n\n\n\n render () {\n if (this.props.loadingGraph) return ;\n if (this.props.data == null){\n return (\n
\n

Press Show Graph to see the graph representation of the experiment.

\n

If the experiment is running, press Start Job Monitor to start a live tracker of the changes on the experiment's jobs.\n This process will automatically update the graph's nodes colors and show a log of the detected changes.\n

\n
\n );\n }\n\n var nodes_array = [];\n var edges_array = [];\n \n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: { background: node.status_color, border: \"black\" },\n level: node.level,\n })\n );\n \n this.props.data.edges.map(edge => \n edges_array.push({ from: edge.from, to: edge.to })\n );\n }\n \n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n\n\n const options = {\n edges: {\n arrows: {\n to: { enabled: true }\n }\n },\n layout: {\n //improvedLayout: true,\n hierarchical: {\n nodeSpacing: 190,\n blockShifting: false,\n edgeMinimization: false,\n parentCentralization: true,\n sortMethod: 'hubsize',\n direction: 'UD',\n // work on vis current version\n // nodeSpacing: 190,\n // blockShifting: false,\n // edgeMinimization: false,\n // parentCentralization: true,\n // sortMethod: 'hubsize',\n // direction: 'UD',\n }\n }, \n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true,\n },\n physics: {\n enabled: false,\n },\n nodes: {\n shape: 'dot',\n font: {\n size: 10,\n },\n }\n };\n \n const graph = {\n nodes : nodes,\n edges : edges,\n };\n\n class VisNetwork extends Component {\n \n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true;\n } else {\n return false;\n }\n }\n \n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", (params) => {\n //console.log(params);\n if (params.nodes){\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n \n });\n }\n \n // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n \n render() { \n return (\n
\n
\n
\n );\n }\n }\n\n this.updateVisNodes(nodes);\n \n return ;\n\n }\n\n\n \n\n \n\n \n \n\n \n\n}\n\nconst experimentStyle = {\n height: 600\n };\n\nexport default GraphNativeRep;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/986a8eabfafc73258005ca03c53af915.json b/node_modules/.cache/babel-loader/986a8eabfafc73258005ca03c53af915.json new file mode 100644 index 0000000000000000000000000000000000000000..86e1f5536b259ee6aeefb1a82e3ffb10c0d22146 --- /dev/null +++ b/node_modules/.cache/babel-loader/986a8eabfafc73258005ca03c53af915.json @@ -0,0 +1 @@ +{"ast":null,"code":"export const SEARCH_EXPERIMENTS = 'SEARCH_EXPERIMENTS';\nexport const GET_EXPERIMENT = 'GET_EXPERIMENT';\nexport const CLEAR_EXPERIMENTS = 'CLEAR_EXPERIMENTS';\nexport const SET_LOADING = 'SET_LOADING';\nexport const SET_LOADING_GRAPH = 'SET_LOADING_GRAPH';\nexport const SET_ALERT = 'SET_ALERT';\nexport const REMOVE_ALERT = 'REMOVE_ALERT';\nexport const GET_GRAPH = 'GET_GRAPH';\nexport const CLEAN_GRAPH_DATA = 'CLEAN_GRAPH_DATA';\nexport const CLEAN_RUN_DATA = 'CLEAN_RUN_DATA';\nexport const UPDATE_SELECTION = 'UPDATE_SELECTION';\nexport const GET_EXPERIMENT_RUN = 'GET_EXPERIMENT_RUN';\nexport const SET_LOADING_RUN = 'SET_LOADING_RUN';\nexport const SET_AUTOUPDATE_RUN = 'SET_AUTOUPDATE_RUN';\nexport const GET_PKL_DATA = 'GET_PKL_DATA';\nexport const SET_LOADING_PKL = 'SET_LOADING_PKL';\nexport const UPDATE_NODES = 'UPDATE_NODES';\nexport const SHOULD_UPDATE_GRAPH = 'SHOULD_UPDATE_GRAPH';\nexport const SET_AUTOUPDATE_PKL = 'SET_AUTOUPDATE_PKL';\nexport const CLEAN_PKL_DATA = 'CLEAN_PKL_DATA';\nexport const SET_PKL_CHANGES = 'SET_PKL_CHANGES';\nexport const UPDATE_EXPERIMENT_TS = 'UPDATE_EXPERIMENT_TS';\nexport const SET_VIS_DATA = 'SET_VIS_DATA';","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/context/types.js"],"names":["SEARCH_EXPERIMENTS","GET_EXPERIMENT","CLEAR_EXPERIMENTS","SET_LOADING","SET_LOADING_GRAPH","SET_ALERT","REMOVE_ALERT","GET_GRAPH","CLEAN_GRAPH_DATA","CLEAN_RUN_DATA","UPDATE_SELECTION","GET_EXPERIMENT_RUN","SET_LOADING_RUN","SET_AUTOUPDATE_RUN","GET_PKL_DATA","SET_LOADING_PKL","UPDATE_NODES","SHOULD_UPDATE_GRAPH","SET_AUTOUPDATE_PKL","CLEAN_PKL_DATA","SET_PKL_CHANGES","UPDATE_EXPERIMENT_TS","SET_VIS_DATA"],"mappings":"AAAA,OAAO,MAAMA,kBAAkB,GAAG,oBAA3B;AACP,OAAO,MAAMC,cAAc,GAAG,gBAAvB;AACP,OAAO,MAAMC,iBAAiB,GAAG,mBAA1B;AACP,OAAO,MAAMC,WAAW,GAAG,aAApB;AACP,OAAO,MAAMC,iBAAiB,GAAG,mBAA1B;AACP,OAAO,MAAMC,SAAS,GAAG,WAAlB;AACP,OAAO,MAAMC,YAAY,GAAG,cAArB;AACP,OAAO,MAAMC,SAAS,GAAG,WAAlB;AACP,OAAO,MAAMC,gBAAgB,GAAG,kBAAzB;AACP,OAAO,MAAMC,cAAc,GAAG,gBAAvB;AACP,OAAO,MAAMC,gBAAgB,GAAG,kBAAzB;AACP,OAAO,MAAMC,kBAAkB,GAAG,oBAA3B;AACP,OAAO,MAAMC,eAAe,GAAG,iBAAxB;AACP,OAAO,MAAMC,kBAAkB,GAAG,oBAA3B;AACP,OAAO,MAAMC,YAAY,GAAG,cAArB;AACP,OAAO,MAAMC,eAAe,GAAG,iBAAxB;AACP,OAAO,MAAMC,YAAY,GAAG,cAArB;AACP,OAAO,MAAMC,mBAAmB,GAAG,qBAA5B;AACP,OAAO,MAAMC,kBAAkB,GAAG,oBAA3B;AACP,OAAO,MAAMC,cAAc,GAAG,gBAAvB;AACP,OAAO,MAAMC,eAAe,GAAG,iBAAxB;AACP,OAAO,MAAMC,oBAAoB,GAAG,sBAA7B;AACP,OAAO,MAAMC,YAAY,GAAG,cAArB","sourcesContent":["export const SEARCH_EXPERIMENTS = 'SEARCH_EXPERIMENTS';\nexport const GET_EXPERIMENT = 'GET_EXPERIMENT';\nexport const CLEAR_EXPERIMENTS = 'CLEAR_EXPERIMENTS';\nexport const SET_LOADING = 'SET_LOADING';\nexport const SET_LOADING_GRAPH = 'SET_LOADING_GRAPH';\nexport const SET_ALERT = 'SET_ALERT';\nexport const REMOVE_ALERT = 'REMOVE_ALERT';\nexport const GET_GRAPH = 'GET_GRAPH';\nexport const CLEAN_GRAPH_DATA = 'CLEAN_GRAPH_DATA';\nexport const CLEAN_RUN_DATA = 'CLEAN_RUN_DATA';\nexport const UPDATE_SELECTION = 'UPDATE_SELECTION';\nexport const GET_EXPERIMENT_RUN = 'GET_EXPERIMENT_RUN';\nexport const SET_LOADING_RUN = 'SET_LOADING_RUN';\nexport const SET_AUTOUPDATE_RUN = 'SET_AUTOUPDATE_RUN';\nexport const GET_PKL_DATA = 'GET_PKL_DATA';\nexport const SET_LOADING_PKL = 'SET_LOADING_PKL';\nexport const UPDATE_NODES = 'UPDATE_NODES';\nexport const SHOULD_UPDATE_GRAPH = 'SHOULD_UPDATE_GRAPH';\nexport const SET_AUTOUPDATE_PKL = 'SET_AUTOUPDATE_PKL';\nexport const CLEAN_PKL_DATA = 'CLEAN_PKL_DATA';\nexport const SET_PKL_CHANGES = 'SET_PKL_CHANGES';\nexport const UPDATE_EXPERIMENT_TS = 'UPDATE_EXPERIMENT_TS';\nexport const SET_VIS_DATA = 'SET_VIS_DATA';"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/9bc423840092ce73b41412927b0e8877.json b/node_modules/.cache/babel-loader/9bc423840092ce73b41412927b0e8877.json new file mode 100644 index 0000000000000000000000000000000000000000..1a3a10a7b3a9e64c31d4aadbc4b1f1b423481b68 --- /dev/null +++ b/node_modules/.cache/babel-loader/9bc423840092ce73b41412927b0e8877.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/Selection.js\";\nimport React, { useContext, Fragment } from 'react';\nimport ExperimentContext from '../context/experiment/experimentContext';\n\nconst Selection = () => {\n const experimentContext = useContext(ExperimentContext);\n const selection = experimentContext.selection,\n data = experimentContext.data,\n experiment = experimentContext.experiment; // const { model, branch, hpc } = experiment;\n //var currentSelection = \"Node: \"\n\n var currentNode = \"\";\n var selectedNode = null;\n\n if (selection) {\n //console.log(\"Current selection \" + selection)\n selection.map(node => // currentSelection += node + \", \"\n currentNode = node); //console.log(\"Current node \" + currentNode)\n\n selectedNode = data.nodes.find(node => node.id === currentNode); //console.log(\"Selected node\")\n //console.log(\"Data: \" + selectedNode.id + \" \" + selectedNode.platform_name)\n }\n\n return React.createElement(Fragment, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 23\n },\n __self: this\n }, selectedNode && React.createElement(Fragment, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 25\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 26\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-12\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 27\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"card text-white bg-info\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 28\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"card-header text-center py-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 29\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 30\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 30\n },\n __self: this\n }, selectedNode.id))), React.createElement(\"div\", {\n className: \"card-body py-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 32\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 33\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 34\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 34\n },\n __self: this\n }, \"Date:\"), \" \", selectedNode.date)), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-8\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 38\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 39\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 39\n },\n __self: this\n }, \"Section:\"), \" \", selectedNode.section)), React.createElement(\"div\", {\n className: \"col-4 text-right\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 41\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 42\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 42\n },\n __self: this\n }, \"c:\", data.max_children, \"/p:\", data.max_parents))))), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 46\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 47\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 47\n },\n __self: this\n }, \"Platform:\"), \" \", selectedNode.platform_name && selectedNode.platform_name, \" \", !selectedNode.platform_name && experiment.hpc)), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 49\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 50\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 50\n },\n __self: this\n }, \"Priority:\"), \" \", selectedNode.priority)), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 52\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 53\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-6\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 54\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 55\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 55\n },\n __self: this\n }, \"Processors:\"), \" \", selectedNode.processors)), React.createElement(\"div\", {\n className: \"col-6\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 57\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 58\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 58\n },\n __self: this\n }, \"Wallclock:\"), \" \", selectedNode.wallclock)))), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 62\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 63\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-6\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 64\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 65\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 65\n },\n __self: this\n }, \"Level:\"), \" \", selectedNode.level)), React.createElement(\"div\", {\n className: \"col-6\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 67\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 68\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 68\n },\n __self: this\n }, \"Out:\"), \" \", selectedNode.children, \" \", React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 68\n },\n __self: this\n }, \"In:\"), \" \", selectedNode.parents, \" \")))), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 73\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 74\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 74\n },\n __self: this\n }, \"Status:\")), \" \", selectedNode.status)))))), !selectedNode && data && React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 85\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-12\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 86\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"card text-white bg-info\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 87\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"card-header text-center py-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 88\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 89\n },\n __self: this\n }, \"Here goes the Job Id\")), React.createElement(\"div\", {\n className: \"card-body\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 91\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"text-center\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 92\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 93\n },\n __self: this\n }, \"Select a Node to see more information.\")))))));\n};\n\nconst experimentStyle = {\n height: 200\n};\nexport default Selection;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/Selection.js"],"names":["React","useContext","Fragment","ExperimentContext","Selection","experimentContext","selection","data","experiment","currentNode","selectedNode","map","node","nodes","find","id","experimentStyle","date","section","max_children","max_parents","platform_name","hpc","priority","processors","wallclock","level","children","parents","status","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,UAAhB,EAA4BC,QAA5B,QAA4C,OAA5C;AACA,OAAOC,iBAAP,MAA8B,yCAA9B;;AAEA,MAAMC,SAAS,GAAG,MAAM;AACpB,QAAMC,iBAAiB,GAAGJ,UAAU,CAACE,iBAAD,CAApC;AADoB,QAEZG,SAFY,GAEoBD,iBAFpB,CAEZC,SAFY;AAAA,QAEDC,IAFC,GAEoBF,iBAFpB,CAEDE,IAFC;AAAA,QAEKC,UAFL,GAEoBH,iBAFpB,CAEKG,UAFL,EAGpB;AACA;;AACA,MAAIC,WAAW,GAAG,EAAlB;AACA,MAAIC,YAAY,GAAG,IAAnB;;AACA,MAAIJ,SAAJ,EAAe;AACX;AACAA,IAAAA,SAAS,CAACK,GAAV,CAAcC,IAAI,IACd;AACAH,IAAAA,WAAW,GAAGG,IAFlB,EAFW,CAMX;;AACAF,IAAAA,YAAY,GAAGH,IAAI,CAACM,KAAL,CAAWC,IAAX,CAAgBF,IAAI,IAAIA,IAAI,CAACG,EAAL,KAAYN,WAApC,CAAf,CAPW,CAQX;AACA;AACH;;AACD,SACI,oBAAC,QAAD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACSC,YAAY,IACb,oBAAC,QAAD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACK;AAAK,IAAA,SAAS,EAAC,KAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACI;AAAK,IAAA,SAAS,EAAC,QAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACG;AAAK,IAAA,SAAS,EAAC,yBAAf;AAAyC,IAAA,KAAK,EAAEM,eAAhD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACI;AAAK,IAAA,SAAS,EAAC,8BAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACI;AAAA;AAAA;AAAA;AA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Y,CAACkB,OAAxF,MADJ,CAJJ,CADJ,CA9BJ,EAyCI;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACI;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,eAAP,CADJ,OAC6ClB,YAAY,CAACmB,MAD1D,CAzCJ,CAJJ,CADH,CADJ,CADL,CAFR,EA6DS,CAACnB,YAAD,IAAiBH,IAAjB,IACG;AAAK,IAAA,SAAS,EAAC,KAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACI;AAAK,IAAA,SAAS,EAAC,QAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACI;AAAK,IAAA,SAAS,EAAC,yBAAf;AAAyC,IAAA,KAAK,EAAES,eAAhD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACI;AAAK,IAAA,SAAS,EAAC,8BAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACI;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,4BADJ,CADJ,EAII;AAAK,IAAA,SAAS,EAAC,WAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACI;AAAK,IAAA,SAAS,EAAC,aAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,8CADA,CADJ,CAJJ,CADJ,CADJ,CA9DZ,CADJ;AAmFH,CArGD;;AAuGA,MAAMA,eAAe,GAAG;AACpBc,EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,eAAe1B,SAAf","sourcesContent":["import React, { useContext, Fragment } from 'react'\nimport ExperimentContext from '../context/experiment/experimentContext';\n\nconst Selection = () => {\n const experimentContext = useContext(ExperimentContext);\n const { selection, data, experiment } = experimentContext;\n // const { model, branch, hpc } = experiment;\n //var currentSelection = \"Node: \"\n var currentNode = \"\"\n var selectedNode = null\n if (selection) {\n //console.log(\"Current selection \" + selection)\n selection.map(node => (\n // currentSelection += node + \", \"\n currentNode = node\n ));\n //console.log(\"Current node \" + currentNode)\n selectedNode = data.nodes.find(node => node.id === currentNode) \n //console.log(\"Selected node\")\n //console.log(\"Data: \" + selectedNode.id + \" \" + selectedNode.platform_name)\n } \n return (\n \n {selectedNode &&\n \n
\n
\n
\n
\n {selectedNode.id}\n
\n
\n
\n Date: {selectedNode.date}\n
\n
\n
\n
\n Section: {selectedNode.section}\n
\n
\n c:{data.max_children}/p:{data.max_parents}\n
\n
\n
\n
\n Platform: {selectedNode.platform_name && selectedNode.platform_name} {!selectedNode.platform_name && experiment.hpc}\n
\n
\n Priority: {selectedNode.priority}\n
\n
\n
\n
\n Processors: {selectedNode.processors}\n
\n
\n Wallclock: {selectedNode.wallclock}\n
\n
\n
\n
\n
\n
\n Level: {selectedNode.level}\n
\n
\n Out: {selectedNode.children} In: {selectedNode.parents} \n
\n \n
\n
\n
\n Status: {selectedNode.status}\n
\n \n \n
\n
\n
\n
\n
\n } \n {!selectedNode && data &&\n
\n
\n
\n
\n Here goes the Job Id\n
\n
\n
\n Select a Node to see more information. \n
\n
\n
\n
\n
\n } \n
\n \n \n\n )\n}\n\nconst experimentStyle = {\n height: 200\n };\n\nexport default Selection;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/9c071654751195f66253f3d0adc092bd.json b/node_modules/.cache/babel-loader/9c071654751195f66253f3d0adc092bd.json new file mode 100644 index 0000000000000000000000000000000000000000..d7e61689baa62d1a48e27e3656f56d56d2ba0f07 --- /dev/null +++ b/node_modules/.cache/babel-loader/9c071654751195f66253f3d0adc092bd.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js\";\nimport React, { Component } from \"react\"; // import vis from \"vis-network\";\n\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n constructor(...args) {\n super(...args);\n\n this.updateVisNodes = nodes => {\n this.props.setVisData(nodes);\n };\n }\n\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else if (nextProps.data && this.props.data && nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp) {\n console.log(\"Rerendering\");\n return true;\n } else if (nextProps.loadingGraph !== this.props.loadingGraph) {\n return true;\n } else {\n return false;\n }\n }\n\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n render() {\n if (this.props.loadingGraph) return React.createElement(Spinner, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 32\n },\n __self: this\n });\n\n if (this.props.data == null) {\n return React.createElement(\"div\", {\n className: \"card-body text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 35\n },\n __self: this\n }, React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Press \", React.createElement(\"span\", {\n className: \"badge badge-info\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Show Graph\"), \" to see the graph representation of the experiment.\"), React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"If the experiment is running, press \", React.createElement(\"span\", {\n className: \"badge badge-dark\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"Start Job Monitor\"), \" to start a live tracker of the changes on the experiment's jobs. This process will automatically update the graph's nodes colors and show a log of the detected changes.\"));\n }\n\n var nodes_array = [];\n var edges_array = [];\n\n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: {\n background: node.status_color,\n border: \"black\"\n },\n level: node.level\n }));\n this.props.data.edges.map(edge => edges_array.push({\n from: edge.from,\n to: edge.to\n }));\n }\n\n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n const options = {\n edges: {\n arrows: {\n to: {\n enabled: true\n }\n }\n },\n layout: {\n //improvedLayout: true,\n hierarchical: {\n // enabled: true,\n //nodeSpacing: 250,\n //edgeMinimization: true,\n parentCentralization: true,\n direction: 'UD',\n sortMethod: 'directed'\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true\n },\n physics: {\n enabled: false\n },\n nodes: {\n shape: 'dot'\n }\n };\n const graph = {\n nodes: nodes,\n edges: edges\n };\n\n class VisNetwork extends Component {\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else {\n return false;\n }\n }\n\n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", params => {\n //console.log(params);\n if (params.nodes) {\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n });\n } // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n\n\n render() {\n return React.createElement(\"div\", {\n className: \"card-body p-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 130\n },\n __self: this\n }, React.createElement(\"div\", {\n ref: \"myRef\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 131\n },\n __self: this\n }));\n }\n\n }\n\n this.updateVisNodes(nodes);\n return React.createElement(VisNetwork, {\n graph: graph,\n options: options,\n updateSelection: this.props.updateSelection,\n shouldUpdateGraph: this.props.shouldUpdateGraph,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 139\n },\n __self: this\n });\n }\n\n}\n\nconst experimentStyle = {\n height: 600\n};\nexport default GraphNativeRep;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js"],"names":["React","Component","Spinner","vis","GraphNativeRep","updateVisNodes","nodes","props","setVisData","shouldComponentUpdate","nextProps","nextState","shouldUpdateGraph","data","pkl_timestamp","console","log","loadingGraph","componentWillUnmount","cleanGraphData","render","nodes_array","edges_array","edges","map","node","push","id","label","color","background","status_color","border","level","edge","from","to","DataSet","options","arrows","enabled","layout","hierarchical","parentCentralization","direction","sortMethod","interaction","dragNodes","hoverConnectedEdges","navigationButtons","physics","shape","graph","VisNetwork","componentDidMount","network","Network","refs","myRef","on","params","updateSelection","experimentStyle","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,SAAhB,QAAiC,OAAjC,C,CACA;;AACA,OAAOC,OAAP,MAAoB,mBAApB;AACA,OAAOC,GAAP,MAAgB,KAAhB;;AAEA,MAAMC,cAAN,SAA6BH,SAA7B,CAAuC;AAAA;AAAA;;AAAA,SAmBnCI,cAnBmC,GAmBjBC,KAAD,IAAW;AACxB,WAAKC,KAAL,CAAWC,UAAX,CAAsBF,KAAtB;AACH,KArBkC;AAAA;;AAEnCG,EAAAA,qBAAqB,CAACC,SAAD,EAAYC,SAAZ,EAAsB;AACvC,QAAI,KAAKJ,KAAL,CAAWK,iBAAX,KAAiC,IAArC,EAA0C;AACtC,aAAO,IAAP;AACD,KAFH,MAEQ,IAAIF,SAAS,CAACG,IAAV,IAAkB,KAAKN,KAAL,CAAWM,IAA7B,IAAsCH,SAAS,CAACG,IAAV,CAAeC,aAAf,KAAiC,KAAKP,KAAL,CAAWM,IAAX,CAAgBC,aAA3F,EAA0G;AAC9GC,MAAAA,OAAO,CAACC,GAAR,CAAY,aAAZ;AACA,aAAO,IAAP;AACD,KAHK,MAGA,IAAIN,SAAS,CAACO,YAAV,KAA2B,KAAKV,KAAL,CAAWU,YAA1C,EAAuD;AAC3D,aAAO,IAAP;AACD,KAFK,MAED;AACH,aAAO,KAAP;AACD;AACN;;AACDC,EAAAA,oBAAoB,GAAG;AACnBH,IAAAA,OAAO,CAACC,GAAR,CAAY,YAAZ;AACA,SAAKT,KAAL,CAAWY,cAAX;AACH;;AAQDC,EAAAA,MAAM,GAAI;AACN,QAAI,KAAKb,KAAL,CAAWU,YAA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;;AAED0C,MAAAA,iBAAiB,GAAG;AAChB,YAAIC,OAAO,GAAG,IAAIpD,GAAG,CAACqD,OAAR,CAAgB,KAAKC,IAAL,CAAUC,KAA1B,EAAiC,KAAKnD,KAAL,CAAW6C,KAA5C,EAAmD,KAAK7C,KAAL,CAAW+B,OAA9D,CAAd;AACAiB,QAAAA,OAAO,CAACI,EAAR,CAAW,OAAX,EAAqBC,MAAD,IAAY;AAC5B;AACA,cAAIA,MAAM,CAACtD,KAAX,EAAiB;AACb;AACA,iBAAKC,KAAL,CAAWsD,eAAX,CAA2BD,MAAM,CAACtD,KAAlC;AACH;AAEJ,SAPD;AAQH,OApB8B,CAsB/B;AACA;AACA;AACA;;;AAEAc,MAAAA,MAAM,GAAG;AACL,eACI;AAAK,UAAA,SAAS,EAAC,eAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,WACI;AAAK,UAAA,GAAG,EAAC,OAAT;AAAiB,UAAA,KAAK,EAAE0C,eAAxB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,UADJ,CADJ;AAKH;;AAjC8B;;AAoCnC,SAAKzD,cAAL,CAAoBC,KAApB;AAEA,WAAO,oBAAC,UAAD;AACH,MAAA,KAAK,EAAE8C,KADJ;AAEH,MAAA,OAAO,EAAEd,OAFN;AAGH,MAAA,eAAe,EAAE,KAAK/B,KAAL,CAAWsD,eAHzB;AAIH,MAAA,iBAAiB,EAAE,KAAKtD,KAAL,CAAWK,iBAJ3B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAAP;AAOH;;AA5IkC;;AA0JvC,MAAMkD,eAAe,GAAG;AACpBC,EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,eAAe3D,cAAf","sourcesContent":["import React, { Component } from \"react\";\n// import vis from \"vis-network\";\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n\n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true\n }else if (nextProps.data && this.props.data && (nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp)){\n console.log(\"Rerendering\")\n return true;\n }else if (nextProps.loadingGraph !== this.props.loadingGraph){\n return true; \n }else{\n return false;\n }\n }\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n updateVisNodes = (nodes) => {\n this.props.setVisData(nodes);\n }\n\n\n\n render () {\n if (this.props.loadingGraph) return ;\n if (this.props.data == null){\n return (\n
\n

Press Show Graph to see the graph representation of the experiment.

\n

If the experiment is running, press Start Job Monitor to start a live tracker of the changes on the experiment's jobs.\n This process will automatically update the graph's nodes colors and show a log of the detected changes.\n

\n
\n );\n }\n\n var nodes_array = [];\n var edges_array = [];\n \n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: { background: node.status_color, border: \"black\" },\n level: node.level,\n })\n );\n \n this.props.data.edges.map(edge => \n edges_array.push({ from: edge.from, to: edge.to })\n );\n }\n \n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n\n\n const options = {\n edges: {\n arrows: {\n to: { enabled: true }\n }\n },\n layout: {\n //improvedLayout: true,\n hierarchical: {\n // enabled: true,\n //nodeSpacing: 250,\n //edgeMinimization: true,\n parentCentralization: true,\n direction: 'UD',\n sortMethod: 'directed',\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true,\n },\n physics: {\n enabled: false,\n },\n nodes: {\n shape: 'dot',\n }\n };\n \n const graph = {\n nodes : nodes,\n edges : edges,\n };\n\n class VisNetwork extends Component {\n \n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true;\n } else {\n return false;\n }\n }\n \n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", (params) => {\n //console.log(params);\n if (params.nodes){\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n \n });\n }\n \n // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n \n render() { \n return (\n
\n
\n
\n );\n }\n }\n\n this.updateVisNodes(nodes);\n \n return ;\n\n }\n\n\n \n\n \n\n \n \n\n \n\n}\n\nconst experimentStyle = {\n height: 600\n };\n\nexport default GraphNativeRep;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/9dac97997a0c54f957a1d48fbd72d898.json b/node_modules/.cache/babel-loader/9dac97997a0c54f957a1d48fbd72d898.json new file mode 100644 index 0000000000000000000000000000000000000000..f4ba3ad8ab43c28377b1f051d1787dc7ad66607e --- /dev/null +++ b/node_modules/.cache/babel-loader/9dac97997a0c54f957a1d48fbd72d898.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js\";\nimport React, { Component } from \"react\"; // import vis from \"vis-network\";\n\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n constructor(...args) {\n super(...args);\n\n this.updateVisNodes = nodes => {\n this.props.setVisData(nodes);\n };\n }\n\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else if (nextProps.data && this.props.data && nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp) {\n console.log(\"Rerendering\");\n return true;\n } else if (nextProps.loadingGraph !== this.props.loadingGraph) {\n return true;\n } else {\n return false;\n }\n }\n\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n render() {\n if (this.props.loadingGraph) return React.createElement(Spinner, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 32\n },\n __self: this\n });\n\n if (this.props.data == null) {\n return React.createElement(\"div\", {\n className: \"card-body text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 35\n },\n __self: this\n }, React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Press \", React.createElement(\"span\", {\n className: \"badge badge-info\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Show Graph\"), \" to see the graph representation of the experiment.\"), React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"If the experiment is running, press \", React.createElement(\"span\", {\n className: \"badge badge-dark\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"Start Job Monitor\"), \" to start a live tracker of the changes on the experiment's jobs. This process will automatically update the graph's nodes colors and show a log of the detected changes.\"));\n }\n\n var nodes_array = [];\n var edges_array = [];\n\n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: {\n background: node.status_color,\n border: \"black\"\n },\n level: node.level\n }));\n this.props.data.edges.map(edge => edges_array.push({\n from: edge.from,\n to: edge.to\n }));\n }\n\n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n const options = {\n edges: {\n arrows: {\n to: {\n enabled: true\n }\n }\n },\n layout: {\n //improvedLayout: true,\n hierarchical: {\n // enabled: true,\n nodeSpacing: 250,\n edgeMinimization: true,\n parentCentralization: true,\n direction: 'UD'\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true\n },\n physics: {\n enabled: false\n },\n nodes: {\n shape: 'dot'\n }\n };\n const graph = {\n nodes: nodes,\n edges: edges\n };\n\n class VisNetwork extends Component {\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else {\n return false;\n }\n }\n\n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", params => {\n console.log(params);\n\n if (params.nodes) {\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n });\n } // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n\n\n render() {\n return React.createElement(\"div\", {\n className: \"card-body p-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 129\n },\n __self: this\n }, React.createElement(\"div\", {\n ref: \"myRef\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 130\n },\n __self: this\n }));\n }\n\n }\n\n this.updateVisNodes(nodes);\n return React.createElement(VisNetwork, {\n graph: graph,\n options: options,\n updateSelection: this.props.updateSelection,\n shouldUpdateGraph: this.props.shouldUpdateGraph,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 138\n },\n __self: this\n });\n }\n\n}\n\nconst experimentStyle = {\n height: 600\n};\nexport default GraphNativeRep;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js"],"names":["React","Component","Spinner","vis","GraphNativeRep","updateVisNodes","nodes","props","setVisData","shouldComponentUpdate","nextProps","nextState","shouldUpdateGraph","data","pkl_timestamp","console","log","loadingGraph","componentWillUnmount","cleanGraphData","render","nodes_array","edges_array","edges","map","node","push","id","label","color","background","status_color","border","level","edge","from","to","DataSet","options","arrows","enabled","layout","hierarchical","nodeSpacing","edgeMinimization","parentCentralization","direction","interaction","dragNodes","hoverConnectedEdges","navigationButtons","physics","shape","graph","VisNetwork","componentDidMount","network","Network","refs","myRef","on","params","updateSelection","experimentStyle","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,SAAhB,QAAiC,OAAjC,C,CACA;;AACA,OAAOC,OAAP,MAAoB,mBAApB;AACA,OAAOC,GAAP,MAAgB,KAAhB;;AAEA,MAAMC,cAAN,SAA6BH,SAA7B,CAAuC;AAAA;AAAA;;AAAA,SAmBnCI,cAnBmC,GAmBjBC,KAAD,IAAW;AACxB,WAAKC,KAAL,CAAWC,UAAX,CAAsBF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c,MAAAA,MAAM,GAAG;AACL,eACI;AAAK,UAAA,SAAS,EAAC,eAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,WACI;AAAK,UAAA,GAAG,EAAC,OAAT;AAAiB,UAAA,KAAK,EAAE2C,eAAxB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,UADJ,CADJ;AAKH;;AAjC8B;;AAoCnC,SAAK1D,cAAL,CAAoBC,KAApB;AAEA,WAAO,oBAAC,UAAD;AACH,MAAA,KAAK,EAAE+C,KADJ;AAEH,MAAA,OAAO,EAAEf,OAFN;AAGH,MAAA,eAAe,EAAE,KAAK/B,KAAL,CAAWuD,eAHzB;AAIH,MAAA,iBAAiB,EAAE,KAAKvD,KAAL,CAAWK,iBAJ3B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAAP;AAOH;;AA3IkC;;AAyJvC,MAAMmD,eAAe,GAAG;AACpBC,EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,eAAe5D,cAAf","sourcesContent":["import React, { Component } from \"react\";\n// import vis from \"vis-network\";\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n\n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true\n }else if (nextProps.data && this.props.data && (nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp)){\n console.log(\"Rerendering\")\n return true;\n }else if (nextProps.loadingGraph !== this.props.loadingGraph){\n return true; \n }else{\n return false;\n }\n }\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n updateVisNodes = (nodes) => {\n this.props.setVisData(nodes);\n }\n\n\n\n render () {\n if (this.props.loadingGraph) return ;\n if (this.props.data == null){\n return (\n
\n

Press Show Graph to see the graph representation of the experiment.

\n

If the experiment is running, press Start Job Monitor to start a live tracker of the changes on the experiment's jobs.\n This process will automatically update the graph's nodes colors and show a log of the detected changes.\n

\n
\n );\n }\n\n var nodes_array = [];\n var edges_array = [];\n \n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: { background: node.status_color, border: \"black\" },\n level: node.level,\n })\n );\n \n this.props.data.edges.map(edge => \n edges_array.push({ from: edge.from, to: edge.to })\n );\n }\n \n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n\n\n const options = {\n edges: {\n arrows: {\n to: { enabled: true }\n }\n },\n layout: {\n //improvedLayout: true,\n hierarchical: {\n // enabled: true,\n nodeSpacing: 250,\n edgeMinimization: true,\n parentCentralization: true,\n direction: 'UD',\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true,\n },\n physics: {\n enabled: false,\n },\n nodes: {\n shape: 'dot',\n }\n };\n \n const graph = {\n nodes : nodes,\n edges : edges,\n };\n\n class VisNetwork extends Component {\n \n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true;\n } else {\n return false;\n }\n }\n \n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", (params) => {\n console.log(params);\n if (params.nodes){\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n \n });\n }\n \n // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n \n render() { \n return (\n
\n
\n
\n );\n }\n }\n\n this.updateVisNodes(nodes);\n \n return ;\n\n }\n\n\n \n\n \n\n \n \n\n \n\n}\n\nconst experimentStyle = {\n height: 600\n };\n\nexport default GraphNativeRep;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/9dbe3816eb44ef8ce367b160632d30fe.json b/node_modules/.cache/babel-loader/9dbe3816eb44ef8ce367b160632d30fe.json new file mode 100644 index 0000000000000000000000000000000000000000..b367528ecee611d8f91f209e48f92379aea8ba18 --- /dev/null +++ b/node_modules/.cache/babel-loader/9dbe3816eb44ef8ce367b160632d30fe.json @@ -0,0 +1 @@ +{"ast":null,"code":"/**\n * vis.js\n * https://github.com/almende/vis\n *\n * A dynamic, browser-based visualization library.\n *\n * @version 4.19.1\n * @date 2017-03-19\n *\n * @license\n * Copyright (C) 2011-2017 Almende B.V, http://almende.com\n *\n * Vis.js is dual licensed under both\n *\n * * The Apache 2.0 License\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * and\n *\n * * The MIT License\n * http://opensource.org/licenses/MIT\n *\n * Vis.js may be distributed under either license.\n */\n\"use strict\";\n\n(function webpackUniversalModuleDefinition(root, factory) {\n if (typeof exports === 'object' && typeof module === 'object') module.exports = factory();else if (typeof define === 'function' && define.amd) define([], factory);else if (typeof exports === 'object') exports[\"vis\"] = factory();else root[\"vis\"] = factory();\n})(this, function () {\n return (\n /******/\n function (modules) {\n // webpackBootstrap\n\n /******/\n // The module cache\n\n /******/\n var installedModules = {};\n /******/\n // The require function\n\n /******/\n\n function __webpack_require__(moduleId) {\n /******/\n // Check if module is in cache\n\n /******/\n if (installedModules[moduleId])\n /******/\n return installedModules[moduleId].exports;\n /******/\n // Create a new module (and put it into the cache)\n\n /******/\n\n var module = installedModules[moduleId] = {\n /******/\n exports: {},\n\n /******/\n id: moduleId,\n\n /******/\n loaded: false\n /******/\n\n };\n /******/\n // Execute the module function\n\n /******/\n\n modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n /******/\n // Flag the module as loaded\n\n /******/\n\n module.loaded = true;\n /******/\n // Return the exports of the module\n\n /******/\n\n return module.exports;\n /******/\n }\n /******/\n // expose the modules object (__webpack_modules__)\n\n /******/\n\n\n __webpack_require__.m = modules;\n /******/\n // expose the module cache\n\n /******/\n\n __webpack_require__.c = installedModules;\n /******/\n // __webpack_public_path__\n\n /******/\n\n __webpack_require__.p = \"\";\n /******/\n // Load entry module and return exports\n\n /******/\n\n return __webpack_require__(0);\n /******/\n }(\n /************************************************************************/\n\n /******/\n [\n /* 0 */\n\n /***/\n function (module, exports, __webpack_require__) {\n 'use strict';\n\n var util = __webpack_require__(1); // Graph3d\n\n\n util.extend(exports, __webpack_require__(87)); // Timeline & Graph2d\n\n util.extend(exports, __webpack_require__(116)); // Network\n\n util.extend(exports, __webpack_require__(158));\n /***/\n },\n /* 1 */\n\n /***/\n function (module, exports, __webpack_require__) {\n 'use strict';\n\n var _getIterator2 = __webpack_require__(2);\n\n var _getIterator3 = _interopRequireDefault(_getIterator2);\n\n var _create = __webpack_require__(55);\n\n var _create2 = _interopRequireDefault(_create);\n\n var _keys = __webpack_require__(58);\n\n var _keys2 = _interopRequireDefault(_keys);\n\n var _typeof2 = __webpack_require__(62);\n\n var _typeof3 = _interopRequireDefault(_typeof2);\n\n function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n 'default': obj\n };\n } // utility functions\n // first check if moment.js is already loaded in the browser window, if so,\n // use this instance. Else, load via commonjs.\n\n\n var moment = __webpack_require__(82);\n\n var uuid = __webpack_require__(86);\n /**\n * Test whether given object is a number\n * @param {*} object\n * @return {Boolean} isNumber\n */\n\n\n exports.isNumber = function (object) {\n return object instanceof Number || typeof object == 'number';\n };\n /**\n * Remove everything in the DOM object\n * @param DOMobject\n */\n\n\n exports.recursiveDOMDelete = function (DOMobject) {\n if (DOMobject) {\n while (DOMobject.hasChildNodes() === true) {\n exports.recursiveDOMDelete(DOMobject.firstChild);\n DOMobject.removeChild(DOMobject.firstChild);\n }\n }\n };\n /**\n * this function gives you a range between 0 and 1 based on the min and max values in the set, the total sum of all values and the current value.\n *\n * @param min\n * @param max\n * @param total\n * @param value\n * @returns {number}\n */\n\n\n exports.giveRange = function (min, max, total, value) {\n if (max == min) {\n return 0.5;\n } else {\n var scale = 1 / (max - min);\n return Math.max(0, (value - min) * scale);\n }\n };\n /**\n * Test whether given object is a string\n * @param {*} object\n * @return {Boolean} isString\n */\n\n\n exports.isString = function (object) {\n return object instanceof String || typeof object == 'string';\n };\n /**\n * Test whether given object is a Date, or a String containing a Date\n * @param {Date | String} object\n * @return {Boolean} isDate\n */\n\n\n exports.isDate = function (object) {\n if (object instanceof Date) {\n return true;\n } else if (exports.isString(object)) {\n // test whether this string contains a date\n var match = ASPDateRegex.exec(object);\n\n if (match) {\n return true;\n } else if (!isNaN(Date.parse(object))) {\n return true;\n }\n }\n\n return false;\n };\n /**\n * Create a semi UUID\n * source: http://stackoverflow.com/a/105074/1262753\n * @return {String} uuid\n */\n\n\n exports.randomUUID = function () {\n return uuid.v4();\n };\n /**\n * assign all keys of an object that are not nested objects to a certain value (used for color objects).\n * @param obj\n * @param value\n */\n\n\n exports.assignAllKeys = function (obj, value) {\n for (var prop in obj) {\n if (obj.hasOwnProperty(prop)) {\n if ((0, _typeof3['default'])(obj[prop]) !== 'object') {\n obj[prop] = value;\n }\n }\n }\n };\n /**\n * Fill an object with a possibly partially defined other object. Only copies values if the a object has an object requiring values.\n * That means an object is not created on a property if only the b object has it.\n * @param obj\n * @param value\n */\n\n\n exports.fillIfDefined = function (a, b) {\n var allowDeletion = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n\n for (var prop in a) {\n if (b[prop] !== undefined) {\n if ((0, _typeof3['default'])(b[prop]) !== 'object') {\n if ((b[prop] === undefined || b[prop] === null) && a[prop] !== undefined && allowDeletion === true) {\n delete a[prop];\n } else {\n a[prop] = b[prop];\n }\n } else {\n if ((0, _typeof3['default'])(a[prop]) === 'object') {\n exports.fillIfDefined(a[prop], b[prop], allowDeletion);\n }\n }\n }\n }\n };\n /**\n * Extend object a with the properties of object b or a series of objects\n * Only properties with defined values are copied\n * @param {Object} a\n * @param {... Object} b\n * @return {Object} a\n */\n\n\n exports.protoExtend = function (a, b) {\n for (var i = 1; i < arguments.length; i++) {\n var other = arguments[i];\n\n for (var prop in other) {\n a[prop] = other[prop];\n }\n }\n\n return a;\n };\n /**\n * Extend object a with the properties of object b or a series of objects\n * Only properties with defined values are copied\n * @param {Object} a\n * @param {... Object} b\n * @return {Object} a\n */\n\n\n exports.extend = function (a, b) {\n for (var i = 1; i < arguments.length; i++) {\n var other = arguments[i];\n\n for (var prop in other) {\n if (other.hasOwnProperty(prop)) {\n a[prop] = other[prop];\n }\n }\n }\n\n return a;\n };\n /**\n * Extend object a with selected properties of object b or a series of objects\n * Only properties with defined values are copied\n * @param {Array.} props\n * @param {Object} a\n * @param {Object} b\n * @return {Object} a\n */\n\n\n exports.selectiveExtend = function (props, a, b) {\n if (!Array.isArray(props)) {\n throw new Error('Array with property names expected as first argument');\n }\n\n for (var i = 2; i < arguments.length; i++) {\n var other = arguments[i];\n\n for (var p = 0; p < props.length; p++) {\n var prop = props[p];\n\n if (other.hasOwnProperty(prop)) {\n a[prop] = other[prop];\n }\n }\n }\n\n return a;\n };\n /**\n * Extend object a with selected properties of object b or a series of objects\n * Only properties with defined values are copied\n * @param {Array.} props\n * @param {Object} a\n * @param {Object} b\n * @return {Object} a\n */\n\n\n exports.selectiveDeepExtend = function (props, a, b) {\n var allowDeletion = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false; // TODO: add support for Arrays to deepExtend\n\n if (Array.isArray(b)) {\n throw new TypeError('Arrays are not supported by deepExtend');\n }\n\n for (var i = 2; i < arguments.length; i++) {\n var other = arguments[i];\n\n for (var p = 0; p < props.length; p++) {\n var prop = props[p];\n\n if (other.hasOwnProperty(prop)) {\n if (b[prop] && b[prop].constructor === Object) {\n if (a[prop] === undefined) {\n a[prop] = {};\n }\n\n if (a[prop].constructor === Object) {\n exports.deepExtend(a[prop], b[prop], false, allowDeletion);\n } else {\n if (b[prop] === null && a[prop] !== undefined && allowDeletion === true) {\n delete a[prop];\n } else {\n a[prop] = b[prop];\n }\n }\n } else if (Array.isArray(b[prop])) {\n throw new TypeError('Arrays are not supported by deepExtend');\n } else {\n if (b[prop] === null && a[prop] !== undefined && allowDeletion === true) {\n delete a[prop];\n } else {\n a[prop] = b[prop];\n }\n }\n }\n }\n }\n\n return a;\n };\n /**\n * Extend object a with selected properties of object b or a series of objects\n * Only properties with defined values are copied\n * @param {Array.} props\n * @param {Object} a\n * @param {Object} b\n * @return {Object} a\n */\n\n\n exports.selectiveNotDeepExtend = function (props, a, b) {\n var allowDeletion = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false; // TODO: add support for Arrays to deepExtend\n\n if (Array.isArray(b)) {\n throw new TypeError('Arrays are not supported by deepExtend');\n }\n\n for (var prop in b) {\n if (b.hasOwnProperty(prop)) {\n if (props.indexOf(prop) == -1) {\n if (b[prop] && b[prop].constructor === Object) {\n if (a[prop] === undefined) {\n a[prop] = {};\n }\n\n if (a[prop].constructor === Object) {\n exports.deepExtend(a[prop], b[prop]);\n } else {\n if (b[prop] === null && a[prop] !== undefined && allowDeletion === true) {\n delete a[prop];\n } else {\n a[prop] = b[prop];\n }\n }\n } else if (Array.isArray(b[prop])) {\n a[prop] = [];\n\n for (var i = 0; i < b[prop].length; i++) {\n a[prop].push(b[prop][i]);\n }\n } else {\n if (b[prop] === null && a[prop] !== undefined && allowDeletion === true) {\n delete a[prop];\n } else {\n a[prop] = b[prop];\n }\n }\n }\n }\n }\n\n return a;\n };\n /**\n * Deep extend an object a with the properties of object b\n * @param {Object} a\n * @param {Object} b\n * @param [Boolean] protoExtend --> optional parameter. If true, the prototype values will also be extended.\n * (ie. the options objects that inherit from others will also get the inherited options)\n * @param [Boolean] global --> optional parameter. If true, the values of fields that are null will not deleted\n * @returns {Object}\n */\n\n\n exports.deepExtend = function (a, b, protoExtend, allowDeletion) {\n for (var prop in b) {\n if (b.hasOwnProperty(prop) || protoExtend === true) {\n if (b[prop] && b[prop].constructor === Object) {\n if (a[prop] === undefined) {\n a[prop] = {};\n }\n\n if (a[prop].constructor === Object) {\n exports.deepExtend(a[prop], b[prop], protoExtend);\n } else {\n if (b[prop] === null && a[prop] !== undefined && allowDeletion === true) {\n delete a[prop];\n } else {\n a[prop] = b[prop];\n }\n }\n } else if (Array.isArray(b[prop])) {\n a[prop] = [];\n\n for (var i = 0; i < b[prop].length; i++) {\n a[prop].push(b[prop][i]);\n }\n } else {\n if (b[prop] === null && a[prop] !== undefined && allowDeletion === true) {\n delete a[prop];\n } else {\n a[prop] = b[prop];\n }\n }\n }\n }\n\n return a;\n };\n /**\n * Test whether all elements in two arrays are equal.\n * @param {Array} a\n * @param {Array} b\n * @return {boolean} Returns true if both arrays have the same length and same\n * elements.\n */\n\n\n exports.equalArray = function (a, b) {\n if (a.length != b.length) return false;\n\n for (var i = 0, len = a.length; i < len; i++) {\n if (a[i] != b[i]) return false;\n }\n\n return true;\n };\n /**\n * Convert an object to another type\n * @param {Boolean | Number | String | Date | Moment | Null | undefined} object\n * @param {String | undefined} type Name of the type. Available types:\n * 'Boolean', 'Number', 'String',\n * 'Date', 'Moment', ISODate', 'ASPDate'.\n * @return {*} object\n * @throws Error\n */\n\n\n exports.convert = function (object, type) {\n var match;\n\n if (object === undefined) {\n return undefined;\n }\n\n if (object === null) {\n return null;\n }\n\n if (!type) {\n return object;\n }\n\n if (!(typeof type === 'string') && !(type instanceof String)) {\n throw new Error('Type must be a string');\n } //noinspection FallthroughInSwitchStatementJS\n\n\n switch (type) {\n case 'boolean':\n case 'Boolean':\n return Boolean(object);\n\n case 'number':\n case 'Number':\n if (exports.isString(object) && !isNaN(Date.parse(object))) {\n return moment(object).valueOf();\n } else {\n return Number(object.valueOf());\n }\n\n case 'string':\n case 'String':\n return String(object);\n\n case 'Date':\n if (exports.isNumber(object)) {\n return new Date(object);\n }\n\n if (object instanceof Date) {\n return new Date(object.valueOf());\n } else if (moment.isMoment(object)) {\n return new Date(object.valueOf());\n }\n\n if (exports.isString(object)) {\n match = ASPDateRegex.exec(object);\n\n if (match) {\n // object is an ASP date\n return new Date(Number(match[1])); // parse number\n } else {\n return moment(new Date(object)).toDate(); // parse string\n }\n } else {\n throw new Error('Cannot convert object of type ' + exports.getType(object) + ' to type Date');\n }\n\n case 'Moment':\n if (exports.isNumber(object)) {\n return moment(object);\n }\n\n if (object instanceof Date) {\n return moment(object.valueOf());\n } else if (moment.isMoment(object)) {\n return moment(object);\n }\n\n if (exports.isString(object)) {\n match = ASPDateRegex.exec(object);\n\n if (match) {\n // object is an ASP date\n return moment(Number(match[1])); // parse number\n } else {\n return moment(object); // parse string\n }\n } else {\n throw new Error('Cannot convert object of type ' + exports.getType(object) + ' to type Date');\n }\n\n case 'ISODate':\n if (exports.isNumber(object)) {\n return new Date(object);\n } else if (object instanceof Date) {\n return object.toISOString();\n } else if (moment.isMoment(object)) {\n return object.toDate().toISOString();\n } else if (exports.isString(object)) {\n match = ASPDateRegex.exec(object);\n\n if (match) {\n // object is an ASP date\n return new Date(Number(match[1])).toISOString(); // parse number\n } else {\n return moment(object).format(); // ISO 8601\n }\n } else {\n throw new Error('Cannot convert object of type ' + exports.getType(object) + ' to type ISODate');\n }\n\n case 'ASPDate':\n if (exports.isNumber(object)) {\n return '/Date(' + object + ')/';\n } else if (object instanceof Date) {\n return '/Date(' + object.valueOf() + ')/';\n } else if (exports.isString(object)) {\n match = ASPDateRegex.exec(object);\n var value;\n\n if (match) {\n // object is an ASP date\n value = new Date(Number(match[1])).valueOf(); // parse number\n } else {\n value = new Date(object).valueOf(); // parse string\n }\n\n return '/Date(' + value + ')/';\n } else {\n throw new Error('Cannot convert object of type ' + exports.getType(object) + ' to type ASPDate');\n }\n\n default:\n throw new Error('Unknown type \"' + type + '\"');\n }\n }; // parse ASP.Net Date pattern,\n // for example '/Date(1198908717056)/' or '/Date(1198908717056-0700)/'\n // code from http://momentjs.com/\n\n\n var ASPDateRegex = /^\\/?Date\\((\\-?\\d+)/i;\n /**\n * Get the type of an object, for example exports.getType([]) returns 'Array'\n * @param {*} object\n * @return {String} type\n */\n\n exports.getType = function (object) {\n var type = typeof object === 'undefined' ? 'undefined' : (0, _typeof3['default'])(object);\n\n if (type == 'object') {\n if (object === null) {\n return 'null';\n }\n\n if (object instanceof Boolean) {\n return 'Boolean';\n }\n\n if (object instanceof Number) {\n return 'Number';\n }\n\n if (object instanceof String) {\n return 'String';\n }\n\n if (Array.isArray(object)) {\n return 'Array';\n }\n\n if (object instanceof Date) {\n return 'Date';\n }\n\n return 'Object';\n } else if (type == 'number') {\n return 'Number';\n } else if (type == 'boolean') {\n return 'Boolean';\n } else if (type == 'string') {\n return 'String';\n } else if (type === undefined) {\n return 'undefined';\n }\n\n return type;\n };\n /**\n * Used to extend an array and copy it. This is used to propagate paths recursively.\n *\n * @param arr\n * @param newValue\n * @returns {Array}\n */\n\n\n exports.copyAndExtendArray = function (arr, newValue) {\n var newArr = [];\n\n for (var i = 0; i < arr.length; i++) {\n newArr.push(arr[i]);\n }\n\n newArr.push(newValue);\n return newArr;\n };\n /**\n * Used to extend an array and copy it. This is used to propagate paths recursively.\n *\n * @param arr\n * @param newValue\n * @returns {Array}\n */\n\n\n exports.copyArray = function (arr) {\n var newArr = [];\n\n for (var i = 0; i < arr.length; i++) {\n newArr.push(arr[i]);\n }\n\n return newArr;\n };\n /**\n * Retrieve the absolute left value of a DOM element\n * @param {Element} elem A dom element, for example a div\n * @return {number} left The absolute left position of this element\n * in the browser page.\n */\n\n\n exports.getAbsoluteLeft = function (elem) {\n return elem.getBoundingClientRect().left;\n };\n\n exports.getAbsoluteRight = function (elem) {\n return elem.getBoundingClientRect().right;\n };\n /**\n * Retrieve the absolute top value of a DOM element\n * @param {Element} elem A dom element, for example a div\n * @return {number} top The absolute top position of this element\n * in the browser page.\n */\n\n\n exports.getAbsoluteTop = function (elem) {\n return elem.getBoundingClientRect().top;\n };\n /**\n * add a className to the given elements style\n * @param {Element} elem\n * @param {String} className\n */\n\n\n exports.addClassName = function (elem, className) {\n var classes = elem.className.split(' ');\n\n if (classes.indexOf(className) == -1) {\n classes.push(className); // add the class to the array\n\n elem.className = classes.join(' ');\n }\n };\n /**\n * add a className to the given elements style\n * @param {Element} elem\n * @param {String} className\n */\n\n\n exports.removeClassName = function (elem, className) {\n var classes = elem.className.split(' ');\n var index = classes.indexOf(className);\n\n if (index != -1) {\n classes.splice(index, 1); // remove the class from the array\n\n elem.className = classes.join(' ');\n }\n };\n /**\n * For each method for both arrays and objects.\n * In case of an array, the built-in Array.forEach() is applied.\n * In case of an Object, the method loops over all properties of the object.\n * @param {Object | Array} object An Object or Array\n * @param {function} callback Callback method, called for each item in\n * the object or array with three parameters:\n * callback(value, index, object)\n */\n\n\n exports.forEach = function (object, callback) {\n var i, len;\n\n if (Array.isArray(object)) {\n // array\n for (i = 0, len = object.length; i < len; i++) {\n callback(object[i], i, object);\n }\n } else {\n // object\n for (i in object) {\n if (object.hasOwnProperty(i)) {\n callback(object[i], i, object);\n }\n }\n }\n };\n /**\n * Convert an object into an array: all objects properties are put into the\n * array. The resulting array is unordered.\n * @param {Object} object\n * @param {Array} array\n */\n\n\n exports.toArray = function (object) {\n var array = [];\n\n for (var prop in object) {\n if (object.hasOwnProperty(prop)) array.push(object[prop]);\n }\n\n return array;\n };\n /**\n * Update a property in an object\n * @param {Object} object\n * @param {String} key\n * @param {*} value\n * @return {Boolean} changed\n */\n\n\n exports.updateProperty = function (object, key, value) {\n if (object[key] !== value) {\n object[key] = value;\n return true;\n } else {\n return false;\n }\n };\n /**\n * Throttle the given function to be only executed once per animation frame\n * @param {function} fn\n * @returns {function} Returns the throttled function\n */\n\n\n exports.throttle = function (fn) {\n var scheduled = false;\n return function throttled() {\n if (!scheduled) {\n scheduled = true;\n requestAnimationFrame(function () {\n scheduled = false;\n fn();\n });\n }\n };\n };\n /**\n * Add and event listener. Works for all browsers\n * @param {Element} element An html element\n * @param {string} action The action, for example \"click\",\n * without the prefix \"on\"\n * @param {function} listener The callback function to be executed\n * @param {boolean} [useCapture]\n */\n\n\n exports.addEventListener = function (element, action, listener, useCapture) {\n if (element.addEventListener) {\n if (useCapture === undefined) useCapture = false;\n\n if (action === \"mousewheel\" && navigator.userAgent.indexOf(\"Firefox\") >= 0) {\n action = \"DOMMouseScroll\"; // For Firefox\n }\n\n element.addEventListener(action, listener, useCapture);\n } else {\n element.attachEvent(\"on\" + action, listener); // IE browsers\n }\n };\n /**\n * Remove an event listener from an element\n * @param {Element} element An html dom element\n * @param {string} action The name of the event, for example \"mousedown\"\n * @param {function} listener The listener function\n * @param {boolean} [useCapture]\n */\n\n\n exports.removeEventListener = function (element, action, listener, useCapture) {\n if (element.removeEventListener) {\n // non-IE browsers\n if (useCapture === undefined) useCapture = false;\n\n if (action === \"mousewheel\" && navigator.userAgent.indexOf(\"Firefox\") >= 0) {\n action = \"DOMMouseScroll\"; // For Firefox\n }\n\n element.removeEventListener(action, listener, useCapture);\n } else {\n // IE browsers\n element.detachEvent(\"on\" + action, listener);\n }\n };\n /**\n * Cancels the event if it is cancelable, without stopping further propagation of the event.\n */\n\n\n exports.preventDefault = function (event) {\n if (!event) event = window.event;\n\n if (event.preventDefault) {\n event.preventDefault(); // non-IE browsers\n } else {\n event.returnValue = false; // IE browsers\n }\n };\n /**\n * Get HTML element which is the target of the event\n * @param {Event} event\n * @return {Element} target element\n */\n\n\n exports.getTarget = function (event) {\n // code from http://www.quirksmode.org/js/events_properties.html\n if (!event) {\n event = window.event;\n }\n\n var target;\n\n if (event.target) {\n target = event.target;\n } else if (event.srcElement) {\n target = event.srcElement;\n }\n\n if (target.nodeType != undefined && target.nodeType == 3) {\n // defeat Safari bug\n target = target.parentNode;\n }\n\n return target;\n };\n /**\n * Check if given element contains given parent somewhere in the DOM tree\n * @param {Element} element\n * @param {Element} parent\n */\n\n\n exports.hasParent = function (element, parent) {\n var e = element;\n\n while (e) {\n if (e === parent) {\n return true;\n }\n\n e = e.parentNode;\n }\n\n return false;\n };\n\n exports.option = {};\n /**\n * Convert a value into a boolean\n * @param {Boolean | function | undefined} value\n * @param {Boolean} [defaultValue]\n * @returns {Boolean} bool\n */\n\n exports.option.asBoolean = function (value, defaultValue) {\n if (typeof value == 'function') {\n value = value();\n }\n\n if (value != null) {\n return value != false;\n }\n\n return defaultValue || null;\n };\n /**\n * Convert a value into a number\n * @param {Boolean | function | undefined} value\n * @param {Number} [defaultValue]\n * @returns {Number} number\n */\n\n\n exports.option.asNumber = function (value, defaultValue) {\n if (typeof value == 'function') {\n value = value();\n }\n\n if (value != null) {\n return Number(value) || defaultValue || null;\n }\n\n return defaultValue || null;\n };\n /**\n * Convert a value into a string\n * @param {String | function | undefined} value\n * @param {String} [defaultValue]\n * @returns {String} str\n */\n\n\n exports.option.asString = function (value, defaultValue) {\n if (typeof value == 'function') {\n value = value();\n }\n\n if (value != null) {\n return String(value);\n }\n\n return defaultValue || null;\n };\n /**\n * Convert a size or location into a string with pixels or a percentage\n * @param {String | Number | function | undefined} value\n * @param {String} [defaultValue]\n * @returns {String} size\n */\n\n\n exports.option.asSize = function (value, defaultValue) {\n if (typeof value == 'function') {\n value = value();\n }\n\n if (exports.isString(value)) {\n return value;\n } else if (exports.isNumber(value)) {\n return value + 'px';\n } else {\n return defaultValue || null;\n }\n };\n /**\n * Convert a value into a DOM element\n * @param {HTMLElement | function | undefined} value\n * @param {HTMLElement} [defaultValue]\n * @returns {HTMLElement | null} dom\n */\n\n\n exports.option.asElement = function (value, defaultValue) {\n if (typeof value == 'function') {\n value = value();\n }\n\n return value || defaultValue || null;\n };\n /**\n * http://stackoverflow.com/questions/5623838/rgb-to-hex-and-hex-to-rgb\n *\n * @param {String} hex\n * @returns {{r: *, g: *, b: *}} | 255 range\n */\n\n\n exports.hexToRGB = function (hex) {\n // Expand shorthand form (e.g. \"03F\") to full form (e.g. \"0033FF\")\n var shorthandRegex = /^#?([a-f\\d])([a-f\\d])([a-f\\d])$/i;\n hex = hex.replace(shorthandRegex, function (m, r, g, b) {\n return r + r + g + g + b + b;\n });\n var result = /^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i.exec(hex);\n return result ? {\n r: parseInt(result[1], 16),\n g: parseInt(result[2], 16),\n b: parseInt(result[3], 16)\n } : null;\n };\n /**\n * This function takes color in hex format or rgb() or rgba() format and overrides the opacity. Returns rgba() string.\n * @param color\n * @param opacity\n * @returns {*}\n */\n\n\n exports.overrideOpacity = function (color, opacity) {\n if (color.indexOf(\"rgba\") != -1) {\n return color;\n } else if (color.indexOf(\"rgb\") != -1) {\n var rgb = color.substr(color.indexOf(\"(\") + 1).replace(\")\", \"\").split(\",\");\n return \"rgba(\" + rgb[0] + \",\" + rgb[1] + \",\" + rgb[2] + \",\" + opacity + \")\";\n } else {\n var rgb = exports.hexToRGB(color);\n\n if (rgb == null) {\n return color;\n } else {\n return \"rgba(\" + rgb.r + \",\" + rgb.g + \",\" + rgb.b + \",\" + opacity + \")\";\n }\n }\n };\n /**\n *\n * @param red 0 -- 255\n * @param green 0 -- 255\n * @param blue 0 -- 255\n * @returns {string}\n * @constructor\n */\n\n\n exports.RGBToHex = function (red, green, blue) {\n return \"#\" + ((1 << 24) + (red << 16) + (green << 8) + blue).toString(16).slice(1);\n };\n /**\n * Parse a color property into an object with border, background, and\n * highlight colors\n * @param {Object | String} color\n * @return {Object} colorObject\n */\n\n\n exports.parseColor = function (color) {\n var c;\n\n if (exports.isString(color) === true) {\n if (exports.isValidRGB(color) === true) {\n var rgb = color.substr(4).substr(0, color.length - 5).split(',').map(function (value) {\n return parseInt(value);\n });\n color = exports.RGBToHex(rgb[0], rgb[1], rgb[2]);\n }\n\n if (exports.isValidHex(color) === true) {\n var hsv = exports.hexToHSV(color);\n var lighterColorHSV = {\n h: hsv.h,\n s: hsv.s * 0.8,\n v: Math.min(1, hsv.v * 1.02)\n };\n var darkerColorHSV = {\n h: hsv.h,\n s: Math.min(1, hsv.s * 1.25),\n v: hsv.v * 0.8\n };\n var darkerColorHex = exports.HSVToHex(darkerColorHSV.h, darkerColorHSV.s, darkerColorHSV.v);\n var lighterColorHex = exports.HSVToHex(lighterColorHSV.h, lighterColorHSV.s, lighterColorHSV.v);\n c = {\n background: color,\n border: darkerColorHex,\n highlight: {\n background: lighterColorHex,\n border: darkerColorHex\n },\n hover: {\n background: lighterColorHex,\n border: darkerColorHex\n }\n };\n } else {\n c = {\n background: color,\n border: color,\n highlight: {\n background: color,\n border: color\n },\n hover: {\n background: color,\n border: color\n }\n };\n }\n } else {\n c = {};\n c.background = color.background || undefined;\n c.border = color.border || undefined;\n\n if (exports.isString(color.highlight)) {\n c.highlight = {\n border: color.highlight,\n background: color.highlight\n };\n } else {\n c.highlight = {};\n c.highlight.background = color.highlight && color.highlight.background || undefined;\n c.highlight.border = color.highlight && color.highlight.border || undefined;\n }\n\n if (exports.isString(color.hover)) {\n c.hover = {\n border: color.hover,\n background: color.hover\n };\n } else {\n c.hover = {};\n c.hover.background = color.hover && color.hover.background || undefined;\n c.hover.border = color.hover && color.hover.border || undefined;\n }\n }\n\n return c;\n };\n /**\n * http://www.javascripter.net/faq/rgb2hsv.htm\n *\n * @param red\n * @param green\n * @param blue\n * @returns {*}\n * @constructor\n */\n\n\n exports.RGBToHSV = function (red, green, blue) {\n red = red / 255;\n green = green / 255;\n blue = blue / 255;\n var minRGB = Math.min(red, Math.min(green, blue));\n var maxRGB = Math.max(red, Math.max(green, blue)); // Black-gray-white\n\n if (minRGB == maxRGB) {\n return {\n h: 0,\n s: 0,\n v: minRGB\n };\n } // Colors other than black-gray-white:\n\n\n var d = red == minRGB ? green - blue : blue == minRGB ? red - green : blue - red;\n var h = red == minRGB ? 3 : blue == minRGB ? 1 : 5;\n var hue = 60 * (h - d / (maxRGB - minRGB)) / 360;\n var saturation = (maxRGB - minRGB) / maxRGB;\n var value = maxRGB;\n return {\n h: hue,\n s: saturation,\n v: value\n };\n };\n\n var cssUtil = {\n // split a string with css styles into an object with key/values\n split: function split(cssText) {\n var styles = {};\n cssText.split(';').forEach(function (style) {\n if (style.trim() != '') {\n var parts = style.split(':');\n var key = parts[0].trim();\n var value = parts[1].trim();\n styles[key] = value;\n }\n });\n return styles;\n },\n // build a css text string from an object with key/values\n join: function join(styles) {\n return (0, _keys2['default'])(styles).map(function (key) {\n return key + ': ' + styles[key];\n }).join('; ');\n }\n };\n /**\n * Append a string with css styles to an element\n * @param {Element} element\n * @param {String} cssText\n */\n\n exports.addCssText = function (element, cssText) {\n var currentStyles = cssUtil.split(element.style.cssText);\n var newStyles = cssUtil.split(cssText);\n var styles = exports.extend(currentStyles, newStyles);\n element.style.cssText = cssUtil.join(styles);\n };\n /**\n * Remove a string with css styles from an element\n * @param {Element} element\n * @param {String} cssText\n */\n\n\n exports.removeCssText = function (element, cssText) {\n var styles = cssUtil.split(element.style.cssText);\n var removeStyles = cssUtil.split(cssText);\n\n for (var key in removeStyles) {\n if (removeStyles.hasOwnProperty(key)) {\n delete styles[key];\n }\n }\n\n element.style.cssText = cssUtil.join(styles);\n };\n /**\n * https://gist.github.com/mjijackson/5311256\n * @param h\n * @param s\n * @param v\n * @returns {{r: number, g: number, b: number}}\n * @constructor\n */\n\n\n exports.HSVToRGB = function (h, s, v) {\n var r, g, b;\n var i = Math.floor(h * 6);\n var f = h * 6 - i;\n var p = v * (1 - s);\n var q = v * (1 - f * s);\n var t = v * (1 - (1 - f) * s);\n\n switch (i % 6) {\n case 0:\n r = v, g = t, b = p;\n break;\n\n case 1:\n r = q, g = v, b = p;\n break;\n\n case 2:\n r = p, g = v, b = t;\n break;\n\n case 3:\n r = p, g = q, b = v;\n break;\n\n case 4:\n r = t, g = p, b = v;\n break;\n\n case 5:\n r = v, g = p, b = q;\n break;\n }\n\n return {\n r: Math.floor(r * 255),\n g: Math.floor(g * 255),\n b: Math.floor(b * 255)\n };\n };\n\n exports.HSVToHex = function (h, s, v) {\n var rgb = exports.HSVToRGB(h, s, v);\n return exports.RGBToHex(rgb.r, rgb.g, rgb.b);\n };\n\n exports.hexToHSV = function (hex) {\n var rgb = exports.hexToRGB(hex);\n return exports.RGBToHSV(rgb.r, rgb.g, rgb.b);\n };\n\n exports.isValidHex = function (hex) {\n var isOk = /(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(hex);\n return isOk;\n };\n\n exports.isValidRGB = function (rgb) {\n rgb = rgb.replace(\" \", \"\");\n var isOk = /rgb\\((\\d{1,3}),(\\d{1,3}),(\\d{1,3})\\)/i.test(rgb);\n return isOk;\n };\n\n exports.isValidRGBA = function (rgba) {\n rgba = rgba.replace(\" \", \"\");\n var isOk = /rgba\\((\\d{1,3}),(\\d{1,3}),(\\d{1,3}),(.{1,3})\\)/i.test(rgba);\n return isOk;\n };\n /**\n * This recursively redirects the prototype of JSON objects to the referenceObject\n * This is used for default options.\n *\n * @param referenceObject\n * @returns {*}\n */\n\n\n exports.selectiveBridgeObject = function (fields, referenceObject) {\n if ((typeof referenceObject === 'undefined' ? 'undefined' : (0, _typeof3['default'])(referenceObject)) == \"object\") {\n var objectTo = (0, _create2['default'])(referenceObject);\n\n for (var i = 0; i < fields.length; i++) {\n if (referenceObject.hasOwnProperty(fields[i])) {\n if ((0, _typeof3['default'])(referenceObject[fields[i]]) == \"object\") {\n objectTo[fields[i]] = exports.bridgeObject(referenceObject[fields[i]]);\n }\n }\n }\n\n return objectTo;\n } else {\n return null;\n }\n };\n /**\n * This recursively redirects the prototype of JSON objects to the referenceObject\n * This is used for default options.\n *\n * @param referenceObject\n * @returns {*}\n */\n\n\n exports.bridgeObject = function (referenceObject) {\n if ((typeof referenceObject === 'undefined' ? 'undefined' : (0, _typeof3['default'])(referenceObject)) == \"object\") {\n var objectTo = (0, _create2['default'])(referenceObject);\n\n for (var i in referenceObject) {\n if (referenceObject.hasOwnProperty(i)) {\n if ((0, _typeof3['default'])(referenceObject[i]) == \"object\") {\n objectTo[i] = exports.bridgeObject(referenceObject[i]);\n }\n }\n }\n\n return objectTo;\n } else {\n return null;\n }\n };\n /**\n * This method provides a stable sort implementation, very fast for presorted data\n *\n * @param a the array\n * @param a order comparator\n * @returns {the array}\n */\n\n\n exports.insertSort = function (a, compare) {\n for (var i = 0; i < a.length; i++) {\n var k = a[i];\n\n for (var j = i; j > 0 && compare(k, a[j - 1]) < 0; j--) {\n a[j] = a[j - 1];\n }\n\n a[j] = k;\n }\n\n return a;\n };\n /**\n * this is used to set the options of subobjects in the options object. A requirement of these subobjects\n * is that they have an 'enabled' element which is optional for the user but mandatory for the program.\n *\n * @param [object] mergeTarget | this is either this.options or the options used for the groups.\n * @param [object] options | options\n * @param [String] option | this is the option key in the options argument\n */\n\n\n exports.mergeOptions = function (mergeTarget, options, option) {\n var allowDeletion = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;\n var globalOptions = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {};\n\n if (options[option] === null) {\n mergeTarget[option] = (0, _create2['default'])(globalOptions[option]);\n } else {\n if (options[option] !== undefined) {\n if (typeof options[option] === 'boolean') {\n mergeTarget[option].enabled = options[option];\n } else {\n if (options[option].enabled === undefined) {\n mergeTarget[option].enabled = true;\n }\n\n for (var prop in options[option]) {\n if (options[option].hasOwnProperty(prop)) {\n mergeTarget[option][prop] = options[option][prop];\n }\n }\n }\n }\n }\n };\n /**\n * This function does a binary search for a visible item in a sorted list. If we find a visible item, the code that uses\n * this function will then iterate in both directions over this sorted list to find all visible items.\n *\n * @param {Item[]} orderedItems | Items ordered by start\n * @param {function} comparator | -1 is lower, 0 is equal, 1 is higher\n * @param {String} field\n * @param {String} field2\n * @returns {number}\n * @private\n */\n\n\n exports.binarySearchCustom = function (orderedItems, comparator, field, field2) {\n var maxIterations = 10000;\n var iteration = 0;\n var low = 0;\n var high = orderedItems.length - 1;\n\n while (low <= high && iteration < maxIterations) {\n var middle = Math.floor((low + high) / 2);\n var item = orderedItems[middle];\n var value = field2 === undefined ? item[field] : item[field][field2];\n var searchResult = comparator(value);\n\n if (searchResult == 0) {\n // jihaa, found a visible item!\n return middle;\n } else if (searchResult == -1) {\n // it is too small --> increase low\n low = middle + 1;\n } else {\n // it is too big --> decrease high\n high = middle - 1;\n }\n\n iteration++;\n }\n\n return -1;\n };\n /**\n * This function does a binary search for a specific value in a sorted array. If it does not exist but is in between of\n * two values, we return either the one before or the one after, depending on user input\n * If it is found, we return the index, else -1.\n *\n * @param {Array} orderedItems\n * @param {{start: number, end: number}} target\n * @param {String} field\n * @param {String} sidePreference 'before' or 'after'\n * @param {function} comparator an optional comparator, returning -1,0,1 for <,==,>.\n * @returns {number}\n * @private\n */\n\n\n exports.binarySearchValue = function (orderedItems, target, field, sidePreference, comparator) {\n var maxIterations = 10000;\n var iteration = 0;\n var low = 0;\n var high = orderedItems.length - 1;\n var prevValue, value, nextValue, middle;\n var comparator = comparator != undefined ? comparator : function (a, b) {\n return a == b ? 0 : a < b ? -1 : 1;\n };\n\n while (low <= high && iteration < maxIterations) {\n // get a new guess\n middle = Math.floor(0.5 * (high + low));\n prevValue = orderedItems[Math.max(0, middle - 1)][field];\n value = orderedItems[middle][field];\n nextValue = orderedItems[Math.min(orderedItems.length - 1, middle + 1)][field];\n\n if (comparator(value, target) == 0) {\n // we found the target\n return middle;\n } else if (comparator(prevValue, target) < 0 && comparator(value, target) > 0) {\n // target is in between of the previous and the current\n return sidePreference == 'before' ? Math.max(0, middle - 1) : middle;\n } else if (comparator(value, target) < 0 && comparator(nextValue, target) > 0) {\n // target is in between of the current and the next\n return sidePreference == 'before' ? middle : Math.min(orderedItems.length - 1, middle + 1);\n } else {\n // didnt find the target, we need to change our boundaries.\n if (comparator(value, target) < 0) {\n // it is too small --> increase low\n low = middle + 1;\n } else {\n // it is too big --> decrease high\n high = middle - 1;\n }\n }\n\n iteration++;\n } // didnt find anything. Return -1.\n\n\n return -1;\n };\n /*\n * Easing Functions - inspired from http://gizma.com/easing/\n * only considering the t value for the range [0, 1] => [0, 1]\n * https://gist.github.com/gre/1650294\n */\n\n\n exports.easingFunctions = {\n // no easing, no acceleration\n linear: function linear(t) {\n return t;\n },\n // accelerating from zero velocity\n easeInQuad: function easeInQuad(t) {\n return t * t;\n },\n // decelerating to zero velocity\n easeOutQuad: function easeOutQuad(t) {\n return t * (2 - t);\n },\n // acceleration until halfway, then deceleration\n easeInOutQuad: function easeInOutQuad(t) {\n return t < .5 ? 2 * t * t : -1 + (4 - 2 * t) * t;\n },\n // accelerating from zero velocity\n easeInCubic: function easeInCubic(t) {\n return t * t * t;\n },\n // decelerating to zero velocity\n easeOutCubic: function easeOutCubic(t) {\n return --t * t * t + 1;\n },\n // acceleration until halfway, then deceleration\n easeInOutCubic: function easeInOutCubic(t) {\n return t < .5 ? 4 * t * t * t : (t - 1) * (2 * t - 2) * (2 * t - 2) + 1;\n },\n // accelerating from zero velocity\n easeInQuart: function easeInQuart(t) {\n return t * t * t * t;\n },\n // decelerating to zero velocity\n easeOutQuart: function easeOutQuart(t) {\n return 1 - --t * t * t * t;\n },\n // acceleration until halfway, then deceleration\n easeInOutQuart: function easeInOutQuart(t) {\n return t < .5 ? 8 * t * t * t * t : 1 - 8 * --t * t * t * t;\n },\n // accelerating from zero velocity\n easeInQuint: function easeInQuint(t) {\n return t * t * t * t * t;\n },\n // decelerating to zero velocity\n easeOutQuint: function easeOutQuint(t) {\n return 1 + --t * t * t * t * t;\n },\n // acceleration until halfway, then deceleration\n easeInOutQuint: function easeInOutQuint(t) {\n return t < .5 ? 16 * t * t * t * t * t : 1 + 16 * --t * t * t * t * t;\n }\n };\n\n exports.getScrollBarWidth = function () {\n var inner = document.createElement('p');\n inner.style.width = \"100%\";\n inner.style.height = \"200px\";\n var outer = document.createElement('div');\n outer.style.position = \"absolute\";\n outer.style.top = \"0px\";\n outer.style.left = \"0px\";\n outer.style.visibility = \"hidden\";\n outer.style.width = \"200px\";\n outer.style.height = \"150px\";\n outer.style.overflow = \"hidden\";\n outer.appendChild(inner);\n document.body.appendChild(outer);\n var w1 = inner.offsetWidth;\n outer.style.overflow = 'scroll';\n var w2 = inner.offsetWidth;\n if (w1 == w2) w2 = outer.clientWidth;\n document.body.removeChild(outer);\n return w1 - w2;\n };\n\n exports.topMost = function (pile, accessors) {\n var candidate = void 0;\n\n if (!Array.isArray(accessors)) {\n accessors = [accessors];\n }\n\n var _iteratorNormalCompletion = true;\n var _didIteratorError = false;\n var _iteratorError = undefined;\n\n try {\n for (var _iterator = (0, _getIterator3['default'])(pile), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var member = _step.value;\n\n if (member) {\n candidate = member[accessors[0]];\n\n for (var i = 1; i < accessors.length; i++) {\n if (candidate) {\n candidate = candidate[accessors[i]];\n } else {\n continue;\n }\n }\n\n if (typeof candidate != 'undefined') {\n break;\n }\n }\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator['return']) {\n _iterator['return']();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n\n return candidate;\n };\n /***/\n\n },\n /* 2 */\n\n /***/\n function (module, exports, __webpack_require__) {\n module.exports = {\n \"default\": __webpack_require__(3),\n __esModule: true\n };\n /***/\n },\n /* 3 */\n\n /***/\n function (module, exports, __webpack_require__) {\n __webpack_require__(4);\n\n __webpack_require__(50);\n\n module.exports = __webpack_require__(52);\n /***/\n },\n /* 4 */\n\n /***/\n function (module, exports, __webpack_require__) {\n __webpack_require__(5);\n\n var global = __webpack_require__(16),\n hide = __webpack_require__(20),\n Iterators = __webpack_require__(8),\n TO_STRING_TAG = __webpack_require__(47)('toStringTag');\n\n for (var collections = ['NodeList', 'DOMTokenList', 'MediaList', 'StyleSheetList', 'CSSRuleList'], i = 0; i < 5; i++) {\n var NAME = collections[i],\n Collection = global[NAME],\n proto = Collection && Collection.prototype;\n if (proto && !proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME);\n Iterators[NAME] = Iterators.Array;\n }\n /***/\n\n },\n /* 5 */\n\n /***/\n function (module, exports, __webpack_require__) {\n 'use strict';\n\n var addToUnscopables = __webpack_require__(6),\n step = __webpack_require__(7),\n Iterators = __webpack_require__(8),\n toIObject = __webpack_require__(9); // 22.1.3.4 Array.prototype.entries()\n // 22.1.3.13 Array.prototype.keys()\n // 22.1.3.29 Array.prototype.values()\n // 22.1.3.30 Array.prototype[@@iterator]()\n\n\n module.exports = __webpack_require__(13)(Array, 'Array', function (iterated, kind) {\n this._t = toIObject(iterated); // target\n\n this._i = 0; // next index\n\n this._k = kind; // kind\n // 22.1.5.2.1 %ArrayIteratorPrototype%.next()\n }, function () {\n var O = this._t,\n kind = this._k,\n index = this._i++;\n\n if (!O || index >= O.length) {\n this._t = undefined;\n return step(1);\n }\n\n if (kind == 'keys') return step(0, index);\n if (kind == 'values') return step(0, O[index]);\n return step(0, [index, O[index]]);\n }, 'values'); // argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7)\n\n Iterators.Arguments = Iterators.Array;\n addToUnscopables('keys');\n addToUnscopables('values');\n addToUnscopables('entries');\n /***/\n },\n /* 6 */\n\n /***/\n function (module, exports) {\n module.exports = function () {\n /* empty */\n };\n /***/\n\n },\n /* 7 */\n\n /***/\n function (module, exports) {\n module.exports = function (done, value) {\n return {\n value: value,\n done: !!done\n };\n };\n /***/\n\n },\n /* 8 */\n\n /***/\n function (module, exports) {\n module.exports = {};\n /***/\n },\n /* 9 */\n\n /***/\n function (module, exports, __webpack_require__) {\n // to indexed object, toObject with fallback for non-array-like ES3 strings\n var IObject = __webpack_require__(10),\n defined = __webpack_require__(12);\n\n module.exports = function (it) {\n return IObject(defined(it));\n };\n /***/\n\n },\n /* 10 */\n\n /***/\n function (module, exports, __webpack_require__) {\n // fallback for non-array-like ES3 and non-enumerable old V8 strings\n var cof = __webpack_require__(11);\n\n module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) {\n return cof(it) == 'String' ? it.split('') : Object(it);\n };\n /***/\n },\n /* 11 */\n\n /***/\n function (module, exports) {\n var toString = {}.toString;\n\n module.exports = function (it) {\n return toString.call(it).slice(8, -1);\n };\n /***/\n\n },\n /* 12 */\n\n /***/\n function (module, exports) {\n // 7.2.1 RequireObjectCoercible(argument)\n module.exports = function (it) {\n if (it == undefined) throw TypeError(\"Can't call method on \" + it);\n return it;\n };\n /***/\n\n },\n /* 13 */\n\n /***/\n function (module, exports, __webpack_require__) {\n 'use strict';\n\n var LIBRARY = __webpack_require__(14),\n $export = __webpack_require__(15),\n redefine = __webpack_require__(30),\n hide = __webpack_require__(20),\n has = __webpack_require__(31),\n Iterators = __webpack_require__(8),\n $iterCreate = __webpack_require__(32),\n setToStringTag = __webpack_require__(46),\n getPrototypeOf = __webpack_require__(48),\n ITERATOR = __webpack_require__(47)('iterator'),\n BUGGY = !([].keys && 'next' in [].keys()) // Safari has buggy iterators w/o `next`\n ,\n FF_ITERATOR = '@@iterator',\n KEYS = 'keys',\n VALUES = 'values';\n\n var returnThis = function () {\n return this;\n };\n\n module.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) {\n $iterCreate(Constructor, NAME, next);\n\n var getMethod = function (kind) {\n if (!BUGGY && kind in proto) return proto[kind];\n\n switch (kind) {\n case KEYS:\n return function keys() {\n return new Constructor(this, kind);\n };\n\n case VALUES:\n return function values() {\n return new Constructor(this, kind);\n };\n }\n\n return function entries() {\n return new Constructor(this, kind);\n };\n };\n\n var TAG = NAME + ' Iterator',\n DEF_VALUES = DEFAULT == VALUES,\n VALUES_BUG = false,\n proto = Base.prototype,\n $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT],\n $default = $native || getMethod(DEFAULT),\n $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined,\n $anyNative = NAME == 'Array' ? proto.entries || $native : $native,\n methods,\n key,\n IteratorPrototype; // Fix native\n\n if ($anyNative) {\n IteratorPrototype = getPrototypeOf($anyNative.call(new Base()));\n\n if (IteratorPrototype !== Object.prototype) {\n // Set @@toStringTag to native iterators\n setToStringTag(IteratorPrototype, TAG, true); // fix for some old engines\n\n if (!LIBRARY && !has(IteratorPrototype, ITERATOR)) hide(IteratorPrototype, ITERATOR, returnThis);\n }\n } // fix Array#{values, @@iterator}.name in V8 / FF\n\n\n if (DEF_VALUES && $native && $native.name !== VALUES) {\n VALUES_BUG = true;\n\n $default = function values() {\n return $native.call(this);\n };\n } // Define iterator\n\n\n if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) {\n hide(proto, ITERATOR, $default);\n } // Plug for library\n\n\n Iterators[NAME] = $default;\n Iterators[TAG] = returnThis;\n\n if (DEFAULT) {\n methods = {\n values: DEF_VALUES ? $default : getMethod(VALUES),\n keys: IS_SET ? $default : getMethod(KEYS),\n entries: $entries\n };\n if (FORCED) for (key in methods) {\n if (!(key in proto)) redefine(proto, key, methods[key]);\n } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods);\n }\n\n return methods;\n };\n /***/\n\n },\n /* 14 */\n\n /***/\n function (module, exports) {\n module.exports = true;\n /***/\n },\n /* 15 */\n\n /***/\n function (module, exports, __webpack_require__) {\n var global = __webpack_require__(16),\n core = __webpack_require__(17),\n ctx = __webpack_require__(18),\n hide = __webpack_require__(20),\n PROTOTYPE = 'prototype';\n\n var $export = function (type, name, source) {\n var IS_FORCED = type & $export.F,\n IS_GLOBAL = type & $export.G,\n IS_STATIC = type & $export.S,\n IS_PROTO = type & $export.P,\n IS_BIND = type & $export.B,\n IS_WRAP = type & $export.W,\n exports = IS_GLOBAL ? core : core[name] || (core[name] = {}),\n expProto = exports[PROTOTYPE],\n target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE],\n key,\n own,\n out;\n if (IS_GLOBAL) source = name;\n\n for (key in source) {\n // contains in native\n own = !IS_FORCED && target && target[key] !== undefined;\n if (own && key in exports) continue; // export native or passed\n\n out = own ? target[key] : source[key]; // prevent global pollution for namespaces\n\n exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key] // bind timers to global for call from export context\n : IS_BIND && own ? ctx(out, global) // wrap global constructors for prevent change them in library\n : IS_WRAP && target[key] == out ? function (C) {\n var F = function (a, b, c) {\n if (this instanceof C) {\n switch (arguments.length) {\n case 0:\n return new C();\n\n case 1:\n return new C(a);\n\n case 2:\n return new C(a, b);\n }\n\n return new C(a, b, c);\n }\n\n return C.apply(this, arguments);\n };\n\n F[PROTOTYPE] = C[PROTOTYPE];\n return F; // make static versions for prototype methods\n }(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out; // export proto methods to core.%CONSTRUCTOR%.methods.%NAME%\n\n if (IS_PROTO) {\n (exports.virtual || (exports.virtual = {}))[key] = out; // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME%\n\n if (type & $export.R && expProto && !expProto[key]) hide(expProto, key, out);\n }\n }\n }; // type bitmap\n\n\n $export.F = 1; // forced\n\n $export.G = 2; // global\n\n $export.S = 4; // static\n\n $export.P = 8; // proto\n\n $export.B = 16; // bind\n\n $export.W = 32; // wrap\n\n $export.U = 64; // safe\n\n $export.R = 128; // real proto method for `library` \n\n module.exports = $export;\n /***/\n },\n /* 16 */\n\n /***/\n function (module, exports) {\n // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028\n var global = module.exports = typeof window != 'undefined' && window.Math == Math ? window : typeof self != 'undefined' && self.Math == Math ? self : Function('return this')();\n if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef\n\n /***/\n },\n /* 17 */\n\n /***/\n function (module, exports) {\n var core = module.exports = {\n version: '2.4.0'\n };\n if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef\n\n /***/\n },\n /* 18 */\n\n /***/\n function (module, exports, __webpack_require__) {\n // optional / simple context binding\n var aFunction = __webpack_require__(19);\n\n module.exports = function (fn, that, length) {\n aFunction(fn);\n if (that === undefined) return fn;\n\n switch (length) {\n case 1:\n return function (a) {\n return fn.call(that, a);\n };\n\n case 2:\n return function (a, b) {\n return fn.call(that, a, b);\n };\n\n case 3:\n return function (a, b, c) {\n return fn.call(that, a, b, c);\n };\n }\n\n return function ()\n /* ...args */\n {\n return fn.apply(that, arguments);\n };\n };\n /***/\n\n },\n /* 19 */\n\n /***/\n function (module, exports) {\n module.exports = function (it) {\n if (typeof it != 'function') throw TypeError(it + ' is not a function!');\n return it;\n };\n /***/\n\n },\n /* 20 */\n\n /***/\n function (module, exports, __webpack_require__) {\n var dP = __webpack_require__(21),\n createDesc = __webpack_require__(29);\n\n module.exports = __webpack_require__(25) ? function (object, key, value) {\n return dP.f(object, key, createDesc(1, value));\n } : function (object, key, value) {\n object[key] = value;\n return object;\n };\n /***/\n },\n /* 21 */\n\n /***/\n function (module, exports, __webpack_require__) {\n var anObject = __webpack_require__(22),\n IE8_DOM_DEFINE = __webpack_require__(24),\n toPrimitive = __webpack_require__(28),\n dP = Object.defineProperty;\n\n exports.f = __webpack_require__(25) ? Object.defineProperty : function defineProperty(O, P, Attributes) {\n anObject(O);\n P = toPrimitive(P, true);\n anObject(Attributes);\n if (IE8_DOM_DEFINE) try {\n return dP(O, P, Attributes);\n } catch (e) {\n /* empty */\n }\n if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!');\n if ('value' in Attributes) O[P] = Attributes.value;\n return O;\n };\n /***/\n },\n /* 22 */\n\n /***/\n function (module, exports, __webpack_require__) {\n var isObject = __webpack_require__(23);\n\n module.exports = function (it) {\n if (!isObject(it)) throw TypeError(it + ' is not an object!');\n return it;\n };\n /***/\n\n },\n /* 23 */\n\n /***/\n function (module, exports) {\n module.exports = function (it) {\n return typeof it === 'object' ? it !== null : typeof it === 'function';\n };\n /***/\n\n },\n /* 24 */\n\n /***/\n function (module, exports, __webpack_require__) {\n module.exports = !__webpack_require__(25) && !__webpack_require__(26)(function () {\n return Object.defineProperty(__webpack_require__(27)('div'), 'a', {\n get: function () {\n return 7;\n }\n }).a != 7;\n });\n /***/\n },\n /* 25 */\n\n /***/\n function (module, exports, __webpack_require__) {\n // Thank's IE8 for his funny defineProperty\n module.exports = !__webpack_require__(26)(function () {\n return Object.defineProperty({}, 'a', {\n get: function () {\n return 7;\n }\n }).a != 7;\n });\n /***/\n },\n /* 26 */\n\n /***/\n function (module, exports) {\n module.exports = function (exec) {\n try {\n return !!exec();\n } catch (e) {\n return true;\n }\n };\n /***/\n\n },\n /* 27 */\n\n /***/\n function (module, exports, __webpack_require__) {\n var isObject = __webpack_require__(23),\n document = __webpack_require__(16).document // in old IE typeof document.createElement is 'object'\n ,\n is = isObject(document) && isObject(document.createElement);\n\n module.exports = function (it) {\n return is ? document.createElement(it) : {};\n };\n /***/\n\n },\n /* 28 */\n\n /***/\n function (module, exports, __webpack_require__) {\n // 7.1.1 ToPrimitive(input [, PreferredType])\n var isObject = __webpack_require__(23); // instead of the ES6 spec version, we didn't implement @@toPrimitive case\n // and the second argument - flag - preferred type is a string\n\n\n module.exports = function (it, S) {\n if (!isObject(it)) return it;\n var fn, val;\n if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;\n if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val;\n if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;\n throw TypeError(\"Can't convert object to primitive value\");\n };\n /***/\n\n },\n /* 29 */\n\n /***/\n function (module, exports) {\n module.exports = function (bitmap, value) {\n return {\n enumerable: !(bitmap & 1),\n configurable: !(bitmap & 2),\n writable: !(bitmap & 4),\n value: value\n };\n };\n /***/\n\n },\n /* 30 */\n\n /***/\n function (module, exports, __webpack_require__) {\n module.exports = __webpack_require__(20);\n /***/\n },\n /* 31 */\n\n /***/\n function (module, exports) {\n var hasOwnProperty = {}.hasOwnProperty;\n\n module.exports = function (it, key) {\n return hasOwnProperty.call(it, key);\n };\n /***/\n\n },\n /* 32 */\n\n /***/\n function (module, exports, __webpack_require__) {\n 'use strict';\n\n var create = __webpack_require__(33),\n descriptor = __webpack_require__(29),\n setToStringTag = __webpack_require__(46),\n IteratorPrototype = {}; // 25.1.2.1.1 %IteratorPrototype%[@@iterator]()\n\n\n __webpack_require__(20)(IteratorPrototype, __webpack_require__(47)('iterator'), function () {\n return this;\n });\n\n module.exports = function (Constructor, NAME, next) {\n Constructor.prototype = create(IteratorPrototype, {\n next: descriptor(1, next)\n });\n setToStringTag(Constructor, NAME + ' Iterator');\n };\n /***/\n\n },\n /* 33 */\n\n /***/\n function (module, exports, __webpack_require__) {\n // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])\n var anObject = __webpack_require__(22),\n dPs = __webpack_require__(34),\n enumBugKeys = __webpack_require__(44),\n IE_PROTO = __webpack_require__(41)('IE_PROTO'),\n Empty = function () {\n /* empty */\n },\n PROTOTYPE = 'prototype'; // Create object with fake `null` prototype: use iframe Object with cleared prototype\n\n\n var createDict = function () {\n // Thrash, waste and sodomy: IE GC bug\n var iframe = __webpack_require__(27)('iframe'),\n i = enumBugKeys.length,\n lt = '<',\n gt = '>',\n iframeDocument;\n\n iframe.style.display = 'none';\n\n __webpack_require__(45).appendChild(iframe);\n\n iframe.src = 'javascript:'; // eslint-disable-line no-script-url\n // createDict = iframe.contentWindow.Object;\n // html.removeChild(iframe);\n\n iframeDocument = iframe.contentWindow.document;\n iframeDocument.open();\n iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt);\n iframeDocument.close();\n createDict = iframeDocument.F;\n\n while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]];\n\n return createDict();\n };\n\n module.exports = Object.create || function create(O, Properties) {\n var result;\n\n if (O !== null) {\n Empty[PROTOTYPE] = anObject(O);\n result = new Empty();\n Empty[PROTOTYPE] = null; // add \"__proto__\" for Object.getPrototypeOf polyfill\n\n result[IE_PROTO] = O;\n } else result = createDict();\n\n return Properties === undefined ? result : dPs(result, Properties);\n };\n /***/\n\n },\n /* 34 */\n\n /***/\n function (module, exports, __webpack_require__) {\n var dP = __webpack_require__(21),\n anObject = __webpack_require__(22),\n getKeys = __webpack_require__(35);\n\n module.exports = __webpack_require__(25) ? Object.defineProperties : function defineProperties(O, Properties) {\n anObject(O);\n var keys = getKeys(Properties),\n length = keys.length,\n i = 0,\n P;\n\n while (length > i) dP.f(O, P = keys[i++], Properties[P]);\n\n return O;\n };\n /***/\n },\n /* 35 */\n\n /***/\n function (module, exports, __webpack_require__) {\n // 19.1.2.14 / 15.2.3.14 Object.keys(O)\n var $keys = __webpack_require__(36),\n enumBugKeys = __webpack_require__(44);\n\n module.exports = Object.keys || function keys(O) {\n return $keys(O, enumBugKeys);\n };\n /***/\n\n },\n /* 36 */\n\n /***/\n function (module, exports, __webpack_require__) {\n var has = __webpack_require__(31),\n toIObject = __webpack_require__(9),\n arrayIndexOf = __webpack_require__(37)(false),\n IE_PROTO = __webpack_require__(41)('IE_PROTO');\n\n module.exports = function (object, names) {\n var O = toIObject(object),\n i = 0,\n result = [],\n key;\n\n for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key); // Don't enum bug & hidden keys\n\n\n while (names.length > i) if (has(O, key = names[i++])) {\n ~arrayIndexOf(result, key) || result.push(key);\n }\n\n return result;\n };\n /***/\n\n },\n /* 37 */\n\n /***/\n function (module, exports, __webpack_require__) {\n // false -> Array#indexOf\n // true -> Array#includes\n var toIObject = __webpack_require__(9),\n toLength = __webpack_require__(38),\n toIndex = __webpack_require__(40);\n\n module.exports = function (IS_INCLUDES) {\n return function ($this, el, fromIndex) {\n var O = toIObject($this),\n length = toLength(O.length),\n index = toIndex(fromIndex, length),\n value; // Array#includes uses SameValueZero equality algorithm\n\n if (IS_INCLUDES && el != el) while (length > index) {\n value = O[index++];\n if (value != value) return true; // Array#toIndex ignores holes, Array#includes - not\n } else for (; length > index; index++) if (IS_INCLUDES || index in O) {\n if (O[index] === el) return IS_INCLUDES || index || 0;\n }\n return !IS_INCLUDES && -1;\n };\n };\n /***/\n\n },\n /* 38 */\n\n /***/\n function (module, exports, __webpack_require__) {\n // 7.1.15 ToLength\n var toInteger = __webpack_require__(39),\n min = Math.min;\n\n module.exports = function (it) {\n return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991\n };\n /***/\n\n },\n /* 39 */\n\n /***/\n function (module, exports) {\n // 7.1.4 ToInteger\n var ceil = Math.ceil,\n floor = Math.floor;\n\n module.exports = function (it) {\n return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);\n };\n /***/\n\n },\n /* 40 */\n\n /***/\n function (module, exports, __webpack_require__) {\n var toInteger = __webpack_require__(39),\n max = Math.max,\n min = Math.min;\n\n module.exports = function (index, length) {\n index = toInteger(index);\n return index < 0 ? max(index + length, 0) : min(index, length);\n };\n /***/\n\n },\n /* 41 */\n\n /***/\n function (module, exports, __webpack_require__) {\n var shared = __webpack_require__(42)('keys'),\n uid = __webpack_require__(43);\n\n module.exports = function (key) {\n return shared[key] || (shared[key] = uid(key));\n };\n /***/\n\n },\n /* 42 */\n\n /***/\n function (module, exports, __webpack_require__) {\n var global = __webpack_require__(16),\n SHARED = '__core-js_shared__',\n store = global[SHARED] || (global[SHARED] = {});\n\n module.exports = function (key) {\n return store[key] || (store[key] = {});\n };\n /***/\n\n },\n /* 43 */\n\n /***/\n function (module, exports) {\n var id = 0,\n px = Math.random();\n\n module.exports = function (key) {\n return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));\n };\n /***/\n\n },\n /* 44 */\n\n /***/\n function (module, exports) {\n // IE 8- don't enum bug keys\n module.exports = 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'.split(',');\n /***/\n },\n /* 45 */\n\n /***/\n function (module, exports, __webpack_require__) {\n module.exports = __webpack_require__(16).document && document.documentElement;\n /***/\n },\n /* 46 */\n\n /***/\n function (module, exports, __webpack_require__) {\n var def = __webpack_require__(21).f,\n has = __webpack_require__(31),\n TAG = __webpack_require__(47)('toStringTag');\n\n module.exports = function (it, tag, stat) {\n if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, {\n configurable: true,\n value: tag\n });\n };\n /***/\n\n },\n /* 47 */\n\n /***/\n function (module, exports, __webpack_require__) {\n var store = __webpack_require__(42)('wks'),\n uid = __webpack_require__(43),\n Symbol = __webpack_require__(16).Symbol,\n USE_SYMBOL = typeof Symbol == 'function';\n\n var $exports = module.exports = function (name) {\n return store[name] || (store[name] = USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name));\n };\n\n $exports.store = store;\n /***/\n },\n /* 48 */\n\n /***/\n function (module, exports, __webpack_require__) {\n // 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O)\n var has = __webpack_require__(31),\n toObject = __webpack_require__(49),\n IE_PROTO = __webpack_require__(41)('IE_PROTO'),\n ObjectProto = Object.prototype;\n\n module.exports = Object.getPrototypeOf || function (O) {\n O = toObject(O);\n if (has(O, IE_PROTO)) return O[IE_PROTO];\n\n if (typeof O.constructor == 'function' && O instanceof O.constructor) {\n return O.constructor.prototype;\n }\n\n return O instanceof Object ? ObjectProto : null;\n };\n /***/\n\n },\n /* 49 */\n\n /***/\n function (module, exports, __webpack_require__) {\n // 7.1.13 ToObject(argument)\n var defined = __webpack_require__(12);\n\n module.exports = function (it) {\n return Object(defined(it));\n };\n /***/\n\n },\n /* 50 */\n\n /***/\n function (module, exports, __webpack_require__) {\n 'use strict';\n\n var $at = __webpack_require__(51)(true); // 21.1.3.27 String.prototype[@@iterator]()\n\n\n __webpack_require__(13)(String, 'String', function (iterated) {\n this._t = String(iterated); // target\n\n this._i = 0; // next index\n // 21.1.5.2.1 %StringIteratorPrototype%.next()\n }, function () {\n var O = this._t,\n index = this._i,\n point;\n if (index >= O.length) return {\n value: undefined,\n done: true\n };\n point = $at(O, index);\n this._i += point.length;\n return {\n value: point,\n done: false\n };\n });\n /***/\n\n },\n /* 51 */\n\n /***/\n function (module, exports, __webpack_require__) {\n var toInteger = __webpack_require__(39),\n defined = __webpack_require__(12); // true -> String#at\n // false -> String#codePointAt\n\n\n module.exports = function (TO_STRING) {\n return function (that, pos) {\n var s = String(defined(that)),\n i = toInteger(pos),\n l = s.length,\n a,\n b;\n if (i < 0 || i >= l) return TO_STRING ? '' : undefined;\n a = s.charCodeAt(i);\n return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff ? TO_STRING ? s.charAt(i) : a : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000;\n };\n };\n /***/\n\n },\n /* 52 */\n\n /***/\n function (module, exports, __webpack_require__) {\n var anObject = __webpack_require__(22),\n get = __webpack_require__(53);\n\n module.exports = __webpack_require__(17).getIterator = function (it) {\n var iterFn = get(it);\n if (typeof iterFn != 'function') throw TypeError(it + ' is not iterable!');\n return anObject(iterFn.call(it));\n };\n /***/\n\n },\n /* 53 */\n\n /***/\n function (module, exports, __webpack_require__) {\n var classof = __webpack_require__(54),\n ITERATOR = __webpack_require__(47)('iterator'),\n Iterators = __webpack_require__(8);\n\n module.exports = __webpack_require__(17).getIteratorMethod = function (it) {\n if (it != undefined) return it[ITERATOR] || it['@@iterator'] || Iterators[classof(it)];\n };\n /***/\n\n },\n /* 54 */\n\n /***/\n function (module, exports, __webpack_require__) {\n // getting tag from 19.1.3.6 Object.prototype.toString()\n var cof = __webpack_require__(11),\n TAG = __webpack_require__(47)('toStringTag') // ES3 wrong here\n ,\n ARG = cof(function () {\n return arguments;\n }()) == 'Arguments'; // fallback for IE11 Script Access Denied error\n\n\n var tryGet = function (it, key) {\n try {\n return it[key];\n } catch (e) {\n /* empty */\n }\n };\n\n module.exports = function (it) {\n var O, T, B;\n return it === undefined ? 'Undefined' : it === null ? 'Null' // @@toStringTag case\n : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T // builtinTag case\n : ARG ? cof(O) // ES3 arguments fallback\n : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B;\n };\n /***/\n\n },\n /* 55 */\n\n /***/\n function (module, exports, __webpack_require__) {\n module.exports = {\n \"default\": __webpack_require__(56),\n __esModule: true\n };\n /***/\n },\n /* 56 */\n\n /***/\n function (module, exports, __webpack_require__) {\n __webpack_require__(57);\n\n var $Object = __webpack_require__(17).Object;\n\n module.exports = function create(P, D) {\n return $Object.create(P, D);\n };\n /***/\n\n },\n /* 57 */\n\n /***/\n function (module, exports, __webpack_require__) {\n var $export = __webpack_require__(15); // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])\n\n\n $export($export.S, 'Object', {\n create: __webpack_require__(33)\n });\n /***/\n },\n /* 58 */\n\n /***/\n function (module, exports, __webpack_require__) {\n module.exports = {\n \"default\": __webpack_require__(59),\n __esModule: true\n };\n /***/\n },\n /* 59 */\n\n /***/\n function (module, exports, __webpack_require__) {\n __webpack_require__(60);\n\n module.exports = __webpack_require__(17).Object.keys;\n /***/\n },\n /* 60 */\n\n /***/\n function (module, exports, __webpack_require__) {\n // 19.1.2.14 Object.keys(O)\n var toObject = __webpack_require__(49),\n $keys = __webpack_require__(35);\n\n __webpack_require__(61)('keys', function () {\n return function keys(it) {\n return $keys(toObject(it));\n };\n });\n /***/\n\n },\n /* 61 */\n\n /***/\n function (module, exports, __webpack_require__) {\n // most Object methods by ES6 should accept primitives\n var $export = __webpack_require__(15),\n core = __webpack_require__(17),\n fails = __webpack_require__(26);\n\n module.exports = function (KEY, exec) {\n var fn = (core.Object || {})[KEY] || Object[KEY],\n exp = {};\n exp[KEY] = exec(fn);\n $export($export.S + $export.F * fails(function () {\n fn(1);\n }), 'Object', exp);\n };\n /***/\n\n },\n /* 62 */\n\n /***/\n function (module, exports, __webpack_require__) {\n \"use strict\";\n\n exports.__esModule = true;\n\n var _iterator = __webpack_require__(63);\n\n var _iterator2 = _interopRequireDefault(_iterator);\n\n var _symbol = __webpack_require__(66);\n\n var _symbol2 = _interopRequireDefault(_symbol);\n\n var _typeof = typeof _symbol2.default === \"function\" && typeof _iterator2.default === \"symbol\" ? function (obj) {\n return typeof obj;\n } : function (obj) {\n return obj && typeof _symbol2.default === \"function\" && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? \"symbol\" : typeof obj;\n };\n\n function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n default: obj\n };\n }\n\n exports.default = typeof _symbol2.default === \"function\" && _typeof(_iterator2.default) === \"symbol\" ? function (obj) {\n return typeof obj === \"undefined\" ? \"undefined\" : _typeof(obj);\n } : function (obj) {\n return obj && typeof _symbol2.default === \"function\" && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? \"symbol\" : typeof obj === \"undefined\" ? \"undefined\" : _typeof(obj);\n };\n /***/\n },\n /* 63 */\n\n /***/\n function (module, exports, __webpack_require__) {\n module.exports = {\n \"default\": __webpack_require__(64),\n __esModule: true\n };\n /***/\n },\n /* 64 */\n\n /***/\n function (module, exports, __webpack_require__) {\n __webpack_require__(50);\n\n __webpack_require__(4);\n\n module.exports = __webpack_require__(65).f('iterator');\n /***/\n },\n /* 65 */\n\n /***/\n function (module, exports, __webpack_require__) {\n exports.f = __webpack_require__(47);\n /***/\n },\n /* 66 */\n\n /***/\n function (module, exports, __webpack_require__) {\n module.exports = {\n \"default\": __webpack_require__(67),\n __esModule: true\n };\n /***/\n },\n /* 67 */\n\n /***/\n function (module, exports, __webpack_require__) {\n __webpack_require__(68);\n\n __webpack_require__(79);\n\n __webpack_require__(80);\n\n __webpack_require__(81);\n\n module.exports = __webpack_require__(17).Symbol;\n /***/\n },\n /* 68 */\n\n /***/\n function (module, exports, __webpack_require__) {\n 'use strict'; // ECMAScript 6 symbols shim\n\n var global = __webpack_require__(16),\n has = __webpack_require__(31),\n DESCRIPTORS = __webpack_require__(25),\n $export = __webpack_require__(15),\n redefine = __webpack_require__(30),\n META = __webpack_require__(69).KEY,\n $fails = __webpack_require__(26),\n shared = __webpack_require__(42),\n setToStringTag = __webpack_require__(46),\n uid = __webpack_require__(43),\n wks = __webpack_require__(47),\n wksExt = __webpack_require__(65),\n wksDefine = __webpack_require__(70),\n keyOf = __webpack_require__(71),\n enumKeys = __webpack_require__(72),\n isArray = __webpack_require__(75),\n anObject = __webpack_require__(22),\n toIObject = __webpack_require__(9),\n toPrimitive = __webpack_require__(28),\n createDesc = __webpack_require__(29),\n _create = __webpack_require__(33),\n gOPNExt = __webpack_require__(76),\n $GOPD = __webpack_require__(78),\n $DP = __webpack_require__(21),\n $keys = __webpack_require__(35),\n gOPD = $GOPD.f,\n dP = $DP.f,\n gOPN = gOPNExt.f,\n $Symbol = global.Symbol,\n $JSON = global.JSON,\n _stringify = $JSON && $JSON.stringify,\n PROTOTYPE = 'prototype',\n HIDDEN = wks('_hidden'),\n TO_PRIMITIVE = wks('toPrimitive'),\n isEnum = {}.propertyIsEnumerable,\n SymbolRegistry = shared('symbol-registry'),\n AllSymbols = shared('symbols'),\n OPSymbols = shared('op-symbols'),\n ObjectProto = Object[PROTOTYPE],\n USE_NATIVE = typeof $Symbol == 'function',\n QObject = global.QObject; // Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173\n\n\n var setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild; // fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687\n\n var setSymbolDesc = DESCRIPTORS && $fails(function () {\n return _create(dP({}, 'a', {\n get: function () {\n return dP(this, 'a', {\n value: 7\n }).a;\n }\n })).a != 7;\n }) ? function (it, key, D) {\n var protoDesc = gOPD(ObjectProto, key);\n if (protoDesc) delete ObjectProto[key];\n dP(it, key, D);\n if (protoDesc && it !== ObjectProto) dP(ObjectProto, key, protoDesc);\n } : dP;\n\n var wrap = function (tag) {\n var sym = AllSymbols[tag] = _create($Symbol[PROTOTYPE]);\n\n sym._k = tag;\n return sym;\n };\n\n var isSymbol = USE_NATIVE && typeof $Symbol.iterator == 'symbol' ? function (it) {\n return typeof it == 'symbol';\n } : function (it) {\n return it instanceof $Symbol;\n };\n\n var $defineProperty = function defineProperty(it, key, D) {\n if (it === ObjectProto) $defineProperty(OPSymbols, key, D);\n anObject(it);\n key = toPrimitive(key, true);\n anObject(D);\n\n if (has(AllSymbols, key)) {\n if (!D.enumerable) {\n if (!has(it, HIDDEN)) dP(it, HIDDEN, createDesc(1, {}));\n it[HIDDEN][key] = true;\n } else {\n if (has(it, HIDDEN) && it[HIDDEN][key]) it[HIDDEN][key] = false;\n D = _create(D, {\n enumerable: createDesc(0, false)\n });\n }\n\n return setSymbolDesc(it, key, D);\n }\n\n return dP(it, key, D);\n };\n\n var $defineProperties = function defineProperties(it, P) {\n anObject(it);\n var keys = enumKeys(P = toIObject(P)),\n i = 0,\n l = keys.length,\n key;\n\n while (l > i) $defineProperty(it, key = keys[i++], P[key]);\n\n return it;\n };\n\n var $create = function create(it, P) {\n return P === undefined ? _create(it) : $defineProperties(_create(it), P);\n };\n\n var $propertyIsEnumerable = function propertyIsEnumerable(key) {\n var E = isEnum.call(this, key = toPrimitive(key, true));\n if (this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return false;\n return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] ? E : true;\n };\n\n var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key) {\n it = toIObject(it);\n key = toPrimitive(key, true);\n if (it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return;\n var D = gOPD(it, key);\n if (D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key])) D.enumerable = true;\n return D;\n };\n\n var $getOwnPropertyNames = function getOwnPropertyNames(it) {\n var names = gOPN(toIObject(it)),\n result = [],\n i = 0,\n key;\n\n while (names.length > i) {\n if (!has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META) result.push(key);\n }\n\n return result;\n };\n\n var $getOwnPropertySymbols = function getOwnPropertySymbols(it) {\n var IS_OP = it === ObjectProto,\n names = gOPN(IS_OP ? OPSymbols : toIObject(it)),\n result = [],\n i = 0,\n key;\n\n while (names.length > i) {\n if (has(AllSymbols, key = names[i++]) && (IS_OP ? has(ObjectProto, key) : true)) result.push(AllSymbols[key]);\n }\n\n return result;\n }; // 19.4.1.1 Symbol([description])\n\n\n if (!USE_NATIVE) {\n $Symbol = function Symbol() {\n if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor!');\n var tag = uid(arguments.length > 0 ? arguments[0] : undefined);\n\n var $set = function (value) {\n if (this === ObjectProto) $set.call(OPSymbols, value);\n if (has(this, HIDDEN) && has(this[HIDDEN], tag)) this[HIDDEN][tag] = false;\n setSymbolDesc(this, tag, createDesc(1, value));\n };\n\n if (DESCRIPTORS && setter) setSymbolDesc(ObjectProto, tag, {\n configurable: true,\n set: $set\n });\n return wrap(tag);\n };\n\n redefine($Symbol[PROTOTYPE], 'toString', function toString() {\n return this._k;\n });\n $GOPD.f = $getOwnPropertyDescriptor;\n $DP.f = $defineProperty;\n __webpack_require__(77).f = gOPNExt.f = $getOwnPropertyNames;\n __webpack_require__(74).f = $propertyIsEnumerable;\n __webpack_require__(73).f = $getOwnPropertySymbols;\n\n if (DESCRIPTORS && !__webpack_require__(14)) {\n redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true);\n }\n\n wksExt.f = function (name) {\n return wrap(wks(name));\n };\n }\n\n $export($export.G + $export.W + $export.F * !USE_NATIVE, {\n Symbol: $Symbol\n });\n\n for (var symbols = // 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14\n 'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables'.split(','), i = 0; symbols.length > i;) wks(symbols[i++]);\n\n for (var symbols = $keys(wks.store), i = 0; symbols.length > i;) wksDefine(symbols[i++]);\n\n $export($export.S + $export.F * !USE_NATIVE, 'Symbol', {\n // 19.4.2.1 Symbol.for(key)\n 'for': function (key) {\n return has(SymbolRegistry, key += '') ? SymbolRegistry[key] : SymbolRegistry[key] = $Symbol(key);\n },\n // 19.4.2.5 Symbol.keyFor(sym)\n keyFor: function keyFor(key) {\n if (isSymbol(key)) return keyOf(SymbolRegistry, key);\n throw TypeError(key + ' is not a symbol!');\n },\n useSetter: function () {\n setter = true;\n },\n useSimple: function () {\n setter = false;\n }\n });\n $export($export.S + $export.F * !USE_NATIVE, 'Object', {\n // 19.1.2.2 Object.create(O [, Properties])\n create: $create,\n // 19.1.2.4 Object.defineProperty(O, P, Attributes)\n defineProperty: $defineProperty,\n // 19.1.2.3 Object.defineProperties(O, Properties)\n defineProperties: $defineProperties,\n // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P)\n getOwnPropertyDescriptor: $getOwnPropertyDescriptor,\n // 19.1.2.7 Object.getOwnPropertyNames(O)\n getOwnPropertyNames: $getOwnPropertyNames,\n // 19.1.2.8 Object.getOwnPropertySymbols(O)\n getOwnPropertySymbols: $getOwnPropertySymbols\n }); // 24.3.2 JSON.stringify(value [, replacer [, space]])\n\n $JSON && $export($export.S + $export.F * (!USE_NATIVE || $fails(function () {\n var S = $Symbol(); // MS Edge converts symbol values to JSON as {}\n // WebKit converts symbol values to JSON as null\n // V8 throws on boxed symbols\n\n return _stringify([S]) != '[null]' || _stringify({\n a: S\n }) != '{}' || _stringify(Object(S)) != '{}';\n })), 'JSON', {\n stringify: function stringify(it) {\n if (it === undefined || isSymbol(it)) return; // IE8 returns string on undefined\n\n var args = [it],\n i = 1,\n replacer,\n $replacer;\n\n while (arguments.length > i) args.push(arguments[i++]);\n\n replacer = args[1];\n if (typeof replacer == 'function') $replacer = replacer;\n if ($replacer || !isArray(replacer)) replacer = function (key, value) {\n if ($replacer) value = $replacer.call(this, key, value);\n if (!isSymbol(value)) return value;\n };\n args[1] = replacer;\n return _stringify.apply($JSON, args);\n }\n }); // 19.4.3.4 Symbol.prototype[@@toPrimitive](hint)\n\n $Symbol[PROTOTYPE][TO_PRIMITIVE] || __webpack_require__(20)($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf); // 19.4.3.5 Symbol.prototype[@@toStringTag]\n\n setToStringTag($Symbol, 'Symbol'); // 20.2.1.9 Math[@@toStringTag]\n\n setToStringTag(Math, 'Math', true); // 24.3.3 JSON[@@toStringTag]\n\n setToStringTag(global.JSON, 'JSON', true);\n /***/\n },\n /* 69 */\n\n /***/\n function (module, exports, __webpack_require__) {\n var META = __webpack_require__(43)('meta'),\n isObject = __webpack_require__(23),\n has = __webpack_require__(31),\n setDesc = __webpack_require__(21).f,\n id = 0;\n\n var isExtensible = Object.isExtensible || function () {\n return true;\n };\n\n var FREEZE = !__webpack_require__(26)(function () {\n return isExtensible(Object.preventExtensions({}));\n });\n\n var setMeta = function (it) {\n setDesc(it, META, {\n value: {\n i: 'O' + ++id,\n // object ID\n w: {} // weak collections IDs\n\n }\n });\n };\n\n var fastKey = function (it, create) {\n // return primitive with prefix\n if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it;\n\n if (!has(it, META)) {\n // can't set metadata to uncaught frozen object\n if (!isExtensible(it)) return 'F'; // not necessary to add metadata\n\n if (!create) return 'E'; // add missing metadata\n\n setMeta(it); // return object ID\n }\n\n return it[META].i;\n };\n\n var getWeak = function (it, create) {\n if (!has(it, META)) {\n // can't set metadata to uncaught frozen object\n if (!isExtensible(it)) return true; // not necessary to add metadata\n\n if (!create) return false; // add missing metadata\n\n setMeta(it); // return hash weak collections IDs\n }\n\n return it[META].w;\n }; // add metadata on freeze-family methods calling\n\n\n var onFreeze = function (it) {\n if (FREEZE && meta.NEED && isExtensible(it) && !has(it, META)) setMeta(it);\n return it;\n };\n\n var meta = module.exports = {\n KEY: META,\n NEED: false,\n fastKey: fastKey,\n getWeak: getWeak,\n onFreeze: onFreeze\n };\n /***/\n },\n /* 70 */\n\n /***/\n function (module, exports, __webpack_require__) {\n var global = __webpack_require__(16),\n core = __webpack_require__(17),\n LIBRARY = __webpack_require__(14),\n wksExt = __webpack_require__(65),\n defineProperty = __webpack_require__(21).f;\n\n module.exports = function (name) {\n var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {});\n if (name.charAt(0) != '_' && !(name in $Symbol)) defineProperty($Symbol, name, {\n value: wksExt.f(name)\n });\n };\n /***/\n\n },\n /* 71 */\n\n /***/\n function (module, exports, __webpack_require__) {\n var getKeys = __webpack_require__(35),\n toIObject = __webpack_require__(9);\n\n module.exports = function (object, el) {\n var O = toIObject(object),\n keys = getKeys(O),\n length = keys.length,\n index = 0,\n key;\n\n while (length > index) if (O[key = keys[index++]] === el) return key;\n };\n /***/\n\n },\n /* 72 */\n\n /***/\n function (module, exports, __webpack_require__) {\n // all enumerable object keys, includes symbols\n var getKeys = __webpack_require__(35),\n gOPS = __webpack_require__(73),\n pIE = __webpack_require__(74);\n\n module.exports = function (it) {\n var result = getKeys(it),\n getSymbols = gOPS.f;\n\n if (getSymbols) {\n var symbols = getSymbols(it),\n isEnum = pIE.f,\n i = 0,\n key;\n\n while (symbols.length > i) if (isEnum.call(it, key = symbols[i++])) result.push(key);\n }\n\n return result;\n };\n /***/\n\n },\n /* 73 */\n\n /***/\n function (module, exports) {\n exports.f = Object.getOwnPropertySymbols;\n /***/\n },\n /* 74 */\n\n /***/\n function (module, exports) {\n exports.f = {}.propertyIsEnumerable;\n /***/\n },\n /* 75 */\n\n /***/\n function (module, exports, __webpack_require__) {\n // 7.2.2 IsArray(argument)\n var cof = __webpack_require__(11);\n\n module.exports = Array.isArray || function isArray(arg) {\n return cof(arg) == 'Array';\n };\n /***/\n\n },\n /* 76 */\n\n /***/\n function (module, exports, __webpack_require__) {\n // fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window\n var toIObject = __webpack_require__(9),\n gOPN = __webpack_require__(77).f,\n toString = {}.toString;\n\n var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames ? Object.getOwnPropertyNames(window) : [];\n\n var getWindowNames = function (it) {\n try {\n return gOPN(it);\n } catch (e) {\n return windowNames.slice();\n }\n };\n\n module.exports.f = function getOwnPropertyNames(it) {\n return windowNames && toString.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(toIObject(it));\n };\n /***/\n\n },\n /* 77 */\n\n /***/\n function (module, exports, __webpack_require__) {\n // 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O)\n var $keys = __webpack_require__(36),\n hiddenKeys = __webpack_require__(44).concat('length', 'prototype');\n\n exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {\n return $keys(O, hiddenKeys);\n };\n /***/\n\n },\n /* 78 */\n\n /***/\n function (module, exports, __webpack_require__) {\n var pIE = __webpack_require__(74),\n createDesc = __webpack_require__(29),\n toIObject = __webpack_require__(9),\n toPrimitive = __webpack_require__(28),\n has = __webpack_require__(31),\n IE8_DOM_DEFINE = __webpack_require__(24),\n gOPD = Object.getOwnPropertyDescriptor;\n\n exports.f = __webpack_require__(25) ? gOPD : function getOwnPropertyDescriptor(O, P) {\n O = toIObject(O);\n P = toPrimitive(P, true);\n if (IE8_DOM_DEFINE) try {\n return gOPD(O, P);\n } catch (e) {\n /* empty */\n }\n if (has(O, P)) return createDesc(!pIE.f.call(O, P), O[P]);\n };\n /***/\n },\n /* 79 */\n\n /***/\n function (module, exports) {\n /***/\n },\n /* 80 */\n\n /***/\n function (module, exports, __webpack_require__) {\n __webpack_require__(70)('asyncIterator');\n /***/\n\n },\n /* 81 */\n\n /***/\n function (module, exports, __webpack_require__) {\n __webpack_require__(70)('observable');\n /***/\n\n },\n /* 82 */\n\n /***/\n function (module, exports, __webpack_require__) {\n 'use strict'; // first check if moment.js is already loaded in the browser window, if so,\n // use this instance. Else, load via commonjs.\n\n module.exports = typeof window !== 'undefined' && window['moment'] || __webpack_require__(83);\n /***/\n },\n /* 83 */\n\n /***/\n function (module, exports, __webpack_require__) {\n /* WEBPACK VAR INJECTION */\n (function (module) {\n //! moment.js\n //! version : 2.18.0\n //! authors : Tim Wood, Iskren Chernev, Moment.js contributors\n //! license : MIT\n //! momentjs.com\n ;\n\n (function (global, factory) {\n true ? module.exports = factory() : typeof define === 'function' && define.amd ? define(factory) : global.moment = factory();\n })(this, function () {\n 'use strict';\n\n var hookCallback;\n\n function hooks() {\n return hookCallback.apply(null, arguments);\n } // This is done to register the method called with moment()\n // without creating circular dependencies.\n\n\n function setHookCallback(callback) {\n hookCallback = callback;\n }\n\n function isArray(input) {\n return input instanceof Array || Object.prototype.toString.call(input) === '[object Array]';\n }\n\n function isObject(input) {\n // IE8 will treat undefined and null as object if it wasn't for\n // input != null\n return input != null && Object.prototype.toString.call(input) === '[object Object]';\n }\n\n function isObjectEmpty(obj) {\n var k;\n\n for (k in obj) {\n // even if its not own property I'd still call it non-empty\n return false;\n }\n\n return true;\n }\n\n function isUndefined(input) {\n return input === void 0;\n }\n\n function isNumber(input) {\n return typeof input === 'number' || Object.prototype.toString.call(input) === '[object Number]';\n }\n\n function isDate(input) {\n return input instanceof Date || Object.prototype.toString.call(input) === '[object Date]';\n }\n\n function map(arr, fn) {\n var res = [],\n i;\n\n for (i = 0; i < arr.length; ++i) {\n res.push(fn(arr[i], i));\n }\n\n return res;\n }\n\n function hasOwnProp(a, b) {\n return Object.prototype.hasOwnProperty.call(a, b);\n }\n\n function extend(a, b) {\n for (var i in b) {\n if (hasOwnProp(b, i)) {\n a[i] = b[i];\n }\n }\n\n if (hasOwnProp(b, 'toString')) {\n a.toString = b.toString;\n }\n\n if (hasOwnProp(b, 'valueOf')) {\n a.valueOf = b.valueOf;\n }\n\n return a;\n }\n\n function createUTC(input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, true).utc();\n }\n\n function defaultParsingFlags() {\n // We need to deep clone this object.\n return {\n empty: false,\n unusedTokens: [],\n unusedInput: [],\n overflow: -2,\n charsLeftOver: 0,\n nullInput: false,\n invalidMonth: null,\n invalidFormat: false,\n userInvalidated: false,\n iso: false,\n parsedDateParts: [],\n meridiem: null,\n rfc2822: false,\n weekdayMismatch: false\n };\n }\n\n function getParsingFlags(m) {\n if (m._pf == null) {\n m._pf = defaultParsingFlags();\n }\n\n return m._pf;\n }\n\n var some;\n\n if (Array.prototype.some) {\n some = Array.prototype.some;\n } else {\n some = function (fun) {\n var t = Object(this);\n var len = t.length >>> 0;\n\n for (var i = 0; i < len; i++) {\n if (i in t && fun.call(this, t[i], i, t)) {\n return true;\n }\n }\n\n return false;\n };\n }\n\n var some$1 = some;\n\n function isValid(m) {\n if (m._isValid == null) {\n var flags = getParsingFlags(m);\n var parsedParts = some$1.call(flags.parsedDateParts, function (i) {\n return i != null;\n });\n var isNowValid = !isNaN(m._d.getTime()) && flags.overflow < 0 && !flags.empty && !flags.invalidMonth && !flags.invalidWeekday && !flags.nullInput && !flags.invalidFormat && !flags.userInvalidated && (!flags.meridiem || flags.meridiem && parsedParts);\n\n if (m._strict) {\n isNowValid = isNowValid && flags.charsLeftOver === 0 && flags.unusedTokens.length === 0 && flags.bigHour === undefined;\n }\n\n if (Object.isFrozen == null || !Object.isFrozen(m)) {\n m._isValid = isNowValid;\n } else {\n return isNowValid;\n }\n }\n\n return m._isValid;\n }\n\n function createInvalid(flags) {\n var m = createUTC(NaN);\n\n if (flags != null) {\n extend(getParsingFlags(m), flags);\n } else {\n getParsingFlags(m).userInvalidated = true;\n }\n\n return m;\n } // Plugins that add properties should also add the key here (null value),\n // so we can properly clone ourselves.\n\n\n var momentProperties = hooks.momentProperties = [];\n\n function copyConfig(to, from) {\n var i, prop, val;\n\n if (!isUndefined(from._isAMomentObject)) {\n to._isAMomentObject = from._isAMomentObject;\n }\n\n if (!isUndefined(from._i)) {\n to._i = from._i;\n }\n\n if (!isUndefined(from._f)) {\n to._f = from._f;\n }\n\n if (!isUndefined(from._l)) {\n to._l = from._l;\n }\n\n if (!isUndefined(from._strict)) {\n to._strict = from._strict;\n }\n\n if (!isUndefined(from._tzm)) {\n to._tzm = from._tzm;\n }\n\n if (!isUndefined(from._isUTC)) {\n to._isUTC = from._isUTC;\n }\n\n if (!isUndefined(from._offset)) {\n to._offset = from._offset;\n }\n\n if (!isUndefined(from._pf)) {\n to._pf = getParsingFlags(from);\n }\n\n if (!isUndefined(from._locale)) {\n to._locale = from._locale;\n }\n\n if (momentProperties.length > 0) {\n for (i = 0; i < momentProperties.length; i++) {\n prop = momentProperties[i];\n val = from[prop];\n\n if (!isUndefined(val)) {\n to[prop] = val;\n }\n }\n }\n\n return to;\n }\n\n var updateInProgress = false; // Moment prototype object\n\n function Moment(config) {\n copyConfig(this, config);\n this._d = new Date(config._d != null ? config._d.getTime() : NaN);\n\n if (!this.isValid()) {\n this._d = new Date(NaN);\n } // Prevent infinite loop in case updateOffset creates new moment\n // objects.\n\n\n if (updateInProgress === false) {\n updateInProgress = true;\n hooks.updateOffset(this);\n updateInProgress = false;\n }\n }\n\n function isMoment(obj) {\n return obj instanceof Moment || obj != null && obj._isAMomentObject != null;\n }\n\n function absFloor(number) {\n if (number < 0) {\n // -0 -> 0\n return Math.ceil(number) || 0;\n } else {\n return Math.floor(number);\n }\n }\n\n function toInt(argumentForCoercion) {\n var coercedNumber = +argumentForCoercion,\n value = 0;\n\n if (coercedNumber !== 0 && isFinite(coercedNumber)) {\n value = absFloor(coercedNumber);\n }\n\n return value;\n } // compare two arrays, return the number of differences\n\n\n function compareArrays(array1, array2, dontConvert) {\n var len = Math.min(array1.length, array2.length),\n lengthDiff = Math.abs(array1.length - array2.length),\n diffs = 0,\n i;\n\n for (i = 0; i < len; i++) {\n if (dontConvert && array1[i] !== array2[i] || !dontConvert && toInt(array1[i]) !== toInt(array2[i])) {\n diffs++;\n }\n }\n\n return diffs + lengthDiff;\n }\n\n function warn(msg) {\n if (hooks.suppressDeprecationWarnings === false && typeof console !== 'undefined' && console.warn) {\n console.warn('Deprecation warning: ' + msg);\n }\n }\n\n function deprecate(msg, fn) {\n var firstTime = true;\n return extend(function () {\n if (hooks.deprecationHandler != null) {\n hooks.deprecationHandler(null, msg);\n }\n\n if (firstTime) {\n var args = [];\n var arg;\n\n for (var i = 0; i < arguments.length; i++) {\n arg = '';\n\n if (typeof arguments[i] === 'object') {\n arg += '\\n[' + i + '] ';\n\n for (var key in arguments[0]) {\n arg += key + ': ' + arguments[0][key] + ', ';\n }\n\n arg = arg.slice(0, -2); // Remove trailing comma and space\n } else {\n arg = arguments[i];\n }\n\n args.push(arg);\n }\n\n warn(msg + '\\nArguments: ' + Array.prototype.slice.call(args).join('') + '\\n' + new Error().stack);\n firstTime = false;\n }\n\n return fn.apply(this, arguments);\n }, fn);\n }\n\n var deprecations = {};\n\n function deprecateSimple(name, msg) {\n if (hooks.deprecationHandler != null) {\n hooks.deprecationHandler(name, msg);\n }\n\n if (!deprecations[name]) {\n warn(msg);\n deprecations[name] = true;\n }\n }\n\n hooks.suppressDeprecationWarnings = false;\n hooks.deprecationHandler = null;\n\n function isFunction(input) {\n return input instanceof Function || Object.prototype.toString.call(input) === '[object Function]';\n }\n\n function set(config) {\n var prop, i;\n\n for (i in config) {\n prop = config[i];\n\n if (isFunction(prop)) {\n this[i] = prop;\n } else {\n this['_' + i] = prop;\n }\n }\n\n this._config = config; // Lenient ordinal parsing accepts just a number in addition to\n // number + (possibly) stuff coming from _dayOfMonthOrdinalParse.\n // TODO: Remove \"ordinalParse\" fallback in next major release.\n\n this._dayOfMonthOrdinalParseLenient = new RegExp((this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) + '|' + /\\d{1,2}/.source);\n }\n\n function mergeConfigs(parentConfig, childConfig) {\n var res = extend({}, parentConfig),\n prop;\n\n for (prop in childConfig) {\n if (hasOwnProp(childConfig, prop)) {\n if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) {\n res[prop] = {};\n extend(res[prop], parentConfig[prop]);\n extend(res[prop], childConfig[prop]);\n } else if (childConfig[prop] != null) {\n res[prop] = childConfig[prop];\n } else {\n delete res[prop];\n }\n }\n }\n\n for (prop in parentConfig) {\n if (hasOwnProp(parentConfig, prop) && !hasOwnProp(childConfig, prop) && isObject(parentConfig[prop])) {\n // make sure changes to properties don't modify parent config\n res[prop] = extend({}, res[prop]);\n }\n }\n\n return res;\n }\n\n function Locale(config) {\n if (config != null) {\n this.set(config);\n }\n }\n\n var keys;\n\n if (Object.keys) {\n keys = Object.keys;\n } else {\n keys = function (obj) {\n var i,\n res = [];\n\n for (i in obj) {\n if (hasOwnProp(obj, i)) {\n res.push(i);\n }\n }\n\n return res;\n };\n }\n\n var keys$1 = keys;\n var defaultCalendar = {\n sameDay: '[Today at] LT',\n nextDay: '[Tomorrow at] LT',\n nextWeek: 'dddd [at] LT',\n lastDay: '[Yesterday at] LT',\n lastWeek: '[Last] dddd [at] LT',\n sameElse: 'L'\n };\n\n function calendar(key, mom, now) {\n var output = this._calendar[key] || this._calendar['sameElse'];\n return isFunction(output) ? output.call(mom, now) : output;\n }\n\n var defaultLongDateFormat = {\n LTS: 'h:mm:ss A',\n LT: 'h:mm A',\n L: 'MM/DD/YYYY',\n LL: 'MMMM D, YYYY',\n LLL: 'MMMM D, YYYY h:mm A',\n LLLL: 'dddd, MMMM D, YYYY h:mm A'\n };\n\n function longDateFormat(key) {\n var format = this._longDateFormat[key],\n formatUpper = this._longDateFormat[key.toUpperCase()];\n\n if (format || !formatUpper) {\n return format;\n }\n\n this._longDateFormat[key] = formatUpper.replace(/MMMM|MM|DD|dddd/g, function (val) {\n return val.slice(1);\n });\n return this._longDateFormat[key];\n }\n\n var defaultInvalidDate = 'Invalid date';\n\n function invalidDate() {\n return this._invalidDate;\n }\n\n var defaultOrdinal = '%d';\n var defaultDayOfMonthOrdinalParse = /\\d{1,2}/;\n\n function ordinal(number) {\n return this._ordinal.replace('%d', number);\n }\n\n var defaultRelativeTime = {\n future: 'in %s',\n past: '%s ago',\n s: 'a few seconds',\n ss: '%d seconds',\n m: 'a minute',\n mm: '%d minutes',\n h: 'an hour',\n hh: '%d hours',\n d: 'a day',\n dd: '%d days',\n M: 'a month',\n MM: '%d months',\n y: 'a year',\n yy: '%d years'\n };\n\n function relativeTime(number, withoutSuffix, string, isFuture) {\n var output = this._relativeTime[string];\n return isFunction(output) ? output(number, withoutSuffix, string, isFuture) : output.replace(/%d/i, number);\n }\n\n function pastFuture(diff, output) {\n var format = this._relativeTime[diff > 0 ? 'future' : 'past'];\n return isFunction(format) ? format(output) : format.replace(/%s/i, output);\n }\n\n var aliases = {};\n\n function addUnitAlias(unit, shorthand) {\n var lowerCase = unit.toLowerCase();\n aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit;\n }\n\n function normalizeUnits(units) {\n return typeof units === 'string' ? aliases[units] || aliases[units.toLowerCase()] : undefined;\n }\n\n function normalizeObjectUnits(inputObject) {\n var normalizedInput = {},\n normalizedProp,\n prop;\n\n for (prop in inputObject) {\n if (hasOwnProp(inputObject, prop)) {\n normalizedProp = normalizeUnits(prop);\n\n if (normalizedProp) {\n normalizedInput[normalizedProp] = inputObject[prop];\n }\n }\n }\n\n return normalizedInput;\n }\n\n var priorities = {};\n\n function addUnitPriority(unit, priority) {\n priorities[unit] = priority;\n }\n\n function getPrioritizedUnits(unitsObj) {\n var units = [];\n\n for (var u in unitsObj) {\n units.push({\n unit: u,\n priority: priorities[u]\n });\n }\n\n units.sort(function (a, b) {\n return a.priority - b.priority;\n });\n return units;\n }\n\n function makeGetSet(unit, keepTime) {\n return function (value) {\n if (value != null) {\n set$1(this, unit, value);\n hooks.updateOffset(this, keepTime);\n return this;\n } else {\n return get(this, unit);\n }\n };\n }\n\n function get(mom, unit) {\n return mom.isValid() ? mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]() : NaN;\n }\n\n function set$1(mom, unit, value) {\n if (mom.isValid()) {\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value);\n }\n } // MOMENTS\n\n\n function stringGet(units) {\n units = normalizeUnits(units);\n\n if (isFunction(this[units])) {\n return this[units]();\n }\n\n return this;\n }\n\n function stringSet(units, value) {\n if (typeof units === 'object') {\n units = normalizeObjectUnits(units);\n var prioritized = getPrioritizedUnits(units);\n\n for (var i = 0; i < prioritized.length; i++) {\n this[prioritized[i].unit](units[prioritized[i].unit]);\n }\n } else {\n units = normalizeUnits(units);\n\n if (isFunction(this[units])) {\n return this[units](value);\n }\n }\n\n return this;\n }\n\n function zeroFill(number, targetLength, forceSign) {\n var absNumber = '' + Math.abs(number),\n zerosToFill = targetLength - absNumber.length,\n sign = number >= 0;\n return (sign ? forceSign ? '+' : '' : '-') + Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) + absNumber;\n }\n\n var formattingTokens = /(\\[[^\\[]*\\])|(\\\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g;\n var localFormattingTokens = /(\\[[^\\[]*\\])|(\\\\)?(LTS|LT|LL?L?L?|l{1,4})/g;\n var formatFunctions = {};\n var formatTokenFunctions = {}; // token: 'M'\n // padded: ['MM', 2]\n // ordinal: 'Mo'\n // callback: function () { this.month() + 1 }\n\n function addFormatToken(token, padded, ordinal, callback) {\n var func = callback;\n\n if (typeof callback === 'string') {\n func = function () {\n return this[callback]();\n };\n }\n\n if (token) {\n formatTokenFunctions[token] = func;\n }\n\n if (padded) {\n formatTokenFunctions[padded[0]] = function () {\n return zeroFill(func.apply(this, arguments), padded[1], padded[2]);\n };\n }\n\n if (ordinal) {\n formatTokenFunctions[ordinal] = function () {\n return this.localeData().ordinal(func.apply(this, arguments), token);\n };\n }\n }\n\n function removeFormattingTokens(input) {\n if (input.match(/\\[[\\s\\S]/)) {\n return input.replace(/^\\[|\\]$/g, '');\n }\n\n return input.replace(/\\\\/g, '');\n }\n\n function makeFormatFunction(format) {\n var array = format.match(formattingTokens),\n i,\n length;\n\n for (i = 0, length = array.length; i < length; i++) {\n if (formatTokenFunctions[array[i]]) {\n array[i] = formatTokenFunctions[array[i]];\n } else {\n array[i] = removeFormattingTokens(array[i]);\n }\n }\n\n return function (mom) {\n var output = '',\n i;\n\n for (i = 0; i < length; i++) {\n output += isFunction(array[i]) ? array[i].call(mom, format) : array[i];\n }\n\n return output;\n };\n } // format date using native date object\n\n\n function formatMoment(m, format) {\n if (!m.isValid()) {\n return m.localeData().invalidDate();\n }\n\n format = expandFormat(format, m.localeData());\n formatFunctions[format] = formatFunctions[format] || makeFormatFunction(format);\n return formatFunctions[format](m);\n }\n\n function expandFormat(format, locale) {\n var i = 5;\n\n function replaceLongDateFormatTokens(input) {\n return locale.longDateFormat(input) || input;\n }\n\n localFormattingTokens.lastIndex = 0;\n\n while (i >= 0 && localFormattingTokens.test(format)) {\n format = format.replace(localFormattingTokens, replaceLongDateFormatTokens);\n localFormattingTokens.lastIndex = 0;\n i -= 1;\n }\n\n return format;\n }\n\n var match1 = /\\d/; // 0 - 9\n\n var match2 = /\\d\\d/; // 00 - 99\n\n var match3 = /\\d{3}/; // 000 - 999\n\n var match4 = /\\d{4}/; // 0000 - 9999\n\n var match6 = /[+-]?\\d{6}/; // -999999 - 999999\n\n var match1to2 = /\\d\\d?/; // 0 - 99\n\n var match3to4 = /\\d\\d\\d\\d?/; // 999 - 9999\n\n var match5to6 = /\\d\\d\\d\\d\\d\\d?/; // 99999 - 999999\n\n var match1to3 = /\\d{1,3}/; // 0 - 999\n\n var match1to4 = /\\d{1,4}/; // 0 - 9999\n\n var match1to6 = /[+-]?\\d{1,6}/; // -999999 - 999999\n\n var matchUnsigned = /\\d+/; // 0 - inf\n\n var matchSigned = /[+-]?\\d+/; // -inf - inf\n\n var matchOffset = /Z|[+-]\\d\\d:?\\d\\d/gi; // +00:00 -00:00 +0000 -0000 or Z\n\n var matchShortOffset = /Z|[+-]\\d\\d(?::?\\d\\d)?/gi; // +00 -00 +00:00 -00:00 +0000 -0000 or Z\n\n var matchTimestamp = /[+-]?\\d+(\\.\\d{1,3})?/; // 123456789 123456789.123\n // any word (or two) characters or numbers including two/three word month in arabic.\n // includes scottish gaelic two word and hyphenated months\n\n var matchWord = /[0-9]*['a-z\\u00A0-\\u05FF\\u0700-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]+|[\\u0600-\\u06FF\\/]+(\\s*?[\\u0600-\\u06FF]+){1,2}/i;\n var regexes = {};\n\n function addRegexToken(token, regex, strictRegex) {\n regexes[token] = isFunction(regex) ? regex : function (isStrict, localeData) {\n return isStrict && strictRegex ? strictRegex : regex;\n };\n }\n\n function getParseRegexForToken(token, config) {\n if (!hasOwnProp(regexes, token)) {\n return new RegExp(unescapeFormat(token));\n }\n\n return regexes[token](config._strict, config._locale);\n } // Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript\n\n\n function unescapeFormat(s) {\n return regexEscape(s.replace('\\\\', '').replace(/\\\\(\\[)|\\\\(\\])|\\[([^\\]\\[]*)\\]|\\\\(.)/g, function (matched, p1, p2, p3, p4) {\n return p1 || p2 || p3 || p4;\n }));\n }\n\n function regexEscape(s) {\n return s.replace(/[-\\/\\\\^$*+?.()|[\\]{}]/g, '\\\\$&');\n }\n\n var tokens = {};\n\n function addParseToken(token, callback) {\n var i,\n func = callback;\n\n if (typeof token === 'string') {\n token = [token];\n }\n\n if (isNumber(callback)) {\n func = function (input, array) {\n array[callback] = toInt(input);\n };\n }\n\n for (i = 0; i < token.length; i++) {\n tokens[token[i]] = func;\n }\n }\n\n function addWeekParseToken(token, callback) {\n addParseToken(token, function (input, array, config, token) {\n config._w = config._w || {};\n callback(input, config._w, config, token);\n });\n }\n\n function addTimeToArrayFromToken(token, input, config) {\n if (input != null && hasOwnProp(tokens, token)) {\n tokens[token](input, config._a, config, token);\n }\n }\n\n var YEAR = 0;\n var MONTH = 1;\n var DATE = 2;\n var HOUR = 3;\n var MINUTE = 4;\n var SECOND = 5;\n var MILLISECOND = 6;\n var WEEK = 7;\n var WEEKDAY = 8;\n var indexOf;\n\n if (Array.prototype.indexOf) {\n indexOf = Array.prototype.indexOf;\n } else {\n indexOf = function (o) {\n // I know\n var i;\n\n for (i = 0; i < this.length; ++i) {\n if (this[i] === o) {\n return i;\n }\n }\n\n return -1;\n };\n }\n\n var indexOf$1 = indexOf;\n\n function daysInMonth(year, month) {\n return new Date(Date.UTC(year, month + 1, 0)).getUTCDate();\n } // FORMATTING\n\n\n addFormatToken('M', ['MM', 2], 'Mo', function () {\n return this.month() + 1;\n });\n addFormatToken('MMM', 0, 0, function (format) {\n return this.localeData().monthsShort(this, format);\n });\n addFormatToken('MMMM', 0, 0, function (format) {\n return this.localeData().months(this, format);\n }); // ALIASES\n\n addUnitAlias('month', 'M'); // PRIORITY\n\n addUnitPriority('month', 8); // PARSING\n\n addRegexToken('M', match1to2);\n addRegexToken('MM', match1to2, match2);\n addRegexToken('MMM', function (isStrict, locale) {\n return locale.monthsShortRegex(isStrict);\n });\n addRegexToken('MMMM', function (isStrict, locale) {\n return locale.monthsRegex(isStrict);\n });\n addParseToken(['M', 'MM'], function (input, array) {\n array[MONTH] = toInt(input) - 1;\n });\n addParseToken(['MMM', 'MMMM'], function (input, array, config, token) {\n var month = config._locale.monthsParse(input, token, config._strict); // if we didn't find a month name, mark the date as invalid.\n\n\n if (month != null) {\n array[MONTH] = month;\n } else {\n getParsingFlags(config).invalidMonth = input;\n }\n }); // LOCALES\n\n var MONTHS_IN_FORMAT = /D[oD]?(\\[[^\\[\\]]*\\]|\\s)+MMMM?/;\n var defaultLocaleMonths = 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_');\n\n function localeMonths(m, format) {\n if (!m) {\n return isArray(this._months) ? this._months : this._months['standalone'];\n }\n\n return isArray(this._months) ? this._months[m.month()] : this._months[(this._months.isFormat || MONTHS_IN_FORMAT).test(format) ? 'format' : 'standalone'][m.month()];\n }\n\n var defaultLocaleMonthsShort = 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_');\n\n function localeMonthsShort(m, format) {\n if (!m) {\n return isArray(this._monthsShort) ? this._monthsShort : this._monthsShort['standalone'];\n }\n\n return isArray(this._monthsShort) ? this._monthsShort[m.month()] : this._monthsShort[MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'][m.month()];\n }\n\n function handleStrictParse(monthName, format, strict) {\n var i,\n ii,\n mom,\n llc = monthName.toLocaleLowerCase();\n\n if (!this._monthsParse) {\n // this is not used\n this._monthsParse = [];\n this._longMonthsParse = [];\n this._shortMonthsParse = [];\n\n for (i = 0; i < 12; ++i) {\n mom = createUTC([2000, i]);\n this._shortMonthsParse[i] = this.monthsShort(mom, '').toLocaleLowerCase();\n this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase();\n }\n }\n\n if (strict) {\n if (format === 'MMM') {\n ii = indexOf$1.call(this._shortMonthsParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf$1.call(this._longMonthsParse, llc);\n return ii !== -1 ? ii : null;\n }\n } else {\n if (format === 'MMM') {\n ii = indexOf$1.call(this._shortMonthsParse, llc);\n\n if (ii !== -1) {\n return ii;\n }\n\n ii = indexOf$1.call(this._longMonthsParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf$1.call(this._longMonthsParse, llc);\n\n if (ii !== -1) {\n return ii;\n }\n\n ii = indexOf$1.call(this._shortMonthsParse, llc);\n return ii !== -1 ? ii : null;\n }\n }\n }\n\n function localeMonthsParse(monthName, format, strict) {\n var i, mom, regex;\n\n if (this._monthsParseExact) {\n return handleStrictParse.call(this, monthName, format, strict);\n }\n\n if (!this._monthsParse) {\n this._monthsParse = [];\n this._longMonthsParse = [];\n this._shortMonthsParse = [];\n } // TODO: add sorting\n // Sorting makes sure if one month (or abbr) is a prefix of another\n // see sorting in computeMonthsParse\n\n\n for (i = 0; i < 12; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, i]);\n\n if (strict && !this._longMonthsParse[i]) {\n this._longMonthsParse[i] = new RegExp('^' + this.months(mom, '').replace('.', '') + '$', 'i');\n this._shortMonthsParse[i] = new RegExp('^' + this.monthsShort(mom, '').replace('.', '') + '$', 'i');\n }\n\n if (!strict && !this._monthsParse[i]) {\n regex = '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, '');\n this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i');\n } // test the regex\n\n\n if (strict && format === 'MMMM' && this._longMonthsParse[i].test(monthName)) {\n return i;\n } else if (strict && format === 'MMM' && this._shortMonthsParse[i].test(monthName)) {\n return i;\n } else if (!strict && this._monthsParse[i].test(monthName)) {\n return i;\n }\n }\n } // MOMENTS\n\n\n function setMonth(mom, value) {\n var dayOfMonth;\n\n if (!mom.isValid()) {\n // No op\n return mom;\n }\n\n if (typeof value === 'string') {\n if (/^\\d+$/.test(value)) {\n value = toInt(value);\n } else {\n value = mom.localeData().monthsParse(value); // TODO: Another silent failure?\n\n if (!isNumber(value)) {\n return mom;\n }\n }\n }\n\n dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value));\n\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth);\n\n return mom;\n }\n\n function getSetMonth(value) {\n if (value != null) {\n setMonth(this, value);\n hooks.updateOffset(this, true);\n return this;\n } else {\n return get(this, 'Month');\n }\n }\n\n function getDaysInMonth() {\n return daysInMonth(this.year(), this.month());\n }\n\n var defaultMonthsShortRegex = matchWord;\n\n function monthsShortRegex(isStrict) {\n if (this._monthsParseExact) {\n if (!hasOwnProp(this, '_monthsRegex')) {\n computeMonthsParse.call(this);\n }\n\n if (isStrict) {\n return this._monthsShortStrictRegex;\n } else {\n return this._monthsShortRegex;\n }\n } else {\n if (!hasOwnProp(this, '_monthsShortRegex')) {\n this._monthsShortRegex = defaultMonthsShortRegex;\n }\n\n return this._monthsShortStrictRegex && isStrict ? this._monthsShortStrictRegex : this._monthsShortRegex;\n }\n }\n\n var defaultMonthsRegex = matchWord;\n\n function monthsRegex(isStrict) {\n if (this._monthsParseExact) {\n if (!hasOwnProp(this, '_monthsRegex')) {\n computeMonthsParse.call(this);\n }\n\n if (isStrict) {\n return this._monthsStrictRegex;\n } else {\n return this._monthsRegex;\n }\n } else {\n if (!hasOwnProp(this, '_monthsRegex')) {\n this._monthsRegex = defaultMonthsRegex;\n }\n\n return this._monthsStrictRegex && isStrict ? this._monthsStrictRegex : this._monthsRegex;\n }\n }\n\n function computeMonthsParse() {\n function cmpLenRev(a, b) {\n return b.length - a.length;\n }\n\n var shortPieces = [],\n longPieces = [],\n mixedPieces = [],\n i,\n mom;\n\n for (i = 0; i < 12; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, i]);\n shortPieces.push(this.monthsShort(mom, ''));\n longPieces.push(this.months(mom, ''));\n mixedPieces.push(this.months(mom, ''));\n mixedPieces.push(this.monthsShort(mom, ''));\n } // Sorting makes sure if one month (or abbr) is a prefix of another it\n // will match the longer piece.\n\n\n shortPieces.sort(cmpLenRev);\n longPieces.sort(cmpLenRev);\n mixedPieces.sort(cmpLenRev);\n\n for (i = 0; i < 12; i++) {\n shortPieces[i] = regexEscape(shortPieces[i]);\n longPieces[i] = regexEscape(longPieces[i]);\n }\n\n for (i = 0; i < 24; i++) {\n mixedPieces[i] = regexEscape(mixedPieces[i]);\n }\n\n this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._monthsShortRegex = this._monthsRegex;\n this._monthsStrictRegex = new RegExp('^(' + longPieces.join('|') + ')', 'i');\n this._monthsShortStrictRegex = new RegExp('^(' + shortPieces.join('|') + ')', 'i');\n } // FORMATTING\n\n\n addFormatToken('Y', 0, 0, function () {\n var y = this.year();\n return y <= 9999 ? '' + y : '+' + y;\n });\n addFormatToken(0, ['YY', 2], 0, function () {\n return this.year() % 100;\n });\n addFormatToken(0, ['YYYY', 4], 0, 'year');\n addFormatToken(0, ['YYYYY', 5], 0, 'year');\n addFormatToken(0, ['YYYYYY', 6, true], 0, 'year'); // ALIASES\n\n addUnitAlias('year', 'y'); // PRIORITIES\n\n addUnitPriority('year', 1); // PARSING\n\n addRegexToken('Y', matchSigned);\n addRegexToken('YY', match1to2, match2);\n addRegexToken('YYYY', match1to4, match4);\n addRegexToken('YYYYY', match1to6, match6);\n addRegexToken('YYYYYY', match1to6, match6);\n addParseToken(['YYYYY', 'YYYYYY'], YEAR);\n addParseToken('YYYY', function (input, array) {\n array[YEAR] = input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input);\n });\n addParseToken('YY', function (input, array) {\n array[YEAR] = hooks.parseTwoDigitYear(input);\n });\n addParseToken('Y', function (input, array) {\n array[YEAR] = parseInt(input, 10);\n }); // HELPERS\n\n function daysInYear(year) {\n return isLeapYear(year) ? 366 : 365;\n }\n\n function isLeapYear(year) {\n return year % 4 === 0 && year % 100 !== 0 || year % 400 === 0;\n } // HOOKS\n\n\n hooks.parseTwoDigitYear = function (input) {\n return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);\n }; // MOMENTS\n\n\n var getSetYear = makeGetSet('FullYear', true);\n\n function getIsLeapYear() {\n return isLeapYear(this.year());\n }\n\n function createDate(y, m, d, h, M, s, ms) {\n // can't just apply() to create a date:\n // https://stackoverflow.com/q/181348\n var date = new Date(y, m, d, h, M, s, ms); // the date constructor remaps years 0-99 to 1900-1999\n\n if (y < 100 && y >= 0 && isFinite(date.getFullYear())) {\n date.setFullYear(y);\n }\n\n return date;\n }\n\n function createUTCDate(y) {\n var date = new Date(Date.UTC.apply(null, arguments)); // the Date.UTC function remaps years 0-99 to 1900-1999\n\n if (y < 100 && y >= 0 && isFinite(date.getUTCFullYear())) {\n date.setUTCFullYear(y);\n }\n\n return date;\n } // start-of-first-week - start-of-year\n\n\n function firstWeekOffset(year, dow, doy) {\n var // first-week day -- which january is always in the first week (4 for iso, 1 for other)\n fwd = 7 + dow - doy,\n // first-week day local weekday -- which local weekday is fwd\n fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7;\n return -fwdlw + fwd - 1;\n } // https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday\n\n\n function dayOfYearFromWeeks(year, week, weekday, dow, doy) {\n var localWeekday = (7 + weekday - dow) % 7,\n weekOffset = firstWeekOffset(year, dow, doy),\n dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset,\n resYear,\n resDayOfYear;\n\n if (dayOfYear <= 0) {\n resYear = year - 1;\n resDayOfYear = daysInYear(resYear) + dayOfYear;\n } else if (dayOfYear > daysInYear(year)) {\n resYear = year + 1;\n resDayOfYear = dayOfYear - daysInYear(year);\n } else {\n resYear = year;\n resDayOfYear = dayOfYear;\n }\n\n return {\n year: resYear,\n dayOfYear: resDayOfYear\n };\n }\n\n function weekOfYear(mom, dow, doy) {\n var weekOffset = firstWeekOffset(mom.year(), dow, doy),\n week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1,\n resWeek,\n resYear;\n\n if (week < 1) {\n resYear = mom.year() - 1;\n resWeek = week + weeksInYear(resYear, dow, doy);\n } else if (week > weeksInYear(mom.year(), dow, doy)) {\n resWeek = week - weeksInYear(mom.year(), dow, doy);\n resYear = mom.year() + 1;\n } else {\n resYear = mom.year();\n resWeek = week;\n }\n\n return {\n week: resWeek,\n year: resYear\n };\n }\n\n function weeksInYear(year, dow, doy) {\n var weekOffset = firstWeekOffset(year, dow, doy),\n weekOffsetNext = firstWeekOffset(year + 1, dow, doy);\n return (daysInYear(year) - weekOffset + weekOffsetNext) / 7;\n } // FORMATTING\n\n\n addFormatToken('w', ['ww', 2], 'wo', 'week');\n addFormatToken('W', ['WW', 2], 'Wo', 'isoWeek'); // ALIASES\n\n addUnitAlias('week', 'w');\n addUnitAlias('isoWeek', 'W'); // PRIORITIES\n\n addUnitPriority('week', 5);\n addUnitPriority('isoWeek', 5); // PARSING\n\n addRegexToken('w', match1to2);\n addRegexToken('ww', match1to2, match2);\n addRegexToken('W', match1to2);\n addRegexToken('WW', match1to2, match2);\n addWeekParseToken(['w', 'ww', 'W', 'WW'], function (input, week, config, token) {\n week[token.substr(0, 1)] = toInt(input);\n }); // HELPERS\n // LOCALES\n\n function localeWeek(mom) {\n return weekOfYear(mom, this._week.dow, this._week.doy).week;\n }\n\n var defaultLocaleWeek = {\n dow: 0,\n // Sunday is the first day of the week.\n doy: 6 // The week that contains Jan 1st is the first week of the year.\n\n };\n\n function localeFirstDayOfWeek() {\n return this._week.dow;\n }\n\n function localeFirstDayOfYear() {\n return this._week.doy;\n } // MOMENTS\n\n\n function getSetWeek(input) {\n var week = this.localeData().week(this);\n return input == null ? week : this.add((input - week) * 7, 'd');\n }\n\n function getSetISOWeek(input) {\n var week = weekOfYear(this, 1, 4).week;\n return input == null ? week : this.add((input - week) * 7, 'd');\n } // FORMATTING\n\n\n addFormatToken('d', 0, 'do', 'day');\n addFormatToken('dd', 0, 0, function (format) {\n return this.localeData().weekdaysMin(this, format);\n });\n addFormatToken('ddd', 0, 0, function (format) {\n return this.localeData().weekdaysShort(this, format);\n });\n addFormatToken('dddd', 0, 0, function (format) {\n return this.localeData().weekdays(this, format);\n });\n addFormatToken('e', 0, 0, 'weekday');\n addFormatToken('E', 0, 0, 'isoWeekday'); // ALIASES\n\n addUnitAlias('day', 'd');\n addUnitAlias('weekday', 'e');\n addUnitAlias('isoWeekday', 'E'); // PRIORITY\n\n addUnitPriority('day', 11);\n addUnitPriority('weekday', 11);\n addUnitPriority('isoWeekday', 11); // PARSING\n\n addRegexToken('d', match1to2);\n addRegexToken('e', match1to2);\n addRegexToken('E', match1to2);\n addRegexToken('dd', function (isStrict, locale) {\n return locale.weekdaysMinRegex(isStrict);\n });\n addRegexToken('ddd', function (isStrict, locale) {\n return locale.weekdaysShortRegex(isStrict);\n });\n addRegexToken('dddd', function (isStrict, locale) {\n return locale.weekdaysRegex(isStrict);\n });\n addWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) {\n var weekday = config._locale.weekdaysParse(input, token, config._strict); // if we didn't get a weekday name, mark the date as invalid\n\n\n if (weekday != null) {\n week.d = weekday;\n } else {\n getParsingFlags(config).invalidWeekday = input;\n }\n });\n addWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) {\n week[token] = toInt(input);\n }); // HELPERS\n\n function parseWeekday(input, locale) {\n if (typeof input !== 'string') {\n return input;\n }\n\n if (!isNaN(input)) {\n return parseInt(input, 10);\n }\n\n input = locale.weekdaysParse(input);\n\n if (typeof input === 'number') {\n return input;\n }\n\n return null;\n }\n\n function parseIsoWeekday(input, locale) {\n if (typeof input === 'string') {\n return locale.weekdaysParse(input) % 7 || 7;\n }\n\n return isNaN(input) ? null : input;\n } // LOCALES\n\n\n var defaultLocaleWeekdays = 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_');\n\n function localeWeekdays(m, format) {\n if (!m) {\n return isArray(this._weekdays) ? this._weekdays : this._weekdays['standalone'];\n }\n\n return isArray(this._weekdays) ? this._weekdays[m.day()] : this._weekdays[this._weekdays.isFormat.test(format) ? 'format' : 'standalone'][m.day()];\n }\n\n var defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_');\n\n function localeWeekdaysShort(m) {\n return m ? this._weekdaysShort[m.day()] : this._weekdaysShort;\n }\n\n var defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_');\n\n function localeWeekdaysMin(m) {\n return m ? this._weekdaysMin[m.day()] : this._weekdaysMin;\n }\n\n function handleStrictParse$1(weekdayName, format, strict) {\n var i,\n ii,\n mom,\n llc = weekdayName.toLocaleLowerCase();\n\n if (!this._weekdaysParse) {\n this._weekdaysParse = [];\n this._shortWeekdaysParse = [];\n this._minWeekdaysParse = [];\n\n for (i = 0; i < 7; ++i) {\n mom = createUTC([2000, 1]).day(i);\n this._minWeekdaysParse[i] = this.weekdaysMin(mom, '').toLocaleLowerCase();\n this._shortWeekdaysParse[i] = this.weekdaysShort(mom, '').toLocaleLowerCase();\n this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase();\n }\n }\n\n if (strict) {\n if (format === 'dddd') {\n ii = indexOf$1.call(this._weekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else if (format === 'ddd') {\n ii = indexOf$1.call(this._shortWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf$1.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n }\n } else {\n if (format === 'dddd') {\n ii = indexOf$1.call(this._weekdaysParse, llc);\n\n if (ii !== -1) {\n return ii;\n }\n\n ii = indexOf$1.call(this._shortWeekdaysParse, llc);\n\n if (ii !== -1) {\n return ii;\n }\n\n ii = indexOf$1.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else if (format === 'ddd') {\n ii = indexOf$1.call(this._shortWeekdaysParse, llc);\n\n if (ii !== -1) {\n return ii;\n }\n\n ii = indexOf$1.call(this._weekdaysParse, llc);\n\n if (ii !== -1) {\n return ii;\n }\n\n ii = indexOf$1.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf$1.call(this._minWeekdaysParse, llc);\n\n if (ii !== -1) {\n return ii;\n }\n\n ii = indexOf$1.call(this._weekdaysParse, llc);\n\n if (ii !== -1) {\n return ii;\n }\n\n ii = indexOf$1.call(this._shortWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n }\n }\n }\n\n function localeWeekdaysParse(weekdayName, format, strict) {\n var i, mom, regex;\n\n if (this._weekdaysParseExact) {\n return handleStrictParse$1.call(this, weekdayName, format, strict);\n }\n\n if (!this._weekdaysParse) {\n this._weekdaysParse = [];\n this._minWeekdaysParse = [];\n this._shortWeekdaysParse = [];\n this._fullWeekdaysParse = [];\n }\n\n for (i = 0; i < 7; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, 1]).day(i);\n\n if (strict && !this._fullWeekdaysParse[i]) {\n this._fullWeekdaysParse[i] = new RegExp('^' + this.weekdays(mom, '').replace('.', '\\.?') + '$', 'i');\n this._shortWeekdaysParse[i] = new RegExp('^' + this.weekdaysShort(mom, '').replace('.', '\\.?') + '$', 'i');\n this._minWeekdaysParse[i] = new RegExp('^' + this.weekdaysMin(mom, '').replace('.', '\\.?') + '$', 'i');\n }\n\n if (!this._weekdaysParse[i]) {\n regex = '^' + this.weekdays(mom, '') + '|^' + this.weekdaysShort(mom, '') + '|^' + this.weekdaysMin(mom, '');\n this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i');\n } // test the regex\n\n\n if (strict && format === 'dddd' && this._fullWeekdaysParse[i].test(weekdayName)) {\n return i;\n } else if (strict && format === 'ddd' && this._shortWeekdaysParse[i].test(weekdayName)) {\n return i;\n } else if (strict && format === 'dd' && this._minWeekdaysParse[i].test(weekdayName)) {\n return i;\n } else if (!strict && this._weekdaysParse[i].test(weekdayName)) {\n return i;\n }\n }\n } // MOMENTS\n\n\n function getSetDayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n\n var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay();\n\n if (input != null) {\n input = parseWeekday(input, this.localeData());\n return this.add(input - day, 'd');\n } else {\n return day;\n }\n }\n\n function getSetLocaleDayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n\n var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7;\n return input == null ? weekday : this.add(input - weekday, 'd');\n }\n\n function getSetISODayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n } // behaves the same as moment#day except\n // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)\n // as a setter, sunday should belong to the previous week.\n\n\n if (input != null) {\n var weekday = parseIsoWeekday(input, this.localeData());\n return this.day(this.day() % 7 ? weekday : weekday - 7);\n } else {\n return this.day() || 7;\n }\n }\n\n var defaultWeekdaysRegex = matchWord;\n\n function weekdaysRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n\n if (isStrict) {\n return this._weekdaysStrictRegex;\n } else {\n return this._weekdaysRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n this._weekdaysRegex = defaultWeekdaysRegex;\n }\n\n return this._weekdaysStrictRegex && isStrict ? this._weekdaysStrictRegex : this._weekdaysRegex;\n }\n }\n\n var defaultWeekdaysShortRegex = matchWord;\n\n function weekdaysShortRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n\n if (isStrict) {\n return this._weekdaysShortStrictRegex;\n } else {\n return this._weekdaysShortRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysShortRegex')) {\n this._weekdaysShortRegex = defaultWeekdaysShortRegex;\n }\n\n return this._weekdaysShortStrictRegex && isStrict ? this._weekdaysShortStrictRegex : this._weekdaysShortRegex;\n }\n }\n\n var defaultWeekdaysMinRegex = matchWord;\n\n function weekdaysMinRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n\n if (isStrict) {\n return this._weekdaysMinStrictRegex;\n } else {\n return this._weekdaysMinRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysMinRegex')) {\n this._weekdaysMinRegex = defaultWeekdaysMinRegex;\n }\n\n return this._weekdaysMinStrictRegex && isStrict ? this._weekdaysMinStrictRegex : this._weekdaysMinRegex;\n }\n }\n\n function computeWeekdaysParse() {\n function cmpLenRev(a, b) {\n return b.length - a.length;\n }\n\n var minPieces = [],\n shortPieces = [],\n longPieces = [],\n mixedPieces = [],\n i,\n mom,\n minp,\n shortp,\n longp;\n\n for (i = 0; i < 7; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, 1]).day(i);\n minp = this.weekdaysMin(mom, '');\n shortp = this.weekdaysShort(mom, '');\n longp = this.weekdays(mom, '');\n minPieces.push(minp);\n shortPieces.push(shortp);\n longPieces.push(longp);\n mixedPieces.push(minp);\n mixedPieces.push(shortp);\n mixedPieces.push(longp);\n } // Sorting makes sure if one weekday (or abbr) is a prefix of another it\n // will match the longer piece.\n\n\n minPieces.sort(cmpLenRev);\n shortPieces.sort(cmpLenRev);\n longPieces.sort(cmpLenRev);\n mixedPieces.sort(cmpLenRev);\n\n for (i = 0; i < 7; i++) {\n shortPieces[i] = regexEscape(shortPieces[i]);\n longPieces[i] = regexEscape(longPieces[i]);\n mixedPieces[i] = regexEscape(mixedPieces[i]);\n }\n\n this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._weekdaysShortRegex = this._weekdaysRegex;\n this._weekdaysMinRegex = this._weekdaysRegex;\n this._weekdaysStrictRegex = new RegExp('^(' + longPieces.join('|') + ')', 'i');\n this._weekdaysShortStrictRegex = new RegExp('^(' + shortPieces.join('|') + ')', 'i');\n this._weekdaysMinStrictRegex = new RegExp('^(' + minPieces.join('|') + ')', 'i');\n } // FORMATTING\n\n\n function hFormat() {\n return this.hours() % 12 || 12;\n }\n\n function kFormat() {\n return this.hours() || 24;\n }\n\n addFormatToken('H', ['HH', 2], 0, 'hour');\n addFormatToken('h', ['hh', 2], 0, hFormat);\n addFormatToken('k', ['kk', 2], 0, kFormat);\n addFormatToken('hmm', 0, 0, function () {\n return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2);\n });\n addFormatToken('hmmss', 0, 0, function () {\n return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2) + zeroFill(this.seconds(), 2);\n });\n addFormatToken('Hmm', 0, 0, function () {\n return '' + this.hours() + zeroFill(this.minutes(), 2);\n });\n addFormatToken('Hmmss', 0, 0, function () {\n return '' + this.hours() + zeroFill(this.minutes(), 2) + zeroFill(this.seconds(), 2);\n });\n\n function meridiem(token, lowercase) {\n addFormatToken(token, 0, 0, function () {\n return this.localeData().meridiem(this.hours(), this.minutes(), lowercase);\n });\n }\n\n meridiem('a', true);\n meridiem('A', false); // ALIASES\n\n addUnitAlias('hour', 'h'); // PRIORITY\n\n addUnitPriority('hour', 13); // PARSING\n\n function matchMeridiem(isStrict, locale) {\n return locale._meridiemParse;\n }\n\n addRegexToken('a', matchMeridiem);\n addRegexToken('A', matchMeridiem);\n addRegexToken('H', match1to2);\n addRegexToken('h', match1to2);\n addRegexToken('k', match1to2);\n addRegexToken('HH', match1to2, match2);\n addRegexToken('hh', match1to2, match2);\n addRegexToken('kk', match1to2, match2);\n addRegexToken('hmm', match3to4);\n addRegexToken('hmmss', match5to6);\n addRegexToken('Hmm', match3to4);\n addRegexToken('Hmmss', match5to6);\n addParseToken(['H', 'HH'], HOUR);\n addParseToken(['k', 'kk'], function (input, array, config) {\n var kInput = toInt(input);\n array[HOUR] = kInput === 24 ? 0 : kInput;\n });\n addParseToken(['a', 'A'], function (input, array, config) {\n config._isPm = config._locale.isPM(input);\n config._meridiem = input;\n });\n addParseToken(['h', 'hh'], function (input, array, config) {\n array[HOUR] = toInt(input);\n getParsingFlags(config).bigHour = true;\n });\n addParseToken('hmm', function (input, array, config) {\n var pos = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos));\n array[MINUTE] = toInt(input.substr(pos));\n getParsingFlags(config).bigHour = true;\n });\n addParseToken('hmmss', function (input, array, config) {\n var pos1 = input.length - 4;\n var pos2 = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos1));\n array[MINUTE] = toInt(input.substr(pos1, 2));\n array[SECOND] = toInt(input.substr(pos2));\n getParsingFlags(config).bigHour = true;\n });\n addParseToken('Hmm', function (input, array, config) {\n var pos = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos));\n array[MINUTE] = toInt(input.substr(pos));\n });\n addParseToken('Hmmss', function (input, array, config) {\n var pos1 = input.length - 4;\n var pos2 = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos1));\n array[MINUTE] = toInt(input.substr(pos1, 2));\n array[SECOND] = toInt(input.substr(pos2));\n }); // LOCALES\n\n function localeIsPM(input) {\n // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays\n // Using charAt should be more compatible.\n return (input + '').toLowerCase().charAt(0) === 'p';\n }\n\n var defaultLocaleMeridiemParse = /[ap]\\.?m?\\.?/i;\n\n function localeMeridiem(hours, minutes, isLower) {\n if (hours > 11) {\n return isLower ? 'pm' : 'PM';\n } else {\n return isLower ? 'am' : 'AM';\n }\n } // MOMENTS\n // Setting the hour should keep the time, because the user explicitly\n // specified which hour he wants. So trying to maintain the same hour (in\n // a new timezone) makes sense. Adding/subtracting hours does not follow\n // this rule.\n\n\n var getSetHour = makeGetSet('Hours', true); // months\n // week\n // weekdays\n // meridiem\n\n var baseConfig = {\n calendar: defaultCalendar,\n longDateFormat: defaultLongDateFormat,\n invalidDate: defaultInvalidDate,\n ordinal: defaultOrdinal,\n dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse,\n relativeTime: defaultRelativeTime,\n months: defaultLocaleMonths,\n monthsShort: defaultLocaleMonthsShort,\n week: defaultLocaleWeek,\n weekdays: defaultLocaleWeekdays,\n weekdaysMin: defaultLocaleWeekdaysMin,\n weekdaysShort: defaultLocaleWeekdaysShort,\n meridiemParse: defaultLocaleMeridiemParse\n }; // internal storage for locale config files\n\n var locales = {};\n var localeFamilies = {};\n var globalLocale;\n\n function normalizeLocale(key) {\n return key ? key.toLowerCase().replace('_', '-') : key;\n } // pick the locale from the array\n // try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each\n // substring from most specific to least, but move to the next array item if it's a more specific variant than the current root\n\n\n function chooseLocale(names) {\n var i = 0,\n j,\n next,\n locale,\n split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n\n if (locale) {\n return locale;\n }\n\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n\n j--;\n }\n\n i++;\n }\n\n return null;\n }\n\n function loadLocale(name) {\n var oldLocale = null; // TODO: Find a better way to register and load all the locales in Node\n\n if (!locales[name] && typeof module !== 'undefined' && module && module.exports) {\n try {\n oldLocale = globalLocale._abbr;\n !function webpackMissingModule() {\n var e = new Error(\"Cannot find module \\\"./locale\\\"\");\n e.code = 'MODULE_NOT_FOUND';\n throw e;\n }(); // because defineLocale currently also sets the global locale, we\n // want to undo that for lazy loaded locales\n\n getSetGlobalLocale(oldLocale);\n } catch (e) {}\n }\n\n return locales[name];\n } // This function will load locale and then set the global locale. If\n // no arguments are passed in, it will simply return the current global\n // locale key.\n\n\n function getSetGlobalLocale(key, values) {\n var data;\n\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n } else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n }\n\n function defineLocale(name, config) {\n if (config !== null) {\n var parentConfig = baseConfig;\n config.abbr = name;\n\n if (locales[name] != null) {\n deprecateSimple('defineLocaleOverride', 'use moment.updateLocale(localeName, config) to change ' + 'an existing locale. moment.defineLocale(localeName, ' + 'config) should only be used for creating a new locale ' + 'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.');\n parentConfig = locales[name]._config;\n } else if (config.parentLocale != null) {\n if (locales[config.parentLocale] != null) {\n parentConfig = locales[config.parentLocale]._config;\n } else {\n if (!localeFamilies[config.parentLocale]) {\n localeFamilies[config.parentLocale] = [];\n }\n\n localeFamilies[config.parentLocale].push({\n name: name,\n config: config\n });\n return null;\n }\n }\n\n locales[name] = new Locale(mergeConfigs(parentConfig, config));\n\n if (localeFamilies[name]) {\n localeFamilies[name].forEach(function (x) {\n defineLocale(x.name, x.config);\n });\n } // backwards compat for now: also set the locale\n // make sure we set the locale AFTER all child locales have been\n // created, so we won't end up with the child locale set.\n\n\n getSetGlobalLocale(name);\n return locales[name];\n } else {\n // useful for testing\n delete locales[name];\n return null;\n }\n }\n\n function updateLocale(name, config) {\n if (config != null) {\n var locale,\n parentConfig = baseConfig; // MERGE\n\n if (locales[name] != null) {\n parentConfig = locales[name]._config;\n }\n\n config = mergeConfigs(parentConfig, config);\n locale = new Locale(config);\n locale.parentLocale = locales[name];\n locales[name] = locale; // backwards compat for now: also set the locale\n\n getSetGlobalLocale(name);\n } else {\n // pass null for config to unupdate, useful for tests\n if (locales[name] != null) {\n if (locales[name].parentLocale != null) {\n locales[name] = locales[name].parentLocale;\n } else if (locales[name] != null) {\n delete locales[name];\n }\n }\n }\n\n return locales[name];\n } // returns locale data\n\n\n function getLocale(key) {\n var locale;\n\n if (key && key._locale && key._locale._abbr) {\n key = key._locale._abbr;\n }\n\n if (!key) {\n return globalLocale;\n }\n\n if (!isArray(key)) {\n //short-circuit everything else\n locale = loadLocale(key);\n\n if (locale) {\n return locale;\n }\n\n key = [key];\n }\n\n return chooseLocale(key);\n }\n\n function listLocales() {\n return keys$1(locales);\n }\n\n function checkOverflow(m) {\n var overflow;\n var a = m._a;\n\n if (a && getParsingFlags(m).overflow === -2) {\n overflow = a[MONTH] < 0 || a[MONTH] > 11 ? MONTH : a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH]) ? DATE : a[HOUR] < 0 || a[HOUR] > 24 || a[HOUR] === 24 && (a[MINUTE] !== 0 || a[SECOND] !== 0 || a[MILLISECOND] !== 0) ? HOUR : a[MINUTE] < 0 || a[MINUTE] > 59 ? MINUTE : a[SECOND] < 0 || a[SECOND] > 59 ? SECOND : a[MILLISECOND] < 0 || a[MILLISECOND] > 999 ? MILLISECOND : -1;\n\n if (getParsingFlags(m)._overflowDayOfYear && (overflow < YEAR || overflow > DATE)) {\n overflow = DATE;\n }\n\n if (getParsingFlags(m)._overflowWeeks && overflow === -1) {\n overflow = WEEK;\n }\n\n if (getParsingFlags(m)._overflowWeekday && overflow === -1) {\n overflow = WEEKDAY;\n }\n\n getParsingFlags(m).overflow = overflow;\n }\n\n return m;\n } // iso 8601 regex\n // 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00)\n\n\n var extendedIsoRegex = /^\\s*((?:[+-]\\d{6}|\\d{4})-(?:\\d\\d-\\d\\d|W\\d\\d-\\d|W\\d\\d|\\d\\d\\d|\\d\\d))(?:(T| )(\\d\\d(?::\\d\\d(?::\\d\\d(?:[.,]\\d+)?)?)?)([\\+\\-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/;\n var basicIsoRegex = /^\\s*((?:[+-]\\d{6}|\\d{4})(?:\\d\\d\\d\\d|W\\d\\d\\d|W\\d\\d|\\d\\d\\d|\\d\\d))(?:(T| )(\\d\\d(?:\\d\\d(?:\\d\\d(?:[.,]\\d+)?)?)?)([\\+\\-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/;\n var tzRegex = /Z|[+-]\\d\\d(?::?\\d\\d)?/;\n var isoDates = [['YYYYYY-MM-DD', /[+-]\\d{6}-\\d\\d-\\d\\d/], ['YYYY-MM-DD', /\\d{4}-\\d\\d-\\d\\d/], ['GGGG-[W]WW-E', /\\d{4}-W\\d\\d-\\d/], ['GGGG-[W]WW', /\\d{4}-W\\d\\d/, false], ['YYYY-DDD', /\\d{4}-\\d{3}/], ['YYYY-MM', /\\d{4}-\\d\\d/, false], ['YYYYYYMMDD', /[+-]\\d{10}/], ['YYYYMMDD', /\\d{8}/], // YYYYMM is NOT allowed by the standard\n ['GGGG[W]WWE', /\\d{4}W\\d{3}/], ['GGGG[W]WW', /\\d{4}W\\d{2}/, false], ['YYYYDDD', /\\d{7}/]]; // iso time formats and regexes\n\n var isoTimes = [['HH:mm:ss.SSSS', /\\d\\d:\\d\\d:\\d\\d\\.\\d+/], ['HH:mm:ss,SSSS', /\\d\\d:\\d\\d:\\d\\d,\\d+/], ['HH:mm:ss', /\\d\\d:\\d\\d:\\d\\d/], ['HH:mm', /\\d\\d:\\d\\d/], ['HHmmss.SSSS', /\\d\\d\\d\\d\\d\\d\\.\\d+/], ['HHmmss,SSSS', /\\d\\d\\d\\d\\d\\d,\\d+/], ['HHmmss', /\\d\\d\\d\\d\\d\\d/], ['HHmm', /\\d\\d\\d\\d/], ['HH', /\\d\\d/]];\n var aspNetJsonRegex = /^\\/?Date\\((\\-?\\d+)/i; // date from iso format\n\n function configFromISO(config) {\n var i,\n l,\n string = config._i,\n match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string),\n allowTime,\n dateFormat,\n timeFormat,\n tzFormat;\n\n if (match) {\n getParsingFlags(config).iso = true;\n\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(match[1])) {\n dateFormat = isoDates[i][0];\n allowTime = isoDates[i][2] !== false;\n break;\n }\n }\n\n if (dateFormat == null) {\n config._isValid = false;\n return;\n }\n\n if (match[3]) {\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(match[3])) {\n // match[2] should be 'T' or space\n timeFormat = (match[2] || ' ') + isoTimes[i][0];\n break;\n }\n }\n\n if (timeFormat == null) {\n config._isValid = false;\n return;\n }\n }\n\n if (!allowTime && timeFormat != null) {\n config._isValid = false;\n return;\n }\n\n if (match[4]) {\n if (tzRegex.exec(match[4])) {\n tzFormat = 'Z';\n } else {\n config._isValid = false;\n return;\n }\n }\n\n config._f = dateFormat + (timeFormat || '') + (tzFormat || '');\n configFromStringAndFormat(config);\n } else {\n config._isValid = false;\n }\n } // RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3\n\n\n var basicRfcRegex = /^((?:Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\\s)?(\\d?\\d\\s(?:Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\\s(?:\\d\\d)?\\d\\d\\s)(\\d\\d:\\d\\d)(\\:\\d\\d)?(\\s(?:UT|GMT|[ECMP][SD]T|[A-IK-Za-ik-z]|[+-]\\d{4}))$/; // date and time from ref 2822 format\n\n function configFromRFC2822(config) {\n var string, match, dayFormat, dateFormat, timeFormat, tzFormat;\n var timezones = {\n ' GMT': ' +0000',\n ' EDT': ' -0400',\n ' EST': ' -0500',\n ' CDT': ' -0500',\n ' CST': ' -0600',\n ' MDT': ' -0600',\n ' MST': ' -0700',\n ' PDT': ' -0700',\n ' PST': ' -0800'\n };\n var military = 'YXWVUTSRQPONZABCDEFGHIKLM';\n var timezone, timezoneIndex;\n string = config._i.replace(/\\([^\\)]*\\)|[\\n\\t]/g, ' ') // Remove comments and folding whitespace\n .replace(/(\\s\\s+)/g, ' ') // Replace multiple-spaces with a single space\n .replace(/^\\s|\\s$/g, ''); // Remove leading and trailing spaces\n\n match = basicRfcRegex.exec(string);\n\n if (match) {\n dayFormat = match[1] ? 'ddd' + (match[1].length === 5 ? ', ' : ' ') : '';\n dateFormat = 'D MMM ' + (match[2].length > 10 ? 'YYYY ' : 'YY ');\n timeFormat = 'HH:mm' + (match[4] ? ':ss' : ''); // TODO: Replace the vanilla JS Date object with an indepentent day-of-week check.\n\n if (match[1]) {\n // day of week given\n var momentDate = new Date(match[2]);\n var momentDay = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'][momentDate.getDay()];\n\n if (match[1].substr(0, 3) !== momentDay) {\n getParsingFlags(config).weekdayMismatch = true;\n config._isValid = false;\n return;\n }\n }\n\n switch (match[5].length) {\n case 2:\n // military\n if (timezoneIndex === 0) {\n timezone = ' +0000';\n } else {\n timezoneIndex = military.indexOf(match[5][1].toUpperCase()) - 12;\n timezone = (timezoneIndex < 0 ? ' -' : ' +') + ('' + timezoneIndex).replace(/^-?/, '0').match(/..$/)[0] + '00';\n }\n\n break;\n\n case 4:\n // Zone\n timezone = timezones[match[5]];\n break;\n\n default:\n // UT or +/-9999\n timezone = timezones[' GMT'];\n }\n\n match[5] = timezone;\n config._i = match.splice(1).join('');\n tzFormat = ' ZZ';\n config._f = dayFormat + dateFormat + timeFormat + tzFormat;\n configFromStringAndFormat(config);\n getParsingFlags(config).rfc2822 = true;\n } else {\n config._isValid = false;\n }\n } // date from iso format or fallback\n\n\n function configFromString(config) {\n var matched = aspNetJsonRegex.exec(config._i);\n\n if (matched !== null) {\n config._d = new Date(+matched[1]);\n return;\n }\n\n configFromISO(config);\n\n if (config._isValid === false) {\n delete config._isValid;\n } else {\n return;\n }\n\n configFromRFC2822(config);\n\n if (config._isValid === false) {\n delete config._isValid;\n } else {\n return;\n } // Final attempt, use Input Fallback\n\n\n hooks.createFromInputFallback(config);\n }\n\n hooks.createFromInputFallback = deprecate('value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), ' + 'which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are ' + 'discouraged and will be removed in an upcoming major release. Please refer to ' + 'http://momentjs.com/guides/#/warnings/js-date/ for more info.', function (config) {\n config._d = new Date(config._i + (config._useUTC ? ' UTC' : ''));\n }); // Pick the first defined of two or three arguments.\n\n function defaults(a, b, c) {\n if (a != null) {\n return a;\n }\n\n if (b != null) {\n return b;\n }\n\n return c;\n }\n\n function currentDateArray(config) {\n // hooks is actually the exported moment object\n var nowValue = new Date(hooks.now());\n\n if (config._useUTC) {\n return [nowValue.getUTCFullYear(), nowValue.getUTCMonth(), nowValue.getUTCDate()];\n }\n\n return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()];\n } // convert an array to a date.\n // the array should mirror the parameters below\n // note: all values past the year are optional and will default to the lowest possible value.\n // [year, month, day , hour, minute, second, millisecond]\n\n\n function configFromArray(config) {\n var i,\n date,\n input = [],\n currentDate,\n yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config); //compute day of the year from weeks and weekdays\n\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n } //if the day of the year is set, figure out what it is\n\n\n if (config._dayOfYear != null) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse) || config._dayOfYear === 0) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n } // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n\n\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n } // Zero out whatever was not defaulted, including time\n\n\n for (; i < 7; i++) {\n config._a[i] = input[i] = config._a[i] == null ? i === 2 ? 1 : 0 : config._a[i];\n } // Check for 24:00:00.000\n\n\n if (config._a[HOUR] === 24 && config._a[MINUTE] === 0 && config._a[SECOND] === 0 && config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input); // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n }\n\n function dayOfYearFromWeekInfo(config) {\n var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow;\n w = config._w;\n\n if (w.GG != null || w.W != null || w.E != null) {\n dow = 1;\n doy = 4; // TODO: We need to take the current isoWeekYear, but that depends on\n // how we interpret now (local, utc, fixed offset). So create\n // a now version of current config (take local/utc/offset flags, and\n // create now).\n\n weekYear = defaults(w.GG, config._a[YEAR], weekOfYear(createLocal(), 1, 4).year);\n week = defaults(w.W, 1);\n weekday = defaults(w.E, 1);\n\n if (weekday < 1 || weekday > 7) {\n weekdayOverflow = true;\n }\n } else {\n dow = config._locale._week.dow;\n doy = config._locale._week.doy;\n var curWeek = weekOfYear(createLocal(), dow, doy);\n weekYear = defaults(w.gg, config._a[YEAR], curWeek.year); // Default to current week.\n\n week = defaults(w.w, curWeek.week);\n\n if (w.d != null) {\n // weekday -- low day numbers are considered next week\n weekday = w.d;\n\n if (weekday < 0 || weekday > 6) {\n weekdayOverflow = true;\n }\n } else if (w.e != null) {\n // local weekday -- counting starts from begining of week\n weekday = w.e + dow;\n\n if (w.e < 0 || w.e > 6) {\n weekdayOverflow = true;\n }\n } else {\n // default to begining of week\n weekday = dow;\n }\n }\n\n if (week < 1 || week > weeksInYear(weekYear, dow, doy)) {\n getParsingFlags(config)._overflowWeeks = true;\n } else if (weekdayOverflow != null) {\n getParsingFlags(config)._overflowWeekday = true;\n } else {\n temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy);\n config._a[YEAR] = temp.year;\n config._dayOfYear = temp.dayOfYear;\n }\n } // constant that refers to the ISO standard\n\n\n hooks.ISO_8601 = function () {}; // constant that refers to the RFC 2822 form\n\n\n hooks.RFC_2822 = function () {}; // date from string and format string\n\n\n function configFromStringAndFormat(config) {\n // TODO: Move this to another part of the creation flow to prevent circular deps\n if (config._f === hooks.ISO_8601) {\n configFromISO(config);\n return;\n }\n\n if (config._f === hooks.RFC_2822) {\n configFromRFC2822(config);\n return;\n }\n\n config._a = [];\n getParsingFlags(config).empty = true; // This array is used to make a Date, either with `new Date` or `Date.UTC`\n\n var string = '' + config._i,\n i,\n parsedInput,\n tokens,\n token,\n skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0]; // console.log('token', token, 'parsedInput', parsedInput,\n // 'regex', getParseRegexForToken(token, config));\n\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n\n if (skipped.length > 0) {\n getParsingFlags(config).unusedInput.push(skipped);\n }\n\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n } // don't parse if it's not a known token\n\n\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n getParsingFlags(config).empty = false;\n } else {\n getParsingFlags(config).unusedTokens.push(token);\n }\n\n addTimeToArrayFromToken(token, parsedInput, config);\n } else if (config._strict && !parsedInput) {\n getParsingFlags(config).unusedTokens.push(token);\n }\n } // add remaining unparsed input length to the string\n\n\n getParsingFlags(config).charsLeftOver = stringLength - totalParsedInputLength;\n\n if (string.length > 0) {\n getParsingFlags(config).unusedInput.push(string);\n } // clear _12h flag if hour is <= 12\n\n\n if (config._a[HOUR] <= 12 && getParsingFlags(config).bigHour === true && config._a[HOUR] > 0) {\n getParsingFlags(config).bigHour = undefined;\n }\n\n getParsingFlags(config).parsedDateParts = config._a.slice(0);\n getParsingFlags(config).meridiem = config._meridiem; // handle meridiem\n\n config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR], config._meridiem);\n configFromArray(config);\n checkOverflow(config);\n }\n\n function meridiemFixWrap(locale, hour, meridiem) {\n var isPm;\n\n if (meridiem == null) {\n // nothing to do\n return hour;\n }\n\n if (locale.meridiemHour != null) {\n return locale.meridiemHour(hour, meridiem);\n } else if (locale.isPM != null) {\n // Fallback\n isPm = locale.isPM(meridiem);\n\n if (isPm && hour < 12) {\n hour += 12;\n }\n\n if (!isPm && hour === 12) {\n hour = 0;\n }\n\n return hour;\n } else {\n // this is not supposed to happen\n return hour;\n }\n } // date from string and array of format strings\n\n\n function configFromStringAndArray(config) {\n var tempConfig, bestMoment, scoreToBeat, i, currentScore;\n\n if (config._f.length === 0) {\n getParsingFlags(config).invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < config._f.length; i++) {\n currentScore = 0;\n tempConfig = copyConfig({}, config);\n\n if (config._useUTC != null) {\n tempConfig._useUTC = config._useUTC;\n }\n\n tempConfig._f = config._f[i];\n configFromStringAndFormat(tempConfig);\n\n if (!isValid(tempConfig)) {\n continue;\n } // if there is any input that was not parsed add a penalty for that format\n\n\n currentScore += getParsingFlags(tempConfig).charsLeftOver; //or tokens\n\n currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10;\n getParsingFlags(tempConfig).score = currentScore;\n\n if (scoreToBeat == null || currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n\n extend(config, bestMoment || tempConfig);\n }\n\n function configFromObject(config) {\n if (config._d) {\n return;\n }\n\n var i = normalizeObjectUnits(config._i);\n config._a = map([i.year, i.month, i.day || i.date, i.hour, i.minute, i.second, i.millisecond], function (obj) {\n return obj && parseInt(obj, 10);\n });\n configFromArray(config);\n }\n\n function createFromConfig(config) {\n var res = new Moment(checkOverflow(prepareConfig(config)));\n\n if (res._nextDay) {\n // Adding is smart enough around DST\n res.add(1, 'd');\n res._nextDay = undefined;\n }\n\n return res;\n }\n\n function prepareConfig(config) {\n var input = config._i,\n format = config._f;\n config._locale = config._locale || getLocale(config._l);\n\n if (input === null || format === undefined && input === '') {\n return createInvalid({\n nullInput: true\n });\n }\n\n if (typeof input === 'string') {\n config._i = input = config._locale.preparse(input);\n }\n\n if (isMoment(input)) {\n return new Moment(checkOverflow(input));\n } else if (isDate(input)) {\n config._d = input;\n } else if (isArray(format)) {\n configFromStringAndArray(config);\n } else if (format) {\n configFromStringAndFormat(config);\n } else {\n configFromInput(config);\n }\n\n if (!isValid(config)) {\n config._d = null;\n }\n\n return config;\n }\n\n function configFromInput(config) {\n var input = config._i;\n\n if (isUndefined(input)) {\n config._d = new Date(hooks.now());\n } else if (isDate(input)) {\n config._d = new Date(input.valueOf());\n } else if (typeof input === 'string') {\n configFromString(config);\n } else if (isArray(input)) {\n config._a = map(input.slice(0), function (obj) {\n return parseInt(obj, 10);\n });\n configFromArray(config);\n } else if (isObject(input)) {\n configFromObject(config);\n } else if (isNumber(input)) {\n // from milliseconds\n config._d = new Date(input);\n } else {\n hooks.createFromInputFallback(config);\n }\n }\n\n function createLocalOrUTC(input, format, locale, strict, isUTC) {\n var c = {};\n\n if (locale === true || locale === false) {\n strict = locale;\n locale = undefined;\n }\n\n if (isObject(input) && isObjectEmpty(input) || isArray(input) && input.length === 0) {\n input = undefined;\n } // object construction must be done this way.\n // https://github.com/moment/moment/issues/1423\n\n\n c._isAMomentObject = true;\n c._useUTC = c._isUTC = isUTC;\n c._l = locale;\n c._i = input;\n c._f = format;\n c._strict = strict;\n return createFromConfig(c);\n }\n\n function createLocal(input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, false);\n }\n\n var prototypeMin = deprecate('moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/', function () {\n var other = createLocal.apply(null, arguments);\n\n if (this.isValid() && other.isValid()) {\n return other < this ? this : other;\n } else {\n return createInvalid();\n }\n });\n var prototypeMax = deprecate('moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/', function () {\n var other = createLocal.apply(null, arguments);\n\n if (this.isValid() && other.isValid()) {\n return other > this ? this : other;\n } else {\n return createInvalid();\n }\n }); // Pick a moment m from moments so that m[fn](other) is true for all\n // other. This relies on the function fn to be transitive.\n //\n // moments should either be an array of moment objects or an array, whose\n // first element is an array of moment objects.\n\n function pickBy(fn, moments) {\n var res, i;\n\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n\n if (!moments.length) {\n return createLocal();\n }\n\n res = moments[0];\n\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n\n return res;\n } // TODO: Use [].sort instead?\n\n\n function min() {\n var args = [].slice.call(arguments, 0);\n return pickBy('isBefore', args);\n }\n\n function max() {\n var args = [].slice.call(arguments, 0);\n return pickBy('isAfter', args);\n }\n\n var now = function () {\n return Date.now ? Date.now() : +new Date();\n };\n\n var ordering = ['year', 'quarter', 'month', 'week', 'day', 'hour', 'minute', 'second', 'millisecond'];\n\n function isDurationValid(m) {\n for (var key in m) {\n if (!(ordering.indexOf(key) !== -1 && (m[key] == null || !isNaN(m[key])))) {\n return false;\n }\n }\n\n var unitHasDecimal = false;\n\n for (var i = 0; i < ordering.length; ++i) {\n if (m[ordering[i]]) {\n if (unitHasDecimal) {\n return false; // only allow non-integers for smallest unit\n }\n\n if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) {\n unitHasDecimal = true;\n }\n }\n }\n\n return true;\n }\n\n function isValid$1() {\n return this._isValid;\n }\n\n function createInvalid$1() {\n return createDuration(NaN);\n }\n\n function Duration(duration) {\n var normalizedInput = normalizeObjectUnits(duration),\n years = normalizedInput.year || 0,\n quarters = normalizedInput.quarter || 0,\n months = normalizedInput.month || 0,\n weeks = normalizedInput.week || 0,\n days = normalizedInput.day || 0,\n hours = normalizedInput.hour || 0,\n minutes = normalizedInput.minute || 0,\n seconds = normalizedInput.second || 0,\n milliseconds = normalizedInput.millisecond || 0;\n this._isValid = isDurationValid(normalizedInput); // representation for dateAddRemove\n\n this._milliseconds = +milliseconds + seconds * 1e3 + // 1000\n minutes * 6e4 + // 1000 * 60\n hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978\n // Because of dateAddRemove treats 24 hours as different from a\n // day when working around DST, we need to store them separately\n\n this._days = +days + weeks * 7; // It is impossible translate months into days without knowing\n // which months you are are talking about, so we have to store\n // it separately.\n\n this._months = +months + quarters * 3 + years * 12;\n this._data = {};\n this._locale = getLocale();\n\n this._bubble();\n }\n\n function isDuration(obj) {\n return obj instanceof Duration;\n }\n\n function absRound(number) {\n if (number < 0) {\n return Math.round(-1 * number) * -1;\n } else {\n return Math.round(number);\n }\n } // FORMATTING\n\n\n function offset(token, separator) {\n addFormatToken(token, 0, 0, function () {\n var offset = this.utcOffset();\n var sign = '+';\n\n if (offset < 0) {\n offset = -offset;\n sign = '-';\n }\n\n return sign + zeroFill(~~(offset / 60), 2) + separator + zeroFill(~~offset % 60, 2);\n });\n }\n\n offset('Z', ':');\n offset('ZZ', ''); // PARSING\n\n addRegexToken('Z', matchShortOffset);\n addRegexToken('ZZ', matchShortOffset);\n addParseToken(['Z', 'ZZ'], function (input, array, config) {\n config._useUTC = true;\n config._tzm = offsetFromString(matchShortOffset, input);\n }); // HELPERS\n // timezone chunker\n // '+10:00' > ['10', '00']\n // '-1530' > ['-15', '30']\n\n var chunkOffset = /([\\+\\-]|\\d\\d)/gi;\n\n function offsetFromString(matcher, string) {\n var matches = (string || '').match(matcher);\n\n if (matches === null) {\n return null;\n }\n\n var chunk = matches[matches.length - 1] || [];\n var parts = (chunk + '').match(chunkOffset) || ['-', 0, 0];\n var minutes = +(parts[1] * 60) + toInt(parts[2]);\n return minutes === 0 ? 0 : parts[0] === '+' ? minutes : -minutes;\n } // Return a moment from input, that is local/utc/zone equivalent to model.\n\n\n function cloneWithOffset(input, model) {\n var res, diff;\n\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? input.valueOf() : createLocal(input).valueOf()) - res.valueOf(); // Use low-level api, because this fn is low-level api.\n\n res._d.setTime(res._d.valueOf() + diff);\n\n hooks.updateOffset(res, false);\n return res;\n } else {\n return createLocal(input).local();\n }\n }\n\n function getDateOffset(m) {\n // On Firefox.24 Date#getTimezoneOffset returns a floating point.\n // https://github.com/moment/moment/pull/1871\n return -Math.round(m._d.getTimezoneOffset() / 15) * 15;\n } // HOOKS\n // This function will be called whenever a moment is mutated.\n // It is intended to keep the offset in sync with the timezone.\n\n\n hooks.updateOffset = function () {}; // MOMENTS\n // keepLocalTime = true means only change the timezone, without\n // affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]-->\n // 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset\n // +0200, so we adjust the time as needed, to be valid.\n //\n // Keeping the time actually adds/subtracts (one hour)\n // from the actual represented time. That is why we call updateOffset\n // a second time. In case it wants us to change the offset again\n // _changeInProgress == true case, then we have to adjust, because\n // there is no such time in the given timezone.\n\n\n function getSetOffset(input, keepLocalTime, keepMinutes) {\n var offset = this._offset || 0,\n localAdjust;\n\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n\n if (input === null) {\n return this;\n }\n } else if (Math.abs(input) < 16 && !keepMinutes) {\n input = input * 60;\n }\n\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n\n this._offset = input;\n this._isUTC = true;\n\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n addSubtract(this, createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }\n\n function getSetZone(input, keepLocalTime) {\n if (input != null) {\n if (typeof input !== 'string') {\n input = -input;\n }\n\n this.utcOffset(input, keepLocalTime);\n return this;\n } else {\n return -this.utcOffset();\n }\n }\n\n function setOffsetToUTC(keepLocalTime) {\n return this.utcOffset(0, keepLocalTime);\n }\n\n function setOffsetToLocal(keepLocalTime) {\n if (this._isUTC) {\n this.utcOffset(0, keepLocalTime);\n this._isUTC = false;\n\n if (keepLocalTime) {\n this.subtract(getDateOffset(this), 'm');\n }\n }\n\n return this;\n }\n\n function setOffsetToParsedOffset() {\n if (this._tzm != null) {\n this.utcOffset(this._tzm, false, true);\n } else if (typeof this._i === 'string') {\n var tZone = offsetFromString(matchOffset, this._i);\n\n if (tZone != null) {\n this.utcOffset(tZone);\n } else {\n this.utcOffset(0, true);\n }\n }\n\n return this;\n }\n\n function hasAlignedHourOffset(input) {\n if (!this.isValid()) {\n return false;\n }\n\n input = input ? createLocal(input).utcOffset() : 0;\n return (this.utcOffset() - input) % 60 === 0;\n }\n\n function isDaylightSavingTime() {\n return this.utcOffset() > this.clone().month(0).utcOffset() || this.utcOffset() > this.clone().month(5).utcOffset();\n }\n\n function isDaylightSavingTimeShifted() {\n if (!isUndefined(this._isDSTShifted)) {\n return this._isDSTShifted;\n }\n\n var c = {};\n copyConfig(c, this);\n c = prepareConfig(c);\n\n if (c._a) {\n var other = c._isUTC ? createUTC(c._a) : createLocal(c._a);\n this._isDSTShifted = this.isValid() && compareArrays(c._a, other.toArray()) > 0;\n } else {\n this._isDSTShifted = false;\n }\n\n return this._isDSTShifted;\n }\n\n function isLocal() {\n return this.isValid() ? !this._isUTC : false;\n }\n\n function isUtcOffset() {\n return this.isValid() ? this._isUTC : false;\n }\n\n function isUtc() {\n return this.isValid() ? this._isUTC && this._offset === 0 : false;\n } // ASP.NET json date format regex\n\n\n var aspNetRegex = /^(\\-)?(?:(\\d*)[. ])?(\\d+)\\:(\\d+)(?:\\:(\\d+)(\\.\\d*)?)?$/; // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html\n // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere\n // and further modified to allow for strings containing both week and day\n\n var isoRegex = /^(-)?P(?:(-?[0-9,.]*)Y)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)W)?(?:(-?[0-9,.]*)D)?(?:T(?:(-?[0-9,.]*)H)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)S)?)?$/;\n\n function createDuration(input, key) {\n var duration = input,\n // matching against regexp is expensive, do it on demand\n match = null,\n sign,\n ret,\n diffRes;\n\n if (isDuration(input)) {\n duration = {\n ms: input._milliseconds,\n d: input._days,\n M: input._months\n };\n } else if (isNumber(input)) {\n duration = {};\n\n if (key) {\n duration[key] = input;\n } else {\n duration.milliseconds = input;\n }\n } else if (!!(match = aspNetRegex.exec(input))) {\n sign = match[1] === '-' ? -1 : 1;\n duration = {\n y: 0,\n d: toInt(match[DATE]) * sign,\n h: toInt(match[HOUR]) * sign,\n m: toInt(match[MINUTE]) * sign,\n s: toInt(match[SECOND]) * sign,\n ms: toInt(absRound(match[MILLISECOND] * 1000)) * sign // the millisecond decimal point is included in the match\n\n };\n } else if (!!(match = isoRegex.exec(input))) {\n sign = match[1] === '-' ? -1 : 1;\n duration = {\n y: parseIso(match[2], sign),\n M: parseIso(match[3], sign),\n w: parseIso(match[4], sign),\n d: parseIso(match[5], sign),\n h: parseIso(match[6], sign),\n m: parseIso(match[7], sign),\n s: parseIso(match[8], sign)\n };\n } else if (duration == null) {\n // checks for null or undefined\n duration = {};\n } else if (typeof duration === 'object' && ('from' in duration || 'to' in duration)) {\n diffRes = momentsDifference(createLocal(duration.from), createLocal(duration.to));\n duration = {};\n duration.ms = diffRes.milliseconds;\n duration.M = diffRes.months;\n }\n\n ret = new Duration(duration);\n\n if (isDuration(input) && hasOwnProp(input, '_locale')) {\n ret._locale = input._locale;\n }\n\n return ret;\n }\n\n createDuration.fn = Duration.prototype;\n createDuration.invalid = createInvalid$1;\n\n function parseIso(inp, sign) {\n // We'd normally use ~~inp for this, but unfortunately it also\n // converts floats to ints.\n // inp may be undefined, so careful calling replace on it.\n var res = inp && parseFloat(inp.replace(',', '.')); // apply sign while we're at it\n\n return (isNaN(res) ? 0 : res) * sign;\n }\n\n function positiveMomentsDifference(base, other) {\n var res = {\n milliseconds: 0,\n months: 0\n };\n res.months = other.month() - base.month() + (other.year() - base.year()) * 12;\n\n if (base.clone().add(res.months, 'M').isAfter(other)) {\n --res.months;\n }\n\n res.milliseconds = +other - +base.clone().add(res.months, 'M');\n return res;\n }\n\n function momentsDifference(base, other) {\n var res;\n\n if (!(base.isValid() && other.isValid())) {\n return {\n milliseconds: 0,\n months: 0\n };\n }\n\n other = cloneWithOffset(other, base);\n\n if (base.isBefore(other)) {\n res = positiveMomentsDifference(base, other);\n } else {\n res = positiveMomentsDifference(other, base);\n res.milliseconds = -res.milliseconds;\n res.months = -res.months;\n }\n\n return res;\n } // TODO: remove 'name' arg after deprecation is removed\n\n\n function createAdder(direction, name) {\n return function (val, period) {\n var dur, tmp; //invert the arguments, but complain about it\n\n if (period !== null && !isNaN(+period)) {\n deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' + 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.');\n tmp = val;\n val = period;\n period = tmp;\n }\n\n val = typeof val === 'string' ? +val : val;\n dur = createDuration(val, period);\n addSubtract(this, dur, direction);\n return this;\n };\n }\n\n function addSubtract(mom, duration, isAdding, updateOffset) {\n var milliseconds = duration._milliseconds,\n days = absRound(duration._days),\n months = absRound(duration._months);\n\n if (!mom.isValid()) {\n // No op\n return;\n }\n\n updateOffset = updateOffset == null ? true : updateOffset;\n\n if (milliseconds) {\n mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding);\n }\n\n if (days) {\n set$1(mom, 'Date', get(mom, 'Date') + days * isAdding);\n }\n\n if (months) {\n setMonth(mom, get(mom, 'Month') + months * isAdding);\n }\n\n if (updateOffset) {\n hooks.updateOffset(mom, days || months);\n }\n }\n\n var add = createAdder(1, 'add');\n var subtract = createAdder(-1, 'subtract');\n\n function getCalendarFormat(myMoment, now) {\n var diff = myMoment.diff(now, 'days', true);\n return diff < -6 ? 'sameElse' : diff < -1 ? 'lastWeek' : diff < 0 ? 'lastDay' : diff < 1 ? 'sameDay' : diff < 2 ? 'nextDay' : diff < 7 ? 'nextWeek' : 'sameElse';\n }\n\n function calendar$1(time, formats) {\n // We want to compare the start of today, vs this.\n // Getting start-of-today depends on whether we're local/utc/offset or not.\n var now = time || createLocal(),\n sod = cloneWithOffset(now, this).startOf('day'),\n format = hooks.calendarFormat(this, sod) || 'sameElse';\n var output = formats && (isFunction(formats[format]) ? formats[format].call(this, now) : formats[format]);\n return this.format(output || this.localeData().calendar(format, this, createLocal(now)));\n }\n\n function clone() {\n return new Moment(this);\n }\n\n function isAfter(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input);\n\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n\n units = normalizeUnits(!isUndefined(units) ? units : 'millisecond');\n\n if (units === 'millisecond') {\n return this.valueOf() > localInput.valueOf();\n } else {\n return localInput.valueOf() < this.clone().startOf(units).valueOf();\n }\n }\n\n function isBefore(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input);\n\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n\n units = normalizeUnits(!isUndefined(units) ? units : 'millisecond');\n\n if (units === 'millisecond') {\n return this.valueOf() < localInput.valueOf();\n } else {\n return this.clone().endOf(units).valueOf() < localInput.valueOf();\n }\n }\n\n function isBetween(from, to, units, inclusivity) {\n inclusivity = inclusivity || '()';\n return (inclusivity[0] === '(' ? this.isAfter(from, units) : !this.isBefore(from, units)) && (inclusivity[1] === ')' ? this.isBefore(to, units) : !this.isAfter(to, units));\n }\n\n function isSame(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input),\n inputMs;\n\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n\n units = normalizeUnits(units || 'millisecond');\n\n if (units === 'millisecond') {\n return this.valueOf() === localInput.valueOf();\n } else {\n inputMs = localInput.valueOf();\n return this.clone().startOf(units).valueOf() <= inputMs && inputMs <= this.clone().endOf(units).valueOf();\n }\n }\n\n function isSameOrAfter(input, units) {\n return this.isSame(input, units) || this.isAfter(input, units);\n }\n\n function isSameOrBefore(input, units) {\n return this.isSame(input, units) || this.isBefore(input, units);\n }\n\n function diff(input, units, asFloat) {\n var that, zoneDelta, delta, output;\n\n if (!this.isValid()) {\n return NaN;\n }\n\n that = cloneWithOffset(input, this);\n\n if (!that.isValid()) {\n return NaN;\n }\n\n zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4;\n units = normalizeUnits(units);\n\n if (units === 'year' || units === 'month' || units === 'quarter') {\n output = monthDiff(this, that);\n\n if (units === 'quarter') {\n output = output / 3;\n } else if (units === 'year') {\n output = output / 12;\n }\n } else {\n delta = this - that;\n output = units === 'second' ? delta / 1e3 : // 1000\n units === 'minute' ? delta / 6e4 : // 1000 * 60\n units === 'hour' ? delta / 36e5 : // 1000 * 60 * 60\n units === 'day' ? (delta - zoneDelta) / 864e5 : // 1000 * 60 * 60 * 24, negate dst\n units === 'week' ? (delta - zoneDelta) / 6048e5 : // 1000 * 60 * 60 * 24 * 7, negate dst\n delta;\n }\n\n return asFloat ? output : absFloor(output);\n }\n\n function monthDiff(a, b) {\n // difference in months\n var wholeMonthDiff = (b.year() - a.year()) * 12 + (b.month() - a.month()),\n // b is in (anchor - 1 month, anchor + 1 month)\n anchor = a.clone().add(wholeMonthDiff, 'months'),\n anchor2,\n adjust;\n\n if (b - anchor < 0) {\n anchor2 = a.clone().add(wholeMonthDiff - 1, 'months'); // linear across the month\n\n adjust = (b - anchor) / (anchor - anchor2);\n } else {\n anchor2 = a.clone().add(wholeMonthDiff + 1, 'months'); // linear across the month\n\n adjust = (b - anchor) / (anchor2 - anchor);\n } //check for negative zero, return zero if negative zero\n\n\n return -(wholeMonthDiff + adjust) || 0;\n }\n\n hooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ';\n hooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]';\n\n function toString() {\n return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ');\n }\n\n function toISOString() {\n if (!this.isValid()) {\n return null;\n }\n\n var m = this.clone().utc();\n\n if (m.year() < 0 || m.year() > 9999) {\n return formatMoment(m, 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]');\n }\n\n if (isFunction(Date.prototype.toISOString)) {\n // native implementation is ~50x faster, use it when we can\n return this.toDate().toISOString();\n }\n\n return formatMoment(m, 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]');\n }\n /**\n * Return a human readable representation of a moment that can\n * also be evaluated to get a new moment which is the same\n *\n * @link https://nodejs.org/dist/latest/docs/api/util.html#util_custom_inspect_function_on_objects\n */\n\n\n function inspect() {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n\n var func = 'moment';\n var zone = '';\n\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n\n var prefix = '[' + func + '(\"]';\n var year = 0 <= this.year() && this.year() <= 9999 ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n return this.format(prefix + year + datetime + suffix);\n }\n\n function format(inputString) {\n if (!inputString) {\n inputString = this.isUtc() ? hooks.defaultFormatUtc : hooks.defaultFormat;\n }\n\n var output = formatMoment(this, inputString);\n return this.localeData().postformat(output);\n }\n\n function from(time, withoutSuffix) {\n if (this.isValid() && (isMoment(time) && time.isValid() || createLocal(time).isValid())) {\n return createDuration({\n to: this,\n from: time\n }).locale(this.locale()).humanize(!withoutSuffix);\n } else {\n return this.localeData().invalidDate();\n }\n }\n\n function fromNow(withoutSuffix) {\n return this.from(createLocal(), withoutSuffix);\n }\n\n function to(time, withoutSuffix) {\n if (this.isValid() && (isMoment(time) && time.isValid() || createLocal(time).isValid())) {\n return createDuration({\n from: this,\n to: time\n }).locale(this.locale()).humanize(!withoutSuffix);\n } else {\n return this.localeData().invalidDate();\n }\n }\n\n function toNow(withoutSuffix) {\n return this.to(createLocal(), withoutSuffix);\n } // If passed a locale key, it will set the locale for this\n // instance. Otherwise, it will return the locale configuration\n // variables for this instance.\n\n\n function locale(key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n\n return this;\n }\n }\n\n var lang = deprecate('moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.', function (key) {\n if (key === undefined) {\n return this.localeData();\n } else {\n return this.locale(key);\n }\n });\n\n function localeData() {\n return this._locale;\n }\n\n function startOf(units) {\n units = normalizeUnits(units); // the following switch intentionally omits break keywords\n // to utilize falling through the cases.\n\n switch (units) {\n case 'year':\n this.month(0);\n\n /* falls through */\n\n case 'quarter':\n case 'month':\n this.date(1);\n\n /* falls through */\n\n case 'week':\n case 'isoWeek':\n case 'day':\n case 'date':\n this.hours(0);\n\n /* falls through */\n\n case 'hour':\n this.minutes(0);\n\n /* falls through */\n\n case 'minute':\n this.seconds(0);\n\n /* falls through */\n\n case 'second':\n this.milliseconds(0);\n } // weeks are a special case\n\n\n if (units === 'week') {\n this.weekday(0);\n }\n\n if (units === 'isoWeek') {\n this.isoWeekday(1);\n } // quarters are also special\n\n\n if (units === 'quarter') {\n this.month(Math.floor(this.month() / 3) * 3);\n }\n\n return this;\n }\n\n function endOf(units) {\n units = normalizeUnits(units);\n\n if (units === undefined || units === 'millisecond') {\n return this;\n } // 'date' is an alias for 'day', so it should be considered as such.\n\n\n if (units === 'date') {\n units = 'day';\n }\n\n return this.startOf(units).add(1, units === 'isoWeek' ? 'week' : units).subtract(1, 'ms');\n }\n\n function valueOf() {\n return this._d.valueOf() - (this._offset || 0) * 60000;\n }\n\n function unix() {\n return Math.floor(this.valueOf() / 1000);\n }\n\n function toDate() {\n return new Date(this.valueOf());\n }\n\n function toArray() {\n var m = this;\n return [m.year(), m.month(), m.date(), m.hour(), m.minute(), m.second(), m.millisecond()];\n }\n\n function toObject() {\n var m = this;\n return {\n years: m.year(),\n months: m.month(),\n date: m.date(),\n hours: m.hours(),\n minutes: m.minutes(),\n seconds: m.seconds(),\n milliseconds: m.milliseconds()\n };\n }\n\n function toJSON() {\n // new Date(NaN).toJSON() === null\n return this.isValid() ? this.toISOString() : null;\n }\n\n function isValid$2() {\n return isValid(this);\n }\n\n function parsingFlags() {\n return extend({}, getParsingFlags(this));\n }\n\n function invalidAt() {\n return getParsingFlags(this).overflow;\n }\n\n function creationData() {\n return {\n input: this._i,\n format: this._f,\n locale: this._locale,\n isUTC: this._isUTC,\n strict: this._strict\n };\n } // FORMATTING\n\n\n addFormatToken(0, ['gg', 2], 0, function () {\n return this.weekYear() % 100;\n });\n addFormatToken(0, ['GG', 2], 0, function () {\n return this.isoWeekYear() % 100;\n });\n\n function addWeekYearFormatToken(token, getter) {\n addFormatToken(0, [token, token.length], 0, getter);\n }\n\n addWeekYearFormatToken('gggg', 'weekYear');\n addWeekYearFormatToken('ggggg', 'weekYear');\n addWeekYearFormatToken('GGGG', 'isoWeekYear');\n addWeekYearFormatToken('GGGGG', 'isoWeekYear'); // ALIASES\n\n addUnitAlias('weekYear', 'gg');\n addUnitAlias('isoWeekYear', 'GG'); // PRIORITY\n\n addUnitPriority('weekYear', 1);\n addUnitPriority('isoWeekYear', 1); // PARSING\n\n addRegexToken('G', matchSigned);\n addRegexToken('g', matchSigned);\n addRegexToken('GG', match1to2, match2);\n addRegexToken('gg', match1to2, match2);\n addRegexToken('GGGG', match1to4, match4);\n addRegexToken('gggg', match1to4, match4);\n addRegexToken('GGGGG', match1to6, match6);\n addRegexToken('ggggg', match1to6, match6);\n addWeekParseToken(['gggg', 'ggggg', 'GGGG', 'GGGGG'], function (input, week, config, token) {\n week[token.substr(0, 2)] = toInt(input);\n });\n addWeekParseToken(['gg', 'GG'], function (input, week, config, token) {\n week[token] = hooks.parseTwoDigitYear(input);\n }); // MOMENTS\n\n function getSetWeekYear(input) {\n return getSetWeekYearHelper.call(this, input, this.week(), this.weekday(), this.localeData()._week.dow, this.localeData()._week.doy);\n }\n\n function getSetISOWeekYear(input) {\n return getSetWeekYearHelper.call(this, input, this.isoWeek(), this.isoWeekday(), 1, 4);\n }\n\n function getISOWeeksInYear() {\n return weeksInYear(this.year(), 1, 4);\n }\n\n function getWeeksInYear() {\n var weekInfo = this.localeData()._week;\n\n return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy);\n }\n\n function getSetWeekYearHelper(input, week, weekday, dow, doy) {\n var weeksTarget;\n\n if (input == null) {\n return weekOfYear(this, dow, doy).year;\n } else {\n weeksTarget = weeksInYear(input, dow, doy);\n\n if (week > weeksTarget) {\n week = weeksTarget;\n }\n\n return setWeekAll.call(this, input, week, weekday, dow, doy);\n }\n }\n\n function setWeekAll(weekYear, week, weekday, dow, doy) {\n var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy),\n date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear);\n this.year(date.getUTCFullYear());\n this.month(date.getUTCMonth());\n this.date(date.getUTCDate());\n return this;\n } // FORMATTING\n\n\n addFormatToken('Q', 0, 'Qo', 'quarter'); // ALIASES\n\n addUnitAlias('quarter', 'Q'); // PRIORITY\n\n addUnitPriority('quarter', 7); // PARSING\n\n addRegexToken('Q', match1);\n addParseToken('Q', function (input, array) {\n array[MONTH] = (toInt(input) - 1) * 3;\n }); // MOMENTS\n\n function getSetQuarter(input) {\n return input == null ? Math.ceil((this.month() + 1) / 3) : this.month((input - 1) * 3 + this.month() % 3);\n } // FORMATTING\n\n\n addFormatToken('D', ['DD', 2], 'Do', 'date'); // ALIASES\n\n addUnitAlias('date', 'D'); // PRIOROITY\n\n addUnitPriority('date', 9); // PARSING\n\n addRegexToken('D', match1to2);\n addRegexToken('DD', match1to2, match2);\n addRegexToken('Do', function (isStrict, locale) {\n // TODO: Remove \"ordinalParse\" fallback in next major release.\n return isStrict ? locale._dayOfMonthOrdinalParse || locale._ordinalParse : locale._dayOfMonthOrdinalParseLenient;\n });\n addParseToken(['D', 'DD'], DATE);\n addParseToken('Do', function (input, array) {\n array[DATE] = toInt(input.match(match1to2)[0], 10);\n }); // MOMENTS\n\n var getSetDayOfMonth = makeGetSet('Date', true); // FORMATTING\n\n addFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear'); // ALIASES\n\n addUnitAlias('dayOfYear', 'DDD'); // PRIORITY\n\n addUnitPriority('dayOfYear', 4); // PARSING\n\n addRegexToken('DDD', match1to3);\n addRegexToken('DDDD', match3);\n addParseToken(['DDD', 'DDDD'], function (input, array, config) {\n config._dayOfYear = toInt(input);\n }); // HELPERS\n // MOMENTS\n\n function getSetDayOfYear(input) {\n var dayOfYear = Math.round((this.clone().startOf('day') - this.clone().startOf('year')) / 864e5) + 1;\n return input == null ? dayOfYear : this.add(input - dayOfYear, 'd');\n } // FORMATTING\n\n\n addFormatToken('m', ['mm', 2], 0, 'minute'); // ALIASES\n\n addUnitAlias('minute', 'm'); // PRIORITY\n\n addUnitPriority('minute', 14); // PARSING\n\n addRegexToken('m', match1to2);\n addRegexToken('mm', match1to2, match2);\n addParseToken(['m', 'mm'], MINUTE); // MOMENTS\n\n var getSetMinute = makeGetSet('Minutes', false); // FORMATTING\n\n addFormatToken('s', ['ss', 2], 0, 'second'); // ALIASES\n\n addUnitAlias('second', 's'); // PRIORITY\n\n addUnitPriority('second', 15); // PARSING\n\n addRegexToken('s', match1to2);\n addRegexToken('ss', match1to2, match2);\n addParseToken(['s', 'ss'], SECOND); // MOMENTS\n\n var getSetSecond = makeGetSet('Seconds', false); // FORMATTING\n\n addFormatToken('S', 0, 0, function () {\n return ~~(this.millisecond() / 100);\n });\n addFormatToken(0, ['SS', 2], 0, function () {\n return ~~(this.millisecond() / 10);\n });\n addFormatToken(0, ['SSS', 3], 0, 'millisecond');\n addFormatToken(0, ['SSSS', 4], 0, function () {\n return this.millisecond() * 10;\n });\n addFormatToken(0, ['SSSSS', 5], 0, function () {\n return this.millisecond() * 100;\n });\n addFormatToken(0, ['SSSSSS', 6], 0, function () {\n return this.millisecond() * 1000;\n });\n addFormatToken(0, ['SSSSSSS', 7], 0, function () {\n return this.millisecond() * 10000;\n });\n addFormatToken(0, ['SSSSSSSS', 8], 0, function () {\n return this.millisecond() * 100000;\n });\n addFormatToken(0, ['SSSSSSSSS', 9], 0, function () {\n return this.millisecond() * 1000000;\n }); // ALIASES\n\n addUnitAlias('millisecond', 'ms'); // PRIORITY\n\n addUnitPriority('millisecond', 16); // PARSING\n\n addRegexToken('S', match1to3, match1);\n addRegexToken('SS', match1to3, match2);\n addRegexToken('SSS', match1to3, match3);\n var token;\n\n for (token = 'SSSS'; token.length <= 9; token += 'S') {\n addRegexToken(token, matchUnsigned);\n }\n\n function parseMs(input, array) {\n array[MILLISECOND] = toInt(('0.' + input) * 1000);\n }\n\n for (token = 'S'; token.length <= 9; token += 'S') {\n addParseToken(token, parseMs);\n } // MOMENTS\n\n\n var getSetMillisecond = makeGetSet('Milliseconds', false); // FORMATTING\n\n addFormatToken('z', 0, 0, 'zoneAbbr');\n addFormatToken('zz', 0, 0, 'zoneName'); // MOMENTS\n\n function getZoneAbbr() {\n return this._isUTC ? 'UTC' : '';\n }\n\n function getZoneName() {\n return this._isUTC ? 'Coordinated Universal Time' : '';\n }\n\n var proto = Moment.prototype;\n proto.add = add;\n proto.calendar = calendar$1;\n proto.clone = clone;\n proto.diff = diff;\n proto.endOf = endOf;\n proto.format = format;\n proto.from = from;\n proto.fromNow = fromNow;\n proto.to = to;\n proto.toNow = toNow;\n proto.get = stringGet;\n proto.invalidAt = invalidAt;\n proto.isAfter = isAfter;\n proto.isBefore = isBefore;\n proto.isBetween = isBetween;\n proto.isSame = isSame;\n proto.isSameOrAfter = isSameOrAfter;\n proto.isSameOrBefore = isSameOrBefore;\n proto.isValid = isValid$2;\n proto.lang = lang;\n proto.locale = locale;\n proto.localeData = localeData;\n proto.max = prototypeMax;\n proto.min = prototypeMin;\n proto.parsingFlags = parsingFlags;\n proto.set = stringSet;\n proto.startOf = startOf;\n proto.subtract = subtract;\n proto.toArray = toArray;\n proto.toObject = toObject;\n proto.toDate = toDate;\n proto.toISOString = toISOString;\n proto.inspect = inspect;\n proto.toJSON = toJSON;\n proto.toString = toString;\n proto.unix = unix;\n proto.valueOf = valueOf;\n proto.creationData = creationData; // Year\n\n proto.year = getSetYear;\n proto.isLeapYear = getIsLeapYear; // Week Year\n\n proto.weekYear = getSetWeekYear;\n proto.isoWeekYear = getSetISOWeekYear; // Quarter\n\n proto.quarter = proto.quarters = getSetQuarter; // Month\n\n proto.month = getSetMonth;\n proto.daysInMonth = getDaysInMonth; // Week\n\n proto.week = proto.weeks = getSetWeek;\n proto.isoWeek = proto.isoWeeks = getSetISOWeek;\n proto.weeksInYear = getWeeksInYear;\n proto.isoWeeksInYear = getISOWeeksInYear; // Day\n\n proto.date = getSetDayOfMonth;\n proto.day = proto.days = getSetDayOfWeek;\n proto.weekday = getSetLocaleDayOfWeek;\n proto.isoWeekday = getSetISODayOfWeek;\n proto.dayOfYear = getSetDayOfYear; // Hour\n\n proto.hour = proto.hours = getSetHour; // Minute\n\n proto.minute = proto.minutes = getSetMinute; // Second\n\n proto.second = proto.seconds = getSetSecond; // Millisecond\n\n proto.millisecond = proto.milliseconds = getSetMillisecond; // Offset\n\n proto.utcOffset = getSetOffset;\n proto.utc = setOffsetToUTC;\n proto.local = setOffsetToLocal;\n proto.parseZone = setOffsetToParsedOffset;\n proto.hasAlignedHourOffset = hasAlignedHourOffset;\n proto.isDST = isDaylightSavingTime;\n proto.isLocal = isLocal;\n proto.isUtcOffset = isUtcOffset;\n proto.isUtc = isUtc;\n proto.isUTC = isUtc; // Timezone\n\n proto.zoneAbbr = getZoneAbbr;\n proto.zoneName = getZoneName; // Deprecations\n\n proto.dates = deprecate('dates accessor is deprecated. Use date instead.', getSetDayOfMonth);\n proto.months = deprecate('months accessor is deprecated. Use month instead', getSetMonth);\n proto.years = deprecate('years accessor is deprecated. Use year instead', getSetYear);\n proto.zone = deprecate('moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/', getSetZone);\n proto.isDSTShifted = deprecate('isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information', isDaylightSavingTimeShifted);\n\n function createUnix(input) {\n return createLocal(input * 1000);\n }\n\n function createInZone() {\n return createLocal.apply(null, arguments).parseZone();\n }\n\n function preParsePostFormat(string) {\n return string;\n }\n\n var proto$1 = Locale.prototype;\n proto$1.calendar = calendar;\n proto$1.longDateFormat = longDateFormat;\n proto$1.invalidDate = invalidDate;\n proto$1.ordinal = ordinal;\n proto$1.preparse = preParsePostFormat;\n proto$1.postformat = preParsePostFormat;\n proto$1.relativeTime = relativeTime;\n proto$1.pastFuture = pastFuture;\n proto$1.set = set; // Month\n\n proto$1.months = localeMonths;\n proto$1.monthsShort = localeMonthsShort;\n proto$1.monthsParse = localeMonthsParse;\n proto$1.monthsRegex = monthsRegex;\n proto$1.monthsShortRegex = monthsShortRegex; // Week\n\n proto$1.week = localeWeek;\n proto$1.firstDayOfYear = localeFirstDayOfYear;\n proto$1.firstDayOfWeek = localeFirstDayOfWeek; // Day of Week\n\n proto$1.weekdays = localeWeekdays;\n proto$1.weekdaysMin = localeWeekdaysMin;\n proto$1.weekdaysShort = localeWeekdaysShort;\n proto$1.weekdaysParse = localeWeekdaysParse;\n proto$1.weekdaysRegex = weekdaysRegex;\n proto$1.weekdaysShortRegex = weekdaysShortRegex;\n proto$1.weekdaysMinRegex = weekdaysMinRegex; // Hours\n\n proto$1.isPM = localeIsPM;\n proto$1.meridiem = localeMeridiem;\n\n function get$1(format, index, field, setter) {\n var locale = getLocale();\n var utc = createUTC().set(setter, index);\n return locale[field](utc, format);\n }\n\n function listMonthsImpl(format, index, field) {\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n\n if (index != null) {\n return get$1(format, index, field, 'month');\n }\n\n var i;\n var out = [];\n\n for (i = 0; i < 12; i++) {\n out[i] = get$1(format, i, field, 'month');\n }\n\n return out;\n } // ()\n // (5)\n // (fmt, 5)\n // (fmt)\n // (true)\n // (true, 5)\n // (true, fmt, 5)\n // (true, fmt)\n\n\n function listWeekdaysImpl(localeSorted, format, index, field) {\n if (typeof localeSorted === 'boolean') {\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n } else {\n format = localeSorted;\n index = format;\n localeSorted = false;\n\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n }\n\n var locale = getLocale(),\n shift = localeSorted ? locale._week.dow : 0;\n\n if (index != null) {\n return get$1(format, (index + shift) % 7, field, 'day');\n }\n\n var i;\n var out = [];\n\n for (i = 0; i < 7; i++) {\n out[i] = get$1(format, (i + shift) % 7, field, 'day');\n }\n\n return out;\n }\n\n function listMonths(format, index) {\n return listMonthsImpl(format, index, 'months');\n }\n\n function listMonthsShort(format, index) {\n return listMonthsImpl(format, index, 'monthsShort');\n }\n\n function listWeekdays(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdays');\n }\n\n function listWeekdaysShort(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort');\n }\n\n function listWeekdaysMin(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin');\n }\n\n getSetGlobalLocale('en', {\n dayOfMonthOrdinalParse: /\\d{1,2}(th|st|nd|rd)/,\n ordinal: function (number) {\n var b = number % 10,\n output = toInt(number % 100 / 10) === 1 ? 'th' : b === 1 ? 'st' : b === 2 ? 'nd' : b === 3 ? 'rd' : 'th';\n return number + output;\n }\n }); // Side effect imports\n\n hooks.lang = deprecate('moment.lang is deprecated. Use moment.locale instead.', getSetGlobalLocale);\n hooks.langData = deprecate('moment.langData is deprecated. Use moment.localeData instead.', getLocale);\n var mathAbs = Math.abs;\n\n function abs() {\n var data = this._data;\n this._milliseconds = mathAbs(this._milliseconds);\n this._days = mathAbs(this._days);\n this._months = mathAbs(this._months);\n data.milliseconds = mathAbs(data.milliseconds);\n data.seconds = mathAbs(data.seconds);\n data.minutes = mathAbs(data.minutes);\n data.hours = mathAbs(data.hours);\n data.months = mathAbs(data.months);\n data.years = mathAbs(data.years);\n return this;\n }\n\n function addSubtract$1(duration, input, value, direction) {\n var other = createDuration(input, value);\n duration._milliseconds += direction * other._milliseconds;\n duration._days += direction * other._days;\n duration._months += direction * other._months;\n return duration._bubble();\n } // supports only 2.0-style add(1, 's') or add(duration)\n\n\n function add$1(input, value) {\n return addSubtract$1(this, input, value, 1);\n } // supports only 2.0-style subtract(1, 's') or subtract(duration)\n\n\n function subtract$1(input, value) {\n return addSubtract$1(this, input, value, -1);\n }\n\n function absCeil(number) {\n if (number < 0) {\n return Math.floor(number);\n } else {\n return Math.ceil(number);\n }\n }\n\n function bubble() {\n var milliseconds = this._milliseconds;\n var days = this._days;\n var months = this._months;\n var data = this._data;\n var seconds, minutes, hours, years, monthsFromDays; // if we have a mix of positive and negative values, bubble down first\n // check: https://github.com/moment/moment/issues/2166\n\n if (!(milliseconds >= 0 && days >= 0 && months >= 0 || milliseconds <= 0 && days <= 0 && months <= 0)) {\n milliseconds += absCeil(monthsToDays(months) + days) * 864e5;\n days = 0;\n months = 0;\n } // The following code bubbles up values, see the tests for\n // examples of what that means.\n\n\n data.milliseconds = milliseconds % 1000;\n seconds = absFloor(milliseconds / 1000);\n data.seconds = seconds % 60;\n minutes = absFloor(seconds / 60);\n data.minutes = minutes % 60;\n hours = absFloor(minutes / 60);\n data.hours = hours % 24;\n days += absFloor(hours / 24); // convert days to months\n\n monthsFromDays = absFloor(daysToMonths(days));\n months += monthsFromDays;\n days -= absCeil(monthsToDays(monthsFromDays)); // 12 months -> 1 year\n\n years = absFloor(months / 12);\n months %= 12;\n data.days = days;\n data.months = months;\n data.years = years;\n return this;\n }\n\n function daysToMonths(days) {\n // 400 years have 146097 days (taking into account leap year rules)\n // 400 years have 12 months === 4800\n return days * 4800 / 146097;\n }\n\n function monthsToDays(months) {\n // the reverse of daysToMonths\n return months * 146097 / 4800;\n }\n\n function as(units) {\n if (!this.isValid()) {\n return NaN;\n }\n\n var days;\n var months;\n var milliseconds = this._milliseconds;\n units = normalizeUnits(units);\n\n if (units === 'month' || units === 'year') {\n days = this._days + milliseconds / 864e5;\n months = this._months + daysToMonths(days);\n return units === 'month' ? months : months / 12;\n } else {\n // handle milliseconds separately because of floating point math errors (issue #1867)\n days = this._days + Math.round(monthsToDays(this._months));\n\n switch (units) {\n case 'week':\n return days / 7 + milliseconds / 6048e5;\n\n case 'day':\n return days + milliseconds / 864e5;\n\n case 'hour':\n return days * 24 + milliseconds / 36e5;\n\n case 'minute':\n return days * 1440 + milliseconds / 6e4;\n\n case 'second':\n return days * 86400 + milliseconds / 1000;\n // Math.floor prevents floating point math errors here\n\n case 'millisecond':\n return Math.floor(days * 864e5) + milliseconds;\n\n default:\n throw new Error('Unknown unit ' + units);\n }\n }\n } // TODO: Use this.as('ms')?\n\n\n function valueOf$1() {\n if (!this.isValid()) {\n return NaN;\n }\n\n return this._milliseconds + this._days * 864e5 + this._months % 12 * 2592e6 + toInt(this._months / 12) * 31536e6;\n }\n\n function makeAs(alias) {\n return function () {\n return this.as(alias);\n };\n }\n\n var asMilliseconds = makeAs('ms');\n var asSeconds = makeAs('s');\n var asMinutes = makeAs('m');\n var asHours = makeAs('h');\n var asDays = makeAs('d');\n var asWeeks = makeAs('w');\n var asMonths = makeAs('M');\n var asYears = makeAs('y');\n\n function get$2(units) {\n units = normalizeUnits(units);\n return this.isValid() ? this[units + 's']() : NaN;\n }\n\n function makeGetter(name) {\n return function () {\n return this.isValid() ? this._data[name] : NaN;\n };\n }\n\n var milliseconds = makeGetter('milliseconds');\n var seconds = makeGetter('seconds');\n var minutes = makeGetter('minutes');\n var hours = makeGetter('hours');\n var days = makeGetter('days');\n var months = makeGetter('months');\n var years = makeGetter('years');\n\n function weeks() {\n return absFloor(this.days() / 7);\n }\n\n var round = Math.round;\n var thresholds = {\n ss: 44,\n // a few seconds to seconds\n s: 45,\n // seconds to minute\n m: 45,\n // minutes to hour\n h: 22,\n // hours to day\n d: 26,\n // days to month\n M: 11 // months to year\n\n }; // helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize\n\n function substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) {\n return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture);\n }\n\n function relativeTime$1(posNegDuration, withoutSuffix, locale) {\n var duration = createDuration(posNegDuration).abs();\n var seconds = round(duration.as('s'));\n var minutes = round(duration.as('m'));\n var hours = round(duration.as('h'));\n var days = round(duration.as('d'));\n var months = round(duration.as('M'));\n var years = round(duration.as('y'));\n var a = seconds <= thresholds.ss && ['s', seconds] || seconds < thresholds.s && ['ss', seconds] || minutes <= 1 && ['m'] || minutes < thresholds.m && ['mm', minutes] || hours <= 1 && ['h'] || hours < thresholds.h && ['hh', hours] || days <= 1 && ['d'] || days < thresholds.d && ['dd', days] || months <= 1 && ['M'] || months < thresholds.M && ['MM', months] || years <= 1 && ['y'] || ['yy', years];\n a[2] = withoutSuffix;\n a[3] = +posNegDuration > 0;\n a[4] = locale;\n return substituteTimeAgo.apply(null, a);\n } // This function allows you to set the rounding function for relative time strings\n\n\n function getSetRelativeTimeRounding(roundingFunction) {\n if (roundingFunction === undefined) {\n return round;\n }\n\n if (typeof roundingFunction === 'function') {\n round = roundingFunction;\n return true;\n }\n\n return false;\n } // This function allows you to set a threshold for relative time strings\n\n\n function getSetRelativeTimeThreshold(threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n\n if (limit === undefined) {\n return thresholds[threshold];\n }\n\n thresholds[threshold] = limit;\n\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n\n return true;\n }\n\n function humanize(withSuffix) {\n if (!this.isValid()) {\n return this.localeData().invalidDate();\n }\n\n var locale = this.localeData();\n var output = relativeTime$1(this, !withSuffix, locale);\n\n if (withSuffix) {\n output = locale.pastFuture(+this, output);\n }\n\n return locale.postformat(output);\n }\n\n var abs$1 = Math.abs;\n\n function toISOString$1() {\n // for ISO strings we do not use the normal bubbling rules:\n // * milliseconds bubble up until they become hours\n // * days do not bubble at all\n // * months bubble up until they become years\n // This is because there is no context-free conversion between hours and days\n // (think of clock changes)\n // and also not between days and months (28-31 days per month)\n if (!this.isValid()) {\n return this.localeData().invalidDate();\n }\n\n var seconds = abs$1(this._milliseconds) / 1000;\n var days = abs$1(this._days);\n var months = abs$1(this._months);\n var minutes, hours, years; // 3600 seconds -> 60 minutes -> 1 hour\n\n minutes = absFloor(seconds / 60);\n hours = absFloor(minutes / 60);\n seconds %= 60;\n minutes %= 60; // 12 months -> 1 year\n\n years = absFloor(months / 12);\n months %= 12; // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js\n\n var Y = years;\n var M = months;\n var D = days;\n var h = hours;\n var m = minutes;\n var s = seconds;\n var total = this.asSeconds();\n\n if (!total) {\n // this is the same as C#'s (Noda) and python (isodate)...\n // but not other JS (goog.date)\n return 'P0D';\n }\n\n return (total < 0 ? '-' : '') + 'P' + (Y ? Y + 'Y' : '') + (M ? M + 'M' : '') + (D ? D + 'D' : '') + (h || m || s ? 'T' : '') + (h ? h + 'H' : '') + (m ? m + 'M' : '') + (s ? s + 'S' : '');\n }\n\n var proto$2 = Duration.prototype;\n proto$2.isValid = isValid$1;\n proto$2.abs = abs;\n proto$2.add = add$1;\n proto$2.subtract = subtract$1;\n proto$2.as = as;\n proto$2.asMilliseconds = asMilliseconds;\n proto$2.asSeconds = asSeconds;\n proto$2.asMinutes = asMinutes;\n proto$2.asHours = asHours;\n proto$2.asDays = asDays;\n proto$2.asWeeks = asWeeks;\n proto$2.asMonths = asMonths;\n proto$2.asYears = asYears;\n proto$2.valueOf = valueOf$1;\n proto$2._bubble = bubble;\n proto$2.get = get$2;\n proto$2.milliseconds = milliseconds;\n proto$2.seconds = seconds;\n proto$2.minutes = minutes;\n proto$2.hours = hours;\n proto$2.days = days;\n proto$2.weeks = weeks;\n proto$2.months = months;\n proto$2.years = years;\n proto$2.humanize = humanize;\n proto$2.toISOString = toISOString$1;\n proto$2.toString = toISOString$1;\n proto$2.toJSON = toISOString$1;\n proto$2.locale = locale;\n proto$2.localeData = localeData; // Deprecations\n\n proto$2.toIsoString = deprecate('toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)', toISOString$1);\n proto$2.lang = lang; // Side effect imports\n // FORMATTING\n\n addFormatToken('X', 0, 0, 'unix');\n addFormatToken('x', 0, 0, 'valueOf'); // PARSING\n\n addRegexToken('x', matchSigned);\n addRegexToken('X', matchTimestamp);\n addParseToken('X', function (input, array, config) {\n config._d = new Date(parseFloat(input, 10) * 1000);\n });\n addParseToken('x', function (input, array, config) {\n config._d = new Date(toInt(input));\n }); // Side effect imports\n\n hooks.version = '2.18.0';\n setHookCallback(createLocal);\n hooks.fn = proto;\n hooks.min = min;\n hooks.max = max;\n hooks.now = now;\n hooks.utc = createUTC;\n hooks.unix = createUnix;\n hooks.months = listMonths;\n hooks.isDate = isDate;\n hooks.locale = getSetGlobalLocale;\n hooks.invalid = createInvalid;\n hooks.duration = createDuration;\n hooks.isMoment = isMoment;\n hooks.weekdays = listWeekdays;\n hooks.parseZone = createInZone;\n hooks.localeData = getLocale;\n hooks.isDuration = isDuration;\n hooks.monthsShort = listMonthsShort;\n hooks.weekdaysMin = listWeekdaysMin;\n hooks.defineLocale = defineLocale;\n hooks.updateLocale = updateLocale;\n hooks.locales = listLocales;\n hooks.weekdaysShort = listWeekdaysShort;\n hooks.normalizeUnits = normalizeUnits;\n hooks.relativeTimeRounding = getSetRelativeTimeRounding;\n hooks.relativeTimeThreshold = getSetRelativeTimeThreshold;\n hooks.calendarFormat = getCalendarFormat;\n hooks.prototype = proto;\n return hooks;\n });\n /* WEBPACK VAR INJECTION */\n\n }).call(exports, __webpack_require__(84)(module));\n /***/\n },\n /* 84 */\n\n /***/\n function (module, exports) {\n module.exports = function (module) {\n if (!module.webpackPolyfill) {\n module.deprecate = function () {};\n\n module.paths = []; // module.parent = undefined by default\n\n module.children = [];\n module.webpackPolyfill = 1;\n }\n\n return module;\n };\n /***/\n\n },\n /* 85 */\n\n /***/\n function (module, exports) {\n function webpackContext(req) {\n throw new Error(\"Cannot find module '\" + req + \"'.\");\n }\n\n webpackContext.keys = function () {\n return [];\n };\n\n webpackContext.resolve = webpackContext;\n module.exports = webpackContext;\n webpackContext.id = 85;\n /***/\n },\n /* 86 */\n\n /***/\n function (module, exports) {\n /* WEBPACK VAR INJECTION */\n (function (global) {\n 'use strict';\n\n var _rng;\n\n var globalVar = typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : null;\n\n if (globalVar && globalVar.crypto && crypto.getRandomValues) {\n // WHATWG crypto-based RNG - http://wiki.whatwg.org/wiki/Crypto\n // Moderately fast, high quality\n var _rnds8 = new Uint8Array(16);\n\n _rng = function whatwgRNG() {\n crypto.getRandomValues(_rnds8);\n return _rnds8;\n };\n }\n\n if (!_rng) {\n // Math.random()-based (RNG)\n //\n // If all else fails, use Math.random(). It's fast, but is of unspecified\n // quality.\n var _rnds = new Array(16);\n\n _rng = function _rng() {\n for (var i = 0, r; i < 16; i++) {\n if ((i & 0x03) === 0) r = Math.random() * 0x100000000;\n _rnds[i] = r >>> ((i & 0x03) << 3) & 0xff;\n }\n\n return _rnds;\n };\n } // uuid.js\n //\n // Copyright (c) 2010-2012 Robert Kieffer\n // MIT License - http://opensource.org/licenses/mit-license.php\n // Unique ID creation requires a high quality random # generator. We feature\n // detect to determine the best RNG source, normalizing to a function that\n // returns 128-bits of randomness, since that's what's usually required\n //var _rng = require('./rng');\n // Maps for number <-> hex string conversion\n\n\n var _byteToHex = [];\n var _hexToByte = {};\n\n for (var i = 0; i < 256; i++) {\n _byteToHex[i] = (i + 0x100).toString(16).substr(1);\n _hexToByte[_byteToHex[i]] = i;\n } // **`parse()` - Parse a UUID into it's component bytes**\n\n\n function parse(s, buf, offset) {\n var i = buf && offset || 0,\n ii = 0;\n buf = buf || [];\n s.toLowerCase().replace(/[0-9a-f]{2}/g, function (oct) {\n if (ii < 16) {\n // Don't overflow!\n buf[i + ii++] = _hexToByte[oct];\n }\n }); // Zero out remaining bytes if string was short\n\n while (ii < 16) {\n buf[i + ii++] = 0;\n }\n\n return buf;\n } // **`unparse()` - Convert UUID byte array (ala parse()) into a string**\n\n\n function unparse(buf, offset) {\n var i = offset || 0,\n bth = _byteToHex;\n return bth[buf[i++]] + bth[buf[i++]] + bth[buf[i++]] + bth[buf[i++]] + '-' + bth[buf[i++]] + bth[buf[i++]] + '-' + bth[buf[i++]] + bth[buf[i++]] + '-' + bth[buf[i++]] + bth[buf[i++]] + '-' + bth[buf[i++]] + bth[buf[i++]] + bth[buf[i++]] + bth[buf[i++]] + bth[buf[i++]] + bth[buf[i++]];\n } // **`v1()` - Generate time-based UUID**\n //\n // Inspired by https://github.com/LiosK/UUID.js\n // and http://docs.python.org/library/uuid.html\n // random #'s we need to init node and clockseq\n\n\n var _seedBytes = _rng(); // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)\n\n\n var _nodeId = [_seedBytes[0] | 0x01, _seedBytes[1], _seedBytes[2], _seedBytes[3], _seedBytes[4], _seedBytes[5]]; // Per 4.2.2, randomize (14 bit) clockseq\n\n var _clockseq = (_seedBytes[6] << 8 | _seedBytes[7]) & 0x3fff; // Previous uuid creation time\n\n\n var _lastMSecs = 0,\n _lastNSecs = 0; // See https://github.com/broofa/node-uuid for API details\n\n function v1(options, buf, offset) {\n var i = buf && offset || 0;\n var b = buf || [];\n options = options || {};\n var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // UUID timestamps are 100 nano-second units since the Gregorian epoch,\n // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so\n // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'\n // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.\n\n var msecs = options.msecs !== undefined ? options.msecs : new Date().getTime(); // Per 4.2.1.2, use count of uuid's generated during the current clock\n // cycle to simulate higher resolution clock\n\n var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs)\n\n var dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression\n\n if (dt < 0 && options.clockseq === undefined) {\n clockseq = clockseq + 1 & 0x3fff;\n } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new\n // time interval\n\n\n if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {\n nsecs = 0;\n } // Per 4.2.1.2 Throw error if too many uuids are requested\n\n\n if (nsecs >= 10000) {\n throw new Error('uuid.v1(): Can\\'t create more than 10M uuids/sec');\n }\n\n _lastMSecs = msecs;\n _lastNSecs = nsecs;\n _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch\n\n msecs += 12219292800000; // `time_low`\n\n var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;\n b[i++] = tl >>> 24 & 0xff;\n b[i++] = tl >>> 16 & 0xff;\n b[i++] = tl >>> 8 & 0xff;\n b[i++] = tl & 0xff; // `time_mid`\n\n var tmh = msecs / 0x100000000 * 10000 & 0xfffffff;\n b[i++] = tmh >>> 8 & 0xff;\n b[i++] = tmh & 0xff; // `time_high_and_version`\n\n b[i++] = tmh >>> 24 & 0xf | 0x10; // include version\n\n b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)\n\n b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low`\n\n b[i++] = clockseq & 0xff; // `node`\n\n var node = options.node || _nodeId;\n\n for (var n = 0; n < 6; n++) {\n b[i + n] = node[n];\n }\n\n return buf ? buf : unparse(b);\n } // **`v4()` - Generate random UUID**\n // See https://github.com/broofa/node-uuid for API details\n\n\n function v4(options, buf, offset) {\n // Deprecated - 'format' argument, as supported in v1.2\n var i = buf && offset || 0;\n\n if (typeof options == 'string') {\n buf = options == 'binary' ? new Array(16) : null;\n options = null;\n }\n\n options = options || {};\n\n var rnds = options.random || (options.rng || _rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n for (var ii = 0; ii < 16; ii++) {\n buf[i + ii] = rnds[ii];\n }\n }\n\n return buf || unparse(rnds);\n } // Export public API\n\n\n var uuid = v4;\n uuid.v1 = v1;\n uuid.v4 = v4;\n uuid.parse = parse;\n uuid.unparse = unparse;\n module.exports = uuid;\n /* WEBPACK VAR INJECTION */\n }).call(exports, function () {\n return this;\n }());\n /***/\n },\n /* 87 */\n\n /***/\n function (module, exports, __webpack_require__) {\n 'use strict'; // utils\n\n exports.util = __webpack_require__(1);\n exports.DOMutil = __webpack_require__(88); // data\n\n exports.DataSet = __webpack_require__(89);\n exports.DataView = __webpack_require__(93);\n exports.Queue = __webpack_require__(92); // Graph3d\n\n exports.Graph3d = __webpack_require__(94);\n exports.graph3d = {\n Camera: __webpack_require__(102),\n Filter: __webpack_require__(107),\n Point2d: __webpack_require__(101),\n Point3d: __webpack_require__(100),\n Slider: __webpack_require__(108),\n StepNumber: __webpack_require__(109)\n }; // bundled external libraries\n\n exports.moment = __webpack_require__(82);\n exports.Hammer = __webpack_require__(112);\n exports.keycharm = __webpack_require__(115);\n /***/\n },\n /* 88 */\n\n /***/\n function (module, exports) {\n 'use strict'; // DOM utility methods\n\n /**\n * this prepares the JSON container for allocating SVG elements\n * @param JSONcontainer\n * @private\n */\n\n exports.prepareElements = function (JSONcontainer) {\n // cleanup the redundant svgElements;\n for (var elementType in JSONcontainer) {\n if (JSONcontainer.hasOwnProperty(elementType)) {\n JSONcontainer[elementType].redundant = JSONcontainer[elementType].used;\n JSONcontainer[elementType].used = [];\n }\n }\n };\n /**\n * this cleans up all the unused SVG elements. By asking for the parentNode, we only need to supply the JSON container from\n * which to remove the redundant elements.\n *\n * @param JSONcontainer\n * @private\n */\n\n\n exports.cleanupElements = function (JSONcontainer) {\n // cleanup the redundant svgElements;\n for (var elementType in JSONcontainer) {\n if (JSONcontainer.hasOwnProperty(elementType)) {\n if (JSONcontainer[elementType].redundant) {\n for (var i = 0; i < JSONcontainer[elementType].redundant.length; i++) {\n JSONcontainer[elementType].redundant[i].parentNode.removeChild(JSONcontainer[elementType].redundant[i]);\n }\n\n JSONcontainer[elementType].redundant = [];\n }\n }\n }\n };\n /**\n * Ensures that all elements are removed first up so they can be recreated cleanly\n * @param JSONcontainer\n */\n\n\n exports.resetElements = function (JSONcontainer) {\n exports.prepareElements(JSONcontainer);\n exports.cleanupElements(JSONcontainer);\n exports.prepareElements(JSONcontainer);\n };\n /**\n * Allocate or generate an SVG element if needed. Store a reference to it in the JSON container and draw it in the svgContainer\n * the JSON container and the SVG container have to be supplied so other svg containers (like the legend) can use this.\n *\n * @param elementType\n * @param JSONcontainer\n * @param svgContainer\n * @returns {*}\n * @private\n */\n\n\n exports.getSVGElement = function (elementType, JSONcontainer, svgContainer) {\n var element; // allocate SVG element, if it doesnt yet exist, create one.\n\n if (JSONcontainer.hasOwnProperty(elementType)) {\n // this element has been created before\n // check if there is an redundant element\n if (JSONcontainer[elementType].redundant.length > 0) {\n element = JSONcontainer[elementType].redundant[0];\n JSONcontainer[elementType].redundant.shift();\n } else {\n // create a new element and add it to the SVG\n element = document.createElementNS('http://www.w3.org/2000/svg', elementType);\n svgContainer.appendChild(element);\n }\n } else {\n // create a new element and add it to the SVG, also create a new object in the svgElements to keep track of it.\n element = document.createElementNS('http://www.w3.org/2000/svg', elementType);\n JSONcontainer[elementType] = {\n used: [],\n redundant: []\n };\n svgContainer.appendChild(element);\n }\n\n JSONcontainer[elementType].used.push(element);\n return element;\n };\n /**\n * Allocate or generate an SVG element if needed. Store a reference to it in the JSON container and draw it in the svgContainer\n * the JSON container and the SVG container have to be supplied so other svg containers (like the legend) can use this.\n *\n * @param elementType\n * @param JSONcontainer\n * @param DOMContainer\n * @returns {*}\n * @private\n */\n\n\n exports.getDOMElement = function (elementType, JSONcontainer, DOMContainer, insertBefore) {\n var element; // allocate DOM element, if it doesnt yet exist, create one.\n\n if (JSONcontainer.hasOwnProperty(elementType)) {\n // this element has been created before\n // check if there is an redundant element\n if (JSONcontainer[elementType].redundant.length > 0) {\n element = JSONcontainer[elementType].redundant[0];\n JSONcontainer[elementType].redundant.shift();\n } else {\n // create a new element and add it to the SVG\n element = document.createElement(elementType);\n\n if (insertBefore !== undefined) {\n DOMContainer.insertBefore(element, insertBefore);\n } else {\n DOMContainer.appendChild(element);\n }\n }\n } else {\n // create a new element and add it to the SVG, also create a new object in the svgElements to keep track of it.\n element = document.createElement(elementType);\n JSONcontainer[elementType] = {\n used: [],\n redundant: []\n };\n\n if (insertBefore !== undefined) {\n DOMContainer.insertBefore(element, insertBefore);\n } else {\n DOMContainer.appendChild(element);\n }\n }\n\n JSONcontainer[elementType].used.push(element);\n return element;\n };\n /**\n * Draw a point object. This is a separate function because it can also be called by the legend.\n * The reason the JSONcontainer and the target SVG svgContainer have to be supplied is so the legend can use these functions\n * as well.\n *\n * @param x\n * @param y\n * @param groupTemplate: A template containing the necessary information to draw the datapoint e.g., {style: 'circle', size: 5, className: 'className' }\n * @param JSONcontainer\n * @param svgContainer\n * @param labelObj\n * @returns {*}\n */\n\n\n exports.drawPoint = function (x, y, groupTemplate, JSONcontainer, svgContainer, labelObj) {\n var point;\n\n if (groupTemplate.style == 'circle') {\n point = exports.getSVGElement('circle', JSONcontainer, svgContainer);\n point.setAttributeNS(null, \"cx\", x);\n point.setAttributeNS(null, \"cy\", y);\n point.setAttributeNS(null, \"r\", 0.5 * groupTemplate.size);\n } else {\n point = exports.getSVGElement('rect', JSONcontainer, svgContainer);\n point.setAttributeNS(null, \"x\", x - 0.5 * groupTemplate.size);\n point.setAttributeNS(null, \"y\", y - 0.5 * groupTemplate.size);\n point.setAttributeNS(null, \"width\", groupTemplate.size);\n point.setAttributeNS(null, \"height\", groupTemplate.size);\n }\n\n if (groupTemplate.styles !== undefined) {\n point.setAttributeNS(null, \"style\", groupTemplate.styles);\n }\n\n point.setAttributeNS(null, \"class\", groupTemplate.className + \" vis-point\"); //handle label\n\n if (labelObj) {\n var label = exports.getSVGElement('text', JSONcontainer, svgContainer);\n\n if (labelObj.xOffset) {\n x = x + labelObj.xOffset;\n }\n\n if (labelObj.yOffset) {\n y = y + labelObj.yOffset;\n }\n\n if (labelObj.content) {\n label.textContent = labelObj.content;\n }\n\n if (labelObj.className) {\n label.setAttributeNS(null, \"class\", labelObj.className + \" vis-label\");\n }\n\n label.setAttributeNS(null, \"x\", x);\n label.setAttributeNS(null, \"y\", y);\n }\n\n return point;\n };\n /**\n * draw a bar SVG element centered on the X coordinate\n *\n * @param x\n * @param y\n * @param className\n */\n\n\n exports.drawBar = function (x, y, width, height, className, JSONcontainer, svgContainer, style) {\n if (height != 0) {\n if (height < 0) {\n height *= -1;\n y -= height;\n }\n\n var rect = exports.getSVGElement('rect', JSONcontainer, svgContainer);\n rect.setAttributeNS(null, \"x\", x - 0.5 * width);\n rect.setAttributeNS(null, \"y\", y);\n rect.setAttributeNS(null, \"width\", width);\n rect.setAttributeNS(null, \"height\", height);\n rect.setAttributeNS(null, \"class\", className);\n\n if (style) {\n rect.setAttributeNS(null, \"style\", style);\n }\n }\n };\n /***/\n\n },\n /* 89 */\n\n /***/\n function (module, exports, __webpack_require__) {\n 'use strict';\n\n var _stringify = __webpack_require__(90);\n\n var _stringify2 = _interopRequireDefault(_stringify);\n\n var _typeof2 = __webpack_require__(62);\n\n var _typeof3 = _interopRequireDefault(_typeof2);\n\n var _keys = __webpack_require__(58);\n\n var _keys2 = _interopRequireDefault(_keys);\n\n function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n 'default': obj\n };\n }\n\n var util = __webpack_require__(1);\n\n var Queue = __webpack_require__(92);\n /**\n * DataSet\n *\n * Usage:\n * var dataSet = new DataSet({\n * fieldId: '_id',\n * type: {\n * // ...\n * }\n * });\n *\n * dataSet.add(item);\n * dataSet.add(data);\n * dataSet.update(item);\n * dataSet.update(data);\n * dataSet.remove(id);\n * dataSet.remove(ids);\n * var data = dataSet.get();\n * var data = dataSet.get(id);\n * var data = dataSet.get(ids);\n * var data = dataSet.get(ids, options, data);\n * dataSet.clear();\n *\n * A data set can:\n * - add/remove/update data\n * - gives triggers upon changes in the data\n * - can import/export data in various data formats\n *\n * @param {Array} [data] Optional array with initial data\n * @param {Object} [options] Available options:\n * {String} fieldId Field name of the id in the\n * items, 'id' by default.\n * {Object.} [type]\n * {String[]} [fields] field names to be returned\n * {function} [filter] filter items\n * {String | function} [order] Order the items by a field name or custom sort function.\n * @throws Error\n */\n\n\n DataSet.prototype.get = function (args) {\n var me = this; // parse the arguments\n\n var id, ids, options;\n var firstType = util.getType(arguments[0]);\n\n if (firstType == 'String' || firstType == 'Number') {\n // get(id [, options])\n id = arguments[0];\n options = arguments[1];\n } else if (firstType == 'Array') {\n // get(ids [, options])\n ids = arguments[0];\n options = arguments[1];\n } else {\n // get([, options])\n options = arguments[0];\n } // determine the return type\n\n\n var returnType;\n\n if (options && options.returnType) {\n var allowedValues = ['Array', 'Object'];\n returnType = allowedValues.indexOf(options.returnType) == -1 ? 'Array' : options.returnType;\n } else {\n returnType = 'Array';\n } // build options\n\n\n var type = options && options.type || this._options.type;\n var filter = options && options.filter;\n var items = [],\n item,\n itemIds,\n itemId,\n i,\n len; // convert items\n\n if (id != undefined) {\n // return a single item\n item = me._getItem(id, type);\n\n if (item && filter && !filter(item)) {\n item = null;\n }\n } else if (ids != undefined) {\n // return a subset of items\n for (i = 0, len = ids.length; i < len; i++) {\n item = me._getItem(ids[i], type);\n\n if (!filter || filter(item)) {\n items.push(item);\n }\n }\n } else {\n // return all items\n itemIds = (0, _keys2['default'])(this._data);\n\n for (i = 0, len = itemIds.length; i < len; i++) {\n itemId = itemIds[i];\n item = me._getItem(itemId, type);\n\n if (!filter || filter(item)) {\n items.push(item);\n }\n }\n } // order the results\n\n\n if (options && options.order && id == undefined) {\n this._sort(items, options.order);\n } // filter fields of the items\n\n\n if (options && options.fields) {\n var fields = options.fields;\n\n if (id != undefined) {\n item = this._filterFields(item, fields);\n } else {\n for (i = 0, len = items.length; i < len; i++) {\n items[i] = this._filterFields(items[i], fields);\n }\n }\n } // return the results\n\n\n if (returnType == 'Object') {\n var result = {},\n resultant;\n\n for (i = 0, len = items.length; i < len; i++) {\n resultant = items[i];\n result[resultant.id] = resultant;\n }\n\n return result;\n } else {\n if (id != undefined) {\n // a single item\n return item;\n } else {\n // just return our array\n return items;\n }\n }\n };\n /**\n * Get ids of all items or from a filtered set of items.\n * @param {Object} [options] An Object with options. Available options:\n * {function} [filter] filter items\n * {String | function} [order] Order the items by\n * a field name or custom sort function.\n * @return {Array} ids\n */\n\n\n DataSet.prototype.getIds = function (options) {\n var data = this._data,\n filter = options && options.filter,\n order = options && options.order,\n type = options && options.type || this._options.type,\n itemIds = (0, _keys2['default'])(data),\n i,\n len,\n id,\n item,\n items,\n ids = [];\n\n if (filter) {\n // get filtered items\n if (order) {\n // create ordered list\n items = [];\n\n for (i = 0, len = itemIds.length; i < len; i++) {\n id = itemIds[i];\n item = this._getItem(id, type);\n\n if (filter(item)) {\n items.push(item);\n }\n }\n\n this._sort(items, order);\n\n for (i = 0, len = items.length; i < len; i++) {\n ids.push(items[i][this._fieldId]);\n }\n } else {\n // create unordered list\n for (i = 0, len = itemIds.length; i < len; i++) {\n id = itemIds[i];\n item = this._getItem(id, type);\n\n if (filter(item)) {\n ids.push(item[this._fieldId]);\n }\n }\n }\n } else {\n // get all items\n if (order) {\n // create an ordered list\n items = [];\n\n for (i = 0, len = itemIds.length; i < len; i++) {\n id = itemIds[i];\n items.push(data[id]);\n }\n\n this._sort(items, order);\n\n for (i = 0, len = items.length; i < len; i++) {\n ids.push(items[i][this._fieldId]);\n }\n } else {\n // create unordered list\n for (i = 0, len = itemIds.length; i < len; i++) {\n id = itemIds[i];\n item = data[id];\n ids.push(item[this._fieldId]);\n }\n }\n }\n\n return ids;\n };\n /**\n * Returns the DataSet itself. Is overwritten for example by the DataView,\n * which returns the DataSet it is connected to instead.\n */\n\n\n DataSet.prototype.getDataSet = function () {\n return this;\n };\n /**\n * Execute a callback function for every item in the dataset.\n * @param {function} callback\n * @param {Object} [options] Available options:\n * {Object.} [type]\n * {String[]} [fields] filter fields\n * {function} [filter] filter items\n * {String | function} [order] Order the items by\n * a field name or custom sort function.\n */\n\n\n DataSet.prototype.forEach = function (callback, options) {\n var filter = options && options.filter,\n type = options && options.type || this._options.type,\n data = this._data,\n itemIds = (0, _keys2['default'])(data),\n i,\n len,\n item,\n id;\n\n if (options && options.order) {\n // execute forEach on ordered list\n var items = this.get(options);\n\n for (i = 0, len = items.length; i < len; i++) {\n item = items[i];\n id = item[this._fieldId];\n callback(item, id);\n }\n } else {\n // unordered\n for (i = 0, len = itemIds.length; i < len; i++) {\n id = itemIds[i];\n item = this._getItem(id, type);\n\n if (!filter || filter(item)) {\n callback(item, id);\n }\n }\n }\n };\n /**\n * Map every item in the dataset.\n * @param {function} callback\n * @param {Object} [options] Available options:\n * {Object.} [type]\n * {String[]} [fields] filter fields\n * {function} [filter] filter items\n * {String | function} [order] Order the items by\n * a field name or custom sort function.\n * @return {Object[]} mappedItems\n */\n\n\n DataSet.prototype.map = function (callback, options) {\n var filter = options && options.filter,\n type = options && options.type || this._options.type,\n mappedItems = [],\n data = this._data,\n itemIds = (0, _keys2['default'])(data),\n i,\n len,\n id,\n item; // convert and filter items\n\n for (i = 0, len = itemIds.length; i < len; i++) {\n id = itemIds[i];\n item = this._getItem(id, type);\n\n if (!filter || filter(item)) {\n mappedItems.push(callback(item, id));\n }\n } // order items\n\n\n if (options && options.order) {\n this._sort(mappedItems, options.order);\n }\n\n return mappedItems;\n };\n /**\n * Filter the fields of an item\n * @param {Object | null} item\n * @param {String[]} fields Field names\n * @return {Object | null} filteredItem or null if no item is provided\n * @private\n */\n\n\n DataSet.prototype._filterFields = function (item, fields) {\n if (!item) {\n // item is null\n return item;\n }\n\n var filteredItem = {},\n itemFields = (0, _keys2['default'])(item),\n len = itemFields.length,\n i,\n field;\n\n if (Array.isArray(fields)) {\n for (i = 0; i < len; i++) {\n field = itemFields[i];\n\n if (fields.indexOf(field) != -1) {\n filteredItem[field] = item[field];\n }\n }\n } else {\n for (i = 0; i < len; i++) {\n field = itemFields[i];\n\n if (fields.hasOwnProperty(field)) {\n filteredItem[fields[field]] = item[field];\n }\n }\n }\n\n return filteredItem;\n };\n /**\n * Sort the provided array with items\n * @param {Object[]} items\n * @param {String | function} order A field name or custom sort function.\n * @private\n */\n\n\n DataSet.prototype._sort = function (items, order) {\n if (util.isString(order)) {\n // order by provided field name\n var name = order; // field name\n\n items.sort(function (a, b) {\n var av = a[name];\n var bv = b[name];\n return av > bv ? 1 : av < bv ? -1 : 0;\n });\n } else if (typeof order === 'function') {\n // order by sort function\n items.sort(order);\n } // TODO: extend order by an Object {field:String, direction:String}\n // where direction can be 'asc' or 'desc'\n else {\n throw new TypeError('Order must be a function or a string');\n }\n };\n /**\n * Remove an object by pointer or by id\n * @param {String | Number | Object | Array} id Object or id, or an array with\n * objects or ids to be removed\n * @param {String} [senderId] Optional sender id\n * @return {Array} removedIds\n */\n\n\n DataSet.prototype.remove = function (id, senderId) {\n var removedIds = [],\n removedItems = [],\n ids = [],\n i,\n len,\n itemId,\n item; // force everything to be an array for simplicity\n\n ids = Array.isArray(id) ? id : [id];\n\n for (i = 0, len = ids.length; i < len; i++) {\n item = this._remove(ids[i]);\n\n if (item) {\n itemId = item[this._fieldId];\n\n if (itemId != undefined) {\n removedIds.push(itemId);\n removedItems.push(item);\n }\n }\n }\n\n if (removedIds.length) {\n this._trigger('remove', {\n items: removedIds,\n oldData: removedItems\n }, senderId);\n }\n\n return removedIds;\n };\n /**\n * Remove an item by its id\n * @param {Number | String | Object} id id or item\n * @returns {Number | String | null} id\n * @private\n */\n\n\n DataSet.prototype._remove = function (id) {\n var item, ident; // confirm the id to use based on the args type\n\n if (util.isNumber(id) || util.isString(id)) {\n ident = id;\n } else if (id && (typeof id === 'undefined' ? 'undefined' : (0, _typeof3['default'])(id)) === 'object') {\n ident = id[this._fieldId]; // look for the identifier field using _fieldId\n } // do the remove if the item is found\n\n\n if (ident !== undefined && this._data[ident]) {\n item = this._data[ident];\n delete this._data[ident];\n this.length--;\n return item;\n }\n\n return null;\n };\n /**\n * Clear the data\n * @param {String} [senderId] Optional sender id\n * @return {Array} removedIds The ids of all removed items\n */\n\n\n DataSet.prototype.clear = function (senderId) {\n var i, len;\n var ids = (0, _keys2['default'])(this._data);\n var items = [];\n\n for (i = 0, len = ids.length; i < len; i++) {\n items.push(this._data[ids[i]]);\n }\n\n this._data = {};\n this.length = 0;\n\n this._trigger('remove', {\n items: ids,\n oldData: items\n }, senderId);\n\n return ids;\n };\n /**\n * Find the item with maximum value of a specified field\n * @param {String} field\n * @return {Object | null} item Item containing max value, or null if no items\n */\n\n\n DataSet.prototype.max = function (field) {\n var data = this._data,\n itemIds = (0, _keys2['default'])(data),\n max = null,\n maxField = null,\n i,\n len;\n\n for (i = 0, len = itemIds.length; i < len; i++) {\n var id = itemIds[i];\n var item = data[id];\n var itemField = item[field];\n\n if (itemField != null && (!max || itemField > maxField)) {\n max = item;\n maxField = itemField;\n }\n }\n\n return max;\n };\n /**\n * Find the item with minimum value of a specified field\n * @param {String} field\n * @return {Object | null} item Item containing max value, or null if no items\n */\n\n\n DataSet.prototype.min = function (field) {\n var data = this._data,\n itemIds = (0, _keys2['default'])(data),\n min = null,\n minField = null,\n i,\n len;\n\n for (i = 0, len = itemIds.length; i < len; i++) {\n var id = itemIds[i];\n var item = data[id];\n var itemField = item[field];\n\n if (itemField != null && (!min || itemField < minField)) {\n min = item;\n minField = itemField;\n }\n }\n\n return min;\n };\n /**\n * Find all distinct values of a specified field\n * @param {String} field\n * @return {Array} values Array containing all distinct values. If data items\n * do not contain the specified field are ignored.\n * The returned array is unordered.\n */\n\n\n DataSet.prototype.distinct = function (field) {\n var data = this._data;\n var itemIds = (0, _keys2['default'])(data);\n var values = [];\n var fieldType = this._options.type && this._options.type[field] || null;\n var count = 0;\n var i, j, len;\n\n for (i = 0, len = itemIds.length; i < len; i++) {\n var id = itemIds[i];\n var item = data[id];\n var value = item[field];\n var exists = false;\n\n for (j = 0; j < count; j++) {\n if (values[j] == value) {\n exists = true;\n break;\n }\n }\n\n if (!exists && value !== undefined) {\n values[count] = value;\n count++;\n }\n }\n\n if (fieldType) {\n for (i = 0, len = values.length; i < len; i++) {\n values[i] = util.convert(values[i], fieldType);\n }\n }\n\n return values;\n };\n /**\n * Add a single item. Will fail when an item with the same id already exists.\n * @param {Object} item\n * @return {String} id\n * @private\n */\n\n\n DataSet.prototype._addItem = function (item) {\n var id = item[this._fieldId];\n\n if (id != undefined) {\n // check whether this id is already taken\n if (this._data[id]) {\n // item already exists\n throw new Error('Cannot add item: item with id ' + id + ' already exists');\n }\n } else {\n // generate an id\n id = util.randomUUID();\n item[this._fieldId] = id;\n }\n\n var d = {},\n fields = (0, _keys2['default'])(item),\n i,\n len;\n\n for (i = 0, len = fields.length; i < len; i++) {\n var field = fields[i];\n var fieldType = this._type[field]; // type may be undefined\n\n d[field] = util.convert(item[field], fieldType);\n }\n\n this._data[id] = d;\n this.length++;\n return id;\n };\n /**\n * Get an item. Fields can be converted to a specific type\n * @param {String} id\n * @param {Object.} [types] field types to convert\n * @return {Object | null} item\n * @private\n */\n\n\n DataSet.prototype._getItem = function (id, types) {\n var field, value, i, len; // get the item from the dataset\n\n var raw = this._data[id];\n\n if (!raw) {\n return null;\n } // convert the items field types\n\n\n var converted = {},\n fields = (0, _keys2['default'])(raw);\n\n if (types) {\n for (i = 0, len = fields.length; i < len; i++) {\n field = fields[i];\n value = raw[field];\n converted[field] = util.convert(value, types[field]);\n }\n } else {\n // no field types specified, no converting needed\n for (i = 0, len = fields.length; i < len; i++) {\n field = fields[i];\n value = raw[field];\n converted[field] = value;\n }\n }\n\n if (!converted[this._fieldId]) {\n converted[this._fieldId] = raw.id;\n }\n\n return converted;\n };\n /**\n * Update a single item: merge with existing item.\n * Will fail when the item has no id, or when there does not exist an item\n * with the same id.\n * @param {Object} item\n * @return {String} id\n * @private\n */\n\n\n DataSet.prototype._updateItem = function (item) {\n var id = item[this._fieldId];\n\n if (id == undefined) {\n throw new Error('Cannot update item: item has no id (item: ' + (0, _stringify2['default'])(item) + ')');\n }\n\n var d = this._data[id];\n\n if (!d) {\n // item doesn't exist\n throw new Error('Cannot update item: no item with id ' + id + ' found');\n } // merge with current item\n\n\n var fields = (0, _keys2['default'])(item);\n\n for (var i = 0, len = fields.length; i < len; i++) {\n var field = fields[i];\n var fieldType = this._type[field]; // type may be undefined\n\n d[field] = util.convert(item[field], fieldType);\n }\n\n return id;\n };\n\n module.exports = DataSet;\n /***/\n },\n /* 90 */\n\n /***/\n function (module, exports, __webpack_require__) {\n module.exports = {\n \"default\": __webpack_require__(91),\n __esModule: true\n };\n /***/\n },\n /* 91 */\n\n /***/\n function (module, exports, __webpack_require__) {\n var core = __webpack_require__(17),\n $JSON = core.JSON || (core.JSON = {\n stringify: JSON.stringify\n });\n\n module.exports = function stringify(it) {\n // eslint-disable-line no-unused-vars\n return $JSON.stringify.apply($JSON, arguments);\n };\n /***/\n\n },\n /* 92 */\n\n /***/\n function (module, exports) {\n 'use strict';\n /**\n * A queue\n * @param {Object} options\n * Available options:\n * - delay: number When provided, the queue will be flushed\n * automatically after an inactivity of this delay\n * in milliseconds.\n * Default value is null.\n * - max: number When the queue exceeds the given maximum number\n * of entries, the queue is flushed automatically.\n * Default value of max is Infinity.\n * @constructor\n */\n\n function Queue(options) {\n // options\n this.delay = null;\n this.max = Infinity; // properties\n\n this._queue = [];\n this._timeout = null;\n this._extended = null;\n this.setOptions(options);\n }\n /**\n * Update the configuration of the queue\n * @param {Object} options\n * Available options:\n * - delay: number When provided, the queue will be flushed\n * automatically after an inactivity of this delay\n * in milliseconds.\n * Default value is null.\n * - max: number When the queue exceeds the given maximum number\n * of entries, the queue is flushed automatically.\n * Default value of max is Infinity.\n * @param options\n */\n\n\n Queue.prototype.setOptions = function (options) {\n if (options && typeof options.delay !== 'undefined') {\n this.delay = options.delay;\n }\n\n if (options && typeof options.max !== 'undefined') {\n this.max = options.max;\n }\n\n this._flushIfNeeded();\n };\n /**\n * Extend an object with queuing functionality.\n * The object will be extended with a function flush, and the methods provided\n * in options.replace will be replaced with queued ones.\n * @param {Object} object\n * @param {Object} options\n * Available options:\n * - replace: Array.\n * A list with method names of the methods\n * on the object to be replaced with queued ones.\n * - delay: number When provided, the queue will be flushed\n * automatically after an inactivity of this delay\n * in milliseconds.\n * Default value is null.\n * - max: number When the queue exceeds the given maximum number\n * of entries, the queue is flushed automatically.\n * Default value of max is Infinity.\n * @return {Queue} Returns the created queue\n */\n\n\n Queue.extend = function (object, options) {\n var queue = new Queue(options);\n\n if (object.flush !== undefined) {\n throw new Error('Target object already has a property flush');\n }\n\n object.flush = function () {\n queue.flush();\n };\n\n var methods = [{\n name: 'flush',\n original: undefined\n }];\n\n if (options && options.replace) {\n for (var i = 0; i < options.replace.length; i++) {\n var name = options.replace[i];\n methods.push({\n name: name,\n original: object[name]\n });\n queue.replace(object, name);\n }\n }\n\n queue._extended = {\n object: object,\n methods: methods\n };\n return queue;\n };\n /**\n * Destroy the queue. The queue will first flush all queued actions, and in\n * case it has extended an object, will restore the original object.\n */\n\n\n Queue.prototype.destroy = function () {\n this.flush();\n\n if (this._extended) {\n var object = this._extended.object;\n var methods = this._extended.methods;\n\n for (var i = 0; i < methods.length; i++) {\n var method = methods[i];\n\n if (method.original) {\n object[method.name] = method.original;\n } else {\n delete object[method.name];\n }\n }\n\n this._extended = null;\n }\n };\n /**\n * Replace a method on an object with a queued version\n * @param {Object} object Object having the method\n * @param {string} method The method name\n */\n\n\n Queue.prototype.replace = function (object, method) {\n var me = this;\n var original = object[method];\n\n if (!original) {\n throw new Error('Method ' + method + ' undefined');\n }\n\n object[method] = function () {\n // create an Array with the arguments\n var args = [];\n\n for (var i = 0; i < arguments.length; i++) {\n args[i] = arguments[i];\n } // add this call to the queue\n\n\n me.queue({\n args: args,\n fn: original,\n context: this\n });\n };\n };\n /**\n * Queue a call\n * @param {function | {fn: function, args: Array} | {fn: function, args: Array, context: Object}} entry\n */\n\n\n Queue.prototype.queue = function (entry) {\n if (typeof entry === 'function') {\n this._queue.push({\n fn: entry\n });\n } else {\n this._queue.push(entry);\n }\n\n this._flushIfNeeded();\n };\n /**\n * Check whether the queue needs to be flushed\n * @private\n */\n\n\n Queue.prototype._flushIfNeeded = function () {\n // flush when the maximum is exceeded.\n if (this._queue.length > this.max) {\n this.flush();\n } // flush after a period of inactivity when a delay is configured\n\n\n clearTimeout(this._timeout);\n\n if (this.queue.length > 0 && typeof this.delay === 'number') {\n var me = this;\n this._timeout = setTimeout(function () {\n me.flush();\n }, this.delay);\n }\n };\n /**\n * Flush all queued calls\n */\n\n\n Queue.prototype.flush = function () {\n while (this._queue.length > 0) {\n var entry = this._queue.shift();\n\n entry.fn.apply(entry.context || entry.fn, entry.args || []);\n }\n };\n\n module.exports = Queue;\n /***/\n },\n /* 93 */\n\n /***/\n function (module, exports, __webpack_require__) {\n 'use strict';\n\n var _keys = __webpack_require__(58);\n\n var _keys2 = _interopRequireDefault(_keys);\n\n function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n 'default': obj\n };\n }\n\n var util = __webpack_require__(1);\n\n var DataSet = __webpack_require__(89);\n /**\n * DataView\n *\n * a dataview offers a filtered view on a dataset or an other dataview.\n *\n * @param {DataSet | DataView} data\n * @param {Object} [options] Available options: see method get\n *\n * @constructor DataView\n */\n\n\n function DataView(data, options) {\n this._data = null;\n this._ids = {}; // ids of the items currently in memory (just contains a boolean true)\n\n this.length = 0; // number of items in the DataView\n\n this._options = options || {};\n this._fieldId = 'id'; // name of the field containing id\n\n this._subscribers = {}; // event subscribers\n\n var me = this;\n\n this.listener = function () {\n me._onEvent.apply(me, arguments);\n };\n\n this.setData(data);\n } // TODO: implement a function .config() to dynamically update things like configured filter\n // and trigger changes accordingly\n\n /**\n * Set a data source for the view\n * @param {DataSet | DataView} data\n */\n\n\n DataView.prototype.setData = function (data) {\n var ids, id, i, len, items;\n\n if (this._data) {\n // unsubscribe from current dataset\n if (this._data.off) {\n this._data.off('*', this.listener);\n } // trigger a remove of all items in memory\n\n\n ids = this._data.getIds({\n filter: this._options && this._options.filter\n });\n items = [];\n\n for (i = 0, len = ids.length; i < len; i++) {\n items.push(this._data._data[ids[i]]);\n }\n\n this._ids = {};\n this.length = 0;\n\n this._trigger('remove', {\n items: ids,\n oldData: items\n });\n }\n\n this._data = data;\n\n if (this._data) {\n // update fieldId\n this._fieldId = this._options.fieldId || this._data && this._data.options && this._data.options.fieldId || 'id'; // trigger an add of all added items\n\n ids = this._data.getIds({\n filter: this._options && this._options.filter\n });\n\n for (i = 0, len = ids.length; i < len; i++) {\n id = ids[i];\n this._ids[id] = true;\n }\n\n this.length = ids.length;\n\n this._trigger('add', {\n items: ids\n }); // subscribe to new dataset\n\n\n if (this._data.on) {\n this._data.on('*', this.listener);\n }\n }\n };\n /**\n * Refresh the DataView. Useful when the DataView has a filter function\n * containing a variable parameter.\n */\n\n\n DataView.prototype.refresh = function () {\n var id, i, len;\n\n var ids = this._data.getIds({\n filter: this._options && this._options.filter\n }),\n oldIds = (0, _keys2['default'])(this._ids),\n newIds = {},\n addedIds = [],\n removedIds = [],\n removedItems = []; // check for additions\n\n\n for (i = 0, len = ids.length; i < len; i++) {\n id = ids[i];\n newIds[id] = true;\n\n if (!this._ids[id]) {\n addedIds.push(id);\n this._ids[id] = true;\n }\n } // check for removals\n\n\n for (i = 0, len = oldIds.length; i < len; i++) {\n id = oldIds[i];\n\n if (!newIds[id]) {\n removedIds.push(id);\n removedItems.push(this._data._data[id]);\n delete this._ids[id];\n }\n }\n\n this.length += addedIds.length - removedIds.length; // trigger events\n\n if (addedIds.length) {\n this._trigger('add', {\n items: addedIds\n });\n }\n\n if (removedIds.length) {\n this._trigger('remove', {\n items: removedIds,\n oldData: removedItems\n });\n }\n };\n /**\n * Get data from the data view\n *\n * Usage:\n *\n * get()\n * get(options: Object)\n * get(options: Object, data: Array | DataTable)\n *\n * get(id: Number)\n * get(id: Number, options: Object)\n * get(id: Number, options: Object, data: Array | DataTable)\n *\n * get(ids: Number[])\n * get(ids: Number[], options: Object)\n * get(ids: Number[], options: Object, data: Array | DataTable)\n *\n * Where:\n *\n * {Number | String} id The id of an item\n * {Number[] | String{}} ids An array with ids of items\n * {Object} options An Object with options. Available options:\n * {String} [type] Type of data to be returned. Can\n * be 'DataTable' or 'Array' (default)\n * {Object.} [convert]\n * {String[]} [fields] field names to be returned\n * {function} [filter] filter items\n * {String | function} [order] Order the items by\n * a field name or custom sort function.\n * {Array | DataTable} [data] If provided, items will be appended to this\n * array or table. Required in case of Google\n * DataTable.\n * @param args\n */\n\n\n DataView.prototype.get = function (args) {\n var me = this; // parse the arguments\n\n var ids, options, data;\n var firstType = util.getType(arguments[0]);\n\n if (firstType == 'String' || firstType == 'Number' || firstType == 'Array') {\n // get(id(s) [, options] [, data])\n ids = arguments[0]; // can be a single id or an array with ids\n\n options = arguments[1];\n data = arguments[2];\n } else {\n // get([, options] [, data])\n options = arguments[0];\n data = arguments[1];\n } // extend the options with the default options and provided options\n\n\n var viewOptions = util.extend({}, this._options, options); // create a combined filter method when needed\n\n if (this._options.filter && options && options.filter) {\n viewOptions.filter = function (item) {\n return me._options.filter(item) && options.filter(item);\n };\n } // build up the call to the linked data set\n\n\n var getArguments = [];\n\n if (ids != undefined) {\n getArguments.push(ids);\n }\n\n getArguments.push(viewOptions);\n getArguments.push(data);\n return this._data && this._data.get.apply(this._data, getArguments);\n };\n /**\n * Get ids of all items or from a filtered set of items.\n * @param {Object} [options] An Object with options. Available options:\n * {function} [filter] filter items\n * {String | function} [order] Order the items by\n * a field name or custom sort function.\n * @return {Array} ids\n */\n\n\n DataView.prototype.getIds = function (options) {\n var ids;\n\n if (this._data) {\n var defaultFilter = this._options.filter;\n var filter;\n\n if (options && options.filter) {\n if (defaultFilter) {\n filter = function filter(item) {\n return defaultFilter(item) && options.filter(item);\n };\n } else {\n filter = options.filter;\n }\n } else {\n filter = defaultFilter;\n }\n\n ids = this._data.getIds({\n filter: filter,\n order: options && options.order\n });\n } else {\n ids = [];\n }\n\n return ids;\n };\n /**\n * Map every item in the dataset.\n * @param {function} callback\n * @param {Object} [options] Available options:\n * {Object.} [type]\n * {String[]} [fields] filter fields\n * {function} [filter] filter items\n * {String | function} [order] Order the items by\n * a field name or custom sort function.\n * @return {Object[]} mappedItems\n */\n\n\n DataView.prototype.map = function (callback, options) {\n var mappedItems = [];\n\n if (this._data) {\n var defaultFilter = this._options.filter;\n var filter;\n\n if (options && options.filter) {\n if (defaultFilter) {\n filter = function filter(item) {\n return defaultFilter(item) && options.filter(item);\n };\n } else {\n filter = options.filter;\n }\n } else {\n filter = defaultFilter;\n }\n\n mappedItems = this._data.map(callback, {\n filter: filter,\n order: options && options.order\n });\n } else {\n mappedItems = [];\n }\n\n return mappedItems;\n };\n /**\n * Get the DataSet to which this DataView is connected. In case there is a chain\n * of multiple DataViews, the root DataSet of this chain is returned.\n * @return {DataSet} dataSet\n */\n\n\n DataView.prototype.getDataSet = function () {\n var dataSet = this;\n\n while (dataSet instanceof DataView) {\n dataSet = dataSet._data;\n }\n\n return dataSet || null;\n };\n /**\n * Event listener. Will propagate all events from the connected data set to\n * the subscribers of the DataView, but will filter the items and only trigger\n * when there are changes in the filtered data set.\n * @param {String} event\n * @param {Object | null} params\n * @param {String} senderId\n * @private\n */\n\n\n DataView.prototype._onEvent = function (event, params, senderId) {\n var i, len, id, item;\n var ids = params && params.items;\n var addedIds = [],\n updatedIds = [],\n removedIds = [],\n oldItems = [],\n updatedItems = [],\n removedItems = [];\n\n if (ids && this._data) {\n switch (event) {\n case 'add':\n // filter the ids of the added items\n for (i = 0, len = ids.length; i < len; i++) {\n id = ids[i];\n item = this.get(id);\n\n if (item) {\n this._ids[id] = true;\n addedIds.push(id);\n }\n }\n\n break;\n\n case 'update':\n // determine the event from the views viewpoint: an updated\n // item can be added, updated, or removed from this view.\n for (i = 0, len = ids.length; i < len; i++) {\n id = ids[i];\n item = this.get(id);\n\n if (item) {\n if (this._ids[id]) {\n updatedIds.push(id);\n updatedItems.push(params.data[i]);\n oldItems.push(params.oldData[i]);\n } else {\n this._ids[id] = true;\n addedIds.push(id);\n }\n } else {\n if (this._ids[id]) {\n delete this._ids[id];\n removedIds.push(id);\n removedItems.push(params.oldData[i]);\n } else {// nothing interesting for me :-(\n }\n }\n }\n\n break;\n\n case 'remove':\n // filter the ids of the removed items\n for (i = 0, len = ids.length; i < len; i++) {\n id = ids[i];\n\n if (this._ids[id]) {\n delete this._ids[id];\n removedIds.push(id);\n removedItems.push(params.oldData[i]);\n }\n }\n\n break;\n }\n\n this.length += addedIds.length - removedIds.length;\n\n if (addedIds.length) {\n this._trigger('add', {\n items: addedIds\n }, senderId);\n }\n\n if (updatedIds.length) {\n this._trigger('update', {\n items: updatedIds,\n oldData: oldItems,\n data: updatedItems\n }, senderId);\n }\n\n if (removedIds.length) {\n this._trigger('remove', {\n items: removedIds,\n oldData: removedItems\n }, senderId);\n }\n }\n }; // copy subscription functionality from DataSet\n\n\n DataView.prototype.on = DataSet.prototype.on;\n DataView.prototype.off = DataSet.prototype.off;\n DataView.prototype._trigger = DataSet.prototype._trigger; // TODO: make these functions deprecated (replaced with `on` and `off` since version 0.5)\n\n DataView.prototype.subscribe = DataView.prototype.on;\n DataView.prototype.unsubscribe = DataView.prototype.off;\n module.exports = DataView;\n /***/\n },\n /* 94 */\n\n /***/\n function (module, exports, __webpack_require__) {\n 'use strict';\n\n var _assign = __webpack_require__(95);\n\n var _assign2 = _interopRequireDefault(_assign);\n\n function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n 'default': obj\n };\n }\n\n var Emitter = __webpack_require__(99);\n\n var DataSet = __webpack_require__(89);\n\n var DataView = __webpack_require__(93);\n\n var util = __webpack_require__(1);\n\n var Point3d = __webpack_require__(100);\n\n var Point2d = __webpack_require__(101);\n\n var Camera = __webpack_require__(102);\n\n var Filter = __webpack_require__(107);\n\n var Slider = __webpack_require__(108);\n\n var StepNumber = __webpack_require__(109);\n\n var Range = __webpack_require__(110);\n\n var Settings = __webpack_require__(111); /// enumerate the available styles\n\n\n Graph3d.STYLE = Settings.STYLE;\n /**\n * Following label is used in the settings to describe values which should be\n * determined by the code while running, from the current data and graph style.\n *\n * Using 'undefined' directly achieves the same thing, but this is more\n * descriptive by describing the intent.\n */\n\n var autoByDefault = undefined;\n /**\n * Default values for option settings.\n *\n * These are the values used when a Graph3d instance is initialized without\n * custom settings.\n *\n * If a field is not in this list, a default value of 'autoByDefault' is assumed,\n * which is just an alias for 'undefined'.\n */\n\n var DEFAULTS = {\n width: '400px',\n height: '400px',\n filterLabel: 'time',\n legendLabel: 'value',\n xLabel: 'x',\n yLabel: 'y',\n zLabel: 'z',\n xValueLabel: function xValueLabel(v) {\n return v;\n },\n yValueLabel: function yValueLabel(v) {\n return v;\n },\n zValueLabel: function zValueLabel(v) {\n return v;\n },\n showXAxis: true,\n showYAxis: true,\n showZAxis: true,\n showGrid: true,\n showPerspective: true,\n showShadow: false,\n keepAspectRatio: true,\n verticalRatio: 0.5,\n // 0.1 to 1.0, where 1.0 results in a 'cube'\n dotSizeRatio: 0.02,\n // size of the dots as a fraction of the graph width\n showAnimationControls: autoByDefault,\n animationInterval: 1000,\n // milliseconds\n animationPreload: false,\n animationAutoStart: autoByDefault,\n axisColor: '#4D4D4D',\n gridColor: '#D3D3D3',\n xCenter: '55%',\n yCenter: '50%',\n style: Graph3d.STYLE.DOT,\n tooltip: false,\n tooltipStyle: {\n content: {\n padding: '10px',\n border: '1px solid #4d4d4d',\n color: '#1a1a1a',\n background: 'rgba(255,255,255,0.7)',\n borderRadius: '2px',\n boxShadow: '5px 5px 10px rgba(128,128,128,0.5)'\n },\n line: {\n height: '40px',\n width: '0',\n borderLeft: '1px solid #4d4d4d'\n },\n dot: {\n height: '0',\n width: '0',\n border: '5px solid #4d4d4d',\n borderRadius: '5px'\n }\n },\n showLegend: autoByDefault,\n // determined by graph style\n backgroundColor: autoByDefault,\n dataColor: {\n fill: '#7DC1FF',\n stroke: '#3267D2',\n strokeWidth: 1 // px\n\n },\n cameraPosition: {\n horizontal: 1.0,\n vertical: 0.5,\n distance: 1.7\n },\n xBarWidth: autoByDefault,\n yBarWidth: autoByDefault,\n valueMin: autoByDefault,\n valueMax: autoByDefault,\n xMin: autoByDefault,\n xMax: autoByDefault,\n xStep: autoByDefault,\n yMin: autoByDefault,\n yMax: autoByDefault,\n yStep: autoByDefault,\n zMin: autoByDefault,\n zMax: autoByDefault,\n zStep: autoByDefault\n }; // -----------------------------------------------------------------------------\n // Class Graph3d\n // -----------------------------------------------------------------------------\n\n /**\n * @constructor Graph3d\n * Graph3d displays data in 3d.\n *\n * Graph3d is developed in javascript as a Google Visualization Chart.\n *\n * @param {Element} container The DOM element in which the Graph3d will\n * be created. Normally a div element.\n * @param {DataSet | DataView | Array} [data]\n * @param {Object} [options]\n */\n\n function Graph3d(container, data, options) {\n if (!(this instanceof Graph3d)) {\n throw new SyntaxError('Constructor must be called with the new operator');\n } // create variables and set default values\n\n\n this.containerElement = container;\n this.dataTable = null; // The original data table\n\n this.dataPoints = null; // The table with point objects\n // create a frame and canvas\n\n this.create();\n Settings.setDefaults(DEFAULTS, this); // the column indexes\n\n this.colX = undefined;\n this.colY = undefined;\n this.colZ = undefined;\n this.colValue = undefined;\n this.colFilter = undefined; // TODO: customize axis range\n // apply options (also when undefined)\n\n this.setOptions(options); // apply data\n\n if (data) {\n this.setData(data);\n }\n } // Extend Graph3d with an Emitter mixin\n\n\n Emitter(Graph3d.prototype);\n /**\n * Calculate the scaling values, dependent on the range in x, y, and z direction\n */\n\n Graph3d.prototype._setScale = function () {\n this.scale = new Point3d(1 / this.xRange.range(), 1 / this.yRange.range(), 1 / this.zRange.range()); // keep aspect ration between x and y scale if desired\n\n if (this.keepAspectRatio) {\n if (this.scale.x < this.scale.y) {\n //noinspection JSSuspiciousNameCombination\n this.scale.y = this.scale.x;\n } else {\n //noinspection JSSuspiciousNameCombination\n this.scale.x = this.scale.y;\n }\n } // scale the vertical axis\n\n\n this.scale.z *= this.verticalRatio; // TODO: can this be automated? verticalRatio?\n // determine scale for (optional) value\n\n if (this.valueRange !== undefined) {\n this.scale.value = 1 / this.valueRange.range();\n } // position the camera arm\n\n\n var xCenter = this.xRange.center() * this.scale.x;\n var yCenter = this.yRange.center() * this.scale.y;\n var zCenter = this.zRange.center() * this.scale.z;\n this.camera.setArmLocation(xCenter, yCenter, zCenter);\n };\n /**\n * Convert a 3D location to a 2D location on screen\n * Source: ttp://en.wikipedia.org/wiki/3D_projection\n *\n * @param {Point3d} point3d A 3D point with parameters x, y, z\n * @returns {Point2d} point2d A 2D point with parameters x, y\n */\n\n\n Graph3d.prototype._convert3Dto2D = function (point3d) {\n var translation = this._convertPointToTranslation(point3d);\n\n return this._convertTranslationToScreen(translation);\n };\n /**\n * Convert a 3D location its translation seen from the camera\n * Source: http://en.wikipedia.org/wiki/3D_projection\n *\n * @param {Point3d} point3d A 3D point with parameters x, y, z\n * @returns {Point3d} translation A 3D point with parameters x, y, z This is\n * the translation of the point, seen from the\n * camera.\n */\n\n\n Graph3d.prototype._convertPointToTranslation = function (point3d) {\n var cameraLocation = this.camera.getCameraLocation(),\n cameraRotation = this.camera.getCameraRotation(),\n ax = point3d.x * this.scale.x,\n ay = point3d.y * this.scale.y,\n az = point3d.z * this.scale.z,\n cx = cameraLocation.x,\n cy = cameraLocation.y,\n cz = cameraLocation.z,\n // calculate angles\n sinTx = Math.sin(cameraRotation.x),\n cosTx = Math.cos(cameraRotation.x),\n sinTy = Math.sin(cameraRotation.y),\n cosTy = Math.cos(cameraRotation.y),\n sinTz = Math.sin(cameraRotation.z),\n cosTz = Math.cos(cameraRotation.z),\n // calculate translation\n dx = cosTy * (sinTz * (ay - cy) + cosTz * (ax - cx)) - sinTy * (az - cz),\n dy = sinTx * (cosTy * (az - cz) + sinTy * (sinTz * (ay - cy) + cosTz * (ax - cx))) + cosTx * (cosTz * (ay - cy) - sinTz * (ax - cx)),\n dz = cosTx * (cosTy * (az - cz) + sinTy * (sinTz * (ay - cy) + cosTz * (ax - cx))) - sinTx * (cosTz * (ay - cy) - sinTz * (ax - cx));\n return new Point3d(dx, dy, dz);\n };\n /**\n * Convert a translation point to a point on the screen\n *\n * @param {Point3d} translation A 3D point with parameters x, y, z This is\n * the translation of the point, seen from the\n * camera.\n * @returns {Point2d} point2d A 2D point with parameters x, y\n */\n\n\n Graph3d.prototype._convertTranslationToScreen = function (translation) {\n var ex = this.eye.x,\n ey = this.eye.y,\n ez = this.eye.z,\n dx = translation.x,\n dy = translation.y,\n dz = translation.z; // calculate position on screen from translation\n\n var bx;\n var by;\n\n if (this.showPerspective) {\n bx = (dx - ex) * (ez / dz);\n by = (dy - ey) * (ez / dz);\n } else {\n bx = dx * -(ez / this.camera.getArmLength());\n by = dy * -(ez / this.camera.getArmLength());\n } // shift and scale the point to the center of the screen\n // use the width of the graph to scale both horizontally and vertically.\n\n\n return new Point2d(this.currentXCenter + bx * this.frame.canvas.clientWidth, this.currentYCenter - by * this.frame.canvas.clientWidth);\n };\n /**\n * Calculate the translations and screen positions of all points\n */\n\n\n Graph3d.prototype._calcTranslations = function (points, sort) {\n if (sort === undefined) {\n sort = true;\n }\n\n for (var i = 0; i < points.length; i++) {\n var point = points[i];\n point.trans = this._convertPointToTranslation(point.point);\n point.screen = this._convertTranslationToScreen(point.trans); // calculate the translation of the point at the bottom (needed for sorting)\n\n var transBottom = this._convertPointToTranslation(point.bottom);\n\n point.dist = this.showPerspective ? transBottom.length() : -transBottom.z;\n }\n\n if (!sort) {\n return;\n } // sort the points on depth of their (x,y) position (not on z)\n\n\n var sortDepth = function sortDepth(a, b) {\n return b.dist - a.dist;\n };\n\n points.sort(sortDepth);\n };\n\n Graph3d.prototype.getNumberOfRows = function (data) {\n return data.length;\n };\n\n Graph3d.prototype.getNumberOfColumns = function (data) {\n var counter = 0;\n\n for (var column in data[0]) {\n if (data[0].hasOwnProperty(column)) {\n counter++;\n }\n }\n\n return counter;\n };\n\n Graph3d.prototype.getDistinctValues = function (data, column) {\n var distinctValues = [];\n\n for (var i = 0; i < data.length; i++) {\n if (distinctValues.indexOf(data[i][column]) == -1) {\n distinctValues.push(data[i][column]);\n }\n }\n\n return distinctValues.sort(function (a, b) {\n return a - b;\n });\n };\n /**\n * Determine the smallest difference between the values for given\n * column in the passed data set.\n *\n * @returns {Number|null} Smallest difference value or\n * null, if it can't be determined.\n */\n\n\n Graph3d.prototype.getSmallestDifference = function (data, column) {\n var values = this.getDistinctValues(data, column);\n var diffs = []; // Get all the distinct diffs\n // Array values is assumed to be sorted here\n\n var smallest_diff = null;\n\n for (var i = 1; i < values.length; i++) {\n var diff = values[i] - values[i - 1];\n\n if (smallest_diff == null || smallest_diff > diff) {\n smallest_diff = diff;\n }\n }\n\n return smallest_diff;\n };\n /**\n * Get the absolute min/max values for the passed data column.\n *\n * @returns {Range} A Range instance with min/max members properly set.\n */\n\n\n Graph3d.prototype.getColumnRange = function (data, column) {\n var range = new Range(); // Adjust the range so that it covers all values in the passed data elements.\n\n for (var i = 0; i < data.length; i++) {\n var item = data[i][column];\n range.adjust(item);\n }\n\n return range;\n };\n /**\n * Check if the state is consistent for the use of the value field.\n *\n * Throws if a problem is detected.\n */\n\n\n Graph3d.prototype._checkValueField = function (data) {\n var hasValueField = this.style === Graph3d.STYLE.BARCOLOR || this.style === Graph3d.STYLE.BARSIZE || this.style === Graph3d.STYLE.DOTCOLOR || this.style === Graph3d.STYLE.DOTSIZE;\n\n if (!hasValueField) {\n return; // No need to check further\n } // Following field must be present for the current graph style\n\n\n if (this.colValue === undefined) {\n throw new Error('Expected data to have ' + ' field \\'style\\' ' + ' for graph style \\'' + this.style + '\\'');\n } // The data must also contain this field.\n // Note that only first data element is checked.\n\n\n if (data[0][this.colValue] === undefined) {\n throw new Error('Expected data to have ' + ' field \\'' + this.colValue + '\\' ' + ' for graph style \\'' + this.style + '\\'');\n }\n };\n /**\n * Set default values for range\n *\n * The default values override the range values, if defined.\n *\n * Because it's possible that only defaultMin or defaultMax is set, it's better\n * to pass in a range already set with the min/max set from the data. Otherwise,\n * it's quite hard to process the min/max properly.\n */\n\n\n Graph3d.prototype._setRangeDefaults = function (range, defaultMin, defaultMax) {\n if (defaultMin !== undefined) {\n range.min = defaultMin;\n }\n\n if (defaultMax !== undefined) {\n range.max = defaultMax;\n } // This is the original way that the default min/max values were adjusted.\n // TODO: Perhaps it's better if an error is thrown if the values do not agree.\n // But this will change the behaviour.\n\n\n if (range.max <= range.min) range.max = range.min + 1;\n };\n /**\n * Initialize the data from the data table. Calculate minimum and maximum values\n * and column index values\n * @param {Array | DataSet | DataView} rawData The data containing the items for\n * the Graph.\n * @param {Number} style Style Number\n */\n\n\n Graph3d.prototype._dataInitialize = function (rawData, style) {\n var me = this; // unsubscribe from the dataTable\n\n if (this.dataSet) {\n this.dataSet.off('*', this._onChange);\n }\n\n if (rawData === undefined) return;\n\n if (Array.isArray(rawData)) {\n rawData = new DataSet(rawData);\n }\n\n var data;\n\n if (rawData instanceof DataSet || rawData instanceof DataView) {\n data = rawData.get();\n } else {\n throw new Error('Array, DataSet, or DataView expected');\n }\n\n if (data.length == 0) return;\n this.dataSet = rawData;\n this.dataTable = data; // subscribe to changes in the dataset\n\n this._onChange = function () {\n me.setData(me.dataSet);\n };\n\n this.dataSet.on('*', this._onChange); // determine the location of x,y,z,value,filter columns\n\n this.colX = 'x';\n this.colY = 'y';\n this.colZ = 'z';\n var withBars = this.style == Graph3d.STYLE.BAR || this.style == Graph3d.STYLE.BARCOLOR || this.style == Graph3d.STYLE.BARSIZE; // determine barWidth from data\n\n if (withBars) {\n if (this.defaultXBarWidth !== undefined) {\n this.xBarWidth = this.defaultXBarWidth;\n } else {\n this.xBarWidth = this.getSmallestDifference(data, this.colX) || 1;\n }\n\n if (this.defaultYBarWidth !== undefined) {\n this.yBarWidth = this.defaultYBarWidth;\n } else {\n this.yBarWidth = this.getSmallestDifference(data, this.colY) || 1;\n }\n } // calculate minimums and maximums\n\n\n var NUMSTEPS = 5;\n var xRange = this.getColumnRange(data, this.colX);\n\n if (withBars) {\n xRange.expand(this.xBarWidth / 2);\n }\n\n this._setRangeDefaults(xRange, this.defaultXMin, this.defaultXMax);\n\n this.xRange = xRange;\n this.xStep = this.defaultXStep !== undefined ? this.defaultXStep : xRange.range() / NUMSTEPS;\n var yRange = this.getColumnRange(data, this.colY);\n\n if (withBars) {\n yRange.expand(this.yBarWidth / 2);\n }\n\n this._setRangeDefaults(yRange, this.defaultYMin, this.defaultYMax);\n\n this.yRange = yRange;\n this.yStep = this.defaultYStep !== undefined ? this.defaultYStep : yRange.range() / NUMSTEPS;\n var zRange = this.getColumnRange(data, this.colZ);\n\n this._setRangeDefaults(zRange, this.defaultZMin, this.defaultZMax);\n\n this.zRange = zRange;\n this.zStep = this.defaultZStep !== undefined ? this.defaultZStep : zRange.range() / NUMSTEPS;\n\n if (data[0].hasOwnProperty('style')) {\n this.colValue = 'style';\n var valueRange = this.getColumnRange(data, this.colValue);\n\n this._setRangeDefaults(valueRange, this.defaultValueMin, this.defaultValueMax);\n\n this.valueRange = valueRange;\n } // check if a filter column is provided\n // Needs to be started after zRange is defined\n\n\n if (data[0].hasOwnProperty('filter')) {\n // Only set this field if it's actually present\n this.colFilter = 'filter';\n\n if (this.dataFilter === undefined) {\n this.dataFilter = new Filter(rawData, this.colFilter, this);\n this.dataFilter.setOnLoadCallback(function () {\n me.redraw();\n });\n }\n } // set the scale dependent on the ranges.\n\n\n this._setScale();\n };\n /**\n * Filter the data based on the current filter\n *\n * @param {Array} data\n * @returns {Array} dataPoints Array with point objects which can be drawn on\n * screen\n */\n\n\n Graph3d.prototype._getDataPoints = function (data) {\n // TODO: store the created matrix dataPoints in the filters instead of\n // reloading each time.\n var x, y, i, z, obj, point;\n var dataPoints = [];\n\n if (this.style === Graph3d.STYLE.GRID || this.style === Graph3d.STYLE.SURFACE) {\n // copy all values from the google data table to a matrix\n // the provided values are supposed to form a grid of (x,y) positions\n // create two lists with all present x and y values\n var dataX = [];\n var dataY = [];\n\n for (i = 0; i < this.getNumberOfRows(data); i++) {\n x = data[i][this.colX] || 0;\n y = data[i][this.colY] || 0;\n\n if (dataX.indexOf(x) === -1) {\n dataX.push(x);\n }\n\n if (dataY.indexOf(y) === -1) {\n dataY.push(y);\n }\n }\n\n var sortNumber = function sortNumber(a, b) {\n return a - b;\n };\n\n dataX.sort(sortNumber);\n dataY.sort(sortNumber); // create a grid, a 2d matrix, with all values.\n\n var dataMatrix = []; // temporary data matrix\n\n for (i = 0; i < data.length; i++) {\n x = data[i][this.colX] || 0;\n y = data[i][this.colY] || 0;\n z = data[i][this.colZ] || 0; // TODO: implement Array().indexOf() for Internet Explorer\n\n var xIndex = dataX.indexOf(x);\n var yIndex = dataY.indexOf(y);\n\n if (dataMatrix[xIndex] === undefined) {\n dataMatrix[xIndex] = [];\n }\n\n var point3d = new Point3d();\n point3d.x = x;\n point3d.y = y;\n point3d.z = z;\n point3d.data = data[i];\n obj = {};\n obj.point = point3d;\n obj.trans = undefined;\n obj.screen = undefined;\n obj.bottom = new Point3d(x, y, this.zRange.min);\n dataMatrix[xIndex][yIndex] = obj;\n dataPoints.push(obj);\n } // fill in the pointers to the neighbors.\n\n\n for (x = 0; x < dataMatrix.length; x++) {\n for (y = 0; y < dataMatrix[x].length; y++) {\n if (dataMatrix[x][y]) {\n dataMatrix[x][y].pointRight = x < dataMatrix.length - 1 ? dataMatrix[x + 1][y] : undefined;\n dataMatrix[x][y].pointTop = y < dataMatrix[x].length - 1 ? dataMatrix[x][y + 1] : undefined;\n dataMatrix[x][y].pointCross = x < dataMatrix.length - 1 && y < dataMatrix[x].length - 1 ? dataMatrix[x + 1][y + 1] : undefined;\n }\n }\n }\n } else {\n // 'dot', 'dot-line', etc.\n this._checkValueField(data); // copy all values from the google data table to a list with Point3d objects\n\n\n for (i = 0; i < data.length; i++) {\n point = new Point3d();\n point.x = data[i][this.colX] || 0;\n point.y = data[i][this.colY] || 0;\n point.z = data[i][this.colZ] || 0;\n point.data = data[i];\n\n if (this.colValue !== undefined) {\n point.value = data[i][this.colValue] || 0;\n }\n\n obj = {};\n obj.point = point;\n obj.bottom = new Point3d(point.x, point.y, this.zRange.min);\n obj.trans = undefined;\n obj.screen = undefined;\n\n if (this.style === Graph3d.STYLE.LINE) {\n if (i > 0) {\n // Add next point for line drawing\n dataPoints[i - 1].pointNext = obj;\n }\n }\n\n dataPoints.push(obj);\n }\n }\n\n return dataPoints;\n };\n /**\n * Create the main frame for the Graph3d.\n *\n * This function is executed once when a Graph3d object is created. The frame\n * contains a canvas, and this canvas contains all objects like the axis and\n * nodes.\n */\n\n\n Graph3d.prototype.create = function () {\n // remove all elements from the container element.\n while (this.containerElement.hasChildNodes()) {\n this.containerElement.removeChild(this.containerElement.firstChild);\n }\n\n this.frame = document.createElement('div');\n this.frame.style.position = 'relative';\n this.frame.style.overflow = 'hidden'; // create the graph canvas (HTML canvas element)\n\n this.frame.canvas = document.createElement('canvas');\n this.frame.canvas.style.position = 'relative';\n this.frame.appendChild(this.frame.canvas); //if (!this.frame.canvas.getContext) {\n\n {\n var noCanvas = document.createElement('DIV');\n noCanvas.style.color = 'red';\n noCanvas.style.fontWeight = 'bold';\n noCanvas.style.padding = '10px';\n noCanvas.innerHTML = 'Error: your browser does not support HTML canvas';\n this.frame.canvas.appendChild(noCanvas);\n }\n this.frame.filter = document.createElement('div');\n this.frame.filter.style.position = 'absolute';\n this.frame.filter.style.bottom = '0px';\n this.frame.filter.style.left = '0px';\n this.frame.filter.style.width = '100%';\n this.frame.appendChild(this.frame.filter); // add event listeners to handle moving and zooming the contents\n\n var me = this;\n\n var onmousedown = function onmousedown(event) {\n me._onMouseDown(event);\n };\n\n var ontouchstart = function ontouchstart(event) {\n me._onTouchStart(event);\n };\n\n var onmousewheel = function onmousewheel(event) {\n me._onWheel(event);\n };\n\n var ontooltip = function ontooltip(event) {\n me._onTooltip(event);\n };\n\n var onclick = function onclick(event) {\n me._onClick(event);\n }; // TODO: these events are never cleaned up... can give a 'memory leakage'\n\n\n util.addEventListener(this.frame.canvas, 'mousedown', onmousedown);\n util.addEventListener(this.frame.canvas, 'touchstart', ontouchstart);\n util.addEventListener(this.frame.canvas, 'mousewheel', onmousewheel);\n util.addEventListener(this.frame.canvas, 'mousemove', ontooltip);\n util.addEventListener(this.frame.canvas, 'click', onclick); // add the new graph to the container element\n\n this.containerElement.appendChild(this.frame);\n };\n /**\n * Set a new size for the graph\n */\n\n\n Graph3d.prototype._setSize = function (width, height) {\n this.frame.style.width = width;\n this.frame.style.height = height;\n\n this._resizeCanvas();\n };\n /**\n * Resize the canvas to the current size of the frame\n */\n\n\n Graph3d.prototype._resizeCanvas = function () {\n this.frame.canvas.style.width = '100%';\n this.frame.canvas.style.height = '100%';\n this.frame.canvas.width = this.frame.canvas.clientWidth;\n this.frame.canvas.height = this.frame.canvas.clientHeight; // adjust with for margin\n\n this.frame.filter.style.width = this.frame.canvas.clientWidth - 2 * 10 + 'px';\n };\n /**\n * Start animation\n */\n\n\n Graph3d.prototype.animationStart = function () {\n if (!this.frame.filter || !this.frame.filter.slider) throw new Error('No animation available');\n this.frame.filter.slider.play();\n };\n /**\n * Stop animation\n */\n\n\n Graph3d.prototype.animationStop = function () {\n if (!this.frame.filter || !this.frame.filter.slider) return;\n this.frame.filter.slider.stop();\n };\n /**\n * Resize the center position based on the current values in this.xCenter\n * and this.yCenter (which are strings with a percentage or a value\n * in pixels). The center positions are the variables this.currentXCenter\n * and this.currentYCenter\n */\n\n\n Graph3d.prototype._resizeCenter = function () {\n // calculate the horizontal center position\n if (this.xCenter.charAt(this.xCenter.length - 1) === '%') {\n this.currentXCenter = parseFloat(this.xCenter) / 100 * this.frame.canvas.clientWidth;\n } else {\n this.currentXCenter = parseFloat(this.xCenter); // supposed to be in px\n } // calculate the vertical center position\n\n\n if (this.yCenter.charAt(this.yCenter.length - 1) === '%') {\n this.currentYCenter = parseFloat(this.yCenter) / 100 * (this.frame.canvas.clientHeight - this.frame.filter.clientHeight);\n } else {\n this.currentYCenter = parseFloat(this.yCenter); // supposed to be in px\n }\n };\n /**\n * Retrieve the current camera rotation\n *\n * @returns {object} An object with parameters horizontal, vertical, and\n * distance\n */\n\n\n Graph3d.prototype.getCameraPosition = function () {\n var pos = this.camera.getArmRotation();\n pos.distance = this.camera.getArmLength();\n return pos;\n };\n /**\n * Load data into the 3D Graph\n */\n\n\n Graph3d.prototype._readData = function (data) {\n // read the data\n this._dataInitialize(data, this.style);\n\n if (this.dataFilter) {\n // apply filtering\n this.dataPoints = this.dataFilter._getDataPoints();\n } else {\n // no filtering. load all data\n this.dataPoints = this._getDataPoints(this.dataTable);\n } // draw the filter\n\n\n this._redrawFilter();\n };\n /**\n * Replace the dataset of the Graph3d\n *\n * @param {Array | DataSet | DataView} data\n */\n\n\n Graph3d.prototype.setData = function (data) {\n this._readData(data);\n\n this.redraw(); // start animation when option is true\n\n if (this.animationAutoStart && this.dataFilter) {\n this.animationStart();\n }\n };\n /**\n * Update the options. Options will be merged with current options\n *\n * @param {Object} options\n */\n\n\n Graph3d.prototype.setOptions = function (options) {\n var cameraPosition = undefined;\n this.animationStop();\n Settings.setOptions(options, this);\n this.setPointDrawingMethod();\n\n this._setSize(this.width, this.height); // re-load the data\n\n\n if (this.dataTable) {\n this.setData(this.dataTable);\n } // start animation when option is true\n\n\n if (this.animationAutoStart && this.dataFilter) {\n this.animationStart();\n }\n };\n /**\n * Determine which point drawing method to use for the current graph style.\n */\n\n\n Graph3d.prototype.setPointDrawingMethod = function () {\n var method = undefined;\n\n switch (this.style) {\n case Graph3d.STYLE.BAR:\n method = Graph3d.prototype._redrawBarGraphPoint;\n break;\n\n case Graph3d.STYLE.BARCOLOR:\n method = Graph3d.prototype._redrawBarColorGraphPoint;\n break;\n\n case Graph3d.STYLE.BARSIZE:\n method = Graph3d.prototype._redrawBarSizeGraphPoint;\n break;\n\n case Graph3d.STYLE.DOT:\n method = Graph3d.prototype._redrawDotGraphPoint;\n break;\n\n case Graph3d.STYLE.DOTLINE:\n method = Graph3d.prototype._redrawDotLineGraphPoint;\n break;\n\n case Graph3d.STYLE.DOTCOLOR:\n method = Graph3d.prototype._redrawDotColorGraphPoint;\n break;\n\n case Graph3d.STYLE.DOTSIZE:\n method = Graph3d.prototype._redrawDotSizeGraphPoint;\n break;\n\n case Graph3d.STYLE.SURFACE:\n method = Graph3d.prototype._redrawSurfaceGraphPoint;\n break;\n\n case Graph3d.STYLE.GRID:\n method = Graph3d.prototype._redrawGridGraphPoint;\n break;\n\n case Graph3d.STYLE.LINE:\n method = Graph3d.prototype._redrawLineGraphPoint;\n break;\n\n default:\n throw new Error('Can not determine point drawing method ' + 'for graph style \\'' + this.style + '\\'');\n }\n\n this._pointDrawingMethod = method;\n };\n /**\n * Redraw the Graph.\n */\n\n\n Graph3d.prototype.redraw = function () {\n if (this.dataPoints === undefined) {\n throw new Error('Graph data not initialized');\n }\n\n this._resizeCanvas();\n\n this._resizeCenter();\n\n this._redrawSlider();\n\n this._redrawClear();\n\n this._redrawAxis();\n\n this._redrawDataGraph();\n\n this._redrawInfo();\n\n this._redrawLegend();\n };\n /**\n * Get drawing context without exposing canvas\n */\n\n\n Graph3d.prototype._getContext = function () {\n var canvas = this.frame.canvas;\n var ctx = canvas.getContext('2d');\n ctx.lineJoin = 'round';\n ctx.lineCap = 'round';\n return ctx;\n };\n /**\n * Clear the canvas before redrawing\n */\n\n\n Graph3d.prototype._redrawClear = function () {\n var canvas = this.frame.canvas;\n var ctx = canvas.getContext('2d');\n ctx.clearRect(0, 0, canvas.width, canvas.height);\n };\n\n Graph3d.prototype._dotSize = function () {\n return this.frame.clientWidth * this.dotSizeRatio;\n };\n /**\n * Get legend width\n */\n\n\n Graph3d.prototype._getLegendWidth = function () {\n var width;\n\n if (this.style === Graph3d.STYLE.DOTSIZE) {\n var dotSize = this._dotSize();\n\n width = dotSize / 2 + dotSize * 2;\n } else if (this.style === Graph3d.STYLE.BARSIZE) {\n width = this.xBarWidth;\n } else {\n width = 20;\n }\n\n return width;\n };\n /**\n * Redraw the legend based on size, dot color, or surface height\n */\n\n\n Graph3d.prototype._redrawLegend = function () {\n //Return without drawing anything, if no legend is specified\n if (this.showLegend !== true) {\n return;\n } // Do not draw legend when graph style does not support\n\n\n if (this.style === Graph3d.STYLE.LINE || this.style === Graph3d.STYLE.BARSIZE //TODO add legend support for BARSIZE\n ) {\n return;\n } // Legend types - size and color. Determine if size legend.\n\n\n var isSizeLegend = this.style === Graph3d.STYLE.BARSIZE || this.style === Graph3d.STYLE.DOTSIZE; // Legend is either tracking z values or style values. This flag if false means use z values.\n\n var isValueLegend = this.style === Graph3d.STYLE.DOTSIZE || this.style === Graph3d.STYLE.DOTCOLOR || this.style === Graph3d.STYLE.BARCOLOR;\n var height = Math.max(this.frame.clientHeight * 0.25, 100);\n var top = this.margin;\n\n var width = this._getLegendWidth(); // px - overwritten by size legend\n\n\n var right = this.frame.clientWidth - this.margin;\n var left = right - width;\n var bottom = top + height;\n\n var ctx = this._getContext();\n\n ctx.lineWidth = 1;\n ctx.font = '14px arial'; // TODO: put in options\n\n if (isSizeLegend === false) {\n // draw the color bar\n var ymin = 0;\n var ymax = height; // Todo: make height customizable\n\n var y;\n\n for (y = ymin; y < ymax; y++) {\n var f = (y - ymin) / (ymax - ymin);\n var hue = f * 240;\n\n var color = this._hsv2rgb(hue, 1, 1);\n\n ctx.strokeStyle = color;\n ctx.beginPath();\n ctx.moveTo(left, top + y);\n ctx.lineTo(right, top + y);\n ctx.stroke();\n }\n\n ctx.strokeStyle = this.axisColor;\n ctx.strokeRect(left, top, width, height);\n } else {\n // draw the size legend box\n var widthMin;\n\n if (this.style === Graph3d.STYLE.DOTSIZE) {\n var dotSize = this._dotSize();\n\n widthMin = dotSize / 2; // px\n } else if (this.style === Graph3d.STYLE.BARSIZE) {//widthMin = this.xBarWidth * 0.2 this is wrong - barwidth measures in terms of xvalues\n }\n\n ctx.strokeStyle = this.axisColor;\n ctx.fillStyle = this.dataColor.fill;\n ctx.beginPath();\n ctx.moveTo(left, top);\n ctx.lineTo(right, top);\n ctx.lineTo(right - width + widthMin, bottom);\n ctx.lineTo(left, bottom);\n ctx.closePath();\n ctx.fill();\n ctx.stroke();\n } // print value text along the legend edge\n\n\n var gridLineLen = 5; // px\n\n var legendMin = isValueLegend ? this.valueRange.min : this.zRange.min;\n var legendMax = isValueLegend ? this.valueRange.max : this.zRange.max;\n var step = new StepNumber(legendMin, legendMax, (legendMax - legendMin) / 5, true);\n step.start(true);\n var y;\n var from;\n var to;\n\n while (!step.end()) {\n y = bottom - (step.getCurrent() - legendMin) / (legendMax - legendMin) * height;\n from = new Point2d(left - gridLineLen, y);\n to = new Point2d(left, y);\n\n this._line(ctx, from, to);\n\n ctx.textAlign = 'right';\n ctx.textBaseline = 'middle';\n ctx.fillStyle = this.axisColor;\n ctx.fillText(step.getCurrent(), left - 2 * gridLineLen, y);\n step.next();\n }\n\n ctx.textAlign = 'right';\n ctx.textBaseline = 'top';\n var label = this.legendLabel;\n ctx.fillText(label, right, bottom + this.margin);\n };\n /**\n * Redraw the filter\n */\n\n\n Graph3d.prototype._redrawFilter = function () {\n this.frame.filter.innerHTML = '';\n\n if (this.dataFilter) {\n var options = {\n 'visible': this.showAnimationControls\n };\n var slider = new Slider(this.frame.filter, options);\n this.frame.filter.slider = slider; // TODO: css here is not nice here...\n\n this.frame.filter.style.padding = '10px'; //this.frame.filter.style.backgroundColor = '#EFEFEF';\n\n slider.setValues(this.dataFilter.values);\n slider.setPlayInterval(this.animationInterval); // create an event handler\n\n var me = this;\n\n var onchange = function onchange() {\n var index = slider.getIndex();\n me.dataFilter.selectValue(index);\n me.dataPoints = me.dataFilter._getDataPoints();\n me.redraw();\n };\n\n slider.setOnChangeCallback(onchange);\n } else {\n this.frame.filter.slider = undefined;\n }\n };\n /**\n * Redraw the slider\n */\n\n\n Graph3d.prototype._redrawSlider = function () {\n if (this.frame.filter.slider !== undefined) {\n this.frame.filter.slider.redraw();\n }\n };\n /**\n * Redraw common information\n */\n\n\n Graph3d.prototype._redrawInfo = function () {\n if (this.dataFilter) {\n var ctx = this._getContext();\n\n ctx.font = '14px arial'; // TODO: put in options\n\n ctx.lineStyle = 'gray';\n ctx.fillStyle = 'gray';\n ctx.textAlign = 'left';\n ctx.textBaseline = 'top';\n var x = this.margin;\n var y = this.margin;\n ctx.fillText(this.dataFilter.getLabel() + ': ' + this.dataFilter.getSelectedValue(), x, y);\n }\n };\n /**\n * Draw a line between 2d points 'from' and 'to'.\n *\n * If stroke style specified, set that as well.\n */\n\n\n Graph3d.prototype._line = function (ctx, from, to, strokeStyle) {\n if (strokeStyle !== undefined) {\n ctx.strokeStyle = strokeStyle;\n }\n\n ctx.beginPath();\n ctx.moveTo(from.x, from.y);\n ctx.lineTo(to.x, to.y);\n ctx.stroke();\n };\n\n Graph3d.prototype.drawAxisLabelX = function (ctx, point3d, text, armAngle, yMargin) {\n if (yMargin === undefined) {\n yMargin = 0;\n }\n\n var point2d = this._convert3Dto2D(point3d);\n\n if (Math.cos(armAngle * 2) > 0) {\n ctx.textAlign = 'center';\n ctx.textBaseline = 'top';\n point2d.y += yMargin;\n } else if (Math.sin(armAngle * 2) < 0) {\n ctx.textAlign = 'right';\n ctx.textBaseline = 'middle';\n } else {\n ctx.textAlign = 'left';\n ctx.textBaseline = 'middle';\n }\n\n ctx.fillStyle = this.axisColor;\n ctx.fillText(text, point2d.x, point2d.y);\n };\n\n Graph3d.prototype.drawAxisLabelY = function (ctx, point3d, text, armAngle, yMargin) {\n if (yMargin === undefined) {\n yMargin = 0;\n }\n\n var point2d = this._convert3Dto2D(point3d);\n\n if (Math.cos(armAngle * 2) < 0) {\n ctx.textAlign = 'center';\n ctx.textBaseline = 'top';\n point2d.y += yMargin;\n } else if (Math.sin(armAngle * 2) > 0) {\n ctx.textAlign = 'right';\n ctx.textBaseline = 'middle';\n } else {\n ctx.textAlign = 'left';\n ctx.textBaseline = 'middle';\n }\n\n ctx.fillStyle = this.axisColor;\n ctx.fillText(text, point2d.x, point2d.y);\n };\n\n Graph3d.prototype.drawAxisLabelZ = function (ctx, point3d, text, offset) {\n if (offset === undefined) {\n offset = 0;\n }\n\n var point2d = this._convert3Dto2D(point3d);\n\n ctx.textAlign = 'right';\n ctx.textBaseline = 'middle';\n ctx.fillStyle = this.axisColor;\n ctx.fillText(text, point2d.x - offset, point2d.y);\n };\n /**\n /**\n * Draw a line between 2d points 'from' and 'to'.\n *\n * If stroke style specified, set that as well.\n */\n\n\n Graph3d.prototype._line3d = function (ctx, from, to, strokeStyle) {\n var from2d = this._convert3Dto2D(from);\n\n var to2d = this._convert3Dto2D(to);\n\n this._line(ctx, from2d, to2d, strokeStyle);\n };\n /**\n * Redraw the axis\n */\n\n\n Graph3d.prototype._redrawAxis = function () {\n var ctx = this._getContext(),\n from,\n to,\n step,\n prettyStep,\n text,\n xText,\n yText,\n zText,\n offset,\n xOffset,\n yOffset; // TODO: get the actual rendered style of the containerElement\n //ctx.font = this.containerElement.style.font;\n\n\n ctx.font = 24 / this.camera.getArmLength() + 'px arial'; // calculate the length for the short grid lines\n\n var gridLenX = 0.025 / this.scale.x;\n var gridLenY = 0.025 / this.scale.y;\n var textMargin = 5 / this.camera.getArmLength(); // px\n\n var armAngle = this.camera.getArmRotation().horizontal;\n var armVector = new Point2d(Math.cos(armAngle), Math.sin(armAngle));\n var xRange = this.xRange;\n var yRange = this.yRange;\n var zRange = this.zRange; // draw x-grid lines\n\n ctx.lineWidth = 1;\n prettyStep = this.defaultXStep === undefined;\n step = new StepNumber(xRange.min, xRange.max, this.xStep, prettyStep);\n step.start(true);\n\n while (!step.end()) {\n var x = step.getCurrent();\n\n if (this.showGrid) {\n from = new Point3d(x, yRange.min, zRange.min);\n to = new Point3d(x, yRange.max, zRange.min);\n\n this._line3d(ctx, from, to, this.gridColor);\n } else if (this.showXAxis) {\n from = new Point3d(x, yRange.min, zRange.min);\n to = new Point3d(x, yRange.min + gridLenX, zRange.min);\n\n this._line3d(ctx, from, to, this.axisColor);\n\n from = new Point3d(x, yRange.max, zRange.min);\n to = new Point3d(x, yRange.max - gridLenX, zRange.min);\n\n this._line3d(ctx, from, to, this.axisColor);\n }\n\n if (this.showXAxis) {\n yText = armVector.x > 0 ? yRange.min : yRange.max;\n var point3d = new Point3d(x, yText, zRange.min);\n var msg = ' ' + this.xValueLabel(x) + ' ';\n this.drawAxisLabelX(ctx, point3d, msg, armAngle, textMargin);\n }\n\n step.next();\n } // draw y-grid lines\n\n\n ctx.lineWidth = 1;\n prettyStep = this.defaultYStep === undefined;\n step = new StepNumber(yRange.min, yRange.max, this.yStep, prettyStep);\n step.start(true);\n\n while (!step.end()) {\n var y = step.getCurrent();\n\n if (this.showGrid) {\n from = new Point3d(xRange.min, y, zRange.min);\n to = new Point3d(xRange.max, y, zRange.min);\n\n this._line3d(ctx, from, to, this.gridColor);\n } else if (this.showYAxis) {\n from = new Point3d(xRange.min, y, zRange.min);\n to = new Point3d(xRange.min + gridLenY, y, zRange.min);\n\n this._line3d(ctx, from, to, this.axisColor);\n\n from = new Point3d(xRange.max, y, zRange.min);\n to = new Point3d(xRange.max - gridLenY, y, zRange.min);\n\n this._line3d(ctx, from, to, this.axisColor);\n }\n\n if (this.showYAxis) {\n xText = armVector.y > 0 ? xRange.min : xRange.max;\n point3d = new Point3d(xText, y, zRange.min);\n var msg = ' ' + this.yValueLabel(y) + ' ';\n this.drawAxisLabelY(ctx, point3d, msg, armAngle, textMargin);\n }\n\n step.next();\n } // draw z-grid lines and axis\n\n\n if (this.showZAxis) {\n ctx.lineWidth = 1;\n prettyStep = this.defaultZStep === undefined;\n step = new StepNumber(zRange.min, zRange.max, this.zStep, prettyStep);\n step.start(true);\n xText = armVector.x > 0 ? xRange.min : xRange.max;\n yText = armVector.y < 0 ? yRange.min : yRange.max;\n\n while (!step.end()) {\n var z = step.getCurrent(); // TODO: make z-grid lines really 3d?\n\n var from3d = new Point3d(xText, yText, z);\n\n var from2d = this._convert3Dto2D(from3d);\n\n to = new Point2d(from2d.x - textMargin, from2d.y);\n\n this._line(ctx, from2d, to, this.axisColor);\n\n var msg = this.zValueLabel(z) + ' ';\n this.drawAxisLabelZ(ctx, from3d, msg, 5);\n step.next();\n }\n\n ctx.lineWidth = 1;\n from = new Point3d(xText, yText, zRange.min);\n to = new Point3d(xText, yText, zRange.max);\n\n this._line3d(ctx, from, to, this.axisColor);\n } // draw x-axis\n\n\n if (this.showXAxis) {\n var xMin2d;\n var xMax2d;\n ctx.lineWidth = 1; // line at yMin\n\n xMin2d = new Point3d(xRange.min, yRange.min, zRange.min);\n xMax2d = new Point3d(xRange.max, yRange.min, zRange.min);\n\n this._line3d(ctx, xMin2d, xMax2d, this.axisColor); // line at ymax\n\n\n xMin2d = new Point3d(xRange.min, yRange.max, zRange.min);\n xMax2d = new Point3d(xRange.max, yRange.max, zRange.min);\n\n this._line3d(ctx, xMin2d, xMax2d, this.axisColor);\n } // draw y-axis\n\n\n if (this.showYAxis) {\n ctx.lineWidth = 1; // line at xMin\n\n from = new Point3d(xRange.min, yRange.min, zRange.min);\n to = new Point3d(xRange.min, yRange.max, zRange.min);\n\n this._line3d(ctx, from, to, this.axisColor); // line at xMax\n\n\n from = new Point3d(xRange.max, yRange.min, zRange.min);\n to = new Point3d(xRange.max, yRange.max, zRange.min);\n\n this._line3d(ctx, from, to, this.axisColor);\n } // draw x-label\n\n\n var xLabel = this.xLabel;\n\n if (xLabel.length > 0 && this.showXAxis) {\n yOffset = 0.1 / this.scale.y;\n xText = (xRange.max + 3 * xRange.min) / 4;\n yText = armVector.x > 0 ? yRange.min - yOffset : yRange.max + yOffset;\n text = new Point3d(xText, yText, zRange.min);\n this.drawAxisLabelX(ctx, text, xLabel, armAngle);\n } // draw y-label\n\n\n var yLabel = this.yLabel;\n\n if (yLabel.length > 0 && this.showYAxis) {\n xOffset = 0.1 / this.scale.x;\n xText = armVector.y > 0 ? xRange.min - xOffset : xRange.max + xOffset;\n yText = (yRange.max + 3 * yRange.min) / 4;\n text = new Point3d(xText, yText, zRange.min);\n this.drawAxisLabelY(ctx, text, yLabel, armAngle);\n } // draw z-label\n\n\n var zLabel = this.zLabel;\n\n if (zLabel.length > 0 && this.showZAxis) {\n offset = 30; // pixels. // TODO: relate to the max width of the values on the z axis?\n\n xText = armVector.x > 0 ? xRange.min : xRange.max;\n yText = armVector.y < 0 ? yRange.min : yRange.max;\n zText = (zRange.max + 3 * zRange.min) / 4;\n text = new Point3d(xText, yText, zText);\n this.drawAxisLabelZ(ctx, text, zLabel, offset);\n }\n };\n /**\n * Calculate the color based on the given value.\n * @param {Number} H Hue, a value be between 0 and 360\n * @param {Number} S Saturation, a value between 0 and 1\n * @param {Number} V Value, a value between 0 and 1\n */\n\n\n Graph3d.prototype._hsv2rgb = function (H, S, V) {\n var R, G, B, C, Hi, X;\n C = V * S;\n Hi = Math.floor(H / 60); // hi = 0,1,2,3,4,5\n\n X = C * (1 - Math.abs(H / 60 % 2 - 1));\n\n switch (Hi) {\n case 0:\n R = C;\n G = X;\n B = 0;\n break;\n\n case 1:\n R = X;\n G = C;\n B = 0;\n break;\n\n case 2:\n R = 0;\n G = C;\n B = X;\n break;\n\n case 3:\n R = 0;\n G = X;\n B = C;\n break;\n\n case 4:\n R = X;\n G = 0;\n B = C;\n break;\n\n case 5:\n R = C;\n G = 0;\n B = X;\n break;\n\n default:\n R = 0;\n G = 0;\n B = 0;\n break;\n }\n\n return 'RGB(' + parseInt(R * 255) + ',' + parseInt(G * 255) + ',' + parseInt(B * 255) + ')';\n };\n\n Graph3d.prototype._getStrokeWidth = function (point) {\n if (point !== undefined) {\n if (this.showPerspective) {\n return 1 / -point.trans.z * this.dataColor.strokeWidth;\n } else {\n return -(this.eye.z / this.camera.getArmLength()) * this.dataColor.strokeWidth;\n }\n }\n\n return this.dataColor.strokeWidth;\n }; // -----------------------------------------------------------------------------\n // Drawing primitives for the graphs\n // -----------------------------------------------------------------------------\n\n /**\n * Draw a bar element in the view with the given properties.\n */\n\n\n Graph3d.prototype._redrawBar = function (ctx, point, xWidth, yWidth, color, borderColor) {\n var i, j, surface; // calculate all corner points\n\n var me = this;\n var point3d = point.point;\n var zMin = this.zRange.min;\n var top = [{\n point: new Point3d(point3d.x - xWidth, point3d.y - yWidth, point3d.z)\n }, {\n point: new Point3d(point3d.x + xWidth, point3d.y - yWidth, point3d.z)\n }, {\n point: new Point3d(point3d.x + xWidth, point3d.y + yWidth, point3d.z)\n }, {\n point: new Point3d(point3d.x - xWidth, point3d.y + yWidth, point3d.z)\n }];\n var bottom = [{\n point: new Point3d(point3d.x - xWidth, point3d.y - yWidth, zMin)\n }, {\n point: new Point3d(point3d.x + xWidth, point3d.y - yWidth, zMin)\n }, {\n point: new Point3d(point3d.x + xWidth, point3d.y + yWidth, zMin)\n }, {\n point: new Point3d(point3d.x - xWidth, point3d.y + yWidth, zMin)\n }]; // calculate screen location of the points\n\n top.forEach(function (obj) {\n obj.screen = me._convert3Dto2D(obj.point);\n });\n bottom.forEach(function (obj) {\n obj.screen = me._convert3Dto2D(obj.point);\n }); // create five sides, calculate both corner points and center points\n\n var surfaces = [{\n corners: top,\n center: Point3d.avg(bottom[0].point, bottom[2].point)\n }, {\n corners: [top[0], top[1], bottom[1], bottom[0]],\n center: Point3d.avg(bottom[1].point, bottom[0].point)\n }, {\n corners: [top[1], top[2], bottom[2], bottom[1]],\n center: Point3d.avg(bottom[2].point, bottom[1].point)\n }, {\n corners: [top[2], top[3], bottom[3], bottom[2]],\n center: Point3d.avg(bottom[3].point, bottom[2].point)\n }, {\n corners: [top[3], top[0], bottom[0], bottom[3]],\n center: Point3d.avg(bottom[0].point, bottom[3].point)\n }];\n point.surfaces = surfaces; // calculate the distance of each of the surface centers to the camera\n\n for (j = 0; j < surfaces.length; j++) {\n surface = surfaces[j];\n\n var transCenter = this._convertPointToTranslation(surface.center);\n\n surface.dist = this.showPerspective ? transCenter.length() : -transCenter.z; // TODO: this dept calculation doesn't work 100% of the cases due to perspective,\n // but the current solution is fast/simple and works in 99.9% of all cases\n // the issue is visible in example 14, with graph.setCameraPosition({horizontal: 2.97, vertical: 0.5, distance: 0.9})\n } // order the surfaces by their (translated) depth\n\n\n surfaces.sort(function (a, b) {\n var diff = b.dist - a.dist;\n if (diff) return diff; // if equal depth, sort the top surface last\n\n if (a.corners === top) return 1;\n if (b.corners === top) return -1; // both are equal\n\n return 0;\n }); // draw the ordered surfaces\n\n ctx.lineWidth = this._getStrokeWidth(point);\n ctx.strokeStyle = borderColor;\n ctx.fillStyle = color; // NOTE: we start at j=2 instead of j=0 as we don't need to draw the two surfaces at the backside\n\n for (j = 2; j < surfaces.length; j++) {\n surface = surfaces[j];\n\n this._polygon(ctx, surface.corners);\n }\n };\n /**\n * Draw a polygon using the passed points and fill it with the passed style and stroke.\n *\n * @param points an array of points.\n * @param fillStyle optional; the fill style to set\n * @param strokeStyle optional; the stroke style to set\n */\n\n\n Graph3d.prototype._polygon = function (ctx, points, fillStyle, strokeStyle) {\n if (points.length < 2) {\n return;\n }\n\n if (fillStyle !== undefined) {\n ctx.fillStyle = fillStyle;\n }\n\n if (strokeStyle !== undefined) {\n ctx.strokeStyle = strokeStyle;\n }\n\n ctx.beginPath();\n ctx.moveTo(points[0].screen.x, points[0].screen.y);\n\n for (var i = 1; i < points.length; ++i) {\n var point = points[i];\n ctx.lineTo(point.screen.x, point.screen.y);\n }\n\n ctx.closePath();\n ctx.fill();\n ctx.stroke(); // TODO: only draw stroke when strokeWidth > 0\n };\n /**\n * @param size optional; if not specified use value from 'this._dotSize()`\n */\n\n\n Graph3d.prototype._drawCircle = function (ctx, point, color, borderColor, size) {\n var radius = this._calcRadius(point, size);\n\n ctx.lineWidth = this._getStrokeWidth(point);\n ctx.strokeStyle = borderColor;\n ctx.fillStyle = color;\n ctx.beginPath();\n ctx.arc(point.screen.x, point.screen.y, radius, 0, Math.PI * 2, true);\n ctx.fill();\n ctx.stroke();\n };\n /**\n * Determine the colors for the 'regular' graph styles.\n */\n\n\n Graph3d.prototype._getColorsRegular = function (point) {\n // calculate Hue from the current value. At zMin the hue is 240, at zMax the hue is 0\n var hue = (1 - (point.point.z - this.zRange.min) * this.scale.z / this.verticalRatio) * 240;\n\n var color = this._hsv2rgb(hue, 1, 1);\n\n var borderColor = this._hsv2rgb(hue, 1, 0.8);\n\n return {\n fill: color,\n border: borderColor\n };\n };\n /**\n * Get the colors for the 'color' graph styles.\n * These styles are currently: 'bar-color' and 'dot-color'\n * Color may be set as a string representation of HTML color, like #ff00ff,\n * or calculated from a number, for example, distance from this point\n * The first option is useful when we have some pre-given legend, to which we have to adjust ourselves\n * The second option is useful when we are interested in automatically setting the color, from some value,\n * using some color scale\n */\n\n\n Graph3d.prototype._getColorsColor = function (point) {\n // calculate the color based on the value\n var color, borderColor;\n\n if (typeof point.point.value === \"string\") {\n color = point.point.value;\n borderColor = point.point.value;\n } else {\n var hue = (1 - (point.point.value - this.valueRange.min) * this.scale.value) * 240;\n color = this._hsv2rgb(hue, 1, 1);\n borderColor = this._hsv2rgb(hue, 1, 0.8);\n }\n\n return {\n fill: color,\n border: borderColor\n };\n };\n /**\n * Get the colors for the 'size' graph styles.\n * These styles are currently: 'bar-size' and 'dot-size'\n */\n\n\n Graph3d.prototype._getColorsSize = function () {\n return {\n fill: this.dataColor.fill,\n border: this.dataColor.stroke\n };\n };\n /**\n * Determine the size of a point on-screen, as determined by the\n * distance to the camera.\n *\n * @param size the size that needs to be translated to screen coordinates.\n * optional; if not passed, use the default point size.\n */\n\n\n Graph3d.prototype._calcRadius = function (point, size) {\n if (size === undefined) {\n size = this._dotSize();\n }\n\n var radius;\n\n if (this.showPerspective) {\n radius = size / -point.trans.z;\n } else {\n radius = size * -(this.eye.z / this.camera.getArmLength());\n }\n\n if (radius < 0) {\n radius = 0;\n }\n\n return radius;\n }; // -----------------------------------------------------------------------------\n // Methods for drawing points per graph style.\n // -----------------------------------------------------------------------------\n\n /**\n * Draw single datapoint for graph style 'bar'.\n */\n\n\n Graph3d.prototype._redrawBarGraphPoint = function (ctx, point) {\n var xWidth = this.xBarWidth / 2;\n var yWidth = this.yBarWidth / 2;\n\n var colors = this._getColorsRegular(point);\n\n this._redrawBar(ctx, point, xWidth, yWidth, colors.fill, colors.border);\n };\n /**\n * Draw single datapoint for graph style 'bar-color'.\n */\n\n\n Graph3d.prototype._redrawBarColorGraphPoint = function (ctx, point) {\n var xWidth = this.xBarWidth / 2;\n var yWidth = this.yBarWidth / 2;\n\n var colors = this._getColorsColor(point);\n\n this._redrawBar(ctx, point, xWidth, yWidth, colors.fill, colors.border);\n };\n /**\n * Draw single datapoint for graph style 'bar-size'.\n */\n\n\n Graph3d.prototype._redrawBarSizeGraphPoint = function (ctx, point) {\n // calculate size for the bar\n var fraction = (point.point.value - this.valueRange.min) / this.valueRange.range();\n var xWidth = this.xBarWidth / 2 * (fraction * 0.8 + 0.2);\n var yWidth = this.yBarWidth / 2 * (fraction * 0.8 + 0.2);\n\n var colors = this._getColorsSize();\n\n this._redrawBar(ctx, point, xWidth, yWidth, colors.fill, colors.border);\n };\n /**\n * Draw single datapoint for graph style 'dot'.\n */\n\n\n Graph3d.prototype._redrawDotGraphPoint = function (ctx, point) {\n var colors = this._getColorsRegular(point);\n\n this._drawCircle(ctx, point, colors.fill, colors.border);\n };\n /**\n * Draw single datapoint for graph style 'dot-line'.\n */\n\n\n Graph3d.prototype._redrawDotLineGraphPoint = function (ctx, point) {\n // draw a vertical line from the XY-plane to the graph value\n var from = this._convert3Dto2D(point.bottom);\n\n ctx.lineWidth = 1;\n\n this._line(ctx, from, point.screen, this.gridColor);\n\n this._redrawDotGraphPoint(ctx, point);\n };\n /**\n * Draw single datapoint for graph style 'dot-color'.\n */\n\n\n Graph3d.prototype._redrawDotColorGraphPoint = function (ctx, point) {\n var colors = this._getColorsColor(point);\n\n this._drawCircle(ctx, point, colors.fill, colors.border);\n };\n /**\n * Draw single datapoint for graph style 'dot-size'.\n */\n\n\n Graph3d.prototype._redrawDotSizeGraphPoint = function (ctx, point) {\n var dotSize = this._dotSize();\n\n var fraction = (point.point.value - this.valueRange.min) / this.valueRange.range();\n var size = dotSize / 2 + 2 * dotSize * fraction;\n\n var colors = this._getColorsSize();\n\n this._drawCircle(ctx, point, colors.fill, colors.border, size);\n };\n /**\n * Draw single datapoint for graph style 'surface'.\n */\n\n\n Graph3d.prototype._redrawSurfaceGraphPoint = function (ctx, point) {\n var right = point.pointRight;\n var top = point.pointTop;\n var cross = point.pointCross;\n\n if (point === undefined || right === undefined || top === undefined || cross === undefined) {\n return;\n }\n\n var topSideVisible = true;\n var fillStyle;\n var strokeStyle;\n var lineWidth;\n\n if (this.showGrayBottom || this.showShadow) {\n // calculate the cross product of the two vectors from center\n // to left and right, in order to know whether we are looking at the\n // bottom or at the top side. We can also use the cross product\n // for calculating light intensity\n var aDiff = Point3d.subtract(cross.trans, point.trans);\n var bDiff = Point3d.subtract(top.trans, right.trans);\n var crossproduct = Point3d.crossProduct(aDiff, bDiff);\n var len = crossproduct.length(); // FIXME: there is a bug with determining the surface side (shadow or colored)\n\n topSideVisible = crossproduct.z > 0;\n }\n\n if (topSideVisible) {\n // calculate Hue from the current value. At zMin the hue is 240, at zMax the hue is 0\n var zAvg = (point.point.z + right.point.z + top.point.z + cross.point.z) / 4;\n var h = (1 - (zAvg - this.zRange.min) * this.scale.z / this.verticalRatio) * 240;\n var s = 1; // saturation\n\n var v;\n\n if (this.showShadow) {\n v = Math.min(1 + crossproduct.x / len / 2, 1); // value. TODO: scale\n\n fillStyle = this._hsv2rgb(h, s, v);\n strokeStyle = fillStyle;\n } else {\n v = 1;\n fillStyle = this._hsv2rgb(h, s, v);\n strokeStyle = this.axisColor; // TODO: should be customizable\n }\n } else {\n fillStyle = 'gray';\n strokeStyle = this.axisColor;\n }\n\n ctx.lineWidth = this._getStrokeWidth(point); // TODO: only draw stroke when strokeWidth > 0\n\n var points = [point, right, cross, top];\n\n this._polygon(ctx, points, fillStyle, strokeStyle);\n };\n /**\n * Helper method for _redrawGridGraphPoint()\n */\n\n\n Graph3d.prototype._drawGridLine = function (ctx, from, to) {\n if (from === undefined || to === undefined) {\n return;\n } // calculate Hue from the current value. At zMin the hue is 240, at zMax the hue is 0\n\n\n var zAvg = (from.point.z + to.point.z) / 2;\n var h = (1 - (zAvg - this.zRange.min) * this.scale.z / this.verticalRatio) * 240;\n ctx.lineWidth = this._getStrokeWidth(from) * 2;\n ctx.strokeStyle = this._hsv2rgb(h, 1, 1);\n\n this._line(ctx, from.screen, to.screen);\n };\n /**\n * Draw single datapoint for graph style 'Grid'.\n */\n\n\n Graph3d.prototype._redrawGridGraphPoint = function (ctx, point) {\n this._drawGridLine(ctx, point, point.pointRight);\n\n this._drawGridLine(ctx, point, point.pointTop);\n };\n /**\n * Draw single datapoint for graph style 'line'.\n */\n\n\n Graph3d.prototype._redrawLineGraphPoint = function (ctx, point) {\n if (point.pointNext === undefined) {\n return;\n }\n\n ctx.lineWidth = this._getStrokeWidth(point);\n ctx.strokeStyle = this.dataColor.stroke;\n\n this._line(ctx, point.screen, point.pointNext.screen);\n };\n /**\n * Draw all datapoints for currently selected graph style.\n *\n */\n\n\n Graph3d.prototype._redrawDataGraph = function () {\n var ctx = this._getContext();\n\n var i;\n if (this.dataPoints === undefined || this.dataPoints.length <= 0) return; // TODO: throw exception?\n\n this._calcTranslations(this.dataPoints);\n\n for (i = 0; i < this.dataPoints.length; i++) {\n var point = this.dataPoints[i]; // Using call() ensures that the correct context is used\n\n this._pointDrawingMethod.call(this, ctx, point);\n }\n }; // -----------------------------------------------------------------------------\n // End methods for drawing points per graph style.\n // -----------------------------------------------------------------------------\n\n /**\n * Store startX, startY and startOffset for mouse operations\n *\n * @param {Event} event The event that occurred\n */\n\n\n Graph3d.prototype._storeMousePosition = function (event) {\n // get mouse position (different code for IE and all other browsers)\n this.startMouseX = getMouseX(event);\n this.startMouseY = getMouseY(event);\n this._startCameraOffset = this.camera.getOffset();\n };\n /**\n * Start a moving operation inside the provided parent element\n * @param {Event} event The event that occurred (required for\n * retrieving the mouse position)\n */\n\n\n Graph3d.prototype._onMouseDown = function (event) {\n event = event || window.event; // check if mouse is still down (may be up when focus is lost for example\n // in an iframe)\n\n if (this.leftButtonDown) {\n this._onMouseUp(event);\n } // only react on left mouse button down\n\n\n this.leftButtonDown = event.which ? event.which === 1 : event.button === 1;\n if (!this.leftButtonDown && !this.touchDown) return;\n\n this._storeMousePosition(event);\n\n this.startStart = new Date(this.start);\n this.startEnd = new Date(this.end);\n this.startArmRotation = this.camera.getArmRotation();\n this.frame.style.cursor = 'move'; // add event listeners to handle moving the contents\n // we store the function onmousemove and onmouseup in the graph, so we can\n // remove the eventlisteners lateron in the function mouseUp()\n\n var me = this;\n\n this.onmousemove = function (event) {\n me._onMouseMove(event);\n };\n\n this.onmouseup = function (event) {\n me._onMouseUp(event);\n };\n\n util.addEventListener(document, 'mousemove', me.onmousemove);\n util.addEventListener(document, 'mouseup', me.onmouseup);\n util.preventDefault(event);\n };\n /**\n * Perform moving operating.\n * This function activated from within the funcion Graph.mouseDown().\n * @param {Event} event Well, eehh, the event\n */\n\n\n Graph3d.prototype._onMouseMove = function (event) {\n this.moving = true;\n event = event || window.event; // calculate change in mouse position\n\n var diffX = parseFloat(getMouseX(event)) - this.startMouseX;\n var diffY = parseFloat(getMouseY(event)) - this.startMouseY; // move with ctrl or rotate by other\n\n if (event && event.ctrlKey === true) {\n // calculate change in mouse position\n var scaleX = this.frame.clientWidth * 0.5;\n var scaleY = this.frame.clientHeight * 0.5;\n var offXNew = (this._startCameraOffset.x || 0) - diffX / scaleX * this.camera.armLength * 0.8;\n var offYNew = (this._startCameraOffset.y || 0) + diffY / scaleY * this.camera.armLength * 0.8;\n this.camera.setOffset(offXNew, offYNew);\n\n this._storeMousePosition(event);\n } else {\n var horizontalNew = this.startArmRotation.horizontal + diffX / 200;\n var verticalNew = this.startArmRotation.vertical + diffY / 200;\n var snapAngle = 4; // degrees\n\n var snapValue = Math.sin(snapAngle / 360 * 2 * Math.PI); // snap horizontally to nice angles at 0pi, 0.5pi, 1pi, 1.5pi, etc...\n // the -0.001 is to take care that the vertical axis is always drawn at the left front corner\n\n if (Math.abs(Math.sin(horizontalNew)) < snapValue) {\n horizontalNew = Math.round(horizontalNew / Math.PI) * Math.PI - 0.001;\n }\n\n if (Math.abs(Math.cos(horizontalNew)) < snapValue) {\n horizontalNew = (Math.round(horizontalNew / Math.PI - 0.5) + 0.5) * Math.PI - 0.001;\n } // snap vertically to nice angles\n\n\n if (Math.abs(Math.sin(verticalNew)) < snapValue) {\n verticalNew = Math.round(verticalNew / Math.PI) * Math.PI;\n }\n\n if (Math.abs(Math.cos(verticalNew)) < snapValue) {\n verticalNew = (Math.round(verticalNew / Math.PI - 0.5) + 0.5) * Math.PI;\n }\n\n this.camera.setArmRotation(horizontalNew, verticalNew);\n }\n\n this.redraw(); // fire a cameraPositionChange event\n\n var parameters = this.getCameraPosition();\n this.emit('cameraPositionChange', parameters);\n util.preventDefault(event);\n };\n /**\n * Stop moving operating.\n * This function activated from within the funcion Graph.mouseDown().\n * @param {event} event The event\n */\n\n\n Graph3d.prototype._onMouseUp = function (event) {\n this.frame.style.cursor = 'auto';\n this.leftButtonDown = false; // remove event listeners here\n\n util.removeEventListener(document, 'mousemove', this.onmousemove);\n util.removeEventListener(document, 'mouseup', this.onmouseup);\n util.preventDefault(event);\n };\n /**\n * @param {event} event The event\n */\n\n\n Graph3d.prototype._onClick = function (event) {\n if (!this.onclick_callback) return;\n\n if (!this.moving) {\n var boundingRect = this.frame.getBoundingClientRect();\n var mouseX = getMouseX(event) - boundingRect.left;\n var mouseY = getMouseY(event) - boundingRect.top;\n\n var dataPoint = this._dataPointFromXY(mouseX, mouseY);\n\n if (dataPoint) this.onclick_callback(dataPoint.point.data);\n } else {\n // disable onclick callback, if it came immediately after rotate/pan\n this.moving = false;\n }\n\n util.preventDefault(event);\n };\n /**\n * After having moved the mouse, a tooltip should pop up when the mouse is resting on a data point\n * @param {Event} event A mouse move event\n */\n\n\n Graph3d.prototype._onTooltip = function (event) {\n var delay = 300; // ms\n\n var boundingRect = this.frame.getBoundingClientRect();\n var mouseX = getMouseX(event) - boundingRect.left;\n var mouseY = getMouseY(event) - boundingRect.top;\n\n if (!this.showTooltip) {\n return;\n }\n\n if (this.tooltipTimeout) {\n clearTimeout(this.tooltipTimeout);\n } // (delayed) display of a tooltip only if no mouse button is down\n\n\n if (this.leftButtonDown) {\n this._hideTooltip();\n\n return;\n }\n\n if (this.tooltip && this.tooltip.dataPoint) {\n // tooltip is currently visible\n var dataPoint = this._dataPointFromXY(mouseX, mouseY);\n\n if (dataPoint !== this.tooltip.dataPoint) {\n // datapoint changed\n if (dataPoint) {\n this._showTooltip(dataPoint);\n } else {\n this._hideTooltip();\n }\n }\n } else {\n // tooltip is currently not visible\n var me = this;\n this.tooltipTimeout = setTimeout(function () {\n me.tooltipTimeout = null; // show a tooltip if we have a data point\n\n var dataPoint = me._dataPointFromXY(mouseX, mouseY);\n\n if (dataPoint) {\n me._showTooltip(dataPoint);\n }\n }, delay);\n }\n };\n /**\n * Event handler for touchstart event on mobile devices\n */\n\n\n Graph3d.prototype._onTouchStart = function (event) {\n this.touchDown = true;\n var me = this;\n\n this.ontouchmove = function (event) {\n me._onTouchMove(event);\n };\n\n this.ontouchend = function (event) {\n me._onTouchEnd(event);\n };\n\n util.addEventListener(document, 'touchmove', me.ontouchmove);\n util.addEventListener(document, 'touchend', me.ontouchend);\n\n this._onMouseDown(event);\n };\n /**\n * Event handler for touchmove event on mobile devices\n */\n\n\n Graph3d.prototype._onTouchMove = function (event) {\n this._onMouseMove(event);\n };\n /**\n * Event handler for touchend event on mobile devices\n */\n\n\n Graph3d.prototype._onTouchEnd = function (event) {\n this.touchDown = false;\n util.removeEventListener(document, 'touchmove', this.ontouchmove);\n util.removeEventListener(document, 'touchend', this.ontouchend);\n\n this._onMouseUp(event);\n };\n /**\n * Event handler for mouse wheel event, used to zoom the graph\n * Code from http://adomas.org/javascript-mouse-wheel/\n * @param {event} event The event\n */\n\n\n Graph3d.prototype._onWheel = function (event) {\n if (!event)\n /* For IE. */\n event = window.event; // retrieve delta\n\n var delta = 0;\n\n if (event.wheelDelta) {\n /* IE/Opera. */\n delta = event.wheelDelta / 120;\n } else if (event.detail) {\n /* Mozilla case. */\n // In Mozilla, sign of delta is different than in IE.\n // Also, delta is multiple of 3.\n delta = -event.detail / 3;\n } // If delta is nonzero, handle it.\n // Basically, delta is now positive if wheel was scrolled up,\n // and negative, if wheel was scrolled down.\n\n\n if (delta) {\n var oldLength = this.camera.getArmLength();\n var newLength = oldLength * (1 - delta / 10);\n this.camera.setArmLength(newLength);\n this.redraw();\n\n this._hideTooltip();\n } // fire a cameraPositionChange event\n\n\n var parameters = this.getCameraPosition();\n this.emit('cameraPositionChange', parameters); // Prevent default actions caused by mouse wheel.\n // That might be ugly, but we handle scrolls somehow\n // anyway, so don't bother here..\n\n util.preventDefault(event);\n };\n /**\n * Test whether a point lies inside given 2D triangle\n *\n * @param {Point2d} point\n * @param {Point2d[]} triangle\n * @returns {boolean} true if given point lies inside or on the edge of the\n * triangle, false otherwise\n * @private\n */\n\n\n Graph3d.prototype._insideTriangle = function (point, triangle) {\n var a = triangle[0],\n b = triangle[1],\n c = triangle[2];\n\n function sign(x) {\n return x > 0 ? 1 : x < 0 ? -1 : 0;\n }\n\n var as = sign((b.x - a.x) * (point.y - a.y) - (b.y - a.y) * (point.x - a.x));\n var bs = sign((c.x - b.x) * (point.y - b.y) - (c.y - b.y) * (point.x - b.x));\n var cs = sign((a.x - c.x) * (point.y - c.y) - (a.y - c.y) * (point.x - c.x)); // each of the three signs must be either equal to each other or zero\n\n return (as == 0 || bs == 0 || as == bs) && (bs == 0 || cs == 0 || bs == cs) && (as == 0 || cs == 0 || as == cs);\n };\n /**\n * Find a data point close to given screen position (x, y)\n *\n * @param {Number} x\n * @param {Number} y\n * @returns {Object | null} The closest data point or null if not close to any\n * data point\n * @private\n */\n\n\n Graph3d.prototype._dataPointFromXY = function (x, y) {\n var i,\n distMax = 100,\n // px\n dataPoint = null,\n closestDataPoint = null,\n closestDist = null,\n center = new Point2d(x, y);\n\n if (this.style === Graph3d.STYLE.BAR || this.style === Graph3d.STYLE.BARCOLOR || this.style === Graph3d.STYLE.BARSIZE) {\n // the data points are ordered from far away to closest\n for (i = this.dataPoints.length - 1; i >= 0; i--) {\n dataPoint = this.dataPoints[i];\n var surfaces = dataPoint.surfaces;\n\n if (surfaces) {\n for (var s = surfaces.length - 1; s >= 0; s--) {\n // split each surface in two triangles, and see if the center point is inside one of these\n var surface = surfaces[s];\n var corners = surface.corners;\n var triangle1 = [corners[0].screen, corners[1].screen, corners[2].screen];\n var triangle2 = [corners[2].screen, corners[3].screen, corners[0].screen];\n\n if (this._insideTriangle(center, triangle1) || this._insideTriangle(center, triangle2)) {\n // return immediately at the first hit\n return dataPoint;\n }\n }\n }\n }\n } else {\n // find the closest data point, using distance to the center of the point on 2d screen\n for (i = 0; i < this.dataPoints.length; i++) {\n dataPoint = this.dataPoints[i];\n var point = dataPoint.screen;\n\n if (point) {\n var distX = Math.abs(x - point.x);\n var distY = Math.abs(y - point.y);\n var dist = Math.sqrt(distX * distX + distY * distY);\n\n if ((closestDist === null || dist < closestDist) && dist < distMax) {\n closestDist = dist;\n closestDataPoint = dataPoint;\n }\n }\n }\n }\n\n return closestDataPoint;\n };\n /**\n * Display a tooltip for given data point\n * @param {Object} dataPoint\n * @private\n */\n\n\n Graph3d.prototype._showTooltip = function (dataPoint) {\n var content, line, dot;\n\n if (!this.tooltip) {\n content = document.createElement('div');\n (0, _assign2['default'])(content.style, {}, this.tooltipStyle.content);\n content.style.position = 'absolute';\n line = document.createElement('div');\n (0, _assign2['default'])(line.style, {}, this.tooltipStyle.line);\n line.style.position = 'absolute';\n dot = document.createElement('div');\n (0, _assign2['default'])(dot.style, {}, this.tooltipStyle.dot);\n dot.style.position = 'absolute';\n this.tooltip = {\n dataPoint: null,\n dom: {\n content: content,\n line: line,\n dot: dot\n }\n };\n } else {\n content = this.tooltip.dom.content;\n line = this.tooltip.dom.line;\n dot = this.tooltip.dom.dot;\n }\n\n this._hideTooltip();\n\n this.tooltip.dataPoint = dataPoint;\n\n if (typeof this.showTooltip === 'function') {\n content.innerHTML = this.showTooltip(dataPoint.point);\n } else {\n content.innerHTML = '' + '' + '' + '' + '
' + this.xLabel + ':' + dataPoint.point.x + '
' + this.yLabel + ':' + dataPoint.point.y + '
' + this.zLabel + ':' + dataPoint.point.z + '
';\n }\n\n content.style.left = '0';\n content.style.top = '0';\n this.frame.appendChild(content);\n this.frame.appendChild(line);\n this.frame.appendChild(dot); // calculate sizes\n\n var contentWidth = content.offsetWidth;\n var contentHeight = content.offsetHeight;\n var lineHeight = line.offsetHeight;\n var dotWidth = dot.offsetWidth;\n var dotHeight = dot.offsetHeight;\n var left = dataPoint.screen.x - contentWidth / 2;\n left = Math.min(Math.max(left, 10), this.frame.clientWidth - 10 - contentWidth);\n line.style.left = dataPoint.screen.x + 'px';\n line.style.top = dataPoint.screen.y - lineHeight + 'px';\n content.style.left = left + 'px';\n content.style.top = dataPoint.screen.y - lineHeight - contentHeight + 'px';\n dot.style.left = dataPoint.screen.x - dotWidth / 2 + 'px';\n dot.style.top = dataPoint.screen.y - dotHeight / 2 + 'px';\n };\n /**\n * Hide the tooltip when displayed\n * @private\n */\n\n\n Graph3d.prototype._hideTooltip = function () {\n if (this.tooltip) {\n this.tooltip.dataPoint = null;\n\n for (var prop in this.tooltip.dom) {\n if (this.tooltip.dom.hasOwnProperty(prop)) {\n var elem = this.tooltip.dom[prop];\n\n if (elem && elem.parentNode) {\n elem.parentNode.removeChild(elem);\n }\n }\n }\n }\n };\n /**--------------------------------------------------------------------------**/\n\n /**\n * Get the horizontal mouse position from a mouse event\n *\n * @param {Event} event\n * @returns {Number} mouse x\n */\n\n\n function getMouseX(event) {\n if ('clientX' in event) return event.clientX;\n return event.targetTouches[0] && event.targetTouches[0].clientX || 0;\n }\n /**\n * Get the vertical mouse position from a mouse event\n *\n * @param {Event} event\n * @returns {Number} mouse y\n */\n\n\n function getMouseY(event) {\n if ('clientY' in event) return event.clientY;\n return event.targetTouches[0] && event.targetTouches[0].clientY || 0;\n } // -----------------------------------------------------------------------------\n // Public methods for specific settings\n // -----------------------------------------------------------------------------\n\n /**\n * Set the rotation and distance of the camera\n *\n * @param {Object} pos An object with the camera position\n * @param {?Number} pos.horizontal The horizontal rotation, between 0 and 2*PI.\n * Optional, can be left undefined.\n * @param {?Number} pos.vertical The vertical rotation, between 0 and 0.5*PI.\n * if vertical=0.5*PI, the graph is shown from\n * the top. Optional, can be left undefined.\n * @param {?Number} pos.distance The (normalized) distance of the camera to the\n * center of the graph, a value between 0.71 and\n * 5.0. Optional, can be left undefined.\n */\n\n\n Graph3d.prototype.setCameraPosition = function (pos) {\n Settings.setCameraPosition(pos, this);\n this.redraw();\n };\n /**\n * Set a new size for the graph\n *\n * @param {string} width Width in pixels or percentage (for example '800px'\n * or '50%')\n * @param {string} height Height in pixels or percentage (for example '400px'\n * or '30%')\n */\n\n\n Graph3d.prototype.setSize = function (width, height) {\n this._setSize(width, height);\n\n this.redraw();\n }; // -----------------------------------------------------------------------------\n // End public methods for specific settings\n // -----------------------------------------------------------------------------\n\n\n module.exports = Graph3d;\n /***/\n },\n /* 95 */\n\n /***/\n function (module, exports, __webpack_require__) {\n module.exports = {\n \"default\": __webpack_require__(96),\n __esModule: true\n };\n /***/\n },\n /* 96 */\n\n /***/\n function (module, exports, __webpack_require__) {\n __webpack_require__(97);\n\n module.exports = __webpack_require__(17).Object.assign;\n /***/\n },\n /* 97 */\n\n /***/\n function (module, exports, __webpack_require__) {\n // 19.1.3.1 Object.assign(target, source)\n var $export = __webpack_require__(15);\n\n $export($export.S + $export.F, 'Object', {\n assign: __webpack_require__(98)\n });\n /***/\n },\n /* 98 */\n\n /***/\n function (module, exports, __webpack_require__) {\n 'use strict'; // 19.1.2.1 Object.assign(target, source, ...)\n\n var getKeys = __webpack_require__(35),\n gOPS = __webpack_require__(73),\n pIE = __webpack_require__(74),\n toObject = __webpack_require__(49),\n IObject = __webpack_require__(10),\n $assign = Object.assign; // should work with symbols and should have deterministic property order (V8 bug)\n\n\n module.exports = !$assign || __webpack_require__(26)(function () {\n var A = {},\n B = {},\n S = Symbol(),\n K = 'abcdefghijklmnopqrst';\n A[S] = 7;\n K.split('').forEach(function (k) {\n B[k] = k;\n });\n return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K;\n }) ? function assign(target, source) {\n // eslint-disable-line no-unused-vars\n var T = toObject(target),\n aLen = arguments.length,\n index = 1,\n getSymbols = gOPS.f,\n isEnum = pIE.f;\n\n while (aLen > index) {\n var S = IObject(arguments[index++]),\n keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S),\n length = keys.length,\n j = 0,\n key;\n\n while (length > j) if (isEnum.call(S, key = keys[j++])) T[key] = S[key];\n }\n\n return T;\n } : $assign;\n /***/\n },\n /* 99 */\n\n /***/\n function (module, exports) {\n /**\n * Expose `Emitter`.\n */\n module.exports = Emitter;\n /**\n * Initialize a new `Emitter`.\n *\n * @api public\n */\n\n function Emitter(obj) {\n if (obj) return mixin(obj);\n }\n\n ;\n /**\n * Mixin the emitter properties.\n *\n * @param {Object} obj\n * @return {Object}\n * @api private\n */\n\n function mixin(obj) {\n for (var key in Emitter.prototype) {\n obj[key] = Emitter.prototype[key];\n }\n\n return obj;\n }\n /**\n * Listen on the given `event` with `fn`.\n *\n * @param {String} event\n * @param {Function} fn\n * @return {Emitter}\n * @api public\n */\n\n\n Emitter.prototype.on = Emitter.prototype.addEventListener = function (event, fn) {\n this._callbacks = this._callbacks || {};\n (this._callbacks[event] = this._callbacks[event] || []).push(fn);\n return this;\n };\n /**\n * Adds an `event` listener that will be invoked a single\n * time then automatically removed.\n *\n * @param {String} event\n * @param {Function} fn\n * @return {Emitter}\n * @api public\n */\n\n\n Emitter.prototype.once = function (event, fn) {\n var self = this;\n this._callbacks = this._callbacks || {};\n\n function on() {\n self.off(event, on);\n fn.apply(this, arguments);\n }\n\n on.fn = fn;\n this.on(event, on);\n return this;\n };\n /**\n * Remove the given callback for `event` or all\n * registered callbacks.\n *\n * @param {String} event\n * @param {Function} fn\n * @return {Emitter}\n * @api public\n */\n\n\n Emitter.prototype.off = Emitter.prototype.removeListener = Emitter.prototype.removeAllListeners = Emitter.prototype.removeEventListener = function (event, fn) {\n this._callbacks = this._callbacks || {}; // all\n\n if (0 == arguments.length) {\n this._callbacks = {};\n return this;\n } // specific event\n\n\n var callbacks = this._callbacks[event];\n if (!callbacks) return this; // remove all handlers\n\n if (1 == arguments.length) {\n delete this._callbacks[event];\n return this;\n } // remove specific handler\n\n\n var cb;\n\n for (var i = 0; i < callbacks.length; i++) {\n cb = callbacks[i];\n\n if (cb === fn || cb.fn === fn) {\n callbacks.splice(i, 1);\n break;\n }\n }\n\n return this;\n };\n /**\n * Emit `event` with the given args.\n *\n * @param {String} event\n * @param {Mixed} ...\n * @return {Emitter}\n */\n\n\n Emitter.prototype.emit = function (event) {\n this._callbacks = this._callbacks || {};\n var args = [].slice.call(arguments, 1),\n callbacks = this._callbacks[event];\n\n if (callbacks) {\n callbacks = callbacks.slice(0);\n\n for (var i = 0, len = callbacks.length; i < len; ++i) {\n callbacks[i].apply(this, args);\n }\n }\n\n return this;\n };\n /**\n * Return array of callbacks for `event`.\n *\n * @param {String} event\n * @return {Array}\n * @api public\n */\n\n\n Emitter.prototype.listeners = function (event) {\n this._callbacks = this._callbacks || {};\n return this._callbacks[event] || [];\n };\n /**\n * Check if this emitter has `event` handlers.\n *\n * @param {String} event\n * @return {Boolean}\n * @api public\n */\n\n\n Emitter.prototype.hasListeners = function (event) {\n return !!this.listeners(event).length;\n };\n /***/\n\n },\n /* 100 */\n\n /***/\n function (module, exports) {\n \"use strict\";\n /**\n * @prototype Point3d\n * @param {Number} [x]\n * @param {Number} [y]\n * @param {Number} [z]\n */\n\n function Point3d(x, y, z) {\n this.x = x !== undefined ? x : 0;\n this.y = y !== undefined ? y : 0;\n this.z = z !== undefined ? z : 0;\n }\n\n ;\n /**\n * Subtract the two provided points, returns a-b\n * @param {Point3d} a\n * @param {Point3d} b\n * @return {Point3d} a-b\n */\n\n Point3d.subtract = function (a, b) {\n var sub = new Point3d();\n sub.x = a.x - b.x;\n sub.y = a.y - b.y;\n sub.z = a.z - b.z;\n return sub;\n };\n /**\n * Add the two provided points, returns a+b\n * @param {Point3d} a\n * @param {Point3d} b\n * @return {Point3d} a+b\n */\n\n\n Point3d.add = function (a, b) {\n var sum = new Point3d();\n sum.x = a.x + b.x;\n sum.y = a.y + b.y;\n sum.z = a.z + b.z;\n return sum;\n };\n /**\n * Calculate the average of two 3d points\n * @param {Point3d} a\n * @param {Point3d} b\n * @return {Point3d} The average, (a+b)/2\n */\n\n\n Point3d.avg = function (a, b) {\n return new Point3d((a.x + b.x) / 2, (a.y + b.y) / 2, (a.z + b.z) / 2);\n };\n /**\n * Calculate the cross product of the two provided points, returns axb\n * Documentation: http://en.wikipedia.org/wiki/Cross_product\n * @param {Point3d} a\n * @param {Point3d} b\n * @return {Point3d} cross product axb\n */\n\n\n Point3d.crossProduct = function (a, b) {\n var crossproduct = new Point3d();\n crossproduct.x = a.y * b.z - a.z * b.y;\n crossproduct.y = a.z * b.x - a.x * b.z;\n crossproduct.z = a.x * b.y - a.y * b.x;\n return crossproduct;\n };\n /**\n * Rtrieve the length of the vector (or the distance from this point to the origin\n * @return {Number} length\n */\n\n\n Point3d.prototype.length = function () {\n return Math.sqrt(this.x * this.x + this.y * this.y + this.z * this.z);\n };\n\n module.exports = Point3d;\n /***/\n },\n /* 101 */\n\n /***/\n function (module, exports) {\n \"use strict\";\n /**\n * @prototype Point2d\n * @param {Number} [x]\n * @param {Number} [y]\n */\n\n function Point2d(x, y) {\n this.x = x !== undefined ? x : 0;\n this.y = y !== undefined ? y : 0;\n }\n\n module.exports = Point2d;\n /***/\n },\n /* 102 */\n\n /***/\n function (module, exports, __webpack_require__) {\n 'use strict';\n\n var _sign = __webpack_require__(103);\n\n var _sign2 = _interopRequireDefault(_sign);\n\n function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n 'default': obj\n };\n }\n\n var Point3d = __webpack_require__(100);\n /**\n * @class Camera\n * The camera is mounted on a (virtual) camera arm. The camera arm can rotate\n * The camera is always looking in the direction of the origin of the arm.\n * This way, the camera always rotates around one fixed point, the location\n * of the camera arm.\n *\n * Documentation:\n * http://en.wikipedia.org/wiki/3D_projection\n */\n\n\n function Camera() {\n this.armLocation = new Point3d();\n this.armRotation = {};\n this.armRotation.horizontal = 0;\n this.armRotation.vertical = 0;\n this.armLength = 1.7;\n this.cameraOffset = new Point3d();\n this.offsetMultiplier = 0.6;\n this.cameraLocation = new Point3d();\n this.cameraRotation = new Point3d(0.5 * Math.PI, 0, 0);\n this.calculateCameraOrientation();\n }\n /**\n * Set offset camera in camera coordinates\n * @param {Number} x offset by camera horisontal\n * @param {Number} y offset by camera vertical\n */\n\n\n Camera.prototype.setOffset = function (x, y) {\n var abs = Math.abs,\n sign = _sign2['default'],\n mul = this.offsetMultiplier,\n border = this.armLength * mul;\n\n if (abs(x) > border) {\n x = sign(x) * border;\n }\n\n if (abs(y) > border) {\n y = sign(y) * border;\n }\n\n this.cameraOffset.x = x;\n this.cameraOffset.y = y;\n this.calculateCameraOrientation();\n };\n /**\n * Get camera offset by horizontal and vertical\n * @return {Point3d} x - horizontal offset, y - vertical offset, z - not used\n */\n\n\n Camera.prototype.getOffset = function (x, y) {\n return this.cameraOffset;\n };\n /**\n * Set the location (origin) of the arm\n * @param {Number} x Normalized value of x\n * @param {Number} y Normalized value of y\n * @param {Number} z Normalized value of z\n */\n\n\n Camera.prototype.setArmLocation = function (x, y, z) {\n this.armLocation.x = x;\n this.armLocation.y = y;\n this.armLocation.z = z;\n this.calculateCameraOrientation();\n };\n /**\n * Set the rotation of the camera arm\n * @param {Number} horizontal The horizontal rotation, between 0 and 2*PI.\n * Optional, can be left undefined.\n * @param {Number} vertical The vertical rotation, between 0 and 0.5*PI\n * if vertical=0.5*PI, the graph is shown from the\n * top. Optional, can be left undefined.\n */\n\n\n Camera.prototype.setArmRotation = function (horizontal, vertical) {\n if (horizontal !== undefined) {\n this.armRotation.horizontal = horizontal;\n }\n\n if (vertical !== undefined) {\n this.armRotation.vertical = vertical;\n if (this.armRotation.vertical < 0) this.armRotation.vertical = 0;\n if (this.armRotation.vertical > 0.5 * Math.PI) this.armRotation.vertical = 0.5 * Math.PI;\n }\n\n if (horizontal !== undefined || vertical !== undefined) {\n this.calculateCameraOrientation();\n }\n };\n /**\n * Retrieve the current arm rotation\n * @return {object} An object with parameters horizontal and vertical\n */\n\n\n Camera.prototype.getArmRotation = function () {\n var rot = {};\n rot.horizontal = this.armRotation.horizontal;\n rot.vertical = this.armRotation.vertical;\n return rot;\n };\n /**\n * Set the (normalized) length of the camera arm.\n * @param {Number} length A length between 0.71 and 5.0\n */\n\n\n Camera.prototype.setArmLength = function (length) {\n if (length === undefined) return;\n this.armLength = length; // Radius must be larger than the corner of the graph,\n // which has a distance of sqrt(0.5^2+0.5^2) = 0.71 from the center of the\n // graph\n\n if (this.armLength < 0.71) this.armLength = 0.71;\n if (this.armLength > 5.0) this.armLength = 5.0;\n this.setOffset(this.cameraOffset.x, this.cameraOffset.y);\n this.calculateCameraOrientation();\n };\n /**\n * Retrieve the arm length\n * @return {Number} length\n */\n\n\n Camera.prototype.getArmLength = function () {\n return this.armLength;\n };\n /**\n * Retrieve the camera location\n * @return {Point3d} cameraLocation\n */\n\n\n Camera.prototype.getCameraLocation = function () {\n return this.cameraLocation;\n };\n /**\n * Retrieve the camera rotation\n * @return {Point3d} cameraRotation\n */\n\n\n Camera.prototype.getCameraRotation = function () {\n return this.cameraRotation;\n };\n /**\n * Calculate the location and rotation of the camera based on the\n * position and orientation of the camera arm\n */\n\n\n Camera.prototype.calculateCameraOrientation = function () {\n // calculate location of the camera\n this.cameraLocation.x = this.armLocation.x - this.armLength * Math.sin(this.armRotation.horizontal) * Math.cos(this.armRotation.vertical);\n this.cameraLocation.y = this.armLocation.y - this.armLength * Math.cos(this.armRotation.horizontal) * Math.cos(this.armRotation.vertical);\n this.cameraLocation.z = this.armLocation.z + this.armLength * Math.sin(this.armRotation.vertical); // calculate rotation of the camera\n\n this.cameraRotation.x = Math.PI / 2 - this.armRotation.vertical;\n this.cameraRotation.y = 0;\n this.cameraRotation.z = -this.armRotation.horizontal;\n var xa = this.cameraRotation.x;\n var ya = this.cameraRotation.y;\n var za = this.cameraRotation.z;\n var dx = this.cameraOffset.x;\n var dy = this.cameraOffset.y;\n var sin = Math.sin,\n cos = Math.cos;\n this.cameraLocation.x = this.cameraLocation.x + dx * cos(za) + dy * -sin(za) * cos(xa);\n this.cameraLocation.y = this.cameraLocation.y + dx * sin(za) + dy * cos(za) * cos(xa);\n this.cameraLocation.z = this.cameraLocation.z + dy * sin(xa);\n };\n\n module.exports = Camera;\n /***/\n },\n /* 103 */\n\n /***/\n function (module, exports, __webpack_require__) {\n module.exports = {\n \"default\": __webpack_require__(104),\n __esModule: true\n };\n /***/\n },\n /* 104 */\n\n /***/\n function (module, exports, __webpack_require__) {\n __webpack_require__(105);\n\n module.exports = __webpack_require__(17).Math.sign;\n /***/\n },\n /* 105 */\n\n /***/\n function (module, exports, __webpack_require__) {\n // 20.2.2.28 Math.sign(x)\n var $export = __webpack_require__(15);\n\n $export($export.S, 'Math', {\n sign: __webpack_require__(106)\n });\n /***/\n },\n /* 106 */\n\n /***/\n function (module, exports) {\n // 20.2.2.28 Math.sign(x)\n module.exports = Math.sign || function sign(x) {\n return (x = +x) == 0 || x != x ? x : x < 0 ? -1 : 1;\n };\n /***/\n\n },\n /* 107 */\n\n /***/\n function (module, exports, __webpack_require__) {\n 'use strict';\n\n var DataView = __webpack_require__(93);\n /**\n * @class Filter\n *\n * @param {DataSet} data The google data table\n * @param {Number} column The index of the column to be filtered\n * @param {Graph} graph The graph\n */\n\n\n function Filter(data, column, graph) {\n this.data = data;\n this.column = column;\n this.graph = graph; // the parent graph\n\n this.index = undefined;\n this.value = undefined; // read all distinct values and select the first one\n\n this.values = graph.getDistinctValues(data.get(), this.column); // sort both numeric and string values correctly\n\n this.values.sort(function (a, b) {\n return a > b ? 1 : a < b ? -1 : 0;\n });\n\n if (this.values.length > 0) {\n this.selectValue(0);\n } // create an array with the filtered datapoints. this will be loaded afterwards\n\n\n this.dataPoints = [];\n this.loaded = false;\n this.onLoadCallback = undefined;\n\n if (graph.animationPreload) {\n this.loaded = false;\n this.loadInBackground();\n } else {\n this.loaded = true;\n }\n }\n\n ;\n /**\n * Return the label\n * @return {string} label\n */\n\n Filter.prototype.isLoaded = function () {\n return this.loaded;\n };\n /**\n * Return the loaded progress\n * @return {Number} percentage between 0 and 100\n */\n\n\n Filter.prototype.getLoadedProgress = function () {\n var len = this.values.length;\n var i = 0;\n\n while (this.dataPoints[i]) {\n i++;\n }\n\n return Math.round(i / len * 100);\n };\n /**\n * Return the label\n * @return {string} label\n */\n\n\n Filter.prototype.getLabel = function () {\n return this.graph.filterLabel;\n };\n /**\n * Return the columnIndex of the filter\n * @return {Number} columnIndex\n */\n\n\n Filter.prototype.getColumn = function () {\n return this.column;\n };\n /**\n * Return the currently selected value. Returns undefined if there is no selection\n * @return {*} value\n */\n\n\n Filter.prototype.getSelectedValue = function () {\n if (this.index === undefined) return undefined;\n return this.values[this.index];\n };\n /**\n * Retrieve all values of the filter\n * @return {Array} values\n */\n\n\n Filter.prototype.getValues = function () {\n return this.values;\n };\n /**\n * Retrieve one value of the filter\n * @param {Number} index\n * @return {*} value\n */\n\n\n Filter.prototype.getValue = function (index) {\n if (index >= this.values.length) throw new Error('Index out of range');\n return this.values[index];\n };\n /**\n * Retrieve the (filtered) dataPoints for the currently selected filter index\n * @param {Number} [index] (optional)\n * @return {Array} dataPoints\n */\n\n\n Filter.prototype._getDataPoints = function (index) {\n if (index === undefined) index = this.index;\n if (index === undefined) return [];\n var dataPoints;\n\n if (this.dataPoints[index]) {\n dataPoints = this.dataPoints[index];\n } else {\n var f = {};\n f.column = this.column;\n f.value = this.values[index];\n var dataView = new DataView(this.data, {\n filter: function filter(item) {\n return item[f.column] == f.value;\n }\n }).get();\n dataPoints = this.graph._getDataPoints(dataView);\n this.dataPoints[index] = dataPoints;\n }\n\n return dataPoints;\n };\n /**\n * Set a callback function when the filter is fully loaded.\n */\n\n\n Filter.prototype.setOnLoadCallback = function (callback) {\n this.onLoadCallback = callback;\n };\n /**\n * Add a value to the list with available values for this filter\n * No double entries will be created.\n * @param {Number} index\n */\n\n\n Filter.prototype.selectValue = function (index) {\n if (index >= this.values.length) throw new Error('Index out of range');\n this.index = index;\n this.value = this.values[index];\n };\n /**\n * Load all filtered rows in the background one by one\n * Start this method without providing an index!\n */\n\n\n Filter.prototype.loadInBackground = function (index) {\n if (index === undefined) index = 0;\n var frame = this.graph.frame;\n\n if (index < this.values.length) {\n var dataPointsTemp = this._getDataPoints(index); //this.graph.redrawInfo(); // TODO: not neat\n // create a progress box\n\n\n if (frame.progress === undefined) {\n frame.progress = document.createElement('DIV');\n frame.progress.style.position = 'absolute';\n frame.progress.style.color = 'gray';\n frame.appendChild(frame.progress);\n }\n\n var progress = this.getLoadedProgress();\n frame.progress.innerHTML = 'Loading animation... ' + progress + '%'; // TODO: this is no nice solution...\n\n frame.progress.style.bottom = 60 + 'px'; // TODO: use height of slider\n\n frame.progress.style.left = 10 + 'px';\n var me = this;\n setTimeout(function () {\n me.loadInBackground(index + 1);\n }, 10);\n this.loaded = false;\n } else {\n this.loaded = true; // remove the progress box\n\n if (frame.progress !== undefined) {\n frame.removeChild(frame.progress);\n frame.progress = undefined;\n }\n\n if (this.onLoadCallback) this.onLoadCallback();\n }\n };\n\n module.exports = Filter;\n /***/\n },\n /* 108 */\n\n /***/\n function (module, exports, __webpack_require__) {\n 'use strict';\n\n var util = __webpack_require__(1);\n /**\n * @constructor Slider\n *\n * An html slider control with start/stop/prev/next buttons\n * @param {Element} container The element where the slider will be created\n * @param {Object} options Available options:\n * {boolean} visible If true (default) the\n * slider is visible.\n */\n\n\n function Slider(container, options) {\n if (container === undefined) {\n throw new Error('No container element defined');\n }\n\n this.container = container;\n this.visible = options && options.visible != undefined ? options.visible : true;\n\n if (this.visible) {\n this.frame = document.createElement('DIV'); //this.frame.style.backgroundColor = '#E5E5E5';\n\n this.frame.style.width = '100%';\n this.frame.style.position = 'relative';\n this.container.appendChild(this.frame);\n this.frame.prev = document.createElement('INPUT');\n this.frame.prev.type = 'BUTTON';\n this.frame.prev.value = 'Prev';\n this.frame.appendChild(this.frame.prev);\n this.frame.play = document.createElement('INPUT');\n this.frame.play.type = 'BUTTON';\n this.frame.play.value = 'Play';\n this.frame.appendChild(this.frame.play);\n this.frame.next = document.createElement('INPUT');\n this.frame.next.type = 'BUTTON';\n this.frame.next.value = 'Next';\n this.frame.appendChild(this.frame.next);\n this.frame.bar = document.createElement('INPUT');\n this.frame.bar.type = 'BUTTON';\n this.frame.bar.style.position = 'absolute';\n this.frame.bar.style.border = '1px solid red';\n this.frame.bar.style.width = '100px';\n this.frame.bar.style.height = '6px';\n this.frame.bar.style.borderRadius = '2px';\n this.frame.bar.style.MozBorderRadius = '2px';\n this.frame.bar.style.border = '1px solid #7F7F7F';\n this.frame.bar.style.backgroundColor = '#E5E5E5';\n this.frame.appendChild(this.frame.bar);\n this.frame.slide = document.createElement('INPUT');\n this.frame.slide.type = 'BUTTON';\n this.frame.slide.style.margin = '0px';\n this.frame.slide.value = ' ';\n this.frame.slide.style.position = 'relative';\n this.frame.slide.style.left = '-100px';\n this.frame.appendChild(this.frame.slide); // create events\n\n var me = this;\n\n this.frame.slide.onmousedown = function (event) {\n me._onMouseDown(event);\n };\n\n this.frame.prev.onclick = function (event) {\n me.prev(event);\n };\n\n this.frame.play.onclick = function (event) {\n me.togglePlay(event);\n };\n\n this.frame.next.onclick = function (event) {\n me.next(event);\n };\n }\n\n this.onChangeCallback = undefined;\n this.values = [];\n this.index = undefined;\n this.playTimeout = undefined;\n this.playInterval = 1000; // milliseconds\n\n this.playLoop = true;\n }\n /**\n * Select the previous index\n */\n\n\n Slider.prototype.prev = function () {\n var index = this.getIndex();\n\n if (index > 0) {\n index--;\n this.setIndex(index);\n }\n };\n /**\n * Select the next index\n */\n\n\n Slider.prototype.next = function () {\n var index = this.getIndex();\n\n if (index < this.values.length - 1) {\n index++;\n this.setIndex(index);\n }\n };\n /**\n * Select the next index\n */\n\n\n Slider.prototype.playNext = function () {\n var start = new Date();\n var index = this.getIndex();\n\n if (index < this.values.length - 1) {\n index++;\n this.setIndex(index);\n } else if (this.playLoop) {\n // jump to the start\n index = 0;\n this.setIndex(index);\n }\n\n var end = new Date();\n var diff = end - start; // calculate how much time it to to set the index and to execute the callback\n // function.\n\n var interval = Math.max(this.playInterval - diff, 0); // document.title = diff // TODO: cleanup\n\n var me = this;\n this.playTimeout = setTimeout(function () {\n me.playNext();\n }, interval);\n };\n /**\n * Toggle start or stop playing\n */\n\n\n Slider.prototype.togglePlay = function () {\n if (this.playTimeout === undefined) {\n this.play();\n } else {\n this.stop();\n }\n };\n /**\n * Start playing\n */\n\n\n Slider.prototype.play = function () {\n // Test whether already playing\n if (this.playTimeout) return;\n this.playNext();\n\n if (this.frame) {\n this.frame.play.value = 'Stop';\n }\n };\n /**\n * Stop playing\n */\n\n\n Slider.prototype.stop = function () {\n clearInterval(this.playTimeout);\n this.playTimeout = undefined;\n\n if (this.frame) {\n this.frame.play.value = 'Play';\n }\n };\n /**\n * Set a callback function which will be triggered when the value of the\n * slider bar has changed.\n */\n\n\n Slider.prototype.setOnChangeCallback = function (callback) {\n this.onChangeCallback = callback;\n };\n /**\n * Set the interval for playing the list\n * @param {Number} interval The interval in milliseconds\n */\n\n\n Slider.prototype.setPlayInterval = function (interval) {\n this.playInterval = interval;\n };\n /**\n * Retrieve the current play interval\n * @return {Number} interval The interval in milliseconds\n */\n\n\n Slider.prototype.getPlayInterval = function (interval) {\n return this.playInterval;\n };\n /**\n * Set looping on or off\n * @pararm {boolean} doLoop If true, the slider will jump to the start when\n * the end is passed, and will jump to the end\n * when the start is passed.\n */\n\n\n Slider.prototype.setPlayLoop = function (doLoop) {\n this.playLoop = doLoop;\n };\n /**\n * Execute the onchange callback function\n */\n\n\n Slider.prototype.onChange = function () {\n if (this.onChangeCallback !== undefined) {\n this.onChangeCallback();\n }\n };\n /**\n * redraw the slider on the correct place\n */\n\n\n Slider.prototype.redraw = function () {\n if (this.frame) {\n // resize the bar\n this.frame.bar.style.top = this.frame.clientHeight / 2 - this.frame.bar.offsetHeight / 2 + 'px';\n this.frame.bar.style.width = this.frame.clientWidth - this.frame.prev.clientWidth - this.frame.play.clientWidth - this.frame.next.clientWidth - 30 + 'px'; // position the slider button\n\n var left = this.indexToLeft(this.index);\n this.frame.slide.style.left = left + 'px';\n }\n };\n /**\n * Set the list with values for the slider\n * @param {Array} values A javascript array with values (any type)\n */\n\n\n Slider.prototype.setValues = function (values) {\n this.values = values;\n if (this.values.length > 0) this.setIndex(0);else this.index = undefined;\n };\n /**\n * Select a value by its index\n * @param {Number} index\n */\n\n\n Slider.prototype.setIndex = function (index) {\n if (index < this.values.length) {\n this.index = index;\n this.redraw();\n this.onChange();\n } else {\n throw new Error('Index out of range');\n }\n };\n /**\n * retrieve the index of the currently selected vaue\n * @return {Number} index\n */\n\n\n Slider.prototype.getIndex = function () {\n return this.index;\n };\n /**\n * retrieve the currently selected value\n * @return {*} value\n */\n\n\n Slider.prototype.get = function () {\n return this.values[this.index];\n };\n\n Slider.prototype._onMouseDown = function (event) {\n // only react on left mouse button down\n var leftButtonDown = event.which ? event.which === 1 : event.button === 1;\n if (!leftButtonDown) return;\n this.startClientX = event.clientX;\n this.startSlideX = parseFloat(this.frame.slide.style.left);\n this.frame.style.cursor = 'move'; // add event listeners to handle moving the contents\n // we store the function onmousemove and onmouseup in the graph, so we can\n // remove the eventlisteners lateron in the function mouseUp()\n\n var me = this;\n\n this.onmousemove = function (event) {\n me._onMouseMove(event);\n };\n\n this.onmouseup = function (event) {\n me._onMouseUp(event);\n };\n\n util.addEventListener(document, 'mousemove', this.onmousemove);\n util.addEventListener(document, 'mouseup', this.onmouseup);\n util.preventDefault(event);\n };\n\n Slider.prototype.leftToIndex = function (left) {\n var width = parseFloat(this.frame.bar.style.width) - this.frame.slide.clientWidth - 10;\n var x = left - 3;\n var index = Math.round(x / width * (this.values.length - 1));\n if (index < 0) index = 0;\n if (index > this.values.length - 1) index = this.values.length - 1;\n return index;\n };\n\n Slider.prototype.indexToLeft = function (index) {\n var width = parseFloat(this.frame.bar.style.width) - this.frame.slide.clientWidth - 10;\n var x = index / (this.values.length - 1) * width;\n var left = x + 3;\n return left;\n };\n\n Slider.prototype._onMouseMove = function (event) {\n var diff = event.clientX - this.startClientX;\n var x = this.startSlideX + diff;\n var index = this.leftToIndex(x);\n this.setIndex(index);\n util.preventDefault();\n };\n\n Slider.prototype._onMouseUp = function (event) {\n this.frame.style.cursor = 'auto'; // remove event listeners\n\n util.removeEventListener(document, 'mousemove', this.onmousemove);\n util.removeEventListener(document, 'mouseup', this.onmouseup);\n util.preventDefault();\n };\n\n module.exports = Slider;\n /***/\n },\n /* 109 */\n\n /***/\n function (module, exports) {\n 'use strict';\n /**\n * @prototype StepNumber\n * The class StepNumber is an iterator for Numbers. You provide a start and end\n * value, and a best step size. StepNumber itself rounds to fixed values and\n * a finds the step that best fits the provided step.\n *\n * If prettyStep is true, the step size is chosen as close as possible to the\n * provided step, but being a round value like 1, 2, 5, 10, 20, 50, ....\n *\n * Example usage:\n * var step = new StepNumber(0, 10, 2.5, true);\n * step.start();\n * while (!step.end()) {\n * alert(step.getCurrent());\n * step.next();\n * }\n *\n * Version: 1.0\n *\n * @param {Number} start The start value\n * @param {Number} end The end value\n * @param {Number} step Optional. Step size. Must be a positive value.\n * @param {boolean} prettyStep Optional. If true, the step size is rounded\n * To a pretty step size (like 1, 2, 5, 10, 20, 50, ...)\n */\n\n function StepNumber(start, end, step, prettyStep) {\n // set default values\n this._start = 0;\n this._end = 0;\n this._step = 1;\n this.prettyStep = true;\n this.precision = 5;\n this._current = 0;\n this.setRange(start, end, step, prettyStep);\n }\n\n ;\n /**\n * Check for input values, to prevent disasters from happening\n *\n * Source: http://stackoverflow.com/a/1830844\n */\n\n StepNumber.prototype.isNumeric = function (n) {\n return !isNaN(parseFloat(n)) && isFinite(n);\n };\n /**\n * Set a new range: start, end and step.\n *\n * @param {Number} start The start value\n * @param {Number} end The end value\n * @param {Number} step Optional. Step size. Must be a positive value.\n * @param {boolean} prettyStep Optional. If true, the step size is rounded\n * To a pretty step size (like 1, 2, 5, 10, 20, 50, ...)\n */\n\n\n StepNumber.prototype.setRange = function (start, end, step, prettyStep) {\n if (!this.isNumeric(start)) {\n throw new Error('Parameter \\'start\\' is not numeric; value: ' + start);\n }\n\n if (!this.isNumeric(end)) {\n throw new Error('Parameter \\'end\\' is not numeric; value: ' + start);\n }\n\n if (!this.isNumeric(step)) {\n throw new Error('Parameter \\'step\\' is not numeric; value: ' + start);\n }\n\n this._start = start ? start : 0;\n this._end = end ? end : 0;\n this.setStep(step, prettyStep);\n };\n /**\n * Set a new step size\n * @param {Number} step New step size. Must be a positive value\n * @param {boolean} prettyStep Optional. If true, the provided step is rounded\n * to a pretty step size (like 1, 2, 5, 10, 20, 50, ...)\n */\n\n\n StepNumber.prototype.setStep = function (step, prettyStep) {\n if (step === undefined || step <= 0) return;\n if (prettyStep !== undefined) this.prettyStep = prettyStep;\n if (this.prettyStep === true) this._step = StepNumber.calculatePrettyStep(step);else this._step = step;\n };\n /**\n * Calculate a nice step size, closest to the desired step size.\n * Returns a value in one of the ranges 1*10^n, 2*10^n, or 5*10^n, where n is an\n * integer Number. For example 1, 2, 5, 10, 20, 50, etc...\n * @param {Number} step Desired step size\n * @return {Number} Nice step size\n */\n\n\n StepNumber.calculatePrettyStep = function (step) {\n var log10 = function log10(x) {\n return Math.log(x) / Math.LN10;\n }; // try three steps (multiple of 1, 2, or 5\n\n\n var step1 = Math.pow(10, Math.round(log10(step))),\n step2 = 2 * Math.pow(10, Math.round(log10(step / 2))),\n step5 = 5 * Math.pow(10, Math.round(log10(step / 5))); // choose the best step (closest to minimum step)\n\n var prettyStep = step1;\n if (Math.abs(step2 - step) <= Math.abs(prettyStep - step)) prettyStep = step2;\n if (Math.abs(step5 - step) <= Math.abs(prettyStep - step)) prettyStep = step5; // for safety\n\n if (prettyStep <= 0) {\n prettyStep = 1;\n }\n\n return prettyStep;\n };\n /**\n * returns the current value of the step\n * @return {Number} current value\n */\n\n\n StepNumber.prototype.getCurrent = function () {\n return parseFloat(this._current.toPrecision(this.precision));\n };\n /**\n * returns the current step size\n * @return {Number} current step size\n */\n\n\n StepNumber.prototype.getStep = function () {\n return this._step;\n };\n /**\n * Set the current to its starting value.\n *\n * By default, this will be the largest value smaller than start, which\n * is a multiple of the step size.\n *\n * Parameters checkFirst is optional, default false.\n * If set to true, move the current value one step if smaller than start.\n */\n\n\n StepNumber.prototype.start = function (checkFirst) {\n if (checkFirst === undefined) {\n checkFirst = false;\n }\n\n this._current = this._start - this._start % this._step;\n\n if (checkFirst) {\n if (this.getCurrent() < this._start) {\n this.next();\n }\n }\n };\n /**\n * Do a step, add the step size to the current value\n */\n\n\n StepNumber.prototype.next = function () {\n this._current += this._step;\n };\n /**\n * Returns true whether the end is reached\n * @return {boolean} True if the current value has passed the end value.\n */\n\n\n StepNumber.prototype.end = function () {\n return this._current > this._end;\n };\n\n module.exports = StepNumber;\n /***/\n },\n /* 110 */\n\n /***/\n function (module, exports) {\n 'use strict';\n /**\n * @prototype Range\n *\n * Helper class to make working with related min and max values easier.\n *\n * The range is inclusive; a given value is considered part of the range if:\n *\n * this.min <= value <= this.max\n */\n\n function Range() {\n this.min = undefined;\n this.max = undefined;\n }\n /**\n * Adjust the range so that the passed value fits in it.\n *\n * If the value is outside of the current extremes, adjust\n * the min or max so that the value is within the range.\n *\n * @param {number} value Numeric value to fit in range\n */\n\n\n Range.prototype.adjust = function (value) {\n if (value === undefined) return;\n\n if (this.min === undefined || this.min > value) {\n this.min = value;\n }\n\n if (this.max === undefined || this.max < value) {\n this.max = value;\n }\n };\n /**\n * Adjust the current range so that the passed range fits in it.\n *\n * @param {Range} range Range instance to fit in current instance\n */\n\n\n Range.prototype.combine = function (range) {\n this.add(range.min);\n this.add(range.max);\n };\n /**\n * Expand the range by the given value\n *\n * min will be lowered by given value;\n * max will be raised by given value\n *\n * Shrinking by passing a negative value is allowed.\n *\n * @param {number} val Amount by which to expand or shrink current range with\n */\n\n\n Range.prototype.expand = function (val) {\n if (val === undefined) {\n return;\n }\n\n var newMin = this.min - val;\n var newMax = this.max + val; // Note that following allows newMin === newMax.\n // This should be OK, since method expand() allows this also.\n\n if (newMin > newMax) {\n throw new Error('Passed expansion value makes range invalid');\n }\n\n this.min = newMin;\n this.max = newMax;\n };\n /**\n * Determine the full range width of current instance.\n *\n * @returns {num} The calculated width of this range\n */\n\n\n Range.prototype.range = function () {\n return this.max - this.min;\n };\n /**\n * Determine the central point of current instance.\n *\n * @returns {number} the value in the middle of min and max\n */\n\n\n Range.prototype.center = function () {\n return (this.min + this.max) / 2;\n };\n\n module.exports = Range;\n /***/\n },\n /* 111 */\n\n /***/\n function (module, exports, __webpack_require__) {\n 'use strict';\n\n var _typeof2 = __webpack_require__(62);\n\n var _typeof3 = _interopRequireDefault(_typeof2);\n\n function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n 'default': obj\n };\n } ////////////////////////////////////////////////////////////////////////////////\n // This modules handles the options for Graph3d.\n //\n ////////////////////////////////////////////////////////////////////////////////\n\n\n var util = __webpack_require__(1);\n\n var Camera = __webpack_require__(102);\n\n var Point3d = __webpack_require__(100); // enumerate the available styles\n\n\n var STYLE = {\n BAR: 0,\n BARCOLOR: 1,\n BARSIZE: 2,\n DOT: 3,\n DOTLINE: 4,\n DOTCOLOR: 5,\n DOTSIZE: 6,\n GRID: 7,\n LINE: 8,\n SURFACE: 9\n }; // The string representations of the styles\n\n var STYLENAME = {\n 'dot': STYLE.DOT,\n 'dot-line': STYLE.DOTLINE,\n 'dot-color': STYLE.DOTCOLOR,\n 'dot-size': STYLE.DOTSIZE,\n 'line': STYLE.LINE,\n 'grid': STYLE.GRID,\n 'surface': STYLE.SURFACE,\n 'bar': STYLE.BAR,\n 'bar-color': STYLE.BARCOLOR,\n 'bar-size': STYLE.BARSIZE\n };\n /**\n * Field names in the options hash which are of relevance to the user.\n *\n * Specifically, these are the fields which require no special handling,\n * and can be directly copied over.\n */\n\n var OPTIONKEYS = ['width', 'height', 'filterLabel', 'legendLabel', 'xLabel', 'yLabel', 'zLabel', 'xValueLabel', 'yValueLabel', 'zValueLabel', 'showXAxis', 'showYAxis', 'showZAxis', 'showGrid', 'showPerspective', 'showShadow', 'keepAspectRatio', 'verticalRatio', 'dotSizeRatio', 'showAnimationControls', 'animationInterval', 'animationPreload', 'animationAutoStart', 'axisColor', 'gridColor', 'xCenter', 'yCenter'];\n /**\n * Field names in the options hash which are of relevance to the user.\n *\n * Same as OPTIONKEYS, but internally these fields are stored with \n * prefix 'default' in the name.\n */\n\n var PREFIXEDOPTIONKEYS = ['xBarWidth', 'yBarWidth', 'valueMin', 'valueMax', 'xMin', 'xMax', 'xStep', 'yMin', 'yMax', 'yStep', 'zMin', 'zMax', 'zStep']; // Placeholder for DEFAULTS reference\n\n var DEFAULTS = undefined;\n /**\n * Check if given hash is empty.\n *\n * Source: http://stackoverflow.com/a/679937\n */\n\n function isEmpty(obj) {\n for (var prop in obj) {\n if (obj.hasOwnProperty(prop)) return false;\n }\n\n return true;\n }\n /**\n * Make first letter of parameter upper case.\n *\n * Source: http://stackoverflow.com/a/1026087\n */\n\n\n function capitalize(str) {\n if (str === undefined || str === \"\" || typeof str != \"string\") {\n return str;\n }\n\n return str.charAt(0).toUpperCase() + str.slice(1);\n }\n /**\n * Add a prefix to a field name, taking style guide into account\n */\n\n\n function prefixFieldName(prefix, fieldName) {\n if (prefix === undefined || prefix === \"\") {\n return fieldName;\n }\n\n return prefix + capitalize(fieldName);\n }\n /**\n * Forcibly copy fields from src to dst in a controlled manner.\n *\n * A given field in dst will always be overwitten. If this field\n * is undefined or not present in src, the field in dst will \n * be explicitly set to undefined.\n * \n * The intention here is to be able to reset all option fields.\n * \n * Only the fields mentioned in array 'fields' will be handled.\n *\n * @param fields array with names of fields to copy\n * @param prefix optional; prefix to use for the target fields.\n */\n\n\n function forceCopy(src, dst, fields, prefix) {\n var srcKey;\n var dstKey;\n\n for (var i in fields) {\n srcKey = fields[i];\n dstKey = prefixFieldName(prefix, srcKey);\n dst[dstKey] = src[srcKey];\n }\n }\n /**\n * Copy fields from src to dst in a safe and controlled manner.\n *\n * Only the fields mentioned in array 'fields' will be copied over,\n * and only if these are actually defined.\n *\n * @param fields array with names of fields to copy\n * @param prefix optional; prefix to use for the target fields.\n */\n\n\n function safeCopy(src, dst, fields, prefix) {\n var srcKey;\n var dstKey;\n\n for (var i in fields) {\n srcKey = fields[i];\n if (src[srcKey] === undefined) continue;\n dstKey = prefixFieldName(prefix, srcKey);\n dst[dstKey] = src[srcKey];\n }\n }\n /**\n * Initialize dst with the values in src.\n *\n * src is the hash with the default values. \n * A reference DEFAULTS to this hash is stored locally for \n * further handling.\n *\n * For now, dst is assumed to be a Graph3d instance.\n */\n\n\n function setDefaults(src, dst) {\n if (src === undefined || isEmpty(src)) {\n throw new Error('No DEFAULTS passed');\n }\n\n if (dst === undefined) {\n throw new Error('No dst passed');\n } // Remember defaults for future reference\n\n\n DEFAULTS = src; // Handle the defaults which can be simply copied over\n\n forceCopy(src, dst, OPTIONKEYS);\n forceCopy(src, dst, PREFIXEDOPTIONKEYS, 'default'); // Handle the more complex ('special') fields\n\n setSpecialSettings(src, dst); // Following are internal fields, not part of the user settings\n\n dst.margin = 10; // px\n\n dst.showGrayBottom = false; // TODO: this does not work correctly\n\n dst.showTooltip = false;\n dst.onclick_callback = null;\n dst.eye = new Point3d(0, 0, -1); // TODO: set eye.z about 3/4 of the width of the window?\n }\n\n function setOptions(options, dst) {\n if (options === undefined) {\n return;\n }\n\n if (dst === undefined) {\n throw new Error('No dst passed');\n }\n\n if (DEFAULTS === undefined || isEmpty(DEFAULTS)) {\n throw new Error('DEFAULTS not set for module Settings');\n } // Handle the parameters which can be simply copied over\n\n\n safeCopy(options, dst, OPTIONKEYS);\n safeCopy(options, dst, PREFIXEDOPTIONKEYS, 'default'); // Handle the more complex ('special') fields\n\n setSpecialSettings(options, dst);\n }\n /**\n * Special handling for certain parameters\n *\n * 'Special' here means: setting requires more than a simple copy\n */\n\n\n function setSpecialSettings(src, dst) {\n if (src.backgroundColor !== undefined) {\n setBackgroundColor(src.backgroundColor, dst);\n }\n\n setDataColor(src.dataColor, dst);\n setStyle(src.style, dst);\n setShowLegend(src.showLegend, dst);\n setCameraPosition(src.cameraPosition, dst); // As special fields go, this is an easy one; just a translation of the name.\n // Can't use this.tooltip directly, because that field exists internally\n\n if (src.tooltip !== undefined) {\n dst.showTooltip = src.tooltip;\n }\n\n if (src.onclick != undefined) {\n dst.onclick_callback = src.onclick;\n }\n\n if (src.tooltipStyle !== undefined) {\n util.selectiveDeepExtend(['tooltipStyle'], dst, src);\n }\n }\n /**\n * Set the value of setting 'showLegend'\n *\n * This depends on the value of the style fields, so it must be called\n * after the style field has been initialized.\n */\n\n\n function setShowLegend(showLegend, dst) {\n if (showLegend === undefined) {\n // If the default was auto, make a choice for this field\n var isAutoByDefault = DEFAULTS.showLegend === undefined;\n\n if (isAutoByDefault) {\n // these styles default to having legends\n var isLegendGraphStyle = dst.style === STYLE.DOTCOLOR || dst.style === STYLE.DOTSIZE;\n dst.showLegend = isLegendGraphStyle;\n } else {// Leave current value as is\n }\n } else {\n dst.showLegend = showLegend;\n }\n }\n /**\n * Retrieve the style index from given styleName\n * @param {string} styleName Style name such as 'dot', 'grid', 'dot-line'\n * @return {Number} styleNumber Enumeration value representing the style, or -1\n * when not found\n */\n\n\n function getStyleNumberByName(styleName) {\n var number = STYLENAME[styleName];\n\n if (number === undefined) {\n return -1;\n }\n\n return number;\n }\n /**\n * Check if given number is a valid style number.\n *\n * @return true if valid, false otherwise\n */\n\n\n function checkStyleNumber(style) {\n var valid = false;\n\n for (var n in STYLE) {\n if (STYLE[n] === style) {\n valid = true;\n break;\n }\n }\n\n return valid;\n }\n\n function setStyle(style, dst) {\n if (style === undefined) {\n return; // Nothing to do\n }\n\n var styleNumber;\n\n if (typeof style === 'string') {\n styleNumber = getStyleNumberByName(style);\n\n if (styleNumber === -1) {\n throw new Error('Style \\'' + style + '\\' is invalid');\n }\n } else {\n // Do a pedantic check on style number value\n if (!checkStyleNumber(style)) {\n throw new Error('Style \\'' + style + '\\' is invalid');\n }\n\n styleNumber = style;\n }\n\n dst.style = styleNumber;\n }\n /**\n * Set the background styling for the graph\n * @param {string | {fill: string, stroke: string, strokeWidth: string}} backgroundColor\n */\n\n\n function setBackgroundColor(backgroundColor, dst) {\n var fill = 'white';\n var stroke = 'gray';\n var strokeWidth = 1;\n\n if (typeof backgroundColor === 'string') {\n fill = backgroundColor;\n stroke = 'none';\n strokeWidth = 0;\n } else if ((typeof backgroundColor === 'undefined' ? 'undefined' : (0, _typeof3['default'])(backgroundColor)) === 'object') {\n if (backgroundColor.fill !== undefined) fill = backgroundColor.fill;\n if (backgroundColor.stroke !== undefined) stroke = backgroundColor.stroke;\n if (backgroundColor.strokeWidth !== undefined) strokeWidth = backgroundColor.strokeWidth;\n } else {\n throw new Error('Unsupported type of backgroundColor');\n }\n\n dst.frame.style.backgroundColor = fill;\n dst.frame.style.borderColor = stroke;\n dst.frame.style.borderWidth = strokeWidth + 'px';\n dst.frame.style.borderStyle = 'solid';\n }\n\n function setDataColor(dataColor, dst) {\n if (dataColor === undefined) {\n return; // Nothing to do\n }\n\n if (dst.dataColor === undefined) {\n dst.dataColor = {};\n }\n\n if (typeof dataColor === 'string') {\n dst.dataColor.fill = dataColor;\n dst.dataColor.stroke = dataColor;\n } else {\n if (dataColor.fill) {\n dst.dataColor.fill = dataColor.fill;\n }\n\n if (dataColor.stroke) {\n dst.dataColor.stroke = dataColor.stroke;\n }\n\n if (dataColor.strokeWidth !== undefined) {\n dst.dataColor.strokeWidth = dataColor.strokeWidth;\n }\n }\n }\n\n function setCameraPosition(cameraPosition, dst) {\n var camPos = cameraPosition;\n\n if (camPos === undefined) {\n return;\n }\n\n if (dst.camera === undefined) {\n dst.camera = new Camera();\n }\n\n dst.camera.setArmRotation(camPos.horizontal, camPos.vertical);\n dst.camera.setArmLength(camPos.distance);\n }\n\n module.exports.STYLE = STYLE;\n module.exports.setDefaults = setDefaults;\n module.exports.setOptions = setOptions;\n module.exports.setCameraPosition = setCameraPosition;\n /***/\n },\n /* 112 */\n\n /***/\n function (module, exports, __webpack_require__) {\n 'use strict'; // Only load hammer.js when in a browser environment\n // (loading hammer.js in a node.js environment gives errors)\n\n if (typeof window !== 'undefined') {\n var propagating = __webpack_require__(113);\n\n var Hammer = window['Hammer'] || __webpack_require__(114);\n\n module.exports = propagating(Hammer, {\n preventDefault: 'mouse'\n });\n } else {\n module.exports = function () {\n throw Error('hammer.js is only available in a browser, not in node.js.');\n };\n }\n /***/\n\n },\n /* 113 */\n\n /***/\n function (module, exports, __webpack_require__) {\n var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;\n\n 'use strict';\n\n (function (factory) {\n if (true) {\n // AMD. Register as an anonymous module.\n !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_FACTORY__ = factory, __WEBPACK_AMD_DEFINE_RESULT__ = typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? __WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__) : __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n } else if (typeof exports === 'object') {\n // Node. Does not work with strict CommonJS, but\n // only CommonJS-like environments that support module.exports,\n // like Node.\n module.exports = factory();\n } else {\n // Browser globals (root is window)\n window.propagating = factory();\n }\n })(function () {\n var _firstTarget = null; // singleton, will contain the target element where the touch event started\n\n /**\n * Extend an Hammer.js instance with event propagation.\n *\n * Features:\n * - Events emitted by hammer will propagate in order from child to parent\n * elements.\n * - Events are extended with a function `event.stopPropagation()` to stop\n * propagation to parent elements.\n * - An option `preventDefault` to stop all default browser behavior.\n *\n * Usage:\n * var hammer = propagatingHammer(new Hammer(element));\n * var hammer = propagatingHammer(new Hammer(element), {preventDefault: true});\n *\n * @param {Hammer.Manager} hammer An hammer instance.\n * @param {Object} [options] Available options:\n * - `preventDefault: true | false | 'mouse' | 'touch' | 'pen'`.\n * Enforce preventing the default browser behavior.\n * Cannot be set to `false`.\n * @return {Hammer.Manager} Returns the same hammer instance with extended\n * functionality\n */\n\n return function propagating(hammer, options) {\n var _options = options || {\n preventDefault: false\n };\n\n if (hammer.Manager) {\n // This looks like the Hammer constructor.\n // Overload the constructors with our own.\n var Hammer = hammer;\n\n var PropagatingHammer = function (element, options) {\n var o = Object.create(_options);\n if (options) Hammer.assign(o, options);\n return propagating(new Hammer(element, o), o);\n };\n\n Hammer.assign(PropagatingHammer, Hammer);\n\n PropagatingHammer.Manager = function (element, options) {\n var o = Object.create(_options);\n if (options) Hammer.assign(o, options);\n return propagating(new Hammer.Manager(element, o), o);\n };\n\n return PropagatingHammer;\n } // create a wrapper object which will override the functions\n // `on`, `off`, `destroy`, and `emit` of the hammer instance\n\n\n var wrapper = Object.create(hammer); // attach to DOM element\n\n var element = hammer.element;\n if (!element.hammer) element.hammer = [];\n element.hammer.push(wrapper); // register an event to catch the start of a gesture and store the\n // target in a singleton\n\n hammer.on('hammer.input', function (event) {\n if (_options.preventDefault === true || _options.preventDefault === event.pointerType) {\n event.preventDefault();\n }\n\n if (event.isFirst) {\n _firstTarget = event.target;\n }\n });\n /** @type {Object.>} */\n\n wrapper._handlers = {};\n /**\n * Register a handler for one or multiple events\n * @param {String} events A space separated string with events\n * @param {function} handler A callback function, called as handler(event)\n * @returns {Hammer.Manager} Returns the hammer instance\n */\n\n wrapper.on = function (events, handler) {\n // register the handler\n split(events).forEach(function (event) {\n var _handlers = wrapper._handlers[event];\n\n if (!_handlers) {\n wrapper._handlers[event] = _handlers = []; // register the static, propagated handler\n\n hammer.on(event, propagatedHandler);\n }\n\n _handlers.push(handler);\n });\n return wrapper;\n };\n /**\n * Unregister a handler for one or multiple events\n * @param {String} events A space separated string with events\n * @param {function} [handler] Optional. The registered handler. If not\n * provided, all handlers for given events\n * are removed.\n * @returns {Hammer.Manager} Returns the hammer instance\n */\n\n\n wrapper.off = function (events, handler) {\n // unregister the handler\n split(events).forEach(function (event) {\n var _handlers = wrapper._handlers[event];\n\n if (_handlers) {\n _handlers = handler ? _handlers.filter(function (h) {\n return h !== handler;\n }) : [];\n\n if (_handlers.length > 0) {\n wrapper._handlers[event] = _handlers;\n } else {\n // remove static, propagated handler\n hammer.off(event, propagatedHandler);\n delete wrapper._handlers[event];\n }\n }\n });\n return wrapper;\n };\n /**\n * Emit to the event listeners\n * @param {string} eventType\n * @param {Event} event\n */\n\n\n wrapper.emit = function (eventType, event) {\n _firstTarget = event.target;\n hammer.emit(eventType, event);\n };\n\n wrapper.destroy = function () {\n // Detach from DOM element\n var hammers = hammer.element.hammer;\n var idx = hammers.indexOf(wrapper);\n if (idx !== -1) hammers.splice(idx, 1);\n if (!hammers.length) delete hammer.element.hammer; // clear all handlers\n\n wrapper._handlers = {}; // call original hammer destroy\n\n hammer.destroy();\n }; // split a string with space separated words\n\n\n function split(events) {\n return events.match(/[^ ]+/g);\n }\n /**\n * A static event handler, applying event propagation.\n * @param {Object} event\n */\n\n\n function propagatedHandler(event) {\n // let only a single hammer instance handle this event\n if (event.type !== 'hammer.input') {\n // it is possible that the same srcEvent is used with multiple hammer events,\n // we keep track on which events are handled in an object _handled\n if (!event.srcEvent._handled) {\n event.srcEvent._handled = {};\n }\n\n if (event.srcEvent._handled[event.type]) {\n return;\n } else {\n event.srcEvent._handled[event.type] = true;\n }\n } // attach a stopPropagation function to the event\n\n\n var stopped = false;\n\n event.stopPropagation = function () {\n stopped = true;\n }; //wrap the srcEvent's stopPropagation to also stop hammer propagation:\n\n\n var srcStop = event.srcEvent.stopPropagation.bind(event.srcEvent);\n\n if (typeof srcStop == \"function\") {\n event.srcEvent.stopPropagation = function () {\n srcStop();\n event.stopPropagation();\n };\n } // attach firstTarget property to the event\n\n\n event.firstTarget = _firstTarget; // propagate over all elements (until stopped)\n\n var elem = _firstTarget;\n\n while (elem && !stopped) {\n var elemHammer = elem.hammer;\n\n if (elemHammer) {\n var _handlers;\n\n for (var k = 0; k < elemHammer.length; k++) {\n _handlers = elemHammer[k]._handlers[event.type];\n if (_handlers) for (var i = 0; i < _handlers.length && !stopped; i++) {\n _handlers[i](event);\n }\n }\n }\n\n elem = elem.parentNode;\n }\n }\n\n return wrapper;\n };\n });\n /***/\n\n },\n /* 114 */\n\n /***/\n function (module, exports, __webpack_require__) {\n var __WEBPACK_AMD_DEFINE_RESULT__;\n /*! Hammer.JS - v2.0.7 - 2016-04-22\n * http://hammerjs.github.io/\n *\n * Copyright (c) 2016 Jorik Tangelder;\n * Licensed under the MIT license */\n\n\n (function (window, document, exportName, undefined) {\n 'use strict';\n\n var VENDOR_PREFIXES = ['', 'webkit', 'Moz', 'MS', 'ms', 'o'];\n var TEST_ELEMENT = document.createElement('div');\n var TYPE_FUNCTION = 'function';\n var round = Math.round;\n var abs = Math.abs;\n var now = Date.now;\n /**\n * set a timeout with a given scope\n * @param {Function} fn\n * @param {Number} timeout\n * @param {Object} context\n * @returns {number}\n */\n\n function setTimeoutContext(fn, timeout, context) {\n return setTimeout(bindFn(fn, context), timeout);\n }\n /**\n * if the argument is an array, we want to execute the fn on each entry\n * if it aint an array we don't want to do a thing.\n * this is used by all the methods that accept a single and array argument.\n * @param {*|Array} arg\n * @param {String} fn\n * @param {Object} [context]\n * @returns {Boolean}\n */\n\n\n function invokeArrayArg(arg, fn, context) {\n if (Array.isArray(arg)) {\n each(arg, context[fn], context);\n return true;\n }\n\n return false;\n }\n /**\n * walk objects and arrays\n * @param {Object} obj\n * @param {Function} iterator\n * @param {Object} context\n */\n\n\n function each(obj, iterator, context) {\n var i;\n\n if (!obj) {\n return;\n }\n\n if (obj.forEach) {\n obj.forEach(iterator, context);\n } else if (obj.length !== undefined) {\n i = 0;\n\n while (i < obj.length) {\n iterator.call(context, obj[i], i, obj);\n i++;\n }\n } else {\n for (i in obj) {\n obj.hasOwnProperty(i) && iterator.call(context, obj[i], i, obj);\n }\n }\n }\n /**\n * wrap a method with a deprecation warning and stack trace\n * @param {Function} method\n * @param {String} name\n * @param {String} message\n * @returns {Function} A new function wrapping the supplied method.\n */\n\n\n function deprecate(method, name, message) {\n var deprecationMessage = 'DEPRECATED METHOD: ' + name + '\\n' + message + ' AT \\n';\n return function () {\n var e = new Error('get-stack-trace');\n var stack = e && e.stack ? e.stack.replace(/^[^\\(]+?[\\n$]/gm, '').replace(/^\\s+at\\s+/gm, '').replace(/^Object.\\s*\\(/gm, '{anonymous}()@') : 'Unknown Stack Trace';\n var log = window.console && (window.console.warn || window.console.log);\n\n if (log) {\n log.call(window.console, deprecationMessage, stack);\n }\n\n return method.apply(this, arguments);\n };\n }\n /**\n * extend object.\n * means that properties in dest will be overwritten by the ones in src.\n * @param {Object} target\n * @param {...Object} objects_to_assign\n * @returns {Object} target\n */\n\n\n var assign;\n\n if (typeof Object.assign !== 'function') {\n assign = function assign(target) {\n if (target === undefined || target === null) {\n throw new TypeError('Cannot convert undefined or null to object');\n }\n\n var output = Object(target);\n\n for (var index = 1; index < arguments.length; index++) {\n var source = arguments[index];\n\n if (source !== undefined && source !== null) {\n for (var nextKey in source) {\n if (source.hasOwnProperty(nextKey)) {\n output[nextKey] = source[nextKey];\n }\n }\n }\n }\n\n return output;\n };\n } else {\n assign = Object.assign;\n }\n /**\n * extend object.\n * means that properties in dest will be overwritten by the ones in src.\n * @param {Object} dest\n * @param {Object} src\n * @param {Boolean} [merge=false]\n * @returns {Object} dest\n */\n\n\n var extend = deprecate(function extend(dest, src, merge) {\n var keys = Object.keys(src);\n var i = 0;\n\n while (i < keys.length) {\n if (!merge || merge && dest[keys[i]] === undefined) {\n dest[keys[i]] = src[keys[i]];\n }\n\n i++;\n }\n\n return dest;\n }, 'extend', 'Use `assign`.');\n /**\n * merge the values from src in the dest.\n * means that properties that exist in dest will not be overwritten by src\n * @param {Object} dest\n * @param {Object} src\n * @returns {Object} dest\n */\n\n var merge = deprecate(function merge(dest, src) {\n return extend(dest, src, true);\n }, 'merge', 'Use `assign`.');\n /**\n * simple class inheritance\n * @param {Function} child\n * @param {Function} base\n * @param {Object} [properties]\n */\n\n function inherit(child, base, properties) {\n var baseP = base.prototype,\n childP;\n childP = child.prototype = Object.create(baseP);\n childP.constructor = child;\n childP._super = baseP;\n\n if (properties) {\n assign(childP, properties);\n }\n }\n /**\n * simple function bind\n * @param {Function} fn\n * @param {Object} context\n * @returns {Function}\n */\n\n\n function bindFn(fn, context) {\n return function boundFn() {\n return fn.apply(context, arguments);\n };\n }\n /**\n * let a boolean value also be a function that must return a boolean\n * this first item in args will be used as the context\n * @param {Boolean|Function} val\n * @param {Array} [args]\n * @returns {Boolean}\n */\n\n\n function boolOrFn(val, args) {\n if (typeof val == TYPE_FUNCTION) {\n return val.apply(args ? args[0] || undefined : undefined, args);\n }\n\n return val;\n }\n /**\n * use the val2 when val1 is undefined\n * @param {*} val1\n * @param {*} val2\n * @returns {*}\n */\n\n\n function ifUndefined(val1, val2) {\n return val1 === undefined ? val2 : val1;\n }\n /**\n * addEventListener with multiple events at once\n * @param {EventTarget} target\n * @param {String} types\n * @param {Function} handler\n */\n\n\n function addEventListeners(target, types, handler) {\n each(splitStr(types), function (type) {\n target.addEventListener(type, handler, false);\n });\n }\n /**\n * removeEventListener with multiple events at once\n * @param {EventTarget} target\n * @param {String} types\n * @param {Function} handler\n */\n\n\n function removeEventListeners(target, types, handler) {\n each(splitStr(types), function (type) {\n target.removeEventListener(type, handler, false);\n });\n }\n /**\n * find if a node is in the given parent\n * @method hasParent\n * @param {HTMLElement} node\n * @param {HTMLElement} parent\n * @return {Boolean} found\n */\n\n\n function hasParent(node, parent) {\n while (node) {\n if (node == parent) {\n return true;\n }\n\n node = node.parentNode;\n }\n\n return false;\n }\n /**\n * small indexOf wrapper\n * @param {String} str\n * @param {String} find\n * @returns {Boolean} found\n */\n\n\n function inStr(str, find) {\n return str.indexOf(find) > -1;\n }\n /**\n * split string on whitespace\n * @param {String} str\n * @returns {Array} words\n */\n\n\n function splitStr(str) {\n return str.trim().split(/\\s+/g);\n }\n /**\n * find if a array contains the object using indexOf or a simple polyFill\n * @param {Array} src\n * @param {String} find\n * @param {String} [findByKey]\n * @return {Boolean|Number} false when not found, or the index\n */\n\n\n function inArray(src, find, findByKey) {\n if (src.indexOf && !findByKey) {\n return src.indexOf(find);\n } else {\n var i = 0;\n\n while (i < src.length) {\n if (findByKey && src[i][findByKey] == find || !findByKey && src[i] === find) {\n return i;\n }\n\n i++;\n }\n\n return -1;\n }\n }\n /**\n * convert array-like objects to real arrays\n * @param {Object} obj\n * @returns {Array}\n */\n\n\n function toArray(obj) {\n return Array.prototype.slice.call(obj, 0);\n }\n /**\n * unique array with objects based on a key (like 'id') or just by the array's value\n * @param {Array} src [{id:1},{id:2},{id:1}]\n * @param {String} [key]\n * @param {Boolean} [sort=False]\n * @returns {Array} [{id:1},{id:2}]\n */\n\n\n function uniqueArray(src, key, sort) {\n var results = [];\n var values = [];\n var i = 0;\n\n while (i < src.length) {\n var val = key ? src[i][key] : src[i];\n\n if (inArray(values, val) < 0) {\n results.push(src[i]);\n }\n\n values[i] = val;\n i++;\n }\n\n if (sort) {\n if (!key) {\n results = results.sort();\n } else {\n results = results.sort(function sortUniqueArray(a, b) {\n return a[key] > b[key];\n });\n }\n }\n\n return results;\n }\n /**\n * get the prefixed property\n * @param {Object} obj\n * @param {String} property\n * @returns {String|Undefined} prefixed\n */\n\n\n function prefixed(obj, property) {\n var prefix, prop;\n var camelProp = property[0].toUpperCase() + property.slice(1);\n var i = 0;\n\n while (i < VENDOR_PREFIXES.length) {\n prefix = VENDOR_PREFIXES[i];\n prop = prefix ? prefix + camelProp : property;\n\n if (prop in obj) {\n return prop;\n }\n\n i++;\n }\n\n return undefined;\n }\n /**\n * get a unique id\n * @returns {number} uniqueId\n */\n\n\n var _uniqueId = 1;\n\n function uniqueId() {\n return _uniqueId++;\n }\n /**\n * get the window object of an element\n * @param {HTMLElement} element\n * @returns {DocumentView|Window}\n */\n\n\n function getWindowForElement(element) {\n var doc = element.ownerDocument || element;\n return doc.defaultView || doc.parentWindow || window;\n }\n\n var MOBILE_REGEX = /mobile|tablet|ip(ad|hone|od)|android/i;\n var SUPPORT_TOUCH = 'ontouchstart' in window;\n var SUPPORT_POINTER_EVENTS = prefixed(window, 'PointerEvent') !== undefined;\n var SUPPORT_ONLY_TOUCH = SUPPORT_TOUCH && MOBILE_REGEX.test(navigator.userAgent);\n var INPUT_TYPE_TOUCH = 'touch';\n var INPUT_TYPE_PEN = 'pen';\n var INPUT_TYPE_MOUSE = 'mouse';\n var INPUT_TYPE_KINECT = 'kinect';\n var COMPUTE_INTERVAL = 25;\n var INPUT_START = 1;\n var INPUT_MOVE = 2;\n var INPUT_END = 4;\n var INPUT_CANCEL = 8;\n var DIRECTION_NONE = 1;\n var DIRECTION_LEFT = 2;\n var DIRECTION_RIGHT = 4;\n var DIRECTION_UP = 8;\n var DIRECTION_DOWN = 16;\n var DIRECTION_HORIZONTAL = DIRECTION_LEFT | DIRECTION_RIGHT;\n var DIRECTION_VERTICAL = DIRECTION_UP | DIRECTION_DOWN;\n var DIRECTION_ALL = DIRECTION_HORIZONTAL | DIRECTION_VERTICAL;\n var PROPS_XY = ['x', 'y'];\n var PROPS_CLIENT_XY = ['clientX', 'clientY'];\n /**\n * create new input type manager\n * @param {Manager} manager\n * @param {Function} callback\n * @returns {Input}\n * @constructor\n */\n\n function Input(manager, callback) {\n var self = this;\n this.manager = manager;\n this.callback = callback;\n this.element = manager.element;\n this.target = manager.options.inputTarget; // smaller wrapper around the handler, for the scope and the enabled state of the manager,\n // so when disabled the input events are completely bypassed.\n\n this.domHandler = function (ev) {\n if (boolOrFn(manager.options.enable, [manager])) {\n self.handler(ev);\n }\n };\n\n this.init();\n }\n\n Input.prototype = {\n /**\n * should handle the inputEvent data and trigger the callback\n * @virtual\n */\n handler: function () {},\n\n /**\n * bind the events\n */\n init: function () {\n this.evEl && addEventListeners(this.element, this.evEl, this.domHandler);\n this.evTarget && addEventListeners(this.target, this.evTarget, this.domHandler);\n this.evWin && addEventListeners(getWindowForElement(this.element), this.evWin, this.domHandler);\n },\n\n /**\n * unbind the events\n */\n destroy: function () {\n this.evEl && removeEventListeners(this.element, this.evEl, this.domHandler);\n this.evTarget && removeEventListeners(this.target, this.evTarget, this.domHandler);\n this.evWin && removeEventListeners(getWindowForElement(this.element), this.evWin, this.domHandler);\n }\n };\n /**\n * create new input type manager\n * called by the Manager constructor\n * @param {Hammer} manager\n * @returns {Input}\n */\n\n function createInputInstance(manager) {\n var Type;\n var inputClass = manager.options.inputClass;\n\n if (inputClass) {\n Type = inputClass;\n } else if (SUPPORT_POINTER_EVENTS) {\n Type = PointerEventInput;\n } else if (SUPPORT_ONLY_TOUCH) {\n Type = TouchInput;\n } else if (!SUPPORT_TOUCH) {\n Type = MouseInput;\n } else {\n Type = TouchMouseInput;\n }\n\n return new Type(manager, inputHandler);\n }\n /**\n * handle input events\n * @param {Manager} manager\n * @param {String} eventType\n * @param {Object} input\n */\n\n\n function inputHandler(manager, eventType, input) {\n var pointersLen = input.pointers.length;\n var changedPointersLen = input.changedPointers.length;\n var isFirst = eventType & INPUT_START && pointersLen - changedPointersLen === 0;\n var isFinal = eventType & (INPUT_END | INPUT_CANCEL) && pointersLen - changedPointersLen === 0;\n input.isFirst = !!isFirst;\n input.isFinal = !!isFinal;\n\n if (isFirst) {\n manager.session = {};\n } // source event is the normalized value of the domEvents\n // like 'touchstart, mouseup, pointerdown'\n\n\n input.eventType = eventType; // compute scale, rotation etc\n\n computeInputData(manager, input); // emit secret event\n\n manager.emit('hammer.input', input);\n manager.recognize(input);\n manager.session.prevInput = input;\n }\n /**\n * extend the data with some usable properties like scale, rotate, velocity etc\n * @param {Object} manager\n * @param {Object} input\n */\n\n\n function computeInputData(manager, input) {\n var session = manager.session;\n var pointers = input.pointers;\n var pointersLength = pointers.length; // store the first input to calculate the distance and direction\n\n if (!session.firstInput) {\n session.firstInput = simpleCloneInputData(input);\n } // to compute scale and rotation we need to store the multiple touches\n\n\n if (pointersLength > 1 && !session.firstMultiple) {\n session.firstMultiple = simpleCloneInputData(input);\n } else if (pointersLength === 1) {\n session.firstMultiple = false;\n }\n\n var firstInput = session.firstInput;\n var firstMultiple = session.firstMultiple;\n var offsetCenter = firstMultiple ? firstMultiple.center : firstInput.center;\n var center = input.center = getCenter(pointers);\n input.timeStamp = now();\n input.deltaTime = input.timeStamp - firstInput.timeStamp;\n input.angle = getAngle(offsetCenter, center);\n input.distance = getDistance(offsetCenter, center);\n computeDeltaXY(session, input);\n input.offsetDirection = getDirection(input.deltaX, input.deltaY);\n var overallVelocity = getVelocity(input.deltaTime, input.deltaX, input.deltaY);\n input.overallVelocityX = overallVelocity.x;\n input.overallVelocityY = overallVelocity.y;\n input.overallVelocity = abs(overallVelocity.x) > abs(overallVelocity.y) ? overallVelocity.x : overallVelocity.y;\n input.scale = firstMultiple ? getScale(firstMultiple.pointers, pointers) : 1;\n input.rotation = firstMultiple ? getRotation(firstMultiple.pointers, pointers) : 0;\n input.maxPointers = !session.prevInput ? input.pointers.length : input.pointers.length > session.prevInput.maxPointers ? input.pointers.length : session.prevInput.maxPointers;\n computeIntervalInputData(session, input); // find the correct target\n\n var target = manager.element;\n\n if (hasParent(input.srcEvent.target, target)) {\n target = input.srcEvent.target;\n }\n\n input.target = target;\n }\n\n function computeDeltaXY(session, input) {\n var center = input.center;\n var offset = session.offsetDelta || {};\n var prevDelta = session.prevDelta || {};\n var prevInput = session.prevInput || {};\n\n if (input.eventType === INPUT_START || prevInput.eventType === INPUT_END) {\n prevDelta = session.prevDelta = {\n x: prevInput.deltaX || 0,\n y: prevInput.deltaY || 0\n };\n offset = session.offsetDelta = {\n x: center.x,\n y: center.y\n };\n }\n\n input.deltaX = prevDelta.x + (center.x - offset.x);\n input.deltaY = prevDelta.y + (center.y - offset.y);\n }\n /**\n * velocity is calculated every x ms\n * @param {Object} session\n * @param {Object} input\n */\n\n\n function computeIntervalInputData(session, input) {\n var last = session.lastInterval || input,\n deltaTime = input.timeStamp - last.timeStamp,\n velocity,\n velocityX,\n velocityY,\n direction;\n\n if (input.eventType != INPUT_CANCEL && (deltaTime > COMPUTE_INTERVAL || last.velocity === undefined)) {\n var deltaX = input.deltaX - last.deltaX;\n var deltaY = input.deltaY - last.deltaY;\n var v = getVelocity(deltaTime, deltaX, deltaY);\n velocityX = v.x;\n velocityY = v.y;\n velocity = abs(v.x) > abs(v.y) ? v.x : v.y;\n direction = getDirection(deltaX, deltaY);\n session.lastInterval = input;\n } else {\n // use latest velocity info if it doesn't overtake a minimum period\n velocity = last.velocity;\n velocityX = last.velocityX;\n velocityY = last.velocityY;\n direction = last.direction;\n }\n\n input.velocity = velocity;\n input.velocityX = velocityX;\n input.velocityY = velocityY;\n input.direction = direction;\n }\n /**\n * create a simple clone from the input used for storage of firstInput and firstMultiple\n * @param {Object} input\n * @returns {Object} clonedInputData\n */\n\n\n function simpleCloneInputData(input) {\n // make a simple copy of the pointers because we will get a reference if we don't\n // we only need clientXY for the calculations\n var pointers = [];\n var i = 0;\n\n while (i < input.pointers.length) {\n pointers[i] = {\n clientX: round(input.pointers[i].clientX),\n clientY: round(input.pointers[i].clientY)\n };\n i++;\n }\n\n return {\n timeStamp: now(),\n pointers: pointers,\n center: getCenter(pointers),\n deltaX: input.deltaX,\n deltaY: input.deltaY\n };\n }\n /**\n * get the center of all the pointers\n * @param {Array} pointers\n * @return {Object} center contains `x` and `y` properties\n */\n\n\n function getCenter(pointers) {\n var pointersLength = pointers.length; // no need to loop when only one touch\n\n if (pointersLength === 1) {\n return {\n x: round(pointers[0].clientX),\n y: round(pointers[0].clientY)\n };\n }\n\n var x = 0,\n y = 0,\n i = 0;\n\n while (i < pointersLength) {\n x += pointers[i].clientX;\n y += pointers[i].clientY;\n i++;\n }\n\n return {\n x: round(x / pointersLength),\n y: round(y / pointersLength)\n };\n }\n /**\n * calculate the velocity between two points. unit is in px per ms.\n * @param {Number} deltaTime\n * @param {Number} x\n * @param {Number} y\n * @return {Object} velocity `x` and `y`\n */\n\n\n function getVelocity(deltaTime, x, y) {\n return {\n x: x / deltaTime || 0,\n y: y / deltaTime || 0\n };\n }\n /**\n * get the direction between two points\n * @param {Number} x\n * @param {Number} y\n * @return {Number} direction\n */\n\n\n function getDirection(x, y) {\n if (x === y) {\n return DIRECTION_NONE;\n }\n\n if (abs(x) >= abs(y)) {\n return x < 0 ? DIRECTION_LEFT : DIRECTION_RIGHT;\n }\n\n return y < 0 ? DIRECTION_UP : DIRECTION_DOWN;\n }\n /**\n * calculate the absolute distance between two points\n * @param {Object} p1 {x, y}\n * @param {Object} p2 {x, y}\n * @param {Array} [props] containing x and y keys\n * @return {Number} distance\n */\n\n\n function getDistance(p1, p2, props) {\n if (!props) {\n props = PROPS_XY;\n }\n\n var x = p2[props[0]] - p1[props[0]],\n y = p2[props[1]] - p1[props[1]];\n return Math.sqrt(x * x + y * y);\n }\n /**\n * calculate the angle between two coordinates\n * @param {Object} p1\n * @param {Object} p2\n * @param {Array} [props] containing x and y keys\n * @return {Number} angle\n */\n\n\n function getAngle(p1, p2, props) {\n if (!props) {\n props = PROPS_XY;\n }\n\n var x = p2[props[0]] - p1[props[0]],\n y = p2[props[1]] - p1[props[1]];\n return Math.atan2(y, x) * 180 / Math.PI;\n }\n /**\n * calculate the rotation degrees between two pointersets\n * @param {Array} start array of pointers\n * @param {Array} end array of pointers\n * @return {Number} rotation\n */\n\n\n function getRotation(start, end) {\n return getAngle(end[1], end[0], PROPS_CLIENT_XY) + getAngle(start[1], start[0], PROPS_CLIENT_XY);\n }\n /**\n * calculate the scale factor between two pointersets\n * no scale is 1, and goes down to 0 when pinched together, and bigger when pinched out\n * @param {Array} start array of pointers\n * @param {Array} end array of pointers\n * @return {Number} scale\n */\n\n\n function getScale(start, end) {\n return getDistance(end[0], end[1], PROPS_CLIENT_XY) / getDistance(start[0], start[1], PROPS_CLIENT_XY);\n }\n\n var MOUSE_INPUT_MAP = {\n mousedown: INPUT_START,\n mousemove: INPUT_MOVE,\n mouseup: INPUT_END\n };\n var MOUSE_ELEMENT_EVENTS = 'mousedown';\n var MOUSE_WINDOW_EVENTS = 'mousemove mouseup';\n /**\n * Mouse events input\n * @constructor\n * @extends Input\n */\n\n function MouseInput() {\n this.evEl = MOUSE_ELEMENT_EVENTS;\n this.evWin = MOUSE_WINDOW_EVENTS;\n this.pressed = false; // mousedown state\n\n Input.apply(this, arguments);\n }\n\n inherit(MouseInput, Input, {\n /**\n * handle mouse events\n * @param {Object} ev\n */\n handler: function MEhandler(ev) {\n var eventType = MOUSE_INPUT_MAP[ev.type]; // on start we want to have the left mouse button down\n\n if (eventType & INPUT_START && ev.button === 0) {\n this.pressed = true;\n }\n\n if (eventType & INPUT_MOVE && ev.which !== 1) {\n eventType = INPUT_END;\n } // mouse must be down\n\n\n if (!this.pressed) {\n return;\n }\n\n if (eventType & INPUT_END) {\n this.pressed = false;\n }\n\n this.callback(this.manager, eventType, {\n pointers: [ev],\n changedPointers: [ev],\n pointerType: INPUT_TYPE_MOUSE,\n srcEvent: ev\n });\n }\n });\n var POINTER_INPUT_MAP = {\n pointerdown: INPUT_START,\n pointermove: INPUT_MOVE,\n pointerup: INPUT_END,\n pointercancel: INPUT_CANCEL,\n pointerout: INPUT_CANCEL\n }; // in IE10 the pointer types is defined as an enum\n\n var IE10_POINTER_TYPE_ENUM = {\n 2: INPUT_TYPE_TOUCH,\n 3: INPUT_TYPE_PEN,\n 4: INPUT_TYPE_MOUSE,\n 5: INPUT_TYPE_KINECT // see https://twitter.com/jacobrossi/status/480596438489890816\n\n };\n var POINTER_ELEMENT_EVENTS = 'pointerdown';\n var POINTER_WINDOW_EVENTS = 'pointermove pointerup pointercancel'; // IE10 has prefixed support, and case-sensitive\n\n if (window.MSPointerEvent && !window.PointerEvent) {\n POINTER_ELEMENT_EVENTS = 'MSPointerDown';\n POINTER_WINDOW_EVENTS = 'MSPointerMove MSPointerUp MSPointerCancel';\n }\n /**\n * Pointer events input\n * @constructor\n * @extends Input\n */\n\n\n function PointerEventInput() {\n this.evEl = POINTER_ELEMENT_EVENTS;\n this.evWin = POINTER_WINDOW_EVENTS;\n Input.apply(this, arguments);\n this.store = this.manager.session.pointerEvents = [];\n }\n\n inherit(PointerEventInput, Input, {\n /**\n * handle mouse events\n * @param {Object} ev\n */\n handler: function PEhandler(ev) {\n var store = this.store;\n var removePointer = false;\n var eventTypeNormalized = ev.type.toLowerCase().replace('ms', '');\n var eventType = POINTER_INPUT_MAP[eventTypeNormalized];\n var pointerType = IE10_POINTER_TYPE_ENUM[ev.pointerType] || ev.pointerType;\n var isTouch = pointerType == INPUT_TYPE_TOUCH; // get index of the event in the store\n\n var storeIndex = inArray(store, ev.pointerId, 'pointerId'); // start and mouse must be down\n\n if (eventType & INPUT_START && (ev.button === 0 || isTouch)) {\n if (storeIndex < 0) {\n store.push(ev);\n storeIndex = store.length - 1;\n }\n } else if (eventType & (INPUT_END | INPUT_CANCEL)) {\n removePointer = true;\n } // it not found, so the pointer hasn't been down (so it's probably a hover)\n\n\n if (storeIndex < 0) {\n return;\n } // update the event in the store\n\n\n store[storeIndex] = ev;\n this.callback(this.manager, eventType, {\n pointers: store,\n changedPointers: [ev],\n pointerType: pointerType,\n srcEvent: ev\n });\n\n if (removePointer) {\n // remove from the store\n store.splice(storeIndex, 1);\n }\n }\n });\n var SINGLE_TOUCH_INPUT_MAP = {\n touchstart: INPUT_START,\n touchmove: INPUT_MOVE,\n touchend: INPUT_END,\n touchcancel: INPUT_CANCEL\n };\n var SINGLE_TOUCH_TARGET_EVENTS = 'touchstart';\n var SINGLE_TOUCH_WINDOW_EVENTS = 'touchstart touchmove touchend touchcancel';\n /**\n * Touch events input\n * @constructor\n * @extends Input\n */\n\n function SingleTouchInput() {\n this.evTarget = SINGLE_TOUCH_TARGET_EVENTS;\n this.evWin = SINGLE_TOUCH_WINDOW_EVENTS;\n this.started = false;\n Input.apply(this, arguments);\n }\n\n inherit(SingleTouchInput, Input, {\n handler: function TEhandler(ev) {\n var type = SINGLE_TOUCH_INPUT_MAP[ev.type]; // should we handle the touch events?\n\n if (type === INPUT_START) {\n this.started = true;\n }\n\n if (!this.started) {\n return;\n }\n\n var touches = normalizeSingleTouches.call(this, ev, type); // when done, reset the started state\n\n if (type & (INPUT_END | INPUT_CANCEL) && touches[0].length - touches[1].length === 0) {\n this.started = false;\n }\n\n this.callback(this.manager, type, {\n pointers: touches[0],\n changedPointers: touches[1],\n pointerType: INPUT_TYPE_TOUCH,\n srcEvent: ev\n });\n }\n });\n /**\n * @this {TouchInput}\n * @param {Object} ev\n * @param {Number} type flag\n * @returns {undefined|Array} [all, changed]\n */\n\n function normalizeSingleTouches(ev, type) {\n var all = toArray(ev.touches);\n var changed = toArray(ev.changedTouches);\n\n if (type & (INPUT_END | INPUT_CANCEL)) {\n all = uniqueArray(all.concat(changed), 'identifier', true);\n }\n\n return [all, changed];\n }\n\n var TOUCH_INPUT_MAP = {\n touchstart: INPUT_START,\n touchmove: INPUT_MOVE,\n touchend: INPUT_END,\n touchcancel: INPUT_CANCEL\n };\n var TOUCH_TARGET_EVENTS = 'touchstart touchmove touchend touchcancel';\n /**\n * Multi-user touch events input\n * @constructor\n * @extends Input\n */\n\n function TouchInput() {\n this.evTarget = TOUCH_TARGET_EVENTS;\n this.targetIds = {};\n Input.apply(this, arguments);\n }\n\n inherit(TouchInput, Input, {\n handler: function MTEhandler(ev) {\n var type = TOUCH_INPUT_MAP[ev.type];\n var touches = getTouches.call(this, ev, type);\n\n if (!touches) {\n return;\n }\n\n this.callback(this.manager, type, {\n pointers: touches[0],\n changedPointers: touches[1],\n pointerType: INPUT_TYPE_TOUCH,\n srcEvent: ev\n });\n }\n });\n /**\n * @this {TouchInput}\n * @param {Object} ev\n * @param {Number} type flag\n * @returns {undefined|Array} [all, changed]\n */\n\n function getTouches(ev, type) {\n var allTouches = toArray(ev.touches);\n var targetIds = this.targetIds; // when there is only one touch, the process can be simplified\n\n if (type & (INPUT_START | INPUT_MOVE) && allTouches.length === 1) {\n targetIds[allTouches[0].identifier] = true;\n return [allTouches, allTouches];\n }\n\n var i,\n targetTouches,\n changedTouches = toArray(ev.changedTouches),\n changedTargetTouches = [],\n target = this.target; // get target touches from touches\n\n targetTouches = allTouches.filter(function (touch) {\n return hasParent(touch.target, target);\n }); // collect touches\n\n if (type === INPUT_START) {\n i = 0;\n\n while (i < targetTouches.length) {\n targetIds[targetTouches[i].identifier] = true;\n i++;\n }\n } // filter changed touches to only contain touches that exist in the collected target ids\n\n\n i = 0;\n\n while (i < changedTouches.length) {\n if (targetIds[changedTouches[i].identifier]) {\n changedTargetTouches.push(changedTouches[i]);\n } // cleanup removed touches\n\n\n if (type & (INPUT_END | INPUT_CANCEL)) {\n delete targetIds[changedTouches[i].identifier];\n }\n\n i++;\n }\n\n if (!changedTargetTouches.length) {\n return;\n }\n\n return [// merge targetTouches with changedTargetTouches so it contains ALL touches, including 'end' and 'cancel'\n uniqueArray(targetTouches.concat(changedTargetTouches), 'identifier', true), changedTargetTouches];\n }\n /**\n * Combined touch and mouse input\n *\n * Touch has a higher priority then mouse, and while touching no mouse events are allowed.\n * This because touch devices also emit mouse events while doing a touch.\n *\n * @constructor\n * @extends Input\n */\n\n\n var DEDUP_TIMEOUT = 2500;\n var DEDUP_DISTANCE = 25;\n\n function TouchMouseInput() {\n Input.apply(this, arguments);\n var handler = bindFn(this.handler, this);\n this.touch = new TouchInput(this.manager, handler);\n this.mouse = new MouseInput(this.manager, handler);\n this.primaryTouch = null;\n this.lastTouches = [];\n }\n\n inherit(TouchMouseInput, Input, {\n /**\n * handle mouse and touch events\n * @param {Hammer} manager\n * @param {String} inputEvent\n * @param {Object} inputData\n */\n handler: function TMEhandler(manager, inputEvent, inputData) {\n var isTouch = inputData.pointerType == INPUT_TYPE_TOUCH,\n isMouse = inputData.pointerType == INPUT_TYPE_MOUSE;\n\n if (isMouse && inputData.sourceCapabilities && inputData.sourceCapabilities.firesTouchEvents) {\n return;\n } // when we're in a touch event, record touches to de-dupe synthetic mouse event\n\n\n if (isTouch) {\n recordTouches.call(this, inputEvent, inputData);\n } else if (isMouse && isSyntheticEvent.call(this, inputData)) {\n return;\n }\n\n this.callback(manager, inputEvent, inputData);\n },\n\n /**\n * remove the event listeners\n */\n destroy: function destroy() {\n this.touch.destroy();\n this.mouse.destroy();\n }\n });\n\n function recordTouches(eventType, eventData) {\n if (eventType & INPUT_START) {\n this.primaryTouch = eventData.changedPointers[0].identifier;\n setLastTouch.call(this, eventData);\n } else if (eventType & (INPUT_END | INPUT_CANCEL)) {\n setLastTouch.call(this, eventData);\n }\n }\n\n function setLastTouch(eventData) {\n var touch = eventData.changedPointers[0];\n\n if (touch.identifier === this.primaryTouch) {\n var lastTouch = {\n x: touch.clientX,\n y: touch.clientY\n };\n this.lastTouches.push(lastTouch);\n var lts = this.lastTouches;\n\n var removeLastTouch = function () {\n var i = lts.indexOf(lastTouch);\n\n if (i > -1) {\n lts.splice(i, 1);\n }\n };\n\n setTimeout(removeLastTouch, DEDUP_TIMEOUT);\n }\n }\n\n function isSyntheticEvent(eventData) {\n var x = eventData.srcEvent.clientX,\n y = eventData.srcEvent.clientY;\n\n for (var i = 0; i < this.lastTouches.length; i++) {\n var t = this.lastTouches[i];\n var dx = Math.abs(x - t.x),\n dy = Math.abs(y - t.y);\n\n if (dx <= DEDUP_DISTANCE && dy <= DEDUP_DISTANCE) {\n return true;\n }\n }\n\n return false;\n }\n\n var PREFIXED_TOUCH_ACTION = prefixed(TEST_ELEMENT.style, 'touchAction');\n var NATIVE_TOUCH_ACTION = PREFIXED_TOUCH_ACTION !== undefined; // magical touchAction value\n\n var TOUCH_ACTION_COMPUTE = 'compute';\n var TOUCH_ACTION_AUTO = 'auto';\n var TOUCH_ACTION_MANIPULATION = 'manipulation'; // not implemented\n\n var TOUCH_ACTION_NONE = 'none';\n var TOUCH_ACTION_PAN_X = 'pan-x';\n var TOUCH_ACTION_PAN_Y = 'pan-y';\n var TOUCH_ACTION_MAP = getTouchActionProps();\n /**\n * Touch Action\n * sets the touchAction property or uses the js alternative\n * @param {Manager} manager\n * @param {String} value\n * @constructor\n */\n\n function TouchAction(manager, value) {\n this.manager = manager;\n this.set(value);\n }\n\n TouchAction.prototype = {\n /**\n * set the touchAction value on the element or enable the polyfill\n * @param {String} value\n */\n set: function (value) {\n // find out the touch-action by the event handlers\n if (value == TOUCH_ACTION_COMPUTE) {\n value = this.compute();\n }\n\n if (NATIVE_TOUCH_ACTION && this.manager.element.style && TOUCH_ACTION_MAP[value]) {\n this.manager.element.style[PREFIXED_TOUCH_ACTION] = value;\n }\n\n this.actions = value.toLowerCase().trim();\n },\n\n /**\n * just re-set the touchAction value\n */\n update: function () {\n this.set(this.manager.options.touchAction);\n },\n\n /**\n * compute the value for the touchAction property based on the recognizer's settings\n * @returns {String} value\n */\n compute: function () {\n var actions = [];\n each(this.manager.recognizers, function (recognizer) {\n if (boolOrFn(recognizer.options.enable, [recognizer])) {\n actions = actions.concat(recognizer.getTouchAction());\n }\n });\n return cleanTouchActions(actions.join(' '));\n },\n\n /**\n * this method is called on each input cycle and provides the preventing of the browser behavior\n * @param {Object} input\n */\n preventDefaults: function (input) {\n var srcEvent = input.srcEvent;\n var direction = input.offsetDirection; // if the touch action did prevented once this session\n\n if (this.manager.session.prevented) {\n srcEvent.preventDefault();\n return;\n }\n\n var actions = this.actions;\n var hasNone = inStr(actions, TOUCH_ACTION_NONE) && !TOUCH_ACTION_MAP[TOUCH_ACTION_NONE];\n var hasPanY = inStr(actions, TOUCH_ACTION_PAN_Y) && !TOUCH_ACTION_MAP[TOUCH_ACTION_PAN_Y];\n var hasPanX = inStr(actions, TOUCH_ACTION_PAN_X) && !TOUCH_ACTION_MAP[TOUCH_ACTION_PAN_X];\n\n if (hasNone) {\n //do not prevent defaults if this is a tap gesture\n var isTapPointer = input.pointers.length === 1;\n var isTapMovement = input.distance < 2;\n var isTapTouchTime = input.deltaTime < 250;\n\n if (isTapPointer && isTapMovement && isTapTouchTime) {\n return;\n }\n }\n\n if (hasPanX && hasPanY) {\n // `pan-x pan-y` means browser handles all scrolling/panning, do not prevent\n return;\n }\n\n if (hasNone || hasPanY && direction & DIRECTION_HORIZONTAL || hasPanX && direction & DIRECTION_VERTICAL) {\n return this.preventSrc(srcEvent);\n }\n },\n\n /**\n * call preventDefault to prevent the browser's default behavior (scrolling in most cases)\n * @param {Object} srcEvent\n */\n preventSrc: function (srcEvent) {\n this.manager.session.prevented = true;\n srcEvent.preventDefault();\n }\n };\n /**\n * when the touchActions are collected they are not a valid value, so we need to clean things up. *\n * @param {String} actions\n * @returns {*}\n */\n\n function cleanTouchActions(actions) {\n // none\n if (inStr(actions, TOUCH_ACTION_NONE)) {\n return TOUCH_ACTION_NONE;\n }\n\n var hasPanX = inStr(actions, TOUCH_ACTION_PAN_X);\n var hasPanY = inStr(actions, TOUCH_ACTION_PAN_Y); // if both pan-x and pan-y are set (different recognizers\n // for different directions, e.g. horizontal pan but vertical swipe?)\n // we need none (as otherwise with pan-x pan-y combined none of these\n // recognizers will work, since the browser would handle all panning\n\n if (hasPanX && hasPanY) {\n return TOUCH_ACTION_NONE;\n } // pan-x OR pan-y\n\n\n if (hasPanX || hasPanY) {\n return hasPanX ? TOUCH_ACTION_PAN_X : TOUCH_ACTION_PAN_Y;\n } // manipulation\n\n\n if (inStr(actions, TOUCH_ACTION_MANIPULATION)) {\n return TOUCH_ACTION_MANIPULATION;\n }\n\n return TOUCH_ACTION_AUTO;\n }\n\n function getTouchActionProps() {\n if (!NATIVE_TOUCH_ACTION) {\n return false;\n }\n\n var touchMap = {};\n var cssSupports = window.CSS && window.CSS.supports;\n ['auto', 'manipulation', 'pan-y', 'pan-x', 'pan-x pan-y', 'none'].forEach(function (val) {\n // If css.supports is not supported but there is native touch-action assume it supports\n // all values. This is the case for IE 10 and 11.\n touchMap[val] = cssSupports ? window.CSS.supports('touch-action', val) : true;\n });\n return touchMap;\n }\n /**\n * Recognizer flow explained; *\n * All recognizers have the initial state of POSSIBLE when a input session starts.\n * The definition of a input session is from the first input until the last input, with all it's movement in it. *\n * Example session for mouse-input: mousedown -> mousemove -> mouseup\n *\n * On each recognizing cycle (see Manager.recognize) the .recognize() method is executed\n * which determines with state it should be.\n *\n * If the recognizer has the state FAILED, CANCELLED or RECOGNIZED (equals ENDED), it is reset to\n * POSSIBLE to give it another change on the next cycle.\n *\n * Possible\n * |\n * +-----+---------------+\n * | |\n * +-----+-----+ |\n * | | |\n * Failed Cancelled |\n * +-------+------+\n * | |\n * Recognized Began\n * |\n * Changed\n * |\n * Ended/Recognized\n */\n\n\n var STATE_POSSIBLE = 1;\n var STATE_BEGAN = 2;\n var STATE_CHANGED = 4;\n var STATE_ENDED = 8;\n var STATE_RECOGNIZED = STATE_ENDED;\n var STATE_CANCELLED = 16;\n var STATE_FAILED = 32;\n /**\n * Recognizer\n * Every recognizer needs to extend from this class.\n * @constructor\n * @param {Object} options\n */\n\n function Recognizer(options) {\n this.options = assign({}, this.defaults, options || {});\n this.id = uniqueId();\n this.manager = null; // default is enable true\n\n this.options.enable = ifUndefined(this.options.enable, true);\n this.state = STATE_POSSIBLE;\n this.simultaneous = {};\n this.requireFail = [];\n }\n\n Recognizer.prototype = {\n /**\n * @virtual\n * @type {Object}\n */\n defaults: {},\n\n /**\n * set options\n * @param {Object} options\n * @return {Recognizer}\n */\n set: function (options) {\n assign(this.options, options); // also update the touchAction, in case something changed about the directions/enabled state\n\n this.manager && this.manager.touchAction.update();\n return this;\n },\n\n /**\n * recognize simultaneous with an other recognizer.\n * @param {Recognizer} otherRecognizer\n * @returns {Recognizer} this\n */\n recognizeWith: function (otherRecognizer) {\n if (invokeArrayArg(otherRecognizer, 'recognizeWith', this)) {\n return this;\n }\n\n var simultaneous = this.simultaneous;\n otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this);\n\n if (!simultaneous[otherRecognizer.id]) {\n simultaneous[otherRecognizer.id] = otherRecognizer;\n otherRecognizer.recognizeWith(this);\n }\n\n return this;\n },\n\n /**\n * drop the simultaneous link. it doesnt remove the link on the other recognizer.\n * @param {Recognizer} otherRecognizer\n * @returns {Recognizer} this\n */\n dropRecognizeWith: function (otherRecognizer) {\n if (invokeArrayArg(otherRecognizer, 'dropRecognizeWith', this)) {\n return this;\n }\n\n otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this);\n delete this.simultaneous[otherRecognizer.id];\n return this;\n },\n\n /**\n * recognizer can only run when an other is failing\n * @param {Recognizer} otherRecognizer\n * @returns {Recognizer} this\n */\n requireFailure: function (otherRecognizer) {\n if (invokeArrayArg(otherRecognizer, 'requireFailure', this)) {\n return this;\n }\n\n var requireFail = this.requireFail;\n otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this);\n\n if (inArray(requireFail, otherRecognizer) === -1) {\n requireFail.push(otherRecognizer);\n otherRecognizer.requireFailure(this);\n }\n\n return this;\n },\n\n /**\n * drop the requireFailure link. it does not remove the link on the other recognizer.\n * @param {Recognizer} otherRecognizer\n * @returns {Recognizer} this\n */\n dropRequireFailure: function (otherRecognizer) {\n if (invokeArrayArg(otherRecognizer, 'dropRequireFailure', this)) {\n return this;\n }\n\n otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this);\n var index = inArray(this.requireFail, otherRecognizer);\n\n if (index > -1) {\n this.requireFail.splice(index, 1);\n }\n\n return this;\n },\n\n /**\n * has require failures boolean\n * @returns {boolean}\n */\n hasRequireFailures: function () {\n return this.requireFail.length > 0;\n },\n\n /**\n * if the recognizer can recognize simultaneous with an other recognizer\n * @param {Recognizer} otherRecognizer\n * @returns {Boolean}\n */\n canRecognizeWith: function (otherRecognizer) {\n return !!this.simultaneous[otherRecognizer.id];\n },\n\n /**\n * You should use `tryEmit` instead of `emit` directly to check\n * that all the needed recognizers has failed before emitting.\n * @param {Object} input\n */\n emit: function (input) {\n var self = this;\n var state = this.state;\n\n function emit(event) {\n self.manager.emit(event, input);\n } // 'panstart' and 'panmove'\n\n\n if (state < STATE_ENDED) {\n emit(self.options.event + stateStr(state));\n }\n\n emit(self.options.event); // simple 'eventName' events\n\n if (input.additionalEvent) {\n // additional event(panleft, panright, pinchin, pinchout...)\n emit(input.additionalEvent);\n } // panend and pancancel\n\n\n if (state >= STATE_ENDED) {\n emit(self.options.event + stateStr(state));\n }\n },\n\n /**\n * Check that all the require failure recognizers has failed,\n * if true, it emits a gesture event,\n * otherwise, setup the state to FAILED.\n * @param {Object} input\n */\n tryEmit: function (input) {\n if (this.canEmit()) {\n return this.emit(input);\n } // it's failing anyway\n\n\n this.state = STATE_FAILED;\n },\n\n /**\n * can we emit?\n * @returns {boolean}\n */\n canEmit: function () {\n var i = 0;\n\n while (i < this.requireFail.length) {\n if (!(this.requireFail[i].state & (STATE_FAILED | STATE_POSSIBLE))) {\n return false;\n }\n\n i++;\n }\n\n return true;\n },\n\n /**\n * update the recognizer\n * @param {Object} inputData\n */\n recognize: function (inputData) {\n // make a new copy of the inputData\n // so we can change the inputData without messing up the other recognizers\n var inputDataClone = assign({}, inputData); // is is enabled and allow recognizing?\n\n if (!boolOrFn(this.options.enable, [this, inputDataClone])) {\n this.reset();\n this.state = STATE_FAILED;\n return;\n } // reset when we've reached the end\n\n\n if (this.state & (STATE_RECOGNIZED | STATE_CANCELLED | STATE_FAILED)) {\n this.state = STATE_POSSIBLE;\n }\n\n this.state = this.process(inputDataClone); // the recognizer has recognized a gesture\n // so trigger an event\n\n if (this.state & (STATE_BEGAN | STATE_CHANGED | STATE_ENDED | STATE_CANCELLED)) {\n this.tryEmit(inputDataClone);\n }\n },\n\n /**\n * return the state of the recognizer\n * the actual recognizing happens in this method\n * @virtual\n * @param {Object} inputData\n * @returns {Const} STATE\n */\n process: function (inputData) {},\n // jshint ignore:line\n\n /**\n * return the preferred touch-action\n * @virtual\n * @returns {Array}\n */\n getTouchAction: function () {},\n\n /**\n * called when the gesture isn't allowed to recognize\n * like when another is being recognized or it is disabled\n * @virtual\n */\n reset: function () {}\n };\n /**\n * get a usable string, used as event postfix\n * @param {Const} state\n * @returns {String} state\n */\n\n function stateStr(state) {\n if (state & STATE_CANCELLED) {\n return 'cancel';\n } else if (state & STATE_ENDED) {\n return 'end';\n } else if (state & STATE_CHANGED) {\n return 'move';\n } else if (state & STATE_BEGAN) {\n return 'start';\n }\n\n return '';\n }\n /**\n * direction cons to string\n * @param {Const} direction\n * @returns {String}\n */\n\n\n function directionStr(direction) {\n if (direction == DIRECTION_DOWN) {\n return 'down';\n } else if (direction == DIRECTION_UP) {\n return 'up';\n } else if (direction == DIRECTION_LEFT) {\n return 'left';\n } else if (direction == DIRECTION_RIGHT) {\n return 'right';\n }\n\n return '';\n }\n /**\n * get a recognizer by name if it is bound to a manager\n * @param {Recognizer|String} otherRecognizer\n * @param {Recognizer} recognizer\n * @returns {Recognizer}\n */\n\n\n function getRecognizerByNameIfManager(otherRecognizer, recognizer) {\n var manager = recognizer.manager;\n\n if (manager) {\n return manager.get(otherRecognizer);\n }\n\n return otherRecognizer;\n }\n /**\n * This recognizer is just used as a base for the simple attribute recognizers.\n * @constructor\n * @extends Recognizer\n */\n\n\n function AttrRecognizer() {\n Recognizer.apply(this, arguments);\n }\n\n inherit(AttrRecognizer, Recognizer, {\n /**\n * @namespace\n * @memberof AttrRecognizer\n */\n defaults: {\n /**\n * @type {Number}\n * @default 1\n */\n pointers: 1\n },\n\n /**\n * Used to check if it the recognizer receives valid input, like input.distance > 10.\n * @memberof AttrRecognizer\n * @param {Object} input\n * @returns {Boolean} recognized\n */\n attrTest: function (input) {\n var optionPointers = this.options.pointers;\n return optionPointers === 0 || input.pointers.length === optionPointers;\n },\n\n /**\n * Process the input and return the state for the recognizer\n * @memberof AttrRecognizer\n * @param {Object} input\n * @returns {*} State\n */\n process: function (input) {\n var state = this.state;\n var eventType = input.eventType;\n var isRecognized = state & (STATE_BEGAN | STATE_CHANGED);\n var isValid = this.attrTest(input); // on cancel input and we've recognized before, return STATE_CANCELLED\n\n if (isRecognized && (eventType & INPUT_CANCEL || !isValid)) {\n return state | STATE_CANCELLED;\n } else if (isRecognized || isValid) {\n if (eventType & INPUT_END) {\n return state | STATE_ENDED;\n } else if (!(state & STATE_BEGAN)) {\n return STATE_BEGAN;\n }\n\n return state | STATE_CHANGED;\n }\n\n return STATE_FAILED;\n }\n });\n /**\n * Pan\n * Recognized when the pointer is down and moved in the allowed direction.\n * @constructor\n * @extends AttrRecognizer\n */\n\n function PanRecognizer() {\n AttrRecognizer.apply(this, arguments);\n this.pX = null;\n this.pY = null;\n }\n\n inherit(PanRecognizer, AttrRecognizer, {\n /**\n * @namespace\n * @memberof PanRecognizer\n */\n defaults: {\n event: 'pan',\n threshold: 10,\n pointers: 1,\n direction: DIRECTION_ALL\n },\n getTouchAction: function () {\n var direction = this.options.direction;\n var actions = [];\n\n if (direction & DIRECTION_HORIZONTAL) {\n actions.push(TOUCH_ACTION_PAN_Y);\n }\n\n if (direction & DIRECTION_VERTICAL) {\n actions.push(TOUCH_ACTION_PAN_X);\n }\n\n return actions;\n },\n directionTest: function (input) {\n var options = this.options;\n var hasMoved = true;\n var distance = input.distance;\n var direction = input.direction;\n var x = input.deltaX;\n var y = input.deltaY; // lock to axis?\n\n if (!(direction & options.direction)) {\n if (options.direction & DIRECTION_HORIZONTAL) {\n direction = x === 0 ? DIRECTION_NONE : x < 0 ? DIRECTION_LEFT : DIRECTION_RIGHT;\n hasMoved = x != this.pX;\n distance = Math.abs(input.deltaX);\n } else {\n direction = y === 0 ? DIRECTION_NONE : y < 0 ? DIRECTION_UP : DIRECTION_DOWN;\n hasMoved = y != this.pY;\n distance = Math.abs(input.deltaY);\n }\n }\n\n input.direction = direction;\n return hasMoved && distance > options.threshold && direction & options.direction;\n },\n attrTest: function (input) {\n return AttrRecognizer.prototype.attrTest.call(this, input) && (this.state & STATE_BEGAN || !(this.state & STATE_BEGAN) && this.directionTest(input));\n },\n emit: function (input) {\n this.pX = input.deltaX;\n this.pY = input.deltaY;\n var direction = directionStr(input.direction);\n\n if (direction) {\n input.additionalEvent = this.options.event + direction;\n }\n\n this._super.emit.call(this, input);\n }\n });\n /**\n * Pinch\n * Recognized when two or more pointers are moving toward (zoom-in) or away from each other (zoom-out).\n * @constructor\n * @extends AttrRecognizer\n */\n\n function PinchRecognizer() {\n AttrRecognizer.apply(this, arguments);\n }\n\n inherit(PinchRecognizer, AttrRecognizer, {\n /**\n * @namespace\n * @memberof PinchRecognizer\n */\n defaults: {\n event: 'pinch',\n threshold: 0,\n pointers: 2\n },\n getTouchAction: function () {\n return [TOUCH_ACTION_NONE];\n },\n attrTest: function (input) {\n return this._super.attrTest.call(this, input) && (Math.abs(input.scale - 1) > this.options.threshold || this.state & STATE_BEGAN);\n },\n emit: function (input) {\n if (input.scale !== 1) {\n var inOut = input.scale < 1 ? 'in' : 'out';\n input.additionalEvent = this.options.event + inOut;\n }\n\n this._super.emit.call(this, input);\n }\n });\n /**\n * Press\n * Recognized when the pointer is down for x ms without any movement.\n * @constructor\n * @extends Recognizer\n */\n\n function PressRecognizer() {\n Recognizer.apply(this, arguments);\n this._timer = null;\n this._input = null;\n }\n\n inherit(PressRecognizer, Recognizer, {\n /**\n * @namespace\n * @memberof PressRecognizer\n */\n defaults: {\n event: 'press',\n pointers: 1,\n time: 251,\n // minimal time of the pointer to be pressed\n threshold: 9 // a minimal movement is ok, but keep it low\n\n },\n getTouchAction: function () {\n return [TOUCH_ACTION_AUTO];\n },\n process: function (input) {\n var options = this.options;\n var validPointers = input.pointers.length === options.pointers;\n var validMovement = input.distance < options.threshold;\n var validTime = input.deltaTime > options.time;\n this._input = input; // we only allow little movement\n // and we've reached an end event, so a tap is possible\n\n if (!validMovement || !validPointers || input.eventType & (INPUT_END | INPUT_CANCEL) && !validTime) {\n this.reset();\n } else if (input.eventType & INPUT_START) {\n this.reset();\n this._timer = setTimeoutContext(function () {\n this.state = STATE_RECOGNIZED;\n this.tryEmit();\n }, options.time, this);\n } else if (input.eventType & INPUT_END) {\n return STATE_RECOGNIZED;\n }\n\n return STATE_FAILED;\n },\n reset: function () {\n clearTimeout(this._timer);\n },\n emit: function (input) {\n if (this.state !== STATE_RECOGNIZED) {\n return;\n }\n\n if (input && input.eventType & INPUT_END) {\n this.manager.emit(this.options.event + 'up', input);\n } else {\n this._input.timeStamp = now();\n this.manager.emit(this.options.event, this._input);\n }\n }\n });\n /**\n * Rotate\n * Recognized when two or more pointer are moving in a circular motion.\n * @constructor\n * @extends AttrRecognizer\n */\n\n function RotateRecognizer() {\n AttrRecognizer.apply(this, arguments);\n }\n\n inherit(RotateRecognizer, AttrRecognizer, {\n /**\n * @namespace\n * @memberof RotateRecognizer\n */\n defaults: {\n event: 'rotate',\n threshold: 0,\n pointers: 2\n },\n getTouchAction: function () {\n return [TOUCH_ACTION_NONE];\n },\n attrTest: function (input) {\n return this._super.attrTest.call(this, input) && (Math.abs(input.rotation) > this.options.threshold || this.state & STATE_BEGAN);\n }\n });\n /**\n * Swipe\n * Recognized when the pointer is moving fast (velocity), with enough distance in the allowed direction.\n * @constructor\n * @extends AttrRecognizer\n */\n\n function SwipeRecognizer() {\n AttrRecognizer.apply(this, arguments);\n }\n\n inherit(SwipeRecognizer, AttrRecognizer, {\n /**\n * @namespace\n * @memberof SwipeRecognizer\n */\n defaults: {\n event: 'swipe',\n threshold: 10,\n velocity: 0.3,\n direction: DIRECTION_HORIZONTAL | DIRECTION_VERTICAL,\n pointers: 1\n },\n getTouchAction: function () {\n return PanRecognizer.prototype.getTouchAction.call(this);\n },\n attrTest: function (input) {\n var direction = this.options.direction;\n var velocity;\n\n if (direction & (DIRECTION_HORIZONTAL | DIRECTION_VERTICAL)) {\n velocity = input.overallVelocity;\n } else if (direction & DIRECTION_HORIZONTAL) {\n velocity = input.overallVelocityX;\n } else if (direction & DIRECTION_VERTICAL) {\n velocity = input.overallVelocityY;\n }\n\n return this._super.attrTest.call(this, input) && direction & input.offsetDirection && input.distance > this.options.threshold && input.maxPointers == this.options.pointers && abs(velocity) > this.options.velocity && input.eventType & INPUT_END;\n },\n emit: function (input) {\n var direction = directionStr(input.offsetDirection);\n\n if (direction) {\n this.manager.emit(this.options.event + direction, input);\n }\n\n this.manager.emit(this.options.event, input);\n }\n });\n /**\n * A tap is ecognized when the pointer is doing a small tap/click. Multiple taps are recognized if they occur\n * between the given interval and position. The delay option can be used to recognize multi-taps without firing\n * a single tap.\n *\n * The eventData from the emitted event contains the property `tapCount`, which contains the amount of\n * multi-taps being recognized.\n * @constructor\n * @extends Recognizer\n */\n\n function TapRecognizer() {\n Recognizer.apply(this, arguments); // previous time and center,\n // used for tap counting\n\n this.pTime = false;\n this.pCenter = false;\n this._timer = null;\n this._input = null;\n this.count = 0;\n }\n\n inherit(TapRecognizer, Recognizer, {\n /**\n * @namespace\n * @memberof PinchRecognizer\n */\n defaults: {\n event: 'tap',\n pointers: 1,\n taps: 1,\n interval: 300,\n // max time between the multi-tap taps\n time: 250,\n // max time of the pointer to be down (like finger on the screen)\n threshold: 9,\n // a minimal movement is ok, but keep it low\n posThreshold: 10 // a multi-tap can be a bit off the initial position\n\n },\n getTouchAction: function () {\n return [TOUCH_ACTION_MANIPULATION];\n },\n process: function (input) {\n var options = this.options;\n var validPointers = input.pointers.length === options.pointers;\n var validMovement = input.distance < options.threshold;\n var validTouchTime = input.deltaTime < options.time;\n this.reset();\n\n if (input.eventType & INPUT_START && this.count === 0) {\n return this.failTimeout();\n } // we only allow little movement\n // and we've reached an end event, so a tap is possible\n\n\n if (validMovement && validTouchTime && validPointers) {\n if (input.eventType != INPUT_END) {\n return this.failTimeout();\n }\n\n var validInterval = this.pTime ? input.timeStamp - this.pTime < options.interval : true;\n var validMultiTap = !this.pCenter || getDistance(this.pCenter, input.center) < options.posThreshold;\n this.pTime = input.timeStamp;\n this.pCenter = input.center;\n\n if (!validMultiTap || !validInterval) {\n this.count = 1;\n } else {\n this.count += 1;\n }\n\n this._input = input; // if tap count matches we have recognized it,\n // else it has began recognizing...\n\n var tapCount = this.count % options.taps;\n\n if (tapCount === 0) {\n // no failing requirements, immediately trigger the tap event\n // or wait as long as the multitap interval to trigger\n if (!this.hasRequireFailures()) {\n return STATE_RECOGNIZED;\n } else {\n this._timer = setTimeoutContext(function () {\n this.state = STATE_RECOGNIZED;\n this.tryEmit();\n }, options.interval, this);\n return STATE_BEGAN;\n }\n }\n }\n\n return STATE_FAILED;\n },\n failTimeout: function () {\n this._timer = setTimeoutContext(function () {\n this.state = STATE_FAILED;\n }, this.options.interval, this);\n return STATE_FAILED;\n },\n reset: function () {\n clearTimeout(this._timer);\n },\n emit: function () {\n if (this.state == STATE_RECOGNIZED) {\n this._input.tapCount = this.count;\n this.manager.emit(this.options.event, this._input);\n }\n }\n });\n /**\n * Simple way to create a manager with a default set of recognizers.\n * @param {HTMLElement} element\n * @param {Object} [options]\n * @constructor\n */\n\n function Hammer(element, options) {\n options = options || {};\n options.recognizers = ifUndefined(options.recognizers, Hammer.defaults.preset);\n return new Manager(element, options);\n }\n /**\n * @const {string}\n */\n\n\n Hammer.VERSION = '2.0.7';\n /**\n * default settings\n * @namespace\n */\n\n Hammer.defaults = {\n /**\n * set if DOM events are being triggered.\n * But this is slower and unused by simple implementations, so disabled by default.\n * @type {Boolean}\n * @default false\n */\n domEvents: false,\n\n /**\n * The value for the touchAction property/fallback.\n * When set to `compute` it will magically set the correct value based on the added recognizers.\n * @type {String}\n * @default compute\n */\n touchAction: TOUCH_ACTION_COMPUTE,\n\n /**\n * @type {Boolean}\n * @default true\n */\n enable: true,\n\n /**\n * EXPERIMENTAL FEATURE -- can be removed/changed\n * Change the parent input target element.\n * If Null, then it is being set the to main element.\n * @type {Null|EventTarget}\n * @default null\n */\n inputTarget: null,\n\n /**\n * force an input class\n * @type {Null|Function}\n * @default null\n */\n inputClass: null,\n\n /**\n * Default recognizer setup when calling `Hammer()`\n * When creating a new Manager these will be skipped.\n * @type {Array}\n */\n preset: [// RecognizerClass, options, [recognizeWith, ...], [requireFailure, ...]\n [RotateRecognizer, {\n enable: false\n }], [PinchRecognizer, {\n enable: false\n }, ['rotate']], [SwipeRecognizer, {\n direction: DIRECTION_HORIZONTAL\n }], [PanRecognizer, {\n direction: DIRECTION_HORIZONTAL\n }, ['swipe']], [TapRecognizer], [TapRecognizer, {\n event: 'doubletap',\n taps: 2\n }, ['tap']], [PressRecognizer]],\n\n /**\n * Some CSS properties can be used to improve the working of Hammer.\n * Add them to this method and they will be set when creating a new Manager.\n * @namespace\n */\n cssProps: {\n /**\n * Disables text selection to improve the dragging gesture. Mainly for desktop browsers.\n * @type {String}\n * @default 'none'\n */\n userSelect: 'none',\n\n /**\n * Disable the Windows Phone grippers when pressing an element.\n * @type {String}\n * @default 'none'\n */\n touchSelect: 'none',\n\n /**\n * Disables the default callout shown when you touch and hold a touch target.\n * On iOS, when you touch and hold a touch target such as a link, Safari displays\n * a callout containing information about the link. This property allows you to disable that callout.\n * @type {String}\n * @default 'none'\n */\n touchCallout: 'none',\n\n /**\n * Specifies whether zooming is enabled. Used by IE10>\n * @type {String}\n * @default 'none'\n */\n contentZooming: 'none',\n\n /**\n * Specifies that an entire element should be draggable instead of its contents. Mainly for desktop browsers.\n * @type {String}\n * @default 'none'\n */\n userDrag: 'none',\n\n /**\n * Overrides the highlight color shown when the user taps a link or a JavaScript\n * clickable element in iOS. This property obeys the alpha value, if specified.\n * @type {String}\n * @default 'rgba(0,0,0,0)'\n */\n tapHighlightColor: 'rgba(0,0,0,0)'\n }\n };\n var STOP = 1;\n var FORCED_STOP = 2;\n /**\n * Manager\n * @param {HTMLElement} element\n * @param {Object} [options]\n * @constructor\n */\n\n function Manager(element, options) {\n this.options = assign({}, Hammer.defaults, options || {});\n this.options.inputTarget = this.options.inputTarget || element;\n this.handlers = {};\n this.session = {};\n this.recognizers = [];\n this.oldCssProps = {};\n this.element = element;\n this.input = createInputInstance(this);\n this.touchAction = new TouchAction(this, this.options.touchAction);\n toggleCssProps(this, true);\n each(this.options.recognizers, function (item) {\n var recognizer = this.add(new item[0](item[1]));\n item[2] && recognizer.recognizeWith(item[2]);\n item[3] && recognizer.requireFailure(item[3]);\n }, this);\n }\n\n Manager.prototype = {\n /**\n * set options\n * @param {Object} options\n * @returns {Manager}\n */\n set: function (options) {\n assign(this.options, options); // Options that need a little more setup\n\n if (options.touchAction) {\n this.touchAction.update();\n }\n\n if (options.inputTarget) {\n // Clean up existing event listeners and reinitialize\n this.input.destroy();\n this.input.target = options.inputTarget;\n this.input.init();\n }\n\n return this;\n },\n\n /**\n * stop recognizing for this session.\n * This session will be discarded, when a new [input]start event is fired.\n * When forced, the recognizer cycle is stopped immediately.\n * @param {Boolean} [force]\n */\n stop: function (force) {\n this.session.stopped = force ? FORCED_STOP : STOP;\n },\n\n /**\n * run the recognizers!\n * called by the inputHandler function on every movement of the pointers (touches)\n * it walks through all the recognizers and tries to detect the gesture that is being made\n * @param {Object} inputData\n */\n recognize: function (inputData) {\n var session = this.session;\n\n if (session.stopped) {\n return;\n } // run the touch-action polyfill\n\n\n this.touchAction.preventDefaults(inputData);\n var recognizer;\n var recognizers = this.recognizers; // this holds the recognizer that is being recognized.\n // so the recognizer's state needs to be BEGAN, CHANGED, ENDED or RECOGNIZED\n // if no recognizer is detecting a thing, it is set to `null`\n\n var curRecognizer = session.curRecognizer; // reset when the last recognizer is recognized\n // or when we're in a new session\n\n if (!curRecognizer || curRecognizer && curRecognizer.state & STATE_RECOGNIZED) {\n curRecognizer = session.curRecognizer = null;\n }\n\n var i = 0;\n\n while (i < recognizers.length) {\n recognizer = recognizers[i]; // find out if we are allowed try to recognize the input for this one.\n // 1. allow if the session is NOT forced stopped (see the .stop() method)\n // 2. allow if we still haven't recognized a gesture in this session, or the this recognizer is the one\n // that is being recognized.\n // 3. allow if the recognizer is allowed to run simultaneous with the current recognized recognizer.\n // this can be setup with the `recognizeWith()` method on the recognizer.\n\n if (session.stopped !== FORCED_STOP && ( // 1\n !curRecognizer || recognizer == curRecognizer || // 2\n recognizer.canRecognizeWith(curRecognizer))) {\n // 3\n recognizer.recognize(inputData);\n } else {\n recognizer.reset();\n } // if the recognizer has been recognizing the input as a valid gesture, we want to store this one as the\n // current active recognizer. but only if we don't already have an active recognizer\n\n\n if (!curRecognizer && recognizer.state & (STATE_BEGAN | STATE_CHANGED | STATE_ENDED)) {\n curRecognizer = session.curRecognizer = recognizer;\n }\n\n i++;\n }\n },\n\n /**\n * get a recognizer by its event name.\n * @param {Recognizer|String} recognizer\n * @returns {Recognizer|Null}\n */\n get: function (recognizer) {\n if (recognizer instanceof Recognizer) {\n return recognizer;\n }\n\n var recognizers = this.recognizers;\n\n for (var i = 0; i < recognizers.length; i++) {\n if (recognizers[i].options.event == recognizer) {\n return recognizers[i];\n }\n }\n\n return null;\n },\n\n /**\n * add a recognizer to the manager\n * existing recognizers with the same event name will be removed\n * @param {Recognizer} recognizer\n * @returns {Recognizer|Manager}\n */\n add: function (recognizer) {\n if (invokeArrayArg(recognizer, 'add', this)) {\n return this;\n } // remove existing\n\n\n var existing = this.get(recognizer.options.event);\n\n if (existing) {\n this.remove(existing);\n }\n\n this.recognizers.push(recognizer);\n recognizer.manager = this;\n this.touchAction.update();\n return recognizer;\n },\n\n /**\n * remove a recognizer by name or instance\n * @param {Recognizer|String} recognizer\n * @returns {Manager}\n */\n remove: function (recognizer) {\n if (invokeArrayArg(recognizer, 'remove', this)) {\n return this;\n }\n\n recognizer = this.get(recognizer); // let's make sure this recognizer exists\n\n if (recognizer) {\n var recognizers = this.recognizers;\n var index = inArray(recognizers, recognizer);\n\n if (index !== -1) {\n recognizers.splice(index, 1);\n this.touchAction.update();\n }\n }\n\n return this;\n },\n\n /**\n * bind event\n * @param {String} events\n * @param {Function} handler\n * @returns {EventEmitter} this\n */\n on: function (events, handler) {\n if (events === undefined) {\n return;\n }\n\n if (handler === undefined) {\n return;\n }\n\n var handlers = this.handlers;\n each(splitStr(events), function (event) {\n handlers[event] = handlers[event] || [];\n handlers[event].push(handler);\n });\n return this;\n },\n\n /**\n * unbind event, leave emit blank to remove all handlers\n * @param {String} events\n * @param {Function} [handler]\n * @returns {EventEmitter} this\n */\n off: function (events, handler) {\n if (events === undefined) {\n return;\n }\n\n var handlers = this.handlers;\n each(splitStr(events), function (event) {\n if (!handler) {\n delete handlers[event];\n } else {\n handlers[event] && handlers[event].splice(inArray(handlers[event], handler), 1);\n }\n });\n return this;\n },\n\n /**\n * emit event to the listeners\n * @param {String} event\n * @param {Object} data\n */\n emit: function (event, data) {\n // we also want to trigger dom events\n if (this.options.domEvents) {\n triggerDomEvent(event, data);\n } // no handlers, so skip it all\n\n\n var handlers = this.handlers[event] && this.handlers[event].slice();\n\n if (!handlers || !handlers.length) {\n return;\n }\n\n data.type = event;\n\n data.preventDefault = function () {\n data.srcEvent.preventDefault();\n };\n\n var i = 0;\n\n while (i < handlers.length) {\n handlers[i](data);\n i++;\n }\n },\n\n /**\n * destroy the manager and unbinds all events\n * it doesn't unbind dom events, that is the user own responsibility\n */\n destroy: function () {\n this.element && toggleCssProps(this, false);\n this.handlers = {};\n this.session = {};\n this.input.destroy();\n this.element = null;\n }\n };\n /**\n * add/remove the css properties as defined in manager.options.cssProps\n * @param {Manager} manager\n * @param {Boolean} add\n */\n\n function toggleCssProps(manager, add) {\n var element = manager.element;\n\n if (!element.style) {\n return;\n }\n\n var prop;\n each(manager.options.cssProps, function (value, name) {\n prop = prefixed(element.style, name);\n\n if (add) {\n manager.oldCssProps[prop] = element.style[prop];\n element.style[prop] = value;\n } else {\n element.style[prop] = manager.oldCssProps[prop] || '';\n }\n });\n\n if (!add) {\n manager.oldCssProps = {};\n }\n }\n /**\n * trigger dom event\n * @param {String} event\n * @param {Object} data\n */\n\n\n function triggerDomEvent(event, data) {\n var gestureEvent = document.createEvent('Event');\n gestureEvent.initEvent(event, true, true);\n gestureEvent.gesture = data;\n data.target.dispatchEvent(gestureEvent);\n }\n\n assign(Hammer, {\n INPUT_START: INPUT_START,\n INPUT_MOVE: INPUT_MOVE,\n INPUT_END: INPUT_END,\n INPUT_CANCEL: INPUT_CANCEL,\n STATE_POSSIBLE: STATE_POSSIBLE,\n STATE_BEGAN: STATE_BEGAN,\n STATE_CHANGED: STATE_CHANGED,\n STATE_ENDED: STATE_ENDED,\n STATE_RECOGNIZED: STATE_RECOGNIZED,\n STATE_CANCELLED: STATE_CANCELLED,\n STATE_FAILED: STATE_FAILED,\n DIRECTION_NONE: DIRECTION_NONE,\n DIRECTION_LEFT: DIRECTION_LEFT,\n DIRECTION_RIGHT: DIRECTION_RIGHT,\n DIRECTION_UP: DIRECTION_UP,\n DIRECTION_DOWN: DIRECTION_DOWN,\n DIRECTION_HORIZONTAL: DIRECTION_HORIZONTAL,\n DIRECTION_VERTICAL: DIRECTION_VERTICAL,\n DIRECTION_ALL: DIRECTION_ALL,\n Manager: Manager,\n Input: Input,\n TouchAction: TouchAction,\n TouchInput: TouchInput,\n MouseInput: MouseInput,\n PointerEventInput: PointerEventInput,\n TouchMouseInput: TouchMouseInput,\n SingleTouchInput: SingleTouchInput,\n Recognizer: Recognizer,\n AttrRecognizer: AttrRecognizer,\n Tap: TapRecognizer,\n Pan: PanRecognizer,\n Swipe: SwipeRecognizer,\n Pinch: PinchRecognizer,\n Rotate: RotateRecognizer,\n Press: PressRecognizer,\n on: addEventListeners,\n off: removeEventListeners,\n each: each,\n merge: merge,\n extend: extend,\n assign: assign,\n inherit: inherit,\n bindFn: bindFn,\n prefixed: prefixed\n }); // this prevents errors when Hammer is loaded in the presence of an AMD\n // style loader but by script tag, not by the loader.\n\n var freeGlobal = typeof window !== 'undefined' ? window : typeof self !== 'undefined' ? self : {}; // jshint ignore:line\n\n freeGlobal.Hammer = Hammer;\n\n if (true) {\n !(__WEBPACK_AMD_DEFINE_RESULT__ = function () {\n return Hammer;\n }.call(exports, __webpack_require__, exports, module), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n } else if (typeof module != 'undefined' && module.exports) {\n module.exports = Hammer;\n } else {\n window[exportName] = Hammer;\n }\n })(window, document, 'Hammer');\n /***/\n\n },\n /* 115 */\n\n /***/\n function (module, exports, __webpack_require__) {\n var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;\n\n \"use strict\";\n /**\r\n * Created by Alex on 11/6/2014.\r\n */\n // https://github.com/umdjs/umd/blob/master/returnExports.js#L40-L60\n // if the module has no dependencies, the above pattern can be simplified to\n\n\n (function (root, factory) {\n if (true) {\n // AMD. Register as an anonymous module.\n !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_FACTORY__ = factory, __WEBPACK_AMD_DEFINE_RESULT__ = typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? __WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__) : __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n } else if (typeof exports === 'object') {\n // Node. Does not work with strict CommonJS, but\n // only CommonJS-like environments that support module.exports,\n // like Node.\n module.exports = factory();\n } else {\n // Browser globals (root is window)\n root.keycharm = factory();\n }\n })(this, function () {\n function keycharm(options) {\n var preventDefault = options && options.preventDefault || false;\n var container = options && options.container || window;\n var _exportFunctions = {};\n var _bound = {\n keydown: {},\n keyup: {}\n };\n var _keys = {};\n var i; // a - z\n\n for (i = 97; i <= 122; i++) {\n _keys[String.fromCharCode(i)] = {\n code: 65 + (i - 97),\n shift: false\n };\n } // A - Z\n\n\n for (i = 65; i <= 90; i++) {\n _keys[String.fromCharCode(i)] = {\n code: i,\n shift: true\n };\n } // 0 - 9\n\n\n for (i = 0; i <= 9; i++) {\n _keys['' + i] = {\n code: 48 + i,\n shift: false\n };\n } // F1 - F12\n\n\n for (i = 1; i <= 12; i++) {\n _keys['F' + i] = {\n code: 111 + i,\n shift: false\n };\n } // num0 - num9\n\n\n for (i = 0; i <= 9; i++) {\n _keys['num' + i] = {\n code: 96 + i,\n shift: false\n };\n } // numpad misc\n\n\n _keys['num*'] = {\n code: 106,\n shift: false\n };\n _keys['num+'] = {\n code: 107,\n shift: false\n };\n _keys['num-'] = {\n code: 109,\n shift: false\n };\n _keys['num/'] = {\n code: 111,\n shift: false\n };\n _keys['num.'] = {\n code: 110,\n shift: false\n }; // arrows\n\n _keys['left'] = {\n code: 37,\n shift: false\n };\n _keys['up'] = {\n code: 38,\n shift: false\n };\n _keys['right'] = {\n code: 39,\n shift: false\n };\n _keys['down'] = {\n code: 40,\n shift: false\n }; // extra keys\n\n _keys['space'] = {\n code: 32,\n shift: false\n };\n _keys['enter'] = {\n code: 13,\n shift: false\n };\n _keys['shift'] = {\n code: 16,\n shift: undefined\n };\n _keys['esc'] = {\n code: 27,\n shift: false\n };\n _keys['backspace'] = {\n code: 8,\n shift: false\n };\n _keys['tab'] = {\n code: 9,\n shift: false\n };\n _keys['ctrl'] = {\n code: 17,\n shift: false\n };\n _keys['alt'] = {\n code: 18,\n shift: false\n };\n _keys['delete'] = {\n code: 46,\n shift: false\n };\n _keys['pageup'] = {\n code: 33,\n shift: false\n };\n _keys['pagedown'] = {\n code: 34,\n shift: false\n }; // symbols\n\n _keys['='] = {\n code: 187,\n shift: false\n };\n _keys['-'] = {\n code: 189,\n shift: false\n };\n _keys[']'] = {\n code: 221,\n shift: false\n };\n _keys['['] = {\n code: 219,\n shift: false\n };\n\n var down = function (event) {\n handleEvent(event, 'keydown');\n };\n\n var up = function (event) {\n handleEvent(event, 'keyup');\n }; // handle the actualy bound key with the event\n\n\n var handleEvent = function (event, type) {\n if (_bound[type][event.keyCode] !== undefined) {\n var bound = _bound[type][event.keyCode];\n\n for (var i = 0; i < bound.length; i++) {\n if (bound[i].shift === undefined) {\n bound[i].fn(event);\n } else if (bound[i].shift == true && event.shiftKey == true) {\n bound[i].fn(event);\n } else if (bound[i].shift == false && event.shiftKey == false) {\n bound[i].fn(event);\n }\n }\n\n if (preventDefault == true) {\n event.preventDefault();\n }\n }\n }; // bind a key to a callback\n\n\n _exportFunctions.bind = function (key, callback, type) {\n if (type === undefined) {\n type = 'keydown';\n }\n\n if (_keys[key] === undefined) {\n throw new Error(\"unsupported key: \" + key);\n }\n\n if (_bound[type][_keys[key].code] === undefined) {\n _bound[type][_keys[key].code] = [];\n }\n\n _bound[type][_keys[key].code].push({\n fn: callback,\n shift: _keys[key].shift\n });\n }; // bind all keys to a call back (demo purposes)\n\n\n _exportFunctions.bindAll = function (callback, type) {\n if (type === undefined) {\n type = 'keydown';\n }\n\n for (var key in _keys) {\n if (_keys.hasOwnProperty(key)) {\n _exportFunctions.bind(key, callback, type);\n }\n }\n }; // get the key label from an event\n\n\n _exportFunctions.getKey = function (event) {\n for (var key in _keys) {\n if (_keys.hasOwnProperty(key)) {\n if (event.shiftKey == true && _keys[key].shift == true && event.keyCode == _keys[key].code) {\n return key;\n } else if (event.shiftKey == false && _keys[key].shift == false && event.keyCode == _keys[key].code) {\n return key;\n } else if (event.keyCode == _keys[key].code && key == 'shift') {\n return key;\n }\n }\n }\n\n return \"unknown key, currently not supported\";\n }; // unbind either a specific callback from a key or all of them (by leaving callback undefined)\n\n\n _exportFunctions.unbind = function (key, callback, type) {\n if (type === undefined) {\n type = 'keydown';\n }\n\n if (_keys[key] === undefined) {\n throw new Error(\"unsupported key: \" + key);\n }\n\n if (callback !== undefined) {\n var newBindings = [];\n var bound = _bound[type][_keys[key].code];\n\n if (bound !== undefined) {\n for (var i = 0; i < bound.length; i++) {\n if (!(bound[i].fn == callback && bound[i].shift == _keys[key].shift)) {\n newBindings.push(_bound[type][_keys[key].code][i]);\n }\n }\n }\n\n _bound[type][_keys[key].code] = newBindings;\n } else {\n _bound[type][_keys[key].code] = [];\n }\n }; // reset all bound variables.\n\n\n _exportFunctions.reset = function () {\n _bound = {\n keydown: {},\n keyup: {}\n };\n }; // unbind all listeners and reset all variables.\n\n\n _exportFunctions.destroy = function () {\n _bound = {\n keydown: {},\n keyup: {}\n };\n container.removeEventListener('keydown', down, true);\n container.removeEventListener('keyup', up, true);\n }; // create listeners.\n\n\n container.addEventListener('keydown', down, true);\n container.addEventListener('keyup', up, true); // return the public functions.\n\n return _exportFunctions;\n }\n\n return keycharm;\n });\n /***/\n\n },\n /* 116 */\n\n /***/\n function (module, exports, __webpack_require__) {\n 'use strict'; // utils\n\n exports.util = __webpack_require__(1);\n exports.DOMutil = __webpack_require__(88); // data\n\n exports.DataSet = __webpack_require__(89);\n exports.DataView = __webpack_require__(93);\n exports.Queue = __webpack_require__(92); // Timeline\n\n exports.Timeline = __webpack_require__(117);\n exports.Graph2d = __webpack_require__(148);\n exports.timeline = {\n Core: __webpack_require__(130),\n DateUtil: __webpack_require__(129),\n Range: __webpack_require__(127),\n stack: __webpack_require__(135),\n TimeStep: __webpack_require__(133),\n components: {\n items: {\n Item: __webpack_require__(137),\n BackgroundItem: __webpack_require__(141),\n BoxItem: __webpack_require__(139),\n PointItem: __webpack_require__(140),\n RangeItem: __webpack_require__(136)\n },\n BackgroundGroup: __webpack_require__(138),\n Component: __webpack_require__(128),\n CurrentTime: __webpack_require__(146),\n CustomTime: __webpack_require__(144),\n DataAxis: __webpack_require__(150),\n DataScale: __webpack_require__(151),\n GraphGroup: __webpack_require__(152),\n Group: __webpack_require__(134),\n ItemSet: __webpack_require__(131),\n Legend: __webpack_require__(156),\n LineGraph: __webpack_require__(149),\n TimeAxis: __webpack_require__(142)\n }\n }; // bundled external libraries\n\n exports.moment = __webpack_require__(82);\n exports.Hammer = __webpack_require__(112);\n exports.keycharm = __webpack_require__(115);\n /***/\n },\n /* 117 */\n\n /***/\n function (module, exports, __webpack_require__) {\n 'use strict';\n\n var _Configurator = __webpack_require__(118);\n\n var _Configurator2 = _interopRequireDefault(_Configurator);\n\n var _Validator = __webpack_require__(126);\n\n var _Validator2 = _interopRequireDefault(_Validator);\n\n function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n 'default': obj\n };\n }\n\n var Emitter = __webpack_require__(99);\n\n var Hammer = __webpack_require__(112);\n\n var moment = __webpack_require__(82);\n\n var util = __webpack_require__(1);\n\n var DataSet = __webpack_require__(89);\n\n var DataView = __webpack_require__(93);\n\n var Range = __webpack_require__(127);\n\n var Core = __webpack_require__(130);\n\n var TimeAxis = __webpack_require__(142);\n\n var CurrentTime = __webpack_require__(146);\n\n var CustomTime = __webpack_require__(144);\n\n var ItemSet = __webpack_require__(131);\n\n var printStyle = __webpack_require__(126).printStyle;\n\n var allOptions = __webpack_require__(147).allOptions;\n\n var configureOptions = __webpack_require__(147).configureOptions;\n /**\n * Create a timeline visualization\n * @param {HTMLElement} container\n * @param {vis.DataSet | vis.DataView | Array} [items]\n * @param {vis.DataSet | vis.DataView | Array} [groups]\n * @param {Object} [options] See Timeline.setOptions for the available options.\n * @constructor\n * @extends Core\n */\n\n\n function Timeline(container, items, groups, options) {\n if (!(this instanceof Timeline)) {\n throw new SyntaxError('Constructor must be called with the new operator');\n } // if the third element is options, the forth is groups (optionally);\n\n\n if (!(Array.isArray(groups) || groups instanceof DataSet || groups instanceof DataView) && groups instanceof Object) {\n var forthArgument = options;\n options = groups;\n groups = forthArgument;\n } // TODO: REMOVE THIS in the next MAJOR release\n // see https://github.com/almende/vis/issues/2511\n\n\n if (options && options.throttleRedraw) {\n console.warn(\"Timeline option \\\"throttleRedraw\\\" is DEPRICATED and no longer supported. It will be removed in the next MAJOR release.\");\n }\n\n var me = this;\n this.defaultOptions = {\n start: null,\n end: null,\n autoResize: true,\n orientation: {\n axis: 'bottom',\n // axis orientation: 'bottom', 'top', or 'both'\n item: 'bottom' // not relevant\n\n },\n moment: moment,\n width: null,\n height: null,\n maxHeight: null,\n minHeight: null\n };\n this.options = util.deepExtend({}, this.defaultOptions); // Create the DOM, props, and emitter\n\n this._create(container);\n\n if (!options || options && typeof options.rtl == \"undefined\") {\n var directionFromDom,\n domNode = this.dom.root;\n\n while (!directionFromDom && domNode) {\n directionFromDom = window.getComputedStyle(domNode, null).direction;\n domNode = domNode.parentElement;\n }\n\n this.options.rtl = directionFromDom && directionFromDom.toLowerCase() == \"rtl\";\n } else {\n this.options.rtl = options.rtl;\n }\n\n this.options.rollingMode = options && options.rollingMode; // all components listed here will be repainted automatically\n\n this.components = [];\n this.body = {\n dom: this.dom,\n domProps: this.props,\n emitter: {\n on: this.on.bind(this),\n off: this.off.bind(this),\n emit: this.emit.bind(this)\n },\n hiddenDates: [],\n util: {\n getScale: function getScale() {\n return me.timeAxis.step.scale;\n },\n getStep: function getStep() {\n return me.timeAxis.step.step;\n },\n toScreen: me._toScreen.bind(me),\n toGlobalScreen: me._toGlobalScreen.bind(me),\n // this refers to the root.width\n toTime: me._toTime.bind(me),\n toGlobalTime: me._toGlobalTime.bind(me)\n }\n }; // range\n\n this.range = new Range(this.body, this.options);\n this.components.push(this.range);\n this.body.range = this.range; // time axis\n\n this.timeAxis = new TimeAxis(this.body, this.options);\n this.timeAxis2 = null; // used in case of orientation option 'both'\n\n this.components.push(this.timeAxis); // current time bar\n\n this.currentTime = new CurrentTime(this.body, this.options);\n this.components.push(this.currentTime); // item set\n\n this.itemSet = new ItemSet(this.body, this.options);\n this.components.push(this.itemSet);\n this.itemsData = null; // DataSet\n\n this.groupsData = null; // DataSet\n\n this.dom.root.onclick = function (event) {\n me.emit('click', me.getEventProperties(event));\n };\n\n this.dom.root.ondblclick = function (event) {\n me.emit('doubleClick', me.getEventProperties(event));\n };\n\n this.dom.root.oncontextmenu = function (event) {\n me.emit('contextmenu', me.getEventProperties(event));\n };\n\n this.dom.root.onmouseover = function (event) {\n me.emit('mouseOver', me.getEventProperties(event));\n };\n\n this.dom.root.onmousemove = function (event) {\n me.emit('mouseMove', me.getEventProperties(event));\n }; //Single time autoscale/fit\n\n\n this.fitDone = false;\n this.on('changed', function () {\n if (this.itemsData == null || this.options.rollingMode) return;\n\n if (!me.fitDone) {\n me.fitDone = true;\n\n if (me.options.start != undefined || me.options.end != undefined) {\n if (me.options.start == undefined || me.options.end == undefined) {\n var range = me.getItemRange();\n }\n\n var start = me.options.start != undefined ? me.options.start : range.min;\n var end = me.options.end != undefined ? me.options.end : range.max;\n me.setWindow(start, end, {\n animation: false\n });\n } else {\n me.fit({\n animation: false\n });\n }\n }\n }); // apply options\n\n if (options) {\n this.setOptions(options);\n } // IMPORTANT: THIS HAPPENS BEFORE SET ITEMS!\n\n\n if (groups) {\n this.setGroups(groups);\n } // create itemset\n\n\n if (items) {\n this.setItems(items);\n } // draw for the first time\n\n\n this._redraw();\n } // Extend the functionality from Core\n\n\n Timeline.prototype = new Core();\n /**\n * Load a configurator\n * @return {Object}\n * @private\n */\n\n Timeline.prototype._createConfigurator = function () {\n return new _Configurator2['default'](this, this.dom.container, configureOptions);\n };\n /**\n * Force a redraw. The size of all items will be recalculated.\n * Can be useful to manually redraw when option autoResize=false and the window\n * has been resized, or when the items CSS has been changed.\n *\n * Note: this function will be overridden on construction with a trottled version\n */\n\n\n Timeline.prototype.redraw = function () {\n this.itemSet && this.itemSet.markDirty({\n refreshItems: true\n });\n\n this._redraw();\n };\n\n Timeline.prototype.setOptions = function (options) {\n // validate options\n var errorFound = _Validator2['default'].validate(options, allOptions);\n\n if (errorFound === true) {\n console.log('%cErrors have been found in the supplied options object.', printStyle);\n }\n\n Core.prototype.setOptions.call(this, options);\n\n if ('type' in options) {\n if (options.type !== this.options.type) {\n this.options.type = options.type; // force recreation of all items\n\n var itemsData = this.itemsData;\n\n if (itemsData) {\n var selection = this.getSelection();\n this.setItems(null); // remove all\n\n this.setItems(itemsData); // add all\n\n this.setSelection(selection); // restore selection\n }\n }\n }\n };\n /**\n * Set items\n * @param {vis.DataSet | Array | null} items\n */\n\n\n Timeline.prototype.setItems = function (items) {\n // convert to type DataSet when needed\n var newDataSet;\n\n if (!items) {\n newDataSet = null;\n } else if (items instanceof DataSet || items instanceof DataView) {\n newDataSet = items;\n } else {\n // turn an array into a dataset\n newDataSet = new DataSet(items, {\n type: {\n start: 'Date',\n end: 'Date'\n }\n });\n } // set items\n\n\n this.itemsData = newDataSet;\n this.itemSet && this.itemSet.setItems(newDataSet);\n };\n /**\n * Set groups\n * @param {vis.DataSet | Array} groups\n */\n\n\n Timeline.prototype.setGroups = function (groups) {\n // convert to type DataSet when needed\n var newDataSet;\n\n if (!groups) {\n newDataSet = null;\n } else {\n var filter = function filter(group) {\n return group.visible !== false;\n };\n\n if (groups instanceof DataSet || groups instanceof DataView) {\n newDataSet = new DataView(groups, {\n filter: filter\n });\n } else {\n // turn an array into a dataset\n newDataSet = new DataSet(groups.filter(filter));\n }\n }\n\n this.groupsData = newDataSet;\n this.itemSet.setGroups(newDataSet);\n };\n /**\n * Set both items and groups in one go\n * @param {{items: Array | vis.DataSet, groups: Array | vis.DataSet}} data\n */\n\n\n Timeline.prototype.setData = function (data) {\n if (data && data.groups) {\n this.setGroups(data.groups);\n }\n\n if (data && data.items) {\n this.setItems(data.items);\n }\n };\n /**\n * Set selected items by their id. Replaces the current selection\n * Unknown id's are silently ignored.\n * @param {string[] | string} [ids] An array with zero or more id's of the items to be\n * selected. If ids is an empty array, all items will be\n * unselected.\n * @param {Object} [options] Available options:\n * `focus: boolean`\n * If true, focus will be set to the selected item(s)\n * `animation: boolean | {duration: number, easingFunction: string}`\n * If true (default), the range is animated\n * smoothly to the new window. An object can be\n * provided to specify duration and easing function.\n * Default duration is 500 ms, and default easing\n * function is 'easeInOutQuad'.\n * Only applicable when option focus is true.\n */\n\n\n Timeline.prototype.setSelection = function (ids, options) {\n this.itemSet && this.itemSet.setSelection(ids);\n\n if (options && options.focus) {\n this.focus(ids, options);\n }\n };\n /**\n * Get the selected items by their id\n * @return {Array} ids The ids of the selected items\n */\n\n\n Timeline.prototype.getSelection = function () {\n return this.itemSet && this.itemSet.getSelection() || [];\n };\n /**\n * Adjust the visible window such that the selected item (or multiple items)\n * are centered on screen.\n * @param {String | String[]} id An item id or array with item ids\n * @param {Object} [options] Available options:\n * `animation: boolean | {duration: number, easingFunction: string}`\n * If true (default), the range is animated\n * smoothly to the new window. An object can be\n * provided to specify duration and easing function.\n * Default duration is 500 ms, and default easing\n * function is 'easeInOutQuad'.\n */\n\n\n Timeline.prototype.focus = function (id, options) {\n if (!this.itemsData || id == undefined) return;\n var ids = Array.isArray(id) ? id : [id]; // get the specified item(s)\n\n var itemsData = this.itemsData.getDataSet().get(ids, {\n type: {\n start: 'Date',\n end: 'Date'\n }\n }); // calculate minimum start and maximum end of specified items\n\n var start = null;\n var end = null;\n itemsData.forEach(function (itemData) {\n var s = itemData.start.valueOf();\n var e = 'end' in itemData ? itemData.end.valueOf() : itemData.start.valueOf();\n\n if (start === null || s < start) {\n start = s;\n }\n\n if (end === null || e > end) {\n end = e;\n }\n });\n\n if (start !== null && end !== null) {\n // calculate the new middle and interval for the window\n var middle = (start + end) / 2;\n var interval = Math.max(this.range.end - this.range.start, (end - start) * 1.1);\n var animation = options && options.animation !== undefined ? options.animation : true;\n this.range.setRange(middle - interval / 2, middle + interval / 2, animation);\n }\n };\n /**\n * Set Timeline window such that it fits all items\n * @param {Object} [options] Available options:\n * `animation: boolean | {duration: number, easingFunction: string}`\n * If true (default), the range is animated\n * smoothly to the new window. An object can be\n * provided to specify duration and easing function.\n * Default duration is 500 ms, and default easing\n * function is 'easeInOutQuad'.\n */\n\n\n Timeline.prototype.fit = function (options) {\n var animation = options && options.animation !== undefined ? options.animation : true;\n var range;\n var dataset = this.itemsData && this.itemsData.getDataSet();\n\n if (dataset.length === 1 && dataset.get()[0].end === undefined) {\n // a single item -> don't fit, just show a range around the item from -4 to +3 days\n range = this.getDataRange();\n this.moveTo(range.min.valueOf(), {\n animation: animation\n });\n } else {\n // exactly fit the items (plus a small margin)\n range = this.getItemRange();\n this.range.setRange(range.min, range.max, animation);\n }\n };\n /**\n * Determine the range of the items, taking into account their actual width\n * and a margin of 10 pixels on both sides.\n * @return {{min: Date | null, max: Date | null}}\n */\n\n\n Timeline.prototype.getItemRange = function () {\n // get a rough approximation for the range based on the items start and end dates\n var range = this.getDataRange();\n var min = range.min !== null ? range.min.valueOf() : null;\n var max = range.max !== null ? range.max.valueOf() : null;\n var minItem = null;\n var maxItem = null;\n\n if (min != null && max != null) {\n var getStart = function getStart(item) {\n return util.convert(item.data.start, 'Date').valueOf();\n };\n\n var getEnd = function getEnd(item) {\n var end = item.data.end != undefined ? item.data.end : item.data.start;\n return util.convert(end, 'Date').valueOf();\n }; // calculate the date of the left side and right side of the items given\n\n\n var interval = max - min; // ms\n\n if (interval <= 0) {\n interval = 10;\n }\n\n var factor = interval / this.props.center.width;\n util.forEach(this.itemSet.items, function (item) {\n if (item.groupShowing) {\n item.show();\n item.repositionX();\n }\n\n var start = getStart(item);\n var end = getEnd(item);\n\n if (this.options.rtl) {\n var startSide = start - (item.getWidthRight() + 10) * factor;\n var endSide = end + (item.getWidthLeft() + 10) * factor;\n } else {\n var startSide = start - (item.getWidthLeft() + 10) * factor;\n var endSide = end + (item.getWidthRight() + 10) * factor;\n }\n\n if (startSide < min) {\n min = startSide;\n minItem = item;\n }\n\n if (endSide > max) {\n max = endSide;\n maxItem = item;\n }\n }.bind(this));\n\n if (minItem && maxItem) {\n var lhs = minItem.getWidthLeft() + 10;\n var rhs = maxItem.getWidthRight() + 10;\n var delta = this.props.center.width - lhs - rhs; // px\n\n if (delta > 0) {\n if (this.options.rtl) {\n min = getStart(minItem) - rhs * interval / delta; // ms\n\n max = getEnd(maxItem) + lhs * interval / delta; // ms\n } else {\n min = getStart(minItem) - lhs * interval / delta; // ms\n\n max = getEnd(maxItem) + rhs * interval / delta; // ms\n }\n }\n }\n }\n\n return {\n min: min != null ? new Date(min) : null,\n max: max != null ? new Date(max) : null\n };\n };\n /**\n * Calculate the data range of the items start and end dates\n * @returns {{min: Date | null, max: Date | null}}\n */\n\n\n Timeline.prototype.getDataRange = function () {\n var min = null;\n var max = null;\n var dataset = this.itemsData && this.itemsData.getDataSet();\n\n if (dataset) {\n dataset.forEach(function (item) {\n var start = util.convert(item.start, 'Date').valueOf();\n var end = util.convert(item.end != undefined ? item.end : item.start, 'Date').valueOf();\n\n if (min === null || start < min) {\n min = start;\n }\n\n if (max === null || end > max) {\n max = end;\n }\n });\n }\n\n return {\n min: min != null ? new Date(min) : null,\n max: max != null ? new Date(max) : null\n };\n };\n /**\n * Generate Timeline related information from an event\n * @param {Event} event\n * @return {Object} An object with related information, like on which area\n * The event happened, whether clicked on an item, etc.\n */\n\n\n Timeline.prototype.getEventProperties = function (event) {\n var clientX = event.center ? event.center.x : event.clientX;\n var clientY = event.center ? event.center.y : event.clientY;\n\n if (this.options.rtl) {\n var x = util.getAbsoluteRight(this.dom.centerContainer) - clientX;\n } else {\n var x = clientX - util.getAbsoluteLeft(this.dom.centerContainer);\n }\n\n var y = clientY - util.getAbsoluteTop(this.dom.centerContainer);\n var item = this.itemSet.itemFromTarget(event);\n var group = this.itemSet.groupFromTarget(event);\n var customTime = CustomTime.customTimeFromTarget(event);\n var snap = this.itemSet.options.snap || null;\n var scale = this.body.util.getScale();\n var step = this.body.util.getStep();\n\n var time = this._toTime(x);\n\n var snappedTime = snap ? snap(time, scale, step) : time;\n var element = util.getTarget(event);\n var what = null;\n\n if (item != null) {\n what = 'item';\n } else if (customTime != null) {\n what = 'custom-time';\n } else if (util.hasParent(element, this.timeAxis.dom.foreground)) {\n what = 'axis';\n } else if (this.timeAxis2 && util.hasParent(element, this.timeAxis2.dom.foreground)) {\n what = 'axis';\n } else if (util.hasParent(element, this.itemSet.dom.labelSet)) {\n what = 'group-label';\n } else if (util.hasParent(element, this.currentTime.bar)) {\n what = 'current-time';\n } else if (util.hasParent(element, this.dom.center)) {\n what = 'background';\n }\n\n return {\n event: event,\n item: item ? item.id : null,\n group: group ? group.groupId : null,\n what: what,\n pageX: event.srcEvent ? event.srcEvent.pageX : event.pageX,\n pageY: event.srcEvent ? event.srcEvent.pageY : event.pageY,\n x: x,\n y: y,\n time: time,\n snappedTime: snappedTime\n };\n };\n /**\n * Toggle Timeline rolling mode\n */\n\n\n Timeline.prototype.toggleRollingMode = function () {\n if (this.range.rolling) {\n this.range.stopRolling();\n } else {\n if (this.options.rollingMode == undefined) {\n this.setOptions(this.options);\n }\n\n this.range.startRolling();\n }\n };\n\n module.exports = Timeline;\n /***/\n },\n /* 118 */\n\n /***/\n function (module, exports, __webpack_require__) {\n 'use strict';\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n\n var _stringify = __webpack_require__(90);\n\n var _stringify2 = _interopRequireDefault(_stringify);\n\n var _typeof2 = __webpack_require__(62);\n\n var _typeof3 = _interopRequireDefault(_typeof2);\n\n var _classCallCheck2 = __webpack_require__(119);\n\n var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\n var _createClass2 = __webpack_require__(120);\n\n var _createClass3 = _interopRequireDefault(_createClass2);\n\n var _ColorPicker = __webpack_require__(124);\n\n var _ColorPicker2 = _interopRequireDefault(_ColorPicker);\n\n function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n 'default': obj\n };\n }\n\n var util = __webpack_require__(1);\n /**\n * The way this works is for all properties of this.possible options, you can supply the property name in any form to list the options.\n * Boolean options are recognised as Boolean\n * Number options should be written as array: [default value, min value, max value, stepsize]\n * Colors should be written as array: ['color', '#ffffff']\n * Strings with should be written as array: [option1, option2, option3, ..]\n *\n * The options are matched with their counterparts in each of the modules and the values used in the configuration are\n *\n * @param parentModule | the location where parentModule.setOptions() can be called\n * @param defaultContainer | the default container of the module\n * @param configureOptions | the fully configured and predefined options set found in allOptions.js\n * @param pixelRatio | canvas pixel ratio\n */\n\n\n var Configurator = function () {\n function Configurator(parentModule, defaultContainer, configureOptions) {\n var pixelRatio = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 1;\n (0, _classCallCheck3['default'])(this, Configurator);\n this.parent = parentModule;\n this.changedOptions = [];\n this.container = defaultContainer;\n this.allowCreation = false;\n this.options = {};\n this.initialized = false;\n this.popupCounter = 0;\n this.defaultOptions = {\n enabled: false,\n filter: true,\n container: undefined,\n showButton: true\n };\n util.extend(this.options, this.defaultOptions);\n this.configureOptions = configureOptions;\n this.moduleOptions = {};\n this.domElements = [];\n this.popupDiv = {};\n this.popupLimit = 5;\n this.popupHistory = {};\n this.colorPicker = new _ColorPicker2['default'](pixelRatio);\n this.wrapper = undefined;\n }\n /**\n * refresh all options.\n * Because all modules parse their options by themselves, we just use their options. We copy them here.\n *\n * @param options\n */\n\n\n (0, _createClass3['default'])(Configurator, [{\n key: 'setOptions',\n value: function setOptions(options) {\n if (options !== undefined) {\n // reset the popup history because the indices may have been changed.\n this.popupHistory = {};\n\n this._removePopup();\n\n var enabled = true;\n\n if (typeof options === 'string') {\n this.options.filter = options;\n } else if (options instanceof Array) {\n this.options.filter = options.join();\n } else if ((typeof options === 'undefined' ? 'undefined' : (0, _typeof3['default'])(options)) === 'object') {\n if (options.container !== undefined) {\n this.options.container = options.container;\n }\n\n if (options.filter !== undefined) {\n this.options.filter = options.filter;\n }\n\n if (options.showButton !== undefined) {\n this.options.showButton = options.showButton;\n }\n\n if (options.enabled !== undefined) {\n enabled = options.enabled;\n }\n } else if (typeof options === 'boolean') {\n this.options.filter = true;\n enabled = options;\n } else if (typeof options === 'function') {\n this.options.filter = options;\n enabled = true;\n }\n\n if (this.options.filter === false) {\n enabled = false;\n }\n\n this.options.enabled = enabled;\n }\n\n this._clean();\n }\n }, {\n key: 'setModuleOptions',\n value: function setModuleOptions(moduleOptions) {\n this.moduleOptions = moduleOptions;\n\n if (this.options.enabled === true) {\n this._clean();\n\n if (this.options.container !== undefined) {\n this.container = this.options.container;\n }\n\n this._create();\n }\n }\n /**\n * Create all DOM elements\n * @private\n */\n\n }, {\n key: '_create',\n value: function _create() {\n var _this = this;\n\n this._clean();\n\n this.changedOptions = [];\n var filter = this.options.filter;\n var counter = 0;\n var show = false;\n\n for (var option in this.configureOptions) {\n if (this.configureOptions.hasOwnProperty(option)) {\n this.allowCreation = false;\n show = false;\n\n if (typeof filter === 'function') {\n show = filter(option, []);\n show = show || this._handleObject(this.configureOptions[option], [option], true);\n } else if (filter === true || filter.indexOf(option) !== -1) {\n show = true;\n }\n\n if (show !== false) {\n this.allowCreation = true; // linebreak between categories\n\n if (counter > 0) {\n this._makeItem([]);\n } // a header for the category\n\n\n this._makeHeader(option); // get the sub options\n\n\n this._handleObject(this.configureOptions[option], [option]);\n }\n\n counter++;\n }\n }\n\n if (this.options.showButton === true) {\n var generateButton = document.createElement('div');\n generateButton.className = 'vis-configuration vis-config-button';\n generateButton.innerHTML = 'generate options';\n\n generateButton.onclick = function () {\n _this._printOptions();\n };\n\n generateButton.onmouseover = function () {\n generateButton.className = 'vis-configuration vis-config-button hover';\n };\n\n generateButton.onmouseout = function () {\n generateButton.className = 'vis-configuration vis-config-button';\n };\n\n this.optionsContainer = document.createElement('div');\n this.optionsContainer.className = 'vis-configuration vis-config-option-container';\n this.domElements.push(this.optionsContainer);\n this.domElements.push(generateButton);\n }\n\n this._push(); //~ this.colorPicker.insertTo(this.container);\n\n }\n /**\n * draw all DOM elements on the screen\n * @private\n */\n\n }, {\n key: '_push',\n value: function _push() {\n this.wrapper = document.createElement('div');\n this.wrapper.className = 'vis-configuration-wrapper';\n this.container.appendChild(this.wrapper);\n\n for (var i = 0; i < this.domElements.length; i++) {\n this.wrapper.appendChild(this.domElements[i]);\n }\n\n this._showPopupIfNeeded();\n }\n /**\n * delete all DOM elements\n * @private\n */\n\n }, {\n key: '_clean',\n value: function _clean() {\n for (var i = 0; i < this.domElements.length; i++) {\n this.wrapper.removeChild(this.domElements[i]);\n }\n\n if (this.wrapper !== undefined) {\n this.container.removeChild(this.wrapper);\n this.wrapper = undefined;\n }\n\n this.domElements = [];\n\n this._removePopup();\n }\n /**\n * get the value from the actualOptions if it exists\n * @param {array} path | where to look for the actual option\n * @returns {*}\n * @private\n */\n\n }, {\n key: '_getValue',\n value: function _getValue(path) {\n var base = this.moduleOptions;\n\n for (var i = 0; i < path.length; i++) {\n if (base[path[i]] !== undefined) {\n base = base[path[i]];\n } else {\n base = undefined;\n break;\n }\n }\n\n return base;\n }\n /**\n * all option elements are wrapped in an item\n * @param path\n * @param domElements\n * @private\n */\n\n }, {\n key: '_makeItem',\n value: function _makeItem(path) {\n if (this.allowCreation === true) {\n var item = document.createElement('div');\n item.className = 'vis-configuration vis-config-item vis-config-s' + path.length;\n\n for (var _len = arguments.length, domElements = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n domElements[_key - 1] = arguments[_key];\n }\n\n domElements.forEach(function (element) {\n item.appendChild(element);\n });\n this.domElements.push(item);\n return this.domElements.length;\n }\n\n return 0;\n }\n /**\n * header for major subjects\n * @param name\n * @private\n */\n\n }, {\n key: '_makeHeader',\n value: function _makeHeader(name) {\n var div = document.createElement('div');\n div.className = 'vis-configuration vis-config-header';\n div.innerHTML = name;\n\n this._makeItem([], div);\n }\n /**\n * make a label, if it is an object label, it gets different styling.\n * @param name\n * @param path\n * @param objectLabel\n * @returns {HTMLElement}\n * @private\n */\n\n }, {\n key: '_makeLabel',\n value: function _makeLabel(name, path) {\n var objectLabel = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n var div = document.createElement('div');\n div.className = 'vis-configuration vis-config-label vis-config-s' + path.length;\n\n if (objectLabel === true) {\n div.innerHTML = '' + name + ':';\n } else {\n div.innerHTML = name + ':';\n }\n\n return div;\n }\n /**\n * make a dropdown list for multiple possible string optoins\n * @param arr\n * @param value\n * @param path\n * @private\n */\n\n }, {\n key: '_makeDropdown',\n value: function _makeDropdown(arr, value, path) {\n var select = document.createElement('select');\n select.className = 'vis-configuration vis-config-select';\n var selectedValue = 0;\n\n if (value !== undefined) {\n if (arr.indexOf(value) !== -1) {\n selectedValue = arr.indexOf(value);\n }\n }\n\n for (var i = 0; i < arr.length; i++) {\n var option = document.createElement('option');\n option.value = arr[i];\n\n if (i === selectedValue) {\n option.selected = 'selected';\n }\n\n option.innerHTML = arr[i];\n select.appendChild(option);\n }\n\n var me = this;\n\n select.onchange = function () {\n me._update(this.value, path);\n };\n\n var label = this._makeLabel(path[path.length - 1], path);\n\n this._makeItem(path, label, select);\n }\n /**\n * make a range object for numeric options\n * @param arr\n * @param value\n * @param path\n * @private\n */\n\n }, {\n key: '_makeRange',\n value: function _makeRange(arr, value, path) {\n var defaultValue = arr[0];\n var min = arr[1];\n var max = arr[2];\n var step = arr[3];\n var range = document.createElement('input');\n range.className = 'vis-configuration vis-config-range';\n\n try {\n range.type = 'range'; // not supported on IE9\n\n range.min = min;\n range.max = max;\n } catch (err) {}\n\n range.step = step; // set up the popup settings in case they are needed.\n\n var popupString = '';\n var popupValue = 0;\n\n if (value !== undefined) {\n var factor = 1.20;\n\n if (value < 0 && value * factor < min) {\n range.min = Math.ceil(value * factor);\n popupValue = range.min;\n popupString = 'range increased';\n } else if (value / factor < min) {\n range.min = Math.ceil(value / factor);\n popupValue = range.min;\n popupString = 'range increased';\n }\n\n if (value * factor > max && max !== 1) {\n range.max = Math.ceil(value * factor);\n popupValue = range.max;\n popupString = 'range increased';\n }\n\n range.value = value;\n } else {\n range.value = defaultValue;\n }\n\n var input = document.createElement('input');\n input.className = 'vis-configuration vis-config-rangeinput';\n input.value = range.value;\n var me = this;\n\n range.onchange = function () {\n input.value = this.value;\n\n me._update(Number(this.value), path);\n };\n\n range.oninput = function () {\n input.value = this.value;\n };\n\n var label = this._makeLabel(path[path.length - 1], path);\n\n var itemIndex = this._makeItem(path, label, range, input); // if a popup is needed AND it has not been shown for this value, show it.\n\n\n if (popupString !== '' && this.popupHistory[itemIndex] !== popupValue) {\n this.popupHistory[itemIndex] = popupValue;\n\n this._setupPopup(popupString, itemIndex);\n }\n }\n /**\n * prepare the popup\n * @param string\n * @param index\n * @private\n */\n\n }, {\n key: '_setupPopup',\n value: function _setupPopup(string, index) {\n var _this2 = this;\n\n if (this.initialized === true && this.allowCreation === true && this.popupCounter < this.popupLimit) {\n var div = document.createElement(\"div\");\n div.id = \"vis-configuration-popup\";\n div.className = \"vis-configuration-popup\";\n div.innerHTML = string;\n\n div.onclick = function () {\n _this2._removePopup();\n };\n\n this.popupCounter += 1;\n this.popupDiv = {\n html: div,\n index: index\n };\n }\n }\n /**\n * remove the popup from the dom\n * @private\n */\n\n }, {\n key: '_removePopup',\n value: function _removePopup() {\n if (this.popupDiv.html !== undefined) {\n this.popupDiv.html.parentNode.removeChild(this.popupDiv.html);\n clearTimeout(this.popupDiv.hideTimeout);\n clearTimeout(this.popupDiv.deleteTimeout);\n this.popupDiv = {};\n }\n }\n /**\n * Show the popup if it is needed.\n * @private\n */\n\n }, {\n key: '_showPopupIfNeeded',\n value: function _showPopupIfNeeded() {\n var _this3 = this;\n\n if (this.popupDiv.html !== undefined) {\n var correspondingElement = this.domElements[this.popupDiv.index];\n var rect = correspondingElement.getBoundingClientRect();\n this.popupDiv.html.style.left = rect.left + \"px\";\n this.popupDiv.html.style.top = rect.top - 30 + \"px\"; // 30 is the height;\n\n document.body.appendChild(this.popupDiv.html);\n this.popupDiv.hideTimeout = setTimeout(function () {\n _this3.popupDiv.html.style.opacity = 0;\n }, 1500);\n this.popupDiv.deleteTimeout = setTimeout(function () {\n _this3._removePopup();\n }, 1800);\n }\n }\n /**\n * make a checkbox for boolean options.\n * @param defaultValue\n * @param value\n * @param path\n * @private\n */\n\n }, {\n key: '_makeCheckbox',\n value: function _makeCheckbox(defaultValue, value, path) {\n var checkbox = document.createElement('input');\n checkbox.type = 'checkbox';\n checkbox.className = 'vis-configuration vis-config-checkbox';\n checkbox.checked = defaultValue;\n\n if (value !== undefined) {\n checkbox.checked = value;\n\n if (value !== defaultValue) {\n if ((typeof defaultValue === 'undefined' ? 'undefined' : (0, _typeof3['default'])(defaultValue)) === 'object') {\n if (value !== defaultValue.enabled) {\n this.changedOptions.push({\n path: path,\n value: value\n });\n }\n } else {\n this.changedOptions.push({\n path: path,\n value: value\n });\n }\n }\n }\n\n var me = this;\n\n checkbox.onchange = function () {\n me._update(this.checked, path);\n };\n\n var label = this._makeLabel(path[path.length - 1], path);\n\n this._makeItem(path, label, checkbox);\n }\n /**\n * make a text input field for string options.\n * @param defaultValue\n * @param value\n * @param path\n * @private\n */\n\n }, {\n key: '_makeTextInput',\n value: function _makeTextInput(defaultValue, value, path) {\n var checkbox = document.createElement('input');\n checkbox.type = 'text';\n checkbox.className = 'vis-configuration vis-config-text';\n checkbox.value = value;\n\n if (value !== defaultValue) {\n this.changedOptions.push({\n path: path,\n value: value\n });\n }\n\n var me = this;\n\n checkbox.onchange = function () {\n me._update(this.value, path);\n };\n\n var label = this._makeLabel(path[path.length - 1], path);\n\n this._makeItem(path, label, checkbox);\n }\n /**\n * make a color field with a color picker for color fields\n * @param arr\n * @param value\n * @param path\n * @private\n */\n\n }, {\n key: '_makeColorField',\n value: function _makeColorField(arr, value, path) {\n var _this4 = this;\n\n var defaultColor = arr[1];\n var div = document.createElement('div');\n value = value === undefined ? defaultColor : value;\n\n if (value !== 'none') {\n div.className = 'vis-configuration vis-config-colorBlock';\n div.style.backgroundColor = value;\n } else {\n div.className = 'vis-configuration vis-config-colorBlock none';\n }\n\n value = value === undefined ? defaultColor : value;\n\n div.onclick = function () {\n _this4._showColorPicker(value, div, path);\n };\n\n var label = this._makeLabel(path[path.length - 1], path);\n\n this._makeItem(path, label, div);\n }\n /**\n * used by the color buttons to call the color picker.\n * @param event\n * @param value\n * @param div\n * @param path\n * @private\n */\n\n }, {\n key: '_showColorPicker',\n value: function _showColorPicker(value, div, path) {\n var _this5 = this; // clear the callback from this div\n\n\n div.onclick = function () {};\n\n this.colorPicker.insertTo(div);\n this.colorPicker.show();\n this.colorPicker.setColor(value);\n this.colorPicker.setUpdateCallback(function (color) {\n var colorString = 'rgba(' + color.r + ',' + color.g + ',' + color.b + ',' + color.a + ')';\n div.style.backgroundColor = colorString;\n\n _this5._update(colorString, path);\n }); // on close of the colorpicker, restore the callback.\n\n this.colorPicker.setCloseCallback(function () {\n div.onclick = function () {\n _this5._showColorPicker(value, div, path);\n };\n });\n }\n /**\n * parse an object and draw the correct items\n * @param obj\n * @param path\n * @private\n */\n\n }, {\n key: '_handleObject',\n value: function _handleObject(obj) {\n var path = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n var checkOnly = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n var show = false;\n var filter = this.options.filter;\n var visibleInSet = false;\n\n for (var subObj in obj) {\n if (obj.hasOwnProperty(subObj)) {\n show = true;\n var item = obj[subObj];\n var newPath = util.copyAndExtendArray(path, subObj);\n\n if (typeof filter === 'function') {\n show = filter(subObj, path); // if needed we must go deeper into the object.\n\n if (show === false) {\n if (!(item instanceof Array) && typeof item !== 'string' && typeof item !== 'boolean' && item instanceof Object) {\n this.allowCreation = false;\n show = this._handleObject(item, newPath, true);\n this.allowCreation = checkOnly === false;\n }\n }\n }\n\n if (show !== false) {\n visibleInSet = true;\n\n var value = this._getValue(newPath);\n\n if (item instanceof Array) {\n this._handleArray(item, value, newPath);\n } else if (typeof item === 'string') {\n this._makeTextInput(item, value, newPath);\n } else if (typeof item === 'boolean') {\n this._makeCheckbox(item, value, newPath);\n } else if (item instanceof Object) {\n // collapse the physics options that are not enabled\n var draw = true;\n\n if (path.indexOf('physics') !== -1) {\n if (this.moduleOptions.physics.solver !== subObj) {\n draw = false;\n }\n }\n\n if (draw === true) {\n // initially collapse options with an disabled enabled option.\n if (item.enabled !== undefined) {\n var enabledPath = util.copyAndExtendArray(newPath, 'enabled');\n\n var enabledValue = this._getValue(enabledPath);\n\n if (enabledValue === true) {\n var label = this._makeLabel(subObj, newPath, true);\n\n this._makeItem(newPath, label);\n\n visibleInSet = this._handleObject(item, newPath) || visibleInSet;\n } else {\n this._makeCheckbox(item, enabledValue, newPath);\n }\n } else {\n var _label = this._makeLabel(subObj, newPath, true);\n\n this._makeItem(newPath, _label);\n\n visibleInSet = this._handleObject(item, newPath) || visibleInSet;\n }\n }\n } else {\n console.error('dont know how to handle', item, subObj, newPath);\n }\n }\n }\n }\n\n return visibleInSet;\n }\n /**\n * handle the array type of option\n * @param optionName\n * @param arr\n * @param value\n * @param path\n * @private\n */\n\n }, {\n key: '_handleArray',\n value: function _handleArray(arr, value, path) {\n if (typeof arr[0] === 'string' && arr[0] === 'color') {\n this._makeColorField(arr, value, path);\n\n if (arr[1] !== value) {\n this.changedOptions.push({\n path: path,\n value: value\n });\n }\n } else if (typeof arr[0] === 'string') {\n this._makeDropdown(arr, value, path);\n\n if (arr[0] !== value) {\n this.changedOptions.push({\n path: path,\n value: value\n });\n }\n } else if (typeof arr[0] === 'number') {\n this._makeRange(arr, value, path);\n\n if (arr[0] !== value) {\n this.changedOptions.push({\n path: path,\n value: Number(value)\n });\n }\n }\n }\n /**\n * called to update the network with the new settings.\n * @param value\n * @param path\n * @private\n */\n\n }, {\n key: '_update',\n value: function _update(value, path) {\n var options = this._constructOptions(value, path);\n\n if (this.parent.body && this.parent.body.emitter && this.parent.body.emitter.emit) {\n this.parent.body.emitter.emit(\"configChange\", options);\n }\n\n this.initialized = true;\n this.parent.setOptions(options);\n }\n }, {\n key: '_constructOptions',\n value: function _constructOptions(value, path) {\n var optionsObj = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n var pointer = optionsObj; // when dropdown boxes can be string or boolean, we typecast it into correct types\n\n value = value === 'true' ? true : value;\n value = value === 'false' ? false : value;\n\n for (var i = 0; i < path.length; i++) {\n if (path[i] !== 'global') {\n if (pointer[path[i]] === undefined) {\n pointer[path[i]] = {};\n }\n\n if (i !== path.length - 1) {\n pointer = pointer[path[i]];\n } else {\n pointer[path[i]] = value;\n }\n }\n }\n\n return optionsObj;\n }\n }, {\n key: '_printOptions',\n value: function _printOptions() {\n var options = this.getOptions();\n this.optionsContainer.innerHTML = '
var options = ' + (0, _stringify2['default'])(options, null, 2) + '
';\n }\n }, {\n key: 'getOptions',\n value: function getOptions() {\n var options = {};\n\n for (var i = 0; i < this.changedOptions.length; i++) {\n this._constructOptions(this.changedOptions[i].value, this.changedOptions[i].path, options);\n }\n\n return options;\n }\n }]);\n return Configurator;\n }();\n\n exports['default'] = Configurator;\n /***/\n },\n /* 119 */\n\n /***/\n function (module, exports) {\n \"use strict\";\n\n exports.__esModule = true;\n\n exports.default = function (instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n };\n /***/\n\n },\n /* 120 */\n\n /***/\n function (module, exports, __webpack_require__) {\n \"use strict\";\n\n exports.__esModule = true;\n\n var _defineProperty = __webpack_require__(121);\n\n var _defineProperty2 = _interopRequireDefault(_defineProperty);\n\n function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n default: obj\n };\n }\n\n exports.default = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n (0, _defineProperty2.default)(target, descriptor.key, descriptor);\n }\n }\n\n return function (Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps);\n if (staticProps) defineProperties(Constructor, staticProps);\n return Constructor;\n };\n }();\n /***/\n\n },\n /* 121 */\n\n /***/\n function (module, exports, __webpack_require__) {\n module.exports = {\n \"default\": __webpack_require__(122),\n __esModule: true\n };\n /***/\n },\n /* 122 */\n\n /***/\n function (module, exports, __webpack_require__) {\n __webpack_require__(123);\n\n var $Object = __webpack_require__(17).Object;\n\n module.exports = function defineProperty(it, key, desc) {\n return $Object.defineProperty(it, key, desc);\n };\n /***/\n\n },\n /* 123 */\n\n /***/\n function (module, exports, __webpack_require__) {\n var $export = __webpack_require__(15); // 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes)\n\n\n $export($export.S + $export.F * !__webpack_require__(25), 'Object', {\n defineProperty: __webpack_require__(21).f\n });\n /***/\n },\n /* 124 */\n\n /***/\n function (module, exports, __webpack_require__) {\n 'use strict';\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n\n var _stringify = __webpack_require__(90);\n\n var _stringify2 = _interopRequireDefault(_stringify);\n\n var _classCallCheck2 = __webpack_require__(119);\n\n var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\n var _createClass2 = __webpack_require__(120);\n\n var _createClass3 = _interopRequireDefault(_createClass2);\n\n function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n 'default': obj\n };\n }\n\n var Hammer = __webpack_require__(112);\n\n var hammerUtil = __webpack_require__(125);\n\n var util = __webpack_require__(1);\n\n var ColorPicker = function () {\n function ColorPicker() {\n var pixelRatio = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1;\n (0, _classCallCheck3['default'])(this, ColorPicker);\n this.pixelRatio = pixelRatio;\n this.generated = false;\n this.centerCoordinates = {\n x: 289 / 2,\n y: 289 / 2\n };\n this.r = 289 * 0.49;\n this.color = {\n r: 255,\n g: 255,\n b: 255,\n a: 1.0\n };\n this.hueCircle = undefined;\n this.initialColor = {\n r: 255,\n g: 255,\n b: 255,\n a: 1.0\n };\n this.previousColor = undefined;\n this.applied = false; // bound by\n\n this.updateCallback = function () {};\n\n this.closeCallback = function () {}; // create all DOM elements\n\n\n this._create();\n }\n /**\n * this inserts the colorPicker into a div from the DOM\n * @param container\n */\n\n\n (0, _createClass3['default'])(ColorPicker, [{\n key: 'insertTo',\n value: function insertTo(container) {\n if (this.hammer !== undefined) {\n this.hammer.destroy();\n this.hammer = undefined;\n }\n\n this.container = container;\n this.container.appendChild(this.frame);\n\n this._bindHammer();\n\n this._setSize();\n }\n /**\n * the callback is executed on apply and save. Bind it to the application\n * @param callback\n */\n\n }, {\n key: 'setUpdateCallback',\n value: function setUpdateCallback(callback) {\n if (typeof callback === 'function') {\n this.updateCallback = callback;\n } else {\n throw new Error(\"Function attempted to set as colorPicker update callback is not a function.\");\n }\n }\n /**\n * the callback is executed on apply and save. Bind it to the application\n * @param callback\n */\n\n }, {\n key: 'setCloseCallback',\n value: function setCloseCallback(callback) {\n if (typeof callback === 'function') {\n this.closeCallback = callback;\n } else {\n throw new Error(\"Function attempted to set as colorPicker closing callback is not a function.\");\n }\n }\n }, {\n key: '_isColorString',\n value: function _isColorString(color) {\n var htmlColors = {\n black: '#000000',\n navy: '#000080',\n darkblue: '#00008B',\n mediumblue: '#0000CD',\n blue: '#0000FF',\n darkgreen: '#006400',\n green: '#008000',\n teal: '#008080',\n darkcyan: '#008B8B',\n deepskyblue: '#00BFFF',\n darkturquoise: '#00CED1',\n mediumspringgreen: '#00FA9A',\n lime: '#00FF00',\n springgreen: '#00FF7F',\n aqua: '#00FFFF',\n cyan: '#00FFFF',\n midnightblue: '#191970',\n dodgerblue: '#1E90FF',\n lightseagreen: '#20B2AA',\n forestgreen: '#228B22',\n seagreen: '#2E8B57',\n darkslategray: '#2F4F4F',\n limegreen: '#32CD32',\n mediumseagreen: '#3CB371',\n turquoise: '#40E0D0',\n royalblue: '#4169E1',\n steelblue: '#4682B4',\n darkslateblue: '#483D8B',\n mediumturquoise: '#48D1CC',\n indigo: '#4B0082',\n darkolivegreen: '#556B2F',\n cadetblue: '#5F9EA0',\n cornflowerblue: '#6495ED',\n mediumaquamarine: '#66CDAA',\n dimgray: '#696969',\n slateblue: '#6A5ACD',\n olivedrab: '#6B8E23',\n slategray: '#708090',\n lightslategray: '#778899',\n mediumslateblue: '#7B68EE',\n lawngreen: '#7CFC00',\n chartreuse: '#7FFF00',\n aquamarine: '#7FFFD4',\n maroon: '#800000',\n purple: '#800080',\n olive: '#808000',\n gray: '#808080',\n skyblue: '#87CEEB',\n lightskyblue: '#87CEFA',\n blueviolet: '#8A2BE2',\n darkred: '#8B0000',\n darkmagenta: '#8B008B',\n saddlebrown: '#8B4513',\n darkseagreen: '#8FBC8F',\n lightgreen: '#90EE90',\n mediumpurple: '#9370D8',\n darkviolet: '#9400D3',\n palegreen: '#98FB98',\n darkorchid: '#9932CC',\n yellowgreen: '#9ACD32',\n sienna: '#A0522D',\n brown: '#A52A2A',\n darkgray: '#A9A9A9',\n lightblue: '#ADD8E6',\n greenyellow: '#ADFF2F',\n paleturquoise: '#AFEEEE',\n lightsteelblue: '#B0C4DE',\n powderblue: '#B0E0E6',\n firebrick: '#B22222',\n darkgoldenrod: '#B8860B',\n mediumorchid: '#BA55D3',\n rosybrown: '#BC8F8F',\n darkkhaki: '#BDB76B',\n silver: '#C0C0C0',\n mediumvioletred: '#C71585',\n indianred: '#CD5C5C',\n peru: '#CD853F',\n chocolate: '#D2691E',\n tan: '#D2B48C',\n lightgrey: '#D3D3D3',\n palevioletred: '#D87093',\n thistle: '#D8BFD8',\n orchid: '#DA70D6',\n goldenrod: '#DAA520',\n crimson: '#DC143C',\n gainsboro: '#DCDCDC',\n plum: '#DDA0DD',\n burlywood: '#DEB887',\n lightcyan: '#E0FFFF',\n lavender: '#E6E6FA',\n darksalmon: '#E9967A',\n violet: '#EE82EE',\n palegoldenrod: '#EEE8AA',\n lightcoral: '#F08080',\n khaki: '#F0E68C',\n aliceblue: '#F0F8FF',\n honeydew: '#F0FFF0',\n azure: '#F0FFFF',\n sandybrown: '#F4A460',\n wheat: '#F5DEB3',\n beige: '#F5F5DC',\n whitesmoke: '#F5F5F5',\n mintcream: '#F5FFFA',\n ghostwhite: '#F8F8FF',\n salmon: '#FA8072',\n antiquewhite: '#FAEBD7',\n linen: '#FAF0E6',\n lightgoldenrodyellow: '#FAFAD2',\n oldlace: '#FDF5E6',\n red: '#FF0000',\n fuchsia: '#FF00FF',\n magenta: '#FF00FF',\n deeppink: '#FF1493',\n orangered: '#FF4500',\n tomato: '#FF6347',\n hotpink: '#FF69B4',\n coral: '#FF7F50',\n darkorange: '#FF8C00',\n lightsalmon: '#FFA07A',\n orange: '#FFA500',\n lightpink: '#FFB6C1',\n pink: '#FFC0CB',\n gold: '#FFD700',\n peachpuff: '#FFDAB9',\n navajowhite: '#FFDEAD',\n moccasin: '#FFE4B5',\n bisque: '#FFE4C4',\n mistyrose: '#FFE4E1',\n blanchedalmond: '#FFEBCD',\n papayawhip: '#FFEFD5',\n lavenderblush: '#FFF0F5',\n seashell: '#FFF5EE',\n cornsilk: '#FFF8DC',\n lemonchiffon: '#FFFACD',\n floralwhite: '#FFFAF0',\n snow: '#FFFAFA',\n yellow: '#FFFF00',\n lightyellow: '#FFFFE0',\n ivory: '#FFFFF0',\n white: '#FFFFFF'\n };\n\n if (typeof color === 'string') {\n return htmlColors[color];\n }\n }\n /**\n * Set the color of the colorPicker\n * Supported formats:\n * 'red' --> HTML color string\n * '#ffffff' --> hex string\n * 'rbg(255,255,255)' --> rgb string\n * 'rgba(255,255,255,1.0)' --> rgba string\n * {r:255,g:255,b:255} --> rgb object\n * {r:255,g:255,b:255,a:1.0} --> rgba object\n * @param color\n * @param setInitial\n */\n\n }, {\n key: 'setColor',\n value: function setColor(color) {\n var setInitial = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n\n if (color === 'none') {\n return;\n }\n\n var rgba = void 0; // if a html color shorthand is used, convert to hex\n\n var htmlColor = this._isColorString(color);\n\n if (htmlColor !== undefined) {\n color = htmlColor;\n } // check format\n\n\n if (util.isString(color) === true) {\n if (util.isValidRGB(color) === true) {\n var rgbaArray = color.substr(4).substr(0, color.length - 5).split(',');\n rgba = {\n r: rgbaArray[0],\n g: rgbaArray[1],\n b: rgbaArray[2],\n a: 1.0\n };\n } else if (util.isValidRGBA(color) === true) {\n var _rgbaArray = color.substr(5).substr(0, color.length - 6).split(',');\n\n rgba = {\n r: _rgbaArray[0],\n g: _rgbaArray[1],\n b: _rgbaArray[2],\n a: _rgbaArray[3]\n };\n } else if (util.isValidHex(color) === true) {\n var rgbObj = util.hexToRGB(color);\n rgba = {\n r: rgbObj.r,\n g: rgbObj.g,\n b: rgbObj.b,\n a: 1.0\n };\n }\n } else {\n if (color instanceof Object) {\n if (color.r !== undefined && color.g !== undefined && color.b !== undefined) {\n var alpha = color.a !== undefined ? color.a : '1.0';\n rgba = {\n r: color.r,\n g: color.g,\n b: color.b,\n a: alpha\n };\n }\n }\n } // set color\n\n\n if (rgba === undefined) {\n throw new Error(\"Unknown color passed to the colorPicker. Supported are strings: rgb, hex, rgba. Object: rgb ({r:r,g:g,b:b,[a:a]}). Supplied: \" + (0, _stringify2['default'])(color));\n } else {\n this._setColor(rgba, setInitial);\n }\n }\n /**\n * this shows the color picker.\n * The hue circle is constructed once and stored.\n */\n\n }, {\n key: 'show',\n value: function show() {\n if (this.closeCallback !== undefined) {\n this.closeCallback();\n this.closeCallback = undefined;\n }\n\n this.applied = false;\n this.frame.style.display = 'block';\n\n this._generateHueCircle();\n } // ------------------------------------------ PRIVATE ----------------------------- //\n\n /**\n * Hide the picker. Is called by the cancel button.\n * Optional boolean to store the previous color for easy access later on.\n * @param storePrevious\n * @private\n */\n\n }, {\n key: '_hide',\n value: function _hide() {\n var _this = this;\n\n var storePrevious = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; // store the previous color for next time;\n\n if (storePrevious === true) {\n this.previousColor = util.extend({}, this.color);\n }\n\n if (this.applied === true) {\n this.updateCallback(this.initialColor);\n }\n\n this.frame.style.display = 'none'; // call the closing callback, restoring the onclick method.\n // this is in a setTimeout because it will trigger the show again before the click is done.\n\n setTimeout(function () {\n if (_this.closeCallback !== undefined) {\n _this.closeCallback();\n\n _this.closeCallback = undefined;\n }\n }, 0);\n }\n /**\n * bound to the save button. Saves and hides.\n * @private\n */\n\n }, {\n key: '_save',\n value: function _save() {\n this.updateCallback(this.color);\n this.applied = false;\n\n this._hide();\n }\n /**\n * Bound to apply button. Saves but does not close. Is undone by the cancel button.\n * @private\n */\n\n }, {\n key: '_apply',\n value: function _apply() {\n this.applied = true;\n this.updateCallback(this.color);\n\n this._updatePicker(this.color);\n }\n /**\n * load the color from the previous session.\n * @private\n */\n\n }, {\n key: '_loadLast',\n value: function _loadLast() {\n if (this.previousColor !== undefined) {\n this.setColor(this.previousColor, false);\n } else {\n alert(\"There is no last color to load...\");\n }\n }\n /**\n * set the color, place the picker\n * @param rgba\n * @param setInitial\n * @private\n */\n\n }, {\n key: '_setColor',\n value: function _setColor(rgba) {\n var setInitial = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; // store the initial color\n\n if (setInitial === true) {\n this.initialColor = util.extend({}, rgba);\n }\n\n this.color = rgba;\n var hsv = util.RGBToHSV(rgba.r, rgba.g, rgba.b);\n var angleConvert = 2 * Math.PI;\n var radius = this.r * hsv.s;\n var x = this.centerCoordinates.x + radius * Math.sin(angleConvert * hsv.h);\n var y = this.centerCoordinates.y + radius * Math.cos(angleConvert * hsv.h);\n this.colorPickerSelector.style.left = x - 0.5 * this.colorPickerSelector.clientWidth + 'px';\n this.colorPickerSelector.style.top = y - 0.5 * this.colorPickerSelector.clientHeight + 'px';\n\n this._updatePicker(rgba);\n }\n /**\n * bound to opacity control\n * @param value\n * @private\n */\n\n }, {\n key: '_setOpacity',\n value: function _setOpacity(value) {\n this.color.a = value / 100;\n\n this._updatePicker(this.color);\n }\n /**\n * bound to brightness control\n * @param value\n * @private\n */\n\n }, {\n key: '_setBrightness',\n value: function _setBrightness(value) {\n var hsv = util.RGBToHSV(this.color.r, this.color.g, this.color.b);\n hsv.v = value / 100;\n var rgba = util.HSVToRGB(hsv.h, hsv.s, hsv.v);\n rgba['a'] = this.color.a;\n this.color = rgba;\n\n this._updatePicker();\n }\n /**\n * update the color picker. A black circle overlays the hue circle to mimic the brightness decreasing.\n * @param rgba\n * @private\n */\n\n }, {\n key: '_updatePicker',\n value: function _updatePicker() {\n var rgba = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.color;\n var hsv = util.RGBToHSV(rgba.r, rgba.g, rgba.b);\n var ctx = this.colorPickerCanvas.getContext('2d');\n\n if (this.pixelRation === undefined) {\n this.pixelRatio = (window.devicePixelRatio || 1) / (ctx.webkitBackingStorePixelRatio || ctx.mozBackingStorePixelRatio || ctx.msBackingStorePixelRatio || ctx.oBackingStorePixelRatio || ctx.backingStorePixelRatio || 1);\n }\n\n ctx.setTransform(this.pixelRatio, 0, 0, this.pixelRatio, 0, 0); // clear the canvas\n\n var w = this.colorPickerCanvas.clientWidth;\n var h = this.colorPickerCanvas.clientHeight;\n ctx.clearRect(0, 0, w, h);\n ctx.putImageData(this.hueCircle, 0, 0);\n ctx.fillStyle = 'rgba(0,0,0,' + (1 - hsv.v) + ')';\n ctx.circle(this.centerCoordinates.x, this.centerCoordinates.y, this.r);\n ctx.fill();\n this.brightnessRange.value = 100 * hsv.v;\n this.opacityRange.value = 100 * rgba.a;\n this.initialColorDiv.style.backgroundColor = 'rgba(' + this.initialColor.r + ',' + this.initialColor.g + ',' + this.initialColor.b + ',' + this.initialColor.a + ')';\n this.newColorDiv.style.backgroundColor = 'rgba(' + this.color.r + ',' + this.color.g + ',' + this.color.b + ',' + this.color.a + ')';\n }\n /**\n * used by create to set the size of the canvas.\n * @private\n */\n\n }, {\n key: '_setSize',\n value: function _setSize() {\n this.colorPickerCanvas.style.width = '100%';\n this.colorPickerCanvas.style.height = '100%';\n this.colorPickerCanvas.width = 289 * this.pixelRatio;\n this.colorPickerCanvas.height = 289 * this.pixelRatio;\n }\n /**\n * create all dom elements\n * TODO: cleanup, lots of similar dom elements\n * @private\n */\n\n }, {\n key: '_create',\n value: function _create() {\n this.frame = document.createElement('div');\n this.frame.className = 'vis-color-picker';\n this.colorPickerDiv = document.createElement('div');\n this.colorPickerSelector = document.createElement('div');\n this.colorPickerSelector.className = 'vis-selector';\n this.colorPickerDiv.appendChild(this.colorPickerSelector);\n this.colorPickerCanvas = document.createElement('canvas');\n this.colorPickerDiv.appendChild(this.colorPickerCanvas);\n\n if (!this.colorPickerCanvas.getContext) {\n var noCanvas = document.createElement('DIV');\n noCanvas.style.color = 'red';\n noCanvas.style.fontWeight = 'bold';\n noCanvas.style.padding = '10px';\n noCanvas.innerHTML = 'Error: your browser does not support HTML canvas';\n this.colorPickerCanvas.appendChild(noCanvas);\n } else {\n var ctx = this.colorPickerCanvas.getContext(\"2d\");\n this.pixelRatio = (window.devicePixelRatio || 1) / (ctx.webkitBackingStorePixelRatio || ctx.mozBackingStorePixelRatio || ctx.msBackingStorePixelRatio || ctx.oBackingStorePixelRatio || ctx.backingStorePixelRatio || 1);\n this.colorPickerCanvas.getContext(\"2d\").setTransform(this.pixelRatio, 0, 0, this.pixelRatio, 0, 0);\n }\n\n this.colorPickerDiv.className = 'vis-color';\n this.opacityDiv = document.createElement('div');\n this.opacityDiv.className = 'vis-opacity';\n this.brightnessDiv = document.createElement('div');\n this.brightnessDiv.className = 'vis-brightness';\n this.arrowDiv = document.createElement('div');\n this.arrowDiv.className = 'vis-arrow';\n this.opacityRange = document.createElement('input');\n\n try {\n this.opacityRange.type = 'range'; // Not supported on IE9\n\n this.opacityRange.min = '0';\n this.opacityRange.max = '100';\n } catch (err) {}\n\n this.opacityRange.value = '100';\n this.opacityRange.className = 'vis-range';\n this.brightnessRange = document.createElement('input');\n\n try {\n this.brightnessRange.type = 'range'; // Not supported on IE9\n\n this.brightnessRange.min = '0';\n this.brightnessRange.max = '100';\n } catch (err) {}\n\n this.brightnessRange.value = '100';\n this.brightnessRange.className = 'vis-range';\n this.opacityDiv.appendChild(this.opacityRange);\n this.brightnessDiv.appendChild(this.brightnessRange);\n var me = this;\n\n this.opacityRange.onchange = function () {\n me._setOpacity(this.value);\n };\n\n this.opacityRange.oninput = function () {\n me._setOpacity(this.value);\n };\n\n this.brightnessRange.onchange = function () {\n me._setBrightness(this.value);\n };\n\n this.brightnessRange.oninput = function () {\n me._setBrightness(this.value);\n };\n\n this.brightnessLabel = document.createElement(\"div\");\n this.brightnessLabel.className = \"vis-label vis-brightness\";\n this.brightnessLabel.innerHTML = 'brightness:';\n this.opacityLabel = document.createElement(\"div\");\n this.opacityLabel.className = \"vis-label vis-opacity\";\n this.opacityLabel.innerHTML = 'opacity:';\n this.newColorDiv = document.createElement(\"div\");\n this.newColorDiv.className = \"vis-new-color\";\n this.newColorDiv.innerHTML = 'new';\n this.initialColorDiv = document.createElement(\"div\");\n this.initialColorDiv.className = \"vis-initial-color\";\n this.initialColorDiv.innerHTML = 'initial';\n this.cancelButton = document.createElement(\"div\");\n this.cancelButton.className = \"vis-button vis-cancel\";\n this.cancelButton.innerHTML = 'cancel';\n this.cancelButton.onclick = this._hide.bind(this, false);\n this.applyButton = document.createElement(\"div\");\n this.applyButton.className = \"vis-button vis-apply\";\n this.applyButton.innerHTML = 'apply';\n this.applyButton.onclick = this._apply.bind(this);\n this.saveButton = document.createElement(\"div\");\n this.saveButton.className = \"vis-button vis-save\";\n this.saveButton.innerHTML = 'save';\n this.saveButton.onclick = this._save.bind(this);\n this.loadButton = document.createElement(\"div\");\n this.loadButton.className = \"vis-button vis-load\";\n this.loadButton.innerHTML = 'load last';\n this.loadButton.onclick = this._loadLast.bind(this);\n this.frame.appendChild(this.colorPickerDiv);\n this.frame.appendChild(this.arrowDiv);\n this.frame.appendChild(this.brightnessLabel);\n this.frame.appendChild(this.brightnessDiv);\n this.frame.appendChild(this.opacityLabel);\n this.frame.appendChild(this.opacityDiv);\n this.frame.appendChild(this.newColorDiv);\n this.frame.appendChild(this.initialColorDiv);\n this.frame.appendChild(this.cancelButton);\n this.frame.appendChild(this.applyButton);\n this.frame.appendChild(this.saveButton);\n this.frame.appendChild(this.loadButton);\n }\n /**\n * bind hammer to the color picker\n * @private\n */\n\n }, {\n key: '_bindHammer',\n value: function _bindHammer() {\n var _this2 = this;\n\n this.drag = {};\n this.pinch = {};\n this.hammer = new Hammer(this.colorPickerCanvas);\n this.hammer.get('pinch').set({\n enable: true\n });\n hammerUtil.onTouch(this.hammer, function (event) {\n _this2._moveSelector(event);\n });\n this.hammer.on('tap', function (event) {\n _this2._moveSelector(event);\n });\n this.hammer.on('panstart', function (event) {\n _this2._moveSelector(event);\n });\n this.hammer.on('panmove', function (event) {\n _this2._moveSelector(event);\n });\n this.hammer.on('panend', function (event) {\n _this2._moveSelector(event);\n });\n }\n /**\n * generate the hue circle. This is relatively heavy (200ms) and is done only once on the first time it is shown.\n * @private\n */\n\n }, {\n key: '_generateHueCircle',\n value: function _generateHueCircle() {\n if (this.generated === false) {\n var ctx = this.colorPickerCanvas.getContext('2d');\n\n if (this.pixelRation === undefined) {\n this.pixelRatio = (window.devicePixelRatio || 1) / (ctx.webkitBackingStorePixelRatio || ctx.mozBackingStorePixelRatio || ctx.msBackingStorePixelRatio || ctx.oBackingStorePixelRatio || ctx.backingStorePixelRatio || 1);\n }\n\n ctx.setTransform(this.pixelRatio, 0, 0, this.pixelRatio, 0, 0); // clear the canvas\n\n var w = this.colorPickerCanvas.clientWidth;\n var h = this.colorPickerCanvas.clientHeight;\n ctx.clearRect(0, 0, w, h); // draw hue circle\n\n var x = void 0,\n y = void 0,\n hue = void 0,\n sat = void 0;\n this.centerCoordinates = {\n x: w * 0.5,\n y: h * 0.5\n };\n this.r = 0.49 * w;\n var angleConvert = 2 * Math.PI / 360;\n var hfac = 1 / 360;\n var sfac = 1 / this.r;\n var rgb = void 0;\n\n for (hue = 0; hue < 360; hue++) {\n for (sat = 0; sat < this.r; sat++) {\n x = this.centerCoordinates.x + sat * Math.sin(angleConvert * hue);\n y = this.centerCoordinates.y + sat * Math.cos(angleConvert * hue);\n rgb = util.HSVToRGB(hue * hfac, sat * sfac, 1);\n ctx.fillStyle = 'rgb(' + rgb.r + ',' + rgb.g + ',' + rgb.b + ')';\n ctx.fillRect(x - 0.5, y - 0.5, 2, 2);\n }\n }\n\n ctx.strokeStyle = 'rgba(0,0,0,1)';\n ctx.circle(this.centerCoordinates.x, this.centerCoordinates.y, this.r);\n ctx.stroke();\n this.hueCircle = ctx.getImageData(0, 0, w, h);\n }\n\n this.generated = true;\n }\n /**\n * move the selector. This is called by hammer functions.\n *\n * @param event\n * @private\n */\n\n }, {\n key: '_moveSelector',\n value: function _moveSelector(event) {\n var rect = this.colorPickerDiv.getBoundingClientRect();\n var left = event.center.x - rect.left;\n var top = event.center.y - rect.top;\n var centerY = 0.5 * this.colorPickerDiv.clientHeight;\n var centerX = 0.5 * this.colorPickerDiv.clientWidth;\n var x = left - centerX;\n var y = top - centerY;\n var angle = Math.atan2(x, y);\n var radius = 0.98 * Math.min(Math.sqrt(x * x + y * y), centerX);\n var newTop = Math.cos(angle) * radius + centerY;\n var newLeft = Math.sin(angle) * radius + centerX;\n this.colorPickerSelector.style.top = newTop - 0.5 * this.colorPickerSelector.clientHeight + 'px';\n this.colorPickerSelector.style.left = newLeft - 0.5 * this.colorPickerSelector.clientWidth + 'px'; // set color\n\n var h = angle / (2 * Math.PI);\n h = h < 0 ? h + 1 : h;\n var s = radius / this.r;\n var hsv = util.RGBToHSV(this.color.r, this.color.g, this.color.b);\n hsv.h = h;\n hsv.s = s;\n var rgba = util.HSVToRGB(hsv.h, hsv.s, hsv.v);\n rgba['a'] = this.color.a;\n this.color = rgba; // update previews\n\n this.initialColorDiv.style.backgroundColor = 'rgba(' + this.initialColor.r + ',' + this.initialColor.g + ',' + this.initialColor.b + ',' + this.initialColor.a + ')';\n this.newColorDiv.style.backgroundColor = 'rgba(' + this.color.r + ',' + this.color.g + ',' + this.color.b + ',' + this.color.a + ')';\n }\n }]);\n return ColorPicker;\n }();\n\n exports['default'] = ColorPicker;\n /***/\n },\n /* 125 */\n\n /***/\n function (module, exports, __webpack_require__) {\n 'use strict';\n\n var Hammer = __webpack_require__(112);\n /**\n * Register a touch event, taking place before a gesture\n * @param {Hammer} hammer A hammer instance\n * @param {function} callback Callback, called as callback(event)\n */\n\n\n exports.onTouch = function (hammer, callback) {\n callback.inputHandler = function (event) {\n if (event.isFirst) {\n callback(event);\n }\n };\n\n hammer.on('hammer.input', callback.inputHandler);\n };\n /**\n * Register a release event, taking place after a gesture\n * @param {Hammer} hammer A hammer instance\n * @param {function} callback Callback, called as callback(event)\n */\n\n\n exports.onRelease = function (hammer, callback) {\n callback.inputHandler = function (event) {\n if (event.isFinal) {\n callback(event);\n }\n };\n\n return hammer.on('hammer.input', callback.inputHandler);\n };\n /**\n * Unregister a touch event, taking place before a gesture\n * @param {Hammer} hammer A hammer instance\n * @param {function} callback Callback, called as callback(event)\n */\n\n\n exports.offTouch = function (hammer, callback) {\n hammer.off('hammer.input', callback.inputHandler);\n };\n /**\n * Unregister a release event, taking place before a gesture\n * @param {Hammer} hammer A hammer instance\n * @param {function} callback Callback, called as callback(event)\n */\n\n\n exports.offRelease = exports.offTouch;\n /**\n * Hack the PinchRecognizer such that it doesn't prevent default behavior\n * for vertical panning.\n *\n * Yeah ... this is quite a hack ... see https://github.com/hammerjs/hammer.js/issues/932\n *\n * @param {Hammer.Pinch} pinchRecognizer\n * @return {Hammer.Pinch} returns the pinchRecognizer\n */\n\n exports.disablePreventDefaultVertically = function (pinchRecognizer) {\n var TOUCH_ACTION_PAN_Y = 'pan-y';\n\n pinchRecognizer.getTouchAction = function () {\n // default method returns [TOUCH_ACTION_NONE]\n return [TOUCH_ACTION_PAN_Y];\n };\n\n return pinchRecognizer;\n };\n /***/\n\n },\n /* 126 */\n\n /***/\n function (module, exports, __webpack_require__) {\n 'use strict';\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n exports.printStyle = undefined;\n\n var _stringify = __webpack_require__(90);\n\n var _stringify2 = _interopRequireDefault(_stringify);\n\n var _typeof2 = __webpack_require__(62);\n\n var _typeof3 = _interopRequireDefault(_typeof2);\n\n var _keys = __webpack_require__(58);\n\n var _keys2 = _interopRequireDefault(_keys);\n\n var _classCallCheck2 = __webpack_require__(119);\n\n var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\n var _createClass2 = __webpack_require__(120);\n\n var _createClass3 = _interopRequireDefault(_createClass2);\n\n function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n 'default': obj\n };\n }\n\n var util = __webpack_require__(1);\n\n var errorFound = false;\n var allOptions = void 0;\n var printStyle = 'background: #FFeeee; color: #dd0000';\n /**\n * Used to validate options.\n */\n\n var Validator = function () {\n function Validator() {\n (0, _classCallCheck3['default'])(this, Validator);\n }\n /**\n * Main function to be called\n * @param options\n * @param subObject\n * @returns {boolean}\n */\n\n\n (0, _createClass3['default'])(Validator, null, [{\n key: 'validate',\n value: function validate(options, referenceOptions, subObject) {\n errorFound = false;\n allOptions = referenceOptions;\n var usedOptions = referenceOptions;\n\n if (subObject !== undefined) {\n usedOptions = referenceOptions[subObject];\n }\n\n Validator.parse(options, usedOptions, []);\n return errorFound;\n }\n /**\n * Will traverse an object recursively and check every value\n * @param options\n * @param referenceOptions\n * @param path\n */\n\n }, {\n key: 'parse',\n value: function parse(options, referenceOptions, path) {\n for (var option in options) {\n if (options.hasOwnProperty(option)) {\n Validator.check(option, options, referenceOptions, path);\n }\n }\n }\n /**\n * Check every value. If the value is an object, call the parse function on that object.\n * @param option\n * @param options\n * @param referenceOptions\n * @param path\n */\n\n }, {\n key: 'check',\n value: function check(option, options, referenceOptions, path) {\n if (referenceOptions[option] === undefined && referenceOptions.__any__ === undefined) {\n Validator.getSuggestion(option, referenceOptions, path);\n } else if (referenceOptions[option] === undefined && referenceOptions.__any__ !== undefined) {\n // __any__ is a wildcard. Any value is accepted and will be further analysed by reference.\n if (Validator.getType(options[option]) === 'object' && referenceOptions['__any__'].__type__ !== undefined) {\n // if the any subgroup is not a predefined object int he configurator we do not look deeper into the object.\n Validator.checkFields(option, options, referenceOptions, '__any__', referenceOptions['__any__'].__type__, path);\n } else {\n Validator.checkFields(option, options, referenceOptions, '__any__', referenceOptions['__any__'], path);\n }\n } else {\n // Since all options in the reference are objects, we can check whether they are supposed to be object to look for the __type__ field.\n if (referenceOptions[option].__type__ !== undefined) {\n // if this should be an object, we check if the correct type has been supplied to account for shorthand options.\n Validator.checkFields(option, options, referenceOptions, option, referenceOptions[option].__type__, path);\n } else {\n Validator.checkFields(option, options, referenceOptions, option, referenceOptions[option], path);\n }\n }\n }\n /**\n *\n * @param {String} option | the option property\n * @param {Object} options | The supplied options object\n * @param {Object} referenceOptions | The reference options containing all options and their allowed formats\n * @param {String} referenceOption | Usually this is the same as option, except when handling an __any__ tag.\n * @param {String} refOptionType | This is the type object from the reference options\n * @param {Array} path | where in the object is the option\n */\n\n }, {\n key: 'checkFields',\n value: function checkFields(option, options, referenceOptions, referenceOption, refOptionObj, path) {\n var optionType = Validator.getType(options[option]);\n var refOptionType = refOptionObj[optionType];\n\n if (refOptionType !== undefined) {\n // if the type is correct, we check if it is supposed to be one of a few select values\n if (Validator.getType(refOptionType) === 'array') {\n if (refOptionType.indexOf(options[option]) === -1) {\n console.log('%cInvalid option detected in \"' + option + '\".' + ' Allowed values are:' + Validator.print(refOptionType) + ' not \"' + options[option] + '\". ' + Validator.printLocation(path, option), printStyle);\n errorFound = true;\n } else if (optionType === 'object' && referenceOption !== \"__any__\") {\n path = util.copyAndExtendArray(path, option);\n Validator.parse(options[option], referenceOptions[referenceOption], path);\n }\n } else if (optionType === 'object' && referenceOption !== \"__any__\") {\n path = util.copyAndExtendArray(path, option);\n Validator.parse(options[option], referenceOptions[referenceOption], path);\n }\n } else if (refOptionObj['any'] === undefined) {\n // type of the field is incorrect and the field cannot be any\n console.log('%cInvalid type received for \"' + option + '\". Expected: ' + Validator.print((0, _keys2['default'])(refOptionObj)) + '. Received [' + optionType + '] \"' + options[option] + '\"' + Validator.printLocation(path, option), printStyle);\n errorFound = true;\n }\n }\n }, {\n key: 'getType',\n value: function getType(object) {\n var type = typeof object === 'undefined' ? 'undefined' : (0, _typeof3['default'])(object);\n\n if (type === 'object') {\n if (object === null) {\n return 'null';\n }\n\n if (object instanceof Boolean) {\n return 'boolean';\n }\n\n if (object instanceof Number) {\n return 'number';\n }\n\n if (object instanceof String) {\n return 'string';\n }\n\n if (Array.isArray(object)) {\n return 'array';\n }\n\n if (object instanceof Date) {\n return 'date';\n }\n\n if (object.nodeType !== undefined) {\n return 'dom';\n }\n\n if (object._isAMomentObject === true) {\n return 'moment';\n }\n\n return 'object';\n } else if (type === 'number') {\n return 'number';\n } else if (type === 'boolean') {\n return 'boolean';\n } else if (type === 'string') {\n return 'string';\n } else if (type === undefined) {\n return 'undefined';\n }\n\n return type;\n }\n }, {\n key: 'getSuggestion',\n value: function getSuggestion(option, options, path) {\n var localSearch = Validator.findInOptions(option, options, path, false);\n var globalSearch = Validator.findInOptions(option, allOptions, [], true);\n var localSearchThreshold = 8;\n var globalSearchThreshold = 4;\n\n if (localSearch.indexMatch !== undefined) {\n console.log('%cUnknown option detected: \"' + option + '\" in ' + Validator.printLocation(localSearch.path, option, '') + 'Perhaps it was incomplete? Did you mean: \"' + localSearch.indexMatch + '\"?\\n\\n', printStyle);\n } else if (globalSearch.distance <= globalSearchThreshold && localSearch.distance > globalSearch.distance) {\n console.log('%cUnknown option detected: \"' + option + '\" in ' + Validator.printLocation(localSearch.path, option, '') + 'Perhaps it was misplaced? Matching option found at: ' + Validator.printLocation(globalSearch.path, globalSearch.closestMatch, ''), printStyle);\n } else if (localSearch.distance <= localSearchThreshold) {\n console.log('%cUnknown option detected: \"' + option + '\". Did you mean \"' + localSearch.closestMatch + '\"?' + Validator.printLocation(localSearch.path, option), printStyle);\n } else {\n console.log('%cUnknown option detected: \"' + option + '\". Did you mean one of these: ' + Validator.print((0, _keys2['default'])(options)) + Validator.printLocation(path, option), printStyle);\n }\n\n errorFound = true;\n }\n /**\n * traverse the options in search for a match.\n * @param option\n * @param options\n * @param path\n * @param recursive\n * @returns {{closestMatch: string, path: Array, distance: number}}\n */\n\n }, {\n key: 'findInOptions',\n value: function findInOptions(option, options, path) {\n var recursive = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;\n var min = 1e9;\n var closestMatch = '';\n var closestMatchPath = [];\n var lowerCaseOption = option.toLowerCase();\n var indexMatch = undefined;\n\n for (var op in options) {\n var distance = void 0;\n\n if (options[op].__type__ !== undefined && recursive === true) {\n var result = Validator.findInOptions(option, options[op], util.copyAndExtendArray(path, op));\n\n if (min > result.distance) {\n closestMatch = result.closestMatch;\n closestMatchPath = result.path;\n min = result.distance;\n indexMatch = result.indexMatch;\n }\n } else {\n if (op.toLowerCase().indexOf(lowerCaseOption) !== -1) {\n indexMatch = op;\n }\n\n distance = Validator.levenshteinDistance(option, op);\n\n if (min > distance) {\n closestMatch = op;\n closestMatchPath = util.copyArray(path);\n min = distance;\n }\n }\n }\n\n return {\n closestMatch: closestMatch,\n path: closestMatchPath,\n distance: min,\n indexMatch: indexMatch\n };\n }\n }, {\n key: 'printLocation',\n value: function printLocation(path, option) {\n var prefix = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'Problem value found at: \\n';\n var str = '\\n\\n' + prefix + 'options = {\\n';\n\n for (var i = 0; i < path.length; i++) {\n for (var j = 0; j < i + 1; j++) {\n str += ' ';\n }\n\n str += path[i] + ': {\\n';\n }\n\n for (var _j = 0; _j < path.length + 1; _j++) {\n str += ' ';\n }\n\n str += option + '\\n';\n\n for (var _i = 0; _i < path.length + 1; _i++) {\n for (var _j2 = 0; _j2 < path.length - _i; _j2++) {\n str += ' ';\n }\n\n str += '}\\n';\n }\n\n return str + '\\n\\n';\n }\n }, {\n key: 'print',\n value: function print(options) {\n return (0, _stringify2['default'])(options).replace(/(\\\")|(\\[)|(\\])|(,\"__type__\")/g, \"\").replace(/(\\,)/g, ', ');\n } // Compute the edit distance between the two given strings\n // http://en.wikibooks.org/wiki/Algorithm_Implementation/Strings/Levenshtein_distance#JavaScript\n\n /*\n Copyright (c) 2011 Andrei Mackenzie\n Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n }, {\n key: 'levenshteinDistance',\n value: function levenshteinDistance(a, b) {\n if (a.length === 0) return b.length;\n if (b.length === 0) return a.length;\n var matrix = []; // increment along the first column of each row\n\n var i;\n\n for (i = 0; i <= b.length; i++) {\n matrix[i] = [i];\n } // increment each column in the first row\n\n\n var j;\n\n for (j = 0; j <= a.length; j++) {\n matrix[0][j] = j;\n } // Fill in the rest of the matrix\n\n\n for (i = 1; i <= b.length; i++) {\n for (j = 1; j <= a.length; j++) {\n if (b.charAt(i - 1) == a.charAt(j - 1)) {\n matrix[i][j] = matrix[i - 1][j - 1];\n } else {\n matrix[i][j] = Math.min(matrix[i - 1][j - 1] + 1, // substitution\n Math.min(matrix[i][j - 1] + 1, // insertion\n matrix[i - 1][j] + 1)); // deletion\n }\n }\n }\n\n return matrix[b.length][a.length];\n }\n }]);\n return Validator;\n }();\n\n exports['default'] = Validator;\n exports.printStyle = printStyle;\n /***/\n },\n /* 127 */\n\n /***/\n function (module, exports, __webpack_require__) {\n 'use strict';\n\n var _keys = __webpack_require__(58);\n\n var _keys2 = _interopRequireDefault(_keys);\n\n var _stringify = __webpack_require__(90);\n\n var _stringify2 = _interopRequireDefault(_stringify);\n\n var _typeof2 = __webpack_require__(62);\n\n var _typeof3 = _interopRequireDefault(_typeof2);\n\n function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n 'default': obj\n };\n }\n\n var util = __webpack_require__(1);\n\n var hammerUtil = __webpack_require__(125);\n\n var moment = __webpack_require__(82);\n\n var Component = __webpack_require__(128);\n\n var DateUtil = __webpack_require__(129);\n /**\n * @constructor Range\n * A Range controls a numeric range with a start and end value.\n * The Range adjusts the range based on mouse events or programmatic changes,\n * and triggers events when the range is changing or has been changed.\n * @param {{dom: Object, domProps: Object, emitter: Emitter}} body\n * @param {Object} [options] See description at Range.setOptions\n */\n\n\n function Range(body, options) {\n var now = moment().hours(0).minutes(0).seconds(0).milliseconds(0);\n var start = now.clone().add(-3, 'days').valueOf();\n var end = now.clone().add(3, 'days').valueOf();\n\n if (options === undefined) {\n this.start = start;\n this.end = end;\n } else {\n this.start = options.start || start;\n this.end = options.end || end;\n }\n\n this.rolling = false;\n this.body = body;\n this.deltaDifference = 0;\n this.scaleOffset = 0;\n this.startToFront = false;\n this.endToFront = true; // default options\n\n this.defaultOptions = {\n rtl: false,\n start: null,\n end: null,\n moment: moment,\n direction: 'horizontal',\n // 'horizontal' or 'vertical'\n moveable: true,\n zoomable: true,\n min: null,\n max: null,\n zoomMin: 10,\n // milliseconds\n zoomMax: 1000 * 60 * 60 * 24 * 365 * 10000 // milliseconds\n\n };\n this.options = util.extend({}, this.defaultOptions);\n this.props = {\n touch: {}\n };\n this.animationTimer = null; // drag listeners for dragging\n\n this.body.emitter.on('panstart', this._onDragStart.bind(this));\n this.body.emitter.on('panmove', this._onDrag.bind(this));\n this.body.emitter.on('panend', this._onDragEnd.bind(this)); // mouse wheel for zooming\n\n this.body.emitter.on('mousewheel', this._onMouseWheel.bind(this)); // pinch to zoom\n\n this.body.emitter.on('touch', this._onTouch.bind(this));\n this.body.emitter.on('pinch', this._onPinch.bind(this)); // on click of rolling mode button\n\n this.body.dom.rollingModeBtn.addEventListener('click', this.startRolling.bind(this));\n this.setOptions(options);\n }\n\n Range.prototype = new Component();\n /**\n * Set options for the range controller\n * @param {Object} options Available options:\n * {Number | Date | String} start Start date for the range\n * {Number | Date | String} end End date for the range\n * {Number} min Minimum value for start\n * {Number} max Maximum value for end\n * {Number} zoomMin Set a minimum value for\n * (end - start).\n * {Number} zoomMax Set a maximum value for\n * (end - start).\n * {Boolean} moveable Enable moving of the range\n * by dragging. True by default\n * {Boolean} zoomable Enable zooming of the range\n * by pinching/scrolling. True by default\n */\n\n Range.prototype.setOptions = function (options) {\n if (options) {\n // copy the options that we know\n var fields = ['animation', 'direction', 'min', 'max', 'zoomMin', 'zoomMax', 'moveable', 'zoomable', 'moment', 'activate', 'hiddenDates', 'zoomKey', 'rtl', 'showCurrentTime', 'rollMode', 'horizontalScroll'];\n util.selectiveExtend(fields, this.options, options);\n\n if (options.rollingMode) {\n this.startRolling();\n }\n\n if ('start' in options || 'end' in options) {\n // apply a new range. both start and end are optional\n this.setRange(options.start, options.end);\n }\n }\n };\n /**\n * Test whether direction has a valid value\n * @param {String} direction 'horizontal' or 'vertical'\n */\n\n\n function validateDirection(direction) {\n if (direction != 'horizontal' && direction != 'vertical') {\n throw new TypeError('Unknown direction \"' + direction + '\". ' + 'Choose \"horizontal\" or \"vertical\".');\n }\n }\n /**\n * Start auto refreshing the current time bar\n */\n\n\n Range.prototype.startRolling = function () {\n var me = this;\n\n function update() {\n me.stopRolling();\n me.rolling = true;\n var interval = me.end - me.start;\n var t = util.convert(new Date(), 'Date').valueOf();\n var start = t - interval / 2;\n var end = t + interval / 2;\n var animation = me.options && me.options.animation !== undefined ? me.options.animation : true;\n me.setRange(start, end, false); // determine interval to refresh\n\n var scale = me.conversion(me.body.domProps.center.width).scale;\n var interval = 1 / scale / 10;\n if (interval < 30) interval = 30;\n if (interval > 1000) interval = 1000;\n me.body.dom.rollingModeBtn.style.visibility = \"hidden\"; // start a renderTimer to adjust for the new time\n\n me.currentTimeTimer = setTimeout(update, interval);\n }\n\n update();\n };\n /**\n * Stop auto refreshing the current time bar\n */\n\n\n Range.prototype.stopRolling = function () {\n if (this.currentTimeTimer !== undefined) {\n clearTimeout(this.currentTimeTimer);\n this.rolling = false;\n this.body.dom.rollingModeBtn.style.visibility = \"visible\";\n }\n };\n /**\n * Set a new start and end range\n * @param {Date | Number | String} [start]\n * @param {Date | Number | String} [end]\n * @param {boolean | {duration: number, easingFunction: string}} [animation=false]\n * If true (default), the range is animated\n * smoothly to the new window. An object can be\n * provided to specify duration and easing function.\n * Default duration is 500 ms, and default easing\n * function is 'easeInOutQuad'.\n * @param {Boolean} [byUser=false]\n *\n */\n\n\n Range.prototype.setRange = function (start, end, animation, byUser, event) {\n if (byUser !== true) {\n byUser = false;\n }\n\n var finalStart = start != undefined ? util.convert(start, 'Date').valueOf() : null;\n var finalEnd = end != undefined ? util.convert(end, 'Date').valueOf() : null;\n\n this._cancelAnimation();\n\n if (animation) {\n // true or an Object\n var me = this;\n var initStart = this.start;\n var initEnd = this.end;\n var duration = (typeof animation === 'undefined' ? 'undefined' : (0, _typeof3['default'])(animation)) === 'object' && 'duration' in animation ? animation.duration : 500;\n var easingName = (typeof animation === 'undefined' ? 'undefined' : (0, _typeof3['default'])(animation)) === 'object' && 'easingFunction' in animation ? animation.easingFunction : 'easeInOutQuad';\n var easingFunction = util.easingFunctions[easingName];\n\n if (!easingFunction) {\n throw new Error('Unknown easing function ' + (0, _stringify2['default'])(easingName) + '. ' + 'Choose from: ' + (0, _keys2['default'])(util.easingFunctions).join(', '));\n }\n\n var initTime = new Date().valueOf();\n var anyChanged = false;\n\n var next = function next() {\n if (!me.props.touch.dragging) {\n var now = new Date().valueOf();\n var time = now - initTime;\n var ease = easingFunction(time / duration);\n var done = time > duration;\n var s = done || finalStart === null ? finalStart : initStart + (finalStart - initStart) * ease;\n var e = done || finalEnd === null ? finalEnd : initEnd + (finalEnd - initEnd) * ease;\n changed = me._applyRange(s, e);\n DateUtil.updateHiddenDates(me.options.moment, me.body, me.options.hiddenDates);\n anyChanged = anyChanged || changed;\n var params = {\n start: new Date(me.start),\n end: new Date(me.end),\n byUser: byUser,\n event: event\n };\n\n if (changed) {\n me.body.emitter.emit('rangechange', params);\n }\n\n if (done) {\n if (anyChanged) {\n me.body.emitter.emit('rangechanged', params);\n }\n } else {\n // animate with as high as possible frame rate, leave 20 ms in between\n // each to prevent the browser from blocking\n me.animationTimer = setTimeout(next, 20);\n }\n }\n };\n\n return next();\n } else {\n var changed = this._applyRange(finalStart, finalEnd);\n\n DateUtil.updateHiddenDates(this.options.moment, this.body, this.options.hiddenDates);\n\n if (changed) {\n var params = {\n start: new Date(this.start),\n end: new Date(this.end),\n byUser: byUser,\n event: event\n };\n this.body.emitter.emit('rangechange', params);\n this.body.emitter.emit('rangechanged', params);\n }\n }\n };\n /**\n * Get the number of milliseconds per pixel.\n */\n\n\n Range.prototype.getMillisecondsPerPixel = function () {\n return (this.end - this.start) / this.body.dom.center.clientWidth;\n };\n /**\n * Stop an animation\n * @private\n */\n\n\n Range.prototype._cancelAnimation = function () {\n if (this.animationTimer) {\n clearTimeout(this.animationTimer);\n this.animationTimer = null;\n }\n };\n /**\n * Set a new start and end range. This method is the same as setRange, but\n * does not trigger a range change and range changed event, and it returns\n * true when the range is changed\n * @param {Number} [start]\n * @param {Number} [end]\n * @return {Boolean} changed\n * @private\n */\n\n\n Range.prototype._applyRange = function (start, end) {\n var newStart = start != null ? util.convert(start, 'Date').valueOf() : this.start,\n newEnd = end != null ? util.convert(end, 'Date').valueOf() : this.end,\n max = this.options.max != null ? util.convert(this.options.max, 'Date').valueOf() : null,\n min = this.options.min != null ? util.convert(this.options.min, 'Date').valueOf() : null,\n diff; // check for valid number\n\n if (isNaN(newStart) || newStart === null) {\n throw new Error('Invalid start \"' + start + '\"');\n }\n\n if (isNaN(newEnd) || newEnd === null) {\n throw new Error('Invalid end \"' + end + '\"');\n } // prevent end < start\n\n\n if (newEnd < newStart) {\n newEnd = newStart;\n } // prevent start < min\n\n\n if (min !== null) {\n if (newStart < min) {\n diff = min - newStart;\n newStart += diff;\n newEnd += diff; // prevent end > max\n\n if (max != null) {\n if (newEnd > max) {\n newEnd = max;\n }\n }\n }\n } // prevent end > max\n\n\n if (max !== null) {\n if (newEnd > max) {\n diff = newEnd - max;\n newStart -= diff;\n newEnd -= diff; // prevent start < min\n\n if (min != null) {\n if (newStart < min) {\n newStart = min;\n }\n }\n }\n } // prevent (end-start) < zoomMin\n\n\n if (this.options.zoomMin !== null) {\n var zoomMin = parseFloat(this.options.zoomMin);\n\n if (zoomMin < 0) {\n zoomMin = 0;\n }\n\n if (newEnd - newStart < zoomMin) {\n // compensate for a scale of 0.5 ms\n var compensation = 0.5;\n\n if (this.end - this.start === zoomMin && newStart >= this.start - compensation && newEnd <= this.end) {\n // ignore this action, we are already zoomed to the minimum\n newStart = this.start;\n newEnd = this.end;\n } else {\n // zoom to the minimum\n diff = zoomMin - (newEnd - newStart);\n newStart -= diff / 2;\n newEnd += diff / 2;\n }\n }\n } // prevent (end-start) > zoomMax\n\n\n if (this.options.zoomMax !== null) {\n var zoomMax = parseFloat(this.options.zoomMax);\n\n if (zoomMax < 0) {\n zoomMax = 0;\n }\n\n if (newEnd - newStart > zoomMax) {\n if (this.end - this.start === zoomMax && newStart < this.start && newEnd > this.end) {\n // ignore this action, we are already zoomed to the maximum\n newStart = this.start;\n newEnd = this.end;\n } else {\n // zoom to the maximum\n diff = newEnd - newStart - zoomMax;\n newStart += diff / 2;\n newEnd -= diff / 2;\n }\n }\n }\n\n var changed = this.start != newStart || this.end != newEnd; // if the new range does NOT overlap with the old range, emit checkRangedItems to avoid not showing ranged items (ranged meaning has end time, not necessarily of type Range)\n\n if (!(newStart >= this.start && newStart <= this.end || newEnd >= this.start && newEnd <= this.end) && !(this.start >= newStart && this.start <= newEnd || this.end >= newStart && this.end <= newEnd)) {\n this.body.emitter.emit('checkRangedItems');\n }\n\n this.start = newStart;\n this.end = newEnd;\n return changed;\n };\n /**\n * Retrieve the current range.\n * @return {Object} An object with start and end properties\n */\n\n\n Range.prototype.getRange = function () {\n return {\n start: this.start,\n end: this.end\n };\n };\n /**\n * Calculate the conversion offset and scale for current range, based on\n * the provided width\n * @param {Number} width\n * @returns {{offset: number, scale: number}} conversion\n */\n\n\n Range.prototype.conversion = function (width, totalHidden) {\n return Range.conversion(this.start, this.end, width, totalHidden);\n };\n /**\n * Static method to calculate the conversion offset and scale for a range,\n * based on the provided start, end, and width\n * @param {Number} start\n * @param {Number} end\n * @param {Number} width\n * @returns {{offset: number, scale: number}} conversion\n */\n\n\n Range.conversion = function (start, end, width, totalHidden) {\n if (totalHidden === undefined) {\n totalHidden = 0;\n }\n\n if (width != 0 && end - start != 0) {\n return {\n offset: start,\n scale: width / (end - start - totalHidden)\n };\n } else {\n return {\n offset: 0,\n scale: 1\n };\n }\n };\n /**\n * Start dragging horizontally or vertically\n * @param {Event} event\n * @private\n */\n\n\n Range.prototype._onDragStart = function (event) {\n this.deltaDifference = 0;\n this.previousDelta = 0; // only allow dragging when configured as movable\n\n if (!this.options.moveable) return; // only start dragging when the mouse is inside the current range\n\n if (!this._isInsideRange(event)) return; // refuse to drag when we where pinching to prevent the timeline make a jump\n // when releasing the fingers in opposite order from the touch screen\n\n if (!this.props.touch.allowDragging) return;\n this.stopRolling();\n this.props.touch.start = this.start;\n this.props.touch.end = this.end;\n this.props.touch.dragging = true;\n\n if (this.body.dom.root) {\n this.body.dom.root.style.cursor = 'move';\n }\n };\n /**\n * Perform dragging operation\n * @param {Event} event\n * @private\n */\n\n\n Range.prototype._onDrag = function (event) {\n if (!event) return;\n if (!this.props.touch.dragging) return; // only allow dragging when configured as movable\n\n if (!this.options.moveable) return; // TODO: this may be redundant in hammerjs2\n // refuse to drag when we where pinching to prevent the timeline make a jump\n // when releasing the fingers in opposite order from the touch screen\n\n if (!this.props.touch.allowDragging) return;\n var direction = this.options.direction;\n validateDirection(direction);\n var delta = direction == 'horizontal' ? event.deltaX : event.deltaY;\n delta -= this.deltaDifference;\n var interval = this.props.touch.end - this.props.touch.start; // normalize dragging speed if cutout is in between.\n\n var duration = DateUtil.getHiddenDurationBetween(this.body.hiddenDates, this.start, this.end);\n interval -= duration;\n var width = direction == 'horizontal' ? this.body.domProps.center.width : this.body.domProps.center.height;\n\n if (this.options.rtl) {\n var diffRange = delta / width * interval;\n } else {\n var diffRange = -delta / width * interval;\n }\n\n var newStart = this.props.touch.start + diffRange;\n var newEnd = this.props.touch.end + diffRange; // snapping times away from hidden zones\n\n var safeStart = DateUtil.snapAwayFromHidden(this.body.hiddenDates, newStart, this.previousDelta - delta, true);\n var safeEnd = DateUtil.snapAwayFromHidden(this.body.hiddenDates, newEnd, this.previousDelta - delta, true);\n\n if (safeStart != newStart || safeEnd != newEnd) {\n this.deltaDifference += delta;\n this.props.touch.start = safeStart;\n this.props.touch.end = safeEnd;\n\n this._onDrag(event);\n\n return;\n }\n\n this.previousDelta = delta;\n\n this._applyRange(newStart, newEnd);\n\n var startDate = new Date(this.start);\n var endDate = new Date(this.end); // fire a rangechange event\n\n this.body.emitter.emit('rangechange', {\n start: startDate,\n end: endDate,\n byUser: true,\n event: event\n }); // fire a panmove event\n\n this.body.emitter.emit('panmove');\n };\n /**\n * Stop dragging operation\n * @param {event} event\n * @private\n */\n\n\n Range.prototype._onDragEnd = function (event) {\n if (!this.props.touch.dragging) return; // only allow dragging when configured as movable\n\n if (!this.options.moveable) return; // TODO: this may be redundant in hammerjs2\n // refuse to drag when we where pinching to prevent the timeline make a jump\n // when releasing the fingers in opposite order from the touch screen\n\n if (!this.props.touch.allowDragging) return;\n this.props.touch.dragging = false;\n\n if (this.body.dom.root) {\n this.body.dom.root.style.cursor = 'auto';\n } // fire a rangechanged event\n\n\n this.body.emitter.emit('rangechanged', {\n start: new Date(this.start),\n end: new Date(this.end),\n byUser: true,\n event: event\n });\n };\n /**\n * Event handler for mouse wheel event, used to zoom\n * Code from http://adomas.org/javascript-mouse-wheel/\n * @param {Event} event\n * @private\n */\n\n\n Range.prototype._onMouseWheel = function (event) {\n // retrieve delta\n var delta = 0;\n\n if (event.wheelDelta) {\n /* IE/Opera. */\n delta = event.wheelDelta / 120;\n } else if (event.detail) {\n /* Mozilla case. */\n // In Mozilla, sign of delta is different than in IE.\n // Also, delta is multiple of 3.\n delta = -event.detail / 3;\n } // don't allow zoom when the according key is pressed and the zoomKey option or not zoomable but movable\n\n\n if (this.options.zoomKey && !event[this.options.zoomKey] && this.options.zoomable || !this.options.zoomable && this.options.moveable) {\n if (this.options.horizontalScroll) {\n // Prevent default actions caused by mouse wheel\n // (else the page and timeline both scroll)\n event.preventDefault(); // calculate a single scroll jump relative to the range scale\n\n var diff = delta * (this.end - this.start) / 20; // calculate new start and end\n\n var newStart = this.start - diff;\n var newEnd = this.end - diff;\n this.setRange(newStart, newEnd, false, true, event);\n }\n\n return;\n } // only allow zooming when configured as zoomable and moveable\n\n\n if (!(this.options.zoomable && this.options.moveable)) return; // only zoom when the mouse is inside the current range\n\n if (!this._isInsideRange(event)) return; // If delta is nonzero, handle it.\n // Basically, delta is now positive if wheel was scrolled up,\n // and negative, if wheel was scrolled down.\n\n if (delta) {\n // perform the zoom action. Delta is normally 1 or -1\n // adjust a negative delta such that zooming in with delta 0.1\n // equals zooming out with a delta -0.1\n var scale;\n\n if (delta < 0) {\n scale = 1 - delta / 5;\n } else {\n scale = 1 / (1 + delta / 5);\n } // calculate center, the date to zoom around\n\n\n var pointerDate;\n\n if (this.rolling) {\n pointerDate = (this.start + this.end) / 2;\n } else {\n var pointer = this.getPointer({\n x: event.clientX,\n y: event.clientY\n }, this.body.dom.center);\n pointerDate = this._pointerToDate(pointer);\n }\n\n this.zoom(scale, pointerDate, delta, event); // Prevent default actions caused by mouse wheel\n // (else the page and timeline both scroll)\n\n event.preventDefault();\n }\n };\n /**\n * Start of a touch gesture\n * @private\n */\n\n\n Range.prototype._onTouch = function (event) {\n this.props.touch.start = this.start;\n this.props.touch.end = this.end;\n this.props.touch.allowDragging = true;\n this.props.touch.center = null;\n this.scaleOffset = 0;\n this.deltaDifference = 0;\n };\n /**\n * Handle pinch event\n * @param {Event} event\n * @private\n */\n\n\n Range.prototype._onPinch = function (event) {\n // only allow zooming when configured as zoomable and moveable\n if (!(this.options.zoomable && this.options.moveable)) return;\n this.props.touch.allowDragging = false;\n\n if (!this.props.touch.center) {\n this.props.touch.center = this.getPointer(event.center, this.body.dom.center);\n }\n\n this.stopRolling();\n var scale = 1 / (event.scale + this.scaleOffset);\n\n var centerDate = this._pointerToDate(this.props.touch.center);\n\n var hiddenDuration = DateUtil.getHiddenDurationBetween(this.body.hiddenDates, this.start, this.end);\n var hiddenDurationBefore = DateUtil.getHiddenDurationBefore(this.options.moment, this.body.hiddenDates, this, centerDate);\n var hiddenDurationAfter = hiddenDuration - hiddenDurationBefore; // calculate new start and end\n\n var newStart = centerDate - hiddenDurationBefore + (this.props.touch.start - (centerDate - hiddenDurationBefore)) * scale;\n var newEnd = centerDate + hiddenDurationAfter + (this.props.touch.end - (centerDate + hiddenDurationAfter)) * scale; // snapping times away from hidden zones\n\n this.startToFront = 1 - scale <= 0; // used to do the right auto correction with periodic hidden times\n\n this.endToFront = scale - 1 <= 0; // used to do the right auto correction with periodic hidden times\n\n var safeStart = DateUtil.snapAwayFromHidden(this.body.hiddenDates, newStart, 1 - scale, true);\n var safeEnd = DateUtil.snapAwayFromHidden(this.body.hiddenDates, newEnd, scale - 1, true);\n\n if (safeStart != newStart || safeEnd != newEnd) {\n this.props.touch.start = safeStart;\n this.props.touch.end = safeEnd;\n this.scaleOffset = 1 - event.scale;\n newStart = safeStart;\n newEnd = safeEnd;\n }\n\n this.setRange(newStart, newEnd, false, true, event);\n this.startToFront = false; // revert to default\n\n this.endToFront = true; // revert to default\n };\n /**\n * Test whether the mouse from a mouse event is inside the visible window,\n * between the current start and end date\n * @param {Object} event\n * @return {boolean} Returns true when inside the visible window\n * @private\n */\n\n\n Range.prototype._isInsideRange = function (event) {\n // calculate the time where the mouse is, check whether inside\n // and no scroll action should happen.\n var clientX = event.center ? event.center.x : event.clientX;\n\n if (this.options.rtl) {\n var x = clientX - util.getAbsoluteLeft(this.body.dom.centerContainer);\n } else {\n var x = util.getAbsoluteRight(this.body.dom.centerContainer) - clientX;\n }\n\n var time = this.body.util.toTime(x);\n return time >= this.start && time <= this.end;\n };\n /**\n * Helper function to calculate the center date for zooming\n * @param {{x: Number, y: Number}} pointer\n * @return {number} date\n * @private\n */\n\n\n Range.prototype._pointerToDate = function (pointer) {\n var conversion;\n var direction = this.options.direction;\n validateDirection(direction);\n\n if (direction == 'horizontal') {\n return this.body.util.toTime(pointer.x).valueOf();\n } else {\n var height = this.body.domProps.center.height;\n conversion = this.conversion(height);\n return pointer.y / conversion.scale + conversion.offset;\n }\n };\n /**\n * Get the pointer location relative to the location of the dom element\n * @param {{x: Number, y: Number}} touch\n * @param {Element} element HTML DOM element\n * @return {{x: Number, y: Number}} pointer\n * @private\n */\n\n\n Range.prototype.getPointer = function (touch, element) {\n if (this.options.rtl) {\n return {\n x: util.getAbsoluteRight(element) - touch.x,\n y: touch.y - util.getAbsoluteTop(element)\n };\n } else {\n return {\n x: touch.x - util.getAbsoluteLeft(element),\n y: touch.y - util.getAbsoluteTop(element)\n };\n }\n };\n /**\n * Zoom the range the given scale in or out. Start and end date will\n * be adjusted, and the timeline will be redrawn. You can optionally give a\n * date around which to zoom.\n * For example, try scale = 0.9 or 1.1\n * @param {Number} scale Scaling factor. Values above 1 will zoom out,\n * values below 1 will zoom in.\n * @param {Number} [center] Value representing a date around which will\n * be zoomed.\n */\n\n\n Range.prototype.zoom = function (scale, center, delta, event) {\n // if centerDate is not provided, take it half between start Date and end Date\n if (center == null) {\n center = (this.start + this.end) / 2;\n }\n\n var hiddenDuration = DateUtil.getHiddenDurationBetween(this.body.hiddenDates, this.start, this.end);\n var hiddenDurationBefore = DateUtil.getHiddenDurationBefore(this.options.moment, this.body.hiddenDates, this, center);\n var hiddenDurationAfter = hiddenDuration - hiddenDurationBefore; // calculate new start and end\n\n var newStart = center - hiddenDurationBefore + (this.start - (center - hiddenDurationBefore)) * scale;\n var newEnd = center + hiddenDurationAfter + (this.end - (center + hiddenDurationAfter)) * scale; // snapping times away from hidden zones\n\n this.startToFront = delta > 0 ? false : true; // used to do the right autocorrection with periodic hidden times\n\n this.endToFront = -delta > 0 ? false : true; // used to do the right autocorrection with periodic hidden times\n\n var safeStart = DateUtil.snapAwayFromHidden(this.body.hiddenDates, newStart, delta, true);\n var safeEnd = DateUtil.snapAwayFromHidden(this.body.hiddenDates, newEnd, -delta, true);\n\n if (safeStart != newStart || safeEnd != newEnd) {\n newStart = safeStart;\n newEnd = safeEnd;\n }\n\n this.setRange(newStart, newEnd, false, true, event);\n this.startToFront = false; // revert to default\n\n this.endToFront = true; // revert to default\n };\n /**\n * Move the range with a given delta to the left or right. Start and end\n * value will be adjusted. For example, try delta = 0.1 or -0.1\n * @param {Number} delta Moving amount. Positive value will move right,\n * negative value will move left\n */\n\n\n Range.prototype.move = function (delta) {\n // zoom start Date and end Date relative to the centerDate\n var diff = this.end - this.start; // apply new values\n\n var newStart = this.start + diff * delta;\n var newEnd = this.end + diff * delta; // TODO: reckon with min and max range\n\n this.start = newStart;\n this.end = newEnd;\n };\n /**\n * Move the range to a new center point\n * @param {Number} moveTo New center point of the range\n */\n\n\n Range.prototype.moveTo = function (moveTo) {\n var center = (this.start + this.end) / 2;\n var diff = center - moveTo; // calculate new start and end\n\n var newStart = this.start - diff;\n var newEnd = this.end - diff;\n this.setRange(newStart, newEnd, false, true, null);\n };\n\n module.exports = Range;\n /***/\n },\n /* 128 */\n\n /***/\n function (module, exports, __webpack_require__) {\n 'use strict';\n\n var util = __webpack_require__(1);\n /**\n * Prototype for visual components\n * @param {{dom: Object, domProps: Object, emitter: Emitter, range: Range}} [body]\n * @param {Object} [options]\n */\n\n\n function Component(body, options) {\n this.options = null;\n this.props = null;\n }\n /**\n * Set options for the component. The new options will be merged into the\n * current options.\n * @param {Object} options\n */\n\n\n Component.prototype.setOptions = function (options) {\n if (options) {\n util.extend(this.options, options);\n }\n };\n /**\n * Repaint the component\n * @return {boolean} Returns true if the component is resized\n */\n\n\n Component.prototype.redraw = function () {\n // should be implemented by the component\n return false;\n };\n /**\n * Destroy the component. Cleanup DOM and event listeners\n */\n\n\n Component.prototype.destroy = function () {// should be implemented by the component\n };\n /**\n * Test whether the component is resized since the last time _isResized() was\n * called.\n * @return {Boolean} Returns true if the component is resized\n * @protected\n */\n\n\n Component.prototype._isResized = function () {\n var resized = this.props._previousWidth !== this.props.width || this.props._previousHeight !== this.props.height;\n this.props._previousWidth = this.props.width;\n this.props._previousHeight = this.props.height;\n return resized;\n };\n\n module.exports = Component;\n /***/\n },\n /* 129 */\n\n /***/\n function (module, exports) {\n \"use strict\";\n /**\n * used in Core to convert the options into a volatile variable\n * \n * @param {function} moment\n * @param {Object} body\n * @param {Array | Object} hiddenDates\n */\n\n exports.convertHiddenOptions = function (moment, body, hiddenDates) {\n if (hiddenDates && !Array.isArray(hiddenDates)) {\n return exports.convertHiddenOptions(moment, body, [hiddenDates]);\n }\n\n body.hiddenDates = [];\n\n if (hiddenDates) {\n if (Array.isArray(hiddenDates) == true) {\n for (var i = 0; i < hiddenDates.length; i++) {\n if (hiddenDates[i].repeat === undefined) {\n var dateItem = {};\n dateItem.start = moment(hiddenDates[i].start).toDate().valueOf();\n dateItem.end = moment(hiddenDates[i].end).toDate().valueOf();\n body.hiddenDates.push(dateItem);\n }\n }\n\n body.hiddenDates.sort(function (a, b) {\n return a.start - b.start;\n }); // sort by start time\n }\n }\n };\n /**\n * create new entrees for the repeating hidden dates\n * @param {function} moment\n * @param {Object} body\n * @param {Array | Object} hiddenDates\n */\n\n\n exports.updateHiddenDates = function (moment, body, hiddenDates) {\n if (hiddenDates && !Array.isArray(hiddenDates)) {\n return exports.updateHiddenDates(moment, body, [hiddenDates]);\n }\n\n if (hiddenDates && body.domProps.centerContainer.width !== undefined) {\n exports.convertHiddenOptions(moment, body, hiddenDates);\n var start = moment(body.range.start);\n var end = moment(body.range.end);\n var totalRange = body.range.end - body.range.start;\n var pixelTime = totalRange / body.domProps.centerContainer.width;\n\n for (var i = 0; i < hiddenDates.length; i++) {\n if (hiddenDates[i].repeat !== undefined) {\n var startDate = moment(hiddenDates[i].start);\n var endDate = moment(hiddenDates[i].end);\n\n if (startDate._d == \"Invalid Date\") {\n throw new Error(\"Supplied start date is not valid: \" + hiddenDates[i].start);\n }\n\n if (endDate._d == \"Invalid Date\") {\n throw new Error(\"Supplied end date is not valid: \" + hiddenDates[i].end);\n }\n\n var duration = endDate - startDate;\n\n if (duration >= 4 * pixelTime) {\n var offset = 0;\n var runUntil = end.clone();\n\n switch (hiddenDates[i].repeat) {\n case \"daily\":\n // case of time\n if (startDate.day() != endDate.day()) {\n offset = 1;\n }\n\n startDate.dayOfYear(start.dayOfYear());\n startDate.year(start.year());\n startDate.subtract(7, 'days');\n endDate.dayOfYear(start.dayOfYear());\n endDate.year(start.year());\n endDate.subtract(7 - offset, 'days');\n runUntil.add(1, 'weeks');\n break;\n\n case \"weekly\":\n var dayOffset = endDate.diff(startDate, 'days');\n var day = startDate.day(); // set the start date to the range.start\n\n startDate.date(start.date());\n startDate.month(start.month());\n startDate.year(start.year());\n endDate = startDate.clone(); // force\n\n startDate.day(day);\n endDate.day(day);\n endDate.add(dayOffset, 'days');\n startDate.subtract(1, 'weeks');\n endDate.subtract(1, 'weeks');\n runUntil.add(1, 'weeks');\n break;\n\n case \"monthly\":\n if (startDate.month() != endDate.month()) {\n offset = 1;\n }\n\n startDate.month(start.month());\n startDate.year(start.year());\n startDate.subtract(1, 'months');\n endDate.month(start.month());\n endDate.year(start.year());\n endDate.subtract(1, 'months');\n endDate.add(offset, 'months');\n runUntil.add(1, 'months');\n break;\n\n case \"yearly\":\n if (startDate.year() != endDate.year()) {\n offset = 1;\n }\n\n startDate.year(start.year());\n startDate.subtract(1, 'years');\n endDate.year(start.year());\n endDate.subtract(1, 'years');\n endDate.add(offset, 'years');\n runUntil.add(1, 'years');\n break;\n\n default:\n console.log(\"Wrong repeat format, allowed are: daily, weekly, monthly, yearly. Given:\", hiddenDates[i].repeat);\n return;\n }\n\n while (startDate < runUntil) {\n body.hiddenDates.push({\n start: startDate.valueOf(),\n end: endDate.valueOf()\n });\n\n switch (hiddenDates[i].repeat) {\n case \"daily\":\n startDate.add(1, 'days');\n endDate.add(1, 'days');\n break;\n\n case \"weekly\":\n startDate.add(1, 'weeks');\n endDate.add(1, 'weeks');\n break;\n\n case \"monthly\":\n startDate.add(1, 'months');\n endDate.add(1, 'months');\n break;\n\n case \"yearly\":\n startDate.add(1, 'y');\n endDate.add(1, 'y');\n break;\n\n default:\n console.log(\"Wrong repeat format, allowed are: daily, weekly, monthly, yearly. Given:\", hiddenDates[i].repeat);\n return;\n }\n }\n\n body.hiddenDates.push({\n start: startDate.valueOf(),\n end: endDate.valueOf()\n });\n }\n }\n } // remove duplicates, merge where possible\n\n\n exports.removeDuplicates(body); // ensure the new positions are not on hidden dates\n\n var startHidden = exports.isHidden(body.range.start, body.hiddenDates);\n var endHidden = exports.isHidden(body.range.end, body.hiddenDates);\n var rangeStart = body.range.start;\n var rangeEnd = body.range.end;\n\n if (startHidden.hidden == true) {\n rangeStart = body.range.startToFront == true ? startHidden.startDate - 1 : startHidden.endDate + 1;\n }\n\n if (endHidden.hidden == true) {\n rangeEnd = body.range.endToFront == true ? endHidden.startDate - 1 : endHidden.endDate + 1;\n }\n\n if (startHidden.hidden == true || endHidden.hidden == true) {\n body.range._applyRange(rangeStart, rangeEnd);\n }\n }\n };\n /**\n * remove duplicates from the hidden dates list. Duplicates are evil. They mess everything up.\n * Scales with N^2\n * @param body\n */\n\n\n exports.removeDuplicates = function (body) {\n var hiddenDates = body.hiddenDates;\n var safeDates = [];\n\n for (var i = 0; i < hiddenDates.length; i++) {\n for (var j = 0; j < hiddenDates.length; j++) {\n if (i != j && hiddenDates[j].remove != true && hiddenDates[i].remove != true) {\n // j inside i\n if (hiddenDates[j].start >= hiddenDates[i].start && hiddenDates[j].end <= hiddenDates[i].end) {\n hiddenDates[j].remove = true;\n } // j start inside i\n else if (hiddenDates[j].start >= hiddenDates[i].start && hiddenDates[j].start <= hiddenDates[i].end) {\n hiddenDates[i].end = hiddenDates[j].end;\n hiddenDates[j].remove = true;\n } // j end inside i\n else if (hiddenDates[j].end >= hiddenDates[i].start && hiddenDates[j].end <= hiddenDates[i].end) {\n hiddenDates[i].start = hiddenDates[j].start;\n hiddenDates[j].remove = true;\n }\n }\n }\n }\n\n for (var i = 0; i < hiddenDates.length; i++) {\n if (hiddenDates[i].remove !== true) {\n safeDates.push(hiddenDates[i]);\n }\n }\n\n body.hiddenDates = safeDates;\n body.hiddenDates.sort(function (a, b) {\n return a.start - b.start;\n }); // sort by start time\n };\n\n exports.printDates = function (dates) {\n for (var i = 0; i < dates.length; i++) {\n console.log(i, new Date(dates[i].start), new Date(dates[i].end), dates[i].start, dates[i].end, dates[i].remove);\n }\n };\n /**\n * Used in TimeStep to avoid the hidden times.\n * @param {function} moment\n * @param {TimeStep} timeStep\n * @param previousTime\n */\n\n\n exports.stepOverHiddenDates = function (moment, timeStep, previousTime) {\n var stepInHidden = false;\n var currentValue = timeStep.current.valueOf();\n\n for (var i = 0; i < timeStep.hiddenDates.length; i++) {\n var startDate = timeStep.hiddenDates[i].start;\n var endDate = timeStep.hiddenDates[i].end;\n\n if (currentValue >= startDate && currentValue < endDate) {\n stepInHidden = true;\n break;\n }\n }\n\n if (stepInHidden == true && currentValue < timeStep._end.valueOf() && currentValue != previousTime) {\n var prevValue = moment(previousTime);\n var newValue = moment(endDate); //check if the next step should be major\n\n if (prevValue.year() != newValue.year()) {\n timeStep.switchedYear = true;\n } else if (prevValue.month() != newValue.month()) {\n timeStep.switchedMonth = true;\n } else if (prevValue.dayOfYear() != newValue.dayOfYear()) {\n timeStep.switchedDay = true;\n }\n\n timeStep.current = newValue;\n }\n }; ///**\n // * Used in TimeStep to avoid the hidden times.\n // * @param timeStep\n // * @param previousTime\n // */\n //exports.checkFirstStep = function(timeStep) {\n // var stepInHidden = false;\n // var currentValue = timeStep.current.valueOf();\n // for (var i = 0; i < timeStep.hiddenDates.length; i++) {\n // var startDate = timeStep.hiddenDates[i].start;\n // var endDate = timeStep.hiddenDates[i].end;\n // if (currentValue >= startDate && currentValue < endDate) {\n // stepInHidden = true;\n // break;\n // }\n // }\n //\n // if (stepInHidden == true && currentValue <= timeStep._end.valueOf()) {\n // var newValue = moment(endDate);\n // timeStep.current = newValue.toDate();\n // }\n //};\n\n /**\n * replaces the Core toScreen methods\n * @param Core\n * @param time\n * @param width\n * @returns {number}\n */\n\n\n exports.toScreen = function (Core, time, width) {\n if (Core.body.hiddenDates.length == 0) {\n var conversion = Core.range.conversion(width);\n return (time.valueOf() - conversion.offset) * conversion.scale;\n } else {\n var hidden = exports.isHidden(time, Core.body.hiddenDates);\n\n if (hidden.hidden == true) {\n time = hidden.startDate;\n }\n\n var duration = exports.getHiddenDurationBetween(Core.body.hiddenDates, Core.range.start, Core.range.end);\n\n if (time < Core.range.start) {\n var conversion = Core.range.conversion(width, duration);\n var hiddenBeforeStart = exports.getHiddenDurationBeforeStart(Core.body.hiddenDates, time, conversion.offset);\n time = Core.options.moment(time).toDate().valueOf();\n time = time + hiddenBeforeStart;\n return -(conversion.offset - time.valueOf()) * conversion.scale;\n } else if (time > Core.range.end) {\n var rangeAfterEnd = {\n start: Core.range.start,\n end: time\n };\n time = exports.correctTimeForHidden(Core.options.moment, Core.body.hiddenDates, rangeAfterEnd, time);\n var conversion = Core.range.conversion(width, duration);\n return (time.valueOf() - conversion.offset) * conversion.scale;\n } else {\n time = exports.correctTimeForHidden(Core.options.moment, Core.body.hiddenDates, Core.range, time);\n var conversion = Core.range.conversion(width, duration);\n return (time.valueOf() - conversion.offset) * conversion.scale;\n }\n }\n };\n /**\n * Replaces the core toTime methods\n * @param body\n * @param range\n * @param x\n * @param width\n * @returns {Date}\n */\n\n\n exports.toTime = function (Core, x, width) {\n if (Core.body.hiddenDates.length == 0) {\n var conversion = Core.range.conversion(width);\n return new Date(x / conversion.scale + conversion.offset);\n } else {\n var hiddenDuration = exports.getHiddenDurationBetween(Core.body.hiddenDates, Core.range.start, Core.range.end);\n var totalDuration = Core.range.end - Core.range.start - hiddenDuration;\n var partialDuration = totalDuration * x / width;\n var accumulatedHiddenDuration = exports.getAccumulatedHiddenDuration(Core.body.hiddenDates, Core.range, partialDuration);\n var newTime = new Date(accumulatedHiddenDuration + partialDuration + Core.range.start);\n return newTime;\n }\n };\n /**\n * Support function\n *\n * @param hiddenDates\n * @param range\n * @returns {number}\n */\n\n\n exports.getHiddenDurationBetween = function (hiddenDates, start, end) {\n var duration = 0;\n\n for (var i = 0; i < hiddenDates.length; i++) {\n var startDate = hiddenDates[i].start;\n var endDate = hiddenDates[i].end; // if time after the cutout, and the\n\n if (startDate >= start && endDate < end) {\n duration += endDate - startDate;\n }\n }\n\n return duration;\n };\n /**\n * Support function\n *\n * @param hiddenDates\n * @param start\n * @param end\n * @returns {number}\n */\n\n\n exports.getHiddenDurationBeforeStart = function (hiddenDates, start, end) {\n var duration = 0;\n\n for (var i = 0; i < hiddenDates.length; i++) {\n var startDate = hiddenDates[i].start;\n var endDate = hiddenDates[i].end;\n\n if (startDate >= start && endDate <= end) {\n duration += endDate - startDate;\n }\n }\n\n return duration;\n };\n /**\n * Support function\n * @param moment\n * @param hiddenDates\n * @param range\n * @param time\n * @returns {{duration: number, time: *, offset: number}}\n */\n\n\n exports.correctTimeForHidden = function (moment, hiddenDates, range, time) {\n time = moment(time).toDate().valueOf();\n time -= exports.getHiddenDurationBefore(moment, hiddenDates, range, time);\n return time;\n };\n\n exports.getHiddenDurationBefore = function (moment, hiddenDates, range, time) {\n var timeOffset = 0;\n time = moment(time).toDate().valueOf();\n\n for (var i = 0; i < hiddenDates.length; i++) {\n var startDate = hiddenDates[i].start;\n var endDate = hiddenDates[i].end; // if time after the cutout, and the\n\n if (startDate >= range.start && endDate < range.end) {\n if (time >= endDate) {\n timeOffset += endDate - startDate;\n }\n }\n }\n\n return timeOffset;\n };\n /**\n * sum the duration from start to finish, including the hidden duration,\n * until the required amount has been reached, return the accumulated hidden duration\n * @param hiddenDates\n * @param range\n * @param time\n * @returns {{duration: number, time: *, offset: number}}\n */\n\n\n exports.getAccumulatedHiddenDuration = function (hiddenDates, range, requiredDuration) {\n var hiddenDuration = 0;\n var duration = 0;\n var previousPoint = range.start; //exports.printDates(hiddenDates)\n\n for (var i = 0; i < hiddenDates.length; i++) {\n var startDate = hiddenDates[i].start;\n var endDate = hiddenDates[i].end; // if time after the cutout, and the\n\n if (startDate >= range.start && endDate < range.end) {\n duration += startDate - previousPoint;\n previousPoint = endDate;\n\n if (duration >= requiredDuration) {\n break;\n } else {\n hiddenDuration += endDate - startDate;\n }\n }\n }\n\n return hiddenDuration;\n };\n /**\n * used to step over to either side of a hidden block. Correction is disabled on tablets, might be set to true\n * @param hiddenDates\n * @param time\n * @param direction\n * @param correctionEnabled\n * @returns {*}\n */\n\n\n exports.snapAwayFromHidden = function (hiddenDates, time, direction, correctionEnabled) {\n var isHidden = exports.isHidden(time, hiddenDates);\n\n if (isHidden.hidden == true) {\n if (direction < 0) {\n if (correctionEnabled == true) {\n return isHidden.startDate - (isHidden.endDate - time) - 1;\n } else {\n return isHidden.startDate - 1;\n }\n } else {\n if (correctionEnabled == true) {\n return isHidden.endDate + (time - isHidden.startDate) + 1;\n } else {\n return isHidden.endDate + 1;\n }\n }\n } else {\n return time;\n }\n };\n /**\n * Check if a time is hidden\n *\n * @param time\n * @param hiddenDates\n * @returns {{hidden: boolean, startDate: Window.start, endDate: *}}\n */\n\n\n exports.isHidden = function (time, hiddenDates) {\n for (var i = 0; i < hiddenDates.length; i++) {\n var startDate = hiddenDates[i].start;\n var endDate = hiddenDates[i].end;\n\n if (time >= startDate && time < endDate) {\n // if the start is entering a hidden zone\n return {\n hidden: true,\n startDate: startDate,\n endDate: endDate\n };\n }\n }\n\n return {\n hidden: false,\n startDate: startDate,\n endDate: endDate\n };\n };\n /***/\n\n },\n /* 130 */\n\n /***/\n function (module, exports, __webpack_require__) {\n 'use strict';\n\n var _stringify = __webpack_require__(90);\n\n var _stringify2 = _interopRequireDefault(_stringify);\n\n var _typeof2 = __webpack_require__(62);\n\n var _typeof3 = _interopRequireDefault(_typeof2);\n\n function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n 'default': obj\n };\n }\n\n var Emitter = __webpack_require__(99);\n\n var Hammer = __webpack_require__(112);\n\n var hammerUtil = __webpack_require__(125);\n\n var util = __webpack_require__(1);\n\n var DataSet = __webpack_require__(89);\n\n var DataView = __webpack_require__(93);\n\n var Range = __webpack_require__(127);\n\n var ItemSet = __webpack_require__(131);\n\n var TimeAxis = __webpack_require__(142);\n\n var Activator = __webpack_require__(143);\n\n var DateUtil = __webpack_require__(129);\n\n var CustomTime = __webpack_require__(144);\n /**\n * Create a timeline visualization\n * @constructor\n */\n\n\n function Core() {} // turn Core into an event emitter\n\n\n Emitter(Core.prototype);\n /**\n * Create the main DOM for the Core: a root panel containing left, right,\n * top, bottom, content, and background panel.\n * @param {Element} container The container element where the Core will\n * be attached.\n * @protected\n */\n\n Core.prototype._create = function (container) {\n this.dom = {};\n this.dom.container = container;\n this.dom.root = document.createElement('div');\n this.dom.background = document.createElement('div');\n this.dom.backgroundVertical = document.createElement('div');\n this.dom.backgroundHorizontal = document.createElement('div');\n this.dom.centerContainer = document.createElement('div');\n this.dom.leftContainer = document.createElement('div');\n this.dom.rightContainer = document.createElement('div');\n this.dom.center = document.createElement('div');\n this.dom.left = document.createElement('div');\n this.dom.right = document.createElement('div');\n this.dom.top = document.createElement('div');\n this.dom.bottom = document.createElement('div');\n this.dom.shadowTop = document.createElement('div');\n this.dom.shadowBottom = document.createElement('div');\n this.dom.shadowTopLeft = document.createElement('div');\n this.dom.shadowBottomLeft = document.createElement('div');\n this.dom.shadowTopRight = document.createElement('div');\n this.dom.shadowBottomRight = document.createElement('div');\n this.dom.rollingModeBtn = document.createElement('div');\n this.dom.root.className = 'vis-timeline';\n this.dom.background.className = 'vis-panel vis-background';\n this.dom.backgroundVertical.className = 'vis-panel vis-background vis-vertical';\n this.dom.backgroundHorizontal.className = 'vis-panel vis-background vis-horizontal';\n this.dom.centerContainer.className = 'vis-panel vis-center';\n this.dom.leftContainer.className = 'vis-panel vis-left';\n this.dom.rightContainer.className = 'vis-panel vis-right';\n this.dom.top.className = 'vis-panel vis-top';\n this.dom.bottom.className = 'vis-panel vis-bottom';\n this.dom.left.className = 'vis-content';\n this.dom.center.className = 'vis-content';\n this.dom.right.className = 'vis-content';\n this.dom.shadowTop.className = 'vis-shadow vis-top';\n this.dom.shadowBottom.className = 'vis-shadow vis-bottom';\n this.dom.shadowTopLeft.className = 'vis-shadow vis-top';\n this.dom.shadowBottomLeft.className = 'vis-shadow vis-bottom';\n this.dom.shadowTopRight.className = 'vis-shadow vis-top';\n this.dom.shadowBottomRight.className = 'vis-shadow vis-bottom';\n this.dom.rollingModeBtn.className = 'vis-rolling-mode-btn';\n this.dom.root.appendChild(this.dom.background);\n this.dom.root.appendChild(this.dom.backgroundVertical);\n this.dom.root.appendChild(this.dom.backgroundHorizontal);\n this.dom.root.appendChild(this.dom.centerContainer);\n this.dom.root.appendChild(this.dom.leftContainer);\n this.dom.root.appendChild(this.dom.rightContainer);\n this.dom.root.appendChild(this.dom.top);\n this.dom.root.appendChild(this.dom.bottom);\n this.dom.root.appendChild(this.dom.bottom);\n this.dom.root.appendChild(this.dom.rollingModeBtn);\n this.dom.centerContainer.appendChild(this.dom.center);\n this.dom.leftContainer.appendChild(this.dom.left);\n this.dom.rightContainer.appendChild(this.dom.right);\n this.dom.centerContainer.appendChild(this.dom.shadowTop);\n this.dom.centerContainer.appendChild(this.dom.shadowBottom);\n this.dom.leftContainer.appendChild(this.dom.shadowTopLeft);\n this.dom.leftContainer.appendChild(this.dom.shadowBottomLeft);\n this.dom.rightContainer.appendChild(this.dom.shadowTopRight);\n this.dom.rightContainer.appendChild(this.dom.shadowBottomRight); // size properties of each of the panels\n\n this.props = {\n root: {},\n background: {},\n centerContainer: {},\n leftContainer: {},\n rightContainer: {},\n center: {},\n left: {},\n right: {},\n top: {},\n bottom: {},\n border: {},\n scrollTop: 0,\n scrollTopMin: 0\n };\n this.on('rangechange', function () {\n if (this.initialDrawDone === true) {\n this._redraw();\n }\n }.bind(this));\n this.on('touch', this._onTouch.bind(this));\n this.on('panmove', this._onDrag.bind(this));\n var me = this;\n this._origRedraw = this._redraw.bind(this);\n this._redraw = util.throttle(this._origRedraw);\n this.on('_change', function (properties) {\n if (me.itemSet && me.itemSet.initialItemSetDrawn && properties && properties.queue == true) {\n me._redraw();\n } else {\n me._origRedraw();\n }\n }); // create event listeners for all interesting events, these events will be\n // emitted via emitter\n\n this.hammer = new Hammer(this.dom.root);\n var pinchRecognizer = this.hammer.get('pinch').set({\n enable: true\n });\n hammerUtil.disablePreventDefaultVertically(pinchRecognizer);\n this.hammer.get('pan').set({\n threshold: 5,\n direction: Hammer.DIRECTION_HORIZONTAL\n });\n this.listeners = {};\n var events = ['tap', 'doubletap', 'press', 'pinch', 'pan', 'panstart', 'panmove', 'panend' // TODO: cleanup\n //'touch', 'pinch',\n //'tap', 'doubletap', 'hold',\n //'dragstart', 'drag', 'dragend',\n //'mousewheel', 'DOMMouseScroll' // DOMMouseScroll is needed for Firefox\n ];\n events.forEach(function (type) {\n var listener = function listener(event) {\n if (me.isActive()) {\n me.emit(type, event);\n }\n };\n\n me.hammer.on(type, listener);\n me.listeners[type] = listener;\n }); // emulate a touch event (emitted before the start of a pan, pinch, tap, or press)\n\n hammerUtil.onTouch(this.hammer, function (event) {\n me.emit('touch', event);\n }.bind(this)); // emulate a release event (emitted after a pan, pinch, tap, or press)\n\n hammerUtil.onRelease(this.hammer, function (event) {\n me.emit('release', event);\n }.bind(this));\n\n function onMouseWheel(event) {\n if (this.isActive()) {\n this.emit('mousewheel', event);\n } // prevent scrolling if not specified explicitly or when horizontalScroll is true\n\n\n if (!this.options.verticalScroll || this.options.horizontalScroll) return; // prevent scrolling when zoomKey defined or activated\n\n if (!this.options.zoomKey || event[this.options.zoomKey]) return; // Prevent default actions caused by mouse wheel\n // (else the page and timeline both scroll)\n\n event.preventDefault();\n var delta = 0;\n\n if (event.wheelDelta) {\n /* IE/Opera. */\n delta = event.wheelDelta / 120;\n } else if (event.detail) {\n /* Mozilla case. */\n // In Mozilla, sign of delta is different than in IE.\n // Also, delta is multiple of 3.\n delta = -event.detail / 3;\n }\n\n var current = this.props.scrollTop;\n var adjusted = current + delta * 120;\n\n if (this.isActive()) {\n this._setScrollTop(adjusted);\n\n this._redraw();\n\n this.emit('scroll', event);\n }\n }\n\n if (this.dom.centerContainer.addEventListener) {\n // IE9, Chrome, Safari, Opera\n this.dom.centerContainer.addEventListener(\"mousewheel\", onMouseWheel.bind(this), false); // Firefox\n\n this.dom.centerContainer.addEventListener(\"DOMMouseScroll\", onMouseWheel.bind(this), false);\n } else {\n // IE 6/7/8\n this.dom.centerContainer.attachEvent(\"onmousewheel\", onMouseWheel.bind(this));\n }\n\n function onMouseScrollSide(event) {\n if (!me.options.verticalScroll) return;\n event.preventDefault();\n\n if (me.isActive()) {\n var adjusted = -event.target.scrollTop;\n\n me._setScrollTop(adjusted);\n\n me._redraw();\n\n me.emit('scrollSide', event);\n }\n }\n\n this.dom.left.parentNode.addEventListener('scroll', onMouseScrollSide.bind(this));\n this.dom.right.parentNode.addEventListener('scroll', onMouseScrollSide.bind(this));\n var itemAddedToTimeline = false;\n\n function handleDragOver(event) {\n if (event.preventDefault) {\n event.preventDefault(); // Necessary. Allows us to drop.\n } // make sure your target is a vis element\n\n\n if (!event.target.className.indexOf(\"vis\") > -1) return; // make sure only one item is added every time you're over the timeline\n\n if (itemAddedToTimeline) return;\n event.dataTransfer.dropEffect = 'move';\n itemAddedToTimeline = true;\n return false;\n }\n\n function handleDrop(event) {\n // prevent redirect to blank page - Firefox\n if (event.preventDefault) {\n event.preventDefault();\n }\n\n if (event.stopPropagation) {\n event.stopPropagation();\n } // return when dropping non-vis items \n\n\n try {\n var itemData = JSON.parse(event.dataTransfer.getData(\"text\"));\n if (!itemData.content) return;\n } catch (err) {\n return false;\n }\n\n itemAddedToTimeline = false;\n event.center = {\n x: event.clientX,\n y: event.clientY\n };\n\n me.itemSet._onAddItem(event);\n\n return false;\n }\n\n this.dom.center.addEventListener('dragover', handleDragOver.bind(this), false);\n this.dom.center.addEventListener('drop', handleDrop.bind(this), false);\n this.customTimes = []; // store state information needed for touch events\n\n this.touch = {};\n this.redrawCount = 0;\n this.initialDrawDone = false; // attach the root panel to the provided container\n\n if (!container) throw new Error('No container provided');\n container.appendChild(this.dom.root);\n };\n /**\n * Set options. Options will be passed to all components loaded in the Timeline.\n * @param {Object} [options]\n * {String} orientation\n * Vertical orientation for the Timeline,\n * can be 'bottom' (default) or 'top'.\n * {String | Number} width\n * Width for the timeline, a number in pixels or\n * a css string like '1000px' or '75%'. '100%' by default.\n * {String | Number} height\n * Fixed height for the Timeline, a number in pixels or\n * a css string like '400px' or '75%'. If undefined,\n * The Timeline will automatically size such that\n * its contents fit.\n * {String | Number} minHeight\n * Minimum height for the Timeline, a number in pixels or\n * a css string like '400px' or '75%'.\n * {String | Number} maxHeight\n * Maximum height for the Timeline, a number in pixels or\n * a css string like '400px' or '75%'.\n * {Number | Date | String} start\n * Start date for the visible window\n * {Number | Date | String} end\n * End date for the visible window\n */\n\n\n Core.prototype.setOptions = function (options) {\n if (options) {\n // copy the known options\n var fields = ['width', 'height', 'minHeight', 'maxHeight', 'autoResize', 'start', 'end', 'clickToUse', 'dataAttributes', 'hiddenDates', 'locale', 'locales', 'moment', 'rtl', 'zoomKey', 'horizontalScroll', 'verticalScroll'];\n util.selectiveExtend(fields, this.options, options);\n this.dom.rollingModeBtn.style.visibility = 'hidden';\n\n if (this.options.rtl) {\n this.dom.container.style.direction = \"rtl\";\n this.dom.backgroundVertical.className = 'vis-panel vis-background vis-vertical-rtl';\n }\n\n if (this.options.verticalScroll) {\n if (this.options.rtl) {\n this.dom.rightContainer.className = 'vis-panel vis-right vis-vertical-scroll';\n } else {\n this.dom.leftContainer.className = 'vis-panel vis-left vis-vertical-scroll';\n }\n }\n\n this.options.orientation = {\n item: undefined,\n axis: undefined\n };\n\n if ('orientation' in options) {\n if (typeof options.orientation === 'string') {\n this.options.orientation = {\n item: options.orientation,\n axis: options.orientation\n };\n } else if ((0, _typeof3['default'])(options.orientation) === 'object') {\n if ('item' in options.orientation) {\n this.options.orientation.item = options.orientation.item;\n }\n\n if ('axis' in options.orientation) {\n this.options.orientation.axis = options.orientation.axis;\n }\n }\n }\n\n if (this.options.orientation.axis === 'both') {\n if (!this.timeAxis2) {\n var timeAxis2 = this.timeAxis2 = new TimeAxis(this.body);\n\n timeAxis2.setOptions = function (options) {\n var _options = options ? util.extend({}, options) : {};\n\n _options.orientation = 'top'; // override the orientation option, always top\n\n TimeAxis.prototype.setOptions.call(timeAxis2, _options);\n };\n\n this.components.push(timeAxis2);\n }\n } else {\n if (this.timeAxis2) {\n var index = this.components.indexOf(this.timeAxis2);\n\n if (index !== -1) {\n this.components.splice(index, 1);\n }\n\n this.timeAxis2.destroy();\n this.timeAxis2 = null;\n }\n } // if the graph2d's drawPoints is a function delegate the callback to the onRender property\n\n\n if (typeof options.drawPoints == 'function') {\n options.drawPoints = {\n onRender: options.drawPoints\n };\n }\n\n if ('hiddenDates' in this.options) {\n DateUtil.convertHiddenOptions(this.options.moment, this.body, this.options.hiddenDates);\n }\n\n if ('clickToUse' in options) {\n if (options.clickToUse) {\n if (!this.activator) {\n this.activator = new Activator(this.dom.root);\n }\n } else {\n if (this.activator) {\n this.activator.destroy();\n delete this.activator;\n }\n }\n }\n\n if ('showCustomTime' in options) {\n throw new Error('Option `showCustomTime` is deprecated. Create a custom time bar via timeline.addCustomTime(time [, id])');\n } // enable/disable autoResize\n\n\n this._initAutoResize();\n } // propagate options to all components\n\n\n this.components.forEach(function (component) {\n return component.setOptions(options);\n }); // enable/disable configure\n\n if ('configure' in options) {\n if (!this.configurator) {\n this.configurator = this._createConfigurator();\n }\n\n this.configurator.setOptions(options.configure); // collect the settings of all components, and pass them to the configuration system\n\n var appliedOptions = util.deepExtend({}, this.options);\n this.components.forEach(function (component) {\n util.deepExtend(appliedOptions, component.options);\n });\n this.configurator.setModuleOptions({\n global: appliedOptions\n });\n }\n\n this._redraw();\n };\n /**\n * Returns true when the Timeline is active.\n * @returns {boolean}\n */\n\n\n Core.prototype.isActive = function () {\n return !this.activator || this.activator.active;\n };\n /**\n * Destroy the Core, clean up all DOM elements and event listeners.\n */\n\n\n Core.prototype.destroy = function () {\n // unbind datasets\n this.setItems(null);\n this.setGroups(null); // remove all event listeners\n\n this.off(); // stop checking for changed size\n\n this._stopAutoResize(); // remove from DOM\n\n\n if (this.dom.root.parentNode) {\n this.dom.root.parentNode.removeChild(this.dom.root);\n }\n\n this.dom = null; // remove Activator\n\n if (this.activator) {\n this.activator.destroy();\n delete this.activator;\n } // cleanup hammer touch events\n\n\n for (var event in this.listeners) {\n if (this.listeners.hasOwnProperty(event)) {\n delete this.listeners[event];\n }\n }\n\n this.listeners = null;\n this.hammer = null; // give all components the opportunity to cleanup\n\n this.components.forEach(function (component) {\n return component.destroy();\n });\n this.body = null;\n };\n /**\n * Set a custom time bar\n * @param {Date} time\n * @param {number} [id=undefined] Optional id of the custom time bar to be adjusted.\n */\n\n\n Core.prototype.setCustomTime = function (time, id) {\n var customTimes = this.customTimes.filter(function (component) {\n return id === component.options.id;\n });\n\n if (customTimes.length === 0) {\n throw new Error('No custom time bar found with id ' + (0, _stringify2['default'])(id));\n }\n\n if (customTimes.length > 0) {\n customTimes[0].setCustomTime(time);\n }\n };\n /**\n * Retrieve the current custom time.\n * @param {number} [id=undefined] Id of the custom time bar.\n * @return {Date | undefined} customTime\n */\n\n\n Core.prototype.getCustomTime = function (id) {\n var customTimes = this.customTimes.filter(function (component) {\n return component.options.id === id;\n });\n\n if (customTimes.length === 0) {\n throw new Error('No custom time bar found with id ' + (0, _stringify2['default'])(id));\n }\n\n return customTimes[0].getCustomTime();\n };\n /**\n * Set a custom title for the custom time bar.\n * @param {String} [title] Custom title\n * @param {number} [id=undefined] Id of the custom time bar.\n */\n\n\n Core.prototype.setCustomTimeTitle = function (title, id) {\n var customTimes = this.customTimes.filter(function (component) {\n return component.options.id === id;\n });\n\n if (customTimes.length === 0) {\n throw new Error('No custom time bar found with id ' + (0, _stringify2['default'])(id));\n }\n\n if (customTimes.length > 0) {\n return customTimes[0].setCustomTitle(title);\n }\n };\n /**\n * Retrieve meta information from an event.\n * Should be overridden by classes extending Core\n * @param {Event} event\n * @return {Object} An object with related information.\n */\n\n\n Core.prototype.getEventProperties = function (event) {\n return {\n event: event\n };\n };\n /**\n * Add custom vertical bar\n * @param {Date | String | Number} [time] A Date, unix timestamp, or\n * ISO date string. Time point where\n * the new bar should be placed.\n * If not provided, `new Date()` will\n * be used.\n * @param {Number | String} [id=undefined] Id of the new bar. Optional\n * @return {Number | String} Returns the id of the new bar\n */\n\n\n Core.prototype.addCustomTime = function (time, id) {\n var timestamp = time !== undefined ? util.convert(time, 'Date').valueOf() : new Date();\n var exists = this.customTimes.some(function (customTime) {\n return customTime.options.id === id;\n });\n\n if (exists) {\n throw new Error('A custom time with id ' + (0, _stringify2['default'])(id) + ' already exists');\n }\n\n var customTime = new CustomTime(this.body, util.extend({}, this.options, {\n time: timestamp,\n id: id\n }));\n this.customTimes.push(customTime);\n this.components.push(customTime);\n\n this._redraw();\n\n return id;\n };\n /**\n * Remove previously added custom bar\n * @param {int} id ID of the custom bar to be removed\n * @return {boolean} True if the bar exists and is removed, false otherwise\n */\n\n\n Core.prototype.removeCustomTime = function (id) {\n var customTimes = this.customTimes.filter(function (bar) {\n return bar.options.id === id;\n });\n\n if (customTimes.length === 0) {\n throw new Error('No custom time bar found with id ' + (0, _stringify2['default'])(id));\n }\n\n customTimes.forEach(function (customTime) {\n this.customTimes.splice(this.customTimes.indexOf(customTime), 1);\n this.components.splice(this.components.indexOf(customTime), 1);\n customTime.destroy();\n }.bind(this));\n };\n /**\n * Get the id's of the currently visible items.\n * @returns {Array} The ids of the visible items\n */\n\n\n Core.prototype.getVisibleItems = function () {\n return this.itemSet && this.itemSet.getVisibleItems() || [];\n };\n /**\n * Set Core window such that it fits all items\n * @param {Object} [options] Available options:\n * `animation: boolean | {duration: number, easingFunction: string}`\n * If true (default), the range is animated\n * smoothly to the new window. An object can be\n * provided to specify duration and easing function.\n * Default duration is 500 ms, and default easing\n * function is 'easeInOutQuad'.\n */\n\n\n Core.prototype.fit = function (options) {\n var range = this.getDataRange(); // skip range set if there is no min and max date\n\n if (range.min === null && range.max === null) {\n return;\n } // apply a margin of 1% left and right of the data\n\n\n var interval = range.max - range.min;\n var min = new Date(range.min.valueOf() - interval * 0.01);\n var max = new Date(range.max.valueOf() + interval * 0.01);\n var animation = options && options.animation !== undefined ? options.animation : true;\n this.range.setRange(min, max, animation);\n };\n /**\n * Calculate the data range of the items start and end dates\n * @returns {{min: Date | null, max: Date | null}}\n * @protected\n */\n\n\n Core.prototype.getDataRange = function () {\n // must be implemented by Timeline and Graph2d\n throw new Error('Cannot invoke abstract method getDataRange');\n };\n /**\n * Set the visible window. Both parameters are optional, you can change only\n * start or only end. Syntax:\n *\n * TimeLine.setWindow(start, end)\n * TimeLine.setWindow(start, end, options)\n * TimeLine.setWindow(range)\n *\n * Where start and end can be a Date, number, or string, and range is an\n * object with properties start and end.\n *\n * @param {Date | Number | String | Object} [start] Start date of visible window\n * @param {Date | Number | String} [end] End date of visible window\n * @param {Object} [options] Available options:\n * `animation: boolean | {duration: number, easingFunction: string}`\n * If true (default), the range is animated\n * smoothly to the new window. An object can be\n * provided to specify duration and easing function.\n * Default duration is 500 ms, and default easing\n * function is 'easeInOutQuad'.\n */\n\n\n Core.prototype.setWindow = function (start, end, options) {\n var animation;\n\n if (arguments.length == 1) {\n var range = arguments[0];\n animation = range.animation !== undefined ? range.animation : true;\n this.range.setRange(range.start, range.end, animation);\n } else {\n animation = options && options.animation !== undefined ? options.animation : true;\n this.range.setRange(start, end, animation);\n }\n };\n /**\n * Move the window such that given time is centered on screen.\n * @param {Date | Number | String} time\n * @param {Object} [options] Available options:\n * `animation: boolean | {duration: number, easingFunction: string}`\n * If true (default), the range is animated\n * smoothly to the new window. An object can be\n * provided to specify duration and easing function.\n * Default duration is 500 ms, and default easing\n * function is 'easeInOutQuad'.\n */\n\n\n Core.prototype.moveTo = function (time, options) {\n var interval = this.range.end - this.range.start;\n var t = util.convert(time, 'Date').valueOf();\n var start = t - interval / 2;\n var end = t + interval / 2;\n var animation = options && options.animation !== undefined ? options.animation : true;\n this.range.setRange(start, end, animation);\n };\n /**\n * Get the visible window\n * @return {{start: Date, end: Date}} Visible range\n */\n\n\n Core.prototype.getWindow = function () {\n var range = this.range.getRange();\n return {\n start: new Date(range.start),\n end: new Date(range.end)\n };\n };\n /**\n * Zoom in the window such that given time is centered on screen.\n * @param {Number} percentage - must be between [0..1]\n * @param {Object} [options] Available options:\n * `animation: boolean | {duration: number, easingFunction: string}`\n * If true (default), the range is animated\n * smoothly to the new window. An object can be\n * provided to specify duration and easing function.\n * Default duration is 500 ms, and default easing\n * function is 'easeInOutQuad'.\n */\n\n\n Core.prototype.zoomIn = function (percentage, options) {\n if (!percentage || percentage < 0 || percentage > 1) return;\n var range = this.getWindow();\n var start = range.start.valueOf();\n var end = range.end.valueOf();\n var interval = end - start;\n var newInterval = interval / (1 + percentage);\n var distance = (interval - newInterval) / 2;\n var newStart = start + distance;\n var newEnd = end - distance;\n this.setWindow(newStart, newEnd, options);\n };\n /**\n * Zoom out the window such that given time is centered on screen.\n * @param {Number} percentage - must be between [0..1]\n * @param {Object} [options] Available options:\n * `animation: boolean | {duration: number, easingFunction: string}`\n * If true (default), the range is animated\n * smoothly to the new window. An object can be\n * provided to specify duration and easing function.\n * Default duration is 500 ms, and default easing\n * function is 'easeInOutQuad'.\n */\n\n\n Core.prototype.zoomOut = function (percentage, options) {\n if (!percentage || percentage < 0 || percentage > 1) return;\n var range = this.getWindow();\n var start = range.start.valueOf();\n var end = range.end.valueOf();\n var interval = end - start;\n var newStart = start - interval * percentage / 2;\n var newEnd = end + interval * percentage / 2;\n this.setWindow(newStart, newEnd, options);\n };\n /**\n * Force a redraw. Can be overridden by implementations of Core\n *\n * Note: this function will be overridden on construction with a trottled version\n */\n\n\n Core.prototype.redraw = function () {\n this._redraw();\n };\n /**\n * Redraw for internal use. Redraws all components. See also the public\n * method redraw.\n * @protected\n */\n\n\n Core.prototype._redraw = function () {\n this.redrawCount++;\n var resized = false;\n var options = this.options;\n var props = this.props;\n var dom = this.dom;\n if (!dom || !dom.container || dom.root.offsetWidth == 0) return; // when destroyed, or invisible\n\n DateUtil.updateHiddenDates(this.options.moment, this.body, this.options.hiddenDates); // update class names\n\n if (options.orientation == 'top') {\n util.addClassName(dom.root, 'vis-top');\n util.removeClassName(dom.root, 'vis-bottom');\n } else {\n util.removeClassName(dom.root, 'vis-top');\n util.addClassName(dom.root, 'vis-bottom');\n } // update root width and height options\n\n\n dom.root.style.maxHeight = util.option.asSize(options.maxHeight, '');\n dom.root.style.minHeight = util.option.asSize(options.minHeight, '');\n dom.root.style.width = util.option.asSize(options.width, ''); // calculate border widths\n\n props.border.left = (dom.centerContainer.offsetWidth - dom.centerContainer.clientWidth) / 2;\n props.border.right = props.border.left;\n props.border.top = (dom.centerContainer.offsetHeight - dom.centerContainer.clientHeight) / 2;\n props.border.bottom = props.border.top;\n props.borderRootHeight = dom.root.offsetHeight - dom.root.clientHeight;\n props.borderRootWidth = dom.root.offsetWidth - dom.root.clientWidth; // workaround for a bug in IE: the clientWidth of an element with\n // a height:0px and overflow:hidden is not calculated and always has value 0\n\n if (dom.centerContainer.clientHeight === 0) {\n props.border.left = props.border.top;\n props.border.right = props.border.left;\n }\n\n if (dom.root.clientHeight === 0) {\n props.borderRootWidth = props.borderRootHeight;\n } // calculate the heights. If any of the side panels is empty, we set the height to\n // minus the border width, such that the border will be invisible\n\n\n props.center.height = dom.center.offsetHeight;\n props.left.height = dom.left.offsetHeight;\n props.right.height = dom.right.offsetHeight;\n props.top.height = dom.top.clientHeight || -props.border.top;\n props.bottom.height = dom.bottom.clientHeight || -props.border.bottom; // TODO: compensate borders when any of the panels is empty.\n // apply auto height\n // TODO: only calculate autoHeight when needed (else we cause an extra reflow/repaint of the DOM)\n\n var contentHeight = Math.max(props.left.height, props.center.height, props.right.height);\n var autoHeight = props.top.height + contentHeight + props.bottom.height + props.borderRootHeight + props.border.top + props.border.bottom;\n dom.root.style.height = util.option.asSize(options.height, autoHeight + 'px'); // calculate heights of the content panels\n\n props.root.height = dom.root.offsetHeight;\n props.background.height = props.root.height - props.borderRootHeight;\n var containerHeight = props.root.height - props.top.height - props.bottom.height - props.borderRootHeight;\n props.centerContainer.height = containerHeight;\n props.leftContainer.height = containerHeight;\n props.rightContainer.height = props.leftContainer.height; // calculate the widths of the panels\n\n props.root.width = dom.root.offsetWidth;\n props.background.width = props.root.width - props.borderRootWidth;\n\n if (!this.initialDrawDone) {\n props.scrollbarWidth = util.getScrollBarWidth();\n }\n\n if (options.verticalScroll) {\n if (options.rtl) {\n props.left.width = dom.leftContainer.clientWidth || -props.border.left;\n props.right.width = dom.rightContainer.clientWidth + props.scrollbarWidth || -props.border.right;\n } else {\n props.left.width = dom.leftContainer.clientWidth + props.scrollbarWidth || -props.border.left;\n props.right.width = dom.rightContainer.clientWidth || -props.border.right;\n }\n } else {\n props.left.width = dom.leftContainer.clientWidth || -props.border.left;\n props.right.width = dom.rightContainer.clientWidth || -props.border.right;\n }\n\n this._setDOM(); // update the scrollTop, feasible range for the offset can be changed\n // when the height of the Core or of the contents of the center changed\n\n\n var offset = this._updateScrollTop(); // reposition the scrollable contents\n\n\n if (options.orientation.item != 'top') {\n offset += Math.max(props.centerContainer.height - props.center.height - props.border.top - props.border.bottom, 0);\n }\n\n dom.center.style.top = offset + 'px'; // show shadows when vertical scrolling is available\n\n var visibilityTop = props.scrollTop == 0 ? 'hidden' : '';\n var visibilityBottom = props.scrollTop == props.scrollTopMin ? 'hidden' : '';\n dom.shadowTop.style.visibility = visibilityTop;\n dom.shadowBottom.style.visibility = visibilityBottom;\n dom.shadowTopLeft.style.visibility = visibilityTop;\n dom.shadowBottomLeft.style.visibility = visibilityBottom;\n dom.shadowTopRight.style.visibility = visibilityTop;\n dom.shadowBottomRight.style.visibility = visibilityBottom;\n\n if (options.verticalScroll) {\n dom.rightContainer.className = 'vis-panel vis-right vis-vertical-scroll';\n dom.leftContainer.className = 'vis-panel vis-left vis-vertical-scroll';\n dom.shadowTopRight.style.visibility = \"hidden\";\n dom.shadowBottomRight.style.visibility = \"hidden\";\n dom.shadowTopLeft.style.visibility = \"hidden\";\n dom.shadowBottomLeft.style.visibility = \"hidden\";\n dom.left.style.top = '0px';\n dom.right.style.top = '0px';\n }\n\n if (!options.verticalScroll || props.center.height < props.centerContainer.height) {\n dom.left.style.top = offset + 'px';\n dom.right.style.top = offset + 'px';\n dom.rightContainer.className = dom.rightContainer.className.replace(new RegExp('(?:^|\\\\s)' + 'vis-vertical-scroll' + '(?:\\\\s|$)'), ' ');\n dom.leftContainer.className = dom.leftContainer.className.replace(new RegExp('(?:^|\\\\s)' + 'vis-vertical-scroll' + '(?:\\\\s|$)'), ' ');\n props.left.width = dom.leftContainer.clientWidth || -props.border.left;\n props.right.width = dom.rightContainer.clientWidth || -props.border.right;\n\n this._setDOM();\n } // enable/disable vertical panning\n\n\n var contentsOverflow = props.center.height > props.centerContainer.height;\n this.hammer.get('pan').set({\n direction: contentsOverflow ? Hammer.DIRECTION_ALL : Hammer.DIRECTION_HORIZONTAL\n }); // redraw all components\n\n this.components.forEach(function (component) {\n resized = component.redraw() || resized;\n });\n var MAX_REDRAW = 5;\n\n if (resized) {\n if (this.redrawCount < MAX_REDRAW) {\n this.body.emitter.emit('_change');\n return;\n } else {\n console.log('WARNING: infinite loop in redraw?');\n }\n } else {\n this.redrawCount = 0;\n }\n\n this.initialDrawDone = true; //Emit public 'changed' event for UI updates, see issue #1592\n\n this.body.emitter.emit(\"changed\");\n };\n\n Core.prototype._setDOM = function () {\n var props = this.props;\n var dom = this.dom;\n props.leftContainer.width = props.left.width;\n props.rightContainer.width = props.right.width;\n var centerWidth = props.root.width - props.left.width - props.right.width - props.borderRootWidth;\n props.center.width = centerWidth;\n props.centerContainer.width = centerWidth;\n props.top.width = centerWidth;\n props.bottom.width = centerWidth; // resize the panels\n\n dom.background.style.height = props.background.height + 'px';\n dom.backgroundVertical.style.height = props.background.height + 'px';\n dom.backgroundHorizontal.style.height = props.centerContainer.height + 'px';\n dom.centerContainer.style.height = props.centerContainer.height + 'px';\n dom.leftContainer.style.height = props.leftContainer.height + 'px';\n dom.rightContainer.style.height = props.rightContainer.height + 'px';\n dom.background.style.width = props.background.width + 'px';\n dom.backgroundVertical.style.width = props.centerContainer.width + 'px';\n dom.backgroundHorizontal.style.width = props.background.width + 'px';\n dom.centerContainer.style.width = props.center.width + 'px';\n dom.top.style.width = props.top.width + 'px';\n dom.bottom.style.width = props.bottom.width + 'px'; // reposition the panels\n\n dom.background.style.left = '0';\n dom.background.style.top = '0';\n dom.backgroundVertical.style.left = props.left.width + props.border.left + 'px';\n dom.backgroundVertical.style.top = '0';\n dom.backgroundHorizontal.style.left = '0';\n dom.backgroundHorizontal.style.top = props.top.height + 'px';\n dom.centerContainer.style.left = props.left.width + 'px';\n dom.centerContainer.style.top = props.top.height + 'px';\n dom.leftContainer.style.left = '0';\n dom.leftContainer.style.top = props.top.height + 'px';\n dom.rightContainer.style.left = props.left.width + props.center.width + 'px';\n dom.rightContainer.style.top = props.top.height + 'px';\n dom.top.style.left = props.left.width + 'px';\n dom.top.style.top = '0';\n dom.bottom.style.left = props.left.width + 'px';\n dom.bottom.style.top = props.top.height + props.centerContainer.height + 'px';\n dom.center.style.left = '0';\n dom.left.style.left = '0';\n dom.right.style.left = '0';\n }; // TODO: deprecated since version 1.1.0, remove some day\n\n\n Core.prototype.repaint = function () {\n throw new Error('Function repaint is deprecated. Use redraw instead.');\n };\n /**\n * Set a current time. This can be used for example to ensure that a client's\n * time is synchronized with a shared server time.\n * Only applicable when option `showCurrentTime` is true.\n * @param {Date | String | Number} time A Date, unix timestamp, or\n * ISO date string.\n */\n\n\n Core.prototype.setCurrentTime = function (time) {\n if (!this.currentTime) {\n throw new Error('Option showCurrentTime must be true');\n }\n\n this.currentTime.setCurrentTime(time);\n };\n /**\n * Get the current time.\n * Only applicable when option `showCurrentTime` is true.\n * @return {Date} Returns the current time.\n */\n\n\n Core.prototype.getCurrentTime = function () {\n if (!this.currentTime) {\n throw new Error('Option showCurrentTime must be true');\n }\n\n return this.currentTime.getCurrentTime();\n };\n /**\n * Convert a position on screen (pixels) to a datetime\n * @param {int} x Position on the screen in pixels\n * @return {Date} time The datetime the corresponds with given position x\n * @protected\n */\n // TODO: move this function to Range\n\n\n Core.prototype._toTime = function (x) {\n return DateUtil.toTime(this, x, this.props.center.width);\n };\n /**\n * Convert a position on the global screen (pixels) to a datetime\n * @param {int} x Position on the screen in pixels\n * @return {Date} time The datetime the corresponds with given position x\n * @protected\n */\n // TODO: move this function to Range\n\n\n Core.prototype._toGlobalTime = function (x) {\n return DateUtil.toTime(this, x, this.props.root.width); //var conversion = this.range.conversion(this.props.root.width);\n //return new Date(x / conversion.scale + conversion.offset);\n };\n /**\n * Convert a datetime (Date object) into a position on the screen\n * @param {Date} time A date\n * @return {int} x The position on the screen in pixels which corresponds\n * with the given date.\n * @protected\n */\n // TODO: move this function to Range\n\n\n Core.prototype._toScreen = function (time) {\n return DateUtil.toScreen(this, time, this.props.center.width);\n };\n /**\n * Convert a datetime (Date object) into a position on the root\n * This is used to get the pixel density estimate for the screen, not the center panel\n * @param {Date} time A date\n * @return {int} x The position on root in pixels which corresponds\n * with the given date.\n * @protected\n */\n // TODO: move this function to Range\n\n\n Core.prototype._toGlobalScreen = function (time) {\n return DateUtil.toScreen(this, time, this.props.root.width); //var conversion = this.range.conversion(this.props.root.width);\n //return (time.valueOf() - conversion.offset) * conversion.scale;\n };\n /**\n * Initialize watching when option autoResize is true\n * @private\n */\n\n\n Core.prototype._initAutoResize = function () {\n if (this.options.autoResize == true) {\n this._startAutoResize();\n } else {\n this._stopAutoResize();\n }\n };\n /**\n * Watch for changes in the size of the container. On resize, the Panel will\n * automatically redraw itself.\n * @private\n */\n\n\n Core.prototype._startAutoResize = function () {\n var me = this;\n\n this._stopAutoResize();\n\n this._onResize = function () {\n if (me.options.autoResize != true) {\n // stop watching when the option autoResize is changed to false\n me._stopAutoResize();\n\n return;\n }\n\n if (me.dom.root) {\n // check whether the frame is resized\n // Note: we compare offsetWidth here, not clientWidth. For some reason,\n // IE does not restore the clientWidth from 0 to the actual width after\n // changing the timeline's container display style from none to visible\n if (me.dom.root.offsetWidth != me.props.lastWidth || me.dom.root.offsetHeight != me.props.lastHeight) {\n me.props.lastWidth = me.dom.root.offsetWidth;\n me.props.lastHeight = me.dom.root.offsetHeight;\n me.props.scrollbarWidth = util.getScrollBarWidth();\n me.body.emitter.emit('_change');\n }\n }\n }; // add event listener to window resize\n\n\n util.addEventListener(window, 'resize', this._onResize); //Prevent initial unnecessary redraw\n\n if (me.dom.root) {\n me.props.lastWidth = me.dom.root.offsetWidth;\n me.props.lastHeight = me.dom.root.offsetHeight;\n }\n\n this.watchTimer = setInterval(this._onResize, 1000);\n };\n /**\n * Stop watching for a resize of the frame.\n * @private\n */\n\n\n Core.prototype._stopAutoResize = function () {\n if (this.watchTimer) {\n clearInterval(this.watchTimer);\n this.watchTimer = undefined;\n } // remove event listener on window.resize\n\n\n if (this._onResize) {\n util.removeEventListener(window, 'resize', this._onResize);\n this._onResize = null;\n }\n };\n /**\n * Start moving the timeline vertically\n * @param {Event} event\n * @private\n */\n\n\n Core.prototype._onTouch = function (event) {\n this.touch.allowDragging = true;\n this.touch.initialScrollTop = this.props.scrollTop;\n };\n /**\n * Start moving the timeline vertically\n * @param {Event} event\n * @private\n */\n\n\n Core.prototype._onPinch = function (event) {\n this.touch.allowDragging = false;\n };\n /**\n * Move the timeline vertically\n * @param {Event} event\n * @private\n */\n\n\n Core.prototype._onDrag = function (event) {\n if (!event) return; // refuse to drag when we where pinching to prevent the timeline make a jump\n // when releasing the fingers in opposite order from the touch screen\n\n if (!this.touch.allowDragging) return;\n var delta = event.deltaY;\n\n var oldScrollTop = this._getScrollTop();\n\n var newScrollTop = this._setScrollTop(this.touch.initialScrollTop + delta);\n\n if (this.options.verticalScroll) {\n this.dom.left.parentNode.scrollTop = -this.props.scrollTop;\n this.dom.right.parentNode.scrollTop = -this.props.scrollTop;\n }\n\n if (newScrollTop != oldScrollTop) {\n this.emit(\"verticalDrag\");\n }\n };\n /**\n * Apply a scrollTop\n * @param {Number} scrollTop\n * @returns {Number} scrollTop Returns the applied scrollTop\n * @private\n */\n\n\n Core.prototype._setScrollTop = function (scrollTop) {\n this.props.scrollTop = scrollTop;\n\n this._updateScrollTop();\n\n return this.props.scrollTop;\n };\n /**\n * Update the current scrollTop when the height of the containers has been changed\n * @returns {Number} scrollTop Returns the applied scrollTop\n * @private\n */\n\n\n Core.prototype._updateScrollTop = function () {\n // recalculate the scrollTopMin\n var scrollTopMin = Math.min(this.props.centerContainer.height - this.props.center.height, 0); // is negative or zero\n\n if (scrollTopMin != this.props.scrollTopMin) {\n // in case of bottom orientation, change the scrollTop such that the contents\n // do not move relative to the time axis at the bottom\n if (this.options.orientation.item != 'top') {\n this.props.scrollTop += scrollTopMin - this.props.scrollTopMin;\n }\n\n this.props.scrollTopMin = scrollTopMin;\n } // limit the scrollTop to the feasible scroll range\n\n\n if (this.props.scrollTop > 0) this.props.scrollTop = 0;\n if (this.props.scrollTop < scrollTopMin) this.props.scrollTop = scrollTopMin;\n\n if (this.options.verticalScroll) {\n this.dom.left.parentNode.scrollTop = -this.props.scrollTop;\n this.dom.right.parentNode.scrollTop = -this.props.scrollTop;\n }\n\n return this.props.scrollTop;\n };\n /**\n * Get the current scrollTop\n * @returns {number} scrollTop\n * @private\n */\n\n\n Core.prototype._getScrollTop = function () {\n return this.props.scrollTop;\n };\n /**\n * Load a configurator\n * @return {Object}\n * @private\n */\n\n\n Core.prototype._createConfigurator = function () {\n throw new Error('Cannot invoke abstract method _createConfigurator');\n };\n\n module.exports = Core;\n /***/\n },\n /* 131 */\n\n /***/\n function (module, exports, __webpack_require__) {\n 'use strict';\n\n var _create = __webpack_require__(55);\n\n var _create2 = _interopRequireDefault(_create);\n\n var _typeof2 = __webpack_require__(62);\n\n var _typeof3 = _interopRequireDefault(_typeof2);\n\n var _Popup = __webpack_require__(132);\n\n var _Popup2 = _interopRequireDefault(_Popup);\n\n function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n 'default': obj\n };\n }\n\n var Hammer = __webpack_require__(112);\n\n var util = __webpack_require__(1);\n\n var DataSet = __webpack_require__(89);\n\n var DataView = __webpack_require__(93);\n\n var TimeStep = __webpack_require__(133);\n\n var Component = __webpack_require__(128);\n\n var Group = __webpack_require__(134);\n\n var BackgroundGroup = __webpack_require__(138);\n\n var BoxItem = __webpack_require__(139);\n\n var PointItem = __webpack_require__(140);\n\n var RangeItem = __webpack_require__(136);\n\n var BackgroundItem = __webpack_require__(141);\n\n var UNGROUPED = '__ungrouped__'; // reserved group id for ungrouped items\n\n var BACKGROUND = '__background__'; // reserved group id for background items without group\n\n /**\n * An ItemSet holds a set of items and ranges which can be displayed in a\n * range. The width is determined by the parent of the ItemSet, and the height\n * is determined by the size of the items.\n * @param {{dom: Object, domProps: Object, emitter: Emitter, range: Range}} body\n * @param {Object} [options] See ItemSet.setOptions for the available options.\n * @constructor ItemSet\n * @extends Component\n */\n\n function ItemSet(body, options) {\n this.body = body;\n this.defaultOptions = {\n type: null,\n // 'box', 'point', 'range', 'background'\n orientation: {\n item: 'bottom' // item orientation: 'top' or 'bottom'\n\n },\n align: 'auto',\n // alignment of box items\n stack: true,\n stackSubgroups: true,\n groupOrderSwap: function groupOrderSwap(fromGroup, toGroup, groups) {\n var targetOrder = toGroup.order;\n toGroup.order = fromGroup.order;\n fromGroup.order = targetOrder;\n },\n groupOrder: 'order',\n selectable: true,\n multiselect: false,\n itemsAlwaysDraggable: false,\n editable: {\n updateTime: false,\n updateGroup: false,\n add: false,\n remove: false,\n overrideItems: false\n },\n groupEditable: {\n order: false,\n add: false,\n remove: false\n },\n snap: TimeStep.snap,\n onAdd: function onAdd(item, callback) {\n callback(item);\n },\n onUpdate: function onUpdate(item, callback) {\n callback(item);\n },\n onMove: function onMove(item, callback) {\n callback(item);\n },\n onRemove: function onRemove(item, callback) {\n callback(item);\n },\n onMoving: function onMoving(item, callback) {\n callback(item);\n },\n onAddGroup: function onAddGroup(item, callback) {\n callback(item);\n },\n onMoveGroup: function onMoveGroup(item, callback) {\n callback(item);\n },\n onRemoveGroup: function onRemoveGroup(item, callback) {\n callback(item);\n },\n margin: {\n item: {\n horizontal: 10,\n vertical: 10\n },\n axis: 20\n },\n tooltip: {\n followMouse: false,\n overflowMethod: 'flip'\n },\n tooltipOnItemUpdateTime: false\n }; // options is shared by this ItemSet and all its items\n\n this.options = util.extend({}, this.defaultOptions);\n this.options.rtl = options.rtl; // options for getting items from the DataSet with the correct type\n\n this.itemOptions = {\n type: {\n start: 'Date',\n end: 'Date'\n }\n };\n this.conversion = {\n toScreen: body.util.toScreen,\n toTime: body.util.toTime\n };\n this.dom = {};\n this.props = {};\n this.hammer = null;\n var me = this;\n this.itemsData = null; // DataSet\n\n this.groupsData = null; // DataSet\n // listeners for the DataSet of the items\n\n this.itemListeners = {\n 'add': function add(event, params, senderId) {\n me._onAdd(params.items);\n },\n 'update': function update(event, params, senderId) {\n me._onUpdate(params.items);\n },\n 'remove': function remove(event, params, senderId) {\n me._onRemove(params.items);\n }\n }; // listeners for the DataSet of the groups\n\n this.groupListeners = {\n 'add': function add(event, params, senderId) {\n me._onAddGroups(params.items);\n },\n 'update': function update(event, params, senderId) {\n me._onUpdateGroups(params.items);\n },\n 'remove': function remove(event, params, senderId) {\n me._onRemoveGroups(params.items);\n }\n };\n this.items = {}; // object with an Item for every data item\n\n this.groups = {}; // Group object for every group\n\n this.groupIds = [];\n this.selection = []; // list with the ids of all selected nodes\n\n this.stackDirty = true; // if true, all items will be restacked on next redraw\n\n this.popup = null;\n this.touchParams = {}; // stores properties while dragging\n\n this.groupTouchParams = {}; // create the HTML DOM\n\n this._create();\n\n this.setOptions(options);\n }\n\n ItemSet.prototype = new Component(); // available item types will be registered here\n\n ItemSet.types = {\n background: BackgroundItem,\n box: BoxItem,\n range: RangeItem,\n point: PointItem\n };\n /**\n * Create the HTML DOM for the ItemSet\n */\n\n ItemSet.prototype._create = function () {\n var frame = document.createElement('div');\n frame.className = 'vis-itemset';\n frame['timeline-itemset'] = this;\n this.dom.frame = frame; // create background panel\n\n var background = document.createElement('div');\n background.className = 'vis-background';\n frame.appendChild(background);\n this.dom.background = background; // create foreground panel\n\n var foreground = document.createElement('div');\n foreground.className = 'vis-foreground';\n frame.appendChild(foreground);\n this.dom.foreground = foreground; // create axis panel\n\n var axis = document.createElement('div');\n axis.className = 'vis-axis';\n this.dom.axis = axis; // create labelset\n\n var labelSet = document.createElement('div');\n labelSet.className = 'vis-labelset';\n this.dom.labelSet = labelSet; // create ungrouped Group\n\n this._updateUngrouped(); // create background Group\n\n\n var backgroundGroup = new BackgroundGroup(BACKGROUND, null, this);\n backgroundGroup.show();\n this.groups[BACKGROUND] = backgroundGroup; // attach event listeners\n // Note: we bind to the centerContainer for the case where the height\n // of the center container is larger than of the ItemSet, so we\n // can click in the empty area to create a new item or deselect an item.\n\n this.hammer = new Hammer(this.body.dom.centerContainer); // drag items when selected\n\n this.hammer.on('hammer.input', function (event) {\n if (event.isFirst) {\n this._onTouch(event);\n }\n }.bind(this));\n this.hammer.on('panstart', this._onDragStart.bind(this));\n this.hammer.on('panmove', this._onDrag.bind(this));\n this.hammer.on('panend', this._onDragEnd.bind(this));\n this.hammer.get('pan').set({\n threshold: 5,\n direction: Hammer.DIRECTION_HORIZONTAL\n }); // single select (or unselect) when tapping an item\n\n this.hammer.on('tap', this._onSelectItem.bind(this)); // multi select when holding mouse/touch, or on ctrl+click\n\n this.hammer.on('press', this._onMultiSelectItem.bind(this)); // add item on doubletap\n\n this.hammer.on('doubletap', this._onAddItem.bind(this));\n\n if (this.options.rtl) {\n this.groupHammer = new Hammer(this.body.dom.rightContainer);\n } else {\n this.groupHammer = new Hammer(this.body.dom.leftContainer);\n }\n\n this.groupHammer.on('tap', this._onGroupClick.bind(this));\n this.groupHammer.on('panstart', this._onGroupDragStart.bind(this));\n this.groupHammer.on('panmove', this._onGroupDrag.bind(this));\n this.groupHammer.on('panend', this._onGroupDragEnd.bind(this));\n this.groupHammer.get('pan').set({\n threshold: 5,\n direction: Hammer.DIRECTION_VERTICAL\n });\n this.body.dom.centerContainer.addEventListener('mouseover', this._onMouseOver.bind(this));\n this.body.dom.centerContainer.addEventListener('mouseout', this._onMouseOut.bind(this));\n this.body.dom.centerContainer.addEventListener('mousemove', this._onMouseMove.bind(this)); // right-click on timeline \n\n this.body.dom.centerContainer.addEventListener('contextmenu', this._onDragEnd.bind(this));\n this.body.dom.centerContainer.addEventListener('mousewheel', this._onMouseWheel.bind(this)); // attach to the DOM\n\n this.show();\n };\n /**\n * Set options for the ItemSet. Existing options will be extended/overwritten.\n * @param {Object} [options] The following options are available:\n * {String} type\n * Default type for the items. Choose from 'box'\n * (default), 'point', 'range', or 'background'.\n * The default style can be overwritten by\n * individual items.\n * {String} align\n * Alignment for the items, only applicable for\n * BoxItem. Choose 'center' (default), 'left', or\n * 'right'.\n * {String} orientation.item\n * Orientation of the item set. Choose 'top' or\n * 'bottom' (default).\n * {Function} groupOrder\n * A sorting function for ordering groups\n * {Boolean} stack\n * If true (default), items will be stacked on\n * top of each other.\n * {Number} margin.axis\n * Margin between the axis and the items in pixels.\n * Default is 20.\n * {Number} margin.item.horizontal\n * Horizontal margin between items in pixels.\n * Default is 10.\n * {Number} margin.item.vertical\n * Vertical Margin between items in pixels.\n * Default is 10.\n * {Number} margin.item\n * Margin between items in pixels in both horizontal\n * and vertical direction. Default is 10.\n * {Number} margin\n * Set margin for both axis and items in pixels.\n * {Boolean} selectable\n * If true (default), items can be selected.\n * {Boolean} multiselect\n * If true, multiple items can be selected.\n * False by default.\n * {Boolean} editable\n * Set all editable options to true or false\n * {Boolean} editable.updateTime\n * Allow dragging an item to an other moment in time\n * {Boolean} editable.updateGroup\n * Allow dragging an item to an other group\n * {Boolean} editable.add\n * Allow creating new items on double tap\n * {Boolean} editable.remove\n * Allow removing items by clicking the delete button\n * top right of a selected item.\n * {Function(item: Item, callback: Function)} onAdd\n * Callback function triggered when an item is about to be added:\n * when the user double taps an empty space in the Timeline.\n * {Function(item: Item, callback: Function)} onUpdate\n * Callback function fired when an item is about to be updated.\n * This function typically has to show a dialog where the user\n * change the item. If not implemented, nothing happens.\n * {Function(item: Item, callback: Function)} onMove\n * Fired when an item has been moved. If not implemented,\n * the move action will be accepted.\n * {Function(item: Item, callback: Function)} onRemove\n * Fired when an item is about to be deleted.\n * If not implemented, the item will be always removed.\n */\n\n\n ItemSet.prototype.setOptions = function (options) {\n if (options) {\n // copy all options that we know\n var fields = ['type', 'rtl', 'align', 'order', 'stack', 'stackSubgroups', 'selectable', 'multiselect', 'itemsAlwaysDraggable', 'multiselectPerGroup', 'groupOrder', 'dataAttributes', 'template', 'groupTemplate', 'visibleFrameTemplate', 'hide', 'snap', 'groupOrderSwap', 'tooltip', 'tooltipOnItemUpdateTime'];\n util.selectiveExtend(fields, this.options, options);\n\n if ('orientation' in options) {\n if (typeof options.orientation === 'string') {\n this.options.orientation.item = options.orientation === 'top' ? 'top' : 'bottom';\n } else if ((0, _typeof3['default'])(options.orientation) === 'object' && 'item' in options.orientation) {\n this.options.orientation.item = options.orientation.item;\n }\n }\n\n if ('margin' in options) {\n if (typeof options.margin === 'number') {\n this.options.margin.axis = options.margin;\n this.options.margin.item.horizontal = options.margin;\n this.options.margin.item.vertical = options.margin;\n } else if ((0, _typeof3['default'])(options.margin) === 'object') {\n util.selectiveExtend(['axis'], this.options.margin, options.margin);\n\n if ('item' in options.margin) {\n if (typeof options.margin.item === 'number') {\n this.options.margin.item.horizontal = options.margin.item;\n this.options.margin.item.vertical = options.margin.item;\n } else if ((0, _typeof3['default'])(options.margin.item) === 'object') {\n util.selectiveExtend(['horizontal', 'vertical'], this.options.margin.item, options.margin.item);\n }\n }\n }\n }\n\n if ('editable' in options) {\n if (typeof options.editable === 'boolean') {\n this.options.editable.updateTime = options.editable;\n this.options.editable.updateGroup = options.editable;\n this.options.editable.add = options.editable;\n this.options.editable.remove = options.editable;\n this.options.editable.overrideItems = false;\n } else if ((0, _typeof3['default'])(options.editable) === 'object') {\n util.selectiveExtend(['updateTime', 'updateGroup', 'add', 'remove', 'overrideItems'], this.options.editable, options.editable);\n }\n }\n\n if ('groupEditable' in options) {\n if (typeof options.groupEditable === 'boolean') {\n this.options.groupEditable.order = options.groupEditable;\n this.options.groupEditable.add = options.groupEditable;\n this.options.groupEditable.remove = options.groupEditable;\n } else if ((0, _typeof3['default'])(options.groupEditable) === 'object') {\n util.selectiveExtend(['order', 'add', 'remove'], this.options.groupEditable, options.groupEditable);\n }\n } // callback functions\n\n\n var addCallback = function (name) {\n var fn = options[name];\n\n if (fn) {\n if (!(fn instanceof Function)) {\n throw new Error('option ' + name + ' must be a function ' + name + '(item, callback)');\n }\n\n this.options[name] = fn;\n }\n }.bind(this);\n\n ['onAdd', 'onUpdate', 'onRemove', 'onMove', 'onMoving', 'onAddGroup', 'onMoveGroup', 'onRemoveGroup'].forEach(addCallback); // force the itemSet to refresh: options like orientation and margins may be changed\n\n this.markDirty();\n }\n };\n /**\n * Mark the ItemSet dirty so it will refresh everything with next redraw.\n * Optionally, all items can be marked as dirty and be refreshed.\n * @param {{refreshItems: boolean}} [options]\n */\n\n\n ItemSet.prototype.markDirty = function (options) {\n this.groupIds = [];\n this.stackDirty = true;\n\n if (options && options.refreshItems) {\n util.forEach(this.items, function (item) {\n item.dirty = true;\n if (item.displayed) item.redraw();\n });\n }\n };\n /**\n * Destroy the ItemSet\n */\n\n\n ItemSet.prototype.destroy = function () {\n this.hide();\n this.setItems(null);\n this.setGroups(null);\n this.hammer = null;\n this.body = null;\n this.conversion = null;\n };\n /**\n * Hide the component from the DOM\n */\n\n\n ItemSet.prototype.hide = function () {\n // remove the frame containing the items\n if (this.dom.frame.parentNode) {\n this.dom.frame.parentNode.removeChild(this.dom.frame);\n } // remove the axis with dots\n\n\n if (this.dom.axis.parentNode) {\n this.dom.axis.parentNode.removeChild(this.dom.axis);\n } // remove the labelset containing all group labels\n\n\n if (this.dom.labelSet.parentNode) {\n this.dom.labelSet.parentNode.removeChild(this.dom.labelSet);\n }\n };\n /**\n * Show the component in the DOM (when not already visible).\n * @return {Boolean} changed\n */\n\n\n ItemSet.prototype.show = function () {\n // show frame containing the items\n if (!this.dom.frame.parentNode) {\n this.body.dom.center.appendChild(this.dom.frame);\n } // show axis with dots\n\n\n if (!this.dom.axis.parentNode) {\n this.body.dom.backgroundVertical.appendChild(this.dom.axis);\n } // show labelset containing labels\n\n\n if (!this.dom.labelSet.parentNode) {\n if (this.options.rtl) {\n this.body.dom.right.appendChild(this.dom.labelSet);\n } else {\n this.body.dom.left.appendChild(this.dom.labelSet);\n }\n }\n };\n /**\n * Set selected items by their id. Replaces the current selection\n * Unknown id's are silently ignored.\n * @param {string[] | string} [ids] An array with zero or more id's of the items to be\n * selected, or a single item id. If ids is undefined\n * or an empty array, all items will be unselected.\n */\n\n\n ItemSet.prototype.setSelection = function (ids) {\n var i, ii, id, item;\n if (ids == undefined) ids = [];\n if (!Array.isArray(ids)) ids = [ids]; // unselect currently selected items\n\n for (i = 0, ii = this.selection.length; i < ii; i++) {\n id = this.selection[i];\n item = this.items[id];\n if (item) item.unselect();\n } // select items\n\n\n this.selection = [];\n\n for (i = 0, ii = ids.length; i < ii; i++) {\n id = ids[i];\n item = this.items[id];\n\n if (item) {\n this.selection.push(id);\n item.select();\n }\n }\n };\n /**\n * Get the selected items by their id\n * @return {Array} ids The ids of the selected items\n */\n\n\n ItemSet.prototype.getSelection = function () {\n return this.selection.concat([]);\n };\n /**\n * Get the id's of the currently visible items.\n * @returns {Array} The ids of the visible items\n */\n\n\n ItemSet.prototype.getVisibleItems = function () {\n var range = this.body.range.getRange();\n\n if (this.options.rtl) {\n var right = this.body.util.toScreen(range.start);\n var left = this.body.util.toScreen(range.end);\n } else {\n var left = this.body.util.toScreen(range.start);\n var right = this.body.util.toScreen(range.end);\n }\n\n var ids = [];\n\n for (var groupId in this.groups) {\n if (this.groups.hasOwnProperty(groupId)) {\n var group = this.groups[groupId];\n var rawVisibleItems = group.visibleItems; // filter the \"raw\" set with visibleItems into a set which is really\n // visible by pixels\n\n for (var i = 0; i < rawVisibleItems.length; i++) {\n var item = rawVisibleItems[i]; // TODO: also check whether visible vertically\n\n if (this.options.rtl) {\n if (item.right < left && item.right + item.width > right) {\n ids.push(item.id);\n }\n } else {\n if (item.left < right && item.left + item.width > left) {\n ids.push(item.id);\n }\n }\n }\n }\n }\n\n return ids;\n };\n /**\n * Deselect a selected item\n * @param {String | Number} id\n * @private\n */\n\n\n ItemSet.prototype._deselect = function (id) {\n var selection = this.selection;\n\n for (var i = 0, ii = selection.length; i < ii; i++) {\n if (selection[i] == id) {\n // non-strict comparison!\n selection.splice(i, 1);\n break;\n }\n }\n };\n /**\n * Repaint the component\n * @return {boolean} Returns true if the component is resized\n */\n\n\n ItemSet.prototype.redraw = function () {\n var margin = this.options.margin,\n range = this.body.range,\n asSize = util.option.asSize,\n options = this.options,\n orientation = options.orientation.item,\n resized = false,\n frame = this.dom.frame; // recalculate absolute position (before redrawing groups)\n\n this.props.top = this.body.domProps.top.height + this.body.domProps.border.top;\n\n if (this.options.rtl) {\n this.props.right = this.body.domProps.right.width + this.body.domProps.border.right;\n } else {\n this.props.left = this.body.domProps.left.width + this.body.domProps.border.left;\n } // update class name\n\n\n frame.className = 'vis-itemset'; // reorder the groups (if needed)\n\n resized = this._orderGroups() || resized; // check whether zoomed (in that case we need to re-stack everything)\n // TODO: would be nicer to get this as a trigger from Range\n\n var visibleInterval = range.end - range.start;\n var zoomed = visibleInterval != this.lastVisibleInterval || this.props.width != this.props.lastWidth;\n var scrolled = range.start != this.lastRangeStart;\n if (zoomed || scrolled) this.stackDirty = true;\n this.lastVisibleInterval = visibleInterval;\n this.lastRangeStart = range.start;\n this.props.lastWidth = this.props.width;\n var restack = this.stackDirty;\n\n var firstGroup = this._firstGroup();\n\n var firstMargin = {\n item: margin.item,\n axis: margin.axis\n };\n var nonFirstMargin = {\n item: margin.item,\n axis: margin.item.vertical / 2\n };\n var height = 0;\n var minHeight = margin.axis + margin.item.vertical; // redraw the background group\n\n this.groups[BACKGROUND].redraw(range, nonFirstMargin, restack); // redraw all regular groups\n\n util.forEach(this.groups, function (group) {\n var groupMargin = group == firstGroup ? firstMargin : nonFirstMargin;\n var groupResized = group.redraw(range, groupMargin, restack);\n resized = groupResized || resized;\n height += group.height;\n });\n height = Math.max(height, minHeight);\n this.stackDirty = false; // update frame height\n\n frame.style.height = asSize(height); // calculate actual size\n\n this.props.width = frame.offsetWidth;\n this.props.height = height; // reposition axis\n\n this.dom.axis.style.top = asSize(orientation == 'top' ? this.body.domProps.top.height + this.body.domProps.border.top : this.body.domProps.top.height + this.body.domProps.centerContainer.height);\n\n if (this.options.rtl) {\n this.dom.axis.style.right = '0';\n } else {\n this.dom.axis.style.left = '0';\n }\n\n this.initialItemSetDrawn = true; // check if this component is resized\n\n resized = this._isResized() || resized;\n return resized;\n };\n /**\n * Get the first group, aligned with the axis\n * @return {Group | null} firstGroup\n * @private\n */\n\n\n ItemSet.prototype._firstGroup = function () {\n var firstGroupIndex = this.options.orientation.item == 'top' ? 0 : this.groupIds.length - 1;\n var firstGroupId = this.groupIds[firstGroupIndex];\n var firstGroup = this.groups[firstGroupId] || this.groups[UNGROUPED];\n return firstGroup || null;\n };\n /**\n * Create or delete the group holding all ungrouped items. This group is used when\n * there are no groups specified.\n * @protected\n */\n\n\n ItemSet.prototype._updateUngrouped = function () {\n var ungrouped = this.groups[UNGROUPED];\n var background = this.groups[BACKGROUND];\n var item, itemId;\n\n if (this.groupsData) {\n // remove the group holding all ungrouped items\n if (ungrouped) {\n ungrouped.hide();\n delete this.groups[UNGROUPED];\n\n for (itemId in this.items) {\n if (this.items.hasOwnProperty(itemId)) {\n item = this.items[itemId];\n item.parent && item.parent.remove(item);\n\n var groupId = this._getGroupId(item.data);\n\n var group = this.groups[groupId];\n group && group.add(item) || item.hide();\n }\n }\n }\n } else {\n // create a group holding all (unfiltered) items\n if (!ungrouped) {\n var id = null;\n var data = null;\n ungrouped = new Group(id, data, this);\n this.groups[UNGROUPED] = ungrouped;\n\n for (itemId in this.items) {\n if (this.items.hasOwnProperty(itemId)) {\n item = this.items[itemId];\n ungrouped.add(item);\n }\n }\n\n ungrouped.show();\n }\n }\n };\n /**\n * Get the element for the labelset\n * @return {HTMLElement} labelSet\n */\n\n\n ItemSet.prototype.getLabelSet = function () {\n return this.dom.labelSet;\n };\n /**\n * Set items\n * @param {vis.DataSet | null} items\n */\n\n\n ItemSet.prototype.setItems = function (items) {\n var me = this,\n ids,\n oldItemsData = this.itemsData; // replace the dataset\n\n if (!items) {\n this.itemsData = null;\n } else if (items instanceof DataSet || items instanceof DataView) {\n this.itemsData = items;\n } else {\n throw new TypeError('Data must be an instance of DataSet or DataView');\n }\n\n if (oldItemsData) {\n // unsubscribe from old dataset\n util.forEach(this.itemListeners, function (callback, event) {\n oldItemsData.off(event, callback);\n }); // remove all drawn items\n\n ids = oldItemsData.getIds();\n\n this._onRemove(ids);\n }\n\n if (this.itemsData) {\n // subscribe to new dataset\n var id = this.id;\n util.forEach(this.itemListeners, function (callback, event) {\n me.itemsData.on(event, callback, id);\n }); // add all new items\n\n ids = this.itemsData.getIds();\n\n this._onAdd(ids); // update the group holding all ungrouped items\n\n\n this._updateUngrouped();\n }\n\n this.body.emitter.emit('_change', {\n queue: true\n });\n };\n /**\n * Get the current items\n * @returns {vis.DataSet | null}\n */\n\n\n ItemSet.prototype.getItems = function () {\n return this.itemsData;\n };\n /**\n * Set groups\n * @param {vis.DataSet} groups\n */\n\n\n ItemSet.prototype.setGroups = function (groups) {\n var me = this,\n ids; // unsubscribe from current dataset\n\n if (this.groupsData) {\n util.forEach(this.groupListeners, function (callback, event) {\n me.groupsData.off(event, callback);\n }); // remove all drawn groups\n\n ids = this.groupsData.getIds();\n this.groupsData = null;\n\n this._onRemoveGroups(ids); // note: this will cause a redraw\n\n } // replace the dataset\n\n\n if (!groups) {\n this.groupsData = null;\n } else if (groups instanceof DataSet || groups instanceof DataView) {\n this.groupsData = groups;\n } else {\n throw new TypeError('Data must be an instance of DataSet or DataView');\n }\n\n if (this.groupsData) {\n // go over all groups nesting\n var groupsData = this.groupsData;\n\n if (this.groupsData instanceof DataView) {\n groupsData = this.groupsData.getDataSet();\n }\n\n groupsData.get().forEach(function (group) {\n if (group.nestedGroups) {\n group.nestedGroups.forEach(function (nestedGroupId) {\n var updatedNestedGroup = groupsData.get(nestedGroupId);\n updatedNestedGroup.nestedInGroup = group.id;\n\n if (group.showNested == false) {\n updatedNestedGroup.visible = false;\n }\n\n groupsData.update(updatedNestedGroup);\n });\n }\n }); // subscribe to new dataset\n\n var id = this.id;\n util.forEach(this.groupListeners, function (callback, event) {\n me.groupsData.on(event, callback, id);\n }); // draw all ms\n\n ids = this.groupsData.getIds();\n\n this._onAddGroups(ids);\n } // update the group holding all ungrouped items\n\n\n this._updateUngrouped(); // update the order of all items in each group\n\n\n this._order();\n\n this.body.emitter.emit('_change', {\n queue: true\n });\n };\n /**\n * Get the current groups\n * @returns {vis.DataSet | null} groups\n */\n\n\n ItemSet.prototype.getGroups = function () {\n return this.groupsData;\n };\n /**\n * Remove an item by its id\n * @param {String | Number} id\n */\n\n\n ItemSet.prototype.removeItem = function (id) {\n var item = this.itemsData.get(id),\n dataset = this.itemsData.getDataSet(),\n itemObj = this.items[id];\n\n if (item) {\n // confirm deletion\n this.options.onRemove(item, function (item) {\n if (item) {\n // remove by id here, it is possible that an item has no id defined\n // itself, so better not delete by the item itself\n dataset.remove(id);\n }\n });\n }\n };\n /**\n * Get the time of an item based on it's data and options.type\n * @param {Object} itemData\n * @returns {string} Returns the type\n * @private\n */\n\n\n ItemSet.prototype._getType = function (itemData) {\n return itemData.type || this.options.type || (itemData.end ? 'range' : 'box');\n };\n /**\n * Get the group id for an item\n * @param {Object} itemData\n * @returns {string} Returns the groupId\n * @private\n */\n\n\n ItemSet.prototype._getGroupId = function (itemData) {\n var type = this._getType(itemData);\n\n if (type == 'background' && itemData.group == undefined) {\n return BACKGROUND;\n } else {\n return this.groupsData ? itemData.group : UNGROUPED;\n }\n };\n /**\n * Handle updated items\n * @param {Number[]} ids\n * @protected\n */\n\n\n ItemSet.prototype._onUpdate = function (ids) {\n var me = this;\n ids.forEach(function (id) {\n var itemData = me.itemsData.get(id, me.itemOptions);\n var item = me.items[id];\n var type = itemData ? me._getType(itemData) : null;\n var constructor = ItemSet.types[type];\n var selected;\n\n if (item) {\n // update item \t\n if (!constructor || !(item instanceof constructor)) {\n // item type has changed, delete the item and recreate it\n selected = item.selected; // preserve selection of this item\n\n me._removeItem(item);\n\n item = null;\n } else {\n me._updateItem(item, itemData);\n }\n }\n\n if (!item && itemData) {\n // create item\n if (constructor) {\n item = new constructor(itemData, me.conversion, me.options);\n item.id = id; // TODO: not so nice setting id afterwards\n\n me._addItem(item);\n\n if (selected) {\n this.selection.push(id);\n item.select();\n }\n } else if (type == 'rangeoverflow') {\n // TODO: deprecated since version 2.1.0 (or 3.0.0?). cleanup some day\n throw new TypeError('Item type \"rangeoverflow\" is deprecated. Use css styling instead: ' + '.vis-item.vis-range .vis-item-content {overflow: visible;}');\n } else {\n throw new TypeError('Unknown item type \"' + type + '\"');\n }\n }\n }.bind(this));\n\n this._order();\n\n this.stackDirty = true; // force re-stacking of all items next redraw\n\n this.body.emitter.emit('_change', {\n queue: true\n });\n };\n /**\n * Handle added items\n * @param {Number[]} ids\n * @protected\n */\n\n\n ItemSet.prototype._onAdd = ItemSet.prototype._onUpdate;\n /**\n * Handle removed items\n * @param {Number[]} ids\n * @protected\n */\n\n ItemSet.prototype._onRemove = function (ids) {\n var count = 0;\n var me = this;\n ids.forEach(function (id) {\n var item = me.items[id];\n\n if (item) {\n count++;\n\n me._removeItem(item);\n }\n });\n\n if (count) {\n // update order\n this._order();\n\n this.stackDirty = true; // force re-stacking of all items next redraw\n\n this.body.emitter.emit('_change', {\n queue: true\n });\n }\n };\n /**\n * Update the order of item in all groups\n * @private\n */\n\n\n ItemSet.prototype._order = function () {\n // reorder the items in all groups\n // TODO: optimization: only reorder groups affected by the changed items\n util.forEach(this.groups, function (group) {\n group.order();\n });\n };\n /**\n * Handle updated groups\n * @param {Number[]} ids\n * @private\n */\n\n\n ItemSet.prototype._onUpdateGroups = function (ids) {\n this._onAddGroups(ids);\n };\n /**\n * Handle changed groups (added or updated)\n * @param {Number[]} ids\n * @private\n */\n\n\n ItemSet.prototype._onAddGroups = function (ids) {\n var me = this;\n ids.forEach(function (id) {\n var groupData = me.groupsData.get(id);\n var group = me.groups[id];\n\n if (!group) {\n // check for reserved ids\n if (id == UNGROUPED || id == BACKGROUND) {\n throw new Error('Illegal group id. ' + id + ' is a reserved id.');\n }\n\n var groupOptions = (0, _create2['default'])(me.options);\n util.extend(groupOptions, {\n height: null\n });\n group = new Group(id, groupData, me);\n me.groups[id] = group; // add items with this groupId to the new group\n\n for (var itemId in me.items) {\n if (me.items.hasOwnProperty(itemId)) {\n var item = me.items[itemId];\n\n if (item.data.group == id) {\n group.add(item);\n }\n }\n }\n\n group.order();\n group.show();\n } else {\n // update group\n group.setData(groupData);\n }\n });\n this.body.emitter.emit('_change', {\n queue: true\n });\n };\n /**\n * Handle removed groups\n * @param {Number[]} ids\n * @private\n */\n\n\n ItemSet.prototype._onRemoveGroups = function (ids) {\n var groups = this.groups;\n ids.forEach(function (id) {\n var group = groups[id];\n\n if (group) {\n group.hide();\n delete groups[id];\n }\n });\n this.markDirty();\n this.body.emitter.emit('_change', {\n queue: true\n });\n };\n /**\n * Reorder the groups if needed\n * @return {boolean} changed\n * @private\n */\n\n\n ItemSet.prototype._orderGroups = function () {\n if (this.groupsData) {\n // reorder the groups\n var groupIds = this.groupsData.getIds({\n order: this.options.groupOrder\n });\n groupIds = this._orderNestedGroups(groupIds);\n var changed = !util.equalArray(groupIds, this.groupIds);\n\n if (changed) {\n // hide all groups, removes them from the DOM\n var groups = this.groups;\n groupIds.forEach(function (groupId) {\n groups[groupId].hide();\n }); // show the groups again, attach them to the DOM in correct order\n\n groupIds.forEach(function (groupId) {\n groups[groupId].show();\n });\n this.groupIds = groupIds;\n }\n\n return changed;\n } else {\n return false;\n }\n };\n /**\n * Reorder the nested groups\n * @return {boolean} changed\n * @private\n */\n\n\n ItemSet.prototype._orderNestedGroups = function (groupIds) {\n var newGroupIdsOrder = [];\n groupIds.forEach(function (groupId) {\n var groupData = this.groupsData.get(groupId);\n\n if (!groupData.nestedInGroup) {\n newGroupIdsOrder.push(groupId);\n }\n\n if (groupData.nestedGroups) {\n var nestedGroups = this.groupsData.get({\n filter: function filter(nestedGroup) {\n return nestedGroup.nestedInGroup == groupId;\n },\n order: this.options.groupOrder\n });\n var nestedGroupIds = nestedGroups.map(function (nestedGroup) {\n return nestedGroup.id;\n });\n newGroupIdsOrder = newGroupIdsOrder.concat(nestedGroupIds);\n }\n }, this);\n return newGroupIdsOrder;\n };\n /**\n * Add a new item\n * @param {Item} item\n * @private\n */\n\n\n ItemSet.prototype._addItem = function (item) {\n this.items[item.id] = item; // add to group\n\n var groupId = this._getGroupId(item.data);\n\n var group = this.groups[groupId];\n\n if (!group) {\n item.groupShowing = false;\n } else if (group && group.data && group.data.showNested) {\n item.groupShowing = true;\n }\n\n if (group) group.add(item);\n };\n /**\n * Update an existing item\n * @param {Item} item\n * @param {Object} itemData\n * @private\n */\n\n\n ItemSet.prototype._updateItem = function (item, itemData) {\n var oldGroupId = item.data.group;\n var oldSubGroupId = item.data.subgroup;\n\n if (oldGroupId != itemData.group) {\n var oldGroup = this.groups[oldGroupId];\n if (oldGroup) oldGroup.remove(item);\n } // update the items data (will redraw the item when displayed)\n\n\n item.setData(itemData);\n\n var groupId = this._getGroupId(item.data);\n\n var group = this.groups[groupId];\n\n if (!group) {\n item.groupShowing = false;\n } else if (group && group.data && group.data.showNested) {\n item.groupShowing = true;\n } // update group\n\n\n if (group) {\n if (oldGroupId != item.data.group) {\n group.add(item);\n } else if (oldSubGroupId != item.data.subgroup) {\n group.changeSubgroup(item, oldSubGroupId);\n }\n }\n };\n /**\n * Delete an item from the ItemSet: remove it from the DOM, from the map\n * with items, and from the map with visible items, and from the selection\n * @param {Item} item\n * @private\n */\n\n\n ItemSet.prototype._removeItem = function (item) {\n // remove from DOM\n item.hide(); // remove from items\n\n delete this.items[item.id]; // remove from selection\n\n var index = this.selection.indexOf(item.id);\n if (index != -1) this.selection.splice(index, 1); // remove from group\n\n item.parent && item.parent.remove(item);\n };\n /**\n * Create an array containing all items being a range (having an end date)\n * @param array\n * @returns {Array}\n * @private\n */\n\n\n ItemSet.prototype._constructByEndArray = function (array) {\n var endArray = [];\n\n for (var i = 0; i < array.length; i++) {\n if (array[i] instanceof RangeItem) {\n endArray.push(array[i]);\n }\n }\n\n return endArray;\n };\n /**\n * Register the clicked item on touch, before dragStart is initiated.\n *\n * dragStart is initiated from a mousemove event, AFTER the mouse/touch is\n * already moving. Therefore, the mouse/touch can sometimes be above an other\n * DOM element than the item itself.\n *\n * @param {Event} event\n * @private\n */\n\n\n ItemSet.prototype._onTouch = function (event) {\n // store the touched item, used in _onDragStart\n this.touchParams.item = this.itemFromTarget(event);\n this.touchParams.dragLeftItem = event.target.dragLeftItem || false;\n this.touchParams.dragRightItem = event.target.dragRightItem || false;\n this.touchParams.itemProps = null;\n };\n /**\n * Given an group id, returns the index it has.\n *\n * @param {Number} groupID\n * @private\n */\n\n\n ItemSet.prototype._getGroupIndex = function (groupId) {\n for (var i = 0; i < this.groupIds.length; i++) {\n if (groupId == this.groupIds[i]) return i;\n }\n };\n /**\n * Start dragging the selected events\n * @param {Event} event\n * @private\n */\n\n\n ItemSet.prototype._onDragStart = function (event) {\n if (this.touchParams.itemIsDragging) {\n return;\n }\n\n var item = this.touchParams.item || null;\n var me = this;\n var props;\n\n if (item && (item.selected || this.options.itemsAlwaysDraggable)) {\n if (this.options.editable.overrideItems && !this.options.editable.updateTime && !this.options.editable.updateGroup) {\n return;\n } // override options.editable\n\n\n if (item.editable != null && !item.editable.updateTime && !item.editable.updateGroup && !this.options.editable.overrideItems) {\n return;\n }\n\n var dragLeftItem = this.touchParams.dragLeftItem;\n var dragRightItem = this.touchParams.dragRightItem;\n this.touchParams.itemIsDragging = true;\n this.touchParams.selectedItem = item;\n\n if (dragLeftItem) {\n props = {\n item: dragLeftItem,\n initialX: event.center.x,\n dragLeft: true,\n data: this._cloneItemData(item.data)\n };\n this.touchParams.itemProps = [props];\n } else if (dragRightItem) {\n props = {\n item: dragRightItem,\n initialX: event.center.x,\n dragRight: true,\n data: this._cloneItemData(item.data)\n };\n this.touchParams.itemProps = [props];\n } else {\n var baseGroupIndex = this._getGroupIndex(item.data.group);\n\n var itemsToDrag = this.options.itemsAlwaysDraggable && !item.selected ? [item.id] : this.getSelection();\n this.touchParams.itemProps = itemsToDrag.map(function (id) {\n var item = me.items[id];\n\n var groupIndex = me._getGroupIndex(item.data.group);\n\n return {\n item: item,\n initialX: event.center.x,\n groupOffset: baseGroupIndex - groupIndex,\n data: this._cloneItemData(item.data)\n };\n }.bind(this));\n }\n\n event.stopPropagation();\n } else if (this.options.editable.add && (event.srcEvent.ctrlKey || event.srcEvent.metaKey)) {\n // create a new range item when dragging with ctrl key down\n this._onDragStartAddItem(event);\n }\n };\n /**\n * Start creating a new range item by dragging.\n * @param {Event} event\n * @private\n */\n\n\n ItemSet.prototype._onDragStartAddItem = function (event) {\n var snap = this.options.snap || null;\n\n if (this.options.rtl) {\n var xAbs = util.getAbsoluteRight(this.dom.frame);\n var x = xAbs - event.center.x + 10; // plus 10 to compensate for the drag starting as soon as you've moved 10px\n } else {\n var xAbs = util.getAbsoluteLeft(this.dom.frame);\n var x = event.center.x - xAbs - 10; // minus 10 to compensate for the drag starting as soon as you've moved 10px\n }\n\n var time = this.body.util.toTime(x);\n var scale = this.body.util.getScale();\n var step = this.body.util.getStep();\n var start = snap ? snap(time, scale, step) : time;\n var end = start;\n var itemData = {\n type: 'range',\n start: start,\n end: end,\n content: 'new item'\n };\n var id = util.randomUUID();\n itemData[this.itemsData._fieldId] = id;\n var group = this.groupFromTarget(event);\n\n if (group) {\n itemData.group = group.groupId;\n }\n\n var newItem = new RangeItem(itemData, this.conversion, this.options);\n newItem.id = id; // TODO: not so nice setting id afterwards\n\n newItem.data = this._cloneItemData(itemData);\n\n this._addItem(newItem);\n\n this.touchParams.selectedItem = newItem;\n var props = {\n item: newItem,\n initialX: event.center.x,\n data: newItem.data\n };\n\n if (this.options.rtl) {\n props.dragLeft = true;\n } else {\n props.dragRight = true;\n }\n\n this.touchParams.itemProps = [props];\n event.stopPropagation();\n };\n /**\n * Drag selected items\n * @param {Event} event\n * @private\n */\n\n\n ItemSet.prototype._onDrag = function (event) {\n if (this.touchParams.itemProps) {\n event.stopPropagation();\n var me = this;\n var snap = this.options.snap || null;\n\n if (this.options.rtl) {\n var xOffset = this.body.dom.root.offsetLeft + this.body.domProps.right.width;\n } else {\n var xOffset = this.body.dom.root.offsetLeft + this.body.domProps.left.width;\n }\n\n var scale = this.body.util.getScale();\n var step = this.body.util.getStep(); //only calculate the new group for the item that's actually dragged\n\n var selectedItem = this.touchParams.selectedItem;\n var updateGroupAllowed = (this.options.editable.overrideItems || selectedItem.editable == null) && this.options.editable.updateGroup || !this.options.editable.overrideItems && selectedItem.editable != null && selectedItem.editable.updateGroup;\n var newGroupBase = null;\n\n if (updateGroupAllowed && selectedItem) {\n if (selectedItem.data.group != undefined) {\n // drag from one group to another\n var group = me.groupFromTarget(event);\n\n if (group) {\n //we know the offset for all items, so the new group for all items\n //will be relative to this one.\n newGroupBase = this._getGroupIndex(group.groupId);\n }\n }\n } // move\n\n\n this.touchParams.itemProps.forEach(function (props) {\n var current = me.body.util.toTime(event.center.x - xOffset);\n var initial = me.body.util.toTime(props.initialX - xOffset);\n\n if (this.options.rtl) {\n var offset = -(current - initial); // ms\n } else {\n var offset = current - initial; // ms\n }\n\n var itemData = this._cloneItemData(props.item.data); // clone the data\n\n\n if (props.item.editable != null && !props.item.editable.updateTime && !props.item.editable.updateGroup && !me.options.editable.overrideItems) {\n return;\n }\n\n var updateTimeAllowed = (this.options.editable.overrideItems || selectedItem.editable == null) && this.options.editable.updateTime || !this.options.editable.overrideItems && selectedItem.editable != null && selectedItem.editable.updateTime;\n\n if (updateTimeAllowed) {\n if (props.dragLeft) {\n // drag left side of a range item\n if (this.options.rtl) {\n if (itemData.end != undefined) {\n var initialEnd = util.convert(props.data.end, 'Date');\n var end = new Date(initialEnd.valueOf() + offset); // TODO: pass a Moment instead of a Date to snap(). (Breaking change)\n\n itemData.end = snap ? snap(end, scale, step) : end;\n }\n } else {\n if (itemData.start != undefined) {\n var initialStart = util.convert(props.data.start, 'Date');\n var start = new Date(initialStart.valueOf() + offset); // TODO: pass a Moment instead of a Date to snap(). (Breaking change)\n\n itemData.start = snap ? snap(start, scale, step) : start;\n }\n }\n } else if (props.dragRight) {\n // drag right side of a range item\n if (this.options.rtl) {\n if (itemData.start != undefined) {\n var initialStart = util.convert(props.data.start, 'Date');\n var start = new Date(initialStart.valueOf() + offset); // TODO: pass a Moment instead of a Date to snap(). (Breaking change)\n\n itemData.start = snap ? snap(start, scale, step) : start;\n }\n } else {\n if (itemData.end != undefined) {\n var initialEnd = util.convert(props.data.end, 'Date');\n var end = new Date(initialEnd.valueOf() + offset); // TODO: pass a Moment instead of a Date to snap(). (Breaking change)\n\n itemData.end = snap ? snap(end, scale, step) : end;\n }\n }\n } else {\n // drag both start and end\n if (itemData.start != undefined) {\n var initialStart = util.convert(props.data.start, 'Date').valueOf();\n var start = new Date(initialStart + offset);\n\n if (itemData.end != undefined) {\n var initialEnd = util.convert(props.data.end, 'Date');\n var duration = initialEnd.valueOf() - initialStart.valueOf(); // TODO: pass a Moment instead of a Date to snap(). (Breaking change)\n\n itemData.start = snap ? snap(start, scale, step) : start;\n itemData.end = new Date(itemData.start.valueOf() + duration);\n } else {\n // TODO: pass a Moment instead of a Date to snap(). (Breaking change)\n itemData.start = snap ? snap(start, scale, step) : start;\n }\n }\n }\n }\n\n if (updateGroupAllowed && !props.dragLeft && !props.dragRight && newGroupBase != null) {\n if (itemData.group != undefined) {\n var newOffset = newGroupBase - props.groupOffset; //make sure we stay in bounds\n\n newOffset = Math.max(0, newOffset);\n newOffset = Math.min(me.groupIds.length - 1, newOffset);\n itemData.group = me.groupIds[newOffset];\n }\n } // confirm moving the item\n\n\n itemData = this._cloneItemData(itemData); // convert start and end to the correct type\n\n me.options.onMoving(itemData, function (itemData) {\n if (itemData) {\n props.item.setData(this._cloneItemData(itemData, 'Date'));\n }\n }.bind(this));\n }.bind(this));\n this.stackDirty = true; // force re-stacking of all items next redraw\n\n this.body.emitter.emit('_change');\n }\n };\n /**\n * Move an item to another group\n * @param {Item} item\n * @param {String | Number} groupId\n * @private\n */\n\n\n ItemSet.prototype._moveToGroup = function (item, groupId) {\n var group = this.groups[groupId];\n\n if (group && group.groupId != item.data.group) {\n var oldGroup = item.parent;\n oldGroup.remove(item);\n oldGroup.order();\n group.add(item);\n group.order();\n item.data.group = group.groupId;\n }\n };\n /**\n * End of dragging selected items\n * @param {Event} event\n * @private\n */\n\n\n ItemSet.prototype._onDragEnd = function (event) {\n this.touchParams.itemIsDragging = false;\n\n if (this.touchParams.itemProps) {\n event.stopPropagation();\n var me = this;\n var dataset = this.itemsData.getDataSet();\n var itemProps = this.touchParams.itemProps;\n this.touchParams.itemProps = null;\n itemProps.forEach(function (props) {\n var id = props.item.id;\n var exists = me.itemsData.get(id, me.itemOptions) != null;\n\n if (!exists) {\n // add a new item\n me.options.onAdd(props.item.data, function (itemData) {\n me._removeItem(props.item); // remove temporary item\n\n\n if (itemData) {\n me.itemsData.getDataSet().add(itemData);\n } // force re-stacking of all items next redraw\n\n\n me.stackDirty = true;\n me.body.emitter.emit('_change');\n });\n } else {\n // update existing item\n var itemData = this._cloneItemData(props.item.data); // convert start and end to the correct type\n\n\n me.options.onMove(itemData, function (itemData) {\n if (itemData) {\n // apply changes\n itemData[dataset._fieldId] = id; // ensure the item contains its id (can be undefined)\n\n dataset.update(itemData);\n } else {\n // restore original values\n props.item.setData(props.data);\n me.stackDirty = true; // force re-stacking of all items next redraw\n\n me.body.emitter.emit('_change');\n }\n });\n }\n }.bind(this));\n }\n };\n\n ItemSet.prototype._onGroupClick = function (event) {\n var group = this.groupFromTarget(event);\n if (!group || !group.nestedGroups) return;\n var groupsData = this.groupsData;\n\n if (this.groupsData instanceof DataView) {\n groupsData = this.groupsData.getDataSet();\n }\n\n group.showNested = !group.showNested;\n var nestedGroups = groupsData.get(group.nestedGroups).map(function (nestedGroup) {\n if (nestedGroup.visible == undefined) {\n nestedGroup.visible = true;\n }\n\n nestedGroup.visible = !!group.showNested;\n return nestedGroup;\n });\n groupsData.update(nestedGroups);\n\n if (group.showNested) {\n util.removeClassName(group.dom.label, 'collapsed');\n util.addClassName(group.dom.label, 'expanded');\n } else {\n util.removeClassName(group.dom.label, 'expanded');\n var collapsedDirClassName = this.options.rtl ? 'collapsed-rtl' : 'collapsed';\n util.addClassName(group.dom.label, collapsedDirClassName);\n }\n };\n\n ItemSet.prototype._onGroupDragStart = function (event) {\n if (this.options.groupEditable.order) {\n this.groupTouchParams.group = this.groupFromTarget(event);\n\n if (this.groupTouchParams.group) {\n event.stopPropagation();\n this.groupTouchParams.originalOrder = this.groupsData.getIds({\n order: this.options.groupOrder\n });\n }\n }\n };\n\n ItemSet.prototype._onGroupDrag = function (event) {\n if (this.options.groupEditable.order && this.groupTouchParams.group) {\n event.stopPropagation();\n var groupsData = this.groupsData;\n\n if (this.groupsData instanceof DataView) {\n groupsData = this.groupsData.getDataSet();\n } // drag from one group to another\n\n\n var group = this.groupFromTarget(event); // try to avoid toggling when groups differ in height\n\n if (group && group.height != this.groupTouchParams.group.height) {\n var movingUp = group.top < this.groupTouchParams.group.top;\n var clientY = event.center ? event.center.y : event.clientY;\n var targetGroupTop = util.getAbsoluteTop(group.dom.foreground);\n var draggedGroupHeight = this.groupTouchParams.group.height;\n\n if (movingUp) {\n // skip swapping the groups when the dragged group is not below clientY afterwards\n if (targetGroupTop + draggedGroupHeight < clientY) {\n return;\n }\n } else {\n var targetGroupHeight = group.height; // skip swapping the groups when the dragged group is not below clientY afterwards\n\n if (targetGroupTop + targetGroupHeight - draggedGroupHeight > clientY) {\n return;\n }\n }\n }\n\n if (group && group != this.groupTouchParams.group) {\n var targetGroup = groupsData.get(group.groupId);\n var draggedGroup = groupsData.get(this.groupTouchParams.group.groupId); // switch groups\n\n if (draggedGroup && targetGroup) {\n this.options.groupOrderSwap(draggedGroup, targetGroup, groupsData);\n groupsData.update(draggedGroup);\n groupsData.update(targetGroup);\n } // fetch current order of groups\n\n\n var newOrder = groupsData.getIds({\n order: this.options.groupOrder\n }); // in case of changes since _onGroupDragStart\n\n if (!util.equalArray(newOrder, this.groupTouchParams.originalOrder)) {\n var origOrder = this.groupTouchParams.originalOrder;\n var draggedId = this.groupTouchParams.group.groupId;\n var numGroups = Math.min(origOrder.length, newOrder.length);\n var curPos = 0;\n var newOffset = 0;\n var orgOffset = 0;\n\n while (curPos < numGroups) {\n // as long as the groups are where they should be step down along the groups order\n while (curPos + newOffset < numGroups && curPos + orgOffset < numGroups && newOrder[curPos + newOffset] == origOrder[curPos + orgOffset]) {\n curPos++;\n } // all ok\n\n\n if (curPos + newOffset >= numGroups) {\n break;\n } // not all ok\n // if dragged group was move upwards everything below should have an offset\n\n\n if (newOrder[curPos + newOffset] == draggedId) {\n newOffset = 1;\n continue;\n } // if dragged group was move downwards everything above should have an offset\n else if (origOrder[curPos + orgOffset] == draggedId) {\n orgOffset = 1;\n continue;\n } // found a group (apart from dragged group) that has the wrong position -> switch with the \n // group at the position where other one should be, fix index arrays and continue\n else {\n var slippedPosition = newOrder.indexOf(origOrder[curPos + orgOffset]);\n var switchGroup = groupsData.get(newOrder[curPos + newOffset]);\n var shouldBeGroup = groupsData.get(origOrder[curPos + orgOffset]);\n this.options.groupOrderSwap(switchGroup, shouldBeGroup, groupsData);\n groupsData.update(switchGroup);\n groupsData.update(shouldBeGroup);\n var switchGroupId = newOrder[curPos + newOffset];\n newOrder[curPos + newOffset] = origOrder[curPos + orgOffset];\n newOrder[slippedPosition] = switchGroupId;\n curPos++;\n }\n }\n }\n }\n }\n };\n\n ItemSet.prototype._onGroupDragEnd = function (event) {\n if (this.options.groupEditable.order && this.groupTouchParams.group) {\n event.stopPropagation(); // update existing group\n\n var me = this;\n var id = me.groupTouchParams.group.groupId;\n var dataset = me.groupsData.getDataSet();\n var groupData = util.extend({}, dataset.get(id)); // clone the data\n\n me.options.onMoveGroup(groupData, function (groupData) {\n if (groupData) {\n // apply changes\n groupData[dataset._fieldId] = id; // ensure the group contains its id (can be undefined)\n\n dataset.update(groupData);\n } else {\n // fetch current order of groups\n var newOrder = dataset.getIds({\n order: me.options.groupOrder\n }); // restore original order\n\n if (!util.equalArray(newOrder, me.groupTouchParams.originalOrder)) {\n var origOrder = me.groupTouchParams.originalOrder;\n var numGroups = Math.min(origOrder.length, newOrder.length);\n var curPos = 0;\n\n while (curPos < numGroups) {\n // as long as the groups are where they should be step down along the groups order\n while (curPos < numGroups && newOrder[curPos] == origOrder[curPos]) {\n curPos++;\n } // all ok\n\n\n if (curPos >= numGroups) {\n break;\n } // found a group that has the wrong position -> switch with the \n // group at the position where other one should be, fix index arrays and continue\n\n\n var slippedPosition = newOrder.indexOf(origOrder[curPos]);\n var switchGroup = dataset.get(newOrder[curPos]);\n var shouldBeGroup = dataset.get(origOrder[curPos]);\n me.options.groupOrderSwap(switchGroup, shouldBeGroup, dataset);\n dataset.update(switchGroup);\n dataset.update(shouldBeGroup);\n var switchGroupId = newOrder[curPos];\n newOrder[curPos] = origOrder[curPos];\n newOrder[slippedPosition] = switchGroupId;\n curPos++;\n }\n }\n }\n });\n me.body.emitter.emit('groupDragged', {\n groupId: id\n });\n }\n };\n /**\n * Handle selecting/deselecting an item when tapping it\n * @param {Event} event\n * @private\n */\n\n\n ItemSet.prototype._onSelectItem = function (event) {\n if (!this.options.selectable) return;\n var ctrlKey = event.srcEvent && (event.srcEvent.ctrlKey || event.srcEvent.metaKey);\n var shiftKey = event.srcEvent && event.srcEvent.shiftKey;\n\n if (ctrlKey || shiftKey) {\n this._onMultiSelectItem(event);\n\n return;\n }\n\n var oldSelection = this.getSelection();\n var item = this.itemFromTarget(event);\n var selection = item ? [item.id] : [];\n this.setSelection(selection);\n var newSelection = this.getSelection(); // emit a select event,\n // except when old selection is empty and new selection is still empty\n\n if (newSelection.length > 0 || oldSelection.length > 0) {\n this.body.emitter.emit('select', {\n items: newSelection,\n event: event\n });\n }\n };\n /**\n * Handle hovering an item\n * @param {Event} event\n * @private\n */\n\n\n ItemSet.prototype._onMouseOver = function (event) {\n var item = this.itemFromTarget(event);\n if (!item) return; // Item we just left\n\n var related = this.itemFromRelatedTarget(event);\n\n if (item === related) {\n // We haven't changed item, just element in the item\n return;\n }\n\n var title = item.getTitle();\n\n if (title) {\n if (this.popup == null) {\n this.popup = new _Popup2['default'](this.body.dom.root, this.options.tooltip.overflowMethod || 'flip');\n }\n\n this.popup.setText(title);\n var container = this.body.dom.centerContainer;\n this.popup.setPosition(event.clientX - util.getAbsoluteLeft(container) + container.offsetLeft, event.clientY - util.getAbsoluteTop(container) + container.offsetTop);\n this.popup.show();\n } else {\n // Hovering over item without a title, hide popup\n // Needed instead of _just_ in _onMouseOut due to #2572\n if (this.popup != null) {\n this.popup.hide();\n }\n }\n\n this.body.emitter.emit('itemover', {\n item: item.id,\n event: event\n });\n };\n\n ItemSet.prototype._onMouseOut = function (event) {\n var item = this.itemFromTarget(event);\n if (!item) return; // Item we are going to\n\n var related = this.itemFromRelatedTarget(event);\n\n if (item === related) {\n // We aren't changing item, just element in the item\n return;\n }\n\n if (this.popup != null) {\n this.popup.hide();\n }\n\n this.body.emitter.emit('itemout', {\n item: item.id,\n event: event\n });\n };\n\n ItemSet.prototype._onMouseMove = function (event) {\n var item = this.itemFromTarget(event);\n if (!item) return;\n\n if (this.options.tooltip.followMouse) {\n if (this.popup) {\n if (!this.popup.hidden) {\n var container = this.body.dom.centerContainer;\n this.popup.setPosition(event.clientX - util.getAbsoluteLeft(container) + container.offsetLeft, event.clientY - util.getAbsoluteTop(container) + container.offsetTop);\n this.popup.show(); // Redraw\n }\n }\n }\n };\n /**\n * Handle mousewheel\n * @param event\n * @private\n */\n\n\n ItemSet.prototype._onMouseWheel = function (event) {\n if (this.touchParams.itemIsDragging) {\n this._onDragEnd(event);\n }\n };\n /**\n * Handle updates of an item on double tap\n * @param event\n * @private\n */\n\n\n ItemSet.prototype._onUpdateItem = function (item) {\n if (!this.options.selectable) return;\n if (!this.options.editable.add) return;\n var me = this;\n\n if (item) {\n // execute async handler to update the item (or cancel it)\n var itemData = me.itemsData.get(item.id); // get a clone of the data from the dataset\n\n this.options.onUpdate(itemData, function (itemData) {\n if (itemData) {\n me.itemsData.getDataSet().update(itemData);\n }\n });\n }\n };\n /**\n * Handle creation of an item on double tap\n * @param event\n * @private\n */\n\n\n ItemSet.prototype._onAddItem = function (event) {\n if (!this.options.selectable) return;\n if (!this.options.editable.add) return;\n var me = this;\n var snap = this.options.snap || null;\n var item = this.itemFromTarget(event);\n\n if (!item) {\n // add item\n if (this.options.rtl) {\n var xAbs = util.getAbsoluteRight(this.dom.frame);\n var x = xAbs - event.center.x;\n } else {\n var xAbs = util.getAbsoluteLeft(this.dom.frame);\n var x = event.center.x - xAbs;\n } // var xAbs = util.getAbsoluteLeft(this.dom.frame);\n // var x = event.center.x - xAbs;\n\n\n var start = this.body.util.toTime(x);\n var scale = this.body.util.getScale();\n var step = this.body.util.getStep();\n var newItemData = {\n start: snap ? snap(start, scale, step) : start,\n content: 'new item'\n };\n\n if (event.type == 'drop') {\n var itemData = JSON.parse(event.dataTransfer.getData(\"text\"));\n newItemData.content = itemData.content; // content is required \n\n newItemData.type = itemData.type || 'box';\n newItemData[this.itemsData._fieldId] = itemData.id || util.randomUUID();\n\n if (itemData.type == 'range' || itemData.end && itemData.start) {\n if (!itemData.end) {\n var end = this.body.util.toTime(x + this.props.width / 5);\n newItemData.end = snap ? snap(end, scale, step) : end;\n } else {\n newItemData.end = itemData.end;\n newItemData.start = itemData.start;\n }\n }\n } else {\n newItemData[this.itemsData._fieldId] = util.randomUUID(); // when default type is a range, add a default end date to the new item\n\n if (this.options.type === 'range') {\n var end = this.body.util.toTime(x + this.props.width / 5);\n newItemData.end = snap ? snap(end, scale, step) : end;\n }\n }\n\n var group = this.groupFromTarget(event);\n\n if (group) {\n newItemData.group = group.groupId;\n } // execute async handler to customize (or cancel) adding an item\n\n\n newItemData = this._cloneItemData(newItemData); // convert start and end to the correct type\n\n this.options.onAdd(newItemData, function (item) {\n if (item) {\n me.itemsData.getDataSet().add(item);\n\n if (event.type == 'drop') {\n me.setSelection([item.id]);\n } // TODO: need to trigger a redraw?\n\n }\n });\n }\n };\n /**\n * Handle selecting/deselecting multiple items when holding an item\n * @param {Event} event\n * @private\n */\n\n\n ItemSet.prototype._onMultiSelectItem = function (event) {\n if (!this.options.selectable) return;\n var item = this.itemFromTarget(event);\n\n if (item) {\n // multi select items (if allowed)\n var selection = this.options.multiselect ? this.getSelection() // take current selection\n : []; // deselect current selection\n\n var shiftKey = event.srcEvent && event.srcEvent.shiftKey || false;\n\n if (shiftKey && this.options.multiselect) {\n // select all items between the old selection and the tapped item\n var itemGroup = this.itemsData.get(item.id).group; // when filtering get the group of the last selected item\n\n var lastSelectedGroup = undefined;\n\n if (this.options.multiselectPerGroup) {\n if (selection.length > 0) {\n lastSelectedGroup = this.itemsData.get(selection[0]).group;\n }\n } // determine the selection range\n\n\n if (!this.options.multiselectPerGroup || lastSelectedGroup == undefined || lastSelectedGroup == itemGroup) {\n selection.push(item.id);\n }\n\n var range = ItemSet._getItemRange(this.itemsData.get(selection, this.itemOptions));\n\n if (!this.options.multiselectPerGroup || lastSelectedGroup == itemGroup) {\n // select all items within the selection range\n selection = [];\n\n for (var id in this.items) {\n if (this.items.hasOwnProperty(id)) {\n var _item = this.items[id];\n var start = _item.data.start;\n var end = _item.data.end !== undefined ? _item.data.end : start;\n\n if (start >= range.min && end <= range.max && (!this.options.multiselectPerGroup || lastSelectedGroup == this.itemsData.get(_item.id).group) && !(_item instanceof BackgroundItem)) {\n selection.push(_item.id); // do not use id but item.id, id itself is stringified\n }\n }\n }\n }\n } else {\n // add/remove this item from the current selection\n var index = selection.indexOf(item.id);\n\n if (index == -1) {\n // item is not yet selected -> select it\n selection.push(item.id);\n } else {\n // item is already selected -> deselect it\n selection.splice(index, 1);\n }\n }\n\n this.setSelection(selection);\n this.body.emitter.emit('select', {\n items: this.getSelection(),\n event: event\n });\n }\n };\n /**\n * Calculate the time range of a list of items\n * @param {Array.} itemsData\n * @return {{min: Date, max: Date}} Returns the range of the provided items\n * @private\n */\n\n\n ItemSet._getItemRange = function (itemsData) {\n var max = null;\n var min = null;\n itemsData.forEach(function (data) {\n if (min == null || data.start < min) {\n min = data.start;\n }\n\n if (data.end != undefined) {\n if (max == null || data.end > max) {\n max = data.end;\n }\n } else {\n if (max == null || data.start > max) {\n max = data.start;\n }\n }\n });\n return {\n min: min,\n max: max\n };\n };\n /**\n * Find an item from an element:\n * searches for the attribute 'timeline-item' in the element's tree\n * @param {HTMLElement} element\n * @return {Item | null} item\n */\n\n\n ItemSet.prototype.itemFromElement = function (element) {\n var cur = element;\n\n while (cur) {\n if (cur.hasOwnProperty('timeline-item')) {\n return cur['timeline-item'];\n }\n\n cur = cur.parentNode;\n }\n\n return null;\n };\n /**\n * Find an item from an event target:\n * searches for the attribute 'timeline-item' in the event target's element tree\n * @param {Event} event\n * @return {Item | null} item\n */\n\n\n ItemSet.prototype.itemFromTarget = function (event) {\n return this.itemFromElement(event.target);\n };\n /**\n * Find an item from an event's related target:\n * searches for the attribute 'timeline-item' in the related target's element tree\n * @param {Event} event\n * @return {Item | null} item\n */\n\n\n ItemSet.prototype.itemFromRelatedTarget = function (event) {\n return this.itemFromElement(event.relatedTarget);\n };\n /**\n * Find the Group from an event target:\n * searches for the attribute 'timeline-group' in the event target's element tree\n * @param {Event} event\n * @return {Group | null} group\n */\n\n\n ItemSet.prototype.groupFromTarget = function (event) {\n var clientY = event.center ? event.center.y : event.clientY;\n\n for (var i = 0; i < this.groupIds.length; i++) {\n var groupId = this.groupIds[i];\n var group = this.groups[groupId];\n var foreground = group.dom.foreground;\n var top = util.getAbsoluteTop(foreground);\n\n if (clientY > top && clientY < top + foreground.offsetHeight) {\n return group;\n }\n\n if (this.options.orientation.item === 'top') {\n if (i === this.groupIds.length - 1 && clientY > top) {\n return group;\n }\n } else {\n if (i === 0 && clientY < top + foreground.offset) {\n return group;\n }\n }\n }\n\n return null;\n };\n /**\n * Find the ItemSet from an event target:\n * searches for the attribute 'timeline-itemset' in the event target's element tree\n * @param {Event} event\n * @return {ItemSet | null} item\n */\n\n\n ItemSet.itemSetFromTarget = function (event) {\n var target = event.target;\n\n while (target) {\n if (target.hasOwnProperty('timeline-itemset')) {\n return target['timeline-itemset'];\n }\n\n target = target.parentNode;\n }\n\n return null;\n };\n /**\n * Clone the data of an item, and \"normalize\" it: convert the start and end date\n * to the type (Date, Moment, ...) configured in the DataSet. If not configured,\n * start and end are converted to Date.\n * @param {Object} itemData, typically `item.data`\n * @param {string} [type] Optional Date type. If not provided, the type from the DataSet is taken\n * @return {Object} The cloned object\n * @private\n */\n\n\n ItemSet.prototype._cloneItemData = function (itemData, type) {\n var clone = util.extend({}, itemData);\n\n if (!type) {\n // convert start and end date to the type (Date, Moment, ...) configured in the DataSet\n type = this.itemsData.getDataSet()._options.type;\n }\n\n if (clone.start != undefined) {\n clone.start = util.convert(clone.start, type && type.start || 'Date');\n }\n\n if (clone.end != undefined) {\n clone.end = util.convert(clone.end, type && type.end || 'Date');\n }\n\n return clone;\n };\n\n module.exports = ItemSet;\n /***/\n },\n /* 132 */\n\n /***/\n function (module, exports, __webpack_require__) {\n 'use strict';\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n\n var _classCallCheck2 = __webpack_require__(119);\n\n var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\n var _createClass2 = __webpack_require__(120);\n\n var _createClass3 = _interopRequireDefault(_createClass2);\n\n function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n 'default': obj\n };\n }\n /**\n * Popup is a class to create a popup window with some text\n * @param {Element} container The container object.\n * @param {string} overflowMethod How the popup should act to overflowing ('flip' or 'cap')\n */\n\n\n var Popup = function () {\n function Popup(container, overflowMethod) {\n (0, _classCallCheck3['default'])(this, Popup);\n this.container = container;\n this.overflowMethod = overflowMethod || 'cap';\n this.x = 0;\n this.y = 0;\n this.padding = 5;\n this.hidden = false; // create the frame\n\n this.frame = document.createElement('div');\n this.frame.className = 'vis-tooltip';\n this.container.appendChild(this.frame);\n }\n /**\n * @param {number} x Horizontal position of the popup window\n * @param {number} y Vertical position of the popup window\n */\n\n\n (0, _createClass3['default'])(Popup, [{\n key: 'setPosition',\n value: function setPosition(x, y) {\n this.x = parseInt(x);\n this.y = parseInt(y);\n }\n /**\n * Set the content for the popup window. This can be HTML code or text.\n * @param {string | Element} content\n */\n\n }, {\n key: 'setText',\n value: function setText(content) {\n if (content instanceof Element) {\n this.frame.innerHTML = '';\n this.frame.appendChild(content);\n } else {\n this.frame.innerHTML = content; // string containing text or HTML\n }\n }\n /**\n * Show the popup window\n * @param {boolean} [doShow] Show or hide the window\n */\n\n }, {\n key: 'show',\n value: function show(doShow) {\n if (doShow === undefined) {\n doShow = true;\n }\n\n if (doShow === true) {\n var height = this.frame.clientHeight;\n var width = this.frame.clientWidth;\n var maxHeight = this.frame.parentNode.clientHeight;\n var maxWidth = this.frame.parentNode.clientWidth;\n var left = 0,\n top = 0;\n\n if (this.overflowMethod == 'flip') {\n var isLeft = false,\n isTop = true; // Where around the position it's located\n\n if (this.y - height < this.padding) {\n isTop = false;\n }\n\n if (this.x + width > maxWidth - this.padding) {\n isLeft = true;\n }\n\n if (isLeft) {\n left = this.x - width;\n } else {\n left = this.x;\n }\n\n if (isTop) {\n top = this.y - height;\n } else {\n top = this.y;\n }\n } else {\n top = this.y - height;\n\n if (top + height + this.padding > maxHeight) {\n top = maxHeight - height - this.padding;\n }\n\n if (top < this.padding) {\n top = this.padding;\n }\n\n left = this.x;\n\n if (left + width + this.padding > maxWidth) {\n left = maxWidth - width - this.padding;\n }\n\n if (left < this.padding) {\n left = this.padding;\n }\n }\n\n this.frame.style.left = left + \"px\";\n this.frame.style.top = top + \"px\";\n this.frame.style.visibility = \"visible\";\n this.hidden = false;\n } else {\n this.hide();\n }\n }\n /**\n * Hide the popup window\n */\n\n }, {\n key: 'hide',\n value: function hide() {\n this.hidden = true;\n this.frame.style.visibility = \"hidden\";\n }\n /**\n * Remove the popup window\n */\n\n }, {\n key: 'destroy',\n value: function destroy() {\n this.frame.parentNode.removeChild(this.frame); // Remove element from DOM\n }\n }]);\n return Popup;\n }();\n\n exports['default'] = Popup;\n /***/\n },\n /* 133 */\n\n /***/\n function (module, exports, __webpack_require__) {\n 'use strict';\n\n var moment = __webpack_require__(82);\n\n var DateUtil = __webpack_require__(129);\n\n var util = __webpack_require__(1);\n /**\n * @constructor TimeStep\n * The class TimeStep is an iterator for dates. You provide a start date and an\n * end date. The class itself determines the best scale (step size) based on the\n * provided start Date, end Date, and minimumStep.\n *\n * If minimumStep is provided, the step size is chosen as close as possible\n * to the minimumStep but larger than minimumStep. If minimumStep is not\n * provided, the scale is set to 1 DAY.\n * The minimumStep should correspond with the onscreen size of about 6 characters\n *\n * Alternatively, you can set a scale by hand.\n * After creation, you can initialize the class by executing first(). Then you\n * can iterate from the start date to the end date via next(). You can check if\n * the end date is reached with the function hasNext(). After each step, you can\n * retrieve the current date via getCurrent().\n * The TimeStep has scales ranging from milliseconds, seconds, minutes, hours,\n * days, to years.\n *\n * Version: 1.2\n *\n * @param {Date} [start] The start date, for example new Date(2010, 9, 21)\n * or new Date(2010, 9, 21, 23, 45, 00)\n * @param {Date} [end] The end date\n * @param {Number} [minimumStep] Optional. Minimum step size in milliseconds\n */\n\n\n function TimeStep(start, end, minimumStep, hiddenDates) {\n this.moment = moment; // variables\n\n this.current = this.moment();\n this._start = this.moment();\n this._end = this.moment();\n this.autoScale = true;\n this.scale = 'day';\n this.step = 1; // initialize the range\n\n this.setRange(start, end, minimumStep); // hidden Dates options\n\n this.switchedDay = false;\n this.switchedMonth = false;\n this.switchedYear = false;\n\n if (Array.isArray(hiddenDates)) {\n this.hiddenDates = hiddenDates;\n } else if (hiddenDates != undefined) {\n this.hiddenDates = [hiddenDates];\n } else {\n this.hiddenDates = [];\n }\n\n this.format = TimeStep.FORMAT; // default formatting\n } // Time formatting\n\n\n TimeStep.FORMAT = {\n minorLabels: {\n millisecond: 'SSS',\n second: 's',\n minute: 'HH:mm',\n hour: 'HH:mm',\n weekday: 'ddd D',\n day: 'D',\n month: 'MMM',\n year: 'YYYY'\n },\n majorLabels: {\n millisecond: 'HH:mm:ss',\n second: 'D MMMM HH:mm',\n minute: 'ddd D MMMM',\n hour: 'ddd D MMMM',\n weekday: 'MMMM YYYY',\n day: 'MMMM YYYY',\n month: 'YYYY',\n year: ''\n }\n };\n /**\n * Set custom constructor function for moment. Can be used to set dates\n * to UTC or to set a utcOffset.\n * @param {function} moment\n */\n\n TimeStep.prototype.setMoment = function (moment) {\n this.moment = moment; // update the date properties, can have a new utcOffset\n\n this.current = this.moment(this.current.valueOf());\n this._start = this.moment(this._start.valueOf());\n this._end = this.moment(this._end.valueOf());\n };\n /**\n * Set custom formatting for the minor an major labels of the TimeStep.\n * Both `minorLabels` and `majorLabels` are an Object with properties:\n * 'millisecond', 'second', 'minute', 'hour', 'weekday', 'day', 'month', 'year'.\n * @param {{minorLabels: Object, majorLabels: Object}} format\n */\n\n\n TimeStep.prototype.setFormat = function (format) {\n var defaultFormat = util.deepExtend({}, TimeStep.FORMAT);\n this.format = util.deepExtend(defaultFormat, format);\n };\n /**\n * Set a new range\n * If minimumStep is provided, the step size is chosen as close as possible\n * to the minimumStep but larger than minimumStep. If minimumStep is not\n * provided, the scale is set to 1 DAY.\n * The minimumStep should correspond with the onscreen size of about 6 characters\n * @param {Date} [start] The start date and time.\n * @param {Date} [end] The end date and time.\n * @param {int} [minimumStep] Optional. Minimum step size in milliseconds\n */\n\n\n TimeStep.prototype.setRange = function (start, end, minimumStep) {\n if (!(start instanceof Date) || !(end instanceof Date)) {\n throw \"No legal start or end date in method setRange\";\n }\n\n this._start = start != undefined ? this.moment(start.valueOf()) : new Date();\n this._end = end != undefined ? this.moment(end.valueOf()) : new Date();\n\n if (this.autoScale) {\n this.setMinimumStep(minimumStep);\n }\n };\n /**\n * Set the range iterator to the start date.\n */\n\n\n TimeStep.prototype.start = function () {\n this.current = this._start.clone();\n this.roundToMinor();\n };\n /**\n * Round the current date to the first minor date value\n * This must be executed once when the current date is set to start Date\n */\n\n\n TimeStep.prototype.roundToMinor = function () {\n // round to floor\n // IMPORTANT: we have no breaks in this switch! (this is no bug)\n // noinspection FallThroughInSwitchStatementJS\n switch (this.scale) {\n case 'year':\n this.current.year(this.step * Math.floor(this.current.year() / this.step));\n this.current.month(0);\n\n case 'month':\n this.current.date(1);\n\n case 'day': // intentional fall through\n\n case 'weekday':\n this.current.hours(0);\n\n case 'hour':\n this.current.minutes(0);\n\n case 'minute':\n this.current.seconds(0);\n\n case 'second':\n this.current.milliseconds(0);\n //case 'millisecond': // nothing to do for milliseconds\n }\n\n if (this.step != 1) {\n // round down to the first minor value that is a multiple of the current step size\n switch (this.scale) {\n case 'millisecond':\n this.current.subtract(this.current.milliseconds() % this.step, 'milliseconds');\n break;\n\n case 'second':\n this.current.subtract(this.current.seconds() % this.step, 'seconds');\n break;\n\n case 'minute':\n this.current.subtract(this.current.minutes() % this.step, 'minutes');\n break;\n\n case 'hour':\n this.current.subtract(this.current.hours() % this.step, 'hours');\n break;\n\n case 'weekday': // intentional fall through\n\n case 'day':\n this.current.subtract((this.current.date() - 1) % this.step, 'day');\n break;\n\n case 'month':\n this.current.subtract(this.current.month() % this.step, 'month');\n break;\n\n case 'year':\n this.current.subtract(this.current.year() % this.step, 'year');\n break;\n\n default:\n break;\n }\n }\n };\n /**\n * Check if the there is a next step\n * @return {boolean} true if the current date has not passed the end date\n */\n\n\n TimeStep.prototype.hasNext = function () {\n return this.current.valueOf() <= this._end.valueOf();\n };\n /**\n * Do the next step\n */\n\n\n TimeStep.prototype.next = function () {\n var prev = this.current.valueOf(); // Two cases, needed to prevent issues with switching daylight savings\n // (end of March and end of October)\n\n switch (this.scale) {\n case 'millisecond':\n this.current.add(this.step, 'millisecond');\n break;\n\n case 'second':\n this.current.add(this.step, 'second');\n break;\n\n case 'minute':\n this.current.add(this.step, 'minute');\n break;\n\n case 'hour':\n this.current.add(this.step, 'hour');\n\n if (this.current.month() < 6) {\n this.current.subtract(this.current.hours() % this.step, 'hour');\n } else {\n if (this.current.hours() % this.step !== 0) {\n this.current.add(this.step - this.current.hours() % this.step, 'hour');\n }\n }\n\n break;\n\n case 'weekday': // intentional fall through\n\n case 'day':\n this.current.add(this.step, 'day');\n break;\n\n case 'month':\n this.current.add(this.step, 'month');\n break;\n\n case 'year':\n this.current.add(this.step, 'year');\n break;\n\n default:\n break;\n }\n\n if (this.step != 1) {\n // round down to the correct major value\n switch (this.scale) {\n case 'millisecond':\n if (this.current.milliseconds() > 0 && this.current.milliseconds() < this.step) this.current.milliseconds(0);\n break;\n\n case 'second':\n if (this.current.seconds() > 0 && this.current.seconds() < this.step) this.current.seconds(0);\n break;\n\n case 'minute':\n if (this.current.minutes() > 0 && this.current.minutes() < this.step) this.current.minutes(0);\n break;\n\n case 'hour':\n if (this.current.hours() > 0 && this.current.hours() < this.step) this.current.hours(0);\n break;\n\n case 'weekday': // intentional fall through\n\n case 'day':\n if (this.current.date() < this.step + 1) this.current.date(1);\n break;\n\n case 'month':\n if (this.current.month() < this.step) this.current.month(0);\n break;\n\n case 'year':\n break;\n // nothing to do for year\n\n default:\n break;\n }\n } // safety mechanism: if current time is still unchanged, move to the end\n\n\n if (this.current.valueOf() == prev) {\n this.current = this._end.clone();\n } // Reset switches for year, month and day. Will get set to true where appropriate in DateUtil.stepOverHiddenDates\n\n\n this.switchedDay = false;\n this.switchedMonth = false;\n this.switchedYear = false;\n DateUtil.stepOverHiddenDates(this.moment, this, prev);\n };\n /**\n * Get the current datetime\n * @return {Moment} current The current date\n */\n\n\n TimeStep.prototype.getCurrent = function () {\n return this.current;\n };\n /**\n * Set a custom scale. Autoscaling will be disabled.\n * For example setScale('minute', 5) will result\n * in minor steps of 5 minutes, and major steps of an hour.\n *\n * @param {{scale: string, step: number}} params\n * An object containing two properties:\n * - A string 'scale'. Choose from 'millisecond', 'second',\n * 'minute', 'hour', 'weekday', 'day', 'month', 'year'.\n * - A number 'step'. A step size, by default 1.\n * Choose for example 1, 2, 5, or 10.\n */\n\n\n TimeStep.prototype.setScale = function (params) {\n if (params && typeof params.scale == 'string') {\n this.scale = params.scale;\n this.step = params.step > 0 ? params.step : 1;\n this.autoScale = false;\n }\n };\n /**\n * Enable or disable autoscaling\n * @param {boolean} enable If true, autoascaling is set true\n */\n\n\n TimeStep.prototype.setAutoScale = function (enable) {\n this.autoScale = enable;\n };\n /**\n * Automatically determine the scale that bests fits the provided minimum step\n * @param {Number} [minimumStep] The minimum step size in milliseconds\n */\n\n\n TimeStep.prototype.setMinimumStep = function (minimumStep) {\n if (minimumStep == undefined) {\n return;\n } //var b = asc + ds;\n\n\n var stepYear = 1000 * 60 * 60 * 24 * 30 * 12;\n var stepMonth = 1000 * 60 * 60 * 24 * 30;\n var stepDay = 1000 * 60 * 60 * 24;\n var stepHour = 1000 * 60 * 60;\n var stepMinute = 1000 * 60;\n var stepSecond = 1000;\n var stepMillisecond = 1; // find the smallest step that is larger than the provided minimumStep\n\n if (stepYear * 1000 > minimumStep) {\n this.scale = 'year';\n this.step = 1000;\n }\n\n if (stepYear * 500 > minimumStep) {\n this.scale = 'year';\n this.step = 500;\n }\n\n if (stepYear * 100 > minimumStep) {\n this.scale = 'year';\n this.step = 100;\n }\n\n if (stepYear * 50 > minimumStep) {\n this.scale = 'year';\n this.step = 50;\n }\n\n if (stepYear * 10 > minimumStep) {\n this.scale = 'year';\n this.step = 10;\n }\n\n if (stepYear * 5 > minimumStep) {\n this.scale = 'year';\n this.step = 5;\n }\n\n if (stepYear > minimumStep) {\n this.scale = 'year';\n this.step = 1;\n }\n\n if (stepMonth * 3 > minimumStep) {\n this.scale = 'month';\n this.step = 3;\n }\n\n if (stepMonth > minimumStep) {\n this.scale = 'month';\n this.step = 1;\n }\n\n if (stepDay * 5 > minimumStep) {\n this.scale = 'day';\n this.step = 5;\n }\n\n if (stepDay * 2 > minimumStep) {\n this.scale = 'day';\n this.step = 2;\n }\n\n if (stepDay > minimumStep) {\n this.scale = 'day';\n this.step = 1;\n }\n\n if (stepDay / 2 > minimumStep) {\n this.scale = 'weekday';\n this.step = 1;\n }\n\n if (stepHour * 4 > minimumStep) {\n this.scale = 'hour';\n this.step = 4;\n }\n\n if (stepHour > minimumStep) {\n this.scale = 'hour';\n this.step = 1;\n }\n\n if (stepMinute * 15 > minimumStep) {\n this.scale = 'minute';\n this.step = 15;\n }\n\n if (stepMinute * 10 > minimumStep) {\n this.scale = 'minute';\n this.step = 10;\n }\n\n if (stepMinute * 5 > minimumStep) {\n this.scale = 'minute';\n this.step = 5;\n }\n\n if (stepMinute > minimumStep) {\n this.scale = 'minute';\n this.step = 1;\n }\n\n if (stepSecond * 15 > minimumStep) {\n this.scale = 'second';\n this.step = 15;\n }\n\n if (stepSecond * 10 > minimumStep) {\n this.scale = 'second';\n this.step = 10;\n }\n\n if (stepSecond * 5 > minimumStep) {\n this.scale = 'second';\n this.step = 5;\n }\n\n if (stepSecond > minimumStep) {\n this.scale = 'second';\n this.step = 1;\n }\n\n if (stepMillisecond * 200 > minimumStep) {\n this.scale = 'millisecond';\n this.step = 200;\n }\n\n if (stepMillisecond * 100 > minimumStep) {\n this.scale = 'millisecond';\n this.step = 100;\n }\n\n if (stepMillisecond * 50 > minimumStep) {\n this.scale = 'millisecond';\n this.step = 50;\n }\n\n if (stepMillisecond * 10 > minimumStep) {\n this.scale = 'millisecond';\n this.step = 10;\n }\n\n if (stepMillisecond * 5 > minimumStep) {\n this.scale = 'millisecond';\n this.step = 5;\n }\n\n if (stepMillisecond > minimumStep) {\n this.scale = 'millisecond';\n this.step = 1;\n }\n };\n /**\n * Snap a date to a rounded value.\n * The snap intervals are dependent on the current scale and step.\n * Static function\n * @param {Date} date the date to be snapped.\n * @param {string} scale Current scale, can be 'millisecond', 'second',\n * 'minute', 'hour', 'weekday, 'day', 'month', 'year'.\n * @param {number} step Current step (1, 2, 4, 5, ...\n * @return {Date} snappedDate\n */\n\n\n TimeStep.snap = function (date, scale, step) {\n var clone = moment(date);\n\n if (scale == 'year') {\n var year = clone.year() + Math.round(clone.month() / 12);\n clone.year(Math.round(year / step) * step);\n clone.month(0);\n clone.date(0);\n clone.hours(0);\n clone.minutes(0);\n clone.seconds(0);\n clone.milliseconds(0);\n } else if (scale == 'month') {\n if (clone.date() > 15) {\n clone.date(1);\n clone.add(1, 'month'); // important: first set Date to 1, after that change the month.\n } else {\n clone.date(1);\n }\n\n clone.hours(0);\n clone.minutes(0);\n clone.seconds(0);\n clone.milliseconds(0);\n } else if (scale == 'day') {\n //noinspection FallthroughInSwitchStatementJS\n switch (step) {\n case 5:\n case 2:\n clone.hours(Math.round(clone.hours() / 24) * 24);\n break;\n\n default:\n clone.hours(Math.round(clone.hours() / 12) * 12);\n break;\n }\n\n clone.minutes(0);\n clone.seconds(0);\n clone.milliseconds(0);\n } else if (scale == 'weekday') {\n //noinspection FallthroughInSwitchStatementJS\n switch (step) {\n case 5:\n case 2:\n clone.hours(Math.round(clone.hours() / 12) * 12);\n break;\n\n default:\n clone.hours(Math.round(clone.hours() / 6) * 6);\n break;\n }\n\n clone.minutes(0);\n clone.seconds(0);\n clone.milliseconds(0);\n } else if (scale == 'hour') {\n switch (step) {\n case 4:\n clone.minutes(Math.round(clone.minutes() / 60) * 60);\n break;\n\n default:\n clone.minutes(Math.round(clone.minutes() / 30) * 30);\n break;\n }\n\n clone.seconds(0);\n clone.milliseconds(0);\n } else if (scale == 'minute') {\n //noinspection FallthroughInSwitchStatementJS\n switch (step) {\n case 15:\n case 10:\n clone.minutes(Math.round(clone.minutes() / 5) * 5);\n clone.seconds(0);\n break;\n\n case 5:\n clone.seconds(Math.round(clone.seconds() / 60) * 60);\n break;\n\n default:\n clone.seconds(Math.round(clone.seconds() / 30) * 30);\n break;\n }\n\n clone.milliseconds(0);\n } else if (scale == 'second') {\n //noinspection FallthroughInSwitchStatementJS\n switch (step) {\n case 15:\n case 10:\n clone.seconds(Math.round(clone.seconds() / 5) * 5);\n clone.milliseconds(0);\n break;\n\n case 5:\n clone.milliseconds(Math.round(clone.milliseconds() / 1000) * 1000);\n break;\n\n default:\n clone.milliseconds(Math.round(clone.milliseconds() / 500) * 500);\n break;\n }\n } else if (scale == 'millisecond') {\n var _step = step > 5 ? step / 2 : 1;\n\n clone.milliseconds(Math.round(clone.milliseconds() / _step) * _step);\n }\n\n return clone;\n };\n /**\n * Check if the current value is a major value (for example when the step\n * is DAY, a major value is each first day of the MONTH)\n * @return {boolean} true if current date is major, else false.\n */\n\n\n TimeStep.prototype.isMajor = function () {\n if (this.switchedYear == true) {\n switch (this.scale) {\n case 'year':\n case 'month':\n case 'weekday':\n case 'day':\n case 'hour':\n case 'minute':\n case 'second':\n case 'millisecond':\n return true;\n\n default:\n return false;\n }\n } else if (this.switchedMonth == true) {\n switch (this.scale) {\n case 'weekday':\n case 'day':\n case 'hour':\n case 'minute':\n case 'second':\n case 'millisecond':\n return true;\n\n default:\n return false;\n }\n } else if (this.switchedDay == true) {\n switch (this.scale) {\n case 'millisecond':\n case 'second':\n case 'minute':\n case 'hour':\n return true;\n\n default:\n return false;\n }\n }\n\n var date = this.moment(this.current);\n\n switch (this.scale) {\n case 'millisecond':\n return date.milliseconds() == 0;\n\n case 'second':\n return date.seconds() == 0;\n\n case 'minute':\n return date.hours() == 0 && date.minutes() == 0;\n\n case 'hour':\n return date.hours() == 0;\n\n case 'weekday': // intentional fall through\n\n case 'day':\n return date.date() == 1;\n\n case 'month':\n return date.month() == 0;\n\n case 'year':\n return false;\n\n default:\n return false;\n }\n };\n /**\n * Returns formatted text for the minor axislabel, depending on the current\n * date and the scale. For example when scale is MINUTE, the current time is\n * formatted as \"hh:mm\".\n * @param {Date} [date] custom date. if not provided, current date is taken\n */\n\n\n TimeStep.prototype.getLabelMinor = function (date) {\n if (date == undefined) {\n date = this.current;\n }\n\n if (date instanceof Date) {\n date = this.moment(date);\n }\n\n if (typeof this.format.minorLabels === \"function\") {\n return this.format.minorLabels(date, this.scale, this.step);\n }\n\n var format = this.format.minorLabels[this.scale];\n return format && format.length > 0 ? this.moment(date).format(format) : '';\n };\n /**\n * Returns formatted text for the major axis label, depending on the current\n * date and the scale. For example when scale is MINUTE, the major scale is\n * hours, and the hour will be formatted as \"hh\".\n * @param {Date} [date] custom date. if not provided, current date is taken\n */\n\n\n TimeStep.prototype.getLabelMajor = function (date) {\n if (date == undefined) {\n date = this.current;\n }\n\n if (date instanceof Date) {\n date = this.moment(date);\n }\n\n if (typeof this.format.majorLabels === \"function\") {\n return this.format.majorLabels(date, this.scale, this.step);\n }\n\n var format = this.format.majorLabels[this.scale];\n return format && format.length > 0 ? this.moment(date).format(format) : '';\n };\n\n TimeStep.prototype.getClassName = function () {\n var _moment = this.moment;\n var m = this.moment(this.current);\n var current = m.locale ? m.locale('en') : m.lang('en'); // old versions of moment have .lang() function\n\n var step = this.step;\n\n function even(value) {\n return value / step % 2 == 0 ? ' vis-even' : ' vis-odd';\n }\n\n function today(date) {\n if (date.isSame(new Date(), 'day')) {\n return ' vis-today';\n }\n\n if (date.isSame(_moment().add(1, 'day'), 'day')) {\n return ' vis-tomorrow';\n }\n\n if (date.isSame(_moment().add(-1, 'day'), 'day')) {\n return ' vis-yesterday';\n }\n\n return '';\n }\n\n function currentWeek(date) {\n return date.isSame(new Date(), 'week') ? ' vis-current-week' : '';\n }\n\n function currentMonth(date) {\n return date.isSame(new Date(), 'month') ? ' vis-current-month' : '';\n }\n\n function currentYear(date) {\n return date.isSame(new Date(), 'year') ? ' vis-current-year' : '';\n }\n\n switch (this.scale) {\n case 'millisecond':\n return today(current) + even(current.milliseconds()).trim();\n\n case 'second':\n return today(current) + even(current.seconds()).trim();\n\n case 'minute':\n return today(current) + even(current.minutes()).trim();\n\n case 'hour':\n return 'vis-h' + current.hours() + (this.step == 4 ? '-h' + (current.hours() + 4) : '') + today(current) + even(current.hours());\n\n case 'weekday':\n return 'vis-' + current.format('dddd').toLowerCase() + today(current) + currentWeek(current) + even(current.date());\n\n case 'day':\n return 'vis-day' + current.date() + ' vis-' + current.format('MMMM').toLowerCase() + today(current) + currentMonth(current) + (this.step <= 2 ? today(current) : '') + (this.step <= 2 ? ' vis-' + current.format('dddd').toLowerCase() : '' + even(current.date() - 1));\n\n case 'month':\n return 'vis-' + current.format('MMMM').toLowerCase() + currentMonth(current) + even(current.month());\n\n case 'year':\n var year = current.year();\n return 'vis-year' + year + currentYear(current) + even(year);\n\n default:\n return '';\n }\n };\n\n module.exports = TimeStep;\n /***/\n },\n /* 134 */\n\n /***/\n function (module, exports, __webpack_require__) {\n 'use strict';\n\n var _keys = __webpack_require__(58);\n\n var _keys2 = _interopRequireDefault(_keys);\n\n function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n 'default': obj\n };\n }\n\n var util = __webpack_require__(1);\n\n var stack = __webpack_require__(135);\n\n var RangeItem = __webpack_require__(136);\n /**\n * @constructor Group\n * @param {Number | String} groupId\n * @param {Object} data\n * @param {ItemSet} itemSet\n */\n\n\n function Group(groupId, data, itemSet) {\n this.groupId = groupId;\n this.subgroups = {};\n this.subgroupIndex = 0;\n this.subgroupOrderer = data && data.subgroupOrder;\n this.itemSet = itemSet;\n this.isVisible = null;\n\n if (data && data.nestedGroups) {\n this.nestedGroups = data.nestedGroups;\n\n if (data.showNested == false) {\n this.showNested = false;\n } else {\n this.showNested = true;\n }\n }\n\n this.nestedInGroup = null;\n this.dom = {};\n this.props = {\n label: {\n width: 0,\n height: 0\n }\n };\n this.className = null;\n this.items = {}; // items filtered by groupId of this group\n\n this.visibleItems = []; // items currently visible in window\n\n this.itemsInRange = []; // items currently in range\n\n this.orderedItems = {\n byStart: [],\n byEnd: []\n };\n this.checkRangedItems = false; // needed to refresh the ranged items if the window is programatically changed with NO overlap.\n\n var me = this;\n this.itemSet.body.emitter.on(\"checkRangedItems\", function () {\n me.checkRangedItems = true;\n });\n\n this._create();\n\n this.setData(data);\n }\n /**\n * Create DOM elements for the group\n * @private\n */\n\n\n Group.prototype._create = function () {\n var label = document.createElement('div');\n\n if (this.itemSet.options.groupEditable.order) {\n label.className = 'vis-label draggable';\n } else {\n label.className = 'vis-label';\n }\n\n this.dom.label = label;\n var inner = document.createElement('div');\n inner.className = 'vis-inner';\n label.appendChild(inner);\n this.dom.inner = inner;\n var foreground = document.createElement('div');\n foreground.className = 'vis-group';\n foreground['timeline-group'] = this;\n this.dom.foreground = foreground;\n this.dom.background = document.createElement('div');\n this.dom.background.className = 'vis-group';\n this.dom.axis = document.createElement('div');\n this.dom.axis.className = 'vis-group'; // create a hidden marker to detect when the Timelines container is attached\n // to the DOM, or the style of a parent of the Timeline is changed from\n // display:none is changed to visible.\n\n this.dom.marker = document.createElement('div');\n this.dom.marker.style.visibility = 'hidden';\n this.dom.marker.style.position = 'absolute';\n this.dom.marker.innerHTML = '';\n this.dom.background.appendChild(this.dom.marker);\n };\n /**\n * Set the group data for this group\n * @param {Object} data Group data, can contain properties content and className\n */\n\n\n Group.prototype.setData = function (data) {\n // update contents\n var content;\n var templateFunction;\n\n if (this.itemSet.options && this.itemSet.options.groupTemplate) {\n templateFunction = this.itemSet.options.groupTemplate.bind(this);\n content = templateFunction(data, this.dom.inner);\n } else {\n content = data && data.content;\n }\n\n if (content instanceof Element) {\n this.dom.inner.appendChild(content);\n\n while (this.dom.inner.firstChild) {\n this.dom.inner.removeChild(this.dom.inner.firstChild);\n }\n\n this.dom.inner.appendChild(content);\n } else if (content instanceof Object) {\n templateFunction(data, this.dom.inner);\n } else if (content !== undefined && content !== null) {\n this.dom.inner.innerHTML = content;\n } else {\n this.dom.inner.innerHTML = this.groupId || ''; // groupId can be null\n } // update title\n\n\n this.dom.label.title = data && data.title || '';\n\n if (!this.dom.inner.firstChild) {\n util.addClassName(this.dom.inner, 'vis-hidden');\n } else {\n util.removeClassName(this.dom.inner, 'vis-hidden');\n }\n\n if (data && data.nestedGroups) {\n if (!this.nestedGroups || this.nestedGroups != data.nestedGroups) {\n this.nestedGroups = data.nestedGroups;\n }\n\n if (data.showNested !== undefined || this.showNested === undefined) {\n if (data.showNested == false) {\n this.showNested = false;\n } else {\n this.showNested = true;\n }\n }\n\n util.addClassName(this.dom.label, 'vis-nesting-group');\n var collapsedDirClassName = this.itemSet.options.rtl ? 'collapsed-rtl' : 'collapsed';\n\n if (this.showNested) {\n util.removeClassName(this.dom.label, collapsedDirClassName);\n util.addClassName(this.dom.label, 'expanded');\n } else {\n util.removeClassName(this.dom.label, 'expanded');\n util.addClassName(this.dom.label, collapsedDirClassName);\n }\n } else if (this.nestedGroups) {\n this.nestedGroups = null;\n var collapsedDirClassName = this.itemSet.options.rtl ? 'collapsed-rtl' : 'collapsed';\n util.removeClassName(this.dom.label, collapsedDirClassName);\n util.removeClassName(this.dom.label, 'expanded');\n util.removeClassName(this.dom.label, 'vis-nesting-group');\n }\n\n if (data && data.nestedInGroup) {\n util.addClassName(this.dom.label, 'vis-nested-group');\n\n if (this.itemSet.options && this.itemSet.options.rtl) {\n this.dom.inner.style.paddingRight = '30px';\n } else {\n this.dom.inner.style.paddingLeft = '30px';\n }\n } // update className\n\n\n var className = data && data.className || null;\n\n if (className != this.className) {\n if (this.className) {\n util.removeClassName(this.dom.label, this.className);\n util.removeClassName(this.dom.foreground, this.className);\n util.removeClassName(this.dom.background, this.className);\n util.removeClassName(this.dom.axis, this.className);\n }\n\n util.addClassName(this.dom.label, className);\n util.addClassName(this.dom.foreground, className);\n util.addClassName(this.dom.background, className);\n util.addClassName(this.dom.axis, className);\n this.className = className;\n } // update style\n\n\n if (this.style) {\n util.removeCssText(this.dom.label, this.style);\n this.style = null;\n }\n\n if (data && data.style) {\n util.addCssText(this.dom.label, data.style);\n this.style = data.style;\n }\n };\n /**\n * Get the width of the group label\n * @return {number} width\n */\n\n\n Group.prototype.getLabelWidth = function () {\n return this.props.label.width;\n };\n /**\n * Repaint this group\n * @param {{start: number, end: number}} range\n * @param {{item: {horizontal: number, vertical: number}, axis: number}} margin\n * @param {boolean} [restack=false] Force restacking of all items\n * @return {boolean} Returns true if the group is resized\n */\n\n\n Group.prototype.redraw = function (range, margin, restack) {\n var resized = false; // force recalculation of the height of the items when the marker height changed\n // (due to the Timeline being attached to the DOM or changed from display:none to visible)\n\n var markerHeight = this.dom.marker.clientHeight;\n\n if (markerHeight != this.lastMarkerHeight) {\n this.lastMarkerHeight = markerHeight;\n util.forEach(this.items, function (item) {\n item.dirty = true;\n if (item.displayed) item.redraw();\n });\n restack = true;\n } // recalculate the height of the subgroups\n\n\n this._calculateSubGroupHeights(margin); // calculate actual size and position\n\n\n var foreground = this.dom.foreground;\n this.top = foreground.offsetTop;\n this.right = foreground.offsetLeft;\n this.width = foreground.offsetWidth;\n this.isVisible = this._isGroupVisible(range, margin); // reposition visible items vertically\n\n if (typeof this.itemSet.options.order === 'function') {\n // a custom order function\n if (restack) {\n // brute force restack of all items\n // show all items\n var me = this;\n var limitSize = false;\n util.forEach(this.items, function (item) {\n if (!item.displayed) {\n item.redraw();\n me.visibleItems.push(item);\n }\n\n item.repositionX(limitSize);\n }); // order all items and force a restacking\n\n var customOrderedItems = this.orderedItems.byStart.slice().sort(function (a, b) {\n return me.itemSet.options.order(a.data, b.data);\n });\n stack.stack(customOrderedItems, margin, true\n /* restack=true */\n );\n }\n\n this.visibleItems = this._updateItemsInRange(this.orderedItems, this.visibleItems, range);\n } else {\n // no custom order function, lazy stacking\n this.visibleItems = this._updateItemsInRange(this.orderedItems, this.visibleItems, range);\n\n if (this.itemSet.options.stack) {\n // TODO: ugly way to access options...\n stack.stack(this.visibleItems, margin, restack);\n } else {\n // no stacking\n stack.nostack(this.visibleItems, margin, this.subgroups, this.itemSet.options.stackSubgroups);\n }\n }\n\n this._updateSubgroupsSizes(); // recalculate the height of the group\n\n\n var height = this._calculateHeight(margin); // calculate actual size and position\n\n\n var foreground = this.dom.foreground;\n this.top = foreground.offsetTop;\n this.right = foreground.offsetLeft;\n this.width = foreground.offsetWidth;\n resized = util.updateProperty(this, 'height', height) || resized; // recalculate size of label\n\n resized = util.updateProperty(this.props.label, 'width', this.dom.inner.clientWidth) || resized;\n resized = util.updateProperty(this.props.label, 'height', this.dom.inner.clientHeight) || resized; // apply new height\n\n this.dom.background.style.height = height + 'px';\n this.dom.foreground.style.height = height + 'px';\n this.dom.label.style.height = height + 'px'; // update vertical position of items after they are re-stacked and the height of the group is calculated\n\n for (var i = 0, ii = this.visibleItems.length; i < ii; i++) {\n var item = this.visibleItems[i];\n item.repositionY(margin);\n\n if (!this.isVisible && this.groupId != \"__background__\") {\n if (item.displayed) item.hide();\n }\n }\n\n if (!this.isVisible && this.height) {\n return resized = false;\n }\n\n return resized;\n };\n /**\n * recalculate the height of the subgroups\n * @private\n */\n\n\n Group.prototype._calculateSubGroupHeights = function (margin) {\n if ((0, _keys2['default'])(this.subgroups).length > 0) {\n var me = this;\n this.resetSubgroups();\n util.forEach(this.visibleItems, function (item) {\n if (item.data.subgroup !== undefined) {\n me.subgroups[item.data.subgroup].height = Math.max(me.subgroups[item.data.subgroup].height, item.height + margin.item.vertical);\n me.subgroups[item.data.subgroup].visible = true;\n }\n });\n }\n };\n /**\n * check if group is visible\n * @private\n */\n\n\n Group.prototype._isGroupVisible = function (range, margin) {\n var isVisible = this.top <= range.body.domProps.centerContainer.height - range.body.domProps.scrollTop + margin.axis && this.top + this.height + margin.axis >= -range.body.domProps.scrollTop;\n return isVisible;\n };\n /**\n * recalculate the height of the group\n * @param {{item: {horizontal: number, vertical: number}, axis: number}} margin\n * @returns {number} Returns the height\n * @private\n */\n\n\n Group.prototype._calculateHeight = function (margin) {\n // recalculate the height of the group\n var height;\n var itemsInRange = this.visibleItems;\n\n if (itemsInRange.length > 0) {\n var min = itemsInRange[0].top;\n var max = itemsInRange[0].top + itemsInRange[0].height;\n util.forEach(itemsInRange, function (item) {\n min = Math.min(min, item.top);\n max = Math.max(max, item.top + item.height);\n });\n\n if (min > margin.axis) {\n // there is an empty gap between the lowest item and the axis\n var offset = min - margin.axis;\n max -= offset;\n util.forEach(itemsInRange, function (item) {\n item.top -= offset;\n });\n }\n\n height = max + margin.item.vertical / 2;\n } else {\n height = 0;\n }\n\n height = Math.max(height, this.props.label.height);\n return height;\n };\n /**\n * Show this group: attach to the DOM\n */\n\n\n Group.prototype.show = function () {\n if (!this.dom.label.parentNode) {\n this.itemSet.dom.labelSet.appendChild(this.dom.label);\n }\n\n if (!this.dom.foreground.parentNode) {\n this.itemSet.dom.foreground.appendChild(this.dom.foreground);\n }\n\n if (!this.dom.background.parentNode) {\n this.itemSet.dom.background.appendChild(this.dom.background);\n }\n\n if (!this.dom.axis.parentNode) {\n this.itemSet.dom.axis.appendChild(this.dom.axis);\n }\n };\n /**\n * Hide this group: remove from the DOM\n */\n\n\n Group.prototype.hide = function () {\n var label = this.dom.label;\n\n if (label.parentNode) {\n label.parentNode.removeChild(label);\n }\n\n var foreground = this.dom.foreground;\n\n if (foreground.parentNode) {\n foreground.parentNode.removeChild(foreground);\n }\n\n var background = this.dom.background;\n\n if (background.parentNode) {\n background.parentNode.removeChild(background);\n }\n\n var axis = this.dom.axis;\n\n if (axis.parentNode) {\n axis.parentNode.removeChild(axis);\n }\n };\n /**\n * Add an item to the group\n * @param {Item} item\n */\n\n\n Group.prototype.add = function (item) {\n this.items[item.id] = item;\n item.setParent(this); // add to\n\n if (item.data.subgroup !== undefined) {\n this._addToSubgroup(item);\n\n this.orderSubgroups();\n }\n\n if (this.visibleItems.indexOf(item) == -1) {\n var range = this.itemSet.body.range; // TODO: not nice accessing the range like this\n\n this._checkIfVisible(item, this.visibleItems, range);\n }\n };\n\n Group.prototype._addToSubgroup = function (item, subgroupId) {\n subgroupId = subgroupId || item.data.subgroup;\n\n if (subgroupId != undefined && this.subgroups[subgroupId] === undefined) {\n this.subgroups[subgroupId] = {\n height: 0,\n top: 0,\n start: item.data.start,\n end: item.data.end,\n visible: false,\n index: this.subgroupIndex,\n items: []\n };\n this.subgroupIndex++;\n }\n\n if (new Date(item.data.start) < new Date(this.subgroups[subgroupId].start)) {\n this.subgroups[subgroupId].start = item.data.start;\n }\n\n if (new Date(item.data.end) > new Date(this.subgroups[subgroupId].end)) {\n this.subgroups[subgroupId].end = item.data.end;\n }\n\n this.subgroups[subgroupId].items.push(item);\n };\n\n Group.prototype._updateSubgroupsSizes = function () {\n var me = this;\n\n if (me.subgroups) {\n for (var subgroup in me.subgroups) {\n var newStart = me.subgroups[subgroup].items[0].data.start;\n var newEnd = me.subgroups[subgroup].items[0].data.end;\n me.subgroups[subgroup].items.forEach(function (item) {\n if (new Date(item.data.start) < new Date(newStart)) {\n newStart = item.data.start;\n }\n\n if (new Date(item.data.end) > new Date(newEnd)) {\n newEnd = item.data.end;\n }\n });\n me.subgroups[subgroup].start = newStart;\n me.subgroups[subgroup].end = newEnd;\n }\n }\n };\n\n Group.prototype.orderSubgroups = function () {\n if (this.subgroupOrderer !== undefined) {\n var sortArray = [];\n\n if (typeof this.subgroupOrderer == 'string') {\n for (var subgroup in this.subgroups) {\n sortArray.push({\n subgroup: subgroup,\n sortField: this.subgroups[subgroup].items[0].data[this.subgroupOrderer]\n });\n }\n\n sortArray.sort(function (a, b) {\n return a.sortField - b.sortField;\n });\n } else if (typeof this.subgroupOrderer == 'function') {\n for (var subgroup in this.subgroups) {\n sortArray.push(this.subgroups[subgroup].items[0].data);\n }\n\n sortArray.sort(this.subgroupOrderer);\n }\n\n if (sortArray.length > 0) {\n for (var i = 0; i < sortArray.length; i++) {\n this.subgroups[sortArray[i].subgroup].index = i;\n }\n }\n }\n };\n\n Group.prototype.resetSubgroups = function () {\n for (var subgroup in this.subgroups) {\n if (this.subgroups.hasOwnProperty(subgroup)) {\n this.subgroups[subgroup].visible = false;\n }\n }\n };\n /**\n * Remove an item from the group\n * @param {Item} item\n */\n\n\n Group.prototype.remove = function (item) {\n delete this.items[item.id];\n item.setParent(null); // remove from visible items\n\n var index = this.visibleItems.indexOf(item);\n if (index != -1) this.visibleItems.splice(index, 1);\n\n if (item.data.subgroup !== undefined) {\n this._removeFromSubgroup(item);\n\n this.orderSubgroups();\n }\n };\n\n Group.prototype._removeFromSubgroup = function (item, subgroupId) {\n subgroupId = subgroupId || item.data.subgroup;\n\n if (subgroupId != undefined) {\n var subgroup = this.subgroups[subgroupId];\n\n if (subgroup) {\n var itemIndex = subgroup.items.indexOf(item); // Check the item is actually in this subgroup. How should items not in the group be handled?\n\n if (itemIndex >= 0) {\n subgroup.items.splice(itemIndex, 1);\n\n if (!subgroup.items.length) {\n delete this.subgroups[subgroupId];\n } else {\n this._updateSubgroupsSizes();\n }\n }\n }\n }\n };\n /**\n * Remove an item from the corresponding DataSet\n * @param {Item} item\n */\n\n\n Group.prototype.removeFromDataSet = function (item) {\n this.itemSet.removeItem(item.id);\n };\n /**\n * Reorder the items\n */\n\n\n Group.prototype.order = function () {\n var array = util.toArray(this.items);\n var startArray = [];\n var endArray = [];\n\n for (var i = 0; i < array.length; i++) {\n if (array[i].data.end !== undefined) {\n endArray.push(array[i]);\n }\n\n startArray.push(array[i]);\n }\n\n this.orderedItems = {\n byStart: startArray,\n byEnd: endArray\n };\n stack.orderByStart(this.orderedItems.byStart);\n stack.orderByEnd(this.orderedItems.byEnd);\n };\n /**\n * Update the visible items\n * @param {{byStart: Item[], byEnd: Item[]}} orderedItems All items ordered by start date and by end date\n * @param {Item[]} visibleItems The previously visible items.\n * @param {{start: number, end: number}} range Visible range\n * @return {Item[]} visibleItems The new visible items.\n * @private\n */\n\n\n Group.prototype._updateItemsInRange = function (orderedItems, oldVisibleItems, range) {\n var visibleItems = [];\n var visibleItemsLookup = {}; // we keep this to quickly look up if an item already exists in the list without using indexOf on visibleItems\n\n var interval = (range.end - range.start) / 4;\n var lowerBound = range.start - interval;\n var upperBound = range.end + interval; // this function is used to do the binary search.\n\n var searchFunction = function searchFunction(value) {\n if (value < lowerBound) {\n return -1;\n } else if (value <= upperBound) {\n return 0;\n } else {\n return 1;\n }\n }; // first check if the items that were in view previously are still in view.\n // IMPORTANT: this handles the case for the items with startdate before the window and enddate after the window!\n // also cleans up invisible items.\n\n\n if (oldVisibleItems.length > 0) {\n for (var i = 0; i < oldVisibleItems.length; i++) {\n this._checkIfVisibleWithReference(oldVisibleItems[i], visibleItems, visibleItemsLookup, range);\n }\n } // we do a binary search for the items that have only start values.\n\n\n var initialPosByStart = util.binarySearchCustom(orderedItems.byStart, searchFunction, 'data', 'start'); // trace the visible items from the inital start pos both ways until an invisible item is found, we only look at the start values.\n\n this._traceVisible(initialPosByStart, orderedItems.byStart, visibleItems, visibleItemsLookup, function (item) {\n return item.data.start < lowerBound || item.data.start > upperBound;\n }); // if the window has changed programmatically without overlapping the old window, the ranged items with start < lowerBound and end > upperbound are not shown.\n // We therefore have to brute force check all items in the byEnd list\n\n\n if (this.checkRangedItems == true) {\n this.checkRangedItems = false;\n\n for (i = 0; i < orderedItems.byEnd.length; i++) {\n this._checkIfVisibleWithReference(orderedItems.byEnd[i], visibleItems, visibleItemsLookup, range);\n }\n } else {\n // we do a binary search for the items that have defined end times.\n var initialPosByEnd = util.binarySearchCustom(orderedItems.byEnd, searchFunction, 'data', 'end'); // trace the visible items from the inital start pos both ways until an invisible item is found, we only look at the end values.\n\n this._traceVisible(initialPosByEnd, orderedItems.byEnd, visibleItems, visibleItemsLookup, function (item) {\n return item.data.end < lowerBound || item.data.end > upperBound;\n });\n } // finally, we reposition all the visible items.\n\n\n for (var i = 0; i < visibleItems.length; i++) {\n var item = visibleItems[i];\n if (!item.displayed) item.show(); // reposition item horizontally\n\n item.repositionX();\n }\n\n return visibleItems;\n };\n\n Group.prototype._traceVisible = function (initialPos, items, visibleItems, visibleItemsLookup, breakCondition) {\n if (initialPos != -1) {\n for (var i = initialPos; i >= 0; i--) {\n var item = items[i];\n\n if (breakCondition(item)) {\n break;\n } else {\n if (visibleItemsLookup[item.id] === undefined) {\n visibleItemsLookup[item.id] = true;\n visibleItems.push(item);\n }\n }\n }\n\n for (var i = initialPos + 1; i < items.length; i++) {\n var item = items[i];\n\n if (breakCondition(item)) {\n break;\n } else {\n if (visibleItemsLookup[item.id] === undefined) {\n visibleItemsLookup[item.id] = true;\n visibleItems.push(item);\n }\n }\n }\n }\n };\n /**\n * this function is very similar to the _checkIfInvisible() but it does not\n * return booleans, hides the item if it should not be seen and always adds to\n * the visibleItems.\n * this one is for brute forcing and hiding.\n *\n * @param {Item} item\n * @param {Array} visibleItems\n * @param {{start:number, end:number}} range\n * @private\n */\n\n\n Group.prototype._checkIfVisible = function (item, visibleItems, range) {\n if (item.isVisible(range)) {\n if (!item.displayed) item.show(); // reposition item horizontally\n\n item.repositionX();\n visibleItems.push(item);\n } else {\n if (item.displayed) item.hide();\n }\n };\n /**\n * this function is very similar to the _checkIfInvisible() but it does not\n * return booleans, hides the item if it should not be seen and always adds to\n * the visibleItems.\n * this one is for brute forcing and hiding.\n *\n * @param {Item} item\n * @param {Array} visibleItems\n * @param {{start:number, end:number}} range\n * @private\n */\n\n\n Group.prototype._checkIfVisibleWithReference = function (item, visibleItems, visibleItemsLookup, range) {\n if (item.isVisible(range)) {\n if (visibleItemsLookup[item.id] === undefined) {\n visibleItemsLookup[item.id] = true;\n visibleItems.push(item);\n }\n } else {\n if (item.displayed) item.hide();\n }\n };\n\n Group.prototype.changeSubgroup = function (item, oldSubgroup, newSubgroup) {\n this._removeFromSubgroup(item, oldSubgroup);\n\n this._addToSubgroup(item, newSubgroup);\n\n this.orderSubgroups();\n };\n\n module.exports = Group;\n /***/\n },\n /* 135 */\n\n /***/\n function (module, exports) {\n 'use strict'; // Utility functions for ordering and stacking of items\n\n var EPSILON = 0.001; // used when checking collisions, to prevent round-off errors\n\n /**\n * Order items by their start data\n * @param {Item[]} items\n */\n\n exports.orderByStart = function (items) {\n items.sort(function (a, b) {\n return a.data.start - b.data.start;\n });\n };\n /**\n * Order items by their end date. If they have no end date, their start date\n * is used.\n * @param {Item[]} items\n */\n\n\n exports.orderByEnd = function (items) {\n items.sort(function (a, b) {\n var aTime = 'end' in a.data ? a.data.end : a.data.start,\n bTime = 'end' in b.data ? b.data.end : b.data.start;\n return aTime - bTime;\n });\n };\n /**\n * Adjust vertical positions of the items such that they don't overlap each\n * other.\n * @param {Item[]} items\n * All visible items\n * @param {{item: {horizontal: number, vertical: number}, axis: number}} margin\n * Margins between items and between items and the axis.\n * @param {boolean} [force=false]\n * If true, all items will be repositioned. If false (default), only\n * items having a top===null will be re-stacked\n */\n\n\n exports.stack = function (items, margin, force) {\n if (force) {\n // reset top position of all items\n for (var i = 0; i < items.length; i++) {\n items[i].top = null;\n }\n } // calculate new, non-overlapping positions\n\n\n for (var i = 0; i < items.length; i++) {\n var item = items[i];\n\n if (item.stack && item.top === null) {\n // initialize top position\n item.top = margin.axis;\n\n do {\n // TODO: optimize checking for overlap. when there is a gap without items,\n // you only need to check for items from the next item on, not from zero\n var collidingItem = null;\n\n for (var j = 0, jj = items.length; j < jj; j++) {\n var other = items[j];\n\n if (other.top !== null && other !== item && other.stack && exports.collision(item, other, margin.item, other.options.rtl)) {\n collidingItem = other;\n break;\n }\n }\n\n if (collidingItem != null) {\n // There is a collision. Reposition the items above the colliding element\n item.top = collidingItem.top + collidingItem.height + margin.item.vertical;\n }\n } while (collidingItem);\n }\n }\n };\n /**\n * Adjust vertical positions of the items without stacking them\n * @param {Item[]} items\n * All visible items\n * @param {{item: {horizontal: number, vertical: number}, axis: number}} margin\n * Margins between items and between items and the axis.\n * @param {subgroups[]} subgroups\n * All subgroups\n */\n\n\n exports.nostack = function (items, margin, subgroups, stackSubgroups) {\n for (var i = 0; i < items.length; i++) {\n if (items[i].data.subgroup == undefined) {\n items[i].top = margin.item.vertical;\n } else if (items[i].data.subgroup !== undefined && stackSubgroups) {\n var newTop = 0;\n\n for (var subgroup in subgroups) {\n if (subgroups.hasOwnProperty(subgroup)) {\n if (subgroups[subgroup].visible == true && subgroups[subgroup].index < subgroups[items[i].data.subgroup].index) {\n newTop += subgroups[subgroup].height;\n subgroups[items[i].data.subgroup].top = newTop;\n }\n }\n }\n\n items[i].top = newTop + 0.5 * margin.item.vertical;\n }\n }\n\n if (!stackSubgroups) {\n exports.stackSubgroups(items, margin, subgroups);\n }\n };\n /**\n * Adjust vertical positions of the subgroups such that they don't overlap each\n * other.\n * @param {subgroups[]} subgroups\n * All subgroups\n * @param {{item: {horizontal: number, vertical: number}, axis: number}} margin\n * Margins between items and between items and the axis.\n */\n\n\n exports.stackSubgroups = function (items, margin, subgroups) {\n for (var subgroup in subgroups) {\n if (subgroups.hasOwnProperty(subgroup)) {\n subgroups[subgroup].top = 0;\n\n do {\n // TODO: optimize checking for overlap. when there is a gap without items,\n // you only need to check for items from the next item on, not from zero\n var collidingItem = null;\n\n for (var otherSubgroup in subgroups) {\n if (subgroups[otherSubgroup].top !== null && otherSubgroup !== subgroup && subgroups[subgroup].index > subgroups[otherSubgroup].index && exports.collisionByTimes(subgroups[subgroup], subgroups[otherSubgroup])) {\n collidingItem = subgroups[otherSubgroup];\n break;\n }\n }\n\n if (collidingItem != null) {\n // There is a collision. Reposition the subgroups above the colliding element\n subgroups[subgroup].top = collidingItem.top + collidingItem.height;\n }\n } while (collidingItem);\n }\n }\n\n for (var i = 0; i < items.length; i++) {\n if (items[i].data.subgroup !== undefined) {\n items[i].top = subgroups[items[i].data.subgroup].top + 0.5 * margin.item.vertical;\n }\n }\n };\n /**\n * Test if the two provided items collide\n * The items must have parameters left, width, top, and height.\n * @param {Item} a The first item\n * @param {Item} b The second item\n * @param {{horizontal: number, vertical: number}} margin\n * An object containing a horizontal and vertical\n * minimum required margin.\n * @param {boolean} rtl\n * @return {boolean} true if a and b collide, else false\n */\n\n\n exports.collision = function (a, b, margin, rtl) {\n if (rtl) {\n return a.right - margin.horizontal + EPSILON < b.right + b.width && a.right + a.width + margin.horizontal - EPSILON > b.right && a.top - margin.vertical + EPSILON < b.top + b.height && a.top + a.height + margin.vertical - EPSILON > b.top;\n } else {\n return a.left - margin.horizontal + EPSILON < b.left + b.width && a.left + a.width + margin.horizontal - EPSILON > b.left && a.top - margin.vertical + EPSILON < b.top + b.height && a.top + a.height + margin.vertical - EPSILON > b.top;\n }\n };\n /**\n * Test if the two provided objects collide\n * The objects must have parameters start, end, top, and height.\n * @param {Object} a The first Object\n * @param {Object} b The second Object\n * @return {boolean} true if a and b collide, else false\n */\n\n\n exports.collisionByTimes = function (a, b) {\n return a.start <= b.start && a.end >= b.start && a.top < b.top + b.height && a.top + a.height > b.top || b.start <= a.start && b.end >= a.start && b.top < a.top + a.height && b.top + b.height > a.top;\n };\n /***/\n\n },\n /* 136 */\n\n /***/\n function (module, exports, __webpack_require__) {\n 'use strict';\n\n var Hammer = __webpack_require__(112);\n\n var Item = __webpack_require__(137);\n /**\n * @constructor RangeItem\n * @extends Item\n * @param {Object} data Object containing parameters start, end\n * content, className.\n * @param {{toScreen: function, toTime: function}} conversion\n * Conversion functions from time to screen and vice versa\n * @param {Object} [options] Configuration options\n * // TODO: describe options\n */\n\n\n function RangeItem(data, conversion, options) {\n this.props = {\n content: {\n width: 0\n }\n };\n this.overflow = false; // if contents can overflow (css styling), this flag is set to true\n\n this.options = options; // validate data\n\n if (data) {\n if (data.start == undefined) {\n throw new Error('Property \"start\" missing in item ' + data.id);\n }\n\n if (data.end == undefined) {\n throw new Error('Property \"end\" missing in item ' + data.id);\n }\n }\n\n Item.call(this, data, conversion, options);\n }\n\n RangeItem.prototype = new Item(null, null, null);\n RangeItem.prototype.baseClassName = 'vis-item vis-range';\n /**\n * Check whether this item is visible inside given range\n * @returns {{start: Number, end: Number}} range with a timestamp for start and end\n * @returns {boolean} True if visible\n */\n\n RangeItem.prototype.isVisible = function (range) {\n // determine visibility\n return this.data.start < range.end && this.data.end > range.start;\n };\n /**\n * Repaint the item\n */\n\n\n RangeItem.prototype.redraw = function () {\n var dom = this.dom;\n\n if (!dom) {\n // create DOM\n this.dom = {};\n dom = this.dom; // background box\n\n dom.box = document.createElement('div'); // className is updated in redraw()\n // frame box (to prevent the item contents from overflowing)\n\n dom.frame = document.createElement('div');\n dom.frame.className = 'vis-item-overflow';\n dom.box.appendChild(dom.frame); // visible frame box (showing the frame that is always visible)\n\n dom.visibleFrame = document.createElement('div');\n dom.visibleFrame.className = 'vis-item-visible-frame';\n dom.box.appendChild(dom.visibleFrame); // contents box\n\n dom.content = document.createElement('div');\n dom.content.className = 'vis-item-content';\n dom.frame.appendChild(dom.content); // attach this item as attribute\n\n dom.box['timeline-item'] = this;\n this.dirty = true;\n } // append DOM to parent DOM\n\n\n if (!this.parent) {\n throw new Error('Cannot redraw item: no parent attached');\n }\n\n if (!dom.box.parentNode) {\n var foreground = this.parent.dom.foreground;\n\n if (!foreground) {\n throw new Error('Cannot redraw item: parent has no foreground container element');\n }\n\n foreground.appendChild(dom.box);\n }\n\n this.displayed = true; // Update DOM when item is marked dirty. An item is marked dirty when:\n // - the item is not yet rendered\n // - the item's data is changed\n // - the item is selected/deselected\n\n if (this.dirty) {\n this._updateContents(this.dom.content);\n\n this._updateDataAttributes(this.dom.box);\n\n this._updateStyle(this.dom.box);\n\n var editable = this.editable.updateTime || this.editable.updateGroup; // update class\n\n var className = (this.data.className ? ' ' + this.data.className : '') + (this.selected ? ' vis-selected' : '') + (editable ? ' vis-editable' : ' vis-readonly');\n dom.box.className = this.baseClassName + className; // determine from css whether this box has overflow\n\n this.overflow = window.getComputedStyle(dom.frame).overflow !== 'hidden'; // recalculate size\n // turn off max-width to be able to calculate the real width\n // this causes an extra browser repaint/reflow, but so be it\n\n this.dom.content.style.maxWidth = 'none';\n this.props.content.width = this.dom.content.offsetWidth;\n this.height = this.dom.box.offsetHeight;\n this.dom.content.style.maxWidth = '';\n this.dirty = false;\n }\n\n this._repaintOnItemUpdateTimeTooltip(dom.box);\n\n this._repaintDeleteButton(dom.box);\n\n this._repaintDragCenter();\n\n this._repaintDragLeft();\n\n this._repaintDragRight();\n };\n /**\n * Show the item in the DOM (when not already visible). The items DOM will\n * be created when needed.\n */\n\n\n RangeItem.prototype.show = function () {\n if (!this.displayed) {\n this.redraw();\n }\n };\n /**\n * Hide the item from the DOM (when visible)\n * @return {Boolean} changed\n */\n\n\n RangeItem.prototype.hide = function () {\n if (this.displayed) {\n var box = this.dom.box;\n\n if (box.parentNode) {\n box.parentNode.removeChild(box);\n }\n\n this.displayed = false;\n }\n };\n /**\n * Reposition the item horizontally\n * @param {boolean} [limitSize=true] If true (default), the width of the range\n * item will be limited, as the browser cannot\n * display very wide divs. This means though\n * that the applied left and width may\n * not correspond to the ranges start and end\n * @Override\n */\n\n\n RangeItem.prototype.repositionX = function (limitSize) {\n var parentWidth = this.parent.width;\n var start = this.conversion.toScreen(this.data.start);\n var end = this.conversion.toScreen(this.data.end);\n var contentStartPosition;\n var contentWidth; // limit the width of the range, as browsers cannot draw very wide divs\n\n if (limitSize === undefined || limitSize === true) {\n if (start < -parentWidth) {\n start = -parentWidth;\n }\n\n if (end > 2 * parentWidth) {\n end = 2 * parentWidth;\n }\n } // add 0.5 to compensate floating-point values rounding\n\n\n var boxWidth = Math.max(end - start + 0.5, 1);\n\n if (this.overflow) {\n if (this.options.rtl) {\n this.right = start;\n } else {\n this.left = start;\n }\n\n this.width = boxWidth + this.props.content.width;\n contentWidth = this.props.content.width; // Note: The calculation of width is an optimistic calculation, giving\n // a width which will not change when moving the Timeline\n // So no re-stacking needed, which is nicer for the eye;\n } else {\n if (this.options.rtl) {\n this.right = start;\n } else {\n this.left = start;\n }\n\n this.width = boxWidth;\n contentWidth = Math.min(end - start, this.props.content.width);\n }\n\n if (this.options.rtl) {\n this.dom.box.style.right = this.right + 'px';\n } else {\n this.dom.box.style.left = this.left + 'px';\n }\n\n this.dom.box.style.width = boxWidth + 'px';\n\n switch (this.options.align) {\n case 'left':\n if (this.options.rtl) {\n this.dom.content.style.right = '0';\n } else {\n this.dom.content.style.left = '0';\n }\n\n break;\n\n case 'right':\n if (this.options.rtl) {\n this.dom.content.style.right = Math.max(boxWidth - contentWidth, 0) + 'px';\n } else {\n this.dom.content.style.left = Math.max(boxWidth - contentWidth, 0) + 'px';\n }\n\n break;\n\n case 'center':\n if (this.options.rtl) {\n this.dom.content.style.right = Math.max((boxWidth - contentWidth) / 2, 0) + 'px';\n } else {\n this.dom.content.style.left = Math.max((boxWidth - contentWidth) / 2, 0) + 'px';\n }\n\n break;\n\n default:\n // 'auto'\n // when range exceeds left of the window, position the contents at the left of the visible area\n if (this.overflow) {\n if (end > 0) {\n contentStartPosition = Math.max(-start, 0);\n } else {\n contentStartPosition = -contentWidth; // ensure it's not visible anymore\n }\n } else {\n if (start < 0) {\n contentStartPosition = -start;\n } else {\n contentStartPosition = 0;\n }\n }\n\n if (this.options.rtl) {\n this.dom.content.style.right = contentStartPosition + 'px';\n } else {\n this.dom.content.style.left = contentStartPosition + 'px';\n this.dom.content.style.width = 'calc(100% - ' + contentStartPosition + 'px)';\n }\n\n }\n };\n /**\n * Reposition the item vertically\n * @Override\n */\n\n\n RangeItem.prototype.repositionY = function () {\n var orientation = this.options.orientation.item;\n var box = this.dom.box;\n\n if (orientation == 'top') {\n box.style.top = this.top + 'px';\n } else {\n box.style.top = this.parent.height - this.top - this.height + 'px';\n }\n };\n /**\n * Repaint a drag area on the left side of the range when the range is selected\n * @protected\n */\n\n\n RangeItem.prototype._repaintDragLeft = function () {\n if (this.selected && this.options.editable.updateTime && !this.dom.dragLeft) {\n // create and show drag area\n var dragLeft = document.createElement('div');\n dragLeft.className = 'vis-drag-left';\n dragLeft.dragLeftItem = this;\n this.dom.box.appendChild(dragLeft);\n this.dom.dragLeft = dragLeft;\n } else if (!this.selected && this.dom.dragLeft) {\n // delete drag area\n if (this.dom.dragLeft.parentNode) {\n this.dom.dragLeft.parentNode.removeChild(this.dom.dragLeft);\n }\n\n this.dom.dragLeft = null;\n }\n };\n /**\n * Repaint a drag area on the right side of the range when the range is selected\n * @protected\n */\n\n\n RangeItem.prototype._repaintDragRight = function () {\n if (this.selected && this.options.editable.updateTime && !this.dom.dragRight) {\n // create and show drag area\n var dragRight = document.createElement('div');\n dragRight.className = 'vis-drag-right';\n dragRight.dragRightItem = this;\n this.dom.box.appendChild(dragRight);\n this.dom.dragRight = dragRight;\n } else if (!this.selected && this.dom.dragRight) {\n // delete drag area\n if (this.dom.dragRight.parentNode) {\n this.dom.dragRight.parentNode.removeChild(this.dom.dragRight);\n }\n\n this.dom.dragRight = null;\n }\n };\n\n module.exports = RangeItem;\n /***/\n },\n /* 137 */\n\n /***/\n function (module, exports, __webpack_require__) {\n 'use strict';\n\n var _typeof2 = __webpack_require__(62);\n\n var _typeof3 = _interopRequireDefault(_typeof2);\n\n var _keys = __webpack_require__(58);\n\n var _keys2 = _interopRequireDefault(_keys);\n\n function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n 'default': obj\n };\n }\n\n var Hammer = __webpack_require__(112);\n\n var util = __webpack_require__(1);\n\n var moment = __webpack_require__(82);\n /**\n * @constructor Item\n * @param {Object} data Object containing (optional) parameters type,\n * start, end, content, group, className.\n * @param {{toScreen: function, toTime: function}} conversion\n * Conversion functions from time to screen and vice versa\n * @param {Object} options Configuration options\n * // TODO: describe available options\n */\n\n\n function Item(data, conversion, options) {\n this.id = null;\n this.parent = null;\n this.data = data;\n this.dom = null;\n this.conversion = conversion || {};\n this.options = options || {};\n this.selected = false;\n this.displayed = false;\n this.groupShowing = true;\n this.dirty = true;\n this.top = null;\n this.right = null;\n this.left = null;\n this.width = null;\n this.height = null;\n this.editable = null;\n\n this._updateEditStatus();\n }\n\n Item.prototype.stack = true;\n /**\n * Select current item\n */\n\n Item.prototype.select = function () {\n this.selected = true;\n this.dirty = true;\n if (this.displayed) this.redraw();\n };\n /**\n * Unselect current item\n */\n\n\n Item.prototype.unselect = function () {\n this.selected = false;\n this.dirty = true;\n if (this.displayed) this.redraw();\n };\n /**\n * Set data for the item. Existing data will be updated. The id should not\n * be changed. When the item is displayed, it will be redrawn immediately.\n * @param {Object} data\n */\n\n\n Item.prototype.setData = function (data) {\n var groupChanged = data.group != undefined && this.data.group != data.group;\n\n if (groupChanged) {\n this.parent.itemSet._moveToGroup(this, data.group);\n }\n\n this.data = data;\n\n this._updateEditStatus();\n\n this.dirty = true;\n if (this.displayed) this.redraw();\n };\n /**\n * Set a parent for the item\n * @param {ItemSet | Group} parent\n */\n\n\n Item.prototype.setParent = function (parent) {\n if (this.displayed) {\n this.hide();\n this.parent = parent;\n\n if (this.parent) {\n this.show();\n }\n } else {\n this.parent = parent;\n }\n };\n /**\n * Check whether this item is visible inside given range\n * @returns {{start: Number, end: Number}} range with a timestamp for start and end\n * @returns {boolean} True if visible\n */\n\n\n Item.prototype.isVisible = function (range) {\n return false;\n };\n /**\n * Show the Item in the DOM (when not already visible)\n * @return {Boolean} changed\n */\n\n\n Item.prototype.show = function () {\n return false;\n };\n /**\n * Hide the Item from the DOM (when visible)\n * @return {Boolean} changed\n */\n\n\n Item.prototype.hide = function () {\n return false;\n };\n /**\n * Repaint the item\n */\n\n\n Item.prototype.redraw = function () {// should be implemented by the item\n };\n /**\n * Reposition the Item horizontally\n */\n\n\n Item.prototype.repositionX = function () {// should be implemented by the item\n };\n /**\n * Reposition the Item vertically\n */\n\n\n Item.prototype.repositionY = function () {// should be implemented by the item\n };\n /**\n * Repaint a drag area on the center of the item when the item is selected\n * @protected\n */\n\n\n Item.prototype._repaintDragCenter = function () {\n if (this.selected && this.options.editable.updateTime && !this.dom.dragCenter) {\n var me = this; // create and show drag area\n\n var dragCenter = document.createElement('div');\n dragCenter.className = 'vis-drag-center';\n dragCenter.dragCenterItem = this;\n new Hammer(dragCenter).on('doubletap', function (event) {\n event.stopPropagation();\n\n me.parent.itemSet._onUpdateItem(me);\n });\n\n if (this.dom.box) {\n this.dom.box.appendChild(dragCenter);\n } else if (this.dom.point) {\n this.dom.point.appendChild(dragCenter);\n }\n\n this.dom.dragCenter = dragCenter;\n } else if (!this.selected && this.dom.dragCenter) {\n // delete drag area\n if (this.dom.dragCenter.parentNode) {\n this.dom.dragCenter.parentNode.removeChild(this.dom.dragCenter);\n }\n\n this.dom.dragCenter = null;\n }\n };\n /**\n * Repaint a delete button on the top right of the item when the item is selected\n * @param {HTMLElement} anchor\n * @protected\n */\n\n\n Item.prototype._repaintDeleteButton = function (anchor) {\n var editable = (this.options.editable.overrideItems || this.editable == null) && this.options.editable.remove || !this.options.editable.overrideItems && this.editable != null && this.editable.remove;\n\n if (this.selected && editable && !this.dom.deleteButton) {\n // create and show button\n var me = this;\n var deleteButton = document.createElement('div');\n\n if (this.options.rtl) {\n deleteButton.className = 'vis-delete-rtl';\n } else {\n deleteButton.className = 'vis-delete';\n }\n\n deleteButton.title = 'Delete this item'; // TODO: be able to destroy the delete button\n\n new Hammer(deleteButton).on('tap', function (event) {\n event.stopPropagation();\n me.parent.removeFromDataSet(me);\n });\n anchor.appendChild(deleteButton);\n this.dom.deleteButton = deleteButton;\n } else if (!this.selected && this.dom.deleteButton) {\n // remove button\n if (this.dom.deleteButton.parentNode) {\n this.dom.deleteButton.parentNode.removeChild(this.dom.deleteButton);\n }\n\n this.dom.deleteButton = null;\n }\n };\n /**\n * Repaint a onChange tooltip on the top right of the item when the item is selected\n * @param {HTMLElement} anchor\n * @protected\n */\n\n\n Item.prototype._repaintOnItemUpdateTimeTooltip = function (anchor) {\n if (!this.options.tooltipOnItemUpdateTime) return;\n var editable = (this.options.editable.updateTime || this.data.editable === true) && this.data.editable !== false;\n\n if (this.selected && editable && !this.dom.onItemUpdateTimeTooltip) {\n // create and show tooltip\n var me = this;\n var onItemUpdateTimeTooltip = document.createElement('div');\n onItemUpdateTimeTooltip.className = 'vis-onUpdateTime-tooltip';\n anchor.appendChild(onItemUpdateTimeTooltip);\n this.dom.onItemUpdateTimeTooltip = onItemUpdateTimeTooltip;\n } else if (!this.selected && this.dom.onItemUpdateTimeTooltip) {\n // remove button\n if (this.dom.onItemUpdateTimeTooltip.parentNode) {\n this.dom.onItemUpdateTimeTooltip.parentNode.removeChild(this.dom.onItemUpdateTimeTooltip);\n }\n\n this.dom.onItemUpdateTimeTooltip = null;\n } // position onChange tooltip\n\n\n if (this.dom.onItemUpdateTimeTooltip) {\n // only show when editing\n this.dom.onItemUpdateTimeTooltip.style.visibility = this.parent.itemSet.touchParams.itemIsDragging ? 'visible' : 'hidden'; // position relative to item's content\n\n if (this.options.rtl) {\n this.dom.onItemUpdateTimeTooltip.style.right = this.dom.content.style.right;\n } else {\n this.dom.onItemUpdateTimeTooltip.style.left = this.dom.content.style.left;\n } // position above or below the item depending on the item's position in the window\n\n\n var tooltipOffset = 50; // TODO: should be tooltip height (depends on template)\n\n var scrollTop = this.parent.itemSet.body.domProps.scrollTop; // TODO: this.top for orientation:true is actually the items distance from the bottom... \n // (should be this.bottom)\n\n var itemDistanceFromTop;\n\n if (this.options.orientation.item == 'top') {\n itemDistanceFromTop = this.top;\n } else {\n itemDistanceFromTop = this.parent.height - this.top - this.height;\n }\n\n var isCloseToTop = itemDistanceFromTop + this.parent.top - tooltipOffset < -scrollTop;\n\n if (isCloseToTop) {\n this.dom.onItemUpdateTimeTooltip.style.bottom = \"\";\n this.dom.onItemUpdateTimeTooltip.style.top = this.height + 2 + \"px\";\n } else {\n this.dom.onItemUpdateTimeTooltip.style.top = \"\";\n this.dom.onItemUpdateTimeTooltip.style.bottom = this.height + 2 + \"px\";\n } // handle tooltip content\n\n\n var content;\n var templateFunction;\n\n if (this.options.tooltipOnItemUpdateTime && this.options.tooltipOnItemUpdateTime.template) {\n templateFunction = this.options.tooltipOnItemUpdateTime.template.bind(this);\n content = templateFunction(this.data);\n } else {\n content = 'start: ' + moment(this.data.start).format('MM/DD/YYYY hh:mm');\n\n if (this.data.end) {\n content += '
end: ' + moment(this.data.end).format('MM/DD/YYYY hh:mm');\n }\n }\n\n this.dom.onItemUpdateTimeTooltip.innerHTML = content;\n }\n };\n /**\n * Set HTML contents for the item\n * @param {Element} element HTML element to fill with the contents\n * @private\n */\n\n\n Item.prototype._updateContents = function (element) {\n var content;\n var templateFunction;\n var itemVisibleFrameContent;\n var visibleFrameTemplateFunction;\n var itemData = this.parent.itemSet.itemsData.get(this.id); // get a clone of the data from the dataset\n\n var frameElement = this.dom.box || this.dom.point;\n var itemVisibleFrameContentElement = frameElement.getElementsByClassName('vis-item-visible-frame')[0];\n\n if (this.options.visibleFrameTemplate) {\n visibleFrameTemplateFunction = this.options.visibleFrameTemplate.bind(this);\n itemVisibleFrameContent = visibleFrameTemplateFunction(itemData, frameElement);\n } else {\n itemVisibleFrameContent = '';\n }\n\n if (itemVisibleFrameContentElement) {\n if (itemVisibleFrameContent instanceof Object && !(itemVisibleFrameContent instanceof Element)) {\n visibleFrameTemplateFunction(itemData, itemVisibleFrameContentElement);\n } else {\n var changed = this._contentToString(this.itemVisibleFrameContent) !== this._contentToString(itemVisibleFrameContent);\n\n if (changed) {\n // only replace the content when changed\n if (itemVisibleFrameContent instanceof Element) {\n itemVisibleFrameContentElement.innerHTML = '';\n itemVisibleFrameContentElement.appendChild(itemVisibleFrameContent);\n } else if (itemVisibleFrameContent != undefined) {\n itemVisibleFrameContentElement.innerHTML = itemVisibleFrameContent;\n } else {\n if (!(this.data.type == 'background' && this.data.content === undefined)) {\n throw new Error('Property \"content\" missing in item ' + this.id);\n }\n }\n\n this.itemVisibleFrameContent = itemVisibleFrameContent;\n }\n }\n }\n\n if (this.options.template) {\n templateFunction = this.options.template.bind(this);\n content = templateFunction(itemData, element, this.data);\n } else {\n content = this.data.content;\n }\n\n if (content instanceof Object && !(content instanceof Element)) {\n templateFunction(itemData, element);\n } else {\n var changed = this._contentToString(this.content) !== this._contentToString(content);\n\n if (changed) {\n // only replace the content when changed\n if (content instanceof Element) {\n element.innerHTML = '';\n element.appendChild(content);\n } else if (content != undefined) {\n element.innerHTML = content;\n } else {\n if (!(this.data.type == 'background' && this.data.content === undefined)) {\n throw new Error('Property \"content\" missing in item ' + this.id);\n }\n }\n\n this.content = content;\n }\n }\n };\n /**\n * Process dataAttributes timeline option and set as data- attributes on dom.content\n * @param {Element} element HTML element to which the attributes will be attached\n * @private\n */\n\n\n Item.prototype._updateDataAttributes = function (element) {\n if (this.options.dataAttributes && this.options.dataAttributes.length > 0) {\n var attributes = [];\n\n if (Array.isArray(this.options.dataAttributes)) {\n attributes = this.options.dataAttributes;\n } else if (this.options.dataAttributes == 'all') {\n attributes = (0, _keys2['default'])(this.data);\n } else {\n return;\n }\n\n for (var i = 0; i < attributes.length; i++) {\n var name = attributes[i];\n var value = this.data[name];\n\n if (value != null) {\n element.setAttribute('data-' + name, value);\n } else {\n element.removeAttribute('data-' + name);\n }\n }\n }\n };\n /**\n * Update custom styles of the element\n * @param element\n * @private\n */\n\n\n Item.prototype._updateStyle = function (element) {\n // remove old styles\n if (this.style) {\n util.removeCssText(element, this.style);\n this.style = null;\n } // append new styles\n\n\n if (this.data.style) {\n util.addCssText(element, this.data.style);\n this.style = this.data.style;\n }\n };\n /**\n * Stringify the items contents\n * @param {string | Element | undefined} content\n * @returns {string | undefined}\n * @private\n */\n\n\n Item.prototype._contentToString = function (content) {\n if (typeof content === 'string') return content;\n if (content && 'outerHTML' in content) return content.outerHTML;\n return content;\n };\n /**\n * Update the editability of this item.\n */\n\n\n Item.prototype._updateEditStatus = function () {\n if (this.options) {\n if (typeof this.options.editable === 'boolean') {\n this.editable = {\n updateTime: this.options.editable,\n updateGroup: this.options.editable,\n remove: this.options.editable\n };\n } else if ((0, _typeof3['default'])(this.options.editable) === 'object') {\n this.editable = {};\n util.selectiveExtend(['updateTime', 'updateGroup', 'remove'], this.editable, this.options.editable);\n }\n\n ;\n } // Item data overrides, except if options.editable.overrideItems is set.\n\n\n if (!this.options || !this.options.editable || this.options.editable.overrideItems !== true) {\n if (this.data) {\n if (typeof this.data.editable === 'boolean') {\n this.editable = {\n updateTime: this.data.editable,\n updateGroup: this.data.editable,\n remove: this.data.editable\n };\n } else if ((0, _typeof3['default'])(this.data.editable) === 'object') {\n // TODO: in vis.js 5.0, we should change this to not reset options from the timeline configuration.\n // Basically just remove the next line...\n this.editable = {};\n util.selectiveExtend(['updateTime', 'updateGroup', 'remove'], this.editable, this.data.editable);\n }\n }\n }\n };\n /**\n * Return the width of the item left from its start date\n * @return {number}\n */\n\n\n Item.prototype.getWidthLeft = function () {\n return 0;\n };\n /**\n * Return the width of the item right from the max of its start and end date\n * @return {number}\n */\n\n\n Item.prototype.getWidthRight = function () {\n return 0;\n };\n /**\n * Return the title of the item\n * @return {string | undefined}\n */\n\n\n Item.prototype.getTitle = function () {\n return this.data.title;\n };\n\n module.exports = Item;\n /***/\n },\n /* 138 */\n\n /***/\n function (module, exports, __webpack_require__) {\n 'use strict';\n\n var _create = __webpack_require__(55);\n\n var _create2 = _interopRequireDefault(_create);\n\n function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n 'default': obj\n };\n }\n\n var util = __webpack_require__(1);\n\n var Group = __webpack_require__(134);\n /**\n * @constructor BackgroundGroup\n * @param {Number | String} groupId\n * @param {Object} data\n * @param {ItemSet} itemSet\n */\n\n\n function BackgroundGroup(groupId, data, itemSet) {\n Group.call(this, groupId, data, itemSet);\n this.width = 0;\n this.height = 0;\n this.top = 0;\n this.left = 0;\n }\n\n BackgroundGroup.prototype = (0, _create2['default'])(Group.prototype);\n /**\n * Repaint this group\n * @param {{start: number, end: number}} range\n * @param {{item: {horizontal: number, vertical: number}, axis: number}} margin\n * @param {boolean} [restack=false] Force restacking of all items\n * @return {boolean} Returns true if the group is resized\n */\n\n BackgroundGroup.prototype.redraw = function (range, margin, restack) {\n var resized = false;\n this.visibleItems = this._updateItemsInRange(this.orderedItems, this.visibleItems, range); // calculate actual size\n\n this.width = this.dom.background.offsetWidth; // apply new height (just always zero for BackgroundGroup\n\n this.dom.background.style.height = '0'; // update vertical position of items after they are re-stacked and the height of the group is calculated\n\n for (var i = 0, ii = this.visibleItems.length; i < ii; i++) {\n var item = this.visibleItems[i];\n item.repositionY(margin);\n }\n\n return resized;\n };\n /**\n * Show this group: attach to the DOM\n */\n\n\n BackgroundGroup.prototype.show = function () {\n if (!this.dom.background.parentNode) {\n this.itemSet.dom.background.appendChild(this.dom.background);\n }\n };\n\n module.exports = BackgroundGroup;\n /***/\n },\n /* 139 */\n\n /***/\n function (module, exports, __webpack_require__) {\n 'use strict';\n\n var Item = __webpack_require__(137);\n\n var util = __webpack_require__(1);\n /**\n * @constructor BoxItem\n * @extends Item\n * @param {Object} data Object containing parameters start\n * content, className.\n * @param {{toScreen: function, toTime: function}} conversion\n * Conversion functions from time to screen and vice versa\n * @param {Object} [options] Configuration options\n * // TODO: describe available options\n */\n\n\n function BoxItem(data, conversion, options) {\n this.props = {\n dot: {\n width: 0,\n height: 0\n },\n line: {\n width: 0,\n height: 0\n }\n };\n this.options = options; // validate data\n\n if (data) {\n if (data.start == undefined) {\n throw new Error('Property \"start\" missing in item ' + data);\n }\n }\n\n Item.call(this, data, conversion, options);\n }\n\n BoxItem.prototype = new Item(null, null, null);\n /**\n * Check whether this item is visible inside given range\n * @param {{start: Number, end: Number}} range with a timestamp for start and end\n * @returns {boolean} True if visible\n */\n\n BoxItem.prototype.isVisible = function (range) {\n // determine visibility\n var isVisible;\n var align = this.options.align;\n var widthInMs = this.width * range.getMillisecondsPerPixel();\n\n if (align == 'right') {\n isVisible = this.data.start.getTime() > range.start && this.data.start.getTime() - widthInMs < range.end;\n } else if (align == 'left') {\n isVisible = this.data.start.getTime() + widthInMs > range.start && this.data.start.getTime() < range.end;\n } else {\n // default or 'center'\n isVisible = this.data.start.getTime() + widthInMs / 2 > range.start && this.data.start.getTime() - widthInMs / 2 < range.end;\n }\n\n return isVisible;\n };\n /**\n * Repaint the item\n */\n\n\n BoxItem.prototype.redraw = function () {\n var dom = this.dom;\n\n if (!dom) {\n // create DOM\n this.dom = {};\n dom = this.dom; // create main box\n\n dom.box = document.createElement('DIV'); // contents box (inside the background box). used for making margins\n\n dom.content = document.createElement('DIV');\n dom.content.className = 'vis-item-content';\n dom.box.appendChild(dom.content); // line to axis\n\n dom.line = document.createElement('DIV');\n dom.line.className = 'vis-line'; // dot on axis\n\n dom.dot = document.createElement('DIV');\n dom.dot.className = 'vis-dot'; // attach this item as attribute\n\n dom.box['timeline-item'] = this;\n this.dirty = true;\n } // append DOM to parent DOM\n\n\n if (!this.parent) {\n throw new Error('Cannot redraw item: no parent attached');\n }\n\n if (!dom.box.parentNode) {\n var foreground = this.parent.dom.foreground;\n if (!foreground) throw new Error('Cannot redraw item: parent has no foreground container element');\n foreground.appendChild(dom.box);\n }\n\n if (!dom.line.parentNode) {\n var background = this.parent.dom.background;\n if (!background) throw new Error('Cannot redraw item: parent has no background container element');\n background.appendChild(dom.line);\n }\n\n if (!dom.dot.parentNode) {\n var axis = this.parent.dom.axis;\n if (!background) throw new Error('Cannot redraw item: parent has no axis container element');\n axis.appendChild(dom.dot);\n }\n\n this.displayed = true; // Update DOM when item is marked dirty. An item is marked dirty when:\n // - the item is not yet rendered\n // - the item's data is changed\n // - the item is selected/deselected\n\n if (this.dirty) {\n this._updateContents(this.dom.content);\n\n this._updateDataAttributes(this.dom.box);\n\n this._updateStyle(this.dom.box);\n\n var editable = this.editable.updateTime || this.editable.updateGroup; // update class\n\n var className = (this.data.className ? ' ' + this.data.className : '') + (this.selected ? ' vis-selected' : '') + (editable ? ' vis-editable' : ' vis-readonly');\n dom.box.className = 'vis-item vis-box' + className;\n dom.line.className = 'vis-item vis-line' + className;\n dom.dot.className = 'vis-item vis-dot' + className; // set initial position in the visible range of the grid so that the\n // rendered box size can be determinated correctly, even the content\n // has a dynamic width (fixes #2032).\n\n var previousRight = dom.box.style.right;\n var previousLeft = dom.box.style.left;\n\n if (this.options.rtl) {\n dom.box.style.right = \"0px\";\n } else {\n dom.box.style.left = \"0px\";\n } // recalculate size\n\n\n this.props.dot.height = dom.dot.offsetHeight;\n this.props.dot.width = dom.dot.offsetWidth;\n this.props.line.width = dom.line.offsetWidth;\n this.width = dom.box.offsetWidth;\n this.height = dom.box.offsetHeight; // restore previous position\n\n if (this.options.rtl) {\n dom.box.style.right = previousRight;\n } else {\n dom.box.style.left = previousLeft;\n }\n\n this.dirty = false;\n }\n\n this._repaintOnItemUpdateTimeTooltip(dom.box);\n\n this._repaintDragCenter();\n\n this._repaintDeleteButton(dom.box);\n };\n /**\n * Show the item in the DOM (when not already displayed). The items DOM will\n * be created when needed.\n */\n\n\n BoxItem.prototype.show = function () {\n if (!this.displayed) {\n this.redraw();\n }\n };\n /**\n * Hide the item from the DOM (when visible)\n */\n\n\n BoxItem.prototype.hide = function () {\n if (this.displayed) {\n var dom = this.dom;\n if (dom.box.parentNode) dom.box.parentNode.removeChild(dom.box);\n if (dom.line.parentNode) dom.line.parentNode.removeChild(dom.line);\n if (dom.dot.parentNode) dom.dot.parentNode.removeChild(dom.dot);\n this.displayed = false;\n }\n };\n /**\n * Reposition the item horizontally\n * @Override\n */\n\n\n BoxItem.prototype.repositionX = function () {\n var start = this.conversion.toScreen(this.data.start);\n var align = this.options.align; // calculate left position of the box\n\n if (align == 'right') {\n if (this.options.rtl) {\n this.right = start - this.width; // reposition box, line, and dot\n\n this.dom.box.style.right = this.right + 'px';\n this.dom.line.style.right = start - this.props.line.width + 'px';\n this.dom.dot.style.right = start - this.props.line.width / 2 - this.props.dot.width / 2 + 'px';\n } else {\n this.left = start - this.width; // reposition box, line, and dot\n\n this.dom.box.style.left = this.left + 'px';\n this.dom.line.style.left = start - this.props.line.width + 'px';\n this.dom.dot.style.left = start - this.props.line.width / 2 - this.props.dot.width / 2 + 'px';\n }\n } else if (align == 'left') {\n if (this.options.rtl) {\n this.right = start; // reposition box, line, and dot\n\n this.dom.box.style.right = this.right + 'px';\n this.dom.line.style.right = start + 'px';\n this.dom.dot.style.right = start + this.props.line.width / 2 - this.props.dot.width / 2 + 'px';\n } else {\n this.left = start; // reposition box, line, and dot\n\n this.dom.box.style.left = this.left + 'px';\n this.dom.line.style.left = start + 'px';\n this.dom.dot.style.left = start + this.props.line.width / 2 - this.props.dot.width / 2 + 'px';\n }\n } else {\n // default or 'center'\n if (this.options.rtl) {\n this.right = start - this.width / 2; // reposition box, line, and dot\n\n this.dom.box.style.right = this.right + 'px';\n this.dom.line.style.right = start - this.props.line.width + 'px';\n this.dom.dot.style.right = start - this.props.dot.width / 2 + 'px';\n } else {\n this.left = start - this.width / 2; // reposition box, line, and dot\n\n this.dom.box.style.left = this.left + 'px';\n this.dom.line.style.left = start - this.props.line.width / 2 + 'px';\n this.dom.dot.style.left = start - this.props.dot.width / 2 + 'px';\n }\n }\n };\n /**\n * Reposition the item vertically\n * @Override\n */\n\n\n BoxItem.prototype.repositionY = function () {\n var orientation = this.options.orientation.item;\n var box = this.dom.box;\n var line = this.dom.line;\n var dot = this.dom.dot;\n\n if (orientation == 'top') {\n box.style.top = (this.top || 0) + 'px';\n line.style.top = '0';\n line.style.height = this.parent.top + this.top + 1 + 'px';\n line.style.bottom = '';\n } else {\n // orientation 'bottom'\n var itemSetHeight = this.parent.itemSet.props.height; // TODO: this is nasty\n\n var lineHeight = itemSetHeight - this.parent.top - this.parent.height + this.top;\n box.style.top = (this.parent.height - this.top - this.height || 0) + 'px';\n line.style.top = itemSetHeight - lineHeight + 'px';\n line.style.bottom = '0';\n }\n\n dot.style.top = -this.props.dot.height / 2 + 'px';\n };\n /**\n * Return the width of the item left from its start date\n * @return {number}\n */\n\n\n BoxItem.prototype.getWidthLeft = function () {\n return this.width / 2;\n };\n /**\n * Return the width of the item right from its start date\n * @return {number}\n */\n\n\n BoxItem.prototype.getWidthRight = function () {\n return this.width / 2;\n };\n\n module.exports = BoxItem;\n /***/\n },\n /* 140 */\n\n /***/\n function (module, exports, __webpack_require__) {\n 'use strict';\n\n var Item = __webpack_require__(137);\n /**\n * @constructor PointItem\n * @extends Item\n * @param {Object} data Object containing parameters start\n * content, className.\n * @param {{toScreen: function, toTime: function}} conversion\n * Conversion functions from time to screen and vice versa\n * @param {Object} [options] Configuration options\n * // TODO: describe available options\n */\n\n\n function PointItem(data, conversion, options) {\n this.props = {\n dot: {\n top: 0,\n width: 0,\n height: 0\n },\n content: {\n height: 0,\n marginLeft: 0,\n marginRight: 0\n }\n };\n this.options = options; // validate data\n\n if (data) {\n if (data.start == undefined) {\n throw new Error('Property \"start\" missing in item ' + data);\n }\n }\n\n Item.call(this, data, conversion, options);\n }\n\n PointItem.prototype = new Item(null, null, null);\n /**\n * Check whether this item is visible inside given range\n * @param {{start: Number, end: Number}} range with a timestamp for start and end\n * @returns {boolean} True if visible\n */\n\n PointItem.prototype.isVisible = function (range) {\n // determine visibility\n var widthInMs = this.width * range.getMillisecondsPerPixel();\n return this.data.start.getTime() + widthInMs > range.start && this.data.start < range.end;\n };\n /**\n * Repaint the item\n */\n\n\n PointItem.prototype.redraw = function () {\n var dom = this.dom;\n\n if (!dom) {\n // create DOM\n this.dom = {};\n dom = this.dom; // background box\n\n dom.point = document.createElement('div'); // className is updated in redraw()\n // contents box, right from the dot\n\n dom.content = document.createElement('div');\n dom.content.className = 'vis-item-content';\n dom.point.appendChild(dom.content); // dot at start\n\n dom.dot = document.createElement('div');\n dom.point.appendChild(dom.dot); // attach this item as attribute\n\n dom.point['timeline-item'] = this;\n this.dirty = true;\n } // append DOM to parent DOM\n\n\n if (!this.parent) {\n throw new Error('Cannot redraw item: no parent attached');\n }\n\n if (!dom.point.parentNode) {\n var foreground = this.parent.dom.foreground;\n\n if (!foreground) {\n throw new Error('Cannot redraw item: parent has no foreground container element');\n }\n\n foreground.appendChild(dom.point);\n }\n\n this.displayed = true; // Update DOM when item is marked dirty. An item is marked dirty when:\n // - the item is not yet rendered\n // - the item's data is changed\n // - the item is selected/deselected\n\n if (this.dirty) {\n this._updateContents(this.dom.content);\n\n this._updateDataAttributes(this.dom.point);\n\n this._updateStyle(this.dom.point);\n\n var editable = this.editable.updateTime || this.editable.updateGroup; // update class\n\n var className = (this.data.className ? ' ' + this.data.className : '') + (this.selected ? ' vis-selected' : '') + (editable ? ' vis-editable' : ' vis-readonly');\n dom.point.className = 'vis-item vis-point' + className;\n dom.dot.className = 'vis-item vis-dot' + className; // recalculate size of dot and contents\n\n this.props.dot.width = dom.dot.offsetWidth;\n this.props.dot.height = dom.dot.offsetHeight;\n this.props.content.height = dom.content.offsetHeight; // resize contents\n\n if (this.options.rtl) {\n dom.content.style.marginRight = 2 * this.props.dot.width + 'px';\n } else {\n dom.content.style.marginLeft = 2 * this.props.dot.width + 'px';\n } //dom.content.style.marginRight = ... + 'px'; // TODO: margin right\n // recalculate size\n\n\n this.width = dom.point.offsetWidth;\n this.height = dom.point.offsetHeight; // reposition the dot\n\n dom.dot.style.top = (this.height - this.props.dot.height) / 2 + 'px';\n\n if (this.options.rtl) {\n dom.dot.style.right = this.props.dot.width / 2 + 'px';\n } else {\n dom.dot.style.left = this.props.dot.width / 2 + 'px';\n }\n\n this.dirty = false;\n }\n\n this._repaintOnItemUpdateTimeTooltip(dom.point);\n\n this._repaintDragCenter();\n\n this._repaintDeleteButton(dom.point);\n };\n /**\n * Show the item in the DOM (when not already visible). The items DOM will\n * be created when needed.\n */\n\n\n PointItem.prototype.show = function () {\n if (!this.displayed) {\n this.redraw();\n }\n };\n /**\n * Hide the item from the DOM (when visible)\n */\n\n\n PointItem.prototype.hide = function () {\n if (this.displayed) {\n if (this.dom.point.parentNode) {\n this.dom.point.parentNode.removeChild(this.dom.point);\n }\n\n this.displayed = false;\n }\n };\n /**\n * Reposition the item horizontally\n * @Override\n */\n\n\n PointItem.prototype.repositionX = function () {\n var start = this.conversion.toScreen(this.data.start);\n\n if (this.options.rtl) {\n this.right = start - this.props.dot.width; // reposition point\n\n this.dom.point.style.right = this.right + 'px';\n } else {\n this.left = start - this.props.dot.width; // reposition point\n\n this.dom.point.style.left = this.left + 'px';\n }\n };\n /**\n * Reposition the item vertically\n * @Override\n */\n\n\n PointItem.prototype.repositionY = function () {\n var orientation = this.options.orientation.item;\n var point = this.dom.point;\n\n if (orientation == 'top') {\n point.style.top = this.top + 'px';\n } else {\n point.style.top = this.parent.height - this.top - this.height + 'px';\n }\n };\n /**\n * Return the width of the item left from its start date\n * @return {number}\n */\n\n\n PointItem.prototype.getWidthLeft = function () {\n return this.props.dot.width;\n };\n /**\n * Return the width of the item right from its start date\n * @return {number}\n */\n\n\n PointItem.prototype.getWidthRight = function () {\n return this.props.dot.width;\n };\n\n module.exports = PointItem;\n /***/\n },\n /* 141 */\n\n /***/\n function (module, exports, __webpack_require__) {\n 'use strict';\n\n var Hammer = __webpack_require__(112);\n\n var Item = __webpack_require__(137);\n\n var BackgroundGroup = __webpack_require__(138);\n\n var RangeItem = __webpack_require__(136);\n /**\n * @constructor BackgroundItem\n * @extends Item\n * @param {Object} data Object containing parameters start, end\n * content, className.\n * @param {{toScreen: function, toTime: function}} conversion\n * Conversion functions from time to screen and vice versa\n * @param {Object} [options] Configuration options\n * // TODO: describe options\n */\n // TODO: implement support for the BackgroundItem just having a start, then being displayed as a sort of an annotation\n\n\n function BackgroundItem(data, conversion, options) {\n this.props = {\n content: {\n width: 0\n }\n };\n this.overflow = false; // if contents can overflow (css styling), this flag is set to true\n // validate data\n\n if (data) {\n if (data.start == undefined) {\n throw new Error('Property \"start\" missing in item ' + data.id);\n }\n\n if (data.end == undefined) {\n throw new Error('Property \"end\" missing in item ' + data.id);\n }\n }\n\n Item.call(this, data, conversion, options);\n }\n\n BackgroundItem.prototype = new Item(null, null, null);\n BackgroundItem.prototype.baseClassName = 'vis-item vis-background';\n BackgroundItem.prototype.stack = false;\n /**\n * Check whether this item is visible inside given range\n * @returns {{start: Number, end: Number}} range with a timestamp for start and end\n * @returns {boolean} True if visible\n */\n\n BackgroundItem.prototype.isVisible = function (range) {\n // determine visibility\n return this.data.start < range.end && this.data.end > range.start;\n };\n /**\n * Repaint the item\n */\n\n\n BackgroundItem.prototype.redraw = function () {\n var dom = this.dom;\n\n if (!dom) {\n // create DOM\n this.dom = {};\n dom = this.dom; // background box\n\n dom.box = document.createElement('div'); // className is updated in redraw()\n // frame box (to prevent the item contents from overflowing\n\n dom.frame = document.createElement('div');\n dom.frame.className = 'vis-item-overflow';\n dom.box.appendChild(dom.frame); // contents box\n\n dom.content = document.createElement('div');\n dom.content.className = 'vis-item-content';\n dom.frame.appendChild(dom.content); // Note: we do NOT attach this item as attribute to the DOM,\n // such that background items cannot be selected\n //dom.box['timeline-item'] = this;\n\n this.dirty = true;\n } // append DOM to parent DOM\n\n\n if (!this.parent) {\n throw new Error('Cannot redraw item: no parent attached');\n }\n\n if (!dom.box.parentNode) {\n var background = this.parent.dom.background;\n\n if (!background) {\n throw new Error('Cannot redraw item: parent has no background container element');\n }\n\n background.appendChild(dom.box);\n }\n\n this.displayed = true; // Update DOM when item is marked dirty. An item is marked dirty when:\n // - the item is not yet rendered\n // - the item's data is changed\n // - the item is selected/deselected\n\n if (this.dirty) {\n this._updateContents(this.dom.content);\n\n this._updateDataAttributes(this.dom.content);\n\n this._updateStyle(this.dom.box); // update class\n\n\n var className = (this.data.className ? ' ' + this.data.className : '') + (this.selected ? ' vis-selected' : '');\n dom.box.className = this.baseClassName + className; // determine from css whether this box has overflow\n\n this.overflow = window.getComputedStyle(dom.content).overflow !== 'hidden'; // recalculate size\n\n this.props.content.width = this.dom.content.offsetWidth;\n this.height = 0; // set height zero, so this item will be ignored when stacking items\n\n this.dirty = false;\n }\n };\n /**\n * Show the item in the DOM (when not already visible). The items DOM will\n * be created when needed.\n */\n\n\n BackgroundItem.prototype.show = RangeItem.prototype.show;\n /**\n * Hide the item from the DOM (when visible)\n * @return {Boolean} changed\n */\n\n BackgroundItem.prototype.hide = RangeItem.prototype.hide;\n /**\n * Reposition the item horizontally\n * @Override\n */\n\n BackgroundItem.prototype.repositionX = RangeItem.prototype.repositionX;\n /**\n * Reposition the item vertically\n * @Override\n */\n\n BackgroundItem.prototype.repositionY = function (margin) {\n var height;\n var orientation = this.options.orientation.item; // special positioning for subgroups\n\n if (this.data.subgroup !== undefined) {\n // TODO: instead of calculating the top position of the subgroups here for every BackgroundItem, calculate the top of the subgroup once in Itemset\n var itemSubgroup = this.data.subgroup;\n var subgroups = this.parent.subgroups;\n var subgroupIndex = subgroups[itemSubgroup].index;\n this.dom.box.style.height = this.parent.subgroups[itemSubgroup].height + 'px';\n\n if (orientation == 'top') {\n this.dom.box.style.top = this.parent.top + this.parent.subgroups[itemSubgroup].top + 'px';\n } else {\n this.dom.box.style.top = this.parent.top + this.parent.height - this.parent.subgroups[itemSubgroup].top - this.parent.subgroups[itemSubgroup].height + 'px';\n }\n\n this.dom.box.style.bottom = '';\n } // and in the case of no subgroups:\n else {\n // we want backgrounds with groups to only show in groups.\n if (this.parent instanceof BackgroundGroup) {\n // if the item is not in a group:\n height = Math.max(this.parent.height, this.parent.itemSet.body.domProps.center.height, this.parent.itemSet.body.domProps.centerContainer.height);\n this.dom.box.style.bottom = orientation == 'bottom' ? '0' : '';\n this.dom.box.style.top = orientation == 'top' ? '0' : '';\n } else {\n height = this.parent.height; // same alignment for items when orientation is top or bottom\n\n this.dom.box.style.top = this.parent.top + 'px';\n this.dom.box.style.bottom = '';\n }\n }\n\n this.dom.box.style.height = height + 'px';\n };\n\n module.exports = BackgroundItem;\n /***/\n },\n /* 142 */\n\n /***/\n function (module, exports, __webpack_require__) {\n 'use strict';\n\n var _typeof2 = __webpack_require__(62);\n\n var _typeof3 = _interopRequireDefault(_typeof2);\n\n function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n 'default': obj\n };\n }\n\n var util = __webpack_require__(1);\n\n var Component = __webpack_require__(128);\n\n var TimeStep = __webpack_require__(133);\n\n var DateUtil = __webpack_require__(129);\n\n var moment = __webpack_require__(82);\n /**\n * A horizontal time axis\n * @param {{dom: Object, domProps: Object, emitter: Emitter, range: Range}} body\n * @param {Object} [options] See TimeAxis.setOptions for the available\n * options.\n * @constructor TimeAxis\n * @extends Component\n */\n\n\n function TimeAxis(body, options) {\n this.dom = {\n foreground: null,\n lines: [],\n majorTexts: [],\n minorTexts: [],\n redundant: {\n lines: [],\n majorTexts: [],\n minorTexts: []\n }\n };\n this.props = {\n range: {\n start: 0,\n end: 0,\n minimumStep: 0\n },\n lineTop: 0\n };\n this.defaultOptions = {\n orientation: {\n axis: 'bottom'\n },\n // axis orientation: 'top' or 'bottom'\n showMinorLabels: true,\n showMajorLabels: true,\n maxMinorChars: 7,\n format: TimeStep.FORMAT,\n moment: moment,\n timeAxis: null\n };\n this.options = util.extend({}, this.defaultOptions);\n this.body = body; // create the HTML DOM\n\n this._create();\n\n this.setOptions(options);\n }\n\n TimeAxis.prototype = new Component();\n /**\n * Set options for the TimeAxis.\n * Parameters will be merged in current options.\n * @param {Object} options Available options:\n * {string} [orientation.axis]\n * {boolean} [showMinorLabels]\n * {boolean} [showMajorLabels]\n */\n\n TimeAxis.prototype.setOptions = function (options) {\n if (options) {\n // copy all options that we know\n util.selectiveExtend(['showMinorLabels', 'showMajorLabels', 'maxMinorChars', 'hiddenDates', 'timeAxis', 'moment', 'rtl'], this.options, options); // deep copy the format options\n\n util.selectiveDeepExtend(['format'], this.options, options);\n\n if ('orientation' in options) {\n if (typeof options.orientation === 'string') {\n this.options.orientation.axis = options.orientation;\n } else if ((0, _typeof3['default'])(options.orientation) === 'object' && 'axis' in options.orientation) {\n this.options.orientation.axis = options.orientation.axis;\n }\n } // apply locale to moment.js\n // TODO: not so nice, this is applied globally to moment.js\n\n\n if ('locale' in options) {\n if (typeof moment.locale === 'function') {\n // moment.js 2.8.1+\n moment.locale(options.locale);\n } else {\n moment.lang(options.locale);\n }\n }\n }\n };\n /**\n * Create the HTML DOM for the TimeAxis\n */\n\n\n TimeAxis.prototype._create = function () {\n this.dom.foreground = document.createElement('div');\n this.dom.background = document.createElement('div');\n this.dom.foreground.className = 'vis-time-axis vis-foreground';\n this.dom.background.className = 'vis-time-axis vis-background';\n };\n /**\n * Destroy the TimeAxis\n */\n\n\n TimeAxis.prototype.destroy = function () {\n // remove from DOM\n if (this.dom.foreground.parentNode) {\n this.dom.foreground.parentNode.removeChild(this.dom.foreground);\n }\n\n if (this.dom.background.parentNode) {\n this.dom.background.parentNode.removeChild(this.dom.background);\n }\n\n this.body = null;\n };\n /**\n * Repaint the component\n * @return {boolean} Returns true if the component is resized\n */\n\n\n TimeAxis.prototype.redraw = function () {\n var props = this.props;\n var foreground = this.dom.foreground;\n var background = this.dom.background; // determine the correct parent DOM element (depending on option orientation)\n\n var parent = this.options.orientation.axis == 'top' ? this.body.dom.top : this.body.dom.bottom;\n var parentChanged = foreground.parentNode !== parent; // calculate character width and height\n\n this._calculateCharSize(); // TODO: recalculate sizes only needed when parent is resized or options is changed\n\n\n var showMinorLabels = this.options.showMinorLabels && this.options.orientation.axis !== 'none';\n var showMajorLabels = this.options.showMajorLabels && this.options.orientation.axis !== 'none'; // determine the width and height of the elemens for the axis\n\n props.minorLabelHeight = showMinorLabels ? props.minorCharHeight : 0;\n props.majorLabelHeight = showMajorLabels ? props.majorCharHeight : 0;\n props.height = props.minorLabelHeight + props.majorLabelHeight;\n props.width = foreground.offsetWidth;\n props.minorLineHeight = this.body.domProps.root.height - props.majorLabelHeight - (this.options.orientation.axis == 'top' ? this.body.domProps.bottom.height : this.body.domProps.top.height);\n props.minorLineWidth = 1; // TODO: really calculate width\n\n props.majorLineHeight = props.minorLineHeight + props.majorLabelHeight;\n props.majorLineWidth = 1; // TODO: really calculate width\n // take foreground and background offline while updating (is almost twice as fast)\n\n var foregroundNextSibling = foreground.nextSibling;\n var backgroundNextSibling = background.nextSibling;\n foreground.parentNode && foreground.parentNode.removeChild(foreground);\n background.parentNode && background.parentNode.removeChild(background);\n foreground.style.height = this.props.height + 'px';\n\n this._repaintLabels(); // put DOM online again (at the same place)\n\n\n if (foregroundNextSibling) {\n parent.insertBefore(foreground, foregroundNextSibling);\n } else {\n parent.appendChild(foreground);\n }\n\n if (backgroundNextSibling) {\n this.body.dom.backgroundVertical.insertBefore(background, backgroundNextSibling);\n } else {\n this.body.dom.backgroundVertical.appendChild(background);\n }\n\n return this._isResized() || parentChanged;\n };\n /**\n * Repaint major and minor text labels and vertical grid lines\n * @private\n */\n\n\n TimeAxis.prototype._repaintLabels = function () {\n var orientation = this.options.orientation.axis; // calculate range and step (step such that we have space for 7 characters per label)\n\n var start = util.convert(this.body.range.start, 'Number');\n var end = util.convert(this.body.range.end, 'Number');\n var timeLabelsize = this.body.util.toTime((this.props.minorCharWidth || 10) * this.options.maxMinorChars).valueOf();\n var minimumStep = timeLabelsize - DateUtil.getHiddenDurationBefore(this.options.moment, this.body.hiddenDates, this.body.range, timeLabelsize);\n minimumStep -= this.body.util.toTime(0).valueOf();\n var step = new TimeStep(new Date(start), new Date(end), minimumStep, this.body.hiddenDates);\n step.setMoment(this.options.moment);\n\n if (this.options.format) {\n step.setFormat(this.options.format);\n }\n\n if (this.options.timeAxis) {\n step.setScale(this.options.timeAxis);\n }\n\n this.step = step; // Move all DOM elements to a \"redundant\" list, where they\n // can be picked for re-use, and clear the lists with lines and texts.\n // At the end of the function _repaintLabels, left over elements will be cleaned up\n\n var dom = this.dom;\n dom.redundant.lines = dom.lines;\n dom.redundant.majorTexts = dom.majorTexts;\n dom.redundant.minorTexts = dom.minorTexts;\n dom.lines = [];\n dom.majorTexts = [];\n dom.minorTexts = [];\n var current;\n var next;\n var x;\n var xNext;\n var isMajor, nextIsMajor;\n var width = 0,\n prevWidth;\n var line;\n var labelMinor;\n var xFirstMajorLabel = undefined;\n var count = 0;\n var MAX = 1000;\n var className;\n step.start();\n next = step.getCurrent();\n xNext = this.body.util.toScreen(next);\n\n while (step.hasNext() && count < MAX) {\n count++;\n isMajor = step.isMajor();\n className = step.getClassName();\n labelMinor = step.getLabelMinor();\n current = next;\n x = xNext;\n step.next();\n next = step.getCurrent();\n nextIsMajor = step.isMajor();\n xNext = this.body.util.toScreen(next);\n prevWidth = width;\n width = xNext - x;\n var showMinorGrid = width >= prevWidth * 0.4; // prevent displaying of the 31th of the month on a scale of 5 days\n\n if (this.options.showMinorLabels && showMinorGrid) {\n var label = this._repaintMinorText(x, labelMinor, orientation, className);\n\n label.style.width = width + 'px'; // set width to prevent overflow\n }\n\n if (isMajor && this.options.showMajorLabels) {\n if (x > 0) {\n if (xFirstMajorLabel == undefined) {\n xFirstMajorLabel = x;\n }\n\n label = this._repaintMajorText(x, step.getLabelMajor(), orientation, className);\n }\n\n line = this._repaintMajorLine(x, width, orientation, className);\n } else {\n // minor line\n if (showMinorGrid) {\n line = this._repaintMinorLine(x, width, orientation, className);\n } else {\n if (line) {\n // adjust the width of the previous grid\n line.style.width = parseInt(line.style.width) + width + 'px';\n }\n }\n }\n }\n\n if (count === MAX && !warnedForOverflow) {\n console.warn('Something is wrong with the Timeline scale. Limited drawing of grid lines to ' + MAX + ' lines.');\n warnedForOverflow = true;\n } // create a major label on the left when needed\n\n\n if (this.options.showMajorLabels) {\n var leftTime = this.body.util.toTime(0),\n leftText = step.getLabelMajor(leftTime),\n widthText = leftText.length * (this.props.majorCharWidth || 10) + 10; // upper bound estimation\n\n if (xFirstMajorLabel == undefined || widthText < xFirstMajorLabel) {\n this._repaintMajorText(0, leftText, orientation, className);\n }\n } // Cleanup leftover DOM elements from the redundant list\n\n\n util.forEach(this.dom.redundant, function (arr) {\n while (arr.length) {\n var elem = arr.pop();\n\n if (elem && elem.parentNode) {\n elem.parentNode.removeChild(elem);\n }\n }\n });\n };\n /**\n * Create a minor label for the axis at position x\n * @param {Number} x\n * @param {String} text\n * @param {String} orientation \"top\" or \"bottom\" (default)\n * @param {String} className\n * @return {Element} Returns the HTML element of the created label\n * @private\n */\n\n\n TimeAxis.prototype._repaintMinorText = function (x, text, orientation, className) {\n // reuse redundant label\n var label = this.dom.redundant.minorTexts.shift();\n\n if (!label) {\n // create new label\n var content = document.createTextNode('');\n label = document.createElement('div');\n label.appendChild(content);\n this.dom.foreground.appendChild(label);\n }\n\n this.dom.minorTexts.push(label);\n label.innerHTML = text;\n label.style.top = orientation == 'top' ? this.props.majorLabelHeight + 'px' : '0';\n\n if (this.options.rtl) {\n label.style.left = \"\";\n label.style.right = x + 'px';\n } else {\n label.style.left = x + 'px';\n }\n\n ;\n label.className = 'vis-text vis-minor ' + className; //label.title = title; // TODO: this is a heavy operation\n\n return label;\n };\n /**\n * Create a Major label for the axis at position x\n * @param {Number} x\n * @param {String} text\n * @param {String} orientation \"top\" or \"bottom\" (default)\n * @param {String} className\n * @return {Element} Returns the HTML element of the created label\n * @private\n */\n\n\n TimeAxis.prototype._repaintMajorText = function (x, text, orientation, className) {\n // reuse redundant label\n var label = this.dom.redundant.majorTexts.shift();\n\n if (!label) {\n // create label\n var content = document.createElement('div');\n label = document.createElement('div');\n label.appendChild(content);\n this.dom.foreground.appendChild(label);\n }\n\n label.childNodes[0].innerHTML = text;\n label.className = 'vis-text vis-major ' + className; //label.title = title; // TODO: this is a heavy operation\n\n label.style.top = orientation == 'top' ? '0' : this.props.minorLabelHeight + 'px';\n\n if (this.options.rtl) {\n label.style.left = \"\";\n label.style.right = x + 'px';\n } else {\n label.style.left = x + 'px';\n }\n\n ;\n this.dom.majorTexts.push(label);\n return label;\n };\n /**\n * Create a minor line for the axis at position x\n * @param {Number} x\n * @param {Number} width\n * @param {String} orientation \"top\" or \"bottom\" (default)\n * @param {String} className\n * @return {Element} Returns the created line\n * @private\n */\n\n\n TimeAxis.prototype._repaintMinorLine = function (x, width, orientation, className) {\n // reuse redundant line\n var line = this.dom.redundant.lines.shift();\n\n if (!line) {\n // create vertical line\n line = document.createElement('div');\n this.dom.background.appendChild(line);\n }\n\n this.dom.lines.push(line);\n var props = this.props;\n\n if (orientation == 'top') {\n line.style.top = props.majorLabelHeight + 'px';\n } else {\n line.style.top = this.body.domProps.top.height + 'px';\n }\n\n line.style.height = props.minorLineHeight + 'px';\n\n if (this.options.rtl) {\n line.style.left = \"\";\n line.style.right = x - props.minorLineWidth / 2 + 'px';\n line.className = 'vis-grid vis-vertical-rtl vis-minor ' + className;\n } else {\n line.style.left = x - props.minorLineWidth / 2 + 'px';\n line.className = 'vis-grid vis-vertical vis-minor ' + className;\n }\n\n ;\n line.style.width = width + 'px';\n return line;\n };\n /**\n * Create a Major line for the axis at position x\n * @param {Number} x\n * @param {Number} width\n * @param {String} orientation \"top\" or \"bottom\" (default)\n * @param {String} className\n * @return {Element} Returns the created line\n * @private\n */\n\n\n TimeAxis.prototype._repaintMajorLine = function (x, width, orientation, className) {\n // reuse redundant line\n var line = this.dom.redundant.lines.shift();\n\n if (!line) {\n // create vertical line\n line = document.createElement('div');\n this.dom.background.appendChild(line);\n }\n\n this.dom.lines.push(line);\n var props = this.props;\n\n if (orientation == 'top') {\n line.style.top = '0';\n } else {\n line.style.top = this.body.domProps.top.height + 'px';\n }\n\n if (this.options.rtl) {\n line.style.left = \"\";\n line.style.right = x - props.majorLineWidth / 2 + 'px';\n line.className = 'vis-grid vis-vertical-rtl vis-major ' + className;\n } else {\n line.style.left = x - props.majorLineWidth / 2 + 'px';\n line.className = 'vis-grid vis-vertical vis-major ' + className;\n }\n\n line.style.height = props.majorLineHeight + 'px';\n line.style.width = width + 'px';\n return line;\n };\n /**\n * Determine the size of text on the axis (both major and minor axis).\n * The size is calculated only once and then cached in this.props.\n * @private\n */\n\n\n TimeAxis.prototype._calculateCharSize = function () {\n // Note: We calculate char size with every redraw. Size may change, for\n // example when any of the timelines parents had display:none for example.\n // determine the char width and height on the minor axis\n if (!this.dom.measureCharMinor) {\n this.dom.measureCharMinor = document.createElement('DIV');\n this.dom.measureCharMinor.className = 'vis-text vis-minor vis-measure';\n this.dom.measureCharMinor.style.position = 'absolute';\n this.dom.measureCharMinor.appendChild(document.createTextNode('0'));\n this.dom.foreground.appendChild(this.dom.measureCharMinor);\n }\n\n this.props.minorCharHeight = this.dom.measureCharMinor.clientHeight;\n this.props.minorCharWidth = this.dom.measureCharMinor.clientWidth; // determine the char width and height on the major axis\n\n if (!this.dom.measureCharMajor) {\n this.dom.measureCharMajor = document.createElement('DIV');\n this.dom.measureCharMajor.className = 'vis-text vis-major vis-measure';\n this.dom.measureCharMajor.style.position = 'absolute';\n this.dom.measureCharMajor.appendChild(document.createTextNode('0'));\n this.dom.foreground.appendChild(this.dom.measureCharMajor);\n }\n\n this.props.majorCharHeight = this.dom.measureCharMajor.clientHeight;\n this.props.majorCharWidth = this.dom.measureCharMajor.clientWidth;\n };\n\n var warnedForOverflow = false;\n module.exports = TimeAxis;\n /***/\n },\n /* 143 */\n\n /***/\n function (module, exports, __webpack_require__) {\n 'use strict';\n\n var keycharm = __webpack_require__(115);\n\n var Emitter = __webpack_require__(99);\n\n var Hammer = __webpack_require__(112);\n\n var util = __webpack_require__(1);\n /**\n * Turn an element into an clickToUse element.\n * When not active, the element has a transparent overlay. When the overlay is\n * clicked, the mode is changed to active.\n * When active, the element is displayed with a blue border around it, and\n * the interactive contents of the element can be used. When clicked outside\n * the element, the elements mode is changed to inactive.\n * @param {Element} container\n * @constructor\n */\n\n\n function Activator(container) {\n this.active = false;\n this.dom = {\n container: container\n };\n this.dom.overlay = document.createElement('div');\n this.dom.overlay.className = 'vis-overlay';\n this.dom.container.appendChild(this.dom.overlay);\n this.hammer = Hammer(this.dom.overlay);\n this.hammer.on('tap', this._onTapOverlay.bind(this)); // block all touch events (except tap)\n\n var me = this;\n var events = ['tap', 'doubletap', 'press', 'pinch', 'pan', 'panstart', 'panmove', 'panend'];\n events.forEach(function (event) {\n me.hammer.on(event, function (event) {\n event.stopPropagation();\n });\n }); // attach a click event to the window, in order to deactivate when clicking outside the timeline\n\n if (document && document.body) {\n this.onClick = function (event) {\n if (!_hasParent(event.target, container)) {\n me.deactivate();\n }\n };\n\n document.body.addEventListener('click', this.onClick);\n }\n\n if (this.keycharm !== undefined) {\n this.keycharm.destroy();\n }\n\n this.keycharm = keycharm(); // keycharm listener only bounded when active)\n\n this.escListener = this.deactivate.bind(this);\n } // turn into an event emitter\n\n\n Emitter(Activator.prototype); // The currently active activator\n\n Activator.current = null;\n /**\n * Destroy the activator. Cleans up all created DOM and event listeners\n */\n\n Activator.prototype.destroy = function () {\n this.deactivate(); // remove dom\n\n this.dom.overlay.parentNode.removeChild(this.dom.overlay); // remove global event listener\n\n if (this.onClick) {\n document.body.removeEventListener('click', this.onClick);\n } // cleanup hammer instances\n\n\n this.hammer.destroy();\n this.hammer = null; // FIXME: cleaning up hammer instances doesn't work (Timeline not removed from memory)\n };\n /**\n * Activate the element\n * Overlay is hidden, element is decorated with a blue shadow border\n */\n\n\n Activator.prototype.activate = function () {\n // we allow only one active activator at a time\n if (Activator.current) {\n Activator.current.deactivate();\n }\n\n Activator.current = this;\n this.active = true;\n this.dom.overlay.style.display = 'none';\n util.addClassName(this.dom.container, 'vis-active');\n this.emit('change');\n this.emit('activate'); // ugly hack: bind ESC after emitting the events, as the Network rebinds all\n // keyboard events on a 'change' event\n\n this.keycharm.bind('esc', this.escListener);\n };\n /**\n * Deactivate the element\n * Overlay is displayed on top of the element\n */\n\n\n Activator.prototype.deactivate = function () {\n this.active = false;\n this.dom.overlay.style.display = '';\n util.removeClassName(this.dom.container, 'vis-active');\n this.keycharm.unbind('esc', this.escListener);\n this.emit('change');\n this.emit('deactivate');\n };\n /**\n * Handle a tap event: activate the container\n * @param event\n * @private\n */\n\n\n Activator.prototype._onTapOverlay = function (event) {\n // activate the container\n this.activate();\n event.stopPropagation();\n };\n /**\n * Test whether the element has the requested parent element somewhere in\n * its chain of parent nodes.\n * @param {HTMLElement} element\n * @param {HTMLElement} parent\n * @returns {boolean} Returns true when the parent is found somewhere in the\n * chain of parent nodes.\n * @private\n */\n\n\n function _hasParent(element, parent) {\n while (element) {\n if (element === parent) {\n return true;\n }\n\n element = element.parentNode;\n }\n\n return false;\n }\n\n module.exports = Activator;\n /***/\n },\n /* 144 */\n\n /***/\n function (module, exports, __webpack_require__) {\n 'use strict';\n\n var Hammer = __webpack_require__(112);\n\n var util = __webpack_require__(1);\n\n var Component = __webpack_require__(128);\n\n var moment = __webpack_require__(82);\n\n var locales = __webpack_require__(145);\n /**\n * A custom time bar\n * @param {{range: Range, dom: Object}} body\n * @param {Object} [options] Available parameters:\n * {number | string} id\n * {string} locales\n * {string} locale\n * @constructor CustomTime\n * @extends Component\n */\n\n\n function CustomTime(body, options) {\n this.body = body; // default options\n\n this.defaultOptions = {\n moment: moment,\n locales: locales,\n locale: 'en',\n id: undefined,\n title: undefined\n };\n this.options = util.extend({}, this.defaultOptions);\n\n if (options && options.time) {\n this.customTime = options.time;\n } else {\n this.customTime = new Date();\n }\n\n this.eventParams = {}; // stores state parameters while dragging the bar\n\n this.setOptions(options); // create the DOM\n\n this._create();\n }\n\n CustomTime.prototype = new Component();\n /**\n * Set options for the component. Options will be merged in current options.\n * @param {Object} options Available parameters:\n * {number | string} id\n * {string} locales\n * {string} locale\n */\n\n CustomTime.prototype.setOptions = function (options) {\n if (options) {\n // copy all options that we know\n util.selectiveExtend(['moment', 'locale', 'locales', 'id'], this.options, options);\n }\n };\n /**\n * Create the DOM for the custom time\n * @private\n */\n\n\n CustomTime.prototype._create = function () {\n var bar = document.createElement('div');\n bar['custom-time'] = this;\n bar.className = 'vis-custom-time ' + (this.options.id || '');\n bar.style.position = 'absolute';\n bar.style.top = '0px';\n bar.style.height = '100%';\n this.bar = bar;\n var drag = document.createElement('div');\n drag.style.position = 'relative';\n drag.style.top = '0px';\n drag.style.left = '-10px';\n drag.style.height = '100%';\n drag.style.width = '20px';\n\n function onMouseWheel(e) {\n this.body.range._onMouseWheel(e);\n }\n\n if (drag.addEventListener) {\n // IE9, Chrome, Safari, Opera\n drag.addEventListener(\"mousewheel\", onMouseWheel.bind(this), false); // Firefox\n\n drag.addEventListener(\"DOMMouseScroll\", onMouseWheel.bind(this), false);\n } else {\n // IE 6/7/8\n drag.attachEvent(\"onmousewheel\", onMouseWheel.bind(this));\n }\n\n bar.appendChild(drag); // attach event listeners\n\n this.hammer = new Hammer(drag);\n this.hammer.on('panstart', this._onDragStart.bind(this));\n this.hammer.on('panmove', this._onDrag.bind(this));\n this.hammer.on('panend', this._onDragEnd.bind(this));\n this.hammer.get('pan').set({\n threshold: 5,\n direction: Hammer.DIRECTION_HORIZONTAL\n });\n };\n /**\n * Destroy the CustomTime bar\n */\n\n\n CustomTime.prototype.destroy = function () {\n this.hide();\n this.hammer.destroy();\n this.hammer = null;\n this.body = null;\n };\n /**\n * Repaint the component\n * @return {boolean} Returns true if the component is resized\n */\n\n\n CustomTime.prototype.redraw = function () {\n var parent = this.body.dom.backgroundVertical;\n\n if (this.bar.parentNode != parent) {\n // attach to the dom\n if (this.bar.parentNode) {\n this.bar.parentNode.removeChild(this.bar);\n }\n\n parent.appendChild(this.bar);\n }\n\n var x = this.body.util.toScreen(this.customTime);\n var locale = this.options.locales[this.options.locale];\n\n if (!locale) {\n if (!this.warned) {\n console.log('WARNING: options.locales[\\'' + this.options.locale + '\\'] not found. See http://visjs.org/docs/timeline/#Localization');\n this.warned = true;\n }\n\n locale = this.options.locales['en']; // fall back on english when not available\n }\n\n var title = this.options.title; // To hide the title completely use empty string ''.\n\n if (title === undefined) {\n title = locale.time + ': ' + this.options.moment(this.customTime).format('dddd, MMMM Do YYYY, H:mm:ss');\n title = title.charAt(0).toUpperCase() + title.substring(1);\n } else if (typeof title === \"function\") {\n title = title.call(this.customTime);\n }\n\n this.bar.style.left = x + 'px';\n this.bar.title = title;\n return false;\n };\n /**\n * Remove the CustomTime from the DOM\n */\n\n\n CustomTime.prototype.hide = function () {\n // remove the line from the DOM\n if (this.bar.parentNode) {\n this.bar.parentNode.removeChild(this.bar);\n }\n };\n /**\n * Set custom time.\n * @param {Date | number | string} time\n */\n\n\n CustomTime.prototype.setCustomTime = function (time) {\n this.customTime = util.convert(time, 'Date');\n this.redraw();\n };\n /**\n * Retrieve the current custom time.\n * @return {Date} customTime\n */\n\n\n CustomTime.prototype.getCustomTime = function () {\n return new Date(this.customTime.valueOf());\n };\n /**\n * Set custom title.\n * @param {Date | number | string} title\n */\n\n\n CustomTime.prototype.setCustomTitle = function (title) {\n this.options.title = title;\n };\n /**\n * Start moving horizontally\n * @param {Event} event\n * @private\n */\n\n\n CustomTime.prototype._onDragStart = function (event) {\n this.eventParams.dragging = true;\n this.eventParams.customTime = this.customTime;\n event.stopPropagation();\n };\n /**\n * Perform moving operating.\n * @param {Event} event\n * @private\n */\n\n\n CustomTime.prototype._onDrag = function (event) {\n if (!this.eventParams.dragging) return;\n var x = this.body.util.toScreen(this.eventParams.customTime) + event.deltaX;\n var time = this.body.util.toTime(x);\n this.setCustomTime(time); // fire a timechange event\n\n this.body.emitter.emit('timechange', {\n id: this.options.id,\n time: new Date(this.customTime.valueOf()),\n event: util.elementsCensor(event)\n });\n event.stopPropagation();\n };\n /**\n * Stop moving operating.\n * @param {Event} event\n * @private\n */\n\n\n CustomTime.prototype._onDragEnd = function (event) {\n if (!this.eventParams.dragging) return; // fire a timechanged event\n\n this.body.emitter.emit('timechanged', {\n id: this.options.id,\n time: new Date(this.customTime.valueOf()),\n event: util.elementsCensor(event)\n });\n event.stopPropagation();\n };\n /**\n * Find a custom time from an event target:\n * searches for the attribute 'custom-time' in the event target's element tree\n * @param {Event} event\n * @return {CustomTime | null} customTime\n */\n\n\n CustomTime.customTimeFromTarget = function (event) {\n var target = event.target;\n\n while (target) {\n if (target.hasOwnProperty('custom-time')) {\n return target['custom-time'];\n }\n\n target = target.parentNode;\n }\n\n return null;\n };\n\n module.exports = CustomTime;\n /***/\n },\n /* 145 */\n\n /***/\n function (module, exports) {\n 'use strict'; // English\n\n exports['en'] = {\n current: 'current',\n time: 'time'\n };\n exports['en_EN'] = exports['en'];\n exports['en_US'] = exports['en']; // Italiano\n\n exports['it'] = {\n current: 'attuale',\n time: 'tempo'\n };\n exports['it_IT'] = exports['it'];\n exports['it_CH'] = exports['it']; // Dutch\n\n exports['nl'] = {\n current: 'huidige',\n time: 'tijd'\n };\n exports['nl_NL'] = exports['nl'];\n exports['nl_BE'] = exports['nl']; // German\n\n exports['de'] = {\n current: 'Aktuelle',\n time: 'Zeit'\n };\n exports['de_DE'] = exports['de']; // French\n\n exports['fr'] = {\n current: 'actuel',\n time: 'heure'\n };\n exports['fr_FR'] = exports['fr'];\n exports['fr_CA'] = exports['fr'];\n exports['fr_BE'] = exports['fr']; // Espanol\n\n exports['es'] = {\n current: 'corriente',\n time: 'hora'\n };\n exports['es_ES'] = exports['es'];\n /***/\n },\n /* 146 */\n\n /***/\n function (module, exports, __webpack_require__) {\n 'use strict';\n\n var util = __webpack_require__(1);\n\n var Component = __webpack_require__(128);\n\n var moment = __webpack_require__(82);\n\n var locales = __webpack_require__(145);\n /**\n * A current time bar\n * @param {{range: Range, dom: Object, domProps: Object}} body\n * @param {Object} [options] Available parameters:\n * {Boolean} [showCurrentTime]\n * @constructor CurrentTime\n * @extends Component\n */\n\n\n function CurrentTime(body, options) {\n this.body = body; // default options\n\n this.defaultOptions = {\n rtl: false,\n showCurrentTime: true,\n moment: moment,\n locales: locales,\n locale: 'en'\n };\n this.options = util.extend({}, this.defaultOptions);\n this.offset = 0;\n\n this._create();\n\n this.setOptions(options);\n }\n\n CurrentTime.prototype = new Component();\n /**\n * Create the HTML DOM for the current time bar\n * @private\n */\n\n CurrentTime.prototype._create = function () {\n var bar = document.createElement('div');\n bar.className = 'vis-current-time';\n bar.style.position = 'absolute';\n bar.style.top = '0px';\n bar.style.height = '100%';\n this.bar = bar;\n };\n /**\n * Destroy the CurrentTime bar\n */\n\n\n CurrentTime.prototype.destroy = function () {\n this.options.showCurrentTime = false;\n this.redraw(); // will remove the bar from the DOM and stop refreshing\n\n this.body = null;\n };\n /**\n * Set options for the component. Options will be merged in current options.\n * @param {Object} options Available parameters:\n * {boolean} [showCurrentTime]\n */\n\n\n CurrentTime.prototype.setOptions = function (options) {\n if (options) {\n // copy all options that we know\n util.selectiveExtend(['rtl', 'showCurrentTime', 'moment', 'locale', 'locales'], this.options, options);\n }\n };\n /**\n * Repaint the component\n * @return {boolean} Returns true if the component is resized\n */\n\n\n CurrentTime.prototype.redraw = function () {\n if (this.options.showCurrentTime) {\n var parent = this.body.dom.backgroundVertical;\n\n if (this.bar.parentNode != parent) {\n // attach to the dom\n if (this.bar.parentNode) {\n this.bar.parentNode.removeChild(this.bar);\n }\n\n parent.appendChild(this.bar);\n this.start();\n }\n\n var now = this.options.moment(new Date().valueOf() + this.offset);\n var x = this.body.util.toScreen(now);\n var locale = this.options.locales[this.options.locale];\n\n if (!locale) {\n if (!this.warned) {\n console.log('WARNING: options.locales[\\'' + this.options.locale + '\\'] not found. See http://visjs.org/docs/timeline/#Localization');\n this.warned = true;\n }\n\n locale = this.options.locales['en']; // fall back on english when not available\n }\n\n var title = locale.current + ' ' + locale.time + ': ' + now.format('dddd, MMMM Do YYYY, H:mm:ss');\n title = title.charAt(0).toUpperCase() + title.substring(1);\n\n if (this.options.rtl) {\n this.bar.style.right = x + 'px';\n } else {\n this.bar.style.left = x + 'px';\n }\n\n this.bar.title = title;\n } else {\n // remove the line from the DOM\n if (this.bar.parentNode) {\n this.bar.parentNode.removeChild(this.bar);\n }\n\n this.stop();\n }\n\n return false;\n };\n /**\n * Start auto refreshing the current time bar\n */\n\n\n CurrentTime.prototype.start = function () {\n var me = this;\n\n function update() {\n me.stop(); // determine interval to refresh\n\n var scale = me.body.range.conversion(me.body.domProps.center.width).scale;\n var interval = 1 / scale / 10;\n if (interval < 30) interval = 30;\n if (interval > 1000) interval = 1000;\n me.redraw();\n me.body.emitter.emit('currentTimeTick'); // start a renderTimer to adjust for the new time\n\n me.currentTimeTimer = setTimeout(update, interval);\n }\n\n update();\n };\n /**\n * Stop auto refreshing the current time bar\n */\n\n\n CurrentTime.prototype.stop = function () {\n if (this.currentTimeTimer !== undefined) {\n clearTimeout(this.currentTimeTimer);\n delete this.currentTimeTimer;\n }\n };\n /**\n * Set a current time. This can be used for example to ensure that a client's\n * time is synchronized with a shared server time.\n * @param {Date | String | Number} time A Date, unix timestamp, or\n * ISO date string.\n */\n\n\n CurrentTime.prototype.setCurrentTime = function (time) {\n var t = util.convert(time, 'Date').valueOf();\n var now = new Date().valueOf();\n this.offset = t - now;\n this.redraw();\n };\n /**\n * Get the current time.\n * @return {Date} Returns the current time.\n */\n\n\n CurrentTime.prototype.getCurrentTime = function () {\n return new Date(new Date().valueOf() + this.offset);\n };\n\n module.exports = CurrentTime;\n /***/\n },\n /* 147 */\n\n /***/\n function (module, exports) {\n 'use strict';\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n /**\n * This object contains all possible options. It will check if the types are correct, if required if the option is one\n * of the allowed values.\n *\n * __any__ means that the name of the property does not matter.\n * __type__ is a required field for all objects and contains the allowed types of all objects\n */\n\n var string = 'string';\n var bool = 'boolean';\n var number = 'number';\n var array = 'array';\n var date = 'date';\n var object = 'object'; // should only be in a __type__ property\n\n var dom = 'dom';\n var moment = 'moment';\n var any = 'any';\n var allOptions = {\n configure: {\n enabled: {\n 'boolean': bool\n },\n filter: {\n 'boolean': bool,\n 'function': 'function'\n },\n container: {\n dom: dom\n },\n __type__: {\n object: object,\n 'boolean': bool,\n 'function': 'function'\n }\n },\n //globals :\n align: {\n string: string\n },\n rtl: {\n 'boolean': bool,\n 'undefined': 'undefined'\n },\n rollingMode: {\n 'boolean': bool,\n 'undefined': 'undefined'\n },\n verticalScroll: {\n 'boolean': bool,\n 'undefined': 'undefined'\n },\n horizontalScroll: {\n 'boolean': bool,\n 'undefined': 'undefined'\n },\n autoResize: {\n 'boolean': bool\n },\n throttleRedraw: {\n number: number\n },\n // TODO: DEPRICATED see https://github.com/almende/vis/issues/2511\n clickToUse: {\n 'boolean': bool\n },\n dataAttributes: {\n string: string,\n array: array\n },\n editable: {\n add: {\n 'boolean': bool,\n 'undefined': 'undefined'\n },\n remove: {\n 'boolean': bool,\n 'undefined': 'undefined'\n },\n updateGroup: {\n 'boolean': bool,\n 'undefined': 'undefined'\n },\n updateTime: {\n 'boolean': bool,\n 'undefined': 'undefined'\n },\n overrideItems: {\n 'boolean': bool,\n 'undefined': 'undefined'\n },\n __type__: {\n 'boolean': bool,\n object: object\n }\n },\n end: {\n number: number,\n date: date,\n string: string,\n moment: moment\n },\n format: {\n minorLabels: {\n millisecond: {\n string: string,\n 'undefined': 'undefined'\n },\n second: {\n string: string,\n 'undefined': 'undefined'\n },\n minute: {\n string: string,\n 'undefined': 'undefined'\n },\n hour: {\n string: string,\n 'undefined': 'undefined'\n },\n weekday: {\n string: string,\n 'undefined': 'undefined'\n },\n day: {\n string: string,\n 'undefined': 'undefined'\n },\n month: {\n string: string,\n 'undefined': 'undefined'\n },\n year: {\n string: string,\n 'undefined': 'undefined'\n },\n __type__: {\n object: object,\n 'function': 'function'\n }\n },\n majorLabels: {\n millisecond: {\n string: string,\n 'undefined': 'undefined'\n },\n second: {\n string: string,\n 'undefined': 'undefined'\n },\n minute: {\n string: string,\n 'undefined': 'undefined'\n },\n hour: {\n string: string,\n 'undefined': 'undefined'\n },\n weekday: {\n string: string,\n 'undefined': 'undefined'\n },\n day: {\n string: string,\n 'undefined': 'undefined'\n },\n month: {\n string: string,\n 'undefined': 'undefined'\n },\n year: {\n string: string,\n 'undefined': 'undefined'\n },\n __type__: {\n object: object,\n 'function': 'function'\n }\n },\n __type__: {\n object: object\n }\n },\n moment: {\n 'function': 'function'\n },\n groupOrder: {\n string: string,\n 'function': 'function'\n },\n groupEditable: {\n add: {\n 'boolean': bool,\n 'undefined': 'undefined'\n },\n remove: {\n 'boolean': bool,\n 'undefined': 'undefined'\n },\n order: {\n 'boolean': bool,\n 'undefined': 'undefined'\n },\n __type__: {\n 'boolean': bool,\n object: object\n }\n },\n groupOrderSwap: {\n 'function': 'function'\n },\n height: {\n string: string,\n number: number\n },\n hiddenDates: {\n start: {\n date: date,\n number: number,\n string: string,\n moment: moment\n },\n end: {\n date: date,\n number: number,\n string: string,\n moment: moment\n },\n repeat: {\n string: string\n },\n __type__: {\n object: object,\n array: array\n }\n },\n itemsAlwaysDraggable: {\n 'boolean': bool\n },\n locale: {\n string: string\n },\n locales: {\n __any__: {\n any: any\n },\n __type__: {\n object: object\n }\n },\n margin: {\n axis: {\n number: number\n },\n item: {\n horizontal: {\n number: number,\n 'undefined': 'undefined'\n },\n vertical: {\n number: number,\n 'undefined': 'undefined'\n },\n __type__: {\n object: object,\n number: number\n }\n },\n __type__: {\n object: object,\n number: number\n }\n },\n max: {\n date: date,\n number: number,\n string: string,\n moment: moment\n },\n maxHeight: {\n number: number,\n string: string\n },\n maxMinorChars: {\n number: number\n },\n min: {\n date: date,\n number: number,\n string: string,\n moment: moment\n },\n minHeight: {\n number: number,\n string: string\n },\n moveable: {\n 'boolean': bool\n },\n multiselect: {\n 'boolean': bool\n },\n multiselectPerGroup: {\n 'boolean': bool\n },\n onAdd: {\n 'function': 'function'\n },\n onUpdate: {\n 'function': 'function'\n },\n onMove: {\n 'function': 'function'\n },\n onMoving: {\n 'function': 'function'\n },\n onRemove: {\n 'function': 'function'\n },\n onAddGroup: {\n 'function': 'function'\n },\n onMoveGroup: {\n 'function': 'function'\n },\n onRemoveGroup: {\n 'function': 'function'\n },\n order: {\n 'function': 'function'\n },\n orientation: {\n axis: {\n string: string,\n 'undefined': 'undefined'\n },\n item: {\n string: string,\n 'undefined': 'undefined'\n },\n __type__: {\n string: string,\n object: object\n }\n },\n selectable: {\n 'boolean': bool\n },\n showCurrentTime: {\n 'boolean': bool\n },\n showMajorLabels: {\n 'boolean': bool\n },\n showMinorLabels: {\n 'boolean': bool\n },\n stack: {\n 'boolean': bool\n },\n stackSubgroups: {\n 'boolean': bool\n },\n snap: {\n 'function': 'function',\n 'null': 'null'\n },\n start: {\n date: date,\n number: number,\n string: string,\n moment: moment\n },\n template: {\n 'function': 'function'\n },\n groupTemplate: {\n 'function': 'function'\n },\n visibleFrameTemplate: {\n string: string,\n 'function': 'function'\n },\n tooltip: {\n followMouse: {\n 'boolean': bool\n },\n overflowMethod: {\n 'string': ['cap', 'flip']\n },\n __type__: {\n object: object\n }\n },\n tooltipOnItemUpdateTime: {\n template: {\n 'function': 'function'\n },\n __type__: {\n 'boolean': bool,\n object: object\n }\n },\n timeAxis: {\n scale: {\n string: string,\n 'undefined': 'undefined'\n },\n step: {\n number: number,\n 'undefined': 'undefined'\n },\n __type__: {\n object: object\n }\n },\n type: {\n string: string\n },\n width: {\n string: string,\n number: number\n },\n zoomable: {\n 'boolean': bool\n },\n zoomKey: {\n string: ['ctrlKey', 'altKey', 'metaKey', '']\n },\n zoomMax: {\n number: number\n },\n zoomMin: {\n number: number\n },\n __type__: {\n object: object\n }\n };\n var configureOptions = {\n global: {\n align: ['center', 'left', 'right'],\n direction: false,\n autoResize: true,\n clickToUse: false,\n // dataAttributes: ['all'], // FIXME: can be 'all' or string[]\n editable: {\n add: false,\n remove: false,\n updateGroup: false,\n updateTime: false\n },\n end: '',\n format: {\n minorLabels: {\n millisecond: 'SSS',\n second: 's',\n minute: 'HH:mm',\n hour: 'HH:mm',\n weekday: 'ddd D',\n day: 'D',\n month: 'MMM',\n year: 'YYYY'\n },\n majorLabels: {\n millisecond: 'HH:mm:ss',\n second: 'D MMMM HH:mm',\n minute: 'ddd D MMMM',\n hour: 'ddd D MMMM',\n weekday: 'MMMM YYYY',\n day: 'MMMM YYYY',\n month: 'YYYY',\n year: ''\n }\n },\n //groupOrder: {string, 'function': 'function'},\n groupsDraggable: false,\n height: '',\n //hiddenDates: {object, array},\n locale: '',\n margin: {\n axis: [20, 0, 100, 1],\n item: {\n horizontal: [10, 0, 100, 1],\n vertical: [10, 0, 100, 1]\n }\n },\n max: '',\n maxHeight: '',\n maxMinorChars: [7, 0, 20, 1],\n min: '',\n minHeight: '',\n moveable: false,\n multiselect: false,\n multiselectPerGroup: false,\n //onAdd: {'function': 'function'},\n //onUpdate: {'function': 'function'},\n //onMove: {'function': 'function'},\n //onMoving: {'function': 'function'},\n //onRename: {'function': 'function'},\n //order: {'function': 'function'},\n orientation: {\n axis: ['both', 'bottom', 'top'],\n item: ['bottom', 'top']\n },\n selectable: true,\n showCurrentTime: false,\n showMajorLabels: true,\n showMinorLabels: true,\n stack: true,\n stackSubgroups: true,\n //snap: {'function': 'function', nada},\n start: '',\n //template: {'function': 'function'},\n //timeAxis: {\n // scale: ['millisecond', 'second', 'minute', 'hour', 'weekday', 'day', 'month', 'year'],\n // step: [1, 1, 10, 1]\n //},\n tooltip: {\n followMouse: false,\n overflowMethod: 'flip'\n },\n tooltipOnItemUpdateTime: false,\n type: ['box', 'point', 'range', 'background'],\n width: '100%',\n zoomable: true,\n zoomKey: ['ctrlKey', 'altKey', 'metaKey', ''],\n zoomMax: [315360000000000, 10, 315360000000000, 1],\n zoomMin: [10, 10, 315360000000000, 1]\n }\n };\n exports.allOptions = allOptions;\n exports.configureOptions = configureOptions;\n /***/\n },\n /* 148 */\n\n /***/\n function (module, exports, __webpack_require__) {\n 'use strict';\n\n var _Configurator = __webpack_require__(118);\n\n var _Configurator2 = _interopRequireDefault(_Configurator);\n\n var _Validator = __webpack_require__(126);\n\n var _Validator2 = _interopRequireDefault(_Validator);\n\n function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n 'default': obj\n };\n }\n\n var Emitter = __webpack_require__(99);\n\n var Hammer = __webpack_require__(112);\n\n var moment = __webpack_require__(82);\n\n var util = __webpack_require__(1);\n\n var DataSet = __webpack_require__(89);\n\n var DataView = __webpack_require__(93);\n\n var Range = __webpack_require__(127);\n\n var Core = __webpack_require__(130);\n\n var TimeAxis = __webpack_require__(142);\n\n var CurrentTime = __webpack_require__(146);\n\n var CustomTime = __webpack_require__(144);\n\n var LineGraph = __webpack_require__(149);\n\n var printStyle = __webpack_require__(126).printStyle;\n\n var allOptions = __webpack_require__(157).allOptions;\n\n var configureOptions = __webpack_require__(157).configureOptions;\n /**\n * Create a timeline visualization\n * @param {HTMLElement} container\n * @param {vis.DataSet | Array} [items]\n * @param {Object} [options] See Graph2d.setOptions for the available options.\n * @constructor\n * @extends Core\n */\n\n\n function Graph2d(container, items, groups, options) {\n // if the third element is options, the forth is groups (optionally);\n if (!(Array.isArray(groups) || groups instanceof DataSet || groups instanceof DataView) && groups instanceof Object) {\n var forthArgument = options;\n options = groups;\n groups = forthArgument;\n } // TODO: REMOVE THIS in the next MAJOR release\n // see https://github.com/almende/vis/issues/2511\n\n\n if (options && options.throttleRedraw) {\n console.warn(\"Graph2d option \\\"throttleRedraw\\\" is DEPRICATED and no longer supported. It will be removed in the next MAJOR release.\");\n }\n\n var me = this;\n this.defaultOptions = {\n start: null,\n end: null,\n autoResize: true,\n orientation: {\n axis: 'bottom',\n // axis orientation: 'bottom', 'top', or 'both'\n item: 'bottom' // not relevant for Graph2d\n\n },\n moment: moment,\n width: null,\n height: null,\n maxHeight: null,\n minHeight: null\n };\n this.options = util.deepExtend({}, this.defaultOptions); // Create the DOM, props, and emitter\n\n this._create(container); // all components listed here will be repainted automatically\n\n\n this.components = [];\n this.body = {\n dom: this.dom,\n domProps: this.props,\n emitter: {\n on: this.on.bind(this),\n off: this.off.bind(this),\n emit: this.emit.bind(this)\n },\n hiddenDates: [],\n util: {\n toScreen: me._toScreen.bind(me),\n toGlobalScreen: me._toGlobalScreen.bind(me),\n // this refers to the root.width\n toTime: me._toTime.bind(me),\n toGlobalTime: me._toGlobalTime.bind(me)\n }\n }; // range\n\n this.range = new Range(this.body);\n this.components.push(this.range);\n this.body.range = this.range; // time axis\n\n this.timeAxis = new TimeAxis(this.body);\n this.components.push(this.timeAxis); //this.body.util.snap = this.timeAxis.snap.bind(this.timeAxis);\n // current time bar\n\n this.currentTime = new CurrentTime(this.body);\n this.components.push(this.currentTime); // item set\n\n this.linegraph = new LineGraph(this.body);\n this.components.push(this.linegraph);\n this.itemsData = null; // DataSet\n\n this.groupsData = null; // DataSet\n\n this.on('tap', function (event) {\n me.emit('click', me.getEventProperties(event));\n });\n this.on('doubletap', function (event) {\n me.emit('doubleClick', me.getEventProperties(event));\n });\n\n this.dom.root.oncontextmenu = function (event) {\n me.emit('contextmenu', me.getEventProperties(event));\n }; // apply options\n\n\n if (options) {\n this.setOptions(options);\n } // IMPORTANT: THIS HAPPENS BEFORE SET ITEMS!\n\n\n if (groups) {\n this.setGroups(groups);\n } // create itemset\n\n\n if (items) {\n this.setItems(items);\n } // draw for the first time\n\n\n this._redraw();\n } // Extend the functionality from Core\n\n\n Graph2d.prototype = new Core();\n\n Graph2d.prototype.setOptions = function (options) {\n // validate options\n var errorFound = _Validator2['default'].validate(options, allOptions);\n\n if (errorFound === true) {\n console.log('%cErrors have been found in the supplied options object.', printStyle);\n }\n\n Core.prototype.setOptions.call(this, options);\n };\n /**\n * Set items\n * @param {vis.DataSet | Array | null} items\n */\n\n\n Graph2d.prototype.setItems = function (items) {\n var initialLoad = this.itemsData == null; // convert to type DataSet when needed\n\n var newDataSet;\n\n if (!items) {\n newDataSet = null;\n } else if (items instanceof DataSet || items instanceof DataView) {\n newDataSet = items;\n } else {\n // turn an array into a dataset\n newDataSet = new DataSet(items, {\n type: {\n start: 'Date',\n end: 'Date'\n }\n });\n } // set items\n\n\n this.itemsData = newDataSet;\n this.linegraph && this.linegraph.setItems(newDataSet);\n\n if (initialLoad) {\n if (this.options.start != undefined || this.options.end != undefined) {\n var start = this.options.start != undefined ? this.options.start : null;\n var end = this.options.end != undefined ? this.options.end : null;\n this.setWindow(start, end, {\n animation: false\n });\n } else {\n this.fit({\n animation: false\n });\n }\n }\n };\n /**\n * Set groups\n * @param {vis.DataSet | Array} groups\n */\n\n\n Graph2d.prototype.setGroups = function (groups) {\n // convert to type DataSet when needed\n var newDataSet;\n\n if (!groups) {\n newDataSet = null;\n } else if (groups instanceof DataSet || groups instanceof DataView) {\n newDataSet = groups;\n } else {\n // turn an array into a dataset\n newDataSet = new DataSet(groups);\n }\n\n this.groupsData = newDataSet;\n this.linegraph.setGroups(newDataSet);\n };\n /**\n * Returns an object containing an SVG element with the icon of the group (size determined by iconWidth and iconHeight), the label of the group (content) and the yAxisOrientation of the group (left or right).\n * @param groupId\n * @param width\n * @param height\n */\n\n\n Graph2d.prototype.getLegend = function (groupId, width, height) {\n if (width === undefined) {\n width = 15;\n }\n\n if (height === undefined) {\n height = 15;\n }\n\n if (this.linegraph.groups[groupId] !== undefined) {\n return this.linegraph.groups[groupId].getLegend(width, height);\n } else {\n return \"cannot find group:'\" + groupId + \"'\";\n }\n };\n /**\n * This checks if the visible option of the supplied group (by ID) is true or false.\n * @param groupId\n * @returns {*}\n */\n\n\n Graph2d.prototype.isGroupVisible = function (groupId) {\n if (this.linegraph.groups[groupId] !== undefined) {\n return this.linegraph.groups[groupId].visible && (this.linegraph.options.groups.visibility[groupId] === undefined || this.linegraph.options.groups.visibility[groupId] == true);\n } else {\n return false;\n }\n };\n /**\n * Get the data range of the item set.\n * @returns {{min: Date, max: Date}} range A range with a start and end Date.\n * When no minimum is found, min==null\n * When no maximum is found, max==null\n */\n\n\n Graph2d.prototype.getDataRange = function () {\n var min = null;\n var max = null; // calculate min from start filed\n\n for (var groupId in this.linegraph.groups) {\n if (this.linegraph.groups.hasOwnProperty(groupId)) {\n if (this.linegraph.groups[groupId].visible == true) {\n for (var i = 0; i < this.linegraph.groups[groupId].itemsData.length; i++) {\n var item = this.linegraph.groups[groupId].itemsData[i];\n var value = util.convert(item.x, 'Date').valueOf();\n min = min == null ? value : min > value ? value : min;\n max = max == null ? value : max < value ? value : max;\n }\n }\n }\n }\n\n return {\n min: min != null ? new Date(min) : null,\n max: max != null ? new Date(max) : null\n };\n };\n /**\n * Generate Timeline related information from an event\n * @param {Event} event\n * @return {Object} An object with related information, like on which area\n * The event happened, whether clicked on an item, etc.\n */\n\n\n Graph2d.prototype.getEventProperties = function (event) {\n var clientX = event.center ? event.center.x : event.clientX;\n var clientY = event.center ? event.center.y : event.clientY;\n var x = clientX - util.getAbsoluteLeft(this.dom.centerContainer);\n var y = clientY - util.getAbsoluteTop(this.dom.centerContainer);\n\n var time = this._toTime(x);\n\n var customTime = CustomTime.customTimeFromTarget(event);\n var element = util.getTarget(event);\n var what = null;\n\n if (util.hasParent(element, this.timeAxis.dom.foreground)) {\n what = 'axis';\n } else if (this.timeAxis2 && util.hasParent(element, this.timeAxis2.dom.foreground)) {\n what = 'axis';\n } else if (util.hasParent(element, this.linegraph.yAxisLeft.dom.frame)) {\n what = 'data-axis';\n } else if (util.hasParent(element, this.linegraph.yAxisRight.dom.frame)) {\n what = 'data-axis';\n } else if (util.hasParent(element, this.linegraph.legendLeft.dom.frame)) {\n what = 'legend';\n } else if (util.hasParent(element, this.linegraph.legendRight.dom.frame)) {\n what = 'legend';\n } else if (customTime != null) {\n what = 'custom-time';\n } else if (util.hasParent(element, this.currentTime.bar)) {\n what = 'current-time';\n } else if (util.hasParent(element, this.dom.center)) {\n what = 'background';\n }\n\n var value = [];\n var yAxisLeft = this.linegraph.yAxisLeft;\n var yAxisRight = this.linegraph.yAxisRight;\n\n if (!yAxisLeft.hidden && this.itemsData.length > 0) {\n value.push(yAxisLeft.screenToValue(y));\n }\n\n if (!yAxisRight.hidden && this.itemsData.length > 0) {\n value.push(yAxisRight.screenToValue(y));\n }\n\n return {\n event: event,\n what: what,\n pageX: event.srcEvent ? event.srcEvent.pageX : event.pageX,\n pageY: event.srcEvent ? event.srcEvent.pageY : event.pageY,\n x: x,\n y: y,\n time: time,\n value: value\n };\n };\n /**\n * Load a configurator\n * @return {Object}\n * @private\n */\n\n\n Graph2d.prototype._createConfigurator = function () {\n return new _Configurator2['default'](this, this.dom.container, configureOptions);\n };\n\n module.exports = Graph2d;\n /***/\n },\n /* 149 */\n\n /***/\n function (module, exports, __webpack_require__) {\n 'use strict';\n\n var _typeof2 = __webpack_require__(62);\n\n var _typeof3 = _interopRequireDefault(_typeof2);\n\n function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n 'default': obj\n };\n }\n\n var util = __webpack_require__(1);\n\n var DOMutil = __webpack_require__(88);\n\n var DataSet = __webpack_require__(89);\n\n var DataView = __webpack_require__(93);\n\n var Component = __webpack_require__(128);\n\n var DataAxis = __webpack_require__(150);\n\n var GraphGroup = __webpack_require__(152);\n\n var Legend = __webpack_require__(156);\n\n var Bars = __webpack_require__(153);\n\n var Lines = __webpack_require__(155);\n\n var Points = __webpack_require__(154);\n\n var UNGROUPED = '__ungrouped__'; // reserved group id for ungrouped items\n\n /**\n * This is the constructor of the LineGraph. It requires a Timeline body and options.\n *\n * @param body\n * @param options\n * @constructor\n */\n\n function LineGraph(body, options) {\n this.id = util.randomUUID();\n this.body = body;\n this.defaultOptions = {\n yAxisOrientation: 'left',\n defaultGroup: 'default',\n sort: true,\n sampling: true,\n stack: false,\n graphHeight: '400px',\n shaded: {\n enabled: false,\n orientation: 'bottom' // top, bottom, zero\n\n },\n style: 'line',\n // line, bar\n barChart: {\n width: 50,\n sideBySide: false,\n align: 'center' // left, center, right\n\n },\n interpolation: {\n enabled: true,\n parametrization: 'centripetal',\n // uniform (alpha = 0.0), chordal (alpha = 1.0), centripetal (alpha = 0.5)\n alpha: 0.5\n },\n drawPoints: {\n enabled: true,\n size: 6,\n style: 'square' // square, circle\n\n },\n dataAxis: {},\n //Defaults are done on DataAxis level\n legend: {},\n //Defaults are done on Legend level\n groups: {\n visibility: {}\n }\n }; // options is shared by this lineGraph and all its items\n\n this.options = util.extend({}, this.defaultOptions);\n this.dom = {};\n this.props = {};\n this.hammer = null;\n this.groups = {};\n this.abortedGraphUpdate = false;\n this.updateSVGheight = false;\n this.updateSVGheightOnResize = false;\n this.forceGraphUpdate = true;\n var me = this;\n this.itemsData = null; // DataSet\n\n this.groupsData = null; // DataSet\n // listeners for the DataSet of the items\n\n this.itemListeners = {\n 'add': function add(event, params, senderId) {\n me._onAdd(params.items);\n },\n 'update': function update(event, params, senderId) {\n me._onUpdate(params.items);\n },\n 'remove': function remove(event, params, senderId) {\n me._onRemove(params.items);\n }\n }; // listeners for the DataSet of the groups\n\n this.groupListeners = {\n 'add': function add(event, params, senderId) {\n me._onAddGroups(params.items);\n },\n 'update': function update(event, params, senderId) {\n me._onUpdateGroups(params.items);\n },\n 'remove': function remove(event, params, senderId) {\n me._onRemoveGroups(params.items);\n }\n };\n this.items = {}; // object with an Item for every data item\n\n this.selection = []; // list with the ids of all selected nodes\n\n this.lastStart = this.body.range.start;\n this.touchParams = {}; // stores properties while dragging\n\n this.svgElements = {};\n this.setOptions(options);\n this.groupsUsingDefaultStyles = [0];\n this.body.emitter.on('rangechanged', function () {\n me.lastStart = me.body.range.start;\n me.svg.style.left = util.option.asSize(-me.props.width);\n me.forceGraphUpdate = true; //Is this local redraw necessary? (Core also does a change event!)\n\n me.redraw.call(me);\n }); // create the HTML DOM\n\n this._create();\n\n this.framework = {\n svg: this.svg,\n svgElements: this.svgElements,\n options: this.options,\n groups: this.groups\n };\n }\n\n LineGraph.prototype = new Component();\n /**\n * Create the HTML DOM for the ItemSet\n */\n\n LineGraph.prototype._create = function () {\n var frame = document.createElement('div');\n frame.className = 'vis-line-graph';\n this.dom.frame = frame; // create svg element for graph drawing.\n\n this.svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg');\n this.svg.style.position = 'relative';\n this.svg.style.height = ('' + this.options.graphHeight).replace('px', '') + 'px';\n this.svg.style.display = 'block';\n frame.appendChild(this.svg); // data axis\n\n this.options.dataAxis.orientation = 'left';\n this.yAxisLeft = new DataAxis(this.body, this.options.dataAxis, this.svg, this.options.groups);\n this.options.dataAxis.orientation = 'right';\n this.yAxisRight = new DataAxis(this.body, this.options.dataAxis, this.svg, this.options.groups);\n delete this.options.dataAxis.orientation; // legends\n\n this.legendLeft = new Legend(this.body, this.options.legend, 'left', this.options.groups);\n this.legendRight = new Legend(this.body, this.options.legend, 'right', this.options.groups);\n this.show();\n };\n /**\n * set the options of the LineGraph. the mergeOptions is used for subObjects that have an enabled element.\n * @param {object} options\n */\n\n\n LineGraph.prototype.setOptions = function (options) {\n if (options) {\n var fields = ['sampling', 'defaultGroup', 'stack', 'height', 'graphHeight', 'yAxisOrientation', 'style', 'barChart', 'dataAxis', 'sort', 'groups'];\n\n if (options.graphHeight === undefined && options.height !== undefined) {\n this.updateSVGheight = true;\n this.updateSVGheightOnResize = true;\n } else if (this.body.domProps.centerContainer.height !== undefined && options.graphHeight !== undefined) {\n if (parseInt((options.graphHeight + '').replace(\"px\", '')) < this.body.domProps.centerContainer.height) {\n this.updateSVGheight = true;\n }\n }\n\n util.selectiveDeepExtend(fields, this.options, options);\n util.mergeOptions(this.options, options, 'interpolation');\n util.mergeOptions(this.options, options, 'drawPoints');\n util.mergeOptions(this.options, options, 'shaded');\n util.mergeOptions(this.options, options, 'legend');\n\n if (options.interpolation) {\n if ((0, _typeof3['default'])(options.interpolation) == 'object') {\n if (options.interpolation.parametrization) {\n if (options.interpolation.parametrization == 'uniform') {\n this.options.interpolation.alpha = 0;\n } else if (options.interpolation.parametrization == 'chordal') {\n this.options.interpolation.alpha = 1.0;\n } else {\n this.options.interpolation.parametrization = 'centripetal';\n this.options.interpolation.alpha = 0.5;\n }\n }\n }\n }\n\n if (this.yAxisLeft) {\n if (options.dataAxis !== undefined) {\n this.yAxisLeft.setOptions(this.options.dataAxis);\n this.yAxisRight.setOptions(this.options.dataAxis);\n }\n }\n\n if (this.legendLeft) {\n if (options.legend !== undefined) {\n this.legendLeft.setOptions(this.options.legend);\n this.legendRight.setOptions(this.options.legend);\n }\n }\n\n if (this.groups.hasOwnProperty(UNGROUPED)) {\n this.groups[UNGROUPED].setOptions(options);\n }\n } // this is used to redraw the graph if the visibility of the groups is changed.\n\n\n if (this.dom.frame) {\n //not on initial run?\n this.forceGraphUpdate = true;\n this.body.emitter.emit(\"_change\", {\n queue: true\n });\n }\n };\n /**\n * Hide the component from the DOM\n */\n\n\n LineGraph.prototype.hide = function () {\n // remove the frame containing the items\n if (this.dom.frame.parentNode) {\n this.dom.frame.parentNode.removeChild(this.dom.frame);\n }\n };\n /**\n * Show the component in the DOM (when not already visible).\n * @return {Boolean} changed\n */\n\n\n LineGraph.prototype.show = function () {\n // show frame containing the items\n if (!this.dom.frame.parentNode) {\n this.body.dom.center.appendChild(this.dom.frame);\n }\n };\n /**\n * Set items\n * @param {vis.DataSet | null} items\n */\n\n\n LineGraph.prototype.setItems = function (items) {\n var me = this,\n ids,\n oldItemsData = this.itemsData; // replace the dataset\n\n if (!items) {\n this.itemsData = null;\n } else if (items instanceof DataSet || items instanceof DataView) {\n this.itemsData = items;\n } else {\n throw new TypeError('Data must be an instance of DataSet or DataView');\n }\n\n if (oldItemsData) {\n // unsubscribe from old dataset\n util.forEach(this.itemListeners, function (callback, event) {\n oldItemsData.off(event, callback);\n }); // remove all drawn items\n\n ids = oldItemsData.getIds();\n\n this._onRemove(ids);\n }\n\n if (this.itemsData) {\n // subscribe to new dataset\n var id = this.id;\n util.forEach(this.itemListeners, function (callback, event) {\n me.itemsData.on(event, callback, id);\n }); // add all new items\n\n ids = this.itemsData.getIds();\n\n this._onAdd(ids);\n }\n };\n /**\n * Set groups\n * @param {vis.DataSet} groups\n */\n\n\n LineGraph.prototype.setGroups = function (groups) {\n var me = this;\n var ids; // unsubscribe from current dataset\n\n if (this.groupsData) {\n util.forEach(this.groupListeners, function (callback, event) {\n me.groupsData.off(event, callback);\n }); // remove all drawn groups\n\n ids = this.groupsData.getIds();\n this.groupsData = null;\n\n for (var i = 0; i < ids.length; i++) {\n this._removeGroup(ids[i]);\n }\n } // replace the dataset\n\n\n if (!groups) {\n this.groupsData = null;\n } else if (groups instanceof DataSet || groups instanceof DataView) {\n this.groupsData = groups;\n } else {\n throw new TypeError('Data must be an instance of DataSet or DataView');\n }\n\n if (this.groupsData) {\n // subscribe to new dataset\n var id = this.id;\n util.forEach(this.groupListeners, function (callback, event) {\n me.groupsData.on(event, callback, id);\n }); // draw all ms\n\n ids = this.groupsData.getIds();\n\n this._onAddGroups(ids);\n }\n };\n\n LineGraph.prototype._onUpdate = function (ids) {\n this._updateAllGroupData(ids);\n };\n\n LineGraph.prototype._onAdd = function (ids) {\n this._onUpdate(ids);\n };\n\n LineGraph.prototype._onRemove = function (ids) {\n this._onUpdate(ids);\n };\n\n LineGraph.prototype._onUpdateGroups = function (groupIds) {\n this._updateAllGroupData(null, groupIds);\n };\n\n LineGraph.prototype._onAddGroups = function (groupIds) {\n this._onUpdateGroups(groupIds);\n };\n /**\n * this cleans the group out off the legends and the dataaxis, updates the ungrouped and updates the graph\n * @param {Array} groupIds\n * @private\n */\n\n\n LineGraph.prototype._onRemoveGroups = function (groupIds) {\n for (var i = 0; i < groupIds.length; i++) {\n this._removeGroup(groupIds[i]);\n }\n\n this.forceGraphUpdate = true;\n this.body.emitter.emit(\"_change\", {\n queue: true\n });\n };\n /**\n * this cleans the group out off the legends and the dataaxis\n * @param groupId\n * @private\n */\n\n\n LineGraph.prototype._removeGroup = function (groupId) {\n if (this.groups.hasOwnProperty(groupId)) {\n if (this.groups[groupId].options.yAxisOrientation == 'right') {\n this.yAxisRight.removeGroup(groupId);\n this.legendRight.removeGroup(groupId);\n this.legendRight.redraw();\n } else {\n this.yAxisLeft.removeGroup(groupId);\n this.legendLeft.removeGroup(groupId);\n this.legendLeft.redraw();\n }\n\n delete this.groups[groupId];\n }\n };\n /**\n * update a group object with the group dataset entree\n *\n * @param group\n * @param groupId\n * @private\n */\n\n\n LineGraph.prototype._updateGroup = function (group, groupId) {\n if (!this.groups.hasOwnProperty(groupId)) {\n this.groups[groupId] = new GraphGroup(group, groupId, this.options, this.groupsUsingDefaultStyles);\n\n if (this.groups[groupId].options.yAxisOrientation == 'right') {\n this.yAxisRight.addGroup(groupId, this.groups[groupId]);\n this.legendRight.addGroup(groupId, this.groups[groupId]);\n } else {\n this.yAxisLeft.addGroup(groupId, this.groups[groupId]);\n this.legendLeft.addGroup(groupId, this.groups[groupId]);\n }\n } else {\n this.groups[groupId].update(group);\n\n if (this.groups[groupId].options.yAxisOrientation == 'right') {\n this.yAxisRight.updateGroup(groupId, this.groups[groupId]);\n this.legendRight.updateGroup(groupId, this.groups[groupId]); //If yAxisOrientation changed, clean out the group from the other axis.\n\n this.yAxisLeft.removeGroup(groupId);\n this.legendLeft.removeGroup(groupId);\n } else {\n this.yAxisLeft.updateGroup(groupId, this.groups[groupId]);\n this.legendLeft.updateGroup(groupId, this.groups[groupId]); //If yAxisOrientation changed, clean out the group from the other axis.\n\n this.yAxisRight.removeGroup(groupId);\n this.legendRight.removeGroup(groupId);\n }\n }\n\n this.legendLeft.redraw();\n this.legendRight.redraw();\n };\n /**\n * this updates all groups, it is used when there is an update the the itemset.\n *\n * @param {Array} ids\n * @param {Array} groupIds\n * @private\n */\n\n\n LineGraph.prototype._updateAllGroupData = function (ids, groupIds) {\n if (this.itemsData != null) {\n var groupsContent = {};\n var items = this.itemsData.get();\n var fieldId = this.itemsData._fieldId;\n var idMap = {};\n\n if (ids) {\n ids.map(function (id) {\n idMap[id] = id;\n });\n } //pre-Determine array sizes, for more efficient memory claim\n\n\n var groupCounts = {};\n\n for (var i = 0; i < items.length; i++) {\n var item = items[i];\n var groupId = item.group;\n\n if (groupId === null || groupId === undefined) {\n groupId = UNGROUPED;\n }\n\n groupCounts.hasOwnProperty(groupId) ? groupCounts[groupId]++ : groupCounts[groupId] = 1;\n } //Pre-load arrays from existing groups if items are not changed (not in ids)\n\n\n if (!groupIds && ids) {\n for (var groupId in this.groups) {\n if (this.groups.hasOwnProperty(groupId)) {\n var group = this.groups[groupId];\n var existing_items = group.getItems();\n groupsContent[groupId] = existing_items.filter(function (item) {\n return item[fieldId] !== idMap[item[fieldId]];\n });\n var newLength = groupCounts[groupId];\n groupCounts[groupId] -= groupsContent[groupId].length;\n\n if (groupsContent[groupId].length < newLength) {\n groupsContent[groupId][newLength - 1] = {};\n }\n }\n }\n } //Now insert data into the arrays.\n\n\n for (var i = 0; i < items.length; i++) {\n var item = items[i];\n var groupId = item.group;\n\n if (groupId === null || groupId === undefined) {\n groupId = UNGROUPED;\n }\n\n if (!groupIds && ids && item[fieldId] !== idMap[item[fieldId]]) {\n continue;\n }\n\n if (!groupsContent.hasOwnProperty(groupId)) {\n groupsContent[groupId] = new Array(groupCounts[groupId]);\n } //Copy data (because of unmodifiable DataView input.\n\n\n var extended = util.bridgeObject(item);\n extended.x = util.convert(item.x, 'Date');\n extended.end = util.convert(item.end, 'Date');\n extended.orginalY = item.y; //real Y\n\n extended.y = Number(item.y);\n extended[fieldId] = item[fieldId];\n var index = groupsContent[groupId].length - groupCounts[groupId]--;\n groupsContent[groupId][index] = extended;\n } //Make sure all groups are present, to allow removal of old groups\n\n\n for (var groupId in this.groups) {\n if (this.groups.hasOwnProperty(groupId)) {\n if (!groupsContent.hasOwnProperty(groupId)) {\n groupsContent[groupId] = new Array(0);\n }\n }\n } //Update legendas, style and axis\n\n\n for (var groupId in groupsContent) {\n if (groupsContent.hasOwnProperty(groupId)) {\n if (groupsContent[groupId].length == 0) {\n if (this.groups.hasOwnProperty(groupId)) {\n this._removeGroup(groupId);\n }\n } else {\n var group = undefined;\n\n if (this.groupsData != undefined) {\n group = this.groupsData.get(groupId);\n }\n\n if (group == undefined) {\n group = {\n id: groupId,\n content: this.options.defaultGroup + groupId\n };\n }\n\n this._updateGroup(group, groupId);\n\n this.groups[groupId].setItems(groupsContent[groupId]);\n }\n }\n }\n\n this.forceGraphUpdate = true;\n this.body.emitter.emit(\"_change\", {\n queue: true\n });\n }\n };\n /**\n * Redraw the component, mandatory function\n * @return {boolean} Returns true if the component is resized\n */\n\n\n LineGraph.prototype.redraw = function () {\n var resized = false; // calculate actual size and position\n\n this.props.width = this.dom.frame.offsetWidth;\n this.props.height = this.body.domProps.centerContainer.height - this.body.domProps.border.top - this.body.domProps.border.bottom; // check if this component is resized\n\n resized = this._isResized() || resized; // check whether zoomed (in that case we need to re-stack everything)\n\n var visibleInterval = this.body.range.end - this.body.range.start;\n var zoomed = visibleInterval != this.lastVisibleInterval;\n this.lastVisibleInterval = visibleInterval; // the svg element is three times as big as the width, this allows for fully dragging left and right\n // without reloading the graph. the controls for this are bound to events in the constructor\n\n if (resized == true) {\n this.svg.style.width = util.option.asSize(3 * this.props.width);\n this.svg.style.left = util.option.asSize(-this.props.width); // if the height of the graph is set as proportional, change the height of the svg\n\n if ((this.options.height + '').indexOf(\"%\") != -1 || this.updateSVGheightOnResize == true) {\n this.updateSVGheight = true;\n }\n } // update the height of the graph on each redraw of the graph.\n\n\n if (this.updateSVGheight == true) {\n if (this.options.graphHeight != this.props.height + 'px') {\n this.options.graphHeight = this.props.height + 'px';\n this.svg.style.height = this.props.height + 'px';\n }\n\n this.updateSVGheight = false;\n } else {\n this.svg.style.height = ('' + this.options.graphHeight).replace('px', '') + 'px';\n } // zoomed is here to ensure that animations are shown correctly.\n\n\n if (resized == true || zoomed == true || this.abortedGraphUpdate == true || this.forceGraphUpdate == true) {\n resized = this._updateGraph() || resized;\n this.forceGraphUpdate = false;\n } else {\n // move the whole svg while dragging\n if (this.lastStart != 0) {\n var offset = this.body.range.start - this.lastStart;\n var range = this.body.range.end - this.body.range.start;\n\n if (this.props.width != 0) {\n var rangePerPixelInv = this.props.width / range;\n var xOffset = offset * rangePerPixelInv;\n this.svg.style.left = -this.props.width - xOffset + 'px';\n }\n }\n }\n\n this.legendLeft.redraw();\n this.legendRight.redraw();\n return resized;\n };\n\n LineGraph.prototype._getSortedGroupIds = function () {\n // getting group Ids\n var grouplist = [];\n\n for (var groupId in this.groups) {\n if (this.groups.hasOwnProperty(groupId)) {\n var group = this.groups[groupId];\n\n if (group.visible == true && (this.options.groups.visibility[groupId] === undefined || this.options.groups.visibility[groupId] == true)) {\n grouplist.push({\n id: groupId,\n zIndex: group.options.zIndex\n });\n }\n }\n }\n\n util.insertSort(grouplist, function (a, b) {\n var az = a.zIndex;\n var bz = b.zIndex;\n if (az === undefined) az = 0;\n if (bz === undefined) bz = 0;\n return az == bz ? 0 : az < bz ? -1 : 1;\n });\n var groupIds = new Array(grouplist.length);\n\n for (var i = 0; i < grouplist.length; i++) {\n groupIds[i] = grouplist[i].id;\n }\n\n return groupIds;\n };\n /**\n * Update and redraw the graph.\n *\n */\n\n\n LineGraph.prototype._updateGraph = function () {\n // reset the svg elements\n DOMutil.prepareElements(this.svgElements);\n\n if (this.props.width != 0 && this.itemsData != null) {\n var group, i;\n var groupRanges = {};\n var changeCalled = false; // this is the range of the SVG canvas\n\n var minDate = this.body.util.toGlobalTime(-this.body.domProps.root.width);\n var maxDate = this.body.util.toGlobalTime(2 * this.body.domProps.root.width); // getting group Ids\n\n var groupIds = this._getSortedGroupIds();\n\n if (groupIds.length > 0) {\n var groupsData = {}; // fill groups data, this only loads the data we require based on the timewindow\n\n this._getRelevantData(groupIds, groupsData, minDate, maxDate); // apply sampling, if disabled, it will pass through this function.\n\n\n this._applySampling(groupIds, groupsData); // we transform the X coordinates to detect collisions\n\n\n for (i = 0; i < groupIds.length; i++) {\n this._convertXcoordinates(groupsData[groupIds[i]]);\n } // now all needed data has been collected we start the processing.\n\n\n this._getYRanges(groupIds, groupsData, groupRanges); // update the Y axis first, we use this data to draw at the correct Y points\n\n\n changeCalled = this._updateYAxis(groupIds, groupRanges); // at changeCalled, abort this update cycle as the graph needs another update with new Width input from the Redraw container.\n // Cleanup SVG elements on abort.\n\n if (changeCalled == true) {\n DOMutil.cleanupElements(this.svgElements);\n this.abortedGraphUpdate = true;\n return true;\n }\n\n this.abortedGraphUpdate = false; // With the yAxis scaled correctly, use this to get the Y values of the points.\n\n var below = undefined;\n\n for (i = 0; i < groupIds.length; i++) {\n group = this.groups[groupIds[i]];\n\n if (this.options.stack === true && this.options.style === 'line') {\n if (group.options.excludeFromStacking == undefined || !group.options.excludeFromStacking) {\n if (below != undefined) {\n this._stack(groupsData[group.id], groupsData[below.id]);\n\n if (group.options.shaded.enabled == true && group.options.shaded.orientation !== \"group\") {\n if (group.options.shaded.orientation == \"top\" && below.options.shaded.orientation !== \"group\") {\n below.options.shaded.orientation = \"group\";\n below.options.shaded.groupId = group.id;\n } else {\n group.options.shaded.orientation = \"group\";\n group.options.shaded.groupId = below.id;\n }\n }\n }\n\n below = group;\n }\n }\n\n this._convertYcoordinates(groupsData[groupIds[i]], group);\n } //Precalculate paths and draw shading if appropriate. This will make sure the shading is always behind any lines.\n\n\n var paths = {};\n\n for (i = 0; i < groupIds.length; i++) {\n group = this.groups[groupIds[i]];\n\n if (group.options.style === 'line' && group.options.shaded.enabled == true) {\n var dataset = groupsData[groupIds[i]];\n\n if (dataset == null || dataset.length == 0) {\n continue;\n }\n\n if (!paths.hasOwnProperty(groupIds[i])) {\n paths[groupIds[i]] = Lines.calcPath(dataset, group);\n }\n\n if (group.options.shaded.orientation === \"group\") {\n var subGroupId = group.options.shaded.groupId;\n\n if (groupIds.indexOf(subGroupId) === -1) {\n console.log(group.id + \": Unknown shading group target given:\" + subGroupId);\n continue;\n }\n\n if (!paths.hasOwnProperty(subGroupId)) {\n paths[subGroupId] = Lines.calcPath(groupsData[subGroupId], this.groups[subGroupId]);\n }\n\n Lines.drawShading(paths[groupIds[i]], group, paths[subGroupId], this.framework);\n } else {\n Lines.drawShading(paths[groupIds[i]], group, undefined, this.framework);\n }\n }\n } // draw the groups, calculating paths if still necessary.\n\n\n Bars.draw(groupIds, groupsData, this.framework);\n\n for (i = 0; i < groupIds.length; i++) {\n group = this.groups[groupIds[i]];\n\n if (groupsData[groupIds[i]].length > 0) {\n switch (group.options.style) {\n case \"line\":\n if (!paths.hasOwnProperty(groupIds[i])) {\n paths[groupIds[i]] = Lines.calcPath(groupsData[groupIds[i]], group);\n }\n\n Lines.draw(paths[groupIds[i]], group, this.framework);\n //explicit no break;\n\n case \"point\": //explicit no break;\n\n case \"points\":\n if (group.options.style == \"point\" || group.options.style == \"points\" || group.options.drawPoints.enabled == true) {\n Points.draw(groupsData[groupIds[i]], group, this.framework);\n }\n\n break;\n\n case \"bar\": // bar needs to be drawn enmasse\n //explicit no break\n\n default: //do nothing...\n\n }\n }\n }\n }\n } // cleanup unused svg elements\n\n\n DOMutil.cleanupElements(this.svgElements);\n return false;\n };\n\n LineGraph.prototype._stack = function (data, subData) {\n var index, dx, dy, subPrevPoint, subNextPoint;\n index = 0; // for each data point we look for a matching on in the set below\n\n for (var j = 0; j < data.length; j++) {\n subPrevPoint = undefined;\n subNextPoint = undefined; // we look for time matches or a before-after point\n\n for (var k = index; k < subData.length; k++) {\n // if times match exactly\n if (subData[k].x === data[j].x) {\n subPrevPoint = subData[k];\n subNextPoint = subData[k];\n index = k;\n break;\n } else if (subData[k].x > data[j].x) {\n // overshoot\n subNextPoint = subData[k];\n\n if (k == 0) {\n subPrevPoint = subNextPoint;\n } else {\n subPrevPoint = subData[k - 1];\n }\n\n index = k;\n break;\n }\n } // in case the last data point has been used, we assume it stays like this.\n\n\n if (subNextPoint === undefined) {\n subPrevPoint = subData[subData.length - 1];\n subNextPoint = subData[subData.length - 1];\n } // linear interpolation\n\n\n dx = subNextPoint.x - subPrevPoint.x;\n dy = subNextPoint.y - subPrevPoint.y;\n\n if (dx == 0) {\n data[j].y = data[j].orginalY + subNextPoint.y;\n } else {\n data[j].y = data[j].orginalY + dy / dx * (data[j].x - subPrevPoint.x) + subPrevPoint.y; // ax + b where b is data[j].y\n }\n }\n };\n /**\n * first select and preprocess the data from the datasets.\n * the groups have their preselection of data, we now loop over this data to see\n * what data we need to draw. Sorted data is much faster.\n * more optimization is possible by doing the sampling before and using the binary search\n * to find the end date to determine the increment.\n *\n * @param {array} groupIds\n * @param {object} groupsData\n * @param {date} minDate\n * @param {date} maxDate\n * @private\n */\n\n\n LineGraph.prototype._getRelevantData = function (groupIds, groupsData, minDate, maxDate) {\n var group, i, j, item;\n\n if (groupIds.length > 0) {\n for (i = 0; i < groupIds.length; i++) {\n group = this.groups[groupIds[i]];\n var itemsData = group.getItems(); // optimization for sorted data\n\n if (group.options.sort == true) {\n var dateComparator = function dateComparator(a, b) {\n return a.getTime() == b.getTime() ? 0 : a < b ? -1 : 1;\n };\n\n var first = Math.max(0, util.binarySearchValue(itemsData, minDate, 'x', 'before', dateComparator));\n var last = Math.min(itemsData.length, util.binarySearchValue(itemsData, maxDate, 'x', 'after', dateComparator) + 1);\n\n if (last <= 0) {\n last = itemsData.length;\n }\n\n var dataContainer = new Array(last - first);\n\n for (j = first; j < last; j++) {\n item = group.itemsData[j];\n dataContainer[j - first] = item;\n }\n\n groupsData[groupIds[i]] = dataContainer;\n } else {\n // If unsorted data, all data is relevant, just returning entire structure\n groupsData[groupIds[i]] = group.itemsData;\n }\n }\n }\n };\n /**\n *\n * @param groupIds\n * @param groupsData\n * @private\n */\n\n\n LineGraph.prototype._applySampling = function (groupIds, groupsData) {\n var group;\n\n if (groupIds.length > 0) {\n for (var i = 0; i < groupIds.length; i++) {\n group = this.groups[groupIds[i]];\n\n if (group.options.sampling == true) {\n var dataContainer = groupsData[groupIds[i]];\n\n if (dataContainer.length > 0) {\n var increment = 1;\n var amountOfPoints = dataContainer.length; // the global screen is used because changing the width of the yAxis may affect the increment, resulting in an endless loop\n // of width changing of the yAxis.\n //TODO: This assumes sorted data, but that's not guaranteed!\n\n var xDistance = this.body.util.toGlobalScreen(dataContainer[dataContainer.length - 1].x) - this.body.util.toGlobalScreen(dataContainer[0].x);\n var pointsPerPixel = amountOfPoints / xDistance;\n increment = Math.min(Math.ceil(0.2 * amountOfPoints), Math.max(1, Math.round(pointsPerPixel)));\n var sampledData = new Array(amountOfPoints);\n\n for (var j = 0; j < amountOfPoints; j += increment) {\n var idx = Math.round(j / increment);\n sampledData[idx] = dataContainer[j];\n }\n\n groupsData[groupIds[i]] = sampledData.splice(0, Math.round(amountOfPoints / increment));\n }\n }\n }\n }\n };\n /**\n *\n *\n * @param {array} groupIds\n * @param {object} groupsData\n * @param {object} groupRanges | this is being filled here\n * @private\n */\n\n\n LineGraph.prototype._getYRanges = function (groupIds, groupsData, groupRanges) {\n var groupData, group, i;\n var combinedDataLeft = [];\n var combinedDataRight = [];\n var options;\n\n if (groupIds.length > 0) {\n for (i = 0; i < groupIds.length; i++) {\n groupData = groupsData[groupIds[i]];\n options = this.groups[groupIds[i]].options;\n\n if (groupData.length > 0) {\n group = this.groups[groupIds[i]]; // if bar graphs are stacked, their range need to be handled differently and accumulated over all groups.\n\n if (options.stack === true && options.style === 'bar') {\n if (options.yAxisOrientation === 'left') {\n combinedDataLeft = combinedDataLeft.concat(groupData);\n } else {\n combinedDataRight = combinedDataRight.concat(groupData);\n }\n } else {\n groupRanges[groupIds[i]] = group.getYRange(groupData, groupIds[i]);\n }\n }\n } // if bar graphs are stacked, their range need to be handled differently and accumulated over all groups.\n\n\n Bars.getStackedYRange(combinedDataLeft, groupRanges, groupIds, '__barStackLeft', 'left');\n Bars.getStackedYRange(combinedDataRight, groupRanges, groupIds, '__barStackRight', 'right');\n }\n };\n /**\n * this sets the Y ranges for the Y axis. It also determines which of the axis should be shown or hidden.\n * @param {Array} groupIds\n * @param {Object} groupRanges\n * @private\n */\n\n\n LineGraph.prototype._updateYAxis = function (groupIds, groupRanges) {\n var resized = false;\n var yAxisLeftUsed = false;\n var yAxisRightUsed = false;\n var minLeft = 1e9,\n minRight = 1e9,\n maxLeft = -1e9,\n maxRight = -1e9,\n minVal,\n maxVal; // if groups are present\n\n if (groupIds.length > 0) {\n // this is here to make sure that if there are no items in the axis but there are groups, that there is no infinite draw/redraw loop.\n for (var i = 0; i < groupIds.length; i++) {\n var group = this.groups[groupIds[i]];\n\n if (group && group.options.yAxisOrientation != 'right') {\n yAxisLeftUsed = true;\n minLeft = 1e9;\n maxLeft = -1e9;\n } else if (group && group.options.yAxisOrientation) {\n yAxisRightUsed = true;\n minRight = 1e9;\n maxRight = -1e9;\n }\n } // if there are items:\n\n\n for (var i = 0; i < groupIds.length; i++) {\n if (groupRanges.hasOwnProperty(groupIds[i])) {\n if (groupRanges[groupIds[i]].ignore !== true) {\n minVal = groupRanges[groupIds[i]].min;\n maxVal = groupRanges[groupIds[i]].max;\n\n if (groupRanges[groupIds[i]].yAxisOrientation != 'right') {\n yAxisLeftUsed = true;\n minLeft = minLeft > minVal ? minVal : minLeft;\n maxLeft = maxLeft < maxVal ? maxVal : maxLeft;\n } else {\n yAxisRightUsed = true;\n minRight = minRight > minVal ? minVal : minRight;\n maxRight = maxRight < maxVal ? maxVal : maxRight;\n }\n }\n }\n }\n\n if (yAxisLeftUsed == true) {\n this.yAxisLeft.setRange(minLeft, maxLeft);\n }\n\n if (yAxisRightUsed == true) {\n this.yAxisRight.setRange(minRight, maxRight);\n }\n }\n\n resized = this._toggleAxisVisiblity(yAxisLeftUsed, this.yAxisLeft) || resized;\n resized = this._toggleAxisVisiblity(yAxisRightUsed, this.yAxisRight) || resized;\n\n if (yAxisRightUsed == true && yAxisLeftUsed == true) {\n this.yAxisLeft.drawIcons = true;\n this.yAxisRight.drawIcons = true;\n } else {\n this.yAxisLeft.drawIcons = false;\n this.yAxisRight.drawIcons = false;\n }\n\n this.yAxisRight.master = !yAxisLeftUsed;\n this.yAxisRight.masterAxis = this.yAxisLeft;\n\n if (this.yAxisRight.master == false) {\n if (yAxisRightUsed == true) {\n this.yAxisLeft.lineOffset = this.yAxisRight.width;\n } else {\n this.yAxisLeft.lineOffset = 0;\n }\n\n resized = this.yAxisLeft.redraw() || resized;\n resized = this.yAxisRight.redraw() || resized;\n } else {\n resized = this.yAxisRight.redraw() || resized;\n } // clean the accumulated lists\n\n\n var tempGroups = ['__barStackLeft', '__barStackRight', '__lineStackLeft', '__lineStackRight'];\n\n for (var i = 0; i < tempGroups.length; i++) {\n if (groupIds.indexOf(tempGroups[i]) != -1) {\n groupIds.splice(groupIds.indexOf(tempGroups[i]), 1);\n }\n }\n\n return resized;\n };\n /**\n * This shows or hides the Y axis if needed. If there is a change, the changed event is emitted by the updateYAxis function\n *\n * @param {boolean} axisUsed\n * @returns {boolean}\n * @private\n * @param axis\n */\n\n\n LineGraph.prototype._toggleAxisVisiblity = function (axisUsed, axis) {\n var changed = false;\n\n if (axisUsed == false) {\n if (axis.dom.frame.parentNode && axis.hidden == false) {\n axis.hide();\n changed = true;\n }\n } else {\n if (!axis.dom.frame.parentNode && axis.hidden == true) {\n axis.show();\n changed = true;\n }\n }\n\n return changed;\n };\n /**\n * This uses the DataAxis object to generate the correct X coordinate on the SVG window. It uses the\n * util function toScreen to get the x coordinate from the timestamp. It also pre-filters the data and get the minMax ranges for\n * the yAxis.\n *\n * @param datapoints\n * @returns {Array}\n * @private\n */\n\n\n LineGraph.prototype._convertXcoordinates = function (datapoints) {\n var toScreen = this.body.util.toScreen;\n\n for (var i = 0; i < datapoints.length; i++) {\n datapoints[i].screen_x = toScreen(datapoints[i].x) + this.props.width;\n datapoints[i].screen_y = datapoints[i].y; //starting point for range calculations\n\n if (datapoints[i].end != undefined) {\n datapoints[i].screen_end = toScreen(datapoints[i].end) + this.props.width;\n } else {\n datapoints[i].screen_end = undefined;\n }\n }\n };\n /**\n * This uses the DataAxis object to generate the correct X coordinate on the SVG window. It uses the\n * util function toScreen to get the x coordinate from the timestamp. It also pre-filters the data and get the minMax ranges for\n * the yAxis.\n *\n * @param datapoints\n * @param group\n * @returns {Array}\n * @private\n */\n\n\n LineGraph.prototype._convertYcoordinates = function (datapoints, group) {\n var axis = this.yAxisLeft;\n var svgHeight = Number(this.svg.style.height.replace('px', ''));\n\n if (group.options.yAxisOrientation == 'right') {\n axis = this.yAxisRight;\n }\n\n for (var i = 0; i < datapoints.length; i++) {\n datapoints[i].screen_y = Math.round(axis.convertValue(datapoints[i].y));\n }\n\n group.setZeroPosition(Math.min(svgHeight, axis.convertValue(0)));\n };\n\n module.exports = LineGraph;\n /***/\n },\n /* 150 */\n\n /***/\n function (module, exports, __webpack_require__) {\n 'use strict';\n\n var _keys = __webpack_require__(58);\n\n var _keys2 = _interopRequireDefault(_keys);\n\n function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n 'default': obj\n };\n }\n\n var util = __webpack_require__(1);\n\n var DOMutil = __webpack_require__(88);\n\n var Component = __webpack_require__(128);\n\n var DataScale = __webpack_require__(151);\n /**\n * A horizontal time axis\n * @param {Object} [options] See DataAxis.setOptions for the available\n * options.\n * @constructor DataAxis\n * @extends Component\n * @param body\n */\n\n\n function DataAxis(body, options, svg, linegraphOptions) {\n this.id = util.randomUUID();\n this.body = body;\n this.defaultOptions = {\n orientation: 'left',\n // supported: 'left', 'right'\n showMinorLabels: true,\n showMajorLabels: true,\n icons: false,\n majorLinesOffset: 7,\n minorLinesOffset: 4,\n labelOffsetX: 10,\n labelOffsetY: 2,\n iconWidth: 20,\n width: '40px',\n visible: true,\n alignZeros: true,\n left: {\n range: {\n min: undefined,\n max: undefined\n },\n format: function format(value) {\n return '' + parseFloat(value.toPrecision(3));\n },\n title: {\n text: undefined,\n style: undefined\n }\n },\n right: {\n range: {\n min: undefined,\n max: undefined\n },\n format: function format(value) {\n return '' + parseFloat(value.toPrecision(3));\n },\n title: {\n text: undefined,\n style: undefined\n }\n }\n };\n this.linegraphOptions = linegraphOptions;\n this.linegraphSVG = svg;\n this.props = {};\n this.DOMelements = {\n // dynamic elements\n lines: {},\n labels: {},\n title: {}\n };\n this.dom = {};\n this.scale = undefined;\n this.range = {\n start: 0,\n end: 0\n };\n this.options = util.extend({}, this.defaultOptions);\n this.conversionFactor = 1;\n this.setOptions(options);\n this.width = Number(('' + this.options.width).replace(\"px\", \"\"));\n this.minWidth = this.width;\n this.height = this.linegraphSVG.getBoundingClientRect().height;\n this.hidden = false;\n this.stepPixels = 25;\n this.zeroCrossing = -1;\n this.amountOfSteps = -1;\n this.lineOffset = 0;\n this.master = true;\n this.masterAxis = null;\n this.svgElements = {};\n this.iconsRemoved = false;\n this.groups = {};\n this.amountOfGroups = 0; // create the HTML DOM\n\n this._create();\n\n this.framework = {\n svg: this.svg,\n svgElements: this.svgElements,\n options: this.options,\n groups: this.groups\n };\n var me = this;\n this.body.emitter.on(\"verticalDrag\", function () {\n me.dom.lineContainer.style.top = me.body.domProps.scrollTop + 'px';\n });\n }\n\n DataAxis.prototype = new Component();\n\n DataAxis.prototype.addGroup = function (label, graphOptions) {\n if (!this.groups.hasOwnProperty(label)) {\n this.groups[label] = graphOptions;\n }\n\n this.amountOfGroups += 1;\n };\n\n DataAxis.prototype.updateGroup = function (label, graphOptions) {\n if (!this.groups.hasOwnProperty(label)) {\n this.amountOfGroups += 1;\n }\n\n this.groups[label] = graphOptions;\n };\n\n DataAxis.prototype.removeGroup = function (label) {\n if (this.groups.hasOwnProperty(label)) {\n delete this.groups[label];\n this.amountOfGroups -= 1;\n }\n };\n\n DataAxis.prototype.setOptions = function (options) {\n if (options) {\n var redraw = false;\n\n if (this.options.orientation != options.orientation && options.orientation !== undefined) {\n redraw = true;\n }\n\n var fields = ['orientation', 'showMinorLabels', 'showMajorLabels', 'icons', 'majorLinesOffset', 'minorLinesOffset', 'labelOffsetX', 'labelOffsetY', 'iconWidth', 'width', 'visible', 'left', 'right', 'alignZeros'];\n util.selectiveDeepExtend(fields, this.options, options);\n this.minWidth = Number(('' + this.options.width).replace(\"px\", \"\"));\n\n if (redraw === true && this.dom.frame) {\n this.hide();\n this.show();\n }\n }\n };\n /**\n * Create the HTML DOM for the DataAxis\n */\n\n\n DataAxis.prototype._create = function () {\n this.dom.frame = document.createElement('div');\n this.dom.frame.style.width = this.options.width;\n this.dom.frame.style.height = this.height;\n this.dom.lineContainer = document.createElement('div');\n this.dom.lineContainer.style.width = '100%';\n this.dom.lineContainer.style.height = this.height;\n this.dom.lineContainer.style.position = 'relative'; // create svg element for graph drawing.\n\n this.svg = document.createElementNS('http://www.w3.org/2000/svg', \"svg\");\n this.svg.style.position = \"absolute\";\n this.svg.style.top = '0px';\n this.svg.style.height = '100%';\n this.svg.style.width = '100%';\n this.svg.style.display = \"block\";\n this.dom.frame.appendChild(this.svg);\n };\n\n DataAxis.prototype._redrawGroupIcons = function () {\n DOMutil.prepareElements(this.svgElements);\n var x;\n var iconWidth = this.options.iconWidth;\n var iconHeight = 15;\n var iconOffset = 4;\n var y = iconOffset + 0.5 * iconHeight;\n\n if (this.options.orientation === 'left') {\n x = iconOffset;\n } else {\n x = this.width - iconWidth - iconOffset;\n }\n\n var groupArray = (0, _keys2['default'])(this.groups);\n groupArray.sort(function (a, b) {\n return a < b ? -1 : 1;\n });\n\n for (var i = 0; i < groupArray.length; i++) {\n var groupId = groupArray[i];\n\n if (this.groups[groupId].visible === true && (this.linegraphOptions.visibility[groupId] === undefined || this.linegraphOptions.visibility[groupId] === true)) {\n this.groups[groupId].getLegend(iconWidth, iconHeight, this.framework, x, y);\n y += iconHeight + iconOffset;\n }\n }\n\n DOMutil.cleanupElements(this.svgElements);\n this.iconsRemoved = false;\n };\n\n DataAxis.prototype._cleanupIcons = function () {\n if (this.iconsRemoved === false) {\n DOMutil.prepareElements(this.svgElements);\n DOMutil.cleanupElements(this.svgElements);\n this.iconsRemoved = true;\n }\n };\n /**\n * Create the HTML DOM for the DataAxis\n */\n\n\n DataAxis.prototype.show = function () {\n this.hidden = false;\n\n if (!this.dom.frame.parentNode) {\n if (this.options.orientation === 'left') {\n this.body.dom.left.appendChild(this.dom.frame);\n } else {\n this.body.dom.right.appendChild(this.dom.frame);\n }\n }\n\n if (!this.dom.lineContainer.parentNode) {\n this.body.dom.backgroundHorizontal.appendChild(this.dom.lineContainer);\n }\n };\n /**\n * Create the HTML DOM for the DataAxis\n */\n\n\n DataAxis.prototype.hide = function () {\n this.hidden = true;\n\n if (this.dom.frame.parentNode) {\n this.dom.frame.parentNode.removeChild(this.dom.frame);\n }\n\n if (this.dom.lineContainer.parentNode) {\n this.dom.lineContainer.parentNode.removeChild(this.dom.lineContainer);\n }\n };\n /**\n * Set a range (start and end)\n * @param end\n * @param start\n * @param end\n */\n\n\n DataAxis.prototype.setRange = function (start, end) {\n this.range.start = start;\n this.range.end = end;\n };\n /**\n * Repaint the component\n * @return {boolean} Returns true if the component is resized\n */\n\n\n DataAxis.prototype.redraw = function () {\n var resized = false;\n var activeGroups = 0; // Make sure the line container adheres to the vertical scrolling.\n\n this.dom.lineContainer.style.top = this.body.domProps.scrollTop + 'px';\n\n for (var groupId in this.groups) {\n if (this.groups.hasOwnProperty(groupId)) {\n if (this.groups[groupId].visible === true && (this.linegraphOptions.visibility[groupId] === undefined || this.linegraphOptions.visibility[groupId] === true)) {\n activeGroups++;\n }\n }\n }\n\n if (this.amountOfGroups === 0 || activeGroups === 0) {\n this.hide();\n } else {\n this.show();\n this.height = Number(this.linegraphSVG.style.height.replace(\"px\", \"\")); // svg offsetheight did not work in firefox and explorer...\n\n this.dom.lineContainer.style.height = this.height + 'px';\n this.width = this.options.visible === true ? Number(('' + this.options.width).replace(\"px\", \"\")) : 0;\n var props = this.props;\n var frame = this.dom.frame; // update classname\n\n frame.className = 'vis-data-axis'; // calculate character width and height\n\n this._calculateCharSize();\n\n var orientation = this.options.orientation;\n var showMinorLabels = this.options.showMinorLabels;\n var showMajorLabels = this.options.showMajorLabels; // determine the width and height of the elements for the axis\n\n props.minorLabelHeight = showMinorLabels ? props.minorCharHeight : 0;\n props.majorLabelHeight = showMajorLabels ? props.majorCharHeight : 0;\n props.minorLineWidth = this.body.dom.backgroundHorizontal.offsetWidth - this.lineOffset - this.width + 2 * this.options.minorLinesOffset;\n props.minorLineHeight = 1;\n props.majorLineWidth = this.body.dom.backgroundHorizontal.offsetWidth - this.lineOffset - this.width + 2 * this.options.majorLinesOffset;\n props.majorLineHeight = 1; // take frame offline while updating (is almost twice as fast)\n\n if (orientation === 'left') {\n frame.style.top = '0';\n frame.style.left = '0';\n frame.style.bottom = '';\n frame.style.width = this.width + 'px';\n frame.style.height = this.height + \"px\";\n this.props.width = this.body.domProps.left.width;\n this.props.height = this.body.domProps.left.height;\n } else {\n // right\n frame.style.top = '';\n frame.style.bottom = '0';\n frame.style.left = '0';\n frame.style.width = this.width + 'px';\n frame.style.height = this.height + \"px\";\n this.props.width = this.body.domProps.right.width;\n this.props.height = this.body.domProps.right.height;\n }\n\n resized = this._redrawLabels();\n resized = this._isResized() || resized;\n\n if (this.options.icons === true) {\n this._redrawGroupIcons();\n } else {\n this._cleanupIcons();\n }\n\n this._redrawTitle(orientation);\n }\n\n return resized;\n };\n /**\n * Repaint major and minor text labels and vertical grid lines\n * @private\n */\n\n\n DataAxis.prototype._redrawLabels = function () {\n var _this = this;\n\n var resized = false;\n DOMutil.prepareElements(this.DOMelements.lines);\n DOMutil.prepareElements(this.DOMelements.labels);\n var orientation = this.options['orientation'];\n var customRange = this.options[orientation].range != undefined ? this.options[orientation].range : {}; //Override range with manual options:\n\n var autoScaleEnd = true;\n\n if (customRange.max != undefined) {\n this.range.end = customRange.max;\n autoScaleEnd = false;\n }\n\n var autoScaleStart = true;\n\n if (customRange.min != undefined) {\n this.range.start = customRange.min;\n autoScaleStart = false;\n }\n\n this.scale = new DataScale(this.range.start, this.range.end, autoScaleStart, autoScaleEnd, this.dom.frame.offsetHeight, this.props.majorCharHeight, this.options.alignZeros, this.options[orientation].format);\n\n if (this.master === false && this.masterAxis != undefined) {\n this.scale.followScale(this.masterAxis.scale);\n } //Is updated in side-effect of _redrawLabel():\n\n\n this.maxLabelSize = 0;\n var lines = this.scale.getLines();\n lines.forEach(function (line) {\n var y = line.y;\n var isMajor = line.major;\n\n if (_this.options['showMinorLabels'] && isMajor === false) {\n _this._redrawLabel(y - 2, line.val, orientation, 'vis-y-axis vis-minor', _this.props.minorCharHeight);\n }\n\n if (isMajor) {\n if (y >= 0) {\n _this._redrawLabel(y - 2, line.val, orientation, 'vis-y-axis vis-major', _this.props.majorCharHeight);\n }\n }\n\n if (_this.master === true) {\n if (isMajor) {\n _this._redrawLine(y, orientation, 'vis-grid vis-horizontal vis-major', _this.options.majorLinesOffset, _this.props.majorLineWidth);\n } else {\n _this._redrawLine(y, orientation, 'vis-grid vis-horizontal vis-minor', _this.options.minorLinesOffset, _this.props.minorLineWidth);\n }\n }\n }); // Note that title is rotated, so we're using the height, not width!\n\n var titleWidth = 0;\n\n if (this.options[orientation].title !== undefined && this.options[orientation].title.text !== undefined) {\n titleWidth = this.props.titleCharHeight;\n }\n\n var offset = this.options.icons === true ? Math.max(this.options.iconWidth, titleWidth) + this.options.labelOffsetX + 15 : titleWidth + this.options.labelOffsetX + 15; // this will resize the yAxis to accommodate the labels.\n\n if (this.maxLabelSize > this.width - offset && this.options.visible === true) {\n this.width = this.maxLabelSize + offset;\n this.options.width = this.width + \"px\";\n DOMutil.cleanupElements(this.DOMelements.lines);\n DOMutil.cleanupElements(this.DOMelements.labels);\n this.redraw();\n resized = true;\n } // this will resize the yAxis if it is too big for the labels.\n else if (this.maxLabelSize < this.width - offset && this.options.visible === true && this.width > this.minWidth) {\n this.width = Math.max(this.minWidth, this.maxLabelSize + offset);\n this.options.width = this.width + \"px\";\n DOMutil.cleanupElements(this.DOMelements.lines);\n DOMutil.cleanupElements(this.DOMelements.labels);\n this.redraw();\n resized = true;\n } else {\n DOMutil.cleanupElements(this.DOMelements.lines);\n DOMutil.cleanupElements(this.DOMelements.labels);\n resized = false;\n }\n\n return resized;\n };\n\n DataAxis.prototype.convertValue = function (value) {\n return this.scale.convertValue(value);\n };\n\n DataAxis.prototype.screenToValue = function (x) {\n return this.scale.screenToValue(x);\n };\n /**\n * Create a label for the axis at position x\n * @private\n * @param y\n * @param text\n * @param orientation\n * @param className\n * @param characterHeight\n */\n\n\n DataAxis.prototype._redrawLabel = function (y, text, orientation, className, characterHeight) {\n // reuse redundant label\n var label = DOMutil.getDOMElement('div', this.DOMelements.labels, this.dom.frame); //this.dom.redundant.labels.shift();\n\n label.className = className;\n label.innerHTML = text;\n\n if (orientation === 'left') {\n label.style.left = '-' + this.options.labelOffsetX + 'px';\n label.style.textAlign = \"right\";\n } else {\n label.style.right = '-' + this.options.labelOffsetX + 'px';\n label.style.textAlign = \"left\";\n }\n\n label.style.top = y - 0.5 * characterHeight + this.options.labelOffsetY + 'px';\n text += '';\n var largestWidth = Math.max(this.props.majorCharWidth, this.props.minorCharWidth);\n\n if (this.maxLabelSize < text.length * largestWidth) {\n this.maxLabelSize = text.length * largestWidth;\n }\n };\n /**\n * Create a minor line for the axis at position y\n * @param y\n * @param orientation\n * @param className\n * @param offset\n * @param width\n */\n\n\n DataAxis.prototype._redrawLine = function (y, orientation, className, offset, width) {\n if (this.master === true) {\n var line = DOMutil.getDOMElement('div', this.DOMelements.lines, this.dom.lineContainer); //this.dom.redundant.lines.shift();\n\n line.className = className;\n line.innerHTML = '';\n\n if (orientation === 'left') {\n line.style.left = this.width - offset + 'px';\n } else {\n line.style.right = this.width - offset + 'px';\n }\n\n line.style.width = width + 'px';\n line.style.top = y + 'px';\n }\n };\n /**\n * Create a title for the axis\n * @private\n * @param orientation\n */\n\n\n DataAxis.prototype._redrawTitle = function (orientation) {\n DOMutil.prepareElements(this.DOMelements.title); // Check if the title is defined for this axes\n\n if (this.options[orientation].title !== undefined && this.options[orientation].title.text !== undefined) {\n var title = DOMutil.getDOMElement('div', this.DOMelements.title, this.dom.frame);\n title.className = 'vis-y-axis vis-title vis-' + orientation;\n title.innerHTML = this.options[orientation].title.text; // Add style - if provided\n\n if (this.options[orientation].title.style !== undefined) {\n util.addCssText(title, this.options[orientation].title.style);\n }\n\n if (orientation === 'left') {\n title.style.left = this.props.titleCharHeight + 'px';\n } else {\n title.style.right = this.props.titleCharHeight + 'px';\n }\n\n title.style.width = this.height + 'px';\n } // we need to clean up in case we did not use all elements.\n\n\n DOMutil.cleanupElements(this.DOMelements.title);\n };\n /**\n * Determine the size of text on the axis (both major and minor axis).\n * The size is calculated only once and then cached in this.props.\n * @private\n */\n\n\n DataAxis.prototype._calculateCharSize = function () {\n // determine the char width and height on the minor axis\n if (!('minorCharHeight' in this.props)) {\n var textMinor = document.createTextNode('0');\n var measureCharMinor = document.createElement('div');\n measureCharMinor.className = 'vis-y-axis vis-minor vis-measure';\n measureCharMinor.appendChild(textMinor);\n this.dom.frame.appendChild(measureCharMinor);\n this.props.minorCharHeight = measureCharMinor.clientHeight;\n this.props.minorCharWidth = measureCharMinor.clientWidth;\n this.dom.frame.removeChild(measureCharMinor);\n }\n\n if (!('majorCharHeight' in this.props)) {\n var textMajor = document.createTextNode('0');\n var measureCharMajor = document.createElement('div');\n measureCharMajor.className = 'vis-y-axis vis-major vis-measure';\n measureCharMajor.appendChild(textMajor);\n this.dom.frame.appendChild(measureCharMajor);\n this.props.majorCharHeight = measureCharMajor.clientHeight;\n this.props.majorCharWidth = measureCharMajor.clientWidth;\n this.dom.frame.removeChild(measureCharMajor);\n }\n\n if (!('titleCharHeight' in this.props)) {\n var textTitle = document.createTextNode('0');\n var measureCharTitle = document.createElement('div');\n measureCharTitle.className = 'vis-y-axis vis-title vis-measure';\n measureCharTitle.appendChild(textTitle);\n this.dom.frame.appendChild(measureCharTitle);\n this.props.titleCharHeight = measureCharTitle.clientHeight;\n this.props.titleCharWidth = measureCharTitle.clientWidth;\n this.dom.frame.removeChild(measureCharTitle);\n }\n };\n\n module.exports = DataAxis;\n /***/\n },\n /* 151 */\n\n /***/\n function (module, exports) {\n 'use strict';\n /**\n * Created by ludo on 25-1-16.\n */\n\n function DataScale(start, end, autoScaleStart, autoScaleEnd, containerHeight, majorCharHeight) {\n var zeroAlign = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : false;\n var formattingFunction = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : false;\n this.majorSteps = [1, 2, 5, 10];\n this.minorSteps = [0.25, 0.5, 1, 2];\n this.customLines = null;\n this.containerHeight = containerHeight;\n this.majorCharHeight = majorCharHeight;\n this._start = start;\n this._end = end;\n this.scale = 1;\n this.minorStepIdx = -1;\n this.magnitudefactor = 1;\n this.determineScale();\n this.zeroAlign = zeroAlign;\n this.autoScaleStart = autoScaleStart;\n this.autoScaleEnd = autoScaleEnd;\n this.formattingFunction = formattingFunction;\n\n if (autoScaleStart || autoScaleEnd) {\n var me = this;\n\n var roundToMinor = function roundToMinor(value) {\n var rounded = value - value % (me.magnitudefactor * me.minorSteps[me.minorStepIdx]);\n\n if (value % (me.magnitudefactor * me.minorSteps[me.minorStepIdx]) > 0.5 * (me.magnitudefactor * me.minorSteps[me.minorStepIdx])) {\n return rounded + me.magnitudefactor * me.minorSteps[me.minorStepIdx];\n } else {\n return rounded;\n }\n };\n\n if (autoScaleStart) {\n this._start -= this.magnitudefactor * 2 * this.minorSteps[this.minorStepIdx];\n this._start = roundToMinor(this._start);\n }\n\n if (autoScaleEnd) {\n this._end += this.magnitudefactor * this.minorSteps[this.minorStepIdx];\n this._end = roundToMinor(this._end);\n }\n\n this.determineScale();\n }\n }\n\n DataScale.prototype.setCharHeight = function (majorCharHeight) {\n this.majorCharHeight = majorCharHeight;\n };\n\n DataScale.prototype.setHeight = function (containerHeight) {\n this.containerHeight = containerHeight;\n };\n\n DataScale.prototype.determineScale = function () {\n var range = this._end - this._start;\n this.scale = this.containerHeight / range;\n var minimumStepValue = this.majorCharHeight / this.scale;\n var orderOfMagnitude = range > 0 ? Math.round(Math.log(range) / Math.LN10) : 0;\n this.minorStepIdx = -1;\n this.magnitudefactor = Math.pow(10, orderOfMagnitude);\n var start = 0;\n\n if (orderOfMagnitude < 0) {\n start = orderOfMagnitude;\n }\n\n var solutionFound = false;\n\n for (var l = start; Math.abs(l) <= Math.abs(orderOfMagnitude); l++) {\n this.magnitudefactor = Math.pow(10, l);\n\n for (var j = 0; j < this.minorSteps.length; j++) {\n var stepSize = this.magnitudefactor * this.minorSteps[j];\n\n if (stepSize >= minimumStepValue) {\n solutionFound = true;\n this.minorStepIdx = j;\n break;\n }\n }\n\n if (solutionFound === true) {\n break;\n }\n }\n };\n\n DataScale.prototype.is_major = function (value) {\n return value % (this.magnitudefactor * this.majorSteps[this.minorStepIdx]) === 0;\n };\n\n DataScale.prototype.getStep = function () {\n return this.magnitudefactor * this.minorSteps[this.minorStepIdx];\n };\n\n DataScale.prototype.getFirstMajor = function () {\n var majorStep = this.magnitudefactor * this.majorSteps[this.minorStepIdx];\n return this.convertValue(this._start + (majorStep - this._start % majorStep) % majorStep);\n };\n\n DataScale.prototype.formatValue = function (current) {\n var returnValue = current.toPrecision(5);\n\n if (typeof this.formattingFunction === 'function') {\n returnValue = this.formattingFunction(current);\n }\n\n if (typeof returnValue === 'number') {\n return '' + returnValue;\n } else if (typeof returnValue === 'string') {\n return returnValue;\n } else {\n return current.toPrecision(5);\n }\n };\n\n DataScale.prototype.getLines = function () {\n var lines = [];\n var step = this.getStep();\n var bottomOffset = (step - this._start % step) % step;\n\n for (var i = this._start + bottomOffset; this._end - i > 0.00001; i += step) {\n if (i != this._start) {\n //Skip the bottom line\n lines.push({\n major: this.is_major(i),\n y: this.convertValue(i),\n val: this.formatValue(i)\n });\n }\n }\n\n return lines;\n };\n\n DataScale.prototype.followScale = function (other) {\n var oldStepIdx = this.minorStepIdx;\n var oldStart = this._start;\n var oldEnd = this._end;\n var me = this;\n\n var increaseMagnitude = function increaseMagnitude() {\n me.magnitudefactor *= 2;\n };\n\n var decreaseMagnitude = function decreaseMagnitude() {\n me.magnitudefactor /= 2;\n };\n\n if (other.minorStepIdx <= 1 && this.minorStepIdx <= 1 || other.minorStepIdx > 1 && this.minorStepIdx > 1) {//easy, no need to change stepIdx nor multiplication factor\n } else if (other.minorStepIdx < this.minorStepIdx) {\n //I'm 5, they are 4 per major.\n this.minorStepIdx = 1;\n\n if (oldStepIdx == 2) {\n increaseMagnitude();\n } else {\n increaseMagnitude();\n increaseMagnitude();\n }\n } else {\n //I'm 4, they are 5 per major\n this.minorStepIdx = 2;\n\n if (oldStepIdx == 1) {\n decreaseMagnitude();\n } else {\n decreaseMagnitude();\n decreaseMagnitude();\n }\n } //Get masters stats:\n\n\n var lines = other.getLines();\n var otherZero = other.convertValue(0);\n var otherStep = other.getStep() * other.scale;\n var done = false;\n var count = 0; //Loop until magnitude is correct for given constrains.\n\n while (!done && count++ < 5) {\n //Get my stats:\n this.scale = otherStep / (this.minorSteps[this.minorStepIdx] * this.magnitudefactor);\n var newRange = this.containerHeight / this.scale; //For the case the magnitudefactor has changed:\n\n this._start = oldStart;\n this._end = this._start + newRange;\n var myOriginalZero = this._end * this.scale;\n var majorStep = this.magnitudefactor * this.majorSteps[this.minorStepIdx];\n var majorOffset = this.getFirstMajor() - other.getFirstMajor();\n\n if (this.zeroAlign) {\n var zeroOffset = otherZero - myOriginalZero;\n this._end += zeroOffset / this.scale;\n this._start = this._end - newRange;\n } else {\n if (!this.autoScaleStart) {\n this._start += majorStep - majorOffset / this.scale;\n this._end = this._start + newRange;\n } else {\n this._start -= majorOffset / this.scale;\n this._end = this._start + newRange;\n }\n }\n\n if (!this.autoScaleEnd && this._end > oldEnd + 0.00001) {\n //Need to decrease magnitude to prevent scale overshoot! (end)\n decreaseMagnitude();\n done = false;\n continue;\n }\n\n if (!this.autoScaleStart && this._start < oldStart - 0.00001) {\n if (this.zeroAlign && oldStart >= 0) {\n console.warn(\"Can't adhere to given 'min' range, due to zeroalign\");\n } else {\n //Need to decrease magnitude to prevent scale overshoot! (start)\n decreaseMagnitude();\n done = false;\n continue;\n }\n }\n\n if (this.autoScaleStart && this.autoScaleEnd && newRange < oldEnd - oldStart) {\n increaseMagnitude();\n done = false;\n continue;\n }\n\n done = true;\n }\n };\n\n DataScale.prototype.convertValue = function (value) {\n return this.containerHeight - (value - this._start) * this.scale;\n };\n\n DataScale.prototype.screenToValue = function (pixels) {\n return (this.containerHeight - pixels) / this.scale + this._start;\n };\n\n module.exports = DataScale;\n /***/\n },\n /* 152 */\n\n /***/\n function (module, exports, __webpack_require__) {\n 'use strict';\n\n var _typeof2 = __webpack_require__(62);\n\n var _typeof3 = _interopRequireDefault(_typeof2);\n\n function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n 'default': obj\n };\n }\n\n var util = __webpack_require__(1);\n\n var DOMutil = __webpack_require__(88);\n\n var Bars = __webpack_require__(153);\n\n var Lines = __webpack_require__(155);\n\n var Points = __webpack_require__(154);\n /**\n * /**\n * @param {object} group | the object of the group from the dataset\n * @param {string} groupId | ID of the group\n * @param {object} options | the default options\n * @param {array} groupsUsingDefaultStyles | this array has one entree.\n * It is passed as an array so it is passed by reference.\n * It enumerates through the default styles\n * @constructor\n */\n\n\n function GraphGroup(group, groupId, options, groupsUsingDefaultStyles) {\n this.id = groupId;\n var fields = ['sampling', 'style', 'sort', 'yAxisOrientation', 'barChart', 'drawPoints', 'shaded', 'interpolation', 'zIndex', 'excludeFromStacking', 'excludeFromLegend'];\n this.options = util.selectiveBridgeObject(fields, options);\n this.usingDefaultStyle = group.className === undefined;\n this.groupsUsingDefaultStyles = groupsUsingDefaultStyles;\n this.zeroPosition = 0;\n this.update(group);\n\n if (this.usingDefaultStyle == true) {\n this.groupsUsingDefaultStyles[0] += 1;\n }\n\n this.itemsData = [];\n this.visible = group.visible === undefined ? true : group.visible;\n }\n /**\n * this loads a reference to all items in this group into this group.\n * @param {array} items\n */\n\n\n GraphGroup.prototype.setItems = function (items) {\n if (items != null) {\n this.itemsData = items;\n\n if (this.options.sort == true) {\n util.insertSort(this.itemsData, function (a, b) {\n return a.x > b.x ? 1 : -1;\n });\n }\n } else {\n this.itemsData = [];\n }\n };\n\n GraphGroup.prototype.getItems = function () {\n return this.itemsData;\n };\n /**\n * this is used for barcharts and shading, this way, we only have to calculate it once.\n * @param pos\n */\n\n\n GraphGroup.prototype.setZeroPosition = function (pos) {\n this.zeroPosition = pos;\n };\n /**\n * set the options of the graph group over the default options.\n * @param options\n */\n\n\n GraphGroup.prototype.setOptions = function (options) {\n if (options !== undefined) {\n var fields = ['sampling', 'style', 'sort', 'yAxisOrientation', 'barChart', 'zIndex', 'excludeFromStacking', 'excludeFromLegend'];\n util.selectiveDeepExtend(fields, this.options, options); // if the group's drawPoints is a function delegate the callback to the onRender property\n\n if (typeof options.drawPoints == 'function') {\n options.drawPoints = {\n onRender: options.drawPoints\n };\n }\n\n util.mergeOptions(this.options, options, 'interpolation');\n util.mergeOptions(this.options, options, 'drawPoints');\n util.mergeOptions(this.options, options, 'shaded');\n\n if (options.interpolation) {\n if ((0, _typeof3['default'])(options.interpolation) == 'object') {\n if (options.interpolation.parametrization) {\n if (options.interpolation.parametrization == 'uniform') {\n this.options.interpolation.alpha = 0;\n } else if (options.interpolation.parametrization == 'chordal') {\n this.options.interpolation.alpha = 1.0;\n } else {\n this.options.interpolation.parametrization = 'centripetal';\n this.options.interpolation.alpha = 0.5;\n }\n }\n }\n }\n }\n };\n /**\n * this updates the current group class with the latest group dataset entree, used in _updateGroup in linegraph\n * @param group\n */\n\n\n GraphGroup.prototype.update = function (group) {\n this.group = group;\n this.content = group.content || 'graph';\n this.className = group.className || this.className || 'vis-graph-group' + this.groupsUsingDefaultStyles[0] % 10;\n this.visible = group.visible === undefined ? true : group.visible;\n this.style = group.style;\n this.setOptions(group.options);\n };\n /**\n * return the legend entree for this group.\n *\n * @param iconWidth\n * @param iconHeight\n * @returns {{icon: HTMLElement, label: (group.content|*|string), orientation: (.options.yAxisOrientation|*)}}\n */\n\n\n GraphGroup.prototype.getLegend = function (iconWidth, iconHeight, framework, x, y) {\n if (framework == undefined || framework == null) {\n var svg = document.createElementNS('http://www.w3.org/2000/svg', \"svg\");\n framework = {\n svg: svg,\n svgElements: {},\n options: this.options,\n groups: [this]\n };\n }\n\n if (x == undefined || x == null) {\n x = 0;\n }\n\n if (y == undefined || y == null) {\n y = 0.5 * iconHeight;\n }\n\n switch (this.options.style) {\n case \"line\":\n Lines.drawIcon(this, x, y, iconWidth, iconHeight, framework);\n break;\n\n case \"points\": //explicit no break\n\n case \"point\":\n Points.drawIcon(this, x, y, iconWidth, iconHeight, framework);\n break;\n\n case \"bar\":\n Bars.drawIcon(this, x, y, iconWidth, iconHeight, framework);\n break;\n }\n\n return {\n icon: framework.svg,\n label: this.content,\n orientation: this.options.yAxisOrientation\n };\n };\n\n GraphGroup.prototype.getYRange = function (groupData) {\n var yMin = groupData[0].y;\n var yMax = groupData[0].y;\n\n for (var j = 0; j < groupData.length; j++) {\n yMin = yMin > groupData[j].y ? groupData[j].y : yMin;\n yMax = yMax < groupData[j].y ? groupData[j].y : yMax;\n }\n\n return {\n min: yMin,\n max: yMax,\n yAxisOrientation: this.options.yAxisOrientation\n };\n };\n\n module.exports = GraphGroup;\n /***/\n },\n /* 153 */\n\n /***/\n function (module, exports, __webpack_require__) {\n 'use strict';\n\n var DOMutil = __webpack_require__(88);\n\n var Points = __webpack_require__(154);\n\n function Bargraph(groupId, options) {}\n\n Bargraph.drawIcon = function (group, x, y, iconWidth, iconHeight, framework) {\n var fillHeight = iconHeight * 0.5;\n var path, fillPath;\n var outline = DOMutil.getSVGElement(\"rect\", framework.svgElements, framework.svg);\n outline.setAttributeNS(null, \"x\", x);\n outline.setAttributeNS(null, \"y\", y - fillHeight);\n outline.setAttributeNS(null, \"width\", iconWidth);\n outline.setAttributeNS(null, \"height\", 2 * fillHeight);\n outline.setAttributeNS(null, \"class\", \"vis-outline\");\n var barWidth = Math.round(0.3 * iconWidth);\n var originalWidth = group.options.barChart.width;\n var scale = originalWidth / barWidth;\n var bar1Height = Math.round(0.4 * iconHeight);\n var bar2Height = Math.round(0.75 * iconHeight);\n var offset = Math.round((iconWidth - 2 * barWidth) / 3);\n DOMutil.drawBar(x + 0.5 * barWidth + offset, y + fillHeight - bar1Height - 1, barWidth, bar1Height, group.className + ' vis-bar', framework.svgElements, framework.svg, group.style);\n DOMutil.drawBar(x + 1.5 * barWidth + offset + 2, y + fillHeight - bar2Height - 1, barWidth, bar2Height, group.className + ' vis-bar', framework.svgElements, framework.svg, group.style);\n\n if (group.options.drawPoints.enabled == true) {\n var groupTemplate = {\n style: group.options.drawPoints.style,\n styles: group.options.drawPoints.styles,\n size: group.options.drawPoints.size / scale,\n className: group.className\n };\n DOMutil.drawPoint(x + 0.5 * barWidth + offset, y + fillHeight - bar1Height - 1, groupTemplate, framework.svgElements, framework.svg);\n DOMutil.drawPoint(x + 1.5 * barWidth + offset + 2, y + fillHeight - bar2Height - 1, groupTemplate, framework.svgElements, framework.svg);\n }\n };\n /**\n * draw a bar graph\n *\n * @param groupIds\n * @param processedGroupData\n */\n\n\n Bargraph.draw = function (groupIds, processedGroupData, framework) {\n var combinedData = [];\n var intersections = {};\n var coreDistance;\n var key, drawData;\n var group;\n var i, j;\n var barPoints = 0; // combine all barchart data\n\n for (i = 0; i < groupIds.length; i++) {\n group = framework.groups[groupIds[i]];\n\n if (group.options.style === 'bar') {\n if (group.visible === true && (framework.options.groups.visibility[groupIds[i]] === undefined || framework.options.groups.visibility[groupIds[i]] === true)) {\n for (j = 0; j < processedGroupData[groupIds[i]].length; j++) {\n combinedData.push({\n screen_x: processedGroupData[groupIds[i]][j].screen_x,\n screen_end: processedGroupData[groupIds[i]][j].screen_end,\n screen_y: processedGroupData[groupIds[i]][j].screen_y,\n x: processedGroupData[groupIds[i]][j].x,\n end: processedGroupData[groupIds[i]][j].end,\n y: processedGroupData[groupIds[i]][j].y,\n groupId: groupIds[i],\n label: processedGroupData[groupIds[i]][j].label\n });\n barPoints += 1;\n }\n }\n }\n }\n\n if (barPoints === 0) {\n return;\n } // sort by time and by group\n\n\n combinedData.sort(function (a, b) {\n if (a.screen_x === b.screen_x) {\n return a.groupId < b.groupId ? -1 : 1;\n } else {\n return a.screen_x - b.screen_x;\n }\n }); // get intersections\n\n Bargraph._getDataIntersections(intersections, combinedData); // plot barchart\n\n\n for (i = 0; i < combinedData.length; i++) {\n group = framework.groups[combinedData[i].groupId];\n var minWidth = group.options.barChart.minWidth != undefined ? group.options.barChart.minWidth : 0.1 * group.options.barChart.width;\n key = combinedData[i].screen_x;\n var heightOffset = 0;\n\n if (intersections[key] === undefined) {\n if (i + 1 < combinedData.length) {\n coreDistance = Math.abs(combinedData[i + 1].screen_x - key);\n }\n\n drawData = Bargraph._getSafeDrawData(coreDistance, group, minWidth);\n } else {\n var nextKey = i + (intersections[key].amount - intersections[key].resolved);\n var prevKey = i - (intersections[key].resolved + 1);\n\n if (nextKey < combinedData.length) {\n coreDistance = Math.abs(combinedData[nextKey].screen_x - key);\n }\n\n drawData = Bargraph._getSafeDrawData(coreDistance, group, minWidth);\n intersections[key].resolved += 1;\n\n if (group.options.stack === true && group.options.excludeFromStacking !== true) {\n if (combinedData[i].screen_y < group.zeroPosition) {\n heightOffset = intersections[key].accumulatedNegative;\n intersections[key].accumulatedNegative += group.zeroPosition - combinedData[i].screen_y;\n } else {\n heightOffset = intersections[key].accumulatedPositive;\n intersections[key].accumulatedPositive += group.zeroPosition - combinedData[i].screen_y;\n }\n } else if (group.options.barChart.sideBySide === true) {\n drawData.width = drawData.width / intersections[key].amount;\n drawData.offset += intersections[key].resolved * drawData.width - 0.5 * drawData.width * (intersections[key].amount + 1);\n }\n }\n\n var dataWidth = drawData.width;\n var start = combinedData[i].screen_x; // are we drawing explicit boxes? (we supplied an end value)\n\n if (combinedData[i].screen_end != undefined) {\n dataWidth = combinedData[i].screen_end - combinedData[i].screen_x;\n start += dataWidth * 0.5;\n } else {\n start += drawData.offset;\n }\n\n DOMutil.drawBar(start, combinedData[i].screen_y - heightOffset, dataWidth, group.zeroPosition - combinedData[i].screen_y, group.className + ' vis-bar', framework.svgElements, framework.svg, group.style); // draw points\n\n if (group.options.drawPoints.enabled === true) {\n var pointData = {\n screen_x: combinedData[i].screen_x,\n screen_y: combinedData[i].screen_y - heightOffset,\n x: combinedData[i].x,\n y: combinedData[i].y,\n groupId: combinedData[i].groupId,\n label: combinedData[i].label\n };\n Points.draw([pointData], group, framework, drawData.offset); //DOMutil.drawPoint(combinedData[i].x + drawData.offset, combinedData[i].y, group, framework.svgElements, framework.svg);\n }\n }\n };\n /**\n * Fill the intersections object with counters of how many datapoints share the same x coordinates\n * @param intersections\n * @param combinedData\n * @private\n */\n\n\n Bargraph._getDataIntersections = function (intersections, combinedData) {\n // get intersections\n var coreDistance;\n\n for (var i = 0; i < combinedData.length; i++) {\n if (i + 1 < combinedData.length) {\n coreDistance = Math.abs(combinedData[i + 1].screen_x - combinedData[i].screen_x);\n }\n\n if (i > 0) {\n coreDistance = Math.min(coreDistance, Math.abs(combinedData[i - 1].screen_x - combinedData[i].screen_x));\n }\n\n if (coreDistance === 0) {\n if (intersections[combinedData[i].screen_x] === undefined) {\n intersections[combinedData[i].screen_x] = {\n amount: 0,\n resolved: 0,\n accumulatedPositive: 0,\n accumulatedNegative: 0\n };\n }\n\n intersections[combinedData[i].screen_x].amount += 1;\n }\n }\n };\n /**\n * Get the width and offset for bargraphs based on the coredistance between datapoints\n *\n * @param coreDistance\n * @param group\n * @param minWidth\n * @returns {{width: Number, offset: Number}}\n * @private\n */\n\n\n Bargraph._getSafeDrawData = function (coreDistance, group, minWidth) {\n var width, offset;\n\n if (coreDistance < group.options.barChart.width && coreDistance > 0) {\n width = coreDistance < minWidth ? minWidth : coreDistance;\n offset = 0; // recalculate offset with the new width;\n\n if (group.options.barChart.align === 'left') {\n offset -= 0.5 * coreDistance;\n } else if (group.options.barChart.align === 'right') {\n offset += 0.5 * coreDistance;\n }\n } else {\n // default settings\n width = group.options.barChart.width;\n offset = 0;\n\n if (group.options.barChart.align === 'left') {\n offset -= 0.5 * group.options.barChart.width;\n } else if (group.options.barChart.align === 'right') {\n offset += 0.5 * group.options.barChart.width;\n }\n }\n\n return {\n width: width,\n offset: offset\n };\n };\n\n Bargraph.getStackedYRange = function (combinedData, groupRanges, groupIds, groupLabel, orientation) {\n if (combinedData.length > 0) {\n // sort by time and by group\n combinedData.sort(function (a, b) {\n if (a.screen_x === b.screen_x) {\n return a.groupId < b.groupId ? -1 : 1;\n } else {\n return a.screen_x - b.screen_x;\n }\n });\n var intersections = {};\n\n Bargraph._getDataIntersections(intersections, combinedData);\n\n groupRanges[groupLabel] = Bargraph._getStackedYRange(intersections, combinedData);\n groupRanges[groupLabel].yAxisOrientation = orientation;\n groupIds.push(groupLabel);\n }\n };\n\n Bargraph._getStackedYRange = function (intersections, combinedData) {\n var key;\n var yMin = combinedData[0].screen_y;\n var yMax = combinedData[0].screen_y;\n\n for (var i = 0; i < combinedData.length; i++) {\n key = combinedData[i].screen_x;\n\n if (intersections[key] === undefined) {\n yMin = yMin > combinedData[i].screen_y ? combinedData[i].screen_y : yMin;\n yMax = yMax < combinedData[i].screen_y ? combinedData[i].screen_y : yMax;\n } else {\n if (combinedData[i].screen_y < 0) {\n intersections[key].accumulatedNegative += combinedData[i].screen_y;\n } else {\n intersections[key].accumulatedPositive += combinedData[i].screen_y;\n }\n }\n }\n\n for (var xpos in intersections) {\n if (intersections.hasOwnProperty(xpos)) {\n yMin = yMin > intersections[xpos].accumulatedNegative ? intersections[xpos].accumulatedNegative : yMin;\n yMin = yMin > intersections[xpos].accumulatedPositive ? intersections[xpos].accumulatedPositive : yMin;\n yMax = yMax < intersections[xpos].accumulatedNegative ? intersections[xpos].accumulatedNegative : yMax;\n yMax = yMax < intersections[xpos].accumulatedPositive ? intersections[xpos].accumulatedPositive : yMax;\n }\n }\n\n return {\n min: yMin,\n max: yMax\n };\n };\n\n module.exports = Bargraph;\n /***/\n },\n /* 154 */\n\n /***/\n function (module, exports, __webpack_require__) {\n 'use strict';\n\n var _typeof2 = __webpack_require__(62);\n\n var _typeof3 = _interopRequireDefault(_typeof2);\n\n function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n 'default': obj\n };\n }\n\n var DOMutil = __webpack_require__(88);\n\n function Points(groupId, options) {}\n /**\n * draw the data points\n *\n * @param {Array} dataset\n * @param {Object} JSONcontainer\n * @param {Object} svg | SVG DOM element\n * @param {GraphGroup} group\n * @param {Number} [offset]\n */\n\n\n Points.draw = function (dataset, group, framework, offset) {\n offset = offset || 0;\n var callback = getCallback(framework, group);\n\n for (var i = 0; i < dataset.length; i++) {\n if (!callback) {\n // draw the point the simple way.\n DOMutil.drawPoint(dataset[i].screen_x + offset, dataset[i].screen_y, getGroupTemplate(group), framework.svgElements, framework.svg, dataset[i].label);\n } else {\n var callbackResult = callback(dataset[i], group); // result might be true, false or an object\n\n if (callbackResult === true || (typeof callbackResult === 'undefined' ? 'undefined' : (0, _typeof3['default'])(callbackResult)) === 'object') {\n DOMutil.drawPoint(dataset[i].screen_x + offset, dataset[i].screen_y, getGroupTemplate(group, callbackResult), framework.svgElements, framework.svg, dataset[i].label);\n }\n }\n }\n };\n\n Points.drawIcon = function (group, x, y, iconWidth, iconHeight, framework) {\n var fillHeight = iconHeight * 0.5;\n var path, fillPath;\n var outline = DOMutil.getSVGElement(\"rect\", framework.svgElements, framework.svg);\n outline.setAttributeNS(null, \"x\", x);\n outline.setAttributeNS(null, \"y\", y - fillHeight);\n outline.setAttributeNS(null, \"width\", iconWidth);\n outline.setAttributeNS(null, \"height\", 2 * fillHeight);\n outline.setAttributeNS(null, \"class\", \"vis-outline\"); //Don't call callback on icon\n\n DOMutil.drawPoint(x + 0.5 * iconWidth, y, getGroupTemplate(group), framework.svgElements, framework.svg);\n };\n\n function getGroupTemplate(group, callbackResult) {\n callbackResult = typeof callbackResult === 'undefined' ? {} : callbackResult;\n return {\n style: callbackResult.style || group.options.drawPoints.style,\n styles: callbackResult.styles || group.options.drawPoints.styles,\n size: callbackResult.size || group.options.drawPoints.size,\n className: callbackResult.className || group.className\n };\n }\n\n function getCallback(framework, group) {\n var callback = undefined; // check for the graph2d onRender\n\n if (framework.options && framework.options.drawPoints && framework.options.drawPoints.onRender && typeof framework.options.drawPoints.onRender == 'function') {\n callback = framework.options.drawPoints.onRender;\n } // override it with the group onRender if defined\n\n\n if (group.group.options && group.group.options.drawPoints && group.group.options.drawPoints.onRender && typeof group.group.options.drawPoints.onRender == 'function') {\n callback = group.group.options.drawPoints.onRender;\n }\n\n return callback;\n }\n\n module.exports = Points;\n /***/\n },\n /* 155 */\n\n /***/\n function (module, exports, __webpack_require__) {\n \"use strict\";\n\n var DOMutil = __webpack_require__(88);\n\n function Line(groupId, options) {}\n\n Line.calcPath = function (dataset, group) {\n if (dataset != null) {\n if (dataset.length > 0) {\n var d = []; // construct path from dataset\n\n if (group.options.interpolation.enabled == true) {\n d = Line._catmullRom(dataset, group);\n } else {\n d = Line._linear(dataset);\n }\n\n return d;\n }\n }\n };\n\n Line.drawIcon = function (group, x, y, iconWidth, iconHeight, framework) {\n var fillHeight = iconHeight * 0.5;\n var path, fillPath;\n var outline = DOMutil.getSVGElement(\"rect\", framework.svgElements, framework.svg);\n outline.setAttributeNS(null, \"x\", x);\n outline.setAttributeNS(null, \"y\", y - fillHeight);\n outline.setAttributeNS(null, \"width\", iconWidth);\n outline.setAttributeNS(null, \"height\", 2 * fillHeight);\n outline.setAttributeNS(null, \"class\", \"vis-outline\");\n path = DOMutil.getSVGElement(\"path\", framework.svgElements, framework.svg);\n path.setAttributeNS(null, \"class\", group.className);\n\n if (group.style !== undefined) {\n path.setAttributeNS(null, \"style\", group.style);\n }\n\n path.setAttributeNS(null, \"d\", \"M\" + x + \",\" + y + \" L\" + (x + iconWidth) + \",\" + y + \"\");\n\n if (group.options.shaded.enabled == true) {\n fillPath = DOMutil.getSVGElement(\"path\", framework.svgElements, framework.svg);\n\n if (group.options.shaded.orientation == 'top') {\n fillPath.setAttributeNS(null, \"d\", \"M\" + x + \", \" + (y - fillHeight) + \"L\" + x + \",\" + y + \" L\" + (x + iconWidth) + \",\" + y + \" L\" + (x + iconWidth) + \",\" + (y - fillHeight));\n } else {\n fillPath.setAttributeNS(null, \"d\", \"M\" + x + \",\" + y + \" \" + \"L\" + x + \",\" + (y + fillHeight) + \" \" + \"L\" + (x + iconWidth) + \",\" + (y + fillHeight) + \"L\" + (x + iconWidth) + \",\" + y);\n }\n\n fillPath.setAttributeNS(null, \"class\", group.className + \" vis-icon-fill\");\n\n if (group.options.shaded.style !== undefined && group.options.shaded.style !== \"\") {\n fillPath.setAttributeNS(null, \"style\", group.options.shaded.style);\n }\n }\n\n if (group.options.drawPoints.enabled == true) {\n var groupTemplate = {\n style: group.options.drawPoints.style,\n styles: group.options.drawPoints.styles,\n size: group.options.drawPoints.size,\n className: group.className\n };\n DOMutil.drawPoint(x + 0.5 * iconWidth, y, groupTemplate, framework.svgElements, framework.svg);\n }\n };\n\n Line.drawShading = function (pathArray, group, subPathArray, framework) {\n // append shading to the path\n if (group.options.shaded.enabled == true) {\n var svgHeight = Number(framework.svg.style.height.replace('px', ''));\n var fillPath = DOMutil.getSVGElement('path', framework.svgElements, framework.svg);\n var type = \"L\";\n\n if (group.options.interpolation.enabled == true) {\n type = \"C\";\n }\n\n var dFill;\n var zero = 0;\n\n if (group.options.shaded.orientation == 'top') {\n zero = 0;\n } else if (group.options.shaded.orientation == 'bottom') {\n zero = svgHeight;\n } else {\n zero = Math.min(Math.max(0, group.zeroPosition), svgHeight);\n }\n\n if (group.options.shaded.orientation == 'group' && subPathArray != null && subPathArray != undefined) {\n dFill = 'M' + pathArray[0][0] + \",\" + pathArray[0][1] + \" \" + this.serializePath(pathArray, type, false) + ' L' + subPathArray[subPathArray.length - 1][0] + \",\" + subPathArray[subPathArray.length - 1][1] + \" \" + this.serializePath(subPathArray, type, true) + subPathArray[0][0] + \",\" + subPathArray[0][1] + \" Z\";\n } else {\n dFill = 'M' + pathArray[0][0] + \",\" + pathArray[0][1] + \" \" + this.serializePath(pathArray, type, false) + ' V' + zero + ' H' + pathArray[0][0] + \" Z\";\n }\n\n fillPath.setAttributeNS(null, 'class', group.className + ' vis-fill');\n\n if (group.options.shaded.style !== undefined) {\n fillPath.setAttributeNS(null, 'style', group.options.shaded.style);\n }\n\n fillPath.setAttributeNS(null, 'd', dFill);\n }\n };\n /**\n * draw a line graph\n *\n * @param dataset\n * @param group\n */\n\n\n Line.draw = function (pathArray, group, framework) {\n if (pathArray != null && pathArray != undefined) {\n var path = DOMutil.getSVGElement('path', framework.svgElements, framework.svg);\n path.setAttributeNS(null, \"class\", group.className);\n\n if (group.style !== undefined) {\n path.setAttributeNS(null, \"style\", group.style);\n }\n\n var type = \"L\";\n\n if (group.options.interpolation.enabled == true) {\n type = \"C\";\n } // copy properties to path for drawing.\n\n\n path.setAttributeNS(null, 'd', 'M' + pathArray[0][0] + \",\" + pathArray[0][1] + \" \" + this.serializePath(pathArray, type, false));\n }\n };\n\n Line.serializePath = function (pathArray, type, inverse) {\n if (pathArray.length < 2) {\n //Too little data to create a path.\n return \"\";\n }\n\n var d = type;\n\n if (inverse) {\n for (var i = pathArray.length - 2; i > 0; i--) {\n d += pathArray[i][0] + \",\" + pathArray[i][1] + \" \";\n }\n } else {\n for (var i = 1; i < pathArray.length; i++) {\n d += pathArray[i][0] + \",\" + pathArray[i][1] + \" \";\n }\n }\n\n return d;\n };\n /**\n * This uses an uniform parametrization of the interpolation algorithm:\n * 'On the Parameterization of Catmull-Rom Curves' by Cem Yuksel et al.\n * @param data\n * @returns {string}\n * @private\n */\n\n\n Line._catmullRomUniform = function (data) {\n // catmull rom\n var p0, p1, p2, p3, bp1, bp2;\n var d = [];\n d.push([Math.round(data[0].screen_x), Math.round(data[0].screen_y)]);\n var normalization = 1 / 6;\n var length = data.length;\n\n for (var i = 0; i < length - 1; i++) {\n p0 = i == 0 ? data[0] : data[i - 1];\n p1 = data[i];\n p2 = data[i + 1];\n p3 = i + 2 < length ? data[i + 2] : p2; // Catmull-Rom to Cubic Bezier conversion matrix\n // 0 1 0 0\n // -1/6 1 1/6 0\n // 0 1/6 1 -1/6\n // 0 0 1 0\n // bp0 = { x: p1.x, y: p1.y };\n\n bp1 = {\n screen_x: (-p0.screen_x + 6 * p1.screen_x + p2.screen_x) * normalization,\n screen_y: (-p0.screen_y + 6 * p1.screen_y + p2.screen_y) * normalization\n };\n bp2 = {\n screen_x: (p1.screen_x + 6 * p2.screen_x - p3.screen_x) * normalization,\n screen_y: (p1.screen_y + 6 * p2.screen_y - p3.screen_y) * normalization\n }; // bp0 = { x: p2.x, y: p2.y };\n\n d.push([bp1.screen_x, bp1.screen_y]);\n d.push([bp2.screen_x, bp2.screen_y]);\n d.push([p2.screen_x, p2.screen_y]);\n }\n\n return d;\n };\n /**\n * This uses either the chordal or centripetal parameterization of the catmull-rom algorithm.\n * By default, the centripetal parameterization is used because this gives the nicest results.\n * These parameterizations are relatively heavy because the distance between 4 points have to be calculated.\n *\n * One optimization can be used to reuse distances since this is a sliding window approach.\n * @param data\n * @param group\n * @returns {string}\n * @private\n */\n\n\n Line._catmullRom = function (data, group) {\n var alpha = group.options.interpolation.alpha;\n\n if (alpha == 0 || alpha === undefined) {\n return this._catmullRomUniform(data);\n } else {\n var p0, p1, p2, p3, bp1, bp2, d1, d2, d3, A, B, N, M;\n var d3powA, d2powA, d3pow2A, d2pow2A, d1pow2A, d1powA;\n var d = [];\n d.push([Math.round(data[0].screen_x), Math.round(data[0].screen_y)]);\n var length = data.length;\n\n for (var i = 0; i < length - 1; i++) {\n p0 = i == 0 ? data[0] : data[i - 1];\n p1 = data[i];\n p2 = data[i + 1];\n p3 = i + 2 < length ? data[i + 2] : p2;\n d1 = Math.sqrt(Math.pow(p0.screen_x - p1.screen_x, 2) + Math.pow(p0.screen_y - p1.screen_y, 2));\n d2 = Math.sqrt(Math.pow(p1.screen_x - p2.screen_x, 2) + Math.pow(p1.screen_y - p2.screen_y, 2));\n d3 = Math.sqrt(Math.pow(p2.screen_x - p3.screen_x, 2) + Math.pow(p2.screen_y - p3.screen_y, 2)); // Catmull-Rom to Cubic Bezier conversion matrix\n // A = 2d1^2a + 3d1^a * d2^a + d3^2a\n // B = 2d3^2a + 3d3^a * d2^a + d2^2a\n // [ 0 1 0 0 ]\n // [ -d2^2a /N A/N d1^2a /N 0 ]\n // [ 0 d3^2a /M B/M -d2^2a /M ]\n // [ 0 0 1 0 ]\n\n d3powA = Math.pow(d3, alpha);\n d3pow2A = Math.pow(d3, 2 * alpha);\n d2powA = Math.pow(d2, alpha);\n d2pow2A = Math.pow(d2, 2 * alpha);\n d1powA = Math.pow(d1, alpha);\n d1pow2A = Math.pow(d1, 2 * alpha);\n A = 2 * d1pow2A + 3 * d1powA * d2powA + d2pow2A;\n B = 2 * d3pow2A + 3 * d3powA * d2powA + d2pow2A;\n N = 3 * d1powA * (d1powA + d2powA);\n\n if (N > 0) {\n N = 1 / N;\n }\n\n M = 3 * d3powA * (d3powA + d2powA);\n\n if (M > 0) {\n M = 1 / M;\n }\n\n bp1 = {\n screen_x: (-d2pow2A * p0.screen_x + A * p1.screen_x + d1pow2A * p2.screen_x) * N,\n screen_y: (-d2pow2A * p0.screen_y + A * p1.screen_y + d1pow2A * p2.screen_y) * N\n };\n bp2 = {\n screen_x: (d3pow2A * p1.screen_x + B * p2.screen_x - d2pow2A * p3.screen_x) * M,\n screen_y: (d3pow2A * p1.screen_y + B * p2.screen_y - d2pow2A * p3.screen_y) * M\n };\n\n if (bp1.screen_x == 0 && bp1.screen_y == 0) {\n bp1 = p1;\n }\n\n if (bp2.screen_x == 0 && bp2.screen_y == 0) {\n bp2 = p2;\n }\n\n d.push([bp1.screen_x, bp1.screen_y]);\n d.push([bp2.screen_x, bp2.screen_y]);\n d.push([p2.screen_x, p2.screen_y]);\n }\n\n return d;\n }\n };\n /**\n * this generates the SVG path for a linear drawing between datapoints.\n * @param data\n * @returns {string}\n * @private\n */\n\n\n Line._linear = function (data) {\n // linear\n var d = [];\n\n for (var i = 0; i < data.length; i++) {\n d.push([data[i].screen_x, data[i].screen_y]);\n }\n\n return d;\n };\n\n module.exports = Line;\n /***/\n },\n /* 156 */\n\n /***/\n function (module, exports, __webpack_require__) {\n 'use strict';\n\n var _keys = __webpack_require__(58);\n\n var _keys2 = _interopRequireDefault(_keys);\n\n function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n 'default': obj\n };\n }\n\n var util = __webpack_require__(1);\n\n var DOMutil = __webpack_require__(88);\n\n var Component = __webpack_require__(128);\n /**\n * Legend for Graph2d\n */\n\n\n function Legend(body, options, side, linegraphOptions) {\n this.body = body;\n this.defaultOptions = {\n enabled: false,\n icons: true,\n iconSize: 20,\n iconSpacing: 6,\n left: {\n visible: true,\n position: 'top-left' // top/bottom - left,center,right\n\n },\n right: {\n visible: true,\n position: 'top-right' // top/bottom - left,center,right\n\n }\n };\n this.side = side;\n this.options = util.extend({}, this.defaultOptions);\n this.linegraphOptions = linegraphOptions;\n this.svgElements = {};\n this.dom = {};\n this.groups = {};\n this.amountOfGroups = 0;\n\n this._create();\n\n this.framework = {\n svg: this.svg,\n svgElements: this.svgElements,\n options: this.options,\n groups: this.groups\n };\n this.setOptions(options);\n }\n\n Legend.prototype = new Component();\n\n Legend.prototype.clear = function () {\n this.groups = {};\n this.amountOfGroups = 0;\n };\n\n Legend.prototype.addGroup = function (label, graphOptions) {\n // Include a group only if the group option 'excludeFromLegend: false' is not set.\n if (graphOptions.options.excludeFromLegend != true) {\n if (!this.groups.hasOwnProperty(label)) {\n this.groups[label] = graphOptions;\n }\n\n this.amountOfGroups += 1;\n }\n };\n\n Legend.prototype.updateGroup = function (label, graphOptions) {\n this.groups[label] = graphOptions;\n };\n\n Legend.prototype.removeGroup = function (label) {\n if (this.groups.hasOwnProperty(label)) {\n delete this.groups[label];\n this.amountOfGroups -= 1;\n }\n };\n\n Legend.prototype._create = function () {\n this.dom.frame = document.createElement('div');\n this.dom.frame.className = 'vis-legend';\n this.dom.frame.style.position = \"absolute\";\n this.dom.frame.style.top = \"10px\";\n this.dom.frame.style.display = \"block\";\n this.dom.textArea = document.createElement('div');\n this.dom.textArea.className = 'vis-legend-text';\n this.dom.textArea.style.position = \"relative\";\n this.dom.textArea.style.top = \"0px\";\n this.svg = document.createElementNS('http://www.w3.org/2000/svg', \"svg\");\n this.svg.style.position = 'absolute';\n this.svg.style.top = 0 + 'px';\n this.svg.style.width = this.options.iconSize + 5 + 'px';\n this.svg.style.height = '100%';\n this.dom.frame.appendChild(this.svg);\n this.dom.frame.appendChild(this.dom.textArea);\n };\n /**\n * Hide the component from the DOM\n */\n\n\n Legend.prototype.hide = function () {\n // remove the frame containing the items\n if (this.dom.frame.parentNode) {\n this.dom.frame.parentNode.removeChild(this.dom.frame);\n }\n };\n /**\n * Show the component in the DOM (when not already visible).\n * @return {Boolean} changed\n */\n\n\n Legend.prototype.show = function () {\n // show frame containing the items\n if (!this.dom.frame.parentNode) {\n this.body.dom.center.appendChild(this.dom.frame);\n }\n };\n\n Legend.prototype.setOptions = function (options) {\n var fields = ['enabled', 'orientation', 'icons', 'left', 'right'];\n util.selectiveDeepExtend(fields, this.options, options);\n };\n\n Legend.prototype.redraw = function () {\n var activeGroups = 0;\n var groupArray = (0, _keys2['default'])(this.groups);\n groupArray.sort(function (a, b) {\n return a < b ? -1 : 1;\n });\n\n for (var i = 0; i < groupArray.length; i++) {\n var groupId = groupArray[i];\n\n if (this.groups[groupId].visible == true && (this.linegraphOptions.visibility[groupId] === undefined || this.linegraphOptions.visibility[groupId] == true)) {\n activeGroups++;\n }\n }\n\n if (this.options[this.side].visible == false || this.amountOfGroups == 0 || this.options.enabled == false || activeGroups == 0) {\n this.hide();\n } else {\n this.show();\n\n if (this.options[this.side].position == 'top-left' || this.options[this.side].position == 'bottom-left') {\n this.dom.frame.style.left = '4px';\n this.dom.frame.style.textAlign = \"left\";\n this.dom.textArea.style.textAlign = \"left\";\n this.dom.textArea.style.left = this.options.iconSize + 15 + 'px';\n this.dom.textArea.style.right = '';\n this.svg.style.left = 0 + 'px';\n this.svg.style.right = '';\n } else {\n this.dom.frame.style.right = '4px';\n this.dom.frame.style.textAlign = \"right\";\n this.dom.textArea.style.textAlign = \"right\";\n this.dom.textArea.style.right = this.options.iconSize + 15 + 'px';\n this.dom.textArea.style.left = '';\n this.svg.style.right = 0 + 'px';\n this.svg.style.left = '';\n }\n\n if (this.options[this.side].position == 'top-left' || this.options[this.side].position == 'top-right') {\n this.dom.frame.style.top = 4 - Number(this.body.dom.center.style.top.replace(\"px\", \"\")) + 'px';\n this.dom.frame.style.bottom = '';\n } else {\n var scrollableHeight = this.body.domProps.center.height - this.body.domProps.centerContainer.height;\n this.dom.frame.style.bottom = 4 + scrollableHeight + Number(this.body.dom.center.style.top.replace(\"px\", \"\")) + 'px';\n this.dom.frame.style.top = '';\n }\n\n if (this.options.icons == false) {\n this.dom.frame.style.width = this.dom.textArea.offsetWidth + 10 + 'px';\n this.dom.textArea.style.right = '';\n this.dom.textArea.style.left = '';\n this.svg.style.width = '0px';\n } else {\n this.dom.frame.style.width = this.options.iconSize + 15 + this.dom.textArea.offsetWidth + 10 + 'px';\n this.drawLegendIcons();\n }\n\n var content = '';\n\n for (var i = 0; i < groupArray.length; i++) {\n var groupId = groupArray[i];\n\n if (this.groups[groupId].visible == true && (this.linegraphOptions.visibility[groupId] === undefined || this.linegraphOptions.visibility[groupId] == true)) {\n content += this.groups[groupId].content + '
';\n }\n }\n\n this.dom.textArea.innerHTML = content;\n this.dom.textArea.style.lineHeight = 0.75 * this.options.iconSize + this.options.iconSpacing + 'px';\n }\n };\n\n Legend.prototype.drawLegendIcons = function () {\n if (this.dom.frame.parentNode) {\n var groupArray = (0, _keys2['default'])(this.groups);\n groupArray.sort(function (a, b) {\n return a < b ? -1 : 1;\n }); // this resets the elements so the order is maintained\n\n DOMutil.resetElements(this.svgElements);\n var padding = window.getComputedStyle(this.dom.frame).paddingTop;\n var iconOffset = Number(padding.replace('px', ''));\n var x = iconOffset;\n var iconWidth = this.options.iconSize;\n var iconHeight = 0.75 * this.options.iconSize;\n var y = iconOffset + 0.5 * iconHeight + 3;\n this.svg.style.width = iconWidth + 5 + iconOffset + 'px';\n\n for (var i = 0; i < groupArray.length; i++) {\n var groupId = groupArray[i];\n\n if (this.groups[groupId].visible == true && (this.linegraphOptions.visibility[groupId] === undefined || this.linegraphOptions.visibility[groupId] == true)) {\n this.groups[groupId].getLegend(iconWidth, iconHeight, this.framework, x, y);\n y += iconHeight + this.options.iconSpacing;\n }\n }\n }\n };\n\n module.exports = Legend;\n /***/\n },\n /* 157 */\n\n /***/\n function (module, exports) {\n 'use strict';\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n /**\n * This object contains all possible options. It will check if the types are correct, if required if the option is one\n * of the allowed values.\n *\n * __any__ means that the name of the property does not matter.\n * __type__ is a required field for all objects and contains the allowed types of all objects\n */\n\n var string = 'string';\n var bool = 'boolean';\n var number = 'number';\n var array = 'array';\n var date = 'date';\n var object = 'object'; // should only be in a __type__ property\n\n var dom = 'dom';\n var moment = 'moment';\n var any = 'any';\n var allOptions = {\n configure: {\n enabled: {\n 'boolean': bool\n },\n filter: {\n 'boolean': bool,\n 'function': 'function'\n },\n container: {\n dom: dom\n },\n __type__: {\n object: object,\n 'boolean': bool,\n 'function': 'function'\n }\n },\n //globals :\n yAxisOrientation: {\n string: ['left', 'right']\n },\n defaultGroup: {\n string: string\n },\n sort: {\n 'boolean': bool\n },\n sampling: {\n 'boolean': bool\n },\n stack: {\n 'boolean': bool\n },\n graphHeight: {\n string: string,\n number: number\n },\n shaded: {\n enabled: {\n 'boolean': bool\n },\n orientation: {\n string: ['bottom', 'top', 'zero', 'group']\n },\n // top, bottom, zero, group\n groupId: {\n object: object\n },\n __type__: {\n 'boolean': bool,\n object: object\n }\n },\n style: {\n string: ['line', 'bar', 'points']\n },\n // line, bar\n barChart: {\n width: {\n number: number\n },\n minWidth: {\n number: number\n },\n sideBySide: {\n 'boolean': bool\n },\n align: {\n string: ['left', 'center', 'right']\n },\n __type__: {\n object: object\n }\n },\n interpolation: {\n enabled: {\n 'boolean': bool\n },\n parametrization: {\n string: ['centripetal', 'chordal', 'uniform']\n },\n // uniform (alpha = 0.0), chordal (alpha = 1.0), centripetal (alpha = 0.5)\n alpha: {\n number: number\n },\n __type__: {\n object: object,\n 'boolean': bool\n }\n },\n drawPoints: {\n enabled: {\n 'boolean': bool\n },\n onRender: {\n 'function': 'function'\n },\n size: {\n number: number\n },\n style: {\n string: ['square', 'circle']\n },\n // square, circle\n __type__: {\n object: object,\n 'boolean': bool,\n 'function': 'function'\n }\n },\n dataAxis: {\n showMinorLabels: {\n 'boolean': bool\n },\n showMajorLabels: {\n 'boolean': bool\n },\n icons: {\n 'boolean': bool\n },\n width: {\n string: string,\n number: number\n },\n visible: {\n 'boolean': bool\n },\n alignZeros: {\n 'boolean': bool\n },\n left: {\n range: {\n min: {\n number: number,\n 'undefined': 'undefined'\n },\n max: {\n number: number,\n 'undefined': 'undefined'\n },\n __type__: {\n object: object\n }\n },\n format: {\n 'function': 'function'\n },\n title: {\n text: {\n string: string,\n number: number,\n 'undefined': 'undefined'\n },\n style: {\n string: string,\n 'undefined': 'undefined'\n },\n __type__: {\n object: object\n }\n },\n __type__: {\n object: object\n }\n },\n right: {\n range: {\n min: {\n number: number,\n 'undefined': 'undefined'\n },\n max: {\n number: number,\n 'undefined': 'undefined'\n },\n __type__: {\n object: object\n }\n },\n format: {\n 'function': 'function'\n },\n title: {\n text: {\n string: string,\n number: number,\n 'undefined': 'undefined'\n },\n style: {\n string: string,\n 'undefined': 'undefined'\n },\n __type__: {\n object: object\n }\n },\n __type__: {\n object: object\n }\n },\n __type__: {\n object: object\n }\n },\n legend: {\n enabled: {\n 'boolean': bool\n },\n icons: {\n 'boolean': bool\n },\n left: {\n visible: {\n 'boolean': bool\n },\n position: {\n string: ['top-right', 'bottom-right', 'top-left', 'bottom-left']\n },\n __type__: {\n object: object\n }\n },\n right: {\n visible: {\n 'boolean': bool\n },\n position: {\n string: ['top-right', 'bottom-right', 'top-left', 'bottom-left']\n },\n __type__: {\n object: object\n }\n },\n __type__: {\n object: object,\n 'boolean': bool\n }\n },\n groups: {\n visibility: {\n any: any\n },\n __type__: {\n object: object\n }\n },\n autoResize: {\n 'boolean': bool\n },\n throttleRedraw: {\n number: number\n },\n // TODO: DEPRICATED see https://github.com/almende/vis/issues/2511\n clickToUse: {\n 'boolean': bool\n },\n end: {\n number: number,\n date: date,\n string: string,\n moment: moment\n },\n format: {\n minorLabels: {\n millisecond: {\n string: string,\n 'undefined': 'undefined'\n },\n second: {\n string: string,\n 'undefined': 'undefined'\n },\n minute: {\n string: string,\n 'undefined': 'undefined'\n },\n hour: {\n string: string,\n 'undefined': 'undefined'\n },\n weekday: {\n string: string,\n 'undefined': 'undefined'\n },\n day: {\n string: string,\n 'undefined': 'undefined'\n },\n month: {\n string: string,\n 'undefined': 'undefined'\n },\n year: {\n string: string,\n 'undefined': 'undefined'\n },\n __type__: {\n object: object\n }\n },\n majorLabels: {\n millisecond: {\n string: string,\n 'undefined': 'undefined'\n },\n second: {\n string: string,\n 'undefined': 'undefined'\n },\n minute: {\n string: string,\n 'undefined': 'undefined'\n },\n hour: {\n string: string,\n 'undefined': 'undefined'\n },\n weekday: {\n string: string,\n 'undefined': 'undefined'\n },\n day: {\n string: string,\n 'undefined': 'undefined'\n },\n month: {\n string: string,\n 'undefined': 'undefined'\n },\n year: {\n string: string,\n 'undefined': 'undefined'\n },\n __type__: {\n object: object\n }\n },\n __type__: {\n object: object\n }\n },\n moment: {\n 'function': 'function'\n },\n height: {\n string: string,\n number: number\n },\n hiddenDates: {\n start: {\n date: date,\n number: number,\n string: string,\n moment: moment\n },\n end: {\n date: date,\n number: number,\n string: string,\n moment: moment\n },\n repeat: {\n string: string\n },\n __type__: {\n object: object,\n array: array\n }\n },\n locale: {\n string: string\n },\n locales: {\n __any__: {\n any: any\n },\n __type__: {\n object: object\n }\n },\n max: {\n date: date,\n number: number,\n string: string,\n moment: moment\n },\n maxHeight: {\n number: number,\n string: string\n },\n maxMinorChars: {\n number: number\n },\n min: {\n date: date,\n number: number,\n string: string,\n moment: moment\n },\n minHeight: {\n number: number,\n string: string\n },\n moveable: {\n 'boolean': bool\n },\n multiselect: {\n 'boolean': bool\n },\n orientation: {\n string: string\n },\n showCurrentTime: {\n 'boolean': bool\n },\n showMajorLabels: {\n 'boolean': bool\n },\n showMinorLabels: {\n 'boolean': bool\n },\n start: {\n date: date,\n number: number,\n string: string,\n moment: moment\n },\n timeAxis: {\n scale: {\n string: string,\n 'undefined': 'undefined'\n },\n step: {\n number: number,\n 'undefined': 'undefined'\n },\n __type__: {\n object: object\n }\n },\n width: {\n string: string,\n number: number\n },\n zoomable: {\n 'boolean': bool\n },\n zoomKey: {\n string: ['ctrlKey', 'altKey', 'metaKey', '']\n },\n zoomMax: {\n number: number\n },\n zoomMin: {\n number: number\n },\n zIndex: {\n number: number\n },\n __type__: {\n object: object\n }\n };\n var configureOptions = {\n global: {\n //yAxisOrientation: ['left','right'], // TDOO: enable as soon as Grahp2d doesn't crash when changing this on the fly\n sort: true,\n sampling: true,\n stack: false,\n shaded: {\n enabled: false,\n orientation: ['zero', 'top', 'bottom', 'group'] // zero, top, bottom\n\n },\n style: ['line', 'bar', 'points'],\n // line, bar\n barChart: {\n width: [50, 5, 100, 5],\n minWidth: [50, 5, 100, 5],\n sideBySide: false,\n align: ['left', 'center', 'right'] // left, center, right\n\n },\n interpolation: {\n enabled: true,\n parametrization: ['centripetal', 'chordal', 'uniform'] // uniform (alpha = 0.0), chordal (alpha = 1.0), centripetal (alpha = 0.5)\n\n },\n drawPoints: {\n enabled: true,\n size: [6, 2, 30, 1],\n style: ['square', 'circle'] // square, circle\n\n },\n dataAxis: {\n showMinorLabels: true,\n showMajorLabels: true,\n icons: false,\n width: [40, 0, 200, 1],\n visible: true,\n alignZeros: true,\n left: {\n //range: {min:'undefined': 'undefined'ined,max:'undefined': 'undefined'ined},\n //format: function (value) {return value;},\n title: {\n text: '',\n style: ''\n }\n },\n right: {\n //range: {min:'undefined': 'undefined'ined,max:'undefined': 'undefined'ined},\n //format: function (value) {return value;},\n title: {\n text: '',\n style: ''\n }\n }\n },\n legend: {\n enabled: false,\n icons: true,\n left: {\n visible: true,\n position: ['top-right', 'bottom-right', 'top-left', 'bottom-left'] // top/bottom - left,right\n\n },\n right: {\n visible: true,\n position: ['top-right', 'bottom-right', 'top-left', 'bottom-left'] // top/bottom - left,right\n\n }\n },\n autoResize: true,\n clickToUse: false,\n end: '',\n format: {\n minorLabels: {\n millisecond: 'SSS',\n second: 's',\n minute: 'HH:mm',\n hour: 'HH:mm',\n weekday: 'ddd D',\n day: 'D',\n month: 'MMM',\n year: 'YYYY'\n },\n majorLabels: {\n millisecond: 'HH:mm:ss',\n second: 'D MMMM HH:mm',\n minute: 'ddd D MMMM',\n hour: 'ddd D MMMM',\n weekday: 'MMMM YYYY',\n day: 'MMMM YYYY',\n month: 'YYYY',\n year: ''\n }\n },\n height: '',\n locale: '',\n max: '',\n maxHeight: '',\n maxMinorChars: [7, 0, 20, 1],\n min: '',\n minHeight: '',\n moveable: true,\n orientation: ['both', 'bottom', 'top'],\n showCurrentTime: false,\n showMajorLabels: true,\n showMinorLabels: true,\n start: '',\n width: '100%',\n zoomable: true,\n zoomKey: ['ctrlKey', 'altKey', 'metaKey', ''],\n zoomMax: [315360000000000, 10, 315360000000000, 1],\n zoomMin: [10, 10, 315360000000000, 1],\n zIndex: 0\n }\n };\n exports.allOptions = allOptions;\n exports.configureOptions = configureOptions;\n /***/\n },\n /* 158 */\n\n /***/\n function (module, exports, __webpack_require__) {\n 'use strict'; // utils\n\n exports.util = __webpack_require__(1);\n exports.DOMutil = __webpack_require__(88); // data\n\n exports.DataSet = __webpack_require__(89);\n exports.DataView = __webpack_require__(93);\n exports.Queue = __webpack_require__(92); // Network\n\n exports.Network = __webpack_require__(159);\n exports.network = {\n Images: __webpack_require__(160),\n dotparser: __webpack_require__(228),\n gephiParser: __webpack_require__(229),\n allOptions: __webpack_require__(224)\n };\n\n exports.network.convertDot = function (input) {\n return exports.network.dotparser.DOTToGraph(input);\n };\n\n exports.network.convertGephi = function (input, options) {\n return exports.network.gephiParser.parseGephi(input, options);\n }; // bundled external libraries\n\n\n exports.moment = __webpack_require__(82);\n exports.Hammer = __webpack_require__(112);\n exports.keycharm = __webpack_require__(115);\n /***/\n },\n /* 159 */\n\n /***/\n function (module, exports, __webpack_require__) {\n 'use strict';\n\n var _Images = __webpack_require__(160);\n\n var _Images2 = _interopRequireDefault(_Images);\n\n var _Groups = __webpack_require__(161);\n\n var _Groups2 = _interopRequireDefault(_Groups);\n\n var _NodesHandler = __webpack_require__(162);\n\n var _NodesHandler2 = _interopRequireDefault(_NodesHandler);\n\n var _EdgesHandler = __webpack_require__(195);\n\n var _EdgesHandler2 = _interopRequireDefault(_EdgesHandler);\n\n var _PhysicsEngine = __webpack_require__(204);\n\n var _PhysicsEngine2 = _interopRequireDefault(_PhysicsEngine);\n\n var _Clustering = __webpack_require__(213);\n\n var _Clustering2 = _interopRequireDefault(_Clustering);\n\n var _CanvasRenderer = __webpack_require__(216);\n\n var _CanvasRenderer2 = _interopRequireDefault(_CanvasRenderer);\n\n var _Canvas = __webpack_require__(217);\n\n var _Canvas2 = _interopRequireDefault(_Canvas);\n\n var _View = __webpack_require__(218);\n\n var _View2 = _interopRequireDefault(_View);\n\n var _InteractionHandler = __webpack_require__(219);\n\n var _InteractionHandler2 = _interopRequireDefault(_InteractionHandler);\n\n var _SelectionHandler = __webpack_require__(221);\n\n var _SelectionHandler2 = _interopRequireDefault(_SelectionHandler);\n\n var _LayoutEngine = __webpack_require__(222);\n\n var _LayoutEngine2 = _interopRequireDefault(_LayoutEngine);\n\n var _ManipulationSystem = __webpack_require__(223);\n\n var _ManipulationSystem2 = _interopRequireDefault(_ManipulationSystem);\n\n var _Configurator = __webpack_require__(118);\n\n var _Configurator2 = _interopRequireDefault(_Configurator);\n\n var _Validator = __webpack_require__(126);\n\n var _Validator2 = _interopRequireDefault(_Validator);\n\n var _options = __webpack_require__(224);\n\n var _KamadaKawai = __webpack_require__(225);\n\n var _KamadaKawai2 = _interopRequireDefault(_KamadaKawai);\n\n function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n 'default': obj\n };\n } // Load custom shapes into CanvasRenderingContext2D\n\n\n __webpack_require__(227);\n\n var Emitter = __webpack_require__(99);\n\n var util = __webpack_require__(1);\n\n var DataSet = __webpack_require__(89);\n\n var DataView = __webpack_require__(93);\n\n var dotparser = __webpack_require__(228);\n\n var gephiParser = __webpack_require__(229);\n\n var Activator = __webpack_require__(143);\n\n var locales = __webpack_require__(230);\n /**\n * @constructor Network\n * Create a network visualization, displaying nodes and edges.\n *\n * @param {Element} container The DOM element in which the Network will\n * be created. Normally a div element.\n * @param {Object} data An object containing parameters\n * {Array} nodes\n * {Array} edges\n * @param {Object} options Options\n */\n\n\n function Network(container, data, options) {\n var _this = this;\n\n if (!(this instanceof Network)) {\n throw new SyntaxError('Constructor must be called with the new operator');\n } // set constant values\n\n\n this.options = {};\n this.defaultOptions = {\n locale: 'en',\n locales: locales,\n clickToUse: false\n };\n util.extend(this.options, this.defaultOptions); // containers for nodes and edges\n\n this.body = {\n container: container,\n nodes: {},\n nodeIndices: [],\n edges: {},\n edgeIndices: [],\n emitter: {\n on: this.on.bind(this),\n off: this.off.bind(this),\n emit: this.emit.bind(this),\n once: this.once.bind(this)\n },\n eventListeners: {\n onTap: function onTap() {},\n onTouch: function onTouch() {},\n onDoubleTap: function onDoubleTap() {},\n onHold: function onHold() {},\n onDragStart: function onDragStart() {},\n onDrag: function onDrag() {},\n onDragEnd: function onDragEnd() {},\n onMouseWheel: function onMouseWheel() {},\n onPinch: function onPinch() {},\n onMouseMove: function onMouseMove() {},\n onRelease: function onRelease() {},\n onContext: function onContext() {}\n },\n data: {\n nodes: null,\n // A DataSet or DataView\n edges: null // A DataSet or DataView\n\n },\n functions: {\n createNode: function createNode() {},\n createEdge: function createEdge() {},\n getPointer: function getPointer() {}\n },\n modules: {},\n view: {\n scale: 1,\n translation: {\n x: 0,\n y: 0\n }\n }\n }; // bind the event listeners\n\n this.bindEventListeners(); // setting up all modules\n\n this.images = new _Images2['default'](function () {\n return _this.body.emitter.emit(\"_requestRedraw\");\n }); // object with images\n\n this.groups = new _Groups2['default'](); // object with groups\n\n this.canvas = new _Canvas2['default'](this.body); // DOM handler\n\n this.selectionHandler = new _SelectionHandler2['default'](this.body, this.canvas); // Selection handler\n\n this.interactionHandler = new _InteractionHandler2['default'](this.body, this.canvas, this.selectionHandler); // Interaction handler handles all the hammer bindings (that are bound by canvas), key\n\n this.view = new _View2['default'](this.body, this.canvas); // camera handler, does animations and zooms\n\n this.renderer = new _CanvasRenderer2['default'](this.body, this.canvas); // renderer, starts renderloop, has events that modules can hook into\n\n this.physics = new _PhysicsEngine2['default'](this.body); // physics engine, does all the simulations\n\n this.layoutEngine = new _LayoutEngine2['default'](this.body); // layout engine for inital layout and hierarchical layout\n\n this.clustering = new _Clustering2['default'](this.body); // clustering api\n\n this.manipulation = new _ManipulationSystem2['default'](this.body, this.canvas, this.selectionHandler); // data manipulation system\n\n this.nodesHandler = new _NodesHandler2['default'](this.body, this.images, this.groups, this.layoutEngine); // Handle adding, deleting and updating of nodes as well as global options\n\n this.edgesHandler = new _EdgesHandler2['default'](this.body, this.images, this.groups); // Handle adding, deleting and updating of edges as well as global options\n\n this.body.modules[\"kamadaKawai\"] = new _KamadaKawai2['default'](this.body, 150, 0.05); // Layouting algorithm.\n\n this.body.modules[\"clustering\"] = this.clustering; // create the DOM elements\n\n this.canvas._create(); // apply options\n\n\n this.setOptions(options); // load data (the disable start variable will be the same as the enabled clustering)\n\n this.setData(data);\n } // Extend Network with an Emitter mixin\n\n\n Emitter(Network.prototype);\n /**\n * Set options\n * @param {Object} options\n */\n\n Network.prototype.setOptions = function (options) {\n var _this2 = this;\n\n if (options !== undefined) {\n var errorFound = _Validator2['default'].validate(options, _options.allOptions);\n\n if (errorFound === true) {\n console.log('%cErrors have been found in the supplied options object.', _Validator.printStyle);\n } // copy the global fields over\n\n\n var fields = ['locale', 'locales', 'clickToUse'];\n util.selectiveDeepExtend(fields, this.options, options); // the hierarchical system can adapt the edges and the physics to it's own options because not all combinations work with the hierarichical system.\n\n options = this.layoutEngine.setOptions(options.layout, options);\n this.canvas.setOptions(options); // options for canvas are in globals\n // pass the options to the modules\n\n this.groups.setOptions(options.groups);\n this.nodesHandler.setOptions(options.nodes);\n this.edgesHandler.setOptions(options.edges);\n this.physics.setOptions(options.physics);\n this.manipulation.setOptions(options.manipulation, options, this.options); // manipulation uses the locales in the globals\n\n this.interactionHandler.setOptions(options.interaction);\n this.renderer.setOptions(options.interaction); // options for rendering are in interaction\n\n this.selectionHandler.setOptions(options.interaction); // options for selection are in interaction\n // reload the settings of the nodes to apply changes in groups that are not referenced by pointer.\n\n if (options.groups !== undefined) {\n this.body.emitter.emit(\"refreshNodes\");\n } // these two do not have options at the moment, here for completeness\n //this.view.setOptions(options.view);\n //this.clustering.setOptions(options.clustering);\n\n\n if ('configure' in options) {\n if (!this.configurator) {\n this.configurator = new _Configurator2['default'](this, this.body.container, _options.configureOptions, this.canvas.pixelRatio);\n }\n\n this.configurator.setOptions(options.configure);\n } // if the configuration system is enabled, copy all options and put them into the config system\n\n\n if (this.configurator && this.configurator.options.enabled === true) {\n var networkOptions = {\n nodes: {},\n edges: {},\n layout: {},\n interaction: {},\n manipulation: {},\n physics: {},\n global: {}\n };\n util.deepExtend(networkOptions.nodes, this.nodesHandler.options);\n util.deepExtend(networkOptions.edges, this.edgesHandler.options);\n util.deepExtend(networkOptions.layout, this.layoutEngine.options); // load the selectionHandler and render default options in to the interaction group\n\n util.deepExtend(networkOptions.interaction, this.selectionHandler.options);\n util.deepExtend(networkOptions.interaction, this.renderer.options);\n util.deepExtend(networkOptions.interaction, this.interactionHandler.options);\n util.deepExtend(networkOptions.manipulation, this.manipulation.options);\n util.deepExtend(networkOptions.physics, this.physics.options); // load globals into the global object\n\n util.deepExtend(networkOptions.global, this.canvas.options);\n util.deepExtend(networkOptions.global, this.options);\n this.configurator.setModuleOptions(networkOptions);\n } // handle network global options\n\n\n if (options.clickToUse !== undefined) {\n if (options.clickToUse === true) {\n if (this.activator === undefined) {\n this.activator = new Activator(this.canvas.frame);\n this.activator.on('change', function () {\n _this2.body.emitter.emit(\"activate\");\n });\n }\n } else {\n if (this.activator !== undefined) {\n this.activator.destroy();\n delete this.activator;\n }\n\n this.body.emitter.emit(\"activate\");\n }\n } else {\n this.body.emitter.emit(\"activate\");\n }\n\n this.canvas.setSize(); // start the physics simulation. Can be safely called multiple times.\n\n this.body.emitter.emit(\"startSimulation\");\n }\n };\n /**\n * Update the this.body.nodeIndices with the most recent node index list\n * @private\n */\n\n\n Network.prototype._updateVisibleIndices = function () {\n var nodes = this.body.nodes;\n var edges = this.body.edges;\n this.body.nodeIndices = [];\n this.body.edgeIndices = [];\n\n for (var nodeId in nodes) {\n if (nodes.hasOwnProperty(nodeId)) {\n if (nodes[nodeId].options.hidden === false) {\n this.body.nodeIndices.push(nodes[nodeId].id);\n }\n }\n }\n\n for (var edgeId in edges) {\n if (edges.hasOwnProperty(edgeId)) {\n if (edges[edgeId].options.hidden === false) {\n this.body.edgeIndices.push(edges[edgeId].id);\n }\n }\n }\n };\n /**\n * Bind all events\n */\n\n\n Network.prototype.bindEventListeners = function () {\n var _this3 = this; // this event will trigger a rebuilding of the cache everything. Used when nodes or edges have been added or removed.\n\n\n this.body.emitter.on(\"_dataChanged\", function () {\n // update shortcut lists\n _this3._updateVisibleIndices();\n\n _this3.body.emitter.emit(\"_requestRedraw\"); // call the dataUpdated event because the only difference between the two is the updating of the indices\n\n\n _this3.body.emitter.emit(\"_dataUpdated\");\n }); // this is called when options of EXISTING nodes or edges have changed.\n\n this.body.emitter.on(\"_dataUpdated\", function () {\n // update values\n _this3._updateValueRange(_this3.body.nodes);\n\n _this3._updateValueRange(_this3.body.edges); // start simulation (can be called safely, even if already running)\n\n\n _this3.body.emitter.emit(\"startSimulation\");\n\n _this3.body.emitter.emit(\"_requestRedraw\");\n });\n };\n /**\n * Set nodes and edges, and optionally options as well.\n *\n * @param {Object} data Object containing parameters:\n * {Array | DataSet | DataView} [nodes] Array with nodes\n * {Array | DataSet | DataView} [edges] Array with edges\n * {String} [dot] String containing data in DOT format\n * {String} [gephi] String containing data in gephi JSON format\n * {Options} [options] Object with options\n */\n\n\n Network.prototype.setData = function (data) {\n // reset the physics engine.\n this.body.emitter.emit(\"resetPhysics\");\n this.body.emitter.emit(\"_resetData\"); // unselect all to ensure no selections from old data are carried over.\n\n this.selectionHandler.unselectAll();\n\n if (data && data.dot && (data.nodes || data.edges)) {\n throw new SyntaxError('Data must contain either parameter \"dot\" or ' + ' parameter pair \"nodes\" and \"edges\", but not both.');\n } // set options\n\n\n this.setOptions(data && data.options); // set all data\n\n if (data && data.dot) {\n console.log('The dot property has been deprecated. Please use the static convertDot method to convert DOT into vis.network format and use the normal data format with nodes and edges. This converter is used like this: var data = vis.network.convertDot(dotString);'); // parse DOT file\n\n var dotData = dotparser.DOTToGraph(data.dot);\n this.setData(dotData);\n return;\n } else if (data && data.gephi) {\n // parse DOT file\n console.log('The gephi property has been deprecated. Please use the static convertGephi method to convert gephi into vis.network format and use the normal data format with nodes and edges. This converter is used like this: var data = vis.network.convertGephi(gephiJson);');\n var gephiData = gephiParser.parseGephi(data.gephi);\n this.setData(gephiData);\n return;\n } else {\n this.nodesHandler.setData(data && data.nodes, true);\n this.edgesHandler.setData(data && data.edges, true);\n } // emit change in data\n\n\n this.body.emitter.emit(\"_dataChanged\"); // emit data loaded\n\n this.body.emitter.emit(\"_dataLoaded\"); // find a stable position or start animating to a stable position\n\n this.body.emitter.emit(\"initPhysics\");\n };\n /**\n * Cleans up all bindings of the network, removing it fully from the memory IF the variable is set to null after calling this function.\n * var network = new vis.Network(..);\n * network.destroy();\n * network = null;\n */\n\n\n Network.prototype.destroy = function () {\n this.body.emitter.emit(\"destroy\"); // clear events\n\n this.body.emitter.off();\n this.off(); // delete modules\n\n delete this.groups;\n delete this.canvas;\n delete this.selectionHandler;\n delete this.interactionHandler;\n delete this.view;\n delete this.renderer;\n delete this.physics;\n delete this.layoutEngine;\n delete this.clustering;\n delete this.manipulation;\n delete this.nodesHandler;\n delete this.edgesHandler;\n delete this.configurator;\n delete this.images;\n\n for (var nodeId in this.body.nodes) {\n delete this.body.nodes[nodeId];\n }\n\n for (var edgeId in this.body.edges) {\n delete this.body.edges[edgeId];\n } // remove the container and everything inside it recursively\n\n\n util.recursiveDOMDelete(this.body.container);\n };\n /**\n * Update the values of all object in the given array according to the current\n * value range of the objects in the array.\n * @param {Object} obj An object containing a set of Edges or Nodes\n * The objects must have a method getValue() and\n * setValueRange(min, max).\n * @private\n */\n\n\n Network.prototype._updateValueRange = function (obj) {\n var id; // determine the range of the objects\n\n var valueMin = undefined;\n var valueMax = undefined;\n var valueTotal = 0;\n\n for (id in obj) {\n if (obj.hasOwnProperty(id)) {\n var value = obj[id].getValue();\n\n if (value !== undefined) {\n valueMin = valueMin === undefined ? value : Math.min(value, valueMin);\n valueMax = valueMax === undefined ? value : Math.max(value, valueMax);\n valueTotal += value;\n }\n }\n } // adjust the range of all objects\n\n\n if (valueMin !== undefined && valueMax !== undefined) {\n for (id in obj) {\n if (obj.hasOwnProperty(id)) {\n obj[id].setValueRange(valueMin, valueMax, valueTotal);\n }\n }\n }\n };\n /**\n * Returns true when the Network is active.\n * @returns {boolean}\n */\n\n\n Network.prototype.isActive = function () {\n return !this.activator || this.activator.active;\n };\n\n Network.prototype.setSize = function () {\n return this.canvas.setSize.apply(this.canvas, arguments);\n };\n\n Network.prototype.canvasToDOM = function () {\n return this.canvas.canvasToDOM.apply(this.canvas, arguments);\n };\n\n Network.prototype.DOMtoCanvas = function () {\n return this.canvas.DOMtoCanvas.apply(this.canvas, arguments);\n };\n\n Network.prototype.findNode = function () {\n return this.clustering.findNode.apply(this.clustering, arguments);\n };\n\n Network.prototype.isCluster = function () {\n return this.clustering.isCluster.apply(this.clustering, arguments);\n };\n\n Network.prototype.openCluster = function () {\n return this.clustering.openCluster.apply(this.clustering, arguments);\n };\n\n Network.prototype.cluster = function () {\n return this.clustering.cluster.apply(this.clustering, arguments);\n };\n\n Network.prototype.getNodesInCluster = function () {\n return this.clustering.getNodesInCluster.apply(this.clustering, arguments);\n };\n\n Network.prototype.clusterByConnection = function () {\n return this.clustering.clusterByConnection.apply(this.clustering, arguments);\n };\n\n Network.prototype.clusterByHubsize = function () {\n return this.clustering.clusterByHubsize.apply(this.clustering, arguments);\n };\n\n Network.prototype.clusterOutliers = function () {\n return this.clustering.clusterOutliers.apply(this.clustering, arguments);\n };\n\n Network.prototype.getSeed = function () {\n return this.layoutEngine.getSeed.apply(this.layoutEngine, arguments);\n };\n\n Network.prototype.enableEditMode = function () {\n return this.manipulation.enableEditMode.apply(this.manipulation, arguments);\n };\n\n Network.prototype.disableEditMode = function () {\n return this.manipulation.disableEditMode.apply(this.manipulation, arguments);\n };\n\n Network.prototype.addNodeMode = function () {\n return this.manipulation.addNodeMode.apply(this.manipulation, arguments);\n };\n\n Network.prototype.editNode = function () {\n return this.manipulation.editNode.apply(this.manipulation, arguments);\n };\n\n Network.prototype.editNodeMode = function () {\n console.log(\"Deprecated: Please use editNode instead of editNodeMode.\");\n return this.manipulation.editNode.apply(this.manipulation, arguments);\n };\n\n Network.prototype.addEdgeMode = function () {\n return this.manipulation.addEdgeMode.apply(this.manipulation, arguments);\n };\n\n Network.prototype.editEdgeMode = function () {\n return this.manipulation.editEdgeMode.apply(this.manipulation, arguments);\n };\n\n Network.prototype.deleteSelected = function () {\n return this.manipulation.deleteSelected.apply(this.manipulation, arguments);\n };\n\n Network.prototype.getPositions = function () {\n return this.nodesHandler.getPositions.apply(this.nodesHandler, arguments);\n };\n\n Network.prototype.storePositions = function () {\n return this.nodesHandler.storePositions.apply(this.nodesHandler, arguments);\n };\n\n Network.prototype.moveNode = function () {\n return this.nodesHandler.moveNode.apply(this.nodesHandler, arguments);\n };\n\n Network.prototype.getBoundingBox = function () {\n return this.nodesHandler.getBoundingBox.apply(this.nodesHandler, arguments);\n };\n\n Network.prototype.getConnectedNodes = function (objectId) {\n if (this.body.nodes[objectId] !== undefined) {\n return this.nodesHandler.getConnectedNodes.apply(this.nodesHandler, arguments);\n } else {\n return this.edgesHandler.getConnectedNodes.apply(this.edgesHandler, arguments);\n }\n };\n\n Network.prototype.getConnectedEdges = function () {\n return this.nodesHandler.getConnectedEdges.apply(this.nodesHandler, arguments);\n };\n\n Network.prototype.startSimulation = function () {\n return this.physics.startSimulation.apply(this.physics, arguments);\n };\n\n Network.prototype.stopSimulation = function () {\n return this.physics.stopSimulation.apply(this.physics, arguments);\n };\n\n Network.prototype.stabilize = function () {\n return this.physics.stabilize.apply(this.physics, arguments);\n };\n\n Network.prototype.getSelection = function () {\n return this.selectionHandler.getSelection.apply(this.selectionHandler, arguments);\n };\n\n Network.prototype.setSelection = function () {\n return this.selectionHandler.setSelection.apply(this.selectionHandler, arguments);\n };\n\n Network.prototype.getSelectedNodes = function () {\n return this.selectionHandler.getSelectedNodes.apply(this.selectionHandler, arguments);\n };\n\n Network.prototype.getSelectedEdges = function () {\n return this.selectionHandler.getSelectedEdges.apply(this.selectionHandler, arguments);\n };\n\n Network.prototype.getNodeAt = function () {\n var node = this.selectionHandler.getNodeAt.apply(this.selectionHandler, arguments);\n\n if (node !== undefined && node.id !== undefined) {\n return node.id;\n }\n\n return node;\n };\n\n Network.prototype.getEdgeAt = function () {\n var edge = this.selectionHandler.getEdgeAt.apply(this.selectionHandler, arguments);\n\n if (edge !== undefined && edge.id !== undefined) {\n return edge.id;\n }\n\n return edge;\n };\n\n Network.prototype.selectNodes = function () {\n return this.selectionHandler.selectNodes.apply(this.selectionHandler, arguments);\n };\n\n Network.prototype.selectEdges = function () {\n return this.selectionHandler.selectEdges.apply(this.selectionHandler, arguments);\n };\n\n Network.prototype.unselectAll = function () {\n this.selectionHandler.unselectAll.apply(this.selectionHandler, arguments);\n this.redraw();\n };\n\n Network.prototype.redraw = function () {\n return this.renderer.redraw.apply(this.renderer, arguments);\n };\n\n Network.prototype.getScale = function () {\n return this.view.getScale.apply(this.view, arguments);\n };\n\n Network.prototype.getViewPosition = function () {\n return this.view.getViewPosition.apply(this.view, arguments);\n };\n\n Network.prototype.fit = function () {\n return this.view.fit.apply(this.view, arguments);\n };\n\n Network.prototype.moveTo = function () {\n return this.view.moveTo.apply(this.view, arguments);\n };\n\n Network.prototype.focus = function () {\n return this.view.focus.apply(this.view, arguments);\n };\n\n Network.prototype.releaseNode = function () {\n return this.view.releaseNode.apply(this.view, arguments);\n };\n\n Network.prototype.getOptionsFromConfigurator = function () {\n var options = {};\n\n if (this.configurator) {\n options = this.configurator.getOptions.apply(this.configurator);\n }\n\n return options;\n };\n\n module.exports = Network;\n /***/\n },\n /* 160 */\n\n /***/\n function (module, exports, __webpack_require__) {\n \"use strict\";\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n\n var _classCallCheck2 = __webpack_require__(119);\n\n var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\n var _createClass2 = __webpack_require__(120);\n\n var _createClass3 = _interopRequireDefault(_createClass2);\n\n function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n \"default\": obj\n };\n }\n /**\n * @class Images\n * This class loads images and keeps them stored.\n */\n\n\n var Images = function () {\n function Images(callback) {\n (0, _classCallCheck3[\"default\"])(this, Images);\n this.images = {};\n this.imageBroken = {};\n this.callback = callback;\n }\n /**\n * @param {string} url The Url to cache the image as \n * @return {Image} imageToLoadBrokenUrlOn The image object\n */\n\n\n (0, _createClass3[\"default\"])(Images, [{\n key: \"_addImageToCache\",\n value: function _addImageToCache(url, imageToCache) {\n // IE11 fix -- thanks dponch!\n if (imageToCache.width === 0) {\n document.body.appendChild(imageToCache);\n imageToCache.width = imageToCache.offsetWidth;\n imageToCache.height = imageToCache.offsetHeight;\n document.body.removeChild(imageToCache);\n }\n\n this.images[url] = imageToCache;\n }\n /**\n * @param {string} url The original Url that failed to load, if the broken image is successfully loaded it will be added to the cache using this Url as the key so that subsequent requests for this Url will return the broken image\n * @param {string} brokenUrl Url the broken image to try and load\n * @return {Image} imageToLoadBrokenUrlOn The image object\n */\n\n }, {\n key: \"_tryloadBrokenUrl\",\n value: function _tryloadBrokenUrl(url, brokenUrl, imageToLoadBrokenUrlOn) {\n var _this = this; //If any of the parameters aren't specified then exit the function because nothing constructive can be done\n\n\n if (url === undefined || brokenUrl === undefined || imageToLoadBrokenUrlOn === undefined) return; //Clear the old subscription to the error event and put a new in place that only handle errors in loading the brokenImageUrl\n\n imageToLoadBrokenUrlOn.onerror = function () {\n console.error(\"Could not load brokenImage:\", brokenUrl); //Add an empty image to the cache so that when subsequent load calls are made for the url we don't try load the image and broken image again\n\n _this._addImageToCache(url, new Image());\n }; //Set the source of the image to the brokenUrl, this is actually what kicks off the loading of the broken image\n\n\n imageToLoadBrokenUrlOn.src = brokenUrl;\n }\n /**\n * @return {Image} imageToRedrawWith The images that will be passed to the callback when it is invoked\n */\n\n }, {\n key: \"_redrawWithImage\",\n value: function _redrawWithImage(imageToRedrawWith) {\n if (this.callback) {\n this.callback(imageToRedrawWith);\n }\n }\n /**\n * @param {string} url Url of the image\n * @param {string} brokenUrl Url of an image to use if the url image is not found\n * @return {Image} img The image object\n */\n\n }, {\n key: \"load\",\n value: function load(url, brokenUrl, id) {\n var _this2 = this; //Try and get the image from the cache, if successful then return the cached image \n\n\n var cachedImage = this.images[url];\n if (cachedImage) return cachedImage; //Create a new image\n\n var img = new Image(); //Subscribe to the event that is raised if the image loads successfully \n\n img.onload = function () {\n //Add the image to the cache and then request a redraw\n _this2._addImageToCache(url, img);\n\n _this2._redrawWithImage(img);\n }; //Subscribe to the event that is raised if the image fails to load\n\n\n img.onerror = function () {\n console.error(\"Could not load image:\", url); //Try and load the image specified by the brokenUrl using\n\n _this2._tryloadBrokenUrl(url, brokenUrl, img);\n }; //Set the source of the image to the url, this is actuall what kicks off the loading of the image\n\n\n img.src = url; //Return the new image\n\n return img;\n }\n }]);\n return Images;\n }();\n\n exports[\"default\"] = Images;\n /***/\n },\n /* 161 */\n\n /***/\n function (module, exports, __webpack_require__) {\n \"use strict\";\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n\n var _classCallCheck2 = __webpack_require__(119);\n\n var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\n var _createClass2 = __webpack_require__(120);\n\n var _createClass3 = _interopRequireDefault(_createClass2);\n\n function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n \"default\": obj\n };\n }\n\n var util = __webpack_require__(1);\n /**\n * @class Groups\n * This class can store groups and options specific for groups.\n */\n\n\n var Groups = function () {\n function Groups() {\n (0, _classCallCheck3[\"default\"])(this, Groups);\n this.clear();\n this.defaultIndex = 0;\n this.groupsArray = [];\n this.groupIndex = 0;\n this.defaultGroups = [{\n border: \"#2B7CE9\",\n background: \"#97C2FC\",\n highlight: {\n border: \"#2B7CE9\",\n background: \"#D2E5FF\"\n },\n hover: {\n border: \"#2B7CE9\",\n background: \"#D2E5FF\"\n }\n }, // 0: blue\n {\n border: \"#FFA500\",\n background: \"#FFFF00\",\n highlight: {\n border: \"#FFA500\",\n background: \"#FFFFA3\"\n },\n hover: {\n border: \"#FFA500\",\n background: \"#FFFFA3\"\n }\n }, // 1: yellow\n {\n border: \"#FA0A10\",\n background: \"#FB7E81\",\n highlight: {\n border: \"#FA0A10\",\n background: \"#FFAFB1\"\n },\n hover: {\n border: \"#FA0A10\",\n background: \"#FFAFB1\"\n }\n }, // 2: red\n {\n border: \"#41A906\",\n background: \"#7BE141\",\n highlight: {\n border: \"#41A906\",\n background: \"#A1EC76\"\n },\n hover: {\n border: \"#41A906\",\n background: \"#A1EC76\"\n }\n }, // 3: green\n {\n border: \"#E129F0\",\n background: \"#EB7DF4\",\n highlight: {\n border: \"#E129F0\",\n background: \"#F0B3F5\"\n },\n hover: {\n border: \"#E129F0\",\n background: \"#F0B3F5\"\n }\n }, // 4: magenta\n {\n border: \"#7C29F0\",\n background: \"#AD85E4\",\n highlight: {\n border: \"#7C29F0\",\n background: \"#D3BDF0\"\n },\n hover: {\n border: \"#7C29F0\",\n background: \"#D3BDF0\"\n }\n }, // 5: purple\n {\n border: \"#C37F00\",\n background: \"#FFA807\",\n highlight: {\n border: \"#C37F00\",\n background: \"#FFCA66\"\n },\n hover: {\n border: \"#C37F00\",\n background: \"#FFCA66\"\n }\n }, // 6: orange\n {\n border: \"#4220FB\",\n background: \"#6E6EFD\",\n highlight: {\n border: \"#4220FB\",\n background: \"#9B9BFD\"\n },\n hover: {\n border: \"#4220FB\",\n background: \"#9B9BFD\"\n }\n }, // 7: darkblue\n {\n border: \"#FD5A77\",\n background: \"#FFC0CB\",\n highlight: {\n border: \"#FD5A77\",\n background: \"#FFD1D9\"\n },\n hover: {\n border: \"#FD5A77\",\n background: \"#FFD1D9\"\n }\n }, // 8: pink\n {\n border: \"#4AD63A\",\n background: \"#C2FABC\",\n highlight: {\n border: \"#4AD63A\",\n background: \"#E6FFE3\"\n },\n hover: {\n border: \"#4AD63A\",\n background: \"#E6FFE3\"\n }\n }, // 9: mint\n {\n border: \"#990000\",\n background: \"#EE0000\",\n highlight: {\n border: \"#BB0000\",\n background: \"#FF3333\"\n },\n hover: {\n border: \"#BB0000\",\n background: \"#FF3333\"\n }\n }, // 10:bright red\n {\n border: \"#FF6000\",\n background: \"#FF6000\",\n highlight: {\n border: \"#FF6000\",\n background: \"#FF6000\"\n },\n hover: {\n border: \"#FF6000\",\n background: \"#FF6000\"\n }\n }, // 12: real orange\n {\n border: \"#97C2FC\",\n background: \"#2B7CE9\",\n highlight: {\n border: \"#D2E5FF\",\n background: \"#2B7CE9\"\n },\n hover: {\n border: \"#D2E5FF\",\n background: \"#2B7CE9\"\n }\n }, // 13: blue\n {\n border: \"#399605\",\n background: \"#255C03\",\n highlight: {\n border: \"#399605\",\n background: \"#255C03\"\n },\n hover: {\n border: \"#399605\",\n background: \"#255C03\"\n }\n }, // 14: green\n {\n border: \"#B70054\",\n background: \"#FF007E\",\n highlight: {\n border: \"#B70054\",\n background: \"#FF007E\"\n },\n hover: {\n border: \"#B70054\",\n background: \"#FF007E\"\n }\n }, // 15: magenta\n {\n border: \"#AD85E4\",\n background: \"#7C29F0\",\n highlight: {\n border: \"#D3BDF0\",\n background: \"#7C29F0\"\n },\n hover: {\n border: \"#D3BDF0\",\n background: \"#7C29F0\"\n }\n }, // 16: purple\n {\n border: \"#4557FA\",\n background: \"#000EA1\",\n highlight: {\n border: \"#6E6EFD\",\n background: \"#000EA1\"\n },\n hover: {\n border: \"#6E6EFD\",\n background: \"#000EA1\"\n }\n }, // 17: darkblue\n {\n border: \"#FFC0CB\",\n background: \"#FD5A77\",\n highlight: {\n border: \"#FFD1D9\",\n background: \"#FD5A77\"\n },\n hover: {\n border: \"#FFD1D9\",\n background: \"#FD5A77\"\n }\n }, // 18: pink\n {\n border: \"#C2FABC\",\n background: \"#74D66A\",\n highlight: {\n border: \"#E6FFE3\",\n background: \"#74D66A\"\n },\n hover: {\n border: \"#E6FFE3\",\n background: \"#74D66A\"\n }\n }, // 19: mint\n {\n border: \"#EE0000\",\n background: \"#990000\",\n highlight: {\n border: \"#FF3333\",\n background: \"#BB0000\"\n },\n hover: {\n border: \"#FF3333\",\n background: \"#BB0000\"\n } // 20:bright red\n\n }];\n this.options = {};\n this.defaultOptions = {\n useDefaultGroups: true\n };\n util.extend(this.options, this.defaultOptions);\n }\n\n (0, _createClass3[\"default\"])(Groups, [{\n key: \"setOptions\",\n value: function setOptions(options) {\n var optionFields = ['useDefaultGroups'];\n\n if (options !== undefined) {\n for (var groupName in options) {\n if (options.hasOwnProperty(groupName)) {\n if (optionFields.indexOf(groupName) === -1) {\n var group = options[groupName];\n this.add(groupName, group);\n }\n }\n }\n }\n }\n /**\n * Clear all groups\n */\n\n }, {\n key: \"clear\",\n value: function clear() {\n this.groups = {};\n this.groupsArray = [];\n }\n /**\n * get group options of a groupname. If groupname is not found, a new group\n * is added.\n * @param {*} groupname Can be a number, string, Date, etc.\n * @return {Object} group The created group, containing all group options\n */\n\n }, {\n key: \"get\",\n value: function get(groupname) {\n var group = this.groups[groupname];\n\n if (group === undefined) {\n if (this.options.useDefaultGroups === false && this.groupsArray.length > 0) {\n // create new group\n var index = this.groupIndex % this.groupsArray.length;\n this.groupIndex++;\n group = {};\n group.color = this.groups[this.groupsArray[index]];\n this.groups[groupname] = group;\n } else {\n // create new group\n var _index = this.defaultIndex % this.defaultGroups.length;\n\n this.defaultIndex++;\n group = {};\n group.color = this.defaultGroups[_index];\n this.groups[groupname] = group;\n }\n }\n\n return group;\n }\n /**\n * Add a custom group style\n * @param {String} groupName\n * @param {Object} style An object containing borderColor,\n * backgroundColor, etc.\n * @return {Object} group The created group object\n */\n\n }, {\n key: \"add\",\n value: function add(groupName, style) {\n this.groups[groupName] = style;\n this.groupsArray.push(groupName);\n return style;\n }\n }]);\n return Groups;\n }();\n\n exports[\"default\"] = Groups;\n /***/\n },\n /* 162 */\n\n /***/\n function (module, exports, __webpack_require__) {\n 'use strict';\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n\n var _classCallCheck2 = __webpack_require__(119);\n\n var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\n var _createClass2 = __webpack_require__(120);\n\n var _createClass3 = _interopRequireDefault(_createClass2);\n\n var _Node = __webpack_require__(163);\n\n var _Node2 = _interopRequireDefault(_Node);\n\n var _Label = __webpack_require__(164);\n\n var _Label2 = _interopRequireDefault(_Label);\n\n function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n 'default': obj\n };\n }\n\n var util = __webpack_require__(1);\n\n var DataSet = __webpack_require__(89);\n\n var DataView = __webpack_require__(93);\n\n var NodesHandler = function () {\n function NodesHandler(body, images, groups, layoutEngine) {\n var _this = this;\n\n (0, _classCallCheck3['default'])(this, NodesHandler);\n this.body = body;\n this.images = images;\n this.groups = groups;\n this.layoutEngine = layoutEngine; // create the node API in the body container\n\n this.body.functions.createNode = this.create.bind(this);\n this.nodesListeners = {\n add: function add(event, params) {\n _this.add(params.items);\n },\n update: function update(event, params) {\n _this.update(params.items, params.data);\n },\n remove: function remove(event, params) {\n _this.remove(params.items);\n }\n };\n this.options = {};\n this.defaultOptions = {\n borderWidth: 1,\n borderWidthSelected: 2,\n brokenImage: undefined,\n color: {\n border: '#2B7CE9',\n background: '#97C2FC',\n highlight: {\n border: '#2B7CE9',\n background: '#D2E5FF'\n },\n hover: {\n border: '#2B7CE9',\n background: '#D2E5FF'\n }\n },\n fixed: {\n x: false,\n y: false\n },\n font: {\n color: '#343434',\n size: 14,\n // px\n face: 'arial',\n background: 'none',\n strokeWidth: 0,\n // px\n strokeColor: '#ffffff',\n align: 'center',\n vadjust: 0,\n multi: false,\n bold: {\n mod: 'bold'\n },\n boldital: {\n mod: 'bold italic'\n },\n ital: {\n mod: 'italic'\n },\n mono: {\n mod: '',\n size: 15,\n // px\n face: 'courier new',\n vadjust: 2\n }\n },\n group: undefined,\n hidden: false,\n icon: {\n face: 'FontAwesome',\n //'FontAwesome',\n code: undefined,\n //'\\uf007',\n size: 50,\n //50,\n color: '#2B7CE9' //'#aa00ff'\n\n },\n image: undefined,\n // --> URL\n label: undefined,\n labelHighlightBold: true,\n level: undefined,\n margin: {\n top: 5,\n right: 5,\n bottom: 5,\n left: 5\n },\n mass: 1,\n physics: true,\n scaling: {\n min: 10,\n max: 30,\n label: {\n enabled: false,\n min: 14,\n max: 30,\n maxVisible: 30,\n drawThreshold: 5\n },\n customScalingFunction: function customScalingFunction(min, max, total, value) {\n if (max === min) {\n return 0.5;\n } else {\n var scale = 1 / (max - min);\n return Math.max(0, (value - min) * scale);\n }\n }\n },\n shadow: {\n enabled: false,\n color: 'rgba(0,0,0,0.5)',\n size: 10,\n x: 5,\n y: 5\n },\n shape: 'ellipse',\n shapeProperties: {\n borderDashes: false,\n // only for borders\n borderRadius: 6,\n // only for box shape\n interpolation: true,\n // only for image and circularImage shapes\n useImageSize: false,\n // only for image and circularImage shapes\n useBorderWithImage: false // only for image shape\n\n },\n size: 25,\n title: undefined,\n value: undefined,\n x: undefined,\n y: undefined\n };\n util.extend(this.options, this.defaultOptions);\n this.bindEventListeners();\n }\n\n (0, _createClass3['default'])(NodesHandler, [{\n key: 'bindEventListeners',\n value: function bindEventListeners() {\n var _this2 = this; // refresh the nodes. Used when reverting from hierarchical layout\n\n\n this.body.emitter.on('refreshNodes', this.refresh.bind(this));\n this.body.emitter.on('refresh', this.refresh.bind(this));\n this.body.emitter.on('destroy', function () {\n util.forEach(_this2.nodesListeners, function (callback, event) {\n if (_this2.body.data.nodes) _this2.body.data.nodes.off(event, callback);\n });\n delete _this2.body.functions.createNode;\n delete _this2.nodesListeners.add;\n delete _this2.nodesListeners.update;\n delete _this2.nodesListeners.remove;\n delete _this2.nodesListeners;\n });\n }\n }, {\n key: 'setOptions',\n value: function setOptions(options) {\n this.nodeOptions = options;\n\n if (options !== undefined) {\n _Node2['default'].parseOptions(this.options, options); // update the shape in all nodes\n\n\n if (options.shape !== undefined) {\n for (var nodeId in this.body.nodes) {\n if (this.body.nodes.hasOwnProperty(nodeId)) {\n this.body.nodes[nodeId].updateShape();\n }\n }\n } // update the font in all nodes\n\n\n if (options.font !== undefined) {\n _Label2['default'].parseOptions(this.options.font, options);\n\n for (var _nodeId in this.body.nodes) {\n if (this.body.nodes.hasOwnProperty(_nodeId)) {\n this.body.nodes[_nodeId].updateLabelModule();\n\n this.body.nodes[_nodeId]._reset();\n }\n }\n } // update the shape size in all nodes\n\n\n if (options.size !== undefined) {\n for (var _nodeId2 in this.body.nodes) {\n if (this.body.nodes.hasOwnProperty(_nodeId2)) {\n this.body.nodes[_nodeId2]._reset();\n }\n }\n } // update the state of the letiables if needed\n\n\n if (options.hidden !== undefined || options.physics !== undefined) {\n this.body.emitter.emit('_dataChanged');\n }\n }\n }\n /**\n * Set a data set with nodes for the network\n * @param {Array | DataSet | DataView} nodes The data containing the nodes.\n * @private\n */\n\n }, {\n key: 'setData',\n value: function setData(nodes) {\n var doNotEmit = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n var oldNodesData = this.body.data.nodes;\n\n if (nodes instanceof DataSet || nodes instanceof DataView) {\n this.body.data.nodes = nodes;\n } else if (Array.isArray(nodes)) {\n this.body.data.nodes = new DataSet();\n this.body.data.nodes.add(nodes);\n } else if (!nodes) {\n this.body.data.nodes = new DataSet();\n } else {\n throw new TypeError('Array or DataSet expected');\n }\n\n if (oldNodesData) {\n // unsubscribe from old dataset\n util.forEach(this.nodesListeners, function (callback, event) {\n oldNodesData.off(event, callback);\n });\n } // remove drawn nodes\n\n\n this.body.nodes = {};\n\n if (this.body.data.nodes) {\n // subscribe to new dataset\n var me = this;\n util.forEach(this.nodesListeners, function (callback, event) {\n me.body.data.nodes.on(event, callback);\n }); // draw all new nodes\n\n var ids = this.body.data.nodes.getIds();\n this.add(ids, true);\n }\n\n if (doNotEmit === false) {\n this.body.emitter.emit(\"_dataChanged\");\n }\n }\n /**\n * Add nodes\n * @param {Number[] | String[]} ids\n * @private\n */\n\n }, {\n key: 'add',\n value: function add(ids) {\n var doNotEmit = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n var id = void 0;\n var newNodes = [];\n\n for (var i = 0; i < ids.length; i++) {\n id = ids[i];\n var properties = this.body.data.nodes.get(id);\n var node = this.create(properties);\n newNodes.push(node);\n this.body.nodes[id] = node; // note: this may replace an existing node\n }\n\n this.layoutEngine.positionInitially(newNodes);\n\n if (doNotEmit === false) {\n this.body.emitter.emit(\"_dataChanged\");\n }\n }\n /**\n * Update existing nodes, or create them when not yet existing\n * @param {Number[] | String[]} ids\n * @private\n */\n\n }, {\n key: 'update',\n value: function update(ids, changedData) {\n var nodes = this.body.nodes;\n var dataChanged = false;\n\n for (var i = 0; i < ids.length; i++) {\n var id = ids[i];\n var node = nodes[id];\n var data = changedData[i];\n\n if (node !== undefined) {\n // update node\n dataChanged = node.setOptions(data);\n } else {\n dataChanged = true; // create node\n\n node = this.create(data);\n nodes[id] = node;\n }\n }\n\n if (dataChanged === true) {\n this.body.emitter.emit(\"_dataChanged\");\n } else {\n this.body.emitter.emit(\"_dataUpdated\");\n }\n }\n /**\n * Remove existing nodes. If nodes do not exist, the method will just ignore it.\n * @param {Number[] | String[]} ids\n * @private\n */\n\n }, {\n key: 'remove',\n value: function remove(ids) {\n var nodes = this.body.nodes;\n\n for (var i = 0; i < ids.length; i++) {\n var id = ids[i];\n delete nodes[id];\n }\n\n this.body.emitter.emit(\"_dataChanged\");\n }\n /**\n * create a node\n * @param properties\n * @param constructorClass\n */\n\n }, {\n key: 'create',\n value: function create(properties) {\n var constructorClass = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _Node2['default'];\n return new constructorClass(properties, this.body, this.images, this.groups, this.options, this.defaultOptions, this.nodeOptions);\n }\n }, {\n key: 'refresh',\n value: function refresh() {\n var clearPositions = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n var nodes = this.body.nodes;\n\n for (var nodeId in nodes) {\n var node = undefined;\n\n if (nodes.hasOwnProperty(nodeId)) {\n node = nodes[nodeId];\n }\n\n var data = this.body.data.nodes._data[nodeId];\n\n if (node !== undefined && data !== undefined) {\n if (clearPositions === true) {\n node.setOptions({\n x: null,\n y: null\n });\n }\n\n node.setOptions({\n fixed: false\n });\n node.setOptions(data);\n }\n }\n }\n /**\n * Returns the positions of the nodes.\n * @param ids --> optional, can be array of nodeIds, can be string\n * @returns {{}}\n */\n\n }, {\n key: 'getPositions',\n value: function getPositions(ids) {\n var dataArray = {};\n\n if (ids !== undefined) {\n if (Array.isArray(ids) === true) {\n for (var i = 0; i < ids.length; i++) {\n if (this.body.nodes[ids[i]] !== undefined) {\n var node = this.body.nodes[ids[i]];\n dataArray[ids[i]] = {\n x: Math.round(node.x),\n y: Math.round(node.y)\n };\n }\n }\n } else {\n if (this.body.nodes[ids] !== undefined) {\n var _node = this.body.nodes[ids];\n dataArray[ids] = {\n x: Math.round(_node.x),\n y: Math.round(_node.y)\n };\n }\n }\n } else {\n for (var _i = 0; _i < this.body.nodeIndices.length; _i++) {\n var _node2 = this.body.nodes[this.body.nodeIndices[_i]];\n dataArray[this.body.nodeIndices[_i]] = {\n x: Math.round(_node2.x),\n y: Math.round(_node2.y)\n };\n }\n }\n\n return dataArray;\n }\n /**\n * Load the XY positions of the nodes into the dataset.\n */\n\n }, {\n key: 'storePositions',\n value: function storePositions() {\n // todo: add support for clusters and hierarchical.\n var dataArray = [];\n var dataset = this.body.data.nodes.getDataSet();\n\n for (var nodeId in dataset._data) {\n if (dataset._data.hasOwnProperty(nodeId)) {\n var node = this.body.nodes[nodeId];\n\n if (dataset._data[nodeId].x != Math.round(node.x) || dataset._data[nodeId].y != Math.round(node.y)) {\n dataArray.push({\n id: node.id,\n x: Math.round(node.x),\n y: Math.round(node.y)\n });\n }\n }\n }\n\n dataset.update(dataArray);\n }\n /**\n * get the bounding box of a node.\n * @param nodeId\n * @returns {j|*}\n */\n\n }, {\n key: 'getBoundingBox',\n value: function getBoundingBox(nodeId) {\n if (this.body.nodes[nodeId] !== undefined) {\n return this.body.nodes[nodeId].shape.boundingBox;\n }\n }\n /**\n * Get the Ids of nodes connected to this node.\n * @param nodeId\n * @returns {Array}\n */\n\n }, {\n key: 'getConnectedNodes',\n value: function getConnectedNodes(nodeId) {\n var nodeList = [];\n\n if (this.body.nodes[nodeId] !== undefined) {\n var node = this.body.nodes[nodeId];\n var nodeObj = {}; // used to quickly check if node already exists\n\n for (var i = 0; i < node.edges.length; i++) {\n var edge = node.edges[i];\n\n if (edge.toId == node.id) {\n // these are double equals since ids can be numeric or string\n if (nodeObj[edge.fromId] === undefined) {\n nodeList.push(edge.fromId);\n nodeObj[edge.fromId] = true;\n }\n } else if (edge.fromId == node.id) {\n // these are double equals since ids can be numeric or string\n if (nodeObj[edge.toId] === undefined) {\n nodeList.push(edge.toId);\n nodeObj[edge.toId] = true;\n }\n }\n }\n }\n\n return nodeList;\n }\n /**\n * Get the ids of the edges connected to this node.\n * @param nodeId\n * @returns {*}\n */\n\n }, {\n key: 'getConnectedEdges',\n value: function getConnectedEdges(nodeId) {\n var edgeList = [];\n\n if (this.body.nodes[nodeId] !== undefined) {\n var node = this.body.nodes[nodeId];\n\n for (var i = 0; i < node.edges.length; i++) {\n edgeList.push(node.edges[i].id);\n }\n } else {\n console.log(\"NodeId provided for getConnectedEdges does not exist. Provided: \", nodeId);\n }\n\n return edgeList;\n }\n /**\n * Move a node.\n * @param String nodeId\n * @param Number x\n * @param Number y\n */\n\n }, {\n key: 'moveNode',\n value: function moveNode(nodeId, x, y) {\n var _this3 = this;\n\n if (this.body.nodes[nodeId] !== undefined) {\n this.body.nodes[nodeId].x = Number(x);\n this.body.nodes[nodeId].y = Number(y);\n setTimeout(function () {\n _this3.body.emitter.emit(\"startSimulation\");\n }, 0);\n } else {\n console.log(\"Node id supplied to moveNode does not exist. Provided: \", nodeId);\n }\n }\n }]);\n return NodesHandler;\n }();\n\n exports['default'] = NodesHandler;\n /***/\n },\n /* 163 */\n\n /***/\n function (module, exports, __webpack_require__) {\n 'use strict';\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n\n var _typeof2 = __webpack_require__(62);\n\n var _typeof3 = _interopRequireDefault(_typeof2);\n\n var _classCallCheck2 = __webpack_require__(119);\n\n var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\n var _createClass2 = __webpack_require__(120);\n\n var _createClass3 = _interopRequireDefault(_createClass2);\n\n var _Label = __webpack_require__(164);\n\n var _Label2 = _interopRequireDefault(_Label);\n\n var _Box = __webpack_require__(169);\n\n var _Box2 = _interopRequireDefault(_Box);\n\n var _Circle = __webpack_require__(180);\n\n var _Circle2 = _interopRequireDefault(_Circle);\n\n var _CircularImage = __webpack_require__(182);\n\n var _CircularImage2 = _interopRequireDefault(_CircularImage);\n\n var _Database = __webpack_require__(183);\n\n var _Database2 = _interopRequireDefault(_Database);\n\n var _Diamond = __webpack_require__(184);\n\n var _Diamond2 = _interopRequireDefault(_Diamond);\n\n var _Dot = __webpack_require__(186);\n\n var _Dot2 = _interopRequireDefault(_Dot);\n\n var _Ellipse = __webpack_require__(187);\n\n var _Ellipse2 = _interopRequireDefault(_Ellipse);\n\n var _Icon = __webpack_require__(188);\n\n var _Icon2 = _interopRequireDefault(_Icon);\n\n var _Image = __webpack_require__(189);\n\n var _Image2 = _interopRequireDefault(_Image);\n\n var _Square = __webpack_require__(190);\n\n var _Square2 = _interopRequireDefault(_Square);\n\n var _Star = __webpack_require__(191);\n\n var _Star2 = _interopRequireDefault(_Star);\n\n var _Text = __webpack_require__(192);\n\n var _Text2 = _interopRequireDefault(_Text);\n\n var _Triangle = __webpack_require__(193);\n\n var _Triangle2 = _interopRequireDefault(_Triangle);\n\n var _TriangleDown = __webpack_require__(194);\n\n var _TriangleDown2 = _interopRequireDefault(_TriangleDown);\n\n var _Validator = __webpack_require__(126);\n\n var _Validator2 = _interopRequireDefault(_Validator);\n\n function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n 'default': obj\n };\n }\n\n var util = __webpack_require__(1);\n /**\n * @class Node\n * A node. A node can be connected to other nodes via one or multiple edges.\n * @param {object} options An object containing options for the node. All\n * options are optional, except for the id.\n * {number} id Id of the node. Required\n * {string} label Text label for the node\n * {number} x Horizontal position of the node\n * {number} y Vertical position of the node\n * {string} shape Node shape, available:\n * \"database\", \"circle\", \"ellipse\",\n * \"box\", \"image\", \"text\", \"dot\",\n * \"star\", \"triangle\", \"triangleDown\",\n * \"square\", \"icon\"\n * {string} image An image url\n * {string} title An title text, can be HTML\n * {anytype} group A group name or number\n * @param {Network.Images} imagelist A list with images. Only needed\n * when the node has an image\n * @param {Network.Groups} grouplist A list with groups. Needed for\n * retrieving group options\n * @param {Object} constants An object with default values for\n * example for the color\n *\n */\n\n\n var Node = function () {\n function Node(options, body, imagelist, grouplist, globalOptions, defaultOptions, nodeOptions) {\n (0, _classCallCheck3['default'])(this, Node);\n this.options = util.bridgeObject(globalOptions);\n this.globalOptions = globalOptions;\n this.defaultOptions = defaultOptions;\n this.nodeOptions = nodeOptions;\n this.body = body;\n this.edges = []; // all edges connected to this node\n // set defaults for the options\n\n this.id = undefined;\n this.imagelist = imagelist;\n this.grouplist = grouplist; // state options\n\n this.x = undefined;\n this.y = undefined;\n this.baseSize = this.options.size;\n this.baseFontSize = this.options.font.size;\n this.predefinedPosition = false; // used to check if initial fit should just take the range or approximate\n\n this.selected = false;\n this.hover = false;\n this.labelModule = new _Label2['default'](this.body, this.options, false\n /* Not edge label */\n );\n this.setOptions(options);\n }\n /**\n * Attach a edge to the node\n * @param {Edge} edge\n */\n\n\n (0, _createClass3['default'])(Node, [{\n key: 'attachEdge',\n value: function attachEdge(edge) {\n if (this.edges.indexOf(edge) === -1) {\n this.edges.push(edge);\n }\n }\n /**\n * Detach a edge from the node\n * @param {Edge} edge\n */\n\n }, {\n key: 'detachEdge',\n value: function detachEdge(edge) {\n var index = this.edges.indexOf(edge);\n\n if (index != -1) {\n this.edges.splice(index, 1);\n }\n }\n /**\n * Set or overwrite options for the node\n * @param {Object} options an object with options\n * @param {Object} constants and object with default, global options\n */\n\n }, {\n key: 'setOptions',\n value: function setOptions(options) {\n var currentShape = this.options.shape;\n\n if (!options) {\n return;\n } // basic options\n\n\n if (options.id !== undefined) {\n this.id = options.id;\n }\n\n if (this.id === undefined) {\n throw \"Node must have an id\";\n } // set these options locally\n // clear x and y positions\n\n\n if (options.x !== undefined) {\n if (options.x === null) {\n this.x = undefined;\n this.predefinedPosition = false;\n } else {\n this.x = parseInt(options.x);\n this.predefinedPosition = true;\n }\n }\n\n if (options.y !== undefined) {\n if (options.y === null) {\n this.y = undefined;\n this.predefinedPosition = false;\n } else {\n this.y = parseInt(options.y);\n this.predefinedPosition = true;\n }\n }\n\n if (options.size !== undefined) {\n this.baseSize = options.size;\n }\n\n if (options.value !== undefined) {\n options.value = parseFloat(options.value);\n } // copy group options\n\n\n if (typeof options.group === 'number' || typeof options.group === 'string' && options.group != '') {\n var groupObj = this.grouplist.get(options.group);\n util.deepExtend(this.options, groupObj); // the color object needs to be completely defined. Since groups can partially overwrite the colors, we parse it again, just in case.\n\n this.options.color = util.parseColor(this.options.color);\n } // this transforms all shorthands into fully defined options\n\n\n Node.parseOptions(this.options, options, true, this.globalOptions);\n this.choosify(options); // load the images\n\n if (this.options.image !== undefined) {\n if (this.imagelist) {\n if (typeof this.options.image === 'string') {\n this.imageObj = this.imagelist.load(this.options.image, this.options.brokenImage, this.id);\n } else {\n this.imageObj = this.imagelist.load(this.options.image.unselected, this.options.brokenImage, this.id);\n this.imageObjAlt = this.imagelist.load(this.options.image.selected, this.options.brokenImage, this.id);\n }\n } else {\n throw \"No imagelist provided\";\n }\n }\n\n this.updateLabelModule(options);\n this.updateShape(currentShape);\n this.labelModule.propagateFonts(this.nodeOptions, options, this.defaultOptions);\n\n if (options.hidden !== undefined || options.physics !== undefined) {\n return true;\n }\n\n return false;\n }\n /**\n * This process all possible shorthands in the new options and makes sure that the parentOptions are fully defined.\n * Static so it can also be used by the handler.\n * @param parentOptions\n * @param newOptions\n * @param allowDeletion\n * @param globalOptions\n */\n\n }, {\n key: 'choosify',\n value: function choosify(options) {\n this.chooser = true;\n var pile = [options, this.options, this.defaultOptions];\n var chosen = util.topMost(pile, 'chosen');\n\n if (typeof chosen === 'boolean') {\n this.chooser = chosen;\n } else if ((typeof chosen === 'undefined' ? 'undefined' : (0, _typeof3['default'])(chosen)) === 'object') {\n var chosenNode = util.topMost(pile, ['chosen', 'node']);\n\n if (typeof chosenNode === 'boolean' || typeof chosenNode === 'function') {\n this.chooser = chosenNode;\n }\n }\n }\n }, {\n key: 'getFormattingValues',\n value: function getFormattingValues() {\n var values = {\n color: this.options.color.background,\n borderWidth: this.options.borderWidth,\n borderColor: this.options.color.border,\n size: this.options.size,\n borderDashes: this.options.shapeProperties.borderDashes,\n borderRadius: this.options.shapeProperties.borderRadius,\n shadow: this.options.shadow.enabled,\n shadowColor: this.options.shadow.color,\n shadowSize: this.options.shadow.size,\n shadowX: this.options.shadow.x,\n shadowY: this.options.shadow.y\n };\n\n if (this.selected || this.hover) {\n if (this.chooser === true) {\n if (this.selected) {\n values.borderWidth *= 2;\n values.color = this.options.color.highlight.background;\n values.borderColor = this.options.color.highlight.border;\n values.shadow = this.options.shadow.enabled;\n } else if (this.hover) {\n values.color = this.options.color.hover.background;\n values.borderColor = this.options.color.hover.border;\n values.shadow = this.options.shadow.enabled;\n }\n } else if (typeof this.chooser === 'function') {\n this.chooser(values, this.options.id, this.selected, this.hover);\n\n if (values.shadow === false) {\n if (values.shadowColor !== this.options.shadow.color || values.shadowSize !== this.options.shadow.size || values.shadowX !== this.options.shadow.x || values.shadowY !== this.options.shadow.y) {\n values.shadow = true;\n }\n }\n }\n } else {\n values.shadow = this.options.shadow.enabled;\n }\n\n return values;\n }\n }, {\n key: 'updateLabelModule',\n value: function updateLabelModule(options) {\n if (this.options.label === undefined || this.options.label === null) {\n this.options.label = '';\n }\n\n this.labelModule.setOptions(this.options, true);\n\n if (this.labelModule.baseSize !== undefined) {\n this.baseFontSize = this.labelModule.baseSize;\n }\n\n this.labelModule.constrain(this.nodeOptions, options, this.defaultOptions);\n this.labelModule.choosify(this.nodeOptions, options, this.defaultOptions);\n }\n }, {\n key: 'updateShape',\n value: function updateShape(currentShape) {\n if (currentShape === this.options.shape && this.shape) {\n this.shape.setOptions(this.options, this.imageObj, this.imageObjAlt);\n } else {\n // choose draw method depending on the shape\n switch (this.options.shape) {\n case 'box':\n this.shape = new _Box2['default'](this.options, this.body, this.labelModule);\n break;\n\n case 'circle':\n this.shape = new _Circle2['default'](this.options, this.body, this.labelModule);\n break;\n\n case 'circularImage':\n this.shape = new _CircularImage2['default'](this.options, this.body, this.labelModule, this.imageObj, this.imageObjAlt);\n break;\n\n case 'database':\n this.shape = new _Database2['default'](this.options, this.body, this.labelModule);\n break;\n\n case 'diamond':\n this.shape = new _Diamond2['default'](this.options, this.body, this.labelModule);\n break;\n\n case 'dot':\n this.shape = new _Dot2['default'](this.options, this.body, this.labelModule);\n break;\n\n case 'ellipse':\n this.shape = new _Ellipse2['default'](this.options, this.body, this.labelModule);\n break;\n\n case 'icon':\n this.shape = new _Icon2['default'](this.options, this.body, this.labelModule);\n break;\n\n case 'image':\n this.shape = new _Image2['default'](this.options, this.body, this.labelModule, this.imageObj, this.imageObjAlt);\n break;\n\n case 'square':\n this.shape = new _Square2['default'](this.options, this.body, this.labelModule);\n break;\n\n case 'star':\n this.shape = new _Star2['default'](this.options, this.body, this.labelModule);\n break;\n\n case 'text':\n this.shape = new _Text2['default'](this.options, this.body, this.labelModule);\n break;\n\n case 'triangle':\n this.shape = new _Triangle2['default'](this.options, this.body, this.labelModule);\n break;\n\n case 'triangleDown':\n this.shape = new _TriangleDown2['default'](this.options, this.body, this.labelModule);\n break;\n\n default:\n this.shape = new _Ellipse2['default'](this.options, this.body, this.labelModule);\n break;\n }\n }\n\n this._reset();\n }\n /**\n * select this node\n */\n\n }, {\n key: 'select',\n value: function select() {\n this.selected = true;\n\n this._reset();\n }\n /**\n * unselect this node\n */\n\n }, {\n key: 'unselect',\n value: function unselect() {\n this.selected = false;\n\n this._reset();\n }\n /**\n * Reset the calculated size of the node, forces it to recalculate its size\n * @private\n */\n\n }, {\n key: '_reset',\n value: function _reset() {\n this.shape.width = undefined;\n this.shape.height = undefined;\n }\n /**\n * get the title of this node.\n * @return {string} title The title of the node, or undefined when no title\n * has been set.\n */\n\n }, {\n key: 'getTitle',\n value: function getTitle() {\n return this.options.title;\n }\n /**\n * Calculate the distance to the border of the Node\n * @param {CanvasRenderingContext2D} ctx\n * @param {Number} angle Angle in radians\n * @returns {number} distance Distance to the border in pixels\n */\n\n }, {\n key: 'distanceToBorder',\n value: function distanceToBorder(ctx, angle) {\n return this.shape.distanceToBorder(ctx, angle);\n }\n /**\n * Check if this node has a fixed x and y position\n * @return {boolean} true if fixed, false if not\n */\n\n }, {\n key: 'isFixed',\n value: function isFixed() {\n return this.options.fixed.x && this.options.fixed.y;\n }\n /**\n * check if this node is selecte\n * @return {boolean} selected True if node is selected, else false\n */\n\n }, {\n key: 'isSelected',\n value: function isSelected() {\n return this.selected;\n }\n /**\n * Retrieve the value of the node. Can be undefined\n * @return {Number} value\n */\n\n }, {\n key: 'getValue',\n value: function getValue() {\n return this.options.value;\n }\n /**\n * Adjust the value range of the node. The node will adjust it's size\n * based on its value.\n * @param {Number} min\n * @param {Number} max\n */\n\n }, {\n key: 'setValueRange',\n value: function setValueRange(min, max, total) {\n if (this.options.value !== undefined) {\n var scale = this.options.scaling.customScalingFunction(min, max, total, this.options.value);\n var sizeDiff = this.options.scaling.max - this.options.scaling.min;\n\n if (this.options.scaling.label.enabled === true) {\n var fontDiff = this.options.scaling.label.max - this.options.scaling.label.min;\n this.options.font.size = this.options.scaling.label.min + scale * fontDiff;\n }\n\n this.options.size = this.options.scaling.min + scale * sizeDiff;\n } else {\n this.options.size = this.baseSize;\n this.options.font.size = this.baseFontSize;\n }\n\n this.updateLabelModule();\n }\n /**\n * Draw this node in the given canvas\n * The 2d context of a HTML canvas can be retrieved by canvas.getContext(\"2d\");\n * @param {CanvasRenderingContext2D} ctx\n */\n\n }, {\n key: 'draw',\n value: function draw(ctx) {\n var values = this.getFormattingValues();\n this.shape.draw(ctx, this.x, this.y, this.selected, this.hover, values);\n }\n /**\n * Update the bounding box of the shape\n */\n\n }, {\n key: 'updateBoundingBox',\n value: function updateBoundingBox(ctx) {\n this.shape.updateBoundingBox(this.x, this.y, ctx);\n }\n /**\n * Recalculate the size of this node in the given canvas\n * The 2d context of a HTML canvas can be retrieved by canvas.getContext(\"2d\");\n * @param {CanvasRenderingContext2D} ctx\n */\n\n }, {\n key: 'resize',\n value: function resize(ctx) {\n var values = this.getFormattingValues();\n this.shape.resize(ctx, this.selected, this.hover, values);\n }\n /**\n * Check if this object is overlapping with the provided object\n * @param {Object} obj an object with parameters left, top, right, bottom\n * @return {boolean} True if location is located on node\n */\n\n }, {\n key: 'isOverlappingWith',\n value: function isOverlappingWith(obj) {\n return this.shape.left < obj.right && this.shape.left + this.shape.width > obj.left && this.shape.top < obj.bottom && this.shape.top + this.shape.height > obj.top;\n }\n /**\n * Check if this object is overlapping with the provided object\n * @param {Object} obj an object with parameters left, top, right, bottom\n * @return {boolean} True if location is located on node\n */\n\n }, {\n key: 'isBoundingBoxOverlappingWith',\n value: function isBoundingBoxOverlappingWith(obj) {\n return this.shape.boundingBox.left < obj.right && this.shape.boundingBox.right > obj.left && this.shape.boundingBox.top < obj.bottom && this.shape.boundingBox.bottom > obj.top;\n }\n }], [{\n key: 'parseOptions',\n value: function parseOptions(parentOptions, newOptions) {\n var allowDeletion = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n var globalOptions = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};\n var fields = ['color', 'font', 'fixed', 'shadow'];\n util.selectiveNotDeepExtend(fields, parentOptions, newOptions, allowDeletion); // merge the shadow options into the parent.\n\n util.mergeOptions(parentOptions, newOptions, 'shadow', allowDeletion, globalOptions); // individual shape newOptions\n\n if (newOptions.color !== undefined && newOptions.color !== null) {\n var parsedColor = util.parseColor(newOptions.color);\n util.fillIfDefined(parentOptions.color, parsedColor);\n } else if (allowDeletion === true && newOptions.color === null) {\n parentOptions.color = util.bridgeObject(globalOptions.color); // set the object back to the global options\n } // handle the fixed options\n\n\n if (newOptions.fixed !== undefined && newOptions.fixed !== null) {\n if (typeof newOptions.fixed === 'boolean') {\n parentOptions.fixed.x = newOptions.fixed;\n parentOptions.fixed.y = newOptions.fixed;\n } else {\n if (newOptions.fixed.x !== undefined && typeof newOptions.fixed.x === 'boolean') {\n parentOptions.fixed.x = newOptions.fixed.x;\n }\n\n if (newOptions.fixed.y !== undefined && typeof newOptions.fixed.y === 'boolean') {\n parentOptions.fixed.y = newOptions.fixed.y;\n }\n }\n } // handle the font options\n\n\n if (newOptions.font !== undefined && newOptions.font !== null) {\n _Label2['default'].parseOptions(parentOptions.font, newOptions);\n } else if (allowDeletion === true && newOptions.font === null) {\n parentOptions.font = util.bridgeObject(globalOptions.font); // set the object back to the global options\n } // handle the scaling options, specifically the label part\n\n\n if (newOptions.scaling !== undefined) {\n util.mergeOptions(parentOptions.scaling, newOptions.scaling, 'label', allowDeletion, globalOptions.scaling);\n }\n }\n }]);\n return Node;\n }();\n\n exports['default'] = Node;\n /***/\n },\n /* 164 */\n\n /***/\n function (module, exports, __webpack_require__) {\n 'use strict';\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n\n var _slicedToArray2 = __webpack_require__(165);\n\n var _slicedToArray3 = _interopRequireDefault(_slicedToArray2);\n\n var _getIterator2 = __webpack_require__(2);\n\n var _getIterator3 = _interopRequireDefault(_getIterator2);\n\n var _typeof2 = __webpack_require__(62);\n\n var _typeof3 = _interopRequireDefault(_typeof2);\n\n var _classCallCheck2 = __webpack_require__(119);\n\n var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\n var _createClass2 = __webpack_require__(120);\n\n var _createClass3 = _interopRequireDefault(_createClass2);\n\n function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n 'default': obj\n };\n }\n\n var util = __webpack_require__(1);\n\n var Label = function () {\n function Label(body, options) {\n var edgelabel = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n (0, _classCallCheck3['default'])(this, Label);\n this.body = body;\n this.pointToSelf = false;\n this.baseSize = undefined;\n this.fontOptions = {};\n this.setOptions(options);\n this.size = {\n top: 0,\n left: 0,\n width: 0,\n height: 0,\n yLine: 0\n }; // could be cached\n\n this.isEdgeLabel = edgelabel;\n }\n\n (0, _createClass3['default'])(Label, [{\n key: 'setOptions',\n value: function setOptions(options) {\n var allowDeletion = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n this.elementOptions = options; // We want to keep the font options seperated from the node options.\n // The node options have to mirror the globals when they are not overruled.\n\n this.fontOptions = util.deepExtend({}, options.font, true);\n\n if (options.label !== undefined) {\n this.labelDirty = true;\n }\n\n if (options.font !== undefined) {\n Label.parseOptions(this.fontOptions, options, allowDeletion);\n\n if (typeof options.font === 'string') {\n this.baseSize = this.fontOptions.size;\n } else if ((0, _typeof3['default'])(options.font) === 'object') {\n if (options.font.size !== undefined) {\n this.baseSize = options.font.size;\n }\n }\n }\n }\n }, {\n key: 'constrain',\n // set the width and height constraints based on 'nearest' value\n value: function constrain(elementOptions, options, defaultOptions) {\n this.fontOptions.constrainWidth = false;\n this.fontOptions.maxWdt = -1;\n this.fontOptions.minWdt = -1;\n var pile = [options, elementOptions, defaultOptions];\n var widthConstraint = util.topMost(pile, 'widthConstraint');\n\n if (typeof widthConstraint === 'number') {\n this.fontOptions.maxWdt = Number(widthConstraint);\n this.fontOptions.minWdt = Number(widthConstraint);\n } else if ((typeof widthConstraint === 'undefined' ? 'undefined' : (0, _typeof3['default'])(widthConstraint)) === 'object') {\n var widthConstraintMaximum = util.topMost(pile, ['widthConstraint', 'maximum']);\n\n if (typeof widthConstraintMaximum === 'number') {\n this.fontOptions.maxWdt = Number(widthConstraintMaximum);\n }\n\n var widthConstraintMinimum = util.topMost(pile, ['widthConstraint', 'minimum']);\n\n if (typeof widthConstraintMinimum === 'number') {\n this.fontOptions.minWdt = Number(widthConstraintMinimum);\n }\n }\n\n this.fontOptions.constrainHeight = false;\n this.fontOptions.minHgt = -1;\n this.fontOptions.valign = 'middle';\n var heightConstraint = util.topMost(pile, 'heightConstraint');\n\n if (typeof heightConstraint === 'number') {\n this.fontOptions.minHgt = Number(heightConstraint);\n } else if ((typeof heightConstraint === 'undefined' ? 'undefined' : (0, _typeof3['default'])(heightConstraint)) === 'object') {\n var heightConstraintMinimum = util.topMost(pile, ['heightConstraint', 'minimum']);\n\n if (typeof heightConstraintMinimum === 'number') {\n this.fontOptions.minHgt = Number(heightConstraintMinimum);\n }\n\n var heightConstraintValign = util.topMost(pile, ['heightConstraint', 'valign']);\n\n if (typeof heightConstraintValign === 'string') {\n if (heightConstraintValign === 'top' || heightConstraintValign === 'bottom') {\n this.fontOptions.valign = heightConstraintValign;\n }\n }\n }\n } // set the selected functions based on 'nearest' value\n\n }, {\n key: 'choosify',\n value: function choosify(elementOptions, options, defaultOptions) {\n this.fontOptions.chooser = true;\n var pile = [options, elementOptions, defaultOptions];\n var chosen = util.topMost(pile, 'chosen');\n\n if (typeof chosen === 'boolean') {\n this.fontOptions.chooser = chosen;\n } else if ((typeof chosen === 'undefined' ? 'undefined' : (0, _typeof3['default'])(chosen)) === 'object') {\n var chosenLabel = util.topMost(pile, ['chosen', 'label']);\n\n if (typeof chosenLabel === 'boolean' || typeof chosenLabel === 'function') {\n this.fontOptions.chooser = chosenLabel;\n }\n }\n } // When margins are set in an element, adjust sizes is called to remove them\n // from the width/height constraints. This must be done prior to label sizing.\n\n }, {\n key: 'adjustSizes',\n value: function adjustSizes(margins) {\n var widthBias = margins ? margins.right + margins.left : 0;\n\n if (this.fontOptions.constrainWidth) {\n this.fontOptions.maxWdt -= widthBias;\n this.fontOptions.minWdt -= widthBias;\n }\n\n var heightBias = margins ? margins.top + margins.bottom : 0;\n\n if (this.fontOptions.constrainHeight) {\n this.fontOptions.minHgt -= heightBias;\n }\n }\n }, {\n key: 'propagateFonts',\n value: function propagateFonts(options, groupOptions, defaultOptions) {\n if (this.fontOptions.multi) {\n var mods = ['bold', 'ital', 'boldital', 'mono'];\n var _iteratorNormalCompletion = true;\n var _didIteratorError = false;\n var _iteratorError = undefined;\n\n try {\n for (var _iterator = (0, _getIterator3['default'])(mods), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var mod = _step.value;\n var optionsFontMod = void 0;\n\n if (options.font) {\n optionsFontMod = options.font[mod];\n }\n\n if (typeof optionsFontMod === 'string') {\n var modOptionsArray = optionsFontMod.split(\" \");\n this.fontOptions[mod].size = modOptionsArray[0].replace(\"px\", \"\");\n this.fontOptions[mod].face = modOptionsArray[1];\n this.fontOptions[mod].color = modOptionsArray[2];\n this.fontOptions[mod].vadjust = this.fontOptions.vadjust;\n this.fontOptions[mod].mod = defaultOptions.font[mod].mod;\n } else {\n // We need to be crafty about loading the modded fonts. We want as\n // much 'natural' versatility as we can get, so a simple global\n // change propagates in an expected way, even if not stictly logical.\n // face: We want to capture any direct settings and overrides, but\n // fall back to the base font if there aren't any. We make a\n // special exception for mono, since we probably don't want to\n // sync to a the base font face.\n //\n // if the mod face is in the node's options, use it\n // else if the mod face is in the global options, use it\n // else if the face is in the global options, use it\n // else use the base font's face.\n if (optionsFontMod && optionsFontMod.hasOwnProperty('face')) {\n this.fontOptions[mod].face = optionsFontMod.face;\n } else if (groupOptions.font && groupOptions.font[mod] && groupOptions.font[mod].hasOwnProperty('face')) {\n this.fontOptions[mod].face = groupOptions.font[mod].face;\n } else if (mod === 'mono') {\n this.fontOptions[mod].face = defaultOptions.font[mod].face;\n } else if (groupOptions.font && groupOptions.font.hasOwnProperty('face')) {\n this.fontOptions[mod].face = groupOptions.font.face;\n } else {\n this.fontOptions[mod].face = this.fontOptions.face;\n } // color: this is handled just like the face.\n\n\n if (optionsFontMod && optionsFontMod.hasOwnProperty('color')) {\n this.fontOptions[mod].color = optionsFontMod.color;\n } else if (groupOptions.font && groupOptions.font[mod] && groupOptions.font[mod].hasOwnProperty('color')) {\n this.fontOptions[mod].color = groupOptions.font[mod].color;\n } else if (groupOptions.font && groupOptions.font.hasOwnProperty('color')) {\n this.fontOptions[mod].color = groupOptions.font.color;\n } else {\n this.fontOptions[mod].color = this.fontOptions.color;\n } // mod: this is handled just like the face, except we never grab the\n // base font's mod. We know they're in the defaultOptions, and unless\n // we've been steered away from them, we use the default.\n\n\n if (optionsFontMod && optionsFontMod.hasOwnProperty('mod')) {\n this.fontOptions[mod].mod = optionsFontMod.mod;\n } else if (groupOptions.font && groupOptions.font[mod] && groupOptions.font[mod].hasOwnProperty('mod')) {\n this.fontOptions[mod].mod = groupOptions.font[mod].mod;\n } else if (groupOptions.font && groupOptions.font.hasOwnProperty('mod')) {\n this.fontOptions[mod].mod = groupOptions.font.mod;\n } else {\n this.fontOptions[mod].mod = defaultOptions.font[mod].mod;\n } // size: It's important that we size up defaults similarly if we're\n // using default faces unless overriden. We want to preserve the\n // ratios closely - but if faces have changed, all bets are off.\n //\n // if the mod size is in the node's options, use it\n // else if the mod size is in the global options, use it\n // else if the mod face is the same as the default and the base face\n // is the same as the default, scale the mod size using the same\n // ratio\n // else if the size is in the global options, use it\n // else use the base font's size.\n\n\n if (optionsFontMod && optionsFontMod.hasOwnProperty('size')) {\n this.fontOptions[mod].size = optionsFontMod.size;\n } else if (groupOptions.font && groupOptions.font[mod] && groupOptions.font[mod].hasOwnProperty('size')) {\n this.fontOptions[mod].size = groupOptions.font[mod].size;\n } else if (this.fontOptions[mod].face === defaultOptions.font[mod].face && this.fontOptions.face === defaultOptions.font.face) {\n var ratio = this.fontOptions.size / Number(defaultOptions.font.size);\n this.fontOptions[mod].size = defaultOptions.font[mod].size * ratio;\n } else if (groupOptions.font && groupOptions.font.hasOwnProperty('size')) {\n this.fontOptions[mod].size = groupOptions.font.size;\n } else {\n this.fontOptions[mod].size = this.fontOptions.size;\n } // vadjust: this is handled just like the size.\n\n\n if (optionsFontMod && optionsFontMod.hasOwnProperty('vadjust')) {\n this.fontOptions[mod].vadjust = optionsFontMod.vadjust;\n } else if (groupOptions.font && groupOptions.font[mod] && groupOptions.font[mod].hasOwnProperty('vadjust')) {\n this.fontOptions[mod].vadjust = groupOptions.font[mod].vadjust;\n } else if (this.fontOptions[mod].face === defaultOptions.font[mod].face && this.fontOptions.face === defaultOptions.font.face) {\n var _ratio = this.fontOptions.size / Number(defaultOptions.font.size);\n\n this.fontOptions[mod].vadjust = defaultOptions.font[mod].vadjust * Math.round(_ratio);\n } else if (groupOptions.font && groupOptions.font.hasOwnProperty('vadjust')) {\n this.fontOptions[mod].vadjust = groupOptions.font.vadjust;\n } else {\n this.fontOptions[mod].vadjust = this.fontOptions.vadjust;\n }\n }\n\n this.fontOptions[mod].size = Number(this.fontOptions[mod].size);\n this.fontOptions[mod].vadjust = Number(this.fontOptions[mod].vadjust);\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator['return']) {\n _iterator['return']();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n }\n }\n /**\n * Main function. This is called from anything that wants to draw a label.\n * @param ctx\n * @param x\n * @param y\n * @param selected\n * @param baseline\n */\n\n }, {\n key: 'draw',\n value: function draw(ctx, x, y, selected, hover) {\n var baseline = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 'middle'; // if no label, return\n\n if (this.elementOptions.label === undefined) return; // check if we have to render the label\n\n var viewFontSize = this.fontOptions.size * this.body.view.scale;\n if (this.elementOptions.label && viewFontSize < this.elementOptions.scaling.label.drawThreshold - 1) return; // update the size cache if required\n\n this.calculateLabelSize(ctx, selected, hover, x, y, baseline); // create the fontfill background\n\n this._drawBackground(ctx); // draw text\n\n\n this._drawText(ctx, selected, hover, x, y, baseline);\n }\n /**\n * Draws the label background\n * @param {CanvasRenderingContext2D} ctx\n * @private\n */\n\n }, {\n key: '_drawBackground',\n value: function _drawBackground(ctx) {\n if (this.fontOptions.background !== undefined && this.fontOptions.background !== \"none\") {\n ctx.fillStyle = this.fontOptions.background;\n var lineMargin = 2;\n\n if (this.isEdgeLabel) {\n switch (this.fontOptions.align) {\n case 'middle':\n ctx.fillRect(-this.size.width * 0.5, -this.size.height * 0.5, this.size.width, this.size.height);\n break;\n\n case 'top':\n ctx.fillRect(-this.size.width * 0.5, -(this.size.height + lineMargin), this.size.width, this.size.height);\n break;\n\n case 'bottom':\n ctx.fillRect(-this.size.width * 0.5, lineMargin, this.size.width, this.size.height);\n break;\n\n default:\n ctx.fillRect(this.size.left, this.size.top - 0.5 * lineMargin, this.size.width, this.size.height);\n break;\n }\n } else {\n ctx.fillRect(this.size.left, this.size.top - 0.5 * lineMargin, this.size.width, this.size.height);\n }\n }\n }\n /**\n *\n * @param ctx\n * @param x\n * @param baseline\n * @private\n */\n\n }, {\n key: '_drawText',\n value: function _drawText(ctx, selected, hover, x, y) {\n var baseline = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 'middle';\n var fontSize = this.fontOptions.size;\n var viewFontSize = fontSize * this.body.view.scale; // this ensures that there will not be HUGE letters on screen by setting an upper limit on the visible text size (regardless of zoomLevel)\n\n if (viewFontSize >= this.elementOptions.scaling.label.maxVisible) {\n fontSize = Number(this.elementOptions.scaling.label.maxVisible) / this.body.view.scale;\n }\n\n var yLine = this.size.yLine;\n\n var _setAlignment2 = this._setAlignment(ctx, x, yLine, baseline);\n\n var _setAlignment3 = (0, _slicedToArray3['default'])(_setAlignment2, 2);\n\n x = _setAlignment3[0];\n yLine = _setAlignment3[1];\n ctx.textAlign = 'left';\n x = x - this.size.width / 2; // Shift label 1/2-distance to the left\n\n if (this.fontOptions.valign && this.size.height > this.size.labelHeight) {\n if (this.fontOptions.valign === 'top') {\n yLine -= (this.size.height - this.size.labelHeight) / 2;\n }\n\n if (this.fontOptions.valign === 'bottom') {\n yLine += (this.size.height - this.size.labelHeight) / 2;\n }\n } // draw the text\n\n\n for (var i = 0; i < this.lineCount; i++) {\n if (this.lines[i] && this.lines[i].blocks) {\n var width = 0;\n\n if (this.isEdgeLabel || this.fontOptions.align === 'center') {\n width += (this.size.width - this.lines[i].width) / 2;\n } else if (this.fontOptions.align === 'right') {\n width += this.size.width - this.lines[i].width;\n }\n\n for (var j = 0; j < this.lines[i].blocks.length; j++) {\n var block = this.lines[i].blocks[j];\n ctx.font = block.font;\n\n var _getColor2 = this._getColor(block.color, viewFontSize, block.strokeColor),\n _getColor3 = (0, _slicedToArray3['default'])(_getColor2, 2),\n fontColor = _getColor3[0],\n strokeColor = _getColor3[1];\n\n if (block.strokeWidth > 0) {\n ctx.lineWidth = block.strokeWidth;\n ctx.strokeStyle = strokeColor;\n ctx.lineJoin = 'round';\n }\n\n ctx.fillStyle = fontColor;\n\n if (block.strokeWidth > 0) {\n ctx.strokeText(block.text, x + width, yLine + block.vadjust);\n }\n\n ctx.fillText(block.text, x + width, yLine + block.vadjust);\n width += block.width;\n }\n\n yLine += this.lines[i].height;\n }\n }\n }\n }, {\n key: '_setAlignment',\n value: function _setAlignment(ctx, x, yLine, baseline) {\n // check for label alignment (for edges)\n // TODO: make alignment for nodes\n if (this.isEdgeLabel && this.fontOptions.align !== 'horizontal' && this.pointToSelf === false) {\n x = 0;\n yLine = 0;\n var lineMargin = 2;\n\n if (this.fontOptions.align === 'top') {\n ctx.textBaseline = 'alphabetic';\n yLine -= 2 * lineMargin; // distance from edge, required because we use alphabetic. Alphabetic has less difference between browsers\n } else if (this.fontOptions.align === 'bottom') {\n ctx.textBaseline = 'hanging';\n yLine += 2 * lineMargin; // distance from edge, required because we use hanging. Hanging has less difference between browsers\n } else {\n ctx.textBaseline = 'middle';\n }\n } else {\n ctx.textBaseline = baseline;\n }\n\n return [x, yLine];\n }\n /**\n * fade in when relative scale is between threshold and threshold - 1.\n * If the relative scale would be smaller than threshold -1 the draw function would have returned before coming here.\n *\n * @param viewFontSize\n * @returns {*[]}\n * @private\n */\n\n }, {\n key: '_getColor',\n value: function _getColor(color, viewFontSize, initialStrokeColor) {\n var fontColor = color || '#000000';\n var strokeColor = initialStrokeColor || '#ffffff';\n\n if (viewFontSize <= this.elementOptions.scaling.label.drawThreshold) {\n var opacity = Math.max(0, Math.min(1, 1 - (this.elementOptions.scaling.label.drawThreshold - viewFontSize)));\n fontColor = util.overrideOpacity(fontColor, opacity);\n strokeColor = util.overrideOpacity(strokeColor, opacity);\n }\n\n return [fontColor, strokeColor];\n }\n /**\n *\n * @param ctx\n * @param selected\n * @returns {{width: number, height: number}}\n */\n\n }, {\n key: 'getTextSize',\n value: function getTextSize(ctx) {\n var selected = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n var hover = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n\n this._processLabel(ctx, selected, hover);\n\n return {\n width: this.size.width,\n height: this.size.height,\n lineCount: this.lineCount\n };\n }\n /**\n *\n * @param ctx\n * @param selected\n * @param x\n * @param y\n * @param baseline\n */\n\n }, {\n key: 'calculateLabelSize',\n value: function calculateLabelSize(ctx, selected, hover) {\n var x = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;\n var y = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0;\n var baseline = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 'middle';\n\n if (this.labelDirty === true) {\n this._processLabel(ctx, selected, hover);\n }\n\n this.size.left = x - this.size.width * 0.5;\n this.size.top = y - this.size.height * 0.5;\n this.size.yLine = y + (1 - this.lineCount) * 0.5 * this.fontOptions.size;\n\n if (baseline === \"hanging\") {\n this.size.top += 0.5 * this.fontOptions.size;\n this.size.top += 4; // distance from node, required because we use hanging. Hanging has less difference between browsers\n\n this.size.yLine += 4; // distance from node\n }\n\n this.labelDirty = false;\n }\n /**\n * normalize the markup system\n */\n\n }, {\n key: 'decodeMarkupSystem',\n value: function decodeMarkupSystem(markupSystem) {\n var system = 'none';\n\n if (markupSystem === 'markdown' || markupSystem === 'md') {\n system = 'markdown';\n } else if (markupSystem === true || markupSystem === 'html') {\n system = 'html';\n }\n\n return system;\n }\n /**\n * Explodes a piece of text into single-font blocks using a given markup\n * @param text\n * @param markupSystem\n * @returns [{ text, mod }]\n */\n\n }, {\n key: 'splitBlocks',\n value: function splitBlocks(text, markupSystem) {\n var system = this.decodeMarkupSystem(markupSystem);\n\n if (system === 'none') {\n return [{\n text: text,\n mod: 'normal'\n }];\n } else if (system === 'markdown') {\n return this.splitMarkdownBlocks(text);\n } else if (system === 'html') {\n return this.splitHtmlBlocks(text);\n }\n }\n }, {\n key: 'splitMarkdownBlocks',\n value: function splitMarkdownBlocks(text) {\n var blocks = [];\n var s = {\n bold: false,\n ital: false,\n mono: false,\n beginable: true,\n spacing: false,\n position: 0,\n buffer: \"\",\n modStack: []\n };\n\n s.mod = function () {\n return this.modStack.length === 0 ? 'normal' : this.modStack[0];\n };\n\n s.modName = function () {\n if (this.modStack.length === 0) return 'normal';else if (this.modStack[0] === 'mono') return 'mono';else {\n if (s.bold && s.ital) {\n return 'boldital';\n } else if (s.bold) {\n return 'bold';\n } else if (s.ital) {\n return 'ital';\n }\n }\n };\n\n s.emitBlock = function () {\n var override = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n\n if (this.spacing) {\n this.add(\" \");\n this.spacing = false;\n }\n\n if (this.buffer.length > 0) {\n blocks.push({\n text: this.buffer,\n mod: this.modName()\n });\n this.buffer = \"\";\n }\n };\n\n s.add = function (text) {\n if (text === \" \") {\n s.spacing = true;\n }\n\n if (s.spacing) {\n this.buffer += \" \";\n this.spacing = false;\n }\n\n if (text != \" \") {\n this.buffer += text;\n }\n };\n\n while (s.position < text.length) {\n var ch = text.charAt(s.position);\n\n if (/[ \\t]/.test(ch)) {\n if (!s.mono) {\n s.spacing = true;\n } else {\n s.add(ch);\n }\n\n s.beginable = true;\n } else if (/\\\\/.test(ch)) {\n if (s.position < text.length + 1) {\n s.position++;\n ch = text.charAt(s.position);\n\n if (/ \\t/.test(ch)) {\n s.spacing = true;\n } else {\n s.add(ch);\n s.beginable = false;\n }\n }\n } else if (!s.mono && !s.bold && (s.beginable || s.spacing) && /\\*/.test(ch)) {\n s.emitBlock();\n s.bold = true;\n s.modStack.unshift(\"bold\");\n } else if (!s.mono && !s.ital && (s.beginable || s.spacing) && /\\_/.test(ch)) {\n s.emitBlock();\n s.ital = true;\n s.modStack.unshift(\"ital\");\n } else if (!s.mono && (s.beginable || s.spacing) && /`/.test(ch)) {\n s.emitBlock();\n s.mono = true;\n s.modStack.unshift(\"mono\");\n } else if (!s.mono && s.mod() === \"bold\" && /\\*/.test(ch)) {\n if (s.position === text.length - 1 || /[.,_` \\t\\n]/.test(text.charAt(s.position + 1))) {\n s.emitBlock();\n s.bold = false;\n s.modStack.shift();\n } else {\n s.add(ch);\n }\n } else if (!s.mono && s.mod() === \"ital\" && /\\_/.test(ch)) {\n if (s.position === text.length - 1 || /[.,*` \\t\\n]/.test(text.charAt(s.position + 1))) {\n s.emitBlock();\n s.ital = false;\n s.modStack.shift();\n } else {\n s.add(ch);\n }\n } else if (s.mono && s.mod() === \"mono\" && /`/.test(ch)) {\n if (s.position === text.length - 1 || /[.,*_ \\t\\n]/.test(text.charAt(s.position + 1))) {\n s.emitBlock();\n s.mono = false;\n s.modStack.shift();\n } else {\n s.add(ch);\n }\n } else {\n s.add(ch);\n s.beginable = false;\n }\n\n s.position++;\n }\n\n s.emitBlock();\n return blocks;\n }\n }, {\n key: 'splitHtmlBlocks',\n value: function splitHtmlBlocks(text) {\n var blocks = [];\n var s = {\n bold: false,\n ital: false,\n mono: false,\n spacing: false,\n position: 0,\n buffer: \"\",\n modStack: []\n };\n\n s.mod = function () {\n return this.modStack.length === 0 ? 'normal' : this.modStack[0];\n };\n\n s.modName = function () {\n if (this.modStack.length === 0) return 'normal';else if (this.modStack[0] === 'mono') return 'mono';else {\n if (s.bold && s.ital) {\n return 'boldital';\n } else if (s.bold) {\n return 'bold';\n } else if (s.ital) {\n return 'ital';\n }\n }\n };\n\n s.emitBlock = function () {\n var override = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n\n if (this.spacing) {\n this.add(\" \");\n this.spacing = false;\n }\n\n if (this.buffer.length > 0) {\n blocks.push({\n text: this.buffer,\n mod: this.modName()\n });\n this.buffer = \"\";\n }\n };\n\n s.add = function (text) {\n if (text === \" \") {\n s.spacing = true;\n }\n\n if (s.spacing) {\n this.buffer += \" \";\n this.spacing = false;\n }\n\n if (text != \" \") {\n this.buffer += text;\n }\n };\n\n while (s.position < text.length) {\n var ch = text.charAt(s.position);\n\n if (/[ \\t]/.test(ch)) {\n if (!s.mono) {\n s.spacing = true;\n } else {\n s.add(ch);\n }\n } else if (//.test(text.substr(s.position, 3))) {\n s.emitBlock();\n s.bold = true;\n s.modStack.unshift(\"bold\");\n s.position += 2;\n } else if (!s.mono && !s.ital && //.test(text.substr(s.position, 3))) {\n s.emitBlock();\n s.ital = true;\n s.modStack.unshift(\"ital\");\n s.position += 2;\n } else if (!s.mono && //.test(text.substr(s.position, 6))) {\n s.emitBlock();\n s.mono = true;\n s.modStack.unshift(\"mono\");\n s.position += 5;\n } else if (!s.mono && s.mod() === 'bold' && /<\\/b>/.test(text.substr(s.position, 4))) {\n s.emitBlock();\n s.bold = false;\n s.modStack.shift();\n s.position += 3;\n } else if (!s.mono && s.mod() === 'ital' && /<\\/i>/.test(text.substr(s.position, 4))) {\n s.emitBlock();\n s.ital = false;\n s.modStack.shift();\n s.position += 3;\n } else if (s.mod() === 'mono' && /<\\/code>/.test(text.substr(s.position, 7))) {\n s.emitBlock();\n s.mono = false;\n s.modStack.shift();\n s.position += 6;\n } else {\n s.add(ch);\n }\n } else if (/&/.test(ch)) {\n if (/</.test(text.substr(s.position, 4))) {\n s.add(\"<\");\n s.position += 3;\n } else if (/&/.test(text.substr(s.position, 5))) {\n s.add(\"&\");\n s.position += 4;\n } else {\n s.add(\"&\");\n }\n } else {\n s.add(ch);\n }\n\n s.position++;\n }\n\n s.emitBlock();\n return blocks;\n }\n }, {\n key: 'getFormattingValues',\n value: function getFormattingValues(ctx, selected, hover, mod) {\n var values = {\n color: mod === \"normal\" ? this.fontOptions.color : this.fontOptions[mod].color,\n size: mod === \"normal\" ? this.fontOptions.size : this.fontOptions[mod].size,\n face: mod === \"normal\" ? this.fontOptions.face : this.fontOptions[mod].face,\n mod: mod === \"normal\" ? \"\" : this.fontOptions[mod].mod,\n vadjust: mod === \"normal\" ? this.fontOptions.vadjust : this.fontOptions[mod].vadjust,\n strokeWidth: this.fontOptions.strokeWidth,\n strokeColor: this.fontOptions.strokeColor\n };\n\n if (mod === \"normal\") {\n if (selected || hover) {\n if (this.fontOptions.chooser === true && this.elementOptions.labelHighlightBold) {\n values.mod = 'bold';\n } else if (typeof this.fontOptions.chooser === 'function') {\n this.fontOptions.chooser(ctx, values, this.elementOptions.id, selected, hover);\n }\n }\n } else {\n if ((selected || hover) && typeof this.fontOptions.chooser === 'function') {\n this.fontOptions.chooser(ctx, values, this.elementOptions.id, selected, hover);\n }\n }\n\n ctx.font = (values.mod + \" \" + values.size + \"px \" + values.face).replace(/\"/g, \"\");\n values.font = ctx.font;\n values.height = values.size;\n return values;\n }\n }, {\n key: 'differentState',\n value: function differentState(selected, hover) {\n return selected !== this.fontOptions.selectedState && hover !== this.fontOptions.hoverState;\n }\n /**\n * This explodes the label string into lines and sets the width, height and number of lines.\n * @param ctx\n * @param selected\n * @private\n */\n\n }, {\n key: '_processLabel',\n value: function _processLabel(ctx, selected, hover) {\n var width = 0;\n var height = 0;\n var nlLines = [];\n var lines = [];\n var k = 0;\n\n lines.add = function (l, text, font, color, width, height, vadjust, mod, strokeWidth, strokeColor) {\n if (this.length == l) {\n this[l] = {\n width: 0,\n height: 0,\n blocks: []\n };\n }\n\n this[l].blocks.push({\n text: text,\n font: font,\n color: color,\n width: width,\n height: height,\n vadjust: vadjust,\n mod: mod,\n strokeWidth: strokeWidth,\n strokeColor: strokeColor\n });\n };\n\n lines.accumulate = function (l, width, height) {\n this[l].width += width;\n this[l].height = height > this[l].height ? height : this[l].height;\n };\n\n lines.addAndAccumulate = function (l, text, font, color, width, height, vadjust, mod, strokeWidth, strokeColor) {\n this.add(l, text, font, color, width, height, vadjust, mod, strokeWidth, strokeColor);\n this.accumulate(l, width, height);\n };\n\n if (this.elementOptions.label !== undefined) {\n var _nlLines = String(this.elementOptions.label).split('\\n');\n\n var lineCount = _nlLines.length;\n\n if (this.elementOptions.font.multi) {\n for (var i = 0; i < lineCount; i++) {\n var blocks = this.splitBlocks(_nlLines[i], this.elementOptions.font.multi);\n var lineWidth = 0;\n var lineHeight = 0;\n\n if (blocks) {\n if (blocks.length == 0) {\n var values = this.getFormattingValues(ctx, selected, hover, \"normal\");\n lines.addAndAccumulate(k, \"\", values.font, values.color, 0, values.size, values.vadjust, \"normal\", values.strokeWidth, values.strokeColor);\n height += lines[k].height;\n k++;\n continue;\n }\n\n for (var j = 0; j < blocks.length; j++) {\n if (this.fontOptions.maxWdt > 0) {\n var _values = this.getFormattingValues(ctx, selected, hover, blocks[j].mod);\n\n var words = blocks[j].text.split(\" \");\n var atStart = true;\n var text = \"\";\n var measure = {\n width: 0\n };\n var lastMeasure = void 0;\n var w = 0;\n\n while (w < words.length) {\n var pre = atStart ? \"\" : \" \";\n lastMeasure = measure;\n measure = ctx.measureText(text + pre + words[w]);\n\n if (lineWidth + measure.width > this.fontOptions.maxWdt && lastMeasure.width != 0) {\n lineHeight = _values.height > lineHeight ? _values.height : lineHeight;\n lines.add(k, text, _values.font, _values.color, lastMeasure.width, _values.height, _values.vadjust, blocks[j].mod, _values.strokeWidth, _values.strokeColor);\n lines.accumulate(k, lastMeasure.width, lineHeight);\n text = \"\";\n atStart = true;\n lineWidth = 0;\n width = lines[k].width > width ? lines[k].width : width;\n height += lines[k].height;\n k++;\n } else {\n text = text + pre + words[w];\n\n if (w === words.length - 1) {\n lineHeight = _values.height > lineHeight ? _values.height : lineHeight;\n lineWidth += measure.width;\n lines.add(k, text, _values.font, _values.color, measure.width, _values.height, _values.vadjust, blocks[j].mod, _values.strokeWidth, _values.strokeColor);\n lines.accumulate(k, measure.width, lineHeight);\n\n if (j === blocks.length - 1) {\n width = lines[k].width > width ? lines[k].width : width;\n height += lines[k].height;\n k++;\n }\n }\n\n w++;\n atStart = false;\n }\n }\n } else {\n var _values2 = this.getFormattingValues(ctx, selected, hover, blocks[j].mod);\n\n var _measure = ctx.measureText(blocks[j].text);\n\n lines.addAndAccumulate(k, blocks[j].text, _values2.font, _values2.color, _measure.width, _values2.height, _values2.vadjust, blocks[j].mod, _values2.strokeWidth, _values2.strokeColor);\n width = lines[k].width > width ? lines[k].width : width;\n\n if (blocks.length - 1 === j) {\n height += lines[k].height;\n k++;\n }\n }\n }\n }\n }\n } else {\n for (var _i = 0; _i < lineCount; _i++) {\n var _values3 = this.getFormattingValues(ctx, selected, hover, \"normal\");\n\n if (this.fontOptions.maxWdt > 0) {\n var _words = _nlLines[_i].split(\" \");\n\n var _text = \"\";\n var _measure2 = {\n width: 0\n };\n\n var _lastMeasure = void 0;\n\n var _w = 0;\n\n while (_w < _words.length) {\n var _pre = _text === \"\" ? \"\" : \" \";\n\n _lastMeasure = _measure2;\n _measure2 = ctx.measureText(_text + _pre + _words[_w]);\n\n if (_measure2.width > this.fontOptions.maxWdt && _lastMeasure.width != 0) {\n lines.addAndAccumulate(k, _text, _values3.font, _values3.color, _lastMeasure.width, _values3.size, _values3.vadjust, \"normal\", _values3.strokeWidth, _values3.strokeColor);\n width = lines[k].width > width ? lines[k].width : width;\n height += lines[k].height;\n _text = \"\";\n k++;\n } else {\n _text = _text + _pre + _words[_w];\n\n if (_w === _words.length - 1) {\n lines.addAndAccumulate(k, _text, _values3.font, _values3.color, _measure2.width, _values3.size, _values3.vadjust, \"normal\", _values3.strokeWidth, _values3.strokeColor);\n width = lines[k].width > width ? lines[k].width : width;\n height += lines[k].height;\n k++;\n }\n\n _w++;\n }\n }\n } else {\n var _text2 = _nlLines[_i];\n\n var _measure3 = ctx.measureText(_text2);\n\n lines.addAndAccumulate(k, _text2, _values3.font, _values3.color, _measure3.width, _values3.size, _values3.vadjust, \"normal\", _values3.strokeWidth, _values3.strokeColor);\n width = lines[k].width > width ? lines[k].width : width;\n height += lines[k].height;\n k++;\n }\n }\n }\n }\n\n if (this.fontOptions.minWdt > 0 && width < this.fontOptions.minWdt) {\n width = this.fontOptions.minWdt;\n }\n\n this.size.labelHeight = height;\n\n if (this.fontOptions.minHgt > 0 && height < this.fontOptions.minHgt) {\n height = this.fontOptions.minHgt;\n }\n\n this.lines = lines;\n this.lineCount = lines.length;\n this.size.width = width;\n this.size.height = height;\n this.selectedState = selected;\n this.hoverState = hover;\n }\n }], [{\n key: 'parseOptions',\n value: function parseOptions(parentOptions, newOptions) {\n var allowDeletion = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n\n if (typeof newOptions.font === 'string') {\n var newOptionsArray = newOptions.font.split(\" \");\n parentOptions.size = newOptionsArray[0].replace(\"px\", '');\n parentOptions.face = newOptionsArray[1];\n parentOptions.color = newOptionsArray[2];\n parentOptions.vadjust = 0;\n } else if ((0, _typeof3['default'])(newOptions.font) === 'object') {\n util.fillIfDefined(parentOptions, newOptions.font, allowDeletion);\n }\n\n parentOptions.size = Number(parentOptions.size);\n parentOptions.vadjust = Number(parentOptions.vadjust);\n }\n }]);\n return Label;\n }();\n\n exports['default'] = Label;\n /***/\n },\n /* 165 */\n\n /***/\n function (module, exports, __webpack_require__) {\n \"use strict\";\n\n exports.__esModule = true;\n\n var _isIterable2 = __webpack_require__(166);\n\n var _isIterable3 = _interopRequireDefault(_isIterable2);\n\n var _getIterator2 = __webpack_require__(2);\n\n var _getIterator3 = _interopRequireDefault(_getIterator2);\n\n function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n default: obj\n };\n }\n\n exports.default = function () {\n function sliceIterator(arr, i) {\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n\n try {\n for (var _i = (0, _getIterator3.default)(arr), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"]) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n }\n\n return function (arr, i) {\n if (Array.isArray(arr)) {\n return arr;\n } else if ((0, _isIterable3.default)(Object(arr))) {\n return sliceIterator(arr, i);\n } else {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance\");\n }\n };\n }();\n /***/\n\n },\n /* 166 */\n\n /***/\n function (module, exports, __webpack_require__) {\n module.exports = {\n \"default\": __webpack_require__(167),\n __esModule: true\n };\n /***/\n },\n /* 167 */\n\n /***/\n function (module, exports, __webpack_require__) {\n __webpack_require__(4);\n\n __webpack_require__(50);\n\n module.exports = __webpack_require__(168);\n /***/\n },\n /* 168 */\n\n /***/\n function (module, exports, __webpack_require__) {\n var classof = __webpack_require__(54),\n ITERATOR = __webpack_require__(47)('iterator'),\n Iterators = __webpack_require__(8);\n\n module.exports = __webpack_require__(17).isIterable = function (it) {\n var O = Object(it);\n return O[ITERATOR] !== undefined || '@@iterator' in O || Iterators.hasOwnProperty(classof(O));\n };\n /***/\n\n },\n /* 169 */\n\n /***/\n function (module, exports, __webpack_require__) {\n 'use strict';\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n\n var _getPrototypeOf = __webpack_require__(170);\n\n var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);\n\n var _classCallCheck2 = __webpack_require__(119);\n\n var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\n var _createClass2 = __webpack_require__(120);\n\n var _createClass3 = _interopRequireDefault(_createClass2);\n\n var _possibleConstructorReturn2 = __webpack_require__(173);\n\n var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);\n\n var _inherits2 = __webpack_require__(174);\n\n var _inherits3 = _interopRequireDefault(_inherits2);\n\n var _NodeBase2 = __webpack_require__(179);\n\n var _NodeBase3 = _interopRequireDefault(_NodeBase2);\n\n function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n 'default': obj\n };\n }\n\n var Box = function (_NodeBase) {\n (0, _inherits3['default'])(Box, _NodeBase);\n\n function Box(options, body, labelModule) {\n (0, _classCallCheck3['default'])(this, Box);\n\n var _this = (0, _possibleConstructorReturn3['default'])(this, (Box.__proto__ || (0, _getPrototypeOf2['default'])(Box)).call(this, options, body, labelModule));\n\n _this._setMargins(labelModule);\n\n return _this;\n }\n\n (0, _createClass3['default'])(Box, [{\n key: 'resize',\n value: function resize(ctx) {\n var selected = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.selected;\n var hover = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.hover;\n\n if (this.width === undefined || this.labelModule.differentState(selected, hover)) {\n this.textSize = this.labelModule.getTextSize(ctx, selected, hover);\n this.width = this.textSize.width + this.margin.right + this.margin.left;\n this.height = this.textSize.height + this.margin.top + this.margin.bottom;\n this.radius = this.width / 2;\n }\n }\n }, {\n key: 'draw',\n value: function draw(ctx, x, y, selected, hover, values) {\n this.resize(ctx, selected, hover);\n this.left = x - this.width / 2;\n this.top = y - this.height / 2;\n ctx.strokeStyle = values.borderColor;\n ctx.lineWidth = values.borderWidth;\n ctx.lineWidth /= this.body.view.scale;\n ctx.lineWidth = Math.min(this.width, ctx.lineWidth);\n ctx.fillStyle = values.color;\n ctx.roundRect(this.left, this.top, this.width, this.height, values.borderRadius); // draw shadow if enabled\n\n this.enableShadow(ctx, values); // draw the background\n\n ctx.fill(); // disable shadows for other elements.\n\n this.disableShadow(ctx, values); //draw dashed border if enabled, save and restore is required for firefox not to crash on unix.\n\n ctx.save(); // if borders are zero width, they will be drawn with width 1 by default. This prevents that\n\n if (values.borderWidth > 0) {\n this.enableBorderDashes(ctx, values); //draw the border\n\n ctx.stroke(); //disable dashed border for other elements\n\n this.disableBorderDashes(ctx, values);\n }\n\n ctx.restore();\n this.updateBoundingBox(x, y, ctx, selected, hover);\n this.labelModule.draw(ctx, this.left + this.textSize.width / 2 + this.margin.left, this.top + this.textSize.height / 2 + this.margin.top, selected, hover);\n }\n }, {\n key: 'updateBoundingBox',\n value: function updateBoundingBox(x, y, ctx, selected, hover) {\n this.resize(ctx, selected, hover);\n this.left = x - this.width / 2;\n this.top = y - this.height / 2;\n var borderRadius = this.options.shapeProperties.borderRadius; // only effective for box\n\n this.boundingBox.left = this.left - borderRadius;\n this.boundingBox.top = this.top - borderRadius;\n this.boundingBox.bottom = this.top + this.height + borderRadius;\n this.boundingBox.right = this.left + this.width + borderRadius;\n }\n }, {\n key: 'distanceToBorder',\n value: function distanceToBorder(ctx, angle) {\n this.resize(ctx);\n var borderWidth = this.options.borderWidth;\n return Math.min(Math.abs(this.width / 2 / Math.cos(angle)), Math.abs(this.height / 2 / Math.sin(angle))) + borderWidth;\n }\n }]);\n return Box;\n }(_NodeBase3['default']);\n\n exports['default'] = Box;\n /***/\n },\n /* 170 */\n\n /***/\n function (module, exports, __webpack_require__) {\n module.exports = {\n \"default\": __webpack_require__(171),\n __esModule: true\n };\n /***/\n },\n /* 171 */\n\n /***/\n function (module, exports, __webpack_require__) {\n __webpack_require__(172);\n\n module.exports = __webpack_require__(17).Object.getPrototypeOf;\n /***/\n },\n /* 172 */\n\n /***/\n function (module, exports, __webpack_require__) {\n // 19.1.2.9 Object.getPrototypeOf(O)\n var toObject = __webpack_require__(49),\n $getPrototypeOf = __webpack_require__(48);\n\n __webpack_require__(61)('getPrototypeOf', function () {\n return function getPrototypeOf(it) {\n return $getPrototypeOf(toObject(it));\n };\n });\n /***/\n\n },\n /* 173 */\n\n /***/\n function (module, exports, __webpack_require__) {\n \"use strict\";\n\n exports.__esModule = true;\n\n var _typeof2 = __webpack_require__(62);\n\n var _typeof3 = _interopRequireDefault(_typeof2);\n\n function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n default: obj\n };\n }\n\n exports.default = function (self, call) {\n if (!self) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return call && ((typeof call === \"undefined\" ? \"undefined\" : (0, _typeof3.default)(call)) === \"object\" || typeof call === \"function\") ? call : self;\n };\n /***/\n\n },\n /* 174 */\n\n /***/\n function (module, exports, __webpack_require__) {\n \"use strict\";\n\n exports.__esModule = true;\n\n var _setPrototypeOf = __webpack_require__(175);\n\n var _setPrototypeOf2 = _interopRequireDefault(_setPrototypeOf);\n\n var _create = __webpack_require__(55);\n\n var _create2 = _interopRequireDefault(_create);\n\n var _typeof2 = __webpack_require__(62);\n\n var _typeof3 = _interopRequireDefault(_typeof2);\n\n function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n default: obj\n };\n }\n\n exports.default = function (subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function, not \" + (typeof superClass === \"undefined\" ? \"undefined\" : (0, _typeof3.default)(superClass)));\n }\n\n subClass.prototype = (0, _create2.default)(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _setPrototypeOf2.default ? (0, _setPrototypeOf2.default)(subClass, superClass) : subClass.__proto__ = superClass;\n };\n /***/\n\n },\n /* 175 */\n\n /***/\n function (module, exports, __webpack_require__) {\n module.exports = {\n \"default\": __webpack_require__(176),\n __esModule: true\n };\n /***/\n },\n /* 176 */\n\n /***/\n function (module, exports, __webpack_require__) {\n __webpack_require__(177);\n\n module.exports = __webpack_require__(17).Object.setPrototypeOf;\n /***/\n },\n /* 177 */\n\n /***/\n function (module, exports, __webpack_require__) {\n // 19.1.3.19 Object.setPrototypeOf(O, proto)\n var $export = __webpack_require__(15);\n\n $export($export.S, 'Object', {\n setPrototypeOf: __webpack_require__(178).set\n });\n /***/\n },\n /* 178 */\n\n /***/\n function (module, exports, __webpack_require__) {\n // Works with __proto__ only. Old v8 can't work with null proto objects.\n\n /* eslint-disable no-proto */\n var isObject = __webpack_require__(23),\n anObject = __webpack_require__(22);\n\n var check = function (O, proto) {\n anObject(O);\n if (!isObject(proto) && proto !== null) throw TypeError(proto + \": can't set as prototype!\");\n };\n\n module.exports = {\n set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line\n function (test, buggy, set) {\n try {\n set = __webpack_require__(18)(Function.call, __webpack_require__(78).f(Object.prototype, '__proto__').set, 2);\n set(test, []);\n buggy = !(test instanceof Array);\n } catch (e) {\n buggy = true;\n }\n\n return function setPrototypeOf(O, proto) {\n check(O, proto);\n if (buggy) O.__proto__ = proto;else set(O, proto);\n return O;\n };\n }({}, false) : undefined),\n check: check\n };\n /***/\n },\n /* 179 */\n\n /***/\n function (module, exports, __webpack_require__) {\n 'use strict';\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n\n var _typeof2 = __webpack_require__(62);\n\n var _typeof3 = _interopRequireDefault(_typeof2);\n\n var _classCallCheck2 = __webpack_require__(119);\n\n var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\n var _createClass2 = __webpack_require__(120);\n\n var _createClass3 = _interopRequireDefault(_createClass2);\n\n function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n 'default': obj\n };\n }\n\n var NodeBase = function () {\n function NodeBase(options, body, labelModule) {\n (0, _classCallCheck3['default'])(this, NodeBase);\n this.body = body;\n this.labelModule = labelModule;\n this.setOptions(options);\n this.top = undefined;\n this.left = undefined;\n this.height = undefined;\n this.width = undefined;\n this.radius = undefined;\n this.margin = undefined;\n this.boundingBox = {\n top: 0,\n left: 0,\n right: 0,\n bottom: 0\n };\n }\n\n (0, _createClass3['default'])(NodeBase, [{\n key: 'setOptions',\n value: function setOptions(options) {\n this.options = options;\n }\n }, {\n key: '_setMargins',\n value: function _setMargins(labelModule) {\n this.margin = {};\n\n if (this.options.margin) {\n if ((0, _typeof3['default'])(this.options.margin) == 'object') {\n this.margin.top = this.options.margin.top;\n this.margin.right = this.options.margin.right;\n this.margin.bottom = this.options.margin.bottom;\n this.margin.left = this.options.margin.left;\n } else {\n this.margin.top = this.options.margin;\n this.margin.right = this.options.margin;\n this.margin.bottom = this.options.margin;\n this.margin.left = this.options.margin;\n }\n }\n\n labelModule.adjustSizes(this.margin);\n }\n }, {\n key: '_distanceToBorder',\n value: function _distanceToBorder(ctx, angle) {\n var borderWidth = this.options.borderWidth;\n this.resize(ctx);\n return Math.min(Math.abs(this.width / 2 / Math.cos(angle)), Math.abs(this.height / 2 / Math.sin(angle))) + borderWidth;\n }\n }, {\n key: 'enableShadow',\n value: function enableShadow(ctx, values) {\n if (values.shadow) {\n ctx.shadowColor = values.shadowColor;\n ctx.shadowBlur = values.shadowSize;\n ctx.shadowOffsetX = values.shadowX;\n ctx.shadowOffsetY = values.shadowY;\n }\n }\n }, {\n key: 'disableShadow',\n value: function disableShadow(ctx, values) {\n if (values.shadow) {\n ctx.shadowColor = 'rgba(0,0,0,0)';\n ctx.shadowBlur = 0;\n ctx.shadowOffsetX = 0;\n ctx.shadowOffsetY = 0;\n }\n }\n }, {\n key: 'enableBorderDashes',\n value: function enableBorderDashes(ctx, values) {\n if (values.borderDashes !== false) {\n if (ctx.setLineDash !== undefined) {\n var dashes = values.borderDashes;\n\n if (dashes === true) {\n dashes = [5, 15];\n }\n\n ctx.setLineDash(dashes);\n } else {\n console.warn(\"setLineDash is not supported in this browser. The dashed borders cannot be used.\");\n this.options.shapeProperties.borderDashes = false;\n values.borderDashes = false;\n }\n }\n }\n }, {\n key: 'disableBorderDashes',\n value: function disableBorderDashes(ctx, values) {\n if (values.borderDashes !== false) {\n if (ctx.setLineDash !== undefined) {\n ctx.setLineDash([0]);\n } else {\n console.warn(\"setLineDash is not supported in this browser. The dashed borders cannot be used.\");\n this.options.shapeProperties.borderDashes = false;\n values.borderDashes = false;\n }\n }\n }\n }]);\n return NodeBase;\n }();\n\n exports['default'] = NodeBase;\n /***/\n },\n /* 180 */\n\n /***/\n function (module, exports, __webpack_require__) {\n 'use strict';\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n\n var _getPrototypeOf = __webpack_require__(170);\n\n var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);\n\n var _classCallCheck2 = __webpack_require__(119);\n\n var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\n var _createClass2 = __webpack_require__(120);\n\n var _createClass3 = _interopRequireDefault(_createClass2);\n\n var _possibleConstructorReturn2 = __webpack_require__(173);\n\n var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);\n\n var _inherits2 = __webpack_require__(174);\n\n var _inherits3 = _interopRequireDefault(_inherits2);\n\n var _CircleImageBase2 = __webpack_require__(181);\n\n var _CircleImageBase3 = _interopRequireDefault(_CircleImageBase2);\n\n function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n 'default': obj\n };\n }\n\n var Circle = function (_CircleImageBase) {\n (0, _inherits3['default'])(Circle, _CircleImageBase);\n\n function Circle(options, body, labelModule) {\n (0, _classCallCheck3['default'])(this, Circle);\n\n var _this = (0, _possibleConstructorReturn3['default'])(this, (Circle.__proto__ || (0, _getPrototypeOf2['default'])(Circle)).call(this, options, body, labelModule));\n\n _this._setMargins(labelModule);\n\n return _this;\n }\n\n (0, _createClass3['default'])(Circle, [{\n key: 'resize',\n value: function resize(ctx) {\n var selected = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.selected;\n var hover = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.hover;\n var values = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {\n size: this.options.size\n };\n\n if (this.width === undefined || this.labelModule.differentState(selected, hover)) {\n this.textSize = this.labelModule.getTextSize(ctx, selected, hover);\n var diameter = Math.max(this.textSize.width + this.margin.right + this.margin.left, this.textSize.height + this.margin.top + this.margin.bottom);\n this.options.size = diameter / 2;\n this.width = diameter;\n this.height = diameter;\n this.radius = this.width / 2;\n }\n }\n }, {\n key: 'draw',\n value: function draw(ctx, x, y, selected, hover, values) {\n this.resize(ctx, selected, hover);\n this.left = x - this.width / 2;\n this.top = y - this.height / 2;\n\n this._drawRawCircle(ctx, x, y, selected, hover, values);\n\n this.boundingBox.top = y - values.size;\n this.boundingBox.left = x - values.size;\n this.boundingBox.right = x + values.size;\n this.boundingBox.bottom = y + values.size;\n this.updateBoundingBox(x, y);\n this.labelModule.draw(ctx, this.left + this.textSize.width / 2 + this.margin.left, y, selected, hover);\n }\n }, {\n key: 'updateBoundingBox',\n value: function updateBoundingBox(x, y) {\n this.boundingBox.top = y - this.options.size;\n this.boundingBox.left = x - this.options.size;\n this.boundingBox.right = x + this.options.size;\n this.boundingBox.bottom = y + this.options.size;\n }\n }, {\n key: 'distanceToBorder',\n value: function distanceToBorder(ctx, angle) {\n this.resize(ctx);\n return this.width * 0.5;\n }\n }]);\n return Circle;\n }(_CircleImageBase3['default']);\n\n exports['default'] = Circle;\n /***/\n },\n /* 181 */\n\n /***/\n function (module, exports, __webpack_require__) {\n 'use strict';\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n\n var _getPrototypeOf = __webpack_require__(170);\n\n var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);\n\n var _classCallCheck2 = __webpack_require__(119);\n\n var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\n var _createClass2 = __webpack_require__(120);\n\n var _createClass3 = _interopRequireDefault(_createClass2);\n\n var _possibleConstructorReturn2 = __webpack_require__(173);\n\n var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);\n\n var _inherits2 = __webpack_require__(174);\n\n var _inherits3 = _interopRequireDefault(_inherits2);\n\n var _NodeBase2 = __webpack_require__(179);\n\n var _NodeBase3 = _interopRequireDefault(_NodeBase2);\n\n function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n 'default': obj\n };\n }\n\n var CircleImageBase = function (_NodeBase) {\n (0, _inherits3['default'])(CircleImageBase, _NodeBase);\n\n function CircleImageBase(options, body, labelModule) {\n (0, _classCallCheck3['default'])(this, CircleImageBase);\n\n var _this = (0, _possibleConstructorReturn3['default'])(this, (CircleImageBase.__proto__ || (0, _getPrototypeOf2['default'])(CircleImageBase)).call(this, options, body, labelModule));\n\n _this.labelOffset = 0;\n _this.imageLoaded = false;\n _this.selected = false;\n return _this;\n }\n\n (0, _createClass3['default'])(CircleImageBase, [{\n key: 'setOptions',\n value: function setOptions(options, imageObj, imageObjAlt) {\n this.options = options;\n this.setImages(imageObj, imageObjAlt);\n }\n }, {\n key: 'setImages',\n value: function setImages(imageObj, imageObjAlt) {\n if (imageObj) {\n this.imageObj = imageObj;\n\n if (imageObjAlt) {\n this.imageObjAlt = imageObjAlt;\n }\n }\n }\n /**\n * Switch between the base and the selected image.\n */\n\n }, {\n key: 'switchImages',\n value: function switchImages(selected) {\n if (selected && !this.selected || !selected && this.selected) {\n var imageTmp = this.imageObj;\n this.imageObj = this.imageObjAlt;\n this.imageObjAlt = imageTmp;\n } // keep current state in memory\n\n\n this.selected = selected;\n }\n /**\n * This function resizes the image by the options size when the image has not yet loaded. If the image has loaded, we\n * force the update of the size again.\n *\n * @private\n */\n\n }, {\n key: '_resizeImage',\n value: function _resizeImage() {\n var force = false;\n\n if (!this.imageObj.width || !this.imageObj.height) {\n // undefined or 0\n this.imageLoaded = false;\n } else if (this.imageLoaded === false) {\n this.imageLoaded = true;\n force = true;\n }\n\n if (!this.width || !this.height || force === true) {\n // undefined or 0\n var width, height, ratio;\n\n if (this.imageObj.width && this.imageObj.height) {\n // not undefined or 0\n width = 0;\n height = 0;\n }\n\n if (this.options.shapeProperties.useImageSize === false) {\n if (this.imageObj.width > this.imageObj.height) {\n ratio = this.imageObj.width / this.imageObj.height;\n width = this.options.size * 2 * ratio || this.imageObj.width;\n height = this.options.size * 2 || this.imageObj.height;\n } else {\n if (this.imageObj.width && this.imageObj.height) {\n // not undefined or 0\n ratio = this.imageObj.height / this.imageObj.width;\n } else {\n ratio = 1;\n }\n\n width = this.options.size * 2;\n height = this.options.size * 2 * ratio;\n }\n } else {\n // when not using the size property, we use the image size\n width = this.imageObj.width;\n height = this.imageObj.height;\n }\n\n this.width = width;\n this.height = height;\n this.radius = 0.5 * this.width;\n }\n }\n }, {\n key: '_drawRawCircle',\n value: function _drawRawCircle(ctx, x, y, selected, hover, values) {\n var borderWidth = values.borderWidth / this.body.view.scale;\n ctx.lineWidth = Math.min(this.width, borderWidth);\n ctx.strokeStyle = values.borderColor;\n ctx.fillStyle = values.color;\n ctx.circle(x, y, values.size); // draw shadow if enabled\n\n this.enableShadow(ctx, values); // draw the background\n\n ctx.fill(); // disable shadows for other elements.\n\n this.disableShadow(ctx, values); //draw dashed border if enabled, save and restore is required for firefox not to crash on unix.\n\n ctx.save(); // if borders are zero width, they will be drawn with width 1 by default. This prevents that\n\n if (borderWidth > 0) {\n this.enableBorderDashes(ctx, values); //draw the border\n\n ctx.stroke(); //disable dashed border for other elements\n\n this.disableBorderDashes(ctx, values);\n }\n\n ctx.restore();\n }\n }, {\n key: '_drawImageAtPosition',\n value: function _drawImageAtPosition(ctx, values) {\n if (this.imageObj.width != 0) {\n // draw the image\n ctx.globalAlpha = 1.0; // draw shadow if enabled\n\n this.enableShadow(ctx, values);\n var factor = this.imageObj.width / this.width / this.body.view.scale;\n\n if (factor > 2 && this.options.shapeProperties.interpolation === true) {\n var w = this.imageObj.width;\n var h = this.imageObj.height;\n var can2 = document.createElement('canvas');\n can2.width = w;\n can2.height = w;\n var ctx2 = can2.getContext('2d');\n factor *= 0.5;\n w *= 0.5;\n h *= 0.5;\n ctx2.drawImage(this.imageObj, 0, 0, w, h);\n var distance = 0;\n var iterations = 1;\n\n while (factor > 2 && iterations < 4) {\n ctx2.drawImage(can2, distance, 0, w, h, distance + w, 0, w / 2, h / 2);\n distance += w;\n factor *= 0.5;\n w *= 0.5;\n h *= 0.5;\n iterations += 1;\n }\n\n ctx.drawImage(can2, distance, 0, w, h, this.left, this.top, this.width, this.height);\n } else {\n // draw image\n ctx.drawImage(this.imageObj, this.left, this.top, this.width, this.height);\n } // disable shadows for other elements.\n\n\n this.disableShadow(ctx, values);\n }\n }\n }, {\n key: '_drawImageLabel',\n value: function _drawImageLabel(ctx, x, y, selected, hover) {\n var yLabel;\n var offset = 0;\n\n if (this.height !== undefined) {\n offset = this.height * 0.5;\n var labelDimensions = this.labelModule.getTextSize(ctx, selected, hover);\n\n if (labelDimensions.lineCount >= 1) {\n offset += labelDimensions.height / 2;\n }\n }\n\n yLabel = y + offset;\n\n if (this.options.label) {\n this.labelOffset = offset;\n }\n\n this.labelModule.draw(ctx, x, yLabel, selected, hover, 'hanging');\n }\n }]);\n return CircleImageBase;\n }(_NodeBase3['default']);\n\n exports['default'] = CircleImageBase;\n /***/\n },\n /* 182 */\n\n /***/\n function (module, exports, __webpack_require__) {\n 'use strict';\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n\n var _getPrototypeOf = __webpack_require__(170);\n\n var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);\n\n var _classCallCheck2 = __webpack_require__(119);\n\n var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\n var _createClass2 = __webpack_require__(120);\n\n var _createClass3 = _interopRequireDefault(_createClass2);\n\n var _possibleConstructorReturn2 = __webpack_require__(173);\n\n var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);\n\n var _inherits2 = __webpack_require__(174);\n\n var _inherits3 = _interopRequireDefault(_inherits2);\n\n var _CircleImageBase2 = __webpack_require__(181);\n\n var _CircleImageBase3 = _interopRequireDefault(_CircleImageBase2);\n\n function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n 'default': obj\n };\n }\n\n var CircularImage = function (_CircleImageBase) {\n (0, _inherits3['default'])(CircularImage, _CircleImageBase);\n\n function CircularImage(options, body, labelModule, imageObj, imageObjAlt) {\n (0, _classCallCheck3['default'])(this, CircularImage);\n\n var _this = (0, _possibleConstructorReturn3['default'])(this, (CircularImage.__proto__ || (0, _getPrototypeOf2['default'])(CircularImage)).call(this, options, body, labelModule));\n\n _this.setImages(imageObj, imageObjAlt);\n\n _this._swapToImageResizeWhenImageLoaded = true;\n return _this;\n }\n\n (0, _createClass3['default'])(CircularImage, [{\n key: 'resize',\n value: function resize(ctx) {\n var selected = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.selected;\n var hover = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.hover;\n\n if (this.imageObj.src === undefined || this.imageObj.width === undefined || this.imageObj.height === undefined || this.labelModule.differentState(selected, hover)) {\n var diameter = this.options.size * 2;\n this.width = diameter;\n this.height = diameter;\n this._swapToImageResizeWhenImageLoaded = true;\n this.radius = 0.5 * this.width;\n } else {\n if (this._swapToImageResizeWhenImageLoaded) {\n this.width = undefined;\n this.height = undefined;\n this._swapToImageResizeWhenImageLoaded = false;\n }\n\n this._resizeImage();\n }\n }\n }, {\n key: 'draw',\n value: function draw(ctx, x, y, selected, hover, values) {\n // switch images depending on 'selected' if imageObjAlt exists\n if (this.imageObjAlt) {\n this.switchImages(selected);\n }\n\n this.resize();\n this.left = x - this.width / 2;\n this.top = y - this.height / 2;\n var size = Math.min(0.5 * this.height, 0.5 * this.width); // draw the background circle. IMPORTANT: the stroke in this method is used by the clip method below.\n\n this._drawRawCircle(ctx, x, y, selected, hover, values); // now we draw in the circle, we save so we can revert the clip operation after drawing.\n\n\n ctx.save(); // clip is used to use the stroke in drawRawCircle as an area that we can draw in.\n\n ctx.clip(); // draw the image\n\n this._drawImageAtPosition(ctx, values); // restore so we can again draw on the full canvas\n\n\n ctx.restore();\n\n this._drawImageLabel(ctx, x, y, selected, hover);\n\n this.updateBoundingBox(x, y);\n }\n }, {\n key: 'updateBoundingBox',\n value: function updateBoundingBox(x, y) {\n this.boundingBox.top = y - this.options.size;\n this.boundingBox.left = x - this.options.size;\n this.boundingBox.right = x + this.options.size;\n this.boundingBox.bottom = y + this.options.size;\n this.boundingBox.left = Math.min(this.boundingBox.left, this.labelModule.size.left);\n this.boundingBox.right = Math.max(this.boundingBox.right, this.labelModule.size.left + this.labelModule.size.width);\n this.boundingBox.bottom = Math.max(this.boundingBox.bottom, this.boundingBox.bottom + this.labelOffset);\n }\n }, {\n key: 'distanceToBorder',\n value: function distanceToBorder(ctx, angle) {\n this.resize(ctx);\n return this.width * 0.5;\n }\n }]);\n return CircularImage;\n }(_CircleImageBase3['default']);\n\n exports['default'] = CircularImage;\n /***/\n },\n /* 183 */\n\n /***/\n function (module, exports, __webpack_require__) {\n 'use strict';\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n\n var _getPrototypeOf = __webpack_require__(170);\n\n var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);\n\n var _classCallCheck2 = __webpack_require__(119);\n\n var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\n var _createClass2 = __webpack_require__(120);\n\n var _createClass3 = _interopRequireDefault(_createClass2);\n\n var _possibleConstructorReturn2 = __webpack_require__(173);\n\n var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);\n\n var _inherits2 = __webpack_require__(174);\n\n var _inherits3 = _interopRequireDefault(_inherits2);\n\n var _NodeBase2 = __webpack_require__(179);\n\n var _NodeBase3 = _interopRequireDefault(_NodeBase2);\n\n function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n 'default': obj\n };\n }\n\n var Database = function (_NodeBase) {\n (0, _inherits3['default'])(Database, _NodeBase);\n\n function Database(options, body, labelModule) {\n (0, _classCallCheck3['default'])(this, Database);\n\n var _this = (0, _possibleConstructorReturn3['default'])(this, (Database.__proto__ || (0, _getPrototypeOf2['default'])(Database)).call(this, options, body, labelModule));\n\n _this._setMargins(labelModule);\n\n return _this;\n }\n\n (0, _createClass3['default'])(Database, [{\n key: 'resize',\n value: function resize(ctx, selected, hover) {\n if (this.width === undefined || this.labelModule.differentState(selected, hover)) {\n this.textSize = this.labelModule.getTextSize(ctx, selected, hover);\n var size = this.textSize.width + this.margin.right + this.margin.left;\n this.width = size;\n this.height = size;\n this.radius = this.width / 2;\n }\n }\n }, {\n key: 'draw',\n value: function draw(ctx, x, y, selected, hover, values) {\n this.resize(ctx, selected, hover);\n this.left = x - this.width / 2;\n this.top = y - this.height / 2;\n var borderWidth = values.borderWidth / this.body.view.scale;\n ctx.lineWidth = Math.min(this.width, borderWidth);\n ctx.strokeStyle = values.borderColor;\n ctx.fillStyle = values.color;\n ctx.database(x - this.width / 2, y - this.height / 2, this.width, this.height); // draw shadow if enabled\n\n this.enableShadow(ctx, values); // draw the background\n\n ctx.fill(); // disable shadows for other elements.\n\n this.disableShadow(ctx, values); //draw dashed border if enabled, save and restore is required for firefox not to crash on unix.\n\n ctx.save(); // if borders are zero width, they will be drawn with width 1 by default. This prevents that\n\n if (borderWidth > 0) {\n this.enableBorderDashes(ctx, values); //draw the border\n\n ctx.stroke(); //disable dashed border for other elements\n\n this.disableBorderDashes(ctx, values);\n }\n\n ctx.restore();\n this.updateBoundingBox(x, y, ctx, selected, hover);\n this.labelModule.draw(ctx, this.left + this.textSize.width / 2 + this.margin.left, this.top + this.textSize.height / 2 + this.margin.top, selected, hover);\n }\n }, {\n key: 'updateBoundingBox',\n value: function updateBoundingBox(x, y, ctx, selected, hover) {\n this.resize(ctx, selected, hover);\n this.left = x - this.width * 0.5;\n this.top = y - this.height * 0.5;\n this.boundingBox.left = this.left;\n this.boundingBox.top = this.top;\n this.boundingBox.bottom = this.top + this.height;\n this.boundingBox.right = this.left + this.width;\n }\n }, {\n key: 'distanceToBorder',\n value: function distanceToBorder(ctx, angle) {\n return this._distanceToBorder(ctx, angle);\n }\n }]);\n return Database;\n }(_NodeBase3['default']);\n\n exports['default'] = Database;\n /***/\n },\n /* 184 */\n\n /***/\n function (module, exports, __webpack_require__) {\n 'use strict';\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n\n var _getPrototypeOf = __webpack_require__(170);\n\n var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);\n\n var _classCallCheck2 = __webpack_require__(119);\n\n var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\n var _createClass2 = __webpack_require__(120);\n\n var _createClass3 = _interopRequireDefault(_createClass2);\n\n var _possibleConstructorReturn2 = __webpack_require__(173);\n\n var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);\n\n var _inherits2 = __webpack_require__(174);\n\n var _inherits3 = _interopRequireDefault(_inherits2);\n\n var _ShapeBase2 = __webpack_require__(185);\n\n var _ShapeBase3 = _interopRequireDefault(_ShapeBase2);\n\n function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n 'default': obj\n };\n }\n\n var Diamond = function (_ShapeBase) {\n (0, _inherits3['default'])(Diamond, _ShapeBase);\n\n function Diamond(options, body, labelModule) {\n (0, _classCallCheck3['default'])(this, Diamond);\n return (0, _possibleConstructorReturn3['default'])(this, (Diamond.__proto__ || (0, _getPrototypeOf2['default'])(Diamond)).call(this, options, body, labelModule));\n }\n\n (0, _createClass3['default'])(Diamond, [{\n key: 'resize',\n value: function resize(ctx) {\n var selected = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.selected;\n var hover = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.hover;\n var values = arguments[3];\n\n this._resizeShape(selected, hover, values);\n }\n }, {\n key: 'draw',\n value: function draw(ctx, x, y, selected, hover, values) {\n this._drawShape(ctx, 'diamond', 4, x, y, selected, hover, values);\n }\n }, {\n key: 'distanceToBorder',\n value: function distanceToBorder(ctx, angle) {\n return this._distanceToBorder(ctx, angle);\n }\n }]);\n return Diamond;\n }(_ShapeBase3['default']);\n\n exports['default'] = Diamond;\n /***/\n },\n /* 185 */\n\n /***/\n function (module, exports, __webpack_require__) {\n 'use strict';\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n\n var _getPrototypeOf = __webpack_require__(170);\n\n var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);\n\n var _classCallCheck2 = __webpack_require__(119);\n\n var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\n var _createClass2 = __webpack_require__(120);\n\n var _createClass3 = _interopRequireDefault(_createClass2);\n\n var _possibleConstructorReturn2 = __webpack_require__(173);\n\n var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);\n\n var _inherits2 = __webpack_require__(174);\n\n var _inherits3 = _interopRequireDefault(_inherits2);\n\n var _NodeBase2 = __webpack_require__(179);\n\n var _NodeBase3 = _interopRequireDefault(_NodeBase2);\n\n function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n 'default': obj\n };\n }\n\n var ShapeBase = function (_NodeBase) {\n (0, _inherits3['default'])(ShapeBase, _NodeBase);\n\n function ShapeBase(options, body, labelModule) {\n (0, _classCallCheck3['default'])(this, ShapeBase);\n return (0, _possibleConstructorReturn3['default'])(this, (ShapeBase.__proto__ || (0, _getPrototypeOf2['default'])(ShapeBase)).call(this, options, body, labelModule));\n }\n\n (0, _createClass3['default'])(ShapeBase, [{\n key: '_resizeShape',\n value: function _resizeShape() {\n var selected = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.selected;\n var hover = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.hover;\n var values = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {\n size: this.options.size\n };\n\n if (this.width === undefined || this.labelModule.differentState(selected, hover)) {\n var size = 2 * values.size;\n this.width = size;\n this.height = size;\n this.radius = 0.5 * this.width;\n }\n }\n }, {\n key: '_drawShape',\n value: function _drawShape(ctx, shape, sizeMultiplier, x, y, selected, hover, values) {\n this._resizeShape(selected, hover, values);\n\n this.left = x - this.width / 2;\n this.top = y - this.height / 2;\n var borderWidth = values.borderWidth / this.body.view.scale;\n ctx.lineWidth = Math.min(this.width, borderWidth);\n ctx.strokeStyle = values.borderColor;\n ctx.fillStyle = values.color;\n ctx[shape](x, y, values.size); // draw shadow if enabled\n\n this.enableShadow(ctx, values); // draw the background\n\n ctx.fill(); // disable shadows for other elements.\n\n this.disableShadow(ctx, values); //draw dashed border if enabled, save and restore is required for firefox not to crash on unix.\n\n ctx.save(); // if borders are zero width, they will be drawn with width 1 by default. This prevents that\n\n if (borderWidth > 0) {\n this.enableBorderDashes(ctx, values); //draw the border\n\n ctx.stroke(); //disable dashed border for other elements\n\n this.disableBorderDashes(ctx, values);\n }\n\n ctx.restore();\n\n if (this.options.label !== undefined) {\n var yLabel = y + 0.5 * this.height + 3; // the + 3 is to offset it a bit below the node.\n\n this.labelModule.draw(ctx, x, yLabel, selected, hover, 'hanging');\n }\n\n this.updateBoundingBox(x, y);\n }\n }, {\n key: 'updateBoundingBox',\n value: function updateBoundingBox(x, y) {\n this.boundingBox.top = y - this.options.size;\n this.boundingBox.left = x - this.options.size;\n this.boundingBox.right = x + this.options.size;\n this.boundingBox.bottom = y + this.options.size;\n\n if (this.options.label !== undefined && this.labelModule.size.width > 0) {\n this.boundingBox.left = Math.min(this.boundingBox.left, this.labelModule.size.left);\n this.boundingBox.right = Math.max(this.boundingBox.right, this.labelModule.size.left + this.labelModule.size.width);\n this.boundingBox.bottom = Math.max(this.boundingBox.bottom, this.boundingBox.bottom + this.labelModule.size.height + 3);\n }\n }\n }]);\n return ShapeBase;\n }(_NodeBase3['default']);\n\n exports['default'] = ShapeBase;\n /***/\n },\n /* 186 */\n\n /***/\n function (module, exports, __webpack_require__) {\n 'use strict';\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n\n var _getPrototypeOf = __webpack_require__(170);\n\n var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);\n\n var _classCallCheck2 = __webpack_require__(119);\n\n var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\n var _createClass2 = __webpack_require__(120);\n\n var _createClass3 = _interopRequireDefault(_createClass2);\n\n var _possibleConstructorReturn2 = __webpack_require__(173);\n\n var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);\n\n var _inherits2 = __webpack_require__(174);\n\n var _inherits3 = _interopRequireDefault(_inherits2);\n\n var _ShapeBase2 = __webpack_require__(185);\n\n var _ShapeBase3 = _interopRequireDefault(_ShapeBase2);\n\n function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n 'default': obj\n };\n }\n\n var Dot = function (_ShapeBase) {\n (0, _inherits3['default'])(Dot, _ShapeBase);\n\n function Dot(options, body, labelModule) {\n (0, _classCallCheck3['default'])(this, Dot);\n return (0, _possibleConstructorReturn3['default'])(this, (Dot.__proto__ || (0, _getPrototypeOf2['default'])(Dot)).call(this, options, body, labelModule));\n }\n\n (0, _createClass3['default'])(Dot, [{\n key: 'resize',\n value: function resize(ctx) {\n var selected = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.selected;\n var hover = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.hover;\n var values = arguments[3];\n\n this._resizeShape(selected, hover, values);\n }\n }, {\n key: 'draw',\n value: function draw(ctx, x, y, selected, hover, values) {\n this._drawShape(ctx, 'circle', 2, x, y, selected, hover, values);\n }\n }, {\n key: 'distanceToBorder',\n value: function distanceToBorder(ctx, angle) {\n this.resize(ctx);\n return this.options.size;\n }\n }]);\n return Dot;\n }(_ShapeBase3['default']);\n\n exports['default'] = Dot;\n /***/\n },\n /* 187 */\n\n /***/\n function (module, exports, __webpack_require__) {\n 'use strict';\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n\n var _getPrototypeOf = __webpack_require__(170);\n\n var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);\n\n var _classCallCheck2 = __webpack_require__(119);\n\n var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\n var _createClass2 = __webpack_require__(120);\n\n var _createClass3 = _interopRequireDefault(_createClass2);\n\n var _possibleConstructorReturn2 = __webpack_require__(173);\n\n var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);\n\n var _inherits2 = __webpack_require__(174);\n\n var _inherits3 = _interopRequireDefault(_inherits2);\n\n var _NodeBase2 = __webpack_require__(179);\n\n var _NodeBase3 = _interopRequireDefault(_NodeBase2);\n\n function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n 'default': obj\n };\n }\n\n var Ellipse = function (_NodeBase) {\n (0, _inherits3['default'])(Ellipse, _NodeBase);\n\n function Ellipse(options, body, labelModule) {\n (0, _classCallCheck3['default'])(this, Ellipse);\n return (0, _possibleConstructorReturn3['default'])(this, (Ellipse.__proto__ || (0, _getPrototypeOf2['default'])(Ellipse)).call(this, options, body, labelModule));\n }\n\n (0, _createClass3['default'])(Ellipse, [{\n key: 'resize',\n value: function resize(ctx) {\n var selected = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.selected;\n var hover = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.hover;\n\n if (this.width === undefined || this.labelModule.differentState(selected, hover)) {\n var textSize = this.labelModule.getTextSize(ctx, selected, hover);\n this.height = textSize.height * 2;\n this.width = textSize.width + this.height;\n this.radius = 0.5 * this.width;\n }\n }\n }, {\n key: 'draw',\n value: function draw(ctx, x, y, selected, hover, values) {\n this.resize(ctx, selected, hover);\n this.left = x - this.width * 0.5;\n this.top = y - this.height * 0.5;\n var borderWidth = values.borderWidth / this.body.view.scale;\n ctx.lineWidth = Math.min(this.width, borderWidth);\n ctx.strokeStyle = values.borderColor;\n ctx.fillStyle = values.color;\n ctx.ellipse(this.left, this.top, this.width, this.height); // draw shadow if enabled\n\n this.enableShadow(ctx, values); // draw the background\n\n ctx.fill(); // disable shadows for other elements.\n\n this.disableShadow(ctx, values); //draw dashed border if enabled, save and restore is required for firefox not to crash on unix.\n\n ctx.save(); // if borders are zero width, they will be drawn with width 1 by default. This prevents that\n\n if (borderWidth > 0) {\n this.enableBorderDashes(ctx, values); //draw the border\n\n ctx.stroke(); //disable dashed border for other elements\n\n this.disableBorderDashes(ctx, values);\n }\n\n ctx.restore();\n this.updateBoundingBox(x, y, ctx, selected, hover);\n this.labelModule.draw(ctx, x, y, selected, hover);\n }\n }, {\n key: 'updateBoundingBox',\n value: function updateBoundingBox(x, y, ctx, selected, hover) {\n this.resize(ctx, selected, hover); // just in case\n\n this.left = x - this.width * 0.5;\n this.top = y - this.height * 0.5;\n this.boundingBox.left = this.left;\n this.boundingBox.top = this.top;\n this.boundingBox.bottom = this.top + this.height;\n this.boundingBox.right = this.left + this.width;\n }\n }, {\n key: 'distanceToBorder',\n value: function distanceToBorder(ctx, angle) {\n this.resize(ctx);\n var a = this.width * 0.5;\n var b = this.height * 0.5;\n var w = Math.sin(angle) * a;\n var h = Math.cos(angle) * b;\n return a * b / Math.sqrt(w * w + h * h);\n }\n }]);\n return Ellipse;\n }(_NodeBase3['default']);\n\n exports['default'] = Ellipse;\n /***/\n },\n /* 188 */\n\n /***/\n function (module, exports, __webpack_require__) {\n 'use strict';\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n\n var _getPrototypeOf = __webpack_require__(170);\n\n var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);\n\n var _classCallCheck2 = __webpack_require__(119);\n\n var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\n var _createClass2 = __webpack_require__(120);\n\n var _createClass3 = _interopRequireDefault(_createClass2);\n\n var _possibleConstructorReturn2 = __webpack_require__(173);\n\n var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);\n\n var _inherits2 = __webpack_require__(174);\n\n var _inherits3 = _interopRequireDefault(_inherits2);\n\n var _NodeBase2 = __webpack_require__(179);\n\n var _NodeBase3 = _interopRequireDefault(_NodeBase2);\n\n function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n 'default': obj\n };\n }\n\n var Icon = function (_NodeBase) {\n (0, _inherits3['default'])(Icon, _NodeBase);\n\n function Icon(options, body, labelModule) {\n (0, _classCallCheck3['default'])(this, Icon);\n\n var _this = (0, _possibleConstructorReturn3['default'])(this, (Icon.__proto__ || (0, _getPrototypeOf2['default'])(Icon)).call(this, options, body, labelModule));\n\n _this._setMargins(labelModule);\n\n return _this;\n }\n\n (0, _createClass3['default'])(Icon, [{\n key: 'resize',\n value: function resize(ctx, selected, hover) {\n if (this.width === undefined || this.labelModule.differentState(selected, hover)) {\n this.iconSize = {\n width: Number(this.options.icon.size),\n height: Number(this.options.icon.size)\n };\n this.width = this.iconSize.width + this.margin.right + this.margin.left;\n this.height = this.iconSize.height + this.margin.top + this.margin.bottom;\n this.radius = 0.5 * this.width;\n }\n }\n }, {\n key: 'draw',\n value: function draw(ctx, x, y, selected, hover, values) {\n this.resize(ctx, selected, hover);\n this.options.icon.size = this.options.icon.size || 50;\n this.left = x - this.width / 2;\n this.top = y - this.height / 2;\n\n this._icon(ctx, x, y, selected, hover, values);\n\n if (this.options.label !== undefined) {\n var iconTextSpacing = 5;\n this.labelModule.draw(ctx, this.left + this.iconSize.width / 2 + this.margin.left, y + this.height / 2 + iconTextSpacing, selected);\n }\n\n this.updateBoundingBox(x, y);\n }\n }, {\n key: 'updateBoundingBox',\n value: function updateBoundingBox(x, y) {\n this.boundingBox.top = y - this.options.icon.size * 0.5;\n this.boundingBox.left = x - this.options.icon.size * 0.5;\n this.boundingBox.right = x + this.options.icon.size * 0.5;\n this.boundingBox.bottom = y + this.options.icon.size * 0.5;\n\n if (this.options.label !== undefined && this.labelModule.size.width > 0) {\n var iconTextSpacing = 5;\n this.boundingBox.left = Math.min(this.boundingBox.left, this.labelModule.size.left);\n this.boundingBox.right = Math.max(this.boundingBox.right, this.labelModule.size.left + this.labelModule.size.width);\n this.boundingBox.bottom = Math.max(this.boundingBox.bottom, this.boundingBox.bottom + this.labelModule.size.height + iconTextSpacing);\n }\n }\n }, {\n key: '_icon',\n value: function _icon(ctx, x, y, selected, hover, values) {\n var iconSize = Number(this.options.icon.size);\n\n if (this.options.icon.code !== undefined) {\n ctx.font = (selected ? \"bold \" : \"\") + iconSize + \"px \" + this.options.icon.face; // draw icon\n\n ctx.fillStyle = this.options.icon.color || \"black\";\n ctx.textAlign = \"center\";\n ctx.textBaseline = \"middle\"; // draw shadow if enabled\n\n this.enableShadow(ctx, values);\n ctx.fillText(this.options.icon.code, x, y); // disable shadows for other elements.\n\n this.disableShadow(ctx, values);\n } else {\n console.error('When using the icon shape, you need to define the code in the icon options object. This can be done per node or globally.');\n }\n }\n }, {\n key: 'distanceToBorder',\n value: function distanceToBorder(ctx, angle) {\n return this._distanceToBorder(ctx, angle);\n }\n }]);\n return Icon;\n }(_NodeBase3['default']);\n\n exports['default'] = Icon;\n /***/\n },\n /* 189 */\n\n /***/\n function (module, exports, __webpack_require__) {\n 'use strict';\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n\n var _getPrototypeOf = __webpack_require__(170);\n\n var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);\n\n var _classCallCheck2 = __webpack_require__(119);\n\n var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\n var _createClass2 = __webpack_require__(120);\n\n var _createClass3 = _interopRequireDefault(_createClass2);\n\n var _possibleConstructorReturn2 = __webpack_require__(173);\n\n var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);\n\n var _inherits2 = __webpack_require__(174);\n\n var _inherits3 = _interopRequireDefault(_inherits2);\n\n var _CircleImageBase2 = __webpack_require__(181);\n\n var _CircleImageBase3 = _interopRequireDefault(_CircleImageBase2);\n\n function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n 'default': obj\n };\n }\n\n var Image = function (_CircleImageBase) {\n (0, _inherits3['default'])(Image, _CircleImageBase);\n\n function Image(options, body, labelModule, imageObj, imageObjAlt) {\n (0, _classCallCheck3['default'])(this, Image);\n\n var _this = (0, _possibleConstructorReturn3['default'])(this, (Image.__proto__ || (0, _getPrototypeOf2['default'])(Image)).call(this, options, body, labelModule));\n\n _this.setImages(imageObj, imageObjAlt);\n\n return _this;\n }\n\n (0, _createClass3['default'])(Image, [{\n key: 'resize',\n value: function resize() {\n this._resizeImage();\n }\n }, {\n key: 'draw',\n value: function draw(ctx, x, y, selected, hover, values) {\n // switch images depending on 'selected' if imageObjAlt exists\n if (this.imageObjAlt) {\n this.switchImages(selected);\n }\n\n this.selected = selected;\n this.resize();\n this.left = x - this.width / 2;\n this.top = y - this.height / 2;\n\n if (this.options.shapeProperties.useBorderWithImage === true) {\n var neutralborderWidth = this.options.borderWidth;\n var selectionLineWidth = this.options.borderWidthSelected || 2 * this.options.borderWidth;\n var borderWidth = (selected ? selectionLineWidth : neutralborderWidth) / this.body.view.scale;\n ctx.lineWidth = Math.min(this.width, borderWidth);\n ctx.beginPath(); // setup the line properties.\n\n ctx.strokeStyle = selected ? this.options.color.highlight.border : hover ? this.options.color.hover.border : this.options.color.border; // set a fillstyle\n\n ctx.fillStyle = selected ? this.options.color.highlight.background : hover ? this.options.color.hover.background : this.options.color.background; // draw a rectangle to form the border around. This rectangle is filled so the opacity of a picture (in future vis releases?) can be used to tint the image\n\n ctx.rect(this.left - 0.5 * ctx.lineWidth, this.top - 0.5 * ctx.lineWidth, this.width + ctx.lineWidth, this.height + ctx.lineWidth);\n ctx.fill(); //draw dashed border if enabled, save and restore is required for firefox not to crash on unix.\n\n ctx.save(); // if borders are zero width, they will be drawn with width 1 by default. This prevents that\n\n if (borderWidth > 0) {\n this.enableBorderDashes(ctx, values); //draw the border\n\n ctx.stroke(); //disable dashed border for other elements\n\n this.disableBorderDashes(ctx, values);\n }\n\n ctx.restore();\n ctx.closePath();\n }\n\n this._drawImageAtPosition(ctx, values);\n\n this._drawImageLabel(ctx, x, y, selected, hover);\n\n this.updateBoundingBox(x, y);\n }\n }, {\n key: 'updateBoundingBox',\n value: function updateBoundingBox(x, y) {\n this.resize();\n this.left = x - this.width / 2;\n this.top = y - this.height / 2;\n this.boundingBox.top = this.top;\n this.boundingBox.left = this.left;\n this.boundingBox.right = this.left + this.width;\n this.boundingBox.bottom = this.top + this.height;\n\n if (this.options.label !== undefined && this.labelModule.size.width > 0) {\n this.boundingBox.left = Math.min(this.boundingBox.left, this.labelModule.size.left);\n this.boundingBox.right = Math.max(this.boundingBox.right, this.labelModule.size.left + this.labelModule.size.width);\n this.boundingBox.bottom = Math.max(this.boundingBox.bottom, this.boundingBox.bottom + this.labelOffset);\n }\n }\n }, {\n key: 'distanceToBorder',\n value: function distanceToBorder(ctx, angle) {\n return this._distanceToBorder(ctx, angle);\n }\n }]);\n return Image;\n }(_CircleImageBase3['default']);\n\n exports['default'] = Image;\n /***/\n },\n /* 190 */\n\n /***/\n function (module, exports, __webpack_require__) {\n 'use strict';\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n\n var _getPrototypeOf = __webpack_require__(170);\n\n var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);\n\n var _classCallCheck2 = __webpack_require__(119);\n\n var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\n var _createClass2 = __webpack_require__(120);\n\n var _createClass3 = _interopRequireDefault(_createClass2);\n\n var _possibleConstructorReturn2 = __webpack_require__(173);\n\n var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);\n\n var _inherits2 = __webpack_require__(174);\n\n var _inherits3 = _interopRequireDefault(_inherits2);\n\n var _ShapeBase2 = __webpack_require__(185);\n\n var _ShapeBase3 = _interopRequireDefault(_ShapeBase2);\n\n function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n 'default': obj\n };\n }\n\n var Square = function (_ShapeBase) {\n (0, _inherits3['default'])(Square, _ShapeBase);\n\n function Square(options, body, labelModule) {\n (0, _classCallCheck3['default'])(this, Square);\n return (0, _possibleConstructorReturn3['default'])(this, (Square.__proto__ || (0, _getPrototypeOf2['default'])(Square)).call(this, options, body, labelModule));\n }\n\n (0, _createClass3['default'])(Square, [{\n key: 'resize',\n value: function resize() {\n this._resizeShape();\n }\n }, {\n key: 'draw',\n value: function draw(ctx, x, y, selected, hover, values) {\n this._drawShape(ctx, 'square', 2, x, y, selected, hover, values);\n }\n }, {\n key: 'distanceToBorder',\n value: function distanceToBorder(ctx, angle) {\n return this._distanceToBorder(ctx, angle);\n }\n }]);\n return Square;\n }(_ShapeBase3['default']);\n\n exports['default'] = Square;\n /***/\n },\n /* 191 */\n\n /***/\n function (module, exports, __webpack_require__) {\n 'use strict';\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n\n var _getPrototypeOf = __webpack_require__(170);\n\n var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);\n\n var _classCallCheck2 = __webpack_require__(119);\n\n var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\n var _createClass2 = __webpack_require__(120);\n\n var _createClass3 = _interopRequireDefault(_createClass2);\n\n var _possibleConstructorReturn2 = __webpack_require__(173);\n\n var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);\n\n var _inherits2 = __webpack_require__(174);\n\n var _inherits3 = _interopRequireDefault(_inherits2);\n\n var _ShapeBase2 = __webpack_require__(185);\n\n var _ShapeBase3 = _interopRequireDefault(_ShapeBase2);\n\n function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n 'default': obj\n };\n }\n\n var Star = function (_ShapeBase) {\n (0, _inherits3['default'])(Star, _ShapeBase);\n\n function Star(options, body, labelModule) {\n (0, _classCallCheck3['default'])(this, Star);\n return (0, _possibleConstructorReturn3['default'])(this, (Star.__proto__ || (0, _getPrototypeOf2['default'])(Star)).call(this, options, body, labelModule));\n }\n\n (0, _createClass3['default'])(Star, [{\n key: 'resize',\n value: function resize(ctx, selected, hover, values) {\n this._resizeShape(selected, hover, values);\n }\n }, {\n key: 'draw',\n value: function draw(ctx, x, y, selected, hover, values) {\n this._drawShape(ctx, 'star', 4, x, y, selected, hover, values);\n }\n }, {\n key: 'distanceToBorder',\n value: function distanceToBorder(ctx, angle) {\n return this._distanceToBorder(ctx, angle);\n }\n }]);\n return Star;\n }(_ShapeBase3['default']);\n\n exports['default'] = Star;\n /***/\n },\n /* 192 */\n\n /***/\n function (module, exports, __webpack_require__) {\n 'use strict';\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n\n var _getPrototypeOf = __webpack_require__(170);\n\n var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);\n\n var _classCallCheck2 = __webpack_require__(119);\n\n var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\n var _createClass2 = __webpack_require__(120);\n\n var _createClass3 = _interopRequireDefault(_createClass2);\n\n var _possibleConstructorReturn2 = __webpack_require__(173);\n\n var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);\n\n var _inherits2 = __webpack_require__(174);\n\n var _inherits3 = _interopRequireDefault(_inherits2);\n\n var _NodeBase2 = __webpack_require__(179);\n\n var _NodeBase3 = _interopRequireDefault(_NodeBase2);\n\n function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n 'default': obj\n };\n }\n\n var Text = function (_NodeBase) {\n (0, _inherits3['default'])(Text, _NodeBase);\n\n function Text(options, body, labelModule) {\n (0, _classCallCheck3['default'])(this, Text);\n\n var _this = (0, _possibleConstructorReturn3['default'])(this, (Text.__proto__ || (0, _getPrototypeOf2['default'])(Text)).call(this, options, body, labelModule));\n\n _this._setMargins(labelModule);\n\n return _this;\n }\n\n (0, _createClass3['default'])(Text, [{\n key: 'resize',\n value: function resize(ctx, selected, hover) {\n if (this.width === undefined || this.labelModule.differentState(selected, hover)) {\n this.textSize = this.labelModule.getTextSize(ctx, selected, hover);\n this.width = this.textSize.width + this.margin.right + this.margin.left;\n this.height = this.textSize.height + this.margin.top + this.margin.bottom;\n this.radius = 0.5 * this.width;\n }\n }\n }, {\n key: 'draw',\n value: function draw(ctx, x, y, selected, hover, values) {\n this.resize(ctx, selected, hover);\n this.left = x - this.width / 2;\n this.top = y - this.height / 2; // draw shadow if enabled\n\n this.enableShadow(ctx, values);\n this.labelModule.draw(ctx, this.left + this.textSize.width / 2 + this.margin.left, this.top + this.textSize.height / 2 + this.margin.top, selected, hover); // disable shadows for other elements.\n\n this.disableShadow(ctx, values);\n this.updateBoundingBox(x, y, ctx, selected, hover);\n }\n }, {\n key: 'updateBoundingBox',\n value: function updateBoundingBox(x, y, ctx, selected, hover) {\n this.resize(ctx, selected, hover);\n this.left = x - this.width / 2;\n this.top = y - this.height / 2;\n this.boundingBox.top = this.top;\n this.boundingBox.left = this.left;\n this.boundingBox.right = this.left + this.width;\n this.boundingBox.bottom = this.top + this.height;\n }\n }, {\n key: 'distanceToBorder',\n value: function distanceToBorder(ctx, angle) {\n return this._distanceToBorder(ctx, angle);\n }\n }]);\n return Text;\n }(_NodeBase3['default']);\n\n exports['default'] = Text;\n /***/\n },\n /* 193 */\n\n /***/\n function (module, exports, __webpack_require__) {\n 'use strict';\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n\n var _getPrototypeOf = __webpack_require__(170);\n\n var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);\n\n var _classCallCheck2 = __webpack_require__(119);\n\n var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\n var _createClass2 = __webpack_require__(120);\n\n var _createClass3 = _interopRequireDefault(_createClass2);\n\n var _possibleConstructorReturn2 = __webpack_require__(173);\n\n var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);\n\n var _inherits2 = __webpack_require__(174);\n\n var _inherits3 = _interopRequireDefault(_inherits2);\n\n var _ShapeBase2 = __webpack_require__(185);\n\n var _ShapeBase3 = _interopRequireDefault(_ShapeBase2);\n\n function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n 'default': obj\n };\n }\n\n var Triangle = function (_ShapeBase) {\n (0, _inherits3['default'])(Triangle, _ShapeBase);\n\n function Triangle(options, body, labelModule) {\n (0, _classCallCheck3['default'])(this, Triangle);\n return (0, _possibleConstructorReturn3['default'])(this, (Triangle.__proto__ || (0, _getPrototypeOf2['default'])(Triangle)).call(this, options, body, labelModule));\n }\n\n (0, _createClass3['default'])(Triangle, [{\n key: 'resize',\n value: function resize(ctx) {\n this._resizeShape();\n }\n }, {\n key: 'draw',\n value: function draw(ctx, x, y, selected, hover, values) {\n this._drawShape(ctx, 'triangle', 3, x, y, selected, hover, values);\n }\n }, {\n key: 'distanceToBorder',\n value: function distanceToBorder(ctx, angle) {\n return this._distanceToBorder(ctx, angle);\n }\n }]);\n return Triangle;\n }(_ShapeBase3['default']);\n\n exports['default'] = Triangle;\n /***/\n },\n /* 194 */\n\n /***/\n function (module, exports, __webpack_require__) {\n 'use strict';\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n\n var _getPrototypeOf = __webpack_require__(170);\n\n var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);\n\n var _classCallCheck2 = __webpack_require__(119);\n\n var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\n var _createClass2 = __webpack_require__(120);\n\n var _createClass3 = _interopRequireDefault(_createClass2);\n\n var _possibleConstructorReturn2 = __webpack_require__(173);\n\n var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);\n\n var _inherits2 = __webpack_require__(174);\n\n var _inherits3 = _interopRequireDefault(_inherits2);\n\n var _ShapeBase2 = __webpack_require__(185);\n\n var _ShapeBase3 = _interopRequireDefault(_ShapeBase2);\n\n function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n 'default': obj\n };\n }\n\n var TriangleDown = function (_ShapeBase) {\n (0, _inherits3['default'])(TriangleDown, _ShapeBase);\n\n function TriangleDown(options, body, labelModule) {\n (0, _classCallCheck3['default'])(this, TriangleDown);\n return (0, _possibleConstructorReturn3['default'])(this, (TriangleDown.__proto__ || (0, _getPrototypeOf2['default'])(TriangleDown)).call(this, options, body, labelModule));\n }\n\n (0, _createClass3['default'])(TriangleDown, [{\n key: 'resize',\n value: function resize(ctx) {\n this._resizeShape();\n }\n }, {\n key: 'draw',\n value: function draw(ctx, x, y, selected, hover, values) {\n this._drawShape(ctx, 'triangleDown', 3, x, y, selected, hover, values);\n }\n }, {\n key: 'distanceToBorder',\n value: function distanceToBorder(ctx, angle) {\n return this._distanceToBorder(ctx, angle);\n }\n }]);\n return TriangleDown;\n }(_ShapeBase3['default']);\n\n exports['default'] = TriangleDown;\n /***/\n },\n /* 195 */\n\n /***/\n function (module, exports, __webpack_require__) {\n 'use strict';\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n\n var _classCallCheck2 = __webpack_require__(119);\n\n var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\n var _createClass2 = __webpack_require__(120);\n\n var _createClass3 = _interopRequireDefault(_createClass2);\n\n var _Edge = __webpack_require__(196);\n\n var _Edge2 = _interopRequireDefault(_Edge);\n\n var _Label = __webpack_require__(164);\n\n var _Label2 = _interopRequireDefault(_Label);\n\n function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n 'default': obj\n };\n }\n\n var util = __webpack_require__(1);\n\n var DataSet = __webpack_require__(89);\n\n var DataView = __webpack_require__(93);\n\n var EdgesHandler = function () {\n function EdgesHandler(body, images, groups) {\n var _this = this;\n\n (0, _classCallCheck3['default'])(this, EdgesHandler);\n this.body = body;\n this.images = images;\n this.groups = groups; // create the edge API in the body container\n\n this.body.functions.createEdge = this.create.bind(this);\n this.edgesListeners = {\n add: function add(event, params) {\n _this.add(params.items);\n },\n update: function update(event, params) {\n _this.update(params.items);\n },\n remove: function remove(event, params) {\n _this.remove(params.items);\n }\n };\n this.options = {};\n this.defaultOptions = {\n arrows: {\n to: {\n enabled: false,\n scaleFactor: 1,\n type: 'arrow'\n },\n // boolean / {arrowScaleFactor:1} / {enabled: false, arrowScaleFactor:1}\n middle: {\n enabled: false,\n scaleFactor: 1,\n type: 'arrow'\n },\n from: {\n enabled: false,\n scaleFactor: 1,\n type: 'arrow'\n }\n },\n arrowStrikethrough: true,\n color: {\n color: '#848484',\n highlight: '#848484',\n hover: '#848484',\n inherit: 'from',\n opacity: 1.0\n },\n dashes: false,\n font: {\n color: '#343434',\n size: 14,\n // px\n face: 'arial',\n background: 'none',\n strokeWidth: 2,\n // px\n strokeColor: '#ffffff',\n align: 'horizontal',\n multi: false,\n vadjust: 0,\n bold: {\n mod: 'bold'\n },\n boldital: {\n mod: 'bold italic'\n },\n ital: {\n mod: 'italic'\n },\n mono: {\n mod: '',\n size: 15,\n // px\n face: 'courier new',\n vadjust: 2\n }\n },\n hidden: false,\n hoverWidth: 1.5,\n label: undefined,\n labelHighlightBold: true,\n length: undefined,\n physics: true,\n scaling: {\n min: 1,\n max: 15,\n label: {\n enabled: true,\n min: 14,\n max: 30,\n maxVisible: 30,\n drawThreshold: 5\n },\n customScalingFunction: function customScalingFunction(min, max, total, value) {\n if (max === min) {\n return 0.5;\n } else {\n var scale = 1 / (max - min);\n return Math.max(0, (value - min) * scale);\n }\n }\n },\n selectionWidth: 1.5,\n selfReferenceSize: 20,\n shadow: {\n enabled: false,\n color: 'rgba(0,0,0,0.5)',\n size: 10,\n x: 5,\n y: 5\n },\n smooth: {\n enabled: true,\n type: \"dynamic\",\n forceDirection: 'none',\n roundness: 0.5\n },\n title: undefined,\n width: 1,\n value: undefined\n };\n util.extend(this.options, this.defaultOptions);\n this.bindEventListeners();\n }\n\n (0, _createClass3['default'])(EdgesHandler, [{\n key: 'bindEventListeners',\n value: function bindEventListeners() {\n var _this2 = this; // this allows external modules to force all dynamic curves to turn static.\n\n\n this.body.emitter.on(\"_forceDisableDynamicCurves\", function (type) {\n if (type === 'dynamic') {\n type = 'continuous';\n }\n\n var emitChange = false;\n\n for (var edgeId in _this2.body.edges) {\n if (_this2.body.edges.hasOwnProperty(edgeId)) {\n var edge = _this2.body.edges[edgeId];\n var edgeData = _this2.body.data.edges._data[edgeId]; // only forcibly remove the smooth curve if the data has been set of the edge has the smooth curves defined.\n // this is because a change in the global would not affect these curves.\n\n if (edgeData !== undefined) {\n var edgeOptions = edgeData.smooth;\n\n if (edgeOptions !== undefined) {\n if (edgeOptions.enabled === true && edgeOptions.type === 'dynamic') {\n if (type === undefined) {\n edge.setOptions({\n smooth: false\n });\n } else {\n edge.setOptions({\n smooth: {\n type: type\n }\n });\n }\n\n emitChange = true;\n }\n }\n }\n }\n }\n\n if (emitChange === true) {\n _this2.body.emitter.emit(\"_dataChanged\");\n }\n }); // this is called when options of EXISTING nodes or edges have changed.\n\n this.body.emitter.on(\"_dataUpdated\", function () {\n _this2.reconnectEdges();\n }); // refresh the edges. Used when reverting from hierarchical layout\n\n this.body.emitter.on(\"refreshEdges\", this.refresh.bind(this));\n this.body.emitter.on(\"refresh\", this.refresh.bind(this));\n this.body.emitter.on(\"destroy\", function () {\n util.forEach(_this2.edgesListeners, function (callback, event) {\n if (_this2.body.data.edges) _this2.body.data.edges.off(event, callback);\n });\n delete _this2.body.functions.createEdge;\n delete _this2.edgesListeners.add;\n delete _this2.edgesListeners.update;\n delete _this2.edgesListeners.remove;\n delete _this2.edgesListeners;\n });\n }\n }, {\n key: 'setOptions',\n value: function setOptions(options) {\n this.edgeOptions = options;\n\n if (options !== undefined) {\n // use the parser from the Edge class to fill in all shorthand notations\n _Edge2['default'].parseOptions(this.options, options); // update smooth settings in all edges\n\n\n var dataChanged = false;\n\n if (options.smooth !== undefined) {\n for (var edgeId in this.body.edges) {\n if (this.body.edges.hasOwnProperty(edgeId)) {\n dataChanged = this.body.edges[edgeId].updateEdgeType() || dataChanged;\n }\n }\n } // update fonts in all edges\n\n\n if (options.font !== undefined) {\n // use the parser from the Label class to fill in all shorthand notations\n _Label2['default'].parseOptions(this.options.font, options);\n\n for (var _edgeId in this.body.edges) {\n if (this.body.edges.hasOwnProperty(_edgeId)) {\n this.body.edges[_edgeId].updateLabelModule();\n }\n }\n } // update the state of the variables if needed\n\n\n if (options.hidden !== undefined || options.physics !== undefined || dataChanged === true) {\n this.body.emitter.emit('_dataChanged');\n }\n }\n }\n /**\n * Load edges by reading the data table\n * @param {Array | DataSet | DataView} edges The data containing the edges.\n * @private\n * @private\n */\n\n }, {\n key: 'setData',\n value: function setData(edges) {\n var _this3 = this;\n\n var doNotEmit = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n var oldEdgesData = this.body.data.edges;\n\n if (edges instanceof DataSet || edges instanceof DataView) {\n this.body.data.edges = edges;\n } else if (Array.isArray(edges)) {\n this.body.data.edges = new DataSet();\n this.body.data.edges.add(edges);\n } else if (!edges) {\n this.body.data.edges = new DataSet();\n } else {\n throw new TypeError('Array or DataSet expected');\n } // TODO: is this null or undefined or false?\n\n\n if (oldEdgesData) {\n // unsubscribe from old dataset\n util.forEach(this.edgesListeners, function (callback, event) {\n oldEdgesData.off(event, callback);\n });\n } // remove drawn edges\n\n\n this.body.edges = {}; // TODO: is this null or undefined or false?\n\n if (this.body.data.edges) {\n // subscribe to new dataset\n util.forEach(this.edgesListeners, function (callback, event) {\n _this3.body.data.edges.on(event, callback);\n }); // draw all new nodes\n\n var ids = this.body.data.edges.getIds();\n this.add(ids, true);\n }\n\n if (doNotEmit === false) {\n this.body.emitter.emit(\"_dataChanged\");\n }\n }\n /**\n * Add edges\n * @param {Number[] | String[]} ids\n * @private\n */\n\n }, {\n key: 'add',\n value: function add(ids) {\n var doNotEmit = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n var edges = this.body.edges;\n var edgesData = this.body.data.edges;\n\n for (var i = 0; i < ids.length; i++) {\n var id = ids[i];\n var oldEdge = edges[id];\n\n if (oldEdge) {\n oldEdge.disconnect();\n }\n\n var data = edgesData.get(id, {\n \"showInternalIds\": true\n });\n edges[id] = this.create(data);\n }\n\n if (doNotEmit === false) {\n this.body.emitter.emit(\"_dataChanged\");\n }\n }\n /**\n * Update existing edges, or create them when not yet existing\n * @param {Number[] | String[]} ids\n * @private\n */\n\n }, {\n key: 'update',\n value: function update(ids) {\n var edges = this.body.edges;\n var edgesData = this.body.data.edges;\n var dataChanged = false;\n\n for (var i = 0; i < ids.length; i++) {\n var id = ids[i];\n var data = edgesData.get(id);\n var edge = edges[id];\n\n if (edge !== undefined) {\n // update edge\n edge.disconnect();\n dataChanged = edge.setOptions(data) || dataChanged; // if a support node is added, data can be changed.\n\n edge.connect();\n } else {\n // create edge\n this.body.edges[id] = this.create(data);\n dataChanged = true;\n }\n }\n\n if (dataChanged === true) {\n this.body.emitter.emit(\"_dataChanged\");\n } else {\n this.body.emitter.emit(\"_dataUpdated\");\n }\n }\n /**\n * Remove existing edges. Non existing ids will be ignored\n * @param {Number[] | String[]} ids\n * @private\n */\n\n }, {\n key: 'remove',\n value: function remove(ids) {\n var edges = this.body.edges;\n\n for (var i = 0; i < ids.length; i++) {\n var id = ids[i];\n var edge = edges[id];\n\n if (edge !== undefined) {\n edge.cleanup();\n edge.disconnect();\n delete edges[id];\n }\n }\n\n this.body.emitter.emit(\"_dataChanged\");\n }\n }, {\n key: 'refresh',\n value: function refresh() {\n var edges = this.body.edges;\n\n for (var edgeId in edges) {\n var edge = undefined;\n\n if (edges.hasOwnProperty(edgeId)) {\n edge = edges[edgeId];\n }\n\n var data = this.body.data.edges._data[edgeId];\n\n if (edge !== undefined && data !== undefined) {\n edge.setOptions(data);\n }\n }\n }\n }, {\n key: 'create',\n value: function create(properties) {\n return new _Edge2['default'](properties, this.body, this.options, this.defaultOptions, this.edgeOptions);\n }\n /**\n * Reconnect all edges\n * @private\n */\n\n }, {\n key: 'reconnectEdges',\n value: function reconnectEdges() {\n var id;\n var nodes = this.body.nodes;\n var edges = this.body.edges;\n\n for (id in nodes) {\n if (nodes.hasOwnProperty(id)) {\n nodes[id].edges = [];\n }\n }\n\n for (id in edges) {\n if (edges.hasOwnProperty(id)) {\n var edge = edges[id];\n edge.from = null;\n edge.to = null;\n edge.connect();\n }\n }\n }\n }, {\n key: 'getConnectedNodes',\n value: function getConnectedNodes(edgeId) {\n var nodeList = [];\n\n if (this.body.edges[edgeId] !== undefined) {\n var edge = this.body.edges[edgeId];\n\n if (edge.fromId) {\n nodeList.push(edge.fromId);\n }\n\n if (edge.toId) {\n nodeList.push(edge.toId);\n }\n }\n\n return nodeList;\n }\n }]);\n return EdgesHandler;\n }();\n\n exports['default'] = EdgesHandler;\n /***/\n },\n /* 196 */\n\n /***/\n function (module, exports, __webpack_require__) {\n 'use strict';\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n\n var _stringify = __webpack_require__(90);\n\n var _stringify2 = _interopRequireDefault(_stringify);\n\n var _create = __webpack_require__(55);\n\n var _create2 = _interopRequireDefault(_create);\n\n var _typeof2 = __webpack_require__(62);\n\n var _typeof3 = _interopRequireDefault(_typeof2);\n\n var _classCallCheck2 = __webpack_require__(119);\n\n var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\n var _createClass2 = __webpack_require__(120);\n\n var _createClass3 = _interopRequireDefault(_createClass2);\n\n var _Label = __webpack_require__(164);\n\n var _Label2 = _interopRequireDefault(_Label);\n\n var _CubicBezierEdge = __webpack_require__(197);\n\n var _CubicBezierEdge2 = _interopRequireDefault(_CubicBezierEdge);\n\n var _BezierEdgeDynamic = __webpack_require__(201);\n\n var _BezierEdgeDynamic2 = _interopRequireDefault(_BezierEdgeDynamic);\n\n var _BezierEdgeStatic = __webpack_require__(202);\n\n var _BezierEdgeStatic2 = _interopRequireDefault(_BezierEdgeStatic);\n\n var _StraightEdge = __webpack_require__(203);\n\n var _StraightEdge2 = _interopRequireDefault(_StraightEdge);\n\n function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n 'default': obj\n };\n }\n\n var util = __webpack_require__(1);\n /**\n * @class Edge\n *\n * A edge connects two nodes\n * @param {Object} properties Object with options. Must contain\n * At least options from and to.\n * Available options: from (number),\n * to (number), label (string, color (string),\n * width (number), style (string),\n * length (number), title (string)\n * @param {Network} network A Network object, used to find and edge to\n * nodes.\n * @param {Object} constants An object with default values for\n * example for the color\n */\n\n\n var Edge = function () {\n function Edge(options, body, globalOptions, defaultOptions, edgeOptions) {\n (0, _classCallCheck3['default'])(this, Edge);\n\n if (body === undefined) {\n throw \"No body provided\";\n }\n\n this.options = util.bridgeObject(globalOptions);\n this.globalOptions = globalOptions;\n this.defaultOptions = defaultOptions;\n this.edgeOptions = edgeOptions;\n this.body = body; // initialize variables\n\n this.id = undefined;\n this.fromId = undefined;\n this.toId = undefined;\n this.selected = false;\n this.hover = false;\n this.labelDirty = true;\n this.baseWidth = this.options.width;\n this.baseFontSize = this.options.font.size;\n this.from = undefined; // a node\n\n this.to = undefined; // a node\n\n this.edgeType = undefined;\n this.connected = false;\n this.labelModule = new _Label2['default'](this.body, this.options, true\n /* It's an edge label */\n );\n this.setOptions(options);\n }\n /**\n * Set or overwrite options for the edge\n * @param {Object} options an object with options\n * @param doNotEmit\n */\n\n\n (0, _createClass3['default'])(Edge, [{\n key: 'setOptions',\n value: function setOptions(options) {\n if (!options) {\n return;\n }\n\n Edge.parseOptions(this.options, options, true, this.globalOptions);\n\n if (options.id !== undefined) {\n this.id = options.id;\n }\n\n if (options.from !== undefined) {\n this.fromId = options.from;\n }\n\n if (options.to !== undefined) {\n this.toId = options.to;\n }\n\n if (options.title !== undefined) {\n this.title = options.title;\n }\n\n if (options.value !== undefined) {\n options.value = parseFloat(options.value);\n }\n\n this.choosify(options); // update label Module\n\n this.updateLabelModule(options);\n this.labelModule.propagateFonts(this.edgeOptions, options, this.defaultOptions);\n var dataChanged = this.updateEdgeType(); // if anything has been updates, reset the selection width and the hover width\n\n this._setInteractionWidths(); // A node is connected when it has a from and to node that both exist in the network.body.nodes.\n\n\n this.connect();\n\n if (options.hidden !== undefined || options.physics !== undefined) {\n dataChanged = true;\n }\n\n return dataChanged;\n }\n }, {\n key: 'choosify',\n value: function choosify(options) {\n this.chooser = true;\n var pile = [options, this.options, this.defaultOptions];\n var chosen = util.topMost(pile, 'chosen');\n\n if (typeof chosen === 'boolean') {\n this.chooser = chosen;\n } else if ((typeof chosen === 'undefined' ? 'undefined' : (0, _typeof3['default'])(chosen)) === 'object') {\n var chosenEdge = util.topMost(pile, ['chosen', 'edge']);\n\n if (typeof chosenEdge === 'boolean' || typeof chosenEdge === 'function') {\n this.chooser = chosenEdge;\n }\n }\n }\n }, {\n key: 'getFormattingValues',\n value: function getFormattingValues() {\n var toArrow = this.options.arrows.to === true || this.options.arrows.to.enabled === true;\n var fromArrow = this.options.arrows.from === true || this.options.arrows.from.enabled === true;\n var middleArrow = this.options.arrows.middle === true || this.options.arrows.middle.enabled === true;\n var inheritsColor = this.options.color.inherit;\n var values = {\n toArrow: toArrow,\n toArrowScale: this.options.arrows.to.scaleFactor,\n toArrowType: this.options.arrows.to.type,\n middleArrow: middleArrow,\n middleArrowScale: this.options.arrows.middle.scaleFactor,\n middleArrowType: this.options.arrows.middle.type,\n fromArrow: fromArrow,\n fromArrowScale: this.options.arrows.from.scaleFactor,\n fromArrowType: this.options.arrows.from.type,\n arrowStrikethrough: this.options.arrowStrikethrough,\n color: inheritsColor ? undefined : this.options.color.color,\n inheritsColor: inheritsColor,\n opacity: this.options.color.opacity,\n hidden: this.options.hidden,\n length: this.options.length,\n shadow: this.options.shadow.enabled,\n shadowColor: this.options.shadow.color,\n shadowSize: this.options.shadow.size,\n shadowX: this.options.shadow.x,\n shadowY: this.options.shadow.y,\n dashes: this.options.dashes,\n width: this.options.width\n };\n\n if (this.selected || this.hover) {\n if (this.chooser === true) {\n if (this.selected) {\n var selectedWidth = this.options.selectionWidth;\n\n if (typeof selectedWidth === 'function') {\n values.width = selectedWidth(values.width);\n } else if (typeof selectedWidth === 'number') {\n values.width += selectedWidth;\n }\n\n values.width = Math.max(values.width, 0.3 / this.body.view.scale);\n values.color = this.options.color.highlight;\n values.shadow = this.options.shadow.enabled;\n } else if (this.hover) {\n var hoverWidth = this.options.hoverWidth;\n\n if (typeof hoverWidth === 'function') {\n values.width = hoverWidth(values.width);\n } else if (typeof hoverWidth === 'number') {\n values.width += hoverWidth;\n }\n\n values.width = Math.max(values.width, 0.3 / this.body.view.scale);\n values.color = this.options.color.hover;\n values.shadow = this.options.shadow.enabled;\n }\n } else if (typeof this.chooser === 'function') {\n this.chooser(values, this.options.id, this.selected, this.hover);\n\n if (values.color !== undefined) {\n values.inheritsColor = false;\n }\n\n if (values.shadow === false) {\n if (values.shadowColor !== this.options.shadow.color || values.shadowSize !== this.options.shadow.size || values.shadowX !== this.options.shadow.x || values.shadowY !== this.options.shadow.y) {\n values.shadow = true;\n }\n }\n }\n } else {\n values.shadow = this.options.shadow.enabled;\n values.width = Math.max(values.width, 0.3 / this.body.view.scale);\n }\n\n return values;\n }\n /**\n * update the options in the label module\n */\n\n }, {\n key: 'updateLabelModule',\n value: function updateLabelModule(options) {\n this.labelModule.setOptions(this.options, true);\n\n if (this.labelModule.baseSize !== undefined) {\n this.baseFontSize = this.labelModule.baseSize;\n }\n\n this.labelModule.constrain(this.edgeOptions, options, this.defaultOptions);\n this.labelModule.choosify(this.edgeOptions, options, this.defaultOptions);\n }\n /**\n * update the edge type, set the options\n * @returns {boolean}\n */\n\n }, {\n key: 'updateEdgeType',\n value: function updateEdgeType() {\n var smooth = this.options.smooth;\n var dataChanged = false;\n var changeInType = true;\n\n if (this.edgeType !== undefined) {\n if (this.edgeType instanceof _BezierEdgeDynamic2['default'] && smooth.enabled === true && smooth.type === 'dynamic' || this.edgeType instanceof _CubicBezierEdge2['default'] && smooth.enabled === true && smooth.type === 'cubicBezier' || this.edgeType instanceof _BezierEdgeStatic2['default'] && smooth.enabled === true && smooth.type !== 'dynamic' && smooth.type !== 'cubicBezier' || this.edgeType instanceof _StraightEdge2['default'] && smooth.type.enabled === false) {\n changeInType = false;\n }\n\n if (changeInType === true) {\n dataChanged = this.cleanup();\n }\n }\n\n if (changeInType === true) {\n if (smooth.enabled === true) {\n if (smooth.type === 'dynamic') {\n dataChanged = true;\n this.edgeType = new _BezierEdgeDynamic2['default'](this.options, this.body, this.labelModule);\n } else if (smooth.type === 'cubicBezier') {\n this.edgeType = new _CubicBezierEdge2['default'](this.options, this.body, this.labelModule);\n } else {\n this.edgeType = new _BezierEdgeStatic2['default'](this.options, this.body, this.labelModule);\n }\n } else {\n this.edgeType = new _StraightEdge2['default'](this.options, this.body, this.labelModule);\n }\n } else {\n // if nothing changes, we just set the options.\n this.edgeType.setOptions(this.options);\n }\n\n return dataChanged;\n }\n /**\n * Connect an edge to its nodes\n */\n\n }, {\n key: 'connect',\n value: function connect() {\n this.disconnect();\n this.from = this.body.nodes[this.fromId] || undefined;\n this.to = this.body.nodes[this.toId] || undefined;\n this.connected = this.from !== undefined && this.to !== undefined;\n\n if (this.connected === true) {\n this.from.attachEdge(this);\n this.to.attachEdge(this);\n } else {\n if (this.from) {\n this.from.detachEdge(this);\n }\n\n if (this.to) {\n this.to.detachEdge(this);\n }\n }\n\n this.edgeType.connect();\n }\n /**\n * Disconnect an edge from its nodes\n */\n\n }, {\n key: 'disconnect',\n value: function disconnect() {\n if (this.from) {\n this.from.detachEdge(this);\n this.from = undefined;\n }\n\n if (this.to) {\n this.to.detachEdge(this);\n this.to = undefined;\n }\n\n this.connected = false;\n }\n /**\n * get the title of this edge.\n * @return {string} title The title of the edge, or undefined when no title\n * has been set.\n */\n\n }, {\n key: 'getTitle',\n value: function getTitle() {\n return this.title;\n }\n /**\n * check if this node is selecte\n * @return {boolean} selected True if node is selected, else false\n */\n\n }, {\n key: 'isSelected',\n value: function isSelected() {\n return this.selected;\n }\n /**\n * Retrieve the value of the edge. Can be undefined\n * @return {Number} value\n */\n\n }, {\n key: 'getValue',\n value: function getValue() {\n return this.options.value;\n }\n /**\n * Adjust the value range of the edge. The edge will adjust it's width\n * based on its value.\n * @param {Number} min\n * @param {Number} max\n * @param total\n */\n\n }, {\n key: 'setValueRange',\n value: function setValueRange(min, max, total) {\n if (this.options.value !== undefined) {\n var scale = this.options.scaling.customScalingFunction(min, max, total, this.options.value);\n var widthDiff = this.options.scaling.max - this.options.scaling.min;\n\n if (this.options.scaling.label.enabled === true) {\n var fontDiff = this.options.scaling.label.max - this.options.scaling.label.min;\n this.options.font.size = this.options.scaling.label.min + scale * fontDiff;\n }\n\n this.options.width = this.options.scaling.min + scale * widthDiff;\n } else {\n this.options.width = this.baseWidth;\n this.options.font.size = this.baseFontSize;\n }\n\n this._setInteractionWidths();\n\n this.updateLabelModule();\n }\n }, {\n key: '_setInteractionWidths',\n value: function _setInteractionWidths() {\n if (typeof this.options.hoverWidth === 'function') {\n this.edgeType.hoverWidth = this.options.hoverWidth(this.options.width);\n } else {\n this.edgeType.hoverWidth = this.options.hoverWidth + this.options.width;\n }\n\n if (typeof this.options.selectionWidth === 'function') {\n this.edgeType.selectionWidth = this.options.selectionWidth(this.options.width);\n } else {\n this.edgeType.selectionWidth = this.options.selectionWidth + this.options.width;\n }\n }\n /**\n * Redraw a edge\n * Draw this edge in the given canvas\n * The 2d context of a HTML canvas can be retrieved by canvas.getContext(\"2d\");\n * @param {CanvasRenderingContext2D} ctx\n */\n\n }, {\n key: 'draw',\n value: function draw(ctx) {\n var values = this.getFormattingValues();\n\n if (values.hidden) {\n return;\n } // get the via node from the edge type\n\n\n var viaNode = this.edgeType.getViaNode();\n var arrowData = {}; // restore edge targets to defaults\n\n this.edgeType.fromPoint = this.edgeType.from;\n this.edgeType.toPoint = this.edgeType.to; // from and to arrows give a different end point for edges. we set them here\n\n if (values.fromArrow) {\n arrowData.from = this.edgeType.getArrowData(ctx, 'from', viaNode, this.selected, this.hover, values);\n if (values.arrowStrikethrough === false) this.edgeType.fromPoint = arrowData.from.core;\n }\n\n if (values.toArrow) {\n arrowData.to = this.edgeType.getArrowData(ctx, 'to', viaNode, this.selected, this.hover, values);\n if (values.arrowStrikethrough === false) this.edgeType.toPoint = arrowData.to.core;\n } // the middle arrow depends on the line, which can depend on the to and from arrows so we do this one lastly.\n\n\n if (values.middleArrow) {\n arrowData.middle = this.edgeType.getArrowData(ctx, 'middle', viaNode, this.selected, this.hover, values);\n } // draw everything\n\n\n this.edgeType.drawLine(ctx, values, this.selected, this.hover, viaNode);\n this.drawArrows(ctx, arrowData, values);\n this.drawLabel(ctx, viaNode);\n }\n }, {\n key: 'drawArrows',\n value: function drawArrows(ctx, arrowData, values) {\n if (values.fromArrow) {\n this.edgeType.drawArrowHead(ctx, values, this.selected, this.hover, arrowData.from);\n }\n\n if (values.middleArrow) {\n this.edgeType.drawArrowHead(ctx, values, this.selected, this.hover, arrowData.middle);\n }\n\n if (values.toArrow) {\n this.edgeType.drawArrowHead(ctx, values, this.selected, this.hover, arrowData.to);\n }\n }\n }, {\n key: 'drawLabel',\n value: function drawLabel(ctx, viaNode) {\n if (this.options.label !== undefined) {\n // set style\n var node1 = this.from;\n var node2 = this.to;\n var selected = this.from.selected || this.to.selected || this.selected;\n\n if (node1.id != node2.id) {\n this.labelModule.pointToSelf = false;\n var point = this.edgeType.getPoint(0.5, viaNode);\n ctx.save(); // if the label has to be rotated:\n\n if (this.options.font.align !== \"horizontal\") {\n this.labelModule.calculateLabelSize(ctx, selected, this.hover, point.x, point.y);\n ctx.translate(point.x, this.labelModule.size.yLine);\n\n this._rotateForLabelAlignment(ctx);\n } // draw the label\n\n\n this.labelModule.draw(ctx, point.x, point.y, selected, this.hover);\n ctx.restore();\n } else {\n // Ignore the orientations.\n this.labelModule.pointToSelf = true;\n var x, y;\n var radius = this.options.selfReferenceSize;\n\n if (node1.shape.width > node1.shape.height) {\n x = node1.x + node1.shape.width * 0.5;\n y = node1.y - radius;\n } else {\n x = node1.x + radius;\n y = node1.y - node1.shape.height * 0.5;\n }\n\n point = this._pointOnCircle(x, y, radius, 0.125);\n this.labelModule.draw(ctx, point.x, point.y, selected, this.hover);\n }\n }\n }\n /**\n * Check if this object is overlapping with the provided object\n * @param {Object} obj an object with parameters left, top\n * @return {boolean} True if location is located on the edge\n */\n\n }, {\n key: 'isOverlappingWith',\n value: function isOverlappingWith(obj) {\n if (this.connected) {\n var distMax = 10;\n var xFrom = this.from.x;\n var yFrom = this.from.y;\n var xTo = this.to.x;\n var yTo = this.to.y;\n var xObj = obj.left;\n var yObj = obj.top;\n var dist = this.edgeType.getDistanceToEdge(xFrom, yFrom, xTo, yTo, xObj, yObj);\n return dist < distMax;\n } else {\n return false;\n }\n }\n /**\n * Rotates the canvas so the text is most readable\n * @param {CanvasRenderingContext2D} ctx\n * @private\n */\n\n }, {\n key: '_rotateForLabelAlignment',\n value: function _rotateForLabelAlignment(ctx) {\n var dy = this.from.y - this.to.y;\n var dx = this.from.x - this.to.x;\n var angleInDegrees = Math.atan2(dy, dx); // rotate so label it is readable\n\n if (angleInDegrees < -1 && dx < 0 || angleInDegrees > 0 && dx < 0) {\n angleInDegrees = angleInDegrees + Math.PI;\n }\n\n ctx.rotate(angleInDegrees);\n }\n /**\n * Get a point on a circle\n * @param {Number} x\n * @param {Number} y\n * @param {Number} radius\n * @param {Number} percentage. Value between 0 (line start) and 1 (line end)\n * @return {Object} point\n * @private\n */\n\n }, {\n key: '_pointOnCircle',\n value: function _pointOnCircle(x, y, radius, percentage) {\n var angle = percentage * 2 * Math.PI;\n return {\n x: x + radius * Math.cos(angle),\n y: y - radius * Math.sin(angle)\n };\n }\n }, {\n key: 'select',\n value: function select() {\n this.selected = true;\n }\n }, {\n key: 'unselect',\n value: function unselect() {\n this.selected = false;\n }\n /**\n * cleans all required things on delete\n * @returns {*}\n */\n\n }, {\n key: 'cleanup',\n value: function cleanup() {\n return this.edgeType.cleanup();\n }\n }], [{\n key: 'parseOptions',\n value: function parseOptions(parentOptions, newOptions) {\n var allowDeletion = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n var globalOptions = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};\n var fields = ['arrowStrikethrough', 'id', 'from', 'hidden', 'hoverWidth', 'label', 'labelHighlightBold', 'length', 'line', 'opacity', 'physics', 'scaling', 'selectionWidth', 'selfReferenceSize', 'to', 'title', 'value', 'width']; // only deep extend the items in the field array. These do not have shorthand.\n\n util.selectiveDeepExtend(fields, parentOptions, newOptions, allowDeletion);\n util.mergeOptions(parentOptions, newOptions, 'smooth', allowDeletion, globalOptions);\n util.mergeOptions(parentOptions, newOptions, 'shadow', allowDeletion, globalOptions);\n\n if (newOptions.dashes !== undefined && newOptions.dashes !== null) {\n parentOptions.dashes = newOptions.dashes;\n } else if (allowDeletion === true && newOptions.dashes === null) {\n parentOptions.dashes = (0, _create2['default'])(globalOptions.dashes); // this sets the pointer of the option back to the global option.\n } // set the scaling newOptions\n\n\n if (newOptions.scaling !== undefined && newOptions.scaling !== null) {\n if (newOptions.scaling.min !== undefined) {\n parentOptions.scaling.min = newOptions.scaling.min;\n }\n\n if (newOptions.scaling.max !== undefined) {\n parentOptions.scaling.max = newOptions.scaling.max;\n }\n\n util.mergeOptions(parentOptions.scaling, newOptions.scaling, 'label', allowDeletion, globalOptions.scaling);\n } else if (allowDeletion === true && newOptions.scaling === null) {\n parentOptions.scaling = (0, _create2['default'])(globalOptions.scaling); // this sets the pointer of the option back to the global option.\n } // handle multiple input cases for arrows\n\n\n if (newOptions.arrows !== undefined && newOptions.arrows !== null) {\n if (typeof newOptions.arrows === 'string') {\n var arrows = newOptions.arrows.toLowerCase();\n parentOptions.arrows.to.enabled = arrows.indexOf(\"to\") != -1;\n parentOptions.arrows.middle.enabled = arrows.indexOf(\"middle\") != -1;\n parentOptions.arrows.from.enabled = arrows.indexOf(\"from\") != -1;\n } else if ((0, _typeof3['default'])(newOptions.arrows) === 'object') {\n util.mergeOptions(parentOptions.arrows, newOptions.arrows, 'to', allowDeletion, globalOptions.arrows);\n util.mergeOptions(parentOptions.arrows, newOptions.arrows, 'middle', allowDeletion, globalOptions.arrows);\n util.mergeOptions(parentOptions.arrows, newOptions.arrows, 'from', allowDeletion, globalOptions.arrows);\n } else {\n throw new Error(\"The arrow newOptions can only be an object or a string. Refer to the documentation. You used:\" + (0, _stringify2['default'])(newOptions.arrows));\n }\n } else if (allowDeletion === true && newOptions.arrows === null) {\n parentOptions.arrows = (0, _create2['default'])(globalOptions.arrows); // this sets the pointer of the option back to the global option.\n } // handle multiple input cases for color\n\n\n if (newOptions.color !== undefined && newOptions.color !== null) {\n // make a copy of the parent object in case this is referring to the global one (due to object create once, then update)\n parentOptions.color = util.deepExtend({}, parentOptions.color, true);\n\n if (util.isString(newOptions.color)) {\n parentOptions.color.color = newOptions.color;\n parentOptions.color.highlight = newOptions.color;\n parentOptions.color.hover = newOptions.color;\n parentOptions.color.inherit = false;\n } else {\n var colorsDefined = false;\n\n if (newOptions.color.color !== undefined) {\n parentOptions.color.color = newOptions.color.color;\n colorsDefined = true;\n }\n\n if (newOptions.color.highlight !== undefined) {\n parentOptions.color.highlight = newOptions.color.highlight;\n colorsDefined = true;\n }\n\n if (newOptions.color.hover !== undefined) {\n parentOptions.color.hover = newOptions.color.hover;\n colorsDefined = true;\n }\n\n if (newOptions.color.inherit !== undefined) {\n parentOptions.color.inherit = newOptions.color.inherit;\n }\n\n if (newOptions.color.opacity !== undefined) {\n parentOptions.color.opacity = Math.min(1, Math.max(0, newOptions.color.opacity));\n }\n\n if (newOptions.color.inherit === undefined && colorsDefined === true) {\n parentOptions.color.inherit = false;\n }\n }\n } else if (allowDeletion === true && newOptions.color === null) {\n parentOptions.color = util.bridgeObject(globalOptions.color); // set the object back to the global options\n } // handle the font settings\n\n\n if (newOptions.font !== undefined && newOptions.font !== null) {\n _Label2['default'].parseOptions(parentOptions.font, newOptions);\n } else if (allowDeletion === true && newOptions.font === null) {\n parentOptions.font = util.bridgeObject(globalOptions.font); // set the object back to the global options\n }\n }\n }]);\n return Edge;\n }();\n\n exports['default'] = Edge;\n /***/\n },\n /* 197 */\n\n /***/\n function (module, exports, __webpack_require__) {\n 'use strict';\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n\n var _slicedToArray2 = __webpack_require__(165);\n\n var _slicedToArray3 = _interopRequireDefault(_slicedToArray2);\n\n var _getPrototypeOf = __webpack_require__(170);\n\n var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);\n\n var _classCallCheck2 = __webpack_require__(119);\n\n var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\n var _createClass2 = __webpack_require__(120);\n\n var _createClass3 = _interopRequireDefault(_createClass2);\n\n var _possibleConstructorReturn2 = __webpack_require__(173);\n\n var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);\n\n var _inherits2 = __webpack_require__(174);\n\n var _inherits3 = _interopRequireDefault(_inherits2);\n\n var _CubicBezierEdgeBase2 = __webpack_require__(198);\n\n var _CubicBezierEdgeBase3 = _interopRequireDefault(_CubicBezierEdgeBase2);\n\n function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n 'default': obj\n };\n }\n\n var CubicBezierEdge = function (_CubicBezierEdgeBase) {\n (0, _inherits3['default'])(CubicBezierEdge, _CubicBezierEdgeBase);\n\n function CubicBezierEdge(options, body, labelModule) {\n (0, _classCallCheck3['default'])(this, CubicBezierEdge);\n return (0, _possibleConstructorReturn3['default'])(this, (CubicBezierEdge.__proto__ || (0, _getPrototypeOf2['default'])(CubicBezierEdge)).call(this, options, body, labelModule));\n }\n /**\n * Draw a line between two nodes\n * @param {CanvasRenderingContext2D} ctx\n * @private\n */\n\n\n (0, _createClass3['default'])(CubicBezierEdge, [{\n key: '_line',\n value: function _line(ctx, values, viaNodes) {\n // get the coordinates of the support points.\n var via1 = viaNodes[0];\n var via2 = viaNodes[1]; // start drawing the line.\n\n ctx.beginPath();\n ctx.moveTo(this.fromPoint.x, this.fromPoint.y); // fallback to normal straight edges\n\n if (viaNodes === undefined || via1.x === undefined) {\n ctx.lineTo(this.toPoint.x, this.toPoint.y);\n } else {\n ctx.bezierCurveTo(via1.x, via1.y, via2.x, via2.y, this.toPoint.x, this.toPoint.y);\n } // draw shadow if enabled\n\n\n this.enableShadow(ctx, values);\n ctx.stroke();\n this.disableShadow(ctx, values);\n }\n }, {\n key: '_getViaCoordinates',\n value: function _getViaCoordinates() {\n var dx = this.from.x - this.to.x;\n var dy = this.from.y - this.to.y;\n var x1 = void 0,\n y1 = void 0,\n x2 = void 0,\n y2 = void 0;\n var roundness = this.options.smooth.roundness; // horizontal if x > y or if direction is forced or if direction is horizontal\n\n if ((Math.abs(dx) > Math.abs(dy) || this.options.smooth.forceDirection === true || this.options.smooth.forceDirection === 'horizontal') && this.options.smooth.forceDirection !== 'vertical') {\n y1 = this.from.y;\n y2 = this.to.y;\n x1 = this.from.x - roundness * dx;\n x2 = this.to.x + roundness * dx;\n } else {\n y1 = this.from.y - roundness * dy;\n y2 = this.to.y + roundness * dy;\n x1 = this.from.x;\n x2 = this.to.x;\n }\n\n return [{\n x: x1,\n y: y1\n }, {\n x: x2,\n y: y2\n }];\n }\n }, {\n key: 'getViaNode',\n value: function getViaNode() {\n return this._getViaCoordinates();\n }\n }, {\n key: '_findBorderPosition',\n value: function _findBorderPosition(nearNode, ctx) {\n return this._findBorderPositionBezier(nearNode, ctx);\n }\n }, {\n key: '_getDistanceToEdge',\n value: function _getDistanceToEdge(x1, y1, x2, y2, x3, y3) {\n var _ref = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : this._getViaCoordinates(),\n _ref2 = (0, _slicedToArray3['default'])(_ref, 2),\n via1 = _ref2[0],\n via2 = _ref2[1]; // x3,y3 is the point\n\n\n return this._getDistanceToBezierEdge(x1, y1, x2, y2, x3, y3, via1, via2);\n }\n /**\n * Combined function of pointOnLine and pointOnBezier. This gives the coordinates of a point on the line at a certain percentage of the way\n * @param percentage\n * @param via\n * @returns {{x: number, y: number}}\n * @private\n */\n\n }, {\n key: 'getPoint',\n value: function getPoint(percentage) {\n var _ref3 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this._getViaCoordinates(),\n _ref4 = (0, _slicedToArray3['default'])(_ref3, 2),\n via1 = _ref4[0],\n via2 = _ref4[1];\n\n var t = percentage;\n var vec = [];\n vec[0] = Math.pow(1 - t, 3);\n vec[1] = 3 * t * Math.pow(1 - t, 2);\n vec[2] = 3 * Math.pow(t, 2) * (1 - t);\n vec[3] = Math.pow(t, 3);\n var x = vec[0] * this.fromPoint.x + vec[1] * via1.x + vec[2] * via2.x + vec[3] * this.toPoint.x;\n var y = vec[0] * this.fromPoint.y + vec[1] * via1.y + vec[2] * via2.y + vec[3] * this.toPoint.y;\n return {\n x: x,\n y: y\n };\n }\n }]);\n return CubicBezierEdge;\n }(_CubicBezierEdgeBase3['default']);\n\n exports['default'] = CubicBezierEdge;\n /***/\n },\n /* 198 */\n\n /***/\n function (module, exports, __webpack_require__) {\n 'use strict';\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n\n var _getPrototypeOf = __webpack_require__(170);\n\n var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);\n\n var _classCallCheck2 = __webpack_require__(119);\n\n var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\n var _createClass2 = __webpack_require__(120);\n\n var _createClass3 = _interopRequireDefault(_createClass2);\n\n var _possibleConstructorReturn2 = __webpack_require__(173);\n\n var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);\n\n var _inherits2 = __webpack_require__(174);\n\n var _inherits3 = _interopRequireDefault(_inherits2);\n\n var _BezierEdgeBase2 = __webpack_require__(199);\n\n var _BezierEdgeBase3 = _interopRequireDefault(_BezierEdgeBase2);\n\n function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n 'default': obj\n };\n }\n\n var CubicBezierEdgeBase = function (_BezierEdgeBase) {\n (0, _inherits3['default'])(CubicBezierEdgeBase, _BezierEdgeBase);\n\n function CubicBezierEdgeBase(options, body, labelModule) {\n (0, _classCallCheck3['default'])(this, CubicBezierEdgeBase);\n return (0, _possibleConstructorReturn3['default'])(this, (CubicBezierEdgeBase.__proto__ || (0, _getPrototypeOf2['default'])(CubicBezierEdgeBase)).call(this, options, body, labelModule));\n }\n /**\n * Calculate the distance between a point (x3,y3) and a line segment from\n * (x1,y1) to (x2,y2).\n * http://stackoverflow.com/questions/849211/shortest-distancae-between-a-point-and-a-line-segment\n * https://en.wikipedia.org/wiki/B%C3%A9zier_curve\n * @param {number} x1 from x\n * @param {number} y1 from y\n * @param {number} x2 to x\n * @param {number} y2 to y\n * @param {number} x3 point to check x\n * @param {number} y3 point to check y\n * @private\n */\n\n\n (0, _createClass3['default'])(CubicBezierEdgeBase, [{\n key: '_getDistanceToBezierEdge',\n value: function _getDistanceToBezierEdge(x1, y1, x2, y2, x3, y3, via1, via2) {\n // x3,y3 is the point\n var minDistance = 1e9;\n var distance = void 0;\n var i = void 0,\n t = void 0,\n x = void 0,\n y = void 0;\n var lastX = x1;\n var lastY = y1;\n var vec = [0, 0, 0, 0];\n\n for (i = 1; i < 10; i++) {\n t = 0.1 * i;\n vec[0] = Math.pow(1 - t, 3);\n vec[1] = 3 * t * Math.pow(1 - t, 2);\n vec[2] = 3 * Math.pow(t, 2) * (1 - t);\n vec[3] = Math.pow(t, 3);\n x = vec[0] * x1 + vec[1] * via1.x + vec[2] * via2.x + vec[3] * x2;\n y = vec[0] * y1 + vec[1] * via1.y + vec[2] * via2.y + vec[3] * y2;\n\n if (i > 0) {\n distance = this._getDistanceToLine(lastX, lastY, x, y, x3, y3);\n minDistance = distance < minDistance ? distance : minDistance;\n }\n\n lastX = x;\n lastY = y;\n }\n\n return minDistance;\n }\n }]);\n return CubicBezierEdgeBase;\n }(_BezierEdgeBase3['default']);\n\n exports['default'] = CubicBezierEdgeBase;\n /***/\n },\n /* 199 */\n\n /***/\n function (module, exports, __webpack_require__) {\n 'use strict';\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n\n var _getPrototypeOf = __webpack_require__(170);\n\n var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);\n\n var _classCallCheck2 = __webpack_require__(119);\n\n var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\n var _createClass2 = __webpack_require__(120);\n\n var _createClass3 = _interopRequireDefault(_createClass2);\n\n var _possibleConstructorReturn2 = __webpack_require__(173);\n\n var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);\n\n var _inherits2 = __webpack_require__(174);\n\n var _inherits3 = _interopRequireDefault(_inherits2);\n\n var _EdgeBase2 = __webpack_require__(200);\n\n var _EdgeBase3 = _interopRequireDefault(_EdgeBase2);\n\n function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n 'default': obj\n };\n }\n\n var BezierEdgeBase = function (_EdgeBase) {\n (0, _inherits3['default'])(BezierEdgeBase, _EdgeBase);\n\n function BezierEdgeBase(options, body, labelModule) {\n (0, _classCallCheck3['default'])(this, BezierEdgeBase);\n return (0, _possibleConstructorReturn3['default'])(this, (BezierEdgeBase.__proto__ || (0, _getPrototypeOf2['default'])(BezierEdgeBase)).call(this, options, body, labelModule));\n }\n /**\n * This function uses binary search to look for the point where the bezier curve crosses the border of the node.\n *\n * @param nearNode\n * @param ctx\n * @param viaNode\n * @param nearNode\n * @param ctx\n * @param viaNode\n * @param nearNode\n * @param ctx\n * @param viaNode\n */\n\n\n (0, _createClass3['default'])(BezierEdgeBase, [{\n key: '_findBorderPositionBezier',\n value: function _findBorderPositionBezier(nearNode, ctx) {\n var viaNode = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this._getViaCoordinates();\n var maxIterations = 10;\n var iteration = 0;\n var low = 0;\n var high = 1;\n var pos, angle, distanceToBorder, distanceToPoint, difference;\n var threshold = 0.2;\n var node = this.to;\n var from = false;\n\n if (nearNode.id === this.from.id) {\n node = this.from;\n from = true;\n }\n\n while (low <= high && iteration < maxIterations) {\n var middle = (low + high) * 0.5;\n pos = this.getPoint(middle, viaNode);\n angle = Math.atan2(node.y - pos.y, node.x - pos.x);\n distanceToBorder = node.distanceToBorder(ctx, angle);\n distanceToPoint = Math.sqrt(Math.pow(pos.x - node.x, 2) + Math.pow(pos.y - node.y, 2));\n difference = distanceToBorder - distanceToPoint;\n\n if (Math.abs(difference) < threshold) {\n break; // found\n } else if (difference < 0) {\n // distance to nodes is larger than distance to border --> t needs to be bigger if we're looking at the to node.\n if (from === false) {\n low = middle;\n } else {\n high = middle;\n }\n } else {\n if (from === false) {\n high = middle;\n } else {\n low = middle;\n }\n }\n\n iteration++;\n }\n\n pos.t = middle;\n return pos;\n }\n /**\n * Calculate the distance between a point (x3,y3) and a line segment from\n * (x1,y1) to (x2,y2).\n * http://stackoverflow.com/questions/849211/shortest-distancae-between-a-point-and-a-line-segment\n * @param {number} x1 from x\n * @param {number} y1 from y\n * @param {number} x2 to x\n * @param {number} y2 to y\n * @param {number} x3 point to check x\n * @param {number} y3 point to check y\n * @private\n */\n\n }, {\n key: '_getDistanceToBezierEdge',\n value: function _getDistanceToBezierEdge(x1, y1, x2, y2, x3, y3, via) {\n // x3,y3 is the point\n var minDistance = 1e9;\n var distance = void 0;\n var i = void 0,\n t = void 0,\n x = void 0,\n y = void 0;\n var lastX = x1;\n var lastY = y1;\n\n for (i = 1; i < 10; i++) {\n t = 0.1 * i;\n x = Math.pow(1 - t, 2) * x1 + 2 * t * (1 - t) * via.x + Math.pow(t, 2) * x2;\n y = Math.pow(1 - t, 2) * y1 + 2 * t * (1 - t) * via.y + Math.pow(t, 2) * y2;\n\n if (i > 0) {\n distance = this._getDistanceToLine(lastX, lastY, x, y, x3, y3);\n minDistance = distance < minDistance ? distance : minDistance;\n }\n\n lastX = x;\n lastY = y;\n }\n\n return minDistance;\n }\n }]);\n return BezierEdgeBase;\n }(_EdgeBase3['default']);\n\n exports['default'] = BezierEdgeBase;\n /***/\n },\n /* 200 */\n\n /***/\n function (module, exports, __webpack_require__) {\n 'use strict';\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n\n var _slicedToArray2 = __webpack_require__(165);\n\n var _slicedToArray3 = _interopRequireDefault(_slicedToArray2);\n\n var _classCallCheck2 = __webpack_require__(119);\n\n var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\n var _createClass2 = __webpack_require__(120);\n\n var _createClass3 = _interopRequireDefault(_createClass2);\n\n function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n 'default': obj\n };\n }\n\n var util = __webpack_require__(1);\n\n var EdgeBase = function () {\n function EdgeBase(options, body, labelModule) {\n (0, _classCallCheck3['default'])(this, EdgeBase);\n this.body = body;\n this.labelModule = labelModule;\n this.options = {};\n this.setOptions(options);\n this.colorDirty = true;\n this.color = {};\n this.selectionWidth = 2;\n this.hoverWidth = 1.5;\n this.fromPoint = this.from;\n this.toPoint = this.to;\n }\n\n (0, _createClass3['default'])(EdgeBase, [{\n key: 'connect',\n value: function connect() {\n this.from = this.body.nodes[this.options.from];\n this.to = this.body.nodes[this.options.to];\n }\n }, {\n key: 'cleanup',\n value: function cleanup() {\n return false;\n }\n }, {\n key: 'setOptions',\n value: function setOptions(options) {\n this.options = options;\n this.from = this.body.nodes[this.options.from];\n this.to = this.body.nodes[this.options.to];\n this.id = this.options.id;\n }\n /**\n * Redraw a edge as a line\n * Draw this edge in the given canvas\n * The 2d context of a HTML canvas can be retrieved by canvas.getContext(\"2d\");\n * @param {CanvasRenderingContext2D} ctx\n * @private\n */\n\n }, {\n key: 'drawLine',\n value: function drawLine(ctx, values, selected, hover, viaNode) {\n // set style\n ctx.strokeStyle = this.getColor(ctx, values, selected, hover);\n ctx.lineWidth = values.width;\n\n if (values.dashes !== false) {\n this._drawDashedLine(ctx, values, viaNode);\n } else {\n this._drawLine(ctx, values, viaNode);\n }\n }\n }, {\n key: '_drawLine',\n value: function _drawLine(ctx, values, viaNode, fromPoint, toPoint) {\n if (this.from != this.to) {\n // draw line\n this._line(ctx, values, viaNode, fromPoint, toPoint);\n } else {\n var _getCircleData2 = this._getCircleData(ctx),\n _getCircleData3 = (0, _slicedToArray3['default'])(_getCircleData2, 3),\n x = _getCircleData3[0],\n y = _getCircleData3[1],\n radius = _getCircleData3[2];\n\n this._circle(ctx, values, x, y, radius);\n }\n }\n }, {\n key: '_drawDashedLine',\n value: function _drawDashedLine(ctx, values, viaNode, fromPoint, toPoint) {\n ctx.lineCap = 'round';\n var pattern = [5, 5];\n\n if (Array.isArray(values.dashes) === true) {\n pattern = values.dashes;\n } // only firefox and chrome support this method, else we use the legacy one.\n\n\n if (ctx.setLineDash !== undefined) {\n ctx.save(); // set dash settings for chrome or firefox\n\n ctx.setLineDash(pattern);\n ctx.lineDashOffset = 0; // draw the line\n\n if (this.from != this.to) {\n // draw line\n this._line(ctx, values, viaNode);\n } else {\n var _getCircleData4 = this._getCircleData(ctx),\n _getCircleData5 = (0, _slicedToArray3['default'])(_getCircleData4, 3),\n x = _getCircleData5[0],\n y = _getCircleData5[1],\n radius = _getCircleData5[2];\n\n this._circle(ctx, values, x, y, radius);\n } // restore the dash settings.\n\n\n ctx.setLineDash([0]);\n ctx.lineDashOffset = 0;\n ctx.restore();\n } else {\n // unsupporting smooth lines\n if (this.from != this.to) {\n // draw line\n ctx.dashedLine(this.from.x, this.from.y, this.to.x, this.to.y, pattern);\n } else {\n var _getCircleData6 = this._getCircleData(ctx),\n _getCircleData7 = (0, _slicedToArray3['default'])(_getCircleData6, 3),\n _x = _getCircleData7[0],\n _y = _getCircleData7[1],\n _radius = _getCircleData7[2];\n\n this._circle(ctx, values, _x, _y, _radius);\n } // draw shadow if enabled\n\n\n this.enableShadow(ctx, values);\n ctx.stroke(); // disable shadows for other elements.\n\n this.disableShadow(ctx, values);\n }\n }\n }, {\n key: 'findBorderPosition',\n value: function findBorderPosition(nearNode, ctx, options) {\n if (this.from != this.to) {\n return this._findBorderPosition(nearNode, ctx, options);\n } else {\n return this._findBorderPositionCircle(nearNode, ctx, options);\n }\n }\n }, {\n key: 'findBorderPositions',\n value: function findBorderPositions(ctx) {\n var from = {};\n var to = {};\n\n if (this.from != this.to) {\n from = this._findBorderPosition(this.from, ctx);\n to = this._findBorderPosition(this.to, ctx);\n } else {\n var _getCircleData8 = this._getCircleData(ctx),\n _getCircleData9 = (0, _slicedToArray3['default'])(_getCircleData8, 3),\n x = _getCircleData9[0],\n y = _getCircleData9[1],\n radius = _getCircleData9[2];\n\n from = this._findBorderPositionCircle(this.from, ctx, {\n x: x,\n y: y,\n low: 0.25,\n high: 0.6,\n direction: -1\n });\n to = this._findBorderPositionCircle(this.from, ctx, {\n x: x,\n y: y,\n low: 0.6,\n high: 0.8,\n direction: 1\n });\n }\n\n return {\n from: from,\n to: to\n };\n }\n }, {\n key: '_getCircleData',\n value: function _getCircleData(ctx) {\n var x = void 0,\n y = void 0;\n var node = this.from;\n var radius = this.options.selfReferenceSize;\n\n if (ctx !== undefined) {\n if (node.shape.width === undefined) {\n node.shape.resize(ctx);\n }\n } // get circle coordinates\n\n\n if (node.shape.width > node.shape.height) {\n x = node.x + node.shape.width * 0.5;\n y = node.y - radius;\n } else {\n x = node.x + radius;\n y = node.y - node.shape.height * 0.5;\n }\n\n return [x, y, radius];\n }\n /**\n * Get a point on a circle\n * @param {Number} x\n * @param {Number} y\n * @param {Number} radius\n * @param {Number} percentage. Value between 0 (line start) and 1 (line end)\n * @return {Object} point\n * @private\n */\n\n }, {\n key: '_pointOnCircle',\n value: function _pointOnCircle(x, y, radius, percentage) {\n var angle = percentage * 2 * Math.PI;\n return {\n x: x + radius * Math.cos(angle),\n y: y - radius * Math.sin(angle)\n };\n }\n /**\n * This function uses binary search to look for the point where the circle crosses the border of the node.\n * @param node\n * @param ctx\n * @param options\n * @returns {*}\n * @private\n */\n\n }, {\n key: '_findBorderPositionCircle',\n value: function _findBorderPositionCircle(node, ctx, options) {\n var x = options.x;\n var y = options.y;\n var low = options.low;\n var high = options.high;\n var direction = options.direction;\n var maxIterations = 10;\n var iteration = 0;\n var radius = this.options.selfReferenceSize;\n var pos = void 0,\n angle = void 0,\n distanceToBorder = void 0,\n distanceToPoint = void 0,\n difference = void 0;\n var threshold = 0.05;\n var middle = (low + high) * 0.5;\n\n while (low <= high && iteration < maxIterations) {\n middle = (low + high) * 0.5;\n pos = this._pointOnCircle(x, y, radius, middle);\n angle = Math.atan2(node.y - pos.y, node.x - pos.x);\n distanceToBorder = node.distanceToBorder(ctx, angle);\n distanceToPoint = Math.sqrt(Math.pow(pos.x - node.x, 2) + Math.pow(pos.y - node.y, 2));\n difference = distanceToBorder - distanceToPoint;\n\n if (Math.abs(difference) < threshold) {\n break; // found\n } else if (difference > 0) {\n // distance to nodes is larger than distance to border --> t needs to be bigger if we're looking at the to node.\n if (direction > 0) {\n low = middle;\n } else {\n high = middle;\n }\n } else {\n if (direction > 0) {\n high = middle;\n } else {\n low = middle;\n }\n }\n\n iteration++;\n }\n\n pos.t = middle;\n return pos;\n }\n /**\n * Get the line width of the edge. Depends on width and whether one of the\n * connected nodes is selected.\n * @return {Number} width\n * @private\n */\n\n }, {\n key: 'getLineWidth',\n value: function getLineWidth(selected, hover) {\n if (selected === true) {\n return Math.max(this.selectionWidth, 0.3 / this.body.view.scale);\n } else {\n if (hover === true) {\n return Math.max(this.hoverWidth, 0.3 / this.body.view.scale);\n } else {\n return Math.max(this.options.width, 0.3 / this.body.view.scale);\n }\n }\n }\n }, {\n key: 'getColor',\n value: function getColor(ctx, values, selected, hover) {\n if (values.inheritsColor !== false) {\n // when this is a loop edge, just use the 'from' method\n if (values.inheritsColor === 'both' && this.from.id !== this.to.id) {\n var grd = ctx.createLinearGradient(this.from.x, this.from.y, this.to.x, this.to.y);\n var fromColor = void 0,\n toColor = void 0;\n fromColor = this.from.options.color.highlight.border;\n toColor = this.to.options.color.highlight.border;\n\n if (this.from.selected === false && this.to.selected === false) {\n fromColor = util.overrideOpacity(this.from.options.color.border, values.opacity);\n toColor = util.overrideOpacity(this.to.options.color.border, values.opacity);\n } else if (this.from.selected === true && this.to.selected === false) {\n toColor = this.to.options.color.border;\n } else if (this.from.selected === false && this.to.selected === true) {\n fromColor = this.from.options.color.border;\n }\n\n grd.addColorStop(0, fromColor);\n grd.addColorStop(1, toColor); // -------------------- this returns -------------------- //\n\n return grd;\n }\n\n if (values.inheritsColor === \"to\") {\n return util.overrideOpacity(this.to.options.color.border, values.opacity);\n } else {\n // \"from\"\n return util.overrideOpacity(this.from.options.color.border, values.opacity);\n }\n } else {\n return util.overrideOpacity(values.color, values.opacity);\n }\n }\n /**\n * Draw a line from a node to itself, a circle\n * @param {CanvasRenderingContext2D} ctx\n * @param {Number} x\n * @param {Number} y\n * @param {Number} radius\n * @private\n */\n\n }, {\n key: '_circle',\n value: function _circle(ctx, values, x, y, radius) {\n // draw shadow if enabled\n this.enableShadow(ctx, values); // draw a circle\n\n ctx.beginPath();\n ctx.arc(x, y, radius, 0, 2 * Math.PI, false);\n ctx.stroke(); // disable shadows for other elements.\n\n this.disableShadow(ctx, values);\n }\n /**\n * Calculate the distance between a point (x3,y3) and a line segment from\n * (x1,y1) to (x2,y2).\n * http://stackoverflow.com/questions/849211/shortest-distancae-between-a-point-and-a-line-segment\n * @param {number} x1\n * @param {number} y1\n * @param {number} x2\n * @param {number} y2\n * @param {number} x3\n * @param {number} y3\n * @private\n */\n\n }, {\n key: 'getDistanceToEdge',\n value: function getDistanceToEdge(x1, y1, x2, y2, x3, y3, via, values) {\n // x3,y3 is the point\n var returnValue = 0;\n\n if (this.from != this.to) {\n returnValue = this._getDistanceToEdge(x1, y1, x2, y2, x3, y3, via);\n } else {\n var _getCircleData10 = this._getCircleData(undefined),\n _getCircleData11 = (0, _slicedToArray3['default'])(_getCircleData10, 3),\n x = _getCircleData11[0],\n y = _getCircleData11[1],\n radius = _getCircleData11[2];\n\n var dx = x - x3;\n var dy = y - y3;\n returnValue = Math.abs(Math.sqrt(dx * dx + dy * dy) - radius);\n }\n\n if (this.labelModule.size.left < x3 && this.labelModule.size.left + this.labelModule.size.width > x3 && this.labelModule.size.top < y3 && this.labelModule.size.top + this.labelModule.size.height > y3) {\n return 0;\n } else {\n return returnValue;\n }\n }\n }, {\n key: '_getDistanceToLine',\n value: function _getDistanceToLine(x1, y1, x2, y2, x3, y3) {\n var px = x2 - x1;\n var py = y2 - y1;\n var something = px * px + py * py;\n var u = ((x3 - x1) * px + (y3 - y1) * py) / something;\n\n if (u > 1) {\n u = 1;\n } else if (u < 0) {\n u = 0;\n }\n\n var x = x1 + u * px;\n var y = y1 + u * py;\n var dx = x - x3;\n var dy = y - y3; //# Note: If the actual distance does not matter,\n //# if you only want to compare what this function\n //# returns to other results of this function, you\n //# can just return the squared distance instead\n //# (i.e. remove the sqrt) to gain a little performance\n\n return Math.sqrt(dx * dx + dy * dy);\n }\n /**\n *\n * @param ctx\n * @param position\n * @param viaNode\n */\n\n }, {\n key: 'getArrowData',\n value: function getArrowData(ctx, position, viaNode, selected, hover, values) {\n // set lets\n var angle = void 0;\n var arrowPoint = void 0;\n var node1 = void 0;\n var node2 = void 0;\n var guideOffset = void 0;\n var scaleFactor = void 0;\n var type = void 0;\n var lineWidth = values.width;\n\n if (position === 'from') {\n node1 = this.from;\n node2 = this.to;\n guideOffset = 0.1;\n scaleFactor = values.fromArrowScale;\n type = values.fromArrowType;\n } else if (position === 'to') {\n node1 = this.to;\n node2 = this.from;\n guideOffset = -0.1;\n scaleFactor = values.toArrowScale;\n type = values.toArrowType;\n } else {\n node1 = this.to;\n node2 = this.from;\n scaleFactor = values.middleArrowScale;\n type = values.middleArrowType;\n } // if not connected to itself\n\n\n if (node1 != node2) {\n if (position !== 'middle') {\n // draw arrow head\n if (this.options.smooth.enabled === true) {\n arrowPoint = this.findBorderPosition(node1, ctx, {\n via: viaNode\n });\n var guidePos = this.getPoint(Math.max(0.0, Math.min(1.0, arrowPoint.t + guideOffset)), viaNode);\n angle = Math.atan2(arrowPoint.y - guidePos.y, arrowPoint.x - guidePos.x);\n } else {\n angle = Math.atan2(node1.y - node2.y, node1.x - node2.x);\n arrowPoint = this.findBorderPosition(node1, ctx);\n }\n } else {\n angle = Math.atan2(node1.y - node2.y, node1.x - node2.x);\n arrowPoint = this.getPoint(0.5, viaNode); // this is 0.6 to account for the size of the arrow.\n }\n } else {\n // draw circle\n var _getCircleData12 = this._getCircleData(ctx),\n _getCircleData13 = (0, _slicedToArray3['default'])(_getCircleData12, 3),\n x = _getCircleData13[0],\n y = _getCircleData13[1],\n radius = _getCircleData13[2];\n\n if (position === 'from') {\n arrowPoint = this.findBorderPosition(this.from, ctx, {\n x: x,\n y: y,\n low: 0.25,\n high: 0.6,\n direction: -1\n });\n angle = arrowPoint.t * -2 * Math.PI + 1.5 * Math.PI + 0.1 * Math.PI;\n } else if (position === 'to') {\n arrowPoint = this.findBorderPosition(this.from, ctx, {\n x: x,\n y: y,\n low: 0.6,\n high: 1.0,\n direction: 1\n });\n angle = arrowPoint.t * -2 * Math.PI + 1.5 * Math.PI - 1.1 * Math.PI;\n } else {\n arrowPoint = this._pointOnCircle(x, y, radius, 0.175);\n angle = 3.9269908169872414; // === 0.175 * -2 * Math.PI + 1.5 * Math.PI + 0.1 * Math.PI;\n }\n }\n\n var length = 15 * scaleFactor + 3 * lineWidth; // 3* lineWidth is the width of the edge.\n\n var xi = arrowPoint.x - length * 0.9 * Math.cos(angle);\n var yi = arrowPoint.y - length * 0.9 * Math.sin(angle);\n var arrowCore = {\n x: xi,\n y: yi\n };\n return {\n point: arrowPoint,\n core: arrowCore,\n angle: angle,\n length: length,\n type: type\n };\n }\n /**\n *\n * @param ctx\n * @param selected\n * @param hover\n * @param arrowData\n */\n\n }, {\n key: 'drawArrowHead',\n value: function drawArrowHead(ctx, values, selected, hover, arrowData) {\n // set style\n ctx.strokeStyle = this.getColor(ctx, values, selected, hover);\n ctx.fillStyle = ctx.strokeStyle;\n ctx.lineWidth = values.width;\n\n if (arrowData.type && arrowData.type.toLowerCase() === 'circle') {\n // draw circle at the end of the line\n ctx.circleEndpoint(arrowData.point.x, arrowData.point.y, arrowData.angle, arrowData.length);\n } else {\n // draw arrow at the end of the line\n ctx.arrowEndpoint(arrowData.point.x, arrowData.point.y, arrowData.angle, arrowData.length);\n } // draw shadow if enabled\n\n\n this.enableShadow(ctx, values);\n ctx.fill(); // disable shadows for other elements.\n\n this.disableShadow(ctx, values);\n }\n }, {\n key: 'enableShadow',\n value: function enableShadow(ctx, values) {\n if (values.shadow === true) {\n ctx.shadowColor = values.shadowColor;\n ctx.shadowBlur = values.shadowSize;\n ctx.shadowOffsetX = values.shadowX;\n ctx.shadowOffsetY = values.shadowY;\n }\n }\n }, {\n key: 'disableShadow',\n value: function disableShadow(ctx, values) {\n if (values.shadow === true) {\n ctx.shadowColor = 'rgba(0,0,0,0)';\n ctx.shadowBlur = 0;\n ctx.shadowOffsetX = 0;\n ctx.shadowOffsetY = 0;\n }\n }\n }]);\n return EdgeBase;\n }();\n\n exports['default'] = EdgeBase;\n /***/\n },\n /* 201 */\n\n /***/\n function (module, exports, __webpack_require__) {\n \"use strict\";\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n\n var _slicedToArray2 = __webpack_require__(165);\n\n var _slicedToArray3 = _interopRequireDefault(_slicedToArray2);\n\n var _getPrototypeOf = __webpack_require__(170);\n\n var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);\n\n var _classCallCheck2 = __webpack_require__(119);\n\n var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\n var _createClass2 = __webpack_require__(120);\n\n var _createClass3 = _interopRequireDefault(_createClass2);\n\n var _possibleConstructorReturn2 = __webpack_require__(173);\n\n var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);\n\n var _inherits2 = __webpack_require__(174);\n\n var _inherits3 = _interopRequireDefault(_inherits2);\n\n var _BezierEdgeBase2 = __webpack_require__(199);\n\n var _BezierEdgeBase3 = _interopRequireDefault(_BezierEdgeBase2);\n\n function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n \"default\": obj\n };\n }\n\n var BezierEdgeDynamic = function (_BezierEdgeBase) {\n (0, _inherits3[\"default\"])(BezierEdgeDynamic, _BezierEdgeBase);\n\n function BezierEdgeDynamic(options, body, labelModule) {\n (0, _classCallCheck3[\"default\"])(this, BezierEdgeDynamic); // --> this calls the setOptions below\n\n var _this = (0, _possibleConstructorReturn3[\"default\"])(this, (BezierEdgeDynamic.__proto__ || (0, _getPrototypeOf2[\"default\"])(BezierEdgeDynamic)).call(this, options, body, labelModule)); //this.via = undefined; // Here for completeness but not allowed to defined before super() is invoked.\n\n\n _this._boundFunction = function () {\n _this.positionBezierNode();\n };\n\n _this.body.emitter.on(\"_repositionBezierNodes\", _this._boundFunction);\n\n return _this;\n }\n\n (0, _createClass3[\"default\"])(BezierEdgeDynamic, [{\n key: \"setOptions\",\n value: function setOptions(options) {\n // check if the physics has changed.\n var physicsChange = false;\n\n if (this.options.physics !== options.physics) {\n physicsChange = true;\n } // set the options and the to and from nodes\n\n\n this.options = options;\n this.id = this.options.id;\n this.from = this.body.nodes[this.options.from];\n this.to = this.body.nodes[this.options.to]; // setup the support node and connect\n\n this.setupSupportNode();\n this.connect(); // when we change the physics state of the edge, we reposition the support node.\n\n if (physicsChange === true) {\n this.via.setOptions({\n physics: this.options.physics\n });\n this.positionBezierNode();\n }\n }\n }, {\n key: \"connect\",\n value: function connect() {\n this.from = this.body.nodes[this.options.from];\n this.to = this.body.nodes[this.options.to];\n\n if (this.from === undefined || this.to === undefined || this.options.physics === false) {\n this.via.setOptions({\n physics: false\n });\n } else {\n // fix weird behaviour where a self referencing node has physics enabled\n if (this.from.id === this.to.id) {\n this.via.setOptions({\n physics: false\n });\n } else {\n this.via.setOptions({\n physics: true\n });\n }\n }\n }\n /**\n * remove the support nodes\n * @returns {boolean}\n */\n\n }, {\n key: \"cleanup\",\n value: function cleanup() {\n this.body.emitter.off(\"_repositionBezierNodes\", this._boundFunction);\n\n if (this.via !== undefined) {\n delete this.body.nodes[this.via.id];\n this.via = undefined;\n return true;\n }\n\n return false;\n }\n /**\n * Bezier curves require an anchor point to calculate the smooth flow. These points are nodes. These nodes are invisible but\n * are used for the force calculation.\n *\n * The changed data is not called, if needed, it is returned by the main edge constructor.\n * @private\n */\n\n }, {\n key: \"setupSupportNode\",\n value: function setupSupportNode() {\n if (this.via === undefined) {\n var nodeId = \"edgeId:\" + this.id;\n var node = this.body.functions.createNode({\n id: nodeId,\n shape: 'circle',\n physics: true,\n hidden: true\n });\n this.body.nodes[nodeId] = node;\n this.via = node;\n this.via.parentEdgeId = this.id;\n this.positionBezierNode();\n }\n }\n }, {\n key: \"positionBezierNode\",\n value: function positionBezierNode() {\n if (this.via !== undefined && this.from !== undefined && this.to !== undefined) {\n this.via.x = 0.5 * (this.from.x + this.to.x);\n this.via.y = 0.5 * (this.from.y + this.to.y);\n } else if (this.via !== undefined) {\n this.via.x = 0;\n this.via.y = 0;\n }\n }\n /**\n * Draw a line between two nodes\n * @param {CanvasRenderingContext2D} ctx\n * @private\n */\n\n }, {\n key: \"_line\",\n value: function _line(ctx, values, viaNode) {\n // draw a straight line\n ctx.beginPath();\n ctx.moveTo(this.fromPoint.x, this.fromPoint.y); // fallback to normal straight edges\n\n if (viaNode.x === undefined) {\n ctx.lineTo(this.toPoint.x, this.toPoint.y);\n } else {\n ctx.quadraticCurveTo(viaNode.x, viaNode.y, this.toPoint.x, this.toPoint.y);\n } // draw shadow if enabled\n\n\n this.enableShadow(ctx, values);\n ctx.stroke();\n this.disableShadow(ctx, values);\n }\n }, {\n key: \"getViaNode\",\n value: function getViaNode() {\n return this.via;\n }\n /**\n * Combined function of pointOnLine and pointOnBezier. This gives the coordinates of a point on the line at a certain percentage of the way\n * @param percentage\n * @param viaNode\n * @returns {{x: number, y: number}}\n * @private\n */\n\n }, {\n key: \"getPoint\",\n value: function getPoint(percentage) {\n var viaNode = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.via;\n var t = percentage;\n var x = void 0,\n y = void 0;\n\n if (this.from === this.to) {\n var _getCircleData = this._getCircleData(this.from),\n _getCircleData2 = (0, _slicedToArray3[\"default\"])(_getCircleData, 3),\n cx = _getCircleData2[0],\n cy = _getCircleData2[1],\n cr = _getCircleData2[2];\n\n var a = 2 * Math.PI * (1 - t);\n x = cx + cr * Math.sin(a);\n y = cy + cr - cr * (1 - Math.cos(a));\n } else {\n x = Math.pow(1 - t, 2) * this.fromPoint.x + 2 * t * (1 - t) * viaNode.x + Math.pow(t, 2) * this.toPoint.x;\n y = Math.pow(1 - t, 2) * this.fromPoint.y + 2 * t * (1 - t) * viaNode.y + Math.pow(t, 2) * this.toPoint.y;\n }\n\n return {\n x: x,\n y: y\n };\n }\n }, {\n key: \"_findBorderPosition\",\n value: function _findBorderPosition(nearNode, ctx) {\n return this._findBorderPositionBezier(nearNode, ctx, this.via);\n }\n }, {\n key: \"_getDistanceToEdge\",\n value: function _getDistanceToEdge(x1, y1, x2, y2, x3, y3) {\n // x3,y3 is the point\n return this._getDistanceToBezierEdge(x1, y1, x2, y2, x3, y3, this.via);\n }\n }]);\n return BezierEdgeDynamic;\n }(_BezierEdgeBase3[\"default\"]);\n\n exports[\"default\"] = BezierEdgeDynamic;\n /***/\n },\n /* 202 */\n\n /***/\n function (module, exports, __webpack_require__) {\n 'use strict';\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n\n var _getPrototypeOf = __webpack_require__(170);\n\n var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);\n\n var _classCallCheck2 = __webpack_require__(119);\n\n var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\n var _createClass2 = __webpack_require__(120);\n\n var _createClass3 = _interopRequireDefault(_createClass2);\n\n var _possibleConstructorReturn2 = __webpack_require__(173);\n\n var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);\n\n var _inherits2 = __webpack_require__(174);\n\n var _inherits3 = _interopRequireDefault(_inherits2);\n\n var _BezierEdgeBase2 = __webpack_require__(199);\n\n var _BezierEdgeBase3 = _interopRequireDefault(_BezierEdgeBase2);\n\n function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n 'default': obj\n };\n }\n\n var BezierEdgeStatic = function (_BezierEdgeBase) {\n (0, _inherits3['default'])(BezierEdgeStatic, _BezierEdgeBase);\n\n function BezierEdgeStatic(options, body, labelModule) {\n (0, _classCallCheck3['default'])(this, BezierEdgeStatic);\n return (0, _possibleConstructorReturn3['default'])(this, (BezierEdgeStatic.__proto__ || (0, _getPrototypeOf2['default'])(BezierEdgeStatic)).call(this, options, body, labelModule));\n }\n /**\n * Draw a line between two nodes\n * @param {CanvasRenderingContext2D} ctx\n * @private\n */\n\n\n (0, _createClass3['default'])(BezierEdgeStatic, [{\n key: '_line',\n value: function _line(ctx, values, viaNode) {\n // draw a straight line\n ctx.beginPath();\n ctx.moveTo(this.fromPoint.x, this.fromPoint.y); // fallback to normal straight edges\n\n if (viaNode.x === undefined) {\n ctx.lineTo(this.toPoint.x, this.toPoint.y);\n } else {\n ctx.quadraticCurveTo(viaNode.x, viaNode.y, this.toPoint.x, this.toPoint.y);\n } // draw shadow if enabled\n\n\n this.enableShadow(ctx, values);\n ctx.stroke();\n this.disableShadow(ctx, values);\n }\n }, {\n key: 'getViaNode',\n value: function getViaNode() {\n return this._getViaCoordinates();\n }\n /**\n * We do not use the to and fromPoints here to make the via nodes the same as edges without arrows.\n * @returns {{x: undefined, y: undefined}}\n * @private\n */\n\n }, {\n key: '_getViaCoordinates',\n value: function _getViaCoordinates() {\n var xVia = undefined;\n var yVia = undefined;\n var factor = this.options.smooth.roundness;\n var type = this.options.smooth.type;\n var dx = Math.abs(this.from.x - this.to.x);\n var dy = Math.abs(this.from.y - this.to.y);\n\n if (type === 'discrete' || type === 'diagonalCross') {\n if (Math.abs(this.from.x - this.to.x) <= Math.abs(this.from.y - this.to.y)) {\n if (this.from.y >= this.to.y) {\n if (this.from.x <= this.to.x) {\n xVia = this.from.x + factor * dy;\n yVia = this.from.y - factor * dy;\n } else if (this.from.x > this.to.x) {\n xVia = this.from.x - factor * dy;\n yVia = this.from.y - factor * dy;\n }\n } else if (this.from.y < this.to.y) {\n if (this.from.x <= this.to.x) {\n xVia = this.from.x + factor * dy;\n yVia = this.from.y + factor * dy;\n } else if (this.from.x > this.to.x) {\n xVia = this.from.x - factor * dy;\n yVia = this.from.y + factor * dy;\n }\n }\n\n if (type === \"discrete\") {\n xVia = dx < factor * dy ? this.from.x : xVia;\n }\n } else if (Math.abs(this.from.x - this.to.x) > Math.abs(this.from.y - this.to.y)) {\n if (this.from.y >= this.to.y) {\n if (this.from.x <= this.to.x) {\n xVia = this.from.x + factor * dx;\n yVia = this.from.y - factor * dx;\n } else if (this.from.x > this.to.x) {\n xVia = this.from.x - factor * dx;\n yVia = this.from.y - factor * dx;\n }\n } else if (this.from.y < this.to.y) {\n if (this.from.x <= this.to.x) {\n xVia = this.from.x + factor * dx;\n yVia = this.from.y + factor * dx;\n } else if (this.from.x > this.to.x) {\n xVia = this.from.x - factor * dx;\n yVia = this.from.y + factor * dx;\n }\n }\n\n if (type === \"discrete\") {\n yVia = dy < factor * dx ? this.from.y : yVia;\n }\n }\n } else if (type === \"straightCross\") {\n if (Math.abs(this.from.x - this.to.x) <= Math.abs(this.from.y - this.to.y)) {\n // up - down\n xVia = this.from.x;\n\n if (this.from.y < this.to.y) {\n yVia = this.to.y - (1 - factor) * dy;\n } else {\n yVia = this.to.y + (1 - factor) * dy;\n }\n } else if (Math.abs(this.from.x - this.to.x) > Math.abs(this.from.y - this.to.y)) {\n // left - right\n if (this.from.x < this.to.x) {\n xVia = this.to.x - (1 - factor) * dx;\n } else {\n xVia = this.to.x + (1 - factor) * dx;\n }\n\n yVia = this.from.y;\n }\n } else if (type === 'horizontal') {\n if (this.from.x < this.to.x) {\n xVia = this.to.x - (1 - factor) * dx;\n } else {\n xVia = this.to.x + (1 - factor) * dx;\n }\n\n yVia = this.from.y;\n } else if (type === 'vertical') {\n xVia = this.from.x;\n\n if (this.from.y < this.to.y) {\n yVia = this.to.y - (1 - factor) * dy;\n } else {\n yVia = this.to.y + (1 - factor) * dy;\n }\n } else if (type === 'curvedCW') {\n dx = this.to.x - this.from.x;\n dy = this.from.y - this.to.y;\n var radius = Math.sqrt(dx * dx + dy * dy);\n var pi = Math.PI;\n var originalAngle = Math.atan2(dy, dx);\n var myAngle = (originalAngle + (factor * 0.5 + 0.5) * pi) % (2 * pi);\n xVia = this.from.x + (factor * 0.5 + 0.5) * radius * Math.sin(myAngle);\n yVia = this.from.y + (factor * 0.5 + 0.5) * radius * Math.cos(myAngle);\n } else if (type === 'curvedCCW') {\n dx = this.to.x - this.from.x;\n dy = this.from.y - this.to.y;\n\n var _radius = Math.sqrt(dx * dx + dy * dy);\n\n var _pi = Math.PI;\n\n var _originalAngle = Math.atan2(dy, dx);\n\n var _myAngle = (_originalAngle + (-factor * 0.5 + 0.5) * _pi) % (2 * _pi);\n\n xVia = this.from.x + (factor * 0.5 + 0.5) * _radius * Math.sin(_myAngle);\n yVia = this.from.y + (factor * 0.5 + 0.5) * _radius * Math.cos(_myAngle);\n } else {\n // continuous\n if (Math.abs(this.from.x - this.to.x) <= Math.abs(this.from.y - this.to.y)) {\n if (this.from.y >= this.to.y) {\n if (this.from.x <= this.to.x) {\n xVia = this.from.x + factor * dy;\n yVia = this.from.y - factor * dy;\n xVia = this.to.x < xVia ? this.to.x : xVia;\n } else if (this.from.x > this.to.x) {\n xVia = this.from.x - factor * dy;\n yVia = this.from.y - factor * dy;\n xVia = this.to.x > xVia ? this.to.x : xVia;\n }\n } else if (this.from.y < this.to.y) {\n if (this.from.x <= this.to.x) {\n xVia = this.from.x + factor * dy;\n yVia = this.from.y + factor * dy;\n xVia = this.to.x < xVia ? this.to.x : xVia;\n } else if (this.from.x > this.to.x) {\n xVia = this.from.x - factor * dy;\n yVia = this.from.y + factor * dy;\n xVia = this.to.x > xVia ? this.to.x : xVia;\n }\n }\n } else if (Math.abs(this.from.x - this.to.x) > Math.abs(this.from.y - this.to.y)) {\n if (this.from.y >= this.to.y) {\n if (this.from.x <= this.to.x) {\n xVia = this.from.x + factor * dx;\n yVia = this.from.y - factor * dx;\n yVia = this.to.y > yVia ? this.to.y : yVia;\n } else if (this.from.x > this.to.x) {\n xVia = this.from.x - factor * dx;\n yVia = this.from.y - factor * dx;\n yVia = this.to.y > yVia ? this.to.y : yVia;\n }\n } else if (this.from.y < this.to.y) {\n if (this.from.x <= this.to.x) {\n xVia = this.from.x + factor * dx;\n yVia = this.from.y + factor * dx;\n yVia = this.to.y < yVia ? this.to.y : yVia;\n } else if (this.from.x > this.to.x) {\n xVia = this.from.x - factor * dx;\n yVia = this.from.y + factor * dx;\n yVia = this.to.y < yVia ? this.to.y : yVia;\n }\n }\n }\n }\n\n return {\n x: xVia,\n y: yVia\n };\n }\n }, {\n key: '_findBorderPosition',\n value: function _findBorderPosition(nearNode, ctx) {\n var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n return this._findBorderPositionBezier(nearNode, ctx, options.via);\n }\n }, {\n key: '_getDistanceToEdge',\n value: function _getDistanceToEdge(x1, y1, x2, y2, x3, y3) {\n var viaNode = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : this._getViaCoordinates(); // x3,y3 is the point\n\n return this._getDistanceToBezierEdge(x1, y1, x2, y2, x3, y3, viaNode);\n }\n /**\n * Combined function of pointOnLine and pointOnBezier. This gives the coordinates of a point on the line at a certain percentage of the way\n * @param percentage\n * @param viaNode\n * @returns {{x: number, y: number}}\n * @private\n */\n\n }, {\n key: 'getPoint',\n value: function getPoint(percentage) {\n var viaNode = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this._getViaCoordinates();\n var t = percentage;\n var x = Math.pow(1 - t, 2) * this.fromPoint.x + 2 * t * (1 - t) * viaNode.x + Math.pow(t, 2) * this.toPoint.x;\n var y = Math.pow(1 - t, 2) * this.fromPoint.y + 2 * t * (1 - t) * viaNode.y + Math.pow(t, 2) * this.toPoint.y;\n return {\n x: x,\n y: y\n };\n }\n }]);\n return BezierEdgeStatic;\n }(_BezierEdgeBase3['default']);\n\n exports['default'] = BezierEdgeStatic;\n /***/\n },\n /* 203 */\n\n /***/\n function (module, exports, __webpack_require__) {\n 'use strict';\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n\n var _getPrototypeOf = __webpack_require__(170);\n\n var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);\n\n var _classCallCheck2 = __webpack_require__(119);\n\n var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\n var _createClass2 = __webpack_require__(120);\n\n var _createClass3 = _interopRequireDefault(_createClass2);\n\n var _possibleConstructorReturn2 = __webpack_require__(173);\n\n var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);\n\n var _inherits2 = __webpack_require__(174);\n\n var _inherits3 = _interopRequireDefault(_inherits2);\n\n var _EdgeBase2 = __webpack_require__(200);\n\n var _EdgeBase3 = _interopRequireDefault(_EdgeBase2);\n\n function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n 'default': obj\n };\n }\n\n var StraightEdge = function (_EdgeBase) {\n (0, _inherits3['default'])(StraightEdge, _EdgeBase);\n\n function StraightEdge(options, body, labelModule) {\n (0, _classCallCheck3['default'])(this, StraightEdge);\n return (0, _possibleConstructorReturn3['default'])(this, (StraightEdge.__proto__ || (0, _getPrototypeOf2['default'])(StraightEdge)).call(this, options, body, labelModule));\n }\n /**\n * Draw a line between two nodes\n * @param {CanvasRenderingContext2D} ctx\n * @private\n */\n\n\n (0, _createClass3['default'])(StraightEdge, [{\n key: '_line',\n value: function _line(ctx, values) {\n // draw a straight line\n ctx.beginPath();\n ctx.moveTo(this.fromPoint.x, this.fromPoint.y);\n ctx.lineTo(this.toPoint.x, this.toPoint.y); // draw shadow if enabled\n\n this.enableShadow(ctx, values);\n ctx.stroke();\n this.disableShadow(ctx, values);\n }\n }, {\n key: 'getViaNode',\n value: function getViaNode() {\n return undefined;\n }\n /**\n * Combined function of pointOnLine and pointOnBezier. This gives the coordinates of a point on the line at a certain percentage of the way\n * @param percentage\n * @param via\n * @returns {{x: number, y: number}}\n * @private\n */\n\n }, {\n key: 'getPoint',\n value: function getPoint(percentage) {\n return {\n x: (1 - percentage) * this.fromPoint.x + percentage * this.toPoint.x,\n y: (1 - percentage) * this.fromPoint.y + percentage * this.toPoint.y\n };\n }\n }, {\n key: '_findBorderPosition',\n value: function _findBorderPosition(nearNode, ctx) {\n var node1 = this.to;\n var node2 = this.from;\n\n if (nearNode.id === this.from.id) {\n node1 = this.from;\n node2 = this.to;\n }\n\n var angle = Math.atan2(node1.y - node2.y, node1.x - node2.x);\n var dx = node1.x - node2.x;\n var dy = node1.y - node2.y;\n var edgeSegmentLength = Math.sqrt(dx * dx + dy * dy);\n var toBorderDist = nearNode.distanceToBorder(ctx, angle);\n var toBorderPoint = (edgeSegmentLength - toBorderDist) / edgeSegmentLength;\n var borderPos = {};\n borderPos.x = (1 - toBorderPoint) * node2.x + toBorderPoint * node1.x;\n borderPos.y = (1 - toBorderPoint) * node2.y + toBorderPoint * node1.y;\n return borderPos;\n }\n }, {\n key: '_getDistanceToEdge',\n value: function _getDistanceToEdge(x1, y1, x2, y2, x3, y3) {\n // x3,y3 is the point\n return this._getDistanceToLine(x1, y1, x2, y2, x3, y3);\n }\n }]);\n return StraightEdge;\n }(_EdgeBase3['default']);\n\n exports['default'] = StraightEdge;\n /***/\n },\n /* 204 */\n\n /***/\n function (module, exports, __webpack_require__) {\n 'use strict';\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n\n var _keys = __webpack_require__(58);\n\n var _keys2 = _interopRequireDefault(_keys);\n\n var _classCallCheck2 = __webpack_require__(119);\n\n var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\n var _createClass2 = __webpack_require__(120);\n\n var _createClass3 = _interopRequireDefault(_createClass2);\n\n var _BarnesHutSolver = __webpack_require__(205);\n\n var _BarnesHutSolver2 = _interopRequireDefault(_BarnesHutSolver);\n\n var _RepulsionSolver = __webpack_require__(206);\n\n var _RepulsionSolver2 = _interopRequireDefault(_RepulsionSolver);\n\n var _HierarchicalRepulsionSolver = __webpack_require__(207);\n\n var _HierarchicalRepulsionSolver2 = _interopRequireDefault(_HierarchicalRepulsionSolver);\n\n var _SpringSolver = __webpack_require__(208);\n\n var _SpringSolver2 = _interopRequireDefault(_SpringSolver);\n\n var _HierarchicalSpringSolver = __webpack_require__(209);\n\n var _HierarchicalSpringSolver2 = _interopRequireDefault(_HierarchicalSpringSolver);\n\n var _CentralGravitySolver = __webpack_require__(210);\n\n var _CentralGravitySolver2 = _interopRequireDefault(_CentralGravitySolver);\n\n var _FA2BasedRepulsionSolver = __webpack_require__(211);\n\n var _FA2BasedRepulsionSolver2 = _interopRequireDefault(_FA2BasedRepulsionSolver);\n\n var _FA2BasedCentralGravitySolver = __webpack_require__(212);\n\n var _FA2BasedCentralGravitySolver2 = _interopRequireDefault(_FA2BasedCentralGravitySolver);\n\n function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n 'default': obj\n };\n }\n\n var util = __webpack_require__(1);\n\n var PhysicsEngine = function () {\n function PhysicsEngine(body) {\n (0, _classCallCheck3['default'])(this, PhysicsEngine);\n this.body = body;\n this.physicsBody = {\n physicsNodeIndices: [],\n physicsEdgeIndices: [],\n forces: {},\n velocities: {}\n };\n this.physicsEnabled = true;\n this.simulationInterval = 1000 / 60;\n this.requiresTimeout = true;\n this.previousStates = {};\n this.referenceState = {};\n this.freezeCache = {};\n this.renderTimer = undefined; // parameters for the adaptive timestep\n\n this.adaptiveTimestep = false;\n this.adaptiveTimestepEnabled = false;\n this.adaptiveCounter = 0;\n this.adaptiveInterval = 3;\n this.stabilized = false;\n this.startedStabilization = false;\n this.stabilizationIterations = 0;\n this.ready = false; // will be set to true if the stabilize\n // default options\n\n this.options = {};\n this.defaultOptions = {\n enabled: true,\n barnesHut: {\n theta: 0.5,\n gravitationalConstant: -2000,\n centralGravity: 0.3,\n springLength: 95,\n springConstant: 0.04,\n damping: 0.09,\n avoidOverlap: 0\n },\n forceAtlas2Based: {\n theta: 0.5,\n gravitationalConstant: -50,\n centralGravity: 0.01,\n springConstant: 0.08,\n springLength: 100,\n damping: 0.4,\n avoidOverlap: 0\n },\n repulsion: {\n centralGravity: 0.2,\n springLength: 200,\n springConstant: 0.05,\n nodeDistance: 100,\n damping: 0.09,\n avoidOverlap: 0\n },\n hierarchicalRepulsion: {\n centralGravity: 0.0,\n springLength: 100,\n springConstant: 0.01,\n nodeDistance: 120,\n damping: 0.09\n },\n maxVelocity: 50,\n minVelocity: 0.75,\n // px/s\n solver: 'barnesHut',\n stabilization: {\n enabled: true,\n iterations: 1000,\n // maximum number of iteration to stabilize\n updateInterval: 50,\n onlyDynamicEdges: false,\n fit: true\n },\n timestep: 0.5,\n adaptiveTimestep: true\n };\n util.extend(this.options, this.defaultOptions);\n this.timestep = 0.5;\n this.layoutFailed = false;\n this.bindEventListeners();\n }\n\n (0, _createClass3['default'])(PhysicsEngine, [{\n key: 'bindEventListeners',\n value: function bindEventListeners() {\n var _this = this;\n\n this.body.emitter.on('initPhysics', function () {\n _this.initPhysics();\n });\n this.body.emitter.on('_layoutFailed', function () {\n _this.layoutFailed = true;\n });\n this.body.emitter.on('resetPhysics', function () {\n _this.stopSimulation();\n\n _this.ready = false;\n });\n this.body.emitter.on('disablePhysics', function () {\n _this.physicsEnabled = false;\n\n _this.stopSimulation();\n });\n this.body.emitter.on('restorePhysics', function () {\n _this.setOptions(_this.options);\n\n if (_this.ready === true) {\n _this.startSimulation();\n }\n });\n this.body.emitter.on('startSimulation', function () {\n if (_this.ready === true) {\n _this.startSimulation();\n }\n });\n this.body.emitter.on('stopSimulation', function () {\n _this.stopSimulation();\n });\n this.body.emitter.on('destroy', function () {\n _this.stopSimulation(false);\n\n _this.body.emitter.off();\n }); // this event will trigger a rebuilding of the cache everything. Used when nodes or edges have been added or removed.\n\n this.body.emitter.on(\"_dataChanged\", function () {\n // update shortcut lists\n _this.updatePhysicsData();\n }); // debug: show forces\n // this.body.emitter.on(\"afterDrawing\", (ctx) => {this._drawForces(ctx);});\n }\n /**\n * set the physics options\n * @param options\n */\n\n }, {\n key: 'setOptions',\n value: function setOptions(options) {\n if (options !== undefined) {\n if (options === false) {\n this.options.enabled = false;\n this.physicsEnabled = false;\n this.stopSimulation();\n } else {\n this.physicsEnabled = true;\n util.selectiveNotDeepExtend(['stabilization'], this.options, options);\n util.mergeOptions(this.options, options, 'stabilization');\n\n if (options.enabled === undefined) {\n this.options.enabled = true;\n }\n\n if (this.options.enabled === false) {\n this.physicsEnabled = false;\n this.stopSimulation();\n } // set the timestep\n\n\n this.timestep = this.options.timestep;\n }\n }\n\n this.init();\n }\n /**\n * configure the engine.\n */\n\n }, {\n key: 'init',\n value: function init() {\n var options;\n\n if (this.options.solver === 'forceAtlas2Based') {\n options = this.options.forceAtlas2Based;\n this.nodesSolver = new _FA2BasedRepulsionSolver2['default'](this.body, this.physicsBody, options);\n this.edgesSolver = new _SpringSolver2['default'](this.body, this.physicsBody, options);\n this.gravitySolver = new _FA2BasedCentralGravitySolver2['default'](this.body, this.physicsBody, options);\n } else if (this.options.solver === 'repulsion') {\n options = this.options.repulsion;\n this.nodesSolver = new _RepulsionSolver2['default'](this.body, this.physicsBody, options);\n this.edgesSolver = new _SpringSolver2['default'](this.body, this.physicsBody, options);\n this.gravitySolver = new _CentralGravitySolver2['default'](this.body, this.physicsBody, options);\n } else if (this.options.solver === 'hierarchicalRepulsion') {\n options = this.options.hierarchicalRepulsion;\n this.nodesSolver = new _HierarchicalRepulsionSolver2['default'](this.body, this.physicsBody, options);\n this.edgesSolver = new _HierarchicalSpringSolver2['default'](this.body, this.physicsBody, options);\n this.gravitySolver = new _CentralGravitySolver2['default'](this.body, this.physicsBody, options);\n } else {\n // barnesHut\n options = this.options.barnesHut;\n this.nodesSolver = new _BarnesHutSolver2['default'](this.body, this.physicsBody, options);\n this.edgesSolver = new _SpringSolver2['default'](this.body, this.physicsBody, options);\n this.gravitySolver = new _CentralGravitySolver2['default'](this.body, this.physicsBody, options);\n }\n\n this.modelOptions = options;\n }\n /**\n * initialize the engine\n */\n\n }, {\n key: 'initPhysics',\n value: function initPhysics() {\n if (this.physicsEnabled === true && this.options.enabled === true) {\n if (this.options.stabilization.enabled === true) {\n this.stabilize();\n } else {\n this.stabilized = false;\n this.ready = true;\n this.body.emitter.emit('fit', {}, this.layoutFailed); // if the layout failed, we use the approximation for the zoom\n\n this.startSimulation();\n }\n } else {\n this.ready = true;\n this.body.emitter.emit('fit');\n }\n }\n /**\n * Start the simulation\n */\n\n }, {\n key: 'startSimulation',\n value: function startSimulation() {\n if (this.physicsEnabled === true && this.options.enabled === true) {\n this.stabilized = false; // when visible, adaptivity is disabled.\n\n this.adaptiveTimestep = false; // this sets the width of all nodes initially which could be required for the avoidOverlap\n\n this.body.emitter.emit(\"_resizeNodes\");\n\n if (this.viewFunction === undefined) {\n this.viewFunction = this.simulationStep.bind(this);\n this.body.emitter.on('initRedraw', this.viewFunction);\n this.body.emitter.emit('_startRendering');\n }\n } else {\n this.body.emitter.emit('_redraw');\n }\n }\n /**\n * Stop the simulation, force stabilization.\n */\n\n }, {\n key: 'stopSimulation',\n value: function stopSimulation() {\n var emit = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n this.stabilized = true;\n\n if (emit === true) {\n this._emitStabilized();\n }\n\n if (this.viewFunction !== undefined) {\n this.body.emitter.off('initRedraw', this.viewFunction);\n this.viewFunction = undefined;\n\n if (emit === true) {\n this.body.emitter.emit('_stopRendering');\n }\n }\n }\n /**\n * The viewFunction inserts this step into each render loop. It calls the physics tick and handles the cleanup at stabilized.\n *\n */\n\n }, {\n key: 'simulationStep',\n value: function simulationStep() {\n // check if the physics have settled\n var startTime = Date.now();\n this.physicsTick();\n var physicsTime = Date.now() - startTime; // run double speed if it is a little graph\n\n if ((physicsTime < 0.4 * this.simulationInterval || this.runDoubleSpeed === true) && this.stabilized === false) {\n this.physicsTick(); // this makes sure there is no jitter. The decision is taken once to run it at double speed.\n\n this.runDoubleSpeed = true;\n }\n\n if (this.stabilized === true) {\n this.stopSimulation();\n }\n }\n /**\n * trigger the stabilized event.\n * @private\n */\n\n }, {\n key: '_emitStabilized',\n value: function _emitStabilized() {\n var _this2 = this;\n\n var amountOfIterations = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.stabilizationIterations;\n\n if (this.stabilizationIterations > 1 || this.startedStabilization === true) {\n setTimeout(function () {\n _this2.body.emitter.emit('stabilized', {\n iterations: amountOfIterations\n });\n\n _this2.startedStabilization = false;\n _this2.stabilizationIterations = 0;\n }, 0);\n }\n }\n /**\n * A single simulation step (or 'tick') in the physics simulation\n *\n * @private\n */\n\n }, {\n key: 'physicsTick',\n value: function physicsTick() {\n // this is here to ensure that there is no start event when the network is already stable.\n if (this.startedStabilization === false) {\n this.body.emitter.emit('startStabilizing');\n this.startedStabilization = true;\n }\n\n if (this.stabilized === false) {\n // adaptivity means the timestep adapts to the situation, only applicable for stabilization\n if (this.adaptiveTimestep === true && this.adaptiveTimestepEnabled === true) {\n // this is the factor for increasing the timestep on success.\n var factor = 1.2; // we assume the adaptive interval is\n\n if (this.adaptiveCounter % this.adaptiveInterval === 0) {\n // we leave the timestep stable for \"interval\" iterations.\n // first the big step and revert. Revert saves the reference state.\n this.timestep = 2 * this.timestep;\n this.calculateForces();\n this.moveNodes();\n this.revert(); // now the normal step. Since this is the last step, it is the more stable one and we will take this.\n\n this.timestep = 0.5 * this.timestep; // since it's half the step, we do it twice.\n\n this.calculateForces();\n this.moveNodes();\n this.calculateForces();\n this.moveNodes(); // we compare the two steps. if it is acceptable we double the step.\n\n if (this._evaluateStepQuality() === true) {\n this.timestep = factor * this.timestep;\n } else {\n // if not, we decrease the step to a minimum of the options timestep.\n // if the decreased timestep is smaller than the options step, we do not reset the counter\n // we assume that the options timestep is stable enough.\n if (this.timestep / factor < this.options.timestep) {\n this.timestep = this.options.timestep;\n } else {\n // if the timestep was larger than 2 times the option one we check the adaptivity again to ensure\n // that large instabilities do not form.\n this.adaptiveCounter = -1; // check again next iteration\n\n this.timestep = Math.max(this.options.timestep, this.timestep / factor);\n }\n }\n } else {\n // normal step, keeping timestep constant\n this.calculateForces();\n this.moveNodes();\n } // increment the counter\n\n\n this.adaptiveCounter += 1;\n } else {\n // case for the static timestep, we reset it to the one in options and take a normal step.\n this.timestep = this.options.timestep;\n this.calculateForces();\n this.moveNodes();\n } // determine if the network has stabilzied\n\n\n if (this.stabilized === true) {\n this.revert();\n }\n\n this.stabilizationIterations++;\n }\n }\n /**\n * Nodes and edges can have the physics toggles on or off. A collection of indices is created here so we can skip the check all the time.\n *\n * @private\n */\n\n }, {\n key: 'updatePhysicsData',\n value: function updatePhysicsData() {\n this.physicsBody.forces = {};\n this.physicsBody.physicsNodeIndices = [];\n this.physicsBody.physicsEdgeIndices = [];\n var nodes = this.body.nodes;\n var edges = this.body.edges; // get node indices for physics\n\n for (var nodeId in nodes) {\n if (nodes.hasOwnProperty(nodeId)) {\n if (nodes[nodeId].options.physics === true) {\n this.physicsBody.physicsNodeIndices.push(nodes[nodeId].id);\n }\n }\n } // get edge indices for physics\n\n\n for (var edgeId in edges) {\n if (edges.hasOwnProperty(edgeId)) {\n if (edges[edgeId].options.physics === true) {\n this.physicsBody.physicsEdgeIndices.push(edges[edgeId].id);\n }\n }\n } // get the velocity and the forces vector\n\n\n for (var i = 0; i < this.physicsBody.physicsNodeIndices.length; i++) {\n var _nodeId = this.physicsBody.physicsNodeIndices[i];\n this.physicsBody.forces[_nodeId] = {\n x: 0,\n y: 0\n }; // forces can be reset because they are recalculated. Velocities have to persist.\n\n if (this.physicsBody.velocities[_nodeId] === undefined) {\n this.physicsBody.velocities[_nodeId] = {\n x: 0,\n y: 0\n };\n }\n } // clean deleted nodes from the velocity vector\n\n\n for (var _nodeId2 in this.physicsBody.velocities) {\n if (nodes[_nodeId2] === undefined) {\n delete this.physicsBody.velocities[_nodeId2];\n }\n }\n }\n /**\n * Revert the simulation one step. This is done so after stabilization, every new start of the simulation will also say stabilized.\n */\n\n }, {\n key: 'revert',\n value: function revert() {\n var nodeIds = (0, _keys2['default'])(this.previousStates);\n var nodes = this.body.nodes;\n var velocities = this.physicsBody.velocities;\n this.referenceState = {};\n\n for (var i = 0; i < nodeIds.length; i++) {\n var nodeId = nodeIds[i];\n\n if (nodes[nodeId] !== undefined) {\n if (nodes[nodeId].options.physics === true) {\n this.referenceState[nodeId] = {\n positions: {\n x: nodes[nodeId].x,\n y: nodes[nodeId].y\n }\n };\n velocities[nodeId].x = this.previousStates[nodeId].vx;\n velocities[nodeId].y = this.previousStates[nodeId].vy;\n nodes[nodeId].x = this.previousStates[nodeId].x;\n nodes[nodeId].y = this.previousStates[nodeId].y;\n }\n } else {\n delete this.previousStates[nodeId];\n }\n }\n }\n /**\n * This compares the reference state to the current state\n */\n\n }, {\n key: '_evaluateStepQuality',\n value: function _evaluateStepQuality() {\n var dx = void 0,\n dy = void 0,\n dpos = void 0;\n var nodes = this.body.nodes;\n var reference = this.referenceState;\n var posThreshold = 0.3;\n\n for (var nodeId in this.referenceState) {\n if (this.referenceState.hasOwnProperty(nodeId) && nodes[nodeId] !== undefined) {\n dx = nodes[nodeId].x - reference[nodeId].positions.x;\n dy = nodes[nodeId].y - reference[nodeId].positions.y;\n dpos = Math.sqrt(Math.pow(dx, 2) + Math.pow(dy, 2));\n\n if (dpos > posThreshold) {\n return false;\n }\n }\n }\n\n return true;\n }\n /**\n * move the nodes one timestep and check if they are stabilized\n * @returns {boolean}\n */\n\n }, {\n key: 'moveNodes',\n value: function moveNodes() {\n var nodeIndices = this.physicsBody.physicsNodeIndices;\n var maxVelocity = this.options.maxVelocity ? this.options.maxVelocity : 1e9;\n var maxNodeVelocity = 0;\n var averageNodeVelocity = 0; // the velocity threshold (energy in the system) for the adaptivity toggle\n\n var velocityAdaptiveThreshold = 5;\n\n for (var i = 0; i < nodeIndices.length; i++) {\n var nodeId = nodeIndices[i];\n\n var nodeVelocity = this._performStep(nodeId, maxVelocity); // stabilized is true if stabilized is true and velocity is smaller than vmin --> all nodes must be stabilized\n\n\n maxNodeVelocity = Math.max(maxNodeVelocity, nodeVelocity);\n averageNodeVelocity += nodeVelocity;\n } // evaluating the stabilized and adaptiveTimestepEnabled conditions\n\n\n this.adaptiveTimestepEnabled = averageNodeVelocity / nodeIndices.length < velocityAdaptiveThreshold;\n this.stabilized = maxNodeVelocity < this.options.minVelocity;\n }\n /**\n * Perform the actual step\n *\n * @param nodeId\n * @param maxVelocity\n * @returns {number}\n * @private\n */\n\n }, {\n key: '_performStep',\n value: function _performStep(nodeId, maxVelocity) {\n var node = this.body.nodes[nodeId];\n var timestep = this.timestep;\n var forces = this.physicsBody.forces;\n var velocities = this.physicsBody.velocities; // store the state so we can revert\n\n this.previousStates[nodeId] = {\n x: node.x,\n y: node.y,\n vx: velocities[nodeId].x,\n vy: velocities[nodeId].y\n };\n\n if (node.options.fixed.x === false) {\n var dx = this.modelOptions.damping * velocities[nodeId].x; // damping force\n\n var ax = (forces[nodeId].x - dx) / node.options.mass; // acceleration\n\n velocities[nodeId].x += ax * timestep; // velocity\n\n velocities[nodeId].x = Math.abs(velocities[nodeId].x) > maxVelocity ? velocities[nodeId].x > 0 ? maxVelocity : -maxVelocity : velocities[nodeId].x;\n node.x += velocities[nodeId].x * timestep; // position\n } else {\n forces[nodeId].x = 0;\n velocities[nodeId].x = 0;\n }\n\n if (node.options.fixed.y === false) {\n var dy = this.modelOptions.damping * velocities[nodeId].y; // damping force\n\n var ay = (forces[nodeId].y - dy) / node.options.mass; // acceleration\n\n velocities[nodeId].y += ay * timestep; // velocity\n\n velocities[nodeId].y = Math.abs(velocities[nodeId].y) > maxVelocity ? velocities[nodeId].y > 0 ? maxVelocity : -maxVelocity : velocities[nodeId].y;\n node.y += velocities[nodeId].y * timestep; // position\n } else {\n forces[nodeId].y = 0;\n velocities[nodeId].y = 0;\n }\n\n var totalVelocity = Math.sqrt(Math.pow(velocities[nodeId].x, 2) + Math.pow(velocities[nodeId].y, 2));\n return totalVelocity;\n }\n /**\n * calculate the forces for one physics iteration.\n */\n\n }, {\n key: 'calculateForces',\n value: function calculateForces() {\n this.gravitySolver.solve();\n this.nodesSolver.solve();\n this.edgesSolver.solve();\n }\n /**\n * When initializing and stabilizing, we can freeze nodes with a predefined position. This greatly speeds up stabilization\n * because only the supportnodes for the smoothCurves have to settle.\n *\n * @private\n */\n\n }, {\n key: '_freezeNodes',\n value: function _freezeNodes() {\n var nodes = this.body.nodes;\n\n for (var id in nodes) {\n if (nodes.hasOwnProperty(id)) {\n if (nodes[id].x && nodes[id].y) {\n this.freezeCache[id] = {\n x: nodes[id].options.fixed.x,\n y: nodes[id].options.fixed.y\n };\n nodes[id].options.fixed.x = true;\n nodes[id].options.fixed.y = true;\n }\n }\n }\n }\n /**\n * Unfreezes the nodes that have been frozen by _freezeDefinedNodes.\n *\n * @private\n */\n\n }, {\n key: '_restoreFrozenNodes',\n value: function _restoreFrozenNodes() {\n var nodes = this.body.nodes;\n\n for (var id in nodes) {\n if (nodes.hasOwnProperty(id)) {\n if (this.freezeCache[id] !== undefined) {\n nodes[id].options.fixed.x = this.freezeCache[id].x;\n nodes[id].options.fixed.y = this.freezeCache[id].y;\n }\n }\n }\n\n this.freezeCache = {};\n }\n /**\n * Find a stable position for all nodes\n */\n\n }, {\n key: 'stabilize',\n value: function stabilize() {\n var _this3 = this;\n\n var iterations = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.options.stabilization.iterations;\n\n if (typeof iterations !== 'number') {\n console.log('The stabilize method needs a numeric amount of iterations. Switching to default: ', this.options.stabilization.iterations);\n iterations = this.options.stabilization.iterations;\n }\n\n if (this.physicsBody.physicsNodeIndices.length === 0) {\n this.ready = true;\n return;\n } // enable adaptive timesteps\n\n\n this.adaptiveTimestep = true && this.options.adaptiveTimestep; // this sets the width of all nodes initially which could be required for the avoidOverlap\n\n this.body.emitter.emit(\"_resizeNodes\"); // stop the render loop\n\n this.stopSimulation(); // set stabilze to false\n\n this.stabilized = false; // block redraw requests\n\n this.body.emitter.emit('_blockRedraw');\n this.targetIterations = iterations; // start the stabilization\n\n if (this.options.stabilization.onlyDynamicEdges === true) {\n this._freezeNodes();\n }\n\n this.stabilizationIterations = 0;\n setTimeout(function () {\n return _this3._stabilizationBatch();\n }, 0);\n }\n /**\n * One batch of stabilization\n * @private\n */\n\n }, {\n key: '_stabilizationBatch',\n value: function _stabilizationBatch() {\n // this is here to ensure that there is at least one start event.\n if (this.startedStabilization === false) {\n this.body.emitter.emit('startStabilizing');\n this.startedStabilization = true;\n }\n\n var count = 0;\n\n while (this.stabilized === false && count < this.options.stabilization.updateInterval && this.stabilizationIterations < this.targetIterations) {\n this.physicsTick();\n count++;\n }\n\n if (this.stabilized === false && this.stabilizationIterations < this.targetIterations) {\n this.body.emitter.emit('stabilizationProgress', {\n iterations: this.stabilizationIterations,\n total: this.targetIterations\n });\n setTimeout(this._stabilizationBatch.bind(this), 0);\n } else {\n this._finalizeStabilization();\n }\n }\n /**\n * Wrap up the stabilization, fit and emit the events.\n * @private\n */\n\n }, {\n key: '_finalizeStabilization',\n value: function _finalizeStabilization() {\n this.body.emitter.emit('_allowRedraw');\n\n if (this.options.stabilization.fit === true) {\n this.body.emitter.emit('fit');\n }\n\n if (this.options.stabilization.onlyDynamicEdges === true) {\n this._restoreFrozenNodes();\n }\n\n this.body.emitter.emit('stabilizationIterationsDone');\n this.body.emitter.emit('_requestRedraw');\n\n if (this.stabilized === true) {\n this._emitStabilized();\n } else {\n this.startSimulation();\n }\n\n this.ready = true;\n }\n }, {\n key: '_drawForces',\n value: function _drawForces(ctx) {\n for (var i = 0; i < this.physicsBody.physicsNodeIndices.length; i++) {\n var node = this.body.nodes[this.physicsBody.physicsNodeIndices[i]];\n var force = this.physicsBody.forces[this.physicsBody.physicsNodeIndices[i]];\n var factor = 20;\n var colorFactor = 0.03;\n var forceSize = Math.sqrt(Math.pow(force.x, 2) + Math.pow(force.x, 2));\n var size = Math.min(Math.max(5, forceSize), 15);\n var arrowSize = 3 * size;\n var color = util.HSVToHex((180 - Math.min(1, Math.max(0, colorFactor * forceSize)) * 180) / 360, 1, 1);\n ctx.lineWidth = size;\n ctx.strokeStyle = color;\n ctx.beginPath();\n ctx.moveTo(node.x, node.y);\n ctx.lineTo(node.x + factor * force.x, node.y + factor * force.y);\n ctx.stroke();\n var angle = Math.atan2(force.y, force.x);\n ctx.fillStyle = color;\n ctx.arrowEndpoint(node.x + factor * force.x + Math.cos(angle) * arrowSize, node.y + factor * force.y + Math.sin(angle) * arrowSize, angle, arrowSize);\n ctx.fill();\n }\n }\n }]);\n return PhysicsEngine;\n }();\n\n exports['default'] = PhysicsEngine;\n /***/\n },\n /* 205 */\n\n /***/\n function (module, exports, __webpack_require__) {\n \"use strict\";\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n\n var _classCallCheck2 = __webpack_require__(119);\n\n var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\n var _createClass2 = __webpack_require__(120);\n\n var _createClass3 = _interopRequireDefault(_createClass2);\n\n function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n \"default\": obj\n };\n }\n\n var BarnesHutSolver = function () {\n function BarnesHutSolver(body, physicsBody, options) {\n (0, _classCallCheck3[\"default\"])(this, BarnesHutSolver);\n this.body = body;\n this.physicsBody = physicsBody;\n this.barnesHutTree;\n this.setOptions(options);\n this.randomSeed = 5; // debug: show grid\n //this.body.emitter.on(\"afterDrawing\", (ctx) => {this._debug(ctx,'#ff0000')})\n }\n\n (0, _createClass3[\"default\"])(BarnesHutSolver, [{\n key: \"setOptions\",\n value: function setOptions(options) {\n this.options = options;\n this.thetaInversed = 1 / this.options.theta;\n this.overlapAvoidanceFactor = 1 - Math.max(0, Math.min(1, this.options.avoidOverlap)); // if 1 then min distance = 0.5, if 0.5 then min distance = 0.5 + 0.5*node.shape.radius\n }\n }, {\n key: \"seededRandom\",\n value: function seededRandom() {\n var x = Math.sin(this.randomSeed++) * 10000;\n return x - Math.floor(x);\n }\n /**\n * This function calculates the forces the nodes apply on each other based on a gravitational model.\n * The Barnes Hut method is used to speed up this N-body simulation.\n *\n * @private\n */\n\n }, {\n key: \"solve\",\n value: function solve() {\n if (this.options.gravitationalConstant !== 0 && this.physicsBody.physicsNodeIndices.length > 0) {\n var node = void 0;\n var nodes = this.body.nodes;\n var nodeIndices = this.physicsBody.physicsNodeIndices;\n var nodeCount = nodeIndices.length; // create the tree\n\n var barnesHutTree = this._formBarnesHutTree(nodes, nodeIndices); // for debugging\n\n\n this.barnesHutTree = barnesHutTree; // place the nodes one by one recursively\n\n for (var i = 0; i < nodeCount; i++) {\n node = nodes[nodeIndices[i]];\n\n if (node.options.mass > 0) {\n // starting with root is irrelevant, it never passes the BarnesHutSolver condition\n this._getForceContribution(barnesHutTree.root.children.NW, node);\n\n this._getForceContribution(barnesHutTree.root.children.NE, node);\n\n this._getForceContribution(barnesHutTree.root.children.SW, node);\n\n this._getForceContribution(barnesHutTree.root.children.SE, node);\n }\n }\n }\n }\n /**\n * This function traverses the barnesHutTree. It checks when it can approximate distant nodes with their center of mass.\n * If a region contains a single node, we check if it is not itself, then we apply the force.\n *\n * @param parentBranch\n * @param node\n * @private\n */\n\n }, {\n key: \"_getForceContribution\",\n value: function _getForceContribution(parentBranch, node) {\n // we get no force contribution from an empty region\n if (parentBranch.childrenCount > 0) {\n var dx = void 0,\n dy = void 0,\n distance = void 0; // get the distance from the center of mass to the node.\n\n dx = parentBranch.centerOfMass.x - node.x;\n dy = parentBranch.centerOfMass.y - node.y;\n distance = Math.sqrt(dx * dx + dy * dy); // BarnesHutSolver condition\n // original condition : s/d < theta = passed === d/s > 1/theta = passed\n // calcSize = 1/s --> d * 1/s > 1/theta = passed\n\n if (distance * parentBranch.calcSize > this.thetaInversed) {\n this._calculateForces(distance, dx, dy, node, parentBranch);\n } else {\n // Did not pass the condition, go into children if available\n if (parentBranch.childrenCount === 4) {\n this._getForceContribution(parentBranch.children.NW, node);\n\n this._getForceContribution(parentBranch.children.NE, node);\n\n this._getForceContribution(parentBranch.children.SW, node);\n\n this._getForceContribution(parentBranch.children.SE, node);\n } else {\n // parentBranch must have only one node, if it was empty we wouldnt be here\n if (parentBranch.children.data.id != node.id) {\n // if it is not self\n this._calculateForces(distance, dx, dy, node, parentBranch);\n }\n }\n }\n }\n }\n /**\n * Calculate the forces based on the distance.\n *\n * @param distance\n * @param dx\n * @param dy\n * @param node\n * @param parentBranch\n * @private\n */\n\n }, {\n key: \"_calculateForces\",\n value: function _calculateForces(distance, dx, dy, node, parentBranch) {\n if (distance === 0) {\n distance = 0.1;\n dx = distance;\n }\n\n if (this.overlapAvoidanceFactor < 1 && node.shape.radius) {\n distance = Math.max(0.1 + this.overlapAvoidanceFactor * node.shape.radius, distance - node.shape.radius);\n } // the dividing by the distance cubed instead of squared allows us to get the fx and fy components without sines and cosines\n // it is shorthand for gravityforce with distance squared and fx = dx/distance * gravityForce\n\n\n var gravityForce = this.options.gravitationalConstant * parentBranch.mass * node.options.mass / Math.pow(distance, 3);\n var fx = dx * gravityForce;\n var fy = dy * gravityForce;\n this.physicsBody.forces[node.id].x += fx;\n this.physicsBody.forces[node.id].y += fy;\n }\n /**\n * This function constructs the barnesHut tree recursively. It creates the root, splits it and starts placing the nodes.\n *\n * @param nodes\n * @param nodeIndices\n * @private\n */\n\n }, {\n key: \"_formBarnesHutTree\",\n value: function _formBarnesHutTree(nodes, nodeIndices) {\n var node = void 0;\n var nodeCount = nodeIndices.length;\n var minX = nodes[nodeIndices[0]].x;\n var minY = nodes[nodeIndices[0]].y;\n var maxX = nodes[nodeIndices[0]].x;\n var maxY = nodes[nodeIndices[0]].y; // get the range of the nodes\n\n for (var i = 1; i < nodeCount; i++) {\n var x = nodes[nodeIndices[i]].x;\n var y = nodes[nodeIndices[i]].y;\n\n if (nodes[nodeIndices[i]].options.mass > 0) {\n if (x < minX) {\n minX = x;\n }\n\n if (x > maxX) {\n maxX = x;\n }\n\n if (y < minY) {\n minY = y;\n }\n\n if (y > maxY) {\n maxY = y;\n }\n }\n } // make the range a square\n\n\n var sizeDiff = Math.abs(maxX - minX) - Math.abs(maxY - minY); // difference between X and Y\n\n if (sizeDiff > 0) {\n minY -= 0.5 * sizeDiff;\n maxY += 0.5 * sizeDiff;\n } // xSize > ySize\n else {\n minX += 0.5 * sizeDiff;\n maxX -= 0.5 * sizeDiff;\n } // xSize < ySize\n\n\n var minimumTreeSize = 1e-5;\n var rootSize = Math.max(minimumTreeSize, Math.abs(maxX - minX));\n var halfRootSize = 0.5 * rootSize;\n var centerX = 0.5 * (minX + maxX),\n centerY = 0.5 * (minY + maxY); // construct the barnesHutTree\n\n var barnesHutTree = {\n root: {\n centerOfMass: {\n x: 0,\n y: 0\n },\n mass: 0,\n range: {\n minX: centerX - halfRootSize,\n maxX: centerX + halfRootSize,\n minY: centerY - halfRootSize,\n maxY: centerY + halfRootSize\n },\n size: rootSize,\n calcSize: 1 / rootSize,\n children: {\n data: null\n },\n maxWidth: 0,\n level: 0,\n childrenCount: 4\n }\n };\n\n this._splitBranch(barnesHutTree.root); // place the nodes one by one recursively\n\n\n for (var _i = 0; _i < nodeCount; _i++) {\n node = nodes[nodeIndices[_i]];\n\n if (node.options.mass > 0) {\n this._placeInTree(barnesHutTree.root, node);\n }\n } // make global\n\n\n return barnesHutTree;\n }\n /**\n * this updates the mass of a branch. this is increased by adding a node.\n *\n * @param parentBranch\n * @param node\n * @private\n */\n\n }, {\n key: \"_updateBranchMass\",\n value: function _updateBranchMass(parentBranch, node) {\n var totalMass = parentBranch.mass + node.options.mass;\n var totalMassInv = 1 / totalMass;\n parentBranch.centerOfMass.x = parentBranch.centerOfMass.x * parentBranch.mass + node.x * node.options.mass;\n parentBranch.centerOfMass.x *= totalMassInv;\n parentBranch.centerOfMass.y = parentBranch.centerOfMass.y * parentBranch.mass + node.y * node.options.mass;\n parentBranch.centerOfMass.y *= totalMassInv;\n parentBranch.mass = totalMass;\n var biggestSize = Math.max(Math.max(node.height, node.radius), node.width);\n parentBranch.maxWidth = parentBranch.maxWidth < biggestSize ? biggestSize : parentBranch.maxWidth;\n }\n /**\n * determine in which branch the node will be placed.\n *\n * @param parentBranch\n * @param node\n * @param skipMassUpdate\n * @private\n */\n\n }, {\n key: \"_placeInTree\",\n value: function _placeInTree(parentBranch, node, skipMassUpdate) {\n if (skipMassUpdate != true || skipMassUpdate === undefined) {\n // update the mass of the branch.\n this._updateBranchMass(parentBranch, node);\n }\n\n if (parentBranch.children.NW.range.maxX > node.x) {\n // in NW or SW\n if (parentBranch.children.NW.range.maxY > node.y) {\n // in NW\n this._placeInRegion(parentBranch, node, \"NW\");\n } else {\n // in SW\n this._placeInRegion(parentBranch, node, \"SW\");\n }\n } else {\n // in NE or SE\n if (parentBranch.children.NW.range.maxY > node.y) {\n // in NE\n this._placeInRegion(parentBranch, node, \"NE\");\n } else {\n // in SE\n this._placeInRegion(parentBranch, node, \"SE\");\n }\n }\n }\n /**\n * actually place the node in a region (or branch)\n *\n * @param parentBranch\n * @param node\n * @param region\n * @private\n */\n\n }, {\n key: \"_placeInRegion\",\n value: function _placeInRegion(parentBranch, node, region) {\n switch (parentBranch.children[region].childrenCount) {\n case 0:\n // place node here\n parentBranch.children[region].children.data = node;\n parentBranch.children[region].childrenCount = 1;\n\n this._updateBranchMass(parentBranch.children[region], node);\n\n break;\n\n case 1:\n // convert into children\n // if there are two nodes exactly overlapping (on init, on opening of cluster etc.)\n // we move one node a little bit and we do not put it in the tree.\n if (parentBranch.children[region].children.data.x === node.x && parentBranch.children[region].children.data.y === node.y) {\n node.x += this.seededRandom();\n node.y += this.seededRandom();\n } else {\n this._splitBranch(parentBranch.children[region]);\n\n this._placeInTree(parentBranch.children[region], node);\n }\n\n break;\n\n case 4:\n // place in branch\n this._placeInTree(parentBranch.children[region], node);\n\n break;\n }\n }\n /**\n * this function splits a branch into 4 sub branches. If the branch contained a node, we place it in the subbranch\n * after the split is complete.\n *\n * @param parentBranch\n * @private\n */\n\n }, {\n key: \"_splitBranch\",\n value: function _splitBranch(parentBranch) {\n // if the branch is shaded with a node, replace the node in the new subset.\n var containedNode = null;\n\n if (parentBranch.childrenCount === 1) {\n containedNode = parentBranch.children.data;\n parentBranch.mass = 0;\n parentBranch.centerOfMass.x = 0;\n parentBranch.centerOfMass.y = 0;\n }\n\n parentBranch.childrenCount = 4;\n parentBranch.children.data = null;\n\n this._insertRegion(parentBranch, \"NW\");\n\n this._insertRegion(parentBranch, \"NE\");\n\n this._insertRegion(parentBranch, \"SW\");\n\n this._insertRegion(parentBranch, \"SE\");\n\n if (containedNode != null) {\n this._placeInTree(parentBranch, containedNode);\n }\n }\n /**\n * This function subdivides the region into four new segments.\n * Specifically, this inserts a single new segment.\n * It fills the children section of the parentBranch\n *\n * @param parentBranch\n * @param region\n * @param parentRange\n * @private\n */\n\n }, {\n key: \"_insertRegion\",\n value: function _insertRegion(parentBranch, region) {\n var minX = void 0,\n maxX = void 0,\n minY = void 0,\n maxY = void 0;\n var childSize = 0.5 * parentBranch.size;\n\n switch (region) {\n case \"NW\":\n minX = parentBranch.range.minX;\n maxX = parentBranch.range.minX + childSize;\n minY = parentBranch.range.minY;\n maxY = parentBranch.range.minY + childSize;\n break;\n\n case \"NE\":\n minX = parentBranch.range.minX + childSize;\n maxX = parentBranch.range.maxX;\n minY = parentBranch.range.minY;\n maxY = parentBranch.range.minY + childSize;\n break;\n\n case \"SW\":\n minX = parentBranch.range.minX;\n maxX = parentBranch.range.minX + childSize;\n minY = parentBranch.range.minY + childSize;\n maxY = parentBranch.range.maxY;\n break;\n\n case \"SE\":\n minX = parentBranch.range.minX + childSize;\n maxX = parentBranch.range.maxX;\n minY = parentBranch.range.minY + childSize;\n maxY = parentBranch.range.maxY;\n break;\n }\n\n parentBranch.children[region] = {\n centerOfMass: {\n x: 0,\n y: 0\n },\n mass: 0,\n range: {\n minX: minX,\n maxX: maxX,\n minY: minY,\n maxY: maxY\n },\n size: 0.5 * parentBranch.size,\n calcSize: 2 * parentBranch.calcSize,\n children: {\n data: null\n },\n maxWidth: 0,\n level: parentBranch.level + 1,\n childrenCount: 0\n };\n } //--------------------------- DEBUGGING BELOW ---------------------------//\n\n /**\n * This function is for debugging purposed, it draws the tree.\n *\n * @param ctx\n * @param color\n * @private\n */\n\n }, {\n key: \"_debug\",\n value: function _debug(ctx, color) {\n if (this.barnesHutTree !== undefined) {\n ctx.lineWidth = 1;\n\n this._drawBranch(this.barnesHutTree.root, ctx, color);\n }\n }\n /**\n * This function is for debugging purposes. It draws the branches recursively.\n *\n * @param branch\n * @param ctx\n * @param color\n * @private\n */\n\n }, {\n key: \"_drawBranch\",\n value: function _drawBranch(branch, ctx, color) {\n if (color === undefined) {\n color = \"#FF0000\";\n }\n\n if (branch.childrenCount === 4) {\n this._drawBranch(branch.children.NW, ctx);\n\n this._drawBranch(branch.children.NE, ctx);\n\n this._drawBranch(branch.children.SE, ctx);\n\n this._drawBranch(branch.children.SW, ctx);\n }\n\n ctx.strokeStyle = color;\n ctx.beginPath();\n ctx.moveTo(branch.range.minX, branch.range.minY);\n ctx.lineTo(branch.range.maxX, branch.range.minY);\n ctx.stroke();\n ctx.beginPath();\n ctx.moveTo(branch.range.maxX, branch.range.minY);\n ctx.lineTo(branch.range.maxX, branch.range.maxY);\n ctx.stroke();\n ctx.beginPath();\n ctx.moveTo(branch.range.maxX, branch.range.maxY);\n ctx.lineTo(branch.range.minX, branch.range.maxY);\n ctx.stroke();\n ctx.beginPath();\n ctx.moveTo(branch.range.minX, branch.range.maxY);\n ctx.lineTo(branch.range.minX, branch.range.minY);\n ctx.stroke();\n /*\n if (branch.mass > 0) {\n ctx.circle(branch.centerOfMass.x, branch.centerOfMass.y, 3*branch.mass);\n ctx.stroke();\n }\n */\n }\n }]);\n return BarnesHutSolver;\n }();\n\n exports[\"default\"] = BarnesHutSolver;\n /***/\n },\n /* 206 */\n\n /***/\n function (module, exports, __webpack_require__) {\n \"use strict\";\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n\n var _classCallCheck2 = __webpack_require__(119);\n\n var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\n var _createClass2 = __webpack_require__(120);\n\n var _createClass3 = _interopRequireDefault(_createClass2);\n\n function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n \"default\": obj\n };\n }\n\n var RepulsionSolver = function () {\n function RepulsionSolver(body, physicsBody, options) {\n (0, _classCallCheck3[\"default\"])(this, RepulsionSolver);\n this.body = body;\n this.physicsBody = physicsBody;\n this.setOptions(options);\n }\n\n (0, _createClass3[\"default\"])(RepulsionSolver, [{\n key: \"setOptions\",\n value: function setOptions(options) {\n this.options = options;\n }\n /**\n * Calculate the forces the nodes apply on each other based on a repulsion field.\n * This field is linearly approximated.\n *\n * @private\n */\n\n }, {\n key: \"solve\",\n value: function solve() {\n var dx, dy, distance, fx, fy, repulsingForce, node1, node2;\n var nodes = this.body.nodes;\n var nodeIndices = this.physicsBody.physicsNodeIndices;\n var forces = this.physicsBody.forces; // repulsing forces between nodes\n\n var nodeDistance = this.options.nodeDistance; // approximation constants\n\n var a = -2 / 3 / nodeDistance;\n var b = 4 / 3; // we loop from i over all but the last entree in the array\n // j loops from i+1 to the last. This way we do not double count any of the indices, nor i === j\n\n for (var i = 0; i < nodeIndices.length - 1; i++) {\n node1 = nodes[nodeIndices[i]];\n\n for (var j = i + 1; j < nodeIndices.length; j++) {\n node2 = nodes[nodeIndices[j]];\n dx = node2.x - node1.x;\n dy = node2.y - node1.y;\n distance = Math.sqrt(dx * dx + dy * dy); // same condition as BarnesHutSolver, making sure nodes are never 100% overlapping.\n\n if (distance === 0) {\n distance = 0.1 * Math.random();\n dx = distance;\n }\n\n if (distance < 2 * nodeDistance) {\n if (distance < 0.5 * nodeDistance) {\n repulsingForce = 1.0;\n } else {\n repulsingForce = a * distance + b; // linear approx of 1 / (1 + Math.exp((distance / nodeDistance - 1) * steepness))\n }\n\n repulsingForce = repulsingForce / distance;\n fx = dx * repulsingForce;\n fy = dy * repulsingForce;\n forces[node1.id].x -= fx;\n forces[node1.id].y -= fy;\n forces[node2.id].x += fx;\n forces[node2.id].y += fy;\n }\n }\n }\n }\n }]);\n return RepulsionSolver;\n }();\n\n exports[\"default\"] = RepulsionSolver;\n /***/\n },\n /* 207 */\n\n /***/\n function (module, exports, __webpack_require__) {\n \"use strict\";\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n\n var _classCallCheck2 = __webpack_require__(119);\n\n var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\n var _createClass2 = __webpack_require__(120);\n\n var _createClass3 = _interopRequireDefault(_createClass2);\n\n function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n \"default\": obj\n };\n }\n\n var HierarchicalRepulsionSolver = function () {\n function HierarchicalRepulsionSolver(body, physicsBody, options) {\n (0, _classCallCheck3[\"default\"])(this, HierarchicalRepulsionSolver);\n this.body = body;\n this.physicsBody = physicsBody;\n this.setOptions(options);\n }\n\n (0, _createClass3[\"default\"])(HierarchicalRepulsionSolver, [{\n key: \"setOptions\",\n value: function setOptions(options) {\n this.options = options;\n }\n /**\n * Calculate the forces the nodes apply on each other based on a repulsion field.\n * This field is linearly approximated.\n *\n * @private\n */\n\n }, {\n key: \"solve\",\n value: function solve() {\n var dx, dy, distance, fx, fy, repulsingForce, node1, node2, i, j;\n var nodes = this.body.nodes;\n var nodeIndices = this.physicsBody.physicsNodeIndices;\n var forces = this.physicsBody.forces; // repulsing forces between nodes\n\n var nodeDistance = this.options.nodeDistance; // we loop from i over all but the last entree in the array\n // j loops from i+1 to the last. This way we do not double count any of the indices, nor i === j\n\n for (i = 0; i < nodeIndices.length - 1; i++) {\n node1 = nodes[nodeIndices[i]];\n\n for (j = i + 1; j < nodeIndices.length; j++) {\n node2 = nodes[nodeIndices[j]]; // nodes only affect nodes on their level\n\n if (node1.level === node2.level) {\n dx = node2.x - node1.x;\n dy = node2.y - node1.y;\n distance = Math.sqrt(dx * dx + dy * dy);\n var steepness = 0.05;\n\n if (distance < nodeDistance) {\n repulsingForce = -Math.pow(steepness * distance, 2) + Math.pow(steepness * nodeDistance, 2);\n } else {\n repulsingForce = 0;\n } // normalize force with\n\n\n if (distance === 0) {\n distance = 0.01;\n } else {\n repulsingForce = repulsingForce / distance;\n }\n\n fx = dx * repulsingForce;\n fy = dy * repulsingForce;\n forces[node1.id].x -= fx;\n forces[node1.id].y -= fy;\n forces[node2.id].x += fx;\n forces[node2.id].y += fy;\n }\n }\n }\n }\n }]);\n return HierarchicalRepulsionSolver;\n }();\n\n exports[\"default\"] = HierarchicalRepulsionSolver;\n /***/\n },\n /* 208 */\n\n /***/\n function (module, exports, __webpack_require__) {\n \"use strict\";\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n\n var _classCallCheck2 = __webpack_require__(119);\n\n var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\n var _createClass2 = __webpack_require__(120);\n\n var _createClass3 = _interopRequireDefault(_createClass2);\n\n function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n \"default\": obj\n };\n }\n\n var SpringSolver = function () {\n function SpringSolver(body, physicsBody, options) {\n (0, _classCallCheck3[\"default\"])(this, SpringSolver);\n this.body = body;\n this.physicsBody = physicsBody;\n this.setOptions(options);\n }\n\n (0, _createClass3[\"default\"])(SpringSolver, [{\n key: \"setOptions\",\n value: function setOptions(options) {\n this.options = options;\n }\n /**\n * This function calculates the springforces on the nodes, accounting for the support nodes.\n *\n * @private\n */\n\n }, {\n key: \"solve\",\n value: function solve() {\n var edgeLength = void 0,\n edge = void 0;\n var edgeIndices = this.physicsBody.physicsEdgeIndices;\n var edges = this.body.edges;\n var node1 = void 0,\n node2 = void 0,\n node3 = void 0; // forces caused by the edges, modelled as springs\n\n for (var i = 0; i < edgeIndices.length; i++) {\n edge = edges[edgeIndices[i]];\n\n if (edge.connected === true && edge.toId !== edge.fromId) {\n // only calculate forces if nodes are in the same sector\n if (this.body.nodes[edge.toId] !== undefined && this.body.nodes[edge.fromId] !== undefined) {\n if (edge.edgeType.via !== undefined) {\n edgeLength = edge.options.length === undefined ? this.options.springLength : edge.options.length;\n node1 = edge.to;\n node2 = edge.edgeType.via;\n node3 = edge.from;\n\n this._calculateSpringForce(node1, node2, 0.5 * edgeLength);\n\n this._calculateSpringForce(node2, node3, 0.5 * edgeLength);\n } else {\n // the * 1.5 is here so the edge looks as large as a smooth edge. It does not initially because the smooth edges use\n // the support nodes which exert a repulsive force on the to and from nodes, making the edge appear larger.\n edgeLength = edge.options.length === undefined ? this.options.springLength * 1.5 : edge.options.length;\n\n this._calculateSpringForce(edge.from, edge.to, edgeLength);\n }\n }\n }\n }\n }\n /**\n * This is the code actually performing the calculation for the function above.\n *\n * @param node1\n * @param node2\n * @param edgeLength\n * @private\n */\n\n }, {\n key: \"_calculateSpringForce\",\n value: function _calculateSpringForce(node1, node2, edgeLength) {\n var dx = node1.x - node2.x;\n var dy = node1.y - node2.y;\n var distance = Math.max(Math.sqrt(dx * dx + dy * dy), 0.01); // the 1/distance is so the fx and fy can be calculated without sine or cosine.\n\n var springForce = this.options.springConstant * (edgeLength - distance) / distance;\n var fx = dx * springForce;\n var fy = dy * springForce; // handle the case where one node is not part of the physcis\n\n if (this.physicsBody.forces[node1.id] !== undefined) {\n this.physicsBody.forces[node1.id].x += fx;\n this.physicsBody.forces[node1.id].y += fy;\n }\n\n if (this.physicsBody.forces[node2.id] !== undefined) {\n this.physicsBody.forces[node2.id].x -= fx;\n this.physicsBody.forces[node2.id].y -= fy;\n }\n }\n }]);\n return SpringSolver;\n }();\n\n exports[\"default\"] = SpringSolver;\n /***/\n },\n /* 209 */\n\n /***/\n function (module, exports, __webpack_require__) {\n \"use strict\";\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n\n var _classCallCheck2 = __webpack_require__(119);\n\n var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\n var _createClass2 = __webpack_require__(120);\n\n var _createClass3 = _interopRequireDefault(_createClass2);\n\n function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n \"default\": obj\n };\n }\n\n var HierarchicalSpringSolver = function () {\n function HierarchicalSpringSolver(body, physicsBody, options) {\n (0, _classCallCheck3[\"default\"])(this, HierarchicalSpringSolver);\n this.body = body;\n this.physicsBody = physicsBody;\n this.setOptions(options);\n }\n\n (0, _createClass3[\"default\"])(HierarchicalSpringSolver, [{\n key: \"setOptions\",\n value: function setOptions(options) {\n this.options = options;\n }\n /**\n * This function calculates the springforces on the nodes, accounting for the support nodes.\n *\n * @private\n */\n\n }, {\n key: \"solve\",\n value: function solve() {\n var edgeLength, edge;\n var dx, dy, fx, fy, springForce, distance;\n var edges = this.body.edges;\n var factor = 0.5;\n var edgeIndices = this.physicsBody.physicsEdgeIndices;\n var nodeIndices = this.physicsBody.physicsNodeIndices;\n var forces = this.physicsBody.forces; // initialize the spring force counters\n\n for (var i = 0; i < nodeIndices.length; i++) {\n var nodeId = nodeIndices[i];\n forces[nodeId].springFx = 0;\n forces[nodeId].springFy = 0;\n } // forces caused by the edges, modelled as springs\n\n\n for (var _i = 0; _i < edgeIndices.length; _i++) {\n edge = edges[edgeIndices[_i]];\n\n if (edge.connected === true) {\n edgeLength = edge.options.length === undefined ? this.options.springLength : edge.options.length;\n dx = edge.from.x - edge.to.x;\n dy = edge.from.y - edge.to.y;\n distance = Math.sqrt(dx * dx + dy * dy);\n distance = distance === 0 ? 0.01 : distance; // the 1/distance is so the fx and fy can be calculated without sine or cosine.\n\n springForce = this.options.springConstant * (edgeLength - distance) / distance;\n fx = dx * springForce;\n fy = dy * springForce;\n\n if (edge.to.level != edge.from.level) {\n if (forces[edge.toId] !== undefined) {\n forces[edge.toId].springFx -= fx;\n forces[edge.toId].springFy -= fy;\n }\n\n if (forces[edge.fromId] !== undefined) {\n forces[edge.fromId].springFx += fx;\n forces[edge.fromId].springFy += fy;\n }\n } else {\n if (forces[edge.toId] !== undefined) {\n forces[edge.toId].x -= factor * fx;\n forces[edge.toId].y -= factor * fy;\n }\n\n if (forces[edge.fromId] !== undefined) {\n forces[edge.fromId].x += factor * fx;\n forces[edge.fromId].y += factor * fy;\n }\n }\n }\n } // normalize spring forces\n\n\n var springForce = 1;\n var springFx, springFy;\n\n for (var _i2 = 0; _i2 < nodeIndices.length; _i2++) {\n var _nodeId = nodeIndices[_i2];\n springFx = Math.min(springForce, Math.max(-springForce, forces[_nodeId].springFx));\n springFy = Math.min(springForce, Math.max(-springForce, forces[_nodeId].springFy));\n forces[_nodeId].x += springFx;\n forces[_nodeId].y += springFy;\n } // retain energy balance\n\n\n var totalFx = 0;\n var totalFy = 0;\n\n for (var _i3 = 0; _i3 < nodeIndices.length; _i3++) {\n var _nodeId2 = nodeIndices[_i3];\n totalFx += forces[_nodeId2].x;\n totalFy += forces[_nodeId2].y;\n }\n\n var correctionFx = totalFx / nodeIndices.length;\n var correctionFy = totalFy / nodeIndices.length;\n\n for (var _i4 = 0; _i4 < nodeIndices.length; _i4++) {\n var _nodeId3 = nodeIndices[_i4];\n forces[_nodeId3].x -= correctionFx;\n forces[_nodeId3].y -= correctionFy;\n }\n }\n }]);\n return HierarchicalSpringSolver;\n }();\n\n exports[\"default\"] = HierarchicalSpringSolver;\n /***/\n },\n /* 210 */\n\n /***/\n function (module, exports, __webpack_require__) {\n \"use strict\";\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n\n var _classCallCheck2 = __webpack_require__(119);\n\n var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\n var _createClass2 = __webpack_require__(120);\n\n var _createClass3 = _interopRequireDefault(_createClass2);\n\n function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n \"default\": obj\n };\n }\n\n var CentralGravitySolver = function () {\n function CentralGravitySolver(body, physicsBody, options) {\n (0, _classCallCheck3[\"default\"])(this, CentralGravitySolver);\n this.body = body;\n this.physicsBody = physicsBody;\n this.setOptions(options);\n }\n\n (0, _createClass3[\"default\"])(CentralGravitySolver, [{\n key: \"setOptions\",\n value: function setOptions(options) {\n this.options = options;\n }\n }, {\n key: \"solve\",\n value: function solve() {\n var dx = void 0,\n dy = void 0,\n distance = void 0,\n node = void 0;\n var nodes = this.body.nodes;\n var nodeIndices = this.physicsBody.physicsNodeIndices;\n var forces = this.physicsBody.forces;\n\n for (var i = 0; i < nodeIndices.length; i++) {\n var nodeId = nodeIndices[i];\n node = nodes[nodeId];\n dx = -node.x;\n dy = -node.y;\n distance = Math.sqrt(dx * dx + dy * dy);\n\n this._calculateForces(distance, dx, dy, forces, node);\n }\n }\n /**\n * Calculate the forces based on the distance.\n * @private\n */\n\n }, {\n key: \"_calculateForces\",\n value: function _calculateForces(distance, dx, dy, forces, node) {\n var gravityForce = distance === 0 ? 0 : this.options.centralGravity / distance;\n forces[node.id].x = dx * gravityForce;\n forces[node.id].y = dy * gravityForce;\n }\n }]);\n return CentralGravitySolver;\n }();\n\n exports[\"default\"] = CentralGravitySolver;\n /***/\n },\n /* 211 */\n\n /***/\n function (module, exports, __webpack_require__) {\n \"use strict\";\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n\n var _getPrototypeOf = __webpack_require__(170);\n\n var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);\n\n var _classCallCheck2 = __webpack_require__(119);\n\n var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\n var _createClass2 = __webpack_require__(120);\n\n var _createClass3 = _interopRequireDefault(_createClass2);\n\n var _possibleConstructorReturn2 = __webpack_require__(173);\n\n var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);\n\n var _inherits2 = __webpack_require__(174);\n\n var _inherits3 = _interopRequireDefault(_inherits2);\n\n var _BarnesHutSolver2 = __webpack_require__(205);\n\n var _BarnesHutSolver3 = _interopRequireDefault(_BarnesHutSolver2);\n\n function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n \"default\": obj\n };\n }\n\n var ForceAtlas2BasedRepulsionSolver = function (_BarnesHutSolver) {\n (0, _inherits3[\"default\"])(ForceAtlas2BasedRepulsionSolver, _BarnesHutSolver);\n\n function ForceAtlas2BasedRepulsionSolver(body, physicsBody, options) {\n (0, _classCallCheck3[\"default\"])(this, ForceAtlas2BasedRepulsionSolver);\n return (0, _possibleConstructorReturn3[\"default\"])(this, (ForceAtlas2BasedRepulsionSolver.__proto__ || (0, _getPrototypeOf2[\"default\"])(ForceAtlas2BasedRepulsionSolver)).call(this, body, physicsBody, options));\n }\n /**\n * Calculate the forces based on the distance.\n *\n * @param distance\n * @param dx\n * @param dy\n * @param node\n * @param parentBranch\n * @private\n */\n\n\n (0, _createClass3[\"default\"])(ForceAtlas2BasedRepulsionSolver, [{\n key: \"_calculateForces\",\n value: function _calculateForces(distance, dx, dy, node, parentBranch) {\n if (distance === 0) {\n distance = 0.1 * Math.random();\n dx = distance;\n }\n\n if (this.overlapAvoidanceFactor < 1 && node.shape.radius) {\n distance = Math.max(0.1 + this.overlapAvoidanceFactor * node.shape.radius, distance - node.shape.radius);\n }\n\n var degree = node.edges.length + 1; // the dividing by the distance cubed instead of squared allows us to get the fx and fy components without sines and cosines\n // it is shorthand for gravityforce with distance squared and fx = dx/distance * gravityForce\n\n var gravityForce = this.options.gravitationalConstant * parentBranch.mass * node.options.mass * degree / Math.pow(distance, 2);\n var fx = dx * gravityForce;\n var fy = dy * gravityForce;\n this.physicsBody.forces[node.id].x += fx;\n this.physicsBody.forces[node.id].y += fy;\n }\n }]);\n return ForceAtlas2BasedRepulsionSolver;\n }(_BarnesHutSolver3[\"default\"]);\n\n exports[\"default\"] = ForceAtlas2BasedRepulsionSolver;\n /***/\n },\n /* 212 */\n\n /***/\n function (module, exports, __webpack_require__) {\n \"use strict\";\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n\n var _getPrototypeOf = __webpack_require__(170);\n\n var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);\n\n var _classCallCheck2 = __webpack_require__(119);\n\n var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\n var _createClass2 = __webpack_require__(120);\n\n var _createClass3 = _interopRequireDefault(_createClass2);\n\n var _possibleConstructorReturn2 = __webpack_require__(173);\n\n var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);\n\n var _inherits2 = __webpack_require__(174);\n\n var _inherits3 = _interopRequireDefault(_inherits2);\n\n var _CentralGravitySolver2 = __webpack_require__(210);\n\n var _CentralGravitySolver3 = _interopRequireDefault(_CentralGravitySolver2);\n\n function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n \"default\": obj\n };\n }\n\n var ForceAtlas2BasedCentralGravitySolver = function (_CentralGravitySolver) {\n (0, _inherits3[\"default\"])(ForceAtlas2BasedCentralGravitySolver, _CentralGravitySolver);\n\n function ForceAtlas2BasedCentralGravitySolver(body, physicsBody, options) {\n (0, _classCallCheck3[\"default\"])(this, ForceAtlas2BasedCentralGravitySolver);\n return (0, _possibleConstructorReturn3[\"default\"])(this, (ForceAtlas2BasedCentralGravitySolver.__proto__ || (0, _getPrototypeOf2[\"default\"])(ForceAtlas2BasedCentralGravitySolver)).call(this, body, physicsBody, options));\n }\n /**\n * Calculate the forces based on the distance.\n * @private\n */\n\n\n (0, _createClass3[\"default\"])(ForceAtlas2BasedCentralGravitySolver, [{\n key: \"_calculateForces\",\n value: function _calculateForces(distance, dx, dy, forces, node) {\n if (distance > 0) {\n var degree = node.edges.length + 1;\n var gravityForce = this.options.centralGravity * degree * node.options.mass;\n forces[node.id].x = dx * gravityForce;\n forces[node.id].y = dy * gravityForce;\n }\n }\n }]);\n return ForceAtlas2BasedCentralGravitySolver;\n }(_CentralGravitySolver3[\"default\"]);\n\n exports[\"default\"] = ForceAtlas2BasedCentralGravitySolver;\n /***/\n },\n /* 213 */\n\n /***/\n function (module, exports, __webpack_require__) {\n 'use strict';\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n\n var _keys = __webpack_require__(58);\n\n var _keys2 = _interopRequireDefault(_keys);\n\n var _typeof2 = __webpack_require__(62);\n\n var _typeof3 = _interopRequireDefault(_typeof2);\n\n var _classCallCheck2 = __webpack_require__(119);\n\n var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\n var _createClass2 = __webpack_require__(120);\n\n var _createClass3 = _interopRequireDefault(_createClass2);\n\n var _NetworkUtil = __webpack_require__(214);\n\n var _NetworkUtil2 = _interopRequireDefault(_NetworkUtil);\n\n var _Cluster = __webpack_require__(215);\n\n var _Cluster2 = _interopRequireDefault(_Cluster);\n\n function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n 'default': obj\n };\n }\n\n var util = __webpack_require__(1);\n\n var ClusterEngine = function () {\n function ClusterEngine(body) {\n var _this = this;\n\n (0, _classCallCheck3['default'])(this, ClusterEngine);\n this.body = body;\n this.clusteredNodes = {};\n this.clusteredEdges = {};\n this.options = {};\n this.defaultOptions = {};\n util.extend(this.options, this.defaultOptions);\n this.body.emitter.on('_resetData', function () {\n _this.clusteredNodes = {};\n _this.clusteredEdges = {};\n });\n }\n /**\n *\n * @param hubsize\n * @param options\n */\n\n\n (0, _createClass3['default'])(ClusterEngine, [{\n key: 'clusterByHubsize',\n value: function clusterByHubsize(hubsize, options) {\n if (hubsize === undefined) {\n hubsize = this._getHubSize();\n } else if ((typeof hubsize === 'undefined' ? 'undefined' : (0, _typeof3['default'])(hubsize)) === \"object\") {\n options = this._checkOptions(hubsize);\n hubsize = this._getHubSize();\n }\n\n var nodesToCluster = [];\n\n for (var i = 0; i < this.body.nodeIndices.length; i++) {\n var node = this.body.nodes[this.body.nodeIndices[i]];\n\n if (node.edges.length >= hubsize) {\n nodesToCluster.push(node.id);\n }\n }\n\n for (var _i = 0; _i < nodesToCluster.length; _i++) {\n this.clusterByConnection(nodesToCluster[_i], options, true);\n }\n\n this.body.emitter.emit('_dataChanged');\n }\n /**\n * loop over all nodes, check if they adhere to the condition and cluster if needed.\n * @param options\n * @param refreshData\n */\n\n }, {\n key: 'cluster',\n value: function cluster() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var refreshData = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n\n if (options.joinCondition === undefined) {\n throw new Error(\"Cannot call clusterByNodeData without a joinCondition function in the options.\");\n } // check if the options object is fine, append if needed\n\n\n options = this._checkOptions(options);\n var childNodesObj = {};\n var childEdgesObj = {}; // collect the nodes that will be in the cluster\n\n for (var i = 0; i < this.body.nodeIndices.length; i++) {\n var nodeId = this.body.nodeIndices[i];\n var node = this.body.nodes[nodeId];\n\n var clonedOptions = _NetworkUtil2['default'].cloneOptions(node);\n\n if (options.joinCondition(clonedOptions) === true) {\n childNodesObj[nodeId] = this.body.nodes[nodeId]; // collect the nodes that will be in the cluster\n\n for (var _i2 = 0; _i2 < node.edges.length; _i2++) {\n var edge = node.edges[_i2];\n\n if (this.clusteredEdges[edge.id] === undefined) {\n childEdgesObj[edge.id] = edge;\n }\n }\n }\n }\n\n this._cluster(childNodesObj, childEdgesObj, options, refreshData);\n }\n /**\n * Cluster all nodes in the network that have only X edges\n * @param edgeCount\n * @param options\n * @param refreshData\n */\n\n }, {\n key: 'clusterByEdgeCount',\n value: function clusterByEdgeCount(edgeCount, options) {\n var refreshData = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;\n options = this._checkOptions(options);\n var clusters = [];\n var usedNodes = {};\n var edge = void 0,\n edges = void 0,\n node = void 0,\n nodeId = void 0,\n relevantEdgeCount = void 0; // collect the nodes that will be in the cluster\n\n for (var i = 0; i < this.body.nodeIndices.length; i++) {\n var childNodesObj = {};\n var childEdgesObj = {};\n nodeId = this.body.nodeIndices[i]; // if this node is already used in another cluster this session, we do not have to re-evaluate it.\n\n if (usedNodes[nodeId] === undefined) {\n relevantEdgeCount = 0;\n node = this.body.nodes[nodeId];\n edges = [];\n\n for (var j = 0; j < node.edges.length; j++) {\n edge = node.edges[j];\n\n if (this.clusteredEdges[edge.id] === undefined) {\n if (edge.toId !== edge.fromId) {\n relevantEdgeCount++;\n }\n\n edges.push(edge);\n }\n } // this node qualifies, we collect its neighbours to start the clustering process.\n\n\n if (relevantEdgeCount === edgeCount) {\n var gatheringSuccessful = true;\n\n for (var _j = 0; _j < edges.length; _j++) {\n edge = edges[_j];\n\n var childNodeId = this._getConnectedId(edge, nodeId); // add the nodes to the list by the join condition.\n\n\n if (options.joinCondition === undefined) {\n childEdgesObj[edge.id] = edge;\n childNodesObj[nodeId] = this.body.nodes[nodeId];\n childNodesObj[childNodeId] = this.body.nodes[childNodeId];\n usedNodes[nodeId] = true;\n } else {\n var clonedOptions = _NetworkUtil2['default'].cloneOptions(this.body.nodes[nodeId]);\n\n if (options.joinCondition(clonedOptions) === true) {\n childEdgesObj[edge.id] = edge;\n childNodesObj[nodeId] = this.body.nodes[nodeId];\n usedNodes[nodeId] = true;\n } else {\n // this node does not qualify after all.\n gatheringSuccessful = false;\n break;\n }\n }\n } // add to the cluster queue\n\n\n if ((0, _keys2['default'])(childNodesObj).length > 0 && (0, _keys2['default'])(childEdgesObj).length > 0 && gatheringSuccessful === true) {\n clusters.push({\n nodes: childNodesObj,\n edges: childEdgesObj\n });\n }\n }\n }\n }\n\n for (var _i3 = 0; _i3 < clusters.length; _i3++) {\n this._cluster(clusters[_i3].nodes, clusters[_i3].edges, options, false);\n }\n\n if (refreshData === true) {\n this.body.emitter.emit('_dataChanged');\n }\n }\n /**\n * Cluster all nodes in the network that have only 1 edge\n * @param options\n * @param refreshData\n */\n\n }, {\n key: 'clusterOutliers',\n value: function clusterOutliers(options) {\n var refreshData = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n this.clusterByEdgeCount(1, options, refreshData);\n }\n /**\n * Cluster all nodes in the network that have only 2 edge\n * @param options\n * @param refreshData\n */\n\n }, {\n key: 'clusterBridges',\n value: function clusterBridges(options) {\n var refreshData = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n this.clusterByEdgeCount(2, options, refreshData);\n }\n /**\n * suck all connected nodes of a node into the node.\n * @param nodeId\n * @param options\n * @param refreshData\n */\n\n }, {\n key: 'clusterByConnection',\n value: function clusterByConnection(nodeId, options) {\n var refreshData = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true; // kill conditions\n\n if (nodeId === undefined) {\n throw new Error(\"No nodeId supplied to clusterByConnection!\");\n }\n\n if (this.body.nodes[nodeId] === undefined) {\n throw new Error(\"The nodeId given to clusterByConnection does not exist!\");\n }\n\n var node = this.body.nodes[nodeId];\n options = this._checkOptions(options, node);\n\n if (options.clusterNodeProperties.x === undefined) {\n options.clusterNodeProperties.x = node.x;\n }\n\n if (options.clusterNodeProperties.y === undefined) {\n options.clusterNodeProperties.y = node.y;\n }\n\n if (options.clusterNodeProperties.fixed === undefined) {\n options.clusterNodeProperties.fixed = {};\n options.clusterNodeProperties.fixed.x = node.options.fixed.x;\n options.clusterNodeProperties.fixed.y = node.options.fixed.y;\n }\n\n var childNodesObj = {};\n var childEdgesObj = {};\n var parentNodeId = node.id;\n\n var parentClonedOptions = _NetworkUtil2['default'].cloneOptions(node);\n\n childNodesObj[parentNodeId] = node; // collect the nodes that will be in the cluster\n\n for (var i = 0; i < node.edges.length; i++) {\n var edge = node.edges[i];\n\n if (this.clusteredEdges[edge.id] === undefined) {\n var childNodeId = this._getConnectedId(edge, parentNodeId); // if the child node is not in a cluster\n\n\n if (this.clusteredNodes[childNodeId] === undefined) {\n if (childNodeId !== parentNodeId) {\n if (options.joinCondition === undefined) {\n childEdgesObj[edge.id] = edge;\n childNodesObj[childNodeId] = this.body.nodes[childNodeId];\n } else {\n // clone the options and insert some additional parameters that could be interesting.\n var childClonedOptions = _NetworkUtil2['default'].cloneOptions(this.body.nodes[childNodeId]);\n\n if (options.joinCondition(parentClonedOptions, childClonedOptions) === true) {\n childEdgesObj[edge.id] = edge;\n childNodesObj[childNodeId] = this.body.nodes[childNodeId];\n }\n }\n } else {\n // swallow the edge if it is self-referencing.\n childEdgesObj[edge.id] = edge;\n }\n }\n }\n }\n\n var childNodeIDs = (0, _keys2['default'])(childNodesObj).map(function (childNode) {\n return childNodesObj[childNode].id;\n });\n\n for (childNode in childNodesObj) {\n var childNode = childNodesObj[childNode];\n\n for (var y = 0; y < childNode.edges.length; y++) {\n var childEdge = childNode.edges[y];\n\n if (childNodeIDs.indexOf(this._getConnectedId(childEdge, childNode.id)) > -1) {\n childEdgesObj[childEdge.id] = childEdge;\n }\n }\n }\n\n this._cluster(childNodesObj, childEdgesObj, options, refreshData);\n }\n /**\n * This function creates the edges that will be attached to the cluster\n * It looks for edges that are connected to the nodes from the \"outside' of the cluster.\n *\n * @param childNodesObj\n * @param childEdgesObj\n * @param clusterNodeProperties\n * @param clusterEdgeProperties\n * @private\n */\n\n }, {\n key: '_createClusterEdges',\n value: function _createClusterEdges(childNodesObj, childEdgesObj, clusterNodeProperties, clusterEdgeProperties) {\n var edge = void 0,\n childNodeId = void 0,\n childNode = void 0,\n toId = void 0,\n fromId = void 0,\n otherNodeId = void 0; // loop over all child nodes and their edges to find edges going out of the cluster\n // these edges will be replaced by clusterEdges.\n\n var childKeys = (0, _keys2['default'])(childNodesObj);\n var createEdges = [];\n\n for (var i = 0; i < childKeys.length; i++) {\n childNodeId = childKeys[i];\n childNode = childNodesObj[childNodeId]; // construct new edges from the cluster to others\n\n for (var j = 0; j < childNode.edges.length; j++) {\n edge = childNode.edges[j]; // we only handle edges that are visible to the system, not the disabled ones from the clustering process.\n\n if (this.clusteredEdges[edge.id] === undefined) {\n // self-referencing edges will be added to the \"hidden\" list\n if (edge.toId == edge.fromId) {\n childEdgesObj[edge.id] = edge;\n } else {\n // set up the from and to.\n if (edge.toId == childNodeId) {\n // this is a double equals because ints and strings can be interchanged here.\n toId = clusterNodeProperties.id;\n fromId = edge.fromId;\n otherNodeId = fromId;\n } else {\n toId = edge.toId;\n fromId = clusterNodeProperties.id;\n otherNodeId = toId;\n }\n } // Only edges from the cluster outwards are being replaced.\n\n\n if (childNodesObj[otherNodeId] === undefined) {\n createEdges.push({\n edge: edge,\n fromId: fromId,\n toId: toId\n });\n }\n }\n }\n } // here we actually create the replacement edges. We could not do this in the loop above as the creation process\n // would add an edge to the edges array we are iterating over.\n\n\n for (var _j2 = 0; _j2 < createEdges.length; _j2++) {\n var _edge = createEdges[_j2].edge; // copy the options of the edge we will replace\n\n var clonedOptions = _NetworkUtil2['default'].cloneOptions(_edge, 'edge'); // make sure the properties of clusterEdges are superimposed on it\n\n\n util.deepExtend(clonedOptions, clusterEdgeProperties); // set up the edge\n\n clonedOptions.from = createEdges[_j2].fromId;\n clonedOptions.to = createEdges[_j2].toId;\n clonedOptions.id = 'clusterEdge:' + util.randomUUID(); //clonedOptions.id = '(cf: ' + createEdges[j].fromId + \" to: \" + createEdges[j].toId + \")\" + Math.random();\n // create the edge and give a reference to the one it replaced.\n\n var newEdge = this.body.functions.createEdge(clonedOptions);\n newEdge.clusteringEdgeReplacingId = _edge.id; // also reference the new edge in the old edge\n\n this.body.edges[_edge.id].edgeReplacedById = newEdge.id; // connect the edge.\n\n this.body.edges[newEdge.id] = newEdge;\n newEdge.connect(); // hide the replaced edge\n\n this._backupEdgeOptions(_edge);\n\n _edge.setOptions({\n physics: false,\n hidden: true\n });\n }\n }\n /**\n * This function checks the options that can be supplied to the different cluster functions\n * for certain fields and inserts defaults if needed\n * @param options\n * @returns {*}\n * @private\n */\n\n }, {\n key: '_checkOptions',\n value: function _checkOptions() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n if (options.clusterEdgeProperties === undefined) {\n options.clusterEdgeProperties = {};\n }\n\n if (options.clusterNodeProperties === undefined) {\n options.clusterNodeProperties = {};\n }\n\n return options;\n }\n /**\n *\n * @param {Object} childNodesObj | object with node objects, id as keys, same as childNodes except it also contains a source node\n * @param {Object} childEdgesObj | object with edge objects, id as keys\n * @param {Array} options | object with {clusterNodeProperties, clusterEdgeProperties, processProperties}\n * @param {Boolean} refreshData | when true, do not wrap up\n * @private\n */\n\n }, {\n key: '_cluster',\n value: function _cluster(childNodesObj, childEdgesObj, options) {\n var refreshData = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true; // kill condition: no nodes don't bother\n\n if ((0, _keys2['default'])(childNodesObj).length == 0) {\n return;\n } // allow clusters of 1 if options allow\n\n\n if ((0, _keys2['default'])(childNodesObj).length == 1 && options.clusterNodeProperties.allowSingleNodeCluster != true) {\n return;\n } // check if this cluster call is not trying to cluster anything that is in another cluster.\n\n\n for (var nodeId in childNodesObj) {\n if (childNodesObj.hasOwnProperty(nodeId)) {\n if (this.clusteredNodes[nodeId] !== undefined) {\n return;\n }\n }\n }\n\n var clusterNodeProperties = util.deepExtend({}, options.clusterNodeProperties); // construct the clusterNodeProperties\n\n if (options.processProperties !== undefined) {\n // get the childNode options\n var childNodesOptions = [];\n\n for (var _nodeId in childNodesObj) {\n if (childNodesObj.hasOwnProperty(_nodeId)) {\n var clonedOptions = _NetworkUtil2['default'].cloneOptions(childNodesObj[_nodeId]);\n\n childNodesOptions.push(clonedOptions);\n }\n } // get cluster properties based on childNodes\n\n\n var childEdgesOptions = [];\n\n for (var edgeId in childEdgesObj) {\n if (childEdgesObj.hasOwnProperty(edgeId)) {\n // these cluster edges will be removed on creation of the cluster.\n if (edgeId.substr(0, 12) !== \"clusterEdge:\") {\n var _clonedOptions = _NetworkUtil2['default'].cloneOptions(childEdgesObj[edgeId], 'edge');\n\n childEdgesOptions.push(_clonedOptions);\n }\n }\n }\n\n clusterNodeProperties = options.processProperties(clusterNodeProperties, childNodesOptions, childEdgesOptions);\n\n if (!clusterNodeProperties) {\n throw new Error(\"The processProperties function does not return properties!\");\n }\n } // check if we have an unique id;\n\n\n if (clusterNodeProperties.id === undefined) {\n clusterNodeProperties.id = 'cluster:' + util.randomUUID();\n }\n\n var clusterId = clusterNodeProperties.id;\n\n if (clusterNodeProperties.label === undefined) {\n clusterNodeProperties.label = 'cluster';\n } // give the clusterNode a position if it does not have one.\n\n\n var pos = undefined;\n\n if (clusterNodeProperties.x === undefined) {\n pos = this._getClusterPosition(childNodesObj);\n clusterNodeProperties.x = pos.x;\n }\n\n if (clusterNodeProperties.y === undefined) {\n if (pos === undefined) {\n pos = this._getClusterPosition(childNodesObj);\n }\n\n clusterNodeProperties.y = pos.y;\n } // force the ID to remain the same\n\n\n clusterNodeProperties.id = clusterId; // create the clusterNode\n\n var clusterNode = this.body.functions.createNode(clusterNodeProperties, _Cluster2['default']);\n clusterNode.isCluster = true;\n clusterNode.containedNodes = childNodesObj;\n clusterNode.containedEdges = childEdgesObj; // cache a copy from the cluster edge properties if we have to reconnect others later on\n\n clusterNode.clusterEdgeProperties = options.clusterEdgeProperties; // finally put the cluster node into global\n\n this.body.nodes[clusterNodeProperties.id] = clusterNode; // create the new edges that will connect to the cluster, all self-referencing edges will be added to childEdgesObject here.\n\n this._createClusterEdges(childNodesObj, childEdgesObj, clusterNodeProperties, options.clusterEdgeProperties); // disable the childEdges\n\n\n for (var _edgeId in childEdgesObj) {\n if (childEdgesObj.hasOwnProperty(_edgeId)) {\n if (this.body.edges[_edgeId] !== undefined) {\n var edge = this.body.edges[_edgeId]; // cache the options before changing\n\n this._backupEdgeOptions(edge); // disable physics and hide the edge\n\n\n edge.setOptions({\n physics: false,\n hidden: true\n });\n }\n }\n } // disable the childNodes\n\n\n for (var _nodeId2 in childNodesObj) {\n if (childNodesObj.hasOwnProperty(_nodeId2)) {\n this.clusteredNodes[_nodeId2] = {\n clusterId: clusterNodeProperties.id,\n node: this.body.nodes[_nodeId2]\n };\n\n this.body.nodes[_nodeId2].setOptions({\n hidden: true,\n physics: false\n });\n }\n } // set ID to undefined so no duplicates arise\n\n\n clusterNodeProperties.id = undefined; // wrap up\n\n if (refreshData === true) {\n this.body.emitter.emit('_dataChanged');\n }\n }\n }, {\n key: '_backupEdgeOptions',\n value: function _backupEdgeOptions(edge) {\n if (this.clusteredEdges[edge.id] === undefined) {\n this.clusteredEdges[edge.id] = {\n physics: edge.options.physics,\n hidden: edge.options.hidden\n };\n }\n }\n }, {\n key: '_restoreEdge',\n value: function _restoreEdge(edge) {\n var originalOptions = this.clusteredEdges[edge.id];\n\n if (originalOptions !== undefined) {\n edge.setOptions({\n physics: originalOptions.physics,\n hidden: originalOptions.hidden\n });\n delete this.clusteredEdges[edge.id];\n }\n }\n /**\n * Check if a node is a cluster.\n * @param nodeId\n * @returns {*}\n */\n\n }, {\n key: 'isCluster',\n value: function isCluster(nodeId) {\n if (this.body.nodes[nodeId] !== undefined) {\n return this.body.nodes[nodeId].isCluster === true;\n } else {\n console.log(\"Node does not exist.\");\n return false;\n }\n }\n /**\n * get the position of the cluster node based on what's inside\n * @param {object} childNodesObj | object with node objects, id as keys\n * @returns {{x: number, y: number}}\n * @private\n */\n\n }, {\n key: '_getClusterPosition',\n value: function _getClusterPosition(childNodesObj) {\n var childKeys = (0, _keys2['default'])(childNodesObj);\n var minX = childNodesObj[childKeys[0]].x;\n var maxX = childNodesObj[childKeys[0]].x;\n var minY = childNodesObj[childKeys[0]].y;\n var maxY = childNodesObj[childKeys[0]].y;\n var node = void 0;\n\n for (var i = 1; i < childKeys.length; i++) {\n node = childNodesObj[childKeys[i]];\n minX = node.x < minX ? node.x : minX;\n maxX = node.x > maxX ? node.x : maxX;\n minY = node.y < minY ? node.y : minY;\n maxY = node.y > maxY ? node.y : maxY;\n }\n\n return {\n x: 0.5 * (minX + maxX),\n y: 0.5 * (minY + maxY)\n };\n }\n /**\n * Open a cluster by calling this function.\n * @param {String} clusterNodeId | the ID of the cluster node\n * @param {Boolean} refreshData | wrap up afterwards if not true\n */\n\n }, {\n key: 'openCluster',\n value: function openCluster(clusterNodeId, options) {\n var refreshData = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true; // kill conditions\n\n if (clusterNodeId === undefined) {\n throw new Error(\"No clusterNodeId supplied to openCluster.\");\n }\n\n if (this.body.nodes[clusterNodeId] === undefined) {\n throw new Error(\"The clusterNodeId supplied to openCluster does not exist.\");\n }\n\n if (this.body.nodes[clusterNodeId].containedNodes === undefined) {\n console.log(\"The node:\" + clusterNodeId + \" is not a cluster.\");\n return;\n }\n\n var clusterNode = this.body.nodes[clusterNodeId];\n var containedNodes = clusterNode.containedNodes;\n var containedEdges = clusterNode.containedEdges; // allow the user to position the nodes after release.\n\n if (options !== undefined && options.releaseFunction !== undefined && typeof options.releaseFunction === 'function') {\n var positions = {};\n var clusterPosition = {\n x: clusterNode.x,\n y: clusterNode.y\n };\n\n for (var nodeId in containedNodes) {\n if (containedNodes.hasOwnProperty(nodeId)) {\n var containedNode = this.body.nodes[nodeId];\n positions[nodeId] = {\n x: containedNode.x,\n y: containedNode.y\n };\n }\n }\n\n var newPositions = options.releaseFunction(clusterPosition, positions);\n\n for (var _nodeId3 in containedNodes) {\n if (containedNodes.hasOwnProperty(_nodeId3)) {\n var _containedNode = this.body.nodes[_nodeId3];\n\n if (newPositions[_nodeId3] !== undefined) {\n _containedNode.x = newPositions[_nodeId3].x === undefined ? clusterNode.x : newPositions[_nodeId3].x;\n _containedNode.y = newPositions[_nodeId3].y === undefined ? clusterNode.y : newPositions[_nodeId3].y;\n }\n }\n }\n } else {\n // copy the position from the cluster\n for (var _nodeId4 in containedNodes) {\n if (containedNodes.hasOwnProperty(_nodeId4)) {\n var _containedNode2 = this.body.nodes[_nodeId4];\n _containedNode2 = containedNodes[_nodeId4]; // inherit position\n\n if (_containedNode2.options.fixed.x === false) {\n _containedNode2.x = clusterNode.x;\n }\n\n if (_containedNode2.options.fixed.y === false) {\n _containedNode2.y = clusterNode.y;\n }\n }\n }\n } // release nodes\n\n\n for (var _nodeId5 in containedNodes) {\n if (containedNodes.hasOwnProperty(_nodeId5)) {\n var _containedNode3 = this.body.nodes[_nodeId5]; // inherit speed\n\n _containedNode3.vx = clusterNode.vx;\n _containedNode3.vy = clusterNode.vy; // we use these methods to avoid re-instantiating the shape, which happens with setOptions.\n\n _containedNode3.setOptions({\n hidden: false,\n physics: true\n });\n\n delete this.clusteredNodes[_nodeId5];\n }\n } // copy the clusterNode edges because we cannot iterate over an object that we add or remove from.\n\n\n var edgesToBeDeleted = [];\n\n for (var i = 0; i < clusterNode.edges.length; i++) {\n edgesToBeDeleted.push(clusterNode.edges[i]);\n } // actually handling the deleting.\n\n\n for (var _i4 = 0; _i4 < edgesToBeDeleted.length; _i4++) {\n var edge = edgesToBeDeleted[_i4];\n\n var otherNodeId = this._getConnectedId(edge, clusterNodeId); // if the other node is in another cluster, we transfer ownership of this edge to the other cluster\n\n\n if (this.clusteredNodes[otherNodeId] !== undefined) {\n // transfer ownership:\n var otherCluster = this.body.nodes[this.clusteredNodes[otherNodeId].clusterId];\n var transferEdge = this.body.edges[edge.clusteringEdgeReplacingId];\n\n if (transferEdge !== undefined) {\n otherCluster.containedEdges[transferEdge.id] = transferEdge; // delete local reference\n\n delete containedEdges[transferEdge.id]; // create new cluster edge from the otherCluster:\n // get to and from\n\n var fromId = transferEdge.fromId;\n var toId = transferEdge.toId;\n\n if (transferEdge.toId == otherNodeId) {\n toId = this.clusteredNodes[otherNodeId].clusterId;\n } else {\n fromId = this.clusteredNodes[otherNodeId].clusterId;\n } // clone the options and apply the cluster options to them\n\n\n var clonedOptions = _NetworkUtil2['default'].cloneOptions(transferEdge, 'edge');\n\n util.deepExtend(clonedOptions, otherCluster.clusterEdgeProperties); // apply the edge specific options to it.\n\n var id = 'clusterEdge:' + util.randomUUID();\n util.deepExtend(clonedOptions, {\n from: fromId,\n to: toId,\n hidden: false,\n physics: true,\n id: id\n }); // create it\n\n var newEdge = this.body.functions.createEdge(clonedOptions);\n newEdge.clusteringEdgeReplacingId = transferEdge.id;\n this.body.edges[id] = newEdge;\n this.body.edges[id].connect();\n }\n } else {\n var replacedEdge = this.body.edges[edge.clusteringEdgeReplacingId];\n\n if (replacedEdge !== undefined) {\n this._restoreEdge(replacedEdge);\n }\n }\n\n edge.cleanup(); // this removes the edge from node.edges, which is why edgeIds is formed\n\n edge.disconnect();\n delete this.body.edges[edge.id];\n } // handle the releasing of the edges\n\n\n for (var edgeId in containedEdges) {\n if (containedEdges.hasOwnProperty(edgeId)) {\n this._restoreEdge(containedEdges[edgeId]);\n }\n } // remove clusterNode\n\n\n delete this.body.nodes[clusterNodeId];\n\n if (refreshData === true) {\n this.body.emitter.emit('_dataChanged');\n }\n }\n }, {\n key: 'getNodesInCluster',\n value: function getNodesInCluster(clusterId) {\n var nodesArray = [];\n\n if (this.isCluster(clusterId) === true) {\n var containedNodes = this.body.nodes[clusterId].containedNodes;\n\n for (var nodeId in containedNodes) {\n if (containedNodes.hasOwnProperty(nodeId)) {\n nodesArray.push(this.body.nodes[nodeId].id);\n }\n }\n }\n\n return nodesArray;\n }\n /**\n * Get the stack clusterId's that a certain node resides in. cluster A -> cluster B -> cluster C -> node\n * @param nodeId\n * @returns {Array}\n */\n\n }, {\n key: 'findNode',\n value: function findNode(nodeId) {\n var stack = [];\n var max = 100;\n var counter = 0;\n\n while (this.clusteredNodes[nodeId] !== undefined && counter < max) {\n stack.push(this.body.nodes[nodeId].id);\n nodeId = this.clusteredNodes[nodeId].clusterId;\n counter++;\n }\n\n stack.push(this.body.nodes[nodeId].id);\n stack.reverse();\n return stack;\n }\n /**\n * Using a clustered nodeId, update with the new options\n * @param clusteredNodeId\n * @param {object} newOptions\n */\n\n }, {\n key: 'updateClusteredNode',\n value: function updateClusteredNode(clusteredNodeId, newOptions) {\n if (clusteredNodeId === undefined) {\n throw new Error(\"No clusteredNodeId supplied to updateClusteredNode.\");\n }\n\n if (newOptions === undefined) {\n throw new Error(\"No newOptions supplied to updateClusteredNode.\");\n }\n\n if (this.body.nodes[clusteredNodeId] === undefined) {\n throw new Error(\"The clusteredNodeId supplied to updateClusteredNode does not exist.\");\n }\n\n this.body.nodes[clusteredNodeId].setOptions(newOptions);\n this.body.emitter.emit('_dataChanged');\n }\n /**\n * Using a base edgeId, update all related clustered edges with the new options\n * @param startEdgeId\n * @param {object} newOptions\n */\n\n }, {\n key: 'updateEdge',\n value: function updateEdge(startEdgeId, newOptions) {\n if (startEdgeId === undefined) {\n throw new Error(\"No startEdgeId supplied to updateEdge.\");\n }\n\n if (newOptions === undefined) {\n throw new Error(\"No newOptions supplied to updateEdge.\");\n }\n\n if (this.body.edges[startEdgeId] === undefined) {\n throw new Error(\"The startEdgeId supplied to updateEdge does not exist.\");\n }\n\n var allEdgeIds = this.getClusteredEdges(startEdgeId);\n\n for (var i = 0; i < allEdgeIds.length; i++) {\n var edge = this.body.edges[allEdgeIds[i]];\n edge.setOptions(newOptions);\n }\n\n this.body.emitter.emit('_dataChanged');\n }\n /**\n * Get a stack of clusterEdgeId's (+base edgeid) that a base edge is the same as. cluster edge C -> cluster edge B -> cluster edge A -> base edge(edgeId)\n * @param edgeId\n * @returns {Array}\n */\n\n }, {\n key: 'getClusteredEdges',\n value: function getClusteredEdges(edgeId) {\n var stack = [];\n var max = 100;\n var counter = 0;\n\n while (edgeId !== undefined && this.body.edges[edgeId] !== undefined && counter < max) {\n stack.push(this.body.edges[edgeId].id);\n edgeId = this.body.edges[edgeId].edgeReplacedById;\n counter++;\n }\n\n stack.reverse();\n return stack;\n }\n /**\n * Get the base edge id of clusterEdgeId. cluster edge (clusteredEdgeId) -> cluster edge B -> cluster edge C -> base edge\n * @param clusteredEdgeId\n * @returns baseEdgeId\n */\n\n }, {\n key: 'getBaseEdge',\n value: function getBaseEdge(clusteredEdgeId) {\n var baseEdgeId = clusteredEdgeId;\n var max = 100;\n var counter = 0;\n\n while (clusteredEdgeId !== undefined && this.body.edges[clusteredEdgeId] !== undefined && counter < max) {\n clusteredEdgeId = this.body.edges[clusteredEdgeId].clusteringEdgeReplacingId;\n counter++;\n\n if (clusteredEdgeId !== undefined) {\n baseEdgeId = clusteredEdgeId;\n }\n }\n\n return baseEdgeId;\n }\n /**\n * Get the Id the node is connected to\n * @param edge\n * @param nodeId\n * @returns {*}\n * @private\n */\n\n }, {\n key: '_getConnectedId',\n value: function _getConnectedId(edge, nodeId) {\n if (edge.toId != nodeId) {\n return edge.toId;\n } else if (edge.fromId != nodeId) {\n return edge.fromId;\n } else {\n return edge.fromId;\n }\n }\n /**\n * We determine how many connections denote an important hub.\n * We take the mean + 2*std as the important hub size. (Assuming a normal distribution of data, ~2.2%)\n *\n * @private\n */\n\n }, {\n key: '_getHubSize',\n value: function _getHubSize() {\n var average = 0;\n var averageSquared = 0;\n var hubCounter = 0;\n var largestHub = 0;\n\n for (var i = 0; i < this.body.nodeIndices.length; i++) {\n var node = this.body.nodes[this.body.nodeIndices[i]];\n\n if (node.edges.length > largestHub) {\n largestHub = node.edges.length;\n }\n\n average += node.edges.length;\n averageSquared += Math.pow(node.edges.length, 2);\n hubCounter += 1;\n }\n\n average = average / hubCounter;\n averageSquared = averageSquared / hubCounter;\n var variance = averageSquared - Math.pow(average, 2);\n var standardDeviation = Math.sqrt(variance);\n var hubThreshold = Math.floor(average + 2 * standardDeviation); // always have at least one to cluster\n\n if (hubThreshold > largestHub) {\n hubThreshold = largestHub;\n }\n\n return hubThreshold;\n }\n }]);\n return ClusterEngine;\n }();\n\n exports['default'] = ClusterEngine;\n /***/\n },\n /* 214 */\n\n /***/\n function (module, exports, __webpack_require__) {\n \"use strict\";\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n\n var _classCallCheck2 = __webpack_require__(119);\n\n var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\n var _createClass2 = __webpack_require__(120);\n\n var _createClass3 = _interopRequireDefault(_createClass2);\n\n function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n \"default\": obj\n };\n }\n\n var util = __webpack_require__(1);\n\n var NetworkUtil = function () {\n function NetworkUtil() {\n (0, _classCallCheck3[\"default\"])(this, NetworkUtil);\n }\n /**\n * Find the center position of the network considering the bounding boxes\n */\n\n\n (0, _createClass3[\"default\"])(NetworkUtil, null, [{\n key: \"getRange\",\n value: function getRange(allNodes) {\n var specificNodes = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n var minY = 1e9,\n maxY = -1e9,\n minX = 1e9,\n maxX = -1e9,\n node;\n\n if (specificNodes.length > 0) {\n for (var i = 0; i < specificNodes.length; i++) {\n node = allNodes[specificNodes[i]];\n\n if (minX > node.shape.boundingBox.left) {\n minX = node.shape.boundingBox.left;\n }\n\n if (maxX < node.shape.boundingBox.right) {\n maxX = node.shape.boundingBox.right;\n }\n\n if (minY > node.shape.boundingBox.top) {\n minY = node.shape.boundingBox.top;\n } // top is negative, bottom is positive\n\n\n if (maxY < node.shape.boundingBox.bottom) {\n maxY = node.shape.boundingBox.bottom;\n } // top is negative, bottom is positive\n\n }\n }\n\n if (minX === 1e9 && maxX === -1e9 && minY === 1e9 && maxY === -1e9) {\n minY = 0, maxY = 0, minX = 0, maxX = 0;\n }\n\n return {\n minX: minX,\n maxX: maxX,\n minY: minY,\n maxY: maxY\n };\n }\n /**\n * Find the center position of the network\n */\n\n }, {\n key: \"getRangeCore\",\n value: function getRangeCore(allNodes) {\n var specificNodes = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n var minY = 1e9,\n maxY = -1e9,\n minX = 1e9,\n maxX = -1e9,\n node;\n\n if (specificNodes.length > 0) {\n for (var i = 0; i < specificNodes.length; i++) {\n node = allNodes[specificNodes[i]];\n\n if (minX > node.x) {\n minX = node.x;\n }\n\n if (maxX < node.x) {\n maxX = node.x;\n }\n\n if (minY > node.y) {\n minY = node.y;\n } // top is negative, bottom is positive\n\n\n if (maxY < node.y) {\n maxY = node.y;\n } // top is negative, bottom is positive\n\n }\n }\n\n if (minX === 1e9 && maxX === -1e9 && minY === 1e9 && maxY === -1e9) {\n minY = 0, maxY = 0, minX = 0, maxX = 0;\n }\n\n return {\n minX: minX,\n maxX: maxX,\n minY: minY,\n maxY: maxY\n };\n }\n /**\n * @param {object} range = {minX: minX, maxX: maxX, minY: minY, maxY: maxY};\n * @returns {{x: number, y: number}}\n */\n\n }, {\n key: \"findCenter\",\n value: function findCenter(range) {\n return {\n x: 0.5 * (range.maxX + range.minX),\n y: 0.5 * (range.maxY + range.minY)\n };\n }\n /**\n * This returns a clone of the options or options of the edge or node to be used for construction of new edges or check functions for new nodes.\n * @param item\n * @param type\n * @returns {{}}\n */\n\n }, {\n key: \"cloneOptions\",\n value: function cloneOptions(item, type) {\n var clonedOptions = {};\n\n if (type === undefined || type === 'node') {\n util.deepExtend(clonedOptions, item.options, true);\n clonedOptions.x = item.x;\n clonedOptions.y = item.y;\n clonedOptions.amountOfConnections = item.edges.length;\n } else {\n util.deepExtend(clonedOptions, item.options, true);\n }\n\n return clonedOptions;\n }\n }]);\n return NetworkUtil;\n }();\n\n exports[\"default\"] = NetworkUtil;\n /***/\n },\n /* 215 */\n\n /***/\n function (module, exports, __webpack_require__) {\n 'use strict';\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n\n var _getPrototypeOf = __webpack_require__(170);\n\n var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);\n\n var _classCallCheck2 = __webpack_require__(119);\n\n var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\n var _possibleConstructorReturn2 = __webpack_require__(173);\n\n var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);\n\n var _inherits2 = __webpack_require__(174);\n\n var _inherits3 = _interopRequireDefault(_inherits2);\n\n var _Node2 = __webpack_require__(163);\n\n var _Node3 = _interopRequireDefault(_Node2);\n\n function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n 'default': obj\n };\n }\n /**\n *\n */\n\n\n var Cluster = function (_Node) {\n (0, _inherits3['default'])(Cluster, _Node);\n\n function Cluster(options, body, imagelist, grouplist, globalOptions) {\n (0, _classCallCheck3['default'])(this, Cluster);\n\n var _this = (0, _possibleConstructorReturn3['default'])(this, (Cluster.__proto__ || (0, _getPrototypeOf2['default'])(Cluster)).call(this, options, body, imagelist, grouplist, globalOptions));\n\n _this.isCluster = true;\n _this.containedNodes = {};\n _this.containedEdges = {};\n return _this;\n }\n\n return Cluster;\n }(_Node3['default']);\n\n exports['default'] = Cluster;\n /***/\n },\n /* 216 */\n\n /***/\n function (module, exports, __webpack_require__) {\n 'use strict';\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n\n var _classCallCheck2 = __webpack_require__(119);\n\n var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\n var _createClass2 = __webpack_require__(120);\n\n var _createClass3 = _interopRequireDefault(_createClass2);\n\n function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n 'default': obj\n };\n }\n\n if (typeof window !== 'undefined') {\n window.requestAnimationFrame = window.requestAnimationFrame || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame || window.msRequestAnimationFrame;\n }\n\n var util = __webpack_require__(1);\n\n var CanvasRenderer = function () {\n function CanvasRenderer(body, canvas) {\n (0, _classCallCheck3['default'])(this, CanvasRenderer);\n this.body = body;\n this.canvas = canvas;\n this.redrawRequested = false;\n this.renderTimer = undefined;\n this.requiresTimeout = true;\n this.renderingActive = false;\n this.renderRequests = 0;\n this.pixelRatio = undefined;\n this.allowRedraw = true;\n this.dragging = false;\n this.options = {};\n this.defaultOptions = {\n hideEdgesOnDrag: false,\n hideNodesOnDrag: false\n };\n util.extend(this.options, this.defaultOptions);\n\n this._determineBrowserMethod();\n\n this.bindEventListeners();\n }\n\n (0, _createClass3['default'])(CanvasRenderer, [{\n key: 'bindEventListeners',\n value: function bindEventListeners() {\n var _this = this;\n\n this.body.emitter.on(\"dragStart\", function () {\n _this.dragging = true;\n });\n this.body.emitter.on(\"dragEnd\", function () {\n _this.dragging = false;\n });\n this.body.emitter.on(\"_resizeNodes\", function () {\n _this._resizeNodes();\n });\n this.body.emitter.on(\"_redraw\", function () {\n if (_this.renderingActive === false) {\n _this._redraw();\n }\n });\n this.body.emitter.on(\"_blockRedraw\", function () {\n _this.allowRedraw = false;\n });\n this.body.emitter.on(\"_allowRedraw\", function () {\n _this.allowRedraw = true;\n _this.redrawRequested = false;\n });\n this.body.emitter.on(\"_requestRedraw\", this._requestRedraw.bind(this));\n this.body.emitter.on(\"_startRendering\", function () {\n _this.renderRequests += 1;\n _this.renderingActive = true;\n\n _this._startRendering();\n });\n this.body.emitter.on(\"_stopRendering\", function () {\n _this.renderRequests -= 1;\n _this.renderingActive = _this.renderRequests > 0;\n _this.renderTimer = undefined;\n });\n this.body.emitter.on('destroy', function () {\n _this.renderRequests = 0;\n _this.allowRedraw = false;\n _this.renderingActive = false;\n\n if (_this.requiresTimeout === true) {\n clearTimeout(_this.renderTimer);\n } else {\n cancelAnimationFrame(_this.renderTimer);\n }\n\n _this.body.emitter.off();\n });\n }\n }, {\n key: 'setOptions',\n value: function setOptions(options) {\n if (options !== undefined) {\n var fields = ['hideEdgesOnDrag', 'hideNodesOnDrag'];\n util.selectiveDeepExtend(fields, this.options, options);\n }\n }\n }, {\n key: '_startRendering',\n value: function _startRendering() {\n if (this.renderingActive === true) {\n if (this.renderTimer === undefined) {\n if (this.requiresTimeout === true) {\n this.renderTimer = window.setTimeout(this._renderStep.bind(this), this.simulationInterval); // wait this.renderTimeStep milliseconds and perform the animation step function\n } else {\n this.renderTimer = window.requestAnimationFrame(this._renderStep.bind(this)); // wait this.renderTimeStep milliseconds and perform the animation step function\n }\n }\n }\n }\n }, {\n key: '_renderStep',\n value: function _renderStep() {\n if (this.renderingActive === true) {\n // reset the renderTimer so a new scheduled animation step can be set\n this.renderTimer = undefined;\n\n if (this.requiresTimeout === true) {\n // this schedules a new simulation step\n this._startRendering();\n }\n\n this._redraw();\n\n if (this.requiresTimeout === false) {\n // this schedules a new simulation step\n this._startRendering();\n }\n }\n }\n /**\n * Redraw the network with the current data\n * chart will be resized too.\n */\n\n }, {\n key: 'redraw',\n value: function redraw() {\n this.body.emitter.emit('setSize');\n\n this._redraw();\n }\n /**\n * Redraw the network with the current data\n * @param hidden | used to get the first estimate of the node sizes. only the nodes are drawn after which they are quickly drawn over.\n * @private\n */\n\n }, {\n key: '_requestRedraw',\n value: function _requestRedraw() {\n var _this2 = this;\n\n if (this.redrawRequested !== true && this.renderingActive === false && this.allowRedraw === true) {\n this.redrawRequested = true;\n\n if (this.requiresTimeout === true) {\n window.setTimeout(function () {\n _this2._redraw(false);\n }, 0);\n } else {\n window.requestAnimationFrame(function () {\n _this2._redraw(false);\n });\n }\n }\n }\n }, {\n key: '_redraw',\n value: function _redraw() {\n var hidden = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n\n if (this.allowRedraw === true) {\n this.body.emitter.emit(\"initRedraw\");\n this.redrawRequested = false;\n var ctx = this.canvas.frame.canvas.getContext('2d'); // when the container div was hidden, this fixes it back up!\n\n if (this.canvas.frame.canvas.width === 0 || this.canvas.frame.canvas.height === 0) {\n this.canvas.setSize();\n }\n\n this.pixelRatio = (window.devicePixelRatio || 1) / (ctx.webkitBackingStorePixelRatio || ctx.mozBackingStorePixelRatio || ctx.msBackingStorePixelRatio || ctx.oBackingStorePixelRatio || ctx.backingStorePixelRatio || 1);\n ctx.setTransform(this.pixelRatio, 0, 0, this.pixelRatio, 0, 0); // clear the canvas\n\n var w = this.canvas.frame.canvas.clientWidth;\n var h = this.canvas.frame.canvas.clientHeight;\n ctx.clearRect(0, 0, w, h); // if the div is hidden, we stop the redraw here for performance.\n\n if (this.canvas.frame.clientWidth === 0) {\n return;\n } // set scaling and translation\n\n\n ctx.save();\n ctx.translate(this.body.view.translation.x, this.body.view.translation.y);\n ctx.scale(this.body.view.scale, this.body.view.scale);\n ctx.beginPath();\n this.body.emitter.emit(\"beforeDrawing\", ctx);\n ctx.closePath();\n\n if (hidden === false) {\n if (this.dragging === false || this.dragging === true && this.options.hideEdgesOnDrag === false) {\n this._drawEdges(ctx);\n }\n }\n\n if (this.dragging === false || this.dragging === true && this.options.hideNodesOnDrag === false) {\n this._drawNodes(ctx, hidden);\n }\n\n ctx.beginPath();\n this.body.emitter.emit(\"afterDrawing\", ctx);\n ctx.closePath(); // restore original scaling and translation\n\n ctx.restore();\n\n if (hidden === true) {\n ctx.clearRect(0, 0, w, h);\n }\n }\n }\n /**\n * Redraw all nodes\n * The 2d context of a HTML canvas can be retrieved by canvas.getContext('2d');\n * @param {CanvasRenderingContext2D} ctx\n * @param {Boolean} [alwaysShow]\n * @private\n */\n\n }, {\n key: '_resizeNodes',\n value: function _resizeNodes() {\n var ctx = this.canvas.frame.canvas.getContext('2d');\n\n if (this.pixelRatio === undefined) {\n this.pixelRatio = (window.devicePixelRatio || 1) / (ctx.webkitBackingStorePixelRatio || ctx.mozBackingStorePixelRatio || ctx.msBackingStorePixelRatio || ctx.oBackingStorePixelRatio || ctx.backingStorePixelRatio || 1);\n }\n\n ctx.setTransform(this.pixelRatio, 0, 0, this.pixelRatio, 0, 0);\n ctx.save();\n ctx.translate(this.body.view.translation.x, this.body.view.translation.y);\n ctx.scale(this.body.view.scale, this.body.view.scale);\n var nodes = this.body.nodes;\n var node = void 0; // resize all nodes\n\n for (var nodeId in nodes) {\n if (nodes.hasOwnProperty(nodeId)) {\n node = nodes[nodeId];\n node.resize(ctx);\n node.updateBoundingBox(ctx, node.selected);\n }\n } // restore original scaling and translation\n\n\n ctx.restore();\n }\n /**\n * Redraw all nodes\n * The 2d context of a HTML canvas can be retrieved by canvas.getContext('2d');\n * @param {CanvasRenderingContext2D} ctx\n * @param {Boolean} [alwaysShow]\n * @private\n */\n\n }, {\n key: '_drawNodes',\n value: function _drawNodes(ctx) {\n var alwaysShow = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n var nodes = this.body.nodes;\n var nodeIndices = this.body.nodeIndices;\n var node = void 0;\n var selected = [];\n var margin = 20;\n var topLeft = this.canvas.DOMtoCanvas({\n x: -margin,\n y: -margin\n });\n var bottomRight = this.canvas.DOMtoCanvas({\n x: this.canvas.frame.canvas.clientWidth + margin,\n y: this.canvas.frame.canvas.clientHeight + margin\n });\n var viewableArea = {\n top: topLeft.y,\n left: topLeft.x,\n bottom: bottomRight.y,\n right: bottomRight.x\n }; // draw unselected nodes;\n\n for (var i = 0; i < nodeIndices.length; i++) {\n node = nodes[nodeIndices[i]]; // set selected nodes aside\n\n if (node.isSelected()) {\n selected.push(nodeIndices[i]);\n } else {\n if (alwaysShow === true) {\n node.draw(ctx);\n } else if (node.isBoundingBoxOverlappingWith(viewableArea) === true) {\n node.draw(ctx);\n } else {\n node.updateBoundingBox(ctx, node.selected);\n }\n }\n } // draw the selected nodes on top\n\n\n for (var _i = 0; _i < selected.length; _i++) {\n node = nodes[selected[_i]];\n node.draw(ctx);\n }\n }\n /**\n * Redraw all edges\n * The 2d context of a HTML canvas can be retrieved by canvas.getContext('2d');\n * @param {CanvasRenderingContext2D} ctx\n * @private\n */\n\n }, {\n key: '_drawEdges',\n value: function _drawEdges(ctx) {\n var edges = this.body.edges;\n var edgeIndices = this.body.edgeIndices;\n var edge = void 0;\n\n for (var i = 0; i < edgeIndices.length; i++) {\n edge = edges[edgeIndices[i]];\n\n if (edge.connected === true) {\n edge.draw(ctx);\n }\n }\n }\n /**\n * Determine if the browser requires a setTimeout or a requestAnimationFrame. This was required because\n * some implementations (safari and IE9) did not support requestAnimationFrame\n * @private\n */\n\n }, {\n key: '_determineBrowserMethod',\n value: function _determineBrowserMethod() {\n if (typeof window !== 'undefined') {\n var browserType = navigator.userAgent.toLowerCase();\n this.requiresTimeout = false;\n\n if (browserType.indexOf('msie 9.0') != -1) {\n // IE 9\n this.requiresTimeout = true;\n } else if (browserType.indexOf('safari') != -1) {\n // safari\n if (browserType.indexOf('chrome') <= -1) {\n this.requiresTimeout = true;\n }\n }\n } else {\n this.requiresTimeout = true;\n }\n }\n }]);\n return CanvasRenderer;\n }();\n\n exports['default'] = CanvasRenderer;\n /***/\n },\n /* 217 */\n\n /***/\n function (module, exports, __webpack_require__) {\n 'use strict';\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n\n var _classCallCheck2 = __webpack_require__(119);\n\n var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\n var _createClass2 = __webpack_require__(120);\n\n var _createClass3 = _interopRequireDefault(_createClass2);\n\n function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n 'default': obj\n };\n }\n\n var Hammer = __webpack_require__(112);\n\n var hammerUtil = __webpack_require__(125);\n\n var util = __webpack_require__(1);\n /**\n * Create the main frame for the Network.\n * This function is executed once when a Network object is created. The frame\n * contains a canvas, and this canvas contains all objects like the axis and\n * nodes.\n * @private\n */\n\n\n var Canvas = function () {\n function Canvas(body) {\n (0, _classCallCheck3['default'])(this, Canvas);\n this.body = body;\n this.pixelRatio = 1;\n this.resizeTimer = undefined;\n this.resizeFunction = this._onResize.bind(this);\n this.cameraState = {};\n this.initialized = false;\n this.canvasViewCenter = {};\n this.options = {};\n this.defaultOptions = {\n autoResize: true,\n height: '100%',\n width: '100%'\n };\n util.extend(this.options, this.defaultOptions);\n this.bindEventListeners();\n }\n\n (0, _createClass3['default'])(Canvas, [{\n key: 'bindEventListeners',\n value: function bindEventListeners() {\n var _this = this; // bind the events\n\n\n this.body.emitter.once(\"resize\", function (obj) {\n if (obj.width !== 0) {\n _this.body.view.translation.x = obj.width * 0.5;\n }\n\n if (obj.height !== 0) {\n _this.body.view.translation.y = obj.height * 0.5;\n }\n });\n this.body.emitter.on(\"setSize\", this.setSize.bind(this));\n this.body.emitter.on(\"destroy\", function () {\n _this.hammerFrame.destroy();\n\n _this.hammer.destroy();\n\n _this._cleanUp();\n });\n }\n }, {\n key: 'setOptions',\n value: function setOptions(options) {\n var _this2 = this;\n\n if (options !== undefined) {\n var fields = ['width', 'height', 'autoResize'];\n util.selectiveDeepExtend(fields, this.options, options);\n }\n\n if (this.options.autoResize === true) {\n // automatically adapt to a changing size of the browser.\n this._cleanUp();\n\n this.resizeTimer = setInterval(function () {\n var changed = _this2.setSize();\n\n if (changed === true) {\n _this2.body.emitter.emit(\"_requestRedraw\");\n }\n }, 1000);\n this.resizeFunction = this._onResize.bind(this);\n util.addEventListener(window, 'resize', this.resizeFunction);\n }\n }\n }, {\n key: '_cleanUp',\n value: function _cleanUp() {\n // automatically adapt to a changing size of the browser.\n if (this.resizeTimer !== undefined) {\n clearInterval(this.resizeTimer);\n }\n\n util.removeEventListener(window, 'resize', this.resizeFunction);\n this.resizeFunction = undefined;\n }\n }, {\n key: '_onResize',\n value: function _onResize() {\n this.setSize();\n this.body.emitter.emit(\"_redraw\");\n }\n /**\n * Get and store the cameraState\n * @private\n */\n\n }, {\n key: '_getCameraState',\n value: function _getCameraState() {\n var pixelRatio = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.pixelRatio;\n\n if (this.initialized === true) {\n this.cameraState.previousWidth = this.frame.canvas.width / pixelRatio;\n this.cameraState.previousHeight = this.frame.canvas.height / pixelRatio;\n this.cameraState.scale = this.body.view.scale;\n this.cameraState.position = this.DOMtoCanvas({\n x: 0.5 * this.frame.canvas.width / pixelRatio,\n y: 0.5 * this.frame.canvas.height / pixelRatio\n });\n }\n }\n /**\n * Set the cameraState\n * @private\n */\n\n }, {\n key: '_setCameraState',\n value: function _setCameraState() {\n if (this.cameraState.scale !== undefined && this.frame.canvas.clientWidth !== 0 && this.frame.canvas.clientHeight !== 0 && this.pixelRatio !== 0 && this.cameraState.previousWidth > 0) {\n var widthRatio = this.frame.canvas.width / this.pixelRatio / this.cameraState.previousWidth;\n var heightRatio = this.frame.canvas.height / this.pixelRatio / this.cameraState.previousHeight;\n var newScale = this.cameraState.scale;\n\n if (widthRatio != 1 && heightRatio != 1) {\n newScale = this.cameraState.scale * 0.5 * (widthRatio + heightRatio);\n } else if (widthRatio != 1) {\n newScale = this.cameraState.scale * widthRatio;\n } else if (heightRatio != 1) {\n newScale = this.cameraState.scale * heightRatio;\n }\n\n this.body.view.scale = newScale; // this comes from the view module.\n\n var currentViewCenter = this.DOMtoCanvas({\n x: 0.5 * this.frame.canvas.clientWidth,\n y: 0.5 * this.frame.canvas.clientHeight\n });\n var distanceFromCenter = {\n // offset from view, distance view has to change by these x and y to center the node\n x: currentViewCenter.x - this.cameraState.position.x,\n y: currentViewCenter.y - this.cameraState.position.y\n };\n this.body.view.translation.x += distanceFromCenter.x * this.body.view.scale;\n this.body.view.translation.y += distanceFromCenter.y * this.body.view.scale;\n }\n }\n }, {\n key: '_prepareValue',\n value: function _prepareValue(value) {\n if (typeof value === 'number') {\n return value + 'px';\n } else if (typeof value === 'string') {\n if (value.indexOf('%') !== -1 || value.indexOf('px') !== -1) {\n return value;\n } else if (value.indexOf('%') === -1) {\n return value + 'px';\n }\n }\n\n throw new Error('Could not use the value supplied for width or height:' + value);\n }\n /**\n * Create the HTML\n */\n\n }, {\n key: '_create',\n value: function _create() {\n // remove all elements from the container element.\n while (this.body.container.hasChildNodes()) {\n this.body.container.removeChild(this.body.container.firstChild);\n }\n\n this.frame = document.createElement('div');\n this.frame.className = 'vis-network';\n this.frame.style.position = 'relative';\n this.frame.style.overflow = 'hidden';\n this.frame.tabIndex = 900; // tab index is required for keycharm to bind keystrokes to the div instead of the window\n //////////////////////////////////////////////////////////////////\n\n this.frame.canvas = document.createElement(\"canvas\");\n this.frame.canvas.style.position = 'relative';\n this.frame.appendChild(this.frame.canvas);\n\n if (!this.frame.canvas.getContext) {\n var noCanvas = document.createElement('DIV');\n noCanvas.style.color = 'red';\n noCanvas.style.fontWeight = 'bold';\n noCanvas.style.padding = '10px';\n noCanvas.innerHTML = 'Error: your browser does not support HTML canvas';\n this.frame.canvas.appendChild(noCanvas);\n } else {\n var ctx = this.frame.canvas.getContext(\"2d\");\n this.pixelRatio = (window.devicePixelRatio || 1) / (ctx.webkitBackingStorePixelRatio || ctx.mozBackingStorePixelRatio || ctx.msBackingStorePixelRatio || ctx.oBackingStorePixelRatio || ctx.backingStorePixelRatio || 1);\n this.frame.canvas.getContext(\"2d\").setTransform(this.pixelRatio, 0, 0, this.pixelRatio, 0, 0);\n } // add the frame to the container element\n\n\n this.body.container.appendChild(this.frame);\n this.body.view.scale = 1;\n this.body.view.translation = {\n x: 0.5 * this.frame.canvas.clientWidth,\n y: 0.5 * this.frame.canvas.clientHeight\n };\n\n this._bindHammer();\n }\n /**\n * This function binds hammer, it can be repeated over and over due to the uniqueness check.\n * @private\n */\n\n }, {\n key: '_bindHammer',\n value: function _bindHammer() {\n var _this3 = this;\n\n if (this.hammer !== undefined) {\n this.hammer.destroy();\n }\n\n this.drag = {};\n this.pinch = {}; // init hammer\n\n this.hammer = new Hammer(this.frame.canvas);\n this.hammer.get('pinch').set({\n enable: true\n }); // enable to get better response, todo: test on mobile.\n\n this.hammer.get('pan').set({\n threshold: 5,\n direction: Hammer.DIRECTION_ALL\n });\n hammerUtil.onTouch(this.hammer, function (event) {\n _this3.body.eventListeners.onTouch(event);\n });\n this.hammer.on('tap', function (event) {\n _this3.body.eventListeners.onTap(event);\n });\n this.hammer.on('doubletap', function (event) {\n _this3.body.eventListeners.onDoubleTap(event);\n });\n this.hammer.on('press', function (event) {\n _this3.body.eventListeners.onHold(event);\n });\n this.hammer.on('panstart', function (event) {\n _this3.body.eventListeners.onDragStart(event);\n });\n this.hammer.on('panmove', function (event) {\n _this3.body.eventListeners.onDrag(event);\n });\n this.hammer.on('panend', function (event) {\n _this3.body.eventListeners.onDragEnd(event);\n });\n this.hammer.on('pinch', function (event) {\n _this3.body.eventListeners.onPinch(event);\n }); // TODO: neatly cleanup these handlers when re-creating the Canvas, IF these are done with hammer, event.stopPropagation will not work?\n\n this.frame.canvas.addEventListener('mousewheel', function (event) {\n _this3.body.eventListeners.onMouseWheel(event);\n });\n this.frame.canvas.addEventListener('DOMMouseScroll', function (event) {\n _this3.body.eventListeners.onMouseWheel(event);\n });\n this.frame.canvas.addEventListener('mousemove', function (event) {\n _this3.body.eventListeners.onMouseMove(event);\n });\n this.frame.canvas.addEventListener('contextmenu', function (event) {\n _this3.body.eventListeners.onContext(event);\n });\n this.hammerFrame = new Hammer(this.frame);\n hammerUtil.onRelease(this.hammerFrame, function (event) {\n _this3.body.eventListeners.onRelease(event);\n });\n }\n /**\n * Set a new size for the network\n * @param {string} width Width in pixels or percentage (for example '800px'\n * or '50%')\n * @param {string} height Height in pixels or percentage (for example '400px'\n * or '30%')\n */\n\n }, {\n key: 'setSize',\n value: function setSize() {\n var width = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.options.width;\n var height = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.options.height;\n width = this._prepareValue(width);\n height = this._prepareValue(height);\n var emitEvent = false;\n var oldWidth = this.frame.canvas.width;\n var oldHeight = this.frame.canvas.height; // update the pixel ratio\n\n var ctx = this.frame.canvas.getContext(\"2d\");\n var previousRatio = this.pixelRatio; // we cache this because the camera state storage needs the old value\n\n this.pixelRatio = (window.devicePixelRatio || 1) / (ctx.webkitBackingStorePixelRatio || ctx.mozBackingStorePixelRatio || ctx.msBackingStorePixelRatio || ctx.oBackingStorePixelRatio || ctx.backingStorePixelRatio || 1);\n\n if (width != this.options.width || height != this.options.height || this.frame.style.width != width || this.frame.style.height != height) {\n this._getCameraState(previousRatio);\n\n this.frame.style.width = width;\n this.frame.style.height = height;\n this.frame.canvas.style.width = '100%';\n this.frame.canvas.style.height = '100%';\n this.frame.canvas.width = Math.round(this.frame.canvas.clientWidth * this.pixelRatio);\n this.frame.canvas.height = Math.round(this.frame.canvas.clientHeight * this.pixelRatio);\n this.options.width = width;\n this.options.height = height;\n this.canvasViewCenter = {\n x: 0.5 * this.frame.clientWidth,\n y: 0.5 * this.frame.clientHeight\n };\n emitEvent = true;\n } else {\n // this would adapt the width of the canvas to the width from 100% if and only if\n // there is a change.\n // store the camera if there is a change in size.\n if (this.frame.canvas.width != Math.round(this.frame.canvas.clientWidth * this.pixelRatio) || this.frame.canvas.height != Math.round(this.frame.canvas.clientHeight * this.pixelRatio)) {\n this._getCameraState(previousRatio);\n }\n\n if (this.frame.canvas.width != Math.round(this.frame.canvas.clientWidth * this.pixelRatio)) {\n this.frame.canvas.width = Math.round(this.frame.canvas.clientWidth * this.pixelRatio);\n emitEvent = true;\n }\n\n if (this.frame.canvas.height != Math.round(this.frame.canvas.clientHeight * this.pixelRatio)) {\n this.frame.canvas.height = Math.round(this.frame.canvas.clientHeight * this.pixelRatio);\n emitEvent = true;\n }\n }\n\n if (emitEvent === true) {\n this.body.emitter.emit('resize', {\n width: Math.round(this.frame.canvas.width / this.pixelRatio),\n height: Math.round(this.frame.canvas.height / this.pixelRatio),\n oldWidth: Math.round(oldWidth / this.pixelRatio),\n oldHeight: Math.round(oldHeight / this.pixelRatio)\n }); // restore the camera on change.\n\n this._setCameraState();\n } // set initialized so the get and set camera will work from now on.\n\n\n this.initialized = true;\n return emitEvent;\n }\n }, {\n key: '_XconvertDOMtoCanvas',\n\n /**\n * Convert the X coordinate in DOM-space (coordinate point in browser relative to the container div) to\n * the X coordinate in canvas-space (the simulation sandbox, which the camera looks upon)\n * @param {number} x\n * @returns {number}\n * @private\n */\n value: function _XconvertDOMtoCanvas(x) {\n return (x - this.body.view.translation.x) / this.body.view.scale;\n }\n /**\n * Convert the X coordinate in canvas-space (the simulation sandbox, which the camera looks upon) to\n * the X coordinate in DOM-space (coordinate point in browser relative to the container div)\n * @param {number} x\n * @returns {number}\n * @private\n */\n\n }, {\n key: '_XconvertCanvasToDOM',\n value: function _XconvertCanvasToDOM(x) {\n return x * this.body.view.scale + this.body.view.translation.x;\n }\n /**\n * Convert the Y coordinate in DOM-space (coordinate point in browser relative to the container div) to\n * the Y coordinate in canvas-space (the simulation sandbox, which the camera looks upon)\n * @param {number} y\n * @returns {number}\n * @private\n */\n\n }, {\n key: '_YconvertDOMtoCanvas',\n value: function _YconvertDOMtoCanvas(y) {\n return (y - this.body.view.translation.y) / this.body.view.scale;\n }\n /**\n * Convert the Y coordinate in canvas-space (the simulation sandbox, which the camera looks upon) to\n * the Y coordinate in DOM-space (coordinate point in browser relative to the container div)\n * @param {number} y\n * @returns {number}\n * @private\n */\n\n }, {\n key: '_YconvertCanvasToDOM',\n value: function _YconvertCanvasToDOM(y) {\n return y * this.body.view.scale + this.body.view.translation.y;\n }\n /**\n *\n * @param {object} pos = {x: number, y: number}\n * @returns {{x: number, y: number}}\n * @constructor\n */\n\n }, {\n key: 'canvasToDOM',\n value: function canvasToDOM(pos) {\n return {\n x: this._XconvertCanvasToDOM(pos.x),\n y: this._YconvertCanvasToDOM(pos.y)\n };\n }\n /**\n *\n * @param {object} pos = {x: number, y: number}\n * @returns {{x: number, y: number}}\n * @constructor\n */\n\n }, {\n key: 'DOMtoCanvas',\n value: function DOMtoCanvas(pos) {\n return {\n x: this._XconvertDOMtoCanvas(pos.x),\n y: this._YconvertDOMtoCanvas(pos.y)\n };\n }\n }]);\n return Canvas;\n }();\n\n exports['default'] = Canvas;\n /***/\n },\n /* 218 */\n\n /***/\n function (module, exports, __webpack_require__) {\n 'use strict';\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n\n var _classCallCheck2 = __webpack_require__(119);\n\n var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\n var _createClass2 = __webpack_require__(120);\n\n var _createClass3 = _interopRequireDefault(_createClass2);\n\n var _NetworkUtil = __webpack_require__(214);\n\n var _NetworkUtil2 = _interopRequireDefault(_NetworkUtil);\n\n function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n 'default': obj\n };\n }\n\n var util = __webpack_require__(1);\n\n var View = function () {\n function View(body, canvas) {\n var _this = this;\n\n (0, _classCallCheck3['default'])(this, View);\n this.body = body;\n this.canvas = canvas;\n this.animationSpeed = 1 / this.renderRefreshRate;\n this.animationEasingFunction = \"easeInOutQuint\";\n this.easingTime = 0;\n this.sourceScale = 0;\n this.targetScale = 0;\n this.sourceTranslation = 0;\n this.targetTranslation = 0;\n this.lockedOnNodeId = undefined;\n this.lockedOnNodeOffset = undefined;\n this.touchTime = 0;\n this.viewFunction = undefined;\n this.body.emitter.on(\"fit\", this.fit.bind(this));\n this.body.emitter.on(\"animationFinished\", function () {\n _this.body.emitter.emit(\"_stopRendering\");\n });\n this.body.emitter.on(\"unlockNode\", this.releaseNode.bind(this));\n }\n\n (0, _createClass3['default'])(View, [{\n key: 'setOptions',\n value: function setOptions() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n this.options = options;\n }\n /**\n * This function zooms out to fit all data on screen based on amount of nodes\n * @param {Object} Options\n * @param {Boolean} [initialZoom] | zoom based on fitted formula or range, true = fitted, default = false;\n */\n\n }, {\n key: 'fit',\n value: function fit() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {\n nodes: []\n };\n var initialZoom = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n var range = void 0;\n var zoomLevel = void 0;\n\n if (options.nodes === undefined || options.nodes.length === 0) {\n options.nodes = this.body.nodeIndices;\n }\n\n if (initialZoom === true) {\n // check if more than half of the nodes have a predefined position. If so, we use the range, not the approximation.\n var positionDefined = 0;\n\n for (var nodeId in this.body.nodes) {\n if (this.body.nodes.hasOwnProperty(nodeId)) {\n var node = this.body.nodes[nodeId];\n\n if (node.predefinedPosition === true) {\n positionDefined += 1;\n }\n }\n }\n\n if (positionDefined > 0.5 * this.body.nodeIndices.length) {\n this.fit(options, false);\n return;\n }\n\n range = _NetworkUtil2['default'].getRange(this.body.nodes, options.nodes);\n var numberOfNodes = this.body.nodeIndices.length;\n zoomLevel = 12.662 / (numberOfNodes + 7.4147) + 0.0964822; // this is obtained from fitting a dataset from 5 points with scale levels that looked good.\n // correct for larger canvasses.\n\n var factor = Math.min(this.canvas.frame.canvas.clientWidth / 600, this.canvas.frame.canvas.clientHeight / 600);\n zoomLevel *= factor;\n } else {\n this.body.emitter.emit(\"_resizeNodes\");\n range = _NetworkUtil2['default'].getRange(this.body.nodes, options.nodes);\n var xDistance = Math.abs(range.maxX - range.minX) * 1.1;\n var yDistance = Math.abs(range.maxY - range.minY) * 1.1;\n var xZoomLevel = this.canvas.frame.canvas.clientWidth / xDistance;\n var yZoomLevel = this.canvas.frame.canvas.clientHeight / yDistance;\n zoomLevel = xZoomLevel <= yZoomLevel ? xZoomLevel : yZoomLevel;\n }\n\n if (zoomLevel > 1.0) {\n zoomLevel = 1.0;\n } else if (zoomLevel === 0) {\n zoomLevel = 1.0;\n }\n\n var center = _NetworkUtil2['default'].findCenter(range);\n\n var animationOptions = {\n position: center,\n scale: zoomLevel,\n animation: options.animation\n };\n this.moveTo(animationOptions);\n } // animation\n\n /**\n * Center a node in view.\n *\n * @param {Number} nodeId\n * @param {Number} [options]\n */\n\n }, {\n key: 'focus',\n value: function focus(nodeId) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n if (this.body.nodes[nodeId] !== undefined) {\n var nodePosition = {\n x: this.body.nodes[nodeId].x,\n y: this.body.nodes[nodeId].y\n };\n options.position = nodePosition;\n options.lockedOnNode = nodeId;\n this.moveTo(options);\n } else {\n console.log(\"Node: \" + nodeId + \" cannot be found.\");\n }\n }\n /**\n *\n * @param {Object} options | options.offset = {x:Number, y:Number} // offset from the center in DOM pixels\n * | options.scale = Number // scale to move to\n * | options.position = {x:Number, y:Number} // position to move to\n * | options.animation = {duration:Number, easingFunction:String} || Boolean // position to move to\n */\n\n }, {\n key: 'moveTo',\n value: function moveTo(options) {\n if (options === undefined) {\n options = {};\n return;\n }\n\n if (options.offset === undefined) {\n options.offset = {\n x: 0,\n y: 0\n };\n }\n\n if (options.offset.x === undefined) {\n options.offset.x = 0;\n }\n\n if (options.offset.y === undefined) {\n options.offset.y = 0;\n }\n\n if (options.scale === undefined) {\n options.scale = this.body.view.scale;\n }\n\n if (options.position === undefined) {\n options.position = this.getViewPosition();\n }\n\n if (options.animation === undefined) {\n options.animation = {\n duration: 0\n };\n }\n\n if (options.animation === false) {\n options.animation = {\n duration: 0\n };\n }\n\n if (options.animation === true) {\n options.animation = {};\n }\n\n if (options.animation.duration === undefined) {\n options.animation.duration = 1000;\n } // default duration\n\n\n if (options.animation.easingFunction === undefined) {\n options.animation.easingFunction = \"easeInOutQuad\";\n } // default easing function\n\n\n this.animateView(options);\n }\n /**\n *\n * @param {Object} options | options.offset = {x:Number, y:Number} // offset from the center in DOM pixels\n * | options.time = Number // animation time in milliseconds\n * | options.scale = Number // scale to animate to\n * | options.position = {x:Number, y:Number} // position to animate to\n * | options.easingFunction = String // linear, easeInQuad, easeOutQuad, easeInOutQuad,\n * // easeInCubic, easeOutCubic, easeInOutCubic,\n * // easeInQuart, easeOutQuart, easeInOutQuart,\n * // easeInQuint, easeOutQuint, easeInOutQuint\n */\n\n }, {\n key: 'animateView',\n value: function animateView(options) {\n if (options === undefined) {\n return;\n }\n\n this.animationEasingFunction = options.animation.easingFunction; // release if something focussed on the node\n\n this.releaseNode();\n\n if (options.locked === true) {\n this.lockedOnNodeId = options.lockedOnNode;\n this.lockedOnNodeOffset = options.offset;\n } // forcefully complete the old animation if it was still running\n\n\n if (this.easingTime != 0) {\n this._transitionRedraw(true); // by setting easingtime to 1, we finish the animation.\n\n }\n\n this.sourceScale = this.body.view.scale;\n this.sourceTranslation = this.body.view.translation;\n this.targetScale = options.scale; // set the scale so the viewCenter is based on the correct zoom level. This is overridden in the transitionRedraw\n // but at least then we'll have the target transition\n\n this.body.view.scale = this.targetScale;\n var viewCenter = this.canvas.DOMtoCanvas({\n x: 0.5 * this.canvas.frame.canvas.clientWidth,\n y: 0.5 * this.canvas.frame.canvas.clientHeight\n });\n var distanceFromCenter = {\n // offset from view, distance view has to change by these x and y to center the node\n x: viewCenter.x - options.position.x,\n y: viewCenter.y - options.position.y\n };\n this.targetTranslation = {\n x: this.sourceTranslation.x + distanceFromCenter.x * this.targetScale + options.offset.x,\n y: this.sourceTranslation.y + distanceFromCenter.y * this.targetScale + options.offset.y\n }; // if the time is set to 0, don't do an animation\n\n if (options.animation.duration === 0) {\n if (this.lockedOnNodeId != undefined) {\n this.viewFunction = this._lockedRedraw.bind(this);\n this.body.emitter.on(\"initRedraw\", this.viewFunction);\n } else {\n this.body.view.scale = this.targetScale;\n this.body.view.translation = this.targetTranslation;\n this.body.emitter.emit(\"_requestRedraw\");\n }\n } else {\n this.animationSpeed = 1 / (60 * options.animation.duration * 0.001) || 1 / 60; // 60 for 60 seconds, 0.001 for milli's\n\n this.animationEasingFunction = options.animation.easingFunction;\n this.viewFunction = this._transitionRedraw.bind(this);\n this.body.emitter.on(\"initRedraw\", this.viewFunction);\n this.body.emitter.emit(\"_startRendering\");\n }\n }\n /**\n * used to animate smoothly by hijacking the redraw function.\n * @private\n */\n\n }, {\n key: '_lockedRedraw',\n value: function _lockedRedraw() {\n var nodePosition = {\n x: this.body.nodes[this.lockedOnNodeId].x,\n y: this.body.nodes[this.lockedOnNodeId].y\n };\n var viewCenter = this.canvas.DOMtoCanvas({\n x: 0.5 * this.canvas.frame.canvas.clientWidth,\n y: 0.5 * this.canvas.frame.canvas.clientHeight\n });\n var distanceFromCenter = {\n // offset from view, distance view has to change by these x and y to center the node\n x: viewCenter.x - nodePosition.x,\n y: viewCenter.y - nodePosition.y\n };\n var sourceTranslation = this.body.view.translation;\n var targetTranslation = {\n x: sourceTranslation.x + distanceFromCenter.x * this.body.view.scale + this.lockedOnNodeOffset.x,\n y: sourceTranslation.y + distanceFromCenter.y * this.body.view.scale + this.lockedOnNodeOffset.y\n };\n this.body.view.translation = targetTranslation;\n }\n }, {\n key: 'releaseNode',\n value: function releaseNode() {\n if (this.lockedOnNodeId !== undefined && this.viewFunction !== undefined) {\n this.body.emitter.off(\"initRedraw\", this.viewFunction);\n this.lockedOnNodeId = undefined;\n this.lockedOnNodeOffset = undefined;\n }\n }\n /**\n *\n * @param easingTime\n * @private\n */\n\n }, {\n key: '_transitionRedraw',\n value: function _transitionRedraw() {\n var finished = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n this.easingTime += this.animationSpeed;\n this.easingTime = finished === true ? 1.0 : this.easingTime;\n var progress = util.easingFunctions[this.animationEasingFunction](this.easingTime);\n this.body.view.scale = this.sourceScale + (this.targetScale - this.sourceScale) * progress;\n this.body.view.translation = {\n x: this.sourceTranslation.x + (this.targetTranslation.x - this.sourceTranslation.x) * progress,\n y: this.sourceTranslation.y + (this.targetTranslation.y - this.sourceTranslation.y) * progress\n }; // cleanup\n\n if (this.easingTime >= 1.0) {\n this.body.emitter.off(\"initRedraw\", this.viewFunction);\n this.easingTime = 0;\n\n if (this.lockedOnNodeId != undefined) {\n this.viewFunction = this._lockedRedraw.bind(this);\n this.body.emitter.on(\"initRedraw\", this.viewFunction);\n }\n\n this.body.emitter.emit(\"animationFinished\");\n }\n }\n }, {\n key: 'getScale',\n value: function getScale() {\n return this.body.view.scale;\n }\n }, {\n key: 'getViewPosition',\n value: function getViewPosition() {\n return this.canvas.DOMtoCanvas({\n x: 0.5 * this.canvas.frame.canvas.clientWidth,\n y: 0.5 * this.canvas.frame.canvas.clientHeight\n });\n }\n }]);\n return View;\n }();\n\n exports['default'] = View;\n /***/\n },\n /* 219 */\n\n /***/\n function (module, exports, __webpack_require__) {\n 'use strict';\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n\n var _classCallCheck2 = __webpack_require__(119);\n\n var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\n var _createClass2 = __webpack_require__(120);\n\n var _createClass3 = _interopRequireDefault(_createClass2);\n\n var _NavigationHandler = __webpack_require__(220);\n\n var _NavigationHandler2 = _interopRequireDefault(_NavigationHandler);\n\n var _Popup = __webpack_require__(132);\n\n var _Popup2 = _interopRequireDefault(_Popup);\n\n function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n 'default': obj\n };\n }\n\n var util = __webpack_require__(1);\n\n var InteractionHandler = function () {\n function InteractionHandler(body, canvas, selectionHandler) {\n (0, _classCallCheck3['default'])(this, InteractionHandler);\n this.body = body;\n this.canvas = canvas;\n this.selectionHandler = selectionHandler;\n this.navigationHandler = new _NavigationHandler2['default'](body, canvas); // bind the events from hammer to functions in this object\n\n this.body.eventListeners.onTap = this.onTap.bind(this);\n this.body.eventListeners.onTouch = this.onTouch.bind(this);\n this.body.eventListeners.onDoubleTap = this.onDoubleTap.bind(this);\n this.body.eventListeners.onHold = this.onHold.bind(this);\n this.body.eventListeners.onDragStart = this.onDragStart.bind(this);\n this.body.eventListeners.onDrag = this.onDrag.bind(this);\n this.body.eventListeners.onDragEnd = this.onDragEnd.bind(this);\n this.body.eventListeners.onMouseWheel = this.onMouseWheel.bind(this);\n this.body.eventListeners.onPinch = this.onPinch.bind(this);\n this.body.eventListeners.onMouseMove = this.onMouseMove.bind(this);\n this.body.eventListeners.onRelease = this.onRelease.bind(this);\n this.body.eventListeners.onContext = this.onContext.bind(this);\n this.touchTime = 0;\n this.drag = {};\n this.pinch = {};\n this.popup = undefined;\n this.popupObj = undefined;\n this.popupTimer = undefined;\n this.body.functions.getPointer = this.getPointer.bind(this);\n this.options = {};\n this.defaultOptions = {\n dragNodes: true,\n dragView: true,\n hover: false,\n keyboard: {\n enabled: false,\n speed: {\n x: 10,\n y: 10,\n zoom: 0.02\n },\n bindToWindow: true\n },\n navigationButtons: false,\n tooltipDelay: 300,\n zoomView: true\n };\n util.extend(this.options, this.defaultOptions);\n this.bindEventListeners();\n }\n\n (0, _createClass3['default'])(InteractionHandler, [{\n key: 'bindEventListeners',\n value: function bindEventListeners() {\n var _this = this;\n\n this.body.emitter.on('destroy', function () {\n clearTimeout(_this.popupTimer);\n delete _this.body.functions.getPointer;\n });\n }\n }, {\n key: 'setOptions',\n value: function setOptions(options) {\n if (options !== undefined) {\n // extend all but the values in fields\n var fields = ['hideEdgesOnDrag', 'hideNodesOnDrag', 'keyboard', 'multiselect', 'selectable', 'selectConnectedEdges'];\n util.selectiveNotDeepExtend(fields, this.options, options); // merge the keyboard options in.\n\n util.mergeOptions(this.options, options, 'keyboard');\n\n if (options.tooltip) {\n util.extend(this.options.tooltip, options.tooltip);\n\n if (options.tooltip.color) {\n this.options.tooltip.color = util.parseColor(options.tooltip.color);\n }\n }\n }\n\n this.navigationHandler.setOptions(this.options);\n }\n /**\n * Get the pointer location from a touch location\n * @param {{x: Number, y: Number}} touch\n * @return {{x: Number, y: Number}} pointer\n * @private\n */\n\n }, {\n key: 'getPointer',\n value: function getPointer(touch) {\n return {\n x: touch.x - util.getAbsoluteLeft(this.canvas.frame.canvas),\n y: touch.y - util.getAbsoluteTop(this.canvas.frame.canvas)\n };\n }\n /**\n * On start of a touch gesture, store the pointer\n * @param event\n * @private\n */\n\n }, {\n key: 'onTouch',\n value: function onTouch(event) {\n if (new Date().valueOf() - this.touchTime > 50) {\n this.drag.pointer = this.getPointer(event.center);\n this.drag.pinched = false;\n this.pinch.scale = this.body.view.scale; // to avoid double fireing of this event because we have two hammer instances. (on canvas and on frame)\n\n this.touchTime = new Date().valueOf();\n }\n }\n /**\n * handle tap/click event: select/unselect a node\n * @private\n */\n\n }, {\n key: 'onTap',\n value: function onTap(event) {\n var pointer = this.getPointer(event.center);\n var multiselect = this.selectionHandler.options.multiselect && (event.changedPointers[0].ctrlKey || event.changedPointers[0].metaKey);\n this.checkSelectionChanges(pointer, event, multiselect);\n\n this.selectionHandler._generateClickEvent('click', event, pointer);\n }\n /**\n * handle doubletap event\n * @private\n */\n\n }, {\n key: 'onDoubleTap',\n value: function onDoubleTap(event) {\n var pointer = this.getPointer(event.center);\n\n this.selectionHandler._generateClickEvent('doubleClick', event, pointer);\n }\n /**\n * handle long tap event: multi select nodes\n * @private\n */\n\n }, {\n key: 'onHold',\n value: function onHold(event) {\n var pointer = this.getPointer(event.center);\n var multiselect = this.selectionHandler.options.multiselect;\n this.checkSelectionChanges(pointer, event, multiselect);\n\n this.selectionHandler._generateClickEvent('click', event, pointer);\n\n this.selectionHandler._generateClickEvent('hold', event, pointer);\n }\n /**\n * handle the release of the screen\n *\n * @private\n */\n\n }, {\n key: 'onRelease',\n value: function onRelease(event) {\n if (new Date().valueOf() - this.touchTime > 10) {\n var pointer = this.getPointer(event.center);\n\n this.selectionHandler._generateClickEvent('release', event, pointer); // to avoid double fireing of this event because we have two hammer instances. (on canvas and on frame)\n\n\n this.touchTime = new Date().valueOf();\n }\n }\n }, {\n key: 'onContext',\n value: function onContext(event) {\n var pointer = this.getPointer({\n x: event.clientX,\n y: event.clientY\n });\n\n this.selectionHandler._generateClickEvent('oncontext', event, pointer);\n }\n /**\n *\n * @param pointer\n * @param add\n */\n\n }, {\n key: 'checkSelectionChanges',\n value: function checkSelectionChanges(pointer, event) {\n var add = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n\n var previouslySelectedEdgeCount = this.selectionHandler._getSelectedEdgeCount();\n\n var previouslySelectedNodeCount = this.selectionHandler._getSelectedNodeCount();\n\n var previousSelection = this.selectionHandler.getSelection();\n var selected = void 0;\n\n if (add === true) {\n selected = this.selectionHandler.selectAdditionalOnPoint(pointer);\n } else {\n selected = this.selectionHandler.selectOnPoint(pointer);\n }\n\n var selectedEdgesCount = this.selectionHandler._getSelectedEdgeCount();\n\n var selectedNodesCount = this.selectionHandler._getSelectedNodeCount();\n\n var currentSelection = this.selectionHandler.getSelection();\n\n var _determineIfDifferent2 = this._determineIfDifferent(previousSelection, currentSelection),\n nodesChanged = _determineIfDifferent2.nodesChanged,\n edgesChanged = _determineIfDifferent2.edgesChanged;\n\n var nodeSelected = false;\n\n if (selectedNodesCount - previouslySelectedNodeCount > 0) {\n // node was selected\n this.selectionHandler._generateClickEvent('selectNode', event, pointer);\n\n selected = true;\n nodeSelected = true;\n } else if (nodesChanged === true && selectedNodesCount > 0) {\n this.selectionHandler._generateClickEvent('deselectNode', event, pointer, previousSelection);\n\n this.selectionHandler._generateClickEvent('selectNode', event, pointer);\n\n nodeSelected = true;\n selected = true;\n } else if (selectedNodesCount - previouslySelectedNodeCount < 0) {\n // node was deselected\n this.selectionHandler._generateClickEvent('deselectNode', event, pointer, previousSelection);\n\n selected = true;\n } // handle the selected edges\n\n\n if (selectedEdgesCount - previouslySelectedEdgeCount > 0 && nodeSelected === false) {\n // edge was selected\n this.selectionHandler._generateClickEvent('selectEdge', event, pointer);\n\n selected = true;\n } else if (selectedEdgesCount > 0 && edgesChanged === true) {\n this.selectionHandler._generateClickEvent('deselectEdge', event, pointer, previousSelection);\n\n this.selectionHandler._generateClickEvent('selectEdge', event, pointer);\n\n selected = true;\n } else if (selectedEdgesCount - previouslySelectedEdgeCount < 0) {\n // edge was deselected\n this.selectionHandler._generateClickEvent('deselectEdge', event, pointer, previousSelection);\n\n selected = true;\n } // fire the select event if anything has been selected or deselected\n\n\n if (selected === true) {\n // select or unselect\n this.selectionHandler._generateClickEvent('select', event, pointer);\n }\n }\n /**\n * This function checks if the nodes and edges previously selected have changed.\n * @param previousSelection\n * @param currentSelection\n * @returns {{nodesChanged: boolean, edgesChanged: boolean}}\n * @private\n */\n\n }, {\n key: '_determineIfDifferent',\n value: function _determineIfDifferent(previousSelection, currentSelection) {\n var nodesChanged = false;\n var edgesChanged = false;\n\n for (var i = 0; i < previousSelection.nodes.length; i++) {\n if (currentSelection.nodes.indexOf(previousSelection.nodes[i]) === -1) {\n nodesChanged = true;\n }\n }\n\n for (var _i = 0; _i < currentSelection.nodes.length; _i++) {\n if (previousSelection.nodes.indexOf(previousSelection.nodes[_i]) === -1) {\n nodesChanged = true;\n }\n }\n\n for (var _i2 = 0; _i2 < previousSelection.edges.length; _i2++) {\n if (currentSelection.edges.indexOf(previousSelection.edges[_i2]) === -1) {\n edgesChanged = true;\n }\n }\n\n for (var _i3 = 0; _i3 < currentSelection.edges.length; _i3++) {\n if (previousSelection.edges.indexOf(previousSelection.edges[_i3]) === -1) {\n edgesChanged = true;\n }\n }\n\n return {\n nodesChanged: nodesChanged,\n edgesChanged: edgesChanged\n };\n }\n /**\n * This function is called by onDragStart.\n * It is separated out because we can then overload it for the datamanipulation system.\n *\n * @private\n */\n\n }, {\n key: 'onDragStart',\n value: function onDragStart(event) {\n //in case the touch event was triggered on an external div, do the initial touch now.\n if (this.drag.pointer === undefined) {\n this.onTouch(event);\n } // note: drag.pointer is set in onTouch to get the initial touch location\n\n\n var node = this.selectionHandler.getNodeAt(this.drag.pointer);\n this.drag.dragging = true;\n this.drag.selection = [];\n this.drag.translation = util.extend({}, this.body.view.translation); // copy the object\n\n this.drag.nodeId = undefined;\n\n if (node !== undefined && this.options.dragNodes === true) {\n this.drag.nodeId = node.id; // select the clicked node if not yet selected\n\n if (node.isSelected() === false) {\n this.selectionHandler.unselectAll();\n this.selectionHandler.selectObject(node);\n } // after select to contain the node\n\n\n this.selectionHandler._generateClickEvent('dragStart', event, this.drag.pointer);\n\n var selection = this.selectionHandler.selectionObj.nodes; // create an array with the selected nodes and their original location and status\n\n for (var nodeId in selection) {\n if (selection.hasOwnProperty(nodeId)) {\n var object = selection[nodeId];\n var s = {\n id: object.id,\n node: object,\n // store original x, y, xFixed and yFixed, make the node temporarily Fixed\n x: object.x,\n y: object.y,\n xFixed: object.options.fixed.x,\n yFixed: object.options.fixed.y\n };\n object.options.fixed.x = true;\n object.options.fixed.y = true;\n this.drag.selection.push(s);\n }\n }\n } else {\n // fallback if no node is selected and thus the view is dragged.\n this.selectionHandler._generateClickEvent('dragStart', event, this.drag.pointer, undefined, true);\n }\n }\n /**\n * handle drag event\n * @private\n */\n\n }, {\n key: 'onDrag',\n value: function onDrag(event) {\n var _this2 = this;\n\n if (this.drag.pinched === true) {\n return;\n } // remove the focus on node if it is focussed on by the focusOnNode\n\n\n this.body.emitter.emit('unlockNode');\n var pointer = this.getPointer(event.center);\n var selection = this.drag.selection;\n\n if (selection && selection.length && this.options.dragNodes === true) {\n this.selectionHandler._generateClickEvent('dragging', event, pointer); // calculate delta's and new location\n\n\n var deltaX = pointer.x - this.drag.pointer.x;\n var deltaY = pointer.y - this.drag.pointer.y; // update position of all selected nodes\n\n selection.forEach(function (selection) {\n var node = selection.node; // only move the node if it was not fixed initially\n\n if (selection.xFixed === false) {\n node.x = _this2.canvas._XconvertDOMtoCanvas(_this2.canvas._XconvertCanvasToDOM(selection.x) + deltaX);\n } // only move the node if it was not fixed initially\n\n\n if (selection.yFixed === false) {\n node.y = _this2.canvas._YconvertDOMtoCanvas(_this2.canvas._YconvertCanvasToDOM(selection.y) + deltaY);\n }\n }); // start the simulation of the physics\n\n this.body.emitter.emit('startSimulation');\n } else {\n // move the network\n if (this.options.dragView === true) {\n this.selectionHandler._generateClickEvent('dragging', event, pointer, undefined, true); // if the drag was not started properly because the click started outside the network div, start it now.\n\n\n if (this.drag.pointer === undefined) {\n this.onDragStart(event);\n return;\n }\n\n var diffX = pointer.x - this.drag.pointer.x;\n var diffY = pointer.y - this.drag.pointer.y;\n this.body.view.translation = {\n x: this.drag.translation.x + diffX,\n y: this.drag.translation.y + diffY\n };\n this.body.emitter.emit('_redraw');\n }\n }\n }\n /**\n * handle drag start event\n * @private\n */\n\n }, {\n key: 'onDragEnd',\n value: function onDragEnd(event) {\n this.drag.dragging = false;\n var selection = this.drag.selection;\n\n if (selection && selection.length) {\n selection.forEach(function (s) {\n // restore original xFixed and yFixed\n s.node.options.fixed.x = s.xFixed;\n s.node.options.fixed.y = s.yFixed;\n });\n\n this.selectionHandler._generateClickEvent('dragEnd', event, this.getPointer(event.center));\n\n this.body.emitter.emit('startSimulation');\n } else {\n this.selectionHandler._generateClickEvent('dragEnd', event, this.getPointer(event.center), undefined, true);\n\n this.body.emitter.emit('_requestRedraw');\n }\n }\n /**\n * Handle pinch event\n * @param event\n * @private\n */\n\n }, {\n key: 'onPinch',\n value: function onPinch(event) {\n var pointer = this.getPointer(event.center);\n this.drag.pinched = true;\n\n if (this.pinch['scale'] === undefined) {\n this.pinch.scale = 1;\n } // TODO: enabled moving while pinching?\n\n\n var scale = this.pinch.scale * event.scale;\n this.zoom(scale, pointer);\n }\n /**\n * Zoom the network in or out\n * @param {Number} scale a number around 1, and between 0.01 and 10\n * @param {{x: Number, y: Number}} pointer Position on screen\n * @return {Number} appliedScale scale is limited within the boundaries\n * @private\n */\n\n }, {\n key: 'zoom',\n value: function zoom(scale, pointer) {\n if (this.options.zoomView === true) {\n var scaleOld = this.body.view.scale;\n\n if (scale < 0.00001) {\n scale = 0.00001;\n }\n\n if (scale > 10) {\n scale = 10;\n }\n\n var preScaleDragPointer = undefined;\n\n if (this.drag !== undefined) {\n if (this.drag.dragging === true) {\n preScaleDragPointer = this.canvas.DOMtoCanvas(this.drag.pointer);\n }\n } // + this.canvas.frame.canvas.clientHeight / 2\n\n\n var translation = this.body.view.translation;\n var scaleFrac = scale / scaleOld;\n var tx = (1 - scaleFrac) * pointer.x + translation.x * scaleFrac;\n var ty = (1 - scaleFrac) * pointer.y + translation.y * scaleFrac;\n this.body.view.scale = scale;\n this.body.view.translation = {\n x: tx,\n y: ty\n };\n\n if (preScaleDragPointer != undefined) {\n var postScaleDragPointer = this.canvas.canvasToDOM(preScaleDragPointer);\n this.drag.pointer.x = postScaleDragPointer.x;\n this.drag.pointer.y = postScaleDragPointer.y;\n }\n\n this.body.emitter.emit('_requestRedraw');\n\n if (scaleOld < scale) {\n this.body.emitter.emit('zoom', {\n direction: '+',\n scale: this.body.view.scale,\n pointer: pointer\n });\n } else {\n this.body.emitter.emit('zoom', {\n direction: '-',\n scale: this.body.view.scale,\n pointer: pointer\n });\n }\n }\n }\n /**\n * Event handler for mouse wheel event, used to zoom the timeline\n * See http://adomas.org/javascript-mouse-wheel/\n * https://github.com/EightMedia/hammer.js/issues/256\n * @param {MouseEvent} event\n * @private\n */\n\n }, {\n key: 'onMouseWheel',\n value: function onMouseWheel(event) {\n if (this.options.zoomView === true) {\n // retrieve delta\n var delta = 0;\n\n if (event.wheelDelta) {\n /* IE/Opera. */\n delta = event.wheelDelta / 120;\n } else if (event.detail) {\n /* Mozilla case. */\n // In Mozilla, sign of delta is different than in IE.\n // Also, delta is multiple of 3.\n delta = -event.detail / 3;\n } // If delta is nonzero, handle it.\n // Basically, delta is now positive if wheel was scrolled up,\n // and negative, if wheel was scrolled down.\n\n\n if (delta !== 0) {\n // calculate the new scale\n var scale = this.body.view.scale;\n var zoom = delta / 10;\n\n if (delta < 0) {\n zoom = zoom / (1 - zoom);\n }\n\n scale *= 1 + zoom; // calculate the pointer location\n\n var pointer = this.getPointer({\n x: event.clientX,\n y: event.clientY\n }); // apply the new scale\n\n this.zoom(scale, pointer);\n } // Prevent default actions caused by mouse wheel.\n\n\n event.preventDefault();\n }\n }\n /**\n * Mouse move handler for checking whether the title moves over a node with a title.\n * @param {Event} event\n * @private\n */\n\n }, {\n key: 'onMouseMove',\n value: function onMouseMove(event) {\n var _this3 = this;\n\n var pointer = this.getPointer({\n x: event.clientX,\n y: event.clientY\n });\n var popupVisible = false; // check if the previously selected node is still selected\n\n if (this.popup !== undefined) {\n if (this.popup.hidden === false) {\n this._checkHidePopup(pointer);\n } // if the popup was not hidden above\n\n\n if (this.popup.hidden === false) {\n popupVisible = true;\n this.popup.setPosition(pointer.x + 3, pointer.y - 5);\n this.popup.show();\n }\n } // if we bind the keyboard to the div, we have to highlight it to use it. This highlights it on mouse over.\n\n\n if (this.options.keyboard.bindToWindow === false && this.options.keyboard.enabled === true) {\n this.canvas.frame.focus();\n } // start a timeout that will check if the mouse is positioned above an element\n\n\n if (popupVisible === false) {\n if (this.popupTimer !== undefined) {\n clearInterval(this.popupTimer); // stop any running calculationTimer\n\n this.popupTimer = undefined;\n }\n\n if (!this.drag.dragging) {\n this.popupTimer = setTimeout(function () {\n return _this3._checkShowPopup(pointer);\n }, this.options.tooltipDelay);\n }\n }\n /**\n * Adding hover highlights\n */\n\n\n if (this.options.hover === true) {\n // adding hover highlights\n var obj = this.selectionHandler.getNodeAt(pointer);\n\n if (obj === undefined) {\n obj = this.selectionHandler.getEdgeAt(pointer);\n }\n\n this.selectionHandler.hoverObject(obj);\n }\n }\n /**\n * Check if there is an element on the given position in the network\n * (a node or edge). If so, and if this element has a title,\n * show a popup window with its title.\n *\n * @param {{x:Number, y:Number}} pointer\n * @private\n */\n\n }, {\n key: '_checkShowPopup',\n value: function _checkShowPopup(pointer) {\n var x = this.canvas._XconvertDOMtoCanvas(pointer.x);\n\n var y = this.canvas._YconvertDOMtoCanvas(pointer.y);\n\n var pointerObj = {\n left: x,\n top: y,\n right: x,\n bottom: y\n };\n var previousPopupObjId = this.popupObj === undefined ? undefined : this.popupObj.id;\n var nodeUnderCursor = false;\n var popupType = 'node'; // check if a node is under the cursor.\n\n if (this.popupObj === undefined) {\n // search the nodes for overlap, select the top one in case of multiple nodes\n var nodeIndices = this.body.nodeIndices;\n var nodes = this.body.nodes;\n var node = void 0;\n var overlappingNodes = [];\n\n for (var i = 0; i < nodeIndices.length; i++) {\n node = nodes[nodeIndices[i]];\n\n if (node.isOverlappingWith(pointerObj) === true) {\n if (node.getTitle() !== undefined) {\n overlappingNodes.push(nodeIndices[i]);\n }\n }\n }\n\n if (overlappingNodes.length > 0) {\n // if there are overlapping nodes, select the last one, this is the one which is drawn on top of the others\n this.popupObj = nodes[overlappingNodes[overlappingNodes.length - 1]]; // if you hover over a node, the title of the edge is not supposed to be shown.\n\n nodeUnderCursor = true;\n }\n }\n\n if (this.popupObj === undefined && nodeUnderCursor === false) {\n // search the edges for overlap\n var edgeIndices = this.body.edgeIndices;\n var edges = this.body.edges;\n var edge = void 0;\n var overlappingEdges = [];\n\n for (var _i4 = 0; _i4 < edgeIndices.length; _i4++) {\n edge = edges[edgeIndices[_i4]];\n\n if (edge.isOverlappingWith(pointerObj) === true) {\n if (edge.connected === true && edge.getTitle() !== undefined) {\n overlappingEdges.push(edgeIndices[_i4]);\n }\n }\n }\n\n if (overlappingEdges.length > 0) {\n this.popupObj = edges[overlappingEdges[overlappingEdges.length - 1]];\n popupType = 'edge';\n }\n }\n\n if (this.popupObj !== undefined) {\n // show popup message window\n if (this.popupObj.id !== previousPopupObjId) {\n if (this.popup === undefined) {\n this.popup = new _Popup2['default'](this.canvas.frame);\n }\n\n this.popup.popupTargetType = popupType;\n this.popup.popupTargetId = this.popupObj.id; // adjust a small offset such that the mouse cursor is located in the\n // bottom left location of the popup, and you can easily move over the\n // popup area\n\n this.popup.setPosition(pointer.x + 3, pointer.y - 5);\n this.popup.setText(this.popupObj.getTitle());\n this.popup.show();\n this.body.emitter.emit('showPopup', this.popupObj.id);\n }\n } else {\n if (this.popup !== undefined) {\n this.popup.hide();\n this.body.emitter.emit('hidePopup');\n }\n }\n }\n /**\n * Check if the popup must be hidden, which is the case when the mouse is no\n * longer hovering on the object\n * @param {{x:Number, y:Number}} pointer\n * @private\n */\n\n }, {\n key: '_checkHidePopup',\n value: function _checkHidePopup(pointer) {\n var pointerObj = this.selectionHandler._pointerToPositionObject(pointer);\n\n var stillOnObj = false;\n\n if (this.popup.popupTargetType === 'node') {\n if (this.body.nodes[this.popup.popupTargetId] !== undefined) {\n stillOnObj = this.body.nodes[this.popup.popupTargetId].isOverlappingWith(pointerObj); // if the mouse is still one the node, we have to check if it is not also on one that is drawn on top of it.\n // we initially only check stillOnObj because this is much faster.\n\n if (stillOnObj === true) {\n var overNode = this.selectionHandler.getNodeAt(pointer);\n stillOnObj = overNode === undefined ? false : overNode.id === this.popup.popupTargetId;\n }\n }\n } else {\n if (this.selectionHandler.getNodeAt(pointer) === undefined) {\n if (this.body.edges[this.popup.popupTargetId] !== undefined) {\n stillOnObj = this.body.edges[this.popup.popupTargetId].isOverlappingWith(pointerObj);\n }\n }\n }\n\n if (stillOnObj === false) {\n this.popupObj = undefined;\n this.popup.hide();\n this.body.emitter.emit('hidePopup');\n }\n }\n }]);\n return InteractionHandler;\n }();\n\n exports['default'] = InteractionHandler;\n /***/\n },\n /* 220 */\n\n /***/\n function (module, exports, __webpack_require__) {\n 'use strict';\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n\n var _classCallCheck2 = __webpack_require__(119);\n\n var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\n var _createClass2 = __webpack_require__(120);\n\n var _createClass3 = _interopRequireDefault(_createClass2);\n\n function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n 'default': obj\n };\n }\n\n var util = __webpack_require__(1);\n\n var Hammer = __webpack_require__(112);\n\n var hammerUtil = __webpack_require__(125);\n\n var keycharm = __webpack_require__(115);\n\n var NavigationHandler = function () {\n function NavigationHandler(body, canvas) {\n var _this = this;\n\n (0, _classCallCheck3['default'])(this, NavigationHandler);\n this.body = body;\n this.canvas = canvas;\n this.iconsCreated = false;\n this.navigationHammers = [];\n this.boundFunctions = {};\n this.touchTime = 0;\n this.activated = false;\n this.body.emitter.on(\"activate\", function () {\n _this.activated = true;\n\n _this.configureKeyboardBindings();\n });\n this.body.emitter.on(\"deactivate\", function () {\n _this.activated = false;\n\n _this.configureKeyboardBindings();\n });\n this.body.emitter.on(\"destroy\", function () {\n if (_this.keycharm !== undefined) {\n _this.keycharm.destroy();\n }\n });\n this.options = {};\n }\n\n (0, _createClass3['default'])(NavigationHandler, [{\n key: 'setOptions',\n value: function setOptions(options) {\n if (options !== undefined) {\n this.options = options;\n this.create();\n }\n }\n }, {\n key: 'create',\n value: function create() {\n if (this.options.navigationButtons === true) {\n if (this.iconsCreated === false) {\n this.loadNavigationElements();\n }\n } else if (this.iconsCreated === true) {\n this.cleanNavigation();\n }\n\n this.configureKeyboardBindings();\n }\n }, {\n key: 'cleanNavigation',\n value: function cleanNavigation() {\n // clean hammer bindings\n if (this.navigationHammers.length != 0) {\n for (var i = 0; i < this.navigationHammers.length; i++) {\n this.navigationHammers[i].destroy();\n }\n\n this.navigationHammers = [];\n } // clean up previous navigation items\n\n\n if (this.navigationDOM && this.navigationDOM['wrapper'] && this.navigationDOM['wrapper'].parentNode) {\n this.navigationDOM['wrapper'].parentNode.removeChild(this.navigationDOM['wrapper']);\n }\n\n this.iconsCreated = false;\n }\n /**\n * Creation of the navigation controls nodes. They are drawn over the rest of the nodes and are not affected by scale and translation\n * they have a triggerFunction which is called on click. If the position of the navigation controls is dependent\n * on this.frame.canvas.clientWidth or this.frame.canvas.clientHeight, we flag horizontalAlignLeft and verticalAlignTop false.\n * This means that the location will be corrected by the _relocateNavigation function on a size change of the canvas.\n *\n * @private\n */\n\n }, {\n key: 'loadNavigationElements',\n value: function loadNavigationElements() {\n var _this2 = this;\n\n this.cleanNavigation();\n this.navigationDOM = {};\n var navigationDivs = ['up', 'down', 'left', 'right', 'zoomIn', 'zoomOut', 'zoomExtends'];\n var navigationDivActions = ['_moveUp', '_moveDown', '_moveLeft', '_moveRight', '_zoomIn', '_zoomOut', '_fit'];\n this.navigationDOM['wrapper'] = document.createElement('div');\n this.navigationDOM['wrapper'].className = 'vis-navigation';\n this.canvas.frame.appendChild(this.navigationDOM['wrapper']);\n\n for (var i = 0; i < navigationDivs.length; i++) {\n this.navigationDOM[navigationDivs[i]] = document.createElement('div');\n this.navigationDOM[navigationDivs[i]].className = 'vis-button vis-' + navigationDivs[i];\n this.navigationDOM['wrapper'].appendChild(this.navigationDOM[navigationDivs[i]]);\n var hammer = new Hammer(this.navigationDOM[navigationDivs[i]]);\n\n if (navigationDivActions[i] === \"_fit\") {\n hammerUtil.onTouch(hammer, this._fit.bind(this));\n } else {\n hammerUtil.onTouch(hammer, this.bindToRedraw.bind(this, navigationDivActions[i]));\n }\n\n this.navigationHammers.push(hammer);\n } // use a hammer for the release so we do not require the one used in the rest of the network\n // the one the rest uses can be overloaded by the manipulation system.\n\n\n var hammerFrame = new Hammer(this.canvas.frame);\n hammerUtil.onRelease(hammerFrame, function () {\n _this2._stopMovement();\n });\n this.navigationHammers.push(hammerFrame);\n this.iconsCreated = true;\n }\n }, {\n key: 'bindToRedraw',\n value: function bindToRedraw(action) {\n if (this.boundFunctions[action] === undefined) {\n this.boundFunctions[action] = this[action].bind(this);\n this.body.emitter.on(\"initRedraw\", this.boundFunctions[action]);\n this.body.emitter.emit(\"_startRendering\");\n }\n }\n }, {\n key: 'unbindFromRedraw',\n value: function unbindFromRedraw(action) {\n if (this.boundFunctions[action] !== undefined) {\n this.body.emitter.off(\"initRedraw\", this.boundFunctions[action]);\n this.body.emitter.emit(\"_stopRendering\");\n delete this.boundFunctions[action];\n }\n }\n /**\n * this stops all movement induced by the navigation buttons\n *\n * @private\n */\n\n }, {\n key: '_fit',\n value: function _fit() {\n if (new Date().valueOf() - this.touchTime > 700) {\n // TODO: fix ugly hack to avoid hammer's double fireing of event (because we use release?)\n this.body.emitter.emit(\"fit\", {\n duration: 700\n });\n this.touchTime = new Date().valueOf();\n }\n }\n /**\n * this stops all movement induced by the navigation buttons\n *\n * @private\n */\n\n }, {\n key: '_stopMovement',\n value: function _stopMovement() {\n for (var boundAction in this.boundFunctions) {\n if (this.boundFunctions.hasOwnProperty(boundAction)) {\n this.body.emitter.off(\"initRedraw\", this.boundFunctions[boundAction]);\n this.body.emitter.emit(\"_stopRendering\");\n }\n }\n\n this.boundFunctions = {};\n }\n }, {\n key: '_moveUp',\n value: function _moveUp() {\n this.body.view.translation.y += this.options.keyboard.speed.y;\n }\n }, {\n key: '_moveDown',\n value: function _moveDown() {\n this.body.view.translation.y -= this.options.keyboard.speed.y;\n }\n }, {\n key: '_moveLeft',\n value: function _moveLeft() {\n this.body.view.translation.x += this.options.keyboard.speed.x;\n }\n }, {\n key: '_moveRight',\n value: function _moveRight() {\n this.body.view.translation.x -= this.options.keyboard.speed.x;\n }\n }, {\n key: '_zoomIn',\n value: function _zoomIn() {\n var scaleOld = this.body.view.scale;\n var scale = this.body.view.scale * (1 + this.options.keyboard.speed.zoom);\n var translation = this.body.view.translation;\n var scaleFrac = scale / scaleOld;\n var tx = (1 - scaleFrac) * this.canvas.canvasViewCenter.x + translation.x * scaleFrac;\n var ty = (1 - scaleFrac) * this.canvas.canvasViewCenter.y + translation.y * scaleFrac;\n this.body.view.scale = scale;\n this.body.view.translation = {\n x: tx,\n y: ty\n };\n this.body.emitter.emit('zoom', {\n direction: '+',\n scale: this.body.view.scale,\n pointer: null\n });\n }\n }, {\n key: '_zoomOut',\n value: function _zoomOut() {\n var scaleOld = this.body.view.scale;\n var scale = this.body.view.scale / (1 + this.options.keyboard.speed.zoom);\n var translation = this.body.view.translation;\n var scaleFrac = scale / scaleOld;\n var tx = (1 - scaleFrac) * this.canvas.canvasViewCenter.x + translation.x * scaleFrac;\n var ty = (1 - scaleFrac) * this.canvas.canvasViewCenter.y + translation.y * scaleFrac;\n this.body.view.scale = scale;\n this.body.view.translation = {\n x: tx,\n y: ty\n };\n this.body.emitter.emit('zoom', {\n direction: '-',\n scale: this.body.view.scale,\n pointer: null\n });\n }\n /**\n * bind all keys using keycharm.\n */\n\n }, {\n key: 'configureKeyboardBindings',\n value: function configureKeyboardBindings() {\n var _this3 = this;\n\n if (this.keycharm !== undefined) {\n this.keycharm.destroy();\n }\n\n if (this.options.keyboard.enabled === true) {\n if (this.options.keyboard.bindToWindow === true) {\n this.keycharm = keycharm({\n container: window,\n preventDefault: true\n });\n } else {\n this.keycharm = keycharm({\n container: this.canvas.frame,\n preventDefault: true\n });\n }\n\n this.keycharm.reset();\n\n if (this.activated === true) {\n this.keycharm.bind(\"up\", function () {\n _this3.bindToRedraw(\"_moveUp\");\n }, \"keydown\");\n this.keycharm.bind(\"down\", function () {\n _this3.bindToRedraw(\"_moveDown\");\n }, \"keydown\");\n this.keycharm.bind(\"left\", function () {\n _this3.bindToRedraw(\"_moveLeft\");\n }, \"keydown\");\n this.keycharm.bind(\"right\", function () {\n _this3.bindToRedraw(\"_moveRight\");\n }, \"keydown\");\n this.keycharm.bind(\"=\", function () {\n _this3.bindToRedraw(\"_zoomIn\");\n }, \"keydown\");\n this.keycharm.bind(\"num+\", function () {\n _this3.bindToRedraw(\"_zoomIn\");\n }, \"keydown\");\n this.keycharm.bind(\"num-\", function () {\n _this3.bindToRedraw(\"_zoomOut\");\n }, \"keydown\");\n this.keycharm.bind(\"-\", function () {\n _this3.bindToRedraw(\"_zoomOut\");\n }, \"keydown\");\n this.keycharm.bind(\"[\", function () {\n _this3.bindToRedraw(\"_zoomOut\");\n }, \"keydown\");\n this.keycharm.bind(\"]\", function () {\n _this3.bindToRedraw(\"_zoomIn\");\n }, \"keydown\");\n this.keycharm.bind(\"pageup\", function () {\n _this3.bindToRedraw(\"_zoomIn\");\n }, \"keydown\");\n this.keycharm.bind(\"pagedown\", function () {\n _this3.bindToRedraw(\"_zoomOut\");\n }, \"keydown\");\n this.keycharm.bind(\"up\", function () {\n _this3.unbindFromRedraw(\"_moveUp\");\n }, \"keyup\");\n this.keycharm.bind(\"down\", function () {\n _this3.unbindFromRedraw(\"_moveDown\");\n }, \"keyup\");\n this.keycharm.bind(\"left\", function () {\n _this3.unbindFromRedraw(\"_moveLeft\");\n }, \"keyup\");\n this.keycharm.bind(\"right\", function () {\n _this3.unbindFromRedraw(\"_moveRight\");\n }, \"keyup\");\n this.keycharm.bind(\"=\", function () {\n _this3.unbindFromRedraw(\"_zoomIn\");\n }, \"keyup\");\n this.keycharm.bind(\"num+\", function () {\n _this3.unbindFromRedraw(\"_zoomIn\");\n }, \"keyup\");\n this.keycharm.bind(\"num-\", function () {\n _this3.unbindFromRedraw(\"_zoomOut\");\n }, \"keyup\");\n this.keycharm.bind(\"-\", function () {\n _this3.unbindFromRedraw(\"_zoomOut\");\n }, \"keyup\");\n this.keycharm.bind(\"[\", function () {\n _this3.unbindFromRedraw(\"_zoomOut\");\n }, \"keyup\");\n this.keycharm.bind(\"]\", function () {\n _this3.unbindFromRedraw(\"_zoomIn\");\n }, \"keyup\");\n this.keycharm.bind(\"pageup\", function () {\n _this3.unbindFromRedraw(\"_zoomIn\");\n }, \"keyup\");\n this.keycharm.bind(\"pagedown\", function () {\n _this3.unbindFromRedraw(\"_zoomOut\");\n }, \"keyup\");\n }\n }\n }\n }]);\n return NavigationHandler;\n }();\n\n exports['default'] = NavigationHandler;\n /***/\n },\n /* 221 */\n\n /***/\n function (module, exports, __webpack_require__) {\n 'use strict';\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n\n var _classCallCheck2 = __webpack_require__(119);\n\n var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\n var _createClass2 = __webpack_require__(120);\n\n var _createClass3 = _interopRequireDefault(_createClass2);\n\n var _Node = __webpack_require__(163);\n\n var _Node2 = _interopRequireDefault(_Node);\n\n var _Edge = __webpack_require__(196);\n\n var _Edge2 = _interopRequireDefault(_Edge);\n\n function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n 'default': obj\n };\n }\n\n var util = __webpack_require__(1);\n\n var SelectionHandler = function () {\n function SelectionHandler(body, canvas) {\n var _this = this;\n\n (0, _classCallCheck3['default'])(this, SelectionHandler);\n this.body = body;\n this.canvas = canvas;\n this.selectionObj = {\n nodes: [],\n edges: []\n };\n this.hoverObj = {\n nodes: {},\n edges: {}\n };\n this.options = {};\n this.defaultOptions = {\n multiselect: false,\n selectable: true,\n selectConnectedEdges: true,\n hoverConnectedEdges: true\n };\n util.extend(this.options, this.defaultOptions);\n this.body.emitter.on(\"_dataChanged\", function () {\n _this.updateSelection();\n });\n }\n\n (0, _createClass3['default'])(SelectionHandler, [{\n key: 'setOptions',\n value: function setOptions(options) {\n if (options !== undefined) {\n var fields = ['multiselect', 'hoverConnectedEdges', 'selectable', 'selectConnectedEdges'];\n util.selectiveDeepExtend(fields, this.options, options);\n }\n }\n /**\n * handles the selection part of the tap;\n *\n * @param {Object} pointer\n * @private\n */\n\n }, {\n key: 'selectOnPoint',\n value: function selectOnPoint(pointer) {\n var selected = false;\n\n if (this.options.selectable === true) {\n var obj = this.getNodeAt(pointer) || this.getEdgeAt(pointer); // unselect after getting the objects in order to restore width and height.\n\n this.unselectAll();\n\n if (obj !== undefined) {\n selected = this.selectObject(obj);\n }\n\n this.body.emitter.emit(\"_requestRedraw\");\n }\n\n return selected;\n }\n }, {\n key: 'selectAdditionalOnPoint',\n value: function selectAdditionalOnPoint(pointer) {\n var selectionChanged = false;\n\n if (this.options.selectable === true) {\n var obj = this.getNodeAt(pointer) || this.getEdgeAt(pointer);\n\n if (obj !== undefined) {\n selectionChanged = true;\n\n if (obj.isSelected() === true) {\n this.deselectObject(obj);\n } else {\n this.selectObject(obj);\n }\n\n this.body.emitter.emit(\"_requestRedraw\");\n }\n }\n\n return selectionChanged;\n }\n }, {\n key: '_generateClickEvent',\n value: function _generateClickEvent(eventType, event, pointer, oldSelection) {\n var emptySelection = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;\n var properties = void 0;\n\n if (emptySelection === true) {\n properties = {\n nodes: [],\n edges: []\n };\n } else {\n properties = this.getSelection();\n }\n\n properties['pointer'] = {\n DOM: {\n x: pointer.x,\n y: pointer.y\n },\n canvas: this.canvas.DOMtoCanvas(pointer)\n };\n properties['event'] = event;\n\n if (oldSelection !== undefined) {\n properties['previousSelection'] = oldSelection;\n }\n\n this.body.emitter.emit(eventType, properties);\n }\n }, {\n key: 'selectObject',\n value: function selectObject(obj) {\n var highlightEdges = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.options.selectConnectedEdges;\n\n if (obj !== undefined) {\n if (obj instanceof _Node2['default']) {\n if (highlightEdges === true) {\n this._selectConnectedEdges(obj);\n }\n }\n\n obj.select();\n\n this._addToSelection(obj);\n\n return true;\n }\n\n return false;\n }\n }, {\n key: 'deselectObject',\n value: function deselectObject(obj) {\n if (obj.isSelected() === true) {\n obj.selected = false;\n\n this._removeFromSelection(obj);\n }\n }\n /**\n * retrieve all nodes overlapping with given object\n * @param {Object} object An object with parameters left, top, right, bottom\n * @return {Number[]} An array with id's of the overlapping nodes\n * @private\n */\n\n }, {\n key: '_getAllNodesOverlappingWith',\n value: function _getAllNodesOverlappingWith(object) {\n var overlappingNodes = [];\n var nodes = this.body.nodes;\n\n for (var i = 0; i < this.body.nodeIndices.length; i++) {\n var nodeId = this.body.nodeIndices[i];\n\n if (nodes[nodeId].isOverlappingWith(object)) {\n overlappingNodes.push(nodeId);\n }\n }\n\n return overlappingNodes;\n }\n /**\n * Return a position object in canvasspace from a single point in screenspace\n *\n * @param pointer\n * @returns {{left: number, top: number, right: number, bottom: number}}\n * @private\n */\n\n }, {\n key: '_pointerToPositionObject',\n value: function _pointerToPositionObject(pointer) {\n var canvasPos = this.canvas.DOMtoCanvas(pointer);\n return {\n left: canvasPos.x - 1,\n top: canvasPos.y + 1,\n right: canvasPos.x + 1,\n bottom: canvasPos.y - 1\n };\n }\n /**\n * Get the top node at the a specific point (like a click)\n *\n * @param {{x: Number, y: Number}} pointer\n * @return {Node | undefined} node\n */\n\n }, {\n key: 'getNodeAt',\n value: function getNodeAt(pointer) {\n var returnNode = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; // we first check if this is an navigation controls element\n\n var positionObject = this._pointerToPositionObject(pointer);\n\n var overlappingNodes = this._getAllNodesOverlappingWith(positionObject); // if there are overlapping nodes, select the last one, this is the\n // one which is drawn on top of the others\n\n\n if (overlappingNodes.length > 0) {\n if (returnNode === true) {\n return this.body.nodes[overlappingNodes[overlappingNodes.length - 1]];\n } else {\n return overlappingNodes[overlappingNodes.length - 1];\n }\n } else {\n return undefined;\n }\n }\n /**\n * retrieve all edges overlapping with given object, selector is around center\n * @param {Object} object An object with parameters left, top, right, bottom\n * @return {Number[]} An array with id's of the overlapping nodes\n * @private\n */\n\n }, {\n key: '_getEdgesOverlappingWith',\n value: function _getEdgesOverlappingWith(object, overlappingEdges) {\n var edges = this.body.edges;\n\n for (var i = 0; i < this.body.edgeIndices.length; i++) {\n var edgeId = this.body.edgeIndices[i];\n\n if (edges[edgeId].isOverlappingWith(object)) {\n overlappingEdges.push(edgeId);\n }\n }\n }\n /**\n * retrieve all nodes overlapping with given object\n * @param {Object} object An object with parameters left, top, right, bottom\n * @return {Number[]} An array with id's of the overlapping nodes\n * @private\n */\n\n }, {\n key: '_getAllEdgesOverlappingWith',\n value: function _getAllEdgesOverlappingWith(object) {\n var overlappingEdges = [];\n\n this._getEdgesOverlappingWith(object, overlappingEdges);\n\n return overlappingEdges;\n }\n /**\n * Place holder. To implement change the getNodeAt to a _getObjectAt. Have the _getObjectAt call\n * getNodeAt and _getEdgesAt, then priortize the selection to user preferences.\n *\n * @param pointer\n * @returns {undefined}\n */\n\n }, {\n key: 'getEdgeAt',\n value: function getEdgeAt(pointer) {\n var returnEdge = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; // Iterate over edges, pick closest within 10\n\n var canvasPos = this.canvas.DOMtoCanvas(pointer);\n var mindist = 10;\n var overlappingEdge = null;\n var edges = this.body.edges;\n\n for (var i = 0; i < this.body.edgeIndices.length; i++) {\n var edgeId = this.body.edgeIndices[i];\n var edge = edges[edgeId];\n\n if (edge.connected) {\n var xFrom = edge.from.x;\n var yFrom = edge.from.y;\n var xTo = edge.to.x;\n var yTo = edge.to.y;\n var dist = edge.edgeType.getDistanceToEdge(xFrom, yFrom, xTo, yTo, canvasPos.x, canvasPos.y);\n\n if (dist < mindist) {\n overlappingEdge = edgeId;\n mindist = dist;\n }\n }\n }\n\n if (overlappingEdge) {\n if (returnEdge === true) {\n return this.body.edges[overlappingEdge];\n } else {\n return overlappingEdge;\n }\n } else {\n return undefined;\n }\n }\n /**\n * Add object to the selection array.\n *\n * @param obj\n * @private\n */\n\n }, {\n key: '_addToSelection',\n value: function _addToSelection(obj) {\n if (obj instanceof _Node2['default']) {\n this.selectionObj.nodes[obj.id] = obj;\n } else {\n this.selectionObj.edges[obj.id] = obj;\n }\n }\n /**\n * Add object to the selection array.\n *\n * @param obj\n * @private\n */\n\n }, {\n key: '_addToHover',\n value: function _addToHover(obj) {\n if (obj instanceof _Node2['default']) {\n this.hoverObj.nodes[obj.id] = obj;\n } else {\n this.hoverObj.edges[obj.id] = obj;\n }\n }\n /**\n * Remove a single option from selection.\n *\n * @param {Object} obj\n * @private\n */\n\n }, {\n key: '_removeFromSelection',\n value: function _removeFromSelection(obj) {\n if (obj instanceof _Node2['default']) {\n delete this.selectionObj.nodes[obj.id];\n\n this._unselectConnectedEdges(obj);\n } else {\n delete this.selectionObj.edges[obj.id];\n }\n }\n /**\n * Unselect all. The selectionObj is useful for this.\n */\n\n }, {\n key: 'unselectAll',\n value: function unselectAll() {\n for (var nodeId in this.selectionObj.nodes) {\n if (this.selectionObj.nodes.hasOwnProperty(nodeId)) {\n this.selectionObj.nodes[nodeId].unselect();\n }\n }\n\n for (var edgeId in this.selectionObj.edges) {\n if (this.selectionObj.edges.hasOwnProperty(edgeId)) {\n this.selectionObj.edges[edgeId].unselect();\n }\n }\n\n this.selectionObj = {\n nodes: {},\n edges: {}\n };\n }\n /**\n * return the number of selected nodes\n *\n * @returns {number}\n * @private\n */\n\n }, {\n key: '_getSelectedNodeCount',\n value: function _getSelectedNodeCount() {\n var count = 0;\n\n for (var nodeId in this.selectionObj.nodes) {\n if (this.selectionObj.nodes.hasOwnProperty(nodeId)) {\n count += 1;\n }\n }\n\n return count;\n }\n /**\n * return the selected node\n *\n * @returns {number}\n * @private\n */\n\n }, {\n key: '_getSelectedNode',\n value: function _getSelectedNode() {\n for (var nodeId in this.selectionObj.nodes) {\n if (this.selectionObj.nodes.hasOwnProperty(nodeId)) {\n return this.selectionObj.nodes[nodeId];\n }\n }\n\n return undefined;\n }\n /**\n * return the selected edge\n *\n * @returns {number}\n * @private\n */\n\n }, {\n key: '_getSelectedEdge',\n value: function _getSelectedEdge() {\n for (var edgeId in this.selectionObj.edges) {\n if (this.selectionObj.edges.hasOwnProperty(edgeId)) {\n return this.selectionObj.edges[edgeId];\n }\n }\n\n return undefined;\n }\n /**\n * return the number of selected edges\n *\n * @returns {number}\n * @private\n */\n\n }, {\n key: '_getSelectedEdgeCount',\n value: function _getSelectedEdgeCount() {\n var count = 0;\n\n for (var edgeId in this.selectionObj.edges) {\n if (this.selectionObj.edges.hasOwnProperty(edgeId)) {\n count += 1;\n }\n }\n\n return count;\n }\n /**\n * return the number of selected objects.\n *\n * @returns {number}\n * @private\n */\n\n }, {\n key: '_getSelectedObjectCount',\n value: function _getSelectedObjectCount() {\n var count = 0;\n\n for (var nodeId in this.selectionObj.nodes) {\n if (this.selectionObj.nodes.hasOwnProperty(nodeId)) {\n count += 1;\n }\n }\n\n for (var edgeId in this.selectionObj.edges) {\n if (this.selectionObj.edges.hasOwnProperty(edgeId)) {\n count += 1;\n }\n }\n\n return count;\n }\n /**\n * Check if anything is selected\n *\n * @returns {boolean}\n * @private\n */\n\n }, {\n key: '_selectionIsEmpty',\n value: function _selectionIsEmpty() {\n for (var nodeId in this.selectionObj.nodes) {\n if (this.selectionObj.nodes.hasOwnProperty(nodeId)) {\n return false;\n }\n }\n\n for (var edgeId in this.selectionObj.edges) {\n if (this.selectionObj.edges.hasOwnProperty(edgeId)) {\n return false;\n }\n }\n\n return true;\n }\n /**\n * check if one of the selected nodes is a cluster.\n *\n * @returns {boolean}\n * @private\n */\n\n }, {\n key: '_clusterInSelection',\n value: function _clusterInSelection() {\n for (var nodeId in this.selectionObj.nodes) {\n if (this.selectionObj.nodes.hasOwnProperty(nodeId)) {\n if (this.selectionObj.nodes[nodeId].clusterSize > 1) {\n return true;\n }\n }\n }\n\n return false;\n }\n /**\n * select the edges connected to the node that is being selected\n *\n * @param {Node} node\n * @private\n */\n\n }, {\n key: '_selectConnectedEdges',\n value: function _selectConnectedEdges(node) {\n for (var i = 0; i < node.edges.length; i++) {\n var edge = node.edges[i];\n edge.select();\n\n this._addToSelection(edge);\n }\n }\n /**\n * select the edges connected to the node that is being selected\n *\n * @param {Node} node\n * @private\n */\n\n }, {\n key: '_hoverConnectedEdges',\n value: function _hoverConnectedEdges(node) {\n for (var i = 0; i < node.edges.length; i++) {\n var edge = node.edges[i];\n edge.hover = true;\n\n this._addToHover(edge);\n }\n }\n /**\n * unselect the edges connected to the node that is being selected\n *\n * @param {Node} node\n * @private\n */\n\n }, {\n key: '_unselectConnectedEdges',\n value: function _unselectConnectedEdges(node) {\n for (var i = 0; i < node.edges.length; i++) {\n var edge = node.edges[i];\n edge.unselect();\n\n this._removeFromSelection(edge);\n }\n }\n /**\n * This is called when someone clicks on a node. either select or deselect it.\n * If there is an existing selection and we don't want to append to it, clear the existing selection\n *\n * @param {Node || Edge} object\n * @private\n */\n\n }, {\n key: 'blurObject',\n value: function blurObject(object) {\n if (object.hover === true) {\n object.hover = false;\n\n if (object instanceof _Node2['default']) {\n this.body.emitter.emit(\"blurNode\", {\n node: object.id\n });\n } else {\n this.body.emitter.emit(\"blurEdge\", {\n edge: object.id\n });\n }\n }\n }\n /**\n * This is called when someone clicks on a node. either select or deselect it.\n * If there is an existing selection and we don't want to append to it, clear the existing selection\n *\n * @param {Node || Edge} object\n * @private\n */\n\n }, {\n key: 'hoverObject',\n value: function hoverObject(object) {\n var hoverChanged = false; // remove all node hover highlights\n\n for (var nodeId in this.hoverObj.nodes) {\n if (this.hoverObj.nodes.hasOwnProperty(nodeId)) {\n if (object === undefined || object instanceof _Node2['default'] && object.id != nodeId || object instanceof _Edge2['default']) {\n this.blurObject(this.hoverObj.nodes[nodeId]);\n delete this.hoverObj.nodes[nodeId];\n hoverChanged = true;\n }\n }\n } // removing all edge hover highlights\n\n\n for (var edgeId in this.hoverObj.edges) {\n if (this.hoverObj.edges.hasOwnProperty(edgeId)) {\n // if the hover has been changed here it means that the node has been hovered over or off\n // we then do not use the blurObject method here.\n if (hoverChanged === true) {\n this.hoverObj.edges[edgeId].hover = false;\n delete this.hoverObj.edges[edgeId];\n } // if the blur remains the same and the object is undefined (mouse off) or another\n // edge has been hovered, or another node has been hovered we blur the edge.\n else if (object === undefined || object instanceof _Edge2['default'] && object.id != edgeId || object instanceof _Node2['default'] && !object.hover) {\n this.blurObject(this.hoverObj.edges[edgeId]);\n delete this.hoverObj.edges[edgeId];\n hoverChanged = true;\n }\n }\n }\n\n if (object !== undefined) {\n if (object.hover === false) {\n object.hover = true;\n\n this._addToHover(object);\n\n hoverChanged = true;\n\n if (object instanceof _Node2['default']) {\n this.body.emitter.emit(\"hoverNode\", {\n node: object.id\n });\n } else {\n this.body.emitter.emit(\"hoverEdge\", {\n edge: object.id\n });\n }\n }\n\n if (object instanceof _Node2['default'] && this.options.hoverConnectedEdges === true) {\n this._hoverConnectedEdges(object);\n }\n }\n\n if (hoverChanged === true) {\n this.body.emitter.emit('_requestRedraw');\n }\n }\n /**\n *\n * retrieve the currently selected objects\n * @return {{nodes: Array., edges: Array.}} selection\n */\n\n }, {\n key: 'getSelection',\n value: function getSelection() {\n var nodeIds = this.getSelectedNodes();\n var edgeIds = this.getSelectedEdges();\n return {\n nodes: nodeIds,\n edges: edgeIds\n };\n }\n /**\n *\n * retrieve the currently selected nodes\n * @return {String[]} selection An array with the ids of the\n * selected nodes.\n */\n\n }, {\n key: 'getSelectedNodes',\n value: function getSelectedNodes() {\n var idArray = [];\n\n if (this.options.selectable === true) {\n for (var nodeId in this.selectionObj.nodes) {\n if (this.selectionObj.nodes.hasOwnProperty(nodeId)) {\n idArray.push(this.selectionObj.nodes[nodeId].id);\n }\n }\n }\n\n return idArray;\n }\n /**\n *\n * retrieve the currently selected edges\n * @return {Array} selection An array with the ids of the\n * selected nodes.\n */\n\n }, {\n key: 'getSelectedEdges',\n value: function getSelectedEdges() {\n var idArray = [];\n\n if (this.options.selectable === true) {\n for (var edgeId in this.selectionObj.edges) {\n if (this.selectionObj.edges.hasOwnProperty(edgeId)) {\n idArray.push(this.selectionObj.edges[edgeId].id);\n }\n }\n }\n\n return idArray;\n }\n /**\n * Updates the current selection\n * @param {{nodes: Array., edges: Array.}} Selection\n * @param {Object} options Options\n */\n\n }, {\n key: 'setSelection',\n value: function setSelection(selection) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var i = void 0,\n id = void 0;\n if (!selection || !selection.nodes && !selection.edges) throw 'Selection must be an object with nodes and/or edges properties'; // first unselect any selected node, if option is true or undefined\n\n if (options.unselectAll || options.unselectAll === undefined) {\n this.unselectAll();\n }\n\n if (selection.nodes) {\n for (i = 0; i < selection.nodes.length; i++) {\n id = selection.nodes[i];\n var node = this.body.nodes[id];\n\n if (!node) {\n throw new RangeError('Node with id \"' + id + '\" not found');\n } // don't select edges with it\n\n\n this.selectObject(node, options.highlightEdges);\n }\n }\n\n if (selection.edges) {\n for (i = 0; i < selection.edges.length; i++) {\n id = selection.edges[i];\n var edge = this.body.edges[id];\n\n if (!edge) {\n throw new RangeError('Edge with id \"' + id + '\" not found');\n }\n\n this.selectObject(edge);\n }\n }\n\n this.body.emitter.emit('_requestRedraw');\n }\n /**\n * select zero or more nodes with the option to highlight edges\n * @param {Number[] | String[]} selection An array with the ids of the\n * selected nodes.\n * @param {boolean} [highlightEdges]\n */\n\n }, {\n key: 'selectNodes',\n value: function selectNodes(selection) {\n var highlightEdges = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n if (!selection || selection.length === undefined) throw 'Selection must be an array with ids';\n this.setSelection({\n nodes: selection\n }, {\n highlightEdges: highlightEdges\n });\n }\n /**\n * select zero or more edges\n * @param {Number[] | String[]} selection An array with the ids of the\n * selected nodes.\n */\n\n }, {\n key: 'selectEdges',\n value: function selectEdges(selection) {\n if (!selection || selection.length === undefined) throw 'Selection must be an array with ids';\n this.setSelection({\n edges: selection\n });\n }\n /**\n * Validate the selection: remove ids of nodes which no longer exist\n * @private\n */\n\n }, {\n key: 'updateSelection',\n value: function updateSelection() {\n for (var nodeId in this.selectionObj.nodes) {\n if (this.selectionObj.nodes.hasOwnProperty(nodeId)) {\n if (!this.body.nodes.hasOwnProperty(nodeId)) {\n delete this.selectionObj.nodes[nodeId];\n }\n }\n }\n\n for (var edgeId in this.selectionObj.edges) {\n if (this.selectionObj.edges.hasOwnProperty(edgeId)) {\n if (!this.body.edges.hasOwnProperty(edgeId)) {\n delete this.selectionObj.edges[edgeId];\n }\n }\n }\n }\n }]);\n return SelectionHandler;\n }();\n\n exports['default'] = SelectionHandler;\n /***/\n },\n /* 222 */\n\n /***/\n function (module, exports, __webpack_require__) {\n 'use strict';\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n\n var _keys = __webpack_require__(58);\n\n var _keys2 = _interopRequireDefault(_keys);\n\n var _slicedToArray2 = __webpack_require__(165);\n\n var _slicedToArray3 = _interopRequireDefault(_slicedToArray2);\n\n var _typeof2 = __webpack_require__(62);\n\n var _typeof3 = _interopRequireDefault(_typeof2);\n\n var _classCallCheck2 = __webpack_require__(119);\n\n var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\n var _createClass2 = __webpack_require__(120);\n\n var _createClass3 = _interopRequireDefault(_createClass2);\n\n var _NetworkUtil = __webpack_require__(214);\n\n var _NetworkUtil2 = _interopRequireDefault(_NetworkUtil);\n\n function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n 'default': obj\n };\n }\n\n var util = __webpack_require__(1);\n\n var LayoutEngine = function () {\n function LayoutEngine(body) {\n (0, _classCallCheck3['default'])(this, LayoutEngine);\n this.body = body;\n this.initialRandomSeed = Math.round(Math.random() * 1000000);\n this.randomSeed = this.initialRandomSeed;\n this.setPhysics = false;\n this.options = {};\n this.optionsBackup = {\n physics: {}\n };\n this.defaultOptions = {\n randomSeed: undefined,\n improvedLayout: true,\n hierarchical: {\n enabled: false,\n levelSeparation: 150,\n nodeSpacing: 100,\n treeSpacing: 200,\n blockShifting: true,\n edgeMinimization: true,\n parentCentralization: true,\n direction: 'UD',\n // UD, DU, LR, RL\n sortMethod: 'hubsize' // hubsize, directed\n\n }\n };\n util.extend(this.options, this.defaultOptions);\n this.bindEventListeners();\n }\n\n (0, _createClass3['default'])(LayoutEngine, [{\n key: 'bindEventListeners',\n value: function bindEventListeners() {\n var _this = this;\n\n this.body.emitter.on('_dataChanged', function () {\n _this.setupHierarchicalLayout();\n });\n this.body.emitter.on('_dataLoaded', function () {\n _this.layoutNetwork();\n });\n this.body.emitter.on('_resetHierarchicalLayout', function () {\n _this.setupHierarchicalLayout();\n });\n }\n }, {\n key: 'setOptions',\n value: function setOptions(options, allOptions) {\n if (options !== undefined) {\n var prevHierarchicalState = this.options.hierarchical.enabled;\n util.selectiveDeepExtend([\"randomSeed\", \"improvedLayout\"], this.options, options);\n util.mergeOptions(this.options, options, 'hierarchical');\n\n if (options.randomSeed !== undefined) {\n this.initialRandomSeed = options.randomSeed;\n }\n\n if (this.options.hierarchical.enabled === true) {\n if (prevHierarchicalState === true) {\n // refresh the overridden options for nodes and edges.\n this.body.emitter.emit('refresh', true);\n } // make sure the level separation is the right way up\n\n\n if (this.options.hierarchical.direction === 'RL' || this.options.hierarchical.direction === 'DU') {\n if (this.options.hierarchical.levelSeparation > 0) {\n this.options.hierarchical.levelSeparation *= -1;\n }\n } else {\n if (this.options.hierarchical.levelSeparation < 0) {\n this.options.hierarchical.levelSeparation *= -1;\n }\n }\n\n this.body.emitter.emit('_resetHierarchicalLayout'); // because the hierarchical system needs it's own physics and smooth curve settings, we adapt the other options if needed.\n\n return this.adaptAllOptionsForHierarchicalLayout(allOptions);\n } else {\n if (prevHierarchicalState === true) {\n // refresh the overridden options for nodes and edges.\n this.body.emitter.emit('refresh');\n return util.deepExtend(allOptions, this.optionsBackup);\n }\n }\n }\n\n return allOptions;\n }\n }, {\n key: 'adaptAllOptionsForHierarchicalLayout',\n value: function adaptAllOptionsForHierarchicalLayout(allOptions) {\n if (this.options.hierarchical.enabled === true) {\n // set the physics\n if (allOptions.physics === undefined || allOptions.physics === true) {\n allOptions.physics = {\n enabled: this.optionsBackup.physics.enabled === undefined ? true : this.optionsBackup.physics.enabled,\n solver: 'hierarchicalRepulsion'\n };\n this.optionsBackup.physics.enabled = this.optionsBackup.physics.enabled === undefined ? true : this.optionsBackup.physics.enabled;\n this.optionsBackup.physics.solver = this.optionsBackup.physics.solver || 'barnesHut';\n } else if ((0, _typeof3['default'])(allOptions.physics) === 'object') {\n this.optionsBackup.physics.enabled = allOptions.physics.enabled === undefined ? true : allOptions.physics.enabled;\n this.optionsBackup.physics.solver = allOptions.physics.solver || 'barnesHut';\n allOptions.physics.solver = 'hierarchicalRepulsion';\n } else if (allOptions.physics !== false) {\n this.optionsBackup.physics.solver = 'barnesHut';\n allOptions.physics = {\n solver: 'hierarchicalRepulsion'\n };\n } // get the type of static smooth curve in case it is required\n\n\n var type = 'horizontal';\n\n if (this.options.hierarchical.direction === 'RL' || this.options.hierarchical.direction === 'LR') {\n type = 'vertical';\n } // disable smooth curves if nothing is defined. If smooth curves have been turned on, turn them into static smooth curves.\n\n\n if (allOptions.edges === undefined) {\n this.optionsBackup.edges = {\n smooth: {\n enabled: true,\n type: 'dynamic'\n }\n };\n allOptions.edges = {\n smooth: false\n };\n } else if (allOptions.edges.smooth === undefined) {\n this.optionsBackup.edges = {\n smooth: {\n enabled: true,\n type: 'dynamic'\n }\n };\n allOptions.edges.smooth = false;\n } else {\n if (typeof allOptions.edges.smooth === 'boolean') {\n this.optionsBackup.edges = {\n smooth: allOptions.edges.smooth\n };\n allOptions.edges.smooth = {\n enabled: allOptions.edges.smooth,\n type: type\n };\n } else {\n // allow custom types except for dynamic\n if (allOptions.edges.smooth.type !== undefined && allOptions.edges.smooth.type !== 'dynamic') {\n type = allOptions.edges.smooth.type;\n }\n\n this.optionsBackup.edges = {\n smooth: allOptions.edges.smooth.enabled === undefined ? true : allOptions.edges.smooth.enabled,\n type: allOptions.edges.smooth.type === undefined ? 'dynamic' : allOptions.edges.smooth.type,\n roundness: allOptions.edges.smooth.roundness === undefined ? 0.5 : allOptions.edges.smooth.roundness,\n forceDirection: allOptions.edges.smooth.forceDirection === undefined ? false : allOptions.edges.smooth.forceDirection\n };\n allOptions.edges.smooth = {\n enabled: allOptions.edges.smooth.enabled === undefined ? true : allOptions.edges.smooth.enabled,\n type: type,\n roundness: allOptions.edges.smooth.roundness === undefined ? 0.5 : allOptions.edges.smooth.roundness,\n forceDirection: allOptions.edges.smooth.forceDirection === undefined ? false : allOptions.edges.smooth.forceDirection\n };\n }\n } // force all edges into static smooth curves. Only applies to edges that do not use the global options for smooth.\n\n\n this.body.emitter.emit('_forceDisableDynamicCurves', type);\n }\n\n return allOptions;\n }\n }, {\n key: 'seededRandom',\n value: function seededRandom() {\n var x = Math.sin(this.randomSeed++) * 10000;\n return x - Math.floor(x);\n }\n }, {\n key: 'positionInitially',\n value: function positionInitially(nodesArray) {\n if (this.options.hierarchical.enabled !== true) {\n this.randomSeed = this.initialRandomSeed;\n\n for (var i = 0; i < nodesArray.length; i++) {\n var node = nodesArray[i];\n var radius = 10 * 0.1 * nodesArray.length + 10;\n var angle = 2 * Math.PI * this.seededRandom();\n\n if (node.x === undefined) {\n node.x = radius * Math.cos(angle);\n }\n\n if (node.y === undefined) {\n node.y = radius * Math.sin(angle);\n }\n }\n }\n }\n /**\n * Use Kamada Kawai to position nodes. This is quite a heavy algorithm so if there are a lot of nodes we\n * cluster them first to reduce the amount.\n */\n\n }, {\n key: 'layoutNetwork',\n value: function layoutNetwork() {\n if (this.options.hierarchical.enabled !== true && this.options.improvedLayout === true) {\n // first check if we should Kamada Kawai to layout. The threshold is if less than half of the visible\n // nodes have predefined positions we use this.\n var positionDefined = 0;\n\n for (var i = 0; i < this.body.nodeIndices.length; i++) {\n var node = this.body.nodes[this.body.nodeIndices[i]];\n\n if (node.predefinedPosition === true) {\n positionDefined += 1;\n }\n } // if less than half of the nodes have a predefined position we continue\n\n\n if (positionDefined < 0.5 * this.body.nodeIndices.length) {\n var MAX_LEVELS = 10;\n var level = 0;\n var clusterThreshold = 100; // if there are a lot of nodes, we cluster before we run the algorithm.\n\n if (this.body.nodeIndices.length > clusterThreshold) {\n var startLength = this.body.nodeIndices.length;\n\n while (this.body.nodeIndices.length > clusterThreshold) {\n //console.time(\"clustering\")\n level += 1;\n var before = this.body.nodeIndices.length; // if there are many nodes we do a hubsize cluster\n\n if (level % 3 === 0) {\n this.body.modules.clustering.clusterBridges();\n } else {\n this.body.modules.clustering.clusterOutliers();\n }\n\n var after = this.body.nodeIndices.length;\n\n if (before == after && level % 3 !== 0 || level > MAX_LEVELS) {\n this._declusterAll();\n\n this.body.emitter.emit(\"_layoutFailed\");\n console.info(\"This network could not be positioned by this version of the improved layout algorithm. Please disable improvedLayout for better performance.\");\n return;\n } //console.timeEnd(\"clustering\")\n //console.log(level,after)\n\n } // increase the size of the edges\n\n\n this.body.modules.kamadaKawai.setOptions({\n springLength: Math.max(150, 2 * startLength)\n });\n } // position the system for these nodes and edges\n\n\n this.body.modules.kamadaKawai.solve(this.body.nodeIndices, this.body.edgeIndices, true); // shift to center point\n\n this._shiftToCenter(); // perturb the nodes a little bit to force the physics to kick in\n\n\n var offset = 70;\n\n for (var _i = 0; _i < this.body.nodeIndices.length; _i++) {\n // Only perturb the nodes that aren't fixed\n if (this.body.nodes[this.body.nodeIndices[_i]].predefinedPosition === false) {\n this.body.nodes[this.body.nodeIndices[_i]].x += (0.5 - this.seededRandom()) * offset;\n this.body.nodes[this.body.nodeIndices[_i]].y += (0.5 - this.seededRandom()) * offset;\n }\n } // uncluster all clusters\n\n\n this._declusterAll(); // reposition all bezier nodes.\n\n\n this.body.emitter.emit(\"_repositionBezierNodes\");\n }\n }\n }\n /**\n * Move all the nodes towards to the center so gravitational pull wil not move the nodes away from view\n * @private\n */\n\n }, {\n key: '_shiftToCenter',\n value: function _shiftToCenter() {\n var range = _NetworkUtil2['default'].getRangeCore(this.body.nodes, this.body.nodeIndices);\n\n var center = _NetworkUtil2['default'].findCenter(range);\n\n for (var i = 0; i < this.body.nodeIndices.length; i++) {\n this.body.nodes[this.body.nodeIndices[i]].x -= center.x;\n this.body.nodes[this.body.nodeIndices[i]].y -= center.y;\n }\n }\n }, {\n key: '_declusterAll',\n value: function _declusterAll() {\n var clustersPresent = true;\n\n while (clustersPresent === true) {\n clustersPresent = false;\n\n for (var i = 0; i < this.body.nodeIndices.length; i++) {\n if (this.body.nodes[this.body.nodeIndices[i]].isCluster === true) {\n clustersPresent = true;\n this.body.modules.clustering.openCluster(this.body.nodeIndices[i], {}, false);\n }\n }\n\n if (clustersPresent === true) {\n this.body.emitter.emit('_dataChanged');\n }\n }\n }\n }, {\n key: 'getSeed',\n value: function getSeed() {\n return this.initialRandomSeed;\n }\n /**\n * This is the main function to layout the nodes in a hierarchical way.\n * It checks if the node details are supplied correctly\n *\n * @private\n */\n\n }, {\n key: 'setupHierarchicalLayout',\n value: function setupHierarchicalLayout() {\n if (this.options.hierarchical.enabled === true && this.body.nodeIndices.length > 0) {\n // get the size of the largest hubs and check if the user has defined a level for a node.\n var node = void 0,\n nodeId = void 0;\n var definedLevel = false;\n var definedPositions = true;\n var undefinedLevel = false;\n this.hierarchicalLevels = {};\n this.lastNodeOnLevel = {};\n this.hierarchicalChildrenReference = {};\n this.hierarchicalParentReference = {};\n this.hierarchicalTrees = {};\n this.treeIndex = -1;\n this.distributionOrdering = {};\n this.distributionIndex = {};\n this.distributionOrderingPresence = {};\n\n for (nodeId in this.body.nodes) {\n if (this.body.nodes.hasOwnProperty(nodeId)) {\n node = this.body.nodes[nodeId];\n\n if (node.options.x === undefined && node.options.y === undefined) {\n definedPositions = false;\n }\n\n if (node.options.level !== undefined) {\n definedLevel = true;\n this.hierarchicalLevels[nodeId] = node.options.level;\n } else {\n undefinedLevel = true;\n }\n }\n } // if the user defined some levels but not all, alert and run without hierarchical layout\n\n\n if (undefinedLevel === true && definedLevel === true) {\n throw new Error('To use the hierarchical layout, nodes require either no predefined levels or levels have to be defined for all nodes.');\n } else {\n // define levels if undefined by the users. Based on hubsize.\n if (undefinedLevel === true) {\n if (this.options.hierarchical.sortMethod === 'hubsize') {\n this._determineLevelsByHubsize();\n } else if (this.options.hierarchical.sortMethod === 'directed') {\n this._determineLevelsDirected();\n } else if (this.options.hierarchical.sortMethod === 'custom') {\n this._determineLevelsCustomCallback();\n }\n } // fallback for cases where there are nodes but no edges\n\n\n for (var _nodeId in this.body.nodes) {\n if (this.body.nodes.hasOwnProperty(_nodeId)) {\n if (this.hierarchicalLevels[_nodeId] === undefined) {\n this.hierarchicalLevels[_nodeId] = 0;\n }\n }\n } // check the distribution of the nodes per level.\n\n\n var distribution = this._getDistribution(); // get the parent children relations.\n\n\n this._generateMap(); // place the nodes on the canvas.\n\n\n this._placeNodesByHierarchy(distribution); // condense the whitespace.\n\n\n this._condenseHierarchy(); // shift to center so gravity does not have to do much\n\n\n this._shiftToCenter();\n }\n }\n }\n /**\n * @private\n */\n\n }, {\n key: '_condenseHierarchy',\n value: function _condenseHierarchy() {\n var _this2 = this; // Global var in this scope to define when the movement has stopped.\n\n\n var stillShifting = false;\n var branches = {}; // first we have some methods to help shifting trees around.\n // the main method to shift the trees\n\n var shiftTrees = function shiftTrees() {\n var treeSizes = getTreeSizes();\n var shiftBy = 0;\n\n for (var i = 0; i < treeSizes.length - 1; i++) {\n var diff = treeSizes[i].max - treeSizes[i + 1].min;\n shiftBy += diff + _this2.options.hierarchical.treeSpacing;\n shiftTree(i + 1, shiftBy);\n }\n }; // shift a single tree by an offset\n\n\n var shiftTree = function shiftTree(index, offset) {\n for (var nodeId in _this2.hierarchicalTrees) {\n if (_this2.hierarchicalTrees.hasOwnProperty(nodeId)) {\n if (_this2.hierarchicalTrees[nodeId] === index) {\n var node = _this2.body.nodes[nodeId];\n\n var pos = _this2._getPositionForHierarchy(node);\n\n _this2._setPositionForHierarchy(node, pos + offset, undefined, true);\n }\n }\n }\n }; // get the width of a tree\n\n\n var getTreeSize = function getTreeSize(index) {\n var min = 1e9;\n var max = -1e9;\n\n for (var nodeId in _this2.hierarchicalTrees) {\n if (_this2.hierarchicalTrees.hasOwnProperty(nodeId)) {\n if (_this2.hierarchicalTrees[nodeId] === index) {\n var pos = _this2._getPositionForHierarchy(_this2.body.nodes[nodeId]);\n\n min = Math.min(pos, min);\n max = Math.max(pos, max);\n }\n }\n }\n\n return {\n min: min,\n max: max\n };\n }; // get the width of all trees\n\n\n var getTreeSizes = function getTreeSizes() {\n var treeWidths = [];\n\n for (var i = 0; i <= _this2.treeIndex; i++) {\n treeWidths.push(getTreeSize(i));\n }\n\n return treeWidths;\n }; // get a map of all nodes in this branch\n\n\n var getBranchNodes = function getBranchNodes(source, map) {\n if (map[source.id]) {\n return;\n }\n\n map[source.id] = true;\n\n if (_this2.hierarchicalChildrenReference[source.id]) {\n var children = _this2.hierarchicalChildrenReference[source.id];\n\n if (children.length > 0) {\n for (var i = 0; i < children.length; i++) {\n getBranchNodes(_this2.body.nodes[children[i]], map);\n }\n }\n }\n }; // get a min max width as well as the maximum movement space it has on either sides\n // we use min max terminology because width and height can interchange depending on the direction of the layout\n\n\n var getBranchBoundary = function getBranchBoundary(branchMap) {\n var maxLevel = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1e9;\n var minSpace = 1e9;\n var maxSpace = 1e9;\n var min = 1e9;\n var max = -1e9;\n\n for (var branchNode in branchMap) {\n if (branchMap.hasOwnProperty(branchNode)) {\n var node = _this2.body.nodes[branchNode];\n var level = _this2.hierarchicalLevels[node.id];\n\n var position = _this2._getPositionForHierarchy(node); // get the space around the node.\n\n\n var _getSpaceAroundNode2 = _this2._getSpaceAroundNode(node, branchMap),\n _getSpaceAroundNode3 = (0, _slicedToArray3['default'])(_getSpaceAroundNode2, 2),\n minSpaceNode = _getSpaceAroundNode3[0],\n maxSpaceNode = _getSpaceAroundNode3[1];\n\n minSpace = Math.min(minSpaceNode, minSpace);\n maxSpace = Math.min(maxSpaceNode, maxSpace); // the width is only relevant for the levels two nodes have in common. This is why we filter on this.\n\n if (level <= maxLevel) {\n min = Math.min(position, min);\n max = Math.max(position, max);\n }\n }\n }\n\n return [min, max, minSpace, maxSpace];\n }; // get the maximum level of a branch.\n\n\n var getMaxLevel = function getMaxLevel(nodeId) {\n var accumulator = {};\n\n var _getMaxLevel = function _getMaxLevel(nodeId) {\n if (accumulator[nodeId] !== undefined) {\n return accumulator[nodeId];\n }\n\n var level = _this2.hierarchicalLevels[nodeId];\n\n if (_this2.hierarchicalChildrenReference[nodeId]) {\n var children = _this2.hierarchicalChildrenReference[nodeId];\n\n if (children.length > 0) {\n for (var i = 0; i < children.length; i++) {\n level = Math.max(level, _getMaxLevel(children[i]));\n }\n }\n }\n\n accumulator[nodeId] = level;\n return level;\n };\n\n return _getMaxLevel(nodeId);\n }; // check what the maximum level is these nodes have in common.\n\n\n var getCollisionLevel = function getCollisionLevel(node1, node2) {\n var maxLevel1 = getMaxLevel(node1.id);\n var maxLevel2 = getMaxLevel(node2.id);\n return Math.min(maxLevel1, maxLevel2);\n }; // check if two nodes have the same parent(s)\n\n\n var hasSameParent = function hasSameParent(node1, node2) {\n var parents1 = _this2.hierarchicalParentReference[node1.id];\n var parents2 = _this2.hierarchicalParentReference[node2.id];\n\n if (parents1 === undefined || parents2 === undefined) {\n return false;\n }\n\n for (var i = 0; i < parents1.length; i++) {\n for (var j = 0; j < parents2.length; j++) {\n if (parents1[i] == parents2[j]) {\n return true;\n }\n }\n }\n\n return false;\n }; // condense elements. These can be nodes or branches depending on the callback.\n\n\n var shiftElementsCloser = function shiftElementsCloser(callback, levels, centerParents) {\n for (var i = 0; i < levels.length; i++) {\n var level = levels[i];\n var levelNodes = _this2.distributionOrdering[level];\n\n if (levelNodes.length > 1) {\n for (var j = 0; j < levelNodes.length - 1; j++) {\n if (hasSameParent(levelNodes[j], levelNodes[j + 1]) === true) {\n if (_this2.hierarchicalTrees[levelNodes[j].id] === _this2.hierarchicalTrees[levelNodes[j + 1].id]) {\n callback(levelNodes[j], levelNodes[j + 1], centerParents);\n }\n }\n }\n }\n }\n }; // callback for shifting branches\n\n\n var branchShiftCallback = function branchShiftCallback(node1, node2) {\n var centerParent = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; //window.CALLBACKS.push(() => {\n\n var pos1 = _this2._getPositionForHierarchy(node1);\n\n var pos2 = _this2._getPositionForHierarchy(node2);\n\n var diffAbs = Math.abs(pos2 - pos1); //console.log(\"NOW CHEcKING:\", node1.id, node2.id, diffAbs);\n\n if (diffAbs > _this2.options.hierarchical.nodeSpacing) {\n var branchNodes1 = {};\n var branchNodes2 = {};\n getBranchNodes(node1, branchNodes1);\n getBranchNodes(node2, branchNodes2); // check the largest distance between the branches\n\n var maxLevel = getCollisionLevel(node1, node2);\n\n var _getBranchBoundary = getBranchBoundary(branchNodes1, maxLevel),\n _getBranchBoundary2 = (0, _slicedToArray3['default'])(_getBranchBoundary, 4),\n min1 = _getBranchBoundary2[0],\n max1 = _getBranchBoundary2[1],\n minSpace1 = _getBranchBoundary2[2],\n maxSpace1 = _getBranchBoundary2[3];\n\n var _getBranchBoundary3 = getBranchBoundary(branchNodes2, maxLevel),\n _getBranchBoundary4 = (0, _slicedToArray3['default'])(_getBranchBoundary3, 4),\n min2 = _getBranchBoundary4[0],\n max2 = _getBranchBoundary4[1],\n minSpace2 = _getBranchBoundary4[2],\n maxSpace2 = _getBranchBoundary4[3]; //console.log(node1.id, getBranchBoundary(branchNodes1, maxLevel), node2.id, getBranchBoundary(branchNodes2, maxLevel), maxLevel);\n\n\n var diffBranch = Math.abs(max1 - min2);\n\n if (diffBranch > _this2.options.hierarchical.nodeSpacing) {\n var offset = max1 - min2 + _this2.options.hierarchical.nodeSpacing;\n\n if (offset < -minSpace2 + _this2.options.hierarchical.nodeSpacing) {\n offset = -minSpace2 + _this2.options.hierarchical.nodeSpacing; //console.log(\"RESETTING OFFSET\", max1 - min2 + this.options.hierarchical.nodeSpacing, -minSpace2, offset);\n }\n\n if (offset < 0) {\n //console.log(\"SHIFTING\", node2.id, offset);\n _this2._shiftBlock(node2.id, offset);\n\n stillShifting = true;\n if (centerParent === true) _this2._centerParent(node2);\n }\n }\n } //this.body.emitter.emit(\"_redraw\");})\n\n };\n\n var minimizeEdgeLength = function minimizeEdgeLength(iterations, node) {\n //window.CALLBACKS.push(() => {\n // console.log(\"ts\",node.id);\n var nodeId = node.id;\n var allEdges = node.edges;\n var nodeLevel = _this2.hierarchicalLevels[node.id]; // gather constants\n\n var C2 = _this2.options.hierarchical.levelSeparation * _this2.options.hierarchical.levelSeparation;\n var referenceNodes = {};\n var aboveEdges = [];\n\n for (var i = 0; i < allEdges.length; i++) {\n var edge = allEdges[i];\n\n if (edge.toId != edge.fromId) {\n var otherNode = edge.toId == nodeId ? edge.from : edge.to;\n referenceNodes[allEdges[i].id] = otherNode;\n\n if (_this2.hierarchicalLevels[otherNode.id] < nodeLevel) {\n aboveEdges.push(edge);\n }\n }\n } // differentiated sum of lengths based on only moving one node over one axis\n\n\n var getFx = function getFx(point, edges) {\n var sum = 0;\n\n for (var _i2 = 0; _i2 < edges.length; _i2++) {\n if (referenceNodes[edges[_i2].id] !== undefined) {\n var a = _this2._getPositionForHierarchy(referenceNodes[edges[_i2].id]) - point;\n sum += a / Math.sqrt(a * a + C2);\n }\n }\n\n return sum;\n }; // doubly differentiated sum of lengths based on only moving one node over one axis\n\n\n var getDFx = function getDFx(point, edges) {\n var sum = 0;\n\n for (var _i3 = 0; _i3 < edges.length; _i3++) {\n if (referenceNodes[edges[_i3].id] !== undefined) {\n var a = _this2._getPositionForHierarchy(referenceNodes[edges[_i3].id]) - point;\n sum -= C2 * Math.pow(a * a + C2, -1.5);\n }\n }\n\n return sum;\n };\n\n var getGuess = function getGuess(iterations, edges) {\n var guess = _this2._getPositionForHierarchy(node); // Newton's method for optimization\n\n\n var guessMap = {};\n\n for (var _i4 = 0; _i4 < iterations; _i4++) {\n var fx = getFx(guess, edges);\n var dfx = getDFx(guess, edges); // we limit the movement to avoid instability.\n\n var limit = 40;\n var ratio = Math.max(-limit, Math.min(limit, Math.round(fx / dfx)));\n guess = guess - ratio; // reduce duplicates\n\n if (guessMap[guess] !== undefined) {\n break;\n }\n\n guessMap[guess] = _i4;\n }\n\n return guess;\n };\n\n var moveBranch = function moveBranch(guess) {\n // position node if there is space\n var nodePosition = _this2._getPositionForHierarchy(node); // check movable area of the branch\n\n\n if (branches[node.id] === undefined) {\n var branchNodes = {};\n getBranchNodes(node, branchNodes);\n branches[node.id] = branchNodes;\n }\n\n var _getBranchBoundary5 = getBranchBoundary(branches[node.id]),\n _getBranchBoundary6 = (0, _slicedToArray3['default'])(_getBranchBoundary5, 4),\n minBranch = _getBranchBoundary6[0],\n maxBranch = _getBranchBoundary6[1],\n minSpaceBranch = _getBranchBoundary6[2],\n maxSpaceBranch = _getBranchBoundary6[3];\n\n var diff = guess - nodePosition; // check if we are allowed to move the node:\n\n var branchOffset = 0;\n\n if (diff > 0) {\n branchOffset = Math.min(diff, maxSpaceBranch - _this2.options.hierarchical.nodeSpacing);\n } else if (diff < 0) {\n branchOffset = -Math.min(-diff, minSpaceBranch - _this2.options.hierarchical.nodeSpacing);\n }\n\n if (branchOffset != 0) {\n //console.log(\"moving branch:\",branchOffset, maxSpaceBranch, minSpaceBranch)\n _this2._shiftBlock(node.id, branchOffset); //this.body.emitter.emit(\"_redraw\");\n\n\n stillShifting = true;\n }\n };\n\n var moveNode = function moveNode(guess) {\n var nodePosition = _this2._getPositionForHierarchy(node); // position node if there is space\n\n\n var _getSpaceAroundNode4 = _this2._getSpaceAroundNode(node),\n _getSpaceAroundNode5 = (0, _slicedToArray3['default'])(_getSpaceAroundNode4, 2),\n minSpace = _getSpaceAroundNode5[0],\n maxSpace = _getSpaceAroundNode5[1];\n\n var diff = guess - nodePosition; // check if we are allowed to move the node:\n\n var newPosition = nodePosition;\n\n if (diff > 0) {\n newPosition = Math.min(nodePosition + (maxSpace - _this2.options.hierarchical.nodeSpacing), guess);\n } else if (diff < 0) {\n newPosition = Math.max(nodePosition - (minSpace - _this2.options.hierarchical.nodeSpacing), guess);\n }\n\n if (newPosition !== nodePosition) {\n //console.log(\"moving Node:\",diff, minSpace, maxSpace);\n _this2._setPositionForHierarchy(node, newPosition, undefined, true); //this.body.emitter.emit(\"_redraw\");\n\n\n stillShifting = true;\n }\n };\n\n var guess = getGuess(iterations, aboveEdges);\n moveBranch(guess);\n guess = getGuess(iterations, allEdges);\n moveNode(guess); //})\n }; // method to remove whitespace between branches. Because we do bottom up, we can center the parents.\n\n\n var minimizeEdgeLengthBottomUp = function minimizeEdgeLengthBottomUp(iterations) {\n var levels = (0, _keys2['default'])(_this2.distributionOrdering);\n levels = levels.reverse();\n\n for (var i = 0; i < iterations; i++) {\n stillShifting = false;\n\n for (var j = 0; j < levels.length; j++) {\n var level = levels[j];\n var levelNodes = _this2.distributionOrdering[level];\n\n for (var k = 0; k < levelNodes.length; k++) {\n minimizeEdgeLength(1000, levelNodes[k]);\n }\n }\n\n if (stillShifting !== true) {\n //console.log(\"FINISHED minimizeEdgeLengthBottomUp IN \" + i);\n break;\n }\n }\n }; // method to remove whitespace between branches. Because we do bottom up, we can center the parents.\n\n\n var shiftBranchesCloserBottomUp = function shiftBranchesCloserBottomUp(iterations) {\n var levels = (0, _keys2['default'])(_this2.distributionOrdering);\n levels = levels.reverse();\n\n for (var i = 0; i < iterations; i++) {\n stillShifting = false;\n shiftElementsCloser(branchShiftCallback, levels, true);\n\n if (stillShifting !== true) {\n //console.log(\"FINISHED shiftBranchesCloserBottomUp IN \" + (i+1));\n break;\n }\n }\n }; // center all parents\n\n\n var centerAllParents = function centerAllParents() {\n for (var nodeId in _this2.body.nodes) {\n if (_this2.body.nodes.hasOwnProperty(nodeId)) _this2._centerParent(_this2.body.nodes[nodeId]);\n }\n }; // center all parents\n\n\n var centerAllParentsBottomUp = function centerAllParentsBottomUp() {\n var levels = (0, _keys2['default'])(_this2.distributionOrdering);\n levels = levels.reverse();\n\n for (var i = 0; i < levels.length; i++) {\n var level = levels[i];\n var levelNodes = _this2.distributionOrdering[level];\n\n for (var j = 0; j < levelNodes.length; j++) {\n _this2._centerParent(levelNodes[j]);\n }\n }\n }; // the actual work is done here.\n\n\n if (this.options.hierarchical.blockShifting === true) {\n shiftBranchesCloserBottomUp(5);\n centerAllParents();\n } // minimize edge length\n\n\n if (this.options.hierarchical.edgeMinimization === true) {\n minimizeEdgeLengthBottomUp(20);\n }\n\n if (this.options.hierarchical.parentCentralization === true) {\n centerAllParentsBottomUp();\n }\n\n shiftTrees();\n }\n /**\n * This gives the space around the node. IF a map is supplied, it will only check against nodes NOT in the map.\n * This is used to only get the distances to nodes outside of a branch.\n * @param node\n * @param map\n * @returns {*[]}\n * @private\n */\n\n }, {\n key: '_getSpaceAroundNode',\n value: function _getSpaceAroundNode(node, map) {\n var useMap = true;\n\n if (map === undefined) {\n useMap = false;\n }\n\n var level = this.hierarchicalLevels[node.id];\n\n if (level !== undefined) {\n var index = this.distributionIndex[node.id];\n\n var position = this._getPositionForHierarchy(node);\n\n var minSpace = 1e9;\n var maxSpace = 1e9;\n\n if (index !== 0) {\n var prevNode = this.distributionOrdering[level][index - 1];\n\n if (useMap === true && map[prevNode.id] === undefined || useMap === false) {\n var prevPos = this._getPositionForHierarchy(prevNode);\n\n minSpace = position - prevPos;\n }\n }\n\n if (index != this.distributionOrdering[level].length - 1) {\n var nextNode = this.distributionOrdering[level][index + 1];\n\n if (useMap === true && map[nextNode.id] === undefined || useMap === false) {\n var nextPos = this._getPositionForHierarchy(nextNode);\n\n maxSpace = Math.min(maxSpace, nextPos - position);\n }\n }\n\n return [minSpace, maxSpace];\n } else {\n return [0, 0];\n }\n }\n /**\n * We use this method to center a parent node and check if it does not cross other nodes when it does.\n * @param node\n * @private\n */\n\n }, {\n key: '_centerParent',\n value: function _centerParent(node) {\n if (this.hierarchicalParentReference[node.id]) {\n var parents = this.hierarchicalParentReference[node.id];\n\n for (var i = 0; i < parents.length; i++) {\n var parentId = parents[i];\n var parentNode = this.body.nodes[parentId];\n\n if (this.hierarchicalChildrenReference[parentId]) {\n // get the range of the children\n var minPos = 1e9;\n var maxPos = -1e9;\n var children = this.hierarchicalChildrenReference[parentId];\n\n if (children.length > 0) {\n for (var _i5 = 0; _i5 < children.length; _i5++) {\n var childNode = this.body.nodes[children[_i5]];\n minPos = Math.min(minPos, this._getPositionForHierarchy(childNode));\n maxPos = Math.max(maxPos, this._getPositionForHierarchy(childNode));\n }\n }\n\n var position = this._getPositionForHierarchy(parentNode);\n\n var _getSpaceAroundNode6 = this._getSpaceAroundNode(parentNode),\n _getSpaceAroundNode7 = (0, _slicedToArray3['default'])(_getSpaceAroundNode6, 2),\n minSpace = _getSpaceAroundNode7[0],\n maxSpace = _getSpaceAroundNode7[1];\n\n var newPosition = 0.5 * (minPos + maxPos);\n var diff = position - newPosition;\n\n if (diff < 0 && Math.abs(diff) < maxSpace - this.options.hierarchical.nodeSpacing || diff > 0 && Math.abs(diff) < minSpace - this.options.hierarchical.nodeSpacing) {\n this._setPositionForHierarchy(parentNode, newPosition, undefined, true);\n }\n }\n }\n }\n }\n /**\n * This function places the nodes on the canvas based on the hierarchial distribution.\n *\n * @param {Object} distribution | obtained by the function this._getDistribution()\n * @private\n */\n\n }, {\n key: '_placeNodesByHierarchy',\n value: function _placeNodesByHierarchy(distribution) {\n this.positionedNodes = {}; // start placing all the level 0 nodes first. Then recursively position their branches.\n\n for (var level in distribution) {\n if (distribution.hasOwnProperty(level)) {\n // sort nodes in level by position:\n var nodeArray = (0, _keys2['default'])(distribution[level]);\n nodeArray = this._indexArrayToNodes(nodeArray);\n\n this._sortNodeArray(nodeArray);\n\n var handledNodeCount = 0;\n\n for (var i = 0; i < nodeArray.length; i++) {\n var node = nodeArray[i];\n\n if (this.positionedNodes[node.id] === undefined) {\n var pos = this.options.hierarchical.nodeSpacing * handledNodeCount; // we get the X or Y values we need and store them in pos and previousPos. The get and set make sure we get X or Y\n\n if (handledNodeCount > 0) {\n pos = this._getPositionForHierarchy(nodeArray[i - 1]) + this.options.hierarchical.nodeSpacing;\n }\n\n this._setPositionForHierarchy(node, pos, level);\n\n this._validataPositionAndContinue(node, level, pos);\n\n handledNodeCount++;\n }\n }\n }\n }\n }\n /**\n * This is a recursively called function to enumerate the branches from the largest hubs and place the nodes\n * on a X position that ensures there will be no overlap.\n *\n * @param parentId\n * @param parentLevel\n * @private\n */\n\n }, {\n key: '_placeBranchNodes',\n value: function _placeBranchNodes(parentId, parentLevel) {\n // if this is not a parent, cancel the placing. This can happen with multiple parents to one child.\n if (this.hierarchicalChildrenReference[parentId] === undefined) {\n return;\n } // get a list of childNodes\n\n\n var childNodes = [];\n\n for (var i = 0; i < this.hierarchicalChildrenReference[parentId].length; i++) {\n childNodes.push(this.body.nodes[this.hierarchicalChildrenReference[parentId][i]]);\n } // use the positions to order the nodes.\n\n\n this._sortNodeArray(childNodes); // position the childNodes\n\n\n for (var _i6 = 0; _i6 < childNodes.length; _i6++) {\n var childNode = childNodes[_i6];\n var childNodeLevel = this.hierarchicalLevels[childNode.id]; // check if the child node is below the parent node and if it has already been positioned.\n\n if (childNodeLevel > parentLevel && this.positionedNodes[childNode.id] === undefined) {\n // get the amount of space required for this node. If parent the width is based on the amount of children.\n var pos = void 0; // we get the X or Y values we need and store them in pos and previousPos. The get and set make sure we get X or Y\n\n if (_i6 === 0) {\n pos = this._getPositionForHierarchy(this.body.nodes[parentId]);\n } else {\n pos = this._getPositionForHierarchy(childNodes[_i6 - 1]) + this.options.hierarchical.nodeSpacing;\n }\n\n this._setPositionForHierarchy(childNode, pos, childNodeLevel);\n\n this._validataPositionAndContinue(childNode, childNodeLevel, pos);\n } else {\n return;\n }\n } // center the parent nodes.\n\n\n var minPos = 1e9;\n var maxPos = -1e9;\n\n for (var _i7 = 0; _i7 < childNodes.length; _i7++) {\n var childNodeId = childNodes[_i7].id;\n minPos = Math.min(minPos, this._getPositionForHierarchy(this.body.nodes[childNodeId]));\n maxPos = Math.max(maxPos, this._getPositionForHierarchy(this.body.nodes[childNodeId]));\n }\n\n this._setPositionForHierarchy(this.body.nodes[parentId], 0.5 * (minPos + maxPos), parentLevel);\n }\n /**\n * This method checks for overlap and if required shifts the branch. It also keeps records of positioned nodes.\n * Finally it will call _placeBranchNodes to place the branch nodes.\n * @param node\n * @param level\n * @param pos\n * @private\n */\n\n }, {\n key: '_validataPositionAndContinue',\n value: function _validataPositionAndContinue(node, level, pos) {\n // if overlap has been detected, we shift the branch\n if (this.lastNodeOnLevel[level] !== undefined) {\n var previousPos = this._getPositionForHierarchy(this.body.nodes[this.lastNodeOnLevel[level]]);\n\n if (pos - previousPos < this.options.hierarchical.nodeSpacing) {\n var diff = previousPos + this.options.hierarchical.nodeSpacing - pos;\n\n var sharedParent = this._findCommonParent(this.lastNodeOnLevel[level], node.id);\n\n this._shiftBlock(sharedParent.withChild, diff);\n }\n } // store change in position.\n\n\n this.lastNodeOnLevel[level] = node.id;\n this.positionedNodes[node.id] = true;\n\n this._placeBranchNodes(node.id, level);\n }\n /**\n * Receives an array with node indices and returns an array with the actual node references. Used for sorting based on\n * node properties.\n * @param idArray\n */\n\n }, {\n key: '_indexArrayToNodes',\n value: function _indexArrayToNodes(idArray) {\n var array = [];\n\n for (var i = 0; i < idArray.length; i++) {\n array.push(this.body.nodes[idArray[i]]);\n }\n\n return array;\n }\n /**\n * This function get the distribution of levels based on hubsize\n *\n * @returns {Object}\n * @private\n */\n\n }, {\n key: '_getDistribution',\n value: function _getDistribution() {\n var distribution = {};\n var nodeId = void 0,\n node = void 0; // we fix Y because the hierarchy is vertical, we fix X so we do not give a node an x position for a second time.\n // the fix of X is removed after the x value has been set.\n\n for (nodeId in this.body.nodes) {\n if (this.body.nodes.hasOwnProperty(nodeId)) {\n node = this.body.nodes[nodeId];\n var level = this.hierarchicalLevels[nodeId] === undefined ? 0 : this.hierarchicalLevels[nodeId];\n\n if (this.options.hierarchical.direction === 'UD' || this.options.hierarchical.direction === 'DU') {\n node.y = this.options.hierarchical.levelSeparation * level;\n node.options.fixed.y = true;\n } else {\n node.x = this.options.hierarchical.levelSeparation * level;\n node.options.fixed.x = true;\n }\n\n if (distribution[level] === undefined) {\n distribution[level] = {};\n }\n\n distribution[level][nodeId] = node;\n }\n }\n\n return distribution;\n }\n /**\n * Get the hubsize from all remaining unlevelled nodes.\n *\n * @returns {number}\n * @private\n */\n\n }, {\n key: '_getHubSize',\n value: function _getHubSize() {\n var hubSize = 0;\n\n for (var nodeId in this.body.nodes) {\n if (this.body.nodes.hasOwnProperty(nodeId)) {\n var node = this.body.nodes[nodeId];\n\n if (this.hierarchicalLevels[nodeId] === undefined) {\n hubSize = node.edges.length < hubSize ? hubSize : node.edges.length;\n }\n }\n }\n\n return hubSize;\n }\n /**\n * this function allocates nodes in levels based on the recursive branching from the largest hubs.\n *\n * @param hubsize\n * @private\n */\n\n }, {\n key: '_determineLevelsByHubsize',\n value: function _determineLevelsByHubsize() {\n var _this3 = this;\n\n var hubSize = 1;\n\n var levelDownstream = function levelDownstream(nodeA, nodeB) {\n if (_this3.hierarchicalLevels[nodeB.id] === undefined) {\n // set initial level\n if (_this3.hierarchicalLevels[nodeA.id] === undefined) {\n _this3.hierarchicalLevels[nodeA.id] = 0;\n } // set level\n\n\n _this3.hierarchicalLevels[nodeB.id] = _this3.hierarchicalLevels[nodeA.id] + 1;\n }\n };\n\n while (hubSize > 0) {\n // determine hubs\n hubSize = this._getHubSize();\n if (hubSize === 0) break;\n\n for (var nodeId in this.body.nodes) {\n if (this.body.nodes.hasOwnProperty(nodeId)) {\n var node = this.body.nodes[nodeId];\n\n if (node.edges.length === hubSize) {\n this._crawlNetwork(levelDownstream, nodeId);\n }\n }\n }\n }\n }\n /**\n * TODO: release feature\n * @private\n */\n\n }, {\n key: '_determineLevelsCustomCallback',\n value: function _determineLevelsCustomCallback() {\n var _this4 = this;\n\n var minLevel = 100000; // TODO: this should come from options.\n\n var customCallback = function customCallback(nodeA, nodeB, edge) {};\n\n var levelByDirection = function levelByDirection(nodeA, nodeB, edge) {\n var levelA = _this4.hierarchicalLevels[nodeA.id]; // set initial level\n\n if (levelA === undefined) {\n _this4.hierarchicalLevels[nodeA.id] = minLevel;\n }\n\n var diff = customCallback(_NetworkUtil2['default'].cloneOptions(nodeA, 'node'), _NetworkUtil2['default'].cloneOptions(nodeB, 'node'), _NetworkUtil2['default'].cloneOptions(edge, 'edge'));\n _this4.hierarchicalLevels[nodeB.id] = _this4.hierarchicalLevels[nodeA.id] + diff;\n };\n\n this._crawlNetwork(levelByDirection);\n\n this._setMinLevelToZero();\n }\n /**\n * this function allocates nodes in levels based on the direction of the edges\n *\n * @param hubsize\n * @private\n */\n\n }, {\n key: '_determineLevelsDirected',\n value: function _determineLevelsDirected() {\n var _this5 = this;\n\n var minLevel = 10000;\n\n var levelByDirection = function levelByDirection(nodeA, nodeB, edge) {\n var levelA = _this5.hierarchicalLevels[nodeA.id]; // set initial level\n\n if (levelA === undefined) {\n _this5.hierarchicalLevels[nodeA.id] = minLevel;\n }\n\n if (edge.toId == nodeB.id) {\n _this5.hierarchicalLevels[nodeB.id] = _this5.hierarchicalLevels[nodeA.id] + 1;\n } else {\n _this5.hierarchicalLevels[nodeB.id] = _this5.hierarchicalLevels[nodeA.id] - 1;\n }\n };\n\n this._crawlNetwork(levelByDirection);\n\n this._setMinLevelToZero();\n }\n /**\n * Small util method to set the minimum levels of the nodes to zero.\n * @private\n */\n\n }, {\n key: '_setMinLevelToZero',\n value: function _setMinLevelToZero() {\n var minLevel = 1e9; // get the minimum level\n\n for (var nodeId in this.body.nodes) {\n if (this.body.nodes.hasOwnProperty(nodeId)) {\n if (this.hierarchicalLevels[nodeId] !== undefined) {\n minLevel = Math.min(this.hierarchicalLevels[nodeId], minLevel);\n }\n }\n } // subtract the minimum from the set so we have a range starting from 0\n\n\n for (var _nodeId2 in this.body.nodes) {\n if (this.body.nodes.hasOwnProperty(_nodeId2)) {\n if (this.hierarchicalLevels[_nodeId2] !== undefined) {\n this.hierarchicalLevels[_nodeId2] -= minLevel;\n }\n }\n }\n }\n /**\n * Update the bookkeeping of parent and child.\n * @private\n */\n\n }, {\n key: '_generateMap',\n value: function _generateMap() {\n var _this6 = this;\n\n var fillInRelations = function fillInRelations(parentNode, childNode) {\n if (_this6.hierarchicalLevels[childNode.id] > _this6.hierarchicalLevels[parentNode.id]) {\n var parentNodeId = parentNode.id;\n var childNodeId = childNode.id;\n\n if (_this6.hierarchicalChildrenReference[parentNodeId] === undefined) {\n _this6.hierarchicalChildrenReference[parentNodeId] = [];\n }\n\n _this6.hierarchicalChildrenReference[parentNodeId].push(childNodeId);\n\n if (_this6.hierarchicalParentReference[childNodeId] === undefined) {\n _this6.hierarchicalParentReference[childNodeId] = [];\n }\n\n _this6.hierarchicalParentReference[childNodeId].push(parentNodeId);\n }\n };\n\n this._crawlNetwork(fillInRelations);\n }\n /**\n * Crawl over the entire network and use a callback on each node couple that is connected to each other.\n * @param callback | will receive nodeA nodeB and the connecting edge. A and B are unique.\n * @param startingNodeId\n * @private\n */\n\n }, {\n key: '_crawlNetwork',\n value: function _crawlNetwork() {\n var _this7 = this;\n\n var callback = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : function () {};\n var startingNodeId = arguments[1];\n var progress = {};\n var treeIndex = 0;\n\n var crawler = function crawler(node, tree) {\n if (progress[node.id] === undefined) {\n if (_this7.hierarchicalTrees[node.id] === undefined) {\n _this7.hierarchicalTrees[node.id] = tree;\n _this7.treeIndex = Math.max(tree, _this7.treeIndex);\n }\n\n progress[node.id] = true;\n var childNode = void 0;\n\n for (var i = 0; i < node.edges.length; i++) {\n if (node.edges[i].connected === true) {\n if (node.edges[i].toId === node.id) {\n childNode = node.edges[i].from;\n } else {\n childNode = node.edges[i].to;\n }\n\n if (node.id !== childNode.id) {\n callback(node, childNode, node.edges[i]);\n crawler(childNode, tree);\n }\n }\n }\n }\n }; // we can crawl from a specific node or over all nodes.\n\n\n if (startingNodeId === undefined) {\n for (var i = 0; i < this.body.nodeIndices.length; i++) {\n var node = this.body.nodes[this.body.nodeIndices[i]];\n\n if (progress[node.id] === undefined) {\n crawler(node, treeIndex);\n treeIndex += 1;\n }\n }\n } else {\n var _node = this.body.nodes[startingNodeId];\n\n if (_node === undefined) {\n console.error(\"Node not found:\", startingNodeId);\n return;\n }\n\n crawler(_node);\n }\n }\n /**\n * Shift a branch a certain distance\n * @param parentId\n * @param diff\n * @private\n */\n\n }, {\n key: '_shiftBlock',\n value: function _shiftBlock(parentId, diff) {\n var _this8 = this;\n\n var progress = {};\n\n var shifter = function shifter(parentId) {\n if (progress[parentId]) {\n return;\n }\n\n progress[parentId] = true;\n\n if (_this8.options.hierarchical.direction === 'UD' || _this8.options.hierarchical.direction === 'DU') {\n _this8.body.nodes[parentId].x += diff;\n } else {\n _this8.body.nodes[parentId].y += diff;\n }\n\n if (_this8.hierarchicalChildrenReference[parentId] !== undefined) {\n for (var i = 0; i < _this8.hierarchicalChildrenReference[parentId].length; i++) {\n shifter(_this8.hierarchicalChildrenReference[parentId][i]);\n }\n }\n };\n\n shifter(parentId);\n }\n /**\n * Find a common parent between branches.\n * @param childA\n * @param childB\n * @returns {{foundParent, withChild}}\n * @private\n */\n\n }, {\n key: '_findCommonParent',\n value: function _findCommonParent(childA, childB) {\n var _this9 = this;\n\n var parents = {};\n\n var iterateParents = function iterateParents(parents, child) {\n if (_this9.hierarchicalParentReference[child] !== undefined) {\n for (var i = 0; i < _this9.hierarchicalParentReference[child].length; i++) {\n var parent = _this9.hierarchicalParentReference[child][i];\n parents[parent] = true;\n iterateParents(parents, parent);\n }\n }\n };\n\n var findParent = function findParent(parents, child) {\n if (_this9.hierarchicalParentReference[child] !== undefined) {\n for (var i = 0; i < _this9.hierarchicalParentReference[child].length; i++) {\n var parent = _this9.hierarchicalParentReference[child][i];\n\n if (parents[parent] !== undefined) {\n return {\n foundParent: parent,\n withChild: child\n };\n }\n\n var branch = findParent(parents, parent);\n\n if (branch.foundParent !== null) {\n return branch;\n }\n }\n }\n\n return {\n foundParent: null,\n withChild: child\n };\n };\n\n iterateParents(parents, childA);\n return findParent(parents, childB);\n }\n /**\n * Abstract the getting of the position so we won't have to repeat the check for direction all the time\n * @param node\n * @param position\n * @param level\n * @private\n */\n\n }, {\n key: '_setPositionForHierarchy',\n value: function _setPositionForHierarchy(node, position, level) {\n var doNotUpdate = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false; //console.log('_setPositionForHierarchy',node.id, position)\n\n if (doNotUpdate !== true) {\n if (this.distributionOrdering[level] === undefined) {\n this.distributionOrdering[level] = [];\n this.distributionOrderingPresence[level] = {};\n }\n\n if (this.distributionOrderingPresence[level][node.id] === undefined) {\n this.distributionOrdering[level].push(node);\n this.distributionIndex[node.id] = this.distributionOrdering[level].length - 1;\n }\n\n this.distributionOrderingPresence[level][node.id] = true;\n }\n\n if (this.options.hierarchical.direction === 'UD' || this.options.hierarchical.direction === 'DU') {\n node.x = position;\n } else {\n node.y = position;\n }\n }\n /**\n * Abstract the getting of the position of a node so we do not have to repeat the direction check all the time.\n * @param node\n * @returns {number|*}\n * @private\n */\n\n }, {\n key: '_getPositionForHierarchy',\n value: function _getPositionForHierarchy(node) {\n if (this.options.hierarchical.direction === 'UD' || this.options.hierarchical.direction === 'DU') {\n return node.x;\n } else {\n return node.y;\n }\n }\n /**\n * Use the x or y value to sort the array, allowing users to specify order.\n * @param nodeArray\n * @private\n */\n\n }, {\n key: '_sortNodeArray',\n value: function _sortNodeArray(nodeArray) {\n if (nodeArray.length > 1) {\n if (this.options.hierarchical.direction === 'UD' || this.options.hierarchical.direction === 'DU') {\n nodeArray.sort(function (a, b) {\n return a.x - b.x;\n });\n } else {\n nodeArray.sort(function (a, b) {\n return a.y - b.y;\n });\n }\n }\n }\n }]);\n return LayoutEngine;\n }();\n\n exports['default'] = LayoutEngine;\n /***/\n },\n /* 223 */\n\n /***/\n function (module, exports, __webpack_require__) {\n 'use strict';\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n\n var _keys = __webpack_require__(58);\n\n var _keys2 = _interopRequireDefault(_keys);\n\n var _stringify = __webpack_require__(90);\n\n var _stringify2 = _interopRequireDefault(_stringify);\n\n var _typeof2 = __webpack_require__(62);\n\n var _typeof3 = _interopRequireDefault(_typeof2);\n\n var _classCallCheck2 = __webpack_require__(119);\n\n var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\n var _createClass2 = __webpack_require__(120);\n\n var _createClass3 = _interopRequireDefault(_createClass2);\n\n function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n 'default': obj\n };\n }\n\n var util = __webpack_require__(1);\n\n var Hammer = __webpack_require__(112);\n\n var hammerUtil = __webpack_require__(125);\n /**\n * clears the toolbar div element of children\n *\n * @private\n */\n\n\n var ManipulationSystem = function () {\n function ManipulationSystem(body, canvas, selectionHandler) {\n var _this = this;\n\n (0, _classCallCheck3['default'])(this, ManipulationSystem);\n this.body = body;\n this.canvas = canvas;\n this.selectionHandler = selectionHandler;\n this.editMode = false;\n this.manipulationDiv = undefined;\n this.editModeDiv = undefined;\n this.closeDiv = undefined;\n this.manipulationHammers = [];\n this.temporaryUIFunctions = {};\n this.temporaryEventFunctions = [];\n this.touchTime = 0;\n this.temporaryIds = {\n nodes: [],\n edges: []\n };\n this.guiEnabled = false;\n this.inMode = false;\n this.selectedControlNode = undefined;\n this.options = {};\n this.defaultOptions = {\n enabled: false,\n initiallyActive: false,\n addNode: true,\n addEdge: true,\n editNode: undefined,\n editEdge: true,\n deleteNode: true,\n deleteEdge: true,\n controlNodeStyle: {\n shape: 'dot',\n size: 6,\n color: {\n background: '#ff0000',\n border: '#3c3c3c',\n highlight: {\n background: '#07f968',\n border: '#3c3c3c'\n }\n },\n borderWidth: 2,\n borderWidthSelected: 2\n }\n };\n util.extend(this.options, this.defaultOptions);\n this.body.emitter.on('destroy', function () {\n _this._clean();\n });\n this.body.emitter.on('_dataChanged', this._restore.bind(this));\n this.body.emitter.on('_resetData', this._restore.bind(this));\n }\n /**\n * If something changes in the data during editing, switch back to the initial datamanipulation state and close all edit modes.\n * @private\n */\n\n\n (0, _createClass3['default'])(ManipulationSystem, [{\n key: '_restore',\n value: function _restore() {\n if (this.inMode !== false) {\n if (this.options.initiallyActive === true) {\n this.enableEditMode();\n } else {\n this.disableEditMode();\n }\n }\n }\n /**\n * Set the Options\n * @param options\n */\n\n }, {\n key: 'setOptions',\n value: function setOptions(options, allOptions, globalOptions) {\n if (allOptions !== undefined) {\n if (allOptions.locale !== undefined) {\n this.options.locale = allOptions.locale;\n } else {\n this.options.locale = globalOptions.locale;\n }\n\n if (allOptions.locales !== undefined) {\n this.options.locales = allOptions.locales;\n } else {\n this.options.locales = globalOptions.locales;\n }\n }\n\n if (options !== undefined) {\n if (typeof options === 'boolean') {\n this.options.enabled = options;\n } else {\n this.options.enabled = true;\n util.deepExtend(this.options, options);\n }\n\n if (this.options.initiallyActive === true) {\n this.editMode = true;\n }\n\n this._setup();\n }\n }\n /**\n * Enable or disable edit-mode. Draws the DOM required and cleans up after itself.\n *\n * @private\n */\n\n }, {\n key: 'toggleEditMode',\n value: function toggleEditMode() {\n if (this.editMode === true) {\n this.disableEditMode();\n } else {\n this.enableEditMode();\n }\n }\n }, {\n key: 'enableEditMode',\n value: function enableEditMode() {\n this.editMode = true;\n\n this._clean();\n\n if (this.guiEnabled === true) {\n this.manipulationDiv.style.display = 'block';\n this.closeDiv.style.display = 'block';\n this.editModeDiv.style.display = 'none';\n this.showManipulatorToolbar();\n }\n }\n }, {\n key: 'disableEditMode',\n value: function disableEditMode() {\n this.editMode = false;\n\n this._clean();\n\n if (this.guiEnabled === true) {\n this.manipulationDiv.style.display = 'none';\n this.closeDiv.style.display = 'none';\n this.editModeDiv.style.display = 'block';\n\n this._createEditButton();\n }\n }\n /**\n * Creates the main toolbar. Removes functions bound to the select event. Binds all the buttons of the toolbar.\n *\n * @private\n */\n\n }, {\n key: 'showManipulatorToolbar',\n value: function showManipulatorToolbar() {\n // restore the state of any bound functions or events, remove control nodes, restore physics\n this._clean(); // reset global variables\n\n\n this.manipulationDOM = {}; // if the gui is enabled, draw all elements.\n\n if (this.guiEnabled === true) {\n // a _restore will hide these menus\n this.editMode = true;\n this.manipulationDiv.style.display = 'block';\n this.closeDiv.style.display = 'block';\n\n var selectedNodeCount = this.selectionHandler._getSelectedNodeCount();\n\n var selectedEdgeCount = this.selectionHandler._getSelectedEdgeCount();\n\n var selectedTotalCount = selectedNodeCount + selectedEdgeCount;\n var locale = this.options.locales[this.options.locale];\n var needSeperator = false;\n\n if (this.options.addNode !== false) {\n this._createAddNodeButton(locale);\n\n needSeperator = true;\n }\n\n if (this.options.addEdge !== false) {\n if (needSeperator === true) {\n this._createSeperator(1);\n } else {\n needSeperator = true;\n }\n\n this._createAddEdgeButton(locale);\n }\n\n if (selectedNodeCount === 1 && typeof this.options.editNode === 'function') {\n if (needSeperator === true) {\n this._createSeperator(2);\n } else {\n needSeperator = true;\n }\n\n this._createEditNodeButton(locale);\n } else if (selectedEdgeCount === 1 && selectedNodeCount === 0 && this.options.editEdge !== false) {\n if (needSeperator === true) {\n this._createSeperator(3);\n } else {\n needSeperator = true;\n }\n\n this._createEditEdgeButton(locale);\n } // remove buttons\n\n\n if (selectedTotalCount !== 0) {\n if (selectedNodeCount > 0 && this.options.deleteNode !== false) {\n if (needSeperator === true) {\n this._createSeperator(4);\n }\n\n this._createDeleteButton(locale);\n } else if (selectedNodeCount === 0 && this.options.deleteEdge !== false) {\n if (needSeperator === true) {\n this._createSeperator(4);\n }\n\n this._createDeleteButton(locale);\n }\n } // bind the close button\n\n\n this._bindHammerToDiv(this.closeDiv, this.toggleEditMode.bind(this)); // refresh this bar based on what has been selected\n\n\n this._temporaryBindEvent('select', this.showManipulatorToolbar.bind(this));\n } // redraw to show any possible changes\n\n\n this.body.emitter.emit('_redraw');\n }\n /**\n * Create the toolbar for adding Nodes\n */\n\n }, {\n key: 'addNodeMode',\n value: function addNodeMode() {\n // when using the gui, enable edit mode if it wasnt already.\n if (this.editMode !== true) {\n this.enableEditMode();\n } // restore the state of any bound functions or events, remove control nodes, restore physics\n\n\n this._clean();\n\n this.inMode = 'addNode';\n\n if (this.guiEnabled === true) {\n var locale = this.options.locales[this.options.locale];\n this.manipulationDOM = {};\n\n this._createBackButton(locale);\n\n this._createSeperator();\n\n this._createDescription(locale['addDescription'] || this.options.locales['en']['addDescription']); // bind the close button\n\n\n this._bindHammerToDiv(this.closeDiv, this.toggleEditMode.bind(this));\n }\n\n this._temporaryBindEvent('click', this._performAddNode.bind(this));\n }\n /**\n * call the bound function to handle the editing of the node. The node has to be selected.\n */\n\n }, {\n key: 'editNode',\n value: function editNode() {\n var _this2 = this; // when using the gui, enable edit mode if it wasnt already.\n\n\n if (this.editMode !== true) {\n this.enableEditMode();\n } // restore the state of any bound functions or events, remove control nodes, restore physics\n\n\n this._clean();\n\n var node = this.selectionHandler._getSelectedNode();\n\n if (node !== undefined) {\n this.inMode = 'editNode';\n\n if (typeof this.options.editNode === 'function') {\n if (node.isCluster !== true) {\n var data = util.deepExtend({}, node.options, false);\n data.x = node.x;\n data.y = node.y;\n\n if (this.options.editNode.length === 2) {\n this.options.editNode(data, function (finalizedData) {\n if (finalizedData !== null && finalizedData !== undefined && _this2.inMode === 'editNode') {\n // if for whatever reason the mode has changes (due to dataset change) disregard the callback) {\n _this2.body.data.nodes.getDataSet().update(finalizedData);\n }\n\n _this2.showManipulatorToolbar();\n });\n } else {\n throw new Error('The function for edit does not support two arguments (data, callback)');\n }\n } else {\n alert(this.options.locales[this.options.locale]['editClusterError'] || this.options.locales['en']['editClusterError']);\n }\n } else {\n throw new Error('No function has been configured to handle the editing of nodes.');\n }\n } else {\n this.showManipulatorToolbar();\n }\n }\n /**\n * create the toolbar to connect nodes\n */\n\n }, {\n key: 'addEdgeMode',\n value: function addEdgeMode() {\n // when using the gui, enable edit mode if it wasnt already.\n if (this.editMode !== true) {\n this.enableEditMode();\n } // restore the state of any bound functions or events, remove control nodes, restore physics\n\n\n this._clean();\n\n this.inMode = 'addEdge';\n\n if (this.guiEnabled === true) {\n var locale = this.options.locales[this.options.locale];\n this.manipulationDOM = {};\n\n this._createBackButton(locale);\n\n this._createSeperator();\n\n this._createDescription(locale['edgeDescription'] || this.options.locales['en']['edgeDescription']); // bind the close button\n\n\n this._bindHammerToDiv(this.closeDiv, this.toggleEditMode.bind(this));\n } // temporarily overload functions\n\n\n this._temporaryBindUI('onTouch', this._handleConnect.bind(this));\n\n this._temporaryBindUI('onDragEnd', this._finishConnect.bind(this));\n\n this._temporaryBindUI('onDrag', this._dragControlNode.bind(this));\n\n this._temporaryBindUI('onRelease', this._finishConnect.bind(this));\n\n this._temporaryBindUI('onDragStart', function () {});\n\n this._temporaryBindUI('onHold', function () {});\n }\n /**\n * create the toolbar to edit edges\n */\n\n }, {\n key: 'editEdgeMode',\n value: function editEdgeMode() {\n // when using the gui, enable edit mode if it wasn't already.\n if (this.editMode !== true) {\n this.enableEditMode();\n } // restore the state of any bound functions or events, remove control nodes, restore physics\n\n\n this._clean();\n\n this.inMode = 'editEdge';\n\n if ((0, _typeof3['default'])(this.options.editEdge) === 'object' && typeof this.options.editEdge.editWithoutDrag === \"function\") {\n this.edgeBeingEditedId = this.selectionHandler.getSelectedEdges()[0];\n\n if (this.edgeBeingEditedId !== undefined) {\n var edge = this.body.edges[this.edgeBeingEditedId];\n\n this._performEditEdge(edge.from, edge.to);\n\n return;\n }\n }\n\n if (this.guiEnabled === true) {\n var locale = this.options.locales[this.options.locale];\n this.manipulationDOM = {};\n\n this._createBackButton(locale);\n\n this._createSeperator();\n\n this._createDescription(locale['editEdgeDescription'] || this.options.locales['en']['editEdgeDescription']); // bind the close button\n\n\n this._bindHammerToDiv(this.closeDiv, this.toggleEditMode.bind(this));\n }\n\n this.edgeBeingEditedId = this.selectionHandler.getSelectedEdges()[0];\n\n if (this.edgeBeingEditedId !== undefined) {\n var _edge = this.body.edges[this.edgeBeingEditedId]; // create control nodes\n\n var controlNodeFrom = this._getNewTargetNode(_edge.from.x, _edge.from.y);\n\n var controlNodeTo = this._getNewTargetNode(_edge.to.x, _edge.to.y);\n\n this.temporaryIds.nodes.push(controlNodeFrom.id);\n this.temporaryIds.nodes.push(controlNodeTo.id);\n this.body.nodes[controlNodeFrom.id] = controlNodeFrom;\n this.body.nodeIndices.push(controlNodeFrom.id);\n this.body.nodes[controlNodeTo.id] = controlNodeTo;\n this.body.nodeIndices.push(controlNodeTo.id); // temporarily overload UI functions, cleaned up automatically because of _temporaryBindUI\n\n this._temporaryBindUI('onTouch', this._controlNodeTouch.bind(this)); // used to get the position\n\n\n this._temporaryBindUI('onTap', function () {}); // disabled\n\n\n this._temporaryBindUI('onHold', function () {}); // disabled\n\n\n this._temporaryBindUI('onDragStart', this._controlNodeDragStart.bind(this)); // used to select control node\n\n\n this._temporaryBindUI('onDrag', this._controlNodeDrag.bind(this)); // used to drag control node\n\n\n this._temporaryBindUI('onDragEnd', this._controlNodeDragEnd.bind(this)); // used to connect or revert control nodes\n\n\n this._temporaryBindUI('onMouseMove', function () {}); // disabled\n // create function to position control nodes correctly on movement\n // automatically cleaned up because we use the temporary bind\n\n\n this._temporaryBindEvent('beforeDrawing', function (ctx) {\n var positions = _edge.edgeType.findBorderPositions(ctx);\n\n if (controlNodeFrom.selected === false) {\n controlNodeFrom.x = positions.from.x;\n controlNodeFrom.y = positions.from.y;\n }\n\n if (controlNodeTo.selected === false) {\n controlNodeTo.x = positions.to.x;\n controlNodeTo.y = positions.to.y;\n }\n });\n\n this.body.emitter.emit('_redraw');\n } else {\n this.showManipulatorToolbar();\n }\n }\n /**\n * delete everything in the selection\n */\n\n }, {\n key: 'deleteSelected',\n value: function deleteSelected() {\n var _this3 = this; // when using the gui, enable edit mode if it wasnt already.\n\n\n if (this.editMode !== true) {\n this.enableEditMode();\n } // restore the state of any bound functions or events, remove control nodes, restore physics\n\n\n this._clean();\n\n this.inMode = 'delete';\n var selectedNodes = this.selectionHandler.getSelectedNodes();\n var selectedEdges = this.selectionHandler.getSelectedEdges();\n var deleteFunction = undefined;\n\n if (selectedNodes.length > 0) {\n for (var i = 0; i < selectedNodes.length; i++) {\n if (this.body.nodes[selectedNodes[i]].isCluster === true) {\n alert(this.options.locales[this.options.locale]['deleteClusterError'] || this.options.locales['en']['deleteClusterError']);\n return;\n }\n }\n\n if (typeof this.options.deleteNode === 'function') {\n deleteFunction = this.options.deleteNode;\n }\n } else if (selectedEdges.length > 0) {\n if (typeof this.options.deleteEdge === 'function') {\n deleteFunction = this.options.deleteEdge;\n }\n }\n\n if (typeof deleteFunction === 'function') {\n var data = {\n nodes: selectedNodes,\n edges: selectedEdges\n };\n\n if (deleteFunction.length === 2) {\n deleteFunction(data, function (finalizedData) {\n if (finalizedData !== null && finalizedData !== undefined && _this3.inMode === 'delete') {\n // if for whatever reason the mode has changes (due to dataset change) disregard the callback) {\n _this3.body.data.edges.getDataSet().remove(finalizedData.edges);\n\n _this3.body.data.nodes.getDataSet().remove(finalizedData.nodes);\n\n _this3.body.emitter.emit('startSimulation');\n\n _this3.showManipulatorToolbar();\n } else {\n _this3.body.emitter.emit('startSimulation');\n\n _this3.showManipulatorToolbar();\n }\n });\n } else {\n throw new Error('The function for delete does not support two arguments (data, callback)');\n }\n } else {\n this.body.data.edges.getDataSet().remove(selectedEdges);\n this.body.data.nodes.getDataSet().remove(selectedNodes);\n this.body.emitter.emit('startSimulation');\n this.showManipulatorToolbar();\n }\n } //********************************************** PRIVATE ***************************************//\n\n /**\n * draw or remove the DOM\n * @private\n */\n\n }, {\n key: '_setup',\n value: function _setup() {\n if (this.options.enabled === true) {\n // Enable the GUI\n this.guiEnabled = true;\n\n this._createWrappers();\n\n if (this.editMode === false) {\n this._createEditButton();\n } else {\n this.showManipulatorToolbar();\n }\n } else {\n this._removeManipulationDOM(); // disable the gui\n\n\n this.guiEnabled = false;\n }\n }\n /**\n * create the div overlays that contain the DOM\n * @private\n */\n\n }, {\n key: '_createWrappers',\n value: function _createWrappers() {\n // load the manipulator HTML elements. All styling done in css.\n if (this.manipulationDiv === undefined) {\n this.manipulationDiv = document.createElement('div');\n this.manipulationDiv.className = 'vis-manipulation';\n\n if (this.editMode === true) {\n this.manipulationDiv.style.display = 'block';\n } else {\n this.manipulationDiv.style.display = 'none';\n }\n\n this.canvas.frame.appendChild(this.manipulationDiv);\n } // container for the edit button.\n\n\n if (this.editModeDiv === undefined) {\n this.editModeDiv = document.createElement('div');\n this.editModeDiv.className = 'vis-edit-mode';\n\n if (this.editMode === true) {\n this.editModeDiv.style.display = 'none';\n } else {\n this.editModeDiv.style.display = 'block';\n }\n\n this.canvas.frame.appendChild(this.editModeDiv);\n } // container for the close div button\n\n\n if (this.closeDiv === undefined) {\n this.closeDiv = document.createElement('div');\n this.closeDiv.className = 'vis-close';\n this.closeDiv.style.display = this.manipulationDiv.style.display;\n this.canvas.frame.appendChild(this.closeDiv);\n }\n }\n /**\n * generate a new target node. Used for creating new edges and editing edges\n * @param x\n * @param y\n * @returns {*}\n * @private\n */\n\n }, {\n key: '_getNewTargetNode',\n value: function _getNewTargetNode(x, y) {\n var controlNodeStyle = util.deepExtend({}, this.options.controlNodeStyle);\n controlNodeStyle.id = 'targetNode' + util.randomUUID();\n controlNodeStyle.hidden = false;\n controlNodeStyle.physics = false;\n controlNodeStyle.x = x;\n controlNodeStyle.y = y; // we have to define the bounding box in order for the nodes to be drawn immediately\n\n var node = this.body.functions.createNode(controlNodeStyle);\n node.shape.boundingBox = {\n left: x,\n right: x,\n top: y,\n bottom: y\n };\n return node;\n }\n /**\n * Create the edit button\n */\n\n }, {\n key: '_createEditButton',\n value: function _createEditButton() {\n // restore everything to it's original state (if applicable)\n this._clean(); // reset the manipulationDOM\n\n\n this.manipulationDOM = {}; // empty the editModeDiv\n\n util.recursiveDOMDelete(this.editModeDiv); // create the contents for the editMode button\n\n var locale = this.options.locales[this.options.locale];\n\n var button = this._createButton('editMode', 'vis-button vis-edit vis-edit-mode', locale['edit'] || this.options.locales['en']['edit']);\n\n this.editModeDiv.appendChild(button); // bind a hammer listener to the button, calling the function toggleEditMode.\n\n this._bindHammerToDiv(button, this.toggleEditMode.bind(this));\n }\n /**\n * this function cleans up after everything this module does. Temporary elements, functions and events are removed, physics restored, hammers removed.\n * @private\n */\n\n }, {\n key: '_clean',\n value: function _clean() {\n // not in mode\n this.inMode = false; // _clean the divs\n\n if (this.guiEnabled === true) {\n util.recursiveDOMDelete(this.editModeDiv);\n util.recursiveDOMDelete(this.manipulationDiv); // removes all the bindings and overloads\n\n this._cleanManipulatorHammers();\n } // remove temporary nodes and edges\n\n\n this._cleanupTemporaryNodesAndEdges(); // restore overloaded UI functions\n\n\n this._unbindTemporaryUIs(); // remove the temporaryEventFunctions\n\n\n this._unbindTemporaryEvents(); // restore the physics if required\n\n\n this.body.emitter.emit('restorePhysics');\n }\n /**\n * Each dom element has it's own hammer. They are stored in this.manipulationHammers. This cleans them up.\n * @private\n */\n\n }, {\n key: '_cleanManipulatorHammers',\n value: function _cleanManipulatorHammers() {\n // _clean hammer bindings\n if (this.manipulationHammers.length != 0) {\n for (var i = 0; i < this.manipulationHammers.length; i++) {\n this.manipulationHammers[i].destroy();\n }\n\n this.manipulationHammers = [];\n }\n }\n /**\n * Remove all DOM elements created by this module.\n * @private\n */\n\n }, {\n key: '_removeManipulationDOM',\n value: function _removeManipulationDOM() {\n // removes all the bindings and overloads\n this._clean(); // empty the manipulation divs\n\n\n util.recursiveDOMDelete(this.manipulationDiv);\n util.recursiveDOMDelete(this.editModeDiv);\n util.recursiveDOMDelete(this.closeDiv); // remove the manipulation divs\n\n if (this.manipulationDiv) {\n this.canvas.frame.removeChild(this.manipulationDiv);\n }\n\n if (this.editModeDiv) {\n this.canvas.frame.removeChild(this.editModeDiv);\n }\n\n if (this.closeDiv) {\n this.canvas.frame.removeChild(this.closeDiv);\n } // set the references to undefined\n\n\n this.manipulationDiv = undefined;\n this.editModeDiv = undefined;\n this.closeDiv = undefined;\n }\n /**\n * create a seperator line. the index is to differentiate in the manipulation dom\n * @param index\n * @private\n */\n\n }, {\n key: '_createSeperator',\n value: function _createSeperator() {\n var index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1;\n this.manipulationDOM['seperatorLineDiv' + index] = document.createElement('div');\n this.manipulationDOM['seperatorLineDiv' + index].className = 'vis-separator-line';\n this.manipulationDiv.appendChild(this.manipulationDOM['seperatorLineDiv' + index]);\n } // ---------------------- DOM functions for buttons --------------------------//\n\n }, {\n key: '_createAddNodeButton',\n value: function _createAddNodeButton(locale) {\n var button = this._createButton('addNode', 'vis-button vis-add', locale['addNode'] || this.options.locales['en']['addNode']);\n\n this.manipulationDiv.appendChild(button);\n\n this._bindHammerToDiv(button, this.addNodeMode.bind(this));\n }\n }, {\n key: '_createAddEdgeButton',\n value: function _createAddEdgeButton(locale) {\n var button = this._createButton('addEdge', 'vis-button vis-connect', locale['addEdge'] || this.options.locales['en']['addEdge']);\n\n this.manipulationDiv.appendChild(button);\n\n this._bindHammerToDiv(button, this.addEdgeMode.bind(this));\n }\n }, {\n key: '_createEditNodeButton',\n value: function _createEditNodeButton(locale) {\n var button = this._createButton('editNode', 'vis-button vis-edit', locale['editNode'] || this.options.locales['en']['editNode']);\n\n this.manipulationDiv.appendChild(button);\n\n this._bindHammerToDiv(button, this.editNode.bind(this));\n }\n }, {\n key: '_createEditEdgeButton',\n value: function _createEditEdgeButton(locale) {\n var button = this._createButton('editEdge', 'vis-button vis-edit', locale['editEdge'] || this.options.locales['en']['editEdge']);\n\n this.manipulationDiv.appendChild(button);\n\n this._bindHammerToDiv(button, this.editEdgeMode.bind(this));\n }\n }, {\n key: '_createDeleteButton',\n value: function _createDeleteButton(locale) {\n if (this.options.rtl) {\n var deleteBtnClass = 'vis-button vis-delete-rtl';\n } else {\n var deleteBtnClass = 'vis-button vis-delete';\n }\n\n var button = this._createButton('delete', deleteBtnClass, locale['del'] || this.options.locales['en']['del']);\n\n this.manipulationDiv.appendChild(button);\n\n this._bindHammerToDiv(button, this.deleteSelected.bind(this));\n }\n }, {\n key: '_createBackButton',\n value: function _createBackButton(locale) {\n var button = this._createButton('back', 'vis-button vis-back', locale['back'] || this.options.locales['en']['back']);\n\n this.manipulationDiv.appendChild(button);\n\n this._bindHammerToDiv(button, this.showManipulatorToolbar.bind(this));\n }\n }, {\n key: '_createButton',\n value: function _createButton(id, className, label) {\n var labelClassName = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 'vis-label';\n this.manipulationDOM[id + 'Div'] = document.createElement('div');\n this.manipulationDOM[id + 'Div'].className = className;\n this.manipulationDOM[id + 'Label'] = document.createElement('div');\n this.manipulationDOM[id + 'Label'].className = labelClassName;\n this.manipulationDOM[id + 'Label'].innerHTML = label;\n this.manipulationDOM[id + 'Div'].appendChild(this.manipulationDOM[id + 'Label']);\n return this.manipulationDOM[id + 'Div'];\n }\n }, {\n key: '_createDescription',\n value: function _createDescription(label) {\n this.manipulationDiv.appendChild(this._createButton('description', 'vis-button vis-none', label));\n } // -------------------------- End of DOM functions for buttons ------------------------------//\n\n /**\n * this binds an event until cleanup by the clean functions.\n * @param event\n * @param newFunction\n * @private\n */\n\n }, {\n key: '_temporaryBindEvent',\n value: function _temporaryBindEvent(event, newFunction) {\n this.temporaryEventFunctions.push({\n event: event,\n boundFunction: newFunction\n });\n this.body.emitter.on(event, newFunction);\n }\n /**\n * this overrides an UI function until cleanup by the clean function\n * @param UIfunctionName\n * @param newFunction\n * @private\n */\n\n }, {\n key: '_temporaryBindUI',\n value: function _temporaryBindUI(UIfunctionName, newFunction) {\n if (this.body.eventListeners[UIfunctionName] !== undefined) {\n this.temporaryUIFunctions[UIfunctionName] = this.body.eventListeners[UIfunctionName];\n this.body.eventListeners[UIfunctionName] = newFunction;\n } else {\n throw new Error('This UI function does not exist. Typo? You tried: ' + UIfunctionName + ' possible are: ' + (0, _stringify2['default'])((0, _keys2['default'])(this.body.eventListeners)));\n }\n }\n /**\n * Restore the overridden UI functions to their original state.\n *\n * @private\n */\n\n }, {\n key: '_unbindTemporaryUIs',\n value: function _unbindTemporaryUIs() {\n for (var functionName in this.temporaryUIFunctions) {\n if (this.temporaryUIFunctions.hasOwnProperty(functionName)) {\n this.body.eventListeners[functionName] = this.temporaryUIFunctions[functionName];\n delete this.temporaryUIFunctions[functionName];\n }\n }\n\n this.temporaryUIFunctions = {};\n }\n /**\n * Unbind the events created by _temporaryBindEvent\n * @private\n */\n\n }, {\n key: '_unbindTemporaryEvents',\n value: function _unbindTemporaryEvents() {\n for (var i = 0; i < this.temporaryEventFunctions.length; i++) {\n var eventName = this.temporaryEventFunctions[i].event;\n var boundFunction = this.temporaryEventFunctions[i].boundFunction;\n this.body.emitter.off(eventName, boundFunction);\n }\n\n this.temporaryEventFunctions = [];\n }\n /**\n * Bind an hammer instance to a DOM element.\n * @param domElement\n * @param funct\n */\n\n }, {\n key: '_bindHammerToDiv',\n value: function _bindHammerToDiv(domElement, boundFunction) {\n var hammer = new Hammer(domElement, {});\n hammerUtil.onTouch(hammer, boundFunction);\n this.manipulationHammers.push(hammer);\n }\n /**\n * Neatly clean up temporary edges and nodes\n * @private\n */\n\n }, {\n key: '_cleanupTemporaryNodesAndEdges',\n value: function _cleanupTemporaryNodesAndEdges() {\n // _clean temporary edges\n for (var i = 0; i < this.temporaryIds.edges.length; i++) {\n this.body.edges[this.temporaryIds.edges[i]].disconnect();\n delete this.body.edges[this.temporaryIds.edges[i]];\n var indexTempEdge = this.body.edgeIndices.indexOf(this.temporaryIds.edges[i]);\n\n if (indexTempEdge !== -1) {\n this.body.edgeIndices.splice(indexTempEdge, 1);\n }\n } // _clean temporary nodes\n\n\n for (var _i = 0; _i < this.temporaryIds.nodes.length; _i++) {\n delete this.body.nodes[this.temporaryIds.nodes[_i]];\n var indexTempNode = this.body.nodeIndices.indexOf(this.temporaryIds.nodes[_i]);\n\n if (indexTempNode !== -1) {\n this.body.nodeIndices.splice(indexTempNode, 1);\n }\n }\n\n this.temporaryIds = {\n nodes: [],\n edges: []\n };\n } // ------------------------------------------ EDIT EDGE FUNCTIONS -----------------------------------------//\n\n /**\n * the touch is used to get the position of the initial click\n * @param event\n * @private\n */\n\n }, {\n key: '_controlNodeTouch',\n value: function _controlNodeTouch(event) {\n this.selectionHandler.unselectAll();\n this.lastTouch = this.body.functions.getPointer(event.center);\n this.lastTouch.translation = util.extend({}, this.body.view.translation); // copy the object\n }\n /**\n * the drag start is used to mark one of the control nodes as selected.\n * @param event\n * @private\n */\n\n }, {\n key: '_controlNodeDragStart',\n value: function _controlNodeDragStart(event) {\n var pointer = this.lastTouch;\n\n var pointerObj = this.selectionHandler._pointerToPositionObject(pointer);\n\n var from = this.body.nodes[this.temporaryIds.nodes[0]];\n var to = this.body.nodes[this.temporaryIds.nodes[1]];\n var edge = this.body.edges[this.edgeBeingEditedId];\n this.selectedControlNode = undefined;\n var fromSelect = from.isOverlappingWith(pointerObj);\n var toSelect = to.isOverlappingWith(pointerObj);\n\n if (fromSelect === true) {\n this.selectedControlNode = from;\n edge.edgeType.from = from;\n } else if (toSelect === true) {\n this.selectedControlNode = to;\n edge.edgeType.to = to;\n } // we use the selection to find the node that is being dragged. We explicitly select it here.\n\n\n if (this.selectedControlNode !== undefined) {\n this.selectionHandler.selectObject(this.selectedControlNode);\n }\n\n this.body.emitter.emit('_redraw');\n }\n /**\n * dragging the control nodes or the canvas\n * @param event\n * @private\n */\n\n }, {\n key: '_controlNodeDrag',\n value: function _controlNodeDrag(event) {\n this.body.emitter.emit('disablePhysics');\n var pointer = this.body.functions.getPointer(event.center);\n var pos = this.canvas.DOMtoCanvas(pointer);\n\n if (this.selectedControlNode !== undefined) {\n this.selectedControlNode.x = pos.x;\n this.selectedControlNode.y = pos.y;\n } else {\n // if the drag was not started properly because the click started outside the network div, start it now.\n var diffX = pointer.x - this.lastTouch.x;\n var diffY = pointer.y - this.lastTouch.y;\n this.body.view.translation = {\n x: this.lastTouch.translation.x + diffX,\n y: this.lastTouch.translation.y + diffY\n };\n }\n\n this.body.emitter.emit('_redraw');\n }\n /**\n * connecting or restoring the control nodes.\n * @param event\n * @private\n */\n\n }, {\n key: '_controlNodeDragEnd',\n value: function _controlNodeDragEnd(event) {\n var pointer = this.body.functions.getPointer(event.center);\n\n var pointerObj = this.selectionHandler._pointerToPositionObject(pointer);\n\n var edge = this.body.edges[this.edgeBeingEditedId]; // if the node that was dragged is not a control node, return\n\n if (this.selectedControlNode === undefined) {\n return;\n } // we use the selection to find the node that is being dragged. We explicitly DEselect the control node here.\n\n\n this.selectionHandler.unselectAll();\n\n var overlappingNodeIds = this.selectionHandler._getAllNodesOverlappingWith(pointerObj);\n\n var node = undefined;\n\n for (var i = overlappingNodeIds.length - 1; i >= 0; i--) {\n if (overlappingNodeIds[i] !== this.selectedControlNode.id) {\n node = this.body.nodes[overlappingNodeIds[i]];\n break;\n }\n } // perform the connection\n\n\n if (node !== undefined && this.selectedControlNode !== undefined) {\n if (node.isCluster === true) {\n alert(this.options.locales[this.options.locale]['createEdgeError'] || this.options.locales['en']['createEdgeError']);\n } else {\n var from = this.body.nodes[this.temporaryIds.nodes[0]];\n\n if (this.selectedControlNode.id === from.id) {\n this._performEditEdge(node.id, edge.to.id);\n } else {\n this._performEditEdge(edge.from.id, node.id);\n }\n }\n } else {\n edge.updateEdgeType();\n this.body.emitter.emit('restorePhysics');\n }\n\n this.body.emitter.emit('_redraw');\n } // ------------------------------------ END OF EDIT EDGE FUNCTIONS -----------------------------------------//\n // ------------------------------------------- ADD EDGE FUNCTIONS -----------------------------------------//\n\n /**\n * the function bound to the selection event. It checks if you want to connect a cluster and changes the description\n * to walk the user through the process.\n *\n * @private\n */\n\n }, {\n key: '_handleConnect',\n value: function _handleConnect(event) {\n // check to avoid double fireing of this function.\n if (new Date().valueOf() - this.touchTime > 100) {\n this.lastTouch = this.body.functions.getPointer(event.center);\n this.lastTouch.translation = util.extend({}, this.body.view.translation); // copy the object\n\n var pointer = this.lastTouch;\n var node = this.selectionHandler.getNodeAt(pointer);\n\n if (node !== undefined) {\n if (node.isCluster === true) {\n alert(this.options.locales[this.options.locale]['createEdgeError'] || this.options.locales['en']['createEdgeError']);\n } else {\n // create a node the temporary line can look at\n var targetNode = this._getNewTargetNode(node.x, node.y);\n\n this.body.nodes[targetNode.id] = targetNode;\n this.body.nodeIndices.push(targetNode.id); // create a temporary edge\n\n var connectionEdge = this.body.functions.createEdge({\n id: 'connectionEdge' + util.randomUUID(),\n from: node.id,\n to: targetNode.id,\n physics: false,\n smooth: {\n enabled: true,\n type: 'continuous',\n roundness: 0.5\n }\n });\n this.body.edges[connectionEdge.id] = connectionEdge;\n this.body.edgeIndices.push(connectionEdge.id);\n this.temporaryIds.nodes.push(targetNode.id);\n this.temporaryIds.edges.push(connectionEdge.id);\n }\n }\n\n this.touchTime = new Date().valueOf();\n }\n }\n }, {\n key: '_dragControlNode',\n value: function _dragControlNode(event) {\n var pointer = this.body.functions.getPointer(event.center);\n\n if (this.temporaryIds.nodes[0] !== undefined) {\n var targetNode = this.body.nodes[this.temporaryIds.nodes[0]]; // there is only one temp node in the add edge mode.\n\n targetNode.x = this.canvas._XconvertDOMtoCanvas(pointer.x);\n targetNode.y = this.canvas._YconvertDOMtoCanvas(pointer.y);\n this.body.emitter.emit('_redraw');\n } else {\n var diffX = pointer.x - this.lastTouch.x;\n var diffY = pointer.y - this.lastTouch.y;\n this.body.view.translation = {\n x: this.lastTouch.translation.x + diffX,\n y: this.lastTouch.translation.y + diffY\n };\n }\n }\n /**\n * Connect the new edge to the target if one exists, otherwise remove temp line\n * @param event\n * @private\n */\n\n }, {\n key: '_finishConnect',\n value: function _finishConnect(event) {\n var pointer = this.body.functions.getPointer(event.center);\n\n var pointerObj = this.selectionHandler._pointerToPositionObject(pointer); // remember the edge id\n\n\n var connectFromId = undefined;\n\n if (this.temporaryIds.edges[0] !== undefined) {\n connectFromId = this.body.edges[this.temporaryIds.edges[0]].fromId;\n } // get the overlapping node but NOT the temporary node;\n\n\n var overlappingNodeIds = this.selectionHandler._getAllNodesOverlappingWith(pointerObj);\n\n var node = undefined;\n\n for (var i = overlappingNodeIds.length - 1; i >= 0; i--) {\n // if the node id is NOT a temporary node, accept the node.\n if (this.temporaryIds.nodes.indexOf(overlappingNodeIds[i]) === -1) {\n node = this.body.nodes[overlappingNodeIds[i]];\n break;\n }\n } // clean temporary nodes and edges.\n\n\n this._cleanupTemporaryNodesAndEdges(); // perform the connection\n\n\n if (node !== undefined) {\n if (node.isCluster === true) {\n alert(this.options.locales[this.options.locale]['createEdgeError'] || this.options.locales['en']['createEdgeError']);\n } else {\n if (this.body.nodes[connectFromId] !== undefined && this.body.nodes[node.id] !== undefined) {\n this._performAddEdge(connectFromId, node.id);\n }\n }\n }\n\n this.body.emitter.emit('_redraw');\n } // --------------------------------------- END OF ADD EDGE FUNCTIONS -------------------------------------//\n // ------------------------------ Performing all the actual data manipulation ------------------------//\n\n /**\n * Adds a node on the specified location\n */\n\n }, {\n key: '_performAddNode',\n value: function _performAddNode(clickData) {\n var _this4 = this;\n\n var defaultData = {\n id: util.randomUUID(),\n x: clickData.pointer.canvas.x,\n y: clickData.pointer.canvas.y,\n label: 'new'\n };\n\n if (typeof this.options.addNode === 'function') {\n if (this.options.addNode.length === 2) {\n this.options.addNode(defaultData, function (finalizedData) {\n if (finalizedData !== null && finalizedData !== undefined && _this4.inMode === 'addNode') {\n // if for whatever reason the mode has changes (due to dataset change) disregard the callback\n _this4.body.data.nodes.getDataSet().add(finalizedData);\n\n _this4.showManipulatorToolbar();\n }\n });\n } else {\n throw new Error('The function for add does not support two arguments (data,callback)');\n this.showManipulatorToolbar();\n }\n } else {\n this.body.data.nodes.getDataSet().add(defaultData);\n this.showManipulatorToolbar();\n }\n }\n /**\n * connect two nodes with a new edge.\n *\n * @private\n */\n\n }, {\n key: '_performAddEdge',\n value: function _performAddEdge(sourceNodeId, targetNodeId) {\n var _this5 = this;\n\n var defaultData = {\n from: sourceNodeId,\n to: targetNodeId\n };\n\n if (typeof this.options.addEdge === 'function') {\n if (this.options.addEdge.length === 2) {\n this.options.addEdge(defaultData, function (finalizedData) {\n if (finalizedData !== null && finalizedData !== undefined && _this5.inMode === 'addEdge') {\n // if for whatever reason the mode has changes (due to dataset change) disregard the callback\n _this5.body.data.edges.getDataSet().add(finalizedData);\n\n _this5.selectionHandler.unselectAll();\n\n _this5.showManipulatorToolbar();\n }\n });\n } else {\n throw new Error('The function for connect does not support two arguments (data,callback)');\n }\n } else {\n this.body.data.edges.getDataSet().add(defaultData);\n this.selectionHandler.unselectAll();\n this.showManipulatorToolbar();\n }\n }\n /**\n * connect two nodes with a new edge.\n *\n * @private\n */\n\n }, {\n key: '_performEditEdge',\n value: function _performEditEdge(sourceNodeId, targetNodeId) {\n var _this6 = this;\n\n var defaultData = {\n id: this.edgeBeingEditedId,\n from: sourceNodeId,\n to: targetNodeId,\n label: this.body.data.edges._data[this.edgeBeingEditedId].label\n };\n var eeFunct = this.options.editEdge;\n\n if ((typeof eeFunct === 'undefined' ? 'undefined' : (0, _typeof3['default'])(eeFunct)) === 'object') {\n eeFunct = eeFunct.editWithoutDrag;\n }\n\n if (typeof eeFunct === 'function') {\n if (eeFunct.length === 2) {\n eeFunct(defaultData, function (finalizedData) {\n if (finalizedData === null || finalizedData === undefined || _this6.inMode !== 'editEdge') {\n // if for whatever reason the mode has changes (due to dataset change) disregard the callback) {\n _this6.body.edges[defaultData.id].updateEdgeType();\n\n _this6.body.emitter.emit('_redraw');\n\n _this6.showManipulatorToolbar();\n } else {\n _this6.body.data.edges.getDataSet().update(finalizedData);\n\n _this6.selectionHandler.unselectAll();\n\n _this6.showManipulatorToolbar();\n }\n });\n } else {\n throw new Error('The function for edit does not support two arguments (data, callback)');\n }\n } else {\n this.body.data.edges.getDataSet().update(defaultData);\n this.selectionHandler.unselectAll();\n this.showManipulatorToolbar();\n }\n }\n }]);\n return ManipulationSystem;\n }();\n\n exports['default'] = ManipulationSystem;\n /***/\n },\n /* 224 */\n\n /***/\n function (module, exports) {\n 'use strict';\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n /**\n * This object contains all possible options. It will check if the types are correct, if required if the option is one\n * of the allowed values.\n *\n * __any__ means that the name of the property does not matter.\n * __type__ is a required field for all objects and contains the allowed types of all objects\n */\n\n var string = 'string';\n var bool = 'boolean';\n var number = 'number';\n var array = 'array';\n var object = 'object'; // should only be in a __type__ property\n\n var dom = 'dom';\n var any = 'any';\n var allOptions = {\n configure: {\n enabled: {\n boolean: bool\n },\n filter: {\n boolean: bool,\n string: string,\n array: array,\n 'function': 'function'\n },\n container: {\n dom: dom\n },\n showButton: {\n boolean: bool\n },\n __type__: {\n object: object,\n boolean: bool,\n string: string,\n array: array,\n 'function': 'function'\n }\n },\n edges: {\n arrows: {\n to: {\n enabled: {\n boolean: bool\n },\n scaleFactor: {\n number: number\n },\n type: {\n string: ['arrow', 'circle']\n },\n __type__: {\n object: object,\n boolean: bool\n }\n },\n middle: {\n enabled: {\n boolean: bool\n },\n scaleFactor: {\n number: number\n },\n type: {\n string: ['arrow', 'circle']\n },\n __type__: {\n object: object,\n boolean: bool\n }\n },\n from: {\n enabled: {\n boolean: bool\n },\n scaleFactor: {\n number: number\n },\n type: {\n string: ['arrow', 'circle']\n },\n __type__: {\n object: object,\n boolean: bool\n }\n },\n __type__: {\n string: ['from', 'to', 'middle'],\n object: object\n }\n },\n arrowStrikethrough: {\n boolean: bool\n },\n chosen: {\n label: {\n boolean: bool,\n 'function': 'function'\n },\n edge: {\n boolean: bool,\n 'function': 'function'\n },\n __type__: {\n object: object,\n boolean: bool\n }\n },\n color: {\n color: {\n string: string\n },\n highlight: {\n string: string\n },\n hover: {\n string: string\n },\n inherit: {\n string: ['from', 'to', 'both'],\n boolean: bool\n },\n opacity: {\n number: number\n },\n __type__: {\n object: object,\n string: string\n }\n },\n dashes: {\n boolean: bool,\n array: array\n },\n font: {\n color: {\n string: string\n },\n size: {\n number: number\n },\n // px\n face: {\n string: string\n },\n background: {\n string: string\n },\n strokeWidth: {\n number: number\n },\n // px\n strokeColor: {\n string: string\n },\n align: {\n string: ['horizontal', 'top', 'middle', 'bottom']\n },\n vadjust: {\n number: number\n },\n multi: {\n boolean: bool,\n string: string\n },\n bold: {\n color: {\n string: string\n },\n size: {\n number: number\n },\n // px\n face: {\n string: string\n },\n mod: {\n string: string\n },\n vadjust: {\n number: number\n },\n __type__: {\n object: object,\n string: string\n }\n },\n boldital: {\n color: {\n string: string\n },\n size: {\n number: number\n },\n // px\n face: {\n string: string\n },\n mod: {\n string: string\n },\n vadjust: {\n number: number\n },\n __type__: {\n object: object,\n string: string\n }\n },\n ital: {\n color: {\n string: string\n },\n size: {\n number: number\n },\n // px\n face: {\n string: string\n },\n mod: {\n string: string\n },\n vadjust: {\n number: number\n },\n __type__: {\n object: object,\n string: string\n }\n },\n mono: {\n color: {\n string: string\n },\n size: {\n number: number\n },\n // px\n face: {\n string: string\n },\n mod: {\n string: string\n },\n vadjust: {\n number: number\n },\n __type__: {\n object: object,\n string: string\n }\n },\n __type__: {\n object: object,\n string: string\n }\n },\n hidden: {\n boolean: bool\n },\n hoverWidth: {\n 'function': 'function',\n number: number\n },\n label: {\n string: string,\n 'undefined': 'undefined'\n },\n labelHighlightBold: {\n boolean: bool\n },\n length: {\n number: number,\n 'undefined': 'undefined'\n },\n physics: {\n boolean: bool\n },\n scaling: {\n min: {\n number: number\n },\n max: {\n number: number\n },\n label: {\n enabled: {\n boolean: bool\n },\n min: {\n number: number\n },\n max: {\n number: number\n },\n maxVisible: {\n number: number\n },\n drawThreshold: {\n number: number\n },\n __type__: {\n object: object,\n boolean: bool\n }\n },\n customScalingFunction: {\n 'function': 'function'\n },\n __type__: {\n object: object\n }\n },\n selectionWidth: {\n 'function': 'function',\n number: number\n },\n selfReferenceSize: {\n number: number\n },\n shadow: {\n enabled: {\n boolean: bool\n },\n color: {\n string: string\n },\n size: {\n number: number\n },\n x: {\n number: number\n },\n y: {\n number: number\n },\n __type__: {\n object: object,\n boolean: bool\n }\n },\n smooth: {\n enabled: {\n boolean: bool\n },\n type: {\n string: ['dynamic', 'continuous', 'discrete', 'diagonalCross', 'straightCross', 'horizontal', 'vertical', 'curvedCW', 'curvedCCW', 'cubicBezier']\n },\n roundness: {\n number: number\n },\n forceDirection: {\n string: ['horizontal', 'vertical', 'none'],\n boolean: bool\n },\n __type__: {\n object: object,\n boolean: bool\n }\n },\n title: {\n string: string,\n 'undefined': 'undefined'\n },\n width: {\n number: number\n },\n widthConstraint: {\n maximum: {\n number: number\n },\n __type__: {\n object: object,\n boolean: bool,\n number: number\n }\n },\n value: {\n number: number,\n 'undefined': 'undefined'\n },\n __type__: {\n object: object\n }\n },\n groups: {\n useDefaultGroups: {\n boolean: bool\n },\n __any__: 'get from nodes, will be overwritten below',\n __type__: {\n object: object\n }\n },\n interaction: {\n dragNodes: {\n boolean: bool\n },\n dragView: {\n boolean: bool\n },\n hideEdgesOnDrag: {\n boolean: bool\n },\n hideNodesOnDrag: {\n boolean: bool\n },\n hover: {\n boolean: bool\n },\n keyboard: {\n enabled: {\n boolean: bool\n },\n speed: {\n x: {\n number: number\n },\n y: {\n number: number\n },\n zoom: {\n number: number\n },\n __type__: {\n object: object\n }\n },\n bindToWindow: {\n boolean: bool\n },\n __type__: {\n object: object,\n boolean: bool\n }\n },\n multiselect: {\n boolean: bool\n },\n navigationButtons: {\n boolean: bool\n },\n selectable: {\n boolean: bool\n },\n selectConnectedEdges: {\n boolean: bool\n },\n hoverConnectedEdges: {\n boolean: bool\n },\n tooltipDelay: {\n number: number\n },\n zoomView: {\n boolean: bool\n },\n __type__: {\n object: object\n }\n },\n layout: {\n randomSeed: {\n 'undefined': 'undefined',\n number: number\n },\n improvedLayout: {\n boolean: bool\n },\n hierarchical: {\n enabled: {\n boolean: bool\n },\n levelSeparation: {\n number: number\n },\n nodeSpacing: {\n number: number\n },\n treeSpacing: {\n number: number\n },\n blockShifting: {\n boolean: bool\n },\n edgeMinimization: {\n boolean: bool\n },\n parentCentralization: {\n boolean: bool\n },\n direction: {\n string: ['UD', 'DU', 'LR', 'RL']\n },\n // UD, DU, LR, RL\n sortMethod: {\n string: ['hubsize', 'directed']\n },\n // hubsize, directed\n __type__: {\n object: object,\n boolean: bool\n }\n },\n __type__: {\n object: object\n }\n },\n manipulation: {\n enabled: {\n boolean: bool\n },\n initiallyActive: {\n boolean: bool\n },\n addNode: {\n boolean: bool,\n 'function': 'function'\n },\n addEdge: {\n boolean: bool,\n 'function': 'function'\n },\n editNode: {\n 'function': 'function'\n },\n editEdge: {\n editWithoutDrag: {\n 'function': 'function'\n },\n __type__: {\n object: object,\n boolean: bool,\n 'function': 'function'\n }\n },\n deleteNode: {\n boolean: bool,\n 'function': 'function'\n },\n deleteEdge: {\n boolean: bool,\n 'function': 'function'\n },\n controlNodeStyle: 'get from nodes, will be overwritten below',\n __type__: {\n object: object,\n boolean: bool\n }\n },\n nodes: {\n borderWidth: {\n number: number\n },\n borderWidthSelected: {\n number: number,\n 'undefined': 'undefined'\n },\n brokenImage: {\n string: string,\n 'undefined': 'undefined'\n },\n chosen: {\n label: {\n boolean: bool,\n 'function': 'function'\n },\n node: {\n boolean: bool,\n 'function': 'function'\n },\n __type__: {\n object: object,\n boolean: bool\n }\n },\n color: {\n border: {\n string: string\n },\n background: {\n string: string\n },\n highlight: {\n border: {\n string: string\n },\n background: {\n string: string\n },\n __type__: {\n object: object,\n string: string\n }\n },\n hover: {\n border: {\n string: string\n },\n background: {\n string: string\n },\n __type__: {\n object: object,\n string: string\n }\n },\n __type__: {\n object: object,\n string: string\n }\n },\n fixed: {\n x: {\n boolean: bool\n },\n y: {\n boolean: bool\n },\n __type__: {\n object: object,\n boolean: bool\n }\n },\n font: {\n align: {\n string: string\n },\n color: {\n string: string\n },\n size: {\n number: number\n },\n // px\n face: {\n string: string\n },\n background: {\n string: string\n },\n strokeWidth: {\n number: number\n },\n // px\n strokeColor: {\n string: string\n },\n vadjust: {\n number: number\n },\n multi: {\n boolean: bool,\n string: string\n },\n bold: {\n color: {\n string: string\n },\n size: {\n number: number\n },\n // px\n face: {\n string: string\n },\n mod: {\n string: string\n },\n vadjust: {\n number: number\n },\n __type__: {\n object: object,\n string: string\n }\n },\n boldital: {\n color: {\n string: string\n },\n size: {\n number: number\n },\n // px\n face: {\n string: string\n },\n mod: {\n string: string\n },\n vadjust: {\n number: number\n },\n __type__: {\n object: object,\n string: string\n }\n },\n ital: {\n color: {\n string: string\n },\n size: {\n number: number\n },\n // px\n face: {\n string: string\n },\n mod: {\n string: string\n },\n vadjust: {\n number: number\n },\n __type__: {\n object: object,\n string: string\n }\n },\n mono: {\n color: {\n string: string\n },\n size: {\n number: number\n },\n // px\n face: {\n string: string\n },\n mod: {\n string: string\n },\n vadjust: {\n number: number\n },\n __type__: {\n object: object,\n string: string\n }\n },\n __type__: {\n object: object,\n string: string\n }\n },\n group: {\n string: string,\n number: number,\n 'undefined': 'undefined'\n },\n heightConstraint: {\n minimum: {\n number: number\n },\n valign: {\n string: string\n },\n __type__: {\n object: object,\n boolean: bool,\n number: number\n }\n },\n hidden: {\n boolean: bool\n },\n icon: {\n face: {\n string: string\n },\n code: {\n string: string\n },\n //'\\uf007',\n size: {\n number: number\n },\n //50,\n color: {\n string: string\n },\n __type__: {\n object: object\n }\n },\n id: {\n string: string,\n number: number\n },\n image: {\n selected: {\n string: string,\n 'undefined': 'undefined'\n },\n // --> URL\n unselected: {\n string: string,\n 'undefined': 'undefined'\n },\n // --> URL\n __type__: {\n object: object,\n string: string\n }\n },\n label: {\n string: string,\n 'undefined': 'undefined'\n },\n labelHighlightBold: {\n boolean: bool\n },\n level: {\n number: number,\n 'undefined': 'undefined'\n },\n margin: {\n top: {\n number: number\n },\n right: {\n number: number\n },\n bottom: {\n number: number\n },\n left: {\n number: number\n },\n __type__: {\n object: object,\n number: number\n }\n },\n mass: {\n number: number\n },\n physics: {\n boolean: bool\n },\n scaling: {\n min: {\n number: number\n },\n max: {\n number: number\n },\n label: {\n enabled: {\n boolean: bool\n },\n min: {\n number: number\n },\n max: {\n number: number\n },\n maxVisible: {\n number: number\n },\n drawThreshold: {\n number: number\n },\n __type__: {\n object: object,\n boolean: bool\n }\n },\n customScalingFunction: {\n 'function': 'function'\n },\n __type__: {\n object: object\n }\n },\n shadow: {\n enabled: {\n boolean: bool\n },\n color: {\n string: string\n },\n size: {\n number: number\n },\n x: {\n number: number\n },\n y: {\n number: number\n },\n __type__: {\n object: object,\n boolean: bool\n }\n },\n shape: {\n string: ['ellipse', 'circle', 'database', 'box', 'text', 'image', 'circularImage', 'diamond', 'dot', 'star', 'triangle', 'triangleDown', 'square', 'icon']\n },\n shapeProperties: {\n borderDashes: {\n boolean: bool,\n array: array\n },\n borderRadius: {\n number: number\n },\n interpolation: {\n boolean: bool\n },\n useImageSize: {\n boolean: bool\n },\n useBorderWithImage: {\n boolean: bool\n },\n __type__: {\n object: object\n }\n },\n size: {\n number: number\n },\n title: {\n string: string,\n 'undefined': 'undefined'\n },\n value: {\n number: number,\n 'undefined': 'undefined'\n },\n widthConstraint: {\n minimum: {\n number: number\n },\n maximum: {\n number: number\n },\n __type__: {\n object: object,\n boolean: bool,\n number: number\n }\n },\n x: {\n number: number\n },\n y: {\n number: number\n },\n __type__: {\n object: object\n }\n },\n physics: {\n enabled: {\n boolean: bool\n },\n barnesHut: {\n gravitationalConstant: {\n number: number\n },\n centralGravity: {\n number: number\n },\n springLength: {\n number: number\n },\n springConstant: {\n number: number\n },\n damping: {\n number: number\n },\n avoidOverlap: {\n number: number\n },\n __type__: {\n object: object\n }\n },\n forceAtlas2Based: {\n gravitationalConstant: {\n number: number\n },\n centralGravity: {\n number: number\n },\n springLength: {\n number: number\n },\n springConstant: {\n number: number\n },\n damping: {\n number: number\n },\n avoidOverlap: {\n number: number\n },\n __type__: {\n object: object\n }\n },\n repulsion: {\n centralGravity: {\n number: number\n },\n springLength: {\n number: number\n },\n springConstant: {\n number: number\n },\n nodeDistance: {\n number: number\n },\n damping: {\n number: number\n },\n __type__: {\n object: object\n }\n },\n hierarchicalRepulsion: {\n centralGravity: {\n number: number\n },\n springLength: {\n number: number\n },\n springConstant: {\n number: number\n },\n nodeDistance: {\n number: number\n },\n damping: {\n number: number\n },\n __type__: {\n object: object\n }\n },\n maxVelocity: {\n number: number\n },\n minVelocity: {\n number: number\n },\n // px/s\n solver: {\n string: ['barnesHut', 'repulsion', 'hierarchicalRepulsion', 'forceAtlas2Based']\n },\n stabilization: {\n enabled: {\n boolean: bool\n },\n iterations: {\n number: number\n },\n // maximum number of iteration to stabilize\n updateInterval: {\n number: number\n },\n onlyDynamicEdges: {\n boolean: bool\n },\n fit: {\n boolean: bool\n },\n __type__: {\n object: object,\n boolean: bool\n }\n },\n timestep: {\n number: number\n },\n adaptiveTimestep: {\n boolean: bool\n },\n __type__: {\n object: object,\n boolean: bool\n }\n },\n //globals :\n autoResize: {\n boolean: bool\n },\n clickToUse: {\n boolean: bool\n },\n locale: {\n string: string\n },\n locales: {\n __any__: {\n any: any\n },\n __type__: {\n object: object\n }\n },\n height: {\n string: string\n },\n width: {\n string: string\n },\n __type__: {\n object: object\n }\n };\n allOptions.groups.__any__ = allOptions.nodes;\n allOptions.manipulation.controlNodeStyle = allOptions.nodes;\n var configureOptions = {\n nodes: {\n borderWidth: [1, 0, 10, 1],\n borderWidthSelected: [2, 0, 10, 1],\n color: {\n border: ['color', '#2B7CE9'],\n background: ['color', '#97C2FC'],\n highlight: {\n border: ['color', '#2B7CE9'],\n background: ['color', '#D2E5FF']\n },\n hover: {\n border: ['color', '#2B7CE9'],\n background: ['color', '#D2E5FF']\n }\n },\n fixed: {\n x: false,\n y: false\n },\n font: {\n color: ['color', '#343434'],\n size: [14, 0, 100, 1],\n // px\n face: ['arial', 'verdana', 'tahoma'],\n background: ['color', 'none'],\n strokeWidth: [0, 0, 50, 1],\n // px\n strokeColor: ['color', '#ffffff']\n },\n //group: 'string',\n hidden: false,\n labelHighlightBold: true,\n //icon: {\n // face: 'string', //'FontAwesome',\n // code: 'string', //'\\uf007',\n // size: [50, 0, 200, 1], //50,\n // color: ['color','#2B7CE9'] //'#aa00ff'\n //},\n //image: 'string', // --> URL\n physics: true,\n scaling: {\n min: [10, 0, 200, 1],\n max: [30, 0, 200, 1],\n label: {\n enabled: false,\n min: [14, 0, 200, 1],\n max: [30, 0, 200, 1],\n maxVisible: [30, 0, 200, 1],\n drawThreshold: [5, 0, 20, 1]\n }\n },\n shadow: {\n enabled: false,\n color: 'rgba(0,0,0,0.5)',\n size: [10, 0, 20, 1],\n x: [5, -30, 30, 1],\n y: [5, -30, 30, 1]\n },\n shape: ['ellipse', 'box', 'circle', 'database', 'diamond', 'dot', 'square', 'star', 'text', 'triangle', 'triangleDown'],\n shapeProperties: {\n borderDashes: false,\n borderRadius: [6, 0, 20, 1],\n interpolation: true,\n useImageSize: false\n },\n size: [25, 0, 200, 1]\n },\n edges: {\n arrows: {\n to: {\n enabled: false,\n scaleFactor: [1, 0, 3, 0.05],\n type: 'arrow'\n },\n middle: {\n enabled: false,\n scaleFactor: [1, 0, 3, 0.05],\n type: 'arrow'\n },\n from: {\n enabled: false,\n scaleFactor: [1, 0, 3, 0.05],\n type: 'arrow'\n }\n },\n arrowStrikethrough: true,\n color: {\n color: ['color', '#848484'],\n highlight: ['color', '#848484'],\n hover: ['color', '#848484'],\n inherit: ['from', 'to', 'both', true, false],\n opacity: [1, 0, 1, 0.05]\n },\n dashes: false,\n font: {\n color: ['color', '#343434'],\n size: [14, 0, 100, 1],\n // px\n face: ['arial', 'verdana', 'tahoma'],\n background: ['color', 'none'],\n strokeWidth: [2, 0, 50, 1],\n // px\n strokeColor: ['color', '#ffffff'],\n align: ['horizontal', 'top', 'middle', 'bottom']\n },\n hidden: false,\n hoverWidth: [1.5, 0, 5, 0.1],\n labelHighlightBold: true,\n physics: true,\n scaling: {\n min: [1, 0, 100, 1],\n max: [15, 0, 100, 1],\n label: {\n enabled: true,\n min: [14, 0, 200, 1],\n max: [30, 0, 200, 1],\n maxVisible: [30, 0, 200, 1],\n drawThreshold: [5, 0, 20, 1]\n }\n },\n selectionWidth: [1.5, 0, 5, 0.1],\n selfReferenceSize: [20, 0, 200, 1],\n shadow: {\n enabled: false,\n color: 'rgba(0,0,0,0.5)',\n size: [10, 0, 20, 1],\n x: [5, -30, 30, 1],\n y: [5, -30, 30, 1]\n },\n smooth: {\n enabled: true,\n type: ['dynamic', 'continuous', 'discrete', 'diagonalCross', 'straightCross', 'horizontal', 'vertical', 'curvedCW', 'curvedCCW', 'cubicBezier'],\n forceDirection: ['horizontal', 'vertical', 'none'],\n roundness: [0.5, 0, 1, 0.05]\n },\n width: [1, 0, 30, 1]\n },\n layout: {\n //randomSeed: [0, 0, 500, 1],\n //improvedLayout: true,\n hierarchical: {\n enabled: false,\n levelSeparation: [150, 20, 500, 5],\n nodeSpacing: [100, 20, 500, 5],\n treeSpacing: [200, 20, 500, 5],\n blockShifting: true,\n edgeMinimization: true,\n parentCentralization: true,\n direction: ['UD', 'DU', 'LR', 'RL'],\n // UD, DU, LR, RL\n sortMethod: ['hubsize', 'directed'] // hubsize, directed\n\n }\n },\n interaction: {\n dragNodes: true,\n dragView: true,\n hideEdgesOnDrag: false,\n hideNodesOnDrag: false,\n hover: false,\n keyboard: {\n enabled: false,\n speed: {\n x: [10, 0, 40, 1],\n y: [10, 0, 40, 1],\n zoom: [0.02, 0, 0.1, 0.005]\n },\n bindToWindow: true\n },\n multiselect: false,\n navigationButtons: false,\n selectable: true,\n selectConnectedEdges: true,\n hoverConnectedEdges: true,\n tooltipDelay: [300, 0, 1000, 25],\n zoomView: true\n },\n manipulation: {\n enabled: false,\n initiallyActive: false\n },\n physics: {\n enabled: true,\n barnesHut: {\n //theta: [0.5, 0.1, 1, 0.05],\n gravitationalConstant: [-2000, -30000, 0, 50],\n centralGravity: [0.3, 0, 10, 0.05],\n springLength: [95, 0, 500, 5],\n springConstant: [0.04, 0, 1.2, 0.005],\n damping: [0.09, 0, 1, 0.01],\n avoidOverlap: [0, 0, 1, 0.01]\n },\n forceAtlas2Based: {\n //theta: [0.5, 0.1, 1, 0.05],\n gravitationalConstant: [-50, -500, 0, 1],\n centralGravity: [0.01, 0, 1, 0.005],\n springLength: [95, 0, 500, 5],\n springConstant: [0.08, 0, 1.2, 0.005],\n damping: [0.4, 0, 1, 0.01],\n avoidOverlap: [0, 0, 1, 0.01]\n },\n repulsion: {\n centralGravity: [0.2, 0, 10, 0.05],\n springLength: [200, 0, 500, 5],\n springConstant: [0.05, 0, 1.2, 0.005],\n nodeDistance: [100, 0, 500, 5],\n damping: [0.09, 0, 1, 0.01]\n },\n hierarchicalRepulsion: {\n centralGravity: [0.2, 0, 10, 0.05],\n springLength: [100, 0, 500, 5],\n springConstant: [0.01, 0, 1.2, 0.005],\n nodeDistance: [120, 0, 500, 5],\n damping: [0.09, 0, 1, 0.01]\n },\n maxVelocity: [50, 0, 150, 1],\n minVelocity: [0.1, 0.01, 0.5, 0.01],\n solver: ['barnesHut', 'forceAtlas2Based', 'repulsion', 'hierarchicalRepulsion'],\n timestep: [0.5, 0.01, 1, 0.01]\n }\n };\n exports.allOptions = allOptions;\n exports.configureOptions = configureOptions;\n /***/\n },\n /* 225 */\n\n /***/\n function (module, exports, __webpack_require__) {\n \"use strict\";\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n\n var _slicedToArray2 = __webpack_require__(165);\n\n var _slicedToArray3 = _interopRequireDefault(_slicedToArray2);\n\n var _classCallCheck2 = __webpack_require__(119);\n\n var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\n var _createClass2 = __webpack_require__(120);\n\n var _createClass3 = _interopRequireDefault(_createClass2);\n\n var _FloydWarshall = __webpack_require__(226);\n\n var _FloydWarshall2 = _interopRequireDefault(_FloydWarshall);\n\n function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n \"default\": obj\n };\n }\n /**\n * KamadaKawai positions the nodes initially based on\n *\n * \"AN ALGORITHM FOR DRAWING GENERAL UNDIRECTED GRAPHS\"\n * -- Tomihisa KAMADA and Satoru KAWAI in 1989\n *\n * Possible optimizations in the distance calculation can be implemented.\n */\n\n\n var KamadaKawai = function () {\n function KamadaKawai(body, edgeLength, edgeStrength) {\n (0, _classCallCheck3[\"default\"])(this, KamadaKawai);\n this.body = body;\n this.springLength = edgeLength;\n this.springConstant = edgeStrength;\n this.distanceSolver = new _FloydWarshall2[\"default\"]();\n }\n /**\n * Not sure if needed but can be used to update the spring length and spring constant\n * @param options\n */\n\n\n (0, _createClass3[\"default\"])(KamadaKawai, [{\n key: \"setOptions\",\n value: function setOptions(options) {\n if (options) {\n if (options.springLength) {\n this.springLength = options.springLength;\n }\n\n if (options.springConstant) {\n this.springConstant = options.springConstant;\n }\n }\n }\n /**\n * Position the system\n * @param nodesArray\n * @param edgesArray\n */\n\n }, {\n key: \"solve\",\n value: function solve(nodesArray, edgesArray) {\n var ignoreClusters = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; // get distance matrix\n\n var D_matrix = this.distanceSolver.getDistances(this.body, nodesArray, edgesArray); // distance matrix\n // get the L Matrix\n\n this._createL_matrix(D_matrix); // get the K Matrix\n\n\n this._createK_matrix(D_matrix); // calculate positions\n\n\n var threshold = 0.01;\n var innerThreshold = 1;\n var iterations = 0;\n var maxIterations = Math.max(1000, Math.min(10 * this.body.nodeIndices.length, 6000));\n var maxInnerIterations = 5;\n var maxEnergy = 1e9;\n var highE_nodeId = 0,\n dE_dx = 0,\n dE_dy = 0,\n delta_m = 0,\n subIterations = 0;\n\n while (maxEnergy > threshold && iterations < maxIterations) {\n iterations += 1;\n\n var _getHighestEnergyNode2 = this._getHighestEnergyNode(ignoreClusters);\n\n var _getHighestEnergyNode3 = (0, _slicedToArray3[\"default\"])(_getHighestEnergyNode2, 4);\n\n highE_nodeId = _getHighestEnergyNode3[0];\n maxEnergy = _getHighestEnergyNode3[1];\n dE_dx = _getHighestEnergyNode3[2];\n dE_dy = _getHighestEnergyNode3[3];\n delta_m = maxEnergy;\n subIterations = 0;\n\n while (delta_m > innerThreshold && subIterations < maxInnerIterations) {\n subIterations += 1;\n\n this._moveNode(highE_nodeId, dE_dx, dE_dy);\n\n var _getEnergy2 = this._getEnergy(highE_nodeId);\n\n var _getEnergy3 = (0, _slicedToArray3[\"default\"])(_getEnergy2, 3);\n\n delta_m = _getEnergy3[0];\n dE_dx = _getEnergy3[1];\n dE_dy = _getEnergy3[2];\n }\n }\n }\n /**\n * get the node with the highest energy\n * @returns {*[]}\n * @private\n */\n\n }, {\n key: \"_getHighestEnergyNode\",\n value: function _getHighestEnergyNode(ignoreClusters) {\n var nodesArray = this.body.nodeIndices;\n var nodes = this.body.nodes;\n var maxEnergy = 0;\n var maxEnergyNodeId = nodesArray[0];\n var dE_dx_max = 0,\n dE_dy_max = 0;\n\n for (var nodeIdx = 0; nodeIdx < nodesArray.length; nodeIdx++) {\n var m = nodesArray[nodeIdx]; // by not evaluating nodes with predefined positions we should only move nodes that have no positions.\n\n if (nodes[m].predefinedPosition === false || nodes[m].isCluster === true && ignoreClusters === true || nodes[m].options.fixed.x === true || nodes[m].options.fixed.y === true) {\n var _getEnergy4 = this._getEnergy(m),\n _getEnergy5 = (0, _slicedToArray3[\"default\"])(_getEnergy4, 3),\n delta_m = _getEnergy5[0],\n dE_dx = _getEnergy5[1],\n dE_dy = _getEnergy5[2];\n\n if (maxEnergy < delta_m) {\n maxEnergy = delta_m;\n maxEnergyNodeId = m;\n dE_dx_max = dE_dx;\n dE_dy_max = dE_dy;\n }\n }\n }\n\n return [maxEnergyNodeId, maxEnergy, dE_dx_max, dE_dy_max];\n }\n /**\n * calculate the energy of a single node\n * @param m\n * @returns {*[]}\n * @private\n */\n\n }, {\n key: \"_getEnergy\",\n value: function _getEnergy(m) {\n var nodesArray = this.body.nodeIndices;\n var nodes = this.body.nodes;\n var x_m = nodes[m].x;\n var y_m = nodes[m].y;\n var dE_dx = 0;\n var dE_dy = 0;\n\n for (var iIdx = 0; iIdx < nodesArray.length; iIdx++) {\n var i = nodesArray[iIdx];\n\n if (i !== m) {\n var x_i = nodes[i].x;\n var y_i = nodes[i].y;\n var denominator = 1.0 / Math.sqrt(Math.pow(x_m - x_i, 2) + Math.pow(y_m - y_i, 2));\n dE_dx += this.K_matrix[m][i] * (x_m - x_i - this.L_matrix[m][i] * (x_m - x_i) * denominator);\n dE_dy += this.K_matrix[m][i] * (y_m - y_i - this.L_matrix[m][i] * (y_m - y_i) * denominator);\n }\n }\n\n var delta_m = Math.sqrt(Math.pow(dE_dx, 2) + Math.pow(dE_dy, 2));\n return [delta_m, dE_dx, dE_dy];\n }\n /**\n * move the node based on it's energy\n * the dx and dy are calculated from the linear system proposed by Kamada and Kawai\n * @param m\n * @param dE_dx\n * @param dE_dy\n * @private\n */\n\n }, {\n key: \"_moveNode\",\n value: function _moveNode(m, dE_dx, dE_dy) {\n var nodesArray = this.body.nodeIndices;\n var nodes = this.body.nodes;\n var d2E_dx2 = 0;\n var d2E_dxdy = 0;\n var d2E_dy2 = 0;\n var x_m = nodes[m].x;\n var y_m = nodes[m].y;\n\n for (var iIdx = 0; iIdx < nodesArray.length; iIdx++) {\n var i = nodesArray[iIdx];\n\n if (i !== m) {\n var x_i = nodes[i].x;\n var y_i = nodes[i].y;\n var denominator = 1.0 / Math.pow(Math.pow(x_m - x_i, 2) + Math.pow(y_m - y_i, 2), 1.5);\n d2E_dx2 += this.K_matrix[m][i] * (1 - this.L_matrix[m][i] * Math.pow(y_m - y_i, 2) * denominator);\n d2E_dxdy += this.K_matrix[m][i] * (this.L_matrix[m][i] * (x_m - x_i) * (y_m - y_i) * denominator);\n d2E_dy2 += this.K_matrix[m][i] * (1 - this.L_matrix[m][i] * Math.pow(x_m - x_i, 2) * denominator);\n }\n } // make the variable names easier to make the solving of the linear system easier to read\n\n\n var A = d2E_dx2,\n B = d2E_dxdy,\n C = dE_dx,\n D = d2E_dy2,\n E = dE_dy; // solve the linear system for dx and dy\n\n var dy = (C / A + E / B) / (B / A - D / B);\n var dx = -(B * dy + C) / A; // move the node\n\n nodes[m].x += dx;\n nodes[m].y += dy;\n }\n /**\n * Create the L matrix: edge length times shortest path\n * @param D_matrix\n * @private\n */\n\n }, {\n key: \"_createL_matrix\",\n value: function _createL_matrix(D_matrix) {\n var nodesArray = this.body.nodeIndices;\n var edgeLength = this.springLength;\n this.L_matrix = [];\n\n for (var i = 0; i < nodesArray.length; i++) {\n this.L_matrix[nodesArray[i]] = {};\n\n for (var j = 0; j < nodesArray.length; j++) {\n this.L_matrix[nodesArray[i]][nodesArray[j]] = edgeLength * D_matrix[nodesArray[i]][nodesArray[j]];\n }\n }\n }\n /**\n * Create the K matrix: spring constants times shortest path\n * @param D_matrix\n * @private\n */\n\n }, {\n key: \"_createK_matrix\",\n value: function _createK_matrix(D_matrix) {\n var nodesArray = this.body.nodeIndices;\n var edgeStrength = this.springConstant;\n this.K_matrix = [];\n\n for (var i = 0; i < nodesArray.length; i++) {\n this.K_matrix[nodesArray[i]] = {};\n\n for (var j = 0; j < nodesArray.length; j++) {\n this.K_matrix[nodesArray[i]][nodesArray[j]] = edgeStrength * Math.pow(D_matrix[nodesArray[i]][nodesArray[j]], -2);\n }\n }\n }\n }]);\n return KamadaKawai;\n }(); // distance finding algorithm\n\n\n exports[\"default\"] = KamadaKawai;\n /***/\n },\n /* 226 */\n\n /***/\n function (module, exports, __webpack_require__) {\n \"use strict\";\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n\n var _classCallCheck2 = __webpack_require__(119);\n\n var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\n var _createClass2 = __webpack_require__(120);\n\n var _createClass3 = _interopRequireDefault(_createClass2);\n\n function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n \"default\": obj\n };\n }\n /**\n * Created by Alex on 10-Aug-15.\n */\n\n\n var FloydWarshall = function () {\n function FloydWarshall() {\n (0, _classCallCheck3[\"default\"])(this, FloydWarshall);\n }\n\n (0, _createClass3[\"default\"])(FloydWarshall, [{\n key: \"getDistances\",\n value: function getDistances(body, nodesArray, edgesArray) {\n var D_matrix = {};\n var edges = body.edges; // prepare matrix with large numbers\n\n for (var i = 0; i < nodesArray.length; i++) {\n D_matrix[nodesArray[i]] = {};\n D_matrix[nodesArray[i]] = {};\n\n for (var j = 0; j < nodesArray.length; j++) {\n D_matrix[nodesArray[i]][nodesArray[j]] = i == j ? 0 : 1e9;\n D_matrix[nodesArray[i]][nodesArray[j]] = i == j ? 0 : 1e9;\n }\n } // put the weights for the edges in. This assumes unidirectionality.\n\n\n for (var _i = 0; _i < edgesArray.length; _i++) {\n var edge = edges[edgesArray[_i]]; // edge has to be connected if it counts to the distances. If it is connected to inner clusters it will crash so we also check if it is in the D_matrix\n\n if (edge.connected === true && D_matrix[edge.fromId] !== undefined && D_matrix[edge.toId] !== undefined) {\n D_matrix[edge.fromId][edge.toId] = 1;\n D_matrix[edge.toId][edge.fromId] = 1;\n }\n }\n\n var nodeCount = nodesArray.length; // Adapted FloydWarshall based on unidirectionality to greatly reduce complexity.\n\n for (var k = 0; k < nodeCount; k++) {\n for (var _i2 = 0; _i2 < nodeCount - 1; _i2++) {\n for (var _j = _i2 + 1; _j < nodeCount; _j++) {\n D_matrix[nodesArray[_i2]][nodesArray[_j]] = Math.min(D_matrix[nodesArray[_i2]][nodesArray[_j]], D_matrix[nodesArray[_i2]][nodesArray[k]] + D_matrix[nodesArray[k]][nodesArray[_j]]);\n D_matrix[nodesArray[_j]][nodesArray[_i2]] = D_matrix[nodesArray[_i2]][nodesArray[_j]];\n }\n }\n }\n\n return D_matrix;\n }\n }]);\n return FloydWarshall;\n }();\n\n exports[\"default\"] = FloydWarshall;\n /***/\n },\n /* 227 */\n\n /***/\n function (module, exports) {\n 'use strict';\n /**\n * Canvas shapes used by Network\n */\n\n if (typeof CanvasRenderingContext2D !== 'undefined') {\n /**\n * Draw a circle shape\n */\n CanvasRenderingContext2D.prototype.circle = function (x, y, r) {\n this.beginPath();\n this.arc(x, y, r, 0, 2 * Math.PI, false);\n this.closePath();\n };\n /**\n * Draw a square shape\n * @param {Number} x horizontal center\n * @param {Number} y vertical center\n * @param {Number} r size, width and height of the square\n */\n\n\n CanvasRenderingContext2D.prototype.square = function (x, y, r) {\n this.beginPath();\n this.rect(x - r, y - r, r * 2, r * 2);\n this.closePath();\n };\n /**\n * Draw a triangle shape\n * @param {Number} x horizontal center\n * @param {Number} y vertical center\n * @param {Number} r radius, half the length of the sides of the triangle\n */\n\n\n CanvasRenderingContext2D.prototype.triangle = function (x, y, r) {\n // http://en.wikipedia.org/wiki/Equilateral_triangle\n this.beginPath(); // the change in radius and the offset is here to center the shape\n\n r *= 1.15;\n y += 0.275 * r;\n var s = r * 2;\n var s2 = s / 2;\n var ir = Math.sqrt(3) / 6 * s; // radius of inner circle\n\n var h = Math.sqrt(s * s - s2 * s2); // height\n\n this.moveTo(x, y - (h - ir));\n this.lineTo(x + s2, y + ir);\n this.lineTo(x - s2, y + ir);\n this.lineTo(x, y - (h - ir));\n this.closePath();\n };\n /**\n * Draw a triangle shape in downward orientation\n * @param {Number} x horizontal center\n * @param {Number} y vertical center\n * @param {Number} r radius\n */\n\n\n CanvasRenderingContext2D.prototype.triangleDown = function (x, y, r) {\n // http://en.wikipedia.org/wiki/Equilateral_triangle\n this.beginPath(); // the change in radius and the offset is here to center the shape\n\n r *= 1.15;\n y -= 0.275 * r;\n var s = r * 2;\n var s2 = s / 2;\n var ir = Math.sqrt(3) / 6 * s; // radius of inner circle\n\n var h = Math.sqrt(s * s - s2 * s2); // height\n\n this.moveTo(x, y + (h - ir));\n this.lineTo(x + s2, y - ir);\n this.lineTo(x - s2, y - ir);\n this.lineTo(x, y + (h - ir));\n this.closePath();\n };\n /**\n * Draw a star shape, a star with 5 points\n * @param {Number} x horizontal center\n * @param {Number} y vertical center\n * @param {Number} r radius, half the length of the sides of the triangle\n */\n\n\n CanvasRenderingContext2D.prototype.star = function (x, y, r) {\n // http://www.html5canvastutorials.com/labs/html5-canvas-star-spinner/\n this.beginPath(); // the change in radius and the offset is here to center the shape\n\n r *= 0.82;\n y += 0.1 * r;\n\n for (var n = 0; n < 10; n++) {\n var radius = n % 2 === 0 ? r * 1.3 : r * 0.5;\n this.lineTo(x + radius * Math.sin(n * 2 * Math.PI / 10), y - radius * Math.cos(n * 2 * Math.PI / 10));\n }\n\n this.closePath();\n };\n /**\n * Draw a Diamond shape\n * @param {Number} x horizontal center\n * @param {Number} y vertical center\n * @param {Number} r radius, half the length of the sides of the triangle\n */\n\n\n CanvasRenderingContext2D.prototype.diamond = function (x, y, r) {\n // http://www.html5canvastutorials.com/labs/html5-canvas-star-spinner/\n this.beginPath();\n this.lineTo(x, y + r);\n this.lineTo(x + r, y);\n this.lineTo(x, y - r);\n this.lineTo(x - r, y);\n this.closePath();\n };\n /**\n * http://stackoverflow.com/questions/1255512/how-to-draw-a-rounded-rectangle-on-html-canvas\n */\n\n\n CanvasRenderingContext2D.prototype.roundRect = function (x, y, w, h, r) {\n var r2d = Math.PI / 180;\n\n if (w - 2 * r < 0) {\n r = w / 2;\n } //ensure that the radius isn't too large for x\n\n\n if (h - 2 * r < 0) {\n r = h / 2;\n } //ensure that the radius isn't too large for y\n\n\n this.beginPath();\n this.moveTo(x + r, y);\n this.lineTo(x + w - r, y);\n this.arc(x + w - r, y + r, r, r2d * 270, r2d * 360, false);\n this.lineTo(x + w, y + h - r);\n this.arc(x + w - r, y + h - r, r, 0, r2d * 90, false);\n this.lineTo(x + r, y + h);\n this.arc(x + r, y + h - r, r, r2d * 90, r2d * 180, false);\n this.lineTo(x, y + r);\n this.arc(x + r, y + r, r, r2d * 180, r2d * 270, false);\n this.closePath();\n };\n /**\n * http://stackoverflow.com/questions/2172798/how-to-draw-an-oval-in-html5-canvas\n */\n\n\n CanvasRenderingContext2D.prototype.ellipse = function (x, y, w, h) {\n var kappa = .5522848,\n ox = w / 2 * kappa,\n // control point offset horizontal\n oy = h / 2 * kappa,\n // control point offset vertical\n xe = x + w,\n // x-end\n ye = y + h,\n // y-end\n xm = x + w / 2,\n // x-middle\n ym = y + h / 2; // y-middle\n\n this.beginPath();\n this.moveTo(x, ym);\n this.bezierCurveTo(x, ym - oy, xm - ox, y, xm, y);\n this.bezierCurveTo(xm + ox, y, xe, ym - oy, xe, ym);\n this.bezierCurveTo(xe, ym + oy, xm + ox, ye, xm, ye);\n this.bezierCurveTo(xm - ox, ye, x, ym + oy, x, ym);\n this.closePath();\n };\n /**\n * http://stackoverflow.com/questions/2172798/how-to-draw-an-oval-in-html5-canvas\n */\n\n\n CanvasRenderingContext2D.prototype.database = function (x, y, w, h) {\n var f = 1 / 3;\n var wEllipse = w;\n var hEllipse = h * f;\n var kappa = .5522848,\n ox = wEllipse / 2 * kappa,\n // control point offset horizontal\n oy = hEllipse / 2 * kappa,\n // control point offset vertical\n xe = x + wEllipse,\n // x-end\n ye = y + hEllipse,\n // y-end\n xm = x + wEllipse / 2,\n // x-middle\n ym = y + hEllipse / 2,\n // y-middle\n ymb = y + (h - hEllipse / 2),\n // y-midlle, bottom ellipse\n yeb = y + h; // y-end, bottom ellipse\n\n this.beginPath();\n this.moveTo(xe, ym);\n this.bezierCurveTo(xe, ym + oy, xm + ox, ye, xm, ye);\n this.bezierCurveTo(xm - ox, ye, x, ym + oy, x, ym);\n this.bezierCurveTo(x, ym - oy, xm - ox, y, xm, y);\n this.bezierCurveTo(xm + ox, y, xe, ym - oy, xe, ym);\n this.lineTo(xe, ymb);\n this.bezierCurveTo(xe, ymb + oy, xm + ox, yeb, xm, yeb);\n this.bezierCurveTo(xm - ox, yeb, x, ymb + oy, x, ymb);\n this.lineTo(x, ym);\n };\n /**\n * Draw an arrow at the end of a line with the given angle.\n */\n\n\n CanvasRenderingContext2D.prototype.arrowEndpoint = function (x, y, angle, length) {\n // tail\n var xt = x - length * Math.cos(angle);\n var yt = y - length * Math.sin(angle); // inner tail\n\n var xi = x - length * 0.9 * Math.cos(angle);\n var yi = y - length * 0.9 * Math.sin(angle); // left\n\n var xl = xt + length / 3 * Math.cos(angle + 0.5 * Math.PI);\n var yl = yt + length / 3 * Math.sin(angle + 0.5 * Math.PI); // right\n\n var xr = xt + length / 3 * Math.cos(angle - 0.5 * Math.PI);\n var yr = yt + length / 3 * Math.sin(angle - 0.5 * Math.PI);\n this.beginPath();\n this.moveTo(x, y);\n this.lineTo(xl, yl);\n this.lineTo(xi, yi);\n this.lineTo(xr, yr);\n this.closePath();\n };\n /**\n * Draw an circle an the end of an line with the given angle.\n */\n\n\n CanvasRenderingContext2D.prototype.circleEndpoint = function (x, y, angle, length) {\n var radius = length * 0.4;\n var xc = x - radius * Math.cos(angle);\n var yc = y - radius * Math.sin(angle);\n this.circle(xc, yc, radius);\n };\n /**\n * Sets up the dashedLine functionality for drawing\n * Original code came from http://stackoverflow.com/questions/4576724/dotted-stroke-in-canvas\n * @author David Jordan\n * @date 2012-08-08\n */\n\n\n CanvasRenderingContext2D.prototype.dashedLine = function (x, y, x2, y2, pattern) {\n this.beginPath();\n this.moveTo(x, y);\n var patternLength = pattern.length;\n var dx = x2 - x;\n var dy = y2 - y;\n var slope = dy / dx;\n var distRemaining = Math.sqrt(dx * dx + dy * dy);\n var patternIndex = 0;\n var draw = true;\n var xStep = 0;\n var dashLength = pattern[0];\n\n while (distRemaining >= 0.1) {\n dashLength = pattern[patternIndex++ % patternLength];\n\n if (dashLength > distRemaining) {\n dashLength = distRemaining;\n }\n\n xStep = Math.sqrt(dashLength * dashLength / (1 + slope * slope));\n xStep = dx < 0 ? -xStep : xStep;\n x += xStep;\n y += slope * xStep;\n\n if (draw === true) {\n this.lineTo(x, y);\n } else {\n this.moveTo(x, y);\n }\n\n distRemaining -= dashLength;\n draw = !draw;\n }\n };\n }\n /***/\n\n },\n /* 228 */\n\n /***/\n function (module, exports, __webpack_require__) {\n 'use strict';\n\n var _create = __webpack_require__(55);\n\n var _create2 = _interopRequireDefault(_create);\n\n function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n 'default': obj\n };\n }\n /**\n * Parse a text source containing data in DOT language into a JSON object.\n * The object contains two lists: one with nodes and one with edges.\n *\n * DOT language reference: http://www.graphviz.org/doc/info/lang.html\n *\n * DOT language attributes: http://graphviz.org/content/attrs\n *\n * @param {String} data Text containing a graph in DOT-notation\n * @return {Object} graph An object containing two parameters:\n * {Object[]} nodes\n * {Object[]} edges\n */\n\n\n function parseDOT(data) {\n dot = data;\n return parseGraph();\n } // mapping of attributes from DOT (the keys) to vis.js (the values)\n\n\n var NODE_ATTR_MAPPING = {\n 'fontsize': 'font.size',\n 'fontcolor': 'font.color',\n 'labelfontcolor': 'font.color',\n 'fontname': 'font.face',\n 'color': ['color.border', 'color.background'],\n 'fillcolor': 'color.background',\n 'tooltip': 'title',\n 'labeltooltip': 'title'\n };\n var EDGE_ATTR_MAPPING = (0, _create2['default'])(NODE_ATTR_MAPPING);\n EDGE_ATTR_MAPPING.color = 'color.color'; // token types enumeration\n\n var TOKENTYPE = {\n NULL: 0,\n DELIMITER: 1,\n IDENTIFIER: 2,\n UNKNOWN: 3\n }; // map with all delimiters\n\n var DELIMITERS = {\n '{': true,\n '}': true,\n '[': true,\n ']': true,\n ';': true,\n '=': true,\n ',': true,\n '->': true,\n '--': true\n };\n var dot = ''; // current dot file\n\n var index = 0; // current index in dot file\n\n var c = ''; // current token character in expr\n\n var token = ''; // current token\n\n var tokenType = TOKENTYPE.NULL; // type of the token\n\n /**\n * Get the first character from the dot file.\n * The character is stored into the char c. If the end of the dot file is\n * reached, the function puts an empty string in c.\n */\n\n function first() {\n index = 0;\n c = dot.charAt(0);\n }\n /**\n * Get the next character from the dot file.\n * The character is stored into the char c. If the end of the dot file is\n * reached, the function puts an empty string in c.\n */\n\n\n function next() {\n index++;\n c = dot.charAt(index);\n }\n /**\n * Preview the next character from the dot file.\n * @return {String} cNext\n */\n\n\n function nextPreview() {\n return dot.charAt(index + 1);\n }\n /**\n * Test whether given character is alphabetic or numeric\n * @param {String} c\n * @return {Boolean} isAlphaNumeric\n */\n\n\n var regexAlphaNumeric = /[a-zA-Z_0-9.:#]/;\n\n function isAlphaNumeric(c) {\n return regexAlphaNumeric.test(c);\n }\n /**\n * Merge all options of object b into object b\n * @param {Object} a\n * @param {Object} b\n * @return {Object} a\n */\n\n\n function merge(a, b) {\n if (!a) {\n a = {};\n }\n\n if (b) {\n for (var name in b) {\n if (b.hasOwnProperty(name)) {\n a[name] = b[name];\n }\n }\n }\n\n return a;\n }\n /**\n * Set a value in an object, where the provided parameter name can be a\n * path with nested parameters. For example:\n *\n * var obj = {a: 2};\n * setValue(obj, 'b.c', 3); // obj = {a: 2, b: {c: 3}}\n *\n * @param {Object} obj\n * @param {String} path A parameter name or dot-separated parameter path,\n * like \"color.highlight.border\".\n * @param {*} value\n */\n\n\n function setValue(obj, path, value) {\n var keys = path.split('.');\n var o = obj;\n\n while (keys.length) {\n var key = keys.shift();\n\n if (keys.length) {\n // this isn't the end point\n if (!o[key]) {\n o[key] = {};\n }\n\n o = o[key];\n } else {\n // this is the end point\n o[key] = value;\n }\n }\n }\n /**\n * Add a node to a graph object. If there is already a node with\n * the same id, their attributes will be merged.\n * @param {Object} graph\n * @param {Object} node\n */\n\n\n function addNode(graph, node) {\n var i, len;\n var current = null; // find root graph (in case of subgraph)\n\n var graphs = [graph]; // list with all graphs from current graph to root graph\n\n var root = graph;\n\n while (root.parent) {\n graphs.push(root.parent);\n root = root.parent;\n } // find existing node (at root level) by its id\n\n\n if (root.nodes) {\n for (i = 0, len = root.nodes.length; i < len; i++) {\n if (node.id === root.nodes[i].id) {\n current = root.nodes[i];\n break;\n }\n }\n }\n\n if (!current) {\n // this is a new node\n current = {\n id: node.id\n };\n\n if (graph.node) {\n // clone default attributes\n current.attr = merge(current.attr, graph.node);\n }\n } // add node to this (sub)graph and all its parent graphs\n\n\n for (i = graphs.length - 1; i >= 0; i--) {\n var g = graphs[i];\n\n if (!g.nodes) {\n g.nodes = [];\n }\n\n if (g.nodes.indexOf(current) === -1) {\n g.nodes.push(current);\n }\n } // merge attributes\n\n\n if (node.attr) {\n current.attr = merge(current.attr, node.attr);\n }\n }\n /**\n * Add an edge to a graph object\n * @param {Object} graph\n * @param {Object} edge\n */\n\n\n function addEdge(graph, edge) {\n if (!graph.edges) {\n graph.edges = [];\n }\n\n graph.edges.push(edge);\n\n if (graph.edge) {\n var attr = merge({}, graph.edge); // clone default attributes\n\n edge.attr = merge(attr, edge.attr); // merge attributes\n }\n }\n /**\n * Create an edge to a graph object\n * @param {Object} graph\n * @param {String | Number | Object} from\n * @param {String | Number | Object} to\n * @param {String} type\n * @param {Object | null} attr\n * @return {Object} edge\n */\n\n\n function createEdge(graph, from, to, type, attr) {\n var edge = {\n from: from,\n to: to,\n type: type\n };\n\n if (graph.edge) {\n edge.attr = merge({}, graph.edge); // clone default attributes\n }\n\n edge.attr = merge(edge.attr || {}, attr); // merge attributes\n\n return edge;\n }\n /**\n * Get next token in the current dot file.\n * The token and token type are available as token and tokenType\n */\n\n\n function getToken() {\n tokenType = TOKENTYPE.NULL;\n token = ''; // skip over whitespaces\n\n while (c === ' ' || c === '\\t' || c === '\\n' || c === '\\r') {\n // space, tab, enter\n next();\n }\n\n do {\n var isComment = false; // skip comment\n\n if (c === '#') {\n // find the previous non-space character\n var i = index - 1;\n\n while (dot.charAt(i) === ' ' || dot.charAt(i) === '\\t') {\n i--;\n }\n\n if (dot.charAt(i) === '\\n' || dot.charAt(i) === '') {\n // the # is at the start of a line, this is indeed a line comment\n while (c != '' && c != '\\n') {\n next();\n }\n\n isComment = true;\n }\n }\n\n if (c === '/' && nextPreview() === '/') {\n // skip line comment\n while (c != '' && c != '\\n') {\n next();\n }\n\n isComment = true;\n }\n\n if (c === '/' && nextPreview() === '*') {\n // skip block comment\n while (c != '') {\n if (c === '*' && nextPreview() === '/') {\n // end of block comment found. skip these last two characters\n next();\n next();\n break;\n } else {\n next();\n }\n }\n\n isComment = true;\n } // skip over whitespaces\n\n\n while (c === ' ' || c === '\\t' || c === '\\n' || c === '\\r') {\n // space, tab, enter\n next();\n }\n } while (isComment); // check for end of dot file\n\n\n if (c === '') {\n // token is still empty\n tokenType = TOKENTYPE.DELIMITER;\n return;\n } // check for delimiters consisting of 2 characters\n\n\n var c2 = c + nextPreview();\n\n if (DELIMITERS[c2]) {\n tokenType = TOKENTYPE.DELIMITER;\n token = c2;\n next();\n next();\n return;\n } // check for delimiters consisting of 1 character\n\n\n if (DELIMITERS[c]) {\n tokenType = TOKENTYPE.DELIMITER;\n token = c;\n next();\n return;\n } // check for an identifier (number or string)\n // TODO: more precise parsing of numbers/strings (and the port separator ':')\n\n\n if (isAlphaNumeric(c) || c === '-') {\n token += c;\n next();\n\n while (isAlphaNumeric(c)) {\n token += c;\n next();\n }\n\n if (token === 'false') {\n token = false; // convert to boolean\n } else if (token === 'true') {\n token = true; // convert to boolean\n } else if (!isNaN(Number(token))) {\n token = Number(token); // convert to number\n }\n\n tokenType = TOKENTYPE.IDENTIFIER;\n return;\n } // check for a string enclosed by double quotes\n\n\n if (c === '\"') {\n next();\n\n while (c != '' && (c != '\"' || c === '\"' && nextPreview() === '\"')) {\n token += c;\n\n if (c === '\"') {\n // skip the escape character\n next();\n }\n\n next();\n }\n\n if (c != '\"') {\n throw newSyntaxError('End of string \" expected');\n }\n\n next();\n tokenType = TOKENTYPE.IDENTIFIER;\n return;\n } // something unknown is found, wrong characters, a syntax error\n\n\n tokenType = TOKENTYPE.UNKNOWN;\n\n while (c != '') {\n token += c;\n next();\n }\n\n throw new SyntaxError('Syntax error in part \"' + chop(token, 30) + '\"');\n }\n /**\n * Parse a graph.\n * @returns {Object} graph\n */\n\n\n function parseGraph() {\n var graph = {};\n first();\n getToken(); // optional strict keyword\n\n if (token === 'strict') {\n graph.strict = true;\n getToken();\n } // graph or digraph keyword\n\n\n if (token === 'graph' || token === 'digraph') {\n graph.type = token;\n getToken();\n } // optional graph id\n\n\n if (tokenType === TOKENTYPE.IDENTIFIER) {\n graph.id = token;\n getToken();\n } // open angle bracket\n\n\n if (token != '{') {\n throw newSyntaxError('Angle bracket { expected');\n }\n\n getToken(); // statements\n\n parseStatements(graph); // close angle bracket\n\n if (token != '}') {\n throw newSyntaxError('Angle bracket } expected');\n }\n\n getToken(); // end of file\n\n if (token !== '') {\n throw newSyntaxError('End of file expected');\n }\n\n getToken(); // remove temporary default options\n\n delete graph.node;\n delete graph.edge;\n delete graph.graph;\n return graph;\n }\n /**\n * Parse a list with statements.\n * @param {Object} graph\n */\n\n\n function parseStatements(graph) {\n while (token !== '' && token != '}') {\n parseStatement(graph);\n\n if (token === ';') {\n getToken();\n }\n }\n }\n /**\n * Parse a single statement. Can be a an attribute statement, node\n * statement, a series of node statements and edge statements, or a\n * parameter.\n * @param {Object} graph\n */\n\n\n function parseStatement(graph) {\n // parse subgraph\n var subgraph = parseSubgraph(graph);\n\n if (subgraph) {\n // edge statements\n parseEdge(graph, subgraph);\n return;\n } // parse an attribute statement\n\n\n var attr = parseAttributeStatement(graph);\n\n if (attr) {\n return;\n } // parse node\n\n\n if (tokenType != TOKENTYPE.IDENTIFIER) {\n throw newSyntaxError('Identifier expected');\n }\n\n var id = token; // id can be a string or a number\n\n getToken();\n\n if (token === '=') {\n // id statement\n getToken();\n\n if (tokenType != TOKENTYPE.IDENTIFIER) {\n throw newSyntaxError('Identifier expected');\n }\n\n graph[id] = token;\n getToken(); // TODO: implement comma separated list with \"a_list: ID=ID [','] [a_list] \"\n } else {\n parseNodeStatement(graph, id);\n }\n }\n /**\n * Parse a subgraph\n * @param {Object} graph parent graph object\n * @return {Object | null} subgraph\n */\n\n\n function parseSubgraph(graph) {\n var subgraph = null; // optional subgraph keyword\n\n if (token === 'subgraph') {\n subgraph = {};\n subgraph.type = 'subgraph';\n getToken(); // optional graph id\n\n if (tokenType === TOKENTYPE.IDENTIFIER) {\n subgraph.id = token;\n getToken();\n }\n } // open angle bracket\n\n\n if (token === '{') {\n getToken();\n\n if (!subgraph) {\n subgraph = {};\n }\n\n subgraph.parent = graph;\n subgraph.node = graph.node;\n subgraph.edge = graph.edge;\n subgraph.graph = graph.graph; // statements\n\n parseStatements(subgraph); // close angle bracket\n\n if (token != '}') {\n throw newSyntaxError('Angle bracket } expected');\n }\n\n getToken(); // remove temporary default options\n\n delete subgraph.node;\n delete subgraph.edge;\n delete subgraph.graph;\n delete subgraph.parent; // register at the parent graph\n\n if (!graph.subgraphs) {\n graph.subgraphs = [];\n }\n\n graph.subgraphs.push(subgraph);\n }\n\n return subgraph;\n }\n /**\n * parse an attribute statement like \"node [shape=circle fontSize=16]\".\n * Available keywords are 'node', 'edge', 'graph'.\n * The previous list with default attributes will be replaced\n * @param {Object} graph\n * @returns {String | null} keyword Returns the name of the parsed attribute\n * (node, edge, graph), or null if nothing\n * is parsed.\n */\n\n\n function parseAttributeStatement(graph) {\n // attribute statements\n if (token === 'node') {\n getToken(); // node attributes\n\n graph.node = parseAttributeList();\n return 'node';\n } else if (token === 'edge') {\n getToken(); // edge attributes\n\n graph.edge = parseAttributeList();\n return 'edge';\n } else if (token === 'graph') {\n getToken(); // graph attributes\n\n graph.graph = parseAttributeList();\n return 'graph';\n }\n\n return null;\n }\n /**\n * parse a node statement\n * @param {Object} graph\n * @param {String | Number} id\n */\n\n\n function parseNodeStatement(graph, id) {\n // node statement\n var node = {\n id: id\n };\n var attr = parseAttributeList();\n\n if (attr) {\n node.attr = attr;\n }\n\n addNode(graph, node); // edge statements\n\n parseEdge(graph, id);\n }\n /**\n * Parse an edge or a series of edges\n * @param {Object} graph\n * @param {String | Number} from Id of the from node\n */\n\n\n function parseEdge(graph, from) {\n while (token === '->' || token === '--') {\n var to;\n var type = token;\n getToken();\n var subgraph = parseSubgraph(graph);\n\n if (subgraph) {\n to = subgraph;\n } else {\n if (tokenType != TOKENTYPE.IDENTIFIER) {\n throw newSyntaxError('Identifier or subgraph expected');\n }\n\n to = token;\n addNode(graph, {\n id: to\n });\n getToken();\n } // parse edge attributes\n\n\n var attr = parseAttributeList(); // create edge\n\n var edge = createEdge(graph, from, to, type, attr);\n addEdge(graph, edge);\n from = to;\n }\n }\n /**\n * Parse a set with attributes,\n * for example [label=\"1.000\", shape=solid]\n * @return {Object | null} attr\n */\n\n\n function parseAttributeList() {\n var attr = null;\n\n while (token === '[') {\n getToken();\n attr = {};\n\n while (token !== '' && token != ']') {\n if (tokenType != TOKENTYPE.IDENTIFIER) {\n throw newSyntaxError('Attribute name expected');\n }\n\n var name = token;\n getToken();\n\n if (token != '=') {\n throw newSyntaxError('Equal sign = expected');\n }\n\n getToken();\n\n if (tokenType != TOKENTYPE.IDENTIFIER) {\n throw newSyntaxError('Attribute value expected');\n }\n\n var value = token;\n setValue(attr, name, value); // name can be a path\n\n getToken();\n\n if (token == ',') {\n getToken();\n }\n }\n\n if (token != ']') {\n throw newSyntaxError('Bracket ] expected');\n }\n\n getToken();\n }\n\n return attr;\n }\n /**\n * Create a syntax error with extra information on current token and index.\n * @param {String} message\n * @returns {SyntaxError} err\n */\n\n\n function newSyntaxError(message) {\n return new SyntaxError(message + ', got \"' + chop(token, 30) + '\" (char ' + index + ')');\n }\n /**\n * Chop off text after a maximum length\n * @param {String} text\n * @param {Number} maxLength\n * @returns {String}\n */\n\n\n function chop(text, maxLength) {\n return text.length <= maxLength ? text : text.substr(0, 27) + '...';\n }\n /**\n * Execute a function fn for each pair of elements in two arrays\n * @param {Array | *} array1\n * @param {Array | *} array2\n * @param {function} fn\n */\n\n\n function forEach2(array1, array2, fn) {\n if (Array.isArray(array1)) {\n array1.forEach(function (elem1) {\n if (Array.isArray(array2)) {\n array2.forEach(function (elem2) {\n fn(elem1, elem2);\n });\n } else {\n fn(elem1, array2);\n }\n });\n } else {\n if (Array.isArray(array2)) {\n array2.forEach(function (elem2) {\n fn(array1, elem2);\n });\n } else {\n fn(array1, array2);\n }\n }\n }\n /**\n * Set a nested property on an object\n * When nested objects are missing, they will be created.\n * For example setProp({}, 'font.color', 'red') will return {font: {color: 'red'}}\n * @param {Object} object\n * @param {string} path A dot separated string like 'font.color'\n * @param {*} value Value for the property\n * @return {Object} Returns the original object, allows for chaining.\n */\n\n\n function setProp(object, path, value) {\n var names = path.split('.');\n var prop = names.pop(); // traverse over the nested objects\n\n var obj = object;\n\n for (var i = 0; i < names.length; i++) {\n var name = names[i];\n\n if (!(name in obj)) {\n obj[name] = {};\n }\n\n obj = obj[name];\n } // set the property value\n\n\n obj[prop] = value;\n return object;\n }\n /**\n * Convert an object with DOT attributes to their vis.js equivalents.\n * @param {Object} attr Object with DOT attributes\n * @param {Object} mapping\n * @return {Object} Returns an object with vis.js attributes\n */\n\n\n function convertAttr(attr, mapping) {\n var converted = {};\n\n for (var prop in attr) {\n if (attr.hasOwnProperty(prop)) {\n var visProp = mapping[prop];\n\n if (Array.isArray(visProp)) {\n visProp.forEach(function (visPropI) {\n setProp(converted, visPropI, attr[prop]);\n });\n } else if (typeof visProp === 'string') {\n setProp(converted, visProp, attr[prop]);\n } else {\n setProp(converted, prop, attr[prop]);\n }\n }\n }\n\n return converted;\n }\n /**\n * Convert a string containing a graph in DOT language into a map containing\n * with nodes and edges in the format of graph.\n * @param {String} data Text containing a graph in DOT-notation\n * @return {Object} graphData\n */\n\n\n function DOTToGraph(data) {\n // parse the DOT file\n var dotData = parseDOT(data);\n var graphData = {\n nodes: [],\n edges: [],\n options: {}\n }; // copy the nodes\n\n if (dotData.nodes) {\n dotData.nodes.forEach(function (dotNode) {\n var graphNode = {\n id: dotNode.id,\n label: String(dotNode.label || dotNode.id)\n };\n merge(graphNode, convertAttr(dotNode.attr, NODE_ATTR_MAPPING));\n\n if (graphNode.image) {\n graphNode.shape = 'image';\n }\n\n graphData.nodes.push(graphNode);\n });\n } // copy the edges\n\n\n if (dotData.edges) {\n /**\n * Convert an edge in DOT format to an edge with VisGraph format\n * @param {Object} dotEdge\n * @returns {Object} graphEdge\n */\n var convertEdge = function convertEdge(dotEdge) {\n var graphEdge = {\n from: dotEdge.from,\n to: dotEdge.to\n };\n merge(graphEdge, convertAttr(dotEdge.attr, EDGE_ATTR_MAPPING));\n graphEdge.arrows = dotEdge.type === '->' ? 'to' : undefined;\n return graphEdge;\n };\n\n dotData.edges.forEach(function (dotEdge) {\n var from, to;\n\n if (dotEdge.from instanceof Object) {\n from = dotEdge.from.nodes;\n } else {\n from = {\n id: dotEdge.from\n };\n } // TODO: support of solid/dotted/dashed edges (attr = 'style')\n // TODO: support for attributes 'dir' and 'arrowhead' (edge arrows)\n\n\n if (dotEdge.to instanceof Object) {\n to = dotEdge.to.nodes;\n } else {\n to = {\n id: dotEdge.to\n };\n }\n\n if (dotEdge.from instanceof Object && dotEdge.from.edges) {\n dotEdge.from.edges.forEach(function (subEdge) {\n var graphEdge = convertEdge(subEdge);\n graphData.edges.push(graphEdge);\n });\n }\n\n forEach2(from, to, function (from, to) {\n var subEdge = createEdge(graphData, from.id, to.id, dotEdge.type, dotEdge.attr);\n var graphEdge = convertEdge(subEdge);\n graphData.edges.push(graphEdge);\n });\n\n if (dotEdge.to instanceof Object && dotEdge.to.edges) {\n dotEdge.to.edges.forEach(function (subEdge) {\n var graphEdge = convertEdge(subEdge);\n graphData.edges.push(graphEdge);\n });\n }\n });\n } // copy the options\n\n\n if (dotData.attr) {\n graphData.options = dotData.attr;\n }\n\n return graphData;\n } // exports\n\n\n exports.parseDOT = parseDOT;\n exports.DOTToGraph = DOTToGraph;\n /***/\n },\n /* 229 */\n\n /***/\n function (module, exports) {\n 'use strict';\n\n function parseGephi(gephiJSON, optionsObj) {\n var edges = [];\n var nodes = [];\n var options = {\n edges: {\n inheritColor: false\n },\n nodes: {\n fixed: false,\n parseColor: false\n }\n };\n\n if (optionsObj !== undefined) {\n if (optionsObj.fixed !== undefined) {\n options.nodes.fixed = optionsObj.fixed;\n }\n\n if (optionsObj.parseColor !== undefined) {\n options.nodes.parseColor = optionsObj.parseColor;\n }\n\n if (optionsObj.inheritColor !== undefined) {\n options.edges.inheritColor = optionsObj.inheritColor;\n }\n }\n\n var gEdges = gephiJSON.edges;\n var gNodes = gephiJSON.nodes;\n\n for (var i = 0; i < gEdges.length; i++) {\n var edge = {};\n var gEdge = gEdges[i];\n edge['id'] = gEdge.id;\n edge['from'] = gEdge.source;\n edge['to'] = gEdge.target;\n edge['attributes'] = gEdge.attributes;\n edge['label'] = gEdge.label;\n edge['title'] = gEdge.attributes !== undefined ? gEdge.attributes.title : undefined;\n\n if (gEdge['type'] === 'Directed') {\n edge['arrows'] = 'to';\n } // edge['value'] = gEdge.attributes !== undefined ? gEdge.attributes.Weight : undefined;\n // edge['width'] = edge['value'] !== undefined ? undefined : edgegEdge.size;\n\n\n if (gEdge.color && options.inheritColor === false) {\n edge['color'] = gEdge.color;\n }\n\n edges.push(edge);\n }\n\n for (var i = 0; i < gNodes.length; i++) {\n var node = {};\n var gNode = gNodes[i];\n node['id'] = gNode.id;\n node['attributes'] = gNode.attributes;\n node['title'] = gNode.title;\n node['x'] = gNode.x;\n node['y'] = gNode.y;\n node['label'] = gNode.label;\n node['title'] = gNode.attributes !== undefined ? gNode.attributes.title : undefined;\n\n if (options.nodes.parseColor === true) {\n node['color'] = gNode.color;\n } else {\n node['color'] = gNode.color !== undefined ? {\n background: gNode.color,\n border: gNode.color,\n highlight: {\n background: gNode.color,\n border: gNode.color\n },\n hover: {\n background: gNode.color,\n border: gNode.color\n }\n } : undefined;\n }\n\n node['size'] = gNode.size;\n node['fixed'] = options.nodes.fixed && gNode.x !== undefined && gNode.y !== undefined;\n nodes.push(node);\n }\n\n return {\n nodes: nodes,\n edges: edges\n };\n }\n\n exports.parseGephi = parseGephi;\n /***/\n },\n /* 230 */\n\n /***/\n function (module, exports) {\n 'use strict'; // English\n\n exports['en'] = {\n edit: 'Edit',\n del: 'Delete selected',\n back: 'Back',\n addNode: 'Add Node',\n addEdge: 'Add Edge',\n editNode: 'Edit Node',\n editEdge: 'Edit Edge',\n addDescription: 'Click in an empty space to place a new node.',\n edgeDescription: 'Click on a node and drag the edge to another node to connect them.',\n editEdgeDescription: 'Click on the control points and drag them to a node to connect to it.',\n createEdgeError: 'Cannot link edges to a cluster.',\n deleteClusterError: 'Clusters cannot be deleted.',\n editClusterError: 'Clusters cannot be edited.'\n };\n exports['en_EN'] = exports['en'];\n exports['en_US'] = exports['en']; // German\n\n exports['de'] = {\n edit: 'Editieren',\n del: 'L\\xF6sche Auswahl',\n back: 'Zur\\xFCck',\n addNode: 'Knoten hinzuf\\xFCgen',\n addEdge: 'Kante hinzuf\\xFCgen',\n editNode: 'Knoten editieren',\n editEdge: 'Kante editieren',\n addDescription: 'Klicke auf eine freie Stelle, um einen neuen Knoten zu plazieren.',\n edgeDescription: 'Klicke auf einen Knoten und ziehe die Kante zu einem anderen Knoten, um diese zu verbinden.',\n editEdgeDescription: 'Klicke auf die Verbindungspunkte und ziehe diese auf einen Knoten, um sie zu verbinden.',\n createEdgeError: 'Es ist nicht m\\xF6glich, Kanten mit Clustern zu verbinden.',\n deleteClusterError: 'Cluster k\\xF6nnen nicht gel\\xF6scht werden.',\n editClusterError: 'Cluster k\\xF6nnen nicht editiert werden.'\n };\n exports['de_DE'] = exports['de']; // Spanish\n\n exports['es'] = {\n edit: 'Editar',\n del: 'Eliminar selecci\\xF3n',\n back: '\\xC1tras',\n addNode: 'A\\xF1adir nodo',\n addEdge: 'A\\xF1adir arista',\n editNode: 'Editar nodo',\n editEdge: 'Editar arista',\n addDescription: 'Haga clic en un lugar vac\\xEDo para colocar un nuevo nodo.',\n edgeDescription: 'Haga clic en un nodo y arrastre la arista hacia otro nodo para conectarlos.',\n editEdgeDescription: 'Haga clic en un punto de control y arrastrelo a un nodo para conectarlo.',\n createEdgeError: 'No se puede conectar una arista a un grupo.',\n deleteClusterError: 'No es posible eliminar grupos.',\n editClusterError: 'No es posible editar grupos.'\n };\n exports['es_ES'] = exports['es']; //Italiano\n\n exports['it'] = {\n edit: 'Modifica',\n del: 'Cancella la selezione',\n back: 'Indietro',\n addNode: 'Aggiungi un nodo',\n addEdge: 'Aggiungi un vertice',\n editNode: 'Modifica il nodo',\n editEdge: 'Modifica il vertice',\n addDescription: 'Clicca per aggiungere un nuovo nodo',\n edgeDescription: 'Clicca su un nodo e trascinalo ad un altro nodo per connetterli.',\n editEdgeDescription: 'Clicca sui Punti di controllo e trascinali ad un nodo per connetterli.',\n createEdgeError: 'Non si possono collegare vertici ad un cluster',\n deleteClusterError: 'I cluster non possono essere cancellati',\n editClusterError: 'I clusters non possono essere modificati.'\n };\n exports['it_IT'] = exports['it']; // Dutch\n\n exports['nl'] = {\n edit: 'Wijzigen',\n del: 'Selectie verwijderen',\n back: 'Terug',\n addNode: 'Node toevoegen',\n addEdge: 'Link toevoegen',\n editNode: 'Node wijzigen',\n editEdge: 'Link wijzigen',\n addDescription: 'Klik op een leeg gebied om een nieuwe node te maken.',\n edgeDescription: 'Klik op een node en sleep de link naar een andere node om ze te verbinden.',\n editEdgeDescription: 'Klik op de verbindingspunten en sleep ze naar een node om daarmee te verbinden.',\n createEdgeError: 'Kan geen link maken naar een cluster.',\n deleteClusterError: 'Clusters kunnen niet worden verwijderd.',\n editClusterError: 'Clusters kunnen niet worden aangepast.'\n };\n exports['nl_NL'] = exports['nl'];\n exports['nl_BE'] = exports['nl']; // Portuguese Brazil\n\n exports['pt-br'] = {\n edit: 'Editar',\n del: 'Remover selecionado',\n back: 'Voltar',\n addNode: 'Adicionar nó',\n addEdge: 'Adicionar aresta',\n editNode: 'Editar nó',\n editEdge: 'Editar aresta',\n addDescription: 'Clique em um espaço em branco para adicionar um novo nó',\n edgeDescription: 'Clique em um nó e arraste a aresta até outro nó para conectá-los',\n editEdgeDescription: 'Clique nos pontos de controle e os arraste para um nó para conectá-los',\n createEdgeError: 'Não foi possível linkar arestas a um cluster.',\n deleteClusterError: 'Clusters não puderam ser removidos.',\n editClusterError: 'Clusters não puderam ser editados.'\n };\n exports['pt-BR'] = exports['pt-br'];\n exports['pt_BR'] = exports['pt-br'];\n exports['pt_br'] = exports['pt-br']; // Russian\n\n exports['ru'] = {\n edit: 'Редактировать',\n del: 'Удалить выбранное',\n back: 'Назад',\n addNode: 'Добавить узел',\n addEdge: 'Добавить ребро',\n editNode: 'Редактировать узел',\n editEdge: 'Редактировать ребро',\n addDescription: 'Кликните в свободное место, чтобы добавить новый узел.',\n edgeDescription: 'Кликните на узел и протяните ребро к другому узлу, чтобы соединить их.',\n editEdgeDescription: 'Кликните на контрольные точки и перетащите их в узел, чтобы подключиться к нему.',\n createEdgeError: 'Невозможно соединить ребра в кластер.',\n deleteClusterError: 'Кластеры не могут быть удалены',\n editClusterError: 'Кластеры недоступны для редактирования.'\n };\n exports['ru_RU'] = exports['ru'];\n /***/\n }\n /******/\n ])\n );\n});\n\n;","map":null,"metadata":{},"sourceType":"script"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/9f8fa133d869922525857a12250e255b.json b/node_modules/.cache/babel-loader/9f8fa133d869922525857a12250e255b.json new file mode 100644 index 0000000000000000000000000000000000000000..28e2dce06a66fc1cc5040275c1f9ef890707e70f --- /dev/null +++ b/node_modules/.cache/babel-loader/9f8fa133d869922525857a12250e255b.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/Selection.js\";\nimport React, { useContext, Fragment } from 'react';\nimport ExperimentContext from '../context/experiment/experimentContext';\n\nconst Selection = () => {\n const experimentContext = useContext(ExperimentContext);\n const selection = experimentContext.selection,\n data = experimentContext.data,\n experiment = experimentContext.experiment; // const { model, branch, hpc } = experiment;\n //var currentSelection = \"Node: \"\n\n var currentNode = \"\";\n var selectedNode = null;\n\n if (selection) {\n //console.log(\"Current selection \" + selection)\n selection.map(node => // currentSelection += node + \", \"\n currentNode = node); //console.log(\"Current node \" + currentNode)\n\n selectedNode = data.nodes.find(node => node.id === currentNode); //console.log(\"Selected node\")\n //console.log(\"Data: \" + selectedNode.id + \" \" + selectedNode.platform_name)\n }\n\n return React.createElement(Fragment, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 23\n },\n __self: this\n }, selectedNode && React.createElement(Fragment, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 25\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 26\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-12\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 27\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"card text-white bg-info\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 28\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"card-header text-center py-0\",\n style: headerCard,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 29\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 30\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 30\n },\n __self: this\n }, selectedNode.id))), React.createElement(\"div\", {\n className: \"card-body py-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 32\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 33\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 34\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 34\n },\n __self: this\n }, \"Date:\"), \" \", selectedNode.date)), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-12\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 38\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 39\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 39\n },\n __self: this\n }, \"Section:\"), \" \", selectedNode.section)))), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 43\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 44\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-8\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 45\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 46\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 46\n },\n __self: this\n }, \"Platform:\"), \" \", selectedNode.platform_name && selectedNode.platform_name, \" \", !selectedNode.platform_name && experiment.hpc)), React.createElement(\"div\", {\n className: \"col-4 text-right\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 48\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 49\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 49\n },\n __self: this\n }, \"c:\", data.max_children, \"/p:\", data.max_parents))))), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 56\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 57\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-6\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 58\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 59\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 59\n },\n __self: this\n }, \"Processors:\"), \" \", selectedNode.processors)), React.createElement(\"div\", {\n className: \"col-6\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 61\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 62\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 62\n },\n __self: this\n }, \"Wallclock:\"), \" \", selectedNode.wallclock)))), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 66\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 67\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-6\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 68\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 69\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 69\n },\n __self: this\n }, \"Level:\"), \" \", selectedNode.level)), React.createElement(\"div\", {\n className: \"col-6\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 71\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 72\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 72\n },\n __self: this\n }, \"Out:\"), \" \", selectedNode.children, \" \", React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 72\n },\n __self: this\n }, \"In:\"), \" \", selectedNode.parents, \" \")))), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 77\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 78\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 78\n },\n __self: this\n }, \"Status:\")), \" \", selectedNode.status)))))), !selectedNode && data && React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 87\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-12\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 88\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"card text-white bg-info\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 89\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"card-header text-center py-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 90\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 91\n },\n __self: this\n }, \"Here goes the Job Id\")), React.createElement(\"div\", {\n className: \"card-body\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 93\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"text-center\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 94\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 95\n },\n __self: this\n }, \"Select a Node to see more information.\")))))));\n};\n\nconst experimentStyle = {\n height: 200\n};\nconst headerCard = {\n height: 10\n};\nexport default Selection;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/Selection.js"],"names":["React","useContext","Fragment","ExperimentContext","Selection","experimentContext","selection","data","experiment","currentNode","selectedNode","map","node","nodes","find","id","experimentStyle","headerCard","date","section","platform_name","hpc","max_children","max_parents","processors","wallclock","level","children","parents","status","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,UAAhB,EAA4BC,QAA5B,QAA4C,OAA5C;AACA,OAAOC,iBAAP,MAA8B,yCAA9B;;AAEA,MAAMC,SAAS,GAAG,MAAM;AACpB,QAAMC,iBAAiB,GAAGJ,UAAU,CAACE,iBAAD,CAApC;AADoB,QAEZG,SAFY,GAEoBD,iBAFpB,CAEZC,SAFY;AAAA,QAEDC,IAFC,GAEoBF,iBAFpB,CAEDE,IAFC;AAAA,QAEKC,UAFL,GAEoBH,iBAFpB,CAEKG,UAFL,EAGpB;AACA;;AACA,MAAIC,WAAW,GAAG,EAAlB;AACA,MAAIC,YAAY,GAAG,IAAnB;;AACA,MAAIJ,SAAJ,EAAe;AACX;AACAA,IAAAA,SAAS,CAACK,GAAV,CAAcC,IAAI,IACd;AACAH,IAAAA,WAAW,GAAGG,IAFlB,EAFW,CAMX;;AACAF,IAAAA,YAAY,GAAGH,IAAI,CAACM,KAAL,CAAWC,IAAX,CAAgBF,IAAI,IAAIA,IAAI,CAACG,EAAL,KAAYN,WAApC,CAAf,CAPW,CAQX;AACA;AACH;;AACD,SACI,oBAAC,QAAD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACSC,YAAY,IACb,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AAA;AAAA;AAAA,8CADA,CADJ,CAJJ,CADJ,CADJ,CAhEZ,CADJ;AAqFH,CAvGD;;AAyGA,MAAMA,eAAe,GAAG;AACpBc,EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,MAAMb,UAAU,GAAG;AACfa,EAAAA,MAAM,EAAE;AADO,CAAnB;AAIA,eAAe1B,SAAf","sourcesContent":["import React, { useContext, Fragment } from 'react'\nimport ExperimentContext from '../context/experiment/experimentContext';\n\nconst Selection = () => {\n const experimentContext = useContext(ExperimentContext);\n const { selection, data, experiment } = experimentContext;\n // const { model, branch, hpc } = experiment;\n //var currentSelection = \"Node: \"\n var currentNode = \"\"\n var selectedNode = null\n if (selection) {\n //console.log(\"Current selection \" + selection)\n selection.map(node => (\n // currentSelection += node + \", \"\n currentNode = node\n ));\n //console.log(\"Current node \" + currentNode)\n selectedNode = data.nodes.find(node => node.id === currentNode) \n //console.log(\"Selected node\")\n //console.log(\"Data: \" + selectedNode.id + \" \" + selectedNode.platform_name)\n } \n return (\n \n {selectedNode &&\n \n
\n
\n
\n
\n {selectedNode.id}\n
\n
\n
\n Date: {selectedNode.date}\n
\n
\n
\n
\n Section: {selectedNode.section}\n
\n
\n
\n
\n
\n
\n Platform: {selectedNode.platform_name && selectedNode.platform_name} {!selectedNode.platform_name && experiment.hpc}\n
\n
\n c:{data.max_children}/p:{data.max_parents}\n
\n
\n
\n {/*
\n Priority: {selectedNode.priority}\n
*/}\n
\n
\n
\n Processors: {selectedNode.processors}\n
\n
\n Wallclock: {selectedNode.wallclock}\n
\n
\n
\n
\n
\n
\n Level: {selectedNode.level}\n
\n
\n Out: {selectedNode.children} In: {selectedNode.parents} \n
\n \n
\n
\n
\n Status: {selectedNode.status}\n
\n
\n
\n
\n
\n
\n } \n {!selectedNode && data &&\n
\n
\n
\n
\n Here goes the Job Id\n
\n
\n
\n Select a Node to see more information. \n
\n
\n
\n
\n
\n } \n
\n \n \n\n )\n}\n\nconst experimentStyle = {\n height: 200\n };\n\nconst headerCard = {\n height: 10\n}\n\nexport default Selection;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/9fc60a2066eb08d4260e8aab0d7258a7.json b/node_modules/.cache/babel-loader/9fc60a2066eb08d4260e8aab0d7258a7.json new file mode 100644 index 0000000000000000000000000000000000000000..a08940e6e7a4b766ea47ad615a8d259c0d2cf25b --- /dev/null +++ b/node_modules/.cache/babel-loader/9fc60a2066eb08d4260e8aab0d7258a7.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js\";\nimport React, { Component } from \"react\"; // import vis from \"vis-network\";\n\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n constructor(...args) {\n super(...args);\n\n this.updateVisNodes = nodes => {\n this.props.setVisData(nodes);\n };\n }\n\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else if (nextProps.data && this.props.data && nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp) {\n console.log(\"Rerendering\");\n return true;\n } else if (nextProps.loadingGraph !== this.props.loadingGraph) {\n return true;\n } else {\n return false;\n }\n }\n\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n render() {\n if (this.props.loadingGraph) return React.createElement(Spinner, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 32\n },\n __self: this\n });\n\n if (this.props.data == null) {\n return React.createElement(\"div\", {\n className: \"card-body text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 35\n },\n __self: this\n }, React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Press \", React.createElement(\"span\", {\n className: \"badge badge-info\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Show Graph\"), \" to see the graph representation of the experiment.\"), React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"If the experiment is running, press \", React.createElement(\"span\", {\n className: \"badge badge-dark\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"Start Job Monitor\"), \" to start a live tracker of the changes on the experiment's jobs. This process will automatically update the graph's nodes colors and show a log of the detected changes.\"));\n }\n\n var nodes_array = [];\n var edges_array = [];\n\n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: {\n background: node.status_color,\n border: \"black\"\n },\n level: node.level\n }));\n this.props.data.edges.map(edge => edges_array.push({\n from: edge.from,\n to: edge.to\n }));\n }\n\n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n const options = {\n edges: {\n arrows: {\n to: {\n enabled: true\n }\n }\n },\n layout: {\n //improvedLayout: true,\n hierarchical: {\n // enabled: true,\n nodeSpacing: 250,\n edgeMinimization: false,\n parentCentralization: true,\n direction: 'UD'\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true\n },\n physics: {\n enabled: false\n },\n nodes: {\n shape: 'dot'\n }\n };\n const graph = {\n nodes: nodes,\n edges: edges\n };\n\n class VisNetwork extends Component {\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else {\n return false;\n }\n }\n\n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", params => {\n //console.log(params);\n if (params.nodes) {\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n });\n } // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n\n\n render() {\n return React.createElement(\"div\", {\n className: \"card-body p-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 129\n },\n __self: this\n }, React.createElement(\"div\", {\n ref: \"myRef\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 130\n },\n __self: this\n }));\n }\n\n }\n\n this.updateVisNodes(nodes);\n return React.createElement(VisNetwork, {\n graph: graph,\n options: options,\n updateSelection: this.props.updateSelection,\n shouldUpdateGraph: this.props.shouldUpdateGraph,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 138\n },\n __self: this\n });\n }\n\n}\n\nconst experimentStyle = {\n height: 600\n};\nexport default GraphNativeRep;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js"],"names":["React","Component","Spinner","vis","GraphNativeRep","updateVisNodes","nodes","props","setVisData","shouldComponentUpdate","nextProps","nextState","shouldUpdateGraph","data","pkl_timestamp","console","log","loadingGraph","componentWillUnmount","cleanGraphData","render","nodes_array","edges_array","edges","map","node","push","id","label","color","background","status_color","border","level","edge","from","to","DataSet","options","arrows","enabled","layout","hierarchical","nodeSpacing","edgeMinimization","parentCentralization","direction","interaction","dragNodes","hoverConnectedEdges","navigationButtons","physics","shape","graph","VisNetwork","componentDidMount","network","Network","refs","myRef","on","params","updateSelection","experimentStyle","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,SAAhB,QAAiC,OAAjC,C,CACA;;AACA,OAAOC,OAAP,MAAoB,mBAApB;AACA,OAAOC,GAAP,MAAgB,KAAhB;;AAEA,MAAMC,cAAN,SAA6BH,SAA7B,CAAuC;AAAA;AAAA;;AAAA,SAmBnCI,cAnBmC,GAmBjBC,KAAD,IAAW;AACxB,WAAKC,KAAL,CAAWC,UAAX,CAAsBF,KAAtB;AACH,KArBkC;AAAA;;AAEnCG,EAAAA,qBAAqB,CAACC,SAAD,EAAYC,SAAZ,EAAsB;AACvC,QAAI,KAAKJ,KAAL,CAAWK,iBAAX,KAAiC,IAArC,EAA0C;AACtC,aAAO,IAAP;AACD,KAFH,MAEQ,IAAIF,SAAS,C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AAK1D,cAAL,CAAoBC,KAApB;AAEA,WAAO,oBAAC,UAAD;AACH,MAAA,KAAK,EAAE+C,KADJ;AAEH,MAAA,OAAO,EAAEf,OAFN;AAGH,MAAA,eAAe,EAAE,KAAK/B,KAAL,CAAWuD,eAHzB;AAIH,MAAA,iBAAiB,EAAE,KAAKvD,KAAL,CAAWK,iBAJ3B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAAP;AAOH;;AA3IkC;;AAyJvC,MAAMmD,eAAe,GAAG;AACpBC,EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,eAAe5D,cAAf","sourcesContent":["import React, { Component } from \"react\";\n// import vis from \"vis-network\";\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n\n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true\n }else if (nextProps.data && this.props.data && (nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp)){\n console.log(\"Rerendering\")\n return true;\n }else if (nextProps.loadingGraph !== this.props.loadingGraph){\n return true; \n }else{\n return false;\n }\n }\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n updateVisNodes = (nodes) => {\n this.props.setVisData(nodes);\n }\n\n\n\n render () {\n if (this.props.loadingGraph) return ;\n if (this.props.data == null){\n return (\n
\n

Press Show Graph to see the graph representation of the experiment.

\n

If the experiment is running, press Start Job Monitor to start a live tracker of the changes on the experiment's jobs.\n This process will automatically update the graph's nodes colors and show a log of the detected changes.\n

\n
\n );\n }\n\n var nodes_array = [];\n var edges_array = [];\n \n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: { background: node.status_color, border: \"black\" },\n level: node.level,\n })\n );\n \n this.props.data.edges.map(edge => \n edges_array.push({ from: edge.from, to: edge.to })\n );\n }\n \n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n\n\n const options = {\n edges: {\n arrows: {\n to: { enabled: true }\n }\n },\n layout: {\n //improvedLayout: true,\n hierarchical: {\n // enabled: true,\n nodeSpacing: 250,\n edgeMinimization: false,\n parentCentralization: true,\n direction: 'UD',\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true,\n },\n physics: {\n enabled: false,\n },\n nodes: {\n shape: 'dot',\n }\n };\n \n const graph = {\n nodes : nodes,\n edges : edges,\n };\n\n class VisNetwork extends Component {\n \n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true;\n } else {\n return false;\n }\n }\n \n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", (params) => {\n //console.log(params);\n if (params.nodes){\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n \n });\n }\n \n // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n \n render() { \n return (\n
\n
\n
\n );\n }\n }\n\n this.updateVisNodes(nodes);\n \n return ;\n\n }\n\n\n \n\n \n\n \n \n\n \n\n}\n\nconst experimentStyle = {\n height: 600\n };\n\nexport default GraphNativeRep;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/a0b949450451999ac4d0878425a443f6.json b/node_modules/.cache/babel-loader/a0b949450451999ac4d0878425a443f6.json new file mode 100644 index 0000000000000000000000000000000000000000..2cbc1c291f092531eeeb514fb16154bd37031489 --- /dev/null +++ b/node_modules/.cache/babel-loader/a0b949450451999ac4d0878425a443f6.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js\";\nimport React, { Component } from \"react\"; // import vis from \"vis-network\";\n\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n constructor(...args) {\n super(...args);\n\n this.updateVisNodes = nodes => {//this.props.setVisData(nodes);\n };\n }\n\n shouldComponentUpdate(nextProps, nextState) {\n if (nextProps.data && this.props.data) {\n console.log(\"Rerendering\");\n return true;\n } else if (nextProps.loadingGraph !== this.props.loadingGraph) {\n return true;\n } else {\n return false;\n }\n }\n\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n render() {\n if (this.props.loadingGraph) return React.createElement(Spinner, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 31\n },\n __self: this\n });\n\n if (this.props.data == null) {\n return React.createElement(\"div\", {\n className: \"card-body text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 34\n },\n __self: this\n }, React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 35\n },\n __self: this\n }, \"Press \", React.createElement(\"span\", {\n className: \"badge badge-info\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 35\n },\n __self: this\n }, \"Show Graph\"), \" to see the graph representation of the experiment.\"), React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"If the experiment is running, press \", React.createElement(\"span\", {\n className: \"badge badge-dark\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Start Job Monitor\"), \" to start a live tracker of the changes on the experiment's jobs. This process will automatically update the graph's nodes colors and show a log of the detected changes.\"));\n }\n\n var nodes_array = [];\n var edges_array = [];\n\n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: {\n background: node.status_color,\n border: \"black\"\n } //level: node.priority,\n\n }));\n this.props.data.edges.map(edge => edges_array.push({\n from: edge.from,\n to: edge.to\n }));\n }\n\n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n this.updateVisNodes(nodes);\n const options = {\n edges: {\n arrows: {\n to: {\n enabled: true\n }\n }\n },\n layout: {\n improvedLayout: true,\n hierarchical: {\n nodeSpacing: 250,\n edgeMinimization: false,\n blockShifting: false,\n parentCentralization: false,\n direction: 'UD',\n sortMethod: 'directed'\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true\n },\n physics: {\n enabled: false\n },\n nodes: {\n shape: 'dot'\n }\n };\n const graph = {\n nodes: nodes,\n edges: edges\n };\n\n class VisNetwork extends Component {\n // shouldComponentUpdate(nextProps, nextState){ \n // if (this.props.shouldUpdateGraph === true){\n // return true;\n // } else {\n // return false;\n // }\n // }\n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", params => {\n //console.log(params);\n if (params.nodes) {\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n });\n } // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n\n\n render() {\n return React.createElement(\"div\", {\n className: \"card-body p-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 130\n },\n __self: this\n }, React.createElement(\"div\", {\n ref: \"myRef\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 131\n },\n __self: this\n }));\n }\n\n }\n\n return React.createElement(VisNetwork, {\n graph: graph,\n options: options,\n updateSelection: this.props.updateSelection,\n shouldUpdateGraph: this.props.shouldUpdateGraph,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 137\n },\n __self: this\n });\n }\n\n}\n\nconst experimentStyle = {\n height: 600\n};\nexport default GraphNativeRep;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js"],"names":["React","Component","Spinner","vis","GraphNativeRep","updateVisNodes","nodes","shouldComponentUpdate","nextProps","nextState","data","props","console","log","loadingGraph","componentWillUnmount","cleanGraphData","render","nodes_array","edges_array","edges","map","node","push","id","label","color","background","status_color","border","edge","from","to","DataSet","options","arrows","enabled","layout","improvedLayout","hierarchical","nodeSpacing","edgeMinimization","blockShifting","parentCentralization","direction","sortMethod","interaction","dragNodes","hoverConnectedEdges","navigationButtons","physics","shape","graph","VisNetwork","componentDidMount","network","Network","refs","myRef","on","params","updateSelection","experimentStyle","shouldUpdateGraph","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,SAAhB,QAAiC,OAAjC,C,CACA;;AACA,OAAOC,OAAP,MAAoB,mBAApB;AACA,OAAOC,GAAP,MAAgB,KAAhB;;AAEA,MAAMC,cAAN,SAA6BH,SAA7B,CAAuC;AAAA;AAAA;;AAAA,SAkBnCI,cAlBmC,GAkBjBC,KAAD,IAAW,CACxB;AACH,KApBkC;AAAA;;AAEnCC,EAAAA,qBAAqB,CAACC,SAAD,EAAYC,SAAZ,EAAsB;AAEvC,QAAID,SAAS,CAACE,IAAV,IAAkB,KAAKC,KAAL,CAAWD,IAAjC,EAAsC;AACpCE,MAAAA,OAAO,CAACC,GAAR,CAAY,aAAZ;AACA,aAAO,IAAP;AACD,KAHD,MAGM,IAAIL,SAAS,CAACM,YAAV,KAA2B,KAAKH,KAAL,CAAWG,YAA1C,EAAuD;AAC3D,aAAO,IAAP;AACD,KAFK,MAED;AACH,aAAO,KAAP;AACD;AACJ;;AACDC,EAAAA,oBAAoB,GAAG;AACnBH,IAAAA,OAAO,CAACC,GAAR,CAAY,YAAZ;AACA,SAAKF,KAAL,CAAWK,cAAX;AACH;;AAQDC,EAAAA,MAAM,GAAI;AACN,QAAI,KAAKN,KAAL,CAAWG,YAAf,EAA6B,OAAO,oBAAC,OAAD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAAP;;AAC7B,QAAI,KAAKH,KAAL,CAAWD,IAAX,IAAmB,IAAvB,EAA4B;AACxB,aACI;AAAK,QAAA,SAAS,EAAC,qBAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,SACI;AAAG,QAAA,SAAS,EAAC,MAAb;AAAA;AAAA;AAAA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AX,EAAiB;AACb;AACA,iBAAKK,KAAL,CAAWkD,eAAX,CAA2BD,MAAM,CAACtD,KAAlC;AACH;AAEJ,SAPD;AAQH,OApB8B,CAsB/B;AACA;AACA;AACA;;;AAEAW,MAAAA,MAAM,GAAG;AACL,eACI;AAAK,UAAA,SAAS,EAAC,eAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,WACI;AAAK,UAAA,GAAG,EAAC,OAAT;AAAiB,UAAA,KAAK,EAAE6C,eAAxB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,UADJ,CADJ;AAKH;;AAjC8B;;AAoCnC,WAAO,oBAAC,UAAD;AACH,MAAA,KAAK,EAAEV,KADJ;AAEH,MAAA,OAAO,EAAElB,OAFN;AAGH,MAAA,eAAe,EAAE,KAAKvB,KAAL,CAAWkD,eAHzB;AAIH,MAAA,iBAAiB,EAAE,KAAKlD,KAAL,CAAWoD,iBAJ3B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAAP;AAOH;;AA1IkC;;AAwJvC,MAAMD,eAAe,GAAG;AACpBE,EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,eAAe5D,cAAf","sourcesContent":["import React, { Component } from \"react\";\n// import vis from \"vis-network\";\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n\n shouldComponentUpdate(nextProps, nextState){ \n \n if (nextProps.data && this.props.data){\n console.log(\"Rerendering\")\n return true;\n }else if (nextProps.loadingGraph !== this.props.loadingGraph){\n return true; \n }else{\n return false;\n }\n }\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n updateVisNodes = (nodes) => {\n //this.props.setVisData(nodes);\n }\n\n\n\n render () {\n if (this.props.loadingGraph) return ;\n if (this.props.data == null){\n return (\n
\n

Press Show Graph to see the graph representation of the experiment.

\n

If the experiment is running, press Start Job Monitor to start a live tracker of the changes on the experiment's jobs.\n This process will automatically update the graph's nodes colors and show a log of the detected changes.\n

\n
\n );\n }\n\n var nodes_array = [];\n var edges_array = [];\n \n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: { background: node.status_color, border: \"black\" },\n //level: node.priority,\n })\n );\n \n this.props.data.edges.map(edge => \n edges_array.push({ from: edge.from, to: edge.to })\n );\n }\n \n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n this.updateVisNodes(nodes);\n\n const options = {\n edges: {\n arrows: {\n to: { enabled: true }\n }\n },\n layout: {\n improvedLayout: true,\n hierarchical: {\n \n nodeSpacing: 250,\n edgeMinimization: false,\n blockShifting: false,\n parentCentralization: false,\n direction: 'UD',\n sortMethod: 'directed',\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true,\n },\n physics: {\n enabled: false,\n },\n nodes: {\n shape: 'dot',\n }\n };\n \n const graph = {\n nodes : nodes,\n edges : edges,\n };\n\n class VisNetwork extends Component {\n \n // shouldComponentUpdate(nextProps, nextState){ \n // if (this.props.shouldUpdateGraph === true){\n // return true;\n // } else {\n // return false;\n // }\n // }\n \n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", (params) => {\n //console.log(params);\n if (params.nodes){\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n \n });\n }\n \n // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n \n render() { \n return (\n
\n
\n
\n );\n }\n }\n \n return ;\n\n }\n\n\n \n\n \n\n \n \n\n \n\n}\n\nconst experimentStyle = {\n height: 600\n };\n\nexport default GraphNativeRep;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/a1b760181e73f74aad8bee65a1a72eb2.json b/node_modules/.cache/babel-loader/a1b760181e73f74aad8bee65a1a72eb2.json new file mode 100644 index 0000000000000000000000000000000000000000..4c4475acb2940bcda8133a5c85a0310666e6db98 --- /dev/null +++ b/node_modules/.cache/babel-loader/a1b760181e73f74aad8bee65a1a72eb2.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js\";\nimport React, { Component } from \"react\"; // import vis from \"vis-network\";\n\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis-network\";\n\nclass GraphNativeRep extends Component {\n constructor(...args) {\n super(...args);\n\n this.updateVisNodes = nodes => {\n this.props.setVisData(nodes);\n };\n }\n\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else if (nextProps.data && this.props.data && nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp) {\n console.log(\"Rerendering\");\n return true;\n } else if (nextProps.loadingGraph !== this.props.loadingGraph) {\n return true;\n } else {\n return false;\n }\n }\n\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n render() {\n if (this.props.loadingGraph) return React.createElement(Spinner, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 32\n },\n __self: this\n });\n\n if (this.props.data == null) {\n return React.createElement(\"div\", {\n className: \"card-body text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 35\n },\n __self: this\n }, React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Press \", React.createElement(\"span\", {\n className: \"badge badge-info\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Show Graph\"), \" to see the graph representation of the experiment.\"), React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"If the experiment is running, press \", React.createElement(\"span\", {\n className: \"badge badge-dark\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"Start Job Monitor\"), \" to start a live tracker of the changes on the experiment's jobs. This process will automatically update the graph's nodes colors and show a log of the detected changes.\"));\n }\n\n var nodes_array = [];\n var edges_array = [];\n\n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: {\n background: node.status_color,\n border: \"black\"\n },\n level: node.level\n }));\n this.props.data.edges.map(edge => edges_array.push({\n from: edge.from,\n to: edge.to\n }));\n }\n\n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n const options = {\n edges: {\n arrows: {\n to: {\n enabled: true\n }\n }\n },\n layout: {\n improvedLayout: false,\n hierarchical: {\n nodeSpacing: 190,\n blockShifting: true,\n edgeMinimization: true,\n parentCentralization: false,\n sortMethod: 'directed',\n direction: 'UD' // work on vis current version\n // nodeSpacing: 190,\n // blockShifting: false,\n // edgeMinimization: false,\n // parentCentralization: true,\n // sortMethod: 'hubsize',\n // direction: 'UD',\n\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true\n },\n physics: {\n enabled: false\n },\n nodes: {\n shape: 'dot',\n font: {\n size: 10\n }\n }\n };\n const graph = {\n nodes: nodes,\n edges: edges\n };\n\n class VisNetwork extends Component {\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else {\n return false;\n }\n }\n\n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", params => {\n //console.log(params);\n if (params.nodes) {\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n });\n } // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n\n\n render() {\n return React.createElement(\"div\", {\n className: \"card-body p-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 140\n },\n __self: this\n }, React.createElement(\"div\", {\n ref: \"myRef\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 141\n },\n __self: this\n }));\n }\n\n }\n\n this.updateVisNodes(nodes);\n return React.createElement(VisNetwork, {\n graph: graph,\n options: options,\n updateSelection: this.props.updateSelection,\n shouldUpdateGraph: this.props.shouldUpdateGraph,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 149\n },\n __self: this\n });\n }\n\n}\n\nconst experimentStyle = {\n height: 600\n};\nexport default GraphNativeRep;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js"],"names":["React","Component","Spinner","vis","GraphNativeRep","updateVisNodes","nodes","props","setVisData","shouldComponentUpdate","nextProps","nextState","shouldUpdateGraph","data","pkl_timestamp","console","log","loadingGraph","componentWillUnmount","cleanGraphData","render","nodes_array","edges_array","edges","map","node","push","id","label","color","background","status_color","border","level","edge","from","to","DataSet","options","arrows","enabled","layout","improvedLayout","hierarchical","nodeSpacing","blockShifting","edgeMinimization","parentCentralization","sortMethod","direction","interaction","dragNodes","hoverConnectedEdges","navigationButtons","physics","shape","font","size","graph","VisNetwork","componentDidMount","network","Network","refs","myRef","on","params","updateSelection","experimentStyle","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,SAAhB,QAAiC,OAAjC,C,CACA;;AACA,OAAOC,OAAP,MAAoB,mBAApB;AACA,OAAOC,GAAP,MAAgB,aAAhB;;AAEA,MAAMC,cAAN,SAA6BH,SAA7B,CAAuC;AAAA;AAAA;;AAAA,SAmBnCI,cAnBmC,GAmBjBC,KAAD,IAAW;AACxB,WAAKC,KAAL,CAAWC,UAAX,CAAsBF,KAAtB;AACH,KArBkC;AAAA;;AAEnCG,EAAAA,qBAAqB,CAACC,SAAD,EAAYC,SAAZ,EAAsB;AACvC,QAAI,KAAKJ,KAAL,CAAWK,iBAAX,KAAiC,IAArC,EAA0C;AACtC,aAAO,IAAP;AACD,KAFH,MAEQ,IAAIF,SAAS,CAACG,IAAV,IAAkB,KAAKN,KAAL,CAAWM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AA;AAAA,WACI;AAAK,UAAA,GAAG,EAAC,OAAT;AAAiB,UAAA,KAAK,EAAEgD,eAAxB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,UADJ,CADJ;AAKH;;AAjC8B;;AAoCnC,SAAK/D,cAAL,CAAoBC,KAApB;AAEA,WAAO,oBAAC,UAAD;AACH,MAAA,KAAK,EAAEoD,KADJ;AAEH,MAAA,OAAO,EAAEpB,OAFN;AAGH,MAAA,eAAe,EAAE,KAAK/B,KAAL,CAAW4D,eAHzB;AAIH,MAAA,iBAAiB,EAAE,KAAK5D,KAAL,CAAWK,iBAJ3B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAAP;AAOH;;AAtJkC;;AAoKvC,MAAMwD,eAAe,GAAG;AACpBC,EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,eAAejE,cAAf","sourcesContent":["import React, { Component } from \"react\";\n// import vis from \"vis-network\";\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis-network\";\n\nclass GraphNativeRep extends Component {\n\n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true\n }else if (nextProps.data && this.props.data && (nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp)){\n console.log(\"Rerendering\")\n return true;\n }else if (nextProps.loadingGraph !== this.props.loadingGraph){\n return true; \n }else{\n return false;\n }\n }\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n updateVisNodes = (nodes) => {\n this.props.setVisData(nodes);\n }\n\n\n\n render () {\n if (this.props.loadingGraph) return ;\n if (this.props.data == null){\n return (\n
\n

Press Show Graph to see the graph representation of the experiment.

\n

If the experiment is running, press Start Job Monitor to start a live tracker of the changes on the experiment's jobs.\n This process will automatically update the graph's nodes colors and show a log of the detected changes.\n

\n
\n );\n }\n\n var nodes_array = [];\n var edges_array = [];\n \n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: { background: node.status_color, border: \"black\" },\n level: node.level,\n })\n );\n \n this.props.data.edges.map(edge => \n edges_array.push({ from: edge.from, to: edge.to })\n );\n }\n \n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n\n\n const options = {\n edges: {\n arrows: {\n to: { enabled: true }\n }\n },\n layout: {\n improvedLayout: false,\n hierarchical: {\n nodeSpacing: 190, \n blockShifting: true,\n edgeMinimization: true,\n parentCentralization: false,\n sortMethod: 'directed',\n direction: 'UD',\n // work on vis current version\n // nodeSpacing: 190,\n // blockShifting: false,\n // edgeMinimization: false,\n // parentCentralization: true,\n // sortMethod: 'hubsize',\n // direction: 'UD',\n }\n }, \n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true,\n },\n physics: {\n enabled: false,\n },\n nodes: {\n shape: 'dot',\n font: {\n size: 10,\n },\n }\n };\n \n const graph = {\n nodes : nodes,\n edges : edges,\n };\n\n class VisNetwork extends Component {\n \n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true;\n } else {\n return false;\n }\n }\n \n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", (params) => {\n //console.log(params);\n if (params.nodes){\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n \n });\n }\n \n // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n \n render() { \n return (\n
\n
\n
\n );\n }\n }\n\n this.updateVisNodes(nodes);\n \n return ;\n\n }\n\n\n \n\n \n\n \n \n\n \n\n}\n\nconst experimentStyle = {\n height: 600\n };\n\nexport default GraphNativeRep;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/a541e2b7f020d11d409be296387c44f6.json b/node_modules/.cache/babel-loader/a541e2b7f020d11d409be296387c44f6.json new file mode 100644 index 0000000000000000000000000000000000000000..fffe1f004e38f29225927cb72b6dccbb2476b378 --- /dev/null +++ b/node_modules/.cache/babel-loader/a541e2b7f020d11d409be296387c44f6.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js\";\nimport React, { Component } from \"react\"; // import vis from \"vis-network\";\n\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n constructor(...args) {\n super(...args);\n\n this.updateVisNodes = nodes => {\n this.props.setVisData(nodes);\n };\n }\n\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else if (nextProps.data && this.props.data && nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp) {\n console.log(\"Rerendering\");\n return true;\n } else if (nextProps.loadingGraph !== this.props.loadingGraph) {\n return true;\n } else {\n return false;\n }\n }\n\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n render() {\n if (this.props.loadingGraph) return React.createElement(Spinner, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 32\n },\n __self: this\n });\n\n if (this.props.data == null) {\n return React.createElement(\"div\", {\n className: \"card-body text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 35\n },\n __self: this\n }, React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Press \", React.createElement(\"span\", {\n className: \"badge badge-info\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Show Graph\"), \" to see the graph representation of the experiment.\"), React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"If the experiment is running, press \", React.createElement(\"span\", {\n className: \"badge badge-dark\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"Start Job Monitor\"), \" to start a live tracker of the changes on the experiment's jobs. This process will automatically update the graph's nodes colors and show a log of the detected changes.\"));\n }\n\n var nodes_array = [];\n var edges_array = [];\n\n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: {\n background: node.status_color,\n border: \"black\"\n },\n level: node.level\n }));\n this.props.data.edges.map(edge => edges_array.push({\n from: edge.from,\n to: edge.to\n }));\n }\n\n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n const options = {\n edges: {\n arrows: {\n to: {\n enabled: true\n }\n }\n },\n layout: {\n //improvedLayout: true,\n hierarchical: {\n nodeSpacing: 190,\n blockShifting: true,\n edgeMinimization: true,\n //parentCentralization: true,\n sortMethod: 'directed',\n direction: 'UD'\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true\n },\n physics: {\n enabled: false\n },\n nodes: {\n shape: 'dot',\n font: {\n size: 10\n }\n }\n };\n const graph = {\n nodes: nodes,\n edges: edges\n };\n\n class VisNetwork extends Component {\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else {\n return false;\n }\n }\n\n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", params => {\n //console.log(params);\n if (params.nodes) {\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n });\n } // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n\n\n render() {\n return React.createElement(\"div\", {\n className: \"card-body p-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 133\n },\n __self: this\n }, React.createElement(\"div\", {\n ref: \"myRef\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 134\n },\n __self: this\n }));\n }\n\n }\n\n this.updateVisNodes(nodes);\n return React.createElement(VisNetwork, {\n graph: graph,\n options: options,\n updateSelection: this.props.updateSelection,\n shouldUpdateGraph: this.props.shouldUpdateGraph,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 142\n },\n __self: this\n });\n }\n\n}\n\nconst experimentStyle = {\n height: 600\n};\nexport default GraphNativeRep;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js"],"names":["React","Component","Spinner","vis","GraphNativeRep","updateVisNodes","nodes","props","setVisData","shouldComponentUpdate","nextProps","nextState","shouldUpdateGraph","data","pkl_timestamp","console","log","loadingGraph","componentWillUnmount","cleanGraphData","render","nodes_array","edges_array","edges","map","node","push","id","label","color","background","status_color","border","level","edge","from","to","DataSet","options","arrows","enabled","layout","hierarchical","nodeSpacing","blockShifting","edgeMinimization","sortMethod","direction","interaction","dragNodes","hoverConnectedEdges","navigationButtons","physics","shape","font","size","graph","VisNetwork","componentDidMount","network","Network","refs","myRef","on","params","updateSelection","experimentStyle","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,SAAhB,QAAiC,OAAjC,C,CACA;;AACA,OAAOC,OAAP,MAAoB,mBAApB;AACA,OAAOC,GAAP,MAAgB,KAAhB;;AAEA,MAAMC,cAAN,SAA6BH,SAA7B,CAAuC;AAAA;AAAA;;AAAA,SAmBnCI,cAnBmC,GAmBjBC,KAAD,IAAW;AACxB,WAAKC,KAAL,CAAWC,UAAX,CAAsBF,KAAtB;AACH,KArBkC;AAAA;;AAEnCG,EAAAA,qBAAqB,CAACC,SAAD,EAAYC,SAAZ,EAAsB;AACvC,QAAI,KAAKJ,KAAL,CAAWK,iBAAX,KAAiC,IAArC,EAA0C;AACtC,aAAO,IAAP;AACD,KAFH,MAEQ,IAAIF,SAAS,CAACG,IAAV,IAAkB,KAAKN,KAAL,CAAWM,IAA7B,IAAsCH,SAAS,CAACG,IAAV,CAAeC,aAAf,KAAiC,KAAKP,KAAL,CAAWM,IAAX,CAAgBC,aAA3F,EAA0G;AAC9GC,MAAAA,OAAO,CAACC,GAA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J;AAEH,MAAA,OAAO,EAAElB,OAFN;AAGH,MAAA,eAAe,EAAE,KAAK/B,KAAL,CAAW0D,eAHzB;AAIH,MAAA,iBAAiB,EAAE,KAAK1D,KAAL,CAAWK,iBAJ3B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAAP;AAOH;;AA/IkC;;AA6JvC,MAAMsD,eAAe,GAAG;AACpBC,EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,eAAe/D,cAAf","sourcesContent":["import React, { Component } from \"react\";\n// import vis from \"vis-network\";\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n\n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true\n }else if (nextProps.data && this.props.data && (nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp)){\n console.log(\"Rerendering\")\n return true;\n }else if (nextProps.loadingGraph !== this.props.loadingGraph){\n return true; \n }else{\n return false;\n }\n }\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n updateVisNodes = (nodes) => {\n this.props.setVisData(nodes);\n }\n\n\n\n render () {\n if (this.props.loadingGraph) return ;\n if (this.props.data == null){\n return (\n
\n

Press Show Graph to see the graph representation of the experiment.

\n

If the experiment is running, press Start Job Monitor to start a live tracker of the changes on the experiment's jobs.\n This process will automatically update the graph's nodes colors and show a log of the detected changes.\n

\n
\n );\n }\n\n var nodes_array = [];\n var edges_array = [];\n \n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: { background: node.status_color, border: \"black\" },\n level: node.level,\n })\n );\n \n this.props.data.edges.map(edge => \n edges_array.push({ from: edge.from, to: edge.to })\n );\n }\n \n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n\n\n const options = {\n edges: {\n arrows: {\n to: { enabled: true }\n }\n },\n layout: {\n //improvedLayout: true,\n hierarchical: {\n nodeSpacing: 190,\n blockShifting: true,\n edgeMinimization: true,\n //parentCentralization: true,\n sortMethod: 'directed',\n direction: 'UD',\n }\n }, \n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true,\n },\n physics: {\n enabled: false,\n },\n nodes: {\n shape: 'dot',\n font: {\n size: 10,\n },\n }\n };\n \n const graph = {\n nodes : nodes,\n edges : edges,\n };\n\n class VisNetwork extends Component {\n \n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true;\n } else {\n return false;\n }\n }\n \n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", (params) => {\n //console.log(params);\n if (params.nodes){\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n \n });\n }\n \n // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n \n render() { \n return (\n
\n
\n
\n );\n }\n }\n\n this.updateVisNodes(nodes);\n \n return ;\n\n }\n\n\n \n\n \n\n \n \n\n \n\n}\n\nconst experimentStyle = {\n height: 600\n };\n\nexport default GraphNativeRep;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/a5e1f83409848286821ec536112d9c7f.json b/node_modules/.cache/babel-loader/a5e1f83409848286821ec536112d9c7f.json new file mode 100644 index 0000000000000000000000000000000000000000..69470d96759a388b07bad949d8c78e6d91032468 --- /dev/null +++ b/node_modules/.cache/babel-loader/a5e1f83409848286821ec536112d9c7f.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js\";\nimport React, { Component } from \"react\"; // import vis from \"vis-network\";\n\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n constructor(...args) {\n super(...args);\n\n this.updateVisNodes = nodes => {\n this.props.setVisData(nodes);\n };\n }\n\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else if (nextProps.data && this.props.data && nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp) {\n console.log(\"Rerendering\");\n return true;\n } else if (nextProps.loadingGraph !== this.props.loadingGraph) {\n return true;\n } else {\n return false;\n }\n }\n\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n render() {\n if (this.props.loadingGraph) return React.createElement(Spinner, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 32\n },\n __self: this\n });\n\n if (this.props.data == null) {\n return React.createElement(\"div\", {\n className: \"card-body text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 35\n },\n __self: this\n }, React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Press \", React.createElement(\"span\", {\n className: \"badge badge-info\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Show Graph\"), \" to see the graph representation of the experiment.\"), React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"If the experiment is running, press \", React.createElement(\"span\", {\n className: \"badge badge-dark\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"Start Job Monitor\"), \" to start a live tracker of the changes on the experiment's jobs. This process will automatically update the graph's nodes colors and show a log of the detected changes.\"));\n }\n\n var nodes_array = [];\n var edges_array = [];\n\n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: {\n background: node.status_color,\n border: \"black\"\n },\n level: node.level\n }));\n this.props.data.edges.map(edge => edges_array.push({\n from: edge.from,\n to: edge.to\n }));\n }\n\n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n const options = {\n edges: {\n arrows: {\n to: {\n enabled: true\n }\n }\n },\n layout: {\n //improvedLayout: true,\n hierarchical: {\n // enabled: true,\n nodeSpacing: 250,\n treeSpacing: 200,\n blockShifting: true,\n edgeMinimization: true,\n parentCentralization: true,\n direction: 'UD',\n sortMethod: 'directed'\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true\n },\n physics: {\n enabled: false\n },\n nodes: {\n shape: 'dot'\n }\n };\n const graph = {\n nodes: nodes,\n edges: edges\n };\n\n class VisNetwork extends Component {\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else {\n return false;\n }\n }\n\n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", params => {\n //console.log(params);\n if (params.nodes) {\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n });\n } // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n\n\n render() {\n return React.createElement(\"div\", {\n className: \"card-body p-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 132\n },\n __self: this\n }, React.createElement(\"div\", {\n ref: \"myRef\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 133\n },\n __self: this\n }));\n }\n\n }\n\n this.updateVisNodes(nodes);\n return React.createElement(VisNetwork, {\n graph: graph,\n options: options,\n updateSelection: this.props.updateSelection,\n shouldUpdateGraph: this.props.shouldUpdateGraph,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 141\n },\n __self: this\n });\n }\n\n}\n\nconst experimentStyle = {\n height: 600\n};\nexport default GraphNativeRep;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js"],"names":["React","Component","Spinner","vis","GraphNativeRep","updateVisNodes","nodes","props","setVisData","shouldComponentUpdate","nextProps","nextState","shouldUpdateGraph","data","pkl_timestamp","console","log","loadingGraph","componentWillUnmount","cleanGraphData","render","nodes_array","edges_array","edges","map","node","push","id","label","color","background","status_color","border","level","edge","from","to","DataSet","options","arrows","enabled","layout","hierarchical","nodeSpacing","treeSpacing","blockShifting","edgeMinimization","parentCentralization","direction","sortMethod","interaction","dragNodes","hoverConnectedEdges","navigationButtons","physics","shape","graph","VisNetwork","componentDidMount","network","Network","refs","myRef","on","params","updateSelection","experimentStyle","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,SAAhB,QAAiC,OAAjC,C,CACA;;AACA,OAAOC,OAAP,MAAoB,mBAApB;AACA,OAAOC,GAAP,MAAgB,KAAhB;;AAEA,MAAMC,cAAN,SAA6BH,SAA7B,CAAuC;AAAA;AAAA;;AAAA,SAmBnCI,cAnBmC,GAmBjBC,KAAD,IAAW;AACxB,WAAKC,KAAL,CAAWC,UAAX,CAAsBF,KAAtB;AACH,KArBkC;AAAA;;AAEnCG,EAAAA,qBAAqB,CAACC,SAAD,EAAYC,SAAZ,EAAsB;AACvC,QAAI,KAAKJ,KAAL,CAAWK,iBAAX,KAAiC,IAArC,EAA0C;AACtC,aAAO,IAAP;AACD,KAFH,MAEQ,IAAIF,SAAS,CAACG,IAAV,IAAkB,KAAKN,KAAL,CAAWM,IAA7B,IAAsCH,SAAS,CAACG,IAAV,CAAeC,aAAf,KAAiC,KAAKP,KAAL,CAAWM,IAAX,CAAgBC,aAA3F,EAA0G;AAC9GC,MAAAA,OAAO,CAACC,GAAR,CAAY,aAAZ;AACA,aAAO,IAAP;AACD,KAHK,MAGA,IAAIN,SAAS,CAACO,YAAV,KAA2B,KAAKV,KAAL,CAAWU,YAA1C,EAAuD;AAC3D,aAAO,IAAP;AACD,KAFK,MAED;AACH,aAAO,KAAP;AACD;AACN;;AACDC,EAAAA,oBAAoB,GAAG;AACnBH,IAAAA,OAAO,CAACC,GAAR,CAAY,YAAZ;AACA,SAAKT,KAAL,CAAWY,cAAX;AACH;;AAQDC,EAAAA,MAAM,GAAI;AACN,Q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";\n// import vis from \"vis-network\";\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n\n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true\n }else if (nextProps.data && this.props.data && (nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp)){\n console.log(\"Rerendering\")\n return true;\n }else if (nextProps.loadingGraph !== this.props.loadingGraph){\n return true; \n }else{\n return false;\n }\n }\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n updateVisNodes = (nodes) => {\n this.props.setVisData(nodes);\n }\n\n\n\n render () {\n if (this.props.loadingGraph) return ;\n if (this.props.data == null){\n return (\n
\n

Press Show Graph to see the graph representation of the experiment.

\n

If the experiment is running, press Start Job Monitor to start a live tracker of the changes on the experiment's jobs.\n This process will automatically update the graph's nodes colors and show a log of the detected changes.\n

\n
\n );\n }\n\n var nodes_array = [];\n var edges_array = [];\n \n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: { background: node.status_color, border: \"black\" },\n level: node.level,\n })\n );\n \n this.props.data.edges.map(edge => \n edges_array.push({ from: edge.from, to: edge.to })\n );\n }\n \n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n\n\n const options = {\n edges: {\n arrows: {\n to: { enabled: true }\n }\n },\n layout: {\n //improvedLayout: true,\n hierarchical: {\n // enabled: true,\n nodeSpacing: 250,\n treeSpacing: 200,\n blockShifting: true,\n edgeMinimization: true,\n parentCentralization: true,\n direction: 'UD',\n sortMethod: 'directed',\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true,\n },\n physics: {\n enabled: false,\n },\n nodes: {\n shape: 'dot',\n }\n };\n \n const graph = {\n nodes : nodes,\n edges : edges,\n };\n\n class VisNetwork extends Component {\n \n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true;\n } else {\n return false;\n }\n }\n \n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", (params) => {\n //console.log(params);\n if (params.nodes){\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n \n });\n }\n \n // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n \n render() { \n return (\n
\n
\n
\n );\n }\n }\n\n this.updateVisNodes(nodes);\n \n return ;\n\n }\n\n\n \n\n \n\n \n \n\n \n\n}\n\nconst experimentStyle = {\n height: 600\n };\n\nexport default GraphNativeRep;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/a963b424ba4d5909fa142d31d0c36ef1.json b/node_modules/.cache/babel-loader/a963b424ba4d5909fa142d31d0c36ef1.json new file mode 100644 index 0000000000000000000000000000000000000000..2de5627373c6eddaa436073a23560d627f5fb9be --- /dev/null +++ b/node_modules/.cache/babel-loader/a963b424ba4d5909fa142d31d0c36ef1.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/Selection.js\";\nimport React, { useContext, Fragment } from 'react';\nimport ExperimentContext from '../context/experiment/experimentContext';\n\nconst Selection = () => {\n const experimentContext = useContext(ExperimentContext);\n const selection = experimentContext.selection,\n data = experimentContext.data,\n experiment = experimentContext.experiment; // const { model, branch, hpc } = experiment;\n //var currentSelection = \"Node: \"\n\n var currentNode = \"\";\n var selectedNode = null;\n\n if (selection) {\n //console.log(\"Current selection \" + selection)\n selection.map(node => // currentSelection += node + \", \"\n currentNode = node); //console.log(\"Current node \" + currentNode)\n\n selectedNode = data.nodes.find(node => node.id === currentNode); //console.log(\"Selected node\")\n //console.log(\"Data: \" + selectedNode.id + \" \" + selectedNode.platform_name)\n }\n\n return React.createElement(Fragment, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 23\n },\n __self: this\n }, selectedNode && React.createElement(Fragment, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 25\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 26\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-12\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 27\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"card text-white bg-info\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 28\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"card-header text-center p-0\",\n style: headerCard,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 29\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"mh-100 px-0 mx-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 30\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 31\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 31\n },\n __self: this\n }, selectedNode.id)))), React.createElement(\"div\", {\n className: \"card-body py-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 34\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 35\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Date:\"), \" \", selectedNode.date)), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 38\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 39\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-12\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 40\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 41\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 41\n },\n __self: this\n }, \"Section:\"), \" \", selectedNode.section)))), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 45\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 46\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-8\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 47\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 48\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 48\n },\n __self: this\n }, \"Platform:\"), \" \", selectedNode.platform_name && selectedNode.platform_name, \" \", !selectedNode.platform_name && experiment.hpc)), React.createElement(\"div\", {\n className: \"col-4 text-right\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 50\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 51\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 51\n },\n __self: this\n }, \"c:\", data.max_children, \"/p:\", data.max_parents))))), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 58\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 59\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-6\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 60\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 61\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 61\n },\n __self: this\n }, \"Processors:\"), \" \", selectedNode.processors)), React.createElement(\"div\", {\n className: \"col-6\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 63\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 64\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 64\n },\n __self: this\n }, \"Wallclock:\"), \" \", selectedNode.wallclock)))), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 68\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 69\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-6\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 70\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 71\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 71\n },\n __self: this\n }, \"Level:\"), \" \", selectedNode.level)), React.createElement(\"div\", {\n className: \"col-6\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 73\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 74\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 74\n },\n __self: this\n }, \"Out:\"), \" \", selectedNode.children, \" \", React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 74\n },\n __self: this\n }, \"In:\"), \" \", selectedNode.parents, \" \")))), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 79\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 80\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 80\n },\n __self: this\n }, \"Status:\")), \" \", selectedNode.status)))))), !selectedNode && data && React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 89\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-12\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 90\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"card text-white bg-info\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 91\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"card-header text-center py-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 92\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 93\n },\n __self: this\n }, \"Here goes the Job Id\")), React.createElement(\"div\", {\n className: \"card-body\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 95\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"text-center\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 96\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 97\n },\n __self: this\n }, \"Select a Node to see more information.\")))))));\n};\n\nconst experimentStyle = {\n height: 200\n};\nconst headerCard = {\n height: 30\n};\nexport default Selection;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/Selection.js"],"names":["React","useContext","Fragment","ExperimentContext","Selection","experimentContext","selection","data","experiment","currentNode","selectedNode","map","node","nodes","find","id","experimentStyle","headerCard","date","section","platform_name","hpc","max_children","max_parents","processors","wallclock","level","children","parents","status","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,UAAhB,EAA4BC,QAA5B,QAA4C,OAA5C;AACA,OAAOC,iBAAP,MAA8B,yCAA9B;;AAEA,MAAMC,SAAS,GAAG,MAAM;AACpB,QAAMC,iBAAiB,GAAGJ,UAAU,CAACE,iBAAD,CAApC;AADoB,QAEZG,SAFY,GAEoBD,iBAFpB,CAEZC,SAFY;AAAA,QAEDC,IAFC,GAEoBF,iBAFpB,CAEDE,IAFC;AAAA,QAEKC,UAF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,IAAA,SAAS,EAAC,KAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACI;AAAK,IAAA,SAAS,EAAC,QAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACI;AAAK,IAAA,SAAS,EAAC,yBAAf;AAAyC,IAAA,KAAK,EAAES,eAAhD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACI;AAAK,IAAA,SAAS,EAAC,8BAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACI;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,4BADJ,CADJ,EAII;AAAK,IAAA,SAAS,EAAC,WAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACI;AAAK,IAAA,SAAS,EAAC,aAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,8CADA,CADJ,CAJJ,CADJ,CADJ,CAlEZ,CADJ;AAuFH,CAzGD;;AA2GA,MAAMA,eAAe,GAAG;AACpBc,EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,MAAMb,UAAU,GAAG;AACfa,EAAAA,MAAM,EAAE;AADO,CAAnB;AAIA,eAAe1B,SAAf","sourcesContent":["import React, { useContext, Fragment } from 'react'\nimport ExperimentContext from '../context/experiment/experimentContext';\n\nconst Selection = () => {\n const experimentContext = useContext(ExperimentContext);\n const { selection, data, experiment } = experimentContext;\n // const { model, branch, hpc } = experiment;\n //var currentSelection = \"Node: \"\n var currentNode = \"\"\n var selectedNode = null\n if (selection) {\n //console.log(\"Current selection \" + selection)\n selection.map(node => (\n // currentSelection += node + \", \"\n currentNode = node\n ));\n //console.log(\"Current node \" + currentNode)\n selectedNode = data.nodes.find(node => node.id === currentNode) \n //console.log(\"Selected node\")\n //console.log(\"Data: \" + selectedNode.id + \" \" + selectedNode.platform_name)\n } \n return (\n \n {selectedNode &&\n \n
\n
\n
\n
\n
\n {selectedNode.id}\n
\n
\n
\n
\n Date: {selectedNode.date}\n
\n
\n
\n
\n Section: {selectedNode.section}\n
\n
\n
\n
\n
\n
\n Platform: {selectedNode.platform_name && selectedNode.platform_name} {!selectedNode.platform_name && experiment.hpc}\n
\n
\n c:{data.max_children}/p:{data.max_parents}\n
\n
\n
\n {/*
\n Priority: {selectedNode.priority}\n
*/}\n
\n
\n
\n Processors: {selectedNode.processors}\n
\n
\n Wallclock: {selectedNode.wallclock}\n
\n
\n
\n
\n
\n
\n Level: {selectedNode.level}\n
\n
\n Out: {selectedNode.children} In: {selectedNode.parents} \n
\n \n
\n
\n
\n Status: {selectedNode.status}\n
\n
\n
\n
\n
\n
\n } \n {!selectedNode && data &&\n
\n
\n
\n
\n Here goes the Job Id\n
\n
\n
\n Select a Node to see more information. \n
\n
\n
\n
\n
\n } \n
\n \n \n\n )\n}\n\nconst experimentStyle = {\n height: 200\n };\n\nconst headerCard = {\n height: 30\n}\n\nexport default Selection;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/aa73cadfe2503c1de91bab878655e968.json b/node_modules/.cache/babel-loader/aa73cadfe2503c1de91bab878655e968.json new file mode 100644 index 0000000000000000000000000000000000000000..4db1a734a7869b3e70fc95e71f6ccf64b8e2fe97 --- /dev/null +++ b/node_modules/.cache/babel-loader/aa73cadfe2503c1de91bab878655e968.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js\";\nimport React, { Component } from \"react\"; // import vis from \"vis-network\";\n\nimport Spinner from \"../layout/Spinner\"; // import ExperimentContext from '../context/experiment/experimentContext';\n\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else if (nextProps.data && this.props.data && nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp) {\n console.log(\"Rerendering\");\n return true;\n } else if (nextProps.loadingGraph !== this.props.loadingGraph) {\n return true;\n } else {\n return false;\n }\n }\n\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n render() {\n if (this.props.loadingGraph) return React.createElement(Spinner, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 30\n },\n __self: this\n });\n\n if (this.props.data == null) {\n return React.createElement(\"div\", {\n className: \"card-body text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 33\n },\n __self: this\n }, React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 34\n },\n __self: this\n }, \"Press \", React.createElement(\"span\", {\n className: \"badge badge-info\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 34\n },\n __self: this\n }, \"Show Graph\"), \" to see the graph representation of the experiment.\"), React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 35\n },\n __self: this\n }, \"If the experiment is running, press \", React.createElement(\"span\", {\n className: \"badge badge-dark\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 35\n },\n __self: this\n }, \"Start Job Monitor\"), \" to start a live tracker of the changes on the experiment's jobs. This process will automatically update the graph's nodes colors and show a log of the detected changes.\"));\n }\n\n var nodes_array = [];\n var edges_array = [];\n\n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: {\n background: node.status_color,\n border: \"black\"\n } //level: node.priority,\n\n }));\n this.props.data.edges.map(edge => edges_array.push({\n from: edge.from,\n to: edge.to\n }));\n }\n\n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n const options = {\n edges: {\n arrows: {\n to: {\n enabled: true\n }\n }\n },\n layout: {\n improvedLayout: true,\n hierarchical: {\n nodeSpacing: 250,\n edgeMinimization: false,\n blockShifting: false,\n parentCentralization: false,\n direction: 'UD',\n sortMethod: 'directed'\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true\n },\n physics: {\n enabled: false\n },\n nodes: {\n shape: 'dot'\n }\n };\n const graph = {\n nodes: nodes,\n edges: edges\n };\n\n class VisNetwork extends Component {\n // shouldComponentUpdate(nextProps, nextState){ \n // if (nextProps.loadingGraph !== this.props.loadingGraph){\n // return true; \n // }else{\n // return false;\n // }\n // }\n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", params => {\n console.log(params);\n\n if (params.nodes) {\n console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n });\n }\n\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n render() {\n return React.createElement(\"div\", {\n className: \"card-body p-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 128\n },\n __self: this\n }, React.createElement(\"div\", {\n ref: \"myRef\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 129\n },\n __self: this\n }));\n }\n\n }\n\n return React.createElement(VisNetwork, {\n graph: graph,\n options: options,\n updateSelection: this.props.updateSelection,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 135\n },\n __self: this\n });\n }\n\n}\n\nconst experimentStyle = {\n height: 600\n};\nexport default GraphNativeRep;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js"],"names":["React","Component","Spinner","vis","GraphNativeRep","shouldComponentUpdate","nextProps","nextState","props","shouldUpdateGraph","data","pkl_timestamp","console","log","loadingGraph","componentWillUnmount","cleanGraphData","render","nodes_array","edges_array","nodes","edges","map","node","push","id","label","color","background","status_color","border","edge","from","to","DataSet","options","arrows","enabled","layout","improvedLayout","hierarchical","nodeSpacing","edgeMinimization","blockShifting","parentCentralization","direction","sortMethod","interaction","dragNodes","hoverConnectedEdges","navigationButtons","physics","shape","graph","VisNetwork","componentDidMount","network","Network","refs","myRef","on","params","updateSelection","experimentStyle","height"],"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AKZ,KAAL,CAAWsD,eAAX,CAA2BD,MAAM,CAACzC,KAAlC;AACH;AAEJ,SAPD;AAQH;;AAEDL,MAAAA,oBAAoB,GAAG;AACnBH,QAAAA,OAAO,CAACC,GAAR,CAAY,YAAZ;AACA,aAAKL,KAAL,CAAWQ,cAAX;AACH;;AAEDC,MAAAA,MAAM,GAAG;AACL,eACI;AAAK,UAAA,SAAS,EAAC,eAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,WACI;AAAK,UAAA,GAAG,EAAC,OAAT;AAAiB,UAAA,KAAK,EAAE8C,eAAxB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,UADJ,CADJ;AAKH;;AAjC8B;;AAoCnC,WAAO,oBAAC,UAAD;AAAY,MAAA,KAAK,EAAEV,KAAnB;AAA0B,MAAA,OAAO,EAAElB,OAAnC;AAA4C,MAAA,eAAe,EAAE,KAAK3B,KAAL,CAAWsD,eAAxE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAAP;AAEH;;AAlIkC;;AAgJvC,MAAMC,eAAe,GAAG;AACpBC,EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,eAAe5D,cAAf","sourcesContent":["import React, { Component } from \"react\";\n// import vis from \"vis-network\";\nimport Spinner from \"../layout/Spinner\";\n// import ExperimentContext from '../context/experiment/experimentContext';\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n\n shouldComponentUpdate(nextProps, nextState){ \n \n if (this.props.shouldUpdateGraph === true){\n return true\n }else if (nextProps.data && this.props.data && (nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp)){\n console.log(\"Rerendering\")\n return true;\n }else if (nextProps.loadingGraph !== this.props.loadingGraph){\n return true; \n }else{\n return false;\n }\n }\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n\n\n render() {\n if (this.props.loadingGraph) return ;\n if (this.props.data == null){\n return (\n
\n

Press Show Graph to see the graph representation of the experiment.

\n

If the experiment is running, press Start Job Monitor to start a live tracker of the changes on the experiment's jobs.\n This process will automatically update the graph's nodes colors and show a log of the detected changes.\n

\n
\n );\n }\n\n var nodes_array = [];\n var edges_array = [];\n \n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: { background: node.status_color, border: \"black\" },\n //level: node.priority,\n })\n );\n \n this.props.data.edges.map(edge => \n edges_array.push({ from: edge.from, to: edge.to })\n );\n }\n \n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n\n const options = {\n edges: {\n arrows: {\n to: { enabled: true }\n }\n },\n layout: {\n improvedLayout: true,\n hierarchical: {\n \n nodeSpacing: 250,\n edgeMinimization: false,\n blockShifting: false,\n parentCentralization: false,\n direction: 'UD',\n sortMethod: 'directed',\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true,\n },\n physics: {\n enabled: false,\n },\n nodes: {\n shape: 'dot',\n }\n };\n \n const graph = {\n nodes : nodes,\n edges : edges,\n };\n\n class VisNetwork extends Component {\n \n // shouldComponentUpdate(nextProps, nextState){ \n // if (nextProps.loadingGraph !== this.props.loadingGraph){\n // return true; \n // }else{\n // return false;\n // }\n // }\n \n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", (params) => {\n console.log(params);\n if (params.nodes){\n console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n \n });\n }\n \n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n \n render() { \n return (\n
\n
\n
\n );\n }\n }\n \n return ;\n\n }\n\n\n \n\n \n\n \n \n\n \n\n}\n\nconst experimentStyle = {\n height: 600\n };\n\nexport default GraphNativeRep;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/aa77d492f3aec02294e7825bc3de57bb.json b/node_modules/.cache/babel-loader/aa77d492f3aec02294e7825bc3de57bb.json new file mode 100644 index 0000000000000000000000000000000000000000..74d99f7c3b7165542bf9780b2deb487d4d068fdf --- /dev/null +++ b/node_modules/.cache/babel-loader/aa77d492f3aec02294e7825bc3de57bb.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js\";\nimport React, { useContext, Component } from \"react\"; // import vis from \"vis-network\";\n\nimport Spinner from \"../layout/Spinner\";\nimport ExperimentContext from '../context/experiment/experimentContext';\nimport vis from \"vis\";\n\nconst GraphNativeRep = () => {\n const experimentContext = useContext(ExperimentContext);\n const data = experimentContext.data,\n loadingGraph = experimentContext.loadingGraph,\n cleanGraphData = experimentContext.cleanGraphData;\n if (loadingGraph) return React.createElement(Spinner, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 11\n },\n __self: this\n });\n\n if (data === null) {\n return React.createElement(\"div\", {\n className: \"card-body text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 14\n },\n __self: this\n }, React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 15\n },\n __self: this\n }, \"Press \", React.createElement(\"span\", {\n className: \"badge badge-info\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 15\n },\n __self: this\n }, \"Show Graph\"), \" to see the graph representation of the experiment.\"), React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 16\n },\n __self: this\n }, \"If the experiment is running, press \", React.createElement(\"span\", {\n className: \"badge badge-dark\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 16\n },\n __self: this\n }, \"Start Job Monitor\"), \" to start a live tracker of the changes on the experiment's jobs. This process will automatically update the graph's nodes colors and show a log of the detected changes.\"));\n }\n\n var nodes_array = [];\n var edges_array = [];\n\n if (data.nodes !== null || data.edges !== null) {\n data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: {\n background: node.status_color,\n border: \"black\"\n } //level: node.priority,\n\n }));\n data.edges.map(edge => edges_array.push({\n from: edge.from,\n to: edge.to\n }));\n }\n\n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n const options = {\n edges: {\n arrows: {\n to: {\n enabled: true\n }\n }\n },\n layout: {\n improvedLayout: true,\n hierarchical: {\n nodeSpacing: 250,\n edgeMinimization: false,\n blockShifting: false,\n parentCentralization: false,\n direction: 'UD',\n sortMethod: 'directed'\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true\n },\n physics: {\n enabled: false\n },\n nodes: {\n shape: 'dot'\n }\n };\n const graph = {\n nodes: nodes,\n edges: edges\n };\n\n class VisNetwork extends Component {\n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, graph, options);\n }\n\n componentWillUnmount() {\n cleanGraphData();\n }\n\n render() {\n return React.createElement(\"div\", {\n className: \"card-body p-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 93\n },\n __self: this\n }, React.createElement(\"div\", {\n ref: \"myRef\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 94\n },\n __self: this\n }));\n }\n\n }\n\n return React.createElement(VisNetwork, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 100\n },\n __self: this\n });\n};\n\nconst experimentStyle = {\n height: 600\n};\nexport default GraphNativeRep;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js"],"names":["React","useContext","Component","Spinner","ExperimentContext","vis","GraphNativeRep","experimentContext","data","loadingGraph","cleanGraphData","nodes_array","edges_array","nodes","edges","map","node","push","id","label","color","background","status_color","border","edge","from","to","DataSet","options","arrows","enabled","layout","improvedLayout","hierarchical","nodeSpacing","edgeMinimization","blockShifting","parentCentralization","direction","sortMethod","interaction","dragNodes","hoverConnectedEdges","navigationButtons","physics","shape","graph","VisNetwork","componentDidMount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ACPd,MAAAA,OAAO,EAAE;AADF,KAxBG;AA2BZjB,IAAAA,KAAK,EAAE;AACLgC,MAAAA,KAAK,EAAE;AADF;AA3BK,GAAhB;AAgCA,QAAMC,KAAK,GAAG;AACVjC,IAAAA,KAAK,EAAGA,KADE;AAEVC,IAAAA,KAAK,EAAGA;AAFE,GAAd;;AAMA,QAAMiC,UAAN,SAAyB7C,SAAzB,CAAmC;AAE/B8C,IAAAA,iBAAiB,GAAG;AAChB,UAAIC,OAAO,GAAG,IAAI5C,GAAG,CAAC6C,OAAR,CAAgB,KAAKC,IAAL,CAAUC,KAA1B,EAAiCN,KAAjC,EAAwClB,OAAxC,CAAd;AACH;;AAEDyB,IAAAA,oBAAoB,GAAG;AACnB3C,MAAAA,cAAc;AACjB;;AAED4C,IAAAA,MAAM,GAAG;AACL,aACI;AAAK,QAAA,SAAS,EAAC,eAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,SACI;AAAK,QAAA,GAAG,EAAC,OAAT;AAAiB,QAAA,KAAK,EAAEC,eAAxB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,QADJ,CADJ;AAKH;;AAhB8B;;AAmBnC,SAAO,oBAAC,UAAD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAAP;AAEH,CA/FD;;AAiGA,MAAMA,eAAe,GAAG;AACpBC,EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,eAAelD,cAAf","sourcesContent":["import React, { useContext, Component } from \"react\";\n// import vis from \"vis-network\";\nimport Spinner from \"../layout/Spinner\";\nimport ExperimentContext from '../context/experiment/experimentContext';\nimport vis from \"vis\";\n\nconst GraphNativeRep = () => {\n\n const experimentContext = useContext(ExperimentContext); \n const { data, loadingGraph, cleanGraphData } = experimentContext;\n if (loadingGraph) return \n if (data === null) {\n return (\n
\n

Press Show Graph to see the graph representation of the experiment.

\n

If the experiment is running, press Start Job Monitor to start a live tracker of the changes on the experiment's jobs.\n This process will automatically update the graph's nodes colors and show a log of the detected changes.\n

\n
\n );\n }\n\n var nodes_array = [];\n var edges_array = [];\n\n if (data.nodes !== null || data.edges !== null) {\n data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: { background: node.status_color, border: \"black\" },\n //level: node.priority,\n })\n );\n \n data.edges.map(edge => \n edges_array.push({ from: edge.from, to: edge.to })\n );\n }\n\n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n\n const options = {\n edges: {\n arrows: {\n to: { enabled: true }\n }\n },\n layout: {\n improvedLayout: true,\n hierarchical: {\n \n nodeSpacing: 250,\n edgeMinimization: false,\n blockShifting: false,\n parentCentralization: false,\n direction: 'UD',\n sortMethod: 'directed',\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true,\n },\n physics: {\n enabled: false,\n },\n nodes: {\n shape: 'dot',\n }\n };\n\n const graph = {\n nodes : nodes,\n edges : edges,\n };\n \n\n class VisNetwork extends Component {\n \n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, graph, options);\n }\n\n componentWillUnmount() {\n cleanGraphData();\n }\n\n render() { \n return (\n
\n
\n
\n );\n }\n }\n\n return ;\n\n}\n\nconst experimentStyle = {\n height: 600\n };\n\nexport default GraphNativeRep;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/ab461ab1333e7d9680a9ce992d0e5d32.json b/node_modules/.cache/babel-loader/ab461ab1333e7d9680a9ce992d0e5d32.json new file mode 100644 index 0000000000000000000000000000000000000000..a6418d1cff93733ca41b013ec8ffa79da1fa9a21 --- /dev/null +++ b/node_modules/.cache/babel-loader/ab461ab1333e7d9680a9ce992d0e5d32.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js\";\nimport React, { useContext, Component } from \"react\"; // import vis from \"vis-network\";\n\nimport Spinner from \"../layout/Spinner\";\nimport ExperimentContext from '../context/experiment/experimentContext';\nimport vis from \"vis\";\n\nconst GraphNativeRep = () => {\n const experimentContext = useContext(ExperimentContext);\n const data = experimentContext.data,\n loadingGraph = experimentContext.loadingGraph,\n cleanGraphData = experimentContext.cleanGraphData,\n updateSelection = experimentContext.updateSelection;\n if (loadingGraph) return React.createElement(Spinner, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 11\n },\n __self: this\n });\n\n if (data === null) {\n return React.createElement(\"div\", {\n className: \"card-body text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 14\n },\n __self: this\n }, React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 15\n },\n __self: this\n }, \"Press \", React.createElement(\"span\", {\n className: \"badge badge-info\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 15\n },\n __self: this\n }, \"Show Graph\"), \" to see the graph representation of the experiment.\"), React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 16\n },\n __self: this\n }, \"If the experiment is running, press \", React.createElement(\"span\", {\n className: \"badge badge-dark\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 16\n },\n __self: this\n }, \"Start Job Monitor\"), \" to start a live tracker of the changes on the experiment's jobs. This process will automatically update the graph's nodes colors and show a log of the detected changes.\"));\n }\n\n var nodes_array = [];\n var edges_array = [];\n\n if (data.nodes !== null || data.edges !== null) {\n data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: {\n background: node.status_color,\n border: \"black\"\n } //level: node.priority,\n\n }));\n data.edges.map(edge => edges_array.push({\n from: edge.from,\n to: edge.to\n }));\n }\n\n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n const options = {\n edges: {\n arrows: {\n to: {\n enabled: true\n }\n }\n },\n layout: {\n improvedLayout: true,\n hierarchical: {\n nodeSpacing: 250,\n edgeMinimization: false,\n blockShifting: false,\n parentCentralization: false,\n direction: 'UD',\n sortMethod: 'directed'\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true\n },\n physics: {\n enabled: false\n },\n nodes: {\n shape: 'dot'\n }\n };\n const graph = {\n nodes: nodes,\n edges: edges\n };\n\n class VisNetwork extends Component {\n // shouldComponentUpdate(nextProps, nextState){ \n // if (nextProps.loadingGraph !== this.props.loadingGraph){\n // return true; \n // }else{\n // return false;\n // }\n // }\n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, graph, options);\n network.on(\"click\", function (params) {\n console.log(params);\n\n if (params.nodes) {\n console.log(params.nodes);\n updateSelection(params.nodes);\n }\n });\n }\n\n componentWillUnmount() {\n console.log(\"Unmounting\");\n cleanGraphData();\n }\n\n render() {\n return React.createElement(\"div\", {\n className: \"card-body p-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 110\n },\n __self: this\n }, React.createElement(\"div\", {\n ref: \"myRef\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 111\n },\n __self: this\n }));\n }\n\n }\n\n return React.createElement(VisNetwork, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 117\n },\n __self: this\n });\n};\n\nconst experimentStyle = {\n height: 600\n};\nexport default GraphNativeRep;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js"],"names":["React","useContext","Component","Spinner","ExperimentContext","vis","GraphNativeRep","experimentContext","data","loadingGraph","cleanGraphData","updateSelection","nodes_array","edges_array","nodes","edges","map","node","push","id","label","color","background","status_color","border","edge","from","to","DataSet","options","arrows","enabled","layout","improvedLayout","hierarchical","nodeSpacing","edgeMinimization","blockShifting","parentCentralization","direction","sortMethod","interaction","dragNodes","hoverConnectedEdges","navigationButtons","physics","shape","graph","VisNetwork","componentDidMount","network","Network","refs","myRef","on","params","console","log","componentWillUnmount","render","experimentStyle","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,UAAhB,E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import React, { useContext, Component } from \"react\";\n// import vis from \"vis-network\";\nimport Spinner from \"../layout/Spinner\";\nimport ExperimentContext from '../context/experiment/experimentContext';\nimport vis from \"vis\";\n\nconst GraphNativeRep = () => {\n\n const experimentContext = useContext(ExperimentContext); \n const { data, loadingGraph, cleanGraphData, updateSelection } = experimentContext;\n if (loadingGraph) return \n if (data === null) {\n return (\n
\n

Press Show Graph to see the graph representation of the experiment.

\n

If the experiment is running, press Start Job Monitor to start a live tracker of the changes on the experiment's jobs.\n This process will automatically update the graph's nodes colors and show a log of the detected changes.\n

\n
\n );\n }\n\n var nodes_array = [];\n var edges_array = [];\n\n if (data.nodes !== null || data.edges !== null) {\n data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: { background: node.status_color, border: \"black\" },\n //level: node.priority,\n })\n );\n \n data.edges.map(edge => \n edges_array.push({ from: edge.from, to: edge.to })\n );\n }\n\n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n\n const options = {\n edges: {\n arrows: {\n to: { enabled: true }\n }\n },\n layout: {\n improvedLayout: true,\n hierarchical: {\n \n nodeSpacing: 250,\n edgeMinimization: false,\n blockShifting: false,\n parentCentralization: false,\n direction: 'UD',\n sortMethod: 'directed',\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true,\n },\n physics: {\n enabled: false,\n },\n nodes: {\n shape: 'dot',\n }\n };\n\n const graph = {\n nodes : nodes,\n edges : edges,\n };\n \n\n class VisNetwork extends Component {\n \n // shouldComponentUpdate(nextProps, nextState){ \n // if (nextProps.loadingGraph !== this.props.loadingGraph){\n // return true; \n // }else{\n // return false;\n // }\n // }\n\n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, graph, options);\n network.on(\"click\", function(params) {\n console.log(params);\n if (params.nodes){\n console.log(params.nodes);\n updateSelection(params.nodes);\n }\n \n });\n }\n\n componentWillUnmount() {\n console.log(\"Unmounting\");\n cleanGraphData();\n }\n\n render() { \n return (\n
\n
\n
\n );\n }\n }\n\n return ;\n\n}\n\nconst experimentStyle = {\n height: 600\n };\n\nexport default GraphNativeRep;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/ac750d6c7c4c3845222743c366f50ee3.json b/node_modules/.cache/babel-loader/ac750d6c7c4c3845222743c366f50ee3.json new file mode 100644 index 0000000000000000000000000000000000000000..e88bdb8f168aa0bcba22cbf41da824650c92d2b3 --- /dev/null +++ b/node_modules/.cache/babel-loader/ac750d6c7c4c3845222743c366f50ee3.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/Selection.js\";\nimport React, { useContext, Fragment } from 'react';\nimport ExperimentContext from '../context/experiment/experimentContext';\n\nconst Selection = () => {\n const experimentContext = useContext(ExperimentContext);\n const selection = experimentContext.selection,\n data = experimentContext.data,\n experiment = experimentContext.experiment; // const { model, branch, hpc } = experiment;\n //var currentSelection = \"Node: \"\n\n var currentNode = \"\";\n var selectedNode = null;\n\n if (selection) {\n //console.log(\"Current selection \" + selection)\n selection.map(node => // currentSelection += node + \", \"\n currentNode = node); //console.log(\"Current node \" + currentNode)\n\n selectedNode = data.nodes.find(node => node.id === currentNode); //console.log(\"Selected node\")\n //console.log(\"Data: \" + selectedNode.id + \" \" + selectedNode.platform_name)\n }\n\n return React.createElement(Fragment, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 23\n },\n __self: this\n }, selectedNode && React.createElement(Fragment, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 25\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 26\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-12\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 27\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"card text-white bg-info\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 28\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"card-header text-center py-0\",\n style: headerCard,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 29\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"mh-100\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 30\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 31\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 31\n },\n __self: this\n }, selectedNode.id)))), React.createElement(\"div\", {\n className: \"card-body py-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 34\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 35\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Date:\"), \" \", selectedNode.date)), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 38\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 39\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-12\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 40\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 41\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 41\n },\n __self: this\n }, \"Section:\"), \" \", selectedNode.section)))), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 45\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 46\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-8\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 47\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 48\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 48\n },\n __self: this\n }, \"Platform:\"), \" \", selectedNode.platform_name && selectedNode.platform_name, \" \", !selectedNode.platform_name && experiment.hpc)), React.createElement(\"div\", {\n className: \"col-4 text-right\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 50\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 51\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 51\n },\n __self: this\n }, \"c:\", data.max_children, \"/p:\", data.max_parents))))), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 58\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 59\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-6\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 60\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 61\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 61\n },\n __self: this\n }, \"Processors:\"), \" \", selectedNode.processors)), React.createElement(\"div\", {\n className: \"col-6\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 63\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 64\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 64\n },\n __self: this\n }, \"Wallclock:\"), \" \", selectedNode.wallclock)))), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 68\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 69\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-6\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 70\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 71\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 71\n },\n __self: this\n }, \"Level:\"), \" \", selectedNode.level)), React.createElement(\"div\", {\n className: \"col-6\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 73\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 74\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 74\n },\n __self: this\n }, \"Out:\"), \" \", selectedNode.children, \" \", React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 74\n },\n __self: this\n }, \"In:\"), \" \", selectedNode.parents, \" \")))), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 79\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 80\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 80\n },\n __self: this\n }, \"Status:\")), \" \", selectedNode.status)))))), !selectedNode && data && React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 89\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-12\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 90\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"card text-white bg-info\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 91\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"card-header text-center py-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 92\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 93\n },\n __self: this\n }, \"Here goes the Job Id\")), React.createElement(\"div\", {\n className: \"card-body\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 95\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"text-center\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 96\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 97\n },\n __self: this\n }, \"Select a Node to see more information.\")))))));\n};\n\nconst experimentStyle = {\n height: 200\n};\nconst headerCard = {\n height: 30\n};\nexport default Selection;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/Selection.js"],"names":["React","useContext","Fragment","ExperimentContext","Selection","experimentContext","selection","data","experiment","currentNode","selectedNode","map","node","nodes","find","id","experimentStyle","headerCard","date","section","platform_name","hpc","max_children","max_parents","processors","wallclock","level","children","parents","status","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,UAAhB,EAA4BC,QAA5B,QAA4C,OAA5C;AACA,OAAOC,iBAAP,MAA8B,yCAA9B;;AAEA,MAAMC,SAAS,GAAG,MAAM;AACpB,QAAMC,iBAAiB,GAAGJ,UAAU,CAACE,iBAAD,CAApC;AADoB,QAEZG,SAFY,GAEoBD,iBAFpB,CAEZC,SAFY;AAAA,QAEDC,IAFC,GAEoBF,iBAFpB,CAEDE,IAFC;AAAA,QAEKC,UAFL,GAEoBH,iBAFpB,CAEKG,UAFL,EAGpB;AACA;;AACA,MAAIC,WAAW,GAAG,EAAlB;AACA,MAAIC,YAAY,GAAG,IAAnB;;AACA,MAAIJ,SAAJ,EAAe;AACX;AACAA,IAAAA,SAAS,CAACK,GAAV,CAAcC,IAAI,IACd;AACAH,IAAAA,WAAW,GAAGG,IAFlB,EAFW,CAMX;;AACAF,IAAAA,YAAY,GAAGH,IAAI,CAACM,KAAL,CAAWC,IAAX,CAAgBF,IAAI,IAAIA,IAAI,C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;AAAA;AAAA;AAAA;AAAA,4BADJ,CADJ,EAII;AAAK,IAAA,SAAS,EAAC,WAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACI;AAAK,IAAA,SAAS,EAAC,aAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,8CADA,CADJ,CAJJ,CADJ,CADJ,CAlEZ,CADJ;AAuFH,CAzGD;;AA2GA,MAAMA,eAAe,GAAG;AACpBc,EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,MAAMb,UAAU,GAAG;AACfa,EAAAA,MAAM,EAAE;AADO,CAAnB;AAIA,eAAe1B,SAAf","sourcesContent":["import React, { useContext, Fragment } from 'react'\nimport ExperimentContext from '../context/experiment/experimentContext';\n\nconst Selection = () => {\n const experimentContext = useContext(ExperimentContext);\n const { selection, data, experiment } = experimentContext;\n // const { model, branch, hpc } = experiment;\n //var currentSelection = \"Node: \"\n var currentNode = \"\"\n var selectedNode = null\n if (selection) {\n //console.log(\"Current selection \" + selection)\n selection.map(node => (\n // currentSelection += node + \", \"\n currentNode = node\n ));\n //console.log(\"Current node \" + currentNode)\n selectedNode = data.nodes.find(node => node.id === currentNode) \n //console.log(\"Selected node\")\n //console.log(\"Data: \" + selectedNode.id + \" \" + selectedNode.platform_name)\n } \n return (\n \n {selectedNode &&\n \n
\n
\n
\n
\n
\n {selectedNode.id}\n
\n
\n
\n
\n Date: {selectedNode.date}\n
\n
\n
\n
\n Section: {selectedNode.section}\n
\n
\n
\n
\n
\n
\n Platform: {selectedNode.platform_name && selectedNode.platform_name} {!selectedNode.platform_name && experiment.hpc}\n
\n
\n c:{data.max_children}/p:{data.max_parents}\n
\n
\n
\n {/*
\n Priority: {selectedNode.priority}\n
*/}\n
\n
\n
\n Processors: {selectedNode.processors}\n
\n
\n Wallclock: {selectedNode.wallclock}\n
\n
\n
\n
\n
\n
\n Level: {selectedNode.level}\n
\n
\n Out: {selectedNode.children} In: {selectedNode.parents} \n
\n \n
\n
\n
\n Status: {selectedNode.status}\n
\n
\n
\n
\n
\n
\n } \n {!selectedNode && data &&\n
\n
\n
\n
\n Here goes the Job Id\n
\n
\n
\n Select a Node to see more information. \n
\n
\n
\n
\n
\n } \n
\n \n \n\n )\n}\n\nconst experimentStyle = {\n height: 200\n };\n\nconst headerCard = {\n height: 30\n}\n\nexport default Selection;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/ace48fcf00070cd1282a22c15aa75b26.json b/node_modules/.cache/babel-loader/ace48fcf00070cd1282a22c15aa75b26.json new file mode 100644 index 0000000000000000000000000000000000000000..c43578cc4a1fbb3522077df29eecfb15a4699a07 --- /dev/null +++ b/node_modules/.cache/babel-loader/ace48fcf00070cd1282a22c15aa75b26.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js\";\nimport React, { Component } from \"react\"; // import vis from \"vis-network\";\n\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n constructor(...args) {\n super(...args);\n\n this.updateVisNodes = nodes => {\n this.props.setVisData(nodes);\n };\n }\n\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else if (nextProps.data && this.props.data && nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp) {\n console.log(\"Rerendering\");\n return true;\n } else if (nextProps.loadingGraph !== this.props.loadingGraph) {\n return true;\n } else {\n return false;\n }\n }\n\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n render() {\n if (this.props.loadingGraph) return React.createElement(Spinner, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 32\n },\n __self: this\n });\n\n if (this.props.data == null) {\n return React.createElement(\"div\", {\n className: \"card-body text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 35\n },\n __self: this\n }, React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Press \", React.createElement(\"span\", {\n className: \"badge badge-info\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Show Graph\"), \" to see the graph representation of the experiment.\"), React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"If the experiment is running, press \", React.createElement(\"span\", {\n className: \"badge badge-dark\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"Start Job Monitor\"), \" to start a live tracker of the changes on the experiment's jobs. This process will automatically update the graph's nodes colors and show a log of the detected changes.\"));\n }\n\n var nodes_array = [];\n var edges_array = [];\n\n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: {\n background: node.status_color,\n border: \"black\"\n },\n level: node.level\n }));\n this.props.data.edges.map(edge => edges_array.push({\n from: edge.from,\n to: edge.to\n }));\n }\n\n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n const options = {\n edges: {\n arrows: {\n to: {\n enabled: true\n }\n }\n },\n layout: {\n //improvedLayout: true,\n hierarchical: {\n // enabled: true,\n nodeSpacing: 250,\n treeSpacing: 200,\n blockShifting: true,\n edgeMinimization: true,\n parentCentralization: true,\n direction: 'UD',\n sortMethod: 'hubsize'\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true\n },\n physics: {\n enabled: false\n },\n nodes: {\n shape: 'dot'\n }\n };\n const graph = {\n nodes: nodes,\n edges: edges\n };\n\n class VisNetwork extends Component {\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else {\n return false;\n }\n }\n\n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", params => {\n //console.log(params);\n if (params.nodes) {\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n });\n } // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n\n\n render() {\n return React.createElement(\"div\", {\n className: \"card-body p-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 132\n },\n __self: this\n }, React.createElement(\"div\", {\n ref: \"myRef\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 133\n },\n __self: this\n }));\n }\n\n }\n\n this.updateVisNodes(nodes);\n return React.createElement(VisNetwork, {\n graph: graph,\n options: options,\n updateSelection: this.props.updateSelection,\n shouldUpdateGraph: this.props.shouldUpdateGraph,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 141\n },\n __self: this\n });\n }\n\n}\n\nconst experimentStyle = {\n height: 600\n};\nexport default GraphNativeRep;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js"],"names":["React","Component","Spinner","vis","GraphNativeRep","updateVisNodes","nodes","props","setVisData","shouldComponentUpdate","nextProps","nextState","shouldUpdateGraph","data","pkl_timestamp","console","log","loadingGraph","componentWillUnmount","cleanGraphData","render","nodes_array","edges_array","edges","map","node","push","id","label","color","background","status_color","border","level","edge","from","to","DataSet","options","arrows","enabled","layout","hierarchical","nodeSpacing","treeSpacing","blockShifting","edgeMinimization","parentCentralization","direction","sortMethod","interaction","dragNodes","hoverConnectedEdges","navigationButtons","physics","shape","graph","VisNetwork","componentDidMount","network","Network","refs","myRef","on","params","updateSelection","experimentStyle","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,SAAhB,QAAiC,OAAjC,C,CACA;;AACA,OAAOC,OAAP,MAAoB,mBAApB;AACA,OAAOC,GAAP,MAAgB,KAAhB;;AAEA,MAAMC,cAAN,SAA6BH,SAA7B,CAAuC;AAAA;AAAA;;AAAA,SAmBnC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AACA,iBAAKC,KAAL,CAAW0D,eAAX,CAA2BD,MAAM,CAAC1D,KAAlC;AACH;AAEJ,SAPD;AAQH,OApB8B,CAsB/B;AACA;AACA;AACA;;;AAEAc,MAAAA,MAAM,GAAG;AACL,eACI;AAAK,UAAA,SAAS,EAAC,eAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,WACI;AAAK,UAAA,GAAG,EAAC,OAAT;AAAiB,UAAA,KAAK,EAAE8C,eAAxB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,UADJ,CADJ;AAKH;;AAjC8B;;AAoCnC,SAAK7D,cAAL,CAAoBC,KAApB;AAEA,WAAO,oBAAC,UAAD;AACH,MAAA,KAAK,EAAEkD,KADJ;AAEH,MAAA,OAAO,EAAElB,OAFN;AAGH,MAAA,eAAe,EAAE,KAAK/B,KAAL,CAAW0D,eAHzB;AAIH,MAAA,iBAAiB,EAAE,KAAK1D,KAAL,CAAWK,iBAJ3B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAAP;AAOH;;AA9IkC;;AA4JvC,MAAMsD,eAAe,GAAG;AACpBC,EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,eAAe/D,cAAf","sourcesContent":["import React, { Component } from \"react\";\n// import vis from \"vis-network\";\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n\n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true\n }else if (nextProps.data && this.props.data && (nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp)){\n console.log(\"Rerendering\")\n return true;\n }else if (nextProps.loadingGraph !== this.props.loadingGraph){\n return true; \n }else{\n return false;\n }\n }\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n updateVisNodes = (nodes) => {\n this.props.setVisData(nodes);\n }\n\n\n\n render () {\n if (this.props.loadingGraph) return ;\n if (this.props.data == null){\n return (\n
\n

Press Show Graph to see the graph representation of the experiment.

\n

If the experiment is running, press Start Job Monitor to start a live tracker of the changes on the experiment's jobs.\n This process will automatically update the graph's nodes colors and show a log of the detected changes.\n

\n
\n );\n }\n\n var nodes_array = [];\n var edges_array = [];\n \n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: { background: node.status_color, border: \"black\" },\n level: node.level,\n })\n );\n \n this.props.data.edges.map(edge => \n edges_array.push({ from: edge.from, to: edge.to })\n );\n }\n \n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n\n\n const options = {\n edges: {\n arrows: {\n to: { enabled: true }\n }\n },\n layout: {\n //improvedLayout: true,\n hierarchical: {\n // enabled: true,\n nodeSpacing: 250,\n treeSpacing: 200,\n blockShifting: true,\n edgeMinimization: true,\n parentCentralization: true,\n direction: 'UD',\n sortMethod: 'hubsize',\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true,\n },\n physics: {\n enabled: false,\n },\n nodes: {\n shape: 'dot',\n }\n };\n \n const graph = {\n nodes : nodes,\n edges : edges,\n };\n\n class VisNetwork extends Component {\n \n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true;\n } else {\n return false;\n }\n }\n \n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", (params) => {\n //console.log(params);\n if (params.nodes){\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n \n });\n }\n \n // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n \n render() { \n return (\n
\n
\n
\n );\n }\n }\n\n this.updateVisNodes(nodes);\n \n return ;\n\n }\n\n\n \n\n \n\n \n \n\n \n\n}\n\nconst experimentStyle = {\n height: 600\n };\n\nexport default GraphNativeRep;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/ad10c815eff5995260c033f25ca6b367.json b/node_modules/.cache/babel-loader/ad10c815eff5995260c033f25ca6b367.json new file mode 100644 index 0000000000000000000000000000000000000000..699976b760d3c47e3246a9998cee795351473961 --- /dev/null +++ b/node_modules/.cache/babel-loader/ad10c815eff5995260c033f25ca6b367.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/Selection.js\";\nimport React, { useContext, Fragment } from 'react';\nimport ExperimentContext from '../context/experiment/experimentContext';\n\nconst Selection = () => {\n const experimentContext = useContext(ExperimentContext);\n const selection = experimentContext.selection,\n data = experimentContext.data; // const { model, branch, hpc } = experiment;\n //var currentSelection = \"Node: \"\n\n var currentNode = \"\";\n var selectedNode = null;\n\n if (selection) {\n //console.log(\"Current selection \" + selection)\n selection.map(node => // currentSelection += node + \", \"\n currentNode = node);\n console.log(\"Current node \" + currentNode);\n selectedNode = data.nodes.find(node => node.id === currentNode);\n console.log(\"Selected node\"); //console.log(\"Data: \" + selectedNode.id + \" \" + selectedNode.platform_name)\n }\n\n return React.createElement(Fragment, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 23\n },\n __self: this\n }, selectedNode && React.createElement(Fragment, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 25\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 26\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-12\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 27\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"card text-white bg-info\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 28\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"card-header text-center py-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 29\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 30\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 30\n },\n __self: this\n }, selectedNode.id))), React.createElement(\"div\", {\n className: \"card-body py-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 32\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 33\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 34\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 34\n },\n __self: this\n }, \"Date:\"), \" \", selectedNode.date)), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"Section:\"), \" \", selectedNode.section)), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 39\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 40\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 40\n },\n __self: this\n }, \"Platform:\"), \" \", selectedNode.platform_name)), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 42\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 43\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 43\n },\n __self: this\n }, \"Priority:\"), \" \", selectedNode.priority)), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 45\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 46\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 46\n },\n __self: this\n }, \"Processors:\"), \" \", selectedNode.processors)), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 48\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 49\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 49\n },\n __self: this\n }, \"Status:\")), \" \", selectedNode.status)))))), !selectedNode && data && React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 59\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-12\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 60\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"card text-white bg-info\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 61\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"card-header text-center py-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 62\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 63\n },\n __self: this\n }, \"Here goes the Job Id\")), React.createElement(\"div\", {\n className: \"card-body\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 65\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"text-center\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 66\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 67\n },\n __self: this\n }, \"Select a Node to see more information.\")))))));\n};\n\nconst experimentStyle = {\n height: 200\n};\nexport default Selection;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/Selection.js"],"names":["React","useContext","Fragment","ExperimentContext","Selection","experimentContext","selection","data","currentNode","selectedNode","map","node","console","log","nodes","find","id","experimentStyle","date","section","platform_name","priority","processors","status","height"],"mappings":";AA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IAAiBF,IAAjB,IACG;AAAK,IAAA,SAAS,EAAC,KAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACI;AAAK,IAAA,SAAS,EAAC,QAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACI;AAAK,IAAA,SAAS,EAAC,yBAAf;AAAyC,IAAA,KAAK,EAAEU,eAAhD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACI;AAAK,IAAA,SAAS,EAAC,8BAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACI;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,4BADJ,CADJ,EAII;AAAK,IAAA,SAAS,EAAC,WAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACI;AAAK,IAAA,SAAS,EAAC,aAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,8CADA,CADJ,CAJJ,CADJ,CADJ,CApCZ,CADJ;AAyDH,CA3ED;;AA6EA,MAAMA,eAAe,GAAG;AACpBO,EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,eAAepB,SAAf","sourcesContent":["import React, { useContext, Fragment } from 'react'\nimport ExperimentContext from '../context/experiment/experimentContext';\n\nconst Selection = () => {\n const experimentContext = useContext(ExperimentContext);\n const { selection, data } = experimentContext;\n // const { model, branch, hpc } = experiment;\n //var currentSelection = \"Node: \"\n var currentNode = \"\"\n var selectedNode = null\n if (selection) {\n //console.log(\"Current selection \" + selection)\n selection.map(node => (\n // currentSelection += node + \", \"\n currentNode = node\n ));\n console.log(\"Current node \" + currentNode)\n selectedNode = data.nodes.find(node => node.id === currentNode) \n console.log(\"Selected node\")\n //console.log(\"Data: \" + selectedNode.id + \" \" + selectedNode.platform_name)\n } \n return (\n \n {selectedNode &&\n \n
\n
\n
\n
\n {selectedNode.id}\n
\n
\n
\n Date: {selectedNode.date}\n
\n
\n Section: {selectedNode.section}\n
\n
\n Platform: {selectedNode.platform_name}\n
\n
\n Priority: {selectedNode.priority}\n
\n
\n Processors: {selectedNode.processors}\n
\n
\n Status: {selectedNode.status}\n
\n \n
\n
\n
\n
\n
\n } \n {!selectedNode && data &&\n
\n
\n
\n
\n Here goes the Job Id\n
\n
\n
\n Select a Node to see more information. \n
\n
\n
\n
\n
\n } \n
\n \n \n\n )\n}\n\nconst experimentStyle = {\n height: 200\n };\n\nexport default Selection;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/af034a972399d49fbcaa0e4600a2532d.json b/node_modules/.cache/babel-loader/af034a972399d49fbcaa0e4600a2532d.json new file mode 100644 index 0000000000000000000000000000000000000000..d23ae8996b7f630554a312ed4e8809c5b95fa124 --- /dev/null +++ b/node_modules/.cache/babel-loader/af034a972399d49fbcaa0e4600a2532d.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js\";\nimport React, { useContext } from \"react\"; // import vis from \"vis-network\";\n\nimport Spinner from \"../layout/Spinner\";\nimport ExperimentContext from '../context/experiment/experimentContext';\nimport vis from \"vis\";\n\nconst GraphNativeRep = () => {\n const experimentContext = useContext(ExperimentContext);\n const data = experimentContext.data,\n loadingGraph = experimentContext.loadingGraph;\n if (loadingGraph) return React.createElement(Spinner, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 11\n },\n __self: this\n });\n\n if (data === null) {\n return React.createElement(\"div\", {\n className: \"card-body text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 14\n },\n __self: this\n }, React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 15\n },\n __self: this\n }, \"Press \", React.createElement(\"span\", {\n className: \"badge badge-info\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 15\n },\n __self: this\n }, \"Show Graph\"), \" to see the graph representation of the experiment.\"), React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 16\n },\n __self: this\n }, \"If the experiment is running, press \", React.createElement(\"span\", {\n className: \"badge badge-dark\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 16\n },\n __self: this\n }, \"Start Job Monitor\"), \" to start a live tracker of the changes on the experiment's jobs. This process will automatically update the graph's nodes colors and show a log of the detected changes.\"));\n }\n\n var nodes_array = [];\n var edges_array = [];\n\n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: {\n background: node.status_color,\n border: \"black\"\n } //level: node.priority,\n\n }));\n this.props.data.edges.map(edge => edges_array.push({\n from: edge.from,\n to: edge.to\n }));\n }\n\n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n const options = {\n edges: {\n arrows: {\n to: {\n enabled: true\n }\n }\n },\n layout: {\n improvedLayout: true,\n hierarchical: {\n nodeSpacing: 250,\n edgeMinimization: false,\n blockShifting: false,\n parentCentralization: false,\n direction: 'UD',\n sortMethod: 'directed'\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true\n },\n physics: {\n enabled: false\n },\n nodes: {\n shape: 'dot'\n }\n };\n const graph = {\n nodes: nodes,\n edges: edges\n };\n var VisNetwork = React.createClass({\n displayName: \"VisNetwork\",\n\n componentDidMount() {\n var network = new vis.Network(this.ref.myRef, graph, options);\n },\n\n render: function () {\n return React.createElement(\"div\", {\n className: \"card-body p-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 88\n },\n __self: this\n }, React.createElement(\"div\", {\n ref: \"myRef\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 89\n },\n __self: this\n }));\n }\n });\n return React.createElement(VisNetwork, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 95\n },\n __self: this\n });\n};\n\nconst experimentStyle = {\n height: 600\n};\nexport default GraphNativeRep;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js"],"names":["React","useContext","Spinner","ExperimentContext","vis","GraphNativeRep","experimentContext","data","loadingGraph","nodes_array","edges_array","props","nodes","edges","map","node","push","id","label","color","background","status_color","border","edge","from","to","DataSet","options","arrows","enabled","layout","improvedLayout","hierarchical","nodeSpacing","edgeMinimization","blockShifting","parentCentralization","direction","sortMethod","interaction","dragNodes","hoverConnectedEdges","navigationButtons","physics","shape","graph","VisNetwork","createClass","componentDidMount","network","Network","ref","myRef","render","experimentStyle","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,UAAhB,QAAkC,OAAlC,C,CACA;;AACA,OAAOC,OAAP,MAAoB,mBAApB;AACA,OAAOC,iBAAP,MAA8B,yCAA9B;AACA,OAAOC,GAAP,MAAgB,KAAhB;;AAEA,MAAMC,cAAc,GAAG,MAAM;AAEzB,QAAMC,iBAAiB,GAAGL,UAAU,CAACE,iBAAD,CAApC;AAFyB,QAGjBI,IAHiB,GAGMD,iBAHN,CAGjBC,IAHiB;AAAA,QAGXC,YAHW,GAGMF,iBAHN,CAGXE,YAHW;AAIzB,MAAIA,YAAJ,EAAkB,OAAO,oBAAC,OAAD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAAP;;AAClB,MAAID,IAAI,KAAK,IAAb,EAAmB;AACf,WACI;AAAK,MAAA,SAAS,EAAC,qBAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,OACI;AAAG,MAAA,SAAS,EAAC,MAAb;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,iBAA0B;AAAM,MAAA,SAAS,EAAC,kBAAhB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oBAA1B,wDADJ,EAEI;AAAG,MAAA,SAAS,EAAC,MAAb;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,+CAAwD;AAAM,MAAA,SAAS,EAAC,kBAAhB;AAAA;AAAA;AAAA;AAAA;AA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Context } from \"react\";\n// import vis from \"vis-network\";\nimport Spinner from \"../layout/Spinner\";\nimport ExperimentContext from '../context/experiment/experimentContext';\nimport vis from \"vis\";\n\nconst GraphNativeRep = () => {\n\n const experimentContext = useContext(ExperimentContext); \n const { data, loadingGraph } = experimentContext;\n if (loadingGraph) return \n if (data === null) {\n return (\n
\n

Press Show Graph to see the graph representation of the experiment.

\n

If the experiment is running, press Start Job Monitor to start a live tracker of the changes on the experiment's jobs.\n This process will automatically update the graph's nodes colors and show a log of the detected changes.\n

\n
\n );\n }\n\n var nodes_array = [];\n var edges_array = [];\n\n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: { background: node.status_color, border: \"black\" },\n //level: node.priority,\n })\n );\n \n this.props.data.edges.map(edge => \n edges_array.push({ from: edge.from, to: edge.to })\n );\n }\n\n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n\n const options = {\n edges: {\n arrows: {\n to: { enabled: true }\n }\n },\n layout: {\n improvedLayout: true,\n hierarchical: {\n \n nodeSpacing: 250,\n edgeMinimization: false,\n blockShifting: false,\n parentCentralization: false,\n direction: 'UD',\n sortMethod: 'directed',\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true,\n },\n physics: {\n enabled: false,\n },\n nodes: {\n shape: 'dot',\n }\n };\n\n const graph = {\n nodes : nodes,\n edges : edges,\n };\n \n\n var VisNetwork = React.createClass({\n componentDidMount() {\n var network = new vis.Network(this.ref.myRef, graph, options);\n },\n\n render: function() { \n return (\n
\n
\n
\n );\n }\n });\n\n return ;\n\n}\n\nconst experimentStyle = {\n height: 600\n };\n\nexport default GraphNativeRep;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/b01b52c9fd0d2b6f155942697a78d965.json b/node_modules/.cache/babel-loader/b01b52c9fd0d2b6f155942697a78d965.json new file mode 100644 index 0000000000000000000000000000000000000000..590406e510a522c19f87448df3849d6034a8cc3a --- /dev/null +++ b/node_modules/.cache/babel-loader/b01b52c9fd0d2b6f155942697a78d965.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/pages/ExperimentCentral.js\";\nimport React, { Fragment, useContext } from 'react';\nimport Experiment from '../experiment/Experiment';\nimport GraphRepresentation from '../experiment/GraphRepresentation';\nimport GraphNativeRep from '../experiment/GraphNativeRep';\nimport ExperimentContext from '../context/experiment/experimentContext';\nimport Selection from '../experiment/Selection'; // import OpenRun from '../experiment/OpenRun';\n\nimport Running from '../experiment/Running';\nimport JobMonitor from '../experiment/JobMonitor';\n\nconst ExperimentCentral = ({\n match\n}) => {\n const expid = match.params.expid;\n const experimentContext = useContext(ExperimentContext);\n const data = experimentContext.data,\n updateSelection = experimentContext.updateSelection,\n loadingGraph = experimentContext.loadingGraph,\n loadingRun = experimentContext.loadingRun,\n shouldUpdateGraph = experimentContext.shouldUpdateGraph,\n cleanGraphData = experimentContext.cleanGraphData,\n cleanRunData = experimentContext.cleanRunData,\n getExperimentRun = experimentContext.getExperimentRun,\n getExperimentPkl = experimentContext.getExperimentPkl,\n cleanPklData = experimentContext.cleanPklData,\n startAutoUpdateRun = experimentContext.startAutoUpdateRun,\n startAutoUpdatePkl = experimentContext.startAutoUpdatePkl,\n setAutoUpdateRun = experimentContext.setAutoUpdateRun,\n rundata = experimentContext.rundata,\n pklchanges = experimentContext.pklchanges,\n experiment = experimentContext.experiment;\n return React.createElement(Fragment, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 32\n },\n __self: this\n }, React.createElement(Experiment, {\n expidToken: expid,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 33\n },\n __self: this\n }), React.createElement(\"div\", {\n className: \"row mt-2\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 34\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-12\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 35\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"card\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-9 pr-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 38\n },\n __self: this\n }, React.createElement(GraphNativeRep, {\n data: data,\n updateSelection: updateSelection,\n loadingGraph: loadingGraph,\n cleanGraphData: cleanGraphData,\n shouldUpdateGraph: shouldUpdateGraph,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 39\n },\n __self: this\n })), React.createElement(\"div\", {\n className: \"col-3 pl-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 54\n },\n __self: this\n }, data && React.createElement(Selection, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 55\n },\n __self: this\n }), startAutoUpdatePkl && React.createElement(JobMonitor, {\n experiment: experiment,\n getExperimentPkl: getExperimentPkl,\n cleanPklData: cleanPklData,\n pklchanges: pklchanges,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 57\n },\n __self: this\n }))), React.createElement(\"div\", {\n className: \"card-footer p-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 65\n },\n __self: this\n }, startAutoUpdateRun && React.createElement(Running, {\n rundata: rundata,\n loadingRun: loadingRun,\n cleanRunData: cleanRunData,\n getExperimentRun: getExperimentRun,\n experiment: experiment,\n startAutoUpdateRun: startAutoUpdateRun,\n setAutoUpdateRun: setAutoUpdateRun,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 68\n },\n __self: this\n }), !startAutoUpdateRun && React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 79\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-12 text-center\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 80\n },\n __self: this\n }, React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 81\n },\n __self: this\n }, \"Press \", React.createElement(\"span\", {\n className: \"badge badge-dark\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 82\n },\n __self: this\n }, \"Show Log\"), \" to see the last 50 lines of the running log of this experiment. If the experiment is running, the log will update automatically.\"))))))));\n};\n\nexport default ExperimentCentral;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/pages/ExperimentCentral.js"],"names":["React","Fragment","useContext","Experiment","GraphRepresentation","GraphNativeRep","ExperimentContext","Selection","Running","JobMonitor","ExperimentCentral","match","expid","params","experimentContext","data","updateSelection","loadingGraph","loadingRun","shouldUpdateGraph","cleanGraphData","cleanRunData","getExperimentRun","getExperimentPkl","cleanPklData","startAutoUpdateRun","startAutoUpdatePkl","setAutoUpdateRun","rundata","pklchanges","experiment"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,QAAhB,EAA0BC,UAA1B,QAA4C,OAA5C;AACA,OAAOC,UAAP,MAAuB,0BAAvB;AACA,OAAOC,mBAAP,MAAgC,mCAAhC;AACA,OAAOC,cAAP,MAA2B,8BAA3B;AACA,OAAOC,iBAAP,MAA8B,yCAA9B;AACA,OAAOC,SAAP,MAAsB,yBAAtB,C,CACA;;AACA,OAAOC,OAAP,MAAoB,uBAApB;AACA,OAAOC,UAAP,MAAuB,0BAAvB;;AAEA,MAAMC,iBAAiB,GAAG,CAAC;AAAEC,EAAAA;AAAF,CAAD,KAAe;AACrC,QAAMC,KAAK,GAAGD,KAAK,CAACE,MAAN,CAAaD,KAA3B;AACA,QAAME,iBAAiB,GAAGZ,UAAU,CAACI,iBAAD,CAApC;AAFqC,QAG9BS,IAH8B,GAkBlBD,iBAlBkB,CAG9BC,IAH8B;AAAA,QAIjCC,eAJiC,GAkBlBF,iBAlBkB,CAIjCE,eAJiC;AAAA,QAKjCC,YALiC,GAkBlBH,iBAlBkB,CAKjCG,YALiC;AAAA,QAMjCC,UANiC,GAkBlBJ,iBAlBkB,CAMjCI,UANiC;AAAA,QAOjCC,iBAPiC,GAkBlBL,iBAlBkB,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,CADJ,CAdR,CA7BJ,CADJ,CADJ,CAFJ,CADA;AAsEH,CA1FD;;AA4FA,eAAef,iBAAf","sourcesContent":["import React, { Fragment, useContext } from 'react';\nimport Experiment from '../experiment/Experiment';\nimport GraphRepresentation from '../experiment/GraphRepresentation';\nimport GraphNativeRep from '../experiment/GraphNativeRep';\nimport ExperimentContext from '../context/experiment/experimentContext';\nimport Selection from '../experiment/Selection';\n// import OpenRun from '../experiment/OpenRun';\nimport Running from '../experiment/Running';\nimport JobMonitor from '../experiment/JobMonitor';\n\nconst ExperimentCentral = ({ match }) => {\n const expid = match.params.expid;\n const experimentContext = useContext(ExperimentContext);\n const {data, \n updateSelection, \n loadingGraph, \n loadingRun, \n shouldUpdateGraph,\n cleanGraphData, \n cleanRunData, \n getExperimentRun,\n getExperimentPkl, \n cleanPklData,\n startAutoUpdateRun, \n startAutoUpdatePkl,\n setAutoUpdateRun,\n rundata,\n pklchanges,\n experiment } = experimentContext;\n \n return (\n \n \n
\n
\n
\n
\n
\n \n {/* */}\n
\n
\n {data && }\n {startAutoUpdatePkl &&\n \n } \n
\n
\n
\n\n\n {startAutoUpdateRun && } \n\n {!startAutoUpdateRun &&\n
\n
\n

\n Press Show Log to see the last 50 lines of the running log of this experiment. \n If the experiment is running, the log will update automatically.\n

\n
\n
\n }\n \n\n
\n
\n
\n
\n \n {/* */}\n \n \n \n
\n );\n}; \n\nexport default ExperimentCentral;"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/b0c8a23074b526fdeaf7ec744a78f8eb.json b/node_modules/.cache/babel-loader/b0c8a23074b526fdeaf7ec744a78f8eb.json new file mode 100644 index 0000000000000000000000000000000000000000..0948aa2a195308b2c496fbdbacc7492c5457f75d --- /dev/null +++ b/node_modules/.cache/babel-loader/b0c8a23074b526fdeaf7ec744a78f8eb.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/Selection.js\";\nimport React, { useContext, Fragment } from 'react';\nimport ExperimentContext from '../context/experiment/experimentContext';\n\nconst Selection = () => {\n const experimentContext = useContext(ExperimentContext);\n const selection = experimentContext.selection,\n data = experimentContext.data,\n experiment = experimentContext.experiment; // const { model, branch, hpc } = experiment;\n //var currentSelection = \"Node: \"\n\n var currentNode = \"\";\n var selectedNode = null;\n\n if (selection) {\n //console.log(\"Current selection \" + selection)\n selection.map(node => // currentSelection += node + \", \"\n currentNode = node); //console.log(\"Current node \" + currentNode)\n\n selectedNode = data.nodes.find(node => node.id === currentNode); //console.log(\"Selected node\")\n //console.log(\"Data: \" + selectedNode.id + \" \" + selectedNode.platform_name)\n }\n\n return React.createElement(Fragment, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 23\n },\n __self: this\n }, selectedNode && React.createElement(Fragment, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 25\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 26\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-12\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 27\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"card text-white bg-info\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 28\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"card-header text-center py-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 29\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 30\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 30\n },\n __self: this\n }, selectedNode.id))), React.createElement(\"div\", {\n className: \"card-body py-0 mh-75\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 32\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 33\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 34\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 34\n },\n __self: this\n }, \"Date:\"), \" \", selectedNode.date)), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-12\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 38\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 39\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 39\n },\n __self: this\n }, \"Section:\"), \" \", selectedNode.section)))), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 43\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 44\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-8\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 45\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 46\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 46\n },\n __self: this\n }, \"Platform:\"), \" \", selectedNode.platform_name && selectedNode.platform_name, \" \", !selectedNode.platform_name && experiment.hpc)), React.createElement(\"div\", {\n className: \"col-4 text-right\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 48\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 49\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 49\n },\n __self: this\n }, \"c:\", data.max_children, \"/p:\", data.max_parents))))), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 56\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 57\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-6\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 58\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 59\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 59\n },\n __self: this\n }, \"Processors:\"), \" \", selectedNode.processors)), React.createElement(\"div\", {\n className: \"col-6\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 61\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 62\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 62\n },\n __self: this\n }, \"Wallclock:\"), \" \", selectedNode.wallclock)))), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 66\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 67\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-6\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 68\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 69\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 69\n },\n __self: this\n }, \"Level:\"), \" \", selectedNode.level)), React.createElement(\"div\", {\n className: \"col-6\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 71\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 72\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 72\n },\n __self: this\n }, \"Out:\"), \" \", selectedNode.children, \" \", React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 72\n },\n __self: this\n }, \"In:\"), \" \", selectedNode.parents, \" \")))), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 77\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 78\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 78\n },\n __self: this\n }, \"Status:\")), \" \", selectedNode.status)))))), !selectedNode && data && React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 87\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-12\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 88\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"card text-white bg-info\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 89\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"card-header text-center py-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 90\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 91\n },\n __self: this\n }, \"Here goes the Job Id\")), React.createElement(\"div\", {\n className: \"card-body\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 93\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"text-center\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 94\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 95\n },\n __self: this\n }, \"Select a Node to see more information.\")))))));\n};\n\nconst experimentStyle = {\n height: 200\n};\nexport default Selection;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/Selection.js"],"names":["React","useContext","Fragment","ExperimentContext","Selection","experimentContext","selection","data","experiment","currentNode","selectedNode","map","node","nodes","find","id","experimentStyle","date","section","platform_name","hpc","max_children","max_parents","processors","wallclock","level","children","parents","status","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,UAAhB,EAA4BC,QAA5B,QAA4C,OAA5C;AACA,OAAOC,iBAAP,MAA8B,yCAA9B;;AAEA,MAAMC,SAAS,GAAG,MAAM;AACpB,QAAMC,iBAAiB,GAAGJ,UAAU,CAACE,iBAAD,CAApC;AADoB,QAEZG,SAFY,GAEoBD,iBAFpB,CAEZC,SAFY;AAAA,QAEDC,IAFC,GAEoBF,iBAFpB,CAEDE,IAFC;AAAA,QAEKC,UAFL,GAEoBH,iBAFpB,CAEKG,UAFL,EAGpB;AACA;;AACA,MAAIC,WAAW,GAAG,EAAlB;AACA,MAAIC,YAAY,GAAG,IAAnB;;AACA,MAAIJ,SAAJ,EAAe;AACX;AACAA,IAAAA,SAAS,CAACK,GAAV,CAAcC,IAAI,IACd;AACAH,IAAAA,WAAW,GAAGG,IAFlB,EAFW,CAMX;;AACAF,IAAAA,YAAY,GAAGH,IAAI,CAACM,KAAL,CAAWC,IAAX,CAAgBF,IAAI,IAAIA,IAAI,CAACG,EAAL,KAAYN,WAApC,CAAf,CAPW,CAQX;AACA;AACH;;AACD,SACI,oBAAC,QAAD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACSC,YAAY,IACb,oBAAC,QAAD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACK;AAAK,IAAA,SAAS,EAAC,KAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACI;AAAK,IAAA,SAAS,EAAC,QAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACG;AAAK,IAAA,SAAS,EAAC,yBAAf;AAAyC,IAAA,KAAK,EAAEM,eAAhD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACI;AAAK,IAAA,SAAS,EAAC,8BAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACI;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KAAO;AAAA;AAAA;AAAA;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;AAAA;AAAA;AAAA;AAAA,KACI;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,eAAP,CADJ,OAC6CjB,YAAY,CAACkB,MAD1D,CA7CJ,CAJJ,CADH,CADJ,CADL,CAFR,EA+DS,CAAClB,YAAD,IAAiBH,IAAjB,IACG;AAAK,IAAA,SAAS,EAAC,KAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACI;AAAK,IAAA,SAAS,EAAC,QAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACI;AAAK,IAAA,SAAS,EAAC,yBAAf;AAAyC,IAAA,KAAK,EAAES,eAAhD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACI;AAAK,IAAA,SAAS,EAAC,8BAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACI;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,4BADJ,CADJ,EAII;AAAK,IAAA,SAAS,EAAC,WAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACI;AAAK,IAAA,SAAS,EAAC,aAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,8CADA,CADJ,CAJJ,CADJ,CADJ,CAhEZ,CADJ;AAqFH,CAvGD;;AAyGA,MAAMA,eAAe,GAAG;AACpBa,EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,eAAezB,SAAf","sourcesContent":["import React, { useContext, Fragment } from 'react'\nimport ExperimentContext from '../context/experiment/experimentContext';\n\nconst Selection = () => {\n const experimentContext = useContext(ExperimentContext);\n const { selection, data, experiment } = experimentContext;\n // const { model, branch, hpc } = experiment;\n //var currentSelection = \"Node: \"\n var currentNode = \"\"\n var selectedNode = null\n if (selection) {\n //console.log(\"Current selection \" + selection)\n selection.map(node => (\n // currentSelection += node + \", \"\n currentNode = node\n ));\n //console.log(\"Current node \" + currentNode)\n selectedNode = data.nodes.find(node => node.id === currentNode) \n //console.log(\"Selected node\")\n //console.log(\"Data: \" + selectedNode.id + \" \" + selectedNode.platform_name)\n } \n return (\n \n {selectedNode &&\n \n
\n
\n
\n
\n {selectedNode.id}\n
\n
\n
\n Date: {selectedNode.date}\n
\n
\n
\n
\n Section: {selectedNode.section}\n
\n
\n
\n
\n
\n
\n Platform: {selectedNode.platform_name && selectedNode.platform_name} {!selectedNode.platform_name && experiment.hpc}\n
\n
\n c:{data.max_children}/p:{data.max_parents}\n
\n
\n
\n {/*
\n Priority: {selectedNode.priority}\n
*/}\n
\n
\n
\n Processors: {selectedNode.processors}\n
\n
\n Wallclock: {selectedNode.wallclock}\n
\n
\n
\n
\n
\n
\n Level: {selectedNode.level}\n
\n
\n Out: {selectedNode.children} In: {selectedNode.parents} \n
\n \n
\n
\n
\n Status: {selectedNode.status}\n
\n
\n
\n
\n
\n
\n } \n {!selectedNode && data &&\n
\n
\n
\n
\n Here goes the Job Id\n
\n
\n
\n Select a Node to see more information. \n
\n
\n
\n
\n
\n } \n
\n \n \n\n )\n}\n\nconst experimentStyle = {\n height: 200\n };\n\nexport default Selection;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/b1678297a551ce65b268ddd4637908d6.json b/node_modules/.cache/babel-loader/b1678297a551ce65b268ddd4637908d6.json new file mode 100644 index 0000000000000000000000000000000000000000..d44d89f9a83e6974ad17beed9ddfe86f8c808f37 --- /dev/null +++ b/node_modules/.cache/babel-loader/b1678297a551ce65b268ddd4637908d6.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/Selection.js\";\nimport React, { useContext, Fragment } from 'react';\nimport ExperimentContext from '../context/experiment/experimentContext';\n\nconst Selection = () => {\n const experimentContext = useContext(ExperimentContext);\n const selection = experimentContext.selection,\n data = experimentContext.data; // const { model, branch, hpc } = experiment;\n //var currentSelection = \"Node: \"\n\n var currentNode = \"\";\n var selectedNode = null;\n\n if (selection) {\n //console.log(\"Current selection \" + selection)\n selection.map(node => // currentSelection += node + \", \"\n currentNode = node); //console.log(\"Current node \" + currentNode)\n\n selectedNode = data.nodes.find(node => node.id === currentNode); //console.log(\"Selected node\")\n //console.log(\"Data: \" + selectedNode.id + \" \" + selectedNode.platform_name)\n }\n\n return React.createElement(Fragment, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 23\n },\n __self: this\n }, selectedNode && React.createElement(Fragment, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 25\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 26\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-12\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 27\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"card text-white bg-info\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 28\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"card-header text-center py-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 29\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 30\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 30\n },\n __self: this\n }, selectedNode.id))), React.createElement(\"div\", {\n className: \"card-body py-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 32\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 33\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 34\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 34\n },\n __self: this\n }, \"Date:\"), \" \", selectedNode.date)), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"Section:\"), \" \", selectedNode.section)), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 39\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 40\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 40\n },\n __self: this\n }, \"Platform:\"), \" \", selectedNode.platform_name)), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 42\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 43\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 43\n },\n __self: this\n }, \"Priority:\"), \" \", selectedNode.priority)), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 45\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 46\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 46\n },\n __self: this\n }, \"Processors:\"), \" \", selectedNode.processors)), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 48\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 49\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 49\n },\n __self: this\n }, \"Status:\")), \" \", selectedNode.status), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 51\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 52\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-6\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 53\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 54\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 54\n },\n __self: this\n }, \"Level:\"), \" \", selectedNode.level)), React.createElement(\"div\", {\n className: \"col-6\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 56\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 57\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 57\n },\n __self: this\n }, \"Children:\"), \" \", selectedNode.children))))))))), !selectedNode && data && React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 70\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-12\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 71\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"card text-white bg-info\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 72\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"card-header text-center py-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 73\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 74\n },\n __self: this\n }, \"Here goes the Job Id\")), React.createElement(\"div\", {\n className: \"card-body\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 76\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"text-center\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 77\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 78\n },\n __self: this\n }, \"Select a Node to see more information.\")))))));\n};\n\nconst experimentStyle = {\n height: 200\n};\nexport default Selection;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/Selection.js"],"names":["React","useContext","Fragment","ExperimentContext","Selection","experimentContext","selection","data","currentNode","selectedNode","map","node","nodes","find","id","experimentStyle","date","section","platform_name","priority","processors","status","level","children","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,UAAhB,EAA4BC,QAA5B,QAA4C,OAA5C;AACA,OAAOC,iBAAP,MAA8B,yCAA9B;;AAEA,MAAMC,SAAS,GAAG,MAAM;AACpB,QAAMC,iBAAiB,GAAGJ,UAAU,CAACE,iBAAD,CAApC;AADoB,QAEZG,SAFY,GAEQD,iBAFR,CAEZC,SAFY;AAAA,QAEDC,IAFC,GAEQF,iBAFR,CAEDE,IAFC,EAGpB;AACA;;AACA,MAAIC,WAAW,GAAG,EAAlB;AACA,MAAIC,YAAY,GAAG,IAAnB;;AACA,MAAIH,SAAJ,EAAe;AACX;AACAA,IAAAA,SAAS,CAACI,GAAV,CAAcC,IAAI,IACd;AACAH,IAAAA,WAAW,GAAGG,IAFlB,EAFW,CAMX;;AACAF,IAAAA,YAAY,GAAGF,IAAI,CAACK,KAAL,CAAWC,IAAX,CAAgBF,IAAI,IAAIA,IAAI,CAACG,EAAL,KAAYN,WAApC,CAAf,CAPW,CAQX;AACA;AACH;;AACD,SACI,oBAAC,QAAD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACSC,YAAY,IACb,oBAAC,QAAD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACK;AAAK,IAAA,SAAS,EAAC,KAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACI;AAAK,IAAA,SAAS,EAAC,QAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACG;AAAK,IAAA,SAAS,EAAC,yBAAf;AAAyC,IAAA,KAAK,EAAEM,eAAhD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACI;AAAK,IAAA,SAAS,EAAC,8BAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACI;AAA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tFD;;AAwFA,MAAMA,eAAe,GAAG;AACpBS,EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,eAAepB,SAAf","sourcesContent":["import React, { useContext, Fragment } from 'react'\nimport ExperimentContext from '../context/experiment/experimentContext';\n\nconst Selection = () => {\n const experimentContext = useContext(ExperimentContext);\n const { selection, data } = experimentContext;\n // const { model, branch, hpc } = experiment;\n //var currentSelection = \"Node: \"\n var currentNode = \"\"\n var selectedNode = null\n if (selection) {\n //console.log(\"Current selection \" + selection)\n selection.map(node => (\n // currentSelection += node + \", \"\n currentNode = node\n ));\n //console.log(\"Current node \" + currentNode)\n selectedNode = data.nodes.find(node => node.id === currentNode) \n //console.log(\"Selected node\")\n //console.log(\"Data: \" + selectedNode.id + \" \" + selectedNode.platform_name)\n } \n return (\n \n {selectedNode &&\n \n
\n
\n
\n
\n {selectedNode.id}\n
\n
\n
\n Date: {selectedNode.date}\n
\n
\n Section: {selectedNode.section}\n
\n
\n Platform: {selectedNode.platform_name}\n
\n
\n Priority: {selectedNode.priority}\n
\n
\n Processors: {selectedNode.processors}\n
\n
\n Status: {selectedNode.status}\n
\n
\n
\n
\n Level: {selectedNode.level}\n
\n
\n Children: {selectedNode.children}\n
\n \n
\n
\n \n
\n
\n
\n
\n
\n } \n {!selectedNode && data &&\n
\n
\n
\n
\n Here goes the Job Id\n
\n
\n
\n Select a Node to see more information. \n
\n
\n
\n
\n
\n } \n
\n \n \n\n )\n}\n\nconst experimentStyle = {\n height: 200\n };\n\nexport default Selection;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/b2aa17957c8ac76d5fa8d166ee39d749.json b/node_modules/.cache/babel-loader/b2aa17957c8ac76d5fa8d166ee39d749.json new file mode 100644 index 0000000000000000000000000000000000000000..2194e3f051852f1678f18d26b3e5eeaaf2a975ad --- /dev/null +++ b/node_modules/.cache/babel-loader/b2aa17957c8ac76d5fa8d166ee39d749.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/pages/ExperimentCentral.js\";\nimport React, { Fragment, useContext } from 'react';\nimport Experiment from '../experiment/Experiment'; // import GraphRepresentation from '../experiment/GraphRepresentation';\n\nimport GraphNativeRep from '../experiment/GraphNativeRep';\nimport ExperimentContext from '../context/experiment/experimentContext';\nimport Selection from '../experiment/Selection'; // import OpenRun from '../experiment/OpenRun';\n\nimport Running from '../experiment/Running';\nimport JobMonitor from '../experiment/JobMonitor';\n\nconst ExperimentCentral = ({\n match\n}) => {\n const expid = match.params.expid;\n const experimentContext = useContext(ExperimentContext);\n const data = experimentContext.data,\n updateSelection = experimentContext.updateSelection,\n loadingGraph = experimentContext.loadingGraph,\n loadingRun = experimentContext.loadingRun,\n shouldUpdateGraph = experimentContext.shouldUpdateGraph,\n cleanGraphData = experimentContext.cleanGraphData,\n cleanRunData = experimentContext.cleanRunData,\n getExperimentRun = experimentContext.getExperimentRun,\n getExperimentPkl = experimentContext.getExperimentPkl,\n cleanPklData = experimentContext.cleanPklData,\n startAutoUpdateRun = experimentContext.startAutoUpdateRun,\n startAutoUpdatePkl = experimentContext.startAutoUpdatePkl,\n setAutoUpdateRun = experimentContext.setAutoUpdateRun,\n rundata = experimentContext.rundata,\n pklchanges = experimentContext.pklchanges,\n experiment = experimentContext.experiment,\n setVisData = experimentContext.setVisData;\n return React.createElement(Fragment, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 33\n },\n __self: this\n }, React.createElement(Experiment, {\n expidToken: expid,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 34\n },\n __self: this\n }), React.createElement(\"div\", {\n className: \"row mt-2\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 35\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-12\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"card\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 38\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-9 pr-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 39\n },\n __self: this\n }, React.createElement(GraphNativeRep, {\n data: data,\n updateSelection: updateSelection,\n loadingGraph: loadingGraph,\n cleanGraphData: cleanGraphData,\n shouldUpdateGraph: shouldUpdateGraph,\n setVisData: setVisData,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 40\n },\n __self: this\n })), React.createElement(\"div\", {\n className: \"col-3 pl-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 56\n },\n __self: this\n }, data && React.createElement(Selection, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 57\n },\n __self: this\n }), startAutoUpdatePkl && React.createElement(JobMonitor, {\n experiment: experiment,\n getExperimentPkl: getExperimentPkl,\n cleanPklData: cleanPklData,\n pklchanges: pklchanges,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 59\n },\n __self: this\n }))), React.createElement(\"div\", {\n className: \"card-footer p-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 67\n },\n __self: this\n }, startAutoUpdateRun && React.createElement(Running, {\n rundata: rundata,\n loadingRun: loadingRun,\n cleanRunData: cleanRunData,\n getExperimentRun: getExperimentRun,\n experiment: experiment,\n startAutoUpdateRun: startAutoUpdateRun,\n setAutoUpdateRun: setAutoUpdateRun,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 70\n },\n __self: this\n }), !startAutoUpdateRun && React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 81\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-12 text-center\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 82\n },\n __self: this\n }, React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 83\n },\n __self: this\n }, \"Press \", React.createElement(\"span\", {\n className: \"badge badge-dark\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 84\n },\n __self: this\n }, \"Show Log\"), \" to see the last 50 lines of the running log of this experiment. If the experiment is running, the log will update automatically.\"))))))));\n};\n\nexport default ExperimentCentral;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/pages/ExperimentCentral.js"],"names":["React","Fragment","useContext","Experiment","GraphNativeRep","ExperimentContext","Selection","Running","JobMonitor","ExperimentCentral","match","expid","params","experimentContext","data","updateSelection","loadingGraph","loadingRun","shouldUpdateGraph","cleanGraphData","cleanRunData","getExperimentRun","getExperimentPkl","cleanPklData","startAutoUpdateRun","startAutoUpdatePkl","setAutoUpdateRun","rundata","pklchanges","experiment","setVisData"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,QAAhB,EAA0BC,UAA1B,QAA4C,OAA5C;AACA,OAAOC,UAAP,MAAuB,0BAAvB,C,CACA;;AACA,OAAOC,cAAP,MAA2B,8BAA3B;AACA,OAAOC,iBAAP,MAA8B,yCAA9B;AACA,OAAOC,SAAP,MAAsB,yBAAtB,C,CACA;;AACA,OAAOC,OAAP,MAAoB,uBAApB;AACA,OAAOC,UAAP,MAAuB,0BAAvB;;AAEA,MAAMC,iBAAiB,GAAG,CAAC;AAAEC,EAAAA;AAAF,CAAD,KAAe;AACrC,QAAMC,KAAK,GAAGD,KAAK,CAACE,MAAN,CAAaD,KAA3B;AACA,QAAME,iBAAiB,GAAGX,UAAU,CAACG,iBAAD,CAApC;AAFqC,QAG9BS,IAH8B,GAmBjBD,iBAnBiB,CAG9BC,IAH8B;AAAA,QAIjCC,eAJiC,GAmBjBF,iBAnBiB,CAIjCE,eAJiC;AAAA,QAKjCC,YALiC,GAmBjBH,iBAnBiB,CAKjCG,YALiC;AAAA,QAMjCC,UANiC,GAmBjBJ,iBAnBiB,CAMjCI,UANiC;AAAA,QAOjCC,iBAPiC,GAmBjBL,iBAnBiB,CAOjCK,iBAPiC;AA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AM,IAAA,SAAS,EAAC,kBAAhB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gBADV,sIADJ,CADJ,CAdR,CA9BJ,CADJ,CADJ,CAFJ,CADA;AAuEH,CA5FD;;AA8FA,eAAef,iBAAf","sourcesContent":["import React, { Fragment, useContext } from 'react';\nimport Experiment from '../experiment/Experiment';\n// import GraphRepresentation from '../experiment/GraphRepresentation';\nimport GraphNativeRep from '../experiment/GraphNativeRep';\nimport ExperimentContext from '../context/experiment/experimentContext';\nimport Selection from '../experiment/Selection';\n// import OpenRun from '../experiment/OpenRun';\nimport Running from '../experiment/Running';\nimport JobMonitor from '../experiment/JobMonitor';\n\nconst ExperimentCentral = ({ match }) => {\n const expid = match.params.expid;\n const experimentContext = useContext(ExperimentContext);\n const {data, \n updateSelection, \n loadingGraph, \n loadingRun, \n shouldUpdateGraph,\n cleanGraphData, \n cleanRunData, \n getExperimentRun,\n getExperimentPkl, \n cleanPklData,\n startAutoUpdateRun, \n startAutoUpdatePkl,\n setAutoUpdateRun,\n rundata,\n pklchanges,\n experiment,\n setVisData, } = experimentContext;\n \n return (\n \n \n
\n
\n
\n
\n
\n \n {/* */}\n
\n
\n {data && }\n {startAutoUpdatePkl &&\n \n } \n
\n
\n
\n\n\n {startAutoUpdateRun && } \n\n {!startAutoUpdateRun &&\n
\n
\n

\n Press Show Log to see the last 50 lines of the running log of this experiment. \n If the experiment is running, the log will update automatically.\n

\n
\n
\n }\n \n\n
\n
\n
\n
\n \n {/* */}\n \n \n \n
\n );\n}; \n\nexport default ExperimentCentral;"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/b31d0778699375bb1906fa5c8fec723a.json b/node_modules/.cache/babel-loader/b31d0778699375bb1906fa5c8fec723a.json new file mode 100644 index 0000000000000000000000000000000000000000..e2db924a4a4675c26e2634a9c296e8f76a19c47b --- /dev/null +++ b/node_modules/.cache/babel-loader/b31d0778699375bb1906fa5c8fec723a.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js\";\nimport React, { Component } from \"react\"; // import vis from \"vis-network\";\n\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n constructor(...args) {\n super(...args);\n\n this.updateVisNodes = nodes => {\n this.props.setVisData(nodes);\n };\n }\n\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else if (nextProps.data && this.props.data && nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp) {\n console.log(\"Rerendering\");\n return true;\n } else if (nextProps.loadingGraph !== this.props.loadingGraph) {\n return true;\n } else {\n return false;\n }\n }\n\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n render() {\n if (this.props.loadingGraph) return React.createElement(Spinner, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 32\n },\n __self: this\n });\n\n if (this.props.data == null) {\n return React.createElement(\"div\", {\n className: \"card-body text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 35\n },\n __self: this\n }, React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Press \", React.createElement(\"span\", {\n className: \"badge badge-info\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Show Graph\"), \" to see the graph representation of the experiment.\"), React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"If the experiment is running, press \", React.createElement(\"span\", {\n className: \"badge badge-dark\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"Start Job Monitor\"), \" to start a live tracker of the changes on the experiment's jobs. This process will automatically update the graph's nodes colors and show a log of the detected changes.\"));\n }\n\n var nodes_array = [];\n var edges_array = [];\n\n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: {\n background: node.status_color,\n border: \"black\"\n },\n level: node.level\n }));\n this.props.data.edges.map(edge => edges_array.push({\n from: edge.from,\n to: edge.to\n }));\n }\n\n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n const options = {\n edges: {\n arrows: {\n to: {\n enabled: true\n }\n }\n },\n layout: {\n //improvedLayout: true,\n hierarchical: {\n nodeSpacing: 190,\n treeSpacing: 200,\n blockShifting: true,\n edgeMinimization: false,\n parentCentralization: false,\n sortMethod: 'hubsize',\n direction: 'UD'\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true\n },\n physics: {\n stabilization: false\n },\n nodes: {\n shape: 'dot',\n font: {\n size: 10\n }\n }\n };\n const graph = {\n nodes: nodes,\n edges: edges\n };\n\n class VisNetwork extends Component {\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else {\n return false;\n }\n }\n\n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", params => {\n //console.log(params);\n if (params.nodes) {\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n });\n } // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n\n\n render() {\n return React.createElement(\"div\", {\n className: \"card-body p-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 134\n },\n __self: this\n }, React.createElement(\"div\", {\n ref: \"myRef\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 135\n },\n __self: this\n }));\n }\n\n }\n\n this.updateVisNodes(nodes);\n return React.createElement(VisNetwork, {\n graph: graph,\n options: options,\n updateSelection: this.props.updateSelection,\n shouldUpdateGraph: this.props.shouldUpdateGraph,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 143\n },\n __self: this\n });\n }\n\n}\n\nconst experimentStyle = {\n height: 600\n};\nexport default GraphNativeRep;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js"],"names":["React","Component","Spinner","vis","GraphNativeRep","updateVisNodes","nodes","props","setVisData","shouldComponentUpdate","nextProps","nextState","shouldUpdateGraph","data","pkl_timestamp","console","log","loadingGraph","componentWillUnmount","cleanGraphData","render","nodes_array","edges_array","edges","map","node","push","id","label","color","background","status_color","border","level","edge","from","to","DataSet","options","arrows","enabled","layout","hierarchical","nodeSpacing","treeSpacing","blockShifting","edgeMinimization","parentCentralization","sortMethod","direction","interaction","dragNodes","hoverConnectedEdges","navigationButtons","physics","stabilization","shape","font","size","graph","VisNetwork","componentDidMount","network","Network","refs","myRef","on","params","updateSelection","experimentStyle","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,SAAhB,QAAiC,OAAjC,C,CACA;;AACA,OAAOC,OAAP,MAAoB,mBAApB;AACA,OAAOC,GAAP,MAAgB,KAAhB;;AAEA,MAAMC,cAAN,SAA6BH,SAA7B,CAAuC;AAAA;AAAA;;AAAA,SAmBnCI,cAnBmC,GAmBjBC,KAAD,IAAW;AACxB,WAAKC,KAAL,CAAWC,UAAX,CAAsBF,KAAtB;AACH,KArBkC;AAAA;;AAEnCG,EAAAA,qBAAqB,CAACC,SAAD,EAAYC,SAAZ,EAAsB;AACvC,QAAI,KAAKJ,KAAL,CAAWK,iBAAX,KAAiC,IAArC,EAA0C;AACtC,aAAO,IAAP;AACD,KAFH,MAEQ,IAAIF,SAAS,CAACG,IAAV,IAAkB,KAAKN,KAAL,CAAWM,IAA7B,IAAsCH,SAAS,CAACG,IAAV,CAAeC,aAAf,KAAiC,KAAKP,KAAL,CAAWM,IAAX,CAAgBC,aAA3F,EAA0G;AAC9GC,MAAAA,OAAO,CAACC,GAAR,CAAY,aAAZ;AACA,aAAO,IAAP;AACD,KAHK,MAGA,IAAIN,S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D,KADJ;AAEH,MAAA,OAAO,EAAErB,OAFN;AAGH,MAAA,eAAe,EAAE,KAAK/B,KAAL,CAAW6D,eAHzB;AAIH,MAAA,iBAAiB,EAAE,KAAK7D,KAAL,CAAWK,iBAJ3B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAAP;AAOH;;AAhJkC;;AA8JvC,MAAMyD,eAAe,GAAG;AACpBC,EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,eAAelE,cAAf","sourcesContent":["import React, { Component } from \"react\";\n// import vis from \"vis-network\";\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n\n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true\n }else if (nextProps.data && this.props.data && (nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp)){\n console.log(\"Rerendering\")\n return true;\n }else if (nextProps.loadingGraph !== this.props.loadingGraph){\n return true; \n }else{\n return false;\n }\n }\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n updateVisNodes = (nodes) => {\n this.props.setVisData(nodes);\n }\n\n\n\n render () {\n if (this.props.loadingGraph) return ;\n if (this.props.data == null){\n return (\n
\n

Press Show Graph to see the graph representation of the experiment.

\n

If the experiment is running, press Start Job Monitor to start a live tracker of the changes on the experiment's jobs.\n This process will automatically update the graph's nodes colors and show a log of the detected changes.\n

\n
\n );\n }\n\n var nodes_array = [];\n var edges_array = [];\n \n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: { background: node.status_color, border: \"black\" },\n level: node.level,\n })\n );\n \n this.props.data.edges.map(edge => \n edges_array.push({ from: edge.from, to: edge.to })\n );\n }\n \n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n\n\n const options = {\n edges: {\n arrows: {\n to: { enabled: true }\n }\n },\n layout: {\n //improvedLayout: true,\n hierarchical: {\n nodeSpacing: 190,\n treeSpacing: 200,\n blockShifting: true,\n edgeMinimization: false,\n parentCentralization: false,\n sortMethod: 'hubsize',\n direction: 'UD',\n }\n }, \n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true,\n },\n physics: {\n stabilization: false,\n },\n nodes: {\n shape: 'dot',\n font: {\n size: 10,\n },\n }\n };\n \n const graph = {\n nodes : nodes,\n edges : edges,\n };\n\n class VisNetwork extends Component {\n \n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true;\n } else {\n return false;\n }\n }\n \n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", (params) => {\n //console.log(params);\n if (params.nodes){\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n \n });\n }\n \n // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n \n render() { \n return (\n
\n
\n
\n );\n }\n }\n\n this.updateVisNodes(nodes);\n \n return ;\n\n }\n\n\n \n\n \n\n \n \n\n \n\n}\n\nconst experimentStyle = {\n height: 600\n };\n\nexport default GraphNativeRep;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/b780b3ca137141bdd959bae569ddb8e6.json b/node_modules/.cache/babel-loader/b780b3ca137141bdd959bae569ddb8e6.json new file mode 100644 index 0000000000000000000000000000000000000000..108f0e79625e1a433cebdf9a18117bb3751d0710 --- /dev/null +++ b/node_modules/.cache/babel-loader/b780b3ca137141bdd959bae569ddb8e6.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js\";\nimport React, { Component } from \"react\"; // import vis from \"vis-network\";\n\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n constructor(...args) {\n super(...args);\n\n this.updateVisNodes = nodes => {\n this.props.setVisData(nodes);\n };\n }\n\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else if (nextProps.data && this.props.data && nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp) {\n console.log(\"Rerendering\");\n return true;\n } else if (nextProps.loadingGraph !== this.props.loadingGraph) {\n return true;\n } else {\n return false;\n }\n }\n\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n render() {\n if (this.props.loadingGraph) return React.createElement(Spinner, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 32\n },\n __self: this\n });\n\n if (this.props.data == null) {\n return React.createElement(\"div\", {\n className: \"card-body text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 35\n },\n __self: this\n }, React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Press \", React.createElement(\"span\", {\n className: \"badge badge-info\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Show Graph\"), \" to see the graph representation of the experiment.\"), React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"If the experiment is running, press \", React.createElement(\"span\", {\n className: \"badge badge-dark\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"Start Job Monitor\"), \" to start a live tracker of the changes on the experiment's jobs. This process will automatically update the graph's nodes colors and show a log of the detected changes.\"));\n }\n\n var nodes_array = [];\n var edges_array = [];\n\n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: {\n background: node.status_color,\n border: \"black\"\n },\n level: node.level\n }));\n this.props.data.edges.map(edge => edges_array.push({\n from: edge.from,\n to: edge.to\n }));\n }\n\n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n const options = {\n edges: {\n arrows: {\n to: {\n enabled: true\n }\n }\n },\n layout: {\n improvedLayout: true,\n hierarchical: {\n nodeSpacing: 250,\n edgeMinimization: false,\n blockShifting: false,\n parentCentralization: true,\n direction: 'UD',\n sortMethod: 'directed'\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true\n },\n physics: {\n enabled: false\n },\n nodes: {\n shape: 'dot'\n }\n };\n const graph = {\n nodes: nodes,\n edges: edges\n };\n\n class VisNetwork extends Component {\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else {\n return false;\n }\n }\n\n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", params => {\n //console.log(params);\n if (params.nodes) {\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n });\n } // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n\n\n render() {\n return React.createElement(\"div\", {\n className: \"card-body p-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 131\n },\n __self: this\n }, React.createElement(\"div\", {\n ref: \"myRef\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 132\n },\n __self: this\n }));\n }\n\n }\n\n this.updateVisNodes(nodes);\n return React.createElement(VisNetwork, {\n graph: graph,\n options: options,\n updateSelection: this.props.updateSelection,\n shouldUpdateGraph: this.props.shouldUpdateGraph,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 140\n },\n __self: this\n });\n }\n\n}\n\nconst experimentStyle = {\n height: 600\n};\nexport default GraphNativeRep;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js"],"names":["React","Component","Spinner","vis","GraphNativeRep","updateVisNodes","nodes","props","setVisData","shouldComponentUpdate","nextProps","nextState","shouldUpdateGraph","data","pkl_timestamp","console","log","loadingGraph","componentWillUnmount","cleanGraphData","render","nodes_array","edges_array","edges","map","node","push","id","label","color","background","status_color","border","level","edge","from","to","DataSet","options","arrows","enabled","layout","improvedLayout","hierarchical","nodeSpacing","edgeMinimization","blockShifting","parentCentralization","direction","sortMethod","interaction","dragNodes","hoverConnectedEdges","navigationButtons","physics","shape","graph","VisNetwork","componentDidMount","network","Network","refs","myRef","on","params","updateSelection","experimentStyle","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,SAAhB,QAAiC,OAAjC,C,CACA;;AACA,OAAOC,OAAP,MAAoB,mBAApB;AACA,OAAOC,GAAP,MAAgB,KAAhB;;AAEA,MAAMC,cAAN,SAA6BH,SAA7B,CAAuC;AAAA;AAAA;;AAAA,SAmBnCI,cAnBmC,GAmBjBC,KAAD,IAAW;AACxB,WAAKC,KAAL,CAAWC,UAAX,CAAsBF,KAAtB;AACH,KArBkC;AAAA;;AAEnCG,EAAAA,qBAAqB,CAACC,SAAD,EAAYC,SAAZ,EAAsB;AACvC,QAAI,KAAKJ,KAAL,CAAWK,iBAAX,KAAiC,IAArC,EAA0C;AACtC,aAAO,IAAP;AACD,KAFH,MAEQ,IAAIF,SAAS,CAACG,IAAV,IAAkB,KAAKN,KAAL,CAAWM,IAA7B,IAAsCH,SAAS,CAACG,IAAV,CAAeC,aAAf,KAAiC,KAAKP,KAAL,CAAWM,IAAX,CAAgBC,aAA3F,EAA0G;AAC9GC,MAAAA,OAAO,CAACC,GAAR,CAAY,aAAZ;AACA,aAAO,IAAP;AACD,KAHK,MAGA,IAAIN,SAAS,CAACO,YAAV,KAA2B,KAAKV,KAAL,CAAWU,YAA1C,EAAuD;AAC3D,aAAO,IAAP;AACD,KAFK,MAED;AACH,aAAO,KAAP;AACD;AACN;;AACDC,EAAAA,oBAAoB,GAAG;AACnBH,IAAAA,OAAO,CAACC,GAAR,CAAY,YAAZ;AACA,SAAKT,KAAL,CAAWY,cAAX;AACH;;AAQDC,EAAAA,MAAM,GAAI;A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vis from \"vis-network\";\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n\n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true\n }else if (nextProps.data && this.props.data && (nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp)){\n console.log(\"Rerendering\")\n return true;\n }else if (nextProps.loadingGraph !== this.props.loadingGraph){\n return true; \n }else{\n return false;\n }\n }\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n updateVisNodes = (nodes) => {\n this.props.setVisData(nodes);\n }\n\n\n\n render () {\n if (this.props.loadingGraph) return ;\n if (this.props.data == null){\n return (\n
\n

Press Show Graph to see the graph representation of the experiment.

\n

If the experiment is running, press Start Job Monitor to start a live tracker of the changes on the experiment's jobs.\n This process will automatically update the graph's nodes colors and show a log of the detected changes.\n

\n
\n );\n }\n\n var nodes_array = [];\n var edges_array = [];\n \n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: { background: node.status_color, border: \"black\" },\n level: node.level,\n })\n );\n \n this.props.data.edges.map(edge => \n edges_array.push({ from: edge.from, to: edge.to })\n );\n }\n \n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n\n\n const options = {\n edges: {\n arrows: {\n to: { enabled: true }\n }\n },\n layout: {\n improvedLayout: true,\n hierarchical: {\n \n nodeSpacing: 250,\n edgeMinimization: false,\n blockShifting: false,\n parentCentralization: true,\n direction: 'UD',\n sortMethod: 'directed',\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true,\n },\n physics: {\n enabled: false,\n },\n nodes: {\n shape: 'dot',\n }\n };\n \n const graph = {\n nodes : nodes,\n edges : edges,\n };\n\n class VisNetwork extends Component {\n \n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true;\n } else {\n return false;\n }\n }\n \n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", (params) => {\n //console.log(params);\n if (params.nodes){\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n \n });\n }\n \n // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n \n render() { \n return (\n
\n
\n
\n );\n }\n }\n\n this.updateVisNodes(nodes);\n \n return ;\n\n }\n\n\n \n\n \n\n \n \n\n \n\n}\n\nconst experimentStyle = {\n height: 600\n };\n\nexport default GraphNativeRep;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/b8ba903591bad5e2339d64196c6ecb97.json b/node_modules/.cache/babel-loader/b8ba903591bad5e2339d64196c6ecb97.json new file mode 100644 index 0000000000000000000000000000000000000000..d14741185c4c8bf3d4ac25c6d4fb17c79ecf2525 --- /dev/null +++ b/node_modules/.cache/babel-loader/b8ba903591bad5e2339d64196c6ecb97.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js\";\nimport React, { Component } from \"react\"; // import vis from \"vis-network\";\n\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n constructor(...args) {\n super(...args);\n\n this.updateVisNodes = nodes => {\n this.props.setVisData(nodes);\n };\n }\n\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else if (nextProps.data && this.props.data && nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp) {\n console.log(\"Rerendering\");\n return true;\n } else if (nextProps.loadingGraph !== this.props.loadingGraph) {\n return true;\n } else {\n return false;\n }\n }\n\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n render() {\n if (this.props.loadingGraph) return React.createElement(Spinner, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 32\n },\n __self: this\n });\n\n if (this.props.data == null) {\n return React.createElement(\"div\", {\n className: \"card-body text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 35\n },\n __self: this\n }, React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Press \", React.createElement(\"span\", {\n className: \"badge badge-info\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Show Graph\"), \" to see the graph representation of the experiment.\"), React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"If the experiment is running, press \", React.createElement(\"span\", {\n className: \"badge badge-dark\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"Start Job Monitor\"), \" to start a live tracker of the changes on the experiment's jobs. This process will automatically update the graph's nodes colors and show a log of the detected changes.\"));\n }\n\n var nodes_array = [];\n var edges_array = [];\n\n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: {\n background: node.status_color,\n border: \"black\"\n },\n level: node.level\n }));\n this.props.data.edges.map(edge => edges_array.push({\n from: edge.from,\n to: edge.to\n }));\n }\n\n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n const options = {\n edges: {\n arrows: {\n to: {\n enabled: true\n }\n }\n },\n layout: {\n improvedLayout: true,\n hierarchical: {\n nodeSpacing: 150,\n blockShifting: true,\n edgeMinimization: true,\n //parentCentralization: true,\n sortMethod: 'hubsize',\n direction: 'UD'\n }\n },\n font: {\n size: 8\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true\n },\n physics: {\n enabled: false\n },\n nodes: {\n shape: 'dot'\n }\n };\n const graph = {\n nodes: nodes,\n edges: edges\n };\n\n class VisNetwork extends Component {\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else {\n return false;\n }\n }\n\n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", params => {\n //console.log(params);\n if (params.nodes) {\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n });\n } // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n\n\n render() {\n return React.createElement(\"div\", {\n className: \"card-body p-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 133\n },\n __self: this\n }, React.createElement(\"div\", {\n ref: \"myRef\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 134\n },\n __self: this\n }));\n }\n\n }\n\n this.updateVisNodes(nodes);\n return React.createElement(VisNetwork, {\n graph: graph,\n options: options,\n updateSelection: this.props.updateSelection,\n shouldUpdateGraph: this.props.shouldUpdateGraph,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 142\n },\n __self: this\n });\n }\n\n}\n\nconst experimentStyle = {\n height: 600\n};\nexport default GraphNativeRep;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js"],"names":["React","Component","Spinner","vis","GraphNativeRep","updateVisNodes","nodes","props","setVisData","shouldComponentUpdate","nextProps","nextState","shouldUpdateGraph","data","pkl_timestamp","console","log","loadingGraph","componentWillUnmount","cleanGraphData","render","nodes_array","edges_array","edges","map","node","push","id","label","color","background","status_color","border","level","edge","from","to","DataSet","options","arrows","enabled","layout","improvedLayout","hierarchical","nodeSpacing","blockShifting","edgeMinimization","sortMethod","direction","font","size","interaction","dragNodes","hoverConnectedEdges","navigationButtons","physics","shape","graph","VisNetwork","componentDidMount","network","Network","refs","myRef","on","params","updateSelection","experimentStyle","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,SAAhB,QAAiC,OAAjC,C,CACA;;AACA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D,KAAKlD,KAAL,CAAW+B,OAA9D,CAAd;AACAsB,QAAAA,OAAO,CAACI,EAAR,CAAW,OAAX,EAAqBC,MAAD,IAAY;AAC5B;AACA,cAAIA,MAAM,CAAC3D,KAAX,EAAiB;AACb;AACA,iBAAKC,KAAL,CAAW2D,eAAX,CAA2BD,MAAM,CAAC3D,KAAlC;AACH;AAEJ,SAPD;AAQH,OApB8B,CAsB/B;AACA;AACA;AACA;;;AAEAc,MAAAA,MAAM,GAAG;AACL,eACI;AAAK,UAAA,SAAS,EAAC,eAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,WACI;AAAK,UAAA,GAAG,EAAC,OAAT;AAAiB,UAAA,KAAK,EAAE+C,eAAxB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,UADJ,CADJ;AAKH;;AAjC8B;;AAoCnC,SAAK9D,cAAL,CAAoBC,KAApB;AAEA,WAAO,oBAAC,UAAD;AACH,MAAA,KAAK,EAAEmD,KADJ;AAEH,MAAA,OAAO,EAAEnB,OAFN;AAGH,MAAA,eAAe,EAAE,KAAK/B,KAAL,CAAW2D,eAHzB;AAIH,MAAA,iBAAiB,EAAE,KAAK3D,KAAL,CAAWK,iBAJ3B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAAP;AAOH;;AA/IkC;;AA6JvC,MAAMuD,eAAe,GAAG;AACpBC,EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,eAAehE,cAAf","sourcesContent":["import React, { Component } from \"react\";\n// import vis from \"vis-network\";\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n\n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true\n }else if (nextProps.data && this.props.data && (nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp)){\n console.log(\"Rerendering\")\n return true;\n }else if (nextProps.loadingGraph !== this.props.loadingGraph){\n return true; \n }else{\n return false;\n }\n }\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n updateVisNodes = (nodes) => {\n this.props.setVisData(nodes);\n }\n\n\n\n render () {\n if (this.props.loadingGraph) return ;\n if (this.props.data == null){\n return (\n
\n

Press Show Graph to see the graph representation of the experiment.

\n

If the experiment is running, press Start Job Monitor to start a live tracker of the changes on the experiment's jobs.\n This process will automatically update the graph's nodes colors and show a log of the detected changes.\n

\n
\n );\n }\n\n var nodes_array = [];\n var edges_array = [];\n \n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: { background: node.status_color, border: \"black\" },\n level: node.level,\n })\n );\n \n this.props.data.edges.map(edge => \n edges_array.push({ from: edge.from, to: edge.to })\n );\n }\n \n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n\n\n const options = {\n edges: {\n arrows: {\n to: { enabled: true }\n }\n },\n layout: {\n improvedLayout: true,\n hierarchical: {\n nodeSpacing: 150,\n blockShifting: true,\n edgeMinimization: true,\n //parentCentralization: true,\n sortMethod: 'hubsize',\n direction: 'UD',\n }\n },\n font: {\n size: 8,\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true,\n },\n physics: {\n enabled: false,\n },\n nodes: {\n shape: 'dot',\n }\n };\n \n const graph = {\n nodes : nodes,\n edges : edges,\n };\n\n class VisNetwork extends Component {\n \n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true;\n } else {\n return false;\n }\n }\n \n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", (params) => {\n //console.log(params);\n if (params.nodes){\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n \n });\n }\n \n // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n \n render() { \n return (\n
\n
\n
\n );\n }\n }\n\n this.updateVisNodes(nodes);\n \n return ;\n\n }\n\n\n \n\n \n\n \n \n\n \n\n}\n\nconst experimentStyle = {\n height: 600\n };\n\nexport default GraphNativeRep;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/ba33fac405549d32b3c5b0ab63b1f868.json b/node_modules/.cache/babel-loader/ba33fac405549d32b3c5b0ab63b1f868.json new file mode 100644 index 0000000000000000000000000000000000000000..30b4546b7c80f6436ee40b328775e147294a121a --- /dev/null +++ b/node_modules/.cache/babel-loader/ba33fac405549d32b3c5b0ab63b1f868.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js\";\nimport React, { Component } from \"react\"; // import vis from \"vis-network\";\n\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n constructor(...args) {\n super(...args);\n\n this.updateVisNodes = nodes => {\n this.props.setVisData(nodes);\n };\n }\n\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else if (nextProps.data && this.props.data && nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp) {\n console.log(\"Rerendering\");\n return true;\n } else if (nextProps.loadingGraph !== this.props.loadingGraph) {\n return true;\n } else {\n return false;\n }\n }\n\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n render() {\n if (this.props.loadingGraph) return React.createElement(Spinner, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 32\n },\n __self: this\n });\n\n if (this.props.data == null) {\n return React.createElement(\"div\", {\n className: \"card-body text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 35\n },\n __self: this\n }, React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Press \", React.createElement(\"span\", {\n className: \"badge badge-info\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Show Graph\"), \" to see the graph representation of the experiment.\"), React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"If the experiment is running, press \", React.createElement(\"span\", {\n className: \"badge badge-dark\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"Start Job Monitor\"), \" to start a live tracker of the changes on the experiment's jobs. This process will automatically update the graph's nodes colors and show a log of the detected changes.\"));\n }\n\n var nodes_array = [];\n var edges_array = [];\n\n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: {\n background: node.status_color,\n border: \"black\"\n },\n level: node.level\n }));\n this.props.data.edges.map(edge => edges_array.push({\n from: edge.from,\n to: edge.to\n }));\n }\n\n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n const options = {\n edges: {\n arrows: {\n to: {\n enabled: true\n }\n }\n },\n layout: {\n //improvedLayout: true,\n hierarchical: {\n // enabled: true,\n nodeSpacing: 250,\n //edgeMinimization: true,\n parentCentralization: true,\n direction: 'UD'\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true\n },\n physics: {\n enabled: false\n },\n nodes: {\n shape: 'dot'\n }\n };\n const graph = {\n nodes: nodes,\n edges: edges\n };\n\n class VisNetwork extends Component {\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else {\n return false;\n }\n }\n\n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", params => {\n //console.log(params);\n if (params.nodes) {\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n });\n } // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n\n\n render() {\n return React.createElement(\"div\", {\n className: \"card-body p-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 129\n },\n __self: this\n }, React.createElement(\"div\", {\n ref: \"myRef\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 130\n },\n __self: this\n }));\n }\n\n }\n\n this.updateVisNodes(nodes);\n return React.createElement(VisNetwork, {\n graph: graph,\n options: options,\n updateSelection: this.props.updateSelection,\n shouldUpdateGraph: this.props.shouldUpdateGraph,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 138\n },\n __self: this\n });\n }\n\n}\n\nconst experimentStyle = {\n height: 600\n};\nexport default GraphNativeRep;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js"],"names":["React","Component","Spinner","vis","GraphNativeRep","updateVisNodes","nodes","props","setVisData","shouldComponentUpdate","nextProps","nextState","shouldUpdateGraph","data","pkl_timestamp","console","log","loadingGraph","componentWillUnmount","cleanGraphData","render","nodes_array","edges_array","edges","map","node","push","id","label","color","background","status_color","border","level","edge","from","to","DataSet","options","arrows","enabled","layout","hierarchical","nodeSpacing","parentCentralization","direction","interaction","dragNodes","hoverConnectedEdges","navigationButtons","physics","shape","graph","VisNetwork","componentDidMount","network","Network","refs","myRef","on","params","updateSelection","experimentStyle","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,SAAhB,QAAiC,OAAjC,C,CACA;;AACA,OAAOC,OAAP,MAAoB,mBAApB;AACA,OAAOC,GAAP,MAAgB,KAAhB;;AAEA,MAAMC,cAAN,SAA6BH,SAA7B,CAAuC;AAAA;AAAA;;AAAA,SAmBnCI,cAnBmC,GAmBjBC,KAAD,IAAW;AACxB,WAAKC,KAAL,CAAWC,UAAX,CAAsBF,KAAtB;AACH,KArBkC;AAAA;;AAEnCG,EAAAA,qBAAqB,CAACC,SAAD,EAAYC,SAAZ,EAAsB;AACvC,QAAI,KAAKJ,KAAL,CAAWK,iBAAX,KAAiC,IAArC,EAA0C;AACtC,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C8B;;AAoCnC,SAAKzD,cAAL,CAAoBC,KAApB;AAEA,WAAO,oBAAC,UAAD;AACH,MAAA,KAAK,EAAE8C,KADJ;AAEH,MAAA,OAAO,EAAEd,OAFN;AAGH,MAAA,eAAe,EAAE,KAAK/B,KAAL,CAAWsD,eAHzB;AAIH,MAAA,iBAAiB,EAAE,KAAKtD,KAAL,CAAWK,iBAJ3B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAAP;AAOH;;AA3IkC;;AAyJvC,MAAMkD,eAAe,GAAG;AACpBC,EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,eAAe3D,cAAf","sourcesContent":["import React, { Component } from \"react\";\n// import vis from \"vis-network\";\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n\n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true\n }else if (nextProps.data && this.props.data && (nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp)){\n console.log(\"Rerendering\")\n return true;\n }else if (nextProps.loadingGraph !== this.props.loadingGraph){\n return true; \n }else{\n return false;\n }\n }\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n updateVisNodes = (nodes) => {\n this.props.setVisData(nodes);\n }\n\n\n\n render () {\n if (this.props.loadingGraph) return ;\n if (this.props.data == null){\n return (\n
\n

Press Show Graph to see the graph representation of the experiment.

\n

If the experiment is running, press Start Job Monitor to start a live tracker of the changes on the experiment's jobs.\n This process will automatically update the graph's nodes colors and show a log of the detected changes.\n

\n
\n );\n }\n\n var nodes_array = [];\n var edges_array = [];\n \n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: { background: node.status_color, border: \"black\" },\n level: node.level,\n })\n );\n \n this.props.data.edges.map(edge => \n edges_array.push({ from: edge.from, to: edge.to })\n );\n }\n \n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n\n\n const options = {\n edges: {\n arrows: {\n to: { enabled: true }\n }\n },\n layout: {\n //improvedLayout: true,\n hierarchical: {\n // enabled: true,\n nodeSpacing: 250,\n //edgeMinimization: true,\n parentCentralization: true,\n direction: 'UD',\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true,\n },\n physics: {\n enabled: false,\n },\n nodes: {\n shape: 'dot',\n }\n };\n \n const graph = {\n nodes : nodes,\n edges : edges,\n };\n\n class VisNetwork extends Component {\n \n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true;\n } else {\n return false;\n }\n }\n \n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", (params) => {\n //console.log(params);\n if (params.nodes){\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n \n });\n }\n \n // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n \n render() { \n return (\n
\n
\n
\n );\n }\n }\n\n this.updateVisNodes(nodes);\n \n return ;\n\n }\n\n\n \n\n \n\n \n \n\n \n\n}\n\nconst experimentStyle = {\n height: 600\n };\n\nexport default GraphNativeRep;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/ba5ce62a259ff59ba6f35e63c3318944.json b/node_modules/.cache/babel-loader/ba5ce62a259ff59ba6f35e63c3318944.json new file mode 100644 index 0000000000000000000000000000000000000000..bd4756e1aad0b5407a5e6392a99b7dc8012e4cbc --- /dev/null +++ b/node_modules/.cache/babel-loader/ba5ce62a259ff59ba6f35e63c3318944.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js\";\nimport React, { Component } from \"react\"; // import vis from \"vis-network\";\n\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n constructor(...args) {\n super(...args);\n\n this.updateVisNodes = nodes => {\n this.props.setVisData(nodes);\n };\n }\n\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else if (nextProps.data && this.props.data && nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp) {\n console.log(\"Rerendering\");\n return true;\n } else if (nextProps.loadingGraph !== this.props.loadingGraph) {\n return true;\n } else {\n return false;\n }\n }\n\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n render() {\n if (this.props.loadingGraph) return React.createElement(Spinner, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 32\n },\n __self: this\n });\n\n if (this.props.data == null) {\n return React.createElement(\"div\", {\n className: \"card-body text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 35\n },\n __self: this\n }, React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Press \", React.createElement(\"span\", {\n className: \"badge badge-info\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Show Graph\"), \" to see the graph representation of the experiment.\"), React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"If the experiment is running, press \", React.createElement(\"span\", {\n className: \"badge badge-dark\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"Start Job Monitor\"), \" to start a live tracker of the changes on the experiment's jobs. This process will automatically update the graph's nodes colors and show a log of the detected changes.\"));\n }\n\n var nodes_array = [];\n var edges_array = [];\n\n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: {\n background: node.status_color,\n border: \"black\"\n },\n level: node.level\n }));\n this.props.data.edges.map(edge => edges_array.push({\n from: edge.from,\n to: edge.to\n }));\n }\n\n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n const options = {\n edges: {\n arrows: {\n to: {\n enabled: true\n }\n }\n },\n layout: {\n //improvedLayout: true,\n hierarchical: {\n // enabled: true,\n nodeSpacing: 250,\n blockShifting: true,\n edgeMinimization: true,\n parentCentralization: true,\n direction: 'UD'\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true\n },\n physics: {\n enabled: false\n },\n nodes: {\n shape: 'dot'\n }\n };\n const graph = {\n nodes: nodes,\n edges: edges\n };\n\n class VisNetwork extends Component {\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else {\n return false;\n }\n }\n\n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", params => {\n //console.log(params);\n if (params.nodes) {\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n });\n } // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n\n\n render() {\n return React.createElement(\"div\", {\n className: \"card-body p-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 130\n },\n __self: this\n }, React.createElement(\"div\", {\n ref: \"myRef\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 131\n },\n __self: this\n }));\n }\n\n }\n\n this.updateVisNodes(nodes);\n return React.createElement(VisNetwork, {\n graph: graph,\n options: options,\n updateSelection: this.props.updateSelection,\n shouldUpdateGraph: this.props.shouldUpdateGraph,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 139\n },\n __self: this\n });\n }\n\n}\n\nconst experimentStyle = {\n height: 600\n};\nexport default GraphNativeRep;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js"],"names":["React","Component","Spinner","vis","GraphNativeRep","updateVisNodes","nodes","props","setVisData","shouldComponentUpdate","nextProps","nextState","shouldUpdateGraph","data","pkl_timestamp","console","log","loadingGraph","componentWillUnmount","cleanGraphData","render","nodes_array","edges_array","edges","map","node","push","id","label","color","background","status_color","border","level","edge","from","to","DataSet","options","arrows","enabled","layout","hierarchical","nodeSpacing","blockShifting","edgeMinimization","parentCentralization","direction","interaction","dragNodes","hoverConnectedEdges","navigationButtons","physics","shape","graph","VisNetwork","componentDidMount","network","Network","refs","myRef","on","params","updateSelection","experimentStyle","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,SAAhB,QAAiC,OAAjC,C,CACA;;AACA,OAAOC,OAAP,MAAoB,mBAApB;AACA,OAAOC,GAAP,MAAgB,KAAhB;;AAEA,MAAMC,cAAN,SAA6BH,SAA7B,CAAuC;AAAA;AAAA;;AAAA,SAmBnCI,cAnBmC,GAmBjBC,KAAD,IAAW;AACxB,WAAKC,KAAL,CAAWC,UAAX,CAAsBF,KAAtB;AACH,KArBkC;AAAA;;AAEnCG,EAAAA,qBAAqB,CAACC,SAAD,EAAYC,SAAZ,EAAsB;AACvC,QAAI,KAAKJ,KAAL,CAAWK,iBAAX,KAAiC,IAArC,EAA0C;AACtC,aAAO,IAAP;AACD,KAFH,MAEQ,IAAIF,SAAS,CAACG,IAAV,IAAkB,KAAKN,KAAL,CAAWM,IAA7B,IAAsCH,SAAS,CAACG,IAAV,CAAeC,aAAf,KAAiC,KAAKP,KAAL,CAAWM,IAAX,CAAgBC,aAA3F,EAA0G;AAC9GC,MAAAA,OAAO,CAACC,GAAR,CAAY,aAAZ;AACA,aAAO,IAAP;AACD,KAHK,MAGA,IAAIN,SAAS,CAACO,YAAV,KAA2B,KAAKV,KAAL,CAAWU,YAA1C,EAAuD;AAC3D,aAAO,IAAP;AACD,KAFK,MAED;AACH,aAAO,KAAP;AACD;AACN;;AACDC,EAAAA,oBAAoB,GAAG;AACnBH,IAAAA,OAAO,CAACC,GAAR,CAAY,YAAZ;AACA,SAAKT,KAAL,CAAWY,cAAX;AACH;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"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n\n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true\n }else if (nextProps.data && this.props.data && (nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp)){\n console.log(\"Rerendering\")\n return true;\n }else if (nextProps.loadingGraph !== this.props.loadingGraph){\n return true; \n }else{\n return false;\n }\n }\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n updateVisNodes = (nodes) => {\n this.props.setVisData(nodes);\n }\n\n\n\n render () {\n if (this.props.loadingGraph) return ;\n if (this.props.data == null){\n return (\n
\n

Press Show Graph to see the graph representation of the experiment.

\n

If the experiment is running, press Start Job Monitor to start a live tracker of the changes on the experiment's jobs.\n This process will automatically update the graph's nodes colors and show a log of the detected changes.\n

\n
\n );\n }\n\n var nodes_array = [];\n var edges_array = [];\n \n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: { background: node.status_color, border: \"black\" },\n level: node.level,\n })\n );\n \n this.props.data.edges.map(edge => \n edges_array.push({ from: edge.from, to: edge.to })\n );\n }\n \n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n\n\n const options = {\n edges: {\n arrows: {\n to: { enabled: true }\n }\n },\n layout: {\n //improvedLayout: true,\n hierarchical: {\n // enabled: true,\n nodeSpacing: 250,\n blockShifting: true,\n edgeMinimization: true,\n parentCentralization: true,\n direction: 'UD',\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true,\n },\n physics: {\n enabled: false,\n },\n nodes: {\n shape: 'dot',\n }\n };\n \n const graph = {\n nodes : nodes,\n edges : edges,\n };\n\n class VisNetwork extends Component {\n \n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true;\n } else {\n return false;\n }\n }\n \n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", (params) => {\n //console.log(params);\n if (params.nodes){\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n \n });\n }\n \n // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n \n render() { \n return (\n
\n
\n
\n );\n }\n }\n\n this.updateVisNodes(nodes);\n \n return ;\n\n }\n\n\n \n\n \n\n \n \n\n \n\n}\n\nconst experimentStyle = {\n height: 600\n };\n\nexport default GraphNativeRep;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/bc35a907a0ea925496d7887624999fbe.json b/node_modules/.cache/babel-loader/bc35a907a0ea925496d7887624999fbe.json new file mode 100644 index 0000000000000000000000000000000000000000..90c5549084c3a3ce73fa621493be91aa3f5abab8 --- /dev/null +++ b/node_modules/.cache/babel-loader/bc35a907a0ea925496d7887624999fbe.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js\";\nimport React, { Component } from \"react\"; // import vis from \"vis-network\";\n\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n constructor(...args) {\n super(...args);\n\n this.updateVisNodes = nodes => {\n this.props.setVisData(nodes);\n };\n }\n\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else if (nextProps.data && this.props.data && nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp) {\n console.log(\"Rerendering\");\n return true;\n } else if (nextProps.loadingGraph !== this.props.loadingGraph) {\n return true;\n } else {\n return false;\n }\n }\n\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n render() {\n if (this.props.loadingGraph) return React.createElement(Spinner, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 32\n },\n __self: this\n });\n\n if (this.props.data == null) {\n return React.createElement(\"div\", {\n className: \"card-body text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 35\n },\n __self: this\n }, React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Press \", React.createElement(\"span\", {\n className: \"badge badge-info\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Show Graph\"), \" to see the graph representation of the experiment.\"), React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"If the experiment is running, press \", React.createElement(\"span\", {\n className: \"badge badge-dark\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"Start Job Monitor\"), \" to start a live tracker of the changes on the experiment's jobs. This process will automatically update the graph's nodes colors and show a log of the detected changes.\"));\n }\n\n var nodes_array = [];\n var edges_array = [];\n\n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: {\n background: node.status_color,\n border: \"black\"\n } //level: node.level,\n\n }));\n this.props.data.edges.map(edge => edges_array.push({\n from: edge.from,\n to: edge.to\n }));\n }\n\n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n const options = {\n edges: {\n arrows: {\n to: {\n enabled: true\n }\n }\n },\n layout: {\n improvedLayout: true,\n hierarchical: {\n // enabled: true,\n //nodeSpacing: 250,\n // edgeMinimization: false,\n // blockShifting: true,\n parentCentralization: true,\n direction: 'UD'\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true\n },\n physics: {\n enabled: false\n },\n nodes: {\n shape: 'dot'\n }\n };\n const graph = {\n nodes: nodes,\n edges: edges\n };\n\n class VisNetwork extends Component {\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else {\n return false;\n }\n }\n\n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", params => {\n //console.log(params);\n if (params.nodes) {\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n });\n } // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n\n\n render() {\n return React.createElement(\"div\", {\n className: \"card-body p-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 130\n },\n __self: this\n }, React.createElement(\"div\", {\n ref: \"myRef\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 131\n },\n __self: this\n }));\n }\n\n }\n\n this.updateVisNodes(nodes);\n return React.createElement(VisNetwork, {\n graph: graph,\n options: options,\n updateSelection: this.props.updateSelection,\n shouldUpdateGraph: this.props.shouldUpdateGraph,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 139\n },\n __self: this\n });\n }\n\n}\n\nconst experimentStyle = {\n height: 600\n};\nexport default GraphNativeRep;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js"],"names":["React","Component","Spinner","vis","GraphNativeRep","updateVisNodes","nodes","props","setVisData","shouldComponentUpdate","nextProps","nextState","shouldUpdateGraph","data","pkl_timestamp","console","log","loadingGraph","componentWillUnmount","cleanGraphData","render","nodes_array","edges_array","edges","map","node","push","id","label","color","background","status_color","border","edge","from","to","DataSet","options","arrows","enabled","layout","improvedLayout","hierarchical","parentCentralization","direction","interaction","dragNodes","hoverConnectedEdges","navigationButtons","physics","shape","graph","VisNetwork","componentDidMount","network","Network","refs","myRef","on","params","updateSelection","experimentStyle","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,SAAhB,QAAiC,OAAjC,C,CACA;;AACA,OAAOC,OAAP,MAAoB,mBAApB;AACA,OAAOC,GAAP,MAAgB,KAAhB;;AAEA,MAAMC,cAAN,SAA6BH,SAA7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Ac,MAAAA,MAAM,GAAG;AACL,eACI;AAAK,UAAA,SAAS,EAAC,eAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,WACI;AAAK,UAAA,GAAG,EAAC,OAAT;AAAiB,UAAA,KAAK,EAAEyC,eAAxB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,UADJ,CADJ;AAKH;;AAjC8B;;AAoCnC,SAAKxD,cAAL,CAAoBC,KAApB;AAEA,WAAO,oBAAC,UAAD;AACH,MAAA,KAAK,EAAE6C,KADJ;AAEH,MAAA,OAAO,EAAEd,OAFN;AAGH,MAAA,eAAe,EAAE,KAAK9B,KAAL,CAAWqD,eAHzB;AAIH,MAAA,iBAAiB,EAAE,KAAKrD,KAAL,CAAWK,iBAJ3B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAAP;AAOH;;AA5IkC;;AA0JvC,MAAMiD,eAAe,GAAG;AACpBC,EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,eAAe1D,cAAf","sourcesContent":["import React, { Component } from \"react\";\n// import vis from \"vis-network\";\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n\n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true\n }else if (nextProps.data && this.props.data && (nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp)){\n console.log(\"Rerendering\")\n return true;\n }else if (nextProps.loadingGraph !== this.props.loadingGraph){\n return true; \n }else{\n return false;\n }\n }\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n updateVisNodes = (nodes) => {\n this.props.setVisData(nodes);\n }\n\n\n\n render () {\n if (this.props.loadingGraph) return ;\n if (this.props.data == null){\n return (\n
\n

Press Show Graph to see the graph representation of the experiment.

\n

If the experiment is running, press Start Job Monitor to start a live tracker of the changes on the experiment's jobs.\n This process will automatically update the graph's nodes colors and show a log of the detected changes.\n

\n
\n );\n }\n\n var nodes_array = [];\n var edges_array = [];\n \n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: { background: node.status_color, border: \"black\" },\n //level: node.level,\n })\n );\n \n this.props.data.edges.map(edge => \n edges_array.push({ from: edge.from, to: edge.to })\n );\n }\n \n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n\n\n const options = {\n edges: {\n arrows: {\n to: { enabled: true }\n }\n },\n layout: {\n improvedLayout: true,\n hierarchical: {\n // enabled: true,\n //nodeSpacing: 250,\n // edgeMinimization: false,\n // blockShifting: true,\n parentCentralization: true,\n direction: 'UD',\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true,\n },\n physics: {\n enabled: false,\n },\n nodes: {\n shape: 'dot',\n }\n };\n \n const graph = {\n nodes : nodes,\n edges : edges,\n };\n\n class VisNetwork extends Component {\n \n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true;\n } else {\n return false;\n }\n }\n \n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", (params) => {\n //console.log(params);\n if (params.nodes){\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n \n });\n }\n \n // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n \n render() { \n return (\n
\n
\n
\n );\n }\n }\n\n this.updateVisNodes(nodes);\n \n return ;\n\n }\n\n\n \n\n \n\n \n \n\n \n\n}\n\nconst experimentStyle = {\n height: 600\n };\n\nexport default GraphNativeRep;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/bd11a71e036c1b89a6a55fc7fa1e0e08.json b/node_modules/.cache/babel-loader/bd11a71e036c1b89a6a55fc7fa1e0e08.json new file mode 100644 index 0000000000000000000000000000000000000000..1c903c0e6a38bde60f371c7595b8f969329a603f --- /dev/null +++ b/node_modules/.cache/babel-loader/bd11a71e036c1b89a6a55fc7fa1e0e08.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js\";\nimport React, { Component } from \"react\"; // import vis from \"vis-network\";\n\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n constructor(...args) {\n super(...args);\n\n this.updateVisNodes = nodes => {\n this.props.setVisData(nodes);\n };\n }\n\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else if (nextProps.data && this.props.data && nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp) {\n console.log(\"Rerendering\");\n return true;\n } else if (nextProps.loadingGraph !== this.props.loadingGraph) {\n return true;\n } else {\n return false;\n }\n }\n\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n render() {\n if (this.props.loadingGraph) return React.createElement(Spinner, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 32\n },\n __self: this\n });\n\n if (this.props.data == null) {\n return React.createElement(\"div\", {\n className: \"card-body text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 35\n },\n __self: this\n }, React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Press \", React.createElement(\"span\", {\n className: \"badge badge-info\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Show Graph\"), \" to see the graph representation of the experiment.\"), React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"If the experiment is running, press \", React.createElement(\"span\", {\n className: \"badge badge-dark\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"Start Job Monitor\"), \" to start a live tracker of the changes on the experiment's jobs. This process will automatically update the graph's nodes colors and show a log of the detected changes.\"));\n }\n\n var nodes_array = [];\n var edges_array = [];\n\n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: {\n background: node.status_color,\n border: \"black\"\n },\n level: node.level\n }));\n this.props.data.edges.map(edge => edges_array.push({\n from: edge.from,\n to: edge.to\n }));\n }\n\n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n const options = {\n edges: {\n arrows: {\n to: {\n enabled: true\n }\n }\n },\n layout: {\n //improvedLayout: true,\n hierarchical: {\n // enabled: true,\n nodeSpacing: 250,\n edgeMinimization: true,\n parentCentralization: true,\n direction: 'UD'\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true,\n sortMethod: 'hubsize'\n },\n physics: {\n enabled: false\n },\n nodes: {\n shape: 'dot'\n }\n };\n const graph = {\n nodes: nodes,\n edges: edges\n };\n\n class VisNetwork extends Component {\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else {\n return false;\n }\n }\n\n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", params => {\n //console.log(params);\n if (params.nodes) {\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n });\n } // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n\n\n render() {\n return React.createElement(\"div\", {\n className: \"card-body p-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 130\n },\n __self: this\n }, React.createElement(\"div\", {\n ref: \"myRef\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 131\n },\n __self: this\n }));\n }\n\n }\n\n this.updateVisNodes(nodes);\n return React.createElement(VisNetwork, {\n graph: graph,\n options: options,\n updateSelection: this.props.updateSelection,\n shouldUpdateGraph: this.props.shouldUpdateGraph,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 139\n },\n __self: this\n });\n }\n\n}\n\nconst experimentStyle = {\n height: 600\n};\nexport default GraphNativeRep;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js"],"names":["React","Component","Spinner","vis","GraphNativeRep","updateVisNodes","nodes","props","setVisData","shouldComponentUpdate","nextProps","nextState","shouldUpdateGraph","data","pkl_timestamp","console","log","loadingGraph","componentWillUnmount","cleanGraphData","render","nodes_array","edges_array","edges","map","node","push","id","label","color","background","status_color","border","level","edge","from","to","DataSet","options","arrows","enabled","layout","hierarchical","nodeSpacing","edgeMinimization","parentCentralization","direction","interaction","dragNodes","hoverConnectedEdges","navigationButtons","sortMethod","physics","shape","graph","VisNetwork","componentDidMount","network","Network","refs","myRef","on","params","updateSelection","experimentStyle","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,SAAhB,QAAiC,OAAjC,C,CACA;;AACA,OAAOC,OAAP,MAAoB,mBAApB;AACA,OAAOC,GAAP,MAAgB,KAAhB;;AAEA,MAAMC,cAAN,SAA6BH,SAA7B,CAAuC;AAAA;AAAA;;AAAA,SAmBnCI,cAnBmC,GAmBjBC,KAAD,IAAW;AACxB,WAAKC,KAAL,CAAWC,UAAX,CAAsBF,KAAtB;AACH,KArBkC;AAAA;;AAEnCG,EAAAA,qBAAqB,CAACC,SAAD,EAAYC,SAAZ,EAAsB;AACvC,QAAI,KAAKJ,KAAL,CAAWK,iBAAX,KAAiC,IAArC,EAA0C;AACtC,aAAO,IAAP;AACD,KAFH,MAEQ,IAAIF,SAAS,CAACG,IAAV,IAAkB,KAAKN,KAAL,CAAWM,IAA7B,IAAsCH,SAAS,CAACG,IAAV,CAAeC,aAAf,KAAiC,KAAKP,KAAL,CAAWM,IAAX,CAAgBC,aAA3F,EAA0G;AAC9GC,MAAAA,OAAO,CAACC,GAAR,CAAY,aAAZ;AACA,aAAO,IAAP;AAC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MAAA,iBAAiB,EAAE,KAAKxD,KAAL,CAAWK,iBAJ3B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAAP;AAOH;;AA5IkC;;AA0JvC,MAAMoD,eAAe,GAAG;AACpBC,EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,eAAe7D,cAAf","sourcesContent":["import React, { Component } from \"react\";\n// import vis from \"vis-network\";\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n\n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true\n }else if (nextProps.data && this.props.data && (nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp)){\n console.log(\"Rerendering\")\n return true;\n }else if (nextProps.loadingGraph !== this.props.loadingGraph){\n return true; \n }else{\n return false;\n }\n }\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n updateVisNodes = (nodes) => {\n this.props.setVisData(nodes);\n }\n\n\n\n render () {\n if (this.props.loadingGraph) return ;\n if (this.props.data == null){\n return (\n
\n

Press Show Graph to see the graph representation of the experiment.

\n

If the experiment is running, press Start Job Monitor to start a live tracker of the changes on the experiment's jobs.\n This process will automatically update the graph's nodes colors and show a log of the detected changes.\n

\n
\n );\n }\n\n var nodes_array = [];\n var edges_array = [];\n \n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: { background: node.status_color, border: \"black\" },\n level: node.level,\n })\n );\n \n this.props.data.edges.map(edge => \n edges_array.push({ from: edge.from, to: edge.to })\n );\n }\n \n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n\n\n const options = {\n edges: {\n arrows: {\n to: { enabled: true }\n }\n },\n layout: {\n //improvedLayout: true,\n hierarchical: {\n // enabled: true,\n nodeSpacing: 250,\n edgeMinimization: true,\n parentCentralization: true,\n direction: 'UD',\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true,\n sortMethod: 'hubsize',\n },\n physics: {\n enabled: false,\n },\n nodes: {\n shape: 'dot',\n }\n };\n \n const graph = {\n nodes : nodes,\n edges : edges,\n };\n\n class VisNetwork extends Component {\n \n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true;\n } else {\n return false;\n }\n }\n \n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", (params) => {\n //console.log(params);\n if (params.nodes){\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n \n });\n }\n \n // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n \n render() { \n return (\n
\n
\n
\n );\n }\n }\n\n this.updateVisNodes(nodes);\n \n return ;\n\n }\n\n\n \n\n \n\n \n \n\n \n\n}\n\nconst experimentStyle = {\n height: 600\n };\n\nexport default GraphNativeRep;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/bd56212eab5ce5e6c30ffa32b33a2da3.json b/node_modules/.cache/babel-loader/bd56212eab5ce5e6c30ffa32b33a2da3.json new file mode 100644 index 0000000000000000000000000000000000000000..543675254dc0f970a8324b992e63d2ebdb3260aa --- /dev/null +++ b/node_modules/.cache/babel-loader/bd56212eab5ce5e6c30ffa32b33a2da3.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/Selection.js\";\nimport React, { useContext, Fragment } from 'react';\nimport ExperimentContext from '../context/experiment/experimentContext';\n\nconst Selection = () => {\n const experimentContext = useContext(ExperimentContext);\n const selection = experimentContext.selection,\n data = experimentContext.data,\n experiment = experimentContext.experiment; // const { model, branch, hpc } = experiment;\n //var currentSelection = \"Node: \"\n\n var currentNode = \"\";\n var selectedNode = null;\n\n if (selection) {\n //console.log(\"Current selection \" + selection)\n selection.map(node => // currentSelection += node + \", \"\n currentNode = node); //console.log(\"Current node \" + currentNode)\n\n selectedNode = data.nodes.find(node => node.id === currentNode); //console.log(\"Selected node\")\n //console.log(\"Data: \" + selectedNode.id + \" \" + selectedNode.platform_name)\n }\n\n return React.createElement(Fragment, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 23\n },\n __self: this\n }, selectedNode && React.createElement(Fragment, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 25\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 26\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-12\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 27\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"card text-white bg-info\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 28\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"card-header text-center p-0\",\n style: headerCard,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 29\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"mh-100 px-0 mx-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 30\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 31\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 31\n },\n __self: this\n }, selectedNode.id)))), React.createElement(\"div\", {\n className: \"card-body py-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 34\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 35\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Date:\"), \" \", selectedNode.date)), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 38\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 39\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-12\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 40\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 41\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 41\n },\n __self: this\n }, \"Section:\"), \" \", selectedNode.section)))), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 45\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 46\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-12\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 47\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 48\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 48\n },\n __self: this\n }, \"Platform:\"), \" \", selectedNode.platform_name && selectedNode.platform_name, \" \", !selectedNode.platform_name && experiment.hpc)))), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 55\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 56\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-6\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 57\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 58\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 58\n },\n __self: this\n }, \"Processors:\"), \" \", selectedNode.processors)), React.createElement(\"div\", {\n className: \"col-6\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 60\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 61\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 61\n },\n __self: this\n }, \"Wallclock:\"), \" \", selectedNode.wallclock)))), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 65\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 66\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-6\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 67\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 68\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 68\n },\n __self: this\n }, \"Level:\"), \" \", selectedNode.level)), React.createElement(\"div\", {\n className: \"col-6\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 70\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 71\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 71\n },\n __self: this\n }, \"Out:\"), \" \", selectedNode.children, \" \", React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 71\n },\n __self: this\n }, \"In:\"), \" \", selectedNode.parents, \" \")))), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 76\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 77\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-8\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 78\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 79\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 79\n },\n __self: this\n }, \"Status:\")), \" \", selectedNode.status), React.createElement(\"div\", {\n className: \"col-4 text-right\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 81\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 82\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 82\n },\n __self: this\n }, \"c:\", data.max_children, \"/p:\", data.max_parents)))))))))), !selectedNode && data && React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 93\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-12\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 94\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"card text-white bg-info\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 95\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"card-header text-center py-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 96\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 97\n },\n __self: this\n }, \"Here goes the Job Id\")), React.createElement(\"div\", {\n className: \"card-body\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 99\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"text-center\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 100\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 101\n },\n __self: this\n }, \"Select a Node to see more information.\")))))));\n};\n\nconst experimentStyle = {\n height: 200\n};\nconst headerCard = {\n height: 30\n};\nexport default Selection;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/Selection.js"],"names":["React","useContext","Fragment","ExperimentContext","Selection","experimentContext","selection","data","experiment","currentNode","selectedNode","map","node","nodes","find","id","experimentStyle","headerCard","date","section","platform_name","hpc","processors","wallclock","level","children","parents","status","max_children","max_parents","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,UAAhB,EAA4BC,QAA5B,QAA4C,OAA5C;AACA,OAAOC,iBAAP,MAA8B,yCAA9B;;AAEA,MAAMC,SAAS,GAAG,MAAM;AACpB,QAAMC,iBAAiB,GAAGJ,UAAU,CAACE,iBAAD,CAApC;AADoB,QAEZG,SAFY,GAEoBD,iBAFpB,CAEZC,SAFY;AAAA,QAEDC,IAFC,GAEoBF,iBAFpB,CAEDE,IAFC;AAAA,QAEKC,UAFL,GAEoBH,iBAFpB,CAEKG,UAFL,EAGpB;AACA;;AACA,MAAIC,WAAW,GAAG,EAAlB;AACA,MAAIC,YAAY,GAAG,IAAnB;;AACA,MAAIJ,SAAJ,EAAe;AACX;AACAA,IAAAA,SAAS,CAACK,GAAV,CAAcC,IAAI,IACd;AACAH,IAAAA,WAAW,GAAGG,IAFlB,EAFW,CAMX;;AACAF,IAAAA,YAAY,GAAGH,IAAI,CAACM,KAAL,CAAWC,IAAX,CAAgBF,IAAI,IAAIA,IAAI,CAACG,EAAL,KAAYN,WAApC,CAAf,CAPW,CAQX;AACA;AACH;;AACD,SACI,oBAAC,QAAD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACSC,YAAY,IACb,oBAAC,QAAD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACK;AAAK,IAAA,SAAS,EAAC,KAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACI;AAAK,IAAA,SAAS,EAAC,QAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACG;AAAK,IAAA,SAAS,EAAC,yBAAf;AAAyC,IAAA,KAAK,EAAEM,eAAhD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACI;AAAK,IAAA,SAAS,EAAC,6BAAf;AAA6C,IAAA,KAAK,EAAEC,UAApD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACI;AAAK,IA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AAM,EAAE;AADO,CAAnB;AAIA,eAAe1B,SAAf","sourcesContent":["import React, { useContext, Fragment } from 'react'\nimport ExperimentContext from '../context/experiment/experimentContext';\n\nconst Selection = () => {\n const experimentContext = useContext(ExperimentContext);\n const { selection, data, experiment } = experimentContext;\n // const { model, branch, hpc } = experiment;\n //var currentSelection = \"Node: \"\n var currentNode = \"\"\n var selectedNode = null\n if (selection) {\n //console.log(\"Current selection \" + selection)\n selection.map(node => (\n // currentSelection += node + \", \"\n currentNode = node\n ));\n //console.log(\"Current node \" + currentNode)\n selectedNode = data.nodes.find(node => node.id === currentNode) \n //console.log(\"Selected node\")\n //console.log(\"Data: \" + selectedNode.id + \" \" + selectedNode.platform_name)\n } \n return (\n \n {selectedNode &&\n \n
\n
\n
\n
\n
\n {selectedNode.id}\n
\n
\n
\n
\n Date: {selectedNode.date}\n
\n
\n
\n
\n Section: {selectedNode.section}\n
\n
\n
\n
\n
\n
\n Platform: {selectedNode.platform_name && selectedNode.platform_name} {!selectedNode.platform_name && experiment.hpc}\n
\n
\n
\n {/*
\n Priority: {selectedNode.priority}\n
*/}\n
\n
\n
\n Processors: {selectedNode.processors}\n
\n
\n Wallclock: {selectedNode.wallclock}\n
\n
\n
\n
\n
\n
\n Level: {selectedNode.level}\n
\n
\n Out: {selectedNode.children} In: {selectedNode.parents} \n
\n \n
\n
\n
\n
\n
\n Status: {selectedNode.status}\n
\n
\n c:{data.max_children}/p:{data.max_parents}\n
\n
\n
\n
\n
\n
\n
\n
\n } \n {!selectedNode && data &&\n
\n
\n
\n
\n Here goes the Job Id\n
\n
\n
\n Select a Node to see more information. \n
\n
\n
\n
\n
\n } \n
\n \n \n\n )\n}\n\nconst experimentStyle = {\n height: 200\n };\n\nconst headerCard = {\n height: 30\n}\n\nexport default Selection;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/bde45157c1c091b187d7e1f2cd7ca5bb.json b/node_modules/.cache/babel-loader/bde45157c1c091b187d7e1f2cd7ca5bb.json new file mode 100644 index 0000000000000000000000000000000000000000..f47e4242942abc02d55ba2fc7cc4d17865694a56 --- /dev/null +++ b/node_modules/.cache/babel-loader/bde45157c1c091b187d7e1f2cd7ca5bb.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/Selection.js\";\nimport React, { useContext, Fragment } from 'react';\nimport ExperimentContext from '../context/experiment/experimentContext';\n\nconst Selection = () => {\n const experimentContext = useContext(ExperimentContext);\n const selection = experimentContext.selection,\n data = experimentContext.data; // const { model, branch, hpc } = experiment;\n //var currentSelection = \"Node: \"\n\n var currentNode = \"\";\n var selectedNode = null;\n\n if (selection) {\n //console.log(\"Current selection \" + selection)\n selection.map(node => // currentSelection += node + \", \"\n currentNode = node); //console.log(\"Current node \" + currentNode)\n\n selectedNode = data.nodes.find(node => node.id === currentNode); //console.log(\"Selected node\")\n //console.log(\"Data: \" + selectedNode.id + \" \" + selectedNode.platform_name)\n }\n\n return React.createElement(Fragment, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 23\n },\n __self: this\n }, selectedNode && React.createElement(Fragment, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 25\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 26\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-12\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 27\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"card text-white bg-info\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 28\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"card-header text-center py-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 29\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 30\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 30\n },\n __self: this\n }, selectedNode.id))), React.createElement(\"div\", {\n className: \"card-body py-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 32\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 33\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 34\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 34\n },\n __self: this\n }, \"Date:\"), \" \", selectedNode.date)), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"Section:\"), \" \", selectedNode.section)), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 39\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 40\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 40\n },\n __self: this\n }, \"Platform:\"), \" \", selectedNode.platform_name)), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 42\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 43\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 43\n },\n __self: this\n }, \"Priority:\"), \" \", selectedNode.priority)), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 45\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 46\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 46\n },\n __self: this\n }, \"Processors:\"), \" \", selectedNode.processors)), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 48\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 49\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 49\n },\n __self: this\n }, \"Status:\")), \" \", selectedNode.status)))))), !selectedNode && data && React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 59\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-12\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 60\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"card text-white bg-info\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 61\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"card-header text-center py-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 62\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 63\n },\n __self: this\n }, \"Here goes the Job Id\")), React.createElement(\"div\", {\n className: \"card-body\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 65\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"text-center\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 66\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 67\n },\n __self: this\n }, \"Select a Node to see more information.\")))))));\n};\n\nconst experimentStyle = {\n height: 200\n};\nexport default Selection;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/Selection.js"],"names":["React","useContext","Fragment","ExperimentContext","Selection","experimentContext","selection","data","currentNode","selectedNode","map","node","nodes","find","id","experimentStyle","date","section","platform_name","priority","processors","status","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,UAAhB,EAA4BC,QAA5B,QAA4C,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;AAAA;AAAA;AAAA,KACI;AAAK,IAAA,SAAS,EAAC,yBAAf;AAAyC,IAAA,KAAK,EAAEQ,eAAhD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACI;AAAK,IAAA,SAAS,EAAC,8BAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACI;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,4BADJ,CADJ,EAII;AAAK,IAAA,SAAS,EAAC,WAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACI;AAAK,IAAA,SAAS,EAAC,aAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,8CADA,CADJ,CAJJ,CADJ,CADJ,CApCZ,CADJ;AAyDH,CA3ED;;AA6EA,MAAMA,eAAe,GAAG;AACpBO,EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,eAAelB,SAAf","sourcesContent":["import React, { useContext, Fragment } from 'react'\nimport ExperimentContext from '../context/experiment/experimentContext';\n\nconst Selection = () => {\n const experimentContext = useContext(ExperimentContext);\n const { selection, data } = experimentContext;\n // const { model, branch, hpc } = experiment;\n //var currentSelection = \"Node: \"\n var currentNode = \"\"\n var selectedNode = null\n if (selection) {\n //console.log(\"Current selection \" + selection)\n selection.map(node => (\n // currentSelection += node + \", \"\n currentNode = node\n ));\n //console.log(\"Current node \" + currentNode)\n selectedNode = data.nodes.find(node => node.id === currentNode) \n //console.log(\"Selected node\")\n //console.log(\"Data: \" + selectedNode.id + \" \" + selectedNode.platform_name)\n } \n return (\n \n {selectedNode &&\n \n
\n
\n
\n
\n {selectedNode.id}\n
\n
\n
\n Date: {selectedNode.date}\n
\n
\n Section: {selectedNode.section}\n
\n
\n Platform: {selectedNode.platform_name}\n
\n
\n Priority: {selectedNode.priority}\n
\n
\n Processors: {selectedNode.processors}\n
\n
\n Status: {selectedNode.status}\n
\n \n
\n
\n
\n
\n
\n } \n {!selectedNode && data &&\n
\n
\n
\n
\n Here goes the Job Id\n
\n
\n
\n Select a Node to see more information. \n
\n
\n
\n
\n
\n } \n
\n \n \n\n )\n}\n\nconst experimentStyle = {\n height: 200\n };\n\nexport default Selection;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/bec867877309c5df99eec5ec0dabcff6.json b/node_modules/.cache/babel-loader/bec867877309c5df99eec5ec0dabcff6.json new file mode 100644 index 0000000000000000000000000000000000000000..3662c4597270c1eabb6e7cfdef1113d651b6548d --- /dev/null +++ b/node_modules/.cache/babel-loader/bec867877309c5df99eec5ec0dabcff6.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js\";\nimport React, { Component } from \"react\"; // import vis from \"vis-network\";\n\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis-network\";\n\nclass GraphNativeRep extends Component {\n constructor(...args) {\n super(...args);\n\n this.updateVisNodes = nodes => {\n this.props.setVisData(nodes);\n };\n }\n\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else if (nextProps.data && this.props.data && nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp) {\n console.log(\"Rerendering\");\n return true;\n } else if (nextProps.loadingGraph !== this.props.loadingGraph) {\n return true;\n } else {\n return false;\n }\n }\n\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n render() {\n if (this.props.loadingGraph) return React.createElement(Spinner, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 32\n },\n __self: this\n });\n\n if (this.props.data == null) {\n return React.createElement(\"div\", {\n className: \"card-body text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 35\n },\n __self: this\n }, React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Press \", React.createElement(\"span\", {\n className: \"badge badge-info\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Show Graph\"), \" to see the graph representation of the experiment.\"), React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"If the experiment is running, press \", React.createElement(\"span\", {\n className: \"badge badge-dark\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"Start Job Monitor\"), \" to start a live tracker of the changes on the experiment's jobs. This process will automatically update the graph's nodes colors and show a log of the detected changes.\"));\n }\n\n var nodes_array = [];\n var edges_array = [];\n\n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: {\n background: node.status_color,\n border: \"black\"\n },\n level: node.level\n }));\n this.props.data.edges.map(edge => edges_array.push({\n from: edge.from,\n to: edge.to\n }));\n }\n\n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n const options = {\n edges: {\n arrows: {\n to: {\n enabled: true\n }\n }\n },\n layout: {\n //improvedLayout: true,\n hierarchical: {\n nodeSpacing: 190,\n blockShifting: true,\n edgeMinimization: true,\n parentCentralization: true,\n sortMethod: 'hubsize',\n direction: 'UD' // work on vis current version\n // nodeSpacing: 190,\n // blockShifting: false,\n // edgeMinimization: false,\n // parentCentralization: true,\n // sortMethod: 'hubsize',\n // direction: 'UD',\n\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true\n },\n physics: {\n enabled: false\n },\n nodes: {\n shape: 'dot',\n font: {\n size: 10\n }\n }\n };\n const graph = {\n nodes: nodes,\n edges: edges\n };\n\n class VisNetwork extends Component {\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else {\n return false;\n }\n }\n\n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", params => {\n //console.log(params);\n if (params.nodes) {\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n });\n } // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n\n\n render() {\n return React.createElement(\"div\", {\n className: \"card-body p-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 140\n },\n __self: this\n }, React.createElement(\"div\", {\n ref: \"myRef\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 141\n },\n __self: this\n }));\n }\n\n }\n\n this.updateVisNodes(nodes);\n return React.createElement(VisNetwork, {\n graph: graph,\n options: options,\n updateSelection: this.props.updateSelection,\n shouldUpdateGraph: this.props.shouldUpdateGraph,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 149\n },\n __self: this\n });\n }\n\n}\n\nconst experimentStyle = {\n height: 600\n};\nexport default GraphNativeRep;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js"],"names":["React","Component","Spinner","vis","GraphNativeRep","updateVisNodes","nodes","props","setVisData","shouldComponentUpdate","nextProps","nextState","shouldUpdateGraph","data","pkl_timestamp","console","log","loadingGraph","componentWillUnmount","cleanGraphData","render","nodes_array","edges_array","edges","map","node","push","id","label","color","background","status_color","border","level","edge","from","to","DataSet","options","arrows","enabled","layout","hierarchical","nodeSpacing","blockShifting","edgeMinimization","parentCentralization","sortMethod","direction","interaction","dragNodes","hoverConnectedEdges","navigationButtons","physics","shape","font","size","graph","VisNetwork","componentDidMount","network","Network","refs","myRef","on","params","updateSelection","experimentStyle","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,SAAhB,QAAiC,OAAjC,C,CACA;;AACA,OAAOC,OAAP,MAAoB,mBAApB;AACA,OAAOC,GAAP,MAAgB,aAAhB;;AAEA,MAAMC,cAAN,SAA6BH,SAA7B,CAAuC;AAAA;AAAA;;AAAA,SAmBnCI,cAnBmC,GAmBjBC,KAAD,IAA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AIA,MAAM,CAAC3D,KAAX,EAAiB;AACb;AACA,iBAAKC,KAAL,CAAW2D,eAAX,CAA2BD,MAAM,CAAC3D,KAAlC;AACH;AAEJ,SAPD;AAQH,OApB8B,CAsB/B;AACA;AACA;AACA;;;AAEAc,MAAAA,MAAM,GAAG;AACL,eACI;AAAK,UAAA,SAAS,EAAC,eAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,WACI;AAAK,UAAA,GAAG,EAAC,OAAT;AAAiB,UAAA,KAAK,EAAE+C,eAAxB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,UADJ,CADJ;AAKH;;AAjC8B;;AAoCnC,SAAK9D,cAAL,CAAoBC,KAApB;AAEA,WAAO,oBAAC,UAAD;AACH,MAAA,KAAK,EAAEmD,KADJ;AAEH,MAAA,OAAO,EAAEnB,OAFN;AAGH,MAAA,eAAe,EAAE,KAAK/B,KAAL,CAAW2D,eAHzB;AAIH,MAAA,iBAAiB,EAAE,KAAK3D,KAAL,CAAWK,iBAJ3B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAAP;AAOH;;AAtJkC;;AAoKvC,MAAMuD,eAAe,GAAG;AACpBC,EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,eAAehE,cAAf","sourcesContent":["import React, { Component } from \"react\";\n// import vis from \"vis-network\";\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis-network\";\n\nclass GraphNativeRep extends Component {\n\n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true\n }else if (nextProps.data && this.props.data && (nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp)){\n console.log(\"Rerendering\")\n return true;\n }else if (nextProps.loadingGraph !== this.props.loadingGraph){\n return true; \n }else{\n return false;\n }\n }\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n updateVisNodes = (nodes) => {\n this.props.setVisData(nodes);\n }\n\n\n\n render () {\n if (this.props.loadingGraph) return ;\n if (this.props.data == null){\n return (\n
\n

Press Show Graph to see the graph representation of the experiment.

\n

If the experiment is running, press Start Job Monitor to start a live tracker of the changes on the experiment's jobs.\n This process will automatically update the graph's nodes colors and show a log of the detected changes.\n

\n
\n );\n }\n\n var nodes_array = [];\n var edges_array = [];\n \n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: { background: node.status_color, border: \"black\" },\n level: node.level,\n })\n );\n \n this.props.data.edges.map(edge => \n edges_array.push({ from: edge.from, to: edge.to })\n );\n }\n \n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n\n\n const options = {\n edges: {\n arrows: {\n to: { enabled: true }\n }\n },\n layout: {\n //improvedLayout: true,\n hierarchical: {\n nodeSpacing: 190,\n blockShifting: true,\n edgeMinimization: true,\n parentCentralization: true,\n sortMethod: 'hubsize',\n direction: 'UD',\n // work on vis current version\n // nodeSpacing: 190,\n // blockShifting: false,\n // edgeMinimization: false,\n // parentCentralization: true,\n // sortMethod: 'hubsize',\n // direction: 'UD',\n }\n }, \n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true,\n },\n physics: {\n enabled: false,\n },\n nodes: {\n shape: 'dot',\n font: {\n size: 10,\n },\n }\n };\n \n const graph = {\n nodes : nodes,\n edges : edges,\n };\n\n class VisNetwork extends Component {\n \n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true;\n } else {\n return false;\n }\n }\n \n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", (params) => {\n //console.log(params);\n if (params.nodes){\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n \n });\n }\n \n // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n \n render() { \n return (\n
\n
\n
\n );\n }\n }\n\n this.updateVisNodes(nodes);\n \n return ;\n\n }\n\n\n \n\n \n\n \n \n\n \n\n}\n\nconst experimentStyle = {\n height: 600\n };\n\nexport default GraphNativeRep;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/bf75032a4630aa1e2c7134bcda058e35.json b/node_modules/.cache/babel-loader/bf75032a4630aa1e2c7134bcda058e35.json new file mode 100644 index 0000000000000000000000000000000000000000..978b83388d9a0c4ba4cfcc47bd5032f13feae2bb --- /dev/null +++ b/node_modules/.cache/babel-loader/bf75032a4630aa1e2c7134bcda058e35.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/JobMonitor.js\";\nimport React, { Component } from 'react';\n\nclass JobMonitor extends Component {\n // const experimentContext = useContext(ExperimentContext);\n // const { pkldata, loadingPkl } = experimentContext;\n componentDidMount() {\n if (this.props.experiment) {\n this.props.getExperimentPkl(this.props.experiment.expid, this.props.experiment.pkl_timestamp);\n\n if (this.props.experiment.running) {\n this.interval = setInterval(() => this.props.getExperimentPkl(this.props.experiment.expid, this.props.experiment.pkl_timestamp), this.props.experiment.updateTime * 3000);\n }\n } // if (this.props.rundata){\n // console.log('DidMount Running.')\n // }\n\n }\n\n componentWillUnmount() {\n this.props.cleanPklData();\n\n if (this.props.experiment.running) {\n clearInterval(this.interval);\n }\n }\n\n render() {\n const _this$props = this.props,\n loadingPkl = _this$props.loadingPkl,\n pklchanges = _this$props.pklchanges; // if (loadingPkl) return
Loading...
\n // const currentDate = new Date();\n // const datetime = currentDate.getHours() + \":\"\n // + currentDate.getMinutes() + \":\"\n // + currentDate.getSeconds();\n // if (pklchanges) { \n // return
{pklchanges}
\n // } \n\n return React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 40\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-12\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 41\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"card\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 42\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"card-header text-center py-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 43\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 44\n },\n __self: this\n }, \"Monitoring jobs...\")), React.createElement(\"div\", {\n className: \"card-body p-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 46\n },\n __self: this\n }, pklchanges && React.createElement(\"textarea\", {\n value: pklchanges,\n className: \"monitorArea\",\n style: monitorStyle,\n readOnly: true,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 49\n },\n __self: this\n }), loadingPkl && React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 57\n },\n __self: this\n }, \"Loading...\")))));\n }\n\n}\n\nconst experimentStyle = {\n height: 400\n};\nconst monitorStyle = {\n height: 375\n};\nexport default JobMonitor;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/JobMonitor.js"],"names":["React","Component","JobMonitor","componentDidMount","props","experiment","getExperimentPkl","expid","pkl_timestamp","running","interval","setInterval","updateTime","componentWillUnmount","cleanPklData","clearInterval","render","loadingPkl","pklchanges","experimentStyle","monitorStyle","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,SAAhB,QAAiC,OAAjC;;AAEA,MAAMC,UAAN,SAAyBD,SAAzB,CAAmC;AAC/B;AACA;AACAE,EAAAA,iBAAiB,GAAE;AACf,QAAI,KAAKC,KAAL,CAAWC,UAAf,EAA2B;AACvB,WAAKD,KAAL,CAAWE,gBAAX,CAA4B,KAAKF,KAAL,CAAWC,UAAX,CAAsBE,KAAlD,EAAyD,KAAKH,KAAL,CAAWC,UAAX,CAAsBG,aAA/E;;AACA,UAAI,KAAKJ,KAAL,CAAWC,UAAX,CAAsBI,OAA1B,EAAmC;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AA;AAAA,MAHR,EAUKH,UAAU,IACX;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oBAXJ,CAJJ,CADJ,CADJ,CADJ;AAyBH;;AA7D8B;;AAiEnC,MAAME,eAAe,GAAG;AACpBE,EAAAA,MAAM,EAAE;AADY,CAAxB;AAGA,MAAMD,YAAY,GAAG;AACjBC,EAAAA,MAAM,EAAE;AADS,CAArB;AAIA,eAAenB,UAAf","sourcesContent":["import React, { Component } from 'react';\n\nclass JobMonitor extends Component {\n // const experimentContext = useContext(ExperimentContext);\n // const { pkldata, loadingPkl } = experimentContext;\n componentDidMount(){\n if (this.props.experiment) {\n this.props.getExperimentPkl(this.props.experiment.expid, this.props.experiment.pkl_timestamp);\n if (this.props.experiment.running) {\n this.interval = setInterval(() => this.props.getExperimentPkl(this.props.experiment.expid, this.props.experiment.pkl_timestamp) , this.props.experiment.updateTime * 3000);\n }\n }\n \n \n // if (this.props.rundata){\n // console.log('DidMount Running.')\n // }\n }\n\n componentWillUnmount() {\n this.props.cleanPklData();\n if (this.props.experiment.running) {\n clearInterval(this.interval);\n } \n }\n\n render() {\n const { loadingPkl, pklchanges } = this.props;\n // if (loadingPkl) return
Loading...
\n // const currentDate = new Date();\n // const datetime = currentDate.getHours() + \":\"\n // + currentDate.getMinutes() + \":\"\n // + currentDate.getSeconds();\n\n\n // if (pklchanges) { \n // return
{pklchanges}
\n // } \n return (\n
\n
\n
\n
\n Monitoring jobs...\n
\n
\n {pklchanges && \n\n \n }\n {loadingPkl &&\n Loading...}\n
\n
\n
\n \n
\n );\n }\n \n}\n\nconst experimentStyle = {\n height: 400\n };\nconst monitorStyle = {\n height: 375\n}\n\nexport default JobMonitor\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/c0577bdaea2601c0855f359585553af7.json b/node_modules/.cache/babel-loader/c0577bdaea2601c0855f359585553af7.json new file mode 100644 index 0000000000000000000000000000000000000000..f223b28d6d06e264f04b367f88738f2f77e23797 --- /dev/null +++ b/node_modules/.cache/babel-loader/c0577bdaea2601c0855f359585553af7.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js\";\nimport React, { useContext, Component } from \"react\"; // import vis from \"vis-network\";\n\nimport Spinner from \"../layout/Spinner\";\nimport ExperimentContext from '../context/experiment/experimentContext';\nimport vis from \"vis\";\n\nconst GraphNativeRep = () => {\n const experimentContext = useContext(ExperimentContext);\n const data = experimentContext.data,\n loadingGraph = experimentContext.loadingGraph,\n cleanGraphData = experimentContext.cleanGraphData,\n updateSelection = experimentContext.updateSelection;\n if (loadingGraph) return React.createElement(Spinner, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 11\n },\n __self: this\n });\n\n if (data === null) {\n return React.createElement(\"div\", {\n className: \"card-body text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 14\n },\n __self: this\n }, React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 15\n },\n __self: this\n }, \"Press \", React.createElement(\"span\", {\n className: \"badge badge-info\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 15\n },\n __self: this\n }, \"Show Graph\"), \" to see the graph representation of the experiment.\"), React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 16\n },\n __self: this\n }, \"If the experiment is running, press \", React.createElement(\"span\", {\n className: \"badge badge-dark\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 16\n },\n __self: this\n }, \"Start Job Monitor\"), \" to start a live tracker of the changes on the experiment's jobs. This process will automatically update the graph's nodes colors and show a log of the detected changes.\"));\n }\n\n var nodes_array = [];\n var edges_array = [];\n\n if (data.nodes !== null || data.edges !== null) {\n data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: {\n background: node.status_color,\n border: \"black\"\n } //level: node.priority,\n\n }));\n data.edges.map(edge => edges_array.push({\n from: edge.from,\n to: edge.to\n }));\n }\n\n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n const options = {\n edges: {\n arrows: {\n to: {\n enabled: true\n }\n }\n },\n layout: {\n improvedLayout: true,\n hierarchical: {\n nodeSpacing: 250,\n edgeMinimization: false,\n blockShifting: false,\n parentCentralization: false,\n direction: 'UD',\n sortMethod: 'directed'\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true\n },\n physics: {\n enabled: false\n },\n nodes: {\n shape: 'dot'\n }\n };\n const graph = {\n nodes: nodes,\n edges: edges\n };\n\n class VisNetwork extends Component {\n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, graph, options);\n network.on(\"click\", function (params) {\n console.log(params);\n\n if (params.nodes) {\n console.log(params.nodes);\n console.log(params.nodes[0].id);\n updateSelection(params.nodes[0].id);\n }\n });\n }\n\n componentWillUnmount() {\n cleanGraphData();\n }\n\n render() {\n return React.createElement(\"div\", {\n className: \"card-body p-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 102\n },\n __self: this\n }, React.createElement(\"div\", {\n ref: \"myRef\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 103\n },\n __self: this\n }));\n }\n\n }\n\n return React.createElement(VisNetwork, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 109\n },\n __self: this\n });\n};\n\nconst experimentStyle = {\n height: 600\n};\nexport default GraphNativeRep;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js"],"names":["React","useContext","Component","Spinner","ExperimentContext","vis","GraphNativeRep","experimentContext","data","loadingGraph","cleanGraphData","updateSelection","nodes_array","edges_array","nodes","edges","map","node","push","id","label","color","background","status_color","border","edge","from","to","DataSet","options","arrows","enabled","layout","improvedLayout","hierarchical","nodeSpacing","edgeMinimization","blockShifting","parentCentralization","direction","sortMethod","interaction","dragNodes","hoverConnectedEdges","navigationButtons","physics","shape","graph","VisNetwork","componentDidMount","network","Network","refs","myRef","on","params","console","log","componentWillUnmount","render","experimentStyle","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,UAAhB,EAA4BC,SAA5B,QAA6C,OAA7C,C,CACA;;AACA,OAAOC,OAAP,MAAoB,mBAApB;AACA,OAAOC,iBAAP,MAA8B,yCAA9B;AACA,OAAOC,GAAP,MAAgB,KAAhB;;AAEA,MAAMC,cAAc,GAAG,MAAM;AAEzB,QAAMC,iBAAiB,GAAGN,UAAU,CAACG,iBAAD,CAApC;AAFyB,QAGjBI,IAHiB,GAGuCD,iBAHvC,CAGjBC,IAHiB;AAAA,QAGXC,YAHW,GAGuCF,iBAHvC,CAGXE,YAHW;AAAA,QAGGC,cAHH,GAGuCH,iBAHvC,CAGGG,cAHH;AAAA,QAGmBC,eAHnB,GAGuCJ,iBAHvC,CAGmBI,eAHnB;AAIzB,MAAIF,YAAJ,EAAkB,OAAO,oBAAC,OAAD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAAP;;AAClB,MAAID,IAAI,KAAK,IAAb,EAAmB;AACf,WACI;AAAK,MAAA,SAAS,EAAC,qBAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,OACI;AAAG,MAAA,SAAS,EAAC,MAAb;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,iBAA0B;AAAM,MAAA,SAAS,EAAC,kBAAhB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oBAA1B,wDADJ,EAEI;AAAG,MAAA,SAAS,EAAC,MAAb;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,+CAAwD;AAAM,MAAA,SAAS,EAAC,kBAAhB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,2BAAxD,8KAFJ,CADJ;AAQH;;AAED,MAAII,WAAW,GAAG,EAAlB;AACA,MAAIC,WAAW,GAAG,EAAlB;;AAEA,MAAIL,IAAI,CAACM,KAAL,KAAe,IAAf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AA4BnC,SAAO,oBAAC,UAAD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAAP;AAEH,CAxGD;;AA0GA,MAAMA,eAAe,GAAG;AACpBC,EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,eAAevD,cAAf","sourcesContent":["import React, { useContext, Component } from \"react\";\n// import vis from \"vis-network\";\nimport Spinner from \"../layout/Spinner\";\nimport ExperimentContext from '../context/experiment/experimentContext';\nimport vis from \"vis\";\n\nconst GraphNativeRep = () => {\n\n const experimentContext = useContext(ExperimentContext); \n const { data, loadingGraph, cleanGraphData, updateSelection } = experimentContext;\n if (loadingGraph) return \n if (data === null) {\n return (\n
\n

Press Show Graph to see the graph representation of the experiment.

\n

If the experiment is running, press Start Job Monitor to start a live tracker of the changes on the experiment's jobs.\n This process will automatically update the graph's nodes colors and show a log of the detected changes.\n

\n
\n );\n }\n\n var nodes_array = [];\n var edges_array = [];\n\n if (data.nodes !== null || data.edges !== null) {\n data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: { background: node.status_color, border: \"black\" },\n //level: node.priority,\n })\n );\n \n data.edges.map(edge => \n edges_array.push({ from: edge.from, to: edge.to })\n );\n }\n\n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n\n const options = {\n edges: {\n arrows: {\n to: { enabled: true }\n }\n },\n layout: {\n improvedLayout: true,\n hierarchical: {\n \n nodeSpacing: 250,\n edgeMinimization: false,\n blockShifting: false,\n parentCentralization: false,\n direction: 'UD',\n sortMethod: 'directed',\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true,\n },\n physics: {\n enabled: false,\n },\n nodes: {\n shape: 'dot',\n }\n };\n\n const graph = {\n nodes : nodes,\n edges : edges,\n };\n \n\n class VisNetwork extends Component {\n \n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, graph, options);\n network.on(\"click\", function(params) {\n console.log(params);\n if (params.nodes){\n console.log(params.nodes);\n console.log(params.nodes[0].id);\n updateSelection(params.nodes[0].id);\n }\n \n });\n }\n\n componentWillUnmount() {\n cleanGraphData();\n }\n\n render() { \n return (\n
\n
\n
\n );\n }\n }\n\n return ;\n\n}\n\nconst experimentStyle = {\n height: 600\n };\n\nexport default GraphNativeRep;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/c45d69525607029a9395ca0a685a480a.json b/node_modules/.cache/babel-loader/c45d69525607029a9395ca0a685a480a.json new file mode 100644 index 0000000000000000000000000000000000000000..5a58bde71171c53c6336124b4d62175f6051c4d1 --- /dev/null +++ b/node_modules/.cache/babel-loader/c45d69525607029a9395ca0a685a480a.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js\";\nimport React, { Component } from \"react\"; // import vis from \"vis-network\";\n\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n constructor(...args) {\n super(...args);\n\n this.updateVisNodes = nodes => {\n this.props.setVisData(nodes);\n };\n }\n\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else if (nextProps.data && this.props.data && nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp) {\n console.log(\"Rerendering\");\n return true;\n } else if (nextProps.loadingGraph !== this.props.loadingGraph) {\n return true;\n } else {\n return false;\n }\n }\n\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n render() {\n if (this.props.loadingGraph) return React.createElement(Spinner, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 32\n },\n __self: this\n });\n\n if (this.props.data == null) {\n return React.createElement(\"div\", {\n className: \"card-body text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 35\n },\n __self: this\n }, React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Press \", React.createElement(\"span\", {\n className: \"badge badge-info\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Show Graph\"), \" to see the graph representation of the experiment.\"), React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"If the experiment is running, press \", React.createElement(\"span\", {\n className: \"badge badge-dark\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"Start Job Monitor\"), \" to start a live tracker of the changes on the experiment's jobs. This process will automatically update the graph's nodes colors and show a log of the detected changes.\"));\n }\n\n var nodes_array = [];\n var edges_array = [];\n\n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: {\n background: node.status_color,\n border: \"black\"\n },\n level: node.level\n }));\n this.props.data.edges.map(edge => edges_array.push({\n from: edge.from,\n to: edge.to\n }));\n }\n\n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n const options = {\n edges: {\n arrows: {\n to: {\n enabled: true\n }\n }\n },\n layout: {\n improvedLayout: true,\n hierarchical: {\n nodeSpacing: 190,\n //blockShifting: true,\n //edgeMinimization: true,\n //parentCentralization: true,\n sortMethod: 'hubsize',\n direction: 'UD'\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true\n },\n physics: {\n enabled: false\n },\n nodes: {\n shape: 'dot',\n font: {\n size: 10\n }\n }\n };\n const graph = {\n nodes: nodes,\n edges: edges\n };\n\n class VisNetwork extends Component {\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else {\n return false;\n }\n }\n\n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", params => {\n //console.log(params);\n if (params.nodes) {\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n });\n } // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n\n\n render() {\n return React.createElement(\"div\", {\n className: \"card-body p-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 133\n },\n __self: this\n }, React.createElement(\"div\", {\n ref: \"myRef\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 134\n },\n __self: this\n }));\n }\n\n }\n\n this.updateVisNodes(nodes);\n return React.createElement(VisNetwork, {\n graph: graph,\n options: options,\n updateSelection: this.props.updateSelection,\n shouldUpdateGraph: this.props.shouldUpdateGraph,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 142\n },\n __self: this\n });\n }\n\n}\n\nconst experimentStyle = {\n height: 600\n};\nexport default GraphNativeRep;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js"],"names":["React","Component","Spinner","vis","GraphNativeRep","updateVisNodes","nodes","props","setVisData","shouldComponentUpdate","nextProps","nextState","shouldUpdateGraph","data","pkl_timestamp","console","log","loadingGraph","componentWillUnmount","cleanGraphData","render","nodes_array","edges_array","edges","map","node","push","id","label","color","background","status_color","border","level","edge","from","to","DataSet","options","arrows","enabled","layout","improvedLayout","hierarchical","nodeSpacing","sortMethod","direction","interaction","dragNodes","hoverConnectedEdges","navigationButtons","physics","shape","font","size","graph","VisNetwork","componentDidMount","network","Network","refs","myRef","on","params","updateSelection","experimentStyle","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,SAAhB,QAAiC,OAAjC,C,CACA;;AACA,OAAOC,OAAP,MAAoB,mBAApB;AACA,OAAOC,GAAP,MAAgB,KAAhB;;AAEA,MAAMC,cAAN,SAA6BH,SAA7B,CAAuC;AAAA;AAAA;;AAAA,SAmBnCI,cAnBmC,GAmBjBC,KAAD,IAAW;AACxB,WAAKC,KAAL,CAAWC,UAAX,CAAsBF,KAAtB;AACH,KArBkC;AAAA;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,GAAG;AACL,eACI;AAAK,UAAA,SAAS,EAAC,eAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,WACI;AAAK,UAAA,GAAG,EAAC,OAAT;AAAiB,UAAA,KAAK,EAAE6C,eAAxB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,UADJ,CADJ;AAKH;;AAjC8B;;AAoCnC,SAAK5D,cAAL,CAAoBC,KAApB;AAEA,WAAO,oBAAC,UAAD;AACH,MAAA,KAAK,EAAEiD,KADJ;AAEH,MAAA,OAAO,EAAEjB,OAFN;AAGH,MAAA,eAAe,EAAE,KAAK/B,KAAL,CAAWyD,eAHzB;AAIH,MAAA,iBAAiB,EAAE,KAAKzD,KAAL,CAAWK,iBAJ3B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAAP;AAOH;;AA/IkC;;AA6JvC,MAAMqD,eAAe,GAAG;AACpBC,EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,eAAe9D,cAAf","sourcesContent":["import React, { Component } from \"react\";\n// import vis from \"vis-network\";\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n\n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true\n }else if (nextProps.data && this.props.data && (nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp)){\n console.log(\"Rerendering\")\n return true;\n }else if (nextProps.loadingGraph !== this.props.loadingGraph){\n return true; \n }else{\n return false;\n }\n }\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n updateVisNodes = (nodes) => {\n this.props.setVisData(nodes);\n }\n\n\n\n render () {\n if (this.props.loadingGraph) return ;\n if (this.props.data == null){\n return (\n
\n

Press Show Graph to see the graph representation of the experiment.

\n

If the experiment is running, press Start Job Monitor to start a live tracker of the changes on the experiment's jobs.\n This process will automatically update the graph's nodes colors and show a log of the detected changes.\n

\n
\n );\n }\n\n var nodes_array = [];\n var edges_array = [];\n \n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: { background: node.status_color, border: \"black\" },\n level: node.level,\n })\n );\n \n this.props.data.edges.map(edge => \n edges_array.push({ from: edge.from, to: edge.to })\n );\n }\n \n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n\n\n const options = {\n edges: {\n arrows: {\n to: { enabled: true }\n }\n },\n layout: {\n improvedLayout: true,\n hierarchical: {\n nodeSpacing: 190,\n //blockShifting: true,\n //edgeMinimization: true,\n //parentCentralization: true,\n sortMethod: 'hubsize',\n direction: 'UD',\n }\n }, \n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true,\n },\n physics: {\n enabled: false,\n },\n nodes: {\n shape: 'dot',\n font: {\n size: 10,\n },\n }\n };\n \n const graph = {\n nodes : nodes,\n edges : edges,\n };\n\n class VisNetwork extends Component {\n \n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true;\n } else {\n return false;\n }\n }\n \n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", (params) => {\n //console.log(params);\n if (params.nodes){\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n \n });\n }\n \n // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n \n render() { \n return (\n
\n
\n
\n );\n }\n }\n\n this.updateVisNodes(nodes);\n \n return ;\n\n }\n\n\n \n\n \n\n \n \n\n \n\n}\n\nconst experimentStyle = {\n height: 600\n };\n\nexport default GraphNativeRep;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/c58934f3f153138f0c433f9e2fe924f3.json b/node_modules/.cache/babel-loader/c58934f3f153138f0c433f9e2fe924f3.json new file mode 100644 index 0000000000000000000000000000000000000000..b6b427b320fa4a3a49b7d71ab708b375667db018 --- /dev/null +++ b/node_modules/.cache/babel-loader/c58934f3f153138f0c433f9e2fe924f3.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js\";\nimport React, { Component } from \"react\"; // import vis from \"vis-network\";\n\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n constructor(...args) {\n super(...args);\n\n this.updateVisNodes = nodes => {\n this.props.setVisData(nodes);\n };\n }\n\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else if (nextProps.data && this.props.data && nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp) {\n console.log(\"Rerendering\");\n return true;\n } else if (nextProps.loadingGraph !== this.props.loadingGraph) {\n return true;\n } else {\n return false;\n }\n }\n\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n render() {\n if (this.props.loadingGraph) return React.createElement(Spinner, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 32\n },\n __self: this\n });\n\n if (this.props.data == null) {\n return React.createElement(\"div\", {\n className: \"card-body text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 35\n },\n __self: this\n }, React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Press \", React.createElement(\"span\", {\n className: \"badge badge-info\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Show Graph\"), \" to see the graph representation of the experiment.\"), React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"If the experiment is running, press \", React.createElement(\"span\", {\n className: \"badge badge-dark\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"Start Job Monitor\"), \" to start a live tracker of the changes on the experiment's jobs. This process will automatically update the graph's nodes colors and show a log of the detected changes.\"));\n }\n\n var nodes_array = [];\n var edges_array = [];\n\n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: {\n background: node.status_color,\n border: \"black\"\n },\n level: node.level\n }));\n this.props.data.edges.map(edge => edges_array.push({\n from: edge.from,\n to: edge.to\n }));\n }\n\n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n const options = {\n edges: {\n arrows: {\n to: {\n enabled: true\n }\n }\n },\n layout: {\n improvedLayout: true,\n hierarchical: {\n nodeSpacing: 190,\n blockShifting: true,\n edgeMinimization: false,\n //parentCentralization: true,\n sortMethod: 'hubsize',\n direction: 'UD'\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true\n },\n physics: {\n enabled: false\n },\n nodes: {\n shape: 'dot',\n font: {\n size: 10\n }\n }\n };\n const graph = {\n nodes: nodes,\n edges: edges\n };\n\n class VisNetwork extends Component {\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else {\n return false;\n }\n }\n\n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", params => {\n //console.log(params);\n if (params.nodes) {\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n });\n } // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n\n\n render() {\n return React.createElement(\"div\", {\n className: \"card-body p-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 133\n },\n __self: this\n }, React.createElement(\"div\", {\n ref: \"myRef\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 134\n },\n __self: this\n }));\n }\n\n }\n\n this.updateVisNodes(nodes);\n return React.createElement(VisNetwork, {\n graph: graph,\n options: options,\n updateSelection: this.props.updateSelection,\n shouldUpdateGraph: this.props.shouldUpdateGraph,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 142\n },\n __self: this\n });\n }\n\n}\n\nconst experimentStyle = {\n height: 600\n};\nexport default GraphNativeRep;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js"],"names":["React","Component","Spinner","vis","GraphNativeRep","updateVisNodes","nodes","props","setVisData","shouldComponentUpdate","nextProps","nextState","shouldUpdateGraph","data","pkl_timestamp","console","log","loadingGraph","componentWillUnmount","cleanGraphData","render","nodes_array","edges_array","edges","map","node","push","id","label","color","background","status_color","border","level","edge","from","to","DataSet","options","arrows","enabled","layout","improvedLayout","hierarchical","nodeSpacing","blockShifting","edgeMinimization","sortMethod","direction","interaction","dragNodes","hoverConnectedEdges","navigationButtons","physics","shape","font","size","graph","VisNetwork","componentDidMount","network","Network","refs","myRef","on","params","updateSelection","experimentStyle","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,SAAhB,QAAiC,OAAjC,C,CACA;;AACA,OAAOC,OAAP,MAAoB,mBAApB;AACA,OAAOC,GAAP,MAAgB,KAAhB;;AAEA,MAAMC,cAAN,SAA6BH,SAA7B,CAAuC;AAAA;AAAA;;AAAA,SAmBnCI,cAnBmC,GAmBjBC,KAAD,IAAW;AACxB,WAAKC,KAAL,CAAWC,UAAX,CAAsBF,KAAtB;AACH,KArBkC;AAAA;;AAEnCG,EAAAA,qBAAqB,CAACC,SAAD,EAAYC,SAAZ,EAAsB;AACvC,QAAI,KAAKJ,KAAL,CAAWK,iBAAX,KAAiC,IAArC,EAA0C;AACtC,aAAO,IAAP;AACD,KAFH,MAEQ,IAAIF,SAAS,CAACG,IAAV,IAAkB,KAAKN,KAAL,CAAWM,IAA7B,IAAsCH,SAAS,CAACG,IAAV,CAAeC,aAAf,KAAiC,KAAKP,KAAL,CAAWM,IAAX,CAAgBC,aAA3F,EAA0G;AAC9GC,MAAAA,OAAO,CAACC,GAAR,CAAY,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KAAK,EAAEmD,KADJ;AAEH,MAAA,OAAO,EAAEnB,OAFN;AAGH,MAAA,eAAe,EAAE,KAAK/B,KAAL,CAAW2D,eAHzB;AAIH,MAAA,iBAAiB,EAAE,KAAK3D,KAAL,CAAWK,iBAJ3B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAAP;AAOH;;AA/IkC;;AA6JvC,MAAMuD,eAAe,GAAG;AACpBC,EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,eAAehE,cAAf","sourcesContent":["import React, { Component } from \"react\";\n// import vis from \"vis-network\";\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n\n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true\n }else if (nextProps.data && this.props.data && (nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp)){\n console.log(\"Rerendering\")\n return true;\n }else if (nextProps.loadingGraph !== this.props.loadingGraph){\n return true; \n }else{\n return false;\n }\n }\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n updateVisNodes = (nodes) => {\n this.props.setVisData(nodes);\n }\n\n\n\n render () {\n if (this.props.loadingGraph) return ;\n if (this.props.data == null){\n return (\n
\n

Press Show Graph to see the graph representation of the experiment.

\n

If the experiment is running, press Start Job Monitor to start a live tracker of the changes on the experiment's jobs.\n This process will automatically update the graph's nodes colors and show a log of the detected changes.\n

\n
\n );\n }\n\n var nodes_array = [];\n var edges_array = [];\n \n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: { background: node.status_color, border: \"black\" },\n level: node.level,\n })\n );\n \n this.props.data.edges.map(edge => \n edges_array.push({ from: edge.from, to: edge.to })\n );\n }\n \n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n\n\n const options = {\n edges: {\n arrows: {\n to: { enabled: true }\n }\n },\n layout: {\n improvedLayout: true,\n hierarchical: {\n nodeSpacing: 190,\n blockShifting: true,\n edgeMinimization: false,\n //parentCentralization: true,\n sortMethod: 'hubsize',\n direction: 'UD',\n }\n }, \n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true,\n },\n physics: {\n enabled: false,\n },\n nodes: {\n shape: 'dot',\n font: {\n size: 10,\n },\n }\n };\n \n const graph = {\n nodes : nodes,\n edges : edges,\n };\n\n class VisNetwork extends Component {\n \n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true;\n } else {\n return false;\n }\n }\n \n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", (params) => {\n //console.log(params);\n if (params.nodes){\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n \n });\n }\n \n // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n \n render() { \n return (\n
\n
\n
\n );\n }\n }\n\n this.updateVisNodes(nodes);\n \n return ;\n\n }\n\n\n \n\n \n\n \n \n\n \n\n}\n\nconst experimentStyle = {\n height: 600\n };\n\nexport default GraphNativeRep;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/c5c1a5920dd15f67d541fb4adfbf2ef0.json b/node_modules/.cache/babel-loader/c5c1a5920dd15f67d541fb4adfbf2ef0.json new file mode 100644 index 0000000000000000000000000000000000000000..9dae8e8d399b4d7a194ef16217c632290d447a6c --- /dev/null +++ b/node_modules/.cache/babel-loader/c5c1a5920dd15f67d541fb4adfbf2ef0.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js\";\nimport React, { Component, useContext } from \"react\"; // import vis from \"vis-network\";\n\nimport Spinner from \"../layout/Spinner\";\nimport ExperimentContext from '../context/experiment/experimentContext';\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n constructor(props) {\n super(props);\n var experimentContext = useContext(ExperimentContext);\n const cleanGraphData = experimentContext.cleanGraphData;\n }\n\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else if (nextProps.data && this.props.data && nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp) {\n console.log(\"Rerendering\");\n return true;\n } else if (nextProps.loadingGraph !== this.props.loadingGraph) {\n return true;\n } else {\n return false;\n }\n }\n\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.cleanGraphData();\n }\n\n render() {\n if (this.props.loadingGraph) return React.createElement(Spinner, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n });\n\n if (this.props.data == null) {\n return React.createElement(\"div\", {\n className: \"card-body text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 39\n },\n __self: this\n }, React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 40\n },\n __self: this\n }, \"Press \", React.createElement(\"span\", {\n className: \"badge badge-info\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 40\n },\n __self: this\n }, \"Show Graph\"), \" to see the graph representation of the experiment.\"), React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 41\n },\n __self: this\n }, \"If the experiment is running, press \", React.createElement(\"span\", {\n className: \"badge badge-dark\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 41\n },\n __self: this\n }, \"Start Job Monitor\"), \" to start a live tracker of the changes on the experiment's jobs. This process will automatically update the graph's nodes colors and show a log of the detected changes.\"));\n }\n\n var nodes_array = [];\n var edges_array = [];\n\n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: {\n background: node.status_color,\n border: \"black\"\n } //level: node.priority,\n\n }));\n this.props.data.edges.map(edge => edges_array.push({\n from: edge.from,\n to: edge.to\n }));\n }\n\n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n const options = {\n edges: {\n arrows: {\n to: {\n enabled: true\n }\n }\n },\n layout: {\n improvedLayout: true,\n hierarchical: {\n nodeSpacing: 250,\n edgeMinimization: false,\n blockShifting: false,\n parentCentralization: false,\n direction: 'UD',\n sortMethod: 'directed'\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true\n },\n physics: {\n enabled: false\n },\n nodes: {\n shape: 'dot'\n }\n };\n const graph = {\n nodes: nodes,\n edges: edges\n };\n\n class VisNetwork extends Component {\n // shouldComponentUpdate(nextProps, nextState){ \n // if (nextProps.loadingGraph !== this.props.loadingGraph){\n // return true; \n // }else{\n // return false;\n // }\n // }\n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", params => {\n console.log(params);\n\n if (params.nodes) {\n console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n });\n }\n\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n render() {\n return React.createElement(\"div\", {\n className: \"card-body p-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 134\n },\n __self: this\n }, React.createElement(\"div\", {\n ref: \"myRef\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 135\n },\n __self: this\n }));\n }\n\n }\n\n return React.createElement(VisNetwork, {\n graph: graph,\n options: options,\n updateSelection: this.props.updateSelection,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 141\n },\n __self: this\n });\n }\n\n}\n\nconst experimentStyle = {\n height: 600\n};\nexport default GraphNativeRep;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js"],"names":["React","Component","useContext","Spinner","ExperimentContext","vis","GraphNativeRep","constructor","props","experimentContext","cleanGraphData","shouldComponentUpdate","nextProps","nextState","shouldUpdateGraph","data","pkl_timestamp","console","log","loadingGraph","componentWillUnmount","render","nodes_array","edges_array","nodes","edges","map","node","push","id","label","color","background","status_color","border","edge","from","to","DataSet","options","arrows","enabled","layout","improvedLayout","hierarchical","nodeSpacing","edgeMinimization","blockShifting","parentCentralization","direction","sortMethod","interaction","dragNodes","hoverConnectedEdges","navigationButtons","physics","shape","graph","VisNetwork","componentDidMount","network","Network","refs","myRef","on","params","updateSelection","experimentStyle","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,SAAhB,EAA2BC,UAA3B,QAA6C,OAA7C,C,CACA;;AACA,OAAOC,OAAP,MAAoB,mBAApB;AACA,OAAOC,iBAAP,MAA8B,yCAA9B;AACA,OAAOC,GAAP,MAAgB,KAAhB;;AAEA,MAAMC,cAAN,SAA6BL,SAA7B,CAAuC;AAEnCM,EAAAA,WAAW,CAACC,KAAD,EAAQ;AACf,UAAMA,KAAN;AACA,QAAIC,iBAAiB,GAAGP,UAAU,CAACE,iBAAD,CAAlC;AAFe,UAGPM,cAHO,GAGYD,iBAHZ,CAGPC,cAHO;AAIlB;;AAEDC,EAAAA,qBAAqB,CAACC,SAAD,EAAYC,SAAZ,EAAsB;AAEvC,QAAI,KAAKL,KAAL,CAAWM,iBAAX,KAAiC,IAArC,EAA0C;AACxC,aAAO,IAAP;AACD,KAFD,MAEM,IAAIF,SAAS,CAACG,IAAV,IAAkB,KAAKP,KAAL,CAAWO,IAA7B,IAAsCH,SAAS,CAACG,IAAV,CAAeC,aAAf,KAAiC,KAAKR,KAAL,CAAWO,IAAX,CAAgBC,aAA3F,EAA0G;AAC9GC,MAAAA,OAAO,CAACC,GAAR,CAAY,aAAZ;AACA,aAAO,IAAP;AACD,KAHK,MAGA,IAAIN,SAAS,CAACO,YAAV,KAA2B,KAAKX,KAAL,CAAWW,YAA1C,EAAuD;AAC3D,aAAO,IAAP;AACD,KAFK,MAED;AACH,aAAO,KAAP;AACD;AACJ;;AACDC,EAAAA,oBAAoB,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Context } from \"react\";\n// import vis from \"vis-network\";\nimport Spinner from \"../layout/Spinner\";\nimport ExperimentContext from '../context/experiment/experimentContext';\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n\n constructor(props) {\n super(props);\n var experimentContext = useContext(ExperimentContext);\n const { cleanGraphData } = experimentContext;\n }\n\n shouldComponentUpdate(nextProps, nextState){ \n \n if (this.props.shouldUpdateGraph === true){\n return true\n }else if (nextProps.data && this.props.data && (nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp)){\n console.log(\"Rerendering\")\n return true;\n }else if (nextProps.loadingGraph !== this.props.loadingGraph){\n return true; \n }else{\n return false;\n }\n }\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.cleanGraphData();\n }\n\n\n\n render() {\n if (this.props.loadingGraph) return ;\n if (this.props.data == null){\n return (\n
\n

Press Show Graph to see the graph representation of the experiment.

\n

If the experiment is running, press Start Job Monitor to start a live tracker of the changes on the experiment's jobs.\n This process will automatically update the graph's nodes colors and show a log of the detected changes.\n

\n
\n );\n }\n\n var nodes_array = [];\n var edges_array = [];\n \n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: { background: node.status_color, border: \"black\" },\n //level: node.priority,\n })\n );\n \n this.props.data.edges.map(edge => \n edges_array.push({ from: edge.from, to: edge.to })\n );\n }\n \n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n\n const options = {\n edges: {\n arrows: {\n to: { enabled: true }\n }\n },\n layout: {\n improvedLayout: true,\n hierarchical: {\n \n nodeSpacing: 250,\n edgeMinimization: false,\n blockShifting: false,\n parentCentralization: false,\n direction: 'UD',\n sortMethod: 'directed',\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true,\n },\n physics: {\n enabled: false,\n },\n nodes: {\n shape: 'dot',\n }\n };\n \n const graph = {\n nodes : nodes,\n edges : edges,\n };\n\n class VisNetwork extends Component {\n \n // shouldComponentUpdate(nextProps, nextState){ \n // if (nextProps.loadingGraph !== this.props.loadingGraph){\n // return true; \n // }else{\n // return false;\n // }\n // }\n \n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", (params) => {\n console.log(params);\n if (params.nodes){\n console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n \n });\n }\n \n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n \n render() { \n return (\n
\n
\n
\n );\n }\n }\n \n return ;\n\n }\n\n\n \n\n \n\n \n \n\n \n\n}\n\nconst experimentStyle = {\n height: 600\n };\n\nexport default GraphNativeRep;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/c786c844576eaa6b53865551a87352cb.json b/node_modules/.cache/babel-loader/c786c844576eaa6b53865551a87352cb.json new file mode 100644 index 0000000000000000000000000000000000000000..03a894973916b94ef463bdd2224db6c6a7edd0ec --- /dev/null +++ b/node_modules/.cache/babel-loader/c786c844576eaa6b53865551a87352cb.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js\";\nimport React, { Component } from \"react\"; // import vis from \"vis-network\";\n\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n constructor(...args) {\n super(...args);\n\n this.updateVisNodes = nodes => {\n this.props.setVisData(nodes);\n };\n }\n\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else if (nextProps.data && this.props.data && nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp) {\n console.log(\"Rerendering\");\n return true;\n } else if (nextProps.loadingGraph !== this.props.loadingGraph) {\n return true;\n } else {\n return false;\n }\n }\n\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n render() {\n if (this.props.loadingGraph) return React.createElement(Spinner, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 32\n },\n __self: this\n });\n\n if (this.props.data == null) {\n return React.createElement(\"div\", {\n className: \"card-body text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 35\n },\n __self: this\n }, React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Press \", React.createElement(\"span\", {\n className: \"badge badge-info\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Show Graph\"), \" to see the graph representation of the experiment.\"), React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"If the experiment is running, press \", React.createElement(\"span\", {\n className: \"badge badge-dark\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"Start Job Monitor\"), \" to start a live tracker of the changes on the experiment's jobs. This process will automatically update the graph's nodes colors and show a log of the detected changes.\"));\n }\n\n var nodes_array = [];\n var edges_array = [];\n\n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: {\n background: node.status_color,\n border: \"black\"\n },\n level: node.level\n }));\n this.props.data.edges.map(edge => edges_array.push({\n from: edge.from,\n to: edge.to\n }));\n }\n\n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n const options = {\n edges: {\n arrows: {\n to: {\n enabled: true\n }\n }\n },\n layout: {\n //improvedLayout: true,\n hierarchical: {\n // enabled: true,\n levelSeparation: 150,\n treeSpacing: 200,\n nodeSpacing: 250,\n // blockShifting: true,\n // edgeMinimization: true,\n parentCentralization: true,\n direction: 'UD'\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true\n },\n physics: {\n enabled: false\n },\n nodes: {\n shape: 'dot'\n }\n };\n const graph = {\n nodes: nodes,\n edges: edges\n };\n\n class VisNetwork extends Component {\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else {\n return false;\n }\n }\n\n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", params => {\n //console.log(params);\n if (params.nodes) {\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n });\n } // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n\n\n render() {\n return React.createElement(\"div\", {\n className: \"card-body p-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 132\n },\n __self: this\n }, React.createElement(\"div\", {\n ref: \"myRef\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 133\n },\n __self: this\n }));\n }\n\n }\n\n this.updateVisNodes(nodes);\n return React.createElement(VisNetwork, {\n graph: graph,\n options: options,\n updateSelection: this.props.updateSelection,\n shouldUpdateGraph: this.props.shouldUpdateGraph,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 141\n },\n __self: this\n });\n }\n\n}\n\nconst experimentStyle = {\n height: 600\n};\nexport default GraphNativeRep;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js"],"names":["React","Component","Spinner","vis","GraphNativeRep","updateVisNodes","nodes","props","setVisData","shouldComponentUpdate","nextProps","nextState","shouldUpdateGraph","data","pkl_timestamp","console","log","loadingGraph","componentWillUnmount","cleanGraphData","render","nodes_array","edges_array","edges","map","node","push","id","label","color","background","status_color","border","level","edge","from","to","DataSet","options","arrows","enabled","layout","hierarchical","levelSeparation","treeSpacing","nodeSpacing","parentCentralization","direction","interaction","dragNodes","hoverConnectedEdges","navigationButtons","physics","shape","graph","VisNetwork","componentDidMount","network","Network","refs","myRef","on","params","updateSelection","experimentStyle","height"],"mappings":";AAAA,OAAOA,KAAP,I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;AACAmB,QAAAA,OAAO,CAACI,EAAR,CAAW,OAAX,EAAqBC,MAAD,IAAY;AAC5B;AACA,cAAIA,MAAM,CAACxD,KAAX,EAAiB;AACb;AACA,iBAAKC,KAAL,CAAWwD,eAAX,CAA2BD,MAAM,CAACxD,KAAlC;AACH;AAEJ,SAPD;AAQH,OApB8B,CAsB/B;AACA;AACA;AACA;;;AAEAc,MAAAA,MAAM,GAAG;AACL,eACI;AAAK,UAAA,SAAS,EAAC,eAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,WACI;AAAK,UAAA,GAAG,EAAC,OAAT;AAAiB,UAAA,KAAK,EAAE4C,eAAxB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,UADJ,CADJ;AAKH;;AAjC8B;;AAoCnC,SAAK3D,cAAL,CAAoBC,KAApB;AAEA,WAAO,oBAAC,UAAD;AACH,MAAA,KAAK,EAAEgD,KADJ;AAEH,MAAA,OAAO,EAAEhB,OAFN;AAGH,MAAA,eAAe,EAAE,KAAK/B,KAAL,CAAWwD,eAHzB;AAIH,MAAA,iBAAiB,EAAE,KAAKxD,KAAL,CAAWK,iBAJ3B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAAP;AAOH;;AA9IkC;;AA4JvC,MAAMoD,eAAe,GAAG;AACpBC,EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,eAAe7D,cAAf","sourcesContent":["import React, { Component } from \"react\";\n// import vis from \"vis-network\";\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n\n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true\n }else if (nextProps.data && this.props.data && (nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp)){\n console.log(\"Rerendering\")\n return true;\n }else if (nextProps.loadingGraph !== this.props.loadingGraph){\n return true; \n }else{\n return false;\n }\n }\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n updateVisNodes = (nodes) => {\n this.props.setVisData(nodes);\n }\n\n\n\n render () {\n if (this.props.loadingGraph) return ;\n if (this.props.data == null){\n return (\n
\n

Press Show Graph to see the graph representation of the experiment.

\n

If the experiment is running, press Start Job Monitor to start a live tracker of the changes on the experiment's jobs.\n This process will automatically update the graph's nodes colors and show a log of the detected changes.\n

\n
\n );\n }\n\n var nodes_array = [];\n var edges_array = [];\n \n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: { background: node.status_color, border: \"black\" },\n level: node.level,\n })\n );\n \n this.props.data.edges.map(edge => \n edges_array.push({ from: edge.from, to: edge.to })\n );\n }\n \n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n\n\n const options = {\n edges: {\n arrows: {\n to: { enabled: true }\n }\n },\n layout: {\n //improvedLayout: true,\n hierarchical: {\n // enabled: true,\n levelSeparation: 150,\n treeSpacing: 200,\n nodeSpacing: 250,\n // blockShifting: true,\n // edgeMinimization: true,\n parentCentralization: true,\n direction: 'UD',\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true,\n },\n physics: {\n enabled: false,\n },\n nodes: {\n shape: 'dot',\n }\n };\n \n const graph = {\n nodes : nodes,\n edges : edges,\n };\n\n class VisNetwork extends Component {\n \n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true;\n } else {\n return false;\n }\n }\n \n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", (params) => {\n //console.log(params);\n if (params.nodes){\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n \n });\n }\n \n // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n \n render() { \n return (\n
\n
\n
\n );\n }\n }\n\n this.updateVisNodes(nodes);\n \n return ;\n\n }\n\n\n \n\n \n\n \n \n\n \n\n}\n\nconst experimentStyle = {\n height: 600\n };\n\nexport default GraphNativeRep;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/ca14a2b1cbc408145a284ce864c96ff7.json b/node_modules/.cache/babel-loader/ca14a2b1cbc408145a284ce864c96ff7.json new file mode 100644 index 0000000000000000000000000000000000000000..84363253dda7847e14ed8f3b69085b783082db0b --- /dev/null +++ b/node_modules/.cache/babel-loader/ca14a2b1cbc408145a284ce864c96ff7.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js\";\nimport React, { Component } from \"react\"; // import vis from \"vis-network\";\n\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n constructor(...args) {\n super(...args);\n\n this.updateVisNodes = nodes => {\n this.props.setVisData(nodes);\n };\n }\n\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else if (nextProps.data && this.props.data && nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp) {\n console.log(\"Rerendering\");\n return true;\n } else if (nextProps.loadingGraph !== this.props.loadingGraph) {\n return true;\n } else {\n return false;\n }\n }\n\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n render() {\n if (this.props.loadingGraph) return React.createElement(Spinner, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 32\n },\n __self: this\n });\n\n if (this.props.data == null) {\n return React.createElement(\"div\", {\n className: \"card-body text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 35\n },\n __self: this\n }, React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Press \", React.createElement(\"span\", {\n className: \"badge badge-info\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Show Graph\"), \" to see the graph representation of the experiment.\"), React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"If the experiment is running, press \", React.createElement(\"span\", {\n className: \"badge badge-dark\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"Start Job Monitor\"), \" to start a live tracker of the changes on the experiment's jobs. This process will automatically update the graph's nodes colors and show a log of the detected changes.\"));\n }\n\n var nodes_array = [];\n var edges_array = [];\n\n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: {\n background: node.status_color,\n border: \"black\"\n },\n level: node.level\n }));\n this.props.data.edges.map(edge => edges_array.push({\n from: edge.from,\n to: edge.to\n }));\n }\n\n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n const options = {\n edges: {\n arrows: {\n to: {\n enabled: true\n }\n }\n },\n layout: {\n //improvedLayout: true,\n hierarchical: {\n // enabled: true,\n nodeSpacing: 250,\n treeSpacing: 200,\n blockShifting: false,\n edgeMinimization: true,\n parentCentralization: true,\n direction: 'UD' //sortMethod: 'directed',\n\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true\n },\n physics: {\n enabled: false\n },\n nodes: {\n shape: 'dot'\n }\n };\n const graph = {\n nodes: nodes,\n edges: edges\n };\n\n class VisNetwork extends Component {\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else {\n return false;\n }\n }\n\n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", params => {\n //console.log(params);\n if (params.nodes) {\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n });\n } // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n\n\n render() {\n return React.createElement(\"div\", {\n className: \"card-body p-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 132\n },\n __self: this\n }, React.createElement(\"div\", {\n ref: \"myRef\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 133\n },\n __self: this\n }));\n }\n\n }\n\n this.updateVisNodes(nodes);\n return React.createElement(VisNetwork, {\n graph: graph,\n options: options,\n updateSelection: this.props.updateSelection,\n shouldUpdateGraph: this.props.shouldUpdateGraph,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 141\n },\n __self: this\n });\n }\n\n}\n\nconst experimentStyle = {\n height: 600\n};\nexport default GraphNativeRep;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js"],"names":["React","Component","Spinner","vis","GraphNativeRep","updateVisNodes","nodes","props","setVisData","shouldComponentUpdate","nextProps","nextState","shouldUpdateGraph","data","pkl_timestamp","console","log","loadingGraph","componentWillUnmount","cleanGraphData","render","nodes_array","edges_array","edges","map","node","push","id","label","color","background","status_color","border","level","edge","from","to","DataSet","options","arrows","enabled","layout","hierarchical","nodeSpacing","treeSpacing","blockShifting","edgeMinimization","parentCentralization","direction","interaction","dragNodes","hoverConnectedEdges","navigationButtons","physics","shape","graph","VisNetwork","componentDidMount","network","Network","refs","myRef","on","params","updateSelection","experimentStyle","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,SAAhB,QAAiC,OAAjC,C,CACA;;AACA,OAAOC,OAAP,MAAoB,mBAApB;AACA,OAAOC,GAAP,MAAgB,KAAhB;;AAEA,MAAMC,cAAN,SAA6BH,SAA7B,CAAuC;AAAA;AAAA;;AAAA,SAmBnCI,cAnBmC,GAmBjBC,KAAD,IAAW;AACxB,WAAKC,KAAL,CAAWC,UAAX,CAAsBF,KAAtB;AACH,KArBkC;AAAA;;AAEnCG,EAAAA,qBAAqB,CAACC,SAAD,EAAYC,SAAZ,EAAsB;AACvC,QAAI,KAAKJ,KAAL,CAAWK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AAAA;AAAA,WACI;AAAK,UAAA,GAAG,EAAC,OAAT;AAAiB,UAAA,KAAK,EAAE6C,eAAxB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,UADJ,CADJ;AAKH;;AAjC8B;;AAoCnC,SAAK5D,cAAL,CAAoBC,KAApB;AAEA,WAAO,oBAAC,UAAD;AACH,MAAA,KAAK,EAAEiD,KADJ;AAEH,MAAA,OAAO,EAAEjB,OAFN;AAGH,MAAA,eAAe,EAAE,KAAK/B,KAAL,CAAWyD,eAHzB;AAIH,MAAA,iBAAiB,EAAE,KAAKzD,KAAL,CAAWK,iBAJ3B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAAP;AAOH;;AA9IkC;;AA4JvC,MAAMqD,eAAe,GAAG;AACpBC,EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,eAAe9D,cAAf","sourcesContent":["import React, { Component } from \"react\";\n// import vis from \"vis-network\";\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n\n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true\n }else if (nextProps.data && this.props.data && (nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp)){\n console.log(\"Rerendering\")\n return true;\n }else if (nextProps.loadingGraph !== this.props.loadingGraph){\n return true; \n }else{\n return false;\n }\n }\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n updateVisNodes = (nodes) => {\n this.props.setVisData(nodes);\n }\n\n\n\n render () {\n if (this.props.loadingGraph) return ;\n if (this.props.data == null){\n return (\n
\n

Press Show Graph to see the graph representation of the experiment.

\n

If the experiment is running, press Start Job Monitor to start a live tracker of the changes on the experiment's jobs.\n This process will automatically update the graph's nodes colors and show a log of the detected changes.\n

\n
\n );\n }\n\n var nodes_array = [];\n var edges_array = [];\n \n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: { background: node.status_color, border: \"black\" },\n level: node.level,\n })\n );\n \n this.props.data.edges.map(edge => \n edges_array.push({ from: edge.from, to: edge.to })\n );\n }\n \n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n\n\n const options = {\n edges: {\n arrows: {\n to: { enabled: true }\n }\n },\n layout: {\n //improvedLayout: true,\n hierarchical: {\n // enabled: true,\n nodeSpacing: 250,\n treeSpacing: 200,\n blockShifting: false,\n edgeMinimization: true,\n parentCentralization: true,\n direction: 'UD',\n //sortMethod: 'directed',\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true,\n },\n physics: {\n enabled: false,\n },\n nodes: {\n shape: 'dot',\n }\n };\n \n const graph = {\n nodes : nodes,\n edges : edges,\n };\n\n class VisNetwork extends Component {\n \n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true;\n } else {\n return false;\n }\n }\n \n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", (params) => {\n //console.log(params);\n if (params.nodes){\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n \n });\n }\n \n // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n \n render() { \n return (\n
\n
\n
\n );\n }\n }\n\n this.updateVisNodes(nodes);\n \n return ;\n\n }\n\n\n \n\n \n\n \n \n\n \n\n}\n\nconst experimentStyle = {\n height: 600\n };\n\nexport default GraphNativeRep;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/ca4d4b235d23969297f56a6f141caa34.json b/node_modules/.cache/babel-loader/ca4d4b235d23969297f56a6f141caa34.json new file mode 100644 index 0000000000000000000000000000000000000000..c8fba59e967f73301ea178089426087878e17f94 --- /dev/null +++ b/node_modules/.cache/babel-loader/ca4d4b235d23969297f56a6f141caa34.json @@ -0,0 +1 @@ +{"ast":null,"code":"import _slicedToArray from \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/node_modules/@babel/runtime/helpers/esm/slicedToArray\";\nvar _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/context/experiment/ExperimentState.js\";\nimport React, { useReducer } from 'react';\nimport axios from 'axios';\nimport ExperimentContext from './experimentContext';\nimport ExperimentReducer from './experimentReducer';\nimport { SEARCH_EXPERIMENTS, SET_LOADING, CLEAR_EXPERIMENTS, GET_EXPERIMENT, GET_GRAPH, SET_LOADING_GRAPH, CLEAN_GRAPH_DATA, UPDATE_SELECTION, GET_EXPERIMENT_RUN, SET_LOADING_RUN, CLEAN_RUN_DATA, SET_AUTOUPDATE_RUN, GET_PKL_DATA, SET_LOADING_PKL, UPDATE_NODES, SHOULD_UPDATE_GRAPH, SET_AUTOUPDATE_PKL, CLEAN_PKL_DATA, SET_PKL_CHANGES, UPDATE_EXPERIMENT_TS, SET_VIS_DATA } from '../types';\n\nconst ExperimentState = props => {\n const initialState = {\n experiments: [],\n experiment: {},\n loading: false,\n data: null,\n rundata: null,\n pkldata: null,\n pklchanges: null,\n loadingGraph: false,\n loadingRun: false,\n loadingPkl: false,\n selection: null,\n enabledGraphSearch: true,\n startAutoUpdateRun: false,\n startAutoUpdatePkl: false,\n shouldUpdateGraph: false,\n visNodes: null\n };\n\n const _useReducer = useReducer(ExperimentReducer, initialState),\n _useReducer2 = _slicedToArray(_useReducer, 2),\n state = _useReducer2[0],\n dispatch = _useReducer2[1]; // Search Experiments\n\n\n const searchExperiments = async text => {\n setLoading();\n const res = await axios.get(\"http://84.88.185.30:8888/search/\".concat(text));\n dispatch({\n type: SEARCH_EXPERIMENTS,\n payload: res.data.experiment\n });\n }; // Get Experiment\n\n\n const getExperiment = async expid => {\n setLoading(); //cleanGraphData();\n\n const res = await axios.get(\"http://84.88.185.30:8888/expinfo/\".concat(expid));\n dispatch({\n type: GET_EXPERIMENT,\n payload: res.data\n });\n }; // Get Experiment Graph\n\n\n const getExperimentGraph = async expid => {\n setLoadingGraph();\n const res = await axios.get(\"http://84.88.185.30:8888/graph/\".concat(expid));\n console.log(res.data);\n dispatch({\n type: GET_GRAPH,\n payload: res.data\n }); //this.setState({ data: res.data, loading: false, showGraph: !res.data.error });\n }; // Get Experiment Run\n\n\n const getExperimentRun = async expid => {\n setLoadingRun();\n const res = await axios.get(\"http://84.88.185.30:8888/exprun/\".concat(expid));\n console.log(res.data);\n dispatch({\n type: GET_EXPERIMENT_RUN,\n payload: res.data\n });\n }; // Get Experiment Pkl Data\n\n\n const getExperimentPkl = async () => {\n setLoadingPkl(); //timeStamp = 1000;\n\n const res = await axios.get(\"http://84.88.185.30:8888/pklinfo/\".concat(state.experiment.expid, \"/\").concat((state, experiment.pkl_timestamp)));\n console.log(res.data); // const actualPkl = res.data;\n\n let retrievedPkl = null;\n var jobs = {};\n var colorChanges = {};\n var changes = \"\";\n retrievedPkl = res.data;\n\n if (state.data !== null && retrievedPkl.has_changed === true && retrievedPkl.pkl_content.length > 0) {\n //console.log(retrievedPkl.pkl_content.length);\n for (var j = 0, job; j < retrievedPkl.pkl_content.length; j++) {\n job = retrievedPkl.pkl_content[j]; //console.log(job);\n\n jobs[job.name] = job; //console.log(jobs[job.name]);\n }\n\n let requireUpdate = false;\n console.log('Current ts: ' + state.data.pkl_timestamp);\n var newData = state.data; //console.log(newData.nodes);\n\n var expData = state.experiment;\n\n if (newData.nodes) {\n for (var i = 0; i < newData.nodes.length; i++) {\n // console.log(newNodes[i].id);\n //console.log(newData.nodes[i]);\n // console.log(jobs[ newNodes[i].id ]);\n if (newData.nodes[i].status_code !== jobs[newData.nodes[i].id].status_code) {\n // changes += newData.nodes[i].id + \" from \" + newData.nodes[i].status + \" to \" + jobs[ newData.nodes[i].id ].status + \" || \";\n changes += timeStampToDate(retrievedPkl.pkl_timestamp) + \": \" + newData.nodes[i].id + \" to \" + jobs[newData.nodes[i].id].status + \"\\n\";\n newData.nodes[i].status_code = jobs[newData.nodes[i].id].status_code;\n newData.nodes[i].status_color = jobs[newData.nodes[i].id].status_color;\n newData.nodes[i].status = jobs[newData.nodes[i].id].status; //console.log(newData.nodes[i].status_color)\n\n colorChanges[newData.nodes[i].id] = jobs[newData.nodes[i].id].status_color;\n requireUpdate = true;\n }\n }\n\n if (requireUpdate) {\n // console.log(newData.pkl_timestamp);\n // console.log(expData.pkl_timestamp);\n console.log(\"New ts: \" + retrievedPkl.pkl_timestamp);\n newData.pkl_timestamp = retrievedPkl.pkl_timestamp;\n expData.pkl_timestamp = retrievedPkl.pkl_timestamp; // console.log(newData.pkl_timestamp);\n // console.log(expData.pkl_timestamp);\n // console.log('Call Update');\n\n updateNodes(newData);\n updateExperimentTimeStamp(expData); // setUpdateGraph(true);\n // setUpdateGraph(false);\n\n if (state.pklchanges) {\n setPklChanges(changes + state.pklchanges);\n } else {\n setPklChanges(changes);\n }\n\n for (var key in colorChanges) {\n //console.log( key, colorChanges[key] );\n updateGraphColor(key, colorChanges[key]);\n }\n } else {\n console.log('No changes but updating pkl anyway.');\n expData.pkl_timestamp = retrievedPkl.pkl_timestamp;\n updateExperimentTimeStamp(expData);\n }\n }\n } // } else {\n // var t = new Date( retrievedPkl.pkl_timestamp );\n // var formatted = t.toISOString();\n // setPklChanges(\"No news yet... \" + formatted)\n // }\n\n\n dispatch({\n type: GET_PKL_DATA,\n payload: res.data\n });\n };\n\n const updateGraphColor = (idChange, newColor) => {\n state.visNodes.update({\n id: idChange,\n color: {\n background: newColor\n }\n });\n }; // Cleaning\n\n\n const clearExperiments = () => dispatch({\n type: CLEAR_EXPERIMENTS\n });\n\n const cleanGraphData = () => dispatch({\n type: CLEAN_GRAPH_DATA\n });\n\n const cleanRunData = () => dispatch({\n type: CLEAN_RUN_DATA\n });\n\n const cleanPklData = () => dispatch({\n type: CLEAN_PKL_DATA\n }); // Set Loading\n\n\n const setLoading = () => dispatch({\n type: SET_LOADING\n });\n\n const setLoadingGraph = () => dispatch({\n type: SET_LOADING_GRAPH\n });\n\n const setLoadingRun = () => dispatch({\n type: SET_LOADING_RUN\n });\n\n const setLoadingPkl = () => dispatch({\n type: SET_LOADING_PKL\n }); // Action Things\n\n\n const updateSelection = currentSelection => dispatch({\n type: UPDATE_SELECTION,\n payload: currentSelection\n });\n\n const updateNodes = newdata => dispatch({\n type: UPDATE_NODES,\n payload: newdata\n });\n\n const updateExperimentTimeStamp = newExperiment => dispatch({\n type: UPDATE_EXPERIMENT_TS,\n payload: newExperiment\n });\n\n const setAutoUpdateRun = value => dispatch({\n type: SET_AUTOUPDATE_RUN,\n payload: value\n });\n\n const setAutoUpdatePkl = value => dispatch({\n type: SET_AUTOUPDATE_PKL,\n payload: value\n });\n\n const setUpdateGraph = value => dispatch({\n type: SHOULD_UPDATE_GRAPH,\n payload: value\n });\n\n const setPklChanges = value => dispatch({\n type: SET_PKL_CHANGES,\n payload: value\n });\n\n const setVisData = value => dispatch({\n type: SET_VIS_DATA,\n payload: value\n }); // Other Utils\n\n\n const hashCode = value => {\n var hash = 0,\n i,\n chr;\n if (value.length === 0) return hash;\n\n for (i = 0; i < value.length; i++) {\n chr = value.charCodeAt(i);\n hash = (hash << 5) - hash + chr;\n hash |= 0; // Convert to 32bit integer\n }\n\n console.log(hash);\n return hash;\n };\n\n const timeStampToDate = value => {\n //console.log('Setting new format: ' + value);\n let formattedDate = \"\";\n var date = new Date(value * 1000);\n var hours = date.getHours();\n var minutes = \"0\" + date.getMinutes();\n var seconds = \"0\" + date.getSeconds();\n formattedDate = hours + ':' + minutes.substr(-2) + ':' + seconds.substr(-2); // formattedDate = date.toISOString();\n\n return formattedDate;\n };\n\n return React.createElement(ExperimentContext.Provider, {\n value: {\n experiments: state.experiments,\n experiment: state.experiment,\n loading: state.loading,\n loadingGraph: state.loadingGraph,\n loadingRun: state.loadingRun,\n loadingPkl: state.loadingPkl,\n data: state.data,\n rundata: state.rundata,\n pklchanges: state.pklchanges,\n selection: state.selection,\n enabledGraphSearch: state.enabledGraphSearch,\n startAutoUpdateRun: state.startAutoUpdateRun,\n startAutoUpdatePkl: state.startAutoUpdatePkl,\n shouldUpdateGraph: state.shouldUpdateGraph,\n visNodes: state.visNodes,\n setAutoUpdateRun,\n setAutoUpdatePkl,\n searchExperiments,\n clearExperiments,\n getExperiment,\n getExperimentGraph,\n cleanGraphData,\n cleanRunData,\n cleanPklData,\n setPklChanges,\n updateSelection,\n getExperimentRun,\n getExperimentPkl,\n hashCode,\n timeStampToDate,\n setVisData,\n updateGraphColor\n },\n __source: {\n fileName: _jsxFileName,\n lineNumber: 241\n },\n __self: this\n }, props.children);\n};\n\nexport default ExperimentState;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/context/experiment/ExperimentState.js"],"names":["React","useReducer","axios","ExperimentContext","ExperimentReducer","SEARCH_EXPERIMENTS","SET_LOADING","CLEAR_EXPERIMENTS","GET_EXPERIMENT","GET_GRAPH","SET_LOADING_GRAPH","CLEAN_GRAPH_DATA","UPDATE_SELECTION","GET_EXPERIMENT_RUN","SET_LOADING_RUN","CLEAN_RUN_DATA","SET_AUTOUPDATE_RUN","GET_PKL_DATA","SET_LOADING_PKL","UPDATE_NODES","SHOULD_UPDATE_GRAPH","SET_AUTOUPDATE_PKL","CLEAN_PKL_DATA","SET_PKL_CHANGES","UPDATE_EXPERIMENT_TS","SET_VIS_DATA","ExperimentState","props","initialState","experiments","experiment","loading","data","rundata","pkldata","pklchanges","loadingGraph","loadingRun","loadingPkl","selection","enabledGraphSearch","startAutoUpdateRun","startAutoUpdatePkl","shouldUpdateGraph","visNodes","state","dispatch","searchExperiments","text","setLoading","res","get","type","payload","getExperiment","expid","getExperimentGraph","setLoadingGraph","console","log","getExperimentRun","setLoadingRun","getExperimentPkl","setLoadingPkl","pkl_timestamp","retrievedPkl","jobs","colorChanges","changes","has_changed","pkl_content","length","j","job","name","requireUpdate","newData","expData","nodes","i","status_code","id","timeStampToDate","status","status_color","updateNodes","updateExperimentTimeStamp","setPklChanges","key","updateGraphColor","idChange","newColor","update","color","background","clearExperiments","cleanGraphData","cleanRunData","cleanPklData","updateSelection","currentSelection","newdata","newExperiment","setAutoUpdateRun","value","setAutoUpdatePkl","setUpdateGraph","setVisData","hashCode","hash","chr","charCodeAt","formattedDate","date","Date","hours","getHours","minutes","getMinutes","seconds","getSeconds","substr","children"],"mappings":";;AAAA,OAAOA,KAAP,IAAgBC,UAAhB,QAAkC,OAAlC;AACA,OAAOC,KAAP,MAAkB,OAAlB;AACA,OAAOC,iBAAP,MAA8B,qBAA9B;AACA,OAAOC,iBAAP,MAA8B,qBAA9B;AACA,SACEC,kBADF,EAEEC,WAFF,EAGEC,iBAHF,EAIEC,cAJF,EAKEC,SALF,EAMEC,iBANF,EAOEC,gBAPF,EAQEC,gBARF,EASEC,kBATF,EAUEC,eAVF,EAWEC,cAXF,EAYEC,kBAZF,EAaEC,YAbF,EAcEC,eAdF,EAeEC,YAfF,EAgBEC,mBAhBF,EAiBEC,kBAjBF,EAkBEC,cAlBF,EAmBEC,eAnBF,EAoBEC,oBApBF,EAqBEC,YArBF,QAsBO,UAtBP;;AAwBA,MAAMC,eAAe,GAAGC,KAAK,IAAI;AAC7B,QAAMC,YAAY,GAAG;AACjBC,IAAAA,WAAW,EAAE,EADI;AAEjBC,IAAAA,UAAU,EAAE,EAFK;AAGjBC,IAAAA,OAAO,EAAE,KAHQ;AAIjBC,IAAAA,IAAI,EAAE,IAJW;AAKjBC,IAAAA,OAAO,EAAE,IALQ;AAMjBC,IAAAA,OAAO,EAAE,IANQ;AAOjBC,IAAAA,UAAU,EAAE,IAPK;AAQjBC,IAAAA,YAAY,EAAE,KARG;AASjBC,IAAAA,UAAU,EAAE,KATK;AAUjBC,IAAAA,UAAU,EAAE,KAVK;AAWjBC,IAAAA,SAAS,EAAE,IAXM;AAYjBC,IAAAA,kBAAkB,EAAE,IAZH;AAajBC,IAAAA,kBAAkB,EAAE,KAbH;AAcjBC,IAAAA,kBAAkB,EAAE,KAd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,CAACb,IAPR;AAQJC,MAAAA,OAAO,EAAEY,KAAK,CAACZ,OARX;AASJE,MAAAA,UAAU,EAAEU,KAAK,CAACV,UATd;AAUJI,MAAAA,SAAS,EAAEM,KAAK,CAACN,SAVb;AAWJC,MAAAA,kBAAkB,EAAEK,KAAK,CAACL,kBAXtB;AAYJC,MAAAA,kBAAkB,EAAEI,KAAK,CAACJ,kBAZtB;AAaJC,MAAAA,kBAAkB,EAAEG,KAAK,CAACH,kBAbtB;AAcJC,MAAAA,iBAAiB,EAAEE,KAAK,CAACF,iBAdrB;AAeJC,MAAAA,QAAQ,EAAEC,KAAK,CAACD,QAfZ;AAgBJ2D,MAAAA,gBAhBI;AAiBJE,MAAAA,gBAjBI;AAkBJ1D,MAAAA,iBAlBI;AAmBJgD,MAAAA,gBAnBI;AAoBJzC,MAAAA,aApBI;AAqBJE,MAAAA,kBArBI;AAsBJwC,MAAAA,cAtBI;AAuBJC,MAAAA,YAvBI;AAwBJC,MAAAA,YAxBI;AAyBJX,MAAAA,aAzBI;AA0BJY,MAAAA,eA1BI;AA2BJvC,MAAAA,gBA3BI;AA4BJE,MAAAA,gBA5BI;AA6BJ8C,MAAAA,QA7BI;AA8BJ1B,MAAAA,eA9BI;AA+BJyB,MAAAA,UA/BI;AAgCJlB,MAAAA;AAhCI,KADR;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KAmCK9D,KAAK,CAAC+F,QAnCX,CADJ;AAuCH,CA1PD;;AA4PA,eAAehG,eAAf","sourcesContent":["import React, { useReducer } from 'react';\nimport axios from 'axios';\nimport ExperimentContext from './experimentContext';\nimport ExperimentReducer from './experimentReducer';\nimport {\n SEARCH_EXPERIMENTS,\n SET_LOADING,\n CLEAR_EXPERIMENTS,\n GET_EXPERIMENT,\n GET_GRAPH,\n SET_LOADING_GRAPH,\n CLEAN_GRAPH_DATA,\n UPDATE_SELECTION,\n GET_EXPERIMENT_RUN,\n SET_LOADING_RUN,\n CLEAN_RUN_DATA,\n SET_AUTOUPDATE_RUN,\n GET_PKL_DATA,\n SET_LOADING_PKL,\n UPDATE_NODES,\n SHOULD_UPDATE_GRAPH,\n SET_AUTOUPDATE_PKL,\n CLEAN_PKL_DATA,\n SET_PKL_CHANGES,\n UPDATE_EXPERIMENT_TS,\n SET_VIS_DATA,\n} from '../types';\n\nconst ExperimentState = props => {\n const initialState = {\n experiments: [],\n experiment: {},\n loading: false,\n data: null,\n rundata: null,\n pkldata: null,\n pklchanges: null,\n loadingGraph: false,\n loadingRun: false,\n loadingPkl: false,\n selection: null,\n enabledGraphSearch: true, \n startAutoUpdateRun: false, \n startAutoUpdatePkl: false,\n shouldUpdateGraph: false, \n visNodes: null, \n }\n\n const [state, dispatch] = useReducer(ExperimentReducer, initialState);\n\n // Search Experiments\n const searchExperiments = async text => {\n setLoading();\n const res = await axios.get(`http://84.88.185.30:8888/search/${text}`);\n dispatch({\n type: SEARCH_EXPERIMENTS,\n payload: res.data.experiment,\n });\n };\n\n // Get Experiment\n const getExperiment = async expid => {\n setLoading();\n //cleanGraphData();\n const res = await axios.get(`http://84.88.185.30:8888/expinfo/${expid}`); \n dispatch({\n type: GET_EXPERIMENT,\n payload: res.data,\n });\n };\n \n // Get Experiment Graph\n const getExperimentGraph = async expid => {\n setLoadingGraph();\n \n const res = await axios.get(`http://84.88.185.30:8888/graph/${expid}`);\n console.log(res.data);\n dispatch({\n type: GET_GRAPH,\n payload: res.data,\n });\n //this.setState({ data: res.data, loading: false, showGraph: !res.data.error });\n };\n\n // Get Experiment Run\n const getExperimentRun = async expid => {\n setLoadingRun();\n const res = await axios.get(`http://84.88.185.30:8888/exprun/${expid}`);\n console.log(res.data);\n dispatch({\n type: GET_EXPERIMENT_RUN,\n payload: res.data,\n });\n }\n\n // Get Experiment Pkl Data\n const getExperimentPkl = async () => {\n setLoadingPkl();\n //timeStamp = 1000;\n const res = await axios.get(`http://84.88.185.30:8888/pklinfo/${state.experiment.expid}/${state,experiment.pkl_timestamp}`);\n console.log(res.data);\n // const actualPkl = res.data;\n \n let retrievedPkl = null;\n var jobs = {};\n var colorChanges = {};\n var changes = \"\"\n retrievedPkl = res.data;\n if (state.data !== null && retrievedPkl.has_changed === true && retrievedPkl.pkl_content.length > 0){\n //console.log(retrievedPkl.pkl_content.length);\n for(var j = 0, job; j < retrievedPkl.pkl_content.length; j++){\n job = retrievedPkl.pkl_content[j];\n //console.log(job);\n jobs[ job.name ] = job;\n //console.log(jobs[job.name]);\n }\n let requireUpdate = false;\n console.log('Current ts: '+ state.data.pkl_timestamp); \n var newData = state.data;\n //console.log(newData.nodes);\n var expData = state.experiment;\n if (newData.nodes){\n for(var i = 0; i < newData.nodes.length; i++){\n // console.log(newNodes[i].id);\n //console.log(newData.nodes[i]);\n // console.log(jobs[ newNodes[i].id ]);\n\n if (newData.nodes[i].status_code !== jobs[ newData.nodes[i].id ].status_code){\n // changes += newData.nodes[i].id + \" from \" + newData.nodes[i].status + \" to \" + jobs[ newData.nodes[i].id ].status + \" || \";\n changes += timeStampToDate(retrievedPkl.pkl_timestamp) + \": \"+ newData.nodes[i].id + \" to \" + jobs[ newData.nodes[i].id ].status + \"\\n\";\n newData.nodes[i].status_code = jobs[ newData.nodes[i].id ].status_code;\n newData.nodes[i].status_color = jobs[ newData.nodes[i].id ].status_color;\n newData.nodes[i].status = jobs[ newData.nodes[i].id ].status;\n //console.log(newData.nodes[i].status_color)\n colorChanges[ newData.nodes[i].id ] = jobs[ newData.nodes[i].id ].status_color;\n requireUpdate = true;\n }\n }\n\n\n if (requireUpdate){ \n // console.log(newData.pkl_timestamp);\n // console.log(expData.pkl_timestamp);\n console.log(\"New ts: \" + retrievedPkl.pkl_timestamp)\n newData.pkl_timestamp = retrievedPkl.pkl_timestamp;\n expData.pkl_timestamp = retrievedPkl.pkl_timestamp;\n // console.log(newData.pkl_timestamp);\n // console.log(expData.pkl_timestamp);\n \n // console.log('Call Update');\n updateNodes(newData);\n updateExperimentTimeStamp(expData);\n // setUpdateGraph(true);\n // setUpdateGraph(false);\n if (state.pklchanges){\n setPklChanges(changes + state.pklchanges);\n } else {\n setPklChanges(changes);\n }\n\n for(var key in colorChanges) {\n //console.log( key, colorChanges[key] );\n updateGraphColor(key, colorChanges[key]);\n }\n \n \n } else { \n console.log('No changes but updating pkl anyway.')\n expData.pkl_timestamp = retrievedPkl.pkl_timestamp;\n updateExperimentTimeStamp(expData);\n }\n }\n }\n // } else {\n // var t = new Date( retrievedPkl.pkl_timestamp );\n // var formatted = t.toISOString();\n // setPklChanges(\"No news yet... \" + formatted)\n // }\n\n\n dispatch({\n type: GET_PKL_DATA,\n payload: res.data,\n });\n }\n\n const updateGraphColor = (idChange, newColor) => {\n state.visNodes.update({id:idChange, color: { background: newColor }});\n }\n\n\n // Cleaning\n const clearExperiments = () => dispatch({ type: CLEAR_EXPERIMENTS });\n const cleanGraphData = () => dispatch({ type: CLEAN_GRAPH_DATA });\n const cleanRunData = () => dispatch({ type: CLEAN_RUN_DATA });\n const cleanPklData = () => dispatch({ type: CLEAN_PKL_DATA });\n\n // Set Loading\n const setLoading = () => dispatch({ type: SET_LOADING });\n const setLoadingGraph = () => dispatch({ type: SET_LOADING_GRAPH });\n const setLoadingRun = () => dispatch({ type: SET_LOADING_RUN });\n const setLoadingPkl = () => dispatch({ type: SET_LOADING_PKL });\n\n\n // Action Things\n const updateSelection = (currentSelection) => dispatch({ type: UPDATE_SELECTION, payload: currentSelection });\n const updateNodes = (newdata) => dispatch({ type: UPDATE_NODES, payload: newdata });\n const updateExperimentTimeStamp = (newExperiment) => dispatch({ type: UPDATE_EXPERIMENT_TS, payload: newExperiment});\n const setAutoUpdateRun = (value) => dispatch({ type: SET_AUTOUPDATE_RUN, payload: value });\n const setAutoUpdatePkl = (value) => dispatch({ type: SET_AUTOUPDATE_PKL, payload: value });\n const setUpdateGraph = (value) => dispatch({ type: SHOULD_UPDATE_GRAPH, payload: value });\n const setPklChanges = (value) => dispatch({ type: SET_PKL_CHANGES, payload: value });\n const setVisData = (value) => dispatch({ type: SET_VIS_DATA, payload: value});\n\n // Other Utils\n const hashCode = (value) => {\n var hash = 0, i, chr;\n if (value.length === 0) return hash;\n for (i = 0; i < value.length; i++) {\n chr = value.charCodeAt(i);\n hash = ((hash << 5) - hash) + chr;\n hash |= 0; // Convert to 32bit integer\n }\n console.log(hash);\n return hash;\n };\n \n const timeStampToDate = (value) => {\n //console.log('Setting new format: ' + value);\n let formattedDate = \"\";\n var date = new Date( value * 1000);\n var hours = date.getHours();\n var minutes = \"0\" + date.getMinutes();\n var seconds = \"0\" + date.getSeconds();\n formattedDate = hours + ':' + minutes.substr(-2) + ':' + seconds.substr(-2);\n // formattedDate = date.toISOString();\n return formattedDate;\n }\n\n return (\n \n {props.children}\n \n );\n};\n\nexport default ExperimentState;"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/cce10607bfc728aebfbd5c4bf72ff97c.json b/node_modules/.cache/babel-loader/cce10607bfc728aebfbd5c4bf72ff97c.json new file mode 100644 index 0000000000000000000000000000000000000000..f50d664e3c475cce29f96eeb3aa0f8e650b9ac03 --- /dev/null +++ b/node_modules/.cache/babel-loader/cce10607bfc728aebfbd5c4bf72ff97c.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js\";\nimport React, { Component } from \"react\"; // import vis from \"vis-network\";\n\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n constructor(...args) {\n super(...args);\n\n this.updateVisNodes = nodes => {\n this.props.setVisData(nodes);\n };\n }\n\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else if (nextProps.data && this.props.data && nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp) {\n console.log(\"Rerendering\");\n return true;\n } else if (nextProps.loadingGraph !== this.props.loadingGraph) {\n return true;\n } else {\n return false;\n }\n }\n\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n render() {\n if (this.props.loadingGraph) return React.createElement(Spinner, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 32\n },\n __self: this\n });\n\n if (this.props.data == null) {\n return React.createElement(\"div\", {\n className: \"card-body text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 35\n },\n __self: this\n }, React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Press \", React.createElement(\"span\", {\n className: \"badge badge-info\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Show Graph\"), \" to see the graph representation of the experiment.\"), React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"If the experiment is running, press \", React.createElement(\"span\", {\n className: \"badge badge-dark\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"Start Job Monitor\"), \" to start a live tracker of the changes on the experiment's jobs. This process will automatically update the graph's nodes colors and show a log of the detected changes.\"));\n }\n\n var nodes_array = [];\n var edges_array = [];\n\n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: {\n background: node.status_color,\n border: \"black\"\n },\n level: node.level\n }));\n this.props.data.edges.map(edge => edges_array.push({\n from: edge.from,\n to: edge.to\n }));\n }\n\n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n const options = {\n edges: {\n arrows: {\n to: {\n enabled: true\n }\n }\n },\n layout: {\n improvedLayout: true,\n hierarchical: {\n nodeSpacing: 250,\n blockShifting: true,\n edgeMinimization: true,\n parentCentralization: true,\n sortMethod: 'hubsize',\n direction: 'UD'\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true\n },\n physics: {\n enabled: false\n },\n nodes: {\n shape: 'dot'\n }\n };\n const graph = {\n nodes: nodes,\n edges: edges\n };\n\n class VisNetwork extends Component {\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else {\n return false;\n }\n }\n\n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", params => {\n //console.log(params);\n if (params.nodes) {\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n });\n } // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n\n\n render() {\n return React.createElement(\"div\", {\n className: \"card-body p-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 130\n },\n __self: this\n }, React.createElement(\"div\", {\n ref: \"myRef\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 131\n },\n __self: this\n }));\n }\n\n }\n\n this.updateVisNodes(nodes);\n return React.createElement(VisNetwork, {\n graph: graph,\n options: options,\n updateSelection: this.props.updateSelection,\n shouldUpdateGraph: this.props.shouldUpdateGraph,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 139\n },\n __self: this\n });\n }\n\n}\n\nconst experimentStyle = {\n height: 600\n};\nexport default GraphNativeRep;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js"],"names":["React","Component","Spinner","vis","GraphNativeRep","updateVisNodes","nodes","props","setVisData","shouldComponentUpdate","nextProps","nextState","shouldUpdateGraph","data","pkl_timestamp","console","log","loadingGraph","componentWillUnmount","cleanGraphData","render","nodes_array","edges_array","edges","map","node","push","id","label","color","background","status_color","border","level","edge","from","to","DataSet","options","arrows","enabled","layout","improvedLayout","hierarchical","nodeSpacing","blockShifting","edgeMinimization","parentCentralization","sortMethod","direction","interaction","dragNodes","hoverConnectedEdges","navigationButtons","physics","shape","graph","VisNetwork","componentDidMount","network","Network","refs","myRef","on","params","updateSelection","experimentStyle","height"],"m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D,KAAL,CAAWiD,KAA5C,EAAmD,KAAKjD,KAAL,CAAW+B,OAA9D,CAAd;AACAqB,QAAAA,OAAO,CAACI,EAAR,CAAW,OAAX,EAAqBC,MAAD,IAAY;AAC5B;AACA,cAAIA,MAAM,CAAC1D,KAAX,EAAiB;AACb;AACA,iBAAKC,KAAL,CAAW0D,eAAX,CAA2BD,MAAM,CAAC1D,KAAlC;AACH;AAEJ,SAPD;AAQH,OApB8B,CAsB/B;AACA;AACA;AACA;;;AAEAc,MAAAA,MAAM,GAAG;AACL,eACI;AAAK,UAAA,SAAS,EAAC,eAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,WACI;AAAK,UAAA,GAAG,EAAC,OAAT;AAAiB,UAAA,KAAK,EAAE8C,eAAxB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,UADJ,CADJ;AAKH;;AAjC8B;;AAoCnC,SAAK7D,cAAL,CAAoBC,KAApB;AAEA,WAAO,oBAAC,UAAD;AACH,MAAA,KAAK,EAAEkD,KADJ;AAEH,MAAA,OAAO,EAAElB,OAFN;AAGH,MAAA,eAAe,EAAE,KAAK/B,KAAL,CAAW0D,eAHzB;AAIH,MAAA,iBAAiB,EAAE,KAAK1D,KAAL,CAAWK,iBAJ3B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAAP;AAOH;;AA5IkC;;AA0JvC,MAAMsD,eAAe,GAAG;AACpBC,EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,eAAe/D,cAAf","sourcesContent":["import React, { Component } from \"react\";\n// import vis from \"vis-network\";\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n\n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true\n }else if (nextProps.data && this.props.data && (nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp)){\n console.log(\"Rerendering\")\n return true;\n }else if (nextProps.loadingGraph !== this.props.loadingGraph){\n return true; \n }else{\n return false;\n }\n }\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n updateVisNodes = (nodes) => {\n this.props.setVisData(nodes);\n }\n\n\n\n render () {\n if (this.props.loadingGraph) return ;\n if (this.props.data == null){\n return (\n
\n

Press Show Graph to see the graph representation of the experiment.

\n

If the experiment is running, press Start Job Monitor to start a live tracker of the changes on the experiment's jobs.\n This process will automatically update the graph's nodes colors and show a log of the detected changes.\n

\n
\n );\n }\n\n var nodes_array = [];\n var edges_array = [];\n \n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: { background: node.status_color, border: \"black\" },\n level: node.level,\n })\n );\n \n this.props.data.edges.map(edge => \n edges_array.push({ from: edge.from, to: edge.to })\n );\n }\n \n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n\n\n const options = {\n edges: {\n arrows: {\n to: { enabled: true }\n }\n },\n layout: {\n improvedLayout: true,\n hierarchical: {\n nodeSpacing: 250,\n blockShifting: true,\n edgeMinimization: true,\n parentCentralization: true,\n sortMethod: 'hubsize',\n direction: 'UD',\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true,\n },\n physics: {\n enabled: false,\n },\n nodes: {\n shape: 'dot',\n }\n };\n \n const graph = {\n nodes : nodes,\n edges : edges,\n };\n\n class VisNetwork extends Component {\n \n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true;\n } else {\n return false;\n }\n }\n \n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", (params) => {\n //console.log(params);\n if (params.nodes){\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n \n });\n }\n \n // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n \n render() { \n return (\n
\n
\n
\n );\n }\n }\n\n this.updateVisNodes(nodes);\n \n return ;\n\n }\n\n\n \n\n \n\n \n \n\n \n\n}\n\nconst experimentStyle = {\n height: 600\n };\n\nexport default GraphNativeRep;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/cd5f3c8433d4f5a59a06aa06eca04e2e.json b/node_modules/.cache/babel-loader/cd5f3c8433d4f5a59a06aa06eca04e2e.json new file mode 100644 index 0000000000000000000000000000000000000000..a8fa4b1d44245589d0b1c562ffc60a16b42b1458 --- /dev/null +++ b/node_modules/.cache/babel-loader/cd5f3c8433d4f5a59a06aa06eca04e2e.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js\";\nimport React, { Component } from \"react\"; // import vis from \"vis-network\";\n\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis-network\";\n\nclass GraphNativeRep extends Component {\n constructor(...args) {\n super(...args);\n\n this.updateVisNodes = nodes => {\n this.props.setVisData(nodes);\n };\n }\n\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else if (nextProps.data && this.props.data && nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp) {\n console.log(\"Rerendering\");\n return true;\n } else if (nextProps.loadingGraph !== this.props.loadingGraph) {\n return true;\n } else {\n return false;\n }\n }\n\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n render() {\n if (this.props.loadingGraph) return React.createElement(Spinner, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 32\n },\n __self: this\n });\n\n if (this.props.data == null) {\n return React.createElement(\"div\", {\n className: \"card-body text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 35\n },\n __self: this\n }, React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Press \", React.createElement(\"span\", {\n className: \"badge badge-info\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Show Graph\"), \" to see the graph representation of the experiment.\"), React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"If the experiment is running, press \", React.createElement(\"span\", {\n className: \"badge badge-dark\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"Start Job Monitor\"), \" to start a live tracker of the changes on the experiment's jobs. This process will automatically update the graph's nodes colors and show a log of the detected changes.\"));\n }\n\n var nodes_array = [];\n var edges_array = [];\n\n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: {\n background: node.status_color,\n border: \"black\"\n },\n level: node.level\n }));\n this.props.data.edges.map(edge => edges_array.push({\n from: edge.from,\n to: edge.to\n }));\n }\n\n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n const options = {\n edges: {\n arrows: {\n to: {\n enabled: true\n }\n }\n },\n layout: {\n improvedLayout: false,\n hierarchical: {\n nodeSpacing: 190,\n blockShifting: false,\n edgeMinimization: true,\n parentCentralization: false,\n sortMethod: 'hubsize',\n direction: 'UD' // work on vis current version\n // nodeSpacing: 190,\n // blockShifting: false,\n // edgeMinimization: false,\n // parentCentralization: true,\n // sortMethod: 'hubsize',\n // direction: 'UD',\n\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true\n },\n physics: {\n enabled: false\n },\n nodes: {\n shape: 'dot',\n font: {\n size: 10\n }\n }\n };\n const graph = {\n nodes: nodes,\n edges: edges\n };\n\n class VisNetwork extends Component {\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else {\n return false;\n }\n }\n\n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", params => {\n //console.log(params);\n if (params.nodes) {\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n });\n } // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n\n\n render() {\n return React.createElement(\"div\", {\n className: \"card-body p-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 140\n },\n __self: this\n }, React.createElement(\"div\", {\n ref: \"myRef\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 141\n },\n __self: this\n }));\n }\n\n }\n\n this.updateVisNodes(nodes);\n return React.createElement(VisNetwork, {\n graph: graph,\n options: options,\n updateSelection: this.props.updateSelection,\n shouldUpdateGraph: this.props.shouldUpdateGraph,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 149\n },\n __self: this\n });\n }\n\n}\n\nconst experimentStyle = {\n height: 600\n};\nexport default GraphNativeRep;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js"],"names":["React","Component","Spinner","vis","GraphNativeRep","updateVisNodes","nodes","props","setVisData","shouldComponentUpdate","nextProps","nextState","shouldUpdateGraph","data","pkl_timestamp","console","log","loadingGraph","componentWillUnmount","cleanGraphData","render","nodes_array","edges_array","edges","map","node","push","id","label","color","background","status_color","border","level","edge","from","to","DataSet","options","arrows","enabled","layout","improvedLayout","hierarchical","nodeSpacing","blockShifting","edgeMinimization","parentCentralization","sortMethod","direction","interaction","dragNodes","hoverConnectedEdges","navigationButtons","physics","shape","font","size","graph","VisNetwork","componentDidMount","network","Network","refs","myRef","on","params","updateSelection","experimentStyle","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,SAAhB,QAAiC,OAAjC,C,CACA;;AACA,OAAOC,OAAP,MAAoB,mBAApB;AACA,OAAOC,GAAP,MAAgB,aAAhB;;AAEA,MAAMC,cAAN,SAA6BH,SAA7B,CAAuC;AAAA;AAAA;;AAAA,SAmBnCI,cAnBmC,GAmBjBC,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,EAAqBC,MAAD,IAAY;AAC5B;AACA,cAAIA,MAAM,CAAC5D,KAAX,EAAiB;AACb;AACA,iBAAKC,KAAL,CAAW4D,eAAX,CAA2BD,MAAM,CAAC5D,KAAlC;AACH;AAEJ,SAPD;AAQH,OApB8B,CAsB/B;AACA;AACA;AACA;;;AAEAc,MAAAA,MAAM,GAAG;AACL,eACI;AAAK,UAAA,SAAS,EAAC,eAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,WACI;AAAK,UAAA,GAAG,EAAC,OAAT;AAAiB,UAAA,KAAK,EAAEgD,eAAxB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,UADJ,CADJ;AAKH;;AAjC8B;;AAoCnC,SAAK/D,cAAL,CAAoBC,KAApB;AAEA,WAAO,oBAAC,UAAD;AACH,MAAA,KAAK,EAAEoD,KADJ;AAEH,MAAA,OAAO,EAAEpB,OAFN;AAGH,MAAA,eAAe,EAAE,KAAK/B,KAAL,CAAW4D,eAHzB;AAIH,MAAA,iBAAiB,EAAE,KAAK5D,KAAL,CAAWK,iBAJ3B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAAP;AAOH;;AAtJkC;;AAoKvC,MAAMwD,eAAe,GAAG;AACpBC,EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,eAAejE,cAAf","sourcesContent":["import React, { Component } from \"react\";\n// import vis from \"vis-network\";\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis-network\";\n\nclass GraphNativeRep extends Component {\n\n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true\n }else if (nextProps.data && this.props.data && (nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp)){\n console.log(\"Rerendering\")\n return true;\n }else if (nextProps.loadingGraph !== this.props.loadingGraph){\n return true; \n }else{\n return false;\n }\n }\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n updateVisNodes = (nodes) => {\n this.props.setVisData(nodes);\n }\n\n\n\n render () {\n if (this.props.loadingGraph) return ;\n if (this.props.data == null){\n return (\n
\n

Press Show Graph to see the graph representation of the experiment.

\n

If the experiment is running, press Start Job Monitor to start a live tracker of the changes on the experiment's jobs.\n This process will automatically update the graph's nodes colors and show a log of the detected changes.\n

\n
\n );\n }\n\n var nodes_array = [];\n var edges_array = [];\n \n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: { background: node.status_color, border: \"black\" },\n level: node.level,\n })\n );\n \n this.props.data.edges.map(edge => \n edges_array.push({ from: edge.from, to: edge.to })\n );\n }\n \n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n\n\n const options = {\n edges: {\n arrows: {\n to: { enabled: true }\n }\n },\n layout: {\n improvedLayout: false,\n hierarchical: {\n nodeSpacing: 190, \n blockShifting: false,\n edgeMinimization: true,\n parentCentralization: false,\n sortMethod: 'hubsize',\n direction: 'UD',\n // work on vis current version\n // nodeSpacing: 190,\n // blockShifting: false,\n // edgeMinimization: false,\n // parentCentralization: true,\n // sortMethod: 'hubsize',\n // direction: 'UD',\n }\n }, \n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true,\n },\n physics: {\n enabled: false,\n },\n nodes: {\n shape: 'dot',\n font: {\n size: 10,\n },\n }\n };\n \n const graph = {\n nodes : nodes,\n edges : edges,\n };\n\n class VisNetwork extends Component {\n \n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true;\n } else {\n return false;\n }\n }\n \n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", (params) => {\n //console.log(params);\n if (params.nodes){\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n \n });\n }\n \n // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n \n render() { \n return (\n
\n
\n
\n );\n }\n }\n\n this.updateVisNodes(nodes);\n \n return ;\n\n }\n\n\n \n\n \n\n \n \n\n \n\n}\n\nconst experimentStyle = {\n height: 600\n };\n\nexport default GraphNativeRep;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/ceb6fe9c8e95a8654eefd0244612038e.json b/node_modules/.cache/babel-loader/ceb6fe9c8e95a8654eefd0244612038e.json new file mode 100644 index 0000000000000000000000000000000000000000..68698fcb3a7f5f97c576c5dd3e739c933ce96b0a --- /dev/null +++ b/node_modules/.cache/babel-loader/ceb6fe9c8e95a8654eefd0244612038e.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/Selection.js\";\nimport React, { useContext, Fragment } from 'react';\nimport ExperimentContext from '../context/experiment/experimentContext';\n\nconst Selection = () => {\n const experimentContext = useContext(ExperimentContext);\n const selection = experimentContext.selection,\n data = experimentContext.data; // const { model, branch, hpc } = experiment;\n //var currentSelection = \"Node: \"\n\n var currentNode = \"\";\n var selectedNode = null;\n\n if (selection) {\n //console.log(\"Current selection \" + selection)\n selection.map(node => // currentSelection += node + \", \"\n currentNode = node);\n console.log(\"Current node \" + currentNode);\n selectedNode = data.nodes.find(node => node.id === currentNode); //console.log(\"Data: \" + selectedNode.id + \" \" + selectedNode.platform_name)\n }\n\n return React.createElement(Fragment, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 22\n },\n __self: this\n }, selectedNode && React.createElement(Fragment, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 24\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 25\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-12\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 26\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"card text-white bg-info\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 27\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"card-header text-center py-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 28\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 29\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 29\n },\n __self: this\n }, selectedNode.id))), React.createElement(\"div\", {\n className: \"card-body py-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 31\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 32\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 33\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 33\n },\n __self: this\n }, \"Date:\"), \" \", selectedNode.date)), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 35\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Section:\"), \" \", selectedNode.section)), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 38\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 39\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 39\n },\n __self: this\n }, \"Platform:\"), \" \", selectedNode.platform_name)), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 41\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 42\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 42\n },\n __self: this\n }, \"Priority:\"), \" \", selectedNode.priority)), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 44\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 45\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 45\n },\n __self: this\n }, \"Processors:\"), \" \", selectedNode.processors)), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 47\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 48\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 48\n },\n __self: this\n }, \"Status:\")), \" \", selectedNode.status)))))), !selectedNode && data && React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 58\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-12\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 59\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"card text-white bg-info\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 60\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"card-header text-center py-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 61\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 62\n },\n __self: this\n }, \"Here goes the Job Id\")), React.createElement(\"div\", {\n className: \"card-body\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 64\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"text-center\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 65\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 66\n },\n __self: this\n }, \"Select a Node to see more information.\")))))));\n};\n\nconst experimentStyle = {\n height: 200\n};\nexport default Selection;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/Selection.js"],"names":["React","useContext","Fragment","ExperimentContext","Selection","experimentContext","selection","data","currentNode","selectedNode","map","node","console","log","nodes","find","id","experimentStyle","date","section","platform_name","priority","processors","status","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,UAAhB,EAA4BC,QAA5B,QAA4C,OAA5C;AACA,OAAOC,iBAAP,MAA8B,yCAA9B;;AAEA,MAAMC,SAAS,GAAG,MAAM;AACpB,QAAMC,iBAAiB,GAAGJ,UAAU,CAACE,iBAAD,CAApC;AADoB,QAEZG,SAFY,GAEQD,iBAFR,CAEZC,SAFY;AAAA,QAEDC,IAFC,GAEQF,iBAFR,CAEDE,IAFC,EAGpB;AACA;;AACA,MAAIC,WAAW,GAAG,EAAlB;AACA,MAAIC,YAAY,GAAG,IAAnB;;AACA,MAAIH,SAAJ,EAAe;AACX;AACAA,IAAAA,SAAS,CAACI,GAAV,CAAcC,IAAI,IACd;AACAH,IAAAA,WAAW,GAAGG,IAFlB;AAIAC,IAAAA,OAAO,CAACC,GAAR,CAAY,kBAAkBL,WAA9B;AACAC,IAAAA,YAAY,GAAGF,IAAI,CAACO,KAAL,CAAWC,IAAX,CAAgBJ,IAAI,IAAIA,IAAI,CAACK,EAAL,KAAYR,WAApC,CAAf,CAPW,CAQX;AACH;;AACD,SACI,oBAAC,QAAD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACSC,YAAY,IACb,oBAAC,QAAD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACK;AAAK,IAAA,SAAS,EAAC,KAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACI;AAAK,IAAA,SAAS,EAAC,QAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACG;AAAK,IAAA,SAAS,EAAC,yBAAf;AAAyC,IAAA,KAAK,EAAEQ,eAAhD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACI;AAAK,IAAA,SAAS,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AA;AAAA;AAAA;AAAA;AAAA;AAAA,eAAP,CADJ,OAC6Cb,YAAY,CAACc,MAD1D,CAhBJ,CAJJ,CADH,CADJ,CADL,CAFR,EAmCS,CAACd,YAAD,IAAiBF,IAAjB,IACG;AAAK,IAAA,SAAS,EAAC,KAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACI;AAAK,IAAA,SAAS,EAAC,QAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACI;AAAK,IAAA,SAAS,EAAC,yBAAf;AAAyC,IAAA,KAAK,EAAEU,eAAhD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACI;AAAK,IAAA,SAAS,EAAC,8BAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACI;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,4BADJ,CADJ,EAII;AAAK,IAAA,SAAS,EAAC,WAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACI;AAAK,IAAA,SAAS,EAAC,aAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,8CADA,CADJ,CAJJ,CADJ,CADJ,CApCZ,CADJ;AAyDH,CA1ED;;AA4EA,MAAMA,eAAe,GAAG;AACpBO,EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,eAAepB,SAAf","sourcesContent":["import React, { useContext, Fragment } from 'react'\nimport ExperimentContext from '../context/experiment/experimentContext';\n\nconst Selection = () => {\n const experimentContext = useContext(ExperimentContext);\n const { selection, data } = experimentContext;\n // const { model, branch, hpc } = experiment;\n //var currentSelection = \"Node: \"\n var currentNode = \"\"\n var selectedNode = null\n if (selection) {\n //console.log(\"Current selection \" + selection)\n selection.map(node => (\n // currentSelection += node + \", \"\n currentNode = node\n ));\n console.log(\"Current node \" + currentNode)\n selectedNode = data.nodes.find(node => node.id === currentNode) \n //console.log(\"Data: \" + selectedNode.id + \" \" + selectedNode.platform_name)\n } \n return (\n \n {selectedNode &&\n \n
\n
\n
\n
\n {selectedNode.id}\n
\n
\n
\n Date: {selectedNode.date}\n
\n
\n Section: {selectedNode.section}\n
\n
\n Platform: {selectedNode.platform_name}\n
\n
\n Priority: {selectedNode.priority}\n
\n
\n Processors: {selectedNode.processors}\n
\n
\n Status: {selectedNode.status}\n
\n \n
\n
\n
\n
\n
\n } \n {!selectedNode && data &&\n
\n
\n
\n
\n Here goes the Job Id\n
\n
\n
\n Select a Node to see more information. \n
\n
\n
\n
\n
\n } \n
\n \n \n\n )\n}\n\nconst experimentStyle = {\n height: 200\n };\n\nexport default Selection;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/cf6ae9f23d4b30600a69eae85a854374.json b/node_modules/.cache/babel-loader/cf6ae9f23d4b30600a69eae85a854374.json new file mode 100644 index 0000000000000000000000000000000000000000..6eaa76f4d8f2caba19323946b0444a2c9c28ae23 --- /dev/null +++ b/node_modules/.cache/babel-loader/cf6ae9f23d4b30600a69eae85a854374.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js\";\nimport React, { Component } from \"react\"; // import vis from \"vis-network\";\n\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n constructor(...args) {\n super(...args);\n\n this.updateVisNodes = nodes => {\n this.props.setVisData(nodes);\n };\n }\n\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else if (nextProps.data && this.props.data && nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp) {\n console.log(\"Rerendering\");\n return true;\n } else if (nextProps.loadingGraph !== this.props.loadingGraph) {\n return true;\n } else {\n return false;\n }\n }\n\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n render() {\n if (this.props.loadingGraph) return React.createElement(Spinner, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 32\n },\n __self: this\n });\n\n if (this.props.data == null) {\n return React.createElement(\"div\", {\n className: \"card-body text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 35\n },\n __self: this\n }, React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Press \", React.createElement(\"span\", {\n className: \"badge badge-info\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Show Graph\"), \" to see the graph representation of the experiment.\"), React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"If the experiment is running, press \", React.createElement(\"span\", {\n className: \"badge badge-dark\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"Start Job Monitor\"), \" to start a live tracker of the changes on the experiment's jobs. This process will automatically update the graph's nodes colors and show a log of the detected changes.\"));\n }\n\n var nodes_array = [];\n var edges_array = [];\n\n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: {\n background: node.status_color,\n border: \"black\"\n },\n level: node.level\n }));\n this.props.data.edges.map(edge => edges_array.push({\n from: edge.from,\n to: edge.to\n }));\n }\n\n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n const options = {\n edges: {\n arrows: {\n to: {\n enabled: true\n }\n }\n },\n layout: {\n //improvedLayout: true,\n hierarchical: {\n nodeSpacing: 190,\n treeSpacing: 200,\n blockShifting: true,\n edgeMinimization: true,\n parentCentralization: false,\n sortMethod: 'hubsize',\n direction: 'UD'\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true\n },\n physics: {\n enabled: false\n },\n nodes: {\n shape: 'dot',\n font: {\n size: 10\n }\n }\n };\n const graph = {\n nodes: nodes,\n edges: edges\n };\n\n class VisNetwork extends Component {\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else {\n return false;\n }\n }\n\n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", params => {\n //console.log(params);\n if (params.nodes) {\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n });\n } // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n\n\n render() {\n return React.createElement(\"div\", {\n className: \"card-body p-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 134\n },\n __self: this\n }, React.createElement(\"div\", {\n ref: \"myRef\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 135\n },\n __self: this\n }));\n }\n\n }\n\n this.updateVisNodes(nodes);\n return React.createElement(VisNetwork, {\n graph: graph,\n options: options,\n updateSelection: this.props.updateSelection,\n shouldUpdateGraph: this.props.shouldUpdateGraph,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 143\n },\n __self: this\n });\n }\n\n}\n\nconst experimentStyle = {\n height: 600\n};\nexport default GraphNativeRep;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js"],"names":["React","Component","Spinner","vis","GraphNativeRep","updateVisNodes","nodes","props","setVisData","shouldComponentUpdate","nextProps","nextState","shouldUpdateGraph","data","pkl_timestamp","console","log","loadingGraph","componentWillUnmount","cleanGraphData","render","nodes_array","edges_array","edges","map","node","push","id","label","color","background","status_color","border","level","edge","from","to","DataSet","options","arrows","enabled","layout","hierarchical","nodeSpacing","treeSpacing","blockShifting","edgeMinimization","parentCentralization","sortMethod","direction","interaction","dragNodes","hoverConnectedEdges","navigationButtons","physics","shape","font","size","graph","VisNetwork","componentDidMount","network","Network","refs","myRef","on","params","updateSelection","experimentStyle","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,SAAhB,QAAiC,OAAjC,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1B,EAAiC,KAAKzD,KAAL,CAAWmD,KAA5C,EAAmD,KAAKnD,KAAL,CAAW+B,OAA9D,CAAd;AACAuB,QAAAA,OAAO,CAACI,EAAR,CAAW,OAAX,EAAqBC,MAAD,IAAY;AAC5B;AACA,cAAIA,MAAM,CAAC5D,KAAX,EAAiB;AACb;AACA,iBAAKC,KAAL,CAAW4D,eAAX,CAA2BD,MAAM,CAAC5D,KAAlC;AACH;AAEJ,SAPD;AAQH,OApB8B,CAsB/B;AACA;AACA;AACA;;;AAEAc,MAAAA,MAAM,GAAG;AACL,eACI;AAAK,UAAA,SAAS,EAAC,eAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,WACI;AAAK,UAAA,GAAG,EAAC,OAAT;AAAiB,UAAA,KAAK,EAAEgD,eAAxB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,UADJ,CADJ;AAKH;;AAjC8B;;AAoCnC,SAAK/D,cAAL,CAAoBC,KAApB;AAEA,WAAO,oBAAC,UAAD;AACH,MAAA,KAAK,EAAEoD,KADJ;AAEH,MAAA,OAAO,EAAEpB,OAFN;AAGH,MAAA,eAAe,EAAE,KAAK/B,KAAL,CAAW4D,eAHzB;AAIH,MAAA,iBAAiB,EAAE,KAAK5D,KAAL,CAAWK,iBAJ3B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAAP;AAOH;;AAhJkC;;AA8JvC,MAAMwD,eAAe,GAAG;AACpBC,EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,eAAejE,cAAf","sourcesContent":["import React, { Component } from \"react\";\n// import vis from \"vis-network\";\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n\n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true\n }else if (nextProps.data && this.props.data && (nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp)){\n console.log(\"Rerendering\")\n return true;\n }else if (nextProps.loadingGraph !== this.props.loadingGraph){\n return true; \n }else{\n return false;\n }\n }\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n updateVisNodes = (nodes) => {\n this.props.setVisData(nodes);\n }\n\n\n\n render () {\n if (this.props.loadingGraph) return ;\n if (this.props.data == null){\n return (\n
\n

Press Show Graph to see the graph representation of the experiment.

\n

If the experiment is running, press Start Job Monitor to start a live tracker of the changes on the experiment's jobs.\n This process will automatically update the graph's nodes colors and show a log of the detected changes.\n

\n
\n );\n }\n\n var nodes_array = [];\n var edges_array = [];\n \n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: { background: node.status_color, border: \"black\" },\n level: node.level,\n })\n );\n \n this.props.data.edges.map(edge => \n edges_array.push({ from: edge.from, to: edge.to })\n );\n }\n \n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n\n\n const options = {\n edges: {\n arrows: {\n to: { enabled: true }\n }\n },\n layout: {\n //improvedLayout: true,\n hierarchical: {\n nodeSpacing: 190,\n treeSpacing: 200,\n blockShifting: true,\n edgeMinimization: true,\n parentCentralization: false,\n sortMethod: 'hubsize',\n direction: 'UD',\n }\n }, \n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true,\n },\n physics: {\n enabled: false,\n },\n nodes: {\n shape: 'dot',\n font: {\n size: 10,\n },\n }\n };\n \n const graph = {\n nodes : nodes,\n edges : edges,\n };\n\n class VisNetwork extends Component {\n \n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true;\n } else {\n return false;\n }\n }\n \n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", (params) => {\n //console.log(params);\n if (params.nodes){\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n \n });\n }\n \n // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n \n render() { \n return (\n
\n
\n
\n );\n }\n }\n\n this.updateVisNodes(nodes);\n \n return ;\n\n }\n\n\n \n\n \n\n \n \n\n \n\n}\n\nconst experimentStyle = {\n height: 600\n };\n\nexport default GraphNativeRep;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/d186457172a75f5a0d9387aa33310061.json b/node_modules/.cache/babel-loader/d186457172a75f5a0d9387aa33310061.json new file mode 100644 index 0000000000000000000000000000000000000000..898802044545d499c771f7d72debefd3bce3b867 --- /dev/null +++ b/node_modules/.cache/babel-loader/d186457172a75f5a0d9387aa33310061.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js\";\nimport React, { Component } from \"react\"; // import vis from \"vis-network\";\n\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n constructor(...args) {\n super(...args);\n\n this.updateVisNodes = nodes => {\n this.props.setVisData(nodes);\n };\n }\n\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else if (nextProps.data && this.props.data && nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp) {\n console.log(\"Rerendering\");\n return true;\n } else if (nextProps.loadingGraph !== this.props.loadingGraph) {\n return true;\n } else {\n return false;\n }\n }\n\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n render() {\n if (this.props.loadingGraph) return React.createElement(Spinner, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 32\n },\n __self: this\n });\n\n if (this.props.data == null) {\n return React.createElement(\"div\", {\n className: \"card-body text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 35\n },\n __self: this\n }, React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Press \", React.createElement(\"span\", {\n className: \"badge badge-info\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Show Graph\"), \" to see the graph representation of the experiment.\"), React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"If the experiment is running, press \", React.createElement(\"span\", {\n className: \"badge badge-dark\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"Start Job Monitor\"), \" to start a live tracker of the changes on the experiment's jobs. This process will automatically update the graph's nodes colors and show a log of the detected changes.\"));\n }\n\n var nodes_array = [];\n var edges_array = [];\n\n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: {\n background: node.status_color,\n border: \"black\"\n },\n level: node.level\n }));\n this.props.data.edges.map(edge => edges_array.push({\n from: edge.from,\n to: edge.to\n }));\n }\n\n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n const options = {\n edges: {\n arrows: {\n to: {\n enabled: true\n }\n }\n },\n layout: {\n //improvedLayout: true,\n hierarchical: {\n // enabled: true,\n nodeSpacing: 250,\n treeSpacing: 200,\n blockShifting: false,\n edgeMinimization: true,\n //parentCentralization: true,\n direction: 'UD',\n sortMethod: 'directed'\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true\n },\n physics: {\n enabled: false\n },\n nodes: {\n shape: 'dot'\n }\n };\n const graph = {\n nodes: nodes,\n edges: edges\n };\n\n class VisNetwork extends Component {\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else {\n return false;\n }\n }\n\n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", params => {\n //console.log(params);\n if (params.nodes) {\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n });\n } // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n\n\n render() {\n return React.createElement(\"div\", {\n className: \"card-body p-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 132\n },\n __self: this\n }, React.createElement(\"div\", {\n ref: \"myRef\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 133\n },\n __self: this\n }));\n }\n\n }\n\n this.updateVisNodes(nodes);\n return React.createElement(VisNetwork, {\n graph: graph,\n options: options,\n updateSelection: this.props.updateSelection,\n shouldUpdateGraph: this.props.shouldUpdateGraph,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 141\n },\n __self: this\n });\n }\n\n}\n\nconst experimentStyle = {\n height: 600\n};\nexport default GraphNativeRep;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js"],"names":["React","Component","Spinner","vis","GraphNativeRep","updateVisNodes","nodes","props","setVisData","shouldComponentUpdate","nextProps","nextState","shouldUpdateGraph","data","pkl_timestamp","console","log","loadingGraph","componentWillUnmount","cleanGraphData","render","nodes_array","edges_array","edges","map","node","push","id","label","color","background","status_color","border","level","edge","from","to","DataSet","options","arrows","enabled","layout","hierarchical","nodeSpacing","treeSpacing","blockShifting","edgeMinimization","direction","sortMethod","interaction","dragNodes","hoverConnectedEdges","navigationButtons","physics","shape","graph","VisNetwork","componentDidMount","network","Network","refs","myRef","on","params","updateSelection","experimentStyle","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,SAAhB,QAAiC,OAAjC,C,CACA;;AACA,OAAOC,OAAP,MAAoB,mBAApB;AACA,OAAOC,GAAP,MAAgB,KAAhB;;AAEA,MAAMC,cAAN,SAA6BH,SAA7B,CAAuC;AAAA;AAAA;;AAAA,SAmBnCI,cAnBmC,GAmBjBC,KAAD,IAAW;AACxB,WAAKC,KAAL,CAAWC,UAAX,CAAsBF,KAAtB;AACH,KArBkC;AAAA;;AAEnCG,EAAA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AG;AACL,eACI;AAAK,UAAA,SAAS,EAAC,eAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,WACI;AAAK,UAAA,GAAG,EAAC,OAAT;AAAiB,UAAA,KAAK,EAAE6C,eAAxB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,UADJ,CADJ;AAKH;;AAjC8B;;AAoCnC,SAAK5D,cAAL,CAAoBC,KAApB;AAEA,WAAO,oBAAC,UAAD;AACH,MAAA,KAAK,EAAEiD,KADJ;AAEH,MAAA,OAAO,EAAEjB,OAFN;AAGH,MAAA,eAAe,EAAE,KAAK/B,KAAL,CAAWyD,eAHzB;AAIH,MAAA,iBAAiB,EAAE,KAAKzD,KAAL,CAAWK,iBAJ3B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAAP;AAOH;;AA9IkC;;AA4JvC,MAAMqD,eAAe,GAAG;AACpBC,EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,eAAe9D,cAAf","sourcesContent":["import React, { Component } from \"react\";\n// import vis from \"vis-network\";\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n\n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true\n }else if (nextProps.data && this.props.data && (nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp)){\n console.log(\"Rerendering\")\n return true;\n }else if (nextProps.loadingGraph !== this.props.loadingGraph){\n return true; \n }else{\n return false;\n }\n }\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n updateVisNodes = (nodes) => {\n this.props.setVisData(nodes);\n }\n\n\n\n render () {\n if (this.props.loadingGraph) return ;\n if (this.props.data == null){\n return (\n
\n

Press Show Graph to see the graph representation of the experiment.

\n

If the experiment is running, press Start Job Monitor to start a live tracker of the changes on the experiment's jobs.\n This process will automatically update the graph's nodes colors and show a log of the detected changes.\n

\n
\n );\n }\n\n var nodes_array = [];\n var edges_array = [];\n \n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: { background: node.status_color, border: \"black\" },\n level: node.level,\n })\n );\n \n this.props.data.edges.map(edge => \n edges_array.push({ from: edge.from, to: edge.to })\n );\n }\n \n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n\n\n const options = {\n edges: {\n arrows: {\n to: { enabled: true }\n }\n },\n layout: {\n //improvedLayout: true,\n hierarchical: {\n // enabled: true,\n nodeSpacing: 250,\n treeSpacing: 200,\n blockShifting: false,\n edgeMinimization: true,\n //parentCentralization: true,\n direction: 'UD',\n sortMethod: 'directed',\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true,\n },\n physics: {\n enabled: false,\n },\n nodes: {\n shape: 'dot',\n }\n };\n \n const graph = {\n nodes : nodes,\n edges : edges,\n };\n\n class VisNetwork extends Component {\n \n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true;\n } else {\n return false;\n }\n }\n \n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", (params) => {\n //console.log(params);\n if (params.nodes){\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n \n });\n }\n \n // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n \n render() { \n return (\n
\n
\n
\n );\n }\n }\n\n this.updateVisNodes(nodes);\n \n return ;\n\n }\n\n\n \n\n \n\n \n \n\n \n\n}\n\nconst experimentStyle = {\n height: 600\n };\n\nexport default GraphNativeRep;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/d4f46f7f2fdbaf3baae0e5e5e62d1227.json b/node_modules/.cache/babel-loader/d4f46f7f2fdbaf3baae0e5e5e62d1227.json new file mode 100644 index 0000000000000000000000000000000000000000..74daf76b9e4ace5b8cc76ff3953fbdbd93a28335 --- /dev/null +++ b/node_modules/.cache/babel-loader/d4f46f7f2fdbaf3baae0e5e5e62d1227.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/Selection.js\";\nimport React, { useContext, Fragment } from 'react';\nimport ExperimentContext from '../context/experiment/experimentContext';\n\nconst Selection = () => {\n const experimentContext = useContext(ExperimentContext);\n const selection = experimentContext.selection,\n data = experimentContext.data,\n experiment = experimentContext.experiment; // const { model, branch, hpc } = experiment;\n //var currentSelection = \"Node: \"\n\n var currentNode = \"\";\n var selectedNode = null;\n\n if (selection) {\n //console.log(\"Current selection \" + selection)\n selection.map(node => // currentSelection += node + \", \"\n currentNode = node); //console.log(\"Current node \" + currentNode)\n\n selectedNode = data.nodes.find(node => node.id === currentNode); //console.log(\"Selected node\")\n //console.log(\"Data: \" + selectedNode.id + \" \" + selectedNode.platform_name)\n }\n\n return React.createElement(Fragment, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 23\n },\n __self: this\n }, selectedNode && React.createElement(Fragment, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 25\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 26\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-12\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 27\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"card text-white bg-info\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 28\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"card-header text-center p-0\",\n style: headerCard,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 29\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"mh-100 px-0 mx-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 30\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 31\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 31\n },\n __self: this\n }, selectedNode.id)))), React.createElement(\"div\", {\n className: \"card-body py-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 34\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 35\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Date:\"), \" \", selectedNode.date)), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 38\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 39\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-12\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 40\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 41\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 41\n },\n __self: this\n }, \"Section:\"), \" \", selectedNode.section)))), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 45\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 46\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-12\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 47\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 48\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 48\n },\n __self: this\n }, \"Platform:\"), \" \", selectedNode.platform_name && selectedNode.platform_name, \" \", !selectedNode.platform_name && experiment.hpc)))), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 55\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 56\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-6\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 57\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 58\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 58\n },\n __self: this\n }, \"Processors:\"), \" \", selectedNode.processors)), React.createElement(\"div\", {\n className: \"col-6\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 60\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 61\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 61\n },\n __self: this\n }, \"Wallclock:\"), \" \", selectedNode.wallclock)))), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 65\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 66\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-6\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 67\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 68\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 68\n },\n __self: this\n }, \"Level:\"), \" \", selectedNode.level)), React.createElement(\"div\", {\n className: \"col-6\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 70\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 71\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 71\n },\n __self: this\n }, \"Out:\"), \" \", selectedNode.children, \" \", React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 71\n },\n __self: this\n }, \"In:\"), \" \", selectedNode.parents, \" \")))), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 76\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 77\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-12\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 78\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 79\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 79\n },\n __self: this\n }, \"Status:\")), \" \", selectedNode.status))), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 86\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 87\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-12\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 88\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 89\n },\n __self: this\n }, \"c:\", data.max_children, \"/p:\", data.max_parents, \"- ac:\", data.avg_children, \"/ap:\", data.avg_parents, \"- tj:\", data.total_jobs))))))))), !selectedNode && data && React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 104\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-12\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 105\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"card text-white bg-info\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 106\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"card-header text-center py-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 107\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 108\n },\n __self: this\n }, \"Here goes the Job Id\")), React.createElement(\"div\", {\n className: \"card-body\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 110\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"text-center\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 111\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 112\n },\n __self: this\n }, \"Select a Node to see more information.\")))))));\n};\n\nconst experimentStyle = {\n height: 200\n};\nconst headerCard = {\n height: 30\n};\nexport default Selection;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/Selection.js"],"names":["React","useContext","Fragment","ExperimentContext","Selection","experimentContext","selection","data","experiment","currentNode","selectedNode","map","node","nodes","find","id","experimentStyle","headerCard","date","section","platform_name","hpc","processors","wallclock","level","children","parents","status","max_children","max_parents","avg_children","avg_parents","total_jobs","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,UAAhB,EAA4BC,QAA5B,QAA4C,OAA5C;AACA,OAAOC,iBAAP,MAA8B,yCAA9B;;AAEA,MAAMC,SAAS,GAAG,MAAM;AACpB,QAAMC,iBAAiB,GAAGJ,UAAU,CAACE,iBAAD,CAApC;AADoB,QAEZG,SAFY,GAEoBD,iBAFpB,CAEZC,SAFY;AAAA,QAEDC,IAFC,GAEoBF,iBAFpB,CAEDE,IAFC;AAAA,QAEKC,UAFL,GAEoBH,iBAFpB,CAEKG,UAFL,EAGpB;AACA;;AACA,MAAIC,WAAW,GAAG,EAAlB;AACA,MAAIC,YAAY,GAAG,IAAnB;;AACA,MAAIJ,SAAJ,EAAe;AACX;AACAA,IAAAA,SAAS,CAACK,GAAV,CAAcC,IAAI,IACd;AACAH,IAAAA,WAAW,GAAGG,IAFlB,EAFW,CAMX;;AACAF,IAAAA,YAAY,GAAGH,IAAI,CAACM,KAAL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tB,YAAD,IAAiBH,IAAjB,IACG;AAAK,IAAA,SAAS,EAAC,KAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACI;AAAK,IAAA,SAAS,EAAC,QAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACI;AAAK,IAAA,SAAS,EAAC,yBAAf;AAAyC,IAAA,KAAK,EAAES,eAAhD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACI;AAAK,IAAA,SAAS,EAAC,8BAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACI;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,4BADJ,CADJ,EAII;AAAK,IAAA,SAAS,EAAC,WAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACI;AAAK,IAAA,SAAS,EAAC,aAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,8CADA,CADJ,CAJJ,CADJ,CADJ,CAjFZ,CADJ;AAsGH,CAxHD;;AA0HA,MAAMA,eAAe,GAAG;AACpBiB,EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,MAAMhB,UAAU,GAAG;AACfgB,EAAAA,MAAM,EAAE;AADO,CAAnB;AAIA,eAAe7B,SAAf","sourcesContent":["import React, { useContext, Fragment } from 'react'\nimport ExperimentContext from '../context/experiment/experimentContext';\n\nconst Selection = () => {\n const experimentContext = useContext(ExperimentContext);\n const { selection, data, experiment } = experimentContext;\n // const { model, branch, hpc } = experiment;\n //var currentSelection = \"Node: \"\n var currentNode = \"\"\n var selectedNode = null\n if (selection) {\n //console.log(\"Current selection \" + selection)\n selection.map(node => (\n // currentSelection += node + \", \"\n currentNode = node\n ));\n //console.log(\"Current node \" + currentNode)\n selectedNode = data.nodes.find(node => node.id === currentNode) \n //console.log(\"Selected node\")\n //console.log(\"Data: \" + selectedNode.id + \" \" + selectedNode.platform_name)\n } \n return (\n \n {selectedNode &&\n \n
\n
\n
\n
\n
\n {selectedNode.id}\n
\n
\n
\n
\n Date: {selectedNode.date}\n
\n
\n
\n
\n Section: {selectedNode.section}\n
\n
\n
\n
\n
\n
\n Platform: {selectedNode.platform_name && selectedNode.platform_name} {!selectedNode.platform_name && experiment.hpc}\n
\n
\n
\n {/*
\n Priority: {selectedNode.priority}\n
*/}\n
\n
\n
\n Processors: {selectedNode.processors}\n
\n
\n Wallclock: {selectedNode.wallclock}\n
\n
\n
\n
\n
\n
\n Level: {selectedNode.level}\n
\n
\n Out: {selectedNode.children} In: {selectedNode.parents} \n
\n \n
\n
\n
\n
\n
\n Status: {selectedNode.status}\n
\n {/*
\n c:{data.max_children}/p:{data.max_parents}\n
*/}\n
\n
\n
\n
\n
\n \n c:{data.max_children}/p:{data.max_parents} \n - ac:{data.avg_children}/ap:{data.avg_parents} \n - tj:{data.total_jobs} \n \n
\n
\n
\n
\n
\n
\n
\n
\n } \n {!selectedNode && data &&\n
\n
\n
\n
\n Here goes the Job Id\n
\n
\n
\n Select a Node to see more information. \n
\n
\n
\n
\n
\n } \n
\n \n \n\n )\n}\n\nconst experimentStyle = {\n height: 200\n };\n\nconst headerCard = {\n height: 30\n}\n\nexport default Selection;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/d7253657f019975fe2b77b8ed4aff558.json b/node_modules/.cache/babel-loader/d7253657f019975fe2b77b8ed4aff558.json new file mode 100644 index 0000000000000000000000000000000000000000..d76952838fa7ba166f5d27ac321aa06b1b690644 --- /dev/null +++ b/node_modules/.cache/babel-loader/d7253657f019975fe2b77b8ed4aff558.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js\";\nimport React, { Component } from \"react\"; // import vis from \"vis-network\";\n\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n constructor(...args) {\n super(...args);\n\n this.updateVisNodes = nodes => {\n this.props.setVisData(nodes);\n };\n }\n\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else if (nextProps.data && this.props.data && nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp) {\n console.log(\"Rerendering\");\n return true;\n } else if (nextProps.loadingGraph !== this.props.loadingGraph) {\n return true;\n } else {\n return false;\n }\n }\n\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n render() {\n if (this.props.loadingGraph) return React.createElement(Spinner, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 32\n },\n __self: this\n });\n\n if (this.props.data == null) {\n return React.createElement(\"div\", {\n className: \"card-body text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 35\n },\n __self: this\n }, React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Press \", React.createElement(\"span\", {\n className: \"badge badge-info\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Show Graph\"), \" to see the graph representation of the experiment.\"), React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"If the experiment is running, press \", React.createElement(\"span\", {\n className: \"badge badge-dark\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"Start Job Monitor\"), \" to start a live tracker of the changes on the experiment's jobs. This process will automatically update the graph's nodes colors and show a log of the detected changes.\"));\n }\n\n var nodes_array = [];\n var edges_array = [];\n\n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: {\n background: node.status_color,\n border: \"black\"\n },\n level: node.level\n }));\n this.props.data.edges.map(edge => edges_array.push({\n from: edge.from,\n to: edge.to\n }));\n }\n\n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n const options = {\n edges: {\n arrows: {\n to: {\n enabled: true\n }\n }\n },\n layout: {\n //improvedLayout: true,\n hierarchical: {\n // enabled: true,\n nodeSpacing: 250,\n edgeMinimization: true,\n parentCentralization: true,\n direction: 'UD',\n sortMethod: 'hubsize'\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true\n },\n physics: {\n enabled: false\n },\n nodes: {\n shape: 'dot'\n }\n };\n const graph = {\n nodes: nodes,\n edges: edges\n };\n\n class VisNetwork extends Component {\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else {\n return false;\n }\n }\n\n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", params => {\n //console.log(params);\n if (params.nodes) {\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n });\n } // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n\n\n render() {\n return React.createElement(\"div\", {\n className: \"card-body p-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 130\n },\n __self: this\n }, React.createElement(\"div\", {\n ref: \"myRef\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 131\n },\n __self: this\n }));\n }\n\n }\n\n this.updateVisNodes(nodes);\n return React.createElement(VisNetwork, {\n graph: graph,\n options: options,\n updateSelection: this.props.updateSelection,\n shouldUpdateGraph: this.props.shouldUpdateGraph,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 139\n },\n __self: this\n });\n }\n\n}\n\nconst experimentStyle = {\n height: 600\n};\nexport default GraphNativeRep;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js"],"names":["React","Component","Spinner","vis","GraphNativeRep","updateVisNodes","nodes","props","setVisData","shouldComponentUpdate","nextProps","nextState","shouldUpdateGraph","data","pkl_timestamp","console","log","loadingGraph","componentWillUnmount","cleanGraphData","render","nodes_array","edges_array","edges","map","node","push","id","label","color","background","status_color","border","level","edge","from","to","DataSet","options","arrows","enabled","layout","hierarchical","nodeSpacing","edgeMinimization","parentCentralization","direction","sortMethod","interaction","dragNodes","hoverConnectedEdges","navigationButtons","physics","shape","graph","VisNetwork","componentDidMount","network","Network","refs","myRef","on","params","updateSelection","experimentStyle","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,SAAhB,QAAiC,OAAjC,C,CACA;;AACA,OAAOC,OAAP,MAAoB,mBAApB;AACA,OAAOC,GAAP,MAAgB,KAAhB;;AAEA,MAAMC,cAAN,SAA6BH,SAA7B,CAAuC;AAAA;AAAA;;AAAA,SAmBnCI,cAnBmC,GAmBjBC,KAAD,IAAW;AACxB,WAAKC,KAAL,CAAWC,UAAX,CAAsBF,KAAtB;AACH,KArBkC;AAAA;;AAEnCG,EAAAA,qBAAqB,CAACC,SAAD,EAAYC,SAAZ,EAAsB;AACvC,QAAI,KAAKJ,KAAL,CAAWK,iBAAX,KAAiC,IAArC,EAA0C;AACtC,aAAO,IAAP;AACD,KAFH,MAEQ,IAAIF,SAAS,CAACG,IAAV,IAAkB,KAAKN,KAAL,CAAWM,IAA7B,IAAsCH,SAAS,CAACG,IAAV,CAAeC,aAAf,KAAiC,KAAKP,KAAL,CAAWM,IAAX,CAAgBC,aAA3F,EAA0G;AAC9GC,MAAAA,OAAO,CAACC,GAAR,CAAY,aAAZ;AACA,aAAO,IAAP;AACD,KAHK,MAGA,IAAIN,SAAS,CAACO,YAAV,KAA2B,KAAKV,KAAL,CAAWU,YAA1C,EAAuD;AAC3D,aAAO,IAAP;AACD,KAFK,MAED;AACH,aAAO,KAAP;AACD;AACN;;AACDC,EAAAA,oBAAoB,GAAG;AACnBH,IAAAA,OAAO,CAACC,GAAR,CAAY,YAAZ;AACA,SAAKT,KAAL,CAAWY,cAAX;AACH;;AAQDC,EAAAA,MAAM,GAAI;AACN,QAAI,KAAKb,KAAL,CAAWU,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rC,iBAAO,IAAP;AACH,SAFF,MAEQ;AACH,iBAAO,KAAP;AACH;AACJ;;AAED4C,MAAAA,iBAAiB,GAAG;AAChB,YAAIC,OAAO,GAAG,IAAItD,GAAG,CAACuD,OAAR,CAAgB,KAAKC,IAAL,CAAUC,KAA1B,EAAiC,KAAKrD,KAAL,CAAW+C,KAA5C,EAAmD,KAAK/C,KAAL,CAAW+B,OAA9D,CAAd;AACAmB,QAAAA,OAAO,CAACI,EAAR,CAAW,OAAX,EAAqBC,MAAD,IAAY;AAC5B;AACA,cAAIA,MAAM,CAACxD,KAAX,EAAiB;AACb;AACA,iBAAKC,KAAL,CAAWwD,eAAX,CAA2BD,MAAM,CAACxD,KAAlC;AACH;AAEJ,SAPD;AAQH,OApB8B,CAsB/B;AACA;AACA;AACA;;;AAEAc,MAAAA,MAAM,GAAG;AACL,eACI;AAAK,UAAA,SAAS,EAAC,eAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,WACI;AAAK,UAAA,GAAG,EAAC,OAAT;AAAiB,UAAA,KAAK,EAAE4C,eAAxB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,UADJ,CADJ;AAKH;;AAjC8B;;AAoCnC,SAAK3D,cAAL,CAAoBC,KAApB;AAEA,WAAO,oBAAC,UAAD;AACH,MAAA,KAAK,EAAEgD,KADJ;AAEH,MAAA,OAAO,EAAEhB,OAFN;AAGH,MAAA,eAAe,EAAE,KAAK/B,KAAL,CAAWwD,eAHzB;AAIH,MAAA,iBAAiB,EAAE,KAAKxD,KAAL,CAAWK,iBAJ3B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAAP;AAOH;;AA5IkC;;AA0JvC,MAAMoD,eAAe,GAAG;AACpBC,EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,eAAe7D,cAAf","sourcesContent":["import React, { Component } from \"react\";\n// import vis from \"vis-network\";\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n\n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true\n }else if (nextProps.data && this.props.data && (nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp)){\n console.log(\"Rerendering\")\n return true;\n }else if (nextProps.loadingGraph !== this.props.loadingGraph){\n return true; \n }else{\n return false;\n }\n }\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n updateVisNodes = (nodes) => {\n this.props.setVisData(nodes);\n }\n\n\n\n render () {\n if (this.props.loadingGraph) return ;\n if (this.props.data == null){\n return (\n
\n

Press Show Graph to see the graph representation of the experiment.

\n

If the experiment is running, press Start Job Monitor to start a live tracker of the changes on the experiment's jobs.\n This process will automatically update the graph's nodes colors and show a log of the detected changes.\n

\n
\n );\n }\n\n var nodes_array = [];\n var edges_array = [];\n \n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: { background: node.status_color, border: \"black\" },\n level: node.level,\n })\n );\n \n this.props.data.edges.map(edge => \n edges_array.push({ from: edge.from, to: edge.to })\n );\n }\n \n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n\n\n const options = {\n edges: {\n arrows: {\n to: { enabled: true }\n }\n },\n layout: {\n //improvedLayout: true,\n hierarchical: {\n // enabled: true,\n nodeSpacing: 250,\n edgeMinimization: true,\n parentCentralization: true,\n direction: 'UD',\n sortMethod: 'hubsize',\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true,\n },\n physics: {\n enabled: false,\n },\n nodes: {\n shape: 'dot',\n }\n };\n \n const graph = {\n nodes : nodes,\n edges : edges,\n };\n\n class VisNetwork extends Component {\n \n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true;\n } else {\n return false;\n }\n }\n \n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", (params) => {\n //console.log(params);\n if (params.nodes){\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n \n });\n }\n \n // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n \n render() { \n return (\n
\n
\n
\n );\n }\n }\n\n this.updateVisNodes(nodes);\n \n return ;\n\n }\n\n\n \n\n \n\n \n \n\n \n\n}\n\nconst experimentStyle = {\n height: 600\n };\n\nexport default GraphNativeRep;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/db6cb993fc5c0d722974eb587446612c.json b/node_modules/.cache/babel-loader/db6cb993fc5c0d722974eb587446612c.json new file mode 100644 index 0000000000000000000000000000000000000000..0b9a17c5d7849d6bd84efa5e91384426f17c7e4b --- /dev/null +++ b/node_modules/.cache/babel-loader/db6cb993fc5c0d722974eb587446612c.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js\";\nimport React, { useContext, Component } from \"react\"; // import vis from \"vis-network\";\n\nimport Spinner from \"../layout/Spinner\";\nimport ExperimentContext from '../context/experiment/experimentContext';\nimport vis from \"vis\";\n\nconst GraphNativeRep = () => {\n const experimentContext = useContext(ExperimentContext);\n const data = experimentContext.data,\n loadingGraph = experimentContext.loadingGraph,\n cleanGraphData = experimentContext.cleanGraphData,\n updateSelection = experimentContext.updateSelection;\n if (loadingGraph) return React.createElement(Spinner, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 11\n },\n __self: this\n });\n\n if (data === null) {\n return React.createElement(\"div\", {\n className: \"card-body text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 14\n },\n __self: this\n }, React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 15\n },\n __self: this\n }, \"Press \", React.createElement(\"span\", {\n className: \"badge badge-info\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 15\n },\n __self: this\n }, \"Show Graph\"), \" to see the graph representation of the experiment.\"), React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 16\n },\n __self: this\n }, \"If the experiment is running, press \", React.createElement(\"span\", {\n className: \"badge badge-dark\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 16\n },\n __self: this\n }, \"Start Job Monitor\"), \" to start a live tracker of the changes on the experiment's jobs. This process will automatically update the graph's nodes colors and show a log of the detected changes.\"));\n }\n\n var nodes_array = [];\n var edges_array = [];\n\n if (data.nodes !== null || data.edges !== null) {\n data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: {\n background: node.status_color,\n border: \"black\"\n } //level: node.priority,\n\n }));\n data.edges.map(edge => edges_array.push({\n from: edge.from,\n to: edge.to\n }));\n }\n\n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n const options = {\n edges: {\n arrows: {\n to: {\n enabled: true\n }\n }\n },\n layout: {\n improvedLayout: true,\n hierarchical: {\n nodeSpacing: 250,\n edgeMinimization: false,\n blockShifting: false,\n parentCentralization: false,\n direction: 'UD',\n sortMethod: 'directed'\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true\n },\n physics: {\n enabled: false\n },\n nodes: {\n shape: 'dot'\n }\n };\n const graph = {\n nodes: nodes,\n edges: edges\n };\n\n class VisNetwork extends Component {\n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, graph, options);\n network.on(\"click\", function (params) {\n console.log(params);\n\n if (params.nodes) {\n updateSelection(params.nodes);\n }\n });\n }\n\n componentWillUnmount() {\n cleanGraphData();\n }\n\n render() {\n return React.createElement(\"div\", {\n className: \"card-body p-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 100\n },\n __self: this\n }, React.createElement(\"div\", {\n ref: \"myRef\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 101\n },\n __self: this\n }));\n }\n\n }\n\n return React.createElement(VisNetwork, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 107\n },\n __self: this\n });\n};\n\nconst experimentStyle = {\n height: 600\n};\nexport default GraphNativeRep;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js"],"names":["React","useContext","Component","Spinner","ExperimentContext","vis","GraphNativeRep","experimentContext","data","loadingGraph","cleanGraphData","updateSelection","nodes_array","edges_array","nodes","edges","map","node","push","id","label","color","background","status_color","border","edge","from","to","DataSet","options","arrows","enabled","layout","improvedLayout","hierarchical","nodeSpacing","edgeMinimization","blockShifting","parentCentralization","direction","sortMethod","interaction","dragNodes","hoverConnectedEdges","navigationButtons","physics","shape","graph","VisNetwork","componentDidMount","network","Network","refs","myRef","on","params","console","log","componentWillUnmount","render","experimentStyle","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,UAAhB,EAA4BC,SAA5B,QAA6C,OAA7C,C,CACA;;AACA,OAAOC,OAAP,MAAoB,mBAApB;AACA,OAAOC,iBAAP,MAA8B,yCAA9B;AACA,OAAOC,GAAP,MAAgB,KAAhB;;AAEA,MAAMC,cAAc,GAAG,MAAM;AAEzB,QAAMC,iBAAiB,GAAGN,UAAU,CAACG,iBAAD,CAApC;AAFyB,QAGjBI,IAHiB,GAGuCD,iBAHvC,CAGjBC,IAHiB;AAAA,QAGXC,YAHW,GAGuCF,iBAHvC,CAGXE,YAHW;AAAA,QAGGC,cAHH,GAGuCH,iBAHvC,CAGGG,cAHH;AAAA,QAGmBC,eAHnB,GAGuCJ,iBAHvC,CAGmBI,eAHnB;AAIzB,MAAIF,YAAJ,EAAkB,OAAO,oBAAC,OAAD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAAP;;AAClB,MAAID,IAAI,KAAK,IAAb,EAAmB;AACf,WACI;AAAK,MAAA,SAAS,EAAC,qBAAf;AAAA;AAAA;AAAA;AAAA;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AAA,oBAAoB,GAAG;AACnBhD,MAAAA,cAAc;AACjB;;AAEDiD,IAAAA,MAAM,GAAG;AACL,aACI;AAAK,QAAA,SAAS,EAAC,eAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,SACI;AAAK,QAAA,GAAG,EAAC,OAAT;AAAiB,QAAA,KAAK,EAAEC,eAAxB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,QADJ,CADJ;AAKH;;AAvB8B;;AA0BnC,SAAO,oBAAC,UAAD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAAP;AAEH,CAtGD;;AAwGA,MAAMA,eAAe,GAAG;AACpBC,EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,eAAevD,cAAf","sourcesContent":["import React, { useContext, Component } from \"react\";\n// import vis from \"vis-network\";\nimport Spinner from \"../layout/Spinner\";\nimport ExperimentContext from '../context/experiment/experimentContext';\nimport vis from \"vis\";\n\nconst GraphNativeRep = () => {\n\n const experimentContext = useContext(ExperimentContext); \n const { data, loadingGraph, cleanGraphData, updateSelection } = experimentContext;\n if (loadingGraph) return \n if (data === null) {\n return (\n
\n

Press Show Graph to see the graph representation of the experiment.

\n

If the experiment is running, press Start Job Monitor to start a live tracker of the changes on the experiment's jobs.\n This process will automatically update the graph's nodes colors and show a log of the detected changes.\n

\n
\n );\n }\n\n var nodes_array = [];\n var edges_array = [];\n\n if (data.nodes !== null || data.edges !== null) {\n data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: { background: node.status_color, border: \"black\" },\n //level: node.priority,\n })\n );\n \n data.edges.map(edge => \n edges_array.push({ from: edge.from, to: edge.to })\n );\n }\n\n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n\n const options = {\n edges: {\n arrows: {\n to: { enabled: true }\n }\n },\n layout: {\n improvedLayout: true,\n hierarchical: {\n \n nodeSpacing: 250,\n edgeMinimization: false,\n blockShifting: false,\n parentCentralization: false,\n direction: 'UD',\n sortMethod: 'directed',\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true,\n },\n physics: {\n enabled: false,\n },\n nodes: {\n shape: 'dot',\n }\n };\n\n const graph = {\n nodes : nodes,\n edges : edges,\n };\n \n\n class VisNetwork extends Component {\n \n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, graph, options);\n network.on(\"click\", function(params) {\n console.log(params);\n if (params.nodes){\n updateSelection(params.nodes);\n }\n \n });\n }\n\n componentWillUnmount() {\n cleanGraphData();\n }\n\n render() { \n return (\n
\n
\n
\n );\n }\n }\n\n return ;\n\n}\n\nconst experimentStyle = {\n height: 600\n };\n\nexport default GraphNativeRep;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/db826c340e3a7f175e45a00297317345.json b/node_modules/.cache/babel-loader/db826c340e3a7f175e45a00297317345.json new file mode 100644 index 0000000000000000000000000000000000000000..fa8d408bcde708b935d2dd5f8e13976b991d3a24 --- /dev/null +++ b/node_modules/.cache/babel-loader/db826c340e3a7f175e45a00297317345.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js\";\nimport React, { Component } from \"react\"; // import vis from \"vis-network\";\n\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n shouldComponentUpdate(nextProps, nextState) {\n if (nextProps.data && this.props.data) {\n console.log(\"Rerendering\");\n return true;\n } else if (nextProps.loadingGraph !== this.props.loadingGraph) {\n return true;\n } else {\n return false;\n }\n }\n\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n render() {\n if (this.props.loadingGraph) return React.createElement(Spinner, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 27\n },\n __self: this\n });\n\n if (this.props.data == null) {\n return React.createElement(\"div\", {\n className: \"card-body text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 30\n },\n __self: this\n }, React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 31\n },\n __self: this\n }, \"Press \", React.createElement(\"span\", {\n className: \"badge badge-info\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 31\n },\n __self: this\n }, \"Show Graph\"), \" to see the graph representation of the experiment.\"), React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 32\n },\n __self: this\n }, \"If the experiment is running, press \", React.createElement(\"span\", {\n className: \"badge badge-dark\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 32\n },\n __self: this\n }, \"Start Job Monitor\"), \" to start a live tracker of the changes on the experiment's jobs. This process will automatically update the graph's nodes colors and show a log of the detected changes.\"));\n }\n\n var nodes_array = [];\n var edges_array = [];\n\n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: {\n background: node.status_color,\n border: \"black\"\n } //level: node.priority,\n\n }));\n this.props.data.edges.map(edge => edges_array.push({\n from: edge.from,\n to: edge.to\n }));\n }\n\n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n const options = {\n edges: {\n arrows: {\n to: {\n enabled: true\n }\n }\n },\n layout: {\n improvedLayout: true,\n hierarchical: {\n nodeSpacing: 250,\n edgeMinimization: false,\n blockShifting: false,\n parentCentralization: false,\n direction: 'UD',\n sortMethod: 'directed'\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true\n },\n physics: {\n enabled: false\n },\n nodes: {\n shape: 'dot'\n }\n };\n const graph = {\n nodes: nodes,\n edges: edges\n };\n\n class VisNetwork extends Component {\n // shouldComponentUpdate(nextProps, nextState){ \n // if (nextProps.loadingGraph !== this.props.loadingGraph){\n // return true; \n // }else{\n // return false;\n // }\n // }\n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", params => {\n //console.log(params);\n if (params.nodes) {\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n });\n } // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n\n\n render() {\n return React.createElement(\"div\", {\n className: \"card-body p-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 125\n },\n __self: this\n }, React.createElement(\"div\", {\n ref: \"myRef\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 126\n },\n __self: this\n }));\n }\n\n }\n\n return React.createElement(VisNetwork, {\n graph: graph,\n options: options,\n updateSelection: this.props.updateSelection,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 132\n },\n __self: this\n });\n }\n\n}\n\nconst experimentStyle = {\n height: 600\n};\nexport default GraphNativeRep;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js"],"names":["React","Component","Spinner","vis","GraphNativeRep","shouldComponentUpdate","nextProps","nextState","data","props","console","log","loadingGraph","componentWillUnmount","cleanGraphData","render","nodes_array","edges_array","nodes","edges","map","node","push","id","label","color","background","status_color","border","edge","from","to","DataSet","options","arrows","enabled","layout","improvedLayout","hierarchical","nodeSpacing","edgeMinimization","blockShifting","parentCentralization","direction","sortMethod","interaction","dragNodes","hoverConnectedEdges","navigationButtons","physics","shape","graph","VisNetwork","componentDidMount","network","Network","refs","myRef","on","params","updateSelection","experimentStyle","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,SAAhB,QAAiC,OAAjC,C,CACA;;AACA,OAAOC,OAAP,MAAoB,mBAApB;AACA,OAAOC,GAAP,MAAgB,KAAhB;;AAEA,MAAMC,cAAN,SAA6BH,SAA7B,CAAuC;AAEnCI,EAAAA,qBAAqB,CAACC,SAAD,EAAYC,SAAZ,EAAsB;AAEvC,QAAID,SAAS,CAACE,IAAV,IAAkB,KAAKC,K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AAe,GAAG;AACpBC,EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,eAAe1D,cAAf","sourcesContent":["import React, { Component } from \"react\";\n// import vis from \"vis-network\";\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n\n shouldComponentUpdate(nextProps, nextState){ \n \n if (nextProps.data && this.props.data){\n console.log(\"Rerendering\")\n return true;\n }else if (nextProps.loadingGraph !== this.props.loadingGraph){\n return true; \n }else{\n return false;\n }\n }\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n\n\n render() {\n if (this.props.loadingGraph) return ;\n if (this.props.data == null){\n return (\n
\n

Press Show Graph to see the graph representation of the experiment.

\n

If the experiment is running, press Start Job Monitor to start a live tracker of the changes on the experiment's jobs.\n This process will automatically update the graph's nodes colors and show a log of the detected changes.\n

\n
\n );\n }\n\n var nodes_array = [];\n var edges_array = [];\n \n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: { background: node.status_color, border: \"black\" },\n //level: node.priority,\n })\n );\n \n this.props.data.edges.map(edge => \n edges_array.push({ from: edge.from, to: edge.to })\n );\n }\n \n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n\n const options = {\n edges: {\n arrows: {\n to: { enabled: true }\n }\n },\n layout: {\n improvedLayout: true,\n hierarchical: {\n \n nodeSpacing: 250,\n edgeMinimization: false,\n blockShifting: false,\n parentCentralization: false,\n direction: 'UD',\n sortMethod: 'directed',\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true,\n },\n physics: {\n enabled: false,\n },\n nodes: {\n shape: 'dot',\n }\n };\n \n const graph = {\n nodes : nodes,\n edges : edges,\n };\n\n class VisNetwork extends Component {\n \n // shouldComponentUpdate(nextProps, nextState){ \n // if (nextProps.loadingGraph !== this.props.loadingGraph){\n // return true; \n // }else{\n // return false;\n // }\n // }\n \n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", (params) => {\n //console.log(params);\n if (params.nodes){\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n \n });\n }\n \n // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n \n render() { \n return (\n
\n
\n
\n );\n }\n }\n \n return ;\n\n }\n\n\n \n\n \n\n \n \n\n \n\n}\n\nconst experimentStyle = {\n height: 600\n };\n\nexport default GraphNativeRep;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/dcafb3935a6a38b19becc1c0441e5e5e.json b/node_modules/.cache/babel-loader/dcafb3935a6a38b19becc1c0441e5e5e.json new file mode 100644 index 0000000000000000000000000000000000000000..4b88f1cd8cf309ab381d404edaf12f1b434d547f --- /dev/null +++ b/node_modules/.cache/babel-loader/dcafb3935a6a38b19becc1c0441e5e5e.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/Selection.js\";\nimport React, { useContext, Fragment } from 'react';\nimport ExperimentContext from '../context/experiment/experimentContext';\n\nconst Selection = () => {\n const experimentContext = useContext(ExperimentContext);\n const selection = experimentContext.selection,\n data = experimentContext.data,\n experiment = experimentContext.experiment; // const { model, branch, hpc } = experiment;\n //var currentSelection = \"Node: \"\n\n var currentNode = \"\";\n var selectedNode = null;\n\n if (selection) {\n //console.log(\"Current selection \" + selection)\n selection.map(node => // currentSelection += node + \", \"\n currentNode = node); //console.log(\"Current node \" + currentNode)\n\n selectedNode = data.nodes.find(node => node.id === currentNode); //console.log(\"Selected node\")\n //console.log(\"Data: \" + selectedNode.id + \" \" + selectedNode.platform_name)\n }\n\n return React.createElement(Fragment, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 23\n },\n __self: this\n }, selectedNode && React.createElement(Fragment, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 25\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 26\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-12\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 27\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"card text-white bg-info\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 28\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"card-header text-center py-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 29\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 30\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 30\n },\n __self: this\n }, selectedNode.id))), React.createElement(\"div\", {\n className: \"card-body py-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 32\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 33\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 34\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 34\n },\n __self: this\n }, \"Date:\"), \" \", selectedNode.date)), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-12\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 38\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 39\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 39\n },\n __self: this\n }, \"Section:\"), \" \", selectedNode.section)))), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 43\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 44\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-8\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 45\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 46\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 46\n },\n __self: this\n }, \"Platform:\"), \" \", selectedNode.platform_name && selectedNode.platform_name, \" \", !selectedNode.platform_name && experiment.hpc)), React.createElement(\"div\", {\n className: \"col-4 text-right\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 48\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 49\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 49\n },\n __self: this\n }, \"c:\", data.max_children, \"/p:\", data.max_parents))))), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 56\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 57\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-6\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 58\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 59\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 59\n },\n __self: this\n }, \"Processors:\"), \" \", selectedNode.processors)), React.createElement(\"div\", {\n className: \"col-6\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 61\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 62\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 62\n },\n __self: this\n }, \"Wallclock:\"), \" \", selectedNode.wallclock)))), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 66\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 67\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-6\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 68\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 69\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 69\n },\n __self: this\n }, \"Level:\"), \" \", selectedNode.level)), React.createElement(\"div\", {\n className: \"col-6\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 71\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 72\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 72\n },\n __self: this\n }, \"Out:\"), \" \", selectedNode.children, \" \", React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 72\n },\n __self: this\n }, \"In:\"), \" \", selectedNode.parents, \" \")))), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 77\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 78\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 78\n },\n __self: this\n }, \"Status:\")), \" \", selectedNode.status)))))), !selectedNode && data && React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 87\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-12\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 88\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"card text-white bg-info\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 89\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"card-header text-center py-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 90\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 91\n },\n __self: this\n }, \"Here goes the Job Id\")), React.createElement(\"div\", {\n className: \"card-body\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 93\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"text-center\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 94\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 95\n },\n __self: this\n }, \"Select a Node to see more information.\")))))));\n};\n\nconst experimentStyle = {\n height: 200\n};\nconst headerCard = {\n height: 10\n};\nexport default Selection;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/Selection.js"],"names":["React","useContext","Fragment","ExperimentContext","Selection","experimentContext","selection","data","experiment","currentNode","selectedNode","map","node","nodes","find","id","experimentStyle","date","section","platform_name","hpc","max_children","max_parents","processors","wallclock","level","children","parents","status","height","headerCard"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,UAAhB,EAA4BC,QAA5B,QAA4C,OAA5C;AACA,OAAOC,iBAAP,MAA8B,yCAA9B;;AAEA,MAAMC,SAAS,GAAG,MAAM;AACpB,QAAMC,iBAAiB,GAAGJ,UAAU,CAACE,iBAAD,CAApC;AADoB,QAEZG,SAFY,GAEoBD,iBAFpB,CAEZC,SAFY;AAAA,QAEDC,IAFC,GAEoBF,iBAFpB,CAEDE,IAFC;AAAA,QAEKC,UAFL,GAEoBH,iBAFpB,CAEKG,UAFL,EAGpB;AACA;;AACA,MAAIC,WAAW,GAAG,EAAlB;AACA,MAAIC,YAAY,GAAG,IAAnB;;AACA,MAAIJ,SAAJ,EAAe;AACX;AACAA,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,EAAC,8BAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACI;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,4BADJ,CADJ,EAII;AAAK,IAAA,SAAS,EAAC,WAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACI;AAAK,IAAA,SAAS,EAAC,aAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,8CADA,CADJ,CAJJ,CADJ,CADJ,CAhEZ,CADJ;AAqFH,CAvGD;;AAyGA,MAAMA,eAAe,GAAG;AACpBa,EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,MAAMC,UAAU,GAAG;AACfD,EAAAA,MAAM,EAAE;AADO,CAAnB;AAIA,eAAezB,SAAf","sourcesContent":["import React, { useContext, Fragment } from 'react'\nimport ExperimentContext from '../context/experiment/experimentContext';\n\nconst Selection = () => {\n const experimentContext = useContext(ExperimentContext);\n const { selection, data, experiment } = experimentContext;\n // const { model, branch, hpc } = experiment;\n //var currentSelection = \"Node: \"\n var currentNode = \"\"\n var selectedNode = null\n if (selection) {\n //console.log(\"Current selection \" + selection)\n selection.map(node => (\n // currentSelection += node + \", \"\n currentNode = node\n ));\n //console.log(\"Current node \" + currentNode)\n selectedNode = data.nodes.find(node => node.id === currentNode) \n //console.log(\"Selected node\")\n //console.log(\"Data: \" + selectedNode.id + \" \" + selectedNode.platform_name)\n } \n return (\n \n {selectedNode &&\n \n
\n
\n
\n
\n {selectedNode.id}\n
\n
\n
\n Date: {selectedNode.date}\n
\n
\n
\n
\n Section: {selectedNode.section}\n
\n
\n
\n
\n
\n
\n Platform: {selectedNode.platform_name && selectedNode.platform_name} {!selectedNode.platform_name && experiment.hpc}\n
\n
\n c:{data.max_children}/p:{data.max_parents}\n
\n
\n
\n {/*
\n Priority: {selectedNode.priority}\n
*/}\n
\n
\n
\n Processors: {selectedNode.processors}\n
\n
\n Wallclock: {selectedNode.wallclock}\n
\n
\n
\n
\n
\n
\n Level: {selectedNode.level}\n
\n
\n Out: {selectedNode.children} In: {selectedNode.parents} \n
\n \n
\n
\n
\n Status: {selectedNode.status}\n
\n
\n
\n
\n
\n
\n } \n {!selectedNode && data &&\n
\n
\n
\n
\n Here goes the Job Id\n
\n
\n
\n Select a Node to see more information. \n
\n
\n
\n
\n
\n } \n
\n \n \n\n )\n}\n\nconst experimentStyle = {\n height: 200\n };\n\nconst headerCard = {\n height: 10\n}\n\nexport default Selection;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/e0162deadcdb9beee83d547036a78aa1.json b/node_modules/.cache/babel-loader/e0162deadcdb9beee83d547036a78aa1.json new file mode 100644 index 0000000000000000000000000000000000000000..5588ba71c414669dbe3d5e8bd761a20e2df22004 --- /dev/null +++ b/node_modules/.cache/babel-loader/e0162deadcdb9beee83d547036a78aa1.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js\";\nimport React, { Component } from \"react\"; // import vis from \"vis-network\";\n\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n constructor(...args) {\n super(...args);\n\n this.updateVisNodes = nodes => {\n this.props.setVisData(nodes);\n };\n }\n\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else if (nextProps.data && this.props.data && nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp) {\n console.log(\"Rerendering\");\n return true;\n } else if (nextProps.loadingGraph !== this.props.loadingGraph) {\n return true;\n } else {\n return false;\n }\n }\n\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n render() {\n if (this.props.loadingGraph) return React.createElement(Spinner, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 32\n },\n __self: this\n });\n\n if (this.props.data == null) {\n return React.createElement(\"div\", {\n className: \"card-body text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 35\n },\n __self: this\n }, React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Press \", React.createElement(\"span\", {\n className: \"badge badge-info\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Show Graph\"), \" to see the graph representation of the experiment.\"), React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"If the experiment is running, press \", React.createElement(\"span\", {\n className: \"badge badge-dark\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"Start Job Monitor\"), \" to start a live tracker of the changes on the experiment's jobs. This process will automatically update the graph's nodes colors and show a log of the detected changes.\"));\n }\n\n var nodes_array = [];\n var edges_array = [];\n\n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: {\n background: node.status_color,\n border: \"black\"\n },\n level: node.level\n }));\n this.props.data.edges.map(edge => edges_array.push({\n from: edge.from,\n to: edge.to\n }));\n }\n\n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n const options = {\n edges: {\n arrows: {\n to: {\n enabled: true\n }\n }\n },\n layout: {\n improvedLayout: false,\n hierarchical: {\n nodeSpacing: 190,\n //blockShifting: true,\n //edgeMinimization: true,\n //parentCentralization: true,\n sortMethod: 'hubsize',\n direction: 'UD'\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true\n },\n physics: {\n enabled: false\n },\n nodes: {\n shape: 'dot',\n font: {\n size: 10\n }\n }\n };\n const graph = {\n nodes: nodes,\n edges: edges\n };\n\n class VisNetwork extends Component {\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else {\n return false;\n }\n }\n\n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", params => {\n //console.log(params);\n if (params.nodes) {\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n });\n } // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n\n\n render() {\n return React.createElement(\"div\", {\n className: \"card-body p-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 133\n },\n __self: this\n }, React.createElement(\"div\", {\n ref: \"myRef\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 134\n },\n __self: this\n }));\n }\n\n }\n\n this.updateVisNodes(nodes);\n return React.createElement(VisNetwork, {\n graph: graph,\n options: options,\n updateSelection: this.props.updateSelection,\n shouldUpdateGraph: this.props.shouldUpdateGraph,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 142\n },\n __self: this\n });\n }\n\n}\n\nconst experimentStyle = {\n height: 600\n};\nexport default GraphNativeRep;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js"],"names":["React","Component","Spinner","vis","GraphNativeRep","updateVisNodes","nodes","props","setVisData","shouldComponentUpdate","nextProps","nextState","shouldUpdateGraph","data","pkl_timestamp","console","log","loadingGraph","componentWillUnmount","cleanGraphData","render","nodes_array","edges_array","edges","map","node","push","id","label","color","background","status_color","border","level","edge","from","to","DataSet","options","arrows","enabled","layout","improvedLayout","hierarchical","nodeSpacing","sortMethod","direction","interaction","dragNodes","hoverConnectedEdges","navigationButtons","physics","shape","font","size","graph","VisNetwork","componentDidMount","network","Network","refs","myRef","on","params","updateSelection","experimentStyle","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,SAAhB,QAAiC,OAAjC,C,CACA;;AACA,OAAOC,OAAP,MAAoB,mBAApB;AACA,OAAOC,GAAP,MAAgB,KAAhB;;AAEA,MAAMC,cAAN,SAA6BH,SAA7B,CAAuC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,KAAL,CAAWyD,eAAX,CAA2BD,MAAM,CAACzD,KAAlC;AACH;AAEJ,SAPD;AAQH,OApB8B,CAsB/B;AACA;AACA;AACA;;;AAEAc,MAAAA,MAAM,GAAG;AACL,eACI;AAAK,UAAA,SAAS,EAAC,eAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,WACI;AAAK,UAAA,GAAG,EAAC,OAAT;AAAiB,UAAA,KAAK,EAAE6C,eAAxB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,UADJ,CADJ;AAKH;;AAjC8B;;AAoCnC,SAAK5D,cAAL,CAAoBC,KAApB;AAEA,WAAO,oBAAC,UAAD;AACH,MAAA,KAAK,EAAEiD,KADJ;AAEH,MAAA,OAAO,EAAEjB,OAFN;AAGH,MAAA,eAAe,EAAE,KAAK/B,KAAL,CAAWyD,eAHzB;AAIH,MAAA,iBAAiB,EAAE,KAAKzD,KAAL,CAAWK,iBAJ3B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAAP;AAOH;;AA/IkC;;AA6JvC,MAAMqD,eAAe,GAAG;AACpBC,EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,eAAe9D,cAAf","sourcesContent":["import React, { Component } from \"react\";\n// import vis from \"vis-network\";\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n\n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true\n }else if (nextProps.data && this.props.data && (nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp)){\n console.log(\"Rerendering\")\n return true;\n }else if (nextProps.loadingGraph !== this.props.loadingGraph){\n return true; \n }else{\n return false;\n }\n }\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n updateVisNodes = (nodes) => {\n this.props.setVisData(nodes);\n }\n\n\n\n render () {\n if (this.props.loadingGraph) return ;\n if (this.props.data == null){\n return (\n
\n

Press Show Graph to see the graph representation of the experiment.

\n

If the experiment is running, press Start Job Monitor to start a live tracker of the changes on the experiment's jobs.\n This process will automatically update the graph's nodes colors and show a log of the detected changes.\n

\n
\n );\n }\n\n var nodes_array = [];\n var edges_array = [];\n \n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: { background: node.status_color, border: \"black\" },\n level: node.level,\n })\n );\n \n this.props.data.edges.map(edge => \n edges_array.push({ from: edge.from, to: edge.to })\n );\n }\n \n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n\n\n const options = {\n edges: {\n arrows: {\n to: { enabled: true }\n }\n },\n layout: {\n improvedLayout: false,\n hierarchical: {\n nodeSpacing: 190,\n //blockShifting: true,\n //edgeMinimization: true,\n //parentCentralization: true,\n sortMethod: 'hubsize',\n direction: 'UD',\n }\n }, \n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true,\n },\n physics: {\n enabled: false,\n },\n nodes: {\n shape: 'dot',\n font: {\n size: 10,\n },\n }\n };\n \n const graph = {\n nodes : nodes,\n edges : edges,\n };\n\n class VisNetwork extends Component {\n \n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true;\n } else {\n return false;\n }\n }\n \n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", (params) => {\n //console.log(params);\n if (params.nodes){\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n \n });\n }\n \n // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n \n render() { \n return (\n
\n
\n
\n );\n }\n }\n\n this.updateVisNodes(nodes);\n \n return ;\n\n }\n\n\n \n\n \n\n \n \n\n \n\n}\n\nconst experimentStyle = {\n height: 600\n };\n\nexport default GraphNativeRep;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/e01a7415dca773100e87889ae4eb821b.json b/node_modules/.cache/babel-loader/e01a7415dca773100e87889ae4eb821b.json new file mode 100644 index 0000000000000000000000000000000000000000..b18941b62c3187518a8062405c235af112df8894 --- /dev/null +++ b/node_modules/.cache/babel-loader/e01a7415dca773100e87889ae4eb821b.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js\";\nimport React, { Component } from \"react\"; // import vis from \"vis-network\";\n\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n constructor(...args) {\n super(...args);\n\n this.updateVisNodes = nodes => {\n this.props.setVisData(nodes);\n };\n }\n\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else if (nextProps.data && this.props.data && nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp) {\n console.log(\"Rerendering\");\n return true;\n } else if (nextProps.loadingGraph !== this.props.loadingGraph) {\n return true;\n } else {\n return false;\n }\n }\n\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n render() {\n if (this.props.loadingGraph) return React.createElement(Spinner, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 32\n },\n __self: this\n });\n\n if (this.props.data == null) {\n return React.createElement(\"div\", {\n className: \"card-body text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 35\n },\n __self: this\n }, React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Press \", React.createElement(\"span\", {\n className: \"badge badge-info\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Show Graph\"), \" to see the graph representation of the experiment.\"), React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"If the experiment is running, press \", React.createElement(\"span\", {\n className: \"badge badge-dark\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"Start Job Monitor\"), \" to start a live tracker of the changes on the experiment's jobs. This process will automatically update the graph's nodes colors and show a log of the detected changes.\"));\n }\n\n var nodes_array = [];\n var edges_array = [];\n\n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: {\n background: node.status_color,\n border: \"black\"\n },\n level: node.level\n }));\n this.props.data.edges.map(edge => edges_array.push({\n from: edge.from,\n to: edge.to\n }));\n }\n\n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n const options = {\n edges: {\n arrows: {\n to: {\n enabled: true\n }\n }\n },\n layout: {\n //improvedLayout: true,\n hierarchical: {\n // enabled: true,\n nodeSpacing: 250,\n treeSpacing: 200,\n blockShifting: false,\n //edgeMinimization: true,\n parentCentralization: true,\n direction: 'UD',\n sortMethod: 'directed'\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true\n },\n physics: {\n enabled: false\n },\n nodes: {\n shape: 'dot'\n }\n };\n const graph = {\n nodes: nodes,\n edges: edges\n };\n\n class VisNetwork extends Component {\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else {\n return false;\n }\n }\n\n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", params => {\n //console.log(params);\n if (params.nodes) {\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n });\n } // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n\n\n render() {\n return React.createElement(\"div\", {\n className: \"card-body p-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 132\n },\n __self: this\n }, React.createElement(\"div\", {\n ref: \"myRef\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 133\n },\n __self: this\n }));\n }\n\n }\n\n this.updateVisNodes(nodes);\n return React.createElement(VisNetwork, {\n graph: graph,\n options: options,\n updateSelection: this.props.updateSelection,\n shouldUpdateGraph: this.props.shouldUpdateGraph,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 141\n },\n __self: this\n });\n }\n\n}\n\nconst experimentStyle = {\n height: 600\n};\nexport default GraphNativeRep;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js"],"names":["React","Component","Spinner","vis","GraphNativeRep","updateVisNodes","nodes","props","setVisData","shouldComponentUpdate","nextProps","nextState","shouldUpdateGraph","data","pkl_timestamp","console","log","loadingGraph","componentWillUnmount","cleanGraphData","render","nodes_array","edges_array","edges","map","node","push","id","label","color","background","status_color","border","level","edge","from","to","DataSet","options","arrows","enabled","layout","hierarchical","nodeSpacing","treeSpacing","blockShifting","parentCentralization","direction","sortMethod","interaction","dragNodes","hoverConnectedEdges","navigationButtons","physics","shape","graph","VisNetwork","componentDidMount","network","Network","refs","myRef","on","params","updateSelection","experimentStyle","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,SAAhB,QAAiC,OAAjC,C,CACA;;AACA,OAAOC,OAAP,MAAoB,mBAApB;AACA,OAAOC,GAAP,MAAgB,KAAhB;;AAEA,MAAMC,cAAN,SAA6BH,SAA7B,CAAuC;AAAA;AAAA;;AAAA,SAmBnCI,cAnBmC,GAmBjBC,KAAD,IAAW;AACxB,WAAKC,KAAL,CAAWC,UAAX,CAAsBF,KAAtB;AACH,KArBkC;AAAA;;AAEnCG,EAAAA,qBAAqB,CAACC,SAAD,EAAYC,SAAZ,EAAsB;AACvC,QAAI,KAAKJ,KAAL,CAAWK,iBAAX,KAAiC,IAArC,EAA0C;AACtC,aAAO,IAAP;AACD,KAFH,MAEQ,IAAIF,SAAS,CAACG,IAAV,IAAkB,KAAKN,KAAL,CAAWM,IAA7B,IAAsCH,SAAS,CAACG,I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AAK5D,cAAL,CAAoBC,KAApB;AAEA,WAAO,oBAAC,UAAD;AACH,MAAA,KAAK,EAAEiD,KADJ;AAEH,MAAA,OAAO,EAAEjB,OAFN;AAGH,MAAA,eAAe,EAAE,KAAK/B,KAAL,CAAWyD,eAHzB;AAIH,MAAA,iBAAiB,EAAE,KAAKzD,KAAL,CAAWK,iBAJ3B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAAP;AAOH;;AA9IkC;;AA4JvC,MAAMqD,eAAe,GAAG;AACpBC,EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,eAAe9D,cAAf","sourcesContent":["import React, { Component } from \"react\";\n// import vis from \"vis-network\";\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n\n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true\n }else if (nextProps.data && this.props.data && (nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp)){\n console.log(\"Rerendering\")\n return true;\n }else if (nextProps.loadingGraph !== this.props.loadingGraph){\n return true; \n }else{\n return false;\n }\n }\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n updateVisNodes = (nodes) => {\n this.props.setVisData(nodes);\n }\n\n\n\n render () {\n if (this.props.loadingGraph) return ;\n if (this.props.data == null){\n return (\n
\n

Press Show Graph to see the graph representation of the experiment.

\n

If the experiment is running, press Start Job Monitor to start a live tracker of the changes on the experiment's jobs.\n This process will automatically update the graph's nodes colors and show a log of the detected changes.\n

\n
\n );\n }\n\n var nodes_array = [];\n var edges_array = [];\n \n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: { background: node.status_color, border: \"black\" },\n level: node.level,\n })\n );\n \n this.props.data.edges.map(edge => \n edges_array.push({ from: edge.from, to: edge.to })\n );\n }\n \n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n\n\n const options = {\n edges: {\n arrows: {\n to: { enabled: true }\n }\n },\n layout: {\n //improvedLayout: true,\n hierarchical: {\n // enabled: true,\n nodeSpacing: 250,\n treeSpacing: 200,\n blockShifting: false,\n //edgeMinimization: true,\n parentCentralization: true,\n direction: 'UD',\n sortMethod: 'directed',\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true,\n },\n physics: {\n enabled: false,\n },\n nodes: {\n shape: 'dot',\n }\n };\n \n const graph = {\n nodes : nodes,\n edges : edges,\n };\n\n class VisNetwork extends Component {\n \n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true;\n } else {\n return false;\n }\n }\n \n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", (params) => {\n //console.log(params);\n if (params.nodes){\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n \n });\n }\n \n // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n \n render() { \n return (\n
\n
\n
\n );\n }\n }\n\n this.updateVisNodes(nodes);\n \n return ;\n\n }\n\n\n \n\n \n\n \n \n\n \n\n}\n\nconst experimentStyle = {\n height: 600\n };\n\nexport default GraphNativeRep;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/e2a7a052a91a42397e8e6a48d6ba7f76.json b/node_modules/.cache/babel-loader/e2a7a052a91a42397e8e6a48d6ba7f76.json new file mode 100644 index 0000000000000000000000000000000000000000..eb48632f8cf07b1549d60f0717dd4e95bf0ce2f3 --- /dev/null +++ b/node_modules/.cache/babel-loader/e2a7a052a91a42397e8e6a48d6ba7f76.json @@ -0,0 +1 @@ +{"ast":null,"code":"import _slicedToArray from \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/node_modules/@babel/runtime/helpers/esm/slicedToArray\";\nvar _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/context/experiment/ExperimentState.js\";\nimport React, { useReducer } from 'react';\nimport axios from 'axios';\nimport ExperimentContext from './experimentContext';\nimport ExperimentReducer from './experimentReducer';\nimport { SEARCH_EXPERIMENTS, SET_LOADING, CLEAR_EXPERIMENTS, GET_EXPERIMENT, GET_GRAPH, SET_LOADING_GRAPH, CLEAN_GRAPH_DATA, UPDATE_SELECTION, GET_EXPERIMENT_RUN, SET_LOADING_RUN, CLEAN_RUN_DATA, SET_AUTOUPDATE_RUN, GET_PKL_DATA, SET_LOADING_PKL, UPDATE_NODES, SHOULD_UPDATE_GRAPH, SET_AUTOUPDATE_PKL, CLEAN_PKL_DATA, SET_PKL_CHANGES, UPDATE_EXPERIMENT_TS, SET_VIS_DATA } from '../types';\n\nconst ExperimentState = props => {\n const initialState = {\n experiments: [],\n experiment: {},\n loading: false,\n data: null,\n rundata: null,\n pkldata: null,\n pklchanges: null,\n loadingGraph: false,\n loadingRun: false,\n loadingPkl: false,\n selection: null,\n enabledGraphSearch: true,\n startAutoUpdateRun: false,\n startAutoUpdatePkl: false,\n shouldUpdateGraph: false,\n visNodes: null\n };\n\n const _useReducer = useReducer(ExperimentReducer, initialState),\n _useReducer2 = _slicedToArray(_useReducer, 2),\n state = _useReducer2[0],\n dispatch = _useReducer2[1]; // Search Experiments\n\n\n const searchExperiments = async text => {\n setLoading();\n const res = await axios.get(\"http://84.88.185.30:8888/search/\".concat(text));\n dispatch({\n type: SEARCH_EXPERIMENTS,\n payload: res.data.experiment\n });\n }; // Get Experiment\n\n\n const getExperiment = async expid => {\n setLoading(); //cleanGraphData();\n\n const res = await axios.get(\"http://84.88.185.30:8888/expinfo/\".concat(expid));\n dispatch({\n type: GET_EXPERIMENT,\n payload: res.data\n });\n }; // Get Experiment Graph\n\n\n const getExperimentGraph = async expid => {\n setLoadingGraph();\n const res = await axios.get(\"http://84.88.185.30:8888/graph/\".concat(expid));\n console.log(res.data);\n dispatch({\n type: GET_GRAPH,\n payload: res.data\n }); //this.setState({ data: res.data, loading: false, showGraph: !res.data.error });\n }; // Get Experiment Run\n\n\n const getExperimentRun = async expid => {\n setLoadingRun();\n const res = await axios.get(\"http://84.88.185.30:8888/exprun/\".concat(expid));\n console.log(res.data);\n dispatch({\n type: GET_EXPERIMENT_RUN,\n payload: res.data\n });\n }; // Get Experiment Pkl Data\n\n\n const getExperimentPkl = async (expid, timeStamp) => {\n setLoadingPkl(); //timeStamp = 1000;\n\n const res = await axios.get(\"http://84.88.185.30:8888/pklinfo/\".concat(expid, \"/\").concat(timeStamp));\n console.log(res.data); // const actualPkl = res.data;\n\n let retrievedPkl = null;\n var jobs = {};\n var colorChanges = {};\n var changes = \"\";\n retrievedPkl = res.data;\n\n if (state.data !== null && retrievedPkl.has_changed === true && retrievedPkl.pkl_content.length > 0) {\n //console.log(retrievedPkl.pkl_content.length);\n for (var j = 0, job; j < retrievedPkl.pkl_content.length; j++) {\n job = retrievedPkl.pkl_content[j]; //console.log(job);\n\n jobs[job.name] = job; //console.log(jobs[job.name]);\n }\n\n let requireUpdate = false;\n console.log('Current ts: ' + state.experiment.pkl_timestamp);\n var newData = state.data; //console.log(newData.nodes);\n\n var expData = state.experiment;\n\n if (newData.nodes) {\n for (var i = 0; i < newData.nodes.length; i++) {\n // console.log(newNodes[i].id);\n //console.log(newData.nodes[i]);\n // console.log(jobs[ newNodes[i].id ]);\n if (newData.nodes[i].status_code !== jobs[newData.nodes[i].id].status_code) {\n // changes += newData.nodes[i].id + \" from \" + newData.nodes[i].status + \" to \" + jobs[ newData.nodes[i].id ].status + \" || \";\n changes += timeStampToDate(retrievedPkl.pkl_timestamp) + \": \" + newData.nodes[i].id + \" to \" + jobs[newData.nodes[i].id].status + \"\\n\";\n newData.nodes[i].status_code = jobs[newData.nodes[i].id].status_code;\n newData.nodes[i].status_color = jobs[newData.nodes[i].id].status_color;\n newData.nodes[i].status = jobs[newData.nodes[i].id].status; //console.log(newData.nodes[i].status_color)\n\n colorChanges[newData.nodes[i].id] = jobs[newData.nodes[i].id].status_color;\n requireUpdate = true;\n }\n }\n\n if (requireUpdate) {\n // console.log(newData.pkl_timestamp);\n // console.log(expData.pkl_timestamp);\n console.log(\"New ts: \" + retrievedPkl.pkl_timestamp);\n newData.pkl_timestamp = retrievedPkl.pkl_timestamp;\n expData.pkl_timestamp = retrievedPkl.pkl_timestamp; // console.log(newData.pkl_timestamp);\n // console.log(expData.pkl_timestamp);\n // console.log('Call Update');\n\n updateNodes(newData);\n updateExperimentTimeStamp(expData); // setUpdateGraph(true);\n // setUpdateGraph(false);\n\n if (state.pklchanges) {\n setPklChanges(changes + state.pklchanges);\n } else {\n setPklChanges(changes);\n }\n\n for (var key in colorChanges) {\n //console.log( key, colorChanges[key] );\n updateGraphColor(key, colorChanges[key]);\n }\n } else {\n console.log('No changes but updating pkl anyway.');\n expData.pkl_timestamp = retrievedPkl.pkl_timestamp;\n updateExperimentTimeStamp(expData);\n }\n }\n } // } else {\n // var t = new Date( retrievedPkl.pkl_timestamp );\n // var formatted = t.toISOString();\n // setPklChanges(\"No news yet... \" + formatted)\n // }\n\n\n dispatch({\n type: GET_PKL_DATA,\n payload: res.data\n });\n };\n\n const updateGraphColor = (idChange, newColor) => {\n state.visNodes.update({\n id: idChange,\n color: {\n background: newColor\n }\n });\n }; // Cleaning\n\n\n const clearExperiments = () => dispatch({\n type: CLEAR_EXPERIMENTS\n });\n\n const cleanGraphData = () => dispatch({\n type: CLEAN_GRAPH_DATA\n });\n\n const cleanRunData = () => dispatch({\n type: CLEAN_RUN_DATA\n });\n\n const cleanPklData = () => dispatch({\n type: CLEAN_PKL_DATA\n }); // Set Loading\n\n\n const setLoading = () => dispatch({\n type: SET_LOADING\n });\n\n const setLoadingGraph = () => dispatch({\n type: SET_LOADING_GRAPH\n });\n\n const setLoadingRun = () => dispatch({\n type: SET_LOADING_RUN\n });\n\n const setLoadingPkl = () => dispatch({\n type: SET_LOADING_PKL\n }); // Action Things\n\n\n const updateSelection = currentSelection => dispatch({\n type: UPDATE_SELECTION,\n payload: currentSelection\n });\n\n const updateNodes = newdata => dispatch({\n type: UPDATE_NODES,\n payload: newdata\n });\n\n const updateExperimentTimeStamp = newExperiment => dispatch({\n type: UPDATE_EXPERIMENT_TS,\n payload: newExperiment\n });\n\n const setAutoUpdateRun = value => dispatch({\n type: SET_AUTOUPDATE_RUN,\n payload: value\n });\n\n const setAutoUpdatePkl = value => dispatch({\n type: SET_AUTOUPDATE_PKL,\n payload: value\n });\n\n const setUpdateGraph = value => dispatch({\n type: SHOULD_UPDATE_GRAPH,\n payload: value\n });\n\n const setPklChanges = value => dispatch({\n type: SET_PKL_CHANGES,\n payload: value\n });\n\n const setVisData = value => dispatch({\n type: SET_VIS_DATA,\n payload: value\n }); // Other Utils\n\n\n const hashCode = value => {\n var hash = 0,\n i,\n chr;\n if (value.length === 0) return hash;\n\n for (i = 0; i < value.length; i++) {\n chr = value.charCodeAt(i);\n hash = (hash << 5) - hash + chr;\n hash |= 0; // Convert to 32bit integer\n }\n\n console.log(hash);\n return hash;\n };\n\n const timeStampToDate = value => {\n //console.log('Setting new format: ' + value);\n let formattedDate = \"\";\n var date = new Date(value * 1000);\n var hours = date.getHours();\n var minutes = \"0\" + date.getMinutes();\n var seconds = \"0\" + date.getSeconds();\n formattedDate = hours + ':' + minutes.substr(-2) + ':' + seconds.substr(-2); // formattedDate = date.toISOString();\n\n return formattedDate;\n };\n\n return React.createElement(ExperimentContext.Provider, {\n value: {\n experiments: state.experiments,\n experiment: state.experiment,\n loading: state.loading,\n loadingGraph: state.loadingGraph,\n loadingRun: state.loadingRun,\n loadingPkl: state.loadingPkl,\n data: state.data,\n rundata: state.rundata,\n pklchanges: state.pklchanges,\n selection: state.selection,\n enabledGraphSearch: state.enabledGraphSearch,\n startAutoUpdateRun: state.startAutoUpdateRun,\n startAutoUpdatePkl: state.startAutoUpdatePkl,\n shouldUpdateGraph: state.shouldUpdateGraph,\n visNodes: state.visNodes,\n setAutoUpdateRun,\n setAutoUpdatePkl,\n searchExperiments,\n clearExperiments,\n getExperiment,\n getExperimentGraph,\n cleanGraphData,\n cleanRunData,\n cleanPklData,\n setPklChanges,\n updateSelection,\n getExperimentRun,\n getExperimentPkl,\n hashCode,\n timeStampToDate,\n setVisData,\n updateGraphColor,\n setUpdateGraph\n },\n __source: {\n fileName: _jsxFileName,\n lineNumber: 241\n },\n __self: this\n }, props.children);\n};\n\nexport default ExperimentState;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/context/experiment/ExperimentState.js"],"names":["React","useReducer","axios","ExperimentContext","ExperimentReducer","SEARCH_EXPERIMENTS","SET_LOADING","CLEAR_EXPERIMENTS","GET_EXPERIMENT","GET_GRAPH","SET_LOADING_GRAPH","CLEAN_GRAPH_DATA","UPDATE_SELECTION","GET_EXPERIMENT_RUN","SET_LOADING_RUN","CLEAN_RUN_DATA","SET_AUTOUPDATE_RUN","GET_PKL_DATA","SET_LOADING_PKL","UPDATE_NODES","SHOULD_UPDATE_GRAPH","SET_AUTOUPDATE_PKL","CLEAN_PKL_DATA","SET_PKL_CHANGES","UPDATE_EXPERIMENT_TS","SET_VIS_DATA","ExperimentState","props","initialState","experiments","experiment","loading","data","rundata","pkldata","pklchanges","loadingGraph","loadingRun","loadingPkl","selection","enabledGraphSearch","startAutoUpdateRun","startAutoUpdatePkl","shouldUpdateGraph","visNodes","state","dispatch","searchExperiments","text","setLoading","res","get","type","payload","getExperiment","expid","getExperimentGraph","setLoadingGraph","console","log","getExperimentRun","setLoadingRun","getExperimentPkl","timeStamp","setLoadingPkl","retrievedPkl","jobs","colorChanges","changes","has_changed","pkl_content","length","j","job","name","requireUpdate","pkl_timestamp","newData","expData","nodes","i","status_code","id","timeStampToDate","status","status_color","updateNodes","updateExperimentTimeStamp","setPklChanges","key","updateGraphColor","idChange","newColor","update","color","background","clearExperiments","cleanGraphData","cleanRunData","cleanPklData","updateSelection","currentSelection","newdata","newExperiment","setAutoUpdateRun","value","setAutoUpdatePkl","setUpdateGraph","setVisData","hashCode","hash","chr","charCodeAt","formattedDate","date","Date","hours","getHours","minutes","getMinutes","seconds","getSeconds","substr","children"],"mappings":";;AAAA,OAAOA,KAAP,IAAgBC,UAAhB,QAAkC,OAAlC;AACA,OAAOC,KAAP,MAAkB,OAAlB;AACA,OAAOC,iBAAP,MAA8B,qBAA9B;AACA,OAAOC,iBAAP,MAA8B,qBAA9B;AACA,SACEC,kBADF,EAEEC,WAFF,EAGEC,iBAHF,EAIEC,cAJF,EAKEC,SALF,EAMEC,iBANF,EAOEC,gBAPF,EAQEC,gBARF,EASEC,kBATF,EAUEC,eAVF,EAWEC,cAXF,EAYEC,kBAZF,EAaEC,YAbF,EAcEC,eAdF,EAeEC,YAfF,EAgBEC,mBAhBF,EAiBEC,kBAjBF,EAkBEC,cAlBF,EAmBEC,eAnBF,EAoBEC,oBApBF,EAqBEC,YArBF,QAsBO,UAtBP;;AAwBA,MAAMC,eAAe,GAAGC,KAAK,IAAI;AAC7B,QAAMC,YAAY,GAAG;AACjBC,IAAAA,WAAW,EAAE,EADI;AAEjBC,IAAAA,UAAU,EAAE,EAFK;AAGjBC,IAAAA,OAAO,EAAE,KAHQ;AAIjBC,IAAAA,IAAI,EAAE,IAJW;AAKjBC,IAAAA,OAAO,EAAE,IALQ;AAMjBC,IAAAA,OAAO,EAAE,IANQ;AAOjBC,IAAAA,UAAU,EAAE,IAPK;AAQjBC,IAAAA,YAAY,EAAE,KARG;AASjBC,IAAAA,UAAU,EAAE,KATK;AAUjBC,IAAAA,UAAU,EAAE,KAVK;AAWjBC,IAAAA,SAAS,EAAE,IAXM;AAYjBC,IAAAA,kBAAkB,EAAE,IAZH;AAajBC,IAAAA,kBAAkB,EAAE,KAbH;AAcjBC,IAAAA,kBAAkB,EAAE,KAdH;AAejBC,IAAAA,iBAAiB,EAAE,KAfF;AAgBjBC,IAAAA,QAAQ,EAAE;AAhBO,GAArB;;AAD6B,sBAoBH3C,UAAU,CAACG,iBAA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ACN,SAVb;AAWJC,MAAAA,kBAAkB,EAAEK,KAAK,CAACL,kBAXtB;AAYJC,MAAAA,kBAAkB,EAAEI,KAAK,CAACJ,kBAZtB;AAaJC,MAAAA,kBAAkB,EAAEG,KAAK,CAACH,kBAbtB;AAcJC,MAAAA,iBAAiB,EAAEE,KAAK,CAACF,iBAdrB;AAeJC,MAAAA,QAAQ,EAAEC,KAAK,CAACD,QAfZ;AAgBJ4D,MAAAA,gBAhBI;AAiBJE,MAAAA,gBAjBI;AAkBJ3D,MAAAA,iBAlBI;AAmBJiD,MAAAA,gBAnBI;AAoBJ1C,MAAAA,aApBI;AAqBJE,MAAAA,kBArBI;AAsBJyC,MAAAA,cAtBI;AAuBJC,MAAAA,YAvBI;AAwBJC,MAAAA,YAxBI;AAyBJX,MAAAA,aAzBI;AA0BJY,MAAAA,eA1BI;AA2BJxC,MAAAA,gBA3BI;AA4BJE,MAAAA,gBA5BI;AA6BJ+C,MAAAA,QA7BI;AA8BJ1B,MAAAA,eA9BI;AA+BJyB,MAAAA,UA/BI;AAgCJlB,MAAAA,gBAhCI;AAiCJiB,MAAAA;AAjCI,KADR;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KAoCKhF,KAAK,CAACgG,QApCX,CADJ;AAwCH,CA3PD;;AA6PA,eAAejG,eAAf","sourcesContent":["import React, { useReducer } from 'react';\nimport axios from 'axios';\nimport ExperimentContext from './experimentContext';\nimport ExperimentReducer from './experimentReducer';\nimport {\n SEARCH_EXPERIMENTS,\n SET_LOADING,\n CLEAR_EXPERIMENTS,\n GET_EXPERIMENT,\n GET_GRAPH,\n SET_LOADING_GRAPH,\n CLEAN_GRAPH_DATA,\n UPDATE_SELECTION,\n GET_EXPERIMENT_RUN,\n SET_LOADING_RUN,\n CLEAN_RUN_DATA,\n SET_AUTOUPDATE_RUN,\n GET_PKL_DATA,\n SET_LOADING_PKL,\n UPDATE_NODES,\n SHOULD_UPDATE_GRAPH,\n SET_AUTOUPDATE_PKL,\n CLEAN_PKL_DATA,\n SET_PKL_CHANGES,\n UPDATE_EXPERIMENT_TS,\n SET_VIS_DATA,\n} from '../types';\n\nconst ExperimentState = props => {\n const initialState = {\n experiments: [],\n experiment: {},\n loading: false,\n data: null,\n rundata: null,\n pkldata: null,\n pklchanges: null,\n loadingGraph: false,\n loadingRun: false,\n loadingPkl: false,\n selection: null,\n enabledGraphSearch: true, \n startAutoUpdateRun: false, \n startAutoUpdatePkl: false,\n shouldUpdateGraph: false, \n visNodes: null, \n }\n\n const [state, dispatch] = useReducer(ExperimentReducer, initialState);\n\n // Search Experiments\n const searchExperiments = async text => {\n setLoading();\n const res = await axios.get(`http://84.88.185.30:8888/search/${text}`);\n dispatch({\n type: SEARCH_EXPERIMENTS,\n payload: res.data.experiment,\n });\n };\n\n // Get Experiment\n const getExperiment = async expid => {\n setLoading();\n //cleanGraphData();\n const res = await axios.get(`http://84.88.185.30:8888/expinfo/${expid}`); \n dispatch({\n type: GET_EXPERIMENT,\n payload: res.data,\n });\n };\n \n // Get Experiment Graph\n const getExperimentGraph = async expid => {\n setLoadingGraph();\n \n const res = await axios.get(`http://84.88.185.30:8888/graph/${expid}`);\n console.log(res.data);\n dispatch({\n type: GET_GRAPH,\n payload: res.data,\n });\n //this.setState({ data: res.data, loading: false, showGraph: !res.data.error });\n };\n\n // Get Experiment Run\n const getExperimentRun = async expid => {\n setLoadingRun();\n const res = await axios.get(`http://84.88.185.30:8888/exprun/${expid}`);\n console.log(res.data);\n dispatch({\n type: GET_EXPERIMENT_RUN,\n payload: res.data,\n });\n }\n\n // Get Experiment Pkl Data\n const getExperimentPkl = async (expid, timeStamp) => {\n setLoadingPkl();\n //timeStamp = 1000;\n const res = await axios.get(`http://84.88.185.30:8888/pklinfo/${expid}/${timeStamp}`);\n console.log(res.data);\n // const actualPkl = res.data;\n \n let retrievedPkl = null;\n var jobs = {};\n var colorChanges = {};\n var changes = \"\"\n retrievedPkl = res.data;\n if (state.data !== null && retrievedPkl.has_changed === true && retrievedPkl.pkl_content.length > 0){\n //console.log(retrievedPkl.pkl_content.length);\n for(var j = 0, job; j < retrievedPkl.pkl_content.length; j++){\n job = retrievedPkl.pkl_content[j];\n //console.log(job);\n jobs[ job.name ] = job;\n //console.log(jobs[job.name]);\n }\n let requireUpdate = false;\n console.log('Current ts: '+ state.experiment.pkl_timestamp); \n var newData = state.data;\n //console.log(newData.nodes);\n var expData = state.experiment;\n if (newData.nodes){\n for(var i = 0; i < newData.nodes.length; i++){\n // console.log(newNodes[i].id);\n //console.log(newData.nodes[i]);\n // console.log(jobs[ newNodes[i].id ]);\n\n if (newData.nodes[i].status_code !== jobs[ newData.nodes[i].id ].status_code){\n // changes += newData.nodes[i].id + \" from \" + newData.nodes[i].status + \" to \" + jobs[ newData.nodes[i].id ].status + \" || \";\n changes += timeStampToDate(retrievedPkl.pkl_timestamp) + \": \"+ newData.nodes[i].id + \" to \" + jobs[ newData.nodes[i].id ].status + \"\\n\";\n newData.nodes[i].status_code = jobs[ newData.nodes[i].id ].status_code;\n newData.nodes[i].status_color = jobs[ newData.nodes[i].id ].status_color;\n newData.nodes[i].status = jobs[ newData.nodes[i].id ].status;\n //console.log(newData.nodes[i].status_color)\n colorChanges[ newData.nodes[i].id ] = jobs[ newData.nodes[i].id ].status_color;\n requireUpdate = true;\n }\n }\n\n\n if (requireUpdate){ \n // console.log(newData.pkl_timestamp);\n // console.log(expData.pkl_timestamp);\n console.log(\"New ts: \" + retrievedPkl.pkl_timestamp)\n newData.pkl_timestamp = retrievedPkl.pkl_timestamp;\n expData.pkl_timestamp = retrievedPkl.pkl_timestamp;\n // console.log(newData.pkl_timestamp);\n // console.log(expData.pkl_timestamp);\n \n // console.log('Call Update');\n updateNodes(newData);\n updateExperimentTimeStamp(expData);\n // setUpdateGraph(true);\n // setUpdateGraph(false);\n if (state.pklchanges){\n setPklChanges(changes + state.pklchanges);\n } else {\n setPklChanges(changes);\n }\n\n for(var key in colorChanges) {\n //console.log( key, colorChanges[key] );\n updateGraphColor(key, colorChanges[key]);\n }\n \n \n } else { \n console.log('No changes but updating pkl anyway.')\n expData.pkl_timestamp = retrievedPkl.pkl_timestamp;\n updateExperimentTimeStamp(expData);\n }\n }\n }\n // } else {\n // var t = new Date( retrievedPkl.pkl_timestamp );\n // var formatted = t.toISOString();\n // setPklChanges(\"No news yet... \" + formatted)\n // }\n\n\n dispatch({\n type: GET_PKL_DATA,\n payload: res.data,\n });\n }\n\n const updateGraphColor = (idChange, newColor) => {\n state.visNodes.update({id:idChange, color: { background: newColor }});\n }\n\n\n // Cleaning\n const clearExperiments = () => dispatch({ type: CLEAR_EXPERIMENTS });\n const cleanGraphData = () => dispatch({ type: CLEAN_GRAPH_DATA });\n const cleanRunData = () => dispatch({ type: CLEAN_RUN_DATA });\n const cleanPklData = () => dispatch({ type: CLEAN_PKL_DATA });\n\n // Set Loading\n const setLoading = () => dispatch({ type: SET_LOADING });\n const setLoadingGraph = () => dispatch({ type: SET_LOADING_GRAPH });\n const setLoadingRun = () => dispatch({ type: SET_LOADING_RUN });\n const setLoadingPkl = () => dispatch({ type: SET_LOADING_PKL });\n\n\n // Action Things\n const updateSelection = (currentSelection) => dispatch({ type: UPDATE_SELECTION, payload: currentSelection });\n const updateNodes = (newdata) => dispatch({ type: UPDATE_NODES, payload: newdata });\n const updateExperimentTimeStamp = (newExperiment) => dispatch({ type: UPDATE_EXPERIMENT_TS, payload: newExperiment});\n const setAutoUpdateRun = (value) => dispatch({ type: SET_AUTOUPDATE_RUN, payload: value });\n const setAutoUpdatePkl = (value) => dispatch({ type: SET_AUTOUPDATE_PKL, payload: value });\n const setUpdateGraph = (value) => dispatch({ type: SHOULD_UPDATE_GRAPH, payload: value });\n const setPklChanges = (value) => dispatch({ type: SET_PKL_CHANGES, payload: value });\n const setVisData = (value) => dispatch({ type: SET_VIS_DATA, payload: value});\n\n // Other Utils\n const hashCode = (value) => {\n var hash = 0, i, chr;\n if (value.length === 0) return hash;\n for (i = 0; i < value.length; i++) {\n chr = value.charCodeAt(i);\n hash = ((hash << 5) - hash) + chr;\n hash |= 0; // Convert to 32bit integer\n }\n console.log(hash);\n return hash;\n };\n \n const timeStampToDate = (value) => {\n //console.log('Setting new format: ' + value);\n let formattedDate = \"\";\n var date = new Date( value * 1000);\n var hours = date.getHours();\n var minutes = \"0\" + date.getMinutes();\n var seconds = \"0\" + date.getSeconds();\n formattedDate = hours + ':' + minutes.substr(-2) + ':' + seconds.substr(-2);\n // formattedDate = date.toISOString();\n return formattedDate;\n }\n\n return (\n \n {props.children}\n \n );\n};\n\nexport default ExperimentState;"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/e397418c24687196d590358669cf83df.json b/node_modules/.cache/babel-loader/e397418c24687196d590358669cf83df.json new file mode 100644 index 0000000000000000000000000000000000000000..6897ea88228d86a94fb854300b29385f93f90b11 --- /dev/null +++ b/node_modules/.cache/babel-loader/e397418c24687196d590358669cf83df.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js\";\nimport React, { Component } from \"react\"; // import vis from \"vis-network\";\n\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis-network\";\n\nclass GraphNativeRep extends Component {\n constructor(...args) {\n super(...args);\n\n this.updateVisNodes = nodes => {\n this.props.setVisData(nodes);\n };\n }\n\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else if (nextProps.data && this.props.data && nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp) {\n console.log(\"Rerendering\");\n return true;\n } else if (nextProps.loadingGraph !== this.props.loadingGraph) {\n return true;\n } else {\n return false;\n }\n }\n\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n render() {\n if (this.props.loadingGraph) return React.createElement(Spinner, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 32\n },\n __self: this\n });\n\n if (this.props.data == null) {\n return React.createElement(\"div\", {\n className: \"card-body text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 35\n },\n __self: this\n }, React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Press \", React.createElement(\"span\", {\n className: \"badge badge-info\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Show Graph\"), \" to see the graph representation of the experiment.\"), React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"If the experiment is running, press \", React.createElement(\"span\", {\n className: \"badge badge-dark\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"Start Job Monitor\"), \" to start a live tracker of the changes on the experiment's jobs. This process will automatically update the graph's nodes colors and show a log of the detected changes.\"));\n }\n\n var nodes_array = [];\n var edges_array = [];\n\n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: {\n background: node.status_color,\n border: \"black\"\n },\n level: node.level\n }));\n this.props.data.edges.map(edge => edges_array.push({\n from: edge.from,\n to: edge.to\n }));\n }\n\n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n const options = {\n edges: {\n arrows: {\n to: {\n enabled: true\n }\n }\n },\n layout: {\n improvedLayout: false,\n hierarchical: {\n nodeSpacing: 190,\n blockShifting: true,\n edgeMinimization: true,\n parentCentralization: true,\n sortMethod: 'directed',\n direction: 'UD' // work on vis current version\n // nodeSpacing: 190,\n // blockShifting: false,\n // edgeMinimization: false,\n // parentCentralization: true,\n // sortMethod: 'hubsize',\n // direction: 'UD',\n\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true\n },\n physics: {\n enabled: false\n },\n nodes: {\n shape: 'dot',\n font: {\n size: 10\n }\n }\n };\n const graph = {\n nodes: nodes,\n edges: edges\n };\n\n class VisNetwork extends Component {\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else {\n return false;\n }\n }\n\n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", params => {\n //console.log(params);\n if (params.nodes) {\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n });\n } // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n\n\n render() {\n return React.createElement(\"div\", {\n className: \"card-body p-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 140\n },\n __self: this\n }, React.createElement(\"div\", {\n ref: \"myRef\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 141\n },\n __self: this\n }));\n }\n\n }\n\n this.updateVisNodes(nodes);\n return React.createElement(VisNetwork, {\n graph: graph,\n options: options,\n updateSelection: this.props.updateSelection,\n shouldUpdateGraph: this.props.shouldUpdateGraph,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 149\n },\n __self: this\n });\n }\n\n}\n\nconst experimentStyle = {\n height: 600\n};\nexport default GraphNativeRep;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js"],"names":["React","Component","Spinner","vis","GraphNativeRep","updateVisNodes","nodes","props","setVisData","shouldComponentUpdate","nextProps","nextState","shouldUpdateGraph","data","pkl_timestamp","console","log","loadingGraph","componentWillUnmount","cleanGraphData","render","nodes_array","edges_array","edges","map","node","push","id","label","color","background","status_color","border","level","edge","from","to","DataSet","options","arrows","enabled","layout","improvedLayout","hierarchical","nodeSpacing","blockShifting","edgeMinimization","parentCentralization","sortMethod","direction","interaction","dragNodes","hoverConnectedEdges","navigationButtons","physics","shape","font","size","graph","VisNetwork","componentDidMount","network","Network","refs","myRef","on","params","updateSelection","experimentStyle","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgB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IAAI1D,GAAG,CAAC2D,OAAR,CAAgB,KAAKC,IAAL,CAAUC,KAA1B,EAAiC,KAAKzD,KAAL,CAAWmD,KAA5C,EAAmD,KAAKnD,KAAL,CAAW+B,OAA9D,CAAd;AACAuB,QAAAA,OAAO,CAACI,EAAR,CAAW,OAAX,EAAqBC,MAAD,IAAY;AAC5B;AACA,cAAIA,MAAM,CAAC5D,KAAX,EAAiB;AACb;AACA,iBAAKC,KAAL,CAAW4D,eAAX,CAA2BD,MAAM,CAAC5D,KAAlC;AACH;AAEJ,SAPD;AAQH,OApB8B,CAsB/B;AACA;AACA;AACA;;;AAEAc,MAAAA,MAAM,GAAG;AACL,eACI;AAAK,UAAA,SAAS,EAAC,eAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,WACI;AAAK,UAAA,GAAG,EAAC,OAAT;AAAiB,UAAA,KAAK,EAAEgD,eAAxB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,UADJ,CADJ;AAKH;;AAjC8B;;AAoCnC,SAAK/D,cAAL,CAAoBC,KAApB;AAEA,WAAO,oBAAC,UAAD;AACH,MAAA,KAAK,EAAEoD,KADJ;AAEH,MAAA,OAAO,EAAEpB,OAFN;AAGH,MAAA,eAAe,EAAE,KAAK/B,KAAL,CAAW4D,eAHzB;AAIH,MAAA,iBAAiB,EAAE,KAAK5D,KAAL,CAAWK,iBAJ3B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAAP;AAOH;;AAtJkC;;AAoKvC,MAAMwD,eAAe,GAAG;AACpBC,EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,eAAejE,cAAf","sourcesContent":["import React, { Component } from \"react\";\n// import vis from \"vis-network\";\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis-network\";\n\nclass GraphNativeRep extends Component {\n\n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true\n }else if (nextProps.data && this.props.data && (nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp)){\n console.log(\"Rerendering\")\n return true;\n }else if (nextProps.loadingGraph !== this.props.loadingGraph){\n return true; \n }else{\n return false;\n }\n }\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n updateVisNodes = (nodes) => {\n this.props.setVisData(nodes);\n }\n\n\n\n render () {\n if (this.props.loadingGraph) return ;\n if (this.props.data == null){\n return (\n
\n

Press Show Graph to see the graph representation of the experiment.

\n

If the experiment is running, press Start Job Monitor to start a live tracker of the changes on the experiment's jobs.\n This process will automatically update the graph's nodes colors and show a log of the detected changes.\n

\n
\n );\n }\n\n var nodes_array = [];\n var edges_array = [];\n \n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: { background: node.status_color, border: \"black\" },\n level: node.level,\n })\n );\n \n this.props.data.edges.map(edge => \n edges_array.push({ from: edge.from, to: edge.to })\n );\n }\n \n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n\n\n const options = {\n edges: {\n arrows: {\n to: { enabled: true }\n }\n },\n layout: {\n improvedLayout: false,\n hierarchical: {\n nodeSpacing: 190, \n blockShifting: true,\n edgeMinimization: true,\n parentCentralization: true,\n sortMethod: 'directed',\n direction: 'UD',\n // work on vis current version\n // nodeSpacing: 190,\n // blockShifting: false,\n // edgeMinimization: false,\n // parentCentralization: true,\n // sortMethod: 'hubsize',\n // direction: 'UD',\n }\n }, \n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true,\n },\n physics: {\n enabled: false,\n },\n nodes: {\n shape: 'dot',\n font: {\n size: 10,\n },\n }\n };\n \n const graph = {\n nodes : nodes,\n edges : edges,\n };\n\n class VisNetwork extends Component {\n \n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true;\n } else {\n return false;\n }\n }\n \n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", (params) => {\n //console.log(params);\n if (params.nodes){\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n \n });\n }\n \n // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n \n render() { \n return (\n
\n
\n
\n );\n }\n }\n\n this.updateVisNodes(nodes);\n \n return ;\n\n }\n\n\n \n\n \n\n \n \n\n \n\n}\n\nconst experimentStyle = {\n height: 600\n };\n\nexport default GraphNativeRep;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/e4e10d87d0ff6e4cd1add15fa7f9728c.json b/node_modules/.cache/babel-loader/e4e10d87d0ff6e4cd1add15fa7f9728c.json new file mode 100644 index 0000000000000000000000000000000000000000..3d6b7eedfd689fa68ad281a255449e84350b7b1d --- /dev/null +++ b/node_modules/.cache/babel-loader/e4e10d87d0ff6e4cd1add15fa7f9728c.json @@ -0,0 +1 @@ +{"ast":null,"code":"import _slicedToArray from \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/node_modules/@babel/runtime/helpers/esm/slicedToArray\";\nvar _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/context/experiment/ExperimentState.js\";\nimport React, { useReducer } from 'react';\nimport axios from 'axios';\nimport ExperimentContext from './experimentContext';\nimport ExperimentReducer from './experimentReducer';\nimport { SEARCH_EXPERIMENTS, SET_LOADING, CLEAR_EXPERIMENTS, GET_EXPERIMENT, GET_GRAPH, SET_LOADING_GRAPH, CLEAN_GRAPH_DATA, UPDATE_SELECTION, GET_EXPERIMENT_RUN, SET_LOADING_RUN, CLEAN_RUN_DATA, SET_AUTOUPDATE_RUN, GET_PKL_DATA, SET_LOADING_PKL, UPDATE_NODES, SHOULD_UPDATE_GRAPH, SET_AUTOUPDATE_PKL, CLEAN_PKL_DATA, SET_PKL_CHANGES, UPDATE_EXPERIMENT_TS, SET_VIS_DATA } from '../types';\n\nconst ExperimentState = props => {\n const initialState = {\n experiments: [],\n experiment: {},\n loading: false,\n data: null,\n rundata: null,\n pkldata: null,\n pklchanges: null,\n loadingGraph: false,\n loadingRun: false,\n loadingPkl: false,\n selection: null,\n enabledGraphSearch: true,\n startAutoUpdateRun: false,\n startAutoUpdatePkl: false,\n shouldUpdateGraph: false,\n visNodes: null\n };\n\n const _useReducer = useReducer(ExperimentReducer, initialState),\n _useReducer2 = _slicedToArray(_useReducer, 2),\n state = _useReducer2[0],\n dispatch = _useReducer2[1]; // Search Experiments\n\n\n const searchExperiments = async text => {\n setLoading();\n const res = await axios.get(\"http://84.88.185.30:8888/search/\".concat(text));\n dispatch({\n type: SEARCH_EXPERIMENTS,\n payload: res.data.experiment\n });\n }; // Get Experiment\n\n\n const getExperiment = async expid => {\n setLoading(); //cleanGraphData();\n\n const res = await axios.get(\"http://84.88.185.30:8888/expinfo/\".concat(expid));\n dispatch({\n type: GET_EXPERIMENT,\n payload: res.data\n });\n }; // Get Experiment Graph\n\n\n const getExperimentGraph = async expid => {\n setLoadingGraph();\n const res = await axios.get(\"http://84.88.185.30:8888/graph/\".concat(expid));\n console.log(res.data);\n dispatch({\n type: GET_GRAPH,\n payload: res.data\n }); //this.setState({ data: res.data, loading: false, showGraph: !res.data.error });\n }; // Get Experiment Run\n\n\n const getExperimentRun = async expid => {\n setLoadingRun();\n const res = await axios.get(\"http://84.88.185.30:8888/exprun/\".concat(expid));\n console.log(res.data);\n dispatch({\n type: GET_EXPERIMENT_RUN,\n payload: res.data\n });\n }; // Get Experiment Pkl Data\n\n\n const getExperimentPkl = async (expid, timeStamp) => {\n setLoadingPkl(); //timeStamp = 1000;\n\n const res = await axios.get(\"http://84.88.185.30:8888/pklinfo/\".concat(expid, \"/\").concat(timeStamp));\n console.log(res.data); // const actualPkl = res.data;\n\n let retrievedPkl = null;\n var jobs = {};\n var colorChanges = {};\n var changes = \"\";\n retrievedPkl = res.data;\n\n if (state.data !== null && retrievedPkl.has_changed === true && retrievedPkl.pkl_content.length > 0) {\n //console.log(retrievedPkl.pkl_content.length);\n for (var j = 0, job; j < retrievedPkl.pkl_content.length; j++) {\n job = retrievedPkl.pkl_content[j]; //console.log(job);\n\n jobs[job.name] = job; //console.log(jobs[job.name]);\n }\n\n let requireUpdate = false;\n console.log('Current ts: ' + state.experiment.pkl_timestamp);\n var newData = state.data; //console.log(newData.nodes);\n\n var expData = state.experiment;\n\n if (newData.nodes) {\n for (var i = 0; i < newData.nodes.length; i++) {\n // console.log(newNodes[i].id);\n //console.log(newData.nodes[i]);\n // console.log(jobs[ newNodes[i].id ]);\n if (newData.nodes[i].status_code !== jobs[newData.nodes[i].id].status_code) {\n // changes += newData.nodes[i].id + \" from \" + newData.nodes[i].status + \" to \" + jobs[ newData.nodes[i].id ].status + \" || \";\n changes += timeStampToDate(retrievedPkl.pkl_timestamp) + \": \" + newData.nodes[i].id + \" to \" + jobs[newData.nodes[i].id].status + \"\\n\";\n newData.nodes[i].status_code = jobs[newData.nodes[i].id].status_code;\n newData.nodes[i].status_color = jobs[newData.nodes[i].id].status_color;\n newData.nodes[i].status = jobs[newData.nodes[i].id].status; //console.log(newData.nodes[i].status_color)\n\n colorChanges[newData.nodes[i].id] = jobs[newData.nodes[i].id].status_color;\n requireUpdate = true;\n }\n }\n\n if (requireUpdate) {\n // console.log(newData.pkl_timestamp);\n // console.log(expData.pkl_timestamp);\n console.log(\"New ts: \" + retrievedPkl.pkl_timestamp);\n newData.pkl_timestamp = retrievedPkl.pkl_timestamp;\n expData.pkl_timestamp = retrievedPkl.pkl_timestamp; // console.log(newData.pkl_timestamp);\n // console.log(expData.pkl_timestamp);\n // console.log('Call Update');\n\n updateNodes(newData);\n updateExperimentTimeStamp(expData); // setUpdateGraph(true);\n // setUpdateGraph(false);\n\n if (state.pklchanges) {\n setPklChanges(changes + state.pklchanges);\n } else {\n setPklChanges(changes);\n }\n\n for (var key in colorChanges) {\n //console.log( key, colorChanges[key] );\n updateGraphColor(key, colorChanges[key]);\n }\n } else {\n console.log('No changes but updating pkl anyway.');\n expData.pkl_timestamp = retrievedPkl.pkl_timestamp;\n updateExperimentTimeStamp(expData);\n }\n }\n } // } else {\n // var t = new Date( retrievedPkl.pkl_timestamp );\n // var formatted = t.toISOString();\n // setPklChanges(\"No news yet... \" + formatted)\n // }\n\n\n dispatch({\n type: GET_PKL_DATA,\n payload: res.data\n });\n };\n\n const updateGraphColor = (idChange, newColor) => {\n state.visNodes.update({\n id: idChange,\n color: {\n background: newColor\n }\n });\n }; // Cleaning\n\n\n const clearExperiments = () => dispatch({\n type: CLEAR_EXPERIMENTS\n });\n\n const cleanGraphData = () => dispatch({\n type: CLEAN_GRAPH_DATA\n });\n\n const cleanRunData = () => dispatch({\n type: CLEAN_RUN_DATA\n });\n\n const cleanPklData = () => dispatch({\n type: CLEAN_PKL_DATA\n }); // Set Loading\n\n\n const setLoading = () => dispatch({\n type: SET_LOADING\n });\n\n const setLoadingGraph = () => dispatch({\n type: SET_LOADING_GRAPH\n });\n\n const setLoadingRun = () => dispatch({\n type: SET_LOADING_RUN\n });\n\n const setLoadingPkl = () => dispatch({\n type: SET_LOADING_PKL\n }); // Action Things\n\n\n const updateSelection = currentSelection => dispatch({\n type: UPDATE_SELECTION,\n payload: currentSelection\n });\n\n const updateNodes = newdata => dispatch({\n type: UPDATE_NODES,\n payload: newdata\n });\n\n const updateExperimentTimeStamp = newExperiment => dispatch({\n type: UPDATE_EXPERIMENT_TS,\n payload: newExperiment\n });\n\n const setAutoUpdateRun = value => dispatch({\n type: SET_AUTOUPDATE_RUN,\n payload: value\n });\n\n const setAutoUpdatePkl = value => dispatch({\n type: SET_AUTOUPDATE_PKL,\n payload: value\n }); //const setUpdateGraph = (value) => dispatch({ type: SHOULD_UPDATE_GRAPH, payload: value });\n\n\n const setPklChanges = value => dispatch({\n type: SET_PKL_CHANGES,\n payload: value\n });\n\n const setVisData = value => dispatch({\n type: SET_VIS_DATA,\n payload: value\n }); // Other Utils\n\n\n const hashCode = value => {\n var hash = 0,\n i,\n chr;\n if (value.length === 0) return hash;\n\n for (i = 0; i < value.length; i++) {\n chr = value.charCodeAt(i);\n hash = (hash << 5) - hash + chr;\n hash |= 0; // Convert to 32bit integer\n }\n\n console.log(hash);\n return hash;\n };\n\n const timeStampToDate = value => {\n //console.log('Setting new format: ' + value);\n let formattedDate = \"\";\n var date = new Date(value * 1000);\n var hours = date.getHours();\n var minutes = \"0\" + date.getMinutes();\n var seconds = \"0\" + date.getSeconds();\n formattedDate = hours + ':' + minutes.substr(-2) + ':' + seconds.substr(-2); // formattedDate = date.toISOString();\n\n return formattedDate;\n };\n\n return React.createElement(ExperimentContext.Provider, {\n value: {\n experiments: state.experiments,\n experiment: state.experiment,\n loading: state.loading,\n loadingGraph: state.loadingGraph,\n loadingRun: state.loadingRun,\n loadingPkl: state.loadingPkl,\n data: state.data,\n rundata: state.rundata,\n pklchanges: state.pklchanges,\n selection: state.selection,\n enabledGraphSearch: state.enabledGraphSearch,\n startAutoUpdateRun: state.startAutoUpdateRun,\n startAutoUpdatePkl: state.startAutoUpdatePkl,\n shouldUpdateGraph: state.shouldUpdateGraph,\n visNodes: state.visNodes,\n setAutoUpdateRun,\n setAutoUpdatePkl,\n searchExperiments,\n clearExperiments,\n getExperiment,\n getExperimentGraph,\n cleanGraphData,\n cleanRunData,\n cleanPklData,\n setPklChanges,\n updateSelection,\n getExperimentRun,\n getExperimentPkl,\n hashCode,\n timeStampToDate,\n setVisData,\n updateGraphColor\n },\n __source: {\n fileName: _jsxFileName,\n lineNumber: 241\n },\n __self: this\n }, props.children);\n};\n\nexport default ExperimentState;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/context/experiment/ExperimentState.js"],"names":["React","useReducer","axios","ExperimentContext","ExperimentReducer","SEARCH_EXPERIMENTS","SET_LOADING","CLEAR_EXPERIMENTS","GET_EXPERIMENT","GET_GRAPH","SET_LOADING_GRAPH","CLEAN_GRAPH_DATA","UPDATE_SELECTION","GET_EXPERIMENT_RUN","SET_LOADING_RUN","CLEAN_RUN_DATA","SET_AUTOUPDATE_RUN","GET_PKL_DATA","SET_LOADING_PKL","UPDATE_NODES","SHOULD_UPDATE_GRAPH","SET_AUTOUPDATE_PKL","CLEAN_PKL_DATA","SET_PKL_CHANGES","UPDATE_EXPERIMENT_TS","SET_VIS_DATA","ExperimentState","props","initialState","experiments","experiment","loading","data","rundata","pkldata","pklchanges","loadingGraph","loadingRun","loadingPkl","selection","enabledGraphSearch","startAutoUpdateRun","startAutoUpdatePkl","shouldUpdateGraph","visNodes","state","dispatch","searchExperiments","text","setLoading","res","get","type","payload","getExperiment","expid","getExperimentGraph","setLoadingGraph","console","log","getExperimentRun","setLoadingRun","getExperimentPkl","timeStamp","setLoadingPkl","retrievedPkl","jobs","colorChanges","changes","has_changed","pkl_content","length","j","job","name","requireUpdate","pkl_timestamp","newData","expData","nodes","i","status_code","id","timeStampToDate","status","status_color","updateNodes","updateExperimentTimeStamp","setPklChanges","key","updateGraphColor","idChange","newColor","update","color","background","clearExperiments","cleanGraphData","cleanRunData","cleanPklData","updateSelection","currentSelection","newdata","newExperiment","setAutoUpdateRun","value","setAutoUpdatePkl","setVisData","hashCode","hash","chr","charCodeAt","formattedDate","date","Date","hours","getHours","minutes","getMinutes","seconds","getSeconds","substr","children"],"mappings":";;AAAA,OAAOA,KAAP,IAAgBC,UAAhB,QAAkC,OAAlC;AACA,OAAOC,KAAP,MAAkB,OAAlB;AACA,OAAOC,iBAAP,MAA8B,qBAA9B;AACA,OAAOC,iBAAP,MAA8B,qBAA9B;AACA,SACEC,kBADF,EAEEC,WAFF,EAGEC,iBAHF,EAIEC,cAJF,EAKEC,SALF,EAMEC,iBANF,EAOEC,gBAPF,EAQEC,gBARF,EASEC,kBATF,EAUEC,eAVF,EAWEC,cAXF,EAYEC,kBAZF,EAaEC,YAbF,EAcEC,eAdF,EAeEC,YAfF,EAgBEC,mBAhBF,EAiBEC,kBAjBF,EAkBEC,cAlBF,EAmBEC,eAnBF,EAo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AAhCI,KADR;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KAmCK/D,KAAK,CAAC+F,QAnCX,CADJ;AAuCH,CA1PD;;AA4PA,eAAehG,eAAf","sourcesContent":["import React, { useReducer } from 'react';\nimport axios from 'axios';\nimport ExperimentContext from './experimentContext';\nimport ExperimentReducer from './experimentReducer';\nimport {\n SEARCH_EXPERIMENTS,\n SET_LOADING,\n CLEAR_EXPERIMENTS,\n GET_EXPERIMENT,\n GET_GRAPH,\n SET_LOADING_GRAPH,\n CLEAN_GRAPH_DATA,\n UPDATE_SELECTION,\n GET_EXPERIMENT_RUN,\n SET_LOADING_RUN,\n CLEAN_RUN_DATA,\n SET_AUTOUPDATE_RUN,\n GET_PKL_DATA,\n SET_LOADING_PKL,\n UPDATE_NODES,\n SHOULD_UPDATE_GRAPH,\n SET_AUTOUPDATE_PKL,\n CLEAN_PKL_DATA,\n SET_PKL_CHANGES,\n UPDATE_EXPERIMENT_TS,\n SET_VIS_DATA,\n} from '../types';\n\nconst ExperimentState = props => {\n const initialState = {\n experiments: [],\n experiment: {},\n loading: false,\n data: null,\n rundata: null,\n pkldata: null,\n pklchanges: null,\n loadingGraph: false,\n loadingRun: false,\n loadingPkl: false,\n selection: null,\n enabledGraphSearch: true, \n startAutoUpdateRun: false, \n startAutoUpdatePkl: false,\n shouldUpdateGraph: false, \n visNodes: null, \n }\n\n const [state, dispatch] = useReducer(ExperimentReducer, initialState);\n\n // Search Experiments\n const searchExperiments = async text => {\n setLoading();\n const res = await axios.get(`http://84.88.185.30:8888/search/${text}`);\n dispatch({\n type: SEARCH_EXPERIMENTS,\n payload: res.data.experiment,\n });\n };\n\n // Get Experiment\n const getExperiment = async expid => {\n setLoading();\n //cleanGraphData();\n const res = await axios.get(`http://84.88.185.30:8888/expinfo/${expid}`); \n dispatch({\n type: GET_EXPERIMENT,\n payload: res.data,\n });\n };\n \n // Get Experiment Graph\n const getExperimentGraph = async expid => {\n setLoadingGraph();\n \n const res = await axios.get(`http://84.88.185.30:8888/graph/${expid}`);\n console.log(res.data);\n dispatch({\n type: GET_GRAPH,\n payload: res.data,\n });\n //this.setState({ data: res.data, loading: false, showGraph: !res.data.error });\n };\n\n // Get Experiment Run\n const getExperimentRun = async expid => {\n setLoadingRun();\n const res = await axios.get(`http://84.88.185.30:8888/exprun/${expid}`);\n console.log(res.data);\n dispatch({\n type: GET_EXPERIMENT_RUN,\n payload: res.data,\n });\n }\n\n // Get Experiment Pkl Data\n const getExperimentPkl = async (expid, timeStamp) => {\n setLoadingPkl();\n //timeStamp = 1000;\n const res = await axios.get(`http://84.88.185.30:8888/pklinfo/${expid}/${timeStamp}`);\n console.log(res.data);\n // const actualPkl = res.data;\n \n let retrievedPkl = null;\n var jobs = {};\n var colorChanges = {};\n var changes = \"\"\n retrievedPkl = res.data;\n if (state.data !== null && retrievedPkl.has_changed === true && retrievedPkl.pkl_content.length > 0){\n //console.log(retrievedPkl.pkl_content.length);\n for(var j = 0, job; j < retrievedPkl.pkl_content.length; j++){\n job = retrievedPkl.pkl_content[j];\n //console.log(job);\n jobs[ job.name ] = job;\n //console.log(jobs[job.name]);\n }\n let requireUpdate = false;\n console.log('Current ts: '+ state.experiment.pkl_timestamp); \n var newData = state.data;\n //console.log(newData.nodes);\n var expData = state.experiment;\n if (newData.nodes){\n for(var i = 0; i < newData.nodes.length; i++){\n // console.log(newNodes[i].id);\n //console.log(newData.nodes[i]);\n // console.log(jobs[ newNodes[i].id ]);\n\n if (newData.nodes[i].status_code !== jobs[ newData.nodes[i].id ].status_code){\n // changes += newData.nodes[i].id + \" from \" + newData.nodes[i].status + \" to \" + jobs[ newData.nodes[i].id ].status + \" || \";\n changes += timeStampToDate(retrievedPkl.pkl_timestamp) + \": \"+ newData.nodes[i].id + \" to \" + jobs[ newData.nodes[i].id ].status + \"\\n\";\n newData.nodes[i].status_code = jobs[ newData.nodes[i].id ].status_code;\n newData.nodes[i].status_color = jobs[ newData.nodes[i].id ].status_color;\n newData.nodes[i].status = jobs[ newData.nodes[i].id ].status;\n //console.log(newData.nodes[i].status_color)\n colorChanges[ newData.nodes[i].id ] = jobs[ newData.nodes[i].id ].status_color;\n requireUpdate = true;\n }\n }\n\n\n if (requireUpdate){ \n // console.log(newData.pkl_timestamp);\n // console.log(expData.pkl_timestamp);\n console.log(\"New ts: \" + retrievedPkl.pkl_timestamp)\n newData.pkl_timestamp = retrievedPkl.pkl_timestamp;\n expData.pkl_timestamp = retrievedPkl.pkl_timestamp;\n // console.log(newData.pkl_timestamp);\n // console.log(expData.pkl_timestamp);\n \n // console.log('Call Update');\n updateNodes(newData);\n updateExperimentTimeStamp(expData);\n // setUpdateGraph(true);\n // setUpdateGraph(false);\n if (state.pklchanges){\n setPklChanges(changes + state.pklchanges);\n } else {\n setPklChanges(changes);\n }\n\n for(var key in colorChanges) {\n //console.log( key, colorChanges[key] );\n updateGraphColor(key, colorChanges[key]);\n }\n \n \n } else { \n console.log('No changes but updating pkl anyway.')\n expData.pkl_timestamp = retrievedPkl.pkl_timestamp;\n updateExperimentTimeStamp(expData);\n }\n }\n }\n // } else {\n // var t = new Date( retrievedPkl.pkl_timestamp );\n // var formatted = t.toISOString();\n // setPklChanges(\"No news yet... \" + formatted)\n // }\n\n\n dispatch({\n type: GET_PKL_DATA,\n payload: res.data,\n });\n }\n\n const updateGraphColor = (idChange, newColor) => {\n state.visNodes.update({id:idChange, color: { background: newColor }});\n }\n\n\n // Cleaning\n const clearExperiments = () => dispatch({ type: CLEAR_EXPERIMENTS });\n const cleanGraphData = () => dispatch({ type: CLEAN_GRAPH_DATA });\n const cleanRunData = () => dispatch({ type: CLEAN_RUN_DATA });\n const cleanPklData = () => dispatch({ type: CLEAN_PKL_DATA });\n\n // Set Loading\n const setLoading = () => dispatch({ type: SET_LOADING });\n const setLoadingGraph = () => dispatch({ type: SET_LOADING_GRAPH });\n const setLoadingRun = () => dispatch({ type: SET_LOADING_RUN });\n const setLoadingPkl = () => dispatch({ type: SET_LOADING_PKL });\n\n\n // Action Things\n const updateSelection = (currentSelection) => dispatch({ type: UPDATE_SELECTION, payload: currentSelection });\n const updateNodes = (newdata) => dispatch({ type: UPDATE_NODES, payload: newdata });\n const updateExperimentTimeStamp = (newExperiment) => dispatch({ type: UPDATE_EXPERIMENT_TS, payload: newExperiment});\n const setAutoUpdateRun = (value) => dispatch({ type: SET_AUTOUPDATE_RUN, payload: value });\n const setAutoUpdatePkl = (value) => dispatch({ type: SET_AUTOUPDATE_PKL, payload: value });\n //const setUpdateGraph = (value) => dispatch({ type: SHOULD_UPDATE_GRAPH, payload: value });\n const setPklChanges = (value) => dispatch({ type: SET_PKL_CHANGES, payload: value });\n const setVisData = (value) => dispatch({ type: SET_VIS_DATA, payload: value});\n\n // Other Utils\n const hashCode = (value) => {\n var hash = 0, i, chr;\n if (value.length === 0) return hash;\n for (i = 0; i < value.length; i++) {\n chr = value.charCodeAt(i);\n hash = ((hash << 5) - hash) + chr;\n hash |= 0; // Convert to 32bit integer\n }\n console.log(hash);\n return hash;\n };\n \n const timeStampToDate = (value) => {\n //console.log('Setting new format: ' + value);\n let formattedDate = \"\";\n var date = new Date( value * 1000);\n var hours = date.getHours();\n var minutes = \"0\" + date.getMinutes();\n var seconds = \"0\" + date.getSeconds();\n formattedDate = hours + ':' + minutes.substr(-2) + ':' + seconds.substr(-2);\n // formattedDate = date.toISOString();\n return formattedDate;\n }\n\n return (\n \n {props.children}\n \n );\n};\n\nexport default ExperimentState;"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/e4e5250f296797d370d6540a00063bc8.json b/node_modules/.cache/babel-loader/e4e5250f296797d370d6540a00063bc8.json new file mode 100644 index 0000000000000000000000000000000000000000..d05ffc3ff7883f5e92b42c04e54683881a22d8cf --- /dev/null +++ b/node_modules/.cache/babel-loader/e4e5250f296797d370d6540a00063bc8.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js\";\nimport React, { Component } from \"react\"; // import vis from \"vis-network\";\n\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n constructor(...args) {\n super(...args);\n\n this.updateVisNodes = nodes => {\n this.props.setVisData(nodes);\n };\n }\n\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else if (nextProps.data && this.props.data && nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp) {\n console.log(\"Rerendering\");\n return true;\n } else if (nextProps.loadingGraph !== this.props.loadingGraph) {\n return true;\n } else {\n return false;\n }\n }\n\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n render() {\n if (this.props.loadingGraph) return React.createElement(Spinner, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 32\n },\n __self: this\n });\n\n if (this.props.data == null) {\n return React.createElement(\"div\", {\n className: \"card-body text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 35\n },\n __self: this\n }, React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Press \", React.createElement(\"span\", {\n className: \"badge badge-info\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Show Graph\"), \" to see the graph representation of the experiment.\"), React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"If the experiment is running, press \", React.createElement(\"span\", {\n className: \"badge badge-dark\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"Start Job Monitor\"), \" to start a live tracker of the changes on the experiment's jobs. This process will automatically update the graph's nodes colors and show a log of the detected changes.\"));\n }\n\n var nodes_array = [];\n var edges_array = [];\n\n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: {\n background: node.status_color,\n border: \"black\"\n },\n level: node.level\n }));\n this.props.data.edges.map(edge => edges_array.push({\n from: edge.from,\n to: edge.to\n }));\n }\n\n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n const options = {\n edges: {\n arrows: {\n to: {\n enabled: true\n }\n }\n },\n layout: {\n improvedLayout: false,\n hierarchical: {\n nodeSpacing: 190,\n //blockShifting: true,\n edgeMinimization: true,\n //parentCentralization: true,\n sortMethod: 'hubsize',\n direction: 'UD'\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true\n },\n physics: {\n enabled: false\n },\n nodes: {\n shape: 'dot',\n font: {\n size: 10\n }\n }\n };\n const graph = {\n nodes: nodes,\n edges: edges\n };\n\n class VisNetwork extends Component {\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else {\n return false;\n }\n }\n\n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", params => {\n //console.log(params);\n if (params.nodes) {\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n });\n } // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n\n\n render() {\n return React.createElement(\"div\", {\n className: \"card-body p-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 133\n },\n __self: this\n }, React.createElement(\"div\", {\n ref: \"myRef\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 134\n },\n __self: this\n }));\n }\n\n }\n\n this.updateVisNodes(nodes);\n return React.createElement(VisNetwork, {\n graph: graph,\n options: options,\n updateSelection: this.props.updateSelection,\n shouldUpdateGraph: this.props.shouldUpdateGraph,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 142\n },\n __self: this\n });\n }\n\n}\n\nconst experimentStyle = {\n height: 600\n};\nexport default GraphNativeRep;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js"],"names":["React","Component","Spinner","vis","GraphNativeRep","updateVisNodes","nodes","props","setVisData","shouldComponentUpdate","nextProps","nextState","shouldUpdateGraph","data","pkl_timestamp","console","log","loadingGraph","componentWillUnmount","cleanGraphData","render","nodes_array","edges_array","edges","map","node","push","id","label","color","background","status_color","border","level","edge","from","to","DataSet","options","arrows","enabled","layout","improvedLayout","hierarchical","nodeSpacing","edgeMinimization","sortMethod","direction","interaction","dragNodes","hoverConnectedEdges","navigationButtons","physics","shape","font","size","graph","VisNetwork","componentDidMount","network","Network","refs","myRef","on","params","updateSelection","experimentStyle","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,SAAhB,QAAiC,OAAjC,C,CACA;;AACA,OAAOC,OAAP,MAAoB,mBAApB;AACA,OAAOC,GAAP,MAAgB,KAAhB;;AAEA,MAAMC,cAAN,SAA6BH,SAA7B,CAAuC;AAAA;AAAA;;AAAA,SAmBnCI,cAnBmC,GAmBjBC,KAAD,IAAW;AACxB,WAAKC,KAAL,CAAWC,UAAX,CAAsBF,KAAtB;AACH,KArBkC;AAAA;;AAEnCG,EAAAA,qBAAqB,CAACC,SAAD,EAAYC,SAAZ,EAAsB;AACvC,QAAI,KAAKJ,KAAL,CAAWK,iBAAX,KAAiC,IAArC,EAA0C;AACtC,aAAO,IAAP;AACD,KAFH,MAEQ,IAAIF,SAAS,CAACG,IAAV,IAAkB,KAAKN,KAAL,CAAWM,IAA7B,IAAsCH,SAAS,CAACG,IAAV,CAAeC,aAAf,KAAiC,KAAKP,KAAL,CAAWM,IAAX,CAAgBC,aAA3F,EAA0G;AAC9GC,MAAAA,OAAO,CAACC,GAAR,CAAY,aAAZ;AACA,aAAO,IAAP;AACD,KAHK,MAGA,IAAIN,SAAS,CAACO,YAAV,KAA2B,KAAKV,KAAL,CAAWU,YAA1C,EAAuD;AAC3D,aAAO,IAAP;AACD,KAFK,MAED;AACH,aAAO,KAAP;AACD;AAC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AAAA,MAAP;AAOH;;AA/IkC;;AA6JvC,MAAMsD,eAAe,GAAG;AACpBC,EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,eAAe/D,cAAf","sourcesContent":["import React, { Component } from \"react\";\n// import vis from \"vis-network\";\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n\n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true\n }else if (nextProps.data && this.props.data && (nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp)){\n console.log(\"Rerendering\")\n return true;\n }else if (nextProps.loadingGraph !== this.props.loadingGraph){\n return true; \n }else{\n return false;\n }\n }\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n updateVisNodes = (nodes) => {\n this.props.setVisData(nodes);\n }\n\n\n\n render () {\n if (this.props.loadingGraph) return ;\n if (this.props.data == null){\n return (\n
\n

Press Show Graph to see the graph representation of the experiment.

\n

If the experiment is running, press Start Job Monitor to start a live tracker of the changes on the experiment's jobs.\n This process will automatically update the graph's nodes colors and show a log of the detected changes.\n

\n
\n );\n }\n\n var nodes_array = [];\n var edges_array = [];\n \n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: { background: node.status_color, border: \"black\" },\n level: node.level,\n })\n );\n \n this.props.data.edges.map(edge => \n edges_array.push({ from: edge.from, to: edge.to })\n );\n }\n \n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n\n\n const options = {\n edges: {\n arrows: {\n to: { enabled: true }\n }\n },\n layout: {\n improvedLayout: false,\n hierarchical: {\n nodeSpacing: 190,\n //blockShifting: true,\n edgeMinimization: true,\n //parentCentralization: true,\n sortMethod: 'hubsize',\n direction: 'UD',\n }\n }, \n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true,\n },\n physics: {\n enabled: false,\n },\n nodes: {\n shape: 'dot',\n font: {\n size: 10,\n },\n }\n };\n \n const graph = {\n nodes : nodes,\n edges : edges,\n };\n\n class VisNetwork extends Component {\n \n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true;\n } else {\n return false;\n }\n }\n \n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", (params) => {\n //console.log(params);\n if (params.nodes){\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n \n });\n }\n \n // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n \n render() { \n return (\n
\n
\n
\n );\n }\n }\n\n this.updateVisNodes(nodes);\n \n return ;\n\n }\n\n\n \n\n \n\n \n \n\n \n\n}\n\nconst experimentStyle = {\n height: 600\n };\n\nexport default GraphNativeRep;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/e7708a10c74dfc9303e5aeb4bc67ff72.json b/node_modules/.cache/babel-loader/e7708a10c74dfc9303e5aeb4bc67ff72.json new file mode 100644 index 0000000000000000000000000000000000000000..a113edc22419d9047bebe5e67c610a830c801311 --- /dev/null +++ b/node_modules/.cache/babel-loader/e7708a10c74dfc9303e5aeb4bc67ff72.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js\";\nimport React, { Component } from \"react\"; // import vis from \"vis-network\";\n\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n shouldComponentUpdate(nextProps, nextState) {\n if (nextProps.data && this.props.data) {\n console.log(\"Rerendering\");\n return true;\n } else if (nextProps.loadingGraph !== this.props.loadingGraph) {\n return true;\n } else {\n return false;\n }\n }\n\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n render() {\n if (this.props.loadingGraph) return React.createElement(Spinner, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 27\n },\n __self: this\n });\n\n if (this.props.data == null) {\n return React.createElement(\"div\", {\n className: \"card-body text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 30\n },\n __self: this\n }, React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 31\n },\n __self: this\n }, \"Press \", React.createElement(\"span\", {\n className: \"badge badge-info\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 31\n },\n __self: this\n }, \"Show Graph\"), \" to see the graph representation of the experiment.\"), React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 32\n },\n __self: this\n }, \"If the experiment is running, press \", React.createElement(\"span\", {\n className: \"badge badge-dark\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 32\n },\n __self: this\n }, \"Start Job Monitor\"), \" to start a live tracker of the changes on the experiment's jobs. This process will automatically update the graph's nodes colors and show a log of the detected changes.\"));\n }\n\n var nodes_array = [];\n var edges_array = [];\n\n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: {\n background: node.status_color,\n border: \"black\"\n } //level: node.priority,\n\n }));\n this.props.data.edges.map(edge => edges_array.push({\n from: edge.from,\n to: edge.to\n }));\n }\n\n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n const options = {\n edges: {\n arrows: {\n to: {\n enabled: true\n }\n }\n },\n layout: {\n improvedLayout: true,\n hierarchical: {\n nodeSpacing: 250,\n edgeMinimization: false,\n blockShifting: false,\n parentCentralization: false,\n direction: 'UD',\n sortMethod: 'directed'\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true\n },\n physics: {\n enabled: false\n },\n nodes: {\n shape: 'dot'\n }\n };\n const graph = {\n nodes: nodes,\n edges: edges\n };\n\n class VisNetwork extends Component {\n // shouldComponentUpdate(nextProps, nextState){ \n // if (nextProps.loadingGraph !== this.props.loadingGraph){\n // return true; \n // }else{\n // return false;\n // }\n // }\n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", params => {\n //console.log(params);\n if (params.nodes) {\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n });\n } // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n\n\n render() {\n return React.createElement(\"div\", {\n className: \"card-body p-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 125\n },\n __self: this\n }, React.createElement(\"div\", {\n ref: \"myRef\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 126\n },\n __self: this\n }));\n }\n\n }\n\n return React.createElement(VisNetwork, {\n graph: graph,\n options: options,\n updateSelection: this.props.updateSelection,\n shouldUpdateGraph: this.props.shouldUpdateGraph,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 132\n },\n __self: this\n });\n }\n\n}\n\nconst experimentStyle = {\n height: 600\n};\nexport default GraphNativeRep;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js"],"names":["React","Component","Spinner","vis","GraphNativeRep","shouldComponentUpdate","nextProps","nextState","data","props","console","log","loadingGraph","componentWillUnmount","cleanGraphData","render","nodes_array","edges_array","nodes","edges","map","node","push","id","label","color","background","status_color","border","edge","from","to","DataSet","options","arrows","enabled","layout","improvedLayout","hierarchical","nodeSpacing","edgeMinimization","blockShifting","parentCentralization","direction","sortMethod","interaction","dragNodes","hoverConnectedEdges","navigationButtons","physics","shape","graph","VisNetwork","componentDidMount","network","Network","refs","myRef","on","params","updateSelection","experimentStyle","shouldUpdateGraph","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,SAAhB,QAAiC,OAAjC,C,CACA;;AACA,OAAOC,OAAP,MAAoB,m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KAAK,EAAEV,KADJ;AAEH,MAAA,OAAO,EAAElB,OAFN;AAGH,MAAA,eAAe,EAAE,KAAKxB,KAAL,CAAWmD,eAHzB;AAIH,MAAA,iBAAiB,EAAE,KAAKnD,KAAL,CAAWqD,iBAJ3B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAAP;AAOH;;AArIkC;;AAmJvC,MAAMD,eAAe,GAAG;AACpBE,EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,eAAe3D,cAAf","sourcesContent":["import React, { Component } from \"react\";\n// import vis from \"vis-network\";\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n\n shouldComponentUpdate(nextProps, nextState){ \n \n if (nextProps.data && this.props.data){\n console.log(\"Rerendering\")\n return true;\n }else if (nextProps.loadingGraph !== this.props.loadingGraph){\n return true; \n }else{\n return false;\n }\n }\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n\n\n render() {\n if (this.props.loadingGraph) return ;\n if (this.props.data == null){\n return (\n
\n

Press Show Graph to see the graph representation of the experiment.

\n

If the experiment is running, press Start Job Monitor to start a live tracker of the changes on the experiment's jobs.\n This process will automatically update the graph's nodes colors and show a log of the detected changes.\n

\n
\n );\n }\n\n var nodes_array = [];\n var edges_array = [];\n \n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: { background: node.status_color, border: \"black\" },\n //level: node.priority,\n })\n );\n \n this.props.data.edges.map(edge => \n edges_array.push({ from: edge.from, to: edge.to })\n );\n }\n \n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n\n const options = {\n edges: {\n arrows: {\n to: { enabled: true }\n }\n },\n layout: {\n improvedLayout: true,\n hierarchical: {\n \n nodeSpacing: 250,\n edgeMinimization: false,\n blockShifting: false,\n parentCentralization: false,\n direction: 'UD',\n sortMethod: 'directed',\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true,\n },\n physics: {\n enabled: false,\n },\n nodes: {\n shape: 'dot',\n }\n };\n \n const graph = {\n nodes : nodes,\n edges : edges,\n };\n\n class VisNetwork extends Component {\n \n // shouldComponentUpdate(nextProps, nextState){ \n // if (nextProps.loadingGraph !== this.props.loadingGraph){\n // return true; \n // }else{\n // return false;\n // }\n // }\n \n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", (params) => {\n //console.log(params);\n if (params.nodes){\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n \n });\n }\n \n // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n \n render() { \n return (\n
\n
\n
\n );\n }\n }\n \n return ;\n\n }\n\n\n \n\n \n\n \n \n\n \n\n}\n\nconst experimentStyle = {\n height: 600\n };\n\nexport default GraphNativeRep;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/e77187ef48162ab60d7354d3ffcef165.json b/node_modules/.cache/babel-loader/e77187ef48162ab60d7354d3ffcef165.json new file mode 100644 index 0000000000000000000000000000000000000000..e4322717668ad7377433fe3bf8c4a9eb79d27b0d --- /dev/null +++ b/node_modules/.cache/babel-loader/e77187ef48162ab60d7354d3ffcef165.json @@ -0,0 +1 @@ +{"ast":null,"code":"import _slicedToArray from \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/node_modules/@babel/runtime/helpers/esm/slicedToArray\";\nvar _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/context/experiment/ExperimentState.js\";\nimport React, { useReducer } from 'react';\nimport axios from 'axios';\nimport ExperimentContext from './experimentContext';\nimport ExperimentReducer from './experimentReducer';\nimport { SEARCH_EXPERIMENTS, SET_LOADING, CLEAR_EXPERIMENTS, GET_EXPERIMENT, GET_GRAPH, SET_LOADING_GRAPH, CLEAN_GRAPH_DATA, UPDATE_SELECTION, GET_EXPERIMENT_RUN, SET_LOADING_RUN, CLEAN_RUN_DATA, SET_AUTOUPDATE_RUN, GET_PKL_DATA, SET_LOADING_PKL, UPDATE_NODES, SHOULD_UPDATE_GRAPH, SET_AUTOUPDATE_PKL, CLEAN_PKL_DATA, SET_PKL_CHANGES, UPDATE_EXPERIMENT_TS, SET_VIS_DATA } from '../types';\n\nconst ExperimentState = props => {\n const initialState = {\n experiments: [],\n experiment: {},\n loading: false,\n data: null,\n rundata: null,\n pkldata: null,\n pklchanges: null,\n loadingGraph: false,\n loadingRun: false,\n loadingPkl: false,\n selection: null,\n enabledGraphSearch: true,\n startAutoUpdateRun: false,\n startAutoUpdatePkl: false,\n shouldUpdateGraph: false,\n visNodes: null\n };\n\n const _useReducer = useReducer(ExperimentReducer, initialState),\n _useReducer2 = _slicedToArray(_useReducer, 2),\n state = _useReducer2[0],\n dispatch = _useReducer2[1]; // Search Experiments\n\n\n const searchExperiments = async text => {\n setLoading();\n const res = await axios.get(\"http://84.88.185.30:8888/search/\".concat(text));\n dispatch({\n type: SEARCH_EXPERIMENTS,\n payload: res.data.experiment\n });\n }; // Get Experiment\n\n\n const getExperiment = async expid => {\n setLoading(); //cleanGraphData();\n\n const res = await axios.get(\"http://84.88.185.30:8888/expinfo/\".concat(expid));\n dispatch({\n type: GET_EXPERIMENT,\n payload: res.data\n });\n }; // Get Experiment Graph\n\n\n const getExperimentGraph = async expid => {\n setLoadingGraph();\n const res = await axios.get(\"http://84.88.185.30:8888/graph/\".concat(expid));\n console.log(res.data);\n dispatch({\n type: GET_GRAPH,\n payload: res.data\n }); //this.setState({ data: res.data, loading: false, showGraph: !res.data.error });\n }; // Get Experiment Run\n\n\n const getExperimentRun = async expid => {\n setLoadingRun();\n const res = await axios.get(\"http://84.88.185.30:8888/exprun/\".concat(expid));\n console.log(res.data);\n dispatch({\n type: GET_EXPERIMENT_RUN,\n payload: res.data\n });\n }; // Get Experiment Pkl Data\n\n\n const getExperimentPkl = async (expid, timeStamp) => {\n setLoadingPkl(); //timeStamp = 1000;\n\n const res = await axios.get(\"http://84.88.185.30:8888/pklinfo/\".concat(expid, \"/\").concat(timeStamp));\n console.log(res.data); // const actualPkl = res.data;\n\n let retrievedPkl = null;\n var jobs = {};\n var changes = \"\";\n retrievedPkl = res.data;\n\n if (state.data !== null && retrievedPkl.has_changed === true && retrievedPkl.pkl_content.length > 0) {\n //console.log(retrievedPkl.pkl_content.length);\n for (var j = 0, job; j < retrievedPkl.pkl_content.length; j++) {\n job = retrievedPkl.pkl_content[j]; //console.log(job);\n\n jobs[job.name] = job; //console.log(jobs[job.name]);\n }\n\n let requireUpdate = false;\n console.log('Current ts: ' + state.data.pkl_timestamp);\n var newData = state.data; //console.log(newData.nodes);\n\n var expData = state.experiment;\n\n if (newData.nodes) {\n for (var i = 0; i < newData.nodes.length; i++) {\n // console.log(newNodes[i].id);\n //console.log(newData.nodes[i]);\n // console.log(jobs[ newNodes[i].id ]);\n if (newData.nodes[i].status_code !== jobs[newData.nodes[i].id].status_code) {\n // changes += newData.nodes[i].id + \" from \" + newData.nodes[i].status + \" to \" + jobs[ newData.nodes[i].id ].status + \" || \";\n changes += timeStampToDate(retrievedPkl.pkl_timestamp) + \": \" + newData.nodes[i].id + \" to \" + jobs[newData.nodes[i].id].status + \"\\n\";\n newData.nodes[i].status_code = jobs[newData.nodes[i].id].status_code;\n newData.nodes[i].status_color = jobs[newData.nodes[i].id].status_color;\n newData.nodes[i].status = jobs[newData.nodes[i].id].status; //console.log(newData.nodes[i].status_color)\n\n requireUpdate = true;\n }\n }\n\n if (requireUpdate) {\n // console.log(newData.pkl_timestamp);\n // console.log(expData.pkl_timestamp);\n console.log(\"New ts: \" + retrievedPkl.pkl_timestamp);\n newData.pkl_timestamp = retrievedPkl.pkl_timestamp;\n expData.pkl_timestamp = retrievedPkl.pkl_timestamp; // console.log(newData.pkl_timestamp);\n // console.log(expData.pkl_timestamp);\n // console.log('Call Update');\n\n updateNodes(newData);\n updateExperimentTimeStamp(expData);\n setUpdateGraph(true);\n setUpdateGraph(false);\n\n if (state.pklchanges) {\n setPklChanges(changes + state.pklchanges);\n } else {\n setPklChanges(changes);\n }\n } else {\n console.log('No changes but updating pkl anyway.');\n expData.pkl_timestamp = retrievedPkl.pkl_timestamp;\n updateExperimentTimeStamp(expData);\n }\n }\n } // } else {\n // var t = new Date( retrievedPkl.pkl_timestamp );\n // var formatted = t.toISOString();\n // setPklChanges(\"No news yet... \" + formatted)\n // }\n\n\n dispatch({\n type: GET_PKL_DATA,\n payload: res.data\n });\n };\n\n const updateGraphColor = (idChange, newColor) => {\n this.state.visNodes.update({\n id: idChange,\n color: {\n background: newColor\n }\n });\n }; // Cleaning\n\n\n const clearExperiments = () => dispatch({\n type: CLEAR_EXPERIMENTS\n });\n\n const cleanGraphData = () => dispatch({\n type: CLEAN_GRAPH_DATA\n });\n\n const cleanRunData = () => dispatch({\n type: CLEAN_RUN_DATA\n });\n\n const cleanPklData = () => dispatch({\n type: CLEAN_PKL_DATA\n }); // Set Loading\n\n\n const setLoading = () => dispatch({\n type: SET_LOADING\n });\n\n const setLoadingGraph = () => dispatch({\n type: SET_LOADING_GRAPH\n });\n\n const setLoadingRun = () => dispatch({\n type: SET_LOADING_RUN\n });\n\n const setLoadingPkl = () => dispatch({\n type: SET_LOADING_PKL\n }); // Action Things\n\n\n const updateSelection = currentSelection => dispatch({\n type: UPDATE_SELECTION,\n payload: currentSelection\n });\n\n const updateNodes = newdata => dispatch({\n type: UPDATE_NODES,\n payload: newdata\n });\n\n const updateExperimentTimeStamp = newExperiment => dispatch({\n type: UPDATE_EXPERIMENT_TS,\n payload: newExperiment\n });\n\n const setAutoUpdateRun = value => dispatch({\n type: SET_AUTOUPDATE_RUN,\n payload: value\n });\n\n const setAutoUpdatePkl = value => dispatch({\n type: SET_AUTOUPDATE_PKL,\n payload: value\n });\n\n const setUpdateGraph = value => dispatch({\n type: SHOULD_UPDATE_GRAPH,\n payload: value\n });\n\n const setPklChanges = value => dispatch({\n type: SET_PKL_CHANGES,\n payload: value\n });\n\n const setVisData = value => dispatch({\n type: SET_VIS_DATA,\n payload: value\n }); // Other Utils\n\n\n const hashCode = value => {\n var hash = 0,\n i,\n chr;\n if (value.length === 0) return hash;\n\n for (i = 0; i < value.length; i++) {\n chr = value.charCodeAt(i);\n hash = (hash << 5) - hash + chr;\n hash |= 0; // Convert to 32bit integer\n }\n\n console.log(hash);\n return hash;\n };\n\n const timeStampToDate = value => {\n //console.log('Setting new format: ' + value);\n let formattedDate = \"\";\n var date = new Date(value * 1000);\n var hours = date.getHours();\n var minutes = \"0\" + date.getMinutes();\n var seconds = \"0\" + date.getSeconds();\n formattedDate = hours + ':' + minutes.substr(-2) + ':' + seconds.substr(-2); // formattedDate = date.toISOString();\n\n return formattedDate;\n };\n\n return React.createElement(ExperimentContext.Provider, {\n value: {\n experiments: state.experiments,\n experiment: state.experiment,\n loading: state.loading,\n loadingGraph: state.loadingGraph,\n loadingRun: state.loadingRun,\n loadingPkl: state.loadingPkl,\n data: state.data,\n rundata: state.rundata,\n pklchanges: state.pklchanges,\n selection: state.selection,\n enabledGraphSearch: state.enabledGraphSearch,\n startAutoUpdateRun: state.startAutoUpdateRun,\n startAutoUpdatePkl: state.startAutoUpdatePkl,\n shouldUpdateGraph: state.shouldUpdateGraph,\n setAutoUpdateRun,\n setAutoUpdatePkl,\n searchExperiments,\n clearExperiments,\n getExperiment,\n getExperimentGraph,\n cleanGraphData,\n cleanRunData,\n cleanPklData,\n setPklChanges,\n updateSelection,\n getExperimentRun,\n getExperimentPkl,\n hashCode,\n timeStampToDate,\n setVisData,\n updateGraphColor\n },\n __source: {\n fileName: _jsxFileName,\n lineNumber: 232\n },\n __self: this\n }, props.children);\n};\n\nexport default ExperimentState;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/context/experiment/ExperimentState.js"],"names":["React","useReducer","axios","ExperimentContext","ExperimentReducer","SEARCH_EXPERIMENTS","SET_LOADING","CLEAR_EXPERIMENTS","GET_EXPERIMENT","GET_GRAPH","SET_LOADING_GRAPH","CLEAN_GRAPH_DATA","UPDATE_SELECTION","GET_EXPERIMENT_RUN","SET_LOADING_RUN","CLEAN_RUN_DATA","SET_AUTOUPDATE_RUN","GET_PKL_DATA","SET_LOADING_PKL","UPDATE_NODES","SHOULD_UPDATE_GRAPH","SET_AUTOUPDATE_PKL","CLEAN_PKL_DATA","SET_PKL_CHANGES","UPDATE_EXPERIMENT_TS","SET_VIS_DATA","ExperimentState","props","initialState","experiments","experiment","loading","data","rundata","pkldata","pklchanges","loadingGraph","loadingRun","loadingPkl","selection","enabledGraphSearch","startAutoUpdateRun","startAutoUpdatePkl","shouldUpdateGraph","visNodes","state","dispatch","searchExperiments","text","setLoading","res","get","type","payload","getExperiment","expid","getExperimentGraph","setLoadingGraph","console","log","getExperimentRun","setLoadingRun","getExperimentPkl","timeStamp","setLoadingPkl","retrievedPkl","jobs","changes","has_changed","pkl_content","length","j","job","name","requireUpdate","pkl_timestamp","newData","expData","nodes","i","status_code","id","timeStampToDate","status","status_color","updateNodes","updateExperimentTimeStamp","setUpdateGraph","setPklChanges","updateGraphColor","idChange","newColor","update","color","background","clearExperiments","cleanGraphData","cleanRunData","cleanPklData","updateSelection","currentSelection","newdata","newExperiment","setAutoUpdateRun","value","setAutoUpdatePkl","setVisData","hashCode","hash","chr","charCodeAt","formattedDate","date","Date","hours","getHours","minutes","getMinutes","seconds","getSeconds","substr","children"],"mappings":";;AAAA,OAAOA,KAAP,IAAgBC,UAAhB,QAAkC,OAAlC;AACA,OAAOC,KAAP,MAAkB,OAAlB;AACA,OAAOC,iBAAP,MAA8B,qBAA9B;AACA,OAAOC,iBAAP,MAA8B,qBAA9B;AACA,SACEC,kBADF,EAEEC,WAFF,EAGEC,iBAHF,EAIEC,cAJF,EAKEC,SALF,EAMEC,iBANF,EAOEC,gBAPF,EAQEC,gBARF,EASEC,kBATF,EAUEC,eAVF,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;AAsCH,CAhPD;;AAkPA,eAAe/F,eAAf","sourcesContent":["import React, { useReducer } from 'react';\nimport axios from 'axios';\nimport ExperimentContext from './experimentContext';\nimport ExperimentReducer from './experimentReducer';\nimport {\n SEARCH_EXPERIMENTS,\n SET_LOADING,\n CLEAR_EXPERIMENTS,\n GET_EXPERIMENT,\n GET_GRAPH,\n SET_LOADING_GRAPH,\n CLEAN_GRAPH_DATA,\n UPDATE_SELECTION,\n GET_EXPERIMENT_RUN,\n SET_LOADING_RUN,\n CLEAN_RUN_DATA,\n SET_AUTOUPDATE_RUN,\n GET_PKL_DATA,\n SET_LOADING_PKL,\n UPDATE_NODES,\n SHOULD_UPDATE_GRAPH,\n SET_AUTOUPDATE_PKL,\n CLEAN_PKL_DATA,\n SET_PKL_CHANGES,\n UPDATE_EXPERIMENT_TS,\n SET_VIS_DATA,\n} from '../types';\n\nconst ExperimentState = props => {\n const initialState = {\n experiments: [],\n experiment: {},\n loading: false,\n data: null,\n rundata: null,\n pkldata: null,\n pklchanges: null,\n loadingGraph: false,\n loadingRun: false,\n loadingPkl: false,\n selection: null,\n enabledGraphSearch: true, \n startAutoUpdateRun: false, \n startAutoUpdatePkl: false,\n shouldUpdateGraph: false, \n visNodes: null, \n }\n\n const [state, dispatch] = useReducer(ExperimentReducer, initialState);\n\n // Search Experiments\n const searchExperiments = async text => {\n setLoading();\n const res = await axios.get(`http://84.88.185.30:8888/search/${text}`);\n dispatch({\n type: SEARCH_EXPERIMENTS,\n payload: res.data.experiment,\n });\n };\n\n // Get Experiment\n const getExperiment = async expid => {\n setLoading();\n //cleanGraphData();\n const res = await axios.get(`http://84.88.185.30:8888/expinfo/${expid}`); \n dispatch({\n type: GET_EXPERIMENT,\n payload: res.data,\n });\n };\n \n // Get Experiment Graph\n const getExperimentGraph = async expid => {\n setLoadingGraph();\n \n const res = await axios.get(`http://84.88.185.30:8888/graph/${expid}`);\n console.log(res.data);\n dispatch({\n type: GET_GRAPH,\n payload: res.data,\n });\n //this.setState({ data: res.data, loading: false, showGraph: !res.data.error });\n };\n\n // Get Experiment Run\n const getExperimentRun = async expid => {\n setLoadingRun();\n const res = await axios.get(`http://84.88.185.30:8888/exprun/${expid}`);\n console.log(res.data);\n dispatch({\n type: GET_EXPERIMENT_RUN,\n payload: res.data,\n });\n }\n\n // Get Experiment Pkl Data\n const getExperimentPkl = async (expid, timeStamp) => {\n setLoadingPkl();\n //timeStamp = 1000;\n const res = await axios.get(`http://84.88.185.30:8888/pklinfo/${expid}/${timeStamp}`);\n console.log(res.data);\n // const actualPkl = res.data;\n \n let retrievedPkl = null;\n var jobs = {}\n var changes = \"\"\n retrievedPkl = res.data;\n if (state.data !== null && retrievedPkl.has_changed === true && retrievedPkl.pkl_content.length > 0){\n //console.log(retrievedPkl.pkl_content.length);\n for(var j = 0, job; j < retrievedPkl.pkl_content.length; j++){\n job = retrievedPkl.pkl_content[j];\n //console.log(job);\n jobs[ job.name ] = job;\n //console.log(jobs[job.name]);\n }\n let requireUpdate = false;\n console.log('Current ts: '+ state.data.pkl_timestamp); \n var newData = state.data;\n //console.log(newData.nodes);\n var expData = state.experiment;\n if (newData.nodes){\n for(var i = 0; i < newData.nodes.length; i++){\n // console.log(newNodes[i].id);\n //console.log(newData.nodes[i]);\n // console.log(jobs[ newNodes[i].id ]);\n\n if (newData.nodes[i].status_code !== jobs[ newData.nodes[i].id ].status_code){\n // changes += newData.nodes[i].id + \" from \" + newData.nodes[i].status + \" to \" + jobs[ newData.nodes[i].id ].status + \" || \";\n changes += timeStampToDate(retrievedPkl.pkl_timestamp) + \": \"+ newData.nodes[i].id + \" to \" + jobs[ newData.nodes[i].id ].status + \"\\n\";\n newData.nodes[i].status_code = jobs[ newData.nodes[i].id ].status_code;\n newData.nodes[i].status_color = jobs[ newData.nodes[i].id ].status_color;\n newData.nodes[i].status = jobs[ newData.nodes[i].id ].status;\n //console.log(newData.nodes[i].status_color)\n requireUpdate = true;\n }\n }\n if (requireUpdate){ \n // console.log(newData.pkl_timestamp);\n // console.log(expData.pkl_timestamp);\n console.log(\"New ts: \" + retrievedPkl.pkl_timestamp)\n newData.pkl_timestamp = retrievedPkl.pkl_timestamp;\n expData.pkl_timestamp = retrievedPkl.pkl_timestamp;\n // console.log(newData.pkl_timestamp);\n // console.log(expData.pkl_timestamp);\n \n // console.log('Call Update');\n updateNodes(newData);\n updateExperimentTimeStamp(expData);\n setUpdateGraph(true);\n setUpdateGraph(false);\n if (state.pklchanges){\n setPklChanges(changes + state.pklchanges);\n } else {\n setPklChanges(changes);\n }\n \n \n } else { \n console.log('No changes but updating pkl anyway.')\n expData.pkl_timestamp = retrievedPkl.pkl_timestamp;\n updateExperimentTimeStamp(expData);\n }\n }\n }\n // } else {\n // var t = new Date( retrievedPkl.pkl_timestamp );\n // var formatted = t.toISOString();\n // setPklChanges(\"No news yet... \" + formatted)\n // }\n\n\n dispatch({\n type: GET_PKL_DATA,\n payload: res.data,\n });\n }\n\n const updateGraphColor = (idChange, newColor) => {\n this.state.visNodes.update({id:idChange, color: { background: newColor }});\n }\n\n\n // Cleaning\n const clearExperiments = () => dispatch({ type: CLEAR_EXPERIMENTS });\n const cleanGraphData = () => dispatch({ type: CLEAN_GRAPH_DATA });\n const cleanRunData = () => dispatch({ type: CLEAN_RUN_DATA });\n const cleanPklData = () => dispatch({ type: CLEAN_PKL_DATA });\n\n // Set Loading\n const setLoading = () => dispatch({ type: SET_LOADING });\n const setLoadingGraph = () => dispatch({ type: SET_LOADING_GRAPH });\n const setLoadingRun = () => dispatch({ type: SET_LOADING_RUN });\n const setLoadingPkl = () => dispatch({ type: SET_LOADING_PKL });\n\n\n // Action Things\n const updateSelection = (currentSelection) => dispatch({ type: UPDATE_SELECTION, payload: currentSelection });\n const updateNodes = (newdata) => dispatch({ type: UPDATE_NODES, payload: newdata });\n const updateExperimentTimeStamp = (newExperiment) => dispatch({ type: UPDATE_EXPERIMENT_TS, payload: newExperiment});\n const setAutoUpdateRun = (value) => dispatch({ type: SET_AUTOUPDATE_RUN, payload: value });\n const setAutoUpdatePkl = (value) => dispatch({ type: SET_AUTOUPDATE_PKL, payload: value });\n const setUpdateGraph = (value) => dispatch({ type: SHOULD_UPDATE_GRAPH, payload: value });\n const setPklChanges = (value) => dispatch({ type: SET_PKL_CHANGES, payload: value });\n const setVisData = (value) => dispatch({ type: SET_VIS_DATA, payload: value});\n\n // Other Utils\n const hashCode = (value) => {\n var hash = 0, i, chr;\n if (value.length === 0) return hash;\n for (i = 0; i < value.length; i++) {\n chr = value.charCodeAt(i);\n hash = ((hash << 5) - hash) + chr;\n hash |= 0; // Convert to 32bit integer\n }\n console.log(hash);\n return hash;\n };\n \n const timeStampToDate = (value) => {\n //console.log('Setting new format: ' + value);\n let formattedDate = \"\";\n var date = new Date( value * 1000);\n var hours = date.getHours();\n var minutes = \"0\" + date.getMinutes();\n var seconds = \"0\" + date.getSeconds();\n formattedDate = hours + ':' + minutes.substr(-2) + ':' + seconds.substr(-2);\n // formattedDate = date.toISOString();\n return formattedDate;\n }\n\n return (\n \n {props.children}\n \n );\n};\n\nexport default ExperimentState;"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/e8f8dfeaa7212768892a081e0427e78a.json b/node_modules/.cache/babel-loader/e8f8dfeaa7212768892a081e0427e78a.json new file mode 100644 index 0000000000000000000000000000000000000000..d46ad702c43ce12ccd927a551c4c89476edea79d --- /dev/null +++ b/node_modules/.cache/babel-loader/e8f8dfeaa7212768892a081e0427e78a.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js\";\nimport React, { Component } from \"react\"; // import vis from \"vis-network\";\n\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n constructor(...args) {\n super(...args);\n\n this.updateVisNodes = nodes => {\n this.props.setVisData(nodes);\n };\n }\n\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else if (nextProps.data && this.props.data && nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp) {\n console.log(\"Rerendering\");\n return true;\n } else if (nextProps.loadingGraph !== this.props.loadingGraph) {\n return true;\n } else {\n return false;\n }\n }\n\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n render() {\n if (this.props.loadingGraph) return React.createElement(Spinner, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 32\n },\n __self: this\n });\n\n if (this.props.data == null) {\n return React.createElement(\"div\", {\n className: \"card-body text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 35\n },\n __self: this\n }, React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Press \", React.createElement(\"span\", {\n className: \"badge badge-info\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Show Graph\"), \" to see the graph representation of the experiment.\"), React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"If the experiment is running, press \", React.createElement(\"span\", {\n className: \"badge badge-dark\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"Start Job Monitor\"), \" to start a live tracker of the changes on the experiment's jobs. This process will automatically update the graph's nodes colors and show a log of the detected changes.\"));\n }\n\n var nodes_array = [];\n var edges_array = [];\n\n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: {\n background: node.status_color,\n border: \"black\"\n },\n level: node.level\n }));\n this.props.data.edges.map(edge => edges_array.push({\n from: edge.from,\n to: edge.to\n }));\n }\n\n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n const options = {\n edges: {\n arrows: {\n to: {\n enabled: true\n }\n }\n },\n layout: {\n improvedLayout: true,\n hierarchical: {\n // enabled: true,\n //nodeSpacing: 250,\n // edgeMinimization: false,\n // blockShifting: true,\n parentCentralization: true,\n direction: 'UD'\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true\n },\n physics: {\n enabled: false\n },\n nodes: {\n shape: 'dot'\n }\n };\n const graph = {\n nodes: nodes,\n edges: edges\n };\n\n class VisNetwork extends Component {\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else {\n return false;\n }\n }\n\n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", params => {\n //console.log(params);\n if (params.nodes) {\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n });\n } // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n\n\n render() {\n return React.createElement(\"div\", {\n className: \"card-body p-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 130\n },\n __self: this\n }, React.createElement(\"div\", {\n ref: \"myRef\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 131\n },\n __self: this\n }));\n }\n\n }\n\n this.updateVisNodes(nodes);\n return React.createElement(VisNetwork, {\n graph: graph,\n options: options,\n updateSelection: this.props.updateSelection,\n shouldUpdateGraph: this.props.shouldUpdateGraph,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 139\n },\n __self: this\n });\n }\n\n}\n\nconst experimentStyle = {\n height: 600\n};\nexport default GraphNativeRep;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js"],"names":["React","Component","Spinner","vis","GraphNativeRep","updateVisNodes","nodes","props","setVisData","shouldComponentUpdate","nextProps","nextState","shouldUpdateGraph","data","pkl_timestamp","console","log","loadingGraph","componentWillUnmount","cleanGraphData","render","nodes_array","edges_array","edges","map","node","push","id","label","color","background","status_color","border","level","edge","from","to","DataSet","options","arrows","enabled","layout","improvedLayout","hierarchical","parentCentralization","direction","interaction","dragNodes","hoverConnectedEdges","navigationButtons","physics","shape","graph","VisNetwork","componentDidMount","network","Network","refs","myRef","on","params","updateSelection","experimentStyle","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,SAAhB,QAAiC,OAAjC,C,CACA;;AACA,OAAOC,OAAP,MAAoB,mBAApB;AACA,OAAOC,GAAP,MAAgB,KAAhB;;AAEA,MAAMC,cAAN,SAA6BH,SAA7B,CAAuC;AAAA;AAAA;;AAAA,SAmBnCI,cAnBmC,GAmBjBC,KAAD,IAAW;AACxB,WAAKC,KAAL,CAAWC,UAAX,CAAsBF,KAAtB;AACH,KArBkC;AAAA;;AAEnCG,EAAAA,qBAAqB,CAACC,SAAD,EAAYC,SAAZ,EAAsB;AACvC,QAAI,KAAKJ,KAAL,CAAWK,iBAAX,KAAiC,IAArC,EAA0C;AACtC,aAAO,IAAP;AACD,KAFH,MAEQ,IAAIF,SAAS,CAACG,IAAV,IAAkB,KAAKN,KAAL,CAAWM,IAA7B,IAAsCH,SAAS,CAACG,IAAV,CAAeC,aAAf,KAAiC,KAAKP,KAAL,CAAWM,IAAX,CAAgBC,aAA3F,EAA0G;AAC9GC,MAAAA,OAAO,CAACC,GAAR,CAAY,aAAZ;AACA,aAAO,IAAP;AACD,KAHK,MAGA,IAAIN,SAAS,CAACO,YAAV,KAA2B,KAAKV,KAAL,CAAWU,YAA1C,EAAuD;AAC3D,aAAO,IAAP;AACD,KAFK,MAED;AACH,aAAO,KAAP;AACD;AACN;;AACDC,EAAAA,oBAAoB,GAAG;AACnBH,IAAAA,OAAO,CAACC,GAAR,CAAY,YAAZ;AACA,SAAKT,KAAL,CAAWY,cAAX;AACH;;AAQDC,EAAAA,MAAM,GAAI;AACN,QAAI,KAAKb,KAAL,CAAWU,YAAf,EAA6B,OAAO,oBAAC,OAAD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAAP;;AAC7B,QAAI,KAAKV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AKC,IAAL,CAAUC,KAA1B,EAAiC,KAAKnD,KAAL,CAAW6C,KAA5C,EAAmD,KAAK7C,KAAL,CAAW+B,OAA9D,CAAd;AACAiB,QAAAA,OAAO,CAACI,EAAR,CAAW,OAAX,EAAqBC,MAAD,IAAY;AAC5B;AACA,cAAIA,MAAM,CAACtD,KAAX,EAAiB;AACb;AACA,iBAAKC,KAAL,CAAWsD,eAAX,CAA2BD,MAAM,CAACtD,KAAlC;AACH;AAEJ,SAPD;AAQH,OApB8B,CAsB/B;AACA;AACA;AACA;;;AAEAc,MAAAA,MAAM,GAAG;AACL,eACI;AAAK,UAAA,SAAS,EAAC,eAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,WACI;AAAK,UAAA,GAAG,EAAC,OAAT;AAAiB,UAAA,KAAK,EAAE0C,eAAxB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,UADJ,CADJ;AAKH;;AAjC8B;;AAoCnC,SAAKzD,cAAL,CAAoBC,KAApB;AAEA,WAAO,oBAAC,UAAD;AACH,MAAA,KAAK,EAAE8C,KADJ;AAEH,MAAA,OAAO,EAAEd,OAFN;AAGH,MAAA,eAAe,EAAE,KAAK/B,KAAL,CAAWsD,eAHzB;AAIH,MAAA,iBAAiB,EAAE,KAAKtD,KAAL,CAAWK,iBAJ3B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAAP;AAOH;;AA5IkC;;AA0JvC,MAAMkD,eAAe,GAAG;AACpBC,EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,eAAe3D,cAAf","sourcesContent":["import React, { Component } from \"react\";\n// import vis from \"vis-network\";\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n\n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true\n }else if (nextProps.data && this.props.data && (nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp)){\n console.log(\"Rerendering\")\n return true;\n }else if (nextProps.loadingGraph !== this.props.loadingGraph){\n return true; \n }else{\n return false;\n }\n }\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n updateVisNodes = (nodes) => {\n this.props.setVisData(nodes);\n }\n\n\n\n render () {\n if (this.props.loadingGraph) return ;\n if (this.props.data == null){\n return (\n
\n

Press Show Graph to see the graph representation of the experiment.

\n

If the experiment is running, press Start Job Monitor to start a live tracker of the changes on the experiment's jobs.\n This process will automatically update the graph's nodes colors and show a log of the detected changes.\n

\n
\n );\n }\n\n var nodes_array = [];\n var edges_array = [];\n \n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: { background: node.status_color, border: \"black\" },\n level: node.level,\n })\n );\n \n this.props.data.edges.map(edge => \n edges_array.push({ from: edge.from, to: edge.to })\n );\n }\n \n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n\n\n const options = {\n edges: {\n arrows: {\n to: { enabled: true }\n }\n },\n layout: {\n improvedLayout: true,\n hierarchical: {\n // enabled: true,\n //nodeSpacing: 250,\n // edgeMinimization: false,\n // blockShifting: true,\n parentCentralization: true,\n direction: 'UD',\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true,\n },\n physics: {\n enabled: false,\n },\n nodes: {\n shape: 'dot',\n }\n };\n \n const graph = {\n nodes : nodes,\n edges : edges,\n };\n\n class VisNetwork extends Component {\n \n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true;\n } else {\n return false;\n }\n }\n \n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", (params) => {\n //console.log(params);\n if (params.nodes){\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n \n });\n }\n \n // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n \n render() { \n return (\n
\n
\n
\n );\n }\n }\n\n this.updateVisNodes(nodes);\n \n return ;\n\n }\n\n\n \n\n \n\n \n \n\n \n\n}\n\nconst experimentStyle = {\n height: 600\n };\n\nexport default GraphNativeRep;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/e9270063224f69dca765d1d4eb4a7496.json b/node_modules/.cache/babel-loader/e9270063224f69dca765d1d4eb4a7496.json new file mode 100644 index 0000000000000000000000000000000000000000..445aff4ce2b7609c9737ff5afad3d5451c256ace --- /dev/null +++ b/node_modules/.cache/babel-loader/e9270063224f69dca765d1d4eb4a7496.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js\";\nimport React, { Component } from \"react\"; // import vis from \"vis-network\";\n\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n constructor(...args) {\n super(...args);\n\n this.updateVisNodes = nodes => {\n this.props.setVisData(nodes);\n };\n }\n\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else if (nextProps.data && this.props.data && nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp) {\n console.log(\"Rerendering\");\n return true;\n } else if (nextProps.loadingGraph !== this.props.loadingGraph) {\n return true;\n } else {\n return false;\n }\n }\n\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n render() {\n if (this.props.loadingGraph) return React.createElement(Spinner, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 32\n },\n __self: this\n });\n\n if (this.props.data == null) {\n return React.createElement(\"div\", {\n className: \"card-body text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 35\n },\n __self: this\n }, React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Press \", React.createElement(\"span\", {\n className: \"badge badge-info\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Show Graph\"), \" to see the graph representation of the experiment.\"), React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"If the experiment is running, press \", React.createElement(\"span\", {\n className: \"badge badge-dark\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"Start Job Monitor\"), \" to start a live tracker of the changes on the experiment's jobs. This process will automatically update the graph's nodes colors and show a log of the detected changes.\"));\n }\n\n var nodes_array = [];\n var edges_array = [];\n\n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: {\n background: node.status_color,\n border: \"black\"\n },\n level: node.level\n }));\n this.props.data.edges.map(edge => edges_array.push({\n from: edge.from,\n to: edge.to\n }));\n }\n\n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n const options = {\n edges: {\n arrows: {\n to: {\n enabled: true\n }\n }\n },\n layout: {\n improvedLayout: true,\n hierarchical: {\n nodeSpacing: 190,\n //blockShifting: true,\n edgeMinimization: false,\n //parentCentralization: true,\n sortMethod: 'hubsize',\n direction: 'UD'\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true\n },\n physics: {\n enabled: false\n },\n nodes: {\n shape: 'dot',\n font: {\n size: 10\n }\n }\n };\n const graph = {\n nodes: nodes,\n edges: edges\n };\n\n class VisNetwork extends Component {\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else {\n return false;\n }\n }\n\n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", params => {\n //console.log(params);\n if (params.nodes) {\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n });\n } // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n\n\n render() {\n return React.createElement(\"div\", {\n className: \"card-body p-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 133\n },\n __self: this\n }, React.createElement(\"div\", {\n ref: \"myRef\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 134\n },\n __self: this\n }));\n }\n\n }\n\n this.updateVisNodes(nodes);\n return React.createElement(VisNetwork, {\n graph: graph,\n options: options,\n updateSelection: this.props.updateSelection,\n shouldUpdateGraph: this.props.shouldUpdateGraph,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 142\n },\n __self: this\n });\n }\n\n}\n\nconst experimentStyle = {\n height: 600\n};\nexport default GraphNativeRep;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js"],"names":["React","Component","Spinner","vis","GraphNativeRep","updateVisNodes","nodes","props","setVisData","shouldComponentUpdate","nextProps","nextState","shouldUpdateGraph","data","pkl_timestamp","console","log","loadingGraph","componentWillUnmount","cleanGraphData","render","nodes_array","edges_array","edges","map","node","push","id","label","color","background","status_color","border","level","edge","from","to","DataSet","options","arrows","enabled","layout","improvedLayout","hierarchical","nodeSpacing","edgeMinimization","sortMethod","direction","interaction","dragNodes","hoverConnectedEdges","navigationButtons","physics","shape","font","size","graph","VisNetwork","componentDidMount","network","Network","refs","myRef","on","params","updateSelection","experimentStyle","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,SAAhB,QAAiC,OAAjC,C,CACA;;AACA,OAAOC,OAAP,MAAoB,mBAApB;AACA,OAAOC,GAAP,MAAgB,KAAhB;;AAEA,MAAMC,cAAN,SAA6BH,SAA7B,CAAuC;AAAA;AAAA;;AAAA,SAmBnCI,cAnBmC,GAmBjBC,KAAD,IAAW;AACxB,WAAKC,KAAL,CAAWC,UAAX,CAAsBF,KAAtB;AACH,KArBkC;AAAA;;AAEnCG,EAAAA,qBAAqB,CAACC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MAAM,GAAG;AACL,eACI;AAAK,UAAA,SAAS,EAAC,eAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,WACI;AAAK,UAAA,GAAG,EAAC,OAAT;AAAiB,UAAA,KAAK,EAAE8C,eAAxB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,UADJ,CADJ;AAKH;;AAjC8B;;AAoCnC,SAAK7D,cAAL,CAAoBC,KAApB;AAEA,WAAO,oBAAC,UAAD;AACH,MAAA,KAAK,EAAEkD,KADJ;AAEH,MAAA,OAAO,EAAElB,OAFN;AAGH,MAAA,eAAe,EAAE,KAAK/B,KAAL,CAAW0D,eAHzB;AAIH,MAAA,iBAAiB,EAAE,KAAK1D,KAAL,CAAWK,iBAJ3B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAAP;AAOH;;AA/IkC;;AA6JvC,MAAMsD,eAAe,GAAG;AACpBC,EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,eAAe/D,cAAf","sourcesContent":["import React, { Component } from \"react\";\n// import vis from \"vis-network\";\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n\n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true\n }else if (nextProps.data && this.props.data && (nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp)){\n console.log(\"Rerendering\")\n return true;\n }else if (nextProps.loadingGraph !== this.props.loadingGraph){\n return true; \n }else{\n return false;\n }\n }\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n updateVisNodes = (nodes) => {\n this.props.setVisData(nodes);\n }\n\n\n\n render () {\n if (this.props.loadingGraph) return ;\n if (this.props.data == null){\n return (\n
\n

Press Show Graph to see the graph representation of the experiment.

\n

If the experiment is running, press Start Job Monitor to start a live tracker of the changes on the experiment's jobs.\n This process will automatically update the graph's nodes colors and show a log of the detected changes.\n

\n
\n );\n }\n\n var nodes_array = [];\n var edges_array = [];\n \n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: { background: node.status_color, border: \"black\" },\n level: node.level,\n })\n );\n \n this.props.data.edges.map(edge => \n edges_array.push({ from: edge.from, to: edge.to })\n );\n }\n \n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n\n\n const options = {\n edges: {\n arrows: {\n to: { enabled: true }\n }\n },\n layout: {\n improvedLayout: true,\n hierarchical: {\n nodeSpacing: 190,\n //blockShifting: true,\n edgeMinimization: false,\n //parentCentralization: true,\n sortMethod: 'hubsize',\n direction: 'UD',\n }\n }, \n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true,\n },\n physics: {\n enabled: false,\n },\n nodes: {\n shape: 'dot',\n font: {\n size: 10,\n },\n }\n };\n \n const graph = {\n nodes : nodes,\n edges : edges,\n };\n\n class VisNetwork extends Component {\n \n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true;\n } else {\n return false;\n }\n }\n \n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", (params) => {\n //console.log(params);\n if (params.nodes){\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n \n });\n }\n \n // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n \n render() { \n return (\n
\n
\n
\n );\n }\n }\n\n this.updateVisNodes(nodes);\n \n return ;\n\n }\n\n\n \n\n \n\n \n \n\n \n\n}\n\nconst experimentStyle = {\n height: 600\n };\n\nexport default GraphNativeRep;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/ea5c714d5ec3512c5eefd4b8bee38a99.json b/node_modules/.cache/babel-loader/ea5c714d5ec3512c5eefd4b8bee38a99.json new file mode 100644 index 0000000000000000000000000000000000000000..4bbc26e57843f65d6191bec705bf637329cb49d6 --- /dev/null +++ b/node_modules/.cache/babel-loader/ea5c714d5ec3512c5eefd4b8bee38a99.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js\";\nimport React, { Component } from \"react\"; // import vis from \"vis-network\";\n\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n constructor(...args) {\n super(...args);\n\n this.updateVisNodes = nodes => {\n this.props.setVisData(nodes);\n };\n }\n\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else if (nextProps.data && this.props.data && nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp) {\n console.log(\"Rerendering\");\n return true;\n } else if (nextProps.loadingGraph !== this.props.loadingGraph) {\n return true;\n } else {\n return false;\n }\n }\n\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n render() {\n if (this.props.loadingGraph) return React.createElement(Spinner, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 32\n },\n __self: this\n });\n\n if (this.props.data == null) {\n return React.createElement(\"div\", {\n className: \"card-body text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 35\n },\n __self: this\n }, React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Press \", React.createElement(\"span\", {\n className: \"badge badge-info\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Show Graph\"), \" to see the graph representation of the experiment.\"), React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"If the experiment is running, press \", React.createElement(\"span\", {\n className: \"badge badge-dark\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"Start Job Monitor\"), \" to start a live tracker of the changes on the experiment's jobs. This process will automatically update the graph's nodes colors and show a log of the detected changes.\"));\n }\n\n var nodes_array = [];\n var edges_array = [];\n\n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: {\n background: node.status_color,\n border: \"black\"\n },\n level: node.level\n }));\n this.props.data.edges.map(edge => edges_array.push({\n from: edge.from,\n to: edge.to\n }));\n }\n\n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n const options = {\n edges: {\n arrows: {\n to: {\n enabled: true\n }\n }\n },\n layout: {\n //improvedLayout: true,\n hierarchical: {\n nodeSpacing: 190,\n //blockShifting: true,\n edgeMinimization: false,\n //parentCentralization: true,\n sortMethod: 'directed',\n direction: 'UD'\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true\n },\n physics: {\n enabled: false\n },\n nodes: {\n shape: 'dot',\n font: {\n size: 10\n }\n }\n };\n const graph = {\n nodes: nodes,\n edges: edges\n };\n\n class VisNetwork extends Component {\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else {\n return false;\n }\n }\n\n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", params => {\n //console.log(params);\n if (params.nodes) {\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n });\n } // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n\n\n render() {\n return React.createElement(\"div\", {\n className: \"card-body p-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 133\n },\n __self: this\n }, React.createElement(\"div\", {\n ref: \"myRef\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 134\n },\n __self: this\n }));\n }\n\n }\n\n this.updateVisNodes(nodes);\n return React.createElement(VisNetwork, {\n graph: graph,\n options: options,\n updateSelection: this.props.updateSelection,\n shouldUpdateGraph: this.props.shouldUpdateGraph,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 142\n },\n __self: this\n });\n }\n\n}\n\nconst experimentStyle = {\n height: 600\n};\nexport default GraphNativeRep;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js"],"names":["React","Component","Spinner","vis","GraphNativeRep","updateVisNodes","nodes","props","setVisData","shouldComponentUpdate","nextProps","nextState","shouldUpdateGraph","data","pkl_timestamp","console","log","loadingGraph","componentWillUnmount","cleanGraphData","render","nodes_array","edges_array","edges","map","node","push","id","label","color","background","status_color","border","level","edge","from","to","DataSet","options","arrows","enabled","layout","hierarchical","nodeSpacing","edgeMinimization","sortMethod","direction","interaction","dragNodes","hoverConnectedEdges","navigationButtons","physics","shape","font","size","graph","VisNetwork","componentDidMount","network","Network","refs","myRef","on","params","updateSelection","experimentStyle","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,SAAhB,QAAiC,OAAjC,C,CACA;;AACA,OAAOC,OAAP,MAAoB,mBAApB;AACA,OAAOC,GAAP,MAAgB,KAAhB;;AAEA,MAAMC,cAAN,SAA6BH,SAA7B,CAAuC;AAAA;AAAA;;AAAA,SAmBnCI,cAnBmC,GAmBjBC,KAAD,IAAW;AACxB,WAAKC,KAAL,CAAWC,UAAX,CAAsBF,KAAtB;AACH,KArBkC;AAAA;;AAEnCG,EAAAA,qBAAqB,CAACC,SAAD,EAAYC,SAAZ,EAAsB;AACvC,QAAI,KAAKJ,KAAL,CAAWK,iBAAX,KAAiC,IAArC,EAA0C;AACtC,aAAO,IAAP;AACD,KAFH,MAEQ,IAAIF,SAAS,CAACG,IAAV,IAAkB,KAAKN,KAAL,CAAWM,IAA7B,IAAsCH,SAAS,CAACG,IAAV,CAAeC,aAAf,KAAiC,KAAKP,KAAL,CAAWM,IAAX,CAAgBC,aAA3F,EAA0G;AAC9GC,MAAAA,OAAO,CAACC,GAAR,CAAY,aA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,MAAA,eAAe,EAAE,KAAK/B,KAAL,CAAWyD,eAHzB;AAIH,MAAA,iBAAiB,EAAE,KAAKzD,KAAL,CAAWK,iBAJ3B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAAP;AAOH;;AA/IkC;;AA6JvC,MAAMqD,eAAe,GAAG;AACpBC,EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,eAAe9D,cAAf","sourcesContent":["import React, { Component } from \"react\";\n// import vis from \"vis-network\";\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n\n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true\n }else if (nextProps.data && this.props.data && (nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp)){\n console.log(\"Rerendering\")\n return true;\n }else if (nextProps.loadingGraph !== this.props.loadingGraph){\n return true; \n }else{\n return false;\n }\n }\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n updateVisNodes = (nodes) => {\n this.props.setVisData(nodes);\n }\n\n\n\n render () {\n if (this.props.loadingGraph) return ;\n if (this.props.data == null){\n return (\n
\n

Press Show Graph to see the graph representation of the experiment.

\n

If the experiment is running, press Start Job Monitor to start a live tracker of the changes on the experiment's jobs.\n This process will automatically update the graph's nodes colors and show a log of the detected changes.\n

\n
\n );\n }\n\n var nodes_array = [];\n var edges_array = [];\n \n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: { background: node.status_color, border: \"black\" },\n level: node.level,\n })\n );\n \n this.props.data.edges.map(edge => \n edges_array.push({ from: edge.from, to: edge.to })\n );\n }\n \n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n\n\n const options = {\n edges: {\n arrows: {\n to: { enabled: true }\n }\n },\n layout: {\n //improvedLayout: true,\n hierarchical: {\n nodeSpacing: 190,\n //blockShifting: true,\n edgeMinimization: false,\n //parentCentralization: true,\n sortMethod: 'directed',\n direction: 'UD',\n }\n }, \n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true,\n },\n physics: {\n enabled: false,\n },\n nodes: {\n shape: 'dot',\n font: {\n size: 10,\n },\n }\n };\n \n const graph = {\n nodes : nodes,\n edges : edges,\n };\n\n class VisNetwork extends Component {\n \n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true;\n } else {\n return false;\n }\n }\n \n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", (params) => {\n //console.log(params);\n if (params.nodes){\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n \n });\n }\n \n // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n \n render() { \n return (\n
\n
\n
\n );\n }\n }\n\n this.updateVisNodes(nodes);\n \n return ;\n\n }\n\n\n \n\n \n\n \n \n\n \n\n}\n\nconst experimentStyle = {\n height: 600\n };\n\nexport default GraphNativeRep;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/ebcef6949ca0006138a812e5f1df16ff.json b/node_modules/.cache/babel-loader/ebcef6949ca0006138a812e5f1df16ff.json new file mode 100644 index 0000000000000000000000000000000000000000..a600c57a17de4f5222cd39f9a8c2b91452511b86 --- /dev/null +++ b/node_modules/.cache/babel-loader/ebcef6949ca0006138a812e5f1df16ff.json @@ -0,0 +1 @@ +{"ast":null,"code":"import _slicedToArray from \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/node_modules/@babel/runtime/helpers/esm/slicedToArray\";\nvar _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/context/experiment/ExperimentState.js\";\nimport React, { useReducer } from 'react';\nimport axios from 'axios';\nimport ExperimentContext from './experimentContext';\nimport ExperimentReducer from './experimentReducer';\nimport { SEARCH_EXPERIMENTS, SET_LOADING, CLEAR_EXPERIMENTS, GET_EXPERIMENT, GET_GRAPH, SET_LOADING_GRAPH, CLEAN_GRAPH_DATA, UPDATE_SELECTION, GET_EXPERIMENT_RUN, SET_LOADING_RUN, CLEAN_RUN_DATA, SET_AUTOUPDATE_RUN, GET_PKL_DATA, SET_LOADING_PKL, UPDATE_NODES, SHOULD_UPDATE_GRAPH, SET_AUTOUPDATE_PKL, CLEAN_PKL_DATA, SET_PKL_CHANGES, UPDATE_EXPERIMENT_TS, SET_VIS_DATA } from '../types';\n\nconst ExperimentState = props => {\n const initialState = {\n experiments: [],\n experiment: {},\n loading: false,\n data: null,\n rundata: null,\n pkldata: null,\n pklchanges: null,\n loadingGraph: false,\n loadingRun: false,\n loadingPkl: false,\n selection: null,\n enabledGraphSearch: true,\n startAutoUpdateRun: false,\n startAutoUpdatePkl: false,\n shouldUpdateGraph: false,\n visNodes: null\n };\n\n const _useReducer = useReducer(ExperimentReducer, initialState),\n _useReducer2 = _slicedToArray(_useReducer, 2),\n state = _useReducer2[0],\n dispatch = _useReducer2[1]; // Search Experiments\n\n\n const searchExperiments = async text => {\n setLoading();\n const res = await axios.get(\"http://84.88.185.30:8888/search/\".concat(text));\n dispatch({\n type: SEARCH_EXPERIMENTS,\n payload: res.data.experiment\n });\n }; // Get Experiment\n\n\n const getExperiment = async expid => {\n setLoading(); //cleanGraphData();\n\n const res = await axios.get(\"http://84.88.185.30:8888/expinfo/\".concat(expid));\n dispatch({\n type: GET_EXPERIMENT,\n payload: res.data\n });\n }; // Get Experiment Graph\n\n\n const getExperimentGraph = async expid => {\n setLoadingGraph();\n const res = await axios.get(\"http://84.88.185.30:8888/graph/\".concat(expid));\n console.log(res.data);\n dispatch({\n type: GET_GRAPH,\n payload: res.data\n }); //this.setState({ data: res.data, loading: false, showGraph: !res.data.error });\n }; // Get Experiment Run\n\n\n const getExperimentRun = async expid => {\n setLoadingRun();\n const res = await axios.get(\"http://84.88.185.30:8888/exprun/\".concat(expid));\n console.log(res.data);\n dispatch({\n type: GET_EXPERIMENT_RUN,\n payload: res.data\n });\n }; // Get Experiment Pkl Data\n\n\n const getExperimentPkl = async (expid, timeStamp) => {\n setLoadingPkl(); //timeStamp = 1000;\n\n const res = await axios.get(\"http://84.88.185.30:8888/pklinfo/\".concat(expid, \"/\").concat(timeStamp));\n console.log(res.data); // const actualPkl = res.data;\n\n let retrievedPkl = null;\n var jobs = {};\n var colorChanges = {};\n var changes = \"\";\n retrievedPkl = res.data;\n\n if (state.data !== null && retrievedPkl.has_changed === true && retrievedPkl.pkl_content.length > 0) {\n //console.log(retrievedPkl.pkl_content.length);\n for (var j = 0, job; j < retrievedPkl.pkl_content.length; j++) {\n job = retrievedPkl.pkl_content[j]; //console.log(job);\n\n jobs[job.name] = job; //console.log(jobs[job.name]);\n }\n\n let requireUpdate = false;\n console.log('Current ts: ' + state.data.pkl_timestamp);\n var newData = state.data; //console.log(newData.nodes);\n\n var expData = state.experiment;\n\n if (newData.nodes) {\n for (var i = 0; i < newData.nodes.length; i++) {\n // console.log(newNodes[i].id);\n //console.log(newData.nodes[i]);\n // console.log(jobs[ newNodes[i].id ]);\n if (newData.nodes[i].status_code !== jobs[newData.nodes[i].id].status_code) {\n // changes += newData.nodes[i].id + \" from \" + newData.nodes[i].status + \" to \" + jobs[ newData.nodes[i].id ].status + \" || \";\n changes += timeStampToDate(retrievedPkl.pkl_timestamp) + \": \" + newData.nodes[i].id + \" to \" + jobs[newData.nodes[i].id].status + \"\\n\";\n newData.nodes[i].status_code = jobs[newData.nodes[i].id].status_code;\n newData.nodes[i].status_color = jobs[newData.nodes[i].id].status_color;\n newData.nodes[i].status = jobs[newData.nodes[i].id].status; //console.log(newData.nodes[i].status_color)\n\n colorChanges[newData.nodes[i].id] = jobs[newData.nodes[i].id].status_color;\n requireUpdate = true;\n }\n }\n\n if (requireUpdate) {\n // console.log(newData.pkl_timestamp);\n // console.log(expData.pkl_timestamp);\n console.log(\"New ts: \" + retrievedPkl.pkl_timestamp);\n newData.pkl_timestamp = retrievedPkl.pkl_timestamp;\n expData.pkl_timestamp = retrievedPkl.pkl_timestamp; // console.log(newData.pkl_timestamp);\n // console.log(expData.pkl_timestamp);\n // console.log('Call Update');\n\n updateNodes(newData);\n updateExperimentTimeStamp(expData);\n setUpdateGraph(true);\n setUpdateGraph(false);\n\n if (state.pklchanges) {\n setPklChanges(changes + state.pklchanges);\n } else {\n setPklChanges(changes);\n }\n\n for (var key in colorChanges) {\n console.log(key, colorChanges[key]);\n }\n } else {\n console.log('No changes but updating pkl anyway.');\n expData.pkl_timestamp = retrievedPkl.pkl_timestamp;\n updateExperimentTimeStamp(expData);\n }\n }\n } // } else {\n // var t = new Date( retrievedPkl.pkl_timestamp );\n // var formatted = t.toISOString();\n // setPklChanges(\"No news yet... \" + formatted)\n // }\n\n\n dispatch({\n type: GET_PKL_DATA,\n payload: res.data\n });\n };\n\n const updateGraphColor = (idChange, newColor) => {\n this.state.visNodes.update({\n id: idChange,\n color: {\n background: newColor\n }\n });\n }; // Cleaning\n\n\n const clearExperiments = () => dispatch({\n type: CLEAR_EXPERIMENTS\n });\n\n const cleanGraphData = () => dispatch({\n type: CLEAN_GRAPH_DATA\n });\n\n const cleanRunData = () => dispatch({\n type: CLEAN_RUN_DATA\n });\n\n const cleanPklData = () => dispatch({\n type: CLEAN_PKL_DATA\n }); // Set Loading\n\n\n const setLoading = () => dispatch({\n type: SET_LOADING\n });\n\n const setLoadingGraph = () => dispatch({\n type: SET_LOADING_GRAPH\n });\n\n const setLoadingRun = () => dispatch({\n type: SET_LOADING_RUN\n });\n\n const setLoadingPkl = () => dispatch({\n type: SET_LOADING_PKL\n }); // Action Things\n\n\n const updateSelection = currentSelection => dispatch({\n type: UPDATE_SELECTION,\n payload: currentSelection\n });\n\n const updateNodes = newdata => dispatch({\n type: UPDATE_NODES,\n payload: newdata\n });\n\n const updateExperimentTimeStamp = newExperiment => dispatch({\n type: UPDATE_EXPERIMENT_TS,\n payload: newExperiment\n });\n\n const setAutoUpdateRun = value => dispatch({\n type: SET_AUTOUPDATE_RUN,\n payload: value\n });\n\n const setAutoUpdatePkl = value => dispatch({\n type: SET_AUTOUPDATE_PKL,\n payload: value\n });\n\n const setUpdateGraph = value => dispatch({\n type: SHOULD_UPDATE_GRAPH,\n payload: value\n });\n\n const setPklChanges = value => dispatch({\n type: SET_PKL_CHANGES,\n payload: value\n });\n\n const setVisData = value => dispatch({\n type: SET_VIS_DATA,\n payload: value\n }); // Other Utils\n\n\n const hashCode = value => {\n var hash = 0,\n i,\n chr;\n if (value.length === 0) return hash;\n\n for (i = 0; i < value.length; i++) {\n chr = value.charCodeAt(i);\n hash = (hash << 5) - hash + chr;\n hash |= 0; // Convert to 32bit integer\n }\n\n console.log(hash);\n return hash;\n };\n\n const timeStampToDate = value => {\n //console.log('Setting new format: ' + value);\n let formattedDate = \"\";\n var date = new Date(value * 1000);\n var hours = date.getHours();\n var minutes = \"0\" + date.getMinutes();\n var seconds = \"0\" + date.getSeconds();\n formattedDate = hours + ':' + minutes.substr(-2) + ':' + seconds.substr(-2); // formattedDate = date.toISOString();\n\n return formattedDate;\n };\n\n return React.createElement(ExperimentContext.Provider, {\n value: {\n experiments: state.experiments,\n experiment: state.experiment,\n loading: state.loading,\n loadingGraph: state.loadingGraph,\n loadingRun: state.loadingRun,\n loadingPkl: state.loadingPkl,\n data: state.data,\n rundata: state.rundata,\n pklchanges: state.pklchanges,\n selection: state.selection,\n enabledGraphSearch: state.enabledGraphSearch,\n startAutoUpdateRun: state.startAutoUpdateRun,\n startAutoUpdatePkl: state.startAutoUpdatePkl,\n shouldUpdateGraph: state.shouldUpdateGraph,\n visNodes: state.visNodes,\n setAutoUpdateRun,\n setAutoUpdatePkl,\n searchExperiments,\n clearExperiments,\n getExperiment,\n getExperimentGraph,\n cleanGraphData,\n cleanRunData,\n cleanPklData,\n setPklChanges,\n updateSelection,\n getExperimentRun,\n getExperimentPkl,\n hashCode,\n timeStampToDate,\n setVisData,\n updateGraphColor\n },\n __source: {\n fileName: _jsxFileName,\n lineNumber: 240\n },\n __self: this\n }, props.children);\n};\n\nexport default ExperimentState;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/context/experiment/ExperimentState.js"],"names":["React","useReducer","axios","ExperimentContext","ExperimentReducer","SEARCH_EXPERIMENTS","SET_LOADING","CLEAR_EXPERIMENTS","GET_EXPERIMENT","GET_GRAPH","SET_LOADING_GRAPH","CLEAN_GRAPH_DATA","UPDATE_SELECTION","GET_EXPERIMENT_RUN","SET_LOADING_RUN","CLEAN_RUN_DATA","SET_AUTOUPDATE_RUN","GET_PKL_DATA","SET_LOADING_PKL","UPDATE_NODES","SHOULD_UPDATE_GRAPH","SET_AUTOUPDATE_PKL","CLEAN_PKL_DATA","SET_PKL_CHANGES","UPDATE_EXPERIMENT_TS","SET_VIS_DATA","ExperimentState","props","initialState","experiments","experiment","loading","data","rundata","pkldata","pklchanges","loadingGraph","loadingRun","loadingPkl","selection","enabledGraphSearch","startAutoUpdateRun","startAutoUpdatePkl","shouldUpdateGraph","visNodes","state","dispatch","searchExperiments","text","setLoading","res","get","type","payload","getExperiment","expid","getExperimentGraph","setLoadingGraph","console","log","getExperimentRun","setLoadingRun","getExperimentPkl","timeStamp","setLoadingPkl","retrievedPkl","jobs","colorChanges","changes","has_changed","pkl_content","length","j","job","name","requireUpdate","pkl_timestamp","newData","expData","nodes","i","status_code","id","timeStampToDate","status","status_color","updateNodes","updateExperimentTimeStamp","setUpdateGraph","setPklChanges","key","updateGraphColor","idChange","newColor","update","color","background","clearExperiments","cleanGraphData","cleanRunData","cleanPklData","updateSelection","currentSelection","newdata","newExperiment","setAutoUpdateRun","value","setAutoUpdatePkl","setVisData","hashCode","hash","chr","charCodeAt","formattedDate","date","Date","hours","getHours","minutes","getMinutes","seconds","getSeconds","substr","children"],"mappings":";;AAAA,OAAOA,KAAP,IAAgBC,UAAhB,QAAkC,OAAlC;AACA,OAAOC,KAAP,M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,kBAAkB,EAAEG,KAAK,CAACH,kBAbtB;AAcJC,MAAAA,iBAAiB,EAAEE,KAAK,CAACF,iBAdrB;AAeJC,MAAAA,QAAQ,EAAEC,KAAK,CAACD,QAfZ;AAgBJ6D,MAAAA,gBAhBI;AAiBJE,MAAAA,gBAjBI;AAkBJ5D,MAAAA,iBAlBI;AAmBJkD,MAAAA,gBAnBI;AAoBJ3C,MAAAA,aApBI;AAqBJE,MAAAA,kBArBI;AAsBJ0C,MAAAA,cAtBI;AAuBJC,MAAAA,YAvBI;AAwBJC,MAAAA,YAxBI;AAyBJX,MAAAA,aAzBI;AA0BJY,MAAAA,eA1BI;AA2BJzC,MAAAA,gBA3BI;AA4BJE,MAAAA,gBA5BI;AA6BJ+C,MAAAA,QA7BI;AA8BJ1B,MAAAA,eA9BI;AA+BJyB,MAAAA,UA/BI;AAgCJjB,MAAAA;AAhCI,KADR;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KAmCKhE,KAAK,CAACgG,QAnCX,CADJ;AAuCH,CAzPD;;AA2PA,eAAejG,eAAf","sourcesContent":["import React, { useReducer } from 'react';\nimport axios from 'axios';\nimport ExperimentContext from './experimentContext';\nimport ExperimentReducer from './experimentReducer';\nimport {\n SEARCH_EXPERIMENTS,\n SET_LOADING,\n CLEAR_EXPERIMENTS,\n GET_EXPERIMENT,\n GET_GRAPH,\n SET_LOADING_GRAPH,\n CLEAN_GRAPH_DATA,\n UPDATE_SELECTION,\n GET_EXPERIMENT_RUN,\n SET_LOADING_RUN,\n CLEAN_RUN_DATA,\n SET_AUTOUPDATE_RUN,\n GET_PKL_DATA,\n SET_LOADING_PKL,\n UPDATE_NODES,\n SHOULD_UPDATE_GRAPH,\n SET_AUTOUPDATE_PKL,\n CLEAN_PKL_DATA,\n SET_PKL_CHANGES,\n UPDATE_EXPERIMENT_TS,\n SET_VIS_DATA,\n} from '../types';\n\nconst ExperimentState = props => {\n const initialState = {\n experiments: [],\n experiment: {},\n loading: false,\n data: null,\n rundata: null,\n pkldata: null,\n pklchanges: null,\n loadingGraph: false,\n loadingRun: false,\n loadingPkl: false,\n selection: null,\n enabledGraphSearch: true, \n startAutoUpdateRun: false, \n startAutoUpdatePkl: false,\n shouldUpdateGraph: false, \n visNodes: null, \n }\n\n const [state, dispatch] = useReducer(ExperimentReducer, initialState);\n\n // Search Experiments\n const searchExperiments = async text => {\n setLoading();\n const res = await axios.get(`http://84.88.185.30:8888/search/${text}`);\n dispatch({\n type: SEARCH_EXPERIMENTS,\n payload: res.data.experiment,\n });\n };\n\n // Get Experiment\n const getExperiment = async expid => {\n setLoading();\n //cleanGraphData();\n const res = await axios.get(`http://84.88.185.30:8888/expinfo/${expid}`); \n dispatch({\n type: GET_EXPERIMENT,\n payload: res.data,\n });\n };\n \n // Get Experiment Graph\n const getExperimentGraph = async expid => {\n setLoadingGraph();\n \n const res = await axios.get(`http://84.88.185.30:8888/graph/${expid}`);\n console.log(res.data);\n dispatch({\n type: GET_GRAPH,\n payload: res.data,\n });\n //this.setState({ data: res.data, loading: false, showGraph: !res.data.error });\n };\n\n // Get Experiment Run\n const getExperimentRun = async expid => {\n setLoadingRun();\n const res = await axios.get(`http://84.88.185.30:8888/exprun/${expid}`);\n console.log(res.data);\n dispatch({\n type: GET_EXPERIMENT_RUN,\n payload: res.data,\n });\n }\n\n // Get Experiment Pkl Data\n const getExperimentPkl = async (expid, timeStamp) => {\n setLoadingPkl();\n //timeStamp = 1000;\n const res = await axios.get(`http://84.88.185.30:8888/pklinfo/${expid}/${timeStamp}`);\n console.log(res.data);\n // const actualPkl = res.data;\n \n let retrievedPkl = null;\n var jobs = {};\n var colorChanges = {};\n var changes = \"\"\n retrievedPkl = res.data;\n if (state.data !== null && retrievedPkl.has_changed === true && retrievedPkl.pkl_content.length > 0){\n //console.log(retrievedPkl.pkl_content.length);\n for(var j = 0, job; j < retrievedPkl.pkl_content.length; j++){\n job = retrievedPkl.pkl_content[j];\n //console.log(job);\n jobs[ job.name ] = job;\n //console.log(jobs[job.name]);\n }\n let requireUpdate = false;\n console.log('Current ts: '+ state.data.pkl_timestamp); \n var newData = state.data;\n //console.log(newData.nodes);\n var expData = state.experiment;\n if (newData.nodes){\n for(var i = 0; i < newData.nodes.length; i++){\n // console.log(newNodes[i].id);\n //console.log(newData.nodes[i]);\n // console.log(jobs[ newNodes[i].id ]);\n\n if (newData.nodes[i].status_code !== jobs[ newData.nodes[i].id ].status_code){\n // changes += newData.nodes[i].id + \" from \" + newData.nodes[i].status + \" to \" + jobs[ newData.nodes[i].id ].status + \" || \";\n changes += timeStampToDate(retrievedPkl.pkl_timestamp) + \": \"+ newData.nodes[i].id + \" to \" + jobs[ newData.nodes[i].id ].status + \"\\n\";\n newData.nodes[i].status_code = jobs[ newData.nodes[i].id ].status_code;\n newData.nodes[i].status_color = jobs[ newData.nodes[i].id ].status_color;\n newData.nodes[i].status = jobs[ newData.nodes[i].id ].status;\n //console.log(newData.nodes[i].status_color)\n colorChanges[ newData.nodes[i].id ] = jobs[ newData.nodes[i].id ].status_color;\n requireUpdate = true;\n }\n }\n\n\n if (requireUpdate){ \n // console.log(newData.pkl_timestamp);\n // console.log(expData.pkl_timestamp);\n console.log(\"New ts: \" + retrievedPkl.pkl_timestamp)\n newData.pkl_timestamp = retrievedPkl.pkl_timestamp;\n expData.pkl_timestamp = retrievedPkl.pkl_timestamp;\n // console.log(newData.pkl_timestamp);\n // console.log(expData.pkl_timestamp);\n \n // console.log('Call Update');\n updateNodes(newData);\n updateExperimentTimeStamp(expData);\n setUpdateGraph(true);\n setUpdateGraph(false);\n if (state.pklchanges){\n setPklChanges(changes + state.pklchanges);\n } else {\n setPklChanges(changes);\n }\n\n for(var key in colorChanges) {\n console.log( key, colorChanges[key] );\n }\n \n \n } else { \n console.log('No changes but updating pkl anyway.')\n expData.pkl_timestamp = retrievedPkl.pkl_timestamp;\n updateExperimentTimeStamp(expData);\n }\n }\n }\n // } else {\n // var t = new Date( retrievedPkl.pkl_timestamp );\n // var formatted = t.toISOString();\n // setPklChanges(\"No news yet... \" + formatted)\n // }\n\n\n dispatch({\n type: GET_PKL_DATA,\n payload: res.data,\n });\n }\n\n const updateGraphColor = (idChange, newColor) => {\n this.state.visNodes.update({id:idChange, color: { background: newColor }});\n }\n\n\n // Cleaning\n const clearExperiments = () => dispatch({ type: CLEAR_EXPERIMENTS });\n const cleanGraphData = () => dispatch({ type: CLEAN_GRAPH_DATA });\n const cleanRunData = () => dispatch({ type: CLEAN_RUN_DATA });\n const cleanPklData = () => dispatch({ type: CLEAN_PKL_DATA });\n\n // Set Loading\n const setLoading = () => dispatch({ type: SET_LOADING });\n const setLoadingGraph = () => dispatch({ type: SET_LOADING_GRAPH });\n const setLoadingRun = () => dispatch({ type: SET_LOADING_RUN });\n const setLoadingPkl = () => dispatch({ type: SET_LOADING_PKL });\n\n\n // Action Things\n const updateSelection = (currentSelection) => dispatch({ type: UPDATE_SELECTION, payload: currentSelection });\n const updateNodes = (newdata) => dispatch({ type: UPDATE_NODES, payload: newdata });\n const updateExperimentTimeStamp = (newExperiment) => dispatch({ type: UPDATE_EXPERIMENT_TS, payload: newExperiment});\n const setAutoUpdateRun = (value) => dispatch({ type: SET_AUTOUPDATE_RUN, payload: value });\n const setAutoUpdatePkl = (value) => dispatch({ type: SET_AUTOUPDATE_PKL, payload: value });\n const setUpdateGraph = (value) => dispatch({ type: SHOULD_UPDATE_GRAPH, payload: value });\n const setPklChanges = (value) => dispatch({ type: SET_PKL_CHANGES, payload: value });\n const setVisData = (value) => dispatch({ type: SET_VIS_DATA, payload: value});\n\n // Other Utils\n const hashCode = (value) => {\n var hash = 0, i, chr;\n if (value.length === 0) return hash;\n for (i = 0; i < value.length; i++) {\n chr = value.charCodeAt(i);\n hash = ((hash << 5) - hash) + chr;\n hash |= 0; // Convert to 32bit integer\n }\n console.log(hash);\n return hash;\n };\n \n const timeStampToDate = (value) => {\n //console.log('Setting new format: ' + value);\n let formattedDate = \"\";\n var date = new Date( value * 1000);\n var hours = date.getHours();\n var minutes = \"0\" + date.getMinutes();\n var seconds = \"0\" + date.getSeconds();\n formattedDate = hours + ':' + minutes.substr(-2) + ':' + seconds.substr(-2);\n // formattedDate = date.toISOString();\n return formattedDate;\n }\n\n return (\n \n {props.children}\n \n );\n};\n\nexport default ExperimentState;"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/ef3859cb8865f2ef3538a7f6170a8225.json b/node_modules/.cache/babel-loader/ef3859cb8865f2ef3538a7f6170a8225.json new file mode 100644 index 0000000000000000000000000000000000000000..87589ca5c31864b70f17d880dced9d0d0ab0c81b --- /dev/null +++ b/node_modules/.cache/babel-loader/ef3859cb8865f2ef3538a7f6170a8225.json @@ -0,0 +1 @@ +{"ast":null,"code":"import _objectSpread from \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/node_modules/@babel/runtime/helpers/esm/objectSpread\";\nimport { SEARCH_EXPERIMENTS, SET_LOADING, CLEAR_EXPERIMENTS, GET_EXPERIMENT, GET_GRAPH, SET_LOADING_GRAPH, CLEAN_GRAPH_DATA, CLEAN_RUN_DATA, UPDATE_SELECTION, SET_LOADING_RUN, GET_EXPERIMENT_RUN, SET_AUTOUPDATE_RUN, GET_PKL_DATA, SET_LOADING_PKL, UPDATE_NODES, SHOULD_UPDATE_GRAPH, SET_AUTOUPDATE_PKL, CLEAN_PKL_DATA, SET_PKL_CHANGES, UPDATE_EXPERIMENT_TS, SET_VIS_DATA } from '../types';\nexport default ((state, action) => {\n switch (action.type) {\n case CLEAN_GRAPH_DATA:\n return _objectSpread({}, state, {\n data: null,\n selection: null,\n enabledGraphSearch: true,\n loadingGraph: false,\n loadingPkl: false\n });\n\n case CLEAN_RUN_DATA:\n return _objectSpread({}, state, {\n rundata: null,\n startAutoUpdateRun: false\n });\n\n case CLEAN_PKL_DATA:\n return _objectSpread({}, state, {\n shouldUpdateGraph: false,\n startAutoUpdatePkl: false,\n pklchanges: null\n });\n\n case UPDATE_SELECTION:\n return _objectSpread({}, state, {\n selection: action.payload\n });\n\n case SEARCH_EXPERIMENTS:\n return _objectSpread({}, state, {\n experiments: action.payload,\n loading: false\n });\n\n case SET_AUTOUPDATE_RUN:\n return _objectSpread({}, state, {\n startAutoUpdateRun: action.payload\n });\n\n case SET_AUTOUPDATE_PKL:\n return _objectSpread({}, state, {\n startAutoUpdatePkl: action.payload\n });\n\n case SET_LOADING:\n return _objectSpread({}, state, {\n loading: true\n });\n\n case SET_LOADING_PKL:\n return _objectSpread({}, state, {\n loadingPkl: true\n });\n\n case SET_LOADING_GRAPH:\n return _objectSpread({}, state, {\n loadingGraph: true,\n enabledGraphSearch: false\n });\n\n case SET_LOADING_RUN:\n return _objectSpread({}, state, {\n loadingRun: true\n });\n\n case SHOULD_UPDATE_GRAPH:\n return _objectSpread({}, state, {\n shouldUpdateGraph: action.payload\n });\n\n case CLEAR_EXPERIMENTS:\n return _objectSpread({}, state, {\n experiments: [],\n loading: false\n });\n\n case GET_EXPERIMENT:\n return _objectSpread({}, state, {\n experiment: action.payload,\n loading: false,\n data: null\n });\n\n case GET_GRAPH:\n return _objectSpread({}, state, {\n data: action.payload,\n loadingGraph: false,\n enabledGraphSearch: true\n });\n\n case GET_EXPERIMENT_RUN:\n return _objectSpread({}, state, {\n rundata: action.payload,\n loadingRun: false\n });\n\n case GET_PKL_DATA:\n return _objectSpread({}, state, {\n pkldata: action.payload,\n loadingPkl: false\n });\n\n case UPDATE_NODES:\n return _objectSpread({}, state, {\n data: action.payload\n });\n\n case UPDATE_EXPERIMENT_TS:\n return _objectSpread({}, state, {\n experiment: action.payload\n });\n\n case SET_PKL_CHANGES:\n return _objectSpread({}, state, {\n pklchanges: action.payload\n });\n\n case SET_VIS_DATA:\n return _objectSpread({}, state, {\n visNodes: action.payload\n });\n\n default:\n return null;\n }\n\n ;\n});","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/context/experiment/experimentReducer.js"],"names":["SEARCH_EXPERIMENTS","SET_LOADING","CLEAR_EXPERIMENTS","GET_EXPERIMENT","GET_GRAPH","SET_LOADING_GRAPH","CLEAN_GRAPH_DATA","CLEAN_RUN_DATA","UPDATE_SELECTION","SET_LOADING_RUN","GET_EXPERIMENT_RUN","SET_AUTOUPDATE_RUN","GET_PKL_DATA","SET_LOADING_PKL","UPDATE_NODES","SHOULD_UPDATE_GRAPH","SET_AUTOUPDATE_PKL","CLEAN_PKL_DATA","SET_PKL_CHANGES","UPDATE_EXPERIMENT_TS","SET_VIS_DATA","state","action","type","data","selection","enabledGraphSearch","loadingGraph","loadingPkl","rundata","startAutoUpdateRun","shouldUpdateGraph","startAutoUpdatePkl","pklchanges","payload","experiments","loading","loadingRun","experiment","pkldata","visNodes"],"mappings":";AAAA,SACIA,kBADJ,EAEIC,WAFJ,EAGIC,iBAHJ,EAIIC,cAJJ,EAKIC,SALJ,EAMIC,iBANJ,EAOIC,gBAPJ,EAQIC,cARJ,EASIC,gBATJ,EAUIC,eAVJ,EAWIC,kBAXJ,EAYIC,kBAZJ,EAaIC,YAbJ,EAcIC,eAdJ,EAeIC,YAfJ,EAgBIC,mBAhBJ,EAiBIC,kBAjBJ,EAkBIC,cAlBJ,EAmBIC,eAnBJ,EAoBIC,oBApBJ,EAqBIC,YArBJ,QAsBO,UAtBP;AAwBA,gBAAe,CAACC,KAAD,EAAQC,MAAR,KAAmB;AAC9B,UAAQA,MAAM,CAACC,IAAf;AACI,SAAKjB,gBAAL;AACI,+BACOe,KADP;AAEIG,QAAAA,IAAI,EAAE,IAFV;AAGIC,QAAAA,SAAS,EAAE,IAHf;AAIIC,QAAAA,kBAAkB,EAAE,IAJxB;AAKIC,QAAAA,YAAY,EAAE,KALlB;AAMIC,QAAAA,UAAU,EAAE;AANhB;;AAQJ,SAAKrB,cAAL;AACI,+BACKc,KADL;AAEEQ,QAAAA,OAAO,EAAE,IAFX;AAGEC,QAAAA,kBAAkB,EAAE;AAHtB;;AAKJ,SAAKb,cAAL;AACI,+BACKI,KADL;AAEEU,QAAAA,i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MAAM,CAACY,OAFjB;AAGIP,QAAAA,YAAY,EAAE,KAHlB;AAIID,QAAAA,kBAAkB,EAAE;AAJxB;;AAMJ,SAAKhB,kBAAL;AACI,+BACOW,KADP;AAEIQ,QAAAA,OAAO,EAAEP,MAAM,CAACY,OAFpB;AAGIG,QAAAA,UAAU,EAAE;AAHhB;;AAKJ,SAAKzB,YAAL;AACI,+BACOS,KADP;AAEIkB,QAAAA,OAAO,EAAEjB,MAAM,CAACY,OAFpB;AAGIN,QAAAA,UAAU,EAAE;AAHhB;;AAKJ,SAAKd,YAAL;AACI,+BACOO,KADP;AAEIG,QAAAA,IAAI,EAAEF,MAAM,CAACY;AAFjB;;AAIJ,SAAKf,oBAAL;AACI,+BACOE,KADP;AAEIiB,QAAAA,UAAU,EAAEhB,MAAM,CAACY;AAFvB;;AAIJ,SAAKhB,eAAL;AACI,+BACOG,KADP;AAEIY,QAAAA,UAAU,EAAEX,MAAM,CAACY;AAFvB;;AAIJ,SAAKd,YAAL;AACI,+BACOC,KADP;AAEImB,QAAAA,QAAQ,EAAElB,MAAM,CAACY;AAFrB;;AAIJ;AACI,aAAO,IAAP;AA3HR;;AA4HC;AACJ,CA9HD","sourcesContent":["import {\n SEARCH_EXPERIMENTS,\n SET_LOADING,\n CLEAR_EXPERIMENTS,\n GET_EXPERIMENT,\n GET_GRAPH,\n SET_LOADING_GRAPH,\n CLEAN_GRAPH_DATA,\n CLEAN_RUN_DATA,\n UPDATE_SELECTION,\n SET_LOADING_RUN,\n GET_EXPERIMENT_RUN,\n SET_AUTOUPDATE_RUN,\n GET_PKL_DATA,\n SET_LOADING_PKL,\n UPDATE_NODES,\n SHOULD_UPDATE_GRAPH,\n SET_AUTOUPDATE_PKL,\n CLEAN_PKL_DATA,\n SET_PKL_CHANGES,\n UPDATE_EXPERIMENT_TS,\n SET_VIS_DATA,\n} from '../types';\n\nexport default (state, action) => {\n switch (action.type) {\n case CLEAN_GRAPH_DATA:\n return {\n ...state,\n data: null,\n selection: null,\n enabledGraphSearch: true,\n loadingGraph: false,\n loadingPkl: false,\n };\n case CLEAN_RUN_DATA:\n return {\n ...state,\n rundata: null, \n startAutoUpdateRun: false,\n };\n case CLEAN_PKL_DATA:\n return {\n ...state,\n shouldUpdateGraph: false, \n startAutoUpdatePkl: false,\n pklchanges: null,\n };\n case UPDATE_SELECTION:\n return {\n ...state,\n selection: action.payload,\n };\n case SEARCH_EXPERIMENTS:\n return {\n ...state,\n experiments: action.payload,\n loading: false,\n };\n case SET_AUTOUPDATE_RUN:\n return {\n ...state,\n startAutoUpdateRun: action.payload,\n };\n case SET_AUTOUPDATE_PKL:\n return {\n ...state,\n startAutoUpdatePkl: action.payload,\n }\n case SET_LOADING:\n return {\n ...state,\n loading: true,\n };\n case SET_LOADING_PKL:\n return {\n ...state,\n loadingPkl: true,\n };\n case SET_LOADING_GRAPH:\n return {\n ...state,\n loadingGraph: true,\n enabledGraphSearch: false,\n };\n case SET_LOADING_RUN:\n return {\n ...state,\n loadingRun: true, \n };\n case SHOULD_UPDATE_GRAPH:\n return {\n ...state,\n shouldUpdateGraph: action.payload,\n };\n case CLEAR_EXPERIMENTS:\n return {\n ...state,\n experiments: [],\n loading: false,\n };\n case GET_EXPERIMENT:\n return {\n ...state, \n experiment: action.payload,\n loading: false,\n data: null,\n };\n case GET_GRAPH:\n return {\n ...state,\n data: action.payload,\n loadingGraph: false,\n enabledGraphSearch: true,\n };\n case GET_EXPERIMENT_RUN:\n return {\n ...state,\n rundata: action.payload,\n loadingRun: false,\n };\n case GET_PKL_DATA:\n return {\n ...state,\n pkldata: action.payload,\n loadingPkl: false,\n };\n case UPDATE_NODES:\n return {\n ...state,\n data: action.payload,\n };\n case UPDATE_EXPERIMENT_TS:\n return {\n ...state,\n experiment: action.payload,\n }\n case SET_PKL_CHANGES:\n return {\n ...state,\n pklchanges: action.payload,\n };\n case SET_VIS_DATA:\n return {\n ...state,\n visNodes: action.payload,\n };\n default:\n return null;\n };\n};\n\n "]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/f0218de68c799c8ac261c44864268b42.json b/node_modules/.cache/babel-loader/f0218de68c799c8ac261c44864268b42.json new file mode 100644 index 0000000000000000000000000000000000000000..d2045263314528395a38aa734ea07421c67869be --- /dev/null +++ b/node_modules/.cache/babel-loader/f0218de68c799c8ac261c44864268b42.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/Selection.js\";\nimport React, { useContext, Fragment } from 'react';\nimport ExperimentContext from '../context/experiment/experimentContext';\n\nconst Selection = () => {\n const experimentContext = useContext(ExperimentContext);\n const selection = experimentContext.selection,\n data = experimentContext.data,\n experiment = experimentContext.experiment; // const { model, branch, hpc } = experiment;\n //var currentSelection = \"Node: \"\n\n var currentNode = \"\";\n var selectedNode = null;\n\n if (selection) {\n //console.log(\"Current selection \" + selection)\n selection.map(node => // currentSelection += node + \", \"\n currentNode = node); //console.log(\"Current node \" + currentNode)\n\n selectedNode = data.nodes.find(node => node.id === currentNode); //console.log(\"Selected node\")\n //console.log(\"Data: \" + selectedNode.id + \" \" + selectedNode.platform_name)\n }\n\n return React.createElement(Fragment, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 23\n },\n __self: this\n }, selectedNode && React.createElement(Fragment, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 25\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 26\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-12\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 27\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"card text-white bg-info\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 28\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"card-header text-center p-0\",\n style: headerCard,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 29\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"mh-100 px-0 mx-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 30\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 31\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 31\n },\n __self: this\n }, selectedNode.id)))), React.createElement(\"div\", {\n className: \"card-body py-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 34\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 35\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Date:\"), \" \", selectedNode.date)), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 38\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 39\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-12\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 40\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 41\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 41\n },\n __self: this\n }, \"Section:\"), \" \", selectedNode.section)))), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 45\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 46\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-12\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 47\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 48\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 48\n },\n __self: this\n }, \"Platform:\"), \" \", selectedNode.platform_name && selectedNode.platform_name, \" \", !selectedNode.platform_name && experiment.hpc)))), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 55\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 56\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-6\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 57\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 58\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 58\n },\n __self: this\n }, \"Processors:\"), \" \", selectedNode.processors)), React.createElement(\"div\", {\n className: \"col-6\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 60\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 61\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 61\n },\n __self: this\n }, \"Wallclock:\"), \" \", selectedNode.wallclock)))), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 65\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 66\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-6\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 67\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 68\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 68\n },\n __self: this\n }, \"Level:\"), \" \", selectedNode.level)), React.createElement(\"div\", {\n className: \"col-6\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 70\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 71\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 71\n },\n __self: this\n }, \"Out:\"), \" \", selectedNode.children, \" \", React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 71\n },\n __self: this\n }, \"In:\"), \" \", selectedNode.parents, \" \")))), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 76\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 77\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-12\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 78\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 79\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 79\n },\n __self: this\n }, \"Status:\")), \" \", selectedNode.status))), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 86\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 87\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-12\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 88\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 89\n },\n __self: this\n }, \"c:\", data.max_children, \"/p:\", data.max_parents, \"ac:\", data.avg_children, \"/ap:\", data.avg_parents, \"tj:\", data.total_jobs))))))))), !selectedNode && data && React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 104\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-12\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 105\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"card text-white bg-info\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 106\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"card-header text-center py-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 107\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 108\n },\n __self: this\n }, \"Here goes the Job Id\")), React.createElement(\"div\", {\n className: \"card-body\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 110\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"text-center\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 111\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 112\n },\n __self: this\n }, \"Select a Node to see more information.\")))))));\n};\n\nconst experimentStyle = {\n height: 200\n};\nconst headerCard = {\n height: 30\n};\nexport default Selection;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/Selection.js"],"names":["React","useContext","Fragment","ExperimentContext","Selection","experimentContext","selection","data","experiment","currentNode","selectedNode","map","node","nodes","find","id","experimentStyle","headerCard","date","section","platform_name","hpc","processors","wallclock","level","children","parents","status","max_children","max_parents","avg_children","avg_parents","total_jobs","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,UAAhB,EAA4BC,QAA5B,QAA4C,OAA5C;AACA,OAAOC,iBAAP,MAA8B,yCAA9B;;AAEA,MAAMC,SAAS,GAAG,MAAM;AACpB,QAAMC,iBAAiB,GAAGJ,UAAU,CAACE,iBAAD,CAApC;AADoB,QAEZG,SAFY,GAEoBD,iBAFpB,CAEZC,SAFY;AAAA,QAEDC,IAFC,GAEoBF,iBAFpB,CAEDE,IAFC;AAAA,QAEKC,UAFL,GAEoBH,iBAFpB,CAEKG,UAFL,EAGpB;AACA;;AACA,MAAIC,WAAW,GAAG,EAAlB;AACA,MAAIC,YAAY,GAAG,IAAnB;;AACA,MAAIJ,SAAJ,EAAe;AACX;AACAA,IAA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B,YAFb,UAE+BvB,IAAI,CAACwB,WAFpC,SAGQxB,IAAI,CAACyB,UAHb,CADJ,CADJ,CADJ,CApDJ,CANJ,CADH,CADJ,CADL,CAFR,EAgFS,CAACtB,YAAD,IAAiBH,IAAjB,IACG;AAAK,IAAA,SAAS,EAAC,KAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACI;AAAK,IAAA,SAAS,EAAC,QAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACI;AAAK,IAAA,SAAS,EAAC,yBAAf;AAAyC,IAAA,KAAK,EAAES,eAAhD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACI;AAAK,IAAA,SAAS,EAAC,8BAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACI;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,4BADJ,CADJ,EAII;AAAK,IAAA,SAAS,EAAC,WAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACI;AAAK,IAAA,SAAS,EAAC,aAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,8CADA,CADJ,CAJJ,CADJ,CADJ,CAjFZ,CADJ;AAsGH,CAxHD;;AA0HA,MAAMA,eAAe,GAAG;AACpBiB,EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,MAAMhB,UAAU,GAAG;AACfgB,EAAAA,MAAM,EAAE;AADO,CAAnB;AAIA,eAAe7B,SAAf","sourcesContent":["import React, { useContext, Fragment } from 'react'\nimport ExperimentContext from '../context/experiment/experimentContext';\n\nconst Selection = () => {\n const experimentContext = useContext(ExperimentContext);\n const { selection, data, experiment } = experimentContext;\n // const { model, branch, hpc } = experiment;\n //var currentSelection = \"Node: \"\n var currentNode = \"\"\n var selectedNode = null\n if (selection) {\n //console.log(\"Current selection \" + selection)\n selection.map(node => (\n // currentSelection += node + \", \"\n currentNode = node\n ));\n //console.log(\"Current node \" + currentNode)\n selectedNode = data.nodes.find(node => node.id === currentNode) \n //console.log(\"Selected node\")\n //console.log(\"Data: \" + selectedNode.id + \" \" + selectedNode.platform_name)\n } \n return (\n \n {selectedNode &&\n \n
\n
\n
\n
\n
\n {selectedNode.id}\n
\n
\n
\n
\n Date: {selectedNode.date}\n
\n
\n
\n
\n Section: {selectedNode.section}\n
\n
\n
\n
\n
\n
\n Platform: {selectedNode.platform_name && selectedNode.platform_name} {!selectedNode.platform_name && experiment.hpc}\n
\n
\n
\n {/*
\n Priority: {selectedNode.priority}\n
*/}\n
\n
\n
\n Processors: {selectedNode.processors}\n
\n
\n Wallclock: {selectedNode.wallclock}\n
\n
\n
\n
\n
\n
\n Level: {selectedNode.level}\n
\n
\n Out: {selectedNode.children} In: {selectedNode.parents} \n
\n \n
\n
\n
\n
\n
\n Status: {selectedNode.status}\n
\n {/*
\n c:{data.max_children}/p:{data.max_parents}\n
*/}\n
\n
\n
\n
\n
\n \n c:{data.max_children}/p:{data.max_parents} \n ac:{data.avg_children}/ap:{data.avg_parents} \n tj:{data.total_jobs} \n \n
\n
\n
\n
\n
\n
\n
\n
\n } \n {!selectedNode && data &&\n
\n
\n
\n
\n Here goes the Job Id\n
\n
\n
\n Select a Node to see more information. \n
\n
\n
\n
\n
\n } \n
\n \n \n\n )\n}\n\nconst experimentStyle = {\n height: 200\n };\n\nconst headerCard = {\n height: 30\n}\n\nexport default Selection;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/f05514aa17102d899cef8abdeca39a87.json b/node_modules/.cache/babel-loader/f05514aa17102d899cef8abdeca39a87.json new file mode 100644 index 0000000000000000000000000000000000000000..000a5558d0c0674a29a4131088ab7b68f88a3917 --- /dev/null +++ b/node_modules/.cache/babel-loader/f05514aa17102d899cef8abdeca39a87.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/Selection.js\";\nimport React, { useContext, Fragment } from 'react';\nimport ExperimentContext from '../context/experiment/experimentContext';\n\nconst Selection = () => {\n const experimentContext = useContext(ExperimentContext);\n const selection = experimentContext.selection,\n data = experimentContext.data,\n experiment = experimentContext.experiment; // const { model, branch, hpc } = experiment;\n //var currentSelection = \"Node: \"\n\n var currentNode = \"\";\n var selectedNode = null;\n\n if (selection) {\n //console.log(\"Current selection \" + selection)\n selection.map(node => // currentSelection += node + \", \"\n currentNode = node); //console.log(\"Current node \" + currentNode)\n\n selectedNode = data.nodes.find(node => node.id === currentNode); //console.log(\"Selected node\")\n //console.log(\"Data: \" + selectedNode.id + \" \" + selectedNode.platform_name)\n }\n\n return React.createElement(Fragment, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 23\n },\n __self: this\n }, selectedNode && React.createElement(Fragment, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 25\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 26\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-12\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 27\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"card text-white bg-info\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 28\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"card-header text-center py-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 29\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 30\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 30\n },\n __self: this\n }, selectedNode.id))), React.createElement(\"div\", {\n className: \"card-body py-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 32\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 33\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 34\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 34\n },\n __self: this\n }, \"Date:\"), \" \", selectedNode.date)), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-12\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 38\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 39\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 39\n },\n __self: this\n }, \"Section:\"), \" \", selectedNode.section)))), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 43\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 44\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-8\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 45\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 46\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 46\n },\n __self: this\n }, \"Platform:\"), \" \", selectedNode.platform_name && selectedNode.platform_name, \" \", !selectedNode.platform_name && experiment.hpc)), React.createElement(\"div\", {\n className: \"col-4 text-right\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 48\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 49\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 49\n },\n __self: this\n }, \"c:\", data.max_children, \"/p:\", data.max_parents))))), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 56\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 57\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-6\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 58\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 59\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 59\n },\n __self: this\n }, \"Processors:\"), \" \", selectedNode.processors)), React.createElement(\"div\", {\n className: \"col-6\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 61\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 62\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 62\n },\n __self: this\n }, \"Wallclock:\"), \" \", selectedNode.wallclock)))), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 66\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 67\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-6\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 68\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 69\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 69\n },\n __self: this\n }, \"Level:\"), \" \", selectedNode.level)), React.createElement(\"div\", {\n className: \"col-6\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 71\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 72\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 72\n },\n __self: this\n }, \"Out:\"), \" \", selectedNode.children, \" \", React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 72\n },\n __self: this\n }, \"In:\"), \" \", selectedNode.parents, \" \")))), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 77\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 78\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 78\n },\n __self: this\n }, \"Status:\")), \" \", selectedNode.status)))))), !selectedNode && data && React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 89\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-12\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 90\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"card text-white bg-info\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 91\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"card-header text-center py-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 92\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 93\n },\n __self: this\n }, \"Here goes the Job Id\")), React.createElement(\"div\", {\n className: \"card-body\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 95\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"text-center\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 96\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 97\n },\n __self: this\n }, \"Select a Node to see more information.\")))))));\n};\n\nconst experimentStyle = {\n height: 200\n};\nexport default Selection;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/Selection.js"],"names":["React","useContext","Fragment","ExperimentContext","Selection","experimentContext","selection","data","experiment","currentNode","selectedNode","map","node","nodes","find","id","experimentStyle","date","section","platform_name","hpc","max_children","max_parents","processors","wallclock","level","children","parents","status","height"],"mapp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A;AAAA;AAAA;AAAA;AAAA,KAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,eAAP,CADJ,OAC6CjB,YAAY,CAACkB,MAD1D,CA7CJ,CAJJ,CADH,CADJ,CADL,CAFR,EAiES,CAAClB,YAAD,IAAiBH,IAAjB,IACG;AAAK,IAAA,SAAS,EAAC,KAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACI;AAAK,IAAA,SAAS,EAAC,QAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACI;AAAK,IAAA,SAAS,EAAC,yBAAf;AAAyC,IAAA,KAAK,EAAES,eAAhD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACI;AAAK,IAAA,SAAS,EAAC,8BAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACI;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,4BADJ,CADJ,EAII;AAAK,IAAA,SAAS,EAAC,WAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACI;AAAK,IAAA,SAAS,EAAC,aAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,8CADA,CADJ,CAJJ,CADJ,CADJ,CAlEZ,CADJ;AAuFH,CAzGD;;AA2GA,MAAMA,eAAe,GAAG;AACpBa,EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,eAAezB,SAAf","sourcesContent":["import React, { useContext, Fragment } from 'react'\nimport ExperimentContext from '../context/experiment/experimentContext';\n\nconst Selection = () => {\n const experimentContext = useContext(ExperimentContext);\n const { selection, data, experiment } = experimentContext;\n // const { model, branch, hpc } = experiment;\n //var currentSelection = \"Node: \"\n var currentNode = \"\"\n var selectedNode = null\n if (selection) {\n //console.log(\"Current selection \" + selection)\n selection.map(node => (\n // currentSelection += node + \", \"\n currentNode = node\n ));\n //console.log(\"Current node \" + currentNode)\n selectedNode = data.nodes.find(node => node.id === currentNode) \n //console.log(\"Selected node\")\n //console.log(\"Data: \" + selectedNode.id + \" \" + selectedNode.platform_name)\n } \n return (\n \n {selectedNode &&\n \n
\n
\n
\n
\n {selectedNode.id}\n
\n
\n
\n Date: {selectedNode.date}\n
\n
\n
\n
\n Section: {selectedNode.section}\n
\n
\n
\n
\n
\n
\n Platform: {selectedNode.platform_name && selectedNode.platform_name} {!selectedNode.platform_name && experiment.hpc}\n
\n
\n c:{data.max_children}/p:{data.max_parents}\n
\n
\n
\n {/*
\n Priority: {selectedNode.priority}\n
*/}\n
\n
\n
\n Processors: {selectedNode.processors}\n
\n
\n Wallclock: {selectedNode.wallclock}\n
\n
\n
\n
\n
\n
\n Level: {selectedNode.level}\n
\n
\n Out: {selectedNode.children} In: {selectedNode.parents} \n
\n \n
\n
\n
\n Status: {selectedNode.status}\n
\n \n \n
\n
\n
\n
\n
\n } \n {!selectedNode && data &&\n
\n
\n
\n
\n Here goes the Job Id\n
\n
\n
\n Select a Node to see more information. \n
\n
\n
\n
\n
\n } \n
\n \n \n\n )\n}\n\nconst experimentStyle = {\n height: 200\n };\n\nexport default Selection;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/f08225413d661cb771ec7a1ecc3bd5f5.json b/node_modules/.cache/babel-loader/f08225413d661cb771ec7a1ecc3bd5f5.json new file mode 100644 index 0000000000000000000000000000000000000000..fc708787c4a6f1dd02958bcf84c104017bfa7008 --- /dev/null +++ b/node_modules/.cache/babel-loader/f08225413d661cb771ec7a1ecc3bd5f5.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js\";\nimport React, { Component } from \"react\"; // import vis from \"vis-network\";\n\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n constructor(...args) {\n super(...args);\n\n this.updateVisNodes = nodes => {\n this.props.setVisData(nodes);\n };\n }\n\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else if (nextProps.data && this.props.data && nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp) {\n console.log(\"Rerendering\");\n return true;\n } else if (nextProps.loadingGraph !== this.props.loadingGraph) {\n return true;\n } else {\n return false;\n }\n }\n\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n render() {\n if (this.props.loadingGraph) return React.createElement(Spinner, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 32\n },\n __self: this\n });\n\n if (this.props.data == null) {\n return React.createElement(\"div\", {\n className: \"card-body text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 35\n },\n __self: this\n }, React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Press \", React.createElement(\"span\", {\n className: \"badge badge-info\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Show Graph\"), \" to see the graph representation of the experiment.\"), React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"If the experiment is running, press \", React.createElement(\"span\", {\n className: \"badge badge-dark\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"Start Job Monitor\"), \" to start a live tracker of the changes on the experiment's jobs. This process will automatically update the graph's nodes colors and show a log of the detected changes.\"));\n }\n\n var nodes_array = [];\n var edges_array = [];\n\n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: {\n background: node.status_color,\n border: \"black\"\n },\n level: node.level\n }));\n this.props.data.edges.map(edge => edges_array.push({\n from: edge.from,\n to: edge.to\n }));\n }\n\n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n const options = {\n edges: {\n arrows: {\n to: {\n enabled: true\n }\n }\n },\n layout: {\n improvedLayout: true,\n hierarchical: {\n nodeSpacing: 150,\n blockShifting: true,\n edgeMinimization: true,\n //parentCentralization: true,\n sortMethod: 'hubsize',\n direction: 'UD'\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true\n },\n physics: {\n enabled: false\n },\n nodes: {\n shape: 'dot',\n font: {\n size: 8\n }\n }\n };\n const graph = {\n nodes: nodes,\n edges: edges\n };\n\n class VisNetwork extends Component {\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else {\n return false;\n }\n }\n\n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", params => {\n //console.log(params);\n if (params.nodes) {\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n });\n } // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n\n\n render() {\n return React.createElement(\"div\", {\n className: \"card-body p-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 133\n },\n __self: this\n }, React.createElement(\"div\", {\n ref: \"myRef\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 134\n },\n __self: this\n }));\n }\n\n }\n\n this.updateVisNodes(nodes);\n return React.createElement(VisNetwork, {\n graph: graph,\n options: options,\n updateSelection: this.props.updateSelection,\n shouldUpdateGraph: this.props.shouldUpdateGraph,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 142\n },\n __self: this\n });\n }\n\n}\n\nconst experimentStyle = {\n height: 600\n};\nexport default GraphNativeRep;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js"],"names":["React","Component","Spinner","vis","GraphNativeRep","updateVisNodes","nodes","props","setVisData","shouldComponentUpdate","nextProps","nextState","shouldUpdateGraph","data","pkl_timestamp","console","log","loadingGraph","componentWillUnmount","cleanGraphData","render","nodes_array","edges_array","edges","map","node","push","id","label","color","background","status_color","border","level","edge","from","to","DataSet","options","arrows","enabled","layout","improvedLayout","hierarchical","nodeSpacing","blockShifting","edgeMinimization","sortMethod","direction","interaction","dragNodes","hoverConnectedEdges","navigationButtons","physics","shape","font","size","graph","VisNetwork","componentDidMount","network","Network","refs","myRef","on","params","updateSelection","experimentStyle","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,SAAhB,QAAiC,OAAjC,C,CACA;;AACA,OAAOC,OAAP,MAAoB,mBAApB;AACA,OAAOC,GAAP,MAAgB,KAAhB;;AAEA,MAAMC,cAAN,SAA6BH,SAA7B,CAAuC;AAAA;AAAA;;AAAA,SAmBnCI,cAnBmC,GAmBjBC,KAAD,IAAW;AACxB,WAAKC,KAAL,CAAWC,UAAX,CAAsBF,KAAtB;AACH,KArBkC;AAAA;;AAEnCG,EAAAA,qBAAqB,CAACC,SAAD,EAAYC,SAAZ,EAAsB;AACvC,QAAI,KAAKJ,KAAL,CAAWK,iBAAX,KAAiC,IAArC,EAA0C;AACtC,aAAO,IAAP;AACD,KAFH,MAEQ,IAAIF,SAAS,CAACG,IAAV,IAAkB,KAAKN,KAAL,CAAWM,IAA7B,IAAsCH,SAAS,CAACG,IAAV,CAAeC,aAAf,KAAiC,KAAKP,KAAL,CAAWM,IAAX,CAAgBC,aAA3F,EAA0G;AAC9GC,MAAAA,OAAO,CAACC,GAAR,CAAY,aAAZ;AACA,aAAO,IAAP;AACD,KAHK,MAGA,IAAIN,SAAS,CAACO,YAAV,KAA2B,KAAKV,KAAL,CAAWU,YAA1C,EAAuD;AAC3D,aAAO,IAAP;AACD,KAFK,MAED;AACH,aAAO,KAAP;AACD;AACN;;AACDC,EAAAA,oBAAoB,GAAG;AACnBH,IAAAA,OAAO,CAACC,GAAR,CAAY,YAAZ;AACA,SAAKT,KAAL,CAAWY,cAAX;AACH;;AAQDC,EAAAA,MAAM,GAAI;AACN,QAAI,KAAKb,KAAL,CAAWU,YAAf,EAA6B,OAAO,o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spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n\n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true\n }else if (nextProps.data && this.props.data && (nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp)){\n console.log(\"Rerendering\")\n return true;\n }else if (nextProps.loadingGraph !== this.props.loadingGraph){\n return true; \n }else{\n return false;\n }\n }\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n updateVisNodes = (nodes) => {\n this.props.setVisData(nodes);\n }\n\n\n\n render () {\n if (this.props.loadingGraph) return ;\n if (this.props.data == null){\n return (\n
\n

Press Show Graph to see the graph representation of the experiment.

\n

If the experiment is running, press Start Job Monitor to start a live tracker of the changes on the experiment's jobs.\n This process will automatically update the graph's nodes colors and show a log of the detected changes.\n

\n
\n );\n }\n\n var nodes_array = [];\n var edges_array = [];\n \n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: { background: node.status_color, border: \"black\" },\n level: node.level,\n })\n );\n \n this.props.data.edges.map(edge => \n edges_array.push({ from: edge.from, to: edge.to })\n );\n }\n \n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n\n\n const options = {\n edges: {\n arrows: {\n to: { enabled: true }\n }\n },\n layout: {\n improvedLayout: true,\n hierarchical: {\n nodeSpacing: 150,\n blockShifting: true,\n edgeMinimization: true,\n //parentCentralization: true,\n sortMethod: 'hubsize',\n direction: 'UD',\n }\n }, \n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true,\n },\n physics: {\n enabled: false,\n },\n nodes: {\n shape: 'dot',\n font: {\n size: 8,\n },\n }\n };\n \n const graph = {\n nodes : nodes,\n edges : edges,\n };\n\n class VisNetwork extends Component {\n \n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true;\n } else {\n return false;\n }\n }\n \n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", (params) => {\n //console.log(params);\n if (params.nodes){\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n \n });\n }\n \n // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n \n render() { \n return (\n
\n
\n
\n );\n }\n }\n\n this.updateVisNodes(nodes);\n \n return ;\n\n }\n\n\n \n\n \n\n \n \n\n \n\n}\n\nconst experimentStyle = {\n height: 600\n };\n\nexport default GraphNativeRep;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/f7bc79a65fac6c13063b2f813161cbe4.json b/node_modules/.cache/babel-loader/f7bc79a65fac6c13063b2f813161cbe4.json new file mode 100644 index 0000000000000000000000000000000000000000..f8d066fbc4ed4f1b156fb1149840117319d129b9 --- /dev/null +++ b/node_modules/.cache/babel-loader/f7bc79a65fac6c13063b2f813161cbe4.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/Selection.js\";\nimport React, { useContext, Fragment } from 'react';\nimport ExperimentContext from '../context/experiment/experimentContext';\n\nconst Selection = () => {\n const experimentContext = useContext(ExperimentContext);\n const selection = experimentContext.selection,\n data = experimentContext.data,\n experiment = experimentContext.experiment; // const { model, branch, hpc } = experiment;\n //var currentSelection = \"Node: \"\n\n var currentNode = \"\";\n var selectedNode = null;\n\n if (selection) {\n //console.log(\"Current selection \" + selection)\n selection.map(node => // currentSelection += node + \", \"\n currentNode = node); //console.log(\"Current node \" + currentNode)\n\n selectedNode = data.nodes.find(node => node.id === currentNode); //console.log(\"Selected node\")\n //console.log(\"Data: \" + selectedNode.id + \" \" + selectedNode.platform_name)\n }\n\n return React.createElement(Fragment, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 23\n },\n __self: this\n }, selectedNode && React.createElement(Fragment, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 25\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 26\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-12\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 27\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"card text-white bg-info\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 28\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"card-header text-center py-0\",\n style: headerCard,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 29\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"mh-100 px-0 mx-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 30\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 31\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 31\n },\n __self: this\n }, selectedNode.id)))), React.createElement(\"div\", {\n className: \"card-body py-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 34\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 35\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Date:\"), \" \", selectedNode.date)), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 38\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 39\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-12\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 40\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 41\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 41\n },\n __self: this\n }, \"Section:\"), \" \", selectedNode.section)))), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 45\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 46\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-8\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 47\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 48\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 48\n },\n __self: this\n }, \"Platform:\"), \" \", selectedNode.platform_name && selectedNode.platform_name, \" \", !selectedNode.platform_name && experiment.hpc)), React.createElement(\"div\", {\n className: \"col-4 text-right\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 50\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 51\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 51\n },\n __self: this\n }, \"c:\", data.max_children, \"/p:\", data.max_parents))))), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 58\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 59\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-6\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 60\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 61\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 61\n },\n __self: this\n }, \"Processors:\"), \" \", selectedNode.processors)), React.createElement(\"div\", {\n className: \"col-6\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 63\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 64\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 64\n },\n __self: this\n }, \"Wallclock:\"), \" \", selectedNode.wallclock)))), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 68\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 69\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-6\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 70\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 71\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 71\n },\n __self: this\n }, \"Level:\"), \" \", selectedNode.level)), React.createElement(\"div\", {\n className: \"col-6\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 73\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 74\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 74\n },\n __self: this\n }, \"Out:\"), \" \", selectedNode.children, \" \", React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 74\n },\n __self: this\n }, \"In:\"), \" \", selectedNode.parents, \" \")))), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 79\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 80\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 80\n },\n __self: this\n }, \"Status:\")), \" \", selectedNode.status)))))), !selectedNode && data && React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 89\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-12\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 90\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"card text-white bg-info\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 91\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"card-header text-center py-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 92\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 93\n },\n __self: this\n }, \"Here goes the Job Id\")), React.createElement(\"div\", {\n className: \"card-body\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 95\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"text-center\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 96\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 97\n },\n __self: this\n }, \"Select a Node to see more information.\")))))));\n};\n\nconst experimentStyle = {\n height: 200\n};\nconst headerCard = {\n height: 30\n};\nexport default Selection;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/Selection.js"],"names":["React","useContext","Fragment","ExperimentContext","Selection","experimentContext","selection","data","experiment","currentNode","selectedNode","map","node","nodes","find","id","experimentStyle","headerCard","date","section","platform_name","hpc","max_children","max_parents","processors","wallclock","level","children","parents","status","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,UAAhB,EAA4BC,QAA5B,QAA4C,OAA5C;AACA,OAAOC,iBAAP,MAA8B,yCAA9B;;AAEA,MAAMC,SAAS,GAAG,MAAM;AACpB,QAAMC,iBAAiB,GAAGJ,UAAU,CAACE,iBAAD,CAApC;AADoB,QAEZG,SAFY,GAEoBD,iBAFpB,CAEZC,SAFY;AAAA,QAEDC,IAFC,GAEoBF,iBAFpB,CAEDE,IAFC;AAAA,QAEKC,UAFL,GAEoBH,iBAFpB,CAEKG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AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACI;AAAK,IAAA,SAAS,EAAC,QAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACI;AAAK,IAAA,SAAS,EAAC,yBAAf;AAAyC,IAAA,KAAK,EAAES,eAAhD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACI;AAAK,IAAA,SAAS,EAAC,8BAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACI;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,4BADJ,CADJ,EAII;AAAK,IAAA,SAAS,EAAC,WAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACI;AAAK,IAAA,SAAS,EAAC,aAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,8CADA,CADJ,CAJJ,CADJ,CADJ,CAlEZ,CADJ;AAuFH,CAzGD;;AA2GA,MAAMA,eAAe,GAAG;AACpBc,EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,MAAMb,UAAU,GAAG;AACfa,EAAAA,MAAM,EAAE;AADO,CAAnB;AAIA,eAAe1B,SAAf","sourcesContent":["import React, { useContext, Fragment } from 'react'\nimport ExperimentContext from '../context/experiment/experimentContext';\n\nconst Selection = () => {\n const experimentContext = useContext(ExperimentContext);\n const { selection, data, experiment } = experimentContext;\n // const { model, branch, hpc } = experiment;\n //var currentSelection = \"Node: \"\n var currentNode = \"\"\n var selectedNode = null\n if (selection) {\n //console.log(\"Current selection \" + selection)\n selection.map(node => (\n // currentSelection += node + \", \"\n currentNode = node\n ));\n //console.log(\"Current node \" + currentNode)\n selectedNode = data.nodes.find(node => node.id === currentNode) \n //console.log(\"Selected node\")\n //console.log(\"Data: \" + selectedNode.id + \" \" + selectedNode.platform_name)\n } \n return (\n \n {selectedNode &&\n \n
\n
\n
\n
\n
\n {selectedNode.id}\n
\n
\n
\n
\n Date: {selectedNode.date}\n
\n
\n
\n
\n Section: {selectedNode.section}\n
\n
\n
\n
\n
\n
\n Platform: {selectedNode.platform_name && selectedNode.platform_name} {!selectedNode.platform_name && experiment.hpc}\n
\n
\n c:{data.max_children}/p:{data.max_parents}\n
\n
\n
\n {/*
\n Priority: {selectedNode.priority}\n
*/}\n
\n
\n
\n Processors: {selectedNode.processors}\n
\n
\n Wallclock: {selectedNode.wallclock}\n
\n
\n
\n
\n
\n
\n Level: {selectedNode.level}\n
\n
\n Out: {selectedNode.children} In: {selectedNode.parents} \n
\n \n
\n
\n
\n Status: {selectedNode.status}\n
\n
\n
\n
\n
\n
\n } \n {!selectedNode && data &&\n
\n
\n
\n
\n Here goes the Job Id\n
\n
\n
\n Select a Node to see more information. \n
\n
\n
\n
\n
\n } \n
\n \n \n\n )\n}\n\nconst experimentStyle = {\n height: 200\n };\n\nconst headerCard = {\n height: 30\n}\n\nexport default Selection;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/f9c4f4c289f54d2f9ceaa2f55b87e9c2.json b/node_modules/.cache/babel-loader/f9c4f4c289f54d2f9ceaa2f55b87e9c2.json new file mode 100644 index 0000000000000000000000000000000000000000..9616b4527db50a6f726dc8fead0a0659825000ec --- /dev/null +++ b/node_modules/.cache/babel-loader/f9c4f4c289f54d2f9ceaa2f55b87e9c2.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/Selection.js\";\nimport React, { useContext, Fragment } from 'react';\nimport ExperimentContext from '../context/experiment/experimentContext';\n\nconst Selection = () => {\n const experimentContext = useContext(ExperimentContext);\n const selection = experimentContext.selection,\n data = experimentContext.data,\n experiment = experimentContext.experiment; // const { model, branch, hpc } = experiment;\n //var currentSelection = \"Node: \"\n\n var currentNode = \"\";\n var selectedNode = null;\n\n if (selection) {\n //console.log(\"Current selection \" + selection)\n selection.map(node => // currentSelection += node + \", \"\n currentNode = node); //console.log(\"Current node \" + currentNode)\n\n selectedNode = data.nodes.find(node => node.id === currentNode); //console.log(\"Selected node\")\n //console.log(\"Data: \" + selectedNode.id + \" \" + selectedNode.platform_name)\n }\n\n return React.createElement(Fragment, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 23\n },\n __self: this\n }, selectedNode && React.createElement(Fragment, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 25\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 26\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-12\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 27\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"card text-white bg-info\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 28\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"card-header text-center py-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 29\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 30\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 30\n },\n __self: this\n }, selectedNode.id))), React.createElement(\"div\", {\n className: \"card-body py-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 32\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 33\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 34\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 34\n },\n __self: this\n }, \"Date:\"), \" \", selectedNode.date)), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-6\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 38\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 39\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 39\n },\n __self: this\n }, \"Section:\"), \" \", selectedNode.section)), React.createElement(\"div\", {\n className: \"col-6 text-right\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 41\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 42\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 42\n },\n __self: this\n }, \"c:\", data.max_children, \"/p:\", data.max_parents))))), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 46\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 47\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 47\n },\n __self: this\n }, \"Platform:\"), \" \", selectedNode.platform_name && selectedNode.platform_name, \" \", !selectedNode.platform_name && experiment.hpc)), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 49\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 50\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 50\n },\n __self: this\n }, \"Priority:\"), \" \", selectedNode.priority)), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 52\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 53\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-6\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 54\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 55\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 55\n },\n __self: this\n }, \"Processors:\"), \" \", selectedNode.processors)), React.createElement(\"div\", {\n className: \"col-6\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 57\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 58\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 58\n },\n __self: this\n }, \"Wallclock:\"), \" \", selectedNode.wallclock)))), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 62\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 63\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-6\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 64\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 65\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 65\n },\n __self: this\n }, \"Level:\"), \" \", selectedNode.level)), React.createElement(\"div\", {\n className: \"col-6\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 67\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 68\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 68\n },\n __self: this\n }, \"Out:\"), \" \", selectedNode.children, \" \", React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 68\n },\n __self: this\n }, \"In:\"), \" \", selectedNode.parents, \" \")))), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 73\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 74\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 74\n },\n __self: this\n }, \"Status:\")), \" \", selectedNode.status)))))), !selectedNode && data && React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 85\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-12\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 86\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"card text-white bg-info\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 87\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"card-header text-center py-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 88\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 89\n },\n __self: this\n }, \"Here goes the Job Id\")), React.createElement(\"div\", {\n className: \"card-body\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 91\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"text-center\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 92\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 93\n },\n __self: this\n }, \"Select a Node to see more information.\")))))));\n};\n\nconst experimentStyle = {\n height: 200\n};\nexport default Selection;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/Selection.js"],"names":["React","useContext","Fragment","ExperimentContext","Selection","experimentContext","selection","data","experiment","currentNode","selectedNode","map","node","nodes","find","id","experimentStyle","date","section","max_children","max_parents","platform_name","hpc","priority","processors","wallclock","level","children","parents","status","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,UAAhB,EAA4BC,QAA5B,QAA4C,OAA5C;AACA,OAAOC,iBAAP,MAA8B,yCAA9B;;AAEA,MAAMC,SAAS,GAAG,MAAM;AACpB,QAAMC,iBAAiB,GAAGJ,UAAU,CAACE,iBAAD,CAApC;AADoB,QAEZG,SAFY,GAEoB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K,IAAA,SAAS,EAAC,KAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACI;AAAK,IAAA,SAAS,EAAC,QAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACI;AAAK,IAAA,SAAS,EAAC,yBAAf;AAAyC,IAAA,KAAK,EAAES,eAAhD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACI;AAAK,IAAA,SAAS,EAAC,8BAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACI;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,4BADJ,CADJ,EAII;AAAK,IAAA,SAAS,EAAC,WAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACI;AAAK,IAAA,SAAS,EAAC,aAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,8CADA,CADJ,CAJJ,CADJ,CADJ,CA9DZ,CADJ;AAmFH,CArGD;;AAuGA,MAAMA,eAAe,GAAG;AACpBc,EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,eAAe1B,SAAf","sourcesContent":["import React, { useContext, Fragment } from 'react'\nimport ExperimentContext from '../context/experiment/experimentContext';\n\nconst Selection = () => {\n const experimentContext = useContext(ExperimentContext);\n const { selection, data, experiment } = experimentContext;\n // const { model, branch, hpc } = experiment;\n //var currentSelection = \"Node: \"\n var currentNode = \"\"\n var selectedNode = null\n if (selection) {\n //console.log(\"Current selection \" + selection)\n selection.map(node => (\n // currentSelection += node + \", \"\n currentNode = node\n ));\n //console.log(\"Current node \" + currentNode)\n selectedNode = data.nodes.find(node => node.id === currentNode) \n //console.log(\"Selected node\")\n //console.log(\"Data: \" + selectedNode.id + \" \" + selectedNode.platform_name)\n } \n return (\n \n {selectedNode &&\n \n
\n
\n
\n
\n {selectedNode.id}\n
\n
\n
\n Date: {selectedNode.date}\n
\n
\n
\n
\n Section: {selectedNode.section}\n
\n
\n c:{data.max_children}/p:{data.max_parents}\n
\n
\n
\n
\n Platform: {selectedNode.platform_name && selectedNode.platform_name} {!selectedNode.platform_name && experiment.hpc}\n
\n
\n Priority: {selectedNode.priority}\n
\n
\n
\n
\n Processors: {selectedNode.processors}\n
\n
\n Wallclock: {selectedNode.wallclock}\n
\n
\n
\n
\n
\n
\n Level: {selectedNode.level}\n
\n
\n Out: {selectedNode.children} In: {selectedNode.parents} \n
\n \n
\n
\n
\n Status: {selectedNode.status}\n
\n \n \n
\n
\n
\n
\n
\n } \n {!selectedNode && data &&\n
\n
\n
\n
\n Here goes the Job Id\n
\n
\n
\n Select a Node to see more information. \n
\n
\n
\n
\n
\n } \n
\n \n \n\n )\n}\n\nconst experimentStyle = {\n height: 200\n };\n\nexport default Selection;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/fa7f274ed125bf87be5a4bc62b0a182b.json b/node_modules/.cache/babel-loader/fa7f274ed125bf87be5a4bc62b0a182b.json new file mode 100644 index 0000000000000000000000000000000000000000..405a235e654511524b8d10ac40d4f209412f4a68 --- /dev/null +++ b/node_modules/.cache/babel-loader/fa7f274ed125bf87be5a4bc62b0a182b.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/Selection.js\";\nimport React, { useContext, Fragment } from 'react';\nimport ExperimentContext from '../context/experiment/experimentContext';\n\nconst Selection = () => {\n const experimentContext = useContext(ExperimentContext);\n const selection = experimentContext.selection,\n data = experimentContext.data; // const { model, branch, hpc } = experiment;\n //var currentSelection = \"Node: \"\n\n var currentNode = \"\";\n var selectedNode = null;\n\n if (selection) {\n //console.log(\"Current selection \" + selection)\n selection.map(node => // currentSelection += node + \", \"\n currentNode = node); //console.log(\"Current node \" + currentNode)\n\n selectedNode = data.nodes.find(node => node.id === currentNode); //console.log(\"Selected node\")\n //console.log(\"Data: \" + selectedNode.id + \" \" + selectedNode.platform_name)\n }\n\n return React.createElement(Fragment, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 23\n },\n __self: this\n }, selectedNode && React.createElement(Fragment, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 25\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 26\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-12\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 27\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"card text-white bg-info\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 28\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"card-header text-center py-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 29\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 30\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 30\n },\n __self: this\n }, selectedNode.id))), React.createElement(\"div\", {\n className: \"card-body py-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 32\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 33\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 34\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 34\n },\n __self: this\n }, \"Date:\"), \" \", selectedNode.date)), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"Section:\"), \" \", selectedNode.section)), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 39\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 40\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 40\n },\n __self: this\n }, \"Platform:\"), \" \", selectedNode.platform_name)), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 42\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 43\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 43\n },\n __self: this\n }, \"Priority:\"), \" \", selectedNode.priority)), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 45\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 46\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 46\n },\n __self: this\n }, \"Processors:\"), \" \", selectedNode.processors)), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 48\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 49\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 49\n },\n __self: this\n }, \"Status:\")), \" \", selectedNode.status), React.createElement(\"div\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 51\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 52\n },\n __self: this\n }, React.createElement(\"strong\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 52\n },\n __self: this\n }, \"Level:\")), \" \", selectedNode.level)))))), !selectedNode && data && React.createElement(\"div\", {\n className: \"row\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 62\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"col-12\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 63\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"card text-white bg-info\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 64\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"card-header text-center py-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 65\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 66\n },\n __self: this\n }, \"Here goes the Job Id\")), React.createElement(\"div\", {\n className: \"card-body\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 68\n },\n __self: this\n }, React.createElement(\"div\", {\n className: \"text-center\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 69\n },\n __self: this\n }, React.createElement(\"small\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 70\n },\n __self: this\n }, \"Select a Node to see more information.\")))))));\n};\n\nconst experimentStyle = {\n height: 200\n};\nexport default Selection;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/Selection.js"],"names":["React","useContext","Fragment","ExperimentContext","Selection","experimentContext","selection","data","currentNode","selectedNode","map","node","nodes","find","id","experimentStyle","date","section","platform_name","priority","processors","status","level","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,UAAhB,EAA4BC,QAA5B,QAA4C,OAA5C;AACA,OAAOC,iBAAP,MAA8B,yCAA9B;;AAEA,MAAMC,SAAS,GAAG,MAAM;AACpB,QAAMC,iBAAiB,GAAGJ,UAAU,CAACE,iBAAD,CAApC;AADoB,QAEZG,SAFY,GAEQD,iBAFR,CAEZC,SAFY;AAAA,QAEDC,IAFC,GAEQF,iBAFR,CAEDE,IAFC,EAGpB;AACA;;AACA,MAAIC,WAAW,GAAG,EAAlB;AACA,MAAIC,YAAY,GAAG,IAAnB;;AACA,MAAIH,SAAJ,EAAe;AACX;AACAA,IAAAA,SAAS,CAACI,GAAV,CAAcC,IAAI,IACd;AACAH,IAAAA,WAAW,GAAGG,IAFlB,EAFW,CAMX;;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AII;AAAK,IAAA,SAAS,EAAC,WAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACI;AAAK,IAAA,SAAS,EAAC,aAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,8CADA,CADJ,CAJJ,CADJ,CADJ,CAvCZ,CADJ;AA4DH,CA9ED;;AAgFA,MAAMA,eAAe,GAAG;AACpBQ,EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,eAAenB,SAAf","sourcesContent":["import React, { useContext, Fragment } from 'react'\nimport ExperimentContext from '../context/experiment/experimentContext';\n\nconst Selection = () => {\n const experimentContext = useContext(ExperimentContext);\n const { selection, data } = experimentContext;\n // const { model, branch, hpc } = experiment;\n //var currentSelection = \"Node: \"\n var currentNode = \"\"\n var selectedNode = null\n if (selection) {\n //console.log(\"Current selection \" + selection)\n selection.map(node => (\n // currentSelection += node + \", \"\n currentNode = node\n ));\n //console.log(\"Current node \" + currentNode)\n selectedNode = data.nodes.find(node => node.id === currentNode) \n //console.log(\"Selected node\")\n //console.log(\"Data: \" + selectedNode.id + \" \" + selectedNode.platform_name)\n } \n return (\n \n {selectedNode &&\n \n
\n
\n
\n
\n {selectedNode.id}\n
\n
\n
\n Date: {selectedNode.date}\n
\n
\n Section: {selectedNode.section}\n
\n
\n Platform: {selectedNode.platform_name}\n
\n
\n Priority: {selectedNode.priority}\n
\n
\n Processors: {selectedNode.processors}\n
\n
\n Status: {selectedNode.status}\n
\n
\n Level: {selectedNode.level}\n
\n \n
\n
\n
\n
\n
\n } \n {!selectedNode && data &&\n
\n
\n
\n
\n Here goes the Job Id\n
\n
\n
\n Select a Node to see more information. \n
\n
\n
\n
\n
\n } \n
\n \n \n\n )\n}\n\nconst experimentStyle = {\n height: 200\n };\n\nexport default Selection;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/fbdfe6effc4a6c7131b5e6618bde5942.json b/node_modules/.cache/babel-loader/fbdfe6effc4a6c7131b5e6618bde5942.json new file mode 100644 index 0000000000000000000000000000000000000000..95edd2288f22f5b2c2facdfe71173b11766287d3 --- /dev/null +++ b/node_modules/.cache/babel-loader/fbdfe6effc4a6c7131b5e6618bde5942.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js\";\nimport React, { Component } from \"react\"; // import vis from \"vis-network\";\n\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n constructor(...args) {\n super(...args);\n\n this.updateVisNodes = nodes => {\n this.props.setVisData(nodes);\n };\n }\n\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else if (nextProps.data && this.props.data && nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp) {\n console.log(\"Rerendering\");\n return true;\n } else if (nextProps.loadingGraph !== this.props.loadingGraph) {\n return true;\n } else {\n return false;\n }\n }\n\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n render() {\n if (this.props.loadingGraph) return React.createElement(Spinner, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 32\n },\n __self: this\n });\n\n if (this.props.data == null) {\n return React.createElement(\"div\", {\n className: \"card-body text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 35\n },\n __self: this\n }, React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Press \", React.createElement(\"span\", {\n className: \"badge badge-info\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Show Graph\"), \" to see the graph representation of the experiment.\"), React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"If the experiment is running, press \", React.createElement(\"span\", {\n className: \"badge badge-dark\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"Start Job Monitor\"), \" to start a live tracker of the changes on the experiment's jobs. This process will automatically update the graph's nodes colors and show a log of the detected changes.\"));\n }\n\n var nodes_array = [];\n var edges_array = [];\n\n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: {\n background: node.status_color,\n border: \"black\"\n },\n level: node.level\n }));\n this.props.data.edges.map(edge => edges_array.push({\n from: edge.from,\n to: edge.to\n }));\n }\n\n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n const options = {\n edges: {\n arrows: {\n to: {\n enabled: true\n }\n }\n },\n layout: {\n //improvedLayout: true,\n hierarchical: {\n nodeSpacing: 190,\n blockShifting: true,\n edgeMinimization: false,\n //parentCentralization: true,\n sortMethod: 'hubsize',\n direction: 'UD'\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true\n },\n physics: {\n enabled: false\n },\n nodes: {\n shape: 'dot',\n font: {\n size: 10\n }\n }\n };\n const graph = {\n nodes: nodes,\n edges: edges\n };\n\n class VisNetwork extends Component {\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else {\n return false;\n }\n }\n\n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", params => {\n //console.log(params);\n if (params.nodes) {\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n });\n } // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n\n\n render() {\n return React.createElement(\"div\", {\n className: \"card-body p-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 133\n },\n __self: this\n }, React.createElement(\"div\", {\n ref: \"myRef\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 134\n },\n __self: this\n }));\n }\n\n }\n\n this.updateVisNodes(nodes);\n return React.createElement(VisNetwork, {\n graph: graph,\n options: options,\n updateSelection: this.props.updateSelection,\n shouldUpdateGraph: this.props.shouldUpdateGraph,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 142\n },\n __self: this\n });\n }\n\n}\n\nconst experimentStyle = {\n height: 600\n};\nexport default GraphNativeRep;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js"],"names":["React","Component","Spinner","vis","GraphNativeRep","updateVisNodes","nodes","props","setVisData","shouldComponentUpdate","nextProps","nextState","shouldUpdateGraph","data","pkl_timestamp","console","log","loadingGraph","componentWillUnmount","cleanGraphData","render","nodes_array","edges_array","edges","map","node","push","id","label","color","background","status_color","border","level","edge","from","to","DataSet","options","arrows","enabled","layout","hierarchical","nodeSpacing","blockShifting","edgeMinimization","sortMethod","direction","interaction","dragNodes","hoverConnectedEdges","navigationButtons","physics","shape","font","size","graph","VisNetwork","componentDidMount","network","Network","refs","myRef","on","params","updateSelection","experimentStyle","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,SAAhB,QAAiC,OAAjC,C,CACA;;AACA,OAAOC,OAAP,MAAoB,mBAApB;AACA,OAAOC,GAAP,MAAgB,KAAhB;;AAEA,MAAMC,cAAN,SAA6BH,SAA7B,CAAuC;AAAA;AAAA;;AAAA,SAmBnCI,cAnBmC,GAmBjBC,KAAD,IAAW;AACxB,WAAKC,KAAL,CAAWC,UAAX,CAAsBF,KAAtB;AACH,KArBkC;AAAA;;AAEnCG,EAAAA,qBAAqB,CAACC,SAAD,EAAYC,SAAZ,EAAsB;AACvC,QAAI,KAAKJ,KAAL,CAAWK,iBAAX,KAAiC,IAArC,EAA0C;AACtC,aAAO,IAAP;AACD,KAFH,MAEQ,IAAIF,SAAS,CAACG,IAAV,IAAkB,KAAKN,KAAL,CAAWM,IAA7B,IAAsCH,SAAS,CAACG,IAAV,CAAeC,aAAf,KAAi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,SAAK7D,cAAL,CAAoBC,KAApB;AAEA,WAAO,oBAAC,UAAD;AACH,MAAA,KAAK,EAAEkD,KADJ;AAEH,MAAA,OAAO,EAAElB,OAFN;AAGH,MAAA,eAAe,EAAE,KAAK/B,KAAL,CAAW0D,eAHzB;AAIH,MAAA,iBAAiB,EAAE,KAAK1D,KAAL,CAAWK,iBAJ3B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAAP;AAOH;;AA/IkC;;AA6JvC,MAAMsD,eAAe,GAAG;AACpBC,EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,eAAe/D,cAAf","sourcesContent":["import React, { Component } from \"react\";\n// import vis from \"vis-network\";\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n\n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true\n }else if (nextProps.data && this.props.data && (nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp)){\n console.log(\"Rerendering\")\n return true;\n }else if (nextProps.loadingGraph !== this.props.loadingGraph){\n return true; \n }else{\n return false;\n }\n }\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n updateVisNodes = (nodes) => {\n this.props.setVisData(nodes);\n }\n\n\n\n render () {\n if (this.props.loadingGraph) return ;\n if (this.props.data == null){\n return (\n
\n

Press Show Graph to see the graph representation of the experiment.

\n

If the experiment is running, press Start Job Monitor to start a live tracker of the changes on the experiment's jobs.\n This process will automatically update the graph's nodes colors and show a log of the detected changes.\n

\n
\n );\n }\n\n var nodes_array = [];\n var edges_array = [];\n \n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: { background: node.status_color, border: \"black\" },\n level: node.level,\n })\n );\n \n this.props.data.edges.map(edge => \n edges_array.push({ from: edge.from, to: edge.to })\n );\n }\n \n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n\n\n const options = {\n edges: {\n arrows: {\n to: { enabled: true }\n }\n },\n layout: {\n //improvedLayout: true,\n hierarchical: {\n nodeSpacing: 190,\n blockShifting: true,\n edgeMinimization: false,\n //parentCentralization: true,\n sortMethod: 'hubsize',\n direction: 'UD',\n }\n }, \n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true,\n },\n physics: {\n enabled: false,\n },\n nodes: {\n shape: 'dot',\n font: {\n size: 10,\n },\n }\n };\n \n const graph = {\n nodes : nodes,\n edges : edges,\n };\n\n class VisNetwork extends Component {\n \n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true;\n } else {\n return false;\n }\n }\n \n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", (params) => {\n //console.log(params);\n if (params.nodes){\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n \n });\n }\n \n // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n \n render() { \n return (\n
\n
\n
\n );\n }\n }\n\n this.updateVisNodes(nodes);\n \n return ;\n\n }\n\n\n \n\n \n\n \n \n\n \n\n}\n\nconst experimentStyle = {\n height: 600\n };\n\nexport default GraphNativeRep;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/fc7ada7c89114da444ae82c840483db9.json b/node_modules/.cache/babel-loader/fc7ada7c89114da444ae82c840483db9.json new file mode 100644 index 0000000000000000000000000000000000000000..949a0518137447f2a734453f84313a909b86cfa2 --- /dev/null +++ b/node_modules/.cache/babel-loader/fc7ada7c89114da444ae82c840483db9.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js\";\nimport React, { Component } from \"react\"; // import vis from \"vis-network\";\n\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n constructor(...args) {\n super(...args);\n\n this.updateVisNodes = nodes => {\n this.props.setVisData(nodes);\n };\n }\n\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else if (nextProps.data && this.props.data && nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp) {\n console.log(\"Rerendering\");\n return true;\n } else if (nextProps.loadingGraph !== this.props.loadingGraph) {\n return true;\n } else {\n return false;\n }\n }\n\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n render() {\n if (this.props.loadingGraph) return React.createElement(Spinner, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 32\n },\n __self: this\n });\n\n if (this.props.data == null) {\n return React.createElement(\"div\", {\n className: \"card-body text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 35\n },\n __self: this\n }, React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Press \", React.createElement(\"span\", {\n className: \"badge badge-info\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Show Graph\"), \" to see the graph representation of the experiment.\"), React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"If the experiment is running, press \", React.createElement(\"span\", {\n className: \"badge badge-dark\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"Start Job Monitor\"), \" to start a live tracker of the changes on the experiment's jobs. This process will automatically update the graph's nodes colors and show a log of the detected changes.\"));\n }\n\n var nodes_array = [];\n var edges_array = [];\n\n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: {\n background: node.status_color,\n border: \"black\"\n },\n level: node.level\n }));\n this.props.data.edges.map(edge => edges_array.push({\n from: edge.from,\n to: edge.to\n }));\n }\n\n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n const options = {\n edges: {\n arrows: {\n to: {\n enabled: true\n }\n }\n },\n layout: {\n improvedLayout: true,\n hierarchical: {\n nodeSpacing: 190,\n blockShifting: true,\n edgeMinimization: true,\n //parentCentralization: true,\n sortMethod: 'hubsize',\n direction: 'UD'\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true\n },\n physics: {\n enabled: false\n },\n nodes: {\n shape: 'dot',\n font: {\n size: 10\n }\n }\n };\n const graph = {\n nodes: nodes,\n edges: edges\n };\n\n class VisNetwork extends Component {\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else {\n return false;\n }\n }\n\n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", params => {\n //console.log(params);\n if (params.nodes) {\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n });\n } // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n\n\n render() {\n return React.createElement(\"div\", {\n className: \"card-body p-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 133\n },\n __self: this\n }, React.createElement(\"div\", {\n ref: \"myRef\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 134\n },\n __self: this\n }));\n }\n\n }\n\n this.updateVisNodes(nodes);\n return React.createElement(VisNetwork, {\n graph: graph,\n options: options,\n updateSelection: this.props.updateSelection,\n shouldUpdateGraph: this.props.shouldUpdateGraph,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 142\n },\n __self: this\n });\n }\n\n}\n\nconst experimentStyle = {\n height: 600\n};\nexport default GraphNativeRep;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js"],"names":["React","Component","Spinner","vis","GraphNativeRep","updateVisNodes","nodes","props","setVisData","shouldComponentUpdate","nextProps","nextState","shouldUpdateGraph","data","pkl_timestamp","console","log","loadingGraph","componentWillUnmount","cleanGraphData","render","nodes_array","edges_array","edges","map","node","push","id","label","color","background","status_color","border","level","edge","from","to","DataSet","options","arrows","enabled","layout","improvedLayout","hierarchical","nodeSpacing","blockShifting","edgeMinimization","sortMethod","direction","interaction","dragNodes","hoverConnectedEdges","navigationButtons","physics","shape","font","size","graph","VisNetwork","componentDidMount","network","Network","refs","myRef","on","params","updateSelection","experimentStyle","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,SAAhB,QAAiC,OAAjC,C,CACA;;AACA,OAAOC,OAAP,MAAoB,mBAApB;AACA,OAAOC,GAAP,MAAgB,KAAhB;;AAEA,MAAMC,cAAN,SAA6BH,SAA7B,CAAuC;AAAA;AAAA;;AAAA,SAmBnCI,cAnBmC,GAmBjBC,KAAD,IAAW;AACxB,WAAKC,KAAL,CAAWC,UAAX,CAAsBF,KAAtB;AACH,KArBkC;AAAA;;AAEnCG,EAAAA,qBAAqB,CAACC,SAAD,EAAYC,SAAZ,EAAsB;AACvC,QAAI,KAAKJ,KAAL,CAAWK,iBAAX,KAAiC,IAArC,EAA0C;AACtC,aAAO,IAAP;AACD,KAFH,MAEQ,IAAIF,SAAS,CAACG,IAAV,IAAkB,KAAKN,KAAL,CAAWM,IAA7B,IAAsCH,SAAS,CAACG,IAAV,CAAeC,aAAf,KAAiC,KAAKP,KAAL,CAAWM,IAAX,CAAgBC,aAA3F,EAA0G;AAC9GC,MAAAA,OAAO,CAACC,GAAR,CAAY,aAAZ;AACA,aAAO,IAAP;AACD,KAHK,MAGA,IAAIN,SAAS,CAACO,YAAV,KAA2B,KAAKV,KAAL,CAAWU,YAA1C,EAAuD;AAC3D,aAAO,IAAP;AACD,KAFK,MAED;AACH,aAAO,KAAP;AACD;AACN;;AACDC,EAAAA,oBAAoB,GAAG;AACnBH,IAAAA,OAAO,CAACC,GAAR,CAAY,Y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D,eAAe,GAAG;AACpBC,EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,eAAehE,cAAf","sourcesContent":["import React, { Component } from \"react\";\n// import vis from \"vis-network\";\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n\n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true\n }else if (nextProps.data && this.props.data && (nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp)){\n console.log(\"Rerendering\")\n return true;\n }else if (nextProps.loadingGraph !== this.props.loadingGraph){\n return true; \n }else{\n return false;\n }\n }\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n updateVisNodes = (nodes) => {\n this.props.setVisData(nodes);\n }\n\n\n\n render () {\n if (this.props.loadingGraph) return ;\n if (this.props.data == null){\n return (\n
\n

Press Show Graph to see the graph representation of the experiment.

\n

If the experiment is running, press Start Job Monitor to start a live tracker of the changes on the experiment's jobs.\n This process will automatically update the graph's nodes colors and show a log of the detected changes.\n

\n
\n );\n }\n\n var nodes_array = [];\n var edges_array = [];\n \n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: { background: node.status_color, border: \"black\" },\n level: node.level,\n })\n );\n \n this.props.data.edges.map(edge => \n edges_array.push({ from: edge.from, to: edge.to })\n );\n }\n \n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n\n\n const options = {\n edges: {\n arrows: {\n to: { enabled: true }\n }\n },\n layout: {\n improvedLayout: true,\n hierarchical: {\n nodeSpacing: 190,\n blockShifting: true,\n edgeMinimization: true,\n //parentCentralization: true,\n sortMethod: 'hubsize',\n direction: 'UD',\n }\n }, \n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true,\n },\n physics: {\n enabled: false,\n },\n nodes: {\n shape: 'dot',\n font: {\n size: 10,\n },\n }\n };\n \n const graph = {\n nodes : nodes,\n edges : edges,\n };\n\n class VisNetwork extends Component {\n \n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true;\n } else {\n return false;\n }\n }\n \n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", (params) => {\n //console.log(params);\n if (params.nodes){\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n \n });\n }\n \n // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n \n render() { \n return (\n
\n
\n
\n );\n }\n }\n\n this.updateVisNodes(nodes);\n \n return ;\n\n }\n\n\n \n\n \n\n \n \n\n \n\n}\n\nconst experimentStyle = {\n height: 600\n };\n\nexport default GraphNativeRep;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/fd48cba839c3c38b41d67ab3f227c95d.json b/node_modules/.cache/babel-loader/fd48cba839c3c38b41d67ab3f227c95d.json new file mode 100644 index 0000000000000000000000000000000000000000..f38ad2e3b05c42630ee616619222fd55e18b8479 --- /dev/null +++ b/node_modules/.cache/babel-loader/fd48cba839c3c38b41d67ab3f227c95d.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js\";\nimport React, { Component } from \"react\"; // import vis from \"vis-network\";\n\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n constructor(...args) {\n super(...args);\n\n this.updateVisNodes = nodes => {\n this.props.setVisData(nodes);\n };\n }\n\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else if (nextProps.data && this.props.data && nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp) {\n console.log(\"Rerendering\");\n return true;\n } else if (nextProps.loadingGraph !== this.props.loadingGraph) {\n return true;\n } else {\n return false;\n }\n }\n\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n render() {\n if (this.props.loadingGraph) return React.createElement(Spinner, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 32\n },\n __self: this\n });\n\n if (this.props.data == null) {\n return React.createElement(\"div\", {\n className: \"card-body text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 35\n },\n __self: this\n }, React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Press \", React.createElement(\"span\", {\n className: \"badge badge-info\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Show Graph\"), \" to see the graph representation of the experiment.\"), React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"If the experiment is running, press \", React.createElement(\"span\", {\n className: \"badge badge-dark\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 37\n },\n __self: this\n }, \"Start Job Monitor\"), \" to start a live tracker of the changes on the experiment's jobs. This process will automatically update the graph's nodes colors and show a log of the detected changes.\"));\n }\n\n var nodes_array = [];\n var edges_array = [];\n\n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: {\n background: node.status_color,\n border: \"black\"\n },\n level: node.level\n }));\n this.props.data.edges.map(edge => edges_array.push({\n from: edge.from,\n to: edge.to\n }));\n }\n\n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n const options = {\n edges: {\n arrows: {\n to: {\n enabled: true\n }\n }\n },\n layout: {\n //improvedLayout: true,\n hierarchical: {\n // enabled: true,\n levelSeparation: 150,\n treeSpacing: 200,\n nodeSpacing: 250,\n blockShifting: true,\n edgeMinimization: true,\n parentCentralization: true,\n direction: 'UD'\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true\n },\n physics: {\n enabled: false\n },\n nodes: {\n shape: 'dot'\n }\n };\n const graph = {\n nodes: nodes,\n edges: edges\n };\n\n class VisNetwork extends Component {\n shouldComponentUpdate(nextProps, nextState) {\n if (this.props.shouldUpdateGraph === true) {\n return true;\n } else {\n return false;\n }\n }\n\n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", params => {\n //console.log(params);\n if (params.nodes) {\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n });\n } // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n\n\n render() {\n return React.createElement(\"div\", {\n className: \"card-body p-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 132\n },\n __self: this\n }, React.createElement(\"div\", {\n ref: \"myRef\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 133\n },\n __self: this\n }));\n }\n\n }\n\n this.updateVisNodes(nodes);\n return React.createElement(VisNetwork, {\n graph: graph,\n options: options,\n updateSelection: this.props.updateSelection,\n shouldUpdateGraph: this.props.shouldUpdateGraph,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 141\n },\n __self: this\n });\n }\n\n}\n\nconst experimentStyle = {\n height: 600\n};\nexport default GraphNativeRep;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js"],"names":["React","Component","Spinner","vis","GraphNativeRep","updateVisNodes","nodes","props","setVisData","shouldComponentUpdate","nextProps","nextState","shouldUpdateGraph","data","pkl_timestamp","console","log","loadingGraph","componentWillUnmount","cleanGraphData","render","nodes_array","edges_array","edges","map","node","push","id","label","color","background","status_color","border","level","edge","from","to","DataSet","options","arrows","enabled","layout","hierarchical","levelSeparation","treeSpacing","nodeSpacing","blockShifting","edgeMinimization","parentCentralization","direction","interaction","dragNodes","hoverConnectedEdges","navigationButtons","physics","shape","graph","VisNetwork","componentDidMount","network","Network","refs","myRef","on","params","updateSelection","experimentStyle","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,SAAhB,QAAiC,OAAjC,C,CACA;;AACA,OAAOC,OAAP,MAAoB,mBAApB;AACA,OAAOC,GAAP,MAAgB,KAAhB;;AAEA,MAAMC,cAAN,SAA6BH,SAA7B,CAAuC;AAAA;AAAA;;AAAA,SAmBnCI,cAnBmC,GAmBjBC,KAAD,IAAW;AACxB,WAAKC,KAAL,CAAWC,UAAX,CAAsBF,KAAtB;AACH,KArBkC;AAAA;;AAEnCG,EAAAA,qBAAqB,CAACC,SAAD,EAAYC,SAAZ,EAAsB;AACvC,QAAI,KAAKJ,KAAL,CAAWK,iBAAX,KAAiC,IAArC,EAA0C;AACtC,aAAO,IAAP;AACD,KAFH,MAEQ,IAAIF,SAAS,CAACG,IAAV,IAAkB,KAAKN,KAAL,CAAWM,IAA7B,IAAsCH,SAAS,CAACG,IAAV,CAAeC,aAAf,KAAiC,KAAKP,KAAL,CAAWM,IAAX,CAAgBC,aAA3F,EAA0G;AAC9GC,MAAAA,OAAO,CAACC,GAAR,CAAY,aAAZ;AACA,aAAO,IAAP;AACD,KAHK,MAGA,IAAIN,SAAS,CAACO,YAAV,KAA2B,KAAKV,KAAL,CAAWU,YAA1C,EAAuD;AAC3D,aAAO,IAAP;AACD,KAFK,MAED;AACH,aAAO,KAAP;AACD;AACN;;AACDC,EAAAA,oBAAoB,GAAG;AACnBH,IAAAA,OAAO,CAACC,GAAR,CAAY,YAAZ;AACA,SAAKT,KAAL,CAAWY,cAAX;AACH;;AAQDC,EAAAA,MAAM,GAAI;AACN,QAAI,KAAKb,KAAL,CAAWU,YAAf,EAA6B,OAAO,oBAAC,OAAD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAAP;;AAC7B,QAAI,KAAKV,KAAL,CAAWM,IAAX,IAAmB,IAAvB,EAA4B;AACxB,aACI;AAAK,QAAA,SAAS,EAAC,qBAAf;A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,IAAIxD,GAAG,CAACyD,OAAR,CAAgB,KAAKC,IAAL,CAAUC,KAA1B,EAAiC,KAAKvD,KAAL,CAAWiD,KAA5C,EAAmD,KAAKjD,KAAL,CAAW+B,OAA9D,CAAd;AACAqB,QAAAA,OAAO,CAACI,EAAR,CAAW,OAAX,EAAqBC,MAAD,IAAY;AAC5B;AACA,cAAIA,MAAM,CAAC1D,KAAX,EAAiB;AACb;AACA,iBAAKC,KAAL,CAAW0D,eAAX,CAA2BD,MAAM,CAAC1D,KAAlC;AACH;AAEJ,SAPD;AAQH,OApB8B,CAsB/B;AACA;AACA;AACA;;;AAEAc,MAAAA,MAAM,GAAG;AACL,eACI;AAAK,UAAA,SAAS,EAAC,eAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,WACI;AAAK,UAAA,GAAG,EAAC,OAAT;AAAiB,UAAA,KAAK,EAAE8C,eAAxB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,UADJ,CADJ;AAKH;;AAjC8B;;AAoCnC,SAAK7D,cAAL,CAAoBC,KAApB;AAEA,WAAO,oBAAC,UAAD;AACH,MAAA,KAAK,EAAEkD,KADJ;AAEH,MAAA,OAAO,EAAElB,OAFN;AAGH,MAAA,eAAe,EAAE,KAAK/B,KAAL,CAAW0D,eAHzB;AAIH,MAAA,iBAAiB,EAAE,KAAK1D,KAAL,CAAWK,iBAJ3B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAAP;AAOH;;AA9IkC;;AA4JvC,MAAMsD,eAAe,GAAG;AACpBC,EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,eAAe/D,cAAf","sourcesContent":["import React, { Component } from \"react\";\n// import vis from \"vis-network\";\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n\n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true\n }else if (nextProps.data && this.props.data && (nextProps.data.pkl_timestamp !== this.props.data.pkl_timestamp)){\n console.log(\"Rerendering\")\n return true;\n }else if (nextProps.loadingGraph !== this.props.loadingGraph){\n return true; \n }else{\n return false;\n }\n }\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n updateVisNodes = (nodes) => {\n this.props.setVisData(nodes);\n }\n\n\n\n render () {\n if (this.props.loadingGraph) return ;\n if (this.props.data == null){\n return (\n
\n

Press Show Graph to see the graph representation of the experiment.

\n

If the experiment is running, press Start Job Monitor to start a live tracker of the changes on the experiment's jobs.\n This process will automatically update the graph's nodes colors and show a log of the detected changes.\n

\n
\n );\n }\n\n var nodes_array = [];\n var edges_array = [];\n \n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: { background: node.status_color, border: \"black\" },\n level: node.level,\n })\n );\n \n this.props.data.edges.map(edge => \n edges_array.push({ from: edge.from, to: edge.to })\n );\n }\n \n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n\n\n const options = {\n edges: {\n arrows: {\n to: { enabled: true }\n }\n },\n layout: {\n //improvedLayout: true,\n hierarchical: {\n // enabled: true,\n levelSeparation: 150,\n treeSpacing: 200,\n nodeSpacing: 250,\n blockShifting: true,\n edgeMinimization: true,\n parentCentralization: true,\n direction: 'UD',\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true,\n },\n physics: {\n enabled: false,\n },\n nodes: {\n shape: 'dot',\n }\n };\n \n const graph = {\n nodes : nodes,\n edges : edges,\n };\n\n class VisNetwork extends Component {\n \n shouldComponentUpdate(nextProps, nextState){ \n if (this.props.shouldUpdateGraph === true){\n return true;\n } else {\n return false;\n }\n }\n \n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", (params) => {\n //console.log(params);\n if (params.nodes){\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n \n });\n }\n \n // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n \n render() { \n return (\n
\n
\n
\n );\n }\n }\n\n this.updateVisNodes(nodes);\n \n return ;\n\n }\n\n\n \n\n \n\n \n \n\n \n\n}\n\nconst experimentStyle = {\n height: 600\n };\n\nexport default GraphNativeRep;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/.cache/babel-loader/fd8015214b4d53cedabc3248797557f2.json b/node_modules/.cache/babel-loader/fd8015214b4d53cedabc3248797557f2.json new file mode 100644 index 0000000000000000000000000000000000000000..bf21e4a13f0ff400c053f56fea86a272281d5a4b --- /dev/null +++ b/node_modules/.cache/babel-loader/fd8015214b4d53cedabc3248797557f2.json @@ -0,0 +1 @@ +{"ast":null,"code":"var _jsxFileName = \"/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js\";\nimport React, { Component } from \"react\"; // import vis from \"vis-network\";\n\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n constructor(...args) {\n super(...args);\n\n this.updateVisNodes = nodes => {\n this.props.setVisData(nodes);\n };\n }\n\n shouldComponentUpdate(nextProps, nextState) {\n if (nextProps.data && this.props.data) {\n console.log(\"Rerendering\");\n return true;\n } else if (nextProps.loadingGraph !== this.props.loadingGraph) {\n return true;\n } else {\n return false;\n }\n }\n\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n render() {\n if (this.props.loadingGraph) return React.createElement(Spinner, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 31\n },\n __self: this\n });\n\n if (this.props.data == null) {\n return React.createElement(\"div\", {\n className: \"card-body text-left\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 34\n },\n __self: this\n }, React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 35\n },\n __self: this\n }, \"Press \", React.createElement(\"span\", {\n className: \"badge badge-info\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 35\n },\n __self: this\n }, \"Show Graph\"), \" to see the graph representation of the experiment.\"), React.createElement(\"p\", {\n className: \"lead\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"If the experiment is running, press \", React.createElement(\"span\", {\n className: \"badge badge-dark\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 36\n },\n __self: this\n }, \"Start Job Monitor\"), \" to start a live tracker of the changes on the experiment's jobs. This process will automatically update the graph's nodes colors and show a log of the detected changes.\"));\n }\n\n var nodes_array = [];\n var edges_array = [];\n\n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: {\n background: node.status_color,\n border: \"black\"\n } //level: node.priority,\n\n }));\n this.props.data.edges.map(edge => edges_array.push({\n from: edge.from,\n to: edge.to\n }));\n }\n\n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n const options = {\n edges: {\n arrows: {\n to: {\n enabled: true\n }\n }\n },\n layout: {\n improvedLayout: true,\n hierarchical: {\n nodeSpacing: 250,\n edgeMinimization: false,\n blockShifting: false,\n parentCentralization: false,\n direction: 'UD',\n sortMethod: 'directed'\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true\n },\n physics: {\n enabled: false\n },\n nodes: {\n shape: 'dot'\n }\n };\n const graph = {\n nodes: nodes,\n edges: edges\n };\n\n class VisNetwork extends Component {\n // shouldComponentUpdate(nextProps, nextState){ \n // if (this.props.shouldUpdateGraph === true){\n // return true;\n // } else {\n // return false;\n // }\n // }\n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", params => {\n //console.log(params);\n if (params.nodes) {\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n });\n } // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n\n\n render() {\n return React.createElement(\"div\", {\n className: \"card-body p-0\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 130\n },\n __self: this\n }, React.createElement(\"div\", {\n ref: \"myRef\",\n style: experimentStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 131\n },\n __self: this\n }));\n }\n\n }\n\n this.updateVisNodes(nodes);\n return React.createElement(VisNetwork, {\n graph: graph,\n options: options,\n updateSelection: this.props.updateSelection,\n shouldUpdateGraph: this.props.shouldUpdateGraph,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 139\n },\n __self: this\n });\n }\n\n}\n\nconst experimentStyle = {\n height: 600\n};\nexport default GraphNativeRep;","map":{"version":3,"sources":["/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/src/components/experiment/GraphNativeRep.js"],"names":["React","Component","Spinner","vis","GraphNativeRep","updateVisNodes","nodes","props","setVisData","shouldComponentUpdate","nextProps","nextState","data","console","log","loadingGraph","componentWillUnmount","cleanGraphData","render","nodes_array","edges_array","edges","map","node","push","id","label","color","background","status_color","border","edge","from","to","DataSet","options","arrows","enabled","layout","improvedLayout","hierarchical","nodeSpacing","edgeMinimization","blockShifting","parentCentralization","direction","sortMethod","interaction","dragNodes","hoverConnectedEdges","navigationButtons","physics","shape","graph","VisNetwork","componentDidMount","network","Network","refs","myRef","on","params","updateSelection","experimentStyle","shouldUpdateGraph","height"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,SAAhB,QAAiC,OAAjC,C,CACA;;AACA,OAAOC,OAAP,MAAoB,mBAApB;AACA,OAAOC,GAAP,MAAgB,KAAhB;;AAEA,MAAMC,cAAN,SAA6BH,SAA7B,CAAuC;AAAA;AAAA;;AAAA,SAkBnCI,cAlBmC,GAkBjBC,KAAD,IAAW;AACxB,WAAKC,KAAL,CAAWC,UAAX,CAAsBF,KAAtB;AACH,KApBkC;AAAA;;AAEnCG,EAAAA,qBAAqB,CAACC,SAAD,EAAYC,SAAZ,EA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uD,eAHzB;AAIH,MAAA,iBAAiB,EAAE,KAAKvD,KAAL,CAAWyD,iBAJ3B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAAP;AAOH;;AA5IkC;;AA0JvC,MAAMD,eAAe,GAAG;AACpBE,EAAAA,MAAM,EAAE;AADY,CAAxB;AAIA,eAAe7D,cAAf","sourcesContent":["import React, { Component } from \"react\";\n// import vis from \"vis-network\";\nimport Spinner from \"../layout/Spinner\";\nimport vis from \"vis\";\n\nclass GraphNativeRep extends Component {\n\n shouldComponentUpdate(nextProps, nextState){ \n \n if (nextProps.data && this.props.data){\n console.log(\"Rerendering\")\n return true;\n }else if (nextProps.loadingGraph !== this.props.loadingGraph){\n return true; \n }else{\n return false;\n }\n }\n componentWillUnmount() {\n console.log(\"Unmounting\");\n this.props.cleanGraphData();\n }\n\n updateVisNodes = (nodes) => {\n this.props.setVisData(nodes);\n }\n\n\n\n render () {\n if (this.props.loadingGraph) return ;\n if (this.props.data == null){\n return (\n
\n

Press Show Graph to see the graph representation of the experiment.

\n

If the experiment is running, press Start Job Monitor to start a live tracker of the changes on the experiment's jobs.\n This process will automatically update the graph's nodes colors and show a log of the detected changes.\n

\n
\n );\n }\n\n var nodes_array = [];\n var edges_array = [];\n \n if (this.props.data.nodes !== null || this.props.data.edges !== null) {\n this.props.data.nodes.map(node => nodes_array.push({\n id: node.id,\n label: node.label,\n color: { background: node.status_color, border: \"black\" },\n //level: node.priority,\n })\n );\n \n this.props.data.edges.map(edge => \n edges_array.push({ from: edge.from, to: edge.to })\n );\n }\n \n var nodes = new vis.DataSet(nodes_array);\n var edges = new vis.DataSet(edges_array);\n\n\n const options = {\n edges: {\n arrows: {\n to: { enabled: true }\n }\n },\n layout: {\n improvedLayout: true,\n hierarchical: {\n \n nodeSpacing: 250,\n edgeMinimization: false,\n blockShifting: false,\n parentCentralization: false,\n direction: 'UD',\n sortMethod: 'directed',\n }\n },\n interaction: {\n dragNodes: true,\n hoverConnectedEdges: true,\n // multiselect: true,\n navigationButtons: true,\n },\n physics: {\n enabled: false,\n },\n nodes: {\n shape: 'dot',\n }\n };\n \n const graph = {\n nodes : nodes,\n edges : edges,\n };\n\n class VisNetwork extends Component {\n \n // shouldComponentUpdate(nextProps, nextState){ \n // if (this.props.shouldUpdateGraph === true){\n // return true;\n // } else {\n // return false;\n // }\n // }\n \n componentDidMount() {\n var network = new vis.Network(this.refs.myRef, this.props.graph, this.props.options);\n network.on(\"click\", (params) => {\n //console.log(params);\n if (params.nodes){\n //console.log(params.nodes);\n this.props.updateSelection(params.nodes);\n }\n \n });\n }\n \n // componentWillUnmount() {\n // console.log(\"Unmounting\");\n // this.props.cleanGraphData();\n // }\n \n render() { \n return (\n
\n
\n
\n );\n }\n }\n\n this.updateVisNodes(nodes);\n \n return ;\n\n }\n\n\n \n\n \n\n \n \n\n \n\n}\n\nconst experimentStyle = {\n height: 600\n };\n\nexport default GraphNativeRep;\n"]},"metadata":{},"sourceType":"module"} \ No newline at end of file diff --git a/node_modules/@egjs/hammerjs/.babelrc b/node_modules/@egjs/hammerjs/.babelrc new file mode 100644 index 0000000000000000000000000000000000000000..13739d8b4717823e92ce96f3c0ee77ddc2f25945 --- /dev/null +++ b/node_modules/@egjs/hammerjs/.babelrc @@ -0,0 +1,16 @@ +{ + "presets": [ + [ + "@babel/preset-env", + { + "loose": true, + "modules": false + } + ] + ], + "plugins": [ + "babel-plugin-no-side-effect-class-properties", + ["@babel/plugin-proposal-class-properties", {"loose": true}], + "@babel/plugin-transform-object-assign" + ] +} \ No newline at end of file diff --git a/node_modules/@egjs/hammerjs/.bowerrc b/node_modules/@egjs/hammerjs/.bowerrc new file mode 100644 index 0000000000000000000000000000000000000000..a3731bd2c5f20a2f5b7f87e8ade328f7b4579af0 --- /dev/null +++ b/node_modules/@egjs/hammerjs/.bowerrc @@ -0,0 +1,3 @@ +{ + "json": "bower.json" +} \ No newline at end of file diff --git a/node_modules/@egjs/hammerjs/.editorconfig b/node_modules/@egjs/hammerjs/.editorconfig new file mode 100644 index 0000000000000000000000000000000000000000..6b79d117c3c37b8c9143040f018e192cc6ec2407 --- /dev/null +++ b/node_modules/@egjs/hammerjs/.editorconfig @@ -0,0 +1,20 @@ +# EditorConfig helps developers define and maintain consistent +# coding styles between different editors and IDEs +# editorconfig.org + +root = true + +[*] +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true +indent_style = space +indent_size = 2 + +[*.js] +indent_style = space +indent_size = 2 + +[*.md] +trim_trailing_whitespace = false diff --git a/node_modules/@egjs/hammerjs/.jscsrc b/node_modules/@egjs/hammerjs/.jscsrc new file mode 100644 index 0000000000000000000000000000000000000000..423c2934b96c18f75cbb34a61e94a40a3e399f54 --- /dev/null +++ b/node_modules/@egjs/hammerjs/.jscsrc @@ -0,0 +1,10 @@ +{ + "preset": "ember-suave", + "excludeFiles": [ + "tests/**/assets", + "node_modules/**" + ], + "disallowConstOutsideModuleScope": false, + "requireArrowFunctions": true, + "disallowEmptyBlocks": false +} diff --git a/node_modules/@egjs/hammerjs/.jshintrc b/node_modules/@egjs/hammerjs/.jshintrc new file mode 100644 index 0000000000000000000000000000000000000000..8de3b553538394adc2f2aac8678782215d9fe35e --- /dev/null +++ b/node_modules/@egjs/hammerjs/.jshintrc @@ -0,0 +1,42 @@ +{ + "maxerr": 100, + "freeze": true, + "node": false, + "indent": 2, + "predef": [ + "document", + "window" + ], + "browser": true, + "boss": true, + "curly": true, + "debug": false, + "devel": true, + "eqeqeq": true, + "expr": true, + "validthis": true, + "evil": true, + "forin": false, + "immed": false, + "laxbreak": false, + "newcap": true, + "noarg": true, + "node": true, + "noempty": false, + "nonew": false, + "nomen": false, + "onevar": false, + "plusplus": false, + "regexp": false, + "undef": true, + "sub": true, + "strict": false, + "white": false, + "eqnull": true, + "esversion": 6, + "unused": true, + "-W116": true, + "-W080": true, + "-W038": true, + "proto": true +} diff --git a/node_modules/@egjs/hammerjs/.travis.yml b/node_modules/@egjs/hammerjs/.travis.yml new file mode 100644 index 0000000000000000000000000000000000000000..41998f62604d797435efafe301b7d6fef801ce3a --- /dev/null +++ b/node_modules/@egjs/hammerjs/.travis.yml @@ -0,0 +1,8 @@ +language: node_js +node_js: + - "6.3.0" + +sudo: false + +script: + - npm run test diff --git a/node_modules/@egjs/hammerjs/CHANGELOG.md b/node_modules/@egjs/hammerjs/CHANGELOG.md new file mode 100644 index 0000000000000000000000000000000000000000..2142121396979407174ea076abe5f2836c925a52 --- /dev/null +++ b/node_modules/@egjs/hammerjs/CHANGELOG.md @@ -0,0 +1,66 @@ +# Changelog + +### 2.0.8, 2016-04-22 + +##### Manager +- Added check to ensure that the required parameters are present ([#908](https://github.com/hammerjs/hammer.js/issues/908), [085d3a8](https://github.com/hammer.js/hammerjs/commit/085d3a87eab8674c45e9d3a14c4ca44ad7b97e26)) +- Fixed restoration of Hammer.defaults.cssProps on destory ([#904theregttr5ki](https://github.com/hammerjs/hammer.js/issues/904), [7d0e60f](https://github.com/hammer.js/hammerjs/commit/7d0e60f6743517db3c05a38e966fb9fb5052fa03)) + +##### Input +- Fixed de-duping of mouse events on mouse touch combo devices ([#917](https://github.com/hammer.js/hammer.js/issues/917), [#863](https://github.com/hammerjs/hammer.js/issues/863), [bfeb89a](https://github.com/hammerjs/hammerjs/commit/bfeb89a77f778c527f771150d1e9687bd318ce8d)) + +##### Touch-action +- Added support map for specific values of touch-action ([#952](https://github.com/hammer.js/hammer.js/issues/952), [fbe9fd7](https://github.com/hammerjs/hammer.js/commit/fbe9fd775fe8cb3d43faa9428bfa56b61b16edc7)) + +### 2.0.6, 2015-12-23 +- Add Assign method and deprecate merge and extend ([#895](https://github.com/hammerjs/hammer.js/pull/895)[fc01eae](https://github.com/hammerjs/hammer.js/commit/fc01eaea678acc430c664eb374555fbe3d403bdd)) +- Expose Hammer on window or self if either is defined to avoid issues when AMD is present but not used. ( [356f795](https://github.com/hammerjs/hammer.js/commit/356f7955b01f3679c29d6c45931679256b45036e)) +- Add support for PointerEvent instead of MSPointerEvent if supported. ([#754](https://github.com/hammerjs/hammer.js/issues/754), [439c7a6](https://github.com/hammerjs/hammer.js/commit/439c7a6c46978ab387b4b8289399e904d1c49535)) +- Fixed moz-prefix, prefix should be Moz not moz. ([3ea47f3](https://github.com/hammerjs/hammer.js/commit/3ea47f3aebadc9d3bb6bf52bc8402cad135ef8a9)) +- Removed non-existant recognizer ([f1c2d3b](https://github.com/hammerjs/hammer.js/commit/f1c2d3bf05f530ae092ecfc2335fceeff0e9eec9)) +- Fixed config leaking between instances([189098f](https://github.com/hammerjs/hammer.js/commit/189098ff7736f6ed2fce9a3d3e1f5a3afee085ba)) +- Fixed gaps in gesture configs and update tests to match ([70c2902](https://github.com/hammerjs/hammer.js/commit/70c2902d773a750e92ce8c423f8a4165c07eab97)) +- Fixed Manager off method ([#768](https://github.com/hammerjs/hammer.js/issues/768), [da49a27](https://github.com/hammerjs/hammer.js/commit/da49a2730779ecc3b4dd147cc418a0df7c70fad9)) +- Added compatibility with requirejs optimizer namespaces ( [70075f2](https://github.com/hammerjs/hammer.js/commit/70075f2df1b855f7c6d8d3caac49b9276b88c8d6)) +- Made touchaction test zoomable ( [50264a7](https://github.com/hammerjs/hammer.js/commit/50264a70251ca88bbaf7b666401e527eee616de5)) +- Fixed preventing default when for `pan-x pan-y` case ( [95eaafa](https://github.com/hammerjs/hammer.js/commit/95eaafadad27bd1b25d20cf976811a451922f1c4)) +- Fixed incorrect touch action pan direction ( [a81da57](https://github.com/hammerjs/hammer.js/commit/a81da57a82ebf37e695e7c443e4e2715e7f32856)) +- Fixed combined pan-x pan-y to resolve to none ( [fdae07b](https://github.com/hammerjs/hammer.js/commit/fdae07bc2ba3c90aad28da6791b3d5df627bc612)) +- Fixed inverted touch-action for pan recognizer ([#728](https://github.com/hammerjs/hammer.js/issues/728), [605bd3b](https://github.com/hammerjs/hammer.js/commit/605bd3beca780be91dd43f9da8b809d155a43d1a)) +- Fixed dependency on non standard touch list ordering ([#610](https://github.com/hammerjs/hammer.js/issues/610), [#791](https://github.com/hammerjs/hammer.js/issues/791), [287720a](https://github.com/hammerjs/hammer.js/commit/287720a6e5067e7f28be8b8b3b266d22905361c4)) +- Fixed swipe to not trigger after multitouch gesture ([#640](https://github.com/hammerjs/hammer.js/issues/640), [711d8a1](https://github.com/hammerjs/hammer.js/commit/711d8a1df1aa5057ecb536454a36257e3c0d6d91)) +- Fixed swipe recognizer to use overall gesture direction and velocity ( [963fe69](https://github.com/hammerjs/hammer.js/commit/963fe697515273fee508414bc29e2656465cea55)) +- Fixed getDirection returning reversed direction ( [e40dcde](https://github.com/hammerjs/hammer.js/commit/e40dcde43bdac7a74c8ce5c05a4f62121089cd91)) +- Fixed detection of tap when multi touch gestures are present ( [c46cbba](https://github.com/hammerjs/hammer.js/commit/c46cbba1c2cbbf874b59913416858d9dae297e64)) +- Fixed incorrect event order ([#824](https://github.com/hammerjs/hammer.js/issues/824), [92f2d76](https://github.com/hammerjs/hammer.js/commit/92f2d76188480d967e738a19cd508d0b94a31329)) +- Fixed leaking options between recognizer instances ([#813](https://github.com/hammerjs/hammer.js/issues/813), [af32c9b](https://github.com/hammerjs/hammer.js/commit/af32c9bace3f04bb34bee852ff56a33cc8fc27cd)) +- Fixed detection when element has no style attribute ( [5ca6d8c](https://github.com/hammerjs/hammer.js/commit/5ca6d8cbead02c71929a8073e95ddf98e11c0e06)) + +### 2.0.4, 2014-09-28 +- Fix IE pointer issue. [#665](https://github.com/hammerjs/hammer.js/pull/665) +- Fix multi-touch at different elements. [#668](https://github.com/hammerjs/hammer.js/pull/668) +- Added experimental [single-user Touch input handler](src/input/singletouch.js). This to improve performance/ux when only a single user has to be supported. Plans are to release 2.1 with this as default, and a settings to enable the multi-user handler. + +### 2.0.3, 2014-09-10 +- Manager.set improvements. +- Fix requireFailure() call in Manager.options.recognizers. +- Make DIRECTION_ALL for pan and swipe gestures less blocking. +- Fix Swipe recognizer threshold option. +- Expose the Input classes. +- Added the option `inputClass` to set the used input handler. + +### 2.0.2, 2014-07-26 +- Improved mouse and pointer-events input, now able to move outside the window. +- Added the export name (`Hammer`) as an argument to the wrapper. +- Add the option *experimental* `inputTarget` to change the element that receives the events. +- Improved performance when only one touch being active. +- Fixed the jumping deltaXY bug when going from single to multi-touch. +- Improved velocity calculations. + +### 2.0.1, 2014-07-15 +- Fix issue when no document.body is available +- Added pressup event for the press recognizer +- Removed alternative for Object.create + +### 2.0.0, 2014-07-11 +- Full rewrite of the library. diff --git a/node_modules/@egjs/hammerjs/CONTRIBUTING.md b/node_modules/@egjs/hammerjs/CONTRIBUTING.md new file mode 100644 index 0000000000000000000000000000000000000000..b1934de6b781fc77492d1c1a6e50e9535809cbca --- /dev/null +++ b/node_modules/@egjs/hammerjs/CONTRIBUTING.md @@ -0,0 +1,41 @@ +# Contributing to Hammer.js + +Looking to contribute something to Hammer.js? **Here's how you can help.** + + +## Reporting issues + +We only accept issues that are bug reports or feature requests. Bugs must be +isolated and reproducible problems that can be fixed within the Hammer.js. +Please read the following guidelines before opening any issue. + +1. [**Read the documentation**](https://hammerjs.github.io) + +2. **Search for existing issues.** We get a lot of duplicate issues, and you'd +help us out a lot by first checking if someone else has reported the same issue. +Moreover, the issue may have already been resolved with a fix available. Also +take a look if your problem is explained at the Wiki. + +3. **Create an isolated and reproducible test case.** Be sure the problem exists +in Hammer's code with a reduced test case that should be included in each bug +report. + +4. **Include a live example.** Make use of jsFiddle or jsBin to share your +isolated test cases. Also, a screen capture would work, with tools like LICEcap. + +5. **Share as much information as possible.** Include operating system and +version, browser and version, version of Hammer.js, customized or vanilla build, +etc. where appropriate. Also include steps to reproduce the bug. + +## Pull requests + +1. Changes must be done in `/src` files, never just the compiled files. Also, don't +commit the compiled files. + +2. Try not to pollute your pull request with unintended changes. Keep them simple +and small + +3. Try to share which browsers your code has been tested in before submitting a +pull request + +4. Write tests for your code, these can be found in `/tests`. diff --git a/node_modules/@egjs/hammerjs/LICENSE.md b/node_modules/@egjs/hammerjs/LICENSE.md new file mode 100644 index 0000000000000000000000000000000000000000..ddaf0238d7e404b679a9da85fde0f075e0b267be --- /dev/null +++ b/node_modules/@egjs/hammerjs/LICENSE.md @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (C) 2011-2017 by Jorik Tangelder (Eight Media) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/@egjs/hammerjs/README.md b/node_modules/@egjs/hammerjs/README.md new file mode 100644 index 0000000000000000000000000000000000000000..6738d030d3679c64000e0abec2f07bc63c582a94 --- /dev/null +++ b/node_modules/@egjs/hammerjs/README.md @@ -0,0 +1,140 @@ +# [hammer.js][hammerjs-url] [![NPM Version][npm-image]][npm-url] [![NPM Downloads][downloads-image]][downloads-url] [![Build Status][travis-image]][travis-url] +> A JavaScript library for detecting touch gestures. + +## What is this repository? + +It seems like that `hammer.js` repository is no more activated. + - [Is this library still actively maintained?](https://github.com/hammerjs/hammer.js/issues/1197) + +But our library ([egjs](https://naver.github.io/egjs/)) has deep dependency to hammer.js for touch interaction. +And some pending issues were critical for us to make more light size, compatible with node.js , resolve module crash on umd envrioment. + +So we solved following issues that are not resolved in original hammer.js + +* [Support for hammer.js in node.js](https://github.com/naver/hammer.js/issues/3) + - [Make hammerjs server friendly](https://github.com/hammerjs/hammer.js/issues/1060) + - [Hammer.js fails in node since window is undefined](https://github.com/hammerjs/hammer.js/issues/930) +* [Support ES Module for Tree Shaking](https://github.com/naver/hammer.js/issues/12) +* [Change the priority of define and exports for umd](https://github.com/naver/hammer.js/issues/11) + +We would maintain this repository to fix remain bugs and enhance it until original repository activates. + + +## Installation +### NPM +```sh +npm install --save @egjs/hammerjs +``` + +**or** + +### Yarn +```sh +yarn add @egjs/hammerjs +``` + +**or** + +### CDN +[https://cdnjs.com/libraries/hammer.js/](https://cdnjs.com/libraries/hammer.js/) + +> We did not provide CDN yet. leave the link to original hammerjs as is. + +## Usage +hammer.js has a quick start option for gestures it already recognizes. +```js +// Get a reference to an element. +var square = document.querySelector('.square'); + +// Create an instance of Hammer with the reference. +var hammer = new Hammer(square); + +// Subscribe to a quick start event: press, tap, or doubletap. +// For a full list of quick start events, read the documentation. +hammer.on('press', function(e) { + e.target.classList.toggle('expand'); + console.log("You're pressing me!"); + console.log(e); +}); +``` + +If you want to recognize your own gestures, such as `tripletap`, then you'll have to use these steps: +```js +// Get a reference to an element. +var square = document.querySelector('.square'); + +// Create a manager to manage the element. +var manager = new Hammer.Manager(square); + +// Create a recognizer. +var TripleTap = new Hammer.Tap({ + event: 'tripletap', + taps: 3 +}); + +// Add the recognizer to the manager. +manager.add(TripleTap); + +// Subscribe to the event. +manager.on('tripletap', function(e) { + e.target.classList.toggle('expand'); + console.log("You're triple tapping me!"); + console.log(e); +}); +``` + + +## Examples +- [tap][tap] +- [double tap][double-tap] +- [press][press] +- [swipe][swipe] + + +## Documentation +For further information regarding hammer.js, please read our [documentation][hammerjs-url]. + + +## Contributions [![Github Issues][issues-image]][issues-url] [![Github PRs][pulls-image]][pulls-url] [![Slack][slack-image]][slack-url] +Feel encouraged to report issues or submit pull requests. When you're ready to do either, read our [contribution guidelines][contribution-guidelines]. If you're looking for another form of contribution, we love help answering questions on our [slack channel][slack-url]. + + +## License +[MIT][license] + +[hammerjs-url]: http://hammerjs.github.io +[hammerjs-url]: http://hammerjs.github.io + +[npm-image]: https://img.shields.io/npm/v/@egjs/hammerjs.svg +[npm-url]: https://npmjs.org/package/@egjs/hammerjs + +[travis-image]: https://img.shields.io/travis/stream-utils/raw-body/master.svg +[travis-url]: https://travis-ci.org/hammerjs/hammer.js + +[downloads-image]: https://img.shields.io/npm/dm/@egjs/hammerjs.svg +[downloads-url]: https://npmjs.org/package/@egjs/hammerjs + + + +[tap]: https://codepen.io/choskim/pen/WZggmg +[double-tap]: https://codepen.io/choskim/pen/vezzwZ +[press]: https://codepen.io/choskim/pen/RLYebL +[pan]: '' +[swipe]: https://codepen.io/choskim/pen/rGZqxa +[pinch]: '' +[rotate]: '' + + + +[issues-image]: https://img.shields.io/github/issues/hammerjs/hammer.js.svg +[issues-url]: https://github.com/hammerjs/hammer.js/issues + +[pulls-image]: https://img.shields.io/github/issues-pr/hammerjs/hammer.js.svg +[pulls-url]: https://github.com/hammerjs/hammer.js/pulls + +[slack-image]: https://hammerjs.herokuapp.com/badge.svg +[slack-url]: https://hammerjs.herokuapp.com/ + +[contribution-guidelines]: ./CONTRIBUTING.md + +[license]: ./LICENSE.md diff --git a/node_modules/@egjs/hammerjs/banner.js b/node_modules/@egjs/hammerjs/banner.js new file mode 100644 index 0000000000000000000000000000000000000000..f4b4c16d39669433b509805ffaf6cea3307038c0 --- /dev/null +++ b/node_modules/@egjs/hammerjs/banner.js @@ -0,0 +1,9 @@ +var pkg = require("./package.json"); +var date = new Date(); + +module.exports = `/*! ${pkg.title || pkg.name} - v${pkg.version} - ${[ date.getFullYear(), ('0' + (date.getMonth() + 1)).slice(-2), ('0' + date.getDate()).slice(-2)].join('-')} + * ${pkg.homepage} + * + * Forked By Naver egjs + * Copyright (c) hammerjs + * Licensed under the ${pkg.license} license */`; \ No newline at end of file diff --git a/node_modules/@egjs/hammerjs/bower.json b/node_modules/@egjs/hammerjs/bower.json new file mode 100644 index 0000000000000000000000000000000000000000..30584af1f7bff8a4b7ea588cbb06d7e5b106ac86 --- /dev/null +++ b/node_modules/@egjs/hammerjs/bower.json @@ -0,0 +1,16 @@ +{ + "name": "hammerjs", + "license": "MIT", + "main": "hammer.js", + "ignore": [ + "tests", + "src", + ".bowerrc", + ".gitignore", + ".jscsrc", + ".jshintrc", + ".travis.yml", + "component.json", + "package.json" + ] +} diff --git a/node_modules/@egjs/hammerjs/changelog.js b/node_modules/@egjs/hammerjs/changelog.js new file mode 100644 index 0000000000000000000000000000000000000000..a6dbb337a354bebe90bb571785227fdbf33afa1d --- /dev/null +++ b/node_modules/@egjs/hammerjs/changelog.js @@ -0,0 +1,71 @@ +var changelog = require( "changelogplease" ); +var gittags = require( "git-tags" ).get( function( error, tags ) { + if ( error ) { + throw error + } + console.log( tags[ 2 ] + ".." + tags[ 0 ] ); + var exclude = [ "Merge", "Whitespace", "Fixup", "Cleanup", "Formatting", "Ignore" ]; + changelog( { + ticketUrl: "https://github.com/hammerjs/hammer.js/issues/{id}", + commitUrl: "https://github.com/hammerjs/hammerjs/commit/{id}", + sort: false, + repo: "./", + committish: tags[ 2 ] + ".." + tags[ 0 ] + }, function( error, log ) { + if ( error ) { + throw error; + } + log = parseLog( log ); + console.log( log ); + } ); + function parseLog( log ) { + var lines = log.split( "\n" ); + var newLog = []; + var log = []; + var currentComponent; + + + lines.shift(); + lines.forEach( function( line ) { + var newLine = parseLine( line ); + if ( newLine ) { + log.push( line ); + } + } ); + var log = log.join( "\n" ); + return log.replace( /\*/g, "-" ).replace( /__TICKETREF__,/g, "" ); + } + function parseLine( line ) { + var parts = getParts( line ); + + if ( exclude.indexOf( parts.component ) > -1 ) { + return false; + } + return parts; + } + function getParts( line ) { + var parts = line.split( ":" ); + var component = ""; + var message; + var commits = line.match( /\{\{([A-Za-z0-9 ]){0,99}\}\}/ ) + + if ( parts.length > 1 && parts[ 0 ].length <= 20 ) { + component = parts[ 0 ]; + parts.shift(); + message = parts.join( ":" ); + } else { + parts = line.split( " " ); + component = parts[ 1 ]; + parts.shift(); + message = parts.join( " " ); + } + + if ( component ) { + component = component.replace( /\* |,/, "" ); + } + return { + component: component, + message: message + }; + } +} ); diff --git a/node_modules/@egjs/hammerjs/component.json b/node_modules/@egjs/hammerjs/component.json new file mode 100644 index 0000000000000000000000000000000000000000..4af3a335a4222f2be245fea1f2fe04e5188e4aba --- /dev/null +++ b/node_modules/@egjs/hammerjs/component.json @@ -0,0 +1,8 @@ +{ + "name": "hammerjs", + "version": "2.0.6", + "main": "hammer.js", + "scripts": [ + "hammer.js" + ] +} diff --git a/node_modules/@egjs/hammerjs/dist/hammer.esm.js b/node_modules/@egjs/hammerjs/dist/hammer.esm.js new file mode 100644 index 0000000000000000000000000000000000000000..caa4ac2d6da7a86003df07d2285cf8f5421b71bf --- /dev/null +++ b/node_modules/@egjs/hammerjs/dist/hammer.esm.js @@ -0,0 +1,2976 @@ +/*! Hammer.JS - v2.0.15 - 2019-04-04 + * http://naver.github.io/egjs + * + * Forked By Naver egjs + * Copyright (c) hammerjs + * Licensed under the MIT license */ +function _extends() { + _extends = Object.assign || function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + + return target; + }; + + return _extends.apply(this, arguments); +} + +function _inheritsLoose(subClass, superClass) { + subClass.prototype = Object.create(superClass.prototype); + subClass.prototype.constructor = subClass; + subClass.__proto__ = superClass; +} + +function _assertThisInitialized(self) { + if (self === void 0) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + + return self; +} + +/** + * @private + * extend object. + * means that properties in dest will be overwritten by the ones in src. + * @param {Object} target + * @param {...Object} objects_to_assign + * @returns {Object} target + */ +var assign; + +if (typeof Object.assign !== 'function') { + assign = function assign(target) { + if (target === undefined || target === null) { + throw new TypeError('Cannot convert undefined or null to object'); + } + + var output = Object(target); + + for (var index = 1; index < arguments.length; index++) { + var source = arguments[index]; + + if (source !== undefined && source !== null) { + for (var nextKey in source) { + if (source.hasOwnProperty(nextKey)) { + output[nextKey] = source[nextKey]; + } + } + } + } + + return output; + }; +} else { + assign = Object.assign; +} + +var assign$1 = assign; + +var VENDOR_PREFIXES = ['', 'webkit', 'Moz', 'MS', 'ms', 'o']; +var TEST_ELEMENT = typeof document === "undefined" ? { + style: {} +} : document.createElement('div'); +var TYPE_FUNCTION = 'function'; +var round = Math.round, + abs = Math.abs; +var now = Date.now; + +/** + * @private + * get the prefixed property + * @param {Object} obj + * @param {String} property + * @returns {String|Undefined} prefixed + */ + +function prefixed(obj, property) { + var prefix; + var prop; + var camelProp = property[0].toUpperCase() + property.slice(1); + var i = 0; + + while (i < VENDOR_PREFIXES.length) { + prefix = VENDOR_PREFIXES[i]; + prop = prefix ? prefix + camelProp : property; + + if (prop in obj) { + return prop; + } + + i++; + } + + return undefined; +} + +/* eslint-disable no-new-func, no-nested-ternary */ +var win; + +if (typeof window === "undefined") { + // window is undefined in node.js + win = {}; +} else { + win = window; +} + +var PREFIXED_TOUCH_ACTION = prefixed(TEST_ELEMENT.style, 'touchAction'); +var NATIVE_TOUCH_ACTION = PREFIXED_TOUCH_ACTION !== undefined; +function getTouchActionProps() { + if (!NATIVE_TOUCH_ACTION) { + return false; + } + + var touchMap = {}; + var cssSupports = win.CSS && win.CSS.supports; + ['auto', 'manipulation', 'pan-y', 'pan-x', 'pan-x pan-y', 'none'].forEach(function (val) { + // If css.supports is not supported but there is native touch-action assume it supports + // all values. This is the case for IE 10 and 11. + return touchMap[val] = cssSupports ? win.CSS.supports('touch-action', val) : true; + }); + return touchMap; +} + +var TOUCH_ACTION_COMPUTE = 'compute'; +var TOUCH_ACTION_AUTO = 'auto'; +var TOUCH_ACTION_MANIPULATION = 'manipulation'; // not implemented + +var TOUCH_ACTION_NONE = 'none'; +var TOUCH_ACTION_PAN_X = 'pan-x'; +var TOUCH_ACTION_PAN_Y = 'pan-y'; +var TOUCH_ACTION_MAP = getTouchActionProps(); + +var MOBILE_REGEX = /mobile|tablet|ip(ad|hone|od)|android/i; +var SUPPORT_TOUCH = 'ontouchstart' in win; +var SUPPORT_POINTER_EVENTS = prefixed(win, 'PointerEvent') !== undefined; +var SUPPORT_ONLY_TOUCH = SUPPORT_TOUCH && MOBILE_REGEX.test(navigator.userAgent); +var INPUT_TYPE_TOUCH = 'touch'; +var INPUT_TYPE_PEN = 'pen'; +var INPUT_TYPE_MOUSE = 'mouse'; +var INPUT_TYPE_KINECT = 'kinect'; +var COMPUTE_INTERVAL = 25; +var INPUT_START = 1; +var INPUT_MOVE = 2; +var INPUT_END = 4; +var INPUT_CANCEL = 8; +var DIRECTION_NONE = 1; +var DIRECTION_LEFT = 2; +var DIRECTION_RIGHT = 4; +var DIRECTION_UP = 8; +var DIRECTION_DOWN = 16; +var DIRECTION_HORIZONTAL = DIRECTION_LEFT | DIRECTION_RIGHT; +var DIRECTION_VERTICAL = DIRECTION_UP | DIRECTION_DOWN; +var DIRECTION_ALL = DIRECTION_HORIZONTAL | DIRECTION_VERTICAL; +var PROPS_XY = ['x', 'y']; +var PROPS_CLIENT_XY = ['clientX', 'clientY']; + +/** + * @private + * walk objects and arrays + * @param {Object} obj + * @param {Function} iterator + * @param {Object} context + */ +function each(obj, iterator, context) { + var i; + + if (!obj) { + return; + } + + if (obj.forEach) { + obj.forEach(iterator, context); + } else if (obj.length !== undefined) { + i = 0; + + while (i < obj.length) { + iterator.call(context, obj[i], i, obj); + i++; + } + } else { + for (i in obj) { + obj.hasOwnProperty(i) && iterator.call(context, obj[i], i, obj); + } + } +} + +/** + * @private + * let a boolean value also be a function that must return a boolean + * this first item in args will be used as the context + * @param {Boolean|Function} val + * @param {Array} [args] + * @returns {Boolean} + */ + +function boolOrFn(val, args) { + if (typeof val === TYPE_FUNCTION) { + return val.apply(args ? args[0] || undefined : undefined, args); + } + + return val; +} + +/** + * @private + * small indexOf wrapper + * @param {String} str + * @param {String} find + * @returns {Boolean} found + */ +function inStr(str, find) { + return str.indexOf(find) > -1; +} + +/** + * @private + * when the touchActions are collected they are not a valid value, so we need to clean things up. * + * @param {String} actions + * @returns {*} + */ + +function cleanTouchActions(actions) { + // none + if (inStr(actions, TOUCH_ACTION_NONE)) { + return TOUCH_ACTION_NONE; + } + + var hasPanX = inStr(actions, TOUCH_ACTION_PAN_X); + var hasPanY = inStr(actions, TOUCH_ACTION_PAN_Y); // if both pan-x and pan-y are set (different recognizers + // for different directions, e.g. horizontal pan but vertical swipe?) + // we need none (as otherwise with pan-x pan-y combined none of these + // recognizers will work, since the browser would handle all panning + + if (hasPanX && hasPanY) { + return TOUCH_ACTION_NONE; + } // pan-x OR pan-y + + + if (hasPanX || hasPanY) { + return hasPanX ? TOUCH_ACTION_PAN_X : TOUCH_ACTION_PAN_Y; + } // manipulation + + + if (inStr(actions, TOUCH_ACTION_MANIPULATION)) { + return TOUCH_ACTION_MANIPULATION; + } + + return TOUCH_ACTION_AUTO; +} + +/** + * @private + * Touch Action + * sets the touchAction property or uses the js alternative + * @param {Manager} manager + * @param {String} value + * @constructor + */ + +var TouchAction = +/*#__PURE__*/ +function () { + function TouchAction(manager, value) { + this.manager = manager; + this.set(value); + } + /** + * @private + * set the touchAction value on the element or enable the polyfill + * @param {String} value + */ + + + var _proto = TouchAction.prototype; + + _proto.set = function set(value) { + // find out the touch-action by the event handlers + if (value === TOUCH_ACTION_COMPUTE) { + value = this.compute(); + } + + if (NATIVE_TOUCH_ACTION && this.manager.element.style && TOUCH_ACTION_MAP[value]) { + this.manager.element.style[PREFIXED_TOUCH_ACTION] = value; + } + + this.actions = value.toLowerCase().trim(); + }; + /** + * @private + * just re-set the touchAction value + */ + + + _proto.update = function update() { + this.set(this.manager.options.touchAction); + }; + /** + * @private + * compute the value for the touchAction property based on the recognizer's settings + * @returns {String} value + */ + + + _proto.compute = function compute() { + var actions = []; + each(this.manager.recognizers, function (recognizer) { + if (boolOrFn(recognizer.options.enable, [recognizer])) { + actions = actions.concat(recognizer.getTouchAction()); + } + }); + return cleanTouchActions(actions.join(' ')); + }; + /** + * @private + * this method is called on each input cycle and provides the preventing of the browser behavior + * @param {Object} input + */ + + + _proto.preventDefaults = function preventDefaults(input) { + var srcEvent = input.srcEvent; + var direction = input.offsetDirection; // if the touch action did prevented once this session + + if (this.manager.session.prevented) { + srcEvent.preventDefault(); + return; + } + + var actions = this.actions; + var hasNone = inStr(actions, TOUCH_ACTION_NONE) && !TOUCH_ACTION_MAP[TOUCH_ACTION_NONE]; + var hasPanY = inStr(actions, TOUCH_ACTION_PAN_Y) && !TOUCH_ACTION_MAP[TOUCH_ACTION_PAN_Y]; + var hasPanX = inStr(actions, TOUCH_ACTION_PAN_X) && !TOUCH_ACTION_MAP[TOUCH_ACTION_PAN_X]; + + if (hasNone) { + // do not prevent defaults if this is a tap gesture + var isTapPointer = input.pointers.length === 1; + var isTapMovement = input.distance < 2; + var isTapTouchTime = input.deltaTime < 250; + + if (isTapPointer && isTapMovement && isTapTouchTime) { + return; + } + } + + if (hasPanX && hasPanY) { + // `pan-x pan-y` means browser handles all scrolling/panning, do not prevent + return; + } + + if (hasNone || hasPanY && direction & DIRECTION_HORIZONTAL || hasPanX && direction & DIRECTION_VERTICAL) { + return this.preventSrc(srcEvent); + } + }; + /** + * @private + * call preventDefault to prevent the browser's default behavior (scrolling in most cases) + * @param {Object} srcEvent + */ + + + _proto.preventSrc = function preventSrc(srcEvent) { + this.manager.session.prevented = true; + srcEvent.preventDefault(); + }; + + return TouchAction; +}(); + +/** + * @private + * find if a node is in the given parent + * @method hasParent + * @param {HTMLElement} node + * @param {HTMLElement} parent + * @return {Boolean} found + */ +function hasParent(node, parent) { + while (node) { + if (node === parent) { + return true; + } + + node = node.parentNode; + } + + return false; +} + +/** + * @private + * get the center of all the pointers + * @param {Array} pointers + * @return {Object} center contains `x` and `y` properties + */ + +function getCenter(pointers) { + var pointersLength = pointers.length; // no need to loop when only one touch + + if (pointersLength === 1) { + return { + x: round(pointers[0].clientX), + y: round(pointers[0].clientY) + }; + } + + var x = 0; + var y = 0; + var i = 0; + + while (i < pointersLength) { + x += pointers[i].clientX; + y += pointers[i].clientY; + i++; + } + + return { + x: round(x / pointersLength), + y: round(y / pointersLength) + }; +} + +/** + * @private + * create a simple clone from the input used for storage of firstInput and firstMultiple + * @param {Object} input + * @returns {Object} clonedInputData + */ + +function simpleCloneInputData(input) { + // make a simple copy of the pointers because we will get a reference if we don't + // we only need clientXY for the calculations + var pointers = []; + var i = 0; + + while (i < input.pointers.length) { + pointers[i] = { + clientX: round(input.pointers[i].clientX), + clientY: round(input.pointers[i].clientY) + }; + i++; + } + + return { + timeStamp: now(), + pointers: pointers, + center: getCenter(pointers), + deltaX: input.deltaX, + deltaY: input.deltaY + }; +} + +/** + * @private + * calculate the absolute distance between two points + * @param {Object} p1 {x, y} + * @param {Object} p2 {x, y} + * @param {Array} [props] containing x and y keys + * @return {Number} distance + */ + +function getDistance(p1, p2, props) { + if (!props) { + props = PROPS_XY; + } + + var x = p2[props[0]] - p1[props[0]]; + var y = p2[props[1]] - p1[props[1]]; + return Math.sqrt(x * x + y * y); +} + +/** + * @private + * calculate the angle between two coordinates + * @param {Object} p1 + * @param {Object} p2 + * @param {Array} [props] containing x and y keys + * @return {Number} angle + */ + +function getAngle(p1, p2, props) { + if (!props) { + props = PROPS_XY; + } + + var x = p2[props[0]] - p1[props[0]]; + var y = p2[props[1]] - p1[props[1]]; + return Math.atan2(y, x) * 180 / Math.PI; +} + +/** + * @private + * get the direction between two points + * @param {Number} x + * @param {Number} y + * @return {Number} direction + */ + +function getDirection(x, y) { + if (x === y) { + return DIRECTION_NONE; + } + + if (abs(x) >= abs(y)) { + return x < 0 ? DIRECTION_LEFT : DIRECTION_RIGHT; + } + + return y < 0 ? DIRECTION_UP : DIRECTION_DOWN; +} + +function computeDeltaXY(session, input) { + var center = input.center; // let { offsetDelta:offset = {}, prevDelta = {}, prevInput = {} } = session; + // jscs throwing error on defalut destructured values and without defaults tests fail + + var offset = session.offsetDelta || {}; + var prevDelta = session.prevDelta || {}; + var prevInput = session.prevInput || {}; + + if (input.eventType === INPUT_START || prevInput.eventType === INPUT_END) { + prevDelta = session.prevDelta = { + x: prevInput.deltaX || 0, + y: prevInput.deltaY || 0 + }; + offset = session.offsetDelta = { + x: center.x, + y: center.y + }; + } + + input.deltaX = prevDelta.x + (center.x - offset.x); + input.deltaY = prevDelta.y + (center.y - offset.y); +} + +/** + * @private + * calculate the velocity between two points. unit is in px per ms. + * @param {Number} deltaTime + * @param {Number} x + * @param {Number} y + * @return {Object} velocity `x` and `y` + */ +function getVelocity(deltaTime, x, y) { + return { + x: x / deltaTime || 0, + y: y / deltaTime || 0 + }; +} + +/** + * @private + * calculate the scale factor between two pointersets + * no scale is 1, and goes down to 0 when pinched together, and bigger when pinched out + * @param {Array} start array of pointers + * @param {Array} end array of pointers + * @return {Number} scale + */ + +function getScale(start, end) { + return getDistance(end[0], end[1], PROPS_CLIENT_XY) / getDistance(start[0], start[1], PROPS_CLIENT_XY); +} + +/** + * @private + * calculate the rotation degrees between two pointersets + * @param {Array} start array of pointers + * @param {Array} end array of pointers + * @return {Number} rotation + */ + +function getRotation(start, end) { + return getAngle(end[1], end[0], PROPS_CLIENT_XY) + getAngle(start[1], start[0], PROPS_CLIENT_XY); +} + +/** + * @private + * velocity is calculated every x ms + * @param {Object} session + * @param {Object} input + */ + +function computeIntervalInputData(session, input) { + var last = session.lastInterval || input; + var deltaTime = input.timeStamp - last.timeStamp; + var velocity; + var velocityX; + var velocityY; + var direction; + + if (input.eventType !== INPUT_CANCEL && (deltaTime > COMPUTE_INTERVAL || last.velocity === undefined)) { + var deltaX = input.deltaX - last.deltaX; + var deltaY = input.deltaY - last.deltaY; + var v = getVelocity(deltaTime, deltaX, deltaY); + velocityX = v.x; + velocityY = v.y; + velocity = abs(v.x) > abs(v.y) ? v.x : v.y; + direction = getDirection(deltaX, deltaY); + session.lastInterval = input; + } else { + // use latest velocity info if it doesn't overtake a minimum period + velocity = last.velocity; + velocityX = last.velocityX; + velocityY = last.velocityY; + direction = last.direction; + } + + input.velocity = velocity; + input.velocityX = velocityX; + input.velocityY = velocityY; + input.direction = direction; +} + +/** +* @private + * extend the data with some usable properties like scale, rotate, velocity etc + * @param {Object} manager + * @param {Object} input + */ + +function computeInputData(manager, input) { + var session = manager.session; + var pointers = input.pointers; + var pointersLength = pointers.length; // store the first input to calculate the distance and direction + + if (!session.firstInput) { + session.firstInput = simpleCloneInputData(input); + } // to compute scale and rotation we need to store the multiple touches + + + if (pointersLength > 1 && !session.firstMultiple) { + session.firstMultiple = simpleCloneInputData(input); + } else if (pointersLength === 1) { + session.firstMultiple = false; + } + + var firstInput = session.firstInput, + firstMultiple = session.firstMultiple; + var offsetCenter = firstMultiple ? firstMultiple.center : firstInput.center; + var center = input.center = getCenter(pointers); + input.timeStamp = now(); + input.deltaTime = input.timeStamp - firstInput.timeStamp; + input.angle = getAngle(offsetCenter, center); + input.distance = getDistance(offsetCenter, center); + computeDeltaXY(session, input); + input.offsetDirection = getDirection(input.deltaX, input.deltaY); + var overallVelocity = getVelocity(input.deltaTime, input.deltaX, input.deltaY); + input.overallVelocityX = overallVelocity.x; + input.overallVelocityY = overallVelocity.y; + input.overallVelocity = abs(overallVelocity.x) > abs(overallVelocity.y) ? overallVelocity.x : overallVelocity.y; + input.scale = firstMultiple ? getScale(firstMultiple.pointers, pointers) : 1; + input.rotation = firstMultiple ? getRotation(firstMultiple.pointers, pointers) : 0; + input.maxPointers = !session.prevInput ? input.pointers.length : input.pointers.length > session.prevInput.maxPointers ? input.pointers.length : session.prevInput.maxPointers; + computeIntervalInputData(session, input); // find the correct target + + var target = manager.element; + + if (hasParent(input.srcEvent.target, target)) { + target = input.srcEvent.target; + } + + input.target = target; +} + +/** + * @private + * handle input events + * @param {Manager} manager + * @param {String} eventType + * @param {Object} input + */ + +function inputHandler(manager, eventType, input) { + var pointersLen = input.pointers.length; + var changedPointersLen = input.changedPointers.length; + var isFirst = eventType & INPUT_START && pointersLen - changedPointersLen === 0; + var isFinal = eventType & (INPUT_END | INPUT_CANCEL) && pointersLen - changedPointersLen === 0; + input.isFirst = !!isFirst; + input.isFinal = !!isFinal; + + if (isFirst) { + manager.session = {}; + } // source event is the normalized value of the domEvents + // like 'touchstart, mouseup, pointerdown' + + + input.eventType = eventType; // compute scale, rotation etc + + computeInputData(manager, input); // emit secret event + + manager.emit('hammer.input', input); + manager.recognize(input); + manager.session.prevInput = input; +} + +/** + * @private + * split string on whitespace + * @param {String} str + * @returns {Array} words + */ +function splitStr(str) { + return str.trim().split(/\s+/g); +} + +/** + * @private + * addEventListener with multiple events at once + * @param {EventTarget} target + * @param {String} types + * @param {Function} handler + */ + +function addEventListeners(target, types, handler) { + each(splitStr(types), function (type) { + target.addEventListener(type, handler, false); + }); +} + +/** + * @private + * removeEventListener with multiple events at once + * @param {EventTarget} target + * @param {String} types + * @param {Function} handler + */ + +function removeEventListeners(target, types, handler) { + each(splitStr(types), function (type) { + target.removeEventListener(type, handler, false); + }); +} + +/** + * @private + * get the window object of an element + * @param {HTMLElement} element + * @returns {DocumentView|Window} + */ +function getWindowForElement(element) { + var doc = element.ownerDocument || element; + return doc.defaultView || doc.parentWindow || window; +} + +/** + * @private + * create new input type manager + * @param {Manager} manager + * @param {Function} callback + * @returns {Input} + * @constructor + */ + +var Input = +/*#__PURE__*/ +function () { + function Input(manager, callback) { + var self = this; + this.manager = manager; + this.callback = callback; + this.element = manager.element; + this.target = manager.options.inputTarget; // smaller wrapper around the handler, for the scope and the enabled state of the manager, + // so when disabled the input events are completely bypassed. + + this.domHandler = function (ev) { + if (boolOrFn(manager.options.enable, [manager])) { + self.handler(ev); + } + }; + + this.init(); + } + /** + * @private + * should handle the inputEvent data and trigger the callback + * @virtual + */ + + + var _proto = Input.prototype; + + _proto.handler = function handler() {}; + /** + * @private + * bind the events + */ + + + _proto.init = function init() { + this.evEl && addEventListeners(this.element, this.evEl, this.domHandler); + this.evTarget && addEventListeners(this.target, this.evTarget, this.domHandler); + this.evWin && addEventListeners(getWindowForElement(this.element), this.evWin, this.domHandler); + }; + /** + * @private + * unbind the events + */ + + + _proto.destroy = function destroy() { + this.evEl && removeEventListeners(this.element, this.evEl, this.domHandler); + this.evTarget && removeEventListeners(this.target, this.evTarget, this.domHandler); + this.evWin && removeEventListeners(getWindowForElement(this.element), this.evWin, this.domHandler); + }; + + return Input; +}(); + +/** + * @private + * find if a array contains the object using indexOf or a simple polyFill + * @param {Array} src + * @param {String} find + * @param {String} [findByKey] + * @return {Boolean|Number} false when not found, or the index + */ +function inArray(src, find, findByKey) { + if (src.indexOf && !findByKey) { + return src.indexOf(find); + } else { + var i = 0; + + while (i < src.length) { + if (findByKey && src[i][findByKey] == find || !findByKey && src[i] === find) { + // do not use === here, test fails + return i; + } + + i++; + } + + return -1; + } +} + +var POINTER_INPUT_MAP = { + pointerdown: INPUT_START, + pointermove: INPUT_MOVE, + pointerup: INPUT_END, + pointercancel: INPUT_CANCEL, + pointerout: INPUT_CANCEL +}; // in IE10 the pointer types is defined as an enum + +var IE10_POINTER_TYPE_ENUM = { + 2: INPUT_TYPE_TOUCH, + 3: INPUT_TYPE_PEN, + 4: INPUT_TYPE_MOUSE, + 5: INPUT_TYPE_KINECT // see https://twitter.com/jacobrossi/status/480596438489890816 + +}; +var POINTER_ELEMENT_EVENTS = 'pointerdown'; +var POINTER_WINDOW_EVENTS = 'pointermove pointerup pointercancel'; // IE10 has prefixed support, and case-sensitive + +if (win.MSPointerEvent && !win.PointerEvent) { + POINTER_ELEMENT_EVENTS = 'MSPointerDown'; + POINTER_WINDOW_EVENTS = 'MSPointerMove MSPointerUp MSPointerCancel'; +} +/** + * @private + * Pointer events input + * @constructor + * @extends Input + */ + + +var PointerEventInput = +/*#__PURE__*/ +function (_Input) { + _inheritsLoose(PointerEventInput, _Input); + + function PointerEventInput() { + var _this; + + var proto = PointerEventInput.prototype; + proto.evEl = POINTER_ELEMENT_EVENTS; + proto.evWin = POINTER_WINDOW_EVENTS; + _this = _Input.apply(this, arguments) || this; + _this.store = _this.manager.session.pointerEvents = []; + return _this; + } + /** + * @private + * handle mouse events + * @param {Object} ev + */ + + + var _proto = PointerEventInput.prototype; + + _proto.handler = function handler(ev) { + var store = this.store; + var removePointer = false; + var eventTypeNormalized = ev.type.toLowerCase().replace('ms', ''); + var eventType = POINTER_INPUT_MAP[eventTypeNormalized]; + var pointerType = IE10_POINTER_TYPE_ENUM[ev.pointerType] || ev.pointerType; + var isTouch = pointerType === INPUT_TYPE_TOUCH; // get index of the event in the store + + var storeIndex = inArray(store, ev.pointerId, 'pointerId'); // start and mouse must be down + + if (eventType & INPUT_START && (ev.button === 0 || isTouch)) { + if (storeIndex < 0) { + store.push(ev); + storeIndex = store.length - 1; + } + } else if (eventType & (INPUT_END | INPUT_CANCEL)) { + removePointer = true; + } // it not found, so the pointer hasn't been down (so it's probably a hover) + + + if (storeIndex < 0) { + return; + } // update the event in the store + + + store[storeIndex] = ev; + this.callback(this.manager, eventType, { + pointers: store, + changedPointers: [ev], + pointerType: pointerType, + srcEvent: ev + }); + + if (removePointer) { + // remove from the store + store.splice(storeIndex, 1); + } + }; + + return PointerEventInput; +}(Input); + +/** + * @private + * convert array-like objects to real arrays + * @param {Object} obj + * @returns {Array} + */ +function toArray(obj) { + return Array.prototype.slice.call(obj, 0); +} + +/** + * @private + * unique array with objects based on a key (like 'id') or just by the array's value + * @param {Array} src [{id:1},{id:2},{id:1}] + * @param {String} [key] + * @param {Boolean} [sort=False] + * @returns {Array} [{id:1},{id:2}] + */ + +function uniqueArray(src, key, sort) { + var results = []; + var values = []; + var i = 0; + + while (i < src.length) { + var val = key ? src[i][key] : src[i]; + + if (inArray(values, val) < 0) { + results.push(src[i]); + } + + values[i] = val; + i++; + } + + if (sort) { + if (!key) { + results = results.sort(); + } else { + results = results.sort(function (a, b) { + return a[key] > b[key]; + }); + } + } + + return results; +} + +var TOUCH_INPUT_MAP = { + touchstart: INPUT_START, + touchmove: INPUT_MOVE, + touchend: INPUT_END, + touchcancel: INPUT_CANCEL +}; +var TOUCH_TARGET_EVENTS = 'touchstart touchmove touchend touchcancel'; +/** + * @private + * Multi-user touch events input + * @constructor + * @extends Input + */ + +var TouchInput = +/*#__PURE__*/ +function (_Input) { + _inheritsLoose(TouchInput, _Input); + + function TouchInput() { + var _this; + + TouchInput.prototype.evTarget = TOUCH_TARGET_EVENTS; + _this = _Input.apply(this, arguments) || this; + _this.targetIds = {}; // this.evTarget = TOUCH_TARGET_EVENTS; + + return _this; + } + + var _proto = TouchInput.prototype; + + _proto.handler = function handler(ev) { + var type = TOUCH_INPUT_MAP[ev.type]; + var touches = getTouches.call(this, ev, type); + + if (!touches) { + return; + } + + this.callback(this.manager, type, { + pointers: touches[0], + changedPointers: touches[1], + pointerType: INPUT_TYPE_TOUCH, + srcEvent: ev + }); + }; + + return TouchInput; +}(Input); + +function getTouches(ev, type) { + var allTouches = toArray(ev.touches); + var targetIds = this.targetIds; // when there is only one touch, the process can be simplified + + if (type & (INPUT_START | INPUT_MOVE) && allTouches.length === 1) { + targetIds[allTouches[0].identifier] = true; + return [allTouches, allTouches]; + } + + var i; + var targetTouches; + var changedTouches = toArray(ev.changedTouches); + var changedTargetTouches = []; + var target = this.target; // get target touches from touches + + targetTouches = allTouches.filter(function (touch) { + return hasParent(touch.target, target); + }); // collect touches + + if (type === INPUT_START) { + i = 0; + + while (i < targetTouches.length) { + targetIds[targetTouches[i].identifier] = true; + i++; + } + } // filter changed touches to only contain touches that exist in the collected target ids + + + i = 0; + + while (i < changedTouches.length) { + if (targetIds[changedTouches[i].identifier]) { + changedTargetTouches.push(changedTouches[i]); + } // cleanup removed touches + + + if (type & (INPUT_END | INPUT_CANCEL)) { + delete targetIds[changedTouches[i].identifier]; + } + + i++; + } + + if (!changedTargetTouches.length) { + return; + } + + return [// merge targetTouches with changedTargetTouches so it contains ALL touches, including 'end' and 'cancel' + uniqueArray(targetTouches.concat(changedTargetTouches), 'identifier', true), changedTargetTouches]; +} + +var MOUSE_INPUT_MAP = { + mousedown: INPUT_START, + mousemove: INPUT_MOVE, + mouseup: INPUT_END +}; +var MOUSE_ELEMENT_EVENTS = 'mousedown'; +var MOUSE_WINDOW_EVENTS = 'mousemove mouseup'; +/** + * @private + * Mouse events input + * @constructor + * @extends Input + */ + +var MouseInput = +/*#__PURE__*/ +function (_Input) { + _inheritsLoose(MouseInput, _Input); + + function MouseInput() { + var _this; + + var proto = MouseInput.prototype; + proto.evEl = MOUSE_ELEMENT_EVENTS; + proto.evWin = MOUSE_WINDOW_EVENTS; + _this = _Input.apply(this, arguments) || this; + _this.pressed = false; // mousedown state + + return _this; + } + /** + * @private + * handle mouse events + * @param {Object} ev + */ + + + var _proto = MouseInput.prototype; + + _proto.handler = function handler(ev) { + var eventType = MOUSE_INPUT_MAP[ev.type]; // on start we want to have the left mouse button down + + if (eventType & INPUT_START && ev.button === 0) { + this.pressed = true; + } + + if (eventType & INPUT_MOVE && ev.which !== 1) { + eventType = INPUT_END; + } // mouse must be down + + + if (!this.pressed) { + return; + } + + if (eventType & INPUT_END) { + this.pressed = false; + } + + this.callback(this.manager, eventType, { + pointers: [ev], + changedPointers: [ev], + pointerType: INPUT_TYPE_MOUSE, + srcEvent: ev + }); + }; + + return MouseInput; +}(Input); + +/** + * @private + * Combined touch and mouse input + * + * Touch has a higher priority then mouse, and while touching no mouse events are allowed. + * This because touch devices also emit mouse events while doing a touch. + * + * @constructor + * @extends Input + */ + +var DEDUP_TIMEOUT = 2500; +var DEDUP_DISTANCE = 25; + +function setLastTouch(eventData) { + var _eventData$changedPoi = eventData.changedPointers, + touch = _eventData$changedPoi[0]; + + if (touch.identifier === this.primaryTouch) { + var lastTouch = { + x: touch.clientX, + y: touch.clientY + }; + var lts = this.lastTouches; + this.lastTouches.push(lastTouch); + + var removeLastTouch = function removeLastTouch() { + var i = lts.indexOf(lastTouch); + + if (i > -1) { + lts.splice(i, 1); + } + }; + + setTimeout(removeLastTouch, DEDUP_TIMEOUT); + } +} + +function recordTouches(eventType, eventData) { + if (eventType & INPUT_START) { + this.primaryTouch = eventData.changedPointers[0].identifier; + setLastTouch.call(this, eventData); + } else if (eventType & (INPUT_END | INPUT_CANCEL)) { + setLastTouch.call(this, eventData); + } +} + +function isSyntheticEvent(eventData) { + var x = eventData.srcEvent.clientX; + var y = eventData.srcEvent.clientY; + + for (var i = 0; i < this.lastTouches.length; i++) { + var t = this.lastTouches[i]; + var dx = Math.abs(x - t.x); + var dy = Math.abs(y - t.y); + + if (dx <= DEDUP_DISTANCE && dy <= DEDUP_DISTANCE) { + return true; + } + } + + return false; +} + +var TouchMouseInput = +/*#__PURE__*/ +function () { + var TouchMouseInput = + /*#__PURE__*/ + function (_Input) { + _inheritsLoose(TouchMouseInput, _Input); + + function TouchMouseInput(_manager, callback) { + var _this; + + _this = _Input.call(this, _manager, callback) || this; + + _this.handler = function (manager, inputEvent, inputData) { + var isTouch = inputData.pointerType === INPUT_TYPE_TOUCH; + var isMouse = inputData.pointerType === INPUT_TYPE_MOUSE; + + if (isMouse && inputData.sourceCapabilities && inputData.sourceCapabilities.firesTouchEvents) { + return; + } // when we're in a touch event, record touches to de-dupe synthetic mouse event + + + if (isTouch) { + recordTouches.call(_assertThisInitialized(_assertThisInitialized(_this)), inputEvent, inputData); + } else if (isMouse && isSyntheticEvent.call(_assertThisInitialized(_assertThisInitialized(_this)), inputData)) { + return; + } + + _this.callback(manager, inputEvent, inputData); + }; + + _this.touch = new TouchInput(_this.manager, _this.handler); + _this.mouse = new MouseInput(_this.manager, _this.handler); + _this.primaryTouch = null; + _this.lastTouches = []; + return _this; + } + /** + * @private + * handle mouse and touch events + * @param {Hammer} manager + * @param {String} inputEvent + * @param {Object} inputData + */ + + + var _proto = TouchMouseInput.prototype; + + /** + * @private + * remove the event listeners + */ + _proto.destroy = function destroy() { + this.touch.destroy(); + this.mouse.destroy(); + }; + + return TouchMouseInput; + }(Input); + + return TouchMouseInput; +}(); + +/** + * @private + * create new input type manager + * called by the Manager constructor + * @param {Hammer} manager + * @returns {Input} + */ + +function createInputInstance(manager) { + var Type; // let inputClass = manager.options.inputClass; + + var inputClass = manager.options.inputClass; + + if (inputClass) { + Type = inputClass; + } else if (SUPPORT_POINTER_EVENTS) { + Type = PointerEventInput; + } else if (SUPPORT_ONLY_TOUCH) { + Type = TouchInput; + } else if (!SUPPORT_TOUCH) { + Type = MouseInput; + } else { + Type = TouchMouseInput; + } + + return new Type(manager, inputHandler); +} + +/** + * @private + * if the argument is an array, we want to execute the fn on each entry + * if it aint an array we don't want to do a thing. + * this is used by all the methods that accept a single and array argument. + * @param {*|Array} arg + * @param {String} fn + * @param {Object} [context] + * @returns {Boolean} + */ + +function invokeArrayArg(arg, fn, context) { + if (Array.isArray(arg)) { + each(arg, context[fn], context); + return true; + } + + return false; +} + +var STATE_POSSIBLE = 1; +var STATE_BEGAN = 2; +var STATE_CHANGED = 4; +var STATE_ENDED = 8; +var STATE_RECOGNIZED = STATE_ENDED; +var STATE_CANCELLED = 16; +var STATE_FAILED = 32; + +/** + * @private + * get a unique id + * @returns {number} uniqueId + */ +var _uniqueId = 1; +function uniqueId() { + return _uniqueId++; +} + +/** + * @private + * get a recognizer by name if it is bound to a manager + * @param {Recognizer|String} otherRecognizer + * @param {Recognizer} recognizer + * @returns {Recognizer} + */ +function getRecognizerByNameIfManager(otherRecognizer, recognizer) { + var manager = recognizer.manager; + + if (manager) { + return manager.get(otherRecognizer); + } + + return otherRecognizer; +} + +/** + * @private + * get a usable string, used as event postfix + * @param {constant} state + * @returns {String} state + */ + +function stateStr(state) { + if (state & STATE_CANCELLED) { + return 'cancel'; + } else if (state & STATE_ENDED) { + return 'end'; + } else if (state & STATE_CHANGED) { + return 'move'; + } else if (state & STATE_BEGAN) { + return 'start'; + } + + return ''; +} + +/** + * @private + * Recognizer flow explained; * + * All recognizers have the initial state of POSSIBLE when a input session starts. + * The definition of a input session is from the first input until the last input, with all it's movement in it. * + * Example session for mouse-input: mousedown -> mousemove -> mouseup + * + * On each recognizing cycle (see Manager.recognize) the .recognize() method is executed + * which determines with state it should be. + * + * If the recognizer has the state FAILED, CANCELLED or RECOGNIZED (equals ENDED), it is reset to + * POSSIBLE to give it another change on the next cycle. + * + * Possible + * | + * +-----+---------------+ + * | | + * +-----+-----+ | + * | | | + * Failed Cancelled | + * +-------+------+ + * | | + * Recognized Began + * | + * Changed + * | + * Ended/Recognized + */ + +/** + * @private + * Recognizer + * Every recognizer needs to extend from this class. + * @constructor + * @param {Object} options + */ + +var Recognizer = +/*#__PURE__*/ +function () { + function Recognizer(options) { + if (options === void 0) { + options = {}; + } + + this.options = _extends({ + enable: true + }, options); + this.id = uniqueId(); + this.manager = null; // default is enable true + + this.state = STATE_POSSIBLE; + this.simultaneous = {}; + this.requireFail = []; + } + /** + * @private + * set options + * @param {Object} options + * @return {Recognizer} + */ + + + var _proto = Recognizer.prototype; + + _proto.set = function set(options) { + assign$1(this.options, options); // also update the touchAction, in case something changed about the directions/enabled state + + this.manager && this.manager.touchAction.update(); + return this; + }; + /** + * @private + * recognize simultaneous with an other recognizer. + * @param {Recognizer} otherRecognizer + * @returns {Recognizer} this + */ + + + _proto.recognizeWith = function recognizeWith(otherRecognizer) { + if (invokeArrayArg(otherRecognizer, 'recognizeWith', this)) { + return this; + } + + var simultaneous = this.simultaneous; + otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this); + + if (!simultaneous[otherRecognizer.id]) { + simultaneous[otherRecognizer.id] = otherRecognizer; + otherRecognizer.recognizeWith(this); + } + + return this; + }; + /** + * @private + * drop the simultaneous link. it doesnt remove the link on the other recognizer. + * @param {Recognizer} otherRecognizer + * @returns {Recognizer} this + */ + + + _proto.dropRecognizeWith = function dropRecognizeWith(otherRecognizer) { + if (invokeArrayArg(otherRecognizer, 'dropRecognizeWith', this)) { + return this; + } + + otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this); + delete this.simultaneous[otherRecognizer.id]; + return this; + }; + /** + * @private + * recognizer can only run when an other is failing + * @param {Recognizer} otherRecognizer + * @returns {Recognizer} this + */ + + + _proto.requireFailure = function requireFailure(otherRecognizer) { + if (invokeArrayArg(otherRecognizer, 'requireFailure', this)) { + return this; + } + + var requireFail = this.requireFail; + otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this); + + if (inArray(requireFail, otherRecognizer) === -1) { + requireFail.push(otherRecognizer); + otherRecognizer.requireFailure(this); + } + + return this; + }; + /** + * @private + * drop the requireFailure link. it does not remove the link on the other recognizer. + * @param {Recognizer} otherRecognizer + * @returns {Recognizer} this + */ + + + _proto.dropRequireFailure = function dropRequireFailure(otherRecognizer) { + if (invokeArrayArg(otherRecognizer, 'dropRequireFailure', this)) { + return this; + } + + otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this); + var index = inArray(this.requireFail, otherRecognizer); + + if (index > -1) { + this.requireFail.splice(index, 1); + } + + return this; + }; + /** + * @private + * has require failures boolean + * @returns {boolean} + */ + + + _proto.hasRequireFailures = function hasRequireFailures() { + return this.requireFail.length > 0; + }; + /** + * @private + * if the recognizer can recognize simultaneous with an other recognizer + * @param {Recognizer} otherRecognizer + * @returns {Boolean} + */ + + + _proto.canRecognizeWith = function canRecognizeWith(otherRecognizer) { + return !!this.simultaneous[otherRecognizer.id]; + }; + /** + * @private + * You should use `tryEmit` instead of `emit` directly to check + * that all the needed recognizers has failed before emitting. + * @param {Object} input + */ + + + _proto.emit = function emit(input) { + var self = this; + var state = this.state; + + function emit(event) { + self.manager.emit(event, input); + } // 'panstart' and 'panmove' + + + if (state < STATE_ENDED) { + emit(self.options.event + stateStr(state)); + } + + emit(self.options.event); // simple 'eventName' events + + if (input.additionalEvent) { + // additional event(panleft, panright, pinchin, pinchout...) + emit(input.additionalEvent); + } // panend and pancancel + + + if (state >= STATE_ENDED) { + emit(self.options.event + stateStr(state)); + } + }; + /** + * @private + * Check that all the require failure recognizers has failed, + * if true, it emits a gesture event, + * otherwise, setup the state to FAILED. + * @param {Object} input + */ + + + _proto.tryEmit = function tryEmit(input) { + if (this.canEmit()) { + return this.emit(input); + } // it's failing anyway + + + this.state = STATE_FAILED; + }; + /** + * @private + * can we emit? + * @returns {boolean} + */ + + + _proto.canEmit = function canEmit() { + var i = 0; + + while (i < this.requireFail.length) { + if (!(this.requireFail[i].state & (STATE_FAILED | STATE_POSSIBLE))) { + return false; + } + + i++; + } + + return true; + }; + /** + * @private + * update the recognizer + * @param {Object} inputData + */ + + + _proto.recognize = function recognize(inputData) { + // make a new copy of the inputData + // so we can change the inputData without messing up the other recognizers + var inputDataClone = assign$1({}, inputData); // is is enabled and allow recognizing? + + if (!boolOrFn(this.options.enable, [this, inputDataClone])) { + this.reset(); + this.state = STATE_FAILED; + return; + } // reset when we've reached the end + + + if (this.state & (STATE_RECOGNIZED | STATE_CANCELLED | STATE_FAILED)) { + this.state = STATE_POSSIBLE; + } + + this.state = this.process(inputDataClone); // the recognizer has recognized a gesture + // so trigger an event + + if (this.state & (STATE_BEGAN | STATE_CHANGED | STATE_ENDED | STATE_CANCELLED)) { + this.tryEmit(inputDataClone); + } + }; + /** + * @private + * return the state of the recognizer + * the actual recognizing happens in this method + * @virtual + * @param {Object} inputData + * @returns {constant} STATE + */ + + /* jshint ignore:start */ + + + _proto.process = function process(inputData) {}; + /* jshint ignore:end */ + + /** + * @private + * return the preferred touch-action + * @virtual + * @returns {Array} + */ + + + _proto.getTouchAction = function getTouchAction() {}; + /** + * @private + * called when the gesture isn't allowed to recognize + * like when another is being recognized or it is disabled + * @virtual + */ + + + _proto.reset = function reset() {}; + + return Recognizer; +}(); + +var defaults = { + /** + * @private + * set if DOM events are being triggered. + * But this is slower and unused by simple implementations, so disabled by default. + * @type {Boolean} + * @default false + */ + domEvents: false, + + /** + * @private + * The value for the touchAction property/fallback. + * When set to `compute` it will magically set the correct value based on the added recognizers. + * @type {String} + * @default compute + */ + touchAction: TOUCH_ACTION_COMPUTE, + + /** + * @private + * @type {Boolean} + * @default true + */ + enable: true, + + /** + * @private + * EXPERIMENTAL FEATURE -- can be removed/changed + * Change the parent input target element. + * If Null, then it is being set the to main element. + * @type {Null|EventTarget} + * @default null + */ + inputTarget: null, + + /** + * @private + * force an input class + * @type {Null|Function} + * @default null + */ + inputClass: null, + + /** + * @private + * Default recognizer setup when calling `Hammer()` + * When creating a new Manager these will be skipped. + * @type {Array} + */ + preset: [], + + /** + * @private + * Some CSS properties can be used to improve the working of Hammer. + * Add them to this method and they will be set when creating a new Manager. + * @namespace + */ + cssProps: { + /** + * @private + * Disables text selection to improve the dragging gesture. Mainly for desktop browsers. + * @type {String} + * @default 'none' + */ + userSelect: "none", + + /** + * @private + * Disable the Windows Phone grippers when pressing an element. + * @type {String} + * @default 'none' + */ + touchSelect: "none", + + /** + * @private + * Disables the default callout shown when you touch and hold a touch target. + * On iOS, when you touch and hold a touch target such as a link, Safari displays + * a callout containing information about the link. This property allows you to disable that callout. + * @type {String} + * @default 'none' + */ + touchCallout: "none", + + /** + * @private + * Specifies whether zooming is enabled. Used by IE10> + * @type {String} + * @default 'none' + */ + contentZooming: "none", + + /** + * @private + * Specifies that an entire element should be draggable instead of its contents. Mainly for desktop browsers. + * @type {String} + * @default 'none' + */ + userDrag: "none", + + /** + * @private + * Overrides the highlight color shown when the user taps a link or a JavaScript + * clickable element in iOS. This property obeys the alpha value, if specified. + * @type {String} + * @default 'rgba(0,0,0,0)' + */ + tapHighlightColor: "rgba(0,0,0,0)" + } +}; + +var STOP = 1; +var FORCED_STOP = 2; +/** + * @private + * add/remove the css properties as defined in manager.options.cssProps + * @param {Manager} manager + * @param {Boolean} add + */ + +function toggleCssProps(manager, add) { + var element = manager.element; + + if (!element.style) { + return; + } + + var prop; + each(manager.options.cssProps, function (value, name) { + prop = prefixed(element.style, name); + + if (add) { + manager.oldCssProps[prop] = element.style[prop]; + element.style[prop] = value; + } else { + element.style[prop] = manager.oldCssProps[prop] || ""; + } + }); + + if (!add) { + manager.oldCssProps = {}; + } +} +/** + * @private + * trigger dom event + * @param {String} event + * @param {Object} data + */ + + +function triggerDomEvent(event, data) { + var gestureEvent = document.createEvent("Event"); + gestureEvent.initEvent(event, true, true); + gestureEvent.gesture = data; + data.target.dispatchEvent(gestureEvent); +} +/** +* @private + * Manager + * @param {HTMLElement} element + * @param {Object} [options] + * @constructor + */ + + +var Manager = +/*#__PURE__*/ +function () { + function Manager(element, options) { + var _this = this; + + this.options = assign$1({}, defaults, options || {}); + this.options.inputTarget = this.options.inputTarget || element; + this.handlers = {}; + this.session = {}; + this.recognizers = []; + this.oldCssProps = {}; + this.element = element; + this.input = createInputInstance(this); + this.touchAction = new TouchAction(this, this.options.touchAction); + toggleCssProps(this, true); + each(this.options.recognizers, function (item) { + var recognizer = _this.add(new item[0](item[1])); + + item[2] && recognizer.recognizeWith(item[2]); + item[3] && recognizer.requireFailure(item[3]); + }, this); + } + /** + * @private + * set options + * @param {Object} options + * @returns {Manager} + */ + + + var _proto = Manager.prototype; + + _proto.set = function set(options) { + assign$1(this.options, options); // Options that need a little more setup + + if (options.touchAction) { + this.touchAction.update(); + } + + if (options.inputTarget) { + // Clean up existing event listeners and reinitialize + this.input.destroy(); + this.input.target = options.inputTarget; + this.input.init(); + } + + return this; + }; + /** + * @private + * stop recognizing for this session. + * This session will be discarded, when a new [input]start event is fired. + * When forced, the recognizer cycle is stopped immediately. + * @param {Boolean} [force] + */ + + + _proto.stop = function stop(force) { + this.session.stopped = force ? FORCED_STOP : STOP; + }; + /** + * @private + * run the recognizers! + * called by the inputHandler function on every movement of the pointers (touches) + * it walks through all the recognizers and tries to detect the gesture that is being made + * @param {Object} inputData + */ + + + _proto.recognize = function recognize(inputData) { + var session = this.session; + + if (session.stopped) { + return; + } // run the touch-action polyfill + + + this.touchAction.preventDefaults(inputData); + var recognizer; + var recognizers = this.recognizers; // this holds the recognizer that is being recognized. + // so the recognizer's state needs to be BEGAN, CHANGED, ENDED or RECOGNIZED + // if no recognizer is detecting a thing, it is set to `null` + + var curRecognizer = session.curRecognizer; // reset when the last recognizer is recognized + // or when we're in a new session + + if (!curRecognizer || curRecognizer && curRecognizer.state & STATE_RECOGNIZED) { + session.curRecognizer = null; + curRecognizer = null; + } + + var i = 0; + + while (i < recognizers.length) { + recognizer = recognizers[i]; // find out if we are allowed try to recognize the input for this one. + // 1. allow if the session is NOT forced stopped (see the .stop() method) + // 2. allow if we still haven't recognized a gesture in this session, or the this recognizer is the one + // that is being recognized. + // 3. allow if the recognizer is allowed to run simultaneous with the current recognized recognizer. + // this can be setup with the `recognizeWith()` method on the recognizer. + + if (session.stopped !== FORCED_STOP && ( // 1 + !curRecognizer || recognizer === curRecognizer || // 2 + recognizer.canRecognizeWith(curRecognizer))) { + // 3 + recognizer.recognize(inputData); + } else { + recognizer.reset(); + } // if the recognizer has been recognizing the input as a valid gesture, we want to store this one as the + // current active recognizer. but only if we don't already have an active recognizer + + + if (!curRecognizer && recognizer.state & (STATE_BEGAN | STATE_CHANGED | STATE_ENDED)) { + session.curRecognizer = recognizer; + curRecognizer = recognizer; + } + + i++; + } + }; + /** + * @private + * get a recognizer by its event name. + * @param {Recognizer|String} recognizer + * @returns {Recognizer|Null} + */ + + + _proto.get = function get(recognizer) { + if (recognizer instanceof Recognizer) { + return recognizer; + } + + var recognizers = this.recognizers; + + for (var i = 0; i < recognizers.length; i++) { + if (recognizers[i].options.event === recognizer) { + return recognizers[i]; + } + } + + return null; + }; + /** + * @private add a recognizer to the manager + * existing recognizers with the same event name will be removed + * @param {Recognizer} recognizer + * @returns {Recognizer|Manager} + */ + + + _proto.add = function add(recognizer) { + if (invokeArrayArg(recognizer, "add", this)) { + return this; + } // remove existing + + + var existing = this.get(recognizer.options.event); + + if (existing) { + this.remove(existing); + } + + this.recognizers.push(recognizer); + recognizer.manager = this; + this.touchAction.update(); + return recognizer; + }; + /** + * @private + * remove a recognizer by name or instance + * @param {Recognizer|String} recognizer + * @returns {Manager} + */ + + + _proto.remove = function remove(recognizer) { + if (invokeArrayArg(recognizer, "remove", this)) { + return this; + } + + var targetRecognizer = this.get(recognizer); // let's make sure this recognizer exists + + if (recognizer) { + var recognizers = this.recognizers; + var index = inArray(recognizers, targetRecognizer); + + if (index !== -1) { + recognizers.splice(index, 1); + this.touchAction.update(); + } + } + + return this; + }; + /** + * @private + * bind event + * @param {String} events + * @param {Function} handler + * @returns {EventEmitter} this + */ + + + _proto.on = function on(events, handler) { + if (events === undefined || handler === undefined) { + return this; + } + + var handlers = this.handlers; + each(splitStr(events), function (event) { + handlers[event] = handlers[event] || []; + handlers[event].push(handler); + }); + return this; + }; + /** + * @private unbind event, leave emit blank to remove all handlers + * @param {String} events + * @param {Function} [handler] + * @returns {EventEmitter} this + */ + + + _proto.off = function off(events, handler) { + if (events === undefined) { + return this; + } + + var handlers = this.handlers; + each(splitStr(events), function (event) { + if (!handler) { + delete handlers[event]; + } else { + handlers[event] && handlers[event].splice(inArray(handlers[event], handler), 1); + } + }); + return this; + }; + /** + * @private emit event to the listeners + * @param {String} event + * @param {Object} data + */ + + + _proto.emit = function emit(event, data) { + // we also want to trigger dom events + if (this.options.domEvents) { + triggerDomEvent(event, data); + } // no handlers, so skip it all + + + var handlers = this.handlers[event] && this.handlers[event].slice(); + + if (!handlers || !handlers.length) { + return; + } + + data.type = event; + + data.preventDefault = function () { + data.srcEvent.preventDefault(); + }; + + var i = 0; + + while (i < handlers.length) { + handlers[i](data); + i++; + } + }; + /** + * @private + * destroy the manager and unbinds all events + * it doesn't unbind dom events, that is the user own responsibility + */ + + + _proto.destroy = function destroy() { + this.element && toggleCssProps(this, false); + this.handlers = {}; + this.session = {}; + this.input.destroy(); + this.element = null; + }; + + return Manager; +}(); + +var SINGLE_TOUCH_INPUT_MAP = { + touchstart: INPUT_START, + touchmove: INPUT_MOVE, + touchend: INPUT_END, + touchcancel: INPUT_CANCEL +}; +var SINGLE_TOUCH_TARGET_EVENTS = 'touchstart'; +var SINGLE_TOUCH_WINDOW_EVENTS = 'touchstart touchmove touchend touchcancel'; +/** + * @private + * Touch events input + * @constructor + * @extends Input + */ + +var SingleTouchInput = +/*#__PURE__*/ +function (_Input) { + _inheritsLoose(SingleTouchInput, _Input); + + function SingleTouchInput() { + var _this; + + var proto = SingleTouchInput.prototype; + proto.evTarget = SINGLE_TOUCH_TARGET_EVENTS; + proto.evWin = SINGLE_TOUCH_WINDOW_EVENTS; + _this = _Input.apply(this, arguments) || this; + _this.started = false; + return _this; + } + + var _proto = SingleTouchInput.prototype; + + _proto.handler = function handler(ev) { + var type = SINGLE_TOUCH_INPUT_MAP[ev.type]; // should we handle the touch events? + + if (type === INPUT_START) { + this.started = true; + } + + if (!this.started) { + return; + } + + var touches = normalizeSingleTouches.call(this, ev, type); // when done, reset the started state + + if (type & (INPUT_END | INPUT_CANCEL) && touches[0].length - touches[1].length === 0) { + this.started = false; + } + + this.callback(this.manager, type, { + pointers: touches[0], + changedPointers: touches[1], + pointerType: INPUT_TYPE_TOUCH, + srcEvent: ev + }); + }; + + return SingleTouchInput; +}(Input); + +function normalizeSingleTouches(ev, type) { + var all = toArray(ev.touches); + var changed = toArray(ev.changedTouches); + + if (type & (INPUT_END | INPUT_CANCEL)) { + all = uniqueArray(all.concat(changed), 'identifier', true); + } + + return [all, changed]; +} + +/** + * @private + * This recognizer is just used as a base for the simple attribute recognizers. + * @constructor + * @extends Recognizer + */ + +var AttrRecognizer = +/*#__PURE__*/ +function (_Recognizer) { + _inheritsLoose(AttrRecognizer, _Recognizer); + + function AttrRecognizer(options) { + if (options === void 0) { + options = {}; + } + + return _Recognizer.call(this, _extends({ + pointers: 1 + }, options)) || this; + } + /** + * @private + * Used to check if it the recognizer receives valid input, like input.distance > 10. + * @memberof AttrRecognizer + * @param {Object} input + * @returns {Boolean} recognized + */ + + + var _proto = AttrRecognizer.prototype; + + _proto.attrTest = function attrTest(input) { + var optionPointers = this.options.pointers; + return optionPointers === 0 || input.pointers.length === optionPointers; + }; + /** + * @private + * Process the input and return the state for the recognizer + * @memberof AttrRecognizer + * @param {Object} input + * @returns {*} State + */ + + + _proto.process = function process(input) { + var state = this.state; + var eventType = input.eventType; + var isRecognized = state & (STATE_BEGAN | STATE_CHANGED); + var isValid = this.attrTest(input); // on cancel input and we've recognized before, return STATE_CANCELLED + + if (isRecognized && (eventType & INPUT_CANCEL || !isValid)) { + return state | STATE_CANCELLED; + } else if (isRecognized || isValid) { + if (eventType & INPUT_END) { + return state | STATE_ENDED; + } else if (!(state & STATE_BEGAN)) { + return STATE_BEGAN; + } + + return state | STATE_CHANGED; + } + + return STATE_FAILED; + }; + + return AttrRecognizer; +}(Recognizer); + +/** + * @private + * A tap is recognized when the pointer is doing a small tap/click. Multiple taps are recognized if they occur + * between the given interval and position. The delay option can be used to recognize multi-taps without firing + * a single tap. + * + * The eventData from the emitted event contains the property `tapCount`, which contains the amount of + * multi-taps being recognized. + * @constructor + * @extends Recognizer + */ + +var TapRecognizer = +/*#__PURE__*/ +function (_Recognizer) { + _inheritsLoose(TapRecognizer, _Recognizer); + + function TapRecognizer(options) { + var _this; + + if (options === void 0) { + options = {}; + } + + _this = _Recognizer.call(this, _extends({ + event: 'tap', + pointers: 1, + taps: 1, + interval: 300, + // max time between the multi-tap taps + time: 250, + // max time of the pointer to be down (like finger on the screen) + threshold: 9, + // a minimal movement is ok, but keep it low + posThreshold: 10 + }, options)) || this; // previous time and center, + // used for tap counting + + _this.pTime = false; + _this.pCenter = false; + _this._timer = null; + _this._input = null; + _this.count = 0; + return _this; + } + + var _proto = TapRecognizer.prototype; + + _proto.getTouchAction = function getTouchAction() { + return [TOUCH_ACTION_MANIPULATION]; + }; + + _proto.process = function process(input) { + var _this2 = this; + + var options = this.options; + var validPointers = input.pointers.length === options.pointers; + var validMovement = input.distance < options.threshold; + var validTouchTime = input.deltaTime < options.time; + this.reset(); + + if (input.eventType & INPUT_START && this.count === 0) { + return this.failTimeout(); + } // we only allow little movement + // and we've reached an end event, so a tap is possible + + + if (validMovement && validTouchTime && validPointers) { + if (input.eventType !== INPUT_END) { + return this.failTimeout(); + } + + var validInterval = this.pTime ? input.timeStamp - this.pTime < options.interval : true; + var validMultiTap = !this.pCenter || getDistance(this.pCenter, input.center) < options.posThreshold; + this.pTime = input.timeStamp; + this.pCenter = input.center; + + if (!validMultiTap || !validInterval) { + this.count = 1; + } else { + this.count += 1; + } + + this._input = input; // if tap count matches we have recognized it, + // else it has began recognizing... + + var tapCount = this.count % options.taps; + + if (tapCount === 0) { + // no failing requirements, immediately trigger the tap event + // or wait as long as the multitap interval to trigger + if (!this.hasRequireFailures()) { + return STATE_RECOGNIZED; + } else { + this._timer = setTimeout(function () { + _this2.state = STATE_RECOGNIZED; + + _this2.tryEmit(); + }, options.interval); + return STATE_BEGAN; + } + } + } + + return STATE_FAILED; + }; + + _proto.failTimeout = function failTimeout() { + var _this3 = this; + + this._timer = setTimeout(function () { + _this3.state = STATE_FAILED; + }, this.options.interval); + return STATE_FAILED; + }; + + _proto.reset = function reset() { + clearTimeout(this._timer); + }; + + _proto.emit = function emit() { + if (this.state === STATE_RECOGNIZED) { + this._input.tapCount = this.count; + this.manager.emit(this.options.event, this._input); + } + }; + + return TapRecognizer; +}(Recognizer); + +/** + * @private + * direction cons to string + * @param {constant} direction + * @returns {String} + */ + +function directionStr(direction) { + if (direction === DIRECTION_DOWN) { + return 'down'; + } else if (direction === DIRECTION_UP) { + return 'up'; + } else if (direction === DIRECTION_LEFT) { + return 'left'; + } else if (direction === DIRECTION_RIGHT) { + return 'right'; + } + + return ''; +} + +/** + * @private + * Pan + * Recognized when the pointer is down and moved in the allowed direction. + * @constructor + * @extends AttrRecognizer + */ + +var PanRecognizer = +/*#__PURE__*/ +function (_AttrRecognizer) { + _inheritsLoose(PanRecognizer, _AttrRecognizer); + + function PanRecognizer(options) { + var _this; + + if (options === void 0) { + options = {}; + } + + _this = _AttrRecognizer.call(this, _extends({ + event: 'pan', + threshold: 10, + pointers: 1, + direction: DIRECTION_ALL + }, options)) || this; + _this.pX = null; + _this.pY = null; + return _this; + } + + var _proto = PanRecognizer.prototype; + + _proto.getTouchAction = function getTouchAction() { + var direction = this.options.direction; + var actions = []; + + if (direction & DIRECTION_HORIZONTAL) { + actions.push(TOUCH_ACTION_PAN_Y); + } + + if (direction & DIRECTION_VERTICAL) { + actions.push(TOUCH_ACTION_PAN_X); + } + + return actions; + }; + + _proto.directionTest = function directionTest(input) { + var options = this.options; + var hasMoved = true; + var distance = input.distance; + var direction = input.direction; + var x = input.deltaX; + var y = input.deltaY; // lock to axis? + + if (!(direction & options.direction)) { + if (options.direction & DIRECTION_HORIZONTAL) { + direction = x === 0 ? DIRECTION_NONE : x < 0 ? DIRECTION_LEFT : DIRECTION_RIGHT; + hasMoved = x !== this.pX; + distance = Math.abs(input.deltaX); + } else { + direction = y === 0 ? DIRECTION_NONE : y < 0 ? DIRECTION_UP : DIRECTION_DOWN; + hasMoved = y !== this.pY; + distance = Math.abs(input.deltaY); + } + } + + input.direction = direction; + return hasMoved && distance > options.threshold && direction & options.direction; + }; + + _proto.attrTest = function attrTest(input) { + return AttrRecognizer.prototype.attrTest.call(this, input) && ( // replace with a super call + this.state & STATE_BEGAN || !(this.state & STATE_BEGAN) && this.directionTest(input)); + }; + + _proto.emit = function emit(input) { + this.pX = input.deltaX; + this.pY = input.deltaY; + var direction = directionStr(input.direction); + + if (direction) { + input.additionalEvent = this.options.event + direction; + } + + _AttrRecognizer.prototype.emit.call(this, input); + }; + + return PanRecognizer; +}(AttrRecognizer); + +/** + * @private + * Swipe + * Recognized when the pointer is moving fast (velocity), with enough distance in the allowed direction. + * @constructor + * @extends AttrRecognizer + */ + +var SwipeRecognizer = +/*#__PURE__*/ +function (_AttrRecognizer) { + _inheritsLoose(SwipeRecognizer, _AttrRecognizer); + + function SwipeRecognizer(options) { + if (options === void 0) { + options = {}; + } + + return _AttrRecognizer.call(this, _extends({ + event: 'swipe', + threshold: 10, + velocity: 0.3, + direction: DIRECTION_HORIZONTAL | DIRECTION_VERTICAL, + pointers: 1 + }, options)) || this; + } + + var _proto = SwipeRecognizer.prototype; + + _proto.getTouchAction = function getTouchAction() { + return PanRecognizer.prototype.getTouchAction.call(this); + }; + + _proto.attrTest = function attrTest(input) { + var direction = this.options.direction; + var velocity; + + if (direction & (DIRECTION_HORIZONTAL | DIRECTION_VERTICAL)) { + velocity = input.overallVelocity; + } else if (direction & DIRECTION_HORIZONTAL) { + velocity = input.overallVelocityX; + } else if (direction & DIRECTION_VERTICAL) { + velocity = input.overallVelocityY; + } + + return _AttrRecognizer.prototype.attrTest.call(this, input) && direction & input.offsetDirection && input.distance > this.options.threshold && input.maxPointers === this.options.pointers && abs(velocity) > this.options.velocity && input.eventType & INPUT_END; + }; + + _proto.emit = function emit(input) { + var direction = directionStr(input.offsetDirection); + + if (direction) { + this.manager.emit(this.options.event + direction, input); + } + + this.manager.emit(this.options.event, input); + }; + + return SwipeRecognizer; +}(AttrRecognizer); + +/** + * @private + * Pinch + * Recognized when two or more pointers are moving toward (zoom-in) or away from each other (zoom-out). + * @constructor + * @extends AttrRecognizer + */ + +var PinchRecognizer = +/*#__PURE__*/ +function (_AttrRecognizer) { + _inheritsLoose(PinchRecognizer, _AttrRecognizer); + + function PinchRecognizer(options) { + if (options === void 0) { + options = {}; + } + + return _AttrRecognizer.call(this, _extends({ + event: 'pinch', + threshold: 0, + pointers: 2 + }, options)) || this; + } + + var _proto = PinchRecognizer.prototype; + + _proto.getTouchAction = function getTouchAction() { + return [TOUCH_ACTION_NONE]; + }; + + _proto.attrTest = function attrTest(input) { + return _AttrRecognizer.prototype.attrTest.call(this, input) && (Math.abs(input.scale - 1) > this.options.threshold || this.state & STATE_BEGAN); + }; + + _proto.emit = function emit(input) { + if (input.scale !== 1) { + var inOut = input.scale < 1 ? 'in' : 'out'; + input.additionalEvent = this.options.event + inOut; + } + + _AttrRecognizer.prototype.emit.call(this, input); + }; + + return PinchRecognizer; +}(AttrRecognizer); + +/** + * @private + * Rotate + * Recognized when two or more pointer are moving in a circular motion. + * @constructor + * @extends AttrRecognizer + */ + +var RotateRecognizer = +/*#__PURE__*/ +function (_AttrRecognizer) { + _inheritsLoose(RotateRecognizer, _AttrRecognizer); + + function RotateRecognizer(options) { + if (options === void 0) { + options = {}; + } + + return _AttrRecognizer.call(this, _extends({ + event: 'rotate', + threshold: 0, + pointers: 2 + }, options)) || this; + } + + var _proto = RotateRecognizer.prototype; + + _proto.getTouchAction = function getTouchAction() { + return [TOUCH_ACTION_NONE]; + }; + + _proto.attrTest = function attrTest(input) { + return _AttrRecognizer.prototype.attrTest.call(this, input) && (Math.abs(input.rotation) > this.options.threshold || this.state & STATE_BEGAN); + }; + + return RotateRecognizer; +}(AttrRecognizer); + +/** + * @private + * Press + * Recognized when the pointer is down for x ms without any movement. + * @constructor + * @extends Recognizer + */ + +var PressRecognizer = +/*#__PURE__*/ +function (_Recognizer) { + _inheritsLoose(PressRecognizer, _Recognizer); + + function PressRecognizer(options) { + var _this; + + if (options === void 0) { + options = {}; + } + + _this = _Recognizer.call(this, _extends({ + event: 'press', + pointers: 1, + time: 251, + // minimal time of the pointer to be pressed + threshold: 9 + }, options)) || this; + _this._timer = null; + _this._input = null; + return _this; + } + + var _proto = PressRecognizer.prototype; + + _proto.getTouchAction = function getTouchAction() { + return [TOUCH_ACTION_AUTO]; + }; + + _proto.process = function process(input) { + var _this2 = this; + + var options = this.options; + var validPointers = input.pointers.length === options.pointers; + var validMovement = input.distance < options.threshold; + var validTime = input.deltaTime > options.time; + this._input = input; // we only allow little movement + // and we've reached an end event, so a tap is possible + + if (!validMovement || !validPointers || input.eventType & (INPUT_END | INPUT_CANCEL) && !validTime) { + this.reset(); + } else if (input.eventType & INPUT_START) { + this.reset(); + this._timer = setTimeout(function () { + _this2.state = STATE_RECOGNIZED; + + _this2.tryEmit(); + }, options.time); + } else if (input.eventType & INPUT_END) { + return STATE_RECOGNIZED; + } + + return STATE_FAILED; + }; + + _proto.reset = function reset() { + clearTimeout(this._timer); + }; + + _proto.emit = function emit(input) { + if (this.state !== STATE_RECOGNIZED) { + return; + } + + if (input && input.eventType & INPUT_END) { + this.manager.emit(this.options.event + "up", input); + } else { + this._input.timeStamp = now(); + this.manager.emit(this.options.event, this._input); + } + }; + + return PressRecognizer; +}(Recognizer); + +/** + * @private + * wrap a method with a deprecation warning and stack trace + * @param {Function} method + * @param {String} name + * @param {String} message + * @returns {Function} A new function wrapping the supplied method. + */ +function deprecate(method, name, message) { + var deprecationMessage = "DEPRECATED METHOD: " + name + "\n" + message + " AT \n"; + return function () { + var e = new Error('get-stack-trace'); + var stack = e && e.stack ? e.stack.replace(/^[^\(]+?[\n$]/gm, '').replace(/^\s+at\s+/gm, '').replace(/^Object.\s*\(/gm, '{anonymous}()@') : 'Unknown Stack Trace'; + var log = window.console && (window.console.warn || window.console.log); + + if (log) { + log.call(window.console, deprecationMessage, stack); + } + + return method.apply(this, arguments); + }; +} + +/** + * @private + * extend object. + * means that properties in dest will be overwritten by the ones in src. + * @param {Object} dest + * @param {Object} src + * @param {Boolean} [merge=false] + * @returns {Object} dest + */ + +var extend = deprecate(function (dest, src, merge) { + var keys = Object.keys(src); + var i = 0; + + while (i < keys.length) { + if (!merge || merge && dest[keys[i]] === undefined) { + dest[keys[i]] = src[keys[i]]; + } + + i++; + } + + return dest; +}, 'extend', 'Use `assign`.'); + +/** + * @private + * merge the values from src in the dest. + * means that properties that exist in dest will not be overwritten by src + * @param {Object} dest + * @param {Object} src + * @returns {Object} dest + */ + +var merge = deprecate(function (dest, src) { + return extend(dest, src, true); +}, 'merge', 'Use `assign`.'); + +/** + * @private + * simple class inheritance + * @param {Function} child + * @param {Function} base + * @param {Object} [properties] + */ + +function inherit(child, base, properties) { + var baseP = base.prototype; + var childP; + childP = child.prototype = Object.create(baseP); + childP.constructor = child; + childP._super = baseP; + + if (properties) { + assign$1(childP, properties); + } +} + +/** + * @private + * simple function bind + * @param {Function} fn + * @param {Object} context + * @returns {Function} + */ +function bindFn(fn, context) { + return function boundFn() { + return fn.apply(context, arguments); + }; +} + +/** + * @private + * Simple way to create a manager with a default set of recognizers. + * @param {HTMLElement} element + * @param {Object} [options] + * @constructor + */ + +var Hammer = +/*#__PURE__*/ +function () { + var Hammer = + /** + * @private + * @const {string} + */ + function Hammer(element, options) { + if (options === void 0) { + options = {}; + } + + return new Manager(element, _extends({ + recognizers: [// RecognizerClass, options, [recognizeWith, ...], [requireFailure, ...] + [RotateRecognizer, { + enable: false + }], [PinchRecognizer, { + enable: false + }, ['rotate']], [SwipeRecognizer, { + direction: DIRECTION_HORIZONTAL + }], [PanRecognizer, { + direction: DIRECTION_HORIZONTAL + }, ['swipe']], [TapRecognizer], [TapRecognizer, { + event: 'doubletap', + taps: 2 + }, ['tap']], [PressRecognizer]] + }, options)); + }; + + Hammer.VERSION = "2.0.15"; + Hammer.DIRECTION_ALL = DIRECTION_ALL; + Hammer.DIRECTION_DOWN = DIRECTION_DOWN; + Hammer.DIRECTION_LEFT = DIRECTION_LEFT; + Hammer.DIRECTION_RIGHT = DIRECTION_RIGHT; + Hammer.DIRECTION_UP = DIRECTION_UP; + Hammer.DIRECTION_HORIZONTAL = DIRECTION_HORIZONTAL; + Hammer.DIRECTION_VERTICAL = DIRECTION_VERTICAL; + Hammer.DIRECTION_NONE = DIRECTION_NONE; + Hammer.DIRECTION_DOWN = DIRECTION_DOWN; + Hammer.INPUT_START = INPUT_START; + Hammer.INPUT_MOVE = INPUT_MOVE; + Hammer.INPUT_END = INPUT_END; + Hammer.INPUT_CANCEL = INPUT_CANCEL; + Hammer.STATE_POSSIBLE = STATE_POSSIBLE; + Hammer.STATE_BEGAN = STATE_BEGAN; + Hammer.STATE_CHANGED = STATE_CHANGED; + Hammer.STATE_ENDED = STATE_ENDED; + Hammer.STATE_RECOGNIZED = STATE_RECOGNIZED; + Hammer.STATE_CANCELLED = STATE_CANCELLED; + Hammer.STATE_FAILED = STATE_FAILED; + Hammer.Manager = Manager; + Hammer.Input = Input; + Hammer.TouchAction = TouchAction; + Hammer.TouchInput = TouchInput; + Hammer.MouseInput = MouseInput; + Hammer.PointerEventInput = PointerEventInput; + Hammer.TouchMouseInput = TouchMouseInput; + Hammer.SingleTouchInput = SingleTouchInput; + Hammer.Recognizer = Recognizer; + Hammer.AttrRecognizer = AttrRecognizer; + Hammer.Tap = TapRecognizer; + Hammer.Pan = PanRecognizer; + Hammer.Swipe = SwipeRecognizer; + Hammer.Pinch = PinchRecognizer; + Hammer.Rotate = RotateRecognizer; + Hammer.Press = PressRecognizer; + Hammer.on = addEventListeners; + Hammer.off = removeEventListeners; + Hammer.each = each; + Hammer.merge = merge; + Hammer.extend = extend; + Hammer.bindFn = bindFn; + Hammer.assign = assign$1; + Hammer.inherit = inherit; + Hammer.bindFn = bindFn; + Hammer.prefixed = prefixed; + Hammer.toArray = toArray; + Hammer.inArray = inArray; + Hammer.uniqueArray = uniqueArray; + Hammer.splitStr = splitStr; + Hammer.boolOrFn = boolOrFn; + Hammer.hasParent = hasParent; + Hammer.addEventListeners = addEventListeners; + Hammer.removeEventListeners = removeEventListeners; + Hammer.defaults = defaults; + return Hammer; +}(); + +export default Hammer; +export { INPUT_START, INPUT_MOVE, INPUT_END, INPUT_CANCEL, STATE_POSSIBLE, STATE_BEGAN, STATE_CHANGED, STATE_ENDED, STATE_RECOGNIZED, STATE_CANCELLED, STATE_FAILED, DIRECTION_NONE, DIRECTION_LEFT, DIRECTION_RIGHT, DIRECTION_UP, DIRECTION_DOWN, DIRECTION_HORIZONTAL, DIRECTION_VERTICAL, DIRECTION_ALL, Manager, Input, TouchAction, TouchInput, MouseInput, PointerEventInput, TouchMouseInput, SingleTouchInput, Recognizer, AttrRecognizer, TapRecognizer as Tap, PanRecognizer as Pan, SwipeRecognizer as Swipe, PinchRecognizer as Pinch, RotateRecognizer as Rotate, PressRecognizer as Press, addEventListeners as on, removeEventListeners as off, each, merge, extend, assign$1 as assign, inherit, bindFn, prefixed, toArray, inArray, uniqueArray, splitStr, boolOrFn, hasParent, addEventListeners, removeEventListeners, defaults }; +//# sourceMappingURL=hammer.esm.js.map diff --git a/node_modules/@egjs/hammerjs/dist/hammer.esm.js.map b/node_modules/@egjs/hammerjs/dist/hammer.esm.js.map new file mode 100644 index 0000000000000000000000000000000000000000..a39059b259755262acaa9c623314d8f5847ae889 --- /dev/null +++ b/node_modules/@egjs/hammerjs/dist/hammer.esm.js.map @@ -0,0 +1 @@ +{"version":3,"file":"hammer.esm.js","sources":["../src/utils/assign.js","../src/utils/utils-consts.js","../src/utils/prefixed.js","../src/browser.js","../src/touchactionjs/get-touchaction-props.js","../src/touchactionjs/touchaction-Consts.js","../src/inputjs/input-consts.js","../src/utils/each.js","../src/utils/bool-or-fn.js","../src/utils/in-str.js","../src/touchactionjs/clean-touch-actions.js","../src/touchactionjs/touchaction-constructor.js","../src/utils/has-parent.js","../src/inputjs/get-center.js","../src/inputjs/simple-clone-input-data.js","../src/inputjs/get-distance.js","../src/inputjs/get-angle.js","../src/inputjs/get-direction.js","../src/inputjs/compute-delta-xy.js","../src/inputjs/get-velocity.js","../src/inputjs/get-scale.js","../src/inputjs/get-rotation.js","../src/inputjs/compute-interval-input-data.js","../src/inputjs/compute-input-data.js","../src/inputjs/input-handler.js","../src/utils/split-str.js","../src/utils/add-event-listeners.js","../src/utils/remove-event-listeners.js","../src/utils/get-window-for-element.js","../src/inputjs/input-constructor.js","../src/utils/in-array.js","../src/input/pointerevent.js","../src/utils/to-array.js","../src/utils/unique-array.js","../src/input/touch.js","../src/input/mouse.js","../src/input/touchmouse.js","../src/inputjs/create-input-instance.js","../src/utils/invoke-array-arg.js","../src/recognizerjs/recognizer-consts.js","../src/utils/unique-id.js","../src/recognizerjs/get-recognizer-by-name-if-manager.js","../src/recognizerjs/state-str.js","../src/recognizerjs/recognizer-constructor.js","../src/defaults.js","../src/manager.js","../src/input/singletouch.js","../src/recognizers/attribute.js","../src/recognizers/tap.js","../src/recognizerjs/direction-str.js","../src/recognizers/pan.js","../src/recognizers/swipe.js","../src/recognizers/pinch.js","../src/recognizers/rotate.js","../src/recognizers/press.js","../src/utils/deprecate.js","../src/utils/extend.js","../src/utils/merge.js","../src/utils/inherit.js","../src/utils/bind-fn.js","../src/Hammer.js"],"sourcesContent":["/**\n * @private\n * extend object.\n * means that properties in dest will be overwritten by the ones in src.\n * @param {Object} target\n * @param {...Object} objects_to_assign\n * @returns {Object} target\n */\nlet assign;\nif (typeof Object.assign !== 'function') {\n assign = function assign(target) {\n if (target === undefined || target === null) {\n throw new TypeError('Cannot convert undefined or null to object');\n }\n\n let output = Object(target);\n for (let index = 1; index < arguments.length; index++) {\n const source = arguments[index];\n if (source !== undefined && source !== null) {\n for (const nextKey in source) {\n if (source.hasOwnProperty(nextKey)) {\n output[nextKey] = source[nextKey];\n }\n }\n }\n }\n return output;\n };\n} else {\n assign = Object.assign;\n}\n\nexport default assign;","\nconst VENDOR_PREFIXES = ['', 'webkit', 'Moz', 'MS', 'ms', 'o'];\nconst TEST_ELEMENT = typeof document === \"undefined\" ? {style: {}} : document.createElement('div');\n\nconst TYPE_FUNCTION = 'function';\n\nconst { round, abs } = Math;\nconst { now } = Date;\n\nexport {\n VENDOR_PREFIXES,\n TEST_ELEMENT,\n TYPE_FUNCTION,\n round,\n abs,\n now\n};\n","import { VENDOR_PREFIXES } from './utils-consts';\n/**\n * @private\n * get the prefixed property\n * @param {Object} obj\n * @param {String} property\n * @returns {String|Undefined} prefixed\n */\nexport default function prefixed(obj, property) {\n let prefix;\n let prop;\n let camelProp = property[0].toUpperCase() + property.slice(1);\n\n let i = 0;\n while (i < VENDOR_PREFIXES.length) {\n prefix = VENDOR_PREFIXES[i];\n prop = (prefix) ? prefix + camelProp : property;\n\n if (prop in obj) {\n return prop;\n }\n i++;\n }\n return undefined;\n}\n","/* eslint-disable no-new-func, no-nested-ternary */\n\nlet win;\n\nif (typeof window === \"undefined\") {\n\t// window is undefined in node.js\n\twin = {};\n} else {\n\twin = window;\n}\n/* eslint-enable no-new-func, no-nested-ternary */\n\nexport {win as window};\n","import prefixed from '../utils/prefixed';\nimport { TEST_ELEMENT } from '../utils/utils-consts';\nimport {window} from '../browser';\n\nexport const PREFIXED_TOUCH_ACTION = prefixed(TEST_ELEMENT.style, 'touchAction');\nexport const NATIVE_TOUCH_ACTION = PREFIXED_TOUCH_ACTION !== undefined;\n\nexport default function getTouchActionProps() {\n if (!NATIVE_TOUCH_ACTION) {\n return false;\n }\n let touchMap = {};\n let cssSupports = window.CSS && window.CSS.supports;\n ['auto', 'manipulation', 'pan-y', 'pan-x', 'pan-x pan-y', 'none'].forEach((val) => {\n\n // If css.supports is not supported but there is native touch-action assume it supports\n // all values. This is the case for IE 10 and 11.\n return touchMap[val] = cssSupports ? window.CSS.supports('touch-action', val) : true;\n });\n return touchMap;\n}\n","import getTouchActionProps from './get-touchaction-props';\n\n\n\n// magical touchAction value\nconst TOUCH_ACTION_COMPUTE = 'compute';\nconst TOUCH_ACTION_AUTO = 'auto';\nconst TOUCH_ACTION_MANIPULATION = 'manipulation'; // not implemented\nconst TOUCH_ACTION_NONE = 'none';\nconst TOUCH_ACTION_PAN_X = 'pan-x';\nconst TOUCH_ACTION_PAN_Y = 'pan-y';\nconst TOUCH_ACTION_MAP = getTouchActionProps();\n\nexport {\n TOUCH_ACTION_AUTO,\n TOUCH_ACTION_COMPUTE,\n TOUCH_ACTION_MANIPULATION,\n TOUCH_ACTION_NONE,\n TOUCH_ACTION_PAN_X,\n TOUCH_ACTION_PAN_Y,\n TOUCH_ACTION_MAP\n};\n","import prefixed from '../utils/prefixed';\nimport {window} from \"../browser\";\n\nconst MOBILE_REGEX = /mobile|tablet|ip(ad|hone|od)|android/i;\n\nconst SUPPORT_TOUCH = ('ontouchstart' in window);\nconst SUPPORT_POINTER_EVENTS = prefixed(window, 'PointerEvent') !== undefined;\nconst SUPPORT_ONLY_TOUCH = SUPPORT_TOUCH && MOBILE_REGEX.test(navigator.userAgent);\n\nconst INPUT_TYPE_TOUCH = 'touch';\nconst INPUT_TYPE_PEN = 'pen';\nconst INPUT_TYPE_MOUSE = 'mouse';\nconst INPUT_TYPE_KINECT = 'kinect';\n\nconst COMPUTE_INTERVAL = 25;\n\nconst INPUT_START = 1;\nconst INPUT_MOVE = 2;\nconst INPUT_END = 4;\nconst INPUT_CANCEL = 8;\n\nconst DIRECTION_NONE = 1;\nconst DIRECTION_LEFT = 2;\nconst DIRECTION_RIGHT = 4;\nconst DIRECTION_UP = 8;\nconst DIRECTION_DOWN = 16;\n\nconst DIRECTION_HORIZONTAL = DIRECTION_LEFT | DIRECTION_RIGHT;\nconst DIRECTION_VERTICAL = DIRECTION_UP | DIRECTION_DOWN;\nconst DIRECTION_ALL = DIRECTION_HORIZONTAL | DIRECTION_VERTICAL;\n\nconst PROPS_XY = ['x', 'y'];\nconst PROPS_CLIENT_XY = ['clientX', 'clientY'];\n\nexport {\n MOBILE_REGEX,\n SUPPORT_ONLY_TOUCH,\n SUPPORT_POINTER_EVENTS,\n SUPPORT_TOUCH,\n INPUT_TYPE_KINECT,\n INPUT_TYPE_MOUSE,\n INPUT_TYPE_PEN,\n INPUT_TYPE_TOUCH,\n COMPUTE_INTERVAL,\n INPUT_START,\n INPUT_MOVE,\n INPUT_END,\n INPUT_CANCEL,\n DIRECTION_NONE,\n DIRECTION_LEFT,\n DIRECTION_RIGHT,\n DIRECTION_UP,\n DIRECTION_DOWN,\n DIRECTION_HORIZONTAL,\n DIRECTION_VERTICAL,\n DIRECTION_ALL,\n PROPS_XY,\n PROPS_CLIENT_XY\n};\n","/**\n * @private\n * walk objects and arrays\n * @param {Object} obj\n * @param {Function} iterator\n * @param {Object} context\n */\nexport default function each(obj, iterator, context) {\n let i;\n\n if (!obj) {\n return;\n }\n\n if (obj.forEach) {\n obj.forEach(iterator, context);\n } else if (obj.length !== undefined) {\n i = 0;\n while (i < obj.length) {\n iterator.call(context, obj[i], i, obj);\n i++;\n }\n } else {\n for (i in obj) {\n obj.hasOwnProperty(i) && iterator.call(context, obj[i], i, obj);\n }\n }\n}\n","import { TYPE_FUNCTION } from './utils-consts';\n/**\n * @private\n * let a boolean value also be a function that must return a boolean\n * this first item in args will be used as the context\n * @param {Boolean|Function} val\n * @param {Array} [args]\n * @returns {Boolean}\n */\nexport default function boolOrFn(val, args) {\n if (typeof val === TYPE_FUNCTION) {\n return val.apply(args ? args[0] || undefined : undefined, args);\n }\n return val;\n}\n","/**\n * @private\n * small indexOf wrapper\n * @param {String} str\n * @param {String} find\n * @returns {Boolean} found\n */\nexport default function inStr(str, find) {\n return str.indexOf(find) > -1;\n}\n","import inStr from '../utils/in-str';\nimport {\n TOUCH_ACTION_NONE,\n TOUCH_ACTION_PAN_X,\n TOUCH_ACTION_PAN_Y,\n TOUCH_ACTION_MANIPULATION,\n TOUCH_ACTION_AUTO\n} from './touchaction-Consts';\n\n/**\n * @private\n * when the touchActions are collected they are not a valid value, so we need to clean things up. *\n * @param {String} actions\n * @returns {*}\n */\nexport default function cleanTouchActions(actions) {\n // none\n if (inStr(actions, TOUCH_ACTION_NONE)) {\n return TOUCH_ACTION_NONE;\n }\n\n let hasPanX = inStr(actions, TOUCH_ACTION_PAN_X);\n let hasPanY = inStr(actions, TOUCH_ACTION_PAN_Y);\n\n // if both pan-x and pan-y are set (different recognizers\n // for different directions, e.g. horizontal pan but vertical swipe?)\n // we need none (as otherwise with pan-x pan-y combined none of these\n // recognizers will work, since the browser would handle all panning\n if (hasPanX && hasPanY) {\n return TOUCH_ACTION_NONE;\n }\n\n // pan-x OR pan-y\n if (hasPanX || hasPanY) {\n return hasPanX ? TOUCH_ACTION_PAN_X : TOUCH_ACTION_PAN_Y;\n }\n\n // manipulation\n if (inStr(actions, TOUCH_ACTION_MANIPULATION)) {\n return TOUCH_ACTION_MANIPULATION;\n }\n\n return TOUCH_ACTION_AUTO;\n}\n","import {\n TOUCH_ACTION_COMPUTE,\n TOUCH_ACTION_MAP,\n TOUCH_ACTION_NONE,\n TOUCH_ACTION_PAN_X,\n TOUCH_ACTION_PAN_Y\n} from './touchaction-Consts';\nimport {\n NATIVE_TOUCH_ACTION,\n PREFIXED_TOUCH_ACTION,\n} from \"./get-touchaction-props\";\nimport {\n DIRECTION_VERTICAL,\n DIRECTION_HORIZONTAL\n} from '../inputjs/input-consts';\nimport each from '../utils/each';\nimport boolOrFn from '../utils/bool-or-fn';\nimport inStr from '../utils/in-str';\nimport cleanTouchActions from './clean-touch-actions';\n\n/**\n * @private\n * Touch Action\n * sets the touchAction property or uses the js alternative\n * @param {Manager} manager\n * @param {String} value\n * @constructor\n */\nexport default class TouchAction {\n constructor(manager, value) {\n this.manager = manager;\n this.set(value);\n }\n\n /**\n * @private\n * set the touchAction value on the element or enable the polyfill\n * @param {String} value\n */\n set(value) {\n // find out the touch-action by the event handlers\n if (value === TOUCH_ACTION_COMPUTE) {\n value = this.compute();\n }\n\n if (NATIVE_TOUCH_ACTION && this.manager.element.style && TOUCH_ACTION_MAP[value]) {\n this.manager.element.style[PREFIXED_TOUCH_ACTION] = value;\n }\n this.actions = value.toLowerCase().trim();\n }\n\n /**\n * @private\n * just re-set the touchAction value\n */\n update() {\n this.set(this.manager.options.touchAction);\n }\n\n /**\n * @private\n * compute the value for the touchAction property based on the recognizer's settings\n * @returns {String} value\n */\n compute() {\n let actions = [];\n each(this.manager.recognizers, (recognizer) => {\n if (boolOrFn(recognizer.options.enable, [recognizer])) {\n actions = actions.concat(recognizer.getTouchAction());\n }\n });\n return cleanTouchActions(actions.join(' '));\n }\n\n /**\n * @private\n * this method is called on each input cycle and provides the preventing of the browser behavior\n * @param {Object} input\n */\n preventDefaults(input) {\n let { srcEvent } = input;\n let direction = input.offsetDirection;\n\n // if the touch action did prevented once this session\n if (this.manager.session.prevented) {\n srcEvent.preventDefault();\n return;\n }\n\n let { actions } = this;\n let hasNone = inStr(actions, TOUCH_ACTION_NONE) && !TOUCH_ACTION_MAP[TOUCH_ACTION_NONE];\n let hasPanY = inStr(actions, TOUCH_ACTION_PAN_Y) && !TOUCH_ACTION_MAP[TOUCH_ACTION_PAN_Y];\n let hasPanX = inStr(actions, TOUCH_ACTION_PAN_X) && !TOUCH_ACTION_MAP[TOUCH_ACTION_PAN_X];\n\n if (hasNone) {\n // do not prevent defaults if this is a tap gesture\n let isTapPointer = input.pointers.length === 1;\n let isTapMovement = input.distance < 2;\n let isTapTouchTime = input.deltaTime < 250;\n\n if (isTapPointer && isTapMovement && isTapTouchTime) {\n return;\n }\n }\n\n if (hasPanX && hasPanY) {\n // `pan-x pan-y` means browser handles all scrolling/panning, do not prevent\n return;\n }\n\n if (hasNone ||\n (hasPanY && direction & DIRECTION_HORIZONTAL) ||\n (hasPanX && direction & DIRECTION_VERTICAL)) {\n return this.preventSrc(srcEvent);\n }\n }\n\n /**\n * @private\n * call preventDefault to prevent the browser's default behavior (scrolling in most cases)\n * @param {Object} srcEvent\n */\n preventSrc(srcEvent) {\n this.manager.session.prevented = true;\n srcEvent.preventDefault();\n }\n}\n","/**\n * @private\n * find if a node is in the given parent\n * @method hasParent\n * @param {HTMLElement} node\n * @param {HTMLElement} parent\n * @return {Boolean} found\n */\nexport default function hasParent(node, parent) {\n while (node) {\n if (node === parent) {\n return true;\n }\n node = node.parentNode;\n }\n return false;\n}\n","import { round } from '../utils/utils-consts';\n\n/**\n * @private\n * get the center of all the pointers\n * @param {Array} pointers\n * @return {Object} center contains `x` and `y` properties\n */\nexport default function getCenter(pointers) {\n let pointersLength = pointers.length;\n\n // no need to loop when only one touch\n if (pointersLength === 1) {\n return {\n x: round(pointers[0].clientX),\n y: round(pointers[0].clientY)\n };\n }\n\n let x = 0;\n let y = 0;\n let i = 0;\n while (i < pointersLength) {\n x += pointers[i].clientX;\n y += pointers[i].clientY;\n i++;\n }\n\n return {\n x: round(x / pointersLength),\n y: round(y / pointersLength)\n };\n}\n","import { now,round } from '../utils/utils-consts';\nimport getCenter from './get-center';\n\n/**\n * @private\n * create a simple clone from the input used for storage of firstInput and firstMultiple\n * @param {Object} input\n * @returns {Object} clonedInputData\n */\nexport default function simpleCloneInputData(input) {\n // make a simple copy of the pointers because we will get a reference if we don't\n // we only need clientXY for the calculations\n let pointers = [];\n let i = 0;\n while (i < input.pointers.length) {\n pointers[i] = {\n clientX: round(input.pointers[i].clientX),\n clientY: round(input.pointers[i].clientY)\n };\n i++;\n }\n\n return {\n timeStamp: now(),\n pointers,\n center: getCenter(pointers),\n deltaX: input.deltaX,\n deltaY: input.deltaY\n };\n}\n","import { PROPS_XY } from './input-consts';\n\n/**\n * @private\n * calculate the absolute distance between two points\n * @param {Object} p1 {x, y}\n * @param {Object} p2 {x, y}\n * @param {Array} [props] containing x and y keys\n * @return {Number} distance\n */\nexport default function getDistance(p1, p2, props) {\n if (!props) {\n props = PROPS_XY;\n }\n let x = p2[props[0]] - p1[props[0]];\n let y = p2[props[1]] - p1[props[1]];\n\n return Math.sqrt((x * x) + (y * y));\n}\n","import { PROPS_XY } from './input-consts';\n\n/**\n * @private\n * calculate the angle between two coordinates\n * @param {Object} p1\n * @param {Object} p2\n * @param {Array} [props] containing x and y keys\n * @return {Number} angle\n */\nexport default function getAngle(p1, p2, props) {\n if (!props) {\n props = PROPS_XY;\n }\n let x = p2[props[0]] - p1[props[0]];\n let y = p2[props[1]] - p1[props[1]];\n return Math.atan2(y, x) * 180 / Math.PI;\n}\n","import { abs } from '../utils/utils-consts';\nimport { DIRECTION_NONE,DIRECTION_LEFT,DIRECTION_RIGHT,DIRECTION_UP,DIRECTION_DOWN } from './input-consts';\n\n/**\n * @private\n * get the direction between two points\n * @param {Number} x\n * @param {Number} y\n * @return {Number} direction\n */\nexport default function getDirection(x, y) {\n if (x === y) {\n return DIRECTION_NONE;\n }\n\n if (abs(x) >= abs(y)) {\n return x < 0 ? DIRECTION_LEFT : DIRECTION_RIGHT;\n }\n return y < 0 ? DIRECTION_UP : DIRECTION_DOWN;\n}\n","import { INPUT_START, INPUT_END } from './input-consts';\n\nexport default function computeDeltaXY(session, input) {\n let { center } = input;\n // let { offsetDelta:offset = {}, prevDelta = {}, prevInput = {} } = session;\n // jscs throwing error on defalut destructured values and without defaults tests fail\n let offset = session.offsetDelta || {};\n let prevDelta = session.prevDelta || {};\n let prevInput = session.prevInput || {};\n\n if (input.eventType === INPUT_START || prevInput.eventType === INPUT_END) {\n prevDelta = session.prevDelta = {\n x: prevInput.deltaX || 0,\n y: prevInput.deltaY || 0\n };\n\n offset = session.offsetDelta = {\n x: center.x,\n y: center.y\n };\n }\n\n input.deltaX = prevDelta.x + (center.x - offset.x);\n input.deltaY = prevDelta.y + (center.y - offset.y);\n}\n","/**\n * @private\n * calculate the velocity between two points. unit is in px per ms.\n * @param {Number} deltaTime\n * @param {Number} x\n * @param {Number} y\n * @return {Object} velocity `x` and `y`\n */\nexport default function getVelocity(deltaTime, x, y) {\n return {\n x: x / deltaTime || 0,\n y: y / deltaTime || 0\n };\n}\n","import { PROPS_CLIENT_XY } from './input-consts';\nimport getDistance from './get-distance';\n/**\n * @private\n * calculate the scale factor between two pointersets\n * no scale is 1, and goes down to 0 when pinched together, and bigger when pinched out\n * @param {Array} start array of pointers\n * @param {Array} end array of pointers\n * @return {Number} scale\n */\nexport default function getScale(start, end) {\n return getDistance(end[0], end[1], PROPS_CLIENT_XY) / getDistance(start[0], start[1], PROPS_CLIENT_XY);\n}\n","import getAngle from './get-angle';\nimport { PROPS_CLIENT_XY } from './input-consts';\n\n/**\n * @private\n * calculate the rotation degrees between two pointersets\n * @param {Array} start array of pointers\n * @param {Array} end array of pointers\n * @return {Number} rotation\n */\nexport default function getRotation(start, end) {\n return getAngle(end[1], end[0], PROPS_CLIENT_XY) + getAngle(start[1], start[0], PROPS_CLIENT_XY);\n}\n","import { INPUT_CANCEL,COMPUTE_INTERVAL } from './input-consts';\nimport { abs } from '../utils/utils-consts';\nimport getVelocity from './get-velocity';\nimport getDirection from './get-direction';\n\n/**\n * @private\n * velocity is calculated every x ms\n * @param {Object} session\n * @param {Object} input\n */\nexport default function computeIntervalInputData(session, input) {\n let last = session.lastInterval || input;\n let deltaTime = input.timeStamp - last.timeStamp;\n let velocity;\n let velocityX;\n let velocityY;\n let direction;\n\n if (input.eventType !== INPUT_CANCEL && (deltaTime > COMPUTE_INTERVAL || last.velocity === undefined)) {\n let deltaX = input.deltaX - last.deltaX;\n let deltaY = input.deltaY - last.deltaY;\n\n let v = getVelocity(deltaTime, deltaX, deltaY);\n velocityX = v.x;\n velocityY = v.y;\n velocity = (abs(v.x) > abs(v.y)) ? v.x : v.y;\n direction = getDirection(deltaX, deltaY);\n\n session.lastInterval = input;\n } else {\n // use latest velocity info if it doesn't overtake a minimum period\n velocity = last.velocity;\n velocityX = last.velocityX;\n velocityY = last.velocityY;\n direction = last.direction;\n }\n\n input.velocity = velocity;\n input.velocityX = velocityX;\n input.velocityY = velocityY;\n input.direction = direction;\n}\n","import { now } from '../utils/utils-consts';\nimport { abs } from '../utils/utils-consts';\nimport hasParent from '../utils/has-parent';\nimport simpleCloneInputData from './simple-clone-input-data';\nimport getCenter from './get-center';\nimport getDistance from './get-distance';\nimport getAngle from './get-angle';\nimport getDirection from './get-direction';\nimport computeDeltaXY from './compute-delta-xy';\nimport getVelocity from './get-velocity';\nimport getScale from './get-scale';\nimport getRotation from './get-rotation';\nimport computeIntervalInputData from './compute-interval-input-data';\n\n/**\n* @private\n * extend the data with some usable properties like scale, rotate, velocity etc\n * @param {Object} manager\n * @param {Object} input\n */\nexport default function computeInputData(manager, input) {\n let { session } = manager;\n let { pointers } = input;\n let { length:pointersLength } = pointers;\n\n // store the first input to calculate the distance and direction\n if (!session.firstInput) {\n session.firstInput = simpleCloneInputData(input);\n }\n\n // to compute scale and rotation we need to store the multiple touches\n if (pointersLength > 1 && !session.firstMultiple) {\n session.firstMultiple = simpleCloneInputData(input);\n } else if (pointersLength === 1) {\n session.firstMultiple = false;\n }\n\n let { firstInput, firstMultiple } = session;\n let offsetCenter = firstMultiple ? firstMultiple.center : firstInput.center;\n\n let center = input.center = getCenter(pointers);\n input.timeStamp = now();\n input.deltaTime = input.timeStamp - firstInput.timeStamp;\n\n input.angle = getAngle(offsetCenter, center);\n input.distance = getDistance(offsetCenter, center);\n\n computeDeltaXY(session, input);\n input.offsetDirection = getDirection(input.deltaX, input.deltaY);\n\n let overallVelocity = getVelocity(input.deltaTime, input.deltaX, input.deltaY);\n input.overallVelocityX = overallVelocity.x;\n input.overallVelocityY = overallVelocity.y;\n input.overallVelocity = (abs(overallVelocity.x) > abs(overallVelocity.y)) ? overallVelocity.x : overallVelocity.y;\n\n input.scale = firstMultiple ? getScale(firstMultiple.pointers, pointers) : 1;\n input.rotation = firstMultiple ? getRotation(firstMultiple.pointers, pointers) : 0;\n\n input.maxPointers = !session.prevInput ? input.pointers.length : ((input.pointers.length >\n session.prevInput.maxPointers) ? input.pointers.length : session.prevInput.maxPointers);\n\n computeIntervalInputData(session, input);\n\n // find the correct target\n let target = manager.element;\n if (hasParent(input.srcEvent.target, target)) {\n target = input.srcEvent.target;\n }\n input.target = target;\n}\n","import { INPUT_START,INPUT_END,INPUT_CANCEL } from './input-consts';\nimport computeInputData from './compute-input-data';\n\n/**\n * @private\n * handle input events\n * @param {Manager} manager\n * @param {String} eventType\n * @param {Object} input\n */\nexport default function inputHandler(manager, eventType, input) {\n let pointersLen = input.pointers.length;\n let changedPointersLen = input.changedPointers.length;\n let isFirst = (eventType & INPUT_START && (pointersLen - changedPointersLen === 0));\n let isFinal = (eventType & (INPUT_END | INPUT_CANCEL) && (pointersLen - changedPointersLen === 0));\n\n input.isFirst = !!isFirst;\n input.isFinal = !!isFinal;\n\n if (isFirst) {\n manager.session = {};\n }\n\n // source event is the normalized value of the domEvents\n // like 'touchstart, mouseup, pointerdown'\n input.eventType = eventType;\n\n // compute scale, rotation etc\n computeInputData(manager, input);\n\n // emit secret event\n manager.emit('hammer.input', input);\n\n manager.recognize(input);\n manager.session.prevInput = input;\n}\n","/**\n * @private\n * split string on whitespace\n * @param {String} str\n * @returns {Array} words\n */\n\nexport default function splitStr(str) {\n return str.trim().split(/\\s+/g);\n}\n","import each from './each';\nimport splitStr from './split-str';\n/**\n * @private\n * addEventListener with multiple events at once\n * @param {EventTarget} target\n * @param {String} types\n * @param {Function} handler\n */\nexport default function addEventListeners(target, types, handler) {\n each(splitStr(types), (type) => {\n target.addEventListener(type, handler, false);\n });\n}\n","import each from './each';\nimport splitStr from './split-str';\n/**\n * @private\n * removeEventListener with multiple events at once\n * @param {EventTarget} target\n * @param {String} types\n * @param {Function} handler\n */\nexport default function removeEventListeners(target, types, handler) {\n each(splitStr(types), (type) => {\n target.removeEventListener(type, handler, false);\n });\n}\n","/**\n * @private\n * get the window object of an element\n * @param {HTMLElement} element\n * @returns {DocumentView|Window}\n */\nexport default function getWindowForElement(element) {\n let doc = element.ownerDocument || element;\n return (doc.defaultView || doc.parentWindow || window);\n}\n","import boolOrFn from '../utils/bool-or-fn';\nimport addEventListeners from '../utils/add-event-listeners';\nimport removeEventListeners from '../utils/remove-event-listeners';\nimport getWindowForElement from '../utils/get-window-for-element';\n\n/**\n * @private\n * create new input type manager\n * @param {Manager} manager\n * @param {Function} callback\n * @returns {Input}\n * @constructor\n */\nexport default class Input {\n constructor(manager, callback) {\n let self = this;\n this.manager = manager;\n this.callback = callback;\n this.element = manager.element;\n this.target = manager.options.inputTarget;\n\n // smaller wrapper around the handler, for the scope and the enabled state of the manager,\n // so when disabled the input events are completely bypassed.\n this.domHandler = function(ev) {\n if (boolOrFn(manager.options.enable, [manager])) {\n self.handler(ev);\n }\n };\n\n this.init();\n\n }\n /**\n * @private\n * should handle the inputEvent data and trigger the callback\n * @virtual\n */\n handler() { }\n\n /**\n * @private\n * bind the events\n */\n init() {\n this.evEl && addEventListeners(this.element, this.evEl, this.domHandler);\n this.evTarget && addEventListeners(this.target, this.evTarget, this.domHandler);\n this.evWin && addEventListeners(getWindowForElement(this.element), this.evWin, this.domHandler);\n }\n\n /**\n * @private\n * unbind the events\n */\n destroy() {\n this.evEl && removeEventListeners(this.element, this.evEl, this.domHandler);\n this.evTarget && removeEventListeners(this.target, this.evTarget, this.domHandler);\n this.evWin && removeEventListeners(getWindowForElement(this.element), this.evWin, this.domHandler);\n }\n}\n","/**\n * @private\n * find if a array contains the object using indexOf or a simple polyFill\n * @param {Array} src\n * @param {String} find\n * @param {String} [findByKey]\n * @return {Boolean|Number} false when not found, or the index\n */\nexport default function inArray(src, find, findByKey) {\n if (src.indexOf && !findByKey) {\n return src.indexOf(find);\n } else {\n let i = 0;\n while (i < src.length) {\n if ((findByKey && src[i][findByKey] == find) || (!findByKey && src[i] === find)) {// do not use === here, test fails\n return i;\n }\n i++;\n }\n return -1;\n }\n}\n","import {\n INPUT_START,\n INPUT_END,\n INPUT_CANCEL,\n INPUT_MOVE,\n INPUT_TYPE_TOUCH,\n INPUT_TYPE_MOUSE,\n INPUT_TYPE_PEN,\n INPUT_TYPE_KINECT\n} from '../inputjs/input-consts';\nimport {window} from \"../browser\";\nimport Input from '../inputjs/input-constructor';\nimport inArray from '../utils/in-array';\n\nconst POINTER_INPUT_MAP = {\n pointerdown: INPUT_START,\n pointermove: INPUT_MOVE,\n pointerup: INPUT_END,\n pointercancel: INPUT_CANCEL,\n pointerout: INPUT_CANCEL\n};\n\n// in IE10 the pointer types is defined as an enum\nconst IE10_POINTER_TYPE_ENUM = {\n 2: INPUT_TYPE_TOUCH,\n 3: INPUT_TYPE_PEN,\n 4: INPUT_TYPE_MOUSE,\n 5: INPUT_TYPE_KINECT // see https://twitter.com/jacobrossi/status/480596438489890816\n};\n\nlet POINTER_ELEMENT_EVENTS = 'pointerdown';\nlet POINTER_WINDOW_EVENTS = 'pointermove pointerup pointercancel';\n\n// IE10 has prefixed support, and case-sensitive\nif (window.MSPointerEvent && !window.PointerEvent) {\n POINTER_ELEMENT_EVENTS = 'MSPointerDown';\n POINTER_WINDOW_EVENTS = 'MSPointerMove MSPointerUp MSPointerCancel';\n}\n\n/**\n * @private\n * Pointer events input\n * @constructor\n * @extends Input\n */\nexport default class PointerEventInput extends Input {\n constructor() {\n var proto = PointerEventInput.prototype;\n\n proto.evEl = POINTER_ELEMENT_EVENTS;\n proto.evWin = POINTER_WINDOW_EVENTS;\n super(...arguments);\n this.store = (this.manager.session.pointerEvents = []);\n }\n\n /**\n * @private\n * handle mouse events\n * @param {Object} ev\n */\n handler(ev) {\n let { store } = this;\n let removePointer = false;\n\n let eventTypeNormalized = ev.type.toLowerCase().replace('ms', '');\n let eventType = POINTER_INPUT_MAP[eventTypeNormalized];\n let pointerType = IE10_POINTER_TYPE_ENUM[ev.pointerType] || ev.pointerType;\n\n let isTouch = (pointerType === INPUT_TYPE_TOUCH);\n\n // get index of the event in the store\n let storeIndex = inArray(store, ev.pointerId, 'pointerId');\n\n // start and mouse must be down\n if (eventType & INPUT_START && (ev.button === 0 || isTouch)) {\n if (storeIndex < 0) {\n store.push(ev);\n storeIndex = store.length - 1;\n }\n } else if (eventType & (INPUT_END | INPUT_CANCEL)) {\n removePointer = true;\n }\n\n // it not found, so the pointer hasn't been down (so it's probably a hover)\n if (storeIndex < 0) {\n return;\n }\n\n // update the event in the store\n store[storeIndex] = ev;\n\n this.callback(this.manager, eventType, {\n pointers: store,\n changedPointers: [ev],\n pointerType,\n srcEvent: ev\n });\n\n if (removePointer) {\n // remove from the store\n store.splice(storeIndex, 1);\n }\n }\n}\n","/**\n * @private\n * convert array-like objects to real arrays\n * @param {Object} obj\n * @returns {Array}\n */\nexport default function toArray(obj) {\n return Array.prototype.slice.call(obj, 0);\n}\n","import inArray from './in-array';\n\n/**\n * @private\n * unique array with objects based on a key (like 'id') or just by the array's value\n * @param {Array} src [{id:1},{id:2},{id:1}]\n * @param {String} [key]\n * @param {Boolean} [sort=False]\n * @returns {Array} [{id:1},{id:2}]\n */\nexport default function uniqueArray(src, key, sort) {\n let results = [];\n let values = [];\n let i = 0;\n\n while (i < src.length) {\n let val = key ? src[i][key] : src[i];\n if (inArray(values, val) < 0) {\n results.push(src[i]);\n }\n values[i] = val;\n i++;\n }\n\n if (sort) {\n if (!key) {\n results = results.sort();\n } else {\n results = results.sort((a, b) => {\n return a[key] > b[key];\n });\n }\n }\n\n return results;\n}\n","import {\n INPUT_START,\n INPUT_MOVE,\n INPUT_END,\n INPUT_CANCEL,\n INPUT_TYPE_TOUCH\n} from '../inputjs/input-consts';\nimport Input from '../inputjs/input-constructor';\nimport toArray from '../utils/to-array';\nimport hasParent from '../utils/has-parent';\nimport uniqueArray from '../utils/unique-array';\n\nconst TOUCH_INPUT_MAP = {\n touchstart: INPUT_START,\n touchmove: INPUT_MOVE,\n touchend: INPUT_END,\n touchcancel: INPUT_CANCEL\n};\n\nconst TOUCH_TARGET_EVENTS = 'touchstart touchmove touchend touchcancel';\n\n/**\n * @private\n * Multi-user touch events input\n * @constructor\n * @extends Input\n */\nexport default class TouchInput extends Input {\n constructor() {\n TouchInput.prototype.evTarget = TOUCH_TARGET_EVENTS;\n super(...arguments);\n this.targetIds = {};\n // this.evTarget = TOUCH_TARGET_EVENTS;\n }\n handler(ev) {\n let type = TOUCH_INPUT_MAP[ev.type];\n let touches = getTouches.call(this, ev, type);\n if (!touches) {\n return;\n }\n\n this.callback(this.manager, type, {\n pointers: touches[0],\n changedPointers: touches[1],\n pointerType: INPUT_TYPE_TOUCH,\n srcEvent: ev\n });\n }\n}\n\n/**\n * @private\n * @this {TouchInput}\n * @param {Object} ev\n * @param {Number} type flag\n * @returns {undefined|Array} [all, changed]\n */\nfunction getTouches(ev, type) {\n let allTouches = toArray(ev.touches);\n let { targetIds } = this;\n\n // when there is only one touch, the process can be simplified\n if (type & (INPUT_START | INPUT_MOVE) && allTouches.length === 1) {\n targetIds[allTouches[0].identifier] = true;\n return [allTouches, allTouches];\n }\n\n let i;\n let targetTouches;\n let changedTouches = toArray(ev.changedTouches);\n let changedTargetTouches = [];\n let { target } = this;\n\n // get target touches from touches\n targetTouches = allTouches.filter((touch) => {\n return hasParent(touch.target, target);\n });\n\n // collect touches\n if (type === INPUT_START) {\n i = 0;\n while (i < targetTouches.length) {\n targetIds[targetTouches[i].identifier] = true;\n i++;\n }\n }\n\n // filter changed touches to only contain touches that exist in the collected target ids\n i = 0;\n while (i < changedTouches.length) {\n if (targetIds[changedTouches[i].identifier]) {\n changedTargetTouches.push(changedTouches[i]);\n }\n\n // cleanup removed touches\n if (type & (INPUT_END | INPUT_CANCEL)) {\n delete targetIds[changedTouches[i].identifier];\n }\n i++;\n }\n\n if (!changedTargetTouches.length) {\n return;\n }\n\n return [\n // merge targetTouches with changedTargetTouches so it contains ALL touches, including 'end' and 'cancel'\n uniqueArray(targetTouches.concat(changedTargetTouches), 'identifier', true),\n changedTargetTouches\n ];\n}\n","import {\n INPUT_START,\n INPUT_MOVE,\n INPUT_END,\n INPUT_TYPE_MOUSE\n} from '../inputjs/input-consts';\nimport Input from '../inputjs/input-constructor';\n\nconst MOUSE_INPUT_MAP = {\n mousedown: INPUT_START,\n mousemove: INPUT_MOVE,\n mouseup: INPUT_END\n};\n\nconst MOUSE_ELEMENT_EVENTS = 'mousedown';\nconst MOUSE_WINDOW_EVENTS = 'mousemove mouseup';\n\n/**\n * @private\n * Mouse events input\n * @constructor\n * @extends Input\n */\nexport default class MouseInput extends Input {\n constructor() {\n var proto = MouseInput.prototype;\n proto.evEl = MOUSE_ELEMENT_EVENTS;\n proto.evWin = MOUSE_WINDOW_EVENTS;\n\n super(...arguments);\n this.pressed = false; // mousedown state\n }\n\n /**\n * @private\n * handle mouse events\n * @param {Object} ev\n */\n handler(ev) {\n let eventType = MOUSE_INPUT_MAP[ev.type];\n\n // on start we want to have the left mouse button down\n if (eventType & INPUT_START && ev.button === 0) {\n this.pressed = true;\n }\n\n if (eventType & INPUT_MOVE && ev.which !== 1) {\n eventType = INPUT_END;\n }\n\n // mouse must be down\n if (!this.pressed) {\n return;\n }\n\n if (eventType & INPUT_END) {\n this.pressed = false;\n }\n\n this.callback(this.manager, eventType, {\n pointers: [ev],\n changedPointers: [ev],\n pointerType: INPUT_TYPE_MOUSE,\n srcEvent: ev\n });\n }\n}\n","import Input from \"../inputjs/input-constructor\";\nimport TouchInput from \"./touch\";\nimport MouseInput from \"./mouse\";\nimport {\n\tINPUT_START,\n\tINPUT_END,\n\tINPUT_CANCEL,\n\tINPUT_TYPE_TOUCH,\n\tINPUT_TYPE_MOUSE,\n} from \"../inputjs/input-consts\";\n\n/**\n * @private\n * Combined touch and mouse input\n *\n * Touch has a higher priority then mouse, and while touching no mouse events are allowed.\n * This because touch devices also emit mouse events while doing a touch.\n *\n * @constructor\n * @extends Input\n */\n\nconst DEDUP_TIMEOUT = 2500;\nconst DEDUP_DISTANCE = 25;\n\nfunction setLastTouch(eventData) {\n\tconst { changedPointers: [touch] } = eventData;\n\n\tif (touch.identifier === this.primaryTouch) {\n\t\tconst lastTouch = { x: touch.clientX, y: touch.clientY };\n\t\tconst lts = this.lastTouches;\n\n\t\tthis.lastTouches.push(lastTouch);\n\n\n\t\tconst removeLastTouch = function() {\n\t\t\tconst i = lts.indexOf(lastTouch);\n\n\t\t\tif (i > -1) {\n\t\t\t\tlts.splice(i, 1);\n\t\t\t}\n\t\t};\n\n\t\tsetTimeout(removeLastTouch, DEDUP_TIMEOUT);\n\t}\n}\n\n\nfunction recordTouches(eventType, eventData) {\n\tif (eventType & INPUT_START) {\n\t\tthis.primaryTouch = eventData.changedPointers[0].identifier;\n\t\tsetLastTouch.call(this, eventData);\n\t} else if (eventType & (INPUT_END | INPUT_CANCEL)) {\n\t\tsetLastTouch.call(this, eventData);\n\t}\n}\nfunction isSyntheticEvent(eventData) {\n\tconst x = eventData.srcEvent.clientX;\n\tconst y = eventData.srcEvent.clientY;\n\n\tfor (let i = 0; i < this.lastTouches.length; i++) {\n\t\tconst t = this.lastTouches[i];\n\t\tconst dx = Math.abs(x - t.x);\n\t\tconst dy = Math.abs(y - t.y);\n\n\t\tif (dx <= DEDUP_DISTANCE && dy <= DEDUP_DISTANCE) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n}\n\n\nexport default class TouchMouseInput extends Input {\n\tconstructor(manager, callback) {\n\t\tsuper(manager, callback);\n\n\t\tthis.touch = new TouchInput(this.manager, this.handler);\n\t\tthis.mouse = new MouseInput(this.manager, this.handler);\n\t\tthis.primaryTouch = null;\n\t\tthis.lastTouches = [];\n\t}\n\n\t/**\n\t * @private\n\t * handle mouse and touch events\n\t * @param {Hammer} manager\n\t * @param {String} inputEvent\n\t * @param {Object} inputData\n\t */\n\thandler = (manager, inputEvent, inputData) => {\n\t\tconst isTouch = (inputData.pointerType === INPUT_TYPE_TOUCH);\n\t\tconst isMouse = (inputData.pointerType === INPUT_TYPE_MOUSE);\n\n\t\tif (isMouse && inputData.sourceCapabilities && inputData.sourceCapabilities.firesTouchEvents) {\n\t\t\treturn;\n\t\t}\n\n\t\t// when we're in a touch event, record touches to de-dupe synthetic mouse event\n\t\tif (isTouch) {\n\t\t\trecordTouches.call(this, inputEvent, inputData);\n\t\t} else if (isMouse && isSyntheticEvent.call(this, inputData)) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.callback(manager, inputEvent, inputData);\n\t}\n\n\t/**\n\t * @private\n\t * remove the event listeners\n\t */\n\tdestroy() {\n\t\tthis.touch.destroy();\n\t\tthis.mouse.destroy();\n\t}\n}\n","import { SUPPORT_POINTER_EVENTS,SUPPORT_ONLY_TOUCH,SUPPORT_TOUCH } from './input-consts';\nimport inputHandler from './input-handler';\nimport PointerEventInput from '../input/pointerevent';\nimport TouchInput from '../input/touch';\nimport MouseInput from '../input/mouse';\nimport TouchMouseInput from '../input/touchmouse';\n\n/**\n * @private\n * create new input type manager\n * called by the Manager constructor\n * @param {Hammer} manager\n * @returns {Input}\n */\nexport default function createInputInstance(manager) {\n let Type;\n // let inputClass = manager.options.inputClass;\n let { options:{ inputClass } } = manager;\n if (inputClass) {\n Type = inputClass;\n } else if (SUPPORT_POINTER_EVENTS) {\n Type = PointerEventInput;\n } else if (SUPPORT_ONLY_TOUCH) {\n Type = TouchInput;\n } else if (!SUPPORT_TOUCH) {\n Type = MouseInput;\n } else {\n Type = TouchMouseInput;\n }\n return new (Type)(manager, inputHandler);\n}\n","import each from './each';\n/**\n * @private\n * if the argument is an array, we want to execute the fn on each entry\n * if it aint an array we don't want to do a thing.\n * this is used by all the methods that accept a single and array argument.\n * @param {*|Array} arg\n * @param {String} fn\n * @param {Object} [context]\n * @returns {Boolean}\n */\nexport default function invokeArrayArg(arg, fn, context) {\n if (Array.isArray(arg)) {\n each(arg, context[fn], context);\n return true;\n }\n return false;\n}\n","const STATE_POSSIBLE = 1;\nconst STATE_BEGAN = 2;\nconst STATE_CHANGED = 4;\nconst STATE_ENDED = 8;\nconst STATE_RECOGNIZED = STATE_ENDED;\nconst STATE_CANCELLED = 16;\nconst STATE_FAILED = 32;\n\nexport {\n STATE_POSSIBLE,\n STATE_BEGAN,\n STATE_CHANGED,\n STATE_ENDED,\n STATE_RECOGNIZED,\n STATE_CANCELLED,\n STATE_FAILED\n};\n","/**\n * @private\n * get a unique id\n * @returns {number} uniqueId\n */\nlet _uniqueId = 1;\nexport default function uniqueId() {\n return _uniqueId++;\n}\n","/**\n * @private\n * get a recognizer by name if it is bound to a manager\n * @param {Recognizer|String} otherRecognizer\n * @param {Recognizer} recognizer\n * @returns {Recognizer}\n */\nexport default function getRecognizerByNameIfManager(otherRecognizer, recognizer) {\n let { manager } = recognizer;\n if (manager) {\n return manager.get(otherRecognizer);\n }\n return otherRecognizer;\n}\n","import {\n STATE_CANCELLED,\n STATE_ENDED,\n STATE_CHANGED,\n STATE_BEGAN\n} from './recognizer-consts';\n\n/**\n * @private\n * get a usable string, used as event postfix\n * @param {constant} state\n * @returns {String} state\n */\nexport default function stateStr(state) {\n if (state & STATE_CANCELLED) {\n return 'cancel';\n } else if (state & STATE_ENDED) {\n return 'end';\n } else if (state & STATE_CHANGED) {\n return 'move';\n } else if (state & STATE_BEGAN) {\n return 'start';\n }\n return '';\n}\n","import {\n STATE_POSSIBLE,\n STATE_ENDED,\n STATE_FAILED,\n STATE_RECOGNIZED,\n STATE_CANCELLED,\n STATE_BEGAN,\n STATE_CHANGED\n} from './recognizer-consts';\nimport assign from '../utils/assign';\nimport uniqueId from '../utils/unique-id';\nimport invokeArrayArg from '../utils/invoke-array-arg';\nimport inArray from '../utils/in-array';\nimport boolOrFn from '../utils/bool-or-fn';\nimport getRecognizerByNameIfManager from './get-recognizer-by-name-if-manager';\nimport stateStr from './state-str';\n\n/**\n * @private\n * Recognizer flow explained; *\n * All recognizers have the initial state of POSSIBLE when a input session starts.\n * The definition of a input session is from the first input until the last input, with all it's movement in it. *\n * Example session for mouse-input: mousedown -> mousemove -> mouseup\n *\n * On each recognizing cycle (see Manager.recognize) the .recognize() method is executed\n * which determines with state it should be.\n *\n * If the recognizer has the state FAILED, CANCELLED or RECOGNIZED (equals ENDED), it is reset to\n * POSSIBLE to give it another change on the next cycle.\n *\n * Possible\n * |\n * +-----+---------------+\n * | |\n * +-----+-----+ |\n * | | |\n * Failed Cancelled |\n * +-------+------+\n * | |\n * Recognized Began\n * |\n * Changed\n * |\n * Ended/Recognized\n */\n\n/**\n * @private\n * Recognizer\n * Every recognizer needs to extend from this class.\n * @constructor\n * @param {Object} options\n */\nexport default class Recognizer {\n constructor(options = {}) {\n this.options = {\n enable: true,\n ...options,\n };\n\n this.id = uniqueId();\n\n this.manager = null;\n\n // default is enable true\n this.state = STATE_POSSIBLE;\n this.simultaneous = {};\n this.requireFail = [];\n }\n\n /**\n * @private\n * set options\n * @param {Object} options\n * @return {Recognizer}\n */\n set(options) {\n assign(this.options, options);\n\n // also update the touchAction, in case something changed about the directions/enabled state\n this.manager && this.manager.touchAction.update();\n return this;\n }\n\n /**\n * @private\n * recognize simultaneous with an other recognizer.\n * @param {Recognizer} otherRecognizer\n * @returns {Recognizer} this\n */\n recognizeWith(otherRecognizer) {\n if (invokeArrayArg(otherRecognizer, 'recognizeWith', this)) {\n return this;\n }\n\n let { simultaneous } = this;\n otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this);\n if (!simultaneous[otherRecognizer.id]) {\n simultaneous[otherRecognizer.id] = otherRecognizer;\n otherRecognizer.recognizeWith(this);\n }\n return this;\n }\n\n /**\n * @private\n * drop the simultaneous link. it doesnt remove the link on the other recognizer.\n * @param {Recognizer} otherRecognizer\n * @returns {Recognizer} this\n */\n dropRecognizeWith(otherRecognizer) {\n if (invokeArrayArg(otherRecognizer, 'dropRecognizeWith', this)) {\n return this;\n }\n\n otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this);\n delete this.simultaneous[otherRecognizer.id];\n return this;\n }\n\n /**\n * @private\n * recognizer can only run when an other is failing\n * @param {Recognizer} otherRecognizer\n * @returns {Recognizer} this\n */\n requireFailure(otherRecognizer) {\n if (invokeArrayArg(otherRecognizer, 'requireFailure', this)) {\n return this;\n }\n\n let { requireFail } = this;\n otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this);\n if (inArray(requireFail, otherRecognizer) === -1) {\n requireFail.push(otherRecognizer);\n otherRecognizer.requireFailure(this);\n }\n return this;\n }\n\n /**\n * @private\n * drop the requireFailure link. it does not remove the link on the other recognizer.\n * @param {Recognizer} otherRecognizer\n * @returns {Recognizer} this\n */\n dropRequireFailure(otherRecognizer) {\n if (invokeArrayArg(otherRecognizer, 'dropRequireFailure', this)) {\n return this;\n }\n\n otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this);\n let index = inArray(this.requireFail, otherRecognizer);\n if (index > -1) {\n this.requireFail.splice(index, 1);\n }\n return this;\n }\n\n /**\n * @private\n * has require failures boolean\n * @returns {boolean}\n */\n hasRequireFailures() {\n return this.requireFail.length > 0;\n }\n\n /**\n * @private\n * if the recognizer can recognize simultaneous with an other recognizer\n * @param {Recognizer} otherRecognizer\n * @returns {Boolean}\n */\n canRecognizeWith(otherRecognizer) {\n return !!this.simultaneous[otherRecognizer.id];\n }\n\n /**\n * @private\n * You should use `tryEmit` instead of `emit` directly to check\n * that all the needed recognizers has failed before emitting.\n * @param {Object} input\n */\n emit(input) {\n let self = this;\n let { state } = this;\n\n function emit(event) {\n self.manager.emit(event, input);\n }\n\n // 'panstart' and 'panmove'\n if (state < STATE_ENDED) {\n emit(self.options.event + stateStr(state));\n }\n\n emit(self.options.event); // simple 'eventName' events\n\n if (input.additionalEvent) { // additional event(panleft, panright, pinchin, pinchout...)\n emit(input.additionalEvent);\n }\n\n // panend and pancancel\n if (state >= STATE_ENDED) {\n emit(self.options.event + stateStr(state));\n }\n }\n\n /**\n * @private\n * Check that all the require failure recognizers has failed,\n * if true, it emits a gesture event,\n * otherwise, setup the state to FAILED.\n * @param {Object} input\n */\n tryEmit(input) {\n if (this.canEmit()) {\n return this.emit(input);\n }\n // it's failing anyway\n this.state = STATE_FAILED;\n }\n\n /**\n * @private\n * can we emit?\n * @returns {boolean}\n */\n canEmit() {\n let i = 0;\n while (i < this.requireFail.length) {\n if (!(this.requireFail[i].state & (STATE_FAILED | STATE_POSSIBLE))) {\n return false;\n }\n i++;\n }\n return true;\n }\n\n /**\n * @private\n * update the recognizer\n * @param {Object} inputData\n */\n recognize(inputData) {\n // make a new copy of the inputData\n // so we can change the inputData without messing up the other recognizers\n let inputDataClone = assign({}, inputData);\n\n // is is enabled and allow recognizing?\n if (!boolOrFn(this.options.enable, [this, inputDataClone])) {\n this.reset();\n this.state = STATE_FAILED;\n return;\n }\n\n // reset when we've reached the end\n if (this.state & (STATE_RECOGNIZED | STATE_CANCELLED | STATE_FAILED)) {\n this.state = STATE_POSSIBLE;\n }\n\n this.state = this.process(inputDataClone);\n\n // the recognizer has recognized a gesture\n // so trigger an event\n if (this.state & (STATE_BEGAN | STATE_CHANGED | STATE_ENDED | STATE_CANCELLED)) {\n this.tryEmit(inputDataClone);\n }\n }\n\n /**\n * @private\n * return the state of the recognizer\n * the actual recognizing happens in this method\n * @virtual\n * @param {Object} inputData\n * @returns {constant} STATE\n */\n\n /* jshint ignore:start */\n process(inputData) { }\n /* jshint ignore:end */\n\n /**\n * @private\n * return the preferred touch-action\n * @virtual\n * @returns {Array}\n */\n getTouchAction() { }\n\n /**\n * @private\n * called when the gesture isn't allowed to recognize\n * like when another is being recognized or it is disabled\n * @virtual\n */\n reset() { }\n}","import { TOUCH_ACTION_COMPUTE } from \"./touchactionjs/touchaction-Consts\";\n\nexport default {\n\t/**\n\t * @private\n\t * set if DOM events are being triggered.\n\t * But this is slower and unused by simple implementations, so disabled by default.\n\t * @type {Boolean}\n\t * @default false\n\t */\n\tdomEvents: false,\n\n\t/**\n\t * @private\n\t * The value for the touchAction property/fallback.\n\t * When set to `compute` it will magically set the correct value based on the added recognizers.\n\t * @type {String}\n\t * @default compute\n\t */\n\ttouchAction: TOUCH_ACTION_COMPUTE,\n\n\t/**\n\t * @private\n\t * @type {Boolean}\n\t * @default true\n\t */\n\tenable: true,\n\n\t/**\n\t * @private\n\t * EXPERIMENTAL FEATURE -- can be removed/changed\n\t * Change the parent input target element.\n\t * If Null, then it is being set the to main element.\n\t * @type {Null|EventTarget}\n\t * @default null\n\t */\n\tinputTarget: null,\n\n\t/**\n\t * @private\n\t * force an input class\n\t * @type {Null|Function}\n\t * @default null\n\t */\n\tinputClass: null,\n\n\t/**\n\t * @private\n\t * Default recognizer setup when calling `Hammer()`\n\t * When creating a new Manager these will be skipped.\n\t * @type {Array}\n\t */\n\tpreset: [],\n\n\t/**\n\t * @private\n\t * Some CSS properties can be used to improve the working of Hammer.\n\t * Add them to this method and they will be set when creating a new Manager.\n\t * @namespace\n\t */\n\tcssProps: {\n\t\t/**\n\t\t * @private\n\t\t * Disables text selection to improve the dragging gesture. Mainly for desktop browsers.\n\t\t * @type {String}\n\t\t * @default 'none'\n\t\t */\n\t\tuserSelect: \"none\",\n\n\t\t/**\n\t\t * @private\n\t\t * Disable the Windows Phone grippers when pressing an element.\n\t\t * @type {String}\n\t\t * @default 'none'\n\t\t */\n\t\ttouchSelect: \"none\",\n\n\t\t/**\n\t\t * @private\n\t\t * Disables the default callout shown when you touch and hold a touch target.\n\t\t * On iOS, when you touch and hold a touch target such as a link, Safari displays\n\t\t * a callout containing information about the link. This property allows you to disable that callout.\n\t\t * @type {String}\n\t\t * @default 'none'\n\t\t */\n\t\ttouchCallout: \"none\",\n\n\t\t/**\n\t\t * @private\n\t\t * Specifies whether zooming is enabled. Used by IE10>\n\t\t * @type {String}\n\t\t * @default 'none'\n\t\t */\n\t\tcontentZooming: \"none\",\n\n\t\t/**\n\t\t * @private\n\t\t * Specifies that an entire element should be draggable instead of its contents. Mainly for desktop browsers.\n\t\t * @type {String}\n\t\t * @default 'none'\n\t\t */\n\t\tuserDrag: \"none\",\n\n\t\t/**\n\t\t * @private\n\t\t * Overrides the highlight color shown when the user taps a link or a JavaScript\n\t\t * clickable element in iOS. This property obeys the alpha value, if specified.\n\t\t * @type {String}\n\t\t * @default 'rgba(0,0,0,0)'\n\t\t */\n\t\ttapHighlightColor: \"rgba(0,0,0,0)\",\n\t},\n};\n","import assign from \"./utils/assign\";\nimport TouchAction from \"./touchactionjs/touchaction-constructor\";\nimport createInputInstance from \"./inputjs/create-input-instance\";\nimport each from \"./utils/each\";\nimport inArray from \"./utils/in-array\";\nimport invokeArrayArg from \"./utils/invoke-array-arg\";\nimport splitStr from \"./utils/split-str\";\nimport prefixed from \"./utils/prefixed\";\nimport Recognizer from \"./recognizerjs/recognizer-constructor\";\nimport {\n STATE_BEGAN,\n STATE_ENDED,\n STATE_CHANGED,\n STATE_RECOGNIZED,\n} from \"./recognizerjs/recognizer-consts\";\nimport defaults from \"./defaults\";\n\nconst STOP = 1;\nconst FORCED_STOP = 2;\n\n\n/**\n * @private\n * add/remove the css properties as defined in manager.options.cssProps\n * @param {Manager} manager\n * @param {Boolean} add\n */\nfunction toggleCssProps(manager, add) {\n const { element } = manager;\n\n if (!element.style) {\n return;\n }\n let prop;\n\n each(manager.options.cssProps, (value, name) => {\n prop = prefixed(element.style, name);\n if (add) {\n manager.oldCssProps[prop] = element.style[prop];\n element.style[prop] = value;\n } else {\n element.style[prop] = manager.oldCssProps[prop] || \"\";\n }\n });\n if (!add) {\n manager.oldCssProps = {};\n }\n}\n\n/**\n * @private\n * trigger dom event\n * @param {String} event\n * @param {Object} data\n */\nfunction triggerDomEvent(event, data) {\n const gestureEvent = document.createEvent(\"Event\");\n\n gestureEvent.initEvent(event, true, true);\n gestureEvent.gesture = data;\n data.target.dispatchEvent(gestureEvent);\n}\n\n\n/**\n* @private\n * Manager\n * @param {HTMLElement} element\n * @param {Object} [options]\n * @constructor\n */\nexport default class Manager {\n constructor(element, options) {\n this.options = assign({}, defaults, options || {});\n\n this.options.inputTarget = this.options.inputTarget || element;\n\n this.handlers = {};\n this.session = {};\n this.recognizers = [];\n this.oldCssProps = {};\n\n this.element = element;\n this.input = createInputInstance(this);\n this.touchAction = new TouchAction(this, this.options.touchAction);\n\n toggleCssProps(this, true);\n\n each(this.options.recognizers, item => {\n const recognizer = this.add(new (item[0])(item[1]));\n\n item[2] && recognizer.recognizeWith(item[2]);\n item[3] && recognizer.requireFailure(item[3]);\n }, this);\n }\n\n\t/**\n\t * @private\n\t * set options\n\t * @param {Object} options\n\t * @returns {Manager}\n\t */\n set(options) {\n assign(this.options, options);\n\n // Options that need a little more setup\n if (options.touchAction) {\n this.touchAction.update();\n }\n if (options.inputTarget) {\n // Clean up existing event listeners and reinitialize\n this.input.destroy();\n this.input.target = options.inputTarget;\n this.input.init();\n }\n return this;\n }\n\n\t/**\n\t * @private\n\t * stop recognizing for this session.\n\t * This session will be discarded, when a new [input]start event is fired.\n\t * When forced, the recognizer cycle is stopped immediately.\n\t * @param {Boolean} [force]\n\t */\n stop(force) {\n this.session.stopped = force ? FORCED_STOP : STOP;\n }\n\n\t/**\n\t * @private\n\t * run the recognizers!\n\t * called by the inputHandler function on every movement of the pointers (touches)\n\t * it walks through all the recognizers and tries to detect the gesture that is being made\n\t * @param {Object} inputData\n\t */\n recognize(inputData) {\n const { session } = this;\n\n if (session.stopped) {\n return;\n }\n\n // run the touch-action polyfill\n this.touchAction.preventDefaults(inputData);\n\n let recognizer;\n const { recognizers } = this;\n\n // this holds the recognizer that is being recognized.\n // so the recognizer's state needs to be BEGAN, CHANGED, ENDED or RECOGNIZED\n // if no recognizer is detecting a thing, it is set to `null`\n let { curRecognizer } = session;\n\n // reset when the last recognizer is recognized\n // or when we're in a new session\n if (!curRecognizer || (curRecognizer && curRecognizer.state & STATE_RECOGNIZED)) {\n session.curRecognizer = null;\n curRecognizer = null;\n }\n\n let i = 0;\n\n while (i < recognizers.length) {\n recognizer = recognizers[i];\n\n // find out if we are allowed try to recognize the input for this one.\n // 1. allow if the session is NOT forced stopped (see the .stop() method)\n // 2. allow if we still haven't recognized a gesture in this session, or the this recognizer is the one\n // that is being recognized.\n // 3. allow if the recognizer is allowed to run simultaneous with the current recognized recognizer.\n // this can be setup with the `recognizeWith()` method on the recognizer.\n if (session.stopped !== FORCED_STOP && (// 1\n !curRecognizer || recognizer === curRecognizer || // 2\n recognizer.canRecognizeWith(curRecognizer))) { // 3\n recognizer.recognize(inputData);\n } else {\n recognizer.reset();\n }\n\n // if the recognizer has been recognizing the input as a valid gesture, we want to store this one as the\n // current active recognizer. but only if we don't already have an active recognizer\n if (!curRecognizer && recognizer.state & (STATE_BEGAN | STATE_CHANGED | STATE_ENDED)) {\n session.curRecognizer = recognizer;\n curRecognizer = recognizer;\n }\n i++;\n }\n }\n\n\t/**\n\t * @private\n\t * get a recognizer by its event name.\n\t * @param {Recognizer|String} recognizer\n\t * @returns {Recognizer|Null}\n\t */\n get(recognizer) {\n if (recognizer instanceof Recognizer) {\n return recognizer;\n }\n\n const { recognizers } = this;\n\n for (let i = 0; i < recognizers.length; i++) {\n if (recognizers[i].options.event === recognizer) {\n return recognizers[i];\n }\n }\n return null;\n }\n\n\t/**\n\t * @private add a recognizer to the manager\n\t * existing recognizers with the same event name will be removed\n\t * @param {Recognizer} recognizer\n\t * @returns {Recognizer|Manager}\n\t */\n add(recognizer) {\n if (invokeArrayArg(recognizer, \"add\", this)) {\n return this;\n }\n\n // remove existing\n const existing = this.get(recognizer.options.event);\n\n if (existing) {\n this.remove(existing);\n }\n\n this.recognizers.push(recognizer);\n recognizer.manager = this;\n\n this.touchAction.update();\n return recognizer;\n }\n\n\t/**\n\t * @private\n\t * remove a recognizer by name or instance\n\t * @param {Recognizer|String} recognizer\n\t * @returns {Manager}\n\t */\n remove(recognizer) {\n if (invokeArrayArg(recognizer, \"remove\", this)) {\n return this;\n }\n\n const targetRecognizer = this.get(recognizer);\n\n // let's make sure this recognizer exists\n if (recognizer) {\n const { recognizers } = this;\n const index = inArray(recognizers, targetRecognizer);\n\n if (index !== -1) {\n recognizers.splice(index, 1);\n this.touchAction.update();\n }\n }\n\n return this;\n }\n\n\t/**\n\t * @private\n\t * bind event\n\t * @param {String} events\n\t * @param {Function} handler\n\t * @returns {EventEmitter} this\n\t */\n on(events, handler) {\n if (events === undefined || handler === undefined) {\n return this;\n }\n\n const { handlers } = this;\n\n each(splitStr(events), event => {\n handlers[event] = handlers[event] || [];\n handlers[event].push(handler);\n });\n return this;\n }\n\n\t/**\n\t * @private unbind event, leave emit blank to remove all handlers\n\t * @param {String} events\n\t * @param {Function} [handler]\n\t * @returns {EventEmitter} this\n\t */\n off(events, handler) {\n if (events === undefined) {\n return this;\n }\n\n const { handlers } = this;\n\n each(splitStr(events), event => {\n if (!handler) {\n delete handlers[event];\n } else {\n handlers[event] && handlers[event].splice(inArray(handlers[event], handler), 1);\n }\n });\n return this;\n }\n\n\t/**\n\t * @private emit event to the listeners\n\t * @param {String} event\n\t * @param {Object} data\n\t */\n emit(event, data) {\n // we also want to trigger dom events\n if (this.options.domEvents) {\n triggerDomEvent(event, data);\n }\n\n // no handlers, so skip it all\n const handlers = this.handlers[event] && this.handlers[event].slice();\n\n if (!handlers || !handlers.length) {\n return;\n }\n\n data.type = event;\n data.preventDefault = function () {\n data.srcEvent.preventDefault();\n };\n\n let i = 0;\n\n while (i < handlers.length) {\n handlers[i](data);\n i++;\n }\n }\n\n\t/**\n\t * @private\n\t * destroy the manager and unbinds all events\n\t * it doesn't unbind dom events, that is the user own responsibility\n\t */\n destroy() {\n this.element && toggleCssProps(this, false);\n\n this.handlers = {};\n this.session = {};\n this.input.destroy();\n this.element = null;\n }\n}\n","import {\n INPUT_START,\n INPUT_MOVE,\n INPUT_END,\n INPUT_CANCEL,\n INPUT_TYPE_TOUCH\n} from '../inputjs/input-consts';\nimport Input from '../inputjs/input-constructor';\nimport toArray from '../utils/to-array';\nimport uniqueArray from '../utils/unique-array';\n\nconst SINGLE_TOUCH_INPUT_MAP = {\n touchstart: INPUT_START,\n touchmove: INPUT_MOVE,\n touchend: INPUT_END,\n touchcancel: INPUT_CANCEL\n};\n\nconst SINGLE_TOUCH_TARGET_EVENTS = 'touchstart';\nconst SINGLE_TOUCH_WINDOW_EVENTS = 'touchstart touchmove touchend touchcancel';\n\n/**\n * @private\n * Touch events input\n * @constructor\n * @extends Input\n */\nexport default class SingleTouchInput extends Input {\n constructor() {\n var proto = SingleTouchInput.prototype;\n proto.evTarget = SINGLE_TOUCH_TARGET_EVENTS;\n proto.evWin = SINGLE_TOUCH_WINDOW_EVENTS;\n\n super(...arguments);\n this.started = false;\n }\n\n handler(ev) {\n let type = SINGLE_TOUCH_INPUT_MAP[ev.type];\n\n // should we handle the touch events?\n if (type === INPUT_START) {\n this.started = true;\n }\n\n if (!this.started) {\n return;\n }\n\n let touches = normalizeSingleTouches.call(this, ev, type);\n\n // when done, reset the started state\n if (type & (INPUT_END | INPUT_CANCEL) && touches[0].length - touches[1].length === 0) {\n this.started = false;\n }\n\n this.callback(this.manager, type, {\n pointers: touches[0],\n changedPointers: touches[1],\n pointerType: INPUT_TYPE_TOUCH,\n srcEvent: ev\n });\n }\n}\n\n/**\n * @private\n * @this {TouchInput}\n * @param {Object} ev\n * @param {Number} type flag\n * @returns {undefined|Array} [all, changed]\n */\nfunction normalizeSingleTouches(ev, type) {\n let all = toArray(ev.touches);\n let changed = toArray(ev.changedTouches);\n\n if (type & (INPUT_END | INPUT_CANCEL)) {\n all = uniqueArray(all.concat(changed), 'identifier', true);\n }\n\n return [all, changed];\n}\n","import Recognizer from '../recognizerjs/recognizer-constructor';\nimport {\n STATE_BEGAN,\n STATE_CHANGED,\n STATE_CANCELLED,\n STATE_ENDED,\n STATE_FAILED\n} from '../recognizerjs/recognizer-consts';\nimport {\n INPUT_CANCEL,\n INPUT_END\n} from '../inputjs/input-consts';\n\n/**\n * @private\n * This recognizer is just used as a base for the simple attribute recognizers.\n * @constructor\n * @extends Recognizer\n */\nexport default class AttrRecognizer extends Recognizer {\n constructor(options = {}) {\n super({\n pointers: 1,\n ...options,\n });\n }\n\n /**\n * @private\n * Used to check if it the recognizer receives valid input, like input.distance > 10.\n * @memberof AttrRecognizer\n * @param {Object} input\n * @returns {Boolean} recognized\n */\n attrTest(input) {\n let optionPointers = this.options.pointers;\n return optionPointers === 0 || input.pointers.length === optionPointers;\n }\n\n /**\n * @private\n * Process the input and return the state for the recognizer\n * @memberof AttrRecognizer\n * @param {Object} input\n * @returns {*} State\n */\n process(input) {\n let { state } = this;\n let { eventType } = input;\n\n let isRecognized = state & (STATE_BEGAN | STATE_CHANGED);\n let isValid = this.attrTest(input);\n\n // on cancel input and we've recognized before, return STATE_CANCELLED\n if (isRecognized && (eventType & INPUT_CANCEL || !isValid)) {\n return state | STATE_CANCELLED;\n } else if (isRecognized || isValid) {\n if (eventType & INPUT_END) {\n return state | STATE_ENDED;\n } else if (!(state & STATE_BEGAN)) {\n return STATE_BEGAN;\n }\n return state | STATE_CHANGED;\n }\n return STATE_FAILED;\n }\n}\n","import Recognizer from '../recognizerjs/recognizer-constructor';\nimport { TOUCH_ACTION_MANIPULATION } from '../touchactionjs/touchaction-Consts';\nimport {INPUT_START,INPUT_END } from '../inputjs/input-consts';\nimport {\n STATE_RECOGNIZED,\n STATE_BEGAN,\n STATE_FAILED\n} from '../recognizerjs/recognizer-consts';\nimport getDistance from '../inputjs/get-distance';\n\n/**\n * @private\n * A tap is recognized when the pointer is doing a small tap/click. Multiple taps are recognized if they occur\n * between the given interval and position. The delay option can be used to recognize multi-taps without firing\n * a single tap.\n *\n * The eventData from the emitted event contains the property `tapCount`, which contains the amount of\n * multi-taps being recognized.\n * @constructor\n * @extends Recognizer\n */\nexport default class TapRecognizer extends Recognizer {\n constructor(options = {}) {\n super({\n event: 'tap',\n pointers: 1,\n taps: 1,\n interval: 300, // max time between the multi-tap taps\n time: 250, // max time of the pointer to be down (like finger on the screen)\n threshold: 9, // a minimal movement is ok, but keep it low\n posThreshold: 10, // a multi-tap can be a bit off the initial position\n ...options,\n });\n\n // previous time and center,\n // used for tap counting\n this.pTime = false;\n this.pCenter = false;\n\n this._timer = null;\n this._input = null;\n this.count = 0;\n }\n\n getTouchAction() {\n return [TOUCH_ACTION_MANIPULATION];\n }\n\n process(input) {\n let { options } = this;\n\n let validPointers = input.pointers.length === options.pointers;\n let validMovement = input.distance < options.threshold;\n let validTouchTime = input.deltaTime < options.time;\n\n this.reset();\n\n if ((input.eventType & INPUT_START) && (this.count === 0)) {\n return this.failTimeout();\n }\n\n // we only allow little movement\n // and we've reached an end event, so a tap is possible\n if (validMovement && validTouchTime && validPointers) {\n if (input.eventType !== INPUT_END) {\n return this.failTimeout();\n }\n\n let validInterval = this.pTime ? (input.timeStamp - this.pTime < options.interval) : true;\n let validMultiTap = !this.pCenter || getDistance(this.pCenter, input.center) < options.posThreshold;\n\n this.pTime = input.timeStamp;\n this.pCenter = input.center;\n\n if (!validMultiTap || !validInterval) {\n this.count = 1;\n } else {\n this.count += 1;\n }\n\n this._input = input;\n\n // if tap count matches we have recognized it,\n // else it has began recognizing...\n let tapCount = this.count % options.taps;\n if (tapCount === 0) {\n // no failing requirements, immediately trigger the tap event\n // or wait as long as the multitap interval to trigger\n if (!this.hasRequireFailures()) {\n return STATE_RECOGNIZED;\n } else {\n this._timer = setTimeout(() => {\n this.state = STATE_RECOGNIZED;\n this.tryEmit();\n }, options.interval);\n return STATE_BEGAN;\n }\n }\n }\n return STATE_FAILED;\n }\n\n failTimeout() {\n this._timer = setTimeout(() => {\n this.state = STATE_FAILED;\n }, this.options.interval);\n return STATE_FAILED;\n }\n\n reset() {\n clearTimeout(this._timer);\n }\n\n emit() {\n if (this.state === STATE_RECOGNIZED) {\n this._input.tapCount = this.count;\n this.manager.emit(this.options.event, this._input);\n }\n }\n}\n","import {\n DIRECTION_LEFT,\n DIRECTION_RIGHT,\n DIRECTION_UP,\n DIRECTION_DOWN\n} from '../inputjs/input-consts';\n\n/**\n * @private\n * direction cons to string\n * @param {constant} direction\n * @returns {String}\n */\nexport default function directionStr(direction) {\n if (direction === DIRECTION_DOWN) {\n return 'down';\n } else if (direction === DIRECTION_UP) {\n return 'up';\n } else if (direction === DIRECTION_LEFT) {\n return 'left';\n } else if (direction === DIRECTION_RIGHT) {\n return 'right';\n }\n return '';\n}\n","import AttrRecognizer from './attribute';\nimport {\n DIRECTION_ALL,\n DIRECTION_HORIZONTAL,\n DIRECTION_VERTICAL,\n DIRECTION_NONE,\n DIRECTION_UP,\n DIRECTION_DOWN,\n DIRECTION_LEFT,\n DIRECTION_RIGHT\n} from '../inputjs/input-consts';\nimport { STATE_BEGAN } from '../recognizerjs/recognizer-consts';\nimport { TOUCH_ACTION_PAN_X,TOUCH_ACTION_PAN_Y } from '../touchactionjs/touchaction-Consts';\nimport directionStr from '../recognizerjs/direction-str';\n\n/**\n * @private\n * Pan\n * Recognized when the pointer is down and moved in the allowed direction.\n * @constructor\n * @extends AttrRecognizer\n */\nexport default class PanRecognizer extends AttrRecognizer {\n constructor(options = {}) {\n super({\n event: 'pan',\n threshold: 10,\n pointers: 1,\n direction: DIRECTION_ALL,\n ...options,\n });\n this.pX = null;\n this.pY = null;\n }\n\n getTouchAction() {\n let { options:{ direction } } = this;\n let actions = [];\n if (direction & DIRECTION_HORIZONTAL) {\n actions.push(TOUCH_ACTION_PAN_Y);\n }\n if (direction & DIRECTION_VERTICAL) {\n actions.push(TOUCH_ACTION_PAN_X);\n }\n return actions;\n }\n\n directionTest(input) {\n let { options } = this;\n let hasMoved = true;\n let { distance } = input;\n let { direction } = input;\n let x = input.deltaX;\n let y = input.deltaY;\n\n // lock to axis?\n if (!(direction & options.direction)) {\n if (options.direction & DIRECTION_HORIZONTAL) {\n direction = (x === 0) ? DIRECTION_NONE : (x < 0) ? DIRECTION_LEFT : DIRECTION_RIGHT;\n hasMoved = x !== this.pX;\n distance = Math.abs(input.deltaX);\n } else {\n direction = (y === 0) ? DIRECTION_NONE : (y < 0) ? DIRECTION_UP : DIRECTION_DOWN;\n hasMoved = y !== this.pY;\n distance = Math.abs(input.deltaY);\n }\n }\n input.direction = direction;\n return hasMoved && distance > options.threshold && direction & options.direction;\n }\n\n attrTest(input) {\n return AttrRecognizer.prototype.attrTest.call(this, input) && // replace with a super call\n (this.state & STATE_BEGAN || (!(this.state & STATE_BEGAN) && this.directionTest(input)));\n }\n\n emit(input) {\n\n this.pX = input.deltaX;\n this.pY = input.deltaY;\n\n let direction = directionStr(input.direction);\n\n if (direction) {\n input.additionalEvent = this.options.event + direction;\n }\n super.emit(input);\n }\n}\n","import AttrRecognizer from '../recognizers/attribute';\nimport { abs } from '../utils/utils-consts';\nimport { DIRECTION_HORIZONTAL,DIRECTION_VERTICAL } from '../inputjs/input-consts';\nimport PanRecognizer from './pan';\nimport { INPUT_END } from '../inputjs/input-consts';\nimport directionStr from '../recognizerjs/direction-str';\n\n/**\n * @private\n * Swipe\n * Recognized when the pointer is moving fast (velocity), with enough distance in the allowed direction.\n * @constructor\n * @extends AttrRecognizer\n */\nexport default class SwipeRecognizer extends AttrRecognizer {\n constructor(options = {}) {\n super({\n event: 'swipe',\n threshold: 10,\n velocity: 0.3,\n direction: DIRECTION_HORIZONTAL | DIRECTION_VERTICAL,\n pointers: 1,\n ...options,\n });\n }\n\n getTouchAction() {\n return PanRecognizer.prototype.getTouchAction.call(this);\n }\n\n attrTest(input) {\n let { direction } = this.options;\n let velocity;\n\n if (direction & (DIRECTION_HORIZONTAL | DIRECTION_VERTICAL)) {\n velocity = input.overallVelocity;\n } else if (direction & DIRECTION_HORIZONTAL) {\n velocity = input.overallVelocityX;\n } else if (direction & DIRECTION_VERTICAL) {\n velocity = input.overallVelocityY;\n }\n\n return super.attrTest(input) &&\n direction & input.offsetDirection &&\n input.distance > this.options.threshold &&\n input.maxPointers === this.options.pointers &&\n abs(velocity) > this.options.velocity && input.eventType & INPUT_END;\n }\n\n emit(input) {\n let direction = directionStr(input.offsetDirection);\n if (direction) {\n this.manager.emit(this.options.event + direction, input);\n }\n\n this.manager.emit(this.options.event, input);\n }\n}\n","import AttrRecognizer from './attribute';\nimport { TOUCH_ACTION_NONE } from '../touchactionjs/touchaction-Consts';\nimport { STATE_BEGAN } from '../recognizerjs/recognizer-consts';\n\n/**\n * @private\n * Pinch\n * Recognized when two or more pointers are moving toward (zoom-in) or away from each other (zoom-out).\n * @constructor\n * @extends AttrRecognizer\n */\nexport default class PinchRecognizer extends AttrRecognizer {\n constructor(options = {}) {\n super({\n event: 'pinch',\n threshold: 0,\n pointers: 2,\n ...options,\n });\n }\n\n getTouchAction() {\n return [TOUCH_ACTION_NONE];\n }\n\n attrTest(input) {\n return super.attrTest(input) &&\n (Math.abs(input.scale - 1) > this.options.threshold || this.state & STATE_BEGAN);\n }\n\n emit(input) {\n if (input.scale !== 1) {\n let inOut = input.scale < 1 ? 'in' : 'out';\n input.additionalEvent = this.options.event + inOut;\n }\n super.emit(input);\n }\n}\n","import AttrRecognizer from './attribute';\nimport { TOUCH_ACTION_NONE } from '../touchactionjs/touchaction-Consts';\nimport { STATE_BEGAN } from '../recognizerjs/recognizer-consts';\n\n/**\n * @private\n * Rotate\n * Recognized when two or more pointer are moving in a circular motion.\n * @constructor\n * @extends AttrRecognizer\n */\nexport default class RotateRecognizer extends AttrRecognizer {\n constructor(options = {}) {\n super( {\n event: 'rotate',\n threshold: 0,\n pointers: 2,\n ...options,\n });\n }\n\n getTouchAction() {\n return [TOUCH_ACTION_NONE];\n }\n\n attrTest(input) {\n return super.attrTest(input) &&\n (Math.abs(input.rotation) > this.options.threshold || this.state & STATE_BEGAN);\n }\n}","import Recognizer from '../recognizerjs/recognizer-constructor';\nimport {\n STATE_RECOGNIZED,\n STATE_FAILED\n} from '../recognizerjs/recognizer-consts';\nimport { now } from '../utils/utils-consts';\nimport { TOUCH_ACTION_AUTO } from '../touchactionjs/touchaction-Consts';\nimport {\n INPUT_START,\n INPUT_END,\n INPUT_CANCEL\n} from '../inputjs/input-consts';\n\n/**\n * @private\n * Press\n * Recognized when the pointer is down for x ms without any movement.\n * @constructor\n * @extends Recognizer\n */\nexport default class PressRecognizer extends Recognizer {\n constructor(options = {}) {\n super({\n event: 'press',\n pointers: 1,\n time: 251, // minimal time of the pointer to be pressed\n threshold: 9, // a minimal movement is ok, but keep it low\n ...options,\n });\n this._timer = null;\n this._input = null;\n }\n\n getTouchAction() {\n return [TOUCH_ACTION_AUTO];\n }\n\n process(input) {\n let { options } = this;\n let validPointers = input.pointers.length === options.pointers;\n let validMovement = input.distance < options.threshold;\n let validTime = input.deltaTime > options.time;\n\n this._input = input;\n\n // we only allow little movement\n // and we've reached an end event, so a tap is possible\n if (!validMovement || !validPointers || (input.eventType & (INPUT_END | INPUT_CANCEL) && !validTime)) {\n this.reset();\n } else if (input.eventType & INPUT_START) {\n this.reset();\n this._timer = setTimeout(() => {\n this.state = STATE_RECOGNIZED;\n this.tryEmit();\n }, options.time);\n } else if (input.eventType & INPUT_END) {\n return STATE_RECOGNIZED;\n }\n return STATE_FAILED;\n }\n\n reset() {\n clearTimeout(this._timer);\n }\n\n emit(input) {\n if (this.state !== STATE_RECOGNIZED) {\n return;\n }\n\n if (input && (input.eventType & INPUT_END)) {\n this.manager.emit(`${this.options.event}up`, input);\n } else {\n this._input.timeStamp = now();\n this.manager.emit(this.options.event, this._input);\n }\n }\n}\n\n","/**\n * @private\n * wrap a method with a deprecation warning and stack trace\n * @param {Function} method\n * @param {String} name\n * @param {String} message\n * @returns {Function} A new function wrapping the supplied method.\n */\nexport default function deprecate(method, name, message) {\n let deprecationMessage = `DEPRECATED METHOD: ${name}\\n${message} AT \\n`;\n return function() {\n let e = new Error('get-stack-trace');\n let stack = e && e.stack ? e.stack.replace(/^[^\\(]+?[\\n$]/gm, '')\n .replace(/^\\s+at\\s+/gm, '')\n .replace(/^Object.\\s*\\(/gm, '{anonymous}()@') : 'Unknown Stack Trace';\n\n let log = window.console && (window.console.warn || window.console.log);\n if (log) {\n log.call(window.console, deprecationMessage, stack);\n }\n return method.apply(this, arguments);\n };\n}\n","import deprecate from './deprecate';\n/**\n * @private\n * extend object.\n * means that properties in dest will be overwritten by the ones in src.\n * @param {Object} dest\n * @param {Object} src\n * @param {Boolean} [merge=false]\n * @returns {Object} dest\n */\nconst extend = deprecate((dest, src, merge) => {\n let keys = Object.keys(src);\n let i = 0;\n while (i < keys.length) {\n if (!merge || (merge && dest[keys[i]] === undefined)) {\n dest[keys[i]] = src[keys[i]];\n }\n i++;\n }\n return dest;\n}, 'extend', 'Use `assign`.');\n\nexport default extend;\n","import deprecate from './deprecate';\nimport extend from './extend';\n/**\n * @private\n * merge the values from src in the dest.\n * means that properties that exist in dest will not be overwritten by src\n * @param {Object} dest\n * @param {Object} src\n * @returns {Object} dest\n */\nconst merge = deprecate((dest, src) => {\n return extend(dest, src, true);\n}, 'merge', 'Use `assign`.');\n\nexport default merge;\n","import assign from './assign';\n/**\n * @private\n * simple class inheritance\n * @param {Function} child\n * @param {Function} base\n * @param {Object} [properties]\n */\nexport default function inherit(child, base, properties) {\n let baseP = base.prototype;\n let childP;\n\n childP = child.prototype = Object.create(baseP);\n childP.constructor = child;\n childP._super = baseP;\n\n if (properties) {\n assign(childP, properties);\n }\n}\n","/**\n * @private\n * simple function bind\n * @param {Function} fn\n * @param {Object} context\n * @returns {Function}\n */\nexport default function bindFn(fn, context) {\n return function boundFn() {\n return fn.apply(context, arguments);\n };\n}\n","import Manager from \"./manager\";\nimport defaults from \"./defaults\";\nimport assign from './utils/assign';\nimport {\n INPUT_START,\n INPUT_MOVE,\n INPUT_END,\n INPUT_CANCEL,\n DIRECTION_NONE,\n DIRECTION_LEFT,\n DIRECTION_RIGHT,\n DIRECTION_UP,\n DIRECTION_DOWN,\n DIRECTION_HORIZONTAL,\n DIRECTION_VERTICAL,\n DIRECTION_ALL,\n} from \"./inputjs/input-consts\";\nimport {\n STATE_POSSIBLE,\n STATE_BEGAN,\n STATE_CHANGED,\n STATE_ENDED,\n STATE_RECOGNIZED,\n STATE_CANCELLED,\n STATE_FAILED,\n} from \"./recognizerjs/recognizer-consts\";\n\nimport Input from \"./inputjs/input-constructor\";\nimport TouchAction from \"./touchactionjs/touchaction-constructor\";\nimport TouchInput from \"./input/touch\";\nimport MouseInput from \"./input/mouse\";\nimport PointerEventInput from \"./input/pointerevent\";\nimport SingleTouchInput from \"./input/singletouch\";\nimport TouchMouseInput from \"./input/touchmouse\";\n\nimport Recognizer from \"./recognizerjs/recognizer-constructor\";\nimport AttrRecognizer from \"./recognizers/attribute\";\nimport TapRecognizer from \"./recognizers/tap\";\nimport PanRecognizer from \"./recognizers/pan\";\nimport SwipeRecognizer from \"./recognizers/swipe\";\nimport PinchRecognizer from \"./recognizers/pinch\";\nimport RotateRecognizer from \"./recognizers/rotate\";\nimport PressRecognizer from \"./recognizers/press\";\n\nimport addEventListeners from \"./utils/add-event-listeners\";\nimport removeEventListeners from \"./utils/remove-event-listeners\";\nimport each from \"./utils/each\";\nimport merge from \"./utils/merge\";\nimport extend from \"./utils/extend\";\nimport inherit from \"./utils/inherit\";\nimport bindFn from \"./utils/bind-fn\";\nimport prefixed from \"./utils/prefixed\";\nimport toArray from \"./utils/to-array\";\nimport uniqueArray from \"./utils/unique-array\";\nimport splitStr from \"./utils/split-str\";\nimport inArray from \"./utils/in-array\";\nimport boolOrFn from \"./utils/bool-or-fn\";\nimport hasParent from \"./utils/has-parent\";\n/**\n * @private\n * Simple way to create a manager with a default set of recognizers.\n * @param {HTMLElement} element\n * @param {Object} [options]\n * @constructor\n */\nexport default class Hammer {\n\t/**\n * @private\n * @const {string}\n */\n\tstatic VERSION = \"#__VERSION__#\";\n\tstatic DIRECTION_ALL = DIRECTION_ALL;\n\tstatic DIRECTION_DOWN = DIRECTION_DOWN;\n\tstatic DIRECTION_LEFT = DIRECTION_LEFT;\n\tstatic DIRECTION_RIGHT = DIRECTION_RIGHT;\n\tstatic DIRECTION_UP = DIRECTION_UP;\n\tstatic DIRECTION_HORIZONTAL = DIRECTION_HORIZONTAL;\n\tstatic DIRECTION_VERTICAL = DIRECTION_VERTICAL;\n\tstatic DIRECTION_NONE = DIRECTION_NONE;\n\tstatic DIRECTION_DOWN = DIRECTION_DOWN;\n\tstatic INPUT_START = INPUT_START;\n\tstatic INPUT_MOVE = INPUT_MOVE;\n static INPUT_END = INPUT_END;\n\tstatic INPUT_CANCEL = INPUT_CANCEL;\n\tstatic STATE_POSSIBLE = STATE_POSSIBLE;\n\tstatic STATE_BEGAN = STATE_BEGAN;\n\tstatic STATE_CHANGED = STATE_CHANGED;\n\tstatic STATE_ENDED = STATE_ENDED;\n\tstatic STATE_RECOGNIZED = STATE_RECOGNIZED;\n\tstatic STATE_CANCELLED = STATE_CANCELLED;\n\tstatic STATE_FAILED = STATE_FAILED; \n\tstatic Manager = Manager;\n\tstatic Input = Input;\n\tstatic TouchAction = TouchAction;\n\tstatic TouchInput = TouchInput;\n\tstatic MouseInput = MouseInput;\n\tstatic PointerEventInput = PointerEventInput;\n\tstatic TouchMouseInput = TouchMouseInput;\n\tstatic SingleTouchInput = SingleTouchInput;\n\tstatic Recognizer = Recognizer;\n\tstatic AttrRecognizer = AttrRecognizer;\n\tstatic Tap = TapRecognizer;\n\tstatic Pan = PanRecognizer;\n\tstatic Swipe = SwipeRecognizer;\n\tstatic Pinch = PinchRecognizer;\n\tstatic Rotate = RotateRecognizer;\n\tstatic Press = PressRecognizer;\n\tstatic on = addEventListeners;\n\tstatic off = removeEventListeners;\n\tstatic each = each;\n\tstatic merge = merge;\n\tstatic extend = extend;\n\tstatic bindFn = bindFn;\n\tstatic assign = assign;\n\tstatic inherit = inherit;\n\tstatic bindFn = bindFn;\n\tstatic prefixed = prefixed;\n\tstatic toArray = toArray;\n\tstatic inArray = inArray;\n\tstatic uniqueArray = uniqueArray;\n\tstatic splitStr = splitStr;\n\tstatic boolOrFn = boolOrFn;\n\tstatic hasParent = hasParent;\n\tstatic addEventListeners = addEventListeners;\n\tstatic removeEventListeners = removeEventListeners;\n\tstatic defaults = defaults;\n\tconstructor(element, options = {}) {\n\t\treturn new Manager(element, {\n\t\t\trecognizers: [\n\t\t\t\t\t// RecognizerClass, options, [recognizeWith, ...], [requireFailure, ...]\n\t\t\t\t\t[RotateRecognizer, { enable: false }],\n\t\t\t\t\t[PinchRecognizer, { enable: false }, ['rotate']],\n\t\t\t\t\t[SwipeRecognizer, { direction: DIRECTION_HORIZONTAL }],\n\t\t\t\t\t[PanRecognizer, { direction: DIRECTION_HORIZONTAL }, ['swipe']],\n\t\t\t\t\t[TapRecognizer],\n\t\t\t\t\t[TapRecognizer, { event: 'doubletap', taps: 2 }, ['tap']],\n\t\t\t\t\t[PressRecognizer]\n\t\t\t],\n\t\t\t...options,\n\t\t});\n\t}\n}\n"],"names":["assign","Object","target","undefined","TypeError","output","index","arguments","length","source","nextKey","hasOwnProperty","VENDOR_PREFIXES","TEST_ELEMENT","document","style","createElement","TYPE_FUNCTION","round","Math","abs","now","Date","prefixed","obj","property","prefix","prop","camelProp","toUpperCase","slice","i","win","window","PREFIXED_TOUCH_ACTION","NATIVE_TOUCH_ACTION","getTouchActionProps","touchMap","cssSupports","CSS","supports","forEach","val","TOUCH_ACTION_COMPUTE","TOUCH_ACTION_AUTO","TOUCH_ACTION_MANIPULATION","TOUCH_ACTION_NONE","TOUCH_ACTION_PAN_X","TOUCH_ACTION_PAN_Y","TOUCH_ACTION_MAP","MOBILE_REGEX","SUPPORT_TOUCH","SUPPORT_POINTER_EVENTS","SUPPORT_ONLY_TOUCH","test","navigator","userAgent","INPUT_TYPE_TOUCH","INPUT_TYPE_PEN","INPUT_TYPE_MOUSE","INPUT_TYPE_KINECT","COMPUTE_INTERVAL","INPUT_START","INPUT_MOVE","INPUT_END","INPUT_CANCEL","DIRECTION_NONE","DIRECTION_LEFT","DIRECTION_RIGHT","DIRECTION_UP","DIRECTION_DOWN","DIRECTION_HORIZONTAL","DIRECTION_VERTICAL","DIRECTION_ALL","PROPS_XY","PROPS_CLIENT_XY","each","iterator","context","call","boolOrFn","args","apply","inStr","str","find","indexOf","cleanTouchActions","actions","hasPanX","hasPanY","TouchAction","manager","value","set","compute","element","toLowerCase","trim","update","options","touchAction","recognizers","recognizer","enable","concat","getTouchAction","join","preventDefaults","input","srcEvent","direction","offsetDirection","session","prevented","preventDefault","hasNone","isTapPointer","pointers","isTapMovement","distance","isTapTouchTime","deltaTime","preventSrc","hasParent","node","parent","parentNode","getCenter","pointersLength","x","clientX","y","clientY","simpleCloneInputData","timeStamp","center","deltaX","deltaY","getDistance","p1","p2","props","sqrt","getAngle","atan2","PI","getDirection","computeDeltaXY","offset","offsetDelta","prevDelta","prevInput","eventType","getVelocity","getScale","start","end","getRotation","computeIntervalInputData","last","lastInterval","velocity","velocityX","velocityY","v","computeInputData","firstInput","firstMultiple","offsetCenter","angle","overallVelocity","overallVelocityX","overallVelocityY","scale","rotation","maxPointers","inputHandler","pointersLen","changedPointersLen","changedPointers","isFirst","isFinal","emit","recognize","splitStr","split","addEventListeners","types","handler","type","addEventListener","removeEventListeners","removeEventListener","getWindowForElement","doc","ownerDocument","defaultView","parentWindow","Input","callback","self","inputTarget","domHandler","ev","init","evEl","evTarget","evWin","destroy","inArray","src","findByKey","POINTER_INPUT_MAP","pointerdown","pointermove","pointerup","pointercancel","pointerout","IE10_POINTER_TYPE_ENUM","POINTER_ELEMENT_EVENTS","POINTER_WINDOW_EVENTS","MSPointerEvent","PointerEvent","PointerEventInput","proto","prototype","store","pointerEvents","removePointer","eventTypeNormalized","replace","pointerType","isTouch","storeIndex","pointerId","button","push","splice","toArray","Array","uniqueArray","key","sort","results","values","a","b","TOUCH_INPUT_MAP","touchstart","touchmove","touchend","touchcancel","TOUCH_TARGET_EVENTS","TouchInput","targetIds","touches","getTouches","allTouches","identifier","targetTouches","changedTouches","changedTargetTouches","filter","touch","MOUSE_INPUT_MAP","mousedown","mousemove","mouseup","MOUSE_ELEMENT_EVENTS","MOUSE_WINDOW_EVENTS","MouseInput","pressed","which","DEDUP_TIMEOUT","DEDUP_DISTANCE","setLastTouch","eventData","primaryTouch","lastTouch","lts","lastTouches","removeLastTouch","setTimeout","recordTouches","isSyntheticEvent","t","dx","dy","TouchMouseInput","inputEvent","inputData","isMouse","sourceCapabilities","firesTouchEvents","mouse","createInputInstance","Type","inputClass","invokeArrayArg","arg","fn","isArray","STATE_POSSIBLE","STATE_BEGAN","STATE_CHANGED","STATE_ENDED","STATE_RECOGNIZED","STATE_CANCELLED","STATE_FAILED","_uniqueId","uniqueId","getRecognizerByNameIfManager","otherRecognizer","get","stateStr","state","Recognizer","id","simultaneous","requireFail","recognizeWith","dropRecognizeWith","requireFailure","dropRequireFailure","hasRequireFailures","canRecognizeWith","event","additionalEvent","tryEmit","canEmit","inputDataClone","reset","process","domEvents","preset","cssProps","userSelect","touchSelect","touchCallout","contentZooming","userDrag","tapHighlightColor","STOP","FORCED_STOP","toggleCssProps","add","name","oldCssProps","triggerDomEvent","data","gestureEvent","createEvent","initEvent","gesture","dispatchEvent","Manager","defaults","handlers","item","stop","force","stopped","curRecognizer","existing","remove","targetRecognizer","on","events","off","SINGLE_TOUCH_INPUT_MAP","SINGLE_TOUCH_TARGET_EVENTS","SINGLE_TOUCH_WINDOW_EVENTS","SingleTouchInput","started","normalizeSingleTouches","all","changed","AttrRecognizer","attrTest","optionPointers","isRecognized","isValid","TapRecognizer","taps","interval","time","threshold","posThreshold","pTime","pCenter","_timer","_input","count","validPointers","validMovement","validTouchTime","failTimeout","validInterval","validMultiTap","tapCount","clearTimeout","directionStr","PanRecognizer","pX","pY","directionTest","hasMoved","SwipeRecognizer","PinchRecognizer","inOut","RotateRecognizer","PressRecognizer","validTime","deprecate","method","message","deprecationMessage","e","Error","stack","log","console","warn","extend","dest","merge","keys","inherit","child","base","properties","baseP","childP","create","constructor","_super","bindFn","boundFn","Hammer","VERSION","Tap","Pan","Swipe","Pinch","Rotate","Press"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;AAQA,IA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AzDC2T,OA0Db5P,oBAAoBA;EA1DP4P,OA2DbvP,uBAAuBA;EA3DVuP,OA4DblF,WAAWA;SA5DEkF;;;;;;"} \ No newline at end of file diff --git a/node_modules/@egjs/hammerjs/dist/hammer.js b/node_modules/@egjs/hammerjs/dist/hammer.js new file mode 100644 index 0000000000000000000000000000000000000000..b66c83833e55fafd701154439b47ece6ac26c062 --- /dev/null +++ b/node_modules/@egjs/hammerjs/dist/hammer.js @@ -0,0 +1,2983 @@ +/*! Hammer.JS - v2.0.15 - 2019-04-04 + * http://naver.github.io/egjs + * + * Forked By Naver egjs + * Copyright (c) hammerjs + * Licensed under the MIT license */ +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : + typeof define === 'function' && define.amd ? define(factory) : + (global.Hammer = factory()); +}(this, (function () { 'use strict'; + + function _extends() { + _extends = Object.assign || function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + + return target; + }; + + return _extends.apply(this, arguments); + } + + function _inheritsLoose(subClass, superClass) { + subClass.prototype = Object.create(superClass.prototype); + subClass.prototype.constructor = subClass; + subClass.__proto__ = superClass; + } + + function _assertThisInitialized(self) { + if (self === void 0) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + + return self; + } + + /** + * @private + * extend object. + * means that properties in dest will be overwritten by the ones in src. + * @param {Object} target + * @param {...Object} objects_to_assign + * @returns {Object} target + */ + var assign; + + if (typeof Object.assign !== 'function') { + assign = function assign(target) { + if (target === undefined || target === null) { + throw new TypeError('Cannot convert undefined or null to object'); + } + + var output = Object(target); + + for (var index = 1; index < arguments.length; index++) { + var source = arguments[index]; + + if (source !== undefined && source !== null) { + for (var nextKey in source) { + if (source.hasOwnProperty(nextKey)) { + output[nextKey] = source[nextKey]; + } + } + } + } + + return output; + }; + } else { + assign = Object.assign; + } + + var assign$1 = assign; + + var VENDOR_PREFIXES = ['', 'webkit', 'Moz', 'MS', 'ms', 'o']; + var TEST_ELEMENT = typeof document === "undefined" ? { + style: {} + } : document.createElement('div'); + var TYPE_FUNCTION = 'function'; + var round = Math.round, + abs = Math.abs; + var now = Date.now; + + /** + * @private + * get the prefixed property + * @param {Object} obj + * @param {String} property + * @returns {String|Undefined} prefixed + */ + + function prefixed(obj, property) { + var prefix; + var prop; + var camelProp = property[0].toUpperCase() + property.slice(1); + var i = 0; + + while (i < VENDOR_PREFIXES.length) { + prefix = VENDOR_PREFIXES[i]; + prop = prefix ? prefix + camelProp : property; + + if (prop in obj) { + return prop; + } + + i++; + } + + return undefined; + } + + /* eslint-disable no-new-func, no-nested-ternary */ + var win; + + if (typeof window === "undefined") { + // window is undefined in node.js + win = {}; + } else { + win = window; + } + + var PREFIXED_TOUCH_ACTION = prefixed(TEST_ELEMENT.style, 'touchAction'); + var NATIVE_TOUCH_ACTION = PREFIXED_TOUCH_ACTION !== undefined; + function getTouchActionProps() { + if (!NATIVE_TOUCH_ACTION) { + return false; + } + + var touchMap = {}; + var cssSupports = win.CSS && win.CSS.supports; + ['auto', 'manipulation', 'pan-y', 'pan-x', 'pan-x pan-y', 'none'].forEach(function (val) { + // If css.supports is not supported but there is native touch-action assume it supports + // all values. This is the case for IE 10 and 11. + return touchMap[val] = cssSupports ? win.CSS.supports('touch-action', val) : true; + }); + return touchMap; + } + + var TOUCH_ACTION_COMPUTE = 'compute'; + var TOUCH_ACTION_AUTO = 'auto'; + var TOUCH_ACTION_MANIPULATION = 'manipulation'; // not implemented + + var TOUCH_ACTION_NONE = 'none'; + var TOUCH_ACTION_PAN_X = 'pan-x'; + var TOUCH_ACTION_PAN_Y = 'pan-y'; + var TOUCH_ACTION_MAP = getTouchActionProps(); + + var MOBILE_REGEX = /mobile|tablet|ip(ad|hone|od)|android/i; + var SUPPORT_TOUCH = 'ontouchstart' in win; + var SUPPORT_POINTER_EVENTS = prefixed(win, 'PointerEvent') !== undefined; + var SUPPORT_ONLY_TOUCH = SUPPORT_TOUCH && MOBILE_REGEX.test(navigator.userAgent); + var INPUT_TYPE_TOUCH = 'touch'; + var INPUT_TYPE_PEN = 'pen'; + var INPUT_TYPE_MOUSE = 'mouse'; + var INPUT_TYPE_KINECT = 'kinect'; + var COMPUTE_INTERVAL = 25; + var INPUT_START = 1; + var INPUT_MOVE = 2; + var INPUT_END = 4; + var INPUT_CANCEL = 8; + var DIRECTION_NONE = 1; + var DIRECTION_LEFT = 2; + var DIRECTION_RIGHT = 4; + var DIRECTION_UP = 8; + var DIRECTION_DOWN = 16; + var DIRECTION_HORIZONTAL = DIRECTION_LEFT | DIRECTION_RIGHT; + var DIRECTION_VERTICAL = DIRECTION_UP | DIRECTION_DOWN; + var DIRECTION_ALL = DIRECTION_HORIZONTAL | DIRECTION_VERTICAL; + var PROPS_XY = ['x', 'y']; + var PROPS_CLIENT_XY = ['clientX', 'clientY']; + + /** + * @private + * walk objects and arrays + * @param {Object} obj + * @param {Function} iterator + * @param {Object} context + */ + function each(obj, iterator, context) { + var i; + + if (!obj) { + return; + } + + if (obj.forEach) { + obj.forEach(iterator, context); + } else if (obj.length !== undefined) { + i = 0; + + while (i < obj.length) { + iterator.call(context, obj[i], i, obj); + i++; + } + } else { + for (i in obj) { + obj.hasOwnProperty(i) && iterator.call(context, obj[i], i, obj); + } + } + } + + /** + * @private + * let a boolean value also be a function that must return a boolean + * this first item in args will be used as the context + * @param {Boolean|Function} val + * @param {Array} [args] + * @returns {Boolean} + */ + + function boolOrFn(val, args) { + if (typeof val === TYPE_FUNCTION) { + return val.apply(args ? args[0] || undefined : undefined, args); + } + + return val; + } + + /** + * @private + * small indexOf wrapper + * @param {String} str + * @param {String} find + * @returns {Boolean} found + */ + function inStr(str, find) { + return str.indexOf(find) > -1; + } + + /** + * @private + * when the touchActions are collected they are not a valid value, so we need to clean things up. * + * @param {String} actions + * @returns {*} + */ + + function cleanTouchActions(actions) { + // none + if (inStr(actions, TOUCH_ACTION_NONE)) { + return TOUCH_ACTION_NONE; + } + + var hasPanX = inStr(actions, TOUCH_ACTION_PAN_X); + var hasPanY = inStr(actions, TOUCH_ACTION_PAN_Y); // if both pan-x and pan-y are set (different recognizers + // for different directions, e.g. horizontal pan but vertical swipe?) + // we need none (as otherwise with pan-x pan-y combined none of these + // recognizers will work, since the browser would handle all panning + + if (hasPanX && hasPanY) { + return TOUCH_ACTION_NONE; + } // pan-x OR pan-y + + + if (hasPanX || hasPanY) { + return hasPanX ? TOUCH_ACTION_PAN_X : TOUCH_ACTION_PAN_Y; + } // manipulation + + + if (inStr(actions, TOUCH_ACTION_MANIPULATION)) { + return TOUCH_ACTION_MANIPULATION; + } + + return TOUCH_ACTION_AUTO; + } + + /** + * @private + * Touch Action + * sets the touchAction property or uses the js alternative + * @param {Manager} manager + * @param {String} value + * @constructor + */ + + var TouchAction = + /*#__PURE__*/ + function () { + function TouchAction(manager, value) { + this.manager = manager; + this.set(value); + } + /** + * @private + * set the touchAction value on the element or enable the polyfill + * @param {String} value + */ + + + var _proto = TouchAction.prototype; + + _proto.set = function set(value) { + // find out the touch-action by the event handlers + if (value === TOUCH_ACTION_COMPUTE) { + value = this.compute(); + } + + if (NATIVE_TOUCH_ACTION && this.manager.element.style && TOUCH_ACTION_MAP[value]) { + this.manager.element.style[PREFIXED_TOUCH_ACTION] = value; + } + + this.actions = value.toLowerCase().trim(); + }; + /** + * @private + * just re-set the touchAction value + */ + + + _proto.update = function update() { + this.set(this.manager.options.touchAction); + }; + /** + * @private + * compute the value for the touchAction property based on the recognizer's settings + * @returns {String} value + */ + + + _proto.compute = function compute() { + var actions = []; + each(this.manager.recognizers, function (recognizer) { + if (boolOrFn(recognizer.options.enable, [recognizer])) { + actions = actions.concat(recognizer.getTouchAction()); + } + }); + return cleanTouchActions(actions.join(' ')); + }; + /** + * @private + * this method is called on each input cycle and provides the preventing of the browser behavior + * @param {Object} input + */ + + + _proto.preventDefaults = function preventDefaults(input) { + var srcEvent = input.srcEvent; + var direction = input.offsetDirection; // if the touch action did prevented once this session + + if (this.manager.session.prevented) { + srcEvent.preventDefault(); + return; + } + + var actions = this.actions; + var hasNone = inStr(actions, TOUCH_ACTION_NONE) && !TOUCH_ACTION_MAP[TOUCH_ACTION_NONE]; + var hasPanY = inStr(actions, TOUCH_ACTION_PAN_Y) && !TOUCH_ACTION_MAP[TOUCH_ACTION_PAN_Y]; + var hasPanX = inStr(actions, TOUCH_ACTION_PAN_X) && !TOUCH_ACTION_MAP[TOUCH_ACTION_PAN_X]; + + if (hasNone) { + // do not prevent defaults if this is a tap gesture + var isTapPointer = input.pointers.length === 1; + var isTapMovement = input.distance < 2; + var isTapTouchTime = input.deltaTime < 250; + + if (isTapPointer && isTapMovement && isTapTouchTime) { + return; + } + } + + if (hasPanX && hasPanY) { + // `pan-x pan-y` means browser handles all scrolling/panning, do not prevent + return; + } + + if (hasNone || hasPanY && direction & DIRECTION_HORIZONTAL || hasPanX && direction & DIRECTION_VERTICAL) { + return this.preventSrc(srcEvent); + } + }; + /** + * @private + * call preventDefault to prevent the browser's default behavior (scrolling in most cases) + * @param {Object} srcEvent + */ + + + _proto.preventSrc = function preventSrc(srcEvent) { + this.manager.session.prevented = true; + srcEvent.preventDefault(); + }; + + return TouchAction; + }(); + + /** + * @private + * find if a node is in the given parent + * @method hasParent + * @param {HTMLElement} node + * @param {HTMLElement} parent + * @return {Boolean} found + */ + function hasParent(node, parent) { + while (node) { + if (node === parent) { + return true; + } + + node = node.parentNode; + } + + return false; + } + + /** + * @private + * get the center of all the pointers + * @param {Array} pointers + * @return {Object} center contains `x` and `y` properties + */ + + function getCenter(pointers) { + var pointersLength = pointers.length; // no need to loop when only one touch + + if (pointersLength === 1) { + return { + x: round(pointers[0].clientX), + y: round(pointers[0].clientY) + }; + } + + var x = 0; + var y = 0; + var i = 0; + + while (i < pointersLength) { + x += pointers[i].clientX; + y += pointers[i].clientY; + i++; + } + + return { + x: round(x / pointersLength), + y: round(y / pointersLength) + }; + } + + /** + * @private + * create a simple clone from the input used for storage of firstInput and firstMultiple + * @param {Object} input + * @returns {Object} clonedInputData + */ + + function simpleCloneInputData(input) { + // make a simple copy of the pointers because we will get a reference if we don't + // we only need clientXY for the calculations + var pointers = []; + var i = 0; + + while (i < input.pointers.length) { + pointers[i] = { + clientX: round(input.pointers[i].clientX), + clientY: round(input.pointers[i].clientY) + }; + i++; + } + + return { + timeStamp: now(), + pointers: pointers, + center: getCenter(pointers), + deltaX: input.deltaX, + deltaY: input.deltaY + }; + } + + /** + * @private + * calculate the absolute distance between two points + * @param {Object} p1 {x, y} + * @param {Object} p2 {x, y} + * @param {Array} [props] containing x and y keys + * @return {Number} distance + */ + + function getDistance(p1, p2, props) { + if (!props) { + props = PROPS_XY; + } + + var x = p2[props[0]] - p1[props[0]]; + var y = p2[props[1]] - p1[props[1]]; + return Math.sqrt(x * x + y * y); + } + + /** + * @private + * calculate the angle between two coordinates + * @param {Object} p1 + * @param {Object} p2 + * @param {Array} [props] containing x and y keys + * @return {Number} angle + */ + + function getAngle(p1, p2, props) { + if (!props) { + props = PROPS_XY; + } + + var x = p2[props[0]] - p1[props[0]]; + var y = p2[props[1]] - p1[props[1]]; + return Math.atan2(y, x) * 180 / Math.PI; + } + + /** + * @private + * get the direction between two points + * @param {Number} x + * @param {Number} y + * @return {Number} direction + */ + + function getDirection(x, y) { + if (x === y) { + return DIRECTION_NONE; + } + + if (abs(x) >= abs(y)) { + return x < 0 ? DIRECTION_LEFT : DIRECTION_RIGHT; + } + + return y < 0 ? DIRECTION_UP : DIRECTION_DOWN; + } + + function computeDeltaXY(session, input) { + var center = input.center; // let { offsetDelta:offset = {}, prevDelta = {}, prevInput = {} } = session; + // jscs throwing error on defalut destructured values and without defaults tests fail + + var offset = session.offsetDelta || {}; + var prevDelta = session.prevDelta || {}; + var prevInput = session.prevInput || {}; + + if (input.eventType === INPUT_START || prevInput.eventType === INPUT_END) { + prevDelta = session.prevDelta = { + x: prevInput.deltaX || 0, + y: prevInput.deltaY || 0 + }; + offset = session.offsetDelta = { + x: center.x, + y: center.y + }; + } + + input.deltaX = prevDelta.x + (center.x - offset.x); + input.deltaY = prevDelta.y + (center.y - offset.y); + } + + /** + * @private + * calculate the velocity between two points. unit is in px per ms. + * @param {Number} deltaTime + * @param {Number} x + * @param {Number} y + * @return {Object} velocity `x` and `y` + */ + function getVelocity(deltaTime, x, y) { + return { + x: x / deltaTime || 0, + y: y / deltaTime || 0 + }; + } + + /** + * @private + * calculate the scale factor between two pointersets + * no scale is 1, and goes down to 0 when pinched together, and bigger when pinched out + * @param {Array} start array of pointers + * @param {Array} end array of pointers + * @return {Number} scale + */ + + function getScale(start, end) { + return getDistance(end[0], end[1], PROPS_CLIENT_XY) / getDistance(start[0], start[1], PROPS_CLIENT_XY); + } + + /** + * @private + * calculate the rotation degrees between two pointersets + * @param {Array} start array of pointers + * @param {Array} end array of pointers + * @return {Number} rotation + */ + + function getRotation(start, end) { + return getAngle(end[1], end[0], PROPS_CLIENT_XY) + getAngle(start[1], start[0], PROPS_CLIENT_XY); + } + + /** + * @private + * velocity is calculated every x ms + * @param {Object} session + * @param {Object} input + */ + + function computeIntervalInputData(session, input) { + var last = session.lastInterval || input; + var deltaTime = input.timeStamp - last.timeStamp; + var velocity; + var velocityX; + var velocityY; + var direction; + + if (input.eventType !== INPUT_CANCEL && (deltaTime > COMPUTE_INTERVAL || last.velocity === undefined)) { + var deltaX = input.deltaX - last.deltaX; + var deltaY = input.deltaY - last.deltaY; + var v = getVelocity(deltaTime, deltaX, deltaY); + velocityX = v.x; + velocityY = v.y; + velocity = abs(v.x) > abs(v.y) ? v.x : v.y; + direction = getDirection(deltaX, deltaY); + session.lastInterval = input; + } else { + // use latest velocity info if it doesn't overtake a minimum period + velocity = last.velocity; + velocityX = last.velocityX; + velocityY = last.velocityY; + direction = last.direction; + } + + input.velocity = velocity; + input.velocityX = velocityX; + input.velocityY = velocityY; + input.direction = direction; + } + + /** + * @private + * extend the data with some usable properties like scale, rotate, velocity etc + * @param {Object} manager + * @param {Object} input + */ + + function computeInputData(manager, input) { + var session = manager.session; + var pointers = input.pointers; + var pointersLength = pointers.length; // store the first input to calculate the distance and direction + + if (!session.firstInput) { + session.firstInput = simpleCloneInputData(input); + } // to compute scale and rotation we need to store the multiple touches + + + if (pointersLength > 1 && !session.firstMultiple) { + session.firstMultiple = simpleCloneInputData(input); + } else if (pointersLength === 1) { + session.firstMultiple = false; + } + + var firstInput = session.firstInput, + firstMultiple = session.firstMultiple; + var offsetCenter = firstMultiple ? firstMultiple.center : firstInput.center; + var center = input.center = getCenter(pointers); + input.timeStamp = now(); + input.deltaTime = input.timeStamp - firstInput.timeStamp; + input.angle = getAngle(offsetCenter, center); + input.distance = getDistance(offsetCenter, center); + computeDeltaXY(session, input); + input.offsetDirection = getDirection(input.deltaX, input.deltaY); + var overallVelocity = getVelocity(input.deltaTime, input.deltaX, input.deltaY); + input.overallVelocityX = overallVelocity.x; + input.overallVelocityY = overallVelocity.y; + input.overallVelocity = abs(overallVelocity.x) > abs(overallVelocity.y) ? overallVelocity.x : overallVelocity.y; + input.scale = firstMultiple ? getScale(firstMultiple.pointers, pointers) : 1; + input.rotation = firstMultiple ? getRotation(firstMultiple.pointers, pointers) : 0; + input.maxPointers = !session.prevInput ? input.pointers.length : input.pointers.length > session.prevInput.maxPointers ? input.pointers.length : session.prevInput.maxPointers; + computeIntervalInputData(session, input); // find the correct target + + var target = manager.element; + + if (hasParent(input.srcEvent.target, target)) { + target = input.srcEvent.target; + } + + input.target = target; + } + + /** + * @private + * handle input events + * @param {Manager} manager + * @param {String} eventType + * @param {Object} input + */ + + function inputHandler(manager, eventType, input) { + var pointersLen = input.pointers.length; + var changedPointersLen = input.changedPointers.length; + var isFirst = eventType & INPUT_START && pointersLen - changedPointersLen === 0; + var isFinal = eventType & (INPUT_END | INPUT_CANCEL) && pointersLen - changedPointersLen === 0; + input.isFirst = !!isFirst; + input.isFinal = !!isFinal; + + if (isFirst) { + manager.session = {}; + } // source event is the normalized value of the domEvents + // like 'touchstart, mouseup, pointerdown' + + + input.eventType = eventType; // compute scale, rotation etc + + computeInputData(manager, input); // emit secret event + + manager.emit('hammer.input', input); + manager.recognize(input); + manager.session.prevInput = input; + } + + /** + * @private + * split string on whitespace + * @param {String} str + * @returns {Array} words + */ + function splitStr(str) { + return str.trim().split(/\s+/g); + } + + /** + * @private + * addEventListener with multiple events at once + * @param {EventTarget} target + * @param {String} types + * @param {Function} handler + */ + + function addEventListeners(target, types, handler) { + each(splitStr(types), function (type) { + target.addEventListener(type, handler, false); + }); + } + + /** + * @private + * removeEventListener with multiple events at once + * @param {EventTarget} target + * @param {String} types + * @param {Function} handler + */ + + function removeEventListeners(target, types, handler) { + each(splitStr(types), function (type) { + target.removeEventListener(type, handler, false); + }); + } + + /** + * @private + * get the window object of an element + * @param {HTMLElement} element + * @returns {DocumentView|Window} + */ + function getWindowForElement(element) { + var doc = element.ownerDocument || element; + return doc.defaultView || doc.parentWindow || window; + } + + /** + * @private + * create new input type manager + * @param {Manager} manager + * @param {Function} callback + * @returns {Input} + * @constructor + */ + + var Input = + /*#__PURE__*/ + function () { + function Input(manager, callback) { + var self = this; + this.manager = manager; + this.callback = callback; + this.element = manager.element; + this.target = manager.options.inputTarget; // smaller wrapper around the handler, for the scope and the enabled state of the manager, + // so when disabled the input events are completely bypassed. + + this.domHandler = function (ev) { + if (boolOrFn(manager.options.enable, [manager])) { + self.handler(ev); + } + }; + + this.init(); + } + /** + * @private + * should handle the inputEvent data and trigger the callback + * @virtual + */ + + + var _proto = Input.prototype; + + _proto.handler = function handler() {}; + /** + * @private + * bind the events + */ + + + _proto.init = function init() { + this.evEl && addEventListeners(this.element, this.evEl, this.domHandler); + this.evTarget && addEventListeners(this.target, this.evTarget, this.domHandler); + this.evWin && addEventListeners(getWindowForElement(this.element), this.evWin, this.domHandler); + }; + /** + * @private + * unbind the events + */ + + + _proto.destroy = function destroy() { + this.evEl && removeEventListeners(this.element, this.evEl, this.domHandler); + this.evTarget && removeEventListeners(this.target, this.evTarget, this.domHandler); + this.evWin && removeEventListeners(getWindowForElement(this.element), this.evWin, this.domHandler); + }; + + return Input; + }(); + + /** + * @private + * find if a array contains the object using indexOf or a simple polyFill + * @param {Array} src + * @param {String} find + * @param {String} [findByKey] + * @return {Boolean|Number} false when not found, or the index + */ + function inArray(src, find, findByKey) { + if (src.indexOf && !findByKey) { + return src.indexOf(find); + } else { + var i = 0; + + while (i < src.length) { + if (findByKey && src[i][findByKey] == find || !findByKey && src[i] === find) { + // do not use === here, test fails + return i; + } + + i++; + } + + return -1; + } + } + + var POINTER_INPUT_MAP = { + pointerdown: INPUT_START, + pointermove: INPUT_MOVE, + pointerup: INPUT_END, + pointercancel: INPUT_CANCEL, + pointerout: INPUT_CANCEL + }; // in IE10 the pointer types is defined as an enum + + var IE10_POINTER_TYPE_ENUM = { + 2: INPUT_TYPE_TOUCH, + 3: INPUT_TYPE_PEN, + 4: INPUT_TYPE_MOUSE, + 5: INPUT_TYPE_KINECT // see https://twitter.com/jacobrossi/status/480596438489890816 + + }; + var POINTER_ELEMENT_EVENTS = 'pointerdown'; + var POINTER_WINDOW_EVENTS = 'pointermove pointerup pointercancel'; // IE10 has prefixed support, and case-sensitive + + if (win.MSPointerEvent && !win.PointerEvent) { + POINTER_ELEMENT_EVENTS = 'MSPointerDown'; + POINTER_WINDOW_EVENTS = 'MSPointerMove MSPointerUp MSPointerCancel'; + } + /** + * @private + * Pointer events input + * @constructor + * @extends Input + */ + + + var PointerEventInput = + /*#__PURE__*/ + function (_Input) { + _inheritsLoose(PointerEventInput, _Input); + + function PointerEventInput() { + var _this; + + var proto = PointerEventInput.prototype; + proto.evEl = POINTER_ELEMENT_EVENTS; + proto.evWin = POINTER_WINDOW_EVENTS; + _this = _Input.apply(this, arguments) || this; + _this.store = _this.manager.session.pointerEvents = []; + return _this; + } + /** + * @private + * handle mouse events + * @param {Object} ev + */ + + + var _proto = PointerEventInput.prototype; + + _proto.handler = function handler(ev) { + var store = this.store; + var removePointer = false; + var eventTypeNormalized = ev.type.toLowerCase().replace('ms', ''); + var eventType = POINTER_INPUT_MAP[eventTypeNormalized]; + var pointerType = IE10_POINTER_TYPE_ENUM[ev.pointerType] || ev.pointerType; + var isTouch = pointerType === INPUT_TYPE_TOUCH; // get index of the event in the store + + var storeIndex = inArray(store, ev.pointerId, 'pointerId'); // start and mouse must be down + + if (eventType & INPUT_START && (ev.button === 0 || isTouch)) { + if (storeIndex < 0) { + store.push(ev); + storeIndex = store.length - 1; + } + } else if (eventType & (INPUT_END | INPUT_CANCEL)) { + removePointer = true; + } // it not found, so the pointer hasn't been down (so it's probably a hover) + + + if (storeIndex < 0) { + return; + } // update the event in the store + + + store[storeIndex] = ev; + this.callback(this.manager, eventType, { + pointers: store, + changedPointers: [ev], + pointerType: pointerType, + srcEvent: ev + }); + + if (removePointer) { + // remove from the store + store.splice(storeIndex, 1); + } + }; + + return PointerEventInput; + }(Input); + + /** + * @private + * convert array-like objects to real arrays + * @param {Object} obj + * @returns {Array} + */ + function toArray(obj) { + return Array.prototype.slice.call(obj, 0); + } + + /** + * @private + * unique array with objects based on a key (like 'id') or just by the array's value + * @param {Array} src [{id:1},{id:2},{id:1}] + * @param {String} [key] + * @param {Boolean} [sort=False] + * @returns {Array} [{id:1},{id:2}] + */ + + function uniqueArray(src, key, sort) { + var results = []; + var values = []; + var i = 0; + + while (i < src.length) { + var val = key ? src[i][key] : src[i]; + + if (inArray(values, val) < 0) { + results.push(src[i]); + } + + values[i] = val; + i++; + } + + if (sort) { + if (!key) { + results = results.sort(); + } else { + results = results.sort(function (a, b) { + return a[key] > b[key]; + }); + } + } + + return results; + } + + var TOUCH_INPUT_MAP = { + touchstart: INPUT_START, + touchmove: INPUT_MOVE, + touchend: INPUT_END, + touchcancel: INPUT_CANCEL + }; + var TOUCH_TARGET_EVENTS = 'touchstart touchmove touchend touchcancel'; + /** + * @private + * Multi-user touch events input + * @constructor + * @extends Input + */ + + var TouchInput = + /*#__PURE__*/ + function (_Input) { + _inheritsLoose(TouchInput, _Input); + + function TouchInput() { + var _this; + + TouchInput.prototype.evTarget = TOUCH_TARGET_EVENTS; + _this = _Input.apply(this, arguments) || this; + _this.targetIds = {}; // this.evTarget = TOUCH_TARGET_EVENTS; + + return _this; + } + + var _proto = TouchInput.prototype; + + _proto.handler = function handler(ev) { + var type = TOUCH_INPUT_MAP[ev.type]; + var touches = getTouches.call(this, ev, type); + + if (!touches) { + return; + } + + this.callback(this.manager, type, { + pointers: touches[0], + changedPointers: touches[1], + pointerType: INPUT_TYPE_TOUCH, + srcEvent: ev + }); + }; + + return TouchInput; + }(Input); + + function getTouches(ev, type) { + var allTouches = toArray(ev.touches); + var targetIds = this.targetIds; // when there is only one touch, the process can be simplified + + if (type & (INPUT_START | INPUT_MOVE) && allTouches.length === 1) { + targetIds[allTouches[0].identifier] = true; + return [allTouches, allTouches]; + } + + var i; + var targetTouches; + var changedTouches = toArray(ev.changedTouches); + var changedTargetTouches = []; + var target = this.target; // get target touches from touches + + targetTouches = allTouches.filter(function (touch) { + return hasParent(touch.target, target); + }); // collect touches + + if (type === INPUT_START) { + i = 0; + + while (i < targetTouches.length) { + targetIds[targetTouches[i].identifier] = true; + i++; + } + } // filter changed touches to only contain touches that exist in the collected target ids + + + i = 0; + + while (i < changedTouches.length) { + if (targetIds[changedTouches[i].identifier]) { + changedTargetTouches.push(changedTouches[i]); + } // cleanup removed touches + + + if (type & (INPUT_END | INPUT_CANCEL)) { + delete targetIds[changedTouches[i].identifier]; + } + + i++; + } + + if (!changedTargetTouches.length) { + return; + } + + return [// merge targetTouches with changedTargetTouches so it contains ALL touches, including 'end' and 'cancel' + uniqueArray(targetTouches.concat(changedTargetTouches), 'identifier', true), changedTargetTouches]; + } + + var MOUSE_INPUT_MAP = { + mousedown: INPUT_START, + mousemove: INPUT_MOVE, + mouseup: INPUT_END + }; + var MOUSE_ELEMENT_EVENTS = 'mousedown'; + var MOUSE_WINDOW_EVENTS = 'mousemove mouseup'; + /** + * @private + * Mouse events input + * @constructor + * @extends Input + */ + + var MouseInput = + /*#__PURE__*/ + function (_Input) { + _inheritsLoose(MouseInput, _Input); + + function MouseInput() { + var _this; + + var proto = MouseInput.prototype; + proto.evEl = MOUSE_ELEMENT_EVENTS; + proto.evWin = MOUSE_WINDOW_EVENTS; + _this = _Input.apply(this, arguments) || this; + _this.pressed = false; // mousedown state + + return _this; + } + /** + * @private + * handle mouse events + * @param {Object} ev + */ + + + var _proto = MouseInput.prototype; + + _proto.handler = function handler(ev) { + var eventType = MOUSE_INPUT_MAP[ev.type]; // on start we want to have the left mouse button down + + if (eventType & INPUT_START && ev.button === 0) { + this.pressed = true; + } + + if (eventType & INPUT_MOVE && ev.which !== 1) { + eventType = INPUT_END; + } // mouse must be down + + + if (!this.pressed) { + return; + } + + if (eventType & INPUT_END) { + this.pressed = false; + } + + this.callback(this.manager, eventType, { + pointers: [ev], + changedPointers: [ev], + pointerType: INPUT_TYPE_MOUSE, + srcEvent: ev + }); + }; + + return MouseInput; + }(Input); + + /** + * @private + * Combined touch and mouse input + * + * Touch has a higher priority then mouse, and while touching no mouse events are allowed. + * This because touch devices also emit mouse events while doing a touch. + * + * @constructor + * @extends Input + */ + + var DEDUP_TIMEOUT = 2500; + var DEDUP_DISTANCE = 25; + + function setLastTouch(eventData) { + var _eventData$changedPoi = eventData.changedPointers, + touch = _eventData$changedPoi[0]; + + if (touch.identifier === this.primaryTouch) { + var lastTouch = { + x: touch.clientX, + y: touch.clientY + }; + var lts = this.lastTouches; + this.lastTouches.push(lastTouch); + + var removeLastTouch = function removeLastTouch() { + var i = lts.indexOf(lastTouch); + + if (i > -1) { + lts.splice(i, 1); + } + }; + + setTimeout(removeLastTouch, DEDUP_TIMEOUT); + } + } + + function recordTouches(eventType, eventData) { + if (eventType & INPUT_START) { + this.primaryTouch = eventData.changedPointers[0].identifier; + setLastTouch.call(this, eventData); + } else if (eventType & (INPUT_END | INPUT_CANCEL)) { + setLastTouch.call(this, eventData); + } + } + + function isSyntheticEvent(eventData) { + var x = eventData.srcEvent.clientX; + var y = eventData.srcEvent.clientY; + + for (var i = 0; i < this.lastTouches.length; i++) { + var t = this.lastTouches[i]; + var dx = Math.abs(x - t.x); + var dy = Math.abs(y - t.y); + + if (dx <= DEDUP_DISTANCE && dy <= DEDUP_DISTANCE) { + return true; + } + } + + return false; + } + + var TouchMouseInput = + /*#__PURE__*/ + function () { + var TouchMouseInput = + /*#__PURE__*/ + function (_Input) { + _inheritsLoose(TouchMouseInput, _Input); + + function TouchMouseInput(_manager, callback) { + var _this; + + _this = _Input.call(this, _manager, callback) || this; + + _this.handler = function (manager, inputEvent, inputData) { + var isTouch = inputData.pointerType === INPUT_TYPE_TOUCH; + var isMouse = inputData.pointerType === INPUT_TYPE_MOUSE; + + if (isMouse && inputData.sourceCapabilities && inputData.sourceCapabilities.firesTouchEvents) { + return; + } // when we're in a touch event, record touches to de-dupe synthetic mouse event + + + if (isTouch) { + recordTouches.call(_assertThisInitialized(_assertThisInitialized(_this)), inputEvent, inputData); + } else if (isMouse && isSyntheticEvent.call(_assertThisInitialized(_assertThisInitialized(_this)), inputData)) { + return; + } + + _this.callback(manager, inputEvent, inputData); + }; + + _this.touch = new TouchInput(_this.manager, _this.handler); + _this.mouse = new MouseInput(_this.manager, _this.handler); + _this.primaryTouch = null; + _this.lastTouches = []; + return _this; + } + /** + * @private + * handle mouse and touch events + * @param {Hammer} manager + * @param {String} inputEvent + * @param {Object} inputData + */ + + + var _proto = TouchMouseInput.prototype; + + /** + * @private + * remove the event listeners + */ + _proto.destroy = function destroy() { + this.touch.destroy(); + this.mouse.destroy(); + }; + + return TouchMouseInput; + }(Input); + + return TouchMouseInput; + }(); + + /** + * @private + * create new input type manager + * called by the Manager constructor + * @param {Hammer} manager + * @returns {Input} + */ + + function createInputInstance(manager) { + var Type; // let inputClass = manager.options.inputClass; + + var inputClass = manager.options.inputClass; + + if (inputClass) { + Type = inputClass; + } else if (SUPPORT_POINTER_EVENTS) { + Type = PointerEventInput; + } else if (SUPPORT_ONLY_TOUCH) { + Type = TouchInput; + } else if (!SUPPORT_TOUCH) { + Type = MouseInput; + } else { + Type = TouchMouseInput; + } + + return new Type(manager, inputHandler); + } + + /** + * @private + * if the argument is an array, we want to execute the fn on each entry + * if it aint an array we don't want to do a thing. + * this is used by all the methods that accept a single and array argument. + * @param {*|Array} arg + * @param {String} fn + * @param {Object} [context] + * @returns {Boolean} + */ + + function invokeArrayArg(arg, fn, context) { + if (Array.isArray(arg)) { + each(arg, context[fn], context); + return true; + } + + return false; + } + + var STATE_POSSIBLE = 1; + var STATE_BEGAN = 2; + var STATE_CHANGED = 4; + var STATE_ENDED = 8; + var STATE_RECOGNIZED = STATE_ENDED; + var STATE_CANCELLED = 16; + var STATE_FAILED = 32; + + /** + * @private + * get a unique id + * @returns {number} uniqueId + */ + var _uniqueId = 1; + function uniqueId() { + return _uniqueId++; + } + + /** + * @private + * get a recognizer by name if it is bound to a manager + * @param {Recognizer|String} otherRecognizer + * @param {Recognizer} recognizer + * @returns {Recognizer} + */ + function getRecognizerByNameIfManager(otherRecognizer, recognizer) { + var manager = recognizer.manager; + + if (manager) { + return manager.get(otherRecognizer); + } + + return otherRecognizer; + } + + /** + * @private + * get a usable string, used as event postfix + * @param {constant} state + * @returns {String} state + */ + + function stateStr(state) { + if (state & STATE_CANCELLED) { + return 'cancel'; + } else if (state & STATE_ENDED) { + return 'end'; + } else if (state & STATE_CHANGED) { + return 'move'; + } else if (state & STATE_BEGAN) { + return 'start'; + } + + return ''; + } + + /** + * @private + * Recognizer flow explained; * + * All recognizers have the initial state of POSSIBLE when a input session starts. + * The definition of a input session is from the first input until the last input, with all it's movement in it. * + * Example session for mouse-input: mousedown -> mousemove -> mouseup + * + * On each recognizing cycle (see Manager.recognize) the .recognize() method is executed + * which determines with state it should be. + * + * If the recognizer has the state FAILED, CANCELLED or RECOGNIZED (equals ENDED), it is reset to + * POSSIBLE to give it another change on the next cycle. + * + * Possible + * | + * +-----+---------------+ + * | | + * +-----+-----+ | + * | | | + * Failed Cancelled | + * +-------+------+ + * | | + * Recognized Began + * | + * Changed + * | + * Ended/Recognized + */ + + /** + * @private + * Recognizer + * Every recognizer needs to extend from this class. + * @constructor + * @param {Object} options + */ + + var Recognizer = + /*#__PURE__*/ + function () { + function Recognizer(options) { + if (options === void 0) { + options = {}; + } + + this.options = _extends({ + enable: true + }, options); + this.id = uniqueId(); + this.manager = null; // default is enable true + + this.state = STATE_POSSIBLE; + this.simultaneous = {}; + this.requireFail = []; + } + /** + * @private + * set options + * @param {Object} options + * @return {Recognizer} + */ + + + var _proto = Recognizer.prototype; + + _proto.set = function set(options) { + assign$1(this.options, options); // also update the touchAction, in case something changed about the directions/enabled state + + this.manager && this.manager.touchAction.update(); + return this; + }; + /** + * @private + * recognize simultaneous with an other recognizer. + * @param {Recognizer} otherRecognizer + * @returns {Recognizer} this + */ + + + _proto.recognizeWith = function recognizeWith(otherRecognizer) { + if (invokeArrayArg(otherRecognizer, 'recognizeWith', this)) { + return this; + } + + var simultaneous = this.simultaneous; + otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this); + + if (!simultaneous[otherRecognizer.id]) { + simultaneous[otherRecognizer.id] = otherRecognizer; + otherRecognizer.recognizeWith(this); + } + + return this; + }; + /** + * @private + * drop the simultaneous link. it doesnt remove the link on the other recognizer. + * @param {Recognizer} otherRecognizer + * @returns {Recognizer} this + */ + + + _proto.dropRecognizeWith = function dropRecognizeWith(otherRecognizer) { + if (invokeArrayArg(otherRecognizer, 'dropRecognizeWith', this)) { + return this; + } + + otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this); + delete this.simultaneous[otherRecognizer.id]; + return this; + }; + /** + * @private + * recognizer can only run when an other is failing + * @param {Recognizer} otherRecognizer + * @returns {Recognizer} this + */ + + + _proto.requireFailure = function requireFailure(otherRecognizer) { + if (invokeArrayArg(otherRecognizer, 'requireFailure', this)) { + return this; + } + + var requireFail = this.requireFail; + otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this); + + if (inArray(requireFail, otherRecognizer) === -1) { + requireFail.push(otherRecognizer); + otherRecognizer.requireFailure(this); + } + + return this; + }; + /** + * @private + * drop the requireFailure link. it does not remove the link on the other recognizer. + * @param {Recognizer} otherRecognizer + * @returns {Recognizer} this + */ + + + _proto.dropRequireFailure = function dropRequireFailure(otherRecognizer) { + if (invokeArrayArg(otherRecognizer, 'dropRequireFailure', this)) { + return this; + } + + otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this); + var index = inArray(this.requireFail, otherRecognizer); + + if (index > -1) { + this.requireFail.splice(index, 1); + } + + return this; + }; + /** + * @private + * has require failures boolean + * @returns {boolean} + */ + + + _proto.hasRequireFailures = function hasRequireFailures() { + return this.requireFail.length > 0; + }; + /** + * @private + * if the recognizer can recognize simultaneous with an other recognizer + * @param {Recognizer} otherRecognizer + * @returns {Boolean} + */ + + + _proto.canRecognizeWith = function canRecognizeWith(otherRecognizer) { + return !!this.simultaneous[otherRecognizer.id]; + }; + /** + * @private + * You should use `tryEmit` instead of `emit` directly to check + * that all the needed recognizers has failed before emitting. + * @param {Object} input + */ + + + _proto.emit = function emit(input) { + var self = this; + var state = this.state; + + function emit(event) { + self.manager.emit(event, input); + } // 'panstart' and 'panmove' + + + if (state < STATE_ENDED) { + emit(self.options.event + stateStr(state)); + } + + emit(self.options.event); // simple 'eventName' events + + if (input.additionalEvent) { + // additional event(panleft, panright, pinchin, pinchout...) + emit(input.additionalEvent); + } // panend and pancancel + + + if (state >= STATE_ENDED) { + emit(self.options.event + stateStr(state)); + } + }; + /** + * @private + * Check that all the require failure recognizers has failed, + * if true, it emits a gesture event, + * otherwise, setup the state to FAILED. + * @param {Object} input + */ + + + _proto.tryEmit = function tryEmit(input) { + if (this.canEmit()) { + return this.emit(input); + } // it's failing anyway + + + this.state = STATE_FAILED; + }; + /** + * @private + * can we emit? + * @returns {boolean} + */ + + + _proto.canEmit = function canEmit() { + var i = 0; + + while (i < this.requireFail.length) { + if (!(this.requireFail[i].state & (STATE_FAILED | STATE_POSSIBLE))) { + return false; + } + + i++; + } + + return true; + }; + /** + * @private + * update the recognizer + * @param {Object} inputData + */ + + + _proto.recognize = function recognize(inputData) { + // make a new copy of the inputData + // so we can change the inputData without messing up the other recognizers + var inputDataClone = assign$1({}, inputData); // is is enabled and allow recognizing? + + if (!boolOrFn(this.options.enable, [this, inputDataClone])) { + this.reset(); + this.state = STATE_FAILED; + return; + } // reset when we've reached the end + + + if (this.state & (STATE_RECOGNIZED | STATE_CANCELLED | STATE_FAILED)) { + this.state = STATE_POSSIBLE; + } + + this.state = this.process(inputDataClone); // the recognizer has recognized a gesture + // so trigger an event + + if (this.state & (STATE_BEGAN | STATE_CHANGED | STATE_ENDED | STATE_CANCELLED)) { + this.tryEmit(inputDataClone); + } + }; + /** + * @private + * return the state of the recognizer + * the actual recognizing happens in this method + * @virtual + * @param {Object} inputData + * @returns {constant} STATE + */ + + /* jshint ignore:start */ + + + _proto.process = function process(inputData) {}; + /* jshint ignore:end */ + + /** + * @private + * return the preferred touch-action + * @virtual + * @returns {Array} + */ + + + _proto.getTouchAction = function getTouchAction() {}; + /** + * @private + * called when the gesture isn't allowed to recognize + * like when another is being recognized or it is disabled + * @virtual + */ + + + _proto.reset = function reset() {}; + + return Recognizer; + }(); + + var defaults = { + /** + * @private + * set if DOM events are being triggered. + * But this is slower and unused by simple implementations, so disabled by default. + * @type {Boolean} + * @default false + */ + domEvents: false, + + /** + * @private + * The value for the touchAction property/fallback. + * When set to `compute` it will magically set the correct value based on the added recognizers. + * @type {String} + * @default compute + */ + touchAction: TOUCH_ACTION_COMPUTE, + + /** + * @private + * @type {Boolean} + * @default true + */ + enable: true, + + /** + * @private + * EXPERIMENTAL FEATURE -- can be removed/changed + * Change the parent input target element. + * If Null, then it is being set the to main element. + * @type {Null|EventTarget} + * @default null + */ + inputTarget: null, + + /** + * @private + * force an input class + * @type {Null|Function} + * @default null + */ + inputClass: null, + + /** + * @private + * Default recognizer setup when calling `Hammer()` + * When creating a new Manager these will be skipped. + * @type {Array} + */ + preset: [], + + /** + * @private + * Some CSS properties can be used to improve the working of Hammer. + * Add them to this method and they will be set when creating a new Manager. + * @namespace + */ + cssProps: { + /** + * @private + * Disables text selection to improve the dragging gesture. Mainly for desktop browsers. + * @type {String} + * @default 'none' + */ + userSelect: "none", + + /** + * @private + * Disable the Windows Phone grippers when pressing an element. + * @type {String} + * @default 'none' + */ + touchSelect: "none", + + /** + * @private + * Disables the default callout shown when you touch and hold a touch target. + * On iOS, when you touch and hold a touch target such as a link, Safari displays + * a callout containing information about the link. This property allows you to disable that callout. + * @type {String} + * @default 'none' + */ + touchCallout: "none", + + /** + * @private + * Specifies whether zooming is enabled. Used by IE10> + * @type {String} + * @default 'none' + */ + contentZooming: "none", + + /** + * @private + * Specifies that an entire element should be draggable instead of its contents. Mainly for desktop browsers. + * @type {String} + * @default 'none' + */ + userDrag: "none", + + /** + * @private + * Overrides the highlight color shown when the user taps a link or a JavaScript + * clickable element in iOS. This property obeys the alpha value, if specified. + * @type {String} + * @default 'rgba(0,0,0,0)' + */ + tapHighlightColor: "rgba(0,0,0,0)" + } + }; + + var STOP = 1; + var FORCED_STOP = 2; + /** + * @private + * add/remove the css properties as defined in manager.options.cssProps + * @param {Manager} manager + * @param {Boolean} add + */ + + function toggleCssProps(manager, add) { + var element = manager.element; + + if (!element.style) { + return; + } + + var prop; + each(manager.options.cssProps, function (value, name) { + prop = prefixed(element.style, name); + + if (add) { + manager.oldCssProps[prop] = element.style[prop]; + element.style[prop] = value; + } else { + element.style[prop] = manager.oldCssProps[prop] || ""; + } + }); + + if (!add) { + manager.oldCssProps = {}; + } + } + /** + * @private + * trigger dom event + * @param {String} event + * @param {Object} data + */ + + + function triggerDomEvent(event, data) { + var gestureEvent = document.createEvent("Event"); + gestureEvent.initEvent(event, true, true); + gestureEvent.gesture = data; + data.target.dispatchEvent(gestureEvent); + } + /** + * @private + * Manager + * @param {HTMLElement} element + * @param {Object} [options] + * @constructor + */ + + + var Manager = + /*#__PURE__*/ + function () { + function Manager(element, options) { + var _this = this; + + this.options = assign$1({}, defaults, options || {}); + this.options.inputTarget = this.options.inputTarget || element; + this.handlers = {}; + this.session = {}; + this.recognizers = []; + this.oldCssProps = {}; + this.element = element; + this.input = createInputInstance(this); + this.touchAction = new TouchAction(this, this.options.touchAction); + toggleCssProps(this, true); + each(this.options.recognizers, function (item) { + var recognizer = _this.add(new item[0](item[1])); + + item[2] && recognizer.recognizeWith(item[2]); + item[3] && recognizer.requireFailure(item[3]); + }, this); + } + /** + * @private + * set options + * @param {Object} options + * @returns {Manager} + */ + + + var _proto = Manager.prototype; + + _proto.set = function set(options) { + assign$1(this.options, options); // Options that need a little more setup + + if (options.touchAction) { + this.touchAction.update(); + } + + if (options.inputTarget) { + // Clean up existing event listeners and reinitialize + this.input.destroy(); + this.input.target = options.inputTarget; + this.input.init(); + } + + return this; + }; + /** + * @private + * stop recognizing for this session. + * This session will be discarded, when a new [input]start event is fired. + * When forced, the recognizer cycle is stopped immediately. + * @param {Boolean} [force] + */ + + + _proto.stop = function stop(force) { + this.session.stopped = force ? FORCED_STOP : STOP; + }; + /** + * @private + * run the recognizers! + * called by the inputHandler function on every movement of the pointers (touches) + * it walks through all the recognizers and tries to detect the gesture that is being made + * @param {Object} inputData + */ + + + _proto.recognize = function recognize(inputData) { + var session = this.session; + + if (session.stopped) { + return; + } // run the touch-action polyfill + + + this.touchAction.preventDefaults(inputData); + var recognizer; + var recognizers = this.recognizers; // this holds the recognizer that is being recognized. + // so the recognizer's state needs to be BEGAN, CHANGED, ENDED or RECOGNIZED + // if no recognizer is detecting a thing, it is set to `null` + + var curRecognizer = session.curRecognizer; // reset when the last recognizer is recognized + // or when we're in a new session + + if (!curRecognizer || curRecognizer && curRecognizer.state & STATE_RECOGNIZED) { + session.curRecognizer = null; + curRecognizer = null; + } + + var i = 0; + + while (i < recognizers.length) { + recognizer = recognizers[i]; // find out if we are allowed try to recognize the input for this one. + // 1. allow if the session is NOT forced stopped (see the .stop() method) + // 2. allow if we still haven't recognized a gesture in this session, or the this recognizer is the one + // that is being recognized. + // 3. allow if the recognizer is allowed to run simultaneous with the current recognized recognizer. + // this can be setup with the `recognizeWith()` method on the recognizer. + + if (session.stopped !== FORCED_STOP && ( // 1 + !curRecognizer || recognizer === curRecognizer || // 2 + recognizer.canRecognizeWith(curRecognizer))) { + // 3 + recognizer.recognize(inputData); + } else { + recognizer.reset(); + } // if the recognizer has been recognizing the input as a valid gesture, we want to store this one as the + // current active recognizer. but only if we don't already have an active recognizer + + + if (!curRecognizer && recognizer.state & (STATE_BEGAN | STATE_CHANGED | STATE_ENDED)) { + session.curRecognizer = recognizer; + curRecognizer = recognizer; + } + + i++; + } + }; + /** + * @private + * get a recognizer by its event name. + * @param {Recognizer|String} recognizer + * @returns {Recognizer|Null} + */ + + + _proto.get = function get(recognizer) { + if (recognizer instanceof Recognizer) { + return recognizer; + } + + var recognizers = this.recognizers; + + for (var i = 0; i < recognizers.length; i++) { + if (recognizers[i].options.event === recognizer) { + return recognizers[i]; + } + } + + return null; + }; + /** + * @private add a recognizer to the manager + * existing recognizers with the same event name will be removed + * @param {Recognizer} recognizer + * @returns {Recognizer|Manager} + */ + + + _proto.add = function add(recognizer) { + if (invokeArrayArg(recognizer, "add", this)) { + return this; + } // remove existing + + + var existing = this.get(recognizer.options.event); + + if (existing) { + this.remove(existing); + } + + this.recognizers.push(recognizer); + recognizer.manager = this; + this.touchAction.update(); + return recognizer; + }; + /** + * @private + * remove a recognizer by name or instance + * @param {Recognizer|String} recognizer + * @returns {Manager} + */ + + + _proto.remove = function remove(recognizer) { + if (invokeArrayArg(recognizer, "remove", this)) { + return this; + } + + var targetRecognizer = this.get(recognizer); // let's make sure this recognizer exists + + if (recognizer) { + var recognizers = this.recognizers; + var index = inArray(recognizers, targetRecognizer); + + if (index !== -1) { + recognizers.splice(index, 1); + this.touchAction.update(); + } + } + + return this; + }; + /** + * @private + * bind event + * @param {String} events + * @param {Function} handler + * @returns {EventEmitter} this + */ + + + _proto.on = function on(events, handler) { + if (events === undefined || handler === undefined) { + return this; + } + + var handlers = this.handlers; + each(splitStr(events), function (event) { + handlers[event] = handlers[event] || []; + handlers[event].push(handler); + }); + return this; + }; + /** + * @private unbind event, leave emit blank to remove all handlers + * @param {String} events + * @param {Function} [handler] + * @returns {EventEmitter} this + */ + + + _proto.off = function off(events, handler) { + if (events === undefined) { + return this; + } + + var handlers = this.handlers; + each(splitStr(events), function (event) { + if (!handler) { + delete handlers[event]; + } else { + handlers[event] && handlers[event].splice(inArray(handlers[event], handler), 1); + } + }); + return this; + }; + /** + * @private emit event to the listeners + * @param {String} event + * @param {Object} data + */ + + + _proto.emit = function emit(event, data) { + // we also want to trigger dom events + if (this.options.domEvents) { + triggerDomEvent(event, data); + } // no handlers, so skip it all + + + var handlers = this.handlers[event] && this.handlers[event].slice(); + + if (!handlers || !handlers.length) { + return; + } + + data.type = event; + + data.preventDefault = function () { + data.srcEvent.preventDefault(); + }; + + var i = 0; + + while (i < handlers.length) { + handlers[i](data); + i++; + } + }; + /** + * @private + * destroy the manager and unbinds all events + * it doesn't unbind dom events, that is the user own responsibility + */ + + + _proto.destroy = function destroy() { + this.element && toggleCssProps(this, false); + this.handlers = {}; + this.session = {}; + this.input.destroy(); + this.element = null; + }; + + return Manager; + }(); + + var SINGLE_TOUCH_INPUT_MAP = { + touchstart: INPUT_START, + touchmove: INPUT_MOVE, + touchend: INPUT_END, + touchcancel: INPUT_CANCEL + }; + var SINGLE_TOUCH_TARGET_EVENTS = 'touchstart'; + var SINGLE_TOUCH_WINDOW_EVENTS = 'touchstart touchmove touchend touchcancel'; + /** + * @private + * Touch events input + * @constructor + * @extends Input + */ + + var SingleTouchInput = + /*#__PURE__*/ + function (_Input) { + _inheritsLoose(SingleTouchInput, _Input); + + function SingleTouchInput() { + var _this; + + var proto = SingleTouchInput.prototype; + proto.evTarget = SINGLE_TOUCH_TARGET_EVENTS; + proto.evWin = SINGLE_TOUCH_WINDOW_EVENTS; + _this = _Input.apply(this, arguments) || this; + _this.started = false; + return _this; + } + + var _proto = SingleTouchInput.prototype; + + _proto.handler = function handler(ev) { + var type = SINGLE_TOUCH_INPUT_MAP[ev.type]; // should we handle the touch events? + + if (type === INPUT_START) { + this.started = true; + } + + if (!this.started) { + return; + } + + var touches = normalizeSingleTouches.call(this, ev, type); // when done, reset the started state + + if (type & (INPUT_END | INPUT_CANCEL) && touches[0].length - touches[1].length === 0) { + this.started = false; + } + + this.callback(this.manager, type, { + pointers: touches[0], + changedPointers: touches[1], + pointerType: INPUT_TYPE_TOUCH, + srcEvent: ev + }); + }; + + return SingleTouchInput; + }(Input); + + function normalizeSingleTouches(ev, type) { + var all = toArray(ev.touches); + var changed = toArray(ev.changedTouches); + + if (type & (INPUT_END | INPUT_CANCEL)) { + all = uniqueArray(all.concat(changed), 'identifier', true); + } + + return [all, changed]; + } + + /** + * @private + * This recognizer is just used as a base for the simple attribute recognizers. + * @constructor + * @extends Recognizer + */ + + var AttrRecognizer = + /*#__PURE__*/ + function (_Recognizer) { + _inheritsLoose(AttrRecognizer, _Recognizer); + + function AttrRecognizer(options) { + if (options === void 0) { + options = {}; + } + + return _Recognizer.call(this, _extends({ + pointers: 1 + }, options)) || this; + } + /** + * @private + * Used to check if it the recognizer receives valid input, like input.distance > 10. + * @memberof AttrRecognizer + * @param {Object} input + * @returns {Boolean} recognized + */ + + + var _proto = AttrRecognizer.prototype; + + _proto.attrTest = function attrTest(input) { + var optionPointers = this.options.pointers; + return optionPointers === 0 || input.pointers.length === optionPointers; + }; + /** + * @private + * Process the input and return the state for the recognizer + * @memberof AttrRecognizer + * @param {Object} input + * @returns {*} State + */ + + + _proto.process = function process(input) { + var state = this.state; + var eventType = input.eventType; + var isRecognized = state & (STATE_BEGAN | STATE_CHANGED); + var isValid = this.attrTest(input); // on cancel input and we've recognized before, return STATE_CANCELLED + + if (isRecognized && (eventType & INPUT_CANCEL || !isValid)) { + return state | STATE_CANCELLED; + } else if (isRecognized || isValid) { + if (eventType & INPUT_END) { + return state | STATE_ENDED; + } else if (!(state & STATE_BEGAN)) { + return STATE_BEGAN; + } + + return state | STATE_CHANGED; + } + + return STATE_FAILED; + }; + + return AttrRecognizer; + }(Recognizer); + + /** + * @private + * A tap is recognized when the pointer is doing a small tap/click. Multiple taps are recognized if they occur + * between the given interval and position. The delay option can be used to recognize multi-taps without firing + * a single tap. + * + * The eventData from the emitted event contains the property `tapCount`, which contains the amount of + * multi-taps being recognized. + * @constructor + * @extends Recognizer + */ + + var TapRecognizer = + /*#__PURE__*/ + function (_Recognizer) { + _inheritsLoose(TapRecognizer, _Recognizer); + + function TapRecognizer(options) { + var _this; + + if (options === void 0) { + options = {}; + } + + _this = _Recognizer.call(this, _extends({ + event: 'tap', + pointers: 1, + taps: 1, + interval: 300, + // max time between the multi-tap taps + time: 250, + // max time of the pointer to be down (like finger on the screen) + threshold: 9, + // a minimal movement is ok, but keep it low + posThreshold: 10 + }, options)) || this; // previous time and center, + // used for tap counting + + _this.pTime = false; + _this.pCenter = false; + _this._timer = null; + _this._input = null; + _this.count = 0; + return _this; + } + + var _proto = TapRecognizer.prototype; + + _proto.getTouchAction = function getTouchAction() { + return [TOUCH_ACTION_MANIPULATION]; + }; + + _proto.process = function process(input) { + var _this2 = this; + + var options = this.options; + var validPointers = input.pointers.length === options.pointers; + var validMovement = input.distance < options.threshold; + var validTouchTime = input.deltaTime < options.time; + this.reset(); + + if (input.eventType & INPUT_START && this.count === 0) { + return this.failTimeout(); + } // we only allow little movement + // and we've reached an end event, so a tap is possible + + + if (validMovement && validTouchTime && validPointers) { + if (input.eventType !== INPUT_END) { + return this.failTimeout(); + } + + var validInterval = this.pTime ? input.timeStamp - this.pTime < options.interval : true; + var validMultiTap = !this.pCenter || getDistance(this.pCenter, input.center) < options.posThreshold; + this.pTime = input.timeStamp; + this.pCenter = input.center; + + if (!validMultiTap || !validInterval) { + this.count = 1; + } else { + this.count += 1; + } + + this._input = input; // if tap count matches we have recognized it, + // else it has began recognizing... + + var tapCount = this.count % options.taps; + + if (tapCount === 0) { + // no failing requirements, immediately trigger the tap event + // or wait as long as the multitap interval to trigger + if (!this.hasRequireFailures()) { + return STATE_RECOGNIZED; + } else { + this._timer = setTimeout(function () { + _this2.state = STATE_RECOGNIZED; + + _this2.tryEmit(); + }, options.interval); + return STATE_BEGAN; + } + } + } + + return STATE_FAILED; + }; + + _proto.failTimeout = function failTimeout() { + var _this3 = this; + + this._timer = setTimeout(function () { + _this3.state = STATE_FAILED; + }, this.options.interval); + return STATE_FAILED; + }; + + _proto.reset = function reset() { + clearTimeout(this._timer); + }; + + _proto.emit = function emit() { + if (this.state === STATE_RECOGNIZED) { + this._input.tapCount = this.count; + this.manager.emit(this.options.event, this._input); + } + }; + + return TapRecognizer; + }(Recognizer); + + /** + * @private + * direction cons to string + * @param {constant} direction + * @returns {String} + */ + + function directionStr(direction) { + if (direction === DIRECTION_DOWN) { + return 'down'; + } else if (direction === DIRECTION_UP) { + return 'up'; + } else if (direction === DIRECTION_LEFT) { + return 'left'; + } else if (direction === DIRECTION_RIGHT) { + return 'right'; + } + + return ''; + } + + /** + * @private + * Pan + * Recognized when the pointer is down and moved in the allowed direction. + * @constructor + * @extends AttrRecognizer + */ + + var PanRecognizer = + /*#__PURE__*/ + function (_AttrRecognizer) { + _inheritsLoose(PanRecognizer, _AttrRecognizer); + + function PanRecognizer(options) { + var _this; + + if (options === void 0) { + options = {}; + } + + _this = _AttrRecognizer.call(this, _extends({ + event: 'pan', + threshold: 10, + pointers: 1, + direction: DIRECTION_ALL + }, options)) || this; + _this.pX = null; + _this.pY = null; + return _this; + } + + var _proto = PanRecognizer.prototype; + + _proto.getTouchAction = function getTouchAction() { + var direction = this.options.direction; + var actions = []; + + if (direction & DIRECTION_HORIZONTAL) { + actions.push(TOUCH_ACTION_PAN_Y); + } + + if (direction & DIRECTION_VERTICAL) { + actions.push(TOUCH_ACTION_PAN_X); + } + + return actions; + }; + + _proto.directionTest = function directionTest(input) { + var options = this.options; + var hasMoved = true; + var distance = input.distance; + var direction = input.direction; + var x = input.deltaX; + var y = input.deltaY; // lock to axis? + + if (!(direction & options.direction)) { + if (options.direction & DIRECTION_HORIZONTAL) { + direction = x === 0 ? DIRECTION_NONE : x < 0 ? DIRECTION_LEFT : DIRECTION_RIGHT; + hasMoved = x !== this.pX; + distance = Math.abs(input.deltaX); + } else { + direction = y === 0 ? DIRECTION_NONE : y < 0 ? DIRECTION_UP : DIRECTION_DOWN; + hasMoved = y !== this.pY; + distance = Math.abs(input.deltaY); + } + } + + input.direction = direction; + return hasMoved && distance > options.threshold && direction & options.direction; + }; + + _proto.attrTest = function attrTest(input) { + return AttrRecognizer.prototype.attrTest.call(this, input) && ( // replace with a super call + this.state & STATE_BEGAN || !(this.state & STATE_BEGAN) && this.directionTest(input)); + }; + + _proto.emit = function emit(input) { + this.pX = input.deltaX; + this.pY = input.deltaY; + var direction = directionStr(input.direction); + + if (direction) { + input.additionalEvent = this.options.event + direction; + } + + _AttrRecognizer.prototype.emit.call(this, input); + }; + + return PanRecognizer; + }(AttrRecognizer); + + /** + * @private + * Swipe + * Recognized when the pointer is moving fast (velocity), with enough distance in the allowed direction. + * @constructor + * @extends AttrRecognizer + */ + + var SwipeRecognizer = + /*#__PURE__*/ + function (_AttrRecognizer) { + _inheritsLoose(SwipeRecognizer, _AttrRecognizer); + + function SwipeRecognizer(options) { + if (options === void 0) { + options = {}; + } + + return _AttrRecognizer.call(this, _extends({ + event: 'swipe', + threshold: 10, + velocity: 0.3, + direction: DIRECTION_HORIZONTAL | DIRECTION_VERTICAL, + pointers: 1 + }, options)) || this; + } + + var _proto = SwipeRecognizer.prototype; + + _proto.getTouchAction = function getTouchAction() { + return PanRecognizer.prototype.getTouchAction.call(this); + }; + + _proto.attrTest = function attrTest(input) { + var direction = this.options.direction; + var velocity; + + if (direction & (DIRECTION_HORIZONTAL | DIRECTION_VERTICAL)) { + velocity = input.overallVelocity; + } else if (direction & DIRECTION_HORIZONTAL) { + velocity = input.overallVelocityX; + } else if (direction & DIRECTION_VERTICAL) { + velocity = input.overallVelocityY; + } + + return _AttrRecognizer.prototype.attrTest.call(this, input) && direction & input.offsetDirection && input.distance > this.options.threshold && input.maxPointers === this.options.pointers && abs(velocity) > this.options.velocity && input.eventType & INPUT_END; + }; + + _proto.emit = function emit(input) { + var direction = directionStr(input.offsetDirection); + + if (direction) { + this.manager.emit(this.options.event + direction, input); + } + + this.manager.emit(this.options.event, input); + }; + + return SwipeRecognizer; + }(AttrRecognizer); + + /** + * @private + * Pinch + * Recognized when two or more pointers are moving toward (zoom-in) or away from each other (zoom-out). + * @constructor + * @extends AttrRecognizer + */ + + var PinchRecognizer = + /*#__PURE__*/ + function (_AttrRecognizer) { + _inheritsLoose(PinchRecognizer, _AttrRecognizer); + + function PinchRecognizer(options) { + if (options === void 0) { + options = {}; + } + + return _AttrRecognizer.call(this, _extends({ + event: 'pinch', + threshold: 0, + pointers: 2 + }, options)) || this; + } + + var _proto = PinchRecognizer.prototype; + + _proto.getTouchAction = function getTouchAction() { + return [TOUCH_ACTION_NONE]; + }; + + _proto.attrTest = function attrTest(input) { + return _AttrRecognizer.prototype.attrTest.call(this, input) && (Math.abs(input.scale - 1) > this.options.threshold || this.state & STATE_BEGAN); + }; + + _proto.emit = function emit(input) { + if (input.scale !== 1) { + var inOut = input.scale < 1 ? 'in' : 'out'; + input.additionalEvent = this.options.event + inOut; + } + + _AttrRecognizer.prototype.emit.call(this, input); + }; + + return PinchRecognizer; + }(AttrRecognizer); + + /** + * @private + * Rotate + * Recognized when two or more pointer are moving in a circular motion. + * @constructor + * @extends AttrRecognizer + */ + + var RotateRecognizer = + /*#__PURE__*/ + function (_AttrRecognizer) { + _inheritsLoose(RotateRecognizer, _AttrRecognizer); + + function RotateRecognizer(options) { + if (options === void 0) { + options = {}; + } + + return _AttrRecognizer.call(this, _extends({ + event: 'rotate', + threshold: 0, + pointers: 2 + }, options)) || this; + } + + var _proto = RotateRecognizer.prototype; + + _proto.getTouchAction = function getTouchAction() { + return [TOUCH_ACTION_NONE]; + }; + + _proto.attrTest = function attrTest(input) { + return _AttrRecognizer.prototype.attrTest.call(this, input) && (Math.abs(input.rotation) > this.options.threshold || this.state & STATE_BEGAN); + }; + + return RotateRecognizer; + }(AttrRecognizer); + + /** + * @private + * Press + * Recognized when the pointer is down for x ms without any movement. + * @constructor + * @extends Recognizer + */ + + var PressRecognizer = + /*#__PURE__*/ + function (_Recognizer) { + _inheritsLoose(PressRecognizer, _Recognizer); + + function PressRecognizer(options) { + var _this; + + if (options === void 0) { + options = {}; + } + + _this = _Recognizer.call(this, _extends({ + event: 'press', + pointers: 1, + time: 251, + // minimal time of the pointer to be pressed + threshold: 9 + }, options)) || this; + _this._timer = null; + _this._input = null; + return _this; + } + + var _proto = PressRecognizer.prototype; + + _proto.getTouchAction = function getTouchAction() { + return [TOUCH_ACTION_AUTO]; + }; + + _proto.process = function process(input) { + var _this2 = this; + + var options = this.options; + var validPointers = input.pointers.length === options.pointers; + var validMovement = input.distance < options.threshold; + var validTime = input.deltaTime > options.time; + this._input = input; // we only allow little movement + // and we've reached an end event, so a tap is possible + + if (!validMovement || !validPointers || input.eventType & (INPUT_END | INPUT_CANCEL) && !validTime) { + this.reset(); + } else if (input.eventType & INPUT_START) { + this.reset(); + this._timer = setTimeout(function () { + _this2.state = STATE_RECOGNIZED; + + _this2.tryEmit(); + }, options.time); + } else if (input.eventType & INPUT_END) { + return STATE_RECOGNIZED; + } + + return STATE_FAILED; + }; + + _proto.reset = function reset() { + clearTimeout(this._timer); + }; + + _proto.emit = function emit(input) { + if (this.state !== STATE_RECOGNIZED) { + return; + } + + if (input && input.eventType & INPUT_END) { + this.manager.emit(this.options.event + "up", input); + } else { + this._input.timeStamp = now(); + this.manager.emit(this.options.event, this._input); + } + }; + + return PressRecognizer; + }(Recognizer); + + /** + * @private + * wrap a method with a deprecation warning and stack trace + * @param {Function} method + * @param {String} name + * @param {String} message + * @returns {Function} A new function wrapping the supplied method. + */ + function deprecate(method, name, message) { + var deprecationMessage = "DEPRECATED METHOD: " + name + "\n" + message + " AT \n"; + return function () { + var e = new Error('get-stack-trace'); + var stack = e && e.stack ? e.stack.replace(/^[^\(]+?[\n$]/gm, '').replace(/^\s+at\s+/gm, '').replace(/^Object.\s*\(/gm, '{anonymous}()@') : 'Unknown Stack Trace'; + var log = window.console && (window.console.warn || window.console.log); + + if (log) { + log.call(window.console, deprecationMessage, stack); + } + + return method.apply(this, arguments); + }; + } + + /** + * @private + * extend object. + * means that properties in dest will be overwritten by the ones in src. + * @param {Object} dest + * @param {Object} src + * @param {Boolean} [merge=false] + * @returns {Object} dest + */ + + var extend = deprecate(function (dest, src, merge) { + var keys = Object.keys(src); + var i = 0; + + while (i < keys.length) { + if (!merge || merge && dest[keys[i]] === undefined) { + dest[keys[i]] = src[keys[i]]; + } + + i++; + } + + return dest; + }, 'extend', 'Use `assign`.'); + + /** + * @private + * merge the values from src in the dest. + * means that properties that exist in dest will not be overwritten by src + * @param {Object} dest + * @param {Object} src + * @returns {Object} dest + */ + + var merge = deprecate(function (dest, src) { + return extend(dest, src, true); + }, 'merge', 'Use `assign`.'); + + /** + * @private + * simple class inheritance + * @param {Function} child + * @param {Function} base + * @param {Object} [properties] + */ + + function inherit(child, base, properties) { + var baseP = base.prototype; + var childP; + childP = child.prototype = Object.create(baseP); + childP.constructor = child; + childP._super = baseP; + + if (properties) { + assign$1(childP, properties); + } + } + + /** + * @private + * simple function bind + * @param {Function} fn + * @param {Object} context + * @returns {Function} + */ + function bindFn(fn, context) { + return function boundFn() { + return fn.apply(context, arguments); + }; + } + + /** + * @private + * Simple way to create a manager with a default set of recognizers. + * @param {HTMLElement} element + * @param {Object} [options] + * @constructor + */ + + var Hammer = + /*#__PURE__*/ + function () { + var Hammer = + /** + * @private + * @const {string} + */ + function Hammer(element, options) { + if (options === void 0) { + options = {}; + } + + return new Manager(element, _extends({ + recognizers: [// RecognizerClass, options, [recognizeWith, ...], [requireFailure, ...] + [RotateRecognizer, { + enable: false + }], [PinchRecognizer, { + enable: false + }, ['rotate']], [SwipeRecognizer, { + direction: DIRECTION_HORIZONTAL + }], [PanRecognizer, { + direction: DIRECTION_HORIZONTAL + }, ['swipe']], [TapRecognizer], [TapRecognizer, { + event: 'doubletap', + taps: 2 + }, ['tap']], [PressRecognizer]] + }, options)); + }; + + Hammer.VERSION = "2.0.15"; + Hammer.DIRECTION_ALL = DIRECTION_ALL; + Hammer.DIRECTION_DOWN = DIRECTION_DOWN; + Hammer.DIRECTION_LEFT = DIRECTION_LEFT; + Hammer.DIRECTION_RIGHT = DIRECTION_RIGHT; + Hammer.DIRECTION_UP = DIRECTION_UP; + Hammer.DIRECTION_HORIZONTAL = DIRECTION_HORIZONTAL; + Hammer.DIRECTION_VERTICAL = DIRECTION_VERTICAL; + Hammer.DIRECTION_NONE = DIRECTION_NONE; + Hammer.DIRECTION_DOWN = DIRECTION_DOWN; + Hammer.INPUT_START = INPUT_START; + Hammer.INPUT_MOVE = INPUT_MOVE; + Hammer.INPUT_END = INPUT_END; + Hammer.INPUT_CANCEL = INPUT_CANCEL; + Hammer.STATE_POSSIBLE = STATE_POSSIBLE; + Hammer.STATE_BEGAN = STATE_BEGAN; + Hammer.STATE_CHANGED = STATE_CHANGED; + Hammer.STATE_ENDED = STATE_ENDED; + Hammer.STATE_RECOGNIZED = STATE_RECOGNIZED; + Hammer.STATE_CANCELLED = STATE_CANCELLED; + Hammer.STATE_FAILED = STATE_FAILED; + Hammer.Manager = Manager; + Hammer.Input = Input; + Hammer.TouchAction = TouchAction; + Hammer.TouchInput = TouchInput; + Hammer.MouseInput = MouseInput; + Hammer.PointerEventInput = PointerEventInput; + Hammer.TouchMouseInput = TouchMouseInput; + Hammer.SingleTouchInput = SingleTouchInput; + Hammer.Recognizer = Recognizer; + Hammer.AttrRecognizer = AttrRecognizer; + Hammer.Tap = TapRecognizer; + Hammer.Pan = PanRecognizer; + Hammer.Swipe = SwipeRecognizer; + Hammer.Pinch = PinchRecognizer; + Hammer.Rotate = RotateRecognizer; + Hammer.Press = PressRecognizer; + Hammer.on = addEventListeners; + Hammer.off = removeEventListeners; + Hammer.each = each; + Hammer.merge = merge; + Hammer.extend = extend; + Hammer.bindFn = bindFn; + Hammer.assign = assign$1; + Hammer.inherit = inherit; + Hammer.bindFn = bindFn; + Hammer.prefixed = prefixed; + Hammer.toArray = toArray; + Hammer.inArray = inArray; + Hammer.uniqueArray = uniqueArray; + Hammer.splitStr = splitStr; + Hammer.boolOrFn = boolOrFn; + Hammer.hasParent = hasParent; + Hammer.addEventListeners = addEventListeners; + Hammer.removeEventListeners = removeEventListeners; + Hammer.defaults = defaults; + return Hammer; + }(); + + return Hammer; + +}))); +//# sourceMappingURL=hammer.js.map diff --git a/node_modules/@egjs/hammerjs/dist/hammer.js.map b/node_modules/@egjs/hammerjs/dist/hammer.js.map new file mode 100644 index 0000000000000000000000000000000000000000..c6d0669731648cd8691e1d52949a41667139e883 --- /dev/null +++ b/node_modules/@egjs/hammerjs/dist/hammer.js.map @@ -0,0 +1 @@ +{"version":3,"file":"hammer.js","sources":["../src/utils/assign.js","../src/utils/utils-consts.js","../src/utils/prefixed.js","../src/browser.js","../src/touchactionjs/get-touchaction-props.js","../src/touchactionjs/touchaction-Consts.js","../src/inputjs/input-consts.js","../src/utils/each.js","../src/utils/bool-or-fn.js","../src/utils/in-str.js","../src/touchactionjs/clean-touch-actions.js","../src/touchactionjs/touchaction-constructor.js","../src/utils/has-parent.js","../src/inputjs/get-center.js","../src/inputjs/simple-clone-input-data.js","../src/inputjs/get-distance.js","../src/inputjs/get-angle.js","../src/inputjs/get-direction.js","../src/inputjs/compute-delta-xy.js","../src/inputjs/get-velocity.js","../src/inputjs/get-scale.js","../src/inputjs/get-rotation.js","../src/inputjs/compute-interval-input-data.js","../src/inputjs/compute-input-data.js","../src/inputjs/input-handler.js","../src/utils/split-str.js","../src/utils/add-event-listeners.js","../src/utils/remove-event-listeners.js","../src/utils/get-window-for-element.js","../src/inputjs/input-constructor.js","../src/utils/in-array.js","../src/input/pointerevent.js","../src/utils/to-array.js","../src/utils/unique-array.js","../src/input/touch.js","../src/input/mouse.js","../src/input/touchmouse.js","../src/inputjs/create-input-instance.js","../src/utils/invoke-array-arg.js","../src/recognizerjs/recognizer-consts.js","../src/utils/unique-id.js","../src/recognizerjs/get-recognizer-by-name-if-manager.js","../src/recognizerjs/state-str.js","../src/recognizerjs/recognizer-constructor.js","../src/defaults.js","../src/manager.js","../src/input/singletouch.js","../src/recognizers/attribute.js","../src/recognizers/tap.js","../src/recognizerjs/direction-str.js","../src/recognizers/pan.js","../src/recognizers/swipe.js","../src/recognizers/pinch.js","../src/recognizers/rotate.js","../src/recognizers/press.js","../src/utils/deprecate.js","../src/utils/extend.js","../src/utils/merge.js","../src/utils/inherit.js","../src/utils/bind-fn.js","../src/Hammer.js"],"sourcesContent":["/**\n * @private\n * extend object.\n * means that properties in dest will be overwritten by the ones in src.\n * @param {Object} target\n * @param {...Object} objects_to_assign\n * @returns {Object} target\n */\nlet assign;\nif (typeof Object.assign !== 'function') {\n assign = function assign(target) {\n if (target === undefined || target === null) {\n throw new TypeError('Cannot convert undefined or null to object');\n }\n\n let output = Object(target);\n for (let index = 1; index < arguments.length; index++) {\n const source = arguments[index];\n if (source !== undefined && source !== null) {\n for (const nextKey in source) {\n if (source.hasOwnProperty(nextKey)) {\n output[nextKey] = source[nextKey];\n }\n }\n }\n }\n return output;\n };\n} else {\n assign = Object.assign;\n}\n\nexport default assign;","\nconst VENDOR_PREFIXES = ['', 'webkit', 'Moz', 'MS', 'ms', 'o'];\nconst TEST_ELEMENT = typeof document === \"undefined\" ? {style: {}} : document.createElement('div');\n\nconst TYPE_FUNCTION = 'function';\n\nconst { round, abs } = Math;\nconst { now } = Date;\n\nexport {\n VENDOR_PREFIXES,\n TEST_ELEMENT,\n TYPE_FUNCTION,\n round,\n abs,\n now\n};\n","import { VENDOR_PREFIXES } from './utils-consts';\n/**\n * @private\n * get the prefixed property\n * @param {Object} obj\n * @param {String} property\n * @returns {String|Undefined} prefixed\n */\nexport default function prefixed(obj, property) {\n let prefix;\n let prop;\n let camelProp = property[0].toUpperCase() + property.slice(1);\n\n let i = 0;\n while (i < VENDOR_PREFIXES.length) {\n prefix = VENDOR_PREFIXES[i];\n prop = (prefix) ? prefix + camelProp : property;\n\n if (prop in obj) {\n return prop;\n }\n i++;\n }\n return undefined;\n}\n","/* eslint-disable no-new-func, no-nested-ternary */\n\nlet win;\n\nif (typeof window === \"undefined\") {\n\t// window is undefined in node.js\n\twin = {};\n} else {\n\twin = window;\n}\n/* eslint-enable no-new-func, no-nested-ternary */\n\nexport {win as window};\n","import prefixed from '../utils/prefixed';\nimport { TEST_ELEMENT } from '../utils/utils-consts';\nimport {window} from '../browser';\n\nexport const PREFIXED_TOUCH_ACTION = prefixed(TEST_ELEMENT.style, 'touchAction');\nexport const NATIVE_TOUCH_ACTION = PREFIXED_TOUCH_ACTION !== undefined;\n\nexport default function getTouchActionProps() {\n if (!NATIVE_TOUCH_ACTION) {\n return false;\n }\n let touchMap = {};\n let cssSupports = window.CSS && window.CSS.supports;\n ['auto', 'manipulation', 'pan-y', 'pan-x', 'pan-x pan-y', 'none'].forEach((val) => {\n\n // If css.supports is not supported but there is native touch-action assume it supports\n // all values. This is the case for IE 10 and 11.\n return touchMap[val] = cssSupports ? window.CSS.supports('touch-action', val) : true;\n });\n return touchMap;\n}\n","import getTouchActionProps from './get-touchaction-props';\n\n\n\n// magical touchAction value\nconst TOUCH_ACTION_COMPUTE = 'compute';\nconst TOUCH_ACTION_AUTO = 'auto';\nconst TOUCH_ACTION_MANIPULATION = 'manipulation'; // not implemented\nconst TOUCH_ACTION_NONE = 'none';\nconst TOUCH_ACTION_PAN_X = 'pan-x';\nconst TOUCH_ACTION_PAN_Y = 'pan-y';\nconst TOUCH_ACTION_MAP = getTouchActionProps();\n\nexport {\n TOUCH_ACTION_AUTO,\n TOUCH_ACTION_COMPUTE,\n TOUCH_ACTION_MANIPULATION,\n TOUCH_ACTION_NONE,\n TOUCH_ACTION_PAN_X,\n TOUCH_ACTION_PAN_Y,\n TOUCH_ACTION_MAP\n};\n","import prefixed from '../utils/prefixed';\nimport {window} from \"../browser\";\n\nconst MOBILE_REGEX = /mobile|tablet|ip(ad|hone|od)|android/i;\n\nconst SUPPORT_TOUCH = ('ontouchstart' in window);\nconst SUPPORT_POINTER_EVENTS = prefixed(window, 'PointerEvent') !== undefined;\nconst SUPPORT_ONLY_TOUCH = SUPPORT_TOUCH && MOBILE_REGEX.test(navigator.userAgent);\n\nconst INPUT_TYPE_TOUCH = 'touch';\nconst INPUT_TYPE_PEN = 'pen';\nconst INPUT_TYPE_MOUSE = 'mouse';\nconst INPUT_TYPE_KINECT = 'kinect';\n\nconst COMPUTE_INTERVAL = 25;\n\nconst INPUT_START = 1;\nconst INPUT_MOVE = 2;\nconst INPUT_END = 4;\nconst INPUT_CANCEL = 8;\n\nconst DIRECTION_NONE = 1;\nconst DIRECTION_LEFT = 2;\nconst DIRECTION_RIGHT = 4;\nconst DIRECTION_UP = 8;\nconst DIRECTION_DOWN = 16;\n\nconst DIRECTION_HORIZONTAL = DIRECTION_LEFT | DIRECTION_RIGHT;\nconst DIRECTION_VERTICAL = DIRECTION_UP | DIRECTION_DOWN;\nconst DIRECTION_ALL = DIRECTION_HORIZONTAL | DIRECTION_VERTICAL;\n\nconst PROPS_XY = ['x', 'y'];\nconst PROPS_CLIENT_XY = ['clientX', 'clientY'];\n\nexport {\n MOBILE_REGEX,\n SUPPORT_ONLY_TOUCH,\n SUPPORT_POINTER_EVENTS,\n SUPPORT_TOUCH,\n INPUT_TYPE_KINECT,\n INPUT_TYPE_MOUSE,\n INPUT_TYPE_PEN,\n INPUT_TYPE_TOUCH,\n COMPUTE_INTERVAL,\n INPUT_START,\n INPUT_MOVE,\n INPUT_END,\n INPUT_CANCEL,\n DIRECTION_NONE,\n DIRECTION_LEFT,\n DIRECTION_RIGHT,\n DIRECTION_UP,\n DIRECTION_DOWN,\n DIRECTION_HORIZONTAL,\n DIRECTION_VERTICAL,\n DIRECTION_ALL,\n PROPS_XY,\n PROPS_CLIENT_XY\n};\n","/**\n * @private\n * walk objects and arrays\n * @param {Object} obj\n * @param {Function} iterator\n * @param {Object} context\n */\nexport default function each(obj, iterator, context) {\n let i;\n\n if (!obj) {\n return;\n }\n\n if (obj.forEach) {\n obj.forEach(iterator, context);\n } else if (obj.length !== undefined) {\n i = 0;\n while (i < obj.length) {\n iterator.call(context, obj[i], i, obj);\n i++;\n }\n } else {\n for (i in obj) {\n obj.hasOwnProperty(i) && iterator.call(context, obj[i], i, obj);\n }\n }\n}\n","import { TYPE_FUNCTION } from './utils-consts';\n/**\n * @private\n * let a boolean value also be a function that must return a boolean\n * this first item in args will be used as the context\n * @param {Boolean|Function} val\n * @param {Array} [args]\n * @returns {Boolean}\n */\nexport default function boolOrFn(val, args) {\n if (typeof val === TYPE_FUNCTION) {\n return val.apply(args ? args[0] || undefined : undefined, args);\n }\n return val;\n}\n","/**\n * @private\n * small indexOf wrapper\n * @param {String} str\n * @param {String} find\n * @returns {Boolean} found\n */\nexport default function inStr(str, find) {\n return str.indexOf(find) > -1;\n}\n","import inStr from '../utils/in-str';\nimport {\n TOUCH_ACTION_NONE,\n TOUCH_ACTION_PAN_X,\n TOUCH_ACTION_PAN_Y,\n TOUCH_ACTION_MANIPULATION,\n TOUCH_ACTION_AUTO\n} from './touchaction-Consts';\n\n/**\n * @private\n * when the touchActions are collected they are not a valid value, so we need to clean things up. *\n * @param {String} actions\n * @returns {*}\n */\nexport default function cleanTouchActions(actions) {\n // none\n if (inStr(actions, TOUCH_ACTION_NONE)) {\n return TOUCH_ACTION_NONE;\n }\n\n let hasPanX = inStr(actions, TOUCH_ACTION_PAN_X);\n let hasPanY = inStr(actions, TOUCH_ACTION_PAN_Y);\n\n // if both pan-x and pan-y are set (different recognizers\n // for different directions, e.g. horizontal pan but vertical swipe?)\n // we need none (as otherwise with pan-x pan-y combined none of these\n // recognizers will work, since the browser would handle all panning\n if (hasPanX && hasPanY) {\n return TOUCH_ACTION_NONE;\n }\n\n // pan-x OR pan-y\n if (hasPanX || hasPanY) {\n return hasPanX ? TOUCH_ACTION_PAN_X : TOUCH_ACTION_PAN_Y;\n }\n\n // manipulation\n if (inStr(actions, TOUCH_ACTION_MANIPULATION)) {\n return TOUCH_ACTION_MANIPULATION;\n }\n\n return TOUCH_ACTION_AUTO;\n}\n","import {\n TOUCH_ACTION_COMPUTE,\n TOUCH_ACTION_MAP,\n TOUCH_ACTION_NONE,\n TOUCH_ACTION_PAN_X,\n TOUCH_ACTION_PAN_Y\n} from './touchaction-Consts';\nimport {\n NATIVE_TOUCH_ACTION,\n PREFIXED_TOUCH_ACTION,\n} from \"./get-touchaction-props\";\nimport {\n DIRECTION_VERTICAL,\n DIRECTION_HORIZONTAL\n} from '../inputjs/input-consts';\nimport each from '../utils/each';\nimport boolOrFn from '../utils/bool-or-fn';\nimport inStr from '../utils/in-str';\nimport cleanTouchActions from './clean-touch-actions';\n\n/**\n * @private\n * Touch Action\n * sets the touchAction property or uses the js alternative\n * @param {Manager} manager\n * @param {String} value\n * @constructor\n */\nexport default class TouchAction {\n constructor(manager, value) {\n this.manager = manager;\n this.set(value);\n }\n\n /**\n * @private\n * set the touchAction value on the element or enable the polyfill\n * @param {String} value\n */\n set(value) {\n // find out the touch-action by the event handlers\n if (value === TOUCH_ACTION_COMPUTE) {\n value = this.compute();\n }\n\n if (NATIVE_TOUCH_ACTION && this.manager.element.style && TOUCH_ACTION_MAP[value]) {\n this.manager.element.style[PREFIXED_TOUCH_ACTION] = value;\n }\n this.actions = value.toLowerCase().trim();\n }\n\n /**\n * @private\n * just re-set the touchAction value\n */\n update() {\n this.set(this.manager.options.touchAction);\n }\n\n /**\n * @private\n * compute the value for the touchAction property based on the recognizer's settings\n * @returns {String} value\n */\n compute() {\n let actions = [];\n each(this.manager.recognizers, (recognizer) => {\n if (boolOrFn(recognizer.options.enable, [recognizer])) {\n actions = actions.concat(recognizer.getTouchAction());\n }\n });\n return cleanTouchActions(actions.join(' '));\n }\n\n /**\n * @private\n * this method is called on each input cycle and provides the preventing of the browser behavior\n * @param {Object} input\n */\n preventDefaults(input) {\n let { srcEvent } = input;\n let direction = input.offsetDirection;\n\n // if the touch action did prevented once this session\n if (this.manager.session.prevented) {\n srcEvent.preventDefault();\n return;\n }\n\n let { actions } = this;\n let hasNone = inStr(actions, TOUCH_ACTION_NONE) && !TOUCH_ACTION_MAP[TOUCH_ACTION_NONE];\n let hasPanY = inStr(actions, TOUCH_ACTION_PAN_Y) && !TOUCH_ACTION_MAP[TOUCH_ACTION_PAN_Y];\n let hasPanX = inStr(actions, TOUCH_ACTION_PAN_X) && !TOUCH_ACTION_MAP[TOUCH_ACTION_PAN_X];\n\n if (hasNone) {\n // do not prevent defaults if this is a tap gesture\n let isTapPointer = input.pointers.length === 1;\n let isTapMovement = input.distance < 2;\n let isTapTouchTime = input.deltaTime < 250;\n\n if (isTapPointer && isTapMovement && isTapTouchTime) {\n return;\n }\n }\n\n if (hasPanX && hasPanY) {\n // `pan-x pan-y` means browser handles all scrolling/panning, do not prevent\n return;\n }\n\n if (hasNone ||\n (hasPanY && direction & DIRECTION_HORIZONTAL) ||\n (hasPanX && direction & DIRECTION_VERTICAL)) {\n return this.preventSrc(srcEvent);\n }\n }\n\n /**\n * @private\n * call preventDefault to prevent the browser's default behavior (scrolling in most cases)\n * @param {Object} srcEvent\n */\n preventSrc(srcEvent) {\n this.manager.session.prevented = true;\n srcEvent.preventDefault();\n }\n}\n","/**\n * @private\n * find if a node is in the given parent\n * @method hasParent\n * @param {HTMLElement} node\n * @param {HTMLElement} parent\n * @return {Boolean} found\n */\nexport default function hasParent(node, parent) {\n while (node) {\n if (node === parent) {\n return true;\n }\n node = node.parentNode;\n }\n return false;\n}\n","import { round } from '../utils/utils-consts';\n\n/**\n * @private\n * get the center of all the pointers\n * @param {Array} pointers\n * @return {Object} center contains `x` and `y` properties\n */\nexport default function getCenter(pointers) {\n let pointersLength = pointers.length;\n\n // no need to loop when only one touch\n if (pointersLength === 1) {\n return {\n x: round(pointers[0].clientX),\n y: round(pointers[0].clientY)\n };\n }\n\n let x = 0;\n let y = 0;\n let i = 0;\n while (i < pointersLength) {\n x += pointers[i].clientX;\n y += pointers[i].clientY;\n i++;\n }\n\n return {\n x: round(x / pointersLength),\n y: round(y / pointersLength)\n };\n}\n","import { now,round } from '../utils/utils-consts';\nimport getCenter from './get-center';\n\n/**\n * @private\n * create a simple clone from the input used for storage of firstInput and firstMultiple\n * @param {Object} input\n * @returns {Object} clonedInputData\n */\nexport default function simpleCloneInputData(input) {\n // make a simple copy of the pointers because we will get a reference if we don't\n // we only need clientXY for the calculations\n let pointers = [];\n let i = 0;\n while (i < input.pointers.length) {\n pointers[i] = {\n clientX: round(input.pointers[i].clientX),\n clientY: round(input.pointers[i].clientY)\n };\n i++;\n }\n\n return {\n timeStamp: now(),\n pointers,\n center: getCenter(pointers),\n deltaX: input.deltaX,\n deltaY: input.deltaY\n };\n}\n","import { PROPS_XY } from './input-consts';\n\n/**\n * @private\n * calculate the absolute distance between two points\n * @param {Object} p1 {x, y}\n * @param {Object} p2 {x, y}\n * @param {Array} [props] containing x and y keys\n * @return {Number} distance\n */\nexport default function getDistance(p1, p2, props) {\n if (!props) {\n props = PROPS_XY;\n }\n let x = p2[props[0]] - p1[props[0]];\n let y = p2[props[1]] - p1[props[1]];\n\n return Math.sqrt((x * x) + (y * y));\n}\n","import { PROPS_XY } from './input-consts';\n\n/**\n * @private\n * calculate the angle between two coordinates\n * @param {Object} p1\n * @param {Object} p2\n * @param {Array} [props] containing x and y keys\n * @return {Number} angle\n */\nexport default function getAngle(p1, p2, props) {\n if (!props) {\n props = PROPS_XY;\n }\n let x = p2[props[0]] - p1[props[0]];\n let y = p2[props[1]] - p1[props[1]];\n return Math.atan2(y, x) * 180 / Math.PI;\n}\n","import { abs } from '../utils/utils-consts';\nimport { DIRECTION_NONE,DIRECTION_LEFT,DIRECTION_RIGHT,DIRECTION_UP,DIRECTION_DOWN } from './input-consts';\n\n/**\n * @private\n * get the direction between two points\n * @param {Number} x\n * @param {Number} y\n * @return {Number} direction\n */\nexport default function getDirection(x, y) {\n if (x === y) {\n return DIRECTION_NONE;\n }\n\n if (abs(x) >= abs(y)) {\n return x < 0 ? DIRECTION_LEFT : DIRECTION_RIGHT;\n }\n return y < 0 ? DIRECTION_UP : DIRECTION_DOWN;\n}\n","import { INPUT_START, INPUT_END } from './input-consts';\n\nexport default function computeDeltaXY(session, input) {\n let { center } = input;\n // let { offsetDelta:offset = {}, prevDelta = {}, prevInput = {} } = session;\n // jscs throwing error on defalut destructured values and without defaults tests fail\n let offset = session.offsetDelta || {};\n let prevDelta = session.prevDelta || {};\n let prevInput = session.prevInput || {};\n\n if (input.eventType === INPUT_START || prevInput.eventType === INPUT_END) {\n prevDelta = session.prevDelta = {\n x: prevInput.deltaX || 0,\n y: prevInput.deltaY || 0\n };\n\n offset = session.offsetDelta = {\n x: center.x,\n y: center.y\n };\n }\n\n input.deltaX = prevDelta.x + (center.x - offset.x);\n input.deltaY = prevDelta.y + (center.y - offset.y);\n}\n","/**\n * @private\n * calculate the velocity between two points. unit is in px per ms.\n * @param {Number} deltaTime\n * @param {Number} x\n * @param {Number} y\n * @return {Object} velocity `x` and `y`\n */\nexport default function getVelocity(deltaTime, x, y) {\n return {\n x: x / deltaTime || 0,\n y: y / deltaTime || 0\n };\n}\n","import { PROPS_CLIENT_XY } from './input-consts';\nimport getDistance from './get-distance';\n/**\n * @private\n * calculate the scale factor between two pointersets\n * no scale is 1, and goes down to 0 when pinched together, and bigger when pinched out\n * @param {Array} start array of pointers\n * @param {Array} end array of pointers\n * @return {Number} scale\n */\nexport default function getScale(start, end) {\n return getDistance(end[0], end[1], PROPS_CLIENT_XY) / getDistance(start[0], start[1], PROPS_CLIENT_XY);\n}\n","import getAngle from './get-angle';\nimport { PROPS_CLIENT_XY } from './input-consts';\n\n/**\n * @private\n * calculate the rotation degrees between two pointersets\n * @param {Array} start array of pointers\n * @param {Array} end array of pointers\n * @return {Number} rotation\n */\nexport default function getRotation(start, end) {\n return getAngle(end[1], end[0], PROPS_CLIENT_XY) + getAngle(start[1], start[0], PROPS_CLIENT_XY);\n}\n","import { INPUT_CANCEL,COMPUTE_INTERVAL } from './input-consts';\nimport { abs } from '../utils/utils-consts';\nimport getVelocity from './get-velocity';\nimport getDirection from './get-direction';\n\n/**\n * @private\n * velocity is calculated every x ms\n * @param {Object} session\n * @param {Object} input\n */\nexport default function computeIntervalInputData(session, input) {\n let last = session.lastInterval || input;\n let deltaTime = input.timeStamp - last.timeStamp;\n let velocity;\n let velocityX;\n let velocityY;\n let direction;\n\n if (input.eventType !== INPUT_CANCEL && (deltaTime > COMPUTE_INTERVAL || last.velocity === undefined)) {\n let deltaX = input.deltaX - last.deltaX;\n let deltaY = input.deltaY - last.deltaY;\n\n let v = getVelocity(deltaTime, deltaX, deltaY);\n velocityX = v.x;\n velocityY = v.y;\n velocity = (abs(v.x) > abs(v.y)) ? v.x : v.y;\n direction = getDirection(deltaX, deltaY);\n\n session.lastInterval = input;\n } else {\n // use latest velocity info if it doesn't overtake a minimum period\n velocity = last.velocity;\n velocityX = last.velocityX;\n velocityY = last.velocityY;\n direction = last.direction;\n }\n\n input.velocity = velocity;\n input.velocityX = velocityX;\n input.velocityY = velocityY;\n input.direction = direction;\n}\n","import { now } from '../utils/utils-consts';\nimport { abs } from '../utils/utils-consts';\nimport hasParent from '../utils/has-parent';\nimport simpleCloneInputData from './simple-clone-input-data';\nimport getCenter from './get-center';\nimport getDistance from './get-distance';\nimport getAngle from './get-angle';\nimport getDirection from './get-direction';\nimport computeDeltaXY from './compute-delta-xy';\nimport getVelocity from './get-velocity';\nimport getScale from './get-scale';\nimport getRotation from './get-rotation';\nimport computeIntervalInputData from './compute-interval-input-data';\n\n/**\n* @private\n * extend the data with some usable properties like scale, rotate, velocity etc\n * @param {Object} manager\n * @param {Object} input\n */\nexport default function computeInputData(manager, input) {\n let { session } = manager;\n let { pointers } = input;\n let { length:pointersLength } = pointers;\n\n // store the first input to calculate the distance and direction\n if (!session.firstInput) {\n session.firstInput = simpleCloneInputData(input);\n }\n\n // to compute scale and rotation we need to store the multiple touches\n if (pointersLength > 1 && !session.firstMultiple) {\n session.firstMultiple = simpleCloneInputData(input);\n } else if (pointersLength === 1) {\n session.firstMultiple = false;\n }\n\n let { firstInput, firstMultiple } = session;\n let offsetCenter = firstMultiple ? firstMultiple.center : firstInput.center;\n\n let center = input.center = getCenter(pointers);\n input.timeStamp = now();\n input.deltaTime = input.timeStamp - firstInput.timeStamp;\n\n input.angle = getAngle(offsetCenter, center);\n input.distance = getDistance(offsetCenter, center);\n\n computeDeltaXY(session, input);\n input.offsetDirection = getDirection(input.deltaX, input.deltaY);\n\n let overallVelocity = getVelocity(input.deltaTime, input.deltaX, input.deltaY);\n input.overallVelocityX = overallVelocity.x;\n input.overallVelocityY = overallVelocity.y;\n input.overallVelocity = (abs(overallVelocity.x) > abs(overallVelocity.y)) ? overallVelocity.x : overallVelocity.y;\n\n input.scale = firstMultiple ? getScale(firstMultiple.pointers, pointers) : 1;\n input.rotation = firstMultiple ? getRotation(firstMultiple.pointers, pointers) : 0;\n\n input.maxPointers = !session.prevInput ? input.pointers.length : ((input.pointers.length >\n session.prevInput.maxPointers) ? input.pointers.length : session.prevInput.maxPointers);\n\n computeIntervalInputData(session, input);\n\n // find the correct target\n let target = manager.element;\n if (hasParent(input.srcEvent.target, target)) {\n target = input.srcEvent.target;\n }\n input.target = target;\n}\n","import { INPUT_START,INPUT_END,INPUT_CANCEL } from './input-consts';\nimport computeInputData from './compute-input-data';\n\n/**\n * @private\n * handle input events\n * @param {Manager} manager\n * @param {String} eventType\n * @param {Object} input\n */\nexport default function inputHandler(manager, eventType, input) {\n let pointersLen = input.pointers.length;\n let changedPointersLen = input.changedPointers.length;\n let isFirst = (eventType & INPUT_START && (pointersLen - changedPointersLen === 0));\n let isFinal = (eventType & (INPUT_END | INPUT_CANCEL) && (pointersLen - changedPointersLen === 0));\n\n input.isFirst = !!isFirst;\n input.isFinal = !!isFinal;\n\n if (isFirst) {\n manager.session = {};\n }\n\n // source event is the normalized value of the domEvents\n // like 'touchstart, mouseup, pointerdown'\n input.eventType = eventType;\n\n // compute scale, rotation etc\n computeInputData(manager, input);\n\n // emit secret event\n manager.emit('hammer.input', input);\n\n manager.recognize(input);\n manager.session.prevInput = input;\n}\n","/**\n * @private\n * split string on whitespace\n * @param {String} str\n * @returns {Array} words\n */\n\nexport default function splitStr(str) {\n return str.trim().split(/\\s+/g);\n}\n","import each from './each';\nimport splitStr from './split-str';\n/**\n * @private\n * addEventListener with multiple events at once\n * @param {EventTarget} target\n * @param {String} types\n * @param {Function} handler\n */\nexport default function addEventListeners(target, types, handler) {\n each(splitStr(types), (type) => {\n target.addEventListener(type, handler, false);\n });\n}\n","import each from './each';\nimport splitStr from './split-str';\n/**\n * @private\n * removeEventListener with multiple events at once\n * @param {EventTarget} target\n * @param {String} types\n * @param {Function} handler\n */\nexport default function removeEventListeners(target, types, handler) {\n each(splitStr(types), (type) => {\n target.removeEventListener(type, handler, false);\n });\n}\n","/**\n * @private\n * get the window object of an element\n * @param {HTMLElement} element\n * @returns {DocumentView|Window}\n */\nexport default function getWindowForElement(element) {\n let doc = element.ownerDocument || element;\n return (doc.defaultView || doc.parentWindow || window);\n}\n","import boolOrFn from '../utils/bool-or-fn';\nimport addEventListeners from '../utils/add-event-listeners';\nimport removeEventListeners from '../utils/remove-event-listeners';\nimport getWindowForElement from '../utils/get-window-for-element';\n\n/**\n * @private\n * create new input type manager\n * @param {Manager} manager\n * @param {Function} callback\n * @returns {Input}\n * @constructor\n */\nexport default class Input {\n constructor(manager, callback) {\n let self = this;\n this.manager = manager;\n this.callback = callback;\n this.element = manager.element;\n this.target = manager.options.inputTarget;\n\n // smaller wrapper around the handler, for the scope and the enabled state of the manager,\n // so when disabled the input events are completely bypassed.\n this.domHandler = function(ev) {\n if (boolOrFn(manager.options.enable, [manager])) {\n self.handler(ev);\n }\n };\n\n this.init();\n\n }\n /**\n * @private\n * should handle the inputEvent data and trigger the callback\n * @virtual\n */\n handler() { }\n\n /**\n * @private\n * bind the events\n */\n init() {\n this.evEl && addEventListeners(this.element, this.evEl, this.domHandler);\n this.evTarget && addEventListeners(this.target, this.evTarget, this.domHandler);\n this.evWin && addEventListeners(getWindowForElement(this.element), this.evWin, this.domHandler);\n }\n\n /**\n * @private\n * unbind the events\n */\n destroy() {\n this.evEl && removeEventListeners(this.element, this.evEl, this.domHandler);\n this.evTarget && removeEventListeners(this.target, this.evTarget, this.domHandler);\n this.evWin && removeEventListeners(getWindowForElement(this.element), this.evWin, this.domHandler);\n }\n}\n","/**\n * @private\n * find if a array contains the object using indexOf or a simple polyFill\n * @param {Array} src\n * @param {String} find\n * @param {String} [findByKey]\n * @return {Boolean|Number} false when not found, or the index\n */\nexport default function inArray(src, find, findByKey) {\n if (src.indexOf && !findByKey) {\n return src.indexOf(find);\n } else {\n let i = 0;\n while (i < src.length) {\n if ((findByKey && src[i][findByKey] == find) || (!findByKey && src[i] === find)) {// do not use === here, test fails\n return i;\n }\n i++;\n }\n return -1;\n }\n}\n","import {\n INPUT_START,\n INPUT_END,\n INPUT_CANCEL,\n INPUT_MOVE,\n INPUT_TYPE_TOUCH,\n INPUT_TYPE_MOUSE,\n INPUT_TYPE_PEN,\n INPUT_TYPE_KINECT\n} from '../inputjs/input-consts';\nimport {window} from \"../browser\";\nimport Input from '../inputjs/input-constructor';\nimport inArray from '../utils/in-array';\n\nconst POINTER_INPUT_MAP = {\n pointerdown: INPUT_START,\n pointermove: INPUT_MOVE,\n pointerup: INPUT_END,\n pointercancel: INPUT_CANCEL,\n pointerout: INPUT_CANCEL\n};\n\n// in IE10 the pointer types is defined as an enum\nconst IE10_POINTER_TYPE_ENUM = {\n 2: INPUT_TYPE_TOUCH,\n 3: INPUT_TYPE_PEN,\n 4: INPUT_TYPE_MOUSE,\n 5: INPUT_TYPE_KINECT // see https://twitter.com/jacobrossi/status/480596438489890816\n};\n\nlet POINTER_ELEMENT_EVENTS = 'pointerdown';\nlet POINTER_WINDOW_EVENTS = 'pointermove pointerup pointercancel';\n\n// IE10 has prefixed support, and case-sensitive\nif (window.MSPointerEvent && !window.PointerEvent) {\n POINTER_ELEMENT_EVENTS = 'MSPointerDown';\n POINTER_WINDOW_EVENTS = 'MSPointerMove MSPointerUp MSPointerCancel';\n}\n\n/**\n * @private\n * Pointer events input\n * @constructor\n * @extends Input\n */\nexport default class PointerEventInput extends Input {\n constructor() {\n var proto = PointerEventInput.prototype;\n\n proto.evEl = POINTER_ELEMENT_EVENTS;\n proto.evWin = POINTER_WINDOW_EVENTS;\n super(...arguments);\n this.store = (this.manager.session.pointerEvents = []);\n }\n\n /**\n * @private\n * handle mouse events\n * @param {Object} ev\n */\n handler(ev) {\n let { store } = this;\n let removePointer = false;\n\n let eventTypeNormalized = ev.type.toLowerCase().replace('ms', '');\n let eventType = POINTER_INPUT_MAP[eventTypeNormalized];\n let pointerType = IE10_POINTER_TYPE_ENUM[ev.pointerType] || ev.pointerType;\n\n let isTouch = (pointerType === INPUT_TYPE_TOUCH);\n\n // get index of the event in the store\n let storeIndex = inArray(store, ev.pointerId, 'pointerId');\n\n // start and mouse must be down\n if (eventType & INPUT_START && (ev.button === 0 || isTouch)) {\n if (storeIndex < 0) {\n store.push(ev);\n storeIndex = store.length - 1;\n }\n } else if (eventType & (INPUT_END | INPUT_CANCEL)) {\n removePointer = true;\n }\n\n // it not found, so the pointer hasn't been down (so it's probably a hover)\n if (storeIndex < 0) {\n return;\n }\n\n // update the event in the store\n store[storeIndex] = ev;\n\n this.callback(this.manager, eventType, {\n pointers: store,\n changedPointers: [ev],\n pointerType,\n srcEvent: ev\n });\n\n if (removePointer) {\n // remove from the store\n store.splice(storeIndex, 1);\n }\n }\n}\n","/**\n * @private\n * convert array-like objects to real arrays\n * @param {Object} obj\n * @returns {Array}\n */\nexport default function toArray(obj) {\n return Array.prototype.slice.call(obj, 0);\n}\n","import inArray from './in-array';\n\n/**\n * @private\n * unique array with objects based on a key (like 'id') or just by the array's value\n * @param {Array} src [{id:1},{id:2},{id:1}]\n * @param {String} [key]\n * @param {Boolean} [sort=False]\n * @returns {Array} [{id:1},{id:2}]\n */\nexport default function uniqueArray(src, key, sort) {\n let results = [];\n let values = [];\n let i = 0;\n\n while (i < src.length) {\n let val = key ? src[i][key] : src[i];\n if (inArray(values, val) < 0) {\n results.push(src[i]);\n }\n values[i] = val;\n i++;\n }\n\n if (sort) {\n if (!key) {\n results = results.sort();\n } else {\n results = results.sort((a, b) => {\n return a[key] > b[key];\n });\n }\n }\n\n return results;\n}\n","import {\n INPUT_START,\n INPUT_MOVE,\n INPUT_END,\n INPUT_CANCEL,\n INPUT_TYPE_TOUCH\n} from '../inputjs/input-consts';\nimport Input from '../inputjs/input-constructor';\nimport toArray from '../utils/to-array';\nimport hasParent from '../utils/has-parent';\nimport uniqueArray from '../utils/unique-array';\n\nconst TOUCH_INPUT_MAP = {\n touchstart: INPUT_START,\n touchmove: INPUT_MOVE,\n touchend: INPUT_END,\n touchcancel: INPUT_CANCEL\n};\n\nconst TOUCH_TARGET_EVENTS = 'touchstart touchmove touchend touchcancel';\n\n/**\n * @private\n * Multi-user touch events input\n * @constructor\n * @extends Input\n */\nexport default class TouchInput extends Input {\n constructor() {\n TouchInput.prototype.evTarget = TOUCH_TARGET_EVENTS;\n super(...arguments);\n this.targetIds = {};\n // this.evTarget = TOUCH_TARGET_EVENTS;\n }\n handler(ev) {\n let type = TOUCH_INPUT_MAP[ev.type];\n let touches = getTouches.call(this, ev, type);\n if (!touches) {\n return;\n }\n\n this.callback(this.manager, type, {\n pointers: touches[0],\n changedPointers: touches[1],\n pointerType: INPUT_TYPE_TOUCH,\n srcEvent: ev\n });\n }\n}\n\n/**\n * @private\n * @this {TouchInput}\n * @param {Object} ev\n * @param {Number} type flag\n * @returns {undefined|Array} [all, changed]\n */\nfunction getTouches(ev, type) {\n let allTouches = toArray(ev.touches);\n let { targetIds } = this;\n\n // when there is only one touch, the process can be simplified\n if (type & (INPUT_START | INPUT_MOVE) && allTouches.length === 1) {\n targetIds[allTouches[0].identifier] = true;\n return [allTouches, allTouches];\n }\n\n let i;\n let targetTouches;\n let changedTouches = toArray(ev.changedTouches);\n let changedTargetTouches = [];\n let { target } = this;\n\n // get target touches from touches\n targetTouches = allTouches.filter((touch) => {\n return hasParent(touch.target, target);\n });\n\n // collect touches\n if (type === INPUT_START) {\n i = 0;\n while (i < targetTouches.length) {\n targetIds[targetTouches[i].identifier] = true;\n i++;\n }\n }\n\n // filter changed touches to only contain touches that exist in the collected target ids\n i = 0;\n while (i < changedTouches.length) {\n if (targetIds[changedTouches[i].identifier]) {\n changedTargetTouches.push(changedTouches[i]);\n }\n\n // cleanup removed touches\n if (type & (INPUT_END | INPUT_CANCEL)) {\n delete targetIds[changedTouches[i].identifier];\n }\n i++;\n }\n\n if (!changedTargetTouches.length) {\n return;\n }\n\n return [\n // merge targetTouches with changedTargetTouches so it contains ALL touches, including 'end' and 'cancel'\n uniqueArray(targetTouches.concat(changedTargetTouches), 'identifier', true),\n changedTargetTouches\n ];\n}\n","import {\n INPUT_START,\n INPUT_MOVE,\n INPUT_END,\n INPUT_TYPE_MOUSE\n} from '../inputjs/input-consts';\nimport Input from '../inputjs/input-constructor';\n\nconst MOUSE_INPUT_MAP = {\n mousedown: INPUT_START,\n mousemove: INPUT_MOVE,\n mouseup: INPUT_END\n};\n\nconst MOUSE_ELEMENT_EVENTS = 'mousedown';\nconst MOUSE_WINDOW_EVENTS = 'mousemove mouseup';\n\n/**\n * @private\n * Mouse events input\n * @constructor\n * @extends Input\n */\nexport default class MouseInput extends Input {\n constructor() {\n var proto = MouseInput.prototype;\n proto.evEl = MOUSE_ELEMENT_EVENTS;\n proto.evWin = MOUSE_WINDOW_EVENTS;\n\n super(...arguments);\n this.pressed = false; // mousedown state\n }\n\n /**\n * @private\n * handle mouse events\n * @param {Object} ev\n */\n handler(ev) {\n let eventType = MOUSE_INPUT_MAP[ev.type];\n\n // on start we want to have the left mouse button down\n if (eventType & INPUT_START && ev.button === 0) {\n this.pressed = true;\n }\n\n if (eventType & INPUT_MOVE && ev.which !== 1) {\n eventType = INPUT_END;\n }\n\n // mouse must be down\n if (!this.pressed) {\n return;\n }\n\n if (eventType & INPUT_END) {\n this.pressed = false;\n }\n\n this.callback(this.manager, eventType, {\n pointers: [ev],\n changedPointers: [ev],\n pointerType: INPUT_TYPE_MOUSE,\n srcEvent: ev\n });\n }\n}\n","import Input from \"../inputjs/input-constructor\";\nimport TouchInput from \"./touch\";\nimport MouseInput from \"./mouse\";\nimport {\n\tINPUT_START,\n\tINPUT_END,\n\tINPUT_CANCEL,\n\tINPUT_TYPE_TOUCH,\n\tINPUT_TYPE_MOUSE,\n} from \"../inputjs/input-consts\";\n\n/**\n * @private\n * Combined touch and mouse input\n *\n * Touch has a higher priority then mouse, and while touching no mouse events are allowed.\n * This because touch devices also emit mouse events while doing a touch.\n *\n * @constructor\n * @extends Input\n */\n\nconst DEDUP_TIMEOUT = 2500;\nconst DEDUP_DISTANCE = 25;\n\nfunction setLastTouch(eventData) {\n\tconst { changedPointers: [touch] } = eventData;\n\n\tif (touch.identifier === this.primaryTouch) {\n\t\tconst lastTouch = { x: touch.clientX, y: touch.clientY };\n\t\tconst lts = this.lastTouches;\n\n\t\tthis.lastTouches.push(lastTouch);\n\n\n\t\tconst removeLastTouch = function() {\n\t\t\tconst i = lts.indexOf(lastTouch);\n\n\t\t\tif (i > -1) {\n\t\t\t\tlts.splice(i, 1);\n\t\t\t}\n\t\t};\n\n\t\tsetTimeout(removeLastTouch, DEDUP_TIMEOUT);\n\t}\n}\n\n\nfunction recordTouches(eventType, eventData) {\n\tif (eventType & INPUT_START) {\n\t\tthis.primaryTouch = eventData.changedPointers[0].identifier;\n\t\tsetLastTouch.call(this, eventData);\n\t} else if (eventType & (INPUT_END | INPUT_CANCEL)) {\n\t\tsetLastTouch.call(this, eventData);\n\t}\n}\nfunction isSyntheticEvent(eventData) {\n\tconst x = eventData.srcEvent.clientX;\n\tconst y = eventData.srcEvent.clientY;\n\n\tfor (let i = 0; i < this.lastTouches.length; i++) {\n\t\tconst t = this.lastTouches[i];\n\t\tconst dx = Math.abs(x - t.x);\n\t\tconst dy = Math.abs(y - t.y);\n\n\t\tif (dx <= DEDUP_DISTANCE && dy <= DEDUP_DISTANCE) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n}\n\n\nexport default class TouchMouseInput extends Input {\n\tconstructor(manager, callback) {\n\t\tsuper(manager, callback);\n\n\t\tthis.touch = new TouchInput(this.manager, this.handler);\n\t\tthis.mouse = new MouseInput(this.manager, this.handler);\n\t\tthis.primaryTouch = null;\n\t\tthis.lastTouches = [];\n\t}\n\n\t/**\n\t * @private\n\t * handle mouse and touch events\n\t * @param {Hammer} manager\n\t * @param {String} inputEvent\n\t * @param {Object} inputData\n\t */\n\thandler = (manager, inputEvent, inputData) => {\n\t\tconst isTouch = (inputData.pointerType === INPUT_TYPE_TOUCH);\n\t\tconst isMouse = (inputData.pointerType === INPUT_TYPE_MOUSE);\n\n\t\tif (isMouse && inputData.sourceCapabilities && inputData.sourceCapabilities.firesTouchEvents) {\n\t\t\treturn;\n\t\t}\n\n\t\t// when we're in a touch event, record touches to de-dupe synthetic mouse event\n\t\tif (isTouch) {\n\t\t\trecordTouches.call(this, inputEvent, inputData);\n\t\t} else if (isMouse && isSyntheticEvent.call(this, inputData)) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.callback(manager, inputEvent, inputData);\n\t}\n\n\t/**\n\t * @private\n\t * remove the event listeners\n\t */\n\tdestroy() {\n\t\tthis.touch.destroy();\n\t\tthis.mouse.destroy();\n\t}\n}\n","import { SUPPORT_POINTER_EVENTS,SUPPORT_ONLY_TOUCH,SUPPORT_TOUCH } from './input-consts';\nimport inputHandler from './input-handler';\nimport PointerEventInput from '../input/pointerevent';\nimport TouchInput from '../input/touch';\nimport MouseInput from '../input/mouse';\nimport TouchMouseInput from '../input/touchmouse';\n\n/**\n * @private\n * create new input type manager\n * called by the Manager constructor\n * @param {Hammer} manager\n * @returns {Input}\n */\nexport default function createInputInstance(manager) {\n let Type;\n // let inputClass = manager.options.inputClass;\n let { options:{ inputClass } } = manager;\n if (inputClass) {\n Type = inputClass;\n } else if (SUPPORT_POINTER_EVENTS) {\n Type = PointerEventInput;\n } else if (SUPPORT_ONLY_TOUCH) {\n Type = TouchInput;\n } else if (!SUPPORT_TOUCH) {\n Type = MouseInput;\n } else {\n Type = TouchMouseInput;\n }\n return new (Type)(manager, inputHandler);\n}\n","import each from './each';\n/**\n * @private\n * if the argument is an array, we want to execute the fn on each entry\n * if it aint an array we don't want to do a thing.\n * this is used by all the methods that accept a single and array argument.\n * @param {*|Array} arg\n * @param {String} fn\n * @param {Object} [context]\n * @returns {Boolean}\n */\nexport default function invokeArrayArg(arg, fn, context) {\n if (Array.isArray(arg)) {\n each(arg, context[fn], context);\n return true;\n }\n return false;\n}\n","const STATE_POSSIBLE = 1;\nconst STATE_BEGAN = 2;\nconst STATE_CHANGED = 4;\nconst STATE_ENDED = 8;\nconst STATE_RECOGNIZED = STATE_ENDED;\nconst STATE_CANCELLED = 16;\nconst STATE_FAILED = 32;\n\nexport {\n STATE_POSSIBLE,\n STATE_BEGAN,\n STATE_CHANGED,\n STATE_ENDED,\n STATE_RECOGNIZED,\n STATE_CANCELLED,\n STATE_FAILED\n};\n","/**\n * @private\n * get a unique id\n * @returns {number} uniqueId\n */\nlet _uniqueId = 1;\nexport default function uniqueId() {\n return _uniqueId++;\n}\n","/**\n * @private\n * get a recognizer by name if it is bound to a manager\n * @param {Recognizer|String} otherRecognizer\n * @param {Recognizer} recognizer\n * @returns {Recognizer}\n */\nexport default function getRecognizerByNameIfManager(otherRecognizer, recognizer) {\n let { manager } = recognizer;\n if (manager) {\n return manager.get(otherRecognizer);\n }\n return otherRecognizer;\n}\n","import {\n STATE_CANCELLED,\n STATE_ENDED,\n STATE_CHANGED,\n STATE_BEGAN\n} from './recognizer-consts';\n\n/**\n * @private\n * get a usable string, used as event postfix\n * @param {constant} state\n * @returns {String} state\n */\nexport default function stateStr(state) {\n if (state & STATE_CANCELLED) {\n return 'cancel';\n } else if (state & STATE_ENDED) {\n return 'end';\n } else if (state & STATE_CHANGED) {\n return 'move';\n } else if (state & STATE_BEGAN) {\n return 'start';\n }\n return '';\n}\n","import {\n STATE_POSSIBLE,\n STATE_ENDED,\n STATE_FAILED,\n STATE_RECOGNIZED,\n STATE_CANCELLED,\n STATE_BEGAN,\n STATE_CHANGED\n} from './recognizer-consts';\nimport assign from '../utils/assign';\nimport uniqueId from '../utils/unique-id';\nimport invokeArrayArg from '../utils/invoke-array-arg';\nimport inArray from '../utils/in-array';\nimport boolOrFn from '../utils/bool-or-fn';\nimport getRecognizerByNameIfManager from './get-recognizer-by-name-if-manager';\nimport stateStr from './state-str';\n\n/**\n * @private\n * Recognizer flow explained; *\n * All recognizers have the initial state of POSSIBLE when a input session starts.\n * The definition of a input session is from the first input until the last input, with all it's movement in it. *\n * Example session for mouse-input: mousedown -> mousemove -> mouseup\n *\n * On each recognizing cycle (see Manager.recognize) the .recognize() method is executed\n * which determines with state it should be.\n *\n * If the recognizer has the state FAILED, CANCELLED or RECOGNIZED (equals ENDED), it is reset to\n * POSSIBLE to give it another change on the next cycle.\n *\n * Possible\n * |\n * +-----+---------------+\n * | |\n * +-----+-----+ |\n * | | |\n * Failed Cancelled |\n * +-------+------+\n * | |\n * Recognized Began\n * |\n * Changed\n * |\n * Ended/Recognized\n */\n\n/**\n * @private\n * Recognizer\n * Every recognizer needs to extend from this class.\n * @constructor\n * @param {Object} options\n */\nexport default class Recognizer {\n constructor(options = {}) {\n this.options = {\n enable: true,\n ...options,\n };\n\n this.id = uniqueId();\n\n this.manager = null;\n\n // default is enable true\n this.state = STATE_POSSIBLE;\n this.simultaneous = {};\n this.requireFail = [];\n }\n\n /**\n * @private\n * set options\n * @param {Object} options\n * @return {Recognizer}\n */\n set(options) {\n assign(this.options, options);\n\n // also update the touchAction, in case something changed about the directions/enabled state\n this.manager && this.manager.touchAction.update();\n return this;\n }\n\n /**\n * @private\n * recognize simultaneous with an other recognizer.\n * @param {Recognizer} otherRecognizer\n * @returns {Recognizer} this\n */\n recognizeWith(otherRecognizer) {\n if (invokeArrayArg(otherRecognizer, 'recognizeWith', this)) {\n return this;\n }\n\n let { simultaneous } = this;\n otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this);\n if (!simultaneous[otherRecognizer.id]) {\n simultaneous[otherRecognizer.id] = otherRecognizer;\n otherRecognizer.recognizeWith(this);\n }\n return this;\n }\n\n /**\n * @private\n * drop the simultaneous link. it doesnt remove the link on the other recognizer.\n * @param {Recognizer} otherRecognizer\n * @returns {Recognizer} this\n */\n dropRecognizeWith(otherRecognizer) {\n if (invokeArrayArg(otherRecognizer, 'dropRecognizeWith', this)) {\n return this;\n }\n\n otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this);\n delete this.simultaneous[otherRecognizer.id];\n return this;\n }\n\n /**\n * @private\n * recognizer can only run when an other is failing\n * @param {Recognizer} otherRecognizer\n * @returns {Recognizer} this\n */\n requireFailure(otherRecognizer) {\n if (invokeArrayArg(otherRecognizer, 'requireFailure', this)) {\n return this;\n }\n\n let { requireFail } = this;\n otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this);\n if (inArray(requireFail, otherRecognizer) === -1) {\n requireFail.push(otherRecognizer);\n otherRecognizer.requireFailure(this);\n }\n return this;\n }\n\n /**\n * @private\n * drop the requireFailure link. it does not remove the link on the other recognizer.\n * @param {Recognizer} otherRecognizer\n * @returns {Recognizer} this\n */\n dropRequireFailure(otherRecognizer) {\n if (invokeArrayArg(otherRecognizer, 'dropRequireFailure', this)) {\n return this;\n }\n\n otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this);\n let index = inArray(this.requireFail, otherRecognizer);\n if (index > -1) {\n this.requireFail.splice(index, 1);\n }\n return this;\n }\n\n /**\n * @private\n * has require failures boolean\n * @returns {boolean}\n */\n hasRequireFailures() {\n return this.requireFail.length > 0;\n }\n\n /**\n * @private\n * if the recognizer can recognize simultaneous with an other recognizer\n * @param {Recognizer} otherRecognizer\n * @returns {Boolean}\n */\n canRecognizeWith(otherRecognizer) {\n return !!this.simultaneous[otherRecognizer.id];\n }\n\n /**\n * @private\n * You should use `tryEmit` instead of `emit` directly to check\n * that all the needed recognizers has failed before emitting.\n * @param {Object} input\n */\n emit(input) {\n let self = this;\n let { state } = this;\n\n function emit(event) {\n self.manager.emit(event, input);\n }\n\n // 'panstart' and 'panmove'\n if (state < STATE_ENDED) {\n emit(self.options.event + stateStr(state));\n }\n\n emit(self.options.event); // simple 'eventName' events\n\n if (input.additionalEvent) { // additional event(panleft, panright, pinchin, pinchout...)\n emit(input.additionalEvent);\n }\n\n // panend and pancancel\n if (state >= STATE_ENDED) {\n emit(self.options.event + stateStr(state));\n }\n }\n\n /**\n * @private\n * Check that all the require failure recognizers has failed,\n * if true, it emits a gesture event,\n * otherwise, setup the state to FAILED.\n * @param {Object} input\n */\n tryEmit(input) {\n if (this.canEmit()) {\n return this.emit(input);\n }\n // it's failing anyway\n this.state = STATE_FAILED;\n }\n\n /**\n * @private\n * can we emit?\n * @returns {boolean}\n */\n canEmit() {\n let i = 0;\n while (i < this.requireFail.length) {\n if (!(this.requireFail[i].state & (STATE_FAILED | STATE_POSSIBLE))) {\n return false;\n }\n i++;\n }\n return true;\n }\n\n /**\n * @private\n * update the recognizer\n * @param {Object} inputData\n */\n recognize(inputData) {\n // make a new copy of the inputData\n // so we can change the inputData without messing up the other recognizers\n let inputDataClone = assign({}, inputData);\n\n // is is enabled and allow recognizing?\n if (!boolOrFn(this.options.enable, [this, inputDataClone])) {\n this.reset();\n this.state = STATE_FAILED;\n return;\n }\n\n // reset when we've reached the end\n if (this.state & (STATE_RECOGNIZED | STATE_CANCELLED | STATE_FAILED)) {\n this.state = STATE_POSSIBLE;\n }\n\n this.state = this.process(inputDataClone);\n\n // the recognizer has recognized a gesture\n // so trigger an event\n if (this.state & (STATE_BEGAN | STATE_CHANGED | STATE_ENDED | STATE_CANCELLED)) {\n this.tryEmit(inputDataClone);\n }\n }\n\n /**\n * @private\n * return the state of the recognizer\n * the actual recognizing happens in this method\n * @virtual\n * @param {Object} inputData\n * @returns {constant} STATE\n */\n\n /* jshint ignore:start */\n process(inputData) { }\n /* jshint ignore:end */\n\n /**\n * @private\n * return the preferred touch-action\n * @virtual\n * @returns {Array}\n */\n getTouchAction() { }\n\n /**\n * @private\n * called when the gesture isn't allowed to recognize\n * like when another is being recognized or it is disabled\n * @virtual\n */\n reset() { }\n}","import { TOUCH_ACTION_COMPUTE } from \"./touchactionjs/touchaction-Consts\";\n\nexport default {\n\t/**\n\t * @private\n\t * set if DOM events are being triggered.\n\t * But this is slower and unused by simple implementations, so disabled by default.\n\t * @type {Boolean}\n\t * @default false\n\t */\n\tdomEvents: false,\n\n\t/**\n\t * @private\n\t * The value for the touchAction property/fallback.\n\t * When set to `compute` it will magically set the correct value based on the added recognizers.\n\t * @type {String}\n\t * @default compute\n\t */\n\ttouchAction: TOUCH_ACTION_COMPUTE,\n\n\t/**\n\t * @private\n\t * @type {Boolean}\n\t * @default true\n\t */\n\tenable: true,\n\n\t/**\n\t * @private\n\t * EXPERIMENTAL FEATURE -- can be removed/changed\n\t * Change the parent input target element.\n\t * If Null, then it is being set the to main element.\n\t * @type {Null|EventTarget}\n\t * @default null\n\t */\n\tinputTarget: null,\n\n\t/**\n\t * @private\n\t * force an input class\n\t * @type {Null|Function}\n\t * @default null\n\t */\n\tinputClass: null,\n\n\t/**\n\t * @private\n\t * Default recognizer setup when calling `Hammer()`\n\t * When creating a new Manager these will be skipped.\n\t * @type {Array}\n\t */\n\tpreset: [],\n\n\t/**\n\t * @private\n\t * Some CSS properties can be used to improve the working of Hammer.\n\t * Add them to this method and they will be set when creating a new Manager.\n\t * @namespace\n\t */\n\tcssProps: {\n\t\t/**\n\t\t * @private\n\t\t * Disables text selection to improve the dragging gesture. Mainly for desktop browsers.\n\t\t * @type {String}\n\t\t * @default 'none'\n\t\t */\n\t\tuserSelect: \"none\",\n\n\t\t/**\n\t\t * @private\n\t\t * Disable the Windows Phone grippers when pressing an element.\n\t\t * @type {String}\n\t\t * @default 'none'\n\t\t */\n\t\ttouchSelect: \"none\",\n\n\t\t/**\n\t\t * @private\n\t\t * Disables the default callout shown when you touch and hold a touch target.\n\t\t * On iOS, when you touch and hold a touch target such as a link, Safari displays\n\t\t * a callout containing information about the link. This property allows you to disable that callout.\n\t\t * @type {String}\n\t\t * @default 'none'\n\t\t */\n\t\ttouchCallout: \"none\",\n\n\t\t/**\n\t\t * @private\n\t\t * Specifies whether zooming is enabled. Used by IE10>\n\t\t * @type {String}\n\t\t * @default 'none'\n\t\t */\n\t\tcontentZooming: \"none\",\n\n\t\t/**\n\t\t * @private\n\t\t * Specifies that an entire element should be draggable instead of its contents. Mainly for desktop browsers.\n\t\t * @type {String}\n\t\t * @default 'none'\n\t\t */\n\t\tuserDrag: \"none\",\n\n\t\t/**\n\t\t * @private\n\t\t * Overrides the highlight color shown when the user taps a link or a JavaScript\n\t\t * clickable element in iOS. This property obeys the alpha value, if specified.\n\t\t * @type {String}\n\t\t * @default 'rgba(0,0,0,0)'\n\t\t */\n\t\ttapHighlightColor: \"rgba(0,0,0,0)\",\n\t},\n};\n","import assign from \"./utils/assign\";\nimport TouchAction from \"./touchactionjs/touchaction-constructor\";\nimport createInputInstance from \"./inputjs/create-input-instance\";\nimport each from \"./utils/each\";\nimport inArray from \"./utils/in-array\";\nimport invokeArrayArg from \"./utils/invoke-array-arg\";\nimport splitStr from \"./utils/split-str\";\nimport prefixed from \"./utils/prefixed\";\nimport Recognizer from \"./recognizerjs/recognizer-constructor\";\nimport {\n STATE_BEGAN,\n STATE_ENDED,\n STATE_CHANGED,\n STATE_RECOGNIZED,\n} from \"./recognizerjs/recognizer-consts\";\nimport defaults from \"./defaults\";\n\nconst STOP = 1;\nconst FORCED_STOP = 2;\n\n\n/**\n * @private\n * add/remove the css properties as defined in manager.options.cssProps\n * @param {Manager} manager\n * @param {Boolean} add\n */\nfunction toggleCssProps(manager, add) {\n const { element } = manager;\n\n if (!element.style) {\n return;\n }\n let prop;\n\n each(manager.options.cssProps, (value, name) => {\n prop = prefixed(element.style, name);\n if (add) {\n manager.oldCssProps[prop] = element.style[prop];\n element.style[prop] = value;\n } else {\n element.style[prop] = manager.oldCssProps[prop] || \"\";\n }\n });\n if (!add) {\n manager.oldCssProps = {};\n }\n}\n\n/**\n * @private\n * trigger dom event\n * @param {String} event\n * @param {Object} data\n */\nfunction triggerDomEvent(event, data) {\n const gestureEvent = document.createEvent(\"Event\");\n\n gestureEvent.initEvent(event, true, true);\n gestureEvent.gesture = data;\n data.target.dispatchEvent(gestureEvent);\n}\n\n\n/**\n* @private\n * Manager\n * @param {HTMLElement} element\n * @param {Object} [options]\n * @constructor\n */\nexport default class Manager {\n constructor(element, options) {\n this.options = assign({}, defaults, options || {});\n\n this.options.inputTarget = this.options.inputTarget || element;\n\n this.handlers = {};\n this.session = {};\n this.recognizers = [];\n this.oldCssProps = {};\n\n this.element = element;\n this.input = createInputInstance(this);\n this.touchAction = new TouchAction(this, this.options.touchAction);\n\n toggleCssProps(this, true);\n\n each(this.options.recognizers, item => {\n const recognizer = this.add(new (item[0])(item[1]));\n\n item[2] && recognizer.recognizeWith(item[2]);\n item[3] && recognizer.requireFailure(item[3]);\n }, this);\n }\n\n\t/**\n\t * @private\n\t * set options\n\t * @param {Object} options\n\t * @returns {Manager}\n\t */\n set(options) {\n assign(this.options, options);\n\n // Options that need a little more setup\n if (options.touchAction) {\n this.touchAction.update();\n }\n if (options.inputTarget) {\n // Clean up existing event listeners and reinitialize\n this.input.destroy();\n this.input.target = options.inputTarget;\n this.input.init();\n }\n return this;\n }\n\n\t/**\n\t * @private\n\t * stop recognizing for this session.\n\t * This session will be discarded, when a new [input]start event is fired.\n\t * When forced, the recognizer cycle is stopped immediately.\n\t * @param {Boolean} [force]\n\t */\n stop(force) {\n this.session.stopped = force ? FORCED_STOP : STOP;\n }\n\n\t/**\n\t * @private\n\t * run the recognizers!\n\t * called by the inputHandler function on every movement of the pointers (touches)\n\t * it walks through all the recognizers and tries to detect the gesture that is being made\n\t * @param {Object} inputData\n\t */\n recognize(inputData) {\n const { session } = this;\n\n if (session.stopped) {\n return;\n }\n\n // run the touch-action polyfill\n this.touchAction.preventDefaults(inputData);\n\n let recognizer;\n const { recognizers } = this;\n\n // this holds the recognizer that is being recognized.\n // so the recognizer's state needs to be BEGAN, CHANGED, ENDED or RECOGNIZED\n // if no recognizer is detecting a thing, it is set to `null`\n let { curRecognizer } = session;\n\n // reset when the last recognizer is recognized\n // or when we're in a new session\n if (!curRecognizer || (curRecognizer && curRecognizer.state & STATE_RECOGNIZED)) {\n session.curRecognizer = null;\n curRecognizer = null;\n }\n\n let i = 0;\n\n while (i < recognizers.length) {\n recognizer = recognizers[i];\n\n // find out if we are allowed try to recognize the input for this one.\n // 1. allow if the session is NOT forced stopped (see the .stop() method)\n // 2. allow if we still haven't recognized a gesture in this session, or the this recognizer is the one\n // that is being recognized.\n // 3. allow if the recognizer is allowed to run simultaneous with the current recognized recognizer.\n // this can be setup with the `recognizeWith()` method on the recognizer.\n if (session.stopped !== FORCED_STOP && (// 1\n !curRecognizer || recognizer === curRecognizer || // 2\n recognizer.canRecognizeWith(curRecognizer))) { // 3\n recognizer.recognize(inputData);\n } else {\n recognizer.reset();\n }\n\n // if the recognizer has been recognizing the input as a valid gesture, we want to store this one as the\n // current active recognizer. but only if we don't already have an active recognizer\n if (!curRecognizer && recognizer.state & (STATE_BEGAN | STATE_CHANGED | STATE_ENDED)) {\n session.curRecognizer = recognizer;\n curRecognizer = recognizer;\n }\n i++;\n }\n }\n\n\t/**\n\t * @private\n\t * get a recognizer by its event name.\n\t * @param {Recognizer|String} recognizer\n\t * @returns {Recognizer|Null}\n\t */\n get(recognizer) {\n if (recognizer instanceof Recognizer) {\n return recognizer;\n }\n\n const { recognizers } = this;\n\n for (let i = 0; i < recognizers.length; i++) {\n if (recognizers[i].options.event === recognizer) {\n return recognizers[i];\n }\n }\n return null;\n }\n\n\t/**\n\t * @private add a recognizer to the manager\n\t * existing recognizers with the same event name will be removed\n\t * @param {Recognizer} recognizer\n\t * @returns {Recognizer|Manager}\n\t */\n add(recognizer) {\n if (invokeArrayArg(recognizer, \"add\", this)) {\n return this;\n }\n\n // remove existing\n const existing = this.get(recognizer.options.event);\n\n if (existing) {\n this.remove(existing);\n }\n\n this.recognizers.push(recognizer);\n recognizer.manager = this;\n\n this.touchAction.update();\n return recognizer;\n }\n\n\t/**\n\t * @private\n\t * remove a recognizer by name or instance\n\t * @param {Recognizer|String} recognizer\n\t * @returns {Manager}\n\t */\n remove(recognizer) {\n if (invokeArrayArg(recognizer, \"remove\", this)) {\n return this;\n }\n\n const targetRecognizer = this.get(recognizer);\n\n // let's make sure this recognizer exists\n if (recognizer) {\n const { recognizers } = this;\n const index = inArray(recognizers, targetRecognizer);\n\n if (index !== -1) {\n recognizers.splice(index, 1);\n this.touchAction.update();\n }\n }\n\n return this;\n }\n\n\t/**\n\t * @private\n\t * bind event\n\t * @param {String} events\n\t * @param {Function} handler\n\t * @returns {EventEmitter} this\n\t */\n on(events, handler) {\n if (events === undefined || handler === undefined) {\n return this;\n }\n\n const { handlers } = this;\n\n each(splitStr(events), event => {\n handlers[event] = handlers[event] || [];\n handlers[event].push(handler);\n });\n return this;\n }\n\n\t/**\n\t * @private unbind event, leave emit blank to remove all handlers\n\t * @param {String} events\n\t * @param {Function} [handler]\n\t * @returns {EventEmitter} this\n\t */\n off(events, handler) {\n if (events === undefined) {\n return this;\n }\n\n const { handlers } = this;\n\n each(splitStr(events), event => {\n if (!handler) {\n delete handlers[event];\n } else {\n handlers[event] && handlers[event].splice(inArray(handlers[event], handler), 1);\n }\n });\n return this;\n }\n\n\t/**\n\t * @private emit event to the listeners\n\t * @param {String} event\n\t * @param {Object} data\n\t */\n emit(event, data) {\n // we also want to trigger dom events\n if (this.options.domEvents) {\n triggerDomEvent(event, data);\n }\n\n // no handlers, so skip it all\n const handlers = this.handlers[event] && this.handlers[event].slice();\n\n if (!handlers || !handlers.length) {\n return;\n }\n\n data.type = event;\n data.preventDefault = function () {\n data.srcEvent.preventDefault();\n };\n\n let i = 0;\n\n while (i < handlers.length) {\n handlers[i](data);\n i++;\n }\n }\n\n\t/**\n\t * @private\n\t * destroy the manager and unbinds all events\n\t * it doesn't unbind dom events, that is the user own responsibility\n\t */\n destroy() {\n this.element && toggleCssProps(this, false);\n\n this.handlers = {};\n this.session = {};\n this.input.destroy();\n this.element = null;\n }\n}\n","import {\n INPUT_START,\n INPUT_MOVE,\n INPUT_END,\n INPUT_CANCEL,\n INPUT_TYPE_TOUCH\n} from '../inputjs/input-consts';\nimport Input from '../inputjs/input-constructor';\nimport toArray from '../utils/to-array';\nimport uniqueArray from '../utils/unique-array';\n\nconst SINGLE_TOUCH_INPUT_MAP = {\n touchstart: INPUT_START,\n touchmove: INPUT_MOVE,\n touchend: INPUT_END,\n touchcancel: INPUT_CANCEL\n};\n\nconst SINGLE_TOUCH_TARGET_EVENTS = 'touchstart';\nconst SINGLE_TOUCH_WINDOW_EVENTS = 'touchstart touchmove touchend touchcancel';\n\n/**\n * @private\n * Touch events input\n * @constructor\n * @extends Input\n */\nexport default class SingleTouchInput extends Input {\n constructor() {\n var proto = SingleTouchInput.prototype;\n proto.evTarget = SINGLE_TOUCH_TARGET_EVENTS;\n proto.evWin = SINGLE_TOUCH_WINDOW_EVENTS;\n\n super(...arguments);\n this.started = false;\n }\n\n handler(ev) {\n let type = SINGLE_TOUCH_INPUT_MAP[ev.type];\n\n // should we handle the touch events?\n if (type === INPUT_START) {\n this.started = true;\n }\n\n if (!this.started) {\n return;\n }\n\n let touches = normalizeSingleTouches.call(this, ev, type);\n\n // when done, reset the started state\n if (type & (INPUT_END | INPUT_CANCEL) && touches[0].length - touches[1].length === 0) {\n this.started = false;\n }\n\n this.callback(this.manager, type, {\n pointers: touches[0],\n changedPointers: touches[1],\n pointerType: INPUT_TYPE_TOUCH,\n srcEvent: ev\n });\n }\n}\n\n/**\n * @private\n * @this {TouchInput}\n * @param {Object} ev\n * @param {Number} type flag\n * @returns {undefined|Array} [all, changed]\n */\nfunction normalizeSingleTouches(ev, type) {\n let all = toArray(ev.touches);\n let changed = toArray(ev.changedTouches);\n\n if (type & (INPUT_END | INPUT_CANCEL)) {\n all = uniqueArray(all.concat(changed), 'identifier', true);\n }\n\n return [all, changed];\n}\n","import Recognizer from '../recognizerjs/recognizer-constructor';\nimport {\n STATE_BEGAN,\n STATE_CHANGED,\n STATE_CANCELLED,\n STATE_ENDED,\n STATE_FAILED\n} from '../recognizerjs/recognizer-consts';\nimport {\n INPUT_CANCEL,\n INPUT_END\n} from '../inputjs/input-consts';\n\n/**\n * @private\n * This recognizer is just used as a base for the simple attribute recognizers.\n * @constructor\n * @extends Recognizer\n */\nexport default class AttrRecognizer extends Recognizer {\n constructor(options = {}) {\n super({\n pointers: 1,\n ...options,\n });\n }\n\n /**\n * @private\n * Used to check if it the recognizer receives valid input, like input.distance > 10.\n * @memberof AttrRecognizer\n * @param {Object} input\n * @returns {Boolean} recognized\n */\n attrTest(input) {\n let optionPointers = this.options.pointers;\n return optionPointers === 0 || input.pointers.length === optionPointers;\n }\n\n /**\n * @private\n * Process the input and return the state for the recognizer\n * @memberof AttrRecognizer\n * @param {Object} input\n * @returns {*} State\n */\n process(input) {\n let { state } = this;\n let { eventType } = input;\n\n let isRecognized = state & (STATE_BEGAN | STATE_CHANGED);\n let isValid = this.attrTest(input);\n\n // on cancel input and we've recognized before, return STATE_CANCELLED\n if (isRecognized && (eventType & INPUT_CANCEL || !isValid)) {\n return state | STATE_CANCELLED;\n } else if (isRecognized || isValid) {\n if (eventType & INPUT_END) {\n return state | STATE_ENDED;\n } else if (!(state & STATE_BEGAN)) {\n return STATE_BEGAN;\n }\n return state | STATE_CHANGED;\n }\n return STATE_FAILED;\n }\n}\n","import Recognizer from '../recognizerjs/recognizer-constructor';\nimport { TOUCH_ACTION_MANIPULATION } from '../touchactionjs/touchaction-Consts';\nimport {INPUT_START,INPUT_END } from '../inputjs/input-consts';\nimport {\n STATE_RECOGNIZED,\n STATE_BEGAN,\n STATE_FAILED\n} from '../recognizerjs/recognizer-consts';\nimport getDistance from '../inputjs/get-distance';\n\n/**\n * @private\n * A tap is recognized when the pointer is doing a small tap/click. Multiple taps are recognized if they occur\n * between the given interval and position. The delay option can be used to recognize multi-taps without firing\n * a single tap.\n *\n * The eventData from the emitted event contains the property `tapCount`, which contains the amount of\n * multi-taps being recognized.\n * @constructor\n * @extends Recognizer\n */\nexport default class TapRecognizer extends Recognizer {\n constructor(options = {}) {\n super({\n event: 'tap',\n pointers: 1,\n taps: 1,\n interval: 300, // max time between the multi-tap taps\n time: 250, // max time of the pointer to be down (like finger on the screen)\n threshold: 9, // a minimal movement is ok, but keep it low\n posThreshold: 10, // a multi-tap can be a bit off the initial position\n ...options,\n });\n\n // previous time and center,\n // used for tap counting\n this.pTime = false;\n this.pCenter = false;\n\n this._timer = null;\n this._input = null;\n this.count = 0;\n }\n\n getTouchAction() {\n return [TOUCH_ACTION_MANIPULATION];\n }\n\n process(input) {\n let { options } = this;\n\n let validPointers = input.pointers.length === options.pointers;\n let validMovement = input.distance < options.threshold;\n let validTouchTime = input.deltaTime < options.time;\n\n this.reset();\n\n if ((input.eventType & INPUT_START) && (this.count === 0)) {\n return this.failTimeout();\n }\n\n // we only allow little movement\n // and we've reached an end event, so a tap is possible\n if (validMovement && validTouchTime && validPointers) {\n if (input.eventType !== INPUT_END) {\n return this.failTimeout();\n }\n\n let validInterval = this.pTime ? (input.timeStamp - this.pTime < options.interval) : true;\n let validMultiTap = !this.pCenter || getDistance(this.pCenter, input.center) < options.posThreshold;\n\n this.pTime = input.timeStamp;\n this.pCenter = input.center;\n\n if (!validMultiTap || !validInterval) {\n this.count = 1;\n } else {\n this.count += 1;\n }\n\n this._input = input;\n\n // if tap count matches we have recognized it,\n // else it has began recognizing...\n let tapCount = this.count % options.taps;\n if (tapCount === 0) {\n // no failing requirements, immediately trigger the tap event\n // or wait as long as the multitap interval to trigger\n if (!this.hasRequireFailures()) {\n return STATE_RECOGNIZED;\n } else {\n this._timer = setTimeout(() => {\n this.state = STATE_RECOGNIZED;\n this.tryEmit();\n }, options.interval);\n return STATE_BEGAN;\n }\n }\n }\n return STATE_FAILED;\n }\n\n failTimeout() {\n this._timer = setTimeout(() => {\n this.state = STATE_FAILED;\n }, this.options.interval);\n return STATE_FAILED;\n }\n\n reset() {\n clearTimeout(this._timer);\n }\n\n emit() {\n if (this.state === STATE_RECOGNIZED) {\n this._input.tapCount = this.count;\n this.manager.emit(this.options.event, this._input);\n }\n }\n}\n","import {\n DIRECTION_LEFT,\n DIRECTION_RIGHT,\n DIRECTION_UP,\n DIRECTION_DOWN\n} from '../inputjs/input-consts';\n\n/**\n * @private\n * direction cons to string\n * @param {constant} direction\n * @returns {String}\n */\nexport default function directionStr(direction) {\n if (direction === DIRECTION_DOWN) {\n return 'down';\n } else if (direction === DIRECTION_UP) {\n return 'up';\n } else if (direction === DIRECTION_LEFT) {\n return 'left';\n } else if (direction === DIRECTION_RIGHT) {\n return 'right';\n }\n return '';\n}\n","import AttrRecognizer from './attribute';\nimport {\n DIRECTION_ALL,\n DIRECTION_HORIZONTAL,\n DIRECTION_VERTICAL,\n DIRECTION_NONE,\n DIRECTION_UP,\n DIRECTION_DOWN,\n DIRECTION_LEFT,\n DIRECTION_RIGHT\n} from '../inputjs/input-consts';\nimport { STATE_BEGAN } from '../recognizerjs/recognizer-consts';\nimport { TOUCH_ACTION_PAN_X,TOUCH_ACTION_PAN_Y } from '../touchactionjs/touchaction-Consts';\nimport directionStr from '../recognizerjs/direction-str';\n\n/**\n * @private\n * Pan\n * Recognized when the pointer is down and moved in the allowed direction.\n * @constructor\n * @extends AttrRecognizer\n */\nexport default class PanRecognizer extends AttrRecognizer {\n constructor(options = {}) {\n super({\n event: 'pan',\n threshold: 10,\n pointers: 1,\n direction: DIRECTION_ALL,\n ...options,\n });\n this.pX = null;\n this.pY = null;\n }\n\n getTouchAction() {\n let { options:{ direction } } = this;\n let actions = [];\n if (direction & DIRECTION_HORIZONTAL) {\n actions.push(TOUCH_ACTION_PAN_Y);\n }\n if (direction & DIRECTION_VERTICAL) {\n actions.push(TOUCH_ACTION_PAN_X);\n }\n return actions;\n }\n\n directionTest(input) {\n let { options } = this;\n let hasMoved = true;\n let { distance } = input;\n let { direction } = input;\n let x = input.deltaX;\n let y = input.deltaY;\n\n // lock to axis?\n if (!(direction & options.direction)) {\n if (options.direction & DIRECTION_HORIZONTAL) {\n direction = (x === 0) ? DIRECTION_NONE : (x < 0) ? DIRECTION_LEFT : DIRECTION_RIGHT;\n hasMoved = x !== this.pX;\n distance = Math.abs(input.deltaX);\n } else {\n direction = (y === 0) ? DIRECTION_NONE : (y < 0) ? DIRECTION_UP : DIRECTION_DOWN;\n hasMoved = y !== this.pY;\n distance = Math.abs(input.deltaY);\n }\n }\n input.direction = direction;\n return hasMoved && distance > options.threshold && direction & options.direction;\n }\n\n attrTest(input) {\n return AttrRecognizer.prototype.attrTest.call(this, input) && // replace with a super call\n (this.state & STATE_BEGAN || (!(this.state & STATE_BEGAN) && this.directionTest(input)));\n }\n\n emit(input) {\n\n this.pX = input.deltaX;\n this.pY = input.deltaY;\n\n let direction = directionStr(input.direction);\n\n if (direction) {\n input.additionalEvent = this.options.event + direction;\n }\n super.emit(input);\n }\n}\n","import AttrRecognizer from '../recognizers/attribute';\nimport { abs } from '../utils/utils-consts';\nimport { DIRECTION_HORIZONTAL,DIRECTION_VERTICAL } from '../inputjs/input-consts';\nimport PanRecognizer from './pan';\nimport { INPUT_END } from '../inputjs/input-consts';\nimport directionStr from '../recognizerjs/direction-str';\n\n/**\n * @private\n * Swipe\n * Recognized when the pointer is moving fast (velocity), with enough distance in the allowed direction.\n * @constructor\n * @extends AttrRecognizer\n */\nexport default class SwipeRecognizer extends AttrRecognizer {\n constructor(options = {}) {\n super({\n event: 'swipe',\n threshold: 10,\n velocity: 0.3,\n direction: DIRECTION_HORIZONTAL | DIRECTION_VERTICAL,\n pointers: 1,\n ...options,\n });\n }\n\n getTouchAction() {\n return PanRecognizer.prototype.getTouchAction.call(this);\n }\n\n attrTest(input) {\n let { direction } = this.options;\n let velocity;\n\n if (direction & (DIRECTION_HORIZONTAL | DIRECTION_VERTICAL)) {\n velocity = input.overallVelocity;\n } else if (direction & DIRECTION_HORIZONTAL) {\n velocity = input.overallVelocityX;\n } else if (direction & DIRECTION_VERTICAL) {\n velocity = input.overallVelocityY;\n }\n\n return super.attrTest(input) &&\n direction & input.offsetDirection &&\n input.distance > this.options.threshold &&\n input.maxPointers === this.options.pointers &&\n abs(velocity) > this.options.velocity && input.eventType & INPUT_END;\n }\n\n emit(input) {\n let direction = directionStr(input.offsetDirection);\n if (direction) {\n this.manager.emit(this.options.event + direction, input);\n }\n\n this.manager.emit(this.options.event, input);\n }\n}\n","import AttrRecognizer from './attribute';\nimport { TOUCH_ACTION_NONE } from '../touchactionjs/touchaction-Consts';\nimport { STATE_BEGAN } from '../recognizerjs/recognizer-consts';\n\n/**\n * @private\n * Pinch\n * Recognized when two or more pointers are moving toward (zoom-in) or away from each other (zoom-out).\n * @constructor\n * @extends AttrRecognizer\n */\nexport default class PinchRecognizer extends AttrRecognizer {\n constructor(options = {}) {\n super({\n event: 'pinch',\n threshold: 0,\n pointers: 2,\n ...options,\n });\n }\n\n getTouchAction() {\n return [TOUCH_ACTION_NONE];\n }\n\n attrTest(input) {\n return super.attrTest(input) &&\n (Math.abs(input.scale - 1) > this.options.threshold || this.state & STATE_BEGAN);\n }\n\n emit(input) {\n if (input.scale !== 1) {\n let inOut = input.scale < 1 ? 'in' : 'out';\n input.additionalEvent = this.options.event + inOut;\n }\n super.emit(input);\n }\n}\n","import AttrRecognizer from './attribute';\nimport { TOUCH_ACTION_NONE } from '../touchactionjs/touchaction-Consts';\nimport { STATE_BEGAN } from '../recognizerjs/recognizer-consts';\n\n/**\n * @private\n * Rotate\n * Recognized when two or more pointer are moving in a circular motion.\n * @constructor\n * @extends AttrRecognizer\n */\nexport default class RotateRecognizer extends AttrRecognizer {\n constructor(options = {}) {\n super( {\n event: 'rotate',\n threshold: 0,\n pointers: 2,\n ...options,\n });\n }\n\n getTouchAction() {\n return [TOUCH_ACTION_NONE];\n }\n\n attrTest(input) {\n return super.attrTest(input) &&\n (Math.abs(input.rotation) > this.options.threshold || this.state & STATE_BEGAN);\n }\n}","import Recognizer from '../recognizerjs/recognizer-constructor';\nimport {\n STATE_RECOGNIZED,\n STATE_FAILED\n} from '../recognizerjs/recognizer-consts';\nimport { now } from '../utils/utils-consts';\nimport { TOUCH_ACTION_AUTO } from '../touchactionjs/touchaction-Consts';\nimport {\n INPUT_START,\n INPUT_END,\n INPUT_CANCEL\n} from '../inputjs/input-consts';\n\n/**\n * @private\n * Press\n * Recognized when the pointer is down for x ms without any movement.\n * @constructor\n * @extends Recognizer\n */\nexport default class PressRecognizer extends Recognizer {\n constructor(options = {}) {\n super({\n event: 'press',\n pointers: 1,\n time: 251, // minimal time of the pointer to be pressed\n threshold: 9, // a minimal movement is ok, but keep it low\n ...options,\n });\n this._timer = null;\n this._input = null;\n }\n\n getTouchAction() {\n return [TOUCH_ACTION_AUTO];\n }\n\n process(input) {\n let { options } = this;\n let validPointers = input.pointers.length === options.pointers;\n let validMovement = input.distance < options.threshold;\n let validTime = input.deltaTime > options.time;\n\n this._input = input;\n\n // we only allow little movement\n // and we've reached an end event, so a tap is possible\n if (!validMovement || !validPointers || (input.eventType & (INPUT_END | INPUT_CANCEL) && !validTime)) {\n this.reset();\n } else if (input.eventType & INPUT_START) {\n this.reset();\n this._timer = setTimeout(() => {\n this.state = STATE_RECOGNIZED;\n this.tryEmit();\n }, options.time);\n } else if (input.eventType & INPUT_END) {\n return STATE_RECOGNIZED;\n }\n return STATE_FAILED;\n }\n\n reset() {\n clearTimeout(this._timer);\n }\n\n emit(input) {\n if (this.state !== STATE_RECOGNIZED) {\n return;\n }\n\n if (input && (input.eventType & INPUT_END)) {\n this.manager.emit(`${this.options.event}up`, input);\n } else {\n this._input.timeStamp = now();\n this.manager.emit(this.options.event, this._input);\n }\n }\n}\n\n","/**\n * @private\n * wrap a method with a deprecation warning and stack trace\n * @param {Function} method\n * @param {String} name\n * @param {String} message\n * @returns {Function} A new function wrapping the supplied method.\n */\nexport default function deprecate(method, name, message) {\n let deprecationMessage = `DEPRECATED METHOD: ${name}\\n${message} AT \\n`;\n return function() {\n let e = new Error('get-stack-trace');\n let stack = e && e.stack ? e.stack.replace(/^[^\\(]+?[\\n$]/gm, '')\n .replace(/^\\s+at\\s+/gm, '')\n .replace(/^Object.\\s*\\(/gm, '{anonymous}()@') : 'Unknown Stack Trace';\n\n let log = window.console && (window.console.warn || window.console.log);\n if (log) {\n log.call(window.console, deprecationMessage, stack);\n }\n return method.apply(this, arguments);\n };\n}\n","import deprecate from './deprecate';\n/**\n * @private\n * extend object.\n * means that properties in dest will be overwritten by the ones in src.\n * @param {Object} dest\n * @param {Object} src\n * @param {Boolean} [merge=false]\n * @returns {Object} dest\n */\nconst extend = deprecate((dest, src, merge) => {\n let keys = Object.keys(src);\n let i = 0;\n while (i < keys.length) {\n if (!merge || (merge && dest[keys[i]] === undefined)) {\n dest[keys[i]] = src[keys[i]];\n }\n i++;\n }\n return dest;\n}, 'extend', 'Use `assign`.');\n\nexport default extend;\n","import deprecate from './deprecate';\nimport extend from './extend';\n/**\n * @private\n * merge the values from src in the dest.\n * means that properties that exist in dest will not be overwritten by src\n * @param {Object} dest\n * @param {Object} src\n * @returns {Object} dest\n */\nconst merge = deprecate((dest, src) => {\n return extend(dest, src, true);\n}, 'merge', 'Use `assign`.');\n\nexport default merge;\n","import assign from './assign';\n/**\n * @private\n * simple class inheritance\n * @param {Function} child\n * @param {Function} base\n * @param {Object} [properties]\n */\nexport default function inherit(child, base, properties) {\n let baseP = base.prototype;\n let childP;\n\n childP = child.prototype = Object.create(baseP);\n childP.constructor = child;\n childP._super = baseP;\n\n if (properties) {\n assign(childP, properties);\n }\n}\n","/**\n * @private\n * simple function bind\n * @param {Function} fn\n * @param {Object} context\n * @returns {Function}\n */\nexport default function bindFn(fn, context) {\n return function boundFn() {\n return fn.apply(context, arguments);\n };\n}\n","import Manager from \"./manager\";\nimport defaults from \"./defaults\";\nimport assign from './utils/assign';\nimport {\n INPUT_START,\n INPUT_MOVE,\n INPUT_END,\n INPUT_CANCEL,\n DIRECTION_NONE,\n DIRECTION_LEFT,\n DIRECTION_RIGHT,\n DIRECTION_UP,\n DIRECTION_DOWN,\n DIRECTION_HORIZONTAL,\n DIRECTION_VERTICAL,\n DIRECTION_ALL,\n} from \"./inputjs/input-consts\";\nimport {\n STATE_POSSIBLE,\n STATE_BEGAN,\n STATE_CHANGED,\n STATE_ENDED,\n STATE_RECOGNIZED,\n STATE_CANCELLED,\n STATE_FAILED,\n} from \"./recognizerjs/recognizer-consts\";\n\nimport Input from \"./inputjs/input-constructor\";\nimport TouchAction from \"./touchactionjs/touchaction-constructor\";\nimport TouchInput from \"./input/touch\";\nimport MouseInput from \"./input/mouse\";\nimport PointerEventInput from \"./input/pointerevent\";\nimport SingleTouchInput from \"./input/singletouch\";\nimport TouchMouseInput from \"./input/touchmouse\";\n\nimport Recognizer from \"./recognizerjs/recognizer-constructor\";\nimport AttrRecognizer from \"./recognizers/attribute\";\nimport TapRecognizer from \"./recognizers/tap\";\nimport PanRecognizer from \"./recognizers/pan\";\nimport SwipeRecognizer from \"./recognizers/swipe\";\nimport PinchRecognizer from \"./recognizers/pinch\";\nimport RotateRecognizer from \"./recognizers/rotate\";\nimport PressRecognizer from \"./recognizers/press\";\n\nimport addEventListeners from \"./utils/add-event-listeners\";\nimport removeEventListeners from \"./utils/remove-event-listeners\";\nimport each from \"./utils/each\";\nimport merge from \"./utils/merge\";\nimport extend from \"./utils/extend\";\nimport inherit from \"./utils/inherit\";\nimport bindFn from \"./utils/bind-fn\";\nimport prefixed from \"./utils/prefixed\";\nimport toArray from \"./utils/to-array\";\nimport uniqueArray from \"./utils/unique-array\";\nimport splitStr from \"./utils/split-str\";\nimport inArray from \"./utils/in-array\";\nimport boolOrFn from \"./utils/bool-or-fn\";\nimport hasParent from \"./utils/has-parent\";\n/**\n * @private\n * Simple way to create a manager with a default set of recognizers.\n * @param {HTMLElement} element\n * @param {Object} [options]\n * @constructor\n */\nexport default class Hammer {\n\t/**\n * @private\n * @const {string}\n */\n\tstatic VERSION = \"#__VERSION__#\";\n\tstatic DIRECTION_ALL = DIRECTION_ALL;\n\tstatic DIRECTION_DOWN = DIRECTION_DOWN;\n\tstatic DIRECTION_LEFT = DIRECTION_LEFT;\n\tstatic DIRECTION_RIGHT = DIRECTION_RIGHT;\n\tstatic DIRECTION_UP = DIRECTION_UP;\n\tstatic DIRECTION_HORIZONTAL = DIRECTION_HORIZONTAL;\n\tstatic DIRECTION_VERTICAL = DIRECTION_VERTICAL;\n\tstatic DIRECTION_NONE = DIRECTION_NONE;\n\tstatic DIRECTION_DOWN = DIRECTION_DOWN;\n\tstatic INPUT_START = INPUT_START;\n\tstatic INPUT_MOVE = INPUT_MOVE;\n static INPUT_END = INPUT_END;\n\tstatic INPUT_CANCEL = INPUT_CANCEL;\n\tstatic STATE_POSSIBLE = STATE_POSSIBLE;\n\tstatic STATE_BEGAN = STATE_BEGAN;\n\tstatic STATE_CHANGED = STATE_CHANGED;\n\tstatic STATE_ENDED = STATE_ENDED;\n\tstatic STATE_RECOGNIZED = STATE_RECOGNIZED;\n\tstatic STATE_CANCELLED = STATE_CANCELLED;\n\tstatic STATE_FAILED = STATE_FAILED; \n\tstatic Manager = Manager;\n\tstatic Input = Input;\n\tstatic TouchAction = TouchAction;\n\tstatic TouchInput = TouchInput;\n\tstatic MouseInput = MouseInput;\n\tstatic PointerEventInput = PointerEventInput;\n\tstatic TouchMouseInput = TouchMouseInput;\n\tstatic SingleTouchInput = SingleTouchInput;\n\tstatic Recognizer = Recognizer;\n\tstatic AttrRecognizer = AttrRecognizer;\n\tstatic Tap = TapRecognizer;\n\tstatic Pan = PanRecognizer;\n\tstatic Swipe = SwipeRecognizer;\n\tstatic Pinch = PinchRecognizer;\n\tstatic Rotate = RotateRecognizer;\n\tstatic Press = PressRecognizer;\n\tstatic on = addEventListeners;\n\tstatic off = removeEventListeners;\n\tstatic each = each;\n\tstatic merge = merge;\n\tstatic extend = extend;\n\tstatic bindFn = bindFn;\n\tstatic assign = assign;\n\tstatic inherit = inherit;\n\tstatic bindFn = bindFn;\n\tstatic prefixed = prefixed;\n\tstatic toArray = toArray;\n\tstatic inArray = inArray;\n\tstatic uniqueArray = uniqueArray;\n\tstatic splitStr = splitStr;\n\tstatic boolOrFn = boolOrFn;\n\tstatic hasParent = hasParent;\n\tstatic addEventListeners = addEventListeners;\n\tstatic removeEventListeners = removeEventListeners;\n\tstatic defaults = defaults;\n\tconstructor(element, options = {}) {\n\t\treturn new Manager(element, {\n\t\t\trecognizers: [\n\t\t\t\t\t// RecognizerClass, options, [recognizeWith, ...], [requireFailure, ...]\n\t\t\t\t\t[RotateRecognizer, { enable: false }],\n\t\t\t\t\t[PinchRecognizer, { enable: false }, ['rotate']],\n\t\t\t\t\t[SwipeRecognizer, { direction: DIRECTION_HORIZONTAL }],\n\t\t\t\t\t[PanRecognizer, { direction: DIRECTION_HORIZONTAL }, ['swipe']],\n\t\t\t\t\t[TapRecognizer],\n\t\t\t\t\t[TapRecognizer, { event: 'doubletap', taps: 2 }, ['tap']],\n\t\t\t\t\t[PressRecognizer]\n\t\t\t],\n\t\t\t...options,\n\t\t});\n\t}\n}\n"],"names":["assign","Object","target","undefined","TypeError","output","index","arguments","length","source","nextKey","hasOwnProperty","VENDOR_PREFIXES","TEST_ELEMENT","document","style","createElement","TYPE_FUNCTION","round","Math","abs","now","Date","prefixed","obj","property","prefix","prop","camelProp","toUpperCase","slice","i","win","window","PREFIXED_TOUCH_ACTION","NATIVE_TOUCH_ACTION","getTouchActionProps","touchMap","cssSupports","CSS","supports","forEach","val","TOUCH_ACTION_COMPUTE","TOUCH_ACTION_AUTO","TOUCH_ACTION_MANIPULATION","TOUCH_ACTION_NONE","TOUCH_ACTION_PAN_X","TOUCH_ACTION_PAN_Y","TOUCH_ACTION_MAP","MOBILE_REGEX","SUPPORT_TOUCH","SUPPORT_POINTER_EVENTS","SUPPORT_ONLY_TOUCH","test","navigator","userAgent","INPUT_TYPE_TOUCH","INPUT_TYPE_PEN","INPUT_TYPE_MOUSE","INPUT_TYPE_KINECT","COMPUTE_INTERVAL","INPUT_START","INPUT_MOVE","INPUT_END","INPUT_CANCEL","DIRECTION_NONE","DIRECTION_LEFT","DIRECTION_RIGHT","DIRECTION_UP","DIRECTION_DOWN","DIRECTION_HORIZONTAL","DIRECTION_VERTICAL","DIRECTION_ALL","PROPS_XY","PROPS_CLIENT_XY","each","iterator","context","call","boolOrFn","args","apply","inStr","str","find","indexOf","cleanTouchActions","actions","hasPanX","hasPanY","TouchAction","manager","value","set","compute","element","toLowerCase","trim","update","options","touchAction","recognizers","recognizer","enable","concat","getTouchAction","join","preventDefaults","input","srcEvent","direction","offsetDirection","session","prevented","preventDefault","hasNone","isTapPointer","pointers","isTapMovement","distance","isTapTouchTime","deltaTime","preventSrc","hasParent","node","parent","parentNode","getCenter","pointersLength","x","clientX","y","clientY","simpleCloneInputData","timeStamp","center","deltaX","deltaY","getDistance","p1","p2","props","sqrt","getAngle","atan2","PI","getDirection","computeDeltaXY","offset","offsetDelta","prevDelta","prevInput","eventType","getVelocity","getScale","start","end","getRotation","computeIntervalInputData","last","lastInterval","velocity","velocityX","velocityY","v","computeInputData","firstInput","firstMultiple","offsetCenter","angle","overallVelocity","overallVelocityX","overallVelocityY","scale","rotation","maxPointers","inputHandler","pointersLen","changedPointersLen","changedPointers","isFirst","isFinal","emit","recognize","splitStr","split","addEventListeners","types","handler","type","addEventListener","removeEventListeners","removeEventListener","getWindowForElement","doc","ownerDocument","defaultView","parentWindow","Input","callback","self","inputTarget","domHandler","ev","init","evEl","evTarget","evWin","destroy","inArray","src","findByKey","POINTER_INPUT_MAP","pointerdown","pointermove","pointerup","pointercancel","pointerout","IE10_POINTER_TYPE_ENUM","POINTER_ELEMENT_EVENTS","POINTER_WINDOW_EVENTS","MSPointerEvent","PointerEvent","PointerEventInput","proto","prototype","store","pointerEvents","removePointer","eventTypeNormalized","replace","pointerType","isTouch","storeIndex","pointerId","button","push","splice","toArray","Array","uniqueArray","key","sort","results","values","a","b","TOUCH_INPUT_MAP","touchstart","touchmove","touchend","touchcancel","TOUCH_TARGET_EVENTS","TouchInput","targetIds","touches","getTouches","allTouches","identifier","targetTouches","changedTouches","changedTargetTouches","filter","touch","MOUSE_INPUT_MAP","mousedown","mousemove","mouseup","MOUSE_ELEMENT_EVENTS","MOUSE_WINDOW_EVENTS","MouseInput","pressed","which","DEDUP_TIMEOUT","DEDUP_DISTANCE","setLastTouch","eventData","primaryTouch","lastTouch","lts","lastTouches","removeLastTouch","setTimeout","recordTouches","isSyntheticEvent","t","dx","dy","TouchMouseInput","inputEvent","inputData","isMouse","sourceCapabilities","firesTouchEvents","mouse","createInputInstance","Type","inputClass","invokeArrayArg","arg","fn","isArray","STATE_POSSIBLE","STATE_BEGAN","STATE_CHANGED","STATE_ENDED","STATE_RECOGNIZED","STATE_CANCELLED","STATE_FAILED","_uniqueId","uniqueId","getRecognizerByNameIfManager","otherRecognizer","get","stateStr","state","Recognizer","id","simultaneous","requireFail","recognizeWith","dropRecognizeWith","requireFailure","dropRequireFailure","hasRequireFailures","canRecognizeWith","event","additionalEvent","tryEmit","canEmit","inputDataClone","reset","process","domEvents","preset","cssProps","userSelect","touchSelect","touchCallout","contentZooming","userDrag","tapHighlightColor","STOP","FORCED_STOP","toggleCssProps","add","name","oldCssProps","triggerDomEvent","data","gestureEvent","createEvent","initEvent","gesture","dispatchEvent","Manager","defaults","handlers","item","stop","force","stopped","curRecognizer","existing","remove","targetRecognizer","on","events","off","SINGLE_TOUCH_INPUT_MAP","SINGLE_TOUCH_TARGET_EVENTS","SINGLE_TOUCH_WINDOW_EVENTS","SingleTouchInput","started","normalizeSingleTouches","all","changed","AttrRecognizer","attrTest","optionPointers","isRecognized","isValid","TapRecognizer","taps","interval","time","threshold","posThreshold","pTime","pCenter","_timer","_input","count","validPointers","validMovement","validTouchTime","failTimeout","validInterval","validMultiTap","tapCount","clearTimeout","directionStr","PanRecognizer","pX","pY","directionTest","hasMoved","SwipeRecognizer","PinchRecognizer","inOut","RotateRecognizer","PressRecognizer","validTime","deprecate","method","message","deprecationMessage","e","Error","stack","log","console","warn","extend","dest","merge","keys","inherit","child","base","properties","baseP","childP","create","constructor","_super","bindFn","boundFn","Hammer","VERSION","Tap","Pan","Swipe","Pinch","Rotate","Press"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAA;;;;;;;;EAQA,IAAIA,MAAJ;;EACA,IAAI,OAAOC,MAAM,CAACD,MAAd,KAAyB,UAA7B,EAAyC;EACvCA,EAAAA,MAAM,GAAG,SAASA,MAAT,CAAgBE,MAAhB,EAAwB;EAC/B,QAAIA,MAAM,KAAKC,SAAX,IAAwBD,MAAM,KAAK,IAAvC,EAA6C;EAC3C,YAAM,IAAIE,SAAJ,CAAc,4CAAd,CAAN;EACD;;EAED,QAAIC,MAAM,GAAGJ,MAAM,CAACC,MAAD,CAAnB;;EACA,SAAK,IAAII,KAAK,GAAG,CAAjB,EAAoBA,KAAK,GAAGC,SAAS,CAACC,MAAtC,EAA8CF,KAAK,EAAnD,EAAuD;EACrD,UAAMG,MAAM,GAAGF,SAAS,CAACD,KAAD,CAAxB;;EACA,UAAIG,MAAM,KAAKN,SAAX,IAAwBM,MAAM,KAAK,IAAvC,EAA6C;EAC3C,aAAK,IAAMC,OAAX,IAAsBD,MAAtB,EAA8B;EAC5B,cAAIA,MAAM,CAACE,cAAP,CAAsBD,OAAtB,CAAJ,EAAoC;EAClCL,YAAAA,MAAM,CAACK,OAAD,CAAN,GAAkBD,MAAM,CAACC,OAAD,CAAxB;EACD;EAC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ArDGqO,EAAAA,OAsDbtM,cAAcA;EAtDDsM,EAAAA,OAuDb9P,WAAWA;EAvDE8P,EAAAA,OAwDbvW,WAAWA;EAxDEuW,EAAAA,OAyDb3T,YAAYA;EAzDC2T,EAAAA,OA0Db5P,oBAAoBA;EA1DP4P,EAAAA,OA2DbvP,uBAAuBA;EA3DVuP,EAAAA,OA4DblF,WAAWA;WA5DEkF;;;;;;;;;"} \ No newline at end of file diff --git a/node_modules/@egjs/hammerjs/dist/hammer.min.js b/node_modules/@egjs/hammerjs/dist/hammer.min.js new file mode 100644 index 0000000000000000000000000000000000000000..09228c1bb1f372cd986b962725171f8f156bbc98 --- /dev/null +++ b/node_modules/@egjs/hammerjs/dist/hammer.min.js @@ -0,0 +1,8 @@ +/*! Hammer.JS - v2.0.15 - 2019-04-04 + * http://naver.github.io/egjs + * + * Forked By Naver egjs + * Copyright (c) hammerjs + * Licensed under the MIT license */ +!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.Hammer=e()}(this,function(){"use strict";function r(){return(r=Object.assign||function(t){for(var e=1;e=I(e)?t<0?R:M:e<0?N:z}function J(t,e,n){return{x:e/t||0,y:n/t||0}}function K(t,e){var n=t.session,i=e.pointers,r=i.length;n.firstInput||(n.firstInput=G(e)),1I(T.y)?T.x:T.y,e.scale=p?(d=p.pointers,Z((m=i)[0],m[1],q)/Z(d[0],d[1],q)):1,e.rotation=p?(g=p.pointers,B((y=i)[1],y[0],q)+B(g[1],g[0],q)):0,e.maxPointers=n.prevInput?e.pointers.length>n.prevInput.maxPointers?e.pointers.length:n.prevInput.maxPointers:e.pointers.length,function(t,e){var n,i,r,o,s=t.lastInterval||e,a=e.timeStamp-s.timeStamp;if(e.eventType!==O&&(SI(h.y)?h.x:h.y,o=$(u,c),t.lastInterval=e}else n=s.velocity,i=s.velocityX,r=s.velocityY,o=s.direction;e.velocity=n,e.velocityX=i,e.velocityY=r,e.direction=o}(n,e);var E=t.element;U(e.srcEvent.target,E)&&(E=e.srcEvent.target),e.target=E}function Q(t,e,n){var i=n.pointers.length,r=n.changedPointers.length,o=e&_&&i-r==0,s=e&(D|O)&&i-r==0;n.isFirst=!!o,n.isFinal=!!s,o&&(t.session={}),n.eventType=e,K(t,n),t.emit("hammer.input",n),t.recognize(n),t.session.prevInput=n}function tt(t){return t.trim().split(/\s+/g)}function et(e,t,n){L(tt(t),function(t){e.addEventListener(t,n,!1)})}function nt(e,t,n){L(tt(t),function(t){e.removeEventListener(t,n,!1)})}function it(t){var e=t.ownerDocument||t;return e.defaultView||e.parentWindow||window}var e=function(){function t(e,t){var n=this;this.manager=e,this.callback=t,this.element=e.element,this.target=e.options.inputTarget,this.domHandler=function(t){k(e.options.enable,[e])&&n.handler(t)},this.init()}var e=t.prototype;return e.handler=function(){},e.init=function(){this.evEl&&et(this.element,this.evEl,this.domHandler),this.evTarget&&et(this.target,this.evTarget,this.domHandler),this.evWin&&et(it(this.element),this.evWin,this.domHandler)},e.destroy=function(){this.evEl&&nt(this.element,this.evEl,this.domHandler),this.evTarget&&nt(this.target,this.evTarget,this.domHandler),this.evWin&&nt(it(this.element),this.evWin,this.domHandler)},t}();function rt(t,e,n){if(t.indexOf&&!n)return t.indexOf(e);for(var i=0;ie[n]}):i.sort()),i}var pt={touchstart:_,touchmove:2,touchend:D,touchcancel:O},ft=function(e){function n(){var t;return n.prototype.evTarget="touchstart touchmove touchend touchcancel",(t=e.apply(this,arguments)||this).targetIds={},t}return o(n,e),n.prototype.handler=function(t){var e=pt[t.type],n=function(t,e){var n,i,r=ht(t.touches),o=this.targetIds;if(e&(2|_)&&1===r.length)return o[r[0].identifier]=!0,[r,r];var s=ht(t.changedTouches),a=[],u=this.target;if(i=r.filter(function(t){return U(t.target,u)}),e===_)for(n=0;ne.threshold&&r&e.direction},e.attrTest=function(t){return Ot.prototype.attrTest.call(this,t)&&(2&this.state||!(2&this.state)&&this.directionTest(t))},e.emit=function(t){this.pX=t.deltaX,this.pY=t.deltaY;var e=Rt(t.direction);e&&(t.additionalEvent=this.options.event+e),n.prototype.emit.call(this,t)},t}(Ot),Nt=function(i){function t(t){return void 0===t&&(t={}),i.call(this,r({event:"swipe",threshold:10,velocity:.3,direction:X|Y,pointers:1},t))||this}o(t,i);var e=t.prototype;return e.getTouchAction=function(){return Mt.prototype.getTouchAction.call(this)},e.attrTest=function(t){var e,n=this.options.direction;return n&(X|Y)?e=t.overallVelocity:n&X?e=t.overallVelocityX:n&Y&&(e=t.overallVelocityY),i.prototype.attrTest.call(this,t)&&n&t.offsetDirection&&t.distance>this.options.threshold&&t.maxPointers===this.options.pointers&&I(e)>this.options.velocity&&t.eventType&D},e.emit=function(t){var e=Rt(t.offsetDirection);e&&this.manager.emit(this.options.event+e,t),this.manager.emit(this.options.event,t)},t}(Ot),zt=function(n){function t(t){return void 0===t&&(t={}),n.call(this,r({event:"pinch",threshold:0,pointers:2},t))||this}o(t,n);var e=t.prototype;return e.getTouchAction=function(){return[m]},e.attrTest=function(t){return n.prototype.attrTest.call(this,t)&&(Math.abs(t.scale-1)>this.options.threshold||2&this.state)},e.emit=function(t){if(1!==t.scale){var e=t.scale<1?"in":"out";t.additionalEvent=this.options.event+e}n.prototype.emit.call(this,t)},t}(Ot),Xt=function(e){function t(t){return void 0===t&&(t={}),e.call(this,r({event:"rotate",threshold:0,pointers:2},t))||this}o(t,e);var n=t.prototype;return n.getTouchAction=function(){return[m]},n.attrTest=function(t){return e.prototype.attrTest.call(this,t)&&(Math.abs(t.rotation)>this.options.threshold||2&this.state)},t}(Ot),Yt=function(n){function t(t){var e;return void 0===t&&(t={}),(e=n.call(this,r({event:"press",pointers:1,time:251,threshold:9},t))||this)._timer=null,e._input=null,e}o(t,n);var e=t.prototype;return e.getTouchAction=function(){return[v]},e.process=function(t){var e=this,n=this.options,i=t.pointers.length===n.pointers,r=t.distancen.time;if(this._input=t,!r||!i||t.eventType&(D|O)&&!o)this.reset();else if(t.eventType&_)this.reset(),this._timer=setTimeout(function(){e.state=8,e.tryEmit()},n.time);else if(t.eventType&D)return 8;return 32},e.reset=function(){clearTimeout(this._timer)},e.emit=function(t){8===this.state&&(t&&t.eventType&D?this.manager.emit(this.options.event+"up",t):(this._input.timeStamp=w(),this.manager.emit(this.options.event,this._input)))},t}(bt);function Ft(i,t,e){var r="DEPRECATED METHOD: "+t+"\n"+e+" AT \n";return function(){var t=new Error("get-stack-trace"),e=t&&t.stack?t.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",n=window.console&&(window.console.warn||window.console.log);return n&&n.call(window.console,r,e),i.apply(this,arguments)}}var Wt=Ft(function(t,e,n){for(var i=Object.keys(e),r=0;r {\n\n // If css.supports is not supported but there is native touch-action assume it supports\n // all values. This is the case for IE 10 and 11.\n return touchMap[val] = cssSupports ? window.CSS.supports('touch-action', val) : true;\n });\n return touchMap;\n}\n","import getTouchActionProps from './get-touchaction-props';\n\n\n\n// magical touchAction value\nconst TOUCH_ACTION_COMPUTE = 'compute';\nconst TOUCH_ACTION_AUTO = 'auto';\nconst TOUCH_ACTION_MANIPULATION = 'manipulation'; // not implemented\nconst TOUCH_ACTION_NONE = 'none';\nconst TOUCH_ACTION_PAN_X = 'pan-x';\nconst TOUCH_ACTION_PAN_Y = 'pan-y';\nconst TOUCH_ACTION_MAP = getTouchActionProps();\n\nexport {\n TOUCH_ACTION_AUTO,\n TOUCH_ACTION_COMPUTE,\n TOUCH_ACTION_MANIPULATION,\n TOUCH_ACTION_NONE,\n TOUCH_ACTION_PAN_X,\n TOUCH_ACTION_PAN_Y,\n TOUCH_ACTION_MAP\n};\n","import prefixed from '../utils/prefixed';\nimport {window} from \"../browser\";\n\nconst MOBILE_REGEX = /mobile|tablet|ip(ad|hone|od)|android/i;\n\nconst SUPPORT_TOUCH = ('ontouchstart' in window);\nconst SUPPORT_POINTER_EVENTS = prefixed(window, 'PointerEvent') !== undefined;\nconst SUPPORT_ONLY_TOUCH = SUPPORT_TOUCH && MOBILE_REGEX.test(navigator.userAgent);\n\nconst INPUT_TYPE_TOUCH = 'touch';\nconst INPUT_TYPE_PEN = 'pen';\nconst INPUT_TYPE_MOUSE = 'mouse';\nconst INPUT_TYPE_KINECT = 'kinect';\n\nconst COMPUTE_INTERVAL = 25;\n\nconst INPUT_START = 1;\nconst INPUT_MOVE = 2;\nconst INPUT_END = 4;\nconst INPUT_CANCEL = 8;\n\nconst DIRECTION_NONE = 1;\nconst DIRECTION_LEFT = 2;\nconst DIRECTION_RIGHT = 4;\nconst DIRECTION_UP = 8;\nconst DIRECTION_DOWN = 16;\n\nconst DIRECTION_HORIZONTAL = DIRECTION_LEFT | DIRECTION_RIGHT;\nconst DIRECTION_VERTICAL = DIRECTION_UP | DIRECTION_DOWN;\nconst DIRECTION_ALL = DIRECTION_HORIZONTAL | DIRECTION_VERTICAL;\n\nconst PROPS_XY = ['x', 'y'];\nconst PROPS_CLIENT_XY = ['clientX', 'clientY'];\n\nexport {\n MOBILE_REGEX,\n SUPPORT_ONLY_TOUCH,\n SUPPORT_POINTER_EVENTS,\n SUPPORT_TOUCH,\n INPUT_TYPE_KINECT,\n INPUT_TYPE_MOUSE,\n INPUT_TYPE_PEN,\n INPUT_TYPE_TOUCH,\n COMPUTE_INTERVAL,\n INPUT_START,\n INPUT_MOVE,\n INPUT_END,\n INPUT_CANCEL,\n DIRECTION_NONE,\n DIRECTION_LEFT,\n DIRECTION_RIGHT,\n DIRECTION_UP,\n DIRECTION_DOWN,\n DIRECTION_HORIZONTAL,\n DIRECTION_VERTICAL,\n DIRECTION_ALL,\n PROPS_XY,\n PROPS_CLIENT_XY\n};\n","/**\n * @private\n * walk objects and arrays\n * @param {Object} obj\n * @param {Function} iterator\n * @param {Object} context\n */\nexport default function each(obj, iterator, context) {\n let i;\n\n if (!obj) {\n return;\n }\n\n if (obj.forEach) {\n obj.forEach(iterator, context);\n } else if (obj.length !== undefined) {\n i = 0;\n while (i < obj.length) {\n iterator.call(context, obj[i], i, obj);\n i++;\n }\n } else {\n for (i in obj) {\n obj.hasOwnProperty(i) && iterator.call(context, obj[i], i, obj);\n }\n }\n}\n","import { TYPE_FUNCTION } from './utils-consts';\n/**\n * @private\n * let a boolean value also be a function that must return a boolean\n * this first item in args will be used as the context\n * @param {Boolean|Function} val\n * @param {Array} [args]\n * @returns {Boolean}\n */\nexport default function boolOrFn(val, args) {\n if (typeof val === TYPE_FUNCTION) {\n return val.apply(args ? args[0] || undefined : undefined, args);\n }\n return val;\n}\n","/**\n * @private\n * small indexOf wrapper\n * @param {String} str\n * @param {String} find\n * @returns {Boolean} found\n */\nexport default function inStr(str, find) {\n return str.indexOf(find) > -1;\n}\n","import {\n TOUCH_ACTION_COMPUTE,\n TOUCH_ACTION_MAP,\n TOUCH_ACTION_NONE,\n TOUCH_ACTION_PAN_X,\n TOUCH_ACTION_PAN_Y\n} from './touchaction-Consts';\nimport {\n NATIVE_TOUCH_ACTION,\n PREFIXED_TOUCH_ACTION,\n} from \"./get-touchaction-props\";\nimport {\n DIRECTION_VERTICAL,\n DIRECTION_HORIZONTAL\n} from '../inputjs/input-consts';\nimport each from '../utils/each';\nimport boolOrFn from '../utils/bool-or-fn';\nimport inStr from '../utils/in-str';\nimport cleanTouchActions from './clean-touch-actions';\n\n/**\n * @private\n * Touch Action\n * sets the touchAction property or uses the js alternative\n * @param {Manager} manager\n * @param {String} value\n * @constructor\n */\nexport default class TouchAction {\n constructor(manager, value) {\n this.manager = manager;\n this.set(value);\n }\n\n /**\n * @private\n * set the touchAction value on the element or enable the polyfill\n * @param {String} value\n */\n set(value) {\n // find out the touch-action by the event handlers\n if (value === TOUCH_ACTION_COMPUTE) {\n value = this.compute();\n }\n\n if (NATIVE_TOUCH_ACTION && this.manager.element.style && TOUCH_ACTION_MAP[value]) {\n this.manager.element.style[PREFIXED_TOUCH_ACTION] = value;\n }\n this.actions = value.toLowerCase().trim();\n }\n\n /**\n * @private\n * just re-set the touchAction value\n */\n update() {\n this.set(this.manager.options.touchAction);\n }\n\n /**\n * @private\n * compute the value for the touchAction property based on the recognizer's settings\n * @returns {String} value\n */\n compute() {\n let actions = [];\n each(this.manager.recognizers, (recognizer) => {\n if (boolOrFn(recognizer.options.enable, [recognizer])) {\n actions = actions.concat(recognizer.getTouchAction());\n }\n });\n return cleanTouchActions(actions.join(' '));\n }\n\n /**\n * @private\n * this method is called on each input cycle and provides the preventing of the browser behavior\n * @param {Object} input\n */\n preventDefaults(input) {\n let { srcEvent } = input;\n let direction = input.offsetDirection;\n\n // if the touch action did prevented once this session\n if (this.manager.session.prevented) {\n srcEvent.preventDefault();\n return;\n }\n\n let { actions } = this;\n let hasNone = inStr(actions, TOUCH_ACTION_NONE) && !TOUCH_ACTION_MAP[TOUCH_ACTION_NONE];\n let hasPanY = inStr(actions, TOUCH_ACTION_PAN_Y) && !TOUCH_ACTION_MAP[TOUCH_ACTION_PAN_Y];\n let hasPanX = inStr(actions, TOUCH_ACTION_PAN_X) && !TOUCH_ACTION_MAP[TOUCH_ACTION_PAN_X];\n\n if (hasNone) {\n // do not prevent defaults if this is a tap gesture\n let isTapPointer = input.pointers.length === 1;\n let isTapMovement = input.distance < 2;\n let isTapTouchTime = input.deltaTime < 250;\n\n if (isTapPointer && isTapMovement && isTapTouchTime) {\n return;\n }\n }\n\n if (hasPanX && hasPanY) {\n // `pan-x pan-y` means browser handles all scrolling/panning, do not prevent\n return;\n }\n\n if (hasNone ||\n (hasPanY && direction & DIRECTION_HORIZONTAL) ||\n (hasPanX && direction & DIRECTION_VERTICAL)) {\n return this.preventSrc(srcEvent);\n }\n }\n\n /**\n * @private\n * call preventDefault to prevent the browser's default behavior (scrolling in most cases)\n * @param {Object} srcEvent\n */\n preventSrc(srcEvent) {\n this.manager.session.prevented = true;\n srcEvent.preventDefault();\n }\n}\n","import inStr from '../utils/in-str';\nimport {\n TOUCH_ACTION_NONE,\n TOUCH_ACTION_PAN_X,\n TOUCH_ACTION_PAN_Y,\n TOUCH_ACTION_MANIPULATION,\n TOUCH_ACTION_AUTO\n} from './touchaction-Consts';\n\n/**\n * @private\n * when the touchActions are collected they are not a valid value, so we need to clean things up. *\n * @param {String} actions\n * @returns {*}\n */\nexport default function cleanTouchActions(actions) {\n // none\n if (inStr(actions, TOUCH_ACTION_NONE)) {\n return TOUCH_ACTION_NONE;\n }\n\n let hasPanX = inStr(actions, TOUCH_ACTION_PAN_X);\n let hasPanY = inStr(actions, TOUCH_ACTION_PAN_Y);\n\n // if both pan-x and pan-y are set (different recognizers\n // for different directions, e.g. horizontal pan but vertical swipe?)\n // we need none (as otherwise with pan-x pan-y combined none of these\n // recognizers will work, since the browser would handle all panning\n if (hasPanX && hasPanY) {\n return TOUCH_ACTION_NONE;\n }\n\n // pan-x OR pan-y\n if (hasPanX || hasPanY) {\n return hasPanX ? TOUCH_ACTION_PAN_X : TOUCH_ACTION_PAN_Y;\n }\n\n // manipulation\n if (inStr(actions, TOUCH_ACTION_MANIPULATION)) {\n return TOUCH_ACTION_MANIPULATION;\n }\n\n return TOUCH_ACTION_AUTO;\n}\n","/**\n * @private\n * find if a node is in the given parent\n * @method hasParent\n * @param {HTMLElement} node\n * @param {HTMLElement} parent\n * @return {Boolean} found\n */\nexport default function hasParent(node, parent) {\n while (node) {\n if (node === parent) {\n return true;\n }\n node = node.parentNode;\n }\n return false;\n}\n","import { round } from '../utils/utils-consts';\n\n/**\n * @private\n * get the center of all the pointers\n * @param {Array} pointers\n * @return {Object} center contains `x` and `y` properties\n */\nexport default function getCenter(pointers) {\n let pointersLength = pointers.length;\n\n // no need to loop when only one touch\n if (pointersLength === 1) {\n return {\n x: round(pointers[0].clientX),\n y: round(pointers[0].clientY)\n };\n }\n\n let x = 0;\n let y = 0;\n let i = 0;\n while (i < pointersLength) {\n x += pointers[i].clientX;\n y += pointers[i].clientY;\n i++;\n }\n\n return {\n x: round(x / pointersLength),\n y: round(y / pointersLength)\n };\n}\n","import { now,round } from '../utils/utils-consts';\nimport getCenter from './get-center';\n\n/**\n * @private\n * create a simple clone from the input used for storage of firstInput and firstMultiple\n * @param {Object} input\n * @returns {Object} clonedInputData\n */\nexport default function simpleCloneInputData(input) {\n // make a simple copy of the pointers because we will get a reference if we don't\n // we only need clientXY for the calculations\n let pointers = [];\n let i = 0;\n while (i < input.pointers.length) {\n pointers[i] = {\n clientX: round(input.pointers[i].clientX),\n clientY: round(input.pointers[i].clientY)\n };\n i++;\n }\n\n return {\n timeStamp: now(),\n pointers,\n center: getCenter(pointers),\n deltaX: input.deltaX,\n deltaY: input.deltaY\n };\n}\n","import { PROPS_XY } from './input-consts';\n\n/**\n * @private\n * calculate the absolute distance between two points\n * @param {Object} p1 {x, y}\n * @param {Object} p2 {x, y}\n * @param {Array} [props] containing x and y keys\n * @return {Number} distance\n */\nexport default function getDistance(p1, p2, props) {\n if (!props) {\n props = PROPS_XY;\n }\n let x = p2[props[0]] - p1[props[0]];\n let y = p2[props[1]] - p1[props[1]];\n\n return Math.sqrt((x * x) + (y * y));\n}\n","import { PROPS_XY } from './input-consts';\n\n/**\n * @private\n * calculate the angle between two coordinates\n * @param {Object} p1\n * @param {Object} p2\n * @param {Array} [props] containing x and y keys\n * @return {Number} angle\n */\nexport default function getAngle(p1, p2, props) {\n if (!props) {\n props = PROPS_XY;\n }\n let x = p2[props[0]] - p1[props[0]];\n let y = p2[props[1]] - p1[props[1]];\n return Math.atan2(y, x) * 180 / Math.PI;\n}\n","import { abs } from '../utils/utils-consts';\nimport { DIRECTION_NONE,DIRECTION_LEFT,DIRECTION_RIGHT,DIRECTION_UP,DIRECTION_DOWN } from './input-consts';\n\n/**\n * @private\n * get the direction between two points\n * @param {Number} x\n * @param {Number} y\n * @return {Number} direction\n */\nexport default function getDirection(x, y) {\n if (x === y) {\n return DIRECTION_NONE;\n }\n\n if (abs(x) >= abs(y)) {\n return x < 0 ? DIRECTION_LEFT : DIRECTION_RIGHT;\n }\n return y < 0 ? DIRECTION_UP : DIRECTION_DOWN;\n}\n","/**\n * @private\n * calculate the velocity between two points. unit is in px per ms.\n * @param {Number} deltaTime\n * @param {Number} x\n * @param {Number} y\n * @return {Object} velocity `x` and `y`\n */\nexport default function getVelocity(deltaTime, x, y) {\n return {\n x: x / deltaTime || 0,\n y: y / deltaTime || 0\n };\n}\n","import { now } from '../utils/utils-consts';\nimport { abs } from '../utils/utils-consts';\nimport hasParent from '../utils/has-parent';\nimport simpleCloneInputData from './simple-clone-input-data';\nimport getCenter from './get-center';\nimport getDistance from './get-distance';\nimport getAngle from './get-angle';\nimport getDirection from './get-direction';\nimport computeDeltaXY from './compute-delta-xy';\nimport getVelocity from './get-velocity';\nimport getScale from './get-scale';\nimport getRotation from './get-rotation';\nimport computeIntervalInputData from './compute-interval-input-data';\n\n/**\n* @private\n * extend the data with some usable properties like scale, rotate, velocity etc\n * @param {Object} manager\n * @param {Object} input\n */\nexport default function computeInputData(manager, input) {\n let { session } = manager;\n let { pointers } = input;\n let { length:pointersLength } = pointers;\n\n // store the first input to calculate the distance and direction\n if (!session.firstInput) {\n session.firstInput = simpleCloneInputData(input);\n }\n\n // to compute scale and rotation we need to store the multiple touches\n if (pointersLength > 1 && !session.firstMultiple) {\n session.firstMultiple = simpleCloneInputData(input);\n } else if (pointersLength === 1) {\n session.firstMultiple = false;\n }\n\n let { firstInput, firstMultiple } = session;\n let offsetCenter = firstMultiple ? firstMultiple.center : firstInput.center;\n\n let center = input.center = getCenter(pointers);\n input.timeStamp = now();\n input.deltaTime = input.timeStamp - firstInput.timeStamp;\n\n input.angle = getAngle(offsetCenter, center);\n input.distance = getDistance(offsetCenter, center);\n\n computeDeltaXY(session, input);\n input.offsetDirection = getDirection(input.deltaX, input.deltaY);\n\n let overallVelocity = getVelocity(input.deltaTime, input.deltaX, input.deltaY);\n input.overallVelocityX = overallVelocity.x;\n input.overallVelocityY = overallVelocity.y;\n input.overallVelocity = (abs(overallVelocity.x) > abs(overallVelocity.y)) ? overallVelocity.x : overallVelocity.y;\n\n input.scale = firstMultiple ? getScale(firstMultiple.pointers, pointers) : 1;\n input.rotation = firstMultiple ? getRotation(firstMultiple.pointers, pointers) : 0;\n\n input.maxPointers = !session.prevInput ? input.pointers.length : ((input.pointers.length >\n session.prevInput.maxPointers) ? input.pointers.length : session.prevInput.maxPointers);\n\n computeIntervalInputData(session, input);\n\n // find the correct target\n let target = manager.element;\n if (hasParent(input.srcEvent.target, target)) {\n target = input.srcEvent.target;\n }\n input.target = target;\n}\n","import { INPUT_START, INPUT_END } from './input-consts';\n\nexport default function computeDeltaXY(session, input) {\n let { center } = input;\n // let { offsetDelta:offset = {}, prevDelta = {}, prevInput = {} } = session;\n // jscs throwing error on defalut destructured values and without defaults tests fail\n let offset = session.offsetDelta || {};\n let prevDelta = session.prevDelta || {};\n let prevInput = session.prevInput || {};\n\n if (input.eventType === INPUT_START || prevInput.eventType === INPUT_END) {\n prevDelta = session.prevDelta = {\n x: prevInput.deltaX || 0,\n y: prevInput.deltaY || 0\n };\n\n offset = session.offsetDelta = {\n x: center.x,\n y: center.y\n };\n }\n\n input.deltaX = prevDelta.x + (center.x - offset.x);\n input.deltaY = prevDelta.y + (center.y - offset.y);\n}\n","import { PROPS_CLIENT_XY } from './input-consts';\nimport getDistance from './get-distance';\n/**\n * @private\n * calculate the scale factor between two pointersets\n * no scale is 1, and goes down to 0 when pinched together, and bigger when pinched out\n * @param {Array} start array of pointers\n * @param {Array} end array of pointers\n * @return {Number} scale\n */\nexport default function getScale(start, end) {\n return getDistance(end[0], end[1], PROPS_CLIENT_XY) / getDistance(start[0], start[1], PROPS_CLIENT_XY);\n}\n","import getAngle from './get-angle';\nimport { PROPS_CLIENT_XY } from './input-consts';\n\n/**\n * @private\n * calculate the rotation degrees between two pointersets\n * @param {Array} start array of pointers\n * @param {Array} end array of pointers\n * @return {Number} rotation\n */\nexport default function getRotation(start, end) {\n return getAngle(end[1], end[0], PROPS_CLIENT_XY) + getAngle(start[1], start[0], PROPS_CLIENT_XY);\n}\n","import { INPUT_CANCEL,COMPUTE_INTERVAL } from './input-consts';\nimport { abs } from '../utils/utils-consts';\nimport getVelocity from './get-velocity';\nimport getDirection from './get-direction';\n\n/**\n * @private\n * velocity is calculated every x ms\n * @param {Object} session\n * @param {Object} input\n */\nexport default function computeIntervalInputData(session, input) {\n let last = session.lastInterval || input;\n let deltaTime = input.timeStamp - last.timeStamp;\n let velocity;\n let velocityX;\n let velocityY;\n let direction;\n\n if (input.eventType !== INPUT_CANCEL && (deltaTime > COMPUTE_INTERVAL || last.velocity === undefined)) {\n let deltaX = input.deltaX - last.deltaX;\n let deltaY = input.deltaY - last.deltaY;\n\n let v = getVelocity(deltaTime, deltaX, deltaY);\n velocityX = v.x;\n velocityY = v.y;\n velocity = (abs(v.x) > abs(v.y)) ? v.x : v.y;\n direction = getDirection(deltaX, deltaY);\n\n session.lastInterval = input;\n } else {\n // use latest velocity info if it doesn't overtake a minimum period\n velocity = last.velocity;\n velocityX = last.velocityX;\n velocityY = last.velocityY;\n direction = last.direction;\n }\n\n input.velocity = velocity;\n input.velocityX = velocityX;\n input.velocityY = velocityY;\n input.direction = direction;\n}\n","import { INPUT_START,INPUT_END,INPUT_CANCEL } from './input-consts';\nimport computeInputData from './compute-input-data';\n\n/**\n * @private\n * handle input events\n * @param {Manager} manager\n * @param {String} eventType\n * @param {Object} input\n */\nexport default function inputHandler(manager, eventType, input) {\n let pointersLen = input.pointers.length;\n let changedPointersLen = input.changedPointers.length;\n let isFirst = (eventType & INPUT_START && (pointersLen - changedPointersLen === 0));\n let isFinal = (eventType & (INPUT_END | INPUT_CANCEL) && (pointersLen - changedPointersLen === 0));\n\n input.isFirst = !!isFirst;\n input.isFinal = !!isFinal;\n\n if (isFirst) {\n manager.session = {};\n }\n\n // source event is the normalized value of the domEvents\n // like 'touchstart, mouseup, pointerdown'\n input.eventType = eventType;\n\n // compute scale, rotation etc\n computeInputData(manager, input);\n\n // emit secret event\n manager.emit('hammer.input', input);\n\n manager.recognize(input);\n manager.session.prevInput = input;\n}\n","/**\n * @private\n * split string on whitespace\n * @param {String} str\n * @returns {Array} words\n */\n\nexport default function splitStr(str) {\n return str.trim().split(/\\s+/g);\n}\n","import each from './each';\nimport splitStr from './split-str';\n/**\n * @private\n * addEventListener with multiple events at once\n * @param {EventTarget} target\n * @param {String} types\n * @param {Function} handler\n */\nexport default function addEventListeners(target, types, handler) {\n each(splitStr(types), (type) => {\n target.addEventListener(type, handler, false);\n });\n}\n","import each from './each';\nimport splitStr from './split-str';\n/**\n * @private\n * removeEventListener with multiple events at once\n * @param {EventTarget} target\n * @param {String} types\n * @param {Function} handler\n */\nexport default function removeEventListeners(target, types, handler) {\n each(splitStr(types), (type) => {\n target.removeEventListener(type, handler, false);\n });\n}\n","/**\n * @private\n * get the window object of an element\n * @param {HTMLElement} element\n * @returns {DocumentView|Window}\n */\nexport default function getWindowForElement(element) {\n let doc = element.ownerDocument || element;\n return (doc.defaultView || doc.parentWindow || window);\n}\n","import boolOrFn from '../utils/bool-or-fn';\nimport addEventListeners from '../utils/add-event-listeners';\nimport removeEventListeners from '../utils/remove-event-listeners';\nimport getWindowForElement from '../utils/get-window-for-element';\n\n/**\n * @private\n * create new input type manager\n * @param {Manager} manager\n * @param {Function} callback\n * @returns {Input}\n * @constructor\n */\nexport default class Input {\n constructor(manager, callback) {\n let self = this;\n this.manager = manager;\n this.callback = callback;\n this.element = manager.element;\n this.target = manager.options.inputTarget;\n\n // smaller wrapper around the handler, for the scope and the enabled state of the manager,\n // so when disabled the input events are completely bypassed.\n this.domHandler = function(ev) {\n if (boolOrFn(manager.options.enable, [manager])) {\n self.handler(ev);\n }\n };\n\n this.init();\n\n }\n /**\n * @private\n * should handle the inputEvent data and trigger the callback\n * @virtual\n */\n handler() { }\n\n /**\n * @private\n * bind the events\n */\n init() {\n this.evEl && addEventListeners(this.element, this.evEl, this.domHandler);\n this.evTarget && addEventListeners(this.target, this.evTarget, this.domHandler);\n this.evWin && addEventListeners(getWindowForElement(this.element), this.evWin, this.domHandler);\n }\n\n /**\n * @private\n * unbind the events\n */\n destroy() {\n this.evEl && removeEventListeners(this.element, this.evEl, this.domHandler);\n this.evTarget && removeEventListeners(this.target, this.evTarget, this.domHandler);\n this.evWin && removeEventListeners(getWindowForElement(this.element), this.evWin, this.domHandler);\n }\n}\n","/**\n * @private\n * find if a array contains the object using indexOf or a simple polyFill\n * @param {Array} src\n * @param {String} find\n * @param {String} [findByKey]\n * @return {Boolean|Number} false when not found, or the index\n */\nexport default function inArray(src, find, findByKey) {\n if (src.indexOf && !findByKey) {\n return src.indexOf(find);\n } else {\n let i = 0;\n while (i < src.length) {\n if ((findByKey && src[i][findByKey] == find) || (!findByKey && src[i] === find)) {// do not use === here, test fails\n return i;\n }\n i++;\n }\n return -1;\n }\n}\n","import {\n INPUT_START,\n INPUT_END,\n INPUT_CANCEL,\n INPUT_MOVE,\n INPUT_TYPE_TOUCH,\n INPUT_TYPE_MOUSE,\n INPUT_TYPE_PEN,\n INPUT_TYPE_KINECT\n} from '../inputjs/input-consts';\nimport {window} from \"../browser\";\nimport Input from '../inputjs/input-constructor';\nimport inArray from '../utils/in-array';\n\nconst POINTER_INPUT_MAP = {\n pointerdown: INPUT_START,\n pointermove: INPUT_MOVE,\n pointerup: INPUT_END,\n pointercancel: INPUT_CANCEL,\n pointerout: INPUT_CANCEL\n};\n\n// in IE10 the pointer types is defined as an enum\nconst IE10_POINTER_TYPE_ENUM = {\n 2: INPUT_TYPE_TOUCH,\n 3: INPUT_TYPE_PEN,\n 4: INPUT_TYPE_MOUSE,\n 5: INPUT_TYPE_KINECT // see https://twitter.com/jacobrossi/status/480596438489890816\n};\n\nlet POINTER_ELEMENT_EVENTS = 'pointerdown';\nlet POINTER_WINDOW_EVENTS = 'pointermove pointerup pointercancel';\n\n// IE10 has prefixed support, and case-sensitive\nif (window.MSPointerEvent && !window.PointerEvent) {\n POINTER_ELEMENT_EVENTS = 'MSPointerDown';\n POINTER_WINDOW_EVENTS = 'MSPointerMove MSPointerUp MSPointerCancel';\n}\n\n/**\n * @private\n * Pointer events input\n * @constructor\n * @extends Input\n */\nexport default class PointerEventInput extends Input {\n constructor() {\n var proto = PointerEventInput.prototype;\n\n proto.evEl = POINTER_ELEMENT_EVENTS;\n proto.evWin = POINTER_WINDOW_EVENTS;\n super(...arguments);\n this.store = (this.manager.session.pointerEvents = []);\n }\n\n /**\n * @private\n * handle mouse events\n * @param {Object} ev\n */\n handler(ev) {\n let { store } = this;\n let removePointer = false;\n\n let eventTypeNormalized = ev.type.toLowerCase().replace('ms', '');\n let eventType = POINTER_INPUT_MAP[eventTypeNormalized];\n let pointerType = IE10_POINTER_TYPE_ENUM[ev.pointerType] || ev.pointerType;\n\n let isTouch = (pointerType === INPUT_TYPE_TOUCH);\n\n // get index of the event in the store\n let storeIndex = inArray(store, ev.pointerId, 'pointerId');\n\n // start and mouse must be down\n if (eventType & INPUT_START && (ev.button === 0 || isTouch)) {\n if (storeIndex < 0) {\n store.push(ev);\n storeIndex = store.length - 1;\n }\n } else if (eventType & (INPUT_END | INPUT_CANCEL)) {\n removePointer = true;\n }\n\n // it not found, so the pointer hasn't been down (so it's probably a hover)\n if (storeIndex < 0) {\n return;\n }\n\n // update the event in the store\n store[storeIndex] = ev;\n\n this.callback(this.manager, eventType, {\n pointers: store,\n changedPointers: [ev],\n pointerType,\n srcEvent: ev\n });\n\n if (removePointer) {\n // remove from the store\n store.splice(storeIndex, 1);\n }\n }\n}\n","/**\n * @private\n * convert array-like objects to real arrays\n * @param {Object} obj\n * @returns {Array}\n */\nexport default function toArray(obj) {\n return Array.prototype.slice.call(obj, 0);\n}\n","import inArray from './in-array';\n\n/**\n * @private\n * unique array with objects based on a key (like 'id') or just by the array's value\n * @param {Array} src [{id:1},{id:2},{id:1}]\n * @param {String} [key]\n * @param {Boolean} [sort=False]\n * @returns {Array} [{id:1},{id:2}]\n */\nexport default function uniqueArray(src, key, sort) {\n let results = [];\n let values = [];\n let i = 0;\n\n while (i < src.length) {\n let val = key ? src[i][key] : src[i];\n if (inArray(values, val) < 0) {\n results.push(src[i]);\n }\n values[i] = val;\n i++;\n }\n\n if (sort) {\n if (!key) {\n results = results.sort();\n } else {\n results = results.sort((a, b) => {\n return a[key] > b[key];\n });\n }\n }\n\n return results;\n}\n","import {\n INPUT_START,\n INPUT_MOVE,\n INPUT_END,\n INPUT_CANCEL,\n INPUT_TYPE_TOUCH\n} from '../inputjs/input-consts';\nimport Input from '../inputjs/input-constructor';\nimport toArray from '../utils/to-array';\nimport hasParent from '../utils/has-parent';\nimport uniqueArray from '../utils/unique-array';\n\nconst TOUCH_INPUT_MAP = {\n touchstart: INPUT_START,\n touchmove: INPUT_MOVE,\n touchend: INPUT_END,\n touchcancel: INPUT_CANCEL\n};\n\nconst TOUCH_TARGET_EVENTS = 'touchstart touchmove touchend touchcancel';\n\n/**\n * @private\n * Multi-user touch events input\n * @constructor\n * @extends Input\n */\nexport default class TouchInput extends Input {\n constructor() {\n TouchInput.prototype.evTarget = TOUCH_TARGET_EVENTS;\n super(...arguments);\n this.targetIds = {};\n // this.evTarget = TOUCH_TARGET_EVENTS;\n }\n handler(ev) {\n let type = TOUCH_INPUT_MAP[ev.type];\n let touches = getTouches.call(this, ev, type);\n if (!touches) {\n return;\n }\n\n this.callback(this.manager, type, {\n pointers: touches[0],\n changedPointers: touches[1],\n pointerType: INPUT_TYPE_TOUCH,\n srcEvent: ev\n });\n }\n}\n\n/**\n * @private\n * @this {TouchInput}\n * @param {Object} ev\n * @param {Number} type flag\n * @returns {undefined|Array} [all, changed]\n */\nfunction getTouches(ev, type) {\n let allTouches = toArray(ev.touches);\n let { targetIds } = this;\n\n // when there is only one touch, the process can be simplified\n if (type & (INPUT_START | INPUT_MOVE) && allTouches.length === 1) {\n targetIds[allTouches[0].identifier] = true;\n return [allTouches, allTouches];\n }\n\n let i;\n let targetTouches;\n let changedTouches = toArray(ev.changedTouches);\n let changedTargetTouches = [];\n let { target } = this;\n\n // get target touches from touches\n targetTouches = allTouches.filter((touch) => {\n return hasParent(touch.target, target);\n });\n\n // collect touches\n if (type === INPUT_START) {\n i = 0;\n while (i < targetTouches.length) {\n targetIds[targetTouches[i].identifier] = true;\n i++;\n }\n }\n\n // filter changed touches to only contain touches that exist in the collected target ids\n i = 0;\n while (i < changedTouches.length) {\n if (targetIds[changedTouches[i].identifier]) {\n changedTargetTouches.push(changedTouches[i]);\n }\n\n // cleanup removed touches\n if (type & (INPUT_END | INPUT_CANCEL)) {\n delete targetIds[changedTouches[i].identifier];\n }\n i++;\n }\n\n if (!changedTargetTouches.length) {\n return;\n }\n\n return [\n // merge targetTouches with changedTargetTouches so it contains ALL touches, including 'end' and 'cancel'\n uniqueArray(targetTouches.concat(changedTargetTouches), 'identifier', true),\n changedTargetTouches\n ];\n}\n","import {\n INPUT_START,\n INPUT_MOVE,\n INPUT_END,\n INPUT_TYPE_MOUSE\n} from '../inputjs/input-consts';\nimport Input from '../inputjs/input-constructor';\n\nconst MOUSE_INPUT_MAP = {\n mousedown: INPUT_START,\n mousemove: INPUT_MOVE,\n mouseup: INPUT_END\n};\n\nconst MOUSE_ELEMENT_EVENTS = 'mousedown';\nconst MOUSE_WINDOW_EVENTS = 'mousemove mouseup';\n\n/**\n * @private\n * Mouse events input\n * @constructor\n * @extends Input\n */\nexport default class MouseInput extends Input {\n constructor() {\n var proto = MouseInput.prototype;\n proto.evEl = MOUSE_ELEMENT_EVENTS;\n proto.evWin = MOUSE_WINDOW_EVENTS;\n\n super(...arguments);\n this.pressed = false; // mousedown state\n }\n\n /**\n * @private\n * handle mouse events\n * @param {Object} ev\n */\n handler(ev) {\n let eventType = MOUSE_INPUT_MAP[ev.type];\n\n // on start we want to have the left mouse button down\n if (eventType & INPUT_START && ev.button === 0) {\n this.pressed = true;\n }\n\n if (eventType & INPUT_MOVE && ev.which !== 1) {\n eventType = INPUT_END;\n }\n\n // mouse must be down\n if (!this.pressed) {\n return;\n }\n\n if (eventType & INPUT_END) {\n this.pressed = false;\n }\n\n this.callback(this.manager, eventType, {\n pointers: [ev],\n changedPointers: [ev],\n pointerType: INPUT_TYPE_MOUSE,\n srcEvent: ev\n });\n }\n}\n","import Input from \"../inputjs/input-constructor\";\nimport TouchInput from \"./touch\";\nimport MouseInput from \"./mouse\";\nimport {\n\tINPUT_START,\n\tINPUT_END,\n\tINPUT_CANCEL,\n\tINPUT_TYPE_TOUCH,\n\tINPUT_TYPE_MOUSE,\n} from \"../inputjs/input-consts\";\n\n/**\n * @private\n * Combined touch and mouse input\n *\n * Touch has a higher priority then mouse, and while touching no mouse events are allowed.\n * This because touch devices also emit mouse events while doing a touch.\n *\n * @constructor\n * @extends Input\n */\n\nconst DEDUP_TIMEOUT = 2500;\nconst DEDUP_DISTANCE = 25;\n\nfunction setLastTouch(eventData) {\n\tconst { changedPointers: [touch] } = eventData;\n\n\tif (touch.identifier === this.primaryTouch) {\n\t\tconst lastTouch = { x: touch.clientX, y: touch.clientY };\n\t\tconst lts = this.lastTouches;\n\n\t\tthis.lastTouches.push(lastTouch);\n\n\n\t\tconst removeLastTouch = function() {\n\t\t\tconst i = lts.indexOf(lastTouch);\n\n\t\t\tif (i > -1) {\n\t\t\t\tlts.splice(i, 1);\n\t\t\t}\n\t\t};\n\n\t\tsetTimeout(removeLastTouch, DEDUP_TIMEOUT);\n\t}\n}\n\n\nfunction recordTouches(eventType, eventData) {\n\tif (eventType & INPUT_START) {\n\t\tthis.primaryTouch = eventData.changedPointers[0].identifier;\n\t\tsetLastTouch.call(this, eventData);\n\t} else if (eventType & (INPUT_END | INPUT_CANCEL)) {\n\t\tsetLastTouch.call(this, eventData);\n\t}\n}\nfunction isSyntheticEvent(eventData) {\n\tconst x = eventData.srcEvent.clientX;\n\tconst y = eventData.srcEvent.clientY;\n\n\tfor (let i = 0; i < this.lastTouches.length; i++) {\n\t\tconst t = this.lastTouches[i];\n\t\tconst dx = Math.abs(x - t.x);\n\t\tconst dy = Math.abs(y - t.y);\n\n\t\tif (dx <= DEDUP_DISTANCE && dy <= DEDUP_DISTANCE) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n}\n\n\nexport default class TouchMouseInput extends Input {\n\tconstructor(manager, callback) {\n\t\tsuper(manager, callback);\n\n\t\tthis.touch = new TouchInput(this.manager, this.handler);\n\t\tthis.mouse = new MouseInput(this.manager, this.handler);\n\t\tthis.primaryTouch = null;\n\t\tthis.lastTouches = [];\n\t}\n\n\t/**\n\t * @private\n\t * handle mouse and touch events\n\t * @param {Hammer} manager\n\t * @param {String} inputEvent\n\t * @param {Object} inputData\n\t */\n\thandler = (manager, inputEvent, inputData) => {\n\t\tconst isTouch = (inputData.pointerType === INPUT_TYPE_TOUCH);\n\t\tconst isMouse = (inputData.pointerType === INPUT_TYPE_MOUSE);\n\n\t\tif (isMouse && inputData.sourceCapabilities && inputData.sourceCapabilities.firesTouchEvents) {\n\t\t\treturn;\n\t\t}\n\n\t\t// when we're in a touch event, record touches to de-dupe synthetic mouse event\n\t\tif (isTouch) {\n\t\t\trecordTouches.call(this, inputEvent, inputData);\n\t\t} else if (isMouse && isSyntheticEvent.call(this, inputData)) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.callback(manager, inputEvent, inputData);\n\t}\n\n\t/**\n\t * @private\n\t * remove the event listeners\n\t */\n\tdestroy() {\n\t\tthis.touch.destroy();\n\t\tthis.mouse.destroy();\n\t}\n}\n","import each from './each';\n/**\n * @private\n * if the argument is an array, we want to execute the fn on each entry\n * if it aint an array we don't want to do a thing.\n * this is used by all the methods that accept a single and array argument.\n * @param {*|Array} arg\n * @param {String} fn\n * @param {Object} [context]\n * @returns {Boolean}\n */\nexport default function invokeArrayArg(arg, fn, context) {\n if (Array.isArray(arg)) {\n each(arg, context[fn], context);\n return true;\n }\n return false;\n}\n","const STATE_POSSIBLE = 1;\nconst STATE_BEGAN = 2;\nconst STATE_CHANGED = 4;\nconst STATE_ENDED = 8;\nconst STATE_RECOGNIZED = STATE_ENDED;\nconst STATE_CANCELLED = 16;\nconst STATE_FAILED = 32;\n\nexport {\n STATE_POSSIBLE,\n STATE_BEGAN,\n STATE_CHANGED,\n STATE_ENDED,\n STATE_RECOGNIZED,\n STATE_CANCELLED,\n STATE_FAILED\n};\n","/**\n * @private\n * get a unique id\n * @returns {number} uniqueId\n */\nlet _uniqueId = 1;\nexport default function uniqueId() {\n return _uniqueId++;\n}\n","/**\n * @private\n * get a recognizer by name if it is bound to a manager\n * @param {Recognizer|String} otherRecognizer\n * @param {Recognizer} recognizer\n * @returns {Recognizer}\n */\nexport default function getRecognizerByNameIfManager(otherRecognizer, recognizer) {\n let { manager } = recognizer;\n if (manager) {\n return manager.get(otherRecognizer);\n }\n return otherRecognizer;\n}\n","import {\n STATE_CANCELLED,\n STATE_ENDED,\n STATE_CHANGED,\n STATE_BEGAN\n} from './recognizer-consts';\n\n/**\n * @private\n * get a usable string, used as event postfix\n * @param {constant} state\n * @returns {String} state\n */\nexport default function stateStr(state) {\n if (state & STATE_CANCELLED) {\n return 'cancel';\n } else if (state & STATE_ENDED) {\n return 'end';\n } else if (state & STATE_CHANGED) {\n return 'move';\n } else if (state & STATE_BEGAN) {\n return 'start';\n }\n return '';\n}\n","import {\n STATE_POSSIBLE,\n STATE_ENDED,\n STATE_FAILED,\n STATE_RECOGNIZED,\n STATE_CANCELLED,\n STATE_BEGAN,\n STATE_CHANGED\n} from './recognizer-consts';\nimport assign from '../utils/assign';\nimport uniqueId from '../utils/unique-id';\nimport invokeArrayArg from '../utils/invoke-array-arg';\nimport inArray from '../utils/in-array';\nimport boolOrFn from '../utils/bool-or-fn';\nimport getRecognizerByNameIfManager from './get-recognizer-by-name-if-manager';\nimport stateStr from './state-str';\n\n/**\n * @private\n * Recognizer flow explained; *\n * All recognizers have the initial state of POSSIBLE when a input session starts.\n * The definition of a input session is from the first input until the last input, with all it's movement in it. *\n * Example session for mouse-input: mousedown -> mousemove -> mouseup\n *\n * On each recognizing cycle (see Manager.recognize) the .recognize() method is executed\n * which determines with state it should be.\n *\n * If the recognizer has the state FAILED, CANCELLED or RECOGNIZED (equals ENDED), it is reset to\n * POSSIBLE to give it another change on the next cycle.\n *\n * Possible\n * |\n * +-----+---------------+\n * | |\n * +-----+-----+ |\n * | | |\n * Failed Cancelled |\n * +-------+------+\n * | |\n * Recognized Began\n * |\n * Changed\n * |\n * Ended/Recognized\n */\n\n/**\n * @private\n * Recognizer\n * Every recognizer needs to extend from this class.\n * @constructor\n * @param {Object} options\n */\nexport default class Recognizer {\n constructor(options = {}) {\n this.options = {\n enable: true,\n ...options,\n };\n\n this.id = uniqueId();\n\n this.manager = null;\n\n // default is enable true\n this.state = STATE_POSSIBLE;\n this.simultaneous = {};\n this.requireFail = [];\n }\n\n /**\n * @private\n * set options\n * @param {Object} options\n * @return {Recognizer}\n */\n set(options) {\n assign(this.options, options);\n\n // also update the touchAction, in case something changed about the directions/enabled state\n this.manager && this.manager.touchAction.update();\n return this;\n }\n\n /**\n * @private\n * recognize simultaneous with an other recognizer.\n * @param {Recognizer} otherRecognizer\n * @returns {Recognizer} this\n */\n recognizeWith(otherRecognizer) {\n if (invokeArrayArg(otherRecognizer, 'recognizeWith', this)) {\n return this;\n }\n\n let { simultaneous } = this;\n otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this);\n if (!simultaneous[otherRecognizer.id]) {\n simultaneous[otherRecognizer.id] = otherRecognizer;\n otherRecognizer.recognizeWith(this);\n }\n return this;\n }\n\n /**\n * @private\n * drop the simultaneous link. it doesnt remove the link on the other recognizer.\n * @param {Recognizer} otherRecognizer\n * @returns {Recognizer} this\n */\n dropRecognizeWith(otherRecognizer) {\n if (invokeArrayArg(otherRecognizer, 'dropRecognizeWith', this)) {\n return this;\n }\n\n otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this);\n delete this.simultaneous[otherRecognizer.id];\n return this;\n }\n\n /**\n * @private\n * recognizer can only run when an other is failing\n * @param {Recognizer} otherRecognizer\n * @returns {Recognizer} this\n */\n requireFailure(otherRecognizer) {\n if (invokeArrayArg(otherRecognizer, 'requireFailure', this)) {\n return this;\n }\n\n let { requireFail } = this;\n otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this);\n if (inArray(requireFail, otherRecognizer) === -1) {\n requireFail.push(otherRecognizer);\n otherRecognizer.requireFailure(this);\n }\n return this;\n }\n\n /**\n * @private\n * drop the requireFailure link. it does not remove the link on the other recognizer.\n * @param {Recognizer} otherRecognizer\n * @returns {Recognizer} this\n */\n dropRequireFailure(otherRecognizer) {\n if (invokeArrayArg(otherRecognizer, 'dropRequireFailure', this)) {\n return this;\n }\n\n otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this);\n let index = inArray(this.requireFail, otherRecognizer);\n if (index > -1) {\n this.requireFail.splice(index, 1);\n }\n return this;\n }\n\n /**\n * @private\n * has require failures boolean\n * @returns {boolean}\n */\n hasRequireFailures() {\n return this.requireFail.length > 0;\n }\n\n /**\n * @private\n * if the recognizer can recognize simultaneous with an other recognizer\n * @param {Recognizer} otherRecognizer\n * @returns {Boolean}\n */\n canRecognizeWith(otherRecognizer) {\n return !!this.simultaneous[otherRecognizer.id];\n }\n\n /**\n * @private\n * You should use `tryEmit` instead of `emit` directly to check\n * that all the needed recognizers has failed before emitting.\n * @param {Object} input\n */\n emit(input) {\n let self = this;\n let { state } = this;\n\n function emit(event) {\n self.manager.emit(event, input);\n }\n\n // 'panstart' and 'panmove'\n if (state < STATE_ENDED) {\n emit(self.options.event + stateStr(state));\n }\n\n emit(self.options.event); // simple 'eventName' events\n\n if (input.additionalEvent) { // additional event(panleft, panright, pinchin, pinchout...)\n emit(input.additionalEvent);\n }\n\n // panend and pancancel\n if (state >= STATE_ENDED) {\n emit(self.options.event + stateStr(state));\n }\n }\n\n /**\n * @private\n * Check that all the require failure recognizers has failed,\n * if true, it emits a gesture event,\n * otherwise, setup the state to FAILED.\n * @param {Object} input\n */\n tryEmit(input) {\n if (this.canEmit()) {\n return this.emit(input);\n }\n // it's failing anyway\n this.state = STATE_FAILED;\n }\n\n /**\n * @private\n * can we emit?\n * @returns {boolean}\n */\n canEmit() {\n let i = 0;\n while (i < this.requireFail.length) {\n if (!(this.requireFail[i].state & (STATE_FAILED | STATE_POSSIBLE))) {\n return false;\n }\n i++;\n }\n return true;\n }\n\n /**\n * @private\n * update the recognizer\n * @param {Object} inputData\n */\n recognize(inputData) {\n // make a new copy of the inputData\n // so we can change the inputData without messing up the other recognizers\n let inputDataClone = assign({}, inputData);\n\n // is is enabled and allow recognizing?\n if (!boolOrFn(this.options.enable, [this, inputDataClone])) {\n this.reset();\n this.state = STATE_FAILED;\n return;\n }\n\n // reset when we've reached the end\n if (this.state & (STATE_RECOGNIZED | STATE_CANCELLED | STATE_FAILED)) {\n this.state = STATE_POSSIBLE;\n }\n\n this.state = this.process(inputDataClone);\n\n // the recognizer has recognized a gesture\n // so trigger an event\n if (this.state & (STATE_BEGAN | STATE_CHANGED | STATE_ENDED | STATE_CANCELLED)) {\n this.tryEmit(inputDataClone);\n }\n }\n\n /**\n * @private\n * return the state of the recognizer\n * the actual recognizing happens in this method\n * @virtual\n * @param {Object} inputData\n * @returns {constant} STATE\n */\n\n /* jshint ignore:start */\n process(inputData) { }\n /* jshint ignore:end */\n\n /**\n * @private\n * return the preferred touch-action\n * @virtual\n * @returns {Array}\n */\n getTouchAction() { }\n\n /**\n * @private\n * called when the gesture isn't allowed to recognize\n * like when another is being recognized or it is disabled\n * @virtual\n */\n reset() { }\n}","import { TOUCH_ACTION_COMPUTE } from \"./touchactionjs/touchaction-Consts\";\n\nexport default {\n\t/**\n\t * @private\n\t * set if DOM events are being triggered.\n\t * But this is slower and unused by simple implementations, so disabled by default.\n\t * @type {Boolean}\n\t * @default false\n\t */\n\tdomEvents: false,\n\n\t/**\n\t * @private\n\t * The value for the touchAction property/fallback.\n\t * When set to `compute` it will magically set the correct value based on the added recognizers.\n\t * @type {String}\n\t * @default compute\n\t */\n\ttouchAction: TOUCH_ACTION_COMPUTE,\n\n\t/**\n\t * @private\n\t * @type {Boolean}\n\t * @default true\n\t */\n\tenable: true,\n\n\t/**\n\t * @private\n\t * EXPERIMENTAL FEATURE -- can be removed/changed\n\t * Change the parent input target element.\n\t * If Null, then it is being set the to main element.\n\t * @type {Null|EventTarget}\n\t * @default null\n\t */\n\tinputTarget: null,\n\n\t/**\n\t * @private\n\t * force an input class\n\t * @type {Null|Function}\n\t * @default null\n\t */\n\tinputClass: null,\n\n\t/**\n\t * @private\n\t * Default recognizer setup when calling `Hammer()`\n\t * When creating a new Manager these will be skipped.\n\t * @type {Array}\n\t */\n\tpreset: [],\n\n\t/**\n\t * @private\n\t * Some CSS properties can be used to improve the working of Hammer.\n\t * Add them to this method and they will be set when creating a new Manager.\n\t * @namespace\n\t */\n\tcssProps: {\n\t\t/**\n\t\t * @private\n\t\t * Disables text selection to improve the dragging gesture. Mainly for desktop browsers.\n\t\t * @type {String}\n\t\t * @default 'none'\n\t\t */\n\t\tuserSelect: \"none\",\n\n\t\t/**\n\t\t * @private\n\t\t * Disable the Windows Phone grippers when pressing an element.\n\t\t * @type {String}\n\t\t * @default 'none'\n\t\t */\n\t\ttouchSelect: \"none\",\n\n\t\t/**\n\t\t * @private\n\t\t * Disables the default callout shown when you touch and hold a touch target.\n\t\t * On iOS, when you touch and hold a touch target such as a link, Safari displays\n\t\t * a callout containing information about the link. This property allows you to disable that callout.\n\t\t * @type {String}\n\t\t * @default 'none'\n\t\t */\n\t\ttouchCallout: \"none\",\n\n\t\t/**\n\t\t * @private\n\t\t * Specifies whether zooming is enabled. Used by IE10>\n\t\t * @type {String}\n\t\t * @default 'none'\n\t\t */\n\t\tcontentZooming: \"none\",\n\n\t\t/**\n\t\t * @private\n\t\t * Specifies that an entire element should be draggable instead of its contents. Mainly for desktop browsers.\n\t\t * @type {String}\n\t\t * @default 'none'\n\t\t */\n\t\tuserDrag: \"none\",\n\n\t\t/**\n\t\t * @private\n\t\t * Overrides the highlight color shown when the user taps a link or a JavaScript\n\t\t * clickable element in iOS. This property obeys the alpha value, if specified.\n\t\t * @type {String}\n\t\t * @default 'rgba(0,0,0,0)'\n\t\t */\n\t\ttapHighlightColor: \"rgba(0,0,0,0)\",\n\t},\n};\n","import assign from \"./utils/assign\";\nimport TouchAction from \"./touchactionjs/touchaction-constructor\";\nimport createInputInstance from \"./inputjs/create-input-instance\";\nimport each from \"./utils/each\";\nimport inArray from \"./utils/in-array\";\nimport invokeArrayArg from \"./utils/invoke-array-arg\";\nimport splitStr from \"./utils/split-str\";\nimport prefixed from \"./utils/prefixed\";\nimport Recognizer from \"./recognizerjs/recognizer-constructor\";\nimport {\n STATE_BEGAN,\n STATE_ENDED,\n STATE_CHANGED,\n STATE_RECOGNIZED,\n} from \"./recognizerjs/recognizer-consts\";\nimport defaults from \"./defaults\";\n\nconst STOP = 1;\nconst FORCED_STOP = 2;\n\n\n/**\n * @private\n * add/remove the css properties as defined in manager.options.cssProps\n * @param {Manager} manager\n * @param {Boolean} add\n */\nfunction toggleCssProps(manager, add) {\n const { element } = manager;\n\n if (!element.style) {\n return;\n }\n let prop;\n\n each(manager.options.cssProps, (value, name) => {\n prop = prefixed(element.style, name);\n if (add) {\n manager.oldCssProps[prop] = element.style[prop];\n element.style[prop] = value;\n } else {\n element.style[prop] = manager.oldCssProps[prop] || \"\";\n }\n });\n if (!add) {\n manager.oldCssProps = {};\n }\n}\n\n/**\n * @private\n * trigger dom event\n * @param {String} event\n * @param {Object} data\n */\nfunction triggerDomEvent(event, data) {\n const gestureEvent = document.createEvent(\"Event\");\n\n gestureEvent.initEvent(event, true, true);\n gestureEvent.gesture = data;\n data.target.dispatchEvent(gestureEvent);\n}\n\n\n/**\n* @private\n * Manager\n * @param {HTMLElement} element\n * @param {Object} [options]\n * @constructor\n */\nexport default class Manager {\n constructor(element, options) {\n this.options = assign({}, defaults, options || {});\n\n this.options.inputTarget = this.options.inputTarget || element;\n\n this.handlers = {};\n this.session = {};\n this.recognizers = [];\n this.oldCssProps = {};\n\n this.element = element;\n this.input = createInputInstance(this);\n this.touchAction = new TouchAction(this, this.options.touchAction);\n\n toggleCssProps(this, true);\n\n each(this.options.recognizers, item => {\n const recognizer = this.add(new (item[0])(item[1]));\n\n item[2] && recognizer.recognizeWith(item[2]);\n item[3] && recognizer.requireFailure(item[3]);\n }, this);\n }\n\n\t/**\n\t * @private\n\t * set options\n\t * @param {Object} options\n\t * @returns {Manager}\n\t */\n set(options) {\n assign(this.options, options);\n\n // Options that need a little more setup\n if (options.touchAction) {\n this.touchAction.update();\n }\n if (options.inputTarget) {\n // Clean up existing event listeners and reinitialize\n this.input.destroy();\n this.input.target = options.inputTarget;\n this.input.init();\n }\n return this;\n }\n\n\t/**\n\t * @private\n\t * stop recognizing for this session.\n\t * This session will be discarded, when a new [input]start event is fired.\n\t * When forced, the recognizer cycle is stopped immediately.\n\t * @param {Boolean} [force]\n\t */\n stop(force) {\n this.session.stopped = force ? FORCED_STOP : STOP;\n }\n\n\t/**\n\t * @private\n\t * run the recognizers!\n\t * called by the inputHandler function on every movement of the pointers (touches)\n\t * it walks through all the recognizers and tries to detect the gesture that is being made\n\t * @param {Object} inputData\n\t */\n recognize(inputData) {\n const { session } = this;\n\n if (session.stopped) {\n return;\n }\n\n // run the touch-action polyfill\n this.touchAction.preventDefaults(inputData);\n\n let recognizer;\n const { recognizers } = this;\n\n // this holds the recognizer that is being recognized.\n // so the recognizer's state needs to be BEGAN, CHANGED, ENDED or RECOGNIZED\n // if no recognizer is detecting a thing, it is set to `null`\n let { curRecognizer } = session;\n\n // reset when the last recognizer is recognized\n // or when we're in a new session\n if (!curRecognizer || (curRecognizer && curRecognizer.state & STATE_RECOGNIZED)) {\n session.curRecognizer = null;\n curRecognizer = null;\n }\n\n let i = 0;\n\n while (i < recognizers.length) {\n recognizer = recognizers[i];\n\n // find out if we are allowed try to recognize the input for this one.\n // 1. allow if the session is NOT forced stopped (see the .stop() method)\n // 2. allow if we still haven't recognized a gesture in this session, or the this recognizer is the one\n // that is being recognized.\n // 3. allow if the recognizer is allowed to run simultaneous with the current recognized recognizer.\n // this can be setup with the `recognizeWith()` method on the recognizer.\n if (session.stopped !== FORCED_STOP && (// 1\n !curRecognizer || recognizer === curRecognizer || // 2\n recognizer.canRecognizeWith(curRecognizer))) { // 3\n recognizer.recognize(inputData);\n } else {\n recognizer.reset();\n }\n\n // if the recognizer has been recognizing the input as a valid gesture, we want to store this one as the\n // current active recognizer. but only if we don't already have an active recognizer\n if (!curRecognizer && recognizer.state & (STATE_BEGAN | STATE_CHANGED | STATE_ENDED)) {\n session.curRecognizer = recognizer;\n curRecognizer = recognizer;\n }\n i++;\n }\n }\n\n\t/**\n\t * @private\n\t * get a recognizer by its event name.\n\t * @param {Recognizer|String} recognizer\n\t * @returns {Recognizer|Null}\n\t */\n get(recognizer) {\n if (recognizer instanceof Recognizer) {\n return recognizer;\n }\n\n const { recognizers } = this;\n\n for (let i = 0; i < recognizers.length; i++) {\n if (recognizers[i].options.event === recognizer) {\n return recognizers[i];\n }\n }\n return null;\n }\n\n\t/**\n\t * @private add a recognizer to the manager\n\t * existing recognizers with the same event name will be removed\n\t * @param {Recognizer} recognizer\n\t * @returns {Recognizer|Manager}\n\t */\n add(recognizer) {\n if (invokeArrayArg(recognizer, \"add\", this)) {\n return this;\n }\n\n // remove existing\n const existing = this.get(recognizer.options.event);\n\n if (existing) {\n this.remove(existing);\n }\n\n this.recognizers.push(recognizer);\n recognizer.manager = this;\n\n this.touchAction.update();\n return recognizer;\n }\n\n\t/**\n\t * @private\n\t * remove a recognizer by name or instance\n\t * @param {Recognizer|String} recognizer\n\t * @returns {Manager}\n\t */\n remove(recognizer) {\n if (invokeArrayArg(recognizer, \"remove\", this)) {\n return this;\n }\n\n const targetRecognizer = this.get(recognizer);\n\n // let's make sure this recognizer exists\n if (recognizer) {\n const { recognizers } = this;\n const index = inArray(recognizers, targetRecognizer);\n\n if (index !== -1) {\n recognizers.splice(index, 1);\n this.touchAction.update();\n }\n }\n\n return this;\n }\n\n\t/**\n\t * @private\n\t * bind event\n\t * @param {String} events\n\t * @param {Function} handler\n\t * @returns {EventEmitter} this\n\t */\n on(events, handler) {\n if (events === undefined || handler === undefined) {\n return this;\n }\n\n const { handlers } = this;\n\n each(splitStr(events), event => {\n handlers[event] = handlers[event] || [];\n handlers[event].push(handler);\n });\n return this;\n }\n\n\t/**\n\t * @private unbind event, leave emit blank to remove all handlers\n\t * @param {String} events\n\t * @param {Function} [handler]\n\t * @returns {EventEmitter} this\n\t */\n off(events, handler) {\n if (events === undefined) {\n return this;\n }\n\n const { handlers } = this;\n\n each(splitStr(events), event => {\n if (!handler) {\n delete handlers[event];\n } else {\n handlers[event] && handlers[event].splice(inArray(handlers[event], handler), 1);\n }\n });\n return this;\n }\n\n\t/**\n\t * @private emit event to the listeners\n\t * @param {String} event\n\t * @param {Object} data\n\t */\n emit(event, data) {\n // we also want to trigger dom events\n if (this.options.domEvents) {\n triggerDomEvent(event, data);\n }\n\n // no handlers, so skip it all\n const handlers = this.handlers[event] && this.handlers[event].slice();\n\n if (!handlers || !handlers.length) {\n return;\n }\n\n data.type = event;\n data.preventDefault = function () {\n data.srcEvent.preventDefault();\n };\n\n let i = 0;\n\n while (i < handlers.length) {\n handlers[i](data);\n i++;\n }\n }\n\n\t/**\n\t * @private\n\t * destroy the manager and unbinds all events\n\t * it doesn't unbind dom events, that is the user own responsibility\n\t */\n destroy() {\n this.element && toggleCssProps(this, false);\n\n this.handlers = {};\n this.session = {};\n this.input.destroy();\n this.element = null;\n }\n}\n","import { SUPPORT_POINTER_EVENTS,SUPPORT_ONLY_TOUCH,SUPPORT_TOUCH } from './input-consts';\nimport inputHandler from './input-handler';\nimport PointerEventInput from '../input/pointerevent';\nimport TouchInput from '../input/touch';\nimport MouseInput from '../input/mouse';\nimport TouchMouseInput from '../input/touchmouse';\n\n/**\n * @private\n * create new input type manager\n * called by the Manager constructor\n * @param {Hammer} manager\n * @returns {Input}\n */\nexport default function createInputInstance(manager) {\n let Type;\n // let inputClass = manager.options.inputClass;\n let { options:{ inputClass } } = manager;\n if (inputClass) {\n Type = inputClass;\n } else if (SUPPORT_POINTER_EVENTS) {\n Type = PointerEventInput;\n } else if (SUPPORT_ONLY_TOUCH) {\n Type = TouchInput;\n } else if (!SUPPORT_TOUCH) {\n Type = MouseInput;\n } else {\n Type = TouchMouseInput;\n }\n return new (Type)(manager, inputHandler);\n}\n","import {\n INPUT_START,\n INPUT_MOVE,\n INPUT_END,\n INPUT_CANCEL,\n INPUT_TYPE_TOUCH\n} from '../inputjs/input-consts';\nimport Input from '../inputjs/input-constructor';\nimport toArray from '../utils/to-array';\nimport uniqueArray from '../utils/unique-array';\n\nconst SINGLE_TOUCH_INPUT_MAP = {\n touchstart: INPUT_START,\n touchmove: INPUT_MOVE,\n touchend: INPUT_END,\n touchcancel: INPUT_CANCEL\n};\n\nconst SINGLE_TOUCH_TARGET_EVENTS = 'touchstart';\nconst SINGLE_TOUCH_WINDOW_EVENTS = 'touchstart touchmove touchend touchcancel';\n\n/**\n * @private\n * Touch events input\n * @constructor\n * @extends Input\n */\nexport default class SingleTouchInput extends Input {\n constructor() {\n var proto = SingleTouchInput.prototype;\n proto.evTarget = SINGLE_TOUCH_TARGET_EVENTS;\n proto.evWin = SINGLE_TOUCH_WINDOW_EVENTS;\n\n super(...arguments);\n this.started = false;\n }\n\n handler(ev) {\n let type = SINGLE_TOUCH_INPUT_MAP[ev.type];\n\n // should we handle the touch events?\n if (type === INPUT_START) {\n this.started = true;\n }\n\n if (!this.started) {\n return;\n }\n\n let touches = normalizeSingleTouches.call(this, ev, type);\n\n // when done, reset the started state\n if (type & (INPUT_END | INPUT_CANCEL) && touches[0].length - touches[1].length === 0) {\n this.started = false;\n }\n\n this.callback(this.manager, type, {\n pointers: touches[0],\n changedPointers: touches[1],\n pointerType: INPUT_TYPE_TOUCH,\n srcEvent: ev\n });\n }\n}\n\n/**\n * @private\n * @this {TouchInput}\n * @param {Object} ev\n * @param {Number} type flag\n * @returns {undefined|Array} [all, changed]\n */\nfunction normalizeSingleTouches(ev, type) {\n let all = toArray(ev.touches);\n let changed = toArray(ev.changedTouches);\n\n if (type & (INPUT_END | INPUT_CANCEL)) {\n all = uniqueArray(all.concat(changed), 'identifier', true);\n }\n\n return [all, changed];\n}\n","import Recognizer from '../recognizerjs/recognizer-constructor';\nimport {\n STATE_BEGAN,\n STATE_CHANGED,\n STATE_CANCELLED,\n STATE_ENDED,\n STATE_FAILED\n} from '../recognizerjs/recognizer-consts';\nimport {\n INPUT_CANCEL,\n INPUT_END\n} from '../inputjs/input-consts';\n\n/**\n * @private\n * This recognizer is just used as a base for the simple attribute recognizers.\n * @constructor\n * @extends Recognizer\n */\nexport default class AttrRecognizer extends Recognizer {\n constructor(options = {}) {\n super({\n pointers: 1,\n ...options,\n });\n }\n\n /**\n * @private\n * Used to check if it the recognizer receives valid input, like input.distance > 10.\n * @memberof AttrRecognizer\n * @param {Object} input\n * @returns {Boolean} recognized\n */\n attrTest(input) {\n let optionPointers = this.options.pointers;\n return optionPointers === 0 || input.pointers.length === optionPointers;\n }\n\n /**\n * @private\n * Process the input and return the state for the recognizer\n * @memberof AttrRecognizer\n * @param {Object} input\n * @returns {*} State\n */\n process(input) {\n let { state } = this;\n let { eventType } = input;\n\n let isRecognized = state & (STATE_BEGAN | STATE_CHANGED);\n let isValid = this.attrTest(input);\n\n // on cancel input and we've recognized before, return STATE_CANCELLED\n if (isRecognized && (eventType & INPUT_CANCEL || !isValid)) {\n return state | STATE_CANCELLED;\n } else if (isRecognized || isValid) {\n if (eventType & INPUT_END) {\n return state | STATE_ENDED;\n } else if (!(state & STATE_BEGAN)) {\n return STATE_BEGAN;\n }\n return state | STATE_CHANGED;\n }\n return STATE_FAILED;\n }\n}\n","import Recognizer from '../recognizerjs/recognizer-constructor';\nimport { TOUCH_ACTION_MANIPULATION } from '../touchactionjs/touchaction-Consts';\nimport {INPUT_START,INPUT_END } from '../inputjs/input-consts';\nimport {\n STATE_RECOGNIZED,\n STATE_BEGAN,\n STATE_FAILED\n} from '../recognizerjs/recognizer-consts';\nimport getDistance from '../inputjs/get-distance';\n\n/**\n * @private\n * A tap is recognized when the pointer is doing a small tap/click. Multiple taps are recognized if they occur\n * between the given interval and position. The delay option can be used to recognize multi-taps without firing\n * a single tap.\n *\n * The eventData from the emitted event contains the property `tapCount`, which contains the amount of\n * multi-taps being recognized.\n * @constructor\n * @extends Recognizer\n */\nexport default class TapRecognizer extends Recognizer {\n constructor(options = {}) {\n super({\n event: 'tap',\n pointers: 1,\n taps: 1,\n interval: 300, // max time between the multi-tap taps\n time: 250, // max time of the pointer to be down (like finger on the screen)\n threshold: 9, // a minimal movement is ok, but keep it low\n posThreshold: 10, // a multi-tap can be a bit off the initial position\n ...options,\n });\n\n // previous time and center,\n // used for tap counting\n this.pTime = false;\n this.pCenter = false;\n\n this._timer = null;\n this._input = null;\n this.count = 0;\n }\n\n getTouchAction() {\n return [TOUCH_ACTION_MANIPULATION];\n }\n\n process(input) {\n let { options } = this;\n\n let validPointers = input.pointers.length === options.pointers;\n let validMovement = input.distance < options.threshold;\n let validTouchTime = input.deltaTime < options.time;\n\n this.reset();\n\n if ((input.eventType & INPUT_START) && (this.count === 0)) {\n return this.failTimeout();\n }\n\n // we only allow little movement\n // and we've reached an end event, so a tap is possible\n if (validMovement && validTouchTime && validPointers) {\n if (input.eventType !== INPUT_END) {\n return this.failTimeout();\n }\n\n let validInterval = this.pTime ? (input.timeStamp - this.pTime < options.interval) : true;\n let validMultiTap = !this.pCenter || getDistance(this.pCenter, input.center) < options.posThreshold;\n\n this.pTime = input.timeStamp;\n this.pCenter = input.center;\n\n if (!validMultiTap || !validInterval) {\n this.count = 1;\n } else {\n this.count += 1;\n }\n\n this._input = input;\n\n // if tap count matches we have recognized it,\n // else it has began recognizing...\n let tapCount = this.count % options.taps;\n if (tapCount === 0) {\n // no failing requirements, immediately trigger the tap event\n // or wait as long as the multitap interval to trigger\n if (!this.hasRequireFailures()) {\n return STATE_RECOGNIZED;\n } else {\n this._timer = setTimeout(() => {\n this.state = STATE_RECOGNIZED;\n this.tryEmit();\n }, options.interval);\n return STATE_BEGAN;\n }\n }\n }\n return STATE_FAILED;\n }\n\n failTimeout() {\n this._timer = setTimeout(() => {\n this.state = STATE_FAILED;\n }, this.options.interval);\n return STATE_FAILED;\n }\n\n reset() {\n clearTimeout(this._timer);\n }\n\n emit() {\n if (this.state === STATE_RECOGNIZED) {\n this._input.tapCount = this.count;\n this.manager.emit(this.options.event, this._input);\n }\n }\n}\n","import {\n DIRECTION_LEFT,\n DIRECTION_RIGHT,\n DIRECTION_UP,\n DIRECTION_DOWN\n} from '../inputjs/input-consts';\n\n/**\n * @private\n * direction cons to string\n * @param {constant} direction\n * @returns {String}\n */\nexport default function directionStr(direction) {\n if (direction === DIRECTION_DOWN) {\n return 'down';\n } else if (direction === DIRECTION_UP) {\n return 'up';\n } else if (direction === DIRECTION_LEFT) {\n return 'left';\n } else if (direction === DIRECTION_RIGHT) {\n return 'right';\n }\n return '';\n}\n","import AttrRecognizer from './attribute';\nimport {\n DIRECTION_ALL,\n DIRECTION_HORIZONTAL,\n DIRECTION_VERTICAL,\n DIRECTION_NONE,\n DIRECTION_UP,\n DIRECTION_DOWN,\n DIRECTION_LEFT,\n DIRECTION_RIGHT\n} from '../inputjs/input-consts';\nimport { STATE_BEGAN } from '../recognizerjs/recognizer-consts';\nimport { TOUCH_ACTION_PAN_X,TOUCH_ACTION_PAN_Y } from '../touchactionjs/touchaction-Consts';\nimport directionStr from '../recognizerjs/direction-str';\n\n/**\n * @private\n * Pan\n * Recognized when the pointer is down and moved in the allowed direction.\n * @constructor\n * @extends AttrRecognizer\n */\nexport default class PanRecognizer extends AttrRecognizer {\n constructor(options = {}) {\n super({\n event: 'pan',\n threshold: 10,\n pointers: 1,\n direction: DIRECTION_ALL,\n ...options,\n });\n this.pX = null;\n this.pY = null;\n }\n\n getTouchAction() {\n let { options:{ direction } } = this;\n let actions = [];\n if (direction & DIRECTION_HORIZONTAL) {\n actions.push(TOUCH_ACTION_PAN_Y);\n }\n if (direction & DIRECTION_VERTICAL) {\n actions.push(TOUCH_ACTION_PAN_X);\n }\n return actions;\n }\n\n directionTest(input) {\n let { options } = this;\n let hasMoved = true;\n let { distance } = input;\n let { direction } = input;\n let x = input.deltaX;\n let y = input.deltaY;\n\n // lock to axis?\n if (!(direction & options.direction)) {\n if (options.direction & DIRECTION_HORIZONTAL) {\n direction = (x === 0) ? DIRECTION_NONE : (x < 0) ? DIRECTION_LEFT : DIRECTION_RIGHT;\n hasMoved = x !== this.pX;\n distance = Math.abs(input.deltaX);\n } else {\n direction = (y === 0) ? DIRECTION_NONE : (y < 0) ? DIRECTION_UP : DIRECTION_DOWN;\n hasMoved = y !== this.pY;\n distance = Math.abs(input.deltaY);\n }\n }\n input.direction = direction;\n return hasMoved && distance > options.threshold && direction & options.direction;\n }\n\n attrTest(input) {\n return AttrRecognizer.prototype.attrTest.call(this, input) && // replace with a super call\n (this.state & STATE_BEGAN || (!(this.state & STATE_BEGAN) && this.directionTest(input)));\n }\n\n emit(input) {\n\n this.pX = input.deltaX;\n this.pY = input.deltaY;\n\n let direction = directionStr(input.direction);\n\n if (direction) {\n input.additionalEvent = this.options.event + direction;\n }\n super.emit(input);\n }\n}\n","import AttrRecognizer from '../recognizers/attribute';\nimport { abs } from '../utils/utils-consts';\nimport { DIRECTION_HORIZONTAL,DIRECTION_VERTICAL } from '../inputjs/input-consts';\nimport PanRecognizer from './pan';\nimport { INPUT_END } from '../inputjs/input-consts';\nimport directionStr from '../recognizerjs/direction-str';\n\n/**\n * @private\n * Swipe\n * Recognized when the pointer is moving fast (velocity), with enough distance in the allowed direction.\n * @constructor\n * @extends AttrRecognizer\n */\nexport default class SwipeRecognizer extends AttrRecognizer {\n constructor(options = {}) {\n super({\n event: 'swipe',\n threshold: 10,\n velocity: 0.3,\n direction: DIRECTION_HORIZONTAL | DIRECTION_VERTICAL,\n pointers: 1,\n ...options,\n });\n }\n\n getTouchAction() {\n return PanRecognizer.prototype.getTouchAction.call(this);\n }\n\n attrTest(input) {\n let { direction } = this.options;\n let velocity;\n\n if (direction & (DIRECTION_HORIZONTAL | DIRECTION_VERTICAL)) {\n velocity = input.overallVelocity;\n } else if (direction & DIRECTION_HORIZONTAL) {\n velocity = input.overallVelocityX;\n } else if (direction & DIRECTION_VERTICAL) {\n velocity = input.overallVelocityY;\n }\n\n return super.attrTest(input) &&\n direction & input.offsetDirection &&\n input.distance > this.options.threshold &&\n input.maxPointers === this.options.pointers &&\n abs(velocity) > this.options.velocity && input.eventType & INPUT_END;\n }\n\n emit(input) {\n let direction = directionStr(input.offsetDirection);\n if (direction) {\n this.manager.emit(this.options.event + direction, input);\n }\n\n this.manager.emit(this.options.event, input);\n }\n}\n","import AttrRecognizer from './attribute';\nimport { TOUCH_ACTION_NONE } from '../touchactionjs/touchaction-Consts';\nimport { STATE_BEGAN } from '../recognizerjs/recognizer-consts';\n\n/**\n * @private\n * Pinch\n * Recognized when two or more pointers are moving toward (zoom-in) or away from each other (zoom-out).\n * @constructor\n * @extends AttrRecognizer\n */\nexport default class PinchRecognizer extends AttrRecognizer {\n constructor(options = {}) {\n super({\n event: 'pinch',\n threshold: 0,\n pointers: 2,\n ...options,\n });\n }\n\n getTouchAction() {\n return [TOUCH_ACTION_NONE];\n }\n\n attrTest(input) {\n return super.attrTest(input) &&\n (Math.abs(input.scale - 1) > this.options.threshold || this.state & STATE_BEGAN);\n }\n\n emit(input) {\n if (input.scale !== 1) {\n let inOut = input.scale < 1 ? 'in' : 'out';\n input.additionalEvent = this.options.event + inOut;\n }\n super.emit(input);\n }\n}\n","import AttrRecognizer from './attribute';\nimport { TOUCH_ACTION_NONE } from '../touchactionjs/touchaction-Consts';\nimport { STATE_BEGAN } from '../recognizerjs/recognizer-consts';\n\n/**\n * @private\n * Rotate\n * Recognized when two or more pointer are moving in a circular motion.\n * @constructor\n * @extends AttrRecognizer\n */\nexport default class RotateRecognizer extends AttrRecognizer {\n constructor(options = {}) {\n super( {\n event: 'rotate',\n threshold: 0,\n pointers: 2,\n ...options,\n });\n }\n\n getTouchAction() {\n return [TOUCH_ACTION_NONE];\n }\n\n attrTest(input) {\n return super.attrTest(input) &&\n (Math.abs(input.rotation) > this.options.threshold || this.state & STATE_BEGAN);\n }\n}","import Recognizer from '../recognizerjs/recognizer-constructor';\nimport {\n STATE_RECOGNIZED,\n STATE_FAILED\n} from '../recognizerjs/recognizer-consts';\nimport { now } from '../utils/utils-consts';\nimport { TOUCH_ACTION_AUTO } from '../touchactionjs/touchaction-Consts';\nimport {\n INPUT_START,\n INPUT_END,\n INPUT_CANCEL\n} from '../inputjs/input-consts';\n\n/**\n * @private\n * Press\n * Recognized when the pointer is down for x ms without any movement.\n * @constructor\n * @extends Recognizer\n */\nexport default class PressRecognizer extends Recognizer {\n constructor(options = {}) {\n super({\n event: 'press',\n pointers: 1,\n time: 251, // minimal time of the pointer to be pressed\n threshold: 9, // a minimal movement is ok, but keep it low\n ...options,\n });\n this._timer = null;\n this._input = null;\n }\n\n getTouchAction() {\n return [TOUCH_ACTION_AUTO];\n }\n\n process(input) {\n let { options } = this;\n let validPointers = input.pointers.length === options.pointers;\n let validMovement = input.distance < options.threshold;\n let validTime = input.deltaTime > options.time;\n\n this._input = input;\n\n // we only allow little movement\n // and we've reached an end event, so a tap is possible\n if (!validMovement || !validPointers || (input.eventType & (INPUT_END | INPUT_CANCEL) && !validTime)) {\n this.reset();\n } else if (input.eventType & INPUT_START) {\n this.reset();\n this._timer = setTimeout(() => {\n this.state = STATE_RECOGNIZED;\n this.tryEmit();\n }, options.time);\n } else if (input.eventType & INPUT_END) {\n return STATE_RECOGNIZED;\n }\n return STATE_FAILED;\n }\n\n reset() {\n clearTimeout(this._timer);\n }\n\n emit(input) {\n if (this.state !== STATE_RECOGNIZED) {\n return;\n }\n\n if (input && (input.eventType & INPUT_END)) {\n this.manager.emit(`${this.options.event}up`, input);\n } else {\n this._input.timeStamp = now();\n this.manager.emit(this.options.event, this._input);\n }\n }\n}\n\n","/**\n * @private\n * wrap a method with a deprecation warning and stack trace\n * @param {Function} method\n * @param {String} name\n * @param {String} message\n * @returns {Function} A new function wrapping the supplied method.\n */\nexport default function deprecate(method, name, message) {\n let deprecationMessage = `DEPRECATED METHOD: ${name}\\n${message} AT \\n`;\n return function() {\n let e = new Error('get-stack-trace');\n let stack = e && e.stack ? e.stack.replace(/^[^\\(]+?[\\n$]/gm, '')\n .replace(/^\\s+at\\s+/gm, '')\n .replace(/^Object.\\s*\\(/gm, '{anonymous}()@') : 'Unknown Stack Trace';\n\n let log = window.console && (window.console.warn || window.console.log);\n if (log) {\n log.call(window.console, deprecationMessage, stack);\n }\n return method.apply(this, arguments);\n };\n}\n","import deprecate from './deprecate';\n/**\n * @private\n * extend object.\n * means that properties in dest will be overwritten by the ones in src.\n * @param {Object} dest\n * @param {Object} src\n * @param {Boolean} [merge=false]\n * @returns {Object} dest\n */\nconst extend = deprecate((dest, src, merge) => {\n let keys = Object.keys(src);\n let i = 0;\n while (i < keys.length) {\n if (!merge || (merge && dest[keys[i]] === undefined)) {\n dest[keys[i]] = src[keys[i]];\n }\n i++;\n }\n return dest;\n}, 'extend', 'Use `assign`.');\n\nexport default extend;\n","import deprecate from './deprecate';\nimport extend from './extend';\n/**\n * @private\n * merge the values from src in the dest.\n * means that properties that exist in dest will not be overwritten by src\n * @param {Object} dest\n * @param {Object} src\n * @returns {Object} dest\n */\nconst merge = deprecate((dest, src) => {\n return extend(dest, src, true);\n}, 'merge', 'Use `assign`.');\n\nexport default merge;\n","import assign from './assign';\n/**\n * @private\n * simple class inheritance\n * @param {Function} child\n * @param {Function} base\n * @param {Object} [properties]\n */\nexport default function inherit(child, base, properties) {\n let baseP = base.prototype;\n let childP;\n\n childP = child.prototype = Object.create(baseP);\n childP.constructor = child;\n childP._super = baseP;\n\n if (properties) {\n assign(childP, properties);\n }\n}\n","/**\n * @private\n * simple function bind\n * @param {Function} fn\n * @param {Object} context\n * @returns {Function}\n */\nexport default function bindFn(fn, context) {\n return function boundFn() {\n return fn.apply(context, arguments);\n };\n}\n","import Manager from \"./manager\";\nimport defaults from \"./defaults\";\nimport assign from './utils/assign';\nimport {\n INPUT_START,\n INPUT_MOVE,\n INPUT_END,\n INPUT_CANCEL,\n DIRECTION_NONE,\n DIRECTION_LEFT,\n DIRECTION_RIGHT,\n DIRECTION_UP,\n DIRECTION_DOWN,\n DIRECTION_HORIZONTAL,\n DIRECTION_VERTICAL,\n DIRECTION_ALL,\n} from \"./inputjs/input-consts\";\nimport {\n STATE_POSSIBLE,\n STATE_BEGAN,\n STATE_CHANGED,\n STATE_ENDED,\n STATE_RECOGNIZED,\n STATE_CANCELLED,\n STATE_FAILED,\n} from \"./recognizerjs/recognizer-consts\";\n\nimport Input from \"./inputjs/input-constructor\";\nimport TouchAction from \"./touchactionjs/touchaction-constructor\";\nimport TouchInput from \"./input/touch\";\nimport MouseInput from \"./input/mouse\";\nimport PointerEventInput from \"./input/pointerevent\";\nimport SingleTouchInput from \"./input/singletouch\";\nimport TouchMouseInput from \"./input/touchmouse\";\n\nimport Recognizer from \"./recognizerjs/recognizer-constructor\";\nimport AttrRecognizer from \"./recognizers/attribute\";\nimport TapRecognizer from \"./recognizers/tap\";\nimport PanRecognizer from \"./recognizers/pan\";\nimport SwipeRecognizer from \"./recognizers/swipe\";\nimport PinchRecognizer from \"./recognizers/pinch\";\nimport RotateRecognizer from \"./recognizers/rotate\";\nimport PressRecognizer from \"./recognizers/press\";\n\nimport addEventListeners from \"./utils/add-event-listeners\";\nimport removeEventListeners from \"./utils/remove-event-listeners\";\nimport each from \"./utils/each\";\nimport merge from \"./utils/merge\";\nimport extend from \"./utils/extend\";\nimport inherit from \"./utils/inherit\";\nimport bindFn from \"./utils/bind-fn\";\nimport prefixed from \"./utils/prefixed\";\nimport toArray from \"./utils/to-array\";\nimport uniqueArray from \"./utils/unique-array\";\nimport splitStr from \"./utils/split-str\";\nimport inArray from \"./utils/in-array\";\nimport boolOrFn from \"./utils/bool-or-fn\";\nimport hasParent from \"./utils/has-parent\";\n/**\n * @private\n * Simple way to create a manager with a default set of recognizers.\n * @param {HTMLElement} element\n * @param {Object} [options]\n * @constructor\n */\nexport default class Hammer {\n\t/**\n * @private\n * @const {string}\n */\n\tstatic VERSION = \"#__VERSION__#\";\n\tstatic DIRECTION_ALL = DIRECTION_ALL;\n\tstatic DIRECTION_DOWN = DIRECTION_DOWN;\n\tstatic DIRECTION_LEFT = DIRECTION_LEFT;\n\tstatic DIRECTION_RIGHT = DIRECTION_RIGHT;\n\tstatic DIRECTION_UP = DIRECTION_UP;\n\tstatic DIRECTION_HORIZONTAL = DIRECTION_HORIZONTAL;\n\tstatic DIRECTION_VERTICAL = DIRECTION_VERTICAL;\n\tstatic DIRECTION_NONE = DIRECTION_NONE;\n\tstatic DIRECTION_DOWN = DIRECTION_DOWN;\n\tstatic INPUT_START = INPUT_START;\n\tstatic INPUT_MOVE = INPUT_MOVE;\n static INPUT_END = INPUT_END;\n\tstatic INPUT_CANCEL = INPUT_CANCEL;\n\tstatic STATE_POSSIBLE = STATE_POSSIBLE;\n\tstatic STATE_BEGAN = STATE_BEGAN;\n\tstatic STATE_CHANGED = STATE_CHANGED;\n\tstatic STATE_ENDED = STATE_ENDED;\n\tstatic STATE_RECOGNIZED = STATE_RECOGNIZED;\n\tstatic STATE_CANCELLED = STATE_CANCELLED;\n\tstatic STATE_FAILED = STATE_FAILED; \n\tstatic Manager = Manager;\n\tstatic Input = Input;\n\tstatic TouchAction = TouchAction;\n\tstatic TouchInput = TouchInput;\n\tstatic MouseInput = MouseInput;\n\tstatic PointerEventInput = PointerEventInput;\n\tstatic TouchMouseInput = TouchMouseInput;\n\tstatic SingleTouchInput = SingleTouchInput;\n\tstatic Recognizer = Recognizer;\n\tstatic AttrRecognizer = AttrRecognizer;\n\tstatic Tap = TapRecognizer;\n\tstatic Pan = PanRecognizer;\n\tstatic Swipe = SwipeRecognizer;\n\tstatic Pinch = PinchRecognizer;\n\tstatic Rotate = RotateRecognizer;\n\tstatic Press = PressRecognizer;\n\tstatic on = addEventListeners;\n\tstatic off = removeEventListeners;\n\tstatic each = each;\n\tstatic merge = merge;\n\tstatic extend = extend;\n\tstatic bindFn = bindFn;\n\tstatic assign = assign;\n\tstatic inherit = inherit;\n\tstatic bindFn = bindFn;\n\tstatic prefixed = prefixed;\n\tstatic toArray = toArray;\n\tstatic inArray = inArray;\n\tstatic uniqueArray = uniqueArray;\n\tstatic splitStr = splitStr;\n\tstatic boolOrFn = boolOrFn;\n\tstatic hasParent = hasParent;\n\tstatic addEventListeners = addEventListeners;\n\tstatic removeEventListeners = removeEventListeners;\n\tstatic defaults = defaults;\n\tconstructor(element, options = {}) {\n\t\treturn new Manager(element, {\n\t\t\trecognizers: [\n\t\t\t\t\t// RecognizerClass, options, [recognizeWith, ...], [requireFailure, ...]\n\t\t\t\t\t[RotateRecognizer, { enable: false }],\n\t\t\t\t\t[PinchRecognizer, { enable: false }, ['rotate']],\n\t\t\t\t\t[SwipeRecognizer, { direction: DIRECTION_HORIZONTAL }],\n\t\t\t\t\t[PanRecognizer, { direction: DIRECTION_HORIZONTAL }, ['swipe']],\n\t\t\t\t\t[TapRecognizer],\n\t\t\t\t\t[TapRecognizer, { event: 'doubletap', taps: 2 }, ['tap']],\n\t\t\t\t\t[PressRecognizer]\n\t\t\t],\n\t\t\t...options,\n\t\t});\n\t}\n}\n"],"names":["win","Object","assign","target","TypeError","output","index","arguments","length","source","nextKey","hasOwnProperty","VENDOR_PREFIXES","TEST_ELEMENT","document","style","createElement","TYPE_FUNCTION","round","Math","abs","now","Date","prefixed","obj","property","prefix","prop","camelProp","toUpperCase","slice","i","window","PREFIXED_TOUCH_ACTION","NATIVE_TOUCH_ACTION","undefined","TOUCH_ACTION_COMPUTE","TOUCH_ACTION_AUTO","TOUCH_ACTION_MANIPULATION","TOUCH_ACTION_NONE","TOUCH_ACTION_PAN_X","TOUCH_ACTION_PAN_Y","TOUCH_ACTION_MAP","touchMap","cssSupports","CSS","supports","forEach","val","getTouchActionProps","SUPPORT_TOUCH","SUPPORT_POINTER_EVENTS","SUPPORT_ONLY_TOUCH","test","navigator","userAgent","INPUT_TYPE_TOUCH","INPUT_TYPE_MOUSE","COMPUTE_INTERVAL","INPUT_START","INPUT_END","INPUT_CANCEL","DIRECTION_NONE","DIRECTION_LEFT","DIRECTION_RIGHT","DIRECTION_UP","DIRECTION_DOWN","DIRECTION_HORIZONTAL","DIRECTION_VERTICAL","DIRECTION_ALL","PROPS_XY","PROPS_CLIENT_XY","each","iterator","context","call","boolOrFn","args","apply","inStr","str","find","indexOf","TouchAction","manager","value","set","this","compute","element","actions","toLowerCase","trim","update","options","touchAction","recognizers","recognizer","enable","concat","getTouchAction","hasPanX","hasPanY","cleanTouchActions","join","preventDefaults","input","srcEvent","direction","offsetDirection","session","prevented","preventDefault","hasNone","isTapPointer","pointers","isTapMovement","distance","isTapTouchTime","deltaTime","preventSrc","hasParent","node","parent","parentNode","getCenter","pointersLength","x","clientX","y","clientY","simpleCloneInputData","timeStamp","center","deltaX","deltaY","getDistance","p1","p2","props","sqrt","getAngle","atan2","PI","getDirection","getVelocity","computeInputData","firstInput","firstMultiple","offset","prevDelta","prevInput","offsetCenter","angle","offsetDelta","eventType","start","end","overallVelocity","overallVelocityX","overallVelocityY","scale","rotation","maxPointers","velocity","velocityX","velocityY","last","lastInterval","v","computeIntervalInputData","inputHandler","pointersLen","changedPointersLen","changedPointers","isFirst","isFinal","emit","recognize","splitStr","split","addEventListeners","types","handler","type","addEventListener","removeEventListeners","removeEventListener","getWindowForElement","doc","ownerDocument","defaultView","parentWindow","Input","callback","self","inputTarget","domHandler","ev","init","evEl","evTarget","evWin","destroy","inArray","src","findByKey","POINTER_INPUT_MAP","pointerdown","pointermove","pointerup","pointercancel","pointerout","IE10_POINTER_TYPE_ENUM","POINTER_ELEMENT_EVENTS","POINTER_WINDOW_EVENTS","MSPointerEvent","PointerEvent","PointerEventInput","proto","prototype","store","_this","pointerEvents","removePointer","eventTypeNormalized","replace","pointerType","isTouch","storeIndex","pointerId","button","push","splice","toArray","Array","uniqueArray","key","sort","results","values","a","b","TOUCH_INPUT_MAP","touchstart","touchmove","touchend","touchcancel","TouchInput","targetIds","touches","targetTouches","allTouches","identifier","changedTouches","changedTargetTouches","filter","touch","MOUSE_INPUT_MAP","mousedown","mousemove","mouseup","MouseInput","pressed","which","DEDUP_TIMEOUT","DEDUP_DISTANCE","setLastTouch","eventData","primaryTouch","lastTouch","lts","lastTouches","setTimeout","TouchMouseInput","inputEvent","inputData","isMouse","sourceCapabilities","firesTouchEvents","t","dx","dy","mouse","invokeArrayArg","arg","fn","isArray","_uniqueId","getRecognizerByNameIfManager","otherRecognizer","get","stateStr","state","Recognizer","id","simultaneous","requireFail","recognizeWith","dropRecognizeWith","requireFailure","dropRequireFailure","hasRequireFailures","canRecognizeWith","event","additionalEvent","tryEmit","canEmit","inputDataClone","reset","process","domEvents","inputClass","preset","cssProps","userSelect","touchSelect","touchCallout","contentZooming","userDrag","tapHighlightColor","toggleCssProps","add","name","oldCssProps","Manager","defaults","handlers","item","stop","force","stopped","curRecognizer","existing","remove","targetRecognizer","on","events","off","data","gestureEvent","createEvent","initEvent","gesture","dispatchEvent","SINGLE_TOUCH_INPUT_MAP","SingleTouchInput","started","all","changed","AttrRecognizer","_Recognizer","attrTest","optionPointers","isRecognized","isValid","TapRecognizer","taps","interval","time","threshold","posThreshold","pTime","pCenter","_timer","_input","count","validPointers","validMovement","validTouchTime","failTimeout","validInterval","validMultiTap","_this2","_this3","clearTimeout","tapCount","directionStr","PanRecognizer","pX","pY","directionTest","hasMoved","SwipeRecognizer","_AttrRecognizer","PinchRecognizer","inOut","RotateRecognizer","PressRecognizer","validTime","deprecate","method","message","deprecationMessage","e","Error","stack","log","console","warn","extend","dest","merge","keys","inherit","child","base","properties","childP","baseP","create","constructor","_super","bindFn","Hammer","VERSION","INPUT_MOVE","STATE_POSSIBLE","STATE_BEGAN","STATE_CHANGED","STATE_ENDED","STATE_RECOGNIZED","STATE_CANCELLED","STATE_FAILED","Tap","Pan","Swipe","Pinch","Rotate","Press"],"mappings":";;;;;;2lBAQA,ICNIA,IDOyB,mBAAlBC,OAAOC,OACP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oC,EAsCbY,MAAQ3C,GAtCK+B,EAuCba,MAAQ1C,GAvCK6B,EAwCbc,OAASzC,GAxCI2B,EAyCbe,MAAQzC,GAzCK0B,EA0Cb9E,GAAK3J,GA1CQyO,EA2Cb5E,IAAMxJ,GA3COoO,EA4CbtV,KAAOA,EA5CMsV,EA6CbZ,MAAQA,GA7CKY,EA8Cbd,OAASA,GA9CIc,EA+CbD,OAASA,GA/CIC,EAgDb5Z,OAASA,EAhDI4Z,EAiDbV,QAAUA,GAjDGU,EAkDbD,OAASA,GAlDIC,EAmDbvY,SAAWA,EAnDEuY,EAoDbpL,QAAUA,GApDGoL,EAqDblN,QAAUA,GArDGkN,EAsDblL,YAAcA,GAtDDkL,EAuDb3O,SAAWA,GAvDE2O,EAwDblV,SAAWA,EAxDEkV,EAyDbrS,UAAYA,EAzDCqS,EA0DbzO,kBAAoBA,GA1DPyO,EA2DbpO,qBAAuBA,GA3DVoO,EA4DbxF,SAAWA,GA5DEwF"} \ No newline at end of file diff --git a/node_modules/@egjs/hammerjs/package.json b/node_modules/@egjs/hammerjs/package.json new file mode 100644 index 0000000000000000000000000000000000000000..9b23dffffda972d3d460ca1a6a5683fcb9ca0b77 --- /dev/null +++ b/node_modules/@egjs/hammerjs/package.json @@ -0,0 +1,99 @@ +{ + "_from": "@egjs/hammerjs@^2.0.15", + "_id": "@egjs/hammerjs@2.0.15", + "_inBundle": false, + "_integrity": "sha512-BysW5KdNiJ1Qq4JRILaX/Lx2eJGyVPsFSwKA3aJbY+SKv57lS5ZFbEdlgj5shfYPLeJGEnK1WjfleDT+y4s1aQ==", + "_location": "/@egjs/hammerjs", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "@egjs/hammerjs@^2.0.15", + "name": "@egjs/hammerjs", + "escapedName": "@egjs%2fhammerjs", + "scope": "@egjs", + "rawSpec": "^2.0.15", + "saveSpec": null, + "fetchSpec": "^2.0.15" + }, + "_requiredBy": [ + "/vis-network" + ], + "_resolved": "https://registry.npmjs.org/@egjs/hammerjs/-/hammerjs-2.0.15.tgz", + "_shasum": "b6ef675540d275f7445647a64413af425b97bb9a", + "_spec": "@egjs/hammerjs@^2.0.15", + "_where": "/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/node_modules/vis-network", + "bugs": { + "url": "https://github.com/naver/hammer.js/issues" + }, + "bundleDependencies": false, + "dependencies": { + "@types/hammerjs": "^2.0.36" + }, + "deprecated": false, + "description": "A javascript library for multi-touch gestures", + "devDependencies": { + "@babel/cli": "^7.0.0", + "@babel/core": "^7.0.1", + "@babel/plugin-proposal-class-properties": "^7.0.0", + "@babel/plugin-transform-object-assign": "^7.0.0", + "@babel/preset-env": "^7.0.0", + "babel-plugin-no-side-effect-class-properties": "0.0.4", + "bannerize": "^1.0.2", + "blanket": "^1.2.3", + "changelogplease": "^1.2.0", + "ember-suave": "^4.0.0", + "git-tags": "^0.2.4", + "hammer-simulator": "git://github.com/hammerjs/simulator.git#master", + "jquery": "^3.1.0", + "jquery-hammerjs": "2.0.x", + "jscs": "^3.0.7", + "jshint": "^2.9.2", + "jshint-stylish": "^2.2.0", + "lodash-compat": "^3.10.2", + "node-qunit-phantomjs": "^1.4.0", + "qunitjs": "^2.0.0", + "rollup": "^0.66.0", + "rollup-plugin-analyzer": "^2.1.0", + "rollup-plugin-babel": "^4.0.3", + "rollup-plugin-replace": "^2.1.0", + "rollup-plugin-uglify": "^6.0.0", + "run-when-changed": "^1.2.0", + "serve": "^1.4.0", + "uglify-js": "^2.7.0" + }, + "engines": { + "node": ">=0.8.0" + }, + "homepage": "http://naver.github.io/egjs", + "keywords": [ + "touch", + "gestures" + ], + "license": "MIT", + "main": "dist/hammer.js", + "module": "dist/hammer.esm.js", + "name": "@egjs/hammerjs", + "repository": { + "type": "git", + "url": "git://github.com/naver/hammer.js.git" + }, + "scripts": { + "bannerize": "bannerize hammer.js hammer.min.js", + "build": "npm run rollup && npm run test:node", + "connect": "serve -p 8000 ./", + "jscs": " jscs src/**/*.js tests/unit/*.js tests/unit/gestures/*.js --config=./.jscsrc", + "jshint": "jshint src/**/*.js tests/unit/*.js tests/unit/gestures/*.js --config .jshintrc --verbose --reporter=node_modules/jshint-stylish", + "qunit": "phantomjs node_modules/qunit-phantomjs-runner/runner-list.js tests/unit/index.html 15", + "rollup": "rollup -c", + "test": "npm run build && npm run qunit", + "test:node": "node ./dist/hammer.js", + "testbuild": "rollup -c ./testrollup.config.js", + "watch": "run-when-changed --watch 'src/**/*.js' --watch 'tests/unit/*.js' --watch 'tests/unit/gestures/*.js' --exec 'npm run watch-tasks'", + "watch-tasks": "npm run rollup && npm run string-replace && npm run uglify && npm run jshint && npm run jscs" + }, + "sideEffects": false, + "title": "Hammer.JS", + "types": "src/hammer.d.ts", + "version": "2.0.15" +} diff --git a/node_modules/@egjs/hammerjs/replace.config.js b/node_modules/@egjs/hammerjs/replace.config.js new file mode 100644 index 0000000000000000000000000000000000000000..65c289c2a03634298197c561ad7c84f6e26fa486 --- /dev/null +++ b/node_modules/@egjs/hammerjs/replace.config.js @@ -0,0 +1,7 @@ +const version = require("./package.json").version; + +module.exports = { + files: "./dist/*.js", + from: /#__VERSION__#/g, + to: version, +}; diff --git a/node_modules/@egjs/hammerjs/rollup.config.js b/node_modules/@egjs/hammerjs/rollup.config.js new file mode 100644 index 0000000000000000000000000000000000000000..98074a658df2466f681c22c1f7a01fdb4550a04a --- /dev/null +++ b/node_modules/@egjs/hammerjs/rollup.config.js @@ -0,0 +1,65 @@ +import babel from "rollup-plugin-babel"; +import { uglify } from "rollup-plugin-uglify"; +import replace from "rollup-plugin-replace"; + +const banner = require("./banner"); +const version = require("./package.json").version; +const replaceVersion = replace({"#__VERSION__#": version, delimiters: ["", ""]}); + +export default [ + { + input: "src/index.js", + plugins: [babel({ exclude: "node_modules/**" }), replaceVersion], + output: { + banner: banner, + format: "es", + freeze: false, + exprots: "named", + interop: false, + sourcemap: true, + file: "./dist/hammer.esm.js", + }, + }, + { + input: "src/Hammer.js", + plugins: [babel({ exclude: "node_modules/**" }), replaceVersion], + output: { + banner: banner, + format: "umd", + name: "Hammer", + exports: "default", + freeze: false, + interop: false, + sourcemap: true, + file: "./dist/hammer.js", + }, + }, + { + input: "src/Hammer.js", + plugins: [babel({ exclude: "node_modules/**" }), replaceVersion, uglify({ + sourcemap: true, + output: { + comments: function (node, comment) { + const text = comment.value; + const type = comment.type; + + if (type === "comment2") { + // multiline comment + return /Naver/.test(text); + } + return false; + }, + }, + })], + output: { + banner: banner, + format: "umd", + name: "Hammer", + exports: "default", + freeze: false, + interop: false, + sourcemap: true, + file: "./dist/hammer.min.js", + }, + }, +]; diff --git a/node_modules/@egjs/hammerjs/src/Hammer.js b/node_modules/@egjs/hammerjs/src/Hammer.js new file mode 100644 index 0000000000000000000000000000000000000000..81fe19795ea79185a6a09e8ad51cbe6d8787c07d --- /dev/null +++ b/node_modules/@egjs/hammerjs/src/Hammer.js @@ -0,0 +1,142 @@ +import Manager from "./manager"; +import defaults from "./defaults"; +import assign from './utils/assign'; +import { + INPUT_START, + INPUT_MOVE, + INPUT_END, + INPUT_CANCEL, + DIRECTION_NONE, + DIRECTION_LEFT, + DIRECTION_RIGHT, + DIRECTION_UP, + DIRECTION_DOWN, + DIRECTION_HORIZONTAL, + DIRECTION_VERTICAL, + DIRECTION_ALL, +} from "./inputjs/input-consts"; +import { + STATE_POSSIBLE, + STATE_BEGAN, + STATE_CHANGED, + STATE_ENDED, + STATE_RECOGNIZED, + STATE_CANCELLED, + STATE_FAILED, +} from "./recognizerjs/recognizer-consts"; + +import Input from "./inputjs/input-constructor"; +import TouchAction from "./touchactionjs/touchaction-constructor"; +import TouchInput from "./input/touch"; +import MouseInput from "./input/mouse"; +import PointerEventInput from "./input/pointerevent"; +import SingleTouchInput from "./input/singletouch"; +import TouchMouseInput from "./input/touchmouse"; + +import Recognizer from "./recognizerjs/recognizer-constructor"; +import AttrRecognizer from "./recognizers/attribute"; +import TapRecognizer from "./recognizers/tap"; +import PanRecognizer from "./recognizers/pan"; +import SwipeRecognizer from "./recognizers/swipe"; +import PinchRecognizer from "./recognizers/pinch"; +import RotateRecognizer from "./recognizers/rotate"; +import PressRecognizer from "./recognizers/press"; + +import addEventListeners from "./utils/add-event-listeners"; +import removeEventListeners from "./utils/remove-event-listeners"; +import each from "./utils/each"; +import merge from "./utils/merge"; +import extend from "./utils/extend"; +import inherit from "./utils/inherit"; +import bindFn from "./utils/bind-fn"; +import prefixed from "./utils/prefixed"; +import toArray from "./utils/to-array"; +import uniqueArray from "./utils/unique-array"; +import splitStr from "./utils/split-str"; +import inArray from "./utils/in-array"; +import boolOrFn from "./utils/bool-or-fn"; +import hasParent from "./utils/has-parent"; +/** + * @private + * Simple way to create a manager with a default set of recognizers. + * @param {HTMLElement} element + * @param {Object} [options] + * @constructor + */ +export default class Hammer { + /** + * @private + * @const {string} + */ + static VERSION = "#__VERSION__#"; + static DIRECTION_ALL = DIRECTION_ALL; + static DIRECTION_DOWN = DIRECTION_DOWN; + static DIRECTION_LEFT = DIRECTION_LEFT; + static DIRECTION_RIGHT = DIRECTION_RIGHT; + static DIRECTION_UP = DIRECTION_UP; + static DIRECTION_HORIZONTAL = DIRECTION_HORIZONTAL; + static DIRECTION_VERTICAL = DIRECTION_VERTICAL; + static DIRECTION_NONE = DIRECTION_NONE; + static DIRECTION_DOWN = DIRECTION_DOWN; + static INPUT_START = INPUT_START; + static INPUT_MOVE = INPUT_MOVE; + static INPUT_END = INPUT_END; + static INPUT_CANCEL = INPUT_CANCEL; + static STATE_POSSIBLE = STATE_POSSIBLE; + static STATE_BEGAN = STATE_BEGAN; + static STATE_CHANGED = STATE_CHANGED; + static STATE_ENDED = STATE_ENDED; + static STATE_RECOGNIZED = STATE_RECOGNIZED; + static STATE_CANCELLED = STATE_CANCELLED; + static STATE_FAILED = STATE_FAILED; + static Manager = Manager; + static Input = Input; + static TouchAction = TouchAction; + static TouchInput = TouchInput; + static MouseInput = MouseInput; + static PointerEventInput = PointerEventInput; + static TouchMouseInput = TouchMouseInput; + static SingleTouchInput = SingleTouchInput; + static Recognizer = Recognizer; + static AttrRecognizer = AttrRecognizer; + static Tap = TapRecognizer; + static Pan = PanRecognizer; + static Swipe = SwipeRecognizer; + static Pinch = PinchRecognizer; + static Rotate = RotateRecognizer; + static Press = PressRecognizer; + static on = addEventListeners; + static off = removeEventListeners; + static each = each; + static merge = merge; + static extend = extend; + static bindFn = bindFn; + static assign = assign; + static inherit = inherit; + static bindFn = bindFn; + static prefixed = prefixed; + static toArray = toArray; + static inArray = inArray; + static uniqueArray = uniqueArray; + static splitStr = splitStr; + static boolOrFn = boolOrFn; + static hasParent = hasParent; + static addEventListeners = addEventListeners; + static removeEventListeners = removeEventListeners; + static defaults = defaults; + constructor(element, options = {}) { + return new Manager(element, { + recognizers: [ + // RecognizerClass, options, [recognizeWith, ...], [requireFailure, ...] + [RotateRecognizer, { enable: false }], + [PinchRecognizer, { enable: false }, ['rotate']], + [SwipeRecognizer, { direction: DIRECTION_HORIZONTAL }], + [PanRecognizer, { direction: DIRECTION_HORIZONTAL }, ['swipe']], + [TapRecognizer], + [TapRecognizer, { event: 'doubletap', taps: 2 }, ['tap']], + [PressRecognizer] + ], + ...options, + }); + } +} diff --git a/node_modules/@egjs/hammerjs/src/browser.js b/node_modules/@egjs/hammerjs/src/browser.js new file mode 100644 index 0000000000000000000000000000000000000000..c86281f6fbbbc36b554f1115793507cd0edf920a --- /dev/null +++ b/node_modules/@egjs/hammerjs/src/browser.js @@ -0,0 +1,13 @@ +/* eslint-disable no-new-func, no-nested-ternary */ + +let win; + +if (typeof window === "undefined") { + // window is undefined in node.js + win = {}; +} else { + win = window; +} +/* eslint-enable no-new-func, no-nested-ternary */ + +export {win as window}; diff --git a/node_modules/@egjs/hammerjs/src/defaults.js b/node_modules/@egjs/hammerjs/src/defaults.js new file mode 100644 index 0000000000000000000000000000000000000000..10a06afc3b0ac8a176d9235f9b92b3ca438ad0a4 --- /dev/null +++ b/node_modules/@egjs/hammerjs/src/defaults.js @@ -0,0 +1,113 @@ +import { TOUCH_ACTION_COMPUTE } from "./touchactionjs/touchaction-Consts"; + +export default { + /** + * @private + * set if DOM events are being triggered. + * But this is slower and unused by simple implementations, so disabled by default. + * @type {Boolean} + * @default false + */ + domEvents: false, + + /** + * @private + * The value for the touchAction property/fallback. + * When set to `compute` it will magically set the correct value based on the added recognizers. + * @type {String} + * @default compute + */ + touchAction: TOUCH_ACTION_COMPUTE, + + /** + * @private + * @type {Boolean} + * @default true + */ + enable: true, + + /** + * @private + * EXPERIMENTAL FEATURE -- can be removed/changed + * Change the parent input target element. + * If Null, then it is being set the to main element. + * @type {Null|EventTarget} + * @default null + */ + inputTarget: null, + + /** + * @private + * force an input class + * @type {Null|Function} + * @default null + */ + inputClass: null, + + /** + * @private + * Default recognizer setup when calling `Hammer()` + * When creating a new Manager these will be skipped. + * @type {Array} + */ + preset: [], + + /** + * @private + * Some CSS properties can be used to improve the working of Hammer. + * Add them to this method and they will be set when creating a new Manager. + * @namespace + */ + cssProps: { + /** + * @private + * Disables text selection to improve the dragging gesture. Mainly for desktop browsers. + * @type {String} + * @default 'none' + */ + userSelect: "none", + + /** + * @private + * Disable the Windows Phone grippers when pressing an element. + * @type {String} + * @default 'none' + */ + touchSelect: "none", + + /** + * @private + * Disables the default callout shown when you touch and hold a touch target. + * On iOS, when you touch and hold a touch target such as a link, Safari displays + * a callout containing information about the link. This property allows you to disable that callout. + * @type {String} + * @default 'none' + */ + touchCallout: "none", + + /** + * @private + * Specifies whether zooming is enabled. Used by IE10> + * @type {String} + * @default 'none' + */ + contentZooming: "none", + + /** + * @private + * Specifies that an entire element should be draggable instead of its contents. Mainly for desktop browsers. + * @type {String} + * @default 'none' + */ + userDrag: "none", + + /** + * @private + * Overrides the highlight color shown when the user taps a link or a JavaScript + * clickable element in iOS. This property obeys the alpha value, if specified. + * @type {String} + * @default 'rgba(0,0,0,0)' + */ + tapHighlightColor: "rgba(0,0,0,0)", + }, +}; diff --git a/node_modules/@egjs/hammerjs/src/hammer.d.ts b/node_modules/@egjs/hammerjs/src/hammer.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..792d3a64248f9a11a950727fcb03b0c913100b1a --- /dev/null +++ b/node_modules/@egjs/hammerjs/src/hammer.d.ts @@ -0,0 +1,50 @@ +import * as Hammer from "hammerjs"; + +export default Hammer; +export { + INPUT_START, + INPUT_MOVE, + INPUT_END, + INPUT_CANCEL, + STATE_POSSIBLE, + STATE_BEGAN, + STATE_CHANGED, + STATE_ENDED, + STATE_RECOGNIZED, + STATE_CANCELLED, + STATE_FAILED, + + DIRECTION_NONE, + DIRECTION_LEFT, + DIRECTION_RIGHT, + DIRECTION_UP, + DIRECTION_DOWN, + DIRECTION_HORIZONTAL, + DIRECTION_VERTICAL, + DIRECTION_ALL, + Manager, + Input, + TouchAction, + TouchInput, + MouseInput, + PointerEventInput, + TouchMouseInput, + SingleTouchInput, + Recognizer, + AttrRecognizer, + Tap, + Pan, + Swipe, + Pinch, + Rotate, + Press, + on, + off, + each, + merge, + extend, + inherit, + bindFn, + prefixed, + defaults, +} from "hammerjs"; diff --git a/node_modules/@egjs/hammerjs/src/index.js b/node_modules/@egjs/hammerjs/src/index.js new file mode 100644 index 0000000000000000000000000000000000000000..f7485a5d65a4035f6a16a8192152ead03226ec20 --- /dev/null +++ b/node_modules/@egjs/hammerjs/src/index.js @@ -0,0 +1,122 @@ + +import Hammer from "./Hammer"; +import assign from "./utils/assign"; +import defaults from "./defaults"; + +import { + INPUT_START, + INPUT_MOVE, + INPUT_END, + INPUT_CANCEL, + DIRECTION_NONE, + DIRECTION_LEFT, + DIRECTION_RIGHT, + DIRECTION_UP, + DIRECTION_DOWN, + DIRECTION_HORIZONTAL, + DIRECTION_VERTICAL, + DIRECTION_ALL, +} from "./inputjs/input-consts"; +import { + STATE_POSSIBLE, + STATE_BEGAN, + STATE_CHANGED, + STATE_ENDED, + STATE_RECOGNIZED, + STATE_CANCELLED, + STATE_FAILED, +} from "./recognizerjs/recognizer-consts"; + +import Manager from "./manager"; +import Input from "./inputjs/input-constructor"; +import TouchAction from "./touchactionjs/touchaction-constructor"; +import TouchInput from "./input/touch"; +import MouseInput from "./input/mouse"; +import PointerEventInput from "./input/pointerevent"; +import SingleTouchInput from "./input/singletouch"; +import TouchMouseInput from "./input/touchmouse"; + +import Recognizer from "./recognizerjs/recognizer-constructor"; +import AttrRecognizer from "./recognizers/attribute"; +import TapRecognizer from "./recognizers/tap"; +import PanRecognizer from "./recognizers/pan"; +import SwipeRecognizer from "./recognizers/swipe"; +import PinchRecognizer from "./recognizers/pinch"; +import RotateRecognizer from "./recognizers/rotate"; +import PressRecognizer from "./recognizers/press"; + +import addEventListeners from "./utils/add-event-listeners"; +import removeEventListeners from "./utils/remove-event-listeners"; +import each from "./utils/each"; +import merge from "./utils/merge"; +import extend from "./utils/extend"; +import inherit from "./utils/inherit"; +import bindFn from "./utils/bind-fn"; +import prefixed from "./utils/prefixed"; +import toArray from "./utils/to-array"; +import uniqueArray from "./utils/unique-array"; +import splitStr from "./utils/split-str"; +import inArray from "./utils/in-array"; +import boolOrFn from "./utils/bool-or-fn"; +import hasParent from "./utils/has-parent"; + +// this prevents errors when Hammer is loaded in the presence of an AMD +// style loader but by script tag, not by the loader. + +export { + Hammer as default, + INPUT_START, + INPUT_MOVE, + INPUT_END, + INPUT_CANCEL, + STATE_POSSIBLE, + STATE_BEGAN, + STATE_CHANGED, + STATE_ENDED, + STATE_RECOGNIZED, + STATE_CANCELLED, + STATE_FAILED, + + DIRECTION_NONE, + DIRECTION_LEFT, + DIRECTION_RIGHT, + DIRECTION_UP, + DIRECTION_DOWN, + DIRECTION_HORIZONTAL, + DIRECTION_VERTICAL, + DIRECTION_ALL, + Manager, + Input, + TouchAction, + TouchInput, + MouseInput, + PointerEventInput, + TouchMouseInput, + SingleTouchInput, + Recognizer, + AttrRecognizer, + TapRecognizer as Tap, + PanRecognizer as Pan, + SwipeRecognizer as Swipe, + PinchRecognizer as Pinch, + RotateRecognizer as Rotate, + PressRecognizer as Press, + addEventListeners as on, + removeEventListeners as off, + each, + merge, + extend, + assign, + inherit, + bindFn, + prefixed, + toArray, + inArray, + uniqueArray, + splitStr, + boolOrFn, + hasParent, + addEventListeners, + removeEventListeners, + defaults, +}; diff --git a/node_modules/@egjs/hammerjs/src/input/mouse.js b/node_modules/@egjs/hammerjs/src/input/mouse.js new file mode 100644 index 0000000000000000000000000000000000000000..bf7df7549e069af327b12f2e259f86f8aab23908 --- /dev/null +++ b/node_modules/@egjs/hammerjs/src/input/mouse.js @@ -0,0 +1,67 @@ +import { + INPUT_START, + INPUT_MOVE, + INPUT_END, + INPUT_TYPE_MOUSE +} from '../inputjs/input-consts'; +import Input from '../inputjs/input-constructor'; + +const MOUSE_INPUT_MAP = { + mousedown: INPUT_START, + mousemove: INPUT_MOVE, + mouseup: INPUT_END +}; + +const MOUSE_ELEMENT_EVENTS = 'mousedown'; +const MOUSE_WINDOW_EVENTS = 'mousemove mouseup'; + +/** + * @private + * Mouse events input + * @constructor + * @extends Input + */ +export default class MouseInput extends Input { + constructor() { + var proto = MouseInput.prototype; + proto.evEl = MOUSE_ELEMENT_EVENTS; + proto.evWin = MOUSE_WINDOW_EVENTS; + + super(...arguments); + this.pressed = false; // mousedown state + } + + /** + * @private + * handle mouse events + * @param {Object} ev + */ + handler(ev) { + let eventType = MOUSE_INPUT_MAP[ev.type]; + + // on start we want to have the left mouse button down + if (eventType & INPUT_START && ev.button === 0) { + this.pressed = true; + } + + if (eventType & INPUT_MOVE && ev.which !== 1) { + eventType = INPUT_END; + } + + // mouse must be down + if (!this.pressed) { + return; + } + + if (eventType & INPUT_END) { + this.pressed = false; + } + + this.callback(this.manager, eventType, { + pointers: [ev], + changedPointers: [ev], + pointerType: INPUT_TYPE_MOUSE, + srcEvent: ev + }); + } +} diff --git a/node_modules/@egjs/hammerjs/src/input/pointerevent.js b/node_modules/@egjs/hammerjs/src/input/pointerevent.js new file mode 100644 index 0000000000000000000000000000000000000000..6339324f82febbd42f1f3f715fb62428c9bcface --- /dev/null +++ b/node_modules/@egjs/hammerjs/src/input/pointerevent.js @@ -0,0 +1,104 @@ +import { + INPUT_START, + INPUT_END, + INPUT_CANCEL, + INPUT_MOVE, + INPUT_TYPE_TOUCH, + INPUT_TYPE_MOUSE, + INPUT_TYPE_PEN, + INPUT_TYPE_KINECT +} from '../inputjs/input-consts'; +import {window} from "../browser"; +import Input from '../inputjs/input-constructor'; +import inArray from '../utils/in-array'; + +const POINTER_INPUT_MAP = { + pointerdown: INPUT_START, + pointermove: INPUT_MOVE, + pointerup: INPUT_END, + pointercancel: INPUT_CANCEL, + pointerout: INPUT_CANCEL +}; + +// in IE10 the pointer types is defined as an enum +const IE10_POINTER_TYPE_ENUM = { + 2: INPUT_TYPE_TOUCH, + 3: INPUT_TYPE_PEN, + 4: INPUT_TYPE_MOUSE, + 5: INPUT_TYPE_KINECT // see https://twitter.com/jacobrossi/status/480596438489890816 +}; + +let POINTER_ELEMENT_EVENTS = 'pointerdown'; +let POINTER_WINDOW_EVENTS = 'pointermove pointerup pointercancel'; + +// IE10 has prefixed support, and case-sensitive +if (window.MSPointerEvent && !window.PointerEvent) { + POINTER_ELEMENT_EVENTS = 'MSPointerDown'; + POINTER_WINDOW_EVENTS = 'MSPointerMove MSPointerUp MSPointerCancel'; +} + +/** + * @private + * Pointer events input + * @constructor + * @extends Input + */ +export default class PointerEventInput extends Input { + constructor() { + var proto = PointerEventInput.prototype; + + proto.evEl = POINTER_ELEMENT_EVENTS; + proto.evWin = POINTER_WINDOW_EVENTS; + super(...arguments); + this.store = (this.manager.session.pointerEvents = []); + } + + /** + * @private + * handle mouse events + * @param {Object} ev + */ + handler(ev) { + let { store } = this; + let removePointer = false; + + let eventTypeNormalized = ev.type.toLowerCase().replace('ms', ''); + let eventType = POINTER_INPUT_MAP[eventTypeNormalized]; + let pointerType = IE10_POINTER_TYPE_ENUM[ev.pointerType] || ev.pointerType; + + let isTouch = (pointerType === INPUT_TYPE_TOUCH); + + // get index of the event in the store + let storeIndex = inArray(store, ev.pointerId, 'pointerId'); + + // start and mouse must be down + if (eventType & INPUT_START && (ev.button === 0 || isTouch)) { + if (storeIndex < 0) { + store.push(ev); + storeIndex = store.length - 1; + } + } else if (eventType & (INPUT_END | INPUT_CANCEL)) { + removePointer = true; + } + + // it not found, so the pointer hasn't been down (so it's probably a hover) + if (storeIndex < 0) { + return; + } + + // update the event in the store + store[storeIndex] = ev; + + this.callback(this.manager, eventType, { + pointers: store, + changedPointers: [ev], + pointerType, + srcEvent: ev + }); + + if (removePointer) { + // remove from the store + store.splice(storeIndex, 1); + } + } +} diff --git a/node_modules/@egjs/hammerjs/src/input/singletouch.js b/node_modules/@egjs/hammerjs/src/input/singletouch.js new file mode 100644 index 0000000000000000000000000000000000000000..af9f97d51e96f2631ccafb3d0c1bc441bcf2bf91 --- /dev/null +++ b/node_modules/@egjs/hammerjs/src/input/singletouch.js @@ -0,0 +1,82 @@ +import { + INPUT_START, + INPUT_MOVE, + INPUT_END, + INPUT_CANCEL, + INPUT_TYPE_TOUCH +} from '../inputjs/input-consts'; +import Input from '../inputjs/input-constructor'; +import toArray from '../utils/to-array'; +import uniqueArray from '../utils/unique-array'; + +const SINGLE_TOUCH_INPUT_MAP = { + touchstart: INPUT_START, + touchmove: INPUT_MOVE, + touchend: INPUT_END, + touchcancel: INPUT_CANCEL +}; + +const SINGLE_TOUCH_TARGET_EVENTS = 'touchstart'; +const SINGLE_TOUCH_WINDOW_EVENTS = 'touchstart touchmove touchend touchcancel'; + +/** + * @private + * Touch events input + * @constructor + * @extends Input + */ +export default class SingleTouchInput extends Input { + constructor() { + var proto = SingleTouchInput.prototype; + proto.evTarget = SINGLE_TOUCH_TARGET_EVENTS; + proto.evWin = SINGLE_TOUCH_WINDOW_EVENTS; + + super(...arguments); + this.started = false; + } + + handler(ev) { + let type = SINGLE_TOUCH_INPUT_MAP[ev.type]; + + // should we handle the touch events? + if (type === INPUT_START) { + this.started = true; + } + + if (!this.started) { + return; + } + + let touches = normalizeSingleTouches.call(this, ev, type); + + // when done, reset the started state + if (type & (INPUT_END | INPUT_CANCEL) && touches[0].length - touches[1].length === 0) { + this.started = false; + } + + this.callback(this.manager, type, { + pointers: touches[0], + changedPointers: touches[1], + pointerType: INPUT_TYPE_TOUCH, + srcEvent: ev + }); + } +} + +/** + * @private + * @this {TouchInput} + * @param {Object} ev + * @param {Number} type flag + * @returns {undefined|Array} [all, changed] + */ +function normalizeSingleTouches(ev, type) { + let all = toArray(ev.touches); + let changed = toArray(ev.changedTouches); + + if (type & (INPUT_END | INPUT_CANCEL)) { + all = uniqueArray(all.concat(changed), 'identifier', true); + } + + return [all, changed]; +} diff --git a/node_modules/@egjs/hammerjs/src/input/touch.js b/node_modules/@egjs/hammerjs/src/input/touch.js new file mode 100644 index 0000000000000000000000000000000000000000..e8302f6ecb52c7909dff4bdea75572564bb68356 --- /dev/null +++ b/node_modules/@egjs/hammerjs/src/input/touch.js @@ -0,0 +1,111 @@ +import { + INPUT_START, + INPUT_MOVE, + INPUT_END, + INPUT_CANCEL, + INPUT_TYPE_TOUCH +} from '../inputjs/input-consts'; +import Input from '../inputjs/input-constructor'; +import toArray from '../utils/to-array'; +import hasParent from '../utils/has-parent'; +import uniqueArray from '../utils/unique-array'; + +const TOUCH_INPUT_MAP = { + touchstart: INPUT_START, + touchmove: INPUT_MOVE, + touchend: INPUT_END, + touchcancel: INPUT_CANCEL +}; + +const TOUCH_TARGET_EVENTS = 'touchstart touchmove touchend touchcancel'; + +/** + * @private + * Multi-user touch events input + * @constructor + * @extends Input + */ +export default class TouchInput extends Input { + constructor() { + TouchInput.prototype.evTarget = TOUCH_TARGET_EVENTS; + super(...arguments); + this.targetIds = {}; + // this.evTarget = TOUCH_TARGET_EVENTS; + } + handler(ev) { + let type = TOUCH_INPUT_MAP[ev.type]; + let touches = getTouches.call(this, ev, type); + if (!touches) { + return; + } + + this.callback(this.manager, type, { + pointers: touches[0], + changedPointers: touches[1], + pointerType: INPUT_TYPE_TOUCH, + srcEvent: ev + }); + } +} + +/** + * @private + * @this {TouchInput} + * @param {Object} ev + * @param {Number} type flag + * @returns {undefined|Array} [all, changed] + */ +function getTouches(ev, type) { + let allTouches = toArray(ev.touches); + let { targetIds } = this; + + // when there is only one touch, the process can be simplified + if (type & (INPUT_START | INPUT_MOVE) && allTouches.length === 1) { + targetIds[allTouches[0].identifier] = true; + return [allTouches, allTouches]; + } + + let i; + let targetTouches; + let changedTouches = toArray(ev.changedTouches); + let changedTargetTouches = []; + let { target } = this; + + // get target touches from touches + targetTouches = allTouches.filter((touch) => { + return hasParent(touch.target, target); + }); + + // collect touches + if (type === INPUT_START) { + i = 0; + while (i < targetTouches.length) { + targetIds[targetTouches[i].identifier] = true; + i++; + } + } + + // filter changed touches to only contain touches that exist in the collected target ids + i = 0; + while (i < changedTouches.length) { + if (targetIds[changedTouches[i].identifier]) { + changedTargetTouches.push(changedTouches[i]); + } + + // cleanup removed touches + if (type & (INPUT_END | INPUT_CANCEL)) { + delete targetIds[changedTouches[i].identifier]; + } + i++; + } + + if (!changedTargetTouches.length) { + return; + } + + return [ + // merge targetTouches with changedTargetTouches so it contains ALL touches, including 'end' and 'cancel' + uniqueArray(targetTouches.concat(changedTargetTouches), 'identifier', true), + changedTargetTouches + ]; +} diff --git a/node_modules/@egjs/hammerjs/src/input/touchmouse.js b/node_modules/@egjs/hammerjs/src/input/touchmouse.js new file mode 100644 index 0000000000000000000000000000000000000000..194ed13af932720b379e6f7fb952a878a3727aaf --- /dev/null +++ b/node_modules/@egjs/hammerjs/src/input/touchmouse.js @@ -0,0 +1,117 @@ +import Input from "../inputjs/input-constructor"; +import TouchInput from "./touch"; +import MouseInput from "./mouse"; +import { + INPUT_START, + INPUT_END, + INPUT_CANCEL, + INPUT_TYPE_TOUCH, + INPUT_TYPE_MOUSE, +} from "../inputjs/input-consts"; + +/** + * @private + * Combined touch and mouse input + * + * Touch has a higher priority then mouse, and while touching no mouse events are allowed. + * This because touch devices also emit mouse events while doing a touch. + * + * @constructor + * @extends Input + */ + +const DEDUP_TIMEOUT = 2500; +const DEDUP_DISTANCE = 25; + +function setLastTouch(eventData) { + const { changedPointers: [touch] } = eventData; + + if (touch.identifier === this.primaryTouch) { + const lastTouch = { x: touch.clientX, y: touch.clientY }; + const lts = this.lastTouches; + + this.lastTouches.push(lastTouch); + + + const removeLastTouch = function() { + const i = lts.indexOf(lastTouch); + + if (i > -1) { + lts.splice(i, 1); + } + }; + + setTimeout(removeLastTouch, DEDUP_TIMEOUT); + } +} + + +function recordTouches(eventType, eventData) { + if (eventType & INPUT_START) { + this.primaryTouch = eventData.changedPointers[0].identifier; + setLastTouch.call(this, eventData); + } else if (eventType & (INPUT_END | INPUT_CANCEL)) { + setLastTouch.call(this, eventData); + } +} +function isSyntheticEvent(eventData) { + const x = eventData.srcEvent.clientX; + const y = eventData.srcEvent.clientY; + + for (let i = 0; i < this.lastTouches.length; i++) { + const t = this.lastTouches[i]; + const dx = Math.abs(x - t.x); + const dy = Math.abs(y - t.y); + + if (dx <= DEDUP_DISTANCE && dy <= DEDUP_DISTANCE) { + return true; + } + } + return false; +} + + +export default class TouchMouseInput extends Input { + constructor(manager, callback) { + super(manager, callback); + + this.touch = new TouchInput(this.manager, this.handler); + this.mouse = new MouseInput(this.manager, this.handler); + this.primaryTouch = null; + this.lastTouches = []; + } + + /** + * @private + * handle mouse and touch events + * @param {Hammer} manager + * @param {String} inputEvent + * @param {Object} inputData + */ + handler = (manager, inputEvent, inputData) => { + const isTouch = (inputData.pointerType === INPUT_TYPE_TOUCH); + const isMouse = (inputData.pointerType === INPUT_TYPE_MOUSE); + + if (isMouse && inputData.sourceCapabilities && inputData.sourceCapabilities.firesTouchEvents) { + return; + } + + // when we're in a touch event, record touches to de-dupe synthetic mouse event + if (isTouch) { + recordTouches.call(this, inputEvent, inputData); + } else if (isMouse && isSyntheticEvent.call(this, inputData)) { + return; + } + + this.callback(manager, inputEvent, inputData); + } + + /** + * @private + * remove the event listeners + */ + destroy() { + this.touch.destroy(); + this.mouse.destroy(); + } +} diff --git a/node_modules/@egjs/hammerjs/src/inputjs/compute-delta-xy.js b/node_modules/@egjs/hammerjs/src/inputjs/compute-delta-xy.js new file mode 100644 index 0000000000000000000000000000000000000000..fefb5bd41d0d6e7db7955fcf98f6b291b2208df8 --- /dev/null +++ b/node_modules/@egjs/hammerjs/src/inputjs/compute-delta-xy.js @@ -0,0 +1,25 @@ +import { INPUT_START, INPUT_END } from './input-consts'; + +export default function computeDeltaXY(session, input) { + let { center } = input; + // let { offsetDelta:offset = {}, prevDelta = {}, prevInput = {} } = session; + // jscs throwing error on defalut destructured values and without defaults tests fail + let offset = session.offsetDelta || {}; + let prevDelta = session.prevDelta || {}; + let prevInput = session.prevInput || {}; + + if (input.eventType === INPUT_START || prevInput.eventType === INPUT_END) { + prevDelta = session.prevDelta = { + x: prevInput.deltaX || 0, + y: prevInput.deltaY || 0 + }; + + offset = session.offsetDelta = { + x: center.x, + y: center.y + }; + } + + input.deltaX = prevDelta.x + (center.x - offset.x); + input.deltaY = prevDelta.y + (center.y - offset.y); +} diff --git a/node_modules/@egjs/hammerjs/src/inputjs/compute-input-data.js b/node_modules/@egjs/hammerjs/src/inputjs/compute-input-data.js new file mode 100644 index 0000000000000000000000000000000000000000..73b26940cef98653589442230a1cdaf5f99ca63e --- /dev/null +++ b/node_modules/@egjs/hammerjs/src/inputjs/compute-input-data.js @@ -0,0 +1,70 @@ +import { now } from '../utils/utils-consts'; +import { abs } from '../utils/utils-consts'; +import hasParent from '../utils/has-parent'; +import simpleCloneInputData from './simple-clone-input-data'; +import getCenter from './get-center'; +import getDistance from './get-distance'; +import getAngle from './get-angle'; +import getDirection from './get-direction'; +import computeDeltaXY from './compute-delta-xy'; +import getVelocity from './get-velocity'; +import getScale from './get-scale'; +import getRotation from './get-rotation'; +import computeIntervalInputData from './compute-interval-input-data'; + +/** +* @private + * extend the data with some usable properties like scale, rotate, velocity etc + * @param {Object} manager + * @param {Object} input + */ +export default function computeInputData(manager, input) { + let { session } = manager; + let { pointers } = input; + let { length:pointersLength } = pointers; + + // store the first input to calculate the distance and direction + if (!session.firstInput) { + session.firstInput = simpleCloneInputData(input); + } + + // to compute scale and rotation we need to store the multiple touches + if (pointersLength > 1 && !session.firstMultiple) { + session.firstMultiple = simpleCloneInputData(input); + } else if (pointersLength === 1) { + session.firstMultiple = false; + } + + let { firstInput, firstMultiple } = session; + let offsetCenter = firstMultiple ? firstMultiple.center : firstInput.center; + + let center = input.center = getCenter(pointers); + input.timeStamp = now(); + input.deltaTime = input.timeStamp - firstInput.timeStamp; + + input.angle = getAngle(offsetCenter, center); + input.distance = getDistance(offsetCenter, center); + + computeDeltaXY(session, input); + input.offsetDirection = getDirection(input.deltaX, input.deltaY); + + let overallVelocity = getVelocity(input.deltaTime, input.deltaX, input.deltaY); + input.overallVelocityX = overallVelocity.x; + input.overallVelocityY = overallVelocity.y; + input.overallVelocity = (abs(overallVelocity.x) > abs(overallVelocity.y)) ? overallVelocity.x : overallVelocity.y; + + input.scale = firstMultiple ? getScale(firstMultiple.pointers, pointers) : 1; + input.rotation = firstMultiple ? getRotation(firstMultiple.pointers, pointers) : 0; + + input.maxPointers = !session.prevInput ? input.pointers.length : ((input.pointers.length > + session.prevInput.maxPointers) ? input.pointers.length : session.prevInput.maxPointers); + + computeIntervalInputData(session, input); + + // find the correct target + let target = manager.element; + if (hasParent(input.srcEvent.target, target)) { + target = input.srcEvent.target; + } + input.target = target; +} diff --git a/node_modules/@egjs/hammerjs/src/inputjs/compute-interval-input-data.js b/node_modules/@egjs/hammerjs/src/inputjs/compute-interval-input-data.js new file mode 100644 index 0000000000000000000000000000000000000000..eb5746a31f97f5c37d57300faa83d3c7534ff541 --- /dev/null +++ b/node_modules/@egjs/hammerjs/src/inputjs/compute-interval-input-data.js @@ -0,0 +1,43 @@ +import { INPUT_CANCEL,COMPUTE_INTERVAL } from './input-consts'; +import { abs } from '../utils/utils-consts'; +import getVelocity from './get-velocity'; +import getDirection from './get-direction'; + +/** + * @private + * velocity is calculated every x ms + * @param {Object} session + * @param {Object} input + */ +export default function computeIntervalInputData(session, input) { + let last = session.lastInterval || input; + let deltaTime = input.timeStamp - last.timeStamp; + let velocity; + let velocityX; + let velocityY; + let direction; + + if (input.eventType !== INPUT_CANCEL && (deltaTime > COMPUTE_INTERVAL || last.velocity === undefined)) { + let deltaX = input.deltaX - last.deltaX; + let deltaY = input.deltaY - last.deltaY; + + let v = getVelocity(deltaTime, deltaX, deltaY); + velocityX = v.x; + velocityY = v.y; + velocity = (abs(v.x) > abs(v.y)) ? v.x : v.y; + direction = getDirection(deltaX, deltaY); + + session.lastInterval = input; + } else { + // use latest velocity info if it doesn't overtake a minimum period + velocity = last.velocity; + velocityX = last.velocityX; + velocityY = last.velocityY; + direction = last.direction; + } + + input.velocity = velocity; + input.velocityX = velocityX; + input.velocityY = velocityY; + input.direction = direction; +} diff --git a/node_modules/@egjs/hammerjs/src/inputjs/create-input-instance.js b/node_modules/@egjs/hammerjs/src/inputjs/create-input-instance.js new file mode 100644 index 0000000000000000000000000000000000000000..977dc05a10cf1040bde681486e7cabfeb866cb71 --- /dev/null +++ b/node_modules/@egjs/hammerjs/src/inputjs/create-input-instance.js @@ -0,0 +1,31 @@ +import { SUPPORT_POINTER_EVENTS,SUPPORT_ONLY_TOUCH,SUPPORT_TOUCH } from './input-consts'; +import inputHandler from './input-handler'; +import PointerEventInput from '../input/pointerevent'; +import TouchInput from '../input/touch'; +import MouseInput from '../input/mouse'; +import TouchMouseInput from '../input/touchmouse'; + +/** + * @private + * create new input type manager + * called by the Manager constructor + * @param {Hammer} manager + * @returns {Input} + */ +export default function createInputInstance(manager) { + let Type; + // let inputClass = manager.options.inputClass; + let { options:{ inputClass } } = manager; + if (inputClass) { + Type = inputClass; + } else if (SUPPORT_POINTER_EVENTS) { + Type = PointerEventInput; + } else if (SUPPORT_ONLY_TOUCH) { + Type = TouchInput; + } else if (!SUPPORT_TOUCH) { + Type = MouseInput; + } else { + Type = TouchMouseInput; + } + return new (Type)(manager, inputHandler); +} diff --git a/node_modules/@egjs/hammerjs/src/inputjs/get-angle.js b/node_modules/@egjs/hammerjs/src/inputjs/get-angle.js new file mode 100644 index 0000000000000000000000000000000000000000..0015c23aa872cc7ca3ad9bc3491d3c785177a301 --- /dev/null +++ b/node_modules/@egjs/hammerjs/src/inputjs/get-angle.js @@ -0,0 +1,18 @@ +import { PROPS_XY } from './input-consts'; + +/** + * @private + * calculate the angle between two coordinates + * @param {Object} p1 + * @param {Object} p2 + * @param {Array} [props] containing x and y keys + * @return {Number} angle + */ +export default function getAngle(p1, p2, props) { + if (!props) { + props = PROPS_XY; + } + let x = p2[props[0]] - p1[props[0]]; + let y = p2[props[1]] - p1[props[1]]; + return Math.atan2(y, x) * 180 / Math.PI; +} diff --git a/node_modules/@egjs/hammerjs/src/inputjs/get-center.js b/node_modules/@egjs/hammerjs/src/inputjs/get-center.js new file mode 100644 index 0000000000000000000000000000000000000000..225b1ec07e4ffa7ecdcf2a474c48ea37ac2a8d2c --- /dev/null +++ b/node_modules/@egjs/hammerjs/src/inputjs/get-center.js @@ -0,0 +1,33 @@ +import { round } from '../utils/utils-consts'; + +/** + * @private + * get the center of all the pointers + * @param {Array} pointers + * @return {Object} center contains `x` and `y` properties + */ +export default function getCenter(pointers) { + let pointersLength = pointers.length; + + // no need to loop when only one touch + if (pointersLength === 1) { + return { + x: round(pointers[0].clientX), + y: round(pointers[0].clientY) + }; + } + + let x = 0; + let y = 0; + let i = 0; + while (i < pointersLength) { + x += pointers[i].clientX; + y += pointers[i].clientY; + i++; + } + + return { + x: round(x / pointersLength), + y: round(y / pointersLength) + }; +} diff --git a/node_modules/@egjs/hammerjs/src/inputjs/get-direction.js b/node_modules/@egjs/hammerjs/src/inputjs/get-direction.js new file mode 100644 index 0000000000000000000000000000000000000000..cf577a888d74f14d276b443087f1915d889b56db --- /dev/null +++ b/node_modules/@egjs/hammerjs/src/inputjs/get-direction.js @@ -0,0 +1,20 @@ +import { abs } from '../utils/utils-consts'; +import { DIRECTION_NONE,DIRECTION_LEFT,DIRECTION_RIGHT,DIRECTION_UP,DIRECTION_DOWN } from './input-consts'; + +/** + * @private + * get the direction between two points + * @param {Number} x + * @param {Number} y + * @return {Number} direction + */ +export default function getDirection(x, y) { + if (x === y) { + return DIRECTION_NONE; + } + + if (abs(x) >= abs(y)) { + return x < 0 ? DIRECTION_LEFT : DIRECTION_RIGHT; + } + return y < 0 ? DIRECTION_UP : DIRECTION_DOWN; +} diff --git a/node_modules/@egjs/hammerjs/src/inputjs/get-distance.js b/node_modules/@egjs/hammerjs/src/inputjs/get-distance.js new file mode 100644 index 0000000000000000000000000000000000000000..066ea89c67b06ae13331d13e0e974fbcbdb232c5 --- /dev/null +++ b/node_modules/@egjs/hammerjs/src/inputjs/get-distance.js @@ -0,0 +1,19 @@ +import { PROPS_XY } from './input-consts'; + +/** + * @private + * calculate the absolute distance between two points + * @param {Object} p1 {x, y} + * @param {Object} p2 {x, y} + * @param {Array} [props] containing x and y keys + * @return {Number} distance + */ +export default function getDistance(p1, p2, props) { + if (!props) { + props = PROPS_XY; + } + let x = p2[props[0]] - p1[props[0]]; + let y = p2[props[1]] - p1[props[1]]; + + return Math.sqrt((x * x) + (y * y)); +} diff --git a/node_modules/@egjs/hammerjs/src/inputjs/get-rotation.js b/node_modules/@egjs/hammerjs/src/inputjs/get-rotation.js new file mode 100644 index 0000000000000000000000000000000000000000..d507ae9da7eccad536dfe3b3e0f23c29bd217c46 --- /dev/null +++ b/node_modules/@egjs/hammerjs/src/inputjs/get-rotation.js @@ -0,0 +1,13 @@ +import getAngle from './get-angle'; +import { PROPS_CLIENT_XY } from './input-consts'; + +/** + * @private + * calculate the rotation degrees between two pointersets + * @param {Array} start array of pointers + * @param {Array} end array of pointers + * @return {Number} rotation + */ +export default function getRotation(start, end) { + return getAngle(end[1], end[0], PROPS_CLIENT_XY) + getAngle(start[1], start[0], PROPS_CLIENT_XY); +} diff --git a/node_modules/@egjs/hammerjs/src/inputjs/get-scale.js b/node_modules/@egjs/hammerjs/src/inputjs/get-scale.js new file mode 100644 index 0000000000000000000000000000000000000000..840e68388174e2368cd2f45c6580a012c1e59e9f --- /dev/null +++ b/node_modules/@egjs/hammerjs/src/inputjs/get-scale.js @@ -0,0 +1,13 @@ +import { PROPS_CLIENT_XY } from './input-consts'; +import getDistance from './get-distance'; +/** + * @private + * calculate the scale factor between two pointersets + * no scale is 1, and goes down to 0 when pinched together, and bigger when pinched out + * @param {Array} start array of pointers + * @param {Array} end array of pointers + * @return {Number} scale + */ +export default function getScale(start, end) { + return getDistance(end[0], end[1], PROPS_CLIENT_XY) / getDistance(start[0], start[1], PROPS_CLIENT_XY); +} diff --git a/node_modules/@egjs/hammerjs/src/inputjs/get-velocity.js b/node_modules/@egjs/hammerjs/src/inputjs/get-velocity.js new file mode 100644 index 0000000000000000000000000000000000000000..589a2d22264b24626f40f6328e6325f99d20504f --- /dev/null +++ b/node_modules/@egjs/hammerjs/src/inputjs/get-velocity.js @@ -0,0 +1,14 @@ +/** + * @private + * calculate the velocity between two points. unit is in px per ms. + * @param {Number} deltaTime + * @param {Number} x + * @param {Number} y + * @return {Object} velocity `x` and `y` + */ +export default function getVelocity(deltaTime, x, y) { + return { + x: x / deltaTime || 0, + y: y / deltaTime || 0 + }; +} diff --git a/node_modules/@egjs/hammerjs/src/inputjs/input-constructor.js b/node_modules/@egjs/hammerjs/src/inputjs/input-constructor.js new file mode 100644 index 0000000000000000000000000000000000000000..1a1caa9b059c47889970e0a62615e9c5b7ee22b9 --- /dev/null +++ b/node_modules/@egjs/hammerjs/src/inputjs/input-constructor.js @@ -0,0 +1,59 @@ +import boolOrFn from '../utils/bool-or-fn'; +import addEventListeners from '../utils/add-event-listeners'; +import removeEventListeners from '../utils/remove-event-listeners'; +import getWindowForElement from '../utils/get-window-for-element'; + +/** + * @private + * create new input type manager + * @param {Manager} manager + * @param {Function} callback + * @returns {Input} + * @constructor + */ +export default class Input { + constructor(manager, callback) { + let self = this; + this.manager = manager; + this.callback = callback; + this.element = manager.element; + this.target = manager.options.inputTarget; + + // smaller wrapper around the handler, for the scope and the enabled state of the manager, + // so when disabled the input events are completely bypassed. + this.domHandler = function(ev) { + if (boolOrFn(manager.options.enable, [manager])) { + self.handler(ev); + } + }; + + this.init(); + + } + /** + * @private + * should handle the inputEvent data and trigger the callback + * @virtual + */ + handler() { } + + /** + * @private + * bind the events + */ + init() { + this.evEl && addEventListeners(this.element, this.evEl, this.domHandler); + this.evTarget && addEventListeners(this.target, this.evTarget, this.domHandler); + this.evWin && addEventListeners(getWindowForElement(this.element), this.evWin, this.domHandler); + } + + /** + * @private + * unbind the events + */ + destroy() { + this.evEl && removeEventListeners(this.element, this.evEl, this.domHandler); + this.evTarget && removeEventListeners(this.target, this.evTarget, this.domHandler); + this.evWin && removeEventListeners(getWindowForElement(this.element), this.evWin, this.domHandler); + } +} diff --git a/node_modules/@egjs/hammerjs/src/inputjs/input-consts.js b/node_modules/@egjs/hammerjs/src/inputjs/input-consts.js new file mode 100644 index 0000000000000000000000000000000000000000..594c9828d251cc1cd697aa816ca4d002ad8479cc --- /dev/null +++ b/node_modules/@egjs/hammerjs/src/inputjs/input-consts.js @@ -0,0 +1,59 @@ +import prefixed from '../utils/prefixed'; +import {window} from "../browser"; + +const MOBILE_REGEX = /mobile|tablet|ip(ad|hone|od)|android/i; + +const SUPPORT_TOUCH = ('ontouchstart' in window); +const SUPPORT_POINTER_EVENTS = prefixed(window, 'PointerEvent') !== undefined; +const SUPPORT_ONLY_TOUCH = SUPPORT_TOUCH && MOBILE_REGEX.test(navigator.userAgent); + +const INPUT_TYPE_TOUCH = 'touch'; +const INPUT_TYPE_PEN = 'pen'; +const INPUT_TYPE_MOUSE = 'mouse'; +const INPUT_TYPE_KINECT = 'kinect'; + +const COMPUTE_INTERVAL = 25; + +const INPUT_START = 1; +const INPUT_MOVE = 2; +const INPUT_END = 4; +const INPUT_CANCEL = 8; + +const DIRECTION_NONE = 1; +const DIRECTION_LEFT = 2; +const DIRECTION_RIGHT = 4; +const DIRECTION_UP = 8; +const DIRECTION_DOWN = 16; + +const DIRECTION_HORIZONTAL = DIRECTION_LEFT | DIRECTION_RIGHT; +const DIRECTION_VERTICAL = DIRECTION_UP | DIRECTION_DOWN; +const DIRECTION_ALL = DIRECTION_HORIZONTAL | DIRECTION_VERTICAL; + +const PROPS_XY = ['x', 'y']; +const PROPS_CLIENT_XY = ['clientX', 'clientY']; + +export { + MOBILE_REGEX, + SUPPORT_ONLY_TOUCH, + SUPPORT_POINTER_EVENTS, + SUPPORT_TOUCH, + INPUT_TYPE_KINECT, + INPUT_TYPE_MOUSE, + INPUT_TYPE_PEN, + INPUT_TYPE_TOUCH, + COMPUTE_INTERVAL, + INPUT_START, + INPUT_MOVE, + INPUT_END, + INPUT_CANCEL, + DIRECTION_NONE, + DIRECTION_LEFT, + DIRECTION_RIGHT, + DIRECTION_UP, + DIRECTION_DOWN, + DIRECTION_HORIZONTAL, + DIRECTION_VERTICAL, + DIRECTION_ALL, + PROPS_XY, + PROPS_CLIENT_XY +}; diff --git a/node_modules/@egjs/hammerjs/src/inputjs/input-handler.js b/node_modules/@egjs/hammerjs/src/inputjs/input-handler.js new file mode 100644 index 0000000000000000000000000000000000000000..8c75d92c9cc27e1c04f58442a8e446d5c9f87186 --- /dev/null +++ b/node_modules/@egjs/hammerjs/src/inputjs/input-handler.js @@ -0,0 +1,36 @@ +import { INPUT_START,INPUT_END,INPUT_CANCEL } from './input-consts'; +import computeInputData from './compute-input-data'; + +/** + * @private + * handle input events + * @param {Manager} manager + * @param {String} eventType + * @param {Object} input + */ +export default function inputHandler(manager, eventType, input) { + let pointersLen = input.pointers.length; + let changedPointersLen = input.changedPointers.length; + let isFirst = (eventType & INPUT_START && (pointersLen - changedPointersLen === 0)); + let isFinal = (eventType & (INPUT_END | INPUT_CANCEL) && (pointersLen - changedPointersLen === 0)); + + input.isFirst = !!isFirst; + input.isFinal = !!isFinal; + + if (isFirst) { + manager.session = {}; + } + + // source event is the normalized value of the domEvents + // like 'touchstart, mouseup, pointerdown' + input.eventType = eventType; + + // compute scale, rotation etc + computeInputData(manager, input); + + // emit secret event + manager.emit('hammer.input', input); + + manager.recognize(input); + manager.session.prevInput = input; +} diff --git a/node_modules/@egjs/hammerjs/src/inputjs/simple-clone-input-data.js b/node_modules/@egjs/hammerjs/src/inputjs/simple-clone-input-data.js new file mode 100644 index 0000000000000000000000000000000000000000..270c531f34371d2205667c4ec52ecc6758eac780 --- /dev/null +++ b/node_modules/@egjs/hammerjs/src/inputjs/simple-clone-input-data.js @@ -0,0 +1,30 @@ +import { now,round } from '../utils/utils-consts'; +import getCenter from './get-center'; + +/** + * @private + * create a simple clone from the input used for storage of firstInput and firstMultiple + * @param {Object} input + * @returns {Object} clonedInputData + */ +export default function simpleCloneInputData(input) { + // make a simple copy of the pointers because we will get a reference if we don't + // we only need clientXY for the calculations + let pointers = []; + let i = 0; + while (i < input.pointers.length) { + pointers[i] = { + clientX: round(input.pointers[i].clientX), + clientY: round(input.pointers[i].clientY) + }; + i++; + } + + return { + timeStamp: now(), + pointers, + center: getCenter(pointers), + deltaX: input.deltaX, + deltaY: input.deltaY + }; +} diff --git a/node_modules/@egjs/hammerjs/src/manager.js b/node_modules/@egjs/hammerjs/src/manager.js new file mode 100644 index 0000000000000000000000000000000000000000..d6559def22b7e68199464b965ee405f773740522 --- /dev/null +++ b/node_modules/@egjs/hammerjs/src/manager.js @@ -0,0 +1,352 @@ +import assign from "./utils/assign"; +import TouchAction from "./touchactionjs/touchaction-constructor"; +import createInputInstance from "./inputjs/create-input-instance"; +import each from "./utils/each"; +import inArray from "./utils/in-array"; +import invokeArrayArg from "./utils/invoke-array-arg"; +import splitStr from "./utils/split-str"; +import prefixed from "./utils/prefixed"; +import Recognizer from "./recognizerjs/recognizer-constructor"; +import { + STATE_BEGAN, + STATE_ENDED, + STATE_CHANGED, + STATE_RECOGNIZED, +} from "./recognizerjs/recognizer-consts"; +import defaults from "./defaults"; + +const STOP = 1; +const FORCED_STOP = 2; + + +/** + * @private + * add/remove the css properties as defined in manager.options.cssProps + * @param {Manager} manager + * @param {Boolean} add + */ +function toggleCssProps(manager, add) { + const { element } = manager; + + if (!element.style) { + return; + } + let prop; + + each(manager.options.cssProps, (value, name) => { + prop = prefixed(element.style, name); + if (add) { + manager.oldCssProps[prop] = element.style[prop]; + element.style[prop] = value; + } else { + element.style[prop] = manager.oldCssProps[prop] || ""; + } + }); + if (!add) { + manager.oldCssProps = {}; + } +} + +/** + * @private + * trigger dom event + * @param {String} event + * @param {Object} data + */ +function triggerDomEvent(event, data) { + const gestureEvent = document.createEvent("Event"); + + gestureEvent.initEvent(event, true, true); + gestureEvent.gesture = data; + data.target.dispatchEvent(gestureEvent); +} + + +/** +* @private + * Manager + * @param {HTMLElement} element + * @param {Object} [options] + * @constructor + */ +export default class Manager { + constructor(element, options) { + this.options = assign({}, defaults, options || {}); + + this.options.inputTarget = this.options.inputTarget || element; + + this.handlers = {}; + this.session = {}; + this.recognizers = []; + this.oldCssProps = {}; + + this.element = element; + this.input = createInputInstance(this); + this.touchAction = new TouchAction(this, this.options.touchAction); + + toggleCssProps(this, true); + + each(this.options.recognizers, item => { + const recognizer = this.add(new (item[0])(item[1])); + + item[2] && recognizer.recognizeWith(item[2]); + item[3] && recognizer.requireFailure(item[3]); + }, this); + } + + /** + * @private + * set options + * @param {Object} options + * @returns {Manager} + */ + set(options) { + assign(this.options, options); + + // Options that need a little more setup + if (options.touchAction) { + this.touchAction.update(); + } + if (options.inputTarget) { + // Clean up existing event listeners and reinitialize + this.input.destroy(); + this.input.target = options.inputTarget; + this.input.init(); + } + return this; + } + + /** + * @private + * stop recognizing for this session. + * This session will be discarded, when a new [input]start event is fired. + * When forced, the recognizer cycle is stopped immediately. + * @param {Boolean} [force] + */ + stop(force) { + this.session.stopped = force ? FORCED_STOP : STOP; + } + + /** + * @private + * run the recognizers! + * called by the inputHandler function on every movement of the pointers (touches) + * it walks through all the recognizers and tries to detect the gesture that is being made + * @param {Object} inputData + */ + recognize(inputData) { + const { session } = this; + + if (session.stopped) { + return; + } + + // run the touch-action polyfill + this.touchAction.preventDefaults(inputData); + + let recognizer; + const { recognizers } = this; + + // this holds the recognizer that is being recognized. + // so the recognizer's state needs to be BEGAN, CHANGED, ENDED or RECOGNIZED + // if no recognizer is detecting a thing, it is set to `null` + let { curRecognizer } = session; + + // reset when the last recognizer is recognized + // or when we're in a new session + if (!curRecognizer || (curRecognizer && curRecognizer.state & STATE_RECOGNIZED)) { + session.curRecognizer = null; + curRecognizer = null; + } + + let i = 0; + + while (i < recognizers.length) { + recognizer = recognizers[i]; + + // find out if we are allowed try to recognize the input for this one. + // 1. allow if the session is NOT forced stopped (see the .stop() method) + // 2. allow if we still haven't recognized a gesture in this session, or the this recognizer is the one + // that is being recognized. + // 3. allow if the recognizer is allowed to run simultaneous with the current recognized recognizer. + // this can be setup with the `recognizeWith()` method on the recognizer. + if (session.stopped !== FORCED_STOP && (// 1 + !curRecognizer || recognizer === curRecognizer || // 2 + recognizer.canRecognizeWith(curRecognizer))) { // 3 + recognizer.recognize(inputData); + } else { + recognizer.reset(); + } + + // if the recognizer has been recognizing the input as a valid gesture, we want to store this one as the + // current active recognizer. but only if we don't already have an active recognizer + if (!curRecognizer && recognizer.state & (STATE_BEGAN | STATE_CHANGED | STATE_ENDED)) { + session.curRecognizer = recognizer; + curRecognizer = recognizer; + } + i++; + } + } + + /** + * @private + * get a recognizer by its event name. + * @param {Recognizer|String} recognizer + * @returns {Recognizer|Null} + */ + get(recognizer) { + if (recognizer instanceof Recognizer) { + return recognizer; + } + + const { recognizers } = this; + + for (let i = 0; i < recognizers.length; i++) { + if (recognizers[i].options.event === recognizer) { + return recognizers[i]; + } + } + return null; + } + + /** + * @private add a recognizer to the manager + * existing recognizers with the same event name will be removed + * @param {Recognizer} recognizer + * @returns {Recognizer|Manager} + */ + add(recognizer) { + if (invokeArrayArg(recognizer, "add", this)) { + return this; + } + + // remove existing + const existing = this.get(recognizer.options.event); + + if (existing) { + this.remove(existing); + } + + this.recognizers.push(recognizer); + recognizer.manager = this; + + this.touchAction.update(); + return recognizer; + } + + /** + * @private + * remove a recognizer by name or instance + * @param {Recognizer|String} recognizer + * @returns {Manager} + */ + remove(recognizer) { + if (invokeArrayArg(recognizer, "remove", this)) { + return this; + } + + const targetRecognizer = this.get(recognizer); + + // let's make sure this recognizer exists + if (recognizer) { + const { recognizers } = this; + const index = inArray(recognizers, targetRecognizer); + + if (index !== -1) { + recognizers.splice(index, 1); + this.touchAction.update(); + } + } + + return this; + } + + /** + * @private + * bind event + * @param {String} events + * @param {Function} handler + * @returns {EventEmitter} this + */ + on(events, handler) { + if (events === undefined || handler === undefined) { + return this; + } + + const { handlers } = this; + + each(splitStr(events), event => { + handlers[event] = handlers[event] || []; + handlers[event].push(handler); + }); + return this; + } + + /** + * @private unbind event, leave emit blank to remove all handlers + * @param {String} events + * @param {Function} [handler] + * @returns {EventEmitter} this + */ + off(events, handler) { + if (events === undefined) { + return this; + } + + const { handlers } = this; + + each(splitStr(events), event => { + if (!handler) { + delete handlers[event]; + } else { + handlers[event] && handlers[event].splice(inArray(handlers[event], handler), 1); + } + }); + return this; + } + + /** + * @private emit event to the listeners + * @param {String} event + * @param {Object} data + */ + emit(event, data) { + // we also want to trigger dom events + if (this.options.domEvents) { + triggerDomEvent(event, data); + } + + // no handlers, so skip it all + const handlers = this.handlers[event] && this.handlers[event].slice(); + + if (!handlers || !handlers.length) { + return; + } + + data.type = event; + data.preventDefault = function () { + data.srcEvent.preventDefault(); + }; + + let i = 0; + + while (i < handlers.length) { + handlers[i](data); + i++; + } + } + + /** + * @private + * destroy the manager and unbinds all events + * it doesn't unbind dom events, that is the user own responsibility + */ + destroy() { + this.element && toggleCssProps(this, false); + + this.handlers = {}; + this.session = {}; + this.input.destroy(); + this.element = null; + } +} diff --git a/node_modules/@egjs/hammerjs/src/recognizerjs/direction-str.js b/node_modules/@egjs/hammerjs/src/recognizerjs/direction-str.js new file mode 100644 index 0000000000000000000000000000000000000000..1dfd21806ef71b596b59e57aa8fa00017b839fa3 --- /dev/null +++ b/node_modules/@egjs/hammerjs/src/recognizerjs/direction-str.js @@ -0,0 +1,25 @@ +import { + DIRECTION_LEFT, + DIRECTION_RIGHT, + DIRECTION_UP, + DIRECTION_DOWN +} from '../inputjs/input-consts'; + +/** + * @private + * direction cons to string + * @param {constant} direction + * @returns {String} + */ +export default function directionStr(direction) { + if (direction === DIRECTION_DOWN) { + return 'down'; + } else if (direction === DIRECTION_UP) { + return 'up'; + } else if (direction === DIRECTION_LEFT) { + return 'left'; + } else if (direction === DIRECTION_RIGHT) { + return 'right'; + } + return ''; +} diff --git a/node_modules/@egjs/hammerjs/src/recognizerjs/get-recognizer-by-name-if-manager.js b/node_modules/@egjs/hammerjs/src/recognizerjs/get-recognizer-by-name-if-manager.js new file mode 100644 index 0000000000000000000000000000000000000000..395236c39ec8429890d3d93209672720a15d31b5 --- /dev/null +++ b/node_modules/@egjs/hammerjs/src/recognizerjs/get-recognizer-by-name-if-manager.js @@ -0,0 +1,14 @@ +/** + * @private + * get a recognizer by name if it is bound to a manager + * @param {Recognizer|String} otherRecognizer + * @param {Recognizer} recognizer + * @returns {Recognizer} + */ +export default function getRecognizerByNameIfManager(otherRecognizer, recognizer) { + let { manager } = recognizer; + if (manager) { + return manager.get(otherRecognizer); + } + return otherRecognizer; +} diff --git a/node_modules/@egjs/hammerjs/src/recognizerjs/recognizer-constructor.js b/node_modules/@egjs/hammerjs/src/recognizerjs/recognizer-constructor.js new file mode 100644 index 0000000000000000000000000000000000000000..988764e1e98c2eb4fcacd41bc13a099a29ca0511 --- /dev/null +++ b/node_modules/@egjs/hammerjs/src/recognizerjs/recognizer-constructor.js @@ -0,0 +1,300 @@ +import { + STATE_POSSIBLE, + STATE_ENDED, + STATE_FAILED, + STATE_RECOGNIZED, + STATE_CANCELLED, + STATE_BEGAN, + STATE_CHANGED +} from './recognizer-consts'; +import assign from '../utils/assign'; +import uniqueId from '../utils/unique-id'; +import invokeArrayArg from '../utils/invoke-array-arg'; +import inArray from '../utils/in-array'; +import boolOrFn from '../utils/bool-or-fn'; +import getRecognizerByNameIfManager from './get-recognizer-by-name-if-manager'; +import stateStr from './state-str'; + +/** + * @private + * Recognizer flow explained; * + * All recognizers have the initial state of POSSIBLE when a input session starts. + * The definition of a input session is from the first input until the last input, with all it's movement in it. * + * Example session for mouse-input: mousedown -> mousemove -> mouseup + * + * On each recognizing cycle (see Manager.recognize) the .recognize() method is executed + * which determines with state it should be. + * + * If the recognizer has the state FAILED, CANCELLED or RECOGNIZED (equals ENDED), it is reset to + * POSSIBLE to give it another change on the next cycle. + * + * Possible + * | + * +-----+---------------+ + * | | + * +-----+-----+ | + * | | | + * Failed Cancelled | + * +-------+------+ + * | | + * Recognized Began + * | + * Changed + * | + * Ended/Recognized + */ + +/** + * @private + * Recognizer + * Every recognizer needs to extend from this class. + * @constructor + * @param {Object} options + */ +export default class Recognizer { + constructor(options = {}) { + this.options = { + enable: true, + ...options, + }; + + this.id = uniqueId(); + + this.manager = null; + + // default is enable true + this.state = STATE_POSSIBLE; + this.simultaneous = {}; + this.requireFail = []; + } + + /** + * @private + * set options + * @param {Object} options + * @return {Recognizer} + */ + set(options) { + assign(this.options, options); + + // also update the touchAction, in case something changed about the directions/enabled state + this.manager && this.manager.touchAction.update(); + return this; + } + + /** + * @private + * recognize simultaneous with an other recognizer. + * @param {Recognizer} otherRecognizer + * @returns {Recognizer} this + */ + recognizeWith(otherRecognizer) { + if (invokeArrayArg(otherRecognizer, 'recognizeWith', this)) { + return this; + } + + let { simultaneous } = this; + otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this); + if (!simultaneous[otherRecognizer.id]) { + simultaneous[otherRecognizer.id] = otherRecognizer; + otherRecognizer.recognizeWith(this); + } + return this; + } + + /** + * @private + * drop the simultaneous link. it doesnt remove the link on the other recognizer. + * @param {Recognizer} otherRecognizer + * @returns {Recognizer} this + */ + dropRecognizeWith(otherRecognizer) { + if (invokeArrayArg(otherRecognizer, 'dropRecognizeWith', this)) { + return this; + } + + otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this); + delete this.simultaneous[otherRecognizer.id]; + return this; + } + + /** + * @private + * recognizer can only run when an other is failing + * @param {Recognizer} otherRecognizer + * @returns {Recognizer} this + */ + requireFailure(otherRecognizer) { + if (invokeArrayArg(otherRecognizer, 'requireFailure', this)) { + return this; + } + + let { requireFail } = this; + otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this); + if (inArray(requireFail, otherRecognizer) === -1) { + requireFail.push(otherRecognizer); + otherRecognizer.requireFailure(this); + } + return this; + } + + /** + * @private + * drop the requireFailure link. it does not remove the link on the other recognizer. + * @param {Recognizer} otherRecognizer + * @returns {Recognizer} this + */ + dropRequireFailure(otherRecognizer) { + if (invokeArrayArg(otherRecognizer, 'dropRequireFailure', this)) { + return this; + } + + otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this); + let index = inArray(this.requireFail, otherRecognizer); + if (index > -1) { + this.requireFail.splice(index, 1); + } + return this; + } + + /** + * @private + * has require failures boolean + * @returns {boolean} + */ + hasRequireFailures() { + return this.requireFail.length > 0; + } + + /** + * @private + * if the recognizer can recognize simultaneous with an other recognizer + * @param {Recognizer} otherRecognizer + * @returns {Boolean} + */ + canRecognizeWith(otherRecognizer) { + return !!this.simultaneous[otherRecognizer.id]; + } + + /** + * @private + * You should use `tryEmit` instead of `emit` directly to check + * that all the needed recognizers has failed before emitting. + * @param {Object} input + */ + emit(input) { + let self = this; + let { state } = this; + + function emit(event) { + self.manager.emit(event, input); + } + + // 'panstart' and 'panmove' + if (state < STATE_ENDED) { + emit(self.options.event + stateStr(state)); + } + + emit(self.options.event); // simple 'eventName' events + + if (input.additionalEvent) { // additional event(panleft, panright, pinchin, pinchout...) + emit(input.additionalEvent); + } + + // panend and pancancel + if (state >= STATE_ENDED) { + emit(self.options.event + stateStr(state)); + } + } + + /** + * @private + * Check that all the require failure recognizers has failed, + * if true, it emits a gesture event, + * otherwise, setup the state to FAILED. + * @param {Object} input + */ + tryEmit(input) { + if (this.canEmit()) { + return this.emit(input); + } + // it's failing anyway + this.state = STATE_FAILED; + } + + /** + * @private + * can we emit? + * @returns {boolean} + */ + canEmit() { + let i = 0; + while (i < this.requireFail.length) { + if (!(this.requireFail[i].state & (STATE_FAILED | STATE_POSSIBLE))) { + return false; + } + i++; + } + return true; + } + + /** + * @private + * update the recognizer + * @param {Object} inputData + */ + recognize(inputData) { + // make a new copy of the inputData + // so we can change the inputData without messing up the other recognizers + let inputDataClone = assign({}, inputData); + + // is is enabled and allow recognizing? + if (!boolOrFn(this.options.enable, [this, inputDataClone])) { + this.reset(); + this.state = STATE_FAILED; + return; + } + + // reset when we've reached the end + if (this.state & (STATE_RECOGNIZED | STATE_CANCELLED | STATE_FAILED)) { + this.state = STATE_POSSIBLE; + } + + this.state = this.process(inputDataClone); + + // the recognizer has recognized a gesture + // so trigger an event + if (this.state & (STATE_BEGAN | STATE_CHANGED | STATE_ENDED | STATE_CANCELLED)) { + this.tryEmit(inputDataClone); + } + } + + /** + * @private + * return the state of the recognizer + * the actual recognizing happens in this method + * @virtual + * @param {Object} inputData + * @returns {constant} STATE + */ + + /* jshint ignore:start */ + process(inputData) { } + /* jshint ignore:end */ + + /** + * @private + * return the preferred touch-action + * @virtual + * @returns {Array} + */ + getTouchAction() { } + + /** + * @private + * called when the gesture isn't allowed to recognize + * like when another is being recognized or it is disabled + * @virtual + */ + reset() { } +} \ No newline at end of file diff --git a/node_modules/@egjs/hammerjs/src/recognizerjs/recognizer-consts.js b/node_modules/@egjs/hammerjs/src/recognizerjs/recognizer-consts.js new file mode 100644 index 0000000000000000000000000000000000000000..7b1aa340ccbcfbb4c049622aeb8fb5a354271ed6 --- /dev/null +++ b/node_modules/@egjs/hammerjs/src/recognizerjs/recognizer-consts.js @@ -0,0 +1,17 @@ +const STATE_POSSIBLE = 1; +const STATE_BEGAN = 2; +const STATE_CHANGED = 4; +const STATE_ENDED = 8; +const STATE_RECOGNIZED = STATE_ENDED; +const STATE_CANCELLED = 16; +const STATE_FAILED = 32; + +export { + STATE_POSSIBLE, + STATE_BEGAN, + STATE_CHANGED, + STATE_ENDED, + STATE_RECOGNIZED, + STATE_CANCELLED, + STATE_FAILED +}; diff --git a/node_modules/@egjs/hammerjs/src/recognizerjs/state-str.js b/node_modules/@egjs/hammerjs/src/recognizerjs/state-str.js new file mode 100644 index 0000000000000000000000000000000000000000..e37c58497ebc6ca917dd87b61aeb740cd1921a65 --- /dev/null +++ b/node_modules/@egjs/hammerjs/src/recognizerjs/state-str.js @@ -0,0 +1,25 @@ +import { + STATE_CANCELLED, + STATE_ENDED, + STATE_CHANGED, + STATE_BEGAN +} from './recognizer-consts'; + +/** + * @private + * get a usable string, used as event postfix + * @param {constant} state + * @returns {String} state + */ +export default function stateStr(state) { + if (state & STATE_CANCELLED) { + return 'cancel'; + } else if (state & STATE_ENDED) { + return 'end'; + } else if (state & STATE_CHANGED) { + return 'move'; + } else if (state & STATE_BEGAN) { + return 'start'; + } + return ''; +} diff --git a/node_modules/@egjs/hammerjs/src/recognizers/attribute.js b/node_modules/@egjs/hammerjs/src/recognizers/attribute.js new file mode 100644 index 0000000000000000000000000000000000000000..e72a1db2d441c07e473ea259d50dd200589d0abd --- /dev/null +++ b/node_modules/@egjs/hammerjs/src/recognizers/attribute.js @@ -0,0 +1,67 @@ +import Recognizer from '../recognizerjs/recognizer-constructor'; +import { + STATE_BEGAN, + STATE_CHANGED, + STATE_CANCELLED, + STATE_ENDED, + STATE_FAILED +} from '../recognizerjs/recognizer-consts'; +import { + INPUT_CANCEL, + INPUT_END +} from '../inputjs/input-consts'; + +/** + * @private + * This recognizer is just used as a base for the simple attribute recognizers. + * @constructor + * @extends Recognizer + */ +export default class AttrRecognizer extends Recognizer { + constructor(options = {}) { + super({ + pointers: 1, + ...options, + }); + } + + /** + * @private + * Used to check if it the recognizer receives valid input, like input.distance > 10. + * @memberof AttrRecognizer + * @param {Object} input + * @returns {Boolean} recognized + */ + attrTest(input) { + let optionPointers = this.options.pointers; + return optionPointers === 0 || input.pointers.length === optionPointers; + } + + /** + * @private + * Process the input and return the state for the recognizer + * @memberof AttrRecognizer + * @param {Object} input + * @returns {*} State + */ + process(input) { + let { state } = this; + let { eventType } = input; + + let isRecognized = state & (STATE_BEGAN | STATE_CHANGED); + let isValid = this.attrTest(input); + + // on cancel input and we've recognized before, return STATE_CANCELLED + if (isRecognized && (eventType & INPUT_CANCEL || !isValid)) { + return state | STATE_CANCELLED; + } else if (isRecognized || isValid) { + if (eventType & INPUT_END) { + return state | STATE_ENDED; + } else if (!(state & STATE_BEGAN)) { + return STATE_BEGAN; + } + return state | STATE_CHANGED; + } + return STATE_FAILED; + } +} diff --git a/node_modules/@egjs/hammerjs/src/recognizers/pan.js b/node_modules/@egjs/hammerjs/src/recognizers/pan.js new file mode 100644 index 0000000000000000000000000000000000000000..14f000ec7638c98db99b3f5c9c50e8416738b08c --- /dev/null +++ b/node_modules/@egjs/hammerjs/src/recognizers/pan.js @@ -0,0 +1,89 @@ +import AttrRecognizer from './attribute'; +import { + DIRECTION_ALL, + DIRECTION_HORIZONTAL, + DIRECTION_VERTICAL, + DIRECTION_NONE, + DIRECTION_UP, + DIRECTION_DOWN, + DIRECTION_LEFT, + DIRECTION_RIGHT +} from '../inputjs/input-consts'; +import { STATE_BEGAN } from '../recognizerjs/recognizer-consts'; +import { TOUCH_ACTION_PAN_X,TOUCH_ACTION_PAN_Y } from '../touchactionjs/touchaction-Consts'; +import directionStr from '../recognizerjs/direction-str'; + +/** + * @private + * Pan + * Recognized when the pointer is down and moved in the allowed direction. + * @constructor + * @extends AttrRecognizer + */ +export default class PanRecognizer extends AttrRecognizer { + constructor(options = {}) { + super({ + event: 'pan', + threshold: 10, + pointers: 1, + direction: DIRECTION_ALL, + ...options, + }); + this.pX = null; + this.pY = null; + } + + getTouchAction() { + let { options:{ direction } } = this; + let actions = []; + if (direction & DIRECTION_HORIZONTAL) { + actions.push(TOUCH_ACTION_PAN_Y); + } + if (direction & DIRECTION_VERTICAL) { + actions.push(TOUCH_ACTION_PAN_X); + } + return actions; + } + + directionTest(input) { + let { options } = this; + let hasMoved = true; + let { distance } = input; + let { direction } = input; + let x = input.deltaX; + let y = input.deltaY; + + // lock to axis? + if (!(direction & options.direction)) { + if (options.direction & DIRECTION_HORIZONTAL) { + direction = (x === 0) ? DIRECTION_NONE : (x < 0) ? DIRECTION_LEFT : DIRECTION_RIGHT; + hasMoved = x !== this.pX; + distance = Math.abs(input.deltaX); + } else { + direction = (y === 0) ? DIRECTION_NONE : (y < 0) ? DIRECTION_UP : DIRECTION_DOWN; + hasMoved = y !== this.pY; + distance = Math.abs(input.deltaY); + } + } + input.direction = direction; + return hasMoved && distance > options.threshold && direction & options.direction; + } + + attrTest(input) { + return AttrRecognizer.prototype.attrTest.call(this, input) && // replace with a super call + (this.state & STATE_BEGAN || (!(this.state & STATE_BEGAN) && this.directionTest(input))); + } + + emit(input) { + + this.pX = input.deltaX; + this.pY = input.deltaY; + + let direction = directionStr(input.direction); + + if (direction) { + input.additionalEvent = this.options.event + direction; + } + super.emit(input); + } +} diff --git a/node_modules/@egjs/hammerjs/src/recognizers/pinch.js b/node_modules/@egjs/hammerjs/src/recognizers/pinch.js new file mode 100644 index 0000000000000000000000000000000000000000..bd4bc0d05ba1d12729d4c7e220211f02105a67ec --- /dev/null +++ b/node_modules/@egjs/hammerjs/src/recognizers/pinch.js @@ -0,0 +1,38 @@ +import AttrRecognizer from './attribute'; +import { TOUCH_ACTION_NONE } from '../touchactionjs/touchaction-Consts'; +import { STATE_BEGAN } from '../recognizerjs/recognizer-consts'; + +/** + * @private + * Pinch + * Recognized when two or more pointers are moving toward (zoom-in) or away from each other (zoom-out). + * @constructor + * @extends AttrRecognizer + */ +export default class PinchRecognizer extends AttrRecognizer { + constructor(options = {}) { + super({ + event: 'pinch', + threshold: 0, + pointers: 2, + ...options, + }); + } + + getTouchAction() { + return [TOUCH_ACTION_NONE]; + } + + attrTest(input) { + return super.attrTest(input) && + (Math.abs(input.scale - 1) > this.options.threshold || this.state & STATE_BEGAN); + } + + emit(input) { + if (input.scale !== 1) { + let inOut = input.scale < 1 ? 'in' : 'out'; + input.additionalEvent = this.options.event + inOut; + } + super.emit(input); + } +} diff --git a/node_modules/@egjs/hammerjs/src/recognizers/press.js b/node_modules/@egjs/hammerjs/src/recognizers/press.js new file mode 100644 index 0000000000000000000000000000000000000000..c6a12a4939d84f1fcadc94be1a14d7673c94c26d --- /dev/null +++ b/node_modules/@egjs/hammerjs/src/recognizers/press.js @@ -0,0 +1,79 @@ +import Recognizer from '../recognizerjs/recognizer-constructor'; +import { + STATE_RECOGNIZED, + STATE_FAILED +} from '../recognizerjs/recognizer-consts'; +import { now } from '../utils/utils-consts'; +import { TOUCH_ACTION_AUTO } from '../touchactionjs/touchaction-Consts'; +import { + INPUT_START, + INPUT_END, + INPUT_CANCEL +} from '../inputjs/input-consts'; + +/** + * @private + * Press + * Recognized when the pointer is down for x ms without any movement. + * @constructor + * @extends Recognizer + */ +export default class PressRecognizer extends Recognizer { + constructor(options = {}) { + super({ + event: 'press', + pointers: 1, + time: 251, // minimal time of the pointer to be pressed + threshold: 9, // a minimal movement is ok, but keep it low + ...options, + }); + this._timer = null; + this._input = null; + } + + getTouchAction() { + return [TOUCH_ACTION_AUTO]; + } + + process(input) { + let { options } = this; + let validPointers = input.pointers.length === options.pointers; + let validMovement = input.distance < options.threshold; + let validTime = input.deltaTime > options.time; + + this._input = input; + + // we only allow little movement + // and we've reached an end event, so a tap is possible + if (!validMovement || !validPointers || (input.eventType & (INPUT_END | INPUT_CANCEL) && !validTime)) { + this.reset(); + } else if (input.eventType & INPUT_START) { + this.reset(); + this._timer = setTimeout(() => { + this.state = STATE_RECOGNIZED; + this.tryEmit(); + }, options.time); + } else if (input.eventType & INPUT_END) { + return STATE_RECOGNIZED; + } + return STATE_FAILED; + } + + reset() { + clearTimeout(this._timer); + } + + emit(input) { + if (this.state !== STATE_RECOGNIZED) { + return; + } + + if (input && (input.eventType & INPUT_END)) { + this.manager.emit(`${this.options.event}up`, input); + } else { + this._input.timeStamp = now(); + this.manager.emit(this.options.event, this._input); + } + } +} + diff --git a/node_modules/@egjs/hammerjs/src/recognizers/rotate.js b/node_modules/@egjs/hammerjs/src/recognizers/rotate.js new file mode 100644 index 0000000000000000000000000000000000000000..77b59f33605746be289f1c9f41f207423d22ac05 --- /dev/null +++ b/node_modules/@egjs/hammerjs/src/recognizers/rotate.js @@ -0,0 +1,30 @@ +import AttrRecognizer from './attribute'; +import { TOUCH_ACTION_NONE } from '../touchactionjs/touchaction-Consts'; +import { STATE_BEGAN } from '../recognizerjs/recognizer-consts'; + +/** + * @private + * Rotate + * Recognized when two or more pointer are moving in a circular motion. + * @constructor + * @extends AttrRecognizer + */ +export default class RotateRecognizer extends AttrRecognizer { + constructor(options = {}) { + super( { + event: 'rotate', + threshold: 0, + pointers: 2, + ...options, + }); + } + + getTouchAction() { + return [TOUCH_ACTION_NONE]; + } + + attrTest(input) { + return super.attrTest(input) && + (Math.abs(input.rotation) > this.options.threshold || this.state & STATE_BEGAN); + } +} \ No newline at end of file diff --git a/node_modules/@egjs/hammerjs/src/recognizers/swipe.js b/node_modules/@egjs/hammerjs/src/recognizers/swipe.js new file mode 100644 index 0000000000000000000000000000000000000000..bdbb0a30606c63ed06a1dfb5698129808727a481 --- /dev/null +++ b/node_modules/@egjs/hammerjs/src/recognizers/swipe.js @@ -0,0 +1,58 @@ +import AttrRecognizer from '../recognizers/attribute'; +import { abs } from '../utils/utils-consts'; +import { DIRECTION_HORIZONTAL,DIRECTION_VERTICAL } from '../inputjs/input-consts'; +import PanRecognizer from './pan'; +import { INPUT_END } from '../inputjs/input-consts'; +import directionStr from '../recognizerjs/direction-str'; + +/** + * @private + * Swipe + * Recognized when the pointer is moving fast (velocity), with enough distance in the allowed direction. + * @constructor + * @extends AttrRecognizer + */ +export default class SwipeRecognizer extends AttrRecognizer { + constructor(options = {}) { + super({ + event: 'swipe', + threshold: 10, + velocity: 0.3, + direction: DIRECTION_HORIZONTAL | DIRECTION_VERTICAL, + pointers: 1, + ...options, + }); + } + + getTouchAction() { + return PanRecognizer.prototype.getTouchAction.call(this); + } + + attrTest(input) { + let { direction } = this.options; + let velocity; + + if (direction & (DIRECTION_HORIZONTAL | DIRECTION_VERTICAL)) { + velocity = input.overallVelocity; + } else if (direction & DIRECTION_HORIZONTAL) { + velocity = input.overallVelocityX; + } else if (direction & DIRECTION_VERTICAL) { + velocity = input.overallVelocityY; + } + + return super.attrTest(input) && + direction & input.offsetDirection && + input.distance > this.options.threshold && + input.maxPointers === this.options.pointers && + abs(velocity) > this.options.velocity && input.eventType & INPUT_END; + } + + emit(input) { + let direction = directionStr(input.offsetDirection); + if (direction) { + this.manager.emit(this.options.event + direction, input); + } + + this.manager.emit(this.options.event, input); + } +} diff --git a/node_modules/@egjs/hammerjs/src/recognizers/tap.js b/node_modules/@egjs/hammerjs/src/recognizers/tap.js new file mode 100644 index 0000000000000000000000000000000000000000..f2e25ce21efd465686a05199f2041c3d19343247 --- /dev/null +++ b/node_modules/@egjs/hammerjs/src/recognizers/tap.js @@ -0,0 +1,120 @@ +import Recognizer from '../recognizerjs/recognizer-constructor'; +import { TOUCH_ACTION_MANIPULATION } from '../touchactionjs/touchaction-Consts'; +import {INPUT_START,INPUT_END } from '../inputjs/input-consts'; +import { + STATE_RECOGNIZED, + STATE_BEGAN, + STATE_FAILED +} from '../recognizerjs/recognizer-consts'; +import getDistance from '../inputjs/get-distance'; + +/** + * @private + * A tap is recognized when the pointer is doing a small tap/click. Multiple taps are recognized if they occur + * between the given interval and position. The delay option can be used to recognize multi-taps without firing + * a single tap. + * + * The eventData from the emitted event contains the property `tapCount`, which contains the amount of + * multi-taps being recognized. + * @constructor + * @extends Recognizer + */ +export default class TapRecognizer extends Recognizer { + constructor(options = {}) { + super({ + event: 'tap', + pointers: 1, + taps: 1, + interval: 300, // max time between the multi-tap taps + time: 250, // max time of the pointer to be down (like finger on the screen) + threshold: 9, // a minimal movement is ok, but keep it low + posThreshold: 10, // a multi-tap can be a bit off the initial position + ...options, + }); + + // previous time and center, + // used for tap counting + this.pTime = false; + this.pCenter = false; + + this._timer = null; + this._input = null; + this.count = 0; + } + + getTouchAction() { + return [TOUCH_ACTION_MANIPULATION]; + } + + process(input) { + let { options } = this; + + let validPointers = input.pointers.length === options.pointers; + let validMovement = input.distance < options.threshold; + let validTouchTime = input.deltaTime < options.time; + + this.reset(); + + if ((input.eventType & INPUT_START) && (this.count === 0)) { + return this.failTimeout(); + } + + // we only allow little movement + // and we've reached an end event, so a tap is possible + if (validMovement && validTouchTime && validPointers) { + if (input.eventType !== INPUT_END) { + return this.failTimeout(); + } + + let validInterval = this.pTime ? (input.timeStamp - this.pTime < options.interval) : true; + let validMultiTap = !this.pCenter || getDistance(this.pCenter, input.center) < options.posThreshold; + + this.pTime = input.timeStamp; + this.pCenter = input.center; + + if (!validMultiTap || !validInterval) { + this.count = 1; + } else { + this.count += 1; + } + + this._input = input; + + // if tap count matches we have recognized it, + // else it has began recognizing... + let tapCount = this.count % options.taps; + if (tapCount === 0) { + // no failing requirements, immediately trigger the tap event + // or wait as long as the multitap interval to trigger + if (!this.hasRequireFailures()) { + return STATE_RECOGNIZED; + } else { + this._timer = setTimeout(() => { + this.state = STATE_RECOGNIZED; + this.tryEmit(); + }, options.interval); + return STATE_BEGAN; + } + } + } + return STATE_FAILED; + } + + failTimeout() { + this._timer = setTimeout(() => { + this.state = STATE_FAILED; + }, this.options.interval); + return STATE_FAILED; + } + + reset() { + clearTimeout(this._timer); + } + + emit() { + if (this.state === STATE_RECOGNIZED) { + this._input.tapCount = this.count; + this.manager.emit(this.options.event, this._input); + } + } +} diff --git a/node_modules/@egjs/hammerjs/src/touchactionjs/clean-touch-actions.js b/node_modules/@egjs/hammerjs/src/touchactionjs/clean-touch-actions.js new file mode 100644 index 0000000000000000000000000000000000000000..2244fd816a07e534def2ed86bff7d70afe2cf4d5 --- /dev/null +++ b/node_modules/@egjs/hammerjs/src/touchactionjs/clean-touch-actions.js @@ -0,0 +1,44 @@ +import inStr from '../utils/in-str'; +import { + TOUCH_ACTION_NONE, + TOUCH_ACTION_PAN_X, + TOUCH_ACTION_PAN_Y, + TOUCH_ACTION_MANIPULATION, + TOUCH_ACTION_AUTO +} from './touchaction-Consts'; + +/** + * @private + * when the touchActions are collected they are not a valid value, so we need to clean things up. * + * @param {String} actions + * @returns {*} + */ +export default function cleanTouchActions(actions) { + // none + if (inStr(actions, TOUCH_ACTION_NONE)) { + return TOUCH_ACTION_NONE; + } + + let hasPanX = inStr(actions, TOUCH_ACTION_PAN_X); + let hasPanY = inStr(actions, TOUCH_ACTION_PAN_Y); + + // if both pan-x and pan-y are set (different recognizers + // for different directions, e.g. horizontal pan but vertical swipe?) + // we need none (as otherwise with pan-x pan-y combined none of these + // recognizers will work, since the browser would handle all panning + if (hasPanX && hasPanY) { + return TOUCH_ACTION_NONE; + } + + // pan-x OR pan-y + if (hasPanX || hasPanY) { + return hasPanX ? TOUCH_ACTION_PAN_X : TOUCH_ACTION_PAN_Y; + } + + // manipulation + if (inStr(actions, TOUCH_ACTION_MANIPULATION)) { + return TOUCH_ACTION_MANIPULATION; + } + + return TOUCH_ACTION_AUTO; +} diff --git a/node_modules/@egjs/hammerjs/src/touchactionjs/get-touchaction-props.js b/node_modules/@egjs/hammerjs/src/touchactionjs/get-touchaction-props.js new file mode 100644 index 0000000000000000000000000000000000000000..72e5a680d58f351ebbaddf6cf8d5cb6d26f72756 --- /dev/null +++ b/node_modules/@egjs/hammerjs/src/touchactionjs/get-touchaction-props.js @@ -0,0 +1,21 @@ +import prefixed from '../utils/prefixed'; +import { TEST_ELEMENT } from '../utils/utils-consts'; +import {window} from '../browser'; + +export const PREFIXED_TOUCH_ACTION = prefixed(TEST_ELEMENT.style, 'touchAction'); +export const NATIVE_TOUCH_ACTION = PREFIXED_TOUCH_ACTION !== undefined; + +export default function getTouchActionProps() { + if (!NATIVE_TOUCH_ACTION) { + return false; + } + let touchMap = {}; + let cssSupports = window.CSS && window.CSS.supports; + ['auto', 'manipulation', 'pan-y', 'pan-x', 'pan-x pan-y', 'none'].forEach((val) => { + + // If css.supports is not supported but there is native touch-action assume it supports + // all values. This is the case for IE 10 and 11. + return touchMap[val] = cssSupports ? window.CSS.supports('touch-action', val) : true; + }); + return touchMap; +} diff --git a/node_modules/@egjs/hammerjs/src/touchactionjs/touchaction-Consts.js b/node_modules/@egjs/hammerjs/src/touchactionjs/touchaction-Consts.js new file mode 100644 index 0000000000000000000000000000000000000000..568e5ad64a72716119cd8989ee2cd709ece2e0c9 --- /dev/null +++ b/node_modules/@egjs/hammerjs/src/touchactionjs/touchaction-Consts.js @@ -0,0 +1,22 @@ +import getTouchActionProps from './get-touchaction-props'; + + + +// magical touchAction value +const TOUCH_ACTION_COMPUTE = 'compute'; +const TOUCH_ACTION_AUTO = 'auto'; +const TOUCH_ACTION_MANIPULATION = 'manipulation'; // not implemented +const TOUCH_ACTION_NONE = 'none'; +const TOUCH_ACTION_PAN_X = 'pan-x'; +const TOUCH_ACTION_PAN_Y = 'pan-y'; +const TOUCH_ACTION_MAP = getTouchActionProps(); + +export { + TOUCH_ACTION_AUTO, + TOUCH_ACTION_COMPUTE, + TOUCH_ACTION_MANIPULATION, + TOUCH_ACTION_NONE, + TOUCH_ACTION_PAN_X, + TOUCH_ACTION_PAN_Y, + TOUCH_ACTION_MAP +}; diff --git a/node_modules/@egjs/hammerjs/src/touchactionjs/touchaction-constructor.js b/node_modules/@egjs/hammerjs/src/touchactionjs/touchaction-constructor.js new file mode 100644 index 0000000000000000000000000000000000000000..6efc96d8e10b6e01e17469766a903fb6aecf4576 --- /dev/null +++ b/node_modules/@egjs/hammerjs/src/touchactionjs/touchaction-constructor.js @@ -0,0 +1,127 @@ +import { + TOUCH_ACTION_COMPUTE, + TOUCH_ACTION_MAP, + TOUCH_ACTION_NONE, + TOUCH_ACTION_PAN_X, + TOUCH_ACTION_PAN_Y +} from './touchaction-Consts'; +import { + NATIVE_TOUCH_ACTION, + PREFIXED_TOUCH_ACTION, +} from "./get-touchaction-props"; +import { + DIRECTION_VERTICAL, + DIRECTION_HORIZONTAL +} from '../inputjs/input-consts'; +import each from '../utils/each'; +import boolOrFn from '../utils/bool-or-fn'; +import inStr from '../utils/in-str'; +import cleanTouchActions from './clean-touch-actions'; + +/** + * @private + * Touch Action + * sets the touchAction property or uses the js alternative + * @param {Manager} manager + * @param {String} value + * @constructor + */ +export default class TouchAction { + constructor(manager, value) { + this.manager = manager; + this.set(value); + } + + /** + * @private + * set the touchAction value on the element or enable the polyfill + * @param {String} value + */ + set(value) { + // find out the touch-action by the event handlers + if (value === TOUCH_ACTION_COMPUTE) { + value = this.compute(); + } + + if (NATIVE_TOUCH_ACTION && this.manager.element.style && TOUCH_ACTION_MAP[value]) { + this.manager.element.style[PREFIXED_TOUCH_ACTION] = value; + } + this.actions = value.toLowerCase().trim(); + } + + /** + * @private + * just re-set the touchAction value + */ + update() { + this.set(this.manager.options.touchAction); + } + + /** + * @private + * compute the value for the touchAction property based on the recognizer's settings + * @returns {String} value + */ + compute() { + let actions = []; + each(this.manager.recognizers, (recognizer) => { + if (boolOrFn(recognizer.options.enable, [recognizer])) { + actions = actions.concat(recognizer.getTouchAction()); + } + }); + return cleanTouchActions(actions.join(' ')); + } + + /** + * @private + * this method is called on each input cycle and provides the preventing of the browser behavior + * @param {Object} input + */ + preventDefaults(input) { + let { srcEvent } = input; + let direction = input.offsetDirection; + + // if the touch action did prevented once this session + if (this.manager.session.prevented) { + srcEvent.preventDefault(); + return; + } + + let { actions } = this; + let hasNone = inStr(actions, TOUCH_ACTION_NONE) && !TOUCH_ACTION_MAP[TOUCH_ACTION_NONE]; + let hasPanY = inStr(actions, TOUCH_ACTION_PAN_Y) && !TOUCH_ACTION_MAP[TOUCH_ACTION_PAN_Y]; + let hasPanX = inStr(actions, TOUCH_ACTION_PAN_X) && !TOUCH_ACTION_MAP[TOUCH_ACTION_PAN_X]; + + if (hasNone) { + // do not prevent defaults if this is a tap gesture + let isTapPointer = input.pointers.length === 1; + let isTapMovement = input.distance < 2; + let isTapTouchTime = input.deltaTime < 250; + + if (isTapPointer && isTapMovement && isTapTouchTime) { + return; + } + } + + if (hasPanX && hasPanY) { + // `pan-x pan-y` means browser handles all scrolling/panning, do not prevent + return; + } + + if (hasNone || + (hasPanY && direction & DIRECTION_HORIZONTAL) || + (hasPanX && direction & DIRECTION_VERTICAL)) { + return this.preventSrc(srcEvent); + } + } + + /** + * @private + * call preventDefault to prevent the browser's default behavior (scrolling in most cases) + * @param {Object} srcEvent + */ + preventSrc(srcEvent) { + this.manager.session.prevented = true; + srcEvent.preventDefault(); + } +} diff --git a/node_modules/@egjs/hammerjs/src/utils/add-event-listeners.js b/node_modules/@egjs/hammerjs/src/utils/add-event-listeners.js new file mode 100644 index 0000000000000000000000000000000000000000..99b2da80cb50474ac4a62f398da7afa80c08b4eb --- /dev/null +++ b/node_modules/@egjs/hammerjs/src/utils/add-event-listeners.js @@ -0,0 +1,14 @@ +import each from './each'; +import splitStr from './split-str'; +/** + * @private + * addEventListener with multiple events at once + * @param {EventTarget} target + * @param {String} types + * @param {Function} handler + */ +export default function addEventListeners(target, types, handler) { + each(splitStr(types), (type) => { + target.addEventListener(type, handler, false); + }); +} diff --git a/node_modules/@egjs/hammerjs/src/utils/assign.js b/node_modules/@egjs/hammerjs/src/utils/assign.js new file mode 100644 index 0000000000000000000000000000000000000000..3b1314a2eec63a13e458dfa727ef733750ebb8ae --- /dev/null +++ b/node_modules/@egjs/hammerjs/src/utils/assign.js @@ -0,0 +1,33 @@ +/** + * @private + * extend object. + * means that properties in dest will be overwritten by the ones in src. + * @param {Object} target + * @param {...Object} objects_to_assign + * @returns {Object} target + */ +let assign; +if (typeof Object.assign !== 'function') { + assign = function assign(target) { + if (target === undefined || target === null) { + throw new TypeError('Cannot convert undefined or null to object'); + } + + let output = Object(target); + for (let index = 1; index < arguments.length; index++) { + const source = arguments[index]; + if (source !== undefined && source !== null) { + for (const nextKey in source) { + if (source.hasOwnProperty(nextKey)) { + output[nextKey] = source[nextKey]; + } + } + } + } + return output; + }; +} else { + assign = Object.assign; +} + +export default assign; \ No newline at end of file diff --git a/node_modules/@egjs/hammerjs/src/utils/bind-fn.js b/node_modules/@egjs/hammerjs/src/utils/bind-fn.js new file mode 100644 index 0000000000000000000000000000000000000000..b915d84a624aa3ccfaf29eee70049e97854015a5 --- /dev/null +++ b/node_modules/@egjs/hammerjs/src/utils/bind-fn.js @@ -0,0 +1,12 @@ +/** + * @private + * simple function bind + * @param {Function} fn + * @param {Object} context + * @returns {Function} + */ +export default function bindFn(fn, context) { + return function boundFn() { + return fn.apply(context, arguments); + }; +} diff --git a/node_modules/@egjs/hammerjs/src/utils/bool-or-fn.js b/node_modules/@egjs/hammerjs/src/utils/bool-or-fn.js new file mode 100644 index 0000000000000000000000000000000000000000..b57ebb5177f5567421cbc6fb6b13c7913a5b4ac9 --- /dev/null +++ b/node_modules/@egjs/hammerjs/src/utils/bool-or-fn.js @@ -0,0 +1,15 @@ +import { TYPE_FUNCTION } from './utils-consts'; +/** + * @private + * let a boolean value also be a function that must return a boolean + * this first item in args will be used as the context + * @param {Boolean|Function} val + * @param {Array} [args] + * @returns {Boolean} + */ +export default function boolOrFn(val, args) { + if (typeof val === TYPE_FUNCTION) { + return val.apply(args ? args[0] || undefined : undefined, args); + } + return val; +} diff --git a/node_modules/@egjs/hammerjs/src/utils/deprecate.js b/node_modules/@egjs/hammerjs/src/utils/deprecate.js new file mode 100644 index 0000000000000000000000000000000000000000..8f896375f1b0cd7b53d8a947a30b6ac821fd796c --- /dev/null +++ b/node_modules/@egjs/hammerjs/src/utils/deprecate.js @@ -0,0 +1,23 @@ +/** + * @private + * wrap a method with a deprecation warning and stack trace + * @param {Function} method + * @param {String} name + * @param {String} message + * @returns {Function} A new function wrapping the supplied method. + */ +export default function deprecate(method, name, message) { + let deprecationMessage = `DEPRECATED METHOD: ${name}\n${message} AT \n`; + return function() { + let e = new Error('get-stack-trace'); + let stack = e && e.stack ? e.stack.replace(/^[^\(]+?[\n$]/gm, '') + .replace(/^\s+at\s+/gm, '') + .replace(/^Object.\s*\(/gm, '{anonymous}()@') : 'Unknown Stack Trace'; + + let log = window.console && (window.console.warn || window.console.log); + if (log) { + log.call(window.console, deprecationMessage, stack); + } + return method.apply(this, arguments); + }; +} diff --git a/node_modules/@egjs/hammerjs/src/utils/each.js b/node_modules/@egjs/hammerjs/src/utils/each.js new file mode 100644 index 0000000000000000000000000000000000000000..dd124bb3a259cf6374283dc3c5becfe01c1f5ef8 --- /dev/null +++ b/node_modules/@egjs/hammerjs/src/utils/each.js @@ -0,0 +1,28 @@ +/** + * @private + * walk objects and arrays + * @param {Object} obj + * @param {Function} iterator + * @param {Object} context + */ +export default function each(obj, iterator, context) { + let i; + + if (!obj) { + return; + } + + if (obj.forEach) { + obj.forEach(iterator, context); + } else if (obj.length !== undefined) { + i = 0; + while (i < obj.length) { + iterator.call(context, obj[i], i, obj); + i++; + } + } else { + for (i in obj) { + obj.hasOwnProperty(i) && iterator.call(context, obj[i], i, obj); + } + } +} diff --git a/node_modules/@egjs/hammerjs/src/utils/extend.js b/node_modules/@egjs/hammerjs/src/utils/extend.js new file mode 100644 index 0000000000000000000000000000000000000000..b3aa2372f3a4f857491b043d2c69ceb3deb2e023 --- /dev/null +++ b/node_modules/@egjs/hammerjs/src/utils/extend.js @@ -0,0 +1,23 @@ +import deprecate from './deprecate'; +/** + * @private + * extend object. + * means that properties in dest will be overwritten by the ones in src. + * @param {Object} dest + * @param {Object} src + * @param {Boolean} [merge=false] + * @returns {Object} dest + */ +const extend = deprecate((dest, src, merge) => { + let keys = Object.keys(src); + let i = 0; + while (i < keys.length) { + if (!merge || (merge && dest[keys[i]] === undefined)) { + dest[keys[i]] = src[keys[i]]; + } + i++; + } + return dest; +}, 'extend', 'Use `assign`.'); + +export default extend; diff --git a/node_modules/@egjs/hammerjs/src/utils/get-window-for-element.js b/node_modules/@egjs/hammerjs/src/utils/get-window-for-element.js new file mode 100644 index 0000000000000000000000000000000000000000..f63cc409bed0af413c19a99b1cb8c0ba4d0a0df2 --- /dev/null +++ b/node_modules/@egjs/hammerjs/src/utils/get-window-for-element.js @@ -0,0 +1,10 @@ +/** + * @private + * get the window object of an element + * @param {HTMLElement} element + * @returns {DocumentView|Window} + */ +export default function getWindowForElement(element) { + let doc = element.ownerDocument || element; + return (doc.defaultView || doc.parentWindow || window); +} diff --git a/node_modules/@egjs/hammerjs/src/utils/has-parent.js b/node_modules/@egjs/hammerjs/src/utils/has-parent.js new file mode 100644 index 0000000000000000000000000000000000000000..0e52d5329370ecda3d0a750d839c2f46ed81f514 --- /dev/null +++ b/node_modules/@egjs/hammerjs/src/utils/has-parent.js @@ -0,0 +1,17 @@ +/** + * @private + * find if a node is in the given parent + * @method hasParent + * @param {HTMLElement} node + * @param {HTMLElement} parent + * @return {Boolean} found + */ +export default function hasParent(node, parent) { + while (node) { + if (node === parent) { + return true; + } + node = node.parentNode; + } + return false; +} diff --git a/node_modules/@egjs/hammerjs/src/utils/if-undefined.js b/node_modules/@egjs/hammerjs/src/utils/if-undefined.js new file mode 100644 index 0000000000000000000000000000000000000000..72ea9218de62bd3be9d74a28976a1593bab26542 --- /dev/null +++ b/node_modules/@egjs/hammerjs/src/utils/if-undefined.js @@ -0,0 +1,10 @@ +/** + * @private + * use the val2 when val1 is undefined + * @param {*} val1 + * @param {*} val2 + * @returns {*} + */ +export default function ifUndefined(val1, val2) { + return (val1 === undefined) ? val2 : val1; +} diff --git a/node_modules/@egjs/hammerjs/src/utils/in-array.js b/node_modules/@egjs/hammerjs/src/utils/in-array.js new file mode 100644 index 0000000000000000000000000000000000000000..11f7769e50370fc8fab0aa638a86f0536a8cb050 --- /dev/null +++ b/node_modules/@egjs/hammerjs/src/utils/in-array.js @@ -0,0 +1,22 @@ +/** + * @private + * find if a array contains the object using indexOf or a simple polyFill + * @param {Array} src + * @param {String} find + * @param {String} [findByKey] + * @return {Boolean|Number} false when not found, or the index + */ +export default function inArray(src, find, findByKey) { + if (src.indexOf && !findByKey) { + return src.indexOf(find); + } else { + let i = 0; + while (i < src.length) { + if ((findByKey && src[i][findByKey] == find) || (!findByKey && src[i] === find)) {// do not use === here, test fails + return i; + } + i++; + } + return -1; + } +} diff --git a/node_modules/@egjs/hammerjs/src/utils/in-str.js b/node_modules/@egjs/hammerjs/src/utils/in-str.js new file mode 100644 index 0000000000000000000000000000000000000000..c45fb4f32506a4bc75cc94366594d3257384be99 --- /dev/null +++ b/node_modules/@egjs/hammerjs/src/utils/in-str.js @@ -0,0 +1,10 @@ +/** + * @private + * small indexOf wrapper + * @param {String} str + * @param {String} find + * @returns {Boolean} found + */ +export default function inStr(str, find) { + return str.indexOf(find) > -1; +} diff --git a/node_modules/@egjs/hammerjs/src/utils/inherit.js b/node_modules/@egjs/hammerjs/src/utils/inherit.js new file mode 100644 index 0000000000000000000000000000000000000000..1780b175d5084b0a6ff4e217f153c61a2e91a616 --- /dev/null +++ b/node_modules/@egjs/hammerjs/src/utils/inherit.js @@ -0,0 +1,20 @@ +import assign from './assign'; +/** + * @private + * simple class inheritance + * @param {Function} child + * @param {Function} base + * @param {Object} [properties] + */ +export default function inherit(child, base, properties) { + let baseP = base.prototype; + let childP; + + childP = child.prototype = Object.create(baseP); + childP.constructor = child; + childP._super = baseP; + + if (properties) { + assign(childP, properties); + } +} diff --git a/node_modules/@egjs/hammerjs/src/utils/invoke-array-arg.js b/node_modules/@egjs/hammerjs/src/utils/invoke-array-arg.js new file mode 100644 index 0000000000000000000000000000000000000000..7f909ab6c9a8831e7c5641ff0d66035724e7db14 --- /dev/null +++ b/node_modules/@egjs/hammerjs/src/utils/invoke-array-arg.js @@ -0,0 +1,18 @@ +import each from './each'; +/** + * @private + * if the argument is an array, we want to execute the fn on each entry + * if it aint an array we don't want to do a thing. + * this is used by all the methods that accept a single and array argument. + * @param {*|Array} arg + * @param {String} fn + * @param {Object} [context] + * @returns {Boolean} + */ +export default function invokeArrayArg(arg, fn, context) { + if (Array.isArray(arg)) { + each(arg, context[fn], context); + return true; + } + return false; +} diff --git a/node_modules/@egjs/hammerjs/src/utils/merge.js b/node_modules/@egjs/hammerjs/src/utils/merge.js new file mode 100644 index 0000000000000000000000000000000000000000..015447d9c69a99cc862d5ff15d6b1b431cff7930 --- /dev/null +++ b/node_modules/@egjs/hammerjs/src/utils/merge.js @@ -0,0 +1,15 @@ +import deprecate from './deprecate'; +import extend from './extend'; +/** + * @private + * merge the values from src in the dest. + * means that properties that exist in dest will not be overwritten by src + * @param {Object} dest + * @param {Object} src + * @returns {Object} dest + */ +const merge = deprecate((dest, src) => { + return extend(dest, src, true); +}, 'merge', 'Use `assign`.'); + +export default merge; diff --git a/node_modules/@egjs/hammerjs/src/utils/prefixed.js b/node_modules/@egjs/hammerjs/src/utils/prefixed.js new file mode 100644 index 0000000000000000000000000000000000000000..9f4fd2602721f9366031f14cb4061b09836caafa --- /dev/null +++ b/node_modules/@egjs/hammerjs/src/utils/prefixed.js @@ -0,0 +1,25 @@ +import { VENDOR_PREFIXES } from './utils-consts'; +/** + * @private + * get the prefixed property + * @param {Object} obj + * @param {String} property + * @returns {String|Undefined} prefixed + */ +export default function prefixed(obj, property) { + let prefix; + let prop; + let camelProp = property[0].toUpperCase() + property.slice(1); + + let i = 0; + while (i < VENDOR_PREFIXES.length) { + prefix = VENDOR_PREFIXES[i]; + prop = (prefix) ? prefix + camelProp : property; + + if (prop in obj) { + return prop; + } + i++; + } + return undefined; +} diff --git a/node_modules/@egjs/hammerjs/src/utils/remove-event-listeners.js b/node_modules/@egjs/hammerjs/src/utils/remove-event-listeners.js new file mode 100644 index 0000000000000000000000000000000000000000..a26898743cf777356349f2cb82babad65005673d --- /dev/null +++ b/node_modules/@egjs/hammerjs/src/utils/remove-event-listeners.js @@ -0,0 +1,14 @@ +import each from './each'; +import splitStr from './split-str'; +/** + * @private + * removeEventListener with multiple events at once + * @param {EventTarget} target + * @param {String} types + * @param {Function} handler + */ +export default function removeEventListeners(target, types, handler) { + each(splitStr(types), (type) => { + target.removeEventListener(type, handler, false); + }); +} diff --git a/node_modules/@egjs/hammerjs/src/utils/set-timeout-context.js b/node_modules/@egjs/hammerjs/src/utils/set-timeout-context.js new file mode 100644 index 0000000000000000000000000000000000000000..9f461bb46b0e5081d33023a80cc4541899ba325a --- /dev/null +++ b/node_modules/@egjs/hammerjs/src/utils/set-timeout-context.js @@ -0,0 +1,13 @@ +import bindFn from './bind-fn'; + +/** + * @private + * set a timeout with a given scope + * @param {Function} fn + * @param {Number} timeout + * @param {Object} context + * @returns {number} + */ +export default function setTimeoutContext(fn, timeout, context) { + return setTimeout(bindFn(fn, context), timeout); +} diff --git a/node_modules/@egjs/hammerjs/src/utils/split-str.js b/node_modules/@egjs/hammerjs/src/utils/split-str.js new file mode 100644 index 0000000000000000000000000000000000000000..352e73fb647635879a004940f5ec87fe480ca507 --- /dev/null +++ b/node_modules/@egjs/hammerjs/src/utils/split-str.js @@ -0,0 +1,10 @@ +/** + * @private + * split string on whitespace + * @param {String} str + * @returns {Array} words + */ + +export default function splitStr(str) { + return str.trim().split(/\s+/g); +} diff --git a/node_modules/@egjs/hammerjs/src/utils/to-array.js b/node_modules/@egjs/hammerjs/src/utils/to-array.js new file mode 100644 index 0000000000000000000000000000000000000000..8187e8326afc67ba46b8c5d5841864a2425c6c6b --- /dev/null +++ b/node_modules/@egjs/hammerjs/src/utils/to-array.js @@ -0,0 +1,9 @@ +/** + * @private + * convert array-like objects to real arrays + * @param {Object} obj + * @returns {Array} + */ +export default function toArray(obj) { + return Array.prototype.slice.call(obj, 0); +} diff --git a/node_modules/@egjs/hammerjs/src/utils/unique-array.js b/node_modules/@egjs/hammerjs/src/utils/unique-array.js new file mode 100644 index 0000000000000000000000000000000000000000..36a95aeb807fe375d07b4df7f9a81920848bc409 --- /dev/null +++ b/node_modules/@egjs/hammerjs/src/utils/unique-array.js @@ -0,0 +1,36 @@ +import inArray from './in-array'; + +/** + * @private + * unique array with objects based on a key (like 'id') or just by the array's value + * @param {Array} src [{id:1},{id:2},{id:1}] + * @param {String} [key] + * @param {Boolean} [sort=False] + * @returns {Array} [{id:1},{id:2}] + */ +export default function uniqueArray(src, key, sort) { + let results = []; + let values = []; + let i = 0; + + while (i < src.length) { + let val = key ? src[i][key] : src[i]; + if (inArray(values, val) < 0) { + results.push(src[i]); + } + values[i] = val; + i++; + } + + if (sort) { + if (!key) { + results = results.sort(); + } else { + results = results.sort((a, b) => { + return a[key] > b[key]; + }); + } + } + + return results; +} diff --git a/node_modules/@egjs/hammerjs/src/utils/unique-id.js b/node_modules/@egjs/hammerjs/src/utils/unique-id.js new file mode 100644 index 0000000000000000000000000000000000000000..10916ab104d64708aa95f7e457ce1bbfaa3ddee4 --- /dev/null +++ b/node_modules/@egjs/hammerjs/src/utils/unique-id.js @@ -0,0 +1,9 @@ +/** + * @private + * get a unique id + * @returns {number} uniqueId + */ +let _uniqueId = 1; +export default function uniqueId() { + return _uniqueId++; +} diff --git a/node_modules/@egjs/hammerjs/src/utils/utils-consts.js b/node_modules/@egjs/hammerjs/src/utils/utils-consts.js new file mode 100644 index 0000000000000000000000000000000000000000..6bca649018b003ef30190e972b54cea256fb0887 --- /dev/null +++ b/node_modules/@egjs/hammerjs/src/utils/utils-consts.js @@ -0,0 +1,17 @@ + +const VENDOR_PREFIXES = ['', 'webkit', 'Moz', 'MS', 'ms', 'o']; +const TEST_ELEMENT = typeof document === "undefined" ? {style: {}} : document.createElement('div'); + +const TYPE_FUNCTION = 'function'; + +const { round, abs } = Math; +const { now } = Date; + +export { + VENDOR_PREFIXES, + TEST_ELEMENT, + TYPE_FUNCTION, + round, + abs, + now +}; diff --git a/node_modules/@egjs/hammerjs/testrollup.config.js b/node_modules/@egjs/hammerjs/testrollup.config.js new file mode 100644 index 0000000000000000000000000000000000000000..a3e99c86204b721164252709b0f1c75b51719fcc --- /dev/null +++ b/node_modules/@egjs/hammerjs/testrollup.config.js @@ -0,0 +1,31 @@ +import babel from "rollup-plugin-babel"; +import { uglify } from "rollup-plugin-uglify"; + +export default [ + { + input: "./tests/index.js", + plugins: [babel({ exclude: "node_modules/**" })], + output: { + format: "umd", + name: "Hammer", + exports: "default", + freeze: false, + interop: false, + sourcemap: true, + file: "./testdist/hammer.js", + }, + }, + { + input: "./tests/index.js", + plugins: [babel({ exclude: "node_modules/**" }), uglify({ sourcemap: true })], + output: { + format: "umd", + name: "Hammer", + exports: "default", + freeze: false, + interop: false, + sourcemap: true, + file: "./testdist/hammer.min.js", + }, + }, +]; diff --git a/node_modules/@egjs/hammerjs/tests/index.js b/node_modules/@egjs/hammerjs/tests/index.js new file mode 100644 index 0000000000000000000000000000000000000000..40174d9156fa171eeb26084c9167ca362df5ad4c --- /dev/null +++ b/node_modules/@egjs/hammerjs/tests/index.js @@ -0,0 +1,6 @@ +import {Manager, Pan, Pinch, DIRECTION_NONE, DIRECTION_VERTICAL, DIRECTION_HORIZONTAL, DIRECTION_ALL, PointerEventInput, TouchMouseInput, TouchInput, MouseInput} from "../src/index"; + +console.log(Manager, Pan, Pinch, PointerEventInput, TouchMouseInput, TouchInput, MouseInput, DIRECTION_NONE, DIRECTION_VERTICAL, DIRECTION_HORIZONTAL, DIRECTION_ALL); + + +export default {}; diff --git a/node_modules/@egjs/hammerjs/tests/manual/assets/style.css b/node_modules/@egjs/hammerjs/tests/manual/assets/style.css new file mode 100644 index 0000000000000000000000000000000000000000..332c999ff8b97042045c80e9f2f9e206e97a0427 --- /dev/null +++ b/node_modules/@egjs/hammerjs/tests/manual/assets/style.css @@ -0,0 +1,42 @@ +@import url(http://fonts.googleapis.com/css?family=Open+Sans); + +*, *:after, *:before { + box-sizing: border-box; + -moz-box-sizing: border-box; +} + +html, body { + margin: 0; + padding: 0; + height: 100%; + min-height: 100%; + background: #eee; + font: 13px/1.5em 'Open Sans', Helvetica, Arial, sans-serif; +} + +a { + color: #4986e7; +} + +.bg1, .green { background: #42d692; } +.bg2, .blue { background: #4986e7; } +.bg3, .red { background: #d06b64; } +.bg4, .purple { background: #cd74e6; } +.bg5, .azure { background: #9fe1e7; } + +body { + margin: 20px; +} + +pre { + background: #fff; + padding: 20px; + margin-bottom: 20px; +} + +.container { + max-width: 900px; + margin: 0 auto; +} + +.clear { clear: both; } diff --git a/node_modules/@egjs/hammerjs/tests/manual/compute_touch_action.html b/node_modules/@egjs/hammerjs/tests/manual/compute_touch_action.html new file mode 100644 index 0000000000000000000000000000000000000000..fca01c19a7ccc8429a5eb6ce97988af3ed28aa43 --- /dev/null +++ b/node_modules/@egjs/hammerjs/tests/manual/compute_touch_action.html @@ -0,0 +1,18 @@ + + + + + + + + Open the inspector and play a bit with the touchAction property. + + + + diff --git a/node_modules/@egjs/hammerjs/tests/manual/input.html b/node_modules/@egjs/hammerjs/tests/manual/input.html new file mode 100644 index 0000000000000000000000000000000000000000..c5ca43aa719f9e5689b9d79c46147ad992a7b982 --- /dev/null +++ b/node_modules/@egjs/hammerjs/tests/manual/input.html @@ -0,0 +1,51 @@ + + + + + + + + Hammer.js + + +
+
+
+ +

+
+        

+    
+ + + + diff --git a/node_modules/@egjs/hammerjs/tests/manual/log.html b/node_modules/@egjs/hammerjs/tests/manual/log.html new file mode 100644 index 0000000000000000000000000000000000000000..8a8bb292245192cd2c96998c3d3390f9c4400012 --- /dev/null +++ b/node_modules/@egjs/hammerjs/tests/manual/log.html @@ -0,0 +1,61 @@ + + + + + + + Hammer.js + + +
+ +
+ +
+ +

+
+        

+
+    
+ + + + diff --git a/node_modules/@egjs/hammerjs/tests/manual/multiple.html b/node_modules/@egjs/hammerjs/tests/manual/multiple.html new file mode 100644 index 0000000000000000000000000000000000000000..544749e9bc5731ed8b41a604038dda6232818a27 --- /dev/null +++ b/node_modules/@egjs/hammerjs/tests/manual/multiple.html @@ -0,0 +1,73 @@ + + + + + + + Hammer.js + + + +
+

+        
+
+        
+ +

Multiple instances the same time

+

You can run multiple instances of Hammer on your page and they will recognize each completely isolated + from each other. This makes it possible to build multi-user interfaces.

+ +
+ + + + diff --git a/node_modules/@egjs/hammerjs/tests/manual/nested.html b/node_modules/@egjs/hammerjs/tests/manual/nested.html new file mode 100644 index 0000000000000000000000000000000000000000..d562173e39640b5d9c328c5a021f6a634ed96b6a --- /dev/null +++ b/node_modules/@egjs/hammerjs/tests/manual/nested.html @@ -0,0 +1,217 @@ + + + + + + + + Hammer.js + + + + + +
+
+
+
1.1
+
1.2
+
1.3
+
1.4
+
1.5
+
+
+
+
+
2.1
+
2.2
+
2.3
+
2.4
+
2.5
+
+
+
+
+
3.1
+
3.2
+
3.3
+
3.4
+
3.5
+
+
+
+
+
4.1
+
4.2
+
4.3
+
4.4
+
4.5
+
+
+
+
+
5.1
+
5.2
+
5.3
+
5.4
+
5.5
+
+
+
+ +
+

Nested Pan recognizers

+ +

Nested recognizers are possible with some threshold and with use of requireFailure().

+
+ + + + + + diff --git a/node_modules/@egjs/hammerjs/tests/manual/simulator-googlemaps.html b/node_modules/@egjs/hammerjs/tests/manual/simulator-googlemaps.html new file mode 100644 index 0000000000000000000000000000000000000000..6100621f60cefb1098fc576ae0a2f6bec278fd08 --- /dev/null +++ b/node_modules/@egjs/hammerjs/tests/manual/simulator-googlemaps.html @@ -0,0 +1,100 @@ + + + + + + Hammer.js + + + +
+
+ +

Gestures simulator

+

Used for unit-testing Hammer.js. To test it on the Google Maps view, you should open your + + Inspector and emulate a touch-screen. + Or just open it on your touch-device.

+

Currently, it only triggers touchEvents.

+
+ + + + + + + diff --git a/node_modules/@egjs/hammerjs/tests/manual/simulator.html b/node_modules/@egjs/hammerjs/tests/manual/simulator.html new file mode 100644 index 0000000000000000000000000000000000000000..cf4fa04671f367f1be30bec58374d333db444386 --- /dev/null +++ b/node_modules/@egjs/hammerjs/tests/manual/simulator.html @@ -0,0 +1,118 @@ + + + + + + Hammer.js + + + +
+ +
+
+ +

+
+    

+
+
+ + + + + + + diff --git a/node_modules/@egjs/hammerjs/tests/manual/touchaction.html b/node_modules/@egjs/hammerjs/tests/manual/touchaction.html new file mode 100644 index 0000000000000000000000000000000000000000..edff019ab470bec2d86911c74b0e641eaf2526c4 --- /dev/null +++ b/node_modules/@egjs/hammerjs/tests/manual/touchaction.html @@ -0,0 +1,91 @@ + + + + + + Hammer.js + + + + + +
+

Hammer provides a kind of polyfill + for the browsers that don't support the touch-action property.

+ +
Your browser has support for the touch-action property!
+
Your browser doesn't support the touch-action property, + so we use the polyfill.
+ +

touch-action: auto

+

Should prevent nothing.

+
+ +

touch-action: pan-y

+

Should prevent scrolling on horizontal movement. This is set by default when creating a Hammer instance.

+
+ +

touch-action: pan-x

+

Should prevent scrolling on vertical movement.

+
+ +

touch-action: pan-x pan-y

+

Should not prevent any scrolling on any movement. Horizontal and vertical scrolling handled by the browser directly.

+
+ +

touch-action: none

+

Should prevent all.

+
+
+ + + +
+

hi.

+ + + diff --git a/node_modules/@egjs/hammerjs/tests/manual/visual.html b/node_modules/@egjs/hammerjs/tests/manual/visual.html new file mode 100644 index 0000000000000000000000000000000000000000..b24a7a4fd744d98de986b1b4cb0d388f102e6283 --- /dev/null +++ b/node_modules/@egjs/hammerjs/tests/manual/visual.html @@ -0,0 +1,211 @@ + + + + + + Hammer.js + + + + + +
+
+ + + + + + diff --git a/node_modules/@egjs/hammerjs/tests/unit/assets/utils.js b/node_modules/@egjs/hammerjs/tests/unit/assets/utils.js new file mode 100644 index 0000000000000000000000000000000000000000..10fda61871805c67df785a4151e25bf3b6cbdc6a --- /dev/null +++ b/node_modules/@egjs/hammerjs/tests/unit/assets/utils.js @@ -0,0 +1,50 @@ +var utils = { + /** + * trigger simple dom event + * @param obj + * @param name + */ + triggerDomEvent: function(obj, name) { + var event = document.createEvent('Event'); + event.initEvent(name, true, true); + obj.dispatchEvent(event); + }, + + + createTouchEvent: function(name, x, y, identifier) { + var event = document.createEvent('Event'); + event.initEvent('touch' + name, true, true); + + event.touches = event.targetTouches = [{ + clientX: x, + clientY: y, + identifier: identifier || 0 + }]; + + //https://developer.mozilla.org/en-US/docs/Web/API/TouchEvent.changedTouches + event.changedTouches = [{ + clientX: x, + clientY: y, + identifier: identifier || 0 + }]; + + return event; + }, + + dispatchTouchEvent: function(el, name, x, y, identifier) { + var event = utils.createTouchEvent(name, x, y, identifier); + el.dispatchEvent(event); + }, + + createHitArea: function(parent) { + if (parent == null) { + parent = document.getElementById('qunit-fixture') + } + var hitArea = document.createElement('div'); + hitArea.style.background = '#eee'; + hitArea.style.height = '300px'; + + parent.appendChild(hitArea); + return hitArea; + } +}; diff --git a/node_modules/@egjs/hammerjs/tests/unit/gestures/test_pan.js b/node_modules/@egjs/hammerjs/tests/unit/gestures/test_pan.js new file mode 100644 index 0000000000000000000000000000000000000000..96d9050c326c77c9c6f8f4ac714e445b76924677 --- /dev/null +++ b/node_modules/@egjs/hammerjs/tests/unit/gestures/test_pan.js @@ -0,0 +1,67 @@ +// jscs:disable requireArrowFunctions,disallowVar,requireEnhancedObjectLiterals +/* globals QUnit,Hammer,utils,Simulator */ + +var el; +var hammer; + +QUnit.module('Pan Gesture', { + beforeEach: function() { + el = document.createElement('div'); + document.body.appendChild(el); + + hammer = new Hammer(el, { recognizers: [] }); + }, + afterEach: function() { + document.body.removeChild(el); + hammer.destroy(); + } + }); + +QUnit.test('`panstart` and `panmove` should be recognized', function(assert) { + assert.expect(2); + + var panMoveCount = 0; + var pan = new Hammer.Pan({ threshold: 1 }); + + hammer.add(pan); + hammer.on('panstart', function() { + assert.ok(true, 'Pan start triggered'); + }); + hammer.on('panmove', function() { + panMoveCount++; + }); + + utils.dispatchTouchEvent(el, 'start', 50, 50); + utils.dispatchTouchEvent(el, 'move', 70, 50); + utils.dispatchTouchEvent(el, 'move', 90, 50); + + assert.equal(panMoveCount, 1, 'exactly one panMove triggered'); + }); + +QUnit.test('Pan event flow should be start -> left -> end', function(assert) { + var done = assert.async(); + assert.expect(1); + var pan = new Hammer.Pan({ threshold: 1 }); + hammer.add(pan); + + var eventflow = ''; + var isCalledPanleft = false; + hammer.on('panstart', function() { + eventflow += 'start'; + }); + hammer.on('panleft', function() { + if (!isCalledPanleft) { + isCalledPanleft = true; + eventflow += 'left'; + } + }); + hammer.on('panend', function() { + eventflow += 'end'; + isCalledPanleft = true; + }); + + Simulator.gestures.pan(el, { deltaX: -100, deltaY: 0 }, function() { + assert.equal(eventflow, 'startleftend', 'correct event flow'); + done(); + }); + }); diff --git a/node_modules/@egjs/hammerjs/tests/unit/gestures/test_pinch.js b/node_modules/@egjs/hammerjs/tests/unit/gestures/test_pinch.js new file mode 100644 index 0000000000000000000000000000000000000000..b1f1feceba0f6465765f58aed98f05d061bcc327 --- /dev/null +++ b/node_modules/@egjs/hammerjs/tests/unit/gestures/test_pinch.js @@ -0,0 +1,46 @@ +// jscs:disable requireArrowFunctions,disallowVar,requireEnhancedObjectLiterals +/* globals QUnit,Hammer,Simulator */ + +var el; +var hammer; + +QUnit.module('Pinch Gesture', { + beforeEach: function() { + el = document.createElement('div'); + document.body.appendChild(el); + + hammer = new Hammer(el, { recognizers: [] }); + }, + afterEach: function() { + document.body.removeChild(el); + hammer.destroy(); + } + }); + +QUnit.test('Pinch event flow should be start -> in -> end', function(assert) { + var done = assert.async(); + assert.expect(1); + var pinch = new Hammer.Pinch({ enable: true, threshold: 0.1 }); + hammer.add(pinch); + + var eventflow = ''; + var isFiredPinchin = false; + hammer.on('pinchstart', function() { + eventflow += 'start'; + }); + hammer.on('pinchin', function() { + if (!isFiredPinchin) { + isFiredPinchin = true; + eventflow += 'in'; + } + }); + hammer.on('pinchend', function() { + eventflow += 'end'; + isFiredPinchin = false; + }); + + Simulator.gestures.pinch(el, { duration: 500, scale: 0.5 }, function() { + assert.equal(eventflow, 'startinend', 'correct event flow'); + done(); + }); + }); diff --git a/node_modules/@egjs/hammerjs/tests/unit/gestures/test_swipe.js b/node_modules/@egjs/hammerjs/tests/unit/gestures/test_swipe.js new file mode 100644 index 0000000000000000000000000000000000000000..60fb58da290e5b4bd067c470454bbdf75cbe8491 --- /dev/null +++ b/node_modules/@egjs/hammerjs/tests/unit/gestures/test_swipe.js @@ -0,0 +1,29 @@ +// jscs:disable requireArrowFunctions,disallowVar,requireEnhancedObjectLiterals +/* globals QUnit,Hammer,utils,Simulator */ + +var el; +var hammer; +var swipeCount = 0; + +QUnit.module('Swipe Gesture', { + beforeEach: function() { + el = utils.createHitArea(); + hammer = new Hammer(el, { recognizers: [] }); + swipeCount = 0; + }, + afterEach: function() { + hammer.destroy(); + } + }); + +QUnit.test('swipe can be recognized', function(assert) { + assert.expect(1); + var done = assert.async(); + var swipe = new Hammer.Swipe({ threshold: 1 }); + hammer.add(swipe); + hammer.on('swipe', function() { + assert.ok(true); + done(); + }); + Simulator.gestures.swipe(el); + }); diff --git a/node_modules/@egjs/hammerjs/tests/unit/index.html b/node_modules/@egjs/hammerjs/tests/unit/index.html new file mode 100644 index 0000000000000000000000000000000000000000..e87df116f22be841b1926327d8d6c1084e13b42b --- /dev/null +++ b/node_modules/@egjs/hammerjs/tests/unit/index.html @@ -0,0 +1,43 @@ + + + + + Tests + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + diff --git a/node_modules/@egjs/hammerjs/tests/unit/test_enable.js b/node_modules/@egjs/hammerjs/tests/unit/test_enable.js new file mode 100644 index 0000000000000000000000000000000000000000..8af9b8bb9c90b6a13f1a5715d0cca89bb57e0d8e --- /dev/null +++ b/node_modules/@egjs/hammerjs/tests/unit/test_enable.js @@ -0,0 +1,179 @@ +// jscs:disable requireArrowFunctions,disallowVar,requireEnhancedObjectLiterals +/* globals QUnit,Hammer,utils */ +/* jshint unused:false */ + +var el, + hammer, + counter; + +QUnit.module('Test recognizer enable', { + beforeEach: function() { + el = utils.createHitArea(); + hammer = new Hammer.Manager(el, { recognizers: [] }); + counter = 0; + }, + afterEach: function() { + hammer && hammer.destroy(); + } + }); + +QUnit.test('should disable a recognizer through the `enable` constructor parameter', function(assert) { + assert.expect(1); + hammer.add(new Hammer.Tap({ enable: false })); + hammer.on('tap', function() { + counter++; + }); + + var done = assert.async(); + + utils.dispatchTouchEvent(el, 'start', 50, 50); + utils.dispatchTouchEvent(el, 'end', 50, 50); + + setTimeout(function() { + + assert.equal(counter, 0, 'counter is zero'); + done(); + }, 100); + }); + +QUnit.test('should disable recognizing when the manager is disabled.', function(assert) { + assert.expect(1); + hammer.set({ enable: false }); + hammer.add(new Hammer.Tap()); + hammer.on('tap', function() { + counter++; + }); + + var done = assert.async(); + + utils.dispatchTouchEvent(el, 'start', 50, 50); + utils.dispatchTouchEvent(el, 'end', 50, 50); + + setTimeout(function() { + assert.equal(counter, 0, 'counter is zero'); + done(); + }, 100); + }); + +QUnit.test('should toggle a recognizer using the `set` call to the recognizer enable property', function(assert) { + assert.expect(2); + + hammer.add(new Hammer.Tap()); + hammer.on('tap', function() { + counter++; + }); + + utils.dispatchTouchEvent(el, 'start', 50, 50); + utils.dispatchTouchEvent(el, 'end', 50, 50); + assert.equal(counter, 1); + + hammer.get('tap').set({ enable: false }); + + utils.dispatchTouchEvent(el, 'start', 50, 50); + utils.dispatchTouchEvent(el, 'end', 50, 50); + assert.equal(counter, 1, 'counter is 1'); + }); + +QUnit.test('should accept the `enable` constructor parameter as function', function(assert) { + assert.expect(2); + + var canRecognizeTap = false; + + var tap = new Hammer.Tap({ + enable: function() { + return canRecognizeTap; + } + }); + + hammer.add(tap); + hammer.on('tap', function() { + counter++; + }); + + var done = assert.async(); + utils.dispatchTouchEvent(el, 'start', 50, 50); + utils.dispatchTouchEvent(el, 'end', 50, 50); + + setTimeout(function() { + assert.equal(counter, 0, 'counter is zero'); + + canRecognizeTap = true; + + utils.dispatchTouchEvent(el, 'start', 50, 50); + utils.dispatchTouchEvent(el, 'end', 50, 50); + + assert.equal(counter, 1, 'counter is 1'); + done(); + }, 100); + }); + +QUnit.test('should accept a function parameter with `set`', function(assert) { + assert.expect(3); + + hammer.add(new Hammer.Tap()); + hammer.on('tap', function() { + counter++; + }); + + utils.dispatchTouchEvent(el, 'start', 50, 50); + utils.dispatchTouchEvent(el, 'end', 50, 50); + assert.equal(counter, 1, 'counter is 1'); + + var canRecognizeTap = false; + hammer.get('tap').set({ enable: function() { + return canRecognizeTap; + } }); + + utils.dispatchTouchEvent(el, 'start', 50, 50); + utils.dispatchTouchEvent(el, 'end', 50, 50); + assert.equal(counter, 1, 'counter is 1'); + + canRecognizeTap = true; + utils.dispatchTouchEvent(el, 'start', 50, 50); + utils.dispatchTouchEvent(el, 'end', 50, 50); + assert.equal(counter, 2, 'counter is 2'); + }); + +QUnit.test('should pass the recognizer and optional the input parameter to the `enable` callback', function(assert) { + assert.expect(2); + + var tap; + + // The enable function is called initially to setup the touch-action property + // at that moment there isn't any input + var canEnable = function(recognizer, input) { + assert.equal(recognizer, tap, 'recognizer is tap'); + return true; + }; + tap = new Hammer.Tap({ enable: canEnable }); + hammer.add(tap); + + utils.dispatchTouchEvent(el, 'start', 50, 50); + }); + +QUnit.test('should toggle based on other object method', function(assert) { + assert.expect(2); + + var view = { + state: 0, + canRecognizeTap: function(recognizer, input) { + return this.state !== 0; + } + }; + + hammer.add(new Hammer.Tap({ enable: function(rec, input) { + return view.canRecognizeTap(rec, input); + } })); + hammer.on('tap', function() { + counter++; + }); + + utils.dispatchTouchEvent(el, 'start', 50, 50); + utils.dispatchTouchEvent(el, 'end', 50, 50); + assert.equal(counter, 0, 'counter is 0'); + + view.state = 1; + utils.dispatchTouchEvent(el, 'start', 50, 50); + utils.dispatchTouchEvent(el, 'end', 50, 50); + assert.equal(counter, 1, 'counter is 1'); + }); diff --git a/node_modules/@egjs/hammerjs/tests/unit/test_events.js b/node_modules/@egjs/hammerjs/tests/unit/test_events.js new file mode 100644 index 0000000000000000000000000000000000000000..fe7f04ca2c0fb0754f204890e4e032d41562f458 --- /dev/null +++ b/node_modules/@egjs/hammerjs/tests/unit/test_events.js @@ -0,0 +1,64 @@ +// jscs:disable requireArrowFunctions,disallowVar,requireEnhancedObjectLiterals +/* globals QUnit,Hammer,utils,el */ + +QUnit.module('eventEmitter'); + +QUnit.test('test the eventemitter', function(assert) { + assert.expect(6); + + var ee = new Hammer.Manager(utils.createHitArea()); + var inputData = { + target: document.body, + srcEvent: { + preventDefault: function() { + assert.ok(true, 'preventDefault ref'); + }, + target: document.body + } + }; + + function event3Handler() { + assert.ok(true, 'emitted event3'); + } + + ee.on('testEvent1', function() { + assert.ok(true, 'emitted event'); + }); + ee.on('testEvent2', function(ev) { + assert.ok(true, 'emitted event'); + ev.preventDefault(); + assert.ok(ev.target === document.body, 'target is the body'); + }); + ee.on('testEvent3', event3Handler); + + ee.emit('testEvent1', inputData); + ee.emit('testEvent2', inputData); + ee.emit('testEvent3', inputData); + + // Unbind testEvent2 + ee.off('testEvent2'); + ee.off('testEvent3', event3Handler); + + ee.emit('testEvent1', inputData); // Should trigger testEvent1 again + ee.emit('testEvent2', inputData); // Doenst trigger a thing + ee.emit('testEvent3', inputData); // Doenst trigger a thing + + // Destroy + ee.destroy(); + + ee.emit('testEvent1', inputData); // Doenst trigger a thing + ee.emit('testEvent2', inputData); // Doenst trigger a thing + ee.emit('testEvent3', inputData); // Doenst trigger a thing + }); + +/* + * Hammer.Manager.off method : exception handling + */ +QUnit.test('When Hammer.Manager didnt attach an event, `off` method is ignored', function(assert) { + var count = 0; + var hammer = new Hammer(el, { inputTarget: document.body }); + hammer.off('swipeleft', function() { + count++; + }); + assert.ok(true, 'nothing'); + }); diff --git a/node_modules/@egjs/hammerjs/tests/unit/test_gestures.js b/node_modules/@egjs/hammerjs/tests/unit/test_gestures.js new file mode 100644 index 0000000000000000000000000000000000000000..b0be31415c0fe7bdb96e4f1ba47a234c4d344269 --- /dev/null +++ b/node_modules/@egjs/hammerjs/tests/unit/test_gestures.js @@ -0,0 +1,225 @@ +// jscs:disable requireArrowFunctions,disallowVar,requireEnhancedObjectLiterals +/* globals QUnit,Hammer,utils,Simulator */ + +// TODO: this tests fails because tapRecognizer changes +// it could be that tapRecognizer setup its BEGAN state and +// disable the other gesture recognition +var el; +var hammer; +var events; +var allGestureEvents = [ + 'tap doubletap press', + 'pinch pinchin pinchout pinchstart pinchmove pinchend pinchcancel', + 'rotate rotatestart rotatemove rotateend rotatecancel', + 'pan panstart panmove panup pandown panleft panright panend pancancel', + 'swipe swipeleft swiperight swipeup swipedown' +].join(' '); + +QUnit.module('Gesture recognition', { + beforeEach: function() { + el = utils.createHitArea(); + hammer = new Hammer(el); + hammer.get('pinch') + .set({ // Some threshold, since the simulator doesnt stays at scale:1 when rotating + enable: true, + threshold: 0.1 + }); + + hammer.get('rotate') + .set({ enable: true }); + + hammer.on(allGestureEvents, function(ev) { + events[ ev.type ] = true; + }); + events = {}; + }, + afterEach: function() { + hammer && hammer.destroy(); + events = null; + } + }); + +QUnit.test('recognize pan', function(assert) { + var done = assert.async(); + assert.expect(1); + + Simulator.gestures.pan(el, { duration: 500, deltaX: 100, deltaY: 0 }, function() { + assert.deepEqual(events, { + pan: true, + panstart: true, + panmove: true, + panright: true, + panend: true + }, 'Pan events recognized'); + done(); + }); + }); + +QUnit.test('recognize press', function(assert) { + var done = assert.async(); + assert.expect(1); + + Simulator.gestures.press(el, null, function() { + assert.deepEqual(events, { + press: true + }); + done(); + }, 'only press was recognized'); + }); + +QUnit.test('recognize swipe', function(assert) { + var done = assert.async(); + assert.expect(1); + + Simulator.gestures.swipe(el, { duration: 300, deltaX: 400, deltaY: 0 }, function() { + assert.deepEqual(events, { + pan: true, + panstart: true, + panmove: true, + panright: true, + panend: true, + swipe: true, + swiperight: true + }, 'pan and swipe events were recognized'); + done(); + }); + }); + +QUnit.test('recognize pinch', function(assert) { + var done = assert.async(); + assert.expect(1); + + Simulator.gestures.pinch(el, { duration: 500, scale: 0.5 }, function() { + assert.deepEqual(events, { + pinch: true, + pinchstart: true, + pinchmove: true, + pinchend: true, + pinchin: true + }, 'pinch events were recognized'); + done(); + }); + }); + +QUnit.test('recognize children multitouch pinch', function(assert) { + var done = assert.async(); + assert.expect(1); + + var el1 = utils.createHitArea(el); + var el2 = utils.createHitArea(el); + + Simulator.gestures.pinch([ el1, el2 ], { duration: 500, scale: 0.5 }, function() { + assert.deepEqual(events, { + pinch: true, + pinchstart: true, + pinchmove: true, + pinchend: true, + pinchin: true + }, 'pinch events on child were recognized'); + done(); + }); + }); + +QUnit.test('recognize parent-child multitouch pinch', function(assert) { + var done = assert.async(); + assert.expect(1); + + var el1 = utils.createHitArea(el); + + Simulator.gestures.pinch([ el, el1 ], { duration: 100, scale: 0.5 }, function() { + assert.deepEqual(events, { + pinch: true, + pinchstart: true, + pinchmove: true, + pinchend: true, + pinchin: true + }, 'Pinch events on parent were recognized'); + done(); + }); + }); + +QUnit.test('recognize rotate', function(assert) { + var done = assert.async(); + assert.expect(1); + + Simulator.gestures.rotate(el, { duration: 500, scale: 1 }, function() { + assert.deepEqual(events, { + rotate: true, + rotatestart: true, + rotatemove: true, + rotateend: true + }, 'Rotate events recognized'); + done(); + }); + }); + +QUnit.test('recognize multitouch rotate', function(assert) { + var done = assert.async(); + assert.expect(1); + + var el1 = utils.createHitArea(el); + + Simulator.gestures.rotate([ el, el1 ], { duration: 500, scale: 1 }, function() { + assert.deepEqual(events, { + rotate: true, + rotatestart: true, + rotatemove: true, + rotateend: true + }, 'Rotate events were recognized'); + done(); + }); + }); + +QUnit.test('recognize rotate and pinch simultaneous', function(assert) { + var done = assert.async(); + assert.expect(1); + + Simulator.gestures.pinchRotate(el, { duration: 500, scale: 2 }, function() { + assert.deepEqual(events, { + rotate: true, + rotatestart: true, + rotatemove: true, + rotateend: true, + pinch: true, + pinchstart: true, + pinchmove: true, + pinchend: true, + pinchout: true + }, 'Rotate and pinch were recognized together'); + done(); + }); + }); + +QUnit.test("don't recognize pan and swipe when moving down, when only horizontal is allowed", function(assert) { + var done = assert.async(); + assert.expect(1); + + Simulator.gestures.swipe(el, { duration: 250, deltaX: 0, deltaZ: 200 }, function() { + assert.deepEqual(events, { }, 'No events were recognized'); + done(); + }); + }); + +QUnit.test("don't recognize press if duration is too short.", function(assert) { + var done = assert.async(); + assert.expect(1); + + Simulator.gestures.press(el, { duration: 240 }); + + setTimeout(function() { + assert.deepEqual(events, { tap: true }, 'Tap gesture has been recognized.'); + done(); + }, 275); + }); + +QUnit.test("don't recognize tap if duration is too long.", function(assert) { + var done = assert.async(); + assert.expect(1); + + Simulator.gestures.tap(el, { duration: 255 }); + + setTimeout(function() { + assert.deepEqual(events, { press: true }, 'Press gesture has been recognized.'); + done(); + }, 275); + }); diff --git a/node_modules/@egjs/hammerjs/tests/unit/test_hammer.js b/node_modules/@egjs/hammerjs/tests/unit/test_hammer.js new file mode 100644 index 0000000000000000000000000000000000000000..b75b87a5210693c90de7a2c1cf428bb2c151ab15 --- /dev/null +++ b/node_modules/@egjs/hammerjs/tests/unit/test_hammer.js @@ -0,0 +1,197 @@ +// jscs:disable requireArrowFunctions,disallowVar,requireEnhancedObjectLiterals,requireTemplateStringsForConcatenation,requireArrayDestructuring +/* globals QUnit,Hammer,utils,Simulator */ + +var el, el2, + hammer, hammer2; + +QUnit.module('Tests', { + beforeEach: function() { + el = utils.createHitArea(); + el2 = utils.createHitArea(); + }, + + afterEach: function() { + if (hammer) { + hammer.destroy(); + hammer = null; + } + if (hammer2) { + hammer2.destroy(); + hammer2 = null; + } + } + }); + +// since Hammer is now a ES6 Class and we cannot call a class as a function, +// it needs a `new` keyword prefixed that makes this Shortcut test kinda Redundant. + +// QUnit.test( "hammer shortcut", function( assert ) { +// assert.expect( 2 ); +// +// Hammer.defaults.touchAction = "pan-y"; +// hammer = Hammer( el ); +// +// assert.ok( hammer instanceof Hammer.Manager, "returns an instance of Manager" ); +// assert.ok( hammer.touchAction.actions == Hammer.defaults.touchAction, "set the default touchAction" ); +// } ); +// +// QUnit.test( "hammer shortcut with options", function( assert ) { +// assert.expect( 2 ); +// +// hammer = Hammer( el, { +// touchAction: "none" +// } ); +// assert.ok( hammer instanceof Hammer.Manager, "returns an instance of Manager" ); +// assert.ok( hammer.touchAction.actions == "none", "set the default touchAction" ); +// } ); + +/* Creating a hammer instance does not work on the same way + * when using Hammer or Hammer.Manager. + * + * This can confuse developers who read tests to use the library when doc is missing. + */ +QUnit.test('Hammer and Hammer.Manager constructors work exactly on the same way.', function(assert) { + assert.expect(2); + + hammer = new Hammer(el, {}); + assert.equal(Hammer.defaults.preset.length, hammer.recognizers.length, + 'Correct number of recognizers by default'); + + hammer2 = new Hammer.Manager(el, {}); + assert.equal(0, hammer2.recognizers.length, 'No default recognizers with manager and empty object'); + }); + +/* DOC to disable default recognizers should be added. + * + * - Hammer(el). IMO: Currently, well done. + * - Hammer(el, {}) . IMO: should disable default recognizers + * - Hammer(el, {recognizers: null}). IMO: now, it fails. + * - Hammer(el, {recognizers: []}). It works, but it is likely not intuitive. + */ +QUnit.test('A Hammer instance can be setup to not having default recognizers.', function(assert) { + assert.expect(1); + + hammer = new Hammer(el, { recognizers: false }); + assert.equal(0, hammer.recognizers.length, 'No default recognizers with recognizers false'); + }); + +/* The case was when I added a custom tap event which was added to the default + * recognizers, and my custom tap gesture wasn't working (I do not know exactly the reason), + * but removing the default recognizers solved the issue. + */ +QUnit.test('Adding the same recognizer type should remove the old recognizer', function(assert) { + assert.expect(4); + + hammer = new Hammer(el); + + assert.ok(!!hammer.get('tap')); + assert.equal(7, hammer.recognizers.length, '7 recognizers found'); + + var newTap = new Hammer.Tap({ time: 1337 }); + hammer.add(newTap); + + assert.equal(7, hammer.recognizers.length, '7 recognizers found after adding tap'); + assert.equal(1337, hammer.get('tap').options.time, 'Time has been updated to reflect new tap'); + }); + +/* + * Swipe gesture: + * - in this tests, it does not update input.velocity ( always 0) + * - does not fire swipeleft or swiperight events + */ +QUnit.test('Swiping to the left should fire swipeleft event', function(assert) { + var done = assert.async(); + assert.expect(2); + + hammer = new Hammer(el, { recognizers: [] }); + hammer.add(new Hammer.Swipe()); + hammer.on('swipe swipeleft', function() { + assert.ok(true); + }); + + Simulator.gestures.swipe(el, { pos: [ 300, 300 ], deltaY: 0, deltaX: -200 }, function() { + done(); + }); + }); + +/* + * Input target change + */ +QUnit.test('Should detect input while on other element', function(assert) { + var done = assert.async(); + assert.expect(1); + + hammer = new Hammer(el, { inputTarget: document.body }); + hammer.on('tap', function() { + assert.ok(true); + }); + + Simulator.gestures.tap(document.body, null, function() { + done(); + }); + }); + +/* Hammer.Manager constructor accepts a "recognizers" option in which each + * element is an array representation of a Recognizer. + */ +QUnit.test('Hammer.Manager accepts recognizers as arrays.', function(assert) { + assert.expect(4); + + hammer = new Hammer.Manager(el, { + recognizers: [ + [ Hammer.Swipe ], + [ Hammer.Pinch ], + [ Hammer.Rotate ], + [ Hammer.Pan, { direction: Hammer.DIRECTION_UP }, [ 'swipe', 'pinch' ], [ 'rotate' ] ] + ] + }); + assert.equal(4, hammer.recognizers.length, '4 recognizers found'); + + var recognizerActual = hammer.recognizers[ 3 ]; + assert.equal(recognizerActual.options.direction, Hammer.DIRECTION_UP, + 'Recognize direction from options'); + assert.equal(2, Object.keys(recognizerActual.simultaneous).length, '2 simultanious recognizers found'); + assert.equal(1, recognizerActual.requireFail.length, '1 require failing recognizer found'); + }); + +/* + * Removing a recognizer which cannot be found would errantly remove the last recognizer in the + * manager's list. + */ +QUnit.test('Remove non-existent recognizer.', function(assert) { + assert.expect(1); + + hammer = new Hammer(el, { recognizers: [] }); + hammer.add(new Hammer.Swipe()); + hammer.remove('tap'); + + assert.equal(1, hammer.recognizers.length, '1 recognizer found'); + }); + +QUnit.test('check whether Hammer.defaults.cssProps is restored', function(assert) { + var beforeCssProps = { + userSelect: 'text', + touchSelect: 'grippers', + touchCallout: 'default', + contentZooming: 'chained', + userDrag: 'element', + tapHighlightColor: 'rgba(0, 1, 0, 0)' + }; + var prop; + Hammer.each(Hammer.defaults.cssProps, function(value, name) { + prop = Hammer.prefixed(el.style, name); + if (prop) { + el.style[ prop ] = beforeCssProps[ name ]; + } + }); + + hammer = new Hammer(el); + hammer.destroy(); + hammer = null; + Hammer.each(Hammer.defaults.cssProps, function(value, name) { + prop = Hammer.prefixed(el.style, name); + if (prop) { + assert.equal(el.style[ prop ], beforeCssProps[ name ], 'check if ' + name + ' is restored'); + } + }); + }); diff --git a/node_modules/@egjs/hammerjs/tests/unit/test_jquery_plugin.js b/node_modules/@egjs/hammerjs/tests/unit/test_jquery_plugin.js new file mode 100644 index 0000000000000000000000000000000000000000..33d26ab78d6c02d8e606f44fc5edb048492615ef --- /dev/null +++ b/node_modules/@egjs/hammerjs/tests/unit/test_jquery_plugin.js @@ -0,0 +1,63 @@ +// jscs:disable requireArrowFunctions,disallowVar,requireEnhancedObjectLiterals +/* globals QUnit,Hammer,utils,Simulator,$,jQuery */ + +var el, hammer, events; + +var jQueryPluginPath = '../../node_modules/jquery-hammerjs/jquery.hammer.js'; + +QUnit.module('jQuery plugin', { + beforeEach: function() { + el = utils.createHitArea(); + events = {}; + }, + afterEach: function() { + hammer && hammer.destroy(); + } + }); + +QUnit.test('trigger pan with jQuery', function(assert) { + var done = assert.async(); + assert.expect(2); + + $.getScript(jQueryPluginPath, function() { + jQuery(el).hammer(); + jQuery(el).bind('panstart pan panmove panright panend', function(ev) { + if (ev.gesture) { + events[ ev.type ] = true; + } + }); + + Simulator.gestures.pan(el, { deltaX: 50, deltaY: 0 }, function() { + + assert.deepEqual(events, { + pan: true, + panstart: true, + panmove: true, + panright: true, + panend: true + }, 'Pan events recognized'); + + assert.ok(jQuery(el).data('hammer') instanceof Hammer.Manager, 'data attribute refers to the instance'); + done(); + }); + }); + }); + +QUnit.test('trigger pan without jQuery should still work', function(assert) { + var done = assert.async(); + assert.expect(1); + var hammer = new Hammer(el); + hammer.on('panstart pan panmove panright panend', function(ev) { + events[ev.type] = true; + }); + Simulator.gestures.pan(el, { deltaX: 50, deltaY: 0 }, function() { + assert.deepEqual(events, { + pan: true, + panstart: true, + panmove: true, + panright: true, + panend: true + }, 'Pan events recognized'); + done(); + }); + }); diff --git a/node_modules/@egjs/hammerjs/tests/unit/test_multiple_taps.js b/node_modules/@egjs/hammerjs/tests/unit/test_multiple_taps.js new file mode 100644 index 0000000000000000000000000000000000000000..00e703a781fad1d9bea013a36e5b88c11ceda811 --- /dev/null +++ b/node_modules/@egjs/hammerjs/tests/unit/test_multiple_taps.js @@ -0,0 +1,97 @@ +// jscs:disable requireArrowFunctions,disallowVar,requireEnhancedObjectLiterals +/* globals QUnit,Hammer,utils*/ + +var el; +var hammer; + +var tripleTapCount = 0; +var doubleTapCount = 0; +var tapCount = 0; + +QUnit.module('Tap delay', { + beforeEach: function() { + el = utils.createHitArea(); + hammer = new Hammer(el, { recognizers: [] }); + + var tap = new Hammer.Tap(); + var doubleTap = new Hammer.Tap({ event: 'doubleTap', taps: 2 }); + var tripleTap = new Hammer.Tap({ event: 'tripleTap', taps: 3 }); + + hammer.add([ tripleTap, doubleTap, tap ]); + + tripleTap.recognizeWith([ doubleTap, tap ]); + doubleTap.recognizeWith(tap); + + doubleTap.requireFailure(tripleTap); + tap.requireFailure([ tripleTap, doubleTap ]); + + tripleTapCount = 0; + doubleTapCount = 0; + tapCount = 0; + + hammer.on('tap', function() { + tapCount++; + }); + hammer.on('doubleTap', function() { + doubleTapCount++; + }); + hammer.on('tripleTap', function() { + tripleTapCount++; + }); + }, + afterEach: function() { + hammer.destroy(); + } + }); +QUnit.test('When a tripleTap is fired, doubleTap and Tap should not be recognized', function(assert) { + var done = assert.async(); + assert.expect(3); + + utils.dispatchTouchEvent(el, 'start', 50, 50); + utils.dispatchTouchEvent(el, 'end', 50, 50); + + utils.dispatchTouchEvent(el, 'start', 50, 50); + utils.dispatchTouchEvent(el, 'end', 50, 50); + + utils.dispatchTouchEvent(el, 'start', 50, 50); + utils.dispatchTouchEvent(el, 'end', 50, 50); + + setTimeout(function() { + assert.equal(tripleTapCount, 1, 'one tripletap event'); + assert.equal(doubleTapCount, 0, 'no doubletap event'); + assert.equal(tapCount, 0, 'no singletap event'); + done(); + }, 350); + }); +QUnit.test('When a doubleTap is fired, tripleTap and Tap should not be recognized', function(assert) { + var done = assert.async(); + assert.expect(3); + + utils.dispatchTouchEvent(el, 'start', 50, 50); + utils.dispatchTouchEvent(el, 'end', 50, 50); + + utils.dispatchTouchEvent(el, 'start', 50, 50); + utils.dispatchTouchEvent(el, 'end', 50, 50); + + setTimeout(function() { + assert.equal(tripleTapCount, 0, 'No tripple taps recognized'); + assert.equal(doubleTapCount, 1, '1 double tap recognized'); + assert.equal(tapCount, 0, 'No single taps recognized'); + done(); + }, 350); + }); + +QUnit.test('When a tap is fired, tripleTap and doubleTap should not be recognized', function(assert) { + var done = assert.async(); + assert.expect(3); + + utils.dispatchTouchEvent(el, 'start', 50, 50); + utils.dispatchTouchEvent(el, 'end', 50, 50); + + setTimeout(function() { + assert.equal(tripleTapCount, 0, 'No tripple taps recognized'); + assert.equal(doubleTapCount, 0, 'No double taps recognized'); + assert.equal(tapCount, 1, '1 single tap recognized'); + done(); + }, 350); + }); diff --git a/node_modules/@egjs/hammerjs/tests/unit/test_nested_gesture_recognizers.js b/node_modules/@egjs/hammerjs/tests/unit/test_nested_gesture_recognizers.js new file mode 100644 index 0000000000000000000000000000000000000000..3f8d8d51cbbcb0796e9f34ad2b42aeb2c724af95 --- /dev/null +++ b/node_modules/@egjs/hammerjs/tests/unit/test_nested_gesture_recognizers.js @@ -0,0 +1,170 @@ +// jscs:disable requireArrowFunctions,disallowVar,requireEnhancedObjectLiterals +/* globals QUnit,Hammer,utils*/ +/*jshint -W079 */ + +var parent, + child, + hammerChild, + hammerParent; + +QUnit.module('Nested gesture recognizers (Tap Child + Pan Parent)', { + beforeEach: function() { + parent = document.createElement('div'); + child = document.createElement('div'); + + document.getElementById('qunit-fixture').appendChild(parent); + parent.appendChild(child); + + hammerParent = new Hammer.Manager(parent, { + touchAction: 'none' + }); + hammerChild = new Hammer.Manager(child, { + touchAction: 'none' + }); + + hammerChild.add(new Hammer.Tap()); + hammerParent.add(new Hammer.Pan({ threshold: 5, pointers: 1 })); + }, + afterEach: function() { + hammerChild.destroy(); + hammerParent.destroy(); + } + }); + +QUnit.test('Tap on the child', function(assert) { + assert.expect(1); + + hammerChild.on('tap', function() { + assert.ok(true); + }); + hammerParent.on('tap', function() { + throw new Error('tap should not fire on parent'); + }); + + utils.dispatchTouchEvent(child, 'start', 0, 10); + utils.dispatchTouchEvent(child, 'end', 0, 10); + }); + +QUnit.test('Panning on the child should fire parent pan and should not fire child tap event', function(assert) { + assert.expect(1); + + hammerChild.on('tap', function() { + throw new Error('tap should not fire on parent'); + }); + hammerParent.on('panend', function() { + assert.ok(true); + }); + + utils.dispatchTouchEvent(child, 'start', 10, 0); + utils.dispatchTouchEvent(child, 'move', 20, 0); + utils.dispatchTouchEvent(child, 'end', 30, 0); + + }); + +/* + // test (optional pointers validation) + test('Panning with one finger down on child, other on parent', function () { + expect(1); + + var event, + touches; + + hammerParent.on('panend', function () { + ok(true); + }); + + // one finger one child + utils.dispatchTouchEvent(child, 'start', 10, 0, 0); + utils.dispatchTouchEvent(parent, 'start', 12, 0, 1); + + touches = [ + {clientX: 20, clientY: 0, identifier: 0 }, + {clientX: 20, clientY: 0, identifier: 1 } + ]; + + event = document.createEvent('Event'); + event.initEvent('touchmove', true, true); + event.touches = touches; + event.changedTouches = touches; + + parent.dispatchEvent(event); + + touches = [ + {clientX: 30, clientY: 0, identifier: 0 }, + {clientX: 30, clientY: 0, identifier: 1 } + ]; + + event = document.createEvent('Event'); + event.initEvent('touchend', true, true); + event.touches = touches; + event.changedTouches = touches; + + parent.dispatchEvent(event); + }); + */ + +var pressPeriod = 600; +QUnit.module('Nested gesture recognizers (Press Child + Pan Parent)', { + beforeEach: function() { + parent = document.createElement('div'); + child = document.createElement('div'); + + document.getElementById('qunit-fixture').appendChild(parent); + parent.appendChild(child); + + hammerParent = new Hammer.Manager(parent, { + touchAction: 'none' + }); + hammerChild = new Hammer.Manager(child, { + touchAction: 'none' + }); + + hammerChild.add(new Hammer.Press({ time: pressPeriod })); + hammerParent.add(new Hammer.Pan({ threshold: 5, pointers: 1 })); + }, + afterEach: function() { + hammerChild.destroy(); + hammerParent.destroy(); + } + }); + +QUnit.test('Press on the child', function(assert) { + assert.expect(1); + + hammerChild.on('press', function() { + assert.ok(true); + }); + hammerParent.on('press', function() { + throw new Error('press should not fire on parent'); + }); + + utils.dispatchTouchEvent(child, 'start', 0, 10); + + var done = assert.async(); + + setTimeout(function() { + done(); + }, pressPeriod); + }); + +QUnit.test('When Press is followed by Pan on the same element, both gestures are recognized', function(assert) { + assert.expect(2); + hammerChild.on('press', function() { + assert.ok(true); + }); + hammerParent.on('panend', function() { + assert.ok(true); + }); + + utils.dispatchTouchEvent(child, 'start', 0, 10); + var done = assert.async(); + + setTimeout(function() { + utils.dispatchTouchEvent(child, 'move', 10, 10); + utils.dispatchTouchEvent(child, 'move', 20, 10); + utils.dispatchTouchEvent(child, 'move', 30, 10); + utils.dispatchTouchEvent(child, 'end', 30, 10); + + done(); + }, pressPeriod); + }); diff --git a/node_modules/@egjs/hammerjs/tests/unit/test_propagation_bubble.js b/node_modules/@egjs/hammerjs/tests/unit/test_propagation_bubble.js new file mode 100644 index 0000000000000000000000000000000000000000..ec4bd8587aa00ffe95ae8cc09f2fdf6d7fa6f67f --- /dev/null +++ b/node_modules/@egjs/hammerjs/tests/unit/test_propagation_bubble.js @@ -0,0 +1,60 @@ +// jscs:disable requireArrowFunctions,disallowVar,requireEnhancedObjectLiterals +/* globals QUnit,Hammer,utils*/ +/*jshint -W079 */ + +var parent; +var child; +var hammerChild; +var hammerParent; + +QUnit.module('Propagation (Tap in Child and Parent)', { + beforeEach: function() { + parent = document.createElement('div'); + child = document.createElement('div'); + + document.getElementById('qunit-fixture').appendChild(parent); + parent.appendChild(child); + + hammerParent = new Hammer.Manager(parent); + hammerChild = new Hammer.Manager(child); + + hammerChild.add(new Hammer.Tap()); + hammerParent.add(new Hammer.Tap()); + }, + afterEach: function() { + hammerChild.destroy(); + hammerParent.destroy(); + } + }); + +QUnit.test('Tap on the child, fires also the tap event to the parent', function(assert) { + assert.expect(2); + + hammerChild.on('tap', function() { + assert.ok(true); + }); + hammerParent.on('tap', function() { + assert.ok(true); + }); + + utils.dispatchTouchEvent(child, 'start', 0, 10); + utils.dispatchTouchEvent(child, 'end', 0, 10); + }); + +QUnit.test('When tap on the child and the child stops the input event propagation, the tap event does not get fired in the parent', function(assert) { + assert.expect(1); + + hammerChild.on('tap', function() { + assert.ok(true); + }); + hammerParent.on('tap', function() { + throw new Error('parent tap gesture should not be recognized'); + }); + + child.addEventListener('touchend', function(ev) { + ev.stopPropagation(); + }); + + utils.dispatchTouchEvent(child, 'start', 0, 10); + utils.dispatchTouchEvent(child, 'end', 0, 10); + }); diff --git a/node_modules/@egjs/hammerjs/tests/unit/test_require_failure.js b/node_modules/@egjs/hammerjs/tests/unit/test_require_failure.js new file mode 100644 index 0000000000000000000000000000000000000000..954423de6368f88a5fd3d730859746688fd0a6e7 --- /dev/null +++ b/node_modules/@egjs/hammerjs/tests/unit/test_require_failure.js @@ -0,0 +1,118 @@ +// jscs:disable requireArrowFunctions,disallowVar,requireEnhancedObjectLiterals +/* globals QUnit,Hammer,utils,Simulator */ + +var el; +var hammer; +var pressPeriod = 200; +var pressThreshold = 20; +var pressCount = 0; +var panStartCount = 0; +var swipeCount = 0; + +QUnit.module('Require Failure ( Swipe & Press )', { + beforeEach: function() { + el = utils.createHitArea(); + hammer = new Hammer(el, { recognizers: [] }); + + var swipe = new Hammer.Swipe({ threshold: 1 }); + var press = new Hammer.Press({ time: pressPeriod, threshold: pressThreshold }); + + hammer.add(swipe); + hammer.add(press); + + swipe.recognizeWith(press); + press.requireFailure(swipe); + + pressCount = 0; + swipeCount = 0; + hammer.on('press', function() { + pressCount++; + }); + hammer.on('swipe', function() { + swipeCount++; + }); + }, + afterEach: function() { + hammer.destroy(); + } + }); + +QUnit.test('When swipe does not recognize the gesture, a press gesture can be fired', function(assert) { + var done = assert.async(); + assert.expect(1); + + utils.dispatchTouchEvent(el, 'start', 50, 50); + + setTimeout(function() { + assert.equal(pressCount, 1, '1 press recognized'); + done(); + }, pressPeriod + 100); + }); + +QUnit.test('When swipe does recognize the gesture, a press gesture cannot be fired', function(assert) { + var done = assert.async(); + assert.expect(2); + + Simulator.gestures.swipe(el, null, function() { + assert.ok(swipeCount > 0, 'swipe gesture should be recognizing'); + + assert.equal(pressCount, 0, 'press gesture should not be recognized because swipe gesture is recognizing'); + done(); + }); + }); +QUnit.module('Require Failure ( Pan & Press )', { + beforeEach: function() { + el = document.createElement('div'); + document.body.appendChild(el); + + hammer = new Hammer(el, { recognizers: [] }); + + var pan = new Hammer.Pan({ threshold: 1 }); + var press = new Hammer.Press({ time: pressPeriod, threshold: pressThreshold }); + + hammer.add([ pan, press ]); + + pan.recognizeWith(press); + press.requireFailure(pan); + + pressCount = 0; + panStartCount = 0; + hammer.on('press', function() { + pressCount++; + }); + hammer.on('panstart', function() { + panStartCount++; + }); + }, + afterEach: function() { + document.body.removeChild(el); + hammer.destroy(); + } + }); + +QUnit.test('When pan does not recognize the gesture, a press gesture can be fired', function(assert) { + var done = assert.async(); + assert.expect(1); + + utils.dispatchTouchEvent(el, 'start', 50, 50); + + setTimeout(function() { + assert.equal(pressCount, 1, '1 press recognized'); + done(); + }, pressPeriod + 100); + }); + +QUnit.test('When pan recognizes the gesture, a press gesture cannot be fired', function(assert) { + var done = assert.async(); + assert.expect(2); + + utils.dispatchTouchEvent(el, 'start', 50, 50); + utils.dispatchTouchEvent(el, 'move', 50 + pressThreshold / 4, 50); + + setTimeout(function() { + assert.ok(panStartCount > 0, 'pan gesture should be recognizing'); + + assert.equal(pressCount, 0, 'press gesture should not be recognized because pan gesture is recognizing'); + done(); + }, pressPeriod + 100); + }); diff --git a/node_modules/@egjs/hammerjs/tests/unit/test_simultaneous_recognition.js b/node_modules/@egjs/hammerjs/tests/unit/test_simultaneous_recognition.js new file mode 100644 index 0000000000000000000000000000000000000000..885e054a27036e6aaa7c4d507fb32a86b1b583c6 --- /dev/null +++ b/node_modules/@egjs/hammerjs/tests/unit/test_simultaneous_recognition.js @@ -0,0 +1,238 @@ +// jscs:disable requireArrowFunctions,disallowVar,requireEnhancedObjectLiterals +/* globals QUnit,Hammer,utils*/ + +var el; +var hammer; + +QUnit.module('Simultaenous recognition', { + beforeEach: function() { + el = utils.createHitArea(); + }, + afterEach: function() { + hammer && hammer.destroy(); + } + }); + +QUnit.test('should pinch and pan simultaneously be recognized when enabled', function(assert) { + var done = assert.async(); + assert.expect(4); + + var panCount = 0; + var pinchCount = 0; + + hammer = new Hammer.Manager(el, { + touchAction: 'none' + }); + + hammer.add(new Hammer.Pan({ threshold: 5, pointers: 2 })); + + var pinch = new Hammer.Pinch({ threshold: 0, pointers: 2 }); + hammer.add(pinch); + pinch.recognizeWith(hammer.get('pan')); + + hammer.on('panend', function() { + panCount++; + }); + hammer.on('pinchend', function() { + pinchCount++; + }); + + var executeGesture = function(cb) { + var event, touches; + + touches = [ + { clientX: 0, clientY: 10, identifier: 0, target: el }, + { clientX: 10, clientY: 10, identifier: 1, target: el } + ]; + + event = document.createEvent('Event'); + event.initEvent('touchstart', true, true); + event.touches = touches; + event.targetTouches = touches; + event.changedTouches = touches; + el.dispatchEvent(event); + + setTimeout(function() { + touches = [ + { clientX: 10, clientY: 20, identifier: 0, target: el }, + { clientX: 20, clientY: 20, identifier: 1, target: el } + ]; + + event = document.createEvent('Event'); + event.initEvent('touchmove', true, true); + event.touches = touches; + event.targetTouches = touches; + event.changedTouches = touches; + + el.dispatchEvent(event); + }, 100); + + setTimeout(function() { + touches = [ + { clientX: 20, clientY: 30, identifier: 0, target: el }, + { clientX: 40, clientY: 30, identifier: 1, target: el } + ]; + + event = document.createEvent('Event'); + event.initEvent('touchmove', true, true); + event.touches = touches; + event.targetTouches = touches; + event.changedTouches = touches; + el.dispatchEvent(event); + + event = document.createEvent('Event'); + event.initEvent('touchend', true, true); + event.touches = touches; + event.targetTouches = touches; + event.changedTouches = touches; + el.dispatchEvent(event); + + cb(); + }, 200); + }; + + // 2 gesture will be recognized + executeGesture(function() { + assert.equal(panCount, 1, '1 pan event recognized'); + assert.equal(pinchCount, 1, '1 pinch event recognized'); + + pinch.dropRecognizeWith(hammer.get('pan')); + + // Only the pan gesture will be recognized + executeGesture(function() { + assert.equal(panCount, 2, '2 pan events recognized'); + assert.equal(pinchCount, 1, 'One pinch event recognized'); + + done(); + }); + }); + }); + +QUnit.test('the first gesture should block the following gestures (Tap & DoubleTap)', function(assert) { + assert.expect(4); + + var tapCount = 0; + var doubleTapCount = 0; + + hammer = new Hammer.Manager(el, { + touchAction: 'none' + }); + + var tap = new Hammer.Tap(); + var doubleTap = new Hammer.Tap({ event: 'doubletap', taps: 2 }); + + hammer.add(tap); + hammer.add(doubleTap); + + hammer.on('tap', function() { + tapCount++; + }); + hammer.on('doubletap', function() { + doubleTapCount++; + }); + + utils.dispatchTouchEvent(el, 'start', 0, 10); + utils.dispatchTouchEvent(el, 'end', 0, 10); + utils.dispatchTouchEvent(el, 'start', 0, 10); + utils.dispatchTouchEvent(el, 'end', 0, 10); + + assert.equal(tapCount, 2, 'on a double tap gesture, the tap gesture is recognized twice'); + assert.equal(doubleTapCount, 0, 'double tap gesture is not recognized because the prior tap gesture does not recognize it simultaneously'); + + doubleTap.recognizeWith(hammer.get('tap')); + + utils.dispatchTouchEvent(el, 'start', 0, 10); + utils.dispatchTouchEvent(el, 'end', 0, 10); + utils.dispatchTouchEvent(el, 'start', 0, 10); + utils.dispatchTouchEvent(el, 'end', 0, 10); + + assert.equal(tapCount, 4, '4 tap events recognized'); + assert.equal(doubleTapCount, 1, 'when the tap gesture is configured to work simultaneously, tap & doubleTap can be recognized simultaneously'); + }); + +QUnit.test('when disabled, the first gesture should not block gestures (Tap & DoubleTap )', function(assert) { + assert.expect(4); + + var tapCount = 0; + var doubleTapCount = 0; + + hammer = new Hammer.Manager(el, { + touchAction: 'none' + }); + + var tap = new Hammer.Tap(); + var doubleTap = new Hammer.Tap({ event: 'doubletap', taps: 2 }); + + hammer.add(tap); + hammer.add(doubleTap); + + hammer.on('tap', function() { + tapCount++; + }); + hammer.on('doubletap', function() { + doubleTapCount++; + }); + + utils.dispatchTouchEvent(el, 'start', 0, 10); + utils.dispatchTouchEvent(el, 'end', 0, 10); + utils.dispatchTouchEvent(el, 'start', 0, 10); + utils.dispatchTouchEvent(el, 'end', 0, 10); + + assert.equal(tapCount, 2, 'on a double tap gesture, the tap gesture is recognized twice'); + assert.equal(doubleTapCount, 0, 'double tap gesture is not recognized because the prior tap gesture does not recognize it simultaneously'); + + hammer.get('tap').set({ enable: false }); + + utils.dispatchTouchEvent(el, 'start', 0, 10); + utils.dispatchTouchEvent(el, 'end', 0, 10); + utils.dispatchTouchEvent(el, 'start', 0, 10); + utils.dispatchTouchEvent(el, 'end', 0, 10); + + assert.equal(tapCount, 2, 'tap gesture should not be recognized when the recognizer is disabled'); + assert.equal(doubleTapCount, 1, 'when the tap gesture is disabled, doubleTap can be recognized'); + }); + +QUnit.test('the first gesture should block the following gestures (DoubleTap & Tap)', function(assert) { + assert.expect(4); + + var tapCount = 0; + var doubleTapCount = 0; + + hammer = new Hammer.Manager(el, { + touchAction: 'none' + }); + + var tap = new Hammer.Tap(); + var doubleTap = new Hammer.Tap({ event: 'doubletap', taps: 2 }); + + hammer.add(doubleTap); + hammer.add(tap); + + hammer.on('tap', function() { + tapCount++; + }); + hammer.on('doubletap', function() { + doubleTapCount++; + }); + + utils.dispatchTouchEvent(el, 'start', 0, 10); + utils.dispatchTouchEvent(el, 'end', 0, 10); + utils.dispatchTouchEvent(el, 'start', 0, 10); + utils.dispatchTouchEvent(el, 'end', 0, 10); + + assert.equal(doubleTapCount, 1, 'double tap is recognized'); + assert.equal(tapCount, 1, 'tap is detected, the doubletap is only catched by the doubletap recognizer'); + + // Doubletap and tap together + doubleTap.recognizeWith(hammer.get('tap')); + doubleTapCount = 0; + tapCount = 0; + + utils.dispatchTouchEvent(el, 'start', 0, 10); + utils.dispatchTouchEvent(el, 'end', 0, 10); + utils.dispatchTouchEvent(el, 'start', 0, 10); + utils.dispatchTouchEvent(el, 'end', 0, 10); + + assert.equal(doubleTapCount, 1, '1 double tap recognized'); + assert.equal(tapCount, 2, 'when the tap gesture is configured to work simultaneously, tap & doubleTap can be recognized simultaneously'); + }); diff --git a/node_modules/@egjs/hammerjs/tests/unit/test_utils.js b/node_modules/@egjs/hammerjs/tests/unit/test_utils.js new file mode 100644 index 0000000000000000000000000000000000000000..c1b2f36f2a9205d59e76b592fd0ba64851d72793 --- /dev/null +++ b/node_modules/@egjs/hammerjs/tests/unit/test_utils.js @@ -0,0 +1,167 @@ +// jscs:disable requireArrowFunctions,disallowVar,requireEnhancedObjectLiterals +/* globals QUnit,Hammer,utils,_*/ + +QUnit.module('utils'); + +// For the tests, all hammer properties and methods of Hammer are exposed to window.Hammer + +QUnit.test('get/set prefixed util', function(assert) { + assert.ok(_.isUndefined(Hammer.prefixed(window, 'FakeProperty')), 'non existent property returns undefined'); + + window.webkitFakeProperty = 1337; + assert.ok(Hammer.prefixed(window, 'FakeProperty') == 'webkitFakeProperty', 'existent prefixed property returns the prefixed name'); + + delete window.webkitFakeProperty; + }); + +QUnit.test('fnBind', function(assert) { + var context = { a: true }; + + Hammer.bindFn(function(b) { + assert.ok(this.a === true, 'bindFn scope'); + assert.ok(b === 123, 'bindFn argument'); + }, context)(123); + }); + +QUnit.test('Inherit objects', function(assert) { + function Base() { + this.name = true; + } + + function Child() { + Base.call(this); + } + + Hammer.inherit(Child, Base, { + newMethod: function() { + } + }); + + var inst = new Child(); + + assert.ok(inst.name == true, 'child has extended from base'); + assert.ok(inst.newMethod, 'child has a new method'); + assert.ok(Child.prototype.newMethod, 'child has a new prototype method'); + assert.ok(inst instanceof Child, 'is instanceof Child'); + assert.ok(inst instanceof Base, 'is instanceof Base'); + assert.ok(inst._super === Base.prototype, '_super is ref to prototype of Base'); + }); + +QUnit.test('toArray', function(assert) { + assert.ok(_.isArray(Hammer.toArray({ 0: true, 1: 'second', length: 2 })), 'converted an array-like object to an array'); + assert.ok(_.isArray(Hammer.toArray([ true, true ])), 'array stays an array'); + }); + +QUnit.test('inArray', function(assert) { + assert.ok(Hammer.inArray([ 1, 2, 3, 4, 'hammer' ], 'hammer') === 4, 'found item and returned the index'); + assert.ok(Hammer.inArray([ 1, 2, 3, 4, 'hammer' ], 'notfound') === -1, 'not found an item and returned -1'); + assert.ok(Hammer.inArray([ + { id: 2 }, + { id: 24 } + ], '24', 'id') === 1, 'find by key and return the index'); + assert.ok(Hammer.inArray([ + { id: 2 }, + { id: 24 } + ], '22', 'id') === -1, 'not found by key and return -1'); + }); + +QUnit.test('splitStr', function(assert) { + assert.deepEqual(Hammer.splitStr(' a b c d '), [ 'a', 'b', 'c', 'd' ], 'str split valid'); + }); + +QUnit.test('uniqueArray', function(assert) { + assert.deepEqual(Hammer.uniqueArray([ + { id: 1 }, + { id: 2 }, + { id: 2 } + ], 'id'), [ + { id: 1 }, + { id: 2 } + ], 'remove duplicate ids'); + }); + +QUnit.test('boolOrFn', function(assert) { + assert.equal(Hammer.boolOrFn(true), true, 'Passing an boolean'); + assert.equal(Hammer.boolOrFn(false), false, 'Passing an boolean'); + assert.equal(Hammer.boolOrFn(function() { + return true; + }), true, 'Passing an boolean'); + assert.equal(Hammer.boolOrFn(1), true, 'Passing an integer'); + }); + +QUnit.test('hasParent', function(assert) { + var parent = document.createElement('div'); + var child = document.createElement('div'); + + document.body.appendChild(parent); + parent.appendChild(child); + + assert.equal(Hammer.hasParent(child, parent), true, 'Found parent'); + assert.equal(Hammer.hasParent(parent, child), false, 'Not in parent'); + + document.body.removeChild(parent); + }); + +QUnit.test('each', function(assert) { + var object = { hi: true }; + var array = [ 'a', 'b', 'c' ]; + var loop; + + loop = false; + Hammer.each(object, function(value, key) { + if (key == 'hi' && value === true) { + loop = true; + } + }); + assert.ok(loop, 'object loop'); + + loop = 0; + Hammer.each(array, function(value) { + if (value) { + loop++; + } + }); + assert.ok(loop == 3, 'array loop'); + + loop = 0; + array.forEach = null; + Hammer.each(array, function(value) { + if (value) { + loop++; + } + }); + assert.ok(loop == 3, 'array loop without Array.forEach'); + }); + +QUnit.test('assign', function(assert) { + assert.expect(2); + assert.deepEqual( + Hammer.assign( + { a: 1, b: 3 }, + { b: 2, c: 3 } + ), + { a: 1, b: 2, c: 3 }, + 'Simple extend' + ); + + var src = { foo: true }; + var dest = Hammer.assign({}, src); + src.foo = false; + assert.deepEqual(dest, { foo: true }, 'Clone reference'); + }); + +QUnit.test('test add/removeEventListener', function(assert) { + function handleEvent() { + assert.ok(true, 'triggered event'); + } + + assert.expect(2); + + Hammer.addEventListeners(window, 'testEvent1 testEvent2 ', handleEvent); + utils.triggerDomEvent(window, 'testEvent1'); + utils.triggerDomEvent(window, 'testEvent2'); + + Hammer.removeEventListeners(window, ' testEvent1 testEvent2 ', handleEvent); + utils.triggerDomEvent(window, 'testEvent1'); + utils.triggerDomEvent(window, 'testEvent2'); + }); diff --git a/node_modules/@types/hammerjs/LICENSE b/node_modules/@types/hammerjs/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..4b1ad51b2f0efc36f38aa3349a9f30fbd9217547 --- /dev/null +++ b/node_modules/@types/hammerjs/LICENSE @@ -0,0 +1,21 @@ + MIT License + + Copyright (c) Microsoft Corporation. All rights reserved. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE diff --git a/node_modules/@types/hammerjs/README.md b/node_modules/@types/hammerjs/README.md new file mode 100644 index 0000000000000000000000000000000000000000..df085e957e670b6d7968ae773fb150319cba0759 --- /dev/null +++ b/node_modules/@types/hammerjs/README.md @@ -0,0 +1,16 @@ +# Installation +> `npm install --save @types/hammerjs` + +# Summary +This package contains type definitions for Hammer.js (http://hammerjs.github.io/). + +# Details +Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/hammerjs + +Additional Details + * Last updated: Mon, 10 Sep 2018 23:10:33 GMT + * Dependencies: none + * Global values: Hammer, HammerInput, MouseInput, PointerEventInput, SingleTouchInput, TouchAction, TouchInput, TouchMouseInput + +# Credits +These definitions were written by Philip Bulley , Han Lin Yap . diff --git a/node_modules/@types/hammerjs/index.d.ts b/node_modules/@types/hammerjs/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..8cbc4064c13fe677481f6ee4c54fd121f686d197 --- /dev/null +++ b/node_modules/@types/hammerjs/index.d.ts @@ -0,0 +1,360 @@ +// Type definitions for Hammer.js 2.0.8 +// Project: http://hammerjs.github.io/ +// Definitions by: Philip Bulley , Han Lin Yap +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare var Hammer:HammerStatic; + +declare module "hammerjs" { + export = Hammer; +} + +interface HammerStatic +{ + new( element:HTMLElement | SVGElement, options?:HammerOptions ): HammerManager; + + defaults:HammerDefaults; + + VERSION: number; + + INPUT_START: number; + INPUT_MOVE: number; + INPUT_END: number; + INPUT_CANCEL: number; + + STATE_POSSIBLE: number; + STATE_BEGAN: number; + STATE_CHANGED: number; + STATE_ENDED: number; + STATE_RECOGNIZED: number; + STATE_CANCELLED: number; + STATE_FAILED: number; + + DIRECTION_NONE: number; + DIRECTION_LEFT: number; + DIRECTION_RIGHT: number; + DIRECTION_UP: number; + DIRECTION_DOWN: number; + DIRECTION_HORIZONTAL: number; + DIRECTION_VERTICAL: number; + DIRECTION_ALL: number; + + Manager: HammerManagerConstructor; + Input: HammerInput; + TouchAction: TouchAction; + + TouchInput: TouchInput; + MouseInput: MouseInput; + PointerEventInput: PointerEventInput; + TouchMouseInput: TouchMouseInput; + SingleTouchInput: SingleTouchInput; + + Recognizer: RecognizerStatic; + AttrRecognizer: AttrRecognizerStatic; + Tap: TapRecognizerStatic; + Pan: PanRecognizerStatic; + Swipe: SwipeRecognizerStatic; + Pinch: PinchRecognizerStatic; + Rotate: RotateRecognizerStatic; + Press: PressRecognizerStatic; + + on( target:EventTarget, types:string, handler:Function ):void; + off( target:EventTarget, types:string, handler:Function ):void; + each( obj:any, iterator:Function, context:any ): void; + merge( dest:any, src:any ): any; + extend( dest:any, src:any, merge:boolean ): any; + inherit( child:Function, base:Function, properties:any ):any; + bindFn( fn:Function, context:any ):Function; + prefixed( obj:any, property:string ):string; +} + +type RecognizerTuple = + [RecognizerStatic] + | [RecognizerStatic, RecognizerOptions] + | [RecognizerStatic, RecognizerOptions, string | string[]] + | [RecognizerStatic, RecognizerOptions, string | string[], (string | Recognizer) | (string | Recognizer)[]]; + +interface HammerDefaults extends HammerOptions +{ + domEvents:boolean; + enable:boolean; + preset:RecognizerTuple[]; + touchAction:string; + cssProps:CssProps; + + inputClass:HammerInput; + inputTarget:EventTarget; +} + +interface CssProps +{ + contentZooming:string; + tapHighlightColor:string; + touchCallout:string; + touchSelect:string; + userDrag:string; + userSelect:string; +} + +interface HammerOptions +{ + cssProps?:CssProps; + domEvents?:boolean; + enable?:boolean | ((manager: HammerManager) => boolean); + preset?:RecognizerTuple[]; + touchAction?:string; + recognizers?:RecognizerTuple[]; + + inputClass?:HammerInput; + inputTarget?:EventTarget; +} + +interface HammerManagerConstructor { + new( element:EventTarget, options?:HammerOptions ):HammerManager; +} + +interface HammerListener { + (event:HammerInput): void +} + +interface HammerManager +{ + add( recogniser:Recognizer ):Recognizer; + add( recogniser:Recognizer ):HammerManager; + add( recogniser:Recognizer[] ):Recognizer; + add( recogniser:Recognizer[] ):HammerManager; + destroy():void; + emit( event:string, data:any ):void; + get( recogniser:Recognizer ):Recognizer; + get( recogniser:string ):Recognizer; + off( events:string, handler?:HammerListener ):void; + on( events:string, handler:HammerListener ):void; + recognize( inputData:any ):void; + remove( recogniser:Recognizer ):HammerManager; + remove( recogniser:string ):HammerManager; + set( options:HammerOptions ):HammerManager; + stop( force:boolean ):void; +} + +declare class HammerInput +{ + constructor( manager:HammerManager, callback:Function ); + + destroy():void; + handler():void; + init():void; + + /** Name of the event. Like panstart. */ + type:string; + + /** Movement of the X axis. */ + deltaX:number; + + /** Movement of the Y axis. */ + deltaY:number; + + /** Total time in ms since the first input. */ + deltaTime:number; + + /** Distance moved. */ + distance:number; + + /** Angle moved. */ + angle:number; + + /** Velocity on the X axis, in px/ms. */ + velocityX:number; + + /** Velocity on the Y axis, in px/ms */ + velocityY:number; + + /** Highest velocityX/Y value. */ + velocity:number; + + /** Direction moved. Matches the DIRECTION constants. */ + direction:number; + + /** Direction moved from it's starting point. Matches the DIRECTION constants. */ + offsetDirection:number; + + /** Scaling that has been done when multi-touch. 1 on a single touch. */ + scale:number; + + /** Rotation that has been done when multi-touch. 0 on a single touch. */ + rotation:number; + + /** Center position for multi-touch, or just the single pointer. */ + center:HammerPoint; + + /** Source event object, type TouchEvent, MouseEvent or PointerEvent. */ + srcEvent:TouchEvent | MouseEvent | PointerEvent; + + /** Target that received the event. */ + target:HTMLElement; + + /** Primary pointer type, could be touch, mouse, pen or kinect. */ + pointerType:string; + + /** Event type, matches the INPUT constants. */ + eventType:number; + + /** true when the first input. */ + isFirst:boolean; + + /** true when the final (last) input. */ + isFinal:boolean; + + /** Array with all pointers, including the ended pointers (touchend, mouseup). */ + pointers:any[]; + + /** Array with all new/moved/lost pointers. */ + changedPointers:any[]; + + /** Reference to the srcEvent.preventDefault() method. Only for experts! */ + preventDefault:Function; +} + +declare class MouseInput extends HammerInput +{ + constructor( manager:HammerManager, callback:Function ); +} + +declare class PointerEventInput extends HammerInput +{ + constructor( manager:HammerManager, callback:Function ); +} + +declare class SingleTouchInput extends HammerInput +{ + constructor( manager:HammerManager, callback:Function ); +} + +declare class TouchInput extends HammerInput +{ + constructor( manager:HammerManager, callback:Function ); +} + +declare class TouchMouseInput extends HammerInput +{ + constructor( manager:HammerManager, callback:Function ); +} + +interface RecognizerOptions { + direction?: number; + enable?: boolean | ((recognizer: Recognizer, inputData: HammerInput) => boolean); + event?: string; + interval?: number; + pointers?: number; + posThreshold?: number; + taps?: number + threshold?: number; + time?: number; + velocity?: number; +} + +interface RecognizerStatic +{ + new( options?:RecognizerOptions ):Recognizer; +} + +interface Recognizer +{ + defaults:any; + + canEmit():boolean; + canRecognizeWith( otherRecognizer:Recognizer ):boolean; + dropRecognizeWith( otherRecognizer:Recognizer | Recognizer[] | string):Recognizer; + dropRequireFailure( otherRecognizer:Recognizer | Recognizer[] | string):Recognizer; + emit( input:HammerInput ):void; + getTouchAction():any[]; + hasRequireFailures():boolean; + process( inputData:HammerInput ):string; + recognize( inputData:HammerInput ):void; + recognizeWith( otherRecognizer:Recognizer | Recognizer[] | string):Recognizer; + requireFailure( otherRecognizer:Recognizer | Recognizer[] | string):Recognizer; + reset():void; + set( options?:RecognizerOptions ):Recognizer; + tryEmit( input:HammerInput ):void; +} + +interface AttrRecognizerStatic +{ + attrTest( input:HammerInput ):boolean; + process( input:HammerInput ):any; +} + +interface AttrRecognizer extends Recognizer +{ + new( options?:RecognizerOptions ):AttrRecognizer; +} + +interface PanRecognizerStatic +{ + new( options?:RecognizerOptions ):PanRecognizer; +} + +interface PanRecognizer extends AttrRecognizer +{ +} + +interface PinchRecognizerStatic +{ + new( options?:RecognizerOptions ):PinchRecognizer; +} + +interface PinchRecognizer extends AttrRecognizer +{ +} + +interface PressRecognizerStatic +{ + new( options?:RecognizerOptions ):PressRecognizer; +} + +interface PressRecognizer extends AttrRecognizer +{ +} + +interface RotateRecognizerStatic +{ + new( options?:RecognizerOptions ):RotateRecognizer; +} + +interface RotateRecognizer extends AttrRecognizer +{ +} + +interface SwipeRecognizerStatic +{ + new( options?:RecognizerOptions ):SwipeRecognizer; +} + +interface SwipeRecognizer extends AttrRecognizer +{ +} + +interface TapRecognizerStatic +{ + new( options?:RecognizerOptions ):TapRecognizer; +} + +interface TapRecognizer extends AttrRecognizer +{ +} + +declare class TouchAction +{ + constructor( manager:HammerManager, value:string ); + + compute():string; + preventDefaults( input:HammerInput ):void; + preventSrc( srcEvent:any ):void; + set( value:string ):void; + update():void; +} + +interface HammerPoint +{ + x: number; + y: number; +} diff --git a/node_modules/@types/hammerjs/package.json b/node_modules/@types/hammerjs/package.json new file mode 100644 index 0000000000000000000000000000000000000000..036e14edfe7d3428618db564dc42c117be54cf8b --- /dev/null +++ b/node_modules/@types/hammerjs/package.json @@ -0,0 +1,55 @@ +{ + "_from": "@types/hammerjs@^2.0.36", + "_id": "@types/hammerjs@2.0.36", + "_inBundle": false, + "_integrity": "sha512-7TUK/k2/QGpEAv/BCwSHlYu3NXZhQ9ZwBYpzr9tjlPIL2C5BeGhH3DmVavRx3ZNyELX5TLC91JTz/cen6AAtIQ==", + "_location": "/@types/hammerjs", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "@types/hammerjs@^2.0.36", + "name": "@types/hammerjs", + "escapedName": "@types%2fhammerjs", + "scope": "@types", + "rawSpec": "^2.0.36", + "saveSpec": null, + "fetchSpec": "^2.0.36" + }, + "_requiredBy": [ + "/@egjs/hammerjs" + ], + "_resolved": "https://registry.npmjs.org/@types/hammerjs/-/hammerjs-2.0.36.tgz", + "_shasum": "17ce0a235e9ffbcdcdf5095646b374c2bf615a4c", + "_spec": "@types/hammerjs@^2.0.36", + "_where": "/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/node_modules/@egjs/hammerjs", + "bugs": { + "url": "https://github.com/DefinitelyTyped/DefinitelyTyped/issues" + }, + "bundleDependencies": false, + "contributors": [ + { + "name": "Philip Bulley", + "url": "https://github.com/milkisevil" + }, + { + "name": "Han Lin Yap", + "url": "https://github.com/codler" + } + ], + "dependencies": {}, + "deprecated": false, + "description": "TypeScript definitions for Hammer.js", + "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped#readme", + "license": "MIT", + "main": "", + "name": "@types/hammerjs", + "repository": { + "type": "git", + "url": "git+https://github.com/DefinitelyTyped/DefinitelyTyped.git" + }, + "scripts": {}, + "typeScriptVersion": "2.0", + "typesPublisherContentHash": "accf80ac4ca9e090f78699ea336672ddbc1fe25ad9cf30a5dd6b2d8238f60a57", + "version": "2.0.36" +} diff --git a/node_modules/eslint-utils/index.js b/node_modules/eslint-utils/index.js index d501e86d3f968106ee96f57d5bff481daf18b796..7805b05ef3629033cee5c78d0822a98ca77ce5b8 100644 --- a/node_modules/eslint-utils/index.js +++ b/node_modules/eslint-utils/index.js @@ -240,10 +240,15 @@ function getFunctionHeadLocation(node, sourceCode) { } } +/* globals BigInt */ + const builtinNames = Object.freeze( new Set([ "Array", "ArrayBuffer", + "BigInt", + "BigInt64Array", + "BigUint64Array", "Boolean", "DataView", "Date", @@ -251,9 +256,7 @@ const builtinNames = Object.freeze( "decodeURIComponent", "encodeURI", "encodeURIComponent", - "Error", "escape", - "EvalError", "Float32Array", "Float64Array", "Function", @@ -274,26 +277,97 @@ const builtinNames = Object.freeze( "parseInt", "Promise", "Proxy", - "RangeError", - "ReferenceError", "Reflect", "RegExp", "Set", "String", "Symbol", - "SyntaxError", - "TypeError", "Uint16Array", "Uint32Array", "Uint8Array", "Uint8ClampedArray", "undefined", "unescape", - "URIError", "WeakMap", "WeakSet", ]) ); +const callAllowed = new Set( + [ + Array.isArray, + typeof BigInt === "function" ? BigInt : undefined, + Boolean, + Date, + Date.parse, + decodeURI, + decodeURIComponent, + encodeURI, + encodeURIComponent, + escape, + isFinite, + isNaN, + isPrototypeOf, + ...Object.getOwnPropertyNames(Math) + .map(k => Math[k]) + .filter(f => typeof f === "function"), + Number, + Number.isFinite, + Number.isNaN, + Number.parseFloat, + Number.parseInt, + Object, + Object.entries, //eslint-disable-line @mysticatea/node/no-unsupported-features/es-builtins + Object.is, + Object.isExtensible, + Object.isFrozen, + Object.isSealed, + Object.keys, + Object.values, //eslint-disable-line @mysticatea/node/no-unsupported-features/es-builtins + parseFloat, + parseInt, + RegExp, + String, + String.fromCharCode, + String.fromCodePoint, + String.raw, + Symbol, + Symbol.for, + Symbol.keyFor, + unescape, + ].filter(f => typeof f === "function") +); +const callPassThrough = new Set([ + Object.freeze, + Object.preventExtensions, + Object.seal, +]); + +/** + * Get the property descriptor. + * @param {object} object The object to get. + * @param {string|number|symbol} name The property name to get. + */ +function getPropertyDescriptor(object, name) { + let x = object; + while ((typeof x === "object" || typeof x === "function") && x !== null) { + const d = Object.getOwnPropertyDescriptor(x, name); + if (d) { + return d + } + x = Object.getPrototypeOf(x); + } + return null +} + +/** + * Check if a property is getter or not. + * @param {object} object The object to check. + * @param {string|number|symbol} name The property name to check. + */ +function isGetter(object, name) { + const d = getPropertyDescriptor(object, name); + return d != null && d.get != null +} /** * Get the element values of a given node list. @@ -413,13 +487,23 @@ const operations = Object.freeze({ if (object != null && property != null) { const receiver = object.value; const methodName = property.value; - return { value: receiver[methodName](...args) } + if (callAllowed.has(receiver[methodName])) { + return { value: receiver[methodName](...args) } + } + if (callPassThrough.has(receiver[methodName])) { + return { value: args[0] } + } } } else { const callee = getStaticValueR(calleeNode, initialScope); if (callee != null) { const func = callee.value; - return { value: func(...args) } + if (callAllowed.has(func)) { + return { value: func(...args) } + } + if (callPassThrough.has(func)) { + return { value: args[0] } + } } } } @@ -473,11 +557,11 @@ const operations = Object.freeze({ Literal(node) { //istanbul ignore if : this is implementation-specific behavior. - if (node.regex != null && node.value == null) { - // It was a RegExp literal, but Node.js didn't support it. + if ((node.regex != null || node.bigint != null) && node.value == null) { + // It was a RegExp/BigInt literal, but Node.js didn't support it. return null } - return node + return { value: node.value } }, LogicalExpression(node, initialScope) { @@ -505,7 +589,11 @@ const operations = Object.freeze({ ? getStaticValueR(node.property, initialScope) : { value: node.property.name }; - if (object != null && property != null) { + if ( + object != null && + property != null && + !isGetter(object.value, property.value) + ) { return { value: object.value[property.value] } } return null @@ -517,7 +605,9 @@ const operations = Object.freeze({ if (callee != null && args != null) { const Func = callee.value; - return { value: new Func(...args) } + if (callAllowed.has(Func)) { + return { value: new Func(...args) } + } } return null @@ -576,7 +666,9 @@ const operations = Object.freeze({ const strings = node.quasi.quasis.map(q => q.value.cooked); strings.raw = node.quasi.quasis.map(q => q.value.raw); - return { value: func(strings, ...expressions) } + if (func === String.raw) { + return { value: func(strings, ...expressions) } + } } return null @@ -660,6 +752,16 @@ function getStaticValue(node, initialScope = null) { * @returns {string|null} The value of the node, or `null`. */ function getStringIfConstant(node, initialScope = null) { + // Handle the literals that the platform doesn't support natively. + if (node && node.type === "Literal" && node.value === null) { + if (node.regex) { + return `/${node.regex.pattern}/${node.regex.flags}` + } + if (node.bigint) { + return node.bigint + } + } + const evaluated = getStaticValue(node, initialScope); return evaluated && String(evaluated.value) } diff --git a/node_modules/eslint-utils/index.js.map b/node_modules/eslint-utils/index.js.map index 91e23d61df1b4b701c71de6a36a1d6d5ded496f2..358452ffb95027815f1ea7ee92a0ff0f2cf83e4d 100644 --- a/node_modules/eslint-utils/index.js.map +++ b/node_modules/eslint-utils/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sources":["src/get-innermost-scope.js","src/find-variable.js","src/token-predicate.js","src/get-function-head-location.js","src/get-static-value.js","src/get-string-if-constant.js","src/get-property-name.js","src/get-function-name-with-kind.js","src/has-side-effect.js","src/is-parenthesized.js","src/pattern-matcher.js","src/reference-tracker.js","src/index.js"],"sourcesContent":["/**\n * Get the innermost scope which contains a given location.\n * @param {Scope} initialScope The initial scope to search.\n * @param {Node} node The location to search.\n * @returns {Scope} The innermost scope.\n */\nexport function getInnermostScope(initialScope, node) {\n const location = node.range[0]\n\n let scope = initialScope\n let found = false\n do {\n found = false\n for (const childScope of scope.childScopes) {\n const range = childScope.block.range\n\n if (range[0] <= location && location < range[1]) {\n scope = childScope\n found = true\n break\n }\n }\n } while (found)\n\n return scope\n}\n","import { getInnermostScope } from \"./get-innermost-scope\"\n\n/**\n * Find the variable of a given name.\n * @param {Scope} initialScope The scope to start finding.\n * @param {string|Node} nameOrNode The variable name to find. If this is a Node object then it should be an Identifier node.\n * @returns {Variable|null} The found variable or null.\n */\nexport function findVariable(initialScope, nameOrNode) {\n let name = \"\"\n let scope = initialScope\n\n if (typeof nameOrNode === \"string\") {\n name = nameOrNode\n } else {\n name = nameOrNode.name\n scope = getInnermostScope(scope, nameOrNode)\n }\n\n while (scope != null) {\n const variable = scope.set.get(name)\n if (variable != null) {\n return variable\n }\n scope = scope.upper\n }\n\n return null\n}\n","/**\n * Negate the result of `this` calling.\n * @param {Token} token The token to check.\n * @returns {boolean} `true` if the result of `this(token)` is `false`.\n */\nfunction negate0(token) {\n return !this(token) //eslint-disable-line no-invalid-this\n}\n\n/**\n * Creates the negate function of the given function.\n * @param {function(Token):boolean} f - The function to negate.\n * @returns {function(Token):boolean} Negated function.\n */\nfunction negate(f) {\n return negate0.bind(f)\n}\n\n/**\n * Checks if the given token is an arrow token or not.\n * @param {Token} token - The token to check.\n * @returns {boolean} `true` if the token is an arrow token.\n */\nexport function isArrowToken(token) {\n return token.value === \"=>\" && token.type === \"Punctuator\"\n}\n\n/**\n * Checks if the given token is a comma token or not.\n * @param {Token} token - The token to check.\n * @returns {boolean} `true` if the token is a comma token.\n */\nexport function isCommaToken(token) {\n return token.value === \",\" && token.type === \"Punctuator\"\n}\n\n/**\n * Checks if the given token is a semicolon token or not.\n * @param {Token} token - The token to check.\n * @returns {boolean} `true` if the token is a semicolon token.\n */\nexport function isSemicolonToken(token) {\n return token.value === \";\" && token.type === \"Punctuator\"\n}\n\n/**\n * Checks if the given token is a colon token or not.\n * @param {Token} token - The token to check.\n * @returns {boolean} `true` if the token is a colon token.\n */\nexport function isColonToken(token) {\n return token.value === \":\" && token.type === \"Punctuator\"\n}\n\n/**\n * Checks if the given token is an opening parenthesis token or not.\n * @param {Token} token - The token to check.\n * @returns {boolean} `true` if the token is an opening parenthesis token.\n */\nexport function isOpeningParenToken(token) {\n return token.value === \"(\" && token.type === \"Punctuator\"\n}\n\n/**\n * Checks if the given token is a closing parenthesis token or not.\n * @param {Token} token - The token to check.\n * @returns {boolean} `true` if the token is a closing parenthesis token.\n */\nexport function isClosingParenToken(token) {\n return token.value === \")\" && token.type === \"Punctuator\"\n}\n\n/**\n * Checks if the given token is an opening square bracket token or not.\n * @param {Token} token - The token to check.\n * @returns {boolean} `true` if the token is an opening square bracket token.\n */\nexport function isOpeningBracketToken(token) {\n return token.value === \"[\" && token.type === \"Punctuator\"\n}\n\n/**\n * Checks if the given token is a closing square bracket token or not.\n * @param {Token} token - The token to check.\n * @returns {boolean} `true` if the token is a closing square bracket token.\n */\nexport function isClosingBracketToken(token) {\n return token.value === \"]\" && token.type === \"Punctuator\"\n}\n\n/**\n * Checks if the given token is an opening brace token or not.\n * @param {Token} token - The token to check.\n * @returns {boolean} `true` if the token is an opening brace token.\n */\nexport function isOpeningBraceToken(token) {\n return token.value === \"{\" && token.type === \"Punctuator\"\n}\n\n/**\n * Checks if the given token is a closing brace token or not.\n * @param {Token} token - The token to check.\n * @returns {boolean} `true` if the token is a closing brace token.\n */\nexport function isClosingBraceToken(token) {\n return token.value === \"}\" && token.type === \"Punctuator\"\n}\n\n/**\n * Checks if the given token is a comment token or not.\n * @param {Token} token - The token to check.\n * @returns {boolean} `true` if the token is a comment token.\n */\nexport function isCommentToken(token) {\n return (\n token.type === \"Line\" ||\n token.type === \"Block\" ||\n token.type === \"Shebang\"\n )\n}\n\nexport const isNotArrowToken = negate(isArrowToken)\nexport const isNotCommaToken = negate(isCommaToken)\nexport const isNotSemicolonToken = negate(isSemicolonToken)\nexport const isNotColonToken = negate(isColonToken)\nexport const isNotOpeningParenToken = negate(isOpeningParenToken)\nexport const isNotClosingParenToken = negate(isClosingParenToken)\nexport const isNotOpeningBracketToken = negate(isOpeningBracketToken)\nexport const isNotClosingBracketToken = negate(isClosingBracketToken)\nexport const isNotOpeningBraceToken = negate(isOpeningBraceToken)\nexport const isNotClosingBraceToken = negate(isClosingBraceToken)\nexport const isNotCommentToken = negate(isCommentToken)\n","import { isArrowToken, isOpeningParenToken } from \"./token-predicate\"\n\n/**\n * Get the `(` token of the given function node.\n * @param {Node} node - The function node to get.\n * @param {SourceCode} sourceCode - The source code object to get tokens.\n * @returns {Token} `(` token.\n */\nfunction getOpeningParenOfParams(node, sourceCode) {\n return node.id\n ? sourceCode.getTokenAfter(node.id, isOpeningParenToken)\n : sourceCode.getFirstToken(node, isOpeningParenToken)\n}\n\n/**\n * Get the location of the given function node for reporting.\n * @param {Node} node - The function node to get.\n * @param {SourceCode} sourceCode - The source code object to get tokens.\n * @returns {string} The location of the function node for reporting.\n */\nexport function getFunctionHeadLocation(node, sourceCode) {\n const parent = node.parent\n let start = null\n let end = null\n\n if (node.type === \"ArrowFunctionExpression\") {\n const arrowToken = sourceCode.getTokenBefore(node.body, isArrowToken)\n\n start = arrowToken.loc.start\n end = arrowToken.loc.end\n } else if (\n parent.type === \"Property\" ||\n parent.type === \"MethodDefinition\"\n ) {\n start = parent.loc.start\n end = getOpeningParenOfParams(node, sourceCode).loc.start\n } else {\n start = node.loc.start\n end = getOpeningParenOfParams(node, sourceCode).loc.start\n }\n\n return {\n start: Object.assign({}, start),\n end: Object.assign({}, end),\n }\n}\n","import { findVariable } from \"./find-variable\"\n\nconst builtinNames = Object.freeze(\n new Set([\n \"Array\",\n \"ArrayBuffer\",\n \"Boolean\",\n \"DataView\",\n \"Date\",\n \"decodeURI\",\n \"decodeURIComponent\",\n \"encodeURI\",\n \"encodeURIComponent\",\n \"Error\",\n \"escape\",\n \"EvalError\",\n \"Float32Array\",\n \"Float64Array\",\n \"Function\",\n \"Infinity\",\n \"Int16Array\",\n \"Int32Array\",\n \"Int8Array\",\n \"isFinite\",\n \"isNaN\",\n \"isPrototypeOf\",\n \"JSON\",\n \"Map\",\n \"Math\",\n \"NaN\",\n \"Number\",\n \"Object\",\n \"parseFloat\",\n \"parseInt\",\n \"Promise\",\n \"Proxy\",\n \"RangeError\",\n \"ReferenceError\",\n \"Reflect\",\n \"RegExp\",\n \"Set\",\n \"String\",\n \"Symbol\",\n \"SyntaxError\",\n \"TypeError\",\n \"Uint16Array\",\n \"Uint32Array\",\n \"Uint8Array\",\n \"Uint8ClampedArray\",\n \"undefined\",\n \"unescape\",\n \"URIError\",\n \"WeakMap\",\n \"WeakSet\",\n ])\n)\n\n/**\n * Get the element values of a given node list.\n * @param {Node[]} nodeList The node list to get values.\n * @param {Scope|undefined} initialScope The initial scope to find variables.\n * @returns {any[]|null} The value list if all nodes are constant. Otherwise, null.\n */\nfunction getElementValues(nodeList, initialScope) {\n const valueList = []\n\n for (let i = 0; i < nodeList.length; ++i) {\n const elementNode = nodeList[i]\n\n if (elementNode == null) {\n valueList.length = i + 1\n } else if (elementNode.type === \"SpreadElement\") {\n const argument = getStaticValueR(elementNode.argument, initialScope)\n if (argument == null) {\n return null\n }\n valueList.push(...argument.value)\n } else {\n const element = getStaticValueR(elementNode, initialScope)\n if (element == null) {\n return null\n }\n valueList.push(element.value)\n }\n }\n\n return valueList\n}\n\nconst operations = Object.freeze({\n ArrayExpression(node, initialScope) {\n const elements = getElementValues(node.elements, initialScope)\n return elements != null ? { value: elements } : null\n },\n\n AssignmentExpression(node, initialScope) {\n if (node.operator === \"=\") {\n return getStaticValueR(node.right, initialScope)\n }\n return null\n },\n\n //eslint-disable-next-line complexity\n BinaryExpression(node, initialScope) {\n if (node.operator === \"in\" || node.operator === \"instanceof\") {\n // Not supported.\n return null\n }\n\n const left = getStaticValueR(node.left, initialScope)\n const right = getStaticValueR(node.right, initialScope)\n if (left != null && right != null) {\n switch (node.operator) {\n case \"==\":\n return { value: left.value == right.value } //eslint-disable-line eqeqeq\n case \"!=\":\n return { value: left.value != right.value } //eslint-disable-line eqeqeq\n case \"===\":\n return { value: left.value === right.value }\n case \"!==\":\n return { value: left.value !== right.value }\n case \"<\":\n return { value: left.value < right.value }\n case \"<=\":\n return { value: left.value <= right.value }\n case \">\":\n return { value: left.value > right.value }\n case \">=\":\n return { value: left.value >= right.value }\n case \"<<\":\n return { value: left.value << right.value }\n case \">>\":\n return { value: left.value >> right.value }\n case \">>>\":\n return { value: left.value >>> right.value }\n case \"+\":\n return { value: left.value + right.value }\n case \"-\":\n return { value: left.value - right.value }\n case \"*\":\n return { value: left.value * right.value }\n case \"/\":\n return { value: left.value / right.value }\n case \"%\":\n return { value: left.value % right.value }\n case \"**\":\n return { value: Math.pow(left.value, right.value) }\n case \"|\":\n return { value: left.value | right.value }\n case \"^\":\n return { value: left.value ^ right.value }\n case \"&\":\n return { value: left.value & right.value }\n\n // no default\n }\n }\n\n return null\n },\n\n CallExpression(node, initialScope) {\n const calleeNode = node.callee\n const args = getElementValues(node.arguments, initialScope)\n\n if (args != null) {\n if (calleeNode.type === \"MemberExpression\") {\n const object = getStaticValueR(calleeNode.object, initialScope)\n const property = calleeNode.computed\n ? getStaticValueR(calleeNode.property, initialScope)\n : { value: calleeNode.property.name }\n\n if (object != null && property != null) {\n const receiver = object.value\n const methodName = property.value\n return { value: receiver[methodName](...args) }\n }\n } else {\n const callee = getStaticValueR(calleeNode, initialScope)\n if (callee != null) {\n const func = callee.value\n return { value: func(...args) }\n }\n }\n }\n\n return null\n },\n\n ConditionalExpression(node, initialScope) {\n const test = getStaticValueR(node.test, initialScope)\n if (test != null) {\n return test.value\n ? getStaticValueR(node.consequent, initialScope)\n : getStaticValueR(node.alternate, initialScope)\n }\n return null\n },\n\n ExpressionStatement(node, initialScope) {\n return getStaticValueR(node.expression, initialScope)\n },\n\n Identifier(node, initialScope) {\n if (initialScope != null) {\n const variable = findVariable(initialScope, node)\n\n // Built-in globals.\n if (\n variable != null &&\n variable.defs.length === 0 &&\n builtinNames.has(variable.name) &&\n variable.name in global\n ) {\n return { value: global[variable.name] }\n }\n\n // Constants.\n if (variable != null && variable.defs.length === 1) {\n const def = variable.defs[0]\n if (\n def.parent &&\n def.parent.kind === \"const\" &&\n // TODO(mysticatea): don't support destructuring here.\n def.node.id.type === \"Identifier\"\n ) {\n return getStaticValueR(def.node.init, initialScope)\n }\n }\n }\n return null\n },\n\n Literal(node) {\n //istanbul ignore if : this is implementation-specific behavior.\n if (node.regex != null && node.value == null) {\n // It was a RegExp literal, but Node.js didn't support it.\n return null\n }\n return node\n },\n\n LogicalExpression(node, initialScope) {\n const left = getStaticValueR(node.left, initialScope)\n if (left != null) {\n if (\n (node.operator === \"||\" && Boolean(left.value) === true) ||\n (node.operator === \"&&\" && Boolean(left.value) === false)\n ) {\n return left\n }\n\n const right = getStaticValueR(node.right, initialScope)\n if (right != null) {\n return right\n }\n }\n\n return null\n },\n\n MemberExpression(node, initialScope) {\n const object = getStaticValueR(node.object, initialScope)\n const property = node.computed\n ? getStaticValueR(node.property, initialScope)\n : { value: node.property.name }\n\n if (object != null && property != null) {\n return { value: object.value[property.value] }\n }\n return null\n },\n\n NewExpression(node, initialScope) {\n const callee = getStaticValueR(node.callee, initialScope)\n const args = getElementValues(node.arguments, initialScope)\n\n if (callee != null && args != null) {\n const Func = callee.value\n return { value: new Func(...args) }\n }\n\n return null\n },\n\n ObjectExpression(node, initialScope) {\n const object = {}\n\n for (const propertyNode of node.properties) {\n if (propertyNode.type === \"Property\") {\n if (propertyNode.kind !== \"init\") {\n return null\n }\n const key = propertyNode.computed\n ? getStaticValueR(propertyNode.key, initialScope)\n : { value: propertyNode.key.name }\n const value = getStaticValueR(propertyNode.value, initialScope)\n if (key == null || value == null) {\n return null\n }\n object[key.value] = value.value\n } else if (\n propertyNode.type === \"SpreadElement\" ||\n propertyNode.type === \"ExperimentalSpreadProperty\"\n ) {\n const argument = getStaticValueR(\n propertyNode.argument,\n initialScope\n )\n if (argument == null) {\n return null\n }\n Object.assign(object, argument.value)\n } else {\n return null\n }\n }\n\n return { value: object }\n },\n\n SequenceExpression(node, initialScope) {\n const last = node.expressions[node.expressions.length - 1]\n return getStaticValueR(last, initialScope)\n },\n\n TaggedTemplateExpression(node, initialScope) {\n const tag = getStaticValueR(node.tag, initialScope)\n const expressions = getElementValues(\n node.quasi.expressions,\n initialScope\n )\n\n if (tag != null && expressions != null) {\n const func = tag.value\n const strings = node.quasi.quasis.map(q => q.value.cooked)\n strings.raw = node.quasi.quasis.map(q => q.value.raw)\n\n return { value: func(strings, ...expressions) }\n }\n\n return null\n },\n\n TemplateLiteral(node, initialScope) {\n const expressions = getElementValues(node.expressions, initialScope)\n if (expressions != null) {\n let value = node.quasis[0].value.cooked\n for (let i = 0; i < expressions.length; ++i) {\n value += expressions[i]\n value += node.quasis[i + 1].value.cooked\n }\n return { value }\n }\n return null\n },\n\n UnaryExpression(node, initialScope) {\n if (node.operator === \"delete\") {\n // Not supported.\n return null\n }\n if (node.operator === \"void\") {\n return { value: undefined }\n }\n\n const arg = getStaticValueR(node.argument, initialScope)\n if (arg != null) {\n switch (node.operator) {\n case \"-\":\n return { value: -arg.value }\n case \"+\":\n return { value: +arg.value } //eslint-disable-line no-implicit-coercion\n case \"!\":\n return { value: !arg.value }\n case \"~\":\n return { value: ~arg.value }\n case \"typeof\":\n return { value: typeof arg.value }\n\n // no default\n }\n }\n\n return null\n },\n})\n\n/**\n * Get the value of a given node if it's a static value.\n * @param {Node} node The node to get.\n * @param {Scope|undefined} initialScope The scope to start finding variable.\n * @returns {{value:any}|null} The static value of the node, or `null`.\n */\nfunction getStaticValueR(node, initialScope) {\n if (node != null && Object.hasOwnProperty.call(operations, node.type)) {\n return operations[node.type](node, initialScope)\n }\n return null\n}\n\n/**\n * Get the value of a given node if it's a static value.\n * @param {Node} node The node to get.\n * @param {Scope} [initialScope] The scope to start finding variable. Optional. If this scope was given, this tries to resolve identifier references which are in the given node as much as possible.\n * @returns {{value:any}|null} The static value of the node, or `null`.\n */\nexport function getStaticValue(node, initialScope = null) {\n try {\n return getStaticValueR(node, initialScope)\n } catch (_error) {\n return null\n }\n}\n","import { getStaticValue } from \"./get-static-value\"\n\n/**\n * Get the value of a given node if it's a literal or a template literal.\n * @param {Node} node The node to get.\n * @param {Scope} [initialScope] The scope to start finding variable. Optional. If the node is an Identifier node and this scope was given, this checks the variable of the identifier, and returns the value of it if the variable is a constant.\n * @returns {string|null} The value of the node, or `null`.\n */\nexport function getStringIfConstant(node, initialScope = null) {\n const evaluated = getStaticValue(node, initialScope)\n return evaluated && String(evaluated.value)\n}\n","import { getStringIfConstant } from \"./get-string-if-constant\"\n\n/**\n * Get the property name from a MemberExpression node or a Property node.\n * @param {Node} node The node to get.\n * @param {Scope} [initialScope] The scope to start finding variable. Optional. If the node is a computed property node and this scope was given, this checks the computed property name by the `getStringIfConstant` function with the scope, and returns the value of it.\n * @returns {string|null} The property name of the node.\n */\nexport function getPropertyName(node, initialScope) {\n switch (node.type) {\n case \"MemberExpression\":\n if (node.computed) {\n return getStringIfConstant(node.property, initialScope)\n }\n return node.property.name\n\n case \"Property\":\n case \"MethodDefinition\":\n if (node.computed) {\n return getStringIfConstant(node.key, initialScope)\n }\n if (node.key.type === \"Literal\") {\n return String(node.key.value)\n }\n return node.key.name\n\n // no default\n }\n\n return null\n}\n","import { getPropertyName } from \"./get-property-name\"\n\n/**\n * Get the name and kind of the given function node.\n * @param {ASTNode} node - The function node to get.\n * @returns {string} The name and kind of the function node.\n */\nexport function getFunctionNameWithKind(node) {\n const parent = node.parent\n const tokens = []\n\n if (parent.type === \"MethodDefinition\" && parent.static) {\n tokens.push(\"static\")\n }\n if (node.async) {\n tokens.push(\"async\")\n }\n if (node.generator) {\n tokens.push(\"generator\")\n }\n\n if (node.type === \"ArrowFunctionExpression\") {\n tokens.push(\"arrow\", \"function\")\n } else if (\n parent.type === \"Property\" ||\n parent.type === \"MethodDefinition\"\n ) {\n if (parent.kind === \"constructor\") {\n return \"constructor\"\n }\n if (parent.kind === \"get\") {\n tokens.push(\"getter\")\n } else if (parent.kind === \"set\") {\n tokens.push(\"setter\")\n } else {\n tokens.push(\"method\")\n }\n } else {\n tokens.push(\"function\")\n }\n\n if (node.id) {\n tokens.push(`'${node.id.name}'`)\n } else {\n const name = getPropertyName(parent)\n\n if (name) {\n tokens.push(`'${name}'`)\n }\n }\n\n return tokens.join(\" \")\n}\n","import evk from \"eslint-visitor-keys\"\n\nconst typeConversionBinaryOps = Object.freeze(\n new Set([\n \"==\",\n \"!=\",\n \"<\",\n \"<=\",\n \">\",\n \">=\",\n \"<<\",\n \">>\",\n \">>>\",\n \"+\",\n \"-\",\n \"*\",\n \"/\",\n \"%\",\n \"|\",\n \"^\",\n \"&\",\n \"in\",\n ])\n)\nconst typeConversionUnaryOps = Object.freeze(new Set([\"-\", \"+\", \"!\", \"~\"]))\nconst visitor = Object.freeze(\n Object.assign(Object.create(null), {\n $visit(node, options, visitorKeys) {\n const { type } = node\n\n if (typeof this[type] === \"function\") {\n return this[type](node, options, visitorKeys)\n }\n\n return this.$visitChildren(node, options, visitorKeys)\n },\n\n $visitChildren(node, options, visitorKeys) {\n const { type } = node\n\n for (const key of visitorKeys[type] || evk.getKeys(node)) {\n const value = node[key]\n\n if (Array.isArray(value)) {\n for (const element of value) {\n if (\n element &&\n this.$visit(element, options, visitorKeys)\n ) {\n return true\n }\n }\n } else if (value && this.$visit(value, options, visitorKeys)) {\n return true\n }\n }\n\n return false\n },\n\n ArrowFunctionExpression() {\n return false\n },\n AssignmentExpression() {\n return true\n },\n AwaitExpression() {\n return true\n },\n BinaryExpression(node, options, visitorKeys) {\n if (\n options.considerImplicitTypeConversion &&\n typeConversionBinaryOps.has(node.operator) &&\n (node.left.type !== \"Literal\" || node.right.type !== \"Literal\")\n ) {\n return true\n }\n return this.$visitChildren(node, options, visitorKeys)\n },\n CallExpression() {\n return true\n },\n FunctionExpression() {\n return false\n },\n ImportExpression() {\n return true\n },\n MemberExpression(node, options, visitorKeys) {\n if (options.considerGetters) {\n return true\n }\n if (\n options.considerImplicitTypeConversion &&\n node.computed &&\n node.property.type !== \"Literal\"\n ) {\n return true\n }\n return this.$visitChildren(node, options, visitorKeys)\n },\n MethodDefinition(node, options, visitorKeys) {\n if (\n options.considerImplicitTypeConversion &&\n node.computed &&\n node.key.type !== \"Literal\"\n ) {\n return true\n }\n return this.$visitChildren(node, options, visitorKeys)\n },\n NewExpression() {\n return true\n },\n Property(node, options, visitorKeys) {\n if (\n options.considerImplicitTypeConversion &&\n node.computed &&\n node.key.type !== \"Literal\"\n ) {\n return true\n }\n return this.$visitChildren(node, options, visitorKeys)\n },\n UnaryExpression(node, options, visitorKeys) {\n if (node.operator === \"delete\") {\n return true\n }\n if (\n options.considerImplicitTypeConversion &&\n typeConversionUnaryOps.has(node.operator) &&\n node.argument.type !== \"Literal\"\n ) {\n return true\n }\n return this.$visitChildren(node, options, visitorKeys)\n },\n UpdateExpression() {\n return true\n },\n YieldExpression() {\n return true\n },\n })\n)\n\n/**\n * Check whether a given node has any side effect or not.\n * @param {Node} node The node to get.\n * @param {SourceCode} sourceCode The source code object.\n * @param {object} [options] The option object.\n * @param {boolean} [options.considerGetters=false] If `true` then it considers member accesses as the node which has side effects.\n * @param {boolean} [options.considerImplicitTypeConversion=false] If `true` then it considers implicit type conversion as the node which has side effects.\n * @param {object} [options.visitorKeys=evk.KEYS] The keys to traverse nodes. Use `context.getSourceCode().visitorKeys`.\n * @returns {boolean} `true` if the node has a certain side effect.\n */\nexport function hasSideEffect(\n node,\n sourceCode,\n { considerGetters = false, considerImplicitTypeConversion = false } = {}\n) {\n return visitor.$visit(\n node,\n { considerGetters, considerImplicitTypeConversion },\n sourceCode.visitorKeys || evk.KEYS\n )\n}\n","import { isClosingParenToken, isOpeningParenToken } from \"./token-predicate\"\n\n/**\n * Get the left parenthesis of the parent node syntax if it exists.\n * E.g., `if (a) {}` then the `(`.\n * @param {Node} node The AST node to check.\n * @param {SourceCode} sourceCode The source code object to get tokens.\n * @returns {Token|null} The left parenthesis of the parent node syntax\n */\nfunction getParentSyntaxParen(node, sourceCode) {\n const parent = node.parent\n\n switch (parent.type) {\n case \"CallExpression\":\n case \"NewExpression\":\n if (parent.arguments.length === 1 && parent.arguments[0] === node) {\n return sourceCode.getTokenAfter(\n parent.callee,\n isOpeningParenToken\n )\n }\n return null\n\n case \"DoWhileStatement\":\n if (parent.test === node) {\n return sourceCode.getTokenAfter(\n parent.body,\n isOpeningParenToken\n )\n }\n return null\n\n case \"IfStatement\":\n case \"WhileStatement\":\n if (parent.test === node) {\n return sourceCode.getFirstToken(parent, 1)\n }\n return null\n\n case \"ImportExpression\":\n if (parent.source === node) {\n return sourceCode.getFirstToken(parent, 1)\n }\n return null\n\n case \"SwitchStatement\":\n if (parent.discriminant === node) {\n return sourceCode.getFirstToken(parent, 1)\n }\n return null\n\n case \"WithStatement\":\n if (parent.object === node) {\n return sourceCode.getFirstToken(parent, 1)\n }\n return null\n\n default:\n return null\n }\n}\n\n/**\n * Check whether a given node is parenthesized or not.\n * @param {number} times The number of parantheses.\n * @param {Node} node The AST node to check.\n * @param {SourceCode} sourceCode The source code object to get tokens.\n * @returns {boolean} `true` if the node is parenthesized the given times.\n */\n/**\n * Check whether a given node is parenthesized or not.\n * @param {Node} node The AST node to check.\n * @param {SourceCode} sourceCode The source code object to get tokens.\n * @returns {boolean} `true` if the node is parenthesized.\n */\nexport function isParenthesized(\n timesOrNode,\n nodeOrSourceCode,\n optionalSourceCode\n) {\n let times, node, sourceCode, maybeLeftParen, maybeRightParen\n if (typeof timesOrNode === \"number\") {\n times = timesOrNode | 0\n node = nodeOrSourceCode\n sourceCode = optionalSourceCode\n if (!(times >= 1)) {\n throw new TypeError(\"'times' should be a positive integer.\")\n }\n } else {\n times = 1\n node = timesOrNode\n sourceCode = nodeOrSourceCode\n }\n\n if (node == null) {\n return false\n }\n\n maybeLeftParen = maybeRightParen = node\n do {\n maybeLeftParen = sourceCode.getTokenBefore(maybeLeftParen)\n maybeRightParen = sourceCode.getTokenAfter(maybeRightParen)\n } while (\n maybeLeftParen != null &&\n maybeRightParen != null &&\n isOpeningParenToken(maybeLeftParen) &&\n isClosingParenToken(maybeRightParen) &&\n // Avoid false positive such as `if (a) {}`\n maybeLeftParen !== getParentSyntaxParen(node, sourceCode) &&\n --times > 0\n )\n\n return times === 0\n}\n","/**\n * @author Toru Nagashima \n * See LICENSE file in root directory for full license.\n */\n\nconst placeholder = /\\$(?:[$&`']|[1-9][0-9]?)/gu\n\n/** @type {WeakMap} */\nconst internal = new WeakMap()\n\n/**\n * Check whether a given character is escaped or not.\n * @param {string} str The string to check.\n * @param {number} index The location of the character to check.\n * @returns {boolean} `true` if the character is escaped.\n */\nfunction isEscaped(str, index) {\n let escaped = false\n for (let i = index - 1; i >= 0 && str.charCodeAt(i) === 0x5c; --i) {\n escaped = !escaped\n }\n return escaped\n}\n\n/**\n * Replace a given string by a given matcher.\n * @param {PatternMatcher} matcher The pattern matcher.\n * @param {string} str The string to be replaced.\n * @param {string} replacement The new substring to replace each matched part.\n * @returns {string} The replaced string.\n */\nfunction replaceS(matcher, str, replacement) {\n const chunks = []\n let index = 0\n\n /** @type {RegExpExecArray} */\n let match = null\n\n /**\n * @param {string} key The placeholder.\n * @returns {string} The replaced string.\n */\n function replacer(key) {\n switch (key) {\n case \"$$\":\n return \"$\"\n case \"$&\":\n return match[0]\n case \"$`\":\n return str.slice(0, match.index)\n case \"$'\":\n return str.slice(match.index + match[0].length)\n default: {\n const i = key.slice(1)\n if (i in match) {\n return match[i]\n }\n return key\n }\n }\n }\n\n for (match of matcher.execAll(str)) {\n chunks.push(str.slice(index, match.index))\n chunks.push(replacement.replace(placeholder, replacer))\n index = match.index + match[0].length\n }\n chunks.push(str.slice(index))\n\n return chunks.join(\"\")\n}\n\n/**\n * Replace a given string by a given matcher.\n * @param {PatternMatcher} matcher The pattern matcher.\n * @param {string} str The string to be replaced.\n * @param {(...strs[])=>string} replace The function to replace each matched part.\n * @returns {string} The replaced string.\n */\nfunction replaceF(matcher, str, replace) {\n const chunks = []\n let index = 0\n\n for (const match of matcher.execAll(str)) {\n chunks.push(str.slice(index, match.index))\n chunks.push(String(replace(...match, match.index, match.input)))\n index = match.index + match[0].length\n }\n chunks.push(str.slice(index))\n\n return chunks.join(\"\")\n}\n\n/**\n * The class to find patterns as considering escape sequences.\n */\nexport class PatternMatcher {\n /**\n * Initialize this matcher.\n * @param {RegExp} pattern The pattern to match.\n * @param {{escaped:boolean}} options The options.\n */\n constructor(pattern, { escaped = false } = {}) {\n if (!(pattern instanceof RegExp)) {\n throw new TypeError(\"'pattern' should be a RegExp instance.\")\n }\n if (!pattern.flags.includes(\"g\")) {\n throw new Error(\"'pattern' should contains 'g' flag.\")\n }\n\n internal.set(this, {\n pattern: new RegExp(pattern.source, pattern.flags),\n escaped: Boolean(escaped),\n })\n }\n\n /**\n * Find the pattern in a given string.\n * @param {string} str The string to find.\n * @returns {IterableIterator} The iterator which iterate the matched information.\n */\n *execAll(str) {\n const { pattern, escaped } = internal.get(this)\n let match = null\n let lastIndex = 0\n\n pattern.lastIndex = 0\n while ((match = pattern.exec(str)) != null) {\n if (escaped || !isEscaped(str, match.index)) {\n lastIndex = pattern.lastIndex\n yield match\n pattern.lastIndex = lastIndex\n }\n }\n }\n\n /**\n * Check whether the pattern is found in a given string.\n * @param {string} str The string to check.\n * @returns {boolean} `true` if the pattern was found in the string.\n */\n test(str) {\n const it = this.execAll(str)\n const ret = it.next()\n return !ret.done\n }\n\n /**\n * Replace a given string.\n * @param {string} str The string to be replaced.\n * @param {(string|((...strs:string[])=>string))} replacer The string or function to replace. This is the same as the 2nd argument of `String.prototype.replace`.\n * @returns {string} The replaced string.\n */\n [Symbol.replace](str, replacer) {\n return typeof replacer === \"function\"\n ? replaceF(this, String(str), replacer)\n : replaceS(this, String(str), String(replacer))\n }\n}\n","import { findVariable } from \"./find-variable\"\nimport { getPropertyName } from \"./get-property-name\"\nimport { getStringIfConstant } from \"./get-string-if-constant\"\n\nconst SENTINEL_TYPE = /^(?:.+?Statement|.+?Declaration|(?:Array|ArrowFunction|Assignment|Call|Class|Function|Member|New|Object)Expression|AssignmentPattern|Program|VariableDeclarator)$/u\nconst IMPORT_TYPE = /^(?:Import|Export(?:All|Default|Named))Declaration$/u\nconst has = Function.call.bind(Object.hasOwnProperty)\n\nexport const READ = Symbol(\"read\")\nexport const CALL = Symbol(\"call\")\nexport const CONSTRUCT = Symbol(\"construct\")\nexport const ESM = Symbol(\"esm\")\n\nconst requireCall = { require: { [CALL]: true } }\n\n/**\n * Check whether a given variable is modified or not.\n * @param {Variable} variable The variable to check.\n * @returns {boolean} `true` if the variable is modified.\n */\nfunction isModifiedGlobal(variable) {\n return (\n variable == null ||\n variable.defs.length !== 0 ||\n variable.references.some(r => r.isWrite())\n )\n}\n\n/**\n * The reference tracker.\n */\nexport class ReferenceTracker {\n /**\n * Initialize this tracker.\n * @param {Scope} globalScope The global scope.\n * @param {object} [options] The options.\n * @param {\"legacy\"|\"strict\"} [options.mode=\"strict\"] The mode to determine the ImportDeclaration's behavior for CJS modules.\n * @param {string[]} [options.globalObjectNames=[\"global\",\"self\",\"window\"]] The variable names for Global Object.\n */\n constructor(\n globalScope,\n {\n mode = \"strict\",\n globalObjectNames = [\"global\", \"self\", \"window\"],\n } = {}\n ) {\n this.variableStack = []\n this.globalScope = globalScope\n this.mode = mode\n this.globalObjectNames = globalObjectNames.slice(0)\n }\n\n /**\n * Iterate the references of global variables.\n * @param {object} traceMap The trace map.\n * @returns {IterableIterator<{node:Node,path:string[],type:symbol,info:any}>} The iterator to iterate references.\n */\n *iterateGlobalReferences(traceMap) {\n for (const key of Object.keys(traceMap)) {\n const nextTraceMap = traceMap[key]\n const path = [key]\n const variable = this.globalScope.set.get(key)\n\n if (isModifiedGlobal(variable)) {\n continue\n }\n\n yield* this._iterateVariableReferences(\n variable,\n path,\n nextTraceMap,\n true\n )\n }\n\n for (const key of this.globalObjectNames) {\n const path = []\n const variable = this.globalScope.set.get(key)\n\n if (isModifiedGlobal(variable)) {\n continue\n }\n\n yield* this._iterateVariableReferences(\n variable,\n path,\n traceMap,\n false\n )\n }\n }\n\n /**\n * Iterate the references of CommonJS modules.\n * @param {object} traceMap The trace map.\n * @returns {IterableIterator<{node:Node,path:string[],type:symbol,info:any}>} The iterator to iterate references.\n */\n *iterateCjsReferences(traceMap) {\n for (const { node } of this.iterateGlobalReferences(requireCall)) {\n const key = getStringIfConstant(node.arguments[0])\n if (key == null || !has(traceMap, key)) {\n continue\n }\n\n const nextTraceMap = traceMap[key]\n const path = [key]\n\n if (nextTraceMap[READ]) {\n yield {\n node,\n path,\n type: READ,\n info: nextTraceMap[READ],\n }\n }\n yield* this._iteratePropertyReferences(node, path, nextTraceMap)\n }\n }\n\n /**\n * Iterate the references of ES modules.\n * @param {object} traceMap The trace map.\n * @returns {IterableIterator<{node:Node,path:string[],type:symbol,info:any}>} The iterator to iterate references.\n */\n *iterateEsmReferences(traceMap) {\n const programNode = this.globalScope.block\n\n for (const node of programNode.body) {\n if (!IMPORT_TYPE.test(node.type) || node.source == null) {\n continue\n }\n const moduleId = node.source.value\n\n if (!has(traceMap, moduleId)) {\n continue\n }\n const nextTraceMap = traceMap[moduleId]\n const path = [moduleId]\n\n if (nextTraceMap[READ]) {\n yield { node, path, type: READ, info: nextTraceMap[READ] }\n }\n\n if (node.type === \"ExportAllDeclaration\") {\n for (const key of Object.keys(nextTraceMap)) {\n const exportTraceMap = nextTraceMap[key]\n if (exportTraceMap[READ]) {\n yield {\n node,\n path: path.concat(key),\n type: READ,\n info: exportTraceMap[READ],\n }\n }\n }\n } else {\n for (const specifier of node.specifiers) {\n const esm = has(nextTraceMap, ESM)\n const it = this._iterateImportReferences(\n specifier,\n path,\n esm\n ? nextTraceMap\n : this.mode === \"legacy\"\n ? Object.assign(\n { default: nextTraceMap },\n nextTraceMap\n )\n : { default: nextTraceMap }\n )\n\n if (esm) {\n yield* it\n } else {\n for (const report of it) {\n report.path = report.path.filter(exceptDefault)\n if (\n report.path.length >= 2 ||\n report.type !== READ\n ) {\n yield report\n }\n }\n }\n }\n }\n }\n }\n\n /**\n * Iterate the references for a given variable.\n * @param {Variable} variable The variable to iterate that references.\n * @param {string[]} path The current path.\n * @param {object} traceMap The trace map.\n * @param {boolean} shouldReport = The flag to report those references.\n * @returns {IterableIterator<{node:Node,path:string[],type:symbol,info:any}>} The iterator to iterate references.\n */\n *_iterateVariableReferences(variable, path, traceMap, shouldReport) {\n if (this.variableStack.includes(variable)) {\n return\n }\n this.variableStack.push(variable)\n try {\n for (const reference of variable.references) {\n if (!reference.isRead()) {\n continue\n }\n const node = reference.identifier\n\n if (shouldReport && traceMap[READ]) {\n yield { node, path, type: READ, info: traceMap[READ] }\n }\n yield* this._iteratePropertyReferences(node, path, traceMap)\n }\n } finally {\n this.variableStack.pop()\n }\n }\n\n /**\n * Iterate the references for a given AST node.\n * @param rootNode The AST node to iterate references.\n * @param {string[]} path The current path.\n * @param {object} traceMap The trace map.\n * @returns {IterableIterator<{node:Node,path:string[],type:symbol,info:any}>} The iterator to iterate references.\n */\n //eslint-disable-next-line complexity\n *_iteratePropertyReferences(rootNode, path, traceMap) {\n let node = rootNode\n while (!SENTINEL_TYPE.test(node.parent.type)) {\n node = node.parent\n }\n\n const parent = node.parent\n if (parent.type === \"MemberExpression\") {\n if (parent.object === node) {\n const key = getPropertyName(parent)\n if (key == null || !has(traceMap, key)) {\n return\n }\n\n path = path.concat(key) //eslint-disable-line no-param-reassign\n const nextTraceMap = traceMap[key]\n if (nextTraceMap[READ]) {\n yield {\n node: parent,\n path,\n type: READ,\n info: nextTraceMap[READ],\n }\n }\n yield* this._iteratePropertyReferences(\n parent,\n path,\n nextTraceMap\n )\n }\n return\n }\n if (parent.type === \"CallExpression\") {\n if (parent.callee === node && traceMap[CALL]) {\n yield { node: parent, path, type: CALL, info: traceMap[CALL] }\n }\n return\n }\n if (parent.type === \"NewExpression\") {\n if (parent.callee === node && traceMap[CONSTRUCT]) {\n yield {\n node: parent,\n path,\n type: CONSTRUCT,\n info: traceMap[CONSTRUCT],\n }\n }\n return\n }\n if (parent.type === \"AssignmentExpression\") {\n if (parent.right === node) {\n yield* this._iterateLhsReferences(parent.left, path, traceMap)\n yield* this._iteratePropertyReferences(parent, path, traceMap)\n }\n return\n }\n if (parent.type === \"AssignmentPattern\") {\n if (parent.right === node) {\n yield* this._iterateLhsReferences(parent.left, path, traceMap)\n }\n return\n }\n if (parent.type === \"VariableDeclarator\") {\n if (parent.init === node) {\n yield* this._iterateLhsReferences(parent.id, path, traceMap)\n }\n }\n }\n\n /**\n * Iterate the references for a given Pattern node.\n * @param {Node} patternNode The Pattern node to iterate references.\n * @param {string[]} path The current path.\n * @param {object} traceMap The trace map.\n * @returns {IterableIterator<{node:Node,path:string[],type:symbol,info:any}>} The iterator to iterate references.\n */\n *_iterateLhsReferences(patternNode, path, traceMap) {\n if (patternNode.type === \"Identifier\") {\n const variable = findVariable(this.globalScope, patternNode)\n if (variable != null) {\n yield* this._iterateVariableReferences(\n variable,\n path,\n traceMap,\n false\n )\n }\n return\n }\n if (patternNode.type === \"ObjectPattern\") {\n for (const property of patternNode.properties) {\n const key = getPropertyName(property)\n\n if (key == null || !has(traceMap, key)) {\n continue\n }\n\n const nextPath = path.concat(key)\n const nextTraceMap = traceMap[key]\n if (nextTraceMap[READ]) {\n yield {\n node: property,\n path: nextPath,\n type: READ,\n info: nextTraceMap[READ],\n }\n }\n yield* this._iterateLhsReferences(\n property.value,\n nextPath,\n nextTraceMap\n )\n }\n return\n }\n if (patternNode.type === \"AssignmentPattern\") {\n yield* this._iterateLhsReferences(patternNode.left, path, traceMap)\n }\n }\n\n /**\n * Iterate the references for a given ModuleSpecifier node.\n * @param {Node} specifierNode The ModuleSpecifier node to iterate references.\n * @param {string[]} path The current path.\n * @param {object} traceMap The trace map.\n * @returns {IterableIterator<{node:Node,path:string[],type:symbol,info:any}>} The iterator to iterate references.\n */\n *_iterateImportReferences(specifierNode, path, traceMap) {\n const type = specifierNode.type\n\n if (type === \"ImportSpecifier\" || type === \"ImportDefaultSpecifier\") {\n const key =\n type === \"ImportDefaultSpecifier\"\n ? \"default\"\n : specifierNode.imported.name\n if (!has(traceMap, key)) {\n return\n }\n\n path = path.concat(key) //eslint-disable-line no-param-reassign\n const nextTraceMap = traceMap[key]\n if (nextTraceMap[READ]) {\n yield {\n node: specifierNode,\n path,\n type: READ,\n info: nextTraceMap[READ],\n }\n }\n yield* this._iterateVariableReferences(\n findVariable(this.globalScope, specifierNode.local),\n path,\n nextTraceMap,\n false\n )\n\n return\n }\n\n if (type === \"ImportNamespaceSpecifier\") {\n yield* this._iterateVariableReferences(\n findVariable(this.globalScope, specifierNode.local),\n path,\n traceMap,\n false\n )\n return\n }\n\n if (type === \"ExportSpecifier\") {\n const key = specifierNode.local.name\n if (!has(traceMap, key)) {\n return\n }\n\n path = path.concat(key) //eslint-disable-line no-param-reassign\n const nextTraceMap = traceMap[key]\n if (nextTraceMap[READ]) {\n yield {\n node: specifierNode,\n path,\n type: READ,\n info: nextTraceMap[READ],\n }\n }\n }\n }\n}\n\nReferenceTracker.READ = READ\nReferenceTracker.CALL = CALL\nReferenceTracker.CONSTRUCT = CONSTRUCT\nReferenceTracker.ESM = ESM\n\n/**\n * This is a predicate function for Array#filter.\n * @param {string} name A name part.\n * @param {number} index The index of the name.\n * @returns {boolean} `false` if it's default.\n */\nfunction exceptDefault(name, index) {\n return !(index === 1 && name === \"default\")\n}\n","import { findVariable } from \"./find-variable\"\nimport { getFunctionHeadLocation } from \"./get-function-head-location\"\nimport { getFunctionNameWithKind } from \"./get-function-name-with-kind\"\nimport { getInnermostScope } from \"./get-innermost-scope\"\nimport { getPropertyName } from \"./get-property-name\"\nimport { getStaticValue } from \"./get-static-value\"\nimport { getStringIfConstant } from \"./get-string-if-constant\"\nimport { hasSideEffect } from \"./has-side-effect\"\nimport { isParenthesized } from \"./is-parenthesized\"\nimport { PatternMatcher } from \"./pattern-matcher\"\nimport {\n CALL,\n CONSTRUCT,\n ESM,\n READ,\n ReferenceTracker,\n} from \"./reference-tracker\"\nimport {\n isArrowToken,\n isClosingBraceToken,\n isClosingBracketToken,\n isClosingParenToken,\n isColonToken,\n isCommaToken,\n isCommentToken,\n isNotArrowToken,\n isNotClosingBraceToken,\n isNotClosingBracketToken,\n isNotClosingParenToken,\n isNotColonToken,\n isNotCommaToken,\n isNotCommentToken,\n isNotOpeningBraceToken,\n isNotOpeningBracketToken,\n isNotOpeningParenToken,\n isNotSemicolonToken,\n isOpeningBraceToken,\n isOpeningBracketToken,\n isOpeningParenToken,\n isSemicolonToken,\n} from \"./token-predicate\"\n\nexport default {\n CALL,\n CONSTRUCT,\n ESM,\n findVariable,\n getFunctionHeadLocation,\n getFunctionNameWithKind,\n getInnermostScope,\n getPropertyName,\n getStaticValue,\n getStringIfConstant,\n hasSideEffect,\n isArrowToken,\n isClosingBraceToken,\n isClosingBracketToken,\n isClosingParenToken,\n isColonToken,\n isCommaToken,\n isCommentToken,\n isNotArrowToken,\n isNotClosingBraceToken,\n isNotClosingBracketToken,\n isNotClosingParenToken,\n isNotColonToken,\n isNotCommaToken,\n isNotCommentToken,\n isNotOpeningBraceToken,\n isNotOpeningBracketToken,\n isNotOpeningParenToken,\n isNotSemicolonToken,\n isOpeningBraceToken,\n isOpeningBracketToken,\n isOpeningParenToken,\n isParenthesized,\n isSemicolonToken,\n PatternMatcher,\n READ,\n ReferenceTracker,\n}\nexport {\n CALL,\n CONSTRUCT,\n ESM,\n findVariable,\n getFunctionHeadLocation,\n getFunctionNameWithKind,\n getInnermostScope,\n getPropertyName,\n getStaticValue,\n getStringIfConstant,\n hasSideEffect,\n isArrowToken,\n isClosingBraceToken,\n isClosingBracketToken,\n isClosingParenToken,\n isColonToken,\n isCommaToken,\n isCommentToken,\n isNotArrowToken,\n isNotClosingBraceToken,\n isNotClosingBracketToken,\n isNotClosingParenToken,\n isNotColonToken,\n isNotCommaToken,\n isNotCommentToken,\n isNotOpeningBraceToken,\n isNotOpeningBracketToken,\n isNotOpeningParenToken,\n isNotSemicolonToken,\n isOpeningBraceToken,\n isOpeningBracketToken,\n isOpeningParenToken,\n isParenthesized,\n isSemicolonToken,\n PatternMatcher,\n READ,\n Reference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,IAAI;oBACV,IAAI,EAAE,YAAY,CAAC,IAAI,CAAC;kBAC3B;aACJ;SACJ;KACJ;CACJ;;AAED,gBAAgB,CAAC,IAAI,GAAG,KAAI;AAC5B,gBAAgB,CAAC,IAAI,GAAG,KAAI;AAC5B,gBAAgB,CAAC,SAAS,GAAG,UAAS;AACtC,gBAAgB,CAAC,GAAG,GAAG,IAAG;;;;;;;;AAQ1B,SAAS,aAAa,CAAC,IAAI,EAAE,KAAK,EAAE;IAChC,OAAO,EAAE,KAAK,KAAK,CAAC,IAAI,IAAI,KAAK,SAAS,CAAC;CAC9C;;ACnYD,YAAe;IACX,IAAI;IACJ,SAAS;IACT,GAAG;IACH,YAAY;IACZ,uBAAuB;IACvB,uBAAuB;IACvB,iBAAiB;IACjB,eAAe;IACf,cAAc;IACd,mBAAmB;IACnB,aAAa;IACb,YAAY;IACZ,mBAAmB;IACnB,qBAAqB;IACrB,mBAAmB;IACnB,YAAY;IACZ,YAAY;IACZ,cAAc;IACd,eAAe;IACf,sBAAsB;IACtB,wBAAwB;IACxB,sBAAsB;IACtB,eAAe;IACf,eAAe;IACf,iBAAiB;IACjB,sBAAsB;IACtB,wBAAwB;IACxB,sBAAsB;IACtB,mBAAmB;IACnB,mBAAmB;IACnB,qBAAqB;IACrB,mBAAmB;IACnB,eAAe;IACf,gBAAgB;IAChB,cAAc;IACd,IAAI;IACJ,gBAAgB;CACnB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file +{"version":3,"file":"index.js","sources":["src/get-innermost-scope.js","src/find-variable.js","src/token-predicate.js","src/get-function-head-location.js","src/get-static-value.js","src/get-string-if-constant.js","src/get-property-name.js","src/get-function-name-with-kind.js","src/has-side-effect.js","src/is-parenthesized.js","src/pattern-matcher.js","src/reference-tracker.js","src/index.js"],"sourcesContent":["/**\n * Get the innermost scope which contains a given location.\n * @param {Scope} initialScope The initial scope to search.\n * @param {Node} node The location to search.\n * @returns {Scope} The innermost scope.\n */\nexport function getInnermostScope(initialScope, node) {\n const location = node.range[0]\n\n let scope = initialScope\n let found = false\n do {\n found = false\n for (const childScope of scope.childScopes) {\n const range = childScope.block.range\n\n if (range[0] <= location && location < range[1]) {\n scope = childScope\n found = true\n break\n }\n }\n } while (found)\n\n return scope\n}\n","import { getInnermostScope } from \"./get-innermost-scope\"\n\n/**\n * Find the variable of a given name.\n * @param {Scope} initialScope The scope to start finding.\n * @param {string|Node} nameOrNode The variable name to find. If this is a Node object then it should be an Identifier node.\n * @returns {Variable|null} The found variable or null.\n */\nexport function findVariable(initialScope, nameOrNode) {\n let name = \"\"\n let scope = initialScope\n\n if (typeof nameOrNode === \"string\") {\n name = nameOrNode\n } else {\n name = nameOrNode.name\n scope = getInnermostScope(scope, nameOrNode)\n }\n\n while (scope != null) {\n const variable = scope.set.get(name)\n if (variable != null) {\n return variable\n }\n scope = scope.upper\n }\n\n return null\n}\n","/**\n * Negate the result of `this` calling.\n * @param {Token} token The token to check.\n * @returns {boolean} `true` if the result of `this(token)` is `false`.\n */\nfunction negate0(token) {\n return !this(token) //eslint-disable-line no-invalid-this\n}\n\n/**\n * Creates the negate function of the given function.\n * @param {function(Token):boolean} f - The function to negate.\n * @returns {function(Token):boolean} Negated function.\n */\nfunction negate(f) {\n return negate0.bind(f)\n}\n\n/**\n * Checks if the given token is an arrow token or not.\n * @param {Token} token - The token to check.\n * @returns {boolean} `true` if the token is an arrow token.\n */\nexport function isArrowToken(token) {\n return token.value === \"=>\" && token.type === \"Punctuator\"\n}\n\n/**\n * Checks if the given token is a comma token or not.\n * @param {Token} token - The token to check.\n * @returns {boolean} `true` if the token is a comma token.\n */\nexport function isCommaToken(token) {\n return token.value === \",\" && token.type === \"Punctuator\"\n}\n\n/**\n * Checks if the given token is a semicolon token or not.\n * @param {Token} token - The token to check.\n * @returns {boolean} `true` if the token is a semicolon token.\n */\nexport function isSemicolonToken(token) {\n return token.value === \";\" && token.type === \"Punctuator\"\n}\n\n/**\n * Checks if the given token is a colon token or not.\n * @param {Token} token - The token to check.\n * @returns {boolean} `true` if the token is a colon token.\n */\nexport function isColonToken(token) {\n return token.value === \":\" && token.type === \"Punctuator\"\n}\n\n/**\n * Checks if the given token is an opening parenthesis token or not.\n * @param {Token} token - The token to check.\n * @returns {boolean} `true` if the token is an opening parenthesis token.\n */\nexport function isOpeningParenToken(token) {\n return token.value === \"(\" && token.type === \"Punctuator\"\n}\n\n/**\n * Checks if the given token is a closing parenthesis token or not.\n * @param {Token} token - The token to check.\n * @returns {boolean} `true` if the token is a closing parenthesis token.\n */\nexport function isClosingParenToken(token) {\n return token.value === \")\" && token.type === \"Punctuator\"\n}\n\n/**\n * Checks if the given token is an opening square bracket token or not.\n * @param {Token} token - The token to check.\n * @returns {boolean} `true` if the token is an opening square bracket token.\n */\nexport function isOpeningBracketToken(token) {\n return token.value === \"[\" && token.type === \"Punctuator\"\n}\n\n/**\n * Checks if the given token is a closing square bracket token or not.\n * @param {Token} token - The token to check.\n * @returns {boolean} `true` if the token is a closing square bracket token.\n */\nexport function isClosingBracketToken(token) {\n return token.value === \"]\" && token.type === \"Punctuator\"\n}\n\n/**\n * Checks if the given token is an opening brace token or not.\n * @param {Token} token - The token to check.\n * @returns {boolean} `true` if the token is an opening brace token.\n */\nexport function isOpeningBraceToken(token) {\n return token.value === \"{\" && token.type === \"Punctuator\"\n}\n\n/**\n * Checks if the given token is a closing brace token or not.\n * @param {Token} token - The token to check.\n * @returns {boolean} `true` if the token is a closing brace token.\n */\nexport function isClosingBraceToken(token) {\n return token.value === \"}\" && token.type === \"Punctuator\"\n}\n\n/**\n * Checks if the given token is a comment token or not.\n * @param {Token} token - The token to check.\n * @returns {boolean} `true` if the token is a comment token.\n */\nexport function isCommentToken(token) {\n return (\n token.type === \"Line\" ||\n token.type === \"Block\" ||\n token.type === \"Shebang\"\n )\n}\n\nexport const isNotArrowToken = negate(isArrowToken)\nexport const isNotCommaToken = negate(isCommaToken)\nexport const isNotSemicolonToken = negate(isSemicolonToken)\nexport const isNotColonToken = negate(isColonToken)\nexport const isNotOpeningParenToken = negate(isOpeningParenToken)\nexport const isNotClosingParenToken = negate(isClosingParenToken)\nexport const isNotOpeningBracketToken = negate(isOpeningBracketToken)\nexport const isNotClosingBracketToken = negate(isClosingBracketToken)\nexport const isNotOpeningBraceToken = negate(isOpeningBraceToken)\nexport const isNotClosingBraceToken = negate(isClosingBraceToken)\nexport const isNotCommentToken = negate(isCommentToken)\n","import { isArrowToken, isOpeningParenToken } from \"./token-predicate\"\n\n/**\n * Get the `(` token of the given function node.\n * @param {Node} node - The function node to get.\n * @param {SourceCode} sourceCode - The source code object to get tokens.\n * @returns {Token} `(` token.\n */\nfunction getOpeningParenOfParams(node, sourceCode) {\n return node.id\n ? sourceCode.getTokenAfter(node.id, isOpeningParenToken)\n : sourceCode.getFirstToken(node, isOpeningParenToken)\n}\n\n/**\n * Get the location of the given function node for reporting.\n * @param {Node} node - The function node to get.\n * @param {SourceCode} sourceCode - The source code object to get tokens.\n * @returns {string} The location of the function node for reporting.\n */\nexport function getFunctionHeadLocation(node, sourceCode) {\n const parent = node.parent\n let start = null\n let end = null\n\n if (node.type === \"ArrowFunctionExpression\") {\n const arrowToken = sourceCode.getTokenBefore(node.body, isArrowToken)\n\n start = arrowToken.loc.start\n end = arrowToken.loc.end\n } else if (\n parent.type === \"Property\" ||\n parent.type === \"MethodDefinition\"\n ) {\n start = parent.loc.start\n end = getOpeningParenOfParams(node, sourceCode).loc.start\n } else {\n start = node.loc.start\n end = getOpeningParenOfParams(node, sourceCode).loc.start\n }\n\n return {\n start: Object.assign({}, start),\n end: Object.assign({}, end),\n }\n}\n","/* globals BigInt */\n\nimport { findVariable } from \"./find-variable\"\n\nconst builtinNames = Object.freeze(\n new Set([\n \"Array\",\n \"ArrayBuffer\",\n \"BigInt\",\n \"BigInt64Array\",\n \"BigUint64Array\",\n \"Boolean\",\n \"DataView\",\n \"Date\",\n \"decodeURI\",\n \"decodeURIComponent\",\n \"encodeURI\",\n \"encodeURIComponent\",\n \"escape\",\n \"Float32Array\",\n \"Float64Array\",\n \"Function\",\n \"Infinity\",\n \"Int16Array\",\n \"Int32Array\",\n \"Int8Array\",\n \"isFinite\",\n \"isNaN\",\n \"isPrototypeOf\",\n \"JSON\",\n \"Map\",\n \"Math\",\n \"NaN\",\n \"Number\",\n \"Object\",\n \"parseFloat\",\n \"parseInt\",\n \"Promise\",\n \"Proxy\",\n \"Reflect\",\n \"RegExp\",\n \"Set\",\n \"String\",\n \"Symbol\",\n \"Uint16Array\",\n \"Uint32Array\",\n \"Uint8Array\",\n \"Uint8ClampedArray\",\n \"undefined\",\n \"unescape\",\n \"WeakMap\",\n \"WeakSet\",\n ])\n)\nconst callAllowed = new Set(\n [\n Array.isArray,\n typeof BigInt === \"function\" ? BigInt : undefined,\n Boolean,\n Date,\n Date.parse,\n decodeURI,\n decodeURIComponent,\n encodeURI,\n encodeURIComponent,\n escape,\n isFinite,\n isNaN,\n isPrototypeOf,\n ...Object.getOwnPropertyNames(Math)\n .map(k => Math[k])\n .filter(f => typeof f === \"function\"),\n Number,\n Number.isFinite,\n Number.isNaN,\n Number.parseFloat,\n Number.parseInt,\n Object,\n Object.entries, //eslint-disable-line @mysticatea/node/no-unsupported-features/es-builtins\n Object.is,\n Object.isExtensible,\n Object.isFrozen,\n Object.isSealed,\n Object.keys,\n Object.values, //eslint-disable-line @mysticatea/node/no-unsupported-features/es-builtins\n parseFloat,\n parseInt,\n RegExp,\n String,\n String.fromCharCode,\n String.fromCodePoint,\n String.raw,\n Symbol,\n Symbol.for,\n Symbol.keyFor,\n unescape,\n ].filter(f => typeof f === \"function\")\n)\nconst callPassThrough = new Set([\n Object.freeze,\n Object.preventExtensions,\n Object.seal,\n])\n\n/**\n * Get the property descriptor.\n * @param {object} object The object to get.\n * @param {string|number|symbol} name The property name to get.\n */\nfunction getPropertyDescriptor(object, name) {\n let x = object\n while ((typeof x === \"object\" || typeof x === \"function\") && x !== null) {\n const d = Object.getOwnPropertyDescriptor(x, name)\n if (d) {\n return d\n }\n x = Object.getPrototypeOf(x)\n }\n return null\n}\n\n/**\n * Check if a property is getter or not.\n * @param {object} object The object to check.\n * @param {string|number|symbol} name The property name to check.\n */\nfunction isGetter(object, name) {\n const d = getPropertyDescriptor(object, name)\n return d != null && d.get != null\n}\n\n/**\n * Get the element values of a given node list.\n * @param {Node[]} nodeList The node list to get values.\n * @param {Scope|undefined} initialScope The initial scope to find variables.\n * @returns {any[]|null} The value list if all nodes are constant. Otherwise, null.\n */\nfunction getElementValues(nodeList, initialScope) {\n const valueList = []\n\n for (let i = 0; i < nodeList.length; ++i) {\n const elementNode = nodeList[i]\n\n if (elementNode == null) {\n valueList.length = i + 1\n } else if (elementNode.type === \"SpreadElement\") {\n const argument = getStaticValueR(elementNode.argument, initialScope)\n if (argument == null) {\n return null\n }\n valueList.push(...argument.value)\n } else {\n const element = getStaticValueR(elementNode, initialScope)\n if (element == null) {\n return null\n }\n valueList.push(element.value)\n }\n }\n\n return valueList\n}\n\nconst operations = Object.freeze({\n ArrayExpression(node, initialScope) {\n const elements = getElementValues(node.elements, initialScope)\n return elements != null ? { value: elements } : null\n },\n\n AssignmentExpression(node, initialScope) {\n if (node.operator === \"=\") {\n return getStaticValueR(node.right, initialScope)\n }\n return null\n },\n\n //eslint-disable-next-line complexity\n BinaryExpression(node, initialScope) {\n if (node.operator === \"in\" || node.operator === \"instanceof\") {\n // Not supported.\n return null\n }\n\n const left = getStaticValueR(node.left, initialScope)\n const right = getStaticValueR(node.right, initialScope)\n if (left != null && right != null) {\n switch (node.operator) {\n case \"==\":\n return { value: left.value == right.value } //eslint-disable-line eqeqeq\n case \"!=\":\n return { value: left.value != right.value } //eslint-disable-line eqeqeq\n case \"===\":\n return { value: left.value === right.value }\n case \"!==\":\n return { value: left.value !== right.value }\n case \"<\":\n return { value: left.value < right.value }\n case \"<=\":\n return { value: left.value <= right.value }\n case \">\":\n return { value: left.value > right.value }\n case \">=\":\n return { value: left.value >= right.value }\n case \"<<\":\n return { value: left.value << right.value }\n case \">>\":\n return { value: left.value >> right.value }\n case \">>>\":\n return { value: left.value >>> right.value }\n case \"+\":\n return { value: left.value + right.value }\n case \"-\":\n return { value: left.value - right.value }\n case \"*\":\n return { value: left.value * right.value }\n case \"/\":\n return { value: left.value / right.value }\n case \"%\":\n return { value: left.value % right.value }\n case \"**\":\n return { value: Math.pow(left.value, right.value) }\n case \"|\":\n return { value: left.value | right.value }\n case \"^\":\n return { value: left.value ^ right.value }\n case \"&\":\n return { value: left.value & right.value }\n\n // no default\n }\n }\n\n return null\n },\n\n CallExpression(node, initialScope) {\n const calleeNode = node.callee\n const args = getElementValues(node.arguments, initialScope)\n\n if (args != null) {\n if (calleeNode.type === \"MemberExpression\") {\n const object = getStaticValueR(calleeNode.object, initialScope)\n const property = calleeNode.computed\n ? getStaticValueR(calleeNode.property, initialScope)\n : { value: calleeNode.property.name }\n\n if (object != null && property != null) {\n const receiver = object.value\n const methodName = property.value\n if (callAllowed.has(receiver[methodName])) {\n return { value: receiver[methodName](...args) }\n }\n if (callPassThrough.has(receiver[methodName])) {\n return { value: args[0] }\n }\n }\n } else {\n const callee = getStaticValueR(calleeNode, initialScope)\n if (callee != null) {\n const func = callee.value\n if (callAllowed.has(func)) {\n return { value: func(...args) }\n }\n if (callPassThrough.has(func)) {\n return { value: args[0] }\n }\n }\n }\n }\n\n return null\n },\n\n ConditionalExpression(node, initialScope) {\n const test = getStaticValueR(node.test, initialScope)\n if (test != null) {\n return test.value\n ? getStaticValueR(node.consequent, initialScope)\n : getStaticValueR(node.alternate, initialScope)\n }\n return null\n },\n\n ExpressionStatement(node, initialScope) {\n return getStaticValueR(node.expression, initialScope)\n },\n\n Identifier(node, initialScope) {\n if (initialScope != null) {\n const variable = findVariable(initialScope, node)\n\n // Built-in globals.\n if (\n variable != null &&\n variable.defs.length === 0 &&\n builtinNames.has(variable.name) &&\n variable.name in global\n ) {\n return { value: global[variable.name] }\n }\n\n // Constants.\n if (variable != null && variable.defs.length === 1) {\n const def = variable.defs[0]\n if (\n def.parent &&\n def.parent.kind === \"const\" &&\n // TODO(mysticatea): don't support destructuring here.\n def.node.id.type === \"Identifier\"\n ) {\n return getStaticValueR(def.node.init, initialScope)\n }\n }\n }\n return null\n },\n\n Literal(node) {\n //istanbul ignore if : this is implementation-specific behavior.\n if ((node.regex != null || node.bigint != null) && node.value == null) {\n // It was a RegExp/BigInt literal, but Node.js didn't support it.\n return null\n }\n return { value: node.value }\n },\n\n LogicalExpression(node, initialScope) {\n const left = getStaticValueR(node.left, initialScope)\n if (left != null) {\n if (\n (node.operator === \"||\" && Boolean(left.value) === true) ||\n (node.operator === \"&&\" && Boolean(left.value) === false)\n ) {\n return left\n }\n\n const right = getStaticValueR(node.right, initialScope)\n if (right != null) {\n return right\n }\n }\n\n return null\n },\n\n MemberExpression(node, initialScope) {\n const object = getStaticValueR(node.object, initialScope)\n const property = node.computed\n ? getStaticValueR(node.property, initialScope)\n : { value: node.property.name }\n\n if (\n object != null &&\n property != null &&\n !isGetter(object.value, property.value)\n ) {\n return { value: object.value[property.value] }\n }\n return null\n },\n\n NewExpression(node, initialScope) {\n const callee = getStaticValueR(node.callee, initialScope)\n const args = getElementValues(node.arguments, initialScope)\n\n if (callee != null && args != null) {\n const Func = callee.value\n if (callAllowed.has(Func)) {\n return { value: new Func(...args) }\n }\n }\n\n return null\n },\n\n ObjectExpression(node, initialScope) {\n const object = {}\n\n for (const propertyNode of node.properties) {\n if (propertyNode.type === \"Property\") {\n if (propertyNode.kind !== \"init\") {\n return null\n }\n const key = propertyNode.computed\n ? getStaticValueR(propertyNode.key, initialScope)\n : { value: propertyNode.key.name }\n const value = getStaticValueR(propertyNode.value, initialScope)\n if (key == null || value == null) {\n return null\n }\n object[key.value] = value.value\n } else if (\n propertyNode.type === \"SpreadElement\" ||\n propertyNode.type === \"ExperimentalSpreadProperty\"\n ) {\n const argument = getStaticValueR(\n propertyNode.argument,\n initialScope\n )\n if (argument == null) {\n return null\n }\n Object.assign(object, argument.value)\n } else {\n return null\n }\n }\n\n return { value: object }\n },\n\n SequenceExpression(node, initialScope) {\n const last = node.expressions[node.expressions.length - 1]\n return getStaticValueR(last, initialScope)\n },\n\n TaggedTemplateExpression(node, initialScope) {\n const tag = getStaticValueR(node.tag, initialScope)\n const expressions = getElementValues(\n node.quasi.expressions,\n initialScope\n )\n\n if (tag != null && expressions != null) {\n const func = tag.value\n const strings = node.quasi.quasis.map(q => q.value.cooked)\n strings.raw = node.quasi.quasis.map(q => q.value.raw)\n\n if (func === String.raw) {\n return { value: func(strings, ...expressions) }\n }\n }\n\n return null\n },\n\n TemplateLiteral(node, initialScope) {\n const expressions = getElementValues(node.expressions, initialScope)\n if (expressions != null) {\n let value = node.quasis[0].value.cooked\n for (let i = 0; i < expressions.length; ++i) {\n value += expressions[i]\n value += node.quasis[i + 1].value.cooked\n }\n return { value }\n }\n return null\n },\n\n UnaryExpression(node, initialScope) {\n if (node.operator === \"delete\") {\n // Not supported.\n return null\n }\n if (node.operator === \"void\") {\n return { value: undefined }\n }\n\n const arg = getStaticValueR(node.argument, initialScope)\n if (arg != null) {\n switch (node.operator) {\n case \"-\":\n return { value: -arg.value }\n case \"+\":\n return { value: +arg.value } //eslint-disable-line no-implicit-coercion\n case \"!\":\n return { value: !arg.value }\n case \"~\":\n return { value: ~arg.value }\n case \"typeof\":\n return { value: typeof arg.value }\n\n // no default\n }\n }\n\n return null\n },\n})\n\n/**\n * Get the value of a given node if it's a static value.\n * @param {Node} node The node to get.\n * @param {Scope|undefined} initialScope The scope to start finding variable.\n * @returns {{value:any}|null} The static value of the node, or `null`.\n */\nfunction getStaticValueR(node, initialScope) {\n if (node != null && Object.hasOwnProperty.call(operations, node.type)) {\n return operations[node.type](node, initialScope)\n }\n return null\n}\n\n/**\n * Get the value of a given node if it's a static value.\n * @param {Node} node The node to get.\n * @param {Scope} [initialScope] The scope to start finding variable. Optional. If this scope was given, this tries to resolve identifier references which are in the given node as much as possible.\n * @returns {{value:any}|null} The static value of the node, or `null`.\n */\nexport function getStaticValue(node, initialScope = null) {\n try {\n return getStaticValueR(node, initialScope)\n } catch (_error) {\n return null\n }\n}\n","import { getStaticValue } from \"./get-static-value\"\n\n/**\n * Get the value of a given node if it's a literal or a template literal.\n * @param {Node} node The node to get.\n * @param {Scope} [initialScope] The scope to start finding variable. Optional. If the node is an Identifier node and this scope was given, this checks the variable of the identifier, and returns the value of it if the variable is a constant.\n * @returns {string|null} The value of the node, or `null`.\n */\nexport function getStringIfConstant(node, initialScope = null) {\n // Handle the literals that the platform doesn't support natively.\n if (node && node.type === \"Literal\" && node.value === null) {\n if (node.regex) {\n return `/${node.regex.pattern}/${node.regex.flags}`\n }\n if (node.bigint) {\n return node.bigint\n }\n }\n\n const evaluated = getStaticValue(node, initialScope)\n return evaluated && String(evaluated.value)\n}\n","import { getStringIfConstant } from \"./get-string-if-constant\"\n\n/**\n * Get the property name from a MemberExpression node or a Property node.\n * @param {Node} node The node to get.\n * @param {Scope} [initialScope] The scope to start finding variable. Optional. If the node is a computed property node and this scope was given, this checks the computed property name by the `getStringIfConstant` function with the scope, and returns the value of it.\n * @returns {string|null} The property name of the node.\n */\nexport function getPropertyName(node, initialScope) {\n switch (node.type) {\n case \"MemberExpression\":\n if (node.computed) {\n return getStringIfConstant(node.property, initialScope)\n }\n return node.property.name\n\n case \"Property\":\n case \"MethodDefinition\":\n if (node.computed) {\n return getStringIfConstant(node.key, initialScope)\n }\n if (node.key.type === \"Literal\") {\n return String(node.key.value)\n }\n return node.key.name\n\n // no default\n }\n\n return null\n}\n","import { getPropertyName } from \"./get-property-name\"\n\n/**\n * Get the name and kind of the given function node.\n * @param {ASTNode} node - The function node to get.\n * @returns {string} The name and kind of the function node.\n */\nexport function getFunctionNameWithKind(node) {\n const parent = node.parent\n const tokens = []\n\n if (parent.type === \"MethodDefinition\" && parent.static) {\n tokens.push(\"static\")\n }\n if (node.async) {\n tokens.push(\"async\")\n }\n if (node.generator) {\n tokens.push(\"generator\")\n }\n\n if (node.type === \"ArrowFunctionExpression\") {\n tokens.push(\"arrow\", \"function\")\n } else if (\n parent.type === \"Property\" ||\n parent.type === \"MethodDefinition\"\n ) {\n if (parent.kind === \"constructor\") {\n return \"constructor\"\n }\n if (parent.kind === \"get\") {\n tokens.push(\"getter\")\n } else if (parent.kind === \"set\") {\n tokens.push(\"setter\")\n } else {\n tokens.push(\"method\")\n }\n } else {\n tokens.push(\"function\")\n }\n\n if (node.id) {\n tokens.push(`'${node.id.name}'`)\n } else {\n const name = getPropertyName(parent)\n\n if (name) {\n tokens.push(`'${name}'`)\n }\n }\n\n return tokens.join(\" \")\n}\n","import evk from \"eslint-visitor-keys\"\n\nconst typeConversionBinaryOps = Object.freeze(\n new Set([\n \"==\",\n \"!=\",\n \"<\",\n \"<=\",\n \">\",\n \">=\",\n \"<<\",\n \">>\",\n \">>>\",\n \"+\",\n \"-\",\n \"*\",\n \"/\",\n \"%\",\n \"|\",\n \"^\",\n \"&\",\n \"in\",\n ])\n)\nconst typeConversionUnaryOps = Object.freeze(new Set([\"-\", \"+\", \"!\", \"~\"]))\nconst visitor = Object.freeze(\n Object.assign(Object.create(null), {\n $visit(node, options, visitorKeys) {\n const { type } = node\n\n if (typeof this[type] === \"function\") {\n return this[type](node, options, visitorKeys)\n }\n\n return this.$visitChildren(node, options, visitorKeys)\n },\n\n $visitChildren(node, options, visitorKeys) {\n const { type } = node\n\n for (const key of visitorKeys[type] || evk.getKeys(node)) {\n const value = node[key]\n\n if (Array.isArray(value)) {\n for (const element of value) {\n if (\n element &&\n this.$visit(element, options, visitorKeys)\n ) {\n return true\n }\n }\n } else if (value && this.$visit(value, options, visitorKeys)) {\n return true\n }\n }\n\n return false\n },\n\n ArrowFunctionExpression() {\n return false\n },\n AssignmentExpression() {\n return true\n },\n AwaitExpression() {\n return true\n },\n BinaryExpression(node, options, visitorKeys) {\n if (\n options.considerImplicitTypeConversion &&\n typeConversionBinaryOps.has(node.operator) &&\n (node.left.type !== \"Literal\" || node.right.type !== \"Literal\")\n ) {\n return true\n }\n return this.$visitChildren(node, options, visitorKeys)\n },\n CallExpression() {\n return true\n },\n FunctionExpression() {\n return false\n },\n ImportExpression() {\n return true\n },\n MemberExpression(node, options, visitorKeys) {\n if (options.considerGetters) {\n return true\n }\n if (\n options.considerImplicitTypeConversion &&\n node.computed &&\n node.property.type !== \"Literal\"\n ) {\n return true\n }\n return this.$visitChildren(node, options, visitorKeys)\n },\n MethodDefinition(node, options, visitorKeys) {\n if (\n options.considerImplicitTypeConversion &&\n node.computed &&\n node.key.type !== \"Literal\"\n ) {\n return true\n }\n return this.$visitChildren(node, options, visitorKeys)\n },\n NewExpression() {\n return true\n },\n Property(node, options, visitorKeys) {\n if (\n options.considerImplicitTypeConversion &&\n node.computed &&\n node.key.type !== \"Literal\"\n ) {\n return true\n }\n return this.$visitChildren(node, options, visitorKeys)\n },\n UnaryExpression(node, options, visitorKeys) {\n if (node.operator === \"delete\") {\n return true\n }\n if (\n options.considerImplicitTypeConversion &&\n typeConversionUnaryOps.has(node.operator) &&\n node.argument.type !== \"Literal\"\n ) {\n return true\n }\n return this.$visitChildren(node, options, visitorKeys)\n },\n UpdateExpression() {\n return true\n },\n YieldExpression() {\n return true\n },\n })\n)\n\n/**\n * Check whether a given node has any side effect or not.\n * @param {Node} node The node to get.\n * @param {SourceCode} sourceCode The source code object.\n * @param {object} [options] The option object.\n * @param {boolean} [options.considerGetters=false] If `true` then it considers member accesses as the node which has side effects.\n * @param {boolean} [options.considerImplicitTypeConversion=false] If `true` then it considers implicit type conversion as the node which has side effects.\n * @param {object} [options.visitorKeys=evk.KEYS] The keys to traverse nodes. Use `context.getSourceCode().visitorKeys`.\n * @returns {boolean} `true` if the node has a certain side effect.\n */\nexport function hasSideEffect(\n node,\n sourceCode,\n { considerGetters = false, considerImplicitTypeConversion = false } = {}\n) {\n return visitor.$visit(\n node,\n { considerGetters, considerImplicitTypeConversion },\n sourceCode.visitorKeys || evk.KEYS\n )\n}\n","import { isClosingParenToken, isOpeningParenToken } from \"./token-predicate\"\n\n/**\n * Get the left parenthesis of the parent node syntax if it exists.\n * E.g., `if (a) {}` then the `(`.\n * @param {Node} node The AST node to check.\n * @param {SourceCode} sourceCode The source code object to get tokens.\n * @returns {Token|null} The left parenthesis of the parent node syntax\n */\nfunction getParentSyntaxParen(node, sourceCode) {\n const parent = node.parent\n\n switch (parent.type) {\n case \"CallExpression\":\n case \"NewExpression\":\n if (parent.arguments.length === 1 && parent.arguments[0] === node) {\n return sourceCode.getTokenAfter(\n parent.callee,\n isOpeningParenToken\n )\n }\n return null\n\n case \"DoWhileStatement\":\n if (parent.test === node) {\n return sourceCode.getTokenAfter(\n parent.body,\n isOpeningParenToken\n )\n }\n return null\n\n case \"IfStatement\":\n case \"WhileStatement\":\n if (parent.test === node) {\n return sourceCode.getFirstToken(parent, 1)\n }\n return null\n\n case \"ImportExpression\":\n if (parent.source === node) {\n return sourceCode.getFirstToken(parent, 1)\n }\n return null\n\n case \"SwitchStatement\":\n if (parent.discriminant === node) {\n return sourceCode.getFirstToken(parent, 1)\n }\n return null\n\n case \"WithStatement\":\n if (parent.object === node) {\n return sourceCode.getFirstToken(parent, 1)\n }\n return null\n\n default:\n return null\n }\n}\n\n/**\n * Check whether a given node is parenthesized or not.\n * @param {number} times The number of parantheses.\n * @param {Node} node The AST node to check.\n * @param {SourceCode} sourceCode The source code object to get tokens.\n * @returns {boolean} `true` if the node is parenthesized the given times.\n */\n/**\n * Check whether a given node is parenthesized or not.\n * @param {Node} node The AST node to check.\n * @param {SourceCode} sourceCode The source code object to get tokens.\n * @returns {boolean} `true` if the node is parenthesized.\n */\nexport function isParenthesized(\n timesOrNode,\n nodeOrSourceCode,\n optionalSourceCode\n) {\n let times, node, sourceCode, maybeLeftParen, maybeRightParen\n if (typeof timesOrNode === \"number\") {\n times = timesOrNode | 0\n node = nodeOrSourceCode\n sourceCode = optionalSourceCode\n if (!(times >= 1)) {\n throw new TypeError(\"'times' should be a positive integer.\")\n }\n } else {\n times = 1\n node = timesOrNode\n sourceCode = nodeOrSourceCode\n }\n\n if (node == null) {\n return false\n }\n\n maybeLeftParen = maybeRightParen = node\n do {\n maybeLeftParen = sourceCode.getTokenBefore(maybeLeftParen)\n maybeRightParen = sourceCode.getTokenAfter(maybeRightParen)\n } while (\n maybeLeftParen != null &&\n maybeRightParen != null &&\n isOpeningParenToken(maybeLeftParen) &&\n isClosingParenToken(maybeRightParen) &&\n // Avoid false positive such as `if (a) {}`\n maybeLeftParen !== getParentSyntaxParen(node, sourceCode) &&\n --times > 0\n )\n\n return times === 0\n}\n","/**\n * @author Toru Nagashima \n * See LICENSE file in root directory for full license.\n */\n\nconst placeholder = /\\$(?:[$&`']|[1-9][0-9]?)/gu\n\n/** @type {WeakMap} */\nconst internal = new WeakMap()\n\n/**\n * Check whether a given character is escaped or not.\n * @param {string} str The string to check.\n * @param {number} index The location of the character to check.\n * @returns {boolean} `true` if the character is escaped.\n */\nfunction isEscaped(str, index) {\n let escaped = false\n for (let i = index - 1; i >= 0 && str.charCodeAt(i) === 0x5c; --i) {\n escaped = !escaped\n }\n return escaped\n}\n\n/**\n * Replace a given string by a given matcher.\n * @param {PatternMatcher} matcher The pattern matcher.\n * @param {string} str The string to be replaced.\n * @param {string} replacement The new substring to replace each matched part.\n * @returns {string} The replaced string.\n */\nfunction replaceS(matcher, str, replacement) {\n const chunks = []\n let index = 0\n\n /** @type {RegExpExecArray} */\n let match = null\n\n /**\n * @param {string} key The placeholder.\n * @returns {string} The replaced string.\n */\n function replacer(key) {\n switch (key) {\n case \"$$\":\n return \"$\"\n case \"$&\":\n return match[0]\n case \"$`\":\n return str.slice(0, match.index)\n case \"$'\":\n return str.slice(match.index + match[0].length)\n default: {\n const i = key.slice(1)\n if (i in match) {\n return match[i]\n }\n return key\n }\n }\n }\n\n for (match of matcher.execAll(str)) {\n chunks.push(str.slice(index, match.index))\n chunks.push(replacement.replace(placeholder, replacer))\n index = match.index + match[0].length\n }\n chunks.push(str.slice(index))\n\n return chunks.join(\"\")\n}\n\n/**\n * Replace a given string by a given matcher.\n * @param {PatternMatcher} matcher The pattern matcher.\n * @param {string} str The string to be replaced.\n * @param {(...strs[])=>string} replace The function to replace each matched part.\n * @returns {string} The replaced string.\n */\nfunction replaceF(matcher, str, replace) {\n const chunks = []\n let index = 0\n\n for (const match of matcher.execAll(str)) {\n chunks.push(str.slice(index, match.index))\n chunks.push(String(replace(...match, match.index, match.input)))\n index = match.index + match[0].length\n }\n chunks.push(str.slice(index))\n\n return chunks.join(\"\")\n}\n\n/**\n * The class to find patterns as considering escape sequences.\n */\nexport class PatternMatcher {\n /**\n * Initialize this matcher.\n * @param {RegExp} pattern The pattern to match.\n * @param {{escaped:boolean}} options The options.\n */\n constructor(pattern, { escaped = false } = {}) {\n if (!(pattern instanceof RegExp)) {\n throw new TypeError(\"'pattern' should be a RegExp instance.\")\n }\n if (!pattern.flags.includes(\"g\")) {\n throw new Error(\"'pattern' should contains 'g' flag.\")\n }\n\n internal.set(this, {\n pattern: new RegExp(pattern.source, pattern.flags),\n escaped: Boolean(escaped),\n })\n }\n\n /**\n * Find the pattern in a given string.\n * @param {string} str The string to find.\n * @returns {IterableIterator} The iterator which iterate the matched information.\n */\n *execAll(str) {\n const { pattern, escaped } = internal.get(this)\n let match = null\n let lastIndex = 0\n\n pattern.lastIndex = 0\n while ((match = pattern.exec(str)) != null) {\n if (escaped || !isEscaped(str, match.index)) {\n lastIndex = pattern.lastIndex\n yield match\n pattern.lastIndex = lastIndex\n }\n }\n }\n\n /**\n * Check whether the pattern is found in a given string.\n * @param {string} str The string to check.\n * @returns {boolean} `true` if the pattern was found in the string.\n */\n test(str) {\n const it = this.execAll(str)\n const ret = it.next()\n return !ret.done\n }\n\n /**\n * Replace a given string.\n * @param {string} str The string to be replaced.\n * @param {(string|((...strs:string[])=>string))} replacer The string or function to replace. This is the same as the 2nd argument of `String.prototype.replace`.\n * @returns {string} The replaced string.\n */\n [Symbol.replace](str, replacer) {\n return typeof replacer === \"function\"\n ? replaceF(this, String(str), replacer)\n : replaceS(this, String(str), String(replacer))\n }\n}\n","import { findVariable } from \"./find-variable\"\nimport { getPropertyName } from \"./get-property-name\"\nimport { getStringIfConstant } from \"./get-string-if-constant\"\n\nconst SENTINEL_TYPE = /^(?:.+?Statement|.+?Declaration|(?:Array|ArrowFunction|Assignment|Call|Class|Function|Member|New|Object)Expression|AssignmentPattern|Program|VariableDeclarator)$/u\nconst IMPORT_TYPE = /^(?:Import|Export(?:All|Default|Named))Declaration$/u\nconst has = Function.call.bind(Object.hasOwnProperty)\n\nexport const READ = Symbol(\"read\")\nexport const CALL = Symbol(\"call\")\nexport const CONSTRUCT = Symbol(\"construct\")\nexport const ESM = Symbol(\"esm\")\n\nconst requireCall = { require: { [CALL]: true } }\n\n/**\n * Check whether a given variable is modified or not.\n * @param {Variable} variable The variable to check.\n * @returns {boolean} `true` if the variable is modified.\n */\nfunction isModifiedGlobal(variable) {\n return (\n variable == null ||\n variable.defs.length !== 0 ||\n variable.references.some(r => r.isWrite())\n )\n}\n\n/**\n * The reference tracker.\n */\nexport class ReferenceTracker {\n /**\n * Initialize this tracker.\n * @param {Scope} globalScope The global scope.\n * @param {object} [options] The options.\n * @param {\"legacy\"|\"strict\"} [options.mode=\"strict\"] The mode to determine the ImportDeclaration's behavior for CJS modules.\n * @param {string[]} [options.globalObjectNames=[\"global\",\"self\",\"window\"]] The variable names for Global Object.\n */\n constructor(\n globalScope,\n {\n mode = \"strict\",\n globalObjectNames = [\"global\", \"self\", \"window\"],\n } = {}\n ) {\n this.variableStack = []\n this.globalScope = globalScope\n this.mode = mode\n this.globalObjectNames = globalObjectNames.slice(0)\n }\n\n /**\n * Iterate the references of global variables.\n * @param {object} traceMap The trace map.\n * @returns {IterableIterator<{node:Node,path:string[],type:symbol,info:any}>} The iterator to iterate references.\n */\n *iterateGlobalReferences(traceMap) {\n for (const key of Object.keys(traceMap)) {\n const nextTraceMap = traceMap[key]\n const path = [key]\n const variable = this.globalScope.set.get(key)\n\n if (isModifiedGlobal(variable)) {\n continue\n }\n\n yield* this._iterateVariableReferences(\n variable,\n path,\n nextTraceMap,\n true\n )\n }\n\n for (const key of this.globalObjectNames) {\n const path = []\n const variable = this.globalScope.set.get(key)\n\n if (isModifiedGlobal(variable)) {\n continue\n }\n\n yield* this._iterateVariableReferences(\n variable,\n path,\n traceMap,\n false\n )\n }\n }\n\n /**\n * Iterate the references of CommonJS modules.\n * @param {object} traceMap The trace map.\n * @returns {IterableIterator<{node:Node,path:string[],type:symbol,info:any}>} The iterator to iterate references.\n */\n *iterateCjsReferences(traceMap) {\n for (const { node } of this.iterateGlobalReferences(requireCall)) {\n const key = getStringIfConstant(node.arguments[0])\n if (key == null || !has(traceMap, key)) {\n continue\n }\n\n const nextTraceMap = traceMap[key]\n const path = [key]\n\n if (nextTraceMap[READ]) {\n yield {\n node,\n path,\n type: READ,\n info: nextTraceMap[READ],\n }\n }\n yield* this._iteratePropertyReferences(node, path, nextTraceMap)\n }\n }\n\n /**\n * Iterate the references of ES modules.\n * @param {object} traceMap The trace map.\n * @returns {IterableIterator<{node:Node,path:string[],type:symbol,info:any}>} The iterator to iterate references.\n */\n *iterateEsmReferences(traceMap) {\n const programNode = this.globalScope.block\n\n for (const node of programNode.body) {\n if (!IMPORT_TYPE.test(node.type) || node.source == null) {\n continue\n }\n const moduleId = node.source.value\n\n if (!has(traceMap, moduleId)) {\n continue\n }\n const nextTraceMap = traceMap[moduleId]\n const path = [moduleId]\n\n if (nextTraceMap[READ]) {\n yield { node, path, type: READ, info: nextTraceMap[READ] }\n }\n\n if (node.type === \"ExportAllDeclaration\") {\n for (const key of Object.keys(nextTraceMap)) {\n const exportTraceMap = nextTraceMap[key]\n if (exportTraceMap[READ]) {\n yield {\n node,\n path: path.concat(key),\n type: READ,\n info: exportTraceMap[READ],\n }\n }\n }\n } else {\n for (const specifier of node.specifiers) {\n const esm = has(nextTraceMap, ESM)\n const it = this._iterateImportReferences(\n specifier,\n path,\n esm\n ? nextTraceMap\n : this.mode === \"legacy\"\n ? Object.assign(\n { default: nextTraceMap },\n nextTraceMap\n )\n : { default: nextTraceMap }\n )\n\n if (esm) {\n yield* it\n } else {\n for (const report of it) {\n report.path = report.path.filter(exceptDefault)\n if (\n report.path.length >= 2 ||\n report.type !== READ\n ) {\n yield report\n }\n }\n }\n }\n }\n }\n }\n\n /**\n * Iterate the references for a given variable.\n * @param {Variable} variable The variable to iterate that references.\n * @param {string[]} path The current path.\n * @param {object} traceMap The trace map.\n * @param {boolean} shouldReport = The flag to report those references.\n * @returns {IterableIterator<{node:Node,path:string[],type:symbol,info:any}>} The iterator to iterate references.\n */\n *_iterateVariableReferences(variable, path, traceMap, shouldReport) {\n if (this.variableStack.includes(variable)) {\n return\n }\n this.variableStack.push(variable)\n try {\n for (const reference of variable.references) {\n if (!reference.isRead()) {\n continue\n }\n const node = reference.identifier\n\n if (shouldReport && traceMap[READ]) {\n yield { node, path, type: READ, info: traceMap[READ] }\n }\n yield* this._iteratePropertyReferences(node, path, traceMap)\n }\n } finally {\n this.variableStack.pop()\n }\n }\n\n /**\n * Iterate the references for a given AST node.\n * @param rootNode The AST node to iterate references.\n * @param {string[]} path The current path.\n * @param {object} traceMap The trace map.\n * @returns {IterableIterator<{node:Node,path:string[],type:symbol,info:any}>} The iterator to iterate references.\n */\n //eslint-disable-next-line complexity\n *_iteratePropertyReferences(rootNode, path, traceMap) {\n let node = rootNode\n while (!SENTINEL_TYPE.test(node.parent.type)) {\n node = node.parent\n }\n\n const parent = node.parent\n if (parent.type === \"MemberExpression\") {\n if (parent.object === node) {\n const key = getPropertyName(parent)\n if (key == null || !has(traceMap, key)) {\n return\n }\n\n path = path.concat(key) //eslint-disable-line no-param-reassign\n const nextTraceMap = traceMap[key]\n if (nextTraceMap[READ]) {\n yield {\n node: parent,\n path,\n type: READ,\n info: nextTraceMap[READ],\n }\n }\n yield* this._iteratePropertyReferences(\n parent,\n path,\n nextTraceMap\n )\n }\n return\n }\n if (parent.type === \"CallExpression\") {\n if (parent.callee === node && traceMap[CALL]) {\n yield { node: parent, path, type: CALL, info: traceMap[CALL] }\n }\n return\n }\n if (parent.type === \"NewExpression\") {\n if (parent.callee === node && traceMap[CONSTRUCT]) {\n yield {\n node: parent,\n path,\n type: CONSTRUCT,\n info: traceMap[CONSTRUCT],\n }\n }\n return\n }\n if (parent.type === \"AssignmentExpression\") {\n if (parent.right === node) {\n yield* this._iterateLhsReferences(parent.left, path, traceMap)\n yield* this._iteratePropertyReferences(parent, path, traceMap)\n }\n return\n }\n if (parent.type === \"AssignmentPattern\") {\n if (parent.right === node) {\n yield* this._iterateLhsReferences(parent.left, path, traceMap)\n }\n return\n }\n if (parent.type === \"VariableDeclarator\") {\n if (parent.init === node) {\n yield* this._iterateLhsReferences(parent.id, path, traceMap)\n }\n }\n }\n\n /**\n * Iterate the references for a given Pattern node.\n * @param {Node} patternNode The Pattern node to iterate references.\n * @param {string[]} path The current path.\n * @param {object} traceMap The trace map.\n * @returns {IterableIterator<{node:Node,path:string[],type:symbol,info:any}>} The iterator to iterate references.\n */\n *_iterateLhsReferences(patternNode, path, traceMap) {\n if (patternNode.type === \"Identifier\") {\n const variable = findVariable(this.globalScope, patternNode)\n if (variable != null) {\n yield* this._iterateVariableReferences(\n variable,\n path,\n traceMap,\n false\n )\n }\n return\n }\n if (patternNode.type === \"ObjectPattern\") {\n for (const property of patternNode.properties) {\n const key = getPropertyName(property)\n\n if (key == null || !has(traceMap, key)) {\n continue\n }\n\n const nextPath = path.concat(key)\n const nextTraceMap = traceMap[key]\n if (nextTraceMap[READ]) {\n yield {\n node: property,\n path: nextPath,\n type: READ,\n info: nextTraceMap[READ],\n }\n }\n yield* this._iterateLhsReferences(\n property.value,\n nextPath,\n nextTraceMap\n )\n }\n return\n }\n if (patternNode.type === \"AssignmentPattern\") {\n yield* this._iterateLhsReferences(patternNode.left, path, traceMap)\n }\n }\n\n /**\n * Iterate the references for a given ModuleSpecifier node.\n * @param {Node} specifierNode The ModuleSpecifier node to iterate references.\n * @param {string[]} path The current path.\n * @param {object} traceMap The trace map.\n * @returns {IterableIterator<{node:Node,path:string[],type:symbol,info:any}>} The iterator to iterate references.\n */\n *_iterateImportReferences(specifierNode, path, traceMap) {\n const type = specifierNode.type\n\n if (type === \"ImportSpecifier\" || type === \"ImportDefaultSpecifier\") {\n const key =\n type === \"ImportDefaultSpecifier\"\n ? \"default\"\n : specifierNode.imported.name\n if (!has(traceMap, key)) {\n return\n }\n\n path = path.concat(key) //eslint-disable-line no-param-reassign\n const nextTraceMap = traceMap[key]\n if (nextTraceMap[READ]) {\n yield {\n node: specifierNode,\n path,\n type: READ,\n info: nextTraceMap[READ],\n }\n }\n yield* this._iterateVariableReferences(\n findVariable(this.globalScope, specifierNode.local),\n path,\n nextTraceMap,\n false\n )\n\n return\n }\n\n if (type === \"ImportNamespaceSpecifier\") {\n yield* this._iterateVariableReferences(\n findVariable(this.globalScope, specifierNode.local),\n path,\n traceMap,\n false\n )\n return\n }\n\n if (type === \"ExportSpecifier\") {\n const key = specifierNode.local.name\n if (!has(traceMap, key)) {\n return\n }\n\n path = path.concat(key) //eslint-disable-line no-param-reassign\n const nextTraceMap = traceMap[key]\n if (nextTraceMap[READ]) {\n yield {\n node: specifierNode,\n path,\n type: READ,\n info: nextTraceMap[READ],\n }\n }\n }\n }\n}\n\nReferenceTracker.READ = READ\nReferenceTracker.CALL = CALL\nReferenceTracker.CONSTRUCT = CONSTRUCT\nReferenceTracker.ESM = ESM\n\n/**\n * This is a predicate function for Array#filter.\n * @param {string} name A name part.\n * @param {number} index The index of the name.\n * @returns {boolean} `false` if it's default.\n */\nfunction exceptDefault(name, index) {\n return !(index === 1 && name === \"default\")\n}\n","import { findVariable } from \"./find-variable\"\nimport { getFunctionHeadLocation } from \"./get-function-head-location\"\nimport { getFunctionNameWithKind } from \"./get-function-name-with-kind\"\nimport { getInnermostScope } from \"./get-innermost-scope\"\nimport { getPropertyName } from \"./get-property-name\"\nimport { getStaticValue } from \"./get-static-value\"\nimport { getStringIfConstant } from \"./get-string-if-constant\"\nimport { hasSideEffect } from \"./has-side-effect\"\nimport { isParenthesized } from \"./is-parenthesized\"\nimport { PatternMatcher } from \"./pattern-matcher\"\nimport {\n CALL,\n CONSTRUCT,\n ESM,\n READ,\n ReferenceTracker,\n} from \"./reference-tracker\"\nimport {\n isArrowToken,\n isClosingBraceToken,\n isClosingBracketToken,\n isClosingParenToken,\n isColonToken,\n isCommaToken,\n isCommentToken,\n isNotArrowToken,\n isNotClosingBraceToken,\n isNotClosingBracketToken,\n isNotClosingParenToken,\n isNotColonToken,\n isNotCommaToken,\n isNotCommentToken,\n isNotOpeningBraceToken,\n isNotOpeningBracketToken,\n isNotOpeningParenToken,\n isNotSemicolonToken,\n isOpeningBraceToken,\n isOpeningBracketToken,\n isOpeningParenToken,\n isSemicolonToken,\n} from \"./token-predicate\"\n\nexport default {\n CALL,\n CONSTRUCT,\n ESM,\n findVariable,\n getFunctionHeadLocation,\n getFunctionNameWithKind,\n getInnermostScope,\n getPropertyName,\n getStaticValue,\n getStringIfConstant,\n hasSideEffect,\n isArrowToken,\n isClosingBraceToken,\n isClosingBracketToken,\n isClosingParenToken,\n isColonToken,\n isCommaToken,\n isCommentToken,\n isNotArrowToken,\n isNotClosingBraceToken,\n isNotClosingBracketToken,\n isNotClosingParenToken,\n isNotColonToken,\n isNotCommaToken,\n isNotCommentToken,\n isNotOpeningBraceToken,\n isNotOpeningBracketToken,\n isNotOpeningParenToken,\n isNotSemicolonToken,\n isOpeningBraceToken,\n isOpeningBracketToken,\n isOpeningParenToken,\n isParenthesized,\n isSemicolonToken,\n PatternMatcher,\n READ,\n ReferenceTracker,\n}\nexport {\n CALL,\n CONSTRUCT,\n ESM,\n findVariable,\n getFunctionHeadLocation,\n getFunctionNameWithKind,\n getInnermostScope,\n getPropertyName,\n getStaticValue,\n getStringIfConstant,\n hasSideEffect,\n isArrowToken,\n isClosingBraceToken,\n isClosingBracketToken,\n isClosingParenToken,\n isColonToken,\n isCommaToken,\n isCommentToken,\n isNotArrowToken,\n isNotClosingBraceToken,\n isNotClosingBracketToken,\n isNotClosingParenToken,\n isNotColonToken,\n isNotCommaToken,\n isNotCommentToken,\n isNotOpeningBraceToken,\n isNotOpeningBracketToken,\n isNotOpeningParenToken,\n isNotSemicolonToken,\n isOpeningBraceToken,\n isOpeningBracketToken,\n isOpeningParenToken,\n isParenthesized,\n isSemicolonToken,\n PatternMatcher,\n READ,\n ReferenceTracker,\n}\n"],"names":[],"mappings":";;;;;;;;;AAAA;;;;;;AAMA,AAAO,SAAS,iBAAiB,CAAC,YAAY,EAAE,IAAI,EAAE;IAClD,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,EAAC;;IAE9B,IAAI,KAAK,GAAG,aAAY;IACxB,IAAI,KAAK,GAAG,MAAK;IACjB,GAAG;QACC,KAAK,GAAG,MAAK;QACb,KAAK,MAAM,UAAU,IAAI,KAAK,CAAC,WAAW,EAAE;YACxC,MAAM,KAAK,GAAG,UAAU,CAAC,KAAK,CAAC,MAAK;;YAEpC,IAAI,KAAK,CAAC,CAAC,CAAC,IAAI,QAAQ,IAAI,QAAQ,GAAG,KAAK,CAAC,CAAC,CAAC,EAAE;gBAC7C,KAAK,GAAG,WAAU;gBAClB,KAAK,GAAG,KAAI;gBACZ,KAAK;aACR;SACJ;KACJ,QAAQ,KAAK,CAAC;;IAEf,OAAO,KAAK;CACf;;ACvBD;;;;;;AAMA,AAAO,SAAS,YAAY,CAAC,YAAY,EAAE,UAAU,EAAE;IACnD,IAAI,IAAI,GAAG,GAAE;IACb,IAAI,KAAK,GAAG,aAAY;;IAExB,IAAI,OAAO,UAAU,KAAK,QAAQ,EAAE;QAChC,IAAI,GAAG,WAAU;KACpB,MAAM;QACH,IAAI,GAAG,UAAU,CAAC,KAAI;QACtB,KAAK,GAAG,iBAAiB,CAAC,KAAK,EAAE,UAAU,EAAC;KAC/C;;IAED,OAAO,KAAK,IAAI,IAAI,EAAE;QAClB,MAAM,QAAQ,GAAG,KAA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,mBAAmB;IACnB,qBAAqB;IACrB,mBAAmB;IACnB,eAAe;IACf,gBAAgB;IAChB,cAAc;IACd,IAAI;IACJ,gBAAgB;CACnB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/node_modules/eslint-utils/index.mjs b/node_modules/eslint-utils/index.mjs index e050ba0e1b7c52d0e54edd33a665f171d4322bb7..2e6391e9b321e0fee67e7cbbc1d7921d50ec0fea 100644 --- a/node_modules/eslint-utils/index.mjs +++ b/node_modules/eslint-utils/index.mjs @@ -234,10 +234,15 @@ function getFunctionHeadLocation(node, sourceCode) { } } +/* globals BigInt */ + const builtinNames = Object.freeze( new Set([ "Array", "ArrayBuffer", + "BigInt", + "BigInt64Array", + "BigUint64Array", "Boolean", "DataView", "Date", @@ -245,9 +250,7 @@ const builtinNames = Object.freeze( "decodeURIComponent", "encodeURI", "encodeURIComponent", - "Error", "escape", - "EvalError", "Float32Array", "Float64Array", "Function", @@ -268,26 +271,97 @@ const builtinNames = Object.freeze( "parseInt", "Promise", "Proxy", - "RangeError", - "ReferenceError", "Reflect", "RegExp", "Set", "String", "Symbol", - "SyntaxError", - "TypeError", "Uint16Array", "Uint32Array", "Uint8Array", "Uint8ClampedArray", "undefined", "unescape", - "URIError", "WeakMap", "WeakSet", ]) ); +const callAllowed = new Set( + [ + Array.isArray, + typeof BigInt === "function" ? BigInt : undefined, + Boolean, + Date, + Date.parse, + decodeURI, + decodeURIComponent, + encodeURI, + encodeURIComponent, + escape, + isFinite, + isNaN, + isPrototypeOf, + ...Object.getOwnPropertyNames(Math) + .map(k => Math[k]) + .filter(f => typeof f === "function"), + Number, + Number.isFinite, + Number.isNaN, + Number.parseFloat, + Number.parseInt, + Object, + Object.entries, //eslint-disable-line @mysticatea/node/no-unsupported-features/es-builtins + Object.is, + Object.isExtensible, + Object.isFrozen, + Object.isSealed, + Object.keys, + Object.values, //eslint-disable-line @mysticatea/node/no-unsupported-features/es-builtins + parseFloat, + parseInt, + RegExp, + String, + String.fromCharCode, + String.fromCodePoint, + String.raw, + Symbol, + Symbol.for, + Symbol.keyFor, + unescape, + ].filter(f => typeof f === "function") +); +const callPassThrough = new Set([ + Object.freeze, + Object.preventExtensions, + Object.seal, +]); + +/** + * Get the property descriptor. + * @param {object} object The object to get. + * @param {string|number|symbol} name The property name to get. + */ +function getPropertyDescriptor(object, name) { + let x = object; + while ((typeof x === "object" || typeof x === "function") && x !== null) { + const d = Object.getOwnPropertyDescriptor(x, name); + if (d) { + return d + } + x = Object.getPrototypeOf(x); + } + return null +} + +/** + * Check if a property is getter or not. + * @param {object} object The object to check. + * @param {string|number|symbol} name The property name to check. + */ +function isGetter(object, name) { + const d = getPropertyDescriptor(object, name); + return d != null && d.get != null +} /** * Get the element values of a given node list. @@ -407,13 +481,23 @@ const operations = Object.freeze({ if (object != null && property != null) { const receiver = object.value; const methodName = property.value; - return { value: receiver[methodName](...args) } + if (callAllowed.has(receiver[methodName])) { + return { value: receiver[methodName](...args) } + } + if (callPassThrough.has(receiver[methodName])) { + return { value: args[0] } + } } } else { const callee = getStaticValueR(calleeNode, initialScope); if (callee != null) { const func = callee.value; - return { value: func(...args) } + if (callAllowed.has(func)) { + return { value: func(...args) } + } + if (callPassThrough.has(func)) { + return { value: args[0] } + } } } } @@ -467,11 +551,11 @@ const operations = Object.freeze({ Literal(node) { //istanbul ignore if : this is implementation-specific behavior. - if (node.regex != null && node.value == null) { - // It was a RegExp literal, but Node.js didn't support it. + if ((node.regex != null || node.bigint != null) && node.value == null) { + // It was a RegExp/BigInt literal, but Node.js didn't support it. return null } - return node + return { value: node.value } }, LogicalExpression(node, initialScope) { @@ -499,7 +583,11 @@ const operations = Object.freeze({ ? getStaticValueR(node.property, initialScope) : { value: node.property.name }; - if (object != null && property != null) { + if ( + object != null && + property != null && + !isGetter(object.value, property.value) + ) { return { value: object.value[property.value] } } return null @@ -511,7 +599,9 @@ const operations = Object.freeze({ if (callee != null && args != null) { const Func = callee.value; - return { value: new Func(...args) } + if (callAllowed.has(Func)) { + return { value: new Func(...args) } + } } return null @@ -570,7 +660,9 @@ const operations = Object.freeze({ const strings = node.quasi.quasis.map(q => q.value.cooked); strings.raw = node.quasi.quasis.map(q => q.value.raw); - return { value: func(strings, ...expressions) } + if (func === String.raw) { + return { value: func(strings, ...expressions) } + } } return null @@ -654,6 +746,16 @@ function getStaticValue(node, initialScope = null) { * @returns {string|null} The value of the node, or `null`. */ function getStringIfConstant(node, initialScope = null) { + // Handle the literals that the platform doesn't support natively. + if (node && node.type === "Literal" && node.value === null) { + if (node.regex) { + return `/${node.regex.pattern}/${node.regex.flags}` + } + if (node.bigint) { + return node.bigint + } + } + const evaluated = getStaticValue(node, initialScope); return evaluated && String(evaluated.value) } diff --git a/node_modules/eslint-utils/index.mjs.map b/node_modules/eslint-utils/index.mjs.map index 33778fd8e86fd4fb79cdb6681bea6cc4eebaefed..237504e0ef0f8588d567079e6e8414ec84b2bc0a 100644 --- a/node_modules/eslint-utils/index.mjs.map +++ b/node_modules/eslint-utils/index.mjs.map @@ -1 +1 @@ -{"version":3,"file":"index.mjs","sources":["src/get-innermost-scope.js","src/find-variable.js","src/token-predicate.js","src/get-function-head-location.js","src/get-static-value.js","src/get-string-if-constant.js","src/get-property-name.js","src/get-function-name-with-kind.js","src/has-side-effect.js","src/is-parenthesized.js","src/pattern-matcher.js","src/reference-tracker.js","src/index.js"],"sourcesContent":["/**\n * Get the innermost scope which contains a given location.\n * @param {Scope} initialScope The initial scope to search.\n * @param {Node} node The location to search.\n * @returns {Scope} The innermost scope.\n */\nexport function getInnermostScope(initialScope, node) {\n const location = node.range[0]\n\n let scope = initialScope\n let found = false\n do {\n found = false\n for (const childScope of scope.childScopes) {\n const range = childScope.block.range\n\n if (range[0] <= location && location < range[1]) {\n scope = childScope\n found = true\n break\n }\n }\n } while (found)\n\n return scope\n}\n","import { getInnermostScope } from \"./get-innermost-scope\"\n\n/**\n * Find the variable of a given name.\n * @param {Scope} initialScope The scope to start finding.\n * @param {string|Node} nameOrNode The variable name to find. If this is a Node object then it should be an Identifier node.\n * @returns {Variable|null} The found variable or null.\n */\nexport function findVariable(initialScope, nameOrNode) {\n let name = \"\"\n let scope = initialScope\n\n if (typeof nameOrNode === \"string\") {\n name = nameOrNode\n } else {\n name = nameOrNode.name\n scope = getInnermostScope(scope, nameOrNode)\n }\n\n while (scope != null) {\n const variable = scope.set.get(name)\n if (variable != null) {\n return variable\n }\n scope = scope.upper\n }\n\n return null\n}\n","/**\n * Negate the result of `this` calling.\n * @param {Token} token The token to check.\n * @returns {boolean} `true` if the result of `this(token)` is `false`.\n */\nfunction negate0(token) {\n return !this(token) //eslint-disable-line no-invalid-this\n}\n\n/**\n * Creates the negate function of the given function.\n * @param {function(Token):boolean} f - The function to negate.\n * @returns {function(Token):boolean} Negated function.\n */\nfunction negate(f) {\n return negate0.bind(f)\n}\n\n/**\n * Checks if the given token is an arrow token or not.\n * @param {Token} token - The token to check.\n * @returns {boolean} `true` if the token is an arrow token.\n */\nexport function isArrowToken(token) {\n return token.value === \"=>\" && token.type === \"Punctuator\"\n}\n\n/**\n * Checks if the given token is a comma token or not.\n * @param {Token} token - The token to check.\n * @returns {boolean} `true` if the token is a comma token.\n */\nexport function isCommaToken(token) {\n return token.value === \",\" && token.type === \"Punctuator\"\n}\n\n/**\n * Checks if the given token is a semicolon token or not.\n * @param {Token} token - The token to check.\n * @returns {boolean} `true` if the token is a semicolon token.\n */\nexport function isSemicolonToken(token) {\n return token.value === \";\" && token.type === \"Punctuator\"\n}\n\n/**\n * Checks if the given token is a colon token or not.\n * @param {Token} token - The token to check.\n * @returns {boolean} `true` if the token is a colon token.\n */\nexport function isColonToken(token) {\n return token.value === \":\" && token.type === \"Punctuator\"\n}\n\n/**\n * Checks if the given token is an opening parenthesis token or not.\n * @param {Token} token - The token to check.\n * @returns {boolean} `true` if the token is an opening parenthesis token.\n */\nexport function isOpeningParenToken(token) {\n return token.value === \"(\" && token.type === \"Punctuator\"\n}\n\n/**\n * Checks if the given token is a closing parenthesis token or not.\n * @param {Token} token - The token to check.\n * @returns {boolean} `true` if the token is a closing parenthesis token.\n */\nexport function isClosingParenToken(token) {\n return token.value === \")\" && token.type === \"Punctuator\"\n}\n\n/**\n * Checks if the given token is an opening square bracket token or not.\n * @param {Token} token - The token to check.\n * @returns {boolean} `true` if the token is an opening square bracket token.\n */\nexport function isOpeningBracketToken(token) {\n return token.value === \"[\" && token.type === \"Punctuator\"\n}\n\n/**\n * Checks if the given token is a closing square bracket token or not.\n * @param {Token} token - The token to check.\n * @returns {boolean} `true` if the token is a closing square bracket token.\n */\nexport function isClosingBracketToken(token) {\n return token.value === \"]\" && token.type === \"Punctuator\"\n}\n\n/**\n * Checks if the given token is an opening brace token or not.\n * @param {Token} token - The token to check.\n * @returns {boolean} `true` if the token is an opening brace token.\n */\nexport function isOpeningBraceToken(token) {\n return token.value === \"{\" && token.type === \"Punctuator\"\n}\n\n/**\n * Checks if the given token is a closing brace token or not.\n * @param {Token} token - The token to check.\n * @returns {boolean} `true` if the token is a closing brace token.\n */\nexport function isClosingBraceToken(token) {\n return token.value === \"}\" && token.type === \"Punctuator\"\n}\n\n/**\n * Checks if the given token is a comment token or not.\n * @param {Token} token - The token to check.\n * @returns {boolean} `true` if the token is a comment token.\n */\nexport function isCommentToken(token) {\n return (\n token.type === \"Line\" ||\n token.type === \"Block\" ||\n token.type === \"Shebang\"\n )\n}\n\nexport const isNotArrowToken = negate(isArrowToken)\nexport const isNotCommaToken = negate(isCommaToken)\nexport const isNotSemicolonToken = negate(isSemicolonToken)\nexport const isNotColonToken = negate(isColonToken)\nexport const isNotOpeningParenToken = negate(isOpeningParenToken)\nexport const isNotClosingParenToken = negate(isClosingParenToken)\nexport const isNotOpeningBracketToken = negate(isOpeningBracketToken)\nexport const isNotClosingBracketToken = negate(isClosingBracketToken)\nexport const isNotOpeningBraceToken = negate(isOpeningBraceToken)\nexport const isNotClosingBraceToken = negate(isClosingBraceToken)\nexport const isNotCommentToken = negate(isCommentToken)\n","import { isArrowToken, isOpeningParenToken } from \"./token-predicate\"\n\n/**\n * Get the `(` token of the given function node.\n * @param {Node} node - The function node to get.\n * @param {SourceCode} sourceCode - The source code object to get tokens.\n * @returns {Token} `(` token.\n */\nfunction getOpeningParenOfParams(node, sourceCode) {\n return node.id\n ? sourceCode.getTokenAfter(node.id, isOpeningParenToken)\n : sourceCode.getFirstToken(node, isOpeningParenToken)\n}\n\n/**\n * Get the location of the given function node for reporting.\n * @param {Node} node - The function node to get.\n * @param {SourceCode} sourceCode - The source code object to get tokens.\n * @returns {string} The location of the function node for reporting.\n */\nexport function getFunctionHeadLocation(node, sourceCode) {\n const parent = node.parent\n let start = null\n let end = null\n\n if (node.type === \"ArrowFunctionExpression\") {\n const arrowToken = sourceCode.getTokenBefore(node.body, isArrowToken)\n\n start = arrowToken.loc.start\n end = arrowToken.loc.end\n } else if (\n parent.type === \"Property\" ||\n parent.type === \"MethodDefinition\"\n ) {\n start = parent.loc.start\n end = getOpeningParenOfParams(node, sourceCode).loc.start\n } else {\n start = node.loc.start\n end = getOpeningParenOfParams(node, sourceCode).loc.start\n }\n\n return {\n start: Object.assign({}, start),\n end: Object.assign({}, end),\n }\n}\n","import { findVariable } from \"./find-variable\"\n\nconst builtinNames = Object.freeze(\n new Set([\n \"Array\",\n \"ArrayBuffer\",\n \"Boolean\",\n \"DataView\",\n \"Date\",\n \"decodeURI\",\n \"decodeURIComponent\",\n \"encodeURI\",\n \"encodeURIComponent\",\n \"Error\",\n \"escape\",\n \"EvalError\",\n \"Float32Array\",\n \"Float64Array\",\n \"Function\",\n \"Infinity\",\n \"Int16Array\",\n \"Int32Array\",\n \"Int8Array\",\n \"isFinite\",\n \"isNaN\",\n \"isPrototypeOf\",\n \"JSON\",\n \"Map\",\n \"Math\",\n \"NaN\",\n \"Number\",\n \"Object\",\n \"parseFloat\",\n \"parseInt\",\n \"Promise\",\n \"Proxy\",\n \"RangeError\",\n \"ReferenceError\",\n \"Reflect\",\n \"RegExp\",\n \"Set\",\n \"String\",\n \"Symbol\",\n \"SyntaxError\",\n \"TypeError\",\n \"Uint16Array\",\n \"Uint32Array\",\n \"Uint8Array\",\n \"Uint8ClampedArray\",\n \"undefined\",\n \"unescape\",\n \"URIError\",\n \"WeakMap\",\n \"WeakSet\",\n ])\n)\n\n/**\n * Get the element values of a given node list.\n * @param {Node[]} nodeList The node list to get values.\n * @param {Scope|undefined} initialScope The initial scope to find variables.\n * @returns {any[]|null} The value list if all nodes are constant. Otherwise, null.\n */\nfunction getElementValues(nodeList, initialScope) {\n const valueList = []\n\n for (let i = 0; i < nodeList.length; ++i) {\n const elementNode = nodeList[i]\n\n if (elementNode == null) {\n valueList.length = i + 1\n } else if (elementNode.type === \"SpreadElement\") {\n const argument = getStaticValueR(elementNode.argument, initialScope)\n if (argument == null) {\n return null\n }\n valueList.push(...argument.value)\n } else {\n const element = getStaticValueR(elementNode, initialScope)\n if (element == null) {\n return null\n }\n valueList.push(element.value)\n }\n }\n\n return valueList\n}\n\nconst operations = Object.freeze({\n ArrayExpression(node, initialScope) {\n const elements = getElementValues(node.elements, initialScope)\n return elements != null ? { value: elements } : null\n },\n\n AssignmentExpression(node, initialScope) {\n if (node.operator === \"=\") {\n return getStaticValueR(node.right, initialScope)\n }\n return null\n },\n\n //eslint-disable-next-line complexity\n BinaryExpression(node, initialScope) {\n if (node.operator === \"in\" || node.operator === \"instanceof\") {\n // Not supported.\n return null\n }\n\n const left = getStaticValueR(node.left, initialScope)\n const right = getStaticValueR(node.right, initialScope)\n if (left != null && right != null) {\n switch (node.operator) {\n case \"==\":\n return { value: left.value == right.value } //eslint-disable-line eqeqeq\n case \"!=\":\n return { value: left.value != right.value } //eslint-disable-line eqeqeq\n case \"===\":\n return { value: left.value === right.value }\n case \"!==\":\n return { value: left.value !== right.value }\n case \"<\":\n return { value: left.value < right.value }\n case \"<=\":\n return { value: left.value <= right.value }\n case \">\":\n return { value: left.value > right.value }\n case \">=\":\n return { value: left.value >= right.value }\n case \"<<\":\n return { value: left.value << right.value }\n case \">>\":\n return { value: left.value >> right.value }\n case \">>>\":\n return { value: left.value >>> right.value }\n case \"+\":\n return { value: left.value + right.value }\n case \"-\":\n return { value: left.value - right.value }\n case \"*\":\n return { value: left.value * right.value }\n case \"/\":\n return { value: left.value / right.value }\n case \"%\":\n return { value: left.value % right.value }\n case \"**\":\n return { value: Math.pow(left.value, right.value) }\n case \"|\":\n return { value: left.value | right.value }\n case \"^\":\n return { value: left.value ^ right.value }\n case \"&\":\n return { value: left.value & right.value }\n\n // no default\n }\n }\n\n return null\n },\n\n CallExpression(node, initialScope) {\n const calleeNode = node.callee\n const args = getElementValues(node.arguments, initialScope)\n\n if (args != null) {\n if (calleeNode.type === \"MemberExpression\") {\n const object = getStaticValueR(calleeNode.object, initialScope)\n const property = calleeNode.computed\n ? getStaticValueR(calleeNode.property, initialScope)\n : { value: calleeNode.property.name }\n\n if (object != null && property != null) {\n const receiver = object.value\n const methodName = property.value\n return { value: receiver[methodName](...args) }\n }\n } else {\n const callee = getStaticValueR(calleeNode, initialScope)\n if (callee != null) {\n const func = callee.value\n return { value: func(...args) }\n }\n }\n }\n\n return null\n },\n\n ConditionalExpression(node, initialScope) {\n const test = getStaticValueR(node.test, initialScope)\n if (test != null) {\n return test.value\n ? getStaticValueR(node.consequent, initialScope)\n : getStaticValueR(node.alternate, initialScope)\n }\n return null\n },\n\n ExpressionStatement(node, initialScope) {\n return getStaticValueR(node.expression, initialScope)\n },\n\n Identifier(node, initialScope) {\n if (initialScope != null) {\n const variable = findVariable(initialScope, node)\n\n // Built-in globals.\n if (\n variable != null &&\n variable.defs.length === 0 &&\n builtinNames.has(variable.name) &&\n variable.name in global\n ) {\n return { value: global[variable.name] }\n }\n\n // Constants.\n if (variable != null && variable.defs.length === 1) {\n const def = variable.defs[0]\n if (\n def.parent &&\n def.parent.kind === \"const\" &&\n // TODO(mysticatea): don't support destructuring here.\n def.node.id.type === \"Identifier\"\n ) {\n return getStaticValueR(def.node.init, initialScope)\n }\n }\n }\n return null\n },\n\n Literal(node) {\n //istanbul ignore if : this is implementation-specific behavior.\n if (node.regex != null && node.value == null) {\n // It was a RegExp literal, but Node.js didn't support it.\n return null\n }\n return node\n },\n\n LogicalExpression(node, initialScope) {\n const left = getStaticValueR(node.left, initialScope)\n if (left != null) {\n if (\n (node.operator === \"||\" && Boolean(left.value) === true) ||\n (node.operator === \"&&\" && Boolean(left.value) === false)\n ) {\n return left\n }\n\n const right = getStaticValueR(node.right, initialScope)\n if (right != null) {\n return right\n }\n }\n\n return null\n },\n\n MemberExpression(node, initialScope) {\n const object = getStaticValueR(node.object, initialScope)\n const property = node.computed\n ? getStaticValueR(node.property, initialScope)\n : { value: node.property.name }\n\n if (object != null && property != null) {\n return { value: object.value[property.value] }\n }\n return null\n },\n\n NewExpression(node, initialScope) {\n const callee = getStaticValueR(node.callee, initialScope)\n const args = getElementValues(node.arguments, initialScope)\n\n if (callee != null && args != null) {\n const Func = callee.value\n return { value: new Func(...args) }\n }\n\n return null\n },\n\n ObjectExpression(node, initialScope) {\n const object = {}\n\n for (const propertyNode of node.properties) {\n if (propertyNode.type === \"Property\") {\n if (propertyNode.kind !== \"init\") {\n return null\n }\n const key = propertyNode.computed\n ? getStaticValueR(propertyNode.key, initialScope)\n : { value: propertyNode.key.name }\n const value = getStaticValueR(propertyNode.value, initialScope)\n if (key == null || value == null) {\n return null\n }\n object[key.value] = value.value\n } else if (\n propertyNode.type === \"SpreadElement\" ||\n propertyNode.type === \"ExperimentalSpreadProperty\"\n ) {\n const argument = getStaticValueR(\n propertyNode.argument,\n initialScope\n )\n if (argument == null) {\n return null\n }\n Object.assign(object, argument.value)\n } else {\n return null\n }\n }\n\n return { value: object }\n },\n\n SequenceExpression(node, initialScope) {\n const last = node.expressions[node.expressions.length - 1]\n return getStaticValueR(last, initialScope)\n },\n\n TaggedTemplateExpression(node, initialScope) {\n const tag = getStaticValueR(node.tag, initialScope)\n const expressions = getElementValues(\n node.quasi.expressions,\n initialScope\n )\n\n if (tag != null && expressions != null) {\n const func = tag.value\n const strings = node.quasi.quasis.map(q => q.value.cooked)\n strings.raw = node.quasi.quasis.map(q => q.value.raw)\n\n return { value: func(strings, ...expressions) }\n }\n\n return null\n },\n\n TemplateLiteral(node, initialScope) {\n const expressions = getElementValues(node.expressions, initialScope)\n if (expressions != null) {\n let value = node.quasis[0].value.cooked\n for (let i = 0; i < expressions.length; ++i) {\n value += expressions[i]\n value += node.quasis[i + 1].value.cooked\n }\n return { value }\n }\n return null\n },\n\n UnaryExpression(node, initialScope) {\n if (node.operator === \"delete\") {\n // Not supported.\n return null\n }\n if (node.operator === \"void\") {\n return { value: undefined }\n }\n\n const arg = getStaticValueR(node.argument, initialScope)\n if (arg != null) {\n switch (node.operator) {\n case \"-\":\n return { value: -arg.value }\n case \"+\":\n return { value: +arg.value } //eslint-disable-line no-implicit-coercion\n case \"!\":\n return { value: !arg.value }\n case \"~\":\n return { value: ~arg.value }\n case \"typeof\":\n return { value: typeof arg.value }\n\n // no default\n }\n }\n\n return null\n },\n})\n\n/**\n * Get the value of a given node if it's a static value.\n * @param {Node} node The node to get.\n * @param {Scope|undefined} initialScope The scope to start finding variable.\n * @returns {{value:any}|null} The static value of the node, or `null`.\n */\nfunction getStaticValueR(node, initialScope) {\n if (node != null && Object.hasOwnProperty.call(operations, node.type)) {\n return operations[node.type](node, initialScope)\n }\n return null\n}\n\n/**\n * Get the value of a given node if it's a static value.\n * @param {Node} node The node to get.\n * @param {Scope} [initialScope] The scope to start finding variable. Optional. If this scope was given, this tries to resolve identifier references which are in the given node as much as possible.\n * @returns {{value:any}|null} The static value of the node, or `null`.\n */\nexport function getStaticValue(node, initialScope = null) {\n try {\n return getStaticValueR(node, initialScope)\n } catch (_error) {\n return null\n }\n}\n","import { getStaticValue } from \"./get-static-value\"\n\n/**\n * Get the value of a given node if it's a literal or a template literal.\n * @param {Node} node The node to get.\n * @param {Scope} [initialScope] The scope to start finding variable. Optional. If the node is an Identifier node and this scope was given, this checks the variable of the identifier, and returns the value of it if the variable is a constant.\n * @returns {string|null} The value of the node, or `null`.\n */\nexport function getStringIfConstant(node, initialScope = null) {\n const evaluated = getStaticValue(node, initialScope)\n return evaluated && String(evaluated.value)\n}\n","import { getStringIfConstant } from \"./get-string-if-constant\"\n\n/**\n * Get the property name from a MemberExpression node or a Property node.\n * @param {Node} node The node to get.\n * @param {Scope} [initialScope] The scope to start finding variable. Optional. If the node is a computed property node and this scope was given, this checks the computed property name by the `getStringIfConstant` function with the scope, and returns the value of it.\n * @returns {string|null} The property name of the node.\n */\nexport function getPropertyName(node, initialScope) {\n switch (node.type) {\n case \"MemberExpression\":\n if (node.computed) {\n return getStringIfConstant(node.property, initialScope)\n }\n return node.property.name\n\n case \"Property\":\n case \"MethodDefinition\":\n if (node.computed) {\n return getStringIfConstant(node.key, initialScope)\n }\n if (node.key.type === \"Literal\") {\n return String(node.key.value)\n }\n return node.key.name\n\n // no default\n }\n\n return null\n}\n","import { getPropertyName } from \"./get-property-name\"\n\n/**\n * Get the name and kind of the given function node.\n * @param {ASTNode} node - The function node to get.\n * @returns {string} The name and kind of the function node.\n */\nexport function getFunctionNameWithKind(node) {\n const parent = node.parent\n const tokens = []\n\n if (parent.type === \"MethodDefinition\" && parent.static) {\n tokens.push(\"static\")\n }\n if (node.async) {\n tokens.push(\"async\")\n }\n if (node.generator) {\n tokens.push(\"generator\")\n }\n\n if (node.type === \"ArrowFunctionExpression\") {\n tokens.push(\"arrow\", \"function\")\n } else if (\n parent.type === \"Property\" ||\n parent.type === \"MethodDefinition\"\n ) {\n if (parent.kind === \"constructor\") {\n return \"constructor\"\n }\n if (parent.kind === \"get\") {\n tokens.push(\"getter\")\n } else if (parent.kind === \"set\") {\n tokens.push(\"setter\")\n } else {\n tokens.push(\"method\")\n }\n } else {\n tokens.push(\"function\")\n }\n\n if (node.id) {\n tokens.push(`'${node.id.name}'`)\n } else {\n const name = getPropertyName(parent)\n\n if (name) {\n tokens.push(`'${name}'`)\n }\n }\n\n return tokens.join(\" \")\n}\n","import evk from \"eslint-visitor-keys\"\n\nconst typeConversionBinaryOps = Object.freeze(\n new Set([\n \"==\",\n \"!=\",\n \"<\",\n \"<=\",\n \">\",\n \">=\",\n \"<<\",\n \">>\",\n \">>>\",\n \"+\",\n \"-\",\n \"*\",\n \"/\",\n \"%\",\n \"|\",\n \"^\",\n \"&\",\n \"in\",\n ])\n)\nconst typeConversionUnaryOps = Object.freeze(new Set([\"-\", \"+\", \"!\", \"~\"]))\nconst visitor = Object.freeze(\n Object.assign(Object.create(null), {\n $visit(node, options, visitorKeys) {\n const { type } = node\n\n if (typeof this[type] === \"function\") {\n return this[type](node, options, visitorKeys)\n }\n\n return this.$visitChildren(node, options, visitorKeys)\n },\n\n $visitChildren(node, options, visitorKeys) {\n const { type } = node\n\n for (const key of visitorKeys[type] || evk.getKeys(node)) {\n const value = node[key]\n\n if (Array.isArray(value)) {\n for (const element of value) {\n if (\n element &&\n this.$visit(element, options, visitorKeys)\n ) {\n return true\n }\n }\n } else if (value && this.$visit(value, options, visitorKeys)) {\n return true\n }\n }\n\n return false\n },\n\n ArrowFunctionExpression() {\n return false\n },\n AssignmentExpression() {\n return true\n },\n AwaitExpression() {\n return true\n },\n BinaryExpression(node, options, visitorKeys) {\n if (\n options.considerImplicitTypeConversion &&\n typeConversionBinaryOps.has(node.operator) &&\n (node.left.type !== \"Literal\" || node.right.type !== \"Literal\")\n ) {\n return true\n }\n return this.$visitChildren(node, options, visitorKeys)\n },\n CallExpression() {\n return true\n },\n FunctionExpression() {\n return false\n },\n ImportExpression() {\n return true\n },\n MemberExpression(node, options, visitorKeys) {\n if (options.considerGetters) {\n return true\n }\n if (\n options.considerImplicitTypeConversion &&\n node.computed &&\n node.property.type !== \"Literal\"\n ) {\n return true\n }\n return this.$visitChildren(node, options, visitorKeys)\n },\n MethodDefinition(node, options, visitorKeys) {\n if (\n options.considerImplicitTypeConversion &&\n node.computed &&\n node.key.type !== \"Literal\"\n ) {\n return true\n }\n return this.$visitChildren(node, options, visitorKeys)\n },\n NewExpression() {\n return true\n },\n Property(node, options, visitorKeys) {\n if (\n options.considerImplicitTypeConversion &&\n node.computed &&\n node.key.type !== \"Literal\"\n ) {\n return true\n }\n return this.$visitChildren(node, options, visitorKeys)\n },\n UnaryExpression(node, options, visitorKeys) {\n if (node.operator === \"delete\") {\n return true\n }\n if (\n options.considerImplicitTypeConversion &&\n typeConversionUnaryOps.has(node.operator) &&\n node.argument.type !== \"Literal\"\n ) {\n return true\n }\n return this.$visitChildren(node, options, visitorKeys)\n },\n UpdateExpression() {\n return true\n },\n YieldExpression() {\n return true\n },\n })\n)\n\n/**\n * Check whether a given node has any side effect or not.\n * @param {Node} node The node to get.\n * @param {SourceCode} sourceCode The source code object.\n * @param {object} [options] The option object.\n * @param {boolean} [options.considerGetters=false] If `true` then it considers member accesses as the node which has side effects.\n * @param {boolean} [options.considerImplicitTypeConversion=false] If `true` then it considers implicit type conversion as the node which has side effects.\n * @param {object} [options.visitorKeys=evk.KEYS] The keys to traverse nodes. Use `context.getSourceCode().visitorKeys`.\n * @returns {boolean} `true` if the node has a certain side effect.\n */\nexport function hasSideEffect(\n node,\n sourceCode,\n { considerGetters = false, considerImplicitTypeConversion = false } = {}\n) {\n return visitor.$visit(\n node,\n { considerGetters, considerImplicitTypeConversion },\n sourceCode.visitorKeys || evk.KEYS\n )\n}\n","import { isClosingParenToken, isOpeningParenToken } from \"./token-predicate\"\n\n/**\n * Get the left parenthesis of the parent node syntax if it exists.\n * E.g., `if (a) {}` then the `(`.\n * @param {Node} node The AST node to check.\n * @param {SourceCode} sourceCode The source code object to get tokens.\n * @returns {Token|null} The left parenthesis of the parent node syntax\n */\nfunction getParentSyntaxParen(node, sourceCode) {\n const parent = node.parent\n\n switch (parent.type) {\n case \"CallExpression\":\n case \"NewExpression\":\n if (parent.arguments.length === 1 && parent.arguments[0] === node) {\n return sourceCode.getTokenAfter(\n parent.callee,\n isOpeningParenToken\n )\n }\n return null\n\n case \"DoWhileStatement\":\n if (parent.test === node) {\n return sourceCode.getTokenAfter(\n parent.body,\n isOpeningParenToken\n )\n }\n return null\n\n case \"IfStatement\":\n case \"WhileStatement\":\n if (parent.test === node) {\n return sourceCode.getFirstToken(parent, 1)\n }\n return null\n\n case \"ImportExpression\":\n if (parent.source === node) {\n return sourceCode.getFirstToken(parent, 1)\n }\n return null\n\n case \"SwitchStatement\":\n if (parent.discriminant === node) {\n return sourceCode.getFirstToken(parent, 1)\n }\n return null\n\n case \"WithStatement\":\n if (parent.object === node) {\n return sourceCode.getFirstToken(parent, 1)\n }\n return null\n\n default:\n return null\n }\n}\n\n/**\n * Check whether a given node is parenthesized or not.\n * @param {number} times The number of parantheses.\n * @param {Node} node The AST node to check.\n * @param {SourceCode} sourceCode The source code object to get tokens.\n * @returns {boolean} `true` if the node is parenthesized the given times.\n */\n/**\n * Check whether a given node is parenthesized or not.\n * @param {Node} node The AST node to check.\n * @param {SourceCode} sourceCode The source code object to get tokens.\n * @returns {boolean} `true` if the node is parenthesized.\n */\nexport function isParenthesized(\n timesOrNode,\n nodeOrSourceCode,\n optionalSourceCode\n) {\n let times, node, sourceCode, maybeLeftParen, maybeRightParen\n if (typeof timesOrNode === \"number\") {\n times = timesOrNode | 0\n node = nodeOrSourceCode\n sourceCode = optionalSourceCode\n if (!(times >= 1)) {\n throw new TypeError(\"'times' should be a positive integer.\")\n }\n } else {\n times = 1\n node = timesOrNode\n sourceCode = nodeOrSourceCode\n }\n\n if (node == null) {\n return false\n }\n\n maybeLeftParen = maybeRightParen = node\n do {\n maybeLeftParen = sourceCode.getTokenBefore(maybeLeftParen)\n maybeRightParen = sourceCode.getTokenAfter(maybeRightParen)\n } while (\n maybeLeftParen != null &&\n maybeRightParen != null &&\n isOpeningParenToken(maybeLeftParen) &&\n isClosingParenToken(maybeRightParen) &&\n // Avoid false positive such as `if (a) {}`\n maybeLeftParen !== getParentSyntaxParen(node, sourceCode) &&\n --times > 0\n )\n\n return times === 0\n}\n","/**\n * @author Toru Nagashima \n * See LICENSE file in root directory for full license.\n */\n\nconst placeholder = /\\$(?:[$&`']|[1-9][0-9]?)/gu\n\n/** @type {WeakMap} */\nconst internal = new WeakMap()\n\n/**\n * Check whether a given character is escaped or not.\n * @param {string} str The string to check.\n * @param {number} index The location of the character to check.\n * @returns {boolean} `true` if the character is escaped.\n */\nfunction isEscaped(str, index) {\n let escaped = false\n for (let i = index - 1; i >= 0 && str.charCodeAt(i) === 0x5c; --i) {\n escaped = !escaped\n }\n return escaped\n}\n\n/**\n * Replace a given string by a given matcher.\n * @param {PatternMatcher} matcher The pattern matcher.\n * @param {string} str The string to be replaced.\n * @param {string} replacement The new substring to replace each matched part.\n * @returns {string} The replaced string.\n */\nfunction replaceS(matcher, str, replacement) {\n const chunks = []\n let index = 0\n\n /** @type {RegExpExecArray} */\n let match = null\n\n /**\n * @param {string} key The placeholder.\n * @returns {string} The replaced string.\n */\n function replacer(key) {\n switch (key) {\n case \"$$\":\n return \"$\"\n case \"$&\":\n return match[0]\n case \"$`\":\n return str.slice(0, match.index)\n case \"$'\":\n return str.slice(match.index + match[0].length)\n default: {\n const i = key.slice(1)\n if (i in match) {\n return match[i]\n }\n return key\n }\n }\n }\n\n for (match of matcher.execAll(str)) {\n chunks.push(str.slice(index, match.index))\n chunks.push(replacement.replace(placeholder, replacer))\n index = match.index + match[0].length\n }\n chunks.push(str.slice(index))\n\n return chunks.join(\"\")\n}\n\n/**\n * Replace a given string by a given matcher.\n * @param {PatternMatcher} matcher The pattern matcher.\n * @param {string} str The string to be replaced.\n * @param {(...strs[])=>string} replace The function to replace each matched part.\n * @returns {string} The replaced string.\n */\nfunction replaceF(matcher, str, replace) {\n const chunks = []\n let index = 0\n\n for (const match of matcher.execAll(str)) {\n chunks.push(str.slice(index, match.index))\n chunks.push(String(replace(...match, match.index, match.input)))\n index = match.index + match[0].length\n }\n chunks.push(str.slice(index))\n\n return chunks.join(\"\")\n}\n\n/**\n * The class to find patterns as considering escape sequences.\n */\nexport class PatternMatcher {\n /**\n * Initialize this matcher.\n * @param {RegExp} pattern The pattern to match.\n * @param {{escaped:boolean}} options The options.\n */\n constructor(pattern, { escaped = false } = {}) {\n if (!(pattern instanceof RegExp)) {\n throw new TypeError(\"'pattern' should be a RegExp instance.\")\n }\n if (!pattern.flags.includes(\"g\")) {\n throw new Error(\"'pattern' should contains 'g' flag.\")\n }\n\n internal.set(this, {\n pattern: new RegExp(pattern.source, pattern.flags),\n escaped: Boolean(escaped),\n })\n }\n\n /**\n * Find the pattern in a given string.\n * @param {string} str The string to find.\n * @returns {IterableIterator} The iterator which iterate the matched information.\n */\n *execAll(str) {\n const { pattern, escaped } = internal.get(this)\n let match = null\n let lastIndex = 0\n\n pattern.lastIndex = 0\n while ((match = pattern.exec(str)) != null) {\n if (escaped || !isEscaped(str, match.index)) {\n lastIndex = pattern.lastIndex\n yield match\n pattern.lastIndex = lastIndex\n }\n }\n }\n\n /**\n * Check whether the pattern is found in a given string.\n * @param {string} str The string to check.\n * @returns {boolean} `true` if the pattern was found in the string.\n */\n test(str) {\n const it = this.execAll(str)\n const ret = it.next()\n return !ret.done\n }\n\n /**\n * Replace a given string.\n * @param {string} str The string to be replaced.\n * @param {(string|((...strs:string[])=>string))} replacer The string or function to replace. This is the same as the 2nd argument of `String.prototype.replace`.\n * @returns {string} The replaced string.\n */\n [Symbol.replace](str, replacer) {\n return typeof replacer === \"function\"\n ? replaceF(this, String(str), replacer)\n : replaceS(this, String(str), String(replacer))\n }\n}\n","import { findVariable } from \"./find-variable\"\nimport { getPropertyName } from \"./get-property-name\"\nimport { getStringIfConstant } from \"./get-string-if-constant\"\n\nconst SENTINEL_TYPE = /^(?:.+?Statement|.+?Declaration|(?:Array|ArrowFunction|Assignment|Call|Class|Function|Member|New|Object)Expression|AssignmentPattern|Program|VariableDeclarator)$/u\nconst IMPORT_TYPE = /^(?:Import|Export(?:All|Default|Named))Declaration$/u\nconst has = Function.call.bind(Object.hasOwnProperty)\n\nexport const READ = Symbol(\"read\")\nexport const CALL = Symbol(\"call\")\nexport const CONSTRUCT = Symbol(\"construct\")\nexport const ESM = Symbol(\"esm\")\n\nconst requireCall = { require: { [CALL]: true } }\n\n/**\n * Check whether a given variable is modified or not.\n * @param {Variable} variable The variable to check.\n * @returns {boolean} `true` if the variable is modified.\n */\nfunction isModifiedGlobal(variable) {\n return (\n variable == null ||\n variable.defs.length !== 0 ||\n variable.references.some(r => r.isWrite())\n )\n}\n\n/**\n * The reference tracker.\n */\nexport class ReferenceTracker {\n /**\n * Initialize this tracker.\n * @param {Scope} globalScope The global scope.\n * @param {object} [options] The options.\n * @param {\"legacy\"|\"strict\"} [options.mode=\"strict\"] The mode to determine the ImportDeclaration's behavior for CJS modules.\n * @param {string[]} [options.globalObjectNames=[\"global\",\"self\",\"window\"]] The variable names for Global Object.\n */\n constructor(\n globalScope,\n {\n mode = \"strict\",\n globalObjectNames = [\"global\", \"self\", \"window\"],\n } = {}\n ) {\n this.variableStack = []\n this.globalScope = globalScope\n this.mode = mode\n this.globalObjectNames = globalObjectNames.slice(0)\n }\n\n /**\n * Iterate the references of global variables.\n * @param {object} traceMap The trace map.\n * @returns {IterableIterator<{node:Node,path:string[],type:symbol,info:any}>} The iterator to iterate references.\n */\n *iterateGlobalReferences(traceMap) {\n for (const key of Object.keys(traceMap)) {\n const nextTraceMap = traceMap[key]\n const path = [key]\n const variable = this.globalScope.set.get(key)\n\n if (isModifiedGlobal(variable)) {\n continue\n }\n\n yield* this._iterateVariableReferences(\n variable,\n path,\n nextTraceMap,\n true\n )\n }\n\n for (const key of this.globalObjectNames) {\n const path = []\n const variable = this.globalScope.set.get(key)\n\n if (isModifiedGlobal(variable)) {\n continue\n }\n\n yield* this._iterateVariableReferences(\n variable,\n path,\n traceMap,\n false\n )\n }\n }\n\n /**\n * Iterate the references of CommonJS modules.\n * @param {object} traceMap The trace map.\n * @returns {IterableIterator<{node:Node,path:string[],type:symbol,info:any}>} The iterator to iterate references.\n */\n *iterateCjsReferences(traceMap) {\n for (const { node } of this.iterateGlobalReferences(requireCall)) {\n const key = getStringIfConstant(node.arguments[0])\n if (key == null || !has(traceMap, key)) {\n continue\n }\n\n const nextTraceMap = traceMap[key]\n const path = [key]\n\n if (nextTraceMap[READ]) {\n yield {\n node,\n path,\n type: READ,\n info: nextTraceMap[READ],\n }\n }\n yield* this._iteratePropertyReferences(node, path, nextTraceMap)\n }\n }\n\n /**\n * Iterate the references of ES modules.\n * @param {object} traceMap The trace map.\n * @returns {IterableIterator<{node:Node,path:string[],type:symbol,info:any}>} The iterator to iterate references.\n */\n *iterateEsmReferences(traceMap) {\n const programNode = this.globalScope.block\n\n for (const node of programNode.body) {\n if (!IMPORT_TYPE.test(node.type) || node.source == null) {\n continue\n }\n const moduleId = node.source.value\n\n if (!has(traceMap, moduleId)) {\n continue\n }\n const nextTraceMap = traceMap[moduleId]\n const path = [moduleId]\n\n if (nextTraceMap[READ]) {\n yield { node, path, type: READ, info: nextTraceMap[READ] }\n }\n\n if (node.type === \"ExportAllDeclaration\") {\n for (const key of Object.keys(nextTraceMap)) {\n const exportTraceMap = nextTraceMap[key]\n if (exportTraceMap[READ]) {\n yield {\n node,\n path: path.concat(key),\n type: READ,\n info: exportTraceMap[READ],\n }\n }\n }\n } else {\n for (const specifier of node.specifiers) {\n const esm = has(nextTraceMap, ESM)\n const it = this._iterateImportReferences(\n specifier,\n path,\n esm\n ? nextTraceMap\n : this.mode === \"legacy\"\n ? Object.assign(\n { default: nextTraceMap },\n nextTraceMap\n )\n : { default: nextTraceMap }\n )\n\n if (esm) {\n yield* it\n } else {\n for (const report of it) {\n report.path = report.path.filter(exceptDefault)\n if (\n report.path.length >= 2 ||\n report.type !== READ\n ) {\n yield report\n }\n }\n }\n }\n }\n }\n }\n\n /**\n * Iterate the references for a given variable.\n * @param {Variable} variable The variable to iterate that references.\n * @param {string[]} path The current path.\n * @param {object} traceMap The trace map.\n * @param {boolean} shouldReport = The flag to report those references.\n * @returns {IterableIterator<{node:Node,path:string[],type:symbol,info:any}>} The iterator to iterate references.\n */\n *_iterateVariableReferences(variable, path, traceMap, shouldReport) {\n if (this.variableStack.includes(variable)) {\n return\n }\n this.variableStack.push(variable)\n try {\n for (const reference of variable.references) {\n if (!reference.isRead()) {\n continue\n }\n const node = reference.identifier\n\n if (shouldReport && traceMap[READ]) {\n yield { node, path, type: READ, info: traceMap[READ] }\n }\n yield* this._iteratePropertyReferences(node, path, traceMap)\n }\n } finally {\n this.variableStack.pop()\n }\n }\n\n /**\n * Iterate the references for a given AST node.\n * @param rootNode The AST node to iterate references.\n * @param {string[]} path The current path.\n * @param {object} traceMap The trace map.\n * @returns {IterableIterator<{node:Node,path:string[],type:symbol,info:any}>} The iterator to iterate references.\n */\n //eslint-disable-next-line complexity\n *_iteratePropertyReferences(rootNode, path, traceMap) {\n let node = rootNode\n while (!SENTINEL_TYPE.test(node.parent.type)) {\n node = node.parent\n }\n\n const parent = node.parent\n if (parent.type === \"MemberExpression\") {\n if (parent.object === node) {\n const key = getPropertyName(parent)\n if (key == null || !has(traceMap, key)) {\n return\n }\n\n path = path.concat(key) //eslint-disable-line no-param-reassign\n const nextTraceMap = traceMap[key]\n if (nextTraceMap[READ]) {\n yield {\n node: parent,\n path,\n type: READ,\n info: nextTraceMap[READ],\n }\n }\n yield* this._iteratePropertyReferences(\n parent,\n path,\n nextTraceMap\n )\n }\n return\n }\n if (parent.type === \"CallExpression\") {\n if (parent.callee === node && traceMap[CALL]) {\n yield { node: parent, path, type: CALL, info: traceMap[CALL] }\n }\n return\n }\n if (parent.type === \"NewExpression\") {\n if (parent.callee === node && traceMap[CONSTRUCT]) {\n yield {\n node: parent,\n path,\n type: CONSTRUCT,\n info: traceMap[CONSTRUCT],\n }\n }\n return\n }\n if (parent.type === \"AssignmentExpression\") {\n if (parent.right === node) {\n yield* this._iterateLhsReferences(parent.left, path, traceMap)\n yield* this._iteratePropertyReferences(parent, path, traceMap)\n }\n return\n }\n if (parent.type === \"AssignmentPattern\") {\n if (parent.right === node) {\n yield* this._iterateLhsReferences(parent.left, path, traceMap)\n }\n return\n }\n if (parent.type === \"VariableDeclarator\") {\n if (parent.init === node) {\n yield* this._iterateLhsReferences(parent.id, path, traceMap)\n }\n }\n }\n\n /**\n * Iterate the references for a given Pattern node.\n * @param {Node} patternNode The Pattern node to iterate references.\n * @param {string[]} path The current path.\n * @param {object} traceMap The trace map.\n * @returns {IterableIterator<{node:Node,path:string[],type:symbol,info:any}>} The iterator to iterate references.\n */\n *_iterateLhsReferences(patternNode, path, traceMap) {\n if (patternNode.type === \"Identifier\") {\n const variable = findVariable(this.globalScope, patternNode)\n if (variable != null) {\n yield* this._iterateVariableReferences(\n variable,\n path,\n traceMap,\n false\n )\n }\n return\n }\n if (patternNode.type === \"ObjectPattern\") {\n for (const property of patternNode.properties) {\n const key = getPropertyName(property)\n\n if (key == null || !has(traceMap, key)) {\n continue\n }\n\n const nextPath = path.concat(key)\n const nextTraceMap = traceMap[key]\n if (nextTraceMap[READ]) {\n yield {\n node: property,\n path: nextPath,\n type: READ,\n info: nextTraceMap[READ],\n }\n }\n yield* this._iterateLhsReferences(\n property.value,\n nextPath,\n nextTraceMap\n )\n }\n return\n }\n if (patternNode.type === \"AssignmentPattern\") {\n yield* this._iterateLhsReferences(patternNode.left, path, traceMap)\n }\n }\n\n /**\n * Iterate the references for a given ModuleSpecifier node.\n * @param {Node} specifierNode The ModuleSpecifier node to iterate references.\n * @param {string[]} path The current path.\n * @param {object} traceMap The trace map.\n * @returns {IterableIterator<{node:Node,path:string[],type:symbol,info:any}>} The iterator to iterate references.\n */\n *_iterateImportReferences(specifierNode, path, traceMap) {\n const type = specifierNode.type\n\n if (type === \"ImportSpecifier\" || type === \"ImportDefaultSpecifier\") {\n const key =\n type === \"ImportDefaultSpecifier\"\n ? \"default\"\n : specifierNode.imported.name\n if (!has(traceMap, key)) {\n return\n }\n\n path = path.concat(key) //eslint-disable-line no-param-reassign\n const nextTraceMap = traceMap[key]\n if (nextTraceMap[READ]) {\n yield {\n node: specifierNode,\n path,\n type: READ,\n info: nextTraceMap[READ],\n }\n }\n yield* this._iterateVariableReferences(\n findVariable(this.globalScope, specifierNode.local),\n path,\n nextTraceMap,\n false\n )\n\n return\n }\n\n if (type === \"ImportNamespaceSpecifier\") {\n yield* this._iterateVariableReferences(\n findVariable(this.globalScope, specifierNode.local),\n path,\n traceMap,\n false\n )\n return\n }\n\n if (type === \"ExportSpecifier\") {\n const key = specifierNode.local.name\n if (!has(traceMap, key)) {\n return\n }\n\n path = path.concat(key) //eslint-disable-line no-param-reassign\n const nextTraceMap = traceMap[key]\n if (nextTraceMap[READ]) {\n yield {\n node: specifierNode,\n path,\n type: READ,\n info: nextTraceMap[READ],\n }\n }\n }\n }\n}\n\nReferenceTracker.READ = READ\nReferenceTracker.CALL = CALL\nReferenceTracker.CONSTRUCT = CONSTRUCT\nReferenceTracker.ESM = ESM\n\n/**\n * This is a predicate function for Array#filter.\n * @param {string} name A name part.\n * @param {number} index The index of the name.\n * @returns {boolean} `false` if it's default.\n */\nfunction exceptDefault(name, index) {\n return !(index === 1 && name === \"default\")\n}\n","import { findVariable } from \"./find-variable\"\nimport { getFunctionHeadLocation } from \"./get-function-head-location\"\nimport { getFunctionNameWithKind } from \"./get-function-name-with-kind\"\nimport { getInnermostScope } from \"./get-innermost-scope\"\nimport { getPropertyName } from \"./get-property-name\"\nimport { getStaticValue } from \"./get-static-value\"\nimport { getStringIfConstant } from \"./get-string-if-constant\"\nimport { hasSideEffect } from \"./has-side-effect\"\nimport { isParenthesized } from \"./is-parenthesized\"\nimport { PatternMatcher } from \"./pattern-matcher\"\nimport {\n CALL,\n CONSTRUCT,\n ESM,\n READ,\n ReferenceTracker,\n} from \"./reference-tracker\"\nimport {\n isArrowToken,\n isClosingBraceToken,\n isClosingBracketToken,\n isClosingParenToken,\n isColonToken,\n isCommaToken,\n isCommentToken,\n isNotArrowToken,\n isNotClosingBraceToken,\n isNotClosingBracketToken,\n isNotClosingParenToken,\n isNotColonToken,\n isNotCommaToken,\n isNotCommentToken,\n isNotOpeningBraceToken,\n isNotOpeningBracketToken,\n isNotOpeningParenToken,\n isNotSemicolonToken,\n isOpeningBraceToken,\n isOpeningBracketToken,\n isOpeningParenToken,\n isSemicolonToken,\n} from \"./token-predicate\"\n\nexport default {\n CALL,\n CONSTRUCT,\n ESM,\n findVariable,\n getFunctionHeadLocation,\n getFunctionNameWithKind,\n getInnermostScope,\n getPropertyName,\n getStaticValue,\n getStringIfConstant,\n hasSideEffect,\n isArrowToken,\n isClosingBraceToken,\n isClosingBracketToken,\n isClosingParenToken,\n isColonToken,\n isCommaToken,\n isCommentToken,\n isNotArrowToken,\n isNotClosingBraceToken,\n isNotClosingBracketToken,\n isNotClosingParenToken,\n isNotColonToken,\n isNotCommaToken,\n isNotCommentToken,\n isNotOpeningBraceToken,\n isNotOpeningBracketToken,\n isNotOpeningParenToken,\n isNotSemicolonToken,\n isOpeningBraceToken,\n isOpeningBracketToken,\n isOpeningParenToken,\n isParenthesized,\n isSemicolonToken,\n PatternMatcher,\n READ,\n ReferenceTracker,\n}\nexport {\n CALL,\n CONSTRUCT,\n ESM,\n findVariable,\n getFunctionHeadLocation,\n getFunctionNameWithKind,\n getInnermostScope,\n getPropertyName,\n getStaticValue,\n getStringIfConstant,\n hasSideEffect,\n isArrowToken,\n isClosingBraceToken,\n isClosingBracketToken,\n isClosingParenToken,\n isColonToken,\n isCommaToken,\n isCommentToken,\n isNotArrowToken,\n isNotClosingBraceToken,\n isNotClosingBracketToken,\n isNotClosingParenToken,\n isNotColonToken,\n isNotCommaToken,\n isNotCommentToken,\n isNotOpeningBraceToken,\n isNotOpeningBracketToken,\n isNotOpeningParenToken,\n isNotSemicolonToken,\n isOpeningBraceToken,\n isOpeningBracketToken,\n isOpeningParenToken,\n isParenthesized,\n isSemicolonToken,\n PatternMatcher,\n READ,\n ReferenceTracker,\n}\n"],"names":[],"mappings":";;;AAAA;;;;;;AAMA,AAAO,SAAS,iBAAiB,CAAC,YAAY,EAAE,IAAI,EAA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IAAI,GAAG,KAAI;AAC5B,gBAAgB,CAAC,IAAI,GAAG,KAAI;AAC5B,gBAAgB,CAAC,SAAS,GAAG,UAAS;AACtC,gBAAgB,CAAC,GAAG,GAAG,IAAG;;;;;;;;AAQ1B,SAAS,aAAa,CAAC,IAAI,EAAE,KAAK,EAAE;IAChC,OAAO,EAAE,KAAK,KAAK,CAAC,IAAI,IAAI,KAAK,SAAS,CAAC;CAC9C;;ACnYD,YAAe;IACX,IAAI;IACJ,SAAS;IACT,GAAG;IACH,YAAY;IACZ,uBAAuB;IACvB,uBAAuB;IACvB,iBAAiB;IACjB,eAAe;IACf,cAAc;IACd,mBAAmB;IACnB,aAAa;IACb,YAAY;IACZ,mBAAmB;IACnB,qBAAqB;IACrB,mBAAmB;IACnB,YAAY;IACZ,YAAY;IACZ,cAAc;IACd,eAAe;IACf,sBAAsB;IACtB,wBAAwB;IACxB,sBAAsB;IACtB,eAAe;IACf,eAAe;IACf,iBAAiB;IACjB,sBAAsB;IACtB,wBAAwB;IACxB,sBAAsB;IACtB,mBAAmB;IACnB,mBAAmB;IACnB,qBAAqB;IACrB,mBAAmB;IACnB,eAAe;IACf,gBAAgB;IAChB,cAAc;IACd,IAAI;IACJ,gBAAgB;CACnB;;;;;"} \ No newline at end of file +{"version":3,"file":"index.mjs","sources":["src/get-innermost-scope.js","src/find-variable.js","src/token-predicate.js","src/get-function-head-location.js","src/get-static-value.js","src/get-string-if-constant.js","src/get-property-name.js","src/get-function-name-with-kind.js","src/has-side-effect.js","src/is-parenthesized.js","src/pattern-matcher.js","src/reference-tracker.js","src/index.js"],"sourcesContent":["/**\n * Get the innermost scope which contains a given location.\n * @param {Scope} initialScope The initial scope to search.\n * @param {Node} node The location to search.\n * @returns {Scope} The innermost scope.\n */\nexport function getInnermostScope(initialScope, node) {\n const location = node.range[0]\n\n let scope = initialScope\n let found = false\n do {\n found = false\n for (const childScope of scope.childScopes) {\n const range = childScope.block.range\n\n if (range[0] <= location && location < range[1]) {\n scope = childScope\n found = true\n break\n }\n }\n } while (found)\n\n return scope\n}\n","import { getInnermostScope } from \"./get-innermost-scope\"\n\n/**\n * Find the variable of a given name.\n * @param {Scope} initialScope The scope to start finding.\n * @param {string|Node} nameOrNode The variable name to find. If this is a Node object then it should be an Identifier node.\n * @returns {Variable|null} The found variable or null.\n */\nexport function findVariable(initialScope, nameOrNode) {\n let name = \"\"\n let scope = initialScope\n\n if (typeof nameOrNode === \"string\") {\n name = nameOrNode\n } else {\n name = nameOrNode.name\n scope = getInnermostScope(scope, nameOrNode)\n }\n\n while (scope != null) {\n const variable = scope.set.get(name)\n if (variable != null) {\n return variable\n }\n scope = scope.upper\n }\n\n return null\n}\n","/**\n * Negate the result of `this` calling.\n * @param {Token} token The token to check.\n * @returns {boolean} `true` if the result of `this(token)` is `false`.\n */\nfunction negate0(token) {\n return !this(token) //eslint-disable-line no-invalid-this\n}\n\n/**\n * Creates the negate function of the given function.\n * @param {function(Token):boolean} f - The function to negate.\n * @returns {function(Token):boolean} Negated function.\n */\nfunction negate(f) {\n return negate0.bind(f)\n}\n\n/**\n * Checks if the given token is an arrow token or not.\n * @param {Token} token - The token to check.\n * @returns {boolean} `true` if the token is an arrow token.\n */\nexport function isArrowToken(token) {\n return token.value === \"=>\" && token.type === \"Punctuator\"\n}\n\n/**\n * Checks if the given token is a comma token or not.\n * @param {Token} token - The token to check.\n * @returns {boolean} `true` if the token is a comma token.\n */\nexport function isCommaToken(token) {\n return token.value === \",\" && token.type === \"Punctuator\"\n}\n\n/**\n * Checks if the given token is a semicolon token or not.\n * @param {Token} token - The token to check.\n * @returns {boolean} `true` if the token is a semicolon token.\n */\nexport function isSemicolonToken(token) {\n return token.value === \";\" && token.type === \"Punctuator\"\n}\n\n/**\n * Checks if the given token is a colon token or not.\n * @param {Token} token - The token to check.\n * @returns {boolean} `true` if the token is a colon token.\n */\nexport function isColonToken(token) {\n return token.value === \":\" && token.type === \"Punctuator\"\n}\n\n/**\n * Checks if the given token is an opening parenthesis token or not.\n * @param {Token} token - The token to check.\n * @returns {boolean} `true` if the token is an opening parenthesis token.\n */\nexport function isOpeningParenToken(token) {\n return token.value === \"(\" && token.type === \"Punctuator\"\n}\n\n/**\n * Checks if the given token is a closing parenthesis token or not.\n * @param {Token} token - The token to check.\n * @returns {boolean} `true` if the token is a closing parenthesis token.\n */\nexport function isClosingParenToken(token) {\n return token.value === \")\" && token.type === \"Punctuator\"\n}\n\n/**\n * Checks if the given token is an opening square bracket token or not.\n * @param {Token} token - The token to check.\n * @returns {boolean} `true` if the token is an opening square bracket token.\n */\nexport function isOpeningBracketToken(token) {\n return token.value === \"[\" && token.type === \"Punctuator\"\n}\n\n/**\n * Checks if the given token is a closing square bracket token or not.\n * @param {Token} token - The token to check.\n * @returns {boolean} `true` if the token is a closing square bracket token.\n */\nexport function isClosingBracketToken(token) {\n return token.value === \"]\" && token.type === \"Punctuator\"\n}\n\n/**\n * Checks if the given token is an opening brace token or not.\n * @param {Token} token - The token to check.\n * @returns {boolean} `true` if the token is an opening brace token.\n */\nexport function isOpeningBraceToken(token) {\n return token.value === \"{\" && token.type === \"Punctuator\"\n}\n\n/**\n * Checks if the given token is a closing brace token or not.\n * @param {Token} token - The token to check.\n * @returns {boolean} `true` if the token is a closing brace token.\n */\nexport function isClosingBraceToken(token) {\n return token.value === \"}\" && token.type === \"Punctuator\"\n}\n\n/**\n * Checks if the given token is a comment token or not.\n * @param {Token} token - The token to check.\n * @returns {boolean} `true` if the token is a comment token.\n */\nexport function isCommentToken(token) {\n return (\n token.type === \"Line\" ||\n token.type === \"Block\" ||\n token.type === \"Shebang\"\n )\n}\n\nexport const isNotArrowToken = negate(isArrowToken)\nexport const isNotCommaToken = negate(isCommaToken)\nexport const isNotSemicolonToken = negate(isSemicolonToken)\nexport const isNotColonToken = negate(isColonToken)\nexport const isNotOpeningParenToken = negate(isOpeningParenToken)\nexport const isNotClosingParenToken = negate(isClosingParenToken)\nexport const isNotOpeningBracketToken = negate(isOpeningBracketToken)\nexport const isNotClosingBracketToken = negate(isClosingBracketToken)\nexport const isNotOpeningBraceToken = negate(isOpeningBraceToken)\nexport const isNotClosingBraceToken = negate(isClosingBraceToken)\nexport const isNotCommentToken = negate(isCommentToken)\n","import { isArrowToken, isOpeningParenToken } from \"./token-predicate\"\n\n/**\n * Get the `(` token of the given function node.\n * @param {Node} node - The function node to get.\n * @param {SourceCode} sourceCode - The source code object to get tokens.\n * @returns {Token} `(` token.\n */\nfunction getOpeningParenOfParams(node, sourceCode) {\n return node.id\n ? sourceCode.getTokenAfter(node.id, isOpeningParenToken)\n : sourceCode.getFirstToken(node, isOpeningParenToken)\n}\n\n/**\n * Get the location of the given function node for reporting.\n * @param {Node} node - The function node to get.\n * @param {SourceCode} sourceCode - The source code object to get tokens.\n * @returns {string} The location of the function node for reporting.\n */\nexport function getFunctionHeadLocation(node, sourceCode) {\n const parent = node.parent\n let start = null\n let end = null\n\n if (node.type === \"ArrowFunctionExpression\") {\n const arrowToken = sourceCode.getTokenBefore(node.body, isArrowToken)\n\n start = arrowToken.loc.start\n end = arrowToken.loc.end\n } else if (\n parent.type === \"Property\" ||\n parent.type === \"MethodDefinition\"\n ) {\n start = parent.loc.start\n end = getOpeningParenOfParams(node, sourceCode).loc.start\n } else {\n start = node.loc.start\n end = getOpeningParenOfParams(node, sourceCode).loc.start\n }\n\n return {\n start: Object.assign({}, start),\n end: Object.assign({}, end),\n }\n}\n","/* globals BigInt */\n\nimport { findVariable } from \"./find-variable\"\n\nconst builtinNames = Object.freeze(\n new Set([\n \"Array\",\n \"ArrayBuffer\",\n \"BigInt\",\n \"BigInt64Array\",\n \"BigUint64Array\",\n \"Boolean\",\n \"DataView\",\n \"Date\",\n \"decodeURI\",\n \"decodeURIComponent\",\n \"encodeURI\",\n \"encodeURIComponent\",\n \"escape\",\n \"Float32Array\",\n \"Float64Array\",\n \"Function\",\n \"Infinity\",\n \"Int16Array\",\n \"Int32Array\",\n \"Int8Array\",\n \"isFinite\",\n \"isNaN\",\n \"isPrototypeOf\",\n \"JSON\",\n \"Map\",\n \"Math\",\n \"NaN\",\n \"Number\",\n \"Object\",\n \"parseFloat\",\n \"parseInt\",\n \"Promise\",\n \"Proxy\",\n \"Reflect\",\n \"RegExp\",\n \"Set\",\n \"String\",\n \"Symbol\",\n \"Uint16Array\",\n \"Uint32Array\",\n \"Uint8Array\",\n \"Uint8ClampedArray\",\n \"undefined\",\n \"unescape\",\n \"WeakMap\",\n \"WeakSet\",\n ])\n)\nconst callAllowed = new Set(\n [\n Array.isArray,\n typeof BigInt === \"function\" ? BigInt : undefined,\n Boolean,\n Date,\n Date.parse,\n decodeURI,\n decodeURIComponent,\n encodeURI,\n encodeURIComponent,\n escape,\n isFinite,\n isNaN,\n isPrototypeOf,\n ...Object.getOwnPropertyNames(Math)\n .map(k => Math[k])\n .filter(f => typeof f === \"function\"),\n Number,\n Number.isFinite,\n Number.isNaN,\n Number.parseFloat,\n Number.parseInt,\n Object,\n Object.entries, //eslint-disable-line @mysticatea/node/no-unsupported-features/es-builtins\n Object.is,\n Object.isExtensible,\n Object.isFrozen,\n Object.isSealed,\n Object.keys,\n Object.values, //eslint-disable-line @mysticatea/node/no-unsupported-features/es-builtins\n parseFloat,\n parseInt,\n RegExp,\n String,\n String.fromCharCode,\n String.fromCodePoint,\n String.raw,\n Symbol,\n Symbol.for,\n Symbol.keyFor,\n unescape,\n ].filter(f => typeof f === \"function\")\n)\nconst callPassThrough = new Set([\n Object.freeze,\n Object.preventExtensions,\n Object.seal,\n])\n\n/**\n * Get the property descriptor.\n * @param {object} object The object to get.\n * @param {string|number|symbol} name The property name to get.\n */\nfunction getPropertyDescriptor(object, name) {\n let x = object\n while ((typeof x === \"object\" || typeof x === \"function\") && x !== null) {\n const d = Object.getOwnPropertyDescriptor(x, name)\n if (d) {\n return d\n }\n x = Object.getPrototypeOf(x)\n }\n return null\n}\n\n/**\n * Check if a property is getter or not.\n * @param {object} object The object to check.\n * @param {string|number|symbol} name The property name to check.\n */\nfunction isGetter(object, name) {\n const d = getPropertyDescriptor(object, name)\n return d != null && d.get != null\n}\n\n/**\n * Get the element values of a given node list.\n * @param {Node[]} nodeList The node list to get values.\n * @param {Scope|undefined} initialScope The initial scope to find variables.\n * @returns {any[]|null} The value list if all nodes are constant. Otherwise, null.\n */\nfunction getElementValues(nodeList, initialScope) {\n const valueList = []\n\n for (let i = 0; i < nodeList.length; ++i) {\n const elementNode = nodeList[i]\n\n if (elementNode == null) {\n valueList.length = i + 1\n } else if (elementNode.type === \"SpreadElement\") {\n const argument = getStaticValueR(elementNode.argument, initialScope)\n if (argument == null) {\n return null\n }\n valueList.push(...argument.value)\n } else {\n const element = getStaticValueR(elementNode, initialScope)\n if (element == null) {\n return null\n }\n valueList.push(element.value)\n }\n }\n\n return valueList\n}\n\nconst operations = Object.freeze({\n ArrayExpression(node, initialScope) {\n const elements = getElementValues(node.elements, initialScope)\n return elements != null ? { value: elements } : null\n },\n\n AssignmentExpression(node, initialScope) {\n if (node.operator === \"=\") {\n return getStaticValueR(node.right, initialScope)\n }\n return null\n },\n\n //eslint-disable-next-line complexity\n BinaryExpression(node, initialScope) {\n if (node.operator === \"in\" || node.operator === \"instanceof\") {\n // Not supported.\n return null\n }\n\n const left = getStaticValueR(node.left, initialScope)\n const right = getStaticValueR(node.right, initialScope)\n if (left != null && right != null) {\n switch (node.operator) {\n case \"==\":\n return { value: left.value == right.value } //eslint-disable-line eqeqeq\n case \"!=\":\n return { value: left.value != right.value } //eslint-disable-line eqeqeq\n case \"===\":\n return { value: left.value === right.value }\n case \"!==\":\n return { value: left.value !== right.value }\n case \"<\":\n return { value: left.value < right.value }\n case \"<=\":\n return { value: left.value <= right.value }\n case \">\":\n return { value: left.value > right.value }\n case \">=\":\n return { value: left.value >= right.value }\n case \"<<\":\n return { value: left.value << right.value }\n case \">>\":\n return { value: left.value >> right.value }\n case \">>>\":\n return { value: left.value >>> right.value }\n case \"+\":\n return { value: left.value + right.value }\n case \"-\":\n return { value: left.value - right.value }\n case \"*\":\n return { value: left.value * right.value }\n case \"/\":\n return { value: left.value / right.value }\n case \"%\":\n return { value: left.value % right.value }\n case \"**\":\n return { value: Math.pow(left.value, right.value) }\n case \"|\":\n return { value: left.value | right.value }\n case \"^\":\n return { value: left.value ^ right.value }\n case \"&\":\n return { value: left.value & right.value }\n\n // no default\n }\n }\n\n return null\n },\n\n CallExpression(node, initialScope) {\n const calleeNode = node.callee\n const args = getElementValues(node.arguments, initialScope)\n\n if (args != null) {\n if (calleeNode.type === \"MemberExpression\") {\n const object = getStaticValueR(calleeNode.object, initialScope)\n const property = calleeNode.computed\n ? getStaticValueR(calleeNode.property, initialScope)\n : { value: calleeNode.property.name }\n\n if (object != null && property != null) {\n const receiver = object.value\n const methodName = property.value\n if (callAllowed.has(receiver[methodName])) {\n return { value: receiver[methodName](...args) }\n }\n if (callPassThrough.has(receiver[methodName])) {\n return { value: args[0] }\n }\n }\n } else {\n const callee = getStaticValueR(calleeNode, initialScope)\n if (callee != null) {\n const func = callee.value\n if (callAllowed.has(func)) {\n return { value: func(...args) }\n }\n if (callPassThrough.has(func)) {\n return { value: args[0] }\n }\n }\n }\n }\n\n return null\n },\n\n ConditionalExpression(node, initialScope) {\n const test = getStaticValueR(node.test, initialScope)\n if (test != null) {\n return test.value\n ? getStaticValueR(node.consequent, initialScope)\n : getStaticValueR(node.alternate, initialScope)\n }\n return null\n },\n\n ExpressionStatement(node, initialScope) {\n return getStaticValueR(node.expression, initialScope)\n },\n\n Identifier(node, initialScope) {\n if (initialScope != null) {\n const variable = findVariable(initialScope, node)\n\n // Built-in globals.\n if (\n variable != null &&\n variable.defs.length === 0 &&\n builtinNames.has(variable.name) &&\n variable.name in global\n ) {\n return { value: global[variable.name] }\n }\n\n // Constants.\n if (variable != null && variable.defs.length === 1) {\n const def = variable.defs[0]\n if (\n def.parent &&\n def.parent.kind === \"const\" &&\n // TODO(mysticatea): don't support destructuring here.\n def.node.id.type === \"Identifier\"\n ) {\n return getStaticValueR(def.node.init, initialScope)\n }\n }\n }\n return null\n },\n\n Literal(node) {\n //istanbul ignore if : this is implementation-specific behavior.\n if ((node.regex != null || node.bigint != null) && node.value == null) {\n // It was a RegExp/BigInt literal, but Node.js didn't support it.\n return null\n }\n return { value: node.value }\n },\n\n LogicalExpression(node, initialScope) {\n const left = getStaticValueR(node.left, initialScope)\n if (left != null) {\n if (\n (node.operator === \"||\" && Boolean(left.value) === true) ||\n (node.operator === \"&&\" && Boolean(left.value) === false)\n ) {\n return left\n }\n\n const right = getStaticValueR(node.right, initialScope)\n if (right != null) {\n return right\n }\n }\n\n return null\n },\n\n MemberExpression(node, initialScope) {\n const object = getStaticValueR(node.object, initialScope)\n const property = node.computed\n ? getStaticValueR(node.property, initialScope)\n : { value: node.property.name }\n\n if (\n object != null &&\n property != null &&\n !isGetter(object.value, property.value)\n ) {\n return { value: object.value[property.value] }\n }\n return null\n },\n\n NewExpression(node, initialScope) {\n const callee = getStaticValueR(node.callee, initialScope)\n const args = getElementValues(node.arguments, initialScope)\n\n if (callee != null && args != null) {\n const Func = callee.value\n if (callAllowed.has(Func)) {\n return { value: new Func(...args) }\n }\n }\n\n return null\n },\n\n ObjectExpression(node, initialScope) {\n const object = {}\n\n for (const propertyNode of node.properties) {\n if (propertyNode.type === \"Property\") {\n if (propertyNode.kind !== \"init\") {\n return null\n }\n const key = propertyNode.computed\n ? getStaticValueR(propertyNode.key, initialScope)\n : { value: propertyNode.key.name }\n const value = getStaticValueR(propertyNode.value, initialScope)\n if (key == null || value == null) {\n return null\n }\n object[key.value] = value.value\n } else if (\n propertyNode.type === \"SpreadElement\" ||\n propertyNode.type === \"ExperimentalSpreadProperty\"\n ) {\n const argument = getStaticValueR(\n propertyNode.argument,\n initialScope\n )\n if (argument == null) {\n return null\n }\n Object.assign(object, argument.value)\n } else {\n return null\n }\n }\n\n return { value: object }\n },\n\n SequenceExpression(node, initialScope) {\n const last = node.expressions[node.expressions.length - 1]\n return getStaticValueR(last, initialScope)\n },\n\n TaggedTemplateExpression(node, initialScope) {\n const tag = getStaticValueR(node.tag, initialScope)\n const expressions = getElementValues(\n node.quasi.expressions,\n initialScope\n )\n\n if (tag != null && expressions != null) {\n const func = tag.value\n const strings = node.quasi.quasis.map(q => q.value.cooked)\n strings.raw = node.quasi.quasis.map(q => q.value.raw)\n\n if (func === String.raw) {\n return { value: func(strings, ...expressions) }\n }\n }\n\n return null\n },\n\n TemplateLiteral(node, initialScope) {\n const expressions = getElementValues(node.expressions, initialScope)\n if (expressions != null) {\n let value = node.quasis[0].value.cooked\n for (let i = 0; i < expressions.length; ++i) {\n value += expressions[i]\n value += node.quasis[i + 1].value.cooked\n }\n return { value }\n }\n return null\n },\n\n UnaryExpression(node, initialScope) {\n if (node.operator === \"delete\") {\n // Not supported.\n return null\n }\n if (node.operator === \"void\") {\n return { value: undefined }\n }\n\n const arg = getStaticValueR(node.argument, initialScope)\n if (arg != null) {\n switch (node.operator) {\n case \"-\":\n return { value: -arg.value }\n case \"+\":\n return { value: +arg.value } //eslint-disable-line no-implicit-coercion\n case \"!\":\n return { value: !arg.value }\n case \"~\":\n return { value: ~arg.value }\n case \"typeof\":\n return { value: typeof arg.value }\n\n // no default\n }\n }\n\n return null\n },\n})\n\n/**\n * Get the value of a given node if it's a static value.\n * @param {Node} node The node to get.\n * @param {Scope|undefined} initialScope The scope to start finding variable.\n * @returns {{value:any}|null} The static value of the node, or `null`.\n */\nfunction getStaticValueR(node, initialScope) {\n if (node != null && Object.hasOwnProperty.call(operations, node.type)) {\n return operations[node.type](node, initialScope)\n }\n return null\n}\n\n/**\n * Get the value of a given node if it's a static value.\n * @param {Node} node The node to get.\n * @param {Scope} [initialScope] The scope to start finding variable. Optional. If this scope was given, this tries to resolve identifier references which are in the given node as much as possible.\n * @returns {{value:any}|null} The static value of the node, or `null`.\n */\nexport function getStaticValue(node, initialScope = null) {\n try {\n return getStaticValueR(node, initialScope)\n } catch (_error) {\n return null\n }\n}\n","import { getStaticValue } from \"./get-static-value\"\n\n/**\n * Get the value of a given node if it's a literal or a template literal.\n * @param {Node} node The node to get.\n * @param {Scope} [initialScope] The scope to start finding variable. Optional. If the node is an Identifier node and this scope was given, this checks the variable of the identifier, and returns the value of it if the variable is a constant.\n * @returns {string|null} The value of the node, or `null`.\n */\nexport function getStringIfConstant(node, initialScope = null) {\n // Handle the literals that the platform doesn't support natively.\n if (node && node.type === \"Literal\" && node.value === null) {\n if (node.regex) {\n return `/${node.regex.pattern}/${node.regex.flags}`\n }\n if (node.bigint) {\n return node.bigint\n }\n }\n\n const evaluated = getStaticValue(node, initialScope)\n return evaluated && String(evaluated.value)\n}\n","import { getStringIfConstant } from \"./get-string-if-constant\"\n\n/**\n * Get the property name from a MemberExpression node or a Property node.\n * @param {Node} node The node to get.\n * @param {Scope} [initialScope] The scope to start finding variable. Optional. If the node is a computed property node and this scope was given, this checks the computed property name by the `getStringIfConstant` function with the scope, and returns the value of it.\n * @returns {string|null} The property name of the node.\n */\nexport function getPropertyName(node, initialScope) {\n switch (node.type) {\n case \"MemberExpression\":\n if (node.computed) {\n return getStringIfConstant(node.property, initialScope)\n }\n return node.property.name\n\n case \"Property\":\n case \"MethodDefinition\":\n if (node.computed) {\n return getStringIfConstant(node.key, initialScope)\n }\n if (node.key.type === \"Literal\") {\n return String(node.key.value)\n }\n return node.key.name\n\n // no default\n }\n\n return null\n}\n","import { getPropertyName } from \"./get-property-name\"\n\n/**\n * Get the name and kind of the given function node.\n * @param {ASTNode} node - The function node to get.\n * @returns {string} The name and kind of the function node.\n */\nexport function getFunctionNameWithKind(node) {\n const parent = node.parent\n const tokens = []\n\n if (parent.type === \"MethodDefinition\" && parent.static) {\n tokens.push(\"static\")\n }\n if (node.async) {\n tokens.push(\"async\")\n }\n if (node.generator) {\n tokens.push(\"generator\")\n }\n\n if (node.type === \"ArrowFunctionExpression\") {\n tokens.push(\"arrow\", \"function\")\n } else if (\n parent.type === \"Property\" ||\n parent.type === \"MethodDefinition\"\n ) {\n if (parent.kind === \"constructor\") {\n return \"constructor\"\n }\n if (parent.kind === \"get\") {\n tokens.push(\"getter\")\n } else if (parent.kind === \"set\") {\n tokens.push(\"setter\")\n } else {\n tokens.push(\"method\")\n }\n } else {\n tokens.push(\"function\")\n }\n\n if (node.id) {\n tokens.push(`'${node.id.name}'`)\n } else {\n const name = getPropertyName(parent)\n\n if (name) {\n tokens.push(`'${name}'`)\n }\n }\n\n return tokens.join(\" \")\n}\n","import evk from \"eslint-visitor-keys\"\n\nconst typeConversionBinaryOps = Object.freeze(\n new Set([\n \"==\",\n \"!=\",\n \"<\",\n \"<=\",\n \">\",\n \">=\",\n \"<<\",\n \">>\",\n \">>>\",\n \"+\",\n \"-\",\n \"*\",\n \"/\",\n \"%\",\n \"|\",\n \"^\",\n \"&\",\n \"in\",\n ])\n)\nconst typeConversionUnaryOps = Object.freeze(new Set([\"-\", \"+\", \"!\", \"~\"]))\nconst visitor = Object.freeze(\n Object.assign(Object.create(null), {\n $visit(node, options, visitorKeys) {\n const { type } = node\n\n if (typeof this[type] === \"function\") {\n return this[type](node, options, visitorKeys)\n }\n\n return this.$visitChildren(node, options, visitorKeys)\n },\n\n $visitChildren(node, options, visitorKeys) {\n const { type } = node\n\n for (const key of visitorKeys[type] || evk.getKeys(node)) {\n const value = node[key]\n\n if (Array.isArray(value)) {\n for (const element of value) {\n if (\n element &&\n this.$visit(element, options, visitorKeys)\n ) {\n return true\n }\n }\n } else if (value && this.$visit(value, options, visitorKeys)) {\n return true\n }\n }\n\n return false\n },\n\n ArrowFunctionExpression() {\n return false\n },\n AssignmentExpression() {\n return true\n },\n AwaitExpression() {\n return true\n },\n BinaryExpression(node, options, visitorKeys) {\n if (\n options.considerImplicitTypeConversion &&\n typeConversionBinaryOps.has(node.operator) &&\n (node.left.type !== \"Literal\" || node.right.type !== \"Literal\")\n ) {\n return true\n }\n return this.$visitChildren(node, options, visitorKeys)\n },\n CallExpression() {\n return true\n },\n FunctionExpression() {\n return false\n },\n ImportExpression() {\n return true\n },\n MemberExpression(node, options, visitorKeys) {\n if (options.considerGetters) {\n return true\n }\n if (\n options.considerImplicitTypeConversion &&\n node.computed &&\n node.property.type !== \"Literal\"\n ) {\n return true\n }\n return this.$visitChildren(node, options, visitorKeys)\n },\n MethodDefinition(node, options, visitorKeys) {\n if (\n options.considerImplicitTypeConversion &&\n node.computed &&\n node.key.type !== \"Literal\"\n ) {\n return true\n }\n return this.$visitChildren(node, options, visitorKeys)\n },\n NewExpression() {\n return true\n },\n Property(node, options, visitorKeys) {\n if (\n options.considerImplicitTypeConversion &&\n node.computed &&\n node.key.type !== \"Literal\"\n ) {\n return true\n }\n return this.$visitChildren(node, options, visitorKeys)\n },\n UnaryExpression(node, options, visitorKeys) {\n if (node.operator === \"delete\") {\n return true\n }\n if (\n options.considerImplicitTypeConversion &&\n typeConversionUnaryOps.has(node.operator) &&\n node.argument.type !== \"Literal\"\n ) {\n return true\n }\n return this.$visitChildren(node, options, visitorKeys)\n },\n UpdateExpression() {\n return true\n },\n YieldExpression() {\n return true\n },\n })\n)\n\n/**\n * Check whether a given node has any side effect or not.\n * @param {Node} node The node to get.\n * @param {SourceCode} sourceCode The source code object.\n * @param {object} [options] The option object.\n * @param {boolean} [options.considerGetters=false] If `true` then it considers member accesses as the node which has side effects.\n * @param {boolean} [options.considerImplicitTypeConversion=false] If `true` then it considers implicit type conversion as the node which has side effects.\n * @param {object} [options.visitorKeys=evk.KEYS] The keys to traverse nodes. Use `context.getSourceCode().visitorKeys`.\n * @returns {boolean} `true` if the node has a certain side effect.\n */\nexport function hasSideEffect(\n node,\n sourceCode,\n { considerGetters = false, considerImplicitTypeConversion = false } = {}\n) {\n return visitor.$visit(\n node,\n { considerGetters, considerImplicitTypeConversion },\n sourceCode.visitorKeys || evk.KEYS\n )\n}\n","import { isClosingParenToken, isOpeningParenToken } from \"./token-predicate\"\n\n/**\n * Get the left parenthesis of the parent node syntax if it exists.\n * E.g., `if (a) {}` then the `(`.\n * @param {Node} node The AST node to check.\n * @param {SourceCode} sourceCode The source code object to get tokens.\n * @returns {Token|null} The left parenthesis of the parent node syntax\n */\nfunction getParentSyntaxParen(node, sourceCode) {\n const parent = node.parent\n\n switch (parent.type) {\n case \"CallExpression\":\n case \"NewExpression\":\n if (parent.arguments.length === 1 && parent.arguments[0] === node) {\n return sourceCode.getTokenAfter(\n parent.callee,\n isOpeningParenToken\n )\n }\n return null\n\n case \"DoWhileStatement\":\n if (parent.test === node) {\n return sourceCode.getTokenAfter(\n parent.body,\n isOpeningParenToken\n )\n }\n return null\n\n case \"IfStatement\":\n case \"WhileStatement\":\n if (parent.test === node) {\n return sourceCode.getFirstToken(parent, 1)\n }\n return null\n\n case \"ImportExpression\":\n if (parent.source === node) {\n return sourceCode.getFirstToken(parent, 1)\n }\n return null\n\n case \"SwitchStatement\":\n if (parent.discriminant === node) {\n return sourceCode.getFirstToken(parent, 1)\n }\n return null\n\n case \"WithStatement\":\n if (parent.object === node) {\n return sourceCode.getFirstToken(parent, 1)\n }\n return null\n\n default:\n return null\n }\n}\n\n/**\n * Check whether a given node is parenthesized or not.\n * @param {number} times The number of parantheses.\n * @param {Node} node The AST node to check.\n * @param {SourceCode} sourceCode The source code object to get tokens.\n * @returns {boolean} `true` if the node is parenthesized the given times.\n */\n/**\n * Check whether a given node is parenthesized or not.\n * @param {Node} node The AST node to check.\n * @param {SourceCode} sourceCode The source code object to get tokens.\n * @returns {boolean} `true` if the node is parenthesized.\n */\nexport function isParenthesized(\n timesOrNode,\n nodeOrSourceCode,\n optionalSourceCode\n) {\n let times, node, sourceCode, maybeLeftParen, maybeRightParen\n if (typeof timesOrNode === \"number\") {\n times = timesOrNode | 0\n node = nodeOrSourceCode\n sourceCode = optionalSourceCode\n if (!(times >= 1)) {\n throw new TypeError(\"'times' should be a positive integer.\")\n }\n } else {\n times = 1\n node = timesOrNode\n sourceCode = nodeOrSourceCode\n }\n\n if (node == null) {\n return false\n }\n\n maybeLeftParen = maybeRightParen = node\n do {\n maybeLeftParen = sourceCode.getTokenBefore(maybeLeftParen)\n maybeRightParen = sourceCode.getTokenAfter(maybeRightParen)\n } while (\n maybeLeftParen != null &&\n maybeRightParen != null &&\n isOpeningParenToken(maybeLeftParen) &&\n isClosingParenToken(maybeRightParen) &&\n // Avoid false positive such as `if (a) {}`\n maybeLeftParen !== getParentSyntaxParen(node, sourceCode) &&\n --times > 0\n )\n\n return times === 0\n}\n","/**\n * @author Toru Nagashima \n * See LICENSE file in root directory for full license.\n */\n\nconst placeholder = /\\$(?:[$&`']|[1-9][0-9]?)/gu\n\n/** @type {WeakMap} */\nconst internal = new WeakMap()\n\n/**\n * Check whether a given character is escaped or not.\n * @param {string} str The string to check.\n * @param {number} index The location of the character to check.\n * @returns {boolean} `true` if the character is escaped.\n */\nfunction isEscaped(str, index) {\n let escaped = false\n for (let i = index - 1; i >= 0 && str.charCodeAt(i) === 0x5c; --i) {\n escaped = !escaped\n }\n return escaped\n}\n\n/**\n * Replace a given string by a given matcher.\n * @param {PatternMatcher} matcher The pattern matcher.\n * @param {string} str The string to be replaced.\n * @param {string} replacement The new substring to replace each matched part.\n * @returns {string} The replaced string.\n */\nfunction replaceS(matcher, str, replacement) {\n const chunks = []\n let index = 0\n\n /** @type {RegExpExecArray} */\n let match = null\n\n /**\n * @param {string} key The placeholder.\n * @returns {string} The replaced string.\n */\n function replacer(key) {\n switch (key) {\n case \"$$\":\n return \"$\"\n case \"$&\":\n return match[0]\n case \"$`\":\n return str.slice(0, match.index)\n case \"$'\":\n return str.slice(match.index + match[0].length)\n default: {\n const i = key.slice(1)\n if (i in match) {\n return match[i]\n }\n return key\n }\n }\n }\n\n for (match of matcher.execAll(str)) {\n chunks.push(str.slice(index, match.index))\n chunks.push(replacement.replace(placeholder, replacer))\n index = match.index + match[0].length\n }\n chunks.push(str.slice(index))\n\n return chunks.join(\"\")\n}\n\n/**\n * Replace a given string by a given matcher.\n * @param {PatternMatcher} matcher The pattern matcher.\n * @param {string} str The string to be replaced.\n * @param {(...strs[])=>string} replace The function to replace each matched part.\n * @returns {string} The replaced string.\n */\nfunction replaceF(matcher, str, replace) {\n const chunks = []\n let index = 0\n\n for (const match of matcher.execAll(str)) {\n chunks.push(str.slice(index, match.index))\n chunks.push(String(replace(...match, match.index, match.input)))\n index = match.index + match[0].length\n }\n chunks.push(str.slice(index))\n\n return chunks.join(\"\")\n}\n\n/**\n * The class to find patterns as considering escape sequences.\n */\nexport class PatternMatcher {\n /**\n * Initialize this matcher.\n * @param {RegExp} pattern The pattern to match.\n * @param {{escaped:boolean}} options The options.\n */\n constructor(pattern, { escaped = false } = {}) {\n if (!(pattern instanceof RegExp)) {\n throw new TypeError(\"'pattern' should be a RegExp instance.\")\n }\n if (!pattern.flags.includes(\"g\")) {\n throw new Error(\"'pattern' should contains 'g' flag.\")\n }\n\n internal.set(this, {\n pattern: new RegExp(pattern.source, pattern.flags),\n escaped: Boolean(escaped),\n })\n }\n\n /**\n * Find the pattern in a given string.\n * @param {string} str The string to find.\n * @returns {IterableIterator} The iterator which iterate the matched information.\n */\n *execAll(str) {\n const { pattern, escaped } = internal.get(this)\n let match = null\n let lastIndex = 0\n\n pattern.lastIndex = 0\n while ((match = pattern.exec(str)) != null) {\n if (escaped || !isEscaped(str, match.index)) {\n lastIndex = pattern.lastIndex\n yield match\n pattern.lastIndex = lastIndex\n }\n }\n }\n\n /**\n * Check whether the pattern is found in a given string.\n * @param {string} str The string to check.\n * @returns {boolean} `true` if the pattern was found in the string.\n */\n test(str) {\n const it = this.execAll(str)\n const ret = it.next()\n return !ret.done\n }\n\n /**\n * Replace a given string.\n * @param {string} str The string to be replaced.\n * @param {(string|((...strs:string[])=>string))} replacer The string or function to replace. This is the same as the 2nd argument of `String.prototype.replace`.\n * @returns {string} The replaced string.\n */\n [Symbol.replace](str, replacer) {\n return typeof replacer === \"function\"\n ? replaceF(this, String(str), replacer)\n : replaceS(this, String(str), String(replacer))\n }\n}\n","import { findVariable } from \"./find-variable\"\nimport { getPropertyName } from \"./get-property-name\"\nimport { getStringIfConstant } from \"./get-string-if-constant\"\n\nconst SENTINEL_TYPE = /^(?:.+?Statement|.+?Declaration|(?:Array|ArrowFunction|Assignment|Call|Class|Function|Member|New|Object)Expression|AssignmentPattern|Program|VariableDeclarator)$/u\nconst IMPORT_TYPE = /^(?:Import|Export(?:All|Default|Named))Declaration$/u\nconst has = Function.call.bind(Object.hasOwnProperty)\n\nexport const READ = Symbol(\"read\")\nexport const CALL = Symbol(\"call\")\nexport const CONSTRUCT = Symbol(\"construct\")\nexport const ESM = Symbol(\"esm\")\n\nconst requireCall = { require: { [CALL]: true } }\n\n/**\n * Check whether a given variable is modified or not.\n * @param {Variable} variable The variable to check.\n * @returns {boolean} `true` if the variable is modified.\n */\nfunction isModifiedGlobal(variable) {\n return (\n variable == null ||\n variable.defs.length !== 0 ||\n variable.references.some(r => r.isWrite())\n )\n}\n\n/**\n * The reference tracker.\n */\nexport class ReferenceTracker {\n /**\n * Initialize this tracker.\n * @param {Scope} globalScope The global scope.\n * @param {object} [options] The options.\n * @param {\"legacy\"|\"strict\"} [options.mode=\"strict\"] The mode to determine the ImportDeclaration's behavior for CJS modules.\n * @param {string[]} [options.globalObjectNames=[\"global\",\"self\",\"window\"]] The variable names for Global Object.\n */\n constructor(\n globalScope,\n {\n mode = \"strict\",\n globalObjectNames = [\"global\", \"self\", \"window\"],\n } = {}\n ) {\n this.variableStack = []\n this.globalScope = globalScope\n this.mode = mode\n this.globalObjectNames = globalObjectNames.slice(0)\n }\n\n /**\n * Iterate the references of global variables.\n * @param {object} traceMap The trace map.\n * @returns {IterableIterator<{node:Node,path:string[],type:symbol,info:any}>} The iterator to iterate references.\n */\n *iterateGlobalReferences(traceMap) {\n for (const key of Object.keys(traceMap)) {\n const nextTraceMap = traceMap[key]\n const path = [key]\n const variable = this.globalScope.set.get(key)\n\n if (isModifiedGlobal(variable)) {\n continue\n }\n\n yield* this._iterateVariableReferences(\n variable,\n path,\n nextTraceMap,\n true\n )\n }\n\n for (const key of this.globalObjectNames) {\n const path = []\n const variable = this.globalScope.set.get(key)\n\n if (isModifiedGlobal(variable)) {\n continue\n }\n\n yield* this._iterateVariableReferences(\n variable,\n path,\n traceMap,\n false\n )\n }\n }\n\n /**\n * Iterate the references of CommonJS modules.\n * @param {object} traceMap The trace map.\n * @returns {IterableIterator<{node:Node,path:string[],type:symbol,info:any}>} The iterator to iterate references.\n */\n *iterateCjsReferences(traceMap) {\n for (const { node } of this.iterateGlobalReferences(requireCall)) {\n const key = getStringIfConstant(node.arguments[0])\n if (key == null || !has(traceMap, key)) {\n continue\n }\n\n const nextTraceMap = traceMap[key]\n const path = [key]\n\n if (nextTraceMap[READ]) {\n yield {\n node,\n path,\n type: READ,\n info: nextTraceMap[READ],\n }\n }\n yield* this._iteratePropertyReferences(node, path, nextTraceMap)\n }\n }\n\n /**\n * Iterate the references of ES modules.\n * @param {object} traceMap The trace map.\n * @returns {IterableIterator<{node:Node,path:string[],type:symbol,info:any}>} The iterator to iterate references.\n */\n *iterateEsmReferences(traceMap) {\n const programNode = this.globalScope.block\n\n for (const node of programNode.body) {\n if (!IMPORT_TYPE.test(node.type) || node.source == null) {\n continue\n }\n const moduleId = node.source.value\n\n if (!has(traceMap, moduleId)) {\n continue\n }\n const nextTraceMap = traceMap[moduleId]\n const path = [moduleId]\n\n if (nextTraceMap[READ]) {\n yield { node, path, type: READ, info: nextTraceMap[READ] }\n }\n\n if (node.type === \"ExportAllDeclaration\") {\n for (const key of Object.keys(nextTraceMap)) {\n const exportTraceMap = nextTraceMap[key]\n if (exportTraceMap[READ]) {\n yield {\n node,\n path: path.concat(key),\n type: READ,\n info: exportTraceMap[READ],\n }\n }\n }\n } else {\n for (const specifier of node.specifiers) {\n const esm = has(nextTraceMap, ESM)\n const it = this._iterateImportReferences(\n specifier,\n path,\n esm\n ? nextTraceMap\n : this.mode === \"legacy\"\n ? Object.assign(\n { default: nextTraceMap },\n nextTraceMap\n )\n : { default: nextTraceMap }\n )\n\n if (esm) {\n yield* it\n } else {\n for (const report of it) {\n report.path = report.path.filter(exceptDefault)\n if (\n report.path.length >= 2 ||\n report.type !== READ\n ) {\n yield report\n }\n }\n }\n }\n }\n }\n }\n\n /**\n * Iterate the references for a given variable.\n * @param {Variable} variable The variable to iterate that references.\n * @param {string[]} path The current path.\n * @param {object} traceMap The trace map.\n * @param {boolean} shouldReport = The flag to report those references.\n * @returns {IterableIterator<{node:Node,path:string[],type:symbol,info:any}>} The iterator to iterate references.\n */\n *_iterateVariableReferences(variable, path, traceMap, shouldReport) {\n if (this.variableStack.includes(variable)) {\n return\n }\n this.variableStack.push(variable)\n try {\n for (const reference of variable.references) {\n if (!reference.isRead()) {\n continue\n }\n const node = reference.identifier\n\n if (shouldReport && traceMap[READ]) {\n yield { node, path, type: READ, info: traceMap[READ] }\n }\n yield* this._iteratePropertyReferences(node, path, traceMap)\n }\n } finally {\n this.variableStack.pop()\n }\n }\n\n /**\n * Iterate the references for a given AST node.\n * @param rootNode The AST node to iterate references.\n * @param {string[]} path The current path.\n * @param {object} traceMap The trace map.\n * @returns {IterableIterator<{node:Node,path:string[],type:symbol,info:any}>} The iterator to iterate references.\n */\n //eslint-disable-next-line complexity\n *_iteratePropertyReferences(rootNode, path, traceMap) {\n let node = rootNode\n while (!SENTINEL_TYPE.test(node.parent.type)) {\n node = node.parent\n }\n\n const parent = node.parent\n if (parent.type === \"MemberExpression\") {\n if (parent.object === node) {\n const key = getPropertyName(parent)\n if (key == null || !has(traceMap, key)) {\n return\n }\n\n path = path.concat(key) //eslint-disable-line no-param-reassign\n const nextTraceMap = traceMap[key]\n if (nextTraceMap[READ]) {\n yield {\n node: parent,\n path,\n type: READ,\n info: nextTraceMap[READ],\n }\n }\n yield* this._iteratePropertyReferences(\n parent,\n path,\n nextTraceMap\n )\n }\n return\n }\n if (parent.type === \"CallExpression\") {\n if (parent.callee === node && traceMap[CALL]) {\n yield { node: parent, path, type: CALL, info: traceMap[CALL] }\n }\n return\n }\n if (parent.type === \"NewExpression\") {\n if (parent.callee === node && traceMap[CONSTRUCT]) {\n yield {\n node: parent,\n path,\n type: CONSTRUCT,\n info: traceMap[CONSTRUCT],\n }\n }\n return\n }\n if (parent.type === \"AssignmentExpression\") {\n if (parent.right === node) {\n yield* this._iterateLhsReferences(parent.left, path, traceMap)\n yield* this._iteratePropertyReferences(parent, path, traceMap)\n }\n return\n }\n if (parent.type === \"AssignmentPattern\") {\n if (parent.right === node) {\n yield* this._iterateLhsReferences(parent.left, path, traceMap)\n }\n return\n }\n if (parent.type === \"VariableDeclarator\") {\n if (parent.init === node) {\n yield* this._iterateLhsReferences(parent.id, path, traceMap)\n }\n }\n }\n\n /**\n * Iterate the references for a given Pattern node.\n * @param {Node} patternNode The Pattern node to iterate references.\n * @param {string[]} path The current path.\n * @param {object} traceMap The trace map.\n * @returns {IterableIterator<{node:Node,path:string[],type:symbol,info:any}>} The iterator to iterate references.\n */\n *_iterateLhsReferences(patternNode, path, traceMap) {\n if (patternNode.type === \"Identifier\") {\n const variable = findVariable(this.globalScope, patternNode)\n if (variable != null) {\n yield* this._iterateVariableReferences(\n variable,\n path,\n traceMap,\n false\n )\n }\n return\n }\n if (patternNode.type === \"ObjectPattern\") {\n for (const property of patternNode.properties) {\n const key = getPropertyName(property)\n\n if (key == null || !has(traceMap, key)) {\n continue\n }\n\n const nextPath = path.concat(key)\n const nextTraceMap = traceMap[key]\n if (nextTraceMap[READ]) {\n yield {\n node: property,\n path: nextPath,\n type: READ,\n info: nextTraceMap[READ],\n }\n }\n yield* this._iterateLhsReferences(\n property.value,\n nextPath,\n nextTraceMap\n )\n }\n return\n }\n if (patternNode.type === \"AssignmentPattern\") {\n yield* this._iterateLhsReferences(patternNode.left, path, traceMap)\n }\n }\n\n /**\n * Iterate the references for a given ModuleSpecifier node.\n * @param {Node} specifierNode The ModuleSpecifier node to iterate references.\n * @param {string[]} path The current path.\n * @param {object} traceMap The trace map.\n * @returns {IterableIterator<{node:Node,path:string[],type:symbol,info:any}>} The iterator to iterate references.\n */\n *_iterateImportReferences(specifierNode, path, traceMap) {\n const type = specifierNode.type\n\n if (type === \"ImportSpecifier\" || type === \"ImportDefaultSpecifier\") {\n const key =\n type === \"ImportDefaultSpecifier\"\n ? \"default\"\n : specifierNode.imported.name\n if (!has(traceMap, key)) {\n return\n }\n\n path = path.concat(key) //eslint-disable-line no-param-reassign\n const nextTraceMap = traceMap[key]\n if (nextTraceMap[READ]) {\n yield {\n node: specifierNode,\n path,\n type: READ,\n info: nextTraceMap[READ],\n }\n }\n yield* this._iterateVariableReferences(\n findVariable(this.globalScope, specifierNode.local),\n path,\n nextTraceMap,\n false\n )\n\n return\n }\n\n if (type === \"ImportNamespaceSpecifier\") {\n yield* this._iterateVariableReferences(\n findVariable(this.globalScope, specifierNode.local),\n path,\n traceMap,\n false\n )\n return\n }\n\n if (type === \"ExportSpecifier\") {\n const key = specifierNode.local.name\n if (!has(traceMap, key)) {\n return\n }\n\n path = path.concat(key) //eslint-disable-line no-param-reassign\n const nextTraceMap = traceMap[key]\n if (nextTraceMap[READ]) {\n yield {\n node: specifierNode,\n path,\n type: READ,\n info: nextTraceMap[READ],\n }\n }\n }\n }\n}\n\nReferenceTracker.READ = READ\nReferenceTracker.CALL = CALL\nReferenceTracker.CONSTRUCT = CONSTRUCT\nReferenceTracker.ESM = ESM\n\n/**\n * This is a predicate function for Array#filter.\n * @param {string} name A name part.\n * @param {number} index The index of the name.\n * @returns {boolean} `false` if it's default.\n */\nfunction exceptDefault(name, index) {\n return !(index === 1 && name === \"default\")\n}\n","import { findVariable } from \"./find-variable\"\nimport { getFunctionHeadLocation } from \"./get-function-head-location\"\nimport { getFunctionNameWithKind } from \"./get-function-name-with-kind\"\nimport { getInnermostScope } from \"./get-innermost-scope\"\nimport { getPropertyName } from \"./get-property-name\"\nimport { getStaticValue } from \"./get-static-value\"\nimport { getStringIfConstant } from \"./get-string-if-constant\"\nimport { hasSideEffect } from \"./has-side-effect\"\nimport { isParenthesized } from \"./is-parenthesized\"\nimport { PatternMatcher } from \"./pattern-matcher\"\nimport {\n CALL,\n CONSTRUCT,\n ESM,\n READ,\n ReferenceTracker,\n} from \"./reference-tracker\"\nimport {\n isArrowToken,\n isClosingBraceToken,\n isClosingBracketToken,\n isClosingParenToken,\n isColonToken,\n isCommaToken,\n isCommentToken,\n isNotArrowToken,\n isNotClosingBraceToken,\n isNotClosingBracketToken,\n isNotClosingParenToken,\n isNotColonToken,\n isNotCommaToken,\n isNotCommentToken,\n isNotOpeningBraceToken,\n isNotOpeningBracketToken,\n isNotOpeningParenToken,\n isNotSemicolonToken,\n isOpeningBraceToken,\n isOpeningBracketToken,\n isOpeningParenToken,\n isSemicolonToken,\n} from \"./token-predicate\"\n\nexport default {\n CALL,\n CONSTRUCT,\n ESM,\n findVariable,\n getFunctionHeadLocation,\n getFunctionNameWithKind,\n getInnermostScope,\n getPropertyName,\n getStaticValue,\n getStringIfConstant,\n hasSideEffect,\n isArrowToken,\n isClosingBraceToken,\n isClosingBracketToken,\n isClosingParenToken,\n isColonToken,\n isCommaToken,\n isCommentToken,\n isNotArrowToken,\n isNotClosingBraceToken,\n isNotClosingBracketToken,\n isNotClosingParenToken,\n isNotColonToken,\n isNotCommaToken,\n isNotCommentToken,\n isNotOpeningBraceToken,\n isNotOpeningBracketToken,\n isNotOpeningParenToken,\n isNotSemicolonToken,\n isOpeningBraceToken,\n isOpeningBracketToken,\n isOpeningParenToken,\n isParenthesized,\n isSemicolonToken,\n PatternMatcher,\n READ,\n ReferenceTracker,\n}\nexport {\n CALL,\n CONSTRUCT,\n ESM,\n findVariable,\n getFunctionHeadLocation,\n getFunctionNameWithKind,\n getInnermostScope,\n getPropertyName,\n getStaticValue,\n getStringIfConstant,\n hasSideEffect,\n isArrowToken,\n isClosingBraceToken,\n isClosingBracketToken,\n isClosingParenToken,\n isColonToken,\n isCommaToken,\n isCommentToken,\n isNotArrowToken,\n isNotClosingBraceToken,\n isNotClosingBracketToken,\n isNotClosingParenToken,\n isNotColonToken,\n isNotCommaToken,\n isNotCommentToken,\n isNotOpeningBraceToken,\n isNotOpeningBracketToken,\n isNotOpeningParenToken,\n isNotSemicolonToken,\n isOpeningBraceToken,\n isOpeningBracketToken,\n isOpeningParenToken,\n isParenthesized,\n isSemicolonToken,\n PatternMatcher,\n READ,\n ReferenceTracker,\n}\n"],"names":[],"mappings":";;;AAAA;;;;;;AAMA,AAAO,SAAS,iBAAiB,CAAC,YAAY,EAAE,IAAI,EAAE;IAClD,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,EAAC;;IAE9B,IAAI,KAAK,GAAG,aAAY;IACxB,IAAI,KAAK,GAAG,MAAK;IACjB,GAAG;QACC,KAAK,GAAG,MAAK;QACb,KAAK,MAAM,UAAU,IAAI,KAAK,CAAC,WAAW,EAAE;YACxC,MAAM,KAAK,GAAG,UAAU,CAAC,KAAK,CAAC,MAAK;;YAEpC,IAAI,KAAK,CAAC,CAAC,CAAC,IAAI,QAAQ,IAAI,QAAQ,GAAG,KAAK,CAAC,CAAC,CAAC,EAAE;gBAC7C,KAAK,GAAG,WAAU;gBAClB,KAAK,GAAG,KAAI;gBACZ,KAAK;aACR;SACJ;KACJ,QAAQ,KAAK,CAAC;;IAEf,OAAO,KAAK;CACf;;ACvBD;;;;;;AAMA,AAAO,SAAS,YAAY,CAAC,YAAY,EAAE,UAAU,EAAE;IACnD,IAAI,IAAI,GAAG,GAAE;IACb,IAAI,KAAK,GAAG,aAAY;;IAExB,IAAI,OAAO,UAAU,KAAK,QAAQ,EAAE;QAChC,IAAI,GAAG,WAAU;KACpB,MAAM;QACH,IAAI,GAAG,UAAU,CAAC,KAAI;QACtB,KAAK,GAAG,iBAAiB,CAAC,KAAK,EAAE,UAAU,EAAC;KAC/C;;IAED,OAAO,KAAK,IAAI,IAAI,EAAE;QAClB,MAAM,QAAQ,GAAG,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,EAAC;QACpC,IAAI,QAAQ,IAAI,IAAI,EAAE;YAClB,OAAO,QAAQ;SAClB;QACD,KAAK,GAAG,KAAK,CAAC,MAAK;KACtB;;I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b/node_modules/eslint-utils/package.json index 5de8be47c8dcf9b81795da9875e5d39afa4ed39b..0c46bb4c9409e8d385a6a7626014355fe86e92ff 100644 --- a/node_modules/eslint-utils/package.json +++ b/node_modules/eslint-utils/package.json @@ -1,27 +1,27 @@ { - "_from": "eslint-utils@^1.3.1", - "_id": "eslint-utils@1.4.0", + "_from": "eslint-utils@1.4.2", + "_id": "eslint-utils@1.4.2", "_inBundle": false, - "_integrity": "sha512-7ehnzPaP5IIEh1r1tkjuIrxqhNkzUJa9z3R92tLJdZIVdWaczEhr3EbhGtsMrVxi1KeR8qA7Off6SWc5WNQqyQ==", + "_integrity": "sha512-eAZS2sEUMlIeCjBeubdj45dmBHQwPHWyBcT1VSYB7o9x9WRRqKxyUoiXlRjyAwzN7YEzHJlYg0NmzDRWx6GP4Q==", "_location": "/eslint-utils", "_phantomChildren": {}, "_requested": { - "type": "range", + "type": "version", "registry": true, - "raw": "eslint-utils@^1.3.1", + "raw": "eslint-utils@1.4.2", "name": "eslint-utils", "escapedName": "eslint-utils", - "rawSpec": "^1.3.1", + "rawSpec": "1.4.2", "saveSpec": null, - "fetchSpec": "^1.3.1" + "fetchSpec": "1.4.2" }, "_requiredBy": [ "/eslint" ], - "_resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.4.0.tgz", - "_shasum": "e2c3c8dba768425f897cf0f9e51fe2e241485d4c", - "_spec": "eslint-utils@^1.3.1", - "_where": "/home/Earth/wuruchi/Documents/ReactProj/react-api/node_modules/eslint", + "_resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.4.2.tgz", + "_shasum": "166a5180ef6ab7eb462f162fd0e6f2463d7309ab", + "_spec": "eslint-utils@1.4.2", + "_where": "/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/node_modules/eslint", "author": { "name": "Toru Nagashima" }, @@ -85,5 +85,5 @@ "watch": "warun \"{src,test}/**/*.js\" -- nyc --reporter lcov mocha --reporter dot \"test/*.js\"" }, "sideEffects": false, - "version": "1.4.0" + "version": "1.4.2" } diff --git a/node_modules/propagating-hammerjs/.npmignore b/node_modules/propagating-hammerjs/.npmignore deleted file mode 100644 index 992316aecdf6dafe38bd37cdf991a92d1ae36814..0000000000000000000000000000000000000000 --- a/node_modules/propagating-hammerjs/.npmignore +++ /dev/null @@ -1,31 +0,0 @@ -# Logs -logs -*.log - -# Runtime data -pids -*.pid -*.seed - -# Directory for instrumented libs generated by jscoverage/JSCover -lib-cov - -# Coverage directory used by tools like istanbul -coverage - -# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) -.grunt - -# Compiled binary addons (http://nodejs.org/api/addons.html) -build/Release - -# Dependency directory -# Commenting this out is preferred by some people, see -# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git- -node_modules - -# Users Environment Variables -.lock-wscript - -# WebStorm config -.idea diff --git a/node_modules/propagating-hammerjs/HISTORY.md b/node_modules/propagating-hammerjs/HISTORY.md index 6be5f92611dbf111cde7b25bf47b2b353383b73e..1301f83311913d687e0dd0d32101dd38e8a9b087 100644 --- a/node_modules/propagating-hammerjs/HISTORY.md +++ b/node_modules/propagating-hammerjs/HISTORY.md @@ -1,5 +1,10 @@ # History +## 2019-07-27, version 1.4.7 + +- Upgraded to `hammerjs@2.0.8`. Thanks @mojoaxel. + + ## 2016-03-05, version 1.4.6 - Fixed #6: stopPropagation not binding to the original event. @@ -13,9 +18,9 @@ ## 2016-01-04, version 1.4.4 -- Upgraded to Hammer.js v2.0.6. +- Upgraded to Hammer.js v2.0.6. - Replaced usage of `Hammer.extend` with `Hammer.assign`. -- Fixed not working in case of multiple instances of propagating-hammerjs on +- Fixed not working in case of multiple instances of propagating-hammerjs on the same DOM element. Thanks @jsdw. @@ -24,12 +29,12 @@ - Fixed `dragend` events not being emitted correctly in case of multiple nested handlers. - + ## 2015-06-02, version 1.4.2 -- Fixed not being able to overload options when having overridden the global +- Fixed not being able to overload options when having overridden the global Hammer instance. - + ## 2015-04-20, version 1.4.1 @@ -38,7 +43,7 @@ ## 2015-04-17, version 1.4.0 -- Extended the option `preventDefault` with values `'mouse'`, `'touch'`, +- Extended the option `preventDefault` with values `'mouse'`, `'touch'`, and `'pen'` to prevent default behavior for a specific type of device. diff --git a/node_modules/propagating-hammerjs/LICENSE b/node_modules/propagating-hammerjs/LICENSE index 2afab8f2233fbce9401f2709d4f47e89f8d58db3..0276fc8a2739e3d9907069478f8482cb2582a3f7 100644 --- a/node_modules/propagating-hammerjs/LICENSE +++ b/node_modules/propagating-hammerjs/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2014-2016 Jos de Jong +Copyright (c) 2014-2019 Jos de Jong Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/node_modules/propagating-hammerjs/package.json b/node_modules/propagating-hammerjs/package.json index 68e897ad9e26a71e8eed3017b120b12b3f674da9..e367289093fa89449432e0b0c61d498f5d2f4278 100644 --- a/node_modules/propagating-hammerjs/package.json +++ b/node_modules/propagating-hammerjs/package.json @@ -1,8 +1,8 @@ { "_from": "propagating-hammerjs@^1.4.6", - "_id": "propagating-hammerjs@1.4.6", + "_id": "propagating-hammerjs@1.4.7", "_inBundle": false, - "_integrity": "sha1-/tAOmwB2f/1C0U9bUxvEk+tnLjc=", + "_integrity": "sha512-oW9Wd+W2Tp5uOz6Fh4mEU7p+FoyU85smLH/mPga83Loh0pHa6AH4ZHGywvwMk3TWP31l7iUsvJyW265p4Ipwrg==", "_location": "/propagating-hammerjs", "_phantomChildren": {}, "_requested": { @@ -16,12 +16,12 @@ "fetchSpec": "^1.4.6" }, "_requiredBy": [ - "/vis-network" + "/vis" ], - "_resolved": "https://registry.npmjs.org/propagating-hammerjs/-/propagating-hammerjs-1.4.6.tgz", - "_shasum": "fed00e9b00767ffd42d14f5b531bc493eb672e37", + "_resolved": "https://registry.npmjs.org/propagating-hammerjs/-/propagating-hammerjs-1.4.7.tgz", + "_shasum": "671ab1791a7f88b9dccce8fd8b14a9655950e7d6", "_spec": "propagating-hammerjs@^1.4.6", - "_where": "/home/Earth/wuruchi/Documents/ReactProj/react-api/node_modules/vis-network", + "_where": "/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/node_modules/vis", "author": { "name": "Jos de Jong" }, @@ -30,7 +30,7 @@ }, "bundleDependencies": false, "dependencies": { - "hammerjs": "^2.0.6" + "hammerjs": "^2.0.8" }, "deprecated": false, "description": "Extend hammer.js with event propagation", @@ -52,5 +52,5 @@ "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, - "version": "1.4.6" + "version": "1.4.7" } diff --git a/node_modules/vis-data/dist/esm.js b/node_modules/vis-data/dist/esm.js index 295ce5e39dc02e7d79055d4486f29858519d0b80..33021b799b0c647ff3fc4332b3cefd3dbd8eac2f 100644 --- a/node_modules/vis-data/dist/esm.js +++ b/node_modules/vis-data/dist/esm.js @@ -4,8 +4,8 @@ * * Manage unstructured data using DataSet. Add, update, and remove data, and listen for changes in the data. * - * @version 6.1.0 - * @date 2019-07-16T13:37:00Z + * @version 6.2.0 + * @date 2019-08-14T22:18:56Z * * @copyright (c) 2011-2017 Almende B.V, http://almende.com * @copyright (c) 2018-2019 visjs contributors, https://github.com/visjs @@ -23,6 +23,719 @@ * * vis.js may be distributed under either license. */ +function createCommonjsModule(fn, module) { + return module = { exports: {} }, fn(module, module.exports), module.exports; +} + +var runtime_1 = createCommonjsModule(function (module) { + /** + * Copyright (c) 2014-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + var runtime = function (exports) { + + var Op = Object.prototype; + var hasOwn = Op.hasOwnProperty; + var undefined$1; // More compressible than void 0. + + var $Symbol = typeof Symbol === "function" ? Symbol : {}; + var iteratorSymbol = $Symbol.iterator || "@@iterator"; + var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator"; + var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; + + function wrap(innerFn, outerFn, self, tryLocsList) { + // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator. + var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator; + var generator = Object.create(protoGenerator.prototype); + var context = new Context(tryLocsList || []); // The ._invoke method unifies the implementations of the .next, + // .throw, and .return methods. + + generator._invoke = makeInvokeMethod(innerFn, self, context); + return generator; + } + + exports.wrap = wrap; // Try/catch helper to minimize deoptimizations. Returns a completion + // record like context.tryEntries[i].completion. This interface could + // have been (and was previously) designed to take a closure to be + // invoked without arguments, but in all the cases we care about we + // already have an existing method we want to call, so there's no need + // to create a new function object. We can even get away with assuming + // the method takes exactly one argument, since that happens to be true + // in every case, so we don't have to touch the arguments object. The + // only additional allocation required is the completion record, which + // has a stable shape and so hopefully should be cheap to allocate. + + function tryCatch(fn, obj, arg) { + try { + return { + type: "normal", + arg: fn.call(obj, arg) + }; + } catch (err) { + return { + type: "throw", + arg: err + }; + } + } + + var GenStateSuspendedStart = "suspendedStart"; + var GenStateSuspendedYield = "suspendedYield"; + var GenStateExecuting = "executing"; + var GenStateCompleted = "completed"; // Returning this object from the innerFn has the same effect as + // breaking out of the dispatch switch statement. + + var ContinueSentinel = {}; // Dummy constructor functions that we use as the .constructor and + // .constructor.prototype properties for functions that return Generator + // objects. For full spec compliance, you may wish to configure your + // minifier not to mangle the names of these two functions. + + function Generator() {} + + function GeneratorFunction() {} + + function GeneratorFunctionPrototype() {} // This is a polyfill for %IteratorPrototype% for environments that + // don't natively support it. + + + var IteratorPrototype = {}; + + IteratorPrototype[iteratorSymbol] = function () { + return this; + }; + + var getProto = Object.getPrototypeOf; + var NativeIteratorPrototype = getProto && getProto(getProto(values([]))); + + if (NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) { + // This environment has a native %IteratorPrototype%; use it instead + // of the polyfill. + IteratorPrototype = NativeIteratorPrototype; + } + + var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); + GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype; + GeneratorFunctionPrototype.constructor = GeneratorFunction; + GeneratorFunctionPrototype[toStringTagSymbol] = GeneratorFunction.displayName = "GeneratorFunction"; // Helper for defining the .next, .throw, and .return methods of the + // Iterator interface in terms of a single ._invoke method. + + function defineIteratorMethods(prototype) { + ["next", "throw", "return"].forEach(function (method) { + prototype[method] = function (arg) { + return this._invoke(method, arg); + }; + }); + } + + exports.isGeneratorFunction = function (genFun) { + var ctor = typeof genFun === "function" && genFun.constructor; + return ctor ? ctor === GeneratorFunction || // For the native GeneratorFunction constructor, the best we can + // do is to check its .name property. + (ctor.displayName || ctor.name) === "GeneratorFunction" : false; + }; + + exports.mark = function (genFun) { + if (Object.setPrototypeOf) { + Object.setPrototypeOf(genFun, GeneratorFunctionPrototype); + } else { + genFun.__proto__ = GeneratorFunctionPrototype; + + if (!(toStringTagSymbol in genFun)) { + genFun[toStringTagSymbol] = "GeneratorFunction"; + } + } + + genFun.prototype = Object.create(Gp); + return genFun; + }; // Within the body of any async function, `await x` is transformed to + // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test + // `hasOwn.call(value, "__await")` to determine if the yielded value is + // meant to be awaited. + + + exports.awrap = function (arg) { + return { + __await: arg + }; + }; + + function AsyncIterator(generator) { + function invoke(method, arg, resolve, reject) { + var record = tryCatch(generator[method], generator, arg); + + if (record.type === "throw") { + reject(record.arg); + } else { + var result = record.arg; + var value = result.value; + + if (value && typeof value === "object" && hasOwn.call(value, "__await")) { + return Promise.resolve(value.__await).then(function (value) { + invoke("next", value, resolve, reject); + }, function (err) { + invoke("throw", err, resolve, reject); + }); + } + + return Promise.resolve(value).then(function (unwrapped) { + // When a yielded Promise is resolved, its final value becomes + // the .value of the Promise<{value,done}> result for the + // current iteration. + result.value = unwrapped; + resolve(result); + }, function (error) { + // If a rejected Promise was yielded, throw the rejection back + // into the async generator function so it can be handled there. + return invoke("throw", error, resolve, reject); + }); + } + } + + var previousPromise; + + function enqueue(method, arg) { + function callInvokeWithMethodAndArg() { + return new Promise(function (resolve, reject) { + invoke(method, arg, resolve, reject); + }); + } + + return previousPromise = // If enqueue has been called before, then we want to wait until + // all previous Promises have been resolved before calling invoke, + // so that results are always delivered in the correct order. If + // enqueue has not been called before, then it is important to + // call invoke immediately, without waiting on a callback to fire, + // so that the async generator function has the opportunity to do + // any necessary setup in a predictable way. This predictability + // is why the Promise constructor synchronously invokes its + // executor callback, and why async functions synchronously + // execute code before the first await. Since we implement simple + // async functions in terms of async generators, it is especially + // important to get this right, even though it requires care. + previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, // Avoid propagating failures to Promises returned by later + // invocations of the iterator. + callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); + } // Define the unified helper method that is used to implement .next, + // .throw, and .return (see defineIteratorMethods). + + + this._invoke = enqueue; + } + + defineIteratorMethods(AsyncIterator.prototype); + + AsyncIterator.prototype[asyncIteratorSymbol] = function () { + return this; + }; + + exports.AsyncIterator = AsyncIterator; // Note that simple async functions are implemented on top of + // AsyncIterator objects; they just return a Promise for the value of + // the final result produced by the iterator. + + exports.async = function (innerFn, outerFn, self, tryLocsList) { + var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList)); + return exports.isGeneratorFunction(outerFn) ? iter // If outerFn is a generator, return the full iterator. + : iter.next().then(function (result) { + return result.done ? result.value : iter.next(); + }); + }; + + function makeInvokeMethod(innerFn, self, context) { + var state = GenStateSuspendedStart; + return function invoke(method, arg) { + if (state === GenStateExecuting) { + throw new Error("Generator is already running"); + } + + if (state === GenStateCompleted) { + if (method === "throw") { + throw arg; + } // Be forgiving, per 25.3.3.3.3 of the spec: + // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume + + + return doneResult(); + } + + context.method = method; + context.arg = arg; + + while (true) { + var delegate = context.delegate; + + if (delegate) { + var delegateResult = maybeInvokeDelegate(delegate, context); + + if (delegateResult) { + if (delegateResult === ContinueSentinel) continue; + return delegateResult; + } + } + + if (context.method === "next") { + // Setting context._sent for legacy support of Babel's + // function.sent implementation. + context.sent = context._sent = context.arg; + } else if (context.method === "throw") { + if (state === GenStateSuspendedStart) { + state = GenStateCompleted; + throw context.arg; + } + + context.dispatchException(context.arg); + } else if (context.method === "return") { + context.abrupt("return", context.arg); + } + + state = GenStateExecuting; + var record = tryCatch(innerFn, self, context); + + if (record.type === "normal") { + // If an exception is thrown from innerFn, we leave state === + // GenStateExecuting and loop back for another invocation. + state = context.done ? GenStateCompleted : GenStateSuspendedYield; + + if (record.arg === ContinueSentinel) { + continue; + } + + return { + value: record.arg, + done: context.done + }; + } else if (record.type === "throw") { + state = GenStateCompleted; // Dispatch the exception by looping back around to the + // context.dispatchException(context.arg) call above. + + context.method = "throw"; + context.arg = record.arg; + } + } + }; + } // Call delegate.iterator[context.method](context.arg) and handle the + // result, either by returning a { value, done } result from the + // delegate iterator, or by modifying context.method and context.arg, + // setting context.delegate to null, and returning the ContinueSentinel. + + + function maybeInvokeDelegate(delegate, context) { + var method = delegate.iterator[context.method]; + + if (method === undefined$1) { + // A .throw or .return when the delegate iterator has no .throw + // method always terminates the yield* loop. + context.delegate = null; + + if (context.method === "throw") { + // Note: ["return"] must be used for ES3 parsing compatibility. + if (delegate.iterator["return"]) { + // If the delegate iterator has a return method, give it a + // chance to clean up. + context.method = "return"; + context.arg = undefined$1; + maybeInvokeDelegate(delegate, context); + + if (context.method === "throw") { + // If maybeInvokeDelegate(context) changed context.method from + // "return" to "throw", let that override the TypeError below. + return ContinueSentinel; + } + } + + context.method = "throw"; + context.arg = new TypeError("The iterator does not provide a 'throw' method"); + } + + return ContinueSentinel; + } + + var record = tryCatch(method, delegate.iterator, context.arg); + + if (record.type === "throw") { + context.method = "throw"; + context.arg = record.arg; + context.delegate = null; + return ContinueSentinel; + } + + var info = record.arg; + + if (!info) { + context.method = "throw"; + context.arg = new TypeError("iterator result is not an object"); + context.delegate = null; + return ContinueSentinel; + } + + if (info.done) { + // Assign the result of the finished delegate to the temporary + // variable specified by delegate.resultName (see delegateYield). + context[delegate.resultName] = info.value; // Resume execution at the desired location (see delegateYield). + + context.next = delegate.nextLoc; // If context.method was "throw" but the delegate handled the + // exception, let the outer generator proceed normally. If + // context.method was "next", forget context.arg since it has been + // "consumed" by the delegate iterator. If context.method was + // "return", allow the original .return call to continue in the + // outer generator. + + if (context.method !== "return") { + context.method = "next"; + context.arg = undefined$1; + } + } else { + // Re-yield the result returned by the delegate method. + return info; + } // The delegate iterator is finished, so forget it and continue with + // the outer generator. + + + context.delegate = null; + return ContinueSentinel; + } // Define Generator.prototype.{next,throw,return} in terms of the + // unified ._invoke helper method. + + + defineIteratorMethods(Gp); + Gp[toStringTagSymbol] = "Generator"; // A Generator should always return itself as the iterator object when the + // @@iterator function is called on it. Some browsers' implementations of the + // iterator prototype chain incorrectly implement this, causing the Generator + // object to not be returned from this call. This ensures that doesn't happen. + // See https://github.com/facebook/regenerator/issues/274 for more details. + + Gp[iteratorSymbol] = function () { + return this; + }; + + Gp.toString = function () { + return "[object Generator]"; + }; + + function pushTryEntry(locs) { + var entry = { + tryLoc: locs[0] + }; + + if (1 in locs) { + entry.catchLoc = locs[1]; + } + + if (2 in locs) { + entry.finallyLoc = locs[2]; + entry.afterLoc = locs[3]; + } + + this.tryEntries.push(entry); + } + + function resetTryEntry(entry) { + var record = entry.completion || {}; + record.type = "normal"; + delete record.arg; + entry.completion = record; + } + + function Context(tryLocsList) { + // The root entry object (effectively a try statement without a catch + // or a finally block) gives us a place to store values thrown from + // locations where there is no enclosing try statement. + this.tryEntries = [{ + tryLoc: "root" + }]; + tryLocsList.forEach(pushTryEntry, this); + this.reset(true); + } + + exports.keys = function (object) { + var keys = []; + + for (var key in object) { + keys.push(key); + } + + keys.reverse(); // Rather than returning an object with a next method, we keep + // things simple and return the next function itself. + + return function next() { + while (keys.length) { + var key = keys.pop(); + + if (key in object) { + next.value = key; + next.done = false; + return next; + } + } // To avoid creating an additional object, we just hang the .value + // and .done properties off the next function object itself. This + // also ensures that the minifier will not anonymize the function. + + + next.done = true; + return next; + }; + }; + + function values(iterable) { + if (iterable) { + var iteratorMethod = iterable[iteratorSymbol]; + + if (iteratorMethod) { + return iteratorMethod.call(iterable); + } + + if (typeof iterable.next === "function") { + return iterable; + } + + if (!isNaN(iterable.length)) { + var i = -1, + next = function next() { + while (++i < iterable.length) { + if (hasOwn.call(iterable, i)) { + next.value = iterable[i]; + next.done = false; + return next; + } + } + + next.value = undefined$1; + next.done = true; + return next; + }; + + return next.next = next; + } + } // Return an iterator with no values. + + + return { + next: doneResult + }; + } + + exports.values = values; + + function doneResult() { + return { + value: undefined$1, + done: true + }; + } + + Context.prototype = { + constructor: Context, + reset: function (skipTempReset) { + this.prev = 0; + this.next = 0; // Resetting context._sent for legacy support of Babel's + // function.sent implementation. + + this.sent = this._sent = undefined$1; + this.done = false; + this.delegate = null; + this.method = "next"; + this.arg = undefined$1; + this.tryEntries.forEach(resetTryEntry); + + if (!skipTempReset) { + for (var name in this) { + // Not sure about the optimal order of these conditions: + if (name.charAt(0) === "t" && hasOwn.call(this, name) && !isNaN(+name.slice(1))) { + this[name] = undefined$1; + } + } + } + }, + stop: function () { + this.done = true; + var rootEntry = this.tryEntries[0]; + var rootRecord = rootEntry.completion; + + if (rootRecord.type === "throw") { + throw rootRecord.arg; + } + + return this.rval; + }, + dispatchException: function (exception) { + if (this.done) { + throw exception; + } + + var context = this; + + function handle(loc, caught) { + record.type = "throw"; + record.arg = exception; + context.next = loc; + + if (caught) { + // If the dispatched exception was caught by a catch block, + // then let that catch block handle the exception normally. + context.method = "next"; + context.arg = undefined$1; + } + + return !!caught; + } + + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var entry = this.tryEntries[i]; + var record = entry.completion; + + if (entry.tryLoc === "root") { + // Exception thrown outside of any try block that could handle + // it, so set the completion value of the entire function to + // throw the exception. + return handle("end"); + } + + if (entry.tryLoc <= this.prev) { + var hasCatch = hasOwn.call(entry, "catchLoc"); + var hasFinally = hasOwn.call(entry, "finallyLoc"); + + if (hasCatch && hasFinally) { + if (this.prev < entry.catchLoc) { + return handle(entry.catchLoc, true); + } else if (this.prev < entry.finallyLoc) { + return handle(entry.finallyLoc); + } + } else if (hasCatch) { + if (this.prev < entry.catchLoc) { + return handle(entry.catchLoc, true); + } + } else if (hasFinally) { + if (this.prev < entry.finallyLoc) { + return handle(entry.finallyLoc); + } + } else { + throw new Error("try statement without catch or finally"); + } + } + } + }, + abrupt: function (type, arg) { + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var entry = this.tryEntries[i]; + + if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { + var finallyEntry = entry; + break; + } + } + + if (finallyEntry && (type === "break" || type === "continue") && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc) { + // Ignore the finally entry if control is not jumping to a + // location outside the try/catch block. + finallyEntry = null; + } + + var record = finallyEntry ? finallyEntry.completion : {}; + record.type = type; + record.arg = arg; + + if (finallyEntry) { + this.method = "next"; + this.next = finallyEntry.finallyLoc; + return ContinueSentinel; + } + + return this.complete(record); + }, + complete: function (record, afterLoc) { + if (record.type === "throw") { + throw record.arg; + } + + if (record.type === "break" || record.type === "continue") { + this.next = record.arg; + } else if (record.type === "return") { + this.rval = this.arg = record.arg; + this.method = "return"; + this.next = "end"; + } else if (record.type === "normal" && afterLoc) { + this.next = afterLoc; + } + + return ContinueSentinel; + }, + finish: function (finallyLoc) { + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var entry = this.tryEntries[i]; + + if (entry.finallyLoc === finallyLoc) { + this.complete(entry.completion, entry.afterLoc); + resetTryEntry(entry); + return ContinueSentinel; + } + } + }, + "catch": function (tryLoc) { + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var entry = this.tryEntries[i]; + + if (entry.tryLoc === tryLoc) { + var record = entry.completion; + + if (record.type === "throw") { + var thrown = record.arg; + resetTryEntry(entry); + } + + return thrown; + } + } // The context.catch method must only be called with a location + // argument that corresponds to a known catch block. + + + throw new Error("illegal catch attempt"); + }, + delegateYield: function (iterable, resultName, nextLoc) { + this.delegate = { + iterator: values(iterable), + resultName: resultName, + nextLoc: nextLoc + }; + + if (this.method === "next") { + // Deliberately forget the last sent value so that we don't + // accidentally pass it on to the delegate. + this.arg = undefined$1; + } + + return ContinueSentinel; + } + }; // Regardless of whether this script is executing as a CommonJS module + // or not, return the runtime object so that we can declare the variable + // regeneratorRuntime in the outer scope, which allows this module to be + // injected easily by `bin/regenerator --include-runtime script.js`. + + return exports; + }( // If this script is executing as a CommonJS module, use module.exports + // as the regeneratorRuntime namespace. Otherwise create a new empty + // object. Either way, the resulting object will be used to initialize + // the regeneratorRuntime variable at the top of this file. + module.exports ); + + try { + regeneratorRuntime = runtime; + } catch (accidentalStrictMode) { + // This module should not be running in strict mode, so the above + // assignment should always work unless something is misconfigured. Just + // in case runtime.js accidentally runs in strict mode, we can escape + // strict mode using a global Function call. This could conceivably fail + // if a Content Security Policy forbids using Function, but in that case + // the proper solution is to fix the accidental strict mode problem. If + // you've misconfigured your bundler to force strict mode and applied a + // CSP to forbid Function, and you're not willing to fix either of those + // problems, please detail your unique predicament in a GitHub issue. + Function("r", "regeneratorRuntime = r")(runtime); + } +}); + +var regenerator = runtime_1; + function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { @@ -40,10 +753,36 @@ function _defineProperty(obj, key, value) { var defineProperty = _defineProperty; -function createCommonjsModule(fn, module) { - return module = { exports: {} }, fn(module, module.exports), module.exports; +function _arrayWithoutHoles(arr) { + if (Array.isArray(arr)) { + for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { + arr2[i] = arr[i]; + } + + return arr2; + } +} + +var arrayWithoutHoles = _arrayWithoutHoles; + +function _iterableToArray(iter) { + if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); +} + +var iterableToArray = _iterableToArray; + +function _nonIterableSpread() { + throw new TypeError("Invalid attempt to spread non-iterable instance"); +} + +var nonIterableSpread = _nonIterableSpread; + +function _toConsumableArray(arr) { + return arrayWithoutHoles(arr) || iterableToArray(arr) || nonIterableSpread(); } +var toConsumableArray = _toConsumableArray; + var _typeof_1 = createCommonjsModule(function (module) { function _typeof2(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { @@ -5006,17 +5745,86 @@ function isMoment(value) { return moment.isMoment(value); } /** - * Convert an object into another type + * Copy property from b to a if property present in a. + * If property in b explicitly set to null, delete it if `allowDeletion` set. * - * @param object - Value of unknown type. - * @param type - Name of the desired type. + * Internal helper routine, should not be exported. Not added to `exports` for that reason. * - * @returns Object in the desired type. - * @throws Error + * @param a - Target object. + * @param b - Source object. + * @param prop - Name of property to copy from b to a. + * @param allowDeletion if true, delete property in a if explicitly set to null in b */ -function convert(object, type) { +function copyOrDelete(a, b, prop, allowDeletion) { + var doDeletion = false; + + if (allowDeletion === true) { + doDeletion = b[prop] === null && a[prop] !== undefined; + } + + if (doDeletion) { + delete a[prop]; + } else { + a[prop] = b[prop]; // Remember, this is a reference copy! + } +} +/** + * Deep extend an object a with the properties of object b + * + * @param a - Target object. + * @param b - Source object. + * @param protoExtend - If true, the prototype values will also be extended + * (ie. the options objects that inherit from others will also get the inherited options). + * @param allowDeletion - If true, the values of fields that are null will be deleted. + * + * @returns Argument a. + */ + + +function deepExtend(a, b) { + var protoExtend = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; + var allowDeletion = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false; + + for (var prop in b) { + if (Object.prototype.hasOwnProperty.call(b, prop) || protoExtend === true) { + if (b[prop] && b[prop].constructor === Object) { + if (a[prop] === undefined) { + a[prop] = {}; + } + + if (a[prop].constructor === Object) { + deepExtend(a[prop], b[prop], protoExtend); // NOTE: allowDeletion not propagated! + } else { + copyOrDelete(a, b, prop, allowDeletion); + } + } else if (Array.isArray(b[prop])) { + a[prop] = []; + + for (var i = 0; i < b[prop].length; i++) { + a[prop].push(b[prop][i]); + } + } else { + copyOrDelete(a, b, prop, allowDeletion); + } + } + } + + return a; +} +/** + * Convert an object into another type + * + * @param object - Value of unknown type. + * @param type - Name of the desired type. + * + * @returns Object in the desired type. + * @throws Error + */ + + +function convert(object, type) { var match; if (object === undefined) { @@ -5218,9 +6026,11 @@ function getType(object) { * @returns True if the value is valid id, false otherwise. */ function isId(value) { - return typeof value === 'string' || typeof value === 'number'; + return typeof value === "string" || typeof value === "number"; } +/* eslint @typescript-eslint/member-ordering: ["error", { "classes": ["field", "constructor", "method"] }] */ + /** * A queue. * @@ -5255,11 +6065,11 @@ function () { createClass(Queue, [{ key: "setOptions", value: function setOptions(options) { - if (options && typeof options.delay !== 'undefined') { + if (options && typeof options.delay !== "undefined") { this.delay = options.delay; } - if (options && typeof options.max !== 'undefined') { + if (options && typeof options.max !== "undefined") { this.max = options.max; } @@ -5292,6 +6102,7 @@ function () { var method = methods[i]; if (method.original) { + // @TODO: better solution? object[method.name] = method.original; } else { // @TODO: better solution? @@ -5316,7 +6127,7 @@ function () { var original = object[method]; if (!original) { - throw new Error('Method ' + method + ' undefined'); + throw new Error("Method " + method + " undefined"); } object[method] = function () { @@ -5341,7 +6152,7 @@ function () { }, { key: "queue", value: function queue(entry) { - if (typeof entry === 'function') { + if (typeof entry === "function") { this._queue.push({ fn: entry }); @@ -5371,7 +6182,7 @@ function () { this._timeout = null; } - if (this.queue.length > 0 && typeof this.delay === 'number') { + if (this.queue.length > 0 && typeof this.delay === "number") { this._timeout = setTimeout(function () { _this.flush(); }, this.delay); @@ -5394,7 +6205,7 @@ function () { var queue = new Queue(options); if (object.flush !== undefined) { - throw new Error('Target object already has a property flush'); + throw new Error("Target object already has a property flush"); } object.flush = function () { @@ -5402,7 +6213,7 @@ function () { }; var methods = [{ - name: 'flush', + name: "flush", original: undefined }]; @@ -5430,35 +6241,7 @@ function () { return Queue; }(); -function _arrayWithoutHoles(arr) { - if (Array.isArray(arr)) { - for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { - arr2[i] = arr[i]; - } - - return arr2; - } -} - -var arrayWithoutHoles = _arrayWithoutHoles; - -function _iterableToArray(iter) { - if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); -} - -var iterableToArray = _iterableToArray; - -function _nonIterableSpread() { - throw new TypeError("Invalid attempt to spread non-iterable instance"); -} - -var nonIterableSpread = _nonIterableSpread; - -function _toConsumableArray(arr) { - return arrayWithoutHoles(arr) || iterableToArray(arr) || nonIterableSpread(); -} - -var toConsumableArray = _toConsumableArray; +/* eslint-disable @typescript-eslint/member-ordering */ /** * [[DataSet]] code that can be reused in [[DataView]] or other similar implementations of [[DataInterface]]. @@ -5473,7 +6256,7 @@ function () { classCallCheck(this, DataSetPart); this._subscribers = { - '*': [], + "*": [], add: [], remove: [], update: [] @@ -5501,23 +6284,19 @@ function () { createClass(DataSetPart, [{ key: "_trigger", value: function _trigger(event, payload, senderId) { - if (event === '*') { - throw new Error('Cannot trigger event *'); + if (event === "*") { + throw new Error("Cannot trigger event *"); } - var subscribers = [].concat(toConsumableArray(this._subscribers[event]), toConsumableArray(this._subscribers['*'])); - - for (var i = 0, len = subscribers.length; i < len; i++) { - var subscriber = subscribers[i]; - - if (subscriber.callback) { - subscriber.callback(event, payload, senderId != null ? senderId : null); - } - } + [].concat(toConsumableArray(this._subscribers[event]), toConsumableArray(this._subscribers["*"])).forEach(function (subscriber) { + subscriber(event, payload, senderId != null ? senderId : null); + }); } /** * Subscribe to an event, add an event listener. * + * @remarks Non-function callbacks are ignored. + * * @param event - Event name. * @param callback - Callback method. */ @@ -5525,9 +6304,10 @@ function () { }, { key: "on", value: function on(event, callback) { - this._subscribers[event].push({ - callback: callback - }); + if (typeof callback === "function") { + this._subscribers[event].push(callback); + } // @TODO: Maybe throw for invalid callbacks? + } /** * Unsubscribe from an event, remove an event listener. @@ -5541,8 +6321,8 @@ function () { }, { key: "off", value: function off(event, callback) { - this._subscribers[event] = this._subscribers[event].filter(function (listener) { - return listener.callback !== callback; + this._subscribers[event] = this._subscribers[event].filter(function (subscriber) { + return subscriber !== callback; }); } }]); @@ -5550,6 +6330,938 @@ function () { return DataSetPart; }(); +function _arrayWithHoles(arr) { + if (Array.isArray(arr)) return arr; +} + +var arrayWithHoles = _arrayWithHoles; + +function _iterableToArrayLimit(arr, i) { + var _arr = []; + var _n = true; + var _d = false; + var _e = undefined; + + try { + for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { + _arr.push(_s.value); + + if (i && _arr.length === i) break; + } + } catch (err) { + _d = true; + _e = err; + } finally { + try { + if (!_n && _i["return"] != null) _i["return"](); + } finally { + if (_d) throw _e; + } + } + + return _arr; +} + +var iterableToArrayLimit = _iterableToArrayLimit; + +function _nonIterableRest() { + throw new TypeError("Invalid attempt to destructure non-iterable instance"); +} + +var nonIterableRest = _nonIterableRest; + +function _slicedToArray(arr, i) { + return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || nonIterableRest(); +} + +var slicedToArray = _slicedToArray; + +/** + * Data stream + * + * @remarks + * [[DataStream]] offers an always up to date stream of items from a [[DataSet]] or [[DataView]]. + * That means that the stream is evaluated at the time of iteration, conversion to another data type or when [[cache]] is called, not when the [[DataStream]] was created. + * Multiple invocations of for example [[toItemArray]] may yield different results (if the data source like for example [[DataSet]] gets modified). + * + * @typeparam Item - The item type this stream is going to work with. + */ +var DataStream = +/*#__PURE__*/ +function () { + /** + * Create a new data stream. + * + * @param _pairs - The id, item pairs. + */ + function DataStream(_pairs) { + classCallCheck(this, DataStream); + + this._pairs = _pairs; + } + /** + * Return an iterable of key, value pairs for every entry in the stream. + */ + + + createClass(DataStream, [{ + key: Symbol.iterator, + value: + /*#__PURE__*/ + regenerator.mark(function value() { + var _iteratorNormalCompletion, _didIteratorError, _iteratorError, _iterator, _step, _step$value, id, item; + + return regenerator.wrap(function value$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + _iteratorNormalCompletion = true; + _didIteratorError = false; + _iteratorError = undefined; + _context.prev = 3; + _iterator = this._pairs[Symbol.iterator](); + + case 5: + if (_iteratorNormalCompletion = (_step = _iterator.next()).done) { + _context.next = 12; + break; + } + + _step$value = slicedToArray(_step.value, 2), id = _step$value[0], item = _step$value[1]; + _context.next = 9; + return [id, item]; + + case 9: + _iteratorNormalCompletion = true; + _context.next = 5; + break; + + case 12: + _context.next = 18; + break; + + case 14: + _context.prev = 14; + _context.t0 = _context["catch"](3); + _didIteratorError = true; + _iteratorError = _context.t0; + + case 18: + _context.prev = 18; + _context.prev = 19; + + if (!_iteratorNormalCompletion && _iterator.return != null) { + _iterator.return(); + } + + case 21: + _context.prev = 21; + + if (!_didIteratorError) { + _context.next = 24; + break; + } + + throw _iteratorError; + + case 24: + return _context.finish(21); + + case 25: + return _context.finish(18); + + case 26: + case "end": + return _context.stop(); + } + } + }, value, this, [[3, 14, 18, 26], [19,, 21, 25]]); + }) + /** + * Return an iterable of key, value pairs for every entry in the stream. + */ + + }, { + key: "entries", + value: + /*#__PURE__*/ + regenerator.mark(function entries() { + var _iteratorNormalCompletion2, _didIteratorError2, _iteratorError2, _iterator2, _step2, _step2$value, id, item; + + return regenerator.wrap(function entries$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + _iteratorNormalCompletion2 = true; + _didIteratorError2 = false; + _iteratorError2 = undefined; + _context2.prev = 3; + _iterator2 = this._pairs[Symbol.iterator](); + + case 5: + if (_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done) { + _context2.next = 12; + break; + } + + _step2$value = slicedToArray(_step2.value, 2), id = _step2$value[0], item = _step2$value[1]; + _context2.next = 9; + return [id, item]; + + case 9: + _iteratorNormalCompletion2 = true; + _context2.next = 5; + break; + + case 12: + _context2.next = 18; + break; + + case 14: + _context2.prev = 14; + _context2.t0 = _context2["catch"](3); + _didIteratorError2 = true; + _iteratorError2 = _context2.t0; + + case 18: + _context2.prev = 18; + _context2.prev = 19; + + if (!_iteratorNormalCompletion2 && _iterator2.return != null) { + _iterator2.return(); + } + + case 21: + _context2.prev = 21; + + if (!_didIteratorError2) { + _context2.next = 24; + break; + } + + throw _iteratorError2; + + case 24: + return _context2.finish(21); + + case 25: + return _context2.finish(18); + + case 26: + case "end": + return _context2.stop(); + } + } + }, entries, this, [[3, 14, 18, 26], [19,, 21, 25]]); + }) + /** + * Return an iterable of keys in the stream. + */ + + }, { + key: "keys", + value: + /*#__PURE__*/ + regenerator.mark(function keys() { + var _iteratorNormalCompletion3, _didIteratorError3, _iteratorError3, _iterator3, _step3, _step3$value, id; + + return regenerator.wrap(function keys$(_context3) { + while (1) { + switch (_context3.prev = _context3.next) { + case 0: + _iteratorNormalCompletion3 = true; + _didIteratorError3 = false; + _iteratorError3 = undefined; + _context3.prev = 3; + _iterator3 = this._pairs[Symbol.iterator](); + + case 5: + if (_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done) { + _context3.next = 12; + break; + } + + _step3$value = slicedToArray(_step3.value, 1), id = _step3$value[0]; + _context3.next = 9; + return id; + + case 9: + _iteratorNormalCompletion3 = true; + _context3.next = 5; + break; + + case 12: + _context3.next = 18; + break; + + case 14: + _context3.prev = 14; + _context3.t0 = _context3["catch"](3); + _didIteratorError3 = true; + _iteratorError3 = _context3.t0; + + case 18: + _context3.prev = 18; + _context3.prev = 19; + + if (!_iteratorNormalCompletion3 && _iterator3.return != null) { + _iterator3.return(); + } + + case 21: + _context3.prev = 21; + + if (!_didIteratorError3) { + _context3.next = 24; + break; + } + + throw _iteratorError3; + + case 24: + return _context3.finish(21); + + case 25: + return _context3.finish(18); + + case 26: + case "end": + return _context3.stop(); + } + } + }, keys, this, [[3, 14, 18, 26], [19,, 21, 25]]); + }) + /** + * Return an iterable of values in the stream. + */ + + }, { + key: "values", + value: + /*#__PURE__*/ + regenerator.mark(function values() { + var _iteratorNormalCompletion4, _didIteratorError4, _iteratorError4, _iterator4, _step4, _step4$value, item; + + return regenerator.wrap(function values$(_context4) { + while (1) { + switch (_context4.prev = _context4.next) { + case 0: + _iteratorNormalCompletion4 = true; + _didIteratorError4 = false; + _iteratorError4 = undefined; + _context4.prev = 3; + _iterator4 = this._pairs[Symbol.iterator](); + + case 5: + if (_iteratorNormalCompletion4 = (_step4 = _iterator4.next()).done) { + _context4.next = 12; + break; + } + + _step4$value = slicedToArray(_step4.value, 2), item = _step4$value[1]; + _context4.next = 9; + return item; + + case 9: + _iteratorNormalCompletion4 = true; + _context4.next = 5; + break; + + case 12: + _context4.next = 18; + break; + + case 14: + _context4.prev = 14; + _context4.t0 = _context4["catch"](3); + _didIteratorError4 = true; + _iteratorError4 = _context4.t0; + + case 18: + _context4.prev = 18; + _context4.prev = 19; + + if (!_iteratorNormalCompletion4 && _iterator4.return != null) { + _iterator4.return(); + } + + case 21: + _context4.prev = 21; + + if (!_didIteratorError4) { + _context4.next = 24; + break; + } + + throw _iteratorError4; + + case 24: + return _context4.finish(21); + + case 25: + return _context4.finish(18); + + case 26: + case "end": + return _context4.stop(); + } + } + }, values, this, [[3, 14, 18, 26], [19,, 21, 25]]); + }) + /** + * Return an array containing all the ids in this stream. + * + * @remarks + * The array may contain duplicities. + * + * @returns The array with all ids from this stream. + */ + + }, { + key: "toIdArray", + value: function toIdArray() { + return toConsumableArray(this._pairs).map(function (pair) { + return pair[0]; + }); + } + /** + * Return an array containing all the items in this stream. + * + * @remarks + * The array may contain duplicities. + * + * @returns The array with all items from this stream. + */ + + }, { + key: "toItemArray", + value: function toItemArray() { + return toConsumableArray(this._pairs).map(function (pair) { + return pair[1]; + }); + } + /** + * Return an array containing all the entries in this stream. + * + * @remarks + * The array may contain duplicities. + * + * @returns The array with all entries from this stream. + */ + + }, { + key: "toEntryArray", + value: function toEntryArray() { + return toConsumableArray(this._pairs); + } + /** + * Return an object map containing all the items in this stream accessible by ids. + * + * @remarks + * In case of duplicate ids (coerced to string so `7 == '7'`) the last encoutered appears in the returned object. + * + * @returns The object map of all id → item pairs from this stream. + */ + + }, { + key: "toObjectMap", + value: function toObjectMap() { + var map = Object.create(null); + var _iteratorNormalCompletion5 = true; + var _didIteratorError5 = false; + var _iteratorError5 = undefined; + + try { + for (var _iterator5 = this._pairs[Symbol.iterator](), _step5; !(_iteratorNormalCompletion5 = (_step5 = _iterator5.next()).done); _iteratorNormalCompletion5 = true) { + var _step5$value = slicedToArray(_step5.value, 2), + id = _step5$value[0], + item = _step5$value[1]; + + map[id] = item; + } + } catch (err) { + _didIteratorError5 = true; + _iteratorError5 = err; + } finally { + try { + if (!_iteratorNormalCompletion5 && _iterator5.return != null) { + _iterator5.return(); + } + } finally { + if (_didIteratorError5) { + throw _iteratorError5; + } + } + } + + return map; + } + /** + * Return a map containing all the items in this stream accessible by ids. + * + * @returns The map of all id → item pairs from this stream. + */ + + }, { + key: "toMap", + value: function toMap() { + return new Map(this._pairs); + } + /** + * Return a set containing all the (unique) ids in this stream. + * + * @returns The set of all ids from this stream. + */ + + }, { + key: "toIdSet", + value: function toIdSet() { + return new Set(this.toIdArray()); + } + /** + * Return a set containing all the (unique) items in this stream. + * + * @returns The set of all items from this stream. + */ + + }, { + key: "toItemSet", + value: function toItemSet() { + return new Set(this.toItemArray()); + } + /** + * Cache the items from this stream. + * + * @remarks + * This method allows for items to be fetched immediatelly and used (possibly multiple times) later. + * It can also be used to optimize performance as [[DataStream]] would otherwise reevaluate everything upon each iteration. + * + * ## Example + * ```javascript + * const ds = new DataSet([…]) + * + * const cachedStream = ds.stream() + * .filter(…) + * .sort(…) + * .map(…) + * .cached(…) // Data are fetched, processed and cached here. + * + * ds.clear() + * chachedStream // Still has all the items. + * ``` + * + * @returns A new [[DataStream]] with cached items (detached from the original [[DataSet]]). + */ + + }, { + key: "cache", + value: function cache() { + return new DataStream(toConsumableArray(this._pairs)); + } + /** + * Get the distinct values of given property. + * + * @param callback - The function that picks and possibly converts the property. + * + * @typeparam T - The type of the distinct value. + * + * @returns A set of all distinct properties. + */ + + }, { + key: "distinct", + value: function distinct(callback) { + var set = new Set(); + var _iteratorNormalCompletion6 = true; + var _didIteratorError6 = false; + var _iteratorError6 = undefined; + + try { + for (var _iterator6 = this._pairs[Symbol.iterator](), _step6; !(_iteratorNormalCompletion6 = (_step6 = _iterator6.next()).done); _iteratorNormalCompletion6 = true) { + var _step6$value = slicedToArray(_step6.value, 2), + id = _step6$value[0], + item = _step6$value[1]; + + set.add(callback(item, id)); + } + } catch (err) { + _didIteratorError6 = true; + _iteratorError6 = err; + } finally { + try { + if (!_iteratorNormalCompletion6 && _iterator6.return != null) { + _iterator6.return(); + } + } finally { + if (_didIteratorError6) { + throw _iteratorError6; + } + } + } + + return set; + } + /** + * Filter the items of the stream. + * + * @param callback - The function that decides whether an item will be included. + * + * @returns A new data stream with the filtered items. + */ + + }, { + key: "filter", + value: function filter(callback) { + var pairs = this._pairs; + return new DataStream(defineProperty({}, Symbol.iterator, + /*#__PURE__*/ + regenerator.mark(function _callee() { + var _iteratorNormalCompletion7, _didIteratorError7, _iteratorError7, _iterator7, _step7, _step7$value, id, item; + + return regenerator.wrap(function _callee$(_context5) { + while (1) { + switch (_context5.prev = _context5.next) { + case 0: + _iteratorNormalCompletion7 = true; + _didIteratorError7 = false; + _iteratorError7 = undefined; + _context5.prev = 3; + _iterator7 = pairs[Symbol.iterator](); + + case 5: + if (_iteratorNormalCompletion7 = (_step7 = _iterator7.next()).done) { + _context5.next = 13; + break; + } + + _step7$value = slicedToArray(_step7.value, 2), id = _step7$value[0], item = _step7$value[1]; + + if (!callback(item, id)) { + _context5.next = 10; + break; + } + + _context5.next = 10; + return [id, item]; + + case 10: + _iteratorNormalCompletion7 = true; + _context5.next = 5; + break; + + case 13: + _context5.next = 19; + break; + + case 15: + _context5.prev = 15; + _context5.t0 = _context5["catch"](3); + _didIteratorError7 = true; + _iteratorError7 = _context5.t0; + + case 19: + _context5.prev = 19; + _context5.prev = 20; + + if (!_iteratorNormalCompletion7 && _iterator7.return != null) { + _iterator7.return(); + } + + case 22: + _context5.prev = 22; + + if (!_didIteratorError7) { + _context5.next = 25; + break; + } + + throw _iteratorError7; + + case 25: + return _context5.finish(22); + + case 26: + return _context5.finish(19); + + case 27: + case "end": + return _context5.stop(); + } + } + }, _callee, null, [[3, 15, 19, 27], [20,, 22, 26]]); + }))); + } + /** + * Execute a callback for each item of the stream. + * + * @param callback - The function that will be invoked for each item. + */ + + }, { + key: "forEach", + value: function forEach(callback) { + var _iteratorNormalCompletion8 = true; + var _didIteratorError8 = false; + var _iteratorError8 = undefined; + + try { + for (var _iterator8 = this._pairs[Symbol.iterator](), _step8; !(_iteratorNormalCompletion8 = (_step8 = _iterator8.next()).done); _iteratorNormalCompletion8 = true) { + var _step8$value = slicedToArray(_step8.value, 2), + id = _step8$value[0], + item = _step8$value[1]; + + callback(item, id); + } + } catch (err) { + _didIteratorError8 = true; + _iteratorError8 = err; + } finally { + try { + if (!_iteratorNormalCompletion8 && _iterator8.return != null) { + _iterator8.return(); + } + } finally { + if (_didIteratorError8) { + throw _iteratorError8; + } + } + } + } + /** + * Map the items into a different type. + * + * @param callback - The function that does the conversion. + * + * @typeparam Mapped - The type of the item after mapping. + * + * @returns A new data stream with the mapped items. + */ + + }, { + key: "map", + value: function map(callback) { + var pairs = this._pairs; + return new DataStream(defineProperty({}, Symbol.iterator, + /*#__PURE__*/ + regenerator.mark(function _callee2() { + var _iteratorNormalCompletion9, _didIteratorError9, _iteratorError9, _iterator9, _step9, _step9$value, id, item; + + return regenerator.wrap(function _callee2$(_context6) { + while (1) { + switch (_context6.prev = _context6.next) { + case 0: + _iteratorNormalCompletion9 = true; + _didIteratorError9 = false; + _iteratorError9 = undefined; + _context6.prev = 3; + _iterator9 = pairs[Symbol.iterator](); + + case 5: + if (_iteratorNormalCompletion9 = (_step9 = _iterator9.next()).done) { + _context6.next = 12; + break; + } + + _step9$value = slicedToArray(_step9.value, 2), id = _step9$value[0], item = _step9$value[1]; + _context6.next = 9; + return [id, callback(item, id)]; + + case 9: + _iteratorNormalCompletion9 = true; + _context6.next = 5; + break; + + case 12: + _context6.next = 18; + break; + + case 14: + _context6.prev = 14; + _context6.t0 = _context6["catch"](3); + _didIteratorError9 = true; + _iteratorError9 = _context6.t0; + + case 18: + _context6.prev = 18; + _context6.prev = 19; + + if (!_iteratorNormalCompletion9 && _iterator9.return != null) { + _iterator9.return(); + } + + case 21: + _context6.prev = 21; + + if (!_didIteratorError9) { + _context6.next = 24; + break; + } + + throw _iteratorError9; + + case 24: + return _context6.finish(21); + + case 25: + return _context6.finish(18); + + case 26: + case "end": + return _context6.stop(); + } + } + }, _callee2, null, [[3, 14, 18, 26], [19,, 21, 25]]); + }))); + } + /** + * Get the item with the maximum value of given property. + * + * @param callback - The function that picks and possibly converts the property. + * + * @returns The item with the maximum if found otherwise null. + */ + + }, { + key: "max", + value: function max(callback) { + var iter = this._pairs[Symbol.iterator](); + + var curr = iter.next(); + + if (curr.done) { + return null; + } + + var maxItem = curr.value[1]; + var maxValue = callback(curr.value[1], curr.value[0]); + + while (!(curr = iter.next()).done) { + var _curr$value = slicedToArray(curr.value, 2), + id = _curr$value[0], + item = _curr$value[1]; + + var _value = callback(item, id); + + if (_value > maxValue) { + maxValue = _value; + maxItem = item; + } + } + + return maxItem; + } + /** + * Get the item with the minimum value of given property. + * + * @param callback - The function that picks and possibly converts the property. + * + * @returns The item with the minimum if found otherwise null. + */ + + }, { + key: "min", + value: function min(callback) { + var iter = this._pairs[Symbol.iterator](); + + var curr = iter.next(); + + if (curr.done) { + return null; + } + + var minItem = curr.value[1]; + var minValue = callback(curr.value[1], curr.value[0]); + + while (!(curr = iter.next()).done) { + var _curr$value2 = slicedToArray(curr.value, 2), + id = _curr$value2[0], + item = _curr$value2[1]; + + var _value2 = callback(item, id); + + if (_value2 < minValue) { + minValue = _value2; + minItem = item; + } + } + + return minItem; + } + /** + * Reduce the items into a single value. + * + * @param callback - The function that does the reduction. + * @param accumulator - The initial value of the accumulator. + * + * @typeparam T - The type of the accumulated value. + * + * @returns The reduced value. + */ + + }, { + key: "reduce", + value: function reduce(callback, accumulator) { + var _iteratorNormalCompletion10 = true; + var _didIteratorError10 = false; + var _iteratorError10 = undefined; + + try { + for (var _iterator10 = this._pairs[Symbol.iterator](), _step10; !(_iteratorNormalCompletion10 = (_step10 = _iterator10.next()).done); _iteratorNormalCompletion10 = true) { + var _step10$value = slicedToArray(_step10.value, 2), + id = _step10$value[0], + item = _step10$value[1]; + + accumulator = callback(accumulator, item, id); + } + } catch (err) { + _didIteratorError10 = true; + _iteratorError10 = err; + } finally { + try { + if (!_iteratorNormalCompletion10 && _iterator10.return != null) { + _iterator10.return(); + } + } finally { + if (_didIteratorError10) { + throw _iteratorError10; + } + } + } + + return accumulator; + } + /** + * Sort the items. + * + * @param callback - Item comparator. + * + * @returns A new stream with sorted items. + */ + + }, { + key: "sort", + value: function sort(callback) { + var _this = this; + + return new DataStream(defineProperty({}, Symbol.iterator, function () { + return toConsumableArray(_this._pairs).sort(function (_ref3, _ref4) { + var _ref5 = slicedToArray(_ref3, 2), + idA = _ref5[0], + itemA = _ref5[1]; + + var _ref6 = slicedToArray(_ref4, 2), + idB = _ref6[0], + itemB = _ref6[1]; + + return callback(itemA, itemB, idA, idB); + })[Symbol.iterator](); + })); + } + }]); + + return DataStream; +}(); + function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { keys.push.apply(keys, Object.getOwnPropertySymbols(object)); } if (enumerableOnly) keys = keys.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); return keys; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } @@ -5641,11 +7353,11 @@ function (_DataSetPart) { } _this._options = options || {}; - _this._data = Object.create({}); // map with data indexed by id + _this._data = new Map(); // map with data indexed by id _this.length = 0; // number of items in the DataSet - _this._idProp = _this._options.fieldId || 'id'; // name of the field containing id + _this._idProp = _this._options.fieldId || "id"; // name of the field containing id _this._type = {}; // internal field types (NOTE: this can differ from this._options.type) // all variants of a Date are internally stored as Date, so we can convert @@ -5658,8 +7370,8 @@ function (_DataSetPart) { var field = fields[i]; var value = _this._options.type[field]; - if (value == 'Date' || value == 'ISODate' || value == 'ASPDate') { - _this._type[field] = 'Date'; + if (value == "Date" || value == "ISODate" || value == "ASPDate") { + _this._type[field] = "Date"; } else { _this._type[field] = value; } @@ -5697,11 +7409,11 @@ function (_DataSetPart) { // create queue and update its options if (!this._queue) { this._queue = Queue.extend(this, { - replace: ['add', 'update', 'remove'] + replace: ["add", "update", "remove"] }); } - if (options.queue && _typeof_1(options.queue) === 'object') { + if (options.queue && _typeof_1(options.queue) === "object") { this._queue.setOptions(options.queue); } } @@ -5748,16 +7460,16 @@ function (_DataSetPart) { id = this._addItem(data[i]); addedIds.push(id); } - } else if (data && _typeof_1(data) === 'object') { + } else if (data && _typeof_1(data) === "object") { // Single item id = this._addItem(data); addedIds.push(id); } else { - throw new Error('Unknown dataType'); + throw new Error("Unknown dataType"); } if (addedIds.length) { - this._trigger('add', { + this._trigger("add", { items: addedIds }, senderId); } @@ -5765,8 +7477,9 @@ function (_DataSetPart) { return addedIds; } /** - * Update existing items. When an item does not exist, it will be created + * Update existing items. When an item does not exist, it will be created. * + * @remarks * The provided properties will be merged in the existing item. When an item does not exist, it will be created. * * After the items are updated, the DataSet will trigger an event `add` for the added items, and an event `update`. When a `senderId` is provided, this id will be passed with the triggered event to all subscribers. @@ -5790,6 +7503,9 @@ function (_DataSetPart) { * console.log(ids) // [2, 4] * ``` * + * ## Warning for TypeScript users + * This method may introduce partial items into the data set. Use add or updateOnly instead for better type safety. + * * @param data - Items to be updated (if the id is already present) or added (if the id is missing). * @param senderId - Sender id. * @@ -5812,10 +7528,10 @@ function (_DataSetPart) { var addOrUpdate = function addOrUpdate(item) { var origId = item[idProp]; - if (origId != null && _this2._data[origId]) { + if (origId != null && _this2._data.has(origId)) { var fullItem = item; // it has an id, therefore it is a fullitem - var oldItem = Object.assign({}, _this2._data[origId]); // update item + var oldItem = Object.assign({}, _this2._data.get(origId)); // update item var id = _this2._updateItem(fullItem); @@ -5833,21 +7549,21 @@ function (_DataSetPart) { if (Array.isArray(data)) { // Array for (var i = 0, len = data.length; i < len; i++) { - if (data[i] && _typeof_1(data[i]) === 'object') { + if (data[i] && _typeof_1(data[i]) === "object") { addOrUpdate(data[i]); } else { - console.warn('Ignoring input item, which is not an object at index ' + i); + console.warn("Ignoring input item, which is not an object at index " + i); } } - } else if (data && _typeof_1(data) === 'object') { + } else if (data && _typeof_1(data) === "object") { // Single item addOrUpdate(data); } else { - throw new Error('Unknown dataType'); + throw new Error("Unknown dataType"); } if (addedIds.length) { - this._trigger('add', { + this._trigger("add", { items: addedIds }, senderId); } @@ -5865,11 +7581,110 @@ function (_DataSetPart) { // }).bind(this) //}); - this._trigger('update', props, senderId); + this._trigger("update", props, senderId); } return addedIds.concat(updatedIds); } + /** + * Update existing items. When an item does not exist, an error will be thrown. + * + * @remarks + * The provided properties will be deeply merged into the existing item. + * When an item does not exist (id not present in the data set or absent), an error will be thrown and nothing will be changed. + * + * After the items are updated, the DataSet will trigger an event `update`. + * When a `senderId` is provided, this id will be passed with the triggered event to all subscribers. + * + * ## Example + * + * ```javascript + * // create a DataSet + * const data = new vis.DataSet([ + * { id: 1, text: 'item 1' }, + * { id: 2, text: 'item 2' }, + * { id: 3, text: 'item 3' }, + * ]) + * + * // update items + * const ids = data.update([ + * { id: 2, text: 'item 2 (updated)' }, // works + * // { id: 4, text: 'item 4 (new)' }, // would throw + * // { text: 'item 4 (new)' }, // would also throw + * ]) + * + * console.log(ids) // [2] + * ``` + * + * @param data - Updates (the id and optionally other props) to the items in this data set. + * @param senderId - Sender id. + * + * @returns updatedIds - The ids of the updated items. + * + * @throws When the supplied data is neither an item nor an array of items, when the ids are missing. + */ + + }, { + key: "updateOnly", + value: function updateOnly(data, senderId) { + var _this3 = this; + + if (!Array.isArray(data)) { + data = [data]; + } + + var updateEventData = data.map(function (update) { + var oldData = _this3._data.get(update[_this3._idProp]); + + if (oldData == null) { + throw new Error("Updating non-existent items is not allowed."); + } + + return { + oldData: oldData, + update: update + }; + }).map(function (_ref) { + var oldData = _ref.oldData, + update = _ref.update; + var id = oldData[_this3._idProp]; + var updatedData = deepExtend(deepExtend({}, oldData), update); + + _this3._data.set(id, updatedData); + + return { + id: id, + oldData: oldData, + updatedData: updatedData + }; + }); + + if (updateEventData.length) { + var props = { + items: updateEventData.map(function (value) { + return value.id; + }), + oldData: updateEventData.map(function (value) { + return value.oldData; + }), + data: updateEventData.map(function (value) { + return value.updatedData; + }) + }; // TODO: remove deprecated property 'data' some day + //Object.defineProperty(props, 'data', { + // 'get': (function() { + // console.warn('Property data is deprecated. Use DataSet.get(ids) to retrieve the new data, use the oldData property on this object to get the old data'); + // return updatedData; + // }).bind(this) + //}); + + this._trigger("update", props, senderId); + + return props.items; + } else { + return []; + } + } /** @inheritdoc */ }, { @@ -5895,7 +7710,7 @@ function (_DataSetPart) { } // determine the return type - var returnType = options && options.returnType === 'Object' ? 'Object' : 'Array'; // @TODO: WTF is this? Or am I missing something? + var returnType = options && options.returnType === "Object" ? "Object" : "Array"; // @TODO: WTF is this? Or am I missing something? // var returnType // if (options && options.returnType) { // var allowedValues = ['Array', 'Object'] @@ -5933,7 +7748,7 @@ function (_DataSetPart) { } } else { // return all items - itemIds = Object.keys(this._data); + itemIds = toConsumableArray(this._data.keys()); for (var _i = 0, _len = itemIds.length; _i < _len; _i++) { itemId = itemIds[_i]; @@ -5964,7 +7779,7 @@ function (_DataSetPart) { } // return the results - if (returnType == 'Object') { + if (returnType == "Object") { var result = {}; for (var _i3 = 0, _len3 = items.length; _i3 < _len3; _i3++) { @@ -5995,7 +7810,9 @@ function (_DataSetPart) { var filter = options && options.filter; var order = options && options.order; var type = options && options.type || this._options.type; - var itemIds = Object.keys(data); + + var itemIds = toConsumableArray(data.keys()); + var ids = []; var item; var items; @@ -6039,7 +7856,7 @@ function (_DataSetPart) { for (var _i6 = 0, _len6 = itemIds.length; _i6 < _len6; _i6++) { var _id4 = itemIds[_i6]; - items.push(data[_id4]); + items.push(data.get(_id4)); } this._sort(items, order); @@ -6051,7 +7868,7 @@ function (_DataSetPart) { // create unordered list for (var _i8 = 0, _len8 = itemIds.length; _i8 < _len8; _i8++) { var _id5 = itemIds[_i8]; - item = data[_id5]; + item = data.get(_id5); ids.push(item[this._idProp]); } } @@ -6074,7 +7891,8 @@ function (_DataSetPart) { var filter = options && options.filter; var type = options && options.type || this._options.type; var data = this._data; - var itemIds = Object.keys(data); + + var itemIds = toConsumableArray(data.keys()); if (options && options.order) { // execute forEach on ordered list @@ -6107,7 +7925,9 @@ function (_DataSetPart) { var type = options && options.type || this._options.type; var mappedItems = []; var data = this._data; - var itemIds = Object.keys(data); // convert and filter items + + var itemIds = toConsumableArray(data.keys()); // convert and filter items + for (var i = 0, len = itemIds.length; i < len; i++) { var id = itemIds[i]; @@ -6164,7 +7984,7 @@ function (_DataSetPart) { }, { key: "_sort", value: function _sort(items, order) { - if (typeof order === 'string') { + if (typeof order === "string") { // order by provided field name var name = order; // field name @@ -6174,13 +7994,13 @@ function (_DataSetPart) { var bv = b[name]; return av > bv ? 1 : av < bv ? -1 : 0; }); - } else if (typeof order === 'function') { + } else if (typeof order === "function") { // order by sort function items.sort(order); } else { // TODO: extend order by an Object {field:string, direction:string} // where direction can be 'asc' or 'desc' - throw new TypeError('Order must be a function or a string'); + throw new TypeError("Order must be a function or a string"); } } /** @@ -6233,7 +8053,7 @@ function (_DataSetPart) { } if (removedIds.length) { - this._trigger('remove', { + this._trigger("remove", { items: removedIds, oldData: removedItems }, senderId); @@ -6258,14 +8078,16 @@ function (_DataSetPart) { if (isId(id)) { ident = id; - } else if (id && _typeof_1(id) === 'object') { + } else if (id && _typeof_1(id) === "object") { ident = id[this._idProp]; // look for the identifier field using ._idProp } // do the removing if the item is found - if (ident != null && this._data[ident]) { - var item = this._data[ident]; - delete this._data[ident]; + if (ident != null && this._data.has(ident)) { + var item = this._data.get(ident) || null; + + this._data.delete(ident); + --this.length; return item; } @@ -6285,17 +8107,19 @@ function (_DataSetPart) { }, { key: "clear", value: function clear(senderId) { - var ids = Object.keys(this._data); + var ids = toConsumableArray(this._data.keys()); + var items = []; for (var i = 0, len = ids.length; i < len; i++) { - items.push(this._data[ids[i]]); + items.push(this._data.get(ids[i])); } - this._data = {}; + this._data.clear(); + this.length = 0; - this._trigger('remove', { + this._trigger("remove", { items: ids, oldData: items }, senderId); @@ -6313,23 +8137,38 @@ function (_DataSetPart) { }, { key: "max", value: function max(field) { - var data = this._data; - var itemIds = Object.keys(data); var max = null; var maxField = null; - - for (var i = 0, len = itemIds.length; i < len; i++) { - var id = itemIds[i]; - var item = data[id]; - var itemField = item[field]; - - if (itemField != null && (maxField == null || itemField > maxField)) { - max = item; - maxField = itemField; + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = undefined; + + try { + for (var _iterator = this._data.values()[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var item = _step.value; + var itemField = item[field]; + + if (typeof itemField === "number" && (maxField == null || itemField > maxField)) { + max = item; + maxField = itemField; + } + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator.return != null) { + _iterator.return(); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } } } - return max; + return max || null; } /** * Find the item with minimum value of a specified field. @@ -6342,23 +8181,38 @@ function (_DataSetPart) { }, { key: "min", value: function min(field) { - var data = this._data; - var itemIds = Object.keys(data); var min = null; var minField = null; - - for (var i = 0, len = itemIds.length; i < len; i++) { - var id = itemIds[i]; - var item = data[id]; - var itemField = item[field]; - - if (itemField != null && (minField == null || itemField < minField)) { - min = item; - minField = itemField; + var _iteratorNormalCompletion2 = true; + var _didIteratorError2 = false; + var _iteratorError2 = undefined; + + try { + for (var _iterator2 = this._data.values()[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) { + var item = _step2.value; + var itemField = item[field]; + + if (typeof itemField === "number" && (minField == null || itemField < minField)) { + min = item; + minField = itemField; + } + } + } catch (err) { + _didIteratorError2 = true; + _iteratorError2 = err; + } finally { + try { + if (!_iteratorNormalCompletion2 && _iterator2.return != null) { + _iterator2.return(); + } + } finally { + if (_didIteratorError2) { + throw _iteratorError2; + } } } - return min; + return min || null; } /** * Find all distinct values of a specified field @@ -6372,14 +8226,16 @@ function (_DataSetPart) { key: "distinct", value: function distinct(prop) { var data = this._data; - var itemIds = Object.keys(data); + + var itemIds = toConsumableArray(data.keys()); + var values = []; var fieldType = this._options.type && this._options.type[prop] || null; var count = 0; for (var i = 0, len = itemIds.length; i < len; i++) { var id = itemIds[i]; - var item = data[id]; + var item = data.get(id); var value = item[prop]; var exists = false; @@ -6419,9 +8275,9 @@ function (_DataSetPart) { if (id != null) { // check whether this id is already taken - if (this._data[id]) { + if (this._data.has(id)) { // item already exists - throw new Error('Cannot add item: item with id ' + id + ' already exists'); + throw new Error("Cannot add item: item with id " + id + " already exists"); } } else { // generate an id @@ -6439,8 +8295,9 @@ function (_DataSetPart) { d[field] = convert(item[field], fieldType); } - this._data[id] = d; - this.length++; + this._data.set(id, d); + + ++this.length; return id; } /** @@ -6457,7 +8314,7 @@ function (_DataSetPart) { value: function _getItem(id, types) { // @TODO: I have no idea how to type this. // get the item from the dataset - var raw = this._data[id]; + var raw = this._data.get(id); if (!raw) { return null; @@ -6501,14 +8358,14 @@ function (_DataSetPart) { var id = item[this._idProp]; if (id == null) { - throw new Error('Cannot update item: item has no id (item: ' + JSON.stringify(item) + ')'); + throw new Error("Cannot update item: item has no id (item: " + JSON.stringify(item) + ")"); } - var d = this._data[id]; + var d = this._data.get(id); if (!d) { // item doesn't exist - throw new Error('Cannot update item: no item with id ' + id + ' found'); + throw new Error("Cannot update item: no item with id " + id + " found"); } // merge with current item @@ -6516,13 +8373,102 @@ function (_DataSetPart) { for (var i = 0, len = fields.length; i < len; i++) { var field = fields[i]; - var fieldType = this._type[field] // type may be undefined - ; + var fieldType = this._type[field]; // type may be undefined + d[field] = convert(item[field], fieldType); } return id; } + /** @inheritdoc */ + + }, { + key: "stream", + value: function stream(ids) { + if (ids) { + var data = this._data; + return new DataStream(defineProperty({}, Symbol.iterator, + /*#__PURE__*/ + regenerator.mark(function _callee() { + var _iteratorNormalCompletion3, _didIteratorError3, _iteratorError3, _iterator3, _step3, id, item; + + return regenerator.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + _iteratorNormalCompletion3 = true; + _didIteratorError3 = false; + _iteratorError3 = undefined; + _context.prev = 3; + _iterator3 = ids[Symbol.iterator](); + + case 5: + if (_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done) { + _context.next = 14; + break; + } + + id = _step3.value; + item = data.get(id); + + if (!(item != null)) { + _context.next = 11; + break; + } + + _context.next = 11; + return [id, item]; + + case 11: + _iteratorNormalCompletion3 = true; + _context.next = 5; + break; + + case 14: + _context.next = 20; + break; + + case 16: + _context.prev = 16; + _context.t0 = _context["catch"](3); + _didIteratorError3 = true; + _iteratorError3 = _context.t0; + + case 20: + _context.prev = 20; + _context.prev = 21; + + if (!_iteratorNormalCompletion3 && _iterator3.return != null) { + _iterator3.return(); + } + + case 23: + _context.prev = 23; + + if (!_didIteratorError3) { + _context.next = 26; + break; + } + + throw _iteratorError3; + + case 26: + return _context.finish(23); + + case 27: + return _context.finish(20); + + case 28: + case "end": + return _context.stop(); + } + } + }, _callee, null, [[3, 16, 20, 28], [21,, 23, 27]]); + }))); + } else { + return new DataStream(defineProperty({}, Symbol.iterator, this._data.entries.bind(this._data))); + } + } }]); return DataSet; @@ -6594,10 +8540,10 @@ function (_DataSetPart) { /** @inheritdoc */ _this.length = 0; - _this._ids = {}; // ids of the items currently in memory (just contains a boolean true) + _this._ids = new Set(); // ids of the items currently in memory (just contains a boolean true) _this._options = options || {}; - _this.listener = _this._onEvent.bind(assertThisInitialized(_this)); + _this._listener = _this._onEvent.bind(assertThisInitialized(_this)); _this.setData(data); @@ -6618,7 +8564,7 @@ function (_DataSetPart) { if (this._data) { // unsubscribe from current dataset if (this._data.off) { - this._data.off('*', this.listener); + this._data.off("*", this._listener); } // trigger a remove of all items in memory @@ -6628,10 +8574,11 @@ function (_DataSetPart) { var items = this._data.get(ids); - this._ids = {}; + this._ids.clear(); + this.length = 0; - this._trigger('remove', { + this._trigger("remove", { items: ids, oldData: items }); @@ -6646,12 +8593,13 @@ function (_DataSetPart) { for (var i = 0, len = _ids.length; i < len; i++) { var id = _ids[i]; - this._ids[id] = true; + + this._ids.add(id); } this.length = _ids.length; - this._trigger('add', { + this._trigger("add", { items: _ids }); } else { @@ -6660,7 +8608,7 @@ function (_DataSetPart) { if (this._data.on) { - this._data.on('*', this.listener); + this._data.on("*", this._listener); } } /** @@ -6675,7 +8623,8 @@ function (_DataSetPart) { filter: this._options.filter }); - var oldIds = Object.keys(this._ids); + var oldIds = toConsumableArray(this._ids); + var newIds = {}; var addedIds = []; var removedIds = []; @@ -6685,9 +8634,10 @@ function (_DataSetPart) { var id = ids[i]; newIds[id] = true; - if (!this._ids[id]) { + if (!this._ids.has(id)) { addedIds.push(id); - this._ids[id] = true; + + this._ids.add(id); } } // check for removals @@ -6702,24 +8652,25 @@ function (_DataSetPart) { // Doesn't happen during tests or examples. // Is it really impossible or could it eventually happen? // How to handle it if it does? The types guarantee non-nullable items. - console.error('If you see this, report it please.'); + console.error("If you see this, report it please."); } else if (!newIds[_id]) { removedIds.push(_id); removedItems.push(item); - delete this._ids[_id]; + + this._ids.delete(_id); } } this.length += addedIds.length - removedIds.length; // trigger events if (addedIds.length) { - this._trigger('add', { + this._trigger("add", { items: addedIds }); } if (removedIds.length) { - this._trigger('remove', { + this._trigger("remove", { items: removedIds, oldData: removedItems }); @@ -6858,6 +8809,13 @@ function (_DataSetPart) { value: function getDataSet() { return this._data.getDataSet(); } + /** @inheritdoc */ + + }, { + key: "stream", + value: function stream(ids) { + return this._data.stream(ids || defineProperty({}, Symbol.iterator, this._ids.keys.bind(this._ids))); + } /** * Event listener. Will propagate all events from the connected data set to the subscribers of the DataView, but will filter the items and only trigger when there are changes in the filtered data set. * @@ -6882,21 +8840,22 @@ function (_DataSetPart) { var removedItems = []; switch (event) { - case 'add': + case "add": // filter the ids of the added items for (var i = 0, len = ids.length; i < len; i++) { var id = ids[i]; var item = this.get(id); if (item) { - this._ids[id] = true; + this._ids.add(id); + addedIds.push(id); } } break; - case 'update': + case "update": // determine the event from the views viewpoint: an updated // item can be added, updated, or removed from this view. for (var _i2 = 0, _len2 = ids.length; _i2 < _len2; _i2++) { @@ -6905,17 +8864,19 @@ function (_DataSetPart) { var _item = this.get(_id2); if (_item) { - if (this._ids[_id2]) { + if (this._ids.has(_id2)) { updatedIds.push(_id2); updatedItems.push(params.data[_i2]); oldItems.push(params.oldData[_i2]); } else { - this._ids[_id2] = true; + this._ids.add(_id2); + addedIds.push(_id2); } } else { - if (this._ids[_id2]) { - delete this._ids[_id2]; + if (this._ids.has(_id2)) { + this._ids.delete(_id2); + removedIds.push(_id2); removedItems.push(params.oldData[_i2]); } @@ -6924,13 +8885,14 @@ function (_DataSetPart) { break; - case 'remove': + case "remove": // filter the ids of the removed items for (var _i3 = 0, _len3 = ids.length; _i3 < _len3; _i3++) { var _id3 = ids[_i3]; - if (this._ids[_id3]) { - delete this._ids[_id3]; + if (this._ids.has(_id3)) { + this._ids.delete(_id3); + removedIds.push(_id3); removedItems.push(params.oldData[_i3]); } @@ -6942,13 +8904,13 @@ function (_DataSetPart) { this.length += addedIds.length - removedIds.length; if (addedIds.length) { - this._trigger('add', { + this._trigger("add", { items: addedIds }, senderId); } if (updatedIds.length) { - this._trigger('update', { + this._trigger("update", { items: updatedIds, oldData: oldItems, data: updatedItems @@ -6956,7 +8918,7 @@ function (_DataSetPart) { } if (removedIds.length) { - this._trigger('remove', { + this._trigger("remove", { items: removedIds, oldData: removedItems }, senderId); @@ -6974,4 +8936,4 @@ var index = { }; export default index; -export { DataSet, DataView, Queue }; +export { DataSet, DataStream, DataView, Queue }; diff --git a/node_modules/vis-data/dist/types/data-interface.d.ts b/node_modules/vis-data/dist/types/data-interface.d.ts index 2942534464c140a6b46974afea38aaf0a9009ef0..699349cf5eb7774ab8f67fd8097475afd86d355c 100644 --- a/node_modules/vis-data/dist/types/data-interface.d.ts +++ b/node_modules/vis-data/dist/types/data-interface.d.ts @@ -1,4 +1,5 @@ -import { DataSet } from './data-set'; +import { DataSet } from "./data-set"; +import { DataStream } from "./data-stream"; declare type ValueOf = T[keyof T]; /** * Available types for enforcing property types. @@ -13,7 +14,7 @@ declare type ValueOf = T[keyof T]; * | ISODate | A string containing an ISO Date | `new Date().toISOString()`, `"2013-06-27T22:00:00.000Z"` | * | ASPDate | A string containing an ASP Date | `"/Date(1372370400000)/"`, `"/Date(1198908717056-0700)/"` | */ -export declare type Types = 'boolean' | 'Boolean' | 'number' | 'Number' | 'string' | 'String' | 'Date' | 'ISODate' | 'ASPDate' | 'Moment'; +export declare type Types = "boolean" | "Boolean" | "number" | "Number" | "string" | "String" | "Date" | "ISODate" | "ASPDate" | "Moment"; /** Valid id type. */ export declare type Id = number | string; /** Nullable id type. */ @@ -26,6 +27,12 @@ export declare type OptId = undefined | null | Id; * @returns True if the value is valid id, false otherwise. */ export declare function isId(value: unknown): value is Id; +/** + * Make an object deeply partial. + */ +export declare type DeepPartial = T extends any[] | Function | Node ? T : T extends object ? { + [key in keyof T]?: DeepPartial; +} : T; /** * An item that may ([[Id]]) or may not (absent, undefined or null) have an id property. * @@ -33,14 +40,21 @@ export declare function isId(value: unknown): value is Id; */ export declare type PartItem = Partial>; /** - * An item that has a property containing an id. + * An item that has a property containing an id and all other required properties of given item type. * * @typeParam Item - Item type that may or may not have an id. * @typeParam IdProp - Name of the property that contains the id. */ export declare type FullItem, IdProp extends string> = Item & Record; /** - * Test whether an item has an id (is [[FullItem]]). + * An item that has a property containing an id and optionally other properties of given item type. + * + * @typeParam Item - Item type that may or may not have an id. + * @typeParam IdProp - Name of the property that contains the id. + */ +export declare type UpdateItem, IdProp extends string> = DeepPartial & Record; +/** + * Test whether an item has an id (is a [[FullItem]]). * * @param item - The item to be tested. * @param idProp - Name of the id property. @@ -94,7 +108,7 @@ export interface EventPayloads { * @typeParam IdProp - Name of the property that contains the id. */ export interface EventPayloadsWithAny extends EventPayloads { - '*': ValueOf>; + "*": ValueOf>; } /** * Map of event callback types (event name → callback). @@ -108,19 +122,19 @@ export interface EventCallbacks { * @param payload - Data about the items affected by this event. * @param senderId - A senderId, optionally provided by the application code which triggered the event. If senderId is not provided, the argument will be `null`. */ - add(name: 'add', payload: AddEventPayload | null, senderId?: Id | null): void; + add(name: "add", payload: AddEventPayload | null, senderId?: Id | null): void; /** * @param name - The name of the event ([[EventName]]). * @param payload - Data about the items affected by this event. * @param senderId - A senderId, optionally provided by the application code which triggered the event. If senderId is not provided, the argument will be `null`. */ - update(name: 'update', payload: UpdateEventPayload | null, senderId?: Id | null): void; + update(name: "update", payload: UpdateEventPayload | null, senderId?: Id | null): void; /** * @param name - The name of the event ([[EventName]]). * @param payload - Data about the items affected by this event. * @param senderId - A senderId, optionally provided by the application code which triggered the event. If senderId is not provided, the argument will be `null`. */ - remove(name: 'remove', payload: RemoveEventPayload | null, senderId?: Id | null): void; + remove(name: "remove", payload: RemoveEventPayload | null, senderId?: Id | null): void; } /** * Map of event callback types including any event (event name → callback). @@ -134,17 +148,17 @@ export interface EventCallbacksWithAny extends Even * @param payload - Data about the items affected by this event. * @param senderId - A senderId, optionally provided by the application code which triggered the event. If senderId is not provided, the argument will be `null`. */ - '*'>(name: N, payload: EventPayloads[N], senderId?: Id | null): void; + "*">(name: N, payload: EventPayloads[N], senderId?: Id | null): void; } /** Available event names. */ -export declare type EventName = keyof EventPayloads; +export declare type EventName = keyof EventPayloads; /** Available event names and '*' to listen for all. */ -export declare type EventNameWithAny = keyof EventPayloadsWithAny; +export declare type EventNameWithAny = keyof EventPayloadsWithAny; /** Maps property name to their types. */ export declare type TypeMap = Record; /** * Data interface order parameter. - * - A string value determines which property will be used for sorting (using < and > operators). + * - A string value determines which property will be used for sorting (using < and > operators for numeric comparison). * - A function will be used the same way as in Array.sort. * * @typeParam Item - Item type that may or may not have an id. @@ -156,32 +170,50 @@ export declare type DataInterfaceOrder = keyof Item | ((a: Item, b: Item) * @typeParam Item - Item type that may or may not have an id. */ export interface DataInterfaceGetOptionsBase { - /** An array with field names, or an object with current field name and new field name that the field is returned as. By default, all properties of the items are emitted. When fields is defined, only the properties whose name is specified in fields will be included in the returned items. */ + /** + * An array with field names, or an object with current field name and new field name that the field is returned as. By default, all properties of the items are emitted. When fields is defined, only the properties whose name is specified in fields will be included in the returned items. + * + * @remarks + * **Warning**: There is no TypeScript support for this. + */ fields?: string[] | Record; /** Items can be filtered on specific properties by providing a filter function. A filter function is executed for each of the items in the DataSet, and is called with the item as parameter. The function must return a boolean. All items for which the filter function returns true will be emitted. */ filter?: (item: Item) => boolean; /** Order the items by a field name or custom sort function. */ order?: DataInterfaceOrder; - /** An object containing field names as key, and data types as value. By default, the type of the properties of an item are left unchanged. When a field type is specified, this field in the items will be converted to the specified type. This can be used for example to convert ISO strings containing a date to a JavaScript Date object, or convert strings to numbers or vice versa. */ + /** + * An object containing field names as key, and data types as value. By default, the type of the properties of an item are left unchanged. When a field type is specified, this field in the items will be converted to the specified type. This can be used for example to convert ISO strings containing a date to a JavaScript Date object, or convert strings to numbers or vice versa. + * + * @remarks + * **Warning**: There is no TypeScript support for this. + */ type?: TypeMap; } /** * Data interface get options (returns a single item or an array). * + * @remarks + * Whether an item or and array of items is returned is determined by the type of the id(s) argument. + * If an array of ids is requested an array of items will be returned. + * If a single id is requested a single item (or null if the id doesn't correspond to any item) will be returned. + * * @typeParam Item - Item type that may or may not have an id. */ export interface DataInterfaceGetOptionsArray extends DataInterfaceGetOptionsBase { /** Items will be returned as a single item (if invoked with an id) or an array of items (if invoked with an array of ids). */ - returnType?: undefined | 'Array'; + returnType?: undefined | "Array"; } /** * Data interface get options (returns an object). * + * @remarks + * The returned object has ids as keys and items as values of corresponding ids. + * * @typeParam Item - Item type that may or may not have an id. */ export interface DataInterfaceGetOptionsObject extends DataInterfaceGetOptionsBase { /** Items will be returned as an object map (id → item). */ - returnType: 'Object'; + returnType: "Object"; } /** * Data interface get options (returns single item, an array or object). @@ -236,10 +268,10 @@ export interface DataInterfaceMapOptions { /** * Common interface for data sets and data view. * - * @typeParam Item - Item type that may or may not have an id. - * @typeParam IdProp - Name of the property that contains the id. + * @typeParam Item - Item type that may or may not have an id (missing ids will be generated upon insertion). + * @typeParam IdProp - Name of the property on the Item type that contains the id. */ -export interface DataInterface, IdProp extends string = 'id'> { +export interface DataInterface, IdProp extends string = "id"> { /** The number of items. */ length: number; /** @@ -250,7 +282,7 @@ export interface DataInterface, IdProp extends str * @param event - Event name. * @param callback - Callback function. */ - on(event: '*', callback: EventCallbacksWithAny['*']): void; + on(event: "*", callback: EventCallbacksWithAny["*"]): void; /** * Add an `add` event listener. * @@ -259,7 +291,7 @@ export interface DataInterface, IdProp extends str * @param event - Event name. * @param callback - Callback function. */ - on(event: 'add', callback: EventCallbacksWithAny['add']): void; + on(event: "add", callback: EventCallbacksWithAny["add"]): void; /** * Add a `remove` event listener. * @@ -268,7 +300,7 @@ export interface DataInterface, IdProp extends str * @param event - Event name. * @param callback - Callback function. */ - on(event: 'remove', callback: EventCallbacksWithAny['remove']): void; + on(event: "remove", callback: EventCallbacksWithAny["remove"]): void; /** * Add an `update` event listener. * @@ -277,35 +309,35 @@ export interface DataInterface, IdProp extends str * @param event - Event name. * @param callback - Callback function. */ - on(event: 'update', callback: EventCallbacksWithAny['update']): void; + on(event: "update", callback: EventCallbacksWithAny["update"]): void; /** * Remove a universal event listener. * * @param event - Event name. * @param callback - Callback function. */ - off(event: '*', callback: EventCallbacksWithAny['*']): void; + off(event: "*", callback: EventCallbacksWithAny["*"]): void; /** * Remove an `add` event listener. * * @param event - Event name. * @param callback - Callback function. */ - off(event: 'add', callback: EventCallbacksWithAny['add']): void; + off(event: "add", callback: EventCallbacksWithAny["add"]): void; /** * Remove a `remove` event listener. * * @param event - Event name. * @param callback - Callback function. */ - off(event: 'remove', callback: EventCallbacksWithAny['remove']): void; + off(event: "remove", callback: EventCallbacksWithAny["remove"]): void; /** * Remove an `update` event listener. * * @param event - Event name. * @param callback - Callback function. */ - off(event: 'update', callback: EventCallbacksWithAny['update']): void; + off(event: "update", callback: EventCallbacksWithAny["update"]): void; /** * Get all the items. * @@ -426,6 +458,9 @@ export interface DataInterface, IdProp extends str /** * Get ids of items. * + * @remarks + * No guarantee is given about the order of returned ids unless an ordering function is supplied. + * * @param options - Additional configuration. * * @returns An array of requested ids. @@ -434,19 +469,33 @@ export interface DataInterface, IdProp extends str /** * Execute a callback function for each item. * - * @param callback - Array.forEach-like callback, but only with the first two params. + * @remarks + * No guarantee is given about the order of iteration unless an ordering function is supplied. + * + * @param callback - Executed in similar fashion to Array.forEach callback, but instead of item, index, array receives item, id. * @param options - Options to specify iteration details. */ forEach(callback: (item: Item, id: Id) => void, options?: DataInterfaceForEachOptions): void; /** * Map each item into different item and return them as an array. * + * @remarks + * No guarantee is given about the order of iteration even if ordering function is supplied (the items are sorted after the mapping). + * * @param callback - Array.map-like callback, but only with the first two params. * @param options - Options to specify iteration details. * * @returns The mapped items. */ map(callback: (item: Item, id: Id) => T, options?: DataInterfaceMapOptions): T[]; + /** + * Stream. + * + * @param ids - Ids of the items to be included in this stream (missing are ignored), all if omitted. + * + * @returns The data stream for this data set. + */ + stream(ids?: Iterable): DataStream; } export {}; //# sourceMappingURL=data-interface.d.ts.map \ No newline at end of file diff --git a/node_modules/vis-data/dist/types/data-interface.d.ts.map b/node_modules/vis-data/dist/types/data-interface.d.ts.map index 11db8674329fed0cf6c7c43c62fc1fdb013d1419..da77466cc9ccc84a5e02f55f8ec646053ca30c6b 100644 --- a/node_modules/vis-data/dist/types/data-interface.d.ts.map +++ b/node_modules/vis-data/dist/types/data-interface.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"data-interface.d.ts","sourceRoot":"","sources":["../../src/data-interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAA;AAEpC,aAAK,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,CAAA;AAE5B;;;;;;;;;;;;GAYG;AACH,oBAAY,KAAK,GACb,SAAS,GACT,SAAS,GACT,QAAQ,GACR,QAAQ,GACR,QAAQ,GACR,QAAQ,GACR,MAAM,GACN,SAAS,GACT,SAAS,GACT,QAAQ,CAAA;AAEZ,qBAAqB;AACrB,oBAAY,EAAE,GAAG,MAAM,GAAG,MAAM,CAAA;AAChC,wBAAwB;AACxB,oBAAY,KAAK,GAAG,SAAS,GAAG,IAAI,GAAG,EAAE,CAAA;AACzC;;;;;;GAMG;AACH,wBAAgB,IAAI,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,EAAE,CAEhD;AAED;;;;GAIG;AACH,oBAAY,QAAQ,CAAC,MAAM,SAAS,MAAM,IAAI,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,CAAA;AAC5E;;;;;GAKG;AACH,oBAAY,QAAQ,CAAC,IAAI,SAAS,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,SAAS,MAAM,IAAI,IAAI,GAC/E,MAAM,CAAC,MAAM,EAAE,EAAE,CAAC,CAAA;AACpB;;;;;;;;;;GAUG;AACH,wBAAgB,UAAU,CAAC,IAAI,SAAS,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,SAAS,MAAM,EAC7E,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,MAAM,GACb,I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IAEP;;;;;;OAMG;IACH,MAAM,CAAC,GAAG,CAAC,EAAE,QAAQ,CAAC,EAAE,CAAC,GAAG,UAAU,CAAC,IAAI,CAAC,CAAC;CAC9C"} \ No newline at end of file diff --git a/node_modules/vis-data/dist/types/data-set-part.d.ts b/node_modules/vis-data/dist/types/data-set-part.d.ts index b2a5f3b6404588d16c50de5f316c0e11e6904bcd..b472a3e91804aa85368f8bebf51382fa695353d2 100644 --- a/node_modules/vis-data/dist/types/data-set-part.d.ts +++ b/node_modules/vis-data/dist/types/data-set-part.d.ts @@ -1,8 +1,6 @@ -import { DataInterface, EventCallbacksWithAny, EventNameWithAny, Id, EventPayloads } from './data-interface'; +import { DataInterface, EventCallbacksWithAny, EventNameWithAny, EventPayloads, Id } from "./data-interface"; declare type EventSubscribers = { - [Name in keyof EventCallbacksWithAny]: { - callback: any; - }; + [Name in keyof EventCallbacksWithAny]: (...args: any[]) => void; }; /** * [[DataSet]] code that can be reused in [[DataView]] or other similar implementations of [[DataInterface]]. @@ -10,37 +8,37 @@ declare type EventSubscribers = { * @typeParam Item - Item type that may or may not have an id. * @typeParam IdProp - Name of the property that contains the id. */ -export declare abstract class DataSetPart implements Pick, 'on' | 'off'> { +export declare abstract class DataSetPart implements Pick, "on" | "off"> { protected _subscribers: { [Name in EventNameWithAny]: EventSubscribers[Name][]; }; - protected _trigger(event: 'add', payload: EventPayloads['add'] | null, senderId?: Id | null): void; - protected _trigger(event: 'update', payload: EventPayloads['update'] | null, senderId?: Id | null): void; - protected _trigger(event: 'remove', payload: EventPayloads['remove'] | null, senderId?: Id | null): void; + protected _trigger(event: "add", payload: EventPayloads["add"], senderId?: Id | null): void; + protected _trigger(event: "update", payload: EventPayloads["update"], senderId?: Id | null): void; + protected _trigger(event: "remove", payload: EventPayloads["remove"], senderId?: Id | null): void; /** @inheritdoc */ - on(event: '*', callback: EventCallbacksWithAny['*']): void; + on(event: "*", callback: EventCallbacksWithAny["*"]): void; /** @inheritdoc */ - on(event: 'add', callback: EventCallbacksWithAny['add']): void; + on(event: "add", callback: EventCallbacksWithAny["add"]): void; /** @inheritdoc */ - on(event: 'remove', callback: EventCallbacksWithAny['remove']): void; + on(event: "remove", callback: EventCallbacksWithAny["remove"]): void; /** @inheritdoc */ - on(event: 'update', callback: EventCallbacksWithAny['update']): void; + on(event: "update", callback: EventCallbacksWithAny["update"]): void; /** @inheritdoc */ - off(event: '*', callback: EventCallbacksWithAny['*']): void; + off(event: "*", callback: EventCallbacksWithAny["*"]): void; /** @inheritdoc */ - off(event: 'add', callback: EventCallbacksWithAny['add']): void; + off(event: "add", callback: EventCallbacksWithAny["add"]): void; /** @inheritdoc */ - off(event: 'remove', callback: EventCallbacksWithAny['remove']): void; + off(event: "remove", callback: EventCallbacksWithAny["remove"]): void; /** @inheritdoc */ - off(event: 'update', callback: EventCallbacksWithAny['update']): void; + off(event: "update", callback: EventCallbacksWithAny["update"]): void; /** * @deprecated Use on instead (PS: DataView.subscribe === DataView.on). */ - subscribe: DataSetPart['on']; + subscribe: DataSetPart["on"]; /** * @deprecated Use off instead (PS: DataView.unsubscribe === DataView.off). */ - unsubscribe: DataSetPart['off']; + unsubscribe: DataSetPart["off"]; } export {}; //# sourceMappingURL=data-set-part.d.ts.map \ No newline at end of file diff --git a/node_modules/vis-data/dist/types/data-set-part.d.ts.map b/node_modules/vis-data/dist/types/data-set-part.d.ts.map index 402843f372f476ae6c4fcb650a4a938d7d23458d..7d5e960c85e274250c46e1948eaa612b84bf9c3f 100644 --- a/node_modules/vis-data/dist/types/data-set-part.d.ts.map +++ b/node_modules/vis-data/dist/types/data-set-part.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"data-set-part.d.ts","sourceRoot":"","sources":["../../src/data-set-part.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,aAAa,EACb,qBAAqB,EAErB,gBAAgB,EAGhB,EAAE,EACF,aAAa,EACd,MAAM,kBAAkB,CAAA;AAEzB,aAAK,gBAAgB,CAAC,IAAI,EAAE,MAAM,S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AK,EACZ,QAAQ,EAAE,qBAAqB,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,KAAK,CAAC,GACnD,IAAI;IACP,kBAAkB;IACX,EAAE,CACP,KAAK,EAAE,QAAQ,EACf,QAAQ,EAAE,qBAAqB,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,QAAQ,CAAC,GACtD,IAAI;IACP,kBAAkB;IACX,EAAE,CACP,KAAK,EAAE,QAAQ,EACf,QAAQ,EAAE,qBAAqB,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,QAAQ,CAAC,GACtD,IAAI;IAmBP,kBAAkB;IACX,GAAG,CACR,KAAK,EAAE,GAAG,EACV,QAAQ,EAAE,qBAAqB,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,GAAG,CAAC,GACjD,IAAI;IACP,kBAAkB;IACX,GAAG,CACR,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,qBAAqB,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,KAAK,CAAC,GACnD,IAAI;IACP,kBAAkB;IACX,GAAG,CACR,KAAK,EAAE,QAAQ,EACf,QAAQ,EAAE,qBAAqB,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,QAAQ,CAAC,GACtD,IAAI;IACP,kBAAkB;IACX,GAAG,CACR,KAAK,EAAE,QAAQ,EACf,QAAQ,EAAE,qBAAqB,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,QAAQ,CAAC,GACtD,IAAI;IAkBP;;OAEG;IACI,SAAS,EAAE,WAAW,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,IAAI,CAAC,CAA4B;IAC7E;;OAEG;IACI,WAAW,EAAE,WAAW,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,KAAK,CAAC,CACxB;CAC7B"} \ No newline at end of file diff --git a/node_modules/vis-data/dist/types/data-set.d.ts b/node_modules/vis-data/dist/types/data-set.d.ts index 02e62892739eb66e077ec00887f5a6bc4d881e5b..3b91f1dfd82b836f4a2bfc3d227ea699619caede 100644 --- a/node_modules/vis-data/dist/types/data-set.d.ts +++ b/node_modules/vis-data/dist/types/data-set.d.ts @@ -1,9 +1,7 @@ -import { DataInterface, DataInterfaceForEachOptions, DataInterfaceGetIdsOptions, DataInterfaceGetOptions, DataInterfaceGetOptionsArray, DataInterfaceGetOptionsObject, DataInterfaceMapOptions, FullItem, Id, PartItem, TypeMap } from './data-interface'; -import { QueueOptions } from './queue'; -import { DataSetPart } from './data-set-part'; -declare type DeepPartial = T extends any[] | Function | Node ? T : T extends object ? { - [key in keyof T]?: DeepPartial; -} : T; +import { DataInterface, DataInterfaceForEachOptions, DataInterfaceGetIdsOptions, DataInterfaceGetOptions, DataInterfaceGetOptionsArray, DataInterfaceGetOptionsObject, DataInterfaceMapOptions, DeepPartial, FullItem, Id, PartItem, TypeMap, UpdateItem } from "./data-interface"; +import { QueueOptions } from "./queue"; +import { DataSetPart } from "./data-set-part"; +import { DataStream } from "./data-stream"; /** * Initial DataSet configuration object. * @@ -16,6 +14,9 @@ export interface DataSetInitialOptions { fieldId?: IdProp; /** * An object containing field names as key, and data types as value. By default, the type of the properties of items are left unchanged. Item properties can be normalized by specifying a field type. This is useful for example to automatically convert stringified dates coming from a server into JavaScript Date objects. The available data types are listed in [[TypeMap]]. + * + * @remarks + * **Warning**: There is no TypeScript support for this. */ type?: TypeMap; /** @@ -98,21 +99,20 @@ export interface DataSetOptions { * @typeParam Item - Item type that may or may not have an id. * @typeParam IdProp - Name of the property that contains the id. */ -export declare class DataSet, IdProp extends string = 'id'> extends DataSetPart implements DataInterface { +export declare class DataSet, IdProp extends string = "id"> extends DataSetPart implements DataInterface { /** Flush all queued calls. */ flush?: () => void; /** @inheritdoc */ length: number; - private _options; - private _data; - private _idProp; - private _type; + private readonly _options; + private readonly _data; + private readonly _idProp; + private readonly _type; private _queue?; - constructor(); /** * @param options - DataSet configuration. */ - constructor(options: DataSetInitialOptions); + constructor(options?: DataSetInitialOptions); /** * @param data - An initial set of items for the new instance. * @param options - DataSet configuration. @@ -154,8 +154,9 @@ export declare class DataSet, IdProp extends strin */ add(data: Item | Item[], senderId?: Id | null): (string | number)[]; /** - * Update existing items. When an item does not exist, it will be created + * Update existing items. When an item does not exist, it will be created. * + * @remarks * The provided properties will be merged in the existing item. When an item does not exist, it will be created. * * After the items are updated, the DataSet will trigger an event `add` for the added items, and an event `update`. When a `senderId` is provided, this id will be passed with the triggered event to all subscribers. @@ -179,6 +180,9 @@ export declare class DataSet, IdProp extends strin * console.log(ids) // [2, 4] * ``` * + * ## Warning for TypeScript users + * This method may introduce partial items into the data set. Use add or updateOnly instead for better type safety. + * * @param data - Items to be updated (if the id is already present) or added (if the id is missing). * @param senderId - Sender id. * @@ -187,6 +191,44 @@ export declare class DataSet, IdProp extends strin * @throws When the supplied data is neither an item nor an array of items. */ update(data: DeepPartial | DeepPartial[], senderId?: Id | null): Id[]; + /** + * Update existing items. When an item does not exist, an error will be thrown. + * + * @remarks + * The provided properties will be deeply merged into the existing item. + * When an item does not exist (id not present in the data set or absent), an error will be thrown and nothing will be changed. + * + * After the items are updated, the DataSet will trigger an event `update`. + * When a `senderId` is provided, this id will be passed with the triggered event to all subscribers. + * + * ## Example + * + * ```javascript + * // create a DataSet + * const data = new vis.DataSet([ + * { id: 1, text: 'item 1' }, + * { id: 2, text: 'item 2' }, + * { id: 3, text: 'item 3' }, + * ]) + * + * // update items + * const ids = data.update([ + * { id: 2, text: 'item 2 (updated)' }, // works + * // { id: 4, text: 'item 4 (new)' }, // would throw + * // { text: 'item 4 (new)' }, // would also throw + * ]) + * + * console.log(ids) // [2] + * ``` + * + * @param data - Updates (the id and optionally other props) to the items in this data set. + * @param senderId - Sender id. + * + * @returns updatedIds - The ids of the updated items. + * + * @throws When the supplied data is neither an item nor an array of items, when the ids are missing. + */ + updateOnly(data: UpdateItem | UpdateItem[], senderId?: Id | null): Id[]; /** @inheritdoc */ get(): FullItem[]; /** @inheritdoc */ @@ -313,6 +355,7 @@ export declare class DataSet, IdProp extends strin * @returns The id of the updated item. */ private _updateItem; + /** @inheritdoc */ + stream(ids?: Iterable): DataStream; } -export {}; //# sourceMappingURL=data-set.d.ts.map \ No newline at end of file diff --git a/node_modules/vis-data/dist/types/data-set.d.ts.map b/node_modules/vis-data/dist/types/data-set.d.ts.map index 7fdb3ce420234a2493138fbc39d8be504ce3c68a..9feb448b42678a576c4d878459330c33a67fbb46 100644 --- a/node_modules/vis-data/dist/types/data-set.d.ts.map +++ b/node_modules/vis-data/dist/types/data-set.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"data-set.d.ts","sourceRoot":"","sources":["../../src/data-set.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,aAAa,EACb,2BAA2B,EAC3B,0BAA0B,EAC1B,uBAAuB,EACvB,4BAA4B,EAC5B,6BAA6B,EAC7B,uBAAuB,EAEvB,QAAQ,EACR,EAAE,EAEF,QAAQ,EACR,OAAO,EAER,MAAM,kBAAkB,CAAA;AAEzB,OAAO,EAAS,YAAY,EAAE,MAAM,SAAS,CAAA;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAE7C,aAAK,WAAW,CAAC,CAAC,IAAI,CAAC,SAAS,GAAG,EAAE,GAAG,QAAQ,GAAG,IAAI,GACnD,CAAC,GACD,CAAC,SAAS,MAAM,GAChB;KAAG,GAAG,IAAI,MAAM,CAAC,CAAC,CAAC,EAAE,WAAW,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;CAAE,GAC1C,CAAC,CAAA;AAEL;;;;GAIG;AACH,MAAM,WAAW,qBAAqB,CAAC,MAAM,SAAS,MAAM;IAC1D;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,CAAA;IACd;;;;OAIG;IACH,KAAK,CAAC,EAAE,YAAY,GAAG,KAAK,CAAA;CAC7B;AACD,oCAAoC;AACpC,MAAM,WAAW,cAAc;IAC7B;;;;;OAKG;IACH,KAAK,CAAC,E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;OAMG;IACH,OAAO,CAAC,OAAO;IAuBf;;;;;;;;OAQG;IACI,KAAK,CAAC,QAAQ,CAAC,EAAE,EAAE,GAAG,IAAI,GAAG,EAAE,EAAE;IAgBxC;;;;;;OAMG;IACI,GAAG,CAAC,KAAK,EAAE,MAAM,IAAI,GAAG,IAAI,GAAG,IAAI;IAkB1C;;;;;;OAMG;IACI,GAAG,CAAC,KAAK,EAAE,MAAM,IAAI,GAAG,IAAI,GAAG,IAAI;IAkBnC,QAAQ,CAAC,CAAC,SAAS,MAAM,IAAI,EAAE,IAAI,EAAE,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,EAAE;IAClD,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,EAAE;IAyCxC;;;;;;OAMG;IACH,OAAO,CAAC,QAAQ;IA8BhB,OAAO,CAAC,QAAQ;IAyChB;;;;;;;OAOG;IACH,OAAO,CAAC,WAAW;IA0BnB,kBAAkB;IACX,MAAM,CAAC,GAAG,CAAC,EAAE,QAAQ,CAAC,EAAE,CAAC,GAAG,UAAU,CAAC,IAAI,CAAC;CAoBpD"} \ No newline at end of file diff --git a/node_modules/vis-data/dist/types/data-stream.d.ts b/node_modules/vis-data/dist/types/data-stream.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..11f3fa95542c97af80e25eed13593f291a7602ca --- /dev/null +++ b/node_modules/vis-data/dist/types/data-stream.d.ts @@ -0,0 +1,184 @@ +import { Id } from "./data-interface"; +/** + * Data stream + * + * @remarks + * [[DataStream]] offers an always up to date stream of items from a [[DataSet]] or [[DataView]]. + * That means that the stream is evaluated at the time of iteration, conversion to another data type or when [[cache]] is called, not when the [[DataStream]] was created. + * Multiple invocations of for example [[toItemArray]] may yield different results (if the data source like for example [[DataSet]] gets modified). + * + * @typeparam Item - The item type this stream is going to work with. + */ +export declare class DataStream implements Iterable<[Id, Item]> { + private readonly _pairs; + /** + * Create a new data stream. + * + * @param _pairs - The id, item pairs. + */ + constructor(_pairs: Iterable<[Id, Item]>); + /** + * Return an iterable of key, value pairs for every entry in the stream. + */ + [Symbol.iterator](): IterableIterator<[Id, Item]>; + /** + * Return an iterable of key, value pairs for every entry in the stream. + */ + entries(): IterableIterator<[Id, Item]>; + /** + * Return an iterable of keys in the stream. + */ + keys(): IterableIterator; + /** + * Return an iterable of values in the stream. + */ + values(): IterableIterator; + /** + * Return an array containing all the ids in this stream. + * + * @remarks + * The array may contain duplicities. + * + * @returns The array with all ids from this stream. + */ + toIdArray(): Id[]; + /** + * Return an array containing all the items in this stream. + * + * @remarks + * The array may contain duplicities. + * + * @returns The array with all items from this stream. + */ + toItemArray(): Item[]; + /** + * Return an array containing all the entries in this stream. + * + * @remarks + * The array may contain duplicities. + * + * @returns The array with all entries from this stream. + */ + toEntryArray(): [Id, Item][]; + /** + * Return an object map containing all the items in this stream accessible by ids. + * + * @remarks + * In case of duplicate ids (coerced to string so `7 == '7'`) the last encoutered appears in the returned object. + * + * @returns The object map of all id → item pairs from this stream. + */ + toObjectMap(): Record; + /** + * Return a map containing all the items in this stream accessible by ids. + * + * @returns The map of all id → item pairs from this stream. + */ + toMap(): Map; + /** + * Return a set containing all the (unique) ids in this stream. + * + * @returns The set of all ids from this stream. + */ + toIdSet(): Set; + /** + * Return a set containing all the (unique) items in this stream. + * + * @returns The set of all items from this stream. + */ + toItemSet(): Set; + /** + * Cache the items from this stream. + * + * @remarks + * This method allows for items to be fetched immediatelly and used (possibly multiple times) later. + * It can also be used to optimize performance as [[DataStream]] would otherwise reevaluate everything upon each iteration. + * + * ## Example + * ```javascript + * const ds = new DataSet([…]) + * + * const cachedStream = ds.stream() + * .filter(…) + * .sort(…) + * .map(…) + * .cached(…) // Data are fetched, processed and cached here. + * + * ds.clear() + * chachedStream // Still has all the items. + * ``` + * + * @returns A new [[DataStream]] with cached items (detached from the original [[DataSet]]). + */ + cache(): DataStream; + /** + * Get the distinct values of given property. + * + * @param callback - The function that picks and possibly converts the property. + * + * @typeparam T - The type of the distinct value. + * + * @returns A set of all distinct properties. + */ + distinct(callback: (item: Item, id: Id) => T): Set; + /** + * Filter the items of the stream. + * + * @param callback - The function that decides whether an item will be included. + * + * @returns A new data stream with the filtered items. + */ + filter(callback: (item: Item, id: Id) => boolean): DataStream; + /** + * Execute a callback for each item of the stream. + * + * @param callback - The function that will be invoked for each item. + */ + forEach(callback: (item: Item, id: Id) => boolean): void; + /** + * Map the items into a different type. + * + * @param callback - The function that does the conversion. + * + * @typeparam Mapped - The type of the item after mapping. + * + * @returns A new data stream with the mapped items. + */ + map(callback: (item: Item, id: Id) => Mapped): DataStream; + /** + * Get the item with the maximum value of given property. + * + * @param callback - The function that picks and possibly converts the property. + * + * @returns The item with the maximum if found otherwise null. + */ + max(callback: (item: Item, id: Id) => number): Item | null; + /** + * Get the item with the minimum value of given property. + * + * @param callback - The function that picks and possibly converts the property. + * + * @returns The item with the minimum if found otherwise null. + */ + min(callback: (item: Item, id: Id) => number): Item | null; + /** + * Reduce the items into a single value. + * + * @param callback - The function that does the reduction. + * @param accumulator - The initial value of the accumulator. + * + * @typeparam T - The type of the accumulated value. + * + * @returns The reduced value. + */ + reduce(callback: (accumulator: T, item: Item, id: Id) => T, accumulator: T): T; + /** + * Sort the items. + * + * @param callback - Item comparator. + * + * @returns A new stream with sorted items. + */ + sort(callback: (itemA: Item, itemB: Item, idA: Id, idB: Id) => number): DataStream; +} +//# sourceMappingURL=data-stream.d.ts.map \ No newline at end of file diff --git a/node_modules/vis-data/dist/types/data-stream.d.ts.map b/node_modules/vis-data/dist/types/data-stream.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..f91fdbf4ed9a41ed19415e7aee32eb05318dafe7 --- /dev/null +++ b/node_modules/vis-data/dist/types/data-stream.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"data-stream.d.ts","sourceRoot":"","sources":["../../src/data-stream.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,kBAAkB,CAAC;AAEtC;;;;;;;;;GASG;AACH,qB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,IAAI,EAAE,IAAI,EAAE,EAAE,EAAE,EAAE,KAAK,OAAO,GAAG,UAAU,CAAC,IAAI,CAAC;IAa1E;;;;OAIG;IACI,OAAO,CAAC,QAAQ,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE,EAAE,EAAE,KAAK,OAAO,GAAG,IAAI;IAM/D;;;;;;;;OAQG;IACI,GAAG,CAAC,MAAM,EACf,QAAQ,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE,EAAE,EAAE,KAAK,MAAM,GACvC,UAAU,CAAC,MAAM,CAAC;IAWrB;;;;;;OAMG;IACI,GAAG,CAAC,QAAQ,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE,EAAE,EAAE,KAAK,MAAM,GAAG,IAAI,GAAG,IAAI;IAqBjE;;;;;;OAMG;IACI,GAAG,CAAC,QAAQ,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE,EAAE,EAAE,KAAK,MAAM,GAAG,IAAI,GAAG,IAAI;IAqBjE;;;;;;;;;OASG;IACI,MAAM,CAAC,CAAC,EACb,QAAQ,EAAE,CAAC,WAAW,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,EAAE,EAAE,KAAK,CAAC,EACnD,WAAW,EAAE,CAAC,GACb,CAAC;IAOJ;;;;;;OAMG;IACI,IAAI,CACT,QAAQ,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,EAAE,KAAK,MAAM,GAC/D,UAAU,CAAC,IAAI,CAAC;CAUpB"} \ No newline at end of file diff --git a/node_modules/vis-data/dist/types/data-view.d.ts b/node_modules/vis-data/dist/types/data-view.d.ts index e4ff05703820f99c9daab1a3c6cb52e6d6ecb62f..5de489d7f9e0be7426e893c4bc4dc7b693492b46 100644 --- a/node_modules/vis-data/dist/types/data-view.d.ts +++ b/node_modules/vis-data/dist/types/data-view.d.ts @@ -1,6 +1,7 @@ -import { DataInterface, DataInterfaceGetIdsOptions, DataInterfaceGetOptions, DataInterfaceGetOptionsArray, DataInterfaceGetOptionsObject, DataInterfaceMapOptions, FullItem, Id, PartItem, DataInterfaceForEachOptions } from './data-interface'; -import { DataSet } from './data-set'; -import { DataSetPart } from './data-set-part'; +import { DataInterface, DataInterfaceForEachOptions, DataInterfaceGetIdsOptions, DataInterfaceGetOptions, DataInterfaceGetOptionsArray, DataInterfaceGetOptionsObject, DataInterfaceMapOptions, FullItem, Id, PartItem } from "./data-interface"; +import { DataSet } from "./data-set"; +import { DataSetPart } from "./data-set-part"; +import { DataStream } from "./data-stream"; /** * Data view options. * @@ -60,13 +61,13 @@ export interface DataViewOptions { * @typeParam Item - Item type that may or may not have an id. * @typeParam IdProp - Name of the property that contains the id. */ -export declare class DataView, IdProp extends string = 'id'> extends DataSetPart implements DataInterface { +export declare class DataView, IdProp extends string = "id"> extends DataSetPart implements DataInterface { /** @inheritdoc */ length: number; - private listener; + private readonly _listener; private _data; - private _ids; - private _options; + private readonly _ids; + private readonly _options; /** * Create a DataView. * @@ -119,6 +120,8 @@ export declare class DataView, IdProp extends stri map(callback: (item: Item, id: Id) => T, options?: DataInterfaceMapOptions): T[]; /** @inheritdoc */ getDataSet(): DataSet; + /** @inheritdoc */ + stream(ids?: Iterable): DataStream; /** * Event listener. Will propagate all events from the connected data set to the subscribers of the DataView, but will filter the items and only trigger when there are changes in the filtered data set. * diff --git a/node_modules/vis-data/dist/types/data-view.d.ts.map b/node_modules/vis-data/dist/types/data-view.d.ts.map index 0c67e2cd63aa5ffc51fe6cc08fe252e9f8eda8c0..05489acab326cdb497888ffda9238fc507542377 100644 --- a/node_modules/vis-data/dist/types/data-view.d.ts.map +++ b/node_modules/vis-data/dist/types/data-view.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"data-view.d.ts","sourceRoot":"","sources":["../../src/data-view.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,0BAA0B,EAC1B,u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AAE,EAAE;IA2B/D,kBAAkB;IACX,OAAO,CACZ,QAAQ,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE,EAAE,EAAE,KAAK,IAAI,EACtC,OAAO,CAAC,EAAE,2BAA2B,CAAC,IAAI,CAAC,GAC1C,IAAI;IAyBP,kBAAkB;IACX,GAAG,CAAC,CAAC,EACV,QAAQ,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE,EAAE,EAAE,KAAK,CAAC,EACnC,OAAO,CAAC,EAAE,uBAAuB,CAAC,IAAI,EAAE,CAAC,CAAC,GACzC,CAAC,EAAE;IA6BN,kBAAkB;IACX,UAAU,IAAI,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC;IAI1C,kBAAkB;IACX,MAAM,CAAC,GAAG,CAAC,EAAE,QAAQ,CAAC,EAAE,CAAC,GAAG,UAAU,CAAC,IAAI,CAAC;IAQnD;;;;;;OAMG;IACH,OAAO,CAAC,QAAQ;CAsGjB"} \ No newline at end of file diff --git a/node_modules/vis-data/dist/types/index.d.ts b/node_modules/vis-data/dist/types/index.d.ts index 450c17ebdec98b58d0b00fa564e31a2f3ed5faa8..b9f71b82126f2b5c6f483f1957bc570e4f867f5b 100644 --- a/node_modules/vis-data/dist/types/index.d.ts +++ b/node_modules/vis-data/dist/types/index.d.ts @@ -1,10 +1,11 @@ -export { DataInterface, DataInterfaceGetIdsOptions, DataInterfaceGetOptions, DataInterfaceGetOptionsArray, DataInterfaceGetOptionsObject, DataInterfaceMapOptions, DataInterfaceOrder, EventCallbacks, EventCallbacksWithAny, EventName, EventNameWithAny, TypeMap, Types, } from './data-interface'; -export { DataSet, DataSetOptions } from './data-set'; -export { DataView, DataViewOptions } from './data-view'; -export { Queue } from './queue'; -import { DataSet } from './data-set'; -import { DataView } from './data-view'; -import { Queue } from './queue'; +export { DataInterface, DataInterfaceGetIdsOptions, DataInterfaceGetOptions, DataInterfaceGetOptionsArray, DataInterfaceGetOptionsObject, DataInterfaceMapOptions, DataInterfaceOrder, EventCallbacks, EventCallbacksWithAny, EventName, EventNameWithAny, TypeMap, Types } from "./data-interface"; +export { DataSet, DataSetOptions } from "./data-set"; +export { DataStream } from "./data-stream"; +export { DataView, DataViewOptions } from "./data-view"; +export { Queue } from "./queue"; +import { DataSet } from "./data-set"; +import { DataView } from "./data-view"; +import { Queue } from "./queue"; declare const _default: { DataSet: typeof DataSet; DataView: typeof DataView; diff --git a/node_modules/vis-data/dist/types/index.d.ts.map b/node_modules/vis-data/dist/types/index.d.ts.map index 0839c3cfa9d09092aacb8caf2f97eeb87d2c7962..7144b3df21e2fef2cf110d7bdd641bcef68633b7 100644 --- a/node_modules/vis-data/dist/types/index.d.ts.map +++ b/node_modules/vis-data/dist/types/index.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,0BAA0B,EAC1B,uBAAuB,EACvB,4BAA4B,EAC5B,6BAA6B,EAC7B,uBAAuB,EACvB,kBAAkB,EAClB,cAAc,EACd,qBAAqB,EACrB,SAAS,EACT,gBAAgB,EAChB,OAAO,EACP,KAAK,GACN,MAAM,kBAAkB,CAAA;AAEzB,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAA;AACpD,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AACvD,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAG/B,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAA;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AACtC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;;;;;;AAE/B,wBAA2C"} \ No newline at end of file +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,0BAA0B,EAC1B,uBAAuB,EACvB,4BAA4B,EAC5B,6BAA6B,EAC7B,uBAAuB,EACvB,kBAAkB,EAClB,cAAc,EACd,qBAAqB,EACrB,SAAS,EACT,gBAAgB,EAChB,OAAO,EACP,KAAK,EACN,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AACxD,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAGhC,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;;;;;;AAEhC,wBAA4C"} \ No newline at end of file diff --git a/node_modules/vis-data/dist/types/queue.d.ts b/node_modules/vis-data/dist/types/queue.d.ts index a124f733c5a1d863dfd99bb58e0d86bae42f794e..fbe73352833b9ed70bb1020513244ebc31577510 100644 --- a/node_modules/vis-data/dist/types/queue.d.ts +++ b/node_modules/vis-data/dist/types/queue.d.ts @@ -41,7 +41,7 @@ export declare class Queue { delay: null | number; /** Maximum number of entries in the queue before it will be flushed. */ max: number; - private _queue; + private readonly _queue; private _timeout; private _extended; /** diff --git a/node_modules/vis-data/dist/types/queue.d.ts.map b/node_modules/vis-data/dist/types/queue.d.ts.map index 0baa044fcdcf5f5ca6297d6681d715b9e01a5d31..03635752e5d3553d250dc98b910d191c2080062d 100644 --- a/node_modules/vis-data/dist/types/queue.d.ts.map +++ b/node_modules/vis-data/dist/types/queue.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"queue.d.ts","sourceRoot":"","sources":["../../src/queue.ts"],"names":[],"mappings":"AAAA,kCAAkC;AAClC,MAAM,WAAW,YAAY;IAC3B,qJAAqJ;IACrJ,KAAK,CAAC,EAAE,IAAI,GAAG,MAAM,CAAA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AAE,YAAY,GAAG,IAAI;IAW/C;;;;;;;;OAQG;WACW,MAAM,CAAC,CAAC,SAAS;QAAE,KAAK,CAAC,EAAE,MAAM,IAAI,CAAA;KAAE,EAAE,CAAC,SAAS,MAAM,EACrE,MAAM,EAAE,CAAC,EACT,OAAO,EAAE,kBAAkB,CAAC,CAAC,CAAC,GAC7B,KAAK,CAAC,CAAC,CAAC;IAsCX;;OAEG;IACI,OAAO,IAAI,IAAI;IAoBtB;;;;;OAKG;IACI,OAAO,CAAC,CAAC,SAAS,MAAM,EAC7B,MAAM,EAAE,MAAM,CAAC,CAAC,EAAE,MAAM,IAAI,CAAC,EAC7B,MAAM,EAAE,CAAC,GACR,IAAI;IAiBP;;;;OAIG;IACI,KAAK,CAAC,KAAK,EAAE,cAAc,GAAG,IAAI;IAUzC;;OAEG;IACH,OAAO,CAAC,cAAc;IAkBtB;;OAEG;IACI,KAAK,IAAI,IAAI;CAKrB"} \ No newline at end of file diff --git a/node_modules/vis-data/dist/umd.js b/node_modules/vis-data/dist/umd.js index 6aaa1faf5491f5dc5e21d73a0bdf291f7ad3e402..c3b5a9541881d52dda23713556d5c69bfa1cf492 100644 --- a/node_modules/vis-data/dist/umd.js +++ b/node_modules/vis-data/dist/umd.js @@ -4,8 +4,8 @@ * * Manage unstructured data using DataSet. Add, update, and remove data, and listen for changes in the data. * - * @version 6.1.0 - * @date 2019-07-16T13:37:00Z + * @version 6.2.0 + * @date 2019-08-14T22:18:56Z * * @copyright (c) 2011-2017 Almende B.V, http://almende.com * @copyright (c) 2018-2019 visjs contributors, https://github.com/visjs @@ -24,6966 +24,8929 @@ * vis.js may be distributed under either license. */ (function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : - typeof define === 'function' && define.amd ? define(['exports'], factory) : - (global = global || self, factory(global.vis = {})); + typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : + typeof define === 'function' && define.amd ? define(['exports'], factory) : + (global = global || self, factory(global.vis = global.vis || {})); }(this, function (exports) { 'use strict'; - function _defineProperty(obj, key, value) { - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } - - return obj; - } - - var defineProperty = _defineProperty; - - function createCommonjsModule(fn, module) { - return module = { exports: {} }, fn(module, module.exports), module.exports; - } - - var _typeof_1 = createCommonjsModule(function (module) { - function _typeof2(obj) { - if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { - _typeof2 = function _typeof2(obj) { - return typeof obj; - }; - } else { - _typeof2 = function _typeof2(obj) { - return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; - }; - } - - return _typeof2(obj); - } - - function _typeof(obj) { - if (typeof Symbol === "function" && _typeof2(Symbol.iterator) === "symbol") { - module.exports = _typeof = function _typeof(obj) { - return _typeof2(obj); - }; - } else { - module.exports = _typeof = function _typeof(obj) { - return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : _typeof2(obj); - }; - } - - return _typeof(obj); - } - - module.exports = _typeof; - }); - - function _classCallCheck(instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError("Cannot call a class as a function"); - } - } - - var classCallCheck = _classCallCheck; - - function _defineProperties(target, props) { - for (var i = 0; i < props.length; i++) { - var descriptor = props[i]; - descriptor.enumerable = descriptor.enumerable || false; - descriptor.configurable = true; - if ("value" in descriptor) descriptor.writable = true; - Object.defineProperty(target, descriptor.key, descriptor); - } - } - - function _createClass(Constructor, protoProps, staticProps) { - if (protoProps) _defineProperties(Constructor.prototype, protoProps); - if (staticProps) _defineProperties(Constructor, staticProps); - return Constructor; - } - - var createClass = _createClass; - - function _assertThisInitialized(self) { - if (self === void 0) { - throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); - } - - return self; - } - - var assertThisInitialized = _assertThisInitialized; - - function _possibleConstructorReturn(self, call) { - if (call && (_typeof_1(call) === "object" || typeof call === "function")) { - return call; - } - - return assertThisInitialized(self); - } - - var possibleConstructorReturn = _possibleConstructorReturn; - - var getPrototypeOf = createCommonjsModule(function (module) { - function _getPrototypeOf(o) { - module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { - return o.__proto__ || Object.getPrototypeOf(o); - }; - return _getPrototypeOf(o); - } - - module.exports = _getPrototypeOf; - }); - - var setPrototypeOf = createCommonjsModule(function (module) { - function _setPrototypeOf(o, p) { - module.exports = _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { - o.__proto__ = p; - return o; - }; - - return _setPrototypeOf(o, p); - } - - module.exports = _setPrototypeOf; - }); - - function _inherits(subClass, superClass) { - if (typeof superClass !== "function" && superClass !== null) { - throw new TypeError("Super expression must either be null or a function"); - } - - subClass.prototype = Object.create(superClass && superClass.prototype, { - constructor: { - value: subClass, - writable: true, - configurable: true - } - }); - if (superClass) setPrototypeOf(subClass, superClass); - } - - var inherits = _inherits; - - // Maps for number <-> hex string conversion - var byteToHex = []; - - for (var i = 0; i < 256; i++) { - byteToHex[i] = (i + 0x100).toString(16).substr(1); - } - /** - * Represent binary UUID into it's string representation. - * - * @param buf - Buffer containing UUID bytes. - * @param offset - Offset from the start of the buffer where the UUID is saved (not needed if the buffer starts with the UUID). - * - * @returns String representation of the UUID. - */ - - - function stringifyUUID(buf, offset) { - var i = offset || 0; - var bth = byteToHex; - return bth[buf[i++]] + bth[buf[i++]] + bth[buf[i++]] + bth[buf[i++]] + '-' + bth[buf[i++]] + bth[buf[i++]] + '-' + bth[buf[i++]] + bth[buf[i++]] + '-' + bth[buf[i++]] + bth[buf[i++]] + '-' + bth[buf[i++]] + bth[buf[i++]] + bth[buf[i++]] + bth[buf[i++]] + bth[buf[i++]] + bth[buf[i++]]; - } - /** - * Generate 16 random bytes to be used as a base for UUID. - * - * @ignore - */ - - - var random = function () { - if (typeof crypto !== 'undefined' && crypto.getRandomValues) { - // WHATWG crypto-based RNG - http://wiki.whatwg.org/wiki/Crypto - // Moderately fast, high quality - var _rnds8 = new Uint8Array(16); - - return function whatwgRNG() { - crypto.getRandomValues(_rnds8); - return _rnds8; - }; - } // Math.random()-based (RNG) - // - // If all else fails, use Math.random(). - // It's fast, but is of unspecified quality. - - - var _rnds = new Array(16); - - return function () { - for (var i = 0, r; i < 16; i++) { - if ((i & 0x03) === 0) { - r = Math.random() * 0x100000000; - } - - _rnds[i] = r >>> ((i & 0x03) << 3) & 0xff; - } - - return _rnds; - }; // uuid.js - // - // Copyright (c) 2010-2012 Robert Kieffer - // MIT License - http://opensource.org/licenses/mit-license.php - // Unique ID creation requires a high quality random # generator. We feature - // detect to determine the best RNG source, normalizing to a function that - // returns 128-bits of randomness, since that's what's usually required - // return require('./rng'); - }(); - - var byteToHex$1 = []; - - for (var i$1 = 0; i$1 < 256; i$1++) { - byteToHex$1[i$1] = (i$1 + 0x100).toString(16).substr(1); - } // **`v1()` - Generate time-based UUID** - // - // Inspired by https://github.com/LiosK/UUID.js - // and http://docs.python.org/library/uuid.html - // random #'s we need to init node and clockseq - - - var seedBytes = random(); // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1) - - var defaultNodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]]; // Per 4.2.2, randomize (14 bit) clockseq - - var defaultClockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff; // Previous uuid creation time - /** - * UUIDv4 options. - */ - - /** - * Generate UUIDv4 - * - * @param options - Options to be used instead of default generated values. - * String 'binary' is a shorthand for uuid4({}, new Array(16)). - * @param buf - If present the buffer will be filled with the generated UUID. - * @param offset - Offset of the UUID from the start of the buffer. - * - * @returns UUIDv4 - */ - - - function uuid4() { - var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; - var buf = arguments.length > 1 ? arguments[1] : undefined; - var offset = arguments.length > 2 ? arguments[2] : undefined; // Deprecated - 'format' argument, as supported in v1.2 - - var i = buf && offset || 0; - - if (typeof options === 'string') { - buf = options === 'binary' ? new Array(16) : undefined; - options = {}; - } - - var rnds = options.random || (options.rng || random)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved` - - rnds[6] = rnds[6] & 0x0f | 0x40; - rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided - - if (buf) { - for (var ii = 0; ii < 16; ii++) { - buf[i + ii] = rnds[ii]; - } - } - - return buf || stringifyUUID(rnds); - } // Rollup will complain about mixing default and named exports in UMD build, - - function _typeof(obj) { - if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { - _typeof = function (obj) { - return typeof obj; - }; - } else { - _typeof = function (obj) { - return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; - }; - } - - return _typeof(obj); - } - - var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; - - function commonjsRequire() { - throw new Error('Dynamic requires are not currently supported by rollup-plugin-commonjs'); - } - - function createCommonjsModule$1(fn, module) { - return module = { - exports: {} - }, fn(module, module.exports), module.exports; - } - - var moment = createCommonjsModule$1(function (module, exports) { - (function (global, factory) { - module.exports = factory(); - })(commonjsGlobal, function () { - var hookCallback; - - function hooks() { - return hookCallback.apply(null, arguments); - } // This is done to register the method called with moment() - // without creating circular dependencies. - - - function setHookCallback(callback) { - hookCallback = callback; - } - - function isArray(input) { - return input instanceof Array || Object.prototype.toString.call(input) === '[object Array]'; - } - - function isObject(input) { - // IE8 will treat undefined and null as object if it wasn't for - // input != null - return input != null && Object.prototype.toString.call(input) === '[object Object]'; - } - - function isObjectEmpty(obj) { - if (Object.getOwnPropertyNames) { - return Object.getOwnPropertyNames(obj).length === 0; - } else { - var k; - - for (k in obj) { - if (obj.hasOwnProperty(k)) { - return false; - } - } - - return true; - } - } - - function isUndefined(input) { - return input === void 0; - } - - function isNumber(input) { - return typeof input === 'number' || Object.prototype.toString.call(input) === '[object Number]'; - } - - function isDate(input) { - return input instanceof Date || Object.prototype.toString.call(input) === '[object Date]'; - } - - function map(arr, fn) { - var res = [], - i; - - for (i = 0; i < arr.length; ++i) { - res.push(fn(arr[i], i)); - } - - return res; - } - - function hasOwnProp(a, b) { - return Object.prototype.hasOwnProperty.call(a, b); - } - - function extend(a, b) { - for (var i in b) { - if (hasOwnProp(b, i)) { - a[i] = b[i]; - } - } - - if (hasOwnProp(b, 'toString')) { - a.toString = b.toString; - } - - if (hasOwnProp(b, 'valueOf')) { - a.valueOf = b.valueOf; - } - - return a; - } - - function createUTC(input, format, locale, strict) { - return createLocalOrUTC(input, format, locale, strict, true).utc(); - } - - function defaultParsingFlags() { - // We need to deep clone this object. - return { - empty: false, - unusedTokens: [], - unusedInput: [], - overflow: -2, - charsLeftOver: 0, - nullInput: false, - invalidMonth: null, - invalidFormat: false, - userInvalidated: false, - iso: false, - parsedDateParts: [], - meridiem: null, - rfc2822: false, - weekdayMismatch: false - }; - } - - function getParsingFlags(m) { - if (m._pf == null) { - m._pf = defaultParsingFlags(); - } - - return m._pf; - } - - var some; - - if (Array.prototype.some) { - some = Array.prototype.some; - } else { - some = function (fun) { - var t = Object(this); - var len = t.length >>> 0; - - for (var i = 0; i < len; i++) { - if (i in t && fun.call(this, t[i], i, t)) { - return true; - } - } - - return false; - }; - } - - function isValid(m) { - if (m._isValid == null) { - var flags = getParsingFlags(m); - var parsedParts = some.call(flags.parsedDateParts, function (i) { - return i != null; - }); - var isNowValid = !isNaN(m._d.getTime()) && flags.overflow < 0 && !flags.empty && !flags.invalidMonth && !flags.invalidWeekday && !flags.weekdayMismatch && !flags.nullInput && !flags.invalidFormat && !flags.userInvalidated && (!flags.meridiem || flags.meridiem && parsedParts); - - if (m._strict) { - isNowValid = isNowValid && flags.charsLeftOver === 0 && flags.unusedTokens.length === 0 && flags.bigHour === undefined; - } - - if (Object.isFrozen == null || !Object.isFrozen(m)) { - m._isValid = isNowValid; - } else { - return isNowValid; - } - } - - return m._isValid; - } - - function createInvalid(flags) { - var m = createUTC(NaN); - - if (flags != null) { - extend(getParsingFlags(m), flags); - } else { - getParsingFlags(m).userInvalidated = true; - } - - return m; - } // Plugins that add properties should also add the key here (null value), - // so we can properly clone ourselves. - - - var momentProperties = hooks.momentProperties = []; - - function copyConfig(to, from) { - var i, prop, val; - - if (!isUndefined(from._isAMomentObject)) { - to._isAMomentObject = from._isAMomentObject; - } - - if (!isUndefined(from._i)) { - to._i = from._i; - } - - if (!isUndefined(from._f)) { - to._f = from._f; - } - - if (!isUndefined(from._l)) { - to._l = from._l; - } - - if (!isUndefined(from._strict)) { - to._strict = from._strict; - } - - if (!isUndefined(from._tzm)) { - to._tzm = from._tzm; - } - - if (!isUndefined(from._isUTC)) { - to._isUTC = from._isUTC; - } - - if (!isUndefined(from._offset)) { - to._offset = from._offset; - } - - if (!isUndefined(from._pf)) { - to._pf = getParsingFlags(from); - } - - if (!isUndefined(from._locale)) { - to._locale = from._locale; - } - - if (momentProperties.length > 0) { - for (i = 0; i < momentProperties.length; i++) { - prop = momentProperties[i]; - val = from[prop]; - - if (!isUndefined(val)) { - to[prop] = val; - } - } - } - - return to; - } - - var updateInProgress = false; // Moment prototype object - - function Moment(config) { - copyConfig(this, config); - this._d = new Date(config._d != null ? config._d.getTime() : NaN); - - if (!this.isValid()) { - this._d = new Date(NaN); - } // Prevent infinite loop in case updateOffset creates new moment - // objects. - - - if (updateInProgress === false) { - updateInProgress = true; - hooks.updateOffset(this); - updateInProgress = false; - } - } - - function isMoment(obj) { - return obj instanceof Moment || obj != null && obj._isAMomentObject != null; - } + function createCommonjsModule(fn, module) { + return module = { exports: {} }, fn(module, module.exports), module.exports; + } + + var runtime_1 = createCommonjsModule(function (module) { + /** + * Copyright (c) 2014-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + var runtime = function (exports) { + + var Op = Object.prototype; + var hasOwn = Op.hasOwnProperty; + var undefined$1; // More compressible than void 0. + + var $Symbol = typeof Symbol === "function" ? Symbol : {}; + var iteratorSymbol = $Symbol.iterator || "@@iterator"; + var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator"; + var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; + + function wrap(innerFn, outerFn, self, tryLocsList) { + // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator. + var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator; + var generator = Object.create(protoGenerator.prototype); + var context = new Context(tryLocsList || []); // The ._invoke method unifies the implementations of the .next, + // .throw, and .return methods. + + generator._invoke = makeInvokeMethod(innerFn, self, context); + return generator; + } + + exports.wrap = wrap; // Try/catch helper to minimize deoptimizations. Returns a completion + // record like context.tryEntries[i].completion. This interface could + // have been (and was previously) designed to take a closure to be + // invoked without arguments, but in all the cases we care about we + // already have an existing method we want to call, so there's no need + // to create a new function object. We can even get away with assuming + // the method takes exactly one argument, since that happens to be true + // in every case, so we don't have to touch the arguments object. The + // only additional allocation required is the completion record, which + // has a stable shape and so hopefully should be cheap to allocate. + + function tryCatch(fn, obj, arg) { + try { + return { + type: "normal", + arg: fn.call(obj, arg) + }; + } catch (err) { + return { + type: "throw", + arg: err + }; + } + } + + var GenStateSuspendedStart = "suspendedStart"; + var GenStateSuspendedYield = "suspendedYield"; + var GenStateExecuting = "executing"; + var GenStateCompleted = "completed"; // Returning this object from the innerFn has the same effect as + // breaking out of the dispatch switch statement. + + var ContinueSentinel = {}; // Dummy constructor functions that we use as the .constructor and + // .constructor.prototype properties for functions that return Generator + // objects. For full spec compliance, you may wish to configure your + // minifier not to mangle the names of these two functions. + + function Generator() {} + + function GeneratorFunction() {} + + function GeneratorFunctionPrototype() {} // This is a polyfill for %IteratorPrototype% for environments that + // don't natively support it. + + + var IteratorPrototype = {}; + + IteratorPrototype[iteratorSymbol] = function () { + return this; + }; + + var getProto = Object.getPrototypeOf; + var NativeIteratorPrototype = getProto && getProto(getProto(values([]))); + + if (NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) { + // This environment has a native %IteratorPrototype%; use it instead + // of the polyfill. + IteratorPrototype = NativeIteratorPrototype; + } + + var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); + GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype; + GeneratorFunctionPrototype.constructor = GeneratorFunction; + GeneratorFunctionPrototype[toStringTagSymbol] = GeneratorFunction.displayName = "GeneratorFunction"; // Helper for defining the .next, .throw, and .return methods of the + // Iterator interface in terms of a single ._invoke method. + + function defineIteratorMethods(prototype) { + ["next", "throw", "return"].forEach(function (method) { + prototype[method] = function (arg) { + return this._invoke(method, arg); + }; + }); + } + + exports.isGeneratorFunction = function (genFun) { + var ctor = typeof genFun === "function" && genFun.constructor; + return ctor ? ctor === GeneratorFunction || // For the native GeneratorFunction constructor, the best we can + // do is to check its .name property. + (ctor.displayName || ctor.name) === "GeneratorFunction" : false; + }; + + exports.mark = function (genFun) { + if (Object.setPrototypeOf) { + Object.setPrototypeOf(genFun, GeneratorFunctionPrototype); + } else { + genFun.__proto__ = GeneratorFunctionPrototype; + + if (!(toStringTagSymbol in genFun)) { + genFun[toStringTagSymbol] = "GeneratorFunction"; + } + } + + genFun.prototype = Object.create(Gp); + return genFun; + }; // Within the body of any async function, `await x` is transformed to + // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test + // `hasOwn.call(value, "__await")` to determine if the yielded value is + // meant to be awaited. + + + exports.awrap = function (arg) { + return { + __await: arg + }; + }; + + function AsyncIterator(generator) { + function invoke(method, arg, resolve, reject) { + var record = tryCatch(generator[method], generator, arg); + + if (record.type === "throw") { + reject(record.arg); + } else { + var result = record.arg; + var value = result.value; + + if (value && typeof value === "object" && hasOwn.call(value, "__await")) { + return Promise.resolve(value.__await).then(function (value) { + invoke("next", value, resolve, reject); + }, function (err) { + invoke("throw", err, resolve, reject); + }); + } + + return Promise.resolve(value).then(function (unwrapped) { + // When a yielded Promise is resolved, its final value becomes + // the .value of the Promise<{value,done}> result for the + // current iteration. + result.value = unwrapped; + resolve(result); + }, function (error) { + // If a rejected Promise was yielded, throw the rejection back + // into the async generator function so it can be handled there. + return invoke("throw", error, resolve, reject); + }); + } + } + + var previousPromise; + + function enqueue(method, arg) { + function callInvokeWithMethodAndArg() { + return new Promise(function (resolve, reject) { + invoke(method, arg, resolve, reject); + }); + } + + return previousPromise = // If enqueue has been called before, then we want to wait until + // all previous Promises have been resolved before calling invoke, + // so that results are always delivered in the correct order. If + // enqueue has not been called before, then it is important to + // call invoke immediately, without waiting on a callback to fire, + // so that the async generator function has the opportunity to do + // any necessary setup in a predictable way. This predictability + // is why the Promise constructor synchronously invokes its + // executor callback, and why async functions synchronously + // execute code before the first await. Since we implement simple + // async functions in terms of async generators, it is especially + // important to get this right, even though it requires care. + previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, // Avoid propagating failures to Promises returned by later + // invocations of the iterator. + callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); + } // Define the unified helper method that is used to implement .next, + // .throw, and .return (see defineIteratorMethods). + + + this._invoke = enqueue; + } + + defineIteratorMethods(AsyncIterator.prototype); + + AsyncIterator.prototype[asyncIteratorSymbol] = function () { + return this; + }; + + exports.AsyncIterator = AsyncIterator; // Note that simple async functions are implemented on top of + // AsyncIterator objects; they just return a Promise for the value of + // the final result produced by the iterator. + + exports.async = function (innerFn, outerFn, self, tryLocsList) { + var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList)); + return exports.isGeneratorFunction(outerFn) ? iter // If outerFn is a generator, return the full iterator. + : iter.next().then(function (result) { + return result.done ? result.value : iter.next(); + }); + }; + + function makeInvokeMethod(innerFn, self, context) { + var state = GenStateSuspendedStart; + return function invoke(method, arg) { + if (state === GenStateExecuting) { + throw new Error("Generator is already running"); + } + + if (state === GenStateCompleted) { + if (method === "throw") { + throw arg; + } // Be forgiving, per 25.3.3.3.3 of the spec: + // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume + + + return doneResult(); + } + + context.method = method; + context.arg = arg; + + while (true) { + var delegate = context.delegate; + + if (delegate) { + var delegateResult = maybeInvokeDelegate(delegate, context); + + if (delegateResult) { + if (delegateResult === ContinueSentinel) continue; + return delegateResult; + } + } + + if (context.method === "next") { + // Setting context._sent for legacy support of Babel's + // function.sent implementation. + context.sent = context._sent = context.arg; + } else if (context.method === "throw") { + if (state === GenStateSuspendedStart) { + state = GenStateCompleted; + throw context.arg; + } + + context.dispatchException(context.arg); + } else if (context.method === "return") { + context.abrupt("return", context.arg); + } + + state = GenStateExecuting; + var record = tryCatch(innerFn, self, context); + + if (record.type === "normal") { + // If an exception is thrown from innerFn, we leave state === + // GenStateExecuting and loop back for another invocation. + state = context.done ? GenStateCompleted : GenStateSuspendedYield; + + if (record.arg === ContinueSentinel) { + continue; + } + + return { + value: record.arg, + done: context.done + }; + } else if (record.type === "throw") { + state = GenStateCompleted; // Dispatch the exception by looping back around to the + // context.dispatchException(context.arg) call above. + + context.method = "throw"; + context.arg = record.arg; + } + } + }; + } // Call delegate.iterator[context.method](context.arg) and handle the + // result, either by returning a { value, done } result from the + // delegate iterator, or by modifying context.method and context.arg, + // setting context.delegate to null, and returning the ContinueSentinel. + + + function maybeInvokeDelegate(delegate, context) { + var method = delegate.iterator[context.method]; + + if (method === undefined$1) { + // A .throw or .return when the delegate iterator has no .throw + // method always terminates the yield* loop. + context.delegate = null; + + if (context.method === "throw") { + // Note: ["return"] must be used for ES3 parsing compatibility. + if (delegate.iterator["return"]) { + // If the delegate iterator has a return method, give it a + // chance to clean up. + context.method = "return"; + context.arg = undefined$1; + maybeInvokeDelegate(delegate, context); + + if (context.method === "throw") { + // If maybeInvokeDelegate(context) changed context.method from + // "return" to "throw", let that override the TypeError below. + return ContinueSentinel; + } + } + + context.method = "throw"; + context.arg = new TypeError("The iterator does not provide a 'throw' method"); + } + + return ContinueSentinel; + } + + var record = tryCatch(method, delegate.iterator, context.arg); + + if (record.type === "throw") { + context.method = "throw"; + context.arg = record.arg; + context.delegate = null; + return ContinueSentinel; + } + + var info = record.arg; + + if (!info) { + context.method = "throw"; + context.arg = new TypeError("iterator result is not an object"); + context.delegate = null; + return ContinueSentinel; + } + + if (info.done) { + // Assign the result of the finished delegate to the temporary + // variable specified by delegate.resultName (see delegateYield). + context[delegate.resultName] = info.value; // Resume execution at the desired location (see delegateYield). + + context.next = delegate.nextLoc; // If context.method was "throw" but the delegate handled the + // exception, let the outer generator proceed normally. If + // context.method was "next", forget context.arg since it has been + // "consumed" by the delegate iterator. If context.method was + // "return", allow the original .return call to continue in the + // outer generator. + + if (context.method !== "return") { + context.method = "next"; + context.arg = undefined$1; + } + } else { + // Re-yield the result returned by the delegate method. + return info; + } // The delegate iterator is finished, so forget it and continue with + // the outer generator. + + + context.delegate = null; + return ContinueSentinel; + } // Define Generator.prototype.{next,throw,return} in terms of the + // unified ._invoke helper method. + + + defineIteratorMethods(Gp); + Gp[toStringTagSymbol] = "Generator"; // A Generator should always return itself as the iterator object when the + // @@iterator function is called on it. Some browsers' implementations of the + // iterator prototype chain incorrectly implement this, causing the Generator + // object to not be returned from this call. This ensures that doesn't happen. + // See https://github.com/facebook/regenerator/issues/274 for more details. + + Gp[iteratorSymbol] = function () { + return this; + }; + + Gp.toString = function () { + return "[object Generator]"; + }; + + function pushTryEntry(locs) { + var entry = { + tryLoc: locs[0] + }; + + if (1 in locs) { + entry.catchLoc = locs[1]; + } + + if (2 in locs) { + entry.finallyLoc = locs[2]; + entry.afterLoc = locs[3]; + } + + this.tryEntries.push(entry); + } + + function resetTryEntry(entry) { + var record = entry.completion || {}; + record.type = "normal"; + delete record.arg; + entry.completion = record; + } + + function Context(tryLocsList) { + // The root entry object (effectively a try statement without a catch + // or a finally block) gives us a place to store values thrown from + // locations where there is no enclosing try statement. + this.tryEntries = [{ + tryLoc: "root" + }]; + tryLocsList.forEach(pushTryEntry, this); + this.reset(true); + } + + exports.keys = function (object) { + var keys = []; + + for (var key in object) { + keys.push(key); + } + + keys.reverse(); // Rather than returning an object with a next method, we keep + // things simple and return the next function itself. + + return function next() { + while (keys.length) { + var key = keys.pop(); + + if (key in object) { + next.value = key; + next.done = false; + return next; + } + } // To avoid creating an additional object, we just hang the .value + // and .done properties off the next function object itself. This + // also ensures that the minifier will not anonymize the function. + + + next.done = true; + return next; + }; + }; + + function values(iterable) { + if (iterable) { + var iteratorMethod = iterable[iteratorSymbol]; + + if (iteratorMethod) { + return iteratorMethod.call(iterable); + } + + if (typeof iterable.next === "function") { + return iterable; + } + + if (!isNaN(iterable.length)) { + var i = -1, + next = function next() { + while (++i < iterable.length) { + if (hasOwn.call(iterable, i)) { + next.value = iterable[i]; + next.done = false; + return next; + } + } + + next.value = undefined$1; + next.done = true; + return next; + }; + + return next.next = next; + } + } // Return an iterator with no values. + + + return { + next: doneResult + }; + } + + exports.values = values; + + function doneResult() { + return { + value: undefined$1, + done: true + }; + } + + Context.prototype = { + constructor: Context, + reset: function (skipTempReset) { + this.prev = 0; + this.next = 0; // Resetting context._sent for legacy support of Babel's + // function.sent implementation. + + this.sent = this._sent = undefined$1; + this.done = false; + this.delegate = null; + this.method = "next"; + this.arg = undefined$1; + this.tryEntries.forEach(resetTryEntry); + + if (!skipTempReset) { + for (var name in this) { + // Not sure about the optimal order of these conditions: + if (name.charAt(0) === "t" && hasOwn.call(this, name) && !isNaN(+name.slice(1))) { + this[name] = undefined$1; + } + } + } + }, + stop: function () { + this.done = true; + var rootEntry = this.tryEntries[0]; + var rootRecord = rootEntry.completion; + + if (rootRecord.type === "throw") { + throw rootRecord.arg; + } + + return this.rval; + }, + dispatchException: function (exception) { + if (this.done) { + throw exception; + } + + var context = this; + + function handle(loc, caught) { + record.type = "throw"; + record.arg = exception; + context.next = loc; + + if (caught) { + // If the dispatched exception was caught by a catch block, + // then let that catch block handle the exception normally. + context.method = "next"; + context.arg = undefined$1; + } + + return !!caught; + } + + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var entry = this.tryEntries[i]; + var record = entry.completion; + + if (entry.tryLoc === "root") { + // Exception thrown outside of any try block that could handle + // it, so set the completion value of the entire function to + // throw the exception. + return handle("end"); + } + + if (entry.tryLoc <= this.prev) { + var hasCatch = hasOwn.call(entry, "catchLoc"); + var hasFinally = hasOwn.call(entry, "finallyLoc"); + + if (hasCatch && hasFinally) { + if (this.prev < entry.catchLoc) { + return handle(entry.catchLoc, true); + } else if (this.prev < entry.finallyLoc) { + return handle(entry.finallyLoc); + } + } else if (hasCatch) { + if (this.prev < entry.catchLoc) { + return handle(entry.catchLoc, true); + } + } else if (hasFinally) { + if (this.prev < entry.finallyLoc) { + return handle(entry.finallyLoc); + } + } else { + throw new Error("try statement without catch or finally"); + } + } + } + }, + abrupt: function (type, arg) { + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var entry = this.tryEntries[i]; + + if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { + var finallyEntry = entry; + break; + } + } + + if (finallyEntry && (type === "break" || type === "continue") && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc) { + // Ignore the finally entry if control is not jumping to a + // location outside the try/catch block. + finallyEntry = null; + } + + var record = finallyEntry ? finallyEntry.completion : {}; + record.type = type; + record.arg = arg; + + if (finallyEntry) { + this.method = "next"; + this.next = finallyEntry.finallyLoc; + return ContinueSentinel; + } + + return this.complete(record); + }, + complete: function (record, afterLoc) { + if (record.type === "throw") { + throw record.arg; + } + + if (record.type === "break" || record.type === "continue") { + this.next = record.arg; + } else if (record.type === "return") { + this.rval = this.arg = record.arg; + this.method = "return"; + this.next = "end"; + } else if (record.type === "normal" && afterLoc) { + this.next = afterLoc; + } + + return ContinueSentinel; + }, + finish: function (finallyLoc) { + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var entry = this.tryEntries[i]; + + if (entry.finallyLoc === finallyLoc) { + this.complete(entry.completion, entry.afterLoc); + resetTryEntry(entry); + return ContinueSentinel; + } + } + }, + "catch": function (tryLoc) { + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var entry = this.tryEntries[i]; + + if (entry.tryLoc === tryLoc) { + var record = entry.completion; + + if (record.type === "throw") { + var thrown = record.arg; + resetTryEntry(entry); + } + + return thrown; + } + } // The context.catch method must only be called with a location + // argument that corresponds to a known catch block. + + + throw new Error("illegal catch attempt"); + }, + delegateYield: function (iterable, resultName, nextLoc) { + this.delegate = { + iterator: values(iterable), + resultName: resultName, + nextLoc: nextLoc + }; + + if (this.method === "next") { + // Deliberately forget the last sent value so that we don't + // accidentally pass it on to the delegate. + this.arg = undefined$1; + } + + return ContinueSentinel; + } + }; // Regardless of whether this script is executing as a CommonJS module + // or not, return the runtime object so that we can declare the variable + // regeneratorRuntime in the outer scope, which allows this module to be + // injected easily by `bin/regenerator --include-runtime script.js`. + + return exports; + }( // If this script is executing as a CommonJS module, use module.exports + // as the regeneratorRuntime namespace. Otherwise create a new empty + // object. Either way, the resulting object will be used to initialize + // the regeneratorRuntime variable at the top of this file. + module.exports ); + + try { + regeneratorRuntime = runtime; + } catch (accidentalStrictMode) { + // This module should not be running in strict mode, so the above + // assignment should always work unless something is misconfigured. Just + // in case runtime.js accidentally runs in strict mode, we can escape + // strict mode using a global Function call. This could conceivably fail + // if a Content Security Policy forbids using Function, but in that case + // the proper solution is to fix the accidental strict mode problem. If + // you've misconfigured your bundler to force strict mode and applied a + // CSP to forbid Function, and you're not willing to fix either of those + // problems, please detail your unique predicament in a GitHub issue. + Function("r", "regeneratorRuntime = r")(runtime); + } + }); + + var regenerator = runtime_1; + + function _defineProperty(obj, key, value) { + if (key in obj) { + Object.defineProperty(obj, key, { + value: value, + enumerable: true, + configurable: true, + writable: true + }); + } else { + obj[key] = value; + } + + return obj; + } + + var defineProperty = _defineProperty; + + function _arrayWithoutHoles(arr) { + if (Array.isArray(arr)) { + for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { + arr2[i] = arr[i]; + } + + return arr2; + } + } + + var arrayWithoutHoles = _arrayWithoutHoles; + + function _iterableToArray(iter) { + if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); + } + + var iterableToArray = _iterableToArray; + + function _nonIterableSpread() { + throw new TypeError("Invalid attempt to spread non-iterable instance"); + } + + var nonIterableSpread = _nonIterableSpread; + + function _toConsumableArray(arr) { + return arrayWithoutHoles(arr) || iterableToArray(arr) || nonIterableSpread(); + } + + var toConsumableArray = _toConsumableArray; + + var _typeof_1 = createCommonjsModule(function (module) { + function _typeof2(obj) { + if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { + _typeof2 = function _typeof2(obj) { + return typeof obj; + }; + } else { + _typeof2 = function _typeof2(obj) { + return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; + }; + } + + return _typeof2(obj); + } + + function _typeof(obj) { + if (typeof Symbol === "function" && _typeof2(Symbol.iterator) === "symbol") { + module.exports = _typeof = function _typeof(obj) { + return _typeof2(obj); + }; + } else { + module.exports = _typeof = function _typeof(obj) { + return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : _typeof2(obj); + }; + } + + return _typeof(obj); + } + + module.exports = _typeof; + }); + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } + } + + var classCallCheck = _classCallCheck; + + function _defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + + function _createClass(Constructor, protoProps, staticProps) { + if (protoProps) _defineProperties(Constructor.prototype, protoProps); + if (staticProps) _defineProperties(Constructor, staticProps); + return Constructor; + } + + var createClass = _createClass; + + function _assertThisInitialized(self) { + if (self === void 0) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + + return self; + } + + var assertThisInitialized = _assertThisInitialized; + + function _possibleConstructorReturn(self, call) { + if (call && (_typeof_1(call) === "object" || typeof call === "function")) { + return call; + } + + return assertThisInitialized(self); + } + + var possibleConstructorReturn = _possibleConstructorReturn; + + var getPrototypeOf = createCommonjsModule(function (module) { + function _getPrototypeOf(o) { + module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { + return o.__proto__ || Object.getPrototypeOf(o); + }; + return _getPrototypeOf(o); + } + + module.exports = _getPrototypeOf; + }); + + var setPrototypeOf = createCommonjsModule(function (module) { + function _setPrototypeOf(o, p) { + module.exports = _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { + o.__proto__ = p; + return o; + }; + + return _setPrototypeOf(o, p); + } + + module.exports = _setPrototypeOf; + }); + + function _inherits(subClass, superClass) { + if (typeof superClass !== "function" && superClass !== null) { + throw new TypeError("Super expression must either be null or a function"); + } + + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + writable: true, + configurable: true + } + }); + if (superClass) setPrototypeOf(subClass, superClass); + } + + var inherits = _inherits; + + // Maps for number <-> hex string conversion + var byteToHex = []; + + for (var i = 0; i < 256; i++) { + byteToHex[i] = (i + 0x100).toString(16).substr(1); + } + /** + * Represent binary UUID into it's string representation. + * + * @param buf - Buffer containing UUID bytes. + * @param offset - Offset from the start of the buffer where the UUID is saved (not needed if the buffer starts with the UUID). + * + * @returns String representation of the UUID. + */ + + + function stringifyUUID(buf, offset) { + var i = offset || 0; + var bth = byteToHex; + return bth[buf[i++]] + bth[buf[i++]] + bth[buf[i++]] + bth[buf[i++]] + '-' + bth[buf[i++]] + bth[buf[i++]] + '-' + bth[buf[i++]] + bth[buf[i++]] + '-' + bth[buf[i++]] + bth[buf[i++]] + '-' + bth[buf[i++]] + bth[buf[i++]] + bth[buf[i++]] + bth[buf[i++]] + bth[buf[i++]] + bth[buf[i++]]; + } + /** + * Generate 16 random bytes to be used as a base for UUID. + * + * @ignore + */ + + + var random = function () { + if (typeof crypto !== 'undefined' && crypto.getRandomValues) { + // WHATWG crypto-based RNG - http://wiki.whatwg.org/wiki/Crypto + // Moderately fast, high quality + var _rnds8 = new Uint8Array(16); + + return function whatwgRNG() { + crypto.getRandomValues(_rnds8); + return _rnds8; + }; + } // Math.random()-based (RNG) + // + // If all else fails, use Math.random(). + // It's fast, but is of unspecified quality. + + + var _rnds = new Array(16); + + return function () { + for (var i = 0, r; i < 16; i++) { + if ((i & 0x03) === 0) { + r = Math.random() * 0x100000000; + } + + _rnds[i] = r >>> ((i & 0x03) << 3) & 0xff; + } + + return _rnds; + }; // uuid.js + // + // Copyright (c) 2010-2012 Robert Kieffer + // MIT License - http://opensource.org/licenses/mit-license.php + // Unique ID creation requires a high quality random # generator. We feature + // detect to determine the best RNG source, normalizing to a function that + // returns 128-bits of randomness, since that's what's usually required + // return require('./rng'); + }(); + + var byteToHex$1 = []; + + for (var i$1 = 0; i$1 < 256; i$1++) { + byteToHex$1[i$1] = (i$1 + 0x100).toString(16).substr(1); + } // **`v1()` - Generate time-based UUID** + // + // Inspired by https://github.com/LiosK/UUID.js + // and http://docs.python.org/library/uuid.html + // random #'s we need to init node and clockseq + + + var seedBytes = random(); // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1) + + var defaultNodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]]; // Per 4.2.2, randomize (14 bit) clockseq + + var defaultClockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff; // Previous uuid creation time + /** + * UUIDv4 options. + */ + + /** + * Generate UUIDv4 + * + * @param options - Options to be used instead of default generated values. + * String 'binary' is a shorthand for uuid4({}, new Array(16)). + * @param buf - If present the buffer will be filled with the generated UUID. + * @param offset - Offset of the UUID from the start of the buffer. + * + * @returns UUIDv4 + */ + + + function uuid4() { + var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + var buf = arguments.length > 1 ? arguments[1] : undefined; + var offset = arguments.length > 2 ? arguments[2] : undefined; // Deprecated - 'format' argument, as supported in v1.2 + + var i = buf && offset || 0; + + if (typeof options === 'string') { + buf = options === 'binary' ? new Array(16) : undefined; + options = {}; + } + + var rnds = options.random || (options.rng || random)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved` + + rnds[6] = rnds[6] & 0x0f | 0x40; + rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided + + if (buf) { + for (var ii = 0; ii < 16; ii++) { + buf[i + ii] = rnds[ii]; + } + } + + return buf || stringifyUUID(rnds); + } // Rollup will complain about mixing default and named exports in UMD build, + + function _typeof(obj) { + if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { + _typeof = function (obj) { + return typeof obj; + }; + } else { + _typeof = function (obj) { + return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; + }; + } + + return _typeof(obj); + } + + var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; + + function commonjsRequire() { + throw new Error('Dynamic requires are not currently supported by rollup-plugin-commonjs'); + } + + function createCommonjsModule$1(fn, module) { + return module = { + exports: {} + }, fn(module, module.exports), module.exports; + } + + var moment = createCommonjsModule$1(function (module, exports) { + (function (global, factory) { + module.exports = factory(); + })(commonjsGlobal, function () { + var hookCallback; + + function hooks() { + return hookCallback.apply(null, arguments); + } // This is done to register the method called with moment() + // without creating circular dependencies. + + + function setHookCallback(callback) { + hookCallback = callback; + } + + function isArray(input) { + return input instanceof Array || Object.prototype.toString.call(input) === '[object Array]'; + } + + function isObject(input) { + // IE8 will treat undefined and null as object if it wasn't for + // input != null + return input != null && Object.prototype.toString.call(input) === '[object Object]'; + } + + function isObjectEmpty(obj) { + if (Object.getOwnPropertyNames) { + return Object.getOwnPropertyNames(obj).length === 0; + } else { + var k; + + for (k in obj) { + if (obj.hasOwnProperty(k)) { + return false; + } + } + + return true; + } + } + + function isUndefined(input) { + return input === void 0; + } + + function isNumber(input) { + return typeof input === 'number' || Object.prototype.toString.call(input) === '[object Number]'; + } + + function isDate(input) { + return input instanceof Date || Object.prototype.toString.call(input) === '[object Date]'; + } + + function map(arr, fn) { + var res = [], + i; + + for (i = 0; i < arr.length; ++i) { + res.push(fn(arr[i], i)); + } + + return res; + } + + function hasOwnProp(a, b) { + return Object.prototype.hasOwnProperty.call(a, b); + } + + function extend(a, b) { + for (var i in b) { + if (hasOwnProp(b, i)) { + a[i] = b[i]; + } + } + + if (hasOwnProp(b, 'toString')) { + a.toString = b.toString; + } + + if (hasOwnProp(b, 'valueOf')) { + a.valueOf = b.valueOf; + } + + return a; + } + + function createUTC(input, format, locale, strict) { + return createLocalOrUTC(input, format, locale, strict, true).utc(); + } + + function defaultParsingFlags() { + // We need to deep clone this object. + return { + empty: false, + unusedTokens: [], + unusedInput: [], + overflow: -2, + charsLeftOver: 0, + nullInput: false, + invalidMonth: null, + invalidFormat: false, + userInvalidated: false, + iso: false, + parsedDateParts: [], + meridiem: null, + rfc2822: false, + weekdayMismatch: false + }; + } + + function getParsingFlags(m) { + if (m._pf == null) { + m._pf = defaultParsingFlags(); + } + + return m._pf; + } + + var some; + + if (Array.prototype.some) { + some = Array.prototype.some; + } else { + some = function (fun) { + var t = Object(this); + var len = t.length >>> 0; + + for (var i = 0; i < len; i++) { + if (i in t && fun.call(this, t[i], i, t)) { + return true; + } + } + + return false; + }; + } + + function isValid(m) { + if (m._isValid == null) { + var flags = getParsingFlags(m); + var parsedParts = some.call(flags.parsedDateParts, function (i) { + return i != null; + }); + var isNowValid = !isNaN(m._d.getTime()) && flags.overflow < 0 && !flags.empty && !flags.invalidMonth && !flags.invalidWeekday && !flags.weekdayMismatch && !flags.nullInput && !flags.invalidFormat && !flags.userInvalidated && (!flags.meridiem || flags.meridiem && parsedParts); + + if (m._strict) { + isNowValid = isNowValid && flags.charsLeftOver === 0 && flags.unusedTokens.length === 0 && flags.bigHour === undefined; + } + + if (Object.isFrozen == null || !Object.isFrozen(m)) { + m._isValid = isNowValid; + } else { + return isNowValid; + } + } + + return m._isValid; + } + + function createInvalid(flags) { + var m = createUTC(NaN); + + if (flags != null) { + extend(getParsingFlags(m), flags); + } else { + getParsingFlags(m).userInvalidated = true; + } + + return m; + } // Plugins that add properties should also add the key here (null value), + // so we can properly clone ourselves. + + + var momentProperties = hooks.momentProperties = []; + + function copyConfig(to, from) { + var i, prop, val; + + if (!isUndefined(from._isAMomentObject)) { + to._isAMomentObject = from._isAMomentObject; + } + + if (!isUndefined(from._i)) { + to._i = from._i; + } + + if (!isUndefined(from._f)) { + to._f = from._f; + } + + if (!isUndefined(from._l)) { + to._l = from._l; + } + + if (!isUndefined(from._strict)) { + to._strict = from._strict; + } + + if (!isUndefined(from._tzm)) { + to._tzm = from._tzm; + } + + if (!isUndefined(from._isUTC)) { + to._isUTC = from._isUTC; + } + + if (!isUndefined(from._offset)) { + to._offset = from._offset; + } + + if (!isUndefined(from._pf)) { + to._pf = getParsingFlags(from); + } + + if (!isUndefined(from._locale)) { + to._locale = from._locale; + } + + if (momentProperties.length > 0) { + for (i = 0; i < momentProperties.length; i++) { + prop = momentProperties[i]; + val = from[prop]; + + if (!isUndefined(val)) { + to[prop] = val; + } + } + } + + return to; + } + + var updateInProgress = false; // Moment prototype object + + function Moment(config) { + copyConfig(this, config); + this._d = new Date(config._d != null ? config._d.getTime() : NaN); + + if (!this.isValid()) { + this._d = new Date(NaN); + } // Prevent infinite loop in case updateOffset creates new moment + // objects. + + + if (updateInProgress === false) { + updateInProgress = true; + hooks.updateOffset(this); + updateInProgress = false; + } + } + + function isMoment(obj) { + return obj instanceof Moment || obj != null && obj._isAMomentObject != null; + } - function absFloor(number) { - if (number < 0) { - // -0 -> 0 - return Math.ceil(number) || 0; - } else { - return Math.floor(number); - } - } - - function toInt(argumentForCoercion) { - var coercedNumber = +argumentForCoercion, - value = 0; + function absFloor(number) { + if (number < 0) { + // -0 -> 0 + return Math.ceil(number) || 0; + } else { + return Math.floor(number); + } + } + + function toInt(argumentForCoercion) { + var coercedNumber = +argumentForCoercion, + value = 0; - if (coercedNumber !== 0 && isFinite(coercedNumber)) { - value = absFloor(coercedNumber); - } + if (coercedNumber !== 0 && isFinite(coercedNumber)) { + value = absFloor(coercedNumber); + } - return value; - } // compare two arrays, return the number of differences - - - function compareArrays(array1, array2, dontConvert) { - var len = Math.min(array1.length, array2.length), - lengthDiff = Math.abs(array1.length - array2.length), - diffs = 0, - i; - - for (i = 0; i < len; i++) { - if (dontConvert && array1[i] !== array2[i] || !dontConvert && toInt(array1[i]) !== toInt(array2[i])) { - diffs++; - } - } - - return diffs + lengthDiff; - } - - function warn(msg) { - if (hooks.suppressDeprecationWarnings === false && typeof console !== 'undefined' && console.warn) { - console.warn('Deprecation warning: ' + msg); - } - } - - function deprecate(msg, fn) { - var firstTime = true; - return extend(function () { - if (hooks.deprecationHandler != null) { - hooks.deprecationHandler(null, msg); - } - - if (firstTime) { - var args = []; - var arg; - - for (var i = 0; i < arguments.length; i++) { - arg = ''; - - if (typeof arguments[i] === 'object') { - arg += '\n[' + i + '] '; - - for (var key in arguments[0]) { - arg += key + ': ' + arguments[0][key] + ', '; - } - - arg = arg.slice(0, -2); // Remove trailing comma and space - } else { - arg = arguments[i]; - } - - args.push(arg); - } - - warn(msg + '\nArguments: ' + Array.prototype.slice.call(args).join('') + '\n' + new Error().stack); - firstTime = false; - } - - return fn.apply(this, arguments); - }, fn); - } - - var deprecations = {}; - - function deprecateSimple(name, msg) { - if (hooks.deprecationHandler != null) { - hooks.deprecationHandler(name, msg); - } - - if (!deprecations[name]) { - warn(msg); - deprecations[name] = true; - } - } - - hooks.suppressDeprecationWarnings = false; - hooks.deprecationHandler = null; - - function isFunction(input) { - return input instanceof Function || Object.prototype.toString.call(input) === '[object Function]'; - } - - function set(config) { - var prop, i; - - for (i in config) { - prop = config[i]; - - if (isFunction(prop)) { - this[i] = prop; - } else { - this['_' + i] = prop; - } - } - - this._config = config; // Lenient ordinal parsing accepts just a number in addition to - // number + (possibly) stuff coming from _dayOfMonthOrdinalParse. - // TODO: Remove "ordinalParse" fallback in next major release. - - this._dayOfMonthOrdinalParseLenient = new RegExp((this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) + '|' + /\d{1,2}/.source); - } - - function mergeConfigs(parentConfig, childConfig) { - var res = extend({}, parentConfig), - prop; - - for (prop in childConfig) { - if (hasOwnProp(childConfig, prop)) { - if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) { - res[prop] = {}; - extend(res[prop], parentConfig[prop]); - extend(res[prop], childConfig[prop]); - } else if (childConfig[prop] != null) { - res[prop] = childConfig[prop]; - } else { - delete res[prop]; - } - } - } - - for (prop in parentConfig) { - if (hasOwnProp(parentConfig, prop) && !hasOwnProp(childConfig, prop) && isObject(parentConfig[prop])) { - // make sure changes to properties don't modify parent config - res[prop] = extend({}, res[prop]); - } - } - - return res; - } - - function Locale(config) { - if (config != null) { - this.set(config); - } - } - - var keys; - - if (Object.keys) { - keys = Object.keys; - } else { - keys = function (obj) { - var i, - res = []; - - for (i in obj) { - if (hasOwnProp(obj, i)) { - res.push(i); - } - } - - return res; - }; - } - - var defaultCalendar = { - sameDay: '[Today at] LT', - nextDay: '[Tomorrow at] LT', - nextWeek: 'dddd [at] LT', - lastDay: '[Yesterday at] LT', - lastWeek: '[Last] dddd [at] LT', - sameElse: 'L' - }; - - function calendar(key, mom, now) { - var output = this._calendar[key] || this._calendar['sameElse']; - return isFunction(output) ? output.call(mom, now) : output; - } - - var defaultLongDateFormat = { - LTS: 'h:mm:ss A', - LT: 'h:mm A', - L: 'MM/DD/YYYY', - LL: 'MMMM D, YYYY', - LLL: 'MMMM D, YYYY h:mm A', - LLLL: 'dddd, MMMM D, YYYY h:mm A' - }; - - function longDateFormat(key) { - var format = this._longDateFormat[key], - formatUpper = this._longDateFormat[key.toUpperCase()]; - - if (format || !formatUpper) { - return format; - } - - this._longDateFormat[key] = formatUpper.replace(/MMMM|MM|DD|dddd/g, function (val) { - return val.slice(1); - }); - return this._longDateFormat[key]; - } - - var defaultInvalidDate = 'Invalid date'; - - function invalidDate() { - return this._invalidDate; - } - - var defaultOrdinal = '%d'; - var defaultDayOfMonthOrdinalParse = /\d{1,2}/; - - function ordinal(number) { - return this._ordinal.replace('%d', number); - } - - var defaultRelativeTime = { - future: 'in %s', - past: '%s ago', - s: 'a few seconds', - ss: '%d seconds', - m: 'a minute', - mm: '%d minutes', - h: 'an hour', - hh: '%d hours', - d: 'a day', - dd: '%d days', - M: 'a month', - MM: '%d months', - y: 'a year', - yy: '%d years' - }; - - function relativeTime(number, withoutSuffix, string, isFuture) { - var output = this._relativeTime[string]; - return isFunction(output) ? output(number, withoutSuffix, string, isFuture) : output.replace(/%d/i, number); - } - - function pastFuture(diff, output) { - var format = this._relativeTime[diff > 0 ? 'future' : 'past']; - return isFunction(format) ? format(output) : format.replace(/%s/i, output); - } - - var aliases = {}; - - function addUnitAlias(unit, shorthand) { - var lowerCase = unit.toLowerCase(); - aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit; - } - - function normalizeUnits(units) { - return typeof units === 'string' ? aliases[units] || aliases[units.toLowerCase()] : undefined; - } - - function normalizeObjectUnits(inputObject) { - var normalizedInput = {}, - normalizedProp, - prop; - - for (prop in inputObject) { - if (hasOwnProp(inputObject, prop)) { - normalizedProp = normalizeUnits(prop); - - if (normalizedProp) { - normalizedInput[normalizedProp] = inputObject[prop]; - } - } - } - - return normalizedInput; - } - - var priorities = {}; - - function addUnitPriority(unit, priority) { - priorities[unit] = priority; - } - - function getPrioritizedUnits(unitsObj) { - var units = []; - - for (var u in unitsObj) { - units.push({ - unit: u, - priority: priorities[u] - }); - } - - units.sort(function (a, b) { - return a.priority - b.priority; - }); - return units; - } - - function zeroFill(number, targetLength, forceSign) { - var absNumber = '' + Math.abs(number), - zerosToFill = targetLength - absNumber.length, - sign = number >= 0; - return (sign ? forceSign ? '+' : '' : '-') + Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) + absNumber; - } - - var formattingTokens = /(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g; - var localFormattingTokens = /(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g; - var formatFunctions = {}; - var formatTokenFunctions = {}; // token: 'M' - // padded: ['MM', 2] - // ordinal: 'Mo' - // callback: function () { this.month() + 1 } - - function addFormatToken(token, padded, ordinal, callback) { - var func = callback; - - if (typeof callback === 'string') { - func = function () { - return this[callback](); - }; - } - - if (token) { - formatTokenFunctions[token] = func; - } - - if (padded) { - formatTokenFunctions[padded[0]] = function () { - return zeroFill(func.apply(this, arguments), padded[1], padded[2]); - }; - } + return value; + } // compare two arrays, return the number of differences + + + function compareArrays(array1, array2, dontConvert) { + var len = Math.min(array1.length, array2.length), + lengthDiff = Math.abs(array1.length - array2.length), + diffs = 0, + i; + + for (i = 0; i < len; i++) { + if (dontConvert && array1[i] !== array2[i] || !dontConvert && toInt(array1[i]) !== toInt(array2[i])) { + diffs++; + } + } + + return diffs + lengthDiff; + } + + function warn(msg) { + if (hooks.suppressDeprecationWarnings === false && typeof console !== 'undefined' && console.warn) { + console.warn('Deprecation warning: ' + msg); + } + } + + function deprecate(msg, fn) { + var firstTime = true; + return extend(function () { + if (hooks.deprecationHandler != null) { + hooks.deprecationHandler(null, msg); + } + + if (firstTime) { + var args = []; + var arg; + + for (var i = 0; i < arguments.length; i++) { + arg = ''; + + if (typeof arguments[i] === 'object') { + arg += '\n[' + i + '] '; + + for (var key in arguments[0]) { + arg += key + ': ' + arguments[0][key] + ', '; + } + + arg = arg.slice(0, -2); // Remove trailing comma and space + } else { + arg = arguments[i]; + } + + args.push(arg); + } + + warn(msg + '\nArguments: ' + Array.prototype.slice.call(args).join('') + '\n' + new Error().stack); + firstTime = false; + } + + return fn.apply(this, arguments); + }, fn); + } + + var deprecations = {}; + + function deprecateSimple(name, msg) { + if (hooks.deprecationHandler != null) { + hooks.deprecationHandler(name, msg); + } + + if (!deprecations[name]) { + warn(msg); + deprecations[name] = true; + } + } + + hooks.suppressDeprecationWarnings = false; + hooks.deprecationHandler = null; + + function isFunction(input) { + return input instanceof Function || Object.prototype.toString.call(input) === '[object Function]'; + } + + function set(config) { + var prop, i; + + for (i in config) { + prop = config[i]; + + if (isFunction(prop)) { + this[i] = prop; + } else { + this['_' + i] = prop; + } + } + + this._config = config; // Lenient ordinal parsing accepts just a number in addition to + // number + (possibly) stuff coming from _dayOfMonthOrdinalParse. + // TODO: Remove "ordinalParse" fallback in next major release. + + this._dayOfMonthOrdinalParseLenient = new RegExp((this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) + '|' + /\d{1,2}/.source); + } + + function mergeConfigs(parentConfig, childConfig) { + var res = extend({}, parentConfig), + prop; + + for (prop in childConfig) { + if (hasOwnProp(childConfig, prop)) { + if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) { + res[prop] = {}; + extend(res[prop], parentConfig[prop]); + extend(res[prop], childConfig[prop]); + } else if (childConfig[prop] != null) { + res[prop] = childConfig[prop]; + } else { + delete res[prop]; + } + } + } + + for (prop in parentConfig) { + if (hasOwnProp(parentConfig, prop) && !hasOwnProp(childConfig, prop) && isObject(parentConfig[prop])) { + // make sure changes to properties don't modify parent config + res[prop] = extend({}, res[prop]); + } + } + + return res; + } + + function Locale(config) { + if (config != null) { + this.set(config); + } + } + + var keys; + + if (Object.keys) { + keys = Object.keys; + } else { + keys = function (obj) { + var i, + res = []; + + for (i in obj) { + if (hasOwnProp(obj, i)) { + res.push(i); + } + } + + return res; + }; + } + + var defaultCalendar = { + sameDay: '[Today at] LT', + nextDay: '[Tomorrow at] LT', + nextWeek: 'dddd [at] LT', + lastDay: '[Yesterday at] LT', + lastWeek: '[Last] dddd [at] LT', + sameElse: 'L' + }; + + function calendar(key, mom, now) { + var output = this._calendar[key] || this._calendar['sameElse']; + return isFunction(output) ? output.call(mom, now) : output; + } + + var defaultLongDateFormat = { + LTS: 'h:mm:ss A', + LT: 'h:mm A', + L: 'MM/DD/YYYY', + LL: 'MMMM D, YYYY', + LLL: 'MMMM D, YYYY h:mm A', + LLLL: 'dddd, MMMM D, YYYY h:mm A' + }; + + function longDateFormat(key) { + var format = this._longDateFormat[key], + formatUpper = this._longDateFormat[key.toUpperCase()]; + + if (format || !formatUpper) { + return format; + } + + this._longDateFormat[key] = formatUpper.replace(/MMMM|MM|DD|dddd/g, function (val) { + return val.slice(1); + }); + return this._longDateFormat[key]; + } + + var defaultInvalidDate = 'Invalid date'; + + function invalidDate() { + return this._invalidDate; + } + + var defaultOrdinal = '%d'; + var defaultDayOfMonthOrdinalParse = /\d{1,2}/; + + function ordinal(number) { + return this._ordinal.replace('%d', number); + } + + var defaultRelativeTime = { + future: 'in %s', + past: '%s ago', + s: 'a few seconds', + ss: '%d seconds', + m: 'a minute', + mm: '%d minutes', + h: 'an hour', + hh: '%d hours', + d: 'a day', + dd: '%d days', + M: 'a month', + MM: '%d months', + y: 'a year', + yy: '%d years' + }; + + function relativeTime(number, withoutSuffix, string, isFuture) { + var output = this._relativeTime[string]; + return isFunction(output) ? output(number, withoutSuffix, string, isFuture) : output.replace(/%d/i, number); + } + + function pastFuture(diff, output) { + var format = this._relativeTime[diff > 0 ? 'future' : 'past']; + return isFunction(format) ? format(output) : format.replace(/%s/i, output); + } + + var aliases = {}; + + function addUnitAlias(unit, shorthand) { + var lowerCase = unit.toLowerCase(); + aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit; + } + + function normalizeUnits(units) { + return typeof units === 'string' ? aliases[units] || aliases[units.toLowerCase()] : undefined; + } + + function normalizeObjectUnits(inputObject) { + var normalizedInput = {}, + normalizedProp, + prop; + + for (prop in inputObject) { + if (hasOwnProp(inputObject, prop)) { + normalizedProp = normalizeUnits(prop); + + if (normalizedProp) { + normalizedInput[normalizedProp] = inputObject[prop]; + } + } + } + + return normalizedInput; + } + + var priorities = {}; + + function addUnitPriority(unit, priority) { + priorities[unit] = priority; + } + + function getPrioritizedUnits(unitsObj) { + var units = []; + + for (var u in unitsObj) { + units.push({ + unit: u, + priority: priorities[u] + }); + } + + units.sort(function (a, b) { + return a.priority - b.priority; + }); + return units; + } + + function zeroFill(number, targetLength, forceSign) { + var absNumber = '' + Math.abs(number), + zerosToFill = targetLength - absNumber.length, + sign = number >= 0; + return (sign ? forceSign ? '+' : '' : '-') + Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) + absNumber; + } + + var formattingTokens = /(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g; + var localFormattingTokens = /(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g; + var formatFunctions = {}; + var formatTokenFunctions = {}; // token: 'M' + // padded: ['MM', 2] + // ordinal: 'Mo' + // callback: function () { this.month() + 1 } + + function addFormatToken(token, padded, ordinal, callback) { + var func = callback; + + if (typeof callback === 'string') { + func = function () { + return this[callback](); + }; + } + + if (token) { + formatTokenFunctions[token] = func; + } + + if (padded) { + formatTokenFunctions[padded[0]] = function () { + return zeroFill(func.apply(this, arguments), padded[1], padded[2]); + }; + } - if (ordinal) { - formatTokenFunctions[ordinal] = function () { - return this.localeData().ordinal(func.apply(this, arguments), token); - }; - } - } + if (ordinal) { + formatTokenFunctions[ordinal] = function () { + return this.localeData().ordinal(func.apply(this, arguments), token); + }; + } + } - function removeFormattingTokens(input) { - if (input.match(/\[[\s\S]/)) { - return input.replace(/^\[|\]$/g, ''); - } + function removeFormattingTokens(input) { + if (input.match(/\[[\s\S]/)) { + return input.replace(/^\[|\]$/g, ''); + } - return input.replace(/\\/g, ''); - } + return input.replace(/\\/g, ''); + } - function makeFormatFunction(format) { - var array = format.match(formattingTokens), - i, - length; + function makeFormatFunction(format) { + var array = format.match(formattingTokens), + i, + length; - for (i = 0, length = array.length; i < length; i++) { - if (formatTokenFunctions[array[i]]) { - array[i] = formatTokenFunctions[array[i]]; - } else { - array[i] = removeFormattingTokens(array[i]); - } - } + for (i = 0, length = array.length; i < length; i++) { + if (formatTokenFunctions[array[i]]) { + array[i] = formatTokenFunctions[array[i]]; + } else { + array[i] = removeFormattingTokens(array[i]); + } + } - return function (mom) { - var output = '', - i; + return function (mom) { + var output = '', + i; - for (i = 0; i < length; i++) { - output += isFunction(array[i]) ? array[i].call(mom, format) : array[i]; - } + for (i = 0; i < length; i++) { + output += isFunction(array[i]) ? array[i].call(mom, format) : array[i]; + } - return output; - }; - } // format date using native date object + return output; + }; + } // format date using native date object - function formatMoment(m, format) { - if (!m.isValid()) { - return m.localeData().invalidDate(); - } + function formatMoment(m, format) { + if (!m.isValid()) { + return m.localeData().invalidDate(); + } - format = expandFormat(format, m.localeData()); - formatFunctions[format] = formatFunctions[format] || makeFormatFunction(format); - return formatFunctions[format](m); - } + format = expandFormat(format, m.localeData()); + formatFunctions[format] = formatFunctions[format] || makeFormatFunction(format); + return formatFunctions[format](m); + } - function expandFormat(format, locale) { - var i = 5; + function expandFormat(format, locale) { + var i = 5; - function replaceLongDateFormatTokens(input) { - return locale.longDateFormat(input) || input; - } + function replaceLongDateFormatTokens(input) { + return locale.longDateFormat(input) || input; + } - localFormattingTokens.lastIndex = 0; + localFormattingTokens.lastIndex = 0; - while (i >= 0 && localFormattingTokens.test(format)) { - format = format.replace(localFormattingTokens, replaceLongDateFormatTokens); - localFormattingTokens.lastIndex = 0; - i -= 1; - } + while (i >= 0 && localFormattingTokens.test(format)) { + format = format.replace(localFormattingTokens, replaceLongDateFormatTokens); + localFormattingTokens.lastIndex = 0; + i -= 1; + } - return format; - } + return format; + } - var match1 = /\d/; // 0 - 9 + var match1 = /\d/; // 0 - 9 - var match2 = /\d\d/; // 00 - 99 + var match2 = /\d\d/; // 00 - 99 - var match3 = /\d{3}/; // 000 - 999 + var match3 = /\d{3}/; // 000 - 999 - var match4 = /\d{4}/; // 0000 - 9999 + var match4 = /\d{4}/; // 0000 - 9999 - var match6 = /[+-]?\d{6}/; // -999999 - 999999 + var match6 = /[+-]?\d{6}/; // -999999 - 999999 - var match1to2 = /\d\d?/; // 0 - 99 + var match1to2 = /\d\d?/; // 0 - 99 - var match3to4 = /\d\d\d\d?/; // 999 - 9999 + var match3to4 = /\d\d\d\d?/; // 999 - 9999 - var match5to6 = /\d\d\d\d\d\d?/; // 99999 - 999999 + var match5to6 = /\d\d\d\d\d\d?/; // 99999 - 999999 - var match1to3 = /\d{1,3}/; // 0 - 999 + var match1to3 = /\d{1,3}/; // 0 - 999 - var match1to4 = /\d{1,4}/; // 0 - 9999 + var match1to4 = /\d{1,4}/; // 0 - 9999 - var match1to6 = /[+-]?\d{1,6}/; // -999999 - 999999 + var match1to6 = /[+-]?\d{1,6}/; // -999999 - 999999 - var matchUnsigned = /\d+/; // 0 - inf + var matchUnsigned = /\d+/; // 0 - inf - var matchSigned = /[+-]?\d+/; // -inf - inf + var matchSigned = /[+-]?\d+/; // -inf - inf - var matchOffset = /Z|[+-]\d\d:?\d\d/gi; // +00:00 -00:00 +0000 -0000 or Z + var matchOffset = /Z|[+-]\d\d:?\d\d/gi; // +00:00 -00:00 +0000 -0000 or Z - var matchShortOffset = /Z|[+-]\d\d(?::?\d\d)?/gi; // +00 -00 +00:00 -00:00 +0000 -0000 or Z + var matchShortOffset = /Z|[+-]\d\d(?::?\d\d)?/gi; // +00 -00 +00:00 -00:00 +0000 -0000 or Z - var matchTimestamp = /[+-]?\d+(\.\d{1,3})?/; // 123456789 123456789.123 - // any word (or two) characters or numbers including two/three word month in arabic. - // includes scottish gaelic two word and hyphenated months + var matchTimestamp = /[+-]?\d+(\.\d{1,3})?/; // 123456789 123456789.123 + // any word (or two) characters or numbers including two/three word month in arabic. + // includes scottish gaelic two word and hyphenated months - var matchWord = /[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i; - var regexes = {}; + var matchWord = /[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i; + var regexes = {}; - function addRegexToken(token, regex, strictRegex) { - regexes[token] = isFunction(regex) ? regex : function (isStrict, localeData) { - return isStrict && strictRegex ? strictRegex : regex; - }; - } + function addRegexToken(token, regex, strictRegex) { + regexes[token] = isFunction(regex) ? regex : function (isStrict, localeData) { + return isStrict && strictRegex ? strictRegex : regex; + }; + } - function getParseRegexForToken(token, config) { - if (!hasOwnProp(regexes, token)) { - return new RegExp(unescapeFormat(token)); - } + function getParseRegexForToken(token, config) { + if (!hasOwnProp(regexes, token)) { + return new RegExp(unescapeFormat(token)); + } - return regexes[token](config._strict, config._locale); - } // Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript + return regexes[token](config._strict, config._locale); + } // Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript - function unescapeFormat(s) { - return regexEscape(s.replace('\\', '').replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g, function (matched, p1, p2, p3, p4) { - return p1 || p2 || p3 || p4; - })); - } + function unescapeFormat(s) { + return regexEscape(s.replace('\\', '').replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g, function (matched, p1, p2, p3, p4) { + return p1 || p2 || p3 || p4; + })); + } - function regexEscape(s) { - return s.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&'); - } + function regexEscape(s) { + return s.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&'); + } - var tokens = {}; + var tokens = {}; - function addParseToken(token, callback) { - var i, - func = callback; + function addParseToken(token, callback) { + var i, + func = callback; - if (typeof token === 'string') { - token = [token]; - } + if (typeof token === 'string') { + token = [token]; + } - if (isNumber(callback)) { - func = function (input, array) { - array[callback] = toInt(input); - }; - } + if (isNumber(callback)) { + func = function (input, array) { + array[callback] = toInt(input); + }; + } - for (i = 0; i < token.length; i++) { - tokens[token[i]] = func; - } - } + for (i = 0; i < token.length; i++) { + tokens[token[i]] = func; + } + } - function addWeekParseToken(token, callback) { - addParseToken(token, function (input, array, config, token) { - config._w = config._w || {}; - callback(input, config._w, config, token); - }); - } + function addWeekParseToken(token, callback) { + addParseToken(token, function (input, array, config, token) { + config._w = config._w || {}; + callback(input, config._w, config, token); + }); + } - function addTimeToArrayFromToken(token, input, config) { - if (input != null && hasOwnProp(tokens, token)) { - tokens[token](input, config._a, config, token); - } - } + function addTimeToArrayFromToken(token, input, config) { + if (input != null && hasOwnProp(tokens, token)) { + tokens[token](input, config._a, config, token); + } + } - var YEAR = 0; - var MONTH = 1; - var DATE = 2; - var HOUR = 3; - var MINUTE = 4; - var SECOND = 5; - var MILLISECOND = 6; - var WEEK = 7; - var WEEKDAY = 8; // FORMATTING - - addFormatToken('Y', 0, 0, function () { - var y = this.year(); - return y <= 9999 ? '' + y : '+' + y; - }); - addFormatToken(0, ['YY', 2], 0, function () { - return this.year() % 100; - }); - addFormatToken(0, ['YYYY', 4], 0, 'year'); - addFormatToken(0, ['YYYYY', 5], 0, 'year'); - addFormatToken(0, ['YYYYYY', 6, true], 0, 'year'); // ALIASES - - addUnitAlias('year', 'y'); // PRIORITIES - - addUnitPriority('year', 1); // PARSING - - addRegexToken('Y', matchSigned); - addRegexToken('YY', match1to2, match2); - addRegexToken('YYYY', match1to4, match4); - addRegexToken('YYYYY', match1to6, match6); - addRegexToken('YYYYYY', match1to6, match6); - addParseToken(['YYYYY', 'YYYYYY'], YEAR); - addParseToken('YYYY', function (input, array) { - array[YEAR] = input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input); - }); - addParseToken('YY', function (input, array) { - array[YEAR] = hooks.parseTwoDigitYear(input); - }); - addParseToken('Y', function (input, array) { - array[YEAR] = parseInt(input, 10); - }); // HELPERS - - function daysInYear(year) { - return isLeapYear(year) ? 366 : 365; - } - - function isLeapYear(year) { - return year % 4 === 0 && year % 100 !== 0 || year % 400 === 0; - } // HOOKS - - - hooks.parseTwoDigitYear = function (input) { - return toInt(input) + (toInt(input) > 68 ? 1900 : 2000); - }; // MOMENTS - - - var getSetYear = makeGetSet('FullYear', true); - - function getIsLeapYear() { - return isLeapYear(this.year()); - } - - function makeGetSet(unit, keepTime) { - return function (value) { - if (value != null) { - set$1(this, unit, value); - hooks.updateOffset(this, keepTime); - return this; - } else { - return get(this, unit); - } - }; - } - - function get(mom, unit) { - return mom.isValid() ? mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]() : NaN; - } - - function set$1(mom, unit, value) { - if (mom.isValid() && !isNaN(value)) { - if (unit === 'FullYear' && isLeapYear(mom.year()) && mom.month() === 1 && mom.date() === 29) { - mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value, mom.month(), daysInMonth(value, mom.month())); - } else { - mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value); - } - } - } // MOMENTS - - - function stringGet(units) { - units = normalizeUnits(units); - - if (isFunction(this[units])) { - return this[units](); - } - - return this; - } - - function stringSet(units, value) { - if (typeof units === 'object') { - units = normalizeObjectUnits(units); - var prioritized = getPrioritizedUnits(units); - - for (var i = 0; i < prioritized.length; i++) { - this[prioritized[i].unit](units[prioritized[i].unit]); - } - } else { - units = normalizeUnits(units); - - if (isFunction(this[units])) { - return this[units](value); - } - } - - return this; - } - - function mod(n, x) { - return (n % x + x) % x; - } - - var indexOf; - - if (Array.prototype.indexOf) { - indexOf = Array.prototype.indexOf; - } else { - indexOf = function (o) { - // I know - var i; - - for (i = 0; i < this.length; ++i) { - if (this[i] === o) { - return i; - } - } - - return -1; - }; - } - - function daysInMonth(year, month) { - if (isNaN(year) || isNaN(month)) { - return NaN; - } - - var modMonth = mod(month, 12); - year += (month - modMonth) / 12; - return modMonth === 1 ? isLeapYear(year) ? 29 : 28 : 31 - modMonth % 7 % 2; - } // FORMATTING - - - addFormatToken('M', ['MM', 2], 'Mo', function () { - return this.month() + 1; - }); - addFormatToken('MMM', 0, 0, function (format) { - return this.localeData().monthsShort(this, format); - }); - addFormatToken('MMMM', 0, 0, function (format) { - return this.localeData().months(this, format); - }); // ALIASES - - addUnitAlias('month', 'M'); // PRIORITY - - addUnitPriority('month', 8); // PARSING - - addRegexToken('M', match1to2); - addRegexToken('MM', match1to2, match2); - addRegexToken('MMM', function (isStrict, locale) { - return locale.monthsShortRegex(isStrict); - }); - addRegexToken('MMMM', function (isStrict, locale) { - return locale.monthsRegex(isStrict); - }); - addParseToken(['M', 'MM'], function (input, array) { - array[MONTH] = toInt(input) - 1; - }); - addParseToken(['MMM', 'MMMM'], function (input, array, config, token) { - var month = config._locale.monthsParse(input, token, config._strict); // if we didn't find a month name, mark the date as invalid. - - - if (month != null) { - array[MONTH] = month; - } else { - getParsingFlags(config).invalidMonth = input; - } - }); // LOCALES - - var MONTHS_IN_FORMAT = /D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/; - var defaultLocaleMonths = 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'); - - function localeMonths(m, format) { - if (!m) { - return isArray(this._months) ? this._months : this._months['standalone']; - } - - return isArray(this._months) ? this._months[m.month()] : this._months[(this._months.isFormat || MONTHS_IN_FORMAT).test(format) ? 'format' : 'standalone'][m.month()]; - } - - var defaultLocaleMonthsShort = 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'); - - function localeMonthsShort(m, format) { - if (!m) { - return isArray(this._monthsShort) ? this._monthsShort : this._monthsShort['standalone']; - } - - return isArray(this._monthsShort) ? this._monthsShort[m.month()] : this._monthsShort[MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'][m.month()]; - } - - function handleStrictParse(monthName, format, strict) { - var i, - ii, - mom, - llc = monthName.toLocaleLowerCase(); - - if (!this._monthsParse) { - // this is not used - this._monthsParse = []; - this._longMonthsParse = []; - this._shortMonthsParse = []; - - for (i = 0; i < 12; ++i) { - mom = createUTC([2000, i]); - this._shortMonthsParse[i] = this.monthsShort(mom, '').toLocaleLowerCase(); - this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase(); - } - } - - if (strict) { - if (format === 'MMM') { - ii = indexOf.call(this._shortMonthsParse, llc); - return ii !== -1 ? ii : null; - } else { - ii = indexOf.call(this._longMonthsParse, llc); - return ii !== -1 ? ii : null; - } - } else { - if (format === 'MMM') { - ii = indexOf.call(this._shortMonthsParse, llc); - - if (ii !== -1) { - return ii; - } - - ii = indexOf.call(this._longMonthsParse, llc); - return ii !== -1 ? ii : null; - } else { - ii = indexOf.call(this._longMonthsParse, llc); - - if (ii !== -1) { - return ii; - } - - ii = indexOf.call(this._shortMonthsParse, llc); - return ii !== -1 ? ii : null; - } - } - } - - function localeMonthsParse(monthName, format, strict) { - var i, mom, regex; - - if (this._monthsParseExact) { - return handleStrictParse.call(this, monthName, format, strict); - } - - if (!this._monthsParse) { - this._monthsParse = []; - this._longMonthsParse = []; - this._shortMonthsParse = []; - } // TODO: add sorting - // Sorting makes sure if one month (or abbr) is a prefix of another - // see sorting in computeMonthsParse - - - for (i = 0; i < 12; i++) { - // make the regex if we don't have it already - mom = createUTC([2000, i]); - - if (strict && !this._longMonthsParse[i]) { - this._longMonthsParse[i] = new RegExp('^' + this.months(mom, '').replace('.', '') + '$', 'i'); - this._shortMonthsParse[i] = new RegExp('^' + this.monthsShort(mom, '').replace('.', '') + '$', 'i'); - } - - if (!strict && !this._monthsParse[i]) { - regex = '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, ''); - this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i'); - } // test the regex - - - if (strict && format === 'MMMM' && this._longMonthsParse[i].test(monthName)) { - return i; - } else if (strict && format === 'MMM' && this._shortMonthsParse[i].test(monthName)) { - return i; - } else if (!strict && this._monthsParse[i].test(monthName)) { - return i; - } - } - } // MOMENTS - - - function setMonth(mom, value) { - var dayOfMonth; - - if (!mom.isValid()) { - // No op - return mom; - } - - if (typeof value === 'string') { - if (/^\d+$/.test(value)) { - value = toInt(value); - } else { - value = mom.localeData().monthsParse(value); // TODO: Another silent failure? - - if (!isNumber(value)) { - return mom; - } - } - } - - dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value)); - - mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth); - - return mom; - } - - function getSetMonth(value) { - if (value != null) { - setMonth(this, value); - hooks.updateOffset(this, true); - return this; - } else { - return get(this, 'Month'); - } - } - - function getDaysInMonth() { - return daysInMonth(this.year(), this.month()); - } - - var defaultMonthsShortRegex = matchWord; - - function monthsShortRegex(isStrict) { - if (this._monthsParseExact) { - if (!hasOwnProp(this, '_monthsRegex')) { - computeMonthsParse.call(this); - } - - if (isStrict) { - return this._monthsShortStrictRegex; - } else { - return this._monthsShortRegex; - } - } else { - if (!hasOwnProp(this, '_monthsShortRegex')) { - this._monthsShortRegex = defaultMonthsShortRegex; - } - - return this._monthsShortStrictRegex && isStrict ? this._monthsShortStrictRegex : this._monthsShortRegex; - } - } - - var defaultMonthsRegex = matchWord; - - function monthsRegex(isStrict) { - if (this._monthsParseExact) { - if (!hasOwnProp(this, '_monthsRegex')) { - computeMonthsParse.call(this); - } - - if (isStrict) { - return this._monthsStrictRegex; - } else { - return this._monthsRegex; - } - } else { - if (!hasOwnProp(this, '_monthsRegex')) { - this._monthsRegex = defaultMonthsRegex; - } - - return this._monthsStrictRegex && isStrict ? this._monthsStrictRegex : this._monthsRegex; - } - } - - function computeMonthsParse() { - function cmpLenRev(a, b) { - return b.length - a.length; - } - - var shortPieces = [], - longPieces = [], - mixedPieces = [], - i, - mom; - - for (i = 0; i < 12; i++) { - // make the regex if we don't have it already - mom = createUTC([2000, i]); - shortPieces.push(this.monthsShort(mom, '')); - longPieces.push(this.months(mom, '')); - mixedPieces.push(this.months(mom, '')); - mixedPieces.push(this.monthsShort(mom, '')); - } // Sorting makes sure if one month (or abbr) is a prefix of another it - // will match the longer piece. - - - shortPieces.sort(cmpLenRev); - longPieces.sort(cmpLenRev); - mixedPieces.sort(cmpLenRev); - - for (i = 0; i < 12; i++) { - shortPieces[i] = regexEscape(shortPieces[i]); - longPieces[i] = regexEscape(longPieces[i]); - } - - for (i = 0; i < 24; i++) { - mixedPieces[i] = regexEscape(mixedPieces[i]); - } - - this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i'); - this._monthsShortRegex = this._monthsRegex; - this._monthsStrictRegex = new RegExp('^(' + longPieces.join('|') + ')', 'i'); - this._monthsShortStrictRegex = new RegExp('^(' + shortPieces.join('|') + ')', 'i'); - } - - function createDate(y, m, d, h, M, s, ms) { - // can't just apply() to create a date: - // https://stackoverflow.com/q/181348 - var date; // the date constructor remaps years 0-99 to 1900-1999 - - if (y < 100 && y >= 0) { - // preserve leap years using a full 400 year cycle, then reset - date = new Date(y + 400, m, d, h, M, s, ms); - - if (isFinite(date.getFullYear())) { - date.setFullYear(y); - } - } else { - date = new Date(y, m, d, h, M, s, ms); - } - - return date; - } - - function createUTCDate(y) { - var date; // the Date.UTC function remaps years 0-99 to 1900-1999 - - if (y < 100 && y >= 0) { - var args = Array.prototype.slice.call(arguments); // preserve leap years using a full 400 year cycle, then reset - - args[0] = y + 400; - date = new Date(Date.UTC.apply(null, args)); - - if (isFinite(date.getUTCFullYear())) { - date.setUTCFullYear(y); - } - } else { - date = new Date(Date.UTC.apply(null, arguments)); - } - - return date; - } // start-of-first-week - start-of-year - - - function firstWeekOffset(year, dow, doy) { - var // first-week day -- which january is always in the first week (4 for iso, 1 for other) - fwd = 7 + dow - doy, - // first-week day local weekday -- which local weekday is fwd - fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7; - return -fwdlw + fwd - 1; - } // https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday - - - function dayOfYearFromWeeks(year, week, weekday, dow, doy) { - var localWeekday = (7 + weekday - dow) % 7, - weekOffset = firstWeekOffset(year, dow, doy), - dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset, - resYear, - resDayOfYear; - - if (dayOfYear <= 0) { - resYear = year - 1; - resDayOfYear = daysInYear(resYear) + dayOfYear; - } else if (dayOfYear > daysInYear(year)) { - resYear = year + 1; - resDayOfYear = dayOfYear - daysInYear(year); - } else { - resYear = year; - resDayOfYear = dayOfYear; - } - - return { - year: resYear, - dayOfYear: resDayOfYear - }; - } - - function weekOfYear(mom, dow, doy) { - var weekOffset = firstWeekOffset(mom.year(), dow, doy), - week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1, - resWeek, - resYear; - - if (week < 1) { - resYear = mom.year() - 1; - resWeek = week + weeksInYear(resYear, dow, doy); - } else if (week > weeksInYear(mom.year(), dow, doy)) { - resWeek = week - weeksInYear(mom.year(), dow, doy); - resYear = mom.year() + 1; - } else { - resYear = mom.year(); - resWeek = week; - } - - return { - week: resWeek, - year: resYear - }; - } - - function weeksInYear(year, dow, doy) { - var weekOffset = firstWeekOffset(year, dow, doy), - weekOffsetNext = firstWeekOffset(year + 1, dow, doy); - return (daysInYear(year) - weekOffset + weekOffsetNext) / 7; - } // FORMATTING - - - addFormatToken('w', ['ww', 2], 'wo', 'week'); - addFormatToken('W', ['WW', 2], 'Wo', 'isoWeek'); // ALIASES - - addUnitAlias('week', 'w'); - addUnitAlias('isoWeek', 'W'); // PRIORITIES - - addUnitPriority('week', 5); - addUnitPriority('isoWeek', 5); // PARSING - - addRegexToken('w', match1to2); - addRegexToken('ww', match1to2, match2); - addRegexToken('W', match1to2); - addRegexToken('WW', match1to2, match2); - addWeekParseToken(['w', 'ww', 'W', 'WW'], function (input, week, config, token) { - week[token.substr(0, 1)] = toInt(input); - }); // HELPERS - // LOCALES - - function localeWeek(mom) { - return weekOfYear(mom, this._week.dow, this._week.doy).week; - } - - var defaultLocaleWeek = { - dow: 0, - // Sunday is the first day of the week. - doy: 6 // The week that contains Jan 6th is the first week of the year. - - }; - - function localeFirstDayOfWeek() { - return this._week.dow; - } - - function localeFirstDayOfYear() { - return this._week.doy; - } // MOMENTS - - - function getSetWeek(input) { - var week = this.localeData().week(this); - return input == null ? week : this.add((input - week) * 7, 'd'); - } - - function getSetISOWeek(input) { - var week = weekOfYear(this, 1, 4).week; - return input == null ? week : this.add((input - week) * 7, 'd'); - } // FORMATTING - - - addFormatToken('d', 0, 'do', 'day'); - addFormatToken('dd', 0, 0, function (format) { - return this.localeData().weekdaysMin(this, format); - }); - addFormatToken('ddd', 0, 0, function (format) { - return this.localeData().weekdaysShort(this, format); - }); - addFormatToken('dddd', 0, 0, function (format) { - return this.localeData().weekdays(this, format); - }); - addFormatToken('e', 0, 0, 'weekday'); - addFormatToken('E', 0, 0, 'isoWeekday'); // ALIASES - - addUnitAlias('day', 'd'); - addUnitAlias('weekday', 'e'); - addUnitAlias('isoWeekday', 'E'); // PRIORITY - - addUnitPriority('day', 11); - addUnitPriority('weekday', 11); - addUnitPriority('isoWeekday', 11); // PARSING - - addRegexToken('d', match1to2); - addRegexToken('e', match1to2); - addRegexToken('E', match1to2); - addRegexToken('dd', function (isStrict, locale) { - return locale.weekdaysMinRegex(isStrict); - }); - addRegexToken('ddd', function (isStrict, locale) { - return locale.weekdaysShortRegex(isStrict); - }); - addRegexToken('dddd', function (isStrict, locale) { - return locale.weekdaysRegex(isStrict); - }); - addWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) { - var weekday = config._locale.weekdaysParse(input, token, config._strict); // if we didn't get a weekday name, mark the date as invalid - - - if (weekday != null) { - week.d = weekday; - } else { - getParsingFlags(config).invalidWeekday = input; - } - }); - addWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) { - week[token] = toInt(input); - }); // HELPERS - - function parseWeekday(input, locale) { - if (typeof input !== 'string') { - return input; - } - - if (!isNaN(input)) { - return parseInt(input, 10); - } - - input = locale.weekdaysParse(input); - - if (typeof input === 'number') { - return input; - } - - return null; - } - - function parseIsoWeekday(input, locale) { - if (typeof input === 'string') { - return locale.weekdaysParse(input) % 7 || 7; - } - - return isNaN(input) ? null : input; - } // LOCALES - - - function shiftWeekdays(ws, n) { - return ws.slice(n, 7).concat(ws.slice(0, n)); - } - - var defaultLocaleWeekdays = 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'); - - function localeWeekdays(m, format) { - var weekdays = isArray(this._weekdays) ? this._weekdays : this._weekdays[m && m !== true && this._weekdays.isFormat.test(format) ? 'format' : 'standalone']; - return m === true ? shiftWeekdays(weekdays, this._week.dow) : m ? weekdays[m.day()] : weekdays; - } - - var defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'); - - function localeWeekdaysShort(m) { - return m === true ? shiftWeekdays(this._weekdaysShort, this._week.dow) : m ? this._weekdaysShort[m.day()] : this._weekdaysShort; - } - - var defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'); - - function localeWeekdaysMin(m) { - return m === true ? shiftWeekdays(this._weekdaysMin, this._week.dow) : m ? this._weekdaysMin[m.day()] : this._weekdaysMin; - } - - function handleStrictParse$1(weekdayName, format, strict) { - var i, - ii, - mom, - llc = weekdayName.toLocaleLowerCase(); - - if (!this._weekdaysParse) { - this._weekdaysParse = []; - this._shortWeekdaysParse = []; - this._minWeekdaysParse = []; - - for (i = 0; i < 7; ++i) { - mom = createUTC([2000, 1]).day(i); - this._minWeekdaysParse[i] = this.weekdaysMin(mom, '').toLocaleLowerCase(); - this._shortWeekdaysParse[i] = this.weekdaysShort(mom, '').toLocaleLowerCase(); - this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase(); - } - } - - if (strict) { - if (format === 'dddd') { - ii = indexOf.call(this._weekdaysParse, llc); - return ii !== -1 ? ii : null; - } else if (format === 'ddd') { - ii = indexOf.call(this._shortWeekdaysParse, llc); - return ii !== -1 ? ii : null; - } else { - ii = indexOf.call(this._minWeekdaysParse, llc); - return ii !== -1 ? ii : null; - } - } else { - if (format === 'dddd') { - ii = indexOf.call(this._weekdaysParse, llc); - - if (ii !== -1) { - return ii; - } - - ii = indexOf.call(this._shortWeekdaysParse, llc); - - if (ii !== -1) { - return ii; - } - - ii = indexOf.call(this._minWeekdaysParse, llc); - return ii !== -1 ? ii : null; - } else if (format === 'ddd') { - ii = indexOf.call(this._shortWeekdaysParse, llc); - - if (ii !== -1) { - return ii; - } - - ii = indexOf.call(this._weekdaysParse, llc); - - if (ii !== -1) { - return ii; - } - - ii = indexOf.call(this._minWeekdaysParse, llc); - return ii !== -1 ? ii : null; - } else { - ii = indexOf.call(this._minWeekdaysParse, llc); - - if (ii !== -1) { - return ii; - } - - ii = indexOf.call(this._weekdaysParse, llc); - - if (ii !== -1) { - return ii; - } - - ii = indexOf.call(this._shortWeekdaysParse, llc); - return ii !== -1 ? ii : null; - } - } - } - - function localeWeekdaysParse(weekdayName, format, strict) { - var i, mom, regex; - - if (this._weekdaysParseExact) { - return handleStrictParse$1.call(this, weekdayName, format, strict); - } - - if (!this._weekdaysParse) { - this._weekdaysParse = []; - this._minWeekdaysParse = []; - this._shortWeekdaysParse = []; - this._fullWeekdaysParse = []; - } - - for (i = 0; i < 7; i++) { - // make the regex if we don't have it already - mom = createUTC([2000, 1]).day(i); - - if (strict && !this._fullWeekdaysParse[i]) { - this._fullWeekdaysParse[i] = new RegExp('^' + this.weekdays(mom, '').replace('.', '\\.?') + '$', 'i'); - this._shortWeekdaysParse[i] = new RegExp('^' + this.weekdaysShort(mom, '').replace('.', '\\.?') + '$', 'i'); - this._minWeekdaysParse[i] = new RegExp('^' + this.weekdaysMin(mom, '').replace('.', '\\.?') + '$', 'i'); - } - - if (!this._weekdaysParse[i]) { - regex = '^' + this.weekdays(mom, '') + '|^' + this.weekdaysShort(mom, '') + '|^' + this.weekdaysMin(mom, ''); - this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i'); - } // test the regex - - - if (strict && format === 'dddd' && this._fullWeekdaysParse[i].test(weekdayName)) { - return i; - } else if (strict && format === 'ddd' && this._shortWeekdaysParse[i].test(weekdayName)) { - return i; - } else if (strict && format === 'dd' && this._minWeekdaysParse[i].test(weekdayName)) { - return i; - } else if (!strict && this._weekdaysParse[i].test(weekdayName)) { - return i; - } - } - } // MOMENTS - - - function getSetDayOfWeek(input) { - if (!this.isValid()) { - return input != null ? this : NaN; - } - - var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay(); - - if (input != null) { - input = parseWeekday(input, this.localeData()); - return this.add(input - day, 'd'); - } else { - return day; - } - } - - function getSetLocaleDayOfWeek(input) { - if (!this.isValid()) { - return input != null ? this : NaN; - } - - var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7; - return input == null ? weekday : this.add(input - weekday, 'd'); - } - - function getSetISODayOfWeek(input) { - if (!this.isValid()) { - return input != null ? this : NaN; - } // behaves the same as moment#day except - // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6) - // as a setter, sunday should belong to the previous week. - - - if (input != null) { - var weekday = parseIsoWeekday(input, this.localeData()); - return this.day(this.day() % 7 ? weekday : weekday - 7); - } else { - return this.day() || 7; - } - } - - var defaultWeekdaysRegex = matchWord; - - function weekdaysRegex(isStrict) { - if (this._weekdaysParseExact) { - if (!hasOwnProp(this, '_weekdaysRegex')) { - computeWeekdaysParse.call(this); - } - - if (isStrict) { - return this._weekdaysStrictRegex; - } else { - return this._weekdaysRegex; - } - } else { - if (!hasOwnProp(this, '_weekdaysRegex')) { - this._weekdaysRegex = defaultWeekdaysRegex; - } - - return this._weekdaysStrictRegex && isStrict ? this._weekdaysStrictRegex : this._weekdaysRegex; - } - } - - var defaultWeekdaysShortRegex = matchWord; - - function weekdaysShortRegex(isStrict) { - if (this._weekdaysParseExact) { - if (!hasOwnProp(this, '_weekdaysRegex')) { - computeWeekdaysParse.call(this); - } - - if (isStrict) { - return this._weekdaysShortStrictRegex; - } else { - return this._weekdaysShortRegex; - } - } else { - if (!hasOwnProp(this, '_weekdaysShortRegex')) { - this._weekdaysShortRegex = defaultWeekdaysShortRegex; - } - - return this._weekdaysShortStrictRegex && isStrict ? this._weekdaysShortStrictRegex : this._weekdaysShortRegex; - } - } - - var defaultWeekdaysMinRegex = matchWord; - - function weekdaysMinRegex(isStrict) { - if (this._weekdaysParseExact) { - if (!hasOwnProp(this, '_weekdaysRegex')) { - computeWeekdaysParse.call(this); - } - - if (isStrict) { - return this._weekdaysMinStrictRegex; - } else { - return this._weekdaysMinRegex; - } - } else { - if (!hasOwnProp(this, '_weekdaysMinRegex')) { - this._weekdaysMinRegex = defaultWeekdaysMinRegex; - } - - return this._weekdaysMinStrictRegex && isStrict ? this._weekdaysMinStrictRegex : this._weekdaysMinRegex; - } - } - - function computeWeekdaysParse() { - function cmpLenRev(a, b) { - return b.length - a.length; - } - - var minPieces = [], - shortPieces = [], - longPieces = [], - mixedPieces = [], - i, - mom, - minp, - shortp, - longp; - - for (i = 0; i < 7; i++) { - // make the regex if we don't have it already - mom = createUTC([2000, 1]).day(i); - minp = this.weekdaysMin(mom, ''); - shortp = this.weekdaysShort(mom, ''); - longp = this.weekdays(mom, ''); - minPieces.push(minp); - shortPieces.push(shortp); - longPieces.push(longp); - mixedPieces.push(minp); - mixedPieces.push(shortp); - mixedPieces.push(longp); - } // Sorting makes sure if one weekday (or abbr) is a prefix of another it - // will match the longer piece. - - - minPieces.sort(cmpLenRev); - shortPieces.sort(cmpLenRev); - longPieces.sort(cmpLenRev); - mixedPieces.sort(cmpLenRev); - - for (i = 0; i < 7; i++) { - shortPieces[i] = regexEscape(shortPieces[i]); - longPieces[i] = regexEscape(longPieces[i]); - mixedPieces[i] = regexEscape(mixedPieces[i]); - } - - this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i'); - this._weekdaysShortRegex = this._weekdaysRegex; - this._weekdaysMinRegex = this._weekdaysRegex; - this._weekdaysStrictRegex = new RegExp('^(' + longPieces.join('|') + ')', 'i'); - this._weekdaysShortStrictRegex = new RegExp('^(' + shortPieces.join('|') + ')', 'i'); - this._weekdaysMinStrictRegex = new RegExp('^(' + minPieces.join('|') + ')', 'i'); - } // FORMATTING - - - function hFormat() { - return this.hours() % 12 || 12; - } - - function kFormat() { - return this.hours() || 24; - } - - addFormatToken('H', ['HH', 2], 0, 'hour'); - addFormatToken('h', ['hh', 2], 0, hFormat); - addFormatToken('k', ['kk', 2], 0, kFormat); - addFormatToken('hmm', 0, 0, function () { - return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2); - }); - addFormatToken('hmmss', 0, 0, function () { - return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2) + zeroFill(this.seconds(), 2); - }); - addFormatToken('Hmm', 0, 0, function () { - return '' + this.hours() + zeroFill(this.minutes(), 2); - }); - addFormatToken('Hmmss', 0, 0, function () { - return '' + this.hours() + zeroFill(this.minutes(), 2) + zeroFill(this.seconds(), 2); - }); - - function meridiem(token, lowercase) { - addFormatToken(token, 0, 0, function () { - return this.localeData().meridiem(this.hours(), this.minutes(), lowercase); - }); - } - - meridiem('a', true); - meridiem('A', false); // ALIASES - - addUnitAlias('hour', 'h'); // PRIORITY - - addUnitPriority('hour', 13); // PARSING - - function matchMeridiem(isStrict, locale) { - return locale._meridiemParse; - } - - addRegexToken('a', matchMeridiem); - addRegexToken('A', matchMeridiem); - addRegexToken('H', match1to2); - addRegexToken('h', match1to2); - addRegexToken('k', match1to2); - addRegexToken('HH', match1to2, match2); - addRegexToken('hh', match1to2, match2); - addRegexToken('kk', match1to2, match2); - addRegexToken('hmm', match3to4); - addRegexToken('hmmss', match5to6); - addRegexToken('Hmm', match3to4); - addRegexToken('Hmmss', match5to6); - addParseToken(['H', 'HH'], HOUR); - addParseToken(['k', 'kk'], function (input, array, config) { - var kInput = toInt(input); - array[HOUR] = kInput === 24 ? 0 : kInput; - }); - addParseToken(['a', 'A'], function (input, array, config) { - config._isPm = config._locale.isPM(input); - config._meridiem = input; - }); - addParseToken(['h', 'hh'], function (input, array, config) { - array[HOUR] = toInt(input); - getParsingFlags(config).bigHour = true; - }); - addParseToken('hmm', function (input, array, config) { - var pos = input.length - 2; - array[HOUR] = toInt(input.substr(0, pos)); - array[MINUTE] = toInt(input.substr(pos)); - getParsingFlags(config).bigHour = true; - }); - addParseToken('hmmss', function (input, array, config) { - var pos1 = input.length - 4; - var pos2 = input.length - 2; - array[HOUR] = toInt(input.substr(0, pos1)); - array[MINUTE] = toInt(input.substr(pos1, 2)); - array[SECOND] = toInt(input.substr(pos2)); - getParsingFlags(config).bigHour = true; - }); - addParseToken('Hmm', function (input, array, config) { - var pos = input.length - 2; - array[HOUR] = toInt(input.substr(0, pos)); - array[MINUTE] = toInt(input.substr(pos)); - }); - addParseToken('Hmmss', function (input, array, config) { - var pos1 = input.length - 4; - var pos2 = input.length - 2; - array[HOUR] = toInt(input.substr(0, pos1)); - array[MINUTE] = toInt(input.substr(pos1, 2)); - array[SECOND] = toInt(input.substr(pos2)); - }); // LOCALES - - function localeIsPM(input) { - // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays - // Using charAt should be more compatible. - return (input + '').toLowerCase().charAt(0) === 'p'; - } - - var defaultLocaleMeridiemParse = /[ap]\.?m?\.?/i; - - function localeMeridiem(hours, minutes, isLower) { - if (hours > 11) { - return isLower ? 'pm' : 'PM'; - } else { - return isLower ? 'am' : 'AM'; - } - } // MOMENTS - // Setting the hour should keep the time, because the user explicitly - // specified which hour they want. So trying to maintain the same hour (in - // a new timezone) makes sense. Adding/subtracting hours does not follow - // this rule. - - - var getSetHour = makeGetSet('Hours', true); - var baseConfig = { - calendar: defaultCalendar, - longDateFormat: defaultLongDateFormat, - invalidDate: defaultInvalidDate, - ordinal: defaultOrdinal, - dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse, - relativeTime: defaultRelativeTime, - months: defaultLocaleMonths, - monthsShort: defaultLocaleMonthsShort, - week: defaultLocaleWeek, - weekdays: defaultLocaleWeekdays, - weekdaysMin: defaultLocaleWeekdaysMin, - weekdaysShort: defaultLocaleWeekdaysShort, - meridiemParse: defaultLocaleMeridiemParse - }; // internal storage for locale config files - - var locales = {}; - var localeFamilies = {}; - var globalLocale; - - function normalizeLocale(key) { - return key ? key.toLowerCase().replace('_', '-') : key; - } // pick the locale from the array - // try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each - // substring from most specific to least, but move to the next array item if it's a more specific variant than the current root - - - function chooseLocale(names) { - var i = 0, - j, - next, - locale, - split; - - while (i < names.length) { - split = normalizeLocale(names[i]).split('-'); - j = split.length; - next = normalizeLocale(names[i + 1]); - next = next ? next.split('-') : null; - - while (j > 0) { - locale = loadLocale(split.slice(0, j).join('-')); - - if (locale) { - return locale; - } - - if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) { - //the next array item is better than a shallower substring of this one - break; - } - - j--; - } - - i++; - } - - return globalLocale; - } - - function loadLocale(name) { - var oldLocale = null; // TODO: Find a better way to register and load all the locales in Node - - if (!locales[name] && 'object' !== 'undefined' && module && module.exports) { - try { - oldLocale = globalLocale._abbr; - var aliasedRequire = commonjsRequire; - aliasedRequire('./locale/' + name); - getSetGlobalLocale(oldLocale); - } catch (e) {} - } - - return locales[name]; - } // This function will load locale and then set the global locale. If - // no arguments are passed in, it will simply return the current global - // locale key. - - - function getSetGlobalLocale(key, values) { - var data; - - if (key) { - if (isUndefined(values)) { - data = getLocale(key); - } else { - data = defineLocale(key, values); - } - - if (data) { - // moment.duration._locale = moment._locale = data; - globalLocale = data; - } else { - if (typeof console !== 'undefined' && console.warn) { - //warn user if arguments are passed but the locale could not be set - console.warn('Locale ' + key + ' not found. Did you forget to load it?'); - } - } - } - - return globalLocale._abbr; - } - - function defineLocale(name, config) { - if (config !== null) { - var locale, - parentConfig = baseConfig; - config.abbr = name; - - if (locales[name] != null) { - deprecateSimple('defineLocaleOverride', 'use moment.updateLocale(localeName, config) to change ' + 'an existing locale. moment.defineLocale(localeName, ' + 'config) should only be used for creating a new locale ' + 'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.'); - parentConfig = locales[name]._config; - } else if (config.parentLocale != null) { - if (locales[config.parentLocale] != null) { - parentConfig = locales[config.parentLocale]._config; - } else { - locale = loadLocale(config.parentLocale); - - if (locale != null) { - parentConfig = locale._config; - } else { - if (!localeFamilies[config.parentLocale]) { - localeFamilies[config.parentLocale] = []; - } - - localeFamilies[config.parentLocale].push({ - name: name, - config: config - }); - return null; - } - } - } - - locales[name] = new Locale(mergeConfigs(parentConfig, config)); - - if (localeFamilies[name]) { - localeFamilies[name].forEach(function (x) { - defineLocale(x.name, x.config); - }); - } // backwards compat for now: also set the locale - // make sure we set the locale AFTER all child locales have been - // created, so we won't end up with the child locale set. - - - getSetGlobalLocale(name); - return locales[name]; - } else { - // useful for testing - delete locales[name]; - return null; - } - } - - function updateLocale(name, config) { - if (config != null) { - var locale, - tmpLocale, - parentConfig = baseConfig; // MERGE - - tmpLocale = loadLocale(name); - - if (tmpLocale != null) { - parentConfig = tmpLocale._config; - } - - config = mergeConfigs(parentConfig, config); - locale = new Locale(config); - locale.parentLocale = locales[name]; - locales[name] = locale; // backwards compat for now: also set the locale - - getSetGlobalLocale(name); - } else { - // pass null for config to unupdate, useful for tests - if (locales[name] != null) { - if (locales[name].parentLocale != null) { - locales[name] = locales[name].parentLocale; - } else if (locales[name] != null) { - delete locales[name]; - } - } - } - - return locales[name]; - } // returns locale data - - - function getLocale(key) { - var locale; - - if (key && key._locale && key._locale._abbr) { - key = key._locale._abbr; - } - - if (!key) { - return globalLocale; - } - - if (!isArray(key)) { - //short-circuit everything else - locale = loadLocale(key); - - if (locale) { - return locale; - } - - key = [key]; - } - - return chooseLocale(key); - } - - function listLocales() { - return keys(locales); - } + var YEAR = 0; + var MONTH = 1; + var DATE = 2; + var HOUR = 3; + var MINUTE = 4; + var SECOND = 5; + var MILLISECOND = 6; + var WEEK = 7; + var WEEKDAY = 8; // FORMATTING + + addFormatToken('Y', 0, 0, function () { + var y = this.year(); + return y <= 9999 ? '' + y : '+' + y; + }); + addFormatToken(0, ['YY', 2], 0, function () { + return this.year() % 100; + }); + addFormatToken(0, ['YYYY', 4], 0, 'year'); + addFormatToken(0, ['YYYYY', 5], 0, 'year'); + addFormatToken(0, ['YYYYYY', 6, true], 0, 'year'); // ALIASES + + addUnitAlias('year', 'y'); // PRIORITIES + + addUnitPriority('year', 1); // PARSING + + addRegexToken('Y', matchSigned); + addRegexToken('YY', match1to2, match2); + addRegexToken('YYYY', match1to4, match4); + addRegexToken('YYYYY', match1to6, match6); + addRegexToken('YYYYYY', match1to6, match6); + addParseToken(['YYYYY', 'YYYYYY'], YEAR); + addParseToken('YYYY', function (input, array) { + array[YEAR] = input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input); + }); + addParseToken('YY', function (input, array) { + array[YEAR] = hooks.parseTwoDigitYear(input); + }); + addParseToken('Y', function (input, array) { + array[YEAR] = parseInt(input, 10); + }); // HELPERS + + function daysInYear(year) { + return isLeapYear(year) ? 366 : 365; + } + + function isLeapYear(year) { + return year % 4 === 0 && year % 100 !== 0 || year % 400 === 0; + } // HOOKS + + + hooks.parseTwoDigitYear = function (input) { + return toInt(input) + (toInt(input) > 68 ? 1900 : 2000); + }; // MOMENTS + + + var getSetYear = makeGetSet('FullYear', true); + + function getIsLeapYear() { + return isLeapYear(this.year()); + } + + function makeGetSet(unit, keepTime) { + return function (value) { + if (value != null) { + set$1(this, unit, value); + hooks.updateOffset(this, keepTime); + return this; + } else { + return get(this, unit); + } + }; + } + + function get(mom, unit) { + return mom.isValid() ? mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]() : NaN; + } + + function set$1(mom, unit, value) { + if (mom.isValid() && !isNaN(value)) { + if (unit === 'FullYear' && isLeapYear(mom.year()) && mom.month() === 1 && mom.date() === 29) { + mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value, mom.month(), daysInMonth(value, mom.month())); + } else { + mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value); + } + } + } // MOMENTS + + + function stringGet(units) { + units = normalizeUnits(units); + + if (isFunction(this[units])) { + return this[units](); + } + + return this; + } + + function stringSet(units, value) { + if (typeof units === 'object') { + units = normalizeObjectUnits(units); + var prioritized = getPrioritizedUnits(units); + + for (var i = 0; i < prioritized.length; i++) { + this[prioritized[i].unit](units[prioritized[i].unit]); + } + } else { + units = normalizeUnits(units); + + if (isFunction(this[units])) { + return this[units](value); + } + } + + return this; + } + + function mod(n, x) { + return (n % x + x) % x; + } + + var indexOf; + + if (Array.prototype.indexOf) { + indexOf = Array.prototype.indexOf; + } else { + indexOf = function (o) { + // I know + var i; + + for (i = 0; i < this.length; ++i) { + if (this[i] === o) { + return i; + } + } + + return -1; + }; + } + + function daysInMonth(year, month) { + if (isNaN(year) || isNaN(month)) { + return NaN; + } + + var modMonth = mod(month, 12); + year += (month - modMonth) / 12; + return modMonth === 1 ? isLeapYear(year) ? 29 : 28 : 31 - modMonth % 7 % 2; + } // FORMATTING + + + addFormatToken('M', ['MM', 2], 'Mo', function () { + return this.month() + 1; + }); + addFormatToken('MMM', 0, 0, function (format) { + return this.localeData().monthsShort(this, format); + }); + addFormatToken('MMMM', 0, 0, function (format) { + return this.localeData().months(this, format); + }); // ALIASES + + addUnitAlias('month', 'M'); // PRIORITY + + addUnitPriority('month', 8); // PARSING + + addRegexToken('M', match1to2); + addRegexToken('MM', match1to2, match2); + addRegexToken('MMM', function (isStrict, locale) { + return locale.monthsShortRegex(isStrict); + }); + addRegexToken('MMMM', function (isStrict, locale) { + return locale.monthsRegex(isStrict); + }); + addParseToken(['M', 'MM'], function (input, array) { + array[MONTH] = toInt(input) - 1; + }); + addParseToken(['MMM', 'MMMM'], function (input, array, config, token) { + var month = config._locale.monthsParse(input, token, config._strict); // if we didn't find a month name, mark the date as invalid. + + + if (month != null) { + array[MONTH] = month; + } else { + getParsingFlags(config).invalidMonth = input; + } + }); // LOCALES + + var MONTHS_IN_FORMAT = /D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/; + var defaultLocaleMonths = 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'); + + function localeMonths(m, format) { + if (!m) { + return isArray(this._months) ? this._months : this._months['standalone']; + } + + return isArray(this._months) ? this._months[m.month()] : this._months[(this._months.isFormat || MONTHS_IN_FORMAT).test(format) ? 'format' : 'standalone'][m.month()]; + } + + var defaultLocaleMonthsShort = 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'); + + function localeMonthsShort(m, format) { + if (!m) { + return isArray(this._monthsShort) ? this._monthsShort : this._monthsShort['standalone']; + } + + return isArray(this._monthsShort) ? this._monthsShort[m.month()] : this._monthsShort[MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'][m.month()]; + } + + function handleStrictParse(monthName, format, strict) { + var i, + ii, + mom, + llc = monthName.toLocaleLowerCase(); + + if (!this._monthsParse) { + // this is not used + this._monthsParse = []; + this._longMonthsParse = []; + this._shortMonthsParse = []; + + for (i = 0; i < 12; ++i) { + mom = createUTC([2000, i]); + this._shortMonthsParse[i] = this.monthsShort(mom, '').toLocaleLowerCase(); + this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase(); + } + } + + if (strict) { + if (format === 'MMM') { + ii = indexOf.call(this._shortMonthsParse, llc); + return ii !== -1 ? ii : null; + } else { + ii = indexOf.call(this._longMonthsParse, llc); + return ii !== -1 ? ii : null; + } + } else { + if (format === 'MMM') { + ii = indexOf.call(this._shortMonthsParse, llc); + + if (ii !== -1) { + return ii; + } + + ii = indexOf.call(this._longMonthsParse, llc); + return ii !== -1 ? ii : null; + } else { + ii = indexOf.call(this._longMonthsParse, llc); + + if (ii !== -1) { + return ii; + } + + ii = indexOf.call(this._shortMonthsParse, llc); + return ii !== -1 ? ii : null; + } + } + } + + function localeMonthsParse(monthName, format, strict) { + var i, mom, regex; + + if (this._monthsParseExact) { + return handleStrictParse.call(this, monthName, format, strict); + } + + if (!this._monthsParse) { + this._monthsParse = []; + this._longMonthsParse = []; + this._shortMonthsParse = []; + } // TODO: add sorting + // Sorting makes sure if one month (or abbr) is a prefix of another + // see sorting in computeMonthsParse + + + for (i = 0; i < 12; i++) { + // make the regex if we don't have it already + mom = createUTC([2000, i]); + + if (strict && !this._longMonthsParse[i]) { + this._longMonthsParse[i] = new RegExp('^' + this.months(mom, '').replace('.', '') + '$', 'i'); + this._shortMonthsParse[i] = new RegExp('^' + this.monthsShort(mom, '').replace('.', '') + '$', 'i'); + } + + if (!strict && !this._monthsParse[i]) { + regex = '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, ''); + this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i'); + } // test the regex + + + if (strict && format === 'MMMM' && this._longMonthsParse[i].test(monthName)) { + return i; + } else if (strict && format === 'MMM' && this._shortMonthsParse[i].test(monthName)) { + return i; + } else if (!strict && this._monthsParse[i].test(monthName)) { + return i; + } + } + } // MOMENTS + + + function setMonth(mom, value) { + var dayOfMonth; + + if (!mom.isValid()) { + // No op + return mom; + } + + if (typeof value === 'string') { + if (/^\d+$/.test(value)) { + value = toInt(value); + } else { + value = mom.localeData().monthsParse(value); // TODO: Another silent failure? + + if (!isNumber(value)) { + return mom; + } + } + } + + dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value)); + + mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth); + + return mom; + } + + function getSetMonth(value) { + if (value != null) { + setMonth(this, value); + hooks.updateOffset(this, true); + return this; + } else { + return get(this, 'Month'); + } + } + + function getDaysInMonth() { + return daysInMonth(this.year(), this.month()); + } + + var defaultMonthsShortRegex = matchWord; + + function monthsShortRegex(isStrict) { + if (this._monthsParseExact) { + if (!hasOwnProp(this, '_monthsRegex')) { + computeMonthsParse.call(this); + } + + if (isStrict) { + return this._monthsShortStrictRegex; + } else { + return this._monthsShortRegex; + } + } else { + if (!hasOwnProp(this, '_monthsShortRegex')) { + this._monthsShortRegex = defaultMonthsShortRegex; + } + + return this._monthsShortStrictRegex && isStrict ? this._monthsShortStrictRegex : this._monthsShortRegex; + } + } + + var defaultMonthsRegex = matchWord; + + function monthsRegex(isStrict) { + if (this._monthsParseExact) { + if (!hasOwnProp(this, '_monthsRegex')) { + computeMonthsParse.call(this); + } + + if (isStrict) { + return this._monthsStrictRegex; + } else { + return this._monthsRegex; + } + } else { + if (!hasOwnProp(this, '_monthsRegex')) { + this._monthsRegex = defaultMonthsRegex; + } + + return this._monthsStrictRegex && isStrict ? this._monthsStrictRegex : this._monthsRegex; + } + } + + function computeMonthsParse() { + function cmpLenRev(a, b) { + return b.length - a.length; + } + + var shortPieces = [], + longPieces = [], + mixedPieces = [], + i, + mom; + + for (i = 0; i < 12; i++) { + // make the regex if we don't have it already + mom = createUTC([2000, i]); + shortPieces.push(this.monthsShort(mom, '')); + longPieces.push(this.months(mom, '')); + mixedPieces.push(this.months(mom, '')); + mixedPieces.push(this.monthsShort(mom, '')); + } // Sorting makes sure if one month (or abbr) is a prefix of another it + // will match the longer piece. + + + shortPieces.sort(cmpLenRev); + longPieces.sort(cmpLenRev); + mixedPieces.sort(cmpLenRev); + + for (i = 0; i < 12; i++) { + shortPieces[i] = regexEscape(shortPieces[i]); + longPieces[i] = regexEscape(longPieces[i]); + } + + for (i = 0; i < 24; i++) { + mixedPieces[i] = regexEscape(mixedPieces[i]); + } + + this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i'); + this._monthsShortRegex = this._monthsRegex; + this._monthsStrictRegex = new RegExp('^(' + longPieces.join('|') + ')', 'i'); + this._monthsShortStrictRegex = new RegExp('^(' + shortPieces.join('|') + ')', 'i'); + } + + function createDate(y, m, d, h, M, s, ms) { + // can't just apply() to create a date: + // https://stackoverflow.com/q/181348 + var date; // the date constructor remaps years 0-99 to 1900-1999 + + if (y < 100 && y >= 0) { + // preserve leap years using a full 400 year cycle, then reset + date = new Date(y + 400, m, d, h, M, s, ms); + + if (isFinite(date.getFullYear())) { + date.setFullYear(y); + } + } else { + date = new Date(y, m, d, h, M, s, ms); + } + + return date; + } + + function createUTCDate(y) { + var date; // the Date.UTC function remaps years 0-99 to 1900-1999 + + if (y < 100 && y >= 0) { + var args = Array.prototype.slice.call(arguments); // preserve leap years using a full 400 year cycle, then reset + + args[0] = y + 400; + date = new Date(Date.UTC.apply(null, args)); + + if (isFinite(date.getUTCFullYear())) { + date.setUTCFullYear(y); + } + } else { + date = new Date(Date.UTC.apply(null, arguments)); + } + + return date; + } // start-of-first-week - start-of-year + + + function firstWeekOffset(year, dow, doy) { + var // first-week day -- which january is always in the first week (4 for iso, 1 for other) + fwd = 7 + dow - doy, + // first-week day local weekday -- which local weekday is fwd + fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7; + return -fwdlw + fwd - 1; + } // https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday + + + function dayOfYearFromWeeks(year, week, weekday, dow, doy) { + var localWeekday = (7 + weekday - dow) % 7, + weekOffset = firstWeekOffset(year, dow, doy), + dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset, + resYear, + resDayOfYear; + + if (dayOfYear <= 0) { + resYear = year - 1; + resDayOfYear = daysInYear(resYear) + dayOfYear; + } else if (dayOfYear > daysInYear(year)) { + resYear = year + 1; + resDayOfYear = dayOfYear - daysInYear(year); + } else { + resYear = year; + resDayOfYear = dayOfYear; + } + + return { + year: resYear, + dayOfYear: resDayOfYear + }; + } + + function weekOfYear(mom, dow, doy) { + var weekOffset = firstWeekOffset(mom.year(), dow, doy), + week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1, + resWeek, + resYear; + + if (week < 1) { + resYear = mom.year() - 1; + resWeek = week + weeksInYear(resYear, dow, doy); + } else if (week > weeksInYear(mom.year(), dow, doy)) { + resWeek = week - weeksInYear(mom.year(), dow, doy); + resYear = mom.year() + 1; + } else { + resYear = mom.year(); + resWeek = week; + } + + return { + week: resWeek, + year: resYear + }; + } + + function weeksInYear(year, dow, doy) { + var weekOffset = firstWeekOffset(year, dow, doy), + weekOffsetNext = firstWeekOffset(year + 1, dow, doy); + return (daysInYear(year) - weekOffset + weekOffsetNext) / 7; + } // FORMATTING + + + addFormatToken('w', ['ww', 2], 'wo', 'week'); + addFormatToken('W', ['WW', 2], 'Wo', 'isoWeek'); // ALIASES + + addUnitAlias('week', 'w'); + addUnitAlias('isoWeek', 'W'); // PRIORITIES + + addUnitPriority('week', 5); + addUnitPriority('isoWeek', 5); // PARSING + + addRegexToken('w', match1to2); + addRegexToken('ww', match1to2, match2); + addRegexToken('W', match1to2); + addRegexToken('WW', match1to2, match2); + addWeekParseToken(['w', 'ww', 'W', 'WW'], function (input, week, config, token) { + week[token.substr(0, 1)] = toInt(input); + }); // HELPERS + // LOCALES + + function localeWeek(mom) { + return weekOfYear(mom, this._week.dow, this._week.doy).week; + } + + var defaultLocaleWeek = { + dow: 0, + // Sunday is the first day of the week. + doy: 6 // The week that contains Jan 6th is the first week of the year. + + }; + + function localeFirstDayOfWeek() { + return this._week.dow; + } + + function localeFirstDayOfYear() { + return this._week.doy; + } // MOMENTS + + + function getSetWeek(input) { + var week = this.localeData().week(this); + return input == null ? week : this.add((input - week) * 7, 'd'); + } + + function getSetISOWeek(input) { + var week = weekOfYear(this, 1, 4).week; + return input == null ? week : this.add((input - week) * 7, 'd'); + } // FORMATTING + + + addFormatToken('d', 0, 'do', 'day'); + addFormatToken('dd', 0, 0, function (format) { + return this.localeData().weekdaysMin(this, format); + }); + addFormatToken('ddd', 0, 0, function (format) { + return this.localeData().weekdaysShort(this, format); + }); + addFormatToken('dddd', 0, 0, function (format) { + return this.localeData().weekdays(this, format); + }); + addFormatToken('e', 0, 0, 'weekday'); + addFormatToken('E', 0, 0, 'isoWeekday'); // ALIASES + + addUnitAlias('day', 'd'); + addUnitAlias('weekday', 'e'); + addUnitAlias('isoWeekday', 'E'); // PRIORITY + + addUnitPriority('day', 11); + addUnitPriority('weekday', 11); + addUnitPriority('isoWeekday', 11); // PARSING + + addRegexToken('d', match1to2); + addRegexToken('e', match1to2); + addRegexToken('E', match1to2); + addRegexToken('dd', function (isStrict, locale) { + return locale.weekdaysMinRegex(isStrict); + }); + addRegexToken('ddd', function (isStrict, locale) { + return locale.weekdaysShortRegex(isStrict); + }); + addRegexToken('dddd', function (isStrict, locale) { + return locale.weekdaysRegex(isStrict); + }); + addWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) { + var weekday = config._locale.weekdaysParse(input, token, config._strict); // if we didn't get a weekday name, mark the date as invalid + + + if (weekday != null) { + week.d = weekday; + } else { + getParsingFlags(config).invalidWeekday = input; + } + }); + addWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) { + week[token] = toInt(input); + }); // HELPERS + + function parseWeekday(input, locale) { + if (typeof input !== 'string') { + return input; + } + + if (!isNaN(input)) { + return parseInt(input, 10); + } + + input = locale.weekdaysParse(input); + + if (typeof input === 'number') { + return input; + } + + return null; + } + + function parseIsoWeekday(input, locale) { + if (typeof input === 'string') { + return locale.weekdaysParse(input) % 7 || 7; + } + + return isNaN(input) ? null : input; + } // LOCALES + + + function shiftWeekdays(ws, n) { + return ws.slice(n, 7).concat(ws.slice(0, n)); + } + + var defaultLocaleWeekdays = 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'); + + function localeWeekdays(m, format) { + var weekdays = isArray(this._weekdays) ? this._weekdays : this._weekdays[m && m !== true && this._weekdays.isFormat.test(format) ? 'format' : 'standalone']; + return m === true ? shiftWeekdays(weekdays, this._week.dow) : m ? weekdays[m.day()] : weekdays; + } + + var defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'); + + function localeWeekdaysShort(m) { + return m === true ? shiftWeekdays(this._weekdaysShort, this._week.dow) : m ? this._weekdaysShort[m.day()] : this._weekdaysShort; + } + + var defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'); + + function localeWeekdaysMin(m) { + return m === true ? shiftWeekdays(this._weekdaysMin, this._week.dow) : m ? this._weekdaysMin[m.day()] : this._weekdaysMin; + } + + function handleStrictParse$1(weekdayName, format, strict) { + var i, + ii, + mom, + llc = weekdayName.toLocaleLowerCase(); + + if (!this._weekdaysParse) { + this._weekdaysParse = []; + this._shortWeekdaysParse = []; + this._minWeekdaysParse = []; + + for (i = 0; i < 7; ++i) { + mom = createUTC([2000, 1]).day(i); + this._minWeekdaysParse[i] = this.weekdaysMin(mom, '').toLocaleLowerCase(); + this._shortWeekdaysParse[i] = this.weekdaysShort(mom, '').toLocaleLowerCase(); + this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase(); + } + } + + if (strict) { + if (format === 'dddd') { + ii = indexOf.call(this._weekdaysParse, llc); + return ii !== -1 ? ii : null; + } else if (format === 'ddd') { + ii = indexOf.call(this._shortWeekdaysParse, llc); + return ii !== -1 ? ii : null; + } else { + ii = indexOf.call(this._minWeekdaysParse, llc); + return ii !== -1 ? ii : null; + } + } else { + if (format === 'dddd') { + ii = indexOf.call(this._weekdaysParse, llc); + + if (ii !== -1) { + return ii; + } + + ii = indexOf.call(this._shortWeekdaysParse, llc); + + if (ii !== -1) { + return ii; + } + + ii = indexOf.call(this._minWeekdaysParse, llc); + return ii !== -1 ? ii : null; + } else if (format === 'ddd') { + ii = indexOf.call(this._shortWeekdaysParse, llc); + + if (ii !== -1) { + return ii; + } + + ii = indexOf.call(this._weekdaysParse, llc); + + if (ii !== -1) { + return ii; + } + + ii = indexOf.call(this._minWeekdaysParse, llc); + return ii !== -1 ? ii : null; + } else { + ii = indexOf.call(this._minWeekdaysParse, llc); + + if (ii !== -1) { + return ii; + } + + ii = indexOf.call(this._weekdaysParse, llc); + + if (ii !== -1) { + return ii; + } + + ii = indexOf.call(this._shortWeekdaysParse, llc); + return ii !== -1 ? ii : null; + } + } + } + + function localeWeekdaysParse(weekdayName, format, strict) { + var i, mom, regex; + + if (this._weekdaysParseExact) { + return handleStrictParse$1.call(this, weekdayName, format, strict); + } + + if (!this._weekdaysParse) { + this._weekdaysParse = []; + this._minWeekdaysParse = []; + this._shortWeekdaysParse = []; + this._fullWeekdaysParse = []; + } + + for (i = 0; i < 7; i++) { + // make the regex if we don't have it already + mom = createUTC([2000, 1]).day(i); + + if (strict && !this._fullWeekdaysParse[i]) { + this._fullWeekdaysParse[i] = new RegExp('^' + this.weekdays(mom, '').replace('.', '\\.?') + '$', 'i'); + this._shortWeekdaysParse[i] = new RegExp('^' + this.weekdaysShort(mom, '').replace('.', '\\.?') + '$', 'i'); + this._minWeekdaysParse[i] = new RegExp('^' + this.weekdaysMin(mom, '').replace('.', '\\.?') + '$', 'i'); + } + + if (!this._weekdaysParse[i]) { + regex = '^' + this.weekdays(mom, '') + '|^' + this.weekdaysShort(mom, '') + '|^' + this.weekdaysMin(mom, ''); + this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i'); + } // test the regex + + + if (strict && format === 'dddd' && this._fullWeekdaysParse[i].test(weekdayName)) { + return i; + } else if (strict && format === 'ddd' && this._shortWeekdaysParse[i].test(weekdayName)) { + return i; + } else if (strict && format === 'dd' && this._minWeekdaysParse[i].test(weekdayName)) { + return i; + } else if (!strict && this._weekdaysParse[i].test(weekdayName)) { + return i; + } + } + } // MOMENTS + + + function getSetDayOfWeek(input) { + if (!this.isValid()) { + return input != null ? this : NaN; + } + + var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay(); + + if (input != null) { + input = parseWeekday(input, this.localeData()); + return this.add(input - day, 'd'); + } else { + return day; + } + } + + function getSetLocaleDayOfWeek(input) { + if (!this.isValid()) { + return input != null ? this : NaN; + } + + var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7; + return input == null ? weekday : this.add(input - weekday, 'd'); + } + + function getSetISODayOfWeek(input) { + if (!this.isValid()) { + return input != null ? this : NaN; + } // behaves the same as moment#day except + // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6) + // as a setter, sunday should belong to the previous week. + + + if (input != null) { + var weekday = parseIsoWeekday(input, this.localeData()); + return this.day(this.day() % 7 ? weekday : weekday - 7); + } else { + return this.day() || 7; + } + } + + var defaultWeekdaysRegex = matchWord; + + function weekdaysRegex(isStrict) { + if (this._weekdaysParseExact) { + if (!hasOwnProp(this, '_weekdaysRegex')) { + computeWeekdaysParse.call(this); + } + + if (isStrict) { + return this._weekdaysStrictRegex; + } else { + return this._weekdaysRegex; + } + } else { + if (!hasOwnProp(this, '_weekdaysRegex')) { + this._weekdaysRegex = defaultWeekdaysRegex; + } + + return this._weekdaysStrictRegex && isStrict ? this._weekdaysStrictRegex : this._weekdaysRegex; + } + } + + var defaultWeekdaysShortRegex = matchWord; + + function weekdaysShortRegex(isStrict) { + if (this._weekdaysParseExact) { + if (!hasOwnProp(this, '_weekdaysRegex')) { + computeWeekdaysParse.call(this); + } + + if (isStrict) { + return this._weekdaysShortStrictRegex; + } else { + return this._weekdaysShortRegex; + } + } else { + if (!hasOwnProp(this, '_weekdaysShortRegex')) { + this._weekdaysShortRegex = defaultWeekdaysShortRegex; + } + + return this._weekdaysShortStrictRegex && isStrict ? this._weekdaysShortStrictRegex : this._weekdaysShortRegex; + } + } + + var defaultWeekdaysMinRegex = matchWord; + + function weekdaysMinRegex(isStrict) { + if (this._weekdaysParseExact) { + if (!hasOwnProp(this, '_weekdaysRegex')) { + computeWeekdaysParse.call(this); + } + + if (isStrict) { + return this._weekdaysMinStrictRegex; + } else { + return this._weekdaysMinRegex; + } + } else { + if (!hasOwnProp(this, '_weekdaysMinRegex')) { + this._weekdaysMinRegex = defaultWeekdaysMinRegex; + } + + return this._weekdaysMinStrictRegex && isStrict ? this._weekdaysMinStrictRegex : this._weekdaysMinRegex; + } + } + + function computeWeekdaysParse() { + function cmpLenRev(a, b) { + return b.length - a.length; + } + + var minPieces = [], + shortPieces = [], + longPieces = [], + mixedPieces = [], + i, + mom, + minp, + shortp, + longp; + + for (i = 0; i < 7; i++) { + // make the regex if we don't have it already + mom = createUTC([2000, 1]).day(i); + minp = this.weekdaysMin(mom, ''); + shortp = this.weekdaysShort(mom, ''); + longp = this.weekdays(mom, ''); + minPieces.push(minp); + shortPieces.push(shortp); + longPieces.push(longp); + mixedPieces.push(minp); + mixedPieces.push(shortp); + mixedPieces.push(longp); + } // Sorting makes sure if one weekday (or abbr) is a prefix of another it + // will match the longer piece. + + + minPieces.sort(cmpLenRev); + shortPieces.sort(cmpLenRev); + longPieces.sort(cmpLenRev); + mixedPieces.sort(cmpLenRev); + + for (i = 0; i < 7; i++) { + shortPieces[i] = regexEscape(shortPieces[i]); + longPieces[i] = regexEscape(longPieces[i]); + mixedPieces[i] = regexEscape(mixedPieces[i]); + } + + this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i'); + this._weekdaysShortRegex = this._weekdaysRegex; + this._weekdaysMinRegex = this._weekdaysRegex; + this._weekdaysStrictRegex = new RegExp('^(' + longPieces.join('|') + ')', 'i'); + this._weekdaysShortStrictRegex = new RegExp('^(' + shortPieces.join('|') + ')', 'i'); + this._weekdaysMinStrictRegex = new RegExp('^(' + minPieces.join('|') + ')', 'i'); + } // FORMATTING + + + function hFormat() { + return this.hours() % 12 || 12; + } + + function kFormat() { + return this.hours() || 24; + } + + addFormatToken('H', ['HH', 2], 0, 'hour'); + addFormatToken('h', ['hh', 2], 0, hFormat); + addFormatToken('k', ['kk', 2], 0, kFormat); + addFormatToken('hmm', 0, 0, function () { + return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2); + }); + addFormatToken('hmmss', 0, 0, function () { + return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2) + zeroFill(this.seconds(), 2); + }); + addFormatToken('Hmm', 0, 0, function () { + return '' + this.hours() + zeroFill(this.minutes(), 2); + }); + addFormatToken('Hmmss', 0, 0, function () { + return '' + this.hours() + zeroFill(this.minutes(), 2) + zeroFill(this.seconds(), 2); + }); + + function meridiem(token, lowercase) { + addFormatToken(token, 0, 0, function () { + return this.localeData().meridiem(this.hours(), this.minutes(), lowercase); + }); + } + + meridiem('a', true); + meridiem('A', false); // ALIASES + + addUnitAlias('hour', 'h'); // PRIORITY + + addUnitPriority('hour', 13); // PARSING + + function matchMeridiem(isStrict, locale) { + return locale._meridiemParse; + } + + addRegexToken('a', matchMeridiem); + addRegexToken('A', matchMeridiem); + addRegexToken('H', match1to2); + addRegexToken('h', match1to2); + addRegexToken('k', match1to2); + addRegexToken('HH', match1to2, match2); + addRegexToken('hh', match1to2, match2); + addRegexToken('kk', match1to2, match2); + addRegexToken('hmm', match3to4); + addRegexToken('hmmss', match5to6); + addRegexToken('Hmm', match3to4); + addRegexToken('Hmmss', match5to6); + addParseToken(['H', 'HH'], HOUR); + addParseToken(['k', 'kk'], function (input, array, config) { + var kInput = toInt(input); + array[HOUR] = kInput === 24 ? 0 : kInput; + }); + addParseToken(['a', 'A'], function (input, array, config) { + config._isPm = config._locale.isPM(input); + config._meridiem = input; + }); + addParseToken(['h', 'hh'], function (input, array, config) { + array[HOUR] = toInt(input); + getParsingFlags(config).bigHour = true; + }); + addParseToken('hmm', function (input, array, config) { + var pos = input.length - 2; + array[HOUR] = toInt(input.substr(0, pos)); + array[MINUTE] = toInt(input.substr(pos)); + getParsingFlags(config).bigHour = true; + }); + addParseToken('hmmss', function (input, array, config) { + var pos1 = input.length - 4; + var pos2 = input.length - 2; + array[HOUR] = toInt(input.substr(0, pos1)); + array[MINUTE] = toInt(input.substr(pos1, 2)); + array[SECOND] = toInt(input.substr(pos2)); + getParsingFlags(config).bigHour = true; + }); + addParseToken('Hmm', function (input, array, config) { + var pos = input.length - 2; + array[HOUR] = toInt(input.substr(0, pos)); + array[MINUTE] = toInt(input.substr(pos)); + }); + addParseToken('Hmmss', function (input, array, config) { + var pos1 = input.length - 4; + var pos2 = input.length - 2; + array[HOUR] = toInt(input.substr(0, pos1)); + array[MINUTE] = toInt(input.substr(pos1, 2)); + array[SECOND] = toInt(input.substr(pos2)); + }); // LOCALES + + function localeIsPM(input) { + // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays + // Using charAt should be more compatible. + return (input + '').toLowerCase().charAt(0) === 'p'; + } + + var defaultLocaleMeridiemParse = /[ap]\.?m?\.?/i; + + function localeMeridiem(hours, minutes, isLower) { + if (hours > 11) { + return isLower ? 'pm' : 'PM'; + } else { + return isLower ? 'am' : 'AM'; + } + } // MOMENTS + // Setting the hour should keep the time, because the user explicitly + // specified which hour they want. So trying to maintain the same hour (in + // a new timezone) makes sense. Adding/subtracting hours does not follow + // this rule. + + + var getSetHour = makeGetSet('Hours', true); + var baseConfig = { + calendar: defaultCalendar, + longDateFormat: defaultLongDateFormat, + invalidDate: defaultInvalidDate, + ordinal: defaultOrdinal, + dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse, + relativeTime: defaultRelativeTime, + months: defaultLocaleMonths, + monthsShort: defaultLocaleMonthsShort, + week: defaultLocaleWeek, + weekdays: defaultLocaleWeekdays, + weekdaysMin: defaultLocaleWeekdaysMin, + weekdaysShort: defaultLocaleWeekdaysShort, + meridiemParse: defaultLocaleMeridiemParse + }; // internal storage for locale config files + + var locales = {}; + var localeFamilies = {}; + var globalLocale; + + function normalizeLocale(key) { + return key ? key.toLowerCase().replace('_', '-') : key; + } // pick the locale from the array + // try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each + // substring from most specific to least, but move to the next array item if it's a more specific variant than the current root + + + function chooseLocale(names) { + var i = 0, + j, + next, + locale, + split; + + while (i < names.length) { + split = normalizeLocale(names[i]).split('-'); + j = split.length; + next = normalizeLocale(names[i + 1]); + next = next ? next.split('-') : null; + + while (j > 0) { + locale = loadLocale(split.slice(0, j).join('-')); + + if (locale) { + return locale; + } + + if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) { + //the next array item is better than a shallower substring of this one + break; + } + + j--; + } + + i++; + } + + return globalLocale; + } + + function loadLocale(name) { + var oldLocale = null; // TODO: Find a better way to register and load all the locales in Node + + if (!locales[name] && 'object' !== 'undefined' && module && module.exports) { + try { + oldLocale = globalLocale._abbr; + var aliasedRequire = commonjsRequire; + aliasedRequire('./locale/' + name); + getSetGlobalLocale(oldLocale); + } catch (e) {} + } + + return locales[name]; + } // This function will load locale and then set the global locale. If + // no arguments are passed in, it will simply return the current global + // locale key. + + + function getSetGlobalLocale(key, values) { + var data; + + if (key) { + if (isUndefined(values)) { + data = getLocale(key); + } else { + data = defineLocale(key, values); + } + + if (data) { + // moment.duration._locale = moment._locale = data; + globalLocale = data; + } else { + if (typeof console !== 'undefined' && console.warn) { + //warn user if arguments are passed but the locale could not be set + console.warn('Locale ' + key + ' not found. Did you forget to load it?'); + } + } + } + + return globalLocale._abbr; + } + + function defineLocale(name, config) { + if (config !== null) { + var locale, + parentConfig = baseConfig; + config.abbr = name; + + if (locales[name] != null) { + deprecateSimple('defineLocaleOverride', 'use moment.updateLocale(localeName, config) to change ' + 'an existing locale. moment.defineLocale(localeName, ' + 'config) should only be used for creating a new locale ' + 'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.'); + parentConfig = locales[name]._config; + } else if (config.parentLocale != null) { + if (locales[config.parentLocale] != null) { + parentConfig = locales[config.parentLocale]._config; + } else { + locale = loadLocale(config.parentLocale); + + if (locale != null) { + parentConfig = locale._config; + } else { + if (!localeFamilies[config.parentLocale]) { + localeFamilies[config.parentLocale] = []; + } + + localeFamilies[config.parentLocale].push({ + name: name, + config: config + }); + return null; + } + } + } + + locales[name] = new Locale(mergeConfigs(parentConfig, config)); + + if (localeFamilies[name]) { + localeFamilies[name].forEach(function (x) { + defineLocale(x.name, x.config); + }); + } // backwards compat for now: also set the locale + // make sure we set the locale AFTER all child locales have been + // created, so we won't end up with the child locale set. + + + getSetGlobalLocale(name); + return locales[name]; + } else { + // useful for testing + delete locales[name]; + return null; + } + } + + function updateLocale(name, config) { + if (config != null) { + var locale, + tmpLocale, + parentConfig = baseConfig; // MERGE + + tmpLocale = loadLocale(name); + + if (tmpLocale != null) { + parentConfig = tmpLocale._config; + } + + config = mergeConfigs(parentConfig, config); + locale = new Locale(config); + locale.parentLocale = locales[name]; + locales[name] = locale; // backwards compat for now: also set the locale + + getSetGlobalLocale(name); + } else { + // pass null for config to unupdate, useful for tests + if (locales[name] != null) { + if (locales[name].parentLocale != null) { + locales[name] = locales[name].parentLocale; + } else if (locales[name] != null) { + delete locales[name]; + } + } + } + + return locales[name]; + } // returns locale data + + + function getLocale(key) { + var locale; + + if (key && key._locale && key._locale._abbr) { + key = key._locale._abbr; + } + + if (!key) { + return globalLocale; + } + + if (!isArray(key)) { + //short-circuit everything else + locale = loadLocale(key); + + if (locale) { + return locale; + } + + key = [key]; + } + + return chooseLocale(key); + } + + function listLocales() { + return keys(locales); + } - function checkOverflow(m) { - var overflow; - var a = m._a; + function checkOverflow(m) { + var overflow; + var a = m._a; - if (a && getParsingFlags(m).overflow === -2) { - overflow = a[MONTH] < 0 || a[MONTH] > 11 ? MONTH : a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH]) ? DATE : a[HOUR] < 0 || a[HOUR] > 24 || a[HOUR] === 24 && (a[MINUTE] !== 0 || a[SECOND] !== 0 || a[MILLISECOND] !== 0) ? HOUR : a[MINUTE] < 0 || a[MINUTE] > 59 ? MINUTE : a[SECOND] < 0 || a[SECOND] > 59 ? SECOND : a[MILLISECOND] < 0 || a[MILLISECOND] > 999 ? MILLISECOND : -1; + if (a && getParsingFlags(m).overflow === -2) { + overflow = a[MONTH] < 0 || a[MONTH] > 11 ? MONTH : a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH]) ? DATE : a[HOUR] < 0 || a[HOUR] > 24 || a[HOUR] === 24 && (a[MINUTE] !== 0 || a[SECOND] !== 0 || a[MILLISECOND] !== 0) ? HOUR : a[MINUTE] < 0 || a[MINUTE] > 59 ? MINUTE : a[SECOND] < 0 || a[SECOND] > 59 ? SECOND : a[MILLISECOND] < 0 || a[MILLISECOND] > 999 ? MILLISECOND : -1; - if (getParsingFlags(m)._overflowDayOfYear && (overflow < YEAR || overflow > DATE)) { - overflow = DATE; - } + if (getParsingFlags(m)._overflowDayOfYear && (overflow < YEAR || overflow > DATE)) { + overflow = DATE; + } - if (getParsingFlags(m)._overflowWeeks && overflow === -1) { - overflow = WEEK; - } + if (getParsingFlags(m)._overflowWeeks && overflow === -1) { + overflow = WEEK; + } - if (getParsingFlags(m)._overflowWeekday && overflow === -1) { - overflow = WEEKDAY; - } + if (getParsingFlags(m)._overflowWeekday && overflow === -1) { + overflow = WEEKDAY; + } - getParsingFlags(m).overflow = overflow; - } + getParsingFlags(m).overflow = overflow; + } - return m; - } // Pick the first defined of two or three arguments. + return m; + } // Pick the first defined of two or three arguments. - function defaults(a, b, c) { - if (a != null) { - return a; - } + function defaults(a, b, c) { + if (a != null) { + return a; + } - if (b != null) { - return b; - } + if (b != null) { + return b; + } - return c; - } + return c; + } - function currentDateArray(config) { - // hooks is actually the exported moment object - var nowValue = new Date(hooks.now()); + function currentDateArray(config) { + // hooks is actually the exported moment object + var nowValue = new Date(hooks.now()); - if (config._useUTC) { - return [nowValue.getUTCFullYear(), nowValue.getUTCMonth(), nowValue.getUTCDate()]; - } + if (config._useUTC) { + return [nowValue.getUTCFullYear(), nowValue.getUTCMonth(), nowValue.getUTCDate()]; + } - return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()]; - } // convert an array to a date. - // the array should mirror the parameters below - // note: all values past the year are optional and will default to the lowest possible value. - // [year, month, day , hour, minute, second, millisecond] + return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()]; + } // convert an array to a date. + // the array should mirror the parameters below + // note: all values past the year are optional and will default to the lowest possible value. + // [year, month, day , hour, minute, second, millisecond] - function configFromArray(config) { - var i, - date, - input = [], - currentDate, - expectedWeekday, - yearToUse; + function configFromArray(config) { + var i, + date, + input = [], + currentDate, + expectedWeekday, + yearToUse; - if (config._d) { - return; - } + if (config._d) { + return; + } - currentDate = currentDateArray(config); //compute day of the year from weeks and weekdays + currentDate = currentDateArray(config); //compute day of the year from weeks and weekdays - if (config._w && config._a[DATE] == null && config._a[MONTH] == null) { - dayOfYearFromWeekInfo(config); - } //if the day of the year is set, figure out what it is + if (config._w && config._a[DATE] == null && config._a[MONTH] == null) { + dayOfYearFromWeekInfo(config); + } //if the day of the year is set, figure out what it is - if (config._dayOfYear != null) { - yearToUse = defaults(config._a[YEAR], currentDate[YEAR]); - - if (config._dayOfYear > daysInYear(yearToUse) || config._dayOfYear === 0) { - getParsingFlags(config)._overflowDayOfYear = true; - } - - date = createUTCDate(yearToUse, 0, config._dayOfYear); - config._a[MONTH] = date.getUTCMonth(); - config._a[DATE] = date.getUTCDate(); - } // Default to current date. - // * if no year, month, day of month are given, default to today - // * if day of month is given, default month and year - // * if month is given, default only year - // * if year is given, don't default anything - - - for (i = 0; i < 3 && config._a[i] == null; ++i) { - config._a[i] = input[i] = currentDate[i]; - } // Zero out whatever was not defaulted, including time - - - for (; i < 7; i++) { - config._a[i] = input[i] = config._a[i] == null ? i === 2 ? 1 : 0 : config._a[i]; - } // Check for 24:00:00.000 - - - if (config._a[HOUR] === 24 && config._a[MINUTE] === 0 && config._a[SECOND] === 0 && config._a[MILLISECOND] === 0) { - config._nextDay = true; - config._a[HOUR] = 0; - } - - config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input); - expectedWeekday = config._useUTC ? config._d.getUTCDay() : config._d.getDay(); // Apply timezone offset from input. The actual utcOffset can be changed - // with parseZone. - - if (config._tzm != null) { - config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm); - } - - if (config._nextDay) { - config._a[HOUR] = 24; - } // check for mismatching day of week - - - if (config._w && typeof config._w.d !== 'undefined' && config._w.d !== expectedWeekday) { - getParsingFlags(config).weekdayMismatch = true; - } - } - - function dayOfYearFromWeekInfo(config) { - var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow; - w = config._w; - - if (w.GG != null || w.W != null || w.E != null) { - dow = 1; - doy = 4; // TODO: We need to take the current isoWeekYear, but that depends on - // how we interpret now (local, utc, fixed offset). So create - // a now version of current config (take local/utc/offset flags, and - // create now). - - weekYear = defaults(w.GG, config._a[YEAR], weekOfYear(createLocal(), 1, 4).year); - week = defaults(w.W, 1); - weekday = defaults(w.E, 1); - - if (weekday < 1 || weekday > 7) { - weekdayOverflow = true; - } - } else { - dow = config._locale._week.dow; - doy = config._locale._week.doy; - var curWeek = weekOfYear(createLocal(), dow, doy); - weekYear = defaults(w.gg, config._a[YEAR], curWeek.year); // Default to current week. - - week = defaults(w.w, curWeek.week); - - if (w.d != null) { - // weekday -- low day numbers are considered next week - weekday = w.d; - - if (weekday < 0 || weekday > 6) { - weekdayOverflow = true; - } - } else if (w.e != null) { - // local weekday -- counting starts from beginning of week - weekday = w.e + dow; - - if (w.e < 0 || w.e > 6) { - weekdayOverflow = true; - } - } else { - // default to beginning of week - weekday = dow; - } - } - - if (week < 1 || week > weeksInYear(weekYear, dow, doy)) { - getParsingFlags(config)._overflowWeeks = true; - } else if (weekdayOverflow != null) { - getParsingFlags(config)._overflowWeekday = true; - } else { - temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy); - config._a[YEAR] = temp.year; - config._dayOfYear = temp.dayOfYear; - } - } // iso 8601 regex - // 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00) - - - var extendedIsoRegex = /^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/; - var basicIsoRegex = /^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/; - var tzRegex = /Z|[+-]\d\d(?::?\d\d)?/; - var isoDates = [['YYYYYY-MM-DD', /[+-]\d{6}-\d\d-\d\d/], ['YYYY-MM-DD', /\d{4}-\d\d-\d\d/], ['GGGG-[W]WW-E', /\d{4}-W\d\d-\d/], ['GGGG-[W]WW', /\d{4}-W\d\d/, false], ['YYYY-DDD', /\d{4}-\d{3}/], ['YYYY-MM', /\d{4}-\d\d/, false], ['YYYYYYMMDD', /[+-]\d{10}/], ['YYYYMMDD', /\d{8}/], // YYYYMM is NOT allowed by the standard - ['GGGG[W]WWE', /\d{4}W\d{3}/], ['GGGG[W]WW', /\d{4}W\d{2}/, false], ['YYYYDDD', /\d{7}/]]; // iso time formats and regexes - - var isoTimes = [['HH:mm:ss.SSSS', /\d\d:\d\d:\d\d\.\d+/], ['HH:mm:ss,SSSS', /\d\d:\d\d:\d\d,\d+/], ['HH:mm:ss', /\d\d:\d\d:\d\d/], ['HH:mm', /\d\d:\d\d/], ['HHmmss.SSSS', /\d\d\d\d\d\d\.\d+/], ['HHmmss,SSSS', /\d\d\d\d\d\d,\d+/], ['HHmmss', /\d\d\d\d\d\d/], ['HHmm', /\d\d\d\d/], ['HH', /\d\d/]]; - var aspNetJsonRegex = /^\/?Date\((\-?\d+)/i; // date from iso format - - function configFromISO(config) { - var i, - l, - string = config._i, - match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string), - allowTime, - dateFormat, - timeFormat, - tzFormat; - - if (match) { - getParsingFlags(config).iso = true; - - for (i = 0, l = isoDates.length; i < l; i++) { - if (isoDates[i][1].exec(match[1])) { - dateFormat = isoDates[i][0]; - allowTime = isoDates[i][2] !== false; - break; - } - } - - if (dateFormat == null) { - config._isValid = false; - return; - } - - if (match[3]) { - for (i = 0, l = isoTimes.length; i < l; i++) { - if (isoTimes[i][1].exec(match[3])) { - // match[2] should be 'T' or space - timeFormat = (match[2] || ' ') + isoTimes[i][0]; - break; - } - } - - if (timeFormat == null) { - config._isValid = false; - return; - } - } - - if (!allowTime && timeFormat != null) { - config._isValid = false; - return; - } - - if (match[4]) { - if (tzRegex.exec(match[4])) { - tzFormat = 'Z'; - } else { - config._isValid = false; - return; - } - } - - config._f = dateFormat + (timeFormat || '') + (tzFormat || ''); - configFromStringAndFormat(config); - } else { - config._isValid = false; - } - } // RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3 - - - var rfc2822 = /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/; - - function extractFromRFC2822Strings(yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr) { - var result = [untruncateYear(yearStr), defaultLocaleMonthsShort.indexOf(monthStr), parseInt(dayStr, 10), parseInt(hourStr, 10), parseInt(minuteStr, 10)]; - - if (secondStr) { - result.push(parseInt(secondStr, 10)); - } - - return result; - } - - function untruncateYear(yearStr) { - var year = parseInt(yearStr, 10); - - if (year <= 49) { - return 2000 + year; - } else if (year <= 999) { - return 1900 + year; - } - - return year; - } - - function preprocessRFC2822(s) { - // Remove comments and folding whitespace and replace multiple-spaces with a single space - return s.replace(/\([^)]*\)|[\n\t]/g, ' ').replace(/(\s\s+)/g, ' ').replace(/^\s\s*/, '').replace(/\s\s*$/, ''); - } - - function checkWeekday(weekdayStr, parsedInput, config) { - if (weekdayStr) { - // TODO: Replace the vanilla JS Date object with an indepentent day-of-week check. - var weekdayProvided = defaultLocaleWeekdaysShort.indexOf(weekdayStr), - weekdayActual = new Date(parsedInput[0], parsedInput[1], parsedInput[2]).getDay(); - - if (weekdayProvided !== weekdayActual) { - getParsingFlags(config).weekdayMismatch = true; - config._isValid = false; - return false; - } - } - - return true; - } - - var obsOffsets = { - UT: 0, - GMT: 0, - EDT: -4 * 60, - EST: -5 * 60, - CDT: -5 * 60, - CST: -6 * 60, - MDT: -6 * 60, - MST: -7 * 60, - PDT: -7 * 60, - PST: -8 * 60 - }; - - function calculateOffset(obsOffset, militaryOffset, numOffset) { - if (obsOffset) { - return obsOffsets[obsOffset]; - } else if (militaryOffset) { - // the only allowed military tz is Z - return 0; - } else { - var hm = parseInt(numOffset, 10); - var m = hm % 100, - h = (hm - m) / 100; - return h * 60 + m; - } - } // date and time from ref 2822 format - - - function configFromRFC2822(config) { - var match = rfc2822.exec(preprocessRFC2822(config._i)); - - if (match) { - var parsedArray = extractFromRFC2822Strings(match[4], match[3], match[2], match[5], match[6], match[7]); - - if (!checkWeekday(match[1], parsedArray, config)) { - return; - } - - config._a = parsedArray; - config._tzm = calculateOffset(match[8], match[9], match[10]); - config._d = createUTCDate.apply(null, config._a); - - config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm); - - getParsingFlags(config).rfc2822 = true; - } else { - config._isValid = false; - } - } // date from iso format or fallback - + if (config._dayOfYear != null) { + yearToUse = defaults(config._a[YEAR], currentDate[YEAR]); + + if (config._dayOfYear > daysInYear(yearToUse) || config._dayOfYear === 0) { + getParsingFlags(config)._overflowDayOfYear = true; + } + + date = createUTCDate(yearToUse, 0, config._dayOfYear); + config._a[MONTH] = date.getUTCMonth(); + config._a[DATE] = date.getUTCDate(); + } // Default to current date. + // * if no year, month, day of month are given, default to today + // * if day of month is given, default month and year + // * if month is given, default only year + // * if year is given, don't default anything + + + for (i = 0; i < 3 && config._a[i] == null; ++i) { + config._a[i] = input[i] = currentDate[i]; + } // Zero out whatever was not defaulted, including time + + + for (; i < 7; i++) { + config._a[i] = input[i] = config._a[i] == null ? i === 2 ? 1 : 0 : config._a[i]; + } // Check for 24:00:00.000 + + + if (config._a[HOUR] === 24 && config._a[MINUTE] === 0 && config._a[SECOND] === 0 && config._a[MILLISECOND] === 0) { + config._nextDay = true; + config._a[HOUR] = 0; + } + + config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input); + expectedWeekday = config._useUTC ? config._d.getUTCDay() : config._d.getDay(); // Apply timezone offset from input. The actual utcOffset can be changed + // with parseZone. + + if (config._tzm != null) { + config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm); + } + + if (config._nextDay) { + config._a[HOUR] = 24; + } // check for mismatching day of week + + + if (config._w && typeof config._w.d !== 'undefined' && config._w.d !== expectedWeekday) { + getParsingFlags(config).weekdayMismatch = true; + } + } + + function dayOfYearFromWeekInfo(config) { + var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow; + w = config._w; + + if (w.GG != null || w.W != null || w.E != null) { + dow = 1; + doy = 4; // TODO: We need to take the current isoWeekYear, but that depends on + // how we interpret now (local, utc, fixed offset). So create + // a now version of current config (take local/utc/offset flags, and + // create now). + + weekYear = defaults(w.GG, config._a[YEAR], weekOfYear(createLocal(), 1, 4).year); + week = defaults(w.W, 1); + weekday = defaults(w.E, 1); + + if (weekday < 1 || weekday > 7) { + weekdayOverflow = true; + } + } else { + dow = config._locale._week.dow; + doy = config._locale._week.doy; + var curWeek = weekOfYear(createLocal(), dow, doy); + weekYear = defaults(w.gg, config._a[YEAR], curWeek.year); // Default to current week. + + week = defaults(w.w, curWeek.week); + + if (w.d != null) { + // weekday -- low day numbers are considered next week + weekday = w.d; + + if (weekday < 0 || weekday > 6) { + weekdayOverflow = true; + } + } else if (w.e != null) { + // local weekday -- counting starts from beginning of week + weekday = w.e + dow; + + if (w.e < 0 || w.e > 6) { + weekdayOverflow = true; + } + } else { + // default to beginning of week + weekday = dow; + } + } + + if (week < 1 || week > weeksInYear(weekYear, dow, doy)) { + getParsingFlags(config)._overflowWeeks = true; + } else if (weekdayOverflow != null) { + getParsingFlags(config)._overflowWeekday = true; + } else { + temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy); + config._a[YEAR] = temp.year; + config._dayOfYear = temp.dayOfYear; + } + } // iso 8601 regex + // 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00) + + + var extendedIsoRegex = /^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/; + var basicIsoRegex = /^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/; + var tzRegex = /Z|[+-]\d\d(?::?\d\d)?/; + var isoDates = [['YYYYYY-MM-DD', /[+-]\d{6}-\d\d-\d\d/], ['YYYY-MM-DD', /\d{4}-\d\d-\d\d/], ['GGGG-[W]WW-E', /\d{4}-W\d\d-\d/], ['GGGG-[W]WW', /\d{4}-W\d\d/, false], ['YYYY-DDD', /\d{4}-\d{3}/], ['YYYY-MM', /\d{4}-\d\d/, false], ['YYYYYYMMDD', /[+-]\d{10}/], ['YYYYMMDD', /\d{8}/], // YYYYMM is NOT allowed by the standard + ['GGGG[W]WWE', /\d{4}W\d{3}/], ['GGGG[W]WW', /\d{4}W\d{2}/, false], ['YYYYDDD', /\d{7}/]]; // iso time formats and regexes + + var isoTimes = [['HH:mm:ss.SSSS', /\d\d:\d\d:\d\d\.\d+/], ['HH:mm:ss,SSSS', /\d\d:\d\d:\d\d,\d+/], ['HH:mm:ss', /\d\d:\d\d:\d\d/], ['HH:mm', /\d\d:\d\d/], ['HHmmss.SSSS', /\d\d\d\d\d\d\.\d+/], ['HHmmss,SSSS', /\d\d\d\d\d\d,\d+/], ['HHmmss', /\d\d\d\d\d\d/], ['HHmm', /\d\d\d\d/], ['HH', /\d\d/]]; + var aspNetJsonRegex = /^\/?Date\((\-?\d+)/i; // date from iso format + + function configFromISO(config) { + var i, + l, + string = config._i, + match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string), + allowTime, + dateFormat, + timeFormat, + tzFormat; + + if (match) { + getParsingFlags(config).iso = true; + + for (i = 0, l = isoDates.length; i < l; i++) { + if (isoDates[i][1].exec(match[1])) { + dateFormat = isoDates[i][0]; + allowTime = isoDates[i][2] !== false; + break; + } + } + + if (dateFormat == null) { + config._isValid = false; + return; + } + + if (match[3]) { + for (i = 0, l = isoTimes.length; i < l; i++) { + if (isoTimes[i][1].exec(match[3])) { + // match[2] should be 'T' or space + timeFormat = (match[2] || ' ') + isoTimes[i][0]; + break; + } + } + + if (timeFormat == null) { + config._isValid = false; + return; + } + } + + if (!allowTime && timeFormat != null) { + config._isValid = false; + return; + } + + if (match[4]) { + if (tzRegex.exec(match[4])) { + tzFormat = 'Z'; + } else { + config._isValid = false; + return; + } + } + + config._f = dateFormat + (timeFormat || '') + (tzFormat || ''); + configFromStringAndFormat(config); + } else { + config._isValid = false; + } + } // RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3 + + + var rfc2822 = /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/; + + function extractFromRFC2822Strings(yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr) { + var result = [untruncateYear(yearStr), defaultLocaleMonthsShort.indexOf(monthStr), parseInt(dayStr, 10), parseInt(hourStr, 10), parseInt(minuteStr, 10)]; + + if (secondStr) { + result.push(parseInt(secondStr, 10)); + } + + return result; + } + + function untruncateYear(yearStr) { + var year = parseInt(yearStr, 10); + + if (year <= 49) { + return 2000 + year; + } else if (year <= 999) { + return 1900 + year; + } + + return year; + } + + function preprocessRFC2822(s) { + // Remove comments and folding whitespace and replace multiple-spaces with a single space + return s.replace(/\([^)]*\)|[\n\t]/g, ' ').replace(/(\s\s+)/g, ' ').replace(/^\s\s*/, '').replace(/\s\s*$/, ''); + } + + function checkWeekday(weekdayStr, parsedInput, config) { + if (weekdayStr) { + // TODO: Replace the vanilla JS Date object with an indepentent day-of-week check. + var weekdayProvided = defaultLocaleWeekdaysShort.indexOf(weekdayStr), + weekdayActual = new Date(parsedInput[0], parsedInput[1], parsedInput[2]).getDay(); + + if (weekdayProvided !== weekdayActual) { + getParsingFlags(config).weekdayMismatch = true; + config._isValid = false; + return false; + } + } + + return true; + } + + var obsOffsets = { + UT: 0, + GMT: 0, + EDT: -4 * 60, + EST: -5 * 60, + CDT: -5 * 60, + CST: -6 * 60, + MDT: -6 * 60, + MST: -7 * 60, + PDT: -7 * 60, + PST: -8 * 60 + }; + + function calculateOffset(obsOffset, militaryOffset, numOffset) { + if (obsOffset) { + return obsOffsets[obsOffset]; + } else if (militaryOffset) { + // the only allowed military tz is Z + return 0; + } else { + var hm = parseInt(numOffset, 10); + var m = hm % 100, + h = (hm - m) / 100; + return h * 60 + m; + } + } // date and time from ref 2822 format + + + function configFromRFC2822(config) { + var match = rfc2822.exec(preprocessRFC2822(config._i)); + + if (match) { + var parsedArray = extractFromRFC2822Strings(match[4], match[3], match[2], match[5], match[6], match[7]); + + if (!checkWeekday(match[1], parsedArray, config)) { + return; + } + + config._a = parsedArray; + config._tzm = calculateOffset(match[8], match[9], match[10]); + config._d = createUTCDate.apply(null, config._a); + + config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm); + + getParsingFlags(config).rfc2822 = true; + } else { + config._isValid = false; + } + } // date from iso format or fallback + - function configFromString(config) { - var matched = aspNetJsonRegex.exec(config._i); + function configFromString(config) { + var matched = aspNetJsonRegex.exec(config._i); - if (matched !== null) { - config._d = new Date(+matched[1]); - return; - } + if (matched !== null) { + config._d = new Date(+matched[1]); + return; + } - configFromISO(config); - - if (config._isValid === false) { - delete config._isValid; - } else { - return; - } + configFromISO(config); + + if (config._isValid === false) { + delete config._isValid; + } else { + return; + } - configFromRFC2822(config); - - if (config._isValid === false) { - delete config._isValid; - } else { - return; - } // Final attempt, use Input Fallback - - - hooks.createFromInputFallback(config); - } - - hooks.createFromInputFallback = deprecate('value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), ' + 'which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are ' + 'discouraged and will be removed in an upcoming major release. Please refer to ' + 'http://momentjs.com/guides/#/warnings/js-date/ for more info.', function (config) { - config._d = new Date(config._i + (config._useUTC ? ' UTC' : '')); - }); // constant that refers to the ISO standard - - hooks.ISO_8601 = function () {}; // constant that refers to the RFC 2822 form - - - hooks.RFC_2822 = function () {}; // date from string and format string - - - function configFromStringAndFormat(config) { - // TODO: Move this to another part of the creation flow to prevent circular deps - if (config._f === hooks.ISO_8601) { - configFromISO(config); - return; - } + configFromRFC2822(config); + + if (config._isValid === false) { + delete config._isValid; + } else { + return; + } // Final attempt, use Input Fallback + + + hooks.createFromInputFallback(config); + } + + hooks.createFromInputFallback = deprecate('value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), ' + 'which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are ' + 'discouraged and will be removed in an upcoming major release. Please refer to ' + 'http://momentjs.com/guides/#/warnings/js-date/ for more info.', function (config) { + config._d = new Date(config._i + (config._useUTC ? ' UTC' : '')); + }); // constant that refers to the ISO standard + + hooks.ISO_8601 = function () {}; // constant that refers to the RFC 2822 form + + + hooks.RFC_2822 = function () {}; // date from string and format string + + + function configFromStringAndFormat(config) { + // TODO: Move this to another part of the creation flow to prevent circular deps + if (config._f === hooks.ISO_8601) { + configFromISO(config); + return; + } - if (config._f === hooks.RFC_2822) { - configFromRFC2822(config); - return; - } - - config._a = []; - getParsingFlags(config).empty = true; // This array is used to make a Date, either with `new Date` or `Date.UTC` + if (config._f === hooks.RFC_2822) { + configFromRFC2822(config); + return; + } + + config._a = []; + getParsingFlags(config).empty = true; // This array is used to make a Date, either with `new Date` or `Date.UTC` - var string = '' + config._i, - i, - parsedInput, - tokens, - token, - skipped, - stringLength = string.length, - totalParsedInputLength = 0; - tokens = expandFormat(config._f, config._locale).match(formattingTokens) || []; + var string = '' + config._i, + i, + parsedInput, + tokens, + token, + skipped, + stringLength = string.length, + totalParsedInputLength = 0; + tokens = expandFormat(config._f, config._locale).match(formattingTokens) || []; - for (i = 0; i < tokens.length; i++) { - token = tokens[i]; - parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0]; // console.log('token', token, 'parsedInput', parsedInput, - // 'regex', getParseRegexForToken(token, config)); + for (i = 0; i < tokens.length; i++) { + token = tokens[i]; + parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0]; // console.log('token', token, 'parsedInput', parsedInput, + // 'regex', getParseRegexForToken(token, config)); - if (parsedInput) { - skipped = string.substr(0, string.indexOf(parsedInput)); + if (parsedInput) { + skipped = string.substr(0, string.indexOf(parsedInput)); - if (skipped.length > 0) { - getParsingFlags(config).unusedInput.push(skipped); - } + if (skipped.length > 0) { + getParsingFlags(config).unusedInput.push(skipped); + } - string = string.slice(string.indexOf(parsedInput) + parsedInput.length); - totalParsedInputLength += parsedInput.length; - } // don't parse if it's not a known token + string = string.slice(string.indexOf(parsedInput) + parsedInput.length); + totalParsedInputLength += parsedInput.length; + } // don't parse if it's not a known token - if (formatTokenFunctions[token]) { - if (parsedInput) { - getParsingFlags(config).empty = false; - } else { - getParsingFlags(config).unusedTokens.push(token); - } + if (formatTokenFunctions[token]) { + if (parsedInput) { + getParsingFlags(config).empty = false; + } else { + getParsingFlags(config).unusedTokens.push(token); + } - addTimeToArrayFromToken(token, parsedInput, config); - } else if (config._strict && !parsedInput) { - getParsingFlags(config).unusedTokens.push(token); - } - } // add remaining unparsed input length to the string + addTimeToArrayFromToken(token, parsedInput, config); + } else if (config._strict && !parsedInput) { + getParsingFlags(config).unusedTokens.push(token); + } + } // add remaining unparsed input length to the string - getParsingFlags(config).charsLeftOver = stringLength - totalParsedInputLength; + getParsingFlags(config).charsLeftOver = stringLength - totalParsedInputLength; - if (string.length > 0) { - getParsingFlags(config).unusedInput.push(string); - } // clear _12h flag if hour is <= 12 + if (string.length > 0) { + getParsingFlags(config).unusedInput.push(string); + } // clear _12h flag if hour is <= 12 - if (config._a[HOUR] <= 12 && getParsingFlags(config).bigHour === true && config._a[HOUR] > 0) { - getParsingFlags(config).bigHour = undefined; - } + if (config._a[HOUR] <= 12 && getParsingFlags(config).bigHour === true && config._a[HOUR] > 0) { + getParsingFlags(config).bigHour = undefined; + } - getParsingFlags(config).parsedDateParts = config._a.slice(0); - getParsingFlags(config).meridiem = config._meridiem; // handle meridiem + getParsingFlags(config).parsedDateParts = config._a.slice(0); + getParsingFlags(config).meridiem = config._meridiem; // handle meridiem - config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR], config._meridiem); - configFromArray(config); - checkOverflow(config); - } + config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR], config._meridiem); + configFromArray(config); + checkOverflow(config); + } - function meridiemFixWrap(locale, hour, meridiem) { - var isPm; + function meridiemFixWrap(locale, hour, meridiem) { + var isPm; - if (meridiem == null) { - // nothing to do - return hour; - } + if (meridiem == null) { + // nothing to do + return hour; + } - if (locale.meridiemHour != null) { - return locale.meridiemHour(hour, meridiem); - } else if (locale.isPM != null) { - // Fallback - isPm = locale.isPM(meridiem); + if (locale.meridiemHour != null) { + return locale.meridiemHour(hour, meridiem); + } else if (locale.isPM != null) { + // Fallback + isPm = locale.isPM(meridiem); - if (isPm && hour < 12) { - hour += 12; - } - - if (!isPm && hour === 12) { - hour = 0; - } - - return hour; - } else { - // this is not supposed to happen - return hour; - } - } // date from string and array of format strings - - - function configFromStringAndArray(config) { - var tempConfig, bestMoment, scoreToBeat, i, currentScore; - - if (config._f.length === 0) { - getParsingFlags(config).invalidFormat = true; - config._d = new Date(NaN); - return; - } - - for (i = 0; i < config._f.length; i++) { - currentScore = 0; - tempConfig = copyConfig({}, config); - - if (config._useUTC != null) { - tempConfig._useUTC = config._useUTC; - } - - tempConfig._f = config._f[i]; - configFromStringAndFormat(tempConfig); - - if (!isValid(tempConfig)) { - continue; - } // if there is any input that was not parsed add a penalty for that format - - - currentScore += getParsingFlags(tempConfig).charsLeftOver; //or tokens - - currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10; - getParsingFlags(tempConfig).score = currentScore; - - if (scoreToBeat == null || currentScore < scoreToBeat) { - scoreToBeat = currentScore; - bestMoment = tempConfig; - } - } - - extend(config, bestMoment || tempConfig); - } - - function configFromObject(config) { - if (config._d) { - return; - } - - var i = normalizeObjectUnits(config._i); - config._a = map([i.year, i.month, i.day || i.date, i.hour, i.minute, i.second, i.millisecond], function (obj) { - return obj && parseInt(obj, 10); - }); - configFromArray(config); - } - - function createFromConfig(config) { - var res = new Moment(checkOverflow(prepareConfig(config))); - - if (res._nextDay) { - // Adding is smart enough around DST - res.add(1, 'd'); - res._nextDay = undefined; - } - - return res; - } - - function prepareConfig(config) { - var input = config._i, - format = config._f; - config._locale = config._locale || getLocale(config._l); - - if (input === null || format === undefined && input === '') { - return createInvalid({ - nullInput: true - }); - } - - if (typeof input === 'string') { - config._i = input = config._locale.preparse(input); - } - - if (isMoment(input)) { - return new Moment(checkOverflow(input)); - } else if (isDate(input)) { - config._d = input; - } else if (isArray(format)) { - configFromStringAndArray(config); - } else if (format) { - configFromStringAndFormat(config); - } else { - configFromInput(config); - } - - if (!isValid(config)) { - config._d = null; - } - - return config; - } - - function configFromInput(config) { - var input = config._i; - - if (isUndefined(input)) { - config._d = new Date(hooks.now()); - } else if (isDate(input)) { - config._d = new Date(input.valueOf()); - } else if (typeof input === 'string') { - configFromString(config); - } else if (isArray(input)) { - config._a = map(input.slice(0), function (obj) { - return parseInt(obj, 10); - }); - configFromArray(config); - } else if (isObject(input)) { - configFromObject(config); - } else if (isNumber(input)) { - // from milliseconds - config._d = new Date(input); - } else { - hooks.createFromInputFallback(config); - } - } - - function createLocalOrUTC(input, format, locale, strict, isUTC) { - var c = {}; - - if (locale === true || locale === false) { - strict = locale; - locale = undefined; - } - - if (isObject(input) && isObjectEmpty(input) || isArray(input) && input.length === 0) { - input = undefined; - } // object construction must be done this way. - // https://github.com/moment/moment/issues/1423 - - - c._isAMomentObject = true; - c._useUTC = c._isUTC = isUTC; - c._l = locale; - c._i = input; - c._f = format; - c._strict = strict; - return createFromConfig(c); - } - - function createLocal(input, format, locale, strict) { - return createLocalOrUTC(input, format, locale, strict, false); - } - - var prototypeMin = deprecate('moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/', function () { - var other = createLocal.apply(null, arguments); - - if (this.isValid() && other.isValid()) { - return other < this ? this : other; - } else { - return createInvalid(); - } - }); - var prototypeMax = deprecate('moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/', function () { - var other = createLocal.apply(null, arguments); - - if (this.isValid() && other.isValid()) { - return other > this ? this : other; - } else { - return createInvalid(); - } - }); // Pick a moment m from moments so that m[fn](other) is true for all - // other. This relies on the function fn to be transitive. - // - // moments should either be an array of moment objects or an array, whose - // first element is an array of moment objects. - - function pickBy(fn, moments) { - var res, i; - - if (moments.length === 1 && isArray(moments[0])) { - moments = moments[0]; - } - - if (!moments.length) { - return createLocal(); - } - - res = moments[0]; - - for (i = 1; i < moments.length; ++i) { - if (!moments[i].isValid() || moments[i][fn](res)) { - res = moments[i]; - } - } - - return res; - } // TODO: Use [].sort instead? - - - function min() { - var args = [].slice.call(arguments, 0); - return pickBy('isBefore', args); - } - - function max() { - var args = [].slice.call(arguments, 0); - return pickBy('isAfter', args); - } - - var now = function () { - return Date.now ? Date.now() : +new Date(); - }; - - var ordering = ['year', 'quarter', 'month', 'week', 'day', 'hour', 'minute', 'second', 'millisecond']; - - function isDurationValid(m) { - for (var key in m) { - if (!(indexOf.call(ordering, key) !== -1 && (m[key] == null || !isNaN(m[key])))) { - return false; - } - } - - var unitHasDecimal = false; - - for (var i = 0; i < ordering.length; ++i) { - if (m[ordering[i]]) { - if (unitHasDecimal) { - return false; // only allow non-integers for smallest unit - } - - if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) { - unitHasDecimal = true; - } - } - } - - return true; - } - - function isValid$1() { - return this._isValid; - } - - function createInvalid$1() { - return createDuration(NaN); - } - - function Duration(duration) { - var normalizedInput = normalizeObjectUnits(duration), - years = normalizedInput.year || 0, - quarters = normalizedInput.quarter || 0, - months = normalizedInput.month || 0, - weeks = normalizedInput.week || normalizedInput.isoWeek || 0, - days = normalizedInput.day || 0, - hours = normalizedInput.hour || 0, - minutes = normalizedInput.minute || 0, - seconds = normalizedInput.second || 0, - milliseconds = normalizedInput.millisecond || 0; - this._isValid = isDurationValid(normalizedInput); // representation for dateAddRemove - - this._milliseconds = +milliseconds + seconds * 1e3 + // 1000 - minutes * 6e4 + // 1000 * 60 - hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978 - // Because of dateAddRemove treats 24 hours as different from a - // day when working around DST, we need to store them separately - - this._days = +days + weeks * 7; // It is impossible to translate months into days without knowing - // which months you are are talking about, so we have to store - // it separately. - - this._months = +months + quarters * 3 + years * 12; - this._data = {}; - this._locale = getLocale(); - - this._bubble(); - } - - function isDuration(obj) { - return obj instanceof Duration; - } - - function absRound(number) { - if (number < 0) { - return Math.round(-1 * number) * -1; - } else { - return Math.round(number); - } - } // FORMATTING - - - function offset(token, separator) { - addFormatToken(token, 0, 0, function () { - var offset = this.utcOffset(); - var sign = '+'; - - if (offset < 0) { - offset = -offset; - sign = '-'; - } - - return sign + zeroFill(~~(offset / 60), 2) + separator + zeroFill(~~offset % 60, 2); - }); - } - - offset('Z', ':'); - offset('ZZ', ''); // PARSING - - addRegexToken('Z', matchShortOffset); - addRegexToken('ZZ', matchShortOffset); - addParseToken(['Z', 'ZZ'], function (input, array, config) { - config._useUTC = true; - config._tzm = offsetFromString(matchShortOffset, input); - }); // HELPERS - // timezone chunker - // '+10:00' > ['10', '00'] - // '-1530' > ['-15', '30'] - - var chunkOffset = /([\+\-]|\d\d)/gi; - - function offsetFromString(matcher, string) { - var matches = (string || '').match(matcher); - - if (matches === null) { - return null; - } - - var chunk = matches[matches.length - 1] || []; - var parts = (chunk + '').match(chunkOffset) || ['-', 0, 0]; - var minutes = +(parts[1] * 60) + toInt(parts[2]); - return minutes === 0 ? 0 : parts[0] === '+' ? minutes : -minutes; - } // Return a moment from input, that is local/utc/zone equivalent to model. - - - function cloneWithOffset(input, model) { - var res, diff; - - if (model._isUTC) { - res = model.clone(); - diff = (isMoment(input) || isDate(input) ? input.valueOf() : createLocal(input).valueOf()) - res.valueOf(); // Use low-level api, because this fn is low-level api. - - res._d.setTime(res._d.valueOf() + diff); - - hooks.updateOffset(res, false); - return res; - } else { - return createLocal(input).local(); - } - } - - function getDateOffset(m) { - // On Firefox.24 Date#getTimezoneOffset returns a floating point. - // https://github.com/moment/moment/pull/1871 - return -Math.round(m._d.getTimezoneOffset() / 15) * 15; - } // HOOKS - // This function will be called whenever a moment is mutated. - // It is intended to keep the offset in sync with the timezone. - - - hooks.updateOffset = function () {}; // MOMENTS - // keepLocalTime = true means only change the timezone, without - // affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]--> - // 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset - // +0200, so we adjust the time as needed, to be valid. - // - // Keeping the time actually adds/subtracts (one hour) - // from the actual represented time. That is why we call updateOffset - // a second time. In case it wants us to change the offset again - // _changeInProgress == true case, then we have to adjust, because - // there is no such time in the given timezone. - - - function getSetOffset(input, keepLocalTime, keepMinutes) { - var offset = this._offset || 0, - localAdjust; - - if (!this.isValid()) { - return input != null ? this : NaN; - } - - if (input != null) { - if (typeof input === 'string') { - input = offsetFromString(matchShortOffset, input); - - if (input === null) { - return this; - } - } else if (Math.abs(input) < 16 && !keepMinutes) { - input = input * 60; - } - - if (!this._isUTC && keepLocalTime) { - localAdjust = getDateOffset(this); - } - - this._offset = input; - this._isUTC = true; - - if (localAdjust != null) { - this.add(localAdjust, 'm'); - } - - if (offset !== input) { - if (!keepLocalTime || this._changeInProgress) { - addSubtract(this, createDuration(input - offset, 'm'), 1, false); - } else if (!this._changeInProgress) { - this._changeInProgress = true; - hooks.updateOffset(this, true); - this._changeInProgress = null; - } - } - - return this; - } else { - return this._isUTC ? offset : getDateOffset(this); - } - } - - function getSetZone(input, keepLocalTime) { - if (input != null) { - if (typeof input !== 'string') { - input = -input; - } - - this.utcOffset(input, keepLocalTime); - return this; - } else { - return -this.utcOffset(); - } - } - - function setOffsetToUTC(keepLocalTime) { - return this.utcOffset(0, keepLocalTime); - } - - function setOffsetToLocal(keepLocalTime) { - if (this._isUTC) { - this.utcOffset(0, keepLocalTime); - this._isUTC = false; - - if (keepLocalTime) { - this.subtract(getDateOffset(this), 'm'); - } - } - - return this; - } - - function setOffsetToParsedOffset() { - if (this._tzm != null) { - this.utcOffset(this._tzm, false, true); - } else if (typeof this._i === 'string') { - var tZone = offsetFromString(matchOffset, this._i); - - if (tZone != null) { - this.utcOffset(tZone); - } else { - this.utcOffset(0, true); - } - } - - return this; - } - - function hasAlignedHourOffset(input) { - if (!this.isValid()) { - return false; - } - - input = input ? createLocal(input).utcOffset() : 0; - return (this.utcOffset() - input) % 60 === 0; - } - - function isDaylightSavingTime() { - return this.utcOffset() > this.clone().month(0).utcOffset() || this.utcOffset() > this.clone().month(5).utcOffset(); - } - - function isDaylightSavingTimeShifted() { - if (!isUndefined(this._isDSTShifted)) { - return this._isDSTShifted; - } - - var c = {}; - copyConfig(c, this); - c = prepareConfig(c); - - if (c._a) { - var other = c._isUTC ? createUTC(c._a) : createLocal(c._a); - this._isDSTShifted = this.isValid() && compareArrays(c._a, other.toArray()) > 0; - } else { - this._isDSTShifted = false; - } - - return this._isDSTShifted; - } - - function isLocal() { - return this.isValid() ? !this._isUTC : false; - } - - function isUtcOffset() { - return this.isValid() ? this._isUTC : false; - } - - function isUtc() { - return this.isValid() ? this._isUTC && this._offset === 0 : false; - } // ASP.NET json date format regex - - - var aspNetRegex = /^(\-|\+)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/; // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html - // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere - // and further modified to allow for strings containing both week and day - - var isoRegex = /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/; - - function createDuration(input, key) { - var duration = input, - // matching against regexp is expensive, do it on demand - match = null, - sign, - ret, - diffRes; - - if (isDuration(input)) { - duration = { - ms: input._milliseconds, - d: input._days, - M: input._months - }; - } else if (isNumber(input)) { - duration = {}; - - if (key) { - duration[key] = input; - } else { - duration.milliseconds = input; - } - } else if (!!(match = aspNetRegex.exec(input))) { - sign = match[1] === '-' ? -1 : 1; - duration = { - y: 0, - d: toInt(match[DATE]) * sign, - h: toInt(match[HOUR]) * sign, - m: toInt(match[MINUTE]) * sign, - s: toInt(match[SECOND]) * sign, - ms: toInt(absRound(match[MILLISECOND] * 1000)) * sign // the millisecond decimal point is included in the match - - }; - } else if (!!(match = isoRegex.exec(input))) { - sign = match[1] === '-' ? -1 : 1; - duration = { - y: parseIso(match[2], sign), - M: parseIso(match[3], sign), - w: parseIso(match[4], sign), - d: parseIso(match[5], sign), - h: parseIso(match[6], sign), - m: parseIso(match[7], sign), - s: parseIso(match[8], sign) - }; - } else if (duration == null) { - // checks for null or undefined - duration = {}; - } else if (typeof duration === 'object' && ('from' in duration || 'to' in duration)) { - diffRes = momentsDifference(createLocal(duration.from), createLocal(duration.to)); - duration = {}; - duration.ms = diffRes.milliseconds; - duration.M = diffRes.months; - } - - ret = new Duration(duration); - - if (isDuration(input) && hasOwnProp(input, '_locale')) { - ret._locale = input._locale; - } - - return ret; - } - - createDuration.fn = Duration.prototype; - createDuration.invalid = createInvalid$1; - - function parseIso(inp, sign) { - // We'd normally use ~~inp for this, but unfortunately it also - // converts floats to ints. - // inp may be undefined, so careful calling replace on it. - var res = inp && parseFloat(inp.replace(',', '.')); // apply sign while we're at it - - return (isNaN(res) ? 0 : res) * sign; - } - - function positiveMomentsDifference(base, other) { - var res = {}; - res.months = other.month() - base.month() + (other.year() - base.year()) * 12; - - if (base.clone().add(res.months, 'M').isAfter(other)) { - --res.months; - } - - res.milliseconds = +other - +base.clone().add(res.months, 'M'); - return res; - } - - function momentsDifference(base, other) { - var res; - - if (!(base.isValid() && other.isValid())) { - return { - milliseconds: 0, - months: 0 - }; - } - - other = cloneWithOffset(other, base); - - if (base.isBefore(other)) { - res = positiveMomentsDifference(base, other); - } else { - res = positiveMomentsDifference(other, base); - res.milliseconds = -res.milliseconds; - res.months = -res.months; - } - - return res; - } // TODO: remove 'name' arg after deprecation is removed - - - function createAdder(direction, name) { - return function (val, period) { - var dur, tmp; //invert the arguments, but complain about it - - if (period !== null && !isNaN(+period)) { - deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' + 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.'); - tmp = val; - val = period; - period = tmp; - } - - val = typeof val === 'string' ? +val : val; - dur = createDuration(val, period); - addSubtract(this, dur, direction); - return this; - }; - } - - function addSubtract(mom, duration, isAdding, updateOffset) { - var milliseconds = duration._milliseconds, - days = absRound(duration._days), - months = absRound(duration._months); - - if (!mom.isValid()) { - // No op - return; - } - - updateOffset = updateOffset == null ? true : updateOffset; - - if (months) { - setMonth(mom, get(mom, 'Month') + months * isAdding); - } - - if (days) { - set$1(mom, 'Date', get(mom, 'Date') + days * isAdding); - } - - if (milliseconds) { - mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding); - } - - if (updateOffset) { - hooks.updateOffset(mom, days || months); - } - } - - var add = createAdder(1, 'add'); - var subtract = createAdder(-1, 'subtract'); - - function getCalendarFormat(myMoment, now) { - var diff = myMoment.diff(now, 'days', true); - return diff < -6 ? 'sameElse' : diff < -1 ? 'lastWeek' : diff < 0 ? 'lastDay' : diff < 1 ? 'sameDay' : diff < 2 ? 'nextDay' : diff < 7 ? 'nextWeek' : 'sameElse'; - } - - function calendar$1(time, formats) { - // We want to compare the start of today, vs this. - // Getting start-of-today depends on whether we're local/utc/offset or not. - var now = time || createLocal(), - sod = cloneWithOffset(now, this).startOf('day'), - format = hooks.calendarFormat(this, sod) || 'sameElse'; - var output = formats && (isFunction(formats[format]) ? formats[format].call(this, now) : formats[format]); - return this.format(output || this.localeData().calendar(format, this, createLocal(now))); - } - - function clone() { - return new Moment(this); - } - - function isAfter(input, units) { - var localInput = isMoment(input) ? input : createLocal(input); - - if (!(this.isValid() && localInput.isValid())) { - return false; - } - - units = normalizeUnits(units) || 'millisecond'; - - if (units === 'millisecond') { - return this.valueOf() > localInput.valueOf(); - } else { - return localInput.valueOf() < this.clone().startOf(units).valueOf(); - } - } - - function isBefore(input, units) { - var localInput = isMoment(input) ? input : createLocal(input); - - if (!(this.isValid() && localInput.isValid())) { - return false; - } - - units = normalizeUnits(units) || 'millisecond'; - - if (units === 'millisecond') { - return this.valueOf() < localInput.valueOf(); - } else { - return this.clone().endOf(units).valueOf() < localInput.valueOf(); - } - } - - function isBetween(from, to, units, inclusivity) { - var localFrom = isMoment(from) ? from : createLocal(from), - localTo = isMoment(to) ? to : createLocal(to); - - if (!(this.isValid() && localFrom.isValid() && localTo.isValid())) { - return false; - } - - inclusivity = inclusivity || '()'; - return (inclusivity[0] === '(' ? this.isAfter(localFrom, units) : !this.isBefore(localFrom, units)) && (inclusivity[1] === ')' ? this.isBefore(localTo, units) : !this.isAfter(localTo, units)); - } - - function isSame(input, units) { - var localInput = isMoment(input) ? input : createLocal(input), - inputMs; - - if (!(this.isValid() && localInput.isValid())) { - return false; - } - - units = normalizeUnits(units) || 'millisecond'; - - if (units === 'millisecond') { - return this.valueOf() === localInput.valueOf(); - } else { - inputMs = localInput.valueOf(); - return this.clone().startOf(units).valueOf() <= inputMs && inputMs <= this.clone().endOf(units).valueOf(); - } - } - - function isSameOrAfter(input, units) { - return this.isSame(input, units) || this.isAfter(input, units); - } - - function isSameOrBefore(input, units) { - return this.isSame(input, units) || this.isBefore(input, units); - } - - function diff(input, units, asFloat) { - var that, zoneDelta, output; - - if (!this.isValid()) { - return NaN; - } - - that = cloneWithOffset(input, this); - - if (!that.isValid()) { - return NaN; - } - - zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4; - units = normalizeUnits(units); - - switch (units) { - case 'year': - output = monthDiff(this, that) / 12; - break; - - case 'month': - output = monthDiff(this, that); - break; - - case 'quarter': - output = monthDiff(this, that) / 3; - break; - - case 'second': - output = (this - that) / 1e3; - break; - // 1000 - - case 'minute': - output = (this - that) / 6e4; - break; - // 1000 * 60 - - case 'hour': - output = (this - that) / 36e5; - break; - // 1000 * 60 * 60 - - case 'day': - output = (this - that - zoneDelta) / 864e5; - break; - // 1000 * 60 * 60 * 24, negate dst - - case 'week': - output = (this - that - zoneDelta) / 6048e5; - break; - // 1000 * 60 * 60 * 24 * 7, negate dst - - default: - output = this - that; - } - - return asFloat ? output : absFloor(output); - } - - function monthDiff(a, b) { - // difference in months - var wholeMonthDiff = (b.year() - a.year()) * 12 + (b.month() - a.month()), - // b is in (anchor - 1 month, anchor + 1 month) - anchor = a.clone().add(wholeMonthDiff, 'months'), - anchor2, - adjust; - - if (b - anchor < 0) { - anchor2 = a.clone().add(wholeMonthDiff - 1, 'months'); // linear across the month - - adjust = (b - anchor) / (anchor - anchor2); - } else { - anchor2 = a.clone().add(wholeMonthDiff + 1, 'months'); // linear across the month - - adjust = (b - anchor) / (anchor2 - anchor); - } //check for negative zero, return zero if negative zero - - - return -(wholeMonthDiff + adjust) || 0; - } - - hooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ'; - hooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]'; - - function toString() { - return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ'); - } - - function toISOString(keepOffset) { - if (!this.isValid()) { - return null; - } - - var utc = keepOffset !== true; - var m = utc ? this.clone().utc() : this; - - if (m.year() < 0 || m.year() > 9999) { - return formatMoment(m, utc ? 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYYYY-MM-DD[T]HH:mm:ss.SSSZ'); - } - - if (isFunction(Date.prototype.toISOString)) { - // native implementation is ~50x faster, use it when we can - if (utc) { - return this.toDate().toISOString(); - } else { - return new Date(this.valueOf() + this.utcOffset() * 60 * 1000).toISOString().replace('Z', formatMoment(m, 'Z')); - } - } - - return formatMoment(m, utc ? 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYY-MM-DD[T]HH:mm:ss.SSSZ'); - } - /** - * Return a human readable representation of a moment that can - * also be evaluated to get a new moment which is the same - * - * @link https://nodejs.org/dist/latest/docs/api/util.html#util_custom_inspect_function_on_objects - */ - - - function inspect() { - if (!this.isValid()) { - return 'moment.invalid(/* ' + this._i + ' */)'; - } - - var func = 'moment'; - var zone = ''; - - if (!this.isLocal()) { - func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone'; - zone = 'Z'; - } - - var prefix = '[' + func + '("]'; - var year = 0 <= this.year() && this.year() <= 9999 ? 'YYYY' : 'YYYYYY'; - var datetime = '-MM-DD[T]HH:mm:ss.SSS'; - var suffix = zone + '[")]'; - return this.format(prefix + year + datetime + suffix); - } - - function format(inputString) { - if (!inputString) { - inputString = this.isUtc() ? hooks.defaultFormatUtc : hooks.defaultFormat; - } - - var output = formatMoment(this, inputString); - return this.localeData().postformat(output); - } - - function from(time, withoutSuffix) { - if (this.isValid() && (isMoment(time) && time.isValid() || createLocal(time).isValid())) { - return createDuration({ - to: this, - from: time - }).locale(this.locale()).humanize(!withoutSuffix); - } else { - return this.localeData().invalidDate(); - } - } - - function fromNow(withoutSuffix) { - return this.from(createLocal(), withoutSuffix); - } - - function to(time, withoutSuffix) { - if (this.isValid() && (isMoment(time) && time.isValid() || createLocal(time).isValid())) { - return createDuration({ - from: this, - to: time - }).locale(this.locale()).humanize(!withoutSuffix); - } else { - return this.localeData().invalidDate(); - } - } - - function toNow(withoutSuffix) { - return this.to(createLocal(), withoutSuffix); - } // If passed a locale key, it will set the locale for this - // instance. Otherwise, it will return the locale configuration - // variables for this instance. - - - function locale(key) { - var newLocaleData; - - if (key === undefined) { - return this._locale._abbr; - } else { - newLocaleData = getLocale(key); - - if (newLocaleData != null) { - this._locale = newLocaleData; - } - - return this; - } - } - - var lang = deprecate('moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.', function (key) { - if (key === undefined) { - return this.localeData(); - } else { - return this.locale(key); - } - }); - - function localeData() { - return this._locale; - } - - var MS_PER_SECOND = 1000; - var MS_PER_MINUTE = 60 * MS_PER_SECOND; - var MS_PER_HOUR = 60 * MS_PER_MINUTE; - var MS_PER_400_YEARS = (365 * 400 + 97) * 24 * MS_PER_HOUR; // actual modulo - handles negative numbers (for dates before 1970): - - function mod$1(dividend, divisor) { - return (dividend % divisor + divisor) % divisor; - } - - function localStartOfDate(y, m, d) { - // the date constructor remaps years 0-99 to 1900-1999 - if (y < 100 && y >= 0) { - // preserve leap years using a full 400 year cycle, then reset - return new Date(y + 400, m, d) - MS_PER_400_YEARS; - } else { - return new Date(y, m, d).valueOf(); - } - } - - function utcStartOfDate(y, m, d) { - // Date.UTC remaps years 0-99 to 1900-1999 - if (y < 100 && y >= 0) { - // preserve leap years using a full 400 year cycle, then reset - return Date.UTC(y + 400, m, d) - MS_PER_400_YEARS; - } else { - return Date.UTC(y, m, d); - } - } - - function startOf(units) { - var time; - units = normalizeUnits(units); - - if (units === undefined || units === 'millisecond' || !this.isValid()) { - return this; - } - - var startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate; - - switch (units) { - case 'year': - time = startOfDate(this.year(), 0, 1); - break; - - case 'quarter': - time = startOfDate(this.year(), this.month() - this.month() % 3, 1); - break; - - case 'month': - time = startOfDate(this.year(), this.month(), 1); - break; - - case 'week': - time = startOfDate(this.year(), this.month(), this.date() - this.weekday()); - break; - - case 'isoWeek': - time = startOfDate(this.year(), this.month(), this.date() - (this.isoWeekday() - 1)); - break; - - case 'day': - case 'date': - time = startOfDate(this.year(), this.month(), this.date()); - break; - - case 'hour': - time = this._d.valueOf(); - time -= mod$1(time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE), MS_PER_HOUR); - break; - - case 'minute': - time = this._d.valueOf(); - time -= mod$1(time, MS_PER_MINUTE); - break; - - case 'second': - time = this._d.valueOf(); - time -= mod$1(time, MS_PER_SECOND); - break; - } - - this._d.setTime(time); - - hooks.updateOffset(this, true); - return this; - } - - function endOf(units) { - var time; - units = normalizeUnits(units); - - if (units === undefined || units === 'millisecond' || !this.isValid()) { - return this; - } - - var startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate; - - switch (units) { - case 'year': - time = startOfDate(this.year() + 1, 0, 1) - 1; - break; - - case 'quarter': - time = startOfDate(this.year(), this.month() - this.month() % 3 + 3, 1) - 1; - break; - - case 'month': - time = startOfDate(this.year(), this.month() + 1, 1) - 1; - break; - - case 'week': - time = startOfDate(this.year(), this.month(), this.date() - this.weekday() + 7) - 1; - break; - - case 'isoWeek': - time = startOfDate(this.year(), this.month(), this.date() - (this.isoWeekday() - 1) + 7) - 1; - break; - - case 'day': - case 'date': - time = startOfDate(this.year(), this.month(), this.date() + 1) - 1; - break; - - case 'hour': - time = this._d.valueOf(); - time += MS_PER_HOUR - mod$1(time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE), MS_PER_HOUR) - 1; - break; - - case 'minute': - time = this._d.valueOf(); - time += MS_PER_MINUTE - mod$1(time, MS_PER_MINUTE) - 1; - break; - - case 'second': - time = this._d.valueOf(); - time += MS_PER_SECOND - mod$1(time, MS_PER_SECOND) - 1; - break; - } - - this._d.setTime(time); - - hooks.updateOffset(this, true); - return this; - } - - function valueOf() { - return this._d.valueOf() - (this._offset || 0) * 60000; - } - - function unix() { - return Math.floor(this.valueOf() / 1000); - } - - function toDate() { - return new Date(this.valueOf()); - } - - function toArray() { - var m = this; - return [m.year(), m.month(), m.date(), m.hour(), m.minute(), m.second(), m.millisecond()]; - } - - function toObject() { - var m = this; - return { - years: m.year(), - months: m.month(), - date: m.date(), - hours: m.hours(), - minutes: m.minutes(), - seconds: m.seconds(), - milliseconds: m.milliseconds() - }; - } - - function toJSON() { - // new Date(NaN).toJSON() === null - return this.isValid() ? this.toISOString() : null; - } - - function isValid$2() { - return isValid(this); - } - - function parsingFlags() { - return extend({}, getParsingFlags(this)); - } - - function invalidAt() { - return getParsingFlags(this).overflow; - } - - function creationData() { - return { - input: this._i, - format: this._f, - locale: this._locale, - isUTC: this._isUTC, - strict: this._strict - }; - } // FORMATTING - - - addFormatToken(0, ['gg', 2], 0, function () { - return this.weekYear() % 100; - }); - addFormatToken(0, ['GG', 2], 0, function () { - return this.isoWeekYear() % 100; - }); - - function addWeekYearFormatToken(token, getter) { - addFormatToken(0, [token, token.length], 0, getter); - } - - addWeekYearFormatToken('gggg', 'weekYear'); - addWeekYearFormatToken('ggggg', 'weekYear'); - addWeekYearFormatToken('GGGG', 'isoWeekYear'); - addWeekYearFormatToken('GGGGG', 'isoWeekYear'); // ALIASES - - addUnitAlias('weekYear', 'gg'); - addUnitAlias('isoWeekYear', 'GG'); // PRIORITY - - addUnitPriority('weekYear', 1); - addUnitPriority('isoWeekYear', 1); // PARSING - - addRegexToken('G', matchSigned); - addRegexToken('g', matchSigned); - addRegexToken('GG', match1to2, match2); - addRegexToken('gg', match1to2, match2); - addRegexToken('GGGG', match1to4, match4); - addRegexToken('gggg', match1to4, match4); - addRegexToken('GGGGG', match1to6, match6); - addRegexToken('ggggg', match1to6, match6); - addWeekParseToken(['gggg', 'ggggg', 'GGGG', 'GGGGG'], function (input, week, config, token) { - week[token.substr(0, 2)] = toInt(input); - }); - addWeekParseToken(['gg', 'GG'], function (input, week, config, token) { - week[token] = hooks.parseTwoDigitYear(input); - }); // MOMENTS - - function getSetWeekYear(input) { - return getSetWeekYearHelper.call(this, input, this.week(), this.weekday(), this.localeData()._week.dow, this.localeData()._week.doy); - } - - function getSetISOWeekYear(input) { - return getSetWeekYearHelper.call(this, input, this.isoWeek(), this.isoWeekday(), 1, 4); - } - - function getISOWeeksInYear() { - return weeksInYear(this.year(), 1, 4); - } + if (isPm && hour < 12) { + hour += 12; + } + + if (!isPm && hour === 12) { + hour = 0; + } + + return hour; + } else { + // this is not supposed to happen + return hour; + } + } // date from string and array of format strings + + + function configFromStringAndArray(config) { + var tempConfig, bestMoment, scoreToBeat, i, currentScore; + + if (config._f.length === 0) { + getParsingFlags(config).invalidFormat = true; + config._d = new Date(NaN); + return; + } + + for (i = 0; i < config._f.length; i++) { + currentScore = 0; + tempConfig = copyConfig({}, config); + + if (config._useUTC != null) { + tempConfig._useUTC = config._useUTC; + } + + tempConfig._f = config._f[i]; + configFromStringAndFormat(tempConfig); + + if (!isValid(tempConfig)) { + continue; + } // if there is any input that was not parsed add a penalty for that format + + + currentScore += getParsingFlags(tempConfig).charsLeftOver; //or tokens + + currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10; + getParsingFlags(tempConfig).score = currentScore; + + if (scoreToBeat == null || currentScore < scoreToBeat) { + scoreToBeat = currentScore; + bestMoment = tempConfig; + } + } + + extend(config, bestMoment || tempConfig); + } + + function configFromObject(config) { + if (config._d) { + return; + } + + var i = normalizeObjectUnits(config._i); + config._a = map([i.year, i.month, i.day || i.date, i.hour, i.minute, i.second, i.millisecond], function (obj) { + return obj && parseInt(obj, 10); + }); + configFromArray(config); + } + + function createFromConfig(config) { + var res = new Moment(checkOverflow(prepareConfig(config))); + + if (res._nextDay) { + // Adding is smart enough around DST + res.add(1, 'd'); + res._nextDay = undefined; + } + + return res; + } + + function prepareConfig(config) { + var input = config._i, + format = config._f; + config._locale = config._locale || getLocale(config._l); + + if (input === null || format === undefined && input === '') { + return createInvalid({ + nullInput: true + }); + } + + if (typeof input === 'string') { + config._i = input = config._locale.preparse(input); + } + + if (isMoment(input)) { + return new Moment(checkOverflow(input)); + } else if (isDate(input)) { + config._d = input; + } else if (isArray(format)) { + configFromStringAndArray(config); + } else if (format) { + configFromStringAndFormat(config); + } else { + configFromInput(config); + } + + if (!isValid(config)) { + config._d = null; + } + + return config; + } + + function configFromInput(config) { + var input = config._i; + + if (isUndefined(input)) { + config._d = new Date(hooks.now()); + } else if (isDate(input)) { + config._d = new Date(input.valueOf()); + } else if (typeof input === 'string') { + configFromString(config); + } else if (isArray(input)) { + config._a = map(input.slice(0), function (obj) { + return parseInt(obj, 10); + }); + configFromArray(config); + } else if (isObject(input)) { + configFromObject(config); + } else if (isNumber(input)) { + // from milliseconds + config._d = new Date(input); + } else { + hooks.createFromInputFallback(config); + } + } + + function createLocalOrUTC(input, format, locale, strict, isUTC) { + var c = {}; + + if (locale === true || locale === false) { + strict = locale; + locale = undefined; + } + + if (isObject(input) && isObjectEmpty(input) || isArray(input) && input.length === 0) { + input = undefined; + } // object construction must be done this way. + // https://github.com/moment/moment/issues/1423 + + + c._isAMomentObject = true; + c._useUTC = c._isUTC = isUTC; + c._l = locale; + c._i = input; + c._f = format; + c._strict = strict; + return createFromConfig(c); + } + + function createLocal(input, format, locale, strict) { + return createLocalOrUTC(input, format, locale, strict, false); + } + + var prototypeMin = deprecate('moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/', function () { + var other = createLocal.apply(null, arguments); + + if (this.isValid() && other.isValid()) { + return other < this ? this : other; + } else { + return createInvalid(); + } + }); + var prototypeMax = deprecate('moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/', function () { + var other = createLocal.apply(null, arguments); + + if (this.isValid() && other.isValid()) { + return other > this ? this : other; + } else { + return createInvalid(); + } + }); // Pick a moment m from moments so that m[fn](other) is true for all + // other. This relies on the function fn to be transitive. + // + // moments should either be an array of moment objects or an array, whose + // first element is an array of moment objects. + + function pickBy(fn, moments) { + var res, i; + + if (moments.length === 1 && isArray(moments[0])) { + moments = moments[0]; + } + + if (!moments.length) { + return createLocal(); + } + + res = moments[0]; + + for (i = 1; i < moments.length; ++i) { + if (!moments[i].isValid() || moments[i][fn](res)) { + res = moments[i]; + } + } + + return res; + } // TODO: Use [].sort instead? + + + function min() { + var args = [].slice.call(arguments, 0); + return pickBy('isBefore', args); + } + + function max() { + var args = [].slice.call(arguments, 0); + return pickBy('isAfter', args); + } + + var now = function () { + return Date.now ? Date.now() : +new Date(); + }; + + var ordering = ['year', 'quarter', 'month', 'week', 'day', 'hour', 'minute', 'second', 'millisecond']; + + function isDurationValid(m) { + for (var key in m) { + if (!(indexOf.call(ordering, key) !== -1 && (m[key] == null || !isNaN(m[key])))) { + return false; + } + } + + var unitHasDecimal = false; + + for (var i = 0; i < ordering.length; ++i) { + if (m[ordering[i]]) { + if (unitHasDecimal) { + return false; // only allow non-integers for smallest unit + } + + if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) { + unitHasDecimal = true; + } + } + } + + return true; + } + + function isValid$1() { + return this._isValid; + } + + function createInvalid$1() { + return createDuration(NaN); + } + + function Duration(duration) { + var normalizedInput = normalizeObjectUnits(duration), + years = normalizedInput.year || 0, + quarters = normalizedInput.quarter || 0, + months = normalizedInput.month || 0, + weeks = normalizedInput.week || normalizedInput.isoWeek || 0, + days = normalizedInput.day || 0, + hours = normalizedInput.hour || 0, + minutes = normalizedInput.minute || 0, + seconds = normalizedInput.second || 0, + milliseconds = normalizedInput.millisecond || 0; + this._isValid = isDurationValid(normalizedInput); // representation for dateAddRemove + + this._milliseconds = +milliseconds + seconds * 1e3 + // 1000 + minutes * 6e4 + // 1000 * 60 + hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978 + // Because of dateAddRemove treats 24 hours as different from a + // day when working around DST, we need to store them separately + + this._days = +days + weeks * 7; // It is impossible to translate months into days without knowing + // which months you are are talking about, so we have to store + // it separately. + + this._months = +months + quarters * 3 + years * 12; + this._data = {}; + this._locale = getLocale(); + + this._bubble(); + } + + function isDuration(obj) { + return obj instanceof Duration; + } + + function absRound(number) { + if (number < 0) { + return Math.round(-1 * number) * -1; + } else { + return Math.round(number); + } + } // FORMATTING + + + function offset(token, separator) { + addFormatToken(token, 0, 0, function () { + var offset = this.utcOffset(); + var sign = '+'; + + if (offset < 0) { + offset = -offset; + sign = '-'; + } + + return sign + zeroFill(~~(offset / 60), 2) + separator + zeroFill(~~offset % 60, 2); + }); + } + + offset('Z', ':'); + offset('ZZ', ''); // PARSING + + addRegexToken('Z', matchShortOffset); + addRegexToken('ZZ', matchShortOffset); + addParseToken(['Z', 'ZZ'], function (input, array, config) { + config._useUTC = true; + config._tzm = offsetFromString(matchShortOffset, input); + }); // HELPERS + // timezone chunker + // '+10:00' > ['10', '00'] + // '-1530' > ['-15', '30'] + + var chunkOffset = /([\+\-]|\d\d)/gi; + + function offsetFromString(matcher, string) { + var matches = (string || '').match(matcher); + + if (matches === null) { + return null; + } + + var chunk = matches[matches.length - 1] || []; + var parts = (chunk + '').match(chunkOffset) || ['-', 0, 0]; + var minutes = +(parts[1] * 60) + toInt(parts[2]); + return minutes === 0 ? 0 : parts[0] === '+' ? minutes : -minutes; + } // Return a moment from input, that is local/utc/zone equivalent to model. + + + function cloneWithOffset(input, model) { + var res, diff; + + if (model._isUTC) { + res = model.clone(); + diff = (isMoment(input) || isDate(input) ? input.valueOf() : createLocal(input).valueOf()) - res.valueOf(); // Use low-level api, because this fn is low-level api. + + res._d.setTime(res._d.valueOf() + diff); + + hooks.updateOffset(res, false); + return res; + } else { + return createLocal(input).local(); + } + } + + function getDateOffset(m) { + // On Firefox.24 Date#getTimezoneOffset returns a floating point. + // https://github.com/moment/moment/pull/1871 + return -Math.round(m._d.getTimezoneOffset() / 15) * 15; + } // HOOKS + // This function will be called whenever a moment is mutated. + // It is intended to keep the offset in sync with the timezone. + + + hooks.updateOffset = function () {}; // MOMENTS + // keepLocalTime = true means only change the timezone, without + // affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]--> + // 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset + // +0200, so we adjust the time as needed, to be valid. + // + // Keeping the time actually adds/subtracts (one hour) + // from the actual represented time. That is why we call updateOffset + // a second time. In case it wants us to change the offset again + // _changeInProgress == true case, then we have to adjust, because + // there is no such time in the given timezone. + + + function getSetOffset(input, keepLocalTime, keepMinutes) { + var offset = this._offset || 0, + localAdjust; + + if (!this.isValid()) { + return input != null ? this : NaN; + } + + if (input != null) { + if (typeof input === 'string') { + input = offsetFromString(matchShortOffset, input); + + if (input === null) { + return this; + } + } else if (Math.abs(input) < 16 && !keepMinutes) { + input = input * 60; + } + + if (!this._isUTC && keepLocalTime) { + localAdjust = getDateOffset(this); + } + + this._offset = input; + this._isUTC = true; + + if (localAdjust != null) { + this.add(localAdjust, 'm'); + } + + if (offset !== input) { + if (!keepLocalTime || this._changeInProgress) { + addSubtract(this, createDuration(input - offset, 'm'), 1, false); + } else if (!this._changeInProgress) { + this._changeInProgress = true; + hooks.updateOffset(this, true); + this._changeInProgress = null; + } + } + + return this; + } else { + return this._isUTC ? offset : getDateOffset(this); + } + } + + function getSetZone(input, keepLocalTime) { + if (input != null) { + if (typeof input !== 'string') { + input = -input; + } + + this.utcOffset(input, keepLocalTime); + return this; + } else { + return -this.utcOffset(); + } + } + + function setOffsetToUTC(keepLocalTime) { + return this.utcOffset(0, keepLocalTime); + } + + function setOffsetToLocal(keepLocalTime) { + if (this._isUTC) { + this.utcOffset(0, keepLocalTime); + this._isUTC = false; + + if (keepLocalTime) { + this.subtract(getDateOffset(this), 'm'); + } + } + + return this; + } + + function setOffsetToParsedOffset() { + if (this._tzm != null) { + this.utcOffset(this._tzm, false, true); + } else if (typeof this._i === 'string') { + var tZone = offsetFromString(matchOffset, this._i); + + if (tZone != null) { + this.utcOffset(tZone); + } else { + this.utcOffset(0, true); + } + } + + return this; + } + + function hasAlignedHourOffset(input) { + if (!this.isValid()) { + return false; + } + + input = input ? createLocal(input).utcOffset() : 0; + return (this.utcOffset() - input) % 60 === 0; + } + + function isDaylightSavingTime() { + return this.utcOffset() > this.clone().month(0).utcOffset() || this.utcOffset() > this.clone().month(5).utcOffset(); + } + + function isDaylightSavingTimeShifted() { + if (!isUndefined(this._isDSTShifted)) { + return this._isDSTShifted; + } + + var c = {}; + copyConfig(c, this); + c = prepareConfig(c); + + if (c._a) { + var other = c._isUTC ? createUTC(c._a) : createLocal(c._a); + this._isDSTShifted = this.isValid() && compareArrays(c._a, other.toArray()) > 0; + } else { + this._isDSTShifted = false; + } + + return this._isDSTShifted; + } + + function isLocal() { + return this.isValid() ? !this._isUTC : false; + } + + function isUtcOffset() { + return this.isValid() ? this._isUTC : false; + } + + function isUtc() { + return this.isValid() ? this._isUTC && this._offset === 0 : false; + } // ASP.NET json date format regex + + + var aspNetRegex = /^(\-|\+)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/; // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html + // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere + // and further modified to allow for strings containing both week and day + + var isoRegex = /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/; + + function createDuration(input, key) { + var duration = input, + // matching against regexp is expensive, do it on demand + match = null, + sign, + ret, + diffRes; + + if (isDuration(input)) { + duration = { + ms: input._milliseconds, + d: input._days, + M: input._months + }; + } else if (isNumber(input)) { + duration = {}; + + if (key) { + duration[key] = input; + } else { + duration.milliseconds = input; + } + } else if (!!(match = aspNetRegex.exec(input))) { + sign = match[1] === '-' ? -1 : 1; + duration = { + y: 0, + d: toInt(match[DATE]) * sign, + h: toInt(match[HOUR]) * sign, + m: toInt(match[MINUTE]) * sign, + s: toInt(match[SECOND]) * sign, + ms: toInt(absRound(match[MILLISECOND] * 1000)) * sign // the millisecond decimal point is included in the match + + }; + } else if (!!(match = isoRegex.exec(input))) { + sign = match[1] === '-' ? -1 : 1; + duration = { + y: parseIso(match[2], sign), + M: parseIso(match[3], sign), + w: parseIso(match[4], sign), + d: parseIso(match[5], sign), + h: parseIso(match[6], sign), + m: parseIso(match[7], sign), + s: parseIso(match[8], sign) + }; + } else if (duration == null) { + // checks for null or undefined + duration = {}; + } else if (typeof duration === 'object' && ('from' in duration || 'to' in duration)) { + diffRes = momentsDifference(createLocal(duration.from), createLocal(duration.to)); + duration = {}; + duration.ms = diffRes.milliseconds; + duration.M = diffRes.months; + } + + ret = new Duration(duration); + + if (isDuration(input) && hasOwnProp(input, '_locale')) { + ret._locale = input._locale; + } + + return ret; + } + + createDuration.fn = Duration.prototype; + createDuration.invalid = createInvalid$1; + + function parseIso(inp, sign) { + // We'd normally use ~~inp for this, but unfortunately it also + // converts floats to ints. + // inp may be undefined, so careful calling replace on it. + var res = inp && parseFloat(inp.replace(',', '.')); // apply sign while we're at it + + return (isNaN(res) ? 0 : res) * sign; + } + + function positiveMomentsDifference(base, other) { + var res = {}; + res.months = other.month() - base.month() + (other.year() - base.year()) * 12; + + if (base.clone().add(res.months, 'M').isAfter(other)) { + --res.months; + } + + res.milliseconds = +other - +base.clone().add(res.months, 'M'); + return res; + } + + function momentsDifference(base, other) { + var res; + + if (!(base.isValid() && other.isValid())) { + return { + milliseconds: 0, + months: 0 + }; + } + + other = cloneWithOffset(other, base); + + if (base.isBefore(other)) { + res = positiveMomentsDifference(base, other); + } else { + res = positiveMomentsDifference(other, base); + res.milliseconds = -res.milliseconds; + res.months = -res.months; + } + + return res; + } // TODO: remove 'name' arg after deprecation is removed + + + function createAdder(direction, name) { + return function (val, period) { + var dur, tmp; //invert the arguments, but complain about it + + if (period !== null && !isNaN(+period)) { + deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' + 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.'); + tmp = val; + val = period; + period = tmp; + } + + val = typeof val === 'string' ? +val : val; + dur = createDuration(val, period); + addSubtract(this, dur, direction); + return this; + }; + } + + function addSubtract(mom, duration, isAdding, updateOffset) { + var milliseconds = duration._milliseconds, + days = absRound(duration._days), + months = absRound(duration._months); + + if (!mom.isValid()) { + // No op + return; + } + + updateOffset = updateOffset == null ? true : updateOffset; + + if (months) { + setMonth(mom, get(mom, 'Month') + months * isAdding); + } + + if (days) { + set$1(mom, 'Date', get(mom, 'Date') + days * isAdding); + } + + if (milliseconds) { + mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding); + } + + if (updateOffset) { + hooks.updateOffset(mom, days || months); + } + } + + var add = createAdder(1, 'add'); + var subtract = createAdder(-1, 'subtract'); + + function getCalendarFormat(myMoment, now) { + var diff = myMoment.diff(now, 'days', true); + return diff < -6 ? 'sameElse' : diff < -1 ? 'lastWeek' : diff < 0 ? 'lastDay' : diff < 1 ? 'sameDay' : diff < 2 ? 'nextDay' : diff < 7 ? 'nextWeek' : 'sameElse'; + } + + function calendar$1(time, formats) { + // We want to compare the start of today, vs this. + // Getting start-of-today depends on whether we're local/utc/offset or not. + var now = time || createLocal(), + sod = cloneWithOffset(now, this).startOf('day'), + format = hooks.calendarFormat(this, sod) || 'sameElse'; + var output = formats && (isFunction(formats[format]) ? formats[format].call(this, now) : formats[format]); + return this.format(output || this.localeData().calendar(format, this, createLocal(now))); + } + + function clone() { + return new Moment(this); + } + + function isAfter(input, units) { + var localInput = isMoment(input) ? input : createLocal(input); + + if (!(this.isValid() && localInput.isValid())) { + return false; + } + + units = normalizeUnits(units) || 'millisecond'; + + if (units === 'millisecond') { + return this.valueOf() > localInput.valueOf(); + } else { + return localInput.valueOf() < this.clone().startOf(units).valueOf(); + } + } + + function isBefore(input, units) { + var localInput = isMoment(input) ? input : createLocal(input); + + if (!(this.isValid() && localInput.isValid())) { + return false; + } + + units = normalizeUnits(units) || 'millisecond'; + + if (units === 'millisecond') { + return this.valueOf() < localInput.valueOf(); + } else { + return this.clone().endOf(units).valueOf() < localInput.valueOf(); + } + } + + function isBetween(from, to, units, inclusivity) { + var localFrom = isMoment(from) ? from : createLocal(from), + localTo = isMoment(to) ? to : createLocal(to); + + if (!(this.isValid() && localFrom.isValid() && localTo.isValid())) { + return false; + } + + inclusivity = inclusivity || '()'; + return (inclusivity[0] === '(' ? this.isAfter(localFrom, units) : !this.isBefore(localFrom, units)) && (inclusivity[1] === ')' ? this.isBefore(localTo, units) : !this.isAfter(localTo, units)); + } + + function isSame(input, units) { + var localInput = isMoment(input) ? input : createLocal(input), + inputMs; + + if (!(this.isValid() && localInput.isValid())) { + return false; + } + + units = normalizeUnits(units) || 'millisecond'; + + if (units === 'millisecond') { + return this.valueOf() === localInput.valueOf(); + } else { + inputMs = localInput.valueOf(); + return this.clone().startOf(units).valueOf() <= inputMs && inputMs <= this.clone().endOf(units).valueOf(); + } + } + + function isSameOrAfter(input, units) { + return this.isSame(input, units) || this.isAfter(input, units); + } + + function isSameOrBefore(input, units) { + return this.isSame(input, units) || this.isBefore(input, units); + } + + function diff(input, units, asFloat) { + var that, zoneDelta, output; + + if (!this.isValid()) { + return NaN; + } + + that = cloneWithOffset(input, this); + + if (!that.isValid()) { + return NaN; + } + + zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4; + units = normalizeUnits(units); + + switch (units) { + case 'year': + output = monthDiff(this, that) / 12; + break; + + case 'month': + output = monthDiff(this, that); + break; + + case 'quarter': + output = monthDiff(this, that) / 3; + break; + + case 'second': + output = (this - that) / 1e3; + break; + // 1000 + + case 'minute': + output = (this - that) / 6e4; + break; + // 1000 * 60 + + case 'hour': + output = (this - that) / 36e5; + break; + // 1000 * 60 * 60 + + case 'day': + output = (this - that - zoneDelta) / 864e5; + break; + // 1000 * 60 * 60 * 24, negate dst + + case 'week': + output = (this - that - zoneDelta) / 6048e5; + break; + // 1000 * 60 * 60 * 24 * 7, negate dst + + default: + output = this - that; + } + + return asFloat ? output : absFloor(output); + } + + function monthDiff(a, b) { + // difference in months + var wholeMonthDiff = (b.year() - a.year()) * 12 + (b.month() - a.month()), + // b is in (anchor - 1 month, anchor + 1 month) + anchor = a.clone().add(wholeMonthDiff, 'months'), + anchor2, + adjust; + + if (b - anchor < 0) { + anchor2 = a.clone().add(wholeMonthDiff - 1, 'months'); // linear across the month + + adjust = (b - anchor) / (anchor - anchor2); + } else { + anchor2 = a.clone().add(wholeMonthDiff + 1, 'months'); // linear across the month + + adjust = (b - anchor) / (anchor2 - anchor); + } //check for negative zero, return zero if negative zero + + + return -(wholeMonthDiff + adjust) || 0; + } + + hooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ'; + hooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]'; + + function toString() { + return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ'); + } + + function toISOString(keepOffset) { + if (!this.isValid()) { + return null; + } + + var utc = keepOffset !== true; + var m = utc ? this.clone().utc() : this; + + if (m.year() < 0 || m.year() > 9999) { + return formatMoment(m, utc ? 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYYYY-MM-DD[T]HH:mm:ss.SSSZ'); + } + + if (isFunction(Date.prototype.toISOString)) { + // native implementation is ~50x faster, use it when we can + if (utc) { + return this.toDate().toISOString(); + } else { + return new Date(this.valueOf() + this.utcOffset() * 60 * 1000).toISOString().replace('Z', formatMoment(m, 'Z')); + } + } + + return formatMoment(m, utc ? 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYY-MM-DD[T]HH:mm:ss.SSSZ'); + } + /** + * Return a human readable representation of a moment that can + * also be evaluated to get a new moment which is the same + * + * @link https://nodejs.org/dist/latest/docs/api/util.html#util_custom_inspect_function_on_objects + */ + + + function inspect() { + if (!this.isValid()) { + return 'moment.invalid(/* ' + this._i + ' */)'; + } + + var func = 'moment'; + var zone = ''; + + if (!this.isLocal()) { + func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone'; + zone = 'Z'; + } + + var prefix = '[' + func + '("]'; + var year = 0 <= this.year() && this.year() <= 9999 ? 'YYYY' : 'YYYYYY'; + var datetime = '-MM-DD[T]HH:mm:ss.SSS'; + var suffix = zone + '[")]'; + return this.format(prefix + year + datetime + suffix); + } + + function format(inputString) { + if (!inputString) { + inputString = this.isUtc() ? hooks.defaultFormatUtc : hooks.defaultFormat; + } + + var output = formatMoment(this, inputString); + return this.localeData().postformat(output); + } + + function from(time, withoutSuffix) { + if (this.isValid() && (isMoment(time) && time.isValid() || createLocal(time).isValid())) { + return createDuration({ + to: this, + from: time + }).locale(this.locale()).humanize(!withoutSuffix); + } else { + return this.localeData().invalidDate(); + } + } + + function fromNow(withoutSuffix) { + return this.from(createLocal(), withoutSuffix); + } + + function to(time, withoutSuffix) { + if (this.isValid() && (isMoment(time) && time.isValid() || createLocal(time).isValid())) { + return createDuration({ + from: this, + to: time + }).locale(this.locale()).humanize(!withoutSuffix); + } else { + return this.localeData().invalidDate(); + } + } + + function toNow(withoutSuffix) { + return this.to(createLocal(), withoutSuffix); + } // If passed a locale key, it will set the locale for this + // instance. Otherwise, it will return the locale configuration + // variables for this instance. + + + function locale(key) { + var newLocaleData; + + if (key === undefined) { + return this._locale._abbr; + } else { + newLocaleData = getLocale(key); + + if (newLocaleData != null) { + this._locale = newLocaleData; + } + + return this; + } + } + + var lang = deprecate('moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.', function (key) { + if (key === undefined) { + return this.localeData(); + } else { + return this.locale(key); + } + }); + + function localeData() { + return this._locale; + } + + var MS_PER_SECOND = 1000; + var MS_PER_MINUTE = 60 * MS_PER_SECOND; + var MS_PER_HOUR = 60 * MS_PER_MINUTE; + var MS_PER_400_YEARS = (365 * 400 + 97) * 24 * MS_PER_HOUR; // actual modulo - handles negative numbers (for dates before 1970): + + function mod$1(dividend, divisor) { + return (dividend % divisor + divisor) % divisor; + } + + function localStartOfDate(y, m, d) { + // the date constructor remaps years 0-99 to 1900-1999 + if (y < 100 && y >= 0) { + // preserve leap years using a full 400 year cycle, then reset + return new Date(y + 400, m, d) - MS_PER_400_YEARS; + } else { + return new Date(y, m, d).valueOf(); + } + } + + function utcStartOfDate(y, m, d) { + // Date.UTC remaps years 0-99 to 1900-1999 + if (y < 100 && y >= 0) { + // preserve leap years using a full 400 year cycle, then reset + return Date.UTC(y + 400, m, d) - MS_PER_400_YEARS; + } else { + return Date.UTC(y, m, d); + } + } + + function startOf(units) { + var time; + units = normalizeUnits(units); + + if (units === undefined || units === 'millisecond' || !this.isValid()) { + return this; + } + + var startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate; + + switch (units) { + case 'year': + time = startOfDate(this.year(), 0, 1); + break; + + case 'quarter': + time = startOfDate(this.year(), this.month() - this.month() % 3, 1); + break; + + case 'month': + time = startOfDate(this.year(), this.month(), 1); + break; + + case 'week': + time = startOfDate(this.year(), this.month(), this.date() - this.weekday()); + break; + + case 'isoWeek': + time = startOfDate(this.year(), this.month(), this.date() - (this.isoWeekday() - 1)); + break; + + case 'day': + case 'date': + time = startOfDate(this.year(), this.month(), this.date()); + break; + + case 'hour': + time = this._d.valueOf(); + time -= mod$1(time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE), MS_PER_HOUR); + break; + + case 'minute': + time = this._d.valueOf(); + time -= mod$1(time, MS_PER_MINUTE); + break; + + case 'second': + time = this._d.valueOf(); + time -= mod$1(time, MS_PER_SECOND); + break; + } + + this._d.setTime(time); + + hooks.updateOffset(this, true); + return this; + } + + function endOf(units) { + var time; + units = normalizeUnits(units); + + if (units === undefined || units === 'millisecond' || !this.isValid()) { + return this; + } + + var startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate; + + switch (units) { + case 'year': + time = startOfDate(this.year() + 1, 0, 1) - 1; + break; + + case 'quarter': + time = startOfDate(this.year(), this.month() - this.month() % 3 + 3, 1) - 1; + break; + + case 'month': + time = startOfDate(this.year(), this.month() + 1, 1) - 1; + break; + + case 'week': + time = startOfDate(this.year(), this.month(), this.date() - this.weekday() + 7) - 1; + break; + + case 'isoWeek': + time = startOfDate(this.year(), this.month(), this.date() - (this.isoWeekday() - 1) + 7) - 1; + break; + + case 'day': + case 'date': + time = startOfDate(this.year(), this.month(), this.date() + 1) - 1; + break; + + case 'hour': + time = this._d.valueOf(); + time += MS_PER_HOUR - mod$1(time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE), MS_PER_HOUR) - 1; + break; + + case 'minute': + time = this._d.valueOf(); + time += MS_PER_MINUTE - mod$1(time, MS_PER_MINUTE) - 1; + break; + + case 'second': + time = this._d.valueOf(); + time += MS_PER_SECOND - mod$1(time, MS_PER_SECOND) - 1; + break; + } + + this._d.setTime(time); + + hooks.updateOffset(this, true); + return this; + } + + function valueOf() { + return this._d.valueOf() - (this._offset || 0) * 60000; + } + + function unix() { + return Math.floor(this.valueOf() / 1000); + } + + function toDate() { + return new Date(this.valueOf()); + } + + function toArray() { + var m = this; + return [m.year(), m.month(), m.date(), m.hour(), m.minute(), m.second(), m.millisecond()]; + } + + function toObject() { + var m = this; + return { + years: m.year(), + months: m.month(), + date: m.date(), + hours: m.hours(), + minutes: m.minutes(), + seconds: m.seconds(), + milliseconds: m.milliseconds() + }; + } + + function toJSON() { + // new Date(NaN).toJSON() === null + return this.isValid() ? this.toISOString() : null; + } + + function isValid$2() { + return isValid(this); + } + + function parsingFlags() { + return extend({}, getParsingFlags(this)); + } + + function invalidAt() { + return getParsingFlags(this).overflow; + } + + function creationData() { + return { + input: this._i, + format: this._f, + locale: this._locale, + isUTC: this._isUTC, + strict: this._strict + }; + } // FORMATTING + + + addFormatToken(0, ['gg', 2], 0, function () { + return this.weekYear() % 100; + }); + addFormatToken(0, ['GG', 2], 0, function () { + return this.isoWeekYear() % 100; + }); + + function addWeekYearFormatToken(token, getter) { + addFormatToken(0, [token, token.length], 0, getter); + } + + addWeekYearFormatToken('gggg', 'weekYear'); + addWeekYearFormatToken('ggggg', 'weekYear'); + addWeekYearFormatToken('GGGG', 'isoWeekYear'); + addWeekYearFormatToken('GGGGG', 'isoWeekYear'); // ALIASES + + addUnitAlias('weekYear', 'gg'); + addUnitAlias('isoWeekYear', 'GG'); // PRIORITY + + addUnitPriority('weekYear', 1); + addUnitPriority('isoWeekYear', 1); // PARSING + + addRegexToken('G', matchSigned); + addRegexToken('g', matchSigned); + addRegexToken('GG', match1to2, match2); + addRegexToken('gg', match1to2, match2); + addRegexToken('GGGG', match1to4, match4); + addRegexToken('gggg', match1to4, match4); + addRegexToken('GGGGG', match1to6, match6); + addRegexToken('ggggg', match1to6, match6); + addWeekParseToken(['gggg', 'ggggg', 'GGGG', 'GGGGG'], function (input, week, config, token) { + week[token.substr(0, 2)] = toInt(input); + }); + addWeekParseToken(['gg', 'GG'], function (input, week, config, token) { + week[token] = hooks.parseTwoDigitYear(input); + }); // MOMENTS + + function getSetWeekYear(input) { + return getSetWeekYearHelper.call(this, input, this.week(), this.weekday(), this.localeData()._week.dow, this.localeData()._week.doy); + } + + function getSetISOWeekYear(input) { + return getSetWeekYearHelper.call(this, input, this.isoWeek(), this.isoWeekday(), 1, 4); + } + + function getISOWeeksInYear() { + return weeksInYear(this.year(), 1, 4); + } - function getWeeksInYear() { - var weekInfo = this.localeData()._week; + function getWeeksInYear() { + var weekInfo = this.localeData()._week; - return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy); - } + return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy); + } - function getSetWeekYearHelper(input, week, weekday, dow, doy) { - var weeksTarget; + function getSetWeekYearHelper(input, week, weekday, dow, doy) { + var weeksTarget; - if (input == null) { - return weekOfYear(this, dow, doy).year; - } else { - weeksTarget = weeksInYear(input, dow, doy); + if (input == null) { + return weekOfYear(this, dow, doy).year; + } else { + weeksTarget = weeksInYear(input, dow, doy); - if (week > weeksTarget) { - week = weeksTarget; - } + if (week > weeksTarget) { + week = weeksTarget; + } - return setWeekAll.call(this, input, week, weekday, dow, doy); - } - } + return setWeekAll.call(this, input, week, weekday, dow, doy); + } + } - function setWeekAll(weekYear, week, weekday, dow, doy) { - var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy), - date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear); - this.year(date.getUTCFullYear()); - this.month(date.getUTCMonth()); - this.date(date.getUTCDate()); - return this; - } // FORMATTING - - - addFormatToken('Q', 0, 'Qo', 'quarter'); // ALIASES - - addUnitAlias('quarter', 'Q'); // PRIORITY - - addUnitPriority('quarter', 7); // PARSING - - addRegexToken('Q', match1); - addParseToken('Q', function (input, array) { - array[MONTH] = (toInt(input) - 1) * 3; - }); // MOMENTS - - function getSetQuarter(input) { - return input == null ? Math.ceil((this.month() + 1) / 3) : this.month((input - 1) * 3 + this.month() % 3); - } // FORMATTING + function setWeekAll(weekYear, week, weekday, dow, doy) { + var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy), + date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear); + this.year(date.getUTCFullYear()); + this.month(date.getUTCMonth()); + this.date(date.getUTCDate()); + return this; + } // FORMATTING + + + addFormatToken('Q', 0, 'Qo', 'quarter'); // ALIASES + + addUnitAlias('quarter', 'Q'); // PRIORITY + + addUnitPriority('quarter', 7); // PARSING + + addRegexToken('Q', match1); + addParseToken('Q', function (input, array) { + array[MONTH] = (toInt(input) - 1) * 3; + }); // MOMENTS + + function getSetQuarter(input) { + return input == null ? Math.ceil((this.month() + 1) / 3) : this.month((input - 1) * 3 + this.month() % 3); + } // FORMATTING - addFormatToken('D', ['DD', 2], 'Do', 'date'); // ALIASES + addFormatToken('D', ['DD', 2], 'Do', 'date'); // ALIASES - addUnitAlias('date', 'D'); // PRIORITY - - addUnitPriority('date', 9); // PARSING + addUnitAlias('date', 'D'); // PRIORITY + + addUnitPriority('date', 9); // PARSING - addRegexToken('D', match1to2); - addRegexToken('DD', match1to2, match2); - addRegexToken('Do', function (isStrict, locale) { - // TODO: Remove "ordinalParse" fallback in next major release. - return isStrict ? locale._dayOfMonthOrdinalParse || locale._ordinalParse : locale._dayOfMonthOrdinalParseLenient; - }); - addParseToken(['D', 'DD'], DATE); - addParseToken('Do', function (input, array) { - array[DATE] = toInt(input.match(match1to2)[0]); - }); // MOMENTS + addRegexToken('D', match1to2); + addRegexToken('DD', match1to2, match2); + addRegexToken('Do', function (isStrict, locale) { + // TODO: Remove "ordinalParse" fallback in next major release. + return isStrict ? locale._dayOfMonthOrdinalParse || locale._ordinalParse : locale._dayOfMonthOrdinalParseLenient; + }); + addParseToken(['D', 'DD'], DATE); + addParseToken('Do', function (input, array) { + array[DATE] = toInt(input.match(match1to2)[0]); + }); // MOMENTS - var getSetDayOfMonth = makeGetSet('Date', true); // FORMATTING + var getSetDayOfMonth = makeGetSet('Date', true); // FORMATTING - addFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear'); // ALIASES + addFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear'); // ALIASES - addUnitAlias('dayOfYear', 'DDD'); // PRIORITY + addUnitAlias('dayOfYear', 'DDD'); // PRIORITY - addUnitPriority('dayOfYear', 4); // PARSING + addUnitPriority('dayOfYear', 4); // PARSING - addRegexToken('DDD', match1to3); - addRegexToken('DDDD', match3); - addParseToken(['DDD', 'DDDD'], function (input, array, config) { - config._dayOfYear = toInt(input); - }); // HELPERS - // MOMENTS + addRegexToken('DDD', match1to3); + addRegexToken('DDDD', match3); + addParseToken(['DDD', 'DDDD'], function (input, array, config) { + config._dayOfYear = toInt(input); + }); // HELPERS + // MOMENTS - function getSetDayOfYear(input) { - var dayOfYear = Math.round((this.clone().startOf('day') - this.clone().startOf('year')) / 864e5) + 1; - return input == null ? dayOfYear : this.add(input - dayOfYear, 'd'); - } // FORMATTING + function getSetDayOfYear(input) { + var dayOfYear = Math.round((this.clone().startOf('day') - this.clone().startOf('year')) / 864e5) + 1; + return input == null ? dayOfYear : this.add(input - dayOfYear, 'd'); + } // FORMATTING - addFormatToken('m', ['mm', 2], 0, 'minute'); // ALIASES + addFormatToken('m', ['mm', 2], 0, 'minute'); // ALIASES - addUnitAlias('minute', 'm'); // PRIORITY + addUnitAlias('minute', 'm'); // PRIORITY - addUnitPriority('minute', 14); // PARSING + addUnitPriority('minute', 14); // PARSING - addRegexToken('m', match1to2); - addRegexToken('mm', match1to2, match2); - addParseToken(['m', 'mm'], MINUTE); // MOMENTS - - var getSetMinute = makeGetSet('Minutes', false); // FORMATTING - - addFormatToken('s', ['ss', 2], 0, 'second'); // ALIASES - - addUnitAlias('second', 's'); // PRIORITY - - addUnitPriority('second', 15); // PARSING - - addRegexToken('s', match1to2); - addRegexToken('ss', match1to2, match2); - addParseToken(['s', 'ss'], SECOND); // MOMENTS - - var getSetSecond = makeGetSet('Seconds', false); // FORMATTING - - addFormatToken('S', 0, 0, function () { - return ~~(this.millisecond() / 100); - }); - addFormatToken(0, ['SS', 2], 0, function () { - return ~~(this.millisecond() / 10); - }); - addFormatToken(0, ['SSS', 3], 0, 'millisecond'); - addFormatToken(0, ['SSSS', 4], 0, function () { - return this.millisecond() * 10; - }); - addFormatToken(0, ['SSSSS', 5], 0, function () { - return this.millisecond() * 100; - }); - addFormatToken(0, ['SSSSSS', 6], 0, function () { - return this.millisecond() * 1000; - }); - addFormatToken(0, ['SSSSSSS', 7], 0, function () { - return this.millisecond() * 10000; - }); - addFormatToken(0, ['SSSSSSSS', 8], 0, function () { - return this.millisecond() * 100000; - }); - addFormatToken(0, ['SSSSSSSSS', 9], 0, function () { - return this.millisecond() * 1000000; - }); // ALIASES - - addUnitAlias('millisecond', 'ms'); // PRIORITY - - addUnitPriority('millisecond', 16); // PARSING - - addRegexToken('S', match1to3, match1); - addRegexToken('SS', match1to3, match2); - addRegexToken('SSS', match1to3, match3); - var token; - - for (token = 'SSSS'; token.length <= 9; token += 'S') { - addRegexToken(token, matchUnsigned); - } - - function parseMs(input, array) { - array[MILLISECOND] = toInt(('0.' + input) * 1000); - } - - for (token = 'S'; token.length <= 9; token += 'S') { - addParseToken(token, parseMs); - } // MOMENTS - - - var getSetMillisecond = makeGetSet('Milliseconds', false); // FORMATTING - - addFormatToken('z', 0, 0, 'zoneAbbr'); - addFormatToken('zz', 0, 0, 'zoneName'); // MOMENTS - - function getZoneAbbr() { - return this._isUTC ? 'UTC' : ''; - } - - function getZoneName() { - return this._isUTC ? 'Coordinated Universal Time' : ''; - } - - var proto = Moment.prototype; - proto.add = add; - proto.calendar = calendar$1; - proto.clone = clone; - proto.diff = diff; - proto.endOf = endOf; - proto.format = format; - proto.from = from; - proto.fromNow = fromNow; - proto.to = to; - proto.toNow = toNow; - proto.get = stringGet; - proto.invalidAt = invalidAt; - proto.isAfter = isAfter; - proto.isBefore = isBefore; - proto.isBetween = isBetween; - proto.isSame = isSame; - proto.isSameOrAfter = isSameOrAfter; - proto.isSameOrBefore = isSameOrBefore; - proto.isValid = isValid$2; - proto.lang = lang; - proto.locale = locale; - proto.localeData = localeData; - proto.max = prototypeMax; - proto.min = prototypeMin; - proto.parsingFlags = parsingFlags; - proto.set = stringSet; - proto.startOf = startOf; - proto.subtract = subtract; - proto.toArray = toArray; - proto.toObject = toObject; - proto.toDate = toDate; - proto.toISOString = toISOString; - proto.inspect = inspect; - proto.toJSON = toJSON; - proto.toString = toString; - proto.unix = unix; - proto.valueOf = valueOf; - proto.creationData = creationData; - proto.year = getSetYear; - proto.isLeapYear = getIsLeapYear; - proto.weekYear = getSetWeekYear; - proto.isoWeekYear = getSetISOWeekYear; - proto.quarter = proto.quarters = getSetQuarter; - proto.month = getSetMonth; - proto.daysInMonth = getDaysInMonth; - proto.week = proto.weeks = getSetWeek; - proto.isoWeek = proto.isoWeeks = getSetISOWeek; - proto.weeksInYear = getWeeksInYear; - proto.isoWeeksInYear = getISOWeeksInYear; - proto.date = getSetDayOfMonth; - proto.day = proto.days = getSetDayOfWeek; - proto.weekday = getSetLocaleDayOfWeek; - proto.isoWeekday = getSetISODayOfWeek; - proto.dayOfYear = getSetDayOfYear; - proto.hour = proto.hours = getSetHour; - proto.minute = proto.minutes = getSetMinute; - proto.second = proto.seconds = getSetSecond; - proto.millisecond = proto.milliseconds = getSetMillisecond; - proto.utcOffset = getSetOffset; - proto.utc = setOffsetToUTC; - proto.local = setOffsetToLocal; - proto.parseZone = setOffsetToParsedOffset; - proto.hasAlignedHourOffset = hasAlignedHourOffset; - proto.isDST = isDaylightSavingTime; - proto.isLocal = isLocal; - proto.isUtcOffset = isUtcOffset; - proto.isUtc = isUtc; - proto.isUTC = isUtc; - proto.zoneAbbr = getZoneAbbr; - proto.zoneName = getZoneName; - proto.dates = deprecate('dates accessor is deprecated. Use date instead.', getSetDayOfMonth); - proto.months = deprecate('months accessor is deprecated. Use month instead', getSetMonth); - proto.years = deprecate('years accessor is deprecated. Use year instead', getSetYear); - proto.zone = deprecate('moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/', getSetZone); - proto.isDSTShifted = deprecate('isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information', isDaylightSavingTimeShifted); - - function createUnix(input) { - return createLocal(input * 1000); - } - - function createInZone() { - return createLocal.apply(null, arguments).parseZone(); - } - - function preParsePostFormat(string) { - return string; - } - - var proto$1 = Locale.prototype; - proto$1.calendar = calendar; - proto$1.longDateFormat = longDateFormat; - proto$1.invalidDate = invalidDate; - proto$1.ordinal = ordinal; - proto$1.preparse = preParsePostFormat; - proto$1.postformat = preParsePostFormat; - proto$1.relativeTime = relativeTime; - proto$1.pastFuture = pastFuture; - proto$1.set = set; - proto$1.months = localeMonths; - proto$1.monthsShort = localeMonthsShort; - proto$1.monthsParse = localeMonthsParse; - proto$1.monthsRegex = monthsRegex; - proto$1.monthsShortRegex = monthsShortRegex; - proto$1.week = localeWeek; - proto$1.firstDayOfYear = localeFirstDayOfYear; - proto$1.firstDayOfWeek = localeFirstDayOfWeek; - proto$1.weekdays = localeWeekdays; - proto$1.weekdaysMin = localeWeekdaysMin; - proto$1.weekdaysShort = localeWeekdaysShort; - proto$1.weekdaysParse = localeWeekdaysParse; - proto$1.weekdaysRegex = weekdaysRegex; - proto$1.weekdaysShortRegex = weekdaysShortRegex; - proto$1.weekdaysMinRegex = weekdaysMinRegex; - proto$1.isPM = localeIsPM; - proto$1.meridiem = localeMeridiem; - - function get$1(format, index, field, setter) { - var locale = getLocale(); - var utc = createUTC().set(setter, index); - return locale[field](utc, format); - } - - function listMonthsImpl(format, index, field) { - if (isNumber(format)) { - index = format; - format = undefined; - } - - format = format || ''; - - if (index != null) { - return get$1(format, index, field, 'month'); - } - - var i; - var out = []; - - for (i = 0; i < 12; i++) { - out[i] = get$1(format, i, field, 'month'); - } - - return out; - } // () - // (5) - // (fmt, 5) - // (fmt) - // (true) - // (true, 5) - // (true, fmt, 5) - // (true, fmt) - - - function listWeekdaysImpl(localeSorted, format, index, field) { - if (typeof localeSorted === 'boolean') { - if (isNumber(format)) { - index = format; - format = undefined; - } - - format = format || ''; - } else { - format = localeSorted; - index = format; - localeSorted = false; - - if (isNumber(format)) { - index = format; - format = undefined; - } - - format = format || ''; - } - - var locale = getLocale(), - shift = localeSorted ? locale._week.dow : 0; - - if (index != null) { - return get$1(format, (index + shift) % 7, field, 'day'); - } - - var i; - var out = []; - - for (i = 0; i < 7; i++) { - out[i] = get$1(format, (i + shift) % 7, field, 'day'); - } - - return out; - } - - function listMonths(format, index) { - return listMonthsImpl(format, index, 'months'); - } - - function listMonthsShort(format, index) { - return listMonthsImpl(format, index, 'monthsShort'); - } - - function listWeekdays(localeSorted, format, index) { - return listWeekdaysImpl(localeSorted, format, index, 'weekdays'); - } - - function listWeekdaysShort(localeSorted, format, index) { - return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort'); - } - - function listWeekdaysMin(localeSorted, format, index) { - return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin'); - } - - getSetGlobalLocale('en', { - dayOfMonthOrdinalParse: /\d{1,2}(th|st|nd|rd)/, - ordinal: function (number) { - var b = number % 10, - output = toInt(number % 100 / 10) === 1 ? 'th' : b === 1 ? 'st' : b === 2 ? 'nd' : b === 3 ? 'rd' : 'th'; - return number + output; - } - }); // Side effect imports - - hooks.lang = deprecate('moment.lang is deprecated. Use moment.locale instead.', getSetGlobalLocale); - hooks.langData = deprecate('moment.langData is deprecated. Use moment.localeData instead.', getLocale); - var mathAbs = Math.abs; - - function abs() { - var data = this._data; - this._milliseconds = mathAbs(this._milliseconds); - this._days = mathAbs(this._days); - this._months = mathAbs(this._months); - data.milliseconds = mathAbs(data.milliseconds); - data.seconds = mathAbs(data.seconds); - data.minutes = mathAbs(data.minutes); - data.hours = mathAbs(data.hours); - data.months = mathAbs(data.months); - data.years = mathAbs(data.years); - return this; - } - - function addSubtract$1(duration, input, value, direction) { - var other = createDuration(input, value); - duration._milliseconds += direction * other._milliseconds; - duration._days += direction * other._days; - duration._months += direction * other._months; - return duration._bubble(); - } // supports only 2.0-style add(1, 's') or add(duration) - - - function add$1(input, value) { - return addSubtract$1(this, input, value, 1); - } // supports only 2.0-style subtract(1, 's') or subtract(duration) - - - function subtract$1(input, value) { - return addSubtract$1(this, input, value, -1); - } - - function absCeil(number) { - if (number < 0) { - return Math.floor(number); - } else { - return Math.ceil(number); - } - } - - function bubble() { - var milliseconds = this._milliseconds; - var days = this._days; - var months = this._months; - var data = this._data; - var seconds, minutes, hours, years, monthsFromDays; // if we have a mix of positive and negative values, bubble down first - // check: https://github.com/moment/moment/issues/2166 - - if (!(milliseconds >= 0 && days >= 0 && months >= 0 || milliseconds <= 0 && days <= 0 && months <= 0)) { - milliseconds += absCeil(monthsToDays(months) + days) * 864e5; - days = 0; - months = 0; - } // The following code bubbles up values, see the tests for - // examples of what that means. - - - data.milliseconds = milliseconds % 1000; - seconds = absFloor(milliseconds / 1000); - data.seconds = seconds % 60; - minutes = absFloor(seconds / 60); - data.minutes = minutes % 60; - hours = absFloor(minutes / 60); - data.hours = hours % 24; - days += absFloor(hours / 24); // convert days to months - - monthsFromDays = absFloor(daysToMonths(days)); - months += monthsFromDays; - days -= absCeil(monthsToDays(monthsFromDays)); // 12 months -> 1 year - - years = absFloor(months / 12); - months %= 12; - data.days = days; - data.months = months; - data.years = years; - return this; - } - - function daysToMonths(days) { - // 400 years have 146097 days (taking into account leap year rules) - // 400 years have 12 months === 4800 - return days * 4800 / 146097; - } - - function monthsToDays(months) { - // the reverse of daysToMonths - return months * 146097 / 4800; - } - - function as(units) { - if (!this.isValid()) { - return NaN; - } - - var days; - var months; - var milliseconds = this._milliseconds; - units = normalizeUnits(units); - - if (units === 'month' || units === 'quarter' || units === 'year') { - days = this._days + milliseconds / 864e5; - months = this._months + daysToMonths(days); - - switch (units) { - case 'month': - return months; - - case 'quarter': - return months / 3; - - case 'year': - return months / 12; - } - } else { - // handle milliseconds separately because of floating point math errors (issue #1867) - days = this._days + Math.round(monthsToDays(this._months)); - - switch (units) { - case 'week': - return days / 7 + milliseconds / 6048e5; - - case 'day': - return days + milliseconds / 864e5; - - case 'hour': - return days * 24 + milliseconds / 36e5; - - case 'minute': - return days * 1440 + milliseconds / 6e4; - - case 'second': - return days * 86400 + milliseconds / 1000; - // Math.floor prevents floating point math errors here - - case 'millisecond': - return Math.floor(days * 864e5) + milliseconds; - - default: - throw new Error('Unknown unit ' + units); - } - } - } // TODO: Use this.as('ms')? - - - function valueOf$1() { - if (!this.isValid()) { - return NaN; - } - - return this._milliseconds + this._days * 864e5 + this._months % 12 * 2592e6 + toInt(this._months / 12) * 31536e6; - } - - function makeAs(alias) { - return function () { - return this.as(alias); - }; - } - - var asMilliseconds = makeAs('ms'); - var asSeconds = makeAs('s'); - var asMinutes = makeAs('m'); - var asHours = makeAs('h'); - var asDays = makeAs('d'); - var asWeeks = makeAs('w'); - var asMonths = makeAs('M'); - var asQuarters = makeAs('Q'); - var asYears = makeAs('y'); - - function clone$1() { - return createDuration(this); - } - - function get$2(units) { - units = normalizeUnits(units); - return this.isValid() ? this[units + 's']() : NaN; - } - - function makeGetter(name) { - return function () { - return this.isValid() ? this._data[name] : NaN; - }; - } - - var milliseconds = makeGetter('milliseconds'); - var seconds = makeGetter('seconds'); - var minutes = makeGetter('minutes'); - var hours = makeGetter('hours'); - var days = makeGetter('days'); - var months = makeGetter('months'); - var years = makeGetter('years'); - - function weeks() { - return absFloor(this.days() / 7); - } - - var round = Math.round; - var thresholds = { - ss: 44, - // a few seconds to seconds - s: 45, - // seconds to minute - m: 45, - // minutes to hour - h: 22, - // hours to day - d: 26, - // days to month - M: 11 // months to year - - }; // helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize - - function substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) { - return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture); - } - - function relativeTime$1(posNegDuration, withoutSuffix, locale) { - var duration = createDuration(posNegDuration).abs(); - var seconds = round(duration.as('s')); - var minutes = round(duration.as('m')); - var hours = round(duration.as('h')); - var days = round(duration.as('d')); - var months = round(duration.as('M')); - var years = round(duration.as('y')); - var a = seconds <= thresholds.ss && ['s', seconds] || seconds < thresholds.s && ['ss', seconds] || minutes <= 1 && ['m'] || minutes < thresholds.m && ['mm', minutes] || hours <= 1 && ['h'] || hours < thresholds.h && ['hh', hours] || days <= 1 && ['d'] || days < thresholds.d && ['dd', days] || months <= 1 && ['M'] || months < thresholds.M && ['MM', months] || years <= 1 && ['y'] || ['yy', years]; - a[2] = withoutSuffix; - a[3] = +posNegDuration > 0; - a[4] = locale; - return substituteTimeAgo.apply(null, a); - } // This function allows you to set the rounding function for relative time strings - - - function getSetRelativeTimeRounding(roundingFunction) { - if (roundingFunction === undefined) { - return round; - } - - if (typeof roundingFunction === 'function') { - round = roundingFunction; - return true; - } - - return false; - } // This function allows you to set a threshold for relative time strings - - - function getSetRelativeTimeThreshold(threshold, limit) { - if (thresholds[threshold] === undefined) { - return false; - } - - if (limit === undefined) { - return thresholds[threshold]; - } - - thresholds[threshold] = limit; - - if (threshold === 's') { - thresholds.ss = limit - 1; - } - - return true; - } - - function humanize(withSuffix) { - if (!this.isValid()) { - return this.localeData().invalidDate(); - } - - var locale = this.localeData(); - var output = relativeTime$1(this, !withSuffix, locale); - - if (withSuffix) { - output = locale.pastFuture(+this, output); - } - - return locale.postformat(output); - } - - var abs$1 = Math.abs; - - function sign(x) { - return (x > 0) - (x < 0) || +x; - } - - function toISOString$1() { - // for ISO strings we do not use the normal bubbling rules: - // * milliseconds bubble up until they become hours - // * days do not bubble at all - // * months bubble up until they become years - // This is because there is no context-free conversion between hours and days - // (think of clock changes) - // and also not between days and months (28-31 days per month) - if (!this.isValid()) { - return this.localeData().invalidDate(); - } - - var seconds = abs$1(this._milliseconds) / 1000; - var days = abs$1(this._days); - var months = abs$1(this._months); - var minutes, hours, years; // 3600 seconds -> 60 minutes -> 1 hour - - minutes = absFloor(seconds / 60); - hours = absFloor(minutes / 60); - seconds %= 60; - minutes %= 60; // 12 months -> 1 year - - years = absFloor(months / 12); - months %= 12; // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js - - var Y = years; - var M = months; - var D = days; - var h = hours; - var m = minutes; - var s = seconds ? seconds.toFixed(3).replace(/\.?0+$/, '') : ''; - var total = this.asSeconds(); - - if (!total) { - // this is the same as C#'s (Noda) and python (isodate)... - // but not other JS (goog.date) - return 'P0D'; - } - - var totalSign = total < 0 ? '-' : ''; - var ymSign = sign(this._months) !== sign(total) ? '-' : ''; - var daysSign = sign(this._days) !== sign(total) ? '-' : ''; - var hmsSign = sign(this._milliseconds) !== sign(total) ? '-' : ''; - return totalSign + 'P' + (Y ? ymSign + Y + 'Y' : '') + (M ? ymSign + M + 'M' : '') + (D ? daysSign + D + 'D' : '') + (h || m || s ? 'T' : '') + (h ? hmsSign + h + 'H' : '') + (m ? hmsSign + m + 'M' : '') + (s ? hmsSign + s + 'S' : ''); - } - - var proto$2 = Duration.prototype; - proto$2.isValid = isValid$1; - proto$2.abs = abs; - proto$2.add = add$1; - proto$2.subtract = subtract$1; - proto$2.as = as; - proto$2.asMilliseconds = asMilliseconds; - proto$2.asSeconds = asSeconds; - proto$2.asMinutes = asMinutes; - proto$2.asHours = asHours; - proto$2.asDays = asDays; - proto$2.asWeeks = asWeeks; - proto$2.asMonths = asMonths; - proto$2.asQuarters = asQuarters; - proto$2.asYears = asYears; - proto$2.valueOf = valueOf$1; - proto$2._bubble = bubble; - proto$2.clone = clone$1; - proto$2.get = get$2; - proto$2.milliseconds = milliseconds; - proto$2.seconds = seconds; - proto$2.minutes = minutes; - proto$2.hours = hours; - proto$2.days = days; - proto$2.weeks = weeks; - proto$2.months = months; - proto$2.years = years; - proto$2.humanize = humanize; - proto$2.toISOString = toISOString$1; - proto$2.toString = toISOString$1; - proto$2.toJSON = toISOString$1; - proto$2.locale = locale; - proto$2.localeData = localeData; - proto$2.toIsoString = deprecate('toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)', toISOString$1); - proto$2.lang = lang; // Side effect imports - // FORMATTING - - addFormatToken('X', 0, 0, 'unix'); - addFormatToken('x', 0, 0, 'valueOf'); // PARSING - - addRegexToken('x', matchSigned); - addRegexToken('X', matchTimestamp); - addParseToken('X', function (input, array, config) { - config._d = new Date(parseFloat(input, 10) * 1000); - }); - addParseToken('x', function (input, array, config) { - config._d = new Date(toInt(input)); - }); // Side effect imports - - hooks.version = '2.24.0'; - setHookCallback(createLocal); - hooks.fn = proto; - hooks.min = min; - hooks.max = max; - hooks.now = now; - hooks.utc = createUTC; - hooks.unix = createUnix; - hooks.months = listMonths; - hooks.isDate = isDate; - hooks.locale = getSetGlobalLocale; - hooks.invalid = createInvalid; - hooks.duration = createDuration; - hooks.isMoment = isMoment; - hooks.weekdays = listWeekdays; - hooks.parseZone = createInZone; - hooks.localeData = getLocale; - hooks.isDuration = isDuration; - hooks.monthsShort = listMonthsShort; - hooks.weekdaysMin = listWeekdaysMin; - hooks.defineLocale = defineLocale; - hooks.updateLocale = updateLocale; - hooks.locales = listLocales; - hooks.weekdaysShort = listWeekdaysShort; - hooks.normalizeUnits = normalizeUnits; - hooks.relativeTimeRounding = getSetRelativeTimeRounding; - hooks.relativeTimeThreshold = getSetRelativeTimeThreshold; - hooks.calendarFormat = getCalendarFormat; - hooks.prototype = proto; // currently HTML5 input type only supports 24-hour formats - - hooks.HTML5_FMT = { - DATETIME_LOCAL: 'YYYY-MM-DDTHH:mm', - // - DATETIME_LOCAL_SECONDS: 'YYYY-MM-DDTHH:mm:ss', - // - DATETIME_LOCAL_MS: 'YYYY-MM-DDTHH:mm:ss.SSS', - // - DATE: 'YYYY-MM-DD', - // - TIME: 'HH:mm', - // - TIME_SECONDS: 'HH:mm:ss', - // - TIME_MS: 'HH:mm:ss.SSS', - // - WEEK: 'GGGG-[W]WW', - // - MONTH: 'YYYY-MM' // - - }; - return hooks; - }); - }); // Maps for number <-> hex string conversion - - var byteToHex$2 = []; - - for (var i$2 = 0; i$2 < 256; i$2++) { - byteToHex$2[i$2] = (i$2 + 0x100).toString(16).substr(1); - } - /** - * Generate 16 random bytes to be used as a base for UUID. - * - * @ignore - */ - - - var random$1 = function () { - if (typeof crypto !== 'undefined' && crypto.getRandomValues) { - // WHATWG crypto-based RNG - http://wiki.whatwg.org/wiki/Crypto - // Moderately fast, high quality - var _rnds8 = new Uint8Array(16); - - return function whatwgRNG() { - crypto.getRandomValues(_rnds8); - return _rnds8; - }; - } // Math.random()-based (RNG) - // - // If all else fails, use Math.random(). - // It's fast, but is of unspecified quality. - - - var _rnds = new Array(16); - - return function () { - for (var i = 0, r; i < 16; i++) { - if ((i & 0x03) === 0) { - r = Math.random() * 0x100000000; - } - - _rnds[i] = r >>> ((i & 0x03) << 3) & 0xff; - } - - return _rnds; - }; // uuid.js - // - // Copyright (c) 2010-2012 Robert Kieffer - // MIT License - http://opensource.org/licenses/mit-license.php - // Unique ID creation requires a high quality random # generator. We feature - // detect to determine the best RNG source, normalizing to a function that - // returns 128-bits of randomness, since that's what's usually required - // return require('./rng'); - }(); - - var byteToHex$1$1 = []; - - for (var i$1$1 = 0; i$1$1 < 256; i$1$1++) { - byteToHex$1$1[i$1$1] = (i$1$1 + 0x100).toString(16).substr(1); - } // **`v1()` - Generate time-based UUID** - // - // Inspired by https://github.com/LiosK/UUID.js - // and http://docs.python.org/library/uuid.html - // random #'s we need to init node and clockseq - - - var seedBytes$1 = random$1(); // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1) - - var defaultNodeId$1 = [seedBytes$1[0] | 0x01, seedBytes$1[1], seedBytes$1[2], seedBytes$1[3], seedBytes$1[4], seedBytes$1[5]]; // Per 4.2.2, randomize (14 bit) clockseq - - var defaultClockseq$1 = (seedBytes$1[6] << 8 | seedBytes$1[7]) & 0x3fff; // Previous uuid creation time - // for example '/Date(1198908717056)/' or '/Date(1198908717056-0700)/' - // code from http://momentjs.com/ - - - var ASPDateRegex = /^\/?Date\((-?\d+)/i; // Hex color - /** - * Hue, Saturation, Value. - */ - - /** - * Test whether given object is a number - * - * @param value - Input value of unknown type. - * - * @returns True if number, false otherwise. - */ - - function isNumber(value) { - return value instanceof Number || typeof value === 'number'; - } - /** - * Test whether given object is a string - * - * @param value - Input value of unknown type. - * - * @returns True if string, false otherwise. - */ - - - function isString(value) { - return value instanceof String || typeof value === 'string'; - } - /** - * Test whether given object is a Moment date. - * @TODO: This is basically a workaround, if Moment was imported property it wouldn't necessary as moment.isMoment is a TS type guard. - * - * @param value - Input value of unknown type. - * - * @returns True if Moment instance, false otherwise. - */ - - - function isMoment(value) { - return moment.isMoment(value); - } - /** - * Convert an object into another type - * - * @param object - Value of unknown type. - * @param type - Name of the desired type. - * - * @returns Object in the desired type. - * @throws Error - */ - - - function convert(object, type) { - var match; - - if (object === undefined) { - return undefined; - } - - if (object === null) { - return null; - } - - if (!type) { - return object; - } - - if (!(typeof type === 'string') && !(type instanceof String)) { - throw new Error('Type must be a string'); - } //noinspection FallthroughInSwitchStatementJS - - - switch (type) { - case 'boolean': - case 'Boolean': - return Boolean(object); - - case 'number': - case 'Number': - if (isString(object) && !isNaN(Date.parse(object))) { - return moment(object).valueOf(); - } else { - // @TODO: I don't think that Number and String constructors are a good idea. - // This could also fail if the object doesn't have valueOf method or if it's redefined. - // For example: Object.create(null) or { valueOf: 7 }. - return Number(object.valueOf()); - } - - case 'string': - case 'String': - return String(object); - - case 'Date': - if (isNumber(object)) { - return new Date(object); - } - - if (object instanceof Date) { - return new Date(object.valueOf()); - } else if (isMoment(object)) { - return new Date(object.valueOf()); - } - - if (isString(object)) { - match = ASPDateRegex.exec(object); - - if (match) { - // object is an ASP date - return new Date(Number(match[1])); // parse number - } else { - return moment(new Date(object)).toDate(); // parse string - } - } else { - throw new Error('Cannot convert object of type ' + getType(object) + ' to type Date'); - } - - case 'Moment': - if (isNumber(object)) { - return moment(object); - } - - if (object instanceof Date) { - return moment(object.valueOf()); - } else if (isMoment(object)) { - return moment(object); - } - - if (isString(object)) { - match = ASPDateRegex.exec(object); - - if (match) { - // object is an ASP date - return moment(Number(match[1])); // parse number - } else { - return moment(object); // parse string - } - } else { - throw new Error('Cannot convert object of type ' + getType(object) + ' to type Date'); - } - - case 'ISODate': - if (isNumber(object)) { - return new Date(object); - } else if (object instanceof Date) { - return object.toISOString(); - } else if (isMoment(object)) { - return object.toDate().toISOString(); - } else if (isString(object)) { - match = ASPDateRegex.exec(object); - - if (match) { - // object is an ASP date - return new Date(Number(match[1])).toISOString(); // parse number - } else { - return moment(object).format(); // ISO 8601 - } - } else { - throw new Error('Cannot convert object of type ' + getType(object) + ' to type ISODate'); - } - - case 'ASPDate': - if (isNumber(object)) { - return '/Date(' + object + ')/'; - } else if (object instanceof Date) { - return '/Date(' + object.valueOf() + ')/'; - } else if (isString(object)) { - match = ASPDateRegex.exec(object); - - var _value; - - if (match) { - // object is an ASP date - _value = new Date(Number(match[1])).valueOf(); // parse number - } else { - _value = new Date(object).valueOf(); // parse string - } - - return '/Date(' + _value + ')/'; - } else { - throw new Error('Cannot convert object of type ' + getType(object) + ' to type ASPDate'); - } - - default: - var never = type; - throw new Error("Unknown type ".concat(never)); - } - } - /** - * Get the type of an object, for example exports.getType([]) returns 'Array' - * - * @param object - Input value of unknown type. - * - * @returns Detected type. - */ - - - function getType(object) { - var type = _typeof(object); - - if (type === 'object') { - if (object === null) { - return 'null'; - } - - if (object instanceof Boolean) { - return 'Boolean'; - } - - if (object instanceof Number) { - return 'Number'; - } - - if (object instanceof String) { - return 'String'; - } - - if (Array.isArray(object)) { - return 'Array'; - } - - if (object instanceof Date) { - return 'Date'; - } - - return 'Object'; - } - - if (type === 'number') { - return 'Number'; - } - - if (type === 'boolean') { - return 'Boolean'; - } - - if (type === 'string') { - return 'String'; - } - - if (type === undefined) { - return 'undefined'; - } - - return type; - } - - /** - * Determine whether a value can be used as an id. - * - * @param value - Input value of unknown type. - * - * @returns True if the value is valid id, false otherwise. - */ - function isId(value) { - return typeof value === 'string' || typeof value === 'number'; - } - - /** - * A queue. - * - * @typeParam T - The type of method names to be replaced by queued versions. - */ - var Queue = - /*#__PURE__*/ - function () { - /** - * Construct a new Queue. - * - * @param options - Queue configuration. - */ - function Queue(options) { - classCallCheck(this, Queue); - - this._queue = []; - this._timeout = null; - this._extended = null; // options - - this.delay = null; - this.max = Infinity; - this.setOptions(options); - } - /** - * Update the configuration of the queue. - * - * @param options - Queue configuration. - */ - - - createClass(Queue, [{ - key: "setOptions", - value: function setOptions(options) { - if (options && typeof options.delay !== 'undefined') { - this.delay = options.delay; - } - - if (options && typeof options.max !== 'undefined') { - this.max = options.max; - } - - this._flushIfNeeded(); - } - /** - * Extend an object with queuing functionality. - * The object will be extended with a function flush, and the methods provided in options.replace will be replaced with queued ones. - * - * @param object - The object to be extended. - * @param options - Additional options. - * - * @returns The created queue. - */ - - }, { - key: "destroy", - - /** - * Destroy the queue. The queue will first flush all queued actions, and in case it has extended an object, will restore the original object. - */ - value: function destroy() { - this.flush(); - - if (this._extended) { - var object = this._extended.object; - var methods = this._extended.methods; - - for (var i = 0; i < methods.length; i++) { - var method = methods[i]; - - if (method.original) { - object[method.name] = method.original; - } else { - // @TODO: better solution? - delete object[method.name]; - } - } - - this._extended = null; - } - } - /** - * Replace a method on an object with a queued version. - * - * @param object - Object having the method. - * @param method - The method name. - */ - - }, { - key: "replace", - value: function replace(object, method) { - var me = this; - var original = object[method]; - - if (!original) { - throw new Error('Method ' + method + ' undefined'); - } - - object[method] = function () { - for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } - - // add this call to the queue - me.queue({ - args: args, - fn: original, - context: this - }); - }; - } - /** - * Queue a call. - * - * @param entry - The function or entry to be queued. - */ - - }, { - key: "queue", - value: function queue(entry) { - if (typeof entry === 'function') { - this._queue.push({ - fn: entry - }); - } else { - this._queue.push(entry); - } - - this._flushIfNeeded(); - } - /** - * Check whether the queue needs to be flushed. - */ - - }, { - key: "_flushIfNeeded", - value: function _flushIfNeeded() { - var _this = this; - - // flush when the maximum is exceeded. - if (this._queue.length > this.max) { - this.flush(); - } // flush after a period of inactivity when a delay is configured - - - if (this._timeout != null) { - clearTimeout(this._timeout); - this._timeout = null; - } - - if (this.queue.length > 0 && typeof this.delay === 'number') { - this._timeout = setTimeout(function () { - _this.flush(); - }, this.delay); - } - } - /** - * Flush all queued calls - */ - - }, { - key: "flush", - value: function flush() { - this._queue.splice(0).forEach(function (entry) { - entry.fn.apply(entry.context || entry.fn, entry.args || []); - }); - } - }], [{ - key: "extend", - value: function extend(object, options) { - var queue = new Queue(options); - - if (object.flush !== undefined) { - throw new Error('Target object already has a property flush'); - } - - object.flush = function () { - queue.flush(); - }; - - var methods = [{ - name: 'flush', - original: undefined - }]; - - if (options && options.replace) { - for (var i = 0; i < options.replace.length; i++) { - var name = options.replace[i]; - methods.push({ - name: name, - // @TODO: better solution? - original: object[name] - }); // @TODO: better solution? - - queue.replace(object, name); - } - } - - queue._extended = { - object: object, - methods: methods - }; - return queue; - } - }]); - - return Queue; - }(); - - function _arrayWithoutHoles(arr) { - if (Array.isArray(arr)) { - for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { - arr2[i] = arr[i]; - } - - return arr2; - } - } - - var arrayWithoutHoles = _arrayWithoutHoles; - - function _iterableToArray(iter) { - if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); - } - - var iterableToArray = _iterableToArray; - - function _nonIterableSpread() { - throw new TypeError("Invalid attempt to spread non-iterable instance"); - } - - var nonIterableSpread = _nonIterableSpread; - - function _toConsumableArray(arr) { - return arrayWithoutHoles(arr) || iterableToArray(arr) || nonIterableSpread(); - } - - var toConsumableArray = _toConsumableArray; - - /** - * [[DataSet]] code that can be reused in [[DataView]] or other similar implementations of [[DataInterface]]. - * - * @typeParam Item - Item type that may or may not have an id. - * @typeParam IdProp - Name of the property that contains the id. - */ - var DataSetPart = - /*#__PURE__*/ - function () { - function DataSetPart() { - classCallCheck(this, DataSetPart); - - this._subscribers = { - '*': [], - add: [], - remove: [], - update: [] - }; - /** - * @deprecated Use on instead (PS: DataView.subscribe === DataView.on). - */ - - this.subscribe = DataSetPart.prototype.on; - /** - * @deprecated Use off instead (PS: DataView.unsubscribe === DataView.off). - */ - - this.unsubscribe = DataSetPart.prototype.off; - } - /** - * Trigger an event - * - * @param event - Event name. - * @param payload - Event payload. - * @param senderId - Id of the sender. - */ - - - createClass(DataSetPart, [{ - key: "_trigger", - value: function _trigger(event, payload, senderId) { - if (event === '*') { - throw new Error('Cannot trigger event *'); - } - - var subscribers = [].concat(toConsumableArray(this._subscribers[event]), toConsumableArray(this._subscribers['*'])); - - for (var i = 0, len = subscribers.length; i < len; i++) { - var subscriber = subscribers[i]; - - if (subscriber.callback) { - subscriber.callback(event, payload, senderId != null ? senderId : null); - } - } - } - /** - * Subscribe to an event, add an event listener. - * - * @param event - Event name. - * @param callback - Callback method. - */ - - }, { - key: "on", - value: function on(event, callback) { - this._subscribers[event].push({ - callback: callback - }); - } - /** - * Unsubscribe from an event, remove an event listener. - * - * @remarks If the same callback was subscribed more than once **all** occurences will be removed. - * - * @param event - Event name. - * @param callback - Callback method. - */ - - }, { - key: "off", - value: function off(event, callback) { - this._subscribers[event] = this._subscribers[event].filter(function (listener) { - return listener.callback !== callback; - }); - } - }]); - - return DataSetPart; - }(); - - function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { keys.push.apply(keys, Object.getOwnPropertySymbols(object)); } if (enumerableOnly) keys = keys.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); return keys; } - - function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } - /** - * # DataSet - * - * Vis.js comes with a flexible DataSet, which can be used to hold and manipulate unstructured data and listen for changes in the data. The DataSet is key/value based. Data items can be added, updated and removed from the DataSet, and one can subscribe to changes in the DataSet. The data in the DataSet can be filtered and ordered, and fields (like dates) can be converted to a specific type. Data can be normalized when appending it to the DataSet as well. - * - * ## Example - * - * The following example shows how to use a DataSet. - * - * ```javascript - * // create a DataSet - * var options = {}; - * var data = new vis.DataSet(options); - * - * // add items - * // note that the data items can contain different properties and data formats - * data.add([ - * {id: 1, text: 'item 1', date: new Date(2013, 6, 20), group: 1, first: true}, - * {id: 2, text: 'item 2', date: '2013-06-23', group: 2}, - * {id: 3, text: 'item 3', date: '2013-06-25', group: 2}, - * {id: 4, text: 'item 4'} - * ]); - * - * // subscribe to any change in the DataSet - * data.on('*', function (event, properties, senderId) { - * console.log('event', event, properties); - * }); - * - * // update an existing item - * data.update({id: 2, group: 1}); - * - * // remove an item - * data.remove(4); - * - * // get all ids - * var ids = data.getIds(); - * console.log('ids', ids); - * - * // get a specific item - * var item1 = data.get(1); - * console.log('item1', item1); - * - * // retrieve a filtered subset of the data - * var items = data.get({ - * filter: function (item) { - * return item.group == 1; - * } - * }); - * console.log('filtered items', items); - * - * // retrieve formatted items - * var items = data.get({ - * fields: ['id', 'date'], - * type: { - * date: 'ISODate' - * } - * }); - * console.log('formatted items', items); - * ``` - * - * @typeParam Item - Item type that may or may not have an id. - * @typeParam IdProp - Name of the property that contains the id. - */ - - var DataSet = - /*#__PURE__*/ - function (_DataSetPart) { - inherits(DataSet, _DataSetPart); - - /** - * Construct a new DataSet. - * - * @param data - Initial data or options. - * @param options - Options (type error if data is also options). - */ - function DataSet(data, options) { - var _this; - - classCallCheck(this, DataSet); - - _this = possibleConstructorReturn(this, getPrototypeOf(DataSet).call(this)); // correctly read optional arguments - - if (data && !Array.isArray(data)) { - options = data; - data = []; - } - - _this._options = options || {}; - _this._data = Object.create({}); // map with data indexed by id - - _this.length = 0; // number of items in the DataSet - - _this._idProp = _this._options.fieldId || 'id'; // name of the field containing id - - _this._type = {}; // internal field types (NOTE: this can differ from this._options.type) - // all variants of a Date are internally stored as Date, so we can convert - // from everything to everything (also from ISODate to Number for example) - - if (_this._options.type) { - var fields = Object.keys(_this._options.type); - - for (var i = 0, len = fields.length; i < len; i++) { - var field = fields[i]; - var value = _this._options.type[field]; - - if (value == 'Date' || value == 'ISODate' || value == 'ASPDate') { - _this._type[field] = 'Date'; - } else { - _this._type[field] = value; - } - } - } // add initial data when provided - - - if (data && data.length) { - _this.add(data); - } - - _this.setOptions(options); - - return _this; - } - /** - * Set new options. - * - * @param options - The new options. - */ - - - createClass(DataSet, [{ - key: "setOptions", - value: function setOptions(options) { - if (options && options.queue !== undefined) { - if (options.queue === false) { - // delete queue if loaded - if (this._queue) { - this._queue.destroy(); - - delete this._queue; - } - } else { - // create queue and update its options - if (!this._queue) { - this._queue = Queue.extend(this, { - replace: ['add', 'update', 'remove'] - }); - } - - if (options.queue && _typeof_1(options.queue) === 'object') { - this._queue.setOptions(options.queue); - } - } - } - } - /** - * Add a data item or an array with items. - * - * After the items are added to the DataSet, the DataSet will trigger an event `add`. When a `senderId` is provided, this id will be passed with the triggered event to all subscribers. - * - * ## Example - * - * ```javascript - * // create a DataSet - * const data = new vis.DataSet() - * - * // add items - * const ids = data.add([ - * { id: 1, text: 'item 1' }, - * { id: 2, text: 'item 2' }, - * { text: 'item without an id' } - * ]) - * - * console.log(ids) // [1, 2, ''] - * ``` - * - * @param data - Items to be added (ids will be generated if missing). - * @param senderId - Sender id. - * - * @returns addedIds - Array with the ids (generated if not present) of the added items. - * - * @throws When an item with the same id as any of the added items already exists. - */ - - }, { - key: "add", - value: function add(data, senderId) { - var addedIds = []; - var id; - - if (Array.isArray(data)) { - // Array - for (var i = 0, len = data.length; i < len; i++) { - id = this._addItem(data[i]); - addedIds.push(id); - } - } else if (data && _typeof_1(data) === 'object') { - // Single item - id = this._addItem(data); - addedIds.push(id); - } else { - throw new Error('Unknown dataType'); - } - - if (addedIds.length) { - this._trigger('add', { - items: addedIds - }, senderId); - } - - return addedIds; - } - /** - * Update existing items. When an item does not exist, it will be created - * - * The provided properties will be merged in the existing item. When an item does not exist, it will be created. - * - * After the items are updated, the DataSet will trigger an event `add` for the added items, and an event `update`. When a `senderId` is provided, this id will be passed with the triggered event to all subscribers. - * - * ## Example - * - * ```javascript - * // create a DataSet - * const data = new vis.DataSet([ - * { id: 1, text: 'item 1' }, - * { id: 2, text: 'item 2' }, - * { id: 3, text: 'item 3' } - * ]) - * - * // update items - * const ids = data.update([ - * { id: 2, text: 'item 2 (updated)' }, - * { id: 4, text: 'item 4 (new)' } - * ]) - * - * console.log(ids) // [2, 4] - * ``` - * - * @param data - Items to be updated (if the id is already present) or added (if the id is missing). - * @param senderId - Sender id. - * - * @returns updatedIds - The ids of the added (these may be newly generated if there was no id in the item from the data) or updated items. - * - * @throws When the supplied data is neither an item nor an array of items. - */ - - }, { - key: "update", - value: function update(data, senderId) { - var _this2 = this; - - var addedIds = []; - var updatedIds = []; - var oldData = []; - var updatedData = []; - var idProp = this._idProp; - - var addOrUpdate = function addOrUpdate(item) { - var origId = item[idProp]; - - if (origId != null && _this2._data[origId]) { - var fullItem = item; // it has an id, therefore it is a fullitem - - var oldItem = Object.assign({}, _this2._data[origId]); // update item - - var id = _this2._updateItem(fullItem); - - updatedIds.push(id); - updatedData.push(fullItem); - oldData.push(oldItem); - } else { - // add new item - var _id = _this2._addItem(item); - - addedIds.push(_id); - } - }; - - if (Array.isArray(data)) { - // Array - for (var i = 0, len = data.length; i < len; i++) { - if (data[i] && _typeof_1(data[i]) === 'object') { - addOrUpdate(data[i]); - } else { - console.warn('Ignoring input item, which is not an object at index ' + i); - } - } - } else if (data && _typeof_1(data) === 'object') { - // Single item - addOrUpdate(data); - } else { - throw new Error('Unknown dataType'); - } - - if (addedIds.length) { - this._trigger('add', { - items: addedIds - }, senderId); - } - - if (updatedIds.length) { - var props = { - items: updatedIds, - oldData: oldData, - data: updatedData - }; // TODO: remove deprecated property 'data' some day - //Object.defineProperty(props, 'data', { - // 'get': (function() { - // console.warn('Property data is deprecated. Use DataSet.get(ids) to retrieve the new data, use the oldData property on this object to get the old data'); - // return updatedData; - // }).bind(this) - //}); - - this._trigger('update', props, senderId); - } - - return addedIds.concat(updatedIds); - } - /** @inheritdoc */ - - }, { - key: "get", - value: function get(first, second) { - // @TODO: Woudn't it be better to split this into multiple methods? - // parse the arguments - var id = undefined; - var ids = undefined; - var options = undefined; - - if (isId(first)) { - // get(id [, options]) - id = first; - options = second; - } else if (Array.isArray(first)) { - // get(ids [, options]) - ids = first; - options = second; - } else { - // get([, options]) - options = first; - } // determine the return type - - - var returnType = options && options.returnType === 'Object' ? 'Object' : 'Array'; // @TODO: WTF is this? Or am I missing something? - // var returnType - // if (options && options.returnType) { - // var allowedValues = ['Array', 'Object'] - // returnType = - // allowedValues.indexOf(options.returnType) == -1 - // ? 'Array' - // : options.returnType - // } else { - // returnType = 'Array' - // } - // build options - - var type = options && options.type || this._options.type; - var filter = options && options.filter; - var items = []; - var item = null; - var itemIds = null; - var itemId = null; // convert items - - if (id != null) { - // return a single item - item = this._getItem(id, type); - - if (item && filter && !filter(item)) { - item = null; - } - } else if (ids != null) { - // return a subset of items - for (var i = 0, len = ids.length; i < len; i++) { - item = this._getItem(ids[i], type); - - if (item != null && (!filter || filter(item))) { - items.push(item); - } - } - } else { - // return all items - itemIds = Object.keys(this._data); - - for (var _i = 0, _len = itemIds.length; _i < _len; _i++) { - itemId = itemIds[_i]; - item = this._getItem(itemId, type); - - if (item != null && (!filter || filter(item))) { - items.push(item); - } - } - } // order the results - - - if (options && options.order && id == undefined) { - this._sort(items, options.order); - } // filter fields of the items - - - if (options && options.fields) { - var fields = options.fields; - - if (id != undefined && item != null) { - item = this._filterFields(item, fields); - } else { - for (var _i2 = 0, _len2 = items.length; _i2 < _len2; _i2++) { - items[_i2] = this._filterFields(items[_i2], fields); - } - } - } // return the results - - - if (returnType == 'Object') { - var result = {}; - - for (var _i3 = 0, _len3 = items.length; _i3 < _len3; _i3++) { - var resultant = items[_i3]; // @TODO: Shoudn't this be this._fieldId? - // result[resultant.id] = resultant - - var _id2 = resultant[this._idProp]; - result[_id2] = resultant; - } - - return result; - } else { - if (id != null) { - // a single item - return item; - } else { - // just return our array - return items; - } - } - } - /** @inheritdoc */ - - }, { - key: "getIds", - value: function getIds(options) { - var data = this._data; - var filter = options && options.filter; - var order = options && options.order; - var type = options && options.type || this._options.type; - var itemIds = Object.keys(data); - var ids = []; - var item; - var items; - - if (filter) { - // get filtered items - if (order) { - // create ordered list - items = []; - - for (var i = 0, len = itemIds.length; i < len; i++) { - var id = itemIds[i]; - item = this._getItem(id, type); - - if (filter(item)) { - items.push(item); - } - } - - this._sort(items, order); - - for (var _i4 = 0, _len4 = items.length; _i4 < _len4; _i4++) { - ids.push(items[_i4][this._idProp]); - } - } else { - // create unordered list - for (var _i5 = 0, _len5 = itemIds.length; _i5 < _len5; _i5++) { - var _id3 = itemIds[_i5]; - item = this._getItem(_id3, type); - - if (filter(item)) { - ids.push(item[this._idProp]); - } - } - } - } else { - // get all items - if (order) { - // create an ordered list - items = []; - - for (var _i6 = 0, _len6 = itemIds.length; _i6 < _len6; _i6++) { - var _id4 = itemIds[_i6]; - items.push(data[_id4]); - } - - this._sort(items, order); - - for (var _i7 = 0, _len7 = items.length; _i7 < _len7; _i7++) { - ids.push(items[_i7][this._idProp]); - } - } else { - // create unordered list - for (var _i8 = 0, _len8 = itemIds.length; _i8 < _len8; _i8++) { - var _id5 = itemIds[_i8]; - item = data[_id5]; - ids.push(item[this._idProp]); - } - } - } - - return ids; - } - /** @inheritdoc */ - - }, { - key: "getDataSet", - value: function getDataSet() { - return this; - } - /** @inheritdoc */ - - }, { - key: "forEach", - value: function forEach(callback, options) { - var filter = options && options.filter; - var type = options && options.type || this._options.type; - var data = this._data; - var itemIds = Object.keys(data); - - if (options && options.order) { - // execute forEach on ordered list - var items = this.get(options); - - for (var i = 0, len = items.length; i < len; i++) { - var item = items[i]; - var id = item[this._idProp]; - callback(item, id); - } - } else { - // unordered - for (var _i9 = 0, _len9 = itemIds.length; _i9 < _len9; _i9++) { - var _id6 = itemIds[_i9]; - - var _item = this._getItem(_id6, type); - - if (!filter || filter(_item)) { - callback(_item, _id6); - } - } - } - } - /** @inheritdoc */ - - }, { - key: "map", - value: function map(callback, options) { - var filter = options && options.filter; - var type = options && options.type || this._options.type; - var mappedItems = []; - var data = this._data; - var itemIds = Object.keys(data); // convert and filter items - - for (var i = 0, len = itemIds.length; i < len; i++) { - var id = itemIds[i]; - - var item = this._getItem(id, type); - - if (!filter || filter(item)) { - mappedItems.push(callback(item, id)); - } - } // order items - - - if (options && options.order) { - this._sort(mappedItems, options.order); - } - - return mappedItems; - } - /** - * Filter the fields of an item. - * - * @param item - The item whose fields should be filtered. - * @param fields - The names of the fields that will be kept. - * - * @typeParam K - Field name type. - * - * @returns The item without any additional fields. - */ - - }, { - key: "_filterFields", - value: function _filterFields(item, fields) { - if (!item) { - // item is null - return item; - } - - return (Array.isArray(fields) ? // Use the supplied array - fields : // Use the keys of the supplied object - Object.keys(fields)).reduce(function (filteredItem, field) { - filteredItem[field] = item[field]; - return filteredItem; - }, {}); - } - /** - * Sort the provided array with items. - * - * @param items - Items to be sorted in place. - * @param order - A field name or custom sort function. - * - * @typeParam T - The type of the items in the items array. - */ - - }, { - key: "_sort", - value: function _sort(items, order) { - if (typeof order === 'string') { - // order by provided field name - var name = order; // field name - - items.sort(function (a, b) { - // @TODO: How to treat missing properties? - var av = a[name]; - var bv = b[name]; - return av > bv ? 1 : av < bv ? -1 : 0; - }); - } else if (typeof order === 'function') { - // order by sort function - items.sort(order); - } else { - // TODO: extend order by an Object {field:string, direction:string} - // where direction can be 'asc' or 'desc' - throw new TypeError('Order must be a function or a string'); - } - } - /** - * Remove an item or multiple items by “reference” (only the id is used) or by id. - * - * The method ignores removal of non-existing items, and returns an array containing the ids of the items which are actually removed from the DataSet. - * - * After the items are removed, the DataSet will trigger an event `remove` for the removed items. When a `senderId` is provided, this id will be passed with the triggered event to all subscribers. - * - * ## Example - * ```javascript - * // create a DataSet - * const data = new vis.DataSet([ - * { id: 1, text: 'item 1' }, - * { id: 2, text: 'item 2' }, - * { id: 3, text: 'item 3' } - * ]) - * - * // remove items - * const ids = data.remove([2, { id: 3 }, 4]) - * - * console.log(ids) // [2, 3] - * ``` - * - * @param id - One or more items or ids of items to be removed. - * @param senderId - Sender id. - * - * @returns The ids of the removed items. - */ - - }, { - key: "remove", - value: function remove(id, senderId) { - var removedIds = []; - var removedItems = []; // force everything to be an array for simplicity - - var ids = Array.isArray(id) ? id : [id]; - - for (var i = 0, len = ids.length; i < len; i++) { - var item = this._remove(ids[i]); - - if (item) { - var itemId = item[this._idProp]; - - if (itemId != null) { - removedIds.push(itemId); - removedItems.push(item); - } - } - } - - if (removedIds.length) { - this._trigger('remove', { - items: removedIds, - oldData: removedItems - }, senderId); - } - - return removedIds; - } - /** - * Remove an item by its id or reference. - * - * @param id - Id of an item or the item itself. - * - * @returns The removed item if removed, null otherwise. - */ - - }, { - key: "_remove", - value: function _remove(id) { - // @TODO: It origianlly returned the item although the docs say id. - // The code expects the item, so probably an error in the docs. - var ident; // confirm the id to use based on the args type - - if (isId(id)) { - ident = id; - } else if (id && _typeof_1(id) === 'object') { - ident = id[this._idProp]; // look for the identifier field using ._idProp - } // do the removing if the item is found - - - if (ident != null && this._data[ident]) { - var item = this._data[ident]; - delete this._data[ident]; - --this.length; - return item; - } - - return null; - } - /** - * Clear the entire data set. - * - * After the items are removed, the [[DataSet]] will trigger an event `remove` for all removed items. When a `senderId` is provided, this id will be passed with the triggered event to all subscribers. - * - * @param senderId - Sender id. - * - * @returns removedIds - The ids of all removed items. - */ - - }, { - key: "clear", - value: function clear(senderId) { - var ids = Object.keys(this._data); - var items = []; - - for (var i = 0, len = ids.length; i < len; i++) { - items.push(this._data[ids[i]]); - } - - this._data = {}; - this.length = 0; - - this._trigger('remove', { - items: ids, - oldData: items - }, senderId); - - return ids; - } - /** - * Find the item with maximum value of a specified field. - * - * @param field - Name of the property that should be searched for max value. - * - * @returns Item containing max value, or null if no items. - */ - - }, { - key: "max", - value: function max(field) { - var data = this._data; - var itemIds = Object.keys(data); - var max = null; - var maxField = null; - - for (var i = 0, len = itemIds.length; i < len; i++) { - var id = itemIds[i]; - var item = data[id]; - var itemField = item[field]; - - if (itemField != null && (maxField == null || itemField > maxField)) { - max = item; - maxField = itemField; - } - } - - return max; - } - /** - * Find the item with minimum value of a specified field. - * - * @param field - Name of the property that should be searched for min value. - * - * @returns Item containing min value, or null if no items. - */ - - }, { - key: "min", - value: function min(field) { - var data = this._data; - var itemIds = Object.keys(data); - var min = null; - var minField = null; - - for (var i = 0, len = itemIds.length; i < len; i++) { - var id = itemIds[i]; - var item = data[id]; - var itemField = item[field]; - - if (itemField != null && (minField == null || itemField < minField)) { - min = item; - minField = itemField; - } - } - - return min; - } - /** - * Find all distinct values of a specified field - * - * @param prop - The property name whose distinct values should be returned. - * - * @returns Unordered array containing all distinct values. Items without specified property are ignored. - */ - - }, { - key: "distinct", - value: function distinct(prop) { - var data = this._data; - var itemIds = Object.keys(data); - var values = []; - var fieldType = this._options.type && this._options.type[prop] || null; - var count = 0; - - for (var i = 0, len = itemIds.length; i < len; i++) { - var id = itemIds[i]; - var item = data[id]; - var value = item[prop]; - var exists = false; - - for (var j = 0; j < count; j++) { - if (values[j] == value) { - exists = true; - break; - } - } - - if (!exists && value !== undefined) { - values[count] = value; - count++; - } - } - - if (fieldType) { - for (var _i10 = 0, _len10 = values.length; _i10 < _len10; _i10++) { - values[_i10] = convert(values[_i10], fieldType); - } - } - - return values; - } - /** - * Add a single item. Will fail when an item with the same id already exists. - * - * @param item - A new item to be added. - * - * @returns Added item's id. An id is generated when it is not present in the item. - */ - - }, { - key: "_addItem", - value: function _addItem(item) { - var id = item[this._idProp]; - - if (id != null) { - // check whether this id is already taken - if (this._data[id]) { - // item already exists - throw new Error('Cannot add item: item with id ' + id + ' already exists'); - } - } else { - // generate an id - id = uuid4(); - item[this._idProp] = id; - } - - var d = {}; - var fields = Object.keys(item); - - for (var i = 0, len = fields.length; i < len; i++) { - var field = fields[i]; - var fieldType = this._type[field]; // type may be undefined - - d[field] = convert(item[field], fieldType); - } - - this._data[id] = d; - this.length++; - return id; - } - /** - * Get an item. Fields can be converted to a specific type - * - * @param id - Id of the requested item. - * @param types - Property name to type name object map of type converstions. - * - * @returns The item, optionally after type conversion. - */ - - }, { - key: "_getItem", - value: function _getItem(id, types) { - // @TODO: I have no idea how to type this. - // get the item from the dataset - var raw = this._data[id]; - - if (!raw) { - return null; - } // convert the items field types - - - var converted; - var fields = Object.keys(raw); - - if (types) { - converted = {}; - - for (var i = 0, len = fields.length; i < len; i++) { - var field = fields[i]; - var value = raw[field]; - converted[field] = convert(value, types[field]); - } - } else { - // no field types specified, no converting needed - converted = _objectSpread({}, raw); - } - - if (converted[this._idProp] == null) { - converted[this._idProp] = raw.id; - } - - return converted; - } - /** - * Update a single item: merge with existing item. - * Will fail when the item has no id, or when there does not exist an item with the same id. - * - * @param item - The new item - * - * @returns The id of the updated item. - */ - - }, { - key: "_updateItem", - value: function _updateItem(item) { - var id = item[this._idProp]; - - if (id == null) { - throw new Error('Cannot update item: item has no id (item: ' + JSON.stringify(item) + ')'); - } - - var d = this._data[id]; - - if (!d) { - // item doesn't exist - throw new Error('Cannot update item: no item with id ' + id + ' found'); - } // merge with current item - - - var fields = Object.keys(item); - - for (var i = 0, len = fields.length; i < len; i++) { - var field = fields[i]; - var fieldType = this._type[field] // type may be undefined - ; - d[field] = convert(item[field], fieldType); - } - - return id; - } - }]); - - return DataSet; - }(DataSetPart); - - /** - * DataView - * - * A DataView offers a filtered and/or formatted view on a DataSet. One can subscribe to changes in a DataView, and easily get filtered or formatted data without having to specify filters and field types all the time. - * - * ## Example - * ```javascript - * // create a DataSet - * var data = new vis.DataSet(); - * data.add([ - * {id: 1, text: 'item 1', date: new Date(2013, 6, 20), group: 1, first: true}, - * {id: 2, text: 'item 2', date: '2013-06-23', group: 2}, - * {id: 3, text: 'item 3', date: '2013-06-25', group: 2}, - * {id: 4, text: 'item 4'} - * ]); - * - * // create a DataView - * // the view will only contain items having a property group with value 1, - * // and will only output fields id, text, and date. - * var view = new vis.DataView(data, { - * filter: function (item) { - * return (item.group == 1); - * }, - * fields: ['id', 'text', 'date'] - * }); - * - * // subscribe to any change in the DataView - * view.on('*', function (event, properties, senderId) { - * console.log('event', event, properties); - * }); - * - * // update an item in the data set - * data.update({id: 2, group: 1}); - * - * // get all ids in the view - * var ids = view.getIds(); - * console.log('ids', ids); // will output [1, 2] - * - * // get all items in the view - * var items = view.get(); - * ``` - * - * @typeParam Item - Item type that may or may not have an id. - * @typeParam IdProp - Name of the property that contains the id. - */ - - var DataView = - /*#__PURE__*/ - function (_DataSetPart) { - inherits(DataView, _DataSetPart); - - /** - * Create a DataView. - * - * @param data - The instance containing data (directly or indirectly). - * @param options - Options to configure this data view. - */ - function DataView(data, options) { - var _this; - - classCallCheck(this, DataView); - - _this = possibleConstructorReturn(this, getPrototypeOf(DataView).call(this)); - /** @inheritdoc */ - - _this.length = 0; - _this._ids = {}; // ids of the items currently in memory (just contains a boolean true) - - _this._options = options || {}; - _this.listener = _this._onEvent.bind(assertThisInitialized(_this)); - - _this.setData(data); - - return _this; - } // TODO: implement a function .config() to dynamically update things like configured filter - // and trigger changes accordingly - - /** - * Set a data source for the view. - * - * @param data - The instance containing data (directly or indirectly). - */ - - - createClass(DataView, [{ - key: "setData", - value: function setData(data) { - if (this._data) { - // unsubscribe from current dataset - if (this._data.off) { - this._data.off('*', this.listener); - } // trigger a remove of all items in memory - - - var ids = this._data.getIds({ - filter: this._options.filter - }); - - var items = this._data.get(ids); - - this._ids = {}; - this.length = 0; - - this._trigger('remove', { - items: ids, - oldData: items - }); - } - - if (data != null) { - this._data = data; // trigger an add of all added items - - var _ids = this._data.getIds({ - filter: this._options.filter - }); - - for (var i = 0, len = _ids.length; i < len; i++) { - var id = _ids[i]; - this._ids[id] = true; - } - - this.length = _ids.length; - - this._trigger('add', { - items: _ids - }); - } else { - this._data = new DataSet(); - } // subscribe to new dataset - - - if (this._data.on) { - this._data.on('*', this.listener); - } - } - /** - * Refresh the DataView. - * Useful when the DataView has a filter function containing a variable parameter. - */ - - }, { - key: "refresh", - value: function refresh() { - var ids = this._data.getIds({ - filter: this._options.filter - }); - - var oldIds = Object.keys(this._ids); - var newIds = {}; - var addedIds = []; - var removedIds = []; - var removedItems = []; // check for additions - - for (var i = 0, len = ids.length; i < len; i++) { - var id = ids[i]; - newIds[id] = true; - - if (!this._ids[id]) { - addedIds.push(id); - this._ids[id] = true; - } - } // check for removals - - - for (var _i = 0, _len = oldIds.length; _i < _len; _i++) { - var _id = oldIds[_i]; - - var item = this._data.get(_id); - - if (item == null) { - // @TODO: Investigate. - // Doesn't happen during tests or examples. - // Is it really impossible or could it eventually happen? - // How to handle it if it does? The types guarantee non-nullable items. - console.error('If you see this, report it please.'); - } else if (!newIds[_id]) { - removedIds.push(_id); - removedItems.push(item); - delete this._ids[_id]; - } - } - - this.length += addedIds.length - removedIds.length; // trigger events - - if (addedIds.length) { - this._trigger('add', { - items: addedIds - }); - } - - if (removedIds.length) { - this._trigger('remove', { - items: removedIds, - oldData: removedItems - }); - } - } - /** @inheritdoc */ - - }, { - key: "get", - value: function get(first, second) { - if (this._data == null) { - return null; - } // parse the arguments - - - var ids = null; - var options; - - if (isId(first) || Array.isArray(first)) { - ids = first; - options = second; - } else { - options = first; - } // extend the options with the default options and provided options - - - var viewOptions = Object.assign({}, this._options, options); // create a combined filter method when needed - - var thisFilter = this._options.filter; - var optionsFilter = options && options.filter; - - if (thisFilter && optionsFilter) { - viewOptions.filter = function (item) { - return thisFilter(item) && optionsFilter(item); - }; - } - - if (ids == null) { - return this._data.get(viewOptions); - } else { - return this._data.get(ids, viewOptions); - } - } - /** @inheritdoc */ - - }, { - key: "getIds", - value: function getIds(options) { - if (this._data.length) { - var defaultFilter = this._options.filter; - var optionsFilter = options != null ? options.filter : null; - var filter; - - if (optionsFilter) { - if (defaultFilter) { - filter = function filter(item) { - return defaultFilter(item) && optionsFilter(item); - }; - } else { - filter = optionsFilter; - } - } else { - filter = defaultFilter; - } - - return this._data.getIds({ - filter: filter, - order: options && options.order - }); - } else { - return []; - } - } - /** @inheritdoc */ - - }, { - key: "forEach", - value: function forEach(callback, options) { - if (this._data) { - var defaultFilter = this._options.filter; - var optionsFilter = options && options.filter; - var filter; - - if (optionsFilter) { - if (defaultFilter) { - filter = function filter(item) { - return defaultFilter(item) && optionsFilter(item); - }; - } else { - filter = optionsFilter; - } - } else { - filter = defaultFilter; - } - - this._data.forEach(callback, { - filter: filter, - order: options && options.order - }); - } - } - /** @inheritdoc */ - - }, { - key: "map", - value: function map(callback, options) { - if (this._data) { - var defaultFilter = this._options.filter; - var optionsFilter = options && options.filter; - var filter; - - if (optionsFilter) { - if (defaultFilter) { - filter = function filter(item) { - return defaultFilter(item) && optionsFilter(item); - }; - } else { - filter = optionsFilter; - } - } else { - filter = defaultFilter; - } - - return this._data.map(callback, { - filter: filter, - order: options && options.order - }); - } else { - return []; - } - } - /** @inheritdoc */ - - }, { - key: "getDataSet", - value: function getDataSet() { - return this._data.getDataSet(); - } - /** - * Event listener. Will propagate all events from the connected data set to the subscribers of the DataView, but will filter the items and only trigger when there are changes in the filtered data set. - * - * @param event - The name of the event. - * @param params - Parameters of the event. - * @param senderId - Id supplied by the sender. - */ - - }, { - key: "_onEvent", - value: function _onEvent(event, params, senderId) { - if (!params || !params.items || !this._data) { - return; - } - - var ids = params.items; - var addedIds = []; - var updatedIds = []; - var removedIds = []; - var oldItems = []; - var updatedItems = []; - var removedItems = []; - - switch (event) { - case 'add': - // filter the ids of the added items - for (var i = 0, len = ids.length; i < len; i++) { - var id = ids[i]; - var item = this.get(id); - - if (item) { - this._ids[id] = true; - addedIds.push(id); - } - } - - break; - - case 'update': - // determine the event from the views viewpoint: an updated - // item can be added, updated, or removed from this view. - for (var _i2 = 0, _len2 = ids.length; _i2 < _len2; _i2++) { - var _id2 = ids[_i2]; - - var _item = this.get(_id2); - - if (_item) { - if (this._ids[_id2]) { - updatedIds.push(_id2); - updatedItems.push(params.data[_i2]); - oldItems.push(params.oldData[_i2]); - } else { - this._ids[_id2] = true; - addedIds.push(_id2); - } - } else { - if (this._ids[_id2]) { - delete this._ids[_id2]; - removedIds.push(_id2); - removedItems.push(params.oldData[_i2]); - } - } - } - - break; - - case 'remove': - // filter the ids of the removed items - for (var _i3 = 0, _len3 = ids.length; _i3 < _len3; _i3++) { - var _id3 = ids[_i3]; - - if (this._ids[_id3]) { - delete this._ids[_id3]; - removedIds.push(_id3); - removedItems.push(params.oldData[_i3]); - } - } - - break; - } - - this.length += addedIds.length - removedIds.length; - - if (addedIds.length) { - this._trigger('add', { - items: addedIds - }, senderId); - } - - if (updatedIds.length) { - this._trigger('update', { - items: updatedIds, - oldData: oldItems, - data: updatedItems - }, senderId); - } - - if (removedIds.length) { - this._trigger('remove', { - items: removedIds, - oldData: removedItems - }, senderId); - } - } - }]); - - return DataView; - }(DataSetPart); - - var index = { - DataSet: DataSet, - DataView: DataView, - Queue: Queue - }; - - exports.DataSet = DataSet; - exports.DataView = DataView; - exports.Queue = Queue; - exports.default = index; - - Object.defineProperty(exports, '__esModule', { value: true }); + addRegexToken('m', match1to2); + addRegexToken('mm', match1to2, match2); + addParseToken(['m', 'mm'], MINUTE); // MOMENTS + + var getSetMinute = makeGetSet('Minutes', false); // FORMATTING + + addFormatToken('s', ['ss', 2], 0, 'second'); // ALIASES + + addUnitAlias('second', 's'); // PRIORITY + + addUnitPriority('second', 15); // PARSING + + addRegexToken('s', match1to2); + addRegexToken('ss', match1to2, match2); + addParseToken(['s', 'ss'], SECOND); // MOMENTS + + var getSetSecond = makeGetSet('Seconds', false); // FORMATTING + + addFormatToken('S', 0, 0, function () { + return ~~(this.millisecond() / 100); + }); + addFormatToken(0, ['SS', 2], 0, function () { + return ~~(this.millisecond() / 10); + }); + addFormatToken(0, ['SSS', 3], 0, 'millisecond'); + addFormatToken(0, ['SSSS', 4], 0, function () { + return this.millisecond() * 10; + }); + addFormatToken(0, ['SSSSS', 5], 0, function () { + return this.millisecond() * 100; + }); + addFormatToken(0, ['SSSSSS', 6], 0, function () { + return this.millisecond() * 1000; + }); + addFormatToken(0, ['SSSSSSS', 7], 0, function () { + return this.millisecond() * 10000; + }); + addFormatToken(0, ['SSSSSSSS', 8], 0, function () { + return this.millisecond() * 100000; + }); + addFormatToken(0, ['SSSSSSSSS', 9], 0, function () { + return this.millisecond() * 1000000; + }); // ALIASES + + addUnitAlias('millisecond', 'ms'); // PRIORITY + + addUnitPriority('millisecond', 16); // PARSING + + addRegexToken('S', match1to3, match1); + addRegexToken('SS', match1to3, match2); + addRegexToken('SSS', match1to3, match3); + var token; + + for (token = 'SSSS'; token.length <= 9; token += 'S') { + addRegexToken(token, matchUnsigned); + } + + function parseMs(input, array) { + array[MILLISECOND] = toInt(('0.' + input) * 1000); + } + + for (token = 'S'; token.length <= 9; token += 'S') { + addParseToken(token, parseMs); + } // MOMENTS + + + var getSetMillisecond = makeGetSet('Milliseconds', false); // FORMATTING + + addFormatToken('z', 0, 0, 'zoneAbbr'); + addFormatToken('zz', 0, 0, 'zoneName'); // MOMENTS + + function getZoneAbbr() { + return this._isUTC ? 'UTC' : ''; + } + + function getZoneName() { + return this._isUTC ? 'Coordinated Universal Time' : ''; + } + + var proto = Moment.prototype; + proto.add = add; + proto.calendar = calendar$1; + proto.clone = clone; + proto.diff = diff; + proto.endOf = endOf; + proto.format = format; + proto.from = from; + proto.fromNow = fromNow; + proto.to = to; + proto.toNow = toNow; + proto.get = stringGet; + proto.invalidAt = invalidAt; + proto.isAfter = isAfter; + proto.isBefore = isBefore; + proto.isBetween = isBetween; + proto.isSame = isSame; + proto.isSameOrAfter = isSameOrAfter; + proto.isSameOrBefore = isSameOrBefore; + proto.isValid = isValid$2; + proto.lang = lang; + proto.locale = locale; + proto.localeData = localeData; + proto.max = prototypeMax; + proto.min = prototypeMin; + proto.parsingFlags = parsingFlags; + proto.set = stringSet; + proto.startOf = startOf; + proto.subtract = subtract; + proto.toArray = toArray; + proto.toObject = toObject; + proto.toDate = toDate; + proto.toISOString = toISOString; + proto.inspect = inspect; + proto.toJSON = toJSON; + proto.toString = toString; + proto.unix = unix; + proto.valueOf = valueOf; + proto.creationData = creationData; + proto.year = getSetYear; + proto.isLeapYear = getIsLeapYear; + proto.weekYear = getSetWeekYear; + proto.isoWeekYear = getSetISOWeekYear; + proto.quarter = proto.quarters = getSetQuarter; + proto.month = getSetMonth; + proto.daysInMonth = getDaysInMonth; + proto.week = proto.weeks = getSetWeek; + proto.isoWeek = proto.isoWeeks = getSetISOWeek; + proto.weeksInYear = getWeeksInYear; + proto.isoWeeksInYear = getISOWeeksInYear; + proto.date = getSetDayOfMonth; + proto.day = proto.days = getSetDayOfWeek; + proto.weekday = getSetLocaleDayOfWeek; + proto.isoWeekday = getSetISODayOfWeek; + proto.dayOfYear = getSetDayOfYear; + proto.hour = proto.hours = getSetHour; + proto.minute = proto.minutes = getSetMinute; + proto.second = proto.seconds = getSetSecond; + proto.millisecond = proto.milliseconds = getSetMillisecond; + proto.utcOffset = getSetOffset; + proto.utc = setOffsetToUTC; + proto.local = setOffsetToLocal; + proto.parseZone = setOffsetToParsedOffset; + proto.hasAlignedHourOffset = hasAlignedHourOffset; + proto.isDST = isDaylightSavingTime; + proto.isLocal = isLocal; + proto.isUtcOffset = isUtcOffset; + proto.isUtc = isUtc; + proto.isUTC = isUtc; + proto.zoneAbbr = getZoneAbbr; + proto.zoneName = getZoneName; + proto.dates = deprecate('dates accessor is deprecated. Use date instead.', getSetDayOfMonth); + proto.months = deprecate('months accessor is deprecated. Use month instead', getSetMonth); + proto.years = deprecate('years accessor is deprecated. Use year instead', getSetYear); + proto.zone = deprecate('moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/', getSetZone); + proto.isDSTShifted = deprecate('isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information', isDaylightSavingTimeShifted); + + function createUnix(input) { + return createLocal(input * 1000); + } + + function createInZone() { + return createLocal.apply(null, arguments).parseZone(); + } + + function preParsePostFormat(string) { + return string; + } + + var proto$1 = Locale.prototype; + proto$1.calendar = calendar; + proto$1.longDateFormat = longDateFormat; + proto$1.invalidDate = invalidDate; + proto$1.ordinal = ordinal; + proto$1.preparse = preParsePostFormat; + proto$1.postformat = preParsePostFormat; + proto$1.relativeTime = relativeTime; + proto$1.pastFuture = pastFuture; + proto$1.set = set; + proto$1.months = localeMonths; + proto$1.monthsShort = localeMonthsShort; + proto$1.monthsParse = localeMonthsParse; + proto$1.monthsRegex = monthsRegex; + proto$1.monthsShortRegex = monthsShortRegex; + proto$1.week = localeWeek; + proto$1.firstDayOfYear = localeFirstDayOfYear; + proto$1.firstDayOfWeek = localeFirstDayOfWeek; + proto$1.weekdays = localeWeekdays; + proto$1.weekdaysMin = localeWeekdaysMin; + proto$1.weekdaysShort = localeWeekdaysShort; + proto$1.weekdaysParse = localeWeekdaysParse; + proto$1.weekdaysRegex = weekdaysRegex; + proto$1.weekdaysShortRegex = weekdaysShortRegex; + proto$1.weekdaysMinRegex = weekdaysMinRegex; + proto$1.isPM = localeIsPM; + proto$1.meridiem = localeMeridiem; + + function get$1(format, index, field, setter) { + var locale = getLocale(); + var utc = createUTC().set(setter, index); + return locale[field](utc, format); + } + + function listMonthsImpl(format, index, field) { + if (isNumber(format)) { + index = format; + format = undefined; + } + + format = format || ''; + + if (index != null) { + return get$1(format, index, field, 'month'); + } + + var i; + var out = []; + + for (i = 0; i < 12; i++) { + out[i] = get$1(format, i, field, 'month'); + } + + return out; + } // () + // (5) + // (fmt, 5) + // (fmt) + // (true) + // (true, 5) + // (true, fmt, 5) + // (true, fmt) + + + function listWeekdaysImpl(localeSorted, format, index, field) { + if (typeof localeSorted === 'boolean') { + if (isNumber(format)) { + index = format; + format = undefined; + } + + format = format || ''; + } else { + format = localeSorted; + index = format; + localeSorted = false; + + if (isNumber(format)) { + index = format; + format = undefined; + } + + format = format || ''; + } + + var locale = getLocale(), + shift = localeSorted ? locale._week.dow : 0; + + if (index != null) { + return get$1(format, (index + shift) % 7, field, 'day'); + } + + var i; + var out = []; + + for (i = 0; i < 7; i++) { + out[i] = get$1(format, (i + shift) % 7, field, 'day'); + } + + return out; + } + + function listMonths(format, index) { + return listMonthsImpl(format, index, 'months'); + } + + function listMonthsShort(format, index) { + return listMonthsImpl(format, index, 'monthsShort'); + } + + function listWeekdays(localeSorted, format, index) { + return listWeekdaysImpl(localeSorted, format, index, 'weekdays'); + } + + function listWeekdaysShort(localeSorted, format, index) { + return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort'); + } + + function listWeekdaysMin(localeSorted, format, index) { + return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin'); + } + + getSetGlobalLocale('en', { + dayOfMonthOrdinalParse: /\d{1,2}(th|st|nd|rd)/, + ordinal: function (number) { + var b = number % 10, + output = toInt(number % 100 / 10) === 1 ? 'th' : b === 1 ? 'st' : b === 2 ? 'nd' : b === 3 ? 'rd' : 'th'; + return number + output; + } + }); // Side effect imports + + hooks.lang = deprecate('moment.lang is deprecated. Use moment.locale instead.', getSetGlobalLocale); + hooks.langData = deprecate('moment.langData is deprecated. Use moment.localeData instead.', getLocale); + var mathAbs = Math.abs; + + function abs() { + var data = this._data; + this._milliseconds = mathAbs(this._milliseconds); + this._days = mathAbs(this._days); + this._months = mathAbs(this._months); + data.milliseconds = mathAbs(data.milliseconds); + data.seconds = mathAbs(data.seconds); + data.minutes = mathAbs(data.minutes); + data.hours = mathAbs(data.hours); + data.months = mathAbs(data.months); + data.years = mathAbs(data.years); + return this; + } + + function addSubtract$1(duration, input, value, direction) { + var other = createDuration(input, value); + duration._milliseconds += direction * other._milliseconds; + duration._days += direction * other._days; + duration._months += direction * other._months; + return duration._bubble(); + } // supports only 2.0-style add(1, 's') or add(duration) + + + function add$1(input, value) { + return addSubtract$1(this, input, value, 1); + } // supports only 2.0-style subtract(1, 's') or subtract(duration) + + + function subtract$1(input, value) { + return addSubtract$1(this, input, value, -1); + } + + function absCeil(number) { + if (number < 0) { + return Math.floor(number); + } else { + return Math.ceil(number); + } + } + + function bubble() { + var milliseconds = this._milliseconds; + var days = this._days; + var months = this._months; + var data = this._data; + var seconds, minutes, hours, years, monthsFromDays; // if we have a mix of positive and negative values, bubble down first + // check: https://github.com/moment/moment/issues/2166 + + if (!(milliseconds >= 0 && days >= 0 && months >= 0 || milliseconds <= 0 && days <= 0 && months <= 0)) { + milliseconds += absCeil(monthsToDays(months) + days) * 864e5; + days = 0; + months = 0; + } // The following code bubbles up values, see the tests for + // examples of what that means. + + + data.milliseconds = milliseconds % 1000; + seconds = absFloor(milliseconds / 1000); + data.seconds = seconds % 60; + minutes = absFloor(seconds / 60); + data.minutes = minutes % 60; + hours = absFloor(minutes / 60); + data.hours = hours % 24; + days += absFloor(hours / 24); // convert days to months + + monthsFromDays = absFloor(daysToMonths(days)); + months += monthsFromDays; + days -= absCeil(monthsToDays(monthsFromDays)); // 12 months -> 1 year + + years = absFloor(months / 12); + months %= 12; + data.days = days; + data.months = months; + data.years = years; + return this; + } + + function daysToMonths(days) { + // 400 years have 146097 days (taking into account leap year rules) + // 400 years have 12 months === 4800 + return days * 4800 / 146097; + } + + function monthsToDays(months) { + // the reverse of daysToMonths + return months * 146097 / 4800; + } + + function as(units) { + if (!this.isValid()) { + return NaN; + } + + var days; + var months; + var milliseconds = this._milliseconds; + units = normalizeUnits(units); + + if (units === 'month' || units === 'quarter' || units === 'year') { + days = this._days + milliseconds / 864e5; + months = this._months + daysToMonths(days); + + switch (units) { + case 'month': + return months; + + case 'quarter': + return months / 3; + + case 'year': + return months / 12; + } + } else { + // handle milliseconds separately because of floating point math errors (issue #1867) + days = this._days + Math.round(monthsToDays(this._months)); + + switch (units) { + case 'week': + return days / 7 + milliseconds / 6048e5; + + case 'day': + return days + milliseconds / 864e5; + + case 'hour': + return days * 24 + milliseconds / 36e5; + + case 'minute': + return days * 1440 + milliseconds / 6e4; + + case 'second': + return days * 86400 + milliseconds / 1000; + // Math.floor prevents floating point math errors here + + case 'millisecond': + return Math.floor(days * 864e5) + milliseconds; + + default: + throw new Error('Unknown unit ' + units); + } + } + } // TODO: Use this.as('ms')? + + + function valueOf$1() { + if (!this.isValid()) { + return NaN; + } + + return this._milliseconds + this._days * 864e5 + this._months % 12 * 2592e6 + toInt(this._months / 12) * 31536e6; + } + + function makeAs(alias) { + return function () { + return this.as(alias); + }; + } + + var asMilliseconds = makeAs('ms'); + var asSeconds = makeAs('s'); + var asMinutes = makeAs('m'); + var asHours = makeAs('h'); + var asDays = makeAs('d'); + var asWeeks = makeAs('w'); + var asMonths = makeAs('M'); + var asQuarters = makeAs('Q'); + var asYears = makeAs('y'); + + function clone$1() { + return createDuration(this); + } + + function get$2(units) { + units = normalizeUnits(units); + return this.isValid() ? this[units + 's']() : NaN; + } + + function makeGetter(name) { + return function () { + return this.isValid() ? this._data[name] : NaN; + }; + } + + var milliseconds = makeGetter('milliseconds'); + var seconds = makeGetter('seconds'); + var minutes = makeGetter('minutes'); + var hours = makeGetter('hours'); + var days = makeGetter('days'); + var months = makeGetter('months'); + var years = makeGetter('years'); + + function weeks() { + return absFloor(this.days() / 7); + } + + var round = Math.round; + var thresholds = { + ss: 44, + // a few seconds to seconds + s: 45, + // seconds to minute + m: 45, + // minutes to hour + h: 22, + // hours to day + d: 26, + // days to month + M: 11 // months to year + + }; // helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize + + function substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) { + return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture); + } + + function relativeTime$1(posNegDuration, withoutSuffix, locale) { + var duration = createDuration(posNegDuration).abs(); + var seconds = round(duration.as('s')); + var minutes = round(duration.as('m')); + var hours = round(duration.as('h')); + var days = round(duration.as('d')); + var months = round(duration.as('M')); + var years = round(duration.as('y')); + var a = seconds <= thresholds.ss && ['s', seconds] || seconds < thresholds.s && ['ss', seconds] || minutes <= 1 && ['m'] || minutes < thresholds.m && ['mm', minutes] || hours <= 1 && ['h'] || hours < thresholds.h && ['hh', hours] || days <= 1 && ['d'] || days < thresholds.d && ['dd', days] || months <= 1 && ['M'] || months < thresholds.M && ['MM', months] || years <= 1 && ['y'] || ['yy', years]; + a[2] = withoutSuffix; + a[3] = +posNegDuration > 0; + a[4] = locale; + return substituteTimeAgo.apply(null, a); + } // This function allows you to set the rounding function for relative time strings + + + function getSetRelativeTimeRounding(roundingFunction) { + if (roundingFunction === undefined) { + return round; + } + + if (typeof roundingFunction === 'function') { + round = roundingFunction; + return true; + } + + return false; + } // This function allows you to set a threshold for relative time strings + + + function getSetRelativeTimeThreshold(threshold, limit) { + if (thresholds[threshold] === undefined) { + return false; + } + + if (limit === undefined) { + return thresholds[threshold]; + } + + thresholds[threshold] = limit; + + if (threshold === 's') { + thresholds.ss = limit - 1; + } + + return true; + } + + function humanize(withSuffix) { + if (!this.isValid()) { + return this.localeData().invalidDate(); + } + + var locale = this.localeData(); + var output = relativeTime$1(this, !withSuffix, locale); + + if (withSuffix) { + output = locale.pastFuture(+this, output); + } + + return locale.postformat(output); + } + + var abs$1 = Math.abs; + + function sign(x) { + return (x > 0) - (x < 0) || +x; + } + + function toISOString$1() { + // for ISO strings we do not use the normal bubbling rules: + // * milliseconds bubble up until they become hours + // * days do not bubble at all + // * months bubble up until they become years + // This is because there is no context-free conversion between hours and days + // (think of clock changes) + // and also not between days and months (28-31 days per month) + if (!this.isValid()) { + return this.localeData().invalidDate(); + } + + var seconds = abs$1(this._milliseconds) / 1000; + var days = abs$1(this._days); + var months = abs$1(this._months); + var minutes, hours, years; // 3600 seconds -> 60 minutes -> 1 hour + + minutes = absFloor(seconds / 60); + hours = absFloor(minutes / 60); + seconds %= 60; + minutes %= 60; // 12 months -> 1 year + + years = absFloor(months / 12); + months %= 12; // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js + + var Y = years; + var M = months; + var D = days; + var h = hours; + var m = minutes; + var s = seconds ? seconds.toFixed(3).replace(/\.?0+$/, '') : ''; + var total = this.asSeconds(); + + if (!total) { + // this is the same as C#'s (Noda) and python (isodate)... + // but not other JS (goog.date) + return 'P0D'; + } + + var totalSign = total < 0 ? '-' : ''; + var ymSign = sign(this._months) !== sign(total) ? '-' : ''; + var daysSign = sign(this._days) !== sign(total) ? '-' : ''; + var hmsSign = sign(this._milliseconds) !== sign(total) ? '-' : ''; + return totalSign + 'P' + (Y ? ymSign + Y + 'Y' : '') + (M ? ymSign + M + 'M' : '') + (D ? daysSign + D + 'D' : '') + (h || m || s ? 'T' : '') + (h ? hmsSign + h + 'H' : '') + (m ? hmsSign + m + 'M' : '') + (s ? hmsSign + s + 'S' : ''); + } + + var proto$2 = Duration.prototype; + proto$2.isValid = isValid$1; + proto$2.abs = abs; + proto$2.add = add$1; + proto$2.subtract = subtract$1; + proto$2.as = as; + proto$2.asMilliseconds = asMilliseconds; + proto$2.asSeconds = asSeconds; + proto$2.asMinutes = asMinutes; + proto$2.asHours = asHours; + proto$2.asDays = asDays; + proto$2.asWeeks = asWeeks; + proto$2.asMonths = asMonths; + proto$2.asQuarters = asQuarters; + proto$2.asYears = asYears; + proto$2.valueOf = valueOf$1; + proto$2._bubble = bubble; + proto$2.clone = clone$1; + proto$2.get = get$2; + proto$2.milliseconds = milliseconds; + proto$2.seconds = seconds; + proto$2.minutes = minutes; + proto$2.hours = hours; + proto$2.days = days; + proto$2.weeks = weeks; + proto$2.months = months; + proto$2.years = years; + proto$2.humanize = humanize; + proto$2.toISOString = toISOString$1; + proto$2.toString = toISOString$1; + proto$2.toJSON = toISOString$1; + proto$2.locale = locale; + proto$2.localeData = localeData; + proto$2.toIsoString = deprecate('toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)', toISOString$1); + proto$2.lang = lang; // Side effect imports + // FORMATTING + + addFormatToken('X', 0, 0, 'unix'); + addFormatToken('x', 0, 0, 'valueOf'); // PARSING + + addRegexToken('x', matchSigned); + addRegexToken('X', matchTimestamp); + addParseToken('X', function (input, array, config) { + config._d = new Date(parseFloat(input, 10) * 1000); + }); + addParseToken('x', function (input, array, config) { + config._d = new Date(toInt(input)); + }); // Side effect imports + + hooks.version = '2.24.0'; + setHookCallback(createLocal); + hooks.fn = proto; + hooks.min = min; + hooks.max = max; + hooks.now = now; + hooks.utc = createUTC; + hooks.unix = createUnix; + hooks.months = listMonths; + hooks.isDate = isDate; + hooks.locale = getSetGlobalLocale; + hooks.invalid = createInvalid; + hooks.duration = createDuration; + hooks.isMoment = isMoment; + hooks.weekdays = listWeekdays; + hooks.parseZone = createInZone; + hooks.localeData = getLocale; + hooks.isDuration = isDuration; + hooks.monthsShort = listMonthsShort; + hooks.weekdaysMin = listWeekdaysMin; + hooks.defineLocale = defineLocale; + hooks.updateLocale = updateLocale; + hooks.locales = listLocales; + hooks.weekdaysShort = listWeekdaysShort; + hooks.normalizeUnits = normalizeUnits; + hooks.relativeTimeRounding = getSetRelativeTimeRounding; + hooks.relativeTimeThreshold = getSetRelativeTimeThreshold; + hooks.calendarFormat = getCalendarFormat; + hooks.prototype = proto; // currently HTML5 input type only supports 24-hour formats + + hooks.HTML5_FMT = { + DATETIME_LOCAL: 'YYYY-MM-DDTHH:mm', + // + DATETIME_LOCAL_SECONDS: 'YYYY-MM-DDTHH:mm:ss', + // + DATETIME_LOCAL_MS: 'YYYY-MM-DDTHH:mm:ss.SSS', + // + DATE: 'YYYY-MM-DD', + // + TIME: 'HH:mm', + // + TIME_SECONDS: 'HH:mm:ss', + // + TIME_MS: 'HH:mm:ss.SSS', + // + WEEK: 'GGGG-[W]WW', + // + MONTH: 'YYYY-MM' // + + }; + return hooks; + }); + }); // Maps for number <-> hex string conversion + + var byteToHex$2 = []; + + for (var i$2 = 0; i$2 < 256; i$2++) { + byteToHex$2[i$2] = (i$2 + 0x100).toString(16).substr(1); + } + /** + * Generate 16 random bytes to be used as a base for UUID. + * + * @ignore + */ + + + var random$1 = function () { + if (typeof crypto !== 'undefined' && crypto.getRandomValues) { + // WHATWG crypto-based RNG - http://wiki.whatwg.org/wiki/Crypto + // Moderately fast, high quality + var _rnds8 = new Uint8Array(16); + + return function whatwgRNG() { + crypto.getRandomValues(_rnds8); + return _rnds8; + }; + } // Math.random()-based (RNG) + // + // If all else fails, use Math.random(). + // It's fast, but is of unspecified quality. + + + var _rnds = new Array(16); + + return function () { + for (var i = 0, r; i < 16; i++) { + if ((i & 0x03) === 0) { + r = Math.random() * 0x100000000; + } + + _rnds[i] = r >>> ((i & 0x03) << 3) & 0xff; + } + + return _rnds; + }; // uuid.js + // + // Copyright (c) 2010-2012 Robert Kieffer + // MIT License - http://opensource.org/licenses/mit-license.php + // Unique ID creation requires a high quality random # generator. We feature + // detect to determine the best RNG source, normalizing to a function that + // returns 128-bits of randomness, since that's what's usually required + // return require('./rng'); + }(); + + var byteToHex$1$1 = []; + + for (var i$1$1 = 0; i$1$1 < 256; i$1$1++) { + byteToHex$1$1[i$1$1] = (i$1$1 + 0x100).toString(16).substr(1); + } // **`v1()` - Generate time-based UUID** + // + // Inspired by https://github.com/LiosK/UUID.js + // and http://docs.python.org/library/uuid.html + // random #'s we need to init node and clockseq + + + var seedBytes$1 = random$1(); // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1) + + var defaultNodeId$1 = [seedBytes$1[0] | 0x01, seedBytes$1[1], seedBytes$1[2], seedBytes$1[3], seedBytes$1[4], seedBytes$1[5]]; // Per 4.2.2, randomize (14 bit) clockseq + + var defaultClockseq$1 = (seedBytes$1[6] << 8 | seedBytes$1[7]) & 0x3fff; // Previous uuid creation time + // for example '/Date(1198908717056)/' or '/Date(1198908717056-0700)/' + // code from http://momentjs.com/ + + + var ASPDateRegex = /^\/?Date\((-?\d+)/i; // Hex color + /** + * Hue, Saturation, Value. + */ + + /** + * Test whether given object is a number + * + * @param value - Input value of unknown type. + * + * @returns True if number, false otherwise. + */ + + function isNumber(value) { + return value instanceof Number || typeof value === 'number'; + } + /** + * Test whether given object is a string + * + * @param value - Input value of unknown type. + * + * @returns True if string, false otherwise. + */ + + + function isString(value) { + return value instanceof String || typeof value === 'string'; + } + /** + * Test whether given object is a Moment date. + * @TODO: This is basically a workaround, if Moment was imported property it wouldn't necessary as moment.isMoment is a TS type guard. + * + * @param value - Input value of unknown type. + * + * @returns True if Moment instance, false otherwise. + */ + + + function isMoment(value) { + return moment.isMoment(value); + } + /** + * Copy property from b to a if property present in a. + * If property in b explicitly set to null, delete it if `allowDeletion` set. + * + * Internal helper routine, should not be exported. Not added to `exports` for that reason. + * + * @param a - Target object. + * @param b - Source object. + * @param prop - Name of property to copy from b to a. + * @param allowDeletion if true, delete property in a if explicitly set to null in b + */ + + + function copyOrDelete(a, b, prop, allowDeletion) { + var doDeletion = false; + + if (allowDeletion === true) { + doDeletion = b[prop] === null && a[prop] !== undefined; + } + + if (doDeletion) { + delete a[prop]; + } else { + a[prop] = b[prop]; // Remember, this is a reference copy! + } + } + /** + * Deep extend an object a with the properties of object b + * + * @param a - Target object. + * @param b - Source object. + * @param protoExtend - If true, the prototype values will also be extended + * (ie. the options objects that inherit from others will also get the inherited options). + * @param allowDeletion - If true, the values of fields that are null will be deleted. + * + * @returns Argument a. + */ + + + function deepExtend(a, b) { + var protoExtend = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; + var allowDeletion = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false; + + for (var prop in b) { + if (Object.prototype.hasOwnProperty.call(b, prop) || protoExtend === true) { + if (b[prop] && b[prop].constructor === Object) { + if (a[prop] === undefined) { + a[prop] = {}; + } + + if (a[prop].constructor === Object) { + deepExtend(a[prop], b[prop], protoExtend); // NOTE: allowDeletion not propagated! + } else { + copyOrDelete(a, b, prop, allowDeletion); + } + } else if (Array.isArray(b[prop])) { + a[prop] = []; + + for (var i = 0; i < b[prop].length; i++) { + a[prop].push(b[prop][i]); + } + } else { + copyOrDelete(a, b, prop, allowDeletion); + } + } + } + + return a; + } + /** + * Convert an object into another type + * + * @param object - Value of unknown type. + * @param type - Name of the desired type. + * + * @returns Object in the desired type. + * @throws Error + */ + + + function convert(object, type) { + var match; + + if (object === undefined) { + return undefined; + } + + if (object === null) { + return null; + } + + if (!type) { + return object; + } + + if (!(typeof type === 'string') && !(type instanceof String)) { + throw new Error('Type must be a string'); + } //noinspection FallthroughInSwitchStatementJS + + + switch (type) { + case 'boolean': + case 'Boolean': + return Boolean(object); + + case 'number': + case 'Number': + if (isString(object) && !isNaN(Date.parse(object))) { + return moment(object).valueOf(); + } else { + // @TODO: I don't think that Number and String constructors are a good idea. + // This could also fail if the object doesn't have valueOf method or if it's redefined. + // For example: Object.create(null) or { valueOf: 7 }. + return Number(object.valueOf()); + } + + case 'string': + case 'String': + return String(object); + + case 'Date': + if (isNumber(object)) { + return new Date(object); + } + + if (object instanceof Date) { + return new Date(object.valueOf()); + } else if (isMoment(object)) { + return new Date(object.valueOf()); + } + + if (isString(object)) { + match = ASPDateRegex.exec(object); + + if (match) { + // object is an ASP date + return new Date(Number(match[1])); // parse number + } else { + return moment(new Date(object)).toDate(); // parse string + } + } else { + throw new Error('Cannot convert object of type ' + getType(object) + ' to type Date'); + } + + case 'Moment': + if (isNumber(object)) { + return moment(object); + } + + if (object instanceof Date) { + return moment(object.valueOf()); + } else if (isMoment(object)) { + return moment(object); + } + + if (isString(object)) { + match = ASPDateRegex.exec(object); + + if (match) { + // object is an ASP date + return moment(Number(match[1])); // parse number + } else { + return moment(object); // parse string + } + } else { + throw new Error('Cannot convert object of type ' + getType(object) + ' to type Date'); + } + + case 'ISODate': + if (isNumber(object)) { + return new Date(object); + } else if (object instanceof Date) { + return object.toISOString(); + } else if (isMoment(object)) { + return object.toDate().toISOString(); + } else if (isString(object)) { + match = ASPDateRegex.exec(object); + + if (match) { + // object is an ASP date + return new Date(Number(match[1])).toISOString(); // parse number + } else { + return moment(object).format(); // ISO 8601 + } + } else { + throw new Error('Cannot convert object of type ' + getType(object) + ' to type ISODate'); + } + + case 'ASPDate': + if (isNumber(object)) { + return '/Date(' + object + ')/'; + } else if (object instanceof Date) { + return '/Date(' + object.valueOf() + ')/'; + } else if (isString(object)) { + match = ASPDateRegex.exec(object); + + var _value; + + if (match) { + // object is an ASP date + _value = new Date(Number(match[1])).valueOf(); // parse number + } else { + _value = new Date(object).valueOf(); // parse string + } + + return '/Date(' + _value + ')/'; + } else { + throw new Error('Cannot convert object of type ' + getType(object) + ' to type ASPDate'); + } + + default: + var never = type; + throw new Error("Unknown type ".concat(never)); + } + } + /** + * Get the type of an object, for example exports.getType([]) returns 'Array' + * + * @param object - Input value of unknown type. + * + * @returns Detected type. + */ + + + function getType(object) { + var type = _typeof(object); + + if (type === 'object') { + if (object === null) { + return 'null'; + } + + if (object instanceof Boolean) { + return 'Boolean'; + } + + if (object instanceof Number) { + return 'Number'; + } + + if (object instanceof String) { + return 'String'; + } + + if (Array.isArray(object)) { + return 'Array'; + } + + if (object instanceof Date) { + return 'Date'; + } + + return 'Object'; + } + + if (type === 'number') { + return 'Number'; + } + + if (type === 'boolean') { + return 'Boolean'; + } + + if (type === 'string') { + return 'String'; + } + + if (type === undefined) { + return 'undefined'; + } + + return type; + } + + /** + * Determine whether a value can be used as an id. + * + * @param value - Input value of unknown type. + * + * @returns True if the value is valid id, false otherwise. + */ + function isId(value) { + return typeof value === "string" || typeof value === "number"; + } + + /* eslint @typescript-eslint/member-ordering: ["error", { "classes": ["field", "constructor", "method"] }] */ + + /** + * A queue. + * + * @typeParam T - The type of method names to be replaced by queued versions. + */ + var Queue = + /*#__PURE__*/ + function () { + /** + * Construct a new Queue. + * + * @param options - Queue configuration. + */ + function Queue(options) { + classCallCheck(this, Queue); + + this._queue = []; + this._timeout = null; + this._extended = null; // options + + this.delay = null; + this.max = Infinity; + this.setOptions(options); + } + /** + * Update the configuration of the queue. + * + * @param options - Queue configuration. + */ + + + createClass(Queue, [{ + key: "setOptions", + value: function setOptions(options) { + if (options && typeof options.delay !== "undefined") { + this.delay = options.delay; + } + + if (options && typeof options.max !== "undefined") { + this.max = options.max; + } + + this._flushIfNeeded(); + } + /** + * Extend an object with queuing functionality. + * The object will be extended with a function flush, and the methods provided in options.replace will be replaced with queued ones. + * + * @param object - The object to be extended. + * @param options - Additional options. + * + * @returns The created queue. + */ + + }, { + key: "destroy", + + /** + * Destroy the queue. The queue will first flush all queued actions, and in case it has extended an object, will restore the original object. + */ + value: function destroy() { + this.flush(); + + if (this._extended) { + var object = this._extended.object; + var methods = this._extended.methods; + + for (var i = 0; i < methods.length; i++) { + var method = methods[i]; + + if (method.original) { + // @TODO: better solution? + object[method.name] = method.original; + } else { + // @TODO: better solution? + delete object[method.name]; + } + } + + this._extended = null; + } + } + /** + * Replace a method on an object with a queued version. + * + * @param object - Object having the method. + * @param method - The method name. + */ + + }, { + key: "replace", + value: function replace(object, method) { + var me = this; + var original = object[method]; + + if (!original) { + throw new Error("Method " + method + " undefined"); + } + + object[method] = function () { + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + // add this call to the queue + me.queue({ + args: args, + fn: original, + context: this + }); + }; + } + /** + * Queue a call. + * + * @param entry - The function or entry to be queued. + */ + + }, { + key: "queue", + value: function queue(entry) { + if (typeof entry === "function") { + this._queue.push({ + fn: entry + }); + } else { + this._queue.push(entry); + } + + this._flushIfNeeded(); + } + /** + * Check whether the queue needs to be flushed. + */ + + }, { + key: "_flushIfNeeded", + value: function _flushIfNeeded() { + var _this = this; + + // flush when the maximum is exceeded. + if (this._queue.length > this.max) { + this.flush(); + } // flush after a period of inactivity when a delay is configured + + + if (this._timeout != null) { + clearTimeout(this._timeout); + this._timeout = null; + } + + if (this.queue.length > 0 && typeof this.delay === "number") { + this._timeout = setTimeout(function () { + _this.flush(); + }, this.delay); + } + } + /** + * Flush all queued calls + */ + + }, { + key: "flush", + value: function flush() { + this._queue.splice(0).forEach(function (entry) { + entry.fn.apply(entry.context || entry.fn, entry.args || []); + }); + } + }], [{ + key: "extend", + value: function extend(object, options) { + var queue = new Queue(options); + + if (object.flush !== undefined) { + throw new Error("Target object already has a property flush"); + } + + object.flush = function () { + queue.flush(); + }; + + var methods = [{ + name: "flush", + original: undefined + }]; + + if (options && options.replace) { + for (var i = 0; i < options.replace.length; i++) { + var name = options.replace[i]; + methods.push({ + name: name, + // @TODO: better solution? + original: object[name] + }); // @TODO: better solution? + + queue.replace(object, name); + } + } + + queue._extended = { + object: object, + methods: methods + }; + return queue; + } + }]); + + return Queue; + }(); + + /* eslint-disable @typescript-eslint/member-ordering */ + + /** + * [[DataSet]] code that can be reused in [[DataView]] or other similar implementations of [[DataInterface]]. + * + * @typeParam Item - Item type that may or may not have an id. + * @typeParam IdProp - Name of the property that contains the id. + */ + var DataSetPart = + /*#__PURE__*/ + function () { + function DataSetPart() { + classCallCheck(this, DataSetPart); + + this._subscribers = { + "*": [], + add: [], + remove: [], + update: [] + }; + /** + * @deprecated Use on instead (PS: DataView.subscribe === DataView.on). + */ + + this.subscribe = DataSetPart.prototype.on; + /** + * @deprecated Use off instead (PS: DataView.unsubscribe === DataView.off). + */ + + this.unsubscribe = DataSetPart.prototype.off; + } + /** + * Trigger an event + * + * @param event - Event name. + * @param payload - Event payload. + * @param senderId - Id of the sender. + */ + + + createClass(DataSetPart, [{ + key: "_trigger", + value: function _trigger(event, payload, senderId) { + if (event === "*") { + throw new Error("Cannot trigger event *"); + } + + [].concat(toConsumableArray(this._subscribers[event]), toConsumableArray(this._subscribers["*"])).forEach(function (subscriber) { + subscriber(event, payload, senderId != null ? senderId : null); + }); + } + /** + * Subscribe to an event, add an event listener. + * + * @remarks Non-function callbacks are ignored. + * + * @param event - Event name. + * @param callback - Callback method. + */ + + }, { + key: "on", + value: function on(event, callback) { + if (typeof callback === "function") { + this._subscribers[event].push(callback); + } // @TODO: Maybe throw for invalid callbacks? + + } + /** + * Unsubscribe from an event, remove an event listener. + * + * @remarks If the same callback was subscribed more than once **all** occurences will be removed. + * + * @param event - Event name. + * @param callback - Callback method. + */ + + }, { + key: "off", + value: function off(event, callback) { + this._subscribers[event] = this._subscribers[event].filter(function (subscriber) { + return subscriber !== callback; + }); + } + }]); + + return DataSetPart; + }(); + + function _arrayWithHoles(arr) { + if (Array.isArray(arr)) return arr; + } + + var arrayWithHoles = _arrayWithHoles; + + function _iterableToArrayLimit(arr, i) { + var _arr = []; + var _n = true; + var _d = false; + var _e = undefined; + + try { + for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { + _arr.push(_s.value); + + if (i && _arr.length === i) break; + } + } catch (err) { + _d = true; + _e = err; + } finally { + try { + if (!_n && _i["return"] != null) _i["return"](); + } finally { + if (_d) throw _e; + } + } + + return _arr; + } + + var iterableToArrayLimit = _iterableToArrayLimit; + + function _nonIterableRest() { + throw new TypeError("Invalid attempt to destructure non-iterable instance"); + } + + var nonIterableRest = _nonIterableRest; + + function _slicedToArray(arr, i) { + return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || nonIterableRest(); + } + + var slicedToArray = _slicedToArray; + + /** + * Data stream + * + * @remarks + * [[DataStream]] offers an always up to date stream of items from a [[DataSet]] or [[DataView]]. + * That means that the stream is evaluated at the time of iteration, conversion to another data type or when [[cache]] is called, not when the [[DataStream]] was created. + * Multiple invocations of for example [[toItemArray]] may yield different results (if the data source like for example [[DataSet]] gets modified). + * + * @typeparam Item - The item type this stream is going to work with. + */ + var DataStream = + /*#__PURE__*/ + function () { + /** + * Create a new data stream. + * + * @param _pairs - The id, item pairs. + */ + function DataStream(_pairs) { + classCallCheck(this, DataStream); + + this._pairs = _pairs; + } + /** + * Return an iterable of key, value pairs for every entry in the stream. + */ + + + createClass(DataStream, [{ + key: Symbol.iterator, + value: + /*#__PURE__*/ + regenerator.mark(function value() { + var _iteratorNormalCompletion, _didIteratorError, _iteratorError, _iterator, _step, _step$value, id, item; + + return regenerator.wrap(function value$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + _iteratorNormalCompletion = true; + _didIteratorError = false; + _iteratorError = undefined; + _context.prev = 3; + _iterator = this._pairs[Symbol.iterator](); + + case 5: + if (_iteratorNormalCompletion = (_step = _iterator.next()).done) { + _context.next = 12; + break; + } + + _step$value = slicedToArray(_step.value, 2), id = _step$value[0], item = _step$value[1]; + _context.next = 9; + return [id, item]; + + case 9: + _iteratorNormalCompletion = true; + _context.next = 5; + break; + + case 12: + _context.next = 18; + break; + + case 14: + _context.prev = 14; + _context.t0 = _context["catch"](3); + _didIteratorError = true; + _iteratorError = _context.t0; + + case 18: + _context.prev = 18; + _context.prev = 19; + + if (!_iteratorNormalCompletion && _iterator.return != null) { + _iterator.return(); + } + + case 21: + _context.prev = 21; + + if (!_didIteratorError) { + _context.next = 24; + break; + } + + throw _iteratorError; + + case 24: + return _context.finish(21); + + case 25: + return _context.finish(18); + + case 26: + case "end": + return _context.stop(); + } + } + }, value, this, [[3, 14, 18, 26], [19,, 21, 25]]); + }) + /** + * Return an iterable of key, value pairs for every entry in the stream. + */ + + }, { + key: "entries", + value: + /*#__PURE__*/ + regenerator.mark(function entries() { + var _iteratorNormalCompletion2, _didIteratorError2, _iteratorError2, _iterator2, _step2, _step2$value, id, item; + + return regenerator.wrap(function entries$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + _iteratorNormalCompletion2 = true; + _didIteratorError2 = false; + _iteratorError2 = undefined; + _context2.prev = 3; + _iterator2 = this._pairs[Symbol.iterator](); + + case 5: + if (_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done) { + _context2.next = 12; + break; + } + + _step2$value = slicedToArray(_step2.value, 2), id = _step2$value[0], item = _step2$value[1]; + _context2.next = 9; + return [id, item]; + + case 9: + _iteratorNormalCompletion2 = true; + _context2.next = 5; + break; + + case 12: + _context2.next = 18; + break; + + case 14: + _context2.prev = 14; + _context2.t0 = _context2["catch"](3); + _didIteratorError2 = true; + _iteratorError2 = _context2.t0; + + case 18: + _context2.prev = 18; + _context2.prev = 19; + + if (!_iteratorNormalCompletion2 && _iterator2.return != null) { + _iterator2.return(); + } + + case 21: + _context2.prev = 21; + + if (!_didIteratorError2) { + _context2.next = 24; + break; + } + + throw _iteratorError2; + + case 24: + return _context2.finish(21); + + case 25: + return _context2.finish(18); + + case 26: + case "end": + return _context2.stop(); + } + } + }, entries, this, [[3, 14, 18, 26], [19,, 21, 25]]); + }) + /** + * Return an iterable of keys in the stream. + */ + + }, { + key: "keys", + value: + /*#__PURE__*/ + regenerator.mark(function keys() { + var _iteratorNormalCompletion3, _didIteratorError3, _iteratorError3, _iterator3, _step3, _step3$value, id; + + return regenerator.wrap(function keys$(_context3) { + while (1) { + switch (_context3.prev = _context3.next) { + case 0: + _iteratorNormalCompletion3 = true; + _didIteratorError3 = false; + _iteratorError3 = undefined; + _context3.prev = 3; + _iterator3 = this._pairs[Symbol.iterator](); + + case 5: + if (_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done) { + _context3.next = 12; + break; + } + + _step3$value = slicedToArray(_step3.value, 1), id = _step3$value[0]; + _context3.next = 9; + return id; + + case 9: + _iteratorNormalCompletion3 = true; + _context3.next = 5; + break; + + case 12: + _context3.next = 18; + break; + + case 14: + _context3.prev = 14; + _context3.t0 = _context3["catch"](3); + _didIteratorError3 = true; + _iteratorError3 = _context3.t0; + + case 18: + _context3.prev = 18; + _context3.prev = 19; + + if (!_iteratorNormalCompletion3 && _iterator3.return != null) { + _iterator3.return(); + } + + case 21: + _context3.prev = 21; + + if (!_didIteratorError3) { + _context3.next = 24; + break; + } + + throw _iteratorError3; + + case 24: + return _context3.finish(21); + + case 25: + return _context3.finish(18); + + case 26: + case "end": + return _context3.stop(); + } + } + }, keys, this, [[3, 14, 18, 26], [19,, 21, 25]]); + }) + /** + * Return an iterable of values in the stream. + */ + + }, { + key: "values", + value: + /*#__PURE__*/ + regenerator.mark(function values() { + var _iteratorNormalCompletion4, _didIteratorError4, _iteratorError4, _iterator4, _step4, _step4$value, item; + + return regenerator.wrap(function values$(_context4) { + while (1) { + switch (_context4.prev = _context4.next) { + case 0: + _iteratorNormalCompletion4 = true; + _didIteratorError4 = false; + _iteratorError4 = undefined; + _context4.prev = 3; + _iterator4 = this._pairs[Symbol.iterator](); + + case 5: + if (_iteratorNormalCompletion4 = (_step4 = _iterator4.next()).done) { + _context4.next = 12; + break; + } + + _step4$value = slicedToArray(_step4.value, 2), item = _step4$value[1]; + _context4.next = 9; + return item; + + case 9: + _iteratorNormalCompletion4 = true; + _context4.next = 5; + break; + + case 12: + _context4.next = 18; + break; + + case 14: + _context4.prev = 14; + _context4.t0 = _context4["catch"](3); + _didIteratorError4 = true; + _iteratorError4 = _context4.t0; + + case 18: + _context4.prev = 18; + _context4.prev = 19; + + if (!_iteratorNormalCompletion4 && _iterator4.return != null) { + _iterator4.return(); + } + + case 21: + _context4.prev = 21; + + if (!_didIteratorError4) { + _context4.next = 24; + break; + } + + throw _iteratorError4; + + case 24: + return _context4.finish(21); + + case 25: + return _context4.finish(18); + + case 26: + case "end": + return _context4.stop(); + } + } + }, values, this, [[3, 14, 18, 26], [19,, 21, 25]]); + }) + /** + * Return an array containing all the ids in this stream. + * + * @remarks + * The array may contain duplicities. + * + * @returns The array with all ids from this stream. + */ + + }, { + key: "toIdArray", + value: function toIdArray() { + return toConsumableArray(this._pairs).map(function (pair) { + return pair[0]; + }); + } + /** + * Return an array containing all the items in this stream. + * + * @remarks + * The array may contain duplicities. + * + * @returns The array with all items from this stream. + */ + + }, { + key: "toItemArray", + value: function toItemArray() { + return toConsumableArray(this._pairs).map(function (pair) { + return pair[1]; + }); + } + /** + * Return an array containing all the entries in this stream. + * + * @remarks + * The array may contain duplicities. + * + * @returns The array with all entries from this stream. + */ + + }, { + key: "toEntryArray", + value: function toEntryArray() { + return toConsumableArray(this._pairs); + } + /** + * Return an object map containing all the items in this stream accessible by ids. + * + * @remarks + * In case of duplicate ids (coerced to string so `7 == '7'`) the last encoutered appears in the returned object. + * + * @returns The object map of all id → item pairs from this stream. + */ + + }, { + key: "toObjectMap", + value: function toObjectMap() { + var map = Object.create(null); + var _iteratorNormalCompletion5 = true; + var _didIteratorError5 = false; + var _iteratorError5 = undefined; + + try { + for (var _iterator5 = this._pairs[Symbol.iterator](), _step5; !(_iteratorNormalCompletion5 = (_step5 = _iterator5.next()).done); _iteratorNormalCompletion5 = true) { + var _step5$value = slicedToArray(_step5.value, 2), + id = _step5$value[0], + item = _step5$value[1]; + + map[id] = item; + } + } catch (err) { + _didIteratorError5 = true; + _iteratorError5 = err; + } finally { + try { + if (!_iteratorNormalCompletion5 && _iterator5.return != null) { + _iterator5.return(); + } + } finally { + if (_didIteratorError5) { + throw _iteratorError5; + } + } + } + + return map; + } + /** + * Return a map containing all the items in this stream accessible by ids. + * + * @returns The map of all id → item pairs from this stream. + */ + + }, { + key: "toMap", + value: function toMap() { + return new Map(this._pairs); + } + /** + * Return a set containing all the (unique) ids in this stream. + * + * @returns The set of all ids from this stream. + */ + + }, { + key: "toIdSet", + value: function toIdSet() { + return new Set(this.toIdArray()); + } + /** + * Return a set containing all the (unique) items in this stream. + * + * @returns The set of all items from this stream. + */ + + }, { + key: "toItemSet", + value: function toItemSet() { + return new Set(this.toItemArray()); + } + /** + * Cache the items from this stream. + * + * @remarks + * This method allows for items to be fetched immediatelly and used (possibly multiple times) later. + * It can also be used to optimize performance as [[DataStream]] would otherwise reevaluate everything upon each iteration. + * + * ## Example + * ```javascript + * const ds = new DataSet([…]) + * + * const cachedStream = ds.stream() + * .filter(…) + * .sort(…) + * .map(…) + * .cached(…) // Data are fetched, processed and cached here. + * + * ds.clear() + * chachedStream // Still has all the items. + * ``` + * + * @returns A new [[DataStream]] with cached items (detached from the original [[DataSet]]). + */ + + }, { + key: "cache", + value: function cache() { + return new DataStream(toConsumableArray(this._pairs)); + } + /** + * Get the distinct values of given property. + * + * @param callback - The function that picks and possibly converts the property. + * + * @typeparam T - The type of the distinct value. + * + * @returns A set of all distinct properties. + */ + + }, { + key: "distinct", + value: function distinct(callback) { + var set = new Set(); + var _iteratorNormalCompletion6 = true; + var _didIteratorError6 = false; + var _iteratorError6 = undefined; + + try { + for (var _iterator6 = this._pairs[Symbol.iterator](), _step6; !(_iteratorNormalCompletion6 = (_step6 = _iterator6.next()).done); _iteratorNormalCompletion6 = true) { + var _step6$value = slicedToArray(_step6.value, 2), + id = _step6$value[0], + item = _step6$value[1]; + + set.add(callback(item, id)); + } + } catch (err) { + _didIteratorError6 = true; + _iteratorError6 = err; + } finally { + try { + if (!_iteratorNormalCompletion6 && _iterator6.return != null) { + _iterator6.return(); + } + } finally { + if (_didIteratorError6) { + throw _iteratorError6; + } + } + } + + return set; + } + /** + * Filter the items of the stream. + * + * @param callback - The function that decides whether an item will be included. + * + * @returns A new data stream with the filtered items. + */ + + }, { + key: "filter", + value: function filter(callback) { + var pairs = this._pairs; + return new DataStream(defineProperty({}, Symbol.iterator, + /*#__PURE__*/ + regenerator.mark(function _callee() { + var _iteratorNormalCompletion7, _didIteratorError7, _iteratorError7, _iterator7, _step7, _step7$value, id, item; + + return regenerator.wrap(function _callee$(_context5) { + while (1) { + switch (_context5.prev = _context5.next) { + case 0: + _iteratorNormalCompletion7 = true; + _didIteratorError7 = false; + _iteratorError7 = undefined; + _context5.prev = 3; + _iterator7 = pairs[Symbol.iterator](); + + case 5: + if (_iteratorNormalCompletion7 = (_step7 = _iterator7.next()).done) { + _context5.next = 13; + break; + } + + _step7$value = slicedToArray(_step7.value, 2), id = _step7$value[0], item = _step7$value[1]; + + if (!callback(item, id)) { + _context5.next = 10; + break; + } + + _context5.next = 10; + return [id, item]; + + case 10: + _iteratorNormalCompletion7 = true; + _context5.next = 5; + break; + + case 13: + _context5.next = 19; + break; + + case 15: + _context5.prev = 15; + _context5.t0 = _context5["catch"](3); + _didIteratorError7 = true; + _iteratorError7 = _context5.t0; + + case 19: + _context5.prev = 19; + _context5.prev = 20; + + if (!_iteratorNormalCompletion7 && _iterator7.return != null) { + _iterator7.return(); + } + + case 22: + _context5.prev = 22; + + if (!_didIteratorError7) { + _context5.next = 25; + break; + } + + throw _iteratorError7; + + case 25: + return _context5.finish(22); + + case 26: + return _context5.finish(19); + + case 27: + case "end": + return _context5.stop(); + } + } + }, _callee, null, [[3, 15, 19, 27], [20,, 22, 26]]); + }))); + } + /** + * Execute a callback for each item of the stream. + * + * @param callback - The function that will be invoked for each item. + */ + + }, { + key: "forEach", + value: function forEach(callback) { + var _iteratorNormalCompletion8 = true; + var _didIteratorError8 = false; + var _iteratorError8 = undefined; + + try { + for (var _iterator8 = this._pairs[Symbol.iterator](), _step8; !(_iteratorNormalCompletion8 = (_step8 = _iterator8.next()).done); _iteratorNormalCompletion8 = true) { + var _step8$value = slicedToArray(_step8.value, 2), + id = _step8$value[0], + item = _step8$value[1]; + + callback(item, id); + } + } catch (err) { + _didIteratorError8 = true; + _iteratorError8 = err; + } finally { + try { + if (!_iteratorNormalCompletion8 && _iterator8.return != null) { + _iterator8.return(); + } + } finally { + if (_didIteratorError8) { + throw _iteratorError8; + } + } + } + } + /** + * Map the items into a different type. + * + * @param callback - The function that does the conversion. + * + * @typeparam Mapped - The type of the item after mapping. + * + * @returns A new data stream with the mapped items. + */ + + }, { + key: "map", + value: function map(callback) { + var pairs = this._pairs; + return new DataStream(defineProperty({}, Symbol.iterator, + /*#__PURE__*/ + regenerator.mark(function _callee2() { + var _iteratorNormalCompletion9, _didIteratorError9, _iteratorError9, _iterator9, _step9, _step9$value, id, item; + + return regenerator.wrap(function _callee2$(_context6) { + while (1) { + switch (_context6.prev = _context6.next) { + case 0: + _iteratorNormalCompletion9 = true; + _didIteratorError9 = false; + _iteratorError9 = undefined; + _context6.prev = 3; + _iterator9 = pairs[Symbol.iterator](); + + case 5: + if (_iteratorNormalCompletion9 = (_step9 = _iterator9.next()).done) { + _context6.next = 12; + break; + } + + _step9$value = slicedToArray(_step9.value, 2), id = _step9$value[0], item = _step9$value[1]; + _context6.next = 9; + return [id, callback(item, id)]; + + case 9: + _iteratorNormalCompletion9 = true; + _context6.next = 5; + break; + + case 12: + _context6.next = 18; + break; + + case 14: + _context6.prev = 14; + _context6.t0 = _context6["catch"](3); + _didIteratorError9 = true; + _iteratorError9 = _context6.t0; + + case 18: + _context6.prev = 18; + _context6.prev = 19; + + if (!_iteratorNormalCompletion9 && _iterator9.return != null) { + _iterator9.return(); + } + + case 21: + _context6.prev = 21; + + if (!_didIteratorError9) { + _context6.next = 24; + break; + } + + throw _iteratorError9; + + case 24: + return _context6.finish(21); + + case 25: + return _context6.finish(18); + + case 26: + case "end": + return _context6.stop(); + } + } + }, _callee2, null, [[3, 14, 18, 26], [19,, 21, 25]]); + }))); + } + /** + * Get the item with the maximum value of given property. + * + * @param callback - The function that picks and possibly converts the property. + * + * @returns The item with the maximum if found otherwise null. + */ + + }, { + key: "max", + value: function max(callback) { + var iter = this._pairs[Symbol.iterator](); + + var curr = iter.next(); + + if (curr.done) { + return null; + } + + var maxItem = curr.value[1]; + var maxValue = callback(curr.value[1], curr.value[0]); + + while (!(curr = iter.next()).done) { + var _curr$value = slicedToArray(curr.value, 2), + id = _curr$value[0], + item = _curr$value[1]; + + var _value = callback(item, id); + + if (_value > maxValue) { + maxValue = _value; + maxItem = item; + } + } + + return maxItem; + } + /** + * Get the item with the minimum value of given property. + * + * @param callback - The function that picks and possibly converts the property. + * + * @returns The item with the minimum if found otherwise null. + */ + + }, { + key: "min", + value: function min(callback) { + var iter = this._pairs[Symbol.iterator](); + + var curr = iter.next(); + + if (curr.done) { + return null; + } + + var minItem = curr.value[1]; + var minValue = callback(curr.value[1], curr.value[0]); + + while (!(curr = iter.next()).done) { + var _curr$value2 = slicedToArray(curr.value, 2), + id = _curr$value2[0], + item = _curr$value2[1]; + + var _value2 = callback(item, id); + + if (_value2 < minValue) { + minValue = _value2; + minItem = item; + } + } + + return minItem; + } + /** + * Reduce the items into a single value. + * + * @param callback - The function that does the reduction. + * @param accumulator - The initial value of the accumulator. + * + * @typeparam T - The type of the accumulated value. + * + * @returns The reduced value. + */ + + }, { + key: "reduce", + value: function reduce(callback, accumulator) { + var _iteratorNormalCompletion10 = true; + var _didIteratorError10 = false; + var _iteratorError10 = undefined; + + try { + for (var _iterator10 = this._pairs[Symbol.iterator](), _step10; !(_iteratorNormalCompletion10 = (_step10 = _iterator10.next()).done); _iteratorNormalCompletion10 = true) { + var _step10$value = slicedToArray(_step10.value, 2), + id = _step10$value[0], + item = _step10$value[1]; + + accumulator = callback(accumulator, item, id); + } + } catch (err) { + _didIteratorError10 = true; + _iteratorError10 = err; + } finally { + try { + if (!_iteratorNormalCompletion10 && _iterator10.return != null) { + _iterator10.return(); + } + } finally { + if (_didIteratorError10) { + throw _iteratorError10; + } + } + } + + return accumulator; + } + /** + * Sort the items. + * + * @param callback - Item comparator. + * + * @returns A new stream with sorted items. + */ + + }, { + key: "sort", + value: function sort(callback) { + var _this = this; + + return new DataStream(defineProperty({}, Symbol.iterator, function () { + return toConsumableArray(_this._pairs).sort(function (_ref3, _ref4) { + var _ref5 = slicedToArray(_ref3, 2), + idA = _ref5[0], + itemA = _ref5[1]; + + var _ref6 = slicedToArray(_ref4, 2), + idB = _ref6[0], + itemB = _ref6[1]; + + return callback(itemA, itemB, idA, idB); + })[Symbol.iterator](); + })); + } + }]); + + return DataStream; + }(); + + function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { keys.push.apply(keys, Object.getOwnPropertySymbols(object)); } if (enumerableOnly) keys = keys.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); return keys; } + + function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } + /** + * # DataSet + * + * Vis.js comes with a flexible DataSet, which can be used to hold and manipulate unstructured data and listen for changes in the data. The DataSet is key/value based. Data items can be added, updated and removed from the DataSet, and one can subscribe to changes in the DataSet. The data in the DataSet can be filtered and ordered, and fields (like dates) can be converted to a specific type. Data can be normalized when appending it to the DataSet as well. + * + * ## Example + * + * The following example shows how to use a DataSet. + * + * ```javascript + * // create a DataSet + * var options = {}; + * var data = new vis.DataSet(options); + * + * // add items + * // note that the data items can contain different properties and data formats + * data.add([ + * {id: 1, text: 'item 1', date: new Date(2013, 6, 20), group: 1, first: true}, + * {id: 2, text: 'item 2', date: '2013-06-23', group: 2}, + * {id: 3, text: 'item 3', date: '2013-06-25', group: 2}, + * {id: 4, text: 'item 4'} + * ]); + * + * // subscribe to any change in the DataSet + * data.on('*', function (event, properties, senderId) { + * console.log('event', event, properties); + * }); + * + * // update an existing item + * data.update({id: 2, group: 1}); + * + * // remove an item + * data.remove(4); + * + * // get all ids + * var ids = data.getIds(); + * console.log('ids', ids); + * + * // get a specific item + * var item1 = data.get(1); + * console.log('item1', item1); + * + * // retrieve a filtered subset of the data + * var items = data.get({ + * filter: function (item) { + * return item.group == 1; + * } + * }); + * console.log('filtered items', items); + * + * // retrieve formatted items + * var items = data.get({ + * fields: ['id', 'date'], + * type: { + * date: 'ISODate' + * } + * }); + * console.log('formatted items', items); + * ``` + * + * @typeParam Item - Item type that may or may not have an id. + * @typeParam IdProp - Name of the property that contains the id. + */ + + var DataSet = + /*#__PURE__*/ + function (_DataSetPart) { + inherits(DataSet, _DataSetPart); + + /** + * Construct a new DataSet. + * + * @param data - Initial data or options. + * @param options - Options (type error if data is also options). + */ + function DataSet(data, options) { + var _this; + + classCallCheck(this, DataSet); + + _this = possibleConstructorReturn(this, getPrototypeOf(DataSet).call(this)); // correctly read optional arguments + + if (data && !Array.isArray(data)) { + options = data; + data = []; + } + + _this._options = options || {}; + _this._data = new Map(); // map with data indexed by id + + _this.length = 0; // number of items in the DataSet + + _this._idProp = _this._options.fieldId || "id"; // name of the field containing id + + _this._type = {}; // internal field types (NOTE: this can differ from this._options.type) + // all variants of a Date are internally stored as Date, so we can convert + // from everything to everything (also from ISODate to Number for example) + + if (_this._options.type) { + var fields = Object.keys(_this._options.type); + + for (var i = 0, len = fields.length; i < len; i++) { + var field = fields[i]; + var value = _this._options.type[field]; + + if (value == "Date" || value == "ISODate" || value == "ASPDate") { + _this._type[field] = "Date"; + } else { + _this._type[field] = value; + } + } + } // add initial data when provided + + + if (data && data.length) { + _this.add(data); + } + + _this.setOptions(options); + + return _this; + } + /** + * Set new options. + * + * @param options - The new options. + */ + + + createClass(DataSet, [{ + key: "setOptions", + value: function setOptions(options) { + if (options && options.queue !== undefined) { + if (options.queue === false) { + // delete queue if loaded + if (this._queue) { + this._queue.destroy(); + + delete this._queue; + } + } else { + // create queue and update its options + if (!this._queue) { + this._queue = Queue.extend(this, { + replace: ["add", "update", "remove"] + }); + } + + if (options.queue && _typeof_1(options.queue) === "object") { + this._queue.setOptions(options.queue); + } + } + } + } + /** + * Add a data item or an array with items. + * + * After the items are added to the DataSet, the DataSet will trigger an event `add`. When a `senderId` is provided, this id will be passed with the triggered event to all subscribers. + * + * ## Example + * + * ```javascript + * // create a DataSet + * const data = new vis.DataSet() + * + * // add items + * const ids = data.add([ + * { id: 1, text: 'item 1' }, + * { id: 2, text: 'item 2' }, + * { text: 'item without an id' } + * ]) + * + * console.log(ids) // [1, 2, ''] + * ``` + * + * @param data - Items to be added (ids will be generated if missing). + * @param senderId - Sender id. + * + * @returns addedIds - Array with the ids (generated if not present) of the added items. + * + * @throws When an item with the same id as any of the added items already exists. + */ + + }, { + key: "add", + value: function add(data, senderId) { + var addedIds = []; + var id; + + if (Array.isArray(data)) { + // Array + for (var i = 0, len = data.length; i < len; i++) { + id = this._addItem(data[i]); + addedIds.push(id); + } + } else if (data && _typeof_1(data) === "object") { + // Single item + id = this._addItem(data); + addedIds.push(id); + } else { + throw new Error("Unknown dataType"); + } + + if (addedIds.length) { + this._trigger("add", { + items: addedIds + }, senderId); + } + + return addedIds; + } + /** + * Update existing items. When an item does not exist, it will be created. + * + * @remarks + * The provided properties will be merged in the existing item. When an item does not exist, it will be created. + * + * After the items are updated, the DataSet will trigger an event `add` for the added items, and an event `update`. When a `senderId` is provided, this id will be passed with the triggered event to all subscribers. + * + * ## Example + * + * ```javascript + * // create a DataSet + * const data = new vis.DataSet([ + * { id: 1, text: 'item 1' }, + * { id: 2, text: 'item 2' }, + * { id: 3, text: 'item 3' } + * ]) + * + * // update items + * const ids = data.update([ + * { id: 2, text: 'item 2 (updated)' }, + * { id: 4, text: 'item 4 (new)' } + * ]) + * + * console.log(ids) // [2, 4] + * ``` + * + * ## Warning for TypeScript users + * This method may introduce partial items into the data set. Use add or updateOnly instead for better type safety. + * + * @param data - Items to be updated (if the id is already present) or added (if the id is missing). + * @param senderId - Sender id. + * + * @returns updatedIds - The ids of the added (these may be newly generated if there was no id in the item from the data) or updated items. + * + * @throws When the supplied data is neither an item nor an array of items. + */ + + }, { + key: "update", + value: function update(data, senderId) { + var _this2 = this; + + var addedIds = []; + var updatedIds = []; + var oldData = []; + var updatedData = []; + var idProp = this._idProp; + + var addOrUpdate = function addOrUpdate(item) { + var origId = item[idProp]; + + if (origId != null && _this2._data.has(origId)) { + var fullItem = item; // it has an id, therefore it is a fullitem + + var oldItem = Object.assign({}, _this2._data.get(origId)); // update item + + var id = _this2._updateItem(fullItem); + + updatedIds.push(id); + updatedData.push(fullItem); + oldData.push(oldItem); + } else { + // add new item + var _id = _this2._addItem(item); + + addedIds.push(_id); + } + }; + + if (Array.isArray(data)) { + // Array + for (var i = 0, len = data.length; i < len; i++) { + if (data[i] && _typeof_1(data[i]) === "object") { + addOrUpdate(data[i]); + } else { + console.warn("Ignoring input item, which is not an object at index " + i); + } + } + } else if (data && _typeof_1(data) === "object") { + // Single item + addOrUpdate(data); + } else { + throw new Error("Unknown dataType"); + } + + if (addedIds.length) { + this._trigger("add", { + items: addedIds + }, senderId); + } + + if (updatedIds.length) { + var props = { + items: updatedIds, + oldData: oldData, + data: updatedData + }; // TODO: remove deprecated property 'data' some day + //Object.defineProperty(props, 'data', { + // 'get': (function() { + // console.warn('Property data is deprecated. Use DataSet.get(ids) to retrieve the new data, use the oldData property on this object to get the old data'); + // return updatedData; + // }).bind(this) + //}); + + this._trigger("update", props, senderId); + } + + return addedIds.concat(updatedIds); + } + /** + * Update existing items. When an item does not exist, an error will be thrown. + * + * @remarks + * The provided properties will be deeply merged into the existing item. + * When an item does not exist (id not present in the data set or absent), an error will be thrown and nothing will be changed. + * + * After the items are updated, the DataSet will trigger an event `update`. + * When a `senderId` is provided, this id will be passed with the triggered event to all subscribers. + * + * ## Example + * + * ```javascript + * // create a DataSet + * const data = new vis.DataSet([ + * { id: 1, text: 'item 1' }, + * { id: 2, text: 'item 2' }, + * { id: 3, text: 'item 3' }, + * ]) + * + * // update items + * const ids = data.update([ + * { id: 2, text: 'item 2 (updated)' }, // works + * // { id: 4, text: 'item 4 (new)' }, // would throw + * // { text: 'item 4 (new)' }, // would also throw + * ]) + * + * console.log(ids) // [2] + * ``` + * + * @param data - Updates (the id and optionally other props) to the items in this data set. + * @param senderId - Sender id. + * + * @returns updatedIds - The ids of the updated items. + * + * @throws When the supplied data is neither an item nor an array of items, when the ids are missing. + */ + + }, { + key: "updateOnly", + value: function updateOnly(data, senderId) { + var _this3 = this; + + if (!Array.isArray(data)) { + data = [data]; + } + + var updateEventData = data.map(function (update) { + var oldData = _this3._data.get(update[_this3._idProp]); + + if (oldData == null) { + throw new Error("Updating non-existent items is not allowed."); + } + + return { + oldData: oldData, + update: update + }; + }).map(function (_ref) { + var oldData = _ref.oldData, + update = _ref.update; + var id = oldData[_this3._idProp]; + var updatedData = deepExtend(deepExtend({}, oldData), update); + + _this3._data.set(id, updatedData); + + return { + id: id, + oldData: oldData, + updatedData: updatedData + }; + }); + + if (updateEventData.length) { + var props = { + items: updateEventData.map(function (value) { + return value.id; + }), + oldData: updateEventData.map(function (value) { + return value.oldData; + }), + data: updateEventData.map(function (value) { + return value.updatedData; + }) + }; // TODO: remove deprecated property 'data' some day + //Object.defineProperty(props, 'data', { + // 'get': (function() { + // console.warn('Property data is deprecated. Use DataSet.get(ids) to retrieve the new data, use the oldData property on this object to get the old data'); + // return updatedData; + // }).bind(this) + //}); + + this._trigger("update", props, senderId); + + return props.items; + } else { + return []; + } + } + /** @inheritdoc */ + + }, { + key: "get", + value: function get(first, second) { + // @TODO: Woudn't it be better to split this into multiple methods? + // parse the arguments + var id = undefined; + var ids = undefined; + var options = undefined; + + if (isId(first)) { + // get(id [, options]) + id = first; + options = second; + } else if (Array.isArray(first)) { + // get(ids [, options]) + ids = first; + options = second; + } else { + // get([, options]) + options = first; + } // determine the return type + + + var returnType = options && options.returnType === "Object" ? "Object" : "Array"; // @TODO: WTF is this? Or am I missing something? + // var returnType + // if (options && options.returnType) { + // var allowedValues = ['Array', 'Object'] + // returnType = + // allowedValues.indexOf(options.returnType) == -1 + // ? 'Array' + // : options.returnType + // } else { + // returnType = 'Array' + // } + // build options + + var type = options && options.type || this._options.type; + var filter = options && options.filter; + var items = []; + var item = null; + var itemIds = null; + var itemId = null; // convert items + + if (id != null) { + // return a single item + item = this._getItem(id, type); + + if (item && filter && !filter(item)) { + item = null; + } + } else if (ids != null) { + // return a subset of items + for (var i = 0, len = ids.length; i < len; i++) { + item = this._getItem(ids[i], type); + + if (item != null && (!filter || filter(item))) { + items.push(item); + } + } + } else { + // return all items + itemIds = toConsumableArray(this._data.keys()); + + for (var _i = 0, _len = itemIds.length; _i < _len; _i++) { + itemId = itemIds[_i]; + item = this._getItem(itemId, type); + + if (item != null && (!filter || filter(item))) { + items.push(item); + } + } + } // order the results + + + if (options && options.order && id == undefined) { + this._sort(items, options.order); + } // filter fields of the items + + + if (options && options.fields) { + var fields = options.fields; + + if (id != undefined && item != null) { + item = this._filterFields(item, fields); + } else { + for (var _i2 = 0, _len2 = items.length; _i2 < _len2; _i2++) { + items[_i2] = this._filterFields(items[_i2], fields); + } + } + } // return the results + + + if (returnType == "Object") { + var result = {}; + + for (var _i3 = 0, _len3 = items.length; _i3 < _len3; _i3++) { + var resultant = items[_i3]; // @TODO: Shoudn't this be this._fieldId? + // result[resultant.id] = resultant + + var _id2 = resultant[this._idProp]; + result[_id2] = resultant; + } + + return result; + } else { + if (id != null) { + // a single item + return item; + } else { + // just return our array + return items; + } + } + } + /** @inheritdoc */ + + }, { + key: "getIds", + value: function getIds(options) { + var data = this._data; + var filter = options && options.filter; + var order = options && options.order; + var type = options && options.type || this._options.type; + + var itemIds = toConsumableArray(data.keys()); + + var ids = []; + var item; + var items; + + if (filter) { + // get filtered items + if (order) { + // create ordered list + items = []; + + for (var i = 0, len = itemIds.length; i < len; i++) { + var id = itemIds[i]; + item = this._getItem(id, type); + + if (filter(item)) { + items.push(item); + } + } + + this._sort(items, order); + + for (var _i4 = 0, _len4 = items.length; _i4 < _len4; _i4++) { + ids.push(items[_i4][this._idProp]); + } + } else { + // create unordered list + for (var _i5 = 0, _len5 = itemIds.length; _i5 < _len5; _i5++) { + var _id3 = itemIds[_i5]; + item = this._getItem(_id3, type); + + if (filter(item)) { + ids.push(item[this._idProp]); + } + } + } + } else { + // get all items + if (order) { + // create an ordered list + items = []; + + for (var _i6 = 0, _len6 = itemIds.length; _i6 < _len6; _i6++) { + var _id4 = itemIds[_i6]; + items.push(data.get(_id4)); + } + + this._sort(items, order); + + for (var _i7 = 0, _len7 = items.length; _i7 < _len7; _i7++) { + ids.push(items[_i7][this._idProp]); + } + } else { + // create unordered list + for (var _i8 = 0, _len8 = itemIds.length; _i8 < _len8; _i8++) { + var _id5 = itemIds[_i8]; + item = data.get(_id5); + ids.push(item[this._idProp]); + } + } + } + + return ids; + } + /** @inheritdoc */ + + }, { + key: "getDataSet", + value: function getDataSet() { + return this; + } + /** @inheritdoc */ + + }, { + key: "forEach", + value: function forEach(callback, options) { + var filter = options && options.filter; + var type = options && options.type || this._options.type; + var data = this._data; + + var itemIds = toConsumableArray(data.keys()); + + if (options && options.order) { + // execute forEach on ordered list + var items = this.get(options); + + for (var i = 0, len = items.length; i < len; i++) { + var item = items[i]; + var id = item[this._idProp]; + callback(item, id); + } + } else { + // unordered + for (var _i9 = 0, _len9 = itemIds.length; _i9 < _len9; _i9++) { + var _id6 = itemIds[_i9]; + + var _item = this._getItem(_id6, type); + + if (!filter || filter(_item)) { + callback(_item, _id6); + } + } + } + } + /** @inheritdoc */ + + }, { + key: "map", + value: function map(callback, options) { + var filter = options && options.filter; + var type = options && options.type || this._options.type; + var mappedItems = []; + var data = this._data; + + var itemIds = toConsumableArray(data.keys()); // convert and filter items + + + for (var i = 0, len = itemIds.length; i < len; i++) { + var id = itemIds[i]; + + var item = this._getItem(id, type); + + if (!filter || filter(item)) { + mappedItems.push(callback(item, id)); + } + } // order items + + + if (options && options.order) { + this._sort(mappedItems, options.order); + } + + return mappedItems; + } + /** + * Filter the fields of an item. + * + * @param item - The item whose fields should be filtered. + * @param fields - The names of the fields that will be kept. + * + * @typeParam K - Field name type. + * + * @returns The item without any additional fields. + */ + + }, { + key: "_filterFields", + value: function _filterFields(item, fields) { + if (!item) { + // item is null + return item; + } + + return (Array.isArray(fields) ? // Use the supplied array + fields : // Use the keys of the supplied object + Object.keys(fields)).reduce(function (filteredItem, field) { + filteredItem[field] = item[field]; + return filteredItem; + }, {}); + } + /** + * Sort the provided array with items. + * + * @param items - Items to be sorted in place. + * @param order - A field name or custom sort function. + * + * @typeParam T - The type of the items in the items array. + */ + + }, { + key: "_sort", + value: function _sort(items, order) { + if (typeof order === "string") { + // order by provided field name + var name = order; // field name + + items.sort(function (a, b) { + // @TODO: How to treat missing properties? + var av = a[name]; + var bv = b[name]; + return av > bv ? 1 : av < bv ? -1 : 0; + }); + } else if (typeof order === "function") { + // order by sort function + items.sort(order); + } else { + // TODO: extend order by an Object {field:string, direction:string} + // where direction can be 'asc' or 'desc' + throw new TypeError("Order must be a function or a string"); + } + } + /** + * Remove an item or multiple items by “reference” (only the id is used) or by id. + * + * The method ignores removal of non-existing items, and returns an array containing the ids of the items which are actually removed from the DataSet. + * + * After the items are removed, the DataSet will trigger an event `remove` for the removed items. When a `senderId` is provided, this id will be passed with the triggered event to all subscribers. + * + * ## Example + * ```javascript + * // create a DataSet + * const data = new vis.DataSet([ + * { id: 1, text: 'item 1' }, + * { id: 2, text: 'item 2' }, + * { id: 3, text: 'item 3' } + * ]) + * + * // remove items + * const ids = data.remove([2, { id: 3 }, 4]) + * + * console.log(ids) // [2, 3] + * ``` + * + * @param id - One or more items or ids of items to be removed. + * @param senderId - Sender id. + * + * @returns The ids of the removed items. + */ + + }, { + key: "remove", + value: function remove(id, senderId) { + var removedIds = []; + var removedItems = []; // force everything to be an array for simplicity + + var ids = Array.isArray(id) ? id : [id]; + + for (var i = 0, len = ids.length; i < len; i++) { + var item = this._remove(ids[i]); + + if (item) { + var itemId = item[this._idProp]; + + if (itemId != null) { + removedIds.push(itemId); + removedItems.push(item); + } + } + } + + if (removedIds.length) { + this._trigger("remove", { + items: removedIds, + oldData: removedItems + }, senderId); + } + + return removedIds; + } + /** + * Remove an item by its id or reference. + * + * @param id - Id of an item or the item itself. + * + * @returns The removed item if removed, null otherwise. + */ + + }, { + key: "_remove", + value: function _remove(id) { + // @TODO: It origianlly returned the item although the docs say id. + // The code expects the item, so probably an error in the docs. + var ident; // confirm the id to use based on the args type + + if (isId(id)) { + ident = id; + } else if (id && _typeof_1(id) === "object") { + ident = id[this._idProp]; // look for the identifier field using ._idProp + } // do the removing if the item is found + + + if (ident != null && this._data.has(ident)) { + var item = this._data.get(ident) || null; + + this._data.delete(ident); + + --this.length; + return item; + } + + return null; + } + /** + * Clear the entire data set. + * + * After the items are removed, the [[DataSet]] will trigger an event `remove` for all removed items. When a `senderId` is provided, this id will be passed with the triggered event to all subscribers. + * + * @param senderId - Sender id. + * + * @returns removedIds - The ids of all removed items. + */ + + }, { + key: "clear", + value: function clear(senderId) { + var ids = toConsumableArray(this._data.keys()); + + var items = []; + + for (var i = 0, len = ids.length; i < len; i++) { + items.push(this._data.get(ids[i])); + } + + this._data.clear(); + + this.length = 0; + + this._trigger("remove", { + items: ids, + oldData: items + }, senderId); + + return ids; + } + /** + * Find the item with maximum value of a specified field. + * + * @param field - Name of the property that should be searched for max value. + * + * @returns Item containing max value, or null if no items. + */ + + }, { + key: "max", + value: function max(field) { + var max = null; + var maxField = null; + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = undefined; + + try { + for (var _iterator = this._data.values()[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var item = _step.value; + var itemField = item[field]; + + if (typeof itemField === "number" && (maxField == null || itemField > maxField)) { + max = item; + maxField = itemField; + } + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator.return != null) { + _iterator.return(); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } + } + + return max || null; + } + /** + * Find the item with minimum value of a specified field. + * + * @param field - Name of the property that should be searched for min value. + * + * @returns Item containing min value, or null if no items. + */ + + }, { + key: "min", + value: function min(field) { + var min = null; + var minField = null; + var _iteratorNormalCompletion2 = true; + var _didIteratorError2 = false; + var _iteratorError2 = undefined; + + try { + for (var _iterator2 = this._data.values()[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) { + var item = _step2.value; + var itemField = item[field]; + + if (typeof itemField === "number" && (minField == null || itemField < minField)) { + min = item; + minField = itemField; + } + } + } catch (err) { + _didIteratorError2 = true; + _iteratorError2 = err; + } finally { + try { + if (!_iteratorNormalCompletion2 && _iterator2.return != null) { + _iterator2.return(); + } + } finally { + if (_didIteratorError2) { + throw _iteratorError2; + } + } + } + + return min || null; + } + /** + * Find all distinct values of a specified field + * + * @param prop - The property name whose distinct values should be returned. + * + * @returns Unordered array containing all distinct values. Items without specified property are ignored. + */ + + }, { + key: "distinct", + value: function distinct(prop) { + var data = this._data; + + var itemIds = toConsumableArray(data.keys()); + + var values = []; + var fieldType = this._options.type && this._options.type[prop] || null; + var count = 0; + + for (var i = 0, len = itemIds.length; i < len; i++) { + var id = itemIds[i]; + var item = data.get(id); + var value = item[prop]; + var exists = false; + + for (var j = 0; j < count; j++) { + if (values[j] == value) { + exists = true; + break; + } + } + + if (!exists && value !== undefined) { + values[count] = value; + count++; + } + } + + if (fieldType) { + for (var _i10 = 0, _len10 = values.length; _i10 < _len10; _i10++) { + values[_i10] = convert(values[_i10], fieldType); + } + } + + return values; + } + /** + * Add a single item. Will fail when an item with the same id already exists. + * + * @param item - A new item to be added. + * + * @returns Added item's id. An id is generated when it is not present in the item. + */ + + }, { + key: "_addItem", + value: function _addItem(item) { + var id = item[this._idProp]; + + if (id != null) { + // check whether this id is already taken + if (this._data.has(id)) { + // item already exists + throw new Error("Cannot add item: item with id " + id + " already exists"); + } + } else { + // generate an id + id = uuid4(); + item[this._idProp] = id; + } + + var d = {}; + var fields = Object.keys(item); + + for (var i = 0, len = fields.length; i < len; i++) { + var field = fields[i]; + var fieldType = this._type[field]; // type may be undefined + + d[field] = convert(item[field], fieldType); + } + + this._data.set(id, d); + + ++this.length; + return id; + } + /** + * Get an item. Fields can be converted to a specific type + * + * @param id - Id of the requested item. + * @param types - Property name to type name object map of type converstions. + * + * @returns The item, optionally after type conversion. + */ + + }, { + key: "_getItem", + value: function _getItem(id, types) { + // @TODO: I have no idea how to type this. + // get the item from the dataset + var raw = this._data.get(id); + + if (!raw) { + return null; + } // convert the items field types + + + var converted; + var fields = Object.keys(raw); + + if (types) { + converted = {}; + + for (var i = 0, len = fields.length; i < len; i++) { + var field = fields[i]; + var value = raw[field]; + converted[field] = convert(value, types[field]); + } + } else { + // no field types specified, no converting needed + converted = _objectSpread({}, raw); + } + + if (converted[this._idProp] == null) { + converted[this._idProp] = raw.id; + } + + return converted; + } + /** + * Update a single item: merge with existing item. + * Will fail when the item has no id, or when there does not exist an item with the same id. + * + * @param item - The new item + * + * @returns The id of the updated item. + */ + + }, { + key: "_updateItem", + value: function _updateItem(item) { + var id = item[this._idProp]; + + if (id == null) { + throw new Error("Cannot update item: item has no id (item: " + JSON.stringify(item) + ")"); + } + + var d = this._data.get(id); + + if (!d) { + // item doesn't exist + throw new Error("Cannot update item: no item with id " + id + " found"); + } // merge with current item + + + var fields = Object.keys(item); + + for (var i = 0, len = fields.length; i < len; i++) { + var field = fields[i]; + var fieldType = this._type[field]; // type may be undefined + + d[field] = convert(item[field], fieldType); + } + + return id; + } + /** @inheritdoc */ + + }, { + key: "stream", + value: function stream(ids) { + if (ids) { + var data = this._data; + return new DataStream(defineProperty({}, Symbol.iterator, + /*#__PURE__*/ + regenerator.mark(function _callee() { + var _iteratorNormalCompletion3, _didIteratorError3, _iteratorError3, _iterator3, _step3, id, item; + + return regenerator.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + _iteratorNormalCompletion3 = true; + _didIteratorError3 = false; + _iteratorError3 = undefined; + _context.prev = 3; + _iterator3 = ids[Symbol.iterator](); + + case 5: + if (_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done) { + _context.next = 14; + break; + } + + id = _step3.value; + item = data.get(id); + + if (!(item != null)) { + _context.next = 11; + break; + } + + _context.next = 11; + return [id, item]; + + case 11: + _iteratorNormalCompletion3 = true; + _context.next = 5; + break; + + case 14: + _context.next = 20; + break; + + case 16: + _context.prev = 16; + _context.t0 = _context["catch"](3); + _didIteratorError3 = true; + _iteratorError3 = _context.t0; + + case 20: + _context.prev = 20; + _context.prev = 21; + + if (!_iteratorNormalCompletion3 && _iterator3.return != null) { + _iterator3.return(); + } + + case 23: + _context.prev = 23; + + if (!_didIteratorError3) { + _context.next = 26; + break; + } + + throw _iteratorError3; + + case 26: + return _context.finish(23); + + case 27: + return _context.finish(20); + + case 28: + case "end": + return _context.stop(); + } + } + }, _callee, null, [[3, 16, 20, 28], [21,, 23, 27]]); + }))); + } else { + return new DataStream(defineProperty({}, Symbol.iterator, this._data.entries.bind(this._data))); + } + } + }]); + + return DataSet; + }(DataSetPart); + + /** + * DataView + * + * A DataView offers a filtered and/or formatted view on a DataSet. One can subscribe to changes in a DataView, and easily get filtered or formatted data without having to specify filters and field types all the time. + * + * ## Example + * ```javascript + * // create a DataSet + * var data = new vis.DataSet(); + * data.add([ + * {id: 1, text: 'item 1', date: new Date(2013, 6, 20), group: 1, first: true}, + * {id: 2, text: 'item 2', date: '2013-06-23', group: 2}, + * {id: 3, text: 'item 3', date: '2013-06-25', group: 2}, + * {id: 4, text: 'item 4'} + * ]); + * + * // create a DataView + * // the view will only contain items having a property group with value 1, + * // and will only output fields id, text, and date. + * var view = new vis.DataView(data, { + * filter: function (item) { + * return (item.group == 1); + * }, + * fields: ['id', 'text', 'date'] + * }); + * + * // subscribe to any change in the DataView + * view.on('*', function (event, properties, senderId) { + * console.log('event', event, properties); + * }); + * + * // update an item in the data set + * data.update({id: 2, group: 1}); + * + * // get all ids in the view + * var ids = view.getIds(); + * console.log('ids', ids); // will output [1, 2] + * + * // get all items in the view + * var items = view.get(); + * ``` + * + * @typeParam Item - Item type that may or may not have an id. + * @typeParam IdProp - Name of the property that contains the id. + */ + + var DataView = + /*#__PURE__*/ + function (_DataSetPart) { + inherits(DataView, _DataSetPart); + + /** + * Create a DataView. + * + * @param data - The instance containing data (directly or indirectly). + * @param options - Options to configure this data view. + */ + function DataView(data, options) { + var _this; + + classCallCheck(this, DataView); + + _this = possibleConstructorReturn(this, getPrototypeOf(DataView).call(this)); + /** @inheritdoc */ + + _this.length = 0; + _this._ids = new Set(); // ids of the items currently in memory (just contains a boolean true) + + _this._options = options || {}; + _this._listener = _this._onEvent.bind(assertThisInitialized(_this)); + + _this.setData(data); + + return _this; + } // TODO: implement a function .config() to dynamically update things like configured filter + // and trigger changes accordingly + + /** + * Set a data source for the view. + * + * @param data - The instance containing data (directly or indirectly). + */ + + + createClass(DataView, [{ + key: "setData", + value: function setData(data) { + if (this._data) { + // unsubscribe from current dataset + if (this._data.off) { + this._data.off("*", this._listener); + } // trigger a remove of all items in memory + + + var ids = this._data.getIds({ + filter: this._options.filter + }); + + var items = this._data.get(ids); + + this._ids.clear(); + + this.length = 0; + + this._trigger("remove", { + items: ids, + oldData: items + }); + } + + if (data != null) { + this._data = data; // trigger an add of all added items + + var _ids = this._data.getIds({ + filter: this._options.filter + }); + + for (var i = 0, len = _ids.length; i < len; i++) { + var id = _ids[i]; + + this._ids.add(id); + } + + this.length = _ids.length; + + this._trigger("add", { + items: _ids + }); + } else { + this._data = new DataSet(); + } // subscribe to new dataset + + + if (this._data.on) { + this._data.on("*", this._listener); + } + } + /** + * Refresh the DataView. + * Useful when the DataView has a filter function containing a variable parameter. + */ + + }, { + key: "refresh", + value: function refresh() { + var ids = this._data.getIds({ + filter: this._options.filter + }); + + var oldIds = toConsumableArray(this._ids); + + var newIds = {}; + var addedIds = []; + var removedIds = []; + var removedItems = []; // check for additions + + for (var i = 0, len = ids.length; i < len; i++) { + var id = ids[i]; + newIds[id] = true; + + if (!this._ids.has(id)) { + addedIds.push(id); + + this._ids.add(id); + } + } // check for removals + + + for (var _i = 0, _len = oldIds.length; _i < _len; _i++) { + var _id = oldIds[_i]; + + var item = this._data.get(_id); + + if (item == null) { + // @TODO: Investigate. + // Doesn't happen during tests or examples. + // Is it really impossible or could it eventually happen? + // How to handle it if it does? The types guarantee non-nullable items. + console.error("If you see this, report it please."); + } else if (!newIds[_id]) { + removedIds.push(_id); + removedItems.push(item); + + this._ids.delete(_id); + } + } + + this.length += addedIds.length - removedIds.length; // trigger events + + if (addedIds.length) { + this._trigger("add", { + items: addedIds + }); + } + + if (removedIds.length) { + this._trigger("remove", { + items: removedIds, + oldData: removedItems + }); + } + } + /** @inheritdoc */ + + }, { + key: "get", + value: function get(first, second) { + if (this._data == null) { + return null; + } // parse the arguments + + + var ids = null; + var options; + + if (isId(first) || Array.isArray(first)) { + ids = first; + options = second; + } else { + options = first; + } // extend the options with the default options and provided options + + + var viewOptions = Object.assign({}, this._options, options); // create a combined filter method when needed + + var thisFilter = this._options.filter; + var optionsFilter = options && options.filter; + + if (thisFilter && optionsFilter) { + viewOptions.filter = function (item) { + return thisFilter(item) && optionsFilter(item); + }; + } + + if (ids == null) { + return this._data.get(viewOptions); + } else { + return this._data.get(ids, viewOptions); + } + } + /** @inheritdoc */ + + }, { + key: "getIds", + value: function getIds(options) { + if (this._data.length) { + var defaultFilter = this._options.filter; + var optionsFilter = options != null ? options.filter : null; + var filter; + + if (optionsFilter) { + if (defaultFilter) { + filter = function filter(item) { + return defaultFilter(item) && optionsFilter(item); + }; + } else { + filter = optionsFilter; + } + } else { + filter = defaultFilter; + } + + return this._data.getIds({ + filter: filter, + order: options && options.order + }); + } else { + return []; + } + } + /** @inheritdoc */ + + }, { + key: "forEach", + value: function forEach(callback, options) { + if (this._data) { + var defaultFilter = this._options.filter; + var optionsFilter = options && options.filter; + var filter; + + if (optionsFilter) { + if (defaultFilter) { + filter = function filter(item) { + return defaultFilter(item) && optionsFilter(item); + }; + } else { + filter = optionsFilter; + } + } else { + filter = defaultFilter; + } + + this._data.forEach(callback, { + filter: filter, + order: options && options.order + }); + } + } + /** @inheritdoc */ + + }, { + key: "map", + value: function map(callback, options) { + if (this._data) { + var defaultFilter = this._options.filter; + var optionsFilter = options && options.filter; + var filter; + + if (optionsFilter) { + if (defaultFilter) { + filter = function filter(item) { + return defaultFilter(item) && optionsFilter(item); + }; + } else { + filter = optionsFilter; + } + } else { + filter = defaultFilter; + } + + return this._data.map(callback, { + filter: filter, + order: options && options.order + }); + } else { + return []; + } + } + /** @inheritdoc */ + + }, { + key: "getDataSet", + value: function getDataSet() { + return this._data.getDataSet(); + } + /** @inheritdoc */ + + }, { + key: "stream", + value: function stream(ids) { + return this._data.stream(ids || defineProperty({}, Symbol.iterator, this._ids.keys.bind(this._ids))); + } + /** + * Event listener. Will propagate all events from the connected data set to the subscribers of the DataView, but will filter the items and only trigger when there are changes in the filtered data set. + * + * @param event - The name of the event. + * @param params - Parameters of the event. + * @param senderId - Id supplied by the sender. + */ + + }, { + key: "_onEvent", + value: function _onEvent(event, params, senderId) { + if (!params || !params.items || !this._data) { + return; + } + + var ids = params.items; + var addedIds = []; + var updatedIds = []; + var removedIds = []; + var oldItems = []; + var updatedItems = []; + var removedItems = []; + + switch (event) { + case "add": + // filter the ids of the added items + for (var i = 0, len = ids.length; i < len; i++) { + var id = ids[i]; + var item = this.get(id); + + if (item) { + this._ids.add(id); + + addedIds.push(id); + } + } + + break; + + case "update": + // determine the event from the views viewpoint: an updated + // item can be added, updated, or removed from this view. + for (var _i2 = 0, _len2 = ids.length; _i2 < _len2; _i2++) { + var _id2 = ids[_i2]; + + var _item = this.get(_id2); + + if (_item) { + if (this._ids.has(_id2)) { + updatedIds.push(_id2); + updatedItems.push(params.data[_i2]); + oldItems.push(params.oldData[_i2]); + } else { + this._ids.add(_id2); + + addedIds.push(_id2); + } + } else { + if (this._ids.has(_id2)) { + this._ids.delete(_id2); + + removedIds.push(_id2); + removedItems.push(params.oldData[_i2]); + } + } + } + + break; + + case "remove": + // filter the ids of the removed items + for (var _i3 = 0, _len3 = ids.length; _i3 < _len3; _i3++) { + var _id3 = ids[_i3]; + + if (this._ids.has(_id3)) { + this._ids.delete(_id3); + + removedIds.push(_id3); + removedItems.push(params.oldData[_i3]); + } + } + + break; + } + + this.length += addedIds.length - removedIds.length; + + if (addedIds.length) { + this._trigger("add", { + items: addedIds + }, senderId); + } + + if (updatedIds.length) { + this._trigger("update", { + items: updatedIds, + oldData: oldItems, + data: updatedItems + }, senderId); + } + + if (removedIds.length) { + this._trigger("remove", { + items: removedIds, + oldData: removedItems + }, senderId); + } + } + }]); + + return DataView; + }(DataSetPart); + + var index = { + DataSet: DataSet, + DataView: DataView, + Queue: Queue + }; + + exports.DataSet = DataSet; + exports.DataStream = DataStream; + exports.DataView = DataView; + exports.Queue = Queue; + exports.default = index; + + Object.defineProperty(exports, '__esModule', { value: true }); })); diff --git a/node_modules/vis-data/package.json b/node_modules/vis-data/package.json index 6c658aff3af7cd91adefe870185e1ada2dccfb33..6c37a5f7cb85dccbb237875bdec52a9db800c8b9 100644 --- a/node_modules/vis-data/package.json +++ b/node_modules/vis-data/package.json @@ -1,27 +1,27 @@ { - "_from": "vis-data@^6.1.0", - "_id": "vis-data@6.1.1", + "_from": "vis-data@^6.1.1", + "_id": "vis-data@6.2.0", "_inBundle": false, - "_integrity": "sha512-KnO7+4CF9B4IvoI/Kbgo1C18bm++NRzrwZqoWVWaM0huRp4KVCwJdYfA7GqPepABrJNILy71w+RFrO84CgaBhw==", + "_integrity": "sha512-qvXxun6epiKNbj98iFGFRPXFo474f4MoFbHR+XVmF6zw78tqLlvsDSr42lm9Dz30FdHnAdwAUL3eDTacU9pY8w==", "_location": "/vis-data", "_phantomChildren": {}, "_requested": { "type": "range", "registry": true, - "raw": "vis-data@^6.1.0", + "raw": "vis-data@^6.1.1", "name": "vis-data", "escapedName": "vis-data", - "rawSpec": "^6.1.0", + "rawSpec": "^6.1.1", "saveSpec": null, - "fetchSpec": "^6.1.0" + "fetchSpec": "^6.1.1" }, "_requiredBy": [ "/vis-network" ], - "_resolved": "https://registry.npmjs.org/vis-data/-/vis-data-6.1.1.tgz", - "_shasum": "f036eabd5089cf02753e2e5797fa58dfecbba244", - "_spec": "vis-data@^6.1.0", - "_where": "/home/Earth/wuruchi/Documents/ReactProj/react-api/node_modules/vis-network", + "_resolved": "https://registry.npmjs.org/vis-data/-/vis-data-6.2.0.tgz", + "_shasum": "e5ab662c69035aaff01d5e195cc51a476ebfbcd5", + "_spec": "vis-data@^6.1.1", + "_where": "/home/Earth/wuruchi/Documents/ReactProj/autosubmitreact/node_modules/vis-network", "bugs": { "url": "https://github.com/visjs/vis-data/issues" }, @@ -39,14 +39,14 @@ "name": "Alex de Mulder", "email": "alexdemulder@gmail.com" }, - { - "name": "Yotam Berkowitz", - "email": "yotamberk@gmail.com" - }, { "name": "Alexander Wunschik", "email": "alex@wunschik.net" }, + { + "name": "Yotam Berkowitz", + "email": "yotamberk@gmail.com" + }, { "name": "wimrijnders", "email": "wrijnders@gmail.com" @@ -67,6 +67,10 @@ "name": "Chris Jackson", "email": "chris@cd-jackson.com" }, + { + "name": "Tomáš Vyčítal", + "email": "tom.vycital@gmail.com" + }, { "name": "Brad Hards", "email": "bradh@frogmouth.net" @@ -79,10 +83,6 @@ "name": "Tim Pettersen", "email": "tim@atlassian.com" }, - { - "name": "Tomáš Vyčítal", - "email": "tom.vycital@gmail.com" - }, { "name": "Coleman Kane", "email": "ckane@colemankane.org" @@ -275,6 +275,8 @@ "@babel/preset-typescript": "^7.3.3", "@babel/register": "^7.4.4", "@babel/runtime": "^7.5.4", + "@commitlint/cli": "^8.1.0", + "@commitlint/config-conventional": "^8.1.0", "@types/chai": "^4.1.7", "@types/mocha": "^5.2.7", "@types/sinon": "^7.0.13", @@ -286,6 +288,8 @@ "eslint-config-prettier": "^6.0.0", "eslint-plugin-prettier": "^3.1.0", "git-authors-cli": "^1.0.18", + "husky": "^3.0.3", + "lint-staged": "^9.2.1", "mocha": "^6.1.4", "moment": "^2.24.0", "nyc": "^14.1.1", @@ -307,6 +311,13 @@ "LICENSE*" ], "homepage": "http://visjs.org/", + "husky": { + "hooks": { + "commit-msg": "commitlint -E HUSKY_GIT_PARAMS", + "pre-commit": "lint-staged", + "pre-push": "npm test" + } + }, "keywords": [ "vis", "visualization", @@ -326,7 +337,7 @@ "name": "vis-data", "repository": { "type": "git", - "url": "git://github.com/visjs/vis-data.git" + "url": "git+https://github.com/visjs/vis-data.git" }, "scripts": { "build": "npm run build:types && npm run build:code && npm run build:docs", @@ -338,13 +349,14 @@ "fix": "npm run lint -- --fix", "lint": "eslint '{src,test}/**/*.{m,}{j,t}s{x,}'", "postinstall": "opencollective postinstall || exit 0", - "preparepublish": "npm run contributors:update", + "prepublishOnly": "npm run build", "test": "BABEL_ENV=test mocha", "test-cov": "BABEL_ENV=test-cov nyc mocha", "type-check": "tsc --noemit", + "version": "npm run contributors:update && git add package.json", "watch": "rollup --watch --config rollup.config.js", "watch-dev": "npm run watch-dev" }, "types": "dist/types/index.d.ts", - "version": "6.1.1" + "version": "6.2.0" } diff --git a/node_modules/vis-network/.babelrc b/node_modules/vis-network/.babelrc index dfbde13172858a90ef0c7028a427ac46b8d1e66d..a78771c4bb6c59cf7947910033937885d704a3d8 100644 --- a/node_modules/vis-network/.babelrc +++ b/node_modules/vis-network/.babelrc @@ -1,7 +1,42 @@ { "presets": [ - ["@babel/preset-env", { - "targets": "> 0.1% or not dead" - }] - ] + [ + "@babel/preset-env", + { + "targets": "> 0.1% or not dead" + } + ], + "@babel/preset-typescript" + ], + "plugins": [ + "css-modules-transform", + "@babel/proposal-class-properties", + "@babel/proposal-object-rest-spread", + "@babel/plugin-transform-runtime" + ], + "env": { + "test": { + "presets": [ + [ + "@babel/preset-env", + { + "targets": "maintained node versions" + } + ], + "@babel/preset-typescript" + ] + }, + "test-cov": { + "presets": [ + [ + "@babel/preset-env", + { + "targets": "maintained node versions" + } + ], + "@babel/preset-typescript" + ], + "plugins": ["istanbul"] + } + } } diff --git a/node_modules/vis-network/.circleci/config.yml b/node_modules/vis-network/.circleci/config.yml new file mode 100644 index 0000000000000000000000000000000000000000..8ef42812788ae2f87a1bd96349b76b8a1ea3692f --- /dev/null +++ b/node_modules/vis-network/.circleci/config.yml @@ -0,0 +1,135 @@ +# Javascript Node CircleCI 2.0 configuration file +# +# Check https://circleci.com/docs/2.0/language-javascript/ for more details +# +version: 2.1 + +executors: + node: + docker: + - image: circleci/node:12.7 + working_directory: ~/repo + environment: + GIT_AUTHOR_EMAIL: visjsbot@gmail.com + GIT_AUTHOR_NAME: vis-bot + GIT_COMMITTER_EMAIL: visjsbot@gmail.com + GIT_COMMITTER_NAME: vis-bot + +jobs: + prepare: + executor: node + + steps: + - checkout + + # Download and cache dependencies + - restore_cache: + keys: + - v1-dependencies-{{ checksum "package.json" }} + # fallback to using the latest cache if no exact match is found + - v1-dependencies- + + - run: npm ci + + - save_cache: + paths: + - node_modules + key: v1-dependencies-{{ checksum "package.json" }} + + - persist_to_workspace: + root: . + paths: + - '*' + + build: + executor: node + + steps: + - attach_workspace: + at: . + + - run: npm run build + + - persist_to_workspace: + root: . + paths: + - 'dist' + + lint_js: + executor: node + + steps: + - attach_workspace: + at: . + + - run: npm run lint:js + + lint_ts: + executor: node + + steps: + - attach_workspace: + at: . + + - run: npm run lint:ts + + test: + executor: node + + steps: + - attach_workspace: + at: . + + - run: npm run test-cov + + release: + executor: node + + steps: + - attach_workspace: + at: . + + - run: + name: Prepare NPM + command: | + npm set //registry.npmjs.org/:_authToken=$NPM_TOKEN + + - run: + name: Release + command: | + npx semantic-release + +workflows: + version: 2 + + build: + jobs: + - prepare + + - build: + requires: + - prepare + + # - lint_js: + # requires: + # - prepare + + - lint_ts: + requires: + - prepare + + - test: + requires: + - prepare + + - release: + requires: + - prepare + - build + # - lint_js + - lint_ts + - test + filters: + branches: + only: + - master diff --git a/node_modules/vis-network/.eslintignore b/node_modules/vis-network/.eslintignore new file mode 100644 index 0000000000000000000000000000000000000000..8c3823b045661d1fc6a615fadc7f67aba7a6d3cb --- /dev/null +++ b/node_modules/vis-network/.eslintignore @@ -0,0 +1,3 @@ +*.min.js +*.min.ts +dist/**/* diff --git a/node_modules/vis-network/.eslintrc.js b/node_modules/vis-network/.eslintrc.js index 4f3ab4f2646080081c82918d07daca38df651089..6ed9ecfdf470a3496a5573f1a33a28f672f74ba4 100644 --- a/node_modules/vis-network/.eslintrc.js +++ b/node_modules/vis-network/.eslintrc.js @@ -6,14 +6,21 @@ module.exports = { mocha: true }, + parser: '@typescript-eslint/parser', parserOptions: { sourceType: "module", + ecmaVersion: 2019, + project: 'tsconfig.json', }, - extends: "eslint:recommended", + plugins: ['prettier', '@typescript-eslint'], + + extends: ['eslint:recommended', 'prettier'], // For the full list of rules, see: http://eslint.org/docs/rules/ rules: { + 'prettier/prettier': ['off'], + complexity: [2, 55], "max-statements": [2, 115], "no-unreachable": 1, @@ -39,4 +46,61 @@ module.exports = { }], "guard-for-in": 1, }, + overrides: [ + { + files: ['**/*.ts', '**/*.d.ts'], + rules: { + 'prettier/prettier': ['error'], + + // @TODO: Seems to mostly work just fine but I'm not 100 % sure. + // @TODO: Deprecated, anything like this for tsdoc? + 'valid-jsdoc': [ + 'error', + { + prefer: { + arg: 'param', + argument: 'param', + return: 'returns', + }, + requireParamDescription: true, + requireParamType: false, + requireReturn: false, // Requires return for void functions. + requireReturnDescription: true, + requireReturnType: false, + }, + ], + + // Class related. + '@typescript-eslint/member-naming': [ + 'error', + { private: '^_', protected: '^_', public: '^[^_]' }, + ], + '@typescript-eslint/member-ordering': 'error', + '@typescript-eslint/no-parameter-properties': 'off', + '@typescript-eslint/no-useless-constructor': 'error', + '@typescript-eslint/prefer-readonly': 'error', + + // Other. + '@typescript-eslint/no-unnecessary-type-assertion': 'error', + '@typescript-eslint/prefer-includes': 'error', + '@typescript-eslint/prefer-regexp-exec': 'error', + // @TODO: Seems like a good thing, not yet on npm though. + // '@typescript-eslint/require-await': 'error', + + // These are hoisted, I have no idea why it reports them by default. + '@typescript-eslint/no-use-before-define': [ + 'error', + { functions: false, classes: false, typedefs: false }, + ], + // False positives for overloading, also tsc compiles with errors anyway. + 'no-dupe-class-members': 'off', + // Blocks typesafe exhaustive switch (switch (x) { … default: const never: never = x }). + 'no-case-declarations': 'off', + // Reports used types. + 'no-unused-vars': 'off', + // Reports typeof bigint as an error, tsc validates this anyway so no problem turning this off. + 'valid-typeof': 'off', + }, + }, + ], } diff --git a/node_modules/vis-network/.github/FUNDING.yml b/node_modules/vis-network/.github/FUNDING.yml new file mode 100644 index 0000000000000000000000000000000000000000..f201da2b978ab4ec416ffd96a0cb4f38e0f393ff --- /dev/null +++ b/node_modules/vis-network/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] +patreon: # Replace with a single Patreon username +open_collective: visjs +ko_fi: # Replace with a single Ko-fi username +tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/vis-network/.mocharc.json b/node_modules/vis-network/.mocharc.json new file mode 100644 index 0000000000000000000000000000000000000000..9e039a0ec24f3668ada1d5be2605f36dc994e7ec --- /dev/null +++ b/node_modules/vis-network/.mocharc.json @@ -0,0 +1,5 @@ +{ + "extension": ["ts", "js"], + "require": ["./babel.mocha.js"], + "spec": ["./test/**/*.test.js", "./test/**/*.test.ts"] +} diff --git a/node_modules/vis-network/.nycrc.json b/node_modules/vis-network/.nycrc.json new file mode 100644 index 0000000000000000000000000000000000000000..160ee6755f37eaf93f321a6b8129590b7baafca8 --- /dev/null +++ b/node_modules/vis-network/.nycrc.json @@ -0,0 +1,8 @@ +{ + "exclude": ["**/*.test.*", "**/*.d.ts"], + "extension": ["ts", "js"], + "include": ["lib/**/*"], + "instrument": false, + "reporter": ["text-summary", "lcov"], + "sourceMap": false +} diff --git a/node_modules/vis-network/.prettierrc.json b/node_modules/vis-network/.prettierrc.json new file mode 100644 index 0000000000000000000000000000000000000000..9241a5267074c90040236c1f81e9fa3f27d0cc0c --- /dev/null +++ b/node_modules/vis-network/.prettierrc.json @@ -0,0 +1,11 @@ +{ + "endOfLine": "lf", + "parser": "typescript", + "printWidth": 80, + "quoteProps": "consistent", + "semi": false, + "singleQuote": true, + "tabWidth": 2, + "trailingComma": "es5", + "useTabs": false +} diff --git a/node_modules/vis-network/.releaserc.yml b/node_modules/vis-network/.releaserc.yml new file mode 100644 index 0000000000000000000000000000000000000000..194091923b858fa4757443b7cd86c3e69b6d142f --- /dev/null +++ b/node_modules/vis-network/.releaserc.yml @@ -0,0 +1,6 @@ +branch: master +plugins: + - '@semantic-release/commit-analyzer' + - '@semantic-release/release-notes-generator' + - '@semantic-release/npm' + - '@semantic-release/github' diff --git a/node_modules/vis-network/.rpt2_cache/rpt2_eb51c50a7022daee626edb802b6dc8f2311f7e4d/code/cache/2a05f4dcdc53d16226245d5482b1bb7aa5cd2de5 b/node_modules/vis-network/.rpt2_cache/rpt2_eb51c50a7022daee626edb802b6dc8f2311f7e4d/code/cache/2a05f4dcdc53d16226245d5482b1bb7aa5cd2de5 new file mode 100644 index 0000000000000000000000000000000000000000..4ed1e80ab7151bc1c1523416db2e4c48bc1d7dcd --- /dev/null +++ b/node_modules/vis-network/.rpt2_cache/rpt2_eb51c50a7022daee626edb802b6dc8f2311f7e4d/code/cache/2a05f4dcdc53d16226245d5482b1bb7aa5cd2de5 @@ -0,0 +1 @@ +{"code":"// Each part as it's own named export.\r\nexport * from './index';\r\n// All combined into a single object as default export.\r\nimport * as vis from './index';\r\nexport { vis as default };\r\n//# sourceMappingURL=index-bundle.js.map","references":["/home/circleci/repo/lib/index.ts","/home/circleci/repo/lib/index.ts"],"map":"{\"version\":3,\"file\":\"index-bundle.js\",\"sourceRoot\":\"\",\"sources\":[\"../../lib/index-bundle.ts\"],\"names\":[],\"mappings\":\"AAAA,sCAAsC;AACtC,cAAc,SAAS,CAAA;AAEvB,uDAAuD;AACvD,OAAO,KAAK,GAAG,MAAM,SAAS,CAAA;AAC9B,OAAO,EAAE,GAAG,IAAI,OAAO,EAAE,CAAA\"}"} diff --git a/node_modules/vis-network/.rpt2_cache/rpt2_eb51c50a7022daee626edb802b6dc8f2311f7e4d/code/cache/d477675c080b52b98ba7ae4001ba5ca169541ad6 b/node_modules/vis-network/.rpt2_cache/rpt2_eb51c50a7022daee626edb802b6dc8f2311f7e4d/code/cache/d477675c080b52b98ba7ae4001ba5ca169541ad6 new file mode 100644 index 0000000000000000000000000000000000000000..746cdc0e8b8c954b2f359fb6c8d361e3f7dcff6d --- /dev/null +++ b/node_modules/vis-network/.rpt2_cache/rpt2_eb51c50a7022daee626edb802b6dc8f2311f7e4d/code/cache/d477675c080b52b98ba7ae4001ba5ca169541ad6 @@ -0,0 +1 @@ +{"code":"// vis-util\r\nimport * as util from 'vis-util';\r\nexport { util };\r\n// vis-data\r\nimport * as data from 'vis-data';\r\nexport { data };\r\nexport { DataSet, DataView, Queue } from 'vis-data';\r\n// Network.\r\nexport * from './network/Network';\r\nimport Images from './network/Images';\r\nimport * as dotparser from './network/dotparser';\r\nimport * as gephiParser from './network/gephiParser';\r\nimport { parseGephi } from './network/gephiParser';\r\nimport * as allOptions from './network/options';\r\nexport const network = {\r\n Images,\r\n dotparser,\r\n gephiParser,\r\n allOptions,\r\n convertDot: dotparser.DOTToGraph,\r\n convertGephi: parseGephi,\r\n};\r\n// utils\r\nimport * as DOMutil from './DOMutil';\r\nexport { DOMutil };\r\n// bundled external libraries\r\nimport * as moment from './module/moment';\r\nexport { moment };\r\nimport * as Hammer from './module/hammer';\r\nexport { Hammer };\r\nimport * as keycharm from 'keycharm';\r\nexport { keycharm };\r\n//# sourceMappingURL=index.js.map","references":["/home/circleci/repo/node_modules/vis-util/dist/types/index.d.ts","/home/circleci/repo/node_modules/vis-data/dist/types/index.d.ts","/home/circleci/repo/node_modules/vis-data/dist/types/index.d.ts","/home/circleci/repo/lib/network/Network.js","/home/circleci/repo/lib/network/Images.js","/home/circleci/repo/lib/network/dotparser.js","/home/circleci/repo/lib/network/gephiParser.ts","/home/circleci/repo/lib/network/gephiParser.ts","/home/circleci/repo/lib/network/options.js","/home/circleci/repo/lib/DOMutil.js","/home/circleci/repo/lib/module/moment.js","/home/circleci/repo/lib/module/hammer.js","/home/circleci/repo/node_modules/keycharm/keycharm.js"],"map":"{\"version\":3,\"file\":\"index.js\",\"sourceRoot\":\"\",\"sources\":[\"../../lib/index.ts\"],\"names\":[],\"mappings\":\"AAAA,WAAW;AACX,OAAO,KAAK,IAAI,MAAM,UAAU,CAAA;AAChC,OAAO,EAAE,IAAI,EAAE,CAAA;AAEf,WAAW;AACX,OAAO,KAAK,IAAI,MAAM,UAAU,CAAA;AAChC,OAAO,EAAE,IAAI,EAAE,CAAA;AACf,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,UAAU,CAAA;AAEnD,WAAW;AACX,cAAc,mBAAmB,CAAA;AAEjC,OAAO,MAAM,MAAM,kBAAkB,CAAA;AACrC,OAAO,KAAK,SAAS,MAAM,qBAAqB,CAAA;AAChD,OAAO,KAAK,WAAW,MAAM,uBAAuB,CAAA;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAA;AAClD,OAAO,KAAK,UAAU,MAAM,mBAAmB,CAAA;AAC/C,MAAM,CAAC,MAAM,OAAO,GAAG;IACrB,MAAM;IACN,SAAS;IACT,WAAW;IACX,UAAU;IACV,UAAU,EAAE,SAAS,CAAC,UAAU;IAChC,YAAY,EAAE,UAAU;CACzB,CAAA;AAED,QAAQ;AACR,OAAO,KAAK,OAAO,MAAM,WAAW,CAAA;AACpC,OAAO,EAAE,OAAO,EAAE,CAAA;AAElB,6BAA6B;AAC7B,OAAO,KAAK,MAAM,MAAM,iBAAiB,CAAA;AACzC,OAAO,EAAE,MAAM,EAAE,CAAA;AACjB,OAAO,KAAK,MAAM,MAAM,iBAAiB,CAAA;AACzC,OAAO,EAAE,MAAM,EAAE,CAAA;AACjB,OAAO,KAAK,QAAQ,MAAM,UAAU,CAAA;AACpC,OAAO,EAAE,QAAQ,EAAE,CAAA\"}"} diff --git a/node_modules/vis-network/.rpt2_cache/rpt2_eb51c50a7022daee626edb802b6dc8f2311f7e4d/code/cache/d5150ca37aa85d6070309f69344e0fc788d84930 b/node_modules/vis-network/.rpt2_cache/rpt2_eb51c50a7022daee626edb802b6dc8f2311f7e4d/code/cache/d5150ca37aa85d6070309f69344e0fc788d84930 new file mode 100644 index 0000000000000000000000000000000000000000..f2dc5a96869945dfb1ab9d762229b13c0996acaf --- /dev/null +++ b/node_modules/vis-network/.rpt2_cache/rpt2_eb51c50a7022daee626edb802b6dc8f2311f7e4d/code/cache/d5150ca37aa85d6070309f69344e0fc788d84930 @@ -0,0 +1 @@ +{"code":"/**\r\n * Convert Gephi to Vis.\r\n *\r\n * @param gephiJSON - The parsed JSON data in Gephi format.\r\n * @param optionsObj - Additional options.\r\n *\r\n * @returns The converted data ready to be used in Vis.\r\n */\r\nexport function parseGephi(gephiJSON, optionsObj) {\r\n const options = {\r\n edges: {\r\n inheritColor: false,\r\n },\r\n nodes: {\r\n fixed: false,\r\n parseColor: false,\r\n },\r\n };\r\n if (optionsObj != null) {\r\n if (optionsObj.fixed != null) {\r\n options.nodes.fixed = optionsObj.fixed;\r\n }\r\n if (optionsObj.parseColor != null) {\r\n options.nodes.parseColor = optionsObj.parseColor;\r\n }\r\n if (optionsObj.inheritColor != null) {\r\n options.edges.inheritColor = optionsObj.inheritColor;\r\n }\r\n }\r\n const gEdges = gephiJSON.edges;\r\n const vEdges = gEdges.map((gEdge) => {\r\n const vEdge = {\r\n from: gEdge.source,\r\n id: gEdge.id,\r\n to: gEdge.target,\r\n };\r\n if (gEdge.attributes != null) {\r\n vEdge.attributes = gEdge.attributes;\r\n }\r\n if (gEdge.label != null) {\r\n vEdge.label = gEdge.label;\r\n }\r\n if (gEdge.attributes != null && gEdge.attributes.title != null) {\r\n vEdge.title = gEdge.attributes.title;\r\n }\r\n if (gEdge.type === 'Directed') {\r\n vEdge.arrows = 'to';\r\n }\r\n // edge['value'] = gEdge.attributes != null ? gEdge.attributes.Weight : undefined;\r\n // edge['width'] = edge['value'] != null ? undefined : edgegEdge.size;\r\n if (gEdge.color && options.edges.inheritColor === false) {\r\n vEdge.color = gEdge.color;\r\n }\r\n return vEdge;\r\n });\r\n const vNodes = gephiJSON.nodes.map((gNode) => {\r\n const vNode = {\r\n id: gNode.id,\r\n fixed: options.nodes.fixed && gNode.x != null && gNode.y != null,\r\n };\r\n if (gNode.attributes != null) {\r\n vNode.attributes = gNode.attributes;\r\n }\r\n if (gNode.label != null) {\r\n vNode.label = gNode.label;\r\n }\r\n if (gNode.size != null) {\r\n vNode.size = gNode.size;\r\n }\r\n if (gNode.attributes != null && gNode.attributes.title != null) {\r\n vNode.title = gNode.attributes.title;\r\n }\r\n if (gNode.title != null) {\r\n vNode.title = gNode.title;\r\n }\r\n if (gNode.x != null) {\r\n vNode.x = gNode.x;\r\n }\r\n if (gNode.y != null) {\r\n vNode.y = gNode.y;\r\n }\r\n if (gNode.color != null) {\r\n if (options.nodes.parseColor === true) {\r\n vNode.color = gNode.color;\r\n }\r\n else {\r\n vNode.color = {\r\n background: gNode.color,\r\n border: gNode.color,\r\n highlight: {\r\n background: gNode.color,\r\n border: gNode.color,\r\n },\r\n hover: {\r\n background: gNode.color,\r\n border: gNode.color,\r\n },\r\n };\r\n }\r\n }\r\n return vNode;\r\n });\r\n return { nodes: vNodes, edges: vEdges };\r\n}\r\n//# sourceMappingURL=gephiParser.js.map","references":[],"map":"{\"version\":3,\"file\":\"gephiParser.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../lib/network/gephiParser.ts\"],\"names\":[],\"mappings\":\"AA8EA;;;;;;;GAOG;AACH,MAAM,UAAU,UAAU,CACxB,SAAoB,EACpB,UAA8B;IAE9B,MAAM,OAAO,GAAG;QACd,KAAK,EAAE;YACL,YAAY,EAAE,KAAK;SACpB;QACD,KAAK,EAAE;YACL,KAAK,EAAE,KAAK;YACZ,UAAU,EAAE,KAAK;SAClB;KACF,CAAA;IAED,IAAI,UAAU,IAAI,IAAI,EAAE;QACtB,IAAI,UAAU,CAAC,KAAK,IAAI,IAAI,EAAE;YAC5B,OAAO,CAAC,KAAK,CAAC,KAAK,GAAG,UAAU,CAAC,KAAK,CAAA;SACvC;QACD,IAAI,UAAU,CAAC,UAAU,IAAI,IAAI,EAAE;YACjC,OAAO,CAAC,KAAK,CAAC,UAAU,GAAG,UAAU,CAAC,UAAU,CAAA;SACjD;QACD,IAAI,UAAU,CAAC,YAAY,IAAI,IAAI,EAAE;YACnC,OAAO,CAAC,KAAK,CAAC,YAAY,GAAG,UAAU,CAAC,YAAY,CAAA;SACrD;KACF;IAED,MAAM,MAAM,GAAG,SAAS,CAAC,KAAK,CAAA;IAC9B,MAAM,MAAM,GAAG,MAAM,CAAC,GAAG,CACvB,CAAC,KAAK,EAAW,EAAE;QACjB,MAAM,KAAK,GAAY;YACrB,IAAI,EAAE,KAAK,CAAC,MAAM;YAClB,EAAE,EAAE,KAAK,CAAC,EAAE;YACZ,EAAE,EAAE,KAAK,CAAC,MAAM;SACjB,CAAA;QAED,IAAI,KAAK,CAAC,UAAU,IAAI,IAAI,EAAE;YAC5B,KAAK,CAAC,UAAU,GAAG,KAAK,CAAC,UAAU,CAAA;SACpC;QACD,IAAI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,CAAC,UAAU,CAAC,KAAK,IAAI,IAAI,EAAE;YAC9D,KAAK,CAAC,KAAK,GAAG,KAAK,CAAC,UAAU,CAAC,KAAK,CAAA;SACrC;QACD,IAAI,KAAK,CAAC,KAAK,IAAI,IAAI,EAAE;YACvB,KAAK,CAAC,KAAK,GAAG,KAAK,CAAC,KAAK,CAAA;SAC1B;QACD,IAAI,KAAK,CAAC,CAAC,IAAI,IAAI,EAAE;YACnB,KAAK,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,CAAA;SAClB;QACD,IAAI,KAAK,CAAC,CAAC,IAAI,IAAI,EAAE;YACnB,KAAK,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,CAAA;SAClB;QACD,IAAI,KAAK,CAAC,KAAK,IAAI,IAAI,EAAE;YACvB,IAAI,OAAO,CAAC,KAAK,CAAC,UAAU,KAAK,IAAI,EAAE;gBACrC,KAAK,CAAC,KAAK,GAAG,KAAK,CAAC,KAAK,CAAA;aAC1B;iBAAM;gBACL,KAAK,CAAC,KAAK,GAAG;oBACZ,UAAU,EAAE,KAAK,CAAC,KAAK;oBACvB,MAAM,EAAE,KAAK,CAAC,KAAK;oBACnB,SAAS,EAAE;wBACT,UAAU,EAAE,KAAK,CAAC,KAAK;wBACvB,MAAM,EAAE,KAAK,CAAC,KAAK;qBACpB;oBACD,KAAK,EAAE;wBACL,UAAU,EAAE,KAAK,CAAC,KAAK;wBACvB,MAAM,EAAE,KAAK,CAAC,KAAK;qBACpB;iBACF,CAAA;aACF;SACF;QAED,OAAO,KAAK,CAAA;IACd,CAAC,CACF,CAAA;IAED,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,CAAA;AACzC,CAAC\"}"} diff --git a/node_modules/vis-network/.rpt2_cache/rpt2_eb51c50a7022daee626edb802b6dc8f2311f7e4d/semanticDiagnostics/cache/2a05f4dcdc53d16226245d5482b1bb7aa5cd2de5 b/node_modules/vis-network/.rpt2_cache/rpt2_eb51c50a7022daee626edb802b6dc8f2311f7e4d/semanticDiagnostics/cache/2a05f4dcdc53d16226245d5482b1bb7aa5cd2de5 new file mode 100644 index 0000000000000000000000000000000000000000..fe51488c7066f6687ef680d6bfaa4f7768ef205c --- /dev/null +++ b/node_modules/vis-network/.rpt2_cache/rpt2_eb51c50a7022daee626edb802b6dc8f2311f7e4d/semanticDiagnostics/cache/2a05f4dcdc53d16226245d5482b1bb7aa5cd2de5 @@ -0,0 +1 @@ +[] diff --git a/node_modules/vis-network/.rpt2_cache/rpt2_eb51c50a7022daee626edb802b6dc8f2311f7e4d/semanticDiagnostics/cache/d477675c080b52b98ba7ae4001ba5ca169541ad6 b/node_modules/vis-network/.rpt2_cache/rpt2_eb51c50a7022daee626edb802b6dc8f2311f7e4d/semanticDiagnostics/cache/d477675c080b52b98ba7ae4001ba5ca169541ad6 new file mode 100644 index 0000000000000000000000000000000000000000..fe51488c7066f6687ef680d6bfaa4f7768ef205c --- /dev/null +++ b/node_modules/vis-network/.rpt2_cache/rpt2_eb51c50a7022daee626edb802b6dc8f2311f7e4d/semanticDiagnostics/cache/d477675c080b52b98ba7ae4001ba5ca169541ad6 @@ -0,0 +1 @@ +[] diff --git a/node_modules/vis-network/.rpt2_cache/rpt2_eb51c50a7022daee626edb802b6dc8f2311f7e4d/semanticDiagnostics/cache/d5150ca37aa85d6070309f69344e0fc788d84930 b/node_modules/vis-network/.rpt2_cache/rpt2_eb51c50a7022daee626edb802b6dc8f2311f7e4d/semanticDiagnostics/cache/d5150ca37aa85d6070309f69344e0fc788d84930 new file mode 100644 index 0000000000000000000000000000000000000000..fe51488c7066f6687ef680d6bfaa4f7768ef205c --- /dev/null +++ b/node_modules/vis-network/.rpt2_cache/rpt2_eb51c50a7022daee626edb802b6dc8f2311f7e4d/semanticDiagnostics/cache/d5150ca37aa85d6070309f69344e0fc788d84930 @@ -0,0 +1 @@ +[] diff --git a/node_modules/vis-network/.rpt2_cache/rpt2_eb51c50a7022daee626edb802b6dc8f2311f7e4d/syntacticDiagnostics/cache/2a05f4dcdc53d16226245d5482b1bb7aa5cd2de5 b/node_modules/vis-network/.rpt2_cache/rpt2_eb51c50a7022daee626edb802b6dc8f2311f7e4d/syntacticDiagnostics/cache/2a05f4dcdc53d16226245d5482b1bb7aa5cd2de5 new file mode 100644 index 0000000000000000000000000000000000000000..fe51488c7066f6687ef680d6bfaa4f7768ef205c --- /dev/null +++ b/node_modules/vis-network/.rpt2_cache/rpt2_eb51c50a7022daee626edb802b6dc8f2311f7e4d/syntacticDiagnostics/cache/2a05f4dcdc53d16226245d5482b1bb7aa5cd2de5 @@ -0,0 +1 @@ +[] diff --git a/node_modules/vis-network/.rpt2_cache/rpt2_eb51c50a7022daee626edb802b6dc8f2311f7e4d/syntacticDiagnostics/cache/d477675c080b52b98ba7ae4001ba5ca169541ad6 b/node_modules/vis-network/.rpt2_cache/rpt2_eb51c50a7022daee626edb802b6dc8f2311f7e4d/syntacticDiagnostics/cache/d477675c080b52b98ba7ae4001ba5ca169541ad6 new file mode 100644 index 0000000000000000000000000000000000000000..fe51488c7066f6687ef680d6bfaa4f7768ef205c --- /dev/null +++ b/node_modules/vis-network/.rpt2_cache/rpt2_eb51c50a7022daee626edb802b6dc8f2311f7e4d/syntacticDiagnostics/cache/d477675c080b52b98ba7ae4001ba5ca169541ad6 @@ -0,0 +1 @@ +[] diff --git a/node_modules/vis-network/.rpt2_cache/rpt2_eb51c50a7022daee626edb802b6dc8f2311f7e4d/syntacticDiagnostics/cache/d5150ca37aa85d6070309f69344e0fc788d84930 b/node_modules/vis-network/.rpt2_cache/rpt2_eb51c50a7022daee626edb802b6dc8f2311f7e4d/syntacticDiagnostics/cache/d5150ca37aa85d6070309f69344e0fc788d84930 new file mode 100644 index 0000000000000000000000000000000000000000..fe51488c7066f6687ef680d6bfaa4f7768ef205c --- /dev/null +++ b/node_modules/vis-network/.rpt2_cache/rpt2_eb51c50a7022daee626edb802b6dc8f2311f7e4d/syntacticDiagnostics/cache/d5150ca37aa85d6070309f69344e0fc788d84930 @@ -0,0 +1 @@ +[] diff --git a/node_modules/vis-network/.rpt2_cache/rpt2_eb51c50a7022daee626edb802b6dc8f2311f7e4d/types/cache/07e82c250720981a8e13c4883e7790940597c2d5 b/node_modules/vis-network/.rpt2_cache/rpt2_eb51c50a7022daee626edb802b6dc8f2311f7e4d/types/cache/07e82c250720981a8e13c4883e7790940597c2d5 new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/node_modules/vis-network/.rpt2_cache/rpt2_eb51c50a7022daee626edb802b6dc8f2311f7e4d/types/cache/1243a74f4537d212d2dba27986dd873af0ea44d8 b/node_modules/vis-network/.rpt2_cache/rpt2_eb51c50a7022daee626edb802b6dc8f2311f7e4d/types/cache/1243a74f4537d212d2dba27986dd873af0ea44d8 new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/node_modules/vis-network/.rpt2_cache/rpt2_eb51c50a7022daee626edb802b6dc8f2311f7e4d/types/cache/1b33ded6fe855d4b67e7f1b8b08b364684355863 b/node_modules/vis-network/.rpt2_cache/rpt2_eb51c50a7022daee626edb802b6dc8f2311f7e4d/types/cache/1b33ded6fe855d4b67e7f1b8b08b364684355863 new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/node_modules/vis-network/.rpt2_cache/rpt2_eb51c50a7022daee626edb802b6dc8f2311f7e4d/types/cache/356a9558c716f01b791596e85e2a4b9d6f144e60 b/node_modules/vis-network/.rpt2_cache/rpt2_eb51c50a7022daee626edb802b6dc8f2311f7e4d/types/cache/356a9558c716f01b791596e85e2a4b9d6f144e60 new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/node_modules/vis-network/.rpt2_cache/rpt2_eb51c50a7022daee626edb802b6dc8f2311f7e4d/types/cache/52575df2bcdd0c2b74a4067aa6934199ce42dc99 b/node_modules/vis-network/.rpt2_cache/rpt2_eb51c50a7022daee626edb802b6dc8f2311f7e4d/types/cache/52575df2bcdd0c2b74a4067aa6934199ce42dc99 new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/node_modules/vis-network/.rpt2_cache/rpt2_eb51c50a7022daee626edb802b6dc8f2311f7e4d/types/cache/670eb11b9818b6ca6b2f9af9f7285a0f4f30eb20 b/node_modules/vis-network/.rpt2_cache/rpt2_eb51c50a7022daee626edb802b6dc8f2311f7e4d/types/cache/670eb11b9818b6ca6b2f9af9f7285a0f4f30eb20 new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/node_modules/vis-network/.rpt2_cache/rpt2_eb51c50a7022daee626edb802b6dc8f2311f7e4d/types/cache/6f258014467a8a6e7807719e605c1c56ee32d653 b/node_modules/vis-network/.rpt2_cache/rpt2_eb51c50a7022daee626edb802b6dc8f2311f7e4d/types/cache/6f258014467a8a6e7807719e605c1c56ee32d653 new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/node_modules/vis-network/.rpt2_cache/rpt2_eb51c50a7022daee626edb802b6dc8f2311f7e4d/types/cache/75a5535dcc66e0cb7b8e31c4d816ff66b679bc63 b/node_modules/vis-network/.rpt2_cache/rpt2_eb51c50a7022daee626edb802b6dc8f2311f7e4d/types/cache/75a5535dcc66e0cb7b8e31c4d816ff66b679bc63 new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/node_modules/vis-network/.rpt2_cache/rpt2_eb51c50a7022daee626edb802b6dc8f2311f7e4d/types/cache/8839dbd663c882d06aa2591774ca5f69fb340694 b/node_modules/vis-network/.rpt2_cache/rpt2_eb51c50a7022daee626edb802b6dc8f2311f7e4d/types/cache/8839dbd663c882d06aa2591774ca5f69fb340694 new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/node_modules/vis-network/.rpt2_cache/rpt2_eb51c50a7022daee626edb802b6dc8f2311f7e4d/types/cache/8d21a9f4a3310fb8e8f16b5d0a391b8561410a49 b/node_modules/vis-network/.rpt2_cache/rpt2_eb51c50a7022daee626edb802b6dc8f2311f7e4d/types/cache/8d21a9f4a3310fb8e8f16b5d0a391b8561410a49 new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/node_modules/vis-network/.rpt2_cache/rpt2_eb51c50a7022daee626edb802b6dc8f2311f7e4d/types/cache/a3fd23ff5571241d3529e293eb80d7f0aeb84d16 b/node_modules/vis-network/.rpt2_cache/rpt2_eb51c50a7022daee626edb802b6dc8f2311f7e4d/types/cache/a3fd23ff5571241d3529e293eb80d7f0aeb84d16 new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/node_modules/vis-network/.rpt2_cache/rpt2_eb51c50a7022daee626edb802b6dc8f2311f7e4d/types/cache/d9ebf0146294070a64d3b05e83c840089dbf5d55 b/node_modules/vis-network/.rpt2_cache/rpt2_eb51c50a7022daee626edb802b6dc8f2311f7e4d/types/cache/d9ebf0146294070a64d3b05e83c840089dbf5d55 new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/node_modules/vis-network/.rpt2_cache/rpt2_eb51c50a7022daee626edb802b6dc8f2311f7e4d/types/cache/ec9608c45f4a341d5e5aae7d587c52bfb837d207 b/node_modules/vis-network/.rpt2_cache/rpt2_eb51c50a7022daee626edb802b6dc8f2311f7e4d/types/cache/ec9608c45f4a341d5e5aae7d587c52bfb837d207 new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/node_modules/vis-network/HISTORY.md b/node_modules/vis-network/HISTORY.md index 34986035a9d7f002943d82c25ff8be5bccaa92fc..c3e5a1a37eca30ea2dcc240977757a2e0e30f616 100644 --- a/node_modules/vis-network/HISTORY.md +++ b/node_modules/vis-network/HISTORY.md @@ -1,6 +1,85 @@ -# vis.js history +# vis-network + http://visjs.org +## 2019-07-28, version 5.1.0 + +_For everybody who wants to move this repository: This version is feature compatible with [visjs-community/visjs-network@4.24.10](https://github.com/visjs-community/visjs-network/tree/3a5d25522cc2fbc2e10f9acef77df1aa0332b440)_ + +- visjs-network#71: fix remove edge from clustering (#30) via @Tyler-Maclachlan ([visjs-network#71](https://github.com/visjs-community/visjs-network/pull/71)) +- visjs-network#39: add penwidth support for dot language (#24) via @geminoa ([visjs-network#39](https://github.com/visjs-community/visjs-network/pull/39)) +- visjs-network#40: fix type of zoomSpeed (#25) via @geminoa ([visjs-network#40](https://github.com/visjs-community/visjs-network/pull/40)) +- visjs-network#45: correctly set invalid labels to undefined (#26) via @channeladam ([visjs-network#45](https://github.com/visjs-community/visjs-network/pull/45)) +- visjs-network#68: hidden edge bug (#29) via @DarylMcCullough ([visjs-network#68](https://github.com/visjs-community/visjs-network/pull/68)) +- visjs-network#66: fix hover node (#28) via @Tyler-Maclachlan: ([visjs-network#66](https://github.com/visjs-community/visjs-network/pull/66)) +- visjs-network#47: fix label measurement (#27) via @channeladam ([visjs-network#47](https://github.com/visjs-community/visjs-network/pull/47)) +- visjs-network#43: Edge labels disappear when cluster is opened (#15) via @channeladam ([visjs-network#43](https://github.com/visjs-community/visjs-network/pull/43)) +- vis#3771: add new events to control drag and drop of nodes (#23) via @vasa93 ([almende/vis#3771](https://github.com/almende/vis/pull/3771)) +- vis#4027: fix hover detection over nodes after hovering over an edge (#22) via @Gelio ([almende/vis#4027](https://github.com/almende/vis/pull/4027)) +- vis#4026: remove edge tooltip when hovering a node (#21) via @Gelio ([almende/vis#40269](https://github.com/almende/vis/pull/4026)) +- vis#3888: add dir support for dot language (#19) via @geminoa ([almende/vis#3888](https://github.com/almende/vis/pull/3888)) +- vis#4042: Hide edges on zoom v2 (#16) via @micahstubbs ([almende/vis#4042](https://github.com/almende/vis/pull/4042)) +- vis#3963: add French (#17) via @scenaristeur ([almende/vis#3963](https://github.com/scenaristeur)) +- introduce TypeScript index file (#20) +- use cdnjs links for external assets (#11) +- add and improve test coverage (#8) +- update vis-data and commit package-lock (#6) +- change example script-urls to use https (#3) +- tests: add tests for dotparser via @josdejong, @wimrijnders ([almende#3112](https://github.com/almende/vis/pull/3112)) +- tests: add tests for Label via @macleodbroad-wf, @wimrijnders ([almende/vis#3228](https://github.com/almende/vis/pull/3228), [almende/vis#3470](https://github.com/almende/vis/pull/3470), [almende/vis#3486](https://github.com/almende/vis/pull/3486), [almende/vis#3511](https://github.com/almende/vis/pull/3511), [almende#3520](https://github.com/almende/vis/pull/3520), [almende#3518](https://github.com/almende/vis/pull/3518), [almende#3575](https://github.com/almende/vis/pull/3575), [almende#3565](https://github.com/almende/vis/pull/3565), [almende#3603](https://github.com/almende/vis/pull/3603), [almende#3646](https://github.com/almende/vis/pull/3646)) +- tests: add tests for Configurator via @macleodbroad-wf ([almende#3600](https://github.com/almende/vis/pull/3600)) +- chore: remove opencollective postinstall logo +- chore(package): update vis-util to 1.1.2 (#32) +- chore(package): update propagating-hammerjs +- chore(examples): add dot language examples to overview (#18) +- chore: improve HISTORY.md +- chore: add 5.0.0 release notes to HISTORY.md +- Create FUNDING.yml + +## 2019-07-19, version 5.0.0 + +In version 5.0.0 the original [vis library](https://github.com/almende/vis) was split up and the whole build process changed. + +- fix: fix postinstall script; #3 +- feat: generate a unminified vis.js file also +- use rollup instead of gulp/webpack (#1) +- Fixed endless image loading errors when broken image could not be loaded ([#4245](https://github.com/almende/vis/pull/4245)) +- Fix link in 'how to help' ([#4131](https://github.com/almende/vis/pull/4131)) +- Fix spelling error in spanish locale ([#4221](https://github.com/almende/vis/pull/4221)) +- Link we_need_help to Open Collective ([#4218](https://github.com/almende/vis/pull/4218)) +- Fixed typo in CONTRIBUTING.md ([#4210](https://github.com/almende/vis/pull/4210)) +- Replace babel-preset-es2015 with babel-preset-env ([#3978](https://github.com/almende/vis/pull/3978)) +- Improvment on clustering performance ([#3862](https://github.com/almende/vis/pull/3862)) +- Fix #3713 - Node color overriden by Group Color ([#3870](https://github.com/almende/vis/pull/3870)) +- Add arrow types for EndPoints.js ([#3839](https://github.com/almende/vis/pull/3839)) +- Fix typo in navigation.html ([#3890](https://github.com/almende/vis/pull/3890)) +- update moment to last version ([#3819](https://github.com/almende/vis/pull/3819)) +- Add `icon` option to ShapeBase ([#3756](https://github.com/almende/vis/pull/3756)) +- Move showManipulationToolbar outside of if statement ([#3694](https://github.com/almende/vis/pull/3694)) +- add localization for Ukraine ([#3699](https://github.com/almende/vis/pull/3699)) +- Opencollective ([#3681](https://github.com/almende/vis/pull/3681)) +- configurable manual zoom speed ([#3657](https://github.com/almende/vis/pull/3657)) +- Fixes issue 3321 by ensuring labels are drawn as part of initial cons… ([#3646](https://github.com/almende/vis/pull/3646)) +- Adding unit tests for lib/shared ([#3600](https://github.com/almende/vis/pull/3600)) +- Adds code-cov to develop and updates readme. ([#3629](https://github.com/almende/vis/pull/3629)) +- Docs : fixes and enhancements for the documentation template. ([#3596](https://github.com/almende/vis/pull/3596)) +- Unit tests: upgrade jsdom to v11 to fix breaking unit tests for Network ([#3603](https://github.com/almende/vis/pull/3603)) +- Network feature: background style for edges ([#3606](https://github.com/almende/vis/pull/3606)) +- Moved navbar elements in all html documentation files to partial ([#3604](https://github.com/almende/vis/pull/3604)) +- Docs: Moved end block in all html documentation files to partial ([#3597](https://github.com/almende/vis/pull/3597)) +- Network: force array order when sorting hierarchical levels ([#3576](https://github.com/almende/vis/pull/3576)) +- Add template for document generation with 'jsdoc'. ([#3497](https://github.com/almende/vis/pull/3497)) +- Network: DRY code in Label for parsing markup ([#3565](https://github.com/almende/vis/pull/3565)) +- Network: Cleanup @typedef's in jsdoc comments ([#3569](https://github.com/almende/vis/pull/3569)) +- Adds code coverage report the output of `npm test` and adds detailed … ([#3575](https://github.com/almende/vis/pull/3575)) +- Network: Fix documentation for event `stabilized` ([#3582](https://github.com/almende/vis/pull/3582)) +- Network: Add new Hexagon shape to shape examples ([#3577](https://github.com/almende/vis/pull/3577)) +- Network: Handle null data gracefully ([#3571](https://github.com/almende/vis/pull/3571)) +- Network: preload images in options for all shape types ([#3570](https://github.com/almende/vis/pull/3570)) +- Network: Set version of FontAwesome to latest stable 4.7.0 ([#3572](https://github.com/almende/vis/pull/3572)) +- Use mock canvas object replacing `canvas` ([#3518](https://github.com/almende/vis/pull/3518)) +- Network: Prevent crash when dataChanged is triggered during initialization ([#3568](https://github.com/almende/vis/pull/3568)) +- Network: fit() should not change the passed options ([#3566](https://github.com/almende/vis/pull/3566)) ## 2017-10-12, version 4.21.0 diff --git a/node_modules/vis-network/README.md b/node_modules/vis-network/README.md index eff7144bd93a66c1a39b33c00f0d883551ab13b3..58cabb87b06c1bdf7e34a03f9ba7dc36a54205a8 100644 --- a/node_modules/vis-network/README.md +++ b/node_modules/vis-network/README.md @@ -6,6 +6,8 @@ Network is a visualization to display networks and networks consisting of nodes ## Badges +[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release) ![npm](https://img.shields.io/npm/v/vis-network) [![Greenkeeper badge](https://badges.greenkeeper.io/visjs/vis-network.svg)](https://greenkeeper.io/) + [![GitHub contributors](https://img.shields.io/github/contributors/visjs/vis-network.svg)](https://github.com/visjs/vis-network/graphs/contributors) [![GitHub stars](https://img.shields.io/github/stars/visjs/vis-network.svg)](https://github.com/almende/vis/stargazers) @@ -138,4 +140,4 @@ and * The MIT License http://opensource.org/licenses/MIT -Vis.js may be distributed under either license. \ No newline at end of file +Vis.js may be distributed under either license. diff --git a/node_modules/vis-network/babel.mocha.js b/node_modules/vis-network/babel.mocha.js new file mode 100644 index 0000000000000000000000000000000000000000..b2b75c584669f462fd220a844d77bb3b3ce8311b --- /dev/null +++ b/node_modules/vis-network/babel.mocha.js @@ -0,0 +1,3 @@ +require('@babel/register')({ + extensions: ['.ts', '.js'], +}) diff --git a/node_modules/vis-network/dist/types/DOMutil.d.ts b/node_modules/vis-network/dist/types/DOMutil.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..acdf753293923f554a81218e1857a954b97543a0 --- /dev/null +++ b/node_modules/vis-network/dist/types/DOMutil.d.ts @@ -0,0 +1,99 @@ +/** + * this prepares the JSON container for allocating SVG elements + * @param {Object} JSONcontainer + * @private + */ +export function prepareElements(JSONcontainer: any): void + +/** + * this cleans up all the unused SVG elements. By asking for the parentNode, we only need to supply the JSON container from + * which to remove the redundant elements. + * + * @param {Object} JSONcontainer + * @private + */ +export function cleanupElements(JSONcontainer: any): void + +/** + * Ensures that all elements are removed first up so they can be recreated cleanly + * @param {Object} JSONcontainer + */ +export function resetElements(JSONcontainer: any): void + +/** + * Allocate or generate an SVG element if needed. Store a reference to it in the JSON container and draw it in the svgContainer + * the JSON container and the SVG container have to be supplied so other svg containers (like the legend) can use this. + * + * @param {string} elementType + * @param {Object} JSONcontainer + * @param {Object} svgContainer + * @returns {Element} + * @private + */ +export function getSVGElement( + elementType: any, + JSONcontainer: any, + svgContainer: any +): any + +/** + * Allocate or generate an SVG element if needed. Store a reference to it in the JSON container and draw it in the svgContainer + * the JSON container and the SVG container have to be supplied so other svg containers (like the legend) can use this. + * + * @param {string} elementType + * @param {Object} JSONcontainer + * @param {Element} DOMContainer + * @param {Element} insertBefore + * @returns {*} + */ +export function getDOMElement( + elementType: any, + JSONcontainer: any, + DOMContainer: any, + insertBefore: any +): any + +/** + * Draw a point object. This is a separate function because it can also be called by the legend. + * The reason the JSONcontainer and the target SVG svgContainer have to be supplied is so the legend can use these functions + * as well. + * + * @param {number} x + * @param {number} y + * @param {Object} groupTemplate: A template containing the necessary information to draw the datapoint e.g., {style: 'circle', size: 5, className: 'className' } + * @param {Object} JSONcontainer + * @param {Object} svgContainer + * @param {Object} labelObj + * @returns {vis.PointItem} + */ +export function drawPoint( + x: any, + y: any, + groupTemplate: any, + JSONcontainer: any, + svgContainer: any, + labelObj: any +): any + +/** + * draw a bar SVG element centered on the X coordinate + * + * @param {number} x + * @param {number} y + * @param {number} width + * @param {number} height + * @param {string} className + * @param {Object} JSONcontainer + * @param {Object} svgContainer + * @param {string} style + */ +export function drawBar( + x: any, + y: any, + width: any, + height: any, + className: any, + JSONcontainer: any, + svgContainer: any, + style: any +): void diff --git a/node_modules/vis-network/dist/types/index-bundle.d.ts b/node_modules/vis-network/dist/types/index-bundle.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..1983b8088295a15256659f9f7be2477e67a69787 --- /dev/null +++ b/node_modules/vis-network/dist/types/index-bundle.d.ts @@ -0,0 +1,4 @@ +export * from './index'; +import * as vis from './index'; +export { vis as default }; +//# sourceMappingURL=index-bundle.d.ts.map \ No newline at end of file diff --git a/node_modules/vis-network/dist/types/index-bundle.d.ts.map b/node_modules/vis-network/dist/types/index-bundle.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..2d556c31413baf97ef5d2f1f5270f71195c4c123 --- /dev/null +++ b/node_modules/vis-network/dist/types/index-bundle.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index-bundle.d.ts","sourceRoot":"","sources":["../../lib/index-bundle.ts"],"names":[],"mappings":"AACA,cAAc,SAAS,CAAA;AAGvB,OAAO,KAAK,GAAG,MAAM,SAAS,CAAA;AAC9B,OAAO,EAAE,GAAG,IAAI,OAAO,EAAE,CAAA"} \ No newline at end of file diff --git a/node_modules/vis-network/dist/types/index.d.ts b/node_modules/vis-network/dist/types/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..53b39ae31d9ff6fdab2beb0feb04183a870c269d --- /dev/null +++ b/node_modules/vis-network/dist/types/index.d.ts @@ -0,0 +1,24 @@ +import * as util from 'vis-util'; +export { util }; +import * as data from 'vis-data'; +export { data }; +export { DataSet, DataView, Queue } from 'vis-data'; +export * from './network/Network'; +import * as gephiParser from './network/gephiParser'; +export declare const network: { + Images: any; + dotparser: any; + gephiParser: typeof gephiParser; + allOptions: any; + convertDot: any; + convertGephi: typeof gephiParser.parseGephi; +}; +import * as DOMutil from './DOMutil'; +export { DOMutil }; +import * as moment from './module/moment'; +export { moment }; +import * as Hammer from './module/hammer'; +export { Hammer }; +import * as keycharm from 'keycharm'; +export { keycharm }; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/vis-network/dist/types/index.d.ts.map b/node_modules/vis-network/dist/types/index.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..fc975d9f152ffc506b8cddbf9996fb6bd450cc35 --- /dev/null +++ b/node_modules/vis-network/dist/types/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../lib/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,IAAI,MAAM,UAAU,CAAA;AAChC,OAAO,EAAE,IAAI,EAAE,CAAA;AAGf,OAAO,KAAK,IAAI,MAAM,UAAU,CAAA;AAChC,OAAO,EAAE,IAAI,EAAE,CAAA;AACf,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,UAAU,CAAA;AAGnD,cAAc,mBAAmB,CAAA;AAIjC,OAAO,KAAK,WAAW,MAAM,uBAAuB,CAAA;AAGpD,eAAO,MAAM,OAAO;;;;;;;CAOnB,CAAA;AAGD,OAAO,KAAK,OAAO,MAAM,WAAW,CAAA;AACpC,OAAO,EAAE,OAAO,EAAE,CAAA;AAGlB,OAAO,KAAK,MAAM,MAAM,iBAAiB,CAAA;AACzC,OAAO,EAAE,MAAM,EAAE,CAAA;AACjB,OAAO,KAAK,MAAM,MAAM,iBAAiB,CAAA;AACzC,OAAO,EAAE,MAAM,EAAE,CAAA;AACjB,OAAO,KAAK,QAAQ,MAAM,UAAU,CAAA;AACpC,OAAO,EAAE,QAAQ,EAAE,CAAA"} \ No newline at end of file diff --git a/node_modules/vis-network/dist/types/module/hammer.d.ts b/node_modules/vis-network/dist/types/module/hammer.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..30d314735aaf070fd49a8049e0240237d43dc59b --- /dev/null +++ b/node_modules/vis-network/dist/types/module/hammer.d.ts @@ -0,0 +1,2 @@ +import hammer from '@egjs/hammerjs' +export = hammer diff --git a/node_modules/vis-network/dist/types/module/moment.d.ts b/node_modules/vis-network/dist/types/module/moment.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..6b17ac74ba5adc78ab39d7a9fe2adf7d2cf55a5e --- /dev/null +++ b/node_modules/vis-network/dist/types/module/moment.d.ts @@ -0,0 +1,2 @@ +import moment from 'moment' +export = moment diff --git a/node_modules/vis-network/dist/types/network/Network.d.ts b/node_modules/vis-network/dist/types/network/Network.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..cf9407e588cdb23716c4227077eff8c8373b8dd2 --- /dev/null +++ b/node_modules/vis-network/dist/types/network/Network.d.ts @@ -0,0 +1,31 @@ +export { + AnimationOptions, + BoundingBox, + ClusterOptions, + Color, + Data, + DirectionType, + EasingFunction, + Edge, + EdgeOptions, + FitOptions, + FocusOptions, + FontOptions, + IdType, + Image, + LocaleMessages, + Locales, + MoveToOptions, + Network, + NetworkEvents, + Node, + NodeOptions, + OpenClusterOptions, + Options, + OptionsScaling, + OptionsShadow, + Position, + SelectionOptions, + TimelineAnimationType, + ViewPortOptions, +} from '../vis-types' diff --git a/node_modules/vis-network/dist/types/network/gephiParser.d.ts b/node_modules/vis-network/dist/types/network/gephiParser.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..37c2a5be176f2cd44a53823f05eb6a6941cdf83d --- /dev/null +++ b/node_modules/vis-network/dist/types/network/gephiParser.d.ts @@ -0,0 +1,80 @@ +export declare type Id = number | string; +export interface ColorObject { + background: string; + border: string; + highlight: { + background: string; + border: string; + }; + hover: { + background: string; + border: string; + }; +} +export interface GephiData { + nodes: GephiNode[]; + edges: GephiEdge[]; +} +export interface GephiParseOptions { + fixed?: boolean; + inheritColor?: boolean; + parseColor?: boolean; +} +export interface GephiNode { + id: Id; + attributes?: { + title?: string; + }; + color?: string; + label?: string; + size?: number; + title?: string; + x?: number; + y?: number; +} +export interface GephiEdge { + id: Id; + source: Id; + target: Id; + attributes?: { + title?: string; + }; + color?: string; + label?: string; + type?: string; +} +export interface VisData { + nodes: VisNode[]; + edges: VisEdge[]; +} +export interface VisNode { + id: Id; + fixed: boolean; + color?: string | ColorObject; + label?: string; + size?: number; + title?: string; + x?: number; + y?: number; + attributes?: unknown; +} +export interface VisEdge { + id: Id; + from: Id; + to: Id; + arrows?: 'to'; + color?: string; + label?: string; + title?: string; + attributes?: unknown; +} +/** + * Convert Gephi to Vis. + * + * @param gephiJSON - The parsed JSON data in Gephi format. + * @param optionsObj - Additional options. + * + * @returns The converted data ready to be used in Vis. + */ +export declare function parseGephi(gephiJSON: GephiData, optionsObj?: GephiParseOptions): VisData; +//# sourceMappingURL=gephiParser.d.ts.map \ No newline at end of file diff --git a/node_modules/vis-network/dist/types/network/gephiParser.d.ts.map b/node_modules/vis-network/dist/types/network/gephiParser.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..dc6e2e4b529fd78cba7473777cd970099727ff5c --- /dev/null +++ b/node_modules/vis-network/dist/types/network/gephiParser.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"gephiParser.d.ts","sourceRoot":"","sources":["../../../lib/network/gephiParser.ts"],"names":[],"mappings":"AAAA,oBAAY,EAAE,GAAG,MAAM,GAAG,MAAM,CAAA;AAEhC,MAAM,WAAW,WAAW;IAC1B,UAAU,EAAE,MAAM,CAAA;IAClB,MAAM,EAAE,MAAM,CAAA;IACd,SAAS,EAAE;QACT,UAAU,EAAE,MAAM,CAAA;QAClB,MAAM,EAAE,MAAM,CAAA;KACf,CAAA;IACD,KAAK,EAAE;QACL,UAAU,EAAE,MAAM,CAAA;QAClB,MAAM,EAAE,MAAM,CAAA;KACf,CAAA;CACF;AAED,MAAM,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CAAA;IACV,CAAC,CAAC,EAAE,MAAM,CAAA;IAEV,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB;AACD,MAAM,WAAW,OAAO;IACtB,EAAE,EAAE,EAAE,CAAA;IACN,IAAI,EAAE,EAAE,CAAA;IACR,EAAE,EAAE,EAAE,CAAA;IAEN,MAAM,CAAC,EAAE,IAAI,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,KAAK,CAAC,EAAE,MAAM,CAAA;IAEd,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB;AAED;;;;;;;GAOG;AACH,wBAAgB,UAAU,CACxB,SAAS,EAAE,SAAS,EACpB,UAAU,CAAC,EAAE,iBAAiB,GAC7B,OAAO,CA0GT"} \ No newline at end of file diff --git a/node_modules/vis-network/dist/types/vis-types/index.d.ts b/node_modules/vis-network/dist/types/vis-types/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..a7475b159eab09f4f30c348265ad90b32145e6c4 --- /dev/null +++ b/node_modules/vis-network/dist/types/vis-types/index.d.ts @@ -0,0 +1,2004 @@ +// Type definitions for vis.js 4.21 +// Project: https://github.com/almende/vis, http://visjs.org +// Definitions by: Michaël Bitard +// MacLeod Broad +// Adrian Caballero +// Severin +// kaktus40 +// Matthieu Maitre +// Adam Lewis +// Alex Soh +// Oleksii Kachura +// dcop +// Avraham Essoudry +// Dmitriy Trifonov +// Sam Welek +// Slaven Tomac +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +import { MomentInput, MomentFormatSpecification, Moment } from 'moment'; +export type MomentConstructor1 = + (inp?: MomentInput, format?: MomentFormatSpecification, strict?: boolean) => Moment; +export type MomentConstructor2 = + (inp?: MomentInput, format?: MomentFormatSpecification, language?: string, strict?: boolean) => Moment; + +export type MomentConstructor = MomentConstructor1 | MomentConstructor2; + +export type IdType = string | number; +export type SubgroupType = IdType; +export type DateType = Date | number | string; +export type DirectionType = 'from' | 'to'; +export type HeightWidthType = IdType; +export type TimelineItemType = 'box' | 'point' | 'range' | 'background'; +export type TimelineAlignType = 'auto' | 'center' | 'left' | 'right'; +export type TimelineTimeAxisScaleType = 'millisecond' | 'second' | 'minute' | 'hour' | + 'weekday' | 'day' | 'month' | 'year'; +export type TimelineEventPropertiesResultWhatType = 'item' | 'background' | 'axis' | + 'group-label' | 'custom-time' | 'current-time'; +export type TimelineEvents = + 'currentTimeTick' | + 'click' | + 'contextmenu' | + 'doubleClick' | + 'drop' | + 'mouseOver' | + 'mouseDown' | + 'mouseUp' | + 'mouseMove' | + 'groupDragged' | + 'changed' | + 'rangechange' | + 'rangechanged' | + 'select' | + 'itemover' | + 'itemout' | + 'timechange' | + 'timechanged'; +export type Graph2dStyleType = 'line' | 'bar' | 'points'; +export type Graph2dBarChartAlign = 'left' | 'center' | 'right'; +export type Graph2dDrawPointsStyle = 'square' | 'circle'; +export type LegendPositionType = 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left'; +export type ParametrizationInterpolationType = 'centripetal' | 'chordal' | 'uniform' | 'disabled'; +export type TopBottomEnumType = 'top' | 'bottom'; +export type RightLeftEnumType = 'right' | 'left'; + +export interface LegendPositionOptions { + visible?: boolean; + position?: LegendPositionType; +} + +export interface LegendOptions { + enabled?: boolean; + icons?: boolean; + iconSize?: number; + iconSpacing?: number; + left?: LegendPositionOptions; + right?: LegendPositionOptions; +} + +export interface DataItem { + className?: string; + content: string; + end?: DateType; + group?: any; + id?: IdType; + start: DateType; + style?: string; + subgroup?: SubgroupType; + title?: string; + type?: string; + editable?: boolean; +} + +export interface PointItem extends DataItem { + x: string; + y: number; +} + +export interface SubGroupStackOptions { + [name: string]: boolean; +} + +export interface DataGroup { + className?: string; + content: string; + id: IdType; + options?: DataGroupOptions; + style?: string; + subgroupOrder?: string | (() => void); + title?: string; + nestedGroups?: IdType[]; + subgroupStack?: SubGroupStackOptions | boolean; + visible?: boolean; + showNested?: boolean; +} + +export interface DataGroupOptions { + drawPoints?: Graph2dDrawPointsOption | (() => void); // TODO + excludeFromLegend?: boolean; + interpolation?: boolean | InterpolationOptions; + shaded?: Graph2dShadedOption; + style?: string; + yAxisOrientation?: RightLeftEnumType; +} + +export interface InterpolationOptions { + parametrization: ParametrizationInterpolationType; +} + +export interface TimelineEditableOption { + add?: boolean; + remove?: boolean; + updateGroup?: boolean; + updateTime?: boolean; + overrideItems?: boolean; +} + +export type TimelineFormatLabelsFunction = (date: Date, scale: string, step: number) => string; + +export interface TimelineFormatLabelsOption { + millisecond?: string; + second?: string; + minute?: string; + hour?: string; + weekday?: string; + day?: string; + week?: string; + month?: string; + year?: string; +} + +export interface TimelineFormatOption { + minorLabels?: TimelineFormatLabelsOption | TimelineFormatLabelsFunction; + majorLabels?: TimelineFormatLabelsOption | TimelineFormatLabelsFunction; +} + +export interface TimelineGroupEditableOption { + add?: boolean; + remove?: boolean; + order?: boolean; +} + +export interface TimelineHiddenDateOption { + start: DateType; + end: DateType; + repeat?: 'daily' | 'weekly' | 'monthly' | 'yearly'; +} + +export interface TimelineItemsAlwaysDraggableOption { + item?: boolean; + range?: boolean; +} + +export interface TimelineMarginItem { + horizontal?: number; + vertical?: number; +} + +export type TimelineMarginItemType = number | TimelineMarginItem; + +export interface TimelineMarginOption { + axis?: number; + item?: TimelineMarginItemType; +} + +export interface TimelineOrientationOption { + axis?: string; + item?: string; +} + +export interface TimelineTimeAxisOption { + scale?: TimelineTimeAxisScaleType; + step?: number; +} + +export interface TimelineRollingModeOption { + follow?: boolean; + offset?: number; +} + +export interface TimelineTooltipOption { + followMouse?: boolean; + overflowMethod?: 'cap' | 'flip'; +} + +export type TimelineOptionsConfigureFunction = (option: string, path: string[]) => boolean; +export type TimelineOptionsConfigureType = boolean | TimelineOptionsConfigureFunction; +export type TimelineOptionsDataAttributesType = boolean | string | string[]; +export type TimelineOptionsEditableType = boolean | TimelineEditableOption; +export type TimelineOptionsItemCallbackFunction = (item: TimelineItem, callback: (item: TimelineItem | null) => void) => void; +export type TimelineOptionsGroupCallbackFunction = (group: TimelineGroup, callback: (group: TimelineGroup | null) => void) => void; +export type TimelineOptionsGroupEditableType = boolean | TimelineGroupEditableOption; +export type TimelineOptionsGroupOrderType = string | TimelineOptionsComparisonFunction; +export type TimelineOptionsGroupOrderSwapFunction = (fromGroup: any, toGroup: any, groups: DataSet) => void; +export type TimelineOptionsHiddenDatesType = TimelineHiddenDateOption | TimelineHiddenDateOption[]; +export type TimelineOptionsItemsAlwaysDraggableType = boolean | TimelineItemsAlwaysDraggableOption; +export type TimelineOptionsMarginType = number | TimelineMarginOption; +export type TimelineOptionsOrientationType = string | TimelineOrientationOption; +export type TimelineOptionsSnapFunction = (date: Date, scale: string, step: number) => Date | number; +export type TimelineOptionsTemplateFunction = (item?: any, element?: any, data?: any) => string; +export type TimelineOptionsComparisonFunction = (a: any, b: any) => number; + +export interface TimelineOptions { + align?: TimelineAlignType; + autoResize?: boolean; + clickToUse?: boolean; + configure?: TimelineOptionsConfigureType; + dataAttributes?: TimelineOptionsDataAttributesType; + editable?: TimelineOptionsEditableType; + end?: DateType; + format?: TimelineFormatOption; + groupEditable?: TimelineOptionsGroupEditableType; + groupOrder?: TimelineOptionsGroupOrderType; + groupOrderSwap?: TimelineOptionsGroupOrderSwapFunction; + groupTemplate?: TimelineOptionsTemplateFunction; + height?: HeightWidthType; + hiddenDates?: TimelineOptionsHiddenDatesType; + horizontalScroll?: boolean; + itemsAlwaysDraggable?: TimelineOptionsItemsAlwaysDraggableType; + locale?: string; + locales?: any; // TODO + moment?: MomentConstructor; + margin?: TimelineOptionsMarginType; + max?: DateType; + maxHeight?: HeightWidthType; + maxMinorChars?: number; + min?: DateType; + minHeight?: HeightWidthType; + moveable?: boolean; + multiselect?: boolean; + multiselectPerGroup?: boolean; + onAdd?: TimelineOptionsItemCallbackFunction; + onAddGroup?: TimelineOptionsGroupCallbackFunction; + onInitialDrawComplete?: (() => void); + onUpdate?: TimelineOptionsItemCallbackFunction; + onMove?: TimelineOptionsItemCallbackFunction; + onMoveGroup?: TimelineOptionsGroupCallbackFunction; + onMoving?: TimelineOptionsItemCallbackFunction; + onRemove?: TimelineOptionsItemCallbackFunction; + onRemoveGroup?: TimelineOptionsGroupCallbackFunction; + order?: TimelineOptionsComparisonFunction; + orientation?: TimelineOptionsOrientationType; + rollingMode?: TimelineRollingModeOption; + rtl?: boolean; + selectable?: boolean; + showCurrentTime?: boolean; + showMajorLabels?: boolean; + showMinorLabels?: boolean; + showTooltips?: boolean; + stack?: boolean; + stackSubgroups?: boolean; + snap?: TimelineOptionsSnapFunction; + start?: DateType; + template?: TimelineOptionsTemplateFunction; + visibleFrameTemplate?: TimelineOptionsTemplateFunction; + throttleRedraw?: number; + timeAxis?: TimelineTimeAxisOption; + type?: string; + tooltip?: TimelineTooltipOption; + tooltipOnItemUpdateTime?: boolean | { template(item: any): any }; + verticalScroll?: boolean; + width?: HeightWidthType; + zoomable?: boolean; + zoomKey?: string; + zoomMax?: number; + zoomMin?: number; +} + +/** + * If true (default) or an Object, the range is animated smoothly to the new window. + * An object can be provided to specify duration and easing function. + * Default duration is 500 ms, and default easing function is 'easeInOutQuad'. + */ +export type TimelineAnimationType = boolean | AnimationOptions; + +export interface TimelineAnimationOptions { + animation?: TimelineAnimationType; +} + +export interface TimelineEventPropertiesResult { + /** + * The id of the clicked group + */ + group?: number | null; + + /** + * The id of the clicked item. + */ + item?: IdType | null; + + /** + * Absolute horizontal position of the click event. + */ + pageX: number; + + /** + * Absolute vertical position of the click event. + */ + pageY: number; + + /** + * Relative horizontal position of the click event. + */ + x: number; + + /** + * Relative vertical position of the click event. + */ + y: number; + + /** + * Date of the clicked event. + */ + time: Date; + + /** + * Date of the clicked event, snapped to a nice value. + */ + snappedTime: Date; + + /** + * Name of the clicked thing. + */ + what?: TimelineEventPropertiesResultWhatType; + + /** + * The original click event. + */ + event: Event; +} + +/** + * Options that can be passed to a DataSet. + */ +export interface DataSetOptions extends DataSetQueueOptions { + /** + * The name of the field containing the id of the items. + * When data is fetched from a server which uses some specific field to identify items, + * this field name can be specified in the DataSet using the option fieldId. + * For example CouchDB uses the field "_id" to identify documents. + */ + fieldId?: string; + + /** + * An object containing field names as key, and data types as value. + * By default, the type of the properties of items are left unchanged. + * Item properties can be normalized by specifying a field type. + * This is useful for example to automatically convert stringified dates coming + * from a server into JavaScript Date objects. + * The available data types are listed in section Data Types. + */ + type?: any; +} + +export interface DataSetQueueOptions { + /** + * Queue data changes ('add', 'update', 'remove') and flush them at once. + * The queue can be flushed manually by calling DataSet.flush(), + * or can be flushed after a configured delay or maximum number of entries. + * When queue is true, a queue is created with default options. + * Options can be specified by providing an object: + * delay: number - The queue will be flushed automatically after an inactivity of this delay in milliseconds. Default value is null. + * Default value is null. + * max: number - When the queue exceeds the given maximum number of entries, the queue is flushed automatically. Default value is Infinity. + * Default value is Infinity. + */ + queue?: any | boolean; +} + +export class DataSet { + /** + * Creates an instance of DataSet. + * + * @param [options] DataSet options. + */ + constructor(options: DataSetOptions); + + /** + * Creates an instance of DataSet. + * + * @param [data] An Array with items. + * @param [options] DataSet options. + */ + constructor(data?: T[], options?: DataSetOptions); + + /** + * The number of items in the DataSet. + */ + length: number; + + /** + * Add one or multiple items to the DataSet. + * Adding an item will fail when there already is an item with the same id. + * + * @param data data can be a single item or an array with items. + * @param [senderId] Optional sender id. + * @returns The function returns an array with the ids of the added items. + */ + add(data: T | T[], senderId?: IdType): IdType[]; + + /** + * Clear all data from the DataSet. + * + * @param [senderId] Optional sender id. + * @returns The function returns an array with the ids of the removed items. + */ + clear(senderId?: IdType): IdType[]; + + /** + * Find all distinct values of a specified field. + * If data items do not contain the specified field are ignored. + * + * @param field The search term. + * @returns Returns an unordered array containing all distinct values. + */ + distinct(field: string): any[]; + + /** + * Flush queued changes. + * Only available when the DataSet is configured with the option queue. + */ + flush(): void; + + /** + * Execute a callback function for every item in the dataset. + * + * @param callback The item callback. + * @param [options] Optional options + */ + forEach(callback: (item: T, id: IdType) => void, options?: DataSelectionOptions): void; + + /** + * Get all items from the DataSet. + * + * @param [options] Optional options. + * @returns When no item is found, null is returned when a single item was requested, + * and and empty Array is returned in case of multiple id's. + */ + get(options?: DataSelectionOptions): T[]; + + /** + * Get a single item from the DataSet. + * + * @param id The item id. + * @returns When no item is found, null is returned when a single item was requested, + * and and empty Array is returned in case of multiple id's. + */ + get(id: IdType, options?: DataSelectionOptions): T|null; + + /** + * Get multiple items from the DataSet. + * + * @param ids Array of item ids. + * @param [options] Optional options. + * @returns When no item is found, null is returned when a single item was requested, + * and and empty Array is returned in case of multiple id's. + */ + get(ids: IdType[], options?: DataSelectionOptions): T[]; + + /** + * Get the DataSet itself. + * In case of a DataView, this function does not return the DataSet + * to which the DataView is connected. + * + * @returns The DataSet itself. + */ + getDataSet(): DataSet; + + /** + * Get ids of all items or of a filtered set of items. + * + * @returns ids of all items or of a filtered set of items. + */ + getIds(options?: DataSelectionOptions): IdType[]; + + /** + * Map every item in the DataSet. + * + * @param callback The mapping callback. + * @param [options] Optional options. + * @returns The mapped items. + */ + map(callback: (item: T, id: IdType) => M, options?: DataSelectionOptions): M[]; + + /** + * Find the item with maximum value of specified field. + * + * @returns Returns null if no item is found. + */ + max(field: string): T; + + /** + * Find the item with minimum value of specified field. + * + * @returns Returns null if no item is found. + */ + min(field: string): T; + + /** + * Subscribe from an event. + * + * @param event The event name. + * @param callback + * a callback function which will be called each time the event occurs. + */ + on(event: string, callback: (event: string, properties: any, senderId: IdType) => void): void; + + /** + * Unsubscribe to an event. + * + * @param event The event name. + * @param callback + * The exact same callback that was used when calling 'on'. + */ + off(event: string, callback: (event: string, properties: any, senderId: IdType) => void): void; + + /** + * Remove one or more items by id. + * + * @param id The item id. + * @param [senderId] The sender id. + * @returns Returns an array with the ids of the removed items. + */ + remove(id: IdType | IdType[], senderId?: IdType): IdType[]; + + /** + * Set options for the DataSet. + */ + setOptions(options?: DataSetQueueOptions): void; + + /** + * Update one or multiple existing items. + * When an item doesn't exist, it will be created. + * + * @param data a single item or an array with items. + * @returns Returns an array with the ids of the updated items. + */ + update(data: T | T[], senderId?: IdType): IdType[]; +} + +/** + * The DataSet contains functionality to format, filter, and sort data retrieved + * via the methods get, getIds, forEach, and map. + * These methods can have these options as a parameter. + */ +export interface DataSelectionOptions { + /** + * An array with field names, or an object with current field name + * and new field name that the field is returned as. + * By default, all properties of the items are emitted. + * When fields is defined, only the properties whose name is specified + * in fields will be included in the returned items. + */ + fields?: string[] | any; + + /** + * An object containing field names as key, and data types as value. + * By default, the type of the properties of an item are left unchanged. + * When a field type is specified, this field in the items will be converted to the specified type. + * This can be used for example to convert ISO strings containing a date to a JavaScript Date object, + * or convert strings to numbers or vice versa. The available data types are listed in section Data Types. + */ + type?: any; + + /** + * Items can be filtered on specific properties by providing a filter function. + * A filter function is executed for each of the items in the DataSet, + * and is called with the item as parameter. + * The function must return a boolean. + * All items for which the filter function returns true will be emitted. + * See section Data Filtering. + */ + filter?(item: T): boolean; + + /** + * Order the items by a field name or custom sort function. + */ + order?: string | ((a: T, b: T) => number); + + /** + * Determine the type of output of the get function. + * Allowed values are 'Array' | 'Object'. + * The default returnType is an Array. + * The Object type will return a JSON object with the ID's as keys. + */ + returnType?: "Array" | "Object"; +} + +export class DataView { + length: number; + constructor(items: T[]); +} + +export type DataItemCollectionType = DataItem[] | DataSet | DataView; +export type DataGroupCollectionType = DataGroup[] | DataSet | DataView; + +export interface TitleOption { + text?: string; + style?: string; +} + +export interface RangeType { + min: IdType; + max: IdType; +} + +export interface DataAxisSideOption { + range?: RangeType; + format?(): string; + title?: TitleOption; +} + +export interface Graph2dBarChartOption { + width?: number; + minWidth?: number; + sideBySide?: boolean; + align?: Graph2dBarChartAlign; +} + +export interface Graph2dDataAxisOption { + orientation?: TimelineOptionsOrientationType; + showMinorLabels?: boolean; + showMajorLabels?: boolean; + majorLinesOffset?: number; + minorLinesOffset?: number; + labelOffsetX?: number; + labelOffsetY?: number; + iconWidth?: number; + width?: string; + icons?: boolean; + visible?: boolean; + alignZeros?: boolean; + left?: DataAxisSideOption; + right?: DataAxisSideOption; +} + +export interface Graph2dDrawPointsOption { + enabled?: boolean; + onRender?(): boolean; // TODO + size?: number; + style: Graph2dDrawPointsStyle; +} + +export interface Graph2dShadedOption { + orientation?: TopBottomEnumType; + groupid?: IdType; +} + +export type Graph2dOptionBarChart = number | Graph2dBarChartOption; +export type Graph2dOptionDataAxis = boolean | Graph2dDataAxisOption; +export type Graph2dOptionDrawPoints = boolean | Graph2dDrawPointsOption; +export type Graph2dLegendOption = boolean | LegendOptions; + +export interface Graph2dOptions { + autoResize?: boolean; + barChart?: Graph2dOptionBarChart; + clickToUse?: boolean; + configure?: TimelineOptionsConfigureType; + dataAxis?: Graph2dOptionDataAxis; + defaultGroup?: string; + drawPoints?: Graph2dOptionDrawPoints; + end?: DateType; + format?: any; // TODO + graphHeight?: HeightWidthType; + height?: HeightWidthType; + hiddenDates?: any; // TODO + legend?: Graph2dLegendOption; + locale?: string; + locales?: any; // TODO + moment?: MomentConstructor; + max?: DateType; + maxHeight?: HeightWidthType; + maxMinorChars?: number; + min?: DateType; + minHeight?: HeightWidthType; + moveable?: boolean; + multiselect?: boolean; + orientation?: string; + sampling?: boolean; + showCurrentTime?: boolean; + showMajorLabels?: boolean; + showMinorLabels?: boolean; + sort?: boolean; + stack?: boolean; + start?: DateType; + style?: Graph2dStyleType; + throttleRedraw?: number; + timeAxis?: TimelineTimeAxisOption; + width?: HeightWidthType; + yAxisOrientation?: RightLeftEnumType; + zoomable?: boolean; + zoomKey?: string; + zoomMax?: number; + zoomMin?: number; + zIndex?: number; +} + +export class Graph2d { + constructor( + container: HTMLElement, + items: DataItemCollectionType, + groups: DataGroupCollectionType, + options?: Graph2dOptions + ); + constructor( + container: HTMLElement, + items: DataItemCollectionType, + options?: Graph2dOptions + ); + + addCustomTime(time: DateType, id?: IdType): IdType; + destroy(): void; + fit(options?: TimelineAnimationOptions): void; + focus(ids: IdType | IdType[], options?: TimelineAnimationOptions): void; + getCurrentTime(): Date; + getCustomTime(id?: IdType): Date; + getEventProperties(event: Event): TimelineEventPropertiesResult; + getItemRange(): any; // TODO + getSelection(): IdType[]; + getVisibleItems(): IdType[]; + getWindow(): { start: Date, end: Date }; + moveTo(time: DateType, options?: TimelineAnimationOptions): void; + on(event: TimelineEvents, callback: () => void): void; + off(event: TimelineEvents, callback: () => void): void; + redraw(): void; + removeCustomTime(id: IdType): void; + setCurrentTime(time: DateType): void; + setCustomTime(time: DateType, id?: IdType): void; + setCustomTimeTitle(title: string, id?: IdType): void; + setData(data: { groups?: DataGroupCollectionType; items?: DataItemCollectionType }): void; + setGroups(groups?: DataGroupCollectionType): void; + setItems(items: DataItemCollectionType): void; + setOptions(options: TimelineOptions): void; + setSelection(ids: IdType | IdType[]): void; + setWindow(start: DateType, end: DateType, options?: TimelineAnimationOptions): void; +} + +export interface Graph2d { + setGroups(groups?: TimelineGroup[]): void; + setItems(items?: TimelineItem[]): void; + getLegend(): TimelineWindow; + getWindow(): TimelineWindow; + setWindow(start: any, date: any): void; + focus(selection: any): void; + on(event?: string, callback?: (properties: any) => void): void; +} + +export class Timeline { + constructor( + container: HTMLElement, + items: DataItemCollectionType, + groups: DataGroupCollectionType, + options?: TimelineOptions + ); + + constructor( + container: HTMLElement, + items: DataItemCollectionType, + options?: TimelineOptions + ); + + /** + * Add new vertical bar representing a custom time that can be dragged by the user. + * Parameter time can be a Date, Number, or String, and is new Date() by default. + * Parameter id can be Number or String and is undefined by default. + * The id is added as CSS class name of the custom time bar, allowing to style multiple time bars differently. + * The method returns id of the created bar. + */ + addCustomTime(time: DateType, id?: IdType): IdType; + + /** + * Destroy the Timeline. The timeline is removed from memory. all DOM elements and event listeners are cleaned up. + */ + destroy(): void; + + /** + * Adjust the visible window such that it fits all items. See also focus(id). + */ + fit(options?: TimelineAnimationOptions): void; + + /** + * Adjust the visible window such that the selected item (or multiple items) are centered on screen. See also function fit() + */ + focus(ids: IdType | IdType[], options?: TimelineAnimationOptions): void; + + /** + * Get the current time. Only applicable when option showCurrentTime is true. + */ + getCurrentTime(): Date; + + /** + * Retrieve the custom time from the custom time bar with given id. + * @param id Id is undefined by default. + */ + getCustomTime(id?: IdType): Date; + + getEventProperties(event: Event): TimelineEventPropertiesResult; + + /** + * Get the range of all the items as an object containing min date and max date + */ + getItemRange(): { min: Date, max: Date }; + + /** + * Get an array with the ids of the currently selected items + */ + getSelection(): IdType[]; + + /** + * Get an array with the ids of the currently visible items. + */ + getVisibleItems(): IdType[]; + + /** + * Get the current visible window. + */ + getWindow(): TimelineWindow; + + /** + * Move the window such that given time is centered on screen. + */ + moveTo(time: DateType, options?: TimelineAnimationOptions, callback?: (properties?: any) => void): void; + + /** + * Create an event listener. The callback function is invoked every time the event is triggered. + */ + on(event: TimelineEvents, callback?: (properties?: any) => void): void; + + /** + * Remove an event listener created before via function on(event[, callback]). + */ + off(event: TimelineEvents, callback?: (properties?: any) => void): void; + + /** + * Force a redraw of the Timeline. The size of all items will be recalculated. + * Can be useful to manually redraw when option autoResize=false and the window has been resized, or when the items CSS has been changed. + */ + redraw(): void; + + /** + * Remove vertical bars previously added to the timeline via addCustomTime method. + * @param id ID of the custom vertical bar returned by addCustomTime method. + */ + removeCustomTime(id: IdType): void; + + /** + * Set a current time. This can be used for example to ensure that a client's time is synchronized with a shared server time. + * Only applicable when option showCurrentTime is true. + */ + setCurrentTime(time: DateType): void; + + /** + * Adjust the time of a custom time bar. + * @param time The time the custom time bar should point to + * @param id Id of the custom time bar, and is undefined by default. + */ + setCustomTime(time: DateType, id?: IdType): void; + + /** + * Adjust the title attribute of a custom time bar. + * @param title The title shown when hover over time bar + * @param id Id of the custom time bar, and is undefined by default. + */ + setCustomTimeTitle(title: string, id?: IdType): void; + + /** + * Set both groups and items at once. Both properties are optional. + * This is a convenience method for individually calling both setItems(items) and setGroups(groups). + * Both items and groups can be an Array with Objects, a DataSet (offering 2 way data binding), or a DataView (offering 1 way data binding). + */ + setData(data: { groups?: DataGroupCollectionType; items?: DataItemCollectionType }): void; + + /** + * Set a data set with groups for the Timeline. + */ + setGroups(groups?: DataGroupCollectionType): void; + + /** + * Set a data set with items for the Timeline. + */ + setItems(items: DataItemCollectionType): void; + + /** + * Set or update options. It is possible to change any option of the timeline at any time. + * You can for example switch orientation on the fly. + */ + setOptions(options: TimelineOptions): void; + + /** + * Select one or multiple items by their id. The currently selected items will be unselected. + * To unselect all selected items, call `setSelection([])`. + */ + setSelection(ids: IdType | IdType[], options?: { focus: boolean, animation: TimelineAnimationOptions }): void; + + /** + * Set the current visible window. + * @param start If the parameter value of start is null, the parameter will be left unchanged. + * @param end If the parameter value of end is null, the parameter will be left unchanged. + * @param options Timeline animation options. See {@link TimelineAnimationOptions} + * @param callback The callback function + */ + setWindow(start: DateType, end: DateType, options?: TimelineAnimationOptions, callback?: () => void): void; + + /** + * Toggle rollingMode. + */ + toggleRollingMode(): void; + + /** + * Zoom in the current visible window. + * @param percentage A number and must be between 0 and 1. If null, the window will be left unchanged. + * @param options Timeline animation options. See {@link TimelineAnimationOptions} + * @param callback The callback function + */ + zoomIn(percentage: number, options?: TimelineAnimationOptions, callback?: () => void): void; + + /** + * Zoom out the current visible window. + * @param percentage A number and must be between 0 and 1. If null, the window will be left unchanged. + * @param options Timeline animation options. See {@link TimelineAnimationOptions} + * @param callback The callback function + */ + zoomOut(percentage: number, options?: TimelineAnimationOptions, callback?: () => void): void; +} + +export interface TimelineStatic { + new(id: HTMLElement, data: any, options?: any): vis.Timeline; +} + +export interface Timeline { + setGroups(groups?: TimelineGroup[]): void; + setItems(items?: TimelineItem[]): void; + getWindow(): TimelineWindow; + setWindow(start: any, date: any): void; + focus(selection: any): void; + on(event?: string, callback?: (properties: any) => void): void; + off(event: string, callback?: (properties?: any) => void): void; +} + +export interface TimelineWindow { + start: Date; + end: Date; +} + +export interface TimelineItemEditableOption { + remove?: boolean; + updateGroup?: boolean; + updateTime?: boolean; +} + +export type TimelineItemEditableType = boolean | TimelineItemEditableOption; + +export interface TimelineItem { + className?: string; + align?: TimelineAlignType; + content: string; + end?: DateType; + group?: IdType; + id: IdType; + start: DateType; + style?: string; + subgroup?: IdType; + title?: string; + type?: TimelineItemType; + editable?: TimelineItemEditableType; +} + +export interface TimelineGroup { + className?: string; + content: string | HTMLElement; + id: IdType; + style?: string; + order?: number; + subgroupOrder?: TimelineOptionsGroupOrderType; + title?: string; + visible?: boolean; + nestedGroups?: IdType[]; + showNested?: boolean; +} + +export interface VisSelectProperties { + items: number[]; +} + +export type NetworkEvents = + 'click' | + 'doubleClick' | + 'oncontext' | + 'hold' | + 'release' | + 'select' | + 'selectNode' | + 'selectEdge' | + 'deselectNode' | + 'deselectEdge' | + 'dragStart' | + 'dragging' | + 'dragEnd' | + 'hoverNode' | + 'blurNode' | + 'hoverEdge' | + 'blurEdge' | + 'zoom' | + 'showPopup' | + 'hidePopup' | + 'startStabilizing' | + 'stabilizationProgress' | + 'stabilizationIterationsDone' | + 'stabilized' | + 'resize' | + 'initRedraw' | + 'beforeDrawing' | + 'afterDrawing' | + 'animationFinished' | + 'configChange'; + +/** + * Network is a visualization to display networks and networks consisting of nodes and edges. + * The visualization is easy to use and supports custom shapes, styles, colors, sizes, images, and more. + * The network visualization works smooth on any modern browser for up to a few thousand nodes and edges. + * To handle a larger amount of nodes, Network has clustering support. Network uses HTML canvas for rendering. + */ +export class Network { + /** + * Creates an instance of Network. + * + * @param container the HTML element representing the network container + * @param data network data + * @param [options] optional network options + */ + constructor(container: HTMLElement, data: Data, options?: Options); + + /** + * Remove the network from the DOM and remove all Hammer bindings and references. + */ + destroy(): void; + + /** + * Override all the data in the network. + * If stabilization is enabled in the physics module, + * the network will stabilize again. + * This method is also performed when first initializing the network. + * + * @param data network data + */ + setData(data: Data): void; + + /** + * Set the options. + * All available options can be found in the modules above. + * Each module requires it's own container with the module name to contain its options. + * + * @param options network options + */ + setOptions(options: Options): void; + + /** + * Set an event listener. + * Depending on the type of event you get different parameters for the callback function. + * + * @param eventName the name of the event, f.e. 'click' + * @param callback the callback function that will be raised + */ + on(eventName: NetworkEvents, callback: (params?: any) => void): void; + + /** + * Remove an event listener. + * The function you supply has to be the exact same as the one you used in the on function. + * If no function is supplied, all listeners will be removed. + * + * @param eventName the name of the event, f.e. 'click' + * @param [callback] the exact same callback function that was used when calling 'on' + */ + off(eventName: NetworkEvents, callback?: (params?: any) => void): void; + + /** + * Set an event listener only once. + * After it has taken place, the event listener will be removed. + * Depending on the type of event you get different parameters for the callback function. + * + * @param eventName the name of the event, f.e. 'click' + * @param callback the callback function that will be raised once + */ + once(eventName: NetworkEvents, callback: (params?: any) => void): void; + + /** + * This function converts canvas coordinates to coordinates on the DOM. + * Input and output are in the form of {x:Number, y:Number} (IPosition interface). + * The DOM values are relative to the network container. + * + * @param position the canvas coordinates + * @returns the DOM coordinates + */ + canvasToDOM(position: Position): Position; + + /** + * This function converts DOM coordinates to coordinates on the canvas. + * Input and output are in the form of {x:Number,y:Number} (IPosition interface). + * The DOM values are relative to the network container. + * + * @param position the DOM coordinates + * @returns the canvas coordinates + */ + DOMtoCanvas(position: Position): Position; + + /** + * Redraw the network. + */ + redraw(): void; + + /** + * Set the size of the canvas. + * This is automatically done on a window resize. + * + * @param width width in a common format, f.e. '100px' + * @param height height in a common format, f.e. '100px' + */ + setSize(width: string, height: string): void; + + /** + * The joinCondition function is presented with all nodes. + */ + cluster(options?: ClusterOptions): void; + + /** + * This method looks at the provided node and makes a cluster of it and all it's connected nodes. + * The behaviour can be customized by proving the options object. + * All options of this object are explained below. + * The joinCondition is only presented with the connected nodes. + * + * @param nodeId the id of the node + * @param [options] the cluster options + */ + clusterByConnection(nodeId: string, options?: ClusterOptions): void; + + /** + * This method checks all nodes in the network and those with a equal or higher + * amount of edges than specified with the hubsize qualify. + * If a hubsize is not defined, the hubsize will be determined as the average + * value plus two standard deviations. + * For all qualifying nodes, clusterByConnection is performed on each of them. + * The options object is described for clusterByConnection and does the same here. + * + * @param [hubsize] optional hubsize + * @param [options] optional cluster options + */ + clusterByHubsize(hubsize?: number, options?: ClusterOptions): void; + + /** + * This method will cluster all nodes with 1 edge with their respective connected node. + * + * @param [options] optional cluster options + */ + clusterOutliers(options?: ClusterOptions): void; + + /** + * Nodes can be in clusters. + * Clusters can also be in clusters. + * This function returns an array of nodeIds showing where the node is. + * + * Example: + * cluster 'A' contains cluster 'B', cluster 'B' contains cluster 'C', + * cluster 'C' contains node 'fred'. + * + * network.clustering.findNode('fred') will return ['A','B','C','fred']. + * + * @param nodeId the node id. + * @returns an array of nodeIds showing where the node is + */ + findNode(nodeId: IdType): IdType[]; + + /** + * Similar to findNode in that it returns all the edge ids that were + * created from the provided edge during clustering. + * + * @param baseEdgeId the base edge id + * @returns an array of edgeIds + */ + getClusteredEdges(baseEdgeId: IdType): IdType[]; + + /** + * When a clusteredEdgeId is available, this method will return the original + * baseEdgeId provided in data.edges ie. + * After clustering the 'SelectEdge' event is fired but provides only the clustered edge. + * This method can then be used to return the baseEdgeId. + */ + getBaseEdge(clusteredEdgeId: IdType): IdType; + + /** + * For the given clusteredEdgeId, this method will return all the original + * base edge id's provided in data.edges. + * For a non-clustered (i.e. 'base') edge, clusteredEdgeId is returned. + * Only the base edge id's are returned. + * All clustered edges id's under clusteredEdgeId are skipped, + * but scanned recursively to return their base id's. + */ + getBaseEdges(clusteredEdgeId: IdType): IdType[]; + + /** + * Visible edges between clustered nodes are not the same edge as the ones provided + * in data.edges passed on network creation. With each layer of clustering, copies of + * the edges between clusters are created and the previous edges are hidden, + * until the cluster is opened. This method takes an edgeId (ie. a base edgeId from data.edges) + * and applys the options to it and any edges that were created from it while clustering. + */ + updateEdge(startEdgeId: IdType, options?: EdgeOptions): void; + + /** + * Clustered Nodes when created are not contained in the original data.nodes + * passed on network creation. This method updates the cluster node. + */ + updateClusteredNode(clusteredNodeId: IdType, options?: NodeOptions): void; + + /** + * Returns true if the node whose ID has been supplied is a cluster. + * + * @param nodeId the node id. + */ + isCluster(nodeId: IdType): boolean; + + /** + * Returns an array of all nodeIds of the nodes that + * would be released if you open the cluster. + * + * @param clusterNodeId the id of the cluster node + */ + getNodesInCluster(clusterNodeId: IdType): IdType[]; + + /** + * Opens the cluster, releases the contained nodes and edges, + * removing the cluster node and cluster edges. + * The options object is optional and currently supports one option, + * releaseFunction, which is a function that can be used to manually + * position the nodes after the cluster is opened. + * + * @param nodeId the node id + * @param [options] optional open cluster options + */ + openCluster(nodeId: IdType, options?: OpenClusterOptions): void; + + /** + * If you like the layout of your network + * and would like it to start in the same way next time, + * ask for the seed using this method and put it in the layout.randomSeed option. + * + * @returns the current seed of the network. + */ + getSeed(): number; + + /** + * Programatically enable the edit mode. + * Similar effect to pressing the edit button. + */ + enableEditMode(): void; + + /** + * Programatically disable the edit mode. + * Similar effect to pressing the close icon (small cross in the corner of the toolbar). + */ + disableEditMode(): void; + + /** + * Go into addNode mode. Having edit mode or manipulation enabled is not required. + * To get out of this mode, call disableEditMode(). + * The callback functions defined in handlerFunctions still apply. + * To use these methods without having the manipulation GUI, make sure you set enabled to false. + */ + addNodeMode(): void; + + /** + * Edit the selected node. + * The explaination from addNodeMode applies here as well. + */ + editNode(): void; + + /** + * Go into addEdge mode. + * The explaination from addNodeMode applies here as well. + */ + addEdgeMode(): void; + + /** + * Go into editEdge mode. + * The explaination from addNodeMode applies here as well. + */ + editEdgeMode(): void; + + /** + * Delete selected. + * Having edit mode or manipulation enabled is not required. + */ + deleteSelected(): void; + + /** + * Returns the x y positions in canvas space of the nodes with the supplied nodeIds as an object. + * + * Alternative inputs are a String containing a nodeId or nothing. + * When a String is supplied, the position of the node corresponding to the ID is returned. + * When nothing is supplied, the positions of all nodes are returned. + */ + getPositions(nodeIds?: IdType[]): { [nodeId: string]: Position }; + getPositions(nodeId: IdType): Position; + + /** + * When using the vis.DataSet to load your nodes into the network, + * this method will put the X and Y positions of all nodes into that dataset. + * If you're loading your nodes from a database and have this dynamically coupled with the DataSet, + * you can use this to stablize your network once, then save the positions in that database + * through the DataSet so the next time you load the nodes, stabilization will be near instantaneous. + * + * If the nodes are still moving and you're using dynamic smooth edges (which is on by default), + * you can use the option stabilization.onlyDynamicEdges in the physics module to improve initialization time. + * + * This method does not support clustering. + * At the moment it is not possible to cache positions when using clusters since + * they cannot be correctly initialized from just the positions. + */ + storePositions(): void; + + /** + * You can use this to programatically move a node. + * The supplied x and y positions have to be in canvas space! + * + * @param nodeId the node that will be moved + * @param x new canvas space x position + * @param y new canvas space y position + */ + moveNode(nodeId: IdType, x: number, y: number): void; + + /** + * Returns a bounding box for the node including label. + * + */ + getBoundingBox(nodeId: IdType): BoundingBox; + + /** + * Returns an array of nodeIds of the all the nodes that are directly connected to this node. + * If you supply an edgeId, vis will first match the id to nodes. + * If no match is found, it will search in the edgelist and return an array: [fromId, toId]. + * + * @param nodeOrEdgeId a node or edge id + */ + getConnectedNodes(nodeOrEdgeId: IdType, direction?: DirectionType): IdType[] | Array<{ fromId: IdType, toId: IdType }>; + + /** + * Returns an array of edgeIds of the edges connected to this node. + * + * @param nodeId the node id + */ + getConnectedEdges(nodeId: IdType): IdType[]; + + /** + * Start the physics simulation. + * This is normally done whenever needed and is only really useful + * if you stop the simulation yourself and wish to continue it afterwards. + */ + startSimulation(): void; + + /** + * This stops the physics simulation and triggers a stabilized event. + * Tt can be restarted by dragging a node, + * altering the dataset or calling startSimulation(). + */ + stopSimulation(): void; + + /** + * You can manually call stabilize at any time. + * All the stabilization options above are used. + * You can optionally supply the number of iterations it should do. + * + * @param [iterations] the number of iterations it should do + */ + stabilize(iterations?: number): void; + + /** + * Returns an object with selected nodes and edges ids. + * + */ + getSelection(): { nodes: IdType[], edges: IdType[] }; + + /** + * Returns an array of selected node ids like so: + * [nodeId1, nodeId2, ..]. + * + */ + getSelectedNodes(): IdType[]; + + /** + * Returns an array of selected edge ids like so: + * [edgeId1, edgeId2, ..]. + * + */ + getSelectedEdges(): IdType[]; + + /** + * Returns a nodeId or undefined. + * The DOM positions are expected to be in pixels from the top left corner of the canvas. + * + */ + getNodeAt(position: Position): IdType; + + /** + * Returns a edgeId or undefined. + * The DOM positions are expected to be in pixels from the top left corner of the canvas. + * + */ + getEdgeAt(position: Position): IdType; + + /** + * Selects the nodes corresponding to the id's in the input array. + * If highlightEdges is true or undefined, the neighbouring edges will also be selected. + * This method unselects all other objects before selecting its own objects. Does not fire events. + * + */ + selectNodes(nodeIds: IdType[], highlightEdges?: boolean): void; + + /** + * Selects the edges corresponding to the id's in the input array. + * This method unselects all other objects before selecting its own objects. + * Does not fire events. + * + */ + selectEdges(edgeIds: IdType[]): void; + + /** + * Sets the selection. + * You can also pass only nodes or edges in selection object. + * + */ + setSelection(selection: { nodes: IdType[], edges: IdType[] }, options?: SelectionOptions): void; + + /** + * Unselect all objects. + * Does not fire events. + */ + unselectAll(): void; + + /** + * Returns the current scale of the network. + * 1.0 is comparible to 100%, 0 is zoomed out infinitely. + * + * @returns the current scale of the network + */ + getScale(): number; + + /** + * Returns the current central focus point of the view in the form: { x: {Number}, y: {Number} } + * + * @returns the view position; + */ + getViewPosition(): Position; + + /** + * Zooms out so all nodes fit on the canvas. + * + * @param [options] All options are optional for the fit method + */ + fit(options?: FitOptions): void; + + /** + * You can focus on a node with this function. + * What that means is the view will lock onto that node, if it is moving, the view will also move accordingly. + * If the view is dragged by the user, the focus is broken. You can supply options to customize the effect. + * + */ + focus(nodeId: IdType, options?: FocusOptions): void; + + /** + * You can animate or move the camera using the moveTo method. + * + */ + moveTo(options: MoveToOptions): void; + + /** + * Programatically release the focussed node. + */ + releaseNode(): void; + + /** + * If you use the configurator, you can call this method to get an options object that contains + * all differences from the default options caused by users interacting with the configurator. + * + */ + getOptionsFromConfigurator(): any; +} + +/** + * Options interface for focus function. + */ +export interface FocusOptions extends ViewPortOptions { + /** + * Locked denotes whether or not the view remains locked to + * the node once the zoom-in animation is finished. + * Default value is true. + */ + locked?: boolean; +} + +/** + * Base options interface for some viewport functions. + */ +export interface ViewPortOptions { + /** + * The scale is the target zoomlevel. + * Default value is 1.0. + */ + scale?: number; + + /** + * The offset (in DOM units) is how many pixels from the center the view is focussed. + * Default value is {x:0,y:0} + */ + offset?: Position; + + /** + * For animation you can either use a Boolean to use it with the default options or + * disable it or you can define the duration (in milliseconds) and easing function manually. + */ + animation?: AnimationOptions | boolean; +} + +/** + * You will have to define at least a scale, position or offset. + * Otherwise, there is nothing to move to. + */ +export interface MoveToOptions extends ViewPortOptions { + /** + * The position (in canvas units!) is the position of the central focus point of the camera. + */ + position?: Position; +} + +/** + * Animation options interface. + */ +export interface AnimationOptions { + /** + * The duration (in milliseconds). + */ + duration: number; + /** + * The easing function. + * + * Available are: + * linear, easeInQuad, easeOutQuad, easeInOutQuad, easeInCubic, + * easeOutCubic, easeInOutCubic, easeInQuart, easeOutQuart, easeInOutQuart, + * easeInQuint, easeOutQuint, easeInOutQuint. + */ + easingFunction: EasingFunction; +} + +export type EasingFunction = + 'linear' | + 'easeInQuad' | + 'easeOutQuad' | + 'easeInOutQuad' | + 'easeInCubic' | + 'easeOutCubic' | + 'easeInOutCubic' | + 'easeInQuart' | + 'easeOutQuart' | + 'easeInOutQuart' | + 'easeInQuint' | + 'easeOutQuint' | + 'easeInOutQuint'; + +/** + * Optional options for the fit method. + */ +export interface FitOptions { + /** + * The nodes can be used to zoom to fit only specific nodes in the view. + */ + nodes?: string[]; + + /** + * For animation you can either use a Boolean to use it with the default options or + * disable it or you can define the duration (in milliseconds) and easing function manually. + */ + animation: TimelineAnimationType; +} + +export interface SelectionOptions { + unselectAll?: boolean; + highlightEdges?: boolean; +} + +/** + * These values are in canvas space. + */ +export interface BoundingBox { + top: number; + left: number; + right: number; + bottom: number; +} + +/** + * Cluster methods options interface. + */ +export interface ClusterOptions { + /** + * Optional for all but the cluster method. + * The cluster module loops over all nodes that are selected to be in the cluster + * and calls this function with their data as argument. If this function returns true, + * this node will be added to the cluster. You have access to all options (including the default) + * as well as any custom fields you may have added to the node to determine whether or not to include it in the cluster. + */ + joinCondition?(nodeOptions: any): boolean; + + /** + * Optional. + * Before creating the new cluster node, this (optional) function will be called with the properties + * supplied by you (clusterNodeProperties), all contained nodes and all contained edges. + * You can use this to update the properties of the cluster based on which items it contains. + * The function should return the properties to create the cluster node. + */ + processProperties?(clusterOptions: any, childNodesOptions: any[], childEdgesOptions: any[]): any; + + /** + * Optional. + * This is an object containing the options for the cluster node. + * All options described in the nodes module are allowed. + * This allows you to style your cluster node any way you want. + * This is also the style object that is provided in the processProperties function for fine tuning. + * If undefined, default node options will be used. + */ + clusterNodeProperties?: NodeOptions; + + /** + * Optional. + * This is an object containing the options for the edges connected to the cluster. + * All options described in the edges module are allowed. + * Using this, you can style the edges connecting to the cluster any way you want. + * If none are provided, the options from the edges that are replaced are used. + * If undefined, default edge options will be used. + */ + clusterEdgeProperties?: EdgeOptions; +} + +/** + * Options for the openCluster function of Network. + */ +export interface OpenClusterOptions { + /** + * A function that can be used to manually position the nodes after the cluster is opened. + * The containedNodesPositions contain the positions of the nodes in the cluster at the + * moment they were clustered. This function is expected to return the newPositions, + * which can be the containedNodesPositions (altered) or a new object. + * This has to be an object with keys equal to the nodeIds that exist in the + * containedNodesPositions and an {x:x,y:y} position object. + * + * For all nodeIds not listed in this returned object, + * we will position them at the location of the cluster. + * This is also the default behaviour when no releaseFunction is defined. + */ + releaseFunction( + clusterPosition: Position, + containedNodesPositions: { [nodeId: string]: Position }): { [nodeId: string]: Position }; +} + +export interface Position { + x: number; + y: number; +} + +export interface Properties { + nodes: string[]; + + edges: string[]; + + event: string[]; + + pointer: { + DOM: Position; + canvas: Position; + }; + + previousSelection?: { + nodes: string[]; + edges: string[]; + }; +} + +export interface Callback { + callback?(params?: any): void; +} + +export interface Data { + nodes?: Node[] | DataSet; + edges?: Edge[] | DataSet; +} + +export interface Node extends NodeOptions { + id?: IdType; +} + +export interface Edge extends EdgeOptions { + from?: IdType; + to?: IdType; + id?: IdType; +} + +export interface Locales { + [language: string]: LocaleMessages | undefined; + en?: LocaleMessages; + cn?: LocaleMessages; + de?: LocaleMessages; + es?: LocaleMessages; + it?: LocaleMessages; + nl?: LocaleMessages; + 'pt-br'?: LocaleMessages; + ru?: LocaleMessages; +} + +export interface LocaleMessages { + edit: string; + del: string; + back: string; + addNode: string; + addEdge: string; + editNode: string; + editEdge: string; + addDescription: string; + edgeDescription: string; + editEdgeDescription: string; + createEdgeError: string; + deleteClusterError: string; + editClusterError: string; +} + +export interface Options { + autoResize?: boolean; + + width?: string; + + height?: string; + + locale?: string; + + locales?: Locales; + + clickToUse?: boolean; + + configure?: any; // http://visjs.org/docs/network/configure.html# + + edges?: EdgeOptions; + + nodes?: NodeOptions; + + groups?: any; + + layout?: any; // http://visjs.org/docs/network/layout.html + + interaction?: any; // visjs.org/docs/network/interaction.html?keywords=edges + + manipulation?: any; // http://visjs.org/docs/network/manipulation.html# + + physics?: any; // http://visjs.org/docs/network/physics.html# +} + +export interface Image { + unselected?: string; + selected?: string; +} + +export interface Color { + border?: string; + + background?: string; + + highlight?: string | { + border?: string; + background?: string; + }; + + hover?: string | { + border?: string; + background?: string; + }; +} + +export interface NodeOptions { + borderWidth?: number; + + borderWidthSelected?: number; + + brokenImage?: string; + + color?: string | Color; + + fixed?: boolean | { + x?: boolean, + y?: boolean, + }; + + font?: string | { + color?: string, + size?: number, // px + face?: string, + background?: string, + strokeWidth?: number, // px + strokeColor?: string, + align?: string, + vadjust?: string, + multi?: string, + bold?: string | FontOptions, + ital?: string | FontOptions, + boldital?: string | FontOptions, + mono?: string | FontOptions, + }; + + group?: string; + + hidden?: boolean; + + icon?: { + face?: string, + code?: string, + size?: number, // 50, + color?: string, + }; + + image?: string | Image; + + label?: string; + + labelHighlightBold?: boolean; + + level?: number; + + margin?: { + top?: number; + right?: number; + bottom?: number; + left?: number; + }; + + mass?: number; + + physics?: boolean; + + scaling?: OptionsScaling; + + shadow?: boolean | OptionsShadow; + + shape?: string; + + shapeProperties?: { + borderDashes?: boolean | number[], // only for borders + borderRadius?: number, // only for box shape + interpolation?: boolean, // only for image and circularImage shapes + useImageSize?: boolean, // only for image and circularImage shapes + useBorderWithImage?: boolean // only for image shape + }; + + size?: number; + + title?: string; + + value?: number; + + /** + * If false, no widthConstraint is applied. If a number is specified, the minimum and maximum widths of the node are set to the value. + * The node's label's lines will be broken on spaces to stay below the maximum and the node's width + * will be set to the minimum if less than the value. + */ + widthConstraint?: number | boolean | { minimum?: number, maximum?: number }; + + x?: number; + + y?: number; +} + +export interface EdgeOptions { + arrows?: string | { + to?: boolean | { + enabled?: boolean, + scaleFactor?: number, + type?: string + }, + middle?: boolean | { + enabled?: boolean, + scaleFactor?: number, + type?: string + }, + from?: boolean | { + enabled?: boolean, + scaleFactor?: number, + type?: string + } + }; + + arrowStrikethrough?: boolean; + + color?: string | { + color?: string, + highlight?: string, + hover?: string, + inherit?: boolean | string, + opacity?: number, + }; + + dashes?: boolean | number[]; + + font?: string | { + color?: string, + size?: number, // px + face?: string, + background?: string, + strokeWidth?: number, // px + strokeColor?: string, + align?: string, + vadjust?: string, + multi?: string, + bold?: string | FontOptions, + ital?: string | FontOptions, + boldital?: string | FontOptions, + mono?: string | FontOptions, + }; + + hidden?: boolean; + + hoverWidth?: number; // please note, hoverWidth could be also a function. This case is not represented here + + label?: string; + + labelHighlightBold?: boolean; + + length?: number; + + physics?: boolean; + + scaling?: OptionsScaling; + + selectionWidth?: number; // please note, selectionWidth could be also a function. This case is not represented here + + selfReferenceSize?: number; + + shadow?: boolean | OptionsShadow; + + smooth?: boolean | { + enabled: boolean, + type: string, + forceDirection?: string | boolean, + roundness: number, + }; + + title?: string; + + value?: number; + + width?: number; +} + +export interface FontOptions { + color?: string; + size?: number; + face?: string; + mod?: string; + vadjust?: string; +} + +export interface OptionsScaling { + min?: number; + max?: number; + label?: boolean | { + enabled?: boolean, + min?: number, + max?: number, + maxVisible?: number, + drawThreshold?: number + }; + customScalingFunction?(min?: number, max?: number, total?: number, value?: number): number; +} + +export interface OptionsShadow { + enabled: boolean; + color: string; + size: number; + x: number; + y: number; +} + +export as namespace vis; diff --git a/node_modules/vis-network/dist/vis-network.css b/node_modules/vis-network/dist/vis-network.css index 46633aa9cc23c9a0b3072195d4a8c8ab565add9e..b0809f44a7b97f72836d11f9d91b8ec43631ed14 100644 --- a/node_modules/vis-network/dist/vis-network.css +++ b/node_modules/vis-network/dist/vis-network.css @@ -1,186 +1,311 @@ +.vis .overlay { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; -div.vis-color-picker { - position:absolute; - top: 0px; - left: 30px; - margin-top:-140px; - margin-left:30px; - width:310px; - height:444px; - z-index: 1; - padding: 10px; - border-radius:15px; - background-color:#ffffff; - display: none; - box-shadow: rgba(0,0,0,0.5) 0px 0px 10px 0px; + /* Must be displayed above for example selected Timeline items */ + z-index: 10; } -div.vis-color-picker div.vis-arrow { - position: absolute; - top:147px; - left:5px; +.vis-active { + box-shadow: 0 0 10px #86d5f8; } -div.vis-color-picker div.vis-arrow::after, -div.vis-color-picker div.vis-arrow::before { - right: 100%; - top: 50%; - border: solid transparent; - content: " "; - height: 0; - width: 0; - position: absolute; - pointer-events: none; +div.vis-configuration { + position:relative; + display:block; + float:left; + font-size:12px; } -div.vis-color-picker div.vis-arrow:after { - border-color: rgba(255, 255, 255, 0); - border-right-color: #ffffff; - border-width: 30px; - margin-top: -30px; +div.vis-configuration-wrapper { + display:block; + width:700px; } -div.vis-color-picker div.vis-color { - position:absolute; - width: 289px; - height: 289px; - cursor: pointer; +div.vis-configuration-wrapper::after { + clear: both; + content: ""; + display: block; } - - -div.vis-color-picker div.vis-brightness { - position: absolute; - top:313px; +div.vis-configuration.vis-config-option-container{ + display:block; + width:495px; + background-color: #ffffff; + border:2px solid #f7f8fa; + border-radius:4px; + margin-top:20px; + left:10px; + padding-left:5px; } -div.vis-color-picker div.vis-opacity { - position:absolute; - top:350px; +div.vis-configuration.vis-config-button{ + display:block; + width:495px; + height:25px; + vertical-align: middle; + line-height:25px; + background-color: #f7f8fa; + border:2px solid #ceced0; + border-radius:4px; + margin-top:20px; + left:10px; + padding-left:5px; + cursor: pointer; + margin-bottom:30px; } -div.vis-color-picker div.vis-selector { - position:absolute; - top:137px; - left:137px; - width:15px; - height:15px; - border-radius:15px; - border:1px solid #ffffff; - background: #4c4c4c; /* Old browsers */ - background: -moz-linear-gradient(top, #4c4c4c 0%, #595959 12%, #666666 25%, #474747 39%, #2c2c2c 50%, #000000 51%, #111111 60%, #2b2b2b 76%, #1c1c1c 91%, #131313 100%); /* FF3.6+ */ - background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#4c4c4c), color-stop(12%,#595959), color-stop(25%,#666666), color-stop(39%,#474747), color-stop(50%,#2c2c2c), color-stop(51%,#000000), color-stop(60%,#111111), color-stop(76%,#2b2b2b), color-stop(91%,#1c1c1c), color-stop(100%,#131313)); /* Chrome,Safari4+ */ - background: -webkit-linear-gradient(top, #4c4c4c 0%,#595959 12%,#666666 25%,#474747 39%,#2c2c2c 50%,#000000 51%,#111111 60%,#2b2b2b 76%,#1c1c1c 91%,#131313 100%); /* Chrome10+,Safari5.1+ */ - background: -o-linear-gradient(top, #4c4c4c 0%,#595959 12%,#666666 25%,#474747 39%,#2c2c2c 50%,#000000 51%,#111111 60%,#2b2b2b 76%,#1c1c1c 91%,#131313 100%); /* Opera 11.10+ */ - background: -ms-linear-gradient(top, #4c4c4c 0%,#595959 12%,#666666 25%,#474747 39%,#2c2c2c 50%,#000000 51%,#111111 60%,#2b2b2b 76%,#1c1c1c 91%,#131313 100%); /* IE10+ */ - background: linear-gradient(to bottom, #4c4c4c 0%,#595959 12%,#666666 25%,#474747 39%,#2c2c2c 50%,#000000 51%,#111111 60%,#2b2b2b 76%,#1c1c1c 91%,#131313 100%); /* W3C */ - filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#4c4c4c', endColorstr='#131313',GradientType=0 ); /* IE6-9 */ +div.vis-configuration.vis-config-button.hover{ + background-color: #4588e6; + border:2px solid #214373; + color:#ffffff; } - - -div.vis-color-picker div.vis-new-color { - position:absolute; - width:140px; - height:20px; - border:1px solid rgba(0,0,0,0.1); - border-radius:5px; - top:380px; - left:159px; - text-align:right; - padding-right:2px; - font-size:10px; - color:rgba(0,0,0,0.4); - vertical-align:middle; - line-height:20px; - +div.vis-configuration.vis-config-item{ + display:block; + float:left; + width:495px; + height:25px; + vertical-align: middle; + line-height:25px; } -div.vis-color-picker div.vis-initial-color { - position:absolute; - width:140px; - height:20px; - border:1px solid rgba(0,0,0,0.1); - border-radius:5px; - top:380px; - left:10px; - text-align:left; - padding-left:2px; - font-size:10px; - color:rgba(0,0,0,0.4); - vertical-align:middle; - line-height:20px; -} -div.vis-color-picker div.vis-label { - position:absolute; - width:300px; - left:10px; +div.vis-configuration.vis-config-item.vis-config-s2{ + left:10px; + background-color: #f7f8fa; + padding-left:5px; + border-radius:3px; } - -div.vis-color-picker div.vis-label.vis-brightness { - top:300px; +div.vis-configuration.vis-config-item.vis-config-s3{ + left:20px; + background-color: #e4e9f0; + padding-left:5px; + border-radius:3px; } - -div.vis-color-picker div.vis-label.vis-opacity { - top:338px; +div.vis-configuration.vis-config-item.vis-config-s4{ + left:30px; + background-color: #cfd8e6; + padding-left:5px; + border-radius:3px; } -div.vis-color-picker div.vis-button { - position:absolute; - width:68px; - height:25px; - border-radius:10px; - vertical-align: middle; - text-align:center; - line-height: 25px; - top:410px; - border:2px solid #d9d9d9; - background-color: #f7f7f7; - cursor:pointer; +div.vis-configuration.vis-config-header{ + font-size:18px; + font-weight: bold; } -div.vis-color-picker div.vis-button.vis-cancel { - /*border:2px solid #ff4e33;*/ - /*background-color: #ff7761;*/ - left:5px; -} -div.vis-color-picker div.vis-button.vis-load { - /*border:2px solid #a153e6;*/ - /*background-color: #cb8dff;*/ - left:82px; +div.vis-configuration.vis-config-label{ + width:120px; + height:25px; + line-height: 25px; } -div.vis-color-picker div.vis-button.vis-apply { - /*border:2px solid #4588e6;*/ - /*background-color: #82b6ff;*/ - left:159px; + +div.vis-configuration.vis-config-label.vis-config-s3{ + width:110px; } -div.vis-color-picker div.vis-button.vis-save { - /*border:2px solid #45e655;*/ - /*background-color: #6dff7c;*/ - left:236px; +div.vis-configuration.vis-config-label.vis-config-s4{ + width:100px; } +div.vis-configuration.vis-config-colorBlock{ + top:1px; + width:30px; + height:19px; + border:1px solid #444444; + border-radius:2px; + padding:0px; + margin:0px; + cursor:pointer; +} -div.vis-color-picker input.vis-range { - width: 290px; - height:20px; +input.vis-configuration.vis-config-checkbox { + left:-5px; } -/* TODO: is this redundant? -div.vis-color-picker input.vis-range-brightness { - width: 289px !important; + +input.vis-configuration.vis-config-rangeinput{ + position:relative; + top:-5px; + width:60px; + /*height:13px;*/ + padding:1px; + margin:0; + pointer-events:none; } +input.vis-configuration.vis-config-range{ + /*removes default webkit styles*/ + -webkit-appearance: none; -div.vis-color-picker input.vis-saturation-range { - width: 289px !important; -}*/ -div.vis-network div.vis-manipulation { - box-sizing: content-box; + /*fix for FF unable to apply focus style bug */ + border: 0px solid white; + background-color:rgba(0,0,0,0); - border-width: 0; - border-bottom: 1px; + /*required for proper track sizing in FF*/ + width: 300px; + height:20px; +} +input.vis-configuration.vis-config-range::-webkit-slider-runnable-track { + width: 300px; + height: 5px; + background: #dedede; /* Old browsers */ + background: -moz-linear-gradient(top, #dedede 0%, #c8c8c8 99%); /* FF3.6+ */ + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#dedede), color-stop(99%,#c8c8c8)); /* Chrome,Safari4+ */ + background: -webkit-linear-gradient(top, #dedede 0%,#c8c8c8 99%); /* Chrome10+,Safari5.1+ */ + background: -o-linear-gradient(top, #dedede 0%, #c8c8c8 99%); /* Opera 11.10+ */ + background: -ms-linear-gradient(top, #dedede 0%,#c8c8c8 99%); /* IE10+ */ + background: linear-gradient(to bottom, #dedede 0%,#c8c8c8 99%); /* W3C */ + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#dedede', endColorstr='#c8c8c8',GradientType=0 ); /* IE6-9 */ + + border: 1px solid #999999; + box-shadow: #aaaaaa 0px 0px 3px 0px; + border-radius: 3px; +} +input.vis-configuration.vis-config-range::-webkit-slider-thumb { + -webkit-appearance: none; + border: 1px solid #14334b; + height: 17px; + width: 17px; + border-radius: 50%; + background: #3876c2; /* Old browsers */ + background: -moz-linear-gradient(top, #3876c2 0%, #385380 100%); /* FF3.6+ */ + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#3876c2), color-stop(100%,#385380)); /* Chrome,Safari4+ */ + background: -webkit-linear-gradient(top, #3876c2 0%,#385380 100%); /* Chrome10+,Safari5.1+ */ + background: -o-linear-gradient(top, #3876c2 0%,#385380 100%); /* Opera 11.10+ */ + background: -ms-linear-gradient(top, #3876c2 0%,#385380 100%); /* IE10+ */ + background: linear-gradient(to bottom, #3876c2 0%,#385380 100%); /* W3C */ + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#3876c2', endColorstr='#385380',GradientType=0 ); /* IE6-9 */ + box-shadow: #111927 0px 0px 1px 0px; + margin-top: -7px; +} +input.vis-configuration.vis-config-range:focus { + outline: none; +} +input.vis-configuration.vis-config-range:focus::-webkit-slider-runnable-track { + background: #9d9d9d; /* Old browsers */ + background: -moz-linear-gradient(top, #9d9d9d 0%, #c8c8c8 99%); /* FF3.6+ */ + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#9d9d9d), color-stop(99%,#c8c8c8)); /* Chrome,Safari4+ */ + background: -webkit-linear-gradient(top, #9d9d9d 0%,#c8c8c8 99%); /* Chrome10+,Safari5.1+ */ + background: -o-linear-gradient(top, #9d9d9d 0%,#c8c8c8 99%); /* Opera 11.10+ */ + background: -ms-linear-gradient(top, #9d9d9d 0%,#c8c8c8 99%); /* IE10+ */ + background: linear-gradient(to bottom, #9d9d9d 0%,#c8c8c8 99%); /* W3C */ + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#9d9d9d', endColorstr='#c8c8c8',GradientType=0 ); /* IE6-9 */ +} + +input.vis-configuration.vis-config-range::-moz-range-track { + width: 300px; + height: 10px; + background: #dedede; /* Old browsers */ + background: -moz-linear-gradient(top, #dedede 0%, #c8c8c8 99%); /* FF3.6+ */ + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#dedede), color-stop(99%,#c8c8c8)); /* Chrome,Safari4+ */ + background: -webkit-linear-gradient(top, #dedede 0%,#c8c8c8 99%); /* Chrome10+,Safari5.1+ */ + background: -o-linear-gradient(top, #dedede 0%, #c8c8c8 99%); /* Opera 11.10+ */ + background: -ms-linear-gradient(top, #dedede 0%,#c8c8c8 99%); /* IE10+ */ + background: linear-gradient(to bottom, #dedede 0%,#c8c8c8 99%); /* W3C */ + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#dedede', endColorstr='#c8c8c8',GradientType=0 ); /* IE6-9 */ + + border: 1px solid #999999; + box-shadow: #aaaaaa 0px 0px 3px 0px; + border-radius: 3px; +} +input.vis-configuration.vis-config-range::-moz-range-thumb { + border: none; + height: 16px; + width: 16px; + + border-radius: 50%; + background: #385380; +} + +/*hide the outline behind the border*/ +input.vis-configuration.vis-config-range:-moz-focusring{ + outline: 1px solid white; + outline-offset: -1px; +} + +input.vis-configuration.vis-config-range::-ms-track { + width: 300px; + height: 5px; + + /*remove bg colour from the track, we'll use ms-fill-lower and ms-fill-upper instead */ + background: transparent; + + /*leave room for the larger thumb to overflow with a transparent border */ + border-color: transparent; + border-width: 6px 0; + + /*remove default tick marks*/ + color: transparent; +} +input.vis-configuration.vis-config-range::-ms-fill-lower { + background: #777; + border-radius: 10px; +} +input.vis-configuration.vis-config-range::-ms-fill-upper { + background: #ddd; + border-radius: 10px; +} +input.vis-configuration.vis-config-range::-ms-thumb { + border: none; + height: 16px; + width: 16px; + border-radius: 50%; + background: #385380; +} +input.vis-configuration.vis-config-range:focus::-ms-fill-lower { + background: #888; +} +input.vis-configuration.vis-config-range:focus::-ms-fill-upper { + background: #ccc; +} + +.vis-configuration-popup { + position: absolute; + background: rgba(57, 76, 89, 0.85); + border: 2px solid #f2faff; + line-height:30px; + height:30px; + width:150px; + text-align:center; + color: #ffffff; + font-size:14px; + border-radius:4px; + -webkit-transition: opacity 0.3s ease-in-out; + -moz-transition: opacity 0.3s ease-in-out; + transition: opacity 0.3s ease-in-out; +} +.vis-configuration-popup:after, .vis-configuration-popup:before { + left: 100%; + top: 50%; + border: solid transparent; + content: " "; + height: 0; + width: 0; + position: absolute; + pointer-events: none; +} + +.vis-configuration-popup:after { + border-color: rgba(136, 183, 213, 0); + border-left-color: rgba(57, 76, 89, 0.85); + border-width: 8px; + margin-top: -8px; +} +.vis-configuration-popup:before { + border-color: rgba(194, 225, 245, 0); + border-left-color: #f2faff; + border-width: 12px; + margin-top: -12px; +} +div.vis-network div.vis-manipulation { + box-sizing: content-box; + + border-width: 0; + border-bottom: 1px; border-style:solid; border-color: #d6d9d8; background: #ffffff; /* Old browsers */ @@ -328,377 +453,184 @@ div.network-navigation_wrapper { } */ -div.vis-network div.vis-navigation div.vis-button { - width:34px; - height:34px; - -moz-border-radius: 17px; - border-radius: 17px; - position:absolute; - display:inline-block; - background-position: 2px 2px; - background-repeat:no-repeat; - cursor: pointer; - -webkit-touch-callout: none; - -webkit-user-select: none; - -khtml-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; -} - -div.vis-network div.vis-navigation div.vis-button:hover { - box-shadow: 0 0 3px 3px rgba(56, 207, 21, 0.30); -} -div.vis-network div.vis-navigation div.vis-button:active { - box-shadow: 0 0 1px 3px rgba(56, 207, 21, 0.95); +div.vis-color-picker { + position:absolute; + top: 0px; + left: 30px; + margin-top:-140px; + margin-left:30px; + width:310px; + height:444px; + z-index: 1; + padding: 10px; + border-radius:15px; + background-color:#ffffff; + display: none; + box-shadow: rgba(0,0,0,0.5) 0px 0px 10px 0px; } -div.vis-network div.vis-navigation div.vis-button.vis-up { - background-image: url("img/network/upArrow.png"); - bottom:50px; - left:55px; -} -div.vis-network div.vis-navigation div.vis-button.vis-down { - background-image: url("img/network/downArrow.png"); - bottom:10px; - left:55px; -} -div.vis-network div.vis-navigation div.vis-button.vis-left { - background-image: url("img/network/leftArrow.png"); - bottom:10px; - left:15px; -} -div.vis-network div.vis-navigation div.vis-button.vis-right { - background-image: url("img/network/rightArrow.png"); - bottom:10px; - left:95px; -} -div.vis-network div.vis-navigation div.vis-button.vis-zoomIn { - background-image: url("img/network/plus.png"); - bottom:10px; - right:15px; -} -div.vis-network div.vis-navigation div.vis-button.vis-zoomOut { - background-image: url("img/network/minus.png"); - bottom:10px; - right:55px; -} -div.vis-network div.vis-navigation div.vis-button.vis-zoomExtends { - background-image: url("img/network/zoomExtends.png"); - bottom:50px; - right:15px; -} -.vis .overlay { +div.vis-color-picker div.vis-arrow { position: absolute; - top: 0; - left: 0; - width: 100%; - height: 100%; - - /* Must be displayed above for example selected Timeline items */ - z-index: 10; -} - -.vis-active { - box-shadow: 0 0 10px #86d5f8; -} - -/* override some bootstrap styles screwing up the timelines css */ - -.vis [class*="span"] { - min-height: 0; - width: auto; -} - -div.vis-configuration { - position:relative; - display:block; - float:left; - font-size:12px; -} - -div.vis-configuration-wrapper { - display:block; - width:700px; -} - -div.vis-configuration-wrapper::after { - clear: both; - content: ""; - display: block; -} - -div.vis-configuration.vis-config-option-container{ - display:block; - width:495px; - background-color: #ffffff; - border:2px solid #f7f8fa; - border-radius:4px; - margin-top:20px; - left:10px; - padding-left:5px; -} - -div.vis-configuration.vis-config-button{ - display:block; - width:495px; - height:25px; - vertical-align: middle; - line-height:25px; - background-color: #f7f8fa; - border:2px solid #ceced0; - border-radius:4px; - margin-top:20px; - left:10px; - padding-left:5px; - cursor: pointer; - margin-bottom:30px; -} - -div.vis-configuration.vis-config-button.hover{ - background-color: #4588e6; - border:2px solid #214373; - color:#ffffff; -} - -div.vis-configuration.vis-config-item{ - display:block; - float:left; - width:495px; - height:25px; - vertical-align: middle; - line-height:25px; -} - - -div.vis-configuration.vis-config-item.vis-config-s2{ - left:10px; - background-color: #f7f8fa; - padding-left:5px; - border-radius:3px; -} -div.vis-configuration.vis-config-item.vis-config-s3{ - left:20px; - background-color: #e4e9f0; - padding-left:5px; - border-radius:3px; -} -div.vis-configuration.vis-config-item.vis-config-s4{ - left:30px; - background-color: #cfd8e6; - padding-left:5px; - border-radius:3px; -} - -div.vis-configuration.vis-config-header{ - font-size:18px; - font-weight: bold; -} - -div.vis-configuration.vis-config-label{ - width:120px; - height:25px; - line-height: 25px; -} - -div.vis-configuration.vis-config-label.vis-config-s3{ - width:110px; -} -div.vis-configuration.vis-config-label.vis-config-s4{ - width:100px; -} - -div.vis-configuration.vis-config-colorBlock{ - top:1px; - width:30px; - height:19px; - border:1px solid #444444; - border-radius:2px; - padding:0px; - margin:0px; - cursor:pointer; -} - -input.vis-configuration.vis-config-checkbox { - left:-5px; + top:147px; + left:5px; } - -input.vis-configuration.vis-config-rangeinput{ - position:relative; - top:-5px; - width:60px; - /*height:13px;*/ - padding:1px; - margin:0; - pointer-events:none; +div.vis-color-picker div.vis-arrow::after, +div.vis-color-picker div.vis-arrow::before { + right: 100%; + top: 50%; + border: solid transparent; + content: " "; + height: 0; + width: 0; + position: absolute; + pointer-events: none; } -input.vis-configuration.vis-config-range{ - /*removes default webkit styles*/ - -webkit-appearance: none; - - /*fix for FF unable to apply focus style bug */ - border: 0px solid white; - background-color:rgba(0,0,0,0); - - /*required for proper track sizing in FF*/ - width: 300px; - height:20px; +div.vis-color-picker div.vis-arrow:after { + border-color: rgba(255, 255, 255, 0); + border-right-color: #ffffff; + border-width: 30px; + margin-top: -30px; } -input.vis-configuration.vis-config-range::-webkit-slider-runnable-track { - width: 300px; - height: 5px; - background: #dedede; /* Old browsers */ - background: -moz-linear-gradient(top, #dedede 0%, #c8c8c8 99%); /* FF3.6+ */ - background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#dedede), color-stop(99%,#c8c8c8)); /* Chrome,Safari4+ */ - background: -webkit-linear-gradient(top, #dedede 0%,#c8c8c8 99%); /* Chrome10+,Safari5.1+ */ - background: -o-linear-gradient(top, #dedede 0%, #c8c8c8 99%); /* Opera 11.10+ */ - background: -ms-linear-gradient(top, #dedede 0%,#c8c8c8 99%); /* IE10+ */ - background: linear-gradient(to bottom, #dedede 0%,#c8c8c8 99%); /* W3C */ - filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#dedede', endColorstr='#c8c8c8',GradientType=0 ); /* IE6-9 */ - border: 1px solid #999999; - box-shadow: #aaaaaa 0px 0px 3px 0px; - border-radius: 3px; -} -input.vis-configuration.vis-config-range::-webkit-slider-thumb { - -webkit-appearance: none; - border: 1px solid #14334b; - height: 17px; - width: 17px; - border-radius: 50%; - background: #3876c2; /* Old browsers */ - background: -moz-linear-gradient(top, #3876c2 0%, #385380 100%); /* FF3.6+ */ - background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#3876c2), color-stop(100%,#385380)); /* Chrome,Safari4+ */ - background: -webkit-linear-gradient(top, #3876c2 0%,#385380 100%); /* Chrome10+,Safari5.1+ */ - background: -o-linear-gradient(top, #3876c2 0%,#385380 100%); /* Opera 11.10+ */ - background: -ms-linear-gradient(top, #3876c2 0%,#385380 100%); /* IE10+ */ - background: linear-gradient(to bottom, #3876c2 0%,#385380 100%); /* W3C */ - filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#3876c2', endColorstr='#385380',GradientType=0 ); /* IE6-9 */ - box-shadow: #111927 0px 0px 1px 0px; - margin-top: -7px; -} -input.vis-configuration.vis-config-range:focus { - outline: none; -} -input.vis-configuration.vis-config-range:focus::-webkit-slider-runnable-track { - background: #9d9d9d; /* Old browsers */ - background: -moz-linear-gradient(top, #9d9d9d 0%, #c8c8c8 99%); /* FF3.6+ */ - background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#9d9d9d), color-stop(99%,#c8c8c8)); /* Chrome,Safari4+ */ - background: -webkit-linear-gradient(top, #9d9d9d 0%,#c8c8c8 99%); /* Chrome10+,Safari5.1+ */ - background: -o-linear-gradient(top, #9d9d9d 0%,#c8c8c8 99%); /* Opera 11.10+ */ - background: -ms-linear-gradient(top, #9d9d9d 0%,#c8c8c8 99%); /* IE10+ */ - background: linear-gradient(to bottom, #9d9d9d 0%,#c8c8c8 99%); /* W3C */ - filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#9d9d9d', endColorstr='#c8c8c8',GradientType=0 ); /* IE6-9 */ +div.vis-color-picker div.vis-color { + position:absolute; + width: 289px; + height: 289px; + cursor: pointer; } -input.vis-configuration.vis-config-range::-moz-range-track { - width: 300px; - height: 10px; - background: #dedede; /* Old browsers */ - background: -moz-linear-gradient(top, #dedede 0%, #c8c8c8 99%); /* FF3.6+ */ - background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#dedede), color-stop(99%,#c8c8c8)); /* Chrome,Safari4+ */ - background: -webkit-linear-gradient(top, #dedede 0%,#c8c8c8 99%); /* Chrome10+,Safari5.1+ */ - background: -o-linear-gradient(top, #dedede 0%, #c8c8c8 99%); /* Opera 11.10+ */ - background: -ms-linear-gradient(top, #dedede 0%,#c8c8c8 99%); /* IE10+ */ - background: linear-gradient(to bottom, #dedede 0%,#c8c8c8 99%); /* W3C */ - filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#dedede', endColorstr='#c8c8c8',GradientType=0 ); /* IE6-9 */ - border: 1px solid #999999; - box-shadow: #aaaaaa 0px 0px 3px 0px; - border-radius: 3px; + +div.vis-color-picker div.vis-brightness { + position: absolute; + top:313px; } -input.vis-configuration.vis-config-range::-moz-range-thumb { - border: none; - height: 16px; - width: 16px; - border-radius: 50%; - background: #385380; +div.vis-color-picker div.vis-opacity { + position:absolute; + top:350px; } -/*hide the outline behind the border*/ -input.vis-configuration.vis-config-range:-moz-focusring{ - outline: 1px solid white; - outline-offset: -1px; +div.vis-color-picker div.vis-selector { + position:absolute; + top:137px; + left:137px; + width:15px; + height:15px; + border-radius:15px; + border:1px solid #ffffff; + background: #4c4c4c; /* Old browsers */ + background: -moz-linear-gradient(top, #4c4c4c 0%, #595959 12%, #666666 25%, #474747 39%, #2c2c2c 50%, #000000 51%, #111111 60%, #2b2b2b 76%, #1c1c1c 91%, #131313 100%); /* FF3.6+ */ + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#4c4c4c), color-stop(12%,#595959), color-stop(25%,#666666), color-stop(39%,#474747), color-stop(50%,#2c2c2c), color-stop(51%,#000000), color-stop(60%,#111111), color-stop(76%,#2b2b2b), color-stop(91%,#1c1c1c), color-stop(100%,#131313)); /* Chrome,Safari4+ */ + background: -webkit-linear-gradient(top, #4c4c4c 0%,#595959 12%,#666666 25%,#474747 39%,#2c2c2c 50%,#000000 51%,#111111 60%,#2b2b2b 76%,#1c1c1c 91%,#131313 100%); /* Chrome10+,Safari5.1+ */ + background: -o-linear-gradient(top, #4c4c4c 0%,#595959 12%,#666666 25%,#474747 39%,#2c2c2c 50%,#000000 51%,#111111 60%,#2b2b2b 76%,#1c1c1c 91%,#131313 100%); /* Opera 11.10+ */ + background: -ms-linear-gradient(top, #4c4c4c 0%,#595959 12%,#666666 25%,#474747 39%,#2c2c2c 50%,#000000 51%,#111111 60%,#2b2b2b 76%,#1c1c1c 91%,#131313 100%); /* IE10+ */ + background: linear-gradient(to bottom, #4c4c4c 0%,#595959 12%,#666666 25%,#474747 39%,#2c2c2c 50%,#000000 51%,#111111 60%,#2b2b2b 76%,#1c1c1c 91%,#131313 100%); /* W3C */ + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#4c4c4c', endColorstr='#131313',GradientType=0 ); /* IE6-9 */ } -input.vis-configuration.vis-config-range::-ms-track { - width: 300px; - height: 5px; - /*remove bg colour from the track, we'll use ms-fill-lower and ms-fill-upper instead */ - background: transparent; - /*leave room for the larger thumb to overflow with a transparent border */ - border-color: transparent; - border-width: 6px 0; +div.vis-color-picker div.vis-new-color { + position:absolute; + width:140px; + height:20px; + border:1px solid rgba(0,0,0,0.1); + border-radius:5px; + top:380px; + left:159px; + text-align:right; + padding-right:2px; + font-size:10px; + color:rgba(0,0,0,0.4); + vertical-align:middle; + line-height:20px; - /*remove default tick marks*/ - color: transparent; } -input.vis-configuration.vis-config-range::-ms-fill-lower { - background: #777; - border-radius: 10px; + +div.vis-color-picker div.vis-initial-color { + position:absolute; + width:140px; + height:20px; + border:1px solid rgba(0,0,0,0.1); + border-radius:5px; + top:380px; + left:10px; + text-align:left; + padding-left:2px; + font-size:10px; + color:rgba(0,0,0,0.4); + vertical-align:middle; + line-height:20px; } -input.vis-configuration.vis-config-range::-ms-fill-upper { - background: #ddd; - border-radius: 10px; + +div.vis-color-picker div.vis-label { + position:absolute; + width:300px; + left:10px; } -input.vis-configuration.vis-config-range::-ms-thumb { - border: none; - height: 16px; - width: 16px; - border-radius: 50%; - background: #385380; + +div.vis-color-picker div.vis-label.vis-brightness { + top:300px; } -input.vis-configuration.vis-config-range:focus::-ms-fill-lower { - background: #888; + +div.vis-color-picker div.vis-label.vis-opacity { + top:338px; } -input.vis-configuration.vis-config-range:focus::-ms-fill-upper { - background: #ccc; + +div.vis-color-picker div.vis-button { + position:absolute; + width:68px; + height:25px; + border-radius:10px; + vertical-align: middle; + text-align:center; + line-height: 25px; + top:410px; + border:2px solid #d9d9d9; + background-color: #f7f7f7; + cursor:pointer; } -.vis-configuration-popup { - position: absolute; - background: rgba(57, 76, 89, 0.85); - border: 2px solid #f2faff; - line-height:30px; - height:30px; - width:150px; - text-align:center; - color: #ffffff; - font-size:14px; - border-radius:4px; - -webkit-transition: opacity 0.3s ease-in-out; - -moz-transition: opacity 0.3s ease-in-out; - transition: opacity 0.3s ease-in-out; +div.vis-color-picker div.vis-button.vis-cancel { + /*border:2px solid #ff4e33;*/ + /*background-color: #ff7761;*/ + left:5px; } -.vis-configuration-popup:after, .vis-configuration-popup:before { - left: 100%; - top: 50%; - border: solid transparent; - content: " "; - height: 0; - width: 0; - position: absolute; - pointer-events: none; +div.vis-color-picker div.vis-button.vis-load { + /*border:2px solid #a153e6;*/ + /*background-color: #cb8dff;*/ + left:82px; +} +div.vis-color-picker div.vis-button.vis-apply { + /*border:2px solid #4588e6;*/ + /*background-color: #82b6ff;*/ + left:159px; +} +div.vis-color-picker div.vis-button.vis-save { + /*border:2px solid #45e655;*/ + /*background-color: #6dff7c;*/ + left:236px; } -.vis-configuration-popup:after { - border-color: rgba(136, 183, 213, 0); - border-left-color: rgba(57, 76, 89, 0.85); - border-width: 8px; - margin-top: -8px; + +div.vis-color-picker input.vis-range { + width: 290px; + height:20px; } -.vis-configuration-popup:before { - border-color: rgba(194, 225, 245, 0); - border-left-color: #f2faff; - border-width: 12px; - margin-top: -12px; + +/* TODO: is this redundant? +div.vis-color-picker input.vis-range-brightness { + width: 289px !important; } + + +div.vis-color-picker input.vis-saturation-range { + width: 289px !important; +}*/ div.vis-tooltip { position: absolute; visibility: hidden; @@ -720,3 +652,65 @@ div.vis-tooltip { z-index: 5; } + +div.vis-network div.vis-navigation div.vis-button { + width:34px; + height:34px; + -moz-border-radius: 17px; + border-radius: 17px; + position:absolute; + display:inline-block; + background-position: 2px 2px; + background-repeat:no-repeat; + cursor: pointer; + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +div.vis-network div.vis-navigation div.vis-button:hover { + box-shadow: 0 0 3px 3px rgba(56, 207, 21, 0.30); +} + +div.vis-network div.vis-navigation div.vis-button:active { + box-shadow: 0 0 1px 3px rgba(56, 207, 21, 0.95); +} + +div.vis-network div.vis-navigation div.vis-button.vis-up { + background-image: url("img/network/upArrow.png"); + bottom:50px; + left:55px; +} +div.vis-network div.vis-navigation div.vis-button.vis-down { + background-image: url("img/network/downArrow.png"); + bottom:10px; + left:55px; +} +div.vis-network div.vis-navigation div.vis-button.vis-left { + background-image: url("img/network/leftArrow.png"); + bottom:10px; + left:15px; +} +div.vis-network div.vis-navigation div.vis-button.vis-right { + background-image: url("img/network/rightArrow.png"); + bottom:10px; + left:95px; +} +div.vis-network div.vis-navigation div.vis-button.vis-zoomIn { + background-image: url("img/network/plus.png"); + bottom:10px; + right:15px; +} +div.vis-network div.vis-navigation div.vis-button.vis-zoomOut { + background-image: url("img/network/minus.png"); + bottom:10px; + right:55px; +} +div.vis-network div.vis-navigation div.vis-button.vis-zoomExtends { + background-image: url("img/network/zoomExtends.png"); + bottom:50px; + right:15px; +} \ No newline at end of file diff --git a/node_modules/vis-network/dist/vis-network.esm.js b/node_modules/vis-network/dist/vis-network.esm.js new file mode 100644 index 0000000000000000000000000000000000000000..52c7038064e559722136155698f3636c42c9bdc2 --- /dev/null +++ b/node_modules/vis-network/dist/vis-network.esm.js @@ -0,0 +1,52816 @@ +/** + * vis-network - network + * http://visjs.org/ + * + * A dynamic, browser-based visualization library. + * + * @version 5.2.4 + * @date 2019-08-18T08:11:56Z + * + * @copyright (c) 2011-2017 Almende B.V, http://almende.com + * @copyright (c) 2018-2019 visjs contributors, https://github.com/visjs + * + * @license + * vis.js is dual licensed under both + * + * 1. The Apache 2.0 License + * http://www.apache.org/licenses/LICENSE-2.0 + * + * and + * + * 2. The MIT License + * http://opensource.org/licenses/MIT + * + * vis.js may be distributed under either license. + */ +var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; + +function commonjsRequire() { + throw new Error('Dynamic requires are not currently supported by rollup-plugin-commonjs'); +} + +function createCommonjsModule(fn, module) { + return module = { + exports: {} + }, fn(module, module.exports), module.exports; +} + +var _global = createCommonjsModule(function (module) { + // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 + var global = module.exports = typeof window != 'undefined' && window.Math == Math ? window : typeof self != 'undefined' && self.Math == Math ? self // eslint-disable-next-line no-new-func + : Function('return this')(); + if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef +}); + +var _core = createCommonjsModule(function (module) { + var core = module.exports = { + version: '2.6.9' + }; + if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef +}); + +var _core_1 = _core.version; +var _library = false; + +var _shared = createCommonjsModule(function (module) { + var SHARED = '__core-js_shared__'; + var store = _global[SHARED] || (_global[SHARED] = {}); + (module.exports = function (key, value) { + return store[key] || (store[key] = value !== undefined ? value : {}); + })('versions', []).push({ + version: _core.version, + mode: 'global', + copyright: '© 2019 Denis Pushkarev (zloirock.ru)' + }); +}); + +var id = 0; +var px = Math.random(); + +var _uid = function (key) { + return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36)); +}; + +var _wks = createCommonjsModule(function (module) { + var store = _shared('wks'); + + var Symbol = _global.Symbol; + var USE_SYMBOL = typeof Symbol == 'function'; + + var $exports = module.exports = function (name) { + return store[name] || (store[name] = USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : _uid)('Symbol.' + name)); + }; + + $exports.store = store; +}); + +var f = _wks; +var _wksExt = { + f: f +}; + +var _isObject = function (it) { + return typeof it === 'object' ? it !== null : typeof it === 'function'; +}; + +var _anObject = function (it) { + if (!_isObject(it)) throw TypeError(it + ' is not an object!'); + return it; +}; + +var _fails = function (exec) { + try { + return !!exec(); + } catch (e) { + return true; + } +}; + +var _descriptors = !_fails(function () { + return Object.defineProperty({}, 'a', { + get: function () { + return 7; + } + }).a != 7; +}); + +var document$1 = _global.document; // typeof document.createElement is 'object' in old IE + +var is = _isObject(document$1) && _isObject(document$1.createElement); + +var _domCreate = function (it) { + return is ? document$1.createElement(it) : {}; +}; + +var _ie8DomDefine = !_descriptors && !_fails(function () { + return Object.defineProperty(_domCreate('div'), 'a', { + get: function () { + return 7; + } + }).a != 7; +}); // instead of the ES6 spec version, we didn't implement @@toPrimitive case +// and the second argument - flag - preferred type is a string + + +var _toPrimitive = function (it, S) { + if (!_isObject(it)) return it; + var fn, val; + if (S && typeof (fn = it.toString) == 'function' && !_isObject(val = fn.call(it))) return val; + if (typeof (fn = it.valueOf) == 'function' && !_isObject(val = fn.call(it))) return val; + if (!S && typeof (fn = it.toString) == 'function' && !_isObject(val = fn.call(it))) return val; + throw TypeError("Can't convert object to primitive value"); +}; + +var dP = Object.defineProperty; +var f$1 = _descriptors ? Object.defineProperty : function defineProperty(O, P, Attributes) { + _anObject(O); + + P = _toPrimitive(P, true); + + _anObject(Attributes); + + if (_ie8DomDefine) try { + return dP(O, P, Attributes); + } catch (e) { + /* empty */ + } + if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!'); + if ('value' in Attributes) O[P] = Attributes.value; + return O; +}; +var _objectDp = { + f: f$1 +}; +var defineProperty = _objectDp.f; + +var _wksDefine = function (name) { + var $Symbol = _core.Symbol || (_core.Symbol = _global.Symbol || {}); + if (name.charAt(0) != '_' && !(name in $Symbol)) defineProperty($Symbol, name, { + value: _wksExt.f(name) + }); +}; + +_wksDefine('asyncIterator'); + +var hasOwnProperty = {}.hasOwnProperty; + +var _has = function (it, key) { + return hasOwnProperty.call(it, key); +}; + +var _propertyDesc = function (bitmap, value) { + return { + enumerable: !(bitmap & 1), + configurable: !(bitmap & 2), + writable: !(bitmap & 4), + value: value + }; +}; + +var _hide = _descriptors ? function (object, key, value) { + return _objectDp.f(object, key, _propertyDesc(1, value)); +} : function (object, key, value) { + object[key] = value; + return object; +}; + +var _functionToString = _shared('native-function-to-string', Function.toString); + +var _redefine = createCommonjsModule(function (module) { + var SRC = _uid('src'); + + var TO_STRING = 'toString'; + + var TPL = ('' + _functionToString).split(TO_STRING); + + _core.inspectSource = function (it) { + return _functionToString.call(it); + }; + + (module.exports = function (O, key, val, safe) { + var isFunction = typeof val == 'function'; + if (isFunction) _has(val, 'name') || _hide(val, 'name', key); + if (O[key] === val) return; + if (isFunction) _has(val, SRC) || _hide(val, SRC, O[key] ? '' + O[key] : TPL.join(String(key))); + + if (O === _global) { + O[key] = val; + } else if (!safe) { + delete O[key]; + + _hide(O, key, val); + } else if (O[key]) { + O[key] = val; + } else { + _hide(O, key, val); + } // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative + + })(Function.prototype, TO_STRING, function toString() { + return typeof this == 'function' && this[SRC] || _functionToString.call(this); + }); +}); + +var _aFunction = function (it) { + if (typeof it != 'function') throw TypeError(it + ' is not a function!'); + return it; +}; + +var _ctx = function (fn, that, length) { + _aFunction(fn); + + if (that === undefined) return fn; + + switch (length) { + case 1: + return function (a) { + return fn.call(that, a); + }; + + case 2: + return function (a, b) { + return fn.call(that, a, b); + }; + + case 3: + return function (a, b, c) { + return fn.call(that, a, b, c); + }; + } + + return function () + /* ...args */ + { + return fn.apply(that, arguments); + }; +}; + +var PROTOTYPE = 'prototype'; + +var $export = function (type, name, source) { + var IS_FORCED = type & $export.F; + var IS_GLOBAL = type & $export.G; + var IS_STATIC = type & $export.S; + var IS_PROTO = type & $export.P; + var IS_BIND = type & $export.B; + var target = IS_GLOBAL ? _global : IS_STATIC ? _global[name] || (_global[name] = {}) : (_global[name] || {})[PROTOTYPE]; + var exports = IS_GLOBAL ? _core : _core[name] || (_core[name] = {}); + var expProto = exports[PROTOTYPE] || (exports[PROTOTYPE] = {}); + var key, own, out, exp; + if (IS_GLOBAL) source = name; + + for (key in source) { + // contains in native + own = !IS_FORCED && target && target[key] !== undefined; // export native or passed + + out = (own ? target : source)[key]; // bind timers to global for call from export context + + exp = IS_BIND && own ? _ctx(out, _global) : IS_PROTO && typeof out == 'function' ? _ctx(Function.call, out) : out; // extend global + + if (target) _redefine(target, key, out, type & $export.U); // export + + if (exports[key] != out) _hide(exports, key, exp); + if (IS_PROTO && expProto[key] != out) expProto[key] = out; + } +}; + +_global.core = _core; // type bitmap + +$export.F = 1; // forced + +$export.G = 2; // global + +$export.S = 4; // static + +$export.P = 8; // proto + +$export.B = 16; // bind + +$export.W = 32; // wrap + +$export.U = 64; // safe + +$export.R = 128; // real proto method for `library` + +var _export = $export; + +var _meta = createCommonjsModule(function (module) { + var META = _uid('meta'); + + var setDesc = _objectDp.f; + var id = 0; + + var isExtensible = Object.isExtensible || function () { + return true; + }; + + var FREEZE = !_fails(function () { + return isExtensible(Object.preventExtensions({})); + }); + + var setMeta = function (it) { + setDesc(it, META, { + value: { + i: 'O' + ++id, + // object ID + w: {} // weak collections IDs + + } + }); + }; + + var fastKey = function (it, create) { + // return primitive with prefix + if (!_isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it; + + if (!_has(it, META)) { + // can't set metadata to uncaught frozen object + if (!isExtensible(it)) return 'F'; // not necessary to add metadata + + if (!create) return 'E'; // add missing metadata + + setMeta(it); // return object ID + } + + return it[META].i; + }; + + var getWeak = function (it, create) { + if (!_has(it, META)) { + // can't set metadata to uncaught frozen object + if (!isExtensible(it)) return true; // not necessary to add metadata + + if (!create) return false; // add missing metadata + + setMeta(it); // return hash weak collections IDs + } + + return it[META].w; + }; // add metadata on freeze-family methods calling + + + var onFreeze = function (it) { + if (FREEZE && meta.NEED && isExtensible(it) && !_has(it, META)) setMeta(it); + return it; + }; + + var meta = module.exports = { + KEY: META, + NEED: false, + fastKey: fastKey, + getWeak: getWeak, + onFreeze: onFreeze + }; +}); + +var _meta_1 = _meta.KEY; +var _meta_2 = _meta.NEED; +var _meta_3 = _meta.fastKey; +var _meta_4 = _meta.getWeak; +var _meta_5 = _meta.onFreeze; +var def = _objectDp.f; + +var TAG = _wks('toStringTag'); + +var _setToStringTag = function (it, tag, stat) { + if (it && !_has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { + configurable: true, + value: tag + }); +}; + +var toString = {}.toString; + +var _cof = function (it) { + return toString.call(it).slice(8, -1); +}; // eslint-disable-next-line no-prototype-builtins + + +var _iobject = Object('z').propertyIsEnumerable(0) ? Object : function (it) { + return _cof(it) == 'String' ? it.split('') : Object(it); +}; // 7.2.1 RequireObjectCoercible(argument) + + +var _defined = function (it) { + if (it == undefined) throw TypeError("Can't call method on " + it); + return it; +}; + +var _toIobject = function (it) { + return _iobject(_defined(it)); +}; // 7.1.4 ToInteger + + +var ceil = Math.ceil; +var floor = Math.floor; + +var _toInteger = function (it) { + return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it); +}; + +var min = Math.min; + +var _toLength = function (it) { + return it > 0 ? min(_toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991 +}; + +var max = Math.max; +var min$1 = Math.min; + +var _toAbsoluteIndex = function (index, length) { + index = _toInteger(index); + return index < 0 ? max(index + length, 0) : min$1(index, length); +}; // true -> Array#includes + + +var _arrayIncludes = function (IS_INCLUDES) { + return function ($this, el, fromIndex) { + var O = _toIobject($this); + + var length = _toLength(O.length); + + var index = _toAbsoluteIndex(fromIndex, length); + + var value; // Array#includes uses SameValueZero equality algorithm + // eslint-disable-next-line no-self-compare + + if (IS_INCLUDES && el != el) while (length > index) { + value = O[index++]; // eslint-disable-next-line no-self-compare + + if (value != value) return true; // Array#indexOf ignores holes, Array#includes - not + } else for (; length > index; index++) if (IS_INCLUDES || index in O) { + if (O[index] === el) return IS_INCLUDES || index || 0; + } + return !IS_INCLUDES && -1; + }; +}; + +var shared = _shared('keys'); + +var _sharedKey = function (key) { + return shared[key] || (shared[key] = _uid(key)); +}; + +var arrayIndexOf = _arrayIncludes(false); + +var IE_PROTO = _sharedKey('IE_PROTO'); + +var _objectKeysInternal = function (object, names) { + var O = _toIobject(object); + + var i = 0; + var result = []; + var key; + + for (key in O) if (key != IE_PROTO) _has(O, key) && result.push(key); // Don't enum bug & hidden keys + + + while (names.length > i) if (_has(O, key = names[i++])) { + ~arrayIndexOf(result, key) || result.push(key); + } + + return result; +}; // IE 8- don't enum bug keys + + +var _enumBugKeys = 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'.split(','); + +var _objectKeys = Object.keys || function keys(O) { + return _objectKeysInternal(O, _enumBugKeys); +}; + +var f$2 = Object.getOwnPropertySymbols; +var _objectGops = { + f: f$2 +}; +var f$3 = {}.propertyIsEnumerable; +var _objectPie = { + f: f$3 +}; + +var _enumKeys = function (it) { + var result = _objectKeys(it); + + var getSymbols = _objectGops.f; + + if (getSymbols) { + var symbols = getSymbols(it); + var isEnum = _objectPie.f; + var i = 0; + var key; + + while (symbols.length > i) if (isEnum.call(it, key = symbols[i++])) result.push(key); + } + + return result; +}; + +var _isArray = Array.isArray || function isArray(arg) { + return _cof(arg) == 'Array'; +}; + +var _toObject = function (it) { + return Object(_defined(it)); +}; + +var _objectDps = _descriptors ? Object.defineProperties : function defineProperties(O, Properties) { + _anObject(O); + + var keys = _objectKeys(Properties); + + var length = keys.length; + var i = 0; + var P; + + while (length > i) _objectDp.f(O, P = keys[i++], Properties[P]); + + return O; +}; + +var document$2 = _global.document; + +var _html = document$2 && document$2.documentElement; + +var IE_PROTO$1 = _sharedKey('IE_PROTO'); + +var Empty = function () { + /* empty */ +}; + +var PROTOTYPE$1 = 'prototype'; // Create object with fake `null` prototype: use iframe Object with cleared prototype + +var createDict = function () { + // Thrash, waste and sodomy: IE GC bug + var iframe = _domCreate('iframe'); + + var i = _enumBugKeys.length; + var lt = '<'; + var gt = '>'; + var iframeDocument; + iframe.style.display = 'none'; + + _html.appendChild(iframe); + + iframe.src = 'javascript:'; // eslint-disable-line no-script-url + // createDict = iframe.contentWindow.Object; + // html.removeChild(iframe); + + iframeDocument = iframe.contentWindow.document; + iframeDocument.open(); + iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt); + iframeDocument.close(); + createDict = iframeDocument.F; + + while (i--) delete createDict[PROTOTYPE$1][_enumBugKeys[i]]; + + return createDict(); +}; + +var _objectCreate = Object.create || function create(O, Properties) { + var result; + + if (O !== null) { + Empty[PROTOTYPE$1] = _anObject(O); + result = new Empty(); + Empty[PROTOTYPE$1] = null; // add "__proto__" for Object.getPrototypeOf polyfill + + result[IE_PROTO$1] = O; + } else result = createDict(); + + return Properties === undefined ? result : _objectDps(result, Properties); +}; + +var hiddenKeys = _enumBugKeys.concat('length', 'prototype'); + +var f$4 = Object.getOwnPropertyNames || function getOwnPropertyNames(O) { + return _objectKeysInternal(O, hiddenKeys); +}; + +var _objectGopn = { + f: f$4 +}; +var gOPN = _objectGopn.f; +var toString$1 = {}.toString; +var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames ? Object.getOwnPropertyNames(window) : []; + +var getWindowNames = function (it) { + try { + return gOPN(it); + } catch (e) { + return windowNames.slice(); + } +}; + +var f$5 = function getOwnPropertyNames(it) { + return windowNames && toString$1.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(_toIobject(it)); +}; + +var _objectGopnExt = { + f: f$5 +}; +var gOPD = Object.getOwnPropertyDescriptor; +var f$6 = _descriptors ? gOPD : function getOwnPropertyDescriptor(O, P) { + O = _toIobject(O); + P = _toPrimitive(P, true); + if (_ie8DomDefine) try { + return gOPD(O, P); + } catch (e) { + /* empty */ + } + if (_has(O, P)) return _propertyDesc(!_objectPie.f.call(O, P), O[P]); +}; +var _objectGopd = { + f: f$6 +}; +var META = _meta.KEY; +var gOPD$1 = _objectGopd.f; +var dP$1 = _objectDp.f; +var gOPN$1 = _objectGopnExt.f; +var $Symbol = _global.Symbol; +var $JSON = _global.JSON; + +var _stringify = $JSON && $JSON.stringify; + +var PROTOTYPE$2 = 'prototype'; + +var HIDDEN = _wks('_hidden'); + +var TO_PRIMITIVE = _wks('toPrimitive'); + +var isEnum = {}.propertyIsEnumerable; + +var SymbolRegistry = _shared('symbol-registry'); + +var AllSymbols = _shared('symbols'); + +var OPSymbols = _shared('op-symbols'); + +var ObjectProto = Object[PROTOTYPE$2]; +var USE_NATIVE = typeof $Symbol == 'function' && !!_objectGops.f; +var QObject = _global.QObject; // Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173 + +var setter = !QObject || !QObject[PROTOTYPE$2] || !QObject[PROTOTYPE$2].findChild; // fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687 + +var setSymbolDesc = _descriptors && _fails(function () { + return _objectCreate(dP$1({}, 'a', { + get: function () { + return dP$1(this, 'a', { + value: 7 + }).a; + } + })).a != 7; +}) ? function (it, key, D) { + var protoDesc = gOPD$1(ObjectProto, key); + if (protoDesc) delete ObjectProto[key]; + dP$1(it, key, D); + if (protoDesc && it !== ObjectProto) dP$1(ObjectProto, key, protoDesc); +} : dP$1; + +var wrap = function (tag) { + var sym = AllSymbols[tag] = _objectCreate($Symbol[PROTOTYPE$2]); + + sym._k = tag; + return sym; +}; + +var isSymbol = USE_NATIVE && typeof $Symbol.iterator == 'symbol' ? function (it) { + return typeof it == 'symbol'; +} : function (it) { + return it instanceof $Symbol; +}; + +var $defineProperty = function defineProperty(it, key, D) { + if (it === ObjectProto) $defineProperty(OPSymbols, key, D); + + _anObject(it); + + key = _toPrimitive(key, true); + + _anObject(D); + + if (_has(AllSymbols, key)) { + if (!D.enumerable) { + if (!_has(it, HIDDEN)) dP$1(it, HIDDEN, _propertyDesc(1, {})); + it[HIDDEN][key] = true; + } else { + if (_has(it, HIDDEN) && it[HIDDEN][key]) it[HIDDEN][key] = false; + D = _objectCreate(D, { + enumerable: _propertyDesc(0, false) + }); + } + + return setSymbolDesc(it, key, D); + } + + return dP$1(it, key, D); +}; + +var $defineProperties = function defineProperties(it, P) { + _anObject(it); + + var keys = _enumKeys(P = _toIobject(P)); + + var i = 0; + var l = keys.length; + var key; + + while (l > i) $defineProperty(it, key = keys[i++], P[key]); + + return it; +}; + +var $create = function create(it, P) { + return P === undefined ? _objectCreate(it) : $defineProperties(_objectCreate(it), P); +}; + +var $propertyIsEnumerable = function propertyIsEnumerable(key) { + var E = isEnum.call(this, key = _toPrimitive(key, true)); + if (this === ObjectProto && _has(AllSymbols, key) && !_has(OPSymbols, key)) return false; + return E || !_has(this, key) || !_has(AllSymbols, key) || _has(this, HIDDEN) && this[HIDDEN][key] ? E : true; +}; + +var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key) { + it = _toIobject(it); + key = _toPrimitive(key, true); + if (it === ObjectProto && _has(AllSymbols, key) && !_has(OPSymbols, key)) return; + var D = gOPD$1(it, key); + if (D && _has(AllSymbols, key) && !(_has(it, HIDDEN) && it[HIDDEN][key])) D.enumerable = true; + return D; +}; + +var $getOwnPropertyNames = function getOwnPropertyNames(it) { + var names = gOPN$1(_toIobject(it)); + var result = []; + var i = 0; + var key; + + while (names.length > i) { + if (!_has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META) result.push(key); + } + + return result; +}; + +var $getOwnPropertySymbols = function getOwnPropertySymbols(it) { + var IS_OP = it === ObjectProto; + var names = gOPN$1(IS_OP ? OPSymbols : _toIobject(it)); + var result = []; + var i = 0; + var key; + + while (names.length > i) { + if (_has(AllSymbols, key = names[i++]) && (IS_OP ? _has(ObjectProto, key) : true)) result.push(AllSymbols[key]); + } + + return result; +}; // 19.4.1.1 Symbol([description]) + + +if (!USE_NATIVE) { + $Symbol = function Symbol() { + if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor!'); + + var tag = _uid(arguments.length > 0 ? arguments[0] : undefined); + + var $set = function (value) { + if (this === ObjectProto) $set.call(OPSymbols, value); + if (_has(this, HIDDEN) && _has(this[HIDDEN], tag)) this[HIDDEN][tag] = false; + setSymbolDesc(this, tag, _propertyDesc(1, value)); + }; + + if (_descriptors && setter) setSymbolDesc(ObjectProto, tag, { + configurable: true, + set: $set + }); + return wrap(tag); + }; + + _redefine($Symbol[PROTOTYPE$2], 'toString', function toString() { + return this._k; + }); + + _objectGopd.f = $getOwnPropertyDescriptor; + _objectDp.f = $defineProperty; + _objectGopn.f = _objectGopnExt.f = $getOwnPropertyNames; + _objectPie.f = $propertyIsEnumerable; + _objectGops.f = $getOwnPropertySymbols; + + if (_descriptors && !_library) { + _redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true); + } + + _wksExt.f = function (name) { + return wrap(_wks(name)); + }; +} + +_export(_export.G + _export.W + _export.F * !USE_NATIVE, { + Symbol: $Symbol +}); + +for (var es6Symbols = // 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14 +'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables'.split(','), j = 0; es6Symbols.length > j;) _wks(es6Symbols[j++]); + +for (var wellKnownSymbols = _objectKeys(_wks.store), k = 0; wellKnownSymbols.length > k;) _wksDefine(wellKnownSymbols[k++]); + +_export(_export.S + _export.F * !USE_NATIVE, 'Symbol', { + // 19.4.2.1 Symbol.for(key) + 'for': function (key) { + return _has(SymbolRegistry, key += '') ? SymbolRegistry[key] : SymbolRegistry[key] = $Symbol(key); + }, + // 19.4.2.5 Symbol.keyFor(sym) + keyFor: function keyFor(sym) { + if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol!'); + + for (var key in SymbolRegistry) if (SymbolRegistry[key] === sym) return key; + }, + useSetter: function () { + setter = true; + }, + useSimple: function () { + setter = false; + } +}); + +_export(_export.S + _export.F * !USE_NATIVE, 'Object', { + // 19.1.2.2 Object.create(O [, Properties]) + create: $create, + // 19.1.2.4 Object.defineProperty(O, P, Attributes) + defineProperty: $defineProperty, + // 19.1.2.3 Object.defineProperties(O, Properties) + defineProperties: $defineProperties, + // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P) + getOwnPropertyDescriptor: $getOwnPropertyDescriptor, + // 19.1.2.7 Object.getOwnPropertyNames(O) + getOwnPropertyNames: $getOwnPropertyNames, + // 19.1.2.8 Object.getOwnPropertySymbols(O) + getOwnPropertySymbols: $getOwnPropertySymbols +}); // Chrome 38 and 39 `Object.getOwnPropertySymbols` fails on primitives +// https://bugs.chromium.org/p/v8/issues/detail?id=3443 + + +var FAILS_ON_PRIMITIVES = _fails(function () { + _objectGops.f(1); +}); + +_export(_export.S + _export.F * FAILS_ON_PRIMITIVES, 'Object', { + getOwnPropertySymbols: function getOwnPropertySymbols(it) { + return _objectGops.f(_toObject(it)); + } +}); // 24.3.2 JSON.stringify(value [, replacer [, space]]) + + +$JSON && _export(_export.S + _export.F * (!USE_NATIVE || _fails(function () { + var S = $Symbol(); // MS Edge converts symbol values to JSON as {} + // WebKit converts symbol values to JSON as null + // V8 throws on boxed symbols + + return _stringify([S]) != '[null]' || _stringify({ + a: S + }) != '{}' || _stringify(Object(S)) != '{}'; +})), 'JSON', { + stringify: function stringify(it) { + var args = [it]; + var i = 1; + var replacer, $replacer; + + while (arguments.length > i) args.push(arguments[i++]); + + $replacer = replacer = args[1]; + if (!_isObject(replacer) && it === undefined || isSymbol(it)) return; // IE8 returns string on undefined + + if (!_isArray(replacer)) replacer = function (key, value) { + if (typeof $replacer == 'function') value = $replacer.call(this, key, value); + if (!isSymbol(value)) return value; + }; + args[1] = replacer; + return _stringify.apply($JSON, args); + } +}); // 19.4.3.4 Symbol.prototype[@@toPrimitive](hint) + +$Symbol[PROTOTYPE$2][TO_PRIMITIVE] || _hide($Symbol[PROTOTYPE$2], TO_PRIMITIVE, $Symbol[PROTOTYPE$2].valueOf); // 19.4.3.5 Symbol.prototype[@@toStringTag] + +_setToStringTag($Symbol, 'Symbol'); // 20.2.1.9 Math[@@toStringTag] + + +_setToStringTag(Math, 'Math', true); // 24.3.3 JSON[@@toStringTag] + + +_setToStringTag(_global.JSON, 'JSON', true); + +function _typeof(obj) { + if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { + _typeof = function (obj) { + return typeof obj; + }; + } else { + _typeof = function (obj) { + return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; + }; + } + + return _typeof(obj); +} + +function _defineProperty(obj, key, value) { + if (key in obj) { + Object.defineProperty(obj, key, { + value: value, + enumerable: true, + configurable: true, + writable: true + }); + } else { + obj[key] = value; + } + + return obj; +} + +function ownKeys(object, enumerableOnly) { + var keys = Object.keys(object); + + if (Object.getOwnPropertySymbols) { + keys.push.apply(keys, Object.getOwnPropertySymbols(object)); + } + + if (enumerableOnly) keys = keys.filter(function (sym) { + return Object.getOwnPropertyDescriptor(object, sym).enumerable; + }); + return keys; +} + +function _objectSpread2(target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i] != null ? arguments[i] : {}; + + if (i % 2) { + ownKeys(source, true).forEach(function (key) { + _defineProperty(target, key, source[key]); + }); + } else if (Object.getOwnPropertyDescriptors) { + Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); + } else { + ownKeys(source).forEach(function (key) { + Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); + }); + } + } + + return target; +} + +function _toConsumableArray(arr) { + return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); +} + +function _arrayWithoutHoles(arr) { + if (Array.isArray(arr)) { + for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) arr2[i] = arr[i]; + + return arr2; + } +} + +function _iterableToArray(iter) { + if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); +} + +function _nonIterableSpread() { + throw new TypeError("Invalid attempt to spread non-iterable instance"); +} + +var _objectSap = function (KEY, exec) { + var fn = (_core.Object || {})[KEY] || Object[KEY]; + var exp = {}; + exp[KEY] = exec(fn); + + _export(_export.S + _export.F * _fails(function () { + fn(1); + }), 'Object', exp); +}; + +_objectSap('keys', function () { + return function keys(it) { + return _objectKeys(_toObject(it)); + }; +}); + +var _flags = function () { + var that = _anObject(this); + + var result = ''; + if (that.global) result += 'g'; + if (that.ignoreCase) result += 'i'; + if (that.multiline) result += 'm'; + if (that.unicode) result += 'u'; + if (that.sticky) result += 'y'; + return result; +}; + +if (_descriptors && /./g.flags != 'g') _objectDp.f(RegExp.prototype, 'flags', { + configurable: true, + get: _flags +}); +var TO_STRING = 'toString'; +var $toString = /./[TO_STRING]; + +var define = function (fn) { + _redefine(RegExp.prototype, TO_STRING, fn, true); +}; // 21.2.5.14 RegExp.prototype.toString() + + +if (_fails(function () { + return $toString.call({ + source: 'a', + flags: 'b' + }) != '/a/b'; +})) { + define(function toString() { + var R = _anObject(this); + + return '/'.concat(R.source, '/', 'flags' in R ? R.flags : !_descriptors && R instanceof RegExp ? _flags.call(R) : undefined); + }); // FF44- RegExp#toString has a wrong name +} else if ($toString.name != TO_STRING) { + define(function toString() { + return $toString.call(this); + }); +} // false -> String#codePointAt + + +var _stringAt = function (TO_STRING) { + return function (that, pos) { + var s = String(_defined(that)); + + var i = _toInteger(pos); + + var l = s.length; + var a, b; + if (i < 0 || i >= l) return TO_STRING ? '' : undefined; + a = s.charCodeAt(i); + return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff ? TO_STRING ? s.charAt(i) : a : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000; + }; +}; + +var at = _stringAt(true); // `AdvanceStringIndex` abstract operation +// https://tc39.github.io/ecma262/#sec-advancestringindex + + +var _advanceStringIndex = function (S, index, unicode) { + return index + (unicode ? at(S, index).length : 1); +}; + +var TAG$1 = _wks('toStringTag'); // ES3 wrong here + + +var ARG = _cof(function () { + return arguments; +}()) == 'Arguments'; // fallback for IE11 Script Access Denied error + +var tryGet = function (it, key) { + try { + return it[key]; + } catch (e) { + /* empty */ + } +}; + +var _classof = function (it) { + var O, T, B; + return it === undefined ? 'Undefined' : it === null ? 'Null' // @@toStringTag case + : typeof (T = tryGet(O = Object(it), TAG$1)) == 'string' ? T // builtinTag case + : ARG ? _cof(O) // ES3 arguments fallback + : (B = _cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B; +}; + +var builtinExec = RegExp.prototype.exec; // `RegExpExec` abstract operation +// https://tc39.github.io/ecma262/#sec-regexpexec + +var _regexpExecAbstract = function (R, S) { + var exec = R.exec; + + if (typeof exec === 'function') { + var result = exec.call(R, S); + + if (typeof result !== 'object') { + throw new TypeError('RegExp exec method returned something other than an Object or null'); + } + + return result; + } + + if (_classof(R) !== 'RegExp') { + throw new TypeError('RegExp#exec called on incompatible receiver'); + } + + return builtinExec.call(R, S); +}; + +var nativeExec = RegExp.prototype.exec; // This always refers to the native implementation, because the +// String#replace polyfill uses ./fix-regexp-well-known-symbol-logic.js, +// which loads this file before patching the method. + +var nativeReplace = String.prototype.replace; +var patchedExec = nativeExec; +var LAST_INDEX = 'lastIndex'; + +var UPDATES_LAST_INDEX_WRONG = function () { + var re1 = /a/, + re2 = /b*/g; + nativeExec.call(re1, 'a'); + nativeExec.call(re2, 'a'); + return re1[LAST_INDEX] !== 0 || re2[LAST_INDEX] !== 0; +}(); // nonparticipating capturing group, copied from es5-shim's String#split patch. + + +var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined; +var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED; + +if (PATCH) { + patchedExec = function exec(str) { + var re = this; + var lastIndex, reCopy, match, i; + + if (NPCG_INCLUDED) { + reCopy = new RegExp('^' + re.source + '$(?!\\s)', _flags.call(re)); + } + + if (UPDATES_LAST_INDEX_WRONG) lastIndex = re[LAST_INDEX]; + match = nativeExec.call(re, str); + + if (UPDATES_LAST_INDEX_WRONG && match) { + re[LAST_INDEX] = re.global ? match.index + match[0].length : lastIndex; + } + + if (NPCG_INCLUDED && match && match.length > 1) { + // Fix browsers whose `exec` methods don't consistently return `undefined` + // for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/ + // eslint-disable-next-line no-loop-func + nativeReplace.call(match[0], reCopy, function () { + for (i = 1; i < arguments.length - 2; i++) { + if (arguments[i] === undefined) match[i] = undefined; + } + }); + } + + return match; + }; +} + +var _regexpExec = patchedExec; + +_export({ + target: 'RegExp', + proto: true, + forced: _regexpExec !== /./.exec +}, { + exec: _regexpExec +}); + +var SPECIES = _wks('species'); + +var REPLACE_SUPPORTS_NAMED_GROUPS = !_fails(function () { + // #replace needs built-in support for named groups. + // #match works fine because it just return the exec results, even if it has + // a "grops" property. + var re = /./; + + re.exec = function () { + var result = []; + result.groups = { + a: '7' + }; + return result; + }; + + return ''.replace(re, '$') !== '7'; +}); + +var SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = function () { + // Chrome 51 has a buggy "split" implementation when RegExp#exec !== nativeExec + var re = /(?:)/; + var originalExec = re.exec; + + re.exec = function () { + return originalExec.apply(this, arguments); + }; + + var result = 'ab'.split(re); + return result.length === 2 && result[0] === 'a' && result[1] === 'b'; +}(); + +var _fixReWks = function (KEY, length, exec) { + var SYMBOL = _wks(KEY); + + var DELEGATES_TO_SYMBOL = !_fails(function () { + // String methods call symbol-named RegEp methods + var O = {}; + + O[SYMBOL] = function () { + return 7; + }; + + return ''[KEY](O) != 7; + }); + var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL ? !_fails(function () { + // Symbol-named RegExp methods call .exec + var execCalled = false; + var re = /a/; + + re.exec = function () { + execCalled = true; + return null; + }; + + if (KEY === 'split') { + // RegExp[@@split] doesn't call the regex's exec method, but first creates + // a new one. We need to return the patched regex when creating the new one. + re.constructor = {}; + + re.constructor[SPECIES] = function () { + return re; + }; + } + + re[SYMBOL](''); + return !execCalled; + }) : undefined; + + if (!DELEGATES_TO_SYMBOL || !DELEGATES_TO_EXEC || KEY === 'replace' && !REPLACE_SUPPORTS_NAMED_GROUPS || KEY === 'split' && !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC) { + var nativeRegExpMethod = /./[SYMBOL]; + var fns = exec(_defined, SYMBOL, ''[KEY], function maybeCallNative(nativeMethod, regexp, str, arg2, forceStringMethod) { + if (regexp.exec === _regexpExec) { + if (DELEGATES_TO_SYMBOL && !forceStringMethod) { + // The native String method already delegates to @@method (this + // polyfilled function), leasing to infinite recursion. + // We avoid it by directly calling the native @@method method. + return { + done: true, + value: nativeRegExpMethod.call(regexp, str, arg2) + }; + } + + return { + done: true, + value: nativeMethod.call(str, regexp, arg2) + }; + } + + return { + done: false + }; + }); + var strfn = fns[0]; + var rxfn = fns[1]; + + _redefine(String.prototype, KEY, strfn); + + _hide(RegExp.prototype, SYMBOL, length == 2 // 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue) + // 21.2.5.11 RegExp.prototype[@@split](string, limit) + ? function (string, arg) { + return rxfn.call(string, this, arg); + } // 21.2.5.6 RegExp.prototype[@@match](string) + // 21.2.5.9 RegExp.prototype[@@search](string) + : function (string) { + return rxfn.call(string, this); + }); + } +}; + +var max$1 = Math.max; +var min$2 = Math.min; +var floor$1 = Math.floor; +var SUBSTITUTION_SYMBOLS = /\$([$&`']|\d\d?|<[^>]*>)/g; +var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&`']|\d\d?)/g; + +var maybeToString = function (it) { + return it === undefined ? it : String(it); +}; // @@replace logic + + +_fixReWks('replace', 2, function (defined, REPLACE, $replace, maybeCallNative) { + return [// `String.prototype.replace` method + // https://tc39.github.io/ecma262/#sec-string.prototype.replace + function replace(searchValue, replaceValue) { + var O = defined(this); + var fn = searchValue == undefined ? undefined : searchValue[REPLACE]; + return fn !== undefined ? fn.call(searchValue, O, replaceValue) : $replace.call(String(O), searchValue, replaceValue); + }, // `RegExp.prototype[@@replace]` method + // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@replace + function (regexp, replaceValue) { + var res = maybeCallNative($replace, regexp, this, replaceValue); + if (res.done) return res.value; + + var rx = _anObject(regexp); + + var S = String(this); + var functionalReplace = typeof replaceValue === 'function'; + if (!functionalReplace) replaceValue = String(replaceValue); + var global = rx.global; + + if (global) { + var fullUnicode = rx.unicode; + rx.lastIndex = 0; + } + + var results = []; + + while (true) { + var result = _regexpExecAbstract(rx, S); + + if (result === null) break; + results.push(result); + if (!global) break; + var matchStr = String(result[0]); + if (matchStr === '') rx.lastIndex = _advanceStringIndex(S, _toLength(rx.lastIndex), fullUnicode); + } + + var accumulatedResult = ''; + var nextSourcePosition = 0; + + for (var i = 0; i < results.length; i++) { + result = results[i]; + var matched = String(result[0]); + var position = max$1(min$2(_toInteger(result.index), S.length), 0); + var captures = []; // NOTE: This is equivalent to + // captures = result.slice(1).map(maybeToString) + // but for some reason `nativeSlice.call(result, 1, result.length)` (called in + // the slice polyfill when slicing native arrays) "doesn't work" in safari 9 and + // causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it. + + for (var j = 1; j < result.length; j++) captures.push(maybeToString(result[j])); + + var namedCaptures = result.groups; + + if (functionalReplace) { + var replacerArgs = [matched].concat(captures, position, S); + if (namedCaptures !== undefined) replacerArgs.push(namedCaptures); + var replacement = String(replaceValue.apply(undefined, replacerArgs)); + } else { + replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue); + } + + if (position >= nextSourcePosition) { + accumulatedResult += S.slice(nextSourcePosition, position) + replacement; + nextSourcePosition = position + matched.length; + } + } + + return accumulatedResult + S.slice(nextSourcePosition); + }]; // https://tc39.github.io/ecma262/#sec-getsubstitution + + function getSubstitution(matched, str, position, captures, namedCaptures, replacement) { + var tailPos = position + matched.length; + var m = captures.length; + var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED; + + if (namedCaptures !== undefined) { + namedCaptures = _toObject(namedCaptures); + symbols = SUBSTITUTION_SYMBOLS; + } + + return $replace.call(replacement, symbols, function (match, ch) { + var capture; + + switch (ch.charAt(0)) { + case '$': + return '$'; + + case '&': + return matched; + + case '`': + return str.slice(0, position); + + case "'": + return str.slice(tailPos); + + case '<': + capture = namedCaptures[ch.slice(1, -1)]; + break; + + default: + // \d\d? + var n = +ch; + if (n === 0) return match; + + if (n > m) { + var f = floor$1(n / 10); + if (f === 0) return match; + if (f <= m) return captures[f - 1] === undefined ? ch.charAt(1) : captures[f - 1] + ch.charAt(1); + return match; + } + + capture = captures[n - 1]; + } + + return capture === undefined ? '' : capture; + }); + } +}); + +var UNSCOPABLES = _wks('unscopables'); + +var ArrayProto = Array.prototype; +if (ArrayProto[UNSCOPABLES] == undefined) _hide(ArrayProto, UNSCOPABLES, {}); + +var _addToUnscopables = function (key) { + ArrayProto[UNSCOPABLES][key] = true; +}; + +var _iterStep = function (done, value) { + return { + value: value, + done: !!done + }; +}; + +var _iterators = {}; +var IteratorPrototype = {}; // 25.1.2.1.1 %IteratorPrototype%[@@iterator]() + +_hide(IteratorPrototype, _wks('iterator'), function () { + return this; +}); + +var _iterCreate = function (Constructor, NAME, next) { + Constructor.prototype = _objectCreate(IteratorPrototype, { + next: _propertyDesc(1, next) + }); + + _setToStringTag(Constructor, NAME + ' Iterator'); +}; + +var IE_PROTO$2 = _sharedKey('IE_PROTO'); + +var ObjectProto$1 = Object.prototype; + +var _objectGpo = Object.getPrototypeOf || function (O) { + O = _toObject(O); + if (_has(O, IE_PROTO$2)) return O[IE_PROTO$2]; + + if (typeof O.constructor == 'function' && O instanceof O.constructor) { + return O.constructor.prototype; + } + + return O instanceof Object ? ObjectProto$1 : null; +}; + +var ITERATOR = _wks('iterator'); + +var BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next` + +var FF_ITERATOR = '@@iterator'; +var KEYS = 'keys'; +var VALUES = 'values'; + +var returnThis = function () { + return this; +}; + +var _iterDefine = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) { + _iterCreate(Constructor, NAME, next); + + var getMethod = function (kind) { + if (!BUGGY && kind in proto) return proto[kind]; + + switch (kind) { + case KEYS: + return function keys() { + return new Constructor(this, kind); + }; + + case VALUES: + return function values() { + return new Constructor(this, kind); + }; + } + + return function entries() { + return new Constructor(this, kind); + }; + }; + + var TAG = NAME + ' Iterator'; + var DEF_VALUES = DEFAULT == VALUES; + var VALUES_BUG = false; + var proto = Base.prototype; + var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT]; + var $default = $native || getMethod(DEFAULT); + var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined; + var $anyNative = NAME == 'Array' ? proto.entries || $native : $native; + var methods, key, IteratorPrototype; // Fix native + + if ($anyNative) { + IteratorPrototype = _objectGpo($anyNative.call(new Base())); + + if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) { + // Set @@toStringTag to native iterators + _setToStringTag(IteratorPrototype, TAG, true); // fix for some old engines + + + if (typeof IteratorPrototype[ITERATOR] != 'function') _hide(IteratorPrototype, ITERATOR, returnThis); + } + } // fix Array#{values, @@iterator}.name in V8 / FF + + + if (DEF_VALUES && $native && $native.name !== VALUES) { + VALUES_BUG = true; + + $default = function values() { + return $native.call(this); + }; + } // Define iterator + + + if (BUGGY || VALUES_BUG || !proto[ITERATOR]) { + _hide(proto, ITERATOR, $default); + } // Plug for library + + + _iterators[NAME] = $default; + _iterators[TAG] = returnThis; + + if (DEFAULT) { + methods = { + values: DEF_VALUES ? $default : getMethod(VALUES), + keys: IS_SET ? $default : getMethod(KEYS), + entries: $entries + }; + if (FORCED) for (key in methods) { + if (!(key in proto)) _redefine(proto, key, methods[key]); + } else _export(_export.P + _export.F * (BUGGY || VALUES_BUG), NAME, methods); + } + + return methods; +}; // 22.1.3.13 Array.prototype.keys() +// 22.1.3.29 Array.prototype.values() +// 22.1.3.30 Array.prototype[@@iterator]() + + +var es6_array_iterator = _iterDefine(Array, 'Array', function (iterated, kind) { + this._t = _toIobject(iterated); // target + + this._i = 0; // next index + + this._k = kind; // kind + // 22.1.5.2.1 %ArrayIteratorPrototype%.next() +}, function () { + var O = this._t; + var kind = this._k; + var index = this._i++; + + if (!O || index >= O.length) { + this._t = undefined; + return _iterStep(1); + } + + if (kind == 'keys') return _iterStep(0, index); + if (kind == 'values') return _iterStep(0, O[index]); + return _iterStep(0, [index, O[index]]); +}, 'values'); // argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7) + + +_iterators.Arguments = _iterators.Array; + +_addToUnscopables('keys'); + +_addToUnscopables('values'); + +_addToUnscopables('entries'); + +var ITERATOR$1 = _wks('iterator'); + +var TO_STRING_TAG = _wks('toStringTag'); + +var ArrayValues = _iterators.Array; +var DOMIterables = { + CSSRuleList: true, + // TODO: Not spec compliant, should be false. + CSSStyleDeclaration: false, + CSSValueList: false, + ClientRectList: false, + DOMRectList: false, + DOMStringList: false, + DOMTokenList: true, + DataTransferItemList: false, + FileList: false, + HTMLAllCollection: false, + HTMLCollection: false, + HTMLFormElement: false, + HTMLSelectElement: false, + MediaList: true, + // TODO: Not spec compliant, should be false. + MimeTypeArray: false, + NamedNodeMap: false, + NodeList: true, + PaintRequestList: false, + Plugin: false, + PluginArray: false, + SVGLengthList: false, + SVGNumberList: false, + SVGPathSegList: false, + SVGPointList: false, + SVGStringList: false, + SVGTransformList: false, + SourceBufferList: false, + StyleSheetList: true, + // TODO: Not spec compliant, should be false. + TextTrackCueList: false, + TextTrackList: false, + TouchList: false +}; + +for (var collections = _objectKeys(DOMIterables), i = 0; i < collections.length; i++) { + var NAME = collections[i]; + var explicit = DOMIterables[NAME]; + var Collection = _global[NAME]; + var proto = Collection && Collection.prototype; + var key; + + if (proto) { + if (!proto[ITERATOR$1]) _hide(proto, ITERATOR$1, ArrayValues); + if (!proto[TO_STRING_TAG]) _hide(proto, TO_STRING_TAG, NAME); + _iterators[NAME] = ArrayValues; + if (explicit) for (key in es6_array_iterator) if (!proto[key]) _redefine(proto, key, es6_array_iterator[key], true); + } +} + +var test = {}; +test[_wks('toStringTag')] = 'z'; + +if (test + '' != '[object z]') { + _redefine(Object.prototype, 'toString', function toString() { + return '[object ' + _classof(this) + ']'; + }, true); +} + +var isEnum$1 = _objectPie.f; + +var _objectToArray = function (isEntries) { + return function (it) { + var O = _toIobject(it); + + var keys = _objectKeys(O); + + var length = keys.length; + var i = 0; + var result = []; + var key; + + while (length > i) { + key = keys[i++]; + + if (!_descriptors || isEnum$1.call(O, key)) { + result.push(isEntries ? [key, O[key]] : O[key]); + } + } + + return result; + }; +}; + +var $values = _objectToArray(false); + +_export(_export.S, 'Object', { + values: function values(it) { + return $values(it); + } +}); + +var MATCH = _wks('match'); + +var _isRegexp = function (it) { + var isRegExp; + return _isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : _cof(it) == 'RegExp'); +}; + +var SPECIES$1 = _wks('species'); + +var _speciesConstructor = function (O, D) { + var C = _anObject(O).constructor; + + var S; + return C === undefined || (S = _anObject(C)[SPECIES$1]) == undefined ? D : _aFunction(S); +}; + +var $min = Math.min; +var $push = [].push; +var $SPLIT = 'split'; +var LENGTH = 'length'; +var LAST_INDEX$1 = 'lastIndex'; +var MAX_UINT32 = 0xffffffff; // babel-minify transpiles RegExp('x', 'y') -> /x/y and it causes SyntaxError + +var SUPPORTS_Y = !_fails(function () { + RegExp(MAX_UINT32, 'y'); +}); // @@split logic + +_fixReWks('split', 2, function (defined, SPLIT, $split, maybeCallNative) { + var internalSplit; + + if ('abbc'[$SPLIT](/(b)*/)[1] == 'c' || 'test'[$SPLIT](/(?:)/, -1)[LENGTH] != 4 || 'ab'[$SPLIT](/(?:ab)*/)[LENGTH] != 2 || '.'[$SPLIT](/(.?)(.?)/)[LENGTH] != 4 || '.'[$SPLIT](/()()/)[LENGTH] > 1 || ''[$SPLIT](/.?/)[LENGTH]) { + // based on es5-shim implementation, need to rework it + internalSplit = function (separator, limit) { + var string = String(this); + if (separator === undefined && limit === 0) return []; // If `separator` is not a regex, use native split + + if (!_isRegexp(separator)) return $split.call(string, separator, limit); + var output = []; + var flags = (separator.ignoreCase ? 'i' : '') + (separator.multiline ? 'm' : '') + (separator.unicode ? 'u' : '') + (separator.sticky ? 'y' : ''); + var lastLastIndex = 0; + var splitLimit = limit === undefined ? MAX_UINT32 : limit >>> 0; // Make `global` and avoid `lastIndex` issues by working with a copy + + var separatorCopy = new RegExp(separator.source, flags + 'g'); + var match, lastIndex, lastLength; + + while (match = _regexpExec.call(separatorCopy, string)) { + lastIndex = separatorCopy[LAST_INDEX$1]; + + if (lastIndex > lastLastIndex) { + output.push(string.slice(lastLastIndex, match.index)); + if (match[LENGTH] > 1 && match.index < string[LENGTH]) $push.apply(output, match.slice(1)); + lastLength = match[0][LENGTH]; + lastLastIndex = lastIndex; + if (output[LENGTH] >= splitLimit) break; + } + + if (separatorCopy[LAST_INDEX$1] === match.index) separatorCopy[LAST_INDEX$1]++; // Avoid an infinite loop + } + + if (lastLastIndex === string[LENGTH]) { + if (lastLength || !separatorCopy.test('')) output.push(''); + } else output.push(string.slice(lastLastIndex)); + + return output[LENGTH] > splitLimit ? output.slice(0, splitLimit) : output; + }; // Chakra, V8 + + } else if ('0'[$SPLIT](undefined, 0)[LENGTH]) { + internalSplit = function (separator, limit) { + return separator === undefined && limit === 0 ? [] : $split.call(this, separator, limit); + }; + } else { + internalSplit = $split; + } + + return [// `String.prototype.split` method + // https://tc39.github.io/ecma262/#sec-string.prototype.split + function split(separator, limit) { + var O = defined(this); + var splitter = separator == undefined ? undefined : separator[SPLIT]; + return splitter !== undefined ? splitter.call(separator, O, limit) : internalSplit.call(String(O), separator, limit); + }, // `RegExp.prototype[@@split]` method + // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@split + // + // NOTE: This cannot be properly polyfilled in engines that don't support + // the 'y' flag. + function (regexp, limit) { + var res = maybeCallNative(internalSplit, regexp, this, limit, internalSplit !== $split); + if (res.done) return res.value; + + var rx = _anObject(regexp); + + var S = String(this); + + var C = _speciesConstructor(rx, RegExp); + + var unicodeMatching = rx.unicode; + var flags = (rx.ignoreCase ? 'i' : '') + (rx.multiline ? 'm' : '') + (rx.unicode ? 'u' : '') + (SUPPORTS_Y ? 'y' : 'g'); // ^(? + rx + ) is needed, in combination with some S slicing, to + // simulate the 'y' flag. + + var splitter = new C(SUPPORTS_Y ? rx : '^(?:' + rx.source + ')', flags); + var lim = limit === undefined ? MAX_UINT32 : limit >>> 0; + if (lim === 0) return []; + if (S.length === 0) return _regexpExecAbstract(splitter, S) === null ? [S] : []; + var p = 0; + var q = 0; + var A = []; + + while (q < S.length) { + splitter.lastIndex = SUPPORTS_Y ? q : 0; + + var z = _regexpExecAbstract(splitter, SUPPORTS_Y ? S : S.slice(q)); + + var e; + + if (z === null || (e = $min(_toLength(splitter.lastIndex + (SUPPORTS_Y ? 0 : q)), S.length)) === p) { + q = _advanceStringIndex(S, q, unicodeMatching); + } else { + A.push(S.slice(p, q)); + if (A.length === lim) return A; + + for (var i = 1; i <= z.length - 1; i++) { + A.push(z[i]); + if (A.length === lim) return A; + } + + q = p = e; + } + } + + A.push(S.slice(p)); + return A; + }]; +}); + +var $assign = Object.assign; // should work with symbols and should have deterministic property order (V8 bug) + +var _objectAssign = !$assign || _fails(function () { + var A = {}; + var B = {}; // eslint-disable-next-line no-undef + + var S = Symbol(); + var K = 'abcdefghijklmnopqrst'; + A[S] = 7; + K.split('').forEach(function (k) { + B[k] = k; + }); + return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K; +}) ? function assign(target, source) { + // eslint-disable-line no-unused-vars + var T = _toObject(target); + + var aLen = arguments.length; + var index = 1; + var getSymbols = _objectGops.f; + var isEnum = _objectPie.f; + + while (aLen > index) { + var S = _iobject(arguments[index++]); + + var keys = getSymbols ? _objectKeys(S).concat(getSymbols(S)) : _objectKeys(S); + var length = keys.length; + var j = 0; + var key; + + while (length > j) { + key = keys[j++]; + if (!_descriptors || isEnum.call(S, key)) T[key] = S[key]; + } + } + + return T; +} : $assign; + +_export(_export.S + _export.F, 'Object', { + assign: _objectAssign +}); +/* eslint-disable no-proto */ + + +var check = function (O, proto) { + _anObject(O); + + if (!_isObject(proto) && proto !== null) throw TypeError(proto + ": can't set as prototype!"); +}; + +var _setProto = { + set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line + function (test, buggy, set) { + try { + set = _ctx(Function.call, _objectGopd.f(Object.prototype, '__proto__').set, 2); + set(test, []); + buggy = !(test instanceof Array); + } catch (e) { + buggy = true; + } + + return function setPrototypeOf(O, proto) { + check(O, proto); + if (buggy) O.__proto__ = proto;else set(O, proto); + return O; + }; + }({}, false) : undefined), + check: check +}; +var setPrototypeOf = _setProto.set; + +var _inheritIfRequired = function (that, target, C) { + var S = target.constructor; + var P; + + if (S !== C && typeof S == 'function' && (P = S.prototype) !== C.prototype && _isObject(P) && setPrototypeOf) { + setPrototypeOf(that, P); + } + + return that; +}; + +var _stringWs = '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003' + '\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF'; + +var space = '[' + _stringWs + ']'; +var non = '\u200b\u0085'; +var ltrim = RegExp('^' + space + space + '*'); +var rtrim = RegExp(space + space + '*$'); + +var exporter = function (KEY, exec, ALIAS) { + var exp = {}; + + var FORCE = _fails(function () { + return !!_stringWs[KEY]() || non[KEY]() != non; + }); + + var fn = exp[KEY] = FORCE ? exec(trim) : _stringWs[KEY]; + if (ALIAS) exp[ALIAS] = fn; + + _export(_export.P + _export.F * FORCE, 'String', exp); +}; // 1 -> String#trimLeft +// 2 -> String#trimRight +// 3 -> String#trim + + +var trim = exporter.trim = function (string, TYPE) { + string = String(_defined(string)); + if (TYPE & 1) string = string.replace(ltrim, ''); + if (TYPE & 2) string = string.replace(rtrim, ''); + return string; +}; + +var _stringTrim = exporter; +var gOPN$2 = _objectGopn.f; +var gOPD$2 = _objectGopd.f; +var dP$2 = _objectDp.f; +var $trim = _stringTrim.trim; +var NUMBER = 'Number'; +var $Number = _global[NUMBER]; +var Base = $Number; +var proto$1 = $Number.prototype; // Opera ~12 has broken Object#toString + +var BROKEN_COF = _cof(_objectCreate(proto$1)) == NUMBER; +var TRIM = 'trim' in String.prototype; // 7.1.3 ToNumber(argument) + +var toNumber = function (argument) { + var it = _toPrimitive(argument, false); + + if (typeof it == 'string' && it.length > 2) { + it = TRIM ? it.trim() : $trim(it, 3); + var first = it.charCodeAt(0); + var third, radix, maxCode; + + if (first === 43 || first === 45) { + third = it.charCodeAt(2); + if (third === 88 || third === 120) return NaN; // Number('+0x1') should be NaN, old V8 fix + } else if (first === 48) { + switch (it.charCodeAt(1)) { + case 66: + case 98: + radix = 2; + maxCode = 49; + break; + // fast equal /^0b[01]+$/i + + case 79: + case 111: + radix = 8; + maxCode = 55; + break; + // fast equal /^0o[0-7]+$/i + + default: + return +it; + } + + for (var digits = it.slice(2), i = 0, l = digits.length, code; i < l; i++) { + code = digits.charCodeAt(i); // parseInt parses a string to a first unavailable symbol + // but ToNumber should return NaN if a string contains unavailable symbols + + if (code < 48 || code > maxCode) return NaN; + } + + return parseInt(digits, radix); + } + } + + return +it; +}; + +if (!$Number(' 0o1') || !$Number('0b1') || $Number('+0x1')) { + $Number = function Number(value) { + var it = arguments.length < 1 ? 0 : value; + var that = this; + return that instanceof $Number // check on 1..constructor(foo) case + && (BROKEN_COF ? _fails(function () { + proto$1.valueOf.call(that); + }) : _cof(that) != NUMBER) ? _inheritIfRequired(new Base(toNumber(it)), that, $Number) : toNumber(it); + }; + + for (var keys = _descriptors ? gOPN$2(Base) : ( // ES3: + 'MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,' + // ES6 (in case, if modules with ES6 Number statics required before): + 'EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,' + 'MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger').split(','), j$1 = 0, key$1; keys.length > j$1; j$1++) { + if (_has(Base, key$1 = keys[j$1]) && !_has($Number, key$1)) { + dP$2($Number, key$1, gOPD$2(Base, key$1)); + } + } + + $Number.prototype = proto$1; + proto$1.constructor = $Number; + + _redefine(_global, NUMBER, $Number); +} + +var moment = createCommonjsModule(function (module, exports) { + (function (global, factory) { + module.exports = factory(); + })(commonjsGlobal, function () { + var hookCallback; + + function hooks() { + return hookCallback.apply(null, arguments); + } // This is done to register the method called with moment() + // without creating circular dependencies. + + + function setHookCallback(callback) { + hookCallback = callback; + } + + function isArray(input) { + return input instanceof Array || Object.prototype.toString.call(input) === '[object Array]'; + } + + function isObject(input) { + // IE8 will treat undefined and null as object if it wasn't for + // input != null + return input != null && Object.prototype.toString.call(input) === '[object Object]'; + } + + function isObjectEmpty(obj) { + if (Object.getOwnPropertyNames) { + return Object.getOwnPropertyNames(obj).length === 0; + } else { + var k; + + for (k in obj) { + if (obj.hasOwnProperty(k)) { + return false; + } + } + + return true; + } + } + + function isUndefined(input) { + return input === void 0; + } + + function isNumber(input) { + return typeof input === 'number' || Object.prototype.toString.call(input) === '[object Number]'; + } + + function isDate(input) { + return input instanceof Date || Object.prototype.toString.call(input) === '[object Date]'; + } + + function map(arr, fn) { + var res = [], + i; + + for (i = 0; i < arr.length; ++i) { + res.push(fn(arr[i], i)); + } + + return res; + } + + function hasOwnProp(a, b) { + return Object.prototype.hasOwnProperty.call(a, b); + } + + function extend(a, b) { + for (var i in b) { + if (hasOwnProp(b, i)) { + a[i] = b[i]; + } + } + + if (hasOwnProp(b, 'toString')) { + a.toString = b.toString; + } + + if (hasOwnProp(b, 'valueOf')) { + a.valueOf = b.valueOf; + } + + return a; + } + + function createUTC(input, format, locale, strict) { + return createLocalOrUTC(input, format, locale, strict, true).utc(); + } + + function defaultParsingFlags() { + // We need to deep clone this object. + return { + empty: false, + unusedTokens: [], + unusedInput: [], + overflow: -2, + charsLeftOver: 0, + nullInput: false, + invalidMonth: null, + invalidFormat: false, + userInvalidated: false, + iso: false, + parsedDateParts: [], + meridiem: null, + rfc2822: false, + weekdayMismatch: false + }; + } + + function getParsingFlags(m) { + if (m._pf == null) { + m._pf = defaultParsingFlags(); + } + + return m._pf; + } + + var some; + + if (Array.prototype.some) { + some = Array.prototype.some; + } else { + some = function (fun) { + var t = Object(this); + var len = t.length >>> 0; + + for (var i = 0; i < len; i++) { + if (i in t && fun.call(this, t[i], i, t)) { + return true; + } + } + + return false; + }; + } + + function isValid(m) { + if (m._isValid == null) { + var flags = getParsingFlags(m); + var parsedParts = some.call(flags.parsedDateParts, function (i) { + return i != null; + }); + var isNowValid = !isNaN(m._d.getTime()) && flags.overflow < 0 && !flags.empty && !flags.invalidMonth && !flags.invalidWeekday && !flags.weekdayMismatch && !flags.nullInput && !flags.invalidFormat && !flags.userInvalidated && (!flags.meridiem || flags.meridiem && parsedParts); + + if (m._strict) { + isNowValid = isNowValid && flags.charsLeftOver === 0 && flags.unusedTokens.length === 0 && flags.bigHour === undefined; + } + + if (Object.isFrozen == null || !Object.isFrozen(m)) { + m._isValid = isNowValid; + } else { + return isNowValid; + } + } + + return m._isValid; + } + + function createInvalid(flags) { + var m = createUTC(NaN); + + if (flags != null) { + extend(getParsingFlags(m), flags); + } else { + getParsingFlags(m).userInvalidated = true; + } + + return m; + } // Plugins that add properties should also add the key here (null value), + // so we can properly clone ourselves. + + + var momentProperties = hooks.momentProperties = []; + + function copyConfig(to, from) { + var i, prop, val; + + if (!isUndefined(from._isAMomentObject)) { + to._isAMomentObject = from._isAMomentObject; + } + + if (!isUndefined(from._i)) { + to._i = from._i; + } + + if (!isUndefined(from._f)) { + to._f = from._f; + } + + if (!isUndefined(from._l)) { + to._l = from._l; + } + + if (!isUndefined(from._strict)) { + to._strict = from._strict; + } + + if (!isUndefined(from._tzm)) { + to._tzm = from._tzm; + } + + if (!isUndefined(from._isUTC)) { + to._isUTC = from._isUTC; + } + + if (!isUndefined(from._offset)) { + to._offset = from._offset; + } + + if (!isUndefined(from._pf)) { + to._pf = getParsingFlags(from); + } + + if (!isUndefined(from._locale)) { + to._locale = from._locale; + } + + if (momentProperties.length > 0) { + for (i = 0; i < momentProperties.length; i++) { + prop = momentProperties[i]; + val = from[prop]; + + if (!isUndefined(val)) { + to[prop] = val; + } + } + } + + return to; + } + + var updateInProgress = false; // Moment prototype object + + function Moment(config) { + copyConfig(this, config); + this._d = new Date(config._d != null ? config._d.getTime() : NaN); + + if (!this.isValid()) { + this._d = new Date(NaN); + } // Prevent infinite loop in case updateOffset creates new moment + // objects. + + + if (updateInProgress === false) { + updateInProgress = true; + hooks.updateOffset(this); + updateInProgress = false; + } + } + + function isMoment(obj) { + return obj instanceof Moment || obj != null && obj._isAMomentObject != null; + } + + function absFloor(number) { + if (number < 0) { + // -0 -> 0 + return Math.ceil(number) || 0; + } else { + return Math.floor(number); + } + } + + function toInt(argumentForCoercion) { + var coercedNumber = +argumentForCoercion, + value = 0; + + if (coercedNumber !== 0 && isFinite(coercedNumber)) { + value = absFloor(coercedNumber); + } + + return value; + } // compare two arrays, return the number of differences + + + function compareArrays(array1, array2, dontConvert) { + var len = Math.min(array1.length, array2.length), + lengthDiff = Math.abs(array1.length - array2.length), + diffs = 0, + i; + + for (i = 0; i < len; i++) { + if (dontConvert && array1[i] !== array2[i] || !dontConvert && toInt(array1[i]) !== toInt(array2[i])) { + diffs++; + } + } + + return diffs + lengthDiff; + } + + function warn(msg) { + if (hooks.suppressDeprecationWarnings === false && typeof console !== 'undefined' && console.warn) { + console.warn('Deprecation warning: ' + msg); + } + } + + function deprecate(msg, fn) { + var firstTime = true; + return extend(function () { + if (hooks.deprecationHandler != null) { + hooks.deprecationHandler(null, msg); + } + + if (firstTime) { + var args = []; + var arg; + + for (var i = 0; i < arguments.length; i++) { + arg = ''; + + if (typeof arguments[i] === 'object') { + arg += '\n[' + i + '] '; + + for (var key in arguments[0]) { + arg += key + ': ' + arguments[0][key] + ', '; + } + + arg = arg.slice(0, -2); // Remove trailing comma and space + } else { + arg = arguments[i]; + } + + args.push(arg); + } + + warn(msg + '\nArguments: ' + Array.prototype.slice.call(args).join('') + '\n' + new Error().stack); + firstTime = false; + } + + return fn.apply(this, arguments); + }, fn); + } + + var deprecations = {}; + + function deprecateSimple(name, msg) { + if (hooks.deprecationHandler != null) { + hooks.deprecationHandler(name, msg); + } + + if (!deprecations[name]) { + warn(msg); + deprecations[name] = true; + } + } + + hooks.suppressDeprecationWarnings = false; + hooks.deprecationHandler = null; + + function isFunction(input) { + return input instanceof Function || Object.prototype.toString.call(input) === '[object Function]'; + } + + function set(config) { + var prop, i; + + for (i in config) { + prop = config[i]; + + if (isFunction(prop)) { + this[i] = prop; + } else { + this['_' + i] = prop; + } + } + + this._config = config; // Lenient ordinal parsing accepts just a number in addition to + // number + (possibly) stuff coming from _dayOfMonthOrdinalParse. + // TODO: Remove "ordinalParse" fallback in next major release. + + this._dayOfMonthOrdinalParseLenient = new RegExp((this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) + '|' + /\d{1,2}/.source); + } + + function mergeConfigs(parentConfig, childConfig) { + var res = extend({}, parentConfig), + prop; + + for (prop in childConfig) { + if (hasOwnProp(childConfig, prop)) { + if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) { + res[prop] = {}; + extend(res[prop], parentConfig[prop]); + extend(res[prop], childConfig[prop]); + } else if (childConfig[prop] != null) { + res[prop] = childConfig[prop]; + } else { + delete res[prop]; + } + } + } + + for (prop in parentConfig) { + if (hasOwnProp(parentConfig, prop) && !hasOwnProp(childConfig, prop) && isObject(parentConfig[prop])) { + // make sure changes to properties don't modify parent config + res[prop] = extend({}, res[prop]); + } + } + + return res; + } + + function Locale(config) { + if (config != null) { + this.set(config); + } + } + + var keys; + + if (Object.keys) { + keys = Object.keys; + } else { + keys = function (obj) { + var i, + res = []; + + for (i in obj) { + if (hasOwnProp(obj, i)) { + res.push(i); + } + } + + return res; + }; + } + + var defaultCalendar = { + sameDay: '[Today at] LT', + nextDay: '[Tomorrow at] LT', + nextWeek: 'dddd [at] LT', + lastDay: '[Yesterday at] LT', + lastWeek: '[Last] dddd [at] LT', + sameElse: 'L' + }; + + function calendar(key, mom, now) { + var output = this._calendar[key] || this._calendar['sameElse']; + return isFunction(output) ? output.call(mom, now) : output; + } + + var defaultLongDateFormat = { + LTS: 'h:mm:ss A', + LT: 'h:mm A', + L: 'MM/DD/YYYY', + LL: 'MMMM D, YYYY', + LLL: 'MMMM D, YYYY h:mm A', + LLLL: 'dddd, MMMM D, YYYY h:mm A' + }; + + function longDateFormat(key) { + var format = this._longDateFormat[key], + formatUpper = this._longDateFormat[key.toUpperCase()]; + + if (format || !formatUpper) { + return format; + } + + this._longDateFormat[key] = formatUpper.replace(/MMMM|MM|DD|dddd/g, function (val) { + return val.slice(1); + }); + return this._longDateFormat[key]; + } + + var defaultInvalidDate = 'Invalid date'; + + function invalidDate() { + return this._invalidDate; + } + + var defaultOrdinal = '%d'; + var defaultDayOfMonthOrdinalParse = /\d{1,2}/; + + function ordinal(number) { + return this._ordinal.replace('%d', number); + } + + var defaultRelativeTime = { + future: 'in %s', + past: '%s ago', + s: 'a few seconds', + ss: '%d seconds', + m: 'a minute', + mm: '%d minutes', + h: 'an hour', + hh: '%d hours', + d: 'a day', + dd: '%d days', + M: 'a month', + MM: '%d months', + y: 'a year', + yy: '%d years' + }; + + function relativeTime(number, withoutSuffix, string, isFuture) { + var output = this._relativeTime[string]; + return isFunction(output) ? output(number, withoutSuffix, string, isFuture) : output.replace(/%d/i, number); + } + + function pastFuture(diff, output) { + var format = this._relativeTime[diff > 0 ? 'future' : 'past']; + return isFunction(format) ? format(output) : format.replace(/%s/i, output); + } + + var aliases = {}; + + function addUnitAlias(unit, shorthand) { + var lowerCase = unit.toLowerCase(); + aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit; + } + + function normalizeUnits(units) { + return typeof units === 'string' ? aliases[units] || aliases[units.toLowerCase()] : undefined; + } + + function normalizeObjectUnits(inputObject) { + var normalizedInput = {}, + normalizedProp, + prop; + + for (prop in inputObject) { + if (hasOwnProp(inputObject, prop)) { + normalizedProp = normalizeUnits(prop); + + if (normalizedProp) { + normalizedInput[normalizedProp] = inputObject[prop]; + } + } + } + + return normalizedInput; + } + + var priorities = {}; + + function addUnitPriority(unit, priority) { + priorities[unit] = priority; + } + + function getPrioritizedUnits(unitsObj) { + var units = []; + + for (var u in unitsObj) { + units.push({ + unit: u, + priority: priorities[u] + }); + } + + units.sort(function (a, b) { + return a.priority - b.priority; + }); + return units; + } + + function zeroFill(number, targetLength, forceSign) { + var absNumber = '' + Math.abs(number), + zerosToFill = targetLength - absNumber.length, + sign = number >= 0; + return (sign ? forceSign ? '+' : '' : '-') + Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) + absNumber; + } + + var formattingTokens = /(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g; + var localFormattingTokens = /(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g; + var formatFunctions = {}; + var formatTokenFunctions = {}; // token: 'M' + // padded: ['MM', 2] + // ordinal: 'Mo' + // callback: function () { this.month() + 1 } + + function addFormatToken(token, padded, ordinal, callback) { + var func = callback; + + if (typeof callback === 'string') { + func = function () { + return this[callback](); + }; + } + + if (token) { + formatTokenFunctions[token] = func; + } + + if (padded) { + formatTokenFunctions[padded[0]] = function () { + return zeroFill(func.apply(this, arguments), padded[1], padded[2]); + }; + } + + if (ordinal) { + formatTokenFunctions[ordinal] = function () { + return this.localeData().ordinal(func.apply(this, arguments), token); + }; + } + } + + function removeFormattingTokens(input) { + if (input.match(/\[[\s\S]/)) { + return input.replace(/^\[|\]$/g, ''); + } + + return input.replace(/\\/g, ''); + } + + function makeFormatFunction(format) { + var array = format.match(formattingTokens), + i, + length; + + for (i = 0, length = array.length; i < length; i++) { + if (formatTokenFunctions[array[i]]) { + array[i] = formatTokenFunctions[array[i]]; + } else { + array[i] = removeFormattingTokens(array[i]); + } + } + + return function (mom) { + var output = '', + i; + + for (i = 0; i < length; i++) { + output += isFunction(array[i]) ? array[i].call(mom, format) : array[i]; + } + + return output; + }; + } // format date using native date object + + + function formatMoment(m, format) { + if (!m.isValid()) { + return m.localeData().invalidDate(); + } + + format = expandFormat(format, m.localeData()); + formatFunctions[format] = formatFunctions[format] || makeFormatFunction(format); + return formatFunctions[format](m); + } + + function expandFormat(format, locale) { + var i = 5; + + function replaceLongDateFormatTokens(input) { + return locale.longDateFormat(input) || input; + } + + localFormattingTokens.lastIndex = 0; + + while (i >= 0 && localFormattingTokens.test(format)) { + format = format.replace(localFormattingTokens, replaceLongDateFormatTokens); + localFormattingTokens.lastIndex = 0; + i -= 1; + } + + return format; + } + + var match1 = /\d/; // 0 - 9 + + var match2 = /\d\d/; // 00 - 99 + + var match3 = /\d{3}/; // 000 - 999 + + var match4 = /\d{4}/; // 0000 - 9999 + + var match6 = /[+-]?\d{6}/; // -999999 - 999999 + + var match1to2 = /\d\d?/; // 0 - 99 + + var match3to4 = /\d\d\d\d?/; // 999 - 9999 + + var match5to6 = /\d\d\d\d\d\d?/; // 99999 - 999999 + + var match1to3 = /\d{1,3}/; // 0 - 999 + + var match1to4 = /\d{1,4}/; // 0 - 9999 + + var match1to6 = /[+-]?\d{1,6}/; // -999999 - 999999 + + var matchUnsigned = /\d+/; // 0 - inf + + var matchSigned = /[+-]?\d+/; // -inf - inf + + var matchOffset = /Z|[+-]\d\d:?\d\d/gi; // +00:00 -00:00 +0000 -0000 or Z + + var matchShortOffset = /Z|[+-]\d\d(?::?\d\d)?/gi; // +00 -00 +00:00 -00:00 +0000 -0000 or Z + + var matchTimestamp = /[+-]?\d+(\.\d{1,3})?/; // 123456789 123456789.123 + // any word (or two) characters or numbers including two/three word month in arabic. + // includes scottish gaelic two word and hyphenated months + + var matchWord = /[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i; + var regexes = {}; + + function addRegexToken(token, regex, strictRegex) { + regexes[token] = isFunction(regex) ? regex : function (isStrict, localeData) { + return isStrict && strictRegex ? strictRegex : regex; + }; + } + + function getParseRegexForToken(token, config) { + if (!hasOwnProp(regexes, token)) { + return new RegExp(unescapeFormat(token)); + } + + return regexes[token](config._strict, config._locale); + } // Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript + + + function unescapeFormat(s) { + return regexEscape(s.replace('\\', '').replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g, function (matched, p1, p2, p3, p4) { + return p1 || p2 || p3 || p4; + })); + } + + function regexEscape(s) { + return s.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&'); + } + + var tokens = {}; + + function addParseToken(token, callback) { + var i, + func = callback; + + if (typeof token === 'string') { + token = [token]; + } + + if (isNumber(callback)) { + func = function (input, array) { + array[callback] = toInt(input); + }; + } + + for (i = 0; i < token.length; i++) { + tokens[token[i]] = func; + } + } + + function addWeekParseToken(token, callback) { + addParseToken(token, function (input, array, config, token) { + config._w = config._w || {}; + callback(input, config._w, config, token); + }); + } + + function addTimeToArrayFromToken(token, input, config) { + if (input != null && hasOwnProp(tokens, token)) { + tokens[token](input, config._a, config, token); + } + } + + var YEAR = 0; + var MONTH = 1; + var DATE = 2; + var HOUR = 3; + var MINUTE = 4; + var SECOND = 5; + var MILLISECOND = 6; + var WEEK = 7; + var WEEKDAY = 8; // FORMATTING + + addFormatToken('Y', 0, 0, function () { + var y = this.year(); + return y <= 9999 ? '' + y : '+' + y; + }); + addFormatToken(0, ['YY', 2], 0, function () { + return this.year() % 100; + }); + addFormatToken(0, ['YYYY', 4], 0, 'year'); + addFormatToken(0, ['YYYYY', 5], 0, 'year'); + addFormatToken(0, ['YYYYYY', 6, true], 0, 'year'); // ALIASES + + addUnitAlias('year', 'y'); // PRIORITIES + + addUnitPriority('year', 1); // PARSING + + addRegexToken('Y', matchSigned); + addRegexToken('YY', match1to2, match2); + addRegexToken('YYYY', match1to4, match4); + addRegexToken('YYYYY', match1to6, match6); + addRegexToken('YYYYYY', match1to6, match6); + addParseToken(['YYYYY', 'YYYYYY'], YEAR); + addParseToken('YYYY', function (input, array) { + array[YEAR] = input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input); + }); + addParseToken('YY', function (input, array) { + array[YEAR] = hooks.parseTwoDigitYear(input); + }); + addParseToken('Y', function (input, array) { + array[YEAR] = parseInt(input, 10); + }); // HELPERS + + function daysInYear(year) { + return isLeapYear(year) ? 366 : 365; + } + + function isLeapYear(year) { + return year % 4 === 0 && year % 100 !== 0 || year % 400 === 0; + } // HOOKS + + + hooks.parseTwoDigitYear = function (input) { + return toInt(input) + (toInt(input) > 68 ? 1900 : 2000); + }; // MOMENTS + + + var getSetYear = makeGetSet('FullYear', true); + + function getIsLeapYear() { + return isLeapYear(this.year()); + } + + function makeGetSet(unit, keepTime) { + return function (value) { + if (value != null) { + set$1(this, unit, value); + hooks.updateOffset(this, keepTime); + return this; + } else { + return get(this, unit); + } + }; + } + + function get(mom, unit) { + return mom.isValid() ? mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]() : NaN; + } + + function set$1(mom, unit, value) { + if (mom.isValid() && !isNaN(value)) { + if (unit === 'FullYear' && isLeapYear(mom.year()) && mom.month() === 1 && mom.date() === 29) { + mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value, mom.month(), daysInMonth(value, mom.month())); + } else { + mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value); + } + } + } // MOMENTS + + + function stringGet(units) { + units = normalizeUnits(units); + + if (isFunction(this[units])) { + return this[units](); + } + + return this; + } + + function stringSet(units, value) { + if (typeof units === 'object') { + units = normalizeObjectUnits(units); + var prioritized = getPrioritizedUnits(units); + + for (var i = 0; i < prioritized.length; i++) { + this[prioritized[i].unit](units[prioritized[i].unit]); + } + } else { + units = normalizeUnits(units); + + if (isFunction(this[units])) { + return this[units](value); + } + } + + return this; + } + + function mod(n, x) { + return (n % x + x) % x; + } + + var indexOf; + + if (Array.prototype.indexOf) { + indexOf = Array.prototype.indexOf; + } else { + indexOf = function (o) { + // I know + var i; + + for (i = 0; i < this.length; ++i) { + if (this[i] === o) { + return i; + } + } + + return -1; + }; + } + + function daysInMonth(year, month) { + if (isNaN(year) || isNaN(month)) { + return NaN; + } + + var modMonth = mod(month, 12); + year += (month - modMonth) / 12; + return modMonth === 1 ? isLeapYear(year) ? 29 : 28 : 31 - modMonth % 7 % 2; + } // FORMATTING + + + addFormatToken('M', ['MM', 2], 'Mo', function () { + return this.month() + 1; + }); + addFormatToken('MMM', 0, 0, function (format) { + return this.localeData().monthsShort(this, format); + }); + addFormatToken('MMMM', 0, 0, function (format) { + return this.localeData().months(this, format); + }); // ALIASES + + addUnitAlias('month', 'M'); // PRIORITY + + addUnitPriority('month', 8); // PARSING + + addRegexToken('M', match1to2); + addRegexToken('MM', match1to2, match2); + addRegexToken('MMM', function (isStrict, locale) { + return locale.monthsShortRegex(isStrict); + }); + addRegexToken('MMMM', function (isStrict, locale) { + return locale.monthsRegex(isStrict); + }); + addParseToken(['M', 'MM'], function (input, array) { + array[MONTH] = toInt(input) - 1; + }); + addParseToken(['MMM', 'MMMM'], function (input, array, config, token) { + var month = config._locale.monthsParse(input, token, config._strict); // if we didn't find a month name, mark the date as invalid. + + + if (month != null) { + array[MONTH] = month; + } else { + getParsingFlags(config).invalidMonth = input; + } + }); // LOCALES + + var MONTHS_IN_FORMAT = /D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/; + var defaultLocaleMonths = 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'); + + function localeMonths(m, format) { + if (!m) { + return isArray(this._months) ? this._months : this._months['standalone']; + } + + return isArray(this._months) ? this._months[m.month()] : this._months[(this._months.isFormat || MONTHS_IN_FORMAT).test(format) ? 'format' : 'standalone'][m.month()]; + } + + var defaultLocaleMonthsShort = 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'); + + function localeMonthsShort(m, format) { + if (!m) { + return isArray(this._monthsShort) ? this._monthsShort : this._monthsShort['standalone']; + } + + return isArray(this._monthsShort) ? this._monthsShort[m.month()] : this._monthsShort[MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'][m.month()]; + } + + function handleStrictParse(monthName, format, strict) { + var i, + ii, + mom, + llc = monthName.toLocaleLowerCase(); + + if (!this._monthsParse) { + // this is not used + this._monthsParse = []; + this._longMonthsParse = []; + this._shortMonthsParse = []; + + for (i = 0; i < 12; ++i) { + mom = createUTC([2000, i]); + this._shortMonthsParse[i] = this.monthsShort(mom, '').toLocaleLowerCase(); + this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase(); + } + } + + if (strict) { + if (format === 'MMM') { + ii = indexOf.call(this._shortMonthsParse, llc); + return ii !== -1 ? ii : null; + } else { + ii = indexOf.call(this._longMonthsParse, llc); + return ii !== -1 ? ii : null; + } + } else { + if (format === 'MMM') { + ii = indexOf.call(this._shortMonthsParse, llc); + + if (ii !== -1) { + return ii; + } + + ii = indexOf.call(this._longMonthsParse, llc); + return ii !== -1 ? ii : null; + } else { + ii = indexOf.call(this._longMonthsParse, llc); + + if (ii !== -1) { + return ii; + } + + ii = indexOf.call(this._shortMonthsParse, llc); + return ii !== -1 ? ii : null; + } + } + } + + function localeMonthsParse(monthName, format, strict) { + var i, mom, regex; + + if (this._monthsParseExact) { + return handleStrictParse.call(this, monthName, format, strict); + } + + if (!this._monthsParse) { + this._monthsParse = []; + this._longMonthsParse = []; + this._shortMonthsParse = []; + } // TODO: add sorting + // Sorting makes sure if one month (or abbr) is a prefix of another + // see sorting in computeMonthsParse + + + for (i = 0; i < 12; i++) { + // make the regex if we don't have it already + mom = createUTC([2000, i]); + + if (strict && !this._longMonthsParse[i]) { + this._longMonthsParse[i] = new RegExp('^' + this.months(mom, '').replace('.', '') + '$', 'i'); + this._shortMonthsParse[i] = new RegExp('^' + this.monthsShort(mom, '').replace('.', '') + '$', 'i'); + } + + if (!strict && !this._monthsParse[i]) { + regex = '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, ''); + this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i'); + } // test the regex + + + if (strict && format === 'MMMM' && this._longMonthsParse[i].test(monthName)) { + return i; + } else if (strict && format === 'MMM' && this._shortMonthsParse[i].test(monthName)) { + return i; + } else if (!strict && this._monthsParse[i].test(monthName)) { + return i; + } + } + } // MOMENTS + + + function setMonth(mom, value) { + var dayOfMonth; + + if (!mom.isValid()) { + // No op + return mom; + } + + if (typeof value === 'string') { + if (/^\d+$/.test(value)) { + value = toInt(value); + } else { + value = mom.localeData().monthsParse(value); // TODO: Another silent failure? + + if (!isNumber(value)) { + return mom; + } + } + } + + dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value)); + + mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth); + + return mom; + } + + function getSetMonth(value) { + if (value != null) { + setMonth(this, value); + hooks.updateOffset(this, true); + return this; + } else { + return get(this, 'Month'); + } + } + + function getDaysInMonth() { + return daysInMonth(this.year(), this.month()); + } + + var defaultMonthsShortRegex = matchWord; + + function monthsShortRegex(isStrict) { + if (this._monthsParseExact) { + if (!hasOwnProp(this, '_monthsRegex')) { + computeMonthsParse.call(this); + } + + if (isStrict) { + return this._monthsShortStrictRegex; + } else { + return this._monthsShortRegex; + } + } else { + if (!hasOwnProp(this, '_monthsShortRegex')) { + this._monthsShortRegex = defaultMonthsShortRegex; + } + + return this._monthsShortStrictRegex && isStrict ? this._monthsShortStrictRegex : this._monthsShortRegex; + } + } + + var defaultMonthsRegex = matchWord; + + function monthsRegex(isStrict) { + if (this._monthsParseExact) { + if (!hasOwnProp(this, '_monthsRegex')) { + computeMonthsParse.call(this); + } + + if (isStrict) { + return this._monthsStrictRegex; + } else { + return this._monthsRegex; + } + } else { + if (!hasOwnProp(this, '_monthsRegex')) { + this._monthsRegex = defaultMonthsRegex; + } + + return this._monthsStrictRegex && isStrict ? this._monthsStrictRegex : this._monthsRegex; + } + } + + function computeMonthsParse() { + function cmpLenRev(a, b) { + return b.length - a.length; + } + + var shortPieces = [], + longPieces = [], + mixedPieces = [], + i, + mom; + + for (i = 0; i < 12; i++) { + // make the regex if we don't have it already + mom = createUTC([2000, i]); + shortPieces.push(this.monthsShort(mom, '')); + longPieces.push(this.months(mom, '')); + mixedPieces.push(this.months(mom, '')); + mixedPieces.push(this.monthsShort(mom, '')); + } // Sorting makes sure if one month (or abbr) is a prefix of another it + // will match the longer piece. + + + shortPieces.sort(cmpLenRev); + longPieces.sort(cmpLenRev); + mixedPieces.sort(cmpLenRev); + + for (i = 0; i < 12; i++) { + shortPieces[i] = regexEscape(shortPieces[i]); + longPieces[i] = regexEscape(longPieces[i]); + } + + for (i = 0; i < 24; i++) { + mixedPieces[i] = regexEscape(mixedPieces[i]); + } + + this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i'); + this._monthsShortRegex = this._monthsRegex; + this._monthsStrictRegex = new RegExp('^(' + longPieces.join('|') + ')', 'i'); + this._monthsShortStrictRegex = new RegExp('^(' + shortPieces.join('|') + ')', 'i'); + } + + function createDate(y, m, d, h, M, s, ms) { + // can't just apply() to create a date: + // https://stackoverflow.com/q/181348 + var date; // the date constructor remaps years 0-99 to 1900-1999 + + if (y < 100 && y >= 0) { + // preserve leap years using a full 400 year cycle, then reset + date = new Date(y + 400, m, d, h, M, s, ms); + + if (isFinite(date.getFullYear())) { + date.setFullYear(y); + } + } else { + date = new Date(y, m, d, h, M, s, ms); + } + + return date; + } + + function createUTCDate(y) { + var date; // the Date.UTC function remaps years 0-99 to 1900-1999 + + if (y < 100 && y >= 0) { + var args = Array.prototype.slice.call(arguments); // preserve leap years using a full 400 year cycle, then reset + + args[0] = y + 400; + date = new Date(Date.UTC.apply(null, args)); + + if (isFinite(date.getUTCFullYear())) { + date.setUTCFullYear(y); + } + } else { + date = new Date(Date.UTC.apply(null, arguments)); + } + + return date; + } // start-of-first-week - start-of-year + + + function firstWeekOffset(year, dow, doy) { + var // first-week day -- which january is always in the first week (4 for iso, 1 for other) + fwd = 7 + dow - doy, + // first-week day local weekday -- which local weekday is fwd + fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7; + return -fwdlw + fwd - 1; + } // https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday + + + function dayOfYearFromWeeks(year, week, weekday, dow, doy) { + var localWeekday = (7 + weekday - dow) % 7, + weekOffset = firstWeekOffset(year, dow, doy), + dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset, + resYear, + resDayOfYear; + + if (dayOfYear <= 0) { + resYear = year - 1; + resDayOfYear = daysInYear(resYear) + dayOfYear; + } else if (dayOfYear > daysInYear(year)) { + resYear = year + 1; + resDayOfYear = dayOfYear - daysInYear(year); + } else { + resYear = year; + resDayOfYear = dayOfYear; + } + + return { + year: resYear, + dayOfYear: resDayOfYear + }; + } + + function weekOfYear(mom, dow, doy) { + var weekOffset = firstWeekOffset(mom.year(), dow, doy), + week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1, + resWeek, + resYear; + + if (week < 1) { + resYear = mom.year() - 1; + resWeek = week + weeksInYear(resYear, dow, doy); + } else if (week > weeksInYear(mom.year(), dow, doy)) { + resWeek = week - weeksInYear(mom.year(), dow, doy); + resYear = mom.year() + 1; + } else { + resYear = mom.year(); + resWeek = week; + } + + return { + week: resWeek, + year: resYear + }; + } + + function weeksInYear(year, dow, doy) { + var weekOffset = firstWeekOffset(year, dow, doy), + weekOffsetNext = firstWeekOffset(year + 1, dow, doy); + return (daysInYear(year) - weekOffset + weekOffsetNext) / 7; + } // FORMATTING + + + addFormatToken('w', ['ww', 2], 'wo', 'week'); + addFormatToken('W', ['WW', 2], 'Wo', 'isoWeek'); // ALIASES + + addUnitAlias('week', 'w'); + addUnitAlias('isoWeek', 'W'); // PRIORITIES + + addUnitPriority('week', 5); + addUnitPriority('isoWeek', 5); // PARSING + + addRegexToken('w', match1to2); + addRegexToken('ww', match1to2, match2); + addRegexToken('W', match1to2); + addRegexToken('WW', match1to2, match2); + addWeekParseToken(['w', 'ww', 'W', 'WW'], function (input, week, config, token) { + week[token.substr(0, 1)] = toInt(input); + }); // HELPERS + // LOCALES + + function localeWeek(mom) { + return weekOfYear(mom, this._week.dow, this._week.doy).week; + } + + var defaultLocaleWeek = { + dow: 0, + // Sunday is the first day of the week. + doy: 6 // The week that contains Jan 6th is the first week of the year. + + }; + + function localeFirstDayOfWeek() { + return this._week.dow; + } + + function localeFirstDayOfYear() { + return this._week.doy; + } // MOMENTS + + + function getSetWeek(input) { + var week = this.localeData().week(this); + return input == null ? week : this.add((input - week) * 7, 'd'); + } + + function getSetISOWeek(input) { + var week = weekOfYear(this, 1, 4).week; + return input == null ? week : this.add((input - week) * 7, 'd'); + } // FORMATTING + + + addFormatToken('d', 0, 'do', 'day'); + addFormatToken('dd', 0, 0, function (format) { + return this.localeData().weekdaysMin(this, format); + }); + addFormatToken('ddd', 0, 0, function (format) { + return this.localeData().weekdaysShort(this, format); + }); + addFormatToken('dddd', 0, 0, function (format) { + return this.localeData().weekdays(this, format); + }); + addFormatToken('e', 0, 0, 'weekday'); + addFormatToken('E', 0, 0, 'isoWeekday'); // ALIASES + + addUnitAlias('day', 'd'); + addUnitAlias('weekday', 'e'); + addUnitAlias('isoWeekday', 'E'); // PRIORITY + + addUnitPriority('day', 11); + addUnitPriority('weekday', 11); + addUnitPriority('isoWeekday', 11); // PARSING + + addRegexToken('d', match1to2); + addRegexToken('e', match1to2); + addRegexToken('E', match1to2); + addRegexToken('dd', function (isStrict, locale) { + return locale.weekdaysMinRegex(isStrict); + }); + addRegexToken('ddd', function (isStrict, locale) { + return locale.weekdaysShortRegex(isStrict); + }); + addRegexToken('dddd', function (isStrict, locale) { + return locale.weekdaysRegex(isStrict); + }); + addWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) { + var weekday = config._locale.weekdaysParse(input, token, config._strict); // if we didn't get a weekday name, mark the date as invalid + + + if (weekday != null) { + week.d = weekday; + } else { + getParsingFlags(config).invalidWeekday = input; + } + }); + addWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) { + week[token] = toInt(input); + }); // HELPERS + + function parseWeekday(input, locale) { + if (typeof input !== 'string') { + return input; + } + + if (!isNaN(input)) { + return parseInt(input, 10); + } + + input = locale.weekdaysParse(input); + + if (typeof input === 'number') { + return input; + } + + return null; + } + + function parseIsoWeekday(input, locale) { + if (typeof input === 'string') { + return locale.weekdaysParse(input) % 7 || 7; + } + + return isNaN(input) ? null : input; + } // LOCALES + + + function shiftWeekdays(ws, n) { + return ws.slice(n, 7).concat(ws.slice(0, n)); + } + + var defaultLocaleWeekdays = 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'); + + function localeWeekdays(m, format) { + var weekdays = isArray(this._weekdays) ? this._weekdays : this._weekdays[m && m !== true && this._weekdays.isFormat.test(format) ? 'format' : 'standalone']; + return m === true ? shiftWeekdays(weekdays, this._week.dow) : m ? weekdays[m.day()] : weekdays; + } + + var defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'); + + function localeWeekdaysShort(m) { + return m === true ? shiftWeekdays(this._weekdaysShort, this._week.dow) : m ? this._weekdaysShort[m.day()] : this._weekdaysShort; + } + + var defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'); + + function localeWeekdaysMin(m) { + return m === true ? shiftWeekdays(this._weekdaysMin, this._week.dow) : m ? this._weekdaysMin[m.day()] : this._weekdaysMin; + } + + function handleStrictParse$1(weekdayName, format, strict) { + var i, + ii, + mom, + llc = weekdayName.toLocaleLowerCase(); + + if (!this._weekdaysParse) { + this._weekdaysParse = []; + this._shortWeekdaysParse = []; + this._minWeekdaysParse = []; + + for (i = 0; i < 7; ++i) { + mom = createUTC([2000, 1]).day(i); + this._minWeekdaysParse[i] = this.weekdaysMin(mom, '').toLocaleLowerCase(); + this._shortWeekdaysParse[i] = this.weekdaysShort(mom, '').toLocaleLowerCase(); + this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase(); + } + } + + if (strict) { + if (format === 'dddd') { + ii = indexOf.call(this._weekdaysParse, llc); + return ii !== -1 ? ii : null; + } else if (format === 'ddd') { + ii = indexOf.call(this._shortWeekdaysParse, llc); + return ii !== -1 ? ii : null; + } else { + ii = indexOf.call(this._minWeekdaysParse, llc); + return ii !== -1 ? ii : null; + } + } else { + if (format === 'dddd') { + ii = indexOf.call(this._weekdaysParse, llc); + + if (ii !== -1) { + return ii; + } + + ii = indexOf.call(this._shortWeekdaysParse, llc); + + if (ii !== -1) { + return ii; + } + + ii = indexOf.call(this._minWeekdaysParse, llc); + return ii !== -1 ? ii : null; + } else if (format === 'ddd') { + ii = indexOf.call(this._shortWeekdaysParse, llc); + + if (ii !== -1) { + return ii; + } + + ii = indexOf.call(this._weekdaysParse, llc); + + if (ii !== -1) { + return ii; + } + + ii = indexOf.call(this._minWeekdaysParse, llc); + return ii !== -1 ? ii : null; + } else { + ii = indexOf.call(this._minWeekdaysParse, llc); + + if (ii !== -1) { + return ii; + } + + ii = indexOf.call(this._weekdaysParse, llc); + + if (ii !== -1) { + return ii; + } + + ii = indexOf.call(this._shortWeekdaysParse, llc); + return ii !== -1 ? ii : null; + } + } + } + + function localeWeekdaysParse(weekdayName, format, strict) { + var i, mom, regex; + + if (this._weekdaysParseExact) { + return handleStrictParse$1.call(this, weekdayName, format, strict); + } + + if (!this._weekdaysParse) { + this._weekdaysParse = []; + this._minWeekdaysParse = []; + this._shortWeekdaysParse = []; + this._fullWeekdaysParse = []; + } + + for (i = 0; i < 7; i++) { + // make the regex if we don't have it already + mom = createUTC([2000, 1]).day(i); + + if (strict && !this._fullWeekdaysParse[i]) { + this._fullWeekdaysParse[i] = new RegExp('^' + this.weekdays(mom, '').replace('.', '\\.?') + '$', 'i'); + this._shortWeekdaysParse[i] = new RegExp('^' + this.weekdaysShort(mom, '').replace('.', '\\.?') + '$', 'i'); + this._minWeekdaysParse[i] = new RegExp('^' + this.weekdaysMin(mom, '').replace('.', '\\.?') + '$', 'i'); + } + + if (!this._weekdaysParse[i]) { + regex = '^' + this.weekdays(mom, '') + '|^' + this.weekdaysShort(mom, '') + '|^' + this.weekdaysMin(mom, ''); + this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i'); + } // test the regex + + + if (strict && format === 'dddd' && this._fullWeekdaysParse[i].test(weekdayName)) { + return i; + } else if (strict && format === 'ddd' && this._shortWeekdaysParse[i].test(weekdayName)) { + return i; + } else if (strict && format === 'dd' && this._minWeekdaysParse[i].test(weekdayName)) { + return i; + } else if (!strict && this._weekdaysParse[i].test(weekdayName)) { + return i; + } + } + } // MOMENTS + + + function getSetDayOfWeek(input) { + if (!this.isValid()) { + return input != null ? this : NaN; + } + + var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay(); + + if (input != null) { + input = parseWeekday(input, this.localeData()); + return this.add(input - day, 'd'); + } else { + return day; + } + } + + function getSetLocaleDayOfWeek(input) { + if (!this.isValid()) { + return input != null ? this : NaN; + } + + var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7; + return input == null ? weekday : this.add(input - weekday, 'd'); + } + + function getSetISODayOfWeek(input) { + if (!this.isValid()) { + return input != null ? this : NaN; + } // behaves the same as moment#day except + // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6) + // as a setter, sunday should belong to the previous week. + + + if (input != null) { + var weekday = parseIsoWeekday(input, this.localeData()); + return this.day(this.day() % 7 ? weekday : weekday - 7); + } else { + return this.day() || 7; + } + } + + var defaultWeekdaysRegex = matchWord; + + function weekdaysRegex(isStrict) { + if (this._weekdaysParseExact) { + if (!hasOwnProp(this, '_weekdaysRegex')) { + computeWeekdaysParse.call(this); + } + + if (isStrict) { + return this._weekdaysStrictRegex; + } else { + return this._weekdaysRegex; + } + } else { + if (!hasOwnProp(this, '_weekdaysRegex')) { + this._weekdaysRegex = defaultWeekdaysRegex; + } + + return this._weekdaysStrictRegex && isStrict ? this._weekdaysStrictRegex : this._weekdaysRegex; + } + } + + var defaultWeekdaysShortRegex = matchWord; + + function weekdaysShortRegex(isStrict) { + if (this._weekdaysParseExact) { + if (!hasOwnProp(this, '_weekdaysRegex')) { + computeWeekdaysParse.call(this); + } + + if (isStrict) { + return this._weekdaysShortStrictRegex; + } else { + return this._weekdaysShortRegex; + } + } else { + if (!hasOwnProp(this, '_weekdaysShortRegex')) { + this._weekdaysShortRegex = defaultWeekdaysShortRegex; + } + + return this._weekdaysShortStrictRegex && isStrict ? this._weekdaysShortStrictRegex : this._weekdaysShortRegex; + } + } + + var defaultWeekdaysMinRegex = matchWord; + + function weekdaysMinRegex(isStrict) { + if (this._weekdaysParseExact) { + if (!hasOwnProp(this, '_weekdaysRegex')) { + computeWeekdaysParse.call(this); + } + + if (isStrict) { + return this._weekdaysMinStrictRegex; + } else { + return this._weekdaysMinRegex; + } + } else { + if (!hasOwnProp(this, '_weekdaysMinRegex')) { + this._weekdaysMinRegex = defaultWeekdaysMinRegex; + } + + return this._weekdaysMinStrictRegex && isStrict ? this._weekdaysMinStrictRegex : this._weekdaysMinRegex; + } + } + + function computeWeekdaysParse() { + function cmpLenRev(a, b) { + return b.length - a.length; + } + + var minPieces = [], + shortPieces = [], + longPieces = [], + mixedPieces = [], + i, + mom, + minp, + shortp, + longp; + + for (i = 0; i < 7; i++) { + // make the regex if we don't have it already + mom = createUTC([2000, 1]).day(i); + minp = this.weekdaysMin(mom, ''); + shortp = this.weekdaysShort(mom, ''); + longp = this.weekdays(mom, ''); + minPieces.push(minp); + shortPieces.push(shortp); + longPieces.push(longp); + mixedPieces.push(minp); + mixedPieces.push(shortp); + mixedPieces.push(longp); + } // Sorting makes sure if one weekday (or abbr) is a prefix of another it + // will match the longer piece. + + + minPieces.sort(cmpLenRev); + shortPieces.sort(cmpLenRev); + longPieces.sort(cmpLenRev); + mixedPieces.sort(cmpLenRev); + + for (i = 0; i < 7; i++) { + shortPieces[i] = regexEscape(shortPieces[i]); + longPieces[i] = regexEscape(longPieces[i]); + mixedPieces[i] = regexEscape(mixedPieces[i]); + } + + this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i'); + this._weekdaysShortRegex = this._weekdaysRegex; + this._weekdaysMinRegex = this._weekdaysRegex; + this._weekdaysStrictRegex = new RegExp('^(' + longPieces.join('|') + ')', 'i'); + this._weekdaysShortStrictRegex = new RegExp('^(' + shortPieces.join('|') + ')', 'i'); + this._weekdaysMinStrictRegex = new RegExp('^(' + minPieces.join('|') + ')', 'i'); + } // FORMATTING + + + function hFormat() { + return this.hours() % 12 || 12; + } + + function kFormat() { + return this.hours() || 24; + } + + addFormatToken('H', ['HH', 2], 0, 'hour'); + addFormatToken('h', ['hh', 2], 0, hFormat); + addFormatToken('k', ['kk', 2], 0, kFormat); + addFormatToken('hmm', 0, 0, function () { + return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2); + }); + addFormatToken('hmmss', 0, 0, function () { + return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2) + zeroFill(this.seconds(), 2); + }); + addFormatToken('Hmm', 0, 0, function () { + return '' + this.hours() + zeroFill(this.minutes(), 2); + }); + addFormatToken('Hmmss', 0, 0, function () { + return '' + this.hours() + zeroFill(this.minutes(), 2) + zeroFill(this.seconds(), 2); + }); + + function meridiem(token, lowercase) { + addFormatToken(token, 0, 0, function () { + return this.localeData().meridiem(this.hours(), this.minutes(), lowercase); + }); + } + + meridiem('a', true); + meridiem('A', false); // ALIASES + + addUnitAlias('hour', 'h'); // PRIORITY + + addUnitPriority('hour', 13); // PARSING + + function matchMeridiem(isStrict, locale) { + return locale._meridiemParse; + } + + addRegexToken('a', matchMeridiem); + addRegexToken('A', matchMeridiem); + addRegexToken('H', match1to2); + addRegexToken('h', match1to2); + addRegexToken('k', match1to2); + addRegexToken('HH', match1to2, match2); + addRegexToken('hh', match1to2, match2); + addRegexToken('kk', match1to2, match2); + addRegexToken('hmm', match3to4); + addRegexToken('hmmss', match5to6); + addRegexToken('Hmm', match3to4); + addRegexToken('Hmmss', match5to6); + addParseToken(['H', 'HH'], HOUR); + addParseToken(['k', 'kk'], function (input, array, config) { + var kInput = toInt(input); + array[HOUR] = kInput === 24 ? 0 : kInput; + }); + addParseToken(['a', 'A'], function (input, array, config) { + config._isPm = config._locale.isPM(input); + config._meridiem = input; + }); + addParseToken(['h', 'hh'], function (input, array, config) { + array[HOUR] = toInt(input); + getParsingFlags(config).bigHour = true; + }); + addParseToken('hmm', function (input, array, config) { + var pos = input.length - 2; + array[HOUR] = toInt(input.substr(0, pos)); + array[MINUTE] = toInt(input.substr(pos)); + getParsingFlags(config).bigHour = true; + }); + addParseToken('hmmss', function (input, array, config) { + var pos1 = input.length - 4; + var pos2 = input.length - 2; + array[HOUR] = toInt(input.substr(0, pos1)); + array[MINUTE] = toInt(input.substr(pos1, 2)); + array[SECOND] = toInt(input.substr(pos2)); + getParsingFlags(config).bigHour = true; + }); + addParseToken('Hmm', function (input, array, config) { + var pos = input.length - 2; + array[HOUR] = toInt(input.substr(0, pos)); + array[MINUTE] = toInt(input.substr(pos)); + }); + addParseToken('Hmmss', function (input, array, config) { + var pos1 = input.length - 4; + var pos2 = input.length - 2; + array[HOUR] = toInt(input.substr(0, pos1)); + array[MINUTE] = toInt(input.substr(pos1, 2)); + array[SECOND] = toInt(input.substr(pos2)); + }); // LOCALES + + function localeIsPM(input) { + // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays + // Using charAt should be more compatible. + return (input + '').toLowerCase().charAt(0) === 'p'; + } + + var defaultLocaleMeridiemParse = /[ap]\.?m?\.?/i; + + function localeMeridiem(hours, minutes, isLower) { + if (hours > 11) { + return isLower ? 'pm' : 'PM'; + } else { + return isLower ? 'am' : 'AM'; + } + } // MOMENTS + // Setting the hour should keep the time, because the user explicitly + // specified which hour they want. So trying to maintain the same hour (in + // a new timezone) makes sense. Adding/subtracting hours does not follow + // this rule. + + + var getSetHour = makeGetSet('Hours', true); + var baseConfig = { + calendar: defaultCalendar, + longDateFormat: defaultLongDateFormat, + invalidDate: defaultInvalidDate, + ordinal: defaultOrdinal, + dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse, + relativeTime: defaultRelativeTime, + months: defaultLocaleMonths, + monthsShort: defaultLocaleMonthsShort, + week: defaultLocaleWeek, + weekdays: defaultLocaleWeekdays, + weekdaysMin: defaultLocaleWeekdaysMin, + weekdaysShort: defaultLocaleWeekdaysShort, + meridiemParse: defaultLocaleMeridiemParse + }; // internal storage for locale config files + + var locales = {}; + var localeFamilies = {}; + var globalLocale; + + function normalizeLocale(key) { + return key ? key.toLowerCase().replace('_', '-') : key; + } // pick the locale from the array + // try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each + // substring from most specific to least, but move to the next array item if it's a more specific variant than the current root + + + function chooseLocale(names) { + var i = 0, + j, + next, + locale, + split; + + while (i < names.length) { + split = normalizeLocale(names[i]).split('-'); + j = split.length; + next = normalizeLocale(names[i + 1]); + next = next ? next.split('-') : null; + + while (j > 0) { + locale = loadLocale(split.slice(0, j).join('-')); + + if (locale) { + return locale; + } + + if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) { + //the next array item is better than a shallower substring of this one + break; + } + + j--; + } + + i++; + } + + return globalLocale; + } + + function loadLocale(name) { + var oldLocale = null; // TODO: Find a better way to register and load all the locales in Node + + if (!locales[name] && 'object' !== 'undefined' && module && module.exports) { + try { + oldLocale = globalLocale._abbr; + var aliasedRequire = commonjsRequire; + aliasedRequire('./locale/' + name); + getSetGlobalLocale(oldLocale); + } catch (e) {} + } + + return locales[name]; + } // This function will load locale and then set the global locale. If + // no arguments are passed in, it will simply return the current global + // locale key. + + + function getSetGlobalLocale(key, values) { + var data; + + if (key) { + if (isUndefined(values)) { + data = getLocale(key); + } else { + data = defineLocale(key, values); + } + + if (data) { + // moment.duration._locale = moment._locale = data; + globalLocale = data; + } else { + if (typeof console !== 'undefined' && console.warn) { + //warn user if arguments are passed but the locale could not be set + console.warn('Locale ' + key + ' not found. Did you forget to load it?'); + } + } + } + + return globalLocale._abbr; + } + + function defineLocale(name, config) { + if (config !== null) { + var locale, + parentConfig = baseConfig; + config.abbr = name; + + if (locales[name] != null) { + deprecateSimple('defineLocaleOverride', 'use moment.updateLocale(localeName, config) to change ' + 'an existing locale. moment.defineLocale(localeName, ' + 'config) should only be used for creating a new locale ' + 'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.'); + parentConfig = locales[name]._config; + } else if (config.parentLocale != null) { + if (locales[config.parentLocale] != null) { + parentConfig = locales[config.parentLocale]._config; + } else { + locale = loadLocale(config.parentLocale); + + if (locale != null) { + parentConfig = locale._config; + } else { + if (!localeFamilies[config.parentLocale]) { + localeFamilies[config.parentLocale] = []; + } + + localeFamilies[config.parentLocale].push({ + name: name, + config: config + }); + return null; + } + } + } + + locales[name] = new Locale(mergeConfigs(parentConfig, config)); + + if (localeFamilies[name]) { + localeFamilies[name].forEach(function (x) { + defineLocale(x.name, x.config); + }); + } // backwards compat for now: also set the locale + // make sure we set the locale AFTER all child locales have been + // created, so we won't end up with the child locale set. + + + getSetGlobalLocale(name); + return locales[name]; + } else { + // useful for testing + delete locales[name]; + return null; + } + } + + function updateLocale(name, config) { + if (config != null) { + var locale, + tmpLocale, + parentConfig = baseConfig; // MERGE + + tmpLocale = loadLocale(name); + + if (tmpLocale != null) { + parentConfig = tmpLocale._config; + } + + config = mergeConfigs(parentConfig, config); + locale = new Locale(config); + locale.parentLocale = locales[name]; + locales[name] = locale; // backwards compat for now: also set the locale + + getSetGlobalLocale(name); + } else { + // pass null for config to unupdate, useful for tests + if (locales[name] != null) { + if (locales[name].parentLocale != null) { + locales[name] = locales[name].parentLocale; + } else if (locales[name] != null) { + delete locales[name]; + } + } + } + + return locales[name]; + } // returns locale data + + + function getLocale(key) { + var locale; + + if (key && key._locale && key._locale._abbr) { + key = key._locale._abbr; + } + + if (!key) { + return globalLocale; + } + + if (!isArray(key)) { + //short-circuit everything else + locale = loadLocale(key); + + if (locale) { + return locale; + } + + key = [key]; + } + + return chooseLocale(key); + } + + function listLocales() { + return keys(locales); + } + + function checkOverflow(m) { + var overflow; + var a = m._a; + + if (a && getParsingFlags(m).overflow === -2) { + overflow = a[MONTH] < 0 || a[MONTH] > 11 ? MONTH : a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH]) ? DATE : a[HOUR] < 0 || a[HOUR] > 24 || a[HOUR] === 24 && (a[MINUTE] !== 0 || a[SECOND] !== 0 || a[MILLISECOND] !== 0) ? HOUR : a[MINUTE] < 0 || a[MINUTE] > 59 ? MINUTE : a[SECOND] < 0 || a[SECOND] > 59 ? SECOND : a[MILLISECOND] < 0 || a[MILLISECOND] > 999 ? MILLISECOND : -1; + + if (getParsingFlags(m)._overflowDayOfYear && (overflow < YEAR || overflow > DATE)) { + overflow = DATE; + } + + if (getParsingFlags(m)._overflowWeeks && overflow === -1) { + overflow = WEEK; + } + + if (getParsingFlags(m)._overflowWeekday && overflow === -1) { + overflow = WEEKDAY; + } + + getParsingFlags(m).overflow = overflow; + } + + return m; + } // Pick the first defined of two or three arguments. + + + function defaults(a, b, c) { + if (a != null) { + return a; + } + + if (b != null) { + return b; + } + + return c; + } + + function currentDateArray(config) { + // hooks is actually the exported moment object + var nowValue = new Date(hooks.now()); + + if (config._useUTC) { + return [nowValue.getUTCFullYear(), nowValue.getUTCMonth(), nowValue.getUTCDate()]; + } + + return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()]; + } // convert an array to a date. + // the array should mirror the parameters below + // note: all values past the year are optional and will default to the lowest possible value. + // [year, month, day , hour, minute, second, millisecond] + + + function configFromArray(config) { + var i, + date, + input = [], + currentDate, + expectedWeekday, + yearToUse; + + if (config._d) { + return; + } + + currentDate = currentDateArray(config); //compute day of the year from weeks and weekdays + + if (config._w && config._a[DATE] == null && config._a[MONTH] == null) { + dayOfYearFromWeekInfo(config); + } //if the day of the year is set, figure out what it is + + + if (config._dayOfYear != null) { + yearToUse = defaults(config._a[YEAR], currentDate[YEAR]); + + if (config._dayOfYear > daysInYear(yearToUse) || config._dayOfYear === 0) { + getParsingFlags(config)._overflowDayOfYear = true; + } + + date = createUTCDate(yearToUse, 0, config._dayOfYear); + config._a[MONTH] = date.getUTCMonth(); + config._a[DATE] = date.getUTCDate(); + } // Default to current date. + // * if no year, month, day of month are given, default to today + // * if day of month is given, default month and year + // * if month is given, default only year + // * if year is given, don't default anything + + + for (i = 0; i < 3 && config._a[i] == null; ++i) { + config._a[i] = input[i] = currentDate[i]; + } // Zero out whatever was not defaulted, including time + + + for (; i < 7; i++) { + config._a[i] = input[i] = config._a[i] == null ? i === 2 ? 1 : 0 : config._a[i]; + } // Check for 24:00:00.000 + + + if (config._a[HOUR] === 24 && config._a[MINUTE] === 0 && config._a[SECOND] === 0 && config._a[MILLISECOND] === 0) { + config._nextDay = true; + config._a[HOUR] = 0; + } + + config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input); + expectedWeekday = config._useUTC ? config._d.getUTCDay() : config._d.getDay(); // Apply timezone offset from input. The actual utcOffset can be changed + // with parseZone. + + if (config._tzm != null) { + config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm); + } + + if (config._nextDay) { + config._a[HOUR] = 24; + } // check for mismatching day of week + + + if (config._w && typeof config._w.d !== 'undefined' && config._w.d !== expectedWeekday) { + getParsingFlags(config).weekdayMismatch = true; + } + } + + function dayOfYearFromWeekInfo(config) { + var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow; + w = config._w; + + if (w.GG != null || w.W != null || w.E != null) { + dow = 1; + doy = 4; // TODO: We need to take the current isoWeekYear, but that depends on + // how we interpret now (local, utc, fixed offset). So create + // a now version of current config (take local/utc/offset flags, and + // create now). + + weekYear = defaults(w.GG, config._a[YEAR], weekOfYear(createLocal(), 1, 4).year); + week = defaults(w.W, 1); + weekday = defaults(w.E, 1); + + if (weekday < 1 || weekday > 7) { + weekdayOverflow = true; + } + } else { + dow = config._locale._week.dow; + doy = config._locale._week.doy; + var curWeek = weekOfYear(createLocal(), dow, doy); + weekYear = defaults(w.gg, config._a[YEAR], curWeek.year); // Default to current week. + + week = defaults(w.w, curWeek.week); + + if (w.d != null) { + // weekday -- low day numbers are considered next week + weekday = w.d; + + if (weekday < 0 || weekday > 6) { + weekdayOverflow = true; + } + } else if (w.e != null) { + // local weekday -- counting starts from beginning of week + weekday = w.e + dow; + + if (w.e < 0 || w.e > 6) { + weekdayOverflow = true; + } + } else { + // default to beginning of week + weekday = dow; + } + } + + if (week < 1 || week > weeksInYear(weekYear, dow, doy)) { + getParsingFlags(config)._overflowWeeks = true; + } else if (weekdayOverflow != null) { + getParsingFlags(config)._overflowWeekday = true; + } else { + temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy); + config._a[YEAR] = temp.year; + config._dayOfYear = temp.dayOfYear; + } + } // iso 8601 regex + // 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00) + + + var extendedIsoRegex = /^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/; + var basicIsoRegex = /^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/; + var tzRegex = /Z|[+-]\d\d(?::?\d\d)?/; + var isoDates = [['YYYYYY-MM-DD', /[+-]\d{6}-\d\d-\d\d/], ['YYYY-MM-DD', /\d{4}-\d\d-\d\d/], ['GGGG-[W]WW-E', /\d{4}-W\d\d-\d/], ['GGGG-[W]WW', /\d{4}-W\d\d/, false], ['YYYY-DDD', /\d{4}-\d{3}/], ['YYYY-MM', /\d{4}-\d\d/, false], ['YYYYYYMMDD', /[+-]\d{10}/], ['YYYYMMDD', /\d{8}/], // YYYYMM is NOT allowed by the standard + ['GGGG[W]WWE', /\d{4}W\d{3}/], ['GGGG[W]WW', /\d{4}W\d{2}/, false], ['YYYYDDD', /\d{7}/]]; // iso time formats and regexes + + var isoTimes = [['HH:mm:ss.SSSS', /\d\d:\d\d:\d\d\.\d+/], ['HH:mm:ss,SSSS', /\d\d:\d\d:\d\d,\d+/], ['HH:mm:ss', /\d\d:\d\d:\d\d/], ['HH:mm', /\d\d:\d\d/], ['HHmmss.SSSS', /\d\d\d\d\d\d\.\d+/], ['HHmmss,SSSS', /\d\d\d\d\d\d,\d+/], ['HHmmss', /\d\d\d\d\d\d/], ['HHmm', /\d\d\d\d/], ['HH', /\d\d/]]; + var aspNetJsonRegex = /^\/?Date\((\-?\d+)/i; // date from iso format + + function configFromISO(config) { + var i, + l, + string = config._i, + match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string), + allowTime, + dateFormat, + timeFormat, + tzFormat; + + if (match) { + getParsingFlags(config).iso = true; + + for (i = 0, l = isoDates.length; i < l; i++) { + if (isoDates[i][1].exec(match[1])) { + dateFormat = isoDates[i][0]; + allowTime = isoDates[i][2] !== false; + break; + } + } + + if (dateFormat == null) { + config._isValid = false; + return; + } + + if (match[3]) { + for (i = 0, l = isoTimes.length; i < l; i++) { + if (isoTimes[i][1].exec(match[3])) { + // match[2] should be 'T' or space + timeFormat = (match[2] || ' ') + isoTimes[i][0]; + break; + } + } + + if (timeFormat == null) { + config._isValid = false; + return; + } + } + + if (!allowTime && timeFormat != null) { + config._isValid = false; + return; + } + + if (match[4]) { + if (tzRegex.exec(match[4])) { + tzFormat = 'Z'; + } else { + config._isValid = false; + return; + } + } + + config._f = dateFormat + (timeFormat || '') + (tzFormat || ''); + configFromStringAndFormat(config); + } else { + config._isValid = false; + } + } // RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3 + + + var rfc2822 = /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/; + + function extractFromRFC2822Strings(yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr) { + var result = [untruncateYear(yearStr), defaultLocaleMonthsShort.indexOf(monthStr), parseInt(dayStr, 10), parseInt(hourStr, 10), parseInt(minuteStr, 10)]; + + if (secondStr) { + result.push(parseInt(secondStr, 10)); + } + + return result; + } + + function untruncateYear(yearStr) { + var year = parseInt(yearStr, 10); + + if (year <= 49) { + return 2000 + year; + } else if (year <= 999) { + return 1900 + year; + } + + return year; + } + + function preprocessRFC2822(s) { + // Remove comments and folding whitespace and replace multiple-spaces with a single space + return s.replace(/\([^)]*\)|[\n\t]/g, ' ').replace(/(\s\s+)/g, ' ').replace(/^\s\s*/, '').replace(/\s\s*$/, ''); + } + + function checkWeekday(weekdayStr, parsedInput, config) { + if (weekdayStr) { + // TODO: Replace the vanilla JS Date object with an indepentent day-of-week check. + var weekdayProvided = defaultLocaleWeekdaysShort.indexOf(weekdayStr), + weekdayActual = new Date(parsedInput[0], parsedInput[1], parsedInput[2]).getDay(); + + if (weekdayProvided !== weekdayActual) { + getParsingFlags(config).weekdayMismatch = true; + config._isValid = false; + return false; + } + } + + return true; + } + + var obsOffsets = { + UT: 0, + GMT: 0, + EDT: -4 * 60, + EST: -5 * 60, + CDT: -5 * 60, + CST: -6 * 60, + MDT: -6 * 60, + MST: -7 * 60, + PDT: -7 * 60, + PST: -8 * 60 + }; + + function calculateOffset(obsOffset, militaryOffset, numOffset) { + if (obsOffset) { + return obsOffsets[obsOffset]; + } else if (militaryOffset) { + // the only allowed military tz is Z + return 0; + } else { + var hm = parseInt(numOffset, 10); + var m = hm % 100, + h = (hm - m) / 100; + return h * 60 + m; + } + } // date and time from ref 2822 format + + + function configFromRFC2822(config) { + var match = rfc2822.exec(preprocessRFC2822(config._i)); + + if (match) { + var parsedArray = extractFromRFC2822Strings(match[4], match[3], match[2], match[5], match[6], match[7]); + + if (!checkWeekday(match[1], parsedArray, config)) { + return; + } + + config._a = parsedArray; + config._tzm = calculateOffset(match[8], match[9], match[10]); + config._d = createUTCDate.apply(null, config._a); + + config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm); + + getParsingFlags(config).rfc2822 = true; + } else { + config._isValid = false; + } + } // date from iso format or fallback + + + function configFromString(config) { + var matched = aspNetJsonRegex.exec(config._i); + + if (matched !== null) { + config._d = new Date(+matched[1]); + return; + } + + configFromISO(config); + + if (config._isValid === false) { + delete config._isValid; + } else { + return; + } + + configFromRFC2822(config); + + if (config._isValid === false) { + delete config._isValid; + } else { + return; + } // Final attempt, use Input Fallback + + + hooks.createFromInputFallback(config); + } + + hooks.createFromInputFallback = deprecate('value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), ' + 'which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are ' + 'discouraged and will be removed in an upcoming major release. Please refer to ' + 'http://momentjs.com/guides/#/warnings/js-date/ for more info.', function (config) { + config._d = new Date(config._i + (config._useUTC ? ' UTC' : '')); + }); // constant that refers to the ISO standard + + hooks.ISO_8601 = function () {}; // constant that refers to the RFC 2822 form + + + hooks.RFC_2822 = function () {}; // date from string and format string + + + function configFromStringAndFormat(config) { + // TODO: Move this to another part of the creation flow to prevent circular deps + if (config._f === hooks.ISO_8601) { + configFromISO(config); + return; + } + + if (config._f === hooks.RFC_2822) { + configFromRFC2822(config); + return; + } + + config._a = []; + getParsingFlags(config).empty = true; // This array is used to make a Date, either with `new Date` or `Date.UTC` + + var string = '' + config._i, + i, + parsedInput, + tokens, + token, + skipped, + stringLength = string.length, + totalParsedInputLength = 0; + tokens = expandFormat(config._f, config._locale).match(formattingTokens) || []; + + for (i = 0; i < tokens.length; i++) { + token = tokens[i]; + parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0]; // console.log('token', token, 'parsedInput', parsedInput, + // 'regex', getParseRegexForToken(token, config)); + + if (parsedInput) { + skipped = string.substr(0, string.indexOf(parsedInput)); + + if (skipped.length > 0) { + getParsingFlags(config).unusedInput.push(skipped); + } + + string = string.slice(string.indexOf(parsedInput) + parsedInput.length); + totalParsedInputLength += parsedInput.length; + } // don't parse if it's not a known token + + + if (formatTokenFunctions[token]) { + if (parsedInput) { + getParsingFlags(config).empty = false; + } else { + getParsingFlags(config).unusedTokens.push(token); + } + + addTimeToArrayFromToken(token, parsedInput, config); + } else if (config._strict && !parsedInput) { + getParsingFlags(config).unusedTokens.push(token); + } + } // add remaining unparsed input length to the string + + + getParsingFlags(config).charsLeftOver = stringLength - totalParsedInputLength; + + if (string.length > 0) { + getParsingFlags(config).unusedInput.push(string); + } // clear _12h flag if hour is <= 12 + + + if (config._a[HOUR] <= 12 && getParsingFlags(config).bigHour === true && config._a[HOUR] > 0) { + getParsingFlags(config).bigHour = undefined; + } + + getParsingFlags(config).parsedDateParts = config._a.slice(0); + getParsingFlags(config).meridiem = config._meridiem; // handle meridiem + + config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR], config._meridiem); + configFromArray(config); + checkOverflow(config); + } + + function meridiemFixWrap(locale, hour, meridiem) { + var isPm; + + if (meridiem == null) { + // nothing to do + return hour; + } + + if (locale.meridiemHour != null) { + return locale.meridiemHour(hour, meridiem); + } else if (locale.isPM != null) { + // Fallback + isPm = locale.isPM(meridiem); + + if (isPm && hour < 12) { + hour += 12; + } + + if (!isPm && hour === 12) { + hour = 0; + } + + return hour; + } else { + // this is not supposed to happen + return hour; + } + } // date from string and array of format strings + + + function configFromStringAndArray(config) { + var tempConfig, bestMoment, scoreToBeat, i, currentScore; + + if (config._f.length === 0) { + getParsingFlags(config).invalidFormat = true; + config._d = new Date(NaN); + return; + } + + for (i = 0; i < config._f.length; i++) { + currentScore = 0; + tempConfig = copyConfig({}, config); + + if (config._useUTC != null) { + tempConfig._useUTC = config._useUTC; + } + + tempConfig._f = config._f[i]; + configFromStringAndFormat(tempConfig); + + if (!isValid(tempConfig)) { + continue; + } // if there is any input that was not parsed add a penalty for that format + + + currentScore += getParsingFlags(tempConfig).charsLeftOver; //or tokens + + currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10; + getParsingFlags(tempConfig).score = currentScore; + + if (scoreToBeat == null || currentScore < scoreToBeat) { + scoreToBeat = currentScore; + bestMoment = tempConfig; + } + } + + extend(config, bestMoment || tempConfig); + } + + function configFromObject(config) { + if (config._d) { + return; + } + + var i = normalizeObjectUnits(config._i); + config._a = map([i.year, i.month, i.day || i.date, i.hour, i.minute, i.second, i.millisecond], function (obj) { + return obj && parseInt(obj, 10); + }); + configFromArray(config); + } + + function createFromConfig(config) { + var res = new Moment(checkOverflow(prepareConfig(config))); + + if (res._nextDay) { + // Adding is smart enough around DST + res.add(1, 'd'); + res._nextDay = undefined; + } + + return res; + } + + function prepareConfig(config) { + var input = config._i, + format = config._f; + config._locale = config._locale || getLocale(config._l); + + if (input === null || format === undefined && input === '') { + return createInvalid({ + nullInput: true + }); + } + + if (typeof input === 'string') { + config._i = input = config._locale.preparse(input); + } + + if (isMoment(input)) { + return new Moment(checkOverflow(input)); + } else if (isDate(input)) { + config._d = input; + } else if (isArray(format)) { + configFromStringAndArray(config); + } else if (format) { + configFromStringAndFormat(config); + } else { + configFromInput(config); + } + + if (!isValid(config)) { + config._d = null; + } + + return config; + } + + function configFromInput(config) { + var input = config._i; + + if (isUndefined(input)) { + config._d = new Date(hooks.now()); + } else if (isDate(input)) { + config._d = new Date(input.valueOf()); + } else if (typeof input === 'string') { + configFromString(config); + } else if (isArray(input)) { + config._a = map(input.slice(0), function (obj) { + return parseInt(obj, 10); + }); + configFromArray(config); + } else if (isObject(input)) { + configFromObject(config); + } else if (isNumber(input)) { + // from milliseconds + config._d = new Date(input); + } else { + hooks.createFromInputFallback(config); + } + } + + function createLocalOrUTC(input, format, locale, strict, isUTC) { + var c = {}; + + if (locale === true || locale === false) { + strict = locale; + locale = undefined; + } + + if (isObject(input) && isObjectEmpty(input) || isArray(input) && input.length === 0) { + input = undefined; + } // object construction must be done this way. + // https://github.com/moment/moment/issues/1423 + + + c._isAMomentObject = true; + c._useUTC = c._isUTC = isUTC; + c._l = locale; + c._i = input; + c._f = format; + c._strict = strict; + return createFromConfig(c); + } + + function createLocal(input, format, locale, strict) { + return createLocalOrUTC(input, format, locale, strict, false); + } + + var prototypeMin = deprecate('moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/', function () { + var other = createLocal.apply(null, arguments); + + if (this.isValid() && other.isValid()) { + return other < this ? this : other; + } else { + return createInvalid(); + } + }); + var prototypeMax = deprecate('moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/', function () { + var other = createLocal.apply(null, arguments); + + if (this.isValid() && other.isValid()) { + return other > this ? this : other; + } else { + return createInvalid(); + } + }); // Pick a moment m from moments so that m[fn](other) is true for all + // other. This relies on the function fn to be transitive. + // + // moments should either be an array of moment objects or an array, whose + // first element is an array of moment objects. + + function pickBy(fn, moments) { + var res, i; + + if (moments.length === 1 && isArray(moments[0])) { + moments = moments[0]; + } + + if (!moments.length) { + return createLocal(); + } + + res = moments[0]; + + for (i = 1; i < moments.length; ++i) { + if (!moments[i].isValid() || moments[i][fn](res)) { + res = moments[i]; + } + } + + return res; + } // TODO: Use [].sort instead? + + + function min() { + var args = [].slice.call(arguments, 0); + return pickBy('isBefore', args); + } + + function max() { + var args = [].slice.call(arguments, 0); + return pickBy('isAfter', args); + } + + var now = function () { + return Date.now ? Date.now() : +new Date(); + }; + + var ordering = ['year', 'quarter', 'month', 'week', 'day', 'hour', 'minute', 'second', 'millisecond']; + + function isDurationValid(m) { + for (var key in m) { + if (!(indexOf.call(ordering, key) !== -1 && (m[key] == null || !isNaN(m[key])))) { + return false; + } + } + + var unitHasDecimal = false; + + for (var i = 0; i < ordering.length; ++i) { + if (m[ordering[i]]) { + if (unitHasDecimal) { + return false; // only allow non-integers for smallest unit + } + + if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) { + unitHasDecimal = true; + } + } + } + + return true; + } + + function isValid$1() { + return this._isValid; + } + + function createInvalid$1() { + return createDuration(NaN); + } + + function Duration(duration) { + var normalizedInput = normalizeObjectUnits(duration), + years = normalizedInput.year || 0, + quarters = normalizedInput.quarter || 0, + months = normalizedInput.month || 0, + weeks = normalizedInput.week || normalizedInput.isoWeek || 0, + days = normalizedInput.day || 0, + hours = normalizedInput.hour || 0, + minutes = normalizedInput.minute || 0, + seconds = normalizedInput.second || 0, + milliseconds = normalizedInput.millisecond || 0; + this._isValid = isDurationValid(normalizedInput); // representation for dateAddRemove + + this._milliseconds = +milliseconds + seconds * 1e3 + // 1000 + minutes * 6e4 + // 1000 * 60 + hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978 + // Because of dateAddRemove treats 24 hours as different from a + // day when working around DST, we need to store them separately + + this._days = +days + weeks * 7; // It is impossible to translate months into days without knowing + // which months you are are talking about, so we have to store + // it separately. + + this._months = +months + quarters * 3 + years * 12; + this._data = {}; + this._locale = getLocale(); + + this._bubble(); + } + + function isDuration(obj) { + return obj instanceof Duration; + } + + function absRound(number) { + if (number < 0) { + return Math.round(-1 * number) * -1; + } else { + return Math.round(number); + } + } // FORMATTING + + + function offset(token, separator) { + addFormatToken(token, 0, 0, function () { + var offset = this.utcOffset(); + var sign = '+'; + + if (offset < 0) { + offset = -offset; + sign = '-'; + } + + return sign + zeroFill(~~(offset / 60), 2) + separator + zeroFill(~~offset % 60, 2); + }); + } + + offset('Z', ':'); + offset('ZZ', ''); // PARSING + + addRegexToken('Z', matchShortOffset); + addRegexToken('ZZ', matchShortOffset); + addParseToken(['Z', 'ZZ'], function (input, array, config) { + config._useUTC = true; + config._tzm = offsetFromString(matchShortOffset, input); + }); // HELPERS + // timezone chunker + // '+10:00' > ['10', '00'] + // '-1530' > ['-15', '30'] + + var chunkOffset = /([\+\-]|\d\d)/gi; + + function offsetFromString(matcher, string) { + var matches = (string || '').match(matcher); + + if (matches === null) { + return null; + } + + var chunk = matches[matches.length - 1] || []; + var parts = (chunk + '').match(chunkOffset) || ['-', 0, 0]; + var minutes = +(parts[1] * 60) + toInt(parts[2]); + return minutes === 0 ? 0 : parts[0] === '+' ? minutes : -minutes; + } // Return a moment from input, that is local/utc/zone equivalent to model. + + + function cloneWithOffset(input, model) { + var res, diff; + + if (model._isUTC) { + res = model.clone(); + diff = (isMoment(input) || isDate(input) ? input.valueOf() : createLocal(input).valueOf()) - res.valueOf(); // Use low-level api, because this fn is low-level api. + + res._d.setTime(res._d.valueOf() + diff); + + hooks.updateOffset(res, false); + return res; + } else { + return createLocal(input).local(); + } + } + + function getDateOffset(m) { + // On Firefox.24 Date#getTimezoneOffset returns a floating point. + // https://github.com/moment/moment/pull/1871 + return -Math.round(m._d.getTimezoneOffset() / 15) * 15; + } // HOOKS + // This function will be called whenever a moment is mutated. + // It is intended to keep the offset in sync with the timezone. + + + hooks.updateOffset = function () {}; // MOMENTS + // keepLocalTime = true means only change the timezone, without + // affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]--> + // 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset + // +0200, so we adjust the time as needed, to be valid. + // + // Keeping the time actually adds/subtracts (one hour) + // from the actual represented time. That is why we call updateOffset + // a second time. In case it wants us to change the offset again + // _changeInProgress == true case, then we have to adjust, because + // there is no such time in the given timezone. + + + function getSetOffset(input, keepLocalTime, keepMinutes) { + var offset = this._offset || 0, + localAdjust; + + if (!this.isValid()) { + return input != null ? this : NaN; + } + + if (input != null) { + if (typeof input === 'string') { + input = offsetFromString(matchShortOffset, input); + + if (input === null) { + return this; + } + } else if (Math.abs(input) < 16 && !keepMinutes) { + input = input * 60; + } + + if (!this._isUTC && keepLocalTime) { + localAdjust = getDateOffset(this); + } + + this._offset = input; + this._isUTC = true; + + if (localAdjust != null) { + this.add(localAdjust, 'm'); + } + + if (offset !== input) { + if (!keepLocalTime || this._changeInProgress) { + addSubtract(this, createDuration(input - offset, 'm'), 1, false); + } else if (!this._changeInProgress) { + this._changeInProgress = true; + hooks.updateOffset(this, true); + this._changeInProgress = null; + } + } + + return this; + } else { + return this._isUTC ? offset : getDateOffset(this); + } + } + + function getSetZone(input, keepLocalTime) { + if (input != null) { + if (typeof input !== 'string') { + input = -input; + } + + this.utcOffset(input, keepLocalTime); + return this; + } else { + return -this.utcOffset(); + } + } + + function setOffsetToUTC(keepLocalTime) { + return this.utcOffset(0, keepLocalTime); + } + + function setOffsetToLocal(keepLocalTime) { + if (this._isUTC) { + this.utcOffset(0, keepLocalTime); + this._isUTC = false; + + if (keepLocalTime) { + this.subtract(getDateOffset(this), 'm'); + } + } + + return this; + } + + function setOffsetToParsedOffset() { + if (this._tzm != null) { + this.utcOffset(this._tzm, false, true); + } else if (typeof this._i === 'string') { + var tZone = offsetFromString(matchOffset, this._i); + + if (tZone != null) { + this.utcOffset(tZone); + } else { + this.utcOffset(0, true); + } + } + + return this; + } + + function hasAlignedHourOffset(input) { + if (!this.isValid()) { + return false; + } + + input = input ? createLocal(input).utcOffset() : 0; + return (this.utcOffset() - input) % 60 === 0; + } + + function isDaylightSavingTime() { + return this.utcOffset() > this.clone().month(0).utcOffset() || this.utcOffset() > this.clone().month(5).utcOffset(); + } + + function isDaylightSavingTimeShifted() { + if (!isUndefined(this._isDSTShifted)) { + return this._isDSTShifted; + } + + var c = {}; + copyConfig(c, this); + c = prepareConfig(c); + + if (c._a) { + var other = c._isUTC ? createUTC(c._a) : createLocal(c._a); + this._isDSTShifted = this.isValid() && compareArrays(c._a, other.toArray()) > 0; + } else { + this._isDSTShifted = false; + } + + return this._isDSTShifted; + } + + function isLocal() { + return this.isValid() ? !this._isUTC : false; + } + + function isUtcOffset() { + return this.isValid() ? this._isUTC : false; + } + + function isUtc() { + return this.isValid() ? this._isUTC && this._offset === 0 : false; + } // ASP.NET json date format regex + + + var aspNetRegex = /^(\-|\+)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/; // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html + // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere + // and further modified to allow for strings containing both week and day + + var isoRegex = /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/; + + function createDuration(input, key) { + var duration = input, + // matching against regexp is expensive, do it on demand + match = null, + sign, + ret, + diffRes; + + if (isDuration(input)) { + duration = { + ms: input._milliseconds, + d: input._days, + M: input._months + }; + } else if (isNumber(input)) { + duration = {}; + + if (key) { + duration[key] = input; + } else { + duration.milliseconds = input; + } + } else if (!!(match = aspNetRegex.exec(input))) { + sign = match[1] === '-' ? -1 : 1; + duration = { + y: 0, + d: toInt(match[DATE]) * sign, + h: toInt(match[HOUR]) * sign, + m: toInt(match[MINUTE]) * sign, + s: toInt(match[SECOND]) * sign, + ms: toInt(absRound(match[MILLISECOND] * 1000)) * sign // the millisecond decimal point is included in the match + + }; + } else if (!!(match = isoRegex.exec(input))) { + sign = match[1] === '-' ? -1 : 1; + duration = { + y: parseIso(match[2], sign), + M: parseIso(match[3], sign), + w: parseIso(match[4], sign), + d: parseIso(match[5], sign), + h: parseIso(match[6], sign), + m: parseIso(match[7], sign), + s: parseIso(match[8], sign) + }; + } else if (duration == null) { + // checks for null or undefined + duration = {}; + } else if (typeof duration === 'object' && ('from' in duration || 'to' in duration)) { + diffRes = momentsDifference(createLocal(duration.from), createLocal(duration.to)); + duration = {}; + duration.ms = diffRes.milliseconds; + duration.M = diffRes.months; + } + + ret = new Duration(duration); + + if (isDuration(input) && hasOwnProp(input, '_locale')) { + ret._locale = input._locale; + } + + return ret; + } + + createDuration.fn = Duration.prototype; + createDuration.invalid = createInvalid$1; + + function parseIso(inp, sign) { + // We'd normally use ~~inp for this, but unfortunately it also + // converts floats to ints. + // inp may be undefined, so careful calling replace on it. + var res = inp && parseFloat(inp.replace(',', '.')); // apply sign while we're at it + + return (isNaN(res) ? 0 : res) * sign; + } + + function positiveMomentsDifference(base, other) { + var res = {}; + res.months = other.month() - base.month() + (other.year() - base.year()) * 12; + + if (base.clone().add(res.months, 'M').isAfter(other)) { + --res.months; + } + + res.milliseconds = +other - +base.clone().add(res.months, 'M'); + return res; + } + + function momentsDifference(base, other) { + var res; + + if (!(base.isValid() && other.isValid())) { + return { + milliseconds: 0, + months: 0 + }; + } + + other = cloneWithOffset(other, base); + + if (base.isBefore(other)) { + res = positiveMomentsDifference(base, other); + } else { + res = positiveMomentsDifference(other, base); + res.milliseconds = -res.milliseconds; + res.months = -res.months; + } + + return res; + } // TODO: remove 'name' arg after deprecation is removed + + + function createAdder(direction, name) { + return function (val, period) { + var dur, tmp; //invert the arguments, but complain about it + + if (period !== null && !isNaN(+period)) { + deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' + 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.'); + tmp = val; + val = period; + period = tmp; + } + + val = typeof val === 'string' ? +val : val; + dur = createDuration(val, period); + addSubtract(this, dur, direction); + return this; + }; + } + + function addSubtract(mom, duration, isAdding, updateOffset) { + var milliseconds = duration._milliseconds, + days = absRound(duration._days), + months = absRound(duration._months); + + if (!mom.isValid()) { + // No op + return; + } + + updateOffset = updateOffset == null ? true : updateOffset; + + if (months) { + setMonth(mom, get(mom, 'Month') + months * isAdding); + } + + if (days) { + set$1(mom, 'Date', get(mom, 'Date') + days * isAdding); + } + + if (milliseconds) { + mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding); + } + + if (updateOffset) { + hooks.updateOffset(mom, days || months); + } + } + + var add = createAdder(1, 'add'); + var subtract = createAdder(-1, 'subtract'); + + function getCalendarFormat(myMoment, now) { + var diff = myMoment.diff(now, 'days', true); + return diff < -6 ? 'sameElse' : diff < -1 ? 'lastWeek' : diff < 0 ? 'lastDay' : diff < 1 ? 'sameDay' : diff < 2 ? 'nextDay' : diff < 7 ? 'nextWeek' : 'sameElse'; + } + + function calendar$1(time, formats) { + // We want to compare the start of today, vs this. + // Getting start-of-today depends on whether we're local/utc/offset or not. + var now = time || createLocal(), + sod = cloneWithOffset(now, this).startOf('day'), + format = hooks.calendarFormat(this, sod) || 'sameElse'; + var output = formats && (isFunction(formats[format]) ? formats[format].call(this, now) : formats[format]); + return this.format(output || this.localeData().calendar(format, this, createLocal(now))); + } + + function clone() { + return new Moment(this); + } + + function isAfter(input, units) { + var localInput = isMoment(input) ? input : createLocal(input); + + if (!(this.isValid() && localInput.isValid())) { + return false; + } + + units = normalizeUnits(units) || 'millisecond'; + + if (units === 'millisecond') { + return this.valueOf() > localInput.valueOf(); + } else { + return localInput.valueOf() < this.clone().startOf(units).valueOf(); + } + } + + function isBefore(input, units) { + var localInput = isMoment(input) ? input : createLocal(input); + + if (!(this.isValid() && localInput.isValid())) { + return false; + } + + units = normalizeUnits(units) || 'millisecond'; + + if (units === 'millisecond') { + return this.valueOf() < localInput.valueOf(); + } else { + return this.clone().endOf(units).valueOf() < localInput.valueOf(); + } + } + + function isBetween(from, to, units, inclusivity) { + var localFrom = isMoment(from) ? from : createLocal(from), + localTo = isMoment(to) ? to : createLocal(to); + + if (!(this.isValid() && localFrom.isValid() && localTo.isValid())) { + return false; + } + + inclusivity = inclusivity || '()'; + return (inclusivity[0] === '(' ? this.isAfter(localFrom, units) : !this.isBefore(localFrom, units)) && (inclusivity[1] === ')' ? this.isBefore(localTo, units) : !this.isAfter(localTo, units)); + } + + function isSame(input, units) { + var localInput = isMoment(input) ? input : createLocal(input), + inputMs; + + if (!(this.isValid() && localInput.isValid())) { + return false; + } + + units = normalizeUnits(units) || 'millisecond'; + + if (units === 'millisecond') { + return this.valueOf() === localInput.valueOf(); + } else { + inputMs = localInput.valueOf(); + return this.clone().startOf(units).valueOf() <= inputMs && inputMs <= this.clone().endOf(units).valueOf(); + } + } + + function isSameOrAfter(input, units) { + return this.isSame(input, units) || this.isAfter(input, units); + } + + function isSameOrBefore(input, units) { + return this.isSame(input, units) || this.isBefore(input, units); + } + + function diff(input, units, asFloat) { + var that, zoneDelta, output; + + if (!this.isValid()) { + return NaN; + } + + that = cloneWithOffset(input, this); + + if (!that.isValid()) { + return NaN; + } + + zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4; + units = normalizeUnits(units); + + switch (units) { + case 'year': + output = monthDiff(this, that) / 12; + break; + + case 'month': + output = monthDiff(this, that); + break; + + case 'quarter': + output = monthDiff(this, that) / 3; + break; + + case 'second': + output = (this - that) / 1e3; + break; + // 1000 + + case 'minute': + output = (this - that) / 6e4; + break; + // 1000 * 60 + + case 'hour': + output = (this - that) / 36e5; + break; + // 1000 * 60 * 60 + + case 'day': + output = (this - that - zoneDelta) / 864e5; + break; + // 1000 * 60 * 60 * 24, negate dst + + case 'week': + output = (this - that - zoneDelta) / 6048e5; + break; + // 1000 * 60 * 60 * 24 * 7, negate dst + + default: + output = this - that; + } + + return asFloat ? output : absFloor(output); + } + + function monthDiff(a, b) { + // difference in months + var wholeMonthDiff = (b.year() - a.year()) * 12 + (b.month() - a.month()), + // b is in (anchor - 1 month, anchor + 1 month) + anchor = a.clone().add(wholeMonthDiff, 'months'), + anchor2, + adjust; + + if (b - anchor < 0) { + anchor2 = a.clone().add(wholeMonthDiff - 1, 'months'); // linear across the month + + adjust = (b - anchor) / (anchor - anchor2); + } else { + anchor2 = a.clone().add(wholeMonthDiff + 1, 'months'); // linear across the month + + adjust = (b - anchor) / (anchor2 - anchor); + } //check for negative zero, return zero if negative zero + + + return -(wholeMonthDiff + adjust) || 0; + } + + hooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ'; + hooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]'; + + function toString() { + return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ'); + } + + function toISOString(keepOffset) { + if (!this.isValid()) { + return null; + } + + var utc = keepOffset !== true; + var m = utc ? this.clone().utc() : this; + + if (m.year() < 0 || m.year() > 9999) { + return formatMoment(m, utc ? 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYYYY-MM-DD[T]HH:mm:ss.SSSZ'); + } + + if (isFunction(Date.prototype.toISOString)) { + // native implementation is ~50x faster, use it when we can + if (utc) { + return this.toDate().toISOString(); + } else { + return new Date(this.valueOf() + this.utcOffset() * 60 * 1000).toISOString().replace('Z', formatMoment(m, 'Z')); + } + } + + return formatMoment(m, utc ? 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYY-MM-DD[T]HH:mm:ss.SSSZ'); + } + /** + * Return a human readable representation of a moment that can + * also be evaluated to get a new moment which is the same + * + * @link https://nodejs.org/dist/latest/docs/api/util.html#util_custom_inspect_function_on_objects + */ + + + function inspect() { + if (!this.isValid()) { + return 'moment.invalid(/* ' + this._i + ' */)'; + } + + var func = 'moment'; + var zone = ''; + + if (!this.isLocal()) { + func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone'; + zone = 'Z'; + } + + var prefix = '[' + func + '("]'; + var year = 0 <= this.year() && this.year() <= 9999 ? 'YYYY' : 'YYYYYY'; + var datetime = '-MM-DD[T]HH:mm:ss.SSS'; + var suffix = zone + '[")]'; + return this.format(prefix + year + datetime + suffix); + } + + function format(inputString) { + if (!inputString) { + inputString = this.isUtc() ? hooks.defaultFormatUtc : hooks.defaultFormat; + } + + var output = formatMoment(this, inputString); + return this.localeData().postformat(output); + } + + function from(time, withoutSuffix) { + if (this.isValid() && (isMoment(time) && time.isValid() || createLocal(time).isValid())) { + return createDuration({ + to: this, + from: time + }).locale(this.locale()).humanize(!withoutSuffix); + } else { + return this.localeData().invalidDate(); + } + } + + function fromNow(withoutSuffix) { + return this.from(createLocal(), withoutSuffix); + } + + function to(time, withoutSuffix) { + if (this.isValid() && (isMoment(time) && time.isValid() || createLocal(time).isValid())) { + return createDuration({ + from: this, + to: time + }).locale(this.locale()).humanize(!withoutSuffix); + } else { + return this.localeData().invalidDate(); + } + } + + function toNow(withoutSuffix) { + return this.to(createLocal(), withoutSuffix); + } // If passed a locale key, it will set the locale for this + // instance. Otherwise, it will return the locale configuration + // variables for this instance. + + + function locale(key) { + var newLocaleData; + + if (key === undefined) { + return this._locale._abbr; + } else { + newLocaleData = getLocale(key); + + if (newLocaleData != null) { + this._locale = newLocaleData; + } + + return this; + } + } + + var lang = deprecate('moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.', function (key) { + if (key === undefined) { + return this.localeData(); + } else { + return this.locale(key); + } + }); + + function localeData() { + return this._locale; + } + + var MS_PER_SECOND = 1000; + var MS_PER_MINUTE = 60 * MS_PER_SECOND; + var MS_PER_HOUR = 60 * MS_PER_MINUTE; + var MS_PER_400_YEARS = (365 * 400 + 97) * 24 * MS_PER_HOUR; // actual modulo - handles negative numbers (for dates before 1970): + + function mod$1(dividend, divisor) { + return (dividend % divisor + divisor) % divisor; + } + + function localStartOfDate(y, m, d) { + // the date constructor remaps years 0-99 to 1900-1999 + if (y < 100 && y >= 0) { + // preserve leap years using a full 400 year cycle, then reset + return new Date(y + 400, m, d) - MS_PER_400_YEARS; + } else { + return new Date(y, m, d).valueOf(); + } + } + + function utcStartOfDate(y, m, d) { + // Date.UTC remaps years 0-99 to 1900-1999 + if (y < 100 && y >= 0) { + // preserve leap years using a full 400 year cycle, then reset + return Date.UTC(y + 400, m, d) - MS_PER_400_YEARS; + } else { + return Date.UTC(y, m, d); + } + } + + function startOf(units) { + var time; + units = normalizeUnits(units); + + if (units === undefined || units === 'millisecond' || !this.isValid()) { + return this; + } + + var startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate; + + switch (units) { + case 'year': + time = startOfDate(this.year(), 0, 1); + break; + + case 'quarter': + time = startOfDate(this.year(), this.month() - this.month() % 3, 1); + break; + + case 'month': + time = startOfDate(this.year(), this.month(), 1); + break; + + case 'week': + time = startOfDate(this.year(), this.month(), this.date() - this.weekday()); + break; + + case 'isoWeek': + time = startOfDate(this.year(), this.month(), this.date() - (this.isoWeekday() - 1)); + break; + + case 'day': + case 'date': + time = startOfDate(this.year(), this.month(), this.date()); + break; + + case 'hour': + time = this._d.valueOf(); + time -= mod$1(time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE), MS_PER_HOUR); + break; + + case 'minute': + time = this._d.valueOf(); + time -= mod$1(time, MS_PER_MINUTE); + break; + + case 'second': + time = this._d.valueOf(); + time -= mod$1(time, MS_PER_SECOND); + break; + } + + this._d.setTime(time); + + hooks.updateOffset(this, true); + return this; + } + + function endOf(units) { + var time; + units = normalizeUnits(units); + + if (units === undefined || units === 'millisecond' || !this.isValid()) { + return this; + } + + var startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate; + + switch (units) { + case 'year': + time = startOfDate(this.year() + 1, 0, 1) - 1; + break; + + case 'quarter': + time = startOfDate(this.year(), this.month() - this.month() % 3 + 3, 1) - 1; + break; + + case 'month': + time = startOfDate(this.year(), this.month() + 1, 1) - 1; + break; + + case 'week': + time = startOfDate(this.year(), this.month(), this.date() - this.weekday() + 7) - 1; + break; + + case 'isoWeek': + time = startOfDate(this.year(), this.month(), this.date() - (this.isoWeekday() - 1) + 7) - 1; + break; + + case 'day': + case 'date': + time = startOfDate(this.year(), this.month(), this.date() + 1) - 1; + break; + + case 'hour': + time = this._d.valueOf(); + time += MS_PER_HOUR - mod$1(time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE), MS_PER_HOUR) - 1; + break; + + case 'minute': + time = this._d.valueOf(); + time += MS_PER_MINUTE - mod$1(time, MS_PER_MINUTE) - 1; + break; + + case 'second': + time = this._d.valueOf(); + time += MS_PER_SECOND - mod$1(time, MS_PER_SECOND) - 1; + break; + } + + this._d.setTime(time); + + hooks.updateOffset(this, true); + return this; + } + + function valueOf() { + return this._d.valueOf() - (this._offset || 0) * 60000; + } + + function unix() { + return Math.floor(this.valueOf() / 1000); + } + + function toDate() { + return new Date(this.valueOf()); + } + + function toArray() { + var m = this; + return [m.year(), m.month(), m.date(), m.hour(), m.minute(), m.second(), m.millisecond()]; + } + + function toObject() { + var m = this; + return { + years: m.year(), + months: m.month(), + date: m.date(), + hours: m.hours(), + minutes: m.minutes(), + seconds: m.seconds(), + milliseconds: m.milliseconds() + }; + } + + function toJSON() { + // new Date(NaN).toJSON() === null + return this.isValid() ? this.toISOString() : null; + } + + function isValid$2() { + return isValid(this); + } + + function parsingFlags() { + return extend({}, getParsingFlags(this)); + } + + function invalidAt() { + return getParsingFlags(this).overflow; + } + + function creationData() { + return { + input: this._i, + format: this._f, + locale: this._locale, + isUTC: this._isUTC, + strict: this._strict + }; + } // FORMATTING + + + addFormatToken(0, ['gg', 2], 0, function () { + return this.weekYear() % 100; + }); + addFormatToken(0, ['GG', 2], 0, function () { + return this.isoWeekYear() % 100; + }); + + function addWeekYearFormatToken(token, getter) { + addFormatToken(0, [token, token.length], 0, getter); + } + + addWeekYearFormatToken('gggg', 'weekYear'); + addWeekYearFormatToken('ggggg', 'weekYear'); + addWeekYearFormatToken('GGGG', 'isoWeekYear'); + addWeekYearFormatToken('GGGGG', 'isoWeekYear'); // ALIASES + + addUnitAlias('weekYear', 'gg'); + addUnitAlias('isoWeekYear', 'GG'); // PRIORITY + + addUnitPriority('weekYear', 1); + addUnitPriority('isoWeekYear', 1); // PARSING + + addRegexToken('G', matchSigned); + addRegexToken('g', matchSigned); + addRegexToken('GG', match1to2, match2); + addRegexToken('gg', match1to2, match2); + addRegexToken('GGGG', match1to4, match4); + addRegexToken('gggg', match1to4, match4); + addRegexToken('GGGGG', match1to6, match6); + addRegexToken('ggggg', match1to6, match6); + addWeekParseToken(['gggg', 'ggggg', 'GGGG', 'GGGGG'], function (input, week, config, token) { + week[token.substr(0, 2)] = toInt(input); + }); + addWeekParseToken(['gg', 'GG'], function (input, week, config, token) { + week[token] = hooks.parseTwoDigitYear(input); + }); // MOMENTS + + function getSetWeekYear(input) { + return getSetWeekYearHelper.call(this, input, this.week(), this.weekday(), this.localeData()._week.dow, this.localeData()._week.doy); + } + + function getSetISOWeekYear(input) { + return getSetWeekYearHelper.call(this, input, this.isoWeek(), this.isoWeekday(), 1, 4); + } + + function getISOWeeksInYear() { + return weeksInYear(this.year(), 1, 4); + } + + function getWeeksInYear() { + var weekInfo = this.localeData()._week; + + return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy); + } + + function getSetWeekYearHelper(input, week, weekday, dow, doy) { + var weeksTarget; + + if (input == null) { + return weekOfYear(this, dow, doy).year; + } else { + weeksTarget = weeksInYear(input, dow, doy); + + if (week > weeksTarget) { + week = weeksTarget; + } + + return setWeekAll.call(this, input, week, weekday, dow, doy); + } + } + + function setWeekAll(weekYear, week, weekday, dow, doy) { + var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy), + date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear); + this.year(date.getUTCFullYear()); + this.month(date.getUTCMonth()); + this.date(date.getUTCDate()); + return this; + } // FORMATTING + + + addFormatToken('Q', 0, 'Qo', 'quarter'); // ALIASES + + addUnitAlias('quarter', 'Q'); // PRIORITY + + addUnitPriority('quarter', 7); // PARSING + + addRegexToken('Q', match1); + addParseToken('Q', function (input, array) { + array[MONTH] = (toInt(input) - 1) * 3; + }); // MOMENTS + + function getSetQuarter(input) { + return input == null ? Math.ceil((this.month() + 1) / 3) : this.month((input - 1) * 3 + this.month() % 3); + } // FORMATTING + + + addFormatToken('D', ['DD', 2], 'Do', 'date'); // ALIASES + + addUnitAlias('date', 'D'); // PRIORITY + + addUnitPriority('date', 9); // PARSING + + addRegexToken('D', match1to2); + addRegexToken('DD', match1to2, match2); + addRegexToken('Do', function (isStrict, locale) { + // TODO: Remove "ordinalParse" fallback in next major release. + return isStrict ? locale._dayOfMonthOrdinalParse || locale._ordinalParse : locale._dayOfMonthOrdinalParseLenient; + }); + addParseToken(['D', 'DD'], DATE); + addParseToken('Do', function (input, array) { + array[DATE] = toInt(input.match(match1to2)[0]); + }); // MOMENTS + + var getSetDayOfMonth = makeGetSet('Date', true); // FORMATTING + + addFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear'); // ALIASES + + addUnitAlias('dayOfYear', 'DDD'); // PRIORITY + + addUnitPriority('dayOfYear', 4); // PARSING + + addRegexToken('DDD', match1to3); + addRegexToken('DDDD', match3); + addParseToken(['DDD', 'DDDD'], function (input, array, config) { + config._dayOfYear = toInt(input); + }); // HELPERS + // MOMENTS + + function getSetDayOfYear(input) { + var dayOfYear = Math.round((this.clone().startOf('day') - this.clone().startOf('year')) / 864e5) + 1; + return input == null ? dayOfYear : this.add(input - dayOfYear, 'd'); + } // FORMATTING + + + addFormatToken('m', ['mm', 2], 0, 'minute'); // ALIASES + + addUnitAlias('minute', 'm'); // PRIORITY + + addUnitPriority('minute', 14); // PARSING + + addRegexToken('m', match1to2); + addRegexToken('mm', match1to2, match2); + addParseToken(['m', 'mm'], MINUTE); // MOMENTS + + var getSetMinute = makeGetSet('Minutes', false); // FORMATTING + + addFormatToken('s', ['ss', 2], 0, 'second'); // ALIASES + + addUnitAlias('second', 's'); // PRIORITY + + addUnitPriority('second', 15); // PARSING + + addRegexToken('s', match1to2); + addRegexToken('ss', match1to2, match2); + addParseToken(['s', 'ss'], SECOND); // MOMENTS + + var getSetSecond = makeGetSet('Seconds', false); // FORMATTING + + addFormatToken('S', 0, 0, function () { + return ~~(this.millisecond() / 100); + }); + addFormatToken(0, ['SS', 2], 0, function () { + return ~~(this.millisecond() / 10); + }); + addFormatToken(0, ['SSS', 3], 0, 'millisecond'); + addFormatToken(0, ['SSSS', 4], 0, function () { + return this.millisecond() * 10; + }); + addFormatToken(0, ['SSSSS', 5], 0, function () { + return this.millisecond() * 100; + }); + addFormatToken(0, ['SSSSSS', 6], 0, function () { + return this.millisecond() * 1000; + }); + addFormatToken(0, ['SSSSSSS', 7], 0, function () { + return this.millisecond() * 10000; + }); + addFormatToken(0, ['SSSSSSSS', 8], 0, function () { + return this.millisecond() * 100000; + }); + addFormatToken(0, ['SSSSSSSSS', 9], 0, function () { + return this.millisecond() * 1000000; + }); // ALIASES + + addUnitAlias('millisecond', 'ms'); // PRIORITY + + addUnitPriority('millisecond', 16); // PARSING + + addRegexToken('S', match1to3, match1); + addRegexToken('SS', match1to3, match2); + addRegexToken('SSS', match1to3, match3); + var token; + + for (token = 'SSSS'; token.length <= 9; token += 'S') { + addRegexToken(token, matchUnsigned); + } + + function parseMs(input, array) { + array[MILLISECOND] = toInt(('0.' + input) * 1000); + } + + for (token = 'S'; token.length <= 9; token += 'S') { + addParseToken(token, parseMs); + } // MOMENTS + + + var getSetMillisecond = makeGetSet('Milliseconds', false); // FORMATTING + + addFormatToken('z', 0, 0, 'zoneAbbr'); + addFormatToken('zz', 0, 0, 'zoneName'); // MOMENTS + + function getZoneAbbr() { + return this._isUTC ? 'UTC' : ''; + } + + function getZoneName() { + return this._isUTC ? 'Coordinated Universal Time' : ''; + } + + var proto = Moment.prototype; + proto.add = add; + proto.calendar = calendar$1; + proto.clone = clone; + proto.diff = diff; + proto.endOf = endOf; + proto.format = format; + proto.from = from; + proto.fromNow = fromNow; + proto.to = to; + proto.toNow = toNow; + proto.get = stringGet; + proto.invalidAt = invalidAt; + proto.isAfter = isAfter; + proto.isBefore = isBefore; + proto.isBetween = isBetween; + proto.isSame = isSame; + proto.isSameOrAfter = isSameOrAfter; + proto.isSameOrBefore = isSameOrBefore; + proto.isValid = isValid$2; + proto.lang = lang; + proto.locale = locale; + proto.localeData = localeData; + proto.max = prototypeMax; + proto.min = prototypeMin; + proto.parsingFlags = parsingFlags; + proto.set = stringSet; + proto.startOf = startOf; + proto.subtract = subtract; + proto.toArray = toArray; + proto.toObject = toObject; + proto.toDate = toDate; + proto.toISOString = toISOString; + proto.inspect = inspect; + proto.toJSON = toJSON; + proto.toString = toString; + proto.unix = unix; + proto.valueOf = valueOf; + proto.creationData = creationData; + proto.year = getSetYear; + proto.isLeapYear = getIsLeapYear; + proto.weekYear = getSetWeekYear; + proto.isoWeekYear = getSetISOWeekYear; + proto.quarter = proto.quarters = getSetQuarter; + proto.month = getSetMonth; + proto.daysInMonth = getDaysInMonth; + proto.week = proto.weeks = getSetWeek; + proto.isoWeek = proto.isoWeeks = getSetISOWeek; + proto.weeksInYear = getWeeksInYear; + proto.isoWeeksInYear = getISOWeeksInYear; + proto.date = getSetDayOfMonth; + proto.day = proto.days = getSetDayOfWeek; + proto.weekday = getSetLocaleDayOfWeek; + proto.isoWeekday = getSetISODayOfWeek; + proto.dayOfYear = getSetDayOfYear; + proto.hour = proto.hours = getSetHour; + proto.minute = proto.minutes = getSetMinute; + proto.second = proto.seconds = getSetSecond; + proto.millisecond = proto.milliseconds = getSetMillisecond; + proto.utcOffset = getSetOffset; + proto.utc = setOffsetToUTC; + proto.local = setOffsetToLocal; + proto.parseZone = setOffsetToParsedOffset; + proto.hasAlignedHourOffset = hasAlignedHourOffset; + proto.isDST = isDaylightSavingTime; + proto.isLocal = isLocal; + proto.isUtcOffset = isUtcOffset; + proto.isUtc = isUtc; + proto.isUTC = isUtc; + proto.zoneAbbr = getZoneAbbr; + proto.zoneName = getZoneName; + proto.dates = deprecate('dates accessor is deprecated. Use date instead.', getSetDayOfMonth); + proto.months = deprecate('months accessor is deprecated. Use month instead', getSetMonth); + proto.years = deprecate('years accessor is deprecated. Use year instead', getSetYear); + proto.zone = deprecate('moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/', getSetZone); + proto.isDSTShifted = deprecate('isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information', isDaylightSavingTimeShifted); + + function createUnix(input) { + return createLocal(input * 1000); + } + + function createInZone() { + return createLocal.apply(null, arguments).parseZone(); + } + + function preParsePostFormat(string) { + return string; + } + + var proto$1 = Locale.prototype; + proto$1.calendar = calendar; + proto$1.longDateFormat = longDateFormat; + proto$1.invalidDate = invalidDate; + proto$1.ordinal = ordinal; + proto$1.preparse = preParsePostFormat; + proto$1.postformat = preParsePostFormat; + proto$1.relativeTime = relativeTime; + proto$1.pastFuture = pastFuture; + proto$1.set = set; + proto$1.months = localeMonths; + proto$1.monthsShort = localeMonthsShort; + proto$1.monthsParse = localeMonthsParse; + proto$1.monthsRegex = monthsRegex; + proto$1.monthsShortRegex = monthsShortRegex; + proto$1.week = localeWeek; + proto$1.firstDayOfYear = localeFirstDayOfYear; + proto$1.firstDayOfWeek = localeFirstDayOfWeek; + proto$1.weekdays = localeWeekdays; + proto$1.weekdaysMin = localeWeekdaysMin; + proto$1.weekdaysShort = localeWeekdaysShort; + proto$1.weekdaysParse = localeWeekdaysParse; + proto$1.weekdaysRegex = weekdaysRegex; + proto$1.weekdaysShortRegex = weekdaysShortRegex; + proto$1.weekdaysMinRegex = weekdaysMinRegex; + proto$1.isPM = localeIsPM; + proto$1.meridiem = localeMeridiem; + + function get$1(format, index, field, setter) { + var locale = getLocale(); + var utc = createUTC().set(setter, index); + return locale[field](utc, format); + } + + function listMonthsImpl(format, index, field) { + if (isNumber(format)) { + index = format; + format = undefined; + } + + format = format || ''; + + if (index != null) { + return get$1(format, index, field, 'month'); + } + + var i; + var out = []; + + for (i = 0; i < 12; i++) { + out[i] = get$1(format, i, field, 'month'); + } + + return out; + } // () + // (5) + // (fmt, 5) + // (fmt) + // (true) + // (true, 5) + // (true, fmt, 5) + // (true, fmt) + + + function listWeekdaysImpl(localeSorted, format, index, field) { + if (typeof localeSorted === 'boolean') { + if (isNumber(format)) { + index = format; + format = undefined; + } + + format = format || ''; + } else { + format = localeSorted; + index = format; + localeSorted = false; + + if (isNumber(format)) { + index = format; + format = undefined; + } + + format = format || ''; + } + + var locale = getLocale(), + shift = localeSorted ? locale._week.dow : 0; + + if (index != null) { + return get$1(format, (index + shift) % 7, field, 'day'); + } + + var i; + var out = []; + + for (i = 0; i < 7; i++) { + out[i] = get$1(format, (i + shift) % 7, field, 'day'); + } + + return out; + } + + function listMonths(format, index) { + return listMonthsImpl(format, index, 'months'); + } + + function listMonthsShort(format, index) { + return listMonthsImpl(format, index, 'monthsShort'); + } + + function listWeekdays(localeSorted, format, index) { + return listWeekdaysImpl(localeSorted, format, index, 'weekdays'); + } + + function listWeekdaysShort(localeSorted, format, index) { + return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort'); + } + + function listWeekdaysMin(localeSorted, format, index) { + return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin'); + } + + getSetGlobalLocale('en', { + dayOfMonthOrdinalParse: /\d{1,2}(th|st|nd|rd)/, + ordinal: function (number) { + var b = number % 10, + output = toInt(number % 100 / 10) === 1 ? 'th' : b === 1 ? 'st' : b === 2 ? 'nd' : b === 3 ? 'rd' : 'th'; + return number + output; + } + }); // Side effect imports + + hooks.lang = deprecate('moment.lang is deprecated. Use moment.locale instead.', getSetGlobalLocale); + hooks.langData = deprecate('moment.langData is deprecated. Use moment.localeData instead.', getLocale); + var mathAbs = Math.abs; + + function abs() { + var data = this._data; + this._milliseconds = mathAbs(this._milliseconds); + this._days = mathAbs(this._days); + this._months = mathAbs(this._months); + data.milliseconds = mathAbs(data.milliseconds); + data.seconds = mathAbs(data.seconds); + data.minutes = mathAbs(data.minutes); + data.hours = mathAbs(data.hours); + data.months = mathAbs(data.months); + data.years = mathAbs(data.years); + return this; + } + + function addSubtract$1(duration, input, value, direction) { + var other = createDuration(input, value); + duration._milliseconds += direction * other._milliseconds; + duration._days += direction * other._days; + duration._months += direction * other._months; + return duration._bubble(); + } // supports only 2.0-style add(1, 's') or add(duration) + + + function add$1(input, value) { + return addSubtract$1(this, input, value, 1); + } // supports only 2.0-style subtract(1, 's') or subtract(duration) + + + function subtract$1(input, value) { + return addSubtract$1(this, input, value, -1); + } + + function absCeil(number) { + if (number < 0) { + return Math.floor(number); + } else { + return Math.ceil(number); + } + } + + function bubble() { + var milliseconds = this._milliseconds; + var days = this._days; + var months = this._months; + var data = this._data; + var seconds, minutes, hours, years, monthsFromDays; // if we have a mix of positive and negative values, bubble down first + // check: https://github.com/moment/moment/issues/2166 + + if (!(milliseconds >= 0 && days >= 0 && months >= 0 || milliseconds <= 0 && days <= 0 && months <= 0)) { + milliseconds += absCeil(monthsToDays(months) + days) * 864e5; + days = 0; + months = 0; + } // The following code bubbles up values, see the tests for + // examples of what that means. + + + data.milliseconds = milliseconds % 1000; + seconds = absFloor(milliseconds / 1000); + data.seconds = seconds % 60; + minutes = absFloor(seconds / 60); + data.minutes = minutes % 60; + hours = absFloor(minutes / 60); + data.hours = hours % 24; + days += absFloor(hours / 24); // convert days to months + + monthsFromDays = absFloor(daysToMonths(days)); + months += monthsFromDays; + days -= absCeil(monthsToDays(monthsFromDays)); // 12 months -> 1 year + + years = absFloor(months / 12); + months %= 12; + data.days = days; + data.months = months; + data.years = years; + return this; + } + + function daysToMonths(days) { + // 400 years have 146097 days (taking into account leap year rules) + // 400 years have 12 months === 4800 + return days * 4800 / 146097; + } + + function monthsToDays(months) { + // the reverse of daysToMonths + return months * 146097 / 4800; + } + + function as(units) { + if (!this.isValid()) { + return NaN; + } + + var days; + var months; + var milliseconds = this._milliseconds; + units = normalizeUnits(units); + + if (units === 'month' || units === 'quarter' || units === 'year') { + days = this._days + milliseconds / 864e5; + months = this._months + daysToMonths(days); + + switch (units) { + case 'month': + return months; + + case 'quarter': + return months / 3; + + case 'year': + return months / 12; + } + } else { + // handle milliseconds separately because of floating point math errors (issue #1867) + days = this._days + Math.round(monthsToDays(this._months)); + + switch (units) { + case 'week': + return days / 7 + milliseconds / 6048e5; + + case 'day': + return days + milliseconds / 864e5; + + case 'hour': + return days * 24 + milliseconds / 36e5; + + case 'minute': + return days * 1440 + milliseconds / 6e4; + + case 'second': + return days * 86400 + milliseconds / 1000; + // Math.floor prevents floating point math errors here + + case 'millisecond': + return Math.floor(days * 864e5) + milliseconds; + + default: + throw new Error('Unknown unit ' + units); + } + } + } // TODO: Use this.as('ms')? + + + function valueOf$1() { + if (!this.isValid()) { + return NaN; + } + + return this._milliseconds + this._days * 864e5 + this._months % 12 * 2592e6 + toInt(this._months / 12) * 31536e6; + } + + function makeAs(alias) { + return function () { + return this.as(alias); + }; + } + + var asMilliseconds = makeAs('ms'); + var asSeconds = makeAs('s'); + var asMinutes = makeAs('m'); + var asHours = makeAs('h'); + var asDays = makeAs('d'); + var asWeeks = makeAs('w'); + var asMonths = makeAs('M'); + var asQuarters = makeAs('Q'); + var asYears = makeAs('y'); + + function clone$1() { + return createDuration(this); + } + + function get$2(units) { + units = normalizeUnits(units); + return this.isValid() ? this[units + 's']() : NaN; + } + + function makeGetter(name) { + return function () { + return this.isValid() ? this._data[name] : NaN; + }; + } + + var milliseconds = makeGetter('milliseconds'); + var seconds = makeGetter('seconds'); + var minutes = makeGetter('minutes'); + var hours = makeGetter('hours'); + var days = makeGetter('days'); + var months = makeGetter('months'); + var years = makeGetter('years'); + + function weeks() { + return absFloor(this.days() / 7); + } + + var round = Math.round; + var thresholds = { + ss: 44, + // a few seconds to seconds + s: 45, + // seconds to minute + m: 45, + // minutes to hour + h: 22, + // hours to day + d: 26, + // days to month + M: 11 // months to year + + }; // helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize + + function substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) { + return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture); + } + + function relativeTime$1(posNegDuration, withoutSuffix, locale) { + var duration = createDuration(posNegDuration).abs(); + var seconds = round(duration.as('s')); + var minutes = round(duration.as('m')); + var hours = round(duration.as('h')); + var days = round(duration.as('d')); + var months = round(duration.as('M')); + var years = round(duration.as('y')); + var a = seconds <= thresholds.ss && ['s', seconds] || seconds < thresholds.s && ['ss', seconds] || minutes <= 1 && ['m'] || minutes < thresholds.m && ['mm', minutes] || hours <= 1 && ['h'] || hours < thresholds.h && ['hh', hours] || days <= 1 && ['d'] || days < thresholds.d && ['dd', days] || months <= 1 && ['M'] || months < thresholds.M && ['MM', months] || years <= 1 && ['y'] || ['yy', years]; + a[2] = withoutSuffix; + a[3] = +posNegDuration > 0; + a[4] = locale; + return substituteTimeAgo.apply(null, a); + } // This function allows you to set the rounding function for relative time strings + + + function getSetRelativeTimeRounding(roundingFunction) { + if (roundingFunction === undefined) { + return round; + } + + if (typeof roundingFunction === 'function') { + round = roundingFunction; + return true; + } + + return false; + } // This function allows you to set a threshold for relative time strings + + + function getSetRelativeTimeThreshold(threshold, limit) { + if (thresholds[threshold] === undefined) { + return false; + } + + if (limit === undefined) { + return thresholds[threshold]; + } + + thresholds[threshold] = limit; + + if (threshold === 's') { + thresholds.ss = limit - 1; + } + + return true; + } + + function humanize(withSuffix) { + if (!this.isValid()) { + return this.localeData().invalidDate(); + } + + var locale = this.localeData(); + var output = relativeTime$1(this, !withSuffix, locale); + + if (withSuffix) { + output = locale.pastFuture(+this, output); + } + + return locale.postformat(output); + } + + var abs$1 = Math.abs; + + function sign(x) { + return (x > 0) - (x < 0) || +x; + } + + function toISOString$1() { + // for ISO strings we do not use the normal bubbling rules: + // * milliseconds bubble up until they become hours + // * days do not bubble at all + // * months bubble up until they become years + // This is because there is no context-free conversion between hours and days + // (think of clock changes) + // and also not between days and months (28-31 days per month) + if (!this.isValid()) { + return this.localeData().invalidDate(); + } + + var seconds = abs$1(this._milliseconds) / 1000; + var days = abs$1(this._days); + var months = abs$1(this._months); + var minutes, hours, years; // 3600 seconds -> 60 minutes -> 1 hour + + minutes = absFloor(seconds / 60); + hours = absFloor(minutes / 60); + seconds %= 60; + minutes %= 60; // 12 months -> 1 year + + years = absFloor(months / 12); + months %= 12; // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js + + var Y = years; + var M = months; + var D = days; + var h = hours; + var m = minutes; + var s = seconds ? seconds.toFixed(3).replace(/\.?0+$/, '') : ''; + var total = this.asSeconds(); + + if (!total) { + // this is the same as C#'s (Noda) and python (isodate)... + // but not other JS (goog.date) + return 'P0D'; + } + + var totalSign = total < 0 ? '-' : ''; + var ymSign = sign(this._months) !== sign(total) ? '-' : ''; + var daysSign = sign(this._days) !== sign(total) ? '-' : ''; + var hmsSign = sign(this._milliseconds) !== sign(total) ? '-' : ''; + return totalSign + 'P' + (Y ? ymSign + Y + 'Y' : '') + (M ? ymSign + M + 'M' : '') + (D ? daysSign + D + 'D' : '') + (h || m || s ? 'T' : '') + (h ? hmsSign + h + 'H' : '') + (m ? hmsSign + m + 'M' : '') + (s ? hmsSign + s + 'S' : ''); + } + + var proto$2 = Duration.prototype; + proto$2.isValid = isValid$1; + proto$2.abs = abs; + proto$2.add = add$1; + proto$2.subtract = subtract$1; + proto$2.as = as; + proto$2.asMilliseconds = asMilliseconds; + proto$2.asSeconds = asSeconds; + proto$2.asMinutes = asMinutes; + proto$2.asHours = asHours; + proto$2.asDays = asDays; + proto$2.asWeeks = asWeeks; + proto$2.asMonths = asMonths; + proto$2.asQuarters = asQuarters; + proto$2.asYears = asYears; + proto$2.valueOf = valueOf$1; + proto$2._bubble = bubble; + proto$2.clone = clone$1; + proto$2.get = get$2; + proto$2.milliseconds = milliseconds; + proto$2.seconds = seconds; + proto$2.minutes = minutes; + proto$2.hours = hours; + proto$2.days = days; + proto$2.weeks = weeks; + proto$2.months = months; + proto$2.years = years; + proto$2.humanize = humanize; + proto$2.toISOString = toISOString$1; + proto$2.toString = toISOString$1; + proto$2.toJSON = toISOString$1; + proto$2.locale = locale; + proto$2.localeData = localeData; + proto$2.toIsoString = deprecate('toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)', toISOString$1); + proto$2.lang = lang; // Side effect imports + // FORMATTING + + addFormatToken('X', 0, 0, 'unix'); + addFormatToken('x', 0, 0, 'valueOf'); // PARSING + + addRegexToken('x', matchSigned); + addRegexToken('X', matchTimestamp); + addParseToken('X', function (input, array, config) { + config._d = new Date(parseFloat(input, 10) * 1000); + }); + addParseToken('x', function (input, array, config) { + config._d = new Date(toInt(input)); + }); // Side effect imports + + hooks.version = '2.24.0'; + setHookCallback(createLocal); + hooks.fn = proto; + hooks.min = min; + hooks.max = max; + hooks.now = now; + hooks.utc = createUTC; + hooks.unix = createUnix; + hooks.months = listMonths; + hooks.isDate = isDate; + hooks.locale = getSetGlobalLocale; + hooks.invalid = createInvalid; + hooks.duration = createDuration; + hooks.isMoment = isMoment; + hooks.weekdays = listWeekdays; + hooks.parseZone = createInZone; + hooks.localeData = getLocale; + hooks.isDuration = isDuration; + hooks.monthsShort = listMonthsShort; + hooks.weekdaysMin = listWeekdaysMin; + hooks.defineLocale = defineLocale; + hooks.updateLocale = updateLocale; + hooks.locales = listLocales; + hooks.weekdaysShort = listWeekdaysShort; + hooks.normalizeUnits = normalizeUnits; + hooks.relativeTimeRounding = getSetRelativeTimeRounding; + hooks.relativeTimeThreshold = getSetRelativeTimeThreshold; + hooks.calendarFormat = getCalendarFormat; + hooks.prototype = proto; // currently HTML5 input type only supports 24-hour formats + + hooks.HTML5_FMT = { + DATETIME_LOCAL: 'YYYY-MM-DDTHH:mm', + // + DATETIME_LOCAL_SECONDS: 'YYYY-MM-DDTHH:mm:ss', + // + DATETIME_LOCAL_MS: 'YYYY-MM-DDTHH:mm:ss.SSS', + // + DATE: 'YYYY-MM-DD', + // + TIME: 'HH:mm', + // + TIME_SECONDS: 'HH:mm:ss', + // + TIME_MS: 'HH:mm:ss.SSS', + // + WEEK: 'GGGG-[W]WW', + // + MONTH: 'YYYY-MM' // + + }; + return hooks; + }); +}); // Maps for number <-> hex string conversion + +var byteToHex = []; + +for (var i$1 = 0; i$1 < 256; i$1++) { + byteToHex[i$1] = (i$1 + 0x100).toString(16).substr(1); +} +/** + * Represent binary UUID into it's string representation. + * + * @param buf - Buffer containing UUID bytes. + * @param offset - Offset from the start of the buffer where the UUID is saved (not needed if the buffer starts with the UUID). + * + * @returns String representation of the UUID. + */ + + +function stringifyUUID(buf, offset) { + var i = offset || 0; + var bth = byteToHex; + return bth[buf[i++]] + bth[buf[i++]] + bth[buf[i++]] + bth[buf[i++]] + '-' + bth[buf[i++]] + bth[buf[i++]] + '-' + bth[buf[i++]] + bth[buf[i++]] + '-' + bth[buf[i++]] + bth[buf[i++]] + '-' + bth[buf[i++]] + bth[buf[i++]] + bth[buf[i++]] + bth[buf[i++]] + bth[buf[i++]] + bth[buf[i++]]; +} +/** + * Generate 16 random bytes to be used as a base for UUID. + * + * @ignore + */ + + +var random = function () { + if (typeof crypto !== 'undefined' && crypto.getRandomValues) { + // WHATWG crypto-based RNG - http://wiki.whatwg.org/wiki/Crypto + // Moderately fast, high quality + var _rnds8 = new Uint8Array(16); + + return function whatwgRNG() { + crypto.getRandomValues(_rnds8); + return _rnds8; + }; + } // Math.random()-based (RNG) + // + // If all else fails, use Math.random(). + // It's fast, but is of unspecified quality. + + + var _rnds = new Array(16); + + return function () { + for (var i = 0, r; i < 16; i++) { + if ((i & 0x03) === 0) { + r = Math.random() * 0x100000000; + } + + _rnds[i] = r >>> ((i & 0x03) << 3) & 0xff; + } + + return _rnds; + }; // uuid.js + // + // Copyright (c) 2010-2012 Robert Kieffer + // MIT License - http://opensource.org/licenses/mit-license.php + // Unique ID creation requires a high quality random # generator. We feature + // detect to determine the best RNG source, normalizing to a function that + // returns 128-bits of randomness, since that's what's usually required + // return require('./rng'); +}(); + +var byteToHex$1 = []; + +for (var i$1$1 = 0; i$1$1 < 256; i$1$1++) { + byteToHex$1[i$1$1] = (i$1$1 + 0x100).toString(16).substr(1); +} // **`v1()` - Generate time-based UUID** +// +// Inspired by https://github.com/LiosK/UUID.js +// and http://docs.python.org/library/uuid.html +// random #'s we need to init node and clockseq + + +var seedBytes = random(); // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1) + +var defaultNodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]]; // Per 4.2.2, randomize (14 bit) clockseq + +var defaultClockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff; // Previous uuid creation time + +/** + * UUIDv4 options. + */ + +/** + * Generate UUIDv4 + * + * @param options - Options to be used instead of default generated values. + * String 'binary' is a shorthand for uuid4({}, new Array(16)). + * @param buf - If present the buffer will be filled with the generated UUID. + * @param offset - Offset of the UUID from the start of the buffer. + * + * @returns UUIDv4 + */ + +function uuid4() { + var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + var buf = arguments.length > 1 ? arguments[1] : undefined; + var offset = arguments.length > 2 ? arguments[2] : undefined; // Deprecated - 'format' argument, as supported in v1.2 + + var i = buf && offset || 0; + + if (typeof options === 'string') { + buf = options === 'binary' ? new Array(16) : undefined; + options = {}; + } + + var rnds = options.random || (options.rng || random)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved` + + rnds[6] = rnds[6] & 0x0f | 0x40; + rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided + + if (buf) { + for (var ii = 0; ii < 16; ii++) { + buf[i + ii] = rnds[ii]; + } + } + + return buf || stringifyUUID(rnds); +} // Rollup will complain about mixing default and named exports in UMD build, +// for example '/Date(1198908717056)/' or '/Date(1198908717056-0700)/' +// code from http://momentjs.com/ + + +var ASPDateRegex = /^\/?Date\((-?\d+)/i; // Color REs + +var fullHexRE = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i; +var shortHexRE = /^#?([a-f\d])([a-f\d])([a-f\d])$/i; +var rgbRE = /^rgb\( *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *(1?\d{1,2}|2[0-4]\d|25[0-5]) *\)$/i; +var rgbaRE = /^rgba\( *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *([01]|0?\.\d+) *\)$/i; +/** + * Hue, Saturation, Value. + */ + +/** + * Test whether given object is a number + * + * @param value - Input value of unknown type. + * + * @returns True if number, false otherwise. + */ + +function isNumber(value) { + return value instanceof Number || typeof value === "number"; +} +/** + * Remove everything in the DOM object + * + * @param DOMobject - Node whose child nodes will be recursively deleted. + */ + + +function recursiveDOMDelete(DOMobject) { + if (DOMobject) { + while (DOMobject.hasChildNodes() === true) { + var child = DOMobject.firstChild; + + if (child) { + recursiveDOMDelete(child); + DOMobject.removeChild(child); + } + } + } +} +/** + * Test whether given object is a string + * + * @param value - Input value of unknown type. + * + * @returns True if string, false otherwise. + */ + + +function isString(value) { + return value instanceof String || typeof value === "string"; +} +/** + * Test whether given object is a object (not primitive or null). + * + * @param value - Input value of unknown type. + * + * @returns True if not null object, false otherwise. + */ + + +function isObject(value) { + return _typeof(value) === "object" && value !== null; +} +/** + * Test whether given object is a Date, or a String containing a Date + * + * @param value - Input value of unknown type. + * + * @returns True if Date instance or string date representation, false otherwise. + */ + + +function isDate(value) { + if (value instanceof Date) { + return true; + } else if (isString(value)) { + // test whether this string contains a date + var match = ASPDateRegex.exec(value); + + if (match) { + return true; + } else if (!isNaN(Date.parse(value))) { + return true; + } + } + + return false; +} +/** + * Test whether given object is a Moment date. + * @TODO: This is basically a workaround, if Moment was imported property it wouldn't necessary as moment.isMoment is a TS type guard. + * + * @param value - Input value of unknown type. + * + * @returns True if Moment instance, false otherwise. + */ + + +function isMoment(value) { + return moment.isMoment(value); +} +/** + * Copy property from b to a if property present in a. + * If property in b explicitly set to null, delete it if `allowDeletion` set. + * + * Internal helper routine, should not be exported. Not added to `exports` for that reason. + * + * @param a - Target object. + * @param b - Source object. + * @param prop - Name of property to copy from b to a. + * @param allowDeletion if true, delete property in a if explicitly set to null in b + */ + + +function copyOrDelete(a, b, prop, allowDeletion) { + var doDeletion = false; + + if (allowDeletion === true) { + doDeletion = b[prop] === null && a[prop] !== undefined; + } + + if (doDeletion) { + delete a[prop]; + } else { + a[prop] = b[prop]; // Remember, this is a reference copy! + } +} +/** + * Fill an object with a possibly partially defined other object. + * + * Only copies values for the properties already present in a. + * That means an object is not created on a property if only the b object has it. + * + * @param a - The object that will have it's properties updated. + * @param b - The object with property updates. + * @param allowDeletion - if true, delete properties in a that are explicitly set to null in b + */ + + +function fillIfDefined(a, b) { + var allowDeletion = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; // NOTE: iteration of properties of a + // NOTE: prototype properties iterated over as well + + for (var prop in a) { + if (b[prop] !== undefined) { + if (b[prop] === null || _typeof(b[prop]) !== "object") { + // Note: typeof null === 'object' + copyOrDelete(a, b, prop, allowDeletion); + } else { + var aProp = a[prop]; + var bProp = b[prop]; + + if (isObject(aProp) && isObject(bProp)) { + fillIfDefined(aProp, bProp, allowDeletion); + } + } + } + } +} +/** + * Copy the values of all of the enumerable own properties from one or more source objects to a + * target object. Returns the target object. + * + * @param target - The target object to copy to. + * @param source - The source object from which to copy properties. + * + * @return The target object. + */ + + +var extend = Object.assign; +/** + * Extend object a with selected properties of object b or a series of objects + * Only properties with defined values are copied + * + * @param props - Properties to be copied to a. + * @param a - The target. + * @param others - The sources. + * + * @returns Argument a. + */ + +function selectiveExtend(props, a) { + if (!Array.isArray(props)) { + throw new Error("Array with property names expected as first argument"); + } + + for (var _len = arguments.length, others = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) { + others[_key - 2] = arguments[_key]; + } + + for (var _i = 0, _others = others; _i < _others.length; _i++) { + var other = _others[_i]; + + for (var p = 0; p < props.length; p++) { + var prop = props[p]; + + if (other && Object.prototype.hasOwnProperty.call(other, prop)) { + a[prop] = other[prop]; + } + } + } + + return a; +} +/** + * Extend object a with selected properties of object b. + * Only properties with defined values are copied. + * + * **Note:** Previous version of this routine implied that multiple source objects + * could be used; however, the implementation was **wrong**. + * Since multiple (>1) sources weren't used anywhere in the `vis.js` code, + * this has been removed + * + * @param props - Names of first-level properties to copy over. + * @param a - Target object. + * @param b - Source object. + * @param allowDeletion - If true, delete property in a if explicitly set to null in b. + * + * @returns Argument a. + */ + + +function selectiveDeepExtend(props, a, b) { + var allowDeletion = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false; // TODO: add support for Arrays to deepExtend + + if (Array.isArray(b)) { + throw new TypeError("Arrays are not supported by deepExtend"); + } + + for (var p = 0; p < props.length; p++) { + var prop = props[p]; + + if (Object.prototype.hasOwnProperty.call(b, prop)) { + if (b[prop] && b[prop].constructor === Object) { + if (a[prop] === undefined) { + a[prop] = {}; + } + + if (a[prop].constructor === Object) { + deepExtend(a[prop], b[prop], false, allowDeletion); + } else { + copyOrDelete(a, b, prop, allowDeletion); + } + } else if (Array.isArray(b[prop])) { + throw new TypeError("Arrays are not supported by deepExtend"); + } else { + copyOrDelete(a, b, prop, allowDeletion); + } + } + } + + return a; +} +/** + * Extend object `a` with properties of object `b`, ignoring properties which are explicitly + * specified to be excluded. + * + * The properties of `b` are considered for copying. + * Properties which are themselves objects are are also extended. + * Only properties with defined values are copied + * + * @param propsToExclude - Names of properties which should *not* be copied. + * @param a - Object to extend. + * @param b - Object to take properties from for extension. + * @param allowDeletion - If true, delete properties in a that are explicitly set to null in b. + * + * @returns Argument a. + */ + + +function selectiveNotDeepExtend(propsToExclude, a, b) { + var allowDeletion = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false; // TODO: add support for Arrays to deepExtend + // NOTE: array properties have an else-below; apparently, there is a problem here. + + if (Array.isArray(b)) { + throw new TypeError("Arrays are not supported by deepExtend"); + } + + for (var prop in b) { + if (!Object.prototype.hasOwnProperty.call(b, prop)) { + continue; + } // Handle local properties only + + + if (propsToExclude.indexOf(prop) !== -1) { + continue; + } // In exclusion list, skip + + + if (b[prop] && b[prop].constructor === Object) { + if (a[prop] === undefined) { + a[prop] = {}; + } + + if (a[prop].constructor === Object) { + deepExtend(a[prop], b[prop]); // NOTE: allowDeletion not propagated! + } else { + copyOrDelete(a, b, prop, allowDeletion); + } + } else if (Array.isArray(b[prop])) { + a[prop] = []; + + for (var i = 0; i < b[prop].length; i++) { + a[prop].push(b[prop][i]); + } + } else { + copyOrDelete(a, b, prop, allowDeletion); + } + } + + return a; +} +/** + * Deep extend an object a with the properties of object b + * + * @param a - Target object. + * @param b - Source object. + * @param protoExtend - If true, the prototype values will also be extended + * (ie. the options objects that inherit from others will also get the inherited options). + * @param allowDeletion - If true, the values of fields that are null will be deleted. + * + * @returns Argument a. + */ + + +function deepExtend(a, b) { + var protoExtend = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; + var allowDeletion = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false; + + for (var prop in b) { + if (Object.prototype.hasOwnProperty.call(b, prop) || protoExtend === true) { + if (b[prop] && Object.getPrototypeOf(b[prop]) === Object.prototype) { + if (a[prop] === undefined) { + a[prop] = deepExtend({}, b[prop], protoExtend); // NOTE: allowDeletion not propagated! + } else if (a[prop] && Object.getPrototypeOf(a[prop]) === Object.prototype) { + deepExtend(a[prop], b[prop], protoExtend); // NOTE: allowDeletion not propagated! + } else { + copyOrDelete(a, b, prop, allowDeletion); + } + } else if (Array.isArray(b[prop])) { + a[prop] = b[prop].slice(); + } else { + copyOrDelete(a, b, prop, allowDeletion); + } + } + } + + return a; +} +/** + * Test whether all elements in two arrays are equal. + * + * @param a - First array. + * @param b - Second array. + * + * @returns True if both arrays have the same length and same elements (1 = '1'). + */ + + +function equalArray(a, b) { + if (a.length !== b.length) { + return false; + } + + for (var i = 0, len = a.length; i < len; i++) { + if (a[i] != b[i]) { + return false; + } + } + + return true; +} +/** + * Convert an object into another type + * + * @param object - Value of unknown type. + * @param type - Name of the desired type. + * + * @returns Object in the desired type. + * @throws Error + */ + + +function convert(object, type) { + var match; + + if (object === undefined) { + return undefined; + } + + if (object === null) { + return null; + } + + if (!type) { + return object; + } + + if (!(typeof type === "string") && !(type instanceof String)) { + throw new Error("Type must be a string"); + } //noinspection FallthroughInSwitchStatementJS + + + switch (type) { + case "boolean": + case "Boolean": + return Boolean(object); + + case "number": + case "Number": + if (isString(object) && !isNaN(Date.parse(object))) { + return moment(object).valueOf(); + } else { + // @TODO: I don't think that Number and String constructors are a good idea. + // This could also fail if the object doesn't have valueOf method or if it's redefined. + // For example: Object.create(null) or { valueOf: 7 }. + return Number(object.valueOf()); + } + + case "string": + case "String": + return String(object); + + case "Date": + if (isNumber(object)) { + return new Date(object); + } + + if (object instanceof Date) { + return new Date(object.valueOf()); + } else if (isMoment(object)) { + return new Date(object.valueOf()); + } + + if (isString(object)) { + match = ASPDateRegex.exec(object); + + if (match) { + // object is an ASP date + return new Date(Number(match[1])); // parse number + } else { + return moment(new Date(object)).toDate(); // parse string + } + } else { + throw new Error("Cannot convert object of type " + getType(object) + " to type Date"); + } + + case "Moment": + if (isNumber(object)) { + return moment(object); + } + + if (object instanceof Date) { + return moment(object.valueOf()); + } else if (isMoment(object)) { + return moment(object); + } + + if (isString(object)) { + match = ASPDateRegex.exec(object); + + if (match) { + // object is an ASP date + return moment(Number(match[1])); // parse number + } else { + return moment(object); // parse string + } + } else { + throw new Error("Cannot convert object of type " + getType(object) + " to type Date"); + } + + case "ISODate": + if (isNumber(object)) { + return new Date(object); + } else if (object instanceof Date) { + return object.toISOString(); + } else if (isMoment(object)) { + return object.toDate().toISOString(); + } else if (isString(object)) { + match = ASPDateRegex.exec(object); + + if (match) { + // object is an ASP date + return new Date(Number(match[1])).toISOString(); // parse number + } else { + return moment(object).format(); // ISO 8601 + } + } else { + throw new Error("Cannot convert object of type " + getType(object) + " to type ISODate"); + } + + case "ASPDate": + if (isNumber(object)) { + return "/Date(" + object + ")/"; + } else if (object instanceof Date || isMoment(object)) { + return "/Date(" + object.valueOf() + ")/"; + } else if (isString(object)) { + match = ASPDateRegex.exec(object); + + var _value; + + if (match) { + // object is an ASP date + _value = new Date(Number(match[1])).valueOf(); // parse number + } else { + _value = new Date(object).valueOf(); // parse string + } + + return "/Date(" + _value + ")/"; + } else { + throw new Error("Cannot convert object of type " + getType(object) + " to type ASPDate"); + } + + default: + var never = type; + throw new Error("Unknown type ".concat(never)); + } +} +/** + * Get the type of an object, for example exports.getType([]) returns 'Array' + * + * @param object - Input value of unknown type. + * + * @returns Detected type. + */ + + +function getType(object) { + var type = _typeof(object); + + if (type === "object") { + if (object === null) { + return "null"; + } + + if (object instanceof Boolean) { + return "Boolean"; + } + + if (object instanceof Number) { + return "Number"; + } + + if (object instanceof String) { + return "String"; + } + + if (Array.isArray(object)) { + return "Array"; + } + + if (object instanceof Date) { + return "Date"; + } + + return "Object"; + } + + if (type === "number") { + return "Number"; + } + + if (type === "boolean") { + return "Boolean"; + } + + if (type === "string") { + return "String"; + } + + if (type === undefined) { + return "undefined"; + } + + return type; +} +/** + * Used to extend an array and copy it. This is used to propagate paths recursively. + * + * @param arr - First part. + * @param newValue - The value to be aadded into the array. + * + * @returns A new array with all items from arr and newValue (which is last). + */ + + +function copyAndExtendArray(arr, newValue) { + return [].concat(_toConsumableArray(arr), [newValue]); +} +/** + * Used to extend an array and copy it. This is used to propagate paths recursively. + * + * @param arr - The array to be copied. + * + * @returns Shallow copy of arr. + */ + + +function copyArray(arr) { + return arr.slice(); +} +/** + * Retrieve the absolute left value of a DOM element + * + * @param elem - A dom element, for example a div. + * + * @returns The absolute left position of this element in the browser page. + */ + + +function getAbsoluteLeft(elem) { + return elem.getBoundingClientRect().left; +} +/** + * Retrieve the absolute right value of a DOM element + * + * @param elem - A dom element, for example a div. + * + * @returns The absolute right position of this element in the browser page. + */ + + +function getAbsoluteRight(elem) { + return elem.getBoundingClientRect().right; +} +/** + * Retrieve the absolute top value of a DOM element + * + * @param elem - A dom element, for example a div. + * + * @returns The absolute top position of this element in the browser page. + */ + + +function getAbsoluteTop(elem) { + return elem.getBoundingClientRect().top; +} +/** + * Add a className to the given elements style. + * + * @param elem - The element to which the classes will be added. + * @param classNames - Space separated list of classes. + */ + + +function addClassName(elem, classNames) { + var classes = elem.className.split(" "); + var newClasses = classNames.split(" "); + classes = classes.concat(newClasses.filter(function (className) { + return classes.indexOf(className) < 0; + })); + elem.className = classes.join(" "); +} +/** + * Remove a className from the given elements style. + * + * @param elem - The element from which the classes will be removed. + * @param classNames - Space separated list of classes. + */ + + +function removeClassName(elem, classNames) { + var classes = elem.className.split(" "); + var oldClasses = classNames.split(" "); + classes = classes.filter(function (className) { + return oldClasses.indexOf(className) < 0; + }); + elem.className = classes.join(" "); +} +/** + * For each method for both arrays and objects. + * In case of an array, the built-in Array.forEach() is applied (**No, it's not!**). + * In case of an Object, the method loops over all properties of the object. + * + * @param object - An Object or Array to be iterated over. + * @param callback - Array.forEach-like callback. + */ + + +function forEach(object, callback) { + if (Array.isArray(object)) { + // array + var len = object.length; + + for (var i = 0; i < len; i++) { + callback(object[i], i, object); + } + } else { + // object + for (var _key2 in object) { + if (Object.prototype.hasOwnProperty.call(object, _key2)) { + callback(object[_key2], _key2, object); + } + } + } +} +/** + * Convert an object into an array: all objects properties are put into the array. The resulting array is unordered. + * + * @param o - Object that contains the properties and methods. + * + * @returns An array of unordered values. + */ + + +var toArray = Object.values; +/** + * Update a property in an object + * + * @param object - The object whose property will be updated. + * @param key - Name of the property to be updated. + * @param value - The new value to be assigned. + * + * @returns Whether the value was updated (true) or already strictly the same in the original object (false). + */ + +function updateProperty(object, key, value) { + if (object[key] !== value) { + object[key] = value; + return true; + } else { + return false; + } +} +/** + * Throttle the given function to be only executed once per animation frame. + * + * @param fn - The original function. + * + * @returns The throttled function. + */ + + +function throttle(fn) { + var scheduled = false; + return function () { + if (!scheduled) { + scheduled = true; + requestAnimationFrame(function () { + scheduled = false; + fn(); + }); + } + }; +} +/** + * Add and event listener. Works for all browsers. + * + * @param element - The element to bind the event listener to. + * @param action - Same as Element.addEventListener(action, —, —). + * @param listener - Same as Element.addEventListener(—, listener, —). + * @param useCapture - Same as Element.addEventListener(—, —, useCapture). + */ + + +function addEventListener(element, action, listener, useCapture) { + if (element.addEventListener) { + if (useCapture === undefined) { + useCapture = false; + } + + if (action === "mousewheel" && navigator.userAgent.indexOf("Firefox") >= 0) { + action = "DOMMouseScroll"; // For Firefox + } + + element.addEventListener(action, listener, useCapture); + } else { + // @TODO: IE types? Does anyone care? + element.attachEvent("on" + action, listener); // IE browsers + } +} +/** + * Remove an event listener from an element + * + * @param element - The element to bind the event listener to. + * @param action - Same as Element.removeEventListener(action, —, —). + * @param listener - Same as Element.removeEventListener(—, listener, —). + * @param useCapture - Same as Element.removeEventListener(—, —, useCapture). + */ + + +function removeEventListener(element, action, listener, useCapture) { + if (element.removeEventListener) { + // non-IE browsers + if (useCapture === undefined) { + useCapture = false; + } + + if (action === "mousewheel" && navigator.userAgent.indexOf("Firefox") >= 0) { + action = "DOMMouseScroll"; // For Firefox + } + + element.removeEventListener(action, listener, useCapture); + } else { + // @TODO: IE types? Does anyone care? + element.detachEvent("on" + action, listener); // IE browsers + } +} +/** + * Cancels the event's default action if it is cancelable, without stopping further propagation of the event. + * + * @param event - The event whose default action should be prevented. + */ + + +function preventDefault(event) { + if (!event) { + event = window.event; + } + + if (!event) ;else if (event.preventDefault) { + event.preventDefault(); // non-IE browsers + } else { + // @TODO: IE types? Does anyone care? + event.returnValue = false; // IE browsers + } +} +/** + * Get HTML element which is the target of the event. + * + * @param event - The event. + * + * @returns The element or null if not obtainable. + */ + + +function getTarget() { + var event = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : window.event; // code from http://www.quirksmode.org/js/events_properties.html + // @TODO: EventTarget can be almost anything, is it okay to return only Elements? + + var target = null; + if (!event) ;else if (event.target) { + target = event.target; + } else if (event.srcElement) { + target = event.srcElement; + } + + if (!(target instanceof Element)) { + return null; + } + + if (target.nodeType != null && target.nodeType == 3) { + // defeat Safari bug + target = target.parentNode; + + if (!(target instanceof Element)) { + return null; + } + } + + return target; +} +/** + * Check if given element contains given parent somewhere in the DOM tree + * + * @param element - The element to be tested. + * @param parent - The ancestor (not necessarily parent) of the element. + * + * @returns True if parent is an ancestor of the element, false otherwise. + */ + + +function hasParent(element, parent) { + var elem = element; + + while (elem) { + if (elem === parent) { + return true; + } else if (elem.parentNode) { + elem = elem.parentNode; + } else { + return false; + } + } + + return false; +} + +var option = { + /** + * Convert a value into a boolean. + * + * @param value - Value to be converted intoboolean, a function will be executed as (() => unknown). + * @param defaultValue - If the value or the return value of the function == null then this will be returned. + * + * @returns Corresponding boolean value, if none then the default value, if none then null. + */ + asBoolean: function asBoolean(value, defaultValue) { + if (typeof value == "function") { + value = value(); + } + + if (value != null) { + return value != false; + } + + return defaultValue || null; + }, + + /** + * Convert a value into a number. + * + * @param value - Value to be converted intonumber, a function will be executed as (() => unknown). + * @param defaultValue - If the value or the return value of the function == null then this will be returned. + * + * @returns Corresponding **boxed** number value, if none then the default value, if none then null. + */ + asNumber: function asNumber(value, defaultValue) { + if (typeof value == "function") { + value = value(); + } + + if (value != null) { + return Number(value) || defaultValue || null; + } + + return defaultValue || null; + }, + + /** + * Convert a value into a string. + * + * @param value - Value to be converted intostring, a function will be executed as (() => unknown). + * @param defaultValue - If the value or the return value of the function == null then this will be returned. + * + * @returns Corresponding **boxed** string value, if none then the default value, if none then null. + */ + asString: function asString(value, defaultValue) { + if (typeof value == "function") { + value = value(); + } + + if (value != null) { + return String(value); + } + + return defaultValue || null; + }, + + /** + * Convert a value into a size. + * + * @param value - Value to be converted intosize, a function will be executed as (() => unknown). + * @param defaultValue - If the value or the return value of the function == null then this will be returned. + * + * @returns Corresponding string value (number + 'px'), if none then the default value, if none then null. + */ + asSize: function asSize(value, defaultValue) { + if (typeof value == "function") { + value = value(); + } + + if (isString(value)) { + return value; + } else if (isNumber(value)) { + return value + "px"; + } else { + return defaultValue || null; + } + }, + + /** + * Convert a value into a DOM Element. + * + * @param value - Value to be converted into DOM Element, a function will be executed as (() => unknown). + * @param defaultValue - If the value or the return value of the function == null then this will be returned. + * + * @returns The DOM Element, if none then the default value, if none then null. + */ + asElement: function asElement(value, defaultValue) { + if (typeof value == "function") { + value = value(); + } + + return value || defaultValue || null; + } +}; +/** + * Convert hex color string into RGB color object. + * http://stackoverflow.com/questions/5623838/rgb-to-hex-and-hex-to-rgb + * + * @param hex - Hex color string (3 or 6 digits, with or without #). + * + * @returns RGB color object. + */ + +function hexToRGB(hex) { + var result; + + switch (hex.length) { + case 3: + case 4: + result = shortHexRE.exec(hex); + return result ? { + r: parseInt(result[1] + result[1], 16), + g: parseInt(result[2] + result[2], 16), + b: parseInt(result[3] + result[3], 16) + } : null; + + case 6: + case 7: + result = fullHexRE.exec(hex); + return result ? { + r: parseInt(result[1], 16), + g: parseInt(result[2], 16), + b: parseInt(result[3], 16) + } : null; + + default: + return null; + } +} +/** + * This function takes string color in hex or RGB format and adds the opacity, RGBA is passed through unchanged. + * + * @param color - The color string (hex, RGB, RGBA). + * @param opacity - The new opacity. + * + * @returns RGBA string, for example 'rgba(255, 0, 127, 0.3)'. + */ + + +function overrideOpacity(color, opacity) { + if (color.indexOf("rgba") !== -1) { + return color; + } else if (color.indexOf("rgb") !== -1) { + var rgb = color.substr(color.indexOf("(") + 1).replace(")", "").split(","); + return "rgba(" + rgb[0] + "," + rgb[1] + "," + rgb[2] + "," + opacity + ")"; + } else { + var _rgb = hexToRGB(color); + + if (_rgb == null) { + return color; + } else { + return "rgba(" + _rgb.r + "," + _rgb.g + "," + _rgb.b + "," + opacity + ")"; + } + } +} +/** + * Convert RGB <0, 255> into hex color string. + * + * @param red - Red channel. + * @param green - Green channel. + * @param blue - Blue channel. + * + * @returns Hex color string (for example: '#0acdc0'). + */ + + +function RGBToHex(red, green, blue) { + return "#" + ((1 << 24) + (red << 16) + (green << 8) + blue).toString(16).slice(1); +} +/** + * Parse a color property into an object with border, background, and highlight colors + * + * @param inputColor - Shorthand color string or input color object. + * @param defaultColor - Full color object to fill in missing values in inputColor. + * + * @returns Color object. + */ + + +function parseColor(inputColor, defaultColor) { + if (isString(inputColor)) { + var colorStr = inputColor; + + if (isValidRGB(colorStr)) { + var rgb = colorStr.substr(4).substr(0, colorStr.length - 5).split(",").map(function (value) { + return parseInt(value); + }); + colorStr = RGBToHex(rgb[0], rgb[1], rgb[2]); + } + + if (isValidHex(colorStr) === true) { + var hsv = hexToHSV(colorStr); + var lighterColorHSV = { + h: hsv.h, + s: hsv.s * 0.8, + v: Math.min(1, hsv.v * 1.02) + }; + var darkerColorHSV = { + h: hsv.h, + s: Math.min(1, hsv.s * 1.25), + v: hsv.v * 0.8 + }; + var darkerColorHex = HSVToHex(darkerColorHSV.h, darkerColorHSV.s, darkerColorHSV.v); + var lighterColorHex = HSVToHex(lighterColorHSV.h, lighterColorHSV.s, lighterColorHSV.v); + return { + background: colorStr, + border: darkerColorHex, + highlight: { + background: lighterColorHex, + border: darkerColorHex + }, + hover: { + background: lighterColorHex, + border: darkerColorHex + } + }; + } else { + return { + background: colorStr, + border: colorStr, + highlight: { + background: colorStr, + border: colorStr + }, + hover: { + background: colorStr, + border: colorStr + } + }; + } + } else { + if (defaultColor) { + var color = { + background: inputColor.background || defaultColor.background, + border: inputColor.border || defaultColor.border, + highlight: isString(inputColor.highlight) ? { + border: inputColor.highlight, + background: inputColor.highlight + } : { + background: inputColor.highlight && inputColor.highlight.background || defaultColor.highlight.background, + border: inputColor.highlight && inputColor.highlight.border || defaultColor.highlight.border + }, + hover: isString(inputColor.hover) ? { + border: inputColor.hover, + background: inputColor.hover + } : { + border: inputColor.hover && inputColor.hover.border || defaultColor.hover.border, + background: inputColor.hover && inputColor.hover.background || defaultColor.hover.background + } + }; + return color; + } else { + var _color = { + background: inputColor.background || undefined, + border: inputColor.border || undefined, + highlight: isString(inputColor.highlight) ? { + border: inputColor.highlight, + background: inputColor.highlight + } : { + background: inputColor.highlight && inputColor.highlight.background || undefined, + border: inputColor.highlight && inputColor.highlight.border || undefined + }, + hover: isString(inputColor.hover) ? { + border: inputColor.hover, + background: inputColor.hover + } : { + border: inputColor.hover && inputColor.hover.border || undefined, + background: inputColor.hover && inputColor.hover.background || undefined + } + }; + return _color; + } + } +} +/** + * Convert RGB <0, 255> into HSV object. + * http://www.javascripter.net/faq/rgb2hsv.htm + * + * @param red - Red channel. + * @param green - Green channel. + * @param blue - Blue channel. + * + * @returns HSV color object. + */ + + +function RGBToHSV(red, green, blue) { + red = red / 255; + green = green / 255; + blue = blue / 255; + var minRGB = Math.min(red, Math.min(green, blue)); + var maxRGB = Math.max(red, Math.max(green, blue)); // Black-gray-white + + if (minRGB === maxRGB) { + return { + h: 0, + s: 0, + v: minRGB + }; + } // Colors other than black-gray-white: + + + var d = red === minRGB ? green - blue : blue === minRGB ? red - green : blue - red; + var h = red === minRGB ? 3 : blue === minRGB ? 1 : 5; + var hue = 60 * (h - d / (maxRGB - minRGB)) / 360; + var saturation = (maxRGB - minRGB) / maxRGB; + var value = maxRGB; + return { + h: hue, + s: saturation, + v: value + }; +} + +var cssUtil = { + // split a string with css styles into an object with key/values + split: function split(cssText) { + var styles = {}; + cssText.split(";").forEach(function (style) { + if (style.trim() != "") { + var parts = style.split(":"); + + var _key3 = parts[0].trim(); + + var _value2 = parts[1].trim(); + + styles[_key3] = _value2; + } + }); + return styles; + }, + // build a css text string from an object with key/values + join: function join(styles) { + return Object.keys(styles).map(function (key) { + return key + ": " + styles[key]; + }).join("; "); + } +}; +/** + * Append a string with css styles to an element + * + * @param element - The element that will receive new styles. + * @param cssText - The styles to be appended. + */ + +function addCssText(element, cssText) { + var currentStyles = cssUtil.split(element.style.cssText); + var newStyles = cssUtil.split(cssText); + + var styles = _objectSpread2({}, currentStyles, {}, newStyles); + + element.style.cssText = cssUtil.join(styles); +} +/** + * Remove a string with css styles from an element + * + * @param element - The element from which styles should be removed. + * @param cssText - The styles to be removed. + */ + + +function removeCssText(element, cssText) { + var styles = cssUtil.split(element.style.cssText); + var removeStyles = cssUtil.split(cssText); + + for (var _key4 in removeStyles) { + if (Object.prototype.hasOwnProperty.call(removeStyles, _key4)) { + delete styles[_key4]; + } + } + + element.style.cssText = cssUtil.join(styles); +} +/** + * Convert HSV <0, 1> into RGB color object. + * https://gist.github.com/mjijackson/5311256 + * + * @param h - Hue + * @param s - Saturation + * @param v - Value + * + * @returns RGB color object. + */ + + +function HSVToRGB(h, s, v) { + var r; + var g; + var b; + var i = Math.floor(h * 6); + var f = h * 6 - i; + var p = v * (1 - s); + var q = v * (1 - f * s); + var t = v * (1 - (1 - f) * s); + + switch (i % 6) { + case 0: + r = v, g = t, b = p; + break; + + case 1: + r = q, g = v, b = p; + break; + + case 2: + r = p, g = v, b = t; + break; + + case 3: + r = p, g = q, b = v; + break; + + case 4: + r = t, g = p, b = v; + break; + + case 5: + r = v, g = p, b = q; + break; + } + + return { + r: Math.floor(r * 255), + g: Math.floor(g * 255), + b: Math.floor(b * 255) + }; +} +/** + * Convert HSV <0, 1> into hex color string. + * + * @param h - Hue + * @param s - Saturation + * @param v - Value + * + * @returns Hex color string. + */ + + +function HSVToHex(h, s, v) { + var rgb = HSVToRGB(h, s, v); + return RGBToHex(rgb.r, rgb.g, rgb.b); +} +/** + * Convert hex color string into HSV <0, 1>. + * + * @param hex - Hex color string. + * + * @returns HSV color object. + */ + + +function hexToHSV(hex) { + var rgb = hexToRGB(hex); + + if (!rgb) { + throw new TypeError("'".concat(hex, "' is not a valid color.")); + } + + return RGBToHSV(rgb.r, rgb.g, rgb.b); +} +/** + * Validate hex color string. + * + * @param hex - Unknown string that may contain a color. + * + * @returns True if the string is valid, false otherwise. + */ + + +function isValidHex(hex) { + var isOk = /(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(hex); + return isOk; +} +/** + * Validate RGB color string. + * + * @param rgb - Unknown string that may contain a color. + * + * @returns True if the string is valid, false otherwise. + */ + + +function isValidRGB(rgb) { + return rgbRE.test(rgb); +} +/** + * Validate RGBA color string. + * + * @param rgba - Unknown string that may contain a color. + * + * @returns True if the string is valid, false otherwise. + */ + + +function isValidRGBA(rgba) { + return rgbaRE.test(rgba); +} +/** + * This recursively redirects the prototype of JSON objects to the referenceObject. + * This is used for default options. + * + * @param fields - Names of properties to be bridged. + * @param referenceObject - The original object. + * + * @returns A new object inheriting from the referenceObject. + */ + + +function selectiveBridgeObject(fields, referenceObject) { + if (referenceObject !== null && _typeof(referenceObject) === "object") { + // !!! typeof null === 'object' + var objectTo = Object.create(referenceObject); + + for (var i = 0; i < fields.length; i++) { + if (Object.prototype.hasOwnProperty.call(referenceObject, fields[i])) { + if (_typeof(referenceObject[fields[i]]) == "object") { + objectTo[fields[i]] = bridgeObject(referenceObject[fields[i]]); + } + } + } + + return objectTo; + } else { + return null; + } +} +/** + * This recursively redirects the prototype of JSON objects to the referenceObject. + * This is used for default options. + * + * @param referenceObject - The original object. + * + * @returns The Element if the referenceObject is an Element, or a new object inheriting from the referenceObject. + */ + + +function bridgeObject(referenceObject) { + if (referenceObject === null || _typeof(referenceObject) !== "object") { + return null; + } + + if (referenceObject instanceof Element) { + // Avoid bridging DOM objects + return referenceObject; + } + + var objectTo = Object.create(referenceObject); + + for (var i in referenceObject) { + if (Object.prototype.hasOwnProperty.call(referenceObject, i)) { + if (_typeof(referenceObject[i]) == "object") { + objectTo[i] = bridgeObject(referenceObject[i]); + } + } + } + + return objectTo; +} +/** + * This method provides a stable sort implementation, very fast for presorted data. + * + * @param a - The array to be sorted (in-place). + * @param compare - An order comparator. + * + * @returns The argument a. + */ + + +function insertSort(a, compare) { + for (var i = 0; i < a.length; i++) { + var k = a[i]; + var j = void 0; + + for (j = i; j > 0 && compare(k, a[j - 1]) < 0; j--) { + a[j] = a[j - 1]; + } + + a[j] = k; + } + + return a; +} +/** + * This is used to set the options of subobjects in the options object. + * + * A requirement of these subobjects is that they have an 'enabled' element + * which is optional for the user but mandatory for the program. + * + * The added value here of the merge is that option 'enabled' is set as required. + * + * @param mergeTarget - Either this.options or the options used for the groups. + * @param options - Options. + * @param option - Option key in the options argument. + * @param globalOptions - Global options, passed in to determine value of option 'enabled'. + */ + + +function mergeOptions(mergeTarget, options, option) { + var globalOptions = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {}; // Local helpers + + var isPresent = function isPresent(obj) { + return obj !== null && obj !== undefined; + }; + + var isObject = function isObject(obj) { + return obj !== null && _typeof(obj) === "object"; + }; // https://stackoverflow.com/a/34491287/1223531 + + + var isEmpty = function isEmpty(obj) { + for (var x in obj) { + if (Object.prototype.hasOwnProperty.call(obj, x)) { + return false; + } + } + + return true; + }; // Guards + + + if (!isObject(mergeTarget)) { + throw new Error("Parameter mergeTarget must be an object"); + } + + if (!isObject(options)) { + throw new Error("Parameter options must be an object"); + } + + if (!isPresent(option)) { + throw new Error("Parameter option must have a value"); + } + + if (!isObject(globalOptions)) { + throw new Error("Parameter globalOptions must be an object"); + } // + // Actual merge routine, separated from main logic + // Only a single level of options is merged. Deeper levels are ref'd. This may actually be an issue. + // + + + var doMerge = function doMerge(target, options, option) { + if (!isObject(target[option])) { + target[option] = {}; + } + + var src = options[option]; + var dst = target[option]; + + for (var prop in src) { + if (Object.prototype.hasOwnProperty.call(src, prop)) { + dst[prop] = src[prop]; + } + } + }; // Local initialization + + + var srcOption = options[option]; + var globalPassed = isObject(globalOptions) && !isEmpty(globalOptions); + var globalOption = globalPassed ? globalOptions[option] : undefined; + var globalEnabled = globalOption ? globalOption.enabled : undefined; ///////////////////////////////////////// + // Main routine + ///////////////////////////////////////// + + if (srcOption === undefined) { + return; // Nothing to do + } + + if (typeof srcOption === "boolean") { + if (!isObject(mergeTarget[option])) { + mergeTarget[option] = {}; + } + + mergeTarget[option].enabled = srcOption; + return; + } + + if (srcOption === null && !isObject(mergeTarget[option])) { + // If possible, explicit copy from globals + if (isPresent(globalOption)) { + mergeTarget[option] = Object.create(globalOption); + } else { + return; // Nothing to do + } + } + + if (!isObject(srcOption)) { + return; + } // + // Ensure that 'enabled' is properly set. It is required internally + // Note that the value from options will always overwrite the existing value + // + + + var enabled = true; // default value + + if (srcOption.enabled !== undefined) { + enabled = srcOption.enabled; + } else { + // Take from globals, if present + if (globalEnabled !== undefined) { + enabled = globalOption.enabled; + } + } + + doMerge(mergeTarget, options, option); + mergeTarget[option].enabled = enabled; +} +/** + * This function does a binary search for a visible item in a sorted list. If we find a visible item, the code that uses + * this function will then iterate in both directions over this sorted list to find all visible items. + * + * @param orderedItems - Items ordered by start + * @param comparator - -1 is lower, 0 is equal, 1 is higher + * @param field - Property name on an item (i.e. item[field]). + * @param field2 - Second property name on an item (i.e. item[field][field2]). + * + * @returns Index of the found item or -1 if nothing was found. + */ + + +function binarySearchCustom(orderedItems, comparator, field, field2) { + var maxIterations = 10000; + var iteration = 0; + var low = 0; + var high = orderedItems.length - 1; + + while (low <= high && iteration < maxIterations) { + var middle = Math.floor((low + high) / 2); + var item = orderedItems[middle]; + + var _value3 = field2 === undefined ? item[field] : item[field][field2]; + + var searchResult = comparator(_value3); + + if (searchResult == 0) { + // jihaa, found a visible item! + return middle; + } else if (searchResult == -1) { + // it is too small --> increase low + low = middle + 1; + } else { + // it is too big --> decrease high + high = middle - 1; + } + + iteration++; + } + + return -1; +} +/** + * This function does a binary search for a specific value in a sorted array. If it does not exist but is in between of + * two values, we return either the one before or the one after, depending on user input + * If it is found, we return the index, else -1. + * + * @param orderedItems - Sorted array. + * @param target - The searched value. + * @param field - Name of the property in items to be searched. + * @param sidePreference - If the target is between two values, should the index of the before or the after be returned? + * @param comparator - An optional comparator, returning -1, 0, 1 for <, ===, >. + * + * @returns The index of found value or -1 if nothing was found. + */ + + +function binarySearchValue(orderedItems, target, field, sidePreference, comparator) { + var maxIterations = 10000; + var iteration = 0; + var low = 0; + var high = orderedItems.length - 1; + var prevValue; + var value; + var nextValue; + var middle; + comparator = comparator != undefined ? comparator : function (a, b) { + return a == b ? 0 : a < b ? -1 : 1; + }; + + while (low <= high && iteration < maxIterations) { + // get a new guess + middle = Math.floor(0.5 * (high + low)); + prevValue = orderedItems[Math.max(0, middle - 1)][field]; + value = orderedItems[middle][field]; + nextValue = orderedItems[Math.min(orderedItems.length - 1, middle + 1)][field]; + + if (comparator(value, target) == 0) { + // we found the target + return middle; + } else if (comparator(prevValue, target) < 0 && comparator(value, target) > 0) { + // target is in between of the previous and the current + return sidePreference == "before" ? Math.max(0, middle - 1) : middle; + } else if (comparator(value, target) < 0 && comparator(nextValue, target) > 0) { + // target is in between of the current and the next + return sidePreference == "before" ? middle : Math.min(orderedItems.length - 1, middle + 1); + } else { + // didnt find the target, we need to change our boundaries. + if (comparator(value, target) < 0) { + // it is too small --> increase low + low = middle + 1; + } else { + // it is too big --> decrease high + high = middle - 1; + } + } + + iteration++; + } // didnt find anything. Return -1. + + + return -1; +} +/* + * Easing Functions. + * Only considering the t value for the range [0, 1] => [0, 1]. + * + * Inspiration: from http://gizma.com/easing/ + * https://gist.github.com/gre/1650294 + */ + + +var easingFunctions = { + /** + * no easing, no acceleration + * + * @param t - Time. + * + * @returns Value at time t. + */ + linear: function linear(t) { + return t; + }, + + /** + * accelerating from zero velocity + * + * @param t - Time. + * + * @returns Value at time t. + */ + easeInQuad: function easeInQuad(t) { + return t * t; + }, + + /** + * decelerating to zero velocity + * + * @param t - Time. + * + * @returns Value at time t. + */ + easeOutQuad: function easeOutQuad(t) { + return t * (2 - t); + }, + + /** + * acceleration until halfway, then deceleration + * + * @param t - Time. + * + * @returns Value at time t. + */ + easeInOutQuad: function easeInOutQuad(t) { + return t < 0.5 ? 2 * t * t : -1 + (4 - 2 * t) * t; + }, + + /** + * accelerating from zero velocity + * + * @param t - Time. + * + * @returns Value at time t. + */ + easeInCubic: function easeInCubic(t) { + return t * t * t; + }, + + /** + * decelerating to zero velocity + * + * @param t - Time. + * + * @returns Value at time t. + */ + easeOutCubic: function easeOutCubic(t) { + return --t * t * t + 1; + }, + + /** + * acceleration until halfway, then deceleration + * + * @param t - Time. + * + * @returns Value at time t. + */ + easeInOutCubic: function easeInOutCubic(t) { + return t < 0.5 ? 4 * t * t * t : (t - 1) * (2 * t - 2) * (2 * t - 2) + 1; + }, + + /** + * accelerating from zero velocity + * + * @param t - Time. + * + * @returns Value at time t. + */ + easeInQuart: function easeInQuart(t) { + return t * t * t * t; + }, + + /** + * decelerating to zero velocity + * + * @param t - Time. + * + * @returns Value at time t. + */ + easeOutQuart: function easeOutQuart(t) { + return 1 - --t * t * t * t; + }, + + /** + * acceleration until halfway, then deceleration + * + * @param t - Time. + * + * @returns Value at time t. + */ + easeInOutQuart: function easeInOutQuart(t) { + return t < 0.5 ? 8 * t * t * t * t : 1 - 8 * --t * t * t * t; + }, + + /** + * accelerating from zero velocity + * + * @param t - Time. + * + * @returns Value at time t. + */ + easeInQuint: function easeInQuint(t) { + return t * t * t * t * t; + }, + + /** + * decelerating to zero velocity + * + * @param t - Time. + * + * @returns Value at time t. + */ + easeOutQuint: function easeOutQuint(t) { + return 1 + --t * t * t * t * t; + }, + + /** + * acceleration until halfway, then deceleration + * + * @param t - Time. + * + * @returns Value at time t. + */ + easeInOutQuint: function easeInOutQuint(t) { + return t < 0.5 ? 16 * t * t * t * t * t : 1 + 16 * --t * t * t * t * t; + } +}; +/** + * Experimentaly compute the width of the scrollbar for this browser. + * + * @returns The width in pixels. + */ + +function getScrollBarWidth() { + var inner = document.createElement("p"); + inner.style.width = "100%"; + inner.style.height = "200px"; + var outer = document.createElement("div"); + outer.style.position = "absolute"; + outer.style.top = "0px"; + outer.style.left = "0px"; + outer.style.visibility = "hidden"; + outer.style.width = "200px"; + outer.style.height = "150px"; + outer.style.overflow = "hidden"; + outer.appendChild(inner); + document.body.appendChild(outer); + var w1 = inner.offsetWidth; + outer.style.overflow = "scroll"; + var w2 = inner.offsetWidth; + + if (w1 == w2) { + w2 = outer.clientWidth; + } + + document.body.removeChild(outer); + return w1 - w2; +} // @TODO: This doesn't work properly. +// It works only for single property objects, +// otherwise it combines all of the types in a union. +// export function topMost ( +// pile: Record[], +// accessors: K1 | [K1] +// ): undefined | V1 +// export function topMost ( +// pile: Record>[], +// accessors: [K1, K2] +// ): undefined | V1 | V2 +// export function topMost ( +// pile: Record>>[], +// accessors: [K1, K2, K3] +// ): undefined | V1 | V2 | V3 + +/** + * Get the top most property value from a pile of objects. + * + * @param pile - Array of objects, no required format. + * @param accessors - Array of property names (e.g. object['foo']['bar'] → ['foo', 'bar']). + * + * @returns Value of the property with given accessors path from the first pile item where it's not undefined. + */ + + +function topMost(pile, accessors) { + var candidate; + + if (!Array.isArray(accessors)) { + accessors = [accessors]; + } + + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = undefined; + + try { + for (var _iterator = pile[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var member = _step.value; + + if (member) { + candidate = member[accessors[0]]; + + for (var i = 1; i < accessors.length; i++) { + if (candidate) { + candidate = candidate[accessors[i]]; + } + } + + if (typeof candidate !== "undefined") { + break; + } + } + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator.return != null) { + _iterator.return(); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } + } + + return candidate; +} + +var util = +/*#__PURE__*/ +Object.freeze({ + isNumber: isNumber, + recursiveDOMDelete: recursiveDOMDelete, + isString: isString, + isObject: isObject, + isDate: isDate, + isMoment: isMoment, + fillIfDefined: fillIfDefined, + extend: extend, + selectiveExtend: selectiveExtend, + selectiveDeepExtend: selectiveDeepExtend, + selectiveNotDeepExtend: selectiveNotDeepExtend, + deepExtend: deepExtend, + equalArray: equalArray, + convert: convert, + getType: getType, + copyAndExtendArray: copyAndExtendArray, + copyArray: copyArray, + getAbsoluteLeft: getAbsoluteLeft, + getAbsoluteRight: getAbsoluteRight, + getAbsoluteTop: getAbsoluteTop, + addClassName: addClassName, + removeClassName: removeClassName, + forEach: forEach, + toArray: toArray, + updateProperty: updateProperty, + throttle: throttle, + addEventListener: addEventListener, + removeEventListener: removeEventListener, + preventDefault: preventDefault, + getTarget: getTarget, + hasParent: hasParent, + option: option, + hexToRGB: hexToRGB, + overrideOpacity: overrideOpacity, + RGBToHex: RGBToHex, + parseColor: parseColor, + RGBToHSV: RGBToHSV, + addCssText: addCssText, + removeCssText: removeCssText, + HSVToRGB: HSVToRGB, + HSVToHex: HSVToHex, + hexToHSV: hexToHSV, + isValidHex: isValidHex, + isValidRGB: isValidRGB, + isValidRGBA: isValidRGBA, + selectiveBridgeObject: selectiveBridgeObject, + bridgeObject: bridgeObject, + insertSort: insertSort, + mergeOptions: mergeOptions, + binarySearchCustom: binarySearchCustom, + binarySearchValue: binarySearchValue, + easingFunctions: easingFunctions, + getScrollBarWidth: getScrollBarWidth, + topMost: topMost, + randomUUID: uuid4 +}); // New API (tree shakeable). + +var esm = /*#__PURE__*/Object.freeze({ + 'default': util, + HSVToHex: HSVToHex, + HSVToRGB: HSVToRGB, + RGBToHSV: RGBToHSV, + RGBToHex: RGBToHex, + addClassName: addClassName, + addCssText: addCssText, + addEventListener: addEventListener, + binarySearchCustom: binarySearchCustom, + binarySearchValue: binarySearchValue, + bridgeObject: bridgeObject, + convert: convert, + copyAndExtendArray: copyAndExtendArray, + copyArray: copyArray, + deepExtend: deepExtend, + easingFunctions: easingFunctions, + equalArray: equalArray, + extend: extend, + fillIfDefined: fillIfDefined, + forEach: forEach, + getAbsoluteLeft: getAbsoluteLeft, + getAbsoluteRight: getAbsoluteRight, + getAbsoluteTop: getAbsoluteTop, + getScrollBarWidth: getScrollBarWidth, + getTarget: getTarget, + getType: getType, + hasParent: hasParent, + hexToHSV: hexToHSV, + hexToRGB: hexToRGB, + insertSort: insertSort, + isDate: isDate, + isMoment: isMoment, + isNumber: isNumber, + isObject: isObject, + isString: isString, + isValidHex: isValidHex, + isValidRGB: isValidRGB, + isValidRGBA: isValidRGBA, + mergeOptions: mergeOptions, + option: option, + overrideOpacity: overrideOpacity, + parseColor: parseColor, + preventDefault: preventDefault, + randomUUID: uuid4, + recursiveDOMDelete: recursiveDOMDelete, + removeClassName: removeClassName, + removeCssText: removeCssText, + removeEventListener: removeEventListener, + selectiveBridgeObject: selectiveBridgeObject, + selectiveDeepExtend: selectiveDeepExtend, + selectiveExtend: selectiveExtend, + selectiveNotDeepExtend: selectiveNotDeepExtend, + throttle: throttle, + toArray: toArray, + topMost: topMost, + updateProperty: updateProperty +}); + +/** + * vis-data - data + * http://visjs.org/ + * + * Manage unstructured data using DataSet. Add, update, and remove data, and listen for changes in the data. + * + * @version 6.1.0 + * @date 2019-07-16T13:37:00Z + * + * @copyright (c) 2011-2017 Almende B.V, http://almende.com + * @copyright (c) 2018-2019 visjs contributors, https://github.com/visjs + * + * @license + * vis.js is dual licensed under both + * + * 1. The Apache 2.0 License + * http://www.apache.org/licenses/LICENSE-2.0 + * + * and + * + * 2. The MIT License + * http://opensource.org/licenses/MIT + * + * vis.js may be distributed under either license. + */ +function _defineProperty$1(obj, key, value) { + if (key in obj) { + Object.defineProperty(obj, key, { + value: value, + enumerable: true, + configurable: true, + writable: true + }); + } else { + obj[key] = value; + } + + return obj; +} + +var defineProperty$1 = _defineProperty$1; + +function createCommonjsModule$1(fn, module) { + return module = { + exports: {} + }, fn(module, module.exports), module.exports; +} + +var _typeof_1 = createCommonjsModule$1(function (module) { + function _typeof2(obj) { + if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { + _typeof2 = function _typeof2(obj) { + return typeof obj; + }; + } else { + _typeof2 = function _typeof2(obj) { + return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; + }; + } + + return _typeof2(obj); + } + + function _typeof(obj) { + if (typeof Symbol === "function" && _typeof2(Symbol.iterator) === "symbol") { + module.exports = _typeof = function _typeof(obj) { + return _typeof2(obj); + }; + } else { + module.exports = _typeof = function _typeof(obj) { + return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : _typeof2(obj); + }; + } + + return _typeof(obj); + } + + module.exports = _typeof; +}); + +function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } +} + +var classCallCheck = _classCallCheck; + +function _defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } +} + +function _createClass(Constructor, protoProps, staticProps) { + if (protoProps) _defineProperties(Constructor.prototype, protoProps); + if (staticProps) _defineProperties(Constructor, staticProps); + return Constructor; +} + +var createClass = _createClass; + +function _assertThisInitialized(self) { + if (self === void 0) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + + return self; +} + +var assertThisInitialized = _assertThisInitialized; + +function _possibleConstructorReturn(self, call) { + if (call && (_typeof_1(call) === "object" || typeof call === "function")) { + return call; + } + + return assertThisInitialized(self); +} + +var possibleConstructorReturn = _possibleConstructorReturn; +var getPrototypeOf = createCommonjsModule$1(function (module) { + function _getPrototypeOf(o) { + module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { + return o.__proto__ || Object.getPrototypeOf(o); + }; + return _getPrototypeOf(o); + } + + module.exports = _getPrototypeOf; +}); +var setPrototypeOf$1 = createCommonjsModule$1(function (module) { + function _setPrototypeOf(o, p) { + module.exports = _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { + o.__proto__ = p; + return o; + }; + + return _setPrototypeOf(o, p); + } + + module.exports = _setPrototypeOf; +}); + +function _inherits(subClass, superClass) { + if (typeof superClass !== "function" && superClass !== null) { + throw new TypeError("Super expression must either be null or a function"); + } + + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + writable: true, + configurable: true + } + }); + if (superClass) setPrototypeOf$1(subClass, superClass); +} + +var inherits = _inherits; // Maps for number <-> hex string conversion + +var byteToHex$2 = []; + +for (var i$2 = 0; i$2 < 256; i$2++) { + byteToHex$2[i$2] = (i$2 + 0x100).toString(16).substr(1); +} +/** + * Represent binary UUID into it's string representation. + * + * @param buf - Buffer containing UUID bytes. + * @param offset - Offset from the start of the buffer where the UUID is saved (not needed if the buffer starts with the UUID). + * + * @returns String representation of the UUID. + */ + + +function stringifyUUID$1(buf, offset) { + var i = offset || 0; + var bth = byteToHex$2; + return bth[buf[i++]] + bth[buf[i++]] + bth[buf[i++]] + bth[buf[i++]] + '-' + bth[buf[i++]] + bth[buf[i++]] + '-' + bth[buf[i++]] + bth[buf[i++]] + '-' + bth[buf[i++]] + bth[buf[i++]] + '-' + bth[buf[i++]] + bth[buf[i++]] + bth[buf[i++]] + bth[buf[i++]] + bth[buf[i++]] + bth[buf[i++]]; +} +/** + * Generate 16 random bytes to be used as a base for UUID. + * + * @ignore + */ + + +var random$1 = function () { + if (typeof crypto !== 'undefined' && crypto.getRandomValues) { + // WHATWG crypto-based RNG - http://wiki.whatwg.org/wiki/Crypto + // Moderately fast, high quality + var _rnds8 = new Uint8Array(16); + + return function whatwgRNG() { + crypto.getRandomValues(_rnds8); + return _rnds8; + }; + } // Math.random()-based (RNG) + // + // If all else fails, use Math.random(). + // It's fast, but is of unspecified quality. + + + var _rnds = new Array(16); + + return function () { + for (var i = 0, r; i < 16; i++) { + if ((i & 0x03) === 0) { + r = Math.random() * 0x100000000; + } + + _rnds[i] = r >>> ((i & 0x03) << 3) & 0xff; + } + + return _rnds; + }; // uuid.js + // + // Copyright (c) 2010-2012 Robert Kieffer + // MIT License - http://opensource.org/licenses/mit-license.php + // Unique ID creation requires a high quality random # generator. We feature + // detect to determine the best RNG source, normalizing to a function that + // returns 128-bits of randomness, since that's what's usually required + // return require('./rng'); +}(); + +var byteToHex$1$1 = []; + +for (var i$1$2 = 0; i$1$2 < 256; i$1$2++) { + byteToHex$1$1[i$1$2] = (i$1$2 + 0x100).toString(16).substr(1); +} // **`v1()` - Generate time-based UUID** +// +// Inspired by https://github.com/LiosK/UUID.js +// and http://docs.python.org/library/uuid.html +// random #'s we need to init node and clockseq + + +var seedBytes$1 = random$1(); // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1) + +var defaultNodeId$1 = [seedBytes$1[0] | 0x01, seedBytes$1[1], seedBytes$1[2], seedBytes$1[3], seedBytes$1[4], seedBytes$1[5]]; // Per 4.2.2, randomize (14 bit) clockseq + +var defaultClockseq$1 = (seedBytes$1[6] << 8 | seedBytes$1[7]) & 0x3fff; // Previous uuid creation time + +/** + * UUIDv4 options. + */ + +/** + * Generate UUIDv4 + * + * @param options - Options to be used instead of default generated values. + * String 'binary' is a shorthand for uuid4({}, new Array(16)). + * @param buf - If present the buffer will be filled with the generated UUID. + * @param offset - Offset of the UUID from the start of the buffer. + * + * @returns UUIDv4 + */ + +function uuid4$1() { + var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + var buf = arguments.length > 1 ? arguments[1] : undefined; + var offset = arguments.length > 2 ? arguments[2] : undefined; // Deprecated - 'format' argument, as supported in v1.2 + + var i = buf && offset || 0; + + if (typeof options === 'string') { + buf = options === 'binary' ? new Array(16) : undefined; + options = {}; + } + + var rnds = options.random || (options.rng || random$1)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved` + + rnds[6] = rnds[6] & 0x0f | 0x40; + rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided + + if (buf) { + for (var ii = 0; ii < 16; ii++) { + buf[i + ii] = rnds[ii]; + } + } + + return buf || stringifyUUID$1(rnds); +} // Rollup will complain about mixing default and named exports in UMD build, + + +function _typeof$1(obj) { + if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { + _typeof$1 = function (obj) { + return typeof obj; + }; + } else { + _typeof$1 = function (obj) { + return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; + }; + } + + return _typeof$1(obj); +} + +var commonjsGlobal$1 = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; + +function commonjsRequire$1() { + throw new Error('Dynamic requires are not currently supported by rollup-plugin-commonjs'); +} + +function createCommonjsModule$1$1(fn, module) { + return module = { + exports: {} + }, fn(module, module.exports), module.exports; +} + +var moment$1 = createCommonjsModule$1$1(function (module, exports) { + (function (global, factory) { + module.exports = factory(); + })(commonjsGlobal$1, function () { + var hookCallback; + + function hooks() { + return hookCallback.apply(null, arguments); + } // This is done to register the method called with moment() + // without creating circular dependencies. + + + function setHookCallback(callback) { + hookCallback = callback; + } + + function isArray(input) { + return input instanceof Array || Object.prototype.toString.call(input) === '[object Array]'; + } + + function isObject(input) { + // IE8 will treat undefined and null as object if it wasn't for + // input != null + return input != null && Object.prototype.toString.call(input) === '[object Object]'; + } + + function isObjectEmpty(obj) { + if (Object.getOwnPropertyNames) { + return Object.getOwnPropertyNames(obj).length === 0; + } else { + var k; + + for (k in obj) { + if (obj.hasOwnProperty(k)) { + return false; + } + } + + return true; + } + } + + function isUndefined(input) { + return input === void 0; + } + + function isNumber(input) { + return typeof input === 'number' || Object.prototype.toString.call(input) === '[object Number]'; + } + + function isDate(input) { + return input instanceof Date || Object.prototype.toString.call(input) === '[object Date]'; + } + + function map(arr, fn) { + var res = [], + i; + + for (i = 0; i < arr.length; ++i) { + res.push(fn(arr[i], i)); + } + + return res; + } + + function hasOwnProp(a, b) { + return Object.prototype.hasOwnProperty.call(a, b); + } + + function extend(a, b) { + for (var i in b) { + if (hasOwnProp(b, i)) { + a[i] = b[i]; + } + } + + if (hasOwnProp(b, 'toString')) { + a.toString = b.toString; + } + + if (hasOwnProp(b, 'valueOf')) { + a.valueOf = b.valueOf; + } + + return a; + } + + function createUTC(input, format, locale, strict) { + return createLocalOrUTC(input, format, locale, strict, true).utc(); + } + + function defaultParsingFlags() { + // We need to deep clone this object. + return { + empty: false, + unusedTokens: [], + unusedInput: [], + overflow: -2, + charsLeftOver: 0, + nullInput: false, + invalidMonth: null, + invalidFormat: false, + userInvalidated: false, + iso: false, + parsedDateParts: [], + meridiem: null, + rfc2822: false, + weekdayMismatch: false + }; + } + + function getParsingFlags(m) { + if (m._pf == null) { + m._pf = defaultParsingFlags(); + } + + return m._pf; + } + + var some; + + if (Array.prototype.some) { + some = Array.prototype.some; + } else { + some = function (fun) { + var t = Object(this); + var len = t.length >>> 0; + + for (var i = 0; i < len; i++) { + if (i in t && fun.call(this, t[i], i, t)) { + return true; + } + } + + return false; + }; + } + + function isValid(m) { + if (m._isValid == null) { + var flags = getParsingFlags(m); + var parsedParts = some.call(flags.parsedDateParts, function (i) { + return i != null; + }); + var isNowValid = !isNaN(m._d.getTime()) && flags.overflow < 0 && !flags.empty && !flags.invalidMonth && !flags.invalidWeekday && !flags.weekdayMismatch && !flags.nullInput && !flags.invalidFormat && !flags.userInvalidated && (!flags.meridiem || flags.meridiem && parsedParts); + + if (m._strict) { + isNowValid = isNowValid && flags.charsLeftOver === 0 && flags.unusedTokens.length === 0 && flags.bigHour === undefined; + } + + if (Object.isFrozen == null || !Object.isFrozen(m)) { + m._isValid = isNowValid; + } else { + return isNowValid; + } + } + + return m._isValid; + } + + function createInvalid(flags) { + var m = createUTC(NaN); + + if (flags != null) { + extend(getParsingFlags(m), flags); + } else { + getParsingFlags(m).userInvalidated = true; + } + + return m; + } // Plugins that add properties should also add the key here (null value), + // so we can properly clone ourselves. + + + var momentProperties = hooks.momentProperties = []; + + function copyConfig(to, from) { + var i, prop, val; + + if (!isUndefined(from._isAMomentObject)) { + to._isAMomentObject = from._isAMomentObject; + } + + if (!isUndefined(from._i)) { + to._i = from._i; + } + + if (!isUndefined(from._f)) { + to._f = from._f; + } + + if (!isUndefined(from._l)) { + to._l = from._l; + } + + if (!isUndefined(from._strict)) { + to._strict = from._strict; + } + + if (!isUndefined(from._tzm)) { + to._tzm = from._tzm; + } + + if (!isUndefined(from._isUTC)) { + to._isUTC = from._isUTC; + } + + if (!isUndefined(from._offset)) { + to._offset = from._offset; + } + + if (!isUndefined(from._pf)) { + to._pf = getParsingFlags(from); + } + + if (!isUndefined(from._locale)) { + to._locale = from._locale; + } + + if (momentProperties.length > 0) { + for (i = 0; i < momentProperties.length; i++) { + prop = momentProperties[i]; + val = from[prop]; + + if (!isUndefined(val)) { + to[prop] = val; + } + } + } + + return to; + } + + var updateInProgress = false; // Moment prototype object + + function Moment(config) { + copyConfig(this, config); + this._d = new Date(config._d != null ? config._d.getTime() : NaN); + + if (!this.isValid()) { + this._d = new Date(NaN); + } // Prevent infinite loop in case updateOffset creates new moment + // objects. + + + if (updateInProgress === false) { + updateInProgress = true; + hooks.updateOffset(this); + updateInProgress = false; + } + } + + function isMoment(obj) { + return obj instanceof Moment || obj != null && obj._isAMomentObject != null; + } + + function absFloor(number) { + if (number < 0) { + // -0 -> 0 + return Math.ceil(number) || 0; + } else { + return Math.floor(number); + } + } + + function toInt(argumentForCoercion) { + var coercedNumber = +argumentForCoercion, + value = 0; + + if (coercedNumber !== 0 && isFinite(coercedNumber)) { + value = absFloor(coercedNumber); + } + + return value; + } // compare two arrays, return the number of differences + + + function compareArrays(array1, array2, dontConvert) { + var len = Math.min(array1.length, array2.length), + lengthDiff = Math.abs(array1.length - array2.length), + diffs = 0, + i; + + for (i = 0; i < len; i++) { + if (dontConvert && array1[i] !== array2[i] || !dontConvert && toInt(array1[i]) !== toInt(array2[i])) { + diffs++; + } + } + + return diffs + lengthDiff; + } + + function warn(msg) { + if (hooks.suppressDeprecationWarnings === false && typeof console !== 'undefined' && console.warn) { + console.warn('Deprecation warning: ' + msg); + } + } + + function deprecate(msg, fn) { + var firstTime = true; + return extend(function () { + if (hooks.deprecationHandler != null) { + hooks.deprecationHandler(null, msg); + } + + if (firstTime) { + var args = []; + var arg; + + for (var i = 0; i < arguments.length; i++) { + arg = ''; + + if (typeof arguments[i] === 'object') { + arg += '\n[' + i + '] '; + + for (var key in arguments[0]) { + arg += key + ': ' + arguments[0][key] + ', '; + } + + arg = arg.slice(0, -2); // Remove trailing comma and space + } else { + arg = arguments[i]; + } + + args.push(arg); + } + + warn(msg + '\nArguments: ' + Array.prototype.slice.call(args).join('') + '\n' + new Error().stack); + firstTime = false; + } + + return fn.apply(this, arguments); + }, fn); + } + + var deprecations = {}; + + function deprecateSimple(name, msg) { + if (hooks.deprecationHandler != null) { + hooks.deprecationHandler(name, msg); + } + + if (!deprecations[name]) { + warn(msg); + deprecations[name] = true; + } + } + + hooks.suppressDeprecationWarnings = false; + hooks.deprecationHandler = null; + + function isFunction(input) { + return input instanceof Function || Object.prototype.toString.call(input) === '[object Function]'; + } + + function set(config) { + var prop, i; + + for (i in config) { + prop = config[i]; + + if (isFunction(prop)) { + this[i] = prop; + } else { + this['_' + i] = prop; + } + } + + this._config = config; // Lenient ordinal parsing accepts just a number in addition to + // number + (possibly) stuff coming from _dayOfMonthOrdinalParse. + // TODO: Remove "ordinalParse" fallback in next major release. + + this._dayOfMonthOrdinalParseLenient = new RegExp((this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) + '|' + /\d{1,2}/.source); + } + + function mergeConfigs(parentConfig, childConfig) { + var res = extend({}, parentConfig), + prop; + + for (prop in childConfig) { + if (hasOwnProp(childConfig, prop)) { + if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) { + res[prop] = {}; + extend(res[prop], parentConfig[prop]); + extend(res[prop], childConfig[prop]); + } else if (childConfig[prop] != null) { + res[prop] = childConfig[prop]; + } else { + delete res[prop]; + } + } + } + + for (prop in parentConfig) { + if (hasOwnProp(parentConfig, prop) && !hasOwnProp(childConfig, prop) && isObject(parentConfig[prop])) { + // make sure changes to properties don't modify parent config + res[prop] = extend({}, res[prop]); + } + } + + return res; + } + + function Locale(config) { + if (config != null) { + this.set(config); + } + } + + var keys; + + if (Object.keys) { + keys = Object.keys; + } else { + keys = function (obj) { + var i, + res = []; + + for (i in obj) { + if (hasOwnProp(obj, i)) { + res.push(i); + } + } + + return res; + }; + } + + var defaultCalendar = { + sameDay: '[Today at] LT', + nextDay: '[Tomorrow at] LT', + nextWeek: 'dddd [at] LT', + lastDay: '[Yesterday at] LT', + lastWeek: '[Last] dddd [at] LT', + sameElse: 'L' + }; + + function calendar(key, mom, now) { + var output = this._calendar[key] || this._calendar['sameElse']; + return isFunction(output) ? output.call(mom, now) : output; + } + + var defaultLongDateFormat = { + LTS: 'h:mm:ss A', + LT: 'h:mm A', + L: 'MM/DD/YYYY', + LL: 'MMMM D, YYYY', + LLL: 'MMMM D, YYYY h:mm A', + LLLL: 'dddd, MMMM D, YYYY h:mm A' + }; + + function longDateFormat(key) { + var format = this._longDateFormat[key], + formatUpper = this._longDateFormat[key.toUpperCase()]; + + if (format || !formatUpper) { + return format; + } + + this._longDateFormat[key] = formatUpper.replace(/MMMM|MM|DD|dddd/g, function (val) { + return val.slice(1); + }); + return this._longDateFormat[key]; + } + + var defaultInvalidDate = 'Invalid date'; + + function invalidDate() { + return this._invalidDate; + } + + var defaultOrdinal = '%d'; + var defaultDayOfMonthOrdinalParse = /\d{1,2}/; + + function ordinal(number) { + return this._ordinal.replace('%d', number); + } + + var defaultRelativeTime = { + future: 'in %s', + past: '%s ago', + s: 'a few seconds', + ss: '%d seconds', + m: 'a minute', + mm: '%d minutes', + h: 'an hour', + hh: '%d hours', + d: 'a day', + dd: '%d days', + M: 'a month', + MM: '%d months', + y: 'a year', + yy: '%d years' + }; + + function relativeTime(number, withoutSuffix, string, isFuture) { + var output = this._relativeTime[string]; + return isFunction(output) ? output(number, withoutSuffix, string, isFuture) : output.replace(/%d/i, number); + } + + function pastFuture(diff, output) { + var format = this._relativeTime[diff > 0 ? 'future' : 'past']; + return isFunction(format) ? format(output) : format.replace(/%s/i, output); + } + + var aliases = {}; + + function addUnitAlias(unit, shorthand) { + var lowerCase = unit.toLowerCase(); + aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit; + } + + function normalizeUnits(units) { + return typeof units === 'string' ? aliases[units] || aliases[units.toLowerCase()] : undefined; + } + + function normalizeObjectUnits(inputObject) { + var normalizedInput = {}, + normalizedProp, + prop; + + for (prop in inputObject) { + if (hasOwnProp(inputObject, prop)) { + normalizedProp = normalizeUnits(prop); + + if (normalizedProp) { + normalizedInput[normalizedProp] = inputObject[prop]; + } + } + } + + return normalizedInput; + } + + var priorities = {}; + + function addUnitPriority(unit, priority) { + priorities[unit] = priority; + } + + function getPrioritizedUnits(unitsObj) { + var units = []; + + for (var u in unitsObj) { + units.push({ + unit: u, + priority: priorities[u] + }); + } + + units.sort(function (a, b) { + return a.priority - b.priority; + }); + return units; + } + + function zeroFill(number, targetLength, forceSign) { + var absNumber = '' + Math.abs(number), + zerosToFill = targetLength - absNumber.length, + sign = number >= 0; + return (sign ? forceSign ? '+' : '' : '-') + Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) + absNumber; + } + + var formattingTokens = /(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g; + var localFormattingTokens = /(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g; + var formatFunctions = {}; + var formatTokenFunctions = {}; // token: 'M' + // padded: ['MM', 2] + // ordinal: 'Mo' + // callback: function () { this.month() + 1 } + + function addFormatToken(token, padded, ordinal, callback) { + var func = callback; + + if (typeof callback === 'string') { + func = function () { + return this[callback](); + }; + } + + if (token) { + formatTokenFunctions[token] = func; + } + + if (padded) { + formatTokenFunctions[padded[0]] = function () { + return zeroFill(func.apply(this, arguments), padded[1], padded[2]); + }; + } + + if (ordinal) { + formatTokenFunctions[ordinal] = function () { + return this.localeData().ordinal(func.apply(this, arguments), token); + }; + } + } + + function removeFormattingTokens(input) { + if (input.match(/\[[\s\S]/)) { + return input.replace(/^\[|\]$/g, ''); + } + + return input.replace(/\\/g, ''); + } + + function makeFormatFunction(format) { + var array = format.match(formattingTokens), + i, + length; + + for (i = 0, length = array.length; i < length; i++) { + if (formatTokenFunctions[array[i]]) { + array[i] = formatTokenFunctions[array[i]]; + } else { + array[i] = removeFormattingTokens(array[i]); + } + } + + return function (mom) { + var output = '', + i; + + for (i = 0; i < length; i++) { + output += isFunction(array[i]) ? array[i].call(mom, format) : array[i]; + } + + return output; + }; + } // format date using native date object + + + function formatMoment(m, format) { + if (!m.isValid()) { + return m.localeData().invalidDate(); + } + + format = expandFormat(format, m.localeData()); + formatFunctions[format] = formatFunctions[format] || makeFormatFunction(format); + return formatFunctions[format](m); + } + + function expandFormat(format, locale) { + var i = 5; + + function replaceLongDateFormatTokens(input) { + return locale.longDateFormat(input) || input; + } + + localFormattingTokens.lastIndex = 0; + + while (i >= 0 && localFormattingTokens.test(format)) { + format = format.replace(localFormattingTokens, replaceLongDateFormatTokens); + localFormattingTokens.lastIndex = 0; + i -= 1; + } + + return format; + } + + var match1 = /\d/; // 0 - 9 + + var match2 = /\d\d/; // 00 - 99 + + var match3 = /\d{3}/; // 000 - 999 + + var match4 = /\d{4}/; // 0000 - 9999 + + var match6 = /[+-]?\d{6}/; // -999999 - 999999 + + var match1to2 = /\d\d?/; // 0 - 99 + + var match3to4 = /\d\d\d\d?/; // 999 - 9999 + + var match5to6 = /\d\d\d\d\d\d?/; // 99999 - 999999 + + var match1to3 = /\d{1,3}/; // 0 - 999 + + var match1to4 = /\d{1,4}/; // 0 - 9999 + + var match1to6 = /[+-]?\d{1,6}/; // -999999 - 999999 + + var matchUnsigned = /\d+/; // 0 - inf + + var matchSigned = /[+-]?\d+/; // -inf - inf + + var matchOffset = /Z|[+-]\d\d:?\d\d/gi; // +00:00 -00:00 +0000 -0000 or Z + + var matchShortOffset = /Z|[+-]\d\d(?::?\d\d)?/gi; // +00 -00 +00:00 -00:00 +0000 -0000 or Z + + var matchTimestamp = /[+-]?\d+(\.\d{1,3})?/; // 123456789 123456789.123 + // any word (or two) characters or numbers including two/three word month in arabic. + // includes scottish gaelic two word and hyphenated months + + var matchWord = /[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i; + var regexes = {}; + + function addRegexToken(token, regex, strictRegex) { + regexes[token] = isFunction(regex) ? regex : function (isStrict, localeData) { + return isStrict && strictRegex ? strictRegex : regex; + }; + } + + function getParseRegexForToken(token, config) { + if (!hasOwnProp(regexes, token)) { + return new RegExp(unescapeFormat(token)); + } + + return regexes[token](config._strict, config._locale); + } // Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript + + + function unescapeFormat(s) { + return regexEscape(s.replace('\\', '').replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g, function (matched, p1, p2, p3, p4) { + return p1 || p2 || p3 || p4; + })); + } + + function regexEscape(s) { + return s.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&'); + } + + var tokens = {}; + + function addParseToken(token, callback) { + var i, + func = callback; + + if (typeof token === 'string') { + token = [token]; + } + + if (isNumber(callback)) { + func = function (input, array) { + array[callback] = toInt(input); + }; + } + + for (i = 0; i < token.length; i++) { + tokens[token[i]] = func; + } + } + + function addWeekParseToken(token, callback) { + addParseToken(token, function (input, array, config, token) { + config._w = config._w || {}; + callback(input, config._w, config, token); + }); + } + + function addTimeToArrayFromToken(token, input, config) { + if (input != null && hasOwnProp(tokens, token)) { + tokens[token](input, config._a, config, token); + } + } + + var YEAR = 0; + var MONTH = 1; + var DATE = 2; + var HOUR = 3; + var MINUTE = 4; + var SECOND = 5; + var MILLISECOND = 6; + var WEEK = 7; + var WEEKDAY = 8; // FORMATTING + + addFormatToken('Y', 0, 0, function () { + var y = this.year(); + return y <= 9999 ? '' + y : '+' + y; + }); + addFormatToken(0, ['YY', 2], 0, function () { + return this.year() % 100; + }); + addFormatToken(0, ['YYYY', 4], 0, 'year'); + addFormatToken(0, ['YYYYY', 5], 0, 'year'); + addFormatToken(0, ['YYYYYY', 6, true], 0, 'year'); // ALIASES + + addUnitAlias('year', 'y'); // PRIORITIES + + addUnitPriority('year', 1); // PARSING + + addRegexToken('Y', matchSigned); + addRegexToken('YY', match1to2, match2); + addRegexToken('YYYY', match1to4, match4); + addRegexToken('YYYYY', match1to6, match6); + addRegexToken('YYYYYY', match1to6, match6); + addParseToken(['YYYYY', 'YYYYYY'], YEAR); + addParseToken('YYYY', function (input, array) { + array[YEAR] = input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input); + }); + addParseToken('YY', function (input, array) { + array[YEAR] = hooks.parseTwoDigitYear(input); + }); + addParseToken('Y', function (input, array) { + array[YEAR] = parseInt(input, 10); + }); // HELPERS + + function daysInYear(year) { + return isLeapYear(year) ? 366 : 365; + } + + function isLeapYear(year) { + return year % 4 === 0 && year % 100 !== 0 || year % 400 === 0; + } // HOOKS + + + hooks.parseTwoDigitYear = function (input) { + return toInt(input) + (toInt(input) > 68 ? 1900 : 2000); + }; // MOMENTS + + + var getSetYear = makeGetSet('FullYear', true); + + function getIsLeapYear() { + return isLeapYear(this.year()); + } + + function makeGetSet(unit, keepTime) { + return function (value) { + if (value != null) { + set$1(this, unit, value); + hooks.updateOffset(this, keepTime); + return this; + } else { + return get(this, unit); + } + }; + } + + function get(mom, unit) { + return mom.isValid() ? mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]() : NaN; + } + + function set$1(mom, unit, value) { + if (mom.isValid() && !isNaN(value)) { + if (unit === 'FullYear' && isLeapYear(mom.year()) && mom.month() === 1 && mom.date() === 29) { + mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value, mom.month(), daysInMonth(value, mom.month())); + } else { + mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value); + } + } + } // MOMENTS + + + function stringGet(units) { + units = normalizeUnits(units); + + if (isFunction(this[units])) { + return this[units](); + } + + return this; + } + + function stringSet(units, value) { + if (typeof units === 'object') { + units = normalizeObjectUnits(units); + var prioritized = getPrioritizedUnits(units); + + for (var i = 0; i < prioritized.length; i++) { + this[prioritized[i].unit](units[prioritized[i].unit]); + } + } else { + units = normalizeUnits(units); + + if (isFunction(this[units])) { + return this[units](value); + } + } + + return this; + } + + function mod(n, x) { + return (n % x + x) % x; + } + + var indexOf; + + if (Array.prototype.indexOf) { + indexOf = Array.prototype.indexOf; + } else { + indexOf = function (o) { + // I know + var i; + + for (i = 0; i < this.length; ++i) { + if (this[i] === o) { + return i; + } + } + + return -1; + }; + } + + function daysInMonth(year, month) { + if (isNaN(year) || isNaN(month)) { + return NaN; + } + + var modMonth = mod(month, 12); + year += (month - modMonth) / 12; + return modMonth === 1 ? isLeapYear(year) ? 29 : 28 : 31 - modMonth % 7 % 2; + } // FORMATTING + + + addFormatToken('M', ['MM', 2], 'Mo', function () { + return this.month() + 1; + }); + addFormatToken('MMM', 0, 0, function (format) { + return this.localeData().monthsShort(this, format); + }); + addFormatToken('MMMM', 0, 0, function (format) { + return this.localeData().months(this, format); + }); // ALIASES + + addUnitAlias('month', 'M'); // PRIORITY + + addUnitPriority('month', 8); // PARSING + + addRegexToken('M', match1to2); + addRegexToken('MM', match1to2, match2); + addRegexToken('MMM', function (isStrict, locale) { + return locale.monthsShortRegex(isStrict); + }); + addRegexToken('MMMM', function (isStrict, locale) { + return locale.monthsRegex(isStrict); + }); + addParseToken(['M', 'MM'], function (input, array) { + array[MONTH] = toInt(input) - 1; + }); + addParseToken(['MMM', 'MMMM'], function (input, array, config, token) { + var month = config._locale.monthsParse(input, token, config._strict); // if we didn't find a month name, mark the date as invalid. + + + if (month != null) { + array[MONTH] = month; + } else { + getParsingFlags(config).invalidMonth = input; + } + }); // LOCALES + + var MONTHS_IN_FORMAT = /D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/; + var defaultLocaleMonths = 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'); + + function localeMonths(m, format) { + if (!m) { + return isArray(this._months) ? this._months : this._months['standalone']; + } + + return isArray(this._months) ? this._months[m.month()] : this._months[(this._months.isFormat || MONTHS_IN_FORMAT).test(format) ? 'format' : 'standalone'][m.month()]; + } + + var defaultLocaleMonthsShort = 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'); + + function localeMonthsShort(m, format) { + if (!m) { + return isArray(this._monthsShort) ? this._monthsShort : this._monthsShort['standalone']; + } + + return isArray(this._monthsShort) ? this._monthsShort[m.month()] : this._monthsShort[MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'][m.month()]; + } + + function handleStrictParse(monthName, format, strict) { + var i, + ii, + mom, + llc = monthName.toLocaleLowerCase(); + + if (!this._monthsParse) { + // this is not used + this._monthsParse = []; + this._longMonthsParse = []; + this._shortMonthsParse = []; + + for (i = 0; i < 12; ++i) { + mom = createUTC([2000, i]); + this._shortMonthsParse[i] = this.monthsShort(mom, '').toLocaleLowerCase(); + this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase(); + } + } + + if (strict) { + if (format === 'MMM') { + ii = indexOf.call(this._shortMonthsParse, llc); + return ii !== -1 ? ii : null; + } else { + ii = indexOf.call(this._longMonthsParse, llc); + return ii !== -1 ? ii : null; + } + } else { + if (format === 'MMM') { + ii = indexOf.call(this._shortMonthsParse, llc); + + if (ii !== -1) { + return ii; + } + + ii = indexOf.call(this._longMonthsParse, llc); + return ii !== -1 ? ii : null; + } else { + ii = indexOf.call(this._longMonthsParse, llc); + + if (ii !== -1) { + return ii; + } + + ii = indexOf.call(this._shortMonthsParse, llc); + return ii !== -1 ? ii : null; + } + } + } + + function localeMonthsParse(monthName, format, strict) { + var i, mom, regex; + + if (this._monthsParseExact) { + return handleStrictParse.call(this, monthName, format, strict); + } + + if (!this._monthsParse) { + this._monthsParse = []; + this._longMonthsParse = []; + this._shortMonthsParse = []; + } // TODO: add sorting + // Sorting makes sure if one month (or abbr) is a prefix of another + // see sorting in computeMonthsParse + + + for (i = 0; i < 12; i++) { + // make the regex if we don't have it already + mom = createUTC([2000, i]); + + if (strict && !this._longMonthsParse[i]) { + this._longMonthsParse[i] = new RegExp('^' + this.months(mom, '').replace('.', '') + '$', 'i'); + this._shortMonthsParse[i] = new RegExp('^' + this.monthsShort(mom, '').replace('.', '') + '$', 'i'); + } + + if (!strict && !this._monthsParse[i]) { + regex = '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, ''); + this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i'); + } // test the regex + + + if (strict && format === 'MMMM' && this._longMonthsParse[i].test(monthName)) { + return i; + } else if (strict && format === 'MMM' && this._shortMonthsParse[i].test(monthName)) { + return i; + } else if (!strict && this._monthsParse[i].test(monthName)) { + return i; + } + } + } // MOMENTS + + + function setMonth(mom, value) { + var dayOfMonth; + + if (!mom.isValid()) { + // No op + return mom; + } + + if (typeof value === 'string') { + if (/^\d+$/.test(value)) { + value = toInt(value); + } else { + value = mom.localeData().monthsParse(value); // TODO: Another silent failure? + + if (!isNumber(value)) { + return mom; + } + } + } + + dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value)); + + mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth); + + return mom; + } + + function getSetMonth(value) { + if (value != null) { + setMonth(this, value); + hooks.updateOffset(this, true); + return this; + } else { + return get(this, 'Month'); + } + } + + function getDaysInMonth() { + return daysInMonth(this.year(), this.month()); + } + + var defaultMonthsShortRegex = matchWord; + + function monthsShortRegex(isStrict) { + if (this._monthsParseExact) { + if (!hasOwnProp(this, '_monthsRegex')) { + computeMonthsParse.call(this); + } + + if (isStrict) { + return this._monthsShortStrictRegex; + } else { + return this._monthsShortRegex; + } + } else { + if (!hasOwnProp(this, '_monthsShortRegex')) { + this._monthsShortRegex = defaultMonthsShortRegex; + } + + return this._monthsShortStrictRegex && isStrict ? this._monthsShortStrictRegex : this._monthsShortRegex; + } + } + + var defaultMonthsRegex = matchWord; + + function monthsRegex(isStrict) { + if (this._monthsParseExact) { + if (!hasOwnProp(this, '_monthsRegex')) { + computeMonthsParse.call(this); + } + + if (isStrict) { + return this._monthsStrictRegex; + } else { + return this._monthsRegex; + } + } else { + if (!hasOwnProp(this, '_monthsRegex')) { + this._monthsRegex = defaultMonthsRegex; + } + + return this._monthsStrictRegex && isStrict ? this._monthsStrictRegex : this._monthsRegex; + } + } + + function computeMonthsParse() { + function cmpLenRev(a, b) { + return b.length - a.length; + } + + var shortPieces = [], + longPieces = [], + mixedPieces = [], + i, + mom; + + for (i = 0; i < 12; i++) { + // make the regex if we don't have it already + mom = createUTC([2000, i]); + shortPieces.push(this.monthsShort(mom, '')); + longPieces.push(this.months(mom, '')); + mixedPieces.push(this.months(mom, '')); + mixedPieces.push(this.monthsShort(mom, '')); + } // Sorting makes sure if one month (or abbr) is a prefix of another it + // will match the longer piece. + + + shortPieces.sort(cmpLenRev); + longPieces.sort(cmpLenRev); + mixedPieces.sort(cmpLenRev); + + for (i = 0; i < 12; i++) { + shortPieces[i] = regexEscape(shortPieces[i]); + longPieces[i] = regexEscape(longPieces[i]); + } + + for (i = 0; i < 24; i++) { + mixedPieces[i] = regexEscape(mixedPieces[i]); + } + + this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i'); + this._monthsShortRegex = this._monthsRegex; + this._monthsStrictRegex = new RegExp('^(' + longPieces.join('|') + ')', 'i'); + this._monthsShortStrictRegex = new RegExp('^(' + shortPieces.join('|') + ')', 'i'); + } + + function createDate(y, m, d, h, M, s, ms) { + // can't just apply() to create a date: + // https://stackoverflow.com/q/181348 + var date; // the date constructor remaps years 0-99 to 1900-1999 + + if (y < 100 && y >= 0) { + // preserve leap years using a full 400 year cycle, then reset + date = new Date(y + 400, m, d, h, M, s, ms); + + if (isFinite(date.getFullYear())) { + date.setFullYear(y); + } + } else { + date = new Date(y, m, d, h, M, s, ms); + } + + return date; + } + + function createUTCDate(y) { + var date; // the Date.UTC function remaps years 0-99 to 1900-1999 + + if (y < 100 && y >= 0) { + var args = Array.prototype.slice.call(arguments); // preserve leap years using a full 400 year cycle, then reset + + args[0] = y + 400; + date = new Date(Date.UTC.apply(null, args)); + + if (isFinite(date.getUTCFullYear())) { + date.setUTCFullYear(y); + } + } else { + date = new Date(Date.UTC.apply(null, arguments)); + } + + return date; + } // start-of-first-week - start-of-year + + + function firstWeekOffset(year, dow, doy) { + var // first-week day -- which january is always in the first week (4 for iso, 1 for other) + fwd = 7 + dow - doy, + // first-week day local weekday -- which local weekday is fwd + fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7; + return -fwdlw + fwd - 1; + } // https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday + + + function dayOfYearFromWeeks(year, week, weekday, dow, doy) { + var localWeekday = (7 + weekday - dow) % 7, + weekOffset = firstWeekOffset(year, dow, doy), + dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset, + resYear, + resDayOfYear; + + if (dayOfYear <= 0) { + resYear = year - 1; + resDayOfYear = daysInYear(resYear) + dayOfYear; + } else if (dayOfYear > daysInYear(year)) { + resYear = year + 1; + resDayOfYear = dayOfYear - daysInYear(year); + } else { + resYear = year; + resDayOfYear = dayOfYear; + } + + return { + year: resYear, + dayOfYear: resDayOfYear + }; + } + + function weekOfYear(mom, dow, doy) { + var weekOffset = firstWeekOffset(mom.year(), dow, doy), + week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1, + resWeek, + resYear; + + if (week < 1) { + resYear = mom.year() - 1; + resWeek = week + weeksInYear(resYear, dow, doy); + } else if (week > weeksInYear(mom.year(), dow, doy)) { + resWeek = week - weeksInYear(mom.year(), dow, doy); + resYear = mom.year() + 1; + } else { + resYear = mom.year(); + resWeek = week; + } + + return { + week: resWeek, + year: resYear + }; + } + + function weeksInYear(year, dow, doy) { + var weekOffset = firstWeekOffset(year, dow, doy), + weekOffsetNext = firstWeekOffset(year + 1, dow, doy); + return (daysInYear(year) - weekOffset + weekOffsetNext) / 7; + } // FORMATTING + + + addFormatToken('w', ['ww', 2], 'wo', 'week'); + addFormatToken('W', ['WW', 2], 'Wo', 'isoWeek'); // ALIASES + + addUnitAlias('week', 'w'); + addUnitAlias('isoWeek', 'W'); // PRIORITIES + + addUnitPriority('week', 5); + addUnitPriority('isoWeek', 5); // PARSING + + addRegexToken('w', match1to2); + addRegexToken('ww', match1to2, match2); + addRegexToken('W', match1to2); + addRegexToken('WW', match1to2, match2); + addWeekParseToken(['w', 'ww', 'W', 'WW'], function (input, week, config, token) { + week[token.substr(0, 1)] = toInt(input); + }); // HELPERS + // LOCALES + + function localeWeek(mom) { + return weekOfYear(mom, this._week.dow, this._week.doy).week; + } + + var defaultLocaleWeek = { + dow: 0, + // Sunday is the first day of the week. + doy: 6 // The week that contains Jan 6th is the first week of the year. + + }; + + function localeFirstDayOfWeek() { + return this._week.dow; + } + + function localeFirstDayOfYear() { + return this._week.doy; + } // MOMENTS + + + function getSetWeek(input) { + var week = this.localeData().week(this); + return input == null ? week : this.add((input - week) * 7, 'd'); + } + + function getSetISOWeek(input) { + var week = weekOfYear(this, 1, 4).week; + return input == null ? week : this.add((input - week) * 7, 'd'); + } // FORMATTING + + + addFormatToken('d', 0, 'do', 'day'); + addFormatToken('dd', 0, 0, function (format) { + return this.localeData().weekdaysMin(this, format); + }); + addFormatToken('ddd', 0, 0, function (format) { + return this.localeData().weekdaysShort(this, format); + }); + addFormatToken('dddd', 0, 0, function (format) { + return this.localeData().weekdays(this, format); + }); + addFormatToken('e', 0, 0, 'weekday'); + addFormatToken('E', 0, 0, 'isoWeekday'); // ALIASES + + addUnitAlias('day', 'd'); + addUnitAlias('weekday', 'e'); + addUnitAlias('isoWeekday', 'E'); // PRIORITY + + addUnitPriority('day', 11); + addUnitPriority('weekday', 11); + addUnitPriority('isoWeekday', 11); // PARSING + + addRegexToken('d', match1to2); + addRegexToken('e', match1to2); + addRegexToken('E', match1to2); + addRegexToken('dd', function (isStrict, locale) { + return locale.weekdaysMinRegex(isStrict); + }); + addRegexToken('ddd', function (isStrict, locale) { + return locale.weekdaysShortRegex(isStrict); + }); + addRegexToken('dddd', function (isStrict, locale) { + return locale.weekdaysRegex(isStrict); + }); + addWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) { + var weekday = config._locale.weekdaysParse(input, token, config._strict); // if we didn't get a weekday name, mark the date as invalid + + + if (weekday != null) { + week.d = weekday; + } else { + getParsingFlags(config).invalidWeekday = input; + } + }); + addWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) { + week[token] = toInt(input); + }); // HELPERS + + function parseWeekday(input, locale) { + if (typeof input !== 'string') { + return input; + } + + if (!isNaN(input)) { + return parseInt(input, 10); + } + + input = locale.weekdaysParse(input); + + if (typeof input === 'number') { + return input; + } + + return null; + } + + function parseIsoWeekday(input, locale) { + if (typeof input === 'string') { + return locale.weekdaysParse(input) % 7 || 7; + } + + return isNaN(input) ? null : input; + } // LOCALES + + + function shiftWeekdays(ws, n) { + return ws.slice(n, 7).concat(ws.slice(0, n)); + } + + var defaultLocaleWeekdays = 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'); + + function localeWeekdays(m, format) { + var weekdays = isArray(this._weekdays) ? this._weekdays : this._weekdays[m && m !== true && this._weekdays.isFormat.test(format) ? 'format' : 'standalone']; + return m === true ? shiftWeekdays(weekdays, this._week.dow) : m ? weekdays[m.day()] : weekdays; + } + + var defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'); + + function localeWeekdaysShort(m) { + return m === true ? shiftWeekdays(this._weekdaysShort, this._week.dow) : m ? this._weekdaysShort[m.day()] : this._weekdaysShort; + } + + var defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'); + + function localeWeekdaysMin(m) { + return m === true ? shiftWeekdays(this._weekdaysMin, this._week.dow) : m ? this._weekdaysMin[m.day()] : this._weekdaysMin; + } + + function handleStrictParse$1(weekdayName, format, strict) { + var i, + ii, + mom, + llc = weekdayName.toLocaleLowerCase(); + + if (!this._weekdaysParse) { + this._weekdaysParse = []; + this._shortWeekdaysParse = []; + this._minWeekdaysParse = []; + + for (i = 0; i < 7; ++i) { + mom = createUTC([2000, 1]).day(i); + this._minWeekdaysParse[i] = this.weekdaysMin(mom, '').toLocaleLowerCase(); + this._shortWeekdaysParse[i] = this.weekdaysShort(mom, '').toLocaleLowerCase(); + this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase(); + } + } + + if (strict) { + if (format === 'dddd') { + ii = indexOf.call(this._weekdaysParse, llc); + return ii !== -1 ? ii : null; + } else if (format === 'ddd') { + ii = indexOf.call(this._shortWeekdaysParse, llc); + return ii !== -1 ? ii : null; + } else { + ii = indexOf.call(this._minWeekdaysParse, llc); + return ii !== -1 ? ii : null; + } + } else { + if (format === 'dddd') { + ii = indexOf.call(this._weekdaysParse, llc); + + if (ii !== -1) { + return ii; + } + + ii = indexOf.call(this._shortWeekdaysParse, llc); + + if (ii !== -1) { + return ii; + } + + ii = indexOf.call(this._minWeekdaysParse, llc); + return ii !== -1 ? ii : null; + } else if (format === 'ddd') { + ii = indexOf.call(this._shortWeekdaysParse, llc); + + if (ii !== -1) { + return ii; + } + + ii = indexOf.call(this._weekdaysParse, llc); + + if (ii !== -1) { + return ii; + } + + ii = indexOf.call(this._minWeekdaysParse, llc); + return ii !== -1 ? ii : null; + } else { + ii = indexOf.call(this._minWeekdaysParse, llc); + + if (ii !== -1) { + return ii; + } + + ii = indexOf.call(this._weekdaysParse, llc); + + if (ii !== -1) { + return ii; + } + + ii = indexOf.call(this._shortWeekdaysParse, llc); + return ii !== -1 ? ii : null; + } + } + } + + function localeWeekdaysParse(weekdayName, format, strict) { + var i, mom, regex; + + if (this._weekdaysParseExact) { + return handleStrictParse$1.call(this, weekdayName, format, strict); + } + + if (!this._weekdaysParse) { + this._weekdaysParse = []; + this._minWeekdaysParse = []; + this._shortWeekdaysParse = []; + this._fullWeekdaysParse = []; + } + + for (i = 0; i < 7; i++) { + // make the regex if we don't have it already + mom = createUTC([2000, 1]).day(i); + + if (strict && !this._fullWeekdaysParse[i]) { + this._fullWeekdaysParse[i] = new RegExp('^' + this.weekdays(mom, '').replace('.', '\\.?') + '$', 'i'); + this._shortWeekdaysParse[i] = new RegExp('^' + this.weekdaysShort(mom, '').replace('.', '\\.?') + '$', 'i'); + this._minWeekdaysParse[i] = new RegExp('^' + this.weekdaysMin(mom, '').replace('.', '\\.?') + '$', 'i'); + } + + if (!this._weekdaysParse[i]) { + regex = '^' + this.weekdays(mom, '') + '|^' + this.weekdaysShort(mom, '') + '|^' + this.weekdaysMin(mom, ''); + this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i'); + } // test the regex + + + if (strict && format === 'dddd' && this._fullWeekdaysParse[i].test(weekdayName)) { + return i; + } else if (strict && format === 'ddd' && this._shortWeekdaysParse[i].test(weekdayName)) { + return i; + } else if (strict && format === 'dd' && this._minWeekdaysParse[i].test(weekdayName)) { + return i; + } else if (!strict && this._weekdaysParse[i].test(weekdayName)) { + return i; + } + } + } // MOMENTS + + + function getSetDayOfWeek(input) { + if (!this.isValid()) { + return input != null ? this : NaN; + } + + var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay(); + + if (input != null) { + input = parseWeekday(input, this.localeData()); + return this.add(input - day, 'd'); + } else { + return day; + } + } + + function getSetLocaleDayOfWeek(input) { + if (!this.isValid()) { + return input != null ? this : NaN; + } + + var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7; + return input == null ? weekday : this.add(input - weekday, 'd'); + } + + function getSetISODayOfWeek(input) { + if (!this.isValid()) { + return input != null ? this : NaN; + } // behaves the same as moment#day except + // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6) + // as a setter, sunday should belong to the previous week. + + + if (input != null) { + var weekday = parseIsoWeekday(input, this.localeData()); + return this.day(this.day() % 7 ? weekday : weekday - 7); + } else { + return this.day() || 7; + } + } + + var defaultWeekdaysRegex = matchWord; + + function weekdaysRegex(isStrict) { + if (this._weekdaysParseExact) { + if (!hasOwnProp(this, '_weekdaysRegex')) { + computeWeekdaysParse.call(this); + } + + if (isStrict) { + return this._weekdaysStrictRegex; + } else { + return this._weekdaysRegex; + } + } else { + if (!hasOwnProp(this, '_weekdaysRegex')) { + this._weekdaysRegex = defaultWeekdaysRegex; + } + + return this._weekdaysStrictRegex && isStrict ? this._weekdaysStrictRegex : this._weekdaysRegex; + } + } + + var defaultWeekdaysShortRegex = matchWord; + + function weekdaysShortRegex(isStrict) { + if (this._weekdaysParseExact) { + if (!hasOwnProp(this, '_weekdaysRegex')) { + computeWeekdaysParse.call(this); + } + + if (isStrict) { + return this._weekdaysShortStrictRegex; + } else { + return this._weekdaysShortRegex; + } + } else { + if (!hasOwnProp(this, '_weekdaysShortRegex')) { + this._weekdaysShortRegex = defaultWeekdaysShortRegex; + } + + return this._weekdaysShortStrictRegex && isStrict ? this._weekdaysShortStrictRegex : this._weekdaysShortRegex; + } + } + + var defaultWeekdaysMinRegex = matchWord; + + function weekdaysMinRegex(isStrict) { + if (this._weekdaysParseExact) { + if (!hasOwnProp(this, '_weekdaysRegex')) { + computeWeekdaysParse.call(this); + } + + if (isStrict) { + return this._weekdaysMinStrictRegex; + } else { + return this._weekdaysMinRegex; + } + } else { + if (!hasOwnProp(this, '_weekdaysMinRegex')) { + this._weekdaysMinRegex = defaultWeekdaysMinRegex; + } + + return this._weekdaysMinStrictRegex && isStrict ? this._weekdaysMinStrictRegex : this._weekdaysMinRegex; + } + } + + function computeWeekdaysParse() { + function cmpLenRev(a, b) { + return b.length - a.length; + } + + var minPieces = [], + shortPieces = [], + longPieces = [], + mixedPieces = [], + i, + mom, + minp, + shortp, + longp; + + for (i = 0; i < 7; i++) { + // make the regex if we don't have it already + mom = createUTC([2000, 1]).day(i); + minp = this.weekdaysMin(mom, ''); + shortp = this.weekdaysShort(mom, ''); + longp = this.weekdays(mom, ''); + minPieces.push(minp); + shortPieces.push(shortp); + longPieces.push(longp); + mixedPieces.push(minp); + mixedPieces.push(shortp); + mixedPieces.push(longp); + } // Sorting makes sure if one weekday (or abbr) is a prefix of another it + // will match the longer piece. + + + minPieces.sort(cmpLenRev); + shortPieces.sort(cmpLenRev); + longPieces.sort(cmpLenRev); + mixedPieces.sort(cmpLenRev); + + for (i = 0; i < 7; i++) { + shortPieces[i] = regexEscape(shortPieces[i]); + longPieces[i] = regexEscape(longPieces[i]); + mixedPieces[i] = regexEscape(mixedPieces[i]); + } + + this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i'); + this._weekdaysShortRegex = this._weekdaysRegex; + this._weekdaysMinRegex = this._weekdaysRegex; + this._weekdaysStrictRegex = new RegExp('^(' + longPieces.join('|') + ')', 'i'); + this._weekdaysShortStrictRegex = new RegExp('^(' + shortPieces.join('|') + ')', 'i'); + this._weekdaysMinStrictRegex = new RegExp('^(' + minPieces.join('|') + ')', 'i'); + } // FORMATTING + + + function hFormat() { + return this.hours() % 12 || 12; + } + + function kFormat() { + return this.hours() || 24; + } + + addFormatToken('H', ['HH', 2], 0, 'hour'); + addFormatToken('h', ['hh', 2], 0, hFormat); + addFormatToken('k', ['kk', 2], 0, kFormat); + addFormatToken('hmm', 0, 0, function () { + return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2); + }); + addFormatToken('hmmss', 0, 0, function () { + return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2) + zeroFill(this.seconds(), 2); + }); + addFormatToken('Hmm', 0, 0, function () { + return '' + this.hours() + zeroFill(this.minutes(), 2); + }); + addFormatToken('Hmmss', 0, 0, function () { + return '' + this.hours() + zeroFill(this.minutes(), 2) + zeroFill(this.seconds(), 2); + }); + + function meridiem(token, lowercase) { + addFormatToken(token, 0, 0, function () { + return this.localeData().meridiem(this.hours(), this.minutes(), lowercase); + }); + } + + meridiem('a', true); + meridiem('A', false); // ALIASES + + addUnitAlias('hour', 'h'); // PRIORITY + + addUnitPriority('hour', 13); // PARSING + + function matchMeridiem(isStrict, locale) { + return locale._meridiemParse; + } + + addRegexToken('a', matchMeridiem); + addRegexToken('A', matchMeridiem); + addRegexToken('H', match1to2); + addRegexToken('h', match1to2); + addRegexToken('k', match1to2); + addRegexToken('HH', match1to2, match2); + addRegexToken('hh', match1to2, match2); + addRegexToken('kk', match1to2, match2); + addRegexToken('hmm', match3to4); + addRegexToken('hmmss', match5to6); + addRegexToken('Hmm', match3to4); + addRegexToken('Hmmss', match5to6); + addParseToken(['H', 'HH'], HOUR); + addParseToken(['k', 'kk'], function (input, array, config) { + var kInput = toInt(input); + array[HOUR] = kInput === 24 ? 0 : kInput; + }); + addParseToken(['a', 'A'], function (input, array, config) { + config._isPm = config._locale.isPM(input); + config._meridiem = input; + }); + addParseToken(['h', 'hh'], function (input, array, config) { + array[HOUR] = toInt(input); + getParsingFlags(config).bigHour = true; + }); + addParseToken('hmm', function (input, array, config) { + var pos = input.length - 2; + array[HOUR] = toInt(input.substr(0, pos)); + array[MINUTE] = toInt(input.substr(pos)); + getParsingFlags(config).bigHour = true; + }); + addParseToken('hmmss', function (input, array, config) { + var pos1 = input.length - 4; + var pos2 = input.length - 2; + array[HOUR] = toInt(input.substr(0, pos1)); + array[MINUTE] = toInt(input.substr(pos1, 2)); + array[SECOND] = toInt(input.substr(pos2)); + getParsingFlags(config).bigHour = true; + }); + addParseToken('Hmm', function (input, array, config) { + var pos = input.length - 2; + array[HOUR] = toInt(input.substr(0, pos)); + array[MINUTE] = toInt(input.substr(pos)); + }); + addParseToken('Hmmss', function (input, array, config) { + var pos1 = input.length - 4; + var pos2 = input.length - 2; + array[HOUR] = toInt(input.substr(0, pos1)); + array[MINUTE] = toInt(input.substr(pos1, 2)); + array[SECOND] = toInt(input.substr(pos2)); + }); // LOCALES + + function localeIsPM(input) { + // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays + // Using charAt should be more compatible. + return (input + '').toLowerCase().charAt(0) === 'p'; + } + + var defaultLocaleMeridiemParse = /[ap]\.?m?\.?/i; + + function localeMeridiem(hours, minutes, isLower) { + if (hours > 11) { + return isLower ? 'pm' : 'PM'; + } else { + return isLower ? 'am' : 'AM'; + } + } // MOMENTS + // Setting the hour should keep the time, because the user explicitly + // specified which hour they want. So trying to maintain the same hour (in + // a new timezone) makes sense. Adding/subtracting hours does not follow + // this rule. + + + var getSetHour = makeGetSet('Hours', true); + var baseConfig = { + calendar: defaultCalendar, + longDateFormat: defaultLongDateFormat, + invalidDate: defaultInvalidDate, + ordinal: defaultOrdinal, + dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse, + relativeTime: defaultRelativeTime, + months: defaultLocaleMonths, + monthsShort: defaultLocaleMonthsShort, + week: defaultLocaleWeek, + weekdays: defaultLocaleWeekdays, + weekdaysMin: defaultLocaleWeekdaysMin, + weekdaysShort: defaultLocaleWeekdaysShort, + meridiemParse: defaultLocaleMeridiemParse + }; // internal storage for locale config files + + var locales = {}; + var localeFamilies = {}; + var globalLocale; + + function normalizeLocale(key) { + return key ? key.toLowerCase().replace('_', '-') : key; + } // pick the locale from the array + // try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each + // substring from most specific to least, but move to the next array item if it's a more specific variant than the current root + + + function chooseLocale(names) { + var i = 0, + j, + next, + locale, + split; + + while (i < names.length) { + split = normalizeLocale(names[i]).split('-'); + j = split.length; + next = normalizeLocale(names[i + 1]); + next = next ? next.split('-') : null; + + while (j > 0) { + locale = loadLocale(split.slice(0, j).join('-')); + + if (locale) { + return locale; + } + + if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) { + //the next array item is better than a shallower substring of this one + break; + } + + j--; + } + + i++; + } + + return globalLocale; + } + + function loadLocale(name) { + var oldLocale = null; // TODO: Find a better way to register and load all the locales in Node + + if (!locales[name] && 'object' !== 'undefined' && module && module.exports) { + try { + oldLocale = globalLocale._abbr; + var aliasedRequire = commonjsRequire$1; + aliasedRequire('./locale/' + name); + getSetGlobalLocale(oldLocale); + } catch (e) {} + } + + return locales[name]; + } // This function will load locale and then set the global locale. If + // no arguments are passed in, it will simply return the current global + // locale key. + + + function getSetGlobalLocale(key, values) { + var data; + + if (key) { + if (isUndefined(values)) { + data = getLocale(key); + } else { + data = defineLocale(key, values); + } + + if (data) { + // moment.duration._locale = moment._locale = data; + globalLocale = data; + } else { + if (typeof console !== 'undefined' && console.warn) { + //warn user if arguments are passed but the locale could not be set + console.warn('Locale ' + key + ' not found. Did you forget to load it?'); + } + } + } + + return globalLocale._abbr; + } + + function defineLocale(name, config) { + if (config !== null) { + var locale, + parentConfig = baseConfig; + config.abbr = name; + + if (locales[name] != null) { + deprecateSimple('defineLocaleOverride', 'use moment.updateLocale(localeName, config) to change ' + 'an existing locale. moment.defineLocale(localeName, ' + 'config) should only be used for creating a new locale ' + 'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.'); + parentConfig = locales[name]._config; + } else if (config.parentLocale != null) { + if (locales[config.parentLocale] != null) { + parentConfig = locales[config.parentLocale]._config; + } else { + locale = loadLocale(config.parentLocale); + + if (locale != null) { + parentConfig = locale._config; + } else { + if (!localeFamilies[config.parentLocale]) { + localeFamilies[config.parentLocale] = []; + } + + localeFamilies[config.parentLocale].push({ + name: name, + config: config + }); + return null; + } + } + } + + locales[name] = new Locale(mergeConfigs(parentConfig, config)); + + if (localeFamilies[name]) { + localeFamilies[name].forEach(function (x) { + defineLocale(x.name, x.config); + }); + } // backwards compat for now: also set the locale + // make sure we set the locale AFTER all child locales have been + // created, so we won't end up with the child locale set. + + + getSetGlobalLocale(name); + return locales[name]; + } else { + // useful for testing + delete locales[name]; + return null; + } + } + + function updateLocale(name, config) { + if (config != null) { + var locale, + tmpLocale, + parentConfig = baseConfig; // MERGE + + tmpLocale = loadLocale(name); + + if (tmpLocale != null) { + parentConfig = tmpLocale._config; + } + + config = mergeConfigs(parentConfig, config); + locale = new Locale(config); + locale.parentLocale = locales[name]; + locales[name] = locale; // backwards compat for now: also set the locale + + getSetGlobalLocale(name); + } else { + // pass null for config to unupdate, useful for tests + if (locales[name] != null) { + if (locales[name].parentLocale != null) { + locales[name] = locales[name].parentLocale; + } else if (locales[name] != null) { + delete locales[name]; + } + } + } + + return locales[name]; + } // returns locale data + + + function getLocale(key) { + var locale; + + if (key && key._locale && key._locale._abbr) { + key = key._locale._abbr; + } + + if (!key) { + return globalLocale; + } + + if (!isArray(key)) { + //short-circuit everything else + locale = loadLocale(key); + + if (locale) { + return locale; + } + + key = [key]; + } + + return chooseLocale(key); + } + + function listLocales() { + return keys(locales); + } + + function checkOverflow(m) { + var overflow; + var a = m._a; + + if (a && getParsingFlags(m).overflow === -2) { + overflow = a[MONTH] < 0 || a[MONTH] > 11 ? MONTH : a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH]) ? DATE : a[HOUR] < 0 || a[HOUR] > 24 || a[HOUR] === 24 && (a[MINUTE] !== 0 || a[SECOND] !== 0 || a[MILLISECOND] !== 0) ? HOUR : a[MINUTE] < 0 || a[MINUTE] > 59 ? MINUTE : a[SECOND] < 0 || a[SECOND] > 59 ? SECOND : a[MILLISECOND] < 0 || a[MILLISECOND] > 999 ? MILLISECOND : -1; + + if (getParsingFlags(m)._overflowDayOfYear && (overflow < YEAR || overflow > DATE)) { + overflow = DATE; + } + + if (getParsingFlags(m)._overflowWeeks && overflow === -1) { + overflow = WEEK; + } + + if (getParsingFlags(m)._overflowWeekday && overflow === -1) { + overflow = WEEKDAY; + } + + getParsingFlags(m).overflow = overflow; + } + + return m; + } // Pick the first defined of two or three arguments. + + + function defaults(a, b, c) { + if (a != null) { + return a; + } + + if (b != null) { + return b; + } + + return c; + } + + function currentDateArray(config) { + // hooks is actually the exported moment object + var nowValue = new Date(hooks.now()); + + if (config._useUTC) { + return [nowValue.getUTCFullYear(), nowValue.getUTCMonth(), nowValue.getUTCDate()]; + } + + return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()]; + } // convert an array to a date. + // the array should mirror the parameters below + // note: all values past the year are optional and will default to the lowest possible value. + // [year, month, day , hour, minute, second, millisecond] + + + function configFromArray(config) { + var i, + date, + input = [], + currentDate, + expectedWeekday, + yearToUse; + + if (config._d) { + return; + } + + currentDate = currentDateArray(config); //compute day of the year from weeks and weekdays + + if (config._w && config._a[DATE] == null && config._a[MONTH] == null) { + dayOfYearFromWeekInfo(config); + } //if the day of the year is set, figure out what it is + + + if (config._dayOfYear != null) { + yearToUse = defaults(config._a[YEAR], currentDate[YEAR]); + + if (config._dayOfYear > daysInYear(yearToUse) || config._dayOfYear === 0) { + getParsingFlags(config)._overflowDayOfYear = true; + } + + date = createUTCDate(yearToUse, 0, config._dayOfYear); + config._a[MONTH] = date.getUTCMonth(); + config._a[DATE] = date.getUTCDate(); + } // Default to current date. + // * if no year, month, day of month are given, default to today + // * if day of month is given, default month and year + // * if month is given, default only year + // * if year is given, don't default anything + + + for (i = 0; i < 3 && config._a[i] == null; ++i) { + config._a[i] = input[i] = currentDate[i]; + } // Zero out whatever was not defaulted, including time + + + for (; i < 7; i++) { + config._a[i] = input[i] = config._a[i] == null ? i === 2 ? 1 : 0 : config._a[i]; + } // Check for 24:00:00.000 + + + if (config._a[HOUR] === 24 && config._a[MINUTE] === 0 && config._a[SECOND] === 0 && config._a[MILLISECOND] === 0) { + config._nextDay = true; + config._a[HOUR] = 0; + } + + config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input); + expectedWeekday = config._useUTC ? config._d.getUTCDay() : config._d.getDay(); // Apply timezone offset from input. The actual utcOffset can be changed + // with parseZone. + + if (config._tzm != null) { + config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm); + } + + if (config._nextDay) { + config._a[HOUR] = 24; + } // check for mismatching day of week + + + if (config._w && typeof config._w.d !== 'undefined' && config._w.d !== expectedWeekday) { + getParsingFlags(config).weekdayMismatch = true; + } + } + + function dayOfYearFromWeekInfo(config) { + var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow; + w = config._w; + + if (w.GG != null || w.W != null || w.E != null) { + dow = 1; + doy = 4; // TODO: We need to take the current isoWeekYear, but that depends on + // how we interpret now (local, utc, fixed offset). So create + // a now version of current config (take local/utc/offset flags, and + // create now). + + weekYear = defaults(w.GG, config._a[YEAR], weekOfYear(createLocal(), 1, 4).year); + week = defaults(w.W, 1); + weekday = defaults(w.E, 1); + + if (weekday < 1 || weekday > 7) { + weekdayOverflow = true; + } + } else { + dow = config._locale._week.dow; + doy = config._locale._week.doy; + var curWeek = weekOfYear(createLocal(), dow, doy); + weekYear = defaults(w.gg, config._a[YEAR], curWeek.year); // Default to current week. + + week = defaults(w.w, curWeek.week); + + if (w.d != null) { + // weekday -- low day numbers are considered next week + weekday = w.d; + + if (weekday < 0 || weekday > 6) { + weekdayOverflow = true; + } + } else if (w.e != null) { + // local weekday -- counting starts from beginning of week + weekday = w.e + dow; + + if (w.e < 0 || w.e > 6) { + weekdayOverflow = true; + } + } else { + // default to beginning of week + weekday = dow; + } + } + + if (week < 1 || week > weeksInYear(weekYear, dow, doy)) { + getParsingFlags(config)._overflowWeeks = true; + } else if (weekdayOverflow != null) { + getParsingFlags(config)._overflowWeekday = true; + } else { + temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy); + config._a[YEAR] = temp.year; + config._dayOfYear = temp.dayOfYear; + } + } // iso 8601 regex + // 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00) + + + var extendedIsoRegex = /^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/; + var basicIsoRegex = /^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/; + var tzRegex = /Z|[+-]\d\d(?::?\d\d)?/; + var isoDates = [['YYYYYY-MM-DD', /[+-]\d{6}-\d\d-\d\d/], ['YYYY-MM-DD', /\d{4}-\d\d-\d\d/], ['GGGG-[W]WW-E', /\d{4}-W\d\d-\d/], ['GGGG-[W]WW', /\d{4}-W\d\d/, false], ['YYYY-DDD', /\d{4}-\d{3}/], ['YYYY-MM', /\d{4}-\d\d/, false], ['YYYYYYMMDD', /[+-]\d{10}/], ['YYYYMMDD', /\d{8}/], // YYYYMM is NOT allowed by the standard + ['GGGG[W]WWE', /\d{4}W\d{3}/], ['GGGG[W]WW', /\d{4}W\d{2}/, false], ['YYYYDDD', /\d{7}/]]; // iso time formats and regexes + + var isoTimes = [['HH:mm:ss.SSSS', /\d\d:\d\d:\d\d\.\d+/], ['HH:mm:ss,SSSS', /\d\d:\d\d:\d\d,\d+/], ['HH:mm:ss', /\d\d:\d\d:\d\d/], ['HH:mm', /\d\d:\d\d/], ['HHmmss.SSSS', /\d\d\d\d\d\d\.\d+/], ['HHmmss,SSSS', /\d\d\d\d\d\d,\d+/], ['HHmmss', /\d\d\d\d\d\d/], ['HHmm', /\d\d\d\d/], ['HH', /\d\d/]]; + var aspNetJsonRegex = /^\/?Date\((\-?\d+)/i; // date from iso format + + function configFromISO(config) { + var i, + l, + string = config._i, + match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string), + allowTime, + dateFormat, + timeFormat, + tzFormat; + + if (match) { + getParsingFlags(config).iso = true; + + for (i = 0, l = isoDates.length; i < l; i++) { + if (isoDates[i][1].exec(match[1])) { + dateFormat = isoDates[i][0]; + allowTime = isoDates[i][2] !== false; + break; + } + } + + if (dateFormat == null) { + config._isValid = false; + return; + } + + if (match[3]) { + for (i = 0, l = isoTimes.length; i < l; i++) { + if (isoTimes[i][1].exec(match[3])) { + // match[2] should be 'T' or space + timeFormat = (match[2] || ' ') + isoTimes[i][0]; + break; + } + } + + if (timeFormat == null) { + config._isValid = false; + return; + } + } + + if (!allowTime && timeFormat != null) { + config._isValid = false; + return; + } + + if (match[4]) { + if (tzRegex.exec(match[4])) { + tzFormat = 'Z'; + } else { + config._isValid = false; + return; + } + } + + config._f = dateFormat + (timeFormat || '') + (tzFormat || ''); + configFromStringAndFormat(config); + } else { + config._isValid = false; + } + } // RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3 + + + var rfc2822 = /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/; + + function extractFromRFC2822Strings(yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr) { + var result = [untruncateYear(yearStr), defaultLocaleMonthsShort.indexOf(monthStr), parseInt(dayStr, 10), parseInt(hourStr, 10), parseInt(minuteStr, 10)]; + + if (secondStr) { + result.push(parseInt(secondStr, 10)); + } + + return result; + } + + function untruncateYear(yearStr) { + var year = parseInt(yearStr, 10); + + if (year <= 49) { + return 2000 + year; + } else if (year <= 999) { + return 1900 + year; + } + + return year; + } + + function preprocessRFC2822(s) { + // Remove comments and folding whitespace and replace multiple-spaces with a single space + return s.replace(/\([^)]*\)|[\n\t]/g, ' ').replace(/(\s\s+)/g, ' ').replace(/^\s\s*/, '').replace(/\s\s*$/, ''); + } + + function checkWeekday(weekdayStr, parsedInput, config) { + if (weekdayStr) { + // TODO: Replace the vanilla JS Date object with an indepentent day-of-week check. + var weekdayProvided = defaultLocaleWeekdaysShort.indexOf(weekdayStr), + weekdayActual = new Date(parsedInput[0], parsedInput[1], parsedInput[2]).getDay(); + + if (weekdayProvided !== weekdayActual) { + getParsingFlags(config).weekdayMismatch = true; + config._isValid = false; + return false; + } + } + + return true; + } + + var obsOffsets = { + UT: 0, + GMT: 0, + EDT: -4 * 60, + EST: -5 * 60, + CDT: -5 * 60, + CST: -6 * 60, + MDT: -6 * 60, + MST: -7 * 60, + PDT: -7 * 60, + PST: -8 * 60 + }; + + function calculateOffset(obsOffset, militaryOffset, numOffset) { + if (obsOffset) { + return obsOffsets[obsOffset]; + } else if (militaryOffset) { + // the only allowed military tz is Z + return 0; + } else { + var hm = parseInt(numOffset, 10); + var m = hm % 100, + h = (hm - m) / 100; + return h * 60 + m; + } + } // date and time from ref 2822 format + + + function configFromRFC2822(config) { + var match = rfc2822.exec(preprocessRFC2822(config._i)); + + if (match) { + var parsedArray = extractFromRFC2822Strings(match[4], match[3], match[2], match[5], match[6], match[7]); + + if (!checkWeekday(match[1], parsedArray, config)) { + return; + } + + config._a = parsedArray; + config._tzm = calculateOffset(match[8], match[9], match[10]); + config._d = createUTCDate.apply(null, config._a); + + config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm); + + getParsingFlags(config).rfc2822 = true; + } else { + config._isValid = false; + } + } // date from iso format or fallback + + + function configFromString(config) { + var matched = aspNetJsonRegex.exec(config._i); + + if (matched !== null) { + config._d = new Date(+matched[1]); + return; + } + + configFromISO(config); + + if (config._isValid === false) { + delete config._isValid; + } else { + return; + } + + configFromRFC2822(config); + + if (config._isValid === false) { + delete config._isValid; + } else { + return; + } // Final attempt, use Input Fallback + + + hooks.createFromInputFallback(config); + } + + hooks.createFromInputFallback = deprecate('value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), ' + 'which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are ' + 'discouraged and will be removed in an upcoming major release. Please refer to ' + 'http://momentjs.com/guides/#/warnings/js-date/ for more info.', function (config) { + config._d = new Date(config._i + (config._useUTC ? ' UTC' : '')); + }); // constant that refers to the ISO standard + + hooks.ISO_8601 = function () {}; // constant that refers to the RFC 2822 form + + + hooks.RFC_2822 = function () {}; // date from string and format string + + + function configFromStringAndFormat(config) { + // TODO: Move this to another part of the creation flow to prevent circular deps + if (config._f === hooks.ISO_8601) { + configFromISO(config); + return; + } + + if (config._f === hooks.RFC_2822) { + configFromRFC2822(config); + return; + } + + config._a = []; + getParsingFlags(config).empty = true; // This array is used to make a Date, either with `new Date` or `Date.UTC` + + var string = '' + config._i, + i, + parsedInput, + tokens, + token, + skipped, + stringLength = string.length, + totalParsedInputLength = 0; + tokens = expandFormat(config._f, config._locale).match(formattingTokens) || []; + + for (i = 0; i < tokens.length; i++) { + token = tokens[i]; + parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0]; // console.log('token', token, 'parsedInput', parsedInput, + // 'regex', getParseRegexForToken(token, config)); + + if (parsedInput) { + skipped = string.substr(0, string.indexOf(parsedInput)); + + if (skipped.length > 0) { + getParsingFlags(config).unusedInput.push(skipped); + } + + string = string.slice(string.indexOf(parsedInput) + parsedInput.length); + totalParsedInputLength += parsedInput.length; + } // don't parse if it's not a known token + + + if (formatTokenFunctions[token]) { + if (parsedInput) { + getParsingFlags(config).empty = false; + } else { + getParsingFlags(config).unusedTokens.push(token); + } + + addTimeToArrayFromToken(token, parsedInput, config); + } else if (config._strict && !parsedInput) { + getParsingFlags(config).unusedTokens.push(token); + } + } // add remaining unparsed input length to the string + + + getParsingFlags(config).charsLeftOver = stringLength - totalParsedInputLength; + + if (string.length > 0) { + getParsingFlags(config).unusedInput.push(string); + } // clear _12h flag if hour is <= 12 + + + if (config._a[HOUR] <= 12 && getParsingFlags(config).bigHour === true && config._a[HOUR] > 0) { + getParsingFlags(config).bigHour = undefined; + } + + getParsingFlags(config).parsedDateParts = config._a.slice(0); + getParsingFlags(config).meridiem = config._meridiem; // handle meridiem + + config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR], config._meridiem); + configFromArray(config); + checkOverflow(config); + } + + function meridiemFixWrap(locale, hour, meridiem) { + var isPm; + + if (meridiem == null) { + // nothing to do + return hour; + } + + if (locale.meridiemHour != null) { + return locale.meridiemHour(hour, meridiem); + } else if (locale.isPM != null) { + // Fallback + isPm = locale.isPM(meridiem); + + if (isPm && hour < 12) { + hour += 12; + } + + if (!isPm && hour === 12) { + hour = 0; + } + + return hour; + } else { + // this is not supposed to happen + return hour; + } + } // date from string and array of format strings + + + function configFromStringAndArray(config) { + var tempConfig, bestMoment, scoreToBeat, i, currentScore; + + if (config._f.length === 0) { + getParsingFlags(config).invalidFormat = true; + config._d = new Date(NaN); + return; + } + + for (i = 0; i < config._f.length; i++) { + currentScore = 0; + tempConfig = copyConfig({}, config); + + if (config._useUTC != null) { + tempConfig._useUTC = config._useUTC; + } + + tempConfig._f = config._f[i]; + configFromStringAndFormat(tempConfig); + + if (!isValid(tempConfig)) { + continue; + } // if there is any input that was not parsed add a penalty for that format + + + currentScore += getParsingFlags(tempConfig).charsLeftOver; //or tokens + + currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10; + getParsingFlags(tempConfig).score = currentScore; + + if (scoreToBeat == null || currentScore < scoreToBeat) { + scoreToBeat = currentScore; + bestMoment = tempConfig; + } + } + + extend(config, bestMoment || tempConfig); + } + + function configFromObject(config) { + if (config._d) { + return; + } + + var i = normalizeObjectUnits(config._i); + config._a = map([i.year, i.month, i.day || i.date, i.hour, i.minute, i.second, i.millisecond], function (obj) { + return obj && parseInt(obj, 10); + }); + configFromArray(config); + } + + function createFromConfig(config) { + var res = new Moment(checkOverflow(prepareConfig(config))); + + if (res._nextDay) { + // Adding is smart enough around DST + res.add(1, 'd'); + res._nextDay = undefined; + } + + return res; + } + + function prepareConfig(config) { + var input = config._i, + format = config._f; + config._locale = config._locale || getLocale(config._l); + + if (input === null || format === undefined && input === '') { + return createInvalid({ + nullInput: true + }); + } + + if (typeof input === 'string') { + config._i = input = config._locale.preparse(input); + } + + if (isMoment(input)) { + return new Moment(checkOverflow(input)); + } else if (isDate(input)) { + config._d = input; + } else if (isArray(format)) { + configFromStringAndArray(config); + } else if (format) { + configFromStringAndFormat(config); + } else { + configFromInput(config); + } + + if (!isValid(config)) { + config._d = null; + } + + return config; + } + + function configFromInput(config) { + var input = config._i; + + if (isUndefined(input)) { + config._d = new Date(hooks.now()); + } else if (isDate(input)) { + config._d = new Date(input.valueOf()); + } else if (typeof input === 'string') { + configFromString(config); + } else if (isArray(input)) { + config._a = map(input.slice(0), function (obj) { + return parseInt(obj, 10); + }); + configFromArray(config); + } else if (isObject(input)) { + configFromObject(config); + } else if (isNumber(input)) { + // from milliseconds + config._d = new Date(input); + } else { + hooks.createFromInputFallback(config); + } + } + + function createLocalOrUTC(input, format, locale, strict, isUTC) { + var c = {}; + + if (locale === true || locale === false) { + strict = locale; + locale = undefined; + } + + if (isObject(input) && isObjectEmpty(input) || isArray(input) && input.length === 0) { + input = undefined; + } // object construction must be done this way. + // https://github.com/moment/moment/issues/1423 + + + c._isAMomentObject = true; + c._useUTC = c._isUTC = isUTC; + c._l = locale; + c._i = input; + c._f = format; + c._strict = strict; + return createFromConfig(c); + } + + function createLocal(input, format, locale, strict) { + return createLocalOrUTC(input, format, locale, strict, false); + } + + var prototypeMin = deprecate('moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/', function () { + var other = createLocal.apply(null, arguments); + + if (this.isValid() && other.isValid()) { + return other < this ? this : other; + } else { + return createInvalid(); + } + }); + var prototypeMax = deprecate('moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/', function () { + var other = createLocal.apply(null, arguments); + + if (this.isValid() && other.isValid()) { + return other > this ? this : other; + } else { + return createInvalid(); + } + }); // Pick a moment m from moments so that m[fn](other) is true for all + // other. This relies on the function fn to be transitive. + // + // moments should either be an array of moment objects or an array, whose + // first element is an array of moment objects. + + function pickBy(fn, moments) { + var res, i; + + if (moments.length === 1 && isArray(moments[0])) { + moments = moments[0]; + } + + if (!moments.length) { + return createLocal(); + } + + res = moments[0]; + + for (i = 1; i < moments.length; ++i) { + if (!moments[i].isValid() || moments[i][fn](res)) { + res = moments[i]; + } + } + + return res; + } // TODO: Use [].sort instead? + + + function min() { + var args = [].slice.call(arguments, 0); + return pickBy('isBefore', args); + } + + function max() { + var args = [].slice.call(arguments, 0); + return pickBy('isAfter', args); + } + + var now = function () { + return Date.now ? Date.now() : +new Date(); + }; + + var ordering = ['year', 'quarter', 'month', 'week', 'day', 'hour', 'minute', 'second', 'millisecond']; + + function isDurationValid(m) { + for (var key in m) { + if (!(indexOf.call(ordering, key) !== -1 && (m[key] == null || !isNaN(m[key])))) { + return false; + } + } + + var unitHasDecimal = false; + + for (var i = 0; i < ordering.length; ++i) { + if (m[ordering[i]]) { + if (unitHasDecimal) { + return false; // only allow non-integers for smallest unit + } + + if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) { + unitHasDecimal = true; + } + } + } + + return true; + } + + function isValid$1() { + return this._isValid; + } + + function createInvalid$1() { + return createDuration(NaN); + } + + function Duration(duration) { + var normalizedInput = normalizeObjectUnits(duration), + years = normalizedInput.year || 0, + quarters = normalizedInput.quarter || 0, + months = normalizedInput.month || 0, + weeks = normalizedInput.week || normalizedInput.isoWeek || 0, + days = normalizedInput.day || 0, + hours = normalizedInput.hour || 0, + minutes = normalizedInput.minute || 0, + seconds = normalizedInput.second || 0, + milliseconds = normalizedInput.millisecond || 0; + this._isValid = isDurationValid(normalizedInput); // representation for dateAddRemove + + this._milliseconds = +milliseconds + seconds * 1e3 + // 1000 + minutes * 6e4 + // 1000 * 60 + hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978 + // Because of dateAddRemove treats 24 hours as different from a + // day when working around DST, we need to store them separately + + this._days = +days + weeks * 7; // It is impossible to translate months into days without knowing + // which months you are are talking about, so we have to store + // it separately. + + this._months = +months + quarters * 3 + years * 12; + this._data = {}; + this._locale = getLocale(); + + this._bubble(); + } + + function isDuration(obj) { + return obj instanceof Duration; + } + + function absRound(number) { + if (number < 0) { + return Math.round(-1 * number) * -1; + } else { + return Math.round(number); + } + } // FORMATTING + + + function offset(token, separator) { + addFormatToken(token, 0, 0, function () { + var offset = this.utcOffset(); + var sign = '+'; + + if (offset < 0) { + offset = -offset; + sign = '-'; + } + + return sign + zeroFill(~~(offset / 60), 2) + separator + zeroFill(~~offset % 60, 2); + }); + } + + offset('Z', ':'); + offset('ZZ', ''); // PARSING + + addRegexToken('Z', matchShortOffset); + addRegexToken('ZZ', matchShortOffset); + addParseToken(['Z', 'ZZ'], function (input, array, config) { + config._useUTC = true; + config._tzm = offsetFromString(matchShortOffset, input); + }); // HELPERS + // timezone chunker + // '+10:00' > ['10', '00'] + // '-1530' > ['-15', '30'] + + var chunkOffset = /([\+\-]|\d\d)/gi; + + function offsetFromString(matcher, string) { + var matches = (string || '').match(matcher); + + if (matches === null) { + return null; + } + + var chunk = matches[matches.length - 1] || []; + var parts = (chunk + '').match(chunkOffset) || ['-', 0, 0]; + var minutes = +(parts[1] * 60) + toInt(parts[2]); + return minutes === 0 ? 0 : parts[0] === '+' ? minutes : -minutes; + } // Return a moment from input, that is local/utc/zone equivalent to model. + + + function cloneWithOffset(input, model) { + var res, diff; + + if (model._isUTC) { + res = model.clone(); + diff = (isMoment(input) || isDate(input) ? input.valueOf() : createLocal(input).valueOf()) - res.valueOf(); // Use low-level api, because this fn is low-level api. + + res._d.setTime(res._d.valueOf() + diff); + + hooks.updateOffset(res, false); + return res; + } else { + return createLocal(input).local(); + } + } + + function getDateOffset(m) { + // On Firefox.24 Date#getTimezoneOffset returns a floating point. + // https://github.com/moment/moment/pull/1871 + return -Math.round(m._d.getTimezoneOffset() / 15) * 15; + } // HOOKS + // This function will be called whenever a moment is mutated. + // It is intended to keep the offset in sync with the timezone. + + + hooks.updateOffset = function () {}; // MOMENTS + // keepLocalTime = true means only change the timezone, without + // affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]--> + // 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset + // +0200, so we adjust the time as needed, to be valid. + // + // Keeping the time actually adds/subtracts (one hour) + // from the actual represented time. That is why we call updateOffset + // a second time. In case it wants us to change the offset again + // _changeInProgress == true case, then we have to adjust, because + // there is no such time in the given timezone. + + + function getSetOffset(input, keepLocalTime, keepMinutes) { + var offset = this._offset || 0, + localAdjust; + + if (!this.isValid()) { + return input != null ? this : NaN; + } + + if (input != null) { + if (typeof input === 'string') { + input = offsetFromString(matchShortOffset, input); + + if (input === null) { + return this; + } + } else if (Math.abs(input) < 16 && !keepMinutes) { + input = input * 60; + } + + if (!this._isUTC && keepLocalTime) { + localAdjust = getDateOffset(this); + } + + this._offset = input; + this._isUTC = true; + + if (localAdjust != null) { + this.add(localAdjust, 'm'); + } + + if (offset !== input) { + if (!keepLocalTime || this._changeInProgress) { + addSubtract(this, createDuration(input - offset, 'm'), 1, false); + } else if (!this._changeInProgress) { + this._changeInProgress = true; + hooks.updateOffset(this, true); + this._changeInProgress = null; + } + } + + return this; + } else { + return this._isUTC ? offset : getDateOffset(this); + } + } + + function getSetZone(input, keepLocalTime) { + if (input != null) { + if (typeof input !== 'string') { + input = -input; + } + + this.utcOffset(input, keepLocalTime); + return this; + } else { + return -this.utcOffset(); + } + } + + function setOffsetToUTC(keepLocalTime) { + return this.utcOffset(0, keepLocalTime); + } + + function setOffsetToLocal(keepLocalTime) { + if (this._isUTC) { + this.utcOffset(0, keepLocalTime); + this._isUTC = false; + + if (keepLocalTime) { + this.subtract(getDateOffset(this), 'm'); + } + } + + return this; + } + + function setOffsetToParsedOffset() { + if (this._tzm != null) { + this.utcOffset(this._tzm, false, true); + } else if (typeof this._i === 'string') { + var tZone = offsetFromString(matchOffset, this._i); + + if (tZone != null) { + this.utcOffset(tZone); + } else { + this.utcOffset(0, true); + } + } + + return this; + } + + function hasAlignedHourOffset(input) { + if (!this.isValid()) { + return false; + } + + input = input ? createLocal(input).utcOffset() : 0; + return (this.utcOffset() - input) % 60 === 0; + } + + function isDaylightSavingTime() { + return this.utcOffset() > this.clone().month(0).utcOffset() || this.utcOffset() > this.clone().month(5).utcOffset(); + } + + function isDaylightSavingTimeShifted() { + if (!isUndefined(this._isDSTShifted)) { + return this._isDSTShifted; + } + + var c = {}; + copyConfig(c, this); + c = prepareConfig(c); + + if (c._a) { + var other = c._isUTC ? createUTC(c._a) : createLocal(c._a); + this._isDSTShifted = this.isValid() && compareArrays(c._a, other.toArray()) > 0; + } else { + this._isDSTShifted = false; + } + + return this._isDSTShifted; + } + + function isLocal() { + return this.isValid() ? !this._isUTC : false; + } + + function isUtcOffset() { + return this.isValid() ? this._isUTC : false; + } + + function isUtc() { + return this.isValid() ? this._isUTC && this._offset === 0 : false; + } // ASP.NET json date format regex + + + var aspNetRegex = /^(\-|\+)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/; // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html + // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere + // and further modified to allow for strings containing both week and day + + var isoRegex = /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/; + + function createDuration(input, key) { + var duration = input, + // matching against regexp is expensive, do it on demand + match = null, + sign, + ret, + diffRes; + + if (isDuration(input)) { + duration = { + ms: input._milliseconds, + d: input._days, + M: input._months + }; + } else if (isNumber(input)) { + duration = {}; + + if (key) { + duration[key] = input; + } else { + duration.milliseconds = input; + } + } else if (!!(match = aspNetRegex.exec(input))) { + sign = match[1] === '-' ? -1 : 1; + duration = { + y: 0, + d: toInt(match[DATE]) * sign, + h: toInt(match[HOUR]) * sign, + m: toInt(match[MINUTE]) * sign, + s: toInt(match[SECOND]) * sign, + ms: toInt(absRound(match[MILLISECOND] * 1000)) * sign // the millisecond decimal point is included in the match + + }; + } else if (!!(match = isoRegex.exec(input))) { + sign = match[1] === '-' ? -1 : 1; + duration = { + y: parseIso(match[2], sign), + M: parseIso(match[3], sign), + w: parseIso(match[4], sign), + d: parseIso(match[5], sign), + h: parseIso(match[6], sign), + m: parseIso(match[7], sign), + s: parseIso(match[8], sign) + }; + } else if (duration == null) { + // checks for null or undefined + duration = {}; + } else if (typeof duration === 'object' && ('from' in duration || 'to' in duration)) { + diffRes = momentsDifference(createLocal(duration.from), createLocal(duration.to)); + duration = {}; + duration.ms = diffRes.milliseconds; + duration.M = diffRes.months; + } + + ret = new Duration(duration); + + if (isDuration(input) && hasOwnProp(input, '_locale')) { + ret._locale = input._locale; + } + + return ret; + } + + createDuration.fn = Duration.prototype; + createDuration.invalid = createInvalid$1; + + function parseIso(inp, sign) { + // We'd normally use ~~inp for this, but unfortunately it also + // converts floats to ints. + // inp may be undefined, so careful calling replace on it. + var res = inp && parseFloat(inp.replace(',', '.')); // apply sign while we're at it + + return (isNaN(res) ? 0 : res) * sign; + } + + function positiveMomentsDifference(base, other) { + var res = {}; + res.months = other.month() - base.month() + (other.year() - base.year()) * 12; + + if (base.clone().add(res.months, 'M').isAfter(other)) { + --res.months; + } + + res.milliseconds = +other - +base.clone().add(res.months, 'M'); + return res; + } + + function momentsDifference(base, other) { + var res; + + if (!(base.isValid() && other.isValid())) { + return { + milliseconds: 0, + months: 0 + }; + } + + other = cloneWithOffset(other, base); + + if (base.isBefore(other)) { + res = positiveMomentsDifference(base, other); + } else { + res = positiveMomentsDifference(other, base); + res.milliseconds = -res.milliseconds; + res.months = -res.months; + } + + return res; + } // TODO: remove 'name' arg after deprecation is removed + + + function createAdder(direction, name) { + return function (val, period) { + var dur, tmp; //invert the arguments, but complain about it + + if (period !== null && !isNaN(+period)) { + deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' + 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.'); + tmp = val; + val = period; + period = tmp; + } + + val = typeof val === 'string' ? +val : val; + dur = createDuration(val, period); + addSubtract(this, dur, direction); + return this; + }; + } + + function addSubtract(mom, duration, isAdding, updateOffset) { + var milliseconds = duration._milliseconds, + days = absRound(duration._days), + months = absRound(duration._months); + + if (!mom.isValid()) { + // No op + return; + } + + updateOffset = updateOffset == null ? true : updateOffset; + + if (months) { + setMonth(mom, get(mom, 'Month') + months * isAdding); + } + + if (days) { + set$1(mom, 'Date', get(mom, 'Date') + days * isAdding); + } + + if (milliseconds) { + mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding); + } + + if (updateOffset) { + hooks.updateOffset(mom, days || months); + } + } + + var add = createAdder(1, 'add'); + var subtract = createAdder(-1, 'subtract'); + + function getCalendarFormat(myMoment, now) { + var diff = myMoment.diff(now, 'days', true); + return diff < -6 ? 'sameElse' : diff < -1 ? 'lastWeek' : diff < 0 ? 'lastDay' : diff < 1 ? 'sameDay' : diff < 2 ? 'nextDay' : diff < 7 ? 'nextWeek' : 'sameElse'; + } + + function calendar$1(time, formats) { + // We want to compare the start of today, vs this. + // Getting start-of-today depends on whether we're local/utc/offset or not. + var now = time || createLocal(), + sod = cloneWithOffset(now, this).startOf('day'), + format = hooks.calendarFormat(this, sod) || 'sameElse'; + var output = formats && (isFunction(formats[format]) ? formats[format].call(this, now) : formats[format]); + return this.format(output || this.localeData().calendar(format, this, createLocal(now))); + } + + function clone() { + return new Moment(this); + } + + function isAfter(input, units) { + var localInput = isMoment(input) ? input : createLocal(input); + + if (!(this.isValid() && localInput.isValid())) { + return false; + } + + units = normalizeUnits(units) || 'millisecond'; + + if (units === 'millisecond') { + return this.valueOf() > localInput.valueOf(); + } else { + return localInput.valueOf() < this.clone().startOf(units).valueOf(); + } + } + + function isBefore(input, units) { + var localInput = isMoment(input) ? input : createLocal(input); + + if (!(this.isValid() && localInput.isValid())) { + return false; + } + + units = normalizeUnits(units) || 'millisecond'; + + if (units === 'millisecond') { + return this.valueOf() < localInput.valueOf(); + } else { + return this.clone().endOf(units).valueOf() < localInput.valueOf(); + } + } + + function isBetween(from, to, units, inclusivity) { + var localFrom = isMoment(from) ? from : createLocal(from), + localTo = isMoment(to) ? to : createLocal(to); + + if (!(this.isValid() && localFrom.isValid() && localTo.isValid())) { + return false; + } + + inclusivity = inclusivity || '()'; + return (inclusivity[0] === '(' ? this.isAfter(localFrom, units) : !this.isBefore(localFrom, units)) && (inclusivity[1] === ')' ? this.isBefore(localTo, units) : !this.isAfter(localTo, units)); + } + + function isSame(input, units) { + var localInput = isMoment(input) ? input : createLocal(input), + inputMs; + + if (!(this.isValid() && localInput.isValid())) { + return false; + } + + units = normalizeUnits(units) || 'millisecond'; + + if (units === 'millisecond') { + return this.valueOf() === localInput.valueOf(); + } else { + inputMs = localInput.valueOf(); + return this.clone().startOf(units).valueOf() <= inputMs && inputMs <= this.clone().endOf(units).valueOf(); + } + } + + function isSameOrAfter(input, units) { + return this.isSame(input, units) || this.isAfter(input, units); + } + + function isSameOrBefore(input, units) { + return this.isSame(input, units) || this.isBefore(input, units); + } + + function diff(input, units, asFloat) { + var that, zoneDelta, output; + + if (!this.isValid()) { + return NaN; + } + + that = cloneWithOffset(input, this); + + if (!that.isValid()) { + return NaN; + } + + zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4; + units = normalizeUnits(units); + + switch (units) { + case 'year': + output = monthDiff(this, that) / 12; + break; + + case 'month': + output = monthDiff(this, that); + break; + + case 'quarter': + output = monthDiff(this, that) / 3; + break; + + case 'second': + output = (this - that) / 1e3; + break; + // 1000 + + case 'minute': + output = (this - that) / 6e4; + break; + // 1000 * 60 + + case 'hour': + output = (this - that) / 36e5; + break; + // 1000 * 60 * 60 + + case 'day': + output = (this - that - zoneDelta) / 864e5; + break; + // 1000 * 60 * 60 * 24, negate dst + + case 'week': + output = (this - that - zoneDelta) / 6048e5; + break; + // 1000 * 60 * 60 * 24 * 7, negate dst + + default: + output = this - that; + } + + return asFloat ? output : absFloor(output); + } + + function monthDiff(a, b) { + // difference in months + var wholeMonthDiff = (b.year() - a.year()) * 12 + (b.month() - a.month()), + // b is in (anchor - 1 month, anchor + 1 month) + anchor = a.clone().add(wholeMonthDiff, 'months'), + anchor2, + adjust; + + if (b - anchor < 0) { + anchor2 = a.clone().add(wholeMonthDiff - 1, 'months'); // linear across the month + + adjust = (b - anchor) / (anchor - anchor2); + } else { + anchor2 = a.clone().add(wholeMonthDiff + 1, 'months'); // linear across the month + + adjust = (b - anchor) / (anchor2 - anchor); + } //check for negative zero, return zero if negative zero + + + return -(wholeMonthDiff + adjust) || 0; + } + + hooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ'; + hooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]'; + + function toString() { + return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ'); + } + + function toISOString(keepOffset) { + if (!this.isValid()) { + return null; + } + + var utc = keepOffset !== true; + var m = utc ? this.clone().utc() : this; + + if (m.year() < 0 || m.year() > 9999) { + return formatMoment(m, utc ? 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYYYY-MM-DD[T]HH:mm:ss.SSSZ'); + } + + if (isFunction(Date.prototype.toISOString)) { + // native implementation is ~50x faster, use it when we can + if (utc) { + return this.toDate().toISOString(); + } else { + return new Date(this.valueOf() + this.utcOffset() * 60 * 1000).toISOString().replace('Z', formatMoment(m, 'Z')); + } + } + + return formatMoment(m, utc ? 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYY-MM-DD[T]HH:mm:ss.SSSZ'); + } + /** + * Return a human readable representation of a moment that can + * also be evaluated to get a new moment which is the same + * + * @link https://nodejs.org/dist/latest/docs/api/util.html#util_custom_inspect_function_on_objects + */ + + + function inspect() { + if (!this.isValid()) { + return 'moment.invalid(/* ' + this._i + ' */)'; + } + + var func = 'moment'; + var zone = ''; + + if (!this.isLocal()) { + func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone'; + zone = 'Z'; + } + + var prefix = '[' + func + '("]'; + var year = 0 <= this.year() && this.year() <= 9999 ? 'YYYY' : 'YYYYYY'; + var datetime = '-MM-DD[T]HH:mm:ss.SSS'; + var suffix = zone + '[")]'; + return this.format(prefix + year + datetime + suffix); + } + + function format(inputString) { + if (!inputString) { + inputString = this.isUtc() ? hooks.defaultFormatUtc : hooks.defaultFormat; + } + + var output = formatMoment(this, inputString); + return this.localeData().postformat(output); + } + + function from(time, withoutSuffix) { + if (this.isValid() && (isMoment(time) && time.isValid() || createLocal(time).isValid())) { + return createDuration({ + to: this, + from: time + }).locale(this.locale()).humanize(!withoutSuffix); + } else { + return this.localeData().invalidDate(); + } + } + + function fromNow(withoutSuffix) { + return this.from(createLocal(), withoutSuffix); + } + + function to(time, withoutSuffix) { + if (this.isValid() && (isMoment(time) && time.isValid() || createLocal(time).isValid())) { + return createDuration({ + from: this, + to: time + }).locale(this.locale()).humanize(!withoutSuffix); + } else { + return this.localeData().invalidDate(); + } + } + + function toNow(withoutSuffix) { + return this.to(createLocal(), withoutSuffix); + } // If passed a locale key, it will set the locale for this + // instance. Otherwise, it will return the locale configuration + // variables for this instance. + + + function locale(key) { + var newLocaleData; + + if (key === undefined) { + return this._locale._abbr; + } else { + newLocaleData = getLocale(key); + + if (newLocaleData != null) { + this._locale = newLocaleData; + } + + return this; + } + } + + var lang = deprecate('moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.', function (key) { + if (key === undefined) { + return this.localeData(); + } else { + return this.locale(key); + } + }); + + function localeData() { + return this._locale; + } + + var MS_PER_SECOND = 1000; + var MS_PER_MINUTE = 60 * MS_PER_SECOND; + var MS_PER_HOUR = 60 * MS_PER_MINUTE; + var MS_PER_400_YEARS = (365 * 400 + 97) * 24 * MS_PER_HOUR; // actual modulo - handles negative numbers (for dates before 1970): + + function mod$1(dividend, divisor) { + return (dividend % divisor + divisor) % divisor; + } + + function localStartOfDate(y, m, d) { + // the date constructor remaps years 0-99 to 1900-1999 + if (y < 100 && y >= 0) { + // preserve leap years using a full 400 year cycle, then reset + return new Date(y + 400, m, d) - MS_PER_400_YEARS; + } else { + return new Date(y, m, d).valueOf(); + } + } + + function utcStartOfDate(y, m, d) { + // Date.UTC remaps years 0-99 to 1900-1999 + if (y < 100 && y >= 0) { + // preserve leap years using a full 400 year cycle, then reset + return Date.UTC(y + 400, m, d) - MS_PER_400_YEARS; + } else { + return Date.UTC(y, m, d); + } + } + + function startOf(units) { + var time; + units = normalizeUnits(units); + + if (units === undefined || units === 'millisecond' || !this.isValid()) { + return this; + } + + var startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate; + + switch (units) { + case 'year': + time = startOfDate(this.year(), 0, 1); + break; + + case 'quarter': + time = startOfDate(this.year(), this.month() - this.month() % 3, 1); + break; + + case 'month': + time = startOfDate(this.year(), this.month(), 1); + break; + + case 'week': + time = startOfDate(this.year(), this.month(), this.date() - this.weekday()); + break; + + case 'isoWeek': + time = startOfDate(this.year(), this.month(), this.date() - (this.isoWeekday() - 1)); + break; + + case 'day': + case 'date': + time = startOfDate(this.year(), this.month(), this.date()); + break; + + case 'hour': + time = this._d.valueOf(); + time -= mod$1(time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE), MS_PER_HOUR); + break; + + case 'minute': + time = this._d.valueOf(); + time -= mod$1(time, MS_PER_MINUTE); + break; + + case 'second': + time = this._d.valueOf(); + time -= mod$1(time, MS_PER_SECOND); + break; + } + + this._d.setTime(time); + + hooks.updateOffset(this, true); + return this; + } + + function endOf(units) { + var time; + units = normalizeUnits(units); + + if (units === undefined || units === 'millisecond' || !this.isValid()) { + return this; + } + + var startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate; + + switch (units) { + case 'year': + time = startOfDate(this.year() + 1, 0, 1) - 1; + break; + + case 'quarter': + time = startOfDate(this.year(), this.month() - this.month() % 3 + 3, 1) - 1; + break; + + case 'month': + time = startOfDate(this.year(), this.month() + 1, 1) - 1; + break; + + case 'week': + time = startOfDate(this.year(), this.month(), this.date() - this.weekday() + 7) - 1; + break; + + case 'isoWeek': + time = startOfDate(this.year(), this.month(), this.date() - (this.isoWeekday() - 1) + 7) - 1; + break; + + case 'day': + case 'date': + time = startOfDate(this.year(), this.month(), this.date() + 1) - 1; + break; + + case 'hour': + time = this._d.valueOf(); + time += MS_PER_HOUR - mod$1(time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE), MS_PER_HOUR) - 1; + break; + + case 'minute': + time = this._d.valueOf(); + time += MS_PER_MINUTE - mod$1(time, MS_PER_MINUTE) - 1; + break; + + case 'second': + time = this._d.valueOf(); + time += MS_PER_SECOND - mod$1(time, MS_PER_SECOND) - 1; + break; + } + + this._d.setTime(time); + + hooks.updateOffset(this, true); + return this; + } + + function valueOf() { + return this._d.valueOf() - (this._offset || 0) * 60000; + } + + function unix() { + return Math.floor(this.valueOf() / 1000); + } + + function toDate() { + return new Date(this.valueOf()); + } + + function toArray() { + var m = this; + return [m.year(), m.month(), m.date(), m.hour(), m.minute(), m.second(), m.millisecond()]; + } + + function toObject() { + var m = this; + return { + years: m.year(), + months: m.month(), + date: m.date(), + hours: m.hours(), + minutes: m.minutes(), + seconds: m.seconds(), + milliseconds: m.milliseconds() + }; + } + + function toJSON() { + // new Date(NaN).toJSON() === null + return this.isValid() ? this.toISOString() : null; + } + + function isValid$2() { + return isValid(this); + } + + function parsingFlags() { + return extend({}, getParsingFlags(this)); + } + + function invalidAt() { + return getParsingFlags(this).overflow; + } + + function creationData() { + return { + input: this._i, + format: this._f, + locale: this._locale, + isUTC: this._isUTC, + strict: this._strict + }; + } // FORMATTING + + + addFormatToken(0, ['gg', 2], 0, function () { + return this.weekYear() % 100; + }); + addFormatToken(0, ['GG', 2], 0, function () { + return this.isoWeekYear() % 100; + }); + + function addWeekYearFormatToken(token, getter) { + addFormatToken(0, [token, token.length], 0, getter); + } + + addWeekYearFormatToken('gggg', 'weekYear'); + addWeekYearFormatToken('ggggg', 'weekYear'); + addWeekYearFormatToken('GGGG', 'isoWeekYear'); + addWeekYearFormatToken('GGGGG', 'isoWeekYear'); // ALIASES + + addUnitAlias('weekYear', 'gg'); + addUnitAlias('isoWeekYear', 'GG'); // PRIORITY + + addUnitPriority('weekYear', 1); + addUnitPriority('isoWeekYear', 1); // PARSING + + addRegexToken('G', matchSigned); + addRegexToken('g', matchSigned); + addRegexToken('GG', match1to2, match2); + addRegexToken('gg', match1to2, match2); + addRegexToken('GGGG', match1to4, match4); + addRegexToken('gggg', match1to4, match4); + addRegexToken('GGGGG', match1to6, match6); + addRegexToken('ggggg', match1to6, match6); + addWeekParseToken(['gggg', 'ggggg', 'GGGG', 'GGGGG'], function (input, week, config, token) { + week[token.substr(0, 2)] = toInt(input); + }); + addWeekParseToken(['gg', 'GG'], function (input, week, config, token) { + week[token] = hooks.parseTwoDigitYear(input); + }); // MOMENTS + + function getSetWeekYear(input) { + return getSetWeekYearHelper.call(this, input, this.week(), this.weekday(), this.localeData()._week.dow, this.localeData()._week.doy); + } + + function getSetISOWeekYear(input) { + return getSetWeekYearHelper.call(this, input, this.isoWeek(), this.isoWeekday(), 1, 4); + } + + function getISOWeeksInYear() { + return weeksInYear(this.year(), 1, 4); + } + + function getWeeksInYear() { + var weekInfo = this.localeData()._week; + + return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy); + } + + function getSetWeekYearHelper(input, week, weekday, dow, doy) { + var weeksTarget; + + if (input == null) { + return weekOfYear(this, dow, doy).year; + } else { + weeksTarget = weeksInYear(input, dow, doy); + + if (week > weeksTarget) { + week = weeksTarget; + } + + return setWeekAll.call(this, input, week, weekday, dow, doy); + } + } + + function setWeekAll(weekYear, week, weekday, dow, doy) { + var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy), + date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear); + this.year(date.getUTCFullYear()); + this.month(date.getUTCMonth()); + this.date(date.getUTCDate()); + return this; + } // FORMATTING + + + addFormatToken('Q', 0, 'Qo', 'quarter'); // ALIASES + + addUnitAlias('quarter', 'Q'); // PRIORITY + + addUnitPriority('quarter', 7); // PARSING + + addRegexToken('Q', match1); + addParseToken('Q', function (input, array) { + array[MONTH] = (toInt(input) - 1) * 3; + }); // MOMENTS + + function getSetQuarter(input) { + return input == null ? Math.ceil((this.month() + 1) / 3) : this.month((input - 1) * 3 + this.month() % 3); + } // FORMATTING + + + addFormatToken('D', ['DD', 2], 'Do', 'date'); // ALIASES + + addUnitAlias('date', 'D'); // PRIORITY + + addUnitPriority('date', 9); // PARSING + + addRegexToken('D', match1to2); + addRegexToken('DD', match1to2, match2); + addRegexToken('Do', function (isStrict, locale) { + // TODO: Remove "ordinalParse" fallback in next major release. + return isStrict ? locale._dayOfMonthOrdinalParse || locale._ordinalParse : locale._dayOfMonthOrdinalParseLenient; + }); + addParseToken(['D', 'DD'], DATE); + addParseToken('Do', function (input, array) { + array[DATE] = toInt(input.match(match1to2)[0]); + }); // MOMENTS + + var getSetDayOfMonth = makeGetSet('Date', true); // FORMATTING + + addFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear'); // ALIASES + + addUnitAlias('dayOfYear', 'DDD'); // PRIORITY + + addUnitPriority('dayOfYear', 4); // PARSING + + addRegexToken('DDD', match1to3); + addRegexToken('DDDD', match3); + addParseToken(['DDD', 'DDDD'], function (input, array, config) { + config._dayOfYear = toInt(input); + }); // HELPERS + // MOMENTS + + function getSetDayOfYear(input) { + var dayOfYear = Math.round((this.clone().startOf('day') - this.clone().startOf('year')) / 864e5) + 1; + return input == null ? dayOfYear : this.add(input - dayOfYear, 'd'); + } // FORMATTING + + + addFormatToken('m', ['mm', 2], 0, 'minute'); // ALIASES + + addUnitAlias('minute', 'm'); // PRIORITY + + addUnitPriority('minute', 14); // PARSING + + addRegexToken('m', match1to2); + addRegexToken('mm', match1to2, match2); + addParseToken(['m', 'mm'], MINUTE); // MOMENTS + + var getSetMinute = makeGetSet('Minutes', false); // FORMATTING + + addFormatToken('s', ['ss', 2], 0, 'second'); // ALIASES + + addUnitAlias('second', 's'); // PRIORITY + + addUnitPriority('second', 15); // PARSING + + addRegexToken('s', match1to2); + addRegexToken('ss', match1to2, match2); + addParseToken(['s', 'ss'], SECOND); // MOMENTS + + var getSetSecond = makeGetSet('Seconds', false); // FORMATTING + + addFormatToken('S', 0, 0, function () { + return ~~(this.millisecond() / 100); + }); + addFormatToken(0, ['SS', 2], 0, function () { + return ~~(this.millisecond() / 10); + }); + addFormatToken(0, ['SSS', 3], 0, 'millisecond'); + addFormatToken(0, ['SSSS', 4], 0, function () { + return this.millisecond() * 10; + }); + addFormatToken(0, ['SSSSS', 5], 0, function () { + return this.millisecond() * 100; + }); + addFormatToken(0, ['SSSSSS', 6], 0, function () { + return this.millisecond() * 1000; + }); + addFormatToken(0, ['SSSSSSS', 7], 0, function () { + return this.millisecond() * 10000; + }); + addFormatToken(0, ['SSSSSSSS', 8], 0, function () { + return this.millisecond() * 100000; + }); + addFormatToken(0, ['SSSSSSSSS', 9], 0, function () { + return this.millisecond() * 1000000; + }); // ALIASES + + addUnitAlias('millisecond', 'ms'); // PRIORITY + + addUnitPriority('millisecond', 16); // PARSING + + addRegexToken('S', match1to3, match1); + addRegexToken('SS', match1to3, match2); + addRegexToken('SSS', match1to3, match3); + var token; + + for (token = 'SSSS'; token.length <= 9; token += 'S') { + addRegexToken(token, matchUnsigned); + } + + function parseMs(input, array) { + array[MILLISECOND] = toInt(('0.' + input) * 1000); + } + + for (token = 'S'; token.length <= 9; token += 'S') { + addParseToken(token, parseMs); + } // MOMENTS + + + var getSetMillisecond = makeGetSet('Milliseconds', false); // FORMATTING + + addFormatToken('z', 0, 0, 'zoneAbbr'); + addFormatToken('zz', 0, 0, 'zoneName'); // MOMENTS + + function getZoneAbbr() { + return this._isUTC ? 'UTC' : ''; + } + + function getZoneName() { + return this._isUTC ? 'Coordinated Universal Time' : ''; + } + + var proto = Moment.prototype; + proto.add = add; + proto.calendar = calendar$1; + proto.clone = clone; + proto.diff = diff; + proto.endOf = endOf; + proto.format = format; + proto.from = from; + proto.fromNow = fromNow; + proto.to = to; + proto.toNow = toNow; + proto.get = stringGet; + proto.invalidAt = invalidAt; + proto.isAfter = isAfter; + proto.isBefore = isBefore; + proto.isBetween = isBetween; + proto.isSame = isSame; + proto.isSameOrAfter = isSameOrAfter; + proto.isSameOrBefore = isSameOrBefore; + proto.isValid = isValid$2; + proto.lang = lang; + proto.locale = locale; + proto.localeData = localeData; + proto.max = prototypeMax; + proto.min = prototypeMin; + proto.parsingFlags = parsingFlags; + proto.set = stringSet; + proto.startOf = startOf; + proto.subtract = subtract; + proto.toArray = toArray; + proto.toObject = toObject; + proto.toDate = toDate; + proto.toISOString = toISOString; + proto.inspect = inspect; + proto.toJSON = toJSON; + proto.toString = toString; + proto.unix = unix; + proto.valueOf = valueOf; + proto.creationData = creationData; + proto.year = getSetYear; + proto.isLeapYear = getIsLeapYear; + proto.weekYear = getSetWeekYear; + proto.isoWeekYear = getSetISOWeekYear; + proto.quarter = proto.quarters = getSetQuarter; + proto.month = getSetMonth; + proto.daysInMonth = getDaysInMonth; + proto.week = proto.weeks = getSetWeek; + proto.isoWeek = proto.isoWeeks = getSetISOWeek; + proto.weeksInYear = getWeeksInYear; + proto.isoWeeksInYear = getISOWeeksInYear; + proto.date = getSetDayOfMonth; + proto.day = proto.days = getSetDayOfWeek; + proto.weekday = getSetLocaleDayOfWeek; + proto.isoWeekday = getSetISODayOfWeek; + proto.dayOfYear = getSetDayOfYear; + proto.hour = proto.hours = getSetHour; + proto.minute = proto.minutes = getSetMinute; + proto.second = proto.seconds = getSetSecond; + proto.millisecond = proto.milliseconds = getSetMillisecond; + proto.utcOffset = getSetOffset; + proto.utc = setOffsetToUTC; + proto.local = setOffsetToLocal; + proto.parseZone = setOffsetToParsedOffset; + proto.hasAlignedHourOffset = hasAlignedHourOffset; + proto.isDST = isDaylightSavingTime; + proto.isLocal = isLocal; + proto.isUtcOffset = isUtcOffset; + proto.isUtc = isUtc; + proto.isUTC = isUtc; + proto.zoneAbbr = getZoneAbbr; + proto.zoneName = getZoneName; + proto.dates = deprecate('dates accessor is deprecated. Use date instead.', getSetDayOfMonth); + proto.months = deprecate('months accessor is deprecated. Use month instead', getSetMonth); + proto.years = deprecate('years accessor is deprecated. Use year instead', getSetYear); + proto.zone = deprecate('moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/', getSetZone); + proto.isDSTShifted = deprecate('isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information', isDaylightSavingTimeShifted); + + function createUnix(input) { + return createLocal(input * 1000); + } + + function createInZone() { + return createLocal.apply(null, arguments).parseZone(); + } + + function preParsePostFormat(string) { + return string; + } + + var proto$1 = Locale.prototype; + proto$1.calendar = calendar; + proto$1.longDateFormat = longDateFormat; + proto$1.invalidDate = invalidDate; + proto$1.ordinal = ordinal; + proto$1.preparse = preParsePostFormat; + proto$1.postformat = preParsePostFormat; + proto$1.relativeTime = relativeTime; + proto$1.pastFuture = pastFuture; + proto$1.set = set; + proto$1.months = localeMonths; + proto$1.monthsShort = localeMonthsShort; + proto$1.monthsParse = localeMonthsParse; + proto$1.monthsRegex = monthsRegex; + proto$1.monthsShortRegex = monthsShortRegex; + proto$1.week = localeWeek; + proto$1.firstDayOfYear = localeFirstDayOfYear; + proto$1.firstDayOfWeek = localeFirstDayOfWeek; + proto$1.weekdays = localeWeekdays; + proto$1.weekdaysMin = localeWeekdaysMin; + proto$1.weekdaysShort = localeWeekdaysShort; + proto$1.weekdaysParse = localeWeekdaysParse; + proto$1.weekdaysRegex = weekdaysRegex; + proto$1.weekdaysShortRegex = weekdaysShortRegex; + proto$1.weekdaysMinRegex = weekdaysMinRegex; + proto$1.isPM = localeIsPM; + proto$1.meridiem = localeMeridiem; + + function get$1(format, index, field, setter) { + var locale = getLocale(); + var utc = createUTC().set(setter, index); + return locale[field](utc, format); + } + + function listMonthsImpl(format, index, field) { + if (isNumber(format)) { + index = format; + format = undefined; + } + + format = format || ''; + + if (index != null) { + return get$1(format, index, field, 'month'); + } + + var i; + var out = []; + + for (i = 0; i < 12; i++) { + out[i] = get$1(format, i, field, 'month'); + } + + return out; + } // () + // (5) + // (fmt, 5) + // (fmt) + // (true) + // (true, 5) + // (true, fmt, 5) + // (true, fmt) + + + function listWeekdaysImpl(localeSorted, format, index, field) { + if (typeof localeSorted === 'boolean') { + if (isNumber(format)) { + index = format; + format = undefined; + } + + format = format || ''; + } else { + format = localeSorted; + index = format; + localeSorted = false; + + if (isNumber(format)) { + index = format; + format = undefined; + } + + format = format || ''; + } + + var locale = getLocale(), + shift = localeSorted ? locale._week.dow : 0; + + if (index != null) { + return get$1(format, (index + shift) % 7, field, 'day'); + } + + var i; + var out = []; + + for (i = 0; i < 7; i++) { + out[i] = get$1(format, (i + shift) % 7, field, 'day'); + } + + return out; + } + + function listMonths(format, index) { + return listMonthsImpl(format, index, 'months'); + } + + function listMonthsShort(format, index) { + return listMonthsImpl(format, index, 'monthsShort'); + } + + function listWeekdays(localeSorted, format, index) { + return listWeekdaysImpl(localeSorted, format, index, 'weekdays'); + } + + function listWeekdaysShort(localeSorted, format, index) { + return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort'); + } + + function listWeekdaysMin(localeSorted, format, index) { + return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin'); + } + + getSetGlobalLocale('en', { + dayOfMonthOrdinalParse: /\d{1,2}(th|st|nd|rd)/, + ordinal: function (number) { + var b = number % 10, + output = toInt(number % 100 / 10) === 1 ? 'th' : b === 1 ? 'st' : b === 2 ? 'nd' : b === 3 ? 'rd' : 'th'; + return number + output; + } + }); // Side effect imports + + hooks.lang = deprecate('moment.lang is deprecated. Use moment.locale instead.', getSetGlobalLocale); + hooks.langData = deprecate('moment.langData is deprecated. Use moment.localeData instead.', getLocale); + var mathAbs = Math.abs; + + function abs() { + var data = this._data; + this._milliseconds = mathAbs(this._milliseconds); + this._days = mathAbs(this._days); + this._months = mathAbs(this._months); + data.milliseconds = mathAbs(data.milliseconds); + data.seconds = mathAbs(data.seconds); + data.minutes = mathAbs(data.minutes); + data.hours = mathAbs(data.hours); + data.months = mathAbs(data.months); + data.years = mathAbs(data.years); + return this; + } + + function addSubtract$1(duration, input, value, direction) { + var other = createDuration(input, value); + duration._milliseconds += direction * other._milliseconds; + duration._days += direction * other._days; + duration._months += direction * other._months; + return duration._bubble(); + } // supports only 2.0-style add(1, 's') or add(duration) + + + function add$1(input, value) { + return addSubtract$1(this, input, value, 1); + } // supports only 2.0-style subtract(1, 's') or subtract(duration) + + + function subtract$1(input, value) { + return addSubtract$1(this, input, value, -1); + } + + function absCeil(number) { + if (number < 0) { + return Math.floor(number); + } else { + return Math.ceil(number); + } + } + + function bubble() { + var milliseconds = this._milliseconds; + var days = this._days; + var months = this._months; + var data = this._data; + var seconds, minutes, hours, years, monthsFromDays; // if we have a mix of positive and negative values, bubble down first + // check: https://github.com/moment/moment/issues/2166 + + if (!(milliseconds >= 0 && days >= 0 && months >= 0 || milliseconds <= 0 && days <= 0 && months <= 0)) { + milliseconds += absCeil(monthsToDays(months) + days) * 864e5; + days = 0; + months = 0; + } // The following code bubbles up values, see the tests for + // examples of what that means. + + + data.milliseconds = milliseconds % 1000; + seconds = absFloor(milliseconds / 1000); + data.seconds = seconds % 60; + minutes = absFloor(seconds / 60); + data.minutes = minutes % 60; + hours = absFloor(minutes / 60); + data.hours = hours % 24; + days += absFloor(hours / 24); // convert days to months + + monthsFromDays = absFloor(daysToMonths(days)); + months += monthsFromDays; + days -= absCeil(monthsToDays(monthsFromDays)); // 12 months -> 1 year + + years = absFloor(months / 12); + months %= 12; + data.days = days; + data.months = months; + data.years = years; + return this; + } + + function daysToMonths(days) { + // 400 years have 146097 days (taking into account leap year rules) + // 400 years have 12 months === 4800 + return days * 4800 / 146097; + } + + function monthsToDays(months) { + // the reverse of daysToMonths + return months * 146097 / 4800; + } + + function as(units) { + if (!this.isValid()) { + return NaN; + } + + var days; + var months; + var milliseconds = this._milliseconds; + units = normalizeUnits(units); + + if (units === 'month' || units === 'quarter' || units === 'year') { + days = this._days + milliseconds / 864e5; + months = this._months + daysToMonths(days); + + switch (units) { + case 'month': + return months; + + case 'quarter': + return months / 3; + + case 'year': + return months / 12; + } + } else { + // handle milliseconds separately because of floating point math errors (issue #1867) + days = this._days + Math.round(monthsToDays(this._months)); + + switch (units) { + case 'week': + return days / 7 + milliseconds / 6048e5; + + case 'day': + return days + milliseconds / 864e5; + + case 'hour': + return days * 24 + milliseconds / 36e5; + + case 'minute': + return days * 1440 + milliseconds / 6e4; + + case 'second': + return days * 86400 + milliseconds / 1000; + // Math.floor prevents floating point math errors here + + case 'millisecond': + return Math.floor(days * 864e5) + milliseconds; + + default: + throw new Error('Unknown unit ' + units); + } + } + } // TODO: Use this.as('ms')? + + + function valueOf$1() { + if (!this.isValid()) { + return NaN; + } + + return this._milliseconds + this._days * 864e5 + this._months % 12 * 2592e6 + toInt(this._months / 12) * 31536e6; + } + + function makeAs(alias) { + return function () { + return this.as(alias); + }; + } + + var asMilliseconds = makeAs('ms'); + var asSeconds = makeAs('s'); + var asMinutes = makeAs('m'); + var asHours = makeAs('h'); + var asDays = makeAs('d'); + var asWeeks = makeAs('w'); + var asMonths = makeAs('M'); + var asQuarters = makeAs('Q'); + var asYears = makeAs('y'); + + function clone$1() { + return createDuration(this); + } + + function get$2(units) { + units = normalizeUnits(units); + return this.isValid() ? this[units + 's']() : NaN; + } + + function makeGetter(name) { + return function () { + return this.isValid() ? this._data[name] : NaN; + }; + } + + var milliseconds = makeGetter('milliseconds'); + var seconds = makeGetter('seconds'); + var minutes = makeGetter('minutes'); + var hours = makeGetter('hours'); + var days = makeGetter('days'); + var months = makeGetter('months'); + var years = makeGetter('years'); + + function weeks() { + return absFloor(this.days() / 7); + } + + var round = Math.round; + var thresholds = { + ss: 44, + // a few seconds to seconds + s: 45, + // seconds to minute + m: 45, + // minutes to hour + h: 22, + // hours to day + d: 26, + // days to month + M: 11 // months to year + + }; // helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize + + function substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) { + return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture); + } + + function relativeTime$1(posNegDuration, withoutSuffix, locale) { + var duration = createDuration(posNegDuration).abs(); + var seconds = round(duration.as('s')); + var minutes = round(duration.as('m')); + var hours = round(duration.as('h')); + var days = round(duration.as('d')); + var months = round(duration.as('M')); + var years = round(duration.as('y')); + var a = seconds <= thresholds.ss && ['s', seconds] || seconds < thresholds.s && ['ss', seconds] || minutes <= 1 && ['m'] || minutes < thresholds.m && ['mm', minutes] || hours <= 1 && ['h'] || hours < thresholds.h && ['hh', hours] || days <= 1 && ['d'] || days < thresholds.d && ['dd', days] || months <= 1 && ['M'] || months < thresholds.M && ['MM', months] || years <= 1 && ['y'] || ['yy', years]; + a[2] = withoutSuffix; + a[3] = +posNegDuration > 0; + a[4] = locale; + return substituteTimeAgo.apply(null, a); + } // This function allows you to set the rounding function for relative time strings + + + function getSetRelativeTimeRounding(roundingFunction) { + if (roundingFunction === undefined) { + return round; + } + + if (typeof roundingFunction === 'function') { + round = roundingFunction; + return true; + } + + return false; + } // This function allows you to set a threshold for relative time strings + + + function getSetRelativeTimeThreshold(threshold, limit) { + if (thresholds[threshold] === undefined) { + return false; + } + + if (limit === undefined) { + return thresholds[threshold]; + } + + thresholds[threshold] = limit; + + if (threshold === 's') { + thresholds.ss = limit - 1; + } + + return true; + } + + function humanize(withSuffix) { + if (!this.isValid()) { + return this.localeData().invalidDate(); + } + + var locale = this.localeData(); + var output = relativeTime$1(this, !withSuffix, locale); + + if (withSuffix) { + output = locale.pastFuture(+this, output); + } + + return locale.postformat(output); + } + + var abs$1 = Math.abs; + + function sign(x) { + return (x > 0) - (x < 0) || +x; + } + + function toISOString$1() { + // for ISO strings we do not use the normal bubbling rules: + // * milliseconds bubble up until they become hours + // * days do not bubble at all + // * months bubble up until they become years + // This is because there is no context-free conversion between hours and days + // (think of clock changes) + // and also not between days and months (28-31 days per month) + if (!this.isValid()) { + return this.localeData().invalidDate(); + } + + var seconds = abs$1(this._milliseconds) / 1000; + var days = abs$1(this._days); + var months = abs$1(this._months); + var minutes, hours, years; // 3600 seconds -> 60 minutes -> 1 hour + + minutes = absFloor(seconds / 60); + hours = absFloor(minutes / 60); + seconds %= 60; + minutes %= 60; // 12 months -> 1 year + + years = absFloor(months / 12); + months %= 12; // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js + + var Y = years; + var M = months; + var D = days; + var h = hours; + var m = minutes; + var s = seconds ? seconds.toFixed(3).replace(/\.?0+$/, '') : ''; + var total = this.asSeconds(); + + if (!total) { + // this is the same as C#'s (Noda) and python (isodate)... + // but not other JS (goog.date) + return 'P0D'; + } + + var totalSign = total < 0 ? '-' : ''; + var ymSign = sign(this._months) !== sign(total) ? '-' : ''; + var daysSign = sign(this._days) !== sign(total) ? '-' : ''; + var hmsSign = sign(this._milliseconds) !== sign(total) ? '-' : ''; + return totalSign + 'P' + (Y ? ymSign + Y + 'Y' : '') + (M ? ymSign + M + 'M' : '') + (D ? daysSign + D + 'D' : '') + (h || m || s ? 'T' : '') + (h ? hmsSign + h + 'H' : '') + (m ? hmsSign + m + 'M' : '') + (s ? hmsSign + s + 'S' : ''); + } + + var proto$2 = Duration.prototype; + proto$2.isValid = isValid$1; + proto$2.abs = abs; + proto$2.add = add$1; + proto$2.subtract = subtract$1; + proto$2.as = as; + proto$2.asMilliseconds = asMilliseconds; + proto$2.asSeconds = asSeconds; + proto$2.asMinutes = asMinutes; + proto$2.asHours = asHours; + proto$2.asDays = asDays; + proto$2.asWeeks = asWeeks; + proto$2.asMonths = asMonths; + proto$2.asQuarters = asQuarters; + proto$2.asYears = asYears; + proto$2.valueOf = valueOf$1; + proto$2._bubble = bubble; + proto$2.clone = clone$1; + proto$2.get = get$2; + proto$2.milliseconds = milliseconds; + proto$2.seconds = seconds; + proto$2.minutes = minutes; + proto$2.hours = hours; + proto$2.days = days; + proto$2.weeks = weeks; + proto$2.months = months; + proto$2.years = years; + proto$2.humanize = humanize; + proto$2.toISOString = toISOString$1; + proto$2.toString = toISOString$1; + proto$2.toJSON = toISOString$1; + proto$2.locale = locale; + proto$2.localeData = localeData; + proto$2.toIsoString = deprecate('toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)', toISOString$1); + proto$2.lang = lang; // Side effect imports + // FORMATTING + + addFormatToken('X', 0, 0, 'unix'); + addFormatToken('x', 0, 0, 'valueOf'); // PARSING + + addRegexToken('x', matchSigned); + addRegexToken('X', matchTimestamp); + addParseToken('X', function (input, array, config) { + config._d = new Date(parseFloat(input, 10) * 1000); + }); + addParseToken('x', function (input, array, config) { + config._d = new Date(toInt(input)); + }); // Side effect imports + + hooks.version = '2.24.0'; + setHookCallback(createLocal); + hooks.fn = proto; + hooks.min = min; + hooks.max = max; + hooks.now = now; + hooks.utc = createUTC; + hooks.unix = createUnix; + hooks.months = listMonths; + hooks.isDate = isDate; + hooks.locale = getSetGlobalLocale; + hooks.invalid = createInvalid; + hooks.duration = createDuration; + hooks.isMoment = isMoment; + hooks.weekdays = listWeekdays; + hooks.parseZone = createInZone; + hooks.localeData = getLocale; + hooks.isDuration = isDuration; + hooks.monthsShort = listMonthsShort; + hooks.weekdaysMin = listWeekdaysMin; + hooks.defineLocale = defineLocale; + hooks.updateLocale = updateLocale; + hooks.locales = listLocales; + hooks.weekdaysShort = listWeekdaysShort; + hooks.normalizeUnits = normalizeUnits; + hooks.relativeTimeRounding = getSetRelativeTimeRounding; + hooks.relativeTimeThreshold = getSetRelativeTimeThreshold; + hooks.calendarFormat = getCalendarFormat; + hooks.prototype = proto; // currently HTML5 input type only supports 24-hour formats + + hooks.HTML5_FMT = { + DATETIME_LOCAL: 'YYYY-MM-DDTHH:mm', + // + DATETIME_LOCAL_SECONDS: 'YYYY-MM-DDTHH:mm:ss', + // + DATETIME_LOCAL_MS: 'YYYY-MM-DDTHH:mm:ss.SSS', + // + DATE: 'YYYY-MM-DD', + // + TIME: 'HH:mm', + // + TIME_SECONDS: 'HH:mm:ss', + // + TIME_MS: 'HH:mm:ss.SSS', + // + WEEK: 'GGGG-[W]WW', + // + MONTH: 'YYYY-MM' // + + }; + return hooks; + }); +}); // Maps for number <-> hex string conversion + +var byteToHex$2$1 = []; + +for (var i$2$1 = 0; i$2$1 < 256; i$2$1++) { + byteToHex$2$1[i$2$1] = (i$2$1 + 0x100).toString(16).substr(1); +} +/** + * Generate 16 random bytes to be used as a base for UUID. + * + * @ignore + */ + + +var random$1$1 = function () { + if (typeof crypto !== 'undefined' && crypto.getRandomValues) { + // WHATWG crypto-based RNG - http://wiki.whatwg.org/wiki/Crypto + // Moderately fast, high quality + var _rnds8 = new Uint8Array(16); + + return function whatwgRNG() { + crypto.getRandomValues(_rnds8); + return _rnds8; + }; + } // Math.random()-based (RNG) + // + // If all else fails, use Math.random(). + // It's fast, but is of unspecified quality. + + + var _rnds = new Array(16); + + return function () { + for (var i = 0, r; i < 16; i++) { + if ((i & 0x03) === 0) { + r = Math.random() * 0x100000000; + } + + _rnds[i] = r >>> ((i & 0x03) << 3) & 0xff; + } + + return _rnds; + }; // uuid.js + // + // Copyright (c) 2010-2012 Robert Kieffer + // MIT License - http://opensource.org/licenses/mit-license.php + // Unique ID creation requires a high quality random # generator. We feature + // detect to determine the best RNG source, normalizing to a function that + // returns 128-bits of randomness, since that's what's usually required + // return require('./rng'); +}(); + +var byteToHex$1$1$1 = []; + +for (var i$1$1$1 = 0; i$1$1$1 < 256; i$1$1$1++) { + byteToHex$1$1$1[i$1$1$1] = (i$1$1$1 + 0x100).toString(16).substr(1); +} // **`v1()` - Generate time-based UUID** +// +// Inspired by https://github.com/LiosK/UUID.js +// and http://docs.python.org/library/uuid.html +// random #'s we need to init node and clockseq + + +var seedBytes$1$1 = random$1$1(); // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1) + +var defaultNodeId$1$1 = [seedBytes$1$1[0] | 0x01, seedBytes$1$1[1], seedBytes$1$1[2], seedBytes$1$1[3], seedBytes$1$1[4], seedBytes$1$1[5]]; // Per 4.2.2, randomize (14 bit) clockseq + +var defaultClockseq$1$1 = (seedBytes$1$1[6] << 8 | seedBytes$1$1[7]) & 0x3fff; // Previous uuid creation time +// for example '/Date(1198908717056)/' or '/Date(1198908717056-0700)/' +// code from http://momentjs.com/ + +var ASPDateRegex$1 = /^\/?Date\((-?\d+)/i; // Hex color + +/** + * Hue, Saturation, Value. + */ + +/** + * Test whether given object is a number + * + * @param value - Input value of unknown type. + * + * @returns True if number, false otherwise. + */ + +function isNumber$1(value) { + return value instanceof Number || typeof value === 'number'; +} +/** + * Test whether given object is a string + * + * @param value - Input value of unknown type. + * + * @returns True if string, false otherwise. + */ + + +function isString$1(value) { + return value instanceof String || typeof value === 'string'; +} +/** + * Test whether given object is a Moment date. + * @TODO: This is basically a workaround, if Moment was imported property it wouldn't necessary as moment.isMoment is a TS type guard. + * + * @param value - Input value of unknown type. + * + * @returns True if Moment instance, false otherwise. + */ + + +function isMoment$1(value) { + return moment$1.isMoment(value); +} +/** + * Convert an object into another type + * + * @param object - Value of unknown type. + * @param type - Name of the desired type. + * + * @returns Object in the desired type. + * @throws Error + */ + + +function convert$1(object, type) { + var match; + + if (object === undefined) { + return undefined; + } + + if (object === null) { + return null; + } + + if (!type) { + return object; + } + + if (!(typeof type === 'string') && !(type instanceof String)) { + throw new Error('Type must be a string'); + } //noinspection FallthroughInSwitchStatementJS + + + switch (type) { + case 'boolean': + case 'Boolean': + return Boolean(object); + + case 'number': + case 'Number': + if (isString$1(object) && !isNaN(Date.parse(object))) { + return moment$1(object).valueOf(); + } else { + // @TODO: I don't think that Number and String constructors are a good idea. + // This could also fail if the object doesn't have valueOf method or if it's redefined. + // For example: Object.create(null) or { valueOf: 7 }. + return Number(object.valueOf()); + } + + case 'string': + case 'String': + return String(object); + + case 'Date': + if (isNumber$1(object)) { + return new Date(object); + } + + if (object instanceof Date) { + return new Date(object.valueOf()); + } else if (isMoment$1(object)) { + return new Date(object.valueOf()); + } + + if (isString$1(object)) { + match = ASPDateRegex$1.exec(object); + + if (match) { + // object is an ASP date + return new Date(Number(match[1])); // parse number + } else { + return moment$1(new Date(object)).toDate(); // parse string + } + } else { + throw new Error('Cannot convert object of type ' + getType$1(object) + ' to type Date'); + } + + case 'Moment': + if (isNumber$1(object)) { + return moment$1(object); + } + + if (object instanceof Date) { + return moment$1(object.valueOf()); + } else if (isMoment$1(object)) { + return moment$1(object); + } + + if (isString$1(object)) { + match = ASPDateRegex$1.exec(object); + + if (match) { + // object is an ASP date + return moment$1(Number(match[1])); // parse number + } else { + return moment$1(object); // parse string + } + } else { + throw new Error('Cannot convert object of type ' + getType$1(object) + ' to type Date'); + } + + case 'ISODate': + if (isNumber$1(object)) { + return new Date(object); + } else if (object instanceof Date) { + return object.toISOString(); + } else if (isMoment$1(object)) { + return object.toDate().toISOString(); + } else if (isString$1(object)) { + match = ASPDateRegex$1.exec(object); + + if (match) { + // object is an ASP date + return new Date(Number(match[1])).toISOString(); // parse number + } else { + return moment$1(object).format(); // ISO 8601 + } + } else { + throw new Error('Cannot convert object of type ' + getType$1(object) + ' to type ISODate'); + } + + case 'ASPDate': + if (isNumber$1(object)) { + return '/Date(' + object + ')/'; + } else if (object instanceof Date) { + return '/Date(' + object.valueOf() + ')/'; + } else if (isString$1(object)) { + match = ASPDateRegex$1.exec(object); + + var _value; + + if (match) { + // object is an ASP date + _value = new Date(Number(match[1])).valueOf(); // parse number + } else { + _value = new Date(object).valueOf(); // parse string + } + + return '/Date(' + _value + ')/'; + } else { + throw new Error('Cannot convert object of type ' + getType$1(object) + ' to type ASPDate'); + } + + default: + var never = type; + throw new Error("Unknown type ".concat(never)); + } +} +/** + * Get the type of an object, for example exports.getType([]) returns 'Array' + * + * @param object - Input value of unknown type. + * + * @returns Detected type. + */ + + +function getType$1(object) { + var type = _typeof$1(object); + + if (type === 'object') { + if (object === null) { + return 'null'; + } + + if (object instanceof Boolean) { + return 'Boolean'; + } + + if (object instanceof Number) { + return 'Number'; + } + + if (object instanceof String) { + return 'String'; + } + + if (Array.isArray(object)) { + return 'Array'; + } + + if (object instanceof Date) { + return 'Date'; + } + + return 'Object'; + } + + if (type === 'number') { + return 'Number'; + } + + if (type === 'boolean') { + return 'Boolean'; + } + + if (type === 'string') { + return 'String'; + } + + if (type === undefined) { + return 'undefined'; + } + + return type; +} +/** + * Determine whether a value can be used as an id. + * + * @param value - Input value of unknown type. + * + * @returns True if the value is valid id, false otherwise. + */ + + +function isId(value) { + return typeof value === 'string' || typeof value === 'number'; +} +/** + * A queue. + * + * @typeParam T - The type of method names to be replaced by queued versions. + */ + + +var Queue = +/*#__PURE__*/ +function () { + /** + * Construct a new Queue. + * + * @param options - Queue configuration. + */ + function Queue(options) { + classCallCheck(this, Queue); + this._queue = []; + this._timeout = null; + this._extended = null; // options + + this.delay = null; + this.max = Infinity; + this.setOptions(options); + } + /** + * Update the configuration of the queue. + * + * @param options - Queue configuration. + */ + + + createClass(Queue, [{ + key: "setOptions", + value: function setOptions(options) { + if (options && typeof options.delay !== 'undefined') { + this.delay = options.delay; + } + + if (options && typeof options.max !== 'undefined') { + this.max = options.max; + } + + this._flushIfNeeded(); + } + /** + * Extend an object with queuing functionality. + * The object will be extended with a function flush, and the methods provided in options.replace will be replaced with queued ones. + * + * @param object - The object to be extended. + * @param options - Additional options. + * + * @returns The created queue. + */ + + }, { + key: "destroy", + + /** + * Destroy the queue. The queue will first flush all queued actions, and in case it has extended an object, will restore the original object. + */ + value: function destroy() { + this.flush(); + + if (this._extended) { + var object = this._extended.object; + var methods = this._extended.methods; + + for (var i = 0; i < methods.length; i++) { + var method = methods[i]; + + if (method.original) { + object[method.name] = method.original; + } else { + // @TODO: better solution? + delete object[method.name]; + } + } + + this._extended = null; + } + } + /** + * Replace a method on an object with a queued version. + * + * @param object - Object having the method. + * @param method - The method name. + */ + + }, { + key: "replace", + value: function replace(object, method) { + var me = this; + var original = object[method]; + + if (!original) { + throw new Error('Method ' + method + ' undefined'); + } + + object[method] = function () { + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } // add this call to the queue + + + me.queue({ + args: args, + fn: original, + context: this + }); + }; + } + /** + * Queue a call. + * + * @param entry - The function or entry to be queued. + */ + + }, { + key: "queue", + value: function queue(entry) { + if (typeof entry === 'function') { + this._queue.push({ + fn: entry + }); + } else { + this._queue.push(entry); + } + + this._flushIfNeeded(); + } + /** + * Check whether the queue needs to be flushed. + */ + + }, { + key: "_flushIfNeeded", + value: function _flushIfNeeded() { + var _this = this; // flush when the maximum is exceeded. + + + if (this._queue.length > this.max) { + this.flush(); + } // flush after a period of inactivity when a delay is configured + + + if (this._timeout != null) { + clearTimeout(this._timeout); + this._timeout = null; + } + + if (this.queue.length > 0 && typeof this.delay === 'number') { + this._timeout = setTimeout(function () { + _this.flush(); + }, this.delay); + } + } + /** + * Flush all queued calls + */ + + }, { + key: "flush", + value: function flush() { + this._queue.splice(0).forEach(function (entry) { + entry.fn.apply(entry.context || entry.fn, entry.args || []); + }); + } + }], [{ + key: "extend", + value: function extend(object, options) { + var queue = new Queue(options); + + if (object.flush !== undefined) { + throw new Error('Target object already has a property flush'); + } + + object.flush = function () { + queue.flush(); + }; + + var methods = [{ + name: 'flush', + original: undefined + }]; + + if (options && options.replace) { + for (var i = 0; i < options.replace.length; i++) { + var name = options.replace[i]; + methods.push({ + name: name, + // @TODO: better solution? + original: object[name] + }); // @TODO: better solution? + + queue.replace(object, name); + } + } + + queue._extended = { + object: object, + methods: methods + }; + return queue; + } + }]); + return Queue; +}(); + +function _arrayWithoutHoles$1(arr) { + if (Array.isArray(arr)) { + for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { + arr2[i] = arr[i]; + } + + return arr2; + } +} + +var arrayWithoutHoles = _arrayWithoutHoles$1; + +function _iterableToArray$1(iter) { + if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); +} + +var iterableToArray = _iterableToArray$1; + +function _nonIterableSpread$1() { + throw new TypeError("Invalid attempt to spread non-iterable instance"); +} + +var nonIterableSpread = _nonIterableSpread$1; + +function _toConsumableArray$1(arr) { + return arrayWithoutHoles(arr) || iterableToArray(arr) || nonIterableSpread(); +} + +var toConsumableArray = _toConsumableArray$1; +/** + * [[DataSet]] code that can be reused in [[DataView]] or other similar implementations of [[DataInterface]]. + * + * @typeParam Item - Item type that may or may not have an id. + * @typeParam IdProp - Name of the property that contains the id. + */ + +var DataSetPart = +/*#__PURE__*/ +function () { + function DataSetPart() { + classCallCheck(this, DataSetPart); + this._subscribers = { + '*': [], + add: [], + remove: [], + update: [] + }; + /** + * @deprecated Use on instead (PS: DataView.subscribe === DataView.on). + */ + + this.subscribe = DataSetPart.prototype.on; + /** + * @deprecated Use off instead (PS: DataView.unsubscribe === DataView.off). + */ + + this.unsubscribe = DataSetPart.prototype.off; + } + /** + * Trigger an event + * + * @param event - Event name. + * @param payload - Event payload. + * @param senderId - Id of the sender. + */ + + + createClass(DataSetPart, [{ + key: "_trigger", + value: function _trigger(event, payload, senderId) { + if (event === '*') { + throw new Error('Cannot trigger event *'); + } + + var subscribers = [].concat(toConsumableArray(this._subscribers[event]), toConsumableArray(this._subscribers['*'])); + + for (var i = 0, len = subscribers.length; i < len; i++) { + var subscriber = subscribers[i]; + + if (subscriber.callback) { + subscriber.callback(event, payload, senderId != null ? senderId : null); + } + } + } + /** + * Subscribe to an event, add an event listener. + * + * @param event - Event name. + * @param callback - Callback method. + */ + + }, { + key: "on", + value: function on(event, callback) { + this._subscribers[event].push({ + callback: callback + }); + } + /** + * Unsubscribe from an event, remove an event listener. + * + * @remarks If the same callback was subscribed more than once **all** occurences will be removed. + * + * @param event - Event name. + * @param callback - Callback method. + */ + + }, { + key: "off", + value: function off(event, callback) { + this._subscribers[event] = this._subscribers[event].filter(function (listener) { + return listener.callback !== callback; + }); + } + }]); + return DataSetPart; +}(); + +function ownKeys$1(object, enumerableOnly) { + var keys = Object.keys(object); + + if (Object.getOwnPropertySymbols) { + keys.push.apply(keys, Object.getOwnPropertySymbols(object)); + } + + if (enumerableOnly) keys = keys.filter(function (sym) { + return Object.getOwnPropertyDescriptor(object, sym).enumerable; + }); + return keys; +} + +function _objectSpread(target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i] != null ? arguments[i] : {}; + + if (i % 2) { + ownKeys$1(source, true).forEach(function (key) { + defineProperty$1(target, key, source[key]); + }); + } else if (Object.getOwnPropertyDescriptors) { + Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); + } else { + ownKeys$1(source).forEach(function (key) { + Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); + }); + } + } + + return target; +} +/** + * # DataSet + * + * Vis.js comes with a flexible DataSet, which can be used to hold and manipulate unstructured data and listen for changes in the data. The DataSet is key/value based. Data items can be added, updated and removed from the DataSet, and one can subscribe to changes in the DataSet. The data in the DataSet can be filtered and ordered, and fields (like dates) can be converted to a specific type. Data can be normalized when appending it to the DataSet as well. + * + * ## Example + * + * The following example shows how to use a DataSet. + * + * ```javascript + * // create a DataSet + * var options = {}; + * var data = new vis.DataSet(options); + * + * // add items + * // note that the data items can contain different properties and data formats + * data.add([ + * {id: 1, text: 'item 1', date: new Date(2013, 6, 20), group: 1, first: true}, + * {id: 2, text: 'item 2', date: '2013-06-23', group: 2}, + * {id: 3, text: 'item 3', date: '2013-06-25', group: 2}, + * {id: 4, text: 'item 4'} + * ]); + * + * // subscribe to any change in the DataSet + * data.on('*', function (event, properties, senderId) { + * console.log('event', event, properties); + * }); + * + * // update an existing item + * data.update({id: 2, group: 1}); + * + * // remove an item + * data.remove(4); + * + * // get all ids + * var ids = data.getIds(); + * console.log('ids', ids); + * + * // get a specific item + * var item1 = data.get(1); + * console.log('item1', item1); + * + * // retrieve a filtered subset of the data + * var items = data.get({ + * filter: function (item) { + * return item.group == 1; + * } + * }); + * console.log('filtered items', items); + * + * // retrieve formatted items + * var items = data.get({ + * fields: ['id', 'date'], + * type: { + * date: 'ISODate' + * } + * }); + * console.log('formatted items', items); + * ``` + * + * @typeParam Item - Item type that may or may not have an id. + * @typeParam IdProp - Name of the property that contains the id. + */ + + +var DataSet = +/*#__PURE__*/ +function (_DataSetPart) { + inherits(DataSet, _DataSetPart); + /** + * Construct a new DataSet. + * + * @param data - Initial data or options. + * @param options - Options (type error if data is also options). + */ + + function DataSet(data, options) { + var _this; + + classCallCheck(this, DataSet); + _this = possibleConstructorReturn(this, getPrototypeOf(DataSet).call(this)); // correctly read optional arguments + + if (data && !Array.isArray(data)) { + options = data; + data = []; + } + + _this._options = options || {}; + _this._data = Object.create({}); // map with data indexed by id + + _this.length = 0; // number of items in the DataSet + + _this._idProp = _this._options.fieldId || 'id'; // name of the field containing id + + _this._type = {}; // internal field types (NOTE: this can differ from this._options.type) + // all variants of a Date are internally stored as Date, so we can convert + // from everything to everything (also from ISODate to Number for example) + + if (_this._options.type) { + var fields = Object.keys(_this._options.type); + + for (var i = 0, len = fields.length; i < len; i++) { + var field = fields[i]; + var value = _this._options.type[field]; + + if (value == 'Date' || value == 'ISODate' || value == 'ASPDate') { + _this._type[field] = 'Date'; + } else { + _this._type[field] = value; + } + } + } // add initial data when provided + + + if (data && data.length) { + _this.add(data); + } + + _this.setOptions(options); + + return _this; + } + /** + * Set new options. + * + * @param options - The new options. + */ + + + createClass(DataSet, [{ + key: "setOptions", + value: function setOptions(options) { + if (options && options.queue !== undefined) { + if (options.queue === false) { + // delete queue if loaded + if (this._queue) { + this._queue.destroy(); + + delete this._queue; + } + } else { + // create queue and update its options + if (!this._queue) { + this._queue = Queue.extend(this, { + replace: ['add', 'update', 'remove'] + }); + } + + if (options.queue && _typeof_1(options.queue) === 'object') { + this._queue.setOptions(options.queue); + } + } + } + } + /** + * Add a data item or an array with items. + * + * After the items are added to the DataSet, the DataSet will trigger an event `add`. When a `senderId` is provided, this id will be passed with the triggered event to all subscribers. + * + * ## Example + * + * ```javascript + * // create a DataSet + * const data = new vis.DataSet() + * + * // add items + * const ids = data.add([ + * { id: 1, text: 'item 1' }, + * { id: 2, text: 'item 2' }, + * { text: 'item without an id' } + * ]) + * + * console.log(ids) // [1, 2, ''] + * ``` + * + * @param data - Items to be added (ids will be generated if missing). + * @param senderId - Sender id. + * + * @returns addedIds - Array with the ids (generated if not present) of the added items. + * + * @throws When an item with the same id as any of the added items already exists. + */ + + }, { + key: "add", + value: function add(data, senderId) { + var addedIds = []; + var id; + + if (Array.isArray(data)) { + // Array + for (var i = 0, len = data.length; i < len; i++) { + id = this._addItem(data[i]); + addedIds.push(id); + } + } else if (data && _typeof_1(data) === 'object') { + // Single item + id = this._addItem(data); + addedIds.push(id); + } else { + throw new Error('Unknown dataType'); + } + + if (addedIds.length) { + this._trigger('add', { + items: addedIds + }, senderId); + } + + return addedIds; + } + /** + * Update existing items. When an item does not exist, it will be created + * + * The provided properties will be merged in the existing item. When an item does not exist, it will be created. + * + * After the items are updated, the DataSet will trigger an event `add` for the added items, and an event `update`. When a `senderId` is provided, this id will be passed with the triggered event to all subscribers. + * + * ## Example + * + * ```javascript + * // create a DataSet + * const data = new vis.DataSet([ + * { id: 1, text: 'item 1' }, + * { id: 2, text: 'item 2' }, + * { id: 3, text: 'item 3' } + * ]) + * + * // update items + * const ids = data.update([ + * { id: 2, text: 'item 2 (updated)' }, + * { id: 4, text: 'item 4 (new)' } + * ]) + * + * console.log(ids) // [2, 4] + * ``` + * + * @param data - Items to be updated (if the id is already present) or added (if the id is missing). + * @param senderId - Sender id. + * + * @returns updatedIds - The ids of the added (these may be newly generated if there was no id in the item from the data) or updated items. + * + * @throws When the supplied data is neither an item nor an array of items. + */ + + }, { + key: "update", + value: function update(data, senderId) { + var _this2 = this; + + var addedIds = []; + var updatedIds = []; + var oldData = []; + var updatedData = []; + var idProp = this._idProp; + + var addOrUpdate = function addOrUpdate(item) { + var origId = item[idProp]; + + if (origId != null && _this2._data[origId]) { + var fullItem = item; // it has an id, therefore it is a fullitem + + var oldItem = Object.assign({}, _this2._data[origId]); // update item + + var id = _this2._updateItem(fullItem); + + updatedIds.push(id); + updatedData.push(fullItem); + oldData.push(oldItem); + } else { + // add new item + var _id = _this2._addItem(item); + + addedIds.push(_id); + } + }; + + if (Array.isArray(data)) { + // Array + for (var i = 0, len = data.length; i < len; i++) { + if (data[i] && _typeof_1(data[i]) === 'object') { + addOrUpdate(data[i]); + } else { + console.warn('Ignoring input item, which is not an object at index ' + i); + } + } + } else if (data && _typeof_1(data) === 'object') { + // Single item + addOrUpdate(data); + } else { + throw new Error('Unknown dataType'); + } + + if (addedIds.length) { + this._trigger('add', { + items: addedIds + }, senderId); + } + + if (updatedIds.length) { + var props = { + items: updatedIds, + oldData: oldData, + data: updatedData + }; // TODO: remove deprecated property 'data' some day + //Object.defineProperty(props, 'data', { + // 'get': (function() { + // console.warn('Property data is deprecated. Use DataSet.get(ids) to retrieve the new data, use the oldData property on this object to get the old data'); + // return updatedData; + // }).bind(this) + //}); + + this._trigger('update', props, senderId); + } + + return addedIds.concat(updatedIds); + } + /** @inheritdoc */ + + }, { + key: "get", + value: function get(first, second) { + // @TODO: Woudn't it be better to split this into multiple methods? + // parse the arguments + var id = undefined; + var ids = undefined; + var options = undefined; + + if (isId(first)) { + // get(id [, options]) + id = first; + options = second; + } else if (Array.isArray(first)) { + // get(ids [, options]) + ids = first; + options = second; + } else { + // get([, options]) + options = first; + } // determine the return type + + + var returnType = options && options.returnType === 'Object' ? 'Object' : 'Array'; // @TODO: WTF is this? Or am I missing something? + // var returnType + // if (options && options.returnType) { + // var allowedValues = ['Array', 'Object'] + // returnType = + // allowedValues.indexOf(options.returnType) == -1 + // ? 'Array' + // : options.returnType + // } else { + // returnType = 'Array' + // } + // build options + + var type = options && options.type || this._options.type; + var filter = options && options.filter; + var items = []; + var item = null; + var itemIds = null; + var itemId = null; // convert items + + if (id != null) { + // return a single item + item = this._getItem(id, type); + + if (item && filter && !filter(item)) { + item = null; + } + } else if (ids != null) { + // return a subset of items + for (var i = 0, len = ids.length; i < len; i++) { + item = this._getItem(ids[i], type); + + if (item != null && (!filter || filter(item))) { + items.push(item); + } + } + } else { + // return all items + itemIds = Object.keys(this._data); + + for (var _i = 0, _len = itemIds.length; _i < _len; _i++) { + itemId = itemIds[_i]; + item = this._getItem(itemId, type); + + if (item != null && (!filter || filter(item))) { + items.push(item); + } + } + } // order the results + + + if (options && options.order && id == undefined) { + this._sort(items, options.order); + } // filter fields of the items + + + if (options && options.fields) { + var fields = options.fields; + + if (id != undefined && item != null) { + item = this._filterFields(item, fields); + } else { + for (var _i2 = 0, _len2 = items.length; _i2 < _len2; _i2++) { + items[_i2] = this._filterFields(items[_i2], fields); + } + } + } // return the results + + + if (returnType == 'Object') { + var result = {}; + + for (var _i3 = 0, _len3 = items.length; _i3 < _len3; _i3++) { + var resultant = items[_i3]; // @TODO: Shoudn't this be this._fieldId? + // result[resultant.id] = resultant + + var _id2 = resultant[this._idProp]; + result[_id2] = resultant; + } + + return result; + } else { + if (id != null) { + // a single item + return item; + } else { + // just return our array + return items; + } + } + } + /** @inheritdoc */ + + }, { + key: "getIds", + value: function getIds(options) { + var data = this._data; + var filter = options && options.filter; + var order = options && options.order; + var type = options && options.type || this._options.type; + var itemIds = Object.keys(data); + var ids = []; + var item; + var items; + + if (filter) { + // get filtered items + if (order) { + // create ordered list + items = []; + + for (var i = 0, len = itemIds.length; i < len; i++) { + var id = itemIds[i]; + item = this._getItem(id, type); + + if (filter(item)) { + items.push(item); + } + } + + this._sort(items, order); + + for (var _i4 = 0, _len4 = items.length; _i4 < _len4; _i4++) { + ids.push(items[_i4][this._idProp]); + } + } else { + // create unordered list + for (var _i5 = 0, _len5 = itemIds.length; _i5 < _len5; _i5++) { + var _id3 = itemIds[_i5]; + item = this._getItem(_id3, type); + + if (filter(item)) { + ids.push(item[this._idProp]); + } + } + } + } else { + // get all items + if (order) { + // create an ordered list + items = []; + + for (var _i6 = 0, _len6 = itemIds.length; _i6 < _len6; _i6++) { + var _id4 = itemIds[_i6]; + items.push(data[_id4]); + } + + this._sort(items, order); + + for (var _i7 = 0, _len7 = items.length; _i7 < _len7; _i7++) { + ids.push(items[_i7][this._idProp]); + } + } else { + // create unordered list + for (var _i8 = 0, _len8 = itemIds.length; _i8 < _len8; _i8++) { + var _id5 = itemIds[_i8]; + item = data[_id5]; + ids.push(item[this._idProp]); + } + } + } + + return ids; + } + /** @inheritdoc */ + + }, { + key: "getDataSet", + value: function getDataSet() { + return this; + } + /** @inheritdoc */ + + }, { + key: "forEach", + value: function forEach(callback, options) { + var filter = options && options.filter; + var type = options && options.type || this._options.type; + var data = this._data; + var itemIds = Object.keys(data); + + if (options && options.order) { + // execute forEach on ordered list + var items = this.get(options); + + for (var i = 0, len = items.length; i < len; i++) { + var item = items[i]; + var id = item[this._idProp]; + callback(item, id); + } + } else { + // unordered + for (var _i9 = 0, _len9 = itemIds.length; _i9 < _len9; _i9++) { + var _id6 = itemIds[_i9]; + + var _item = this._getItem(_id6, type); + + if (!filter || filter(_item)) { + callback(_item, _id6); + } + } + } + } + /** @inheritdoc */ + + }, { + key: "map", + value: function map(callback, options) { + var filter = options && options.filter; + var type = options && options.type || this._options.type; + var mappedItems = []; + var data = this._data; + var itemIds = Object.keys(data); // convert and filter items + + for (var i = 0, len = itemIds.length; i < len; i++) { + var id = itemIds[i]; + + var item = this._getItem(id, type); + + if (!filter || filter(item)) { + mappedItems.push(callback(item, id)); + } + } // order items + + + if (options && options.order) { + this._sort(mappedItems, options.order); + } + + return mappedItems; + } + /** + * Filter the fields of an item. + * + * @param item - The item whose fields should be filtered. + * @param fields - The names of the fields that will be kept. + * + * @typeParam K - Field name type. + * + * @returns The item without any additional fields. + */ + + }, { + key: "_filterFields", + value: function _filterFields(item, fields) { + if (!item) { + // item is null + return item; + } + + return (Array.isArray(fields) ? // Use the supplied array + fields : // Use the keys of the supplied object + Object.keys(fields)).reduce(function (filteredItem, field) { + filteredItem[field] = item[field]; + return filteredItem; + }, {}); + } + /** + * Sort the provided array with items. + * + * @param items - Items to be sorted in place. + * @param order - A field name or custom sort function. + * + * @typeParam T - The type of the items in the items array. + */ + + }, { + key: "_sort", + value: function _sort(items, order) { + if (typeof order === 'string') { + // order by provided field name + var name = order; // field name + + items.sort(function (a, b) { + // @TODO: How to treat missing properties? + var av = a[name]; + var bv = b[name]; + return av > bv ? 1 : av < bv ? -1 : 0; + }); + } else if (typeof order === 'function') { + // order by sort function + items.sort(order); + } else { + // TODO: extend order by an Object {field:string, direction:string} + // where direction can be 'asc' or 'desc' + throw new TypeError('Order must be a function or a string'); + } + } + /** + * Remove an item or multiple items by “reference” (only the id is used) or by id. + * + * The method ignores removal of non-existing items, and returns an array containing the ids of the items which are actually removed from the DataSet. + * + * After the items are removed, the DataSet will trigger an event `remove` for the removed items. When a `senderId` is provided, this id will be passed with the triggered event to all subscribers. + * + * ## Example + * ```javascript + * // create a DataSet + * const data = new vis.DataSet([ + * { id: 1, text: 'item 1' }, + * { id: 2, text: 'item 2' }, + * { id: 3, text: 'item 3' } + * ]) + * + * // remove items + * const ids = data.remove([2, { id: 3 }, 4]) + * + * console.log(ids) // [2, 3] + * ``` + * + * @param id - One or more items or ids of items to be removed. + * @param senderId - Sender id. + * + * @returns The ids of the removed items. + */ + + }, { + key: "remove", + value: function remove(id, senderId) { + var removedIds = []; + var removedItems = []; // force everything to be an array for simplicity + + var ids = Array.isArray(id) ? id : [id]; + + for (var i = 0, len = ids.length; i < len; i++) { + var item = this._remove(ids[i]); + + if (item) { + var itemId = item[this._idProp]; + + if (itemId != null) { + removedIds.push(itemId); + removedItems.push(item); + } + } + } + + if (removedIds.length) { + this._trigger('remove', { + items: removedIds, + oldData: removedItems + }, senderId); + } + + return removedIds; + } + /** + * Remove an item by its id or reference. + * + * @param id - Id of an item or the item itself. + * + * @returns The removed item if removed, null otherwise. + */ + + }, { + key: "_remove", + value: function _remove(id) { + // @TODO: It origianlly returned the item although the docs say id. + // The code expects the item, so probably an error in the docs. + var ident; // confirm the id to use based on the args type + + if (isId(id)) { + ident = id; + } else if (id && _typeof_1(id) === 'object') { + ident = id[this._idProp]; // look for the identifier field using ._idProp + } // do the removing if the item is found + + + if (ident != null && this._data[ident]) { + var item = this._data[ident]; + delete this._data[ident]; + --this.length; + return item; + } + + return null; + } + /** + * Clear the entire data set. + * + * After the items are removed, the [[DataSet]] will trigger an event `remove` for all removed items. When a `senderId` is provided, this id will be passed with the triggered event to all subscribers. + * + * @param senderId - Sender id. + * + * @returns removedIds - The ids of all removed items. + */ + + }, { + key: "clear", + value: function clear(senderId) { + var ids = Object.keys(this._data); + var items = []; + + for (var i = 0, len = ids.length; i < len; i++) { + items.push(this._data[ids[i]]); + } + + this._data = {}; + this.length = 0; + + this._trigger('remove', { + items: ids, + oldData: items + }, senderId); + + return ids; + } + /** + * Find the item with maximum value of a specified field. + * + * @param field - Name of the property that should be searched for max value. + * + * @returns Item containing max value, or null if no items. + */ + + }, { + key: "max", + value: function max(field) { + var data = this._data; + var itemIds = Object.keys(data); + var max = null; + var maxField = null; + + for (var i = 0, len = itemIds.length; i < len; i++) { + var id = itemIds[i]; + var item = data[id]; + var itemField = item[field]; + + if (itemField != null && (maxField == null || itemField > maxField)) { + max = item; + maxField = itemField; + } + } + + return max; + } + /** + * Find the item with minimum value of a specified field. + * + * @param field - Name of the property that should be searched for min value. + * + * @returns Item containing min value, or null if no items. + */ + + }, { + key: "min", + value: function min(field) { + var data = this._data; + var itemIds = Object.keys(data); + var min = null; + var minField = null; + + for (var i = 0, len = itemIds.length; i < len; i++) { + var id = itemIds[i]; + var item = data[id]; + var itemField = item[field]; + + if (itemField != null && (minField == null || itemField < minField)) { + min = item; + minField = itemField; + } + } + + return min; + } + /** + * Find all distinct values of a specified field + * + * @param prop - The property name whose distinct values should be returned. + * + * @returns Unordered array containing all distinct values. Items without specified property are ignored. + */ + + }, { + key: "distinct", + value: function distinct(prop) { + var data = this._data; + var itemIds = Object.keys(data); + var values = []; + var fieldType = this._options.type && this._options.type[prop] || null; + var count = 0; + + for (var i = 0, len = itemIds.length; i < len; i++) { + var id = itemIds[i]; + var item = data[id]; + var value = item[prop]; + var exists = false; + + for (var j = 0; j < count; j++) { + if (values[j] == value) { + exists = true; + break; + } + } + + if (!exists && value !== undefined) { + values[count] = value; + count++; + } + } + + if (fieldType) { + for (var _i10 = 0, _len10 = values.length; _i10 < _len10; _i10++) { + values[_i10] = convert$1(values[_i10], fieldType); + } + } + + return values; + } + /** + * Add a single item. Will fail when an item with the same id already exists. + * + * @param item - A new item to be added. + * + * @returns Added item's id. An id is generated when it is not present in the item. + */ + + }, { + key: "_addItem", + value: function _addItem(item) { + var id = item[this._idProp]; + + if (id != null) { + // check whether this id is already taken + if (this._data[id]) { + // item already exists + throw new Error('Cannot add item: item with id ' + id + ' already exists'); + } + } else { + // generate an id + id = uuid4$1(); + item[this._idProp] = id; + } + + var d = {}; + var fields = Object.keys(item); + + for (var i = 0, len = fields.length; i < len; i++) { + var field = fields[i]; + var fieldType = this._type[field]; // type may be undefined + + d[field] = convert$1(item[field], fieldType); + } + + this._data[id] = d; + this.length++; + return id; + } + /** + * Get an item. Fields can be converted to a specific type + * + * @param id - Id of the requested item. + * @param types - Property name to type name object map of type converstions. + * + * @returns The item, optionally after type conversion. + */ + + }, { + key: "_getItem", + value: function _getItem(id, types) { + // @TODO: I have no idea how to type this. + // get the item from the dataset + var raw = this._data[id]; + + if (!raw) { + return null; + } // convert the items field types + + + var converted; + var fields = Object.keys(raw); + + if (types) { + converted = {}; + + for (var i = 0, len = fields.length; i < len; i++) { + var field = fields[i]; + var value = raw[field]; + converted[field] = convert$1(value, types[field]); + } + } else { + // no field types specified, no converting needed + converted = _objectSpread({}, raw); + } + + if (converted[this._idProp] == null) { + converted[this._idProp] = raw.id; + } + + return converted; + } + /** + * Update a single item: merge with existing item. + * Will fail when the item has no id, or when there does not exist an item with the same id. + * + * @param item - The new item + * + * @returns The id of the updated item. + */ + + }, { + key: "_updateItem", + value: function _updateItem(item) { + var id = item[this._idProp]; + + if (id == null) { + throw new Error('Cannot update item: item has no id (item: ' + JSON.stringify(item) + ')'); + } + + var d = this._data[id]; + + if (!d) { + // item doesn't exist + throw new Error('Cannot update item: no item with id ' + id + ' found'); + } // merge with current item + + + var fields = Object.keys(item); + + for (var i = 0, len = fields.length; i < len; i++) { + var field = fields[i]; + var fieldType = this._type[field] // type may be undefined + ; + d[field] = convert$1(item[field], fieldType); + } + + return id; + } + }]); + return DataSet; +}(DataSetPart); +/** + * DataView + * + * A DataView offers a filtered and/or formatted view on a DataSet. One can subscribe to changes in a DataView, and easily get filtered or formatted data without having to specify filters and field types all the time. + * + * ## Example + * ```javascript + * // create a DataSet + * var data = new vis.DataSet(); + * data.add([ + * {id: 1, text: 'item 1', date: new Date(2013, 6, 20), group: 1, first: true}, + * {id: 2, text: 'item 2', date: '2013-06-23', group: 2}, + * {id: 3, text: 'item 3', date: '2013-06-25', group: 2}, + * {id: 4, text: 'item 4'} + * ]); + * + * // create a DataView + * // the view will only contain items having a property group with value 1, + * // and will only output fields id, text, and date. + * var view = new vis.DataView(data, { + * filter: function (item) { + * return (item.group == 1); + * }, + * fields: ['id', 'text', 'date'] + * }); + * + * // subscribe to any change in the DataView + * view.on('*', function (event, properties, senderId) { + * console.log('event', event, properties); + * }); + * + * // update an item in the data set + * data.update({id: 2, group: 1}); + * + * // get all ids in the view + * var ids = view.getIds(); + * console.log('ids', ids); // will output [1, 2] + * + * // get all items in the view + * var items = view.get(); + * ``` + * + * @typeParam Item - Item type that may or may not have an id. + * @typeParam IdProp - Name of the property that contains the id. + */ + + +var DataView = +/*#__PURE__*/ +function (_DataSetPart) { + inherits(DataView, _DataSetPart); + /** + * Create a DataView. + * + * @param data - The instance containing data (directly or indirectly). + * @param options - Options to configure this data view. + */ + + function DataView(data, options) { + var _this; + + classCallCheck(this, DataView); + _this = possibleConstructorReturn(this, getPrototypeOf(DataView).call(this)); + /** @inheritdoc */ + + _this.length = 0; + _this._ids = {}; // ids of the items currently in memory (just contains a boolean true) + + _this._options = options || {}; + _this.listener = _this._onEvent.bind(assertThisInitialized(_this)); + + _this.setData(data); + + return _this; + } // TODO: implement a function .config() to dynamically update things like configured filter + // and trigger changes accordingly + + /** + * Set a data source for the view. + * + * @param data - The instance containing data (directly or indirectly). + */ + + + createClass(DataView, [{ + key: "setData", + value: function setData(data) { + if (this._data) { + // unsubscribe from current dataset + if (this._data.off) { + this._data.off('*', this.listener); + } // trigger a remove of all items in memory + + + var ids = this._data.getIds({ + filter: this._options.filter + }); + + var items = this._data.get(ids); + + this._ids = {}; + this.length = 0; + + this._trigger('remove', { + items: ids, + oldData: items + }); + } + + if (data != null) { + this._data = data; // trigger an add of all added items + + var _ids = this._data.getIds({ + filter: this._options.filter + }); + + for (var i = 0, len = _ids.length; i < len; i++) { + var id = _ids[i]; + this._ids[id] = true; + } + + this.length = _ids.length; + + this._trigger('add', { + items: _ids + }); + } else { + this._data = new DataSet(); + } // subscribe to new dataset + + + if (this._data.on) { + this._data.on('*', this.listener); + } + } + /** + * Refresh the DataView. + * Useful when the DataView has a filter function containing a variable parameter. + */ + + }, { + key: "refresh", + value: function refresh() { + var ids = this._data.getIds({ + filter: this._options.filter + }); + + var oldIds = Object.keys(this._ids); + var newIds = {}; + var addedIds = []; + var removedIds = []; + var removedItems = []; // check for additions + + for (var i = 0, len = ids.length; i < len; i++) { + var id = ids[i]; + newIds[id] = true; + + if (!this._ids[id]) { + addedIds.push(id); + this._ids[id] = true; + } + } // check for removals + + + for (var _i = 0, _len = oldIds.length; _i < _len; _i++) { + var _id = oldIds[_i]; + + var item = this._data.get(_id); + + if (item == null) { + // @TODO: Investigate. + // Doesn't happen during tests or examples. + // Is it really impossible or could it eventually happen? + // How to handle it if it does? The types guarantee non-nullable items. + console.error('If you see this, report it please.'); + } else if (!newIds[_id]) { + removedIds.push(_id); + removedItems.push(item); + delete this._ids[_id]; + } + } + + this.length += addedIds.length - removedIds.length; // trigger events + + if (addedIds.length) { + this._trigger('add', { + items: addedIds + }); + } + + if (removedIds.length) { + this._trigger('remove', { + items: removedIds, + oldData: removedItems + }); + } + } + /** @inheritdoc */ + + }, { + key: "get", + value: function get(first, second) { + if (this._data == null) { + return null; + } // parse the arguments + + + var ids = null; + var options; + + if (isId(first) || Array.isArray(first)) { + ids = first; + options = second; + } else { + options = first; + } // extend the options with the default options and provided options + + + var viewOptions = Object.assign({}, this._options, options); // create a combined filter method when needed + + var thisFilter = this._options.filter; + var optionsFilter = options && options.filter; + + if (thisFilter && optionsFilter) { + viewOptions.filter = function (item) { + return thisFilter(item) && optionsFilter(item); + }; + } + + if (ids == null) { + return this._data.get(viewOptions); + } else { + return this._data.get(ids, viewOptions); + } + } + /** @inheritdoc */ + + }, { + key: "getIds", + value: function getIds(options) { + if (this._data.length) { + var defaultFilter = this._options.filter; + var optionsFilter = options != null ? options.filter : null; + var filter; + + if (optionsFilter) { + if (defaultFilter) { + filter = function filter(item) { + return defaultFilter(item) && optionsFilter(item); + }; + } else { + filter = optionsFilter; + } + } else { + filter = defaultFilter; + } + + return this._data.getIds({ + filter: filter, + order: options && options.order + }); + } else { + return []; + } + } + /** @inheritdoc */ + + }, { + key: "forEach", + value: function forEach(callback, options) { + if (this._data) { + var defaultFilter = this._options.filter; + var optionsFilter = options && options.filter; + var filter; + + if (optionsFilter) { + if (defaultFilter) { + filter = function filter(item) { + return defaultFilter(item) && optionsFilter(item); + }; + } else { + filter = optionsFilter; + } + } else { + filter = defaultFilter; + } + + this._data.forEach(callback, { + filter: filter, + order: options && options.order + }); + } + } + /** @inheritdoc */ + + }, { + key: "map", + value: function map(callback, options) { + if (this._data) { + var defaultFilter = this._options.filter; + var optionsFilter = options && options.filter; + var filter; + + if (optionsFilter) { + if (defaultFilter) { + filter = function filter(item) { + return defaultFilter(item) && optionsFilter(item); + }; + } else { + filter = optionsFilter; + } + } else { + filter = defaultFilter; + } + + return this._data.map(callback, { + filter: filter, + order: options && options.order + }); + } else { + return []; + } + } + /** @inheritdoc */ + + }, { + key: "getDataSet", + value: function getDataSet() { + return this._data.getDataSet(); + } + /** + * Event listener. Will propagate all events from the connected data set to the subscribers of the DataView, but will filter the items and only trigger when there are changes in the filtered data set. + * + * @param event - The name of the event. + * @param params - Parameters of the event. + * @param senderId - Id supplied by the sender. + */ + + }, { + key: "_onEvent", + value: function _onEvent(event, params, senderId) { + if (!params || !params.items || !this._data) { + return; + } + + var ids = params.items; + var addedIds = []; + var updatedIds = []; + var removedIds = []; + var oldItems = []; + var updatedItems = []; + var removedItems = []; + + switch (event) { + case 'add': + // filter the ids of the added items + for (var i = 0, len = ids.length; i < len; i++) { + var id = ids[i]; + var item = this.get(id); + + if (item) { + this._ids[id] = true; + addedIds.push(id); + } + } + + break; + + case 'update': + // determine the event from the views viewpoint: an updated + // item can be added, updated, or removed from this view. + for (var _i2 = 0, _len2 = ids.length; _i2 < _len2; _i2++) { + var _id2 = ids[_i2]; + + var _item = this.get(_id2); + + if (_item) { + if (this._ids[_id2]) { + updatedIds.push(_id2); + updatedItems.push(params.data[_i2]); + oldItems.push(params.oldData[_i2]); + } else { + this._ids[_id2] = true; + addedIds.push(_id2); + } + } else { + if (this._ids[_id2]) { + delete this._ids[_id2]; + removedIds.push(_id2); + removedItems.push(params.oldData[_i2]); + } + } + } + + break; + + case 'remove': + // filter the ids of the removed items + for (var _i3 = 0, _len3 = ids.length; _i3 < _len3; _i3++) { + var _id3 = ids[_i3]; + + if (this._ids[_id3]) { + delete this._ids[_id3]; + removedIds.push(_id3); + removedItems.push(params.oldData[_i3]); + } + } + + break; + } + + this.length += addedIds.length - removedIds.length; + + if (addedIds.length) { + this._trigger('add', { + items: addedIds + }, senderId); + } + + if (updatedIds.length) { + this._trigger('update', { + items: updatedIds, + oldData: oldItems, + data: updatedItems + }, senderId); + } + + if (removedIds.length) { + this._trigger('remove', { + items: removedIds, + oldData: removedItems + }, senderId); + } + } + }]); + return DataView; +}(DataSetPart); + +var index = { + DataSet: DataSet, + DataView: DataView, + Queue: Queue +}; + +var esm$1 = /*#__PURE__*/Object.freeze({ + 'default': index, + DataSet: DataSet, + DataView: DataView, + Queue: Queue +}); + +/** + * Canvas shapes used by Network + */ +if (typeof CanvasRenderingContext2D !== 'undefined') { + /** + * Draw a circle shape + * + * @param {number} x + * @param {number} y + * @param {number} r + */ + CanvasRenderingContext2D.prototype.circle = function (x, y, r) { + this.beginPath(); + this.arc(x, y, r, 0, 2 * Math.PI, false); + this.closePath(); + }; + /** + * Draw a square shape + * @param {number} x horizontal center + * @param {number} y vertical center + * @param {number} r size, width and height of the square + */ + + + CanvasRenderingContext2D.prototype.square = function (x, y, r) { + this.beginPath(); + this.rect(x - r, y - r, r * 2, r * 2); + this.closePath(); + }; + /** + * Draw a triangle shape + * @param {number} x horizontal center + * @param {number} y vertical center + * @param {number} r radius, half the length of the sides of the triangle + */ + + + CanvasRenderingContext2D.prototype.triangle = function (x, y, r) { + // http://en.wikipedia.org/wiki/Equilateral_triangle + this.beginPath(); // the change in radius and the offset is here to center the shape + + r *= 1.15; + y += 0.275 * r; + var s = r * 2; + var s2 = s / 2; + var ir = Math.sqrt(3) / 6 * s; // radius of inner circle + + var h = Math.sqrt(s * s - s2 * s2); // height + + this.moveTo(x, y - (h - ir)); + this.lineTo(x + s2, y + ir); + this.lineTo(x - s2, y + ir); + this.lineTo(x, y - (h - ir)); + this.closePath(); + }; + /** + * Draw a triangle shape in downward orientation + * @param {number} x horizontal center + * @param {number} y vertical center + * @param {number} r radius + */ + + + CanvasRenderingContext2D.prototype.triangleDown = function (x, y, r) { + // http://en.wikipedia.org/wiki/Equilateral_triangle + this.beginPath(); // the change in radius and the offset is here to center the shape + + r *= 1.15; + y -= 0.275 * r; + var s = r * 2; + var s2 = s / 2; + var ir = Math.sqrt(3) / 6 * s; // radius of inner circle + + var h = Math.sqrt(s * s - s2 * s2); // height + + this.moveTo(x, y + (h - ir)); + this.lineTo(x + s2, y - ir); + this.lineTo(x - s2, y - ir); + this.lineTo(x, y + (h - ir)); + this.closePath(); + }; + /** + * Draw a star shape, a star with 5 points + * @param {number} x horizontal center + * @param {number} y vertical center + * @param {number} r radius, half the length of the sides of the triangle + */ + + + CanvasRenderingContext2D.prototype.star = function (x, y, r) { + // http://www.html5canvastutorials.com/labs/html5-canvas-star-spinner/ + this.beginPath(); // the change in radius and the offset is here to center the shape + + r *= 0.82; + y += 0.1 * r; + + for (var n = 0; n < 10; n++) { + var radius = n % 2 === 0 ? r * 1.3 : r * 0.5; + this.lineTo(x + radius * Math.sin(n * 2 * Math.PI / 10), y - radius * Math.cos(n * 2 * Math.PI / 10)); + } + + this.closePath(); + }; + /** + * Draw a Diamond shape + * @param {number} x horizontal center + * @param {number} y vertical center + * @param {number} r radius, half the length of the sides of the triangle + */ + + + CanvasRenderingContext2D.prototype.diamond = function (x, y, r) { + // http://www.html5canvastutorials.com/labs/html5-canvas-star-spinner/ + this.beginPath(); + this.lineTo(x, y + r); + this.lineTo(x + r, y); + this.lineTo(x, y - r); + this.lineTo(x - r, y); + this.closePath(); + }; + /** + * http://stackoverflow.com/questions/1255512/how-to-draw-a-rounded-rectangle-on-html-canvas + * + * @param {number} x + * @param {number} y + * @param {number} w + * @param {number} h + * @param {number} r + */ + + + CanvasRenderingContext2D.prototype.roundRect = function (x, y, w, h, r) { + var r2d = Math.PI / 180; + + if (w - 2 * r < 0) { + r = w / 2; + } //ensure that the radius isn't too large for x + + + if (h - 2 * r < 0) { + r = h / 2; + } //ensure that the radius isn't too large for y + + + this.beginPath(); + this.moveTo(x + r, y); + this.lineTo(x + w - r, y); + this.arc(x + w - r, y + r, r, r2d * 270, r2d * 360, false); + this.lineTo(x + w, y + h - r); + this.arc(x + w - r, y + h - r, r, 0, r2d * 90, false); + this.lineTo(x + r, y + h); + this.arc(x + r, y + h - r, r, r2d * 90, r2d * 180, false); + this.lineTo(x, y + r); + this.arc(x + r, y + r, r, r2d * 180, r2d * 270, false); + this.closePath(); + }; + /** + * http://stackoverflow.com/questions/2172798/how-to-draw-an-oval-in-html5-canvas + * + * Postfix '_vis' added to discern it from standard method ellipse(). + * + * @param {number} x + * @param {number} y + * @param {number} w + * @param {number} h + */ + + + CanvasRenderingContext2D.prototype.ellipse_vis = function (x, y, w, h) { + var kappa = .5522848, + ox = w / 2 * kappa, + // control point offset horizontal + oy = h / 2 * kappa, + // control point offset vertical + xe = x + w, + // x-end + ye = y + h, + // y-end + xm = x + w / 2, + // x-middle + ym = y + h / 2; // y-middle + + this.beginPath(); + this.moveTo(x, ym); + this.bezierCurveTo(x, ym - oy, xm - ox, y, xm, y); + this.bezierCurveTo(xm + ox, y, xe, ym - oy, xe, ym); + this.bezierCurveTo(xe, ym + oy, xm + ox, ye, xm, ye); + this.bezierCurveTo(xm - ox, ye, x, ym + oy, x, ym); + this.closePath(); + }; + /** + * http://stackoverflow.com/questions/2172798/how-to-draw-an-oval-in-html5-canvas + * + * @param {number} x + * @param {number} y + * @param {number} w + * @param {number} h + */ + + + CanvasRenderingContext2D.prototype.database = function (x, y, w, h) { + var f = 1 / 3; + var wEllipse = w; + var hEllipse = h * f; + var kappa = .5522848, + ox = wEllipse / 2 * kappa, + // control point offset horizontal + oy = hEllipse / 2 * kappa, + // control point offset vertical + xe = x + wEllipse, + // x-end + ye = y + hEllipse, + // y-end + xm = x + wEllipse / 2, + // x-middle + ym = y + hEllipse / 2, + // y-middle + ymb = y + (h - hEllipse / 2), + // y-midlle, bottom ellipse + yeb = y + h; // y-end, bottom ellipse + + this.beginPath(); + this.moveTo(xe, ym); + this.bezierCurveTo(xe, ym + oy, xm + ox, ye, xm, ye); + this.bezierCurveTo(xm - ox, ye, x, ym + oy, x, ym); + this.bezierCurveTo(x, ym - oy, xm - ox, y, xm, y); + this.bezierCurveTo(xm + ox, y, xe, ym - oy, xe, ym); + this.lineTo(xe, ymb); + this.bezierCurveTo(xe, ymb + oy, xm + ox, yeb, xm, yeb); + this.bezierCurveTo(xm - ox, yeb, x, ymb + oy, x, ymb); + this.lineTo(x, ym); + }; + /** + * Sets up the dashedLine functionality for drawing + * Original code came from http://stackoverflow.com/questions/4576724/dotted-stroke-in-canvas + * @author David Jordan + * @date 2012-08-08 + * + * @param {number} x + * @param {number} y + * @param {number} x2 + * @param {number} y2 + * @param {string} pattern + */ + + + CanvasRenderingContext2D.prototype.dashedLine = function (x, y, x2, y2, pattern) { + this.beginPath(); + this.moveTo(x, y); + var patternLength = pattern.length; + var dx = x2 - x; + var dy = y2 - y; + var slope = dy / dx; + var distRemaining = Math.sqrt(dx * dx + dy * dy); + var patternIndex = 0; + var draw = true; + var xStep = 0; + var dashLength = pattern[0]; + + while (distRemaining >= 0.1) { + dashLength = pattern[patternIndex++ % patternLength]; + + if (dashLength > distRemaining) { + dashLength = distRemaining; + } + + xStep = Math.sqrt(dashLength * dashLength / (1 + slope * slope)); + xStep = dx < 0 ? -xStep : xStep; + x += xStep; + y += slope * xStep; + + if (draw === true) { + this.lineTo(x, y); + } else { + this.moveTo(x, y); + } + + distRemaining -= dashLength; + draw = !draw; + } + }; + /** + * Draw a Hexagon shape with 6 sides + * @param {Number} x horizontal center + * @param {Number} y vertical center + * @param {Number} r radius + */ + + + CanvasRenderingContext2D.prototype.hexagon = function (x, y, r) { + this.beginPath(); + var sides = 6; + var a = Math.PI * 2 / sides; + this.moveTo(x + r, y); + + for (var i = 1; i < sides; i++) { + this.lineTo(x + r * Math.cos(a * i), y + r * Math.sin(a * i)); + } + + this.closePath(); + }; +} + +var commonjsGlobal$2 = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; + +function commonjsRequire$2 () { + throw new Error('Dynamic requires are not currently supported by rollup-plugin-commonjs'); +} + +function unwrapExports (x) { + return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x; +} + +function createCommonjsModule$2(fn, module) { + return module = { exports: {} }, fn(module, module.exports), module.exports; +} + +function getCjsExportFromNamespace (n) { + return n && n['default'] || n; +} + +var componentEmitter = createCommonjsModule$2(function (module) { + /** + * Expose `Emitter`. + */ + { + module.exports = Emitter; + } + /** + * Initialize a new `Emitter`. + * + * @api public + */ + + + function Emitter(obj) { + if (obj) return mixin(obj); + } + /** + * Mixin the emitter properties. + * + * @param {Object} obj + * @return {Object} + * @api private + */ + + function mixin(obj) { + for (var key in Emitter.prototype) { + obj[key] = Emitter.prototype[key]; + } + + return obj; + } + /** + * Listen on the given `event` with `fn`. + * + * @param {String} event + * @param {Function} fn + * @return {Emitter} + * @api public + */ + + + Emitter.prototype.on = Emitter.prototype.addEventListener = function (event, fn) { + this._callbacks = this._callbacks || {}; + (this._callbacks['$' + event] = this._callbacks['$' + event] || []).push(fn); + return this; + }; + /** + * Adds an `event` listener that will be invoked a single + * time then automatically removed. + * + * @param {String} event + * @param {Function} fn + * @return {Emitter} + * @api public + */ + + + Emitter.prototype.once = function (event, fn) { + function on() { + this.off(event, on); + fn.apply(this, arguments); + } + + on.fn = fn; + this.on(event, on); + return this; + }; + /** + * Remove the given callback for `event` or all + * registered callbacks. + * + * @param {String} event + * @param {Function} fn + * @return {Emitter} + * @api public + */ + + + Emitter.prototype.off = Emitter.prototype.removeListener = Emitter.prototype.removeAllListeners = Emitter.prototype.removeEventListener = function (event, fn) { + this._callbacks = this._callbacks || {}; // all + + if (0 == arguments.length) { + this._callbacks = {}; + return this; + } // specific event + + + var callbacks = this._callbacks['$' + event]; + if (!callbacks) return this; // remove all handlers + + if (1 == arguments.length) { + delete this._callbacks['$' + event]; + return this; + } // remove specific handler + + + var cb; + + for (var i = 0; i < callbacks.length; i++) { + cb = callbacks[i]; + + if (cb === fn || cb.fn === fn) { + callbacks.splice(i, 1); + break; + } + } // Remove event specific arrays for event types that no + // one is subscribed for to avoid memory leak. + + + if (callbacks.length === 0) { + delete this._callbacks['$' + event]; + } + + return this; + }; + /** + * Emit `event` with the given args. + * + * @param {String} event + * @param {Mixed} ... + * @return {Emitter} + */ + + + Emitter.prototype.emit = function (event) { + this._callbacks = this._callbacks || {}; + var args = new Array(arguments.length - 1), + callbacks = this._callbacks['$' + event]; + + for (var i = 1; i < arguments.length; i++) { + args[i - 1] = arguments[i]; + } + + if (callbacks) { + callbacks = callbacks.slice(0); + + for (var i = 0, len = callbacks.length; i < len; ++i) { + callbacks[i].apply(this, args); + } + } + + return this; + }; + /** + * Return array of callbacks for `event`. + * + * @param {String} event + * @return {Array} + * @api public + */ + + + Emitter.prototype.listeners = function (event) { + this._callbacks = this._callbacks || {}; + return this._callbacks['$' + event] || []; + }; + /** + * Check if this emitter has `event` handlers. + * + * @param {String} event + * @return {Boolean} + * @api public + */ + + + Emitter.prototype.hasListeners = function (event) { + return !!this.listeners(event).length; + }; +}); + +/** + * Parse a text source containing data in DOT language into a JSON object. + * The object contains two lists: one with nodes and one with edges. + * + * DOT language reference: http://www.graphviz.org/doc/info/lang.html + * + * DOT language attributes: http://graphviz.org/content/attrs + * + * @param {string} data Text containing a graph in DOT-notation + * @return {Object} graph An object containing two parameters: + * {Object[]} nodes + * {Object[]} edges + * + * ------------------------------------------- + * TODO + * ==== + * + * For label handling, this is an incomplete implementation. From docs (quote #3015): + * + * > the escape sequences "\n", "\l" and "\r" divide the label into lines, centered, + * > left-justified, and right-justified, respectively. + * + * Source: http://www.graphviz.org/content/attrs#kescString + * + * > As another aid for readability, dot allows double-quoted strings to span multiple physical + * > lines using the standard C convention of a backslash immediately preceding a newline + * > character + * > In addition, double-quoted strings can be concatenated using a '+' operator. + * > As HTML strings can contain newline characters, which are used solely for formatting, + * > the language does not allow escaped newlines or concatenation operators to be used + * > within them. + * + * - Currently, only '\\n' is handled + * - Note that text explicitly says 'labels'; the dot parser currently handles escape + * sequences in **all** strings. + */ +function parseDOT(data) { + dot = data; + return parseGraph(); +} // mapping of attributes from DOT (the keys) to vis.js (the values) + + +var NODE_ATTR_MAPPING = { + 'fontsize': 'font.size', + 'fontcolor': 'font.color', + 'labelfontcolor': 'font.color', + 'fontname': 'font.face', + 'color': ['color.border', 'color.background'], + 'fillcolor': 'color.background', + 'tooltip': 'title', + 'labeltooltip': 'title' +}; +var EDGE_ATTR_MAPPING = Object.create(NODE_ATTR_MAPPING); +EDGE_ATTR_MAPPING.color = 'color.color'; +EDGE_ATTR_MAPPING.style = 'dashes'; // token types enumeration + +var TOKENTYPE = { + NULL: 0, + DELIMITER: 1, + IDENTIFIER: 2, + UNKNOWN: 3 +}; // map with all delimiters + +var DELIMITERS = { + '{': true, + '}': true, + '[': true, + ']': true, + ';': true, + '=': true, + ',': true, + '->': true, + '--': true +}; +var dot = ''; // current dot file + +var index$1 = 0; // current index in dot file + +var c = ''; // current token character in expr + +var token = ''; // current token + +var tokenType = TOKENTYPE.NULL; // type of the token + +/** + * Get the first character from the dot file. + * The character is stored into the char c. If the end of the dot file is + * reached, the function puts an empty string in c. + */ + +function first() { + index$1 = 0; + c = dot.charAt(0); +} +/** + * Get the next character from the dot file. + * The character is stored into the char c. If the end of the dot file is + * reached, the function puts an empty string in c. + */ + + +function next() { + index$1++; + c = dot.charAt(index$1); +} +/** + * Preview the next character from the dot file. + * @return {string} cNext + */ + + +function nextPreview() { + return dot.charAt(index$1 + 1); +} + +var regexAlphaNumeric = /[a-zA-Z_0-9.:#]/; +/** + * Test whether given character is alphabetic or numeric + * @param {string} c + * @return {Boolean} isAlphaNumeric + */ + +function isAlphaNumeric(c) { + return regexAlphaNumeric.test(c); +} +/** + * Merge all options of object b into object b + * @param {Object} a + * @param {Object} b + * @return {Object} a + */ + + +function merge(a, b) { + if (!a) { + a = {}; + } + + if (b) { + for (var name in b) { + if (b.hasOwnProperty(name)) { + a[name] = b[name]; + } + } + } + + return a; +} +/** + * Set a value in an object, where the provided parameter name can be a + * path with nested parameters. For example: + * + * var obj = {a: 2}; + * setValue(obj, 'b.c', 3); // obj = {a: 2, b: {c: 3}} + * + * @param {Object} obj + * @param {string} path A parameter name or dot-separated parameter path, + * like "color.highlight.border". + * @param {*} value + */ + + +function setValue(obj, path, value) { + var keys = path.split('.'); + var o = obj; + + while (keys.length) { + var key = keys.shift(); + + if (keys.length) { + // this isn't the end point + if (!o[key]) { + o[key] = {}; + } + + o = o[key]; + } else { + // this is the end point + o[key] = value; + } + } +} +/** + * Add a node to a graph object. If there is already a node with + * the same id, their attributes will be merged. + * @param {Object} graph + * @param {Object} node + */ + + +function addNode(graph, node) { + var i, len; + var current = null; // find root graph (in case of subgraph) + + var graphs = [graph]; // list with all graphs from current graph to root graph + + var root = graph; + + while (root.parent) { + graphs.push(root.parent); + root = root.parent; + } // find existing node (at root level) by its id + + + if (root.nodes) { + for (i = 0, len = root.nodes.length; i < len; i++) { + if (node.id === root.nodes[i].id) { + current = root.nodes[i]; + break; + } + } + } + + if (!current) { + // this is a new node + current = { + id: node.id + }; + + if (graph.node) { + // clone default attributes + current.attr = merge(current.attr, graph.node); + } + } // add node to this (sub)graph and all its parent graphs + + + for (i = graphs.length - 1; i >= 0; i--) { + var g = graphs[i]; + + if (!g.nodes) { + g.nodes = []; + } + + if (g.nodes.indexOf(current) === -1) { + g.nodes.push(current); + } + } // merge attributes + + + if (node.attr) { + current.attr = merge(current.attr, node.attr); + } +} +/** + * Add an edge to a graph object + * @param {Object} graph + * @param {Object} edge + */ + + +function addEdge(graph, edge) { + if (!graph.edges) { + graph.edges = []; + } + + graph.edges.push(edge); + + if (graph.edge) { + var attr = merge({}, graph.edge); // clone default attributes + + edge.attr = merge(attr, edge.attr); // merge attributes + } +} +/** + * Create an edge to a graph object + * @param {Object} graph + * @param {string | number | Object} from + * @param {string | number | Object} to + * @param {string} type + * @param {Object | null} attr + * @return {Object} edge + */ + + +function createEdge(graph, from, to, type, attr) { + var edge = { + from: from, + to: to, + type: type + }; + + if (graph.edge) { + edge.attr = merge({}, graph.edge); // clone default attributes + } + + edge.attr = merge(edge.attr || {}, attr); // merge attributes + // Move arrows attribute from attr to edge temporally created in + // parseAttributeList(). + + if (attr != null) { + if (attr.hasOwnProperty('arrows') && attr['arrows'] != null) { + edge['arrows'] = { + to: { + enabled: true, + type: attr.arrows.type + } + }; + attr['arrows'] = null; + } + } + + return edge; +} +/** + * Get next token in the current dot file. + * The token and token type are available as token and tokenType + */ + + +function getToken() { + tokenType = TOKENTYPE.NULL; + token = ''; // skip over whitespaces + + while (c === ' ' || c === '\t' || c === '\n' || c === '\r') { + // space, tab, enter + next(); + } + + do { + var isComment = false; // skip comment + + if (c === '#') { + // find the previous non-space character + var i = index$1 - 1; + + while (dot.charAt(i) === ' ' || dot.charAt(i) === '\t') { + i--; + } + + if (dot.charAt(i) === '\n' || dot.charAt(i) === '') { + // the # is at the start of a line, this is indeed a line comment + while (c != '' && c != '\n') { + next(); + } + + isComment = true; + } + } + + if (c === '/' && nextPreview() === '/') { + // skip line comment + while (c != '' && c != '\n') { + next(); + } + + isComment = true; + } + + if (c === '/' && nextPreview() === '*') { + // skip block comment + while (c != '') { + if (c === '*' && nextPreview() === '/') { + // end of block comment found. skip these last two characters + next(); + next(); + break; + } else { + next(); + } + } + + isComment = true; + } // skip over whitespaces + + + while (c === ' ' || c === '\t' || c === '\n' || c === '\r') { + // space, tab, enter + next(); + } + } while (isComment); // check for end of dot file + + + if (c === '') { + // token is still empty + tokenType = TOKENTYPE.DELIMITER; + return; + } // check for delimiters consisting of 2 characters + + + var c2 = c + nextPreview(); + + if (DELIMITERS[c2]) { + tokenType = TOKENTYPE.DELIMITER; + token = c2; + next(); + next(); + return; + } // check for delimiters consisting of 1 character + + + if (DELIMITERS[c]) { + tokenType = TOKENTYPE.DELIMITER; + token = c; + next(); + return; + } // check for an identifier (number or string) + // TODO: more precise parsing of numbers/strings (and the port separator ':') + + + if (isAlphaNumeric(c) || c === '-') { + token += c; + next(); + + while (isAlphaNumeric(c)) { + token += c; + next(); + } + + if (token === 'false') { + token = false; // convert to boolean + } else if (token === 'true') { + token = true; // convert to boolean + } else if (!isNaN(Number(token))) { + token = Number(token); // convert to number + } + + tokenType = TOKENTYPE.IDENTIFIER; + return; + } // check for a string enclosed by double quotes + + + if (c === '"') { + next(); + + while (c != '' && (c != '"' || c === '"' && nextPreview() === '"')) { + if (c === '"') { + // skip the escape character + token += c; + next(); + } else if (c === '\\' && nextPreview() === 'n') { + // Honor a newline escape sequence + token += '\n'; + next(); + } else { + token += c; + } + + next(); + } + + if (c != '"') { + throw newSyntaxError('End of string " expected'); + } + + next(); + tokenType = TOKENTYPE.IDENTIFIER; + return; + } // something unknown is found, wrong characters, a syntax error + + + tokenType = TOKENTYPE.UNKNOWN; + + while (c != '') { + token += c; + next(); + } + + throw new SyntaxError('Syntax error in part "' + chop(token, 30) + '"'); +} +/** + * Parse a graph. + * @returns {Object} graph + */ + + +function parseGraph() { + var graph = {}; + first(); + getToken(); // optional strict keyword + + if (token === 'strict') { + graph.strict = true; + getToken(); + } // graph or digraph keyword + + + if (token === 'graph' || token === 'digraph') { + graph.type = token; + getToken(); + } // optional graph id + + + if (tokenType === TOKENTYPE.IDENTIFIER) { + graph.id = token; + getToken(); + } // open angle bracket + + + if (token != '{') { + throw newSyntaxError('Angle bracket { expected'); + } + + getToken(); // statements + + parseStatements(graph); // close angle bracket + + if (token != '}') { + throw newSyntaxError('Angle bracket } expected'); + } + + getToken(); // end of file + + if (token !== '') { + throw newSyntaxError('End of file expected'); + } + + getToken(); // remove temporary default options + + delete graph.node; + delete graph.edge; + delete graph.graph; + return graph; +} +/** + * Parse a list with statements. + * @param {Object} graph + */ + + +function parseStatements(graph) { + while (token !== '' && token != '}') { + parseStatement(graph); + + if (token === ';') { + getToken(); + } + } +} +/** + * Parse a single statement. Can be a an attribute statement, node + * statement, a series of node statements and edge statements, or a + * parameter. + * @param {Object} graph + */ + + +function parseStatement(graph) { + // parse subgraph + var subgraph = parseSubgraph(graph); + + if (subgraph) { + // edge statements + parseEdge(graph, subgraph); + return; + } // parse an attribute statement + + + var attr = parseAttributeStatement(graph); + + if (attr) { + return; + } // parse node + + + if (tokenType != TOKENTYPE.IDENTIFIER) { + throw newSyntaxError('Identifier expected'); + } + + var id = token; // id can be a string or a number + + getToken(); + + if (token === '=') { + // id statement + getToken(); + + if (tokenType != TOKENTYPE.IDENTIFIER) { + throw newSyntaxError('Identifier expected'); + } + + graph[id] = token; + getToken(); // TODO: implement comma separated list with "a_list: ID=ID [','] [a_list] " + } else { + parseNodeStatement(graph, id); + } +} +/** + * Parse a subgraph + * @param {Object} graph parent graph object + * @return {Object | null} subgraph + */ + + +function parseSubgraph(graph) { + var subgraph = null; // optional subgraph keyword + + if (token === 'subgraph') { + subgraph = {}; + subgraph.type = 'subgraph'; + getToken(); // optional graph id + + if (tokenType === TOKENTYPE.IDENTIFIER) { + subgraph.id = token; + getToken(); + } + } // open angle bracket + + + if (token === '{') { + getToken(); + + if (!subgraph) { + subgraph = {}; + } + + subgraph.parent = graph; + subgraph.node = graph.node; + subgraph.edge = graph.edge; + subgraph.graph = graph.graph; // statements + + parseStatements(subgraph); // close angle bracket + + if (token != '}') { + throw newSyntaxError('Angle bracket } expected'); + } + + getToken(); // remove temporary default options + + delete subgraph.node; + delete subgraph.edge; + delete subgraph.graph; + delete subgraph.parent; // register at the parent graph + + if (!graph.subgraphs) { + graph.subgraphs = []; + } + + graph.subgraphs.push(subgraph); + } + + return subgraph; +} +/** + * parse an attribute statement like "node [shape=circle fontSize=16]". + * Available keywords are 'node', 'edge', 'graph'. + * The previous list with default attributes will be replaced + * @param {Object} graph + * @returns {String | null} keyword Returns the name of the parsed attribute + * (node, edge, graph), or null if nothing + * is parsed. + */ + + +function parseAttributeStatement(graph) { + // attribute statements + if (token === 'node') { + getToken(); // node attributes + + graph.node = parseAttributeList(); + return 'node'; + } else if (token === 'edge') { + getToken(); // edge attributes + + graph.edge = parseAttributeList(); + return 'edge'; + } else if (token === 'graph') { + getToken(); // graph attributes + + graph.graph = parseAttributeList(); + return 'graph'; + } + + return null; +} +/** + * parse a node statement + * @param {Object} graph + * @param {string | number} id + */ + + +function parseNodeStatement(graph, id) { + // node statement + var node = { + id: id + }; + var attr = parseAttributeList(); + + if (attr) { + node.attr = attr; + } + + addNode(graph, node); // edge statements + + parseEdge(graph, id); +} +/** + * Parse an edge or a series of edges + * @param {Object} graph + * @param {string | number} from Id of the from node + */ + + +function parseEdge(graph, from) { + while (token === '->' || token === '--') { + var to; + var type = token; + getToken(); + var subgraph = parseSubgraph(graph); + + if (subgraph) { + to = subgraph; + } else { + if (tokenType != TOKENTYPE.IDENTIFIER) { + throw newSyntaxError('Identifier or subgraph expected'); + } + + to = token; + addNode(graph, { + id: to + }); + getToken(); + } // parse edge attributes + + + var attr = parseAttributeList(); // create edge + + var edge = createEdge(graph, from, to, type, attr); + addEdge(graph, edge); + from = to; + } +} +/** + * Parse a set with attributes, + * for example [label="1.000", shape=solid] + * @return {Object | null} attr + */ + + +function parseAttributeList() { + var i; + var attr = null; // edge styles of dot and vis + + var edgeStyles = { + 'dashed': true, + 'solid': false, + 'dotted': [1, 5] + }; + /** + * Define arrow types. + * vis currently supports types defined in 'arrowTypes'. + * Details of arrow shapes are described in + * http://www.graphviz.org/content/arrow-shapes + */ + + var arrowTypes = { + dot: 'circle', + box: 'box', + crow: 'crow', + curve: 'curve', + icurve: 'inv_curve', + normal: 'triangle', + inv: 'inv_triangle', + diamond: 'diamond', + tee: 'bar', + vee: 'vee' + }; + /** + * 'attr_list' contains attributes for checking if some of them are affected + * later. For instance, both of 'arrowhead' and 'dir' (edge style defined + * in DOT) make changes to 'arrows' attribute in vis. + */ + + var attr_list = new Array(); + var attr_names = new Array(); // used for checking the case. + // parse attributes + + while (token === '[') { + getToken(); + attr = {}; + + while (token !== '' && token != ']') { + if (tokenType != TOKENTYPE.IDENTIFIER) { + throw newSyntaxError('Attribute name expected'); + } + + var name = token; + getToken(); + + if (token != '=') { + throw newSyntaxError('Equal sign = expected'); + } + + getToken(); + + if (tokenType != TOKENTYPE.IDENTIFIER) { + throw newSyntaxError('Attribute value expected'); + } + + var value = token; // convert from dot style to vis + + if (name === 'style') { + value = edgeStyles[value]; + } + + var arrowType; + + if (name === 'arrowhead') { + arrowType = arrowTypes[value]; + name = 'arrows'; + value = { + 'to': { + 'enabled': true, + 'type': arrowType + } + }; + } + + if (name === 'arrowtail') { + arrowType = arrowTypes[value]; + name = 'arrows'; + value = { + 'from': { + 'enabled': true, + 'type': arrowType + } + }; + } + + attr_list.push({ + 'attr': attr, + 'name': name, + 'value': value + }); + attr_names.push(name); + getToken(); + + if (token == ',') { + getToken(); + } + } + + if (token != ']') { + throw newSyntaxError('Bracket ] expected'); + } + + getToken(); + } + /** + * As explained in [1], graphviz has limitations for combination of + * arrow[head|tail] and dir. If attribute list includes 'dir', + * following cases just be supported. + * 1. both or none + arrowhead, arrowtail + * 2. forward + arrowhead (arrowtail is not affedted) + * 3. back + arrowtail (arrowhead is not affected) + * [1] https://www.graphviz.org/doc/info/attrs.html#h:undir_note + */ + + + if (attr_names.includes('dir')) { + var idx = {}; // get index of 'arrows' and 'dir' + + idx.arrows = {}; + + for (i = 0; i < attr_list.length; i++) { + if (attr_list[i].name === 'arrows') { + if (attr_list[i].value.to != null) { + idx.arrows.to = i; + } else if (attr_list[i].value.from != null) { + idx.arrows.from = i; + } else { + throw newSyntaxError('Invalid value of arrows'); + } + } else if (attr_list[i].name === 'dir') { + idx.dir = i; + } + } // first, add default arrow shape if it is not assigned to avoid error + + + var dir_type = attr_list[idx.dir].value; + + if (!attr_names.includes('arrows')) { + if (dir_type === 'both') { + attr_list.push({ + 'attr': attr_list[idx.dir].attr, + 'name': 'arrows', + 'value': { + to: { + enabled: true + } + } + }); + idx.arrows.to = attr_list.length - 1; + attr_list.push({ + 'attr': attr_list[idx.dir].attr, + 'name': 'arrows', + 'value': { + from: { + enabled: true + } + } + }); + idx.arrows.from = attr_list.length - 1; + } else if (dir_type === 'forward') { + attr_list.push({ + 'attr': attr_list[idx.dir].attr, + 'name': 'arrows', + 'value': { + to: { + enabled: true + } + } + }); + idx.arrows.to = attr_list.length - 1; + } else if (dir_type === 'back') { + attr_list.push({ + 'attr': attr_list[idx.dir].attr, + 'name': 'arrows', + 'value': { + from: { + enabled: true + } + } + }); + idx.arrows.from = attr_list.length - 1; + } else if (dir_type === 'none') { + attr_list.push({ + 'attr': attr_list[idx.dir].attr, + 'name': 'arrows', + 'value': '' + }); + idx.arrows.to = attr_list.length - 1; + } else { + throw newSyntaxError('Invalid dir type "' + dir_type + '"'); + } + } + + var from_type; + var to_type; // update 'arrows' attribute from 'dir'. + + if (dir_type === 'both') { + // both of shapes of 'from' and 'to' are given + if (idx.arrows.to && idx.arrows.from) { + to_type = attr_list[idx.arrows.to].value.to.type; + from_type = attr_list[idx.arrows.from].value.from.type; + attr_list[idx.arrows.to] = { + 'attr': attr_list[idx.arrows.to].attr, + 'name': attr_list[idx.arrows.to].name, + 'value': { + to: { + enabled: true, + type: to_type + }, + from: { + enabled: true, + type: from_type + } + } + }; + attr_list.splice(idx.arrows.from, 1); // shape of 'to' is assigned and use default to 'from' + } else if (idx.arrows.to) { + to_type = attr_list[idx.arrows.to].value.to.type; + from_type = 'arrow'; + attr_list[idx.arrows.to] = { + 'attr': attr_list[idx.arrows.to].attr, + 'name': attr_list[idx.arrows.to].name, + 'value': { + to: { + enabled: true, + type: to_type + }, + from: { + enabled: true, + type: from_type + } + } + }; // only shape of 'from' is assigned and use default for 'to' + } else if (idx.arrows.from) { + to_type = 'arrow'; + from_type = attr_list[idx.arrows.from].value.from.type; + attr_list[idx.arrows.from] = { + 'attr': attr_list[idx.arrows.from].attr, + 'name': attr_list[idx.arrows.from].name, + 'value': { + to: { + enabled: true, + type: to_type + }, + from: { + enabled: true, + type: from_type + } + } + }; + } + } else if (dir_type === 'back') { + // given both of shapes, but use only 'from' + if (idx.arrows.to && idx.arrows.from) { + to_type = ''; + from_type = attr_list[idx.arrows.from].value.from.type; + attr_list[idx.arrows.from] = { + 'attr': attr_list[idx.arrows.from].attr, + 'name': attr_list[idx.arrows.from].name, + 'value': { + to: { + enabled: true, + type: to_type + }, + from: { + enabled: true, + type: from_type + } + } + }; // given shape of 'to', but does not use it + } else if (idx.arrows.to) { + to_type = ''; + from_type = 'arrow'; + idx.arrows.from = idx.arrows.to; + attr_list[idx.arrows.from] = { + 'attr': attr_list[idx.arrows.from].attr, + 'name': attr_list[idx.arrows.from].name, + 'value': { + to: { + enabled: true, + type: to_type + }, + from: { + enabled: true, + type: from_type + } + } + }; // assign given 'from' shape + } else if (idx.arrows.from) { + to_type = ''; + from_type = attr_list[idx.arrows.from].value.from.type; + attr_list[idx.arrows.to] = { + 'attr': attr_list[idx.arrows.from].attr, + 'name': attr_list[idx.arrows.from].name, + 'value': { + to: { + enabled: true, + type: to_type + }, + from: { + enabled: true, + type: from_type + } + } + }; + } + + attr_list[idx.arrows.from] = { + 'attr': attr_list[idx.arrows.from].attr, + 'name': attr_list[idx.arrows.from].name, + 'value': { + from: { + enabled: true, + type: attr_list[idx.arrows.from].value.from.type + } + } + }; + } else if (dir_type === 'none') { + var idx_arrow; + + if (idx.arrows.to) { + idx_arrow = idx.arrows.to; + } else { + idx_arrow = idx.arrows.from; + } + + attr_list[idx_arrow] = { + 'attr': attr_list[idx_arrow].attr, + 'name': attr_list[idx_arrow].name, + 'value': '' + }; + } else if (dir_type === 'forward') { + // given both of shapes, but use only 'to' + if (idx.arrows.to && idx.arrows.from) { + to_type = attr_list[idx.arrows.to].value.to.type; + from_type = ''; + attr_list[idx.arrows.to] = { + 'attr': attr_list[idx.arrows.to].attr, + 'name': attr_list[idx.arrows.to].name, + 'value': { + to: { + enabled: true, + type: to_type + }, + from: { + enabled: true, + type: from_type + } + } + }; // assign given 'to' shape + } else if (idx.arrows.to) { + to_type = attr_list[idx.arrows.to].value.to.type; + from_type = ''; + attr_list[idx.arrows.to] = { + 'attr': attr_list[idx.arrows.to].attr, + 'name': attr_list[idx.arrows.to].name, + 'value': { + to: { + enabled: true, + type: to_type + }, + from: { + enabled: true, + type: from_type + } + } + }; // given shape of 'from', but does not use it + } else if (idx.arrows.from) { + to_type = 'arrow'; + from_type = ''; + idx.arrows.to = idx.arrows.from; + attr_list[idx.arrows.to] = { + 'attr': attr_list[idx.arrows.to].attr, + 'name': attr_list[idx.arrows.to].name, + 'value': { + to: { + enabled: true, + type: to_type + }, + from: { + enabled: true, + type: from_type + } + } + }; + } + + attr_list[idx.arrows.to] = { + 'attr': attr_list[idx.arrows.to].attr, + 'name': attr_list[idx.arrows.to].name, + 'value': { + to: { + enabled: true, + type: attr_list[idx.arrows.to].value.to.type + } + } + }; + } else { + throw newSyntaxError('Invalid dir type "' + dir_type + '"'); + } // remove 'dir' attribute no need anymore + + + attr_list.splice(idx.dir, 1); + } // parse 'penwidth' + + + var nof_attr_list; + + if (attr_names.includes('penwidth')) { + var tmp_attr_list = []; + nof_attr_list = attr_list.length; + + for (i = 0; i < nof_attr_list; i++) { + // exclude 'width' from attr_list if 'penwidth' exists + if (attr_list[i].name !== 'width') { + if (attr_list[i].name === 'penwidth') { + attr_list[i].name = 'width'; + } + + tmp_attr_list.push(attr_list[i]); + } + } + + attr_list = tmp_attr_list; + } + + nof_attr_list = attr_list.length; + + for (i = 0; i < nof_attr_list; i++) { + setValue(attr_list[i].attr, attr_list[i].name, attr_list[i].value); + } + + return attr; +} +/** + * Create a syntax error with extra information on current token and index. + * @param {string} message + * @returns {SyntaxError} err + */ + + +function newSyntaxError(message) { + return new SyntaxError(message + ', got "' + chop(token, 30) + '" (char ' + index$1 + ')'); +} +/** + * Chop off text after a maximum length + * @param {string} text + * @param {number} maxLength + * @returns {String} + */ + + +function chop(text, maxLength) { + return text.length <= maxLength ? text : text.substr(0, 27) + '...'; +} +/** + * Execute a function fn for each pair of elements in two arrays + * @param {Array | *} array1 + * @param {Array | *} array2 + * @param {function} fn + */ + + +function forEach2(array1, array2, fn) { + if (Array.isArray(array1)) { + array1.forEach(function (elem1) { + if (Array.isArray(array2)) { + array2.forEach(function (elem2) { + fn(elem1, elem2); + }); + } else { + fn(elem1, array2); + } + }); + } else { + if (Array.isArray(array2)) { + array2.forEach(function (elem2) { + fn(array1, elem2); + }); + } else { + fn(array1, array2); + } + } +} +/** + * Set a nested property on an object + * When nested objects are missing, they will be created. + * For example setProp({}, 'font.color', 'red') will return {font: {color: 'red'}} + * @param {Object} object + * @param {string} path A dot separated string like 'font.color' + * @param {*} value Value for the property + * @return {Object} Returns the original object, allows for chaining. + */ + + +function setProp(object, path, value) { + var names = path.split('.'); + var prop = names.pop(); // traverse over the nested objects + + var obj = object; + + for (var i = 0; i < names.length; i++) { + var name = names[i]; + + if (!(name in obj)) { + obj[name] = {}; + } + + obj = obj[name]; + } // set the property value + + + obj[prop] = value; + return object; +} +/** + * Convert an object with DOT attributes to their vis.js equivalents. + * @param {Object} attr Object with DOT attributes + * @param {Object} mapping + * @return {Object} Returns an object with vis.js attributes + */ + + +function convertAttr(attr, mapping) { + var converted = {}; + + for (var prop in attr) { + if (attr.hasOwnProperty(prop)) { + var visProp = mapping[prop]; + + if (Array.isArray(visProp)) { + visProp.forEach(function (visPropI) { + setProp(converted, visPropI, attr[prop]); + }); + } else if (typeof visProp === 'string') { + setProp(converted, visProp, attr[prop]); + } else { + setProp(converted, prop, attr[prop]); + } + } + } + + return converted; +} +/** + * Convert a string containing a graph in DOT language into a map containing + * with nodes and edges in the format of graph. + * @param {string} data Text containing a graph in DOT-notation + * @return {Object} graphData + */ + + +function DOTToGraph(data) { + // parse the DOT file + var dotData = parseDOT(data); + var graphData = { + nodes: [], + edges: [], + options: {} + }; // copy the nodes + + if (dotData.nodes) { + dotData.nodes.forEach(function (dotNode) { + var graphNode = { + id: dotNode.id, + label: String(dotNode.label || dotNode.id) + }; + merge(graphNode, convertAttr(dotNode.attr, NODE_ATTR_MAPPING)); + + if (graphNode.image) { + graphNode.shape = 'image'; + } + + graphData.nodes.push(graphNode); + }); + } // copy the edges + + + if (dotData.edges) { + /** + * Convert an edge in DOT format to an edge with VisGraph format + * @param {Object} dotEdge + * @returns {Object} graphEdge + */ + var convertEdge = function convertEdge(dotEdge) { + var graphEdge = { + from: dotEdge.from, + to: dotEdge.to + }; + merge(graphEdge, convertAttr(dotEdge.attr, EDGE_ATTR_MAPPING)); // Add arrows attribute to default styled arrow. + // The reason why default style is not added in parseAttributeList() is + // because only default is cleared before here. + + if (graphEdge.arrows == null && dotEdge.type === '->') { + graphEdge.arrows = 'to'; + } + + return graphEdge; + }; + + dotData.edges.forEach(function (dotEdge) { + var from, to; + + if (dotEdge.from instanceof Object) { + from = dotEdge.from.nodes; + } else { + from = { + id: dotEdge.from + }; + } + + if (dotEdge.to instanceof Object) { + to = dotEdge.to.nodes; + } else { + to = { + id: dotEdge.to + }; + } + + if (dotEdge.from instanceof Object && dotEdge.from.edges) { + dotEdge.from.edges.forEach(function (subEdge) { + var graphEdge = convertEdge(subEdge); + graphData.edges.push(graphEdge); + }); + } + + forEach2(from, to, function (from, to) { + var subEdge = createEdge(graphData, from.id, to.id, dotEdge.type, dotEdge.attr); + var graphEdge = convertEdge(subEdge); + graphData.edges.push(graphEdge); + }); + + if (dotEdge.to instanceof Object && dotEdge.to.edges) { + dotEdge.to.edges.forEach(function (subEdge) { + var graphEdge = convertEdge(subEdge); + graphData.edges.push(graphEdge); + }); + } + }); + } // copy the options + + + if (dotData.attr) { + graphData.options = dotData.attr; + } + + return graphData; +} // exports + + +var parseDOT_1 = parseDOT; +var DOTToGraph_1 = DOTToGraph; +var dotparser = { + parseDOT: parseDOT_1, + DOTToGraph: DOTToGraph_1 +}; + +var dotparser$1 = /*#__PURE__*/Object.freeze({ + 'default': dotparser, + __moduleExports: dotparser, + parseDOT: parseDOT_1, + DOTToGraph: DOTToGraph_1 +}); + +/** + * Convert Gephi to Vis. + * + * @param gephiJSON - The parsed JSON data in Gephi format. + * @param optionsObj - Additional options. + * + * @returns The converted data ready to be used in Vis. + */ +function parseGephi(gephiJSON, optionsObj) { + var options = { + edges: { + inheritColor: false + }, + nodes: { + fixed: false, + parseColor: false + } + }; + + if (optionsObj != null) { + if (optionsObj.fixed != null) { + options.nodes.fixed = optionsObj.fixed; + } + + if (optionsObj.parseColor != null) { + options.nodes.parseColor = optionsObj.parseColor; + } + + if (optionsObj.inheritColor != null) { + options.edges.inheritColor = optionsObj.inheritColor; + } + } + + var gEdges = gephiJSON.edges; + var vEdges = gEdges.map(function (gEdge) { + var vEdge = { + from: gEdge.source, + id: gEdge.id, + to: gEdge.target + }; + + if (gEdge.attributes != null) { + vEdge.attributes = gEdge.attributes; + } + + if (gEdge.label != null) { + vEdge.label = gEdge.label; + } + + if (gEdge.attributes != null && gEdge.attributes.title != null) { + vEdge.title = gEdge.attributes.title; + } + + if (gEdge.type === 'Directed') { + vEdge.arrows = 'to'; + } // edge['value'] = gEdge.attributes != null ? gEdge.attributes.Weight : undefined; + // edge['width'] = edge['value'] != null ? undefined : edgegEdge.size; + + + if (gEdge.color && options.edges.inheritColor === false) { + vEdge.color = gEdge.color; + } + + return vEdge; + }); + var vNodes = gephiJSON.nodes.map(function (gNode) { + var vNode = { + id: gNode.id, + fixed: options.nodes.fixed && gNode.x != null && gNode.y != null + }; + + if (gNode.attributes != null) { + vNode.attributes = gNode.attributes; + } + + if (gNode.label != null) { + vNode.label = gNode.label; + } + + if (gNode.size != null) { + vNode.size = gNode.size; + } + + if (gNode.attributes != null && gNode.attributes.title != null) { + vNode.title = gNode.attributes.title; + } + + if (gNode.title != null) { + vNode.title = gNode.title; + } + + if (gNode.x != null) { + vNode.x = gNode.x; + } + + if (gNode.y != null) { + vNode.y = gNode.y; + } + + if (gNode.color != null) { + if (options.nodes.parseColor === true) { + vNode.color = gNode.color; + } else { + vNode.color = { + background: gNode.color, + border: gNode.color, + highlight: { + background: gNode.color, + border: gNode.color + }, + hover: { + background: gNode.color, + border: gNode.color + } + }; + } + } + + return vNode; + }); + return { + nodes: vNodes, + edges: vEdges + }; +} + +var gephiParser = /*#__PURE__*/Object.freeze({ + parseGephi: parseGephi +}); + + + +var Activator = /*#__PURE__*/Object.freeze({ + +}); + +var keycharm = createCommonjsModule$2(function (module, exports) { + /** + * Created by Alex on 11/6/2014. + */ + // https://github.com/umdjs/umd/blob/master/returnExports.js#L40-L60 + // if the module has no dependencies, the above pattern can be simplified to + + (function (root, factory) { + { + // Node. Does not work with strict CommonJS, but + // only CommonJS-like environments that support module.exports, + // like Node. + module.exports = factory(); + } + })(commonjsGlobal$2, function () { + function keycharm(options) { + var preventDefault = options && options.preventDefault || false; + var container = options && options.container || window; + var _exportFunctions = {}; + var _bound = { + keydown: {}, + keyup: {} + }; + var _keys = {}; + var i; // a - z + + for (i = 97; i <= 122; i++) { + _keys[String.fromCharCode(i)] = { + code: 65 + (i - 97), + shift: false + }; + } // A - Z + + + for (i = 65; i <= 90; i++) { + _keys[String.fromCharCode(i)] = { + code: i, + shift: true + }; + } // 0 - 9 + + + for (i = 0; i <= 9; i++) { + _keys['' + i] = { + code: 48 + i, + shift: false + }; + } // F1 - F12 + + + for (i = 1; i <= 12; i++) { + _keys['F' + i] = { + code: 111 + i, + shift: false + }; + } // num0 - num9 + + + for (i = 0; i <= 9; i++) { + _keys['num' + i] = { + code: 96 + i, + shift: false + }; + } // numpad misc + + + _keys['num*'] = { + code: 106, + shift: false + }; + _keys['num+'] = { + code: 107, + shift: false + }; + _keys['num-'] = { + code: 109, + shift: false + }; + _keys['num/'] = { + code: 111, + shift: false + }; + _keys['num.'] = { + code: 110, + shift: false + }; // arrows + + _keys['left'] = { + code: 37, + shift: false + }; + _keys['up'] = { + code: 38, + shift: false + }; + _keys['right'] = { + code: 39, + shift: false + }; + _keys['down'] = { + code: 40, + shift: false + }; // extra keys + + _keys['space'] = { + code: 32, + shift: false + }; + _keys['enter'] = { + code: 13, + shift: false + }; + _keys['shift'] = { + code: 16, + shift: undefined + }; + _keys['esc'] = { + code: 27, + shift: false + }; + _keys['backspace'] = { + code: 8, + shift: false + }; + _keys['tab'] = { + code: 9, + shift: false + }; + _keys['ctrl'] = { + code: 17, + shift: false + }; + _keys['alt'] = { + code: 18, + shift: false + }; + _keys['delete'] = { + code: 46, + shift: false + }; + _keys['pageup'] = { + code: 33, + shift: false + }; + _keys['pagedown'] = { + code: 34, + shift: false + }; // symbols + + _keys['='] = { + code: 187, + shift: false + }; + _keys['-'] = { + code: 189, + shift: false + }; + _keys[']'] = { + code: 221, + shift: false + }; + _keys['['] = { + code: 219, + shift: false + }; + + var down = function (event) { + handleEvent(event, 'keydown'); + }; + + var up = function (event) { + handleEvent(event, 'keyup'); + }; // handle the actualy bound key with the event + + + var handleEvent = function (event, type) { + if (_bound[type][event.keyCode] !== undefined) { + var bound = _bound[type][event.keyCode]; + + for (var i = 0; i < bound.length; i++) { + if (bound[i].shift === undefined) { + bound[i].fn(event); + } else if (bound[i].shift == true && event.shiftKey == true) { + bound[i].fn(event); + } else if (bound[i].shift == false && event.shiftKey == false) { + bound[i].fn(event); + } + } + + if (preventDefault == true) { + event.preventDefault(); + } + } + }; // bind a key to a callback + + + _exportFunctions.bind = function (key, callback, type) { + if (type === undefined) { + type = 'keydown'; + } + + if (_keys[key] === undefined) { + throw new Error("unsupported key: " + key); + } + + if (_bound[type][_keys[key].code] === undefined) { + _bound[type][_keys[key].code] = []; + } + + _bound[type][_keys[key].code].push({ + fn: callback, + shift: _keys[key].shift + }); + }; // bind all keys to a call back (demo purposes) + + + _exportFunctions.bindAll = function (callback, type) { + if (type === undefined) { + type = 'keydown'; + } + + for (var key in _keys) { + if (_keys.hasOwnProperty(key)) { + _exportFunctions.bind(key, callback, type); + } + } + }; // get the key label from an event + + + _exportFunctions.getKey = function (event) { + for (var key in _keys) { + if (_keys.hasOwnProperty(key)) { + if (event.shiftKey == true && _keys[key].shift == true && event.keyCode == _keys[key].code) { + return key; + } else if (event.shiftKey == false && _keys[key].shift == false && event.keyCode == _keys[key].code) { + return key; + } else if (event.keyCode == _keys[key].code && key == 'shift') { + return key; + } + } + } + + return "unknown key, currently not supported"; + }; // unbind either a specific callback from a key or all of them (by leaving callback undefined) + + + _exportFunctions.unbind = function (key, callback, type) { + if (type === undefined) { + type = 'keydown'; + } + + if (_keys[key] === undefined) { + throw new Error("unsupported key: " + key); + } + + if (callback !== undefined) { + var newBindings = []; + var bound = _bound[type][_keys[key].code]; + + if (bound !== undefined) { + for (var i = 0; i < bound.length; i++) { + if (!(bound[i].fn == callback && bound[i].shift == _keys[key].shift)) { + newBindings.push(_bound[type][_keys[key].code][i]); + } + } + } + + _bound[type][_keys[key].code] = newBindings; + } else { + _bound[type][_keys[key].code] = []; + } + }; // reset all bound variables. + + + _exportFunctions.reset = function () { + _bound = { + keydown: {}, + keyup: {} + }; + }; // unbind all listeners and reset all variables. + + + _exportFunctions.destroy = function () { + _bound = { + keydown: {}, + keyup: {} + }; + container.removeEventListener('keydown', down, true); + container.removeEventListener('keyup', up, true); + }; // create listeners. + + + container.addEventListener('keydown', down, true); + container.addEventListener('keyup', up, true); // return the public functions. + + return _exportFunctions; + } + + return keycharm; + }); +}); + +var keycharm$1 = /*#__PURE__*/Object.freeze({ + 'default': keycharm, + __moduleExports: keycharm +}); + +/*! Hammer.JS - v2.0.15 - 2019-04-04 + * http://naver.github.io/egjs + * + * Forked By Naver egjs + * Copyright (c) hammerjs + * Licensed under the MIT license */ +function _extends() { + _extends = Object.assign || function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + + return target; + }; + + return _extends.apply(this, arguments); +} + +function _inheritsLoose(subClass, superClass) { + subClass.prototype = Object.create(superClass.prototype); + subClass.prototype.constructor = subClass; + subClass.__proto__ = superClass; +} + +function _assertThisInitialized$1(self) { + if (self === void 0) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + + return self; +} +/** + * @private + * extend object. + * means that properties in dest will be overwritten by the ones in src. + * @param {Object} target + * @param {...Object} objects_to_assign + * @returns {Object} target + */ + + +var assign; + +if (typeof Object.assign !== 'function') { + assign = function assign(target) { + if (target === undefined || target === null) { + throw new TypeError('Cannot convert undefined or null to object'); + } + + var output = Object(target); + + for (var index = 1; index < arguments.length; index++) { + var source = arguments[index]; + + if (source !== undefined && source !== null) { + for (var nextKey in source) { + if (source.hasOwnProperty(nextKey)) { + output[nextKey] = source[nextKey]; + } + } + } + } + + return output; + }; +} else { + assign = Object.assign; +} + +var assign$1 = assign; +var VENDOR_PREFIXES = ['', 'webkit', 'Moz', 'MS', 'ms', 'o']; +var TEST_ELEMENT = typeof document === "undefined" ? { + style: {} +} : document.createElement('div'); +var TYPE_FUNCTION = 'function'; +var round = Math.round, + abs = Math.abs; +var now = Date.now; +/** + * @private + * get the prefixed property + * @param {Object} obj + * @param {String} property + * @returns {String|Undefined} prefixed + */ + +function prefixed(obj, property) { + var prefix; + var prop; + var camelProp = property[0].toUpperCase() + property.slice(1); + var i = 0; + + while (i < VENDOR_PREFIXES.length) { + prefix = VENDOR_PREFIXES[i]; + prop = prefix ? prefix + camelProp : property; + + if (prop in obj) { + return prop; + } + + i++; + } + + return undefined; +} +/* eslint-disable no-new-func, no-nested-ternary */ + + +var win; + +if (typeof window === "undefined") { + // window is undefined in node.js + win = {}; +} else { + win = window; +} + +var PREFIXED_TOUCH_ACTION = prefixed(TEST_ELEMENT.style, 'touchAction'); +var NATIVE_TOUCH_ACTION = PREFIXED_TOUCH_ACTION !== undefined; + +function getTouchActionProps() { + if (!NATIVE_TOUCH_ACTION) { + return false; + } + + var touchMap = {}; + var cssSupports = win.CSS && win.CSS.supports; + ['auto', 'manipulation', 'pan-y', 'pan-x', 'pan-x pan-y', 'none'].forEach(function (val) { + // If css.supports is not supported but there is native touch-action assume it supports + // all values. This is the case for IE 10 and 11. + return touchMap[val] = cssSupports ? win.CSS.supports('touch-action', val) : true; + }); + return touchMap; +} + +var TOUCH_ACTION_COMPUTE = 'compute'; +var TOUCH_ACTION_AUTO = 'auto'; +var TOUCH_ACTION_MANIPULATION = 'manipulation'; // not implemented + +var TOUCH_ACTION_NONE = 'none'; +var TOUCH_ACTION_PAN_X = 'pan-x'; +var TOUCH_ACTION_PAN_Y = 'pan-y'; +var TOUCH_ACTION_MAP = getTouchActionProps(); +var MOBILE_REGEX = /mobile|tablet|ip(ad|hone|od)|android/i; +var SUPPORT_TOUCH = 'ontouchstart' in win; +var SUPPORT_POINTER_EVENTS = prefixed(win, 'PointerEvent') !== undefined; +var SUPPORT_ONLY_TOUCH = SUPPORT_TOUCH && MOBILE_REGEX.test(navigator.userAgent); +var INPUT_TYPE_TOUCH = 'touch'; +var INPUT_TYPE_PEN = 'pen'; +var INPUT_TYPE_MOUSE = 'mouse'; +var INPUT_TYPE_KINECT = 'kinect'; +var COMPUTE_INTERVAL = 25; +var INPUT_START = 1; +var INPUT_MOVE = 2; +var INPUT_END = 4; +var INPUT_CANCEL = 8; +var DIRECTION_NONE = 1; +var DIRECTION_LEFT = 2; +var DIRECTION_RIGHT = 4; +var DIRECTION_UP = 8; +var DIRECTION_DOWN = 16; +var DIRECTION_HORIZONTAL = DIRECTION_LEFT | DIRECTION_RIGHT; +var DIRECTION_VERTICAL = DIRECTION_UP | DIRECTION_DOWN; +var DIRECTION_ALL = DIRECTION_HORIZONTAL | DIRECTION_VERTICAL; +var PROPS_XY = ['x', 'y']; +var PROPS_CLIENT_XY = ['clientX', 'clientY']; +/** + * @private + * walk objects and arrays + * @param {Object} obj + * @param {Function} iterator + * @param {Object} context + */ + +function each(obj, iterator, context) { + var i; + + if (!obj) { + return; + } + + if (obj.forEach) { + obj.forEach(iterator, context); + } else if (obj.length !== undefined) { + i = 0; + + while (i < obj.length) { + iterator.call(context, obj[i], i, obj); + i++; + } + } else { + for (i in obj) { + obj.hasOwnProperty(i) && iterator.call(context, obj[i], i, obj); + } + } +} +/** + * @private + * let a boolean value also be a function that must return a boolean + * this first item in args will be used as the context + * @param {Boolean|Function} val + * @param {Array} [args] + * @returns {Boolean} + */ + + +function boolOrFn(val, args) { + if (typeof val === TYPE_FUNCTION) { + return val.apply(args ? args[0] || undefined : undefined, args); + } + + return val; +} +/** + * @private + * small indexOf wrapper + * @param {String} str + * @param {String} find + * @returns {Boolean} found + */ + + +function inStr(str, find) { + return str.indexOf(find) > -1; +} +/** + * @private + * when the touchActions are collected they are not a valid value, so we need to clean things up. * + * @param {String} actions + * @returns {*} + */ + + +function cleanTouchActions(actions) { + // none + if (inStr(actions, TOUCH_ACTION_NONE)) { + return TOUCH_ACTION_NONE; + } + + var hasPanX = inStr(actions, TOUCH_ACTION_PAN_X); + var hasPanY = inStr(actions, TOUCH_ACTION_PAN_Y); // if both pan-x and pan-y are set (different recognizers + // for different directions, e.g. horizontal pan but vertical swipe?) + // we need none (as otherwise with pan-x pan-y combined none of these + // recognizers will work, since the browser would handle all panning + + if (hasPanX && hasPanY) { + return TOUCH_ACTION_NONE; + } // pan-x OR pan-y + + + if (hasPanX || hasPanY) { + return hasPanX ? TOUCH_ACTION_PAN_X : TOUCH_ACTION_PAN_Y; + } // manipulation + + + if (inStr(actions, TOUCH_ACTION_MANIPULATION)) { + return TOUCH_ACTION_MANIPULATION; + } + + return TOUCH_ACTION_AUTO; +} +/** + * @private + * Touch Action + * sets the touchAction property or uses the js alternative + * @param {Manager} manager + * @param {String} value + * @constructor + */ + + +var TouchAction = +/*#__PURE__*/ +function () { + function TouchAction(manager, value) { + this.manager = manager; + this.set(value); + } + /** + * @private + * set the touchAction value on the element or enable the polyfill + * @param {String} value + */ + + + var _proto = TouchAction.prototype; + + _proto.set = function set(value) { + // find out the touch-action by the event handlers + if (value === TOUCH_ACTION_COMPUTE) { + value = this.compute(); + } + + if (NATIVE_TOUCH_ACTION && this.manager.element.style && TOUCH_ACTION_MAP[value]) { + this.manager.element.style[PREFIXED_TOUCH_ACTION] = value; + } + + this.actions = value.toLowerCase().trim(); + }; + /** + * @private + * just re-set the touchAction value + */ + + + _proto.update = function update() { + this.set(this.manager.options.touchAction); + }; + /** + * @private + * compute the value for the touchAction property based on the recognizer's settings + * @returns {String} value + */ + + + _proto.compute = function compute() { + var actions = []; + each(this.manager.recognizers, function (recognizer) { + if (boolOrFn(recognizer.options.enable, [recognizer])) { + actions = actions.concat(recognizer.getTouchAction()); + } + }); + return cleanTouchActions(actions.join(' ')); + }; + /** + * @private + * this method is called on each input cycle and provides the preventing of the browser behavior + * @param {Object} input + */ + + + _proto.preventDefaults = function preventDefaults(input) { + var srcEvent = input.srcEvent; + var direction = input.offsetDirection; // if the touch action did prevented once this session + + if (this.manager.session.prevented) { + srcEvent.preventDefault(); + return; + } + + var actions = this.actions; + var hasNone = inStr(actions, TOUCH_ACTION_NONE) && !TOUCH_ACTION_MAP[TOUCH_ACTION_NONE]; + var hasPanY = inStr(actions, TOUCH_ACTION_PAN_Y) && !TOUCH_ACTION_MAP[TOUCH_ACTION_PAN_Y]; + var hasPanX = inStr(actions, TOUCH_ACTION_PAN_X) && !TOUCH_ACTION_MAP[TOUCH_ACTION_PAN_X]; + + if (hasNone) { + // do not prevent defaults if this is a tap gesture + var isTapPointer = input.pointers.length === 1; + var isTapMovement = input.distance < 2; + var isTapTouchTime = input.deltaTime < 250; + + if (isTapPointer && isTapMovement && isTapTouchTime) { + return; + } + } + + if (hasPanX && hasPanY) { + // `pan-x pan-y` means browser handles all scrolling/panning, do not prevent + return; + } + + if (hasNone || hasPanY && direction & DIRECTION_HORIZONTAL || hasPanX && direction & DIRECTION_VERTICAL) { + return this.preventSrc(srcEvent); + } + }; + /** + * @private + * call preventDefault to prevent the browser's default behavior (scrolling in most cases) + * @param {Object} srcEvent + */ + + + _proto.preventSrc = function preventSrc(srcEvent) { + this.manager.session.prevented = true; + srcEvent.preventDefault(); + }; + + return TouchAction; +}(); +/** + * @private + * find if a node is in the given parent + * @method hasParent + * @param {HTMLElement} node + * @param {HTMLElement} parent + * @return {Boolean} found + */ + + +function hasParent$1(node, parent) { + while (node) { + if (node === parent) { + return true; + } + + node = node.parentNode; + } + + return false; +} +/** + * @private + * get the center of all the pointers + * @param {Array} pointers + * @return {Object} center contains `x` and `y` properties + */ + + +function getCenter(pointers) { + var pointersLength = pointers.length; // no need to loop when only one touch + + if (pointersLength === 1) { + return { + x: round(pointers[0].clientX), + y: round(pointers[0].clientY) + }; + } + + var x = 0; + var y = 0; + var i = 0; + + while (i < pointersLength) { + x += pointers[i].clientX; + y += pointers[i].clientY; + i++; + } + + return { + x: round(x / pointersLength), + y: round(y / pointersLength) + }; +} +/** + * @private + * create a simple clone from the input used for storage of firstInput and firstMultiple + * @param {Object} input + * @returns {Object} clonedInputData + */ + + +function simpleCloneInputData(input) { + // make a simple copy of the pointers because we will get a reference if we don't + // we only need clientXY for the calculations + var pointers = []; + var i = 0; + + while (i < input.pointers.length) { + pointers[i] = { + clientX: round(input.pointers[i].clientX), + clientY: round(input.pointers[i].clientY) + }; + i++; + } + + return { + timeStamp: now(), + pointers: pointers, + center: getCenter(pointers), + deltaX: input.deltaX, + deltaY: input.deltaY + }; +} +/** + * @private + * calculate the absolute distance between two points + * @param {Object} p1 {x, y} + * @param {Object} p2 {x, y} + * @param {Array} [props] containing x and y keys + * @return {Number} distance + */ + + +function getDistance(p1, p2, props) { + if (!props) { + props = PROPS_XY; + } + + var x = p2[props[0]] - p1[props[0]]; + var y = p2[props[1]] - p1[props[1]]; + return Math.sqrt(x * x + y * y); +} +/** + * @private + * calculate the angle between two coordinates + * @param {Object} p1 + * @param {Object} p2 + * @param {Array} [props] containing x and y keys + * @return {Number} angle + */ + + +function getAngle(p1, p2, props) { + if (!props) { + props = PROPS_XY; + } + + var x = p2[props[0]] - p1[props[0]]; + var y = p2[props[1]] - p1[props[1]]; + return Math.atan2(y, x) * 180 / Math.PI; +} +/** + * @private + * get the direction between two points + * @param {Number} x + * @param {Number} y + * @return {Number} direction + */ + + +function getDirection(x, y) { + if (x === y) { + return DIRECTION_NONE; + } + + if (abs(x) >= abs(y)) { + return x < 0 ? DIRECTION_LEFT : DIRECTION_RIGHT; + } + + return y < 0 ? DIRECTION_UP : DIRECTION_DOWN; +} + +function computeDeltaXY(session, input) { + var center = input.center; // let { offsetDelta:offset = {}, prevDelta = {}, prevInput = {} } = session; + // jscs throwing error on defalut destructured values and without defaults tests fail + + var offset = session.offsetDelta || {}; + var prevDelta = session.prevDelta || {}; + var prevInput = session.prevInput || {}; + + if (input.eventType === INPUT_START || prevInput.eventType === INPUT_END) { + prevDelta = session.prevDelta = { + x: prevInput.deltaX || 0, + y: prevInput.deltaY || 0 + }; + offset = session.offsetDelta = { + x: center.x, + y: center.y + }; + } + + input.deltaX = prevDelta.x + (center.x - offset.x); + input.deltaY = prevDelta.y + (center.y - offset.y); +} +/** + * @private + * calculate the velocity between two points. unit is in px per ms. + * @param {Number} deltaTime + * @param {Number} x + * @param {Number} y + * @return {Object} velocity `x` and `y` + */ + + +function getVelocity(deltaTime, x, y) { + return { + x: x / deltaTime || 0, + y: y / deltaTime || 0 + }; +} +/** + * @private + * calculate the scale factor between two pointersets + * no scale is 1, and goes down to 0 when pinched together, and bigger when pinched out + * @param {Array} start array of pointers + * @param {Array} end array of pointers + * @return {Number} scale + */ + + +function getScale(start, end) { + return getDistance(end[0], end[1], PROPS_CLIENT_XY) / getDistance(start[0], start[1], PROPS_CLIENT_XY); +} +/** + * @private + * calculate the rotation degrees between two pointersets + * @param {Array} start array of pointers + * @param {Array} end array of pointers + * @return {Number} rotation + */ + + +function getRotation(start, end) { + return getAngle(end[1], end[0], PROPS_CLIENT_XY) + getAngle(start[1], start[0], PROPS_CLIENT_XY); +} +/** + * @private + * velocity is calculated every x ms + * @param {Object} session + * @param {Object} input + */ + + +function computeIntervalInputData(session, input) { + var last = session.lastInterval || input; + var deltaTime = input.timeStamp - last.timeStamp; + var velocity; + var velocityX; + var velocityY; + var direction; + + if (input.eventType !== INPUT_CANCEL && (deltaTime > COMPUTE_INTERVAL || last.velocity === undefined)) { + var deltaX = input.deltaX - last.deltaX; + var deltaY = input.deltaY - last.deltaY; + var v = getVelocity(deltaTime, deltaX, deltaY); + velocityX = v.x; + velocityY = v.y; + velocity = abs(v.x) > abs(v.y) ? v.x : v.y; + direction = getDirection(deltaX, deltaY); + session.lastInterval = input; + } else { + // use latest velocity info if it doesn't overtake a minimum period + velocity = last.velocity; + velocityX = last.velocityX; + velocityY = last.velocityY; + direction = last.direction; + } + + input.velocity = velocity; + input.velocityX = velocityX; + input.velocityY = velocityY; + input.direction = direction; +} +/** +* @private + * extend the data with some usable properties like scale, rotate, velocity etc + * @param {Object} manager + * @param {Object} input + */ + + +function computeInputData(manager, input) { + var session = manager.session; + var pointers = input.pointers; + var pointersLength = pointers.length; // store the first input to calculate the distance and direction + + if (!session.firstInput) { + session.firstInput = simpleCloneInputData(input); + } // to compute scale and rotation we need to store the multiple touches + + + if (pointersLength > 1 && !session.firstMultiple) { + session.firstMultiple = simpleCloneInputData(input); + } else if (pointersLength === 1) { + session.firstMultiple = false; + } + + var firstInput = session.firstInput, + firstMultiple = session.firstMultiple; + var offsetCenter = firstMultiple ? firstMultiple.center : firstInput.center; + var center = input.center = getCenter(pointers); + input.timeStamp = now(); + input.deltaTime = input.timeStamp - firstInput.timeStamp; + input.angle = getAngle(offsetCenter, center); + input.distance = getDistance(offsetCenter, center); + computeDeltaXY(session, input); + input.offsetDirection = getDirection(input.deltaX, input.deltaY); + var overallVelocity = getVelocity(input.deltaTime, input.deltaX, input.deltaY); + input.overallVelocityX = overallVelocity.x; + input.overallVelocityY = overallVelocity.y; + input.overallVelocity = abs(overallVelocity.x) > abs(overallVelocity.y) ? overallVelocity.x : overallVelocity.y; + input.scale = firstMultiple ? getScale(firstMultiple.pointers, pointers) : 1; + input.rotation = firstMultiple ? getRotation(firstMultiple.pointers, pointers) : 0; + input.maxPointers = !session.prevInput ? input.pointers.length : input.pointers.length > session.prevInput.maxPointers ? input.pointers.length : session.prevInput.maxPointers; + computeIntervalInputData(session, input); // find the correct target + + var target = manager.element; + + if (hasParent$1(input.srcEvent.target, target)) { + target = input.srcEvent.target; + } + + input.target = target; +} +/** + * @private + * handle input events + * @param {Manager} manager + * @param {String} eventType + * @param {Object} input + */ + + +function inputHandler(manager, eventType, input) { + var pointersLen = input.pointers.length; + var changedPointersLen = input.changedPointers.length; + var isFirst = eventType & INPUT_START && pointersLen - changedPointersLen === 0; + var isFinal = eventType & (INPUT_END | INPUT_CANCEL) && pointersLen - changedPointersLen === 0; + input.isFirst = !!isFirst; + input.isFinal = !!isFinal; + + if (isFirst) { + manager.session = {}; + } // source event is the normalized value of the domEvents + // like 'touchstart, mouseup, pointerdown' + + + input.eventType = eventType; // compute scale, rotation etc + + computeInputData(manager, input); // emit secret event + + manager.emit('hammer.input', input); + manager.recognize(input); + manager.session.prevInput = input; +} +/** + * @private + * split string on whitespace + * @param {String} str + * @returns {Array} words + */ + + +function splitStr(str) { + return str.trim().split(/\s+/g); +} +/** + * @private + * addEventListener with multiple events at once + * @param {EventTarget} target + * @param {String} types + * @param {Function} handler + */ + + +function addEventListeners(target, types, handler) { + each(splitStr(types), function (type) { + target.addEventListener(type, handler, false); + }); +} +/** + * @private + * removeEventListener with multiple events at once + * @param {EventTarget} target + * @param {String} types + * @param {Function} handler + */ + + +function removeEventListeners(target, types, handler) { + each(splitStr(types), function (type) { + target.removeEventListener(type, handler, false); + }); +} +/** + * @private + * get the window object of an element + * @param {HTMLElement} element + * @returns {DocumentView|Window} + */ + + +function getWindowForElement(element) { + var doc = element.ownerDocument || element; + return doc.defaultView || doc.parentWindow || window; +} +/** + * @private + * create new input type manager + * @param {Manager} manager + * @param {Function} callback + * @returns {Input} + * @constructor + */ + + +var Input = +/*#__PURE__*/ +function () { + function Input(manager, callback) { + var self = this; + this.manager = manager; + this.callback = callback; + this.element = manager.element; + this.target = manager.options.inputTarget; // smaller wrapper around the handler, for the scope and the enabled state of the manager, + // so when disabled the input events are completely bypassed. + + this.domHandler = function (ev) { + if (boolOrFn(manager.options.enable, [manager])) { + self.handler(ev); + } + }; + + this.init(); + } + /** + * @private + * should handle the inputEvent data and trigger the callback + * @virtual + */ + + + var _proto = Input.prototype; + + _proto.handler = function handler() {}; + /** + * @private + * bind the events + */ + + + _proto.init = function init() { + this.evEl && addEventListeners(this.element, this.evEl, this.domHandler); + this.evTarget && addEventListeners(this.target, this.evTarget, this.domHandler); + this.evWin && addEventListeners(getWindowForElement(this.element), this.evWin, this.domHandler); + }; + /** + * @private + * unbind the events + */ + + + _proto.destroy = function destroy() { + this.evEl && removeEventListeners(this.element, this.evEl, this.domHandler); + this.evTarget && removeEventListeners(this.target, this.evTarget, this.domHandler); + this.evWin && removeEventListeners(getWindowForElement(this.element), this.evWin, this.domHandler); + }; + + return Input; +}(); +/** + * @private + * find if a array contains the object using indexOf or a simple polyFill + * @param {Array} src + * @param {String} find + * @param {String} [findByKey] + * @return {Boolean|Number} false when not found, or the index + */ + + +function inArray(src, find, findByKey) { + if (src.indexOf && !findByKey) { + return src.indexOf(find); + } else { + var i = 0; + + while (i < src.length) { + if (findByKey && src[i][findByKey] == find || !findByKey && src[i] === find) { + // do not use === here, test fails + return i; + } + + i++; + } + + return -1; + } +} + +var POINTER_INPUT_MAP = { + pointerdown: INPUT_START, + pointermove: INPUT_MOVE, + pointerup: INPUT_END, + pointercancel: INPUT_CANCEL, + pointerout: INPUT_CANCEL +}; // in IE10 the pointer types is defined as an enum + +var IE10_POINTER_TYPE_ENUM = { + 2: INPUT_TYPE_TOUCH, + 3: INPUT_TYPE_PEN, + 4: INPUT_TYPE_MOUSE, + 5: INPUT_TYPE_KINECT // see https://twitter.com/jacobrossi/status/480596438489890816 + +}; +var POINTER_ELEMENT_EVENTS = 'pointerdown'; +var POINTER_WINDOW_EVENTS = 'pointermove pointerup pointercancel'; // IE10 has prefixed support, and case-sensitive + +if (win.MSPointerEvent && !win.PointerEvent) { + POINTER_ELEMENT_EVENTS = 'MSPointerDown'; + POINTER_WINDOW_EVENTS = 'MSPointerMove MSPointerUp MSPointerCancel'; +} +/** + * @private + * Pointer events input + * @constructor + * @extends Input + */ + + +var PointerEventInput = +/*#__PURE__*/ +function (_Input) { + _inheritsLoose(PointerEventInput, _Input); + + function PointerEventInput() { + var _this; + + var proto = PointerEventInput.prototype; + proto.evEl = POINTER_ELEMENT_EVENTS; + proto.evWin = POINTER_WINDOW_EVENTS; + _this = _Input.apply(this, arguments) || this; + _this.store = _this.manager.session.pointerEvents = []; + return _this; + } + /** + * @private + * handle mouse events + * @param {Object} ev + */ + + + var _proto = PointerEventInput.prototype; + + _proto.handler = function handler(ev) { + var store = this.store; + var removePointer = false; + var eventTypeNormalized = ev.type.toLowerCase().replace('ms', ''); + var eventType = POINTER_INPUT_MAP[eventTypeNormalized]; + var pointerType = IE10_POINTER_TYPE_ENUM[ev.pointerType] || ev.pointerType; + var isTouch = pointerType === INPUT_TYPE_TOUCH; // get index of the event in the store + + var storeIndex = inArray(store, ev.pointerId, 'pointerId'); // start and mouse must be down + + if (eventType & INPUT_START && (ev.button === 0 || isTouch)) { + if (storeIndex < 0) { + store.push(ev); + storeIndex = store.length - 1; + } + } else if (eventType & (INPUT_END | INPUT_CANCEL)) { + removePointer = true; + } // it not found, so the pointer hasn't been down (so it's probably a hover) + + + if (storeIndex < 0) { + return; + } // update the event in the store + + + store[storeIndex] = ev; + this.callback(this.manager, eventType, { + pointers: store, + changedPointers: [ev], + pointerType: pointerType, + srcEvent: ev + }); + + if (removePointer) { + // remove from the store + store.splice(storeIndex, 1); + } + }; + + return PointerEventInput; +}(Input); +/** + * @private + * convert array-like objects to real arrays + * @param {Object} obj + * @returns {Array} + */ + + +function toArray$1(obj) { + return Array.prototype.slice.call(obj, 0); +} +/** + * @private + * unique array with objects based on a key (like 'id') or just by the array's value + * @param {Array} src [{id:1},{id:2},{id:1}] + * @param {String} [key] + * @param {Boolean} [sort=False] + * @returns {Array} [{id:1},{id:2}] + */ + + +function uniqueArray(src, key, sort) { + var results = []; + var values = []; + var i = 0; + + while (i < src.length) { + var val = key ? src[i][key] : src[i]; + + if (inArray(values, val) < 0) { + results.push(src[i]); + } + + values[i] = val; + i++; + } + + if (sort) { + if (!key) { + results = results.sort(); + } else { + results = results.sort(function (a, b) { + return a[key] > b[key]; + }); + } + } + + return results; +} + +var TOUCH_INPUT_MAP = { + touchstart: INPUT_START, + touchmove: INPUT_MOVE, + touchend: INPUT_END, + touchcancel: INPUT_CANCEL +}; +var TOUCH_TARGET_EVENTS = 'touchstart touchmove touchend touchcancel'; +/** + * @private + * Multi-user touch events input + * @constructor + * @extends Input + */ + +var TouchInput = +/*#__PURE__*/ +function (_Input) { + _inheritsLoose(TouchInput, _Input); + + function TouchInput() { + var _this; + + TouchInput.prototype.evTarget = TOUCH_TARGET_EVENTS; + _this = _Input.apply(this, arguments) || this; + _this.targetIds = {}; // this.evTarget = TOUCH_TARGET_EVENTS; + + return _this; + } + + var _proto = TouchInput.prototype; + + _proto.handler = function handler(ev) { + var type = TOUCH_INPUT_MAP[ev.type]; + var touches = getTouches.call(this, ev, type); + + if (!touches) { + return; + } + + this.callback(this.manager, type, { + pointers: touches[0], + changedPointers: touches[1], + pointerType: INPUT_TYPE_TOUCH, + srcEvent: ev + }); + }; + + return TouchInput; +}(Input); + +function getTouches(ev, type) { + var allTouches = toArray$1(ev.touches); + var targetIds = this.targetIds; // when there is only one touch, the process can be simplified + + if (type & (INPUT_START | INPUT_MOVE) && allTouches.length === 1) { + targetIds[allTouches[0].identifier] = true; + return [allTouches, allTouches]; + } + + var i; + var targetTouches; + var changedTouches = toArray$1(ev.changedTouches); + var changedTargetTouches = []; + var target = this.target; // get target touches from touches + + targetTouches = allTouches.filter(function (touch) { + return hasParent$1(touch.target, target); + }); // collect touches + + if (type === INPUT_START) { + i = 0; + + while (i < targetTouches.length) { + targetIds[targetTouches[i].identifier] = true; + i++; + } + } // filter changed touches to only contain touches that exist in the collected target ids + + + i = 0; + + while (i < changedTouches.length) { + if (targetIds[changedTouches[i].identifier]) { + changedTargetTouches.push(changedTouches[i]); + } // cleanup removed touches + + + if (type & (INPUT_END | INPUT_CANCEL)) { + delete targetIds[changedTouches[i].identifier]; + } + + i++; + } + + if (!changedTargetTouches.length) { + return; + } + + return [// merge targetTouches with changedTargetTouches so it contains ALL touches, including 'end' and 'cancel' + uniqueArray(targetTouches.concat(changedTargetTouches), 'identifier', true), changedTargetTouches]; +} + +var MOUSE_INPUT_MAP = { + mousedown: INPUT_START, + mousemove: INPUT_MOVE, + mouseup: INPUT_END +}; +var MOUSE_ELEMENT_EVENTS = 'mousedown'; +var MOUSE_WINDOW_EVENTS = 'mousemove mouseup'; +/** + * @private + * Mouse events input + * @constructor + * @extends Input + */ + +var MouseInput = +/*#__PURE__*/ +function (_Input) { + _inheritsLoose(MouseInput, _Input); + + function MouseInput() { + var _this; + + var proto = MouseInput.prototype; + proto.evEl = MOUSE_ELEMENT_EVENTS; + proto.evWin = MOUSE_WINDOW_EVENTS; + _this = _Input.apply(this, arguments) || this; + _this.pressed = false; // mousedown state + + return _this; + } + /** + * @private + * handle mouse events + * @param {Object} ev + */ + + + var _proto = MouseInput.prototype; + + _proto.handler = function handler(ev) { + var eventType = MOUSE_INPUT_MAP[ev.type]; // on start we want to have the left mouse button down + + if (eventType & INPUT_START && ev.button === 0) { + this.pressed = true; + } + + if (eventType & INPUT_MOVE && ev.which !== 1) { + eventType = INPUT_END; + } // mouse must be down + + + if (!this.pressed) { + return; + } + + if (eventType & INPUT_END) { + this.pressed = false; + } + + this.callback(this.manager, eventType, { + pointers: [ev], + changedPointers: [ev], + pointerType: INPUT_TYPE_MOUSE, + srcEvent: ev + }); + }; + + return MouseInput; +}(Input); +/** + * @private + * Combined touch and mouse input + * + * Touch has a higher priority then mouse, and while touching no mouse events are allowed. + * This because touch devices also emit mouse events while doing a touch. + * + * @constructor + * @extends Input + */ + + +var DEDUP_TIMEOUT = 2500; +var DEDUP_DISTANCE = 25; + +function setLastTouch(eventData) { + var _eventData$changedPoi = eventData.changedPointers, + touch = _eventData$changedPoi[0]; + + if (touch.identifier === this.primaryTouch) { + var lastTouch = { + x: touch.clientX, + y: touch.clientY + }; + var lts = this.lastTouches; + this.lastTouches.push(lastTouch); + + var removeLastTouch = function removeLastTouch() { + var i = lts.indexOf(lastTouch); + + if (i > -1) { + lts.splice(i, 1); + } + }; + + setTimeout(removeLastTouch, DEDUP_TIMEOUT); + } +} + +function recordTouches(eventType, eventData) { + if (eventType & INPUT_START) { + this.primaryTouch = eventData.changedPointers[0].identifier; + setLastTouch.call(this, eventData); + } else if (eventType & (INPUT_END | INPUT_CANCEL)) { + setLastTouch.call(this, eventData); + } +} + +function isSyntheticEvent(eventData) { + var x = eventData.srcEvent.clientX; + var y = eventData.srcEvent.clientY; + + for (var i = 0; i < this.lastTouches.length; i++) { + var t = this.lastTouches[i]; + var dx = Math.abs(x - t.x); + var dy = Math.abs(y - t.y); + + if (dx <= DEDUP_DISTANCE && dy <= DEDUP_DISTANCE) { + return true; + } + } + + return false; +} + +var TouchMouseInput = +/*#__PURE__*/ +function () { + var TouchMouseInput = + /*#__PURE__*/ + function (_Input) { + _inheritsLoose(TouchMouseInput, _Input); + + function TouchMouseInput(_manager, callback) { + var _this; + + _this = _Input.call(this, _manager, callback) || this; + + _this.handler = function (manager, inputEvent, inputData) { + var isTouch = inputData.pointerType === INPUT_TYPE_TOUCH; + var isMouse = inputData.pointerType === INPUT_TYPE_MOUSE; + + if (isMouse && inputData.sourceCapabilities && inputData.sourceCapabilities.firesTouchEvents) { + return; + } // when we're in a touch event, record touches to de-dupe synthetic mouse event + + + if (isTouch) { + recordTouches.call(_assertThisInitialized$1(_assertThisInitialized$1(_this)), inputEvent, inputData); + } else if (isMouse && isSyntheticEvent.call(_assertThisInitialized$1(_assertThisInitialized$1(_this)), inputData)) { + return; + } + + _this.callback(manager, inputEvent, inputData); + }; + + _this.touch = new TouchInput(_this.manager, _this.handler); + _this.mouse = new MouseInput(_this.manager, _this.handler); + _this.primaryTouch = null; + _this.lastTouches = []; + return _this; + } + /** + * @private + * handle mouse and touch events + * @param {Hammer} manager + * @param {String} inputEvent + * @param {Object} inputData + */ + + + var _proto = TouchMouseInput.prototype; + /** + * @private + * remove the event listeners + */ + + _proto.destroy = function destroy() { + this.touch.destroy(); + this.mouse.destroy(); + }; + + return TouchMouseInput; + }(Input); + + return TouchMouseInput; +}(); +/** + * @private + * create new input type manager + * called by the Manager constructor + * @param {Hammer} manager + * @returns {Input} + */ + + +function createInputInstance(manager) { + var Type; // let inputClass = manager.options.inputClass; + + var inputClass = manager.options.inputClass; + + if (inputClass) { + Type = inputClass; + } else if (SUPPORT_POINTER_EVENTS) { + Type = PointerEventInput; + } else if (SUPPORT_ONLY_TOUCH) { + Type = TouchInput; + } else if (!SUPPORT_TOUCH) { + Type = MouseInput; + } else { + Type = TouchMouseInput; + } + + return new Type(manager, inputHandler); +} +/** + * @private + * if the argument is an array, we want to execute the fn on each entry + * if it aint an array we don't want to do a thing. + * this is used by all the methods that accept a single and array argument. + * @param {*|Array} arg + * @param {String} fn + * @param {Object} [context] + * @returns {Boolean} + */ + + +function invokeArrayArg(arg, fn, context) { + if (Array.isArray(arg)) { + each(arg, context[fn], context); + return true; + } + + return false; +} + +var STATE_POSSIBLE = 1; +var STATE_BEGAN = 2; +var STATE_CHANGED = 4; +var STATE_ENDED = 8; +var STATE_RECOGNIZED = STATE_ENDED; +var STATE_CANCELLED = 16; +var STATE_FAILED = 32; +/** + * @private + * get a unique id + * @returns {number} uniqueId + */ + +var _uniqueId = 1; + +function uniqueId() { + return _uniqueId++; +} +/** + * @private + * get a recognizer by name if it is bound to a manager + * @param {Recognizer|String} otherRecognizer + * @param {Recognizer} recognizer + * @returns {Recognizer} + */ + + +function getRecognizerByNameIfManager(otherRecognizer, recognizer) { + var manager = recognizer.manager; + + if (manager) { + return manager.get(otherRecognizer); + } + + return otherRecognizer; +} +/** + * @private + * get a usable string, used as event postfix + * @param {constant} state + * @returns {String} state + */ + + +function stateStr(state) { + if (state & STATE_CANCELLED) { + return 'cancel'; + } else if (state & STATE_ENDED) { + return 'end'; + } else if (state & STATE_CHANGED) { + return 'move'; + } else if (state & STATE_BEGAN) { + return 'start'; + } + + return ''; +} +/** + * @private + * Recognizer flow explained; * + * All recognizers have the initial state of POSSIBLE when a input session starts. + * The definition of a input session is from the first input until the last input, with all it's movement in it. * + * Example session for mouse-input: mousedown -> mousemove -> mouseup + * + * On each recognizing cycle (see Manager.recognize) the .recognize() method is executed + * which determines with state it should be. + * + * If the recognizer has the state FAILED, CANCELLED or RECOGNIZED (equals ENDED), it is reset to + * POSSIBLE to give it another change on the next cycle. + * + * Possible + * | + * +-----+---------------+ + * | | + * +-----+-----+ | + * | | | + * Failed Cancelled | + * +-------+------+ + * | | + * Recognized Began + * | + * Changed + * | + * Ended/Recognized + */ + +/** + * @private + * Recognizer + * Every recognizer needs to extend from this class. + * @constructor + * @param {Object} options + */ + + +var Recognizer = +/*#__PURE__*/ +function () { + function Recognizer(options) { + if (options === void 0) { + options = {}; + } + + this.options = _extends({ + enable: true + }, options); + this.id = uniqueId(); + this.manager = null; // default is enable true + + this.state = STATE_POSSIBLE; + this.simultaneous = {}; + this.requireFail = []; + } + /** + * @private + * set options + * @param {Object} options + * @return {Recognizer} + */ + + + var _proto = Recognizer.prototype; + + _proto.set = function set(options) { + assign$1(this.options, options); // also update the touchAction, in case something changed about the directions/enabled state + + this.manager && this.manager.touchAction.update(); + return this; + }; + /** + * @private + * recognize simultaneous with an other recognizer. + * @param {Recognizer} otherRecognizer + * @returns {Recognizer} this + */ + + + _proto.recognizeWith = function recognizeWith(otherRecognizer) { + if (invokeArrayArg(otherRecognizer, 'recognizeWith', this)) { + return this; + } + + var simultaneous = this.simultaneous; + otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this); + + if (!simultaneous[otherRecognizer.id]) { + simultaneous[otherRecognizer.id] = otherRecognizer; + otherRecognizer.recognizeWith(this); + } + + return this; + }; + /** + * @private + * drop the simultaneous link. it doesnt remove the link on the other recognizer. + * @param {Recognizer} otherRecognizer + * @returns {Recognizer} this + */ + + + _proto.dropRecognizeWith = function dropRecognizeWith(otherRecognizer) { + if (invokeArrayArg(otherRecognizer, 'dropRecognizeWith', this)) { + return this; + } + + otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this); + delete this.simultaneous[otherRecognizer.id]; + return this; + }; + /** + * @private + * recognizer can only run when an other is failing + * @param {Recognizer} otherRecognizer + * @returns {Recognizer} this + */ + + + _proto.requireFailure = function requireFailure(otherRecognizer) { + if (invokeArrayArg(otherRecognizer, 'requireFailure', this)) { + return this; + } + + var requireFail = this.requireFail; + otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this); + + if (inArray(requireFail, otherRecognizer) === -1) { + requireFail.push(otherRecognizer); + otherRecognizer.requireFailure(this); + } + + return this; + }; + /** + * @private + * drop the requireFailure link. it does not remove the link on the other recognizer. + * @param {Recognizer} otherRecognizer + * @returns {Recognizer} this + */ + + + _proto.dropRequireFailure = function dropRequireFailure(otherRecognizer) { + if (invokeArrayArg(otherRecognizer, 'dropRequireFailure', this)) { + return this; + } + + otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this); + var index = inArray(this.requireFail, otherRecognizer); + + if (index > -1) { + this.requireFail.splice(index, 1); + } + + return this; + }; + /** + * @private + * has require failures boolean + * @returns {boolean} + */ + + + _proto.hasRequireFailures = function hasRequireFailures() { + return this.requireFail.length > 0; + }; + /** + * @private + * if the recognizer can recognize simultaneous with an other recognizer + * @param {Recognizer} otherRecognizer + * @returns {Boolean} + */ + + + _proto.canRecognizeWith = function canRecognizeWith(otherRecognizer) { + return !!this.simultaneous[otherRecognizer.id]; + }; + /** + * @private + * You should use `tryEmit` instead of `emit` directly to check + * that all the needed recognizers has failed before emitting. + * @param {Object} input + */ + + + _proto.emit = function emit(input) { + var self = this; + var state = this.state; + + function emit(event) { + self.manager.emit(event, input); + } // 'panstart' and 'panmove' + + + if (state < STATE_ENDED) { + emit(self.options.event + stateStr(state)); + } + + emit(self.options.event); // simple 'eventName' events + + if (input.additionalEvent) { + // additional event(panleft, panright, pinchin, pinchout...) + emit(input.additionalEvent); + } // panend and pancancel + + + if (state >= STATE_ENDED) { + emit(self.options.event + stateStr(state)); + } + }; + /** + * @private + * Check that all the require failure recognizers has failed, + * if true, it emits a gesture event, + * otherwise, setup the state to FAILED. + * @param {Object} input + */ + + + _proto.tryEmit = function tryEmit(input) { + if (this.canEmit()) { + return this.emit(input); + } // it's failing anyway + + + this.state = STATE_FAILED; + }; + /** + * @private + * can we emit? + * @returns {boolean} + */ + + + _proto.canEmit = function canEmit() { + var i = 0; + + while (i < this.requireFail.length) { + if (!(this.requireFail[i].state & (STATE_FAILED | STATE_POSSIBLE))) { + return false; + } + + i++; + } + + return true; + }; + /** + * @private + * update the recognizer + * @param {Object} inputData + */ + + + _proto.recognize = function recognize(inputData) { + // make a new copy of the inputData + // so we can change the inputData without messing up the other recognizers + var inputDataClone = assign$1({}, inputData); // is is enabled and allow recognizing? + + if (!boolOrFn(this.options.enable, [this, inputDataClone])) { + this.reset(); + this.state = STATE_FAILED; + return; + } // reset when we've reached the end + + + if (this.state & (STATE_RECOGNIZED | STATE_CANCELLED | STATE_FAILED)) { + this.state = STATE_POSSIBLE; + } + + this.state = this.process(inputDataClone); // the recognizer has recognized a gesture + // so trigger an event + + if (this.state & (STATE_BEGAN | STATE_CHANGED | STATE_ENDED | STATE_CANCELLED)) { + this.tryEmit(inputDataClone); + } + }; + /** + * @private + * return the state of the recognizer + * the actual recognizing happens in this method + * @virtual + * @param {Object} inputData + * @returns {constant} STATE + */ + + /* jshint ignore:start */ + + + _proto.process = function process(inputData) {}; + /* jshint ignore:end */ + + /** + * @private + * return the preferred touch-action + * @virtual + * @returns {Array} + */ + + + _proto.getTouchAction = function getTouchAction() {}; + /** + * @private + * called when the gesture isn't allowed to recognize + * like when another is being recognized or it is disabled + * @virtual + */ + + + _proto.reset = function reset() {}; + + return Recognizer; +}(); + +var defaults = { + /** + * @private + * set if DOM events are being triggered. + * But this is slower and unused by simple implementations, so disabled by default. + * @type {Boolean} + * @default false + */ + domEvents: false, + + /** + * @private + * The value for the touchAction property/fallback. + * When set to `compute` it will magically set the correct value based on the added recognizers. + * @type {String} + * @default compute + */ + touchAction: TOUCH_ACTION_COMPUTE, + + /** + * @private + * @type {Boolean} + * @default true + */ + enable: true, + + /** + * @private + * EXPERIMENTAL FEATURE -- can be removed/changed + * Change the parent input target element. + * If Null, then it is being set the to main element. + * @type {Null|EventTarget} + * @default null + */ + inputTarget: null, + + /** + * @private + * force an input class + * @type {Null|Function} + * @default null + */ + inputClass: null, + + /** + * @private + * Default recognizer setup when calling `Hammer()` + * When creating a new Manager these will be skipped. + * @type {Array} + */ + preset: [], + + /** + * @private + * Some CSS properties can be used to improve the working of Hammer. + * Add them to this method and they will be set when creating a new Manager. + * @namespace + */ + cssProps: { + /** + * @private + * Disables text selection to improve the dragging gesture. Mainly for desktop browsers. + * @type {String} + * @default 'none' + */ + userSelect: "none", + + /** + * @private + * Disable the Windows Phone grippers when pressing an element. + * @type {String} + * @default 'none' + */ + touchSelect: "none", + + /** + * @private + * Disables the default callout shown when you touch and hold a touch target. + * On iOS, when you touch and hold a touch target such as a link, Safari displays + * a callout containing information about the link. This property allows you to disable that callout. + * @type {String} + * @default 'none' + */ + touchCallout: "none", + + /** + * @private + * Specifies whether zooming is enabled. Used by IE10> + * @type {String} + * @default 'none' + */ + contentZooming: "none", + + /** + * @private + * Specifies that an entire element should be draggable instead of its contents. Mainly for desktop browsers. + * @type {String} + * @default 'none' + */ + userDrag: "none", + + /** + * @private + * Overrides the highlight color shown when the user taps a link or a JavaScript + * clickable element in iOS. This property obeys the alpha value, if specified. + * @type {String} + * @default 'rgba(0,0,0,0)' + */ + tapHighlightColor: "rgba(0,0,0,0)" + } +}; +var STOP = 1; +var FORCED_STOP = 2; +/** + * @private + * add/remove the css properties as defined in manager.options.cssProps + * @param {Manager} manager + * @param {Boolean} add + */ + +function toggleCssProps(manager, add) { + var element = manager.element; + + if (!element.style) { + return; + } + + var prop; + each(manager.options.cssProps, function (value, name) { + prop = prefixed(element.style, name); + + if (add) { + manager.oldCssProps[prop] = element.style[prop]; + element.style[prop] = value; + } else { + element.style[prop] = manager.oldCssProps[prop] || ""; + } + }); + + if (!add) { + manager.oldCssProps = {}; + } +} +/** + * @private + * trigger dom event + * @param {String} event + * @param {Object} data + */ + + +function triggerDomEvent(event, data) { + var gestureEvent = document.createEvent("Event"); + gestureEvent.initEvent(event, true, true); + gestureEvent.gesture = data; + data.target.dispatchEvent(gestureEvent); +} +/** +* @private + * Manager + * @param {HTMLElement} element + * @param {Object} [options] + * @constructor + */ + + +var Manager = +/*#__PURE__*/ +function () { + function Manager(element, options) { + var _this = this; + + this.options = assign$1({}, defaults, options || {}); + this.options.inputTarget = this.options.inputTarget || element; + this.handlers = {}; + this.session = {}; + this.recognizers = []; + this.oldCssProps = {}; + this.element = element; + this.input = createInputInstance(this); + this.touchAction = new TouchAction(this, this.options.touchAction); + toggleCssProps(this, true); + each(this.options.recognizers, function (item) { + var recognizer = _this.add(new item[0](item[1])); + + item[2] && recognizer.recognizeWith(item[2]); + item[3] && recognizer.requireFailure(item[3]); + }, this); + } + /** + * @private + * set options + * @param {Object} options + * @returns {Manager} + */ + + + var _proto = Manager.prototype; + + _proto.set = function set(options) { + assign$1(this.options, options); // Options that need a little more setup + + if (options.touchAction) { + this.touchAction.update(); + } + + if (options.inputTarget) { + // Clean up existing event listeners and reinitialize + this.input.destroy(); + this.input.target = options.inputTarget; + this.input.init(); + } + + return this; + }; + /** + * @private + * stop recognizing for this session. + * This session will be discarded, when a new [input]start event is fired. + * When forced, the recognizer cycle is stopped immediately. + * @param {Boolean} [force] + */ + + + _proto.stop = function stop(force) { + this.session.stopped = force ? FORCED_STOP : STOP; + }; + /** + * @private + * run the recognizers! + * called by the inputHandler function on every movement of the pointers (touches) + * it walks through all the recognizers and tries to detect the gesture that is being made + * @param {Object} inputData + */ + + + _proto.recognize = function recognize(inputData) { + var session = this.session; + + if (session.stopped) { + return; + } // run the touch-action polyfill + + + this.touchAction.preventDefaults(inputData); + var recognizer; + var recognizers = this.recognizers; // this holds the recognizer that is being recognized. + // so the recognizer's state needs to be BEGAN, CHANGED, ENDED or RECOGNIZED + // if no recognizer is detecting a thing, it is set to `null` + + var curRecognizer = session.curRecognizer; // reset when the last recognizer is recognized + // or when we're in a new session + + if (!curRecognizer || curRecognizer && curRecognizer.state & STATE_RECOGNIZED) { + session.curRecognizer = null; + curRecognizer = null; + } + + var i = 0; + + while (i < recognizers.length) { + recognizer = recognizers[i]; // find out if we are allowed try to recognize the input for this one. + // 1. allow if the session is NOT forced stopped (see the .stop() method) + // 2. allow if we still haven't recognized a gesture in this session, or the this recognizer is the one + // that is being recognized. + // 3. allow if the recognizer is allowed to run simultaneous with the current recognized recognizer. + // this can be setup with the `recognizeWith()` method on the recognizer. + + if (session.stopped !== FORCED_STOP && ( // 1 + !curRecognizer || recognizer === curRecognizer || // 2 + recognizer.canRecognizeWith(curRecognizer))) { + // 3 + recognizer.recognize(inputData); + } else { + recognizer.reset(); + } // if the recognizer has been recognizing the input as a valid gesture, we want to store this one as the + // current active recognizer. but only if we don't already have an active recognizer + + + if (!curRecognizer && recognizer.state & (STATE_BEGAN | STATE_CHANGED | STATE_ENDED)) { + session.curRecognizer = recognizer; + curRecognizer = recognizer; + } + + i++; + } + }; + /** + * @private + * get a recognizer by its event name. + * @param {Recognizer|String} recognizer + * @returns {Recognizer|Null} + */ + + + _proto.get = function get(recognizer) { + if (recognizer instanceof Recognizer) { + return recognizer; + } + + var recognizers = this.recognizers; + + for (var i = 0; i < recognizers.length; i++) { + if (recognizers[i].options.event === recognizer) { + return recognizers[i]; + } + } + + return null; + }; + /** + * @private add a recognizer to the manager + * existing recognizers with the same event name will be removed + * @param {Recognizer} recognizer + * @returns {Recognizer|Manager} + */ + + + _proto.add = function add(recognizer) { + if (invokeArrayArg(recognizer, "add", this)) { + return this; + } // remove existing + + + var existing = this.get(recognizer.options.event); + + if (existing) { + this.remove(existing); + } + + this.recognizers.push(recognizer); + recognizer.manager = this; + this.touchAction.update(); + return recognizer; + }; + /** + * @private + * remove a recognizer by name or instance + * @param {Recognizer|String} recognizer + * @returns {Manager} + */ + + + _proto.remove = function remove(recognizer) { + if (invokeArrayArg(recognizer, "remove", this)) { + return this; + } + + var targetRecognizer = this.get(recognizer); // let's make sure this recognizer exists + + if (recognizer) { + var recognizers = this.recognizers; + var index = inArray(recognizers, targetRecognizer); + + if (index !== -1) { + recognizers.splice(index, 1); + this.touchAction.update(); + } + } + + return this; + }; + /** + * @private + * bind event + * @param {String} events + * @param {Function} handler + * @returns {EventEmitter} this + */ + + + _proto.on = function on(events, handler) { + if (events === undefined || handler === undefined) { + return this; + } + + var handlers = this.handlers; + each(splitStr(events), function (event) { + handlers[event] = handlers[event] || []; + handlers[event].push(handler); + }); + return this; + }; + /** + * @private unbind event, leave emit blank to remove all handlers + * @param {String} events + * @param {Function} [handler] + * @returns {EventEmitter} this + */ + + + _proto.off = function off(events, handler) { + if (events === undefined) { + return this; + } + + var handlers = this.handlers; + each(splitStr(events), function (event) { + if (!handler) { + delete handlers[event]; + } else { + handlers[event] && handlers[event].splice(inArray(handlers[event], handler), 1); + } + }); + return this; + }; + /** + * @private emit event to the listeners + * @param {String} event + * @param {Object} data + */ + + + _proto.emit = function emit(event, data) { + // we also want to trigger dom events + if (this.options.domEvents) { + triggerDomEvent(event, data); + } // no handlers, so skip it all + + + var handlers = this.handlers[event] && this.handlers[event].slice(); + + if (!handlers || !handlers.length) { + return; + } + + data.type = event; + + data.preventDefault = function () { + data.srcEvent.preventDefault(); + }; + + var i = 0; + + while (i < handlers.length) { + handlers[i](data); + i++; + } + }; + /** + * @private + * destroy the manager and unbinds all events + * it doesn't unbind dom events, that is the user own responsibility + */ + + + _proto.destroy = function destroy() { + this.element && toggleCssProps(this, false); + this.handlers = {}; + this.session = {}; + this.input.destroy(); + this.element = null; + }; + + return Manager; +}(); + +var SINGLE_TOUCH_INPUT_MAP = { + touchstart: INPUT_START, + touchmove: INPUT_MOVE, + touchend: INPUT_END, + touchcancel: INPUT_CANCEL +}; +var SINGLE_TOUCH_TARGET_EVENTS = 'touchstart'; +var SINGLE_TOUCH_WINDOW_EVENTS = 'touchstart touchmove touchend touchcancel'; +/** + * @private + * Touch events input + * @constructor + * @extends Input + */ + +var SingleTouchInput = +/*#__PURE__*/ +function (_Input) { + _inheritsLoose(SingleTouchInput, _Input); + + function SingleTouchInput() { + var _this; + + var proto = SingleTouchInput.prototype; + proto.evTarget = SINGLE_TOUCH_TARGET_EVENTS; + proto.evWin = SINGLE_TOUCH_WINDOW_EVENTS; + _this = _Input.apply(this, arguments) || this; + _this.started = false; + return _this; + } + + var _proto = SingleTouchInput.prototype; + + _proto.handler = function handler(ev) { + var type = SINGLE_TOUCH_INPUT_MAP[ev.type]; // should we handle the touch events? + + if (type === INPUT_START) { + this.started = true; + } + + if (!this.started) { + return; + } + + var touches = normalizeSingleTouches.call(this, ev, type); // when done, reset the started state + + if (type & (INPUT_END | INPUT_CANCEL) && touches[0].length - touches[1].length === 0) { + this.started = false; + } + + this.callback(this.manager, type, { + pointers: touches[0], + changedPointers: touches[1], + pointerType: INPUT_TYPE_TOUCH, + srcEvent: ev + }); + }; + + return SingleTouchInput; +}(Input); + +function normalizeSingleTouches(ev, type) { + var all = toArray$1(ev.touches); + var changed = toArray$1(ev.changedTouches); + + if (type & (INPUT_END | INPUT_CANCEL)) { + all = uniqueArray(all.concat(changed), 'identifier', true); + } + + return [all, changed]; +} +/** + * @private + * This recognizer is just used as a base for the simple attribute recognizers. + * @constructor + * @extends Recognizer + */ + + +var AttrRecognizer = +/*#__PURE__*/ +function (_Recognizer) { + _inheritsLoose(AttrRecognizer, _Recognizer); + + function AttrRecognizer(options) { + if (options === void 0) { + options = {}; + } + + return _Recognizer.call(this, _extends({ + pointers: 1 + }, options)) || this; + } + /** + * @private + * Used to check if it the recognizer receives valid input, like input.distance > 10. + * @memberof AttrRecognizer + * @param {Object} input + * @returns {Boolean} recognized + */ + + + var _proto = AttrRecognizer.prototype; + + _proto.attrTest = function attrTest(input) { + var optionPointers = this.options.pointers; + return optionPointers === 0 || input.pointers.length === optionPointers; + }; + /** + * @private + * Process the input and return the state for the recognizer + * @memberof AttrRecognizer + * @param {Object} input + * @returns {*} State + */ + + + _proto.process = function process(input) { + var state = this.state; + var eventType = input.eventType; + var isRecognized = state & (STATE_BEGAN | STATE_CHANGED); + var isValid = this.attrTest(input); // on cancel input and we've recognized before, return STATE_CANCELLED + + if (isRecognized && (eventType & INPUT_CANCEL || !isValid)) { + return state | STATE_CANCELLED; + } else if (isRecognized || isValid) { + if (eventType & INPUT_END) { + return state | STATE_ENDED; + } else if (!(state & STATE_BEGAN)) { + return STATE_BEGAN; + } + + return state | STATE_CHANGED; + } + + return STATE_FAILED; + }; + + return AttrRecognizer; +}(Recognizer); +/** + * @private + * A tap is recognized when the pointer is doing a small tap/click. Multiple taps are recognized if they occur + * between the given interval and position. The delay option can be used to recognize multi-taps without firing + * a single tap. + * + * The eventData from the emitted event contains the property `tapCount`, which contains the amount of + * multi-taps being recognized. + * @constructor + * @extends Recognizer + */ + + +var TapRecognizer = +/*#__PURE__*/ +function (_Recognizer) { + _inheritsLoose(TapRecognizer, _Recognizer); + + function TapRecognizer(options) { + var _this; + + if (options === void 0) { + options = {}; + } + + _this = _Recognizer.call(this, _extends({ + event: 'tap', + pointers: 1, + taps: 1, + interval: 300, + // max time between the multi-tap taps + time: 250, + // max time of the pointer to be down (like finger on the screen) + threshold: 9, + // a minimal movement is ok, but keep it low + posThreshold: 10 + }, options)) || this; // previous time and center, + // used for tap counting + + _this.pTime = false; + _this.pCenter = false; + _this._timer = null; + _this._input = null; + _this.count = 0; + return _this; + } + + var _proto = TapRecognizer.prototype; + + _proto.getTouchAction = function getTouchAction() { + return [TOUCH_ACTION_MANIPULATION]; + }; + + _proto.process = function process(input) { + var _this2 = this; + + var options = this.options; + var validPointers = input.pointers.length === options.pointers; + var validMovement = input.distance < options.threshold; + var validTouchTime = input.deltaTime < options.time; + this.reset(); + + if (input.eventType & INPUT_START && this.count === 0) { + return this.failTimeout(); + } // we only allow little movement + // and we've reached an end event, so a tap is possible + + + if (validMovement && validTouchTime && validPointers) { + if (input.eventType !== INPUT_END) { + return this.failTimeout(); + } + + var validInterval = this.pTime ? input.timeStamp - this.pTime < options.interval : true; + var validMultiTap = !this.pCenter || getDistance(this.pCenter, input.center) < options.posThreshold; + this.pTime = input.timeStamp; + this.pCenter = input.center; + + if (!validMultiTap || !validInterval) { + this.count = 1; + } else { + this.count += 1; + } + + this._input = input; // if tap count matches we have recognized it, + // else it has began recognizing... + + var tapCount = this.count % options.taps; + + if (tapCount === 0) { + // no failing requirements, immediately trigger the tap event + // or wait as long as the multitap interval to trigger + if (!this.hasRequireFailures()) { + return STATE_RECOGNIZED; + } else { + this._timer = setTimeout(function () { + _this2.state = STATE_RECOGNIZED; + + _this2.tryEmit(); + }, options.interval); + return STATE_BEGAN; + } + } + } + + return STATE_FAILED; + }; + + _proto.failTimeout = function failTimeout() { + var _this3 = this; + + this._timer = setTimeout(function () { + _this3.state = STATE_FAILED; + }, this.options.interval); + return STATE_FAILED; + }; + + _proto.reset = function reset() { + clearTimeout(this._timer); + }; + + _proto.emit = function emit() { + if (this.state === STATE_RECOGNIZED) { + this._input.tapCount = this.count; + this.manager.emit(this.options.event, this._input); + } + }; + + return TapRecognizer; +}(Recognizer); +/** + * @private + * direction cons to string + * @param {constant} direction + * @returns {String} + */ + + +function directionStr(direction) { + if (direction === DIRECTION_DOWN) { + return 'down'; + } else if (direction === DIRECTION_UP) { + return 'up'; + } else if (direction === DIRECTION_LEFT) { + return 'left'; + } else if (direction === DIRECTION_RIGHT) { + return 'right'; + } + + return ''; +} +/** + * @private + * Pan + * Recognized when the pointer is down and moved in the allowed direction. + * @constructor + * @extends AttrRecognizer + */ + + +var PanRecognizer = +/*#__PURE__*/ +function (_AttrRecognizer) { + _inheritsLoose(PanRecognizer, _AttrRecognizer); + + function PanRecognizer(options) { + var _this; + + if (options === void 0) { + options = {}; + } + + _this = _AttrRecognizer.call(this, _extends({ + event: 'pan', + threshold: 10, + pointers: 1, + direction: DIRECTION_ALL + }, options)) || this; + _this.pX = null; + _this.pY = null; + return _this; + } + + var _proto = PanRecognizer.prototype; + + _proto.getTouchAction = function getTouchAction() { + var direction = this.options.direction; + var actions = []; + + if (direction & DIRECTION_HORIZONTAL) { + actions.push(TOUCH_ACTION_PAN_Y); + } + + if (direction & DIRECTION_VERTICAL) { + actions.push(TOUCH_ACTION_PAN_X); + } + + return actions; + }; + + _proto.directionTest = function directionTest(input) { + var options = this.options; + var hasMoved = true; + var distance = input.distance; + var direction = input.direction; + var x = input.deltaX; + var y = input.deltaY; // lock to axis? + + if (!(direction & options.direction)) { + if (options.direction & DIRECTION_HORIZONTAL) { + direction = x === 0 ? DIRECTION_NONE : x < 0 ? DIRECTION_LEFT : DIRECTION_RIGHT; + hasMoved = x !== this.pX; + distance = Math.abs(input.deltaX); + } else { + direction = y === 0 ? DIRECTION_NONE : y < 0 ? DIRECTION_UP : DIRECTION_DOWN; + hasMoved = y !== this.pY; + distance = Math.abs(input.deltaY); + } + } + + input.direction = direction; + return hasMoved && distance > options.threshold && direction & options.direction; + }; + + _proto.attrTest = function attrTest(input) { + return AttrRecognizer.prototype.attrTest.call(this, input) && ( // replace with a super call + this.state & STATE_BEGAN || !(this.state & STATE_BEGAN) && this.directionTest(input)); + }; + + _proto.emit = function emit(input) { + this.pX = input.deltaX; + this.pY = input.deltaY; + var direction = directionStr(input.direction); + + if (direction) { + input.additionalEvent = this.options.event + direction; + } + + _AttrRecognizer.prototype.emit.call(this, input); + }; + + return PanRecognizer; +}(AttrRecognizer); +/** + * @private + * Swipe + * Recognized when the pointer is moving fast (velocity), with enough distance in the allowed direction. + * @constructor + * @extends AttrRecognizer + */ + + +var SwipeRecognizer = +/*#__PURE__*/ +function (_AttrRecognizer) { + _inheritsLoose(SwipeRecognizer, _AttrRecognizer); + + function SwipeRecognizer(options) { + if (options === void 0) { + options = {}; + } + + return _AttrRecognizer.call(this, _extends({ + event: 'swipe', + threshold: 10, + velocity: 0.3, + direction: DIRECTION_HORIZONTAL | DIRECTION_VERTICAL, + pointers: 1 + }, options)) || this; + } + + var _proto = SwipeRecognizer.prototype; + + _proto.getTouchAction = function getTouchAction() { + return PanRecognizer.prototype.getTouchAction.call(this); + }; + + _proto.attrTest = function attrTest(input) { + var direction = this.options.direction; + var velocity; + + if (direction & (DIRECTION_HORIZONTAL | DIRECTION_VERTICAL)) { + velocity = input.overallVelocity; + } else if (direction & DIRECTION_HORIZONTAL) { + velocity = input.overallVelocityX; + } else if (direction & DIRECTION_VERTICAL) { + velocity = input.overallVelocityY; + } + + return _AttrRecognizer.prototype.attrTest.call(this, input) && direction & input.offsetDirection && input.distance > this.options.threshold && input.maxPointers === this.options.pointers && abs(velocity) > this.options.velocity && input.eventType & INPUT_END; + }; + + _proto.emit = function emit(input) { + var direction = directionStr(input.offsetDirection); + + if (direction) { + this.manager.emit(this.options.event + direction, input); + } + + this.manager.emit(this.options.event, input); + }; + + return SwipeRecognizer; +}(AttrRecognizer); +/** + * @private + * Pinch + * Recognized when two or more pointers are moving toward (zoom-in) or away from each other (zoom-out). + * @constructor + * @extends AttrRecognizer + */ + + +var PinchRecognizer = +/*#__PURE__*/ +function (_AttrRecognizer) { + _inheritsLoose(PinchRecognizer, _AttrRecognizer); + + function PinchRecognizer(options) { + if (options === void 0) { + options = {}; + } + + return _AttrRecognizer.call(this, _extends({ + event: 'pinch', + threshold: 0, + pointers: 2 + }, options)) || this; + } + + var _proto = PinchRecognizer.prototype; + + _proto.getTouchAction = function getTouchAction() { + return [TOUCH_ACTION_NONE]; + }; + + _proto.attrTest = function attrTest(input) { + return _AttrRecognizer.prototype.attrTest.call(this, input) && (Math.abs(input.scale - 1) > this.options.threshold || this.state & STATE_BEGAN); + }; + + _proto.emit = function emit(input) { + if (input.scale !== 1) { + var inOut = input.scale < 1 ? 'in' : 'out'; + input.additionalEvent = this.options.event + inOut; + } + + _AttrRecognizer.prototype.emit.call(this, input); + }; + + return PinchRecognizer; +}(AttrRecognizer); +/** + * @private + * Rotate + * Recognized when two or more pointer are moving in a circular motion. + * @constructor + * @extends AttrRecognizer + */ + + +var RotateRecognizer = +/*#__PURE__*/ +function (_AttrRecognizer) { + _inheritsLoose(RotateRecognizer, _AttrRecognizer); + + function RotateRecognizer(options) { + if (options === void 0) { + options = {}; + } + + return _AttrRecognizer.call(this, _extends({ + event: 'rotate', + threshold: 0, + pointers: 2 + }, options)) || this; + } + + var _proto = RotateRecognizer.prototype; + + _proto.getTouchAction = function getTouchAction() { + return [TOUCH_ACTION_NONE]; + }; + + _proto.attrTest = function attrTest(input) { + return _AttrRecognizer.prototype.attrTest.call(this, input) && (Math.abs(input.rotation) > this.options.threshold || this.state & STATE_BEGAN); + }; + + return RotateRecognizer; +}(AttrRecognizer); +/** + * @private + * Press + * Recognized when the pointer is down for x ms without any movement. + * @constructor + * @extends Recognizer + */ + + +var PressRecognizer = +/*#__PURE__*/ +function (_Recognizer) { + _inheritsLoose(PressRecognizer, _Recognizer); + + function PressRecognizer(options) { + var _this; + + if (options === void 0) { + options = {}; + } + + _this = _Recognizer.call(this, _extends({ + event: 'press', + pointers: 1, + time: 251, + // minimal time of the pointer to be pressed + threshold: 9 + }, options)) || this; + _this._timer = null; + _this._input = null; + return _this; + } + + var _proto = PressRecognizer.prototype; + + _proto.getTouchAction = function getTouchAction() { + return [TOUCH_ACTION_AUTO]; + }; + + _proto.process = function process(input) { + var _this2 = this; + + var options = this.options; + var validPointers = input.pointers.length === options.pointers; + var validMovement = input.distance < options.threshold; + var validTime = input.deltaTime > options.time; + this._input = input; // we only allow little movement + // and we've reached an end event, so a tap is possible + + if (!validMovement || !validPointers || input.eventType & (INPUT_END | INPUT_CANCEL) && !validTime) { + this.reset(); + } else if (input.eventType & INPUT_START) { + this.reset(); + this._timer = setTimeout(function () { + _this2.state = STATE_RECOGNIZED; + + _this2.tryEmit(); + }, options.time); + } else if (input.eventType & INPUT_END) { + return STATE_RECOGNIZED; + } + + return STATE_FAILED; + }; + + _proto.reset = function reset() { + clearTimeout(this._timer); + }; + + _proto.emit = function emit(input) { + if (this.state !== STATE_RECOGNIZED) { + return; + } + + if (input && input.eventType & INPUT_END) { + this.manager.emit(this.options.event + "up", input); + } else { + this._input.timeStamp = now(); + this.manager.emit(this.options.event, this._input); + } + }; + + return PressRecognizer; +}(Recognizer); +/** + * @private + * wrap a method with a deprecation warning and stack trace + * @param {Function} method + * @param {String} name + * @param {String} message + * @returns {Function} A new function wrapping the supplied method. + */ + + +function deprecate(method, name, message) { + var deprecationMessage = "DEPRECATED METHOD: " + name + "\n" + message + " AT \n"; + return function () { + var e = new Error('get-stack-trace'); + var stack = e && e.stack ? e.stack.replace(/^[^\(]+?[\n$]/gm, '').replace(/^\s+at\s+/gm, '').replace(/^Object.\s*\(/gm, '{anonymous}()@') : 'Unknown Stack Trace'; + var log = window.console && (window.console.warn || window.console.log); + + if (log) { + log.call(window.console, deprecationMessage, stack); + } + + return method.apply(this, arguments); + }; +} +/** + * @private + * extend object. + * means that properties in dest will be overwritten by the ones in src. + * @param {Object} dest + * @param {Object} src + * @param {Boolean} [merge=false] + * @returns {Object} dest + */ + + +var extend$1 = deprecate(function (dest, src, merge) { + var keys = Object.keys(src); + var i = 0; + + while (i < keys.length) { + if (!merge || merge && dest[keys[i]] === undefined) { + dest[keys[i]] = src[keys[i]]; + } + + i++; + } + + return dest; +}, 'extend', 'Use `assign`.'); +/** + * @private + * merge the values from src in the dest. + * means that properties that exist in dest will not be overwritten by src + * @param {Object} dest + * @param {Object} src + * @returns {Object} dest + */ + +var merge$1 = deprecate(function (dest, src) { + return extend$1(dest, src, true); +}, 'merge', 'Use `assign`.'); +/** + * @private + * simple class inheritance + * @param {Function} child + * @param {Function} base + * @param {Object} [properties] + */ + +function inherit(child, base, properties) { + var baseP = base.prototype; + var childP; + childP = child.prototype = Object.create(baseP); + childP.constructor = child; + childP._super = baseP; + + if (properties) { + assign$1(childP, properties); + } +} +/** + * @private + * simple function bind + * @param {Function} fn + * @param {Object} context + * @returns {Function} + */ + + +function bindFn(fn, context) { + return function boundFn() { + return fn.apply(context, arguments); + }; +} +/** + * @private + * Simple way to create a manager with a default set of recognizers. + * @param {HTMLElement} element + * @param {Object} [options] + * @constructor + */ + + +var Hammer = +/*#__PURE__*/ +function () { + var Hammer = + /** + * @private + * @const {string} + */ + function Hammer(element, options) { + if (options === void 0) { + options = {}; + } + + return new Manager(element, _extends({ + recognizers: [// RecognizerClass, options, [recognizeWith, ...], [requireFailure, ...] + [RotateRecognizer, { + enable: false + }], [PinchRecognizer, { + enable: false + }, ['rotate']], [SwipeRecognizer, { + direction: DIRECTION_HORIZONTAL + }], [PanRecognizer, { + direction: DIRECTION_HORIZONTAL + }, ['swipe']], [TapRecognizer], [TapRecognizer, { + event: 'doubletap', + taps: 2 + }, ['tap']], [PressRecognizer]] + }, options)); + }; + + Hammer.VERSION = "2.0.15"; + Hammer.DIRECTION_ALL = DIRECTION_ALL; + Hammer.DIRECTION_DOWN = DIRECTION_DOWN; + Hammer.DIRECTION_LEFT = DIRECTION_LEFT; + Hammer.DIRECTION_RIGHT = DIRECTION_RIGHT; + Hammer.DIRECTION_UP = DIRECTION_UP; + Hammer.DIRECTION_HORIZONTAL = DIRECTION_HORIZONTAL; + Hammer.DIRECTION_VERTICAL = DIRECTION_VERTICAL; + Hammer.DIRECTION_NONE = DIRECTION_NONE; + Hammer.DIRECTION_DOWN = DIRECTION_DOWN; + Hammer.INPUT_START = INPUT_START; + Hammer.INPUT_MOVE = INPUT_MOVE; + Hammer.INPUT_END = INPUT_END; + Hammer.INPUT_CANCEL = INPUT_CANCEL; + Hammer.STATE_POSSIBLE = STATE_POSSIBLE; + Hammer.STATE_BEGAN = STATE_BEGAN; + Hammer.STATE_CHANGED = STATE_CHANGED; + Hammer.STATE_ENDED = STATE_ENDED; + Hammer.STATE_RECOGNIZED = STATE_RECOGNIZED; + Hammer.STATE_CANCELLED = STATE_CANCELLED; + Hammer.STATE_FAILED = STATE_FAILED; + Hammer.Manager = Manager; + Hammer.Input = Input; + Hammer.TouchAction = TouchAction; + Hammer.TouchInput = TouchInput; + Hammer.MouseInput = MouseInput; + Hammer.PointerEventInput = PointerEventInput; + Hammer.TouchMouseInput = TouchMouseInput; + Hammer.SingleTouchInput = SingleTouchInput; + Hammer.Recognizer = Recognizer; + Hammer.AttrRecognizer = AttrRecognizer; + Hammer.Tap = TapRecognizer; + Hammer.Pan = PanRecognizer; + Hammer.Swipe = SwipeRecognizer; + Hammer.Pinch = PinchRecognizer; + Hammer.Rotate = RotateRecognizer; + Hammer.Press = PressRecognizer; + Hammer.on = addEventListeners; + Hammer.off = removeEventListeners; + Hammer.each = each; + Hammer.merge = merge$1; + Hammer.extend = extend$1; + Hammer.bindFn = bindFn; + Hammer.assign = assign$1; + Hammer.inherit = inherit; + Hammer.bindFn = bindFn; + Hammer.prefixed = prefixed; + Hammer.toArray = toArray$1; + Hammer.inArray = inArray; + Hammer.uniqueArray = uniqueArray; + Hammer.splitStr = splitStr; + Hammer.boolOrFn = boolOrFn; + Hammer.hasParent = hasParent$1; + Hammer.addEventListeners = addEventListeners; + Hammer.removeEventListeners = removeEventListeners; + Hammer.defaults = defaults; + return Hammer; +}(); + +var hammer = createCommonjsModule$2(function (module) { + /** + * Setup a mock hammer.js object, for unit testing. + * + * Inspiration: https://github.com/uber/deck.gl/pull/658 + * + * @returns {{on: noop, off: noop, destroy: noop, emit: noop, get: get}} + */ + function hammerMock() { + var noop = function noop() {}; + + return { + on: noop, + off: noop, + destroy: noop, + emit: noop, + get: function get(m) { + //eslint-disable-line no-unused-vars + return { + set: noop + }; + } + }; + } + + if (typeof window !== 'undefined') { + var Hammer$1 = window['Hammer'] || Hammer; + module.exports = Hammer$1; + } else { + module.exports = function () { + // hammer.js is only available in a browser, not in node.js. Replacing it with a mock object. + return hammerMock(); + }; + } +}); + +var hammer$1 = /*#__PURE__*/Object.freeze({ + 'default': hammer, + __moduleExports: hammer +}); + +getCjsExportFromNamespace(Activator); + +/** + * Turn an element into an clickToUse element. + * When not active, the element has a transparent overlay. When the overlay is + * clicked, the mode is changed to active. + * When active, the element is displayed with a blue border around it, and + * the interactive contents of the element can be used. When clicked outside + * the element, the elements mode is changed to inactive. + * @param {Element} container + * @constructor Activator + */ + +function Activator$1(container) { + this.active = false; + this.dom = { + container: container + }; + this.dom.overlay = document.createElement('div'); + this.dom.overlay.className = 'vis-overlay'; + this.dom.container.appendChild(this.dom.overlay); + this.hammer = hammer(this.dom.overlay); + this.hammer.on('tap', this._onTapOverlay.bind(this)); // block all touch events (except tap) + + var me = this; + var events = ['tap', 'doubletap', 'press', 'pinch', 'pan', 'panstart', 'panmove', 'panend']; + events.forEach(function (event) { + me.hammer.on(event, function (event) { + event.stopPropagation(); + }); + }); // attach a click event to the window, in order to deactivate when clicking outside the timeline + + if (document && document.body) { + this.onClick = function (event) { + if (!_hasParent(event.target, container)) { + me.deactivate(); + } + }; + + document.body.addEventListener('click', this.onClick); + } + + if (this.keycharm !== undefined) { + this.keycharm.destroy(); + } + + this.keycharm = keycharm(); // keycharm listener only bounded when active) + + this.escListener = this.deactivate.bind(this); +} // turn into an event emitter + + +componentEmitter(Activator$1.prototype); // The currently active activator + +Activator$1.current = null; +/** + * Destroy the activator. Cleans up all created DOM and event listeners + */ + +Activator$1.prototype.destroy = function () { + this.deactivate(); // remove dom + + this.dom.overlay.parentNode.removeChild(this.dom.overlay); // remove global event listener + + if (this.onClick) { + document.body.removeEventListener('click', this.onClick); + } // remove keycharm + + + if (this.keycharm !== undefined) { + this.keycharm.destroy(); + } + + this.keycharm = null; // cleanup hammer instances + + this.hammer.destroy(); + this.hammer = null; // FIXME: cleaning up hammer instances doesn't work (Timeline not removed from memory) +}; +/** + * Activate the element + * Overlay is hidden, element is decorated with a blue shadow border + */ + + +Activator$1.prototype.activate = function () { + // we allow only one active activator at a time + if (Activator$1.current) { + Activator$1.current.deactivate(); + } + + Activator$1.current = this; + this.active = true; + this.dom.overlay.style.display = 'none'; + util.addClassName(this.dom.container, 'vis-active'); + this.emit('change'); + this.emit('activate'); // ugly hack: bind ESC after emitting the events, as the Network rebinds all + // keyboard events on a 'change' event + + this.keycharm.bind('esc', this.escListener); +}; +/** + * Deactivate the element + * Overlay is displayed on top of the element + */ + + +Activator$1.prototype.deactivate = function () { + this.active = false; + this.dom.overlay.style.display = ''; + util.removeClassName(this.dom.container, 'vis-active'); + this.keycharm.unbind('esc', this.escListener); + this.emit('change'); + this.emit('deactivate'); +}; +/** + * Handle a tap event: activate the container + * @param {Event} event The event + * @private + */ + + +Activator$1.prototype._onTapOverlay = function (event) { + // activate the container + this.activate(); + event.stopPropagation(); +}; +/** + * Test whether the element has the requested parent element somewhere in + * its chain of parent nodes. + * @param {HTMLElement} element + * @param {HTMLElement} parent + * @returns {boolean} Returns true when the parent is found somewhere in the + * chain of parent nodes. + * @private + */ + + +function _hasParent(element, parent) { + while (element) { + if (element === parent) { + return true; + } + + element = element.parentNode; + } + + return false; +} + +var Activator_1 = Activator$1; + +var locales = createCommonjsModule$2(function (module, exports) { + // English + exports['en'] = { + edit: 'Edit', + del: 'Delete selected', + back: 'Back', + addNode: 'Add Node', + addEdge: 'Add Edge', + editNode: 'Edit Node', + editEdge: 'Edit Edge', + addDescription: 'Click in an empty space to place a new node.', + edgeDescription: 'Click on a node and drag the edge to another node to connect them.', + editEdgeDescription: 'Click on the control points and drag them to a node to connect to it.', + createEdgeError: 'Cannot link edges to a cluster.', + deleteClusterError: 'Clusters cannot be deleted.', + editClusterError: 'Clusters cannot be edited.' + }; + exports['en_EN'] = exports['en']; + exports['en_US'] = exports['en']; // German + + exports['de'] = { + edit: 'Editieren', + del: "L\xF6sche Auswahl", + back: "Zur\xFCck", + addNode: "Knoten hinzuf\xFCgen", + addEdge: "Kante hinzuf\xFCgen", + editNode: 'Knoten editieren', + editEdge: 'Kante editieren', + addDescription: 'Klicke auf eine freie Stelle, um einen neuen Knoten zu plazieren.', + edgeDescription: 'Klicke auf einen Knoten und ziehe die Kante zu einem anderen Knoten, um diese zu verbinden.', + editEdgeDescription: 'Klicke auf die Verbindungspunkte und ziehe diese auf einen Knoten, um sie zu verbinden.', + createEdgeError: "Es ist nicht m\xF6glich, Kanten mit Clustern zu verbinden.", + deleteClusterError: "Cluster k\xF6nnen nicht gel\xF6scht werden.", + editClusterError: "Cluster k\xF6nnen nicht editiert werden." + }; + exports['de_DE'] = exports['de']; // Spanish + + exports['es'] = { + edit: 'Editar', + del: "Eliminar selecci\xF3n", + back: "Atr\xE1s", + addNode: "A\xF1adir nodo", + addEdge: "A\xF1adir arista", + editNode: 'Editar nodo', + editEdge: 'Editar arista', + addDescription: "Haga clic en un lugar vac\xEDo para colocar un nuevo nodo.", + edgeDescription: 'Haga clic en un nodo y arrastre la arista hacia otro nodo para conectarlos.', + editEdgeDescription: 'Haga clic en un punto de control y arrastrelo a un nodo para conectarlo.', + createEdgeError: 'No se puede conectar una arista a un grupo.', + deleteClusterError: 'No es posible eliminar grupos.', + editClusterError: 'No es posible editar grupos.' + }; + exports['es_ES'] = exports['es']; //Italiano + + exports['it'] = { + edit: 'Modifica', + del: 'Cancella la selezione', + back: 'Indietro', + addNode: 'Aggiungi un nodo', + addEdge: 'Aggiungi un vertice', + editNode: 'Modifica il nodo', + editEdge: 'Modifica il vertice', + addDescription: 'Clicca per aggiungere un nuovo nodo', + edgeDescription: 'Clicca su un nodo e trascinalo ad un altro nodo per connetterli.', + editEdgeDescription: 'Clicca sui Punti di controllo e trascinali ad un nodo per connetterli.', + createEdgeError: 'Non si possono collegare vertici ad un cluster', + deleteClusterError: 'I cluster non possono essere cancellati', + editClusterError: 'I clusters non possono essere modificati.' + }; + exports['it_IT'] = exports['it']; // Dutch + + exports['nl'] = { + edit: 'Wijzigen', + del: 'Selectie verwijderen', + back: 'Terug', + addNode: 'Node toevoegen', + addEdge: 'Link toevoegen', + editNode: 'Node wijzigen', + editEdge: 'Link wijzigen', + addDescription: 'Klik op een leeg gebied om een nieuwe node te maken.', + edgeDescription: 'Klik op een node en sleep de link naar een andere node om ze te verbinden.', + editEdgeDescription: 'Klik op de verbindingspunten en sleep ze naar een node om daarmee te verbinden.', + createEdgeError: 'Kan geen link maken naar een cluster.', + deleteClusterError: 'Clusters kunnen niet worden verwijderd.', + editClusterError: 'Clusters kunnen niet worden aangepast.' + }; + exports['nl_NL'] = exports['nl']; + exports['nl_BE'] = exports['nl']; // Portuguese Brazil + + exports['pt-br'] = { + edit: 'Editar', + del: 'Remover selecionado', + back: 'Voltar', + addNode: 'Adicionar nó', + addEdge: 'Adicionar aresta', + editNode: 'Editar nó', + editEdge: 'Editar aresta', + addDescription: 'Clique em um espaço em branco para adicionar um novo nó', + edgeDescription: 'Clique em um nó e arraste a aresta até outro nó para conectá-los', + editEdgeDescription: 'Clique nos pontos de controle e os arraste para um nó para conectá-los', + createEdgeError: 'Não foi possível linkar arestas a um cluster.', + deleteClusterError: 'Clusters não puderam ser removidos.', + editClusterError: 'Clusters não puderam ser editados.' + }; + exports['pt-BR'] = exports['pt-br']; + exports['pt_BR'] = exports['pt-br']; + exports['pt_br'] = exports['pt-br']; // Russian + + exports['ru'] = { + edit: 'Редактировать', + del: 'Удалить выбранное', + back: 'Назад', + addNode: 'Добавить узел', + addEdge: 'Добавить ребро', + editNode: 'Редактировать узел', + editEdge: 'Редактировать ребро', + addDescription: 'Кликните в свободное место, чтобы добавить новый узел.', + edgeDescription: 'Кликните на узел и протяните ребро к другому узлу, чтобы соединить их.', + editEdgeDescription: 'Кликните на контрольные точки и перетащите их в узел, чтобы подключиться к нему.', + createEdgeError: 'Невозможно соединить ребра в кластер.', + deleteClusterError: 'Кластеры не могут быть удалены', + editClusterError: 'Кластеры недоступны для редактирования.' + }; + exports['ru_RU'] = exports['ru']; // Chinese + + exports['cn'] = { + edit: '编辑', + del: '删除选定', + back: '返回', + addNode: '添加节点', + addEdge: '添加连接线', + editNode: '编辑节点', + editEdge: '编辑连接线', + addDescription: '单击空白处放置新节点。', + edgeDescription: '单击某个节点并将该连接线拖动到另一个节点以连接它们。', + editEdgeDescription: '单击控制节点并将它们拖到节点上连接。', + createEdgeError: '无法将连接线连接到群集。', + deleteClusterError: '无法删除群集。', + editClusterError: '无法编辑群集。' + }; + exports['zh_CN'] = exports['cn']; // Ukrainian + + exports['uk'] = { + edit: 'Редагувати', + del: 'Видалити обране', + back: 'Назад', + addNode: 'Додати вузол', + addEdge: 'Додати край', + editNode: 'Редагувати вузол', + editEdge: 'Редагувати край', + addDescription: 'Kлікніть на вільне місце, щоб додати новий вузол.', + edgeDescription: 'Клікніть на вузол і перетягніть край до іншого вузла, щоб їх з\'єднати.', + editEdgeDescription: 'Клікніть на контрольні точки і перетягніть їх у вузол, щоб підключитися до нього.', + createEdgeError: 'Не можливо об\'єднати краї в групу.', + deleteClusterError: 'Групи не можуть бути видалені.', + editClusterError: 'Групи недоступні для редагування.' + }; + exports['uk_UA'] = exports['uk']; // French + + exports['fr'] = { + edit: 'Editer', + del: 'Effacer la selection', + back: 'Retour', + addNode: 'Ajouter un noeud', + addEdge: 'Ajouter un lien', + editNode: 'Editer le noeud', + editEdge: 'Editer le lien', + addDescription: 'Cliquez dans un endroit vide pour placer un noeud.', + edgeDescription: 'Cliquez sur un noeud et glissez le lien vers un autre noeud pour les connecter.', + editEdgeDescription: 'Cliquez sur les points de contrôle et glissez-les pour connecter un noeud.', + createEdgeError: 'Impossible de créer un lien vers un cluster.', + deleteClusterError: 'Les clusters ne peuvent pas être éffacés.', + editClusterError: 'Les clusters ne peuvent pas être édites.' + }; + exports['fr_FR'] = exports['fr']; // Czech + + exports['cs'] = { + edit: 'Upravit', + del: 'Smazat výběr', + back: 'Zpět', + addNode: 'Přidat vrchol', + addEdge: 'Přidat hranu', + editNode: 'Upravit vrchol', + editEdge: 'Upravit hranu', + addDescription: 'Kluknutím do prázdného prostoru můžete přidat nový vrchol.', + edgeDescription: 'Přetažením z jednoho vrcholu do druhého můžete spojit tyto vrcholy novou hranou.', + editEdgeDescription: 'Přetažením kontrolního vrcholu hrany ji můžete připojit k jinému vrcholu.', + createEdgeError: 'Nelze připojit hranu ke shluku.', + deleteClusterError: 'Nelze mazat shluky.', + editClusterError: 'Nelze upravovat shluky.' + }; + exports['cs_CZ'] = exports['cs']; +}); + +function _classCallCheck$1(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } +} + +var classCallCheck$1 = _classCallCheck$1; + +function _defineProperties$1(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } +} + +function _createClass$1(Constructor, protoProps, staticProps) { + if (protoProps) _defineProperties$1(Constructor.prototype, protoProps); + if (staticProps) _defineProperties$1(Constructor, staticProps); + return Constructor; +} + +var createClass$1 = _createClass$1; + +/** + * Associates a canvas to a given image, containing a number of renderings + * of the image at various sizes. + * + * This technique is known as 'mipmapping'. + * + * NOTE: Images can also be of type 'data:svg+xml`. This code also works + * for svg, but the mipmapping may not be necessary. + * + * @param {Image} image + */ +var CachedImage = +/*#__PURE__*/ +function () { + /** + * @ignore + */ + function CachedImage() { + classCallCheck$1(this, CachedImage); + + // eslint-disable-line no-unused-vars + this.NUM_ITERATIONS = 4; // Number of items in the coordinates array + + this.image = new Image(); + this.canvas = document.createElement('canvas'); + } + /** + * Called when the image has been successfully loaded. + */ + + + createClass$1(CachedImage, [{ + key: "init", + value: function init() { + if (this.initialized()) return; + this.src = this.image.src; // For same interface with Image + + var w = this.image.width; + var h = this.image.height; // Ease external access + + this.width = w; + this.height = h; + var h2 = Math.floor(h / 2); + var h4 = Math.floor(h / 4); + var h8 = Math.floor(h / 8); + var h16 = Math.floor(h / 16); + var w2 = Math.floor(w / 2); + var w4 = Math.floor(w / 4); + var w8 = Math.floor(w / 8); + var w16 = Math.floor(w / 16); // Make canvas as small as possible + + this.canvas.width = 3 * w4; + this.canvas.height = h2; // Coordinates and sizes of images contained in the canvas + // Values per row: [top x, left y, width, height] + + this.coordinates = [[0, 0, w2, h2], [w2, 0, w4, h4], [w2, h4, w8, h8], [5 * w8, h4, w16, h16]]; + + this._fillMipMap(); + } + /** + * @return {Boolean} true if init() has been called, false otherwise. + */ + + }, { + key: "initialized", + value: function initialized() { + return this.coordinates !== undefined; + } + /** + * Redraw main image in various sizes to the context. + * + * The rationale behind this is to reduce artefacts due to interpolation + * at differing zoom levels. + * + * Source: http://stackoverflow.com/q/18761404/1223531 + * + * This methods takes the resizing out of the drawing loop, in order to + * reduce performance overhead. + * + * TODO: The code assumes that a 2D context can always be gotten. This is + * not necessarily true! OTOH, if not true then usage of this class + * is senseless. + * + * @private + */ + + }, { + key: "_fillMipMap", + value: function _fillMipMap() { + var ctx = this.canvas.getContext('2d'); // First zoom-level comes from the image + + var to = this.coordinates[0]; + ctx.drawImage(this.image, to[0], to[1], to[2], to[3]); // The rest are copy actions internal to the canvas/context + + for (var iterations = 1; iterations < this.NUM_ITERATIONS; iterations++) { + var from = this.coordinates[iterations - 1]; + var _to = this.coordinates[iterations]; + ctx.drawImage(this.canvas, from[0], from[1], from[2], from[3], _to[0], _to[1], _to[2], _to[3]); + } + } + /** + * Draw the image, using the mipmap if necessary. + * + * MipMap is only used if param factor > 2; otherwise, original bitmap + * is resized. This is also used to skip mipmap usage, e.g. by setting factor = 1 + * + * Credits to 'Alex de Mulder' for original implementation. + * + * @param {CanvasRenderingContext2D} ctx context on which to draw zoomed image + * @param {Float} factor scale factor at which to draw + * @param {number} left + * @param {number} top + * @param {number} width + * @param {number} height + */ + + }, { + key: "drawImageAtPosition", + value: function drawImageAtPosition(ctx, factor, left, top, width, height) { + if (!this.initialized()) return; //can't draw image yet not intialized + + if (factor > 2) { + // Determine which zoomed image to use + factor *= 0.5; + var iterations = 0; + + while (factor > 2 && iterations < this.NUM_ITERATIONS) { + factor *= 0.5; + iterations += 1; + } + + if (iterations >= this.NUM_ITERATIONS) { + iterations = this.NUM_ITERATIONS - 1; + } //console.log("iterations: " + iterations); + + + var from = this.coordinates[iterations]; + ctx.drawImage(this.canvas, from[0], from[1], from[2], from[3], left, top, width, height); + } else { + // Draw image directly + ctx.drawImage(this.image, left, top, width, height); + } + } + }]); + + return CachedImage; +}(); + +/** + * This callback is a callback that accepts an Image. + * @callback ImageCallback + * @param {Image} image + */ + +/** + * This class loads images and keeps them stored. + * + * @param {ImageCallback} callback + */ + +var Images = +/*#__PURE__*/ +function () { + /** + * @param {ImageCallback} callback + */ + function Images(callback) { + classCallCheck$1(this, Images); + + this.images = {}; + this.imageBroken = {}; + this.callback = callback; + } + /** + * @param {string} url The original Url that failed to load, if the broken image is successfully loaded it will be added to the cache using this Url as the key so that subsequent requests for this Url will return the broken image + * @param {string} brokenUrl Url the broken image to try and load + * @param {Image} imageToLoadBrokenUrlOn The image object + */ + + + createClass$1(Images, [{ + key: "_tryloadBrokenUrl", + value: function _tryloadBrokenUrl(url, brokenUrl, imageToLoadBrokenUrlOn) { + //If these parameters aren't specified then exit the function because nothing constructive can be done + if (url === undefined || imageToLoadBrokenUrlOn === undefined) return; + + if (brokenUrl === undefined) { + console.warn("No broken url image defined"); + return; + } //Clear the old subscription to the error event and put a new in place that only handle errors in loading the brokenImageUrl + + + imageToLoadBrokenUrlOn.image.onerror = function () { + console.error("Could not load brokenImage:", brokenUrl); // cache item will contain empty image, this should be OK for default + }; //Set the source of the image to the brokenUrl, this is actually what kicks off the loading of the broken image + + + imageToLoadBrokenUrlOn.image.src = brokenUrl; + } + /** + * + * @param {vis.Image} imageToRedrawWith + * @private + */ + + }, { + key: "_redrawWithImage", + value: function _redrawWithImage(imageToRedrawWith) { + if (this.callback) { + this.callback(imageToRedrawWith); + } + } + /** + * @param {string} url Url of the image + * @param {string} brokenUrl Url of an image to use if the url image is not found + * @return {Image} img The image object + */ + + }, { + key: "load", + value: function load(url, brokenUrl) { + var _this = this; + + //Try and get the image from the cache, if successful then return the cached image + var cachedImage = this.images[url]; + if (cachedImage) return cachedImage; //Create a new image + + var img = new CachedImage(); // Need to add to cache here, otherwise final return will spawn different copies of the same image, + // Also, there will be multiple loads of the same image. + + this.images[url] = img; //Subscribe to the event that is raised if the image loads successfully + + img.image.onload = function () { + // Properly init the cached item and then request a redraw + _this._fixImageCoordinates(img.image); + + img.init(); + + _this._redrawWithImage(img); + }; //Subscribe to the event that is raised if the image fails to load + + + img.image.onerror = function () { + console.error("Could not load image:", url); //Try and load the image specified by the brokenUrl using + + _this._tryloadBrokenUrl(url, brokenUrl, img); + }; //Set the source of the image to the url, this is what actually kicks off the loading of the image + + + img.image.src = url; //Return the new image + + return img; + } + /** + * IE11 fix -- thanks dponch! + * + * Local helper function + * @param {vis.Image} imageToCache + * @private + */ + + }, { + key: "_fixImageCoordinates", + value: function _fixImageCoordinates(imageToCache) { + if (imageToCache.width === 0) { + document.body.appendChild(imageToCache); + imageToCache.width = imageToCache.offsetWidth; + imageToCache.height = imageToCache.offsetHeight; + document.body.removeChild(imageToCache); + } + } + }]); + + return Images; +}(); + +/** + * This class can store groups and options specific for groups. + */ + +var Groups = +/*#__PURE__*/ +function () { + /** + * @ignore + */ + function Groups() { + classCallCheck$1(this, Groups); + + this.clear(); + this.defaultIndex = 0; + this.groupsArray = []; + this.groupIndex = 0; + this.defaultGroups = [{ + border: "#2B7CE9", + background: "#97C2FC", + highlight: { + border: "#2B7CE9", + background: "#D2E5FF" + }, + hover: { + border: "#2B7CE9", + background: "#D2E5FF" + } + }, // 0: blue + { + border: "#FFA500", + background: "#FFFF00", + highlight: { + border: "#FFA500", + background: "#FFFFA3" + }, + hover: { + border: "#FFA500", + background: "#FFFFA3" + } + }, // 1: yellow + { + border: "#FA0A10", + background: "#FB7E81", + highlight: { + border: "#FA0A10", + background: "#FFAFB1" + }, + hover: { + border: "#FA0A10", + background: "#FFAFB1" + } + }, // 2: red + { + border: "#41A906", + background: "#7BE141", + highlight: { + border: "#41A906", + background: "#A1EC76" + }, + hover: { + border: "#41A906", + background: "#A1EC76" + } + }, // 3: green + { + border: "#E129F0", + background: "#EB7DF4", + highlight: { + border: "#E129F0", + background: "#F0B3F5" + }, + hover: { + border: "#E129F0", + background: "#F0B3F5" + } + }, // 4: magenta + { + border: "#7C29F0", + background: "#AD85E4", + highlight: { + border: "#7C29F0", + background: "#D3BDF0" + }, + hover: { + border: "#7C29F0", + background: "#D3BDF0" + } + }, // 5: purple + { + border: "#C37F00", + background: "#FFA807", + highlight: { + border: "#C37F00", + background: "#FFCA66" + }, + hover: { + border: "#C37F00", + background: "#FFCA66" + } + }, // 6: orange + { + border: "#4220FB", + background: "#6E6EFD", + highlight: { + border: "#4220FB", + background: "#9B9BFD" + }, + hover: { + border: "#4220FB", + background: "#9B9BFD" + } + }, // 7: darkblue + { + border: "#FD5A77", + background: "#FFC0CB", + highlight: { + border: "#FD5A77", + background: "#FFD1D9" + }, + hover: { + border: "#FD5A77", + background: "#FFD1D9" + } + }, // 8: pink + { + border: "#4AD63A", + background: "#C2FABC", + highlight: { + border: "#4AD63A", + background: "#E6FFE3" + }, + hover: { + border: "#4AD63A", + background: "#E6FFE3" + } + }, // 9: mint + { + border: "#990000", + background: "#EE0000", + highlight: { + border: "#BB0000", + background: "#FF3333" + }, + hover: { + border: "#BB0000", + background: "#FF3333" + } + }, // 10:bright red + { + border: "#FF6000", + background: "#FF6000", + highlight: { + border: "#FF6000", + background: "#FF6000" + }, + hover: { + border: "#FF6000", + background: "#FF6000" + } + }, // 12: real orange + { + border: "#97C2FC", + background: "#2B7CE9", + highlight: { + border: "#D2E5FF", + background: "#2B7CE9" + }, + hover: { + border: "#D2E5FF", + background: "#2B7CE9" + } + }, // 13: blue + { + border: "#399605", + background: "#255C03", + highlight: { + border: "#399605", + background: "#255C03" + }, + hover: { + border: "#399605", + background: "#255C03" + } + }, // 14: green + { + border: "#B70054", + background: "#FF007E", + highlight: { + border: "#B70054", + background: "#FF007E" + }, + hover: { + border: "#B70054", + background: "#FF007E" + } + }, // 15: magenta + { + border: "#AD85E4", + background: "#7C29F0", + highlight: { + border: "#D3BDF0", + background: "#7C29F0" + }, + hover: { + border: "#D3BDF0", + background: "#7C29F0" + } + }, // 16: purple + { + border: "#4557FA", + background: "#000EA1", + highlight: { + border: "#6E6EFD", + background: "#000EA1" + }, + hover: { + border: "#6E6EFD", + background: "#000EA1" + } + }, // 17: darkblue + { + border: "#FFC0CB", + background: "#FD5A77", + highlight: { + border: "#FFD1D9", + background: "#FD5A77" + }, + hover: { + border: "#FFD1D9", + background: "#FD5A77" + } + }, // 18: pink + { + border: "#C2FABC", + background: "#74D66A", + highlight: { + border: "#E6FFE3", + background: "#74D66A" + }, + hover: { + border: "#E6FFE3", + background: "#74D66A" + } + }, // 19: mint + { + border: "#EE0000", + background: "#990000", + highlight: { + border: "#FF3333", + background: "#BB0000" + }, + hover: { + border: "#FF3333", + background: "#BB0000" + } // 20:bright red + + }]; + this.options = {}; + this.defaultOptions = { + useDefaultGroups: true + }; + util.extend(this.options, this.defaultOptions); + } + /** + * + * @param {Object} options + */ + + + createClass$1(Groups, [{ + key: "setOptions", + value: function setOptions(options) { + var optionFields = ['useDefaultGroups']; + + if (options !== undefined) { + for (var groupName in options) { + if (options.hasOwnProperty(groupName)) { + if (optionFields.indexOf(groupName) === -1) { + var group = options[groupName]; + this.add(groupName, group); + } + } + } + } + } + /** + * Clear all groups + */ + + }, { + key: "clear", + value: function clear() { + this.groups = {}; + this.groupsArray = []; + } + /** + * Get group options of a groupname. + * If groupname is not found, a new group may be created. + * + * @param {*} groupname Can be a number, string, Date, etc. + * @param {boolean} [shouldCreate=true] If true, create a new group + * @return {Object} The found or created group + */ + + }, { + key: "get", + value: function get(groupname) { + var shouldCreate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; + var group = this.groups[groupname]; + + if (group === undefined && shouldCreate) { + if (this.options.useDefaultGroups === false && this.groupsArray.length > 0) { + // create new group + var index = this.groupIndex % this.groupsArray.length; + this.groupIndex++; + group = {}; + group.color = this.groups[this.groupsArray[index]]; + this.groups[groupname] = group; + } else { + // create new group + var _index = this.defaultIndex % this.defaultGroups.length; + + this.defaultIndex++; + group = {}; + group.color = this.defaultGroups[_index]; + this.groups[groupname] = group; + } + } + + return group; + } + /** + * Add a custom group style + * @param {string} groupName + * @param {Object} style An object containing borderColor, + * backgroundColor, etc. + * @return {Object} group The created group object + */ + + }, { + key: "add", + value: function add(groupName, style) { + this.groups[groupName] = style; + this.groupsArray.push(groupName); + return style; + } + }]); + + return Groups; +}(); + +function _arrayWithHoles(arr) { + if (Array.isArray(arr)) return arr; +} + +var arrayWithHoles = _arrayWithHoles; + +function _iterableToArrayLimit(arr, i) { + var _arr = []; + var _n = true; + var _d = false; + var _e = undefined; + + try { + for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { + _arr.push(_s.value); + + if (i && _arr.length === i) break; + } + } catch (err) { + _d = true; + _e = err; + } finally { + try { + if (!_n && _i["return"] != null) _i["return"](); + } finally { + if (_d) throw _e; + } + } + + return _arr; +} + +var iterableToArrayLimit = _iterableToArrayLimit; + +function _nonIterableRest() { + throw new TypeError("Invalid attempt to destructure non-iterable instance"); +} + +var nonIterableRest = _nonIterableRest; + +function _slicedToArray(arr, i) { + return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || nonIterableRest(); +} + +var slicedToArray = _slicedToArray; + +var _typeof_1$1 = createCommonjsModule$2(function (module) { + function _typeof2(obj) { + if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { + _typeof2 = function _typeof2(obj) { + return typeof obj; + }; + } else { + _typeof2 = function _typeof2(obj) { + return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; + }; + } + + return _typeof2(obj); + } + + function _typeof(obj) { + if (typeof Symbol === "function" && _typeof2(Symbol.iterator) === "symbol") { + module.exports = _typeof = function _typeof(obj) { + return _typeof2(obj); + }; + } else { + module.exports = _typeof = function _typeof(obj) { + return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : _typeof2(obj); + }; + } + + return _typeof(obj); + } + + module.exports = _typeof; +}); + +/** + * Helper functions for components + * @class + */ + +var ComponentUtil = +/*#__PURE__*/ +function () { + function ComponentUtil() { + classCallCheck$1(this, ComponentUtil); + } + + createClass$1(ComponentUtil, null, [{ + key: "choosify", + + /** + * Determine values to use for (sub)options of 'chosen'. + * + * This option is either a boolean or an object whose values should be examined further. + * The relevant structures are: + * + * - chosen: + * - chosen: { subOption: } + * + * Where subOption is 'node', 'edge' or 'label'. + * + * The intention of this method appears to be to set a specific priority to the options; + * Since most properties are either bridged or merged into the local options objects, there + * is not much point in handling them separately. + * TODO: examine if 'most' in previous sentence can be replaced with 'all'. In that case, we + * should be able to get rid of this method. + * + * @param {string} subOption option within object 'chosen' to consider; either 'node', 'edge' or 'label' + * @param {Object} pile array of options objects to consider + * + * @return {boolean|function} value for passed subOption of 'chosen' to use + */ + value: function choosify(subOption, pile) { + // allowed values for subOption + var allowed = ['node', 'edge', 'label']; + var value = true; + var chosen = util.topMost(pile, 'chosen'); + + if (typeof chosen === 'boolean') { + value = chosen; + } else if (_typeof_1$1(chosen) === 'object') { + if (allowed.indexOf(subOption) === -1) { + throw new Error('choosify: subOption \'' + subOption + '\' should be one of ' + "'" + allowed.join("', '") + "'"); + } + + var chosenEdge = util.topMost(pile, ['chosen', subOption]); + + if (typeof chosenEdge === 'boolean' || typeof chosenEdge === 'function') { + value = chosenEdge; + } + } + + return value; + } + /** + * Check if the point falls within the given rectangle. + * + * @param {rect} rect + * @param {point} point + * @param {rotationPoint} [rotationPoint] if specified, the rotation that applies to the rectangle. + * @returns {boolean} true if point within rectangle, false otherwise + * @static + */ + + }, { + key: "pointInRect", + value: function pointInRect(rect, point, rotationPoint) { + if (rect.width <= 0 || rect.height <= 0) { + return false; // early out + } + + if (rotationPoint !== undefined) { + // Rotate the point the same amount as the rectangle + var tmp = { + x: point.x - rotationPoint.x, + y: point.y - rotationPoint.y + }; + + if (rotationPoint.angle !== 0) { + // In order to get the coordinates the same, you need to + // rotate in the reverse direction + var angle = -rotationPoint.angle; + var tmp2 = { + x: Math.cos(angle) * tmp.x - Math.sin(angle) * tmp.y, + y: Math.sin(angle) * tmp.x + Math.cos(angle) * tmp.y + }; + point = tmp2; + } else { + point = tmp; + } // Note that if a rotation is specified, the rectangle coordinates + // are **not* the full canvas coordinates. They are relative to the + // rotationPoint. Hence, the point coordinates need not be translated + // back in this case. + + } + + var right = rect.x + rect.width; + var bottom = rect.y + rect.width; + return rect.left < point.x && right > point.x && rect.top < point.y && bottom > point.y; + } + /** + * Check if given value is acceptable as a label text. + * + * @param {*} text value to check; can be anything at this point + * @returns {boolean} true if valid label value, false otherwise + */ + + }, { + key: "isValidLabel", + value: function isValidLabel(text) { + // Note that this is quite strict: types that *might* be converted to string are disallowed + return typeof text === 'string' && text !== ''; + } + }]); + + return ComponentUtil; +}(); + +/** + * Callback to determine text dimensions, using the parent label settings. + * @callback MeasureText + * @param {text} text + * @param {text} mod + * @return {Object} { width, values} width in pixels and font attributes + */ + +/** + * Helper class for Label which collects results of splitting labels into lines and blocks. + * + * @private + */ +var LabelAccumulator = +/*#__PURE__*/ +function () { + /** + * @param {MeasureText} measureText + */ + function LabelAccumulator(measureText) { + classCallCheck$1(this, LabelAccumulator); + + this.measureText = measureText; + this.current = 0; + this.width = 0; + this.height = 0; + this.lines = []; + } + /** + * Append given text to the given line. + * + * @param {number} l index of line to add to + * @param {string} text string to append to line + * @param {'bold'|'ital'|'boldital'|'mono'|'normal'} [mod='normal'] + * @private + */ + + + createClass$1(LabelAccumulator, [{ + key: "_add", + value: function _add(l, text) { + var mod = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'normal'; + + if (this.lines[l] === undefined) { + this.lines[l] = { + width: 0, + height: 0, + blocks: [] + }; + } // We still need to set a block for undefined and empty texts, hence return at this point + // This is necessary because we don't know at this point if we're at the + // start of an empty line or not. + // To compensate, empty blocks are removed in `finalize()`. + // + // Empty strings should still have a height + + + var tmpText = text; + if (text === undefined || text === "") tmpText = " "; // Determine width and get the font properties + + var result = this.measureText(tmpText, mod); + var block = Object.assign({}, result.values); + block.text = text; + block.width = result.width; + block.mod = mod; + + if (text === undefined || text === "") { + block.width = 0; + } + + this.lines[l].blocks.push(block); // Update the line width. We need this for determining if a string goes over max width + + this.lines[l].width += block.width; + } + /** + * Returns the width in pixels of the current line. + * + * @returns {number} + */ + + }, { + key: "curWidth", + value: function curWidth() { + var line = this.lines[this.current]; + if (line === undefined) return 0; + return line.width; + } + /** + * Add text in block to current line + * + * @param {string} text + * @param {'bold'|'ital'|'boldital'|'mono'|'normal'} [mod='normal'] + */ + + }, { + key: "append", + value: function append(text) { + var mod = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'normal'; + + this._add(this.current, text, mod); + } + /** + * Add text in block to current line and start a new line + * + * @param {string} text + * @param {'bold'|'ital'|'boldital'|'mono'|'normal'} [mod='normal'] + */ + + }, { + key: "newLine", + value: function newLine(text) { + var mod = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'normal'; + + this._add(this.current, text, mod); + + this.current++; + } + /** + * Determine and set the heights of all the lines currently contained in this instance + * + * Note that width has already been set. + * + * @private + */ + + }, { + key: "determineLineHeights", + value: function determineLineHeights() { + for (var k = 0; k < this.lines.length; k++) { + var line = this.lines[k]; // Looking for max height of blocks in line + + var height = 0; + + if (line.blocks !== undefined) { + // Can happen if text contains e.g. '\n ' + for (var l = 0; l < line.blocks.length; l++) { + var block = line.blocks[l]; + + if (height < block.height) { + height = block.height; + } + } + } + + line.height = height; + } + } + /** + * Determine the full size of the label text, as determined by current lines and blocks + * + * @private + */ + + }, { + key: "determineLabelSize", + value: function determineLabelSize() { + var width = 0; + var height = 0; + + for (var k = 0; k < this.lines.length; k++) { + var line = this.lines[k]; + + if (line.width > width) { + width = line.width; + } + + height += line.height; + } + + this.width = width; + this.height = height; + } + /** + * Remove all empty blocks and empty lines we don't need + * + * This must be done after the width/height determination, + * so that these are set properly for processing here. + * + * @returns {Array} Lines with empty blocks (and some empty lines) removed + * @private + */ + + }, { + key: "removeEmptyBlocks", + value: function removeEmptyBlocks() { + var tmpLines = []; + + for (var k = 0; k < this.lines.length; k++) { + var line = this.lines[k]; // Note: an empty line in between text has width zero but is still relevant to layout. + // So we can't use width for testing empty line here + + if (line.blocks.length === 0) continue; // Discard final empty line always + + if (k === this.lines.length - 1) { + if (line.width === 0) continue; + } + + var tmpLine = {}; + Object.assign(tmpLine, line); + tmpLine.blocks = []; + var firstEmptyBlock = void 0; + var tmpBlocks = []; + + for (var l = 0; l < line.blocks.length; l++) { + var block = line.blocks[l]; + + if (block.width !== 0) { + tmpBlocks.push(block); + } else { + if (firstEmptyBlock === undefined) { + firstEmptyBlock = block; + } + } + } // Ensure that there is *some* text present + + + if (tmpBlocks.length === 0 && firstEmptyBlock !== undefined) { + tmpBlocks.push(firstEmptyBlock); + } + + tmpLine.blocks = tmpBlocks; + tmpLines.push(tmpLine); + } + + return tmpLines; + } + /** + * Set the sizes for all lines and the whole thing. + * + * @returns {{width: (number|*), height: (number|*), lines: Array}} + */ + + }, { + key: "finalize", + value: function finalize() { + //console.log(JSON.stringify(this.lines, null, 2)); + this.determineLineHeights(); + this.determineLabelSize(); + var tmpLines = this.removeEmptyBlocks(); // Return a simple hash object for further processing. + + return { + width: this.width, + height: this.height, + lines: tmpLines + }; + } + }]); + + return LabelAccumulator; +}(); + +var tagPattern = { + // HTML + '': //, + '': //, + '': //, + '': /<\/b>/, + '': /<\/i>/, + '': /<\/code>/, + // Markdown + '*': /\*/, + // bold + '_': /\_/, + // ital + '`': /`/, + // mono + 'afterBold': /[^\*]/, + 'afterItal': /[^_]/, + 'afterMono': /[^`]/ +}; +/** + * Internal helper class for parsing the markup tags for HTML and Markdown. + * + * NOTE: Sequences of tabs and spaces are reduced to single space. + * Scan usage of `this.spacing` within method + */ + +var MarkupAccumulator = +/*#__PURE__*/ +function () { + /** + * Create an instance + * + * @param {string} text text to parse for markup + */ + function MarkupAccumulator(text) { + classCallCheck$1(this, MarkupAccumulator); + + this.text = text; + this.bold = false; + this.ital = false; + this.mono = false; + this.spacing = false; + this.position = 0; + this.buffer = ""; + this.modStack = []; + this.blocks = []; + } + /** + * Return the mod label currently on the top of the stack + * + * @returns {string} label of topmost mod + * @private + */ + + + createClass$1(MarkupAccumulator, [{ + key: "mod", + value: function mod() { + return this.modStack.length === 0 ? 'normal' : this.modStack[0]; + } + /** + * Return the mod label currently active + * + * @returns {string} label of active mod + * @private + */ + + }, { + key: "modName", + value: function modName() { + if (this.modStack.length === 0) return 'normal';else if (this.modStack[0] === 'mono') return 'mono';else { + if (this.bold && this.ital) { + return 'boldital'; + } else if (this.bold) { + return 'bold'; + } else if (this.ital) { + return 'ital'; + } + } + } + /** + * @private + */ + + }, { + key: "emitBlock", + value: function emitBlock() { + if (this.spacing) { + this.add(" "); + this.spacing = false; + } + + if (this.buffer.length > 0) { + this.blocks.push({ + text: this.buffer, + mod: this.modName() + }); + this.buffer = ""; + } + } + /** + * Output text to buffer + * + * @param {string} text text to add + * @private + */ + + }, { + key: "add", + value: function add(text) { + if (text === " ") { + this.spacing = true; + } + + if (this.spacing) { + this.buffer += " "; + this.spacing = false; + } + + if (text != " ") { + this.buffer += text; + } + } + /** + * Handle parsing of whitespace + * + * @param {string} ch the character to check + * @returns {boolean} true if the character was processed as whitespace, false otherwise + */ + + }, { + key: "parseWS", + value: function parseWS(ch) { + if (/[ \t]/.test(ch)) { + if (!this.mono) { + this.spacing = true; + } else { + this.add(ch); + } + + return true; + } + + return false; + } + /** + * @param {string} tagName label for block type to set + * @private + */ + + }, { + key: "setTag", + value: function setTag(tagName) { + this.emitBlock(); + this[tagName] = true; + this.modStack.unshift(tagName); + } + /** + * @param {string} tagName label for block type to unset + * @private + */ + + }, { + key: "unsetTag", + value: function unsetTag(tagName) { + this.emitBlock(); + this[tagName] = false; + this.modStack.shift(); + } + /** + * @param {string} tagName label for block type we are currently processing + * @param {string|RegExp} tag string to match in text + * @returns {boolean} true if the tag was processed, false otherwise + */ + + }, { + key: "parseStartTag", + value: function parseStartTag(tagName, tag) { + // Note: if 'mono' passed as tagName, there is a double check here. This is OK + if (!this.mono && !this[tagName] && this.match(tag)) { + this.setTag(tagName); + return true; + } + + return false; + } + /** + * @param {string|RegExp} tag + * @param {number} [advance=true] if set, advance current position in text + * @returns {boolean} true if match at given position, false otherwise + * @private + */ + + }, { + key: "match", + value: function match(tag) { + var advance = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; + + var _this$prepareRegExp = this.prepareRegExp(tag), + _this$prepareRegExp2 = slicedToArray(_this$prepareRegExp, 2), + regExp = _this$prepareRegExp2[0], + length = _this$prepareRegExp2[1]; + + var matched = regExp.test(this.text.substr(this.position, length)); + + if (matched && advance) { + this.position += length - 1; + } + + return matched; + } + /** + * @param {string} tagName label for block type we are currently processing + * @param {string|RegExp} tag string to match in text + * @param {RegExp} [nextTag] regular expression to match for characters *following* the current tag + * @returns {boolean} true if the tag was processed, false otherwise + */ + + }, { + key: "parseEndTag", + value: function parseEndTag(tagName, tag, nextTag) { + var checkTag = this.mod() === tagName; + + if (tagName === 'mono') { + // special handling for 'mono' + checkTag = checkTag && this.mono; + } else { + checkTag = checkTag && !this.mono; + } + + if (checkTag && this.match(tag)) { + if (nextTag !== undefined) { + // Purpose of the following match is to prevent a direct unset/set of a given tag + // E.g. '*bold **still bold*' => '*bold still bold*' + if (this.position === this.text.length - 1 || this.match(nextTag, false)) { + this.unsetTag(tagName); + } + } else { + this.unsetTag(tagName); + } + + return true; + } + + return false; + } + /** + * @param {string|RegExp} tag string to match in text + * @param {value} value string to replace tag with, if found at current position + * @returns {boolean} true if the tag was processed, false otherwise + */ + + }, { + key: "replace", + value: function replace(tag, value) { + if (this.match(tag)) { + this.add(value); + this.position += length - 1; + return true; + } + + return false; + } + /** + * Create a regular expression for the tag if it isn't already one. + * + * The return value is an array `[RegExp, number]`, with exactly two value, where: + * - RegExp is the regular expression to use + * - number is the lenth of the input string to match + * + * @param {string|RegExp} tag string to match in text + * @returns {Array} regular expression to use and length of input string to match + * @private + */ + + }, { + key: "prepareRegExp", + value: function prepareRegExp(tag) { + var length; + var regExp; + + if (tag instanceof RegExp) { + regExp = tag; + length = 1; // ASSUMPTION: regexp only tests one character + } else { + // use prepared regexp if present + var prepared = tagPattern[tag]; + + if (prepared !== undefined) { + regExp = prepared; + } else { + regExp = new RegExp(tag); + } + + length = tag.length; + } + + return [regExp, length]; + } + }]); + + return MarkupAccumulator; +}(); +/** + * Helper class for Label which explodes the label text into lines and blocks within lines + * + * @private + */ + + +var LabelSplitter = +/*#__PURE__*/ +function () { + /** + * @param {CanvasRenderingContext2D} ctx Canvas rendering context + * @param {Label} parent reference to the Label instance using current instance + * @param {boolean} selected + * @param {boolean} hover + */ + function LabelSplitter(ctx, parent, selected, hover) { + var _this = this; + + classCallCheck$1(this, LabelSplitter); + + this.ctx = ctx; + this.parent = parent; + this.selected = selected; + this.hover = hover; + /** + * Callback to determine text width; passed to LabelAccumulator instance + * + * @param {String} text string to determine width of + * @param {String} mod font type to use for this text + * @return {Object} { width, values} width in pixels and font attributes + */ + + var textWidth = function textWidth(text, mod) { + if (text === undefined) return 0; // TODO: This can be done more efficiently with caching + // This will set the ctx.font correctly, depending on selected/hover and mod - so that ctx.measureText() will be accurate. + + var values = _this.parent.getFormattingValues(ctx, selected, hover, mod); + + var width = 0; + + if (text !== '') { + var measure = _this.ctx.measureText(text); + + width = measure.width; + } + + return { + width: width, + values: values + }; + }; + + this.lines = new LabelAccumulator(textWidth); + } + /** + * Split passed text of a label into lines and blocks. + * + * # NOTE + * + * The handling of spacing is option dependent: + * + * - if `font.multi : false`, all spaces are retained + * - if `font.multi : true`, every sequence of spaces is compressed to a single space + * + * This might not be the best way to do it, but this is as it has been working till now. + * In order not to break existing functionality, for the time being this behaviour will + * be retained in any code changes. + * + * @param {string} text text to split + * @returns {Array} + */ + + + createClass$1(LabelSplitter, [{ + key: "process", + value: function process(text) { + if (!ComponentUtil.isValidLabel(text)) { + return this.lines.finalize(); + } + + var font = this.parent.fontOptions; // Normalize the end-of-line's to a single representation - order important + + text = text.replace(/\r\n/g, '\n'); // Dos EOL's + + text = text.replace(/\r/g, '\n'); // Mac EOL's + // Note that at this point, there can be no \r's in the text. + // This is used later on splitStringIntoLines() to split multifont texts. + + var nlLines = String(text).split('\n'); + var lineCount = nlLines.length; + + if (font.multi) { + // Multi-font case: styling tags active + for (var i = 0; i < lineCount; i++) { + var blocks = this.splitBlocks(nlLines[i], font.multi); // Post: Sequences of tabs and spaces are reduced to single space + + if (blocks === undefined) continue; + + if (blocks.length === 0) { + this.lines.newLine(""); + continue; + } + + if (font.maxWdt > 0) { + // widthConstraint.maximum defined + //console.log('Running widthConstraint multi, max: ' + this.fontOptions.maxWdt); + for (var j = 0; j < blocks.length; j++) { + var mod = blocks[j].mod; + var _text = blocks[j].text; + this.splitStringIntoLines(_text, mod, true); + } + } else { + // widthConstraint.maximum NOT defined + for (var _j = 0; _j < blocks.length; _j++) { + var _mod = blocks[_j].mod; + var _text2 = blocks[_j].text; + this.lines.append(_text2, _mod); + } + } + + this.lines.newLine(); + } + } else { + // Single-font case + if (font.maxWdt > 0) { + // widthConstraint.maximum defined + // console.log('Running widthConstraint normal, max: ' + this.fontOptions.maxWdt); + for (var _i = 0; _i < lineCount; _i++) { + this.splitStringIntoLines(nlLines[_i]); + } + } else { + // widthConstraint.maximum NOT defined + for (var _i2 = 0; _i2 < lineCount; _i2++) { + this.lines.newLine(nlLines[_i2]); + } + } + } + + return this.lines.finalize(); + } + /** + * normalize the markup system + * + * @param {boolean|'md'|'markdown'|'html'} markupSystem + * @returns {string} + */ + + }, { + key: "decodeMarkupSystem", + value: function decodeMarkupSystem(markupSystem) { + var system = 'none'; + + if (markupSystem === 'markdown' || markupSystem === 'md') { + system = 'markdown'; + } else if (markupSystem === true || markupSystem === 'html') { + system = 'html'; + } + + return system; + } + /** + * + * @param {string} text + * @returns {Array} + */ + + }, { + key: "splitHtmlBlocks", + value: function splitHtmlBlocks(text) { + var s = new MarkupAccumulator(text); + + var parseEntities = function parseEntities(ch) { + if (/&/.test(ch)) { + var parsed = s.replace(s.text, '<', '<') || s.replace(s.text, '&', '&'); + + if (!parsed) { + s.add("&"); + } + + return true; + } + + return false; + }; + + while (s.position < s.text.length) { + var ch = s.text.charAt(s.position); + var parsed = s.parseWS(ch) || /') || s.parseStartTag('ital', '') || s.parseStartTag('mono', '') || s.parseEndTag('bold', '') || s.parseEndTag('ital', '') || s.parseEndTag('mono', '')) || parseEntities(ch); + + if (!parsed) { + s.add(ch); + } + + s.position++; + } + + s.emitBlock(); + return s.blocks; + } + /** + * + * @param {string} text + * @returns {Array} + */ + + }, { + key: "splitMarkdownBlocks", + value: function splitMarkdownBlocks(text) { + var _this2 = this; + + var s = new MarkupAccumulator(text); + var beginable = true; + + var parseOverride = function parseOverride(ch) { + if (/\\/.test(ch)) { + if (s.position < _this2.text.length + 1) { + s.position++; + ch = _this2.text.charAt(s.position); + + if (/ \t/.test(ch)) { + s.spacing = true; + } else { + s.add(ch); + beginable = false; + } + } + + return true; + } + + return false; + }; + + while (s.position < s.text.length) { + var ch = s.text.charAt(s.position); + var parsed = s.parseWS(ch) || parseOverride(ch) || (beginable || s.spacing) && (s.parseStartTag('bold', '*') || s.parseStartTag('ital', '_') || s.parseStartTag('mono', '`')) || s.parseEndTag('bold', '*', 'afterBold') || s.parseEndTag('ital', '_', 'afterItal') || s.parseEndTag('mono', '`', 'afterMono'); + + if (!parsed) { + s.add(ch); + beginable = false; + } + + s.position++; + } + + s.emitBlock(); + return s.blocks; + } + /** + * Explodes a piece of text into single-font blocks using a given markup + * + * @param {string} text + * @param {boolean|'md'|'markdown'|'html'} markupSystem + * @returns {Array.<{text: string, mod: string}>} + * @private + */ + + }, { + key: "splitBlocks", + value: function splitBlocks(text, markupSystem) { + var system = this.decodeMarkupSystem(markupSystem); + + if (system === 'none') { + return [{ + text: text, + mod: 'normal' + }]; + } else if (system === 'markdown') { + return this.splitMarkdownBlocks(text); + } else if (system === 'html') { + return this.splitHtmlBlocks(text); + } + } + /** + * @param {string} text + * @returns {boolean} true if text length over the current max with + * @private + */ + + }, { + key: "overMaxWidth", + value: function overMaxWidth(text) { + var width = this.ctx.measureText(text).width; + return this.lines.curWidth() + width > this.parent.fontOptions.maxWdt; + } + /** + * Determine the longest part of the sentence which still fits in the + * current max width. + * + * @param {Array} words Array of strings signifying a text lines + * @return {number} index of first item in string making string go over max + * @private + */ + + }, { + key: "getLongestFit", + value: function getLongestFit(words) { + var text = ''; + var w = 0; + + while (w < words.length) { + var pre = text === '' ? '' : ' '; + var newText = text + pre + words[w]; + if (this.overMaxWidth(newText)) break; + text = newText; + w++; + } + + return w; + } + /** + * Determine the longest part of the string which still fits in the + * current max width. + * + * @param {Array} words Array of strings signifying a text lines + * @return {number} index of first item in string making string go over max + */ + + }, { + key: "getLongestFitWord", + value: function getLongestFitWord(words) { + var w = 0; + + while (w < words.length) { + if (this.overMaxWidth(words.slice(0, w))) break; + w++; + } + + return w; + } + /** + * Split the passed text into lines, according to width constraint (if any). + * + * The method assumes that the input string is a single line, i.e. without lines break. + * + * This method retains spaces, if still present (case `font.multi: false`). + * A space which falls on an internal line break, will be replaced by a newline. + * There is no special handling of tabs; these go along with the flow. + * + * @param {string} str + * @param {string} [mod='normal'] + * @param {boolean} [appendLast=false] + * @private + */ + + }, { + key: "splitStringIntoLines", + value: function splitStringIntoLines(str) { + var mod = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'normal'; + var appendLast = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; + // Set the canvas context font, based upon the current selected/hover state + // and the provided mod, so the text measurement performed by getLongestFit + // will be accurate - and not just use the font of whoever last used the canvas. + this.parent.getFormattingValues(this.ctx, this.selected, this.hover, mod); // Still-present spaces are relevant, retain them + + str = str.replace(/^( +)/g, '$1\r'); + str = str.replace(/([^\r][^ ]*)( +)/g, '$1\r$2\r'); + var words = str.split('\r'); + + while (words.length > 0) { + var w = this.getLongestFit(words); + + if (w === 0) { + // Special case: the first word is already larger than the max width. + var word = words[0]; // Break the word to the largest part that fits the line + + var x = this.getLongestFitWord(word); + this.lines.newLine(word.slice(0, x), mod); // Adjust the word, so that the rest will be done next iteration + + words[0] = word.slice(x); + } else { + // skip any space that is replaced by a newline + var newW = w; + + if (words[w - 1] === ' ') { + w--; + } else if (words[newW] === ' ') { + newW++; + } + + var text = words.slice(0, w).join(""); + + if (w == words.length && appendLast) { + this.lines.append(text, mod); + } else { + this.lines.newLine(text, mod); + } // Adjust the word, so that the rest will be done next iteration + + + words = words.slice(newW); + } + } + } + }]); + + return LabelSplitter; +}(); + +/** + * List of special styles for multi-fonts + * @private + */ + +var multiFontStyle = ['bold', 'ital', 'boldital', 'mono']; +/** + * A Label to be used for Nodes or Edges. + */ + +var Label = +/*#__PURE__*/ +function () { + /** + * @param {Object} body + * @param {Object} options + * @param {boolean} [edgelabel=false] + */ + function Label(body, options) { + var edgelabel = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; + + classCallCheck$1(this, Label); + + this.body = body; + this.pointToSelf = false; + this.baseSize = undefined; + this.fontOptions = {}; // instance variable containing the *instance-local* font options + + this.setOptions(options); + this.size = { + top: 0, + left: 0, + width: 0, + height: 0, + yLine: 0 + }; + this.isEdgeLabel = edgelabel; + } + /** + * @param {Object} options the options of the parent Node-instance + */ + + + createClass$1(Label, [{ + key: "setOptions", + value: function setOptions(options) { + this.elementOptions = options; // Reference to the options of the parent Node-instance + + this.initFontOptions(options.font); + + if (ComponentUtil.isValidLabel(options.label)) { + this.labelDirty = true; + } else { + // Bad label! Change the option value to prevent bad stuff happening + options.label = undefined; + } + + if (options.font !== undefined && options.font !== null) { + // font options can be deleted at various levels + if (typeof options.font === 'string') { + this.baseSize = this.fontOptions.size; + } else if (_typeof_1$1(options.font) === 'object') { + var size = options.font.size; + + if (size !== undefined) { + this.baseSize = size; + } + } + } + } + /** + * Init the font Options structure. + * + * Member fontOptions serves as an accumulator for the current font options. + * As such, it needs to be completely separated from the node options. + * + * @param {Object} newFontOptions the new font options to process + * @private + */ + + }, { + key: "initFontOptions", + value: function initFontOptions(newFontOptions) { + var _this = this; + + // Prepare the multi-font option objects. + // These will be filled in propagateFonts(), if required + util.forEach(multiFontStyle, function (style) { + _this.fontOptions[style] = {}; + }); // Handle shorthand option, if present + + if (Label.parseFontString(this.fontOptions, newFontOptions)) { + this.fontOptions.vadjust = 0; + return; + } // Copy over the non-multifont options, if specified + + + util.forEach(newFontOptions, function (prop, n) { + if (prop !== undefined && prop !== null && _typeof_1$1(prop) !== 'object') { + _this.fontOptions[n] = prop; + } + }); + } + /** + * If in-variable is a string, parse it as a font specifier. + * + * Note that following is not done here and have to be done after the call: + * - Not all font options are set (vadjust, mod) + * + * @param {Object} outOptions out-parameter, object in which to store the parse results (if any) + * @param {Object} inOptions font options to parse + * @return {boolean} true if font parsed as string, false otherwise + * @static + */ + + }, { + key: "constrain", + + /** + * Set the width and height constraints based on 'nearest' value + * + * @param {Array} pile array of option objects to consider + * @returns {object} the actual constraint values to use + * @private + */ + value: function constrain(pile) { + // NOTE: constrainWidth and constrainHeight never set! + // NOTE: for edge labels, only 'maxWdt' set + // Node labels can set all the fields + var fontOptions = { + constrainWidth: false, + maxWdt: -1, + minWdt: -1, + constrainHeight: false, + minHgt: -1, + valign: 'middle' + }; + var widthConstraint = util.topMost(pile, 'widthConstraint'); + + if (typeof widthConstraint === 'number') { + fontOptions.maxWdt = Number(widthConstraint); + fontOptions.minWdt = Number(widthConstraint); + } else if (_typeof_1$1(widthConstraint) === 'object') { + var widthConstraintMaximum = util.topMost(pile, ['widthConstraint', 'maximum']); + + if (typeof widthConstraintMaximum === 'number') { + fontOptions.maxWdt = Number(widthConstraintMaximum); + } + + var widthConstraintMinimum = util.topMost(pile, ['widthConstraint', 'minimum']); + + if (typeof widthConstraintMinimum === 'number') { + fontOptions.minWdt = Number(widthConstraintMinimum); + } + } + + var heightConstraint = util.topMost(pile, 'heightConstraint'); + + if (typeof heightConstraint === 'number') { + fontOptions.minHgt = Number(heightConstraint); + } else if (_typeof_1$1(heightConstraint) === 'object') { + var heightConstraintMinimum = util.topMost(pile, ['heightConstraint', 'minimum']); + + if (typeof heightConstraintMinimum === 'number') { + fontOptions.minHgt = Number(heightConstraintMinimum); + } + + var heightConstraintValign = util.topMost(pile, ['heightConstraint', 'valign']); + + if (typeof heightConstraintValign === 'string') { + if (heightConstraintValign === 'top' || heightConstraintValign === 'bottom') { + fontOptions.valign = heightConstraintValign; + } + } + } + + return fontOptions; + } + /** + * Set options and update internal state + * + * @param {Object} options options to set + * @param {Array} pile array of option objects to consider for option 'chosen' + */ + + }, { + key: "update", + value: function update(options, pile) { + this.setOptions(options, true); + this.propagateFonts(pile); + util.deepExtend(this.fontOptions, this.constrain(pile)); + this.fontOptions.chooser = ComponentUtil.choosify('label', pile); + } + /** + * When margins are set in an element, adjust sizes is called to remove them + * from the width/height constraints. This must be done prior to label sizing. + * + * @param {{top: number, right: number, bottom: number, left: number}} margins + */ + + }, { + key: "adjustSizes", + value: function adjustSizes(margins) { + var widthBias = margins ? margins.right + margins.left : 0; + + if (this.fontOptions.constrainWidth) { + this.fontOptions.maxWdt -= widthBias; + this.fontOptions.minWdt -= widthBias; + } + + var heightBias = margins ? margins.top + margins.bottom : 0; + + if (this.fontOptions.constrainHeight) { + this.fontOptions.minHgt -= heightBias; + } + } ///////////////////////////////////////////////////////// + // Methods for handling options piles + // Eventually, these will be moved to a separate class + ///////////////////////////////////////////////////////// + + /** + * Add the font members of the passed list of option objects to the pile. + * + * @param {Pile} dstPile pile of option objects add to + * @param {Pile} srcPile pile of option objects to take font options from + * @private + */ + + }, { + key: "addFontOptionsToPile", + value: function addFontOptionsToPile(dstPile, srcPile) { + for (var i = 0; i < srcPile.length; ++i) { + this.addFontToPile(dstPile, srcPile[i]); + } + } + /** + * Add given font option object to the list of objects (the 'pile') to consider for determining + * multi-font option values. + * + * @param {Pile} pile pile of option objects to use + * @param {object} options instance to add to pile + * @private + */ + + }, { + key: "addFontToPile", + value: function addFontToPile(pile, options) { + if (options === undefined) return; + if (options.font === undefined || options.font === null) return; + var item = options.font; + pile.push(item); + } + /** + * Collect all own-property values from the font pile that aren't multi-font option objectss. + * + * @param {Pile} pile pile of option objects to use + * @returns {object} object with all current own basic font properties + * @private + */ + + }, { + key: "getBasicOptions", + value: function getBasicOptions(pile) { + var ret = {}; // Scans the whole pile to get all options present + + for (var n = 0; n < pile.length; ++n) { + var fontOptions = pile[n]; // Convert shorthand if necessary + + var tmpShorthand = {}; + + if (Label.parseFontString(tmpShorthand, fontOptions)) { + fontOptions = tmpShorthand; + } + + util.forEach(fontOptions, function (opt, name) { + if (opt === undefined) return; // multi-font option need not be present + + if (ret.hasOwnProperty(name)) return; // Keep first value we encounter + + if (multiFontStyle.indexOf(name) !== -1) { + // Skip multi-font properties but we do need the structure + ret[name] = {}; + } else { + ret[name] = opt; + } + }); + } + + return ret; + } + /** + * Return the value for given option for the given multi-font. + * + * All available option objects are trawled in the set order to construct the option values. + * + * --------------------------------------------------------------------- + * ## Traversal of pile for multi-fonts + * + * The determination of multi-font option values is a special case, because any values not + * present in the multi-font options should by definition be taken from the main font options, + * i.e. from the current 'parent' object of the multi-font option. + * + * ### Search order for multi-fonts + * + * 'bold' used as example: + * + * - search in option group 'bold' in local properties + * - search in main font option group in local properties + * + * --------------------------------------------------------------------- + * + * @param {Pile} pile pile of option objects to use + * @param {MultiFontStyle} multiName sub path for the multi-font + * @param {string} option the option to search for, for the given multi-font + * @returns {string|number} the value for the given option + * @private + */ + + }, { + key: "getFontOption", + value: function getFontOption(pile, multiName, option) { + var multiFont; // Search multi font in local properties + + for (var n = 0; n < pile.length; ++n) { + var fontOptions = pile[n]; + + if (fontOptions.hasOwnProperty(multiName)) { + multiFont = fontOptions[multiName]; + if (multiFont === undefined || multiFont === null) continue; // Convert shorthand if necessary + // TODO: inefficient to do this conversion every time; find a better way. + + var tmpShorthand = {}; + + if (Label.parseFontString(tmpShorthand, multiFont)) { + multiFont = tmpShorthand; + } + + if (multiFont.hasOwnProperty(option)) { + return multiFont[option]; + } + } + } // Option is not mentioned in the multi font options; take it from the parent font options. + // These have already been converted with getBasicOptions(), so use the converted values. + + + if (this.fontOptions.hasOwnProperty(option)) { + return this.fontOptions[option]; + } // A value **must** be found; you should never get here. + + + throw new Error("Did not find value for multi-font for property: '" + option + "'"); + } + /** + * Return all options values for the given multi-font. + * + * All available option objects are trawled in the set order to construct the option values. + * + * @param {Pile} pile pile of option objects to use + * @param {MultiFontStyle} multiName sub path for the mod-font + * @returns {MultiFontOptions} + * @private + */ + + }, { + key: "getFontOptions", + value: function getFontOptions(pile, multiName) { + var result = {}; + var optionNames = ['color', 'size', 'face', 'mod', 'vadjust']; // List of allowed options per multi-font + + for (var i = 0; i < optionNames.length; ++i) { + var mod = optionNames[i]; + result[mod] = this.getFontOption(pile, multiName, mod); + } + + return result; + } ///////////////////////////////////////////////////////// + // End methods for handling options piles + ///////////////////////////////////////////////////////// + + /** + * Collapse the font options for the multi-font to single objects, from + * the chain of option objects passed (the 'pile'). + * + * @param {Pile} pile sequence of option objects to consider. + * First item in list assumed to be the newly set options. + */ + + }, { + key: "propagateFonts", + value: function propagateFonts(pile) { + var _this2 = this; + + var fontPile = []; // sequence of font objects to consider, order important + // Note that this.elementOptions is not used here. + + this.addFontOptionsToPile(fontPile, pile); + this.fontOptions = this.getBasicOptions(fontPile); // We set multifont values even if multi === false, for consistency (things break otherwise) + + var _loop = function _loop(i) { + var mod = multiFontStyle[i]; + var modOptions = _this2.fontOptions[mod]; + + var tmpMultiFontOptions = _this2.getFontOptions(fontPile, mod); // Copy over found values + + + util.forEach(tmpMultiFontOptions, function (option, n) { + modOptions[n] = option; + }); + modOptions.size = Number(modOptions.size); + modOptions.vadjust = Number(modOptions.vadjust); + }; + + for (var i = 0; i < multiFontStyle.length; ++i) { + _loop(i); + } + } + /** + * Main function. This is called from anything that wants to draw a label. + * @param {CanvasRenderingContext2D} ctx + * @param {number} x + * @param {number} y + * @param {boolean} selected + * @param {boolean} hover + * @param {string} [baseline='middle'] + */ + + }, { + key: "draw", + value: function draw(ctx, x, y, selected, hover) { + var baseline = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 'middle'; + // if no label, return + if (this.elementOptions.label === undefined) return; // check if we have to render the label + + var viewFontSize = this.fontOptions.size * this.body.view.scale; + if (this.elementOptions.label && viewFontSize < this.elementOptions.scaling.label.drawThreshold - 1) return; // This ensures that there will not be HUGE letters on screen + // by setting an upper limit on the visible text size (regardless of zoomLevel) + + if (viewFontSize >= this.elementOptions.scaling.label.maxVisible) { + viewFontSize = Number(this.elementOptions.scaling.label.maxVisible) / this.body.view.scale; + } // update the size cache if required + + + this.calculateLabelSize(ctx, selected, hover, x, y, baseline); + + this._drawBackground(ctx); + + this._drawText(ctx, x, this.size.yLine, baseline, viewFontSize); + } + /** + * Draws the label background + * @param {CanvasRenderingContext2D} ctx + * @private + */ + + }, { + key: "_drawBackground", + value: function _drawBackground(ctx) { + if (this.fontOptions.background !== undefined && this.fontOptions.background !== "none") { + ctx.fillStyle = this.fontOptions.background; + var size = this.getSize(); + ctx.fillRect(size.left, size.top, size.width, size.height); + } + } + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {number} x + * @param {number} y + * @param {string} [baseline='middle'] + * @param {number} viewFontSize + * @private + */ + + }, { + key: "_drawText", + value: function _drawText(ctx, x, y) { + var baseline = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 'middle'; + var viewFontSize = arguments.length > 4 ? arguments[4] : undefined; + + var _this$_setAlignment = this._setAlignment(ctx, x, y, baseline); + + var _this$_setAlignment2 = slicedToArray(_this$_setAlignment, 2); + + x = _this$_setAlignment2[0]; + y = _this$_setAlignment2[1]; + ctx.textAlign = 'left'; + x = x - this.size.width / 2; // Shift label 1/2-distance to the left + + if (this.fontOptions.valign && this.size.height > this.size.labelHeight) { + if (this.fontOptions.valign === 'top') { + y -= (this.size.height - this.size.labelHeight) / 2; + } + + if (this.fontOptions.valign === 'bottom') { + y += (this.size.height - this.size.labelHeight) / 2; + } + } // draw the text + + + for (var i = 0; i < this.lineCount; i++) { + var line = this.lines[i]; + + if (line && line.blocks) { + var width = 0; + + if (this.isEdgeLabel || this.fontOptions.align === 'center') { + width += (this.size.width - line.width) / 2; + } else if (this.fontOptions.align === 'right') { + width += this.size.width - line.width; + } + + for (var j = 0; j < line.blocks.length; j++) { + var block = line.blocks[j]; + ctx.font = block.font; + + var _this$_getColor = this._getColor(block.color, viewFontSize, block.strokeColor), + _this$_getColor2 = slicedToArray(_this$_getColor, 2), + fontColor = _this$_getColor2[0], + strokeColor = _this$_getColor2[1]; + + if (block.strokeWidth > 0) { + ctx.lineWidth = block.strokeWidth; + ctx.strokeStyle = strokeColor; + ctx.lineJoin = 'round'; + } + + ctx.fillStyle = fontColor; + + if (block.strokeWidth > 0) { + ctx.strokeText(block.text, x + width, y + block.vadjust); + } + + ctx.fillText(block.text, x + width, y + block.vadjust); + width += block.width; + } + + y += line.height; + } + } + } + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {number} x + * @param {number} y + * @param {string} baseline + * @returns {Array.} + * @private + */ + + }, { + key: "_setAlignment", + value: function _setAlignment(ctx, x, y, baseline) { + // check for label alignment (for edges) + // TODO: make alignment for nodes + if (this.isEdgeLabel && this.fontOptions.align !== 'horizontal' && this.pointToSelf === false) { + x = 0; + y = 0; + var lineMargin = 2; + + if (this.fontOptions.align === 'top') { + ctx.textBaseline = 'alphabetic'; + y -= 2 * lineMargin; // distance from edge, required because we use alphabetic. Alphabetic has less difference between browsers + } else if (this.fontOptions.align === 'bottom') { + ctx.textBaseline = 'hanging'; + y += 2 * lineMargin; // distance from edge, required because we use hanging. Hanging has less difference between browsers + } else { + ctx.textBaseline = 'middle'; + } + } else { + ctx.textBaseline = baseline; + } + + return [x, y]; + } + /** + * fade in when relative scale is between threshold and threshold - 1. + * If the relative scale would be smaller than threshold -1 the draw function would have returned before coming here. + * + * @param {string} color The font color to use + * @param {number} viewFontSize + * @param {string} initialStrokeColor + * @returns {Array.} An array containing the font color and stroke color + * @private + */ + + }, { + key: "_getColor", + value: function _getColor(color, viewFontSize, initialStrokeColor) { + var fontColor = color || '#000000'; + var strokeColor = initialStrokeColor || '#ffffff'; + + if (viewFontSize <= this.elementOptions.scaling.label.drawThreshold) { + var opacity = Math.max(0, Math.min(1, 1 - (this.elementOptions.scaling.label.drawThreshold - viewFontSize))); + fontColor = util.overrideOpacity(fontColor, opacity); + strokeColor = util.overrideOpacity(strokeColor, opacity); + } + + return [fontColor, strokeColor]; + } + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {boolean} selected + * @param {boolean} hover + * @returns {{width: number, height: number}} + */ + + }, { + key: "getTextSize", + value: function getTextSize(ctx) { + var selected = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; + var hover = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; + + this._processLabel(ctx, selected, hover); + + return { + width: this.size.width, + height: this.size.height, + lineCount: this.lineCount + }; + } + /** + * Get the current dimensions of the label + * + * @return {rect} + */ + + }, { + key: "getSize", + value: function getSize() { + var lineMargin = 2; + var x = this.size.left; // default values which might be overridden below + + var y = this.size.top - 0.5 * lineMargin; // idem + + if (this.isEdgeLabel) { + var x2 = -this.size.width * 0.5; + + switch (this.fontOptions.align) { + case 'middle': + x = x2; + y = -this.size.height * 0.5; + break; + + case 'top': + x = x2; + y = -(this.size.height + lineMargin); + break; + + case 'bottom': + x = x2; + y = lineMargin; + break; + } + } + + var ret = { + left: x, + top: y, + width: this.size.width, + height: this.size.height + }; + return ret; + } + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {boolean} selected + * @param {boolean} hover + * @param {number} [x=0] + * @param {number} [y=0] + * @param {'middle'|'hanging'} [baseline='middle'] + */ + + }, { + key: "calculateLabelSize", + value: function calculateLabelSize(ctx, selected, hover) { + var x = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0; + var y = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0; + var baseline = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 'middle'; + + this._processLabel(ctx, selected, hover); + + this.size.left = x - this.size.width * 0.5; + this.size.top = y - this.size.height * 0.5; + this.size.yLine = y + (1 - this.lineCount) * 0.5 * this.fontOptions.size; + + if (baseline === "hanging") { + this.size.top += 0.5 * this.fontOptions.size; + this.size.top += 4; // distance from node, required because we use hanging. Hanging has less difference between browsers + + this.size.yLine += 4; // distance from node + } + } + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {boolean} selected + * @param {boolean} hover + * @param {string} mod + * @returns {{color, size, face, mod, vadjust, strokeWidth: *, strokeColor: (*|string|allOptions.edges.font.strokeColor|{string}|allOptions.nodes.font.strokeColor|Array)}} + */ + + }, { + key: "getFormattingValues", + value: function getFormattingValues(ctx, selected, hover, mod) { + var getValue = function getValue(fontOptions, mod, option) { + if (mod === "normal") { + if (option === 'mod') return ""; + return fontOptions[option]; + } + + if (fontOptions[mod][option] !== undefined) { + // Grumbl leaving out test on undefined equals false for "" + return fontOptions[mod][option]; + } else { + // Take from parent font option + return fontOptions[option]; + } + }; + + var values = { + color: getValue(this.fontOptions, mod, 'color'), + size: getValue(this.fontOptions, mod, 'size'), + face: getValue(this.fontOptions, mod, 'face'), + mod: getValue(this.fontOptions, mod, 'mod'), + vadjust: getValue(this.fontOptions, mod, 'vadjust'), + strokeWidth: this.fontOptions.strokeWidth, + strokeColor: this.fontOptions.strokeColor + }; + + if (selected || hover) { + if (mod === "normal" && this.fontOptions.chooser === true && this.elementOptions.labelHighlightBold) { + values.mod = 'bold'; + } else { + if (typeof this.fontOptions.chooser === 'function') { + this.fontOptions.chooser(values, this.elementOptions.id, selected, hover); + } + } + } + + var fontString = ""; + + if (values.mod !== undefined && values.mod !== "") { + // safeguard for undefined - this happened + fontString += values.mod + " "; + } + + fontString += values.size + "px " + values.face; + ctx.font = fontString.replace(/"/g, ""); + values.font = ctx.font; + values.height = values.size; + return values; + } + /** + * + * @param {boolean} selected + * @param {boolean} hover + * @returns {boolean} + */ + + }, { + key: "differentState", + value: function differentState(selected, hover) { + return selected !== this.selectedState || hover !== this.hoverState; + } + /** + * This explodes the passed text into lines and determines the width, height and number of lines. + * + * @param {CanvasRenderingContext2D} ctx + * @param {boolean} selected + * @param {boolean} hover + * @param {string} inText the text to explode + * @returns {{width, height, lines}|*} + * @private + */ + + }, { + key: "_processLabelText", + value: function _processLabelText(ctx, selected, hover, inText) { + var splitter = new LabelSplitter(ctx, this, selected, hover); + return splitter.process(inText); + } + /** + * This explodes the label string into lines and sets the width, height and number of lines. + * @param {CanvasRenderingContext2D} ctx + * @param {boolean} selected + * @param {boolean} hover + * @private + */ + + }, { + key: "_processLabel", + value: function _processLabel(ctx, selected, hover) { + if (this.labelDirty === false && !this.differentState(selected, hover)) return; + + var state = this._processLabelText(ctx, selected, hover, this.elementOptions.label); + + if (this.fontOptions.minWdt > 0 && state.width < this.fontOptions.minWdt) { + state.width = this.fontOptions.minWdt; + } + + this.size.labelHeight = state.height; + + if (this.fontOptions.minHgt > 0 && state.height < this.fontOptions.minHgt) { + state.height = this.fontOptions.minHgt; + } + + this.lines = state.lines; + this.lineCount = state.lines.length; + this.size.width = state.width; + this.size.height = state.height; + this.selectedState = selected; + this.hoverState = hover; + this.labelDirty = false; + } + /** + * Check if this label is visible + * + * @return {boolean} true if this label will be show, false otherwise + */ + + }, { + key: "visible", + value: function visible() { + if (this.size.width === 0 || this.size.height === 0 || this.elementOptions.label === undefined) { + return false; // nothing to display + } + + var viewFontSize = this.fontOptions.size * this.body.view.scale; + + if (viewFontSize < this.elementOptions.scaling.label.drawThreshold - 1) { + return false; // Too small or too far away to show + } + + return true; + } + }], [{ + key: "parseFontString", + value: function parseFontString(outOptions, inOptions) { + if (!inOptions || typeof inOptions !== 'string') return false; + var newOptionsArray = inOptions.split(" "); + outOptions.size = +newOptionsArray[0].replace("px", ''); + outOptions.face = newOptionsArray[1]; + outOptions.color = newOptionsArray[2]; + return true; + } + }]); + + return Label; +}(); + +function _assertThisInitialized$2(self) { + if (self === void 0) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + + return self; +} + +var assertThisInitialized$1 = _assertThisInitialized$2; + +function _possibleConstructorReturn$1(self, call) { + if (call && (_typeof_1$1(call) === "object" || typeof call === "function")) { + return call; + } + + return assertThisInitialized$1(self); +} + +var possibleConstructorReturn$1 = _possibleConstructorReturn$1; + +var getPrototypeOf$1 = createCommonjsModule$2(function (module) { + function _getPrototypeOf(o) { + module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { + return o.__proto__ || Object.getPrototypeOf(o); + }; + return _getPrototypeOf(o); + } + + module.exports = _getPrototypeOf; +}); + +var setPrototypeOf$2 = createCommonjsModule$2(function (module) { + function _setPrototypeOf(o, p) { + module.exports = _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { + o.__proto__ = p; + return o; + }; + + return _setPrototypeOf(o, p); + } + + module.exports = _setPrototypeOf; +}); + +function _inherits$1(subClass, superClass) { + if (typeof superClass !== "function" && superClass !== null) { + throw new TypeError("Super expression must either be null or a function"); + } + + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + writable: true, + configurable: true + } + }); + if (superClass) setPrototypeOf$2(subClass, superClass); +} + +var inherits$1 = _inherits$1; + +/** + * The Base class for all Nodes. + */ +var NodeBase = +/*#__PURE__*/ +function () { + /** + * @param {Object} options + * @param {Object} body + * @param {Label} labelModule + */ + function NodeBase(options, body, labelModule) { + classCallCheck$1(this, NodeBase); + + this.body = body; + this.labelModule = labelModule; + this.setOptions(options); + this.top = undefined; + this.left = undefined; + this.height = undefined; + this.width = undefined; + this.radius = undefined; + this.margin = undefined; + this.refreshNeeded = true; + this.boundingBox = { + top: 0, + left: 0, + right: 0, + bottom: 0 + }; + } + /** + * + * @param {Object} options + */ + + + createClass$1(NodeBase, [{ + key: "setOptions", + value: function setOptions(options) { + this.options = options; + } + /** + * + * @param {Label} labelModule + * @private + */ + + }, { + key: "_setMargins", + value: function _setMargins(labelModule) { + this.margin = {}; + + if (this.options.margin) { + if (_typeof_1$1(this.options.margin) == 'object') { + this.margin.top = this.options.margin.top; + this.margin.right = this.options.margin.right; + this.margin.bottom = this.options.margin.bottom; + this.margin.left = this.options.margin.left; + } else { + this.margin.top = this.options.margin; + this.margin.right = this.options.margin; + this.margin.bottom = this.options.margin; + this.margin.left = this.options.margin; + } + } + + labelModule.adjustSizes(this.margin); + } + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {number} angle + * @returns {number} + * @private + */ + + }, { + key: "_distanceToBorder", + value: function _distanceToBorder(ctx, angle) { + var borderWidth = this.options.borderWidth; + this.resize(ctx); + return Math.min(Math.abs(this.width / 2 / Math.cos(angle)), Math.abs(this.height / 2 / Math.sin(angle))) + borderWidth; + } + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {ArrowOptions} values + */ + + }, { + key: "enableShadow", + value: function enableShadow(ctx, values) { + if (values.shadow) { + ctx.shadowColor = values.shadowColor; + ctx.shadowBlur = values.shadowSize; + ctx.shadowOffsetX = values.shadowX; + ctx.shadowOffsetY = values.shadowY; + } + } + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {ArrowOptions} values + */ + + }, { + key: "disableShadow", + value: function disableShadow(ctx, values) { + if (values.shadow) { + ctx.shadowColor = 'rgba(0,0,0,0)'; + ctx.shadowBlur = 0; + ctx.shadowOffsetX = 0; + ctx.shadowOffsetY = 0; + } + } + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {ArrowOptions} values + */ + + }, { + key: "enableBorderDashes", + value: function enableBorderDashes(ctx, values) { + if (values.borderDashes !== false) { + if (ctx.setLineDash !== undefined) { + var dashes = values.borderDashes; + + if (dashes === true) { + dashes = [5, 15]; + } + + ctx.setLineDash(dashes); + } else { + console.warn("setLineDash is not supported in this browser. The dashed borders cannot be used."); + this.options.shapeProperties.borderDashes = false; + values.borderDashes = false; + } + } + } + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {ArrowOptions} values + */ + + }, { + key: "disableBorderDashes", + value: function disableBorderDashes(ctx, values) { + if (values.borderDashes !== false) { + if (ctx.setLineDash !== undefined) { + ctx.setLineDash([0]); + } else { + console.warn("setLineDash is not supported in this browser. The dashed borders cannot be used."); + this.options.shapeProperties.borderDashes = false; + values.borderDashes = false; + } + } + } + /** + * Determine if the shape of a node needs to be recalculated. + * + * @param {boolean} selected + * @param {boolean} hover + * @returns {boolean} + * @protected + */ + + }, { + key: "needsRefresh", + value: function needsRefresh(selected, hover) { + if (this.refreshNeeded === true) { + // This is probably not the best location to reset this member. + // However, in the current logic, it is the most convenient one. + this.refreshNeeded = false; + return true; + } + + return this.width === undefined || this.labelModule.differentState(selected, hover); + } + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {ArrowOptions} values + */ + + }, { + key: "initContextForDraw", + value: function initContextForDraw(ctx, values) { + var borderWidth = values.borderWidth / this.body.view.scale; + ctx.lineWidth = Math.min(this.width, borderWidth); + ctx.strokeStyle = values.borderColor; + ctx.fillStyle = values.color; + } + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {ArrowOptions} values + */ + + }, { + key: "performStroke", + value: function performStroke(ctx, values) { + var borderWidth = values.borderWidth / this.body.view.scale; //draw dashed border if enabled, save and restore is required for firefox not to crash on unix. + + ctx.save(); // if borders are zero width, they will be drawn with width 1 by default. This prevents that + + if (borderWidth > 0) { + this.enableBorderDashes(ctx, values); //draw the border + + ctx.stroke(); //disable dashed border for other elements + + this.disableBorderDashes(ctx, values); + } + + ctx.restore(); + } + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {ArrowOptions} values + */ + + }, { + key: "performFill", + value: function performFill(ctx, values) { + // draw shadow if enabled + this.enableShadow(ctx, values); // draw the background + + ctx.fill(); // disable shadows for other elements. + + this.disableShadow(ctx, values); + this.performStroke(ctx, values); + } + /** + * + * @param {number} margin + * @private + */ + + }, { + key: "_addBoundingBoxMargin", + value: function _addBoundingBoxMargin(margin) { + this.boundingBox.left -= margin; + this.boundingBox.top -= margin; + this.boundingBox.bottom += margin; + this.boundingBox.right += margin; + } + /** + * Actual implementation of this method call. + * + * Doing it like this makes it easier to override + * in the child classes. + * + * @param {number} x width + * @param {number} y height + * @param {CanvasRenderingContext2D} ctx + * @param {boolean} selected + * @param {boolean} hover + * @private + */ + + }, { + key: "_updateBoundingBox", + value: function _updateBoundingBox(x, y, ctx, selected, hover) { + if (ctx !== undefined) { + this.resize(ctx, selected, hover); + } + + this.left = x - this.width / 2; + this.top = y - this.height / 2; + this.boundingBox.left = this.left; + this.boundingBox.top = this.top; + this.boundingBox.bottom = this.top + this.height; + this.boundingBox.right = this.left + this.width; + } + /** + * Default implementation of this method call. + * This acts as a stub which can be overridden. + * + * @param {number} x width + * @param {number} y height + * @param {CanvasRenderingContext2D} ctx + * @param {boolean} selected + * @param {boolean} hover + */ + + }, { + key: "updateBoundingBox", + value: function updateBoundingBox(x, y, ctx, selected, hover) { + this._updateBoundingBox(x, y, ctx, selected, hover); + } + /** + * Determine the dimensions to use for nodes with an internal label + * + * Currently, these are: Circle, Ellipse, Database, Box + * The other nodes have external labels, and will not call this method + * + * If there is no label, decent default values are supplied. + * + * @param {CanvasRenderingContext2D} ctx + * @param {boolean} [selected] + * @param {boolean} [hover] + * @returns {{width:number, height:number}} + */ + + }, { + key: "getDimensionsFromLabel", + value: function getDimensionsFromLabel(ctx, selected, hover) { + // NOTE: previously 'textSize' was not put in 'this' for Ellipse + // TODO: examine the consequences. + this.textSize = this.labelModule.getTextSize(ctx, selected, hover); + var width = this.textSize.width; + var height = this.textSize.height; + var DEFAULT_SIZE = 14; + + if (width === 0) { + // This happens when there is no label text set + width = DEFAULT_SIZE; // use a decent default + + height = DEFAULT_SIZE; // if width zero, then height also always zero + } + + return { + width: width, + height: height + }; + } + }]); + + return NodeBase; +}(); + +/** + * A Box Node/Cluster shape. + * + * @extends NodeBase + */ + +var Box = +/*#__PURE__*/ +function (_NodeBase) { + inherits$1(Box, _NodeBase); + + /** + * @param {Object} options + * @param {Object} body + * @param {Label} labelModule + */ + function Box(options, body, labelModule) { + var _this; + + classCallCheck$1(this, Box); + + _this = possibleConstructorReturn$1(this, getPrototypeOf$1(Box).call(this, options, body, labelModule)); + + _this._setMargins(labelModule); + + return _this; + } + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {boolean} [selected] + * @param {boolean} [hover] + */ + + + createClass$1(Box, [{ + key: "resize", + value: function resize(ctx) { + var selected = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.selected; + var hover = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.hover; + + if (this.needsRefresh(selected, hover)) { + var dimensions = this.getDimensionsFromLabel(ctx, selected, hover); + this.width = dimensions.width + this.margin.right + this.margin.left; + this.height = dimensions.height + this.margin.top + this.margin.bottom; + this.radius = this.width / 2; + } + } + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {number} x width + * @param {number} y height + * @param {boolean} selected + * @param {boolean} hover + * @param {ArrowOptions} values + */ + + }, { + key: "draw", + value: function draw(ctx, x, y, selected, hover, values) { + this.resize(ctx, selected, hover); + this.left = x - this.width / 2; + this.top = y - this.height / 2; + this.initContextForDraw(ctx, values); + ctx.roundRect(this.left, this.top, this.width, this.height, values.borderRadius); + this.performFill(ctx, values); + this.updateBoundingBox(x, y, ctx, selected, hover); + this.labelModule.draw(ctx, this.left + this.textSize.width / 2 + this.margin.left, this.top + this.textSize.height / 2 + this.margin.top, selected, hover); + } + /** + * + * @param {number} x width + * @param {number} y height + * @param {CanvasRenderingContext2D} ctx + * @param {boolean} selected + * @param {boolean} hover + */ + + }, { + key: "updateBoundingBox", + value: function updateBoundingBox(x, y, ctx, selected, hover) { + this._updateBoundingBox(x, y, ctx, selected, hover); + + var borderRadius = this.options.shapeProperties.borderRadius; // only effective for box + + this._addBoundingBoxMargin(borderRadius); + } + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {number} angle + * @returns {number} + */ + + }, { + key: "distanceToBorder", + value: function distanceToBorder(ctx, angle) { + this.resize(ctx); + var borderWidth = this.options.borderWidth; + return Math.min(Math.abs(this.width / 2 / Math.cos(angle)), Math.abs(this.height / 2 / Math.sin(angle))) + borderWidth; + } + }]); + + return Box; +}(NodeBase); + +/** + * NOTE: This is a bad base class + * + * Child classes are: + * + * Image - uses *only* image methods + * Circle - uses *only* _drawRawCircle + * CircleImage - uses all + * + * TODO: Refactor, move _drawRawCircle to different module, derive Circle from NodeBase + * Rename this to ImageBase + * Consolidate common code in Image and CircleImage to base class + * + * @extends NodeBase + */ + +var CircleImageBase = +/*#__PURE__*/ +function (_NodeBase) { + inherits$1(CircleImageBase, _NodeBase); + + /** + * @param {Object} options + * @param {Object} body + * @param {Label} labelModule + */ + function CircleImageBase(options, body, labelModule) { + var _this; + + classCallCheck$1(this, CircleImageBase); + + _this = possibleConstructorReturn$1(this, getPrototypeOf$1(CircleImageBase).call(this, options, body, labelModule)); + _this.labelOffset = 0; + _this.selected = false; + return _this; + } + /** + * + * @param {Object} options + * @param {Object} [imageObj] + * @param {Object} [imageObjAlt] + */ + + + createClass$1(CircleImageBase, [{ + key: "setOptions", + value: function setOptions(options, imageObj, imageObjAlt) { + this.options = options; + + if (!(imageObj === undefined && imageObjAlt === undefined)) { + this.setImages(imageObj, imageObjAlt); + } + } + /** + * Set the images for this node. + * + * The images can be updated after the initial setting of options; + * therefore, this method needs to be reentrant. + * + * For correct working in error cases, it is necessary to properly set + * field 'nodes.brokenImage' in the options. + * + * @param {Image} imageObj required; main image to show for this node + * @param {Image|undefined} imageObjAlt optional; image to show when node is selected + */ + + }, { + key: "setImages", + value: function setImages(imageObj, imageObjAlt) { + if (imageObjAlt && this.selected) { + this.imageObj = imageObjAlt; + this.imageObjAlt = imageObj; + } else { + this.imageObj = imageObj; + this.imageObjAlt = imageObjAlt; + } + } + /** + * Set selection and switch between the base and the selected image. + * + * Do the switch only if imageObjAlt exists. + * + * @param {boolean} selected value of new selected state for current node + */ + + }, { + key: "switchImages", + value: function switchImages(selected) { + var selection_changed = selected && !this.selected || !selected && this.selected; + this.selected = selected; // Remember new selection + + if (this.imageObjAlt !== undefined && selection_changed) { + var imageTmp = this.imageObj; + this.imageObj = this.imageObjAlt; + this.imageObjAlt = imageTmp; + } + } + /** + * Adjust the node dimensions for a loaded image. + * + * Pre: this.imageObj is valid + */ + + }, { + key: "_resizeImage", + value: function _resizeImage() { + var width, height; + + if (this.options.shapeProperties.useImageSize === false) { + // Use the size property + var ratio_width = 1; + var ratio_height = 1; // Only calculate the proper ratio if both width and height not zero + + if (this.imageObj.width && this.imageObj.height) { + if (this.imageObj.width > this.imageObj.height) { + ratio_width = this.imageObj.width / this.imageObj.height; + } else { + ratio_height = this.imageObj.height / this.imageObj.width; + } + } + + width = this.options.size * 2 * ratio_width; + height = this.options.size * 2 * ratio_height; + } else { + // Use the image size + width = this.imageObj.width; + height = this.imageObj.height; + } + + this.width = width; + this.height = height; + this.radius = 0.5 * this.width; + } + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {number} x width + * @param {number} y height + * @param {ArrowOptions} values + * @private + */ + + }, { + key: "_drawRawCircle", + value: function _drawRawCircle(ctx, x, y, values) { + this.initContextForDraw(ctx, values); + ctx.circle(x, y, values.size); + this.performFill(ctx, values); + } + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {ArrowOptions} values + * @private + */ + + }, { + key: "_drawImageAtPosition", + value: function _drawImageAtPosition(ctx, values) { + if (this.imageObj.width != 0) { + // draw the image + ctx.globalAlpha = 1.0; // draw shadow if enabled + + this.enableShadow(ctx, values); + var factor = 1; + + if (this.options.shapeProperties.interpolation === true) { + factor = this.imageObj.width / this.width / this.body.view.scale; + } + + this.imageObj.drawImageAtPosition(ctx, factor, this.left, this.top, this.width, this.height); // disable shadows for other elements. + + this.disableShadow(ctx, values); + } + } + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {number} x width + * @param {number} y height + * @param {boolean} selected + * @param {boolean} hover + * @private + */ + + }, { + key: "_drawImageLabel", + value: function _drawImageLabel(ctx, x, y, selected, hover) { + var yLabel; + var offset = 0; + + if (this.height !== undefined) { + offset = this.height * 0.5; + var labelDimensions = this.labelModule.getTextSize(ctx, selected, hover); + + if (labelDimensions.lineCount >= 1) { + offset += labelDimensions.height / 2; + } + } + + yLabel = y + offset; + + if (this.options.label) { + this.labelOffset = offset; + } + + this.labelModule.draw(ctx, x, yLabel, selected, hover, 'hanging'); + } + }]); + + return CircleImageBase; +}(NodeBase); + +/** + * A Circle Node/Cluster shape. + * + * @extends CircleImageBase + */ + +var Circle = +/*#__PURE__*/ +function (_CircleImageBase) { + inherits$1(Circle, _CircleImageBase); + + /** + * @param {Object} options + * @param {Object} body + * @param {Label} labelModule + */ + function Circle(options, body, labelModule) { + var _this; + + classCallCheck$1(this, Circle); + + _this = possibleConstructorReturn$1(this, getPrototypeOf$1(Circle).call(this, options, body, labelModule)); + + _this._setMargins(labelModule); + + return _this; + } + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {boolean} [selected] + * @param {boolean} [hover] + */ + + + createClass$1(Circle, [{ + key: "resize", + value: function resize(ctx) { + var selected = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.selected; + var hover = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.hover; + + if (this.needsRefresh(selected, hover)) { + var dimensions = this.getDimensionsFromLabel(ctx, selected, hover); + var diameter = Math.max(dimensions.width + this.margin.right + this.margin.left, dimensions.height + this.margin.top + this.margin.bottom); + this.options.size = diameter / 2; // NOTE: this size field only set here, not in Ellipse, Database, Box + + this.width = diameter; + this.height = diameter; + this.radius = this.width / 2; + } + } + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {number} x width + * @param {number} y height + * @param {boolean} selected + * @param {boolean} hover + * @param {ArrowOptions} values + */ + + }, { + key: "draw", + value: function draw(ctx, x, y, selected, hover, values) { + this.resize(ctx, selected, hover); + this.left = x - this.width / 2; + this.top = y - this.height / 2; + + this._drawRawCircle(ctx, x, y, values); + + this.updateBoundingBox(x, y); + this.labelModule.draw(ctx, this.left + this.textSize.width / 2 + this.margin.left, y, selected, hover); + } + /** + * + * @param {number} x width + * @param {number} y height + */ + + }, { + key: "updateBoundingBox", + value: function updateBoundingBox(x, y) { + this.boundingBox.top = y - this.options.size; + this.boundingBox.left = x - this.options.size; + this.boundingBox.right = x + this.options.size; + this.boundingBox.bottom = y + this.options.size; + } + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {number} angle - Unused + * @returns {number} + */ + + }, { + key: "distanceToBorder", + value: function distanceToBorder(ctx, angle) { + // eslint-disable-line no-unused-vars + this.resize(ctx); + return this.width * 0.5; + } + }]); + + return Circle; +}(CircleImageBase); + +/** + * A CircularImage Node/Cluster shape. + * + * @extends CircleImageBase + */ + +var CircularImage = +/*#__PURE__*/ +function (_CircleImageBase) { + inherits$1(CircularImage, _CircleImageBase); + + /** + * @param {Object} options + * @param {Object} body + * @param {Label} labelModule + * @param {Image} imageObj + * @param {Image} imageObjAlt + */ + function CircularImage(options, body, labelModule, imageObj, imageObjAlt) { + var _this; + + classCallCheck$1(this, CircularImage); + + _this = possibleConstructorReturn$1(this, getPrototypeOf$1(CircularImage).call(this, options, body, labelModule)); + + _this.setImages(imageObj, imageObjAlt); + + return _this; + } + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {boolean} [selected] + * @param {boolean} [hover] + */ + + + createClass$1(CircularImage, [{ + key: "resize", + value: function resize(ctx) { + var selected = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.selected; + var hover = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.hover; + var imageAbsent = this.imageObj.src === undefined || this.imageObj.width === undefined || this.imageObj.height === undefined; + + if (imageAbsent) { + var diameter = this.options.size * 2; + this.width = diameter; + this.height = diameter; + this.radius = 0.5 * this.width; + return; + } // At this point, an image is present, i.e. this.imageObj is valid. + + + if (this.needsRefresh(selected, hover)) { + this._resizeImage(); + } + } + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {number} x width + * @param {number} y height + * @param {boolean} selected + * @param {boolean} hover + * @param {ArrowOptions} values + */ + + }, { + key: "draw", + value: function draw(ctx, x, y, selected, hover, values) { + this.switchImages(selected); + this.resize(); + this.left = x - this.width / 2; + this.top = y - this.height / 2; // draw the background circle. IMPORTANT: the stroke in this method is used by the clip method below. + + this._drawRawCircle(ctx, x, y, values); // now we draw in the circle, we save so we can revert the clip operation after drawing. + + + ctx.save(); // clip is used to use the stroke in drawRawCircle as an area that we can draw in. + + ctx.clip(); // draw the image + + this._drawImageAtPosition(ctx, values); // restore so we can again draw on the full canvas + + + ctx.restore(); + + this._drawImageLabel(ctx, x, y, selected, hover); + + this.updateBoundingBox(x, y); + } // TODO: compare with Circle.updateBoundingBox(), consolidate? More stuff is happening here + + /** + * + * @param {number} x width + * @param {number} y height + */ + + }, { + key: "updateBoundingBox", + value: function updateBoundingBox(x, y) { + this.boundingBox.top = y - this.options.size; + this.boundingBox.left = x - this.options.size; + this.boundingBox.right = x + this.options.size; + this.boundingBox.bottom = y + this.options.size; // TODO: compare with Image.updateBoundingBox(), consolidate? + + this.boundingBox.left = Math.min(this.boundingBox.left, this.labelModule.size.left); + this.boundingBox.right = Math.max(this.boundingBox.right, this.labelModule.size.left + this.labelModule.size.width); + this.boundingBox.bottom = Math.max(this.boundingBox.bottom, this.boundingBox.bottom + this.labelOffset); + } + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {number} angle - Unused + * @returns {number} + */ + + }, { + key: "distanceToBorder", + value: function distanceToBorder(ctx, angle) { + // eslint-disable-line no-unused-vars + this.resize(ctx); + return this.width * 0.5; + } + }]); + + return CircularImage; +}(CircleImageBase); + +/** + * A Database Node/Cluster shape. + * + * @extends NodeBase + */ + +var Database = +/*#__PURE__*/ +function (_NodeBase) { + inherits$1(Database, _NodeBase); + + /** + * @param {Object} options + * @param {Object} body + * @param {Label} labelModule + */ + function Database(options, body, labelModule) { + var _this; + + classCallCheck$1(this, Database); + + _this = possibleConstructorReturn$1(this, getPrototypeOf$1(Database).call(this, options, body, labelModule)); + + _this._setMargins(labelModule); + + return _this; + } + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {boolean} selected + * @param {boolean} hover + */ + + + createClass$1(Database, [{ + key: "resize", + value: function resize(ctx, selected, hover) { + if (this.needsRefresh(selected, hover)) { + var dimensions = this.getDimensionsFromLabel(ctx, selected, hover); + var size = dimensions.width + this.margin.right + this.margin.left; + this.width = size; + this.height = size; + this.radius = this.width / 2; + } + } + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {number} x width + * @param {number} y height + * @param {boolean} selected + * @param {boolean} hover + * @param {ArrowOptions} values + */ + + }, { + key: "draw", + value: function draw(ctx, x, y, selected, hover, values) { + this.resize(ctx, selected, hover); + this.left = x - this.width / 2; + this.top = y - this.height / 2; + this.initContextForDraw(ctx, values); + ctx.database(x - this.width / 2, y - this.height / 2, this.width, this.height); + this.performFill(ctx, values); + this.updateBoundingBox(x, y, ctx, selected, hover); + this.labelModule.draw(ctx, this.left + this.textSize.width / 2 + this.margin.left, this.top + this.textSize.height / 2 + this.margin.top, selected, hover); + } + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {number} angle + * @returns {number} + */ + + }, { + key: "distanceToBorder", + value: function distanceToBorder(ctx, angle) { + return this._distanceToBorder(ctx, angle); + } + }]); + + return Database; +}(NodeBase); + +/** + * Base class for constructing Node/Cluster Shapes. + * + * @extends NodeBase + */ + +var ShapeBase = +/*#__PURE__*/ +function (_NodeBase) { + inherits$1(ShapeBase, _NodeBase); + + /** + * @param {Object} options + * @param {Object} body + * @param {Label} labelModule + */ + function ShapeBase(options, body, labelModule) { + classCallCheck$1(this, ShapeBase); + + return possibleConstructorReturn$1(this, getPrototypeOf$1(ShapeBase).call(this, options, body, labelModule)); + } + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {boolean} [selected] + * @param {boolean} [hover] + * @param {Object} [values={size: this.options.size}] + */ + + + createClass$1(ShapeBase, [{ + key: "resize", + value: function resize(ctx) { + var selected = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.selected; + var hover = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.hover; + var values = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : { + size: this.options.size + }; + + if (this.needsRefresh(selected, hover)) { + this.labelModule.getTextSize(ctx, selected, hover); + var size = 2 * values.size; + this.width = size; + this.height = size; + this.radius = 0.5 * this.width; + } + } + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {string} shape + * @param {number} sizeMultiplier - Unused! TODO: Remove next major release + * @param {number} x + * @param {number} y + * @param {boolean} selected + * @param {boolean} hover + * @param {ArrowOptions} values + * @private + */ + + }, { + key: "_drawShape", + value: function _drawShape(ctx, shape, sizeMultiplier, x, y, selected, hover, values) { + this.resize(ctx, selected, hover, values); + this.left = x - this.width / 2; + this.top = y - this.height / 2; + this.initContextForDraw(ctx, values); + ctx[shape](x, y, values.size); + this.performFill(ctx, values); + + if (this.options.icon !== undefined) { + if (this.options.icon.code !== undefined) { + ctx.font = (selected ? "bold " : "") + this.height / 2 + "px " + (this.options.icon.face || 'FontAwesome'); + ctx.fillStyle = this.options.icon.color || "black"; + ctx.textAlign = "center"; + ctx.textBaseline = "middle"; + ctx.fillText(this.options.icon.code, x, y); + } + } + + if (this.options.label !== undefined) { + // Need to call following here in order to ensure value for `this.labelModule.size.height` + this.labelModule.calculateLabelSize(ctx, selected, hover, x, y, 'hanging'); + var yLabel = y + 0.5 * this.height + 0.5 * this.labelModule.size.height; + this.labelModule.draw(ctx, x, yLabel, selected, hover, 'hanging'); + } + + this.updateBoundingBox(x, y); + } + /** + * + * @param {number} x + * @param {number} y + */ + + }, { + key: "updateBoundingBox", + value: function updateBoundingBox(x, y) { + this.boundingBox.top = y - this.options.size; + this.boundingBox.left = x - this.options.size; + this.boundingBox.right = x + this.options.size; + this.boundingBox.bottom = y + this.options.size; + + if (this.options.label !== undefined && this.labelModule.size.width > 0) { + this.boundingBox.left = Math.min(this.boundingBox.left, this.labelModule.size.left); + this.boundingBox.right = Math.max(this.boundingBox.right, this.labelModule.size.left + this.labelModule.size.width); + this.boundingBox.bottom = Math.max(this.boundingBox.bottom, this.boundingBox.bottom + this.labelModule.size.height); + } + } + }]); + + return ShapeBase; +}(NodeBase); + +/** + * A Diamond Node/Cluster shape. + * + * @extends ShapeBase + */ + +var Diamond = +/*#__PURE__*/ +function (_ShapeBase) { + inherits$1(Diamond, _ShapeBase); + + /** + * @param {Object} options + * @param {Object} body + * @param {Label} labelModule + */ + function Diamond(options, body, labelModule) { + classCallCheck$1(this, Diamond); + + return possibleConstructorReturn$1(this, getPrototypeOf$1(Diamond).call(this, options, body, labelModule)); + } + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {number} x width + * @param {number} y height + * @param {boolean} selected + * @param {boolean} hover + * @param {ArrowOptions} values + */ + + + createClass$1(Diamond, [{ + key: "draw", + value: function draw(ctx, x, y, selected, hover, values) { + this._drawShape(ctx, 'diamond', 4, x, y, selected, hover, values); + } + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {number} angle + * @returns {number} + */ + + }, { + key: "distanceToBorder", + value: function distanceToBorder(ctx, angle) { + return this._distanceToBorder(ctx, angle); + } + }]); + + return Diamond; +}(ShapeBase); + +/** + * A Dot Node/Cluster shape. + * + * @extends ShapeBase + */ + +var Dot = +/*#__PURE__*/ +function (_ShapeBase) { + inherits$1(Dot, _ShapeBase); + + /** + * @param {Object} options + * @param {Object} body + * @param {Label} labelModule + */ + function Dot(options, body, labelModule) { + classCallCheck$1(this, Dot); + + return possibleConstructorReturn$1(this, getPrototypeOf$1(Dot).call(this, options, body, labelModule)); + } + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {number} x width + * @param {number} y height + * @param {boolean} selected + * @param {boolean} hover + * @param {ArrowOptions} values + */ + + + createClass$1(Dot, [{ + key: "draw", + value: function draw(ctx, x, y, selected, hover, values) { + this._drawShape(ctx, 'circle', 2, x, y, selected, hover, values); + } + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {number} angle + * @returns {number} + */ + + }, { + key: "distanceToBorder", + value: function distanceToBorder(ctx, angle) { + // eslint-disable-line no-unused-vars + this.resize(ctx); + return this.options.size; + } + }]); + + return Dot; +}(ShapeBase); + +/** + * Am Ellipse Node/Cluster shape. + * + * @extends NodeBase + */ + +var Ellipse = +/*#__PURE__*/ +function (_NodeBase) { + inherits$1(Ellipse, _NodeBase); + + /** + * @param {Object} options + * @param {Object} body + * @param {Label} labelModule + */ + function Ellipse(options, body, labelModule) { + classCallCheck$1(this, Ellipse); + + return possibleConstructorReturn$1(this, getPrototypeOf$1(Ellipse).call(this, options, body, labelModule)); + } + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {boolean} [selected] + * @param {boolean} [hover] + */ + + + createClass$1(Ellipse, [{ + key: "resize", + value: function resize(ctx) { + var selected = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.selected; + var hover = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.hover; + + if (this.needsRefresh(selected, hover)) { + var dimensions = this.getDimensionsFromLabel(ctx, selected, hover); + this.height = dimensions.height * 2; + this.width = dimensions.width + dimensions.height; + this.radius = 0.5 * this.width; + } + } + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {number} x width + * @param {number} y height + * @param {boolean} selected + * @param {boolean} hover + * @param {ArrowOptions} values + */ + + }, { + key: "draw", + value: function draw(ctx, x, y, selected, hover, values) { + this.resize(ctx, selected, hover); + this.left = x - this.width * 0.5; + this.top = y - this.height * 0.5; + this.initContextForDraw(ctx, values); + ctx.ellipse_vis(this.left, this.top, this.width, this.height); + this.performFill(ctx, values); + this.updateBoundingBox(x, y, ctx, selected, hover); + this.labelModule.draw(ctx, x, y, selected, hover); + } + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {number} angle + * @returns {number} + */ + + }, { + key: "distanceToBorder", + value: function distanceToBorder(ctx, angle) { + this.resize(ctx); + var a = this.width * 0.5; + var b = this.height * 0.5; + var w = Math.sin(angle) * a; + var h = Math.cos(angle) * b; + return a * b / Math.sqrt(w * w + h * h); + } + }]); + + return Ellipse; +}(NodeBase); + +/** + * An icon replacement for the default Node shape. + * + * @extends NodeBase + */ + +var Icon = +/*#__PURE__*/ +function (_NodeBase) { + inherits$1(Icon, _NodeBase); + + /** + * @param {Object} options + * @param {Object} body + * @param {Label} labelModule + */ + function Icon(options, body, labelModule) { + var _this; + + classCallCheck$1(this, Icon); + + _this = possibleConstructorReturn$1(this, getPrototypeOf$1(Icon).call(this, options, body, labelModule)); + + _this._setMargins(labelModule); + + return _this; + } + /** + * + * @param {CanvasRenderingContext2D} ctx - Unused. + * @param {boolean} [selected] + * @param {boolean} [hover] + */ + + + createClass$1(Icon, [{ + key: "resize", + value: function resize(ctx, selected, hover) { + if (this.needsRefresh(selected, hover)) { + this.iconSize = { + width: Number(this.options.icon.size), + height: Number(this.options.icon.size) + }; + this.width = this.iconSize.width + this.margin.right + this.margin.left; + this.height = this.iconSize.height + this.margin.top + this.margin.bottom; + this.radius = 0.5 * this.width; + } + } + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {number} x width + * @param {number} y height + * @param {boolean} selected + * @param {boolean} hover + * @param {ArrowOptions} values + */ + + }, { + key: "draw", + value: function draw(ctx, x, y, selected, hover, values) { + this.resize(ctx, selected, hover); + this.options.icon.size = this.options.icon.size || 50; + this.left = x - this.width / 2; + this.top = y - this.height / 2; + + this._icon(ctx, x, y, selected, hover, values); + + if (this.options.label !== undefined) { + var iconTextSpacing = 5; + this.labelModule.draw(ctx, this.left + this.iconSize.width / 2 + this.margin.left, y + this.height / 2 + iconTextSpacing, selected); + } + + this.updateBoundingBox(x, y); + } + /** + * + * @param {number} x + * @param {number} y + */ + + }, { + key: "updateBoundingBox", + value: function updateBoundingBox(x, y) { + this.boundingBox.top = y - this.options.icon.size * 0.5; + this.boundingBox.left = x - this.options.icon.size * 0.5; + this.boundingBox.right = x + this.options.icon.size * 0.5; + this.boundingBox.bottom = y + this.options.icon.size * 0.5; + + if (this.options.label !== undefined && this.labelModule.size.width > 0) { + var iconTextSpacing = 5; + this.boundingBox.left = Math.min(this.boundingBox.left, this.labelModule.size.left); + this.boundingBox.right = Math.max(this.boundingBox.right, this.labelModule.size.left + this.labelModule.size.width); + this.boundingBox.bottom = Math.max(this.boundingBox.bottom, this.boundingBox.bottom + this.labelModule.size.height + iconTextSpacing); + } + } + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {number} x width + * @param {number} y height + * @param {boolean} selected + * @param {boolean} hover - Unused + * @param {ArrowOptions} values + */ + + }, { + key: "_icon", + value: function _icon(ctx, x, y, selected, hover, values) { + var iconSize = Number(this.options.icon.size); + + if (this.options.icon.code !== undefined) { + ctx.font = (selected ? "bold " : "") + iconSize + "px " + this.options.icon.face; // draw icon + + ctx.fillStyle = this.options.icon.color || "black"; + ctx.textAlign = "center"; + ctx.textBaseline = "middle"; // draw shadow if enabled + + this.enableShadow(ctx, values); + ctx.fillText(this.options.icon.code, x, y); // disable shadows for other elements. + + this.disableShadow(ctx, values); + } else { + console.error('When using the icon shape, you need to define the code in the icon options object. This can be done per node or globally.'); + } + } + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {number} angle + * @returns {number} + */ + + }, { + key: "distanceToBorder", + value: function distanceToBorder(ctx, angle) { + return this._distanceToBorder(ctx, angle); + } + }]); + + return Icon; +}(NodeBase); + +/** + * An image-based replacement for the default Node shape. + * + * @extends CircleImageBase + */ + +var Image$1 = +/*#__PURE__*/ +function (_CircleImageBase) { + inherits$1(Image, _CircleImageBase); + + /** + * @param {Object} options + * @param {Object} body + * @param {Label} labelModule + * @param {Image} imageObj + * @param {Image} imageObjAlt + */ + function Image(options, body, labelModule, imageObj, imageObjAlt) { + var _this; + + classCallCheck$1(this, Image); + + _this = possibleConstructorReturn$1(this, getPrototypeOf$1(Image).call(this, options, body, labelModule)); + + _this.setImages(imageObj, imageObjAlt); + + return _this; + } + /** + * + * @param {CanvasRenderingContext2D} ctx - Unused. + * @param {boolean} [selected] + * @param {boolean} [hover] + */ + + + createClass$1(Image, [{ + key: "resize", + value: function resize(ctx) { + var selected = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.selected; + var hover = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.hover; + var imageAbsent = this.imageObj.src === undefined || this.imageObj.width === undefined || this.imageObj.height === undefined; + + if (imageAbsent) { + var side = this.options.size * 2; + this.width = side; + this.height = side; + return; + } + + if (this.needsRefresh(selected, hover)) { + this._resizeImage(); + } + } + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {number} x width + * @param {number} y height + * @param {boolean} selected + * @param {boolean} hover + * @param {ArrowOptions} values + */ + + }, { + key: "draw", + value: function draw(ctx, x, y, selected, hover, values) { + this.switchImages(selected); + this.resize(); + this.left = x - this.width / 2; + this.top = y - this.height / 2; + + if (this.options.shapeProperties.useBorderWithImage === true) { + var neutralborderWidth = this.options.borderWidth; + var selectionLineWidth = this.options.borderWidthSelected || 2 * this.options.borderWidth; + var borderWidth = (selected ? selectionLineWidth : neutralborderWidth) / this.body.view.scale; + ctx.lineWidth = Math.min(this.width, borderWidth); + ctx.beginPath(); // setup the line properties. + + ctx.strokeStyle = selected ? this.options.color.highlight.border : hover ? this.options.color.hover.border : this.options.color.border; // set a fillstyle + + ctx.fillStyle = selected ? this.options.color.highlight.background : hover ? this.options.color.hover.background : this.options.color.background; // draw a rectangle to form the border around. This rectangle is filled so the opacity of a picture (in future vis releases?) can be used to tint the image + + ctx.rect(this.left - 0.5 * ctx.lineWidth, this.top - 0.5 * ctx.lineWidth, this.width + ctx.lineWidth, this.height + ctx.lineWidth); + ctx.fill(); + this.performStroke(ctx, values); + ctx.closePath(); + } + + this._drawImageAtPosition(ctx, values); + + this._drawImageLabel(ctx, x, y, selected, hover); + + this.updateBoundingBox(x, y); + } + /** + * + * @param {number} x + * @param {number} y + */ + + }, { + key: "updateBoundingBox", + value: function updateBoundingBox(x, y) { + this.resize(); + + this._updateBoundingBox(x, y); + + if (this.options.label !== undefined && this.labelModule.size.width > 0) { + this.boundingBox.left = Math.min(this.boundingBox.left, this.labelModule.size.left); + this.boundingBox.right = Math.max(this.boundingBox.right, this.labelModule.size.left + this.labelModule.size.width); + this.boundingBox.bottom = Math.max(this.boundingBox.bottom, this.boundingBox.bottom + this.labelOffset); + } + } + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {number} angle + * @returns {number} + */ + + }, { + key: "distanceToBorder", + value: function distanceToBorder(ctx, angle) { + return this._distanceToBorder(ctx, angle); + } + }]); + + return Image; +}(CircleImageBase); + +/** + * A Square Node/Cluster shape. + * + * @extends ShapeBase + */ + +var Square = +/*#__PURE__*/ +function (_ShapeBase) { + inherits$1(Square, _ShapeBase); + + /** + * @param {Object} options + * @param {Object} body + * @param {Label} labelModule + */ + function Square(options, body, labelModule) { + classCallCheck$1(this, Square); + + return possibleConstructorReturn$1(this, getPrototypeOf$1(Square).call(this, options, body, labelModule)); + } + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {number} x width + * @param {number} y height + * @param {boolean} selected + * @param {boolean} hover + * @param {ArrowOptions} values + */ + + + createClass$1(Square, [{ + key: "draw", + value: function draw(ctx, x, y, selected, hover, values) { + this._drawShape(ctx, 'square', 2, x, y, selected, hover, values); + } + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {number} angle + * @returns {number} + */ + + }, { + key: "distanceToBorder", + value: function distanceToBorder(ctx, angle) { + return this._distanceToBorder(ctx, angle); + } + }]); + + return Square; +}(ShapeBase); + +/** + * A Hexagon Node/Cluster shape. + * + * @extends ShapeBase + */ + +var Hexagon = +/*#__PURE__*/ +function (_ShapeBase) { + inherits$1(Hexagon, _ShapeBase); + + /** + * @param {Object} options + * @param {Object} body + * @param {Label} labelModule + */ + function Hexagon(options, body, labelModule) { + classCallCheck$1(this, Hexagon); + + return possibleConstructorReturn$1(this, getPrototypeOf$1(Hexagon).call(this, options, body, labelModule)); + } + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {number} x width + * @param {number} y height + * @param {boolean} selected + * @param {boolean} hover + * @param {ArrowOptions} values + */ + + + createClass$1(Hexagon, [{ + key: "draw", + value: function draw(ctx, x, y, selected, hover, values) { + this._drawShape(ctx, 'hexagon', 4, x, y, selected, hover, values); + } + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {number} angle + * @returns {number} + */ + + }, { + key: "distanceToBorder", + value: function distanceToBorder(ctx, angle) { + return this._distanceToBorder(ctx, angle); + } + }]); + + return Hexagon; +}(ShapeBase); + +/** + * A Star Node/Cluster shape. + * + * @extends ShapeBase + */ + +var Star = +/*#__PURE__*/ +function (_ShapeBase) { + inherits$1(Star, _ShapeBase); + + /** + * @param {Object} options + * @param {Object} body + * @param {Label} labelModule + */ + function Star(options, body, labelModule) { + classCallCheck$1(this, Star); + + return possibleConstructorReturn$1(this, getPrototypeOf$1(Star).call(this, options, body, labelModule)); + } + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {number} x width + * @param {number} y height + * @param {boolean} selected + * @param {boolean} hover + * @param {ArrowOptions} values + */ + + + createClass$1(Star, [{ + key: "draw", + value: function draw(ctx, x, y, selected, hover, values) { + this._drawShape(ctx, 'star', 4, x, y, selected, hover, values); + } + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {number} angle + * @returns {number} + */ + + }, { + key: "distanceToBorder", + value: function distanceToBorder(ctx, angle) { + return this._distanceToBorder(ctx, angle); + } + }]); + + return Star; +}(ShapeBase); + +/** + * A text-based replacement for the default Node shape. + * + * @extends NodeBase + */ + +var Text = +/*#__PURE__*/ +function (_NodeBase) { + inherits$1(Text, _NodeBase); + + /** + * @param {Object} options + * @param {Object} body + * @param {Label} labelModule + */ + function Text(options, body, labelModule) { + var _this; + + classCallCheck$1(this, Text); + + _this = possibleConstructorReturn$1(this, getPrototypeOf$1(Text).call(this, options, body, labelModule)); + + _this._setMargins(labelModule); + + return _this; + } + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {boolean} selected + * @param {boolean} hover + */ + + + createClass$1(Text, [{ + key: "resize", + value: function resize(ctx, selected, hover) { + if (this.needsRefresh(selected, hover)) { + this.textSize = this.labelModule.getTextSize(ctx, selected, hover); + this.width = this.textSize.width + this.margin.right + this.margin.left; + this.height = this.textSize.height + this.margin.top + this.margin.bottom; + this.radius = 0.5 * this.width; + } + } + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {number} x width + * @param {number} y height + * @param {boolean} selected + * @param {boolean} hover + * @param {ArrowOptions} values + */ + + }, { + key: "draw", + value: function draw(ctx, x, y, selected, hover, values) { + this.resize(ctx, selected, hover); + this.left = x - this.width / 2; + this.top = y - this.height / 2; // draw shadow if enabled + + this.enableShadow(ctx, values); + this.labelModule.draw(ctx, this.left + this.textSize.width / 2 + this.margin.left, this.top + this.textSize.height / 2 + this.margin.top, selected, hover); // disable shadows for other elements. + + this.disableShadow(ctx, values); + this.updateBoundingBox(x, y, ctx, selected, hover); + } + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {number} angle + * @returns {number} + */ + + }, { + key: "distanceToBorder", + value: function distanceToBorder(ctx, angle) { + return this._distanceToBorder(ctx, angle); + } + }]); + + return Text; +}(NodeBase); + +/** + * A Triangle Node/Cluster shape. + * + * @extends ShapeBase + */ + +var Triangle = +/*#__PURE__*/ +function (_ShapeBase) { + inherits$1(Triangle, _ShapeBase); + + /** + * @param {Object} options + * @param {Object} body + * @param {Label} labelModule + */ + function Triangle(options, body, labelModule) { + classCallCheck$1(this, Triangle); + + return possibleConstructorReturn$1(this, getPrototypeOf$1(Triangle).call(this, options, body, labelModule)); + } + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {number} x + * @param {number} y + * @param {boolean} selected + * @param {boolean} hover + * @param {ArrowOptions} values + */ + + + createClass$1(Triangle, [{ + key: "draw", + value: function draw(ctx, x, y, selected, hover, values) { + this._drawShape(ctx, 'triangle', 3, x, y, selected, hover, values); + } + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {number} angle + * @returns {number} + */ + + }, { + key: "distanceToBorder", + value: function distanceToBorder(ctx, angle) { + return this._distanceToBorder(ctx, angle); + } + }]); + + return Triangle; +}(ShapeBase); + +/** + * A downward facing Triangle Node/Cluster shape. + * + * @extends ShapeBase + */ + +var TriangleDown = +/*#__PURE__*/ +function (_ShapeBase) { + inherits$1(TriangleDown, _ShapeBase); + + /** + * @param {Object} options + * @param {Object} body + * @param {Label} labelModule + */ + function TriangleDown(options, body, labelModule) { + classCallCheck$1(this, TriangleDown); + + return possibleConstructorReturn$1(this, getPrototypeOf$1(TriangleDown).call(this, options, body, labelModule)); + } + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {number} x + * @param {number} y + * @param {boolean} selected + * @param {boolean} hover + * @param {ArrowOptions} values + */ + + + createClass$1(TriangleDown, [{ + key: "draw", + value: function draw(ctx, x, y, selected, hover, values) { + this._drawShape(ctx, 'triangleDown', 3, x, y, selected, hover, values); + } + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {number} angle + * @returns {number} + */ + + }, { + key: "distanceToBorder", + value: function distanceToBorder(ctx, angle) { + return this._distanceToBorder(ctx, angle); + } + }]); + + return TriangleDown; +}(ShapeBase); + +var errorFound = false; +var allOptions; +var printStyle = 'background: #FFeeee; color: #dd0000'; +/** + * Used to validate options. + */ + +var Validator = +/*#__PURE__*/ +function () { + /** + * @ignore + */ + function Validator() { + classCallCheck$1(this, Validator); + } + /** + * Main function to be called + * @param {Object} options + * @param {Object} referenceOptions + * @param {Object} subObject + * @returns {boolean} + * @static + */ + + + createClass$1(Validator, null, [{ + key: "validate", + value: function validate(options, referenceOptions, subObject) { + errorFound = false; + allOptions = referenceOptions; + var usedOptions = referenceOptions; + + if (subObject !== undefined) { + usedOptions = referenceOptions[subObject]; + } + + Validator.parse(options, usedOptions, []); + return errorFound; + } + /** + * Will traverse an object recursively and check every value + * @param {Object} options + * @param {Object} referenceOptions + * @param {array} path | where to look for the actual option + * @static + */ + + }, { + key: "parse", + value: function parse(options, referenceOptions, path) { + for (var option in options) { + if (options.hasOwnProperty(option)) { + Validator.check(option, options, referenceOptions, path); + } + } + } + /** + * Check every value. If the value is an object, call the parse function on that object. + * @param {string} option + * @param {Object} options + * @param {Object} referenceOptions + * @param {array} path | where to look for the actual option + * @static + */ + + }, { + key: "check", + value: function check(option, options, referenceOptions, path) { + if (referenceOptions[option] === undefined && referenceOptions.__any__ === undefined) { + Validator.getSuggestion(option, referenceOptions, path); + return; + } + + var referenceOption = option; + var is_object = true; + + if (referenceOptions[option] === undefined && referenceOptions.__any__ !== undefined) { + // NOTE: This only triggers if the __any__ is in the top level of the options object. + // THAT'S A REALLY BAD PLACE TO ALLOW IT!!!! + // TODO: Examine if needed, remove if possible + // __any__ is a wildcard. Any value is accepted and will be further analysed by reference. + referenceOption = '__any__'; // if the any-subgroup is not a predefined object in the configurator, + // we do not look deeper into the object. + + is_object = Validator.getType(options[option]) === 'object'; + } + + var refOptionObj = referenceOptions[referenceOption]; + + if (is_object && refOptionObj.__type__ !== undefined) { + refOptionObj = refOptionObj.__type__; + } + + Validator.checkFields(option, options, referenceOptions, referenceOption, refOptionObj, path); + } + /** + * + * @param {string} option | the option property + * @param {Object} options | The supplied options object + * @param {Object} referenceOptions | The reference options containing all options and their allowed formats + * @param {string} referenceOption | Usually this is the same as option, except when handling an __any__ tag. + * @param {string} refOptionObj | This is the type object from the reference options + * @param {Array} path | where in the object is the option + * @static + */ + + }, { + key: "checkFields", + value: function checkFields(option, options, referenceOptions, referenceOption, refOptionObj, path) { + var log = function log(message) { + console.log('%c' + message + Validator.printLocation(path, option), printStyle); + }; + + var optionType = Validator.getType(options[option]); + var refOptionType = refOptionObj[optionType]; + + if (refOptionType !== undefined) { + // if the type is correct, we check if it is supposed to be one of a few select values + if (Validator.getType(refOptionType) === 'array' && refOptionType.indexOf(options[option]) === -1) { + log('Invalid option detected in "' + option + '".' + ' Allowed values are:' + Validator.print(refOptionType) + ' not "' + options[option] + '". '); + errorFound = true; + } else if (optionType === 'object' && referenceOption !== "__any__") { + path = util.copyAndExtendArray(path, option); + Validator.parse(options[option], referenceOptions[referenceOption], path); + } + } else if (refOptionObj['any'] === undefined) { + // type of the field is incorrect and the field cannot be any + log('Invalid type received for "' + option + '". Expected: ' + Validator.print(Object.keys(refOptionObj)) + '. Received [' + optionType + '] "' + options[option] + '"'); + errorFound = true; + } + } + /** + * + * @param {Object|boolean|number|string|Array.|Date|Node|Moment|undefined|null} object + * @returns {string} + * @static + */ + + }, { + key: "getType", + value: function getType(object) { + var type = _typeof_1$1(object); + + if (type === 'object') { + if (object === null) { + return 'null'; + } + + if (object instanceof Boolean) { + return 'boolean'; + } + + if (object instanceof Number) { + return 'number'; + } + + if (object instanceof String) { + return 'string'; + } + + if (Array.isArray(object)) { + return 'array'; + } + + if (object instanceof Date) { + return 'date'; + } + + if (object.nodeType !== undefined) { + return 'dom'; + } + + if (object._isAMomentObject === true) { + return 'moment'; + } + + return 'object'; + } else if (type === 'number') { + return 'number'; + } else if (type === 'boolean') { + return 'boolean'; + } else if (type === 'string') { + return 'string'; + } else if (type === undefined) { + return 'undefined'; + } + + return type; + } + /** + * @param {string} option + * @param {Object} options + * @param {Array.} path + * @static + */ + + }, { + key: "getSuggestion", + value: function getSuggestion(option, options, path) { + var localSearch = Validator.findInOptions(option, options, path, false); + var globalSearch = Validator.findInOptions(option, allOptions, [], true); + var localSearchThreshold = 8; + var globalSearchThreshold = 4; + var msg; + + if (localSearch.indexMatch !== undefined) { + msg = ' in ' + Validator.printLocation(localSearch.path, option, '') + 'Perhaps it was incomplete? Did you mean: "' + localSearch.indexMatch + '"?\n\n'; + } else if (globalSearch.distance <= globalSearchThreshold && localSearch.distance > globalSearch.distance) { + msg = ' in ' + Validator.printLocation(localSearch.path, option, '') + 'Perhaps it was misplaced? Matching option found at: ' + Validator.printLocation(globalSearch.path, globalSearch.closestMatch, ''); + } else if (localSearch.distance <= localSearchThreshold) { + msg = '. Did you mean "' + localSearch.closestMatch + '"?' + Validator.printLocation(localSearch.path, option); + } else { + msg = '. Did you mean one of these: ' + Validator.print(Object.keys(options)) + Validator.printLocation(path, option); + } + + console.log('%cUnknown option detected: "' + option + '"' + msg, printStyle); + errorFound = true; + } + /** + * traverse the options in search for a match. + * @param {string} option + * @param {Object} options + * @param {Array} path | where to look for the actual option + * @param {boolean} [recursive=false] + * @returns {{closestMatch: string, path: Array, distance: number}} + * @static + */ + + }, { + key: "findInOptions", + value: function findInOptions(option, options, path) { + var recursive = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false; + var min = 1e9; + var closestMatch = ''; + var closestMatchPath = []; + var lowerCaseOption = option.toLowerCase(); + var indexMatch = undefined; + + for (var op in options) { + // eslint-disable-line guard-for-in + var distance = void 0; + + if (options[op].__type__ !== undefined && recursive === true) { + var result = Validator.findInOptions(option, options[op], util.copyAndExtendArray(path, op)); + + if (min > result.distance) { + closestMatch = result.closestMatch; + closestMatchPath = result.path; + min = result.distance; + indexMatch = result.indexMatch; + } + } else { + if (op.toLowerCase().indexOf(lowerCaseOption) !== -1) { + indexMatch = op; + } + + distance = Validator.levenshteinDistance(option, op); + + if (min > distance) { + closestMatch = op; + closestMatchPath = util.copyArray(path); + min = distance; + } + } + } + + return { + closestMatch: closestMatch, + path: closestMatchPath, + distance: min, + indexMatch: indexMatch + }; + } + /** + * @param {Array.} path + * @param {Object} option + * @param {string} prefix + * @returns {String} + * @static + */ + + }, { + key: "printLocation", + value: function printLocation(path, option) { + var prefix = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'Problem value found at: \n'; + var str = '\n\n' + prefix + 'options = {\n'; + + for (var i = 0; i < path.length; i++) { + for (var j = 0; j < i + 1; j++) { + str += ' '; + } + + str += path[i] + ': {\n'; + } + + for (var _j = 0; _j < path.length + 1; _j++) { + str += ' '; + } + + str += option + '\n'; + + for (var _i = 0; _i < path.length + 1; _i++) { + for (var _j2 = 0; _j2 < path.length - _i; _j2++) { + str += ' '; + } + + str += '}\n'; + } + + return str + '\n\n'; + } + /** + * @param {Object} options + * @returns {String} + * @static + */ + + }, { + key: "print", + value: function print(options) { + return JSON.stringify(options).replace(/(\")|(\[)|(\])|(,"__type__")/g, "").replace(/(\,)/g, ', '); + } + /** + * Compute the edit distance between the two given strings + * http://en.wikibooks.org/wiki/Algorithm_Implementation/Strings/Levenshtein_distance#JavaScript + * + * Copyright (c) 2011 Andrei Mackenzie + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + * @param {string} a + * @param {string} b + * @returns {Array.>}} + * @static + */ + + }, { + key: "levenshteinDistance", + value: function levenshteinDistance(a, b) { + if (a.length === 0) return b.length; + if (b.length === 0) return a.length; + var matrix = []; // increment along the first column of each row + + var i; + + for (i = 0; i <= b.length; i++) { + matrix[i] = [i]; + } // increment each column in the first row + + + var j; + + for (j = 0; j <= a.length; j++) { + matrix[0][j] = j; + } // Fill in the rest of the matrix + + + for (i = 1; i <= b.length; i++) { + for (j = 1; j <= a.length; j++) { + if (b.charAt(i - 1) == a.charAt(j - 1)) { + matrix[i][j] = matrix[i - 1][j - 1]; + } else { + matrix[i][j] = Math.min(matrix[i - 1][j - 1] + 1, // substitution + Math.min(matrix[i][j - 1] + 1, // insertion + matrix[i - 1][j] + 1)); // deletion + } + } + } + + return matrix[b.length][a.length]; + } + }]); + + return Validator; +}(); + +/** + * A node. A node can be connected to other nodes via one or multiple edges. + */ + +var Node = +/*#__PURE__*/ +function () { + /** + * + * @param {object} options An object containing options for the node. All + * options are optional, except for the id. + * {number} id Id of the node. Required + * {string} label Text label for the node + * {number} x Horizontal position of the node + * {number} y Vertical position of the node + * {string} shape Node shape + * {string} image An image url + * {string} title A title text, can be HTML + * {anytype} group A group name or number + * + * @param {Object} body Shared state of current network instance + * @param {Network.Images} imagelist A list with images. Only needed when the node has an image + * @param {Groups} grouplist A list with groups. Needed for retrieving group options + * @param {Object} globalOptions Current global node options; these serve as defaults for the node instance + * @param {Object} defaultOptions Global default options for nodes; note that this is also the prototype + * for parameter `globalOptions`. + */ + function Node(options, body, imagelist, grouplist, globalOptions, defaultOptions) { + classCallCheck$1(this, Node); + + this.options = util.bridgeObject(globalOptions); + this.globalOptions = globalOptions; + this.defaultOptions = defaultOptions; + this.body = body; + this.edges = []; // all edges connected to this node + // set defaults for the options + + this.id = undefined; + this.imagelist = imagelist; + this.grouplist = grouplist; // state options + + this.x = undefined; + this.y = undefined; + this.baseSize = this.options.size; + this.baseFontSize = this.options.font.size; + this.predefinedPosition = false; // used to check if initial fit should just take the range or approximate + + this.selected = false; + this.hover = false; + this.labelModule = new Label(this.body, this.options, false + /* Not edge label */ + ); + this.setOptions(options); + } + /** + * Attach a edge to the node + * @param {Edge} edge + */ + + + createClass$1(Node, [{ + key: "attachEdge", + value: function attachEdge(edge) { + if (this.edges.indexOf(edge) === -1) { + this.edges.push(edge); + } + } + /** + * Detach a edge from the node + * + * @param {Edge} edge + */ + + }, { + key: "detachEdge", + value: function detachEdge(edge) { + var index = this.edges.indexOf(edge); + + if (index != -1) { + this.edges.splice(index, 1); + } + } + /** + * Set or overwrite options for the node + * + * @param {Object} options an object with options + * @returns {null|boolean} + */ + + }, { + key: "setOptions", + value: function setOptions(options) { + var currentShape = this.options.shape; + + if (!options) { + return; // Note that the return value will be 'undefined'! This is OK. + } // basic options + + + if (options.id !== undefined) { + this.id = options.id; + } + + if (this.id === undefined) { + throw new Error("Node must have an id"); + } + + Node.checkMass(options, this.id); // set these options locally + // clear x and y positions + + if (options.x !== undefined) { + if (options.x === null) { + this.x = undefined; + this.predefinedPosition = false; + } else { + this.x = parseInt(options.x); + this.predefinedPosition = true; + } + } + + if (options.y !== undefined) { + if (options.y === null) { + this.y = undefined; + this.predefinedPosition = false; + } else { + this.y = parseInt(options.y); + this.predefinedPosition = true; + } + } + + if (options.size !== undefined) { + this.baseSize = options.size; + } + + if (options.value !== undefined) { + options.value = parseFloat(options.value); + } // this transforms all shorthands into fully defined options + + + Node.parseOptions(this.options, options, true, this.globalOptions, this.grouplist); + var pile = [options, this.options, this.defaultOptions]; + this.chooser = ComponentUtil.choosify('node', pile); + + this._load_images(); + + this.updateLabelModule(options); + this.updateShape(currentShape); + return options.hidden !== undefined || options.physics !== undefined; + } + /** + * Load the images from the options, for the nodes that need them. + * + * Images are always loaded, even if they are not used in the current shape. + * The user may switch to an image shape later on. + * + * @private + */ + + }, { + key: "_load_images", + value: function _load_images() { + if (this.options.shape === 'circularImage' || this.options.shape === 'image') { + if (this.options.image === undefined) { + throw new Error("Option image must be defined for node type '" + this.options.shape + "'"); + } + } + + if (this.options.image === undefined) { + return; + } + + if (this.imagelist === undefined) { + throw new Error("Internal Error: No images provided"); + } + + if (typeof this.options.image === 'string') { + this.imageObj = this.imagelist.load(this.options.image, this.options.brokenImage, this.id); + } else { + if (this.options.image.unselected === undefined) { + throw new Error("No unselected image provided"); + } + + this.imageObj = this.imagelist.load(this.options.image.unselected, this.options.brokenImage, this.id); + + if (this.options.image.selected !== undefined) { + this.imageObjAlt = this.imagelist.load(this.options.image.selected, this.options.brokenImage, this.id); + } else { + this.imageObjAlt = undefined; + } + } + } + /** + * Copy group option values into the node options. + * + * The group options override the global node options, so the copy of group options + * must happen *after* the global node options have been set. + * + * This method must also be called also if the global node options have changed and the group options did not. + * + * @param {Object} parentOptions + * @param {Object} newOptions new values for the options, currently only passed in for check + * @param {Object} groupList + */ + + }, { + key: "getFormattingValues", + + /** + * + * @returns {{color: *, borderWidth: *, borderColor: *, size: *, borderDashes: (boolean|Array|allOptions.nodes.shapeProperties.borderDashes|{boolean, array}), borderRadius: (number|allOptions.nodes.shapeProperties.borderRadius|{number}|Array), shadow: *, shadowColor: *, shadowSize: *, shadowX: *, shadowY: *}} + */ + value: function getFormattingValues() { + var values = { + color: this.options.color.background, + borderWidth: this.options.borderWidth, + borderColor: this.options.color.border, + size: this.options.size, + borderDashes: this.options.shapeProperties.borderDashes, + borderRadius: this.options.shapeProperties.borderRadius, + shadow: this.options.shadow.enabled, + shadowColor: this.options.shadow.color, + shadowSize: this.options.shadow.size, + shadowX: this.options.shadow.x, + shadowY: this.options.shadow.y + }; + + if (this.selected || this.hover) { + if (this.chooser === true) { + if (this.selected) { + values.borderWidth *= 2; + values.color = this.options.color.highlight.background; + values.borderColor = this.options.color.highlight.border; + values.shadow = this.options.shadow.enabled; + } else if (this.hover) { + values.color = this.options.color.hover.background; + values.borderColor = this.options.color.hover.border; + values.shadow = this.options.shadow.enabled; + } + } else if (typeof this.chooser === 'function') { + this.chooser(values, this.options.id, this.selected, this.hover); + + if (values.shadow === false) { + if (values.shadowColor !== this.options.shadow.color || values.shadowSize !== this.options.shadow.size || values.shadowX !== this.options.shadow.x || values.shadowY !== this.options.shadow.y) { + values.shadow = true; + } + } + } + } else { + values.shadow = this.options.shadow.enabled; + } + + return values; + } + /** + * + * @param {Object} options + */ + + }, { + key: "updateLabelModule", + value: function updateLabelModule(options) { + if (this.options.label === undefined || this.options.label === null) { + this.options.label = ''; + } + + Node.updateGroupOptions(this.options, options, this.grouplist); // + // Note:The prototype chain for this.options is: + // + // this.options -> NodesHandler.options -> NodesHandler.defaultOptions + // (also: this.globalOptions) + // + // Note that the prototypes are mentioned explicitly in the pile list below; + // WE DON'T WANT THE ORDER OF THE PROTOTYPES!!!! At least, not for font handling of labels. + // This is a good indication that the prototype usage of options is deficient. + // + + var currentGroup = this.grouplist.get(this.options.group, false); + var pile = [options, // new options + this.options, // current node options, see comment above for prototype + currentGroup, // group options, if any + this.globalOptions, // Currently set global node options + this.defaultOptions // Default global node options + ]; + this.labelModule.update(this.options, pile); + + if (this.labelModule.baseSize !== undefined) { + this.baseFontSize = this.labelModule.baseSize; + } + } + /** + * + * @param {string} currentShape + */ + + }, { + key: "updateShape", + value: function updateShape(currentShape) { + if (currentShape === this.options.shape && this.shape) { + this.shape.setOptions(this.options, this.imageObj, this.imageObjAlt); + } else { + // choose draw method depending on the shape + switch (this.options.shape) { + case 'box': + this.shape = new Box(this.options, this.body, this.labelModule); + break; + + case 'circle': + this.shape = new Circle(this.options, this.body, this.labelModule); + break; + + case 'circularImage': + this.shape = new CircularImage(this.options, this.body, this.labelModule, this.imageObj, this.imageObjAlt); + break; + + case 'database': + this.shape = new Database(this.options, this.body, this.labelModule); + break; + + case 'diamond': + this.shape = new Diamond(this.options, this.body, this.labelModule); + break; + + case 'dot': + this.shape = new Dot(this.options, this.body, this.labelModule); + break; + + case 'ellipse': + this.shape = new Ellipse(this.options, this.body, this.labelModule); + break; + + case 'icon': + this.shape = new Icon(this.options, this.body, this.labelModule); + break; + + case 'image': + this.shape = new Image$1(this.options, this.body, this.labelModule, this.imageObj, this.imageObjAlt); + break; + + case 'square': + this.shape = new Square(this.options, this.body, this.labelModule); + break; + + case 'hexagon': + this.shape = new Hexagon(this.options, this.body, this.labelModule); + break; + + case 'star': + this.shape = new Star(this.options, this.body, this.labelModule); + break; + + case 'text': + this.shape = new Text(this.options, this.body, this.labelModule); + break; + + case 'triangle': + this.shape = new Triangle(this.options, this.body, this.labelModule); + break; + + case 'triangleDown': + this.shape = new TriangleDown(this.options, this.body, this.labelModule); + break; + + default: + this.shape = new Ellipse(this.options, this.body, this.labelModule); + break; + } + } + + this.needsRefresh(); + } + /** + * select this node + */ + + }, { + key: "select", + value: function select() { + this.selected = true; + this.needsRefresh(); + } + /** + * unselect this node + */ + + }, { + key: "unselect", + value: function unselect() { + this.selected = false; + this.needsRefresh(); + } + /** + * Reset the calculated size of the node, forces it to recalculate its size + */ + + }, { + key: "needsRefresh", + value: function needsRefresh() { + this.shape.refreshNeeded = true; + } + /** + * get the title of this node. + * @return {string} title The title of the node, or undefined when no title + * has been set. + */ + + }, { + key: "getTitle", + value: function getTitle() { + return this.options.title; + } + /** + * Calculate the distance to the border of the Node + * @param {CanvasRenderingContext2D} ctx + * @param {number} angle Angle in radians + * @returns {number} distance Distance to the border in pixels + */ + + }, { + key: "distanceToBorder", + value: function distanceToBorder(ctx, angle) { + return this.shape.distanceToBorder(ctx, angle); + } + /** + * Check if this node has a fixed x and y position + * @return {boolean} true if fixed, false if not + */ + + }, { + key: "isFixed", + value: function isFixed() { + return this.options.fixed.x && this.options.fixed.y; + } + /** + * check if this node is selecte + * @return {boolean} selected True if node is selected, else false + */ + + }, { + key: "isSelected", + value: function isSelected() { + return this.selected; + } + /** + * Retrieve the value of the node. Can be undefined + * @return {number} value + */ + + }, { + key: "getValue", + value: function getValue() { + return this.options.value; + } + /** + * Get the current dimensions of the label + * + * @return {rect} + */ + + }, { + key: "getLabelSize", + value: function getLabelSize() { + return this.labelModule.size(); + } + /** + * Adjust the value range of the node. The node will adjust it's size + * based on its value. + * @param {number} min + * @param {number} max + * @param {number} total + */ + + }, { + key: "setValueRange", + value: function setValueRange(min, max, total) { + if (this.options.value !== undefined) { + var scale = this.options.scaling.customScalingFunction(min, max, total, this.options.value); + var sizeDiff = this.options.scaling.max - this.options.scaling.min; + + if (this.options.scaling.label.enabled === true) { + var fontDiff = this.options.scaling.label.max - this.options.scaling.label.min; + this.options.font.size = this.options.scaling.label.min + scale * fontDiff; + } + + this.options.size = this.options.scaling.min + scale * sizeDiff; + } else { + this.options.size = this.baseSize; + this.options.font.size = this.baseFontSize; + } + + this.updateLabelModule(); + } + /** + * Draw this node in the given canvas + * The 2d context of a HTML canvas can be retrieved by canvas.getContext("2d"); + * @param {CanvasRenderingContext2D} ctx + */ + + }, { + key: "draw", + value: function draw(ctx) { + var values = this.getFormattingValues(); + this.shape.draw(ctx, this.x, this.y, this.selected, this.hover, values); + } + /** + * Update the bounding box of the shape + * @param {CanvasRenderingContext2D} ctx + */ + + }, { + key: "updateBoundingBox", + value: function updateBoundingBox(ctx) { + this.shape.updateBoundingBox(this.x, this.y, ctx); + } + /** + * Recalculate the size of this node in the given canvas + * The 2d context of a HTML canvas can be retrieved by canvas.getContext("2d"); + * @param {CanvasRenderingContext2D} ctx + */ + + }, { + key: "resize", + value: function resize(ctx) { + var values = this.getFormattingValues(); + this.shape.resize(ctx, this.selected, this.hover, values); + } + /** + * Determine all visual elements of this node instance, in which the given + * point falls within the bounding shape. + * + * @param {point} point + * @returns {Array.} list with the items which are on the point + */ + + }, { + key: "getItemsOnPoint", + value: function getItemsOnPoint(point) { + var ret = []; + + if (this.labelModule.visible()) { + if (ComponentUtil.pointInRect(this.labelModule.getSize(), point)) { + ret.push({ + nodeId: this.id, + labelId: 0 + }); + } + } + + if (ComponentUtil.pointInRect(this.shape.boundingBox, point)) { + ret.push({ + nodeId: this.id + }); + } + + return ret; + } + /** + * Check if this object is overlapping with the provided object + * @param {Object} obj an object with parameters left, top, right, bottom + * @return {boolean} True if location is located on node + */ + + }, { + key: "isOverlappingWith", + value: function isOverlappingWith(obj) { + return this.shape.left < obj.right && this.shape.left + this.shape.width > obj.left && this.shape.top < obj.bottom && this.shape.top + this.shape.height > obj.top; + } + /** + * Check if this object is overlapping with the provided object + * @param {Object} obj an object with parameters left, top, right, bottom + * @return {boolean} True if location is located on node + */ + + }, { + key: "isBoundingBoxOverlappingWith", + value: function isBoundingBoxOverlappingWith(obj) { + return this.shape.boundingBox.left < obj.right && this.shape.boundingBox.right > obj.left && this.shape.boundingBox.top < obj.bottom && this.shape.boundingBox.bottom > obj.top; + } + /** + * Check valid values for mass + * + * The mass may not be negative or zero. If it is, reset to 1 + * + * @param {object} options + * @param {Node.id} id + * @static + */ + + }], [{ + key: "updateGroupOptions", + value: function updateGroupOptions(parentOptions, newOptions, groupList) { + if (groupList === undefined) return; // No groups, nothing to do + + var group = parentOptions.group; // paranoia: the selected group is already merged into node options, check. + + if (newOptions !== undefined && newOptions.group !== undefined && group !== newOptions.group) { + throw new Error("updateGroupOptions: group values in options don't match."); + } + + var hasGroup = typeof group === 'number' || typeof group === 'string' && group != ''; + if (!hasGroup) return; // current node has no group, no need to merge + + var groupObj = groupList.get(group); // Skip merging of group font options into parent; these are required to be distinct for labels + // Also skip mergin of color IF it is already defined in the node itself. This is to avoid the color of the + // group overriding the color set at the node level + // TODO: It might not be a good idea either to merge the rest of the options, investigate this. + + var skipProperties = ['font']; + if (newOptions !== undefined && newOptions.color !== undefined && newOptions.color != null) skipProperties.push('color'); + util.selectiveNotDeepExtend(skipProperties, parentOptions, groupObj); // the color object needs to be completely defined. + // Since groups can partially overwrite the colors, we parse it again, just in case. + + parentOptions.color = util.parseColor(parentOptions.color); + } + /** + * This process all possible shorthands in the new options and makes sure that the parentOptions are fully defined. + * Static so it can also be used by the handler. + * + * @param {Object} parentOptions + * @param {Object} newOptions + * @param {boolean} [allowDeletion=false] + * @param {Object} [globalOptions={}] + * @param {Object} [groupList] + * @static + */ + + }, { + key: "parseOptions", + value: function parseOptions(parentOptions, newOptions) { + var allowDeletion = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; + var globalOptions = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {}; + var groupList = arguments.length > 4 ? arguments[4] : undefined; + var fields = ['color', 'fixed', 'shadow']; + util.selectiveNotDeepExtend(fields, parentOptions, newOptions, allowDeletion); + Node.checkMass(newOptions); // merge the shadow options into the parent. + + util.mergeOptions(parentOptions, newOptions, 'shadow', globalOptions); // individual shape newOptions + + if (newOptions.color !== undefined && newOptions.color !== null) { + var parsedColor = util.parseColor(newOptions.color); + util.fillIfDefined(parentOptions.color, parsedColor); + } else if (allowDeletion === true && newOptions.color === null) { + parentOptions.color = util.bridgeObject(globalOptions.color); // set the object back to the global options + } // handle the fixed options + + + if (newOptions.fixed !== undefined && newOptions.fixed !== null) { + if (typeof newOptions.fixed === 'boolean') { + parentOptions.fixed.x = newOptions.fixed; + parentOptions.fixed.y = newOptions.fixed; + } else { + if (newOptions.fixed.x !== undefined && typeof newOptions.fixed.x === 'boolean') { + parentOptions.fixed.x = newOptions.fixed.x; + } + + if (newOptions.fixed.y !== undefined && typeof newOptions.fixed.y === 'boolean') { + parentOptions.fixed.y = newOptions.fixed.y; + } + } + } + + if (allowDeletion === true && newOptions.font === null) { + parentOptions.font = util.bridgeObject(globalOptions.font); // set the object back to the global options + } + + Node.updateGroupOptions(parentOptions, newOptions, groupList); // handle the scaling options, specifically the label part + + if (newOptions.scaling !== undefined) { + util.mergeOptions(parentOptions.scaling, newOptions.scaling, 'label', globalOptions.scaling); + } + } + }, { + key: "checkMass", + value: function checkMass(options, id) { + if (options.mass !== undefined && options.mass <= 0) { + var strId = ''; + + if (id !== undefined) { + strId = ' in node id: ' + id; + } + + console.log('%cNegative or zero mass disallowed' + strId + ', setting mass to 1.', printStyle); + options.mass = 1; + } + } + }]); + + return Node; +}(); + +/** + * Handler for Nodes + */ + +var NodesHandler = +/*#__PURE__*/ +function () { + /** + * @param {Object} body + * @param {Images} images + * @param {Array.} groups + * @param {LayoutEngine} layoutEngine + */ + function NodesHandler(body, images, groups, layoutEngine) { + var _this = this; + + classCallCheck$1(this, NodesHandler); + + this.body = body; + this.images = images; + this.groups = groups; + this.layoutEngine = layoutEngine; // create the node API in the body container + + this.body.functions.createNode = this.create.bind(this); + this.nodesListeners = { + add: function add(event, params) { + _this.add(params.items); + }, + update: function update(event, params) { + _this.update(params.items, params.data, params.oldData); + }, + remove: function remove(event, params) { + _this.remove(params.items); + } + }; + this.defaultOptions = { + borderWidth: 1, + borderWidthSelected: 2, + brokenImage: undefined, + color: { + border: '#2B7CE9', + background: '#97C2FC', + highlight: { + border: '#2B7CE9', + background: '#D2E5FF' + }, + hover: { + border: '#2B7CE9', + background: '#D2E5FF' + } + }, + fixed: { + x: false, + y: false + }, + font: { + color: '#343434', + size: 14, + // px + face: 'arial', + background: 'none', + strokeWidth: 0, + // px + strokeColor: '#ffffff', + align: 'center', + vadjust: 0, + multi: false, + bold: { + mod: 'bold' + }, + boldital: { + mod: 'bold italic' + }, + ital: { + mod: 'italic' + }, + mono: { + mod: '', + size: 15, + // px + face: 'monospace', + vadjust: 2 + } + }, + group: undefined, + hidden: false, + icon: { + face: 'FontAwesome', + //'FontAwesome', + code: undefined, + //'\uf007', + size: 50, + //50, + color: '#2B7CE9' //'#aa00ff' + + }, + image: undefined, + // --> URL + label: undefined, + labelHighlightBold: true, + level: undefined, + margin: { + top: 5, + right: 5, + bottom: 5, + left: 5 + }, + mass: 1, + physics: true, + scaling: { + min: 10, + max: 30, + label: { + enabled: false, + min: 14, + max: 30, + maxVisible: 30, + drawThreshold: 5 + }, + customScalingFunction: function customScalingFunction(min, max, total, value) { + if (max === min) { + return 0.5; + } else { + var scale = 1 / (max - min); + return Math.max(0, (value - min) * scale); + } + } + }, + shadow: { + enabled: false, + color: 'rgba(0,0,0,0.5)', + size: 10, + x: 5, + y: 5 + }, + shape: 'ellipse', + shapeProperties: { + borderDashes: false, + // only for borders + borderRadius: 6, + // only for box shape + interpolation: true, + // only for image and circularImage shapes + useImageSize: false, + // only for image and circularImage shapes + useBorderWithImage: false // only for image shape + + }, + size: 25, + title: undefined, + value: undefined, + x: undefined, + y: undefined + }; // Protect from idiocy + + if (this.defaultOptions.mass <= 0) { + throw 'Internal error: mass in defaultOptions of NodesHandler may not be zero or negative'; + } + + this.options = util.bridgeObject(this.defaultOptions); + this.bindEventListeners(); + } + /** + * Binds event listeners + */ + + + createClass$1(NodesHandler, [{ + key: "bindEventListeners", + value: function bindEventListeners() { + var _this2 = this; + + // refresh the nodes. Used when reverting from hierarchical layout + this.body.emitter.on('refreshNodes', this.refresh.bind(this)); + this.body.emitter.on('refresh', this.refresh.bind(this)); + this.body.emitter.on('destroy', function () { + util.forEach(_this2.nodesListeners, function (callback, event) { + if (_this2.body.data.nodes) _this2.body.data.nodes.off(event, callback); + }); + delete _this2.body.functions.createNode; + delete _this2.nodesListeners.add; + delete _this2.nodesListeners.update; + delete _this2.nodesListeners.remove; + delete _this2.nodesListeners; + }); + } + /** + * + * @param {Object} options + */ + + }, { + key: "setOptions", + value: function setOptions(options) { + if (options !== undefined) { + Node.parseOptions(this.options, options); // update the shape in all nodes + + if (options.shape !== undefined) { + for (var nodeId in this.body.nodes) { + if (this.body.nodes.hasOwnProperty(nodeId)) { + this.body.nodes[nodeId].updateShape(); + } + } + } // update the font in all nodes + + + if (options.font !== undefined) { + for (var _nodeId in this.body.nodes) { + if (this.body.nodes.hasOwnProperty(_nodeId)) { + this.body.nodes[_nodeId].updateLabelModule(); + + this.body.nodes[_nodeId].needsRefresh(); + } + } + } // update the shape size in all nodes + + + if (options.size !== undefined) { + for (var _nodeId2 in this.body.nodes) { + if (this.body.nodes.hasOwnProperty(_nodeId2)) { + this.body.nodes[_nodeId2].needsRefresh(); + } + } + } // update the state of the variables if needed + + + if (options.hidden !== undefined || options.physics !== undefined) { + this.body.emitter.emit('_dataChanged'); + } + } + } + /** + * Set a data set with nodes for the network + * @param {Array | DataSet | DataView} nodes The data containing the nodes. + * @param {boolean} [doNotEmit=false] + * @private + */ + + }, { + key: "setData", + value: function setData(nodes) { + var doNotEmit = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; + var oldNodesData = this.body.data.nodes; + + if (nodes instanceof DataSet || nodes instanceof DataView) { + this.body.data.nodes = nodes; + } else if (Array.isArray(nodes)) { + this.body.data.nodes = new DataSet(); + this.body.data.nodes.add(nodes); + } else if (!nodes) { + this.body.data.nodes = new DataSet(); + } else { + throw new TypeError('Array or DataSet expected'); + } + + if (oldNodesData) { + // unsubscribe from old dataset + util.forEach(this.nodesListeners, function (callback, event) { + oldNodesData.off(event, callback); + }); + } // remove drawn nodes + + + this.body.nodes = {}; + + if (this.body.data.nodes) { + // subscribe to new dataset + var me = this; + util.forEach(this.nodesListeners, function (callback, event) { + me.body.data.nodes.on(event, callback); + }); // draw all new nodes + + var ids = this.body.data.nodes.getIds(); + this.add(ids, true); + } + + if (doNotEmit === false) { + this.body.emitter.emit("_dataChanged"); + } + } + /** + * Add nodes + * @param {number[] | string[]} ids + * @param {boolean} [doNotEmit=false] + * @private + */ + + }, { + key: "add", + value: function add(ids) { + var doNotEmit = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; + var id; + var newNodes = []; + + for (var i = 0; i < ids.length; i++) { + id = ids[i]; + var properties = this.body.data.nodes.get(id); + var node = this.create(properties); + newNodes.push(node); + this.body.nodes[id] = node; // note: this may replace an existing node + } + + this.layoutEngine.positionInitially(newNodes); + + if (doNotEmit === false) { + this.body.emitter.emit("_dataChanged"); + } + } + /** + * Update existing nodes, or create them when not yet existing + * @param {number[] | string[]} ids id's of changed nodes + * @param {Array} changedData array with changed data + * @param {Array|undefined} oldData optional; array with previous data + * @private + */ + + }, { + key: "update", + value: function update(ids, changedData, oldData) { + var nodes = this.body.nodes; + var dataChanged = false; + + for (var i = 0; i < ids.length; i++) { + var id = ids[i]; + var node = nodes[id]; + var data = changedData[i]; + + if (node !== undefined) { + // update node + if (node.setOptions(data)) { + dataChanged = true; + } + } else { + dataChanged = true; // create node + + node = this.create(data); + nodes[id] = node; + } + } + + if (!dataChanged && oldData !== undefined) { + // Check for any changes which should trigger a layout recalculation + // For now, this is just 'level' for hierarchical layout + // Assumption: old and new data arranged in same order; at time of writing, this holds. + dataChanged = changedData.some(function (newValue, index) { + var oldValue = oldData[index]; + return oldValue && oldValue.level !== newValue.level; + }); + } + + if (dataChanged === true) { + this.body.emitter.emit("_dataChanged"); + } else { + this.body.emitter.emit("_dataUpdated"); + } + } + /** + * Remove existing nodes. If nodes do not exist, the method will just ignore it. + * @param {number[] | string[]} ids + * @private + */ + + }, { + key: "remove", + value: function remove(ids) { + var nodes = this.body.nodes; + + for (var i = 0; i < ids.length; i++) { + var id = ids[i]; + delete nodes[id]; + } + + this.body.emitter.emit("_dataChanged"); + } + /** + * create a node + * @param {Object} properties + * @param {class} [constructorClass=Node.default] + * @returns {*} + */ + + }, { + key: "create", + value: function create(properties) { + var constructorClass = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Node; + return new constructorClass(properties, this.body, this.images, this.groups, this.options, this.defaultOptions); + } + /** + * + * @param {boolean} [clearPositions=false] + */ + + }, { + key: "refresh", + value: function refresh() { + var _this3 = this; + + var clearPositions = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; + util.forEach(this.body.nodes, function (node, nodeId) { + var data = _this3.body.data.nodes.get(nodeId); + + if (data !== undefined) { + if (clearPositions === true) { + node.setOptions({ + x: null, + y: null + }); + } + + node.setOptions({ + fixed: false + }); + node.setOptions(data); + } + }); + } + /** + * Returns the positions of the nodes. + * @param {Array.|String} [ids] --> optional, can be array of nodeIds, can be string + * @returns {{}} + */ + + }, { + key: "getPositions", + value: function getPositions(ids) { + var dataArray = {}; + + if (ids !== undefined) { + if (Array.isArray(ids) === true) { + for (var i = 0; i < ids.length; i++) { + if (this.body.nodes[ids[i]] !== undefined) { + var node = this.body.nodes[ids[i]]; + dataArray[ids[i]] = { + x: Math.round(node.x), + y: Math.round(node.y) + }; + } + } + } else { + if (this.body.nodes[ids] !== undefined) { + var _node = this.body.nodes[ids]; + dataArray[ids] = { + x: Math.round(_node.x), + y: Math.round(_node.y) + }; + } + } + } else { + for (var _i = 0; _i < this.body.nodeIndices.length; _i++) { + var _node2 = this.body.nodes[this.body.nodeIndices[_i]]; + dataArray[this.body.nodeIndices[_i]] = { + x: Math.round(_node2.x), + y: Math.round(_node2.y) + }; + } + } + + return dataArray; + } + /** + * Load the XY positions of the nodes into the dataset. + */ + + }, { + key: "storePositions", + value: function storePositions() { + // todo: add support for clusters and hierarchical. + var dataArray = []; + var dataset = this.body.data.nodes.getDataSet(); + + for (var nodeId in dataset._data) { + if (dataset._data.hasOwnProperty(nodeId)) { + var node = this.body.nodes[nodeId]; + + if (dataset._data[nodeId].x != Math.round(node.x) || dataset._data[nodeId].y != Math.round(node.y)) { + dataArray.push({ + id: node.id, + x: Math.round(node.x), + y: Math.round(node.y) + }); + } + } + } + + dataset.update(dataArray); + } + /** + * get the bounding box of a node. + * @param {Node.id} nodeId + * @returns {j|*} + */ + + }, { + key: "getBoundingBox", + value: function getBoundingBox(nodeId) { + if (this.body.nodes[nodeId] !== undefined) { + return this.body.nodes[nodeId].shape.boundingBox; + } + } + /** + * Get the Ids of nodes connected to this node. + * @param {Node.id} nodeId + * @param {'to'|'from'|undefined} direction values 'from' and 'to' select respectively parent and child nodes only. + * Any other value returns both parent and child nodes. + * @returns {Array} + */ + + }, { + key: "getConnectedNodes", + value: function getConnectedNodes(nodeId, direction) { + var nodeList = []; + + if (this.body.nodes[nodeId] !== undefined) { + var node = this.body.nodes[nodeId]; + var nodeObj = {}; // used to quickly check if node already exists + + for (var i = 0; i < node.edges.length; i++) { + var edge = node.edges[i]; + + if (direction !== 'to' && edge.toId == node.id) { + // these are double equals since ids can be numeric or string + if (nodeObj[edge.fromId] === undefined) { + nodeList.push(edge.fromId); + nodeObj[edge.fromId] = true; + } + } else if (direction !== 'from' && edge.fromId == node.id) { + // these are double equals since ids can be numeric or string + if (nodeObj[edge.toId] === undefined) { + nodeList.push(edge.toId); + nodeObj[edge.toId] = true; + } + } + } + } + + return nodeList; + } + /** + * Get the ids of the edges connected to this node. + * @param {Node.id} nodeId + * @returns {*} + */ + + }, { + key: "getConnectedEdges", + value: function getConnectedEdges(nodeId) { + var edgeList = []; + + if (this.body.nodes[nodeId] !== undefined) { + var node = this.body.nodes[nodeId]; + + for (var i = 0; i < node.edges.length; i++) { + edgeList.push(node.edges[i].id); + } + } else { + console.log("NodeId provided for getConnectedEdges does not exist. Provided: ", nodeId); + } + + return edgeList; + } + /** + * Move a node. + * + * @param {Node.id} nodeId + * @param {number} x + * @param {number} y + */ + + }, { + key: "moveNode", + value: function moveNode(nodeId, x, y) { + var _this4 = this; + + if (this.body.nodes[nodeId] !== undefined) { + this.body.nodes[nodeId].x = Number(x); + this.body.nodes[nodeId].y = Number(y); + setTimeout(function () { + _this4.body.emitter.emit("startSimulation"); + }, 0); + } else { + console.log("Node id supplied to moveNode does not exist. Provided: ", nodeId); + } + } + }]); + + return NodesHandler; +}(); + +/** ============================================================================ + * Location of all the endpoint drawing routines. + * + * Every endpoint has its own drawing routine, which contains an endpoint definition. + * + * The endpoint definitions must have the following properies: + * + * - (0,0) is the connection point to the node it attaches to + * - The endpoints are orientated to the positive x-direction + * - The length of the endpoint is at most 1 + * + * As long as the endpoint classes remain simple and not too numerous, they will + * be contained within this module. + * All classes here except `EndPoints` should be considered as private to this module. + * + * ----------------------------------------------------------------------------- + * ### Further Actions + * + * After adding a new endpoint here, you also need to do the following things: + * + * - Add the new endpoint name to `network/options.js` in array `endPoints`. + * - Add the new endpoint name to the documentation. + * Scan for 'arrows.to.type` and add it to the description. + * - Add the endpoint to the examples. At the very least, add it to example + * `edgeStyles/arrowTypes`. + * ============================================================================= */ + +/** + * Common methods for endpoints + * + * @class + */ +var EndPoint = +/*#__PURE__*/ +function () { + function EndPoint() { + classCallCheck$1(this, EndPoint); + } + + createClass$1(EndPoint, null, [{ + key: "transform", + + /** + * Apply transformation on points for display. + * + * The following is done: + * - rotate by the specified angle + * - multiply the (normalized) coordinates by the passed length + * - offset by the target coordinates + * + * @param {Array} points + * @param {ArrowData} arrowData + * @static + */ + value: function transform(points, arrowData) { + if (!(points instanceof Array)) { + points = [points]; + } + + var x = arrowData.point.x; + var y = arrowData.point.y; + var angle = arrowData.angle; + var length = arrowData.length; + + for (var i = 0; i < points.length; ++i) { + var p = points[i]; + var xt = p.x * Math.cos(angle) - p.y * Math.sin(angle); + var yt = p.x * Math.sin(angle) + p.y * Math.cos(angle); + p.x = x + length * xt; + p.y = y + length * yt; + } + } + /** + * Draw a closed path using the given real coordinates. + * + * @param {CanvasRenderingContext2D} ctx + * @param {Array.} points + * @static + */ + + }, { + key: "drawPath", + value: function drawPath(ctx, points) { + ctx.beginPath(); + ctx.moveTo(points[0].x, points[0].y); + + for (var i = 1; i < points.length; ++i) { + ctx.lineTo(points[i].x, points[i].y); + } + + ctx.closePath(); + } + }]); + + return EndPoint; +}(); +/** + * Drawing methods for the arrow endpoint. + * @extends EndPoint + */ + + +var Arrow = +/*#__PURE__*/ +function (_EndPoint) { + inherits$1(Arrow, _EndPoint); + + function Arrow() { + classCallCheck$1(this, Arrow); + + return possibleConstructorReturn$1(this, getPrototypeOf$1(Arrow).apply(this, arguments)); + } + + createClass$1(Arrow, null, [{ + key: "draw", + + /** + * Draw this shape at the end of a line. + * + * @param {CanvasRenderingContext2D} ctx + * @param {ArrowData} arrowData + * @static + */ + value: function draw(ctx, arrowData) { + // Normalized points of closed path, in the order that they should be drawn. + // (0, 0) is the attachment point, and the point around which should be rotated + var points = [{ + x: 0, + y: 0 + }, { + x: -1, + y: 0.3 + }, { + x: -0.9, + y: 0 + }, { + x: -1, + y: -0.3 + }]; + EndPoint.transform(points, arrowData); + EndPoint.drawPath(ctx, points); + } + }]); + + return Arrow; +}(EndPoint); +/** + * Drawing methods for the crow endpoint. + * @extends EndPoint + */ + + +var Crow = +/*#__PURE__*/ +function () { + function Crow() { + classCallCheck$1(this, Crow); + } + + createClass$1(Crow, null, [{ + key: "draw", + + /** + * Draw this shape at the end of a line. + * + * @param {CanvasRenderingContext2D} ctx + * @param {ArrowData} arrowData + * @static + */ + value: function draw(ctx, arrowData) { + // Normalized points of closed path, in the order that they should be drawn. + // (0, 0) is the attachment point, and the point around which should be rotated + var points = [{ + x: -1, + y: 0 + }, { + x: 0, + y: 0.3 + }, { + x: -0.4, + y: 0 + }, { + x: 0, + y: -0.3 + }]; + EndPoint.transform(points, arrowData); + EndPoint.drawPath(ctx, points); + } + }]); + + return Crow; +}(); +/** + * Drawing methods for the curve endpoint. + * @extends EndPoint + */ + + +var Curve = +/*#__PURE__*/ +function () { + function Curve() { + classCallCheck$1(this, Curve); + } + + createClass$1(Curve, null, [{ + key: "draw", + + /** + * Draw this shape at the end of a line. + * + * @param {CanvasRenderingContext2D} ctx + * @param {ArrowData} arrowData + * @static + */ + value: function draw(ctx, arrowData) { + // Normalized points of closed path, in the order that they should be drawn. + // (0, 0) is the attachment point, and the point around which should be rotated + var point = { + x: -0.4, + y: 0 + }; + EndPoint.transform(point, arrowData); // Update endpoint style for drawing transparent arc. + + ctx.strokeStyle = ctx.fillStyle; + ctx.fillStyle = 'rgba(0, 0, 0, 0)'; // Define curve endpoint as semicircle. + + var pi = Math.PI; + var start_angle = arrowData.angle - pi / 2; + var end_angle = arrowData.angle + pi / 2; + ctx.beginPath(); + ctx.arc(point.x, point.y, arrowData.length * 0.4, start_angle, end_angle, false); + ctx.stroke(); + } + }]); + + return Curve; +}(); +/** + * Drawing methods for the inverted curve endpoint. + * @extends EndPoint + */ + + +var InvertedCurve = +/*#__PURE__*/ +function () { + function InvertedCurve() { + classCallCheck$1(this, InvertedCurve); + } + + createClass$1(InvertedCurve, null, [{ + key: "draw", + + /** + * Draw this shape at the end of a line. + * + * @param {CanvasRenderingContext2D} ctx + * @param {ArrowData} arrowData + * @static + */ + value: function draw(ctx, arrowData) { + // Normalized points of closed path, in the order that they should be drawn. + // (0, 0) is the attachment point, and the point around which should be rotated + var point = { + x: -0.3, + y: 0 + }; + EndPoint.transform(point, arrowData); // Update endpoint style for drawing transparent arc. + + ctx.strokeStyle = ctx.fillStyle; + ctx.fillStyle = 'rgba(0, 0, 0, 0)'; // Define inverted curve endpoint as semicircle. + + var pi = Math.PI; + var start_angle = arrowData.angle + pi / 2; + var end_angle = arrowData.angle + 3 * pi / 2; + ctx.beginPath(); + ctx.arc(point.x, point.y, arrowData.length * 0.4, start_angle, end_angle, false); + ctx.stroke(); + } + }]); + + return InvertedCurve; +}(); +/** + * Drawing methods for the trinagle endpoint. + * @extends EndPoint + */ + + +var Triangle$1 = +/*#__PURE__*/ +function () { + function Triangle() { + classCallCheck$1(this, Triangle); + } + + createClass$1(Triangle, null, [{ + key: "draw", + + /** + * Draw this shape at the end of a line. + * + * @param {CanvasRenderingContext2D} ctx + * @param {ArrowData} arrowData + * @static + */ + value: function draw(ctx, arrowData) { + // Normalized points of closed path, in the order that they should be drawn. + // (0, 0) is the attachment point, and the point around which should be rotated + var points = [{ + x: 0.02, + y: 0 + }, { + x: -1, + y: 0.3 + }, { + x: -1, + y: -0.3 + }]; + EndPoint.transform(points, arrowData); + EndPoint.drawPath(ctx, points); + } + }]); + + return Triangle; +}(); +/** + * Drawing methods for the inverted trinagle endpoint. + * @extends EndPoint + */ + + +var InvertedTriangle = +/*#__PURE__*/ +function () { + function InvertedTriangle() { + classCallCheck$1(this, InvertedTriangle); + } + + createClass$1(InvertedTriangle, null, [{ + key: "draw", + + /** + * Draw this shape at the end of a line. + * + * @param {CanvasRenderingContext2D} ctx + * @param {ArrowData} arrowData + * @static + */ + value: function draw(ctx, arrowData) { + // Normalized points of closed path, in the order that they should be drawn. + // (0, 0) is the attachment point, and the point around which should be rotated + var points = [{ + x: 0, + y: 0.3 + }, { + x: 0, + y: -0.3 + }, { + x: -1, + y: 0 + }]; + EndPoint.transform(points, arrowData); + EndPoint.drawPath(ctx, points); + } + }]); + + return InvertedTriangle; +}(); +/** + * Drawing methods for the circle endpoint. + */ + + +var Circle$1 = +/*#__PURE__*/ +function () { + function Circle() { + classCallCheck$1(this, Circle); + } + + createClass$1(Circle, null, [{ + key: "draw", + + /** + * Draw this shape at the end of a line. + * + * @param {CanvasRenderingContext2D} ctx + * @param {ArrowData} arrowData + * @static + */ + value: function draw(ctx, arrowData) { + var point = { + x: -0.4, + y: 0 + }; + EndPoint.transform(point, arrowData); + ctx.circle(point.x, point.y, arrowData.length * 0.4); + } + }]); + + return Circle; +}(); +/** + * Drawing methods for the bar endpoint. + */ + + +var Bar = +/*#__PURE__*/ +function () { + function Bar() { + classCallCheck$1(this, Bar); + } + + createClass$1(Bar, null, [{ + key: "draw", + + /** + * Draw this shape at the end of a line. + * + * @param {CanvasRenderingContext2D} ctx + * @param {ArrowData} arrowData + * @static + */ + value: function draw(ctx, arrowData) { + /* + var points = [ + {x:0, y:0.5}, + {x:0, y:-0.5} + ]; + + EndPoint.transform(points, arrowData); + ctx.beginPath(); + ctx.moveTo(points[0].x, points[0].y); + ctx.lineTo(points[1].x, points[1].y); + ctx.stroke(); + */ + var points = [{ + x: 0, + y: 0.5 + }, { + x: 0, + y: -0.5 + }, { + x: -0.15, + y: -0.5 + }, { + x: -0.15, + y: 0.5 + }]; + EndPoint.transform(points, arrowData); + EndPoint.drawPath(ctx, points); + } + }]); + + return Bar; +}(); +/** + * Drawing methods for the box endpoint. + */ + + +var Box$1 = +/*#__PURE__*/ +function () { + function Box() { + classCallCheck$1(this, Box); + } + + createClass$1(Box, null, [{ + key: "draw", + + /** + * Draw this shape at the end of a line. + * + * @param {CanvasRenderingContext2D} ctx + * @param {ArrowData} arrowData + * @static + */ + value: function draw(ctx, arrowData) { + var points = [{ + x: 0, + y: 0.3 + }, { + x: 0, + y: -0.3 + }, { + x: -0.6, + y: -0.3 + }, { + x: -0.6, + y: 0.3 + }]; + EndPoint.transform(points, arrowData); + EndPoint.drawPath(ctx, points); + } + }]); + + return Box; +}(); +/** + * Drawing methods for the diamond endpoint. + */ + + +var Diamond$1 = +/*#__PURE__*/ +function () { + function Diamond() { + classCallCheck$1(this, Diamond); + } + + createClass$1(Diamond, null, [{ + key: "draw", + + /** + * Draw this shape at the end of a line. + * + * @param {CanvasRenderingContext2D} ctx + * @param {ArrowData} arrowData + * @static + */ + value: function draw(ctx, arrowData) { + var points = [{ + x: 0, + y: 0 + }, { + x: -0.5, + y: -0.3 + }, { + x: -1, + y: 0 + }, { + x: -0.5, + y: 0.3 + }]; + EndPoint.transform(points, arrowData); + EndPoint.drawPath(ctx, points); + } + }]); + + return Diamond; +}(); +/** + * Drawing methods for the vee endpoint. + * @extends EndPoint + */ + + +var Vee = +/*#__PURE__*/ +function () { + function Vee() { + classCallCheck$1(this, Vee); + } + + createClass$1(Vee, null, [{ + key: "draw", + + /** + * Draw this shape at the end of a line. + * + * @param {CanvasRenderingContext2D} ctx + * @param {ArrowData} arrowData + * @static + */ + value: function draw(ctx, arrowData) { + // Normalized points of closed path, in the order that they should be drawn. + // (0, 0) is the attachment point, and the point around which should be rotated + var points = [{ + x: -1, + y: 0.3 + }, { + x: -0.5, + y: 0 + }, { + x: -1, + y: -0.3 + }, { + x: 0, + y: 0 + }]; + EndPoint.transform(points, arrowData); + EndPoint.drawPath(ctx, points); + } + }]); + + return Vee; +}(); +/** + * Drawing methods for the endpoints. + */ + + +var EndPoints = +/*#__PURE__*/ +function () { + function EndPoints() { + classCallCheck$1(this, EndPoints); + } + + createClass$1(EndPoints, null, [{ + key: "draw", + + /** + * Draw an endpoint + * + * @param {CanvasRenderingContext2D} ctx + * @param {ArrowData} arrowData + * @static + */ + value: function draw(ctx, arrowData) { + var type; + + if (arrowData.type) { + type = arrowData.type.toLowerCase(); + } + + switch (type) { + case 'circle': + Circle$1.draw(ctx, arrowData); + break; + + case 'box': + Box$1.draw(ctx, arrowData); + break; + + case 'crow': + Crow.draw(ctx, arrowData); + break; + + case 'curve': + Curve.draw(ctx, arrowData); + break; + + case 'diamond': + Diamond$1.draw(ctx, arrowData); + break; + + case 'inv_curve': + InvertedCurve.draw(ctx, arrowData); + break; + + case 'triangle': + Triangle$1.draw(ctx, arrowData); + break; + + case 'inv_triangle': + InvertedTriangle.draw(ctx, arrowData); + break; + + case 'bar': + Bar.draw(ctx, arrowData); + break; + + case 'vee': + Vee.draw(ctx, arrowData); + break; + + case 'arrow': // fall-through + + default: + Arrow.draw(ctx, arrowData); + } + } + }]); + + return EndPoints; +}(); + +/** + * The Base Class for all edges. + * + */ + +var EdgeBase = +/*#__PURE__*/ +function () { + /** + * @param {Object} options + * @param {Object} body + * @param {Label} labelModule + */ + function EdgeBase(options, body, labelModule) { + classCallCheck$1(this, EdgeBase); + + this.body = body; + this.labelModule = labelModule; + this.options = {}; + this.setOptions(options); + this.colorDirty = true; + this.color = {}; + this.selectionWidth = 2; + this.hoverWidth = 1.5; + this.fromPoint = this.from; + this.toPoint = this.to; + } + /** + * Connects a node to itself + */ + + + createClass$1(EdgeBase, [{ + key: "connect", + value: function connect() { + this.from = this.body.nodes[this.options.from]; + this.to = this.body.nodes[this.options.to]; + } + /** + * + * @returns {boolean} always false + */ + + }, { + key: "cleanup", + value: function cleanup() { + return false; + } + /** + * + * @param {Object} options + */ + + }, { + key: "setOptions", + value: function setOptions(options) { + this.options = options; + this.from = this.body.nodes[this.options.from]; + this.to = this.body.nodes[this.options.to]; + this.id = this.options.id; + } + /** + * Redraw a edge as a line + * Draw this edge in the given canvas + * The 2d context of a HTML canvas can be retrieved by canvas.getContext("2d"); + * + * @param {CanvasRenderingContext2D} ctx + * @param {Array} values + * @param {boolean} selected + * @param {boolean} hover + * @param {Node} viaNode + * @private + */ + + }, { + key: "drawLine", + value: function drawLine(ctx, values, selected, hover, viaNode) { + // set style + ctx.strokeStyle = this.getColor(ctx, values, selected, hover); + ctx.lineWidth = values.width; + + if (values.dashes !== false) { + this._drawDashedLine(ctx, values, viaNode); + } else { + this._drawLine(ctx, values, viaNode); + } + } + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {Array} values + * @param {Node} viaNode + * @param {{x: number, y: number}} [fromPoint] + * @param {{x: number, y: number}} [toPoint] + * @private + */ + + }, { + key: "_drawLine", + value: function _drawLine(ctx, values, viaNode, fromPoint, toPoint) { + if (this.from != this.to) { + // draw line + this._line(ctx, values, viaNode, fromPoint, toPoint); + } else { + var _this$_getCircleData = this._getCircleData(ctx), + _this$_getCircleData2 = slicedToArray(_this$_getCircleData, 3), + x = _this$_getCircleData2[0], + y = _this$_getCircleData2[1], + radius = _this$_getCircleData2[2]; + + this._circle(ctx, values, x, y, radius); + } + } + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {Array} values + * @param {Node} viaNode + * @param {{x: number, y: number}} [fromPoint] TODO: Remove in next major release + * @param {{x: number, y: number}} [toPoint] TODO: Remove in next major release + * @private + */ + + }, { + key: "_drawDashedLine", + value: function _drawDashedLine(ctx, values, viaNode, fromPoint, toPoint) { + // eslint-disable-line no-unused-vars + ctx.lineCap = 'round'; + var pattern = [5, 5]; + + if (Array.isArray(values.dashes) === true) { + pattern = values.dashes; + } // only firefox and chrome support this method, else we use the legacy one. + + + if (ctx.setLineDash !== undefined) { + ctx.save(); // set dash settings for chrome or firefox + + ctx.setLineDash(pattern); + ctx.lineDashOffset = 0; // draw the line + + if (this.from != this.to) { + // draw line + this._line(ctx, values, viaNode); + } else { + var _this$_getCircleData3 = this._getCircleData(ctx), + _this$_getCircleData4 = slicedToArray(_this$_getCircleData3, 3), + x = _this$_getCircleData4[0], + y = _this$_getCircleData4[1], + radius = _this$_getCircleData4[2]; + + this._circle(ctx, values, x, y, radius); + } // restore the dash settings. + + + ctx.setLineDash([0]); + ctx.lineDashOffset = 0; + ctx.restore(); + } else { + // unsupporting smooth lines + if (this.from != this.to) { + // draw line + ctx.dashedLine(this.from.x, this.from.y, this.to.x, this.to.y, pattern); + } else { + var _this$_getCircleData5 = this._getCircleData(ctx), + _this$_getCircleData6 = slicedToArray(_this$_getCircleData5, 3), + _x = _this$_getCircleData6[0], + _y = _this$_getCircleData6[1], + _radius = _this$_getCircleData6[2]; + + this._circle(ctx, values, _x, _y, _radius); + } // draw shadow if enabled + + + this.enableShadow(ctx, values); + ctx.stroke(); // disable shadows for other elements. + + this.disableShadow(ctx, values); + } + } + /** + * + * @param {Node} nearNode + * @param {CanvasRenderingContext2D} ctx + * @param {Object} options + * @returns {{x: number, y: number}} + */ + + }, { + key: "findBorderPosition", + value: function findBorderPosition(nearNode, ctx, options) { + if (this.from != this.to) { + return this._findBorderPosition(nearNode, ctx, options); + } else { + return this._findBorderPositionCircle(nearNode, ctx, options); + } + } + /** + * + * @param {CanvasRenderingContext2D} ctx + * @returns {{from: ({x: number, y: number, t: number}|*), to: ({x: number, y: number, t: number}|*)}} + */ + + }, { + key: "findBorderPositions", + value: function findBorderPositions(ctx) { + var from = {}; + var to = {}; + + if (this.from != this.to) { + from = this._findBorderPosition(this.from, ctx); + to = this._findBorderPosition(this.to, ctx); + } else { + var _this$_getCircleData$ = this._getCircleData(ctx).slice(0, 2), + _this$_getCircleData$2 = slicedToArray(_this$_getCircleData$, 2), + x = _this$_getCircleData$2[0], + y = _this$_getCircleData$2[1]; + + from = this._findBorderPositionCircle(this.from, ctx, { + x: x, + y: y, + low: 0.25, + high: 0.6, + direction: -1 + }); + to = this._findBorderPositionCircle(this.from, ctx, { + x: x, + y: y, + low: 0.6, + high: 0.8, + direction: 1 + }); + } + + return { + from: from, + to: to + }; + } + /** + * + * @param {CanvasRenderingContext2D} ctx + * @returns {Array.} x, y, radius + * @private + */ + + }, { + key: "_getCircleData", + value: function _getCircleData(ctx) { + var x, y; + var node = this.from; + var radius = this.options.selfReferenceSize; + + if (ctx !== undefined) { + if (node.shape.width === undefined) { + node.shape.resize(ctx); + } + } // get circle coordinates + + + if (node.shape.width > node.shape.height) { + x = node.x + node.shape.width * 0.5; + y = node.y - radius; + } else { + x = node.x + radius; + y = node.y - node.shape.height * 0.5; + } + + return [x, y, radius]; + } + /** + * Get a point on a circle + * @param {number} x + * @param {number} y + * @param {number} radius + * @param {number} percentage - Value between 0 (line start) and 1 (line end) + * @return {Object} point + * @private + */ + + }, { + key: "_pointOnCircle", + value: function _pointOnCircle(x, y, radius, percentage) { + var angle = percentage * 2 * Math.PI; + return { + x: x + radius * Math.cos(angle), + y: y - radius * Math.sin(angle) + }; + } + /** + * This function uses binary search to look for the point where the circle crosses the border of the node. + * @param {Node} node + * @param {CanvasRenderingContext2D} ctx + * @param {Object} options + * @returns {*} + * @private + */ + + }, { + key: "_findBorderPositionCircle", + value: function _findBorderPositionCircle(node, ctx, options) { + var x = options.x; + var y = options.y; + var low = options.low; + var high = options.high; + var direction = options.direction; + var maxIterations = 10; + var iteration = 0; + var radius = this.options.selfReferenceSize; + var pos, angle, distanceToBorder, distanceToPoint, difference; + var threshold = 0.05; + var middle = (low + high) * 0.5; + + while (low <= high && iteration < maxIterations) { + middle = (low + high) * 0.5; + pos = this._pointOnCircle(x, y, radius, middle); + angle = Math.atan2(node.y - pos.y, node.x - pos.x); + distanceToBorder = node.distanceToBorder(ctx, angle); + distanceToPoint = Math.sqrt(Math.pow(pos.x - node.x, 2) + Math.pow(pos.y - node.y, 2)); + difference = distanceToBorder - distanceToPoint; + + if (Math.abs(difference) < threshold) { + break; // found + } else if (difference > 0) { + // distance to nodes is larger than distance to border --> t needs to be bigger if we're looking at the to node. + if (direction > 0) { + low = middle; + } else { + high = middle; + } + } else { + if (direction > 0) { + high = middle; + } else { + low = middle; + } + } + + iteration++; + } + + pos.t = middle; + return pos; + } + /** + * Get the line width of the edge. Depends on width and whether one of the + * connected nodes is selected. + * @param {boolean} selected + * @param {boolean} hover + * @returns {number} width + * @private + */ + + }, { + key: "getLineWidth", + value: function getLineWidth(selected, hover) { + if (selected === true) { + return Math.max(this.selectionWidth, 0.3 / this.body.view.scale); + } else { + if (hover === true) { + return Math.max(this.hoverWidth, 0.3 / this.body.view.scale); + } else { + return Math.max(this.options.width, 0.3 / this.body.view.scale); + } + } + } + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {ArrowOptions} values + * @param {boolean} selected - Unused + * @param {boolean} hover - Unused + * @returns {string} + */ + + }, { + key: "getColor", + value: function getColor(ctx, values, selected, hover) { + // eslint-disable-line no-unused-vars + if (values.inheritsColor !== false) { + // when this is a loop edge, just use the 'from' method + if (values.inheritsColor === 'both' && this.from.id !== this.to.id) { + var grd = ctx.createLinearGradient(this.from.x, this.from.y, this.to.x, this.to.y); + var fromColor, toColor; + fromColor = this.from.options.color.highlight.border; + toColor = this.to.options.color.highlight.border; + + if (this.from.selected === false && this.to.selected === false) { + fromColor = util.overrideOpacity(this.from.options.color.border, values.opacity); + toColor = util.overrideOpacity(this.to.options.color.border, values.opacity); + } else if (this.from.selected === true && this.to.selected === false) { + toColor = this.to.options.color.border; + } else if (this.from.selected === false && this.to.selected === true) { + fromColor = this.from.options.color.border; + } + + grd.addColorStop(0, fromColor); + grd.addColorStop(1, toColor); // -------------------- this returns -------------------- // + + return grd; + } + + if (values.inheritsColor === "to") { + return util.overrideOpacity(this.to.options.color.border, values.opacity); + } else { + // "from" + return util.overrideOpacity(this.from.options.color.border, values.opacity); + } + } else { + return util.overrideOpacity(values.color, values.opacity); + } + } + /** + * Draw a line from a node to itself, a circle + * + * @param {CanvasRenderingContext2D} ctx + * @param {Array} values + * @param {number} x + * @param {number} y + * @param {number} radius + * @private + */ + + }, { + key: "_circle", + value: function _circle(ctx, values, x, y, radius) { + // draw shadow if enabled + this.enableShadow(ctx, values); // draw a circle + + ctx.beginPath(); + ctx.arc(x, y, radius, 0, 2 * Math.PI, false); + ctx.stroke(); // disable shadows for other elements. + + this.disableShadow(ctx, values); + } + /** + * Calculate the distance between a point (x3,y3) and a line segment from (x1,y1) to (x2,y2). + * (x3,y3) is the point. + * + * http://stackoverflow.com/questions/849211/shortest-distancae-between-a-point-and-a-line-segment + * + * @param {number} x1 + * @param {number} y1 + * @param {number} x2 + * @param {number} y2 + * @param {number} x3 + * @param {number} y3 + * @param {Node} via + * @param {Array} values + * @returns {number} + */ + + }, { + key: "getDistanceToEdge", + value: function getDistanceToEdge(x1, y1, x2, y2, x3, y3, via, values) { + // eslint-disable-line no-unused-vars + var returnValue = 0; + + if (this.from != this.to) { + returnValue = this._getDistanceToEdge(x1, y1, x2, y2, x3, y3, via); + } else { + var _this$_getCircleData7 = this._getCircleData(undefined), + _this$_getCircleData8 = slicedToArray(_this$_getCircleData7, 3), + x = _this$_getCircleData8[0], + y = _this$_getCircleData8[1], + radius = _this$_getCircleData8[2]; + + var dx = x - x3; + var dy = y - y3; + returnValue = Math.abs(Math.sqrt(dx * dx + dy * dy) - radius); + } + + return returnValue; + } + /** + * + * @param {number} x1 + * @param {number} y1 + * @param {number} x2 + * @param {number} y2 + * @param {number} x3 + * @param {number} y3 + * @returns {number} + * @private + */ + + }, { + key: "_getDistanceToLine", + value: function _getDistanceToLine(x1, y1, x2, y2, x3, y3) { + var px = x2 - x1; + var py = y2 - y1; + var something = px * px + py * py; + var u = ((x3 - x1) * px + (y3 - y1) * py) / something; + + if (u > 1) { + u = 1; + } else if (u < 0) { + u = 0; + } + + var x = x1 + u * px; + var y = y1 + u * py; + var dx = x - x3; + var dy = y - y3; //# Note: If the actual distance does not matter, + //# if you only want to compare what this function + //# returns to other results of this function, you + //# can just return the squared distance instead + //# (i.e. remove the sqrt) to gain a little performance + + return Math.sqrt(dx * dx + dy * dy); + } + /** + * @param {CanvasRenderingContext2D} ctx + * @param {string} position + * @param {Node} viaNode + * @param {boolean} selected + * @param {boolean} hover + * @param {Array} values + * @returns {{point: *, core: {x: number, y: number}, angle: *, length: number, type: *}} + */ + + }, { + key: "getArrowData", + value: function getArrowData(ctx, position, viaNode, selected, hover, values) { + // set lets + var angle; + var arrowPoint; + var node1; + var node2; + var guideOffset; + var scaleFactor; + var type; + var lineWidth = values.width; + + if (position === 'from') { + node1 = this.from; + node2 = this.to; + guideOffset = 0.1; + scaleFactor = values.fromArrowScale; + type = values.fromArrowType; + } else if (position === 'to') { + node1 = this.to; + node2 = this.from; + guideOffset = -0.1; + scaleFactor = values.toArrowScale; + type = values.toArrowType; + } else { + node1 = this.to; + node2 = this.from; + scaleFactor = values.middleArrowScale; + type = values.middleArrowType; + } // if not connected to itself + + + if (node1 != node2) { + if (position !== 'middle') { + // draw arrow head + if (this.options.smooth.enabled === true) { + arrowPoint = this.findBorderPosition(node1, ctx, { + via: viaNode + }); + var guidePos = this.getPoint(Math.max(0.0, Math.min(1.0, arrowPoint.t + guideOffset)), viaNode); + angle = Math.atan2(arrowPoint.y - guidePos.y, arrowPoint.x - guidePos.x); + } else { + angle = Math.atan2(node1.y - node2.y, node1.x - node2.x); + arrowPoint = this.findBorderPosition(node1, ctx); + } + } else { + angle = Math.atan2(node1.y - node2.y, node1.x - node2.x); + arrowPoint = this.getPoint(0.5, viaNode); // this is 0.6 to account for the size of the arrow. + } + } else { + // draw circle + var _this$_getCircleData9 = this._getCircleData(ctx), + _this$_getCircleData10 = slicedToArray(_this$_getCircleData9, 3), + x = _this$_getCircleData10[0], + y = _this$_getCircleData10[1], + radius = _this$_getCircleData10[2]; + + if (position === 'from') { + arrowPoint = this.findBorderPosition(this.from, ctx, { + x: x, + y: y, + low: 0.25, + high: 0.6, + direction: -1 + }); + angle = arrowPoint.t * -2 * Math.PI + 1.5 * Math.PI + 0.1 * Math.PI; + } else if (position === 'to') { + arrowPoint = this.findBorderPosition(this.from, ctx, { + x: x, + y: y, + low: 0.6, + high: 1.0, + direction: 1 + }); + angle = arrowPoint.t * -2 * Math.PI + 1.5 * Math.PI - 1.1 * Math.PI; + } else { + arrowPoint = this._pointOnCircle(x, y, radius, 0.175); + angle = 3.9269908169872414; // === 0.175 * -2 * Math.PI + 1.5 * Math.PI + 0.1 * Math.PI; + } + } + + if (position === 'middle' && scaleFactor < 0) lineWidth *= -1; // reversed middle arrow + + var length = 15 * scaleFactor + 3 * lineWidth; // 3* lineWidth is the width of the edge. + + var xi = arrowPoint.x - length * 0.9 * Math.cos(angle); + var yi = arrowPoint.y - length * 0.9 * Math.sin(angle); + var arrowCore = { + x: xi, + y: yi + }; + return { + point: arrowPoint, + core: arrowCore, + angle: angle, + length: length, + type: type + }; + } + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {ArrowOptions} values + * @param {boolean} selected + * @param {boolean} hover + * @param {Object} arrowData + */ + + }, { + key: "drawArrowHead", + value: function drawArrowHead(ctx, values, selected, hover, arrowData) { + // set style + ctx.strokeStyle = this.getColor(ctx, values, selected, hover); + ctx.fillStyle = ctx.strokeStyle; + ctx.lineWidth = values.width; + EndPoints.draw(ctx, arrowData); // draw shadow if enabled + + this.enableShadow(ctx, values); + ctx.fill(); // disable shadows for other elements. + + this.disableShadow(ctx, values); + } + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {ArrowOptions} values + */ + + }, { + key: "enableShadow", + value: function enableShadow(ctx, values) { + if (values.shadow === true) { + ctx.shadowColor = values.shadowColor; + ctx.shadowBlur = values.shadowSize; + ctx.shadowOffsetX = values.shadowX; + ctx.shadowOffsetY = values.shadowY; + } + } + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {ArrowOptions} values + */ + + }, { + key: "disableShadow", + value: function disableShadow(ctx, values) { + if (values.shadow === true) { + ctx.shadowColor = 'rgba(0,0,0,0)'; + ctx.shadowBlur = 0; + ctx.shadowOffsetX = 0; + ctx.shadowOffsetY = 0; + } + } + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {{toArrow: boolean, toArrowScale: (allOptions.edges.arrows.to.scaleFactor|{number}|allOptions.edges.arrows.middle.scaleFactor|allOptions.edges.arrows.from.scaleFactor|Array|number), toArrowType: *, middleArrow: boolean, middleArrowScale: (number|allOptions.edges.arrows.middle.scaleFactor|{number}|Array), middleArrowType: (allOptions.edges.arrows.middle.type|{string}|string|*), fromArrow: boolean, fromArrowScale: (allOptions.edges.arrows.to.scaleFactor|{number}|allOptions.edges.arrows.middle.scaleFactor|allOptions.edges.arrows.from.scaleFactor|Array|number), fromArrowType: *, arrowStrikethrough: (*|boolean|allOptions.edges.arrowStrikethrough|{boolean}), color: undefined, inheritsColor: (string|string|string|allOptions.edges.color.inherit|{string, boolean}|Array|*), opacity: *, hidden: *, length: *, shadow: *, shadowColor: *, shadowSize: *, shadowX: *, shadowY: *, dashes: (*|boolean|Array|allOptions.edges.dashes|{boolean, array}), width: *}} values + */ + + }, { + key: "drawBackground", + value: function drawBackground(ctx, values) { + if (values.background !== false) { + var attrs = ['strokeStyle', 'lineWidth', 'dashes']; + var origCtxAttr = {}; // save original line attrs + + attrs.forEach(function (attrname) { + origCtxAttr[attrname] = ctx[attrname]; + }); + ctx.strokeStyle = values.backgroundColor; + ctx.lineWidth = values.backgroundSize; + this.setStrokeDashed(ctx, values.backgroundDashes); + ctx.stroke(); // restore original line attrs + + attrs.forEach(function (attrname) { + ctx[attrname] = origCtxAttr[attrname]; + }); + this.setStrokeDashed(ctx, values.dashes); + } + } + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {boolean|Array} dashes + */ + + }, { + key: "setStrokeDashed", + value: function setStrokeDashed(ctx, dashes) { + if (dashes !== false) { + if (ctx.setLineDash !== undefined) { + var pattern = [5, 5]; + + if (Array.isArray(dashes) === true) { + pattern = dashes; + } + + ctx.setLineDash(pattern); + } else { + console.warn("setLineDash is not supported in this browser. The dashed stroke cannot be used."); + } + } else { + if (ctx.setLineDash !== undefined) { + ctx.setLineDash([]); + } else { + console.warn("setLineDash is not supported in this browser. The dashed stroke cannot be used."); + } + } + } + }]); + + return EdgeBase; +}(); + +/** + * The Base Class for all Bezier edges. Bezier curves are used to model smooth + * gradual curves in paths between nodes. + * + * @extends EdgeBase + */ + +var BezierEdgeBase = +/*#__PURE__*/ +function (_EdgeBase) { + inherits$1(BezierEdgeBase, _EdgeBase); + + /** + * @param {Object} options + * @param {Object} body + * @param {Label} labelModule + */ + function BezierEdgeBase(options, body, labelModule) { + classCallCheck$1(this, BezierEdgeBase); + + return possibleConstructorReturn$1(this, getPrototypeOf$1(BezierEdgeBase).call(this, options, body, labelModule)); + } + /** + * This function uses binary search to look for the point where the bezier curve crosses the border of the node. + * + * @param {Node} nearNode + * @param {CanvasRenderingContext2D} ctx + * @param {Node} viaNode + * @returns {*} + * @private + */ + + + createClass$1(BezierEdgeBase, [{ + key: "_findBorderPositionBezier", + value: function _findBorderPositionBezier(nearNode, ctx) { + var viaNode = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this._getViaCoordinates(); + var maxIterations = 10; + var iteration = 0; + var low = 0; + var high = 1; + var pos, angle, distanceToBorder, distanceToPoint, difference; + var threshold = 0.2; + var node = this.to; + var from = false; + + if (nearNode.id === this.from.id) { + node = this.from; + from = true; + } + + while (low <= high && iteration < maxIterations) { + var middle = (low + high) * 0.5; + pos = this.getPoint(middle, viaNode); + angle = Math.atan2(node.y - pos.y, node.x - pos.x); + distanceToBorder = node.distanceToBorder(ctx, angle); + distanceToPoint = Math.sqrt(Math.pow(pos.x - node.x, 2) + Math.pow(pos.y - node.y, 2)); + difference = distanceToBorder - distanceToPoint; + + if (Math.abs(difference) < threshold) { + break; // found + } else if (difference < 0) { + // distance to nodes is larger than distance to border --> t needs to be bigger if we're looking at the to node. + if (from === false) { + low = middle; + } else { + high = middle; + } + } else { + if (from === false) { + high = middle; + } else { + low = middle; + } + } + + iteration++; + } + + pos.t = middle; + return pos; + } + /** + * Calculate the distance between a point (x3,y3) and a line segment from + * (x1,y1) to (x2,y2). + * http://stackoverflow.com/questions/849211/shortest-distancae-between-a-point-and-a-line-segment + * @param {number} x1 from x + * @param {number} y1 from y + * @param {number} x2 to x + * @param {number} y2 to y + * @param {number} x3 point to check x + * @param {number} y3 point to check y + * @param {Node} via + * @returns {number} + * @private + */ + + }, { + key: "_getDistanceToBezierEdge", + value: function _getDistanceToBezierEdge(x1, y1, x2, y2, x3, y3, via) { + // x3,y3 is the point + var minDistance = 1e9; + var distance; + var i, t, x, y; + var lastX = x1; + var lastY = y1; + + for (i = 1; i < 10; i++) { + t = 0.1 * i; + x = Math.pow(1 - t, 2) * x1 + 2 * t * (1 - t) * via.x + Math.pow(t, 2) * x2; + y = Math.pow(1 - t, 2) * y1 + 2 * t * (1 - t) * via.y + Math.pow(t, 2) * y2; + + if (i > 0) { + distance = this._getDistanceToLine(lastX, lastY, x, y, x3, y3); + minDistance = distance < minDistance ? distance : minDistance; + } + + lastX = x; + lastY = y; + } + + return minDistance; + } + /** + * Draw a bezier curve between two nodes + * + * The method accepts zero, one or two control points. + * Passing zero control points just draws a straight line + * + * @param {CanvasRenderingContext2D} ctx + * @param {Object} values | options for shadow drawing + * @param {Object|undefined} viaNode1 | first control point for curve drawing + * @param {Object|undefined} viaNode2 | second control point for curve drawing + * + * @protected + */ + + }, { + key: "_bezierCurve", + value: function _bezierCurve(ctx, values, viaNode1, viaNode2) { + var hasNode1 = viaNode1 !== undefined && viaNode1.x !== undefined; + var hasNode2 = viaNode2 !== undefined && viaNode2.x !== undefined; + ctx.beginPath(); + ctx.moveTo(this.fromPoint.x, this.fromPoint.y); + + if (hasNode1 && hasNode2) { + ctx.bezierCurveTo(viaNode1.x, viaNode1.y, viaNode2.x, viaNode2.y, this.toPoint.x, this.toPoint.y); + } else if (hasNode1) { + ctx.quadraticCurveTo(viaNode1.x, viaNode1.y, this.toPoint.x, this.toPoint.y); + } else { + // fallback to normal straight edge + ctx.lineTo(this.toPoint.x, this.toPoint.y); + } // draw a background + + + this.drawBackground(ctx, values); // draw shadow if enabled + + this.enableShadow(ctx, values); + ctx.stroke(); + this.disableShadow(ctx, values); + } + /** + * + * @returns {*|{x, y}|{x: undefined, y: undefined}} + */ + + }, { + key: "getViaNode", + value: function getViaNode() { + return this._getViaCoordinates(); + } + }]); + + return BezierEdgeBase; +}(EdgeBase); + +/** + * A Base Class for all Cubic Bezier Edges. Bezier curves are used to model + * smooth gradual curves in paths between nodes. + * + * @extends BezierEdgeBase + */ + +var CubicBezierEdgeBase = +/*#__PURE__*/ +function (_BezierEdgeBase) { + inherits$1(CubicBezierEdgeBase, _BezierEdgeBase); + + /** + * @param {Object} options + * @param {Object} body + * @param {Label} labelModule + */ + function CubicBezierEdgeBase(options, body, labelModule) { + classCallCheck$1(this, CubicBezierEdgeBase); + + return possibleConstructorReturn$1(this, getPrototypeOf$1(CubicBezierEdgeBase).call(this, options, body, labelModule)); + } + /** + * Calculate the distance between a point (x3,y3) and a line segment from + * (x1,y1) to (x2,y2). + * http://stackoverflow.com/questions/849211/shortest-distancae-between-a-point-and-a-line-segment + * https://en.wikipedia.org/wiki/B%C3%A9zier_curve + * @param {number} x1 from x + * @param {number} y1 from y + * @param {number} x2 to x + * @param {number} y2 to y + * @param {number} x3 point to check x + * @param {number} y3 point to check y + * @param {Node} via1 + * @param {Node} via2 + * @returns {number} + * @private + */ + + + createClass$1(CubicBezierEdgeBase, [{ + key: "_getDistanceToBezierEdge", + value: function _getDistanceToBezierEdge(x1, y1, x2, y2, x3, y3, via1, via2) { + // x3,y3 is the point + var minDistance = 1e9; + var distance; + var i, t, x, y; + var lastX = x1; + var lastY = y1; + var vec = [0, 0, 0, 0]; + + for (i = 1; i < 10; i++) { + t = 0.1 * i; + vec[0] = Math.pow(1 - t, 3); + vec[1] = 3 * t * Math.pow(1 - t, 2); + vec[2] = 3 * Math.pow(t, 2) * (1 - t); + vec[3] = Math.pow(t, 3); + x = vec[0] * x1 + vec[1] * via1.x + vec[2] * via2.x + vec[3] * x2; + y = vec[0] * y1 + vec[1] * via1.y + vec[2] * via2.y + vec[3] * y2; + + if (i > 0) { + distance = this._getDistanceToLine(lastX, lastY, x, y, x3, y3); + minDistance = distance < minDistance ? distance : minDistance; + } + + lastX = x; + lastY = y; + } + + return minDistance; + } + }]); + + return CubicBezierEdgeBase; +}(BezierEdgeBase); + +/** + * A Cubic Bezier Edge. Bezier curves are used to model smooth gradual + * curves in paths between nodes. + * + * @extends CubicBezierEdgeBase + */ + +var CubicBezierEdge = +/*#__PURE__*/ +function (_CubicBezierEdgeBase) { + inherits$1(CubicBezierEdge, _CubicBezierEdgeBase); + + /** + * @param {Object} options + * @param {Object} body + * @param {Label} labelModule + */ + function CubicBezierEdge(options, body, labelModule) { + classCallCheck$1(this, CubicBezierEdge); + + return possibleConstructorReturn$1(this, getPrototypeOf$1(CubicBezierEdge).call(this, options, body, labelModule)); + } + /** + * Draw a line between two nodes + * @param {CanvasRenderingContext2D} ctx + * @param {ArrowOptions} values + * @param {Array.} viaNodes + * @private + */ + + + createClass$1(CubicBezierEdge, [{ + key: "_line", + value: function _line(ctx, values, viaNodes) { + // get the coordinates of the support points. + var via1 = viaNodes[0]; + var via2 = viaNodes[1]; + + this._bezierCurve(ctx, values, via1, via2); + } + /** + * + * @returns {Array.<{x: number, y: number}>} + * @private + */ + + }, { + key: "_getViaCoordinates", + value: function _getViaCoordinates() { + var dx = this.from.x - this.to.x; + var dy = this.from.y - this.to.y; + var x1, y1, x2, y2; + var roundness = this.options.smooth.roundness; // horizontal if x > y or if direction is forced or if direction is horizontal + + if ((Math.abs(dx) > Math.abs(dy) || this.options.smooth.forceDirection === true || this.options.smooth.forceDirection === 'horizontal') && this.options.smooth.forceDirection !== 'vertical') { + y1 = this.from.y; + y2 = this.to.y; + x1 = this.from.x - roundness * dx; + x2 = this.to.x + roundness * dx; + } else { + y1 = this.from.y - roundness * dy; + y2 = this.to.y + roundness * dy; + x1 = this.from.x; + x2 = this.to.x; + } + + return [{ + x: x1, + y: y1 + }, { + x: x2, + y: y2 + }]; + } + /** + * + * @returns {Array.<{x: number, y: number}>} + */ + + }, { + key: "getViaNode", + value: function getViaNode() { + return this._getViaCoordinates(); + } + /** + * + * @param {Node} nearNode + * @param {CanvasRenderingContext2D} ctx + * @returns {{x: number, y: number, t: number}} + * @private + */ + + }, { + key: "_findBorderPosition", + value: function _findBorderPosition(nearNode, ctx) { + return this._findBorderPositionBezier(nearNode, ctx); + } + /** + * + * @param {number} x1 + * @param {number} y1 + * @param {number} x2 + * @param {number} y2 + * @param {number} x3 + * @param {number} y3 + * @param {Node} via1 + * @param {Node} via2 + * @returns {number} + * @private + */ + + }, { + key: "_getDistanceToEdge", + value: function _getDistanceToEdge(x1, y1, x2, y2, x3, y3) { + var _ref = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : this._getViaCoordinates(), + _ref2 = slicedToArray(_ref, 2), + via1 = _ref2[0], + via2 = _ref2[1]; + + // x3,y3 is the point + return this._getDistanceToBezierEdge(x1, y1, x2, y2, x3, y3, via1, via2); + } + /** + * Combined function of pointOnLine and pointOnBezier. This gives the coordinates of a point on the line at a certain percentage of the way + * @param {number} percentage + * @param {{x: number, y: number}} [via1=this._getViaCoordinates()[0]] + * @param {{x: number, y: number}} [via2=this._getViaCoordinates()[1]] + * @returns {{x: number, y: number}} + * @private + */ + + }, { + key: "getPoint", + value: function getPoint(percentage) { + var _ref3 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this._getViaCoordinates(), + _ref4 = slicedToArray(_ref3, 2), + via1 = _ref4[0], + via2 = _ref4[1]; + + var t = percentage; + var vec = []; + vec[0] = Math.pow(1 - t, 3); + vec[1] = 3 * t * Math.pow(1 - t, 2); + vec[2] = 3 * Math.pow(t, 2) * (1 - t); + vec[3] = Math.pow(t, 3); + var x = vec[0] * this.fromPoint.x + vec[1] * via1.x + vec[2] * via2.x + vec[3] * this.toPoint.x; + var y = vec[0] * this.fromPoint.y + vec[1] * via1.y + vec[2] * via2.y + vec[3] * this.toPoint.y; + return { + x: x, + y: y + }; + } + }]); + + return CubicBezierEdge; +}(CubicBezierEdgeBase); + +/** + * A Dynamic Bezier Edge. Bezier curves are used to model smooth gradual + * curves in paths between nodes. The Dynamic piece refers to how the curve + * reacts to physics changes. + * + * @extends BezierEdgeBase + */ + +var BezierEdgeDynamic = +/*#__PURE__*/ +function (_BezierEdgeBase) { + inherits$1(BezierEdgeDynamic, _BezierEdgeBase); + + /** + * @param {Object} options + * @param {Object} body + * @param {Label} labelModule + */ + function BezierEdgeDynamic(options, body, labelModule) { + var _this; + + classCallCheck$1(this, BezierEdgeDynamic); + + //this.via = undefined; // Here for completeness but not allowed to defined before super() is invoked. + _this = possibleConstructorReturn$1(this, getPrototypeOf$1(BezierEdgeDynamic).call(this, options, body, labelModule)); // --> this calls the setOptions below + + _this._boundFunction = function () { + _this.positionBezierNode(); + }; + + _this.body.emitter.on("_repositionBezierNodes", _this._boundFunction); + + return _this; + } + /** + * + * @param {Object} options + */ + + + createClass$1(BezierEdgeDynamic, [{ + key: "setOptions", + value: function setOptions(options) { + // check if the physics has changed. + var physicsChange = false; + + if (this.options.physics !== options.physics) { + physicsChange = true; + } // set the options and the to and from nodes + + + this.options = options; + this.id = this.options.id; + this.from = this.body.nodes[this.options.from]; + this.to = this.body.nodes[this.options.to]; // setup the support node and connect + + this.setupSupportNode(); + this.connect(); // when we change the physics state of the edge, we reposition the support node. + + if (physicsChange === true) { + this.via.setOptions({ + physics: this.options.physics + }); + this.positionBezierNode(); + } + } + /** + * Connects an edge to node(s) + */ + + }, { + key: "connect", + value: function connect() { + this.from = this.body.nodes[this.options.from]; + this.to = this.body.nodes[this.options.to]; + + if (this.from === undefined || this.to === undefined || this.options.physics === false) { + this.via.setOptions({ + physics: false + }); + } else { + // fix weird behaviour where a self referencing node has physics enabled + if (this.from.id === this.to.id) { + this.via.setOptions({ + physics: false + }); + } else { + this.via.setOptions({ + physics: true + }); + } + } + } + /** + * remove the support nodes + * @returns {boolean} + */ + + }, { + key: "cleanup", + value: function cleanup() { + this.body.emitter.off("_repositionBezierNodes", this._boundFunction); + + if (this.via !== undefined) { + delete this.body.nodes[this.via.id]; + this.via = undefined; + return true; + } + + return false; + } + /** + * Bezier curves require an anchor point to calculate the smooth flow. These points are nodes. These nodes are invisible but + * are used for the force calculation. + * + * The changed data is not called, if needed, it is returned by the main edge constructor. + * @private + */ + + }, { + key: "setupSupportNode", + value: function setupSupportNode() { + if (this.via === undefined) { + var nodeId = "edgeId:" + this.id; + var node = this.body.functions.createNode({ + id: nodeId, + shape: 'circle', + physics: true, + hidden: true + }); + this.body.nodes[nodeId] = node; + this.via = node; + this.via.parentEdgeId = this.id; + this.positionBezierNode(); + } + } + /** + * Positions bezier node + */ + + }, { + key: "positionBezierNode", + value: function positionBezierNode() { + if (this.via !== undefined && this.from !== undefined && this.to !== undefined) { + this.via.x = 0.5 * (this.from.x + this.to.x); + this.via.y = 0.5 * (this.from.y + this.to.y); + } else if (this.via !== undefined) { + this.via.x = 0; + this.via.y = 0; + } + } + /** + * Draw a line between two nodes + * @param {CanvasRenderingContext2D} ctx + * @param {ArrowOptions} values + * @param {Node} viaNode + * @private + */ + + }, { + key: "_line", + value: function _line(ctx, values, viaNode) { + this._bezierCurve(ctx, values, viaNode); + } + /** + * + * @returns {Node|undefined|*|{index, line, column}} + */ + + }, { + key: "getViaNode", + value: function getViaNode() { + return this.via; + } + /** + * Combined function of pointOnLine and pointOnBezier. This gives the coordinates of a point on the line at a certain percentage of the way + * + * @param {number} percentage + * @param {Node} viaNode + * @returns {{x: number, y: number}} + * @private + */ + + }, { + key: "getPoint", + value: function getPoint(percentage) { + var viaNode = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.via; + var t = percentage; + var x, y; + + if (this.from === this.to) { + var _this$_getCircleData = this._getCircleData(this.from), + _this$_getCircleData2 = slicedToArray(_this$_getCircleData, 3), + cx = _this$_getCircleData2[0], + cy = _this$_getCircleData2[1], + cr = _this$_getCircleData2[2]; + + var a = 2 * Math.PI * (1 - t); + x = cx + cr * Math.sin(a); + y = cy + cr - cr * (1 - Math.cos(a)); + } else { + x = Math.pow(1 - t, 2) * this.fromPoint.x + 2 * t * (1 - t) * viaNode.x + Math.pow(t, 2) * this.toPoint.x; + y = Math.pow(1 - t, 2) * this.fromPoint.y + 2 * t * (1 - t) * viaNode.y + Math.pow(t, 2) * this.toPoint.y; + } + + return { + x: x, + y: y + }; + } + /** + * + * @param {Node} nearNode + * @param {CanvasRenderingContext2D} ctx + * @returns {*} + * @private + */ + + }, { + key: "_findBorderPosition", + value: function _findBorderPosition(nearNode, ctx) { + return this._findBorderPositionBezier(nearNode, ctx, this.via); + } + /** + * + * @param {number} x1 + * @param {number} y1 + * @param {number} x2 + * @param {number} y2 + * @param {number} x3 + * @param {number} y3 + * @returns {number} + * @private + */ + + }, { + key: "_getDistanceToEdge", + value: function _getDistanceToEdge(x1, y1, x2, y2, x3, y3) { + // x3,y3 is the point + return this._getDistanceToBezierEdge(x1, y1, x2, y2, x3, y3, this.via); + } + }]); + + return BezierEdgeDynamic; +}(BezierEdgeBase); + +/** + * A Static Bezier Edge. Bezier curves are used to model smooth gradual + * curves in paths between nodes. + * + * @extends BezierEdgeBase + */ + +var BezierEdgeStatic = +/*#__PURE__*/ +function (_BezierEdgeBase) { + inherits$1(BezierEdgeStatic, _BezierEdgeBase); + + /** + * @param {Object} options + * @param {Object} body + * @param {Label} labelModule + */ + function BezierEdgeStatic(options, body, labelModule) { + classCallCheck$1(this, BezierEdgeStatic); + + return possibleConstructorReturn$1(this, getPrototypeOf$1(BezierEdgeStatic).call(this, options, body, labelModule)); + } + /** + * Draw a line between two nodes + * @param {CanvasRenderingContext2D} ctx + * @param {ArrowOptions} values + * @param {Node} viaNode + * @private + */ + + + createClass$1(BezierEdgeStatic, [{ + key: "_line", + value: function _line(ctx, values, viaNode) { + this._bezierCurve(ctx, values, viaNode); + } + /** + * + * @returns {Array.<{x: number, y: number}>} + */ + + }, { + key: "getViaNode", + value: function getViaNode() { + return this._getViaCoordinates(); + } + /** + * We do not use the to and fromPoints here to make the via nodes the same as edges without arrows. + * @returns {{x: undefined, y: undefined}} + * @private + */ + + }, { + key: "_getViaCoordinates", + value: function _getViaCoordinates() { + // Assumption: x/y coordinates in from/to always defined + var xVia = undefined; + var yVia = undefined; + var factor = this.options.smooth.roundness; + var type = this.options.smooth.type; + var dx = Math.abs(this.from.x - this.to.x); + var dy = Math.abs(this.from.y - this.to.y); + + if (type === 'discrete' || type === 'diagonalCross') { + var stepX; + var stepY; + + if (dx <= dy) { + stepX = stepY = factor * dy; + } else { + stepX = stepY = factor * dx; + } + + if (this.from.x > this.to.x) stepX = -stepX; + if (this.from.y >= this.to.y) stepY = -stepY; + xVia = this.from.x + stepX; + yVia = this.from.y + stepY; + + if (type === "discrete") { + if (dx <= dy) { + xVia = dx < factor * dy ? this.from.x : xVia; + } else { + yVia = dy < factor * dx ? this.from.y : yVia; + } + } + } else if (type === "straightCross") { + var _stepX = (1 - factor) * dx; + + var _stepY = (1 - factor) * dy; + + if (dx <= dy) { + // up - down + _stepX = 0; + if (this.from.y < this.to.y) _stepY = -_stepY; + } else { + // left - right + if (this.from.x < this.to.x) _stepX = -_stepX; + _stepY = 0; + } + + xVia = this.to.x + _stepX; + yVia = this.to.y + _stepY; + } else if (type === 'horizontal') { + var _stepX2 = (1 - factor) * dx; + + if (this.from.x < this.to.x) _stepX2 = -_stepX2; + xVia = this.to.x + _stepX2; + yVia = this.from.y; + } else if (type === 'vertical') { + var _stepY2 = (1 - factor) * dy; + + if (this.from.y < this.to.y) _stepY2 = -_stepY2; + xVia = this.from.x; + yVia = this.to.y + _stepY2; + } else if (type === 'curvedCW') { + dx = this.to.x - this.from.x; + dy = this.from.y - this.to.y; + var radius = Math.sqrt(dx * dx + dy * dy); + var pi = Math.PI; + var originalAngle = Math.atan2(dy, dx); + var myAngle = (originalAngle + (factor * 0.5 + 0.5) * pi) % (2 * pi); + xVia = this.from.x + (factor * 0.5 + 0.5) * radius * Math.sin(myAngle); + yVia = this.from.y + (factor * 0.5 + 0.5) * radius * Math.cos(myAngle); + } else if (type === 'curvedCCW') { + dx = this.to.x - this.from.x; + dy = this.from.y - this.to.y; + + var _radius = Math.sqrt(dx * dx + dy * dy); + + var _pi = Math.PI; + + var _originalAngle = Math.atan2(dy, dx); + + var _myAngle = (_originalAngle + (-factor * 0.5 + 0.5) * _pi) % (2 * _pi); + + xVia = this.from.x + (factor * 0.5 + 0.5) * _radius * Math.sin(_myAngle); + yVia = this.from.y + (factor * 0.5 + 0.5) * _radius * Math.cos(_myAngle); + } else { + // continuous + var _stepX3; + + var _stepY3; + + if (dx <= dy) { + _stepX3 = _stepY3 = factor * dy; + } else { + _stepX3 = _stepY3 = factor * dx; + } + + if (this.from.x > this.to.x) _stepX3 = -_stepX3; + if (this.from.y >= this.to.y) _stepY3 = -_stepY3; + xVia = this.from.x + _stepX3; + yVia = this.from.y + _stepY3; + + if (dx <= dy) { + if (this.from.x <= this.to.x) { + xVia = this.to.x < xVia ? this.to.x : xVia; + } else { + xVia = this.to.x > xVia ? this.to.x : xVia; + } + } else { + if (this.from.y >= this.to.y) { + yVia = this.to.y > yVia ? this.to.y : yVia; + } else { + yVia = this.to.y < yVia ? this.to.y : yVia; + } + } + } + + return { + x: xVia, + y: yVia + }; + } + /** + * + * @param {Node} nearNode + * @param {CanvasRenderingContext2D} ctx + * @param {Object} options + * @returns {*} + * @private + */ + + }, { + key: "_findBorderPosition", + value: function _findBorderPosition(nearNode, ctx) { + var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; + return this._findBorderPositionBezier(nearNode, ctx, options.via); + } + /** + * + * @param {number} x1 + * @param {number} y1 + * @param {number} x2 + * @param {number} y2 + * @param {number} x3 + * @param {number} y3 + * @param {Node} viaNode + * @returns {number} + * @private + */ + + }, { + key: "_getDistanceToEdge", + value: function _getDistanceToEdge(x1, y1, x2, y2, x3, y3) { + var viaNode = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : this._getViaCoordinates(); + // x3,y3 is the point + return this._getDistanceToBezierEdge(x1, y1, x2, y2, x3, y3, viaNode); + } + /** + * Combined function of pointOnLine and pointOnBezier. This gives the coordinates of a point on the line at a certain percentage of the way + * @param {number} percentage + * @param {Node} viaNode + * @returns {{x: number, y: number}} + * @private + */ + + }, { + key: "getPoint", + value: function getPoint(percentage) { + var viaNode = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this._getViaCoordinates(); + var t = percentage; + var x = Math.pow(1 - t, 2) * this.fromPoint.x + 2 * t * (1 - t) * viaNode.x + Math.pow(t, 2) * this.toPoint.x; + var y = Math.pow(1 - t, 2) * this.fromPoint.y + 2 * t * (1 - t) * viaNode.y + Math.pow(t, 2) * this.toPoint.y; + return { + x: x, + y: y + }; + } + }]); + + return BezierEdgeStatic; +}(BezierEdgeBase); + +/** + * A Straight Edge. + * + * @extends EdgeBase + */ + +var StraightEdge = +/*#__PURE__*/ +function (_EdgeBase) { + inherits$1(StraightEdge, _EdgeBase); + + /** + * @param {Object} options + * @param {Object} body + * @param {Label} labelModule + */ + function StraightEdge(options, body, labelModule) { + classCallCheck$1(this, StraightEdge); + + return possibleConstructorReturn$1(this, getPrototypeOf$1(StraightEdge).call(this, options, body, labelModule)); + } + /** + * Draw a line between two nodes + * @param {CanvasRenderingContext2D} ctx + * @param {ArrowOptions} values + * @private + */ + + + createClass$1(StraightEdge, [{ + key: "_line", + value: function _line(ctx, values) { + // draw a straight line + ctx.beginPath(); + ctx.moveTo(this.fromPoint.x, this.fromPoint.y); + ctx.lineTo(this.toPoint.x, this.toPoint.y); // draw shadow if enabled + + this.enableShadow(ctx, values); + ctx.stroke(); + this.disableShadow(ctx, values); + } + /** + * + * @returns {undefined} + */ + + }, { + key: "getViaNode", + value: function getViaNode() { + return undefined; + } + /** + * Combined function of pointOnLine and pointOnBezier. This gives the coordinates of a point on the line at a certain percentage of the way + * + * @param {number} percentage + * @returns {{x: number, y: number}} + * @private + */ + + }, { + key: "getPoint", + value: function getPoint(percentage) { + return { + x: (1 - percentage) * this.fromPoint.x + percentage * this.toPoint.x, + y: (1 - percentage) * this.fromPoint.y + percentage * this.toPoint.y + }; + } + /** + * + * @param {Node} nearNode + * @param {CanvasRenderingContext2D} ctx + * @returns {{x: number, y: number}} + * @private + */ + + }, { + key: "_findBorderPosition", + value: function _findBorderPosition(nearNode, ctx) { + var node1 = this.to; + var node2 = this.from; + + if (nearNode.id === this.from.id) { + node1 = this.from; + node2 = this.to; + } + + var angle = Math.atan2(node1.y - node2.y, node1.x - node2.x); + var dx = node1.x - node2.x; + var dy = node1.y - node2.y; + var edgeSegmentLength = Math.sqrt(dx * dx + dy * dy); + var toBorderDist = nearNode.distanceToBorder(ctx, angle); + var toBorderPoint = (edgeSegmentLength - toBorderDist) / edgeSegmentLength; + var borderPos = {}; + borderPos.x = (1 - toBorderPoint) * node2.x + toBorderPoint * node1.x; + borderPos.y = (1 - toBorderPoint) * node2.y + toBorderPoint * node1.y; + return borderPos; + } + /** + * + * @param {number} x1 + * @param {number} y1 + * @param {number} x2 + * @param {number} y2 + * @param {number} x3 + * @param {number} y3 + * @returns {number} + * @private + */ + + }, { + key: "_getDistanceToEdge", + value: function _getDistanceToEdge(x1, y1, x2, y2, x3, y3) { + // x3,y3 is the point + return this._getDistanceToLine(x1, y1, x2, y2, x3, y3); + } + }]); + + return StraightEdge; +}(EdgeBase); + +/** + * An edge connects two nodes and has a specific direction. + */ + +var Edge = +/*#__PURE__*/ +function () { + /** + * @param {Object} options values specific to this edge, must contain at least 'from' and 'to' + * @param {Object} body shared state from Network instance + * @param {Object} globalOptions options from the EdgesHandler instance + * @param {Object} defaultOptions default options from the EdgeHandler instance. Value and reference are constant + */ + function Edge(options, body, globalOptions, defaultOptions) { + classCallCheck$1(this, Edge); + + if (body === undefined) { + throw new Error("No body provided"); + } // Since globalOptions is constant in values as well as reference, + // Following needs to be done only once. + + + this.options = util.bridgeObject(globalOptions); + this.globalOptions = globalOptions; + this.defaultOptions = defaultOptions; + this.body = body; // initialize variables + + this.id = undefined; + this.fromId = undefined; + this.toId = undefined; + this.selected = false; + this.hover = false; + this.labelDirty = true; + this.baseWidth = this.options.width; + this.baseFontSize = this.options.font.size; + this.from = undefined; // a node + + this.to = undefined; // a node + + this.edgeType = undefined; + this.connected = false; + this.labelModule = new Label(this.body, this.options, true + /* It's an edge label */ + ); + this.setOptions(options); + } + /** + * Set or overwrite options for the edge + * @param {Object} options an object with options + * @returns {null|boolean} null if no options, boolean if date changed + */ + + + createClass$1(Edge, [{ + key: "setOptions", + value: function setOptions(options) { + if (!options) { + return; + } // record old value of this.options.hidden + + + var oldHidden = this.options.hidden; + + if (oldHidden === undefined || oldHidden === null) { + oldHidden = false; + } + + Edge.parseOptions(this.options, options, true, this.globalOptions); + + if (options.id !== undefined) { + this.id = options.id; + } + + if (options.from !== undefined) { + this.fromId = options.from; + } + + if (options.to !== undefined) { + this.toId = options.to; + } + + if (options.title !== undefined) { + this.title = options.title; + } + + if (options.value !== undefined) { + options.value = parseFloat(options.value); + } + + var pile = [options, this.options, this.defaultOptions]; + this.chooser = ComponentUtil.choosify('edge', pile); // update label Module + + this.updateLabelModule(options); + var dataChanged = this.updateEdgeType(); // if anything has been updates, reset the selection width and the hover width + + this._setInteractionWidths(); // A node is connected when it has a from and to node that both exist in the network.body.nodes. + + + this.connect(); + var newHidden = this.options.hidden; + + if (newHidden === undefined || newHidden === null) { + newHidden = false; + } + + if (newHidden != oldHidden || options.physics !== undefined) { + dataChanged = true; + } // there might be a similar problem with physics, but a bug has not been reported + + + if (options.physics !== undefined) { + dataChanged = true; + } + + return dataChanged; + } + /** + * + * @param {Object} parentOptions + * @param {Object} newOptions + * @param {boolean} [allowDeletion=false] + * @param {Object} [globalOptions={}] + * @param {boolean} [copyFromGlobals=false] + */ + + }, { + key: "getFormattingValues", + + /** + * + * @returns {ArrowOptions} + */ + value: function getFormattingValues() { + var toArrow = this.options.arrows.to === true || this.options.arrows.to.enabled === true; + var fromArrow = this.options.arrows.from === true || this.options.arrows.from.enabled === true; + var middleArrow = this.options.arrows.middle === true || this.options.arrows.middle.enabled === true; + var inheritsColor = this.options.color.inherit; + var values = { + toArrow: toArrow, + toArrowScale: this.options.arrows.to.scaleFactor, + toArrowType: this.options.arrows.to.type, + middleArrow: middleArrow, + middleArrowScale: this.options.arrows.middle.scaleFactor, + middleArrowType: this.options.arrows.middle.type, + fromArrow: fromArrow, + fromArrowScale: this.options.arrows.from.scaleFactor, + fromArrowType: this.options.arrows.from.type, + arrowStrikethrough: this.options.arrowStrikethrough, + color: inheritsColor ? undefined : this.options.color.color, + inheritsColor: inheritsColor, + opacity: this.options.color.opacity, + hidden: this.options.hidden, + length: this.options.length, + shadow: this.options.shadow.enabled, + shadowColor: this.options.shadow.color, + shadowSize: this.options.shadow.size, + shadowX: this.options.shadow.x, + shadowY: this.options.shadow.y, + dashes: this.options.dashes, + width: this.options.width, + background: this.options.background.enabled, + backgroundColor: this.options.background.color, + backgroundSize: this.options.background.size, + backgroundDashes: this.options.background.dashes + }; + + if (this.selected || this.hover) { + if (this.chooser === true) { + if (this.selected) { + var selectedWidth = this.options.selectionWidth; + + if (typeof selectedWidth === 'function') { + values.width = selectedWidth(values.width); + } else if (typeof selectedWidth === 'number') { + values.width += selectedWidth; + } + + values.width = Math.max(values.width, 0.3 / this.body.view.scale); + values.color = this.options.color.highlight; + values.shadow = this.options.shadow.enabled; + } else if (this.hover) { + var hoverWidth = this.options.hoverWidth; + + if (typeof hoverWidth === 'function') { + values.width = hoverWidth(values.width); + } else if (typeof hoverWidth === 'number') { + values.width += hoverWidth; + } + + values.width = Math.max(values.width, 0.3 / this.body.view.scale); + values.color = this.options.color.hover; + values.shadow = this.options.shadow.enabled; + } + } else if (typeof this.chooser === 'function') { + this.chooser(values, this.options.id, this.selected, this.hover); + + if (values.color !== undefined) { + values.inheritsColor = false; + } + + if (values.shadow === false) { + if (values.shadowColor !== this.options.shadow.color || values.shadowSize !== this.options.shadow.size || values.shadowX !== this.options.shadow.x || values.shadowY !== this.options.shadow.y) { + values.shadow = true; + } + } + } + } else { + values.shadow = this.options.shadow.enabled; + values.width = Math.max(values.width, 0.3 / this.body.view.scale); + } + + return values; + } + /** + * update the options in the label module + * + * @param {Object} options + */ + + }, { + key: "updateLabelModule", + value: function updateLabelModule(options) { + var pile = [options, this.options, this.globalOptions, // Currently set global edge options + this.defaultOptions]; + this.labelModule.update(this.options, pile); + + if (this.labelModule.baseSize !== undefined) { + this.baseFontSize = this.labelModule.baseSize; + } + } + /** + * update the edge type, set the options + * @returns {boolean} + */ + + }, { + key: "updateEdgeType", + value: function updateEdgeType() { + var smooth = this.options.smooth; + var dataChanged = false; + var changeInType = true; + + if (this.edgeType !== undefined) { + if (this.edgeType instanceof BezierEdgeDynamic && smooth.enabled === true && smooth.type === 'dynamic' || this.edgeType instanceof CubicBezierEdge && smooth.enabled === true && smooth.type === 'cubicBezier' || this.edgeType instanceof BezierEdgeStatic && smooth.enabled === true && smooth.type !== 'dynamic' && smooth.type !== 'cubicBezier' || this.edgeType instanceof StraightEdge && smooth.type.enabled === false) { + changeInType = false; + } + + if (changeInType === true) { + dataChanged = this.cleanup(); + } + } + + if (changeInType === true) { + if (smooth.enabled === true) { + if (smooth.type === 'dynamic') { + dataChanged = true; + this.edgeType = new BezierEdgeDynamic(this.options, this.body, this.labelModule); + } else if (smooth.type === 'cubicBezier') { + this.edgeType = new CubicBezierEdge(this.options, this.body, this.labelModule); + } else { + this.edgeType = new BezierEdgeStatic(this.options, this.body, this.labelModule); + } + } else { + this.edgeType = new StraightEdge(this.options, this.body, this.labelModule); + } + } else { + // if nothing changes, we just set the options. + this.edgeType.setOptions(this.options); + } + + return dataChanged; + } + /** + * Connect an edge to its nodes + */ + + }, { + key: "connect", + value: function connect() { + this.disconnect(); + this.from = this.body.nodes[this.fromId] || undefined; + this.to = this.body.nodes[this.toId] || undefined; + this.connected = this.from !== undefined && this.to !== undefined; + + if (this.connected === true) { + this.from.attachEdge(this); + this.to.attachEdge(this); + } else { + if (this.from) { + this.from.detachEdge(this); + } + + if (this.to) { + this.to.detachEdge(this); + } + } + + this.edgeType.connect(); + } + /** + * Disconnect an edge from its nodes + */ + + }, { + key: "disconnect", + value: function disconnect() { + if (this.from) { + this.from.detachEdge(this); + this.from = undefined; + } + + if (this.to) { + this.to.detachEdge(this); + this.to = undefined; + } + + this.connected = false; + } + /** + * get the title of this edge. + * @return {string} title The title of the edge, or undefined when no title + * has been set. + */ + + }, { + key: "getTitle", + value: function getTitle() { + return this.title; + } + /** + * check if this node is selecte + * @return {boolean} selected True if node is selected, else false + */ + + }, { + key: "isSelected", + value: function isSelected() { + return this.selected; + } + /** + * Retrieve the value of the edge. Can be undefined + * @return {number} value + */ + + }, { + key: "getValue", + value: function getValue() { + return this.options.value; + } + /** + * Adjust the value range of the edge. The edge will adjust it's width + * based on its value. + * @param {number} min + * @param {number} max + * @param {number} total + */ + + }, { + key: "setValueRange", + value: function setValueRange(min, max, total) { + if (this.options.value !== undefined) { + var scale = this.options.scaling.customScalingFunction(min, max, total, this.options.value); + var widthDiff = this.options.scaling.max - this.options.scaling.min; + + if (this.options.scaling.label.enabled === true) { + var fontDiff = this.options.scaling.label.max - this.options.scaling.label.min; + this.options.font.size = this.options.scaling.label.min + scale * fontDiff; + } + + this.options.width = this.options.scaling.min + scale * widthDiff; + } else { + this.options.width = this.baseWidth; + this.options.font.size = this.baseFontSize; + } + + this._setInteractionWidths(); + + this.updateLabelModule(); + } + /** + * + * @private + */ + + }, { + key: "_setInteractionWidths", + value: function _setInteractionWidths() { + if (typeof this.options.hoverWidth === 'function') { + this.edgeType.hoverWidth = this.options.hoverWidth(this.options.width); + } else { + this.edgeType.hoverWidth = this.options.hoverWidth + this.options.width; + } + + if (typeof this.options.selectionWidth === 'function') { + this.edgeType.selectionWidth = this.options.selectionWidth(this.options.width); + } else { + this.edgeType.selectionWidth = this.options.selectionWidth + this.options.width; + } + } + /** + * Redraw a edge + * Draw this edge in the given canvas + * The 2d context of a HTML canvas can be retrieved by canvas.getContext("2d"); + * @param {CanvasRenderingContext2D} ctx + */ + + }, { + key: "draw", + value: function draw(ctx) { + var values = this.getFormattingValues(); + + if (values.hidden) { + return; + } // get the via node from the edge type + + + var viaNode = this.edgeType.getViaNode(); + var arrowData = {}; // restore edge targets to defaults + + this.edgeType.fromPoint = this.edgeType.from; + this.edgeType.toPoint = this.edgeType.to; // from and to arrows give a different end point for edges. we set them here + + if (values.fromArrow) { + arrowData.from = this.edgeType.getArrowData(ctx, 'from', viaNode, this.selected, this.hover, values); + if (values.arrowStrikethrough === false) this.edgeType.fromPoint = arrowData.from.core; + } + + if (values.toArrow) { + arrowData.to = this.edgeType.getArrowData(ctx, 'to', viaNode, this.selected, this.hover, values); + if (values.arrowStrikethrough === false) this.edgeType.toPoint = arrowData.to.core; + } // the middle arrow depends on the line, which can depend on the to and from arrows so we do this one lastly. + + + if (values.middleArrow) { + arrowData.middle = this.edgeType.getArrowData(ctx, 'middle', viaNode, this.selected, this.hover, values); + } // draw everything + + + this.edgeType.drawLine(ctx, values, this.selected, this.hover, viaNode); + this.drawArrows(ctx, arrowData, values); + this.drawLabel(ctx, viaNode); + } + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {Object} arrowData + * @param {ArrowOptions} values + */ + + }, { + key: "drawArrows", + value: function drawArrows(ctx, arrowData, values) { + if (values.fromArrow) { + this.edgeType.drawArrowHead(ctx, values, this.selected, this.hover, arrowData.from); + } + + if (values.middleArrow) { + this.edgeType.drawArrowHead(ctx, values, this.selected, this.hover, arrowData.middle); + } + + if (values.toArrow) { + this.edgeType.drawArrowHead(ctx, values, this.selected, this.hover, arrowData.to); + } + } + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {Node} viaNode + */ + + }, { + key: "drawLabel", + value: function drawLabel(ctx, viaNode) { + if (this.options.label !== undefined) { + // set style + var node1 = this.from; + var node2 = this.to; + + if (this.labelModule.differentState(this.selected, this.hover)) { + this.labelModule.getTextSize(ctx, this.selected, this.hover); + } + + if (node1.id != node2.id) { + this.labelModule.pointToSelf = false; + var point = this.edgeType.getPoint(0.5, viaNode); + ctx.save(); + + var rotationPoint = this._getRotation(ctx); + + if (rotationPoint.angle != 0) { + ctx.translate(rotationPoint.x, rotationPoint.y); + ctx.rotate(rotationPoint.angle); + } // draw the label + + + this.labelModule.draw(ctx, point.x, point.y, this.selected, this.hover); + /* + // Useful debug code: draw a border around the label + // This should **not** be enabled in production! + var size = this.labelModule.getSize();; // ;; intentional so lint catches it + ctx.strokeStyle = "#ff0000"; + ctx.strokeRect(size.left, size.top, size.width, size.height); + // End debug code + */ + + ctx.restore(); + } else { + // Ignore the orientations. + this.labelModule.pointToSelf = true; + var x, y; + var radius = this.options.selfReferenceSize; + + if (node1.shape.width > node1.shape.height) { + x = node1.x + node1.shape.width * 0.5; + y = node1.y - radius; + } else { + x = node1.x + radius; + y = node1.y - node1.shape.height * 0.5; + } + + point = this._pointOnCircle(x, y, radius, 0.125); + this.labelModule.draw(ctx, point.x, point.y, this.selected, this.hover); + } + } + } + /** + * Determine all visual elements of this edge instance, in which the given + * point falls within the bounding shape. + * + * @param {point} point + * @returns {Array.} list with the items which are on the point + */ + + }, { + key: "getItemsOnPoint", + value: function getItemsOnPoint(point) { + var ret = []; + + if (this.labelModule.visible()) { + var rotationPoint = this._getRotation(); + + if (ComponentUtil.pointInRect(this.labelModule.getSize(), point, rotationPoint)) { + ret.push({ + edgeId: this.id, + labelId: 0 + }); + } + } + + var obj = { + left: point.x, + top: point.y + }; + + if (this.isOverlappingWith(obj)) { + ret.push({ + edgeId: this.id + }); + } + + return ret; + } + /** + * Check if this object is overlapping with the provided object + * @param {Object} obj an object with parameters left, top + * @return {boolean} True if location is located on the edge + */ + + }, { + key: "isOverlappingWith", + value: function isOverlappingWith(obj) { + if (this.connected) { + var distMax = 10; + var xFrom = this.from.x; + var yFrom = this.from.y; + var xTo = this.to.x; + var yTo = this.to.y; + var xObj = obj.left; + var yObj = obj.top; + var dist = this.edgeType.getDistanceToEdge(xFrom, yFrom, xTo, yTo, xObj, yObj); + return dist < distMax; + } else { + return false; + } + } + /** + * Determine the rotation point, if any. + * + * @param {CanvasRenderingContext2D} [ctx] if passed, do a recalculation of the label size + * @returns {rotationPoint} the point to rotate around and the angle in radians to rotate + * @private + */ + + }, { + key: "_getRotation", + value: function _getRotation(ctx) { + var viaNode = this.edgeType.getViaNode(); + var point = this.edgeType.getPoint(0.5, viaNode); + + if (ctx !== undefined) { + this.labelModule.calculateLabelSize(ctx, this.selected, this.hover, point.x, point.y); + } + + var ret = { + x: point.x, + y: this.labelModule.size.yLine, + angle: 0 + }; + + if (!this.labelModule.visible()) { + return ret; // Don't even bother doing the atan2, there's nothing to draw + } + + if (this.options.font.align === "horizontal") { + return ret; // No need to calculate angle + } + + var dy = this.from.y - this.to.y; + var dx = this.from.x - this.to.x; + var angle = Math.atan2(dy, dx); // radians + // rotate so that label is readable + + if (angle < -1 && dx < 0 || angle > 0 && dx < 0) { + angle += Math.PI; + } + + ret.angle = angle; + return ret; + } + /** + * Get a point on a circle + * @param {number} x + * @param {number} y + * @param {number} radius + * @param {number} percentage Value between 0 (line start) and 1 (line end) + * @return {Object} point + * @private + */ + + }, { + key: "_pointOnCircle", + value: function _pointOnCircle(x, y, radius, percentage) { + var angle = percentage * 2 * Math.PI; + return { + x: x + radius * Math.cos(angle), + y: y - radius * Math.sin(angle) + }; + } + /** + * Sets selected state to true + */ + + }, { + key: "select", + value: function select() { + this.selected = true; + } + /** + * Sets selected state to false + */ + + }, { + key: "unselect", + value: function unselect() { + this.selected = false; + } + /** + * cleans all required things on delete + * @returns {*} + */ + + }, { + key: "cleanup", + value: function cleanup() { + return this.edgeType.cleanup(); + } + /** + * Remove edge from the list and perform necessary cleanup. + */ + + }, { + key: "remove", + value: function remove() { + this.cleanup(); + this.disconnect(); + delete this.body.edges[this.id]; + } + /** + * Check if both connecting nodes exist + * @returns {boolean} + */ + + }, { + key: "endPointsValid", + value: function endPointsValid() { + return this.body.nodes[this.fromId] !== undefined && this.body.nodes[this.toId] !== undefined; + } + }], [{ + key: "parseOptions", + value: function parseOptions(parentOptions, newOptions) { + var allowDeletion = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; + var globalOptions = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {}; + var copyFromGlobals = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false; + var fields = ['arrowStrikethrough', 'id', 'from', 'hidden', 'hoverWidth', 'labelHighlightBold', 'length', 'line', 'opacity', 'physics', 'scaling', 'selectionWidth', 'selfReferenceSize', 'to', 'title', 'value', 'width', 'font', 'chosen', 'widthConstraint']; // only deep extend the items in the field array. These do not have shorthand. + + util.selectiveDeepExtend(fields, parentOptions, newOptions, allowDeletion); // Only copy label if it's a legal value. + + if (ComponentUtil.isValidLabel(newOptions.label)) { + parentOptions.label = newOptions.label; + } else if (!ComponentUtil.isValidLabel(parentOptions.label)) { + parentOptions.label = undefined; + } + + util.mergeOptions(parentOptions, newOptions, 'smooth', globalOptions); + util.mergeOptions(parentOptions, newOptions, 'shadow', globalOptions); + util.mergeOptions(parentOptions, newOptions, 'background', globalOptions); + + if (newOptions.dashes !== undefined && newOptions.dashes !== null) { + parentOptions.dashes = newOptions.dashes; + } else if (allowDeletion === true && newOptions.dashes === null) { + parentOptions.dashes = Object.create(globalOptions.dashes); // this sets the pointer of the option back to the global option. + } // set the scaling newOptions + + + if (newOptions.scaling !== undefined && newOptions.scaling !== null) { + if (newOptions.scaling.min !== undefined) { + parentOptions.scaling.min = newOptions.scaling.min; + } + + if (newOptions.scaling.max !== undefined) { + parentOptions.scaling.max = newOptions.scaling.max; + } + + util.mergeOptions(parentOptions.scaling, newOptions.scaling, 'label', globalOptions.scaling); + } else if (allowDeletion === true && newOptions.scaling === null) { + parentOptions.scaling = Object.create(globalOptions.scaling); // this sets the pointer of the option back to the global option. + } // handle multiple input cases for arrows + + + if (newOptions.arrows !== undefined && newOptions.arrows !== null) { + if (typeof newOptions.arrows === 'string') { + var arrows = newOptions.arrows.toLowerCase(); + parentOptions.arrows.to.enabled = arrows.indexOf("to") != -1; + parentOptions.arrows.middle.enabled = arrows.indexOf("middle") != -1; + parentOptions.arrows.from.enabled = arrows.indexOf("from") != -1; + } else if (_typeof_1$1(newOptions.arrows) === 'object') { + util.mergeOptions(parentOptions.arrows, newOptions.arrows, 'to', globalOptions.arrows); + util.mergeOptions(parentOptions.arrows, newOptions.arrows, 'middle', globalOptions.arrows); + util.mergeOptions(parentOptions.arrows, newOptions.arrows, 'from', globalOptions.arrows); + } else { + throw new Error("The arrow newOptions can only be an object or a string. Refer to the documentation. You used:" + JSON.stringify(newOptions.arrows)); + } + } else if (allowDeletion === true && newOptions.arrows === null) { + parentOptions.arrows = Object.create(globalOptions.arrows); // this sets the pointer of the option back to the global option. + } // handle multiple input cases for color + + + if (newOptions.color !== undefined && newOptions.color !== null) { + var fromColor = newOptions.color; + var toColor = parentOptions.color; // If passed, fill in values from default options - required in the case of no prototype bridging + + if (copyFromGlobals) { + util.deepExtend(toColor, globalOptions.color, false, allowDeletion); + } else { + // Clear local properties - need to do it like this in order to retain prototype bridges + for (var i in toColor) { + if (toColor.hasOwnProperty(i)) { + delete toColor[i]; + } + } + } + + if (util.isString(toColor)) { + toColor.color = toColor; + toColor.highlight = toColor; + toColor.hover = toColor; + toColor.inherit = false; + + if (fromColor.opacity === undefined) { + toColor.opacity = 1.0; // set default + } + } else { + var colorsDefined = false; + + if (fromColor.color !== undefined) { + toColor.color = fromColor.color; + colorsDefined = true; + } + + if (fromColor.highlight !== undefined) { + toColor.highlight = fromColor.highlight; + colorsDefined = true; + } + + if (fromColor.hover !== undefined) { + toColor.hover = fromColor.hover; + colorsDefined = true; + } + + if (fromColor.inherit !== undefined) { + toColor.inherit = fromColor.inherit; + } + + if (fromColor.opacity !== undefined) { + toColor.opacity = Math.min(1, Math.max(0, fromColor.opacity)); + } + + if (colorsDefined === true) { + toColor.inherit = false; + } else { + if (toColor.inherit === undefined) { + toColor.inherit = 'from'; // Set default + } + } + } + } else if (allowDeletion === true && newOptions.color === null) { + parentOptions.color = util.bridgeObject(globalOptions.color); // set the object back to the global options + } + + if (allowDeletion === true && newOptions.font === null) { + parentOptions.font = util.bridgeObject(globalOptions.font); // set the object back to the global options + } + } + }]); + + return Edge; +}(); + +/** + * Handler for Edges + */ + +var EdgesHandler = +/*#__PURE__*/ +function () { + /** + * @param {Object} body + * @param {Array.} images + * @param {Array.} groups + */ + function EdgesHandler(body, images, groups) { + var _this = this; + + classCallCheck$1(this, EdgesHandler); + + this.body = body; + this.images = images; + this.groups = groups; // create the edge API in the body container + + this.body.functions.createEdge = this.create.bind(this); + this.edgesListeners = { + add: function add(event, params) { + _this.add(params.items); + }, + update: function update(event, params) { + _this.update(params.items); + }, + remove: function remove(event, params) { + _this.remove(params.items); + } + }; + this.options = {}; + this.defaultOptions = { + arrows: { + to: { + enabled: false, + scaleFactor: 1, + type: 'arrow' + }, + // boolean / {arrowScaleFactor:1} / {enabled: false, arrowScaleFactor:1} + middle: { + enabled: false, + scaleFactor: 1, + type: 'arrow' + }, + from: { + enabled: false, + scaleFactor: 1, + type: 'arrow' + } + }, + arrowStrikethrough: true, + color: { + color: '#848484', + highlight: '#848484', + hover: '#848484', + inherit: 'from', + opacity: 1.0 + }, + dashes: false, + font: { + color: '#343434', + size: 14, + // px + face: 'arial', + background: 'none', + strokeWidth: 2, + // px + strokeColor: '#ffffff', + align: 'horizontal', + multi: false, + vadjust: 0, + bold: { + mod: 'bold' + }, + boldital: { + mod: 'bold italic' + }, + ital: { + mod: 'italic' + }, + mono: { + mod: '', + size: 15, + // px + face: 'courier new', + vadjust: 2 + } + }, + hidden: false, + hoverWidth: 1.5, + label: undefined, + labelHighlightBold: true, + length: undefined, + physics: true, + scaling: { + min: 1, + max: 15, + label: { + enabled: true, + min: 14, + max: 30, + maxVisible: 30, + drawThreshold: 5 + }, + customScalingFunction: function customScalingFunction(min, max, total, value) { + if (max === min) { + return 0.5; + } else { + var scale = 1 / (max - min); + return Math.max(0, (value - min) * scale); + } + } + }, + selectionWidth: 1.5, + selfReferenceSize: 20, + shadow: { + enabled: false, + color: 'rgba(0,0,0,0.5)', + size: 10, + x: 5, + y: 5 + }, + background: { + enabled: false, + color: 'rgba(111,111,111,1)', + size: 10, + dashes: false + }, + smooth: { + enabled: true, + type: "dynamic", + forceDirection: 'none', + roundness: 0.5 + }, + title: undefined, + width: 1, + value: undefined + }; + util.deepExtend(this.options, this.defaultOptions); + this.bindEventListeners(); + } + /** + * Binds event listeners + */ + + + createClass$1(EdgesHandler, [{ + key: "bindEventListeners", + value: function bindEventListeners() { + var _this2 = this; + + // this allows external modules to force all dynamic curves to turn static. + this.body.emitter.on("_forceDisableDynamicCurves", function (type) { + var emit = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; + + if (type === 'dynamic') { + type = 'continuous'; + } + + var dataChanged = false; + + for (var edgeId in _this2.body.edges) { + if (_this2.body.edges.hasOwnProperty(edgeId)) { + var edge = _this2.body.edges[edgeId]; + var edgeData = _this2.body.data.edges._data[edgeId]; // only forcibly remove the smooth curve if the data has been set of the edge has the smooth curves defined. + // this is because a change in the global would not affect these curves. + + if (edgeData !== undefined) { + var smoothOptions = edgeData.smooth; + + if (smoothOptions !== undefined) { + if (smoothOptions.enabled === true && smoothOptions.type === 'dynamic') { + if (type === undefined) { + edge.setOptions({ + smooth: false + }); + } else { + edge.setOptions({ + smooth: { + type: type + } + }); + } + + dataChanged = true; + } + } + } + } + } + + if (emit === true && dataChanged === true) { + _this2.body.emitter.emit("_dataChanged"); + } + }); // this is called when options of EXISTING nodes or edges have changed. + // + // NOTE: Not true, called when options have NOT changed, for both existing as well as new nodes. + // See update() for logic. + // TODO: Verify and examine the consequences of this. It might still trigger when + // non-option fields have changed, but then reconnecting edges is still useless. + // Alternatively, it might also be called when edges are removed. + // + + this.body.emitter.on("_dataUpdated", function () { + _this2.reconnectEdges(); + }); // refresh the edges. Used when reverting from hierarchical layout + + this.body.emitter.on("refreshEdges", this.refresh.bind(this)); + this.body.emitter.on("refresh", this.refresh.bind(this)); + this.body.emitter.on("destroy", function () { + util.forEach(_this2.edgesListeners, function (callback, event) { + if (_this2.body.data.edges) _this2.body.data.edges.off(event, callback); + }); + delete _this2.body.functions.createEdge; + delete _this2.edgesListeners.add; + delete _this2.edgesListeners.update; + delete _this2.edgesListeners.remove; + delete _this2.edgesListeners; + }); + } + /** + * + * @param {Object} options + */ + + }, { + key: "setOptions", + value: function setOptions(options) { + if (options !== undefined) { + // use the parser from the Edge class to fill in all shorthand notations + Edge.parseOptions(this.options, options, true, this.defaultOptions, true); // update smooth settings in all edges + + var dataChanged = false; + + if (options.smooth !== undefined) { + for (var edgeId in this.body.edges) { + if (this.body.edges.hasOwnProperty(edgeId)) { + dataChanged = this.body.edges[edgeId].updateEdgeType() || dataChanged; + } + } + } // update fonts in all edges + + + if (options.font !== undefined) { + for (var _edgeId in this.body.edges) { + if (this.body.edges.hasOwnProperty(_edgeId)) { + this.body.edges[_edgeId].updateLabelModule(); + } + } + } // update the state of the variables if needed + + + if (options.hidden !== undefined || options.physics !== undefined || dataChanged === true) { + this.body.emitter.emit('_dataChanged'); + } + } + } + /** + * Load edges by reading the data table + * @param {Array | DataSet | DataView} edges The data containing the edges. + * @param {boolean} [doNotEmit=false] + * @private + */ + + }, { + key: "setData", + value: function setData(edges) { + var _this3 = this; + + var doNotEmit = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; + var oldEdgesData = this.body.data.edges; + + if (edges instanceof DataSet || edges instanceof DataView) { + this.body.data.edges = edges; + } else if (Array.isArray(edges)) { + this.body.data.edges = new DataSet(); + this.body.data.edges.add(edges); + } else if (!edges) { + this.body.data.edges = new DataSet(); + } else { + throw new TypeError('Array or DataSet expected'); + } // TODO: is this null or undefined or false? + + + if (oldEdgesData) { + // unsubscribe from old dataset + util.forEach(this.edgesListeners, function (callback, event) { + oldEdgesData.off(event, callback); + }); + } // remove drawn edges + + + this.body.edges = {}; // TODO: is this null or undefined or false? + + if (this.body.data.edges) { + // subscribe to new dataset + util.forEach(this.edgesListeners, function (callback, event) { + _this3.body.data.edges.on(event, callback); + }); // draw all new nodes + + var ids = this.body.data.edges.getIds(); + this.add(ids, true); + } + + this.body.emitter.emit('_adjustEdgesForHierarchicalLayout'); + + if (doNotEmit === false) { + this.body.emitter.emit("_dataChanged"); + } + } + /** + * Add edges + * @param {number[] | string[]} ids + * @param {boolean} [doNotEmit=false] + * @private + */ + + }, { + key: "add", + value: function add(ids) { + var doNotEmit = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; + var edges = this.body.edges; + var edgesData = this.body.data.edges; + + for (var i = 0; i < ids.length; i++) { + var id = ids[i]; + var oldEdge = edges[id]; + + if (oldEdge) { + oldEdge.disconnect(); + } + + var data = edgesData.get(id, { + "showInternalIds": true + }); + edges[id] = this.create(data); + } + + this.body.emitter.emit('_adjustEdgesForHierarchicalLayout'); + + if (doNotEmit === false) { + this.body.emitter.emit("_dataChanged"); + } + } + /** + * Update existing edges, or create them when not yet existing + * @param {number[] | string[]} ids + * @private + */ + + }, { + key: "update", + value: function update(ids) { + var edges = this.body.edges; + var edgesData = this.body.data.edges; + var dataChanged = false; + + for (var i = 0; i < ids.length; i++) { + var id = ids[i]; + var data = edgesData.get(id); + var edge = edges[id]; + + if (edge !== undefined) { + // update edge + edge.disconnect(); + dataChanged = edge.setOptions(data) || dataChanged; // if a support node is added, data can be changed. + + edge.connect(); + } else { + // create edge + this.body.edges[id] = this.create(data); + dataChanged = true; + } + } + + if (dataChanged === true) { + this.body.emitter.emit('_adjustEdgesForHierarchicalLayout'); + this.body.emitter.emit("_dataChanged"); + } else { + this.body.emitter.emit("_dataUpdated"); + } + } + /** + * Remove existing edges. Non existing ids will be ignored + * @param {number[] | string[]} ids + * @param {boolean} [emit=true] + * @private + */ + + }, { + key: "remove", + value: function remove(ids) { + var emit = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; + if (ids.length === 0) return; // early out + + var edges = this.body.edges; + util.forEach(ids, function (id) { + var edge = edges[id]; + + if (edge !== undefined) { + edge.remove(); + } + }); + + if (emit) { + this.body.emitter.emit("_dataChanged"); + } + } + /** + * Refreshes Edge Handler + */ + + }, { + key: "refresh", + value: function refresh() { + var _this4 = this; + + util.forEach(this.body.edges, function (edge, edgeId) { + var data = _this4.body.data.edges._data[edgeId]; + + if (data !== undefined) { + edge.setOptions(data); + } + }); + } + /** + * + * @param {Object} properties + * @returns {Edge} + */ + + }, { + key: "create", + value: function create(properties) { + return new Edge(properties, this.body, this.options, this.defaultOptions); + } + /** + * Reconnect all edges + * @private + */ + + }, { + key: "reconnectEdges", + value: function reconnectEdges() { + var id; + var nodes = this.body.nodes; + var edges = this.body.edges; + + for (id in nodes) { + if (nodes.hasOwnProperty(id)) { + nodes[id].edges = []; + } + } + + for (id in edges) { + if (edges.hasOwnProperty(id)) { + var edge = edges[id]; + edge.from = null; + edge.to = null; + edge.connect(); + } + } + } + /** + * + * @param {Edge.id} edgeId + * @returns {Array} + */ + + }, { + key: "getConnectedNodes", + value: function getConnectedNodes(edgeId) { + var nodeList = []; + + if (this.body.edges[edgeId] !== undefined) { + var edge = this.body.edges[edgeId]; + + if (edge.fromId !== undefined) { + nodeList.push(edge.fromId); + } + + if (edge.toId !== undefined) { + nodeList.push(edge.toId); + } + } + + return nodeList; + } + /** + * There is no direct relation between the nodes and the edges DataSet, + * so the right place to do call this is in the handler for event `_dataUpdated`. + */ + + }, { + key: "_updateState", + value: function _updateState() { + this._addMissingEdges(); + + this._removeInvalidEdges(); + } + /** + * Scan for missing nodes and remove corresponding edges, if any. + * @private + */ + + }, { + key: "_removeInvalidEdges", + value: function _removeInvalidEdges() { + var _this5 = this; + + var edgesToDelete = []; + util.forEach(this.body.edges, function (edge, id) { + var toNode = _this5.body.nodes[edge.toId]; + var fromNode = _this5.body.nodes[edge.fromId]; // Skip clustering edges here, let the Clustering module handle those + + if (toNode !== undefined && toNode.isCluster === true || fromNode !== undefined && fromNode.isCluster === true) { + return; + } + + if (toNode === undefined || fromNode === undefined) { + edgesToDelete.push(id); + } + }); + this.remove(edgesToDelete, false); + } + /** + * add all edges from dataset that are not in the cached state + * @private + */ + + }, { + key: "_addMissingEdges", + value: function _addMissingEdges() { + var edgesData = this.body.data.edges; + + if (edgesData === undefined || edgesData === null) { + return; // No edges DataSet yet; can happen on startup + } + + var edges = this.body.edges; + var addIds = []; + edgesData.forEach(function (edgeData, edgeId) { + var edge = edges[edgeId]; + + if (edge === undefined) { + addIds.push(edgeId); + } + }); + this.add(addIds, true); + } + }]); + + return EdgesHandler; +}(); + +/** + * Barnes Hut Solver + */ +var BarnesHutSolver = +/*#__PURE__*/ +function () { + /** + * @param {Object} body + * @param {{physicsNodeIndices: Array, physicsEdgeIndices: Array, forces: {}, velocities: {}}} physicsBody + * @param {Object} options + */ + function BarnesHutSolver(body, physicsBody, options) { + classCallCheck$1(this, BarnesHutSolver); + + this.body = body; + this.physicsBody = physicsBody; + this.barnesHutTree; + this.setOptions(options); + this.randomSeed = 5; // debug: show grid + // this.body.emitter.on("afterDrawing", (ctx) => {this._debug(ctx,'#ff0000')}) + } + /** + * + * @param {Object} options + */ + + + createClass$1(BarnesHutSolver, [{ + key: "setOptions", + value: function setOptions(options) { + this.options = options; + this.thetaInversed = 1 / this.options.theta; // if 1 then min distance = 0.5, if 0.5 then min distance = 0.5 + 0.5*node.shape.radius + + this.overlapAvoidanceFactor = 1 - Math.max(0, Math.min(1, this.options.avoidOverlap)); + } + /** + * + * @returns {number} random integer + */ + + }, { + key: "seededRandom", + value: function seededRandom() { + var x = Math.sin(this.randomSeed++) * 10000; + return x - Math.floor(x); + } + /** + * This function calculates the forces the nodes apply on each other based on a gravitational model. + * The Barnes Hut method is used to speed up this N-body simulation. + * + * @private + */ + + }, { + key: "solve", + value: function solve() { + if (this.options.gravitationalConstant !== 0 && this.physicsBody.physicsNodeIndices.length > 0) { + var node; + var nodes = this.body.nodes; + var nodeIndices = this.physicsBody.physicsNodeIndices; + var nodeCount = nodeIndices.length; // create the tree + + var barnesHutTree = this._formBarnesHutTree(nodes, nodeIndices); // for debugging + + + this.barnesHutTree = barnesHutTree; // place the nodes one by one recursively + + for (var i = 0; i < nodeCount; i++) { + node = nodes[nodeIndices[i]]; + + if (node.options.mass > 0) { + // starting with root is irrelevant, it never passes the BarnesHutSolver condition + this._getForceContributions(barnesHutTree.root, node); + } + } + } + } + /** + * @param {Object} parentBranch + * @param {Node} node + * @private + */ + + }, { + key: "_getForceContributions", + value: function _getForceContributions(parentBranch, node) { + this._getForceContribution(parentBranch.children.NW, node); + + this._getForceContribution(parentBranch.children.NE, node); + + this._getForceContribution(parentBranch.children.SW, node); + + this._getForceContribution(parentBranch.children.SE, node); + } + /** + * This function traverses the barnesHutTree. It checks when it can approximate distant nodes with their center of mass. + * If a region contains a single node, we check if it is not itself, then we apply the force. + * + * @param {Object} parentBranch + * @param {Node} node + * @private + */ + + }, { + key: "_getForceContribution", + value: function _getForceContribution(parentBranch, node) { + // we get no force contribution from an empty region + if (parentBranch.childrenCount > 0) { + var dx, dy, distance; // get the distance from the center of mass to the node. + + dx = parentBranch.centerOfMass.x - node.x; + dy = parentBranch.centerOfMass.y - node.y; + distance = Math.sqrt(dx * dx + dy * dy); // BarnesHutSolver condition + // original condition : s/d < theta = passed === d/s > 1/theta = passed + // calcSize = 1/s --> d * 1/s > 1/theta = passed + + if (distance * parentBranch.calcSize > this.thetaInversed) { + this._calculateForces(distance, dx, dy, node, parentBranch); + } else { + // Did not pass the condition, go into children if available + if (parentBranch.childrenCount === 4) { + this._getForceContributions(parentBranch, node); + } else { + // parentBranch must have only one node, if it was empty we wouldnt be here + if (parentBranch.children.data.id != node.id) { + // if it is not self + this._calculateForces(distance, dx, dy, node, parentBranch); + } + } + } + } + } + /** + * Calculate the forces based on the distance. + * + * @param {number} distance + * @param {number} dx + * @param {number} dy + * @param {Node} node + * @param {Object} parentBranch + * @private + */ + + }, { + key: "_calculateForces", + value: function _calculateForces(distance, dx, dy, node, parentBranch) { + if (distance === 0) { + distance = 0.1; + dx = distance; + } + + if (this.overlapAvoidanceFactor < 1 && node.shape.radius) { + distance = Math.max(0.1 + this.overlapAvoidanceFactor * node.shape.radius, distance - node.shape.radius); + } // the dividing by the distance cubed instead of squared allows us to get the fx and fy components without sines and cosines + // it is shorthand for gravityforce with distance squared and fx = dx/distance * gravityForce + + + var gravityForce = this.options.gravitationalConstant * parentBranch.mass * node.options.mass / Math.pow(distance, 3); + var fx = dx * gravityForce; + var fy = dy * gravityForce; + this.physicsBody.forces[node.id].x += fx; + this.physicsBody.forces[node.id].y += fy; + } + /** + * This function constructs the barnesHut tree recursively. It creates the root, splits it and starts placing the nodes. + * + * @param {Array.} nodes + * @param {Array.} nodeIndices + * @returns {{root: {centerOfMass: {x: number, y: number}, mass: number, range: {minX: number, maxX: number, minY: number, maxY: number}, size: number, calcSize: number, children: {data: null}, maxWidth: number, level: number, childrenCount: number}}} BarnesHutTree + * @private + */ + + }, { + key: "_formBarnesHutTree", + value: function _formBarnesHutTree(nodes, nodeIndices) { + var node; + var nodeCount = nodeIndices.length; + var minX = nodes[nodeIndices[0]].x; + var minY = nodes[nodeIndices[0]].y; + var maxX = nodes[nodeIndices[0]].x; + var maxY = nodes[nodeIndices[0]].y; // get the range of the nodes + + for (var i = 1; i < nodeCount; i++) { + var _node = nodes[nodeIndices[i]]; + var x = _node.x; + var y = _node.y; + + if (_node.options.mass > 0) { + if (x < minX) { + minX = x; + } + + if (x > maxX) { + maxX = x; + } + + if (y < minY) { + minY = y; + } + + if (y > maxY) { + maxY = y; + } + } + } // make the range a square + + + var sizeDiff = Math.abs(maxX - minX) - Math.abs(maxY - minY); // difference between X and Y + + if (sizeDiff > 0) { + minY -= 0.5 * sizeDiff; + maxY += 0.5 * sizeDiff; + } // xSize > ySize + else { + minX += 0.5 * sizeDiff; + maxX -= 0.5 * sizeDiff; + } // xSize < ySize + + + var minimumTreeSize = 1e-5; + var rootSize = Math.max(minimumTreeSize, Math.abs(maxX - minX)); + var halfRootSize = 0.5 * rootSize; + var centerX = 0.5 * (minX + maxX), + centerY = 0.5 * (minY + maxY); // construct the barnesHutTree + + var barnesHutTree = { + root: { + centerOfMass: { + x: 0, + y: 0 + }, + mass: 0, + range: { + minX: centerX - halfRootSize, + maxX: centerX + halfRootSize, + minY: centerY - halfRootSize, + maxY: centerY + halfRootSize + }, + size: rootSize, + calcSize: 1 / rootSize, + children: { + data: null + }, + maxWidth: 0, + level: 0, + childrenCount: 4 + } + }; + + this._splitBranch(barnesHutTree.root); // place the nodes one by one recursively + + + for (var _i = 0; _i < nodeCount; _i++) { + node = nodes[nodeIndices[_i]]; + + if (node.options.mass > 0) { + this._placeInTree(barnesHutTree.root, node); + } + } // make global + + + return barnesHutTree; + } + /** + * this updates the mass of a branch. this is increased by adding a node. + * + * @param {Object} parentBranch + * @param {Node} node + * @private + */ + + }, { + key: "_updateBranchMass", + value: function _updateBranchMass(parentBranch, node) { + var centerOfMass = parentBranch.centerOfMass; + var totalMass = parentBranch.mass + node.options.mass; + var totalMassInv = 1 / totalMass; + centerOfMass.x = centerOfMass.x * parentBranch.mass + node.x * node.options.mass; + centerOfMass.x *= totalMassInv; + centerOfMass.y = centerOfMass.y * parentBranch.mass + node.y * node.options.mass; + centerOfMass.y *= totalMassInv; + parentBranch.mass = totalMass; + var biggestSize = Math.max(Math.max(node.height, node.radius), node.width); + parentBranch.maxWidth = parentBranch.maxWidth < biggestSize ? biggestSize : parentBranch.maxWidth; + } + /** + * determine in which branch the node will be placed. + * + * @param {Object} parentBranch + * @param {Node} node + * @param {boolean} skipMassUpdate + * @private + */ + + }, { + key: "_placeInTree", + value: function _placeInTree(parentBranch, node, skipMassUpdate) { + if (skipMassUpdate != true || skipMassUpdate === undefined) { + // update the mass of the branch. + this._updateBranchMass(parentBranch, node); + } + + var range = parentBranch.children.NW.range; + var region; + + if (range.maxX > node.x) { + // in NW or SW + if (range.maxY > node.y) { + region = "NW"; + } else { + region = "SW"; + } + } else { + // in NE or SE + if (range.maxY > node.y) { + region = "NE"; + } else { + region = "SE"; + } + } + + this._placeInRegion(parentBranch, node, region); + } + /** + * actually place the node in a region (or branch) + * + * @param {Object} parentBranch + * @param {Node} node + * @param {'NW'| 'NE' | 'SW' | 'SE'} region + * @private + */ + + }, { + key: "_placeInRegion", + value: function _placeInRegion(parentBranch, node, region) { + var children = parentBranch.children[region]; + + switch (children.childrenCount) { + case 0: + // place node here + children.children.data = node; + children.childrenCount = 1; + + this._updateBranchMass(children, node); + + break; + + case 1: + // convert into children + // if there are two nodes exactly overlapping (on init, on opening of cluster etc.) + // we move one node a little bit and we do not put it in the tree. + if (children.children.data.x === node.x && children.children.data.y === node.y) { + node.x += this.seededRandom(); + node.y += this.seededRandom(); + } else { + this._splitBranch(children); + + this._placeInTree(children, node); + } + + break; + + case 4: + // place in branch + this._placeInTree(children, node); + + break; + } + } + /** + * this function splits a branch into 4 sub branches. If the branch contained a node, we place it in the subbranch + * after the split is complete. + * + * @param {Object} parentBranch + * @private + */ + + }, { + key: "_splitBranch", + value: function _splitBranch(parentBranch) { + // if the branch is shaded with a node, replace the node in the new subset. + var containedNode = null; + + if (parentBranch.childrenCount === 1) { + containedNode = parentBranch.children.data; + parentBranch.mass = 0; + parentBranch.centerOfMass.x = 0; + parentBranch.centerOfMass.y = 0; + } + + parentBranch.childrenCount = 4; + parentBranch.children.data = null; + + this._insertRegion(parentBranch, "NW"); + + this._insertRegion(parentBranch, "NE"); + + this._insertRegion(parentBranch, "SW"); + + this._insertRegion(parentBranch, "SE"); + + if (containedNode != null) { + this._placeInTree(parentBranch, containedNode); + } + } + /** + * This function subdivides the region into four new segments. + * Specifically, this inserts a single new segment. + * It fills the children section of the parentBranch + * + * @param {Object} parentBranch + * @param {'NW'| 'NE' | 'SW' | 'SE'} region + * @private + */ + + }, { + key: "_insertRegion", + value: function _insertRegion(parentBranch, region) { + var minX, maxX, minY, maxY; + var childSize = 0.5 * parentBranch.size; + + switch (region) { + case "NW": + minX = parentBranch.range.minX; + maxX = parentBranch.range.minX + childSize; + minY = parentBranch.range.minY; + maxY = parentBranch.range.minY + childSize; + break; + + case "NE": + minX = parentBranch.range.minX + childSize; + maxX = parentBranch.range.maxX; + minY = parentBranch.range.minY; + maxY = parentBranch.range.minY + childSize; + break; + + case "SW": + minX = parentBranch.range.minX; + maxX = parentBranch.range.minX + childSize; + minY = parentBranch.range.minY + childSize; + maxY = parentBranch.range.maxY; + break; + + case "SE": + minX = parentBranch.range.minX + childSize; + maxX = parentBranch.range.maxX; + minY = parentBranch.range.minY + childSize; + maxY = parentBranch.range.maxY; + break; + } + + parentBranch.children[region] = { + centerOfMass: { + x: 0, + y: 0 + }, + mass: 0, + range: { + minX: minX, + maxX: maxX, + minY: minY, + maxY: maxY + }, + size: 0.5 * parentBranch.size, + calcSize: 2 * parentBranch.calcSize, + children: { + data: null + }, + maxWidth: 0, + level: parentBranch.level + 1, + childrenCount: 0 + }; + } //--------------------------- DEBUGGING BELOW ---------------------------// + + /** + * This function is for debugging purposed, it draws the tree. + * + * @param {CanvasRenderingContext2D} ctx + * @param {string} color + * @private + */ + + }, { + key: "_debug", + value: function _debug(ctx, color) { + if (this.barnesHutTree !== undefined) { + ctx.lineWidth = 1; + + this._drawBranch(this.barnesHutTree.root, ctx, color); + } + } + /** + * This function is for debugging purposes. It draws the branches recursively. + * + * @param {Object} branch + * @param {CanvasRenderingContext2D} ctx + * @param {string} color + * @private + */ + + }, { + key: "_drawBranch", + value: function _drawBranch(branch, ctx, color) { + if (color === undefined) { + color = "#FF0000"; + } + + if (branch.childrenCount === 4) { + this._drawBranch(branch.children.NW, ctx); + + this._drawBranch(branch.children.NE, ctx); + + this._drawBranch(branch.children.SE, ctx); + + this._drawBranch(branch.children.SW, ctx); + } + + ctx.strokeStyle = color; + ctx.beginPath(); + ctx.moveTo(branch.range.minX, branch.range.minY); + ctx.lineTo(branch.range.maxX, branch.range.minY); + ctx.stroke(); + ctx.beginPath(); + ctx.moveTo(branch.range.maxX, branch.range.minY); + ctx.lineTo(branch.range.maxX, branch.range.maxY); + ctx.stroke(); + ctx.beginPath(); + ctx.moveTo(branch.range.maxX, branch.range.maxY); + ctx.lineTo(branch.range.minX, branch.range.maxY); + ctx.stroke(); + ctx.beginPath(); + ctx.moveTo(branch.range.minX, branch.range.maxY); + ctx.lineTo(branch.range.minX, branch.range.minY); + ctx.stroke(); + /* + if (branch.mass > 0) { + ctx.circle(branch.centerOfMass.x, branch.centerOfMass.y, 3*branch.mass); + ctx.stroke(); + } + */ + } + }]); + + return BarnesHutSolver; +}(); + +/** + * Repulsion Solver + */ +var RepulsionSolver = +/*#__PURE__*/ +function () { + /** + * @param {Object} body + * @param {{physicsNodeIndices: Array, physicsEdgeIndices: Array, forces: {}, velocities: {}}} physicsBody + * @param {Object} options + */ + function RepulsionSolver(body, physicsBody, options) { + classCallCheck$1(this, RepulsionSolver); + + this.body = body; + this.physicsBody = physicsBody; + this.setOptions(options); + } + /** + * + * @param {Object} options + */ + + + createClass$1(RepulsionSolver, [{ + key: "setOptions", + value: function setOptions(options) { + this.options = options; + } + /** + * Calculate the forces the nodes apply on each other based on a repulsion field. + * This field is linearly approximated. + * + * @private + */ + + }, { + key: "solve", + value: function solve() { + var dx, dy, distance, fx, fy, repulsingForce, node1, node2; + var nodes = this.body.nodes; + var nodeIndices = this.physicsBody.physicsNodeIndices; + var forces = this.physicsBody.forces; // repulsing forces between nodes + + var nodeDistance = this.options.nodeDistance; // approximation constants + + var a = -2 / 3 / nodeDistance; + var b = 4 / 3; // we loop from i over all but the last entree in the array + // j loops from i+1 to the last. This way we do not double count any of the indices, nor i === j + + for (var i = 0; i < nodeIndices.length - 1; i++) { + node1 = nodes[nodeIndices[i]]; + + for (var j = i + 1; j < nodeIndices.length; j++) { + node2 = nodes[nodeIndices[j]]; + dx = node2.x - node1.x; + dy = node2.y - node1.y; + distance = Math.sqrt(dx * dx + dy * dy); // same condition as BarnesHutSolver, making sure nodes are never 100% overlapping. + + if (distance === 0) { + distance = 0.1 * Math.random(); + dx = distance; + } + + if (distance < 2 * nodeDistance) { + if (distance < 0.5 * nodeDistance) { + repulsingForce = 1.0; + } else { + repulsingForce = a * distance + b; // linear approx of 1 / (1 + Math.exp((distance / nodeDistance - 1) * steepness)) + } + + repulsingForce = repulsingForce / distance; + fx = dx * repulsingForce; + fy = dy * repulsingForce; + forces[node1.id].x -= fx; + forces[node1.id].y -= fy; + forces[node2.id].x += fx; + forces[node2.id].y += fy; + } + } + } + } + }]); + + return RepulsionSolver; +}(); + +/** + * Hierarchical Repulsion Solver + */ +var HierarchicalRepulsionSolver = +/*#__PURE__*/ +function () { + /** + * @param {Object} body + * @param {{physicsNodeIndices: Array, physicsEdgeIndices: Array, forces: {}, velocities: {}}} physicsBody + * @param {Object} options + */ + function HierarchicalRepulsionSolver(body, physicsBody, options) { + classCallCheck$1(this, HierarchicalRepulsionSolver); + + this.body = body; + this.physicsBody = physicsBody; + this.setOptions(options); + } + /** + * + * @param {Object} options + */ + + + createClass$1(HierarchicalRepulsionSolver, [{ + key: "setOptions", + value: function setOptions(options) { + this.options = options; + } + /** + * Calculate the forces the nodes apply on each other based on a repulsion field. + * This field is linearly approximated. + * + * @private + */ + + }, { + key: "solve", + value: function solve() { + var dx, dy, distance, fx, fy, repulsingForce, node1, node2, i, j; + var nodes = this.body.nodes; + var nodeIndices = this.physicsBody.physicsNodeIndices; + var forces = this.physicsBody.forces; // repulsing forces between nodes + + var nodeDistance = this.options.nodeDistance; // we loop from i over all but the last entree in the array + // j loops from i+1 to the last. This way we do not double count any of the indices, nor i === j + + for (i = 0; i < nodeIndices.length - 1; i++) { + node1 = nodes[nodeIndices[i]]; + + for (j = i + 1; j < nodeIndices.length; j++) { + node2 = nodes[nodeIndices[j]]; // nodes only affect nodes on their level + + if (node1.level === node2.level) { + dx = node2.x - node1.x; + dy = node2.y - node1.y; + distance = Math.sqrt(dx * dx + dy * dy); + var steepness = 0.05; + + if (distance < nodeDistance) { + repulsingForce = -Math.pow(steepness * distance, 2) + Math.pow(steepness * nodeDistance, 2); + } else { + repulsingForce = 0; + } // normalize force with + + + if (distance === 0) { + distance = 0.01; + } else { + repulsingForce = repulsingForce / distance; + } + + fx = dx * repulsingForce; + fy = dy * repulsingForce; + forces[node1.id].x -= fx; + forces[node1.id].y -= fy; + forces[node2.id].x += fx; + forces[node2.id].y += fy; + } + } + } + } + }]); + + return HierarchicalRepulsionSolver; +}(); + +/** + * Spring Solver + */ +var SpringSolver = +/*#__PURE__*/ +function () { + /** + * @param {Object} body + * @param {{physicsNodeIndices: Array, physicsEdgeIndices: Array, forces: {}, velocities: {}}} physicsBody + * @param {Object} options + */ + function SpringSolver(body, physicsBody, options) { + classCallCheck$1(this, SpringSolver); + + this.body = body; + this.physicsBody = physicsBody; + this.setOptions(options); + } + /** + * + * @param {Object} options + */ + + + createClass$1(SpringSolver, [{ + key: "setOptions", + value: function setOptions(options) { + this.options = options; + } + /** + * This function calculates the springforces on the nodes, accounting for the support nodes. + * + * @private + */ + + }, { + key: "solve", + value: function solve() { + var edgeLength, edge; + var edgeIndices = this.physicsBody.physicsEdgeIndices; + var edges = this.body.edges; + var node1, node2, node3; // forces caused by the edges, modelled as springs + + for (var i = 0; i < edgeIndices.length; i++) { + edge = edges[edgeIndices[i]]; + + if (edge.connected === true && edge.toId !== edge.fromId) { + // only calculate forces if nodes are in the same sector + if (this.body.nodes[edge.toId] !== undefined && this.body.nodes[edge.fromId] !== undefined) { + if (edge.edgeType.via !== undefined) { + edgeLength = edge.options.length === undefined ? this.options.springLength : edge.options.length; + node1 = edge.to; + node2 = edge.edgeType.via; + node3 = edge.from; + + this._calculateSpringForce(node1, node2, 0.5 * edgeLength); + + this._calculateSpringForce(node2, node3, 0.5 * edgeLength); + } else { + // the * 1.5 is here so the edge looks as large as a smooth edge. It does not initially because the smooth edges use + // the support nodes which exert a repulsive force on the to and from nodes, making the edge appear larger. + edgeLength = edge.options.length === undefined ? this.options.springLength * 1.5 : edge.options.length; + + this._calculateSpringForce(edge.from, edge.to, edgeLength); + } + } + } + } + } + /** + * This is the code actually performing the calculation for the function above. + * + * @param {Node} node1 + * @param {Node} node2 + * @param {number} edgeLength + * @private + */ + + }, { + key: "_calculateSpringForce", + value: function _calculateSpringForce(node1, node2, edgeLength) { + var dx = node1.x - node2.x; + var dy = node1.y - node2.y; + var distance = Math.max(Math.sqrt(dx * dx + dy * dy), 0.01); // the 1/distance is so the fx and fy can be calculated without sine or cosine. + + var springForce = this.options.springConstant * (edgeLength - distance) / distance; + var fx = dx * springForce; + var fy = dy * springForce; // handle the case where one node is not part of the physcis + + if (this.physicsBody.forces[node1.id] !== undefined) { + this.physicsBody.forces[node1.id].x += fx; + this.physicsBody.forces[node1.id].y += fy; + } + + if (this.physicsBody.forces[node2.id] !== undefined) { + this.physicsBody.forces[node2.id].x -= fx; + this.physicsBody.forces[node2.id].y -= fy; + } + } + }]); + + return SpringSolver; +}(); + +/** + * Hierarchical Spring Solver + */ +var HierarchicalSpringSolver = +/*#__PURE__*/ +function () { + /** + * @param {Object} body + * @param {{physicsNodeIndices: Array, physicsEdgeIndices: Array, forces: {}, velocities: {}}} physicsBody + * @param {Object} options + */ + function HierarchicalSpringSolver(body, physicsBody, options) { + classCallCheck$1(this, HierarchicalSpringSolver); + + this.body = body; + this.physicsBody = physicsBody; + this.setOptions(options); + } + /** + * + * @param {Object} options + */ + + + createClass$1(HierarchicalSpringSolver, [{ + key: "setOptions", + value: function setOptions(options) { + this.options = options; + } + /** + * This function calculates the springforces on the nodes, accounting for the support nodes. + * + * @private + */ + + }, { + key: "solve", + value: function solve() { + var edgeLength, edge; + var dx, dy, fx, fy, springForce, distance; + var edges = this.body.edges; + var factor = 0.5; + var edgeIndices = this.physicsBody.physicsEdgeIndices; + var nodeIndices = this.physicsBody.physicsNodeIndices; + var forces = this.physicsBody.forces; // initialize the spring force counters + + for (var i = 0; i < nodeIndices.length; i++) { + var nodeId = nodeIndices[i]; + forces[nodeId].springFx = 0; + forces[nodeId].springFy = 0; + } // forces caused by the edges, modelled as springs + + + for (var _i = 0; _i < edgeIndices.length; _i++) { + edge = edges[edgeIndices[_i]]; + + if (edge.connected === true) { + edgeLength = edge.options.length === undefined ? this.options.springLength : edge.options.length; + dx = edge.from.x - edge.to.x; + dy = edge.from.y - edge.to.y; + distance = Math.sqrt(dx * dx + dy * dy); + distance = distance === 0 ? 0.01 : distance; // the 1/distance is so the fx and fy can be calculated without sine or cosine. + + springForce = this.options.springConstant * (edgeLength - distance) / distance; + fx = dx * springForce; + fy = dy * springForce; + + if (edge.to.level != edge.from.level) { + if (forces[edge.toId] !== undefined) { + forces[edge.toId].springFx -= fx; + forces[edge.toId].springFy -= fy; + } + + if (forces[edge.fromId] !== undefined) { + forces[edge.fromId].springFx += fx; + forces[edge.fromId].springFy += fy; + } + } else { + if (forces[edge.toId] !== undefined) { + forces[edge.toId].x -= factor * fx; + forces[edge.toId].y -= factor * fy; + } + + if (forces[edge.fromId] !== undefined) { + forces[edge.fromId].x += factor * fx; + forces[edge.fromId].y += factor * fy; + } + } + } + } // normalize spring forces + + + springForce = 1; + var springFx, springFy; + + for (var _i2 = 0; _i2 < nodeIndices.length; _i2++) { + var _nodeId = nodeIndices[_i2]; + springFx = Math.min(springForce, Math.max(-springForce, forces[_nodeId].springFx)); + springFy = Math.min(springForce, Math.max(-springForce, forces[_nodeId].springFy)); + forces[_nodeId].x += springFx; + forces[_nodeId].y += springFy; + } // retain energy balance + + + var totalFx = 0; + var totalFy = 0; + + for (var _i3 = 0; _i3 < nodeIndices.length; _i3++) { + var _nodeId2 = nodeIndices[_i3]; + totalFx += forces[_nodeId2].x; + totalFy += forces[_nodeId2].y; + } + + var correctionFx = totalFx / nodeIndices.length; + var correctionFy = totalFy / nodeIndices.length; + + for (var _i4 = 0; _i4 < nodeIndices.length; _i4++) { + var _nodeId3 = nodeIndices[_i4]; + forces[_nodeId3].x -= correctionFx; + forces[_nodeId3].y -= correctionFy; + } + } + }]); + + return HierarchicalSpringSolver; +}(); + +/** + * Central Gravity Solver + */ +var CentralGravitySolver = +/*#__PURE__*/ +function () { + /** + * @param {Object} body + * @param {{physicsNodeIndices: Array, physicsEdgeIndices: Array, forces: {}, velocities: {}}} physicsBody + * @param {Object} options + */ + function CentralGravitySolver(body, physicsBody, options) { + classCallCheck$1(this, CentralGravitySolver); + + this.body = body; + this.physicsBody = physicsBody; + this.setOptions(options); + } + /** + * + * @param {Object} options + */ + + + createClass$1(CentralGravitySolver, [{ + key: "setOptions", + value: function setOptions(options) { + this.options = options; + } + /** + * Calculates forces for each node + */ + + }, { + key: "solve", + value: function solve() { + var dx, dy, distance, node; + var nodes = this.body.nodes; + var nodeIndices = this.physicsBody.physicsNodeIndices; + var forces = this.physicsBody.forces; + + for (var i = 0; i < nodeIndices.length; i++) { + var nodeId = nodeIndices[i]; + node = nodes[nodeId]; + dx = -node.x; + dy = -node.y; + distance = Math.sqrt(dx * dx + dy * dy); + + this._calculateForces(distance, dx, dy, forces, node); + } + } + /** + * Calculate the forces based on the distance. + * @param {number} distance + * @param {number} dx + * @param {number} dy + * @param {Object} forces + * @param {Node} node + * @private + */ + + }, { + key: "_calculateForces", + value: function _calculateForces(distance, dx, dy, forces, node) { + var gravityForce = distance === 0 ? 0 : this.options.centralGravity / distance; + forces[node.id].x = dx * gravityForce; + forces[node.id].y = dy * gravityForce; + } + }]); + + return CentralGravitySolver; +}(); + +/** + * @extends BarnesHutSolver + */ + +var ForceAtlas2BasedRepulsionSolver = +/*#__PURE__*/ +function (_BarnesHutSolver) { + inherits$1(ForceAtlas2BasedRepulsionSolver, _BarnesHutSolver); + + /** + * @param {Object} body + * @param {{physicsNodeIndices: Array, physicsEdgeIndices: Array, forces: {}, velocities: {}}} physicsBody + * @param {Object} options + */ + function ForceAtlas2BasedRepulsionSolver(body, physicsBody, options) { + classCallCheck$1(this, ForceAtlas2BasedRepulsionSolver); + + return possibleConstructorReturn$1(this, getPrototypeOf$1(ForceAtlas2BasedRepulsionSolver).call(this, body, physicsBody, options)); + } + /** + * Calculate the forces based on the distance. + * + * @param {number} distance + * @param {number} dx + * @param {number} dy + * @param {Node} node + * @param {Object} parentBranch + * @private + */ + + + createClass$1(ForceAtlas2BasedRepulsionSolver, [{ + key: "_calculateForces", + value: function _calculateForces(distance, dx, dy, node, parentBranch) { + if (distance === 0) { + distance = 0.1 * Math.random(); + dx = distance; + } + + if (this.overlapAvoidanceFactor < 1 && node.shape.radius) { + distance = Math.max(0.1 + this.overlapAvoidanceFactor * node.shape.radius, distance - node.shape.radius); + } + + var degree = node.edges.length + 1; // the dividing by the distance cubed instead of squared allows us to get the fx and fy components without sines and cosines + // it is shorthand for gravityforce with distance squared and fx = dx/distance * gravityForce + + var gravityForce = this.options.gravitationalConstant * parentBranch.mass * node.options.mass * degree / Math.pow(distance, 2); + var fx = dx * gravityForce; + var fy = dy * gravityForce; + this.physicsBody.forces[node.id].x += fx; + this.physicsBody.forces[node.id].y += fy; + } + }]); + + return ForceAtlas2BasedRepulsionSolver; +}(BarnesHutSolver); + +/** + * @extends CentralGravitySolver + */ + +var ForceAtlas2BasedCentralGravitySolver = +/*#__PURE__*/ +function (_CentralGravitySolver) { + inherits$1(ForceAtlas2BasedCentralGravitySolver, _CentralGravitySolver); + + /** + * @param {Object} body + * @param {{physicsNodeIndices: Array, physicsEdgeIndices: Array, forces: {}, velocities: {}}} physicsBody + * @param {Object} options + */ + function ForceAtlas2BasedCentralGravitySolver(body, physicsBody, options) { + classCallCheck$1(this, ForceAtlas2BasedCentralGravitySolver); + + return possibleConstructorReturn$1(this, getPrototypeOf$1(ForceAtlas2BasedCentralGravitySolver).call(this, body, physicsBody, options)); + } + /** + * Calculate the forces based on the distance. + * + * @param {number} distance + * @param {number} dx + * @param {number} dy + * @param {Object} forces + * @param {Node} node + * @private + */ + + + createClass$1(ForceAtlas2BasedCentralGravitySolver, [{ + key: "_calculateForces", + value: function _calculateForces(distance, dx, dy, forces, node) { + if (distance > 0) { + var degree = node.edges.length + 1; + var gravityForce = this.options.centralGravity * degree * node.options.mass; + forces[node.id].x = dx * gravityForce; + forces[node.id].y = dy * gravityForce; + } + } + }]); + + return ForceAtlas2BasedCentralGravitySolver; +}(CentralGravitySolver); + +/** + * The physics engine + */ + +var PhysicsEngine = +/*#__PURE__*/ +function () { + /** + * @param {Object} body + */ + function PhysicsEngine(body) { + classCallCheck$1(this, PhysicsEngine); + + this.body = body; + this.physicsBody = { + physicsNodeIndices: [], + physicsEdgeIndices: [], + forces: {}, + velocities: {} + }; + this.physicsEnabled = true; + this.simulationInterval = 1000 / 60; + this.requiresTimeout = true; + this.previousStates = {}; + this.referenceState = {}; + this.freezeCache = {}; + this.renderTimer = undefined; // parameters for the adaptive timestep + + this.adaptiveTimestep = false; + this.adaptiveTimestepEnabled = false; + this.adaptiveCounter = 0; + this.adaptiveInterval = 3; + this.stabilized = false; + this.startedStabilization = false; + this.stabilizationIterations = 0; + this.ready = false; // will be set to true if the stabilize + // default options + + this.options = {}; + this.defaultOptions = { + enabled: true, + barnesHut: { + theta: 0.5, + gravitationalConstant: -2000, + centralGravity: 0.3, + springLength: 95, + springConstant: 0.04, + damping: 0.09, + avoidOverlap: 0 + }, + forceAtlas2Based: { + theta: 0.5, + gravitationalConstant: -50, + centralGravity: 0.01, + springConstant: 0.08, + springLength: 100, + damping: 0.4, + avoidOverlap: 0 + }, + repulsion: { + centralGravity: 0.2, + springLength: 200, + springConstant: 0.05, + nodeDistance: 100, + damping: 0.09, + avoidOverlap: 0 + }, + hierarchicalRepulsion: { + centralGravity: 0.0, + springLength: 100, + springConstant: 0.01, + nodeDistance: 120, + damping: 0.09 + }, + maxVelocity: 50, + minVelocity: 0.75, + // px/s + solver: 'barnesHut', + stabilization: { + enabled: true, + iterations: 1000, + // maximum number of iteration to stabilize + updateInterval: 50, + onlyDynamicEdges: false, + fit: true + }, + timestep: 0.5, + adaptiveTimestep: true + }; + util.extend(this.options, this.defaultOptions); + this.timestep = 0.5; + this.layoutFailed = false; + this.bindEventListeners(); + } + /** + * Binds event listeners + */ + + + createClass$1(PhysicsEngine, [{ + key: "bindEventListeners", + value: function bindEventListeners() { + var _this = this; + + this.body.emitter.on('initPhysics', function () { + _this.initPhysics(); + }); + this.body.emitter.on('_layoutFailed', function () { + _this.layoutFailed = true; + }); + this.body.emitter.on('resetPhysics', function () { + _this.stopSimulation(); + + _this.ready = false; + }); + this.body.emitter.on('disablePhysics', function () { + _this.physicsEnabled = false; + + _this.stopSimulation(); + }); + this.body.emitter.on('restorePhysics', function () { + _this.setOptions(_this.options); + + if (_this.ready === true) { + _this.startSimulation(); + } + }); + this.body.emitter.on('startSimulation', function () { + if (_this.ready === true) { + _this.startSimulation(); + } + }); + this.body.emitter.on('stopSimulation', function () { + _this.stopSimulation(); + }); + this.body.emitter.on('destroy', function () { + _this.stopSimulation(false); + + _this.body.emitter.off(); + }); + this.body.emitter.on("_dataChanged", function () { + // Nodes and/or edges have been added or removed, update shortcut lists. + _this.updatePhysicsData(); + }); // debug: show forces + // this.body.emitter.on("afterDrawing", (ctx) => {this._drawForces(ctx);}); + } + /** + * set the physics options + * @param {Object} options + */ + + }, { + key: "setOptions", + value: function setOptions(options) { + if (options !== undefined) { + if (options === false) { + this.options.enabled = false; + this.physicsEnabled = false; + this.stopSimulation(); + } else if (options === true) { + this.options.enabled = true; + this.physicsEnabled = true; + this.startSimulation(); + } else { + this.physicsEnabled = true; + util.selectiveNotDeepExtend(['stabilization'], this.options, options); + util.mergeOptions(this.options, options, 'stabilization'); + + if (options.enabled === undefined) { + this.options.enabled = true; + } + + if (this.options.enabled === false) { + this.physicsEnabled = false; + this.stopSimulation(); + } // set the timestep + + + this.timestep = this.options.timestep; + } + } + + this.init(); + } + /** + * configure the engine. + */ + + }, { + key: "init", + value: function init() { + var options; + + if (this.options.solver === 'forceAtlas2Based') { + options = this.options.forceAtlas2Based; + this.nodesSolver = new ForceAtlas2BasedRepulsionSolver(this.body, this.physicsBody, options); + this.edgesSolver = new SpringSolver(this.body, this.physicsBody, options); + this.gravitySolver = new ForceAtlas2BasedCentralGravitySolver(this.body, this.physicsBody, options); + } else if (this.options.solver === 'repulsion') { + options = this.options.repulsion; + this.nodesSolver = new RepulsionSolver(this.body, this.physicsBody, options); + this.edgesSolver = new SpringSolver(this.body, this.physicsBody, options); + this.gravitySolver = new CentralGravitySolver(this.body, this.physicsBody, options); + } else if (this.options.solver === 'hierarchicalRepulsion') { + options = this.options.hierarchicalRepulsion; + this.nodesSolver = new HierarchicalRepulsionSolver(this.body, this.physicsBody, options); + this.edgesSolver = new HierarchicalSpringSolver(this.body, this.physicsBody, options); + this.gravitySolver = new CentralGravitySolver(this.body, this.physicsBody, options); + } else { + // barnesHut + options = this.options.barnesHut; + this.nodesSolver = new BarnesHutSolver(this.body, this.physicsBody, options); + this.edgesSolver = new SpringSolver(this.body, this.physicsBody, options); + this.gravitySolver = new CentralGravitySolver(this.body, this.physicsBody, options); + } + + this.modelOptions = options; + } + /** + * initialize the engine + */ + + }, { + key: "initPhysics", + value: function initPhysics() { + if (this.physicsEnabled === true && this.options.enabled === true) { + if (this.options.stabilization.enabled === true) { + this.stabilize(); + } else { + this.stabilized = false; + this.ready = true; + this.body.emitter.emit('fit', {}, this.layoutFailed); // if the layout failed, we use the approximation for the zoom + + this.startSimulation(); + } + } else { + this.ready = true; + this.body.emitter.emit('fit'); + } + } + /** + * Start the simulation + */ + + }, { + key: "startSimulation", + value: function startSimulation() { + if (this.physicsEnabled === true && this.options.enabled === true) { + this.stabilized = false; // when visible, adaptivity is disabled. + + this.adaptiveTimestep = false; // this sets the width of all nodes initially which could be required for the avoidOverlap + + this.body.emitter.emit("_resizeNodes"); + + if (this.viewFunction === undefined) { + this.viewFunction = this.simulationStep.bind(this); + this.body.emitter.on('initRedraw', this.viewFunction); + this.body.emitter.emit('_startRendering'); + } + } else { + this.body.emitter.emit('_redraw'); + } + } + /** + * Stop the simulation, force stabilization. + * @param {boolean} [emit=true] + */ + + }, { + key: "stopSimulation", + value: function stopSimulation() { + var emit = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; + this.stabilized = true; + + if (emit === true) { + this._emitStabilized(); + } + + if (this.viewFunction !== undefined) { + this.body.emitter.off('initRedraw', this.viewFunction); + this.viewFunction = undefined; + + if (emit === true) { + this.body.emitter.emit('_stopRendering'); + } + } + } + /** + * The viewFunction inserts this step into each render loop. It calls the physics tick and handles the cleanup at stabilized. + * + */ + + }, { + key: "simulationStep", + value: function simulationStep() { + // check if the physics have settled + var startTime = Date.now(); + this.physicsTick(); + var physicsTime = Date.now() - startTime; // run double speed if it is a little graph + + if ((physicsTime < 0.4 * this.simulationInterval || this.runDoubleSpeed === true) && this.stabilized === false) { + this.physicsTick(); // this makes sure there is no jitter. The decision is taken once to run it at double speed. + + this.runDoubleSpeed = true; + } + + if (this.stabilized === true) { + this.stopSimulation(); + } + } + /** + * trigger the stabilized event. + * + * @param {number} [amountOfIterations=this.stabilizationIterations] + * @private + */ + + }, { + key: "_emitStabilized", + value: function _emitStabilized() { + var _this2 = this; + + var amountOfIterations = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.stabilizationIterations; + + if (this.stabilizationIterations > 1 || this.startedStabilization === true) { + setTimeout(function () { + _this2.body.emitter.emit('stabilized', { + iterations: amountOfIterations + }); + + _this2.startedStabilization = false; + _this2.stabilizationIterations = 0; + }, 0); + } + } + /** + * Calculate the forces for one physics iteration and move the nodes. + * @private + */ + + }, { + key: "physicsStep", + value: function physicsStep() { + this.gravitySolver.solve(); + this.nodesSolver.solve(); + this.edgesSolver.solve(); + this.moveNodes(); + } + /** + * Make dynamic adjustments to the timestep, based on current state. + * + * Helper function for physicsTick(). + * @private + */ + + }, { + key: "adjustTimeStep", + value: function adjustTimeStep() { + var factor = 1.2; // Factor for increasing the timestep on success. + // we compare the two steps. if it is acceptable we double the step. + + if (this._evaluateStepQuality() === true) { + this.timestep = factor * this.timestep; + } else { + // if not, we decrease the step to a minimum of the options timestep. + // if the decreased timestep is smaller than the options step, we do not reset the counter + // we assume that the options timestep is stable enough. + if (this.timestep / factor < this.options.timestep) { + this.timestep = this.options.timestep; + } else { + // if the timestep was larger than 2 times the option one we check the adaptivity again to ensure + // that large instabilities do not form. + this.adaptiveCounter = -1; // check again next iteration + + this.timestep = Math.max(this.options.timestep, this.timestep / factor); + } + } + } + /** + * A single simulation step (or 'tick') in the physics simulation + * + * @private + */ + + }, { + key: "physicsTick", + value: function physicsTick() { + this._startStabilizing(); // this ensures that there is no start event when the network is already stable. + + + if (this.stabilized === true) return; // adaptivity means the timestep adapts to the situation, only applicable for stabilization + + if (this.adaptiveTimestep === true && this.adaptiveTimestepEnabled === true) { + // timestep remains stable for "interval" iterations. + var doAdaptive = this.adaptiveCounter % this.adaptiveInterval === 0; + + if (doAdaptive) { + // first the big step and revert. + this.timestep = 2 * this.timestep; + this.physicsStep(); + this.revert(); // saves the reference state + // now the normal step. Since this is the last step, it is the more stable one and we will take this. + + this.timestep = 0.5 * this.timestep; // since it's half the step, we do it twice. + + this.physicsStep(); + this.physicsStep(); + this.adjustTimeStep(); + } else { + this.physicsStep(); // normal step, keeping timestep constant + } + + this.adaptiveCounter += 1; + } else { + // case for the static timestep, we reset it to the one in options and take a normal step. + this.timestep = this.options.timestep; + this.physicsStep(); + } + + if (this.stabilized === true) this.revert(); + this.stabilizationIterations++; + } + /** + * Nodes and edges can have the physics toggles on or off. A collection of indices is created here so we can skip the check all the time. + * + * @private + */ + + }, { + key: "updatePhysicsData", + value: function updatePhysicsData() { + this.physicsBody.forces = {}; + this.physicsBody.physicsNodeIndices = []; + this.physicsBody.physicsEdgeIndices = []; + var nodes = this.body.nodes; + var edges = this.body.edges; // get node indices for physics + + for (var nodeId in nodes) { + if (nodes.hasOwnProperty(nodeId)) { + if (nodes[nodeId].options.physics === true) { + this.physicsBody.physicsNodeIndices.push(nodes[nodeId].id); + } + } + } // get edge indices for physics + + + for (var edgeId in edges) { + if (edges.hasOwnProperty(edgeId)) { + if (edges[edgeId].options.physics === true) { + this.physicsBody.physicsEdgeIndices.push(edges[edgeId].id); + } + } + } // get the velocity and the forces vector + + + for (var i = 0; i < this.physicsBody.physicsNodeIndices.length; i++) { + var _nodeId = this.physicsBody.physicsNodeIndices[i]; + this.physicsBody.forces[_nodeId] = { + x: 0, + y: 0 + }; // forces can be reset because they are recalculated. Velocities have to persist. + + if (this.physicsBody.velocities[_nodeId] === undefined) { + this.physicsBody.velocities[_nodeId] = { + x: 0, + y: 0 + }; + } + } // clean deleted nodes from the velocity vector + + + for (var _nodeId2 in this.physicsBody.velocities) { + if (nodes[_nodeId2] === undefined) { + delete this.physicsBody.velocities[_nodeId2]; + } + } + } + /** + * Revert the simulation one step. This is done so after stabilization, every new start of the simulation will also say stabilized. + */ + + }, { + key: "revert", + value: function revert() { + var nodeIds = Object.keys(this.previousStates); + var nodes = this.body.nodes; + var velocities = this.physicsBody.velocities; + this.referenceState = {}; + + for (var i = 0; i < nodeIds.length; i++) { + var nodeId = nodeIds[i]; + + if (nodes[nodeId] !== undefined) { + if (nodes[nodeId].options.physics === true) { + this.referenceState[nodeId] = { + positions: { + x: nodes[nodeId].x, + y: nodes[nodeId].y + } + }; + velocities[nodeId].x = this.previousStates[nodeId].vx; + velocities[nodeId].y = this.previousStates[nodeId].vy; + nodes[nodeId].x = this.previousStates[nodeId].x; + nodes[nodeId].y = this.previousStates[nodeId].y; + } + } else { + delete this.previousStates[nodeId]; + } + } + } + /** + * This compares the reference state to the current state + * + * @returns {boolean} + * @private + */ + + }, { + key: "_evaluateStepQuality", + value: function _evaluateStepQuality() { + var dx, dy, dpos; + var nodes = this.body.nodes; + var reference = this.referenceState; + var posThreshold = 0.3; + + for (var nodeId in this.referenceState) { + if (this.referenceState.hasOwnProperty(nodeId) && nodes[nodeId] !== undefined) { + dx = nodes[nodeId].x - reference[nodeId].positions.x; + dy = nodes[nodeId].y - reference[nodeId].positions.y; + dpos = Math.sqrt(Math.pow(dx, 2) + Math.pow(dy, 2)); + + if (dpos > posThreshold) { + return false; + } + } + } + + return true; + } + /** + * move the nodes one timestep and check if they are stabilized + */ + + }, { + key: "moveNodes", + value: function moveNodes() { + var nodeIndices = this.physicsBody.physicsNodeIndices; + var maxNodeVelocity = 0; + var averageNodeVelocity = 0; // the velocity threshold (energy in the system) for the adaptivity toggle + + var velocityAdaptiveThreshold = 5; + + for (var i = 0; i < nodeIndices.length; i++) { + var nodeId = nodeIndices[i]; + + var nodeVelocity = this._performStep(nodeId); // stabilized is true if stabilized is true and velocity is smaller than vmin --> all nodes must be stabilized + + + maxNodeVelocity = Math.max(maxNodeVelocity, nodeVelocity); + averageNodeVelocity += nodeVelocity; + } // evaluating the stabilized and adaptiveTimestepEnabled conditions + + + this.adaptiveTimestepEnabled = averageNodeVelocity / nodeIndices.length < velocityAdaptiveThreshold; + this.stabilized = maxNodeVelocity < this.options.minVelocity; + } + /** + * Calculate new velocity for a coordinate direction + * + * @param {number} v velocity for current coordinate + * @param {number} f regular force for current coordinate + * @param {number} m mass of current node + * @returns {number} new velocity for current coordinate + * @private + */ + + }, { + key: "calculateComponentVelocity", + value: function calculateComponentVelocity(v, f, m) { + var df = this.modelOptions.damping * v; // damping force + + var a = (f - df) / m; // acceleration + + v += a * this.timestep; // Put a limit on the velocities if it is really high + + var maxV = this.options.maxVelocity || 1e9; + + if (Math.abs(v) > maxV) { + v = v > 0 ? maxV : -maxV; + } + + return v; + } + /** + * Perform the actual step + * + * @param {Node.id} nodeId + * @returns {number} the new velocity of given node + * @private + */ + + }, { + key: "_performStep", + value: function _performStep(nodeId) { + var node = this.body.nodes[nodeId]; + var force = this.physicsBody.forces[nodeId]; + var velocity = this.physicsBody.velocities[nodeId]; // store the state so we can revert + + this.previousStates[nodeId] = { + x: node.x, + y: node.y, + vx: velocity.x, + vy: velocity.y + }; + + if (node.options.fixed.x === false) { + velocity.x = this.calculateComponentVelocity(velocity.x, force.x, node.options.mass); + node.x += velocity.x * this.timestep; + } else { + force.x = 0; + velocity.x = 0; + } + + if (node.options.fixed.y === false) { + velocity.y = this.calculateComponentVelocity(velocity.y, force.y, node.options.mass); + node.y += velocity.y * this.timestep; + } else { + force.y = 0; + velocity.y = 0; + } + + var totalVelocity = Math.sqrt(Math.pow(velocity.x, 2) + Math.pow(velocity.y, 2)); + return totalVelocity; + } + /** + * When initializing and stabilizing, we can freeze nodes with a predefined position. + * This greatly speeds up stabilization because only the supportnodes for the smoothCurves have to settle. + * + * @private + */ + + }, { + key: "_freezeNodes", + value: function _freezeNodes() { + var nodes = this.body.nodes; + + for (var id in nodes) { + if (nodes.hasOwnProperty(id)) { + if (nodes[id].x && nodes[id].y) { + var fixed = nodes[id].options.fixed; + this.freezeCache[id] = { + x: fixed.x, + y: fixed.y + }; + fixed.x = true; + fixed.y = true; + } + } + } + } + /** + * Unfreezes the nodes that have been frozen by _freezeDefinedNodes. + * + * @private + */ + + }, { + key: "_restoreFrozenNodes", + value: function _restoreFrozenNodes() { + var nodes = this.body.nodes; + + for (var id in nodes) { + if (nodes.hasOwnProperty(id)) { + if (this.freezeCache[id] !== undefined) { + nodes[id].options.fixed.x = this.freezeCache[id].x; + nodes[id].options.fixed.y = this.freezeCache[id].y; + } + } + } + + this.freezeCache = {}; + } + /** + * Find a stable position for all nodes + * + * @param {number} [iterations=this.options.stabilization.iterations] + */ + + }, { + key: "stabilize", + value: function stabilize() { + var _this3 = this; + + var iterations = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.options.stabilization.iterations; + + if (typeof iterations !== 'number') { + iterations = this.options.stabilization.iterations; + console.log('The stabilize method needs a numeric amount of iterations. Switching to default: ', iterations); + } + + if (this.physicsBody.physicsNodeIndices.length === 0) { + this.ready = true; + return; + } // enable adaptive timesteps + + + this.adaptiveTimestep = this.options.adaptiveTimestep; // this sets the width of all nodes initially which could be required for the avoidOverlap + + this.body.emitter.emit("_resizeNodes"); + this.stopSimulation(); // stop the render loop + + this.stabilized = false; // block redraw requests + + this.body.emitter.emit('_blockRedraw'); + this.targetIterations = iterations; // start the stabilization + + if (this.options.stabilization.onlyDynamicEdges === true) { + this._freezeNodes(); + } + + this.stabilizationIterations = 0; + setTimeout(function () { + return _this3._stabilizationBatch(); + }, 0); + } + /** + * If not already stabilizing, start it and emit a start event. + * + * @returns {boolean} true if stabilization started with this call + * @private + */ + + }, { + key: "_startStabilizing", + value: function _startStabilizing() { + if (this.startedStabilization === true) return false; + this.body.emitter.emit('startStabilizing'); + this.startedStabilization = true; + return true; + } + /** + * One batch of stabilization + * @private + */ + + }, { + key: "_stabilizationBatch", + value: function _stabilizationBatch() { + var _this4 = this; + + var running = function running() { + return _this4.stabilized === false && _this4.stabilizationIterations < _this4.targetIterations; + }; + + var sendProgress = function sendProgress() { + _this4.body.emitter.emit('stabilizationProgress', { + iterations: _this4.stabilizationIterations, + total: _this4.targetIterations + }); + }; + + if (this._startStabilizing()) { + sendProgress(); // Ensure that there is at least one start event. + } + + var count = 0; + + while (running() && count < this.options.stabilization.updateInterval) { + this.physicsTick(); + count++; + } + + sendProgress(); + + if (running()) { + setTimeout(this._stabilizationBatch.bind(this), 0); + } else { + this._finalizeStabilization(); + } + } + /** + * Wrap up the stabilization, fit and emit the events. + * @private + */ + + }, { + key: "_finalizeStabilization", + value: function _finalizeStabilization() { + this.body.emitter.emit('_allowRedraw'); + + if (this.options.stabilization.fit === true) { + this.body.emitter.emit('fit'); + } + + if (this.options.stabilization.onlyDynamicEdges === true) { + this._restoreFrozenNodes(); + } + + this.body.emitter.emit('stabilizationIterationsDone'); + this.body.emitter.emit('_requestRedraw'); + + if (this.stabilized === true) { + this._emitStabilized(); + } else { + this.startSimulation(); + } + + this.ready = true; + } //--------------------------- DEBUGGING BELOW ---------------------------// + + /** + * Debug function that display arrows for the forces currently active in the network. + * + * Use this when debugging only. + * + * @param {CanvasRenderingContext2D} ctx + * @private + */ + + }, { + key: "_drawForces", + value: function _drawForces(ctx) { + for (var i = 0; i < this.physicsBody.physicsNodeIndices.length; i++) { + var index = this.physicsBody.physicsNodeIndices[i]; + var node = this.body.nodes[index]; + var force = this.physicsBody.forces[index]; + var factor = 20; + var colorFactor = 0.03; + var forceSize = Math.sqrt(Math.pow(force.x, 2) + Math.pow(force.x, 2)); + var size = Math.min(Math.max(5, forceSize), 15); + var arrowSize = 3 * size; + var color = util.HSVToHex((180 - Math.min(1, Math.max(0, colorFactor * forceSize)) * 180) / 360, 1, 1); + var point = { + x: node.x + factor * force.x, + y: node.y + factor * force.y + }; + ctx.lineWidth = size; + ctx.strokeStyle = color; + ctx.beginPath(); + ctx.moveTo(node.x, node.y); + ctx.lineTo(point.x, point.y); + ctx.stroke(); + var angle = Math.atan2(force.y, force.x); + ctx.fillStyle = color; + EndPoints.draw(ctx, { + type: 'arrow', + point: point, + angle: angle, + length: arrowSize + }); + ctx.fill(); + } + } + }]); + + return PhysicsEngine; +}(); + +/** + * Utility Class + */ + +var NetworkUtil = +/*#__PURE__*/ +function () { + /** + * @ignore + */ + function NetworkUtil() { + classCallCheck$1(this, NetworkUtil); + } + /** + * Find the center position of the network considering the bounding boxes + * + * @param {Array.} allNodes + * @param {Array.} [specificNodes=[]] + * @returns {{minX: number, maxX: number, minY: number, maxY: number}} + * @static + */ + + + createClass$1(NetworkUtil, null, [{ + key: "getRange", + value: function getRange(allNodes) { + var specificNodes = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : []; + var minY = 1e9, + maxY = -1e9, + minX = 1e9, + maxX = -1e9, + node; + + if (specificNodes.length > 0) { + for (var i = 0; i < specificNodes.length; i++) { + node = allNodes[specificNodes[i]]; + + if (minX > node.shape.boundingBox.left) { + minX = node.shape.boundingBox.left; + } + + if (maxX < node.shape.boundingBox.right) { + maxX = node.shape.boundingBox.right; + } + + if (minY > node.shape.boundingBox.top) { + minY = node.shape.boundingBox.top; + } // top is negative, bottom is positive + + + if (maxY < node.shape.boundingBox.bottom) { + maxY = node.shape.boundingBox.bottom; + } // top is negative, bottom is positive + + } + } + + if (minX === 1e9 && maxX === -1e9 && minY === 1e9 && maxY === -1e9) { + minY = 0, maxY = 0, minX = 0, maxX = 0; + } + + return { + minX: minX, + maxX: maxX, + minY: minY, + maxY: maxY + }; + } + /** + * Find the center position of the network + * + * @param {Array.} allNodes + * @param {Array.} [specificNodes=[]] + * @returns {{minX: number, maxX: number, minY: number, maxY: number}} + * @static + */ + + }, { + key: "getRangeCore", + value: function getRangeCore(allNodes) { + var specificNodes = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : []; + var minY = 1e9, + maxY = -1e9, + minX = 1e9, + maxX = -1e9, + node; + + if (specificNodes.length > 0) { + for (var i = 0; i < specificNodes.length; i++) { + node = allNodes[specificNodes[i]]; + + if (minX > node.x) { + minX = node.x; + } + + if (maxX < node.x) { + maxX = node.x; + } + + if (minY > node.y) { + minY = node.y; + } // top is negative, bottom is positive + + + if (maxY < node.y) { + maxY = node.y; + } // top is negative, bottom is positive + + } + } + + if (minX === 1e9 && maxX === -1e9 && minY === 1e9 && maxY === -1e9) { + minY = 0, maxY = 0, minX = 0, maxX = 0; + } + + return { + minX: minX, + maxX: maxX, + minY: minY, + maxY: maxY + }; + } + /** + * @param {object} range = {minX: minX, maxX: maxX, minY: minY, maxY: maxY}; + * @returns {{x: number, y: number}} + * @static + */ + + }, { + key: "findCenter", + value: function findCenter(range) { + return { + x: 0.5 * (range.maxX + range.minX), + y: 0.5 * (range.maxY + range.minY) + }; + } + /** + * This returns a clone of the options or options of the edge or node to be used for construction of new edges or check functions for new nodes. + * @param {vis.Item} item + * @param {'node'|undefined} type + * @returns {{}} + * @static + */ + + }, { + key: "cloneOptions", + value: function cloneOptions(item, type) { + var clonedOptions = {}; + + if (type === undefined || type === 'node') { + util.deepExtend(clonedOptions, item.options, true); + clonedOptions.x = item.x; + clonedOptions.y = item.y; + clonedOptions.amountOfConnections = item.edges.length; + } else { + util.deepExtend(clonedOptions, item.options, true); + } + + return clonedOptions; + } + }]); + + return NetworkUtil; +}(); + +/** + * A Cluster is a special Node that allows a group of Nodes positioned closely together + * to be represented by a single Cluster Node. + * + * @extends Node + */ + +var Cluster = +/*#__PURE__*/ +function (_Node) { + inherits$1(Cluster, _Node); + + /** + * @param {Object} options + * @param {Object} body + * @param {Array.}imagelist + * @param {Array} grouplist + * @param {Object} globalOptions + * @param {Object} defaultOptions Global default options for nodes + */ + function Cluster(options, body, imagelist, grouplist, globalOptions, defaultOptions) { + var _this; + + classCallCheck$1(this, Cluster); + + _this = possibleConstructorReturn$1(this, getPrototypeOf$1(Cluster).call(this, options, body, imagelist, grouplist, globalOptions, defaultOptions)); + _this.isCluster = true; + _this.containedNodes = {}; + _this.containedEdges = {}; + return _this; + } + /** + * Transfer child cluster data to current and disconnect the child cluster. + * + * Please consult the header comment in 'Clustering.js' for the fields set here. + * + * @param {string|number} childClusterId id of child cluster to open + */ + + + createClass$1(Cluster, [{ + key: "_openChildCluster", + value: function _openChildCluster(childClusterId) { + var _this2 = this; + + var childCluster = this.body.nodes[childClusterId]; + + if (this.containedNodes[childClusterId] === undefined) { + throw new Error('node with id: ' + childClusterId + ' not in current cluster'); + } + + if (!childCluster.isCluster) { + throw new Error('node with id: ' + childClusterId + ' is not a cluster'); + } // Disconnect child cluster from current cluster + + + delete this.containedNodes[childClusterId]; + util.forEach(childCluster.edges, function (edge) { + delete _this2.containedEdges[edge.id]; + }); // Transfer nodes and edges + + util.forEach(childCluster.containedNodes, function (node, nodeId) { + _this2.containedNodes[nodeId] = node; + }); + childCluster.containedNodes = {}; + util.forEach(childCluster.containedEdges, function (edge, edgeId) { + _this2.containedEdges[edgeId] = edge; + }); + childCluster.containedEdges = {}; // Transfer edges within cluster edges which are clustered + + util.forEach(childCluster.edges, function (clusterEdge) { + util.forEach(_this2.edges, function (parentClusterEdge) { + // Assumption: a clustered edge can only be present in a single clustering edge + // Not tested here + var index = parentClusterEdge.clusteringEdgeReplacingIds.indexOf(clusterEdge.id); + if (index === -1) return; + util.forEach(clusterEdge.clusteringEdgeReplacingIds, function (srcId) { + parentClusterEdge.clusteringEdgeReplacingIds.push(srcId); // Maintain correct bookkeeping for transferred edge + + _this2.body.edges[srcId].edgeReplacedById = parentClusterEdge.id; + }); // Remove cluster edge from parent cluster edge + + parentClusterEdge.clusteringEdgeReplacingIds.splice(index, 1); + }); + }); + childCluster.edges = []; + } + }]); + + return Cluster; +}(Node); + +/** + * The clustering engine + */ + +var ClusterEngine = +/*#__PURE__*/ +function () { + /** + * @param {Object} body + */ + function ClusterEngine(body) { + var _this = this; + + classCallCheck$1(this, ClusterEngine); + + this.body = body; + this.clusteredNodes = {}; // key: node id, value: { clusterId: , node: } + + this.clusteredEdges = {}; // key: edge id, value: restore information for given edge + + this.options = {}; + this.defaultOptions = {}; + util.extend(this.options, this.defaultOptions); + this.body.emitter.on('_resetData', function () { + _this.clusteredNodes = {}; + _this.clusteredEdges = {}; + }); + } + /** + * + * @param {number} hubsize + * @param {Object} options + */ + + + createClass$1(ClusterEngine, [{ + key: "clusterByHubsize", + value: function clusterByHubsize(hubsize, options) { + if (hubsize === undefined) { + hubsize = this._getHubSize(); + } else if (_typeof_1$1(hubsize) === "object") { + options = this._checkOptions(hubsize); + hubsize = this._getHubSize(); + } + + var nodesToCluster = []; + + for (var i = 0; i < this.body.nodeIndices.length; i++) { + var node = this.body.nodes[this.body.nodeIndices[i]]; + + if (node.edges.length >= hubsize) { + nodesToCluster.push(node.id); + } + } + + for (var _i = 0; _i < nodesToCluster.length; _i++) { + this.clusterByConnection(nodesToCluster[_i], options, true); + } + + this.body.emitter.emit('_dataChanged'); + } + /** + * loop over all nodes, check if they adhere to the condition and cluster if needed. + * @param {Object} options + * @param {boolean} [refreshData=true] + */ + + }, { + key: "cluster", + value: function cluster() { + var _this2 = this; + + var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + var refreshData = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; + + if (options.joinCondition === undefined) { + throw new Error("Cannot call clusterByNodeData without a joinCondition function in the options."); + } // check if the options object is fine, append if needed + + + options = this._checkOptions(options); + var childNodesObj = {}; + var childEdgesObj = {}; // collect the nodes that will be in the cluster + + util.forEach(this.body.nodes, function (node, nodeId) { + if (node.options && options.joinCondition(node.options) === true) { + childNodesObj[nodeId] = node; // collect the edges that will be in the cluster + + util.forEach(node.edges, function (edge) { + if (_this2.clusteredEdges[edge.id] === undefined) { + childEdgesObj[edge.id] = edge; + } + }); + } + }); + + this._cluster(childNodesObj, childEdgesObj, options, refreshData); + } + /** + * Cluster all nodes in the network that have only X edges + * @param {number} edgeCount + * @param {Object} options + * @param {boolean} [refreshData=true] + */ + + }, { + key: "clusterByEdgeCount", + value: function clusterByEdgeCount(edgeCount, options) { + var _this3 = this; + + var refreshData = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true; + options = this._checkOptions(options); + var clusters = []; + var usedNodes = {}; + var edge, edges, relevantEdgeCount; // collect the nodes that will be in the cluster + + var _loop = function _loop(i) { + var childNodesObj = {}; + var childEdgesObj = {}; + var nodeId = _this3.body.nodeIndices[i]; + var node = _this3.body.nodes[nodeId]; // if this node is already used in another cluster this session, we do not have to re-evaluate it. + + if (usedNodes[nodeId] === undefined) { + relevantEdgeCount = 0; + edges = []; + + for (var j = 0; j < node.edges.length; j++) { + edge = node.edges[j]; + + if (_this3.clusteredEdges[edge.id] === undefined) { + if (edge.toId !== edge.fromId) { + relevantEdgeCount++; + } + + edges.push(edge); + } + } // this node qualifies, we collect its neighbours to start the clustering process. + + + if (relevantEdgeCount === edgeCount) { + checkJoinCondition = function checkJoinCondition(node) { + if (options.joinCondition === undefined || options.joinCondition === null) { + return true; + } + + var clonedOptions = NetworkUtil.cloneOptions(node); + return options.joinCondition(clonedOptions); + }; + + var gatheringSuccessful = true; + + for (var _j = 0; _j < edges.length; _j++) { + edge = edges[_j]; + + var childNodeId = _this3._getConnectedId(edge, nodeId); // add the nodes to the list by the join condition. + + + if (checkJoinCondition(node)) { + childEdgesObj[edge.id] = edge; + childNodesObj[nodeId] = node; + childNodesObj[childNodeId] = _this3.body.nodes[childNodeId]; + usedNodes[nodeId] = true; + } else { + // this node does not qualify after all. + gatheringSuccessful = false; + break; + } + } // add to the cluster queue + + + if (Object.keys(childNodesObj).length > 0 && Object.keys(childEdgesObj).length > 0 && gatheringSuccessful === true) { + /** + * Search for cluster data that contains any of the node id's + * @returns {Boolean} true if no joinCondition, otherwise return value of joinCondition + */ + findClusterData = function findClusterData() { + for (var n = 0; n < clusters.length; ++n) { + // Search for a cluster containing any of the node id's + for (var m in childNodesObj) { + if (clusters[n].nodes[m] !== undefined) { + return clusters[n]; + } + } + } + + return undefined; + }; // If any of the found nodes is part of a cluster found in this method, + // add the current values to that cluster + + + foundCluster = findClusterData(); + + if (foundCluster !== undefined) { + // Add nodes to found cluster if not present + for (var m in childNodesObj) { + if (foundCluster.nodes[m] === undefined) { + foundCluster.nodes[m] = childNodesObj[m]; + } + } // Add edges to found cluster, if not present + + + for (var _m in childEdgesObj) { + if (foundCluster.edges[_m] === undefined) { + foundCluster.edges[_m] = childEdgesObj[_m]; + } + } + } else { + // Create a new cluster group + clusters.push({ + nodes: childNodesObj, + edges: childEdgesObj + }); + } + } + } + } + }; + + for (var i = 0; i < this.body.nodeIndices.length; i++) { + var checkJoinCondition; + var findClusterData; + var foundCluster; + + _loop(i); + } + + for (var i = 0; i < clusters.length; i++) { + this._cluster(clusters[i].nodes, clusters[i].edges, options, false); + } + + if (refreshData === true) { + this.body.emitter.emit('_dataChanged'); + } + } + /** + * Cluster all nodes in the network that have only 1 edge + * @param {Object} options + * @param {boolean} [refreshData=true] + */ + + }, { + key: "clusterOutliers", + value: function clusterOutliers(options) { + var refreshData = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; + this.clusterByEdgeCount(1, options, refreshData); + } + /** + * Cluster all nodes in the network that have only 2 edge + * @param {Object} options + * @param {boolean} [refreshData=true] + */ + + }, { + key: "clusterBridges", + value: function clusterBridges(options) { + var refreshData = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; + this.clusterByEdgeCount(2, options, refreshData); + } + /** + * suck all connected nodes of a node into the node. + * @param {Node.id} nodeId + * @param {Object} options + * @param {boolean} [refreshData=true] + */ + + }, { + key: "clusterByConnection", + value: function clusterByConnection(nodeId, options) { + var refreshData = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true; + + // kill conditions + if (nodeId === undefined) { + throw new Error("No nodeId supplied to clusterByConnection!"); + } + + if (this.body.nodes[nodeId] === undefined) { + throw new Error("The nodeId given to clusterByConnection does not exist!"); + } + + var node = this.body.nodes[nodeId]; + options = this._checkOptions(options, node); + + if (options.clusterNodeProperties.x === undefined) { + options.clusterNodeProperties.x = node.x; + } + + if (options.clusterNodeProperties.y === undefined) { + options.clusterNodeProperties.y = node.y; + } + + if (options.clusterNodeProperties.fixed === undefined) { + options.clusterNodeProperties.fixed = {}; + options.clusterNodeProperties.fixed.x = node.options.fixed.x; + options.clusterNodeProperties.fixed.y = node.options.fixed.y; + } + + var childNodesObj = {}; + var childEdgesObj = {}; + var parentNodeId = node.id; + var parentClonedOptions = NetworkUtil.cloneOptions(node); + childNodesObj[parentNodeId] = node; // collect the nodes that will be in the cluster + + for (var i = 0; i < node.edges.length; i++) { + var edge = node.edges[i]; + + if (this.clusteredEdges[edge.id] === undefined) { + var childNodeId = this._getConnectedId(edge, parentNodeId); // if the child node is not in a cluster + + + if (this.clusteredNodes[childNodeId] === undefined) { + if (childNodeId !== parentNodeId) { + if (options.joinCondition === undefined) { + childEdgesObj[edge.id] = edge; + childNodesObj[childNodeId] = this.body.nodes[childNodeId]; + } else { + // clone the options and insert some additional parameters that could be interesting. + var childClonedOptions = NetworkUtil.cloneOptions(this.body.nodes[childNodeId]); + + if (options.joinCondition(parentClonedOptions, childClonedOptions) === true) { + childEdgesObj[edge.id] = edge; + childNodesObj[childNodeId] = this.body.nodes[childNodeId]; + } + } + } else { + // swallow the edge if it is self-referencing. + childEdgesObj[edge.id] = edge; + } + } + } + } + + var childNodeIDs = Object.keys(childNodesObj).map(function (childNode) { + return childNodesObj[childNode].id; + }); + + for (childNode in childNodesObj) { + if (!childNodesObj.hasOwnProperty(childNode)) continue; + var childNode = childNodesObj[childNode]; + + for (var y = 0; y < childNode.edges.length; y++) { + var childEdge = childNode.edges[y]; + + if (childNodeIDs.indexOf(this._getConnectedId(childEdge, childNode.id)) > -1) { + childEdgesObj[childEdge.id] = childEdge; + } + } + } + + this._cluster(childNodesObj, childEdgesObj, options, refreshData); + } + /** + * This function creates the edges that will be attached to the cluster + * It looks for edges that are connected to the nodes from the "outside' of the cluster. + * + * @param {{Node.id: vis.Node}} childNodesObj + * @param {{vis.Edge.id: vis.Edge}} childEdgesObj + * @param {Object} clusterNodeProperties + * @param {Object} clusterEdgeProperties + * @private + */ + + }, { + key: "_createClusterEdges", + value: function _createClusterEdges(childNodesObj, childEdgesObj, clusterNodeProperties, clusterEdgeProperties) { + var edge, childNodeId, childNode, toId, fromId, otherNodeId; // loop over all child nodes and their edges to find edges going out of the cluster + // these edges will be replaced by clusterEdges. + + var childKeys = Object.keys(childNodesObj); + var createEdges = []; + + for (var i = 0; i < childKeys.length; i++) { + childNodeId = childKeys[i]; + childNode = childNodesObj[childNodeId]; // construct new edges from the cluster to others + + for (var j = 0; j < childNode.edges.length; j++) { + edge = childNode.edges[j]; // we only handle edges that are visible to the system, not the disabled ones from the clustering process. + + if (this.clusteredEdges[edge.id] === undefined) { + // self-referencing edges will be added to the "hidden" list + if (edge.toId == edge.fromId) { + childEdgesObj[edge.id] = edge; + } else { + // set up the from and to. + if (edge.toId == childNodeId) { + // this is a double equals because ints and strings can be interchanged here. + toId = clusterNodeProperties.id; + fromId = edge.fromId; + otherNodeId = fromId; + } else { + toId = edge.toId; + fromId = clusterNodeProperties.id; + otherNodeId = toId; + } + } // Only edges from the cluster outwards are being replaced. + + + if (childNodesObj[otherNodeId] === undefined) { + createEdges.push({ + edge: edge, + fromId: fromId, + toId: toId + }); + } + } + } + } // + // Here we actually create the replacement edges. + // + // We could not do this in the loop above as the creation process + // would add an edge to the edges array we are iterating over. + // + // NOTE: a clustered edge can have multiple base edges! + // + + + var newEdges = []; + /** + * Find a cluster edge which matches the given created edge. + * @param {vis.Edge} createdEdge + * @returns {vis.Edge} + */ + + var getNewEdge = function getNewEdge(createdEdge) { + for (var _j2 = 0; _j2 < newEdges.length; _j2++) { + var newEdge = newEdges[_j2]; // We replace both to and from edges with a single cluster edge + + var matchToDirection = createdEdge.fromId === newEdge.fromId && createdEdge.toId === newEdge.toId; + var matchFromDirection = createdEdge.fromId === newEdge.toId && createdEdge.toId === newEdge.fromId; + + if (matchToDirection || matchFromDirection) { + return newEdge; + } + } + + return null; + }; + + for (var _j3 = 0; _j3 < createEdges.length; _j3++) { + var createdEdge = createEdges[_j3]; + var _edge = createdEdge.edge; + var newEdge = getNewEdge(createdEdge); + + if (newEdge === null) { + // Create a clustered edge for this connection + newEdge = this._createClusteredEdge(createdEdge.fromId, createdEdge.toId, _edge, clusterEdgeProperties); + newEdges.push(newEdge); + } else { + newEdge.clusteringEdgeReplacingIds.push(_edge.id); + } // also reference the new edge in the old edge + + + this.body.edges[_edge.id].edgeReplacedById = newEdge.id; // hide the replaced edge + + this._backupEdgeOptions(_edge); + + _edge.setOptions({ + physics: false + }); + } + } + /** + * This function checks the options that can be supplied to the different cluster functions + * for certain fields and inserts defaults if needed + * @param {Object} options + * @returns {*} + * @private + */ + + }, { + key: "_checkOptions", + value: function _checkOptions() { + var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + + if (options.clusterEdgeProperties === undefined) { + options.clusterEdgeProperties = {}; + } + + if (options.clusterNodeProperties === undefined) { + options.clusterNodeProperties = {}; + } + + return options; + } + /** + * + * @param {Object} childNodesObj | object with node objects, id as keys, same as childNodes except it also contains a source node + * @param {Object} childEdgesObj | object with edge objects, id as keys + * @param {Array} options | object with {clusterNodeProperties, clusterEdgeProperties, processProperties} + * @param {boolean} refreshData | when true, do not wrap up + * @private + */ + + }, { + key: "_cluster", + value: function _cluster(childNodesObj, childEdgesObj, options) { + var refreshData = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true; + // Remove nodes which are already clustered + var tmpNodesToRemove = []; + + for (var nodeId in childNodesObj) { + if (childNodesObj.hasOwnProperty(nodeId)) { + if (this.clusteredNodes[nodeId] !== undefined) { + tmpNodesToRemove.push(nodeId); + } + } + } + + for (var n = 0; n < tmpNodesToRemove.length; ++n) { + delete childNodesObj[tmpNodesToRemove[n]]; + } // kill condition: no nodes don't bother + + + if (Object.keys(childNodesObj).length == 0) { + return; + } // allow clusters of 1 if options allow + + + if (Object.keys(childNodesObj).length == 1 && options.clusterNodeProperties.allowSingleNodeCluster != true) { + return; + } + + var clusterNodeProperties = util.deepExtend({}, options.clusterNodeProperties); // construct the clusterNodeProperties + + if (options.processProperties !== undefined) { + // get the childNode options + var childNodesOptions = []; + + for (var _nodeId in childNodesObj) { + if (childNodesObj.hasOwnProperty(_nodeId)) { + var clonedOptions = NetworkUtil.cloneOptions(childNodesObj[_nodeId]); + childNodesOptions.push(clonedOptions); + } + } // get cluster properties based on childNodes + + + var childEdgesOptions = []; + + for (var edgeId in childEdgesObj) { + if (childEdgesObj.hasOwnProperty(edgeId)) { + // these cluster edges will be removed on creation of the cluster. + if (edgeId.substr(0, 12) !== "clusterEdge:") { + var _clonedOptions = NetworkUtil.cloneOptions(childEdgesObj[edgeId], 'edge'); + + childEdgesOptions.push(_clonedOptions); + } + } + } + + clusterNodeProperties = options.processProperties(clusterNodeProperties, childNodesOptions, childEdgesOptions); + + if (!clusterNodeProperties) { + throw new Error("The processProperties function does not return properties!"); + } + } // check if we have an unique id; + + + if (clusterNodeProperties.id === undefined) { + clusterNodeProperties.id = 'cluster:' + util.randomUUID(); + } + + var clusterId = clusterNodeProperties.id; + + if (clusterNodeProperties.label === undefined) { + clusterNodeProperties.label = 'cluster'; + } // give the clusterNode a position if it does not have one. + + + var pos = undefined; + + if (clusterNodeProperties.x === undefined) { + pos = this._getClusterPosition(childNodesObj); + clusterNodeProperties.x = pos.x; + } + + if (clusterNodeProperties.y === undefined) { + if (pos === undefined) { + pos = this._getClusterPosition(childNodesObj); + } + + clusterNodeProperties.y = pos.y; + } // force the ID to remain the same + + + clusterNodeProperties.id = clusterId; // create the cluster Node + // Note that allowSingleNodeCluster, if present, is stored in the options as well + + var clusterNode = this.body.functions.createNode(clusterNodeProperties, Cluster); + clusterNode.containedNodes = childNodesObj; + clusterNode.containedEdges = childEdgesObj; // cache a copy from the cluster edge properties if we have to reconnect others later on + + clusterNode.clusterEdgeProperties = options.clusterEdgeProperties; // finally put the cluster node into global + + this.body.nodes[clusterNodeProperties.id] = clusterNode; + + this._clusterEdges(childNodesObj, childEdgesObj, clusterNodeProperties, options.clusterEdgeProperties); // set ID to undefined so no duplicates arise + + + clusterNodeProperties.id = undefined; // wrap up + + if (refreshData === true) { + this.body.emitter.emit('_dataChanged'); + } + } + /** + * + * @param {Edge} edge + * @private + */ + + }, { + key: "_backupEdgeOptions", + value: function _backupEdgeOptions(edge) { + if (this.clusteredEdges[edge.id] === undefined) { + this.clusteredEdges[edge.id] = { + physics: edge.options.physics + }; + } + } + /** + * + * @param {Edge} edge + * @private + */ + + }, { + key: "_restoreEdge", + value: function _restoreEdge(edge) { + var originalOptions = this.clusteredEdges[edge.id]; + + if (originalOptions !== undefined) { + edge.setOptions({ + physics: originalOptions.physics + }); + delete this.clusteredEdges[edge.id]; + } + } + /** + * Check if a node is a cluster. + * @param {Node.id} nodeId + * @returns {*} + */ + + }, { + key: "isCluster", + value: function isCluster(nodeId) { + if (this.body.nodes[nodeId] !== undefined) { + return this.body.nodes[nodeId].isCluster === true; + } else { + console.log("Node does not exist."); + return false; + } + } + /** + * get the position of the cluster node based on what's inside + * @param {object} childNodesObj | object with node objects, id as keys + * @returns {{x: number, y: number}} + * @private + */ + + }, { + key: "_getClusterPosition", + value: function _getClusterPosition(childNodesObj) { + var childKeys = Object.keys(childNodesObj); + var minX = childNodesObj[childKeys[0]].x; + var maxX = childNodesObj[childKeys[0]].x; + var minY = childNodesObj[childKeys[0]].y; + var maxY = childNodesObj[childKeys[0]].y; + var node; + + for (var i = 1; i < childKeys.length; i++) { + node = childNodesObj[childKeys[i]]; + minX = node.x < minX ? node.x : minX; + maxX = node.x > maxX ? node.x : maxX; + minY = node.y < minY ? node.y : minY; + maxY = node.y > maxY ? node.y : maxY; + } + + return { + x: 0.5 * (minX + maxX), + y: 0.5 * (minY + maxY) + }; + } + /** + * Open a cluster by calling this function. + * @param {vis.Edge.id} clusterNodeId | the ID of the cluster node + * @param {Object} options + * @param {boolean} refreshData | wrap up afterwards if not true + */ + + }, { + key: "openCluster", + value: function openCluster(clusterNodeId, options) { + var refreshData = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true; + + // kill conditions + if (clusterNodeId === undefined) { + throw new Error("No clusterNodeId supplied to openCluster."); + } + + var clusterNode = this.body.nodes[clusterNodeId]; + + if (clusterNode === undefined) { + throw new Error("The clusterNodeId supplied to openCluster does not exist."); + } + + if (clusterNode.isCluster !== true || clusterNode.containedNodes === undefined || clusterNode.containedEdges === undefined) { + throw new Error("The node:" + clusterNodeId + " is not a valid cluster."); + } // Check if current cluster is clustered itself + + + var stack = this.findNode(clusterNodeId); + var parentIndex = stack.indexOf(clusterNodeId) - 1; + + if (parentIndex >= 0) { + // Current cluster is clustered; transfer contained nodes and edges to parent + var parentClusterNodeId = stack[parentIndex]; + var parentClusterNode = this.body.nodes[parentClusterNodeId]; // clustering.clusteredNodes and clustering.clusteredEdges remain unchanged + + parentClusterNode._openChildCluster(clusterNodeId); // All components of child cluster node have been transferred. It can die now. + + + delete this.body.nodes[clusterNodeId]; + + if (refreshData === true) { + this.body.emitter.emit('_dataChanged'); + } + + return; + } // main body + + + var containedNodes = clusterNode.containedNodes; + var containedEdges = clusterNode.containedEdges; // allow the user to position the nodes after release. + + if (options !== undefined && options.releaseFunction !== undefined && typeof options.releaseFunction === 'function') { + var positions = {}; + var clusterPosition = { + x: clusterNode.x, + y: clusterNode.y + }; + + for (var nodeId in containedNodes) { + if (containedNodes.hasOwnProperty(nodeId)) { + var containedNode = this.body.nodes[nodeId]; + positions[nodeId] = { + x: containedNode.x, + y: containedNode.y + }; + } + } + + var newPositions = options.releaseFunction(clusterPosition, positions); + + for (var _nodeId2 in containedNodes) { + if (containedNodes.hasOwnProperty(_nodeId2)) { + var _containedNode = this.body.nodes[_nodeId2]; + + if (newPositions[_nodeId2] !== undefined) { + _containedNode.x = newPositions[_nodeId2].x === undefined ? clusterNode.x : newPositions[_nodeId2].x; + _containedNode.y = newPositions[_nodeId2].y === undefined ? clusterNode.y : newPositions[_nodeId2].y; + } + } + } + } else { + // copy the position from the cluster + util.forEach(containedNodes, function (containedNode) { + // inherit position + if (containedNode.options.fixed.x === false) { + containedNode.x = clusterNode.x; + } + + if (containedNode.options.fixed.y === false) { + containedNode.y = clusterNode.y; + } + }); + } // release nodes + + + for (var _nodeId3 in containedNodes) { + if (containedNodes.hasOwnProperty(_nodeId3)) { + var _containedNode2 = this.body.nodes[_nodeId3]; // inherit speed + + _containedNode2.vx = clusterNode.vx; + _containedNode2.vy = clusterNode.vy; + + _containedNode2.setOptions({ + physics: true + }); + + delete this.clusteredNodes[_nodeId3]; + } + } // copy the clusterNode edges because we cannot iterate over an object that we add or remove from. + + + var edgesToBeDeleted = []; + + for (var i = 0; i < clusterNode.edges.length; i++) { + edgesToBeDeleted.push(clusterNode.edges[i]); + } // actually handling the deleting. + + + for (var _i2 = 0; _i2 < edgesToBeDeleted.length; _i2++) { + var edge = edgesToBeDeleted[_i2]; + + var otherNodeId = this._getConnectedId(edge, clusterNodeId); + + var otherNode = this.clusteredNodes[otherNodeId]; + + for (var j = 0; j < edge.clusteringEdgeReplacingIds.length; j++) { + var transferId = edge.clusteringEdgeReplacingIds[j]; + var transferEdge = this.body.edges[transferId]; + if (transferEdge === undefined) continue; // if the other node is in another cluster, we transfer ownership of this edge to the other cluster + + if (otherNode !== undefined) { + // transfer ownership: + var otherCluster = this.body.nodes[otherNode.clusterId]; + otherCluster.containedEdges[transferEdge.id] = transferEdge; // delete local reference + + delete containedEdges[transferEdge.id]; // get to and from + + var fromId = transferEdge.fromId; + var toId = transferEdge.toId; + + if (transferEdge.toId == otherNodeId) { + toId = otherNode.clusterId; + } else { + fromId = otherNode.clusterId; + } // create new cluster edge from the otherCluster + + + this._createClusteredEdge(fromId, toId, transferEdge, otherCluster.clusterEdgeProperties, { + hidden: false, + physics: true + }); + } else { + this._restoreEdge(transferEdge); + } + } + + edge.remove(); + } // handle the releasing of the edges + + + for (var edgeId in containedEdges) { + if (containedEdges.hasOwnProperty(edgeId)) { + this._restoreEdge(containedEdges[edgeId]); + } + } // remove clusterNode + + + delete this.body.nodes[clusterNodeId]; + + if (refreshData === true) { + this.body.emitter.emit('_dataChanged'); + } + } + /** + * + * @param {Cluster.id} clusterId + * @returns {Array.} + */ + + }, { + key: "getNodesInCluster", + value: function getNodesInCluster(clusterId) { + var nodesArray = []; + + if (this.isCluster(clusterId) === true) { + var containedNodes = this.body.nodes[clusterId].containedNodes; + + for (var nodeId in containedNodes) { + if (containedNodes.hasOwnProperty(nodeId)) { + nodesArray.push(this.body.nodes[nodeId].id); + } + } + } + + return nodesArray; + } + /** + * Get the stack clusterId's that a certain node resides in. cluster A -> cluster B -> cluster C -> node + * + * If a node can't be found in the chain, return an empty array. + * + * @param {string|number} nodeId + * @returns {Array} + */ + + }, { + key: "findNode", + value: function findNode(nodeId) { + var stack = []; + var max = 100; + var counter = 0; + var node; + + while (this.clusteredNodes[nodeId] !== undefined && counter < max) { + node = this.body.nodes[nodeId]; + if (node === undefined) return []; + stack.push(node.id); + nodeId = this.clusteredNodes[nodeId].clusterId; + counter++; + } + + node = this.body.nodes[nodeId]; + if (node === undefined) return []; + stack.push(node.id); + stack.reverse(); + return stack; + } + /** + * Using a clustered nodeId, update with the new options + * @param {vis.Edge.id} clusteredNodeId + * @param {object} newOptions + */ + + }, { + key: "updateClusteredNode", + value: function updateClusteredNode(clusteredNodeId, newOptions) { + if (clusteredNodeId === undefined) { + throw new Error("No clusteredNodeId supplied to updateClusteredNode."); + } + + if (newOptions === undefined) { + throw new Error("No newOptions supplied to updateClusteredNode."); + } + + if (this.body.nodes[clusteredNodeId] === undefined) { + throw new Error("The clusteredNodeId supplied to updateClusteredNode does not exist."); + } + + this.body.nodes[clusteredNodeId].setOptions(newOptions); + this.body.emitter.emit('_dataChanged'); + } + /** + * Using a base edgeId, update all related clustered edges with the new options + * @param {vis.Edge.id} startEdgeId + * @param {object} newOptions + */ + + }, { + key: "updateEdge", + value: function updateEdge(startEdgeId, newOptions) { + if (startEdgeId === undefined) { + throw new Error("No startEdgeId supplied to updateEdge."); + } + + if (newOptions === undefined) { + throw new Error("No newOptions supplied to updateEdge."); + } + + if (this.body.edges[startEdgeId] === undefined) { + throw new Error("The startEdgeId supplied to updateEdge does not exist."); + } + + var allEdgeIds = this.getClusteredEdges(startEdgeId); + + for (var i = 0; i < allEdgeIds.length; i++) { + var edge = this.body.edges[allEdgeIds[i]]; + edge.setOptions(newOptions); + } + + this.body.emitter.emit('_dataChanged'); + } + /** + * Get a stack of clusterEdgeId's (+base edgeid) that a base edge is the same as. cluster edge C -> cluster edge B -> cluster edge A -> base edge(edgeId) + * @param {vis.Edge.id} edgeId + * @returns {Array.} + */ + + }, { + key: "getClusteredEdges", + value: function getClusteredEdges(edgeId) { + var stack = []; + var max = 100; + var counter = 0; + + while (edgeId !== undefined && this.body.edges[edgeId] !== undefined && counter < max) { + stack.push(this.body.edges[edgeId].id); + edgeId = this.body.edges[edgeId].edgeReplacedById; + counter++; + } + + stack.reverse(); + return stack; + } + /** + * Get the base edge id of clusterEdgeId. cluster edge (clusteredEdgeId) -> cluster edge B -> cluster edge C -> base edge + * @param {vis.Edge.id} clusteredEdgeId + * @returns {vis.Edge.id} baseEdgeId + * + * TODO: deprecate in 5.0.0. Method getBaseEdges() is the correct one to use. + */ + + }, { + key: "getBaseEdge", + value: function getBaseEdge(clusteredEdgeId) { + // Just kludge this by returning the first base edge id found + return this.getBaseEdges(clusteredEdgeId)[0]; + } + /** + * Get all regular edges for this clustered edge id. + * + * @param {vis.Edge.id} clusteredEdgeId + * @returns {Array.} all baseEdgeId's under this clustered edge + */ + + }, { + key: "getBaseEdges", + value: function getBaseEdges(clusteredEdgeId) { + var IdsToHandle = [clusteredEdgeId]; + var doneIds = []; + var foundIds = []; + var max = 100; + var counter = 0; + + while (IdsToHandle.length > 0 && counter < max) { + var nextId = IdsToHandle.pop(); + if (nextId === undefined) continue; // Paranoia here and onwards + + var nextEdge = this.body.edges[nextId]; + if (nextEdge === undefined) continue; + counter++; + var replacingIds = nextEdge.clusteringEdgeReplacingIds; + + if (replacingIds === undefined) { + // nextId is a base id + foundIds.push(nextId); + } else { + // Another cluster edge, unravel this one as well + for (var i = 0; i < replacingIds.length; ++i) { + var replacingId = replacingIds[i]; // Don't add if already handled + // TODO: never triggers; find a test-case which does + + if (IdsToHandle.indexOf(replacingIds) !== -1 || doneIds.indexOf(replacingIds) !== -1) { + continue; + } + + IdsToHandle.push(replacingId); + } + } + + doneIds.push(nextId); + } + + return foundIds; + } + /** + * Get the Id the node is connected to + * @param {vis.Edge} edge + * @param {Node.id} nodeId + * @returns {*} + * @private + */ + + }, { + key: "_getConnectedId", + value: function _getConnectedId(edge, nodeId) { + if (edge.toId != nodeId) { + return edge.toId; + } else if (edge.fromId != nodeId) { + return edge.fromId; + } else { + return edge.fromId; + } + } + /** + * We determine how many connections denote an important hub. + * We take the mean + 2*std as the important hub size. (Assuming a normal distribution of data, ~2.2%) + * + * @returns {number} + * @private + */ + + }, { + key: "_getHubSize", + value: function _getHubSize() { + var average = 0; + var averageSquared = 0; + var hubCounter = 0; + var largestHub = 0; + + for (var i = 0; i < this.body.nodeIndices.length; i++) { + var node = this.body.nodes[this.body.nodeIndices[i]]; + + if (node.edges.length > largestHub) { + largestHub = node.edges.length; + } + + average += node.edges.length; + averageSquared += Math.pow(node.edges.length, 2); + hubCounter += 1; + } + + average = average / hubCounter; + averageSquared = averageSquared / hubCounter; + var variance = averageSquared - Math.pow(average, 2); + var standardDeviation = Math.sqrt(variance); + var hubThreshold = Math.floor(average + 2 * standardDeviation); // always have at least one to cluster + + if (hubThreshold > largestHub) { + hubThreshold = largestHub; + } + + return hubThreshold; + } + /** + * Create an edge for the cluster representation. + * + * @param {Node.id} fromId + * @param {Node.id} toId + * @param {vis.Edge} baseEdge + * @param {Object} clusterEdgeProperties + * @param {Object} extraOptions + * @returns {Edge} newly created clustered edge + * @private + */ + + }, { + key: "_createClusteredEdge", + value: function _createClusteredEdge(fromId, toId, baseEdge, clusterEdgeProperties, extraOptions) { + // copy the options of the edge we will replace + var clonedOptions = NetworkUtil.cloneOptions(baseEdge, 'edge'); // make sure the properties of clusterEdges are superimposed on it + + util.deepExtend(clonedOptions, clusterEdgeProperties); // set up the edge + + clonedOptions.from = fromId; + clonedOptions.to = toId; + clonedOptions.id = 'clusterEdge:' + util.randomUUID(); // apply the edge specific options to it if specified + + if (extraOptions !== undefined) { + util.deepExtend(clonedOptions, extraOptions); + } + + var newEdge = this.body.functions.createEdge(clonedOptions); + newEdge.clusteringEdgeReplacingIds = [baseEdge.id]; + newEdge.connect(); // Register the new edge + + this.body.edges[newEdge.id] = newEdge; + return newEdge; + } + /** + * Add the passed child nodes and edges to the given cluster node. + * + * @param {Object|Node} childNodes hash of nodes or single node to add in cluster + * @param {Object|Edge} childEdges hash of edges or single edge to take into account when clustering + * @param {Node} clusterNode cluster node to add nodes and edges to + * @param {Object} [clusterEdgeProperties] + * @private + */ + + }, { + key: "_clusterEdges", + value: function _clusterEdges(childNodes, childEdges, clusterNode, clusterEdgeProperties) { + if (childEdges instanceof Edge) { + var edge = childEdges; + var obj = {}; + obj[edge.id] = edge; + childEdges = obj; + } + + if (childNodes instanceof Node) { + var node = childNodes; + var _obj = {}; + _obj[node.id] = node; + childNodes = _obj; + } + + if (clusterNode === undefined || clusterNode === null) { + throw new Error("_clusterEdges: parameter clusterNode required"); + } + + if (clusterEdgeProperties === undefined) { + // Take the required properties from the cluster node + clusterEdgeProperties = clusterNode.clusterEdgeProperties; + } // create the new edges that will connect to the cluster. + // All self-referencing edges will be added to childEdges here. + + + this._createClusterEdges(childNodes, childEdges, clusterNode, clusterEdgeProperties); // disable the childEdges + + + for (var edgeId in childEdges) { + if (childEdges.hasOwnProperty(edgeId)) { + if (this.body.edges[edgeId] !== undefined) { + var _edge2 = this.body.edges[edgeId]; // cache the options before changing + + this._backupEdgeOptions(_edge2); // disable physics and hide the edge + + + _edge2.setOptions({ + physics: false + }); + } + } + } // disable the childNodes + + + for (var nodeId in childNodes) { + if (childNodes.hasOwnProperty(nodeId)) { + this.clusteredNodes[nodeId] = { + clusterId: clusterNode.id, + node: this.body.nodes[nodeId] + }; + this.body.nodes[nodeId].setOptions({ + physics: false + }); + } + } + } + /** + * Determine in which cluster given nodeId resides. + * + * If not in cluster, return undefined. + * + * NOTE: If you know a cleaner way to do this, please enlighten me (wimrijnders). + * + * @param {Node.id} nodeId + * @returns {Node|undefined} Node instance for cluster, if present + * @private + */ + + }, { + key: "_getClusterNodeForNode", + value: function _getClusterNodeForNode(nodeId) { + if (nodeId === undefined) return undefined; + var clusteredNode = this.clusteredNodes[nodeId]; // NOTE: If no cluster info found, it should actually be an error + + if (clusteredNode === undefined) return undefined; + var clusterId = clusteredNode.clusterId; + if (clusterId === undefined) return undefined; + return this.body.nodes[clusterId]; + } + /** + * Internal helper function for conditionally removing items in array + * + * Done like this because Array.filter() is not fully supported by all IE's. + * + * @param {Array} arr + * @param {function} callback + * @returns {Array} + * @private + */ + + }, { + key: "_filter", + value: function _filter(arr, callback) { + var ret = []; + util.forEach(arr, function (item) { + if (callback(item)) { + ret.push(item); + } + }); + return ret; + } + /** + * Scan all edges for changes in clustering and adjust this if necessary. + * + * Call this (internally) after there has been a change in node or edge data. + * + * Pre: States of this.body.nodes and this.body.edges consistent + * Pre: this.clusteredNodes and this.clusteredEdge consistent with containedNodes and containedEdges + * of cluster nodes. + */ + + }, { + key: "_updateState", + value: function _updateState() { + var _this4 = this; + + var nodeId; + var deletedNodeIds = []; + var deletedEdgeIds = {}; + /** + * Utility function to iterate over clustering nodes only + * + * @param {Function} callback function to call for each cluster node + */ + + var eachClusterNode = function eachClusterNode(callback) { + util.forEach(_this4.body.nodes, function (node) { + if (node.isCluster === true) { + callback(node); + } + }); + }; // + // Remove deleted regular nodes from clustering + // + // Determine the deleted nodes + + + for (nodeId in this.clusteredNodes) { + if (!this.clusteredNodes.hasOwnProperty(nodeId)) continue; + var node = this.body.nodes[nodeId]; + + if (node === undefined) { + deletedNodeIds.push(nodeId); + } + } // Remove nodes from cluster nodes + + + eachClusterNode(function (clusterNode) { + for (var n = 0; n < deletedNodeIds.length; n++) { + delete clusterNode.containedNodes[deletedNodeIds[n]]; + } + }); // Remove nodes from cluster list + + for (var n = 0; n < deletedNodeIds.length; n++) { + delete this.clusteredNodes[deletedNodeIds[n]]; + } // + // Remove deleted edges from clustering + // + // Add the deleted clustered edges to the list + + + util.forEach(this.clusteredEdges, function (edgeId) { + var edge = _this4.body.edges[edgeId]; + + if (edge === undefined || !edge.endPointsValid()) { + deletedEdgeIds[edgeId] = edgeId; + } + }); // Cluster nodes can also contain edges which are not clustered, + // i.e. nodes 1-2 within cluster with an edge in between. + // So the cluster nodes also need to be scanned for invalid edges + + eachClusterNode(function (clusterNode) { + util.forEach(clusterNode.containedEdges, function (edge, edgeId) { + if (!edge.endPointsValid() && !deletedEdgeIds[edgeId]) { + deletedEdgeIds[edgeId] = edgeId; + } + }); + }); // Also scan for cluster edges which need to be removed in the active list. + // Regular edges have been removed beforehand, so this only picks up the cluster edges. + + util.forEach(this.body.edges, function (edge, edgeId) { + // Explicitly scan the contained edges for validity + var isValid = true; + var replacedIds = edge.clusteringEdgeReplacingIds; + + if (replacedIds !== undefined) { + var numValid = 0; + util.forEach(replacedIds, function (containedEdgeId) { + var containedEdge = _this4.body.edges[containedEdgeId]; + + if (containedEdge !== undefined && containedEdge.endPointsValid()) { + numValid += 1; + } + }); + isValid = numValid > 0; + } + + if (!edge.endPointsValid() || !isValid) { + deletedEdgeIds[edgeId] = edgeId; + } + }); // Remove edges from cluster nodes + + eachClusterNode(function (clusterNode) { + util.forEach(deletedEdgeIds, function (deletedEdgeId) { + delete clusterNode.containedEdges[deletedEdgeId]; + util.forEach(clusterNode.edges, function (edge, m) { + if (edge.id === deletedEdgeId) { + clusterNode.edges[m] = null; // Don't want to directly delete here, because in the loop + + return; + } + + edge.clusteringEdgeReplacingIds = _this4._filter(edge.clusteringEdgeReplacingIds, function (id) { + return !deletedEdgeIds[id]; + }); + }); // Clean up the nulls + + clusterNode.edges = _this4._filter(clusterNode.edges, function (item) { + return item !== null; + }); + }); + }); // Remove from cluster list + + util.forEach(deletedEdgeIds, function (edgeId) { + delete _this4.clusteredEdges[edgeId]; + }); // Remove cluster edges from active list (this.body.edges). + // deletedEdgeIds still contains id of regular edges, but these should all + // be gone when you reach here. + + util.forEach(deletedEdgeIds, function (edgeId) { + delete _this4.body.edges[edgeId]; + }); // + // Check changed cluster state of edges + // + // Iterating over keys here, because edges may be removed in the loop + + var ids = Object.keys(this.body.edges); + util.forEach(ids, function (edgeId) { + var edge = _this4.body.edges[edgeId]; + + var shouldBeClustered = _this4._isClusteredNode(edge.fromId) || _this4._isClusteredNode(edge.toId); + + if (shouldBeClustered === _this4._isClusteredEdge(edge.id)) { + return; // all is well + } + + if (shouldBeClustered) { + // add edge to clustering + var clusterFrom = _this4._getClusterNodeForNode(edge.fromId); + + if (clusterFrom !== undefined) { + _this4._clusterEdges(_this4.body.nodes[edge.fromId], edge, clusterFrom); + } + + var clusterTo = _this4._getClusterNodeForNode(edge.toId); + + if (clusterTo !== undefined) { + _this4._clusterEdges(_this4.body.nodes[edge.toId], edge, clusterTo); + } // TODO: check that it works for both edges clustered + // (This might be paranoia) + + } else { + delete _this4._clusterEdges[edgeId]; + + _this4._restoreEdge(edge); // This should not be happening, the state should + // be properly updated at this point. + // + // If it *is* reached during normal operation, then we have to implement + // undo clustering for this edge here. + // throw new Error('remove edge from clustering not implemented!') + + } + }); // Clusters may be nested to any level. Keep on opening until nothing to open + + var changed = false; + var continueLoop = true; + + var _loop2 = function _loop2() { + var clustersToOpen = []; // Determine the id's of clusters that need opening + + eachClusterNode(function (clusterNode) { + var numNodes = Object.keys(clusterNode.containedNodes).length; + var allowSingle = clusterNode.options.allowSingleNodeCluster === true; + + if (allowSingle && numNodes < 1 || !allowSingle && numNodes < 2) { + clustersToOpen.push(clusterNode.id); + } + }); // Open them + + for (var _n = 0; _n < clustersToOpen.length; ++_n) { + _this4.openCluster(clustersToOpen[_n], {}, false + /* Don't refresh, we're in an refresh/update already */ + ); + } + + continueLoop = clustersToOpen.length > 0; + changed = changed || continueLoop; + }; + + while (continueLoop) { + _loop2(); + } + + if (changed) { + this._updateState(); // Redo this method (recursion possible! should be safe) + + } + } + /** + * Determine if node with given id is part of a cluster. + * + * @param {Node.id} nodeId + * @return {boolean} true if part of a cluster. + */ + + }, { + key: "_isClusteredNode", + value: function _isClusteredNode(nodeId) { + return this.clusteredNodes[nodeId] !== undefined; + } + /** + * Determine if edge with given id is not visible due to clustering. + * + * An edge is considered clustered if: + * - it is directly replaced by a clustering edge + * - any of its connecting nodes is in a cluster + * + * @param {vis.Edge.id} edgeId + * @return {boolean} true if part of a cluster. + */ + + }, { + key: "_isClusteredEdge", + value: function _isClusteredEdge(edgeId) { + return this.clusteredEdges[edgeId] !== undefined; + } + }]); + + return ClusterEngine; +}(); + +/** + * Initializes window.requestAnimationFrame() to a usable form. + * + * Specifically, set up this method for the case of running on node.js with jsdom enabled. + * + * NOTES: + * + * * On node.js, when calling this directly outside of this class, `window` is not defined. + * This happens even if jsdom is used. + * * For node.js + jsdom, `window` is available at the moment the constructor is called. + * For this reason, the called is placed within the constructor. + * * Even then, `window.requestAnimationFrame()` is not defined, so it still needs to be added. + * * During unit testing, it happens that the window object is reset during execution, causing + * a runtime error due to missing `requestAnimationFrame()`. This needs to be compensated for, + * see `_requestNextFrame()`. + * * Since this is a global object, it may affect other modules besides `Network`. With normal + * usage, this does not cause any problems. During unit testing, errors may occur. These have + * been compensated for, see comment block in _requestNextFrame(). + * + * @private + */ +function _initRequestAnimationFrame() { + var func; + + if (window !== undefined) { + func = window.requestAnimationFrame || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame || window.msRequestAnimationFrame; + } + + if (func === undefined) { + // window or method not present, setting mock requestAnimationFrame + window.requestAnimationFrame = function (callback) { + //console.log("Called mock requestAnimationFrame"); + callback(); + }; + } else { + window.requestAnimationFrame = func; + } +} +/** + * The canvas renderer + */ + +var CanvasRenderer = +/*#__PURE__*/ +function () { + /** + * @param {Object} body + * @param {Canvas} canvas + */ + function CanvasRenderer(body, canvas) { + classCallCheck$1(this, CanvasRenderer); + + _initRequestAnimationFrame(); + + this.body = body; + this.canvas = canvas; + this.redrawRequested = false; + this.renderTimer = undefined; + this.requiresTimeout = true; + this.renderingActive = false; + this.renderRequests = 0; + this.allowRedraw = true; + this.dragging = false; + this.zooming = false; + this.options = {}; + this.defaultOptions = { + hideEdgesOnDrag: false, + hideEdgesOnZoom: false, + hideNodesOnDrag: false + }; + util.extend(this.options, this.defaultOptions); + + this._determineBrowserMethod(); + + this.bindEventListeners(); + } + /** + * Binds event listeners + */ + + + createClass$1(CanvasRenderer, [{ + key: "bindEventListeners", + value: function bindEventListeners() { + var _this = this; + + this.body.emitter.on("dragStart", function () { + _this.dragging = true; + }); + this.body.emitter.on("dragEnd", function () { + _this.dragging = false; + }); + this.body.emitter.on("zoom", function () { + _this.zooming = true; + window.clearTimeout(_this.zoomTimeoutId); + _this.zoomTimeoutId = window.setTimeout(function () { + _this.zooming = false; + + _this._requestRedraw.bind(_this)(); + }, 250); + }); + this.body.emitter.on("_resizeNodes", function () { + _this._resizeNodes(); + }); + this.body.emitter.on("_redraw", function () { + if (_this.renderingActive === false) { + _this._redraw(); + } + }); + this.body.emitter.on("_blockRedraw", function () { + _this.allowRedraw = false; + }); + this.body.emitter.on("_allowRedraw", function () { + _this.allowRedraw = true; + _this.redrawRequested = false; + }); + this.body.emitter.on("_requestRedraw", this._requestRedraw.bind(this)); + this.body.emitter.on("_startRendering", function () { + _this.renderRequests += 1; + _this.renderingActive = true; + + _this._startRendering(); + }); + this.body.emitter.on("_stopRendering", function () { + _this.renderRequests -= 1; + _this.renderingActive = _this.renderRequests > 0; + _this.renderTimer = undefined; + }); + this.body.emitter.on('destroy', function () { + _this.renderRequests = 0; + _this.allowRedraw = false; + _this.renderingActive = false; + + if (_this.requiresTimeout === true) { + clearTimeout(_this.renderTimer); + } else { + window.cancelAnimationFrame(_this.renderTimer); + } + + _this.body.emitter.off(); + }); + } + /** + * + * @param {Object} options + */ + + }, { + key: "setOptions", + value: function setOptions(options) { + if (options !== undefined) { + var fields = ['hideEdgesOnDrag', 'hideEdgesOnZoom', 'hideNodesOnDrag']; + util.selectiveDeepExtend(fields, this.options, options); + } + } + /** + * Prepare the drawing of the next frame. + * + * Calls the callback when the next frame can or will be drawn. + * + * @param {function} callback + * @param {number} delay - timeout case only, wait this number of milliseconds + * @returns {function|undefined} + * @private + */ + + }, { + key: "_requestNextFrame", + value: function _requestNextFrame(callback, delay) { + // During unit testing, it happens that the mock window object is reset while + // the next frame is still pending. Then, either 'window' is not present, or + // 'requestAnimationFrame()' is not present because it is not defined on the + // mock window object. + // + // As a consequence, unrelated unit tests may appear to fail, even if the problem + // described happens in the current unit test. + // + // This is not something that will happen in normal operation, but we still need + // to take it into account. + // + if (typeof window === 'undefined') return; // Doing `if (window === undefined)` does not work here! + + var timer; + var myWindow = window; // Grab a reference to reduce the possibility that 'window' is reset + // while running this method. + + if (this.requiresTimeout === true) { + // wait given number of milliseconds and perform the animation step function + timer = myWindow.setTimeout(callback, delay); + } else { + if (myWindow.requestAnimationFrame) { + timer = myWindow.requestAnimationFrame(callback); + } + } + + return timer; + } + /** + * + * @private + */ + + }, { + key: "_startRendering", + value: function _startRendering() { + if (this.renderingActive === true) { + if (this.renderTimer === undefined) { + this.renderTimer = this._requestNextFrame(this._renderStep.bind(this), this.simulationInterval); + } + } + } + /** + * + * @private + */ + + }, { + key: "_renderStep", + value: function _renderStep() { + if (this.renderingActive === true) { + // reset the renderTimer so a new scheduled animation step can be set + this.renderTimer = undefined; + + if (this.requiresTimeout === true) { + // this schedules a new simulation step + this._startRendering(); + } + + this._redraw(); + + if (this.requiresTimeout === false) { + // this schedules a new simulation step + this._startRendering(); + } + } + } + /** + * Redraw the network with the current data + * chart will be resized too. + */ + + }, { + key: "redraw", + value: function redraw() { + this.body.emitter.emit('setSize'); + + this._redraw(); + } + /** + * Redraw the network with the current data + * @private + */ + + }, { + key: "_requestRedraw", + value: function _requestRedraw() { + var _this2 = this; + + if (this.redrawRequested !== true && this.renderingActive === false && this.allowRedraw === true) { + this.redrawRequested = true; + + this._requestNextFrame(function () { + _this2._redraw(false); + }, 0); + } + } + /** + * Redraw the network with the current data + * @param {boolean} [hidden=false] | Used to get the first estimate of the node sizes. + * Only the nodes are drawn after which they are quickly drawn over. + * @private + */ + + }, { + key: "_redraw", + value: function _redraw() { + var hidden = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; + + if (this.allowRedraw === true) { + this.body.emitter.emit("initRedraw"); + this.redrawRequested = false; // when the container div was hidden, this fixes it back up! + + if (this.canvas.frame.canvas.width === 0 || this.canvas.frame.canvas.height === 0) { + this.canvas.setSize(); + } + + this.canvas.setTransform(); + var ctx = this.canvas.getContext(); // clear the canvas + + var w = this.canvas.frame.canvas.clientWidth; + var h = this.canvas.frame.canvas.clientHeight; + ctx.clearRect(0, 0, w, h); // if the div is hidden, we stop the redraw here for performance. + + if (this.canvas.frame.clientWidth === 0) { + return; + } // set scaling and translation + + + ctx.save(); + ctx.translate(this.body.view.translation.x, this.body.view.translation.y); + ctx.scale(this.body.view.scale, this.body.view.scale); + ctx.beginPath(); + this.body.emitter.emit("beforeDrawing", ctx); + ctx.closePath(); + + if (hidden === false) { + if ((this.dragging === false || this.dragging === true && this.options.hideEdgesOnDrag === false) && (this.zooming === false || this.zooming === true && this.options.hideEdgesOnZoom === false)) { + this._drawEdges(ctx); + } + } + + if (this.dragging === false || this.dragging === true && this.options.hideNodesOnDrag === false) { + this._drawNodes(ctx, hidden); + } + + ctx.beginPath(); + this.body.emitter.emit("afterDrawing", ctx); + ctx.closePath(); // restore original scaling and translation + + ctx.restore(); + + if (hidden === true) { + ctx.clearRect(0, 0, w, h); + } + } + } + /** + * Redraw all nodes + * + * @param {CanvasRenderingContext2D} ctx + * @param {boolean} [alwaysShow] + * @private + */ + + }, { + key: "_resizeNodes", + value: function _resizeNodes() { + this.canvas.setTransform(); + var ctx = this.canvas.getContext(); + ctx.save(); + ctx.translate(this.body.view.translation.x, this.body.view.translation.y); + ctx.scale(this.body.view.scale, this.body.view.scale); + var nodes = this.body.nodes; + var node; // resize all nodes + + for (var nodeId in nodes) { + if (nodes.hasOwnProperty(nodeId)) { + node = nodes[nodeId]; + node.resize(ctx); + node.updateBoundingBox(ctx, node.selected); + } + } // restore original scaling and translation + + + ctx.restore(); + } + /** + * Redraw all nodes + * + * @param {CanvasRenderingContext2D} ctx 2D context of a HTML canvas + * @param {boolean} [alwaysShow] + * @private + */ + + }, { + key: "_drawNodes", + value: function _drawNodes(ctx) { + var alwaysShow = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; + var nodes = this.body.nodes; + var nodeIndices = this.body.nodeIndices; + var node; + var selected = []; + var margin = 20; + var topLeft = this.canvas.DOMtoCanvas({ + x: -margin, + y: -margin + }); + var bottomRight = this.canvas.DOMtoCanvas({ + x: this.canvas.frame.canvas.clientWidth + margin, + y: this.canvas.frame.canvas.clientHeight + margin + }); + var viewableArea = { + top: topLeft.y, + left: topLeft.x, + bottom: bottomRight.y, + right: bottomRight.x + }; // draw unselected nodes; + + for (var i = 0; i < nodeIndices.length; i++) { + node = nodes[nodeIndices[i]]; // set selected nodes aside + + if (node.isSelected()) { + selected.push(nodeIndices[i]); + } else { + if (alwaysShow === true) { + node.draw(ctx); + } else if (node.isBoundingBoxOverlappingWith(viewableArea) === true) { + node.draw(ctx); + } else { + node.updateBoundingBox(ctx, node.selected); + } + } + } // draw the selected nodes on top + + + for (var _i = 0; _i < selected.length; _i++) { + node = nodes[selected[_i]]; + node.draw(ctx); + } + } + /** + * Redraw all edges + * @param {CanvasRenderingContext2D} ctx 2D context of a HTML canvas + * @private + */ + + }, { + key: "_drawEdges", + value: function _drawEdges(ctx) { + var edges = this.body.edges; + var edgeIndices = this.body.edgeIndices; + var edge; + + for (var i = 0; i < edgeIndices.length; i++) { + edge = edges[edgeIndices[i]]; + + if (edge.connected === true) { + edge.draw(ctx); + } + } + } + /** + * Determine if the browser requires a setTimeout or a requestAnimationFrame. This was required because + * some implementations (safari and IE9) did not support requestAnimationFrame + * @private + */ + + }, { + key: "_determineBrowserMethod", + value: function _determineBrowserMethod() { + if (typeof window !== 'undefined') { + var browserType = navigator.userAgent.toLowerCase(); + this.requiresTimeout = false; + + if (browserType.indexOf('msie 9.0') != -1) { + // IE 9 + this.requiresTimeout = true; + } else if (browserType.indexOf('safari') != -1) { + // safari + if (browserType.indexOf('chrome') <= -1) { + this.requiresTimeout = true; + } + } + } else { + this.requiresTimeout = true; + } + } + }]); + + return CanvasRenderer; +}(); + +var hammerUtil = createCommonjsModule$2(function (module, exports) { + /** + * Register a touch event, taking place before a gesture + * @param {Hammer} hammer A hammer instance + * @param {function} callback Callback, called as callback(event) + */ + exports.onTouch = function (hammer, callback) { + callback.inputHandler = function (event) { + if (event.isFirst) { + callback(event); + } + }; + + hammer.on('hammer.input', callback.inputHandler); + }; + /** + * Register a release event, taking place after a gesture + * @param {Hammer} hammer A hammer instance + * @param {function} callback Callback, called as callback(event) + * @returns {*} + */ + + + exports.onRelease = function (hammer, callback) { + callback.inputHandler = function (event) { + if (event.isFinal) { + callback(event); + } + }; + + return hammer.on('hammer.input', callback.inputHandler); + }; + /** + * Unregister a touch event, taking place before a gesture + * @param {Hammer} hammer A hammer instance + * @param {function} callback Callback, called as callback(event) + */ + + + exports.offTouch = function (hammer, callback) { + hammer.off('hammer.input', callback.inputHandler); + }; + /** + * Unregister a release event, taking place before a gesture + * @param {Hammer} hammer A hammer instance + * @param {function} callback Callback, called as callback(event) + */ + + + exports.offRelease = exports.offTouch; + /** + * Hack the PinchRecognizer such that it doesn't prevent default behavior + * for vertical panning. + * + * Yeah ... this is quite a hack ... see https://github.com/hammerjs/hammer.js/issues/932 + * + * @param {Hammer.Pinch} pinchRecognizer + * @return {Hammer.Pinch} returns the pinchRecognizer + */ + + exports.disablePreventDefaultVertically = function (pinchRecognizer) { + var TOUCH_ACTION_PAN_Y = 'pan-y'; + + pinchRecognizer.getTouchAction = function () { + // default method returns [TOUCH_ACTION_NONE] + return [TOUCH_ACTION_PAN_Y]; + }; + + return pinchRecognizer; + }; +}); +var hammerUtil_1 = hammerUtil.onTouch; +var hammerUtil_2 = hammerUtil.onRelease; +var hammerUtil_3 = hammerUtil.offTouch; +var hammerUtil_4 = hammerUtil.offRelease; +var hammerUtil_5 = hammerUtil.disablePreventDefaultVertically; + +/** + * Create the main frame for the Network. + * This function is executed once when a Network object is created. The frame + * contains a canvas, and this canvas contains all objects like the axis and + * nodes. + */ + +var Canvas = +/*#__PURE__*/ +function () { + /** + * @param {Object} body + */ + function Canvas(body) { + classCallCheck$1(this, Canvas); + + this.body = body; + this.pixelRatio = 1; + this.resizeTimer = undefined; + this.resizeFunction = this._onResize.bind(this); + this.cameraState = {}; + this.initialized = false; + this.canvasViewCenter = {}; + this.options = {}; + this.defaultOptions = { + autoResize: true, + height: '100%', + width: '100%' + }; + util.extend(this.options, this.defaultOptions); + this.bindEventListeners(); + } + /** + * Binds event listeners + */ + + + createClass$1(Canvas, [{ + key: "bindEventListeners", + value: function bindEventListeners() { + var _this = this; + + // bind the events + this.body.emitter.once("resize", function (obj) { + if (obj.width !== 0) { + _this.body.view.translation.x = obj.width * 0.5; + } + + if (obj.height !== 0) { + _this.body.view.translation.y = obj.height * 0.5; + } + }); + this.body.emitter.on("setSize", this.setSize.bind(this)); + this.body.emitter.on("destroy", function () { + _this.hammerFrame.destroy(); + + _this.hammer.destroy(); + + _this._cleanUp(); + }); + } + /** + * @param {Object} options + */ + + }, { + key: "setOptions", + value: function setOptions(options) { + var _this2 = this; + + if (options !== undefined) { + var fields = ['width', 'height', 'autoResize']; + util.selectiveDeepExtend(fields, this.options, options); + } + + if (this.options.autoResize === true) { + // automatically adapt to a changing size of the browser. + this._cleanUp(); + + this.resizeTimer = setInterval(function () { + var changed = _this2.setSize(); + + if (changed === true) { + _this2.body.emitter.emit("_requestRedraw"); + } + }, 1000); + this.resizeFunction = this._onResize.bind(this); + util.addEventListener(window, 'resize', this.resizeFunction); + } + } + /** + * @private + */ + + }, { + key: "_cleanUp", + value: function _cleanUp() { + // automatically adapt to a changing size of the browser. + if (this.resizeTimer !== undefined) { + clearInterval(this.resizeTimer); + } + + util.removeEventListener(window, 'resize', this.resizeFunction); + this.resizeFunction = undefined; + } + /** + * @private + */ + + }, { + key: "_onResize", + value: function _onResize() { + this.setSize(); + this.body.emitter.emit("_redraw"); + } + /** + * Get and store the cameraState + * + * @param {number} [pixelRatio=this.pixelRatio] + * @private + */ + + }, { + key: "_getCameraState", + value: function _getCameraState() { + var pixelRatio = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.pixelRatio; + + if (this.initialized === true) { + this.cameraState.previousWidth = this.frame.canvas.width / pixelRatio; + this.cameraState.previousHeight = this.frame.canvas.height / pixelRatio; + this.cameraState.scale = this.body.view.scale; + this.cameraState.position = this.DOMtoCanvas({ + x: 0.5 * this.frame.canvas.width / pixelRatio, + y: 0.5 * this.frame.canvas.height / pixelRatio + }); + } + } + /** + * Set the cameraState + * @private + */ + + }, { + key: "_setCameraState", + value: function _setCameraState() { + if (this.cameraState.scale !== undefined && this.frame.canvas.clientWidth !== 0 && this.frame.canvas.clientHeight !== 0 && this.pixelRatio !== 0 && this.cameraState.previousWidth > 0) { + var widthRatio = this.frame.canvas.width / this.pixelRatio / this.cameraState.previousWidth; + var heightRatio = this.frame.canvas.height / this.pixelRatio / this.cameraState.previousHeight; + var newScale = this.cameraState.scale; + + if (widthRatio != 1 && heightRatio != 1) { + newScale = this.cameraState.scale * 0.5 * (widthRatio + heightRatio); + } else if (widthRatio != 1) { + newScale = this.cameraState.scale * widthRatio; + } else if (heightRatio != 1) { + newScale = this.cameraState.scale * heightRatio; + } + + this.body.view.scale = newScale; // this comes from the view module. + + var currentViewCenter = this.DOMtoCanvas({ + x: 0.5 * this.frame.canvas.clientWidth, + y: 0.5 * this.frame.canvas.clientHeight + }); + var distanceFromCenter = { + // offset from view, distance view has to change by these x and y to center the node + x: currentViewCenter.x - this.cameraState.position.x, + y: currentViewCenter.y - this.cameraState.position.y + }; + this.body.view.translation.x += distanceFromCenter.x * this.body.view.scale; + this.body.view.translation.y += distanceFromCenter.y * this.body.view.scale; + } + } + /** + * + * @param {number|string} value + * @returns {string} + * @private + */ + + }, { + key: "_prepareValue", + value: function _prepareValue(value) { + if (typeof value === 'number') { + return value + 'px'; + } else if (typeof value === 'string') { + if (value.indexOf('%') !== -1 || value.indexOf('px') !== -1) { + return value; + } else if (value.indexOf('%') === -1) { + return value + 'px'; + } + } + + throw new Error('Could not use the value supplied for width or height:' + value); + } + /** + * Create the HTML + */ + + }, { + key: "_create", + value: function _create() { + // remove all elements from the container element. + while (this.body.container.hasChildNodes()) { + this.body.container.removeChild(this.body.container.firstChild); + } + + this.frame = document.createElement('div'); + this.frame.className = 'vis-network'; + this.frame.style.position = 'relative'; + this.frame.style.overflow = 'hidden'; + this.frame.tabIndex = 900; // tab index is required for keycharm to bind keystrokes to the div instead of the window + ////////////////////////////////////////////////////////////////// + + this.frame.canvas = document.createElement("canvas"); + this.frame.canvas.style.position = 'relative'; + this.frame.appendChild(this.frame.canvas); + + if (!this.frame.canvas.getContext) { + var noCanvas = document.createElement('DIV'); + noCanvas.style.color = 'red'; + noCanvas.style.fontWeight = 'bold'; + noCanvas.style.padding = '10px'; + noCanvas.innerHTML = 'Error: your browser does not support HTML canvas'; + this.frame.canvas.appendChild(noCanvas); + } else { + this._setPixelRatio(); + + this.setTransform(); + } // add the frame to the container element + + + this.body.container.appendChild(this.frame); + this.body.view.scale = 1; + this.body.view.translation = { + x: 0.5 * this.frame.canvas.clientWidth, + y: 0.5 * this.frame.canvas.clientHeight + }; + + this._bindHammer(); + } + /** + * This function binds hammer, it can be repeated over and over due to the uniqueness check. + * @private + */ + + }, { + key: "_bindHammer", + value: function _bindHammer() { + var _this3 = this; + + if (this.hammer !== undefined) { + this.hammer.destroy(); + } + + this.drag = {}; + this.pinch = {}; // init hammer + + this.hammer = new hammer(this.frame.canvas); + this.hammer.get('pinch').set({ + enable: true + }); // enable to get better response, todo: test on mobile. + + this.hammer.get('pan').set({ + threshold: 5, + direction: hammer.DIRECTION_ALL + }); + hammerUtil.onTouch(this.hammer, function (event) { + _this3.body.eventListeners.onTouch(event); + }); + this.hammer.on('tap', function (event) { + _this3.body.eventListeners.onTap(event); + }); + this.hammer.on('doubletap', function (event) { + _this3.body.eventListeners.onDoubleTap(event); + }); + this.hammer.on('press', function (event) { + _this3.body.eventListeners.onHold(event); + }); + this.hammer.on('panstart', function (event) { + _this3.body.eventListeners.onDragStart(event); + }); + this.hammer.on('panmove', function (event) { + _this3.body.eventListeners.onDrag(event); + }); + this.hammer.on('panend', function (event) { + _this3.body.eventListeners.onDragEnd(event); + }); + this.hammer.on('pinch', function (event) { + _this3.body.eventListeners.onPinch(event); + }); // TODO: neatly cleanup these handlers when re-creating the Canvas, IF these are done with hammer, event.stopPropagation will not work? + + this.frame.canvas.addEventListener('mousewheel', function (event) { + _this3.body.eventListeners.onMouseWheel(event); + }); + this.frame.canvas.addEventListener('DOMMouseScroll', function (event) { + _this3.body.eventListeners.onMouseWheel(event); + }); + this.frame.canvas.addEventListener('mousemove', function (event) { + _this3.body.eventListeners.onMouseMove(event); + }); + this.frame.canvas.addEventListener('contextmenu', function (event) { + _this3.body.eventListeners.onContext(event); + }); + this.hammerFrame = new hammer(this.frame); + hammerUtil.onRelease(this.hammerFrame, function (event) { + _this3.body.eventListeners.onRelease(event); + }); + } + /** + * Set a new size for the network + * @param {string} width Width in pixels or percentage (for example '800px' + * or '50%') + * @param {string} height Height in pixels or percentage (for example '400px' + * or '30%') + * @returns {boolean} + */ + + }, { + key: "setSize", + value: function setSize() { + var width = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.options.width; + var height = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.options.height; + width = this._prepareValue(width); + height = this._prepareValue(height); + var emitEvent = false; + var oldWidth = this.frame.canvas.width; + var oldHeight = this.frame.canvas.height; // update the pixel ratio + // + // NOTE: Comment in following is rather inconsistent; this is the ONLY place in the code + // where it is assumed that the pixel ratio could change at runtime. + // The only way I can think of this happening is a rotating screen or tablet; but then + // there should be a mechanism for reloading the data (TODO: check if this is present). + // + // If the assumption is true (i.e. pixel ratio can change at runtime), then *all* usage + // of pixel ratio must be overhauled for this. + // + // For the time being, I will humor the assumption here, and in the rest of the code assume it is + // constant. + + var previousRatio = this.pixelRatio; // we cache this because the camera state storage needs the old value + + this._setPixelRatio(); + + if (width != this.options.width || height != this.options.height || this.frame.style.width != width || this.frame.style.height != height) { + this._getCameraState(previousRatio); + + this.frame.style.width = width; + this.frame.style.height = height; + this.frame.canvas.style.width = '100%'; + this.frame.canvas.style.height = '100%'; + this.frame.canvas.width = Math.round(this.frame.canvas.clientWidth * this.pixelRatio); + this.frame.canvas.height = Math.round(this.frame.canvas.clientHeight * this.pixelRatio); + this.options.width = width; + this.options.height = height; + this.canvasViewCenter = { + x: 0.5 * this.frame.clientWidth, + y: 0.5 * this.frame.clientHeight + }; + emitEvent = true; + } else { + // this would adapt the width of the canvas to the width from 100% if and only if + // there is a change. + var newWidth = Math.round(this.frame.canvas.clientWidth * this.pixelRatio); + var newHeight = Math.round(this.frame.canvas.clientHeight * this.pixelRatio); // store the camera if there is a change in size. + + if (this.frame.canvas.width !== newWidth || this.frame.canvas.height !== newHeight) { + this._getCameraState(previousRatio); + } + + if (this.frame.canvas.width !== newWidth) { + this.frame.canvas.width = newWidth; + emitEvent = true; + } + + if (this.frame.canvas.height !== newHeight) { + this.frame.canvas.height = newHeight; + emitEvent = true; + } + } + + if (emitEvent === true) { + this.body.emitter.emit('resize', { + width: Math.round(this.frame.canvas.width / this.pixelRatio), + height: Math.round(this.frame.canvas.height / this.pixelRatio), + oldWidth: Math.round(oldWidth / this.pixelRatio), + oldHeight: Math.round(oldHeight / this.pixelRatio) + }); // restore the camera on change. + + this._setCameraState(); + } // set initialized so the get and set camera will work from now on. + + + this.initialized = true; + return emitEvent; + } + /** + * + * @returns {CanvasRenderingContext2D} + */ + + }, { + key: "getContext", + value: function getContext() { + return this.frame.canvas.getContext("2d"); + } + /** + * Determine the pixel ratio for various browsers. + * + * @returns {number} + * @private + */ + + }, { + key: "_determinePixelRatio", + value: function _determinePixelRatio() { + var ctx = this.getContext(); + + if (ctx === undefined) { + throw new Error("Could not get canvax context"); + } + + var numerator = 1; + + if (typeof window !== 'undefined') { + // (window !== undefined) doesn't work here! + // Protection during unit tests, where 'window' can be missing + numerator = window.devicePixelRatio || 1; + } + + var denominator = ctx.webkitBackingStorePixelRatio || ctx.mozBackingStorePixelRatio || ctx.msBackingStorePixelRatio || ctx.oBackingStorePixelRatio || ctx.backingStorePixelRatio || 1; + return numerator / denominator; + } + /** + * Lazy determination of pixel ratio. + * + * @private + */ + + }, { + key: "_setPixelRatio", + value: function _setPixelRatio() { + this.pixelRatio = this._determinePixelRatio(); + } + /** + * Set the transform in the contained context, based on its pixelRatio + */ + + }, { + key: "setTransform", + value: function setTransform() { + var ctx = this.getContext(); + + if (ctx === undefined) { + throw new Error("Could not get canvax context"); + } + + ctx.setTransform(this.pixelRatio, 0, 0, this.pixelRatio, 0, 0); + } + /** + * Convert the X coordinate in DOM-space (coordinate point in browser relative to the container div) to + * the X coordinate in canvas-space (the simulation sandbox, which the camera looks upon) + * @param {number} x + * @returns {number} + * @private + */ + + }, { + key: "_XconvertDOMtoCanvas", + value: function _XconvertDOMtoCanvas(x) { + return (x - this.body.view.translation.x) / this.body.view.scale; + } + /** + * Convert the X coordinate in canvas-space (the simulation sandbox, which the camera looks upon) to + * the X coordinate in DOM-space (coordinate point in browser relative to the container div) + * @param {number} x + * @returns {number} + * @private + */ + + }, { + key: "_XconvertCanvasToDOM", + value: function _XconvertCanvasToDOM(x) { + return x * this.body.view.scale + this.body.view.translation.x; + } + /** + * Convert the Y coordinate in DOM-space (coordinate point in browser relative to the container div) to + * the Y coordinate in canvas-space (the simulation sandbox, which the camera looks upon) + * @param {number} y + * @returns {number} + * @private + */ + + }, { + key: "_YconvertDOMtoCanvas", + value: function _YconvertDOMtoCanvas(y) { + return (y - this.body.view.translation.y) / this.body.view.scale; + } + /** + * Convert the Y coordinate in canvas-space (the simulation sandbox, which the camera looks upon) to + * the Y coordinate in DOM-space (coordinate point in browser relative to the container div) + * @param {number} y + * @returns {number} + * @private + */ + + }, { + key: "_YconvertCanvasToDOM", + value: function _YconvertCanvasToDOM(y) { + return y * this.body.view.scale + this.body.view.translation.y; + } + /** + * @param {point} pos + * @returns {point} + */ + + }, { + key: "canvasToDOM", + value: function canvasToDOM(pos) { + return { + x: this._XconvertCanvasToDOM(pos.x), + y: this._YconvertCanvasToDOM(pos.y) + }; + } + /** + * + * @param {point} pos + * @returns {point} + */ + + }, { + key: "DOMtoCanvas", + value: function DOMtoCanvas(pos) { + return { + x: this._XconvertDOMtoCanvas(pos.x), + y: this._YconvertDOMtoCanvas(pos.y) + }; + } + }]); + + return Canvas; +}(); + +/** + * The view + */ + +var View = +/*#__PURE__*/ +function () { + /** + * @param {Object} body + * @param {Canvas} canvas + */ + function View(body, canvas) { + var _this = this; + + classCallCheck$1(this, View); + + this.body = body; + this.canvas = canvas; + this.animationSpeed = 1 / this.renderRefreshRate; + this.animationEasingFunction = "easeInOutQuint"; + this.easingTime = 0; + this.sourceScale = 0; + this.targetScale = 0; + this.sourceTranslation = 0; + this.targetTranslation = 0; + this.lockedOnNodeId = undefined; + this.lockedOnNodeOffset = undefined; + this.touchTime = 0; + this.viewFunction = undefined; + this.body.emitter.on("fit", this.fit.bind(this)); + this.body.emitter.on("animationFinished", function () { + _this.body.emitter.emit("_stopRendering"); + }); + this.body.emitter.on("unlockNode", this.releaseNode.bind(this)); + } + /** + * + * @param {Object} [options={}] + */ + + + createClass$1(View, [{ + key: "setOptions", + value: function setOptions() { + var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + this.options = options; + } + /** + * This function zooms out to fit all data on screen based on amount of nodes + * @param {Object} [options={{nodes=Array}}] + * @param {boolean} [initialZoom=false] | zoom based on fitted formula or range, true = fitted, default = false; + */ + + }, { + key: "fit", + value: function fit() { + var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : { + nodes: [] + }; + var initialZoom = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; + var range; + var zoomLevel; + options = Object.assign({}, options); + + if (options.nodes === undefined || options.nodes.length === 0) { + options.nodes = this.body.nodeIndices; + } + + if (initialZoom === true) { + // check if more than half of the nodes have a predefined position. If so, we use the range, not the approximation. + var positionDefined = 0; + + for (var nodeId in this.body.nodes) { + if (this.body.nodes.hasOwnProperty(nodeId)) { + var node = this.body.nodes[nodeId]; + + if (node.predefinedPosition === true) { + positionDefined += 1; + } + } + } + + if (positionDefined > 0.5 * this.body.nodeIndices.length) { + this.fit(options, false); + return; + } + + range = NetworkUtil.getRange(this.body.nodes, options.nodes); + var numberOfNodes = this.body.nodeIndices.length; + zoomLevel = 12.662 / (numberOfNodes + 7.4147) + 0.0964822; // this is obtained from fitting a dataset from 5 points with scale levels that looked good. + // correct for larger canvasses. + + var factor = Math.min(this.canvas.frame.canvas.clientWidth / 600, this.canvas.frame.canvas.clientHeight / 600); + zoomLevel *= factor; + } else { + this.body.emitter.emit("_resizeNodes"); + range = NetworkUtil.getRange(this.body.nodes, options.nodes); + var xDistance = Math.abs(range.maxX - range.minX) * 1.1; + var yDistance = Math.abs(range.maxY - range.minY) * 1.1; + var xZoomLevel = this.canvas.frame.canvas.clientWidth / xDistance; + var yZoomLevel = this.canvas.frame.canvas.clientHeight / yDistance; + zoomLevel = xZoomLevel <= yZoomLevel ? xZoomLevel : yZoomLevel; + } + + if (zoomLevel > 1.0) { + zoomLevel = 1.0; + } else if (zoomLevel === 0) { + zoomLevel = 1.0; + } + + var center = NetworkUtil.findCenter(range); + var animationOptions = { + position: center, + scale: zoomLevel, + animation: options.animation + }; + this.moveTo(animationOptions); + } // animation + + /** + * Center a node in view. + * + * @param {number} nodeId + * @param {number} [options] + */ + + }, { + key: "focus", + value: function focus(nodeId) { + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + + if (this.body.nodes[nodeId] !== undefined) { + var nodePosition = { + x: this.body.nodes[nodeId].x, + y: this.body.nodes[nodeId].y + }; + options.position = nodePosition; + options.lockedOnNode = nodeId; + this.moveTo(options); + } else { + console.log("Node: " + nodeId + " cannot be found."); + } + } + /** + * + * @param {Object} options | options.offset = {x:number, y:number} // offset from the center in DOM pixels + * | options.scale = number // scale to move to + * | options.position = {x:number, y:number} // position to move to + * | options.animation = {duration:number, easingFunction:String} || Boolean // position to move to + */ + + }, { + key: "moveTo", + value: function moveTo(options) { + if (options === undefined) { + options = {}; + return; + } + + if (options.offset != null) { + if (options.offset.x != null) { + // Coerce and verify that x is valid. + options.offset.x = +options.offset.x; + + if (!Number.isFinite(options.offset.x)) { + throw new TypeError('The option "offset.x" has to be a finite number.'); + } + } else { + options.offset.x = 0; + } + + if (options.offset.y != null) { + // Coerce and verify that y is valid. + options.offset.y = +options.offset.y; + + if (!Number.isFinite(options.offset.y)) { + throw new TypeError('The option "offset.y" has to be a finite number.'); + } + } else { + options.offset.x = 0; + } + } else { + options.offset = { + x: 0, + y: 0 + }; + } + + if (options.position != null) { + if (options.position.x != null) { + // Coerce and verify that x is valid. + options.position.x = +options.position.x; + + if (!Number.isFinite(options.position.x)) { + throw new TypeError('The option "position.x" has to be a finite number.'); + } + } else { + options.position.x = 0; + } + + if (options.position.y != null) { + // Coerce and verify that y is valid. + options.position.y = +options.position.y; + + if (!Number.isFinite(options.position.y)) { + throw new TypeError('The option "position.y" has to be a finite number.'); + } + } else { + options.position.x = 0; + } + } else { + options.position = this.getViewPosition(); + } + + if (options.scale != null) { + // Coerce and verify that the scale is valid. + options.scale = +options.scale; + + if (!(options.scale > 0)) { + throw new TypeError('The option "scale" has to be a number greater than zero.'); + } + } else { + options.scale = this.body.view.scale; + } + + if (options.animation === undefined) { + options.animation = { + duration: 0 + }; + } + + if (options.animation === false) { + options.animation = { + duration: 0 + }; + } + + if (options.animation === true) { + options.animation = {}; + } + + if (options.animation.duration === undefined) { + options.animation.duration = 1000; + } // default duration + + + if (options.animation.easingFunction === undefined) { + options.animation.easingFunction = "easeInOutQuad"; + } // default easing function + + + this.animateView(options); + } + /** + * + * @param {Object} options | options.offset = {x:number, y:number} // offset from the center in DOM pixels + * | options.time = number // animation time in milliseconds + * | options.scale = number // scale to animate to + * | options.position = {x:number, y:number} // position to animate to + * | options.easingFunction = String // linear, easeInQuad, easeOutQuad, easeInOutQuad, + * // easeInCubic, easeOutCubic, easeInOutCubic, + * // easeInQuart, easeOutQuart, easeInOutQuart, + * // easeInQuint, easeOutQuint, easeInOutQuint + */ + + }, { + key: "animateView", + value: function animateView(options) { + if (options === undefined) { + return; + } + + this.animationEasingFunction = options.animation.easingFunction; // release if something focussed on the node + + this.releaseNode(); + + if (options.locked === true) { + this.lockedOnNodeId = options.lockedOnNode; + this.lockedOnNodeOffset = options.offset; + } // forcefully complete the old animation if it was still running + + + if (this.easingTime != 0) { + this._transitionRedraw(true); // by setting easingtime to 1, we finish the animation. + + } + + this.sourceScale = this.body.view.scale; + this.sourceTranslation = this.body.view.translation; + this.targetScale = options.scale; // set the scale so the viewCenter is based on the correct zoom level. This is overridden in the transitionRedraw + // but at least then we'll have the target transition + + this.body.view.scale = this.targetScale; + var viewCenter = this.canvas.DOMtoCanvas({ + x: 0.5 * this.canvas.frame.canvas.clientWidth, + y: 0.5 * this.canvas.frame.canvas.clientHeight + }); + var distanceFromCenter = { + // offset from view, distance view has to change by these x and y to center the node + x: viewCenter.x - options.position.x, + y: viewCenter.y - options.position.y + }; + this.targetTranslation = { + x: this.sourceTranslation.x + distanceFromCenter.x * this.targetScale + options.offset.x, + y: this.sourceTranslation.y + distanceFromCenter.y * this.targetScale + options.offset.y + }; // if the time is set to 0, don't do an animation + + if (options.animation.duration === 0) { + if (this.lockedOnNodeId != undefined) { + this.viewFunction = this._lockedRedraw.bind(this); + this.body.emitter.on("initRedraw", this.viewFunction); + } else { + this.body.view.scale = this.targetScale; + this.body.view.translation = this.targetTranslation; + this.body.emitter.emit("_requestRedraw"); + } + } else { + this.animationSpeed = 1 / (60 * options.animation.duration * 0.001) || 1 / 60; // 60 for 60 seconds, 0.001 for milli's + + this.animationEasingFunction = options.animation.easingFunction; + this.viewFunction = this._transitionRedraw.bind(this); + this.body.emitter.on("initRedraw", this.viewFunction); + this.body.emitter.emit("_startRendering"); + } + } + /** + * used to animate smoothly by hijacking the redraw function. + * @private + */ + + }, { + key: "_lockedRedraw", + value: function _lockedRedraw() { + var nodePosition = { + x: this.body.nodes[this.lockedOnNodeId].x, + y: this.body.nodes[this.lockedOnNodeId].y + }; + var viewCenter = this.canvas.DOMtoCanvas({ + x: 0.5 * this.canvas.frame.canvas.clientWidth, + y: 0.5 * this.canvas.frame.canvas.clientHeight + }); + var distanceFromCenter = { + // offset from view, distance view has to change by these x and y to center the node + x: viewCenter.x - nodePosition.x, + y: viewCenter.y - nodePosition.y + }; + var sourceTranslation = this.body.view.translation; + var targetTranslation = { + x: sourceTranslation.x + distanceFromCenter.x * this.body.view.scale + this.lockedOnNodeOffset.x, + y: sourceTranslation.y + distanceFromCenter.y * this.body.view.scale + this.lockedOnNodeOffset.y + }; + this.body.view.translation = targetTranslation; + } + /** + * Resets state of a locked on Node + */ + + }, { + key: "releaseNode", + value: function releaseNode() { + if (this.lockedOnNodeId !== undefined && this.viewFunction !== undefined) { + this.body.emitter.off("initRedraw", this.viewFunction); + this.lockedOnNodeId = undefined; + this.lockedOnNodeOffset = undefined; + } + } + /** + * @param {boolean} [finished=false] + * @private + */ + + }, { + key: "_transitionRedraw", + value: function _transitionRedraw() { + var finished = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; + this.easingTime += this.animationSpeed; + this.easingTime = finished === true ? 1.0 : this.easingTime; + var progress = util.easingFunctions[this.animationEasingFunction](this.easingTime); + this.body.view.scale = this.sourceScale + (this.targetScale - this.sourceScale) * progress; + this.body.view.translation = { + x: this.sourceTranslation.x + (this.targetTranslation.x - this.sourceTranslation.x) * progress, + y: this.sourceTranslation.y + (this.targetTranslation.y - this.sourceTranslation.y) * progress + }; // cleanup + + if (this.easingTime >= 1.0) { + this.body.emitter.off("initRedraw", this.viewFunction); + this.easingTime = 0; + + if (this.lockedOnNodeId != undefined) { + this.viewFunction = this._lockedRedraw.bind(this); + this.body.emitter.on("initRedraw", this.viewFunction); + } + + this.body.emitter.emit("animationFinished"); + } + } + /** + * + * @returns {number} + */ + + }, { + key: "getScale", + value: function getScale() { + return this.body.view.scale; + } + /** + * + * @returns {{x: number, y: number}} + */ + + }, { + key: "getViewPosition", + value: function getViewPosition() { + return this.canvas.DOMtoCanvas({ + x: 0.5 * this.canvas.frame.canvas.clientWidth, + y: 0.5 * this.canvas.frame.canvas.clientHeight + }); + } + }]); + + return View; +}(); + +/** + * Navigation Handler + */ + +var NavigationHandler = +/*#__PURE__*/ +function () { + /** + * @param {Object} body + * @param {Canvas} canvas + */ + function NavigationHandler(body, canvas) { + var _this = this; + + classCallCheck$1(this, NavigationHandler); + + this.body = body; + this.canvas = canvas; + this.iconsCreated = false; + this.navigationHammers = []; + this.boundFunctions = {}; + this.touchTime = 0; + this.activated = false; + this.body.emitter.on("activate", function () { + _this.activated = true; + + _this.configureKeyboardBindings(); + }); + this.body.emitter.on("deactivate", function () { + _this.activated = false; + + _this.configureKeyboardBindings(); + }); + this.body.emitter.on("destroy", function () { + if (_this.keycharm !== undefined) { + _this.keycharm.destroy(); + } + }); + this.options = {}; + } + /** + * + * @param {Object} options + */ + + + createClass$1(NavigationHandler, [{ + key: "setOptions", + value: function setOptions(options) { + if (options !== undefined) { + this.options = options; + this.create(); + } + } + /** + * Creates or refreshes navigation and sets key bindings + */ + + }, { + key: "create", + value: function create() { + if (this.options.navigationButtons === true) { + if (this.iconsCreated === false) { + this.loadNavigationElements(); + } + } else if (this.iconsCreated === true) { + this.cleanNavigation(); + } + + this.configureKeyboardBindings(); + } + /** + * Cleans up previous navigation items + */ + + }, { + key: "cleanNavigation", + value: function cleanNavigation() { + // clean hammer bindings + if (this.navigationHammers.length != 0) { + for (var i = 0; i < this.navigationHammers.length; i++) { + this.navigationHammers[i].destroy(); + } + + this.navigationHammers = []; + } // clean up previous navigation items + + + if (this.navigationDOM && this.navigationDOM['wrapper'] && this.navigationDOM['wrapper'].parentNode) { + this.navigationDOM['wrapper'].parentNode.removeChild(this.navigationDOM['wrapper']); + } + + this.iconsCreated = false; + } + /** + * Creation of the navigation controls nodes. They are drawn over the rest of the nodes and are not affected by scale and translation + * they have a triggerFunction which is called on click. If the position of the navigation controls is dependent + * on this.frame.canvas.clientWidth or this.frame.canvas.clientHeight, we flag horizontalAlignLeft and verticalAlignTop false. + * This means that the location will be corrected by the _relocateNavigation function on a size change of the canvas. + * + * @private + */ + + }, { + key: "loadNavigationElements", + value: function loadNavigationElements() { + var _this2 = this; + + this.cleanNavigation(); + this.navigationDOM = {}; + var navigationDivs = ['up', 'down', 'left', 'right', 'zoomIn', 'zoomOut', 'zoomExtends']; + var navigationDivActions = ['_moveUp', '_moveDown', '_moveLeft', '_moveRight', '_zoomIn', '_zoomOut', '_fit']; + this.navigationDOM['wrapper'] = document.createElement('div'); + this.navigationDOM['wrapper'].className = 'vis-navigation'; + this.canvas.frame.appendChild(this.navigationDOM['wrapper']); + + for (var i = 0; i < navigationDivs.length; i++) { + this.navigationDOM[navigationDivs[i]] = document.createElement('div'); + this.navigationDOM[navigationDivs[i]].className = 'vis-button vis-' + navigationDivs[i]; + this.navigationDOM['wrapper'].appendChild(this.navigationDOM[navigationDivs[i]]); + var hammer$1 = new hammer(this.navigationDOM[navigationDivs[i]]); + + if (navigationDivActions[i] === "_fit") { + hammerUtil.onTouch(hammer$1, this._fit.bind(this)); + } else { + hammerUtil.onTouch(hammer$1, this.bindToRedraw.bind(this, navigationDivActions[i])); + } + + this.navigationHammers.push(hammer$1); + } // use a hammer for the release so we do not require the one used in the rest of the network + // the one the rest uses can be overloaded by the manipulation system. + + + var hammerFrame = new hammer(this.canvas.frame); + hammerUtil.onRelease(hammerFrame, function () { + _this2._stopMovement(); + }); + this.navigationHammers.push(hammerFrame); + this.iconsCreated = true; + } + /** + * + * @param {string} action + */ + + }, { + key: "bindToRedraw", + value: function bindToRedraw(action) { + if (this.boundFunctions[action] === undefined) { + this.boundFunctions[action] = this[action].bind(this); + this.body.emitter.on("initRedraw", this.boundFunctions[action]); + this.body.emitter.emit("_startRendering"); + } + } + /** + * + * @param {string} action + */ + + }, { + key: "unbindFromRedraw", + value: function unbindFromRedraw(action) { + if (this.boundFunctions[action] !== undefined) { + this.body.emitter.off("initRedraw", this.boundFunctions[action]); + this.body.emitter.emit("_stopRendering"); + delete this.boundFunctions[action]; + } + } + /** + * this stops all movement induced by the navigation buttons + * + * @private + */ + + }, { + key: "_fit", + value: function _fit() { + if (new Date().valueOf() - this.touchTime > 700) { + // TODO: fix ugly hack to avoid hammer's double fireing of event (because we use release?) + this.body.emitter.emit("fit", { + duration: 700 + }); + this.touchTime = new Date().valueOf(); + } + } + /** + * this stops all movement induced by the navigation buttons + * + * @private + */ + + }, { + key: "_stopMovement", + value: function _stopMovement() { + for (var boundAction in this.boundFunctions) { + if (this.boundFunctions.hasOwnProperty(boundAction)) { + this.body.emitter.off("initRedraw", this.boundFunctions[boundAction]); + this.body.emitter.emit("_stopRendering"); + } + } + + this.boundFunctions = {}; + } + /** + * + * @private + */ + + }, { + key: "_moveUp", + value: function _moveUp() { + this.body.view.translation.y += this.options.keyboard.speed.y; + } + /** + * + * @private + */ + + }, { + key: "_moveDown", + value: function _moveDown() { + this.body.view.translation.y -= this.options.keyboard.speed.y; + } + /** + * + * @private + */ + + }, { + key: "_moveLeft", + value: function _moveLeft() { + this.body.view.translation.x += this.options.keyboard.speed.x; + } + /** + * + * @private + */ + + }, { + key: "_moveRight", + value: function _moveRight() { + this.body.view.translation.x -= this.options.keyboard.speed.x; + } + /** + * + * @private + */ + + }, { + key: "_zoomIn", + value: function _zoomIn() { + var scaleOld = this.body.view.scale; + var scale = this.body.view.scale * (1 + this.options.keyboard.speed.zoom); + var translation = this.body.view.translation; + var scaleFrac = scale / scaleOld; + var tx = (1 - scaleFrac) * this.canvas.canvasViewCenter.x + translation.x * scaleFrac; + var ty = (1 - scaleFrac) * this.canvas.canvasViewCenter.y + translation.y * scaleFrac; + this.body.view.scale = scale; + this.body.view.translation = { + x: tx, + y: ty + }; + this.body.emitter.emit('zoom', { + direction: '+', + scale: this.body.view.scale, + pointer: null + }); + } + /** + * + * @private + */ + + }, { + key: "_zoomOut", + value: function _zoomOut() { + var scaleOld = this.body.view.scale; + var scale = this.body.view.scale / (1 + this.options.keyboard.speed.zoom); + var translation = this.body.view.translation; + var scaleFrac = scale / scaleOld; + var tx = (1 - scaleFrac) * this.canvas.canvasViewCenter.x + translation.x * scaleFrac; + var ty = (1 - scaleFrac) * this.canvas.canvasViewCenter.y + translation.y * scaleFrac; + this.body.view.scale = scale; + this.body.view.translation = { + x: tx, + y: ty + }; + this.body.emitter.emit('zoom', { + direction: '-', + scale: this.body.view.scale, + pointer: null + }); + } + /** + * bind all keys using keycharm. + */ + + }, { + key: "configureKeyboardBindings", + value: function configureKeyboardBindings() { + var _this3 = this; + + if (this.keycharm !== undefined) { + this.keycharm.destroy(); + } + + if (this.options.keyboard.enabled === true) { + if (this.options.keyboard.bindToWindow === true) { + this.keycharm = keycharm({ + container: window, + preventDefault: true + }); + } else { + this.keycharm = keycharm({ + container: this.canvas.frame, + preventDefault: true + }); + } + + this.keycharm.reset(); + + if (this.activated === true) { + this.keycharm.bind("up", function () { + _this3.bindToRedraw("_moveUp"); + }, "keydown"); + this.keycharm.bind("down", function () { + _this3.bindToRedraw("_moveDown"); + }, "keydown"); + this.keycharm.bind("left", function () { + _this3.bindToRedraw("_moveLeft"); + }, "keydown"); + this.keycharm.bind("right", function () { + _this3.bindToRedraw("_moveRight"); + }, "keydown"); + this.keycharm.bind("=", function () { + _this3.bindToRedraw("_zoomIn"); + }, "keydown"); + this.keycharm.bind("num+", function () { + _this3.bindToRedraw("_zoomIn"); + }, "keydown"); + this.keycharm.bind("num-", function () { + _this3.bindToRedraw("_zoomOut"); + }, "keydown"); + this.keycharm.bind("-", function () { + _this3.bindToRedraw("_zoomOut"); + }, "keydown"); + this.keycharm.bind("[", function () { + _this3.bindToRedraw("_zoomOut"); + }, "keydown"); + this.keycharm.bind("]", function () { + _this3.bindToRedraw("_zoomIn"); + }, "keydown"); + this.keycharm.bind("pageup", function () { + _this3.bindToRedraw("_zoomIn"); + }, "keydown"); + this.keycharm.bind("pagedown", function () { + _this3.bindToRedraw("_zoomOut"); + }, "keydown"); + this.keycharm.bind("up", function () { + _this3.unbindFromRedraw("_moveUp"); + }, "keyup"); + this.keycharm.bind("down", function () { + _this3.unbindFromRedraw("_moveDown"); + }, "keyup"); + this.keycharm.bind("left", function () { + _this3.unbindFromRedraw("_moveLeft"); + }, "keyup"); + this.keycharm.bind("right", function () { + _this3.unbindFromRedraw("_moveRight"); + }, "keyup"); + this.keycharm.bind("=", function () { + _this3.unbindFromRedraw("_zoomIn"); + }, "keyup"); + this.keycharm.bind("num+", function () { + _this3.unbindFromRedraw("_zoomIn"); + }, "keyup"); + this.keycharm.bind("num-", function () { + _this3.unbindFromRedraw("_zoomOut"); + }, "keyup"); + this.keycharm.bind("-", function () { + _this3.unbindFromRedraw("_zoomOut"); + }, "keyup"); + this.keycharm.bind("[", function () { + _this3.unbindFromRedraw("_zoomOut"); + }, "keyup"); + this.keycharm.bind("]", function () { + _this3.unbindFromRedraw("_zoomIn"); + }, "keyup"); + this.keycharm.bind("pageup", function () { + _this3.unbindFromRedraw("_zoomIn"); + }, "keyup"); + this.keycharm.bind("pagedown", function () { + _this3.unbindFromRedraw("_zoomOut"); + }, "keyup"); + } + } + } + }]); + + return NavigationHandler; +}(); + +/** + * Popup is a class to create a popup window with some text + */ + +var Popup = +/*#__PURE__*/ +function () { + /** + * @param {Element} container The container object. + * @param {string} overflowMethod How the popup should act to overflowing ('flip' or 'cap') + */ + function Popup(container, overflowMethod) { + classCallCheck$1(this, Popup); + + this.container = container; + this.overflowMethod = overflowMethod || 'cap'; + this.x = 0; + this.y = 0; + this.padding = 5; + this.hidden = false; // create the frame + + this.frame = document.createElement('div'); + this.frame.className = 'vis-tooltip'; + this.container.appendChild(this.frame); + } + /** + * @param {number} x Horizontal position of the popup window + * @param {number} y Vertical position of the popup window + */ + + + createClass$1(Popup, [{ + key: "setPosition", + value: function setPosition(x, y) { + this.x = parseInt(x); + this.y = parseInt(y); + } + /** + * Set the content for the popup window. This can be HTML code or text. + * @param {string | Element} content + */ + + }, { + key: "setText", + value: function setText(content) { + if (content instanceof Element) { + this.frame.innerHTML = ''; + this.frame.appendChild(content); + } else { + this.frame.innerHTML = content; // string containing text or HTML + } + } + /** + * Show the popup window + * @param {boolean} [doShow] Show or hide the window + */ + + }, { + key: "show", + value: function show(doShow) { + if (doShow === undefined) { + doShow = true; + } + + if (doShow === true) { + var height = this.frame.clientHeight; + var width = this.frame.clientWidth; + var maxHeight = this.frame.parentNode.clientHeight; + var maxWidth = this.frame.parentNode.clientWidth; + var left = 0, + top = 0; + + if (this.overflowMethod == 'flip') { + var isLeft = false, + isTop = true; // Where around the position it's located + + if (this.y - height < this.padding) { + isTop = false; + } + + if (this.x + width > maxWidth - this.padding) { + isLeft = true; + } + + if (isLeft) { + left = this.x - width; + } else { + left = this.x; + } + + if (isTop) { + top = this.y - height; + } else { + top = this.y; + } + } else { + top = this.y - height; + + if (top + height + this.padding > maxHeight) { + top = maxHeight - height - this.padding; + } + + if (top < this.padding) { + top = this.padding; + } + + left = this.x; + + if (left + width + this.padding > maxWidth) { + left = maxWidth - width - this.padding; + } + + if (left < this.padding) { + left = this.padding; + } + } + + this.frame.style.left = left + "px"; + this.frame.style.top = top + "px"; + this.frame.style.visibility = "visible"; + this.hidden = false; + } else { + this.hide(); + } + } + /** + * Hide the popup window + */ + + }, { + key: "hide", + value: function hide() { + this.hidden = true; + this.frame.style.left = "0"; + this.frame.style.top = "0"; + this.frame.style.visibility = "hidden"; + } + /** + * Remove the popup window + */ + + }, { + key: "destroy", + value: function destroy() { + this.frame.parentNode.removeChild(this.frame); // Remove element from DOM + } + }]); + + return Popup; +}(); + +/** + * Handler for interactions + */ + +var InteractionHandler = +/*#__PURE__*/ +function () { + /** + * @param {Object} body + * @param {Canvas} canvas + * @param {SelectionHandler} selectionHandler + */ + function InteractionHandler(body, canvas, selectionHandler) { + classCallCheck$1(this, InteractionHandler); + + this.body = body; + this.canvas = canvas; + this.selectionHandler = selectionHandler; + this.navigationHandler = new NavigationHandler(body, canvas); // bind the events from hammer to functions in this object + + this.body.eventListeners.onTap = this.onTap.bind(this); + this.body.eventListeners.onTouch = this.onTouch.bind(this); + this.body.eventListeners.onDoubleTap = this.onDoubleTap.bind(this); + this.body.eventListeners.onHold = this.onHold.bind(this); + this.body.eventListeners.onDragStart = this.onDragStart.bind(this); + this.body.eventListeners.onDrag = this.onDrag.bind(this); + this.body.eventListeners.onDragEnd = this.onDragEnd.bind(this); + this.body.eventListeners.onMouseWheel = this.onMouseWheel.bind(this); + this.body.eventListeners.onPinch = this.onPinch.bind(this); + this.body.eventListeners.onMouseMove = this.onMouseMove.bind(this); + this.body.eventListeners.onRelease = this.onRelease.bind(this); + this.body.eventListeners.onContext = this.onContext.bind(this); + this.touchTime = 0; + this.drag = {}; + this.pinch = {}; + this.popup = undefined; + this.popupObj = undefined; + this.popupTimer = undefined; + this.body.functions.getPointer = this.getPointer.bind(this); + this.options = {}; + this.defaultOptions = { + dragNodes: true, + dragView: true, + hover: false, + keyboard: { + enabled: false, + speed: { + x: 10, + y: 10, + zoom: 0.02 + }, + bindToWindow: true + }, + navigationButtons: false, + tooltipDelay: 300, + zoomView: true, + zoomSpeed: 1 + }; + util.extend(this.options, this.defaultOptions); + this.bindEventListeners(); + } + /** + * Binds event listeners + */ + + + createClass$1(InteractionHandler, [{ + key: "bindEventListeners", + value: function bindEventListeners() { + var _this = this; + + this.body.emitter.on('destroy', function () { + clearTimeout(_this.popupTimer); + delete _this.body.functions.getPointer; + }); + } + /** + * + * @param {Object} options + */ + + }, { + key: "setOptions", + value: function setOptions(options) { + if (options !== undefined) { + // extend all but the values in fields + var fields = ['hideEdgesOnDrag', 'hideEdgesOnZoom', 'hideNodesOnDrag', 'keyboard', 'multiselect', 'selectable', 'selectConnectedEdges']; + util.selectiveNotDeepExtend(fields, this.options, options); // merge the keyboard options in. + + util.mergeOptions(this.options, options, 'keyboard'); + + if (options.tooltip) { + util.extend(this.options.tooltip, options.tooltip); + + if (options.tooltip.color) { + this.options.tooltip.color = util.parseColor(options.tooltip.color); + } + } + } + + this.navigationHandler.setOptions(this.options); + } + /** + * Get the pointer location from a touch location + * @param {{x: number, y: number}} touch + * @return {{x: number, y: number}} pointer + * @private + */ + + }, { + key: "getPointer", + value: function getPointer(touch) { + return { + x: touch.x - util.getAbsoluteLeft(this.canvas.frame.canvas), + y: touch.y - util.getAbsoluteTop(this.canvas.frame.canvas) + }; + } + /** + * On start of a touch gesture, store the pointer + * @param {Event} event The event + * @private + */ + + }, { + key: "onTouch", + value: function onTouch(event) { + if (new Date().valueOf() - this.touchTime > 50) { + this.drag.pointer = this.getPointer(event.center); + this.drag.pinched = false; + this.pinch.scale = this.body.view.scale; // to avoid double fireing of this event because we have two hammer instances. (on canvas and on frame) + + this.touchTime = new Date().valueOf(); + } + } + /** + * handle tap/click event: select/unselect a node + * @param {Event} event + * @private + */ + + }, { + key: "onTap", + value: function onTap(event) { + var pointer = this.getPointer(event.center); + var multiselect = this.selectionHandler.options.multiselect && (event.changedPointers[0].ctrlKey || event.changedPointers[0].metaKey); + this.checkSelectionChanges(pointer, event, multiselect); + + this.selectionHandler._generateClickEvent('click', event, pointer); + } + /** + * handle doubletap event + * @param {Event} event + * @private + */ + + }, { + key: "onDoubleTap", + value: function onDoubleTap(event) { + var pointer = this.getPointer(event.center); + + this.selectionHandler._generateClickEvent('doubleClick', event, pointer); + } + /** + * handle long tap event: multi select nodes + * @param {Event} event + * @private + */ + + }, { + key: "onHold", + value: function onHold(event) { + var pointer = this.getPointer(event.center); + var multiselect = this.selectionHandler.options.multiselect; + this.checkSelectionChanges(pointer, event, multiselect); + + this.selectionHandler._generateClickEvent('click', event, pointer); + + this.selectionHandler._generateClickEvent('hold', event, pointer); + } + /** + * handle the release of the screen + * + * @param {Event} event + * @private + */ + + }, { + key: "onRelease", + value: function onRelease(event) { + if (new Date().valueOf() - this.touchTime > 10) { + var pointer = this.getPointer(event.center); + + this.selectionHandler._generateClickEvent('release', event, pointer); // to avoid double fireing of this event because we have two hammer instances. (on canvas and on frame) + + + this.touchTime = new Date().valueOf(); + } + } + /** + * + * @param {Event} event + */ + + }, { + key: "onContext", + value: function onContext(event) { + var pointer = this.getPointer({ + x: event.clientX, + y: event.clientY + }); + + this.selectionHandler._generateClickEvent('oncontext', event, pointer); + } + /** + * Select and deselect nodes depending current selection change. + * + * For changing nodes, select/deselect events are fired. + * + * NOTE: For a given edge, if one connecting node is deselected and with the same + * click the other node is selected, no events for the edge will fire. + * It was selected and it will remain selected. + * + * TODO: This is all SelectionHandler calls; the method should be moved to there. + * + * @param {{x: number, y: number}} pointer + * @param {Event} event + * @param {boolean} [add=false] + */ + + }, { + key: "checkSelectionChanges", + value: function checkSelectionChanges(pointer, event) { + var add = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; + var previousSelection = this.selectionHandler.getSelection(); + var selected = false; + + if (add === true) { + selected = this.selectionHandler.selectAdditionalOnPoint(pointer); + } else { + selected = this.selectionHandler.selectOnPoint(pointer); + } + + var currentSelection = this.selectionHandler.getSelection(); // See NOTE in method comment for the reason to do it like this + + var deselectedItems = this._determineDifference(previousSelection, currentSelection); + + var selectedItems = this._determineDifference(currentSelection, previousSelection); + + if (deselectedItems.edges.length > 0) { + this.selectionHandler._generateClickEvent('deselectEdge', event, pointer, previousSelection); + + selected = true; + } + + if (deselectedItems.nodes.length > 0) { + this.selectionHandler._generateClickEvent('deselectNode', event, pointer, previousSelection); + + selected = true; + } + + if (selectedItems.nodes.length > 0) { + this.selectionHandler._generateClickEvent('selectNode', event, pointer); + + selected = true; + } + + if (selectedItems.edges.length > 0) { + this.selectionHandler._generateClickEvent('selectEdge', event, pointer); + + selected = true; + } // fire the select event if anything has been selected or deselected + + + if (selected === true) { + // select or unselect + this.selectionHandler._generateClickEvent('select', event, pointer); + } + } + /** + * Remove all node and edge id's from the first set that are present in the second one. + * + * @param {{nodes: Array., edges: Array.}} firstSet + * @param {{nodes: Array., edges: Array.}} secondSet + * @returns {{nodes: Array., edges: Array.}} + * @private + */ + + }, { + key: "_determineDifference", + value: function _determineDifference(firstSet, secondSet) { + var arrayDiff = function arrayDiff(firstArr, secondArr) { + var result = []; + + for (var i = 0; i < firstArr.length; i++) { + var value = firstArr[i]; + + if (secondArr.indexOf(value) === -1) { + result.push(value); + } + } + + return result; + }; + + return { + nodes: arrayDiff(firstSet.nodes, secondSet.nodes), + edges: arrayDiff(firstSet.edges, secondSet.edges) + }; + } + /** + * This function is called by onDragStart. + * It is separated out because we can then overload it for the datamanipulation system. + * + * @param {Event} event + * @private + */ + + }, { + key: "onDragStart", + value: function onDragStart(event) { + //in case the touch event was triggered on an external div, do the initial touch now. + if (this.drag.pointer === undefined) { + this.onTouch(event); + } // note: drag.pointer is set in onTouch to get the initial touch location + + + var node = this.selectionHandler.getNodeAt(this.drag.pointer); + this.drag.dragging = true; + this.drag.selection = []; + this.drag.translation = util.extend({}, this.body.view.translation); // copy the object + + this.drag.nodeId = undefined; + + if (node !== undefined && this.options.dragNodes === true) { + this.drag.nodeId = node.id; // select the clicked node if not yet selected + + if (node.isSelected() === false) { + this.selectionHandler.unselectAll(); + this.selectionHandler.selectObject(node); + } // after select to contain the node + + + this.selectionHandler._generateClickEvent('dragStart', event, this.drag.pointer); + + var selection = this.selectionHandler.selectionObj.nodes; // create an array with the selected nodes and their original location and status + + for (var nodeId in selection) { + if (selection.hasOwnProperty(nodeId)) { + var object = selection[nodeId]; + var s = { + id: object.id, + node: object, + // store original x, y, xFixed and yFixed, make the node temporarily Fixed + x: object.x, + y: object.y, + xFixed: object.options.fixed.x, + yFixed: object.options.fixed.y + }; + object.options.fixed.x = true; + object.options.fixed.y = true; + this.drag.selection.push(s); + } + } + } else { + // fallback if no node is selected and thus the view is dragged. + this.selectionHandler._generateClickEvent('dragStart', event, this.drag.pointer, undefined, true); + } + } + /** + * handle drag event + * @param {Event} event + * @private + */ + + }, { + key: "onDrag", + value: function onDrag(event) { + var _this2 = this; + + if (this.drag.pinched === true) { + return; + } // remove the focus on node if it is focussed on by the focusOnNode + + + this.body.emitter.emit('unlockNode'); + var pointer = this.getPointer(event.center); + var selection = this.drag.selection; + + if (selection && selection.length && this.options.dragNodes === true) { + this.selectionHandler._generateClickEvent('dragging', event, pointer); // calculate delta's and new location + + + var deltaX = pointer.x - this.drag.pointer.x; + var deltaY = pointer.y - this.drag.pointer.y; // update position of all selected nodes + + selection.forEach(function (selection) { + var node = selection.node; // only move the node if it was not fixed initially + + if (selection.xFixed === false) { + node.x = _this2.canvas._XconvertDOMtoCanvas(_this2.canvas._XconvertCanvasToDOM(selection.x) + deltaX); + } // only move the node if it was not fixed initially + + + if (selection.yFixed === false) { + node.y = _this2.canvas._YconvertDOMtoCanvas(_this2.canvas._YconvertCanvasToDOM(selection.y) + deltaY); + } + }); // start the simulation of the physics + + this.body.emitter.emit('startSimulation'); + } else { + // move the network + if (this.options.dragView === true) { + this.selectionHandler._generateClickEvent('dragging', event, pointer, undefined, true); // if the drag was not started properly because the click started outside the network div, start it now. + + + if (this.drag.pointer === undefined) { + this.onDragStart(event); + return; + } + + var diffX = pointer.x - this.drag.pointer.x; + var diffY = pointer.y - this.drag.pointer.y; + this.body.view.translation = { + x: this.drag.translation.x + diffX, + y: this.drag.translation.y + diffY + }; + this.body.emitter.emit('_requestRedraw'); + } + } + } + /** + * handle drag start event + * @param {Event} event + * @private + */ + + }, { + key: "onDragEnd", + value: function onDragEnd(event) { + this.drag.dragging = false; + var selection = this.drag.selection; + + if (selection && selection.length) { + selection.forEach(function (s) { + // restore original xFixed and yFixed + s.node.options.fixed.x = s.xFixed; + s.node.options.fixed.y = s.yFixed; + }); + + this.selectionHandler._generateClickEvent('dragEnd', event, this.getPointer(event.center)); + + this.body.emitter.emit('startSimulation'); + } else { + this.selectionHandler._generateClickEvent('dragEnd', event, this.getPointer(event.center), undefined, true); + + this.body.emitter.emit('_requestRedraw'); + } + } + /** + * Handle pinch event + * @param {Event} event The event + * @private + */ + + }, { + key: "onPinch", + value: function onPinch(event) { + var pointer = this.getPointer(event.center); + this.drag.pinched = true; + + if (this.pinch['scale'] === undefined) { + this.pinch.scale = 1; + } // TODO: enabled moving while pinching? + + + var scale = this.pinch.scale * event.scale; + this.zoom(scale, pointer); + } + /** + * Zoom the network in or out + * @param {number} scale a number around 1, and between 0.01 and 10 + * @param {{x: number, y: number}} pointer Position on screen + * @private + */ + + }, { + key: "zoom", + value: function zoom(scale, pointer) { + if (this.options.zoomView === true) { + var scaleOld = this.body.view.scale; + + if (scale < 0.00001) { + scale = 0.00001; + } + + if (scale > 10) { + scale = 10; + } + + var preScaleDragPointer = undefined; + + if (this.drag !== undefined) { + if (this.drag.dragging === true) { + preScaleDragPointer = this.canvas.DOMtoCanvas(this.drag.pointer); + } + } // + this.canvas.frame.canvas.clientHeight / 2 + + + var translation = this.body.view.translation; + var scaleFrac = scale / scaleOld; + var tx = (1 - scaleFrac) * pointer.x + translation.x * scaleFrac; + var ty = (1 - scaleFrac) * pointer.y + translation.y * scaleFrac; + this.body.view.scale = scale; + this.body.view.translation = { + x: tx, + y: ty + }; + + if (preScaleDragPointer != undefined) { + var postScaleDragPointer = this.canvas.canvasToDOM(preScaleDragPointer); + this.drag.pointer.x = postScaleDragPointer.x; + this.drag.pointer.y = postScaleDragPointer.y; + } + + this.body.emitter.emit('_requestRedraw'); + + if (scaleOld < scale) { + this.body.emitter.emit('zoom', { + direction: '+', + scale: this.body.view.scale, + pointer: pointer + }); + } else { + this.body.emitter.emit('zoom', { + direction: '-', + scale: this.body.view.scale, + pointer: pointer + }); + } + } + } + /** + * Event handler for mouse wheel event, used to zoom the timeline + * See http://adomas.org/javascript-mouse-wheel/ + * https://github.com/EightMedia/hammer.js/issues/256 + * @param {MouseEvent} event + * @private + */ + + }, { + key: "onMouseWheel", + value: function onMouseWheel(event) { + if (this.options.zoomView === true) { + // retrieve delta + var delta = 0; + + if (event.wheelDelta) { + /* IE/Opera. */ + delta = event.wheelDelta / 120; + } else if (event.detail) { + /* Mozilla case. */ + // In Mozilla, sign of delta is different than in IE. + // Also, delta is multiple of 3. + delta = -event.detail / 3; + } // If delta is nonzero, handle it. + // Basically, delta is now positive if wheel was scrolled up, + // and negative, if wheel was scrolled down. + + + if (delta !== 0) { + // calculate the new scale + var scale = this.body.view.scale; + var zoom = delta * (this.options.zoomSpeed / 10); + + if (delta < 0) { + zoom = zoom / (1 - zoom); + } + + scale *= 1 + zoom; // calculate the pointer location + + var pointer = this.getPointer({ + x: event.clientX, + y: event.clientY + }); // apply the new scale + + this.zoom(scale, pointer); + } // Prevent default actions caused by mouse wheel. + + + event.preventDefault(); + } + } + /** + * Mouse move handler for checking whether the title moves over a node with a title. + * @param {Event} event + * @private + */ + + }, { + key: "onMouseMove", + value: function onMouseMove(event) { + var _this3 = this; + + var pointer = this.getPointer({ + x: event.clientX, + y: event.clientY + }); + var popupVisible = false; // check if the previously selected node is still selected + + if (this.popup !== undefined) { + if (this.popup.hidden === false) { + this._checkHidePopup(pointer); + } // if the popup was not hidden above + + + if (this.popup.hidden === false) { + popupVisible = true; + this.popup.setPosition(pointer.x + 3, pointer.y - 5); + this.popup.show(); + } + } // if we bind the keyboard to the div, we have to highlight it to use it. This highlights it on mouse over. + + + if (this.options.keyboard.bindToWindow === false && this.options.keyboard.enabled === true) { + this.canvas.frame.focus(); + } // start a timeout that will check if the mouse is positioned above an element + + + if (popupVisible === false) { + if (this.popupTimer !== undefined) { + clearInterval(this.popupTimer); // stop any running calculationTimer + + this.popupTimer = undefined; + } + + if (!this.drag.dragging) { + this.popupTimer = setTimeout(function () { + return _this3._checkShowPopup(pointer); + }, this.options.tooltipDelay); + } + } // adding hover highlights + + + if (this.options.hover === true) { + this.selectionHandler.hoverObject(event, pointer); + } + } + /** + * Check if there is an element on the given position in the network + * (a node or edge). If so, and if this element has a title, + * show a popup window with its title. + * + * @param {{x:number, y:number}} pointer + * @private + */ + + }, { + key: "_checkShowPopup", + value: function _checkShowPopup(pointer) { + var x = this.canvas._XconvertDOMtoCanvas(pointer.x); + + var y = this.canvas._YconvertDOMtoCanvas(pointer.y); + + var pointerObj = { + left: x, + top: y, + right: x, + bottom: y + }; + var previousPopupObjId = this.popupObj === undefined ? undefined : this.popupObj.id; + var nodeUnderCursor = false; + var popupType = 'node'; // check if a node is under the cursor. + + if (this.popupObj === undefined) { + // search the nodes for overlap, select the top one in case of multiple nodes + var nodeIndices = this.body.nodeIndices; + var nodes = this.body.nodes; + var node; + var overlappingNodes = []; + + for (var i = 0; i < nodeIndices.length; i++) { + node = nodes[nodeIndices[i]]; + + if (node.isOverlappingWith(pointerObj) === true) { + nodeUnderCursor = true; + + if (node.getTitle() !== undefined) { + overlappingNodes.push(nodeIndices[i]); + } + } + } + + if (overlappingNodes.length > 0) { + // if there are overlapping nodes, select the last one, this is the one which is drawn on top of the others + this.popupObj = nodes[overlappingNodes[overlappingNodes.length - 1]]; // if you hover over a node, the title of the edge is not supposed to be shown. + + nodeUnderCursor = true; + } + } + + if (this.popupObj === undefined && nodeUnderCursor === false) { + // search the edges for overlap + var edgeIndices = this.body.edgeIndices; + var edges = this.body.edges; + var edge; + var overlappingEdges = []; + + for (var _i = 0; _i < edgeIndices.length; _i++) { + edge = edges[edgeIndices[_i]]; + + if (edge.isOverlappingWith(pointerObj) === true) { + if (edge.connected === true && edge.getTitle() !== undefined) { + overlappingEdges.push(edgeIndices[_i]); + } + } + } + + if (overlappingEdges.length > 0) { + this.popupObj = edges[overlappingEdges[overlappingEdges.length - 1]]; + popupType = 'edge'; + } + } + + if (this.popupObj !== undefined) { + // show popup message window + if (this.popupObj.id !== previousPopupObjId) { + if (this.popup === undefined) { + this.popup = new Popup(this.canvas.frame); + } + + this.popup.popupTargetType = popupType; + this.popup.popupTargetId = this.popupObj.id; // adjust a small offset such that the mouse cursor is located in the + // bottom left location of the popup, and you can easily move over the + // popup area + + this.popup.setPosition(pointer.x + 3, pointer.y - 5); + this.popup.setText(this.popupObj.getTitle()); + this.popup.show(); + this.body.emitter.emit('showPopup', this.popupObj.id); + } + } else { + if (this.popup !== undefined) { + this.popup.hide(); + this.body.emitter.emit('hidePopup'); + } + } + } + /** + * Check if the popup must be hidden, which is the case when the mouse is no + * longer hovering on the object + * @param {{x:number, y:number}} pointer + * @private + */ + + }, { + key: "_checkHidePopup", + value: function _checkHidePopup(pointer) { + var pointerObj = this.selectionHandler._pointerToPositionObject(pointer); + + var stillOnObj = false; + + if (this.popup.popupTargetType === 'node') { + if (this.body.nodes[this.popup.popupTargetId] !== undefined) { + stillOnObj = this.body.nodes[this.popup.popupTargetId].isOverlappingWith(pointerObj); // if the mouse is still one the node, we have to check if it is not also on one that is drawn on top of it. + // we initially only check stillOnObj because this is much faster. + + if (stillOnObj === true) { + var overNode = this.selectionHandler.getNodeAt(pointer); + stillOnObj = overNode === undefined ? false : overNode.id === this.popup.popupTargetId; + } + } + } else { + if (this.selectionHandler.getNodeAt(pointer) === undefined) { + if (this.body.edges[this.popup.popupTargetId] !== undefined) { + stillOnObj = this.body.edges[this.popup.popupTargetId].isOverlappingWith(pointerObj); + } + } + } + + if (stillOnObj === false) { + this.popupObj = undefined; + this.popup.hide(); + this.body.emitter.emit('hidePopup'); + } + } + }]); + + return InteractionHandler; +}(); + +/** + * The handler for selections + */ + +var SelectionHandler = +/*#__PURE__*/ +function () { + /** + * @param {Object} body + * @param {Canvas} canvas + */ + function SelectionHandler(body, canvas) { + var _this = this; + + classCallCheck$1(this, SelectionHandler); + + this.body = body; + this.canvas = canvas; + this.selectionObj = { + nodes: [], + edges: [] + }; + this.hoverObj = { + nodes: {}, + edges: {} + }; + this.options = {}; + this.defaultOptions = { + multiselect: false, + selectable: true, + selectConnectedEdges: true, + hoverConnectedEdges: true + }; + util.extend(this.options, this.defaultOptions); + this.body.emitter.on("_dataChanged", function () { + _this.updateSelection(); + }); + } + /** + * + * @param {Object} [options] + */ + + + createClass$1(SelectionHandler, [{ + key: "setOptions", + value: function setOptions(options) { + if (options !== undefined) { + var fields = ['multiselect', 'hoverConnectedEdges', 'selectable', 'selectConnectedEdges']; + util.selectiveDeepExtend(fields, this.options, options); + } + } + /** + * handles the selection part of the tap; + * + * @param {{x: number, y: number}} pointer + * @returns {boolean} + */ + + }, { + key: "selectOnPoint", + value: function selectOnPoint(pointer) { + var selected = false; + + if (this.options.selectable === true) { + var obj = this.getNodeAt(pointer) || this.getEdgeAt(pointer); // unselect after getting the objects in order to restore width and height. + + this.unselectAll(); + + if (obj !== undefined) { + selected = this.selectObject(obj); + } + + this.body.emitter.emit("_requestRedraw"); + } + + return selected; + } + /** + * + * @param {{x: number, y: number}} pointer + * @returns {boolean} + */ + + }, { + key: "selectAdditionalOnPoint", + value: function selectAdditionalOnPoint(pointer) { + var selectionChanged = false; + + if (this.options.selectable === true) { + var obj = this.getNodeAt(pointer) || this.getEdgeAt(pointer); + + if (obj !== undefined) { + selectionChanged = true; + + if (obj.isSelected() === true) { + this.deselectObject(obj); + } else { + this.selectObject(obj); + } + + this.body.emitter.emit("_requestRedraw"); + } + } + + return selectionChanged; + } + /** + * Create an object containing the standard fields for an event. + * + * @param {Event} event + * @param {{x: number, y: number}} pointer Object with the x and y screen coordinates of the mouse + * @returns {{}} + * @private + */ + + }, { + key: "_initBaseEvent", + value: function _initBaseEvent(event, pointer) { + var properties = {}; + properties['pointer'] = { + DOM: { + x: pointer.x, + y: pointer.y + }, + canvas: this.canvas.DOMtoCanvas(pointer) + }; + properties['event'] = event; + return properties; + } + /** + * Generate an event which the user can catch. + * + * This adds some extra data to the event with respect to cursor position and + * selected nodes and edges. + * + * @param {string} eventType Name of event to send + * @param {Event} event + * @param {{x: number, y: number}} pointer Object with the x and y screen coordinates of the mouse + * @param {Object|undefined} oldSelection If present, selection state before event occured + * @param {boolean|undefined} [emptySelection=false] Indicate if selection data should be passed + */ + + }, { + key: "_generateClickEvent", + value: function _generateClickEvent(eventType, event, pointer, oldSelection) { + var emptySelection = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false; + + var properties = this._initBaseEvent(event, pointer); + + if (emptySelection === true) { + properties.nodes = []; + properties.edges = []; + } else { + var tmp = this.getSelection(); + properties.nodes = tmp.nodes; + properties.edges = tmp.edges; + } + + if (oldSelection !== undefined) { + properties['previousSelection'] = oldSelection; + } + + if (eventType == 'click') { + // For the time being, restrict this functionality to + // just the click event. + properties.items = this.getClickedItems(pointer); + } + + if (event.controlEdge !== undefined) { + properties.controlEdge = event.controlEdge; + } + + this.body.emitter.emit(eventType, properties); + } + /** + * + * @param {Object} obj + * @param {boolean} [highlightEdges=this.options.selectConnectedEdges] + * @returns {boolean} + */ + + }, { + key: "selectObject", + value: function selectObject(obj) { + var highlightEdges = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.options.selectConnectedEdges; + + if (obj !== undefined) { + if (obj instanceof Node) { + if (highlightEdges === true) { + this._selectConnectedEdges(obj); + } + } + + obj.select(); + + this._addToSelection(obj); + + return true; + } + + return false; + } + /** + * + * @param {Object} obj + */ + + }, { + key: "deselectObject", + value: function deselectObject(obj) { + if (obj.isSelected() === true) { + obj.selected = false; + + this._removeFromSelection(obj); + } + } + /** + * retrieve all nodes overlapping with given object + * @param {Object} object An object with parameters left, top, right, bottom + * @return {number[]} An array with id's of the overlapping nodes + * @private + */ + + }, { + key: "_getAllNodesOverlappingWith", + value: function _getAllNodesOverlappingWith(object) { + var overlappingNodes = []; + var nodes = this.body.nodes; + + for (var i = 0; i < this.body.nodeIndices.length; i++) { + var nodeId = this.body.nodeIndices[i]; + + if (nodes[nodeId].isOverlappingWith(object)) { + overlappingNodes.push(nodeId); + } + } + + return overlappingNodes; + } + /** + * Return a position object in canvasspace from a single point in screenspace + * + * @param {{x: number, y: number}} pointer + * @returns {{left: number, top: number, right: number, bottom: number}} + * @private + */ + + }, { + key: "_pointerToPositionObject", + value: function _pointerToPositionObject(pointer) { + var canvasPos = this.canvas.DOMtoCanvas(pointer); + return { + left: canvasPos.x - 1, + top: canvasPos.y + 1, + right: canvasPos.x + 1, + bottom: canvasPos.y - 1 + }; + } + /** + * Get the top node at the passed point (like a click) + * + * @param {{x: number, y: number}} pointer + * @param {boolean} [returnNode=true] + * @return {Node | undefined} node + */ + + }, { + key: "getNodeAt", + value: function getNodeAt(pointer) { + var returnNode = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; + + // we first check if this is an navigation controls element + var positionObject = this._pointerToPositionObject(pointer); + + var overlappingNodes = this._getAllNodesOverlappingWith(positionObject); // if there are overlapping nodes, select the last one, this is the + // one which is drawn on top of the others + + + if (overlappingNodes.length > 0) { + if (returnNode === true) { + return this.body.nodes[overlappingNodes[overlappingNodes.length - 1]]; + } else { + return overlappingNodes[overlappingNodes.length - 1]; + } + } else { + return undefined; + } + } + /** + * retrieve all edges overlapping with given object, selector is around center + * @param {Object} object An object with parameters left, top, right, bottom + * @param {number[]} overlappingEdges An array with id's of the overlapping nodes + * @private + */ + + }, { + key: "_getEdgesOverlappingWith", + value: function _getEdgesOverlappingWith(object, overlappingEdges) { + var edges = this.body.edges; + + for (var i = 0; i < this.body.edgeIndices.length; i++) { + var edgeId = this.body.edgeIndices[i]; + + if (edges[edgeId].isOverlappingWith(object)) { + overlappingEdges.push(edgeId); + } + } + } + /** + * retrieve all nodes overlapping with given object + * @param {Object} object An object with parameters left, top, right, bottom + * @return {number[]} An array with id's of the overlapping nodes + * @private + */ + + }, { + key: "_getAllEdgesOverlappingWith", + value: function _getAllEdgesOverlappingWith(object) { + var overlappingEdges = []; + + this._getEdgesOverlappingWith(object, overlappingEdges); + + return overlappingEdges; + } + /** + * Get the edges nearest to the passed point (like a click) + * + * @param {{x: number, y: number}} pointer + * @param {boolean} [returnEdge=true] + * @return {Edge | undefined} node + */ + + }, { + key: "getEdgeAt", + value: function getEdgeAt(pointer) { + var returnEdge = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; + // Iterate over edges, pick closest within 10 + var canvasPos = this.canvas.DOMtoCanvas(pointer); + var mindist = 10; + var overlappingEdge = null; + var edges = this.body.edges; + + for (var i = 0; i < this.body.edgeIndices.length; i++) { + var edgeId = this.body.edgeIndices[i]; + var edge = edges[edgeId]; + + if (edge.connected) { + var xFrom = edge.from.x; + var yFrom = edge.from.y; + var xTo = edge.to.x; + var yTo = edge.to.y; + var dist = edge.edgeType.getDistanceToEdge(xFrom, yFrom, xTo, yTo, canvasPos.x, canvasPos.y); + + if (dist < mindist) { + overlappingEdge = edgeId; + mindist = dist; + } + } + } + + if (overlappingEdge !== null) { + if (returnEdge === true) { + return this.body.edges[overlappingEdge]; + } else { + return overlappingEdge; + } + } else { + return undefined; + } + } + /** + * Add object to the selection array. + * + * @param {Object} obj + * @private + */ + + }, { + key: "_addToSelection", + value: function _addToSelection(obj) { + if (obj instanceof Node) { + this.selectionObj.nodes[obj.id] = obj; + } else { + this.selectionObj.edges[obj.id] = obj; + } + } + /** + * Add object to the selection array. + * + * @param {Object} obj + * @private + */ + + }, { + key: "_addToHover", + value: function _addToHover(obj) { + if (obj instanceof Node) { + this.hoverObj.nodes[obj.id] = obj; + } else { + this.hoverObj.edges[obj.id] = obj; + } + } + /** + * Remove a single option from selection. + * + * @param {Object} obj + * @private + */ + + }, { + key: "_removeFromSelection", + value: function _removeFromSelection(obj) { + if (obj instanceof Node) { + delete this.selectionObj.nodes[obj.id]; + + this._unselectConnectedEdges(obj); + } else { + delete this.selectionObj.edges[obj.id]; + } + } + /** + * Unselect all. The selectionObj is useful for this. + */ + + }, { + key: "unselectAll", + value: function unselectAll() { + for (var nodeId in this.selectionObj.nodes) { + if (this.selectionObj.nodes.hasOwnProperty(nodeId)) { + this.selectionObj.nodes[nodeId].unselect(); + } + } + + for (var edgeId in this.selectionObj.edges) { + if (this.selectionObj.edges.hasOwnProperty(edgeId)) { + this.selectionObj.edges[edgeId].unselect(); + } + } + + this.selectionObj = { + nodes: {}, + edges: {} + }; + } + /** + * return the number of selected nodes + * + * @returns {number} + * @private + */ + + }, { + key: "_getSelectedNodeCount", + value: function _getSelectedNodeCount() { + var count = 0; + + for (var nodeId in this.selectionObj.nodes) { + if (this.selectionObj.nodes.hasOwnProperty(nodeId)) { + count += 1; + } + } + + return count; + } + /** + * return the selected node + * + * @returns {number} + * @private + */ + + }, { + key: "_getSelectedNode", + value: function _getSelectedNode() { + for (var nodeId in this.selectionObj.nodes) { + if (this.selectionObj.nodes.hasOwnProperty(nodeId)) { + return this.selectionObj.nodes[nodeId]; + } + } + + return undefined; + } + /** + * return the selected edge + * + * @returns {number} + * @private + */ + + }, { + key: "_getSelectedEdge", + value: function _getSelectedEdge() { + for (var edgeId in this.selectionObj.edges) { + if (this.selectionObj.edges.hasOwnProperty(edgeId)) { + return this.selectionObj.edges[edgeId]; + } + } + + return undefined; + } + /** + * return the number of selected edges + * + * @returns {number} + * @private + */ + + }, { + key: "_getSelectedEdgeCount", + value: function _getSelectedEdgeCount() { + var count = 0; + + for (var edgeId in this.selectionObj.edges) { + if (this.selectionObj.edges.hasOwnProperty(edgeId)) { + count += 1; + } + } + + return count; + } + /** + * return the number of selected objects. + * + * @returns {number} + * @private + */ + + }, { + key: "_getSelectedObjectCount", + value: function _getSelectedObjectCount() { + var count = 0; + + for (var nodeId in this.selectionObj.nodes) { + if (this.selectionObj.nodes.hasOwnProperty(nodeId)) { + count += 1; + } + } + + for (var edgeId in this.selectionObj.edges) { + if (this.selectionObj.edges.hasOwnProperty(edgeId)) { + count += 1; + } + } + + return count; + } + /** + * Check if anything is selected + * + * @returns {boolean} + * @private + */ + + }, { + key: "_selectionIsEmpty", + value: function _selectionIsEmpty() { + for (var nodeId in this.selectionObj.nodes) { + if (this.selectionObj.nodes.hasOwnProperty(nodeId)) { + return false; + } + } + + for (var edgeId in this.selectionObj.edges) { + if (this.selectionObj.edges.hasOwnProperty(edgeId)) { + return false; + } + } + + return true; + } + /** + * check if one of the selected nodes is a cluster. + * + * @returns {boolean} + * @private + */ + + }, { + key: "_clusterInSelection", + value: function _clusterInSelection() { + for (var nodeId in this.selectionObj.nodes) { + if (this.selectionObj.nodes.hasOwnProperty(nodeId)) { + if (this.selectionObj.nodes[nodeId].clusterSize > 1) { + return true; + } + } + } + + return false; + } + /** + * select the edges connected to the node that is being selected + * + * @param {Node} node + * @private + */ + + }, { + key: "_selectConnectedEdges", + value: function _selectConnectedEdges(node) { + for (var i = 0; i < node.edges.length; i++) { + var edge = node.edges[i]; + edge.select(); + + this._addToSelection(edge); + } + } + /** + * select the edges connected to the node that is being selected + * + * @param {Node} node + * @private + */ + + }, { + key: "_hoverConnectedEdges", + value: function _hoverConnectedEdges(node) { + for (var i = 0; i < node.edges.length; i++) { + var edge = node.edges[i]; + edge.hover = true; + + this._addToHover(edge); + } + } + /** + * unselect the edges connected to the node that is being selected + * + * @param {Node} node + * @private + */ + + }, { + key: "_unselectConnectedEdges", + value: function _unselectConnectedEdges(node) { + for (var i = 0; i < node.edges.length; i++) { + var edge = node.edges[i]; + edge.unselect(); + + this._removeFromSelection(edge); + } + } + /** + * Remove the highlight from a node or edge, in response to mouse movement + * + * @param {Event} event + * @param {{x: number, y: number}} pointer object with the x and y screen coordinates of the mouse + * @param {Node|vis.Edge} object + * @private + */ + + }, { + key: "emitBlurEvent", + value: function emitBlurEvent(event, pointer, object) { + var properties = this._initBaseEvent(event, pointer); + + if (object.hover === true) { + object.hover = false; + + if (object instanceof Node) { + properties.node = object.id; + this.body.emitter.emit("blurNode", properties); + } else { + properties.edge = object.id; + this.body.emitter.emit("blurEdge", properties); + } + } + } + /** + * Create the highlight for a node or edge, in response to mouse movement + * + * @param {Event} event + * @param {{x: number, y: number}} pointer object with the x and y screen coordinates of the mouse + * @param {Node|vis.Edge} object + * @returns {boolean} hoverChanged + * @private + */ + + }, { + key: "emitHoverEvent", + value: function emitHoverEvent(event, pointer, object) { + var properties = this._initBaseEvent(event, pointer); + + var hoverChanged = false; + + if (object.hover === false) { + object.hover = true; + + this._addToHover(object); + + hoverChanged = true; + + if (object instanceof Node) { + properties.node = object.id; + this.body.emitter.emit("hoverNode", properties); + } else { + properties.edge = object.id; + this.body.emitter.emit("hoverEdge", properties); + } + } + + return hoverChanged; + } + /** + * Perform actions in response to a mouse movement. + * + * @param {Event} event + * @param {{x: number, y: number}} pointer | object with the x and y screen coordinates of the mouse + */ + + }, { + key: "hoverObject", + value: function hoverObject(event, pointer) { + var object = this.getNodeAt(pointer); + + if (object === undefined) { + object = this.getEdgeAt(pointer); + } + + var hoverChanged = false; // remove all node hover highlights + + for (var nodeId in this.hoverObj.nodes) { + if (this.hoverObj.nodes.hasOwnProperty(nodeId)) { + if (object === undefined || object instanceof Node && object.id != nodeId || object instanceof Edge) { + this.emitBlurEvent(event, pointer, this.hoverObj.nodes[nodeId]); + delete this.hoverObj.nodes[nodeId]; + hoverChanged = true; + } + } + } // removing all edge hover highlights + + + for (var edgeId in this.hoverObj.edges) { + if (this.hoverObj.edges.hasOwnProperty(edgeId)) { + // if the hover has been changed here it means that the node has been hovered over or off + // we then do not use the emitBlurEvent method here. + if (hoverChanged === true) { + this.hoverObj.edges[edgeId].hover = false; + delete this.hoverObj.edges[edgeId]; + } // if the blur remains the same and the object is undefined (mouse off) or another + // edge has been hovered, or another node has been hovered we blur the edge. + else if (object === undefined || object instanceof Edge && object.id != edgeId || object instanceof Node && !object.hover) { + this.emitBlurEvent(event, pointer, this.hoverObj.edges[edgeId]); + delete this.hoverObj.edges[edgeId]; + hoverChanged = true; + } + } + } + + if (object !== undefined) { + var hoveredEdgesCount = Object.keys(this.hoverObj.edges).length; + var hoveredNodesCount = Object.keys(this.hoverObj.nodes).length; + var newOnlyHoveredEdge = object instanceof Edge && hoveredEdgesCount === 0 && hoveredNodesCount === 0; + var newOnlyHoveredNode = object instanceof Node && hoveredEdgesCount === 0 && hoveredNodesCount === 0; + + if (hoverChanged || newOnlyHoveredEdge || newOnlyHoveredNode) { + hoverChanged = this.emitHoverEvent(event, pointer, object); + } + + if (object instanceof Node && this.options.hoverConnectedEdges === true) { + this._hoverConnectedEdges(object); + } + } + + if (hoverChanged === true) { + this.body.emitter.emit('_requestRedraw'); + } + } + /** + * + * retrieve the currently selected objects + * @return {{nodes: Array., edges: Array.}} selection + */ + + }, { + key: "getSelection", + value: function getSelection() { + var nodeIds = this.getSelectedNodes(); + var edgeIds = this.getSelectedEdges(); + return { + nodes: nodeIds, + edges: edgeIds + }; + } + /** + * + * retrieve the currently selected nodes + * @return {string[]} selection An array with the ids of the + * selected nodes. + */ + + }, { + key: "getSelectedNodes", + value: function getSelectedNodes() { + var idArray = []; + + if (this.options.selectable === true) { + for (var nodeId in this.selectionObj.nodes) { + if (this.selectionObj.nodes.hasOwnProperty(nodeId)) { + idArray.push(this.selectionObj.nodes[nodeId].id); + } + } + } + + return idArray; + } + /** + * + * retrieve the currently selected edges + * @return {Array} selection An array with the ids of the + * selected nodes. + */ + + }, { + key: "getSelectedEdges", + value: function getSelectedEdges() { + var idArray = []; + + if (this.options.selectable === true) { + for (var edgeId in this.selectionObj.edges) { + if (this.selectionObj.edges.hasOwnProperty(edgeId)) { + idArray.push(this.selectionObj.edges[edgeId].id); + } + } + } + + return idArray; + } + /** + * Updates the current selection + * @param {{nodes: Array., edges: Array.}} selection + * @param {Object} options Options + */ + + }, { + key: "setSelection", + value: function setSelection(selection) { + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + var i, id; + if (!selection || !selection.nodes && !selection.edges) throw 'Selection must be an object with nodes and/or edges properties'; // first unselect any selected node, if option is true or undefined + + if (options.unselectAll || options.unselectAll === undefined) { + this.unselectAll(); + } + + if (selection.nodes) { + for (i = 0; i < selection.nodes.length; i++) { + id = selection.nodes[i]; + var node = this.body.nodes[id]; + + if (!node) { + throw new RangeError('Node with id "' + id + '" not found'); + } // don't select edges with it + + + this.selectObject(node, options.highlightEdges); + } + } + + if (selection.edges) { + for (i = 0; i < selection.edges.length; i++) { + id = selection.edges[i]; + var edge = this.body.edges[id]; + + if (!edge) { + throw new RangeError('Edge with id "' + id + '" not found'); + } + + this.selectObject(edge); + } + } + + this.body.emitter.emit('_requestRedraw'); + } + /** + * select zero or more nodes with the option to highlight edges + * @param {number[] | string[]} selection An array with the ids of the + * selected nodes. + * @param {boolean} [highlightEdges] + */ + + }, { + key: "selectNodes", + value: function selectNodes(selection) { + var highlightEdges = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; + if (!selection || selection.length === undefined) throw 'Selection must be an array with ids'; + this.setSelection({ + nodes: selection + }, { + highlightEdges: highlightEdges + }); + } + /** + * select zero or more edges + * @param {number[] | string[]} selection An array with the ids of the + * selected nodes. + */ + + }, { + key: "selectEdges", + value: function selectEdges(selection) { + if (!selection || selection.length === undefined) throw 'Selection must be an array with ids'; + this.setSelection({ + edges: selection + }); + } + /** + * Validate the selection: remove ids of nodes which no longer exist + * @private + */ + + }, { + key: "updateSelection", + value: function updateSelection() { + for (var nodeId in this.selectionObj.nodes) { + if (this.selectionObj.nodes.hasOwnProperty(nodeId)) { + if (!this.body.nodes.hasOwnProperty(nodeId)) { + delete this.selectionObj.nodes[nodeId]; + } + } + } + + for (var edgeId in this.selectionObj.edges) { + if (this.selectionObj.edges.hasOwnProperty(edgeId)) { + if (!this.body.edges.hasOwnProperty(edgeId)) { + delete this.selectionObj.edges[edgeId]; + } + } + } + } + /** + * Determine all the visual elements clicked which are on the given point. + * + * All elements are returned; this includes nodes, edges and their labels. + * The order returned is from highest to lowest, i.e. element 0 of the return + * value is the topmost item clicked on. + * + * The return value consists of an array of the following possible elements: + * + * - `{nodeId:number}` - node with given id clicked on + * - `{nodeId:number, labelId:0}` - label of node with given id clicked on + * - `{edgeId:number}` - edge with given id clicked on + * - `{edge:number, labelId:0}` - label of edge with given id clicked on + * + * ## NOTES + * + * - Currently, there is only one label associated with a node or an edge, + * but this is expected to change somewhere in the future. + * - Since there is no z-indexing yet, it is not really possible to set the nodes and + * edges in the correct order. For the time being, nodes come first. + * + * @param {point} pointer mouse position in screen coordinates + * @returns {Array.} + * @private + */ + + }, { + key: "getClickedItems", + value: function getClickedItems(pointer) { + var point = this.canvas.DOMtoCanvas(pointer); + var items = []; // Note reverse order; we want the topmost clicked items to be first in the array + // Also note that selected nodes are disregarded here; these normally display on top + + var nodeIndices = this.body.nodeIndices; + var nodes = this.body.nodes; + + for (var i = nodeIndices.length - 1; i >= 0; i--) { + var node = nodes[nodeIndices[i]]; + var ret = node.getItemsOnPoint(point); + items.push.apply(items, ret); // Append the return value to the running list. + } + + var edgeIndices = this.body.edgeIndices; + var edges = this.body.edges; + + for (var _i = edgeIndices.length - 1; _i >= 0; _i--) { + var edge = edges[edgeIndices[_i]]; + + var _ret = edge.getItemsOnPoint(point); + + items.push.apply(items, _ret); // Append the return value to the running list. + } + + return items; + } + }]); + + return SelectionHandler; +}(); + +var timsort = createCommonjsModule$2(function (module, exports) { + /**** + * The MIT License + * + * Copyright (c) 2015 Marco Ziccardi + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * + ****/ + (function (global, factory) { + { + factory(exports); + } + })(commonjsGlobal$2, function (exports) { + + exports.__esModule = true; + exports.sort = sort; + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + var DEFAULT_MIN_MERGE = 32; + var DEFAULT_MIN_GALLOPING = 7; + var DEFAULT_TMP_STORAGE_LENGTH = 256; + var POWERS_OF_TEN = [1e0, 1e1, 1e2, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9]; + + function log10(x) { + if (x < 1e5) { + if (x < 1e2) { + return x < 1e1 ? 0 : 1; + } + + if (x < 1e4) { + return x < 1e3 ? 2 : 3; + } + + return 4; + } + + if (x < 1e7) { + return x < 1e6 ? 5 : 6; + } + + if (x < 1e9) { + return x < 1e8 ? 7 : 8; + } + + return 9; + } + + function alphabeticalCompare(a, b) { + if (a === b) { + return 0; + } + + if (~~a === a && ~~b === b) { + if (a === 0 || b === 0) { + return a < b ? -1 : 1; + } + + if (a < 0 || b < 0) { + if (b >= 0) { + return -1; + } + + if (a >= 0) { + return 1; + } + + a = -a; + b = -b; + } + + var al = log10(a); + var bl = log10(b); + var t = 0; + + if (al < bl) { + a *= POWERS_OF_TEN[bl - al - 1]; + b /= 10; + t = -1; + } else if (al > bl) { + b *= POWERS_OF_TEN[al - bl - 1]; + a /= 10; + t = 1; + } + + if (a === b) { + return t; + } + + return a < b ? -1 : 1; + } + + var aStr = String(a); + var bStr = String(b); + + if (aStr === bStr) { + return 0; + } + + return aStr < bStr ? -1 : 1; + } + + function minRunLength(n) { + var r = 0; + + while (n >= DEFAULT_MIN_MERGE) { + r |= n & 1; + n >>= 1; + } + + return n + r; + } + + function makeAscendingRun(array, lo, hi, compare) { + var runHi = lo + 1; + + if (runHi === hi) { + return 1; + } + + if (compare(array[runHi++], array[lo]) < 0) { + while (runHi < hi && compare(array[runHi], array[runHi - 1]) < 0) { + runHi++; + } + + reverseRun(array, lo, runHi); + } else { + while (runHi < hi && compare(array[runHi], array[runHi - 1]) >= 0) { + runHi++; + } + } + + return runHi - lo; + } + + function reverseRun(array, lo, hi) { + hi--; + + while (lo < hi) { + var t = array[lo]; + array[lo++] = array[hi]; + array[hi--] = t; + } + } + + function binaryInsertionSort(array, lo, hi, start, compare) { + if (start === lo) { + start++; + } + + for (; start < hi; start++) { + var pivot = array[start]; + var left = lo; + var right = start; + + while (left < right) { + var mid = left + right >>> 1; + + if (compare(pivot, array[mid]) < 0) { + right = mid; + } else { + left = mid + 1; + } + } + + var n = start - left; + + switch (n) { + case 3: + array[left + 3] = array[left + 2]; + + case 2: + array[left + 2] = array[left + 1]; + + case 1: + array[left + 1] = array[left]; + break; + + default: + while (n > 0) { + array[left + n] = array[left + n - 1]; + n--; + } + + } + + array[left] = pivot; + } + } + + function gallopLeft(value, array, start, length, hint, compare) { + var lastOffset = 0; + var maxOffset = 0; + var offset = 1; + + if (compare(value, array[start + hint]) > 0) { + maxOffset = length - hint; + + while (offset < maxOffset && compare(value, array[start + hint + offset]) > 0) { + lastOffset = offset; + offset = (offset << 1) + 1; + + if (offset <= 0) { + offset = maxOffset; + } + } + + if (offset > maxOffset) { + offset = maxOffset; + } + + lastOffset += hint; + offset += hint; + } else { + maxOffset = hint + 1; + + while (offset < maxOffset && compare(value, array[start + hint - offset]) <= 0) { + lastOffset = offset; + offset = (offset << 1) + 1; + + if (offset <= 0) { + offset = maxOffset; + } + } + + if (offset > maxOffset) { + offset = maxOffset; + } + + var tmp = lastOffset; + lastOffset = hint - offset; + offset = hint - tmp; + } + + lastOffset++; + + while (lastOffset < offset) { + var m = lastOffset + (offset - lastOffset >>> 1); + + if (compare(value, array[start + m]) > 0) { + lastOffset = m + 1; + } else { + offset = m; + } + } + + return offset; + } + + function gallopRight(value, array, start, length, hint, compare) { + var lastOffset = 0; + var maxOffset = 0; + var offset = 1; + + if (compare(value, array[start + hint]) < 0) { + maxOffset = hint + 1; + + while (offset < maxOffset && compare(value, array[start + hint - offset]) < 0) { + lastOffset = offset; + offset = (offset << 1) + 1; + + if (offset <= 0) { + offset = maxOffset; + } + } + + if (offset > maxOffset) { + offset = maxOffset; + } + + var tmp = lastOffset; + lastOffset = hint - offset; + offset = hint - tmp; + } else { + maxOffset = length - hint; + + while (offset < maxOffset && compare(value, array[start + hint + offset]) >= 0) { + lastOffset = offset; + offset = (offset << 1) + 1; + + if (offset <= 0) { + offset = maxOffset; + } + } + + if (offset > maxOffset) { + offset = maxOffset; + } + + lastOffset += hint; + offset += hint; + } + + lastOffset++; + + while (lastOffset < offset) { + var m = lastOffset + (offset - lastOffset >>> 1); + + if (compare(value, array[start + m]) < 0) { + offset = m; + } else { + lastOffset = m + 1; + } + } + + return offset; + } + + var TimSort = function () { + function TimSort(array, compare) { + _classCallCheck(this, TimSort); + + this.array = null; + this.compare = null; + this.minGallop = DEFAULT_MIN_GALLOPING; + this.length = 0; + this.tmpStorageLength = DEFAULT_TMP_STORAGE_LENGTH; + this.stackLength = 0; + this.runStart = null; + this.runLength = null; + this.stackSize = 0; + this.array = array; + this.compare = compare; + this.length = array.length; + + if (this.length < 2 * DEFAULT_TMP_STORAGE_LENGTH) { + this.tmpStorageLength = this.length >>> 1; + } + + this.tmp = new Array(this.tmpStorageLength); + this.stackLength = this.length < 120 ? 5 : this.length < 1542 ? 10 : this.length < 119151 ? 19 : 40; + this.runStart = new Array(this.stackLength); + this.runLength = new Array(this.stackLength); + } + + TimSort.prototype.pushRun = function pushRun(runStart, runLength) { + this.runStart[this.stackSize] = runStart; + this.runLength[this.stackSize] = runLength; + this.stackSize += 1; + }; + + TimSort.prototype.mergeRuns = function mergeRuns() { + while (this.stackSize > 1) { + var n = this.stackSize - 2; + + if (n >= 1 && this.runLength[n - 1] <= this.runLength[n] + this.runLength[n + 1] || n >= 2 && this.runLength[n - 2] <= this.runLength[n] + this.runLength[n - 1]) { + if (this.runLength[n - 1] < this.runLength[n + 1]) { + n--; + } + } else if (this.runLength[n] > this.runLength[n + 1]) { + break; + } + + this.mergeAt(n); + } + }; + + TimSort.prototype.forceMergeRuns = function forceMergeRuns() { + while (this.stackSize > 1) { + var n = this.stackSize - 2; + + if (n > 0 && this.runLength[n - 1] < this.runLength[n + 1]) { + n--; + } + + this.mergeAt(n); + } + }; + + TimSort.prototype.mergeAt = function mergeAt(i) { + var compare = this.compare; + var array = this.array; + var start1 = this.runStart[i]; + var length1 = this.runLength[i]; + var start2 = this.runStart[i + 1]; + var length2 = this.runLength[i + 1]; + this.runLength[i] = length1 + length2; + + if (i === this.stackSize - 3) { + this.runStart[i + 1] = this.runStart[i + 2]; + this.runLength[i + 1] = this.runLength[i + 2]; + } + + this.stackSize--; + var k = gallopRight(array[start2], array, start1, length1, 0, compare); + start1 += k; + length1 -= k; + + if (length1 === 0) { + return; + } + + length2 = gallopLeft(array[start1 + length1 - 1], array, start2, length2, length2 - 1, compare); + + if (length2 === 0) { + return; + } + + if (length1 <= length2) { + this.mergeLow(start1, length1, start2, length2); + } else { + this.mergeHigh(start1, length1, start2, length2); + } + }; + + TimSort.prototype.mergeLow = function mergeLow(start1, length1, start2, length2) { + var compare = this.compare; + var array = this.array; + var tmp = this.tmp; + var i = 0; + + for (i = 0; i < length1; i++) { + tmp[i] = array[start1 + i]; + } + + var cursor1 = 0; + var cursor2 = start2; + var dest = start1; + array[dest++] = array[cursor2++]; + + if (--length2 === 0) { + for (i = 0; i < length1; i++) { + array[dest + i] = tmp[cursor1 + i]; + } + + return; + } + + if (length1 === 1) { + for (i = 0; i < length2; i++) { + array[dest + i] = array[cursor2 + i]; + } + + array[dest + length2] = tmp[cursor1]; + return; + } + + var minGallop = this.minGallop; + + while (true) { + var count1 = 0; + var count2 = 0; + var exit = false; + + do { + if (compare(array[cursor2], tmp[cursor1]) < 0) { + array[dest++] = array[cursor2++]; + count2++; + count1 = 0; + + if (--length2 === 0) { + exit = true; + break; + } + } else { + array[dest++] = tmp[cursor1++]; + count1++; + count2 = 0; + + if (--length1 === 1) { + exit = true; + break; + } + } + } while ((count1 | count2) < minGallop); + + if (exit) { + break; + } + + do { + count1 = gallopRight(array[cursor2], tmp, cursor1, length1, 0, compare); + + if (count1 !== 0) { + for (i = 0; i < count1; i++) { + array[dest + i] = tmp[cursor1 + i]; + } + + dest += count1; + cursor1 += count1; + length1 -= count1; + + if (length1 <= 1) { + exit = true; + break; + } + } + + array[dest++] = array[cursor2++]; + + if (--length2 === 0) { + exit = true; + break; + } + + count2 = gallopLeft(tmp[cursor1], array, cursor2, length2, 0, compare); + + if (count2 !== 0) { + for (i = 0; i < count2; i++) { + array[dest + i] = array[cursor2 + i]; + } + + dest += count2; + cursor2 += count2; + length2 -= count2; + + if (length2 === 0) { + exit = true; + break; + } + } + + array[dest++] = tmp[cursor1++]; + + if (--length1 === 1) { + exit = true; + break; + } + + minGallop--; + } while (count1 >= DEFAULT_MIN_GALLOPING || count2 >= DEFAULT_MIN_GALLOPING); + + if (exit) { + break; + } + + if (minGallop < 0) { + minGallop = 0; + } + + minGallop += 2; + } + + this.minGallop = minGallop; + + if (minGallop < 1) { + this.minGallop = 1; + } + + if (length1 === 1) { + for (i = 0; i < length2; i++) { + array[dest + i] = array[cursor2 + i]; + } + + array[dest + length2] = tmp[cursor1]; + } else if (length1 === 0) { + throw new Error('mergeLow preconditions were not respected'); + } else { + for (i = 0; i < length1; i++) { + array[dest + i] = tmp[cursor1 + i]; + } + } + }; + + TimSort.prototype.mergeHigh = function mergeHigh(start1, length1, start2, length2) { + var compare = this.compare; + var array = this.array; + var tmp = this.tmp; + var i = 0; + + for (i = 0; i < length2; i++) { + tmp[i] = array[start2 + i]; + } + + var cursor1 = start1 + length1 - 1; + var cursor2 = length2 - 1; + var dest = start2 + length2 - 1; + var customCursor = 0; + var customDest = 0; + array[dest--] = array[cursor1--]; + + if (--length1 === 0) { + customCursor = dest - (length2 - 1); + + for (i = 0; i < length2; i++) { + array[customCursor + i] = tmp[i]; + } + + return; + } + + if (length2 === 1) { + dest -= length1; + cursor1 -= length1; + customDest = dest + 1; + customCursor = cursor1 + 1; + + for (i = length1 - 1; i >= 0; i--) { + array[customDest + i] = array[customCursor + i]; + } + + array[dest] = tmp[cursor2]; + return; + } + + var minGallop = this.minGallop; + + while (true) { + var count1 = 0; + var count2 = 0; + var exit = false; + + do { + if (compare(tmp[cursor2], array[cursor1]) < 0) { + array[dest--] = array[cursor1--]; + count1++; + count2 = 0; + + if (--length1 === 0) { + exit = true; + break; + } + } else { + array[dest--] = tmp[cursor2--]; + count2++; + count1 = 0; + + if (--length2 === 1) { + exit = true; + break; + } + } + } while ((count1 | count2) < minGallop); + + if (exit) { + break; + } + + do { + count1 = length1 - gallopRight(tmp[cursor2], array, start1, length1, length1 - 1, compare); + + if (count1 !== 0) { + dest -= count1; + cursor1 -= count1; + length1 -= count1; + customDest = dest + 1; + customCursor = cursor1 + 1; + + for (i = count1 - 1; i >= 0; i--) { + array[customDest + i] = array[customCursor + i]; + } + + if (length1 === 0) { + exit = true; + break; + } + } + + array[dest--] = tmp[cursor2--]; + + if (--length2 === 1) { + exit = true; + break; + } + + count2 = length2 - gallopLeft(array[cursor1], tmp, 0, length2, length2 - 1, compare); + + if (count2 !== 0) { + dest -= count2; + cursor2 -= count2; + length2 -= count2; + customDest = dest + 1; + customCursor = cursor2 + 1; + + for (i = 0; i < count2; i++) { + array[customDest + i] = tmp[customCursor + i]; + } + + if (length2 <= 1) { + exit = true; + break; + } + } + + array[dest--] = array[cursor1--]; + + if (--length1 === 0) { + exit = true; + break; + } + + minGallop--; + } while (count1 >= DEFAULT_MIN_GALLOPING || count2 >= DEFAULT_MIN_GALLOPING); + + if (exit) { + break; + } + + if (minGallop < 0) { + minGallop = 0; + } + + minGallop += 2; + } + + this.minGallop = minGallop; + + if (minGallop < 1) { + this.minGallop = 1; + } + + if (length2 === 1) { + dest -= length1; + cursor1 -= length1; + customDest = dest + 1; + customCursor = cursor1 + 1; + + for (i = length1 - 1; i >= 0; i--) { + array[customDest + i] = array[customCursor + i]; + } + + array[dest] = tmp[cursor2]; + } else if (length2 === 0) { + throw new Error('mergeHigh preconditions were not respected'); + } else { + customCursor = dest - (length2 - 1); + + for (i = 0; i < length2; i++) { + array[customCursor + i] = tmp[i]; + } + } + }; + + return TimSort; + }(); + + function sort(array, compare, lo, hi) { + if (!Array.isArray(array)) { + throw new TypeError('Can only sort arrays'); + } + + if (!compare) { + compare = alphabeticalCompare; + } else if (typeof compare !== 'function') { + hi = lo; + lo = compare; + compare = alphabeticalCompare; + } + + if (!lo) { + lo = 0; + } + + if (!hi) { + hi = array.length; + } + + var remaining = hi - lo; + + if (remaining < 2) { + return; + } + + var runLength = 0; + + if (remaining < DEFAULT_MIN_MERGE) { + runLength = makeAscendingRun(array, lo, hi, compare); + binaryInsertionSort(array, lo, hi, lo + runLength, compare); + return; + } + + var ts = new TimSort(array, compare); + var minRun = minRunLength(remaining); + + do { + runLength = makeAscendingRun(array, lo, hi, compare); + + if (runLength < minRun) { + var force = remaining; + + if (force > minRun) { + force = minRun; + } + + binaryInsertionSort(array, lo, lo + force, lo + runLength, compare); + runLength = force; + } + + ts.pushRun(lo, runLength); + ts.mergeRuns(); + remaining -= runLength; + lo += runLength; + } while (remaining !== 0); + + ts.forceMergeRuns(); + } + }); +}); +unwrapExports(timsort); + +var timsort$1 = timsort; + +/** + * Interface definition for direction strategy classes. + * + * This class describes the interface for the Strategy + * pattern classes used to differentiate horizontal and vertical + * direction of hierarchical results. + * + * For a given direction, one coordinate will be 'fixed', meaning that it is + * determined by level. + * The other coordinate is 'unfixed', meaning that the nodes on a given level + * can still move along that coordinate. So: + * + * - `vertical` layout: `x` unfixed, `y` fixed per level + * - `horizontal` layout: `x` fixed per level, `y` unfixed + * + * The local methods are stubs and should be regarded as abstract. + * Derived classes **must** implement all the methods themselves. + * + * @private + */ + +var DirectionInterface = +/*#__PURE__*/ +function () { + function DirectionInterface() { + classCallCheck$1(this, DirectionInterface); + } + + createClass$1(DirectionInterface, [{ + key: "abstract", + + /** @ignore **/ + value: function abstract() { + throw new Error("Can't instantiate abstract class!"); + } + /** + * This is a dummy call which is used to suppress the jsdoc errors of type: + * + * "'param' is assigned a value but never used" + * + * @ignore + **/ + + }, { + key: "fake_use", + value: function fake_use() {} // Do nothing special + + /** + * Type to use to translate dynamic curves to, in the case of hierarchical layout. + * Dynamic curves do not work for these. + * + * The value should be perpendicular to the actual direction of the layout. + * + * @return {string} Direction, either 'vertical' or 'horizontal' + */ + + }, { + key: "curveType", + value: function curveType() { + return this.abstract(); + } + /** + * Return the value of the coordinate that is not fixed for this direction. + * + * @param {Node} node The node to read + * @return {number} Value of the unfixed coordinate + */ + + }, { + key: "getPosition", + value: function getPosition(node) { + this.fake_use(node); + return this.abstract(); + } + /** + * Set the value of the coordinate that is not fixed for this direction. + * + * @param {Node} node The node to adjust + * @param {number} position + * @param {number} [level] if specified, the hierarchy level that this node should be fixed to + */ + + }, { + key: "setPosition", + value: function setPosition(node, position) { + var level = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : undefined; + this.fake_use(node, position, level); + this.abstract(); + } + /** + * Get the width of a tree. + * + * A `tree` here is a subset of nodes within the network which are not connected to other nodes, + * only among themselves. In essence, it is a sub-network. + * + * @param {number} index The index number of a tree + * @return {number} the width of a tree in the view coordinates + */ + + }, { + key: "getTreeSize", + value: function getTreeSize(index) { + this.fake_use(index); + return this.abstract(); + } + /** + * Sort array of nodes on the unfixed coordinates. + * + * **Note:** chrome has non-stable sorting implementation, which + * has a tendency to change the order of the array items, + * even if the custom sort function returns 0. + * + * For this reason, an external sort implementation is used, + * which has the added benefit of being faster than the standard + * platforms implementation. This has been verified on `node.js`, + * `firefox` and `chrome` (all linux). + * + * @param {Array.} nodeArray array of nodes to sort + */ + + }, { + key: "sort", + value: function sort(nodeArray) { + this.fake_use(nodeArray); + this.abstract(); + } + /** + * Assign the fixed coordinate of the node to the given level + * + * @param {Node} node The node to adjust + * @param {number} level The level to fix to + */ + + }, { + key: "fix", + value: function fix(node, level) { + this.fake_use(node, level); + this.abstract(); + } + /** + * Add an offset to the unfixed coordinate of the given node. + * + * @param {NodeId} nodeId Id of the node to adjust + * @param {number} diff Offset to add to the unfixed coordinate + */ + + }, { + key: "shift", + value: function shift(nodeId, diff) { + this.fake_use(nodeId, diff); + this.abstract(); + } + }]); + + return DirectionInterface; +}(); +/** + * Vertical Strategy + * + * Coordinate `y` is fixed on levels, coordinate `x` is unfixed. + * + * @extends DirectionInterface + * @private + */ + + +var VerticalStrategy = +/*#__PURE__*/ +function (_DirectionInterface) { + inherits$1(VerticalStrategy, _DirectionInterface); + + /** + * Constructor + * + * @param {Object} layout reference to the parent LayoutEngine instance. + */ + function VerticalStrategy(layout) { + var _this; + + classCallCheck$1(this, VerticalStrategy); + + _this = possibleConstructorReturn$1(this, getPrototypeOf$1(VerticalStrategy).call(this)); + _this.layout = layout; + return _this; + } + /** @inheritdoc */ + + + createClass$1(VerticalStrategy, [{ + key: "curveType", + value: function curveType() { + return 'horizontal'; + } + /** @inheritdoc */ + + }, { + key: "getPosition", + value: function getPosition(node) { + return node.x; + } + /** @inheritdoc */ + + }, { + key: "setPosition", + value: function setPosition(node, position) { + var level = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : undefined; + + if (level !== undefined) { + this.layout.hierarchical.addToOrdering(node, level); + } + + node.x = position; + } + /** @inheritdoc */ + + }, { + key: "getTreeSize", + value: function getTreeSize(index) { + var res = this.layout.hierarchical.getTreeSize(this.layout.body.nodes, index); + return { + min: res.min_x, + max: res.max_x + }; + } + /** @inheritdoc */ + + }, { + key: "sort", + value: function sort(nodeArray) { + timsort$1.sort(nodeArray, function (a, b) { + return a.x - b.x; + }); + } + /** @inheritdoc */ + + }, { + key: "fix", + value: function fix(node, level) { + node.y = this.layout.options.hierarchical.levelSeparation * level; + node.options.fixed.y = true; + } + /** @inheritdoc */ + + }, { + key: "shift", + value: function shift(nodeId, diff) { + this.layout.body.nodes[nodeId].x += diff; + } + }]); + + return VerticalStrategy; +}(DirectionInterface); +/** + * Horizontal Strategy + * + * Coordinate `x` is fixed on levels, coordinate `y` is unfixed. + * + * @extends DirectionInterface + * @private + */ + + +var HorizontalStrategy = +/*#__PURE__*/ +function (_DirectionInterface2) { + inherits$1(HorizontalStrategy, _DirectionInterface2); + + /** + * Constructor + * + * @param {Object} layout reference to the parent LayoutEngine instance. + */ + function HorizontalStrategy(layout) { + var _this2; + + classCallCheck$1(this, HorizontalStrategy); + + _this2 = possibleConstructorReturn$1(this, getPrototypeOf$1(HorizontalStrategy).call(this)); + _this2.layout = layout; + return _this2; + } + /** @inheritdoc */ + + + createClass$1(HorizontalStrategy, [{ + key: "curveType", + value: function curveType() { + return 'vertical'; + } + /** @inheritdoc */ + + }, { + key: "getPosition", + value: function getPosition(node) { + return node.y; + } + /** @inheritdoc */ + + }, { + key: "setPosition", + value: function setPosition(node, position) { + var level = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : undefined; + + if (level !== undefined) { + this.layout.hierarchical.addToOrdering(node, level); + } + + node.y = position; + } + /** @inheritdoc */ + + }, { + key: "getTreeSize", + value: function getTreeSize(index) { + var res = this.layout.hierarchical.getTreeSize(this.layout.body.nodes, index); + return { + min: res.min_y, + max: res.max_y + }; + } + /** @inheritdoc */ + + }, { + key: "sort", + value: function sort(nodeArray) { + timsort$1.sort(nodeArray, function (a, b) { + return a.y - b.y; + }); + } + /** @inheritdoc */ + + }, { + key: "fix", + value: function fix(node, level) { + node.x = this.layout.options.hierarchical.levelSeparation * level; + node.options.fixed.x = true; + } + /** @inheritdoc */ + + }, { + key: "shift", + value: function shift(nodeId, diff) { + this.layout.body.nodes[nodeId].y += diff; + } + }]); + + return HorizontalStrategy; +}(DirectionInterface); + +/** + * There's a mix-up with terms in the code. Following are the formal definitions: + * + * tree - a strict hierarchical network, i.e. every node has at most one parent + * forest - a collection of trees. These distinct trees are thus not connected. + * + * So: + * - in a network that is not a tree, there exist nodes with multiple parents. + * - a network consisting of unconnected sub-networks, of which at least one + * is not a tree, is not a forest. + * + * In the code, the definitions are: + * + * tree - any disconnected sub-network, strict hierarchical or not. + * forest - a bunch of these sub-networks + * + * The difference between tree and not-tree is important in the code, notably within + * to the block-shifting algorithm. The algorithm assumes formal trees and fails + * for not-trees, often in a spectacular manner (search for 'exploding network' in the issues). + * + * In order to distinguish the definitions in the following code, the adjective 'formal' is + * used. If 'formal' is absent, you must assume the non-formal definition. + * + * ---------------------------------------------------------------------------------- + * NOTES + * ===== + * + * A hierarchical layout is a different thing from a hierarchical network. + * The layout is a way to arrange the nodes in the view; this can be done + * on non-hierarchical networks as well. The converse is also possible. + */ +/** + * Container for derived data on current network, relating to hierarchy. + * + * @private + */ + +var HierarchicalStatus = +/*#__PURE__*/ +function () { + /** + * @ignore + */ + function HierarchicalStatus() { + classCallCheck$1(this, HierarchicalStatus); + + this.childrenReference = {}; // child id's per node id + + this.parentReference = {}; // parent id's per node id + + this.trees = {}; // tree id per node id; i.e. to which tree does given node id belong + + this.distributionOrdering = {}; // The nodes per level, in the display order + + this.levels = {}; // hierarchy level per node id + + this.distributionIndex = {}; // The position of the node in the level sorting order, per node id. + + this.isTree = false; // True if current network is a formal tree + + this.treeIndex = -1; // Highest tree id in current network. + } + /** + * Add the relation between given nodes to the current state. + * + * @param {Node.id} parentNodeId + * @param {Node.id} childNodeId + */ + + + createClass$1(HierarchicalStatus, [{ + key: "addRelation", + value: function addRelation(parentNodeId, childNodeId) { + if (this.childrenReference[parentNodeId] === undefined) { + this.childrenReference[parentNodeId] = []; + } + + this.childrenReference[parentNodeId].push(childNodeId); + + if (this.parentReference[childNodeId] === undefined) { + this.parentReference[childNodeId] = []; + } + + this.parentReference[childNodeId].push(parentNodeId); + } + /** + * Check if the current state is for a formal tree or formal forest. + * + * This is the case if every node has at most one parent. + * + * Pre: parentReference init'ed properly for current network + */ + + }, { + key: "checkIfTree", + value: function checkIfTree() { + for (var i in this.parentReference) { + if (this.parentReference[i].length > 1) { + this.isTree = false; + return; + } + } + + this.isTree = true; + } + /** + * Return the number of separate trees in the current network. + * @returns {number} + */ + + }, { + key: "numTrees", + value: function numTrees() { + return this.treeIndex + 1; // This assumes the indexes are assigned consecitively + } + /** + * Assign a tree id to a node + * @param {Node} node + * @param {string|number} treeId + */ + + }, { + key: "setTreeIndex", + value: function setTreeIndex(node, treeId) { + if (treeId === undefined) return; // Don't bother + + if (this.trees[node.id] === undefined) { + this.trees[node.id] = treeId; + this.treeIndex = Math.max(treeId, this.treeIndex); + } + } + /** + * Ensure level for given id is defined. + * + * Sets level to zero for given node id if not already present + * + * @param {Node.id} nodeId + */ + + }, { + key: "ensureLevel", + value: function ensureLevel(nodeId) { + if (this.levels[nodeId] === undefined) { + this.levels[nodeId] = 0; + } + } + /** + * get the maximum level of a branch. + * + * TODO: Never entered; find a test case to test this! + * @param {Node.id} nodeId + * @returns {number} + */ + + }, { + key: "getMaxLevel", + value: function getMaxLevel(nodeId) { + var _this = this; + + var accumulator = {}; + + var _getMaxLevel = function _getMaxLevel(nodeId) { + if (accumulator[nodeId] !== undefined) { + return accumulator[nodeId]; + } + + var level = _this.levels[nodeId]; + + if (_this.childrenReference[nodeId]) { + var children = _this.childrenReference[nodeId]; + + if (children.length > 0) { + for (var i = 0; i < children.length; i++) { + level = Math.max(level, _getMaxLevel(children[i])); + } + } + } + + accumulator[nodeId] = level; + return level; + }; + + return _getMaxLevel(nodeId); + } + /** + * + * @param {Node} nodeA + * @param {Node} nodeB + */ + + }, { + key: "levelDownstream", + value: function levelDownstream(nodeA, nodeB) { + if (this.levels[nodeB.id] === undefined) { + // set initial level + if (this.levels[nodeA.id] === undefined) { + this.levels[nodeA.id] = 0; + } // set level + + + this.levels[nodeB.id] = this.levels[nodeA.id] + 1; + } + } + /** + * Small util method to set the minimum levels of the nodes to zero. + * + * @param {Array.} nodes + */ + + }, { + key: "setMinLevelToZero", + value: function setMinLevelToZero(nodes) { + var minLevel = 1e9; // get the minimum level + + for (var nodeId in nodes) { + if (nodes.hasOwnProperty(nodeId)) { + if (this.levels[nodeId] !== undefined) { + minLevel = Math.min(this.levels[nodeId], minLevel); + } + } + } // subtract the minimum from the set so we have a range starting from 0 + + + for (var _nodeId in nodes) { + if (nodes.hasOwnProperty(_nodeId)) { + if (this.levels[_nodeId] !== undefined) { + this.levels[_nodeId] -= minLevel; + } + } + } + } + /** + * Get the min and max xy-coordinates of a given tree + * + * @param {Array.} nodes + * @param {number} index + * @returns {{min_x: number, max_x: number, min_y: number, max_y: number}} + */ + + }, { + key: "getTreeSize", + value: function getTreeSize(nodes, index) { + var min_x = 1e9; + var max_x = -1e9; + var min_y = 1e9; + var max_y = -1e9; + + for (var nodeId in this.trees) { + if (this.trees.hasOwnProperty(nodeId)) { + if (this.trees[nodeId] === index) { + var node = nodes[nodeId]; + min_x = Math.min(node.x, min_x); + max_x = Math.max(node.x, max_x); + min_y = Math.min(node.y, min_y); + max_y = Math.max(node.y, max_y); + } + } + } + + return { + min_x: min_x, + max_x: max_x, + min_y: min_y, + max_y: max_y + }; + } + /** + * Check if two nodes have the same parent(s) + * + * @param {Node} node1 + * @param {Node} node2 + * @return {boolean} true if the two nodes have a same ancestor node, false otherwise + */ + + }, { + key: "hasSameParent", + value: function hasSameParent(node1, node2) { + var parents1 = this.parentReference[node1.id]; + var parents2 = this.parentReference[node2.id]; + + if (parents1 === undefined || parents2 === undefined) { + return false; + } + + for (var i = 0; i < parents1.length; i++) { + for (var j = 0; j < parents2.length; j++) { + if (parents1[i] == parents2[j]) { + return true; + } + } + } + + return false; + } + /** + * Check if two nodes are in the same tree. + * + * @param {Node} node1 + * @param {Node} node2 + * @return {Boolean} true if this is so, false otherwise + */ + + }, { + key: "inSameSubNetwork", + value: function inSameSubNetwork(node1, node2) { + return this.trees[node1.id] === this.trees[node2.id]; + } + /** + * Get a list of the distinct levels in the current network + * + * @returns {Array} + */ + + }, { + key: "getLevels", + value: function getLevels() { + return Object.keys(this.distributionOrdering); + } + /** + * Add a node to the ordering per level + * + * @param {Node} node + * @param {number} level + */ + + }, { + key: "addToOrdering", + value: function addToOrdering(node, level) { + if (this.distributionOrdering[level] === undefined) { + this.distributionOrdering[level] = []; + } + + var isPresent = false; + var curLevel = this.distributionOrdering[level]; + + for (var n in curLevel) { + //if (curLevel[n].id === node.id) { + if (curLevel[n] === node) { + isPresent = true; + break; + } + } + + if (!isPresent) { + this.distributionOrdering[level].push(node); + this.distributionIndex[node.id] = this.distributionOrdering[level].length - 1; + } + } + }]); + + return HierarchicalStatus; +}(); +/** + * The Layout Engine + */ + + +var LayoutEngine = +/*#__PURE__*/ +function () { + /** + * @param {Object} body + */ + function LayoutEngine(body) { + classCallCheck$1(this, LayoutEngine); + + this.body = body; + this.initialRandomSeed = Math.round(Math.random() * 1000000); + this.randomSeed = this.initialRandomSeed; + this.setPhysics = false; + this.options = {}; + this.optionsBackup = { + physics: {} + }; + this.defaultOptions = { + randomSeed: undefined, + improvedLayout: true, + hierarchical: { + enabled: false, + levelSeparation: 150, + nodeSpacing: 100, + treeSpacing: 200, + blockShifting: true, + edgeMinimization: true, + parentCentralization: true, + direction: 'UD', + // UD, DU, LR, RL + sortMethod: 'hubsize' // hubsize, directed + + } + }; + util.extend(this.options, this.defaultOptions); + this.bindEventListeners(); + } + /** + * Binds event listeners + */ + + + createClass$1(LayoutEngine, [{ + key: "bindEventListeners", + value: function bindEventListeners() { + var _this2 = this; + + this.body.emitter.on('_dataChanged', function () { + _this2.setupHierarchicalLayout(); + }); + this.body.emitter.on('_dataLoaded', function () { + _this2.layoutNetwork(); + }); + this.body.emitter.on('_resetHierarchicalLayout', function () { + _this2.setupHierarchicalLayout(); + }); + this.body.emitter.on('_adjustEdgesForHierarchicalLayout', function () { + if (_this2.options.hierarchical.enabled !== true) { + return; + } // get the type of static smooth curve in case it is required + + + var type = _this2.direction.curveType(); // force all edges into static smooth curves. + + + _this2.body.emitter.emit('_forceDisableDynamicCurves', type, false); + }); + } + /** + * + * @param {Object} options + * @param {Object} allOptions + * @returns {Object} + */ + + }, { + key: "setOptions", + value: function setOptions(options, allOptions) { + if (options !== undefined) { + var hierarchical = this.options.hierarchical; + var prevHierarchicalState = hierarchical.enabled; + util.selectiveDeepExtend(["randomSeed", "improvedLayout"], this.options, options); + util.mergeOptions(this.options, options, 'hierarchical'); + + if (options.randomSeed !== undefined) { + this.initialRandomSeed = options.randomSeed; + } + + if (hierarchical.enabled === true) { + if (prevHierarchicalState === true) { + // refresh the overridden options for nodes and edges. + this.body.emitter.emit('refresh', true); + } // make sure the level separation is the right way up + + + if (hierarchical.direction === 'RL' || hierarchical.direction === 'DU') { + if (hierarchical.levelSeparation > 0) { + hierarchical.levelSeparation *= -1; + } + } else { + if (hierarchical.levelSeparation < 0) { + hierarchical.levelSeparation *= -1; + } + } + + this.setDirectionStrategy(); + this.body.emitter.emit('_resetHierarchicalLayout'); // because the hierarchical system needs it's own physics and smooth curve settings, + // we adapt the other options if needed. + + return this.adaptAllOptionsForHierarchicalLayout(allOptions); + } else { + if (prevHierarchicalState === true) { + // refresh the overridden options for nodes and edges. + this.body.emitter.emit('refresh'); + return util.deepExtend(allOptions, this.optionsBackup); + } + } + } + + return allOptions; + } + /** + * + * @param {Object} allOptions + * @returns {Object} + */ + + }, { + key: "adaptAllOptionsForHierarchicalLayout", + value: function adaptAllOptionsForHierarchicalLayout(allOptions) { + if (this.options.hierarchical.enabled === true) { + var backupPhysics = this.optionsBackup.physics; // set the physics + + if (allOptions.physics === undefined || allOptions.physics === true) { + allOptions.physics = { + enabled: backupPhysics.enabled === undefined ? true : backupPhysics.enabled, + solver: 'hierarchicalRepulsion' + }; + backupPhysics.enabled = backupPhysics.enabled === undefined ? true : backupPhysics.enabled; + backupPhysics.solver = backupPhysics.solver || 'barnesHut'; + } else if (_typeof_1$1(allOptions.physics) === 'object') { + backupPhysics.enabled = allOptions.physics.enabled === undefined ? true : allOptions.physics.enabled; + backupPhysics.solver = allOptions.physics.solver || 'barnesHut'; + allOptions.physics.solver = 'hierarchicalRepulsion'; + } else if (allOptions.physics !== false) { + backupPhysics.solver = 'barnesHut'; + allOptions.physics = { + solver: 'hierarchicalRepulsion' + }; + } // get the type of static smooth curve in case it is required + + + var type = this.direction.curveType(); // disable smooth curves if nothing is defined. If smooth curves have been turned on, + // turn them into static smooth curves. + + if (allOptions.edges === undefined) { + this.optionsBackup.edges = { + smooth: { + enabled: true, + type: 'dynamic' + } + }; + allOptions.edges = { + smooth: false + }; + } else if (allOptions.edges.smooth === undefined) { + this.optionsBackup.edges = { + smooth: { + enabled: true, + type: 'dynamic' + } + }; + allOptions.edges.smooth = false; + } else { + if (typeof allOptions.edges.smooth === 'boolean') { + this.optionsBackup.edges = { + smooth: allOptions.edges.smooth + }; + allOptions.edges.smooth = { + enabled: allOptions.edges.smooth, + type: type + }; + } else { + var smooth = allOptions.edges.smooth; // allow custom types except for dynamic + + if (smooth.type !== undefined && smooth.type !== 'dynamic') { + type = smooth.type; + } // TODO: this is options merging; see if the standard routines can be used here. + + + this.optionsBackup.edges = { + smooth: smooth.enabled === undefined ? true : smooth.enabled, + type: smooth.type === undefined ? 'dynamic' : smooth.type, + roundness: smooth.roundness === undefined ? 0.5 : smooth.roundness, + forceDirection: smooth.forceDirection === undefined ? false : smooth.forceDirection + }; // NOTE: Copying an object to self; this is basically setting defaults for undefined variables + + allOptions.edges.smooth = { + enabled: smooth.enabled === undefined ? true : smooth.enabled, + type: type, + roundness: smooth.roundness === undefined ? 0.5 : smooth.roundness, + forceDirection: smooth.forceDirection === undefined ? false : smooth.forceDirection + }; + } + } // Force all edges into static smooth curves. + // Only applies to edges that do not use the global options for smooth. + + + this.body.emitter.emit('_forceDisableDynamicCurves', type); + } + + return allOptions; + } + /** + * + * @returns {number} + */ + + }, { + key: "seededRandom", + value: function seededRandom() { + var x = Math.sin(this.randomSeed++) * 10000; + return x - Math.floor(x); + } + /** + * + * @param {Array.} nodesArray + */ + + }, { + key: "positionInitially", + value: function positionInitially(nodesArray) { + if (this.options.hierarchical.enabled !== true) { + this.randomSeed = this.initialRandomSeed; + var radius = nodesArray.length + 50; + + for (var i = 0; i < nodesArray.length; i++) { + var node = nodesArray[i]; + var angle = 2 * Math.PI * this.seededRandom(); + + if (node.x === undefined) { + node.x = radius * Math.cos(angle); + } + + if (node.y === undefined) { + node.y = radius * Math.sin(angle); + } + } + } + } + /** + * Use Kamada Kawai to position nodes. This is quite a heavy algorithm so if there are a lot of nodes we + * cluster them first to reduce the amount. + */ + + }, { + key: "layoutNetwork", + value: function layoutNetwork() { + if (this.options.hierarchical.enabled !== true && this.options.improvedLayout === true) { + var indices = this.body.nodeIndices; // first check if we should Kamada Kawai to layout. The threshold is if less than half of the visible + // nodes have predefined positions we use this. + + var positionDefined = 0; + + for (var i = 0; i < indices.length; i++) { + var node = this.body.nodes[indices[i]]; + + if (node.predefinedPosition === true) { + positionDefined += 1; + } + } // if less than half of the nodes have a predefined position we continue + + + if (positionDefined < 0.5 * indices.length) { + var MAX_LEVELS = 10; + var level = 0; + var clusterThreshold = 150; // TODO add this to options + // + // Define the options for the hidden cluster nodes + // These options don't propagate outside the clustering phase. + // + // Some options are explicitly disabled, because they may be set in group or default node options. + // The clusters are never displayed, so most explicit settings here serve as performance optimizations. + // + // The explicit setting of 'shape' is to avoid `shape: 'image'`; images are not passed to the hidden + // cluster nodes, leading to an exception on creation. + // + // All settings here are performance related, except when noted otherwise. + // + + var clusterOptions = { + clusterNodeProperties: { + shape: 'ellipse', + // Bugfix: avoid type 'image', no images supplied + label: '', + // avoid label handling + group: '', + // avoid group handling + font: { + multi: false + } // avoid font propagation + + }, + clusterEdgeProperties: { + label: '', + // avoid label handling + font: { + multi: false + }, + // avoid font propagation + smooth: { + enabled: false // avoid drawing penalty for complex edges + + } + } + }; // if there are a lot of nodes, we cluster before we run the algorithm. + // NOTE: this part fails to find clusters for large scale-free networks, which should + // be easily clusterable. + // TODO: examine why this is so + + if (indices.length > clusterThreshold) { + var startLength = indices.length; + + while (indices.length > clusterThreshold && level <= MAX_LEVELS) { + //console.time("clustering") + level += 1; + var before = indices.length; // if there are many nodes we do a hubsize cluster + + if (level % 3 === 0) { + this.body.modules.clustering.clusterBridges(clusterOptions); + } else { + this.body.modules.clustering.clusterOutliers(clusterOptions); + } + + var after = indices.length; + + if (before == after && level % 3 !== 0) { + this._declusterAll(); + + this.body.emitter.emit("_layoutFailed"); + console.info("This network could not be positioned by this version of the improved layout algorithm." + " Please disable improvedLayout for better performance."); + return; + } //console.timeEnd("clustering") + //console.log(before,level,after); + + } // increase the size of the edges + + + this.body.modules.kamadaKawai.setOptions({ + springLength: Math.max(150, 2 * startLength) + }); + } + + if (level > MAX_LEVELS) { + console.info("The clustering didn't succeed within the amount of interations allowed," + " progressing with partial result."); + } // position the system for these nodes and edges + + + this.body.modules.kamadaKawai.solve(indices, this.body.edgeIndices, true); // shift to center point + + this._shiftToCenter(); // perturb the nodes a little bit to force the physics to kick in + + + var offset = 70; + + for (var _i = 0; _i < indices.length; _i++) { + // Only perturb the nodes that aren't fixed + var _node = this.body.nodes[indices[_i]]; + + if (_node.predefinedPosition === false) { + _node.x += (0.5 - this.seededRandom()) * offset; + _node.y += (0.5 - this.seededRandom()) * offset; + } + } // uncluster all clusters + + + this._declusterAll(); // reposition all bezier nodes. + + + this.body.emitter.emit("_repositionBezierNodes"); + } + } + } + /** + * Move all the nodes towards to the center so gravitational pull wil not move the nodes away from view + * @private + */ + + }, { + key: "_shiftToCenter", + value: function _shiftToCenter() { + var range = NetworkUtil.getRangeCore(this.body.nodes, this.body.nodeIndices); + var center = NetworkUtil.findCenter(range); + + for (var i = 0; i < this.body.nodeIndices.length; i++) { + var node = this.body.nodes[this.body.nodeIndices[i]]; + node.x -= center.x; + node.y -= center.y; + } + } + /** + * Expands all clusters + * @private + */ + + }, { + key: "_declusterAll", + value: function _declusterAll() { + var clustersPresent = true; + + while (clustersPresent === true) { + clustersPresent = false; + + for (var i = 0; i < this.body.nodeIndices.length; i++) { + if (this.body.nodes[this.body.nodeIndices[i]].isCluster === true) { + clustersPresent = true; + this.body.modules.clustering.openCluster(this.body.nodeIndices[i], {}, false); + } + } + + if (clustersPresent === true) { + this.body.emitter.emit('_dataChanged'); + } + } + } + /** + * + * @returns {number|*} + */ + + }, { + key: "getSeed", + value: function getSeed() { + return this.initialRandomSeed; + } + /** + * This is the main function to layout the nodes in a hierarchical way. + * It checks if the node details are supplied correctly + * + * @private + */ + + }, { + key: "setupHierarchicalLayout", + value: function setupHierarchicalLayout() { + if (this.options.hierarchical.enabled === true && this.body.nodeIndices.length > 0) { + // get the size of the largest hubs and check if the user has defined a level for a node. + var node, nodeId; + var definedLevel = false; + var undefinedLevel = false; + this.lastNodeOnLevel = {}; + this.hierarchical = new HierarchicalStatus(); + + for (nodeId in this.body.nodes) { + if (this.body.nodes.hasOwnProperty(nodeId)) { + node = this.body.nodes[nodeId]; + + if (node.options.level !== undefined) { + definedLevel = true; + this.hierarchical.levels[nodeId] = node.options.level; + } else { + undefinedLevel = true; + } + } + } // if the user defined some levels but not all, alert and run without hierarchical layout + + + if (undefinedLevel === true && definedLevel === true) { + throw new Error('To use the hierarchical layout, nodes require either no predefined levels' + ' or levels have to be defined for all nodes.'); + } else { + // define levels if undefined by the users. Based on hubsize. + if (undefinedLevel === true) { + var sortMethod = this.options.hierarchical.sortMethod; + + if (sortMethod === 'hubsize') { + this._determineLevelsByHubsize(); + } else if (sortMethod === 'directed') { + this._determineLevelsDirected(); + } else if (sortMethod === 'custom') { + this._determineLevelsCustomCallback(); + } + } // fallback for cases where there are nodes but no edges + + + for (var _nodeId2 in this.body.nodes) { + if (this.body.nodes.hasOwnProperty(_nodeId2)) { + this.hierarchical.ensureLevel(_nodeId2); + } + } // check the distribution of the nodes per level. + + + var distribution = this._getDistribution(); // get the parent children relations. + + + this._generateMap(); // place the nodes on the canvas. + + + this._placeNodesByHierarchy(distribution); // condense the whitespace. + + + this._condenseHierarchy(); // shift to center so gravity does not have to do much + + + this._shiftToCenter(); + } + } + } + /** + * @private + */ + + }, { + key: "_condenseHierarchy", + value: function _condenseHierarchy() { + var _this3 = this; + + // Global var in this scope to define when the movement has stopped. + var stillShifting = false; + var branches = {}; // first we have some methods to help shifting trees around. + // the main method to shift the trees + + var shiftTrees = function shiftTrees() { + var treeSizes = getTreeSizes(); + var shiftBy = 0; + + for (var i = 0; i < treeSizes.length - 1; i++) { + var diff = treeSizes[i].max - treeSizes[i + 1].min; + shiftBy += diff + _this3.options.hierarchical.treeSpacing; + shiftTree(i + 1, shiftBy); + } + }; // shift a single tree by an offset + + + var shiftTree = function shiftTree(index, offset) { + var trees = _this3.hierarchical.trees; + + for (var nodeId in trees) { + if (trees.hasOwnProperty(nodeId)) { + if (trees[nodeId] === index) { + _this3.direction.shift(nodeId, offset); + } + } + } + }; // get the width of all trees + + + var getTreeSizes = function getTreeSizes() { + var treeWidths = []; + + for (var i = 0; i < _this3.hierarchical.numTrees(); i++) { + treeWidths.push(_this3.direction.getTreeSize(i)); + } + + return treeWidths; + }; // get a map of all nodes in this branch + + + var getBranchNodes = function getBranchNodes(source, map) { + if (map[source.id]) { + return; + } + + map[source.id] = true; + + if (_this3.hierarchical.childrenReference[source.id]) { + var children = _this3.hierarchical.childrenReference[source.id]; + + if (children.length > 0) { + for (var i = 0; i < children.length; i++) { + getBranchNodes(_this3.body.nodes[children[i]], map); + } + } + } + }; // get a min max width as well as the maximum movement space it has on either sides + // we use min max terminology because width and height can interchange depending on the direction of the layout + + + var getBranchBoundary = function getBranchBoundary(branchMap) { + var maxLevel = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1e9; + var minSpace = 1e9; + var maxSpace = 1e9; + var min = 1e9; + var max = -1e9; + + for (var branchNode in branchMap) { + if (branchMap.hasOwnProperty(branchNode)) { + var node = _this3.body.nodes[branchNode]; + var level = _this3.hierarchical.levels[node.id]; + + var position = _this3.direction.getPosition(node); // get the space around the node. + + + var _this3$_getSpaceAroun = _this3._getSpaceAroundNode(node, branchMap), + _this3$_getSpaceAroun2 = slicedToArray(_this3$_getSpaceAroun, 2), + minSpaceNode = _this3$_getSpaceAroun2[0], + maxSpaceNode = _this3$_getSpaceAroun2[1]; + + minSpace = Math.min(minSpaceNode, minSpace); + maxSpace = Math.min(maxSpaceNode, maxSpace); // the width is only relevant for the levels two nodes have in common. This is why we filter on this. + + if (level <= maxLevel) { + min = Math.min(position, min); + max = Math.max(position, max); + } + } + } + + return [min, max, minSpace, maxSpace]; + }; // check what the maximum level is these nodes have in common. + + + var getCollisionLevel = function getCollisionLevel(node1, node2) { + var maxLevel1 = _this3.hierarchical.getMaxLevel(node1.id); + + var maxLevel2 = _this3.hierarchical.getMaxLevel(node2.id); + + return Math.min(maxLevel1, maxLevel2); + }; + /** + * Condense elements. These can be nodes or branches depending on the callback. + * + * @param {function} callback + * @param {Array.} levels + * @param {*} centerParents + */ + + + var shiftElementsCloser = function shiftElementsCloser(callback, levels, centerParents) { + var hier = _this3.hierarchical; + + for (var i = 0; i < levels.length; i++) { + var level = levels[i]; + var levelNodes = hier.distributionOrdering[level]; + + if (levelNodes.length > 1) { + for (var j = 0; j < levelNodes.length - 1; j++) { + var node1 = levelNodes[j]; + var node2 = levelNodes[j + 1]; // NOTE: logic maintained as it was; if nodes have same ancestor, + // then of course they are in the same sub-network. + + if (hier.hasSameParent(node1, node2) && hier.inSameSubNetwork(node1, node2)) { + callback(node1, node2, centerParents); + } + } + } + } + }; // callback for shifting branches + + + var branchShiftCallback = function branchShiftCallback(node1, node2) { + var centerParent = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; + + //window.CALLBACKS.push(() => { + var pos1 = _this3.direction.getPosition(node1); + + var pos2 = _this3.direction.getPosition(node2); + + var diffAbs = Math.abs(pos2 - pos1); + var nodeSpacing = _this3.options.hierarchical.nodeSpacing; //console.log("NOW CHECKING:", node1.id, node2.id, diffAbs); + + if (diffAbs > nodeSpacing) { + var branchNodes1 = {}; + var branchNodes2 = {}; + getBranchNodes(node1, branchNodes1); + getBranchNodes(node2, branchNodes2); // check the largest distance between the branches + + var maxLevel = getCollisionLevel(node1, node2); + var branchNodeBoundary1 = getBranchBoundary(branchNodes1, maxLevel); + var branchNodeBoundary2 = getBranchBoundary(branchNodes2, maxLevel); + var max1 = branchNodeBoundary1[1]; + var min2 = branchNodeBoundary2[0]; + var minSpace2 = branchNodeBoundary2[2]; //console.log(node1.id, getBranchBoundary(branchNodes1, maxLevel), node2.id, + // getBranchBoundary(branchNodes2, maxLevel), maxLevel); + + var diffBranch = Math.abs(max1 - min2); + + if (diffBranch > nodeSpacing) { + var offset = max1 - min2 + nodeSpacing; + + if (offset < -minSpace2 + nodeSpacing) { + offset = -minSpace2 + nodeSpacing; //console.log("RESETTING OFFSET", max1 - min2 + this.options.hierarchical.nodeSpacing, -minSpace2, offset); + } + + if (offset < 0) { + //console.log("SHIFTING", node2.id, offset); + _this3._shiftBlock(node2.id, offset); + + stillShifting = true; + if (centerParent === true) _this3._centerParent(node2); + } + } + } //this.body.emitter.emit("_redraw");}) + + }; + + var minimizeEdgeLength = function minimizeEdgeLength(iterations, node) { + //window.CALLBACKS.push(() => { + // console.log("ts",node.id); + var nodeId = node.id; + var allEdges = node.edges; + var nodeLevel = _this3.hierarchical.levels[node.id]; // gather constants + + var C2 = _this3.options.hierarchical.levelSeparation * _this3.options.hierarchical.levelSeparation; + var referenceNodes = {}; + var aboveEdges = []; + + for (var i = 0; i < allEdges.length; i++) { + var edge = allEdges[i]; + + if (edge.toId != edge.fromId) { + var otherNode = edge.toId == nodeId ? edge.from : edge.to; + referenceNodes[allEdges[i].id] = otherNode; + + if (_this3.hierarchical.levels[otherNode.id] < nodeLevel) { + aboveEdges.push(edge); + } + } + } // differentiated sum of lengths based on only moving one node over one axis + + + var getFx = function getFx(point, edges) { + var sum = 0; + + for (var _i2 = 0; _i2 < edges.length; _i2++) { + if (referenceNodes[edges[_i2].id] !== undefined) { + var a = _this3.direction.getPosition(referenceNodes[edges[_i2].id]) - point; + sum += a / Math.sqrt(a * a + C2); + } + } + + return sum; + }; // doubly differentiated sum of lengths based on only moving one node over one axis + + + var getDFx = function getDFx(point, edges) { + var sum = 0; + + for (var _i3 = 0; _i3 < edges.length; _i3++) { + if (referenceNodes[edges[_i3].id] !== undefined) { + var a = _this3.direction.getPosition(referenceNodes[edges[_i3].id]) - point; + sum -= C2 * Math.pow(a * a + C2, -1.5); + } + } + + return sum; + }; + + var getGuess = function getGuess(iterations, edges) { + var guess = _this3.direction.getPosition(node); // Newton's method for optimization + + + var guessMap = {}; + + for (var _i4 = 0; _i4 < iterations; _i4++) { + var fx = getFx(guess, edges); + var dfx = getDFx(guess, edges); // we limit the movement to avoid instability. + + var limit = 40; + var ratio = Math.max(-limit, Math.min(limit, Math.round(fx / dfx))); + guess = guess - ratio; // reduce duplicates + + if (guessMap[guess] !== undefined) { + break; + } + + guessMap[guess] = _i4; + } + + return guess; + }; + + var moveBranch = function moveBranch(guess) { + // position node if there is space + var nodePosition = _this3.direction.getPosition(node); // check movable area of the branch + + + if (branches[node.id] === undefined) { + var branchNodes = {}; + getBranchNodes(node, branchNodes); + branches[node.id] = branchNodes; + } + + var branchBoundary = getBranchBoundary(branches[node.id]); + var minSpaceBranch = branchBoundary[2]; + var maxSpaceBranch = branchBoundary[3]; + var diff = guess - nodePosition; // check if we are allowed to move the node: + + var branchOffset = 0; + + if (diff > 0) { + branchOffset = Math.min(diff, maxSpaceBranch - _this3.options.hierarchical.nodeSpacing); + } else if (diff < 0) { + branchOffset = -Math.min(-diff, minSpaceBranch - _this3.options.hierarchical.nodeSpacing); + } + + if (branchOffset != 0) { + //console.log("moving branch:",branchOffset, maxSpaceBranch, minSpaceBranch) + _this3._shiftBlock(node.id, branchOffset); //this.body.emitter.emit("_redraw"); + + + stillShifting = true; + } + }; + + var moveNode = function moveNode(guess) { + var nodePosition = _this3.direction.getPosition(node); // position node if there is space + + + var _this3$_getSpaceAroun3 = _this3._getSpaceAroundNode(node), + _this3$_getSpaceAroun4 = slicedToArray(_this3$_getSpaceAroun3, 2), + minSpace = _this3$_getSpaceAroun4[0], + maxSpace = _this3$_getSpaceAroun4[1]; + + var diff = guess - nodePosition; // check if we are allowed to move the node: + + var newPosition = nodePosition; + + if (diff > 0) { + newPosition = Math.min(nodePosition + (maxSpace - _this3.options.hierarchical.nodeSpacing), guess); + } else if (diff < 0) { + newPosition = Math.max(nodePosition - (minSpace - _this3.options.hierarchical.nodeSpacing), guess); + } + + if (newPosition !== nodePosition) { + //console.log("moving Node:",diff, minSpace, maxSpace); + _this3.direction.setPosition(node, newPosition); //this.body.emitter.emit("_redraw"); + + + stillShifting = true; + } + }; + + var guess = getGuess(iterations, aboveEdges); + moveBranch(guess); + guess = getGuess(iterations, allEdges); + moveNode(guess); //}) + }; // method to remove whitespace between branches. Because we do bottom up, we can center the parents. + + + var minimizeEdgeLengthBottomUp = function minimizeEdgeLengthBottomUp(iterations) { + var levels = _this3.hierarchical.getLevels(); + + levels = levels.reverse(); + + for (var i = 0; i < iterations; i++) { + stillShifting = false; + + for (var j = 0; j < levels.length; j++) { + var level = levels[j]; + var levelNodes = _this3.hierarchical.distributionOrdering[level]; + + for (var k = 0; k < levelNodes.length; k++) { + minimizeEdgeLength(1000, levelNodes[k]); + } + } + + if (stillShifting !== true) { + //console.log("FINISHED minimizeEdgeLengthBottomUp IN " + i); + break; + } + } + }; // method to remove whitespace between branches. Because we do bottom up, we can center the parents. + + + var shiftBranchesCloserBottomUp = function shiftBranchesCloserBottomUp(iterations) { + var levels = _this3.hierarchical.getLevels(); + + levels = levels.reverse(); + + for (var i = 0; i < iterations; i++) { + stillShifting = false; + shiftElementsCloser(branchShiftCallback, levels, true); + + if (stillShifting !== true) { + //console.log("FINISHED shiftBranchesCloserBottomUp IN " + (i+1)); + break; + } + } + }; // center all parents + + + var centerAllParents = function centerAllParents() { + for (var nodeId in _this3.body.nodes) { + if (_this3.body.nodes.hasOwnProperty(nodeId)) _this3._centerParent(_this3.body.nodes[nodeId]); + } + }; // center all parents + + + var centerAllParentsBottomUp = function centerAllParentsBottomUp() { + var levels = _this3.hierarchical.getLevels(); + + levels = levels.reverse(); + + for (var i = 0; i < levels.length; i++) { + var level = levels[i]; + var levelNodes = _this3.hierarchical.distributionOrdering[level]; + + for (var j = 0; j < levelNodes.length; j++) { + _this3._centerParent(levelNodes[j]); + } + } + }; // the actual work is done here. + + + if (this.options.hierarchical.blockShifting === true) { + shiftBranchesCloserBottomUp(5); + centerAllParents(); + } // minimize edge length + + + if (this.options.hierarchical.edgeMinimization === true) { + minimizeEdgeLengthBottomUp(20); + } + + if (this.options.hierarchical.parentCentralization === true) { + centerAllParentsBottomUp(); + } + + shiftTrees(); + } + /** + * This gives the space around the node. IF a map is supplied, it will only check against nodes NOT in the map. + * This is used to only get the distances to nodes outside of a branch. + * @param {Node} node + * @param {{Node.id: vis.Node}} map + * @returns {number[]} + * @private + */ + + }, { + key: "_getSpaceAroundNode", + value: function _getSpaceAroundNode(node, map) { + var useMap = true; + + if (map === undefined) { + useMap = false; + } + + var level = this.hierarchical.levels[node.id]; + + if (level !== undefined) { + var index = this.hierarchical.distributionIndex[node.id]; + var position = this.direction.getPosition(node); + var ordering = this.hierarchical.distributionOrdering[level]; + var minSpace = 1e9; + var maxSpace = 1e9; + + if (index !== 0) { + var prevNode = ordering[index - 1]; + + if (useMap === true && map[prevNode.id] === undefined || useMap === false) { + var prevPos = this.direction.getPosition(prevNode); + minSpace = position - prevPos; + } + } + + if (index != ordering.length - 1) { + var nextNode = ordering[index + 1]; + + if (useMap === true && map[nextNode.id] === undefined || useMap === false) { + var nextPos = this.direction.getPosition(nextNode); + maxSpace = Math.min(maxSpace, nextPos - position); + } + } + + return [minSpace, maxSpace]; + } else { + return [0, 0]; + } + } + /** + * We use this method to center a parent node and check if it does not cross other nodes when it does. + * @param {Node} node + * @private + */ + + }, { + key: "_centerParent", + value: function _centerParent(node) { + if (this.hierarchical.parentReference[node.id]) { + var parents = this.hierarchical.parentReference[node.id]; + + for (var i = 0; i < parents.length; i++) { + var parentId = parents[i]; + var parentNode = this.body.nodes[parentId]; + var children = this.hierarchical.childrenReference[parentId]; + + if (children !== undefined) { + // get the range of the children + var newPosition = this._getCenterPosition(children); + + var position = this.direction.getPosition(parentNode); + + var _this$_getSpaceAround = this._getSpaceAroundNode(parentNode), + _this$_getSpaceAround2 = slicedToArray(_this$_getSpaceAround, 2), + minSpace = _this$_getSpaceAround2[0], + maxSpace = _this$_getSpaceAround2[1]; + + var diff = position - newPosition; + + if (diff < 0 && Math.abs(diff) < maxSpace - this.options.hierarchical.nodeSpacing || diff > 0 && Math.abs(diff) < minSpace - this.options.hierarchical.nodeSpacing) { + this.direction.setPosition(parentNode, newPosition); + } + } + } + } + } + /** + * This function places the nodes on the canvas based on the hierarchial distribution. + * + * @param {Object} distribution | obtained by the function this._getDistribution() + * @private + */ + + }, { + key: "_placeNodesByHierarchy", + value: function _placeNodesByHierarchy(distribution) { + this.positionedNodes = {}; // start placing all the level 0 nodes first. Then recursively position their branches. + + for (var level in distribution) { + if (distribution.hasOwnProperty(level)) { + // sort nodes in level by position: + var nodeArray = Object.keys(distribution[level]); + nodeArray = this._indexArrayToNodes(nodeArray); + this.direction.sort(nodeArray); + var handledNodeCount = 0; + + for (var i = 0; i < nodeArray.length; i++) { + var node = nodeArray[i]; + + if (this.positionedNodes[node.id] === undefined) { + var spacing = this.options.hierarchical.nodeSpacing; + var pos = spacing * handledNodeCount; // We get the X or Y values we need and store them in pos and previousPos. + // The get and set make sure we get X or Y + + if (handledNodeCount > 0) { + pos = this.direction.getPosition(nodeArray[i - 1]) + spacing; + } + + this.direction.setPosition(node, pos, level); + + this._validatePositionAndContinue(node, level, pos); + + handledNodeCount++; + } + } + } + } + } + /** + * This is a recursively called function to enumerate the branches from the largest hubs and place the nodes + * on a X position that ensures there will be no overlap. + * + * @param {Node.id} parentId + * @param {number} parentLevel + * @private + */ + + }, { + key: "_placeBranchNodes", + value: function _placeBranchNodes(parentId, parentLevel) { + var childRef = this.hierarchical.childrenReference[parentId]; // if this is not a parent, cancel the placing. This can happen with multiple parents to one child. + + if (childRef === undefined) { + return; + } // get a list of childNodes + + + var childNodes = []; + + for (var i = 0; i < childRef.length; i++) { + childNodes.push(this.body.nodes[childRef[i]]); + } // use the positions to order the nodes. + + + this.direction.sort(childNodes); // position the childNodes + + for (var _i5 = 0; _i5 < childNodes.length; _i5++) { + var childNode = childNodes[_i5]; + var childNodeLevel = this.hierarchical.levels[childNode.id]; // check if the child node is below the parent node and if it has already been positioned. + + if (childNodeLevel > parentLevel && this.positionedNodes[childNode.id] === undefined) { + // get the amount of space required for this node. If parent the width is based on the amount of children. + var spacing = this.options.hierarchical.nodeSpacing; + var pos = void 0; // we get the X or Y values we need and store them in pos and previousPos. + // The get and set make sure we get X or Y + + if (_i5 === 0) { + pos = this.direction.getPosition(this.body.nodes[parentId]); + } else { + pos = this.direction.getPosition(childNodes[_i5 - 1]) + spacing; + } + + this.direction.setPosition(childNode, pos, childNodeLevel); + + this._validatePositionAndContinue(childNode, childNodeLevel, pos); + } else { + return; + } + } // center the parent nodes. + + + var center = this._getCenterPosition(childNodes); + + this.direction.setPosition(this.body.nodes[parentId], center, parentLevel); + } + /** + * This method checks for overlap and if required shifts the branch. It also keeps records of positioned nodes. + * Finally it will call _placeBranchNodes to place the branch nodes. + * @param {Node} node + * @param {number} level + * @param {number} pos + * @private + */ + + }, { + key: "_validatePositionAndContinue", + value: function _validatePositionAndContinue(node, level, pos) { + // This method only works for formal trees and formal forests + // Early exit if this is not the case + if (!this.hierarchical.isTree) return; // if overlap has been detected, we shift the branch + + if (this.lastNodeOnLevel[level] !== undefined) { + var previousPos = this.direction.getPosition(this.body.nodes[this.lastNodeOnLevel[level]]); + + if (pos - previousPos < this.options.hierarchical.nodeSpacing) { + var diff = previousPos + this.options.hierarchical.nodeSpacing - pos; + + var sharedParent = this._findCommonParent(this.lastNodeOnLevel[level], node.id); + + this._shiftBlock(sharedParent.withChild, diff); + } + } + + this.lastNodeOnLevel[level] = node.id; // store change in position. + + this.positionedNodes[node.id] = true; + + this._placeBranchNodes(node.id, level); + } + /** + * Receives an array with node indices and returns an array with the actual node references. + * Used for sorting based on node properties. + * @param {Array.} idArray + * @returns {Array.} + */ + + }, { + key: "_indexArrayToNodes", + value: function _indexArrayToNodes(idArray) { + var array = []; + + for (var i = 0; i < idArray.length; i++) { + array.push(this.body.nodes[idArray[i]]); + } + + return array; + } + /** + * This function get the distribution of levels based on hubsize + * + * @returns {Object} + * @private + */ + + }, { + key: "_getDistribution", + value: function _getDistribution() { + var distribution = {}; + var nodeId, node; // we fix Y because the hierarchy is vertical, + // we fix X so we do not give a node an x position for a second time. + // the fix of X is removed after the x value has been set. + + for (nodeId in this.body.nodes) { + if (this.body.nodes.hasOwnProperty(nodeId)) { + node = this.body.nodes[nodeId]; + var level = this.hierarchical.levels[nodeId] === undefined ? 0 : this.hierarchical.levels[nodeId]; + this.direction.fix(node, level); + + if (distribution[level] === undefined) { + distribution[level] = {}; + } + + distribution[level][nodeId] = node; + } + } + + return distribution; + } + /** + * Return the active (i.e. visible) edges for this node + * + * @param {Node} node + * @returns {Array.} Array of edge instances + * @private + */ + + }, { + key: "_getActiveEdges", + value: function _getActiveEdges(node) { + var _this4 = this; + + var result = []; + util.forEach(node.edges, function (edge) { + if (_this4.body.edgeIndices.indexOf(edge.id) !== -1) { + result.push(edge); + } + }); + return result; + } + /** + * Get the hubsizes for all active nodes. + * + * @returns {number} + * @private + */ + + }, { + key: "_getHubSizes", + value: function _getHubSizes() { + var _this5 = this; + + var hubSizes = {}; + var nodeIds = this.body.nodeIndices; + util.forEach(nodeIds, function (nodeId) { + var node = _this5.body.nodes[nodeId]; + + var hubSize = _this5._getActiveEdges(node).length; + + hubSizes[hubSize] = true; + }); // Make an array of the size sorted descending + + var result = []; + util.forEach(hubSizes, function (size) { + result.push(Number(size)); + }); + timsort$1.sort(result, function (a, b) { + return b - a; + }); + return result; + } + /** + * this function allocates nodes in levels based on the recursive branching from the largest hubs. + * + * @private + */ + + }, { + key: "_determineLevelsByHubsize", + value: function _determineLevelsByHubsize() { + var _this6 = this; + + var levelDownstream = function levelDownstream(nodeA, nodeB) { + _this6.hierarchical.levelDownstream(nodeA, nodeB); + }; + + var hubSizes = this._getHubSizes(); + + var _loop = function _loop(i) { + var hubSize = hubSizes[i]; + if (hubSize === 0) return "break"; + util.forEach(_this6.body.nodeIndices, function (nodeId) { + var node = _this6.body.nodes[nodeId]; + + if (hubSize === _this6._getActiveEdges(node).length) { + _this6._crawlNetwork(levelDownstream, nodeId); + } + }); + }; + + for (var i = 0; i < hubSizes.length; ++i) { + var _ret = _loop(i); + + if (_ret === "break") break; + } + } + /** + * TODO: release feature + * TODO: Determine if this feature is needed at all + * + * @private + */ + + }, { + key: "_determineLevelsCustomCallback", + value: function _determineLevelsCustomCallback() { + var _this7 = this; + + var minLevel = 100000; // TODO: this should come from options. + + var customCallback = function customCallback(nodeA, nodeB, edge) {// eslint-disable-line no-unused-vars + }; // TODO: perhaps move to HierarchicalStatus. + // But I currently don't see the point, this method is not used. + + + var levelByDirection = function levelByDirection(nodeA, nodeB, edge) { + var levelA = _this7.hierarchical.levels[nodeA.id]; // set initial level + + if (levelA === undefined) { + levelA = _this7.hierarchical.levels[nodeA.id] = minLevel; + } + + var diff = customCallback(NetworkUtil.cloneOptions(nodeA, 'node'), NetworkUtil.cloneOptions(nodeB, 'node'), NetworkUtil.cloneOptions(edge, 'edge')); + _this7.hierarchical.levels[nodeB.id] = levelA + diff; + }; + + this._crawlNetwork(levelByDirection); + + this.hierarchical.setMinLevelToZero(this.body.nodes); + } + /** + * Allocate nodes in levels based on the direction of the edges. + * + * @private + */ + + }, { + key: "_determineLevelsDirected", + value: function _determineLevelsDirected() { + var _this8 = this; + + var minLevel = 10000; + /** + * Check if there is an edge going the opposite direction for given edge + * + * @param {Edge} edge edge to check + * @returns {boolean} true if there's another edge going into the opposite direction + */ + + var isBidirectional = function isBidirectional(edge) { + util.forEach(_this8.body.edges, function (otherEdge) { + if (otherEdge.toId === edge.fromId && otherEdge.fromId === edge.toId) { + return true; + } + }); + return false; + }; + + var levelByDirection = function levelByDirection(nodeA, nodeB, edge) { + var levelA = _this8.hierarchical.levels[nodeA.id]; + var levelB = _this8.hierarchical.levels[nodeB.id]; + + if (isBidirectional(edge) ) ; // set initial level + + + if (levelA === undefined) { + levelA = _this8.hierarchical.levels[nodeA.id] = minLevel; + } + + if (edge.toId == nodeB.id) { + _this8.hierarchical.levels[nodeB.id] = levelA + 1; + } else { + _this8.hierarchical.levels[nodeB.id] = levelA - 1; + } + }; + + this._crawlNetwork(levelByDirection); + + this.hierarchical.setMinLevelToZero(this.body.nodes); + } + /** + * Update the bookkeeping of parent and child. + * @private + */ + + }, { + key: "_generateMap", + value: function _generateMap() { + var _this9 = this; + + var fillInRelations = function fillInRelations(parentNode, childNode) { + if (_this9.hierarchical.levels[childNode.id] > _this9.hierarchical.levels[parentNode.id]) { + _this9.hierarchical.addRelation(parentNode.id, childNode.id); + } + }; + + this._crawlNetwork(fillInRelations); + + this.hierarchical.checkIfTree(); + } + /** + * Crawl over the entire network and use a callback on each node couple that is connected to each other. + * @param {function} [callback=function(){}] | will receive nodeA, nodeB and the connecting edge. A and B are distinct. + * @param {Node.id} startingNodeId + * @private + */ + + }, { + key: "_crawlNetwork", + value: function _crawlNetwork() { + var _this10 = this; + + var callback = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : function () {}; + var startingNodeId = arguments.length > 1 ? arguments[1] : undefined; + var progress = {}; + + var crawler = function crawler(node, tree) { + if (progress[node.id] === undefined) { + _this10.hierarchical.setTreeIndex(node, tree); + + progress[node.id] = true; + var childNode; + + var edges = _this10._getActiveEdges(node); + + for (var i = 0; i < edges.length; i++) { + var edge = edges[i]; + + if (edge.connected === true) { + if (edge.toId == node.id) { + // Not '===' because id's can be string and numeric + childNode = edge.from; + } else { + childNode = edge.to; + } + + if (node.id != childNode.id) { + // Not '!==' because id's can be string and numeric + callback(node, childNode, edge); + crawler(childNode, tree); + } + } + } + } + }; + + if (startingNodeId === undefined) { + // Crawl over all nodes + var treeIndex = 0; // Serves to pass a unique id for the current distinct tree + + for (var i = 0; i < this.body.nodeIndices.length; i++) { + var nodeId = this.body.nodeIndices[i]; + + if (progress[nodeId] === undefined) { + var node = this.body.nodes[nodeId]; + crawler(node, treeIndex); + treeIndex += 1; + } + } + } else { + // Crawl from the given starting node + var _node2 = this.body.nodes[startingNodeId]; + + if (_node2 === undefined) { + console.error("Node not found:", startingNodeId); + return; + } + + crawler(_node2); + } + } + /** + * Shift a branch a certain distance + * @param {Node.id} parentId + * @param {number} diff + * @private + */ + + }, { + key: "_shiftBlock", + value: function _shiftBlock(parentId, diff) { + var _this11 = this; + + var progress = {}; + + var shifter = function shifter(parentId) { + if (progress[parentId]) { + return; + } + + progress[parentId] = true; + + _this11.direction.shift(parentId, diff); + + var childRef = _this11.hierarchical.childrenReference[parentId]; + + if (childRef !== undefined) { + for (var i = 0; i < childRef.length; i++) { + shifter(childRef[i]); + } + } + }; + + shifter(parentId); + } + /** + * Find a common parent between branches. + * @param {Node.id} childA + * @param {Node.id} childB + * @returns {{foundParent, withChild}} + * @private + */ + + }, { + key: "_findCommonParent", + value: function _findCommonParent(childA, childB) { + var _this12 = this; + + var parents = {}; + + var iterateParents = function iterateParents(parents, child) { + var parentRef = _this12.hierarchical.parentReference[child]; + + if (parentRef !== undefined) { + for (var i = 0; i < parentRef.length; i++) { + var parent = parentRef[i]; + parents[parent] = true; + iterateParents(parents, parent); + } + } + }; + + var findParent = function findParent(parents, child) { + var parentRef = _this12.hierarchical.parentReference[child]; + + if (parentRef !== undefined) { + for (var i = 0; i < parentRef.length; i++) { + var parent = parentRef[i]; + + if (parents[parent] !== undefined) { + return { + foundParent: parent, + withChild: child + }; + } + + var branch = findParent(parents, parent); + + if (branch.foundParent !== null) { + return branch; + } + } + } + + return { + foundParent: null, + withChild: child + }; + }; + + iterateParents(parents, childA); + return findParent(parents, childB); + } + /** + * Set the strategy pattern for handling the coordinates given the current direction. + * + * The individual instances contain all the operations and data specific to a layout direction. + * + * @param {Node} node + * @param {{x: number, y: number}} position + * @param {number} level + * @param {boolean} [doNotUpdate=false] + * @private + */ + + }, { + key: "setDirectionStrategy", + value: function setDirectionStrategy() { + var isVertical = this.options.hierarchical.direction === 'UD' || this.options.hierarchical.direction === 'DU'; + + if (isVertical) { + this.direction = new VerticalStrategy(this); + } else { + this.direction = new HorizontalStrategy(this); + } + } + /** + * Determine the center position of a branch from the passed list of child nodes + * + * This takes into account the positions of all the child nodes. + * @param {Array.} childNodes Array of either child nodes or node id's + * @return {number} + * @private + */ + + }, { + key: "_getCenterPosition", + value: function _getCenterPosition(childNodes) { + var minPos = 1e9; + var maxPos = -1e9; + + for (var i = 0; i < childNodes.length; i++) { + var childNode = void 0; + + if (childNodes[i].id !== undefined) { + childNode = childNodes[i]; + } else { + var childNodeId = childNodes[i]; + childNode = this.body.nodes[childNodeId]; + } + + var position = this.direction.getPosition(childNode); + minPos = Math.min(minPos, position); + maxPos = Math.max(maxPos, position); + } + + return 0.5 * (minPos + maxPos); + } + }]); + + return LayoutEngine; +}(); + +/** + * Clears the toolbar div element of children + * + * @private + */ + +var ManipulationSystem = +/*#__PURE__*/ +function () { + /** + * @param {Object} body + * @param {Canvas} canvas + * @param {SelectionHandler} selectionHandler + */ + function ManipulationSystem(body, canvas, selectionHandler) { + var _this = this; + + classCallCheck$1(this, ManipulationSystem); + + this.body = body; + this.canvas = canvas; + this.selectionHandler = selectionHandler; + this.editMode = false; + this.manipulationDiv = undefined; + this.editModeDiv = undefined; + this.closeDiv = undefined; + this.manipulationHammers = []; + this.temporaryUIFunctions = {}; + this.temporaryEventFunctions = []; + this.touchTime = 0; + this.temporaryIds = { + nodes: [], + edges: [] + }; + this.guiEnabled = false; + this.inMode = false; + this.selectedControlNode = undefined; + this.options = {}; + this.defaultOptions = { + enabled: false, + initiallyActive: false, + addNode: true, + addEdge: true, + editNode: undefined, + editEdge: true, + deleteNode: true, + deleteEdge: true, + controlNodeStyle: { + shape: 'dot', + size: 6, + color: { + background: '#ff0000', + border: '#3c3c3c', + highlight: { + background: '#07f968', + border: '#3c3c3c' + } + }, + borderWidth: 2, + borderWidthSelected: 2 + } + }; + util.extend(this.options, this.defaultOptions); + this.body.emitter.on('destroy', function () { + _this._clean(); + }); + this.body.emitter.on('_dataChanged', this._restore.bind(this)); + this.body.emitter.on('_resetData', this._restore.bind(this)); + } + /** + * If something changes in the data during editing, switch back to the initial datamanipulation state and close all edit modes. + * @private + */ + + + createClass$1(ManipulationSystem, [{ + key: "_restore", + value: function _restore() { + if (this.inMode !== false) { + if (this.options.initiallyActive === true) { + this.enableEditMode(); + } else { + this.disableEditMode(); + } + } + } + /** + * Set the Options + * + * @param {Object} options + * @param {Object} allOptions + * @param {Object} globalOptions + */ + + }, { + key: "setOptions", + value: function setOptions(options, allOptions, globalOptions) { + if (allOptions !== undefined) { + if (allOptions.locale !== undefined) { + this.options.locale = allOptions.locale; + } else { + this.options.locale = globalOptions.locale; + } + + if (allOptions.locales !== undefined) { + this.options.locales = allOptions.locales; + } else { + this.options.locales = globalOptions.locales; + } + } + + if (options !== undefined) { + if (typeof options === 'boolean') { + this.options.enabled = options; + } else { + this.options.enabled = true; + util.deepExtend(this.options, options); + } + + if (this.options.initiallyActive === true) { + this.editMode = true; + } + + this._setup(); + } + } + /** + * Enable or disable edit-mode. Draws the DOM required and cleans up after itself. + * + * @private + */ + + }, { + key: "toggleEditMode", + value: function toggleEditMode() { + if (this.editMode === true) { + this.disableEditMode(); + } else { + this.enableEditMode(); + } + } + /** + * Enables Edit Mode + */ + + }, { + key: "enableEditMode", + value: function enableEditMode() { + this.editMode = true; + + this._clean(); + + if (this.guiEnabled === true) { + this.manipulationDiv.style.display = 'block'; + this.closeDiv.style.display = 'block'; + this.editModeDiv.style.display = 'none'; + this.showManipulatorToolbar(); + } + } + /** + * Disables Edit Mode + */ + + }, { + key: "disableEditMode", + value: function disableEditMode() { + this.editMode = false; + + this._clean(); + + if (this.guiEnabled === true) { + this.manipulationDiv.style.display = 'none'; + this.closeDiv.style.display = 'none'; + this.editModeDiv.style.display = 'block'; + + this._createEditButton(); + } + } + /** + * Creates the main toolbar. Removes functions bound to the select event. Binds all the buttons of the toolbar. + * + * @private + */ + + }, { + key: "showManipulatorToolbar", + value: function showManipulatorToolbar() { + // restore the state of any bound functions or events, remove control nodes, restore physics + this._clean(); // reset global variables + + + this.manipulationDOM = {}; // if the gui is enabled, draw all elements. + + if (this.guiEnabled === true) { + // a _restore will hide these menus + this.editMode = true; + this.manipulationDiv.style.display = 'block'; + this.closeDiv.style.display = 'block'; + + var selectedNodeCount = this.selectionHandler._getSelectedNodeCount(); + + var selectedEdgeCount = this.selectionHandler._getSelectedEdgeCount(); + + var selectedTotalCount = selectedNodeCount + selectedEdgeCount; + var locale = this.options.locales[this.options.locale]; + var needSeperator = false; + + if (this.options.addNode !== false) { + this._createAddNodeButton(locale); + + needSeperator = true; + } + + if (this.options.addEdge !== false) { + if (needSeperator === true) { + this._createSeperator(1); + } else { + needSeperator = true; + } + + this._createAddEdgeButton(locale); + } + + if (selectedNodeCount === 1 && typeof this.options.editNode === 'function') { + if (needSeperator === true) { + this._createSeperator(2); + } else { + needSeperator = true; + } + + this._createEditNodeButton(locale); + } else if (selectedEdgeCount === 1 && selectedNodeCount === 0 && this.options.editEdge !== false) { + if (needSeperator === true) { + this._createSeperator(3); + } else { + needSeperator = true; + } + + this._createEditEdgeButton(locale); + } // remove buttons + + + if (selectedTotalCount !== 0) { + if (selectedNodeCount > 0 && this.options.deleteNode !== false) { + if (needSeperator === true) { + this._createSeperator(4); + } + + this._createDeleteButton(locale); + } else if (selectedNodeCount === 0 && this.options.deleteEdge !== false) { + if (needSeperator === true) { + this._createSeperator(4); + } + + this._createDeleteButton(locale); + } + } // bind the close button + + + this._bindHammerToDiv(this.closeDiv, this.toggleEditMode.bind(this)); // refresh this bar based on what has been selected + + + this._temporaryBindEvent('select', this.showManipulatorToolbar.bind(this)); + } // redraw to show any possible changes + + + this.body.emitter.emit('_redraw'); + } + /** + * Create the toolbar for adding Nodes + */ + + }, { + key: "addNodeMode", + value: function addNodeMode() { + // when using the gui, enable edit mode if it wasnt already. + if (this.editMode !== true) { + this.enableEditMode(); + } // restore the state of any bound functions or events, remove control nodes, restore physics + + + this._clean(); + + this.inMode = 'addNode'; + + if (this.guiEnabled === true) { + var locale = this.options.locales[this.options.locale]; + this.manipulationDOM = {}; + + this._createBackButton(locale); + + this._createSeperator(); + + this._createDescription(locale['addDescription'] || this.options.locales['en']['addDescription']); // bind the close button + + + this._bindHammerToDiv(this.closeDiv, this.toggleEditMode.bind(this)); + } + + this._temporaryBindEvent('click', this._performAddNode.bind(this)); + } + /** + * call the bound function to handle the editing of the node. The node has to be selected. + */ + + }, { + key: "editNode", + value: function editNode() { + var _this2 = this; + + // when using the gui, enable edit mode if it wasnt already. + if (this.editMode !== true) { + this.enableEditMode(); + } // restore the state of any bound functions or events, remove control nodes, restore physics + + + this._clean(); + + var node = this.selectionHandler._getSelectedNode(); + + if (node !== undefined) { + this.inMode = 'editNode'; + + if (typeof this.options.editNode === 'function') { + if (node.isCluster !== true) { + var data = util.deepExtend({}, node.options, false); + data.x = node.x; + data.y = node.y; + + if (this.options.editNode.length === 2) { + this.options.editNode(data, function (finalizedData) { + if (finalizedData !== null && finalizedData !== undefined && _this2.inMode === 'editNode') { + // if for whatever reason the mode has changes (due to dataset change) disregard the callback) { + _this2.body.data.nodes.getDataSet().update(finalizedData); + } + + _this2.showManipulatorToolbar(); + }); + } else { + throw new Error('The function for edit does not support two arguments (data, callback)'); + } + } else { + alert(this.options.locales[this.options.locale]['editClusterError'] || this.options.locales['en']['editClusterError']); + } + } else { + throw new Error('No function has been configured to handle the editing of nodes.'); + } + } else { + this.showManipulatorToolbar(); + } + } + /** + * create the toolbar to connect nodes + */ + + }, { + key: "addEdgeMode", + value: function addEdgeMode() { + // when using the gui, enable edit mode if it wasnt already. + if (this.editMode !== true) { + this.enableEditMode(); + } // restore the state of any bound functions or events, remove control nodes, restore physics + + + this._clean(); + + this.inMode = 'addEdge'; + + if (this.guiEnabled === true) { + var locale = this.options.locales[this.options.locale]; + this.manipulationDOM = {}; + + this._createBackButton(locale); + + this._createSeperator(); + + this._createDescription(locale['edgeDescription'] || this.options.locales['en']['edgeDescription']); // bind the close button + + + this._bindHammerToDiv(this.closeDiv, this.toggleEditMode.bind(this)); + } // temporarily overload functions + + + this._temporaryBindUI('onTouch', this._handleConnect.bind(this)); + + this._temporaryBindUI('onDragEnd', this._finishConnect.bind(this)); + + this._temporaryBindUI('onDrag', this._dragControlNode.bind(this)); + + this._temporaryBindUI('onRelease', this._finishConnect.bind(this)); + + this._temporaryBindUI('onDragStart', this._dragStartEdge.bind(this)); + + this._temporaryBindUI('onHold', function () {}); + } + /** + * create the toolbar to edit edges + */ + + }, { + key: "editEdgeMode", + value: function editEdgeMode() { + // when using the gui, enable edit mode if it wasn't already. + if (this.editMode !== true) { + this.enableEditMode(); + } // restore the state of any bound functions or events, remove control nodes, restore physics + + + this._clean(); + + this.inMode = 'editEdge'; + + if (_typeof_1$1(this.options.editEdge) === 'object' && typeof this.options.editEdge.editWithoutDrag === "function") { + this.edgeBeingEditedId = this.selectionHandler.getSelectedEdges()[0]; + + if (this.edgeBeingEditedId !== undefined) { + var edge = this.body.edges[this.edgeBeingEditedId]; + + this._performEditEdge(edge.from, edge.to); + + return; + } + } + + if (this.guiEnabled === true) { + var locale = this.options.locales[this.options.locale]; + this.manipulationDOM = {}; + + this._createBackButton(locale); + + this._createSeperator(); + + this._createDescription(locale['editEdgeDescription'] || this.options.locales['en']['editEdgeDescription']); // bind the close button + + + this._bindHammerToDiv(this.closeDiv, this.toggleEditMode.bind(this)); + } + + this.edgeBeingEditedId = this.selectionHandler.getSelectedEdges()[0]; + + if (this.edgeBeingEditedId !== undefined) { + var _edge = this.body.edges[this.edgeBeingEditedId]; // create control nodes + + var controlNodeFrom = this._getNewTargetNode(_edge.from.x, _edge.from.y); + + var controlNodeTo = this._getNewTargetNode(_edge.to.x, _edge.to.y); + + this.temporaryIds.nodes.push(controlNodeFrom.id); + this.temporaryIds.nodes.push(controlNodeTo.id); + this.body.nodes[controlNodeFrom.id] = controlNodeFrom; + this.body.nodeIndices.push(controlNodeFrom.id); + this.body.nodes[controlNodeTo.id] = controlNodeTo; + this.body.nodeIndices.push(controlNodeTo.id); // temporarily overload UI functions, cleaned up automatically because of _temporaryBindUI + + this._temporaryBindUI('onTouch', this._controlNodeTouch.bind(this)); // used to get the position + + + this._temporaryBindUI('onTap', function () {}); // disabled + + + this._temporaryBindUI('onHold', function () {}); // disabled + + + this._temporaryBindUI('onDragStart', this._controlNodeDragStart.bind(this)); // used to select control node + + + this._temporaryBindUI('onDrag', this._controlNodeDrag.bind(this)); // used to drag control node + + + this._temporaryBindUI('onDragEnd', this._controlNodeDragEnd.bind(this)); // used to connect or revert control nodes + + + this._temporaryBindUI('onMouseMove', function () {}); // disabled + // create function to position control nodes correctly on movement + // automatically cleaned up because we use the temporary bind + + + this._temporaryBindEvent('beforeDrawing', function (ctx) { + var positions = _edge.edgeType.findBorderPositions(ctx); + + if (controlNodeFrom.selected === false) { + controlNodeFrom.x = positions.from.x; + controlNodeFrom.y = positions.from.y; + } + + if (controlNodeTo.selected === false) { + controlNodeTo.x = positions.to.x; + controlNodeTo.y = positions.to.y; + } + }); + + this.body.emitter.emit('_redraw'); + } else { + this.showManipulatorToolbar(); + } + } + /** + * delete everything in the selection + */ + + }, { + key: "deleteSelected", + value: function deleteSelected() { + var _this3 = this; + + // when using the gui, enable edit mode if it wasnt already. + if (this.editMode !== true) { + this.enableEditMode(); + } // restore the state of any bound functions or events, remove control nodes, restore physics + + + this._clean(); + + this.inMode = 'delete'; + var selectedNodes = this.selectionHandler.getSelectedNodes(); + var selectedEdges = this.selectionHandler.getSelectedEdges(); + var deleteFunction = undefined; + + if (selectedNodes.length > 0) { + for (var i = 0; i < selectedNodes.length; i++) { + if (this.body.nodes[selectedNodes[i]].isCluster === true) { + alert(this.options.locales[this.options.locale]['deleteClusterError'] || this.options.locales['en']['deleteClusterError']); + return; + } + } + + if (typeof this.options.deleteNode === 'function') { + deleteFunction = this.options.deleteNode; + } + } else if (selectedEdges.length > 0) { + if (typeof this.options.deleteEdge === 'function') { + deleteFunction = this.options.deleteEdge; + } + } + + if (typeof deleteFunction === 'function') { + var data = { + nodes: selectedNodes, + edges: selectedEdges + }; + + if (deleteFunction.length === 2) { + deleteFunction(data, function (finalizedData) { + if (finalizedData !== null && finalizedData !== undefined && _this3.inMode === 'delete') { + // if for whatever reason the mode has changes (due to dataset change) disregard the callback) { + _this3.body.data.edges.getDataSet().remove(finalizedData.edges); + + _this3.body.data.nodes.getDataSet().remove(finalizedData.nodes); + + _this3.body.emitter.emit('startSimulation'); + + _this3.showManipulatorToolbar(); + } else { + _this3.body.emitter.emit('startSimulation'); + + _this3.showManipulatorToolbar(); + } + }); + } else { + throw new Error('The function for delete does not support two arguments (data, callback)'); + } + } else { + this.body.data.edges.getDataSet().remove(selectedEdges); + this.body.data.nodes.getDataSet().remove(selectedNodes); + this.body.emitter.emit('startSimulation'); + this.showManipulatorToolbar(); + } + } //********************************************** PRIVATE ***************************************// + + /** + * draw or remove the DOM + * @private + */ + + }, { + key: "_setup", + value: function _setup() { + if (this.options.enabled === true) { + // Enable the GUI + this.guiEnabled = true; + + this._createWrappers(); + + if (this.editMode === false) { + this._createEditButton(); + } else { + this.showManipulatorToolbar(); + } + } else { + this._removeManipulationDOM(); // disable the gui + + + this.guiEnabled = false; + } + } + /** + * create the div overlays that contain the DOM + * @private + */ + + }, { + key: "_createWrappers", + value: function _createWrappers() { + // load the manipulator HTML elements. All styling done in css. + if (this.manipulationDiv === undefined) { + this.manipulationDiv = document.createElement('div'); + this.manipulationDiv.className = 'vis-manipulation'; + + if (this.editMode === true) { + this.manipulationDiv.style.display = 'block'; + } else { + this.manipulationDiv.style.display = 'none'; + } + + this.canvas.frame.appendChild(this.manipulationDiv); + } // container for the edit button. + + + if (this.editModeDiv === undefined) { + this.editModeDiv = document.createElement('div'); + this.editModeDiv.className = 'vis-edit-mode'; + + if (this.editMode === true) { + this.editModeDiv.style.display = 'none'; + } else { + this.editModeDiv.style.display = 'block'; + } + + this.canvas.frame.appendChild(this.editModeDiv); + } // container for the close div button + + + if (this.closeDiv === undefined) { + this.closeDiv = document.createElement('div'); + this.closeDiv.className = 'vis-close'; + this.closeDiv.style.display = this.manipulationDiv.style.display; + this.canvas.frame.appendChild(this.closeDiv); + } + } + /** + * generate a new target node. Used for creating new edges and editing edges + * + * @param {number} x + * @param {number} y + * @returns {Node} + * @private + */ + + }, { + key: "_getNewTargetNode", + value: function _getNewTargetNode(x, y) { + var controlNodeStyle = util.deepExtend({}, this.options.controlNodeStyle); + controlNodeStyle.id = 'targetNode' + util.randomUUID(); + controlNodeStyle.hidden = false; + controlNodeStyle.physics = false; + controlNodeStyle.x = x; + controlNodeStyle.y = y; // we have to define the bounding box in order for the nodes to be drawn immediately + + var node = this.body.functions.createNode(controlNodeStyle); + node.shape.boundingBox = { + left: x, + right: x, + top: y, + bottom: y + }; + return node; + } + /** + * Create the edit button + */ + + }, { + key: "_createEditButton", + value: function _createEditButton() { + // restore everything to it's original state (if applicable) + this._clean(); // reset the manipulationDOM + + + this.manipulationDOM = {}; // empty the editModeDiv + + util.recursiveDOMDelete(this.editModeDiv); // create the contents for the editMode button + + var locale = this.options.locales[this.options.locale]; + + var button = this._createButton('editMode', 'vis-button vis-edit vis-edit-mode', locale['edit'] || this.options.locales['en']['edit']); + + this.editModeDiv.appendChild(button); // bind a hammer listener to the button, calling the function toggleEditMode. + + this._bindHammerToDiv(button, this.toggleEditMode.bind(this)); + } + /** + * this function cleans up after everything this module does. Temporary elements, functions and events are removed, physics restored, hammers removed. + * @private + */ + + }, { + key: "_clean", + value: function _clean() { + // not in mode + this.inMode = false; // _clean the divs + + if (this.guiEnabled === true) { + util.recursiveDOMDelete(this.editModeDiv); + util.recursiveDOMDelete(this.manipulationDiv); // removes all the bindings and overloads + + this._cleanManipulatorHammers(); + } // remove temporary nodes and edges + + + this._cleanupTemporaryNodesAndEdges(); // restore overloaded UI functions + + + this._unbindTemporaryUIs(); // remove the temporaryEventFunctions + + + this._unbindTemporaryEvents(); // restore the physics if required + + + this.body.emitter.emit('restorePhysics'); + } + /** + * Each dom element has it's own hammer. They are stored in this.manipulationHammers. This cleans them up. + * @private + */ + + }, { + key: "_cleanManipulatorHammers", + value: function _cleanManipulatorHammers() { + // _clean hammer bindings + if (this.manipulationHammers.length != 0) { + for (var i = 0; i < this.manipulationHammers.length; i++) { + this.manipulationHammers[i].destroy(); + } + + this.manipulationHammers = []; + } + } + /** + * Remove all DOM elements created by this module. + * @private + */ + + }, { + key: "_removeManipulationDOM", + value: function _removeManipulationDOM() { + // removes all the bindings and overloads + this._clean(); // empty the manipulation divs + + + util.recursiveDOMDelete(this.manipulationDiv); + util.recursiveDOMDelete(this.editModeDiv); + util.recursiveDOMDelete(this.closeDiv); // remove the manipulation divs + + if (this.manipulationDiv) { + this.canvas.frame.removeChild(this.manipulationDiv); + } + + if (this.editModeDiv) { + this.canvas.frame.removeChild(this.editModeDiv); + } + + if (this.closeDiv) { + this.canvas.frame.removeChild(this.closeDiv); + } // set the references to undefined + + + this.manipulationDiv = undefined; + this.editModeDiv = undefined; + this.closeDiv = undefined; + } + /** + * create a seperator line. the index is to differentiate in the manipulation dom + * @param {number} [index=1] + * @private + */ + + }, { + key: "_createSeperator", + value: function _createSeperator() { + var index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1; + this.manipulationDOM['seperatorLineDiv' + index] = document.createElement('div'); + this.manipulationDOM['seperatorLineDiv' + index].className = 'vis-separator-line'; + this.manipulationDiv.appendChild(this.manipulationDOM['seperatorLineDiv' + index]); + } // ---------------------- DOM functions for buttons --------------------------// + + /** + * + * @param {Locale} locale + * @private + */ + + }, { + key: "_createAddNodeButton", + value: function _createAddNodeButton(locale) { + var button = this._createButton('addNode', 'vis-button vis-add', locale['addNode'] || this.options.locales['en']['addNode']); + + this.manipulationDiv.appendChild(button); + + this._bindHammerToDiv(button, this.addNodeMode.bind(this)); + } + /** + * + * @param {Locale} locale + * @private + */ + + }, { + key: "_createAddEdgeButton", + value: function _createAddEdgeButton(locale) { + var button = this._createButton('addEdge', 'vis-button vis-connect', locale['addEdge'] || this.options.locales['en']['addEdge']); + + this.manipulationDiv.appendChild(button); + + this._bindHammerToDiv(button, this.addEdgeMode.bind(this)); + } + /** + * + * @param {Locale} locale + * @private + */ + + }, { + key: "_createEditNodeButton", + value: function _createEditNodeButton(locale) { + var button = this._createButton('editNode', 'vis-button vis-edit', locale['editNode'] || this.options.locales['en']['editNode']); + + this.manipulationDiv.appendChild(button); + + this._bindHammerToDiv(button, this.editNode.bind(this)); + } + /** + * + * @param {Locale} locale + * @private + */ + + }, { + key: "_createEditEdgeButton", + value: function _createEditEdgeButton(locale) { + var button = this._createButton('editEdge', 'vis-button vis-edit', locale['editEdge'] || this.options.locales['en']['editEdge']); + + this.manipulationDiv.appendChild(button); + + this._bindHammerToDiv(button, this.editEdgeMode.bind(this)); + } + /** + * + * @param {Locale} locale + * @private + */ + + }, { + key: "_createDeleteButton", + value: function _createDeleteButton(locale) { + var deleteBtnClass; + + if (this.options.rtl) { + deleteBtnClass = 'vis-button vis-delete-rtl'; + } else { + deleteBtnClass = 'vis-button vis-delete'; + } + + var button = this._createButton('delete', deleteBtnClass, locale['del'] || this.options.locales['en']['del']); + + this.manipulationDiv.appendChild(button); + + this._bindHammerToDiv(button, this.deleteSelected.bind(this)); + } + /** + * + * @param {Locale} locale + * @private + */ + + }, { + key: "_createBackButton", + value: function _createBackButton(locale) { + var button = this._createButton('back', 'vis-button vis-back', locale['back'] || this.options.locales['en']['back']); + + this.manipulationDiv.appendChild(button); + + this._bindHammerToDiv(button, this.showManipulatorToolbar.bind(this)); + } + /** + * + * @param {number|string} id + * @param {string} className + * @param {label} label + * @param {string} labelClassName + * @returns {HTMLElement} + * @private + */ + + }, { + key: "_createButton", + value: function _createButton(id, className, label) { + var labelClassName = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 'vis-label'; + this.manipulationDOM[id + 'Div'] = document.createElement('div'); + this.manipulationDOM[id + 'Div'].className = className; + this.manipulationDOM[id + 'Label'] = document.createElement('div'); + this.manipulationDOM[id + 'Label'].className = labelClassName; + this.manipulationDOM[id + 'Label'].innerHTML = label; + this.manipulationDOM[id + 'Div'].appendChild(this.manipulationDOM[id + 'Label']); + return this.manipulationDOM[id + 'Div']; + } + /** + * + * @param {Label} label + * @private + */ + + }, { + key: "_createDescription", + value: function _createDescription(label) { + this.manipulationDiv.appendChild(this._createButton('description', 'vis-button vis-none', label)); + } // -------------------------- End of DOM functions for buttons ------------------------------// + + /** + * this binds an event until cleanup by the clean functions. + * @param {Event} event The event + * @param {function} newFunction + * @private + */ + + }, { + key: "_temporaryBindEvent", + value: function _temporaryBindEvent(event, newFunction) { + this.temporaryEventFunctions.push({ + event: event, + boundFunction: newFunction + }); + this.body.emitter.on(event, newFunction); + } + /** + * this overrides an UI function until cleanup by the clean function + * @param {string} UIfunctionName + * @param {function} newFunction + * @private + */ + + }, { + key: "_temporaryBindUI", + value: function _temporaryBindUI(UIfunctionName, newFunction) { + if (this.body.eventListeners[UIfunctionName] !== undefined) { + this.temporaryUIFunctions[UIfunctionName] = this.body.eventListeners[UIfunctionName]; + this.body.eventListeners[UIfunctionName] = newFunction; + } else { + throw new Error('This UI function does not exist. Typo? You tried: ' + UIfunctionName + ' possible are: ' + JSON.stringify(Object.keys(this.body.eventListeners))); + } + } + /** + * Restore the overridden UI functions to their original state. + * + * @private + */ + + }, { + key: "_unbindTemporaryUIs", + value: function _unbindTemporaryUIs() { + for (var functionName in this.temporaryUIFunctions) { + if (this.temporaryUIFunctions.hasOwnProperty(functionName)) { + this.body.eventListeners[functionName] = this.temporaryUIFunctions[functionName]; + delete this.temporaryUIFunctions[functionName]; + } + } + + this.temporaryUIFunctions = {}; + } + /** + * Unbind the events created by _temporaryBindEvent + * @private + */ + + }, { + key: "_unbindTemporaryEvents", + value: function _unbindTemporaryEvents() { + for (var i = 0; i < this.temporaryEventFunctions.length; i++) { + var eventName = this.temporaryEventFunctions[i].event; + var boundFunction = this.temporaryEventFunctions[i].boundFunction; + this.body.emitter.off(eventName, boundFunction); + } + + this.temporaryEventFunctions = []; + } + /** + * Bind an hammer instance to a DOM element. + * + * @param {Element} domElement + * @param {function} boundFunction + */ + + }, { + key: "_bindHammerToDiv", + value: function _bindHammerToDiv(domElement, boundFunction) { + var hammer$1 = new hammer(domElement, {}); + hammerUtil.onTouch(hammer$1, boundFunction); + this.manipulationHammers.push(hammer$1); + } + /** + * Neatly clean up temporary edges and nodes + * @private + */ + + }, { + key: "_cleanupTemporaryNodesAndEdges", + value: function _cleanupTemporaryNodesAndEdges() { + // _clean temporary edges + for (var i = 0; i < this.temporaryIds.edges.length; i++) { + this.body.edges[this.temporaryIds.edges[i]].disconnect(); + delete this.body.edges[this.temporaryIds.edges[i]]; + var indexTempEdge = this.body.edgeIndices.indexOf(this.temporaryIds.edges[i]); + + if (indexTempEdge !== -1) { + this.body.edgeIndices.splice(indexTempEdge, 1); + } + } // _clean temporary nodes + + + for (var _i = 0; _i < this.temporaryIds.nodes.length; _i++) { + delete this.body.nodes[this.temporaryIds.nodes[_i]]; + var indexTempNode = this.body.nodeIndices.indexOf(this.temporaryIds.nodes[_i]); + + if (indexTempNode !== -1) { + this.body.nodeIndices.splice(indexTempNode, 1); + } + } + + this.temporaryIds = { + nodes: [], + edges: [] + }; + } // ------------------------------------------ EDIT EDGE FUNCTIONS -----------------------------------------// + + /** + * the touch is used to get the position of the initial click + * @param {Event} event The event + * @private + */ + + }, { + key: "_controlNodeTouch", + value: function _controlNodeTouch(event) { + this.selectionHandler.unselectAll(); + this.lastTouch = this.body.functions.getPointer(event.center); + this.lastTouch.translation = util.extend({}, this.body.view.translation); // copy the object + } + /** + * the drag start is used to mark one of the control nodes as selected. + * @param {Event} event The event + * @private + */ + + }, { + key: "_controlNodeDragStart", + value: function _controlNodeDragStart(event) { + // eslint-disable-line no-unused-vars + var pointer = this.lastTouch; + + var pointerObj = this.selectionHandler._pointerToPositionObject(pointer); + + var from = this.body.nodes[this.temporaryIds.nodes[0]]; + var to = this.body.nodes[this.temporaryIds.nodes[1]]; + var edge = this.body.edges[this.edgeBeingEditedId]; + this.selectedControlNode = undefined; + var fromSelect = from.isOverlappingWith(pointerObj); + var toSelect = to.isOverlappingWith(pointerObj); + + if (fromSelect === true) { + this.selectedControlNode = from; + edge.edgeType.from = from; + } else if (toSelect === true) { + this.selectedControlNode = to; + edge.edgeType.to = to; + } // we use the selection to find the node that is being dragged. We explicitly select it here. + + + if (this.selectedControlNode !== undefined) { + this.selectionHandler.selectObject(this.selectedControlNode); + } + + this.body.emitter.emit('_redraw'); + } + /** + * dragging the control nodes or the canvas + * @param {Event} event The event + * @private + */ + + }, { + key: "_controlNodeDrag", + value: function _controlNodeDrag(event) { + this.body.emitter.emit('disablePhysics'); + var pointer = this.body.functions.getPointer(event.center); + var pos = this.canvas.DOMtoCanvas(pointer); + + if (this.selectedControlNode !== undefined) { + this.selectedControlNode.x = pos.x; + this.selectedControlNode.y = pos.y; + } else { + // if the drag was not started properly because the click started outside the network div, start it now. + var diffX = pointer.x - this.lastTouch.x; + var diffY = pointer.y - this.lastTouch.y; + this.body.view.translation = { + x: this.lastTouch.translation.x + diffX, + y: this.lastTouch.translation.y + diffY + }; + } + + this.body.emitter.emit('_redraw'); + } + /** + * connecting or restoring the control nodes. + * @param {Event} event The event + * @private + */ + + }, { + key: "_controlNodeDragEnd", + value: function _controlNodeDragEnd(event) { + var pointer = this.body.functions.getPointer(event.center); + + var pointerObj = this.selectionHandler._pointerToPositionObject(pointer); + + var edge = this.body.edges[this.edgeBeingEditedId]; // if the node that was dragged is not a control node, return + + if (this.selectedControlNode === undefined) { + return; + } // we use the selection to find the node that is being dragged. We explicitly DEselect the control node here. + + + this.selectionHandler.unselectAll(); + + var overlappingNodeIds = this.selectionHandler._getAllNodesOverlappingWith(pointerObj); + + var node = undefined; + + for (var i = overlappingNodeIds.length - 1; i >= 0; i--) { + if (overlappingNodeIds[i] !== this.selectedControlNode.id) { + node = this.body.nodes[overlappingNodeIds[i]]; + break; + } + } // perform the connection + + + if (node !== undefined && this.selectedControlNode !== undefined) { + if (node.isCluster === true) { + alert(this.options.locales[this.options.locale]['createEdgeError'] || this.options.locales['en']['createEdgeError']); + } else { + var from = this.body.nodes[this.temporaryIds.nodes[0]]; + + if (this.selectedControlNode.id === from.id) { + this._performEditEdge(node.id, edge.to.id); + } else { + this._performEditEdge(edge.from.id, node.id); + } + } + } else { + edge.updateEdgeType(); + this.body.emitter.emit('restorePhysics'); + } + + this.body.emitter.emit('_redraw'); + } // ------------------------------------ END OF EDIT EDGE FUNCTIONS -----------------------------------------// + // ------------------------------------------- ADD EDGE FUNCTIONS -----------------------------------------// + + /** + * the function bound to the selection event. It checks if you want to connect a cluster and changes the description + * to walk the user through the process. + * + * @param {Event} event + * @private + */ + + }, { + key: "_handleConnect", + value: function _handleConnect(event) { + // check to avoid double fireing of this function. + if (new Date().valueOf() - this.touchTime > 100) { + this.lastTouch = this.body.functions.getPointer(event.center); + this.lastTouch.translation = util.extend({}, this.body.view.translation); // copy the object + + var pointer = this.lastTouch; + var node = this.selectionHandler.getNodeAt(pointer); + + if (node !== undefined) { + if (node.isCluster === true) { + alert(this.options.locales[this.options.locale]['createEdgeError'] || this.options.locales['en']['createEdgeError']); + } else { + // create a node the temporary line can look at + var targetNode = this._getNewTargetNode(node.x, node.y); + + this.body.nodes[targetNode.id] = targetNode; + this.body.nodeIndices.push(targetNode.id); // create a temporary edge + + var connectionEdge = this.body.functions.createEdge({ + id: 'connectionEdge' + util.randomUUID(), + from: node.id, + to: targetNode.id, + physics: false, + smooth: { + enabled: true, + type: 'continuous', + roundness: 0.5 + } + }); + this.body.edges[connectionEdge.id] = connectionEdge; + this.body.edgeIndices.push(connectionEdge.id); + this.temporaryIds.nodes.push(targetNode.id); + this.temporaryIds.edges.push(connectionEdge.id); + } + } + + this.touchTime = new Date().valueOf(); + } + } + /** + * + * @param {Event} event + * @private + */ + + }, { + key: "_dragControlNode", + value: function _dragControlNode(event) { + var pointer = this.body.functions.getPointer(event.center); + + var pointerObj = this.selectionHandler._pointerToPositionObject(pointer); // remember the edge id + + + var connectFromId = undefined; + + if (this.temporaryIds.edges[0] !== undefined) { + connectFromId = this.body.edges[this.temporaryIds.edges[0]].fromId; + } // get the overlapping node but NOT the temporary node; + + + var overlappingNodeIds = this.selectionHandler._getAllNodesOverlappingWith(pointerObj); + + var node = undefined; + + for (var i = overlappingNodeIds.length - 1; i >= 0; i--) { + // if the node id is NOT a temporary node, accept the node. + if (this.temporaryIds.nodes.indexOf(overlappingNodeIds[i]) === -1) { + node = this.body.nodes[overlappingNodeIds[i]]; + break; + } + } + + event.controlEdge = { + from: connectFromId, + to: node ? node.id : undefined + }; + + this.selectionHandler._generateClickEvent('controlNodeDragging', event, pointer); + + if (this.temporaryIds.nodes[0] !== undefined) { + var targetNode = this.body.nodes[this.temporaryIds.nodes[0]]; // there is only one temp node in the add edge mode. + + targetNode.x = this.canvas._XconvertDOMtoCanvas(pointer.x); + targetNode.y = this.canvas._YconvertDOMtoCanvas(pointer.y); + this.body.emitter.emit('_redraw'); + } else { + var diffX = pointer.x - this.lastTouch.x; + var diffY = pointer.y - this.lastTouch.y; + this.body.view.translation = { + x: this.lastTouch.translation.x + diffX, + y: this.lastTouch.translation.y + diffY + }; + } + } + /** + * Connect the new edge to the target if one exists, otherwise remove temp line + * @param {Event} event The event + * @private + */ + + }, { + key: "_finishConnect", + value: function _finishConnect(event) { + var pointer = this.body.functions.getPointer(event.center); + + var pointerObj = this.selectionHandler._pointerToPositionObject(pointer); // remember the edge id + + + var connectFromId = undefined; + + if (this.temporaryIds.edges[0] !== undefined) { + connectFromId = this.body.edges[this.temporaryIds.edges[0]].fromId; + } // get the overlapping node but NOT the temporary node; + + + var overlappingNodeIds = this.selectionHandler._getAllNodesOverlappingWith(pointerObj); + + var node = undefined; + + for (var i = overlappingNodeIds.length - 1; i >= 0; i--) { + // if the node id is NOT a temporary node, accept the node. + if (this.temporaryIds.nodes.indexOf(overlappingNodeIds[i]) === -1) { + node = this.body.nodes[overlappingNodeIds[i]]; + break; + } + } // clean temporary nodes and edges. + + + this._cleanupTemporaryNodesAndEdges(); // perform the connection + + + if (node !== undefined) { + if (node.isCluster === true) { + alert(this.options.locales[this.options.locale]['createEdgeError'] || this.options.locales['en']['createEdgeError']); + } else { + if (this.body.nodes[connectFromId] !== undefined && this.body.nodes[node.id] !== undefined) { + this._performAddEdge(connectFromId, node.id); + } + } + } + + event.controlEdge = { + from: connectFromId, + to: node ? node.id : undefined + }; + + this.selectionHandler._generateClickEvent('controlNodeDragEnd', event, pointer); // No need to do _generateclickevent('dragEnd') here, the regular dragEnd event fires. + + + this.body.emitter.emit('_redraw'); + } + /** + * + * @param {Event} event + * @private + */ + + }, { + key: "_dragStartEdge", + value: function _dragStartEdge(event) { + var pointer = this.lastTouch; + + this.selectionHandler._generateClickEvent('dragStart', event, pointer, undefined, true); + } // --------------------------------------- END OF ADD EDGE FUNCTIONS -------------------------------------// + // ------------------------------ Performing all the actual data manipulation ------------------------// + + /** + * Adds a node on the specified location + * + * @param {Object} clickData + * @private + */ + + }, { + key: "_performAddNode", + value: function _performAddNode(clickData) { + var _this4 = this; + + var defaultData = { + id: util.randomUUID(), + x: clickData.pointer.canvas.x, + y: clickData.pointer.canvas.y, + label: 'new' + }; + + if (typeof this.options.addNode === 'function') { + if (this.options.addNode.length === 2) { + this.options.addNode(defaultData, function (finalizedData) { + if (finalizedData !== null && finalizedData !== undefined && _this4.inMode === 'addNode') { + // if for whatever reason the mode has changes (due to dataset change) disregard the callback + _this4.body.data.nodes.getDataSet().add(finalizedData); + } + + _this4.showManipulatorToolbar(); + }); + } else { + this.showManipulatorToolbar(); + throw new Error('The function for add does not support two arguments (data,callback)'); + } + } else { + this.body.data.nodes.getDataSet().add(defaultData); + this.showManipulatorToolbar(); + } + } + /** + * connect two nodes with a new edge. + * + * @param {Node.id} sourceNodeId + * @param {Node.id} targetNodeId + * @private + */ + + }, { + key: "_performAddEdge", + value: function _performAddEdge(sourceNodeId, targetNodeId) { + var _this5 = this; + + var defaultData = { + from: sourceNodeId, + to: targetNodeId + }; + + if (typeof this.options.addEdge === 'function') { + if (this.options.addEdge.length === 2) { + this.options.addEdge(defaultData, function (finalizedData) { + if (finalizedData !== null && finalizedData !== undefined && _this5.inMode === 'addEdge') { + // if for whatever reason the mode has changes (due to dataset change) disregard the callback + _this5.body.data.edges.getDataSet().add(finalizedData); + + _this5.selectionHandler.unselectAll(); + + _this5.showManipulatorToolbar(); + } + }); + } else { + throw new Error('The function for connect does not support two arguments (data,callback)'); + } + } else { + this.body.data.edges.getDataSet().add(defaultData); + this.selectionHandler.unselectAll(); + this.showManipulatorToolbar(); + } + } + /** + * connect two nodes with a new edge. + * + * @param {Node.id} sourceNodeId + * @param {Node.id} targetNodeId + * @private + */ + + }, { + key: "_performEditEdge", + value: function _performEditEdge(sourceNodeId, targetNodeId) { + var _this6 = this; + + var defaultData = { + id: this.edgeBeingEditedId, + from: sourceNodeId, + to: targetNodeId, + label: this.body.data.edges._data[this.edgeBeingEditedId].label + }; + var eeFunct = this.options.editEdge; + + if (_typeof_1$1(eeFunct) === 'object') { + eeFunct = eeFunct.editWithoutDrag; + } + + if (typeof eeFunct === 'function') { + if (eeFunct.length === 2) { + eeFunct(defaultData, function (finalizedData) { + if (finalizedData === null || finalizedData === undefined || _this6.inMode !== 'editEdge') { + // if for whatever reason the mode has changes (due to dataset change) disregard the callback) { + _this6.body.edges[defaultData.id].updateEdgeType(); + + _this6.body.emitter.emit('_redraw'); + + _this6.showManipulatorToolbar(); + } else { + _this6.body.data.edges.getDataSet().update(finalizedData); + + _this6.selectionHandler.unselectAll(); + + _this6.showManipulatorToolbar(); + } + }); + } else { + throw new Error('The function for edit does not support two arguments (data, callback)'); + } + } else { + this.body.data.edges.getDataSet().update(defaultData); + this.selectionHandler.unselectAll(); + this.showManipulatorToolbar(); + } + } + }]); + + return ManipulationSystem; +}(); + +var htmlColors = { + black: '#000000', + navy: '#000080', + darkblue: '#00008B', + mediumblue: '#0000CD', + blue: '#0000FF', + darkgreen: '#006400', + green: '#008000', + teal: '#008080', + darkcyan: '#008B8B', + deepskyblue: '#00BFFF', + darkturquoise: '#00CED1', + mediumspringgreen: '#00FA9A', + lime: '#00FF00', + springgreen: '#00FF7F', + aqua: '#00FFFF', + cyan: '#00FFFF', + midnightblue: '#191970', + dodgerblue: '#1E90FF', + lightseagreen: '#20B2AA', + forestgreen: '#228B22', + seagreen: '#2E8B57', + darkslategray: '#2F4F4F', + limegreen: '#32CD32', + mediumseagreen: '#3CB371', + turquoise: '#40E0D0', + royalblue: '#4169E1', + steelblue: '#4682B4', + darkslateblue: '#483D8B', + mediumturquoise: '#48D1CC', + indigo: '#4B0082', + darkolivegreen: '#556B2F', + cadetblue: '#5F9EA0', + cornflowerblue: '#6495ED', + mediumaquamarine: '#66CDAA', + dimgray: '#696969', + slateblue: '#6A5ACD', + olivedrab: '#6B8E23', + slategray: '#708090', + lightslategray: '#778899', + mediumslateblue: '#7B68EE', + lawngreen: '#7CFC00', + chartreuse: '#7FFF00', + aquamarine: '#7FFFD4', + maroon: '#800000', + purple: '#800080', + olive: '#808000', + gray: '#808080', + skyblue: '#87CEEB', + lightskyblue: '#87CEFA', + blueviolet: '#8A2BE2', + darkred: '#8B0000', + darkmagenta: '#8B008B', + saddlebrown: '#8B4513', + darkseagreen: '#8FBC8F', + lightgreen: '#90EE90', + mediumpurple: '#9370D8', + darkviolet: '#9400D3', + palegreen: '#98FB98', + darkorchid: '#9932CC', + yellowgreen: '#9ACD32', + sienna: '#A0522D', + brown: '#A52A2A', + darkgray: '#A9A9A9', + lightblue: '#ADD8E6', + greenyellow: '#ADFF2F', + paleturquoise: '#AFEEEE', + lightsteelblue: '#B0C4DE', + powderblue: '#B0E0E6', + firebrick: '#B22222', + darkgoldenrod: '#B8860B', + mediumorchid: '#BA55D3', + rosybrown: '#BC8F8F', + darkkhaki: '#BDB76B', + silver: '#C0C0C0', + mediumvioletred: '#C71585', + indianred: '#CD5C5C', + peru: '#CD853F', + chocolate: '#D2691E', + tan: '#D2B48C', + lightgrey: '#D3D3D3', + palevioletred: '#D87093', + thistle: '#D8BFD8', + orchid: '#DA70D6', + goldenrod: '#DAA520', + crimson: '#DC143C', + gainsboro: '#DCDCDC', + plum: '#DDA0DD', + burlywood: '#DEB887', + lightcyan: '#E0FFFF', + lavender: '#E6E6FA', + darksalmon: '#E9967A', + violet: '#EE82EE', + palegoldenrod: '#EEE8AA', + lightcoral: '#F08080', + khaki: '#F0E68C', + aliceblue: '#F0F8FF', + honeydew: '#F0FFF0', + azure: '#F0FFFF', + sandybrown: '#F4A460', + wheat: '#F5DEB3', + beige: '#F5F5DC', + whitesmoke: '#F5F5F5', + mintcream: '#F5FFFA', + ghostwhite: '#F8F8FF', + salmon: '#FA8072', + antiquewhite: '#FAEBD7', + linen: '#FAF0E6', + lightgoldenrodyellow: '#FAFAD2', + oldlace: '#FDF5E6', + red: '#FF0000', + fuchsia: '#FF00FF', + magenta: '#FF00FF', + deeppink: '#FF1493', + orangered: '#FF4500', + tomato: '#FF6347', + hotpink: '#FF69B4', + coral: '#FF7F50', + darkorange: '#FF8C00', + lightsalmon: '#FFA07A', + orange: '#FFA500', + lightpink: '#FFB6C1', + pink: '#FFC0CB', + gold: '#FFD700', + peachpuff: '#FFDAB9', + navajowhite: '#FFDEAD', + moccasin: '#FFE4B5', + bisque: '#FFE4C4', + mistyrose: '#FFE4E1', + blanchedalmond: '#FFEBCD', + papayawhip: '#FFEFD5', + lavenderblush: '#FFF0F5', + seashell: '#FFF5EE', + cornsilk: '#FFF8DC', + lemonchiffon: '#FFFACD', + floralwhite: '#FFFAF0', + snow: '#FFFAFA', + yellow: '#FFFF00', + lightyellow: '#FFFFE0', + ivory: '#FFFFF0', + white: '#FFFFFF' +}; +/** + * @param {number} [pixelRatio=1] + */ + +var ColorPicker = +/*#__PURE__*/ +function () { + /** + * @param {number} [pixelRatio=1] + */ + function ColorPicker() { + var pixelRatio = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1; + + classCallCheck$1(this, ColorPicker); + + this.pixelRatio = pixelRatio; + this.generated = false; + this.centerCoordinates = { + x: 289 / 2, + y: 289 / 2 + }; + this.r = 289 * 0.49; + this.color = { + r: 255, + g: 255, + b: 255, + a: 1.0 + }; + this.hueCircle = undefined; + this.initialColor = { + r: 255, + g: 255, + b: 255, + a: 1.0 + }; + this.previousColor = undefined; + this.applied = false; // bound by + + this.updateCallback = function () {}; + + this.closeCallback = function () {}; // create all DOM elements + + + this._create(); + } + /** + * this inserts the colorPicker into a div from the DOM + * @param {Element} container + */ + + + createClass$1(ColorPicker, [{ + key: "insertTo", + value: function insertTo(container) { + if (this.hammer !== undefined) { + this.hammer.destroy(); + this.hammer = undefined; + } + + this.container = container; + this.container.appendChild(this.frame); + + this._bindHammer(); + + this._setSize(); + } + /** + * the callback is executed on apply and save. Bind it to the application + * @param {function} callback + */ + + }, { + key: "setUpdateCallback", + value: function setUpdateCallback(callback) { + if (typeof callback === 'function') { + this.updateCallback = callback; + } else { + throw new Error("Function attempted to set as colorPicker update callback is not a function."); + } + } + /** + * the callback is executed on apply and save. Bind it to the application + * @param {function} callback + */ + + }, { + key: "setCloseCallback", + value: function setCloseCallback(callback) { + if (typeof callback === 'function') { + this.closeCallback = callback; + } else { + throw new Error("Function attempted to set as colorPicker closing callback is not a function."); + } + } + /** + * + * @param {string} color + * @returns {String} + * @private + */ + + }, { + key: "_isColorString", + value: function _isColorString(color) { + if (typeof color === 'string') { + return htmlColors[color]; + } + } + /** + * Set the color of the colorPicker + * Supported formats: + * 'red' --> HTML color string + * '#ffffff' --> hex string + * 'rgb(255,255,255)' --> rgb string + * 'rgba(255,255,255,1.0)' --> rgba string + * {r:255,g:255,b:255} --> rgb object + * {r:255,g:255,b:255,a:1.0} --> rgba object + * @param {string|Object} color + * @param {boolean} [setInitial=true] + */ + + }, { + key: "setColor", + value: function setColor(color) { + var setInitial = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; + + if (color === 'none') { + return; + } + + var rgba; // if a html color shorthand is used, convert to hex + + var htmlColor = this._isColorString(color); + + if (htmlColor !== undefined) { + color = htmlColor; + } // check format + + + if (util.isString(color) === true) { + if (util.isValidRGB(color) === true) { + var rgbaArray = color.substr(4).substr(0, color.length - 5).split(','); + rgba = { + r: rgbaArray[0], + g: rgbaArray[1], + b: rgbaArray[2], + a: 1.0 + }; + } else if (util.isValidRGBA(color) === true) { + var _rgbaArray = color.substr(5).substr(0, color.length - 6).split(','); + + rgba = { + r: _rgbaArray[0], + g: _rgbaArray[1], + b: _rgbaArray[2], + a: _rgbaArray[3] + }; + } else if (util.isValidHex(color) === true) { + var rgbObj = util.hexToRGB(color); + rgba = { + r: rgbObj.r, + g: rgbObj.g, + b: rgbObj.b, + a: 1.0 + }; + } + } else { + if (color instanceof Object) { + if (color.r !== undefined && color.g !== undefined && color.b !== undefined) { + var alpha = color.a !== undefined ? color.a : '1.0'; + rgba = { + r: color.r, + g: color.g, + b: color.b, + a: alpha + }; + } + } + } // set color + + + if (rgba === undefined) { + throw new Error("Unknown color passed to the colorPicker. Supported are strings: rgb, hex, rgba. Object: rgb ({r:r,g:g,b:b,[a:a]}). Supplied: " + JSON.stringify(color)); + } else { + this._setColor(rgba, setInitial); + } + } + /** + * this shows the color picker. + * The hue circle is constructed once and stored. + */ + + }, { + key: "show", + value: function show() { + if (this.closeCallback !== undefined) { + this.closeCallback(); + this.closeCallback = undefined; + } + + this.applied = false; + this.frame.style.display = 'block'; + + this._generateHueCircle(); + } // ------------------------------------------ PRIVATE ----------------------------- // + + /** + * Hide the picker. Is called by the cancel button. + * Optional boolean to store the previous color for easy access later on. + * @param {boolean} [storePrevious=true] + * @private + */ + + }, { + key: "_hide", + value: function _hide() { + var _this = this; + + var storePrevious = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; + + // store the previous color for next time; + if (storePrevious === true) { + this.previousColor = util.extend({}, this.color); + } + + if (this.applied === true) { + this.updateCallback(this.initialColor); + } + + this.frame.style.display = 'none'; // call the closing callback, restoring the onclick method. + // this is in a setTimeout because it will trigger the show again before the click is done. + + setTimeout(function () { + if (_this.closeCallback !== undefined) { + _this.closeCallback(); + + _this.closeCallback = undefined; + } + }, 0); + } + /** + * bound to the save button. Saves and hides. + * @private + */ + + }, { + key: "_save", + value: function _save() { + this.updateCallback(this.color); + this.applied = false; + + this._hide(); + } + /** + * Bound to apply button. Saves but does not close. Is undone by the cancel button. + * @private + */ + + }, { + key: "_apply", + value: function _apply() { + this.applied = true; + this.updateCallback(this.color); + + this._updatePicker(this.color); + } + /** + * load the color from the previous session. + * @private + */ + + }, { + key: "_loadLast", + value: function _loadLast() { + if (this.previousColor !== undefined) { + this.setColor(this.previousColor, false); + } else { + alert("There is no last color to load..."); + } + } + /** + * set the color, place the picker + * @param {Object} rgba + * @param {boolean} [setInitial=true] + * @private + */ + + }, { + key: "_setColor", + value: function _setColor(rgba) { + var setInitial = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; + + // store the initial color + if (setInitial === true) { + this.initialColor = util.extend({}, rgba); + } + + this.color = rgba; + var hsv = util.RGBToHSV(rgba.r, rgba.g, rgba.b); + var angleConvert = 2 * Math.PI; + var radius = this.r * hsv.s; + var x = this.centerCoordinates.x + radius * Math.sin(angleConvert * hsv.h); + var y = this.centerCoordinates.y + radius * Math.cos(angleConvert * hsv.h); + this.colorPickerSelector.style.left = x - 0.5 * this.colorPickerSelector.clientWidth + 'px'; + this.colorPickerSelector.style.top = y - 0.5 * this.colorPickerSelector.clientHeight + 'px'; + + this._updatePicker(rgba); + } + /** + * bound to opacity control + * @param {number} value + * @private + */ + + }, { + key: "_setOpacity", + value: function _setOpacity(value) { + this.color.a = value / 100; + + this._updatePicker(this.color); + } + /** + * bound to brightness control + * @param {number} value + * @private + */ + + }, { + key: "_setBrightness", + value: function _setBrightness(value) { + var hsv = util.RGBToHSV(this.color.r, this.color.g, this.color.b); + hsv.v = value / 100; + var rgba = util.HSVToRGB(hsv.h, hsv.s, hsv.v); + rgba['a'] = this.color.a; + this.color = rgba; + + this._updatePicker(); + } + /** + * update the color picker. A black circle overlays the hue circle to mimic the brightness decreasing. + * @param {Object} rgba + * @private + */ + + }, { + key: "_updatePicker", + value: function _updatePicker() { + var rgba = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.color; + var hsv = util.RGBToHSV(rgba.r, rgba.g, rgba.b); + var ctx = this.colorPickerCanvas.getContext('2d'); + + if (this.pixelRation === undefined) { + this.pixelRatio = (window.devicePixelRatio || 1) / (ctx.webkitBackingStorePixelRatio || ctx.mozBackingStorePixelRatio || ctx.msBackingStorePixelRatio || ctx.oBackingStorePixelRatio || ctx.backingStorePixelRatio || 1); + } + + ctx.setTransform(this.pixelRatio, 0, 0, this.pixelRatio, 0, 0); // clear the canvas + + var w = this.colorPickerCanvas.clientWidth; + var h = this.colorPickerCanvas.clientHeight; + ctx.clearRect(0, 0, w, h); + ctx.putImageData(this.hueCircle, 0, 0); + ctx.fillStyle = 'rgba(0,0,0,' + (1 - hsv.v) + ')'; + ctx.circle(this.centerCoordinates.x, this.centerCoordinates.y, this.r); + ctx.fill(); + this.brightnessRange.value = 100 * hsv.v; + this.opacityRange.value = 100 * rgba.a; + this.initialColorDiv.style.backgroundColor = 'rgba(' + this.initialColor.r + ',' + this.initialColor.g + ',' + this.initialColor.b + ',' + this.initialColor.a + ')'; + this.newColorDiv.style.backgroundColor = 'rgba(' + this.color.r + ',' + this.color.g + ',' + this.color.b + ',' + this.color.a + ')'; + } + /** + * used by create to set the size of the canvas. + * @private + */ + + }, { + key: "_setSize", + value: function _setSize() { + this.colorPickerCanvas.style.width = '100%'; + this.colorPickerCanvas.style.height = '100%'; + this.colorPickerCanvas.width = 289 * this.pixelRatio; + this.colorPickerCanvas.height = 289 * this.pixelRatio; + } + /** + * create all dom elements + * TODO: cleanup, lots of similar dom elements + * @private + */ + + }, { + key: "_create", + value: function _create() { + this.frame = document.createElement('div'); + this.frame.className = 'vis-color-picker'; + this.colorPickerDiv = document.createElement('div'); + this.colorPickerSelector = document.createElement('div'); + this.colorPickerSelector.className = 'vis-selector'; + this.colorPickerDiv.appendChild(this.colorPickerSelector); + this.colorPickerCanvas = document.createElement('canvas'); + this.colorPickerDiv.appendChild(this.colorPickerCanvas); + + if (!this.colorPickerCanvas.getContext) { + var noCanvas = document.createElement('DIV'); + noCanvas.style.color = 'red'; + noCanvas.style.fontWeight = 'bold'; + noCanvas.style.padding = '10px'; + noCanvas.innerHTML = 'Error: your browser does not support HTML canvas'; + this.colorPickerCanvas.appendChild(noCanvas); + } else { + var ctx = this.colorPickerCanvas.getContext("2d"); + this.pixelRatio = (window.devicePixelRatio || 1) / (ctx.webkitBackingStorePixelRatio || ctx.mozBackingStorePixelRatio || ctx.msBackingStorePixelRatio || ctx.oBackingStorePixelRatio || ctx.backingStorePixelRatio || 1); + this.colorPickerCanvas.getContext("2d").setTransform(this.pixelRatio, 0, 0, this.pixelRatio, 0, 0); + } + + this.colorPickerDiv.className = 'vis-color'; + this.opacityDiv = document.createElement('div'); + this.opacityDiv.className = 'vis-opacity'; + this.brightnessDiv = document.createElement('div'); + this.brightnessDiv.className = 'vis-brightness'; + this.arrowDiv = document.createElement('div'); + this.arrowDiv.className = 'vis-arrow'; + this.opacityRange = document.createElement('input'); + + try { + this.opacityRange.type = 'range'; // Not supported on IE9 + + this.opacityRange.min = '0'; + this.opacityRange.max = '100'; + } // TODO: Add some error handling and remove this lint exception + catch (err) {} // eslint-disable-line no-empty + + + this.opacityRange.value = '100'; + this.opacityRange.className = 'vis-range'; + this.brightnessRange = document.createElement('input'); + + try { + this.brightnessRange.type = 'range'; // Not supported on IE9 + + this.brightnessRange.min = '0'; + this.brightnessRange.max = '100'; + } // TODO: Add some error handling and remove this lint exception + catch (err) {} // eslint-disable-line no-empty + + + this.brightnessRange.value = '100'; + this.brightnessRange.className = 'vis-range'; + this.opacityDiv.appendChild(this.opacityRange); + this.brightnessDiv.appendChild(this.brightnessRange); + var me = this; + + this.opacityRange.onchange = function () { + me._setOpacity(this.value); + }; + + this.opacityRange.oninput = function () { + me._setOpacity(this.value); + }; + + this.brightnessRange.onchange = function () { + me._setBrightness(this.value); + }; + + this.brightnessRange.oninput = function () { + me._setBrightness(this.value); + }; + + this.brightnessLabel = document.createElement("div"); + this.brightnessLabel.className = "vis-label vis-brightness"; + this.brightnessLabel.innerHTML = 'brightness:'; + this.opacityLabel = document.createElement("div"); + this.opacityLabel.className = "vis-label vis-opacity"; + this.opacityLabel.innerHTML = 'opacity:'; + this.newColorDiv = document.createElement("div"); + this.newColorDiv.className = "vis-new-color"; + this.newColorDiv.innerHTML = 'new'; + this.initialColorDiv = document.createElement("div"); + this.initialColorDiv.className = "vis-initial-color"; + this.initialColorDiv.innerHTML = 'initial'; + this.cancelButton = document.createElement("div"); + this.cancelButton.className = "vis-button vis-cancel"; + this.cancelButton.innerHTML = 'cancel'; + this.cancelButton.onclick = this._hide.bind(this, false); + this.applyButton = document.createElement("div"); + this.applyButton.className = "vis-button vis-apply"; + this.applyButton.innerHTML = 'apply'; + this.applyButton.onclick = this._apply.bind(this); + this.saveButton = document.createElement("div"); + this.saveButton.className = "vis-button vis-save"; + this.saveButton.innerHTML = 'save'; + this.saveButton.onclick = this._save.bind(this); + this.loadButton = document.createElement("div"); + this.loadButton.className = "vis-button vis-load"; + this.loadButton.innerHTML = 'load last'; + this.loadButton.onclick = this._loadLast.bind(this); + this.frame.appendChild(this.colorPickerDiv); + this.frame.appendChild(this.arrowDiv); + this.frame.appendChild(this.brightnessLabel); + this.frame.appendChild(this.brightnessDiv); + this.frame.appendChild(this.opacityLabel); + this.frame.appendChild(this.opacityDiv); + this.frame.appendChild(this.newColorDiv); + this.frame.appendChild(this.initialColorDiv); + this.frame.appendChild(this.cancelButton); + this.frame.appendChild(this.applyButton); + this.frame.appendChild(this.saveButton); + this.frame.appendChild(this.loadButton); + } + /** + * bind hammer to the color picker + * @private + */ + + }, { + key: "_bindHammer", + value: function _bindHammer() { + var _this2 = this; + + this.drag = {}; + this.pinch = {}; + this.hammer = new hammer(this.colorPickerCanvas); + this.hammer.get('pinch').set({ + enable: true + }); + hammerUtil.onTouch(this.hammer, function (event) { + _this2._moveSelector(event); + }); + this.hammer.on('tap', function (event) { + _this2._moveSelector(event); + }); + this.hammer.on('panstart', function (event) { + _this2._moveSelector(event); + }); + this.hammer.on('panmove', function (event) { + _this2._moveSelector(event); + }); + this.hammer.on('panend', function (event) { + _this2._moveSelector(event); + }); + } + /** + * generate the hue circle. This is relatively heavy (200ms) and is done only once on the first time it is shown. + * @private + */ + + }, { + key: "_generateHueCircle", + value: function _generateHueCircle() { + if (this.generated === false) { + var ctx = this.colorPickerCanvas.getContext('2d'); + + if (this.pixelRation === undefined) { + this.pixelRatio = (window.devicePixelRatio || 1) / (ctx.webkitBackingStorePixelRatio || ctx.mozBackingStorePixelRatio || ctx.msBackingStorePixelRatio || ctx.oBackingStorePixelRatio || ctx.backingStorePixelRatio || 1); + } + + ctx.setTransform(this.pixelRatio, 0, 0, this.pixelRatio, 0, 0); // clear the canvas + + var w = this.colorPickerCanvas.clientWidth; + var h = this.colorPickerCanvas.clientHeight; + ctx.clearRect(0, 0, w, h); // draw hue circle + + var x, y, hue, sat; + this.centerCoordinates = { + x: w * 0.5, + y: h * 0.5 + }; + this.r = 0.49 * w; + var angleConvert = 2 * Math.PI / 360; + var hfac = 1 / 360; + var sfac = 1 / this.r; + var rgb; + + for (hue = 0; hue < 360; hue++) { + for (sat = 0; sat < this.r; sat++) { + x = this.centerCoordinates.x + sat * Math.sin(angleConvert * hue); + y = this.centerCoordinates.y + sat * Math.cos(angleConvert * hue); + rgb = util.HSVToRGB(hue * hfac, sat * sfac, 1); + ctx.fillStyle = 'rgb(' + rgb.r + ',' + rgb.g + ',' + rgb.b + ')'; + ctx.fillRect(x - 0.5, y - 0.5, 2, 2); + } + } + + ctx.strokeStyle = 'rgba(0,0,0,1)'; + ctx.circle(this.centerCoordinates.x, this.centerCoordinates.y, this.r); + ctx.stroke(); + this.hueCircle = ctx.getImageData(0, 0, w, h); + } + + this.generated = true; + } + /** + * move the selector. This is called by hammer functions. + * + * @param {Event} event The event + * @private + */ + + }, { + key: "_moveSelector", + value: function _moveSelector(event) { + var rect = this.colorPickerDiv.getBoundingClientRect(); + var left = event.center.x - rect.left; + var top = event.center.y - rect.top; + var centerY = 0.5 * this.colorPickerDiv.clientHeight; + var centerX = 0.5 * this.colorPickerDiv.clientWidth; + var x = left - centerX; + var y = top - centerY; + var angle = Math.atan2(x, y); + var radius = 0.98 * Math.min(Math.sqrt(x * x + y * y), centerX); + var newTop = Math.cos(angle) * radius + centerY; + var newLeft = Math.sin(angle) * radius + centerX; + this.colorPickerSelector.style.top = newTop - 0.5 * this.colorPickerSelector.clientHeight + 'px'; + this.colorPickerSelector.style.left = newLeft - 0.5 * this.colorPickerSelector.clientWidth + 'px'; // set color + + var h = angle / (2 * Math.PI); + h = h < 0 ? h + 1 : h; + var s = radius / this.r; + var hsv = util.RGBToHSV(this.color.r, this.color.g, this.color.b); + hsv.h = h; + hsv.s = s; + var rgba = util.HSVToRGB(hsv.h, hsv.s, hsv.v); + rgba['a'] = this.color.a; + this.color = rgba; // update previews + + this.initialColorDiv.style.backgroundColor = 'rgba(' + this.initialColor.r + ',' + this.initialColor.g + ',' + this.initialColor.b + ',' + this.initialColor.a + ')'; + this.newColorDiv.style.backgroundColor = 'rgba(' + this.color.r + ',' + this.color.g + ',' + this.color.b + ',' + this.color.a + ')'; + } + }]); + + return ColorPicker; +}(); + +/** + * The way this works is for all properties of this.possible options, you can supply the property name in any form to list the options. + * Boolean options are recognised as Boolean + * Number options should be written as array: [default value, min value, max value, stepsize] + * Colors should be written as array: ['color', '#ffffff'] + * Strings with should be written as array: [option1, option2, option3, ..] + * + * The options are matched with their counterparts in each of the modules and the values used in the configuration are + */ + +var Configurator = +/*#__PURE__*/ +function () { + /** + * @param {Object} parentModule | the location where parentModule.setOptions() can be called + * @param {Object} defaultContainer | the default container of the module + * @param {Object} configureOptions | the fully configured and predefined options set found in allOptions.js + * @param {number} pixelRatio | canvas pixel ratio + */ + function Configurator(parentModule, defaultContainer, configureOptions) { + var pixelRatio = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 1; + + classCallCheck$1(this, Configurator); + + this.parent = parentModule; + this.changedOptions = []; + this.container = defaultContainer; + this.allowCreation = false; + this.options = {}; + this.initialized = false; + this.popupCounter = 0; + this.defaultOptions = { + enabled: false, + filter: true, + container: undefined, + showButton: true + }; + util.extend(this.options, this.defaultOptions); + this.configureOptions = configureOptions; + this.moduleOptions = {}; + this.domElements = []; + this.popupDiv = {}; + this.popupLimit = 5; + this.popupHistory = {}; + this.colorPicker = new ColorPicker(pixelRatio); + this.wrapper = undefined; + } + /** + * refresh all options. + * Because all modules parse their options by themselves, we just use their options. We copy them here. + * + * @param {Object} options + */ + + + createClass$1(Configurator, [{ + key: "setOptions", + value: function setOptions(options) { + if (options !== undefined) { + // reset the popup history because the indices may have been changed. + this.popupHistory = {}; + + this._removePopup(); + + var enabled = true; + + if (typeof options === 'string') { + this.options.filter = options; + } else if (options instanceof Array) { + this.options.filter = options.join(); + } else if (_typeof_1$1(options) === 'object') { + if (options == null) { + throw new TypeError('options cannot be null'); + } + + if (options.container !== undefined) { + this.options.container = options.container; + } + + if (options.filter !== undefined) { + this.options.filter = options.filter; + } + + if (options.showButton !== undefined) { + this.options.showButton = options.showButton; + } + + if (options.enabled !== undefined) { + enabled = options.enabled; + } + } else if (typeof options === 'boolean') { + this.options.filter = true; + enabled = options; + } else if (typeof options === 'function') { + this.options.filter = options; + enabled = true; + } + + if (this.options.filter === false) { + enabled = false; + } + + this.options.enabled = enabled; + } + + this._clean(); + } + /** + * + * @param {Object} moduleOptions + */ + + }, { + key: "setModuleOptions", + value: function setModuleOptions(moduleOptions) { + this.moduleOptions = moduleOptions; + + if (this.options.enabled === true) { + this._clean(); + + if (this.options.container !== undefined) { + this.container = this.options.container; + } + + this._create(); + } + } + /** + * Create all DOM elements + * @private + */ + + }, { + key: "_create", + value: function _create() { + this._clean(); + + this.changedOptions = []; + var filter = this.options.filter; + var counter = 0; + var show = false; + + for (var option in this.configureOptions) { + if (this.configureOptions.hasOwnProperty(option)) { + this.allowCreation = false; + show = false; + + if (typeof filter === 'function') { + show = filter(option, []); + show = show || this._handleObject(this.configureOptions[option], [option], true); + } else if (filter === true || filter.indexOf(option) !== -1) { + show = true; + } + + if (show !== false) { + this.allowCreation = true; // linebreak between categories + + if (counter > 0) { + this._makeItem([]); + } // a header for the category + + + this._makeHeader(option); // get the sub options + + + this._handleObject(this.configureOptions[option], [option]); + } + + counter++; + } + } + + this._makeButton(); + + this._push(); //~ this.colorPicker.insertTo(this.container); + + } + /** + * draw all DOM elements on the screen + * @private + */ + + }, { + key: "_push", + value: function _push() { + this.wrapper = document.createElement('div'); + this.wrapper.className = 'vis-configuration-wrapper'; + this.container.appendChild(this.wrapper); + + for (var i = 0; i < this.domElements.length; i++) { + this.wrapper.appendChild(this.domElements[i]); + } + + this._showPopupIfNeeded(); + } + /** + * delete all DOM elements + * @private + */ + + }, { + key: "_clean", + value: function _clean() { + for (var i = 0; i < this.domElements.length; i++) { + this.wrapper.removeChild(this.domElements[i]); + } + + if (this.wrapper !== undefined) { + this.container.removeChild(this.wrapper); + this.wrapper = undefined; + } + + this.domElements = []; + + this._removePopup(); + } + /** + * get the value from the actualOptions if it exists + * @param {array} path | where to look for the actual option + * @returns {*} + * @private + */ + + }, { + key: "_getValue", + value: function _getValue(path) { + var base = this.moduleOptions; + + for (var i = 0; i < path.length; i++) { + if (base[path[i]] !== undefined) { + base = base[path[i]]; + } else { + base = undefined; + break; + } + } + + return base; + } + /** + * all option elements are wrapped in an item + * @param {Array} path | where to look for the actual option + * @param {Array.} domElements + * @returns {number} + * @private + */ + + }, { + key: "_makeItem", + value: function _makeItem(path) { + if (this.allowCreation === true) { + var item = document.createElement('div'); + item.className = 'vis-configuration vis-config-item vis-config-s' + path.length; + + for (var _len = arguments.length, domElements = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + domElements[_key - 1] = arguments[_key]; + } + + domElements.forEach(function (element) { + item.appendChild(element); + }); + this.domElements.push(item); + return this.domElements.length; + } + + return 0; + } + /** + * header for major subjects + * @param {string} name + * @private + */ + + }, { + key: "_makeHeader", + value: function _makeHeader(name) { + var div = document.createElement('div'); + div.className = 'vis-configuration vis-config-header'; + div.innerHTML = name; + + this._makeItem([], div); + } + /** + * make a label, if it is an object label, it gets different styling. + * @param {string} name + * @param {array} path | where to look for the actual option + * @param {string} objectLabel + * @returns {HTMLElement} + * @private + */ + + }, { + key: "_makeLabel", + value: function _makeLabel(name, path) { + var objectLabel = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; + var div = document.createElement('div'); + div.className = 'vis-configuration vis-config-label vis-config-s' + path.length; + + if (objectLabel === true) { + div.innerHTML = '' + name + ':'; + } else { + div.innerHTML = name + ':'; + } + + return div; + } + /** + * make a dropdown list for multiple possible string optoins + * @param {Array.} arr + * @param {number} value + * @param {array} path | where to look for the actual option + * @private + */ + + }, { + key: "_makeDropdown", + value: function _makeDropdown(arr, value, path) { + var select = document.createElement('select'); + select.className = 'vis-configuration vis-config-select'; + var selectedValue = 0; + + if (value !== undefined) { + if (arr.indexOf(value) !== -1) { + selectedValue = arr.indexOf(value); + } + } + + for (var i = 0; i < arr.length; i++) { + var option = document.createElement('option'); + option.value = arr[i]; + + if (i === selectedValue) { + option.selected = 'selected'; + } + + option.innerHTML = arr[i]; + select.appendChild(option); + } + + var me = this; + + select.onchange = function () { + me._update(this.value, path); + }; + + var label = this._makeLabel(path[path.length - 1], path); + + this._makeItem(path, label, select); + } + /** + * make a range object for numeric options + * @param {Array.} arr + * @param {number} value + * @param {array} path | where to look for the actual option + * @private + */ + + }, { + key: "_makeRange", + value: function _makeRange(arr, value, path) { + var defaultValue = arr[0]; + var min = arr[1]; + var max = arr[2]; + var step = arr[3]; + var range = document.createElement('input'); + range.className = 'vis-configuration vis-config-range'; + + try { + range.type = 'range'; // not supported on IE9 + + range.min = min; + range.max = max; + } // TODO: Add some error handling and remove this lint exception + catch (err) {} // eslint-disable-line no-empty + + + range.step = step; // set up the popup settings in case they are needed. + + var popupString = ''; + var popupValue = 0; + + if (value !== undefined) { + var factor = 1.20; + + if (value < 0 && value * factor < min) { + range.min = Math.ceil(value * factor); + popupValue = range.min; + popupString = 'range increased'; + } else if (value / factor < min) { + range.min = Math.ceil(value / factor); + popupValue = range.min; + popupString = 'range increased'; + } + + if (value * factor > max && max !== 1) { + range.max = Math.ceil(value * factor); + popupValue = range.max; + popupString = 'range increased'; + } + + range.value = value; + } else { + range.value = defaultValue; + } + + var input = document.createElement('input'); + input.className = 'vis-configuration vis-config-rangeinput'; + input.value = range.value; + var me = this; + + range.onchange = function () { + input.value = this.value; + + me._update(Number(this.value), path); + }; + + range.oninput = function () { + input.value = this.value; + }; + + var label = this._makeLabel(path[path.length - 1], path); + + var itemIndex = this._makeItem(path, label, range, input); // if a popup is needed AND it has not been shown for this value, show it. + + + if (popupString !== '' && this.popupHistory[itemIndex] !== popupValue) { + this.popupHistory[itemIndex] = popupValue; + + this._setupPopup(popupString, itemIndex); + } + } + /** + * make a button object + * @private + */ + + }, { + key: "_makeButton", + value: function _makeButton() { + var _this = this; + + if (this.options.showButton === true) { + var generateButton = document.createElement('div'); + generateButton.className = 'vis-configuration vis-config-button'; + generateButton.innerHTML = 'generate options'; + + generateButton.onclick = function () { + _this._printOptions(); + }; + + generateButton.onmouseover = function () { + generateButton.className = 'vis-configuration vis-config-button hover'; + }; + + generateButton.onmouseout = function () { + generateButton.className = 'vis-configuration vis-config-button'; + }; + + this.optionsContainer = document.createElement('div'); + this.optionsContainer.className = 'vis-configuration vis-config-option-container'; + this.domElements.push(this.optionsContainer); + this.domElements.push(generateButton); + } + } + /** + * prepare the popup + * @param {string} string + * @param {number} index + * @private + */ + + }, { + key: "_setupPopup", + value: function _setupPopup(string, index) { + var _this2 = this; + + if (this.initialized === true && this.allowCreation === true && this.popupCounter < this.popupLimit) { + var div = document.createElement("div"); + div.id = "vis-configuration-popup"; + div.className = "vis-configuration-popup"; + div.innerHTML = string; + + div.onclick = function () { + _this2._removePopup(); + }; + + this.popupCounter += 1; + this.popupDiv = { + html: div, + index: index + }; + } + } + /** + * remove the popup from the dom + * @private + */ + + }, { + key: "_removePopup", + value: function _removePopup() { + if (this.popupDiv.html !== undefined) { + this.popupDiv.html.parentNode.removeChild(this.popupDiv.html); + clearTimeout(this.popupDiv.hideTimeout); + clearTimeout(this.popupDiv.deleteTimeout); + this.popupDiv = {}; + } + } + /** + * Show the popup if it is needed. + * @private + */ + + }, { + key: "_showPopupIfNeeded", + value: function _showPopupIfNeeded() { + var _this3 = this; + + if (this.popupDiv.html !== undefined) { + var correspondingElement = this.domElements[this.popupDiv.index]; + var rect = correspondingElement.getBoundingClientRect(); + this.popupDiv.html.style.left = rect.left + "px"; + this.popupDiv.html.style.top = rect.top - 30 + "px"; // 30 is the height; + + document.body.appendChild(this.popupDiv.html); + this.popupDiv.hideTimeout = setTimeout(function () { + _this3.popupDiv.html.style.opacity = 0; + }, 1500); + this.popupDiv.deleteTimeout = setTimeout(function () { + _this3._removePopup(); + }, 1800); + } + } + /** + * make a checkbox for boolean options. + * @param {number} defaultValue + * @param {number} value + * @param {array} path | where to look for the actual option + * @private + */ + + }, { + key: "_makeCheckbox", + value: function _makeCheckbox(defaultValue, value, path) { + var checkbox = document.createElement('input'); + checkbox.type = 'checkbox'; + checkbox.className = 'vis-configuration vis-config-checkbox'; + checkbox.checked = defaultValue; + + if (value !== undefined) { + checkbox.checked = value; + + if (value !== defaultValue) { + if (_typeof_1$1(defaultValue) === 'object') { + if (value !== defaultValue.enabled) { + this.changedOptions.push({ + path: path, + value: value + }); + } + } else { + this.changedOptions.push({ + path: path, + value: value + }); + } + } + } + + var me = this; + + checkbox.onchange = function () { + me._update(this.checked, path); + }; + + var label = this._makeLabel(path[path.length - 1], path); + + this._makeItem(path, label, checkbox); + } + /** + * make a text input field for string options. + * @param {number} defaultValue + * @param {number} value + * @param {array} path | where to look for the actual option + * @private + */ + + }, { + key: "_makeTextInput", + value: function _makeTextInput(defaultValue, value, path) { + var checkbox = document.createElement('input'); + checkbox.type = 'text'; + checkbox.className = 'vis-configuration vis-config-text'; + checkbox.value = value; + + if (value !== defaultValue) { + this.changedOptions.push({ + path: path, + value: value + }); + } + + var me = this; + + checkbox.onchange = function () { + me._update(this.value, path); + }; + + var label = this._makeLabel(path[path.length - 1], path); + + this._makeItem(path, label, checkbox); + } + /** + * make a color field with a color picker for color fields + * @param {Array.} arr + * @param {number} value + * @param {array} path | where to look for the actual option + * @private + */ + + }, { + key: "_makeColorField", + value: function _makeColorField(arr, value, path) { + var _this4 = this; + + var defaultColor = arr[1]; + var div = document.createElement('div'); + value = value === undefined ? defaultColor : value; + + if (value !== 'none') { + div.className = 'vis-configuration vis-config-colorBlock'; + div.style.backgroundColor = value; + } else { + div.className = 'vis-configuration vis-config-colorBlock none'; + } + + value = value === undefined ? defaultColor : value; + + div.onclick = function () { + _this4._showColorPicker(value, div, path); + }; + + var label = this._makeLabel(path[path.length - 1], path); + + this._makeItem(path, label, div); + } + /** + * used by the color buttons to call the color picker. + * @param {number} value + * @param {HTMLElement} div + * @param {array} path | where to look for the actual option + * @private + */ + + }, { + key: "_showColorPicker", + value: function _showColorPicker(value, div, path) { + var _this5 = this; + + // clear the callback from this div + div.onclick = function () {}; + + this.colorPicker.insertTo(div); + this.colorPicker.show(); + this.colorPicker.setColor(value); + this.colorPicker.setUpdateCallback(function (color) { + var colorString = 'rgba(' + color.r + ',' + color.g + ',' + color.b + ',' + color.a + ')'; + div.style.backgroundColor = colorString; + + _this5._update(colorString, path); + }); // on close of the colorpicker, restore the callback. + + this.colorPicker.setCloseCallback(function () { + div.onclick = function () { + _this5._showColorPicker(value, div, path); + }; + }); + } + /** + * parse an object and draw the correct items + * @param {Object} obj + * @param {array} [path=[]] | where to look for the actual option + * @param {boolean} [checkOnly=false] + * @returns {boolean} + * @private + */ + + }, { + key: "_handleObject", + value: function _handleObject(obj) { + var path = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : []; + var checkOnly = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; + var show = false; + var filter = this.options.filter; + var visibleInSet = false; + + for (var subObj in obj) { + if (obj.hasOwnProperty(subObj)) { + show = true; + var item = obj[subObj]; + var newPath = util.copyAndExtendArray(path, subObj); + + if (typeof filter === 'function') { + show = filter(subObj, path); // if needed we must go deeper into the object. + + if (show === false) { + if (!(item instanceof Array) && typeof item !== 'string' && typeof item !== 'boolean' && item instanceof Object) { + this.allowCreation = false; + show = this._handleObject(item, newPath, true); + this.allowCreation = checkOnly === false; + } + } + } + + if (show !== false) { + visibleInSet = true; + + var value = this._getValue(newPath); + + if (item instanceof Array) { + this._handleArray(item, value, newPath); + } else if (typeof item === 'string') { + this._makeTextInput(item, value, newPath); + } else if (typeof item === 'boolean') { + this._makeCheckbox(item, value, newPath); + } else if (item instanceof Object) { + // collapse the physics options that are not enabled + var draw = true; + + if (path.indexOf('physics') !== -1) { + if (this.moduleOptions.physics.solver !== subObj) { + draw = false; + } + } + + if (draw === true) { + // initially collapse options with an disabled enabled option. + if (item.enabled !== undefined) { + var enabledPath = util.copyAndExtendArray(newPath, 'enabled'); + + var enabledValue = this._getValue(enabledPath); + + if (enabledValue === true) { + var label = this._makeLabel(subObj, newPath, true); + + this._makeItem(newPath, label); + + visibleInSet = this._handleObject(item, newPath) || visibleInSet; + } else { + this._makeCheckbox(item, enabledValue, newPath); + } + } else { + var _label = this._makeLabel(subObj, newPath, true); + + this._makeItem(newPath, _label); + + visibleInSet = this._handleObject(item, newPath) || visibleInSet; + } + } + } else { + console.error('dont know how to handle', item, subObj, newPath); + } + } + } + } + + return visibleInSet; + } + /** + * handle the array type of option + * @param {Array.} arr + * @param {number} value + * @param {array} path | where to look for the actual option + * @private + */ + + }, { + key: "_handleArray", + value: function _handleArray(arr, value, path) { + if (typeof arr[0] === 'string' && arr[0] === 'color') { + this._makeColorField(arr, value, path); + + if (arr[1] !== value) { + this.changedOptions.push({ + path: path, + value: value + }); + } + } else if (typeof arr[0] === 'string') { + this._makeDropdown(arr, value, path); + + if (arr[0] !== value) { + this.changedOptions.push({ + path: path, + value: value + }); + } + } else if (typeof arr[0] === 'number') { + this._makeRange(arr, value, path); + + if (arr[0] !== value) { + this.changedOptions.push({ + path: path, + value: Number(value) + }); + } + } + } + /** + * called to update the network with the new settings. + * @param {number} value + * @param {array} path | where to look for the actual option + * @private + */ + + }, { + key: "_update", + value: function _update(value, path) { + var options = this._constructOptions(value, path); + + if (this.parent.body && this.parent.body.emitter && this.parent.body.emitter.emit) { + this.parent.body.emitter.emit("configChange", options); + } + + this.initialized = true; + this.parent.setOptions(options); + } + /** + * + * @param {string|Boolean} value + * @param {Array.} path + * @param {{}} optionsObj + * @returns {{}} + * @private + */ + + }, { + key: "_constructOptions", + value: function _constructOptions(value, path) { + var optionsObj = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; + var pointer = optionsObj; // when dropdown boxes can be string or boolean, we typecast it into correct types + + value = value === 'true' ? true : value; + value = value === 'false' ? false : value; + + for (var i = 0; i < path.length; i++) { + if (path[i] !== 'global') { + if (pointer[path[i]] === undefined) { + pointer[path[i]] = {}; + } + + if (i !== path.length - 1) { + pointer = pointer[path[i]]; + } else { + pointer[path[i]] = value; + } + } + } + + return optionsObj; + } + /** + * @private + */ + + }, { + key: "_printOptions", + value: function _printOptions() { + var options = this.getOptions(); + this.optionsContainer.innerHTML = '
var options = ' + JSON.stringify(options, null, 2) + '
'; + } + /** + * + * @returns {{}} options + */ + + }, { + key: "getOptions", + value: function getOptions() { + var options = {}; + + for (var i = 0; i < this.changedOptions.length; i++) { + this._constructOptions(this.changedOptions[i].value, this.changedOptions[i].path, options); + } + + return options; + } + }]); + + return Configurator; +}(); + +/** + * This object contains all possible options. It will check if the types are correct, if required if the option is one + * of the allowed values. + * + * __any__ means that the name of the property does not matter. + * __type__ is a required field for all objects and contains the allowed types of all objects + */ +var string = 'string'; +var bool = 'boolean'; +var number = 'number'; +var array = 'array'; +var object = 'object'; // should only be in a __type__ property + +var dom = 'dom'; +var any = 'any'; // List of endpoints + +var endPoints = ['arrow', 'circle', 'bar']; +var allOptions$1 = { + configure: { + enabled: { + boolean: bool + }, + filter: { + boolean: bool, + string: string, + array: array, + 'function': 'function' + }, + container: { + dom: dom + }, + showButton: { + boolean: bool + }, + __type__: { + object: object, + boolean: bool, + string: string, + array: array, + 'function': 'function' + } + }, + edges: { + arrows: { + to: { + enabled: { + boolean: bool + }, + scaleFactor: { + number: number + }, + type: { + string: endPoints + }, + __type__: { + object: object, + boolean: bool + } + }, + middle: { + enabled: { + boolean: bool + }, + scaleFactor: { + number: number + }, + type: { + string: endPoints + }, + __type__: { + object: object, + boolean: bool + } + }, + from: { + enabled: { + boolean: bool + }, + scaleFactor: { + number: number + }, + type: { + string: endPoints + }, + __type__: { + object: object, + boolean: bool + } + }, + __type__: { + string: ['from', 'to', 'middle'], + object: object + } + }, + arrowStrikethrough: { + boolean: bool + }, + background: { + enabled: { + boolean: bool + }, + color: { + string: string + }, + size: { + number: number + }, + dashes: { + boolean: bool, + array: array + }, + __type__: { + object: object, + boolean: bool + } + }, + chosen: { + label: { + boolean: bool, + 'function': 'function' + }, + edge: { + boolean: bool, + 'function': 'function' + }, + __type__: { + object: object, + boolean: bool + } + }, + color: { + color: { + string: string + }, + highlight: { + string: string + }, + hover: { + string: string + }, + inherit: { + string: ['from', 'to', 'both'], + boolean: bool + }, + opacity: { + number: number + }, + __type__: { + object: object, + string: string + } + }, + dashes: { + boolean: bool, + array: array + }, + font: { + color: { + string: string + }, + size: { + number: number + }, + // px + face: { + string: string + }, + background: { + string: string + }, + strokeWidth: { + number: number + }, + // px + strokeColor: { + string: string + }, + align: { + string: ['horizontal', 'top', 'middle', 'bottom'] + }, + vadjust: { + number: number + }, + multi: { + boolean: bool, + string: string + }, + bold: { + color: { + string: string + }, + size: { + number: number + }, + // px + face: { + string: string + }, + mod: { + string: string + }, + vadjust: { + number: number + }, + __type__: { + object: object, + string: string + } + }, + boldital: { + color: { + string: string + }, + size: { + number: number + }, + // px + face: { + string: string + }, + mod: { + string: string + }, + vadjust: { + number: number + }, + __type__: { + object: object, + string: string + } + }, + ital: { + color: { + string: string + }, + size: { + number: number + }, + // px + face: { + string: string + }, + mod: { + string: string + }, + vadjust: { + number: number + }, + __type__: { + object: object, + string: string + } + }, + mono: { + color: { + string: string + }, + size: { + number: number + }, + // px + face: { + string: string + }, + mod: { + string: string + }, + vadjust: { + number: number + }, + __type__: { + object: object, + string: string + } + }, + __type__: { + object: object, + string: string + } + }, + hidden: { + boolean: bool + }, + hoverWidth: { + 'function': 'function', + number: number + }, + label: { + string: string, + 'undefined': 'undefined' + }, + labelHighlightBold: { + boolean: bool + }, + length: { + number: number, + 'undefined': 'undefined' + }, + physics: { + boolean: bool + }, + scaling: { + min: { + number: number + }, + max: { + number: number + }, + label: { + enabled: { + boolean: bool + }, + min: { + number: number + }, + max: { + number: number + }, + maxVisible: { + number: number + }, + drawThreshold: { + number: number + }, + __type__: { + object: object, + boolean: bool + } + }, + customScalingFunction: { + 'function': 'function' + }, + __type__: { + object: object + } + }, + selectionWidth: { + 'function': 'function', + number: number + }, + selfReferenceSize: { + number: number + }, + shadow: { + enabled: { + boolean: bool + }, + color: { + string: string + }, + size: { + number: number + }, + x: { + number: number + }, + y: { + number: number + }, + __type__: { + object: object, + boolean: bool + } + }, + smooth: { + enabled: { + boolean: bool + }, + type: { + string: ['dynamic', 'continuous', 'discrete', 'diagonalCross', 'straightCross', 'horizontal', 'vertical', 'curvedCW', 'curvedCCW', 'cubicBezier'] + }, + roundness: { + number: number + }, + forceDirection: { + string: ['horizontal', 'vertical', 'none'], + boolean: bool + }, + __type__: { + object: object, + boolean: bool + } + }, + title: { + string: string, + 'undefined': 'undefined' + }, + width: { + number: number + }, + widthConstraint: { + maximum: { + number: number + }, + __type__: { + object: object, + boolean: bool, + number: number + } + }, + value: { + number: number, + 'undefined': 'undefined' + }, + __type__: { + object: object + } + }, + groups: { + useDefaultGroups: { + boolean: bool + }, + __any__: 'get from nodes, will be overwritten below', + __type__: { + object: object + } + }, + interaction: { + dragNodes: { + boolean: bool + }, + dragView: { + boolean: bool + }, + hideEdgesOnDrag: { + boolean: bool + }, + hideEdgesOnZoom: { + boolean: bool + }, + hideNodesOnDrag: { + boolean: bool + }, + hover: { + boolean: bool + }, + keyboard: { + enabled: { + boolean: bool + }, + speed: { + x: { + number: number + }, + y: { + number: number + }, + zoom: { + number: number + }, + __type__: { + object: object + } + }, + bindToWindow: { + boolean: bool + }, + __type__: { + object: object, + boolean: bool + } + }, + multiselect: { + boolean: bool + }, + navigationButtons: { + boolean: bool + }, + selectable: { + boolean: bool + }, + selectConnectedEdges: { + boolean: bool + }, + hoverConnectedEdges: { + boolean: bool + }, + tooltipDelay: { + number: number + }, + zoomView: { + boolean: bool + }, + zoomSpeed: { + number: number + }, + __type__: { + object: object + } + }, + layout: { + randomSeed: { + 'undefined': 'undefined', + number: number + }, + improvedLayout: { + boolean: bool + }, + hierarchical: { + enabled: { + boolean: bool + }, + levelSeparation: { + number: number + }, + nodeSpacing: { + number: number + }, + treeSpacing: { + number: number + }, + blockShifting: { + boolean: bool + }, + edgeMinimization: { + boolean: bool + }, + parentCentralization: { + boolean: bool + }, + direction: { + string: ['UD', 'DU', 'LR', 'RL'] + }, + // UD, DU, LR, RL + sortMethod: { + string: ['hubsize', 'directed'] + }, + // hubsize, directed + __type__: { + object: object, + boolean: bool + } + }, + __type__: { + object: object + } + }, + manipulation: { + enabled: { + boolean: bool + }, + initiallyActive: { + boolean: bool + }, + addNode: { + boolean: bool, + 'function': 'function' + }, + addEdge: { + boolean: bool, + 'function': 'function' + }, + editNode: { + 'function': 'function' + }, + editEdge: { + editWithoutDrag: { + 'function': 'function' + }, + __type__: { + object: object, + boolean: bool, + 'function': 'function' + } + }, + deleteNode: { + boolean: bool, + 'function': 'function' + }, + deleteEdge: { + boolean: bool, + 'function': 'function' + }, + controlNodeStyle: 'get from nodes, will be overwritten below', + __type__: { + object: object, + boolean: bool + } + }, + nodes: { + borderWidth: { + number: number + }, + borderWidthSelected: { + number: number, + 'undefined': 'undefined' + }, + brokenImage: { + string: string, + 'undefined': 'undefined' + }, + chosen: { + label: { + boolean: bool, + 'function': 'function' + }, + node: { + boolean: bool, + 'function': 'function' + }, + __type__: { + object: object, + boolean: bool + } + }, + color: { + border: { + string: string + }, + background: { + string: string + }, + highlight: { + border: { + string: string + }, + background: { + string: string + }, + __type__: { + object: object, + string: string + } + }, + hover: { + border: { + string: string + }, + background: { + string: string + }, + __type__: { + object: object, + string: string + } + }, + __type__: { + object: object, + string: string + } + }, + fixed: { + x: { + boolean: bool + }, + y: { + boolean: bool + }, + __type__: { + object: object, + boolean: bool + } + }, + font: { + align: { + string: string + }, + color: { + string: string + }, + size: { + number: number + }, + // px + face: { + string: string + }, + background: { + string: string + }, + strokeWidth: { + number: number + }, + // px + strokeColor: { + string: string + }, + vadjust: { + number: number + }, + multi: { + boolean: bool, + string: string + }, + bold: { + color: { + string: string + }, + size: { + number: number + }, + // px + face: { + string: string + }, + mod: { + string: string + }, + vadjust: { + number: number + }, + __type__: { + object: object, + string: string + } + }, + boldital: { + color: { + string: string + }, + size: { + number: number + }, + // px + face: { + string: string + }, + mod: { + string: string + }, + vadjust: { + number: number + }, + __type__: { + object: object, + string: string + } + }, + ital: { + color: { + string: string + }, + size: { + number: number + }, + // px + face: { + string: string + }, + mod: { + string: string + }, + vadjust: { + number: number + }, + __type__: { + object: object, + string: string + } + }, + mono: { + color: { + string: string + }, + size: { + number: number + }, + // px + face: { + string: string + }, + mod: { + string: string + }, + vadjust: { + number: number + }, + __type__: { + object: object, + string: string + } + }, + __type__: { + object: object, + string: string + } + }, + group: { + string: string, + number: number, + 'undefined': 'undefined' + }, + heightConstraint: { + minimum: { + number: number + }, + valign: { + string: string + }, + __type__: { + object: object, + boolean: bool, + number: number + } + }, + hidden: { + boolean: bool + }, + icon: { + face: { + string: string + }, + code: { + string: string + }, + //'\uf007', + size: { + number: number + }, + //50, + color: { + string: string + }, + __type__: { + object: object + } + }, + id: { + string: string, + number: number + }, + image: { + selected: { + string: string, + 'undefined': 'undefined' + }, + // --> URL + unselected: { + string: string, + 'undefined': 'undefined' + }, + // --> URL + __type__: { + object: object, + string: string + } + }, + label: { + string: string, + 'undefined': 'undefined' + }, + labelHighlightBold: { + boolean: bool + }, + level: { + number: number, + 'undefined': 'undefined' + }, + margin: { + top: { + number: number + }, + right: { + number: number + }, + bottom: { + number: number + }, + left: { + number: number + }, + __type__: { + object: object, + number: number + } + }, + mass: { + number: number + }, + physics: { + boolean: bool + }, + scaling: { + min: { + number: number + }, + max: { + number: number + }, + label: { + enabled: { + boolean: bool + }, + min: { + number: number + }, + max: { + number: number + }, + maxVisible: { + number: number + }, + drawThreshold: { + number: number + }, + __type__: { + object: object, + boolean: bool + } + }, + customScalingFunction: { + 'function': 'function' + }, + __type__: { + object: object + } + }, + shadow: { + enabled: { + boolean: bool + }, + color: { + string: string + }, + size: { + number: number + }, + x: { + number: number + }, + y: { + number: number + }, + __type__: { + object: object, + boolean: bool + } + }, + shape: { + string: ['ellipse', 'circle', 'database', 'box', 'text', 'image', 'circularImage', 'diamond', 'dot', 'star', 'triangle', 'triangleDown', 'square', 'icon', 'hexagon'] + }, + shapeProperties: { + borderDashes: { + boolean: bool, + array: array + }, + borderRadius: { + number: number + }, + interpolation: { + boolean: bool + }, + useImageSize: { + boolean: bool + }, + useBorderWithImage: { + boolean: bool + }, + __type__: { + object: object + } + }, + size: { + number: number + }, + title: { + string: string, + dom: dom, + 'undefined': 'undefined' + }, + value: { + number: number, + 'undefined': 'undefined' + }, + widthConstraint: { + minimum: { + number: number + }, + maximum: { + number: number + }, + __type__: { + object: object, + boolean: bool, + number: number + } + }, + x: { + number: number + }, + y: { + number: number + }, + __type__: { + object: object + } + }, + physics: { + enabled: { + boolean: bool + }, + barnesHut: { + gravitationalConstant: { + number: number + }, + centralGravity: { + number: number + }, + springLength: { + number: number + }, + springConstant: { + number: number + }, + damping: { + number: number + }, + avoidOverlap: { + number: number + }, + __type__: { + object: object + } + }, + forceAtlas2Based: { + gravitationalConstant: { + number: number + }, + centralGravity: { + number: number + }, + springLength: { + number: number + }, + springConstant: { + number: number + }, + damping: { + number: number + }, + avoidOverlap: { + number: number + }, + __type__: { + object: object + } + }, + repulsion: { + centralGravity: { + number: number + }, + springLength: { + number: number + }, + springConstant: { + number: number + }, + nodeDistance: { + number: number + }, + damping: { + number: number + }, + __type__: { + object: object + } + }, + hierarchicalRepulsion: { + centralGravity: { + number: number + }, + springLength: { + number: number + }, + springConstant: { + number: number + }, + nodeDistance: { + number: number + }, + damping: { + number: number + }, + __type__: { + object: object + } + }, + maxVelocity: { + number: number + }, + minVelocity: { + number: number + }, + // px/s + solver: { + string: ['barnesHut', 'repulsion', 'hierarchicalRepulsion', 'forceAtlas2Based'] + }, + stabilization: { + enabled: { + boolean: bool + }, + iterations: { + number: number + }, + // maximum number of iteration to stabilize + updateInterval: { + number: number + }, + onlyDynamicEdges: { + boolean: bool + }, + fit: { + boolean: bool + }, + __type__: { + object: object, + boolean: bool + } + }, + timestep: { + number: number + }, + adaptiveTimestep: { + boolean: bool + }, + __type__: { + object: object, + boolean: bool + } + }, + //globals : + autoResize: { + boolean: bool + }, + clickToUse: { + boolean: bool + }, + locale: { + string: string + }, + locales: { + __any__: { + any: any + }, + __type__: { + object: object + } + }, + height: { + string: string + }, + width: { + string: string + }, + __type__: { + object: object + } +}; +allOptions$1.groups.__any__ = allOptions$1.nodes; +allOptions$1.manipulation.controlNodeStyle = allOptions$1.nodes; +var configureOptions = { + nodes: { + borderWidth: [1, 0, 10, 1], + borderWidthSelected: [2, 0, 10, 1], + color: { + border: ['color', '#2B7CE9'], + background: ['color', '#97C2FC'], + highlight: { + border: ['color', '#2B7CE9'], + background: ['color', '#D2E5FF'] + }, + hover: { + border: ['color', '#2B7CE9'], + background: ['color', '#D2E5FF'] + } + }, + fixed: { + x: false, + y: false + }, + font: { + color: ['color', '#343434'], + size: [14, 0, 100, 1], + // px + face: ['arial', 'verdana', 'tahoma'], + background: ['color', 'none'], + strokeWidth: [0, 0, 50, 1], + // px + strokeColor: ['color', '#ffffff'] + }, + //group: 'string', + hidden: false, + labelHighlightBold: true, + //icon: { + // face: 'string', //'FontAwesome', + // code: 'string', //'\uf007', + // size: [50, 0, 200, 1], //50, + // color: ['color','#2B7CE9'] //'#aa00ff' + //}, + //image: 'string', // --> URL + physics: true, + scaling: { + min: [10, 0, 200, 1], + max: [30, 0, 200, 1], + label: { + enabled: false, + min: [14, 0, 200, 1], + max: [30, 0, 200, 1], + maxVisible: [30, 0, 200, 1], + drawThreshold: [5, 0, 20, 1] + } + }, + shadow: { + enabled: false, + color: 'rgba(0,0,0,0.5)', + size: [10, 0, 20, 1], + x: [5, -30, 30, 1], + y: [5, -30, 30, 1] + }, + shape: ['ellipse', 'box', 'circle', 'database', 'diamond', 'dot', 'square', 'star', 'text', 'triangle', 'triangleDown', 'hexagon'], + shapeProperties: { + borderDashes: false, + borderRadius: [6, 0, 20, 1], + interpolation: true, + useImageSize: false + }, + size: [25, 0, 200, 1] + }, + edges: { + arrows: { + to: { + enabled: false, + scaleFactor: [1, 0, 3, 0.05], + type: 'arrow' + }, + middle: { + enabled: false, + scaleFactor: [1, 0, 3, 0.05], + type: 'arrow' + }, + from: { + enabled: false, + scaleFactor: [1, 0, 3, 0.05], + type: 'arrow' + } + }, + arrowStrikethrough: true, + color: { + color: ['color', '#848484'], + highlight: ['color', '#848484'], + hover: ['color', '#848484'], + inherit: ['from', 'to', 'both', true, false], + opacity: [1, 0, 1, 0.05] + }, + dashes: false, + font: { + color: ['color', '#343434'], + size: [14, 0, 100, 1], + // px + face: ['arial', 'verdana', 'tahoma'], + background: ['color', 'none'], + strokeWidth: [2, 0, 50, 1], + // px + strokeColor: ['color', '#ffffff'], + align: ['horizontal', 'top', 'middle', 'bottom'] + }, + hidden: false, + hoverWidth: [1.5, 0, 5, 0.1], + labelHighlightBold: true, + physics: true, + scaling: { + min: [1, 0, 100, 1], + max: [15, 0, 100, 1], + label: { + enabled: true, + min: [14, 0, 200, 1], + max: [30, 0, 200, 1], + maxVisible: [30, 0, 200, 1], + drawThreshold: [5, 0, 20, 1] + } + }, + selectionWidth: [1.5, 0, 5, 0.1], + selfReferenceSize: [20, 0, 200, 1], + shadow: { + enabled: false, + color: 'rgba(0,0,0,0.5)', + size: [10, 0, 20, 1], + x: [5, -30, 30, 1], + y: [5, -30, 30, 1] + }, + smooth: { + enabled: true, + type: ['dynamic', 'continuous', 'discrete', 'diagonalCross', 'straightCross', 'horizontal', 'vertical', 'curvedCW', 'curvedCCW', 'cubicBezier'], + forceDirection: ['horizontal', 'vertical', 'none'], + roundness: [0.5, 0, 1, 0.05] + }, + width: [1, 0, 30, 1] + }, + layout: { + //randomSeed: [0, 0, 500, 1], + //improvedLayout: true, + hierarchical: { + enabled: false, + levelSeparation: [150, 20, 500, 5], + nodeSpacing: [100, 20, 500, 5], + treeSpacing: [200, 20, 500, 5], + blockShifting: true, + edgeMinimization: true, + parentCentralization: true, + direction: ['UD', 'DU', 'LR', 'RL'], + // UD, DU, LR, RL + sortMethod: ['hubsize', 'directed'] // hubsize, directed + + } + }, + interaction: { + dragNodes: true, + dragView: true, + hideEdgesOnDrag: false, + hideEdgesOnZoom: false, + hideNodesOnDrag: false, + hover: false, + keyboard: { + enabled: false, + speed: { + x: [10, 0, 40, 1], + y: [10, 0, 40, 1], + zoom: [0.02, 0, 0.1, 0.005] + }, + bindToWindow: true + }, + multiselect: false, + navigationButtons: false, + selectable: true, + selectConnectedEdges: true, + hoverConnectedEdges: true, + tooltipDelay: [300, 0, 1000, 25], + zoomView: true, + zoomSpeed: [1, 1, 1, 1] + }, + manipulation: { + enabled: false, + initiallyActive: false + }, + physics: { + enabled: true, + barnesHut: { + //theta: [0.5, 0.1, 1, 0.05], + gravitationalConstant: [-2000, -30000, 0, 50], + centralGravity: [0.3, 0, 10, 0.05], + springLength: [95, 0, 500, 5], + springConstant: [0.04, 0, 1.2, 0.005], + damping: [0.09, 0, 1, 0.01], + avoidOverlap: [0, 0, 1, 0.01] + }, + forceAtlas2Based: { + //theta: [0.5, 0.1, 1, 0.05], + gravitationalConstant: [-50, -500, 0, 1], + centralGravity: [0.01, 0, 1, 0.005], + springLength: [95, 0, 500, 5], + springConstant: [0.08, 0, 1.2, 0.005], + damping: [0.4, 0, 1, 0.01], + avoidOverlap: [0, 0, 1, 0.01] + }, + repulsion: { + centralGravity: [0.2, 0, 10, 0.05], + springLength: [200, 0, 500, 5], + springConstant: [0.05, 0, 1.2, 0.005], + nodeDistance: [100, 0, 500, 5], + damping: [0.09, 0, 1, 0.01] + }, + hierarchicalRepulsion: { + centralGravity: [0.2, 0, 10, 0.05], + springLength: [100, 0, 500, 5], + springConstant: [0.01, 0, 1.2, 0.005], + nodeDistance: [120, 0, 500, 5], + damping: [0.09, 0, 1, 0.01] + }, + maxVelocity: [50, 0, 150, 1], + minVelocity: [0.1, 0.01, 0.5, 0.01], + solver: ['barnesHut', 'forceAtlas2Based', 'repulsion', 'hierarchicalRepulsion'], + timestep: [0.5, 0.01, 1, 0.01] //adaptiveTimestep: true + + } +}; + +var allOptions$2 = /*#__PURE__*/Object.freeze({ + allOptions: allOptions$1, + configureOptions: configureOptions +}); + +/** + * The Floyd–Warshall algorithm is an algorithm for finding shortest paths in + * a weighted graph with positive or negative edge weights (but with no negative + * cycles). - https://en.wikipedia.org/wiki/Floyd–Warshall_algorithm + */ +var FloydWarshall = +/*#__PURE__*/ +function () { + /** + * @ignore + */ + function FloydWarshall() { + classCallCheck$1(this, FloydWarshall); + } + /** + * + * @param {Object} body + * @param {Array.} nodesArray + * @param {Array.} edgesArray + * @returns {{}} + */ + + + createClass$1(FloydWarshall, [{ + key: "getDistances", + value: function getDistances(body, nodesArray, edgesArray) { + var D_matrix = {}; + var edges = body.edges; // prepare matrix with large numbers + + for (var i = 0; i < nodesArray.length; i++) { + var node = nodesArray[i]; + var cell = {}; + D_matrix[node] = cell; + + for (var j = 0; j < nodesArray.length; j++) { + cell[nodesArray[j]] = i == j ? 0 : 1e9; + } + } // put the weights for the edges in. This assumes unidirectionality. + + + for (var _i = 0; _i < edgesArray.length; _i++) { + var edge = edges[edgesArray[_i]]; // edge has to be connected if it counts to the distances. If it is connected to inner clusters it will crash so we also check if it is in the D_matrix + + if (edge.connected === true && D_matrix[edge.fromId] !== undefined && D_matrix[edge.toId] !== undefined) { + D_matrix[edge.fromId][edge.toId] = 1; + D_matrix[edge.toId][edge.fromId] = 1; + } + } + + var nodeCount = nodesArray.length; // Adapted FloydWarshall based on unidirectionality to greatly reduce complexity. + + for (var k = 0; k < nodeCount; k++) { + var knode = nodesArray[k]; + var kcolm = D_matrix[knode]; + + for (var _i2 = 0; _i2 < nodeCount - 1; _i2++) { + var inode = nodesArray[_i2]; + var icolm = D_matrix[inode]; + + for (var _j = _i2 + 1; _j < nodeCount; _j++) { + var jnode = nodesArray[_j]; + var jcolm = D_matrix[jnode]; + var val = Math.min(icolm[jnode], icolm[knode] + kcolm[jnode]); + icolm[jnode] = val; + jcolm[inode] = val; + } + } + } + + return D_matrix; + } + }]); + + return FloydWarshall; +}(); + +/** + * KamadaKawai positions the nodes initially based on + * + * "AN ALGORITHM FOR DRAWING GENERAL UNDIRECTED GRAPHS" + * -- Tomihisa KAMADA and Satoru KAWAI in 1989 + * + * Possible optimizations in the distance calculation can be implemented. + */ + +var KamadaKawai = +/*#__PURE__*/ +function () { + /** + * @param {Object} body + * @param {number} edgeLength + * @param {number} edgeStrength + */ + function KamadaKawai(body, edgeLength, edgeStrength) { + classCallCheck$1(this, KamadaKawai); + + this.body = body; + this.springLength = edgeLength; + this.springConstant = edgeStrength; + this.distanceSolver = new FloydWarshall(); + } + /** + * Not sure if needed but can be used to update the spring length and spring constant + * @param {Object} options + */ + + + createClass$1(KamadaKawai, [{ + key: "setOptions", + value: function setOptions(options) { + if (options) { + if (options.springLength) { + this.springLength = options.springLength; + } + + if (options.springConstant) { + this.springConstant = options.springConstant; + } + } + } + /** + * Position the system + * @param {Array.} nodesArray + * @param {Array.} edgesArray + * @param {boolean} [ignoreClusters=false] + */ + + }, { + key: "solve", + value: function solve(nodesArray, edgesArray) { + var ignoreClusters = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; + // get distance matrix + var D_matrix = this.distanceSolver.getDistances(this.body, nodesArray, edgesArray); // distance matrix + // get the L Matrix + + this._createL_matrix(D_matrix); // get the K Matrix + + + this._createK_matrix(D_matrix); // initial E Matrix + + + this._createE_matrix(); // calculate positions + + + var threshold = 0.01; + var innerThreshold = 1; + var iterations = 0; + var maxIterations = Math.max(1000, Math.min(10 * this.body.nodeIndices.length, 6000)); + var maxInnerIterations = 5; + var maxEnergy = 1e9; + var highE_nodeId = 0, + dE_dx = 0, + dE_dy = 0, + delta_m = 0, + subIterations = 0; + + while (maxEnergy > threshold && iterations < maxIterations) { + iterations += 1; + + var _this$_getHighestEner = this._getHighestEnergyNode(ignoreClusters); + + var _this$_getHighestEner2 = slicedToArray(_this$_getHighestEner, 4); + + highE_nodeId = _this$_getHighestEner2[0]; + maxEnergy = _this$_getHighestEner2[1]; + dE_dx = _this$_getHighestEner2[2]; + dE_dy = _this$_getHighestEner2[3]; + delta_m = maxEnergy; + subIterations = 0; + + while (delta_m > innerThreshold && subIterations < maxInnerIterations) { + subIterations += 1; + + this._moveNode(highE_nodeId, dE_dx, dE_dy); + + var _this$_getEnergy = this._getEnergy(highE_nodeId); + + var _this$_getEnergy2 = slicedToArray(_this$_getEnergy, 3); + + delta_m = _this$_getEnergy2[0]; + dE_dx = _this$_getEnergy2[1]; + dE_dy = _this$_getEnergy2[2]; + } + } + } + /** + * get the node with the highest energy + * @param {boolean} ignoreClusters + * @returns {number[]} + * @private + */ + + }, { + key: "_getHighestEnergyNode", + value: function _getHighestEnergyNode(ignoreClusters) { + var nodesArray = this.body.nodeIndices; + var nodes = this.body.nodes; + var maxEnergy = 0; + var maxEnergyNodeId = nodesArray[0]; + var dE_dx_max = 0, + dE_dy_max = 0; + + for (var nodeIdx = 0; nodeIdx < nodesArray.length; nodeIdx++) { + var m = nodesArray[nodeIdx]; // by not evaluating nodes with predefined positions we should only move nodes that have no positions. + + if (nodes[m].predefinedPosition === false || nodes[m].isCluster === true && ignoreClusters === true || nodes[m].options.fixed.x === true || nodes[m].options.fixed.y === true) { + var _this$_getEnergy3 = this._getEnergy(m), + _this$_getEnergy4 = slicedToArray(_this$_getEnergy3, 3), + delta_m = _this$_getEnergy4[0], + dE_dx = _this$_getEnergy4[1], + dE_dy = _this$_getEnergy4[2]; + + if (maxEnergy < delta_m) { + maxEnergy = delta_m; + maxEnergyNodeId = m; + dE_dx_max = dE_dx; + dE_dy_max = dE_dy; + } + } + } + + return [maxEnergyNodeId, maxEnergy, dE_dx_max, dE_dy_max]; + } + /** + * calculate the energy of a single node + * @param {Node.id} m + * @returns {number[]} + * @private + */ + + }, { + key: "_getEnergy", + value: function _getEnergy(m) { + var _this$E_sums$m = slicedToArray(this.E_sums[m], 2), + dE_dx = _this$E_sums$m[0], + dE_dy = _this$E_sums$m[1]; + + var delta_m = Math.sqrt(Math.pow(dE_dx, 2) + Math.pow(dE_dy, 2)); + return [delta_m, dE_dx, dE_dy]; + } + /** + * move the node based on it's energy + * the dx and dy are calculated from the linear system proposed by Kamada and Kawai + * @param {number} m + * @param {number} dE_dx + * @param {number} dE_dy + * @private + */ + + }, { + key: "_moveNode", + value: function _moveNode(m, dE_dx, dE_dy) { + var nodesArray = this.body.nodeIndices; + var nodes = this.body.nodes; + var d2E_dx2 = 0; + var d2E_dxdy = 0; + var d2E_dy2 = 0; + var x_m = nodes[m].x; + var y_m = nodes[m].y; + var km = this.K_matrix[m]; + var lm = this.L_matrix[m]; + + for (var iIdx = 0; iIdx < nodesArray.length; iIdx++) { + var i = nodesArray[iIdx]; + + if (i !== m) { + var x_i = nodes[i].x; + var y_i = nodes[i].y; + var kmat = km[i]; + var lmat = lm[i]; + var denominator = 1.0 / Math.pow(Math.pow(x_m - x_i, 2) + Math.pow(y_m - y_i, 2), 1.5); + d2E_dx2 += kmat * (1 - lmat * Math.pow(y_m - y_i, 2) * denominator); + d2E_dxdy += kmat * (lmat * (x_m - x_i) * (y_m - y_i) * denominator); + d2E_dy2 += kmat * (1 - lmat * Math.pow(x_m - x_i, 2) * denominator); + } + } // make the variable names easier to make the solving of the linear system easier to read + + + var A = d2E_dx2, + B = d2E_dxdy, + C = dE_dx, + D = d2E_dy2, + E = dE_dy; // solve the linear system for dx and dy + + var dy = (C / A + E / B) / (B / A - D / B); + var dx = -(B * dy + C) / A; // move the node + + nodes[m].x += dx; + nodes[m].y += dy; // Recalculate E_matrix (should be incremental) + + this._updateE_matrix(m); + } + /** + * Create the L matrix: edge length times shortest path + * @param {Object} D_matrix + * @private + */ + + }, { + key: "_createL_matrix", + value: function _createL_matrix(D_matrix) { + var nodesArray = this.body.nodeIndices; + var edgeLength = this.springLength; + this.L_matrix = []; + + for (var i = 0; i < nodesArray.length; i++) { + this.L_matrix[nodesArray[i]] = {}; + + for (var j = 0; j < nodesArray.length; j++) { + this.L_matrix[nodesArray[i]][nodesArray[j]] = edgeLength * D_matrix[nodesArray[i]][nodesArray[j]]; + } + } + } + /** + * Create the K matrix: spring constants times shortest path + * @param {Object} D_matrix + * @private + */ + + }, { + key: "_createK_matrix", + value: function _createK_matrix(D_matrix) { + var nodesArray = this.body.nodeIndices; + var edgeStrength = this.springConstant; + this.K_matrix = []; + + for (var i = 0; i < nodesArray.length; i++) { + this.K_matrix[nodesArray[i]] = {}; + + for (var j = 0; j < nodesArray.length; j++) { + this.K_matrix[nodesArray[i]][nodesArray[j]] = edgeStrength * Math.pow(D_matrix[nodesArray[i]][nodesArray[j]], -2); + } + } + } + /** + * Create matrix with all energies between nodes + * @private + */ + + }, { + key: "_createE_matrix", + value: function _createE_matrix() { + var nodesArray = this.body.nodeIndices; + var nodes = this.body.nodes; + this.E_matrix = {}; + this.E_sums = {}; + + for (var mIdx = 0; mIdx < nodesArray.length; mIdx++) { + this.E_matrix[nodesArray[mIdx]] = []; + } + + for (var _mIdx = 0; _mIdx < nodesArray.length; _mIdx++) { + var m = nodesArray[_mIdx]; + var x_m = nodes[m].x; + var y_m = nodes[m].y; + var dE_dx = 0; + var dE_dy = 0; + + for (var iIdx = _mIdx; iIdx < nodesArray.length; iIdx++) { + var i = nodesArray[iIdx]; + + if (i !== m) { + var x_i = nodes[i].x; + var y_i = nodes[i].y; + var denominator = 1.0 / Math.sqrt(Math.pow(x_m - x_i, 2) + Math.pow(y_m - y_i, 2)); + this.E_matrix[m][iIdx] = [this.K_matrix[m][i] * (x_m - x_i - this.L_matrix[m][i] * (x_m - x_i) * denominator), this.K_matrix[m][i] * (y_m - y_i - this.L_matrix[m][i] * (y_m - y_i) * denominator)]; + this.E_matrix[i][_mIdx] = this.E_matrix[m][iIdx]; + dE_dx += this.E_matrix[m][iIdx][0]; + dE_dy += this.E_matrix[m][iIdx][1]; + } + } //Store sum + + + this.E_sums[m] = [dE_dx, dE_dy]; + } + } + /** + * Update method, just doing single column (rows are auto-updated) (update all sums) + * + * @param {number} m + * @private + */ + + }, { + key: "_updateE_matrix", + value: function _updateE_matrix(m) { + var nodesArray = this.body.nodeIndices; + var nodes = this.body.nodes; + var colm = this.E_matrix[m]; + var kcolm = this.K_matrix[m]; + var lcolm = this.L_matrix[m]; + var x_m = nodes[m].x; + var y_m = nodes[m].y; + var dE_dx = 0; + var dE_dy = 0; + + for (var iIdx = 0; iIdx < nodesArray.length; iIdx++) { + var i = nodesArray[iIdx]; + + if (i !== m) { + //Keep old energy value for sum modification below + var cell = colm[iIdx]; + var oldDx = cell[0]; + var oldDy = cell[1]; //Calc new energy: + + var x_i = nodes[i].x; + var y_i = nodes[i].y; + var denominator = 1.0 / Math.sqrt(Math.pow(x_m - x_i, 2) + Math.pow(y_m - y_i, 2)); + var dx = kcolm[i] * (x_m - x_i - lcolm[i] * (x_m - x_i) * denominator); + var dy = kcolm[i] * (y_m - y_i - lcolm[i] * (y_m - y_i) * denominator); + colm[iIdx] = [dx, dy]; + dE_dx += dx; + dE_dy += dy; //add new energy to sum of each column + + var sum = this.E_sums[i]; + sum[0] += dx - oldDx; + sum[1] += dy - oldDy; + } + } //Store sum at -1 index + + + this.E_sums[m] = [dE_dx, dE_dy]; + } + }]); + + return KamadaKawai; +}(); + +// Load custom shapes into CanvasRenderingContext2D +/** + * Create a network visualization, displaying nodes and edges. + * + * @param {Element} container The DOM element in which the Network will + * be created. Normally a div element. + * @param {Object} data An object containing parameters + * {Array} nodes + * {Array} edges + * @param {Object} options Options + * @constructor Network + */ + +function Network(container, data, options) { + var _this = this; + + if (!(this instanceof Network)) { + throw new SyntaxError('Constructor must be called with the new operator'); + } // set constant values + + + this.options = {}; + this.defaultOptions = { + locale: 'en', + locales: locales, + clickToUse: false + }; + util.extend(this.options, this.defaultOptions); + /** + * Containers for nodes and edges. + * + * 'edges' and 'nodes' contain the full definitions of all the network elements. + * 'nodeIndices' and 'edgeIndices' contain the id's of the active elements. + * + * The distinction is important, because a defined node need not be active, i.e. + * visible on the canvas. This happens in particular when clusters are defined, in + * that case there will be nodes and edges not displayed. + * The bottom line is that all code with actions related to visibility, *must* use + * 'nodeIndices' and 'edgeIndices', not 'nodes' and 'edges' directly. + */ + + this.body = { + container: container, + // See comment above for following fields + nodes: {}, + nodeIndices: [], + edges: {}, + edgeIndices: [], + emitter: { + on: this.on.bind(this), + off: this.off.bind(this), + emit: this.emit.bind(this), + once: this.once.bind(this) + }, + eventListeners: { + onTap: function onTap() {}, + onTouch: function onTouch() {}, + onDoubleTap: function onDoubleTap() {}, + onHold: function onHold() {}, + onDragStart: function onDragStart() {}, + onDrag: function onDrag() {}, + onDragEnd: function onDragEnd() {}, + onMouseWheel: function onMouseWheel() {}, + onPinch: function onPinch() {}, + onMouseMove: function onMouseMove() {}, + onRelease: function onRelease() {}, + onContext: function onContext() {} + }, + data: { + nodes: null, + // A DataSet or DataView + edges: null // A DataSet or DataView + + }, + functions: { + createNode: function createNode() {}, + createEdge: function createEdge() {}, + getPointer: function getPointer() {} + }, + modules: {}, + view: { + scale: 1, + translation: { + x: 0, + y: 0 + } + } + }; // bind the event listeners + + this.bindEventListeners(); // setting up all modules + + this.images = new Images(function () { + return _this.body.emitter.emit("_requestRedraw"); + }); // object with images + + this.groups = new Groups(); // object with groups + + this.canvas = new Canvas(this.body); // DOM handler + + this.selectionHandler = new SelectionHandler(this.body, this.canvas); // Selection handler + + this.interactionHandler = new InteractionHandler(this.body, this.canvas, this.selectionHandler); // Interaction handler handles all the hammer bindings (that are bound by canvas), key + + this.view = new View(this.body, this.canvas); // camera handler, does animations and zooms + + this.renderer = new CanvasRenderer(this.body, this.canvas); // renderer, starts renderloop, has events that modules can hook into + + this.physics = new PhysicsEngine(this.body); // physics engine, does all the simulations + + this.layoutEngine = new LayoutEngine(this.body); // layout engine for inital layout and hierarchical layout + + this.clustering = new ClusterEngine(this.body); // clustering api + + this.manipulation = new ManipulationSystem(this.body, this.canvas, this.selectionHandler); // data manipulation system + + this.nodesHandler = new NodesHandler(this.body, this.images, this.groups, this.layoutEngine); // Handle adding, deleting and updating of nodes as well as global options + + this.edgesHandler = new EdgesHandler(this.body, this.images, this.groups); // Handle adding, deleting and updating of edges as well as global options + + this.body.modules["kamadaKawai"] = new KamadaKawai(this.body, 150, 0.05); // Layouting algorithm. + + this.body.modules["clustering"] = this.clustering; // create the DOM elements + + this.canvas._create(); // apply options + + + this.setOptions(options); // load data (the disable start variable will be the same as the enabled clustering) + + this.setData(data); +} // Extend Network with an Emitter mixin + +componentEmitter(Network.prototype); +/** + * Set options + * @param {Object} options + */ + +Network.prototype.setOptions = function (options) { + var _this2 = this; + + if (options === null) { + options = undefined; // This ensures that options handling doesn't crash in the handling + } + + if (options !== undefined) { + var errorFound = Validator.validate(options, allOptions$1); + + if (errorFound === true) { + console.log('%cErrors have been found in the supplied options object.', printStyle); + } // copy the global fields over + + + var fields = ['locale', 'locales', 'clickToUse']; + util.selectiveDeepExtend(fields, this.options, options); // the hierarchical system can adapt the edges and the physics to it's own options because not all combinations work with the hierarichical system. + + options = this.layoutEngine.setOptions(options.layout, options); + this.canvas.setOptions(options); // options for canvas are in globals + // pass the options to the modules + + this.groups.setOptions(options.groups); + this.nodesHandler.setOptions(options.nodes); + this.edgesHandler.setOptions(options.edges); + this.physics.setOptions(options.physics); + this.manipulation.setOptions(options.manipulation, options, this.options); // manipulation uses the locales in the globals + + this.interactionHandler.setOptions(options.interaction); + this.renderer.setOptions(options.interaction); // options for rendering are in interaction + + this.selectionHandler.setOptions(options.interaction); // options for selection are in interaction + // reload the settings of the nodes to apply changes in groups that are not referenced by pointer. + + if (options.groups !== undefined) { + this.body.emitter.emit("refreshNodes"); + } // these two do not have options at the moment, here for completeness + //this.view.setOptions(options.view); + //this.clustering.setOptions(options.clustering); + + + if ('configure' in options) { + if (!this.configurator) { + this.configurator = new Configurator(this, this.body.container, configureOptions, this.canvas.pixelRatio); + } + + this.configurator.setOptions(options.configure); + } // if the configuration system is enabled, copy all options and put them into the config system + + + if (this.configurator && this.configurator.options.enabled === true) { + var networkOptions = { + nodes: {}, + edges: {}, + layout: {}, + interaction: {}, + manipulation: {}, + physics: {}, + global: {} + }; + util.deepExtend(networkOptions.nodes, this.nodesHandler.options); + util.deepExtend(networkOptions.edges, this.edgesHandler.options); + util.deepExtend(networkOptions.layout, this.layoutEngine.options); // load the selectionHandler and render default options in to the interaction group + + util.deepExtend(networkOptions.interaction, this.selectionHandler.options); + util.deepExtend(networkOptions.interaction, this.renderer.options); + util.deepExtend(networkOptions.interaction, this.interactionHandler.options); + util.deepExtend(networkOptions.manipulation, this.manipulation.options); + util.deepExtend(networkOptions.physics, this.physics.options); // load globals into the global object + + util.deepExtend(networkOptions.global, this.canvas.options); + util.deepExtend(networkOptions.global, this.options); + this.configurator.setModuleOptions(networkOptions); + } // handle network global options + + + if (options.clickToUse !== undefined) { + if (options.clickToUse === true) { + if (this.activator === undefined) { + this.activator = new Activator_1(this.canvas.frame); + this.activator.on('change', function () { + _this2.body.emitter.emit("activate"); + }); + } + } else { + if (this.activator !== undefined) { + this.activator.destroy(); + delete this.activator; + } + + this.body.emitter.emit("activate"); + } + } else { + this.body.emitter.emit("activate"); + } + + this.canvas.setSize(); // start the physics simulation. Can be safely called multiple times. + + this.body.emitter.emit("startSimulation"); + } +}; +/** + * Update the visible nodes and edges list with the most recent node state. + * + * Visible nodes are stored in this.body.nodeIndices. + * Visible edges are stored in this.body.edgeIndices. + * A node or edges is visible if it is not hidden or clustered. + * + * @private + */ + + +Network.prototype._updateVisibleIndices = function () { + var nodes = this.body.nodes; + var edges = this.body.edges; + this.body.nodeIndices = []; + this.body.edgeIndices = []; + + for (var nodeId in nodes) { + if (nodes.hasOwnProperty(nodeId)) { + if (!this.clustering._isClusteredNode(nodeId) && nodes[nodeId].options.hidden === false) { + this.body.nodeIndices.push(nodes[nodeId].id); + } + } + } + + for (var edgeId in edges) { + if (edges.hasOwnProperty(edgeId)) { + var edge = edges[edgeId]; // It can happen that this is executed *after* a node edge has been removed, + // but *before* the edge itself has been removed. Taking this into account. + + var fromNode = nodes[edge.fromId]; + var toNode = nodes[edge.toId]; + var edgeNodesPresent = fromNode !== undefined && toNode !== undefined; + var isVisible = !this.clustering._isClusteredEdge(edgeId) && edge.options.hidden === false && edgeNodesPresent && fromNode.options.hidden === false // Also hidden if any of its connecting nodes are hidden + && toNode.options.hidden === false; // idem + + if (isVisible) { + this.body.edgeIndices.push(edge.id); + } + } + } +}; +/** + * Bind all events + */ + + +Network.prototype.bindEventListeners = function () { + var _this3 = this; + + // This event will trigger a rebuilding of the cache everything. + // Used when nodes or edges have been added or removed. + this.body.emitter.on("_dataChanged", function () { + _this3.edgesHandler._updateState(); + + _this3.body.emitter.emit("_dataUpdated"); + }); // this is called when options of EXISTING nodes or edges have changed. + + this.body.emitter.on("_dataUpdated", function () { + // Order important in following block + _this3.clustering._updateState(); + + _this3._updateVisibleIndices(); + + _this3._updateValueRange(_this3.body.nodes); + + _this3._updateValueRange(_this3.body.edges); // start simulation (can be called safely, even if already running) + + + _this3.body.emitter.emit("startSimulation"); + + _this3.body.emitter.emit("_requestRedraw"); + }); +}; +/** + * Set nodes and edges, and optionally options as well. + * + * @param {Object} data Object containing parameters: + * {Array | DataSet | DataView} [nodes] Array with nodes + * {Array | DataSet | DataView} [edges] Array with edges + * {String} [dot] String containing data in DOT format + * {String} [gephi] String containing data in gephi JSON format + * {Options} [options] Object with options + */ + + +Network.prototype.setData = function (data) { + // reset the physics engine. + this.body.emitter.emit("resetPhysics"); + this.body.emitter.emit("_resetData"); // unselect all to ensure no selections from old data are carried over. + + this.selectionHandler.unselectAll(); + + if (data && data.dot && (data.nodes || data.edges)) { + throw new SyntaxError('Data must contain either parameter "dot" or ' + ' parameter pair "nodes" and "edges", but not both.'); + } // set options + + + this.setOptions(data && data.options); // set all data + + if (data && data.dot) { + console.log('The dot property has been deprecated. Please use the static convertDot method to convert DOT into vis.network format and use the normal data format with nodes and edges. This converter is used like this: var data = vis.network.convertDot(dotString);'); // parse DOT file + + var dotData = dotparser.DOTToGraph(data.dot); + this.setData(dotData); + return; + } else if (data && data.gephi) { + // parse DOT file + console.log('The gephi property has been deprecated. Please use the static convertGephi method to convert gephi into vis.network format and use the normal data format with nodes and edges. This converter is used like this: var data = vis.network.convertGephi(gephiJson);'); + var gephiData = parseGephi(data.gephi); + this.setData(gephiData); + return; + } else { + this.nodesHandler.setData(data && data.nodes, true); + this.edgesHandler.setData(data && data.edges, true); + } // emit change in data + + + this.body.emitter.emit("_dataChanged"); // emit data loaded + + this.body.emitter.emit("_dataLoaded"); // find a stable position or start animating to a stable position + + this.body.emitter.emit("initPhysics"); +}; +/** + * Cleans up all bindings of the network, removing it fully from the memory IF the variable is set to null after calling this function. + * var network = new vis.Network(..); + * network.destroy(); + * network = null; + */ + + +Network.prototype.destroy = function () { + this.body.emitter.emit("destroy"); // clear events + + this.body.emitter.off(); + this.off(); // delete modules + + delete this.groups; + delete this.canvas; + delete this.selectionHandler; + delete this.interactionHandler; + delete this.view; + delete this.renderer; + delete this.physics; + delete this.layoutEngine; + delete this.clustering; + delete this.manipulation; + delete this.nodesHandler; + delete this.edgesHandler; + delete this.configurator; + delete this.images; + + for (var nodeId in this.body.nodes) { + if (!this.body.nodes.hasOwnProperty(nodeId)) continue; + delete this.body.nodes[nodeId]; + } + + for (var edgeId in this.body.edges) { + if (!this.body.edges.hasOwnProperty(edgeId)) continue; + delete this.body.edges[edgeId]; + } // remove the container and everything inside it recursively + + + util.recursiveDOMDelete(this.body.container); +}; +/** + * Update the values of all object in the given array according to the current + * value range of the objects in the array. + * @param {Object} obj An object containing a set of Edges or Nodes + * The objects must have a method getValue() and + * setValueRange(min, max). + * @private + */ + + +Network.prototype._updateValueRange = function (obj) { + var id; // determine the range of the objects + + var valueMin = undefined; + var valueMax = undefined; + var valueTotal = 0; + + for (id in obj) { + if (obj.hasOwnProperty(id)) { + var value = obj[id].getValue(); + + if (value !== undefined) { + valueMin = valueMin === undefined ? value : Math.min(value, valueMin); + valueMax = valueMax === undefined ? value : Math.max(value, valueMax); + valueTotal += value; + } + } + } // adjust the range of all objects + + + if (valueMin !== undefined && valueMax !== undefined) { + for (id in obj) { + if (obj.hasOwnProperty(id)) { + obj[id].setValueRange(valueMin, valueMax, valueTotal); + } + } + } +}; +/** + * Returns true when the Network is active. + * @returns {boolean} + */ + + +Network.prototype.isActive = function () { + return !this.activator || this.activator.active; +}; + +Network.prototype.setSize = function () { + return this.canvas.setSize.apply(this.canvas, arguments); +}; + +Network.prototype.canvasToDOM = function () { + return this.canvas.canvasToDOM.apply(this.canvas, arguments); +}; + +Network.prototype.DOMtoCanvas = function () { + return this.canvas.DOMtoCanvas.apply(this.canvas, arguments); +}; +/** + * Nodes can be in clusters. Clusters can also be in clusters. This function returns and array of + * nodeIds showing where the node is. + * + * If any nodeId in the chain, especially the first passed in as a parameter, is not present in + * the current nodes list, an empty array is returned. + * + * Example: + * cluster 'A' contains cluster 'B', + * cluster 'B' contains cluster 'C', + * cluster 'C' contains node 'fred'. + * `jsnetwork.clustering.findNode('fred')` will return `['A','B','C','fred']`. + * + * @param {string|number} nodeId + * @returns {Array} + */ + + +Network.prototype.findNode = function () { + return this.clustering.findNode.apply(this.clustering, arguments); +}; + +Network.prototype.isCluster = function () { + return this.clustering.isCluster.apply(this.clustering, arguments); +}; + +Network.prototype.openCluster = function () { + return this.clustering.openCluster.apply(this.clustering, arguments); +}; + +Network.prototype.cluster = function () { + return this.clustering.cluster.apply(this.clustering, arguments); +}; + +Network.prototype.getNodesInCluster = function () { + return this.clustering.getNodesInCluster.apply(this.clustering, arguments); +}; + +Network.prototype.clusterByConnection = function () { + return this.clustering.clusterByConnection.apply(this.clustering, arguments); +}; + +Network.prototype.clusterByHubsize = function () { + return this.clustering.clusterByHubsize.apply(this.clustering, arguments); +}; +/** + * This method will cluster all nodes with 1 edge with their respective connected node. + * The options object is explained in full
below. + * + * @param {object} [options] + * @returns {undefined} + */ + + +Network.prototype.clusterOutliers = function () { + return this.clustering.clusterOutliers.apply(this.clustering, arguments); +}; + +Network.prototype.getSeed = function () { + return this.layoutEngine.getSeed.apply(this.layoutEngine, arguments); +}; + +Network.prototype.enableEditMode = function () { + return this.manipulation.enableEditMode.apply(this.manipulation, arguments); +}; + +Network.prototype.disableEditMode = function () { + return this.manipulation.disableEditMode.apply(this.manipulation, arguments); +}; + +Network.prototype.addNodeMode = function () { + return this.manipulation.addNodeMode.apply(this.manipulation, arguments); +}; + +Network.prototype.editNode = function () { + return this.manipulation.editNode.apply(this.manipulation, arguments); +}; + +Network.prototype.editNodeMode = function () { + console.log("Deprecated: Please use editNode instead of editNodeMode."); + return this.manipulation.editNode.apply(this.manipulation, arguments); +}; + +Network.prototype.addEdgeMode = function () { + return this.manipulation.addEdgeMode.apply(this.manipulation, arguments); +}; + +Network.prototype.editEdgeMode = function () { + return this.manipulation.editEdgeMode.apply(this.manipulation, arguments); +}; + +Network.prototype.deleteSelected = function () { + return this.manipulation.deleteSelected.apply(this.manipulation, arguments); +}; + +Network.prototype.getPositions = function () { + return this.nodesHandler.getPositions.apply(this.nodesHandler, arguments); +}; + +Network.prototype.storePositions = function () { + return this.nodesHandler.storePositions.apply(this.nodesHandler, arguments); +}; + +Network.prototype.moveNode = function () { + return this.nodesHandler.moveNode.apply(this.nodesHandler, arguments); +}; + +Network.prototype.getBoundingBox = function () { + return this.nodesHandler.getBoundingBox.apply(this.nodesHandler, arguments); +}; + +Network.prototype.getConnectedNodes = function (objectId) { + if (this.body.nodes[objectId] !== undefined) { + return this.nodesHandler.getConnectedNodes.apply(this.nodesHandler, arguments); + } else { + return this.edgesHandler.getConnectedNodes.apply(this.edgesHandler, arguments); + } +}; + +Network.prototype.getConnectedEdges = function () { + return this.nodesHandler.getConnectedEdges.apply(this.nodesHandler, arguments); +}; + +Network.prototype.startSimulation = function () { + return this.physics.startSimulation.apply(this.physics, arguments); +}; + +Network.prototype.stopSimulation = function () { + return this.physics.stopSimulation.apply(this.physics, arguments); +}; + +Network.prototype.stabilize = function () { + return this.physics.stabilize.apply(this.physics, arguments); +}; + +Network.prototype.getSelection = function () { + return this.selectionHandler.getSelection.apply(this.selectionHandler, arguments); +}; + +Network.prototype.setSelection = function () { + return this.selectionHandler.setSelection.apply(this.selectionHandler, arguments); +}; + +Network.prototype.getSelectedNodes = function () { + return this.selectionHandler.getSelectedNodes.apply(this.selectionHandler, arguments); +}; + +Network.prototype.getSelectedEdges = function () { + return this.selectionHandler.getSelectedEdges.apply(this.selectionHandler, arguments); +}; + +Network.prototype.getNodeAt = function () { + var node = this.selectionHandler.getNodeAt.apply(this.selectionHandler, arguments); + + if (node !== undefined && node.id !== undefined) { + return node.id; + } + + return node; +}; + +Network.prototype.getEdgeAt = function () { + var edge = this.selectionHandler.getEdgeAt.apply(this.selectionHandler, arguments); + + if (edge !== undefined && edge.id !== undefined) { + return edge.id; + } + + return edge; +}; + +Network.prototype.selectNodes = function () { + return this.selectionHandler.selectNodes.apply(this.selectionHandler, arguments); +}; + +Network.prototype.selectEdges = function () { + return this.selectionHandler.selectEdges.apply(this.selectionHandler, arguments); +}; + +Network.prototype.unselectAll = function () { + this.selectionHandler.unselectAll.apply(this.selectionHandler, arguments); + this.redraw(); +}; + +Network.prototype.redraw = function () { + return this.renderer.redraw.apply(this.renderer, arguments); +}; + +Network.prototype.getScale = function () { + return this.view.getScale.apply(this.view, arguments); +}; + +Network.prototype.getViewPosition = function () { + return this.view.getViewPosition.apply(this.view, arguments); +}; + +Network.prototype.fit = function () { + return this.view.fit.apply(this.view, arguments); +}; + +Network.prototype.moveTo = function () { + return this.view.moveTo.apply(this.view, arguments); +}; + +Network.prototype.focus = function () { + return this.view.focus.apply(this.view, arguments); +}; + +Network.prototype.releaseNode = function () { + return this.view.releaseNode.apply(this.view, arguments); +}; + +Network.prototype.getOptionsFromConfigurator = function () { + var options = {}; + + if (this.configurator) { + options = this.configurator.getOptions.apply(this.configurator); + } + + return options; +}; + +var DOMutil = createCommonjsModule$2(function (module, exports) { + // DOM utility methods + + /** + * this prepares the JSON container for allocating SVG elements + * @param {Object} JSONcontainer + * @private + */ + exports.prepareElements = function (JSONcontainer) { + // cleanup the redundant svgElements; + for (var elementType in JSONcontainer) { + if (JSONcontainer.hasOwnProperty(elementType)) { + JSONcontainer[elementType].redundant = JSONcontainer[elementType].used; + JSONcontainer[elementType].used = []; + } + } + }; + /** + * this cleans up all the unused SVG elements. By asking for the parentNode, we only need to supply the JSON container from + * which to remove the redundant elements. + * + * @param {Object} JSONcontainer + * @private + */ + + + exports.cleanupElements = function (JSONcontainer) { + // cleanup the redundant svgElements; + for (var elementType in JSONcontainer) { + if (JSONcontainer.hasOwnProperty(elementType)) { + if (JSONcontainer[elementType].redundant) { + for (var i = 0; i < JSONcontainer[elementType].redundant.length; i++) { + JSONcontainer[elementType].redundant[i].parentNode.removeChild(JSONcontainer[elementType].redundant[i]); + } + + JSONcontainer[elementType].redundant = []; + } + } + } + }; + /** + * Ensures that all elements are removed first up so they can be recreated cleanly + * @param {Object} JSONcontainer + */ + + + exports.resetElements = function (JSONcontainer) { + exports.prepareElements(JSONcontainer); + exports.cleanupElements(JSONcontainer); + exports.prepareElements(JSONcontainer); + }; + /** + * Allocate or generate an SVG element if needed. Store a reference to it in the JSON container and draw it in the svgContainer + * the JSON container and the SVG container have to be supplied so other svg containers (like the legend) can use this. + * + * @param {string} elementType + * @param {Object} JSONcontainer + * @param {Object} svgContainer + * @returns {Element} + * @private + */ + + + exports.getSVGElement = function (elementType, JSONcontainer, svgContainer) { + var element; // allocate SVG element, if it doesnt yet exist, create one. + + if (JSONcontainer.hasOwnProperty(elementType)) { + // this element has been created before + // check if there is an redundant element + if (JSONcontainer[elementType].redundant.length > 0) { + element = JSONcontainer[elementType].redundant[0]; + JSONcontainer[elementType].redundant.shift(); + } else { + // create a new element and add it to the SVG + element = document.createElementNS('http://www.w3.org/2000/svg', elementType); + svgContainer.appendChild(element); + } + } else { + // create a new element and add it to the SVG, also create a new object in the svgElements to keep track of it. + element = document.createElementNS('http://www.w3.org/2000/svg', elementType); + JSONcontainer[elementType] = { + used: [], + redundant: [] + }; + svgContainer.appendChild(element); + } + + JSONcontainer[elementType].used.push(element); + return element; + }; + /** + * Allocate or generate an SVG element if needed. Store a reference to it in the JSON container and draw it in the svgContainer + * the JSON container and the SVG container have to be supplied so other svg containers (like the legend) can use this. + * + * @param {string} elementType + * @param {Object} JSONcontainer + * @param {Element} DOMContainer + * @param {Element} insertBefore + * @returns {*} + */ + + + exports.getDOMElement = function (elementType, JSONcontainer, DOMContainer, insertBefore) { + var element; // allocate DOM element, if it doesnt yet exist, create one. + + if (JSONcontainer.hasOwnProperty(elementType)) { + // this element has been created before + // check if there is an redundant element + if (JSONcontainer[elementType].redundant.length > 0) { + element = JSONcontainer[elementType].redundant[0]; + JSONcontainer[elementType].redundant.shift(); + } else { + // create a new element and add it to the SVG + element = document.createElement(elementType); + + if (insertBefore !== undefined) { + DOMContainer.insertBefore(element, insertBefore); + } else { + DOMContainer.appendChild(element); + } + } + } else { + // create a new element and add it to the SVG, also create a new object in the svgElements to keep track of it. + element = document.createElement(elementType); + JSONcontainer[elementType] = { + used: [], + redundant: [] + }; + + if (insertBefore !== undefined) { + DOMContainer.insertBefore(element, insertBefore); + } else { + DOMContainer.appendChild(element); + } + } + + JSONcontainer[elementType].used.push(element); + return element; + }; + /** + * Draw a point object. This is a separate function because it can also be called by the legend. + * The reason the JSONcontainer and the target SVG svgContainer have to be supplied is so the legend can use these functions + * as well. + * + * @param {number} x + * @param {number} y + * @param {Object} groupTemplate: A template containing the necessary information to draw the datapoint e.g., {style: 'circle', size: 5, className: 'className' } + * @param {Object} JSONcontainer + * @param {Object} svgContainer + * @param {Object} labelObj + * @returns {vis.PointItem} + */ + + + exports.drawPoint = function (x, y, groupTemplate, JSONcontainer, svgContainer, labelObj) { + var point; + + if (groupTemplate.style == 'circle') { + point = exports.getSVGElement('circle', JSONcontainer, svgContainer); + point.setAttributeNS(null, "cx", x); + point.setAttributeNS(null, "cy", y); + point.setAttributeNS(null, "r", 0.5 * groupTemplate.size); + } else { + point = exports.getSVGElement('rect', JSONcontainer, svgContainer); + point.setAttributeNS(null, "x", x - 0.5 * groupTemplate.size); + point.setAttributeNS(null, "y", y - 0.5 * groupTemplate.size); + point.setAttributeNS(null, "width", groupTemplate.size); + point.setAttributeNS(null, "height", groupTemplate.size); + } + + if (groupTemplate.styles !== undefined) { + point.setAttributeNS(null, "style", groupTemplate.styles); + } + + point.setAttributeNS(null, "class", groupTemplate.className + " vis-point"); //handle label + + if (labelObj) { + var label = exports.getSVGElement('text', JSONcontainer, svgContainer); + + if (labelObj.xOffset) { + x = x + labelObj.xOffset; + } + + if (labelObj.yOffset) { + y = y + labelObj.yOffset; + } + + if (labelObj.content) { + label.textContent = labelObj.content; + } + + if (labelObj.className) { + label.setAttributeNS(null, "class", labelObj.className + " vis-label"); + } + + label.setAttributeNS(null, "x", x); + label.setAttributeNS(null, "y", y); + } + + return point; + }; + /** + * draw a bar SVG element centered on the X coordinate + * + * @param {number} x + * @param {number} y + * @param {number} width + * @param {number} height + * @param {string} className + * @param {Object} JSONcontainer + * @param {Object} svgContainer + * @param {string} style + */ + + + exports.drawBar = function (x, y, width, height, className, JSONcontainer, svgContainer, style) { + if (height != 0) { + if (height < 0) { + height *= -1; + y -= height; + } + + var rect = exports.getSVGElement('rect', JSONcontainer, svgContainer); + rect.setAttributeNS(null, "x", x - 0.5 * width); + rect.setAttributeNS(null, "y", y); + rect.setAttributeNS(null, "width", width); + rect.setAttributeNS(null, "height", height); + rect.setAttributeNS(null, "class", className); + + if (style) { + rect.setAttributeNS(null, "style", style); + } + } + }; +}); +var DOMutil_1 = DOMutil.prepareElements; +var DOMutil_2 = DOMutil.cleanupElements; +var DOMutil_3 = DOMutil.resetElements; +var DOMutil_4 = DOMutil.getSVGElement; +var DOMutil_5 = DOMutil.getDOMElement; +var DOMutil_6 = DOMutil.drawPoint; +var DOMutil_7 = DOMutil.drawBar; + +var DOMutil$1 = /*#__PURE__*/Object.freeze({ + 'default': DOMutil, + __moduleExports: DOMutil, + prepareElements: DOMutil_1, + cleanupElements: DOMutil_2, + resetElements: DOMutil_3, + getSVGElement: DOMutil_4, + getDOMElement: DOMutil_5, + drawPoint: DOMutil_6, + drawBar: DOMutil_7 +}); + +var moment$2 = createCommonjsModule$2(function (module, exports) { + + (function (global, factory) { + module.exports = factory() ; + })(commonjsGlobal$2, function () { + + var hookCallback; + + function hooks() { + return hookCallback.apply(null, arguments); + } // This is done to register the method called with moment() + // without creating circular dependencies. + + + function setHookCallback(callback) { + hookCallback = callback; + } + + function isArray(input) { + return input instanceof Array || Object.prototype.toString.call(input) === '[object Array]'; + } + + function isObject(input) { + // IE8 will treat undefined and null as object if it wasn't for + // input != null + return input != null && Object.prototype.toString.call(input) === '[object Object]'; + } + + function isObjectEmpty(obj) { + if (Object.getOwnPropertyNames) { + return Object.getOwnPropertyNames(obj).length === 0; + } else { + var k; + + for (k in obj) { + if (obj.hasOwnProperty(k)) { + return false; + } + } + + return true; + } + } + + function isUndefined(input) { + return input === void 0; + } + + function isNumber(input) { + return typeof input === 'number' || Object.prototype.toString.call(input) === '[object Number]'; + } + + function isDate(input) { + return input instanceof Date || Object.prototype.toString.call(input) === '[object Date]'; + } + + function map(arr, fn) { + var res = [], + i; + + for (i = 0; i < arr.length; ++i) { + res.push(fn(arr[i], i)); + } + + return res; + } + + function hasOwnProp(a, b) { + return Object.prototype.hasOwnProperty.call(a, b); + } + + function extend(a, b) { + for (var i in b) { + if (hasOwnProp(b, i)) { + a[i] = b[i]; + } + } + + if (hasOwnProp(b, 'toString')) { + a.toString = b.toString; + } + + if (hasOwnProp(b, 'valueOf')) { + a.valueOf = b.valueOf; + } + + return a; + } + + function createUTC(input, format, locale, strict) { + return createLocalOrUTC(input, format, locale, strict, true).utc(); + } + + function defaultParsingFlags() { + // We need to deep clone this object. + return { + empty: false, + unusedTokens: [], + unusedInput: [], + overflow: -2, + charsLeftOver: 0, + nullInput: false, + invalidMonth: null, + invalidFormat: false, + userInvalidated: false, + iso: false, + parsedDateParts: [], + meridiem: null, + rfc2822: false, + weekdayMismatch: false + }; + } + + function getParsingFlags(m) { + if (m._pf == null) { + m._pf = defaultParsingFlags(); + } + + return m._pf; + } + + var some; + + if (Array.prototype.some) { + some = Array.prototype.some; + } else { + some = function (fun) { + var t = Object(this); + var len = t.length >>> 0; + + for (var i = 0; i < len; i++) { + if (i in t && fun.call(this, t[i], i, t)) { + return true; + } + } + + return false; + }; + } + + function isValid(m) { + if (m._isValid == null) { + var flags = getParsingFlags(m); + var parsedParts = some.call(flags.parsedDateParts, function (i) { + return i != null; + }); + var isNowValid = !isNaN(m._d.getTime()) && flags.overflow < 0 && !flags.empty && !flags.invalidMonth && !flags.invalidWeekday && !flags.weekdayMismatch && !flags.nullInput && !flags.invalidFormat && !flags.userInvalidated && (!flags.meridiem || flags.meridiem && parsedParts); + + if (m._strict) { + isNowValid = isNowValid && flags.charsLeftOver === 0 && flags.unusedTokens.length === 0 && flags.bigHour === undefined; + } + + if (Object.isFrozen == null || !Object.isFrozen(m)) { + m._isValid = isNowValid; + } else { + return isNowValid; + } + } + + return m._isValid; + } + + function createInvalid(flags) { + var m = createUTC(NaN); + + if (flags != null) { + extend(getParsingFlags(m), flags); + } else { + getParsingFlags(m).userInvalidated = true; + } + + return m; + } // Plugins that add properties should also add the key here (null value), + // so we can properly clone ourselves. + + + var momentProperties = hooks.momentProperties = []; + + function copyConfig(to, from) { + var i, prop, val; + + if (!isUndefined(from._isAMomentObject)) { + to._isAMomentObject = from._isAMomentObject; + } + + if (!isUndefined(from._i)) { + to._i = from._i; + } + + if (!isUndefined(from._f)) { + to._f = from._f; + } + + if (!isUndefined(from._l)) { + to._l = from._l; + } + + if (!isUndefined(from._strict)) { + to._strict = from._strict; + } + + if (!isUndefined(from._tzm)) { + to._tzm = from._tzm; + } + + if (!isUndefined(from._isUTC)) { + to._isUTC = from._isUTC; + } + + if (!isUndefined(from._offset)) { + to._offset = from._offset; + } + + if (!isUndefined(from._pf)) { + to._pf = getParsingFlags(from); + } + + if (!isUndefined(from._locale)) { + to._locale = from._locale; + } + + if (momentProperties.length > 0) { + for (i = 0; i < momentProperties.length; i++) { + prop = momentProperties[i]; + val = from[prop]; + + if (!isUndefined(val)) { + to[prop] = val; + } + } + } + + return to; + } + + var updateInProgress = false; // Moment prototype object + + function Moment(config) { + copyConfig(this, config); + this._d = new Date(config._d != null ? config._d.getTime() : NaN); + + if (!this.isValid()) { + this._d = new Date(NaN); + } // Prevent infinite loop in case updateOffset creates new moment + // objects. + + + if (updateInProgress === false) { + updateInProgress = true; + hooks.updateOffset(this); + updateInProgress = false; + } + } + + function isMoment(obj) { + return obj instanceof Moment || obj != null && obj._isAMomentObject != null; + } + + function absFloor(number) { + if (number < 0) { + // -0 -> 0 + return Math.ceil(number) || 0; + } else { + return Math.floor(number); + } + } + + function toInt(argumentForCoercion) { + var coercedNumber = +argumentForCoercion, + value = 0; + + if (coercedNumber !== 0 && isFinite(coercedNumber)) { + value = absFloor(coercedNumber); + } + + return value; + } // compare two arrays, return the number of differences + + + function compareArrays(array1, array2, dontConvert) { + var len = Math.min(array1.length, array2.length), + lengthDiff = Math.abs(array1.length - array2.length), + diffs = 0, + i; + + for (i = 0; i < len; i++) { + if (dontConvert && array1[i] !== array2[i] || !dontConvert && toInt(array1[i]) !== toInt(array2[i])) { + diffs++; + } + } + + return diffs + lengthDiff; + } + + function warn(msg) { + if (hooks.suppressDeprecationWarnings === false && typeof console !== 'undefined' && console.warn) { + console.warn('Deprecation warning: ' + msg); + } + } + + function deprecate(msg, fn) { + var firstTime = true; + return extend(function () { + if (hooks.deprecationHandler != null) { + hooks.deprecationHandler(null, msg); + } + + if (firstTime) { + var args = []; + var arg; + + for (var i = 0; i < arguments.length; i++) { + arg = ''; + + if (typeof arguments[i] === 'object') { + arg += '\n[' + i + '] '; + + for (var key in arguments[0]) { + arg += key + ': ' + arguments[0][key] + ', '; + } + + arg = arg.slice(0, -2); // Remove trailing comma and space + } else { + arg = arguments[i]; + } + + args.push(arg); + } + + warn(msg + '\nArguments: ' + Array.prototype.slice.call(args).join('') + '\n' + new Error().stack); + firstTime = false; + } + + return fn.apply(this, arguments); + }, fn); + } + + var deprecations = {}; + + function deprecateSimple(name, msg) { + if (hooks.deprecationHandler != null) { + hooks.deprecationHandler(name, msg); + } + + if (!deprecations[name]) { + warn(msg); + deprecations[name] = true; + } + } + + hooks.suppressDeprecationWarnings = false; + hooks.deprecationHandler = null; + + function isFunction(input) { + return input instanceof Function || Object.prototype.toString.call(input) === '[object Function]'; + } + + function set(config) { + var prop, i; + + for (i in config) { + prop = config[i]; + + if (isFunction(prop)) { + this[i] = prop; + } else { + this['_' + i] = prop; + } + } + + this._config = config; // Lenient ordinal parsing accepts just a number in addition to + // number + (possibly) stuff coming from _dayOfMonthOrdinalParse. + // TODO: Remove "ordinalParse" fallback in next major release. + + this._dayOfMonthOrdinalParseLenient = new RegExp((this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) + '|' + /\d{1,2}/.source); + } + + function mergeConfigs(parentConfig, childConfig) { + var res = extend({}, parentConfig), + prop; + + for (prop in childConfig) { + if (hasOwnProp(childConfig, prop)) { + if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) { + res[prop] = {}; + extend(res[prop], parentConfig[prop]); + extend(res[prop], childConfig[prop]); + } else if (childConfig[prop] != null) { + res[prop] = childConfig[prop]; + } else { + delete res[prop]; + } + } + } + + for (prop in parentConfig) { + if (hasOwnProp(parentConfig, prop) && !hasOwnProp(childConfig, prop) && isObject(parentConfig[prop])) { + // make sure changes to properties don't modify parent config + res[prop] = extend({}, res[prop]); + } + } + + return res; + } + + function Locale(config) { + if (config != null) { + this.set(config); + } + } + + var keys; + + if (Object.keys) { + keys = Object.keys; + } else { + keys = function (obj) { + var i, + res = []; + + for (i in obj) { + if (hasOwnProp(obj, i)) { + res.push(i); + } + } + + return res; + }; + } + + var defaultCalendar = { + sameDay: '[Today at] LT', + nextDay: '[Tomorrow at] LT', + nextWeek: 'dddd [at] LT', + lastDay: '[Yesterday at] LT', + lastWeek: '[Last] dddd [at] LT', + sameElse: 'L' + }; + + function calendar(key, mom, now) { + var output = this._calendar[key] || this._calendar['sameElse']; + return isFunction(output) ? output.call(mom, now) : output; + } + + var defaultLongDateFormat = { + LTS: 'h:mm:ss A', + LT: 'h:mm A', + L: 'MM/DD/YYYY', + LL: 'MMMM D, YYYY', + LLL: 'MMMM D, YYYY h:mm A', + LLLL: 'dddd, MMMM D, YYYY h:mm A' + }; + + function longDateFormat(key) { + var format = this._longDateFormat[key], + formatUpper = this._longDateFormat[key.toUpperCase()]; + + if (format || !formatUpper) { + return format; + } + + this._longDateFormat[key] = formatUpper.replace(/MMMM|MM|DD|dddd/g, function (val) { + return val.slice(1); + }); + return this._longDateFormat[key]; + } + + var defaultInvalidDate = 'Invalid date'; + + function invalidDate() { + return this._invalidDate; + } + + var defaultOrdinal = '%d'; + var defaultDayOfMonthOrdinalParse = /\d{1,2}/; + + function ordinal(number) { + return this._ordinal.replace('%d', number); + } + + var defaultRelativeTime = { + future: 'in %s', + past: '%s ago', + s: 'a few seconds', + ss: '%d seconds', + m: 'a minute', + mm: '%d minutes', + h: 'an hour', + hh: '%d hours', + d: 'a day', + dd: '%d days', + M: 'a month', + MM: '%d months', + y: 'a year', + yy: '%d years' + }; + + function relativeTime(number, withoutSuffix, string, isFuture) { + var output = this._relativeTime[string]; + return isFunction(output) ? output(number, withoutSuffix, string, isFuture) : output.replace(/%d/i, number); + } + + function pastFuture(diff, output) { + var format = this._relativeTime[diff > 0 ? 'future' : 'past']; + return isFunction(format) ? format(output) : format.replace(/%s/i, output); + } + + var aliases = {}; + + function addUnitAlias(unit, shorthand) { + var lowerCase = unit.toLowerCase(); + aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit; + } + + function normalizeUnits(units) { + return typeof units === 'string' ? aliases[units] || aliases[units.toLowerCase()] : undefined; + } + + function normalizeObjectUnits(inputObject) { + var normalizedInput = {}, + normalizedProp, + prop; + + for (prop in inputObject) { + if (hasOwnProp(inputObject, prop)) { + normalizedProp = normalizeUnits(prop); + + if (normalizedProp) { + normalizedInput[normalizedProp] = inputObject[prop]; + } + } + } + + return normalizedInput; + } + + var priorities = {}; + + function addUnitPriority(unit, priority) { + priorities[unit] = priority; + } + + function getPrioritizedUnits(unitsObj) { + var units = []; + + for (var u in unitsObj) { + units.push({ + unit: u, + priority: priorities[u] + }); + } + + units.sort(function (a, b) { + return a.priority - b.priority; + }); + return units; + } + + function zeroFill(number, targetLength, forceSign) { + var absNumber = '' + Math.abs(number), + zerosToFill = targetLength - absNumber.length, + sign = number >= 0; + return (sign ? forceSign ? '+' : '' : '-') + Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) + absNumber; + } + + var formattingTokens = /(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g; + var localFormattingTokens = /(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g; + var formatFunctions = {}; + var formatTokenFunctions = {}; // token: 'M' + // padded: ['MM', 2] + // ordinal: 'Mo' + // callback: function () { this.month() + 1 } + + function addFormatToken(token, padded, ordinal, callback) { + var func = callback; + + if (typeof callback === 'string') { + func = function () { + return this[callback](); + }; + } + + if (token) { + formatTokenFunctions[token] = func; + } + + if (padded) { + formatTokenFunctions[padded[0]] = function () { + return zeroFill(func.apply(this, arguments), padded[1], padded[2]); + }; + } + + if (ordinal) { + formatTokenFunctions[ordinal] = function () { + return this.localeData().ordinal(func.apply(this, arguments), token); + }; + } + } + + function removeFormattingTokens(input) { + if (input.match(/\[[\s\S]/)) { + return input.replace(/^\[|\]$/g, ''); + } + + return input.replace(/\\/g, ''); + } + + function makeFormatFunction(format) { + var array = format.match(formattingTokens), + i, + length; + + for (i = 0, length = array.length; i < length; i++) { + if (formatTokenFunctions[array[i]]) { + array[i] = formatTokenFunctions[array[i]]; + } else { + array[i] = removeFormattingTokens(array[i]); + } + } + + return function (mom) { + var output = '', + i; + + for (i = 0; i < length; i++) { + output += isFunction(array[i]) ? array[i].call(mom, format) : array[i]; + } + + return output; + }; + } // format date using native date object + + + function formatMoment(m, format) { + if (!m.isValid()) { + return m.localeData().invalidDate(); + } + + format = expandFormat(format, m.localeData()); + formatFunctions[format] = formatFunctions[format] || makeFormatFunction(format); + return formatFunctions[format](m); + } + + function expandFormat(format, locale) { + var i = 5; + + function replaceLongDateFormatTokens(input) { + return locale.longDateFormat(input) || input; + } + + localFormattingTokens.lastIndex = 0; + + while (i >= 0 && localFormattingTokens.test(format)) { + format = format.replace(localFormattingTokens, replaceLongDateFormatTokens); + localFormattingTokens.lastIndex = 0; + i -= 1; + } + + return format; + } + + var match1 = /\d/; // 0 - 9 + + var match2 = /\d\d/; // 00 - 99 + + var match3 = /\d{3}/; // 000 - 999 + + var match4 = /\d{4}/; // 0000 - 9999 + + var match6 = /[+-]?\d{6}/; // -999999 - 999999 + + var match1to2 = /\d\d?/; // 0 - 99 + + var match3to4 = /\d\d\d\d?/; // 999 - 9999 + + var match5to6 = /\d\d\d\d\d\d?/; // 99999 - 999999 + + var match1to3 = /\d{1,3}/; // 0 - 999 + + var match1to4 = /\d{1,4}/; // 0 - 9999 + + var match1to6 = /[+-]?\d{1,6}/; // -999999 - 999999 + + var matchUnsigned = /\d+/; // 0 - inf + + var matchSigned = /[+-]?\d+/; // -inf - inf + + var matchOffset = /Z|[+-]\d\d:?\d\d/gi; // +00:00 -00:00 +0000 -0000 or Z + + var matchShortOffset = /Z|[+-]\d\d(?::?\d\d)?/gi; // +00 -00 +00:00 -00:00 +0000 -0000 or Z + + var matchTimestamp = /[+-]?\d+(\.\d{1,3})?/; // 123456789 123456789.123 + // any word (or two) characters or numbers including two/three word month in arabic. + // includes scottish gaelic two word and hyphenated months + + var matchWord = /[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i; + var regexes = {}; + + function addRegexToken(token, regex, strictRegex) { + regexes[token] = isFunction(regex) ? regex : function (isStrict, localeData) { + return isStrict && strictRegex ? strictRegex : regex; + }; + } + + function getParseRegexForToken(token, config) { + if (!hasOwnProp(regexes, token)) { + return new RegExp(unescapeFormat(token)); + } + + return regexes[token](config._strict, config._locale); + } // Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript + + + function unescapeFormat(s) { + return regexEscape(s.replace('\\', '').replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g, function (matched, p1, p2, p3, p4) { + return p1 || p2 || p3 || p4; + })); + } + + function regexEscape(s) { + return s.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&'); + } + + var tokens = {}; + + function addParseToken(token, callback) { + var i, + func = callback; + + if (typeof token === 'string') { + token = [token]; + } + + if (isNumber(callback)) { + func = function (input, array) { + array[callback] = toInt(input); + }; + } + + for (i = 0; i < token.length; i++) { + tokens[token[i]] = func; + } + } + + function addWeekParseToken(token, callback) { + addParseToken(token, function (input, array, config, token) { + config._w = config._w || {}; + callback(input, config._w, config, token); + }); + } + + function addTimeToArrayFromToken(token, input, config) { + if (input != null && hasOwnProp(tokens, token)) { + tokens[token](input, config._a, config, token); + } + } + + var YEAR = 0; + var MONTH = 1; + var DATE = 2; + var HOUR = 3; + var MINUTE = 4; + var SECOND = 5; + var MILLISECOND = 6; + var WEEK = 7; + var WEEKDAY = 8; // FORMATTING + + addFormatToken('Y', 0, 0, function () { + var y = this.year(); + return y <= 9999 ? '' + y : '+' + y; + }); + addFormatToken(0, ['YY', 2], 0, function () { + return this.year() % 100; + }); + addFormatToken(0, ['YYYY', 4], 0, 'year'); + addFormatToken(0, ['YYYYY', 5], 0, 'year'); + addFormatToken(0, ['YYYYYY', 6, true], 0, 'year'); // ALIASES + + addUnitAlias('year', 'y'); // PRIORITIES + + addUnitPriority('year', 1); // PARSING + + addRegexToken('Y', matchSigned); + addRegexToken('YY', match1to2, match2); + addRegexToken('YYYY', match1to4, match4); + addRegexToken('YYYYY', match1to6, match6); + addRegexToken('YYYYYY', match1to6, match6); + addParseToken(['YYYYY', 'YYYYYY'], YEAR); + addParseToken('YYYY', function (input, array) { + array[YEAR] = input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input); + }); + addParseToken('YY', function (input, array) { + array[YEAR] = hooks.parseTwoDigitYear(input); + }); + addParseToken('Y', function (input, array) { + array[YEAR] = parseInt(input, 10); + }); // HELPERS + + function daysInYear(year) { + return isLeapYear(year) ? 366 : 365; + } + + function isLeapYear(year) { + return year % 4 === 0 && year % 100 !== 0 || year % 400 === 0; + } // HOOKS + + + hooks.parseTwoDigitYear = function (input) { + return toInt(input) + (toInt(input) > 68 ? 1900 : 2000); + }; // MOMENTS + + + var getSetYear = makeGetSet('FullYear', true); + + function getIsLeapYear() { + return isLeapYear(this.year()); + } + + function makeGetSet(unit, keepTime) { + return function (value) { + if (value != null) { + set$1(this, unit, value); + hooks.updateOffset(this, keepTime); + return this; + } else { + return get(this, unit); + } + }; + } + + function get(mom, unit) { + return mom.isValid() ? mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]() : NaN; + } + + function set$1(mom, unit, value) { + if (mom.isValid() && !isNaN(value)) { + if (unit === 'FullYear' && isLeapYear(mom.year()) && mom.month() === 1 && mom.date() === 29) { + mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value, mom.month(), daysInMonth(value, mom.month())); + } else { + mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value); + } + } + } // MOMENTS + + + function stringGet(units) { + units = normalizeUnits(units); + + if (isFunction(this[units])) { + return this[units](); + } + + return this; + } + + function stringSet(units, value) { + if (typeof units === 'object') { + units = normalizeObjectUnits(units); + var prioritized = getPrioritizedUnits(units); + + for (var i = 0; i < prioritized.length; i++) { + this[prioritized[i].unit](units[prioritized[i].unit]); + } + } else { + units = normalizeUnits(units); + + if (isFunction(this[units])) { + return this[units](value); + } + } + + return this; + } + + function mod(n, x) { + return (n % x + x) % x; + } + + var indexOf; + + if (Array.prototype.indexOf) { + indexOf = Array.prototype.indexOf; + } else { + indexOf = function (o) { + // I know + var i; + + for (i = 0; i < this.length; ++i) { + if (this[i] === o) { + return i; + } + } + + return -1; + }; + } + + function daysInMonth(year, month) { + if (isNaN(year) || isNaN(month)) { + return NaN; + } + + var modMonth = mod(month, 12); + year += (month - modMonth) / 12; + return modMonth === 1 ? isLeapYear(year) ? 29 : 28 : 31 - modMonth % 7 % 2; + } // FORMATTING + + + addFormatToken('M', ['MM', 2], 'Mo', function () { + return this.month() + 1; + }); + addFormatToken('MMM', 0, 0, function (format) { + return this.localeData().monthsShort(this, format); + }); + addFormatToken('MMMM', 0, 0, function (format) { + return this.localeData().months(this, format); + }); // ALIASES + + addUnitAlias('month', 'M'); // PRIORITY + + addUnitPriority('month', 8); // PARSING + + addRegexToken('M', match1to2); + addRegexToken('MM', match1to2, match2); + addRegexToken('MMM', function (isStrict, locale) { + return locale.monthsShortRegex(isStrict); + }); + addRegexToken('MMMM', function (isStrict, locale) { + return locale.monthsRegex(isStrict); + }); + addParseToken(['M', 'MM'], function (input, array) { + array[MONTH] = toInt(input) - 1; + }); + addParseToken(['MMM', 'MMMM'], function (input, array, config, token) { + var month = config._locale.monthsParse(input, token, config._strict); // if we didn't find a month name, mark the date as invalid. + + + if (month != null) { + array[MONTH] = month; + } else { + getParsingFlags(config).invalidMonth = input; + } + }); // LOCALES + + var MONTHS_IN_FORMAT = /D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/; + var defaultLocaleMonths = 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'); + + function localeMonths(m, format) { + if (!m) { + return isArray(this._months) ? this._months : this._months['standalone']; + } + + return isArray(this._months) ? this._months[m.month()] : this._months[(this._months.isFormat || MONTHS_IN_FORMAT).test(format) ? 'format' : 'standalone'][m.month()]; + } + + var defaultLocaleMonthsShort = 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'); + + function localeMonthsShort(m, format) { + if (!m) { + return isArray(this._monthsShort) ? this._monthsShort : this._monthsShort['standalone']; + } + + return isArray(this._monthsShort) ? this._monthsShort[m.month()] : this._monthsShort[MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'][m.month()]; + } + + function handleStrictParse(monthName, format, strict) { + var i, + ii, + mom, + llc = monthName.toLocaleLowerCase(); + + if (!this._monthsParse) { + // this is not used + this._monthsParse = []; + this._longMonthsParse = []; + this._shortMonthsParse = []; + + for (i = 0; i < 12; ++i) { + mom = createUTC([2000, i]); + this._shortMonthsParse[i] = this.monthsShort(mom, '').toLocaleLowerCase(); + this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase(); + } + } + + if (strict) { + if (format === 'MMM') { + ii = indexOf.call(this._shortMonthsParse, llc); + return ii !== -1 ? ii : null; + } else { + ii = indexOf.call(this._longMonthsParse, llc); + return ii !== -1 ? ii : null; + } + } else { + if (format === 'MMM') { + ii = indexOf.call(this._shortMonthsParse, llc); + + if (ii !== -1) { + return ii; + } + + ii = indexOf.call(this._longMonthsParse, llc); + return ii !== -1 ? ii : null; + } else { + ii = indexOf.call(this._longMonthsParse, llc); + + if (ii !== -1) { + return ii; + } + + ii = indexOf.call(this._shortMonthsParse, llc); + return ii !== -1 ? ii : null; + } + } + } + + function localeMonthsParse(monthName, format, strict) { + var i, mom, regex; + + if (this._monthsParseExact) { + return handleStrictParse.call(this, monthName, format, strict); + } + + if (!this._monthsParse) { + this._monthsParse = []; + this._longMonthsParse = []; + this._shortMonthsParse = []; + } // TODO: add sorting + // Sorting makes sure if one month (or abbr) is a prefix of another + // see sorting in computeMonthsParse + + + for (i = 0; i < 12; i++) { + // make the regex if we don't have it already + mom = createUTC([2000, i]); + + if (strict && !this._longMonthsParse[i]) { + this._longMonthsParse[i] = new RegExp('^' + this.months(mom, '').replace('.', '') + '$', 'i'); + this._shortMonthsParse[i] = new RegExp('^' + this.monthsShort(mom, '').replace('.', '') + '$', 'i'); + } + + if (!strict && !this._monthsParse[i]) { + regex = '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, ''); + this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i'); + } // test the regex + + + if (strict && format === 'MMMM' && this._longMonthsParse[i].test(monthName)) { + return i; + } else if (strict && format === 'MMM' && this._shortMonthsParse[i].test(monthName)) { + return i; + } else if (!strict && this._monthsParse[i].test(monthName)) { + return i; + } + } + } // MOMENTS + + + function setMonth(mom, value) { + var dayOfMonth; + + if (!mom.isValid()) { + // No op + return mom; + } + + if (typeof value === 'string') { + if (/^\d+$/.test(value)) { + value = toInt(value); + } else { + value = mom.localeData().monthsParse(value); // TODO: Another silent failure? + + if (!isNumber(value)) { + return mom; + } + } + } + + dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value)); + + mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth); + + return mom; + } + + function getSetMonth(value) { + if (value != null) { + setMonth(this, value); + hooks.updateOffset(this, true); + return this; + } else { + return get(this, 'Month'); + } + } + + function getDaysInMonth() { + return daysInMonth(this.year(), this.month()); + } + + var defaultMonthsShortRegex = matchWord; + + function monthsShortRegex(isStrict) { + if (this._monthsParseExact) { + if (!hasOwnProp(this, '_monthsRegex')) { + computeMonthsParse.call(this); + } + + if (isStrict) { + return this._monthsShortStrictRegex; + } else { + return this._monthsShortRegex; + } + } else { + if (!hasOwnProp(this, '_monthsShortRegex')) { + this._monthsShortRegex = defaultMonthsShortRegex; + } + + return this._monthsShortStrictRegex && isStrict ? this._monthsShortStrictRegex : this._monthsShortRegex; + } + } + + var defaultMonthsRegex = matchWord; + + function monthsRegex(isStrict) { + if (this._monthsParseExact) { + if (!hasOwnProp(this, '_monthsRegex')) { + computeMonthsParse.call(this); + } + + if (isStrict) { + return this._monthsStrictRegex; + } else { + return this._monthsRegex; + } + } else { + if (!hasOwnProp(this, '_monthsRegex')) { + this._monthsRegex = defaultMonthsRegex; + } + + return this._monthsStrictRegex && isStrict ? this._monthsStrictRegex : this._monthsRegex; + } + } + + function computeMonthsParse() { + function cmpLenRev(a, b) { + return b.length - a.length; + } + + var shortPieces = [], + longPieces = [], + mixedPieces = [], + i, + mom; + + for (i = 0; i < 12; i++) { + // make the regex if we don't have it already + mom = createUTC([2000, i]); + shortPieces.push(this.monthsShort(mom, '')); + longPieces.push(this.months(mom, '')); + mixedPieces.push(this.months(mom, '')); + mixedPieces.push(this.monthsShort(mom, '')); + } // Sorting makes sure if one month (or abbr) is a prefix of another it + // will match the longer piece. + + + shortPieces.sort(cmpLenRev); + longPieces.sort(cmpLenRev); + mixedPieces.sort(cmpLenRev); + + for (i = 0; i < 12; i++) { + shortPieces[i] = regexEscape(shortPieces[i]); + longPieces[i] = regexEscape(longPieces[i]); + } + + for (i = 0; i < 24; i++) { + mixedPieces[i] = regexEscape(mixedPieces[i]); + } + + this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i'); + this._monthsShortRegex = this._monthsRegex; + this._monthsStrictRegex = new RegExp('^(' + longPieces.join('|') + ')', 'i'); + this._monthsShortStrictRegex = new RegExp('^(' + shortPieces.join('|') + ')', 'i'); + } + + function createDate(y, m, d, h, M, s, ms) { + // can't just apply() to create a date: + // https://stackoverflow.com/q/181348 + var date; // the date constructor remaps years 0-99 to 1900-1999 + + if (y < 100 && y >= 0) { + // preserve leap years using a full 400 year cycle, then reset + date = new Date(y + 400, m, d, h, M, s, ms); + + if (isFinite(date.getFullYear())) { + date.setFullYear(y); + } + } else { + date = new Date(y, m, d, h, M, s, ms); + } + + return date; + } + + function createUTCDate(y) { + var date; // the Date.UTC function remaps years 0-99 to 1900-1999 + + if (y < 100 && y >= 0) { + var args = Array.prototype.slice.call(arguments); // preserve leap years using a full 400 year cycle, then reset + + args[0] = y + 400; + date = new Date(Date.UTC.apply(null, args)); + + if (isFinite(date.getUTCFullYear())) { + date.setUTCFullYear(y); + } + } else { + date = new Date(Date.UTC.apply(null, arguments)); + } + + return date; + } // start-of-first-week - start-of-year + + + function firstWeekOffset(year, dow, doy) { + var // first-week day -- which january is always in the first week (4 for iso, 1 for other) + fwd = 7 + dow - doy, + // first-week day local weekday -- which local weekday is fwd + fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7; + return -fwdlw + fwd - 1; + } // https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday + + + function dayOfYearFromWeeks(year, week, weekday, dow, doy) { + var localWeekday = (7 + weekday - dow) % 7, + weekOffset = firstWeekOffset(year, dow, doy), + dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset, + resYear, + resDayOfYear; + + if (dayOfYear <= 0) { + resYear = year - 1; + resDayOfYear = daysInYear(resYear) + dayOfYear; + } else if (dayOfYear > daysInYear(year)) { + resYear = year + 1; + resDayOfYear = dayOfYear - daysInYear(year); + } else { + resYear = year; + resDayOfYear = dayOfYear; + } + + return { + year: resYear, + dayOfYear: resDayOfYear + }; + } + + function weekOfYear(mom, dow, doy) { + var weekOffset = firstWeekOffset(mom.year(), dow, doy), + week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1, + resWeek, + resYear; + + if (week < 1) { + resYear = mom.year() - 1; + resWeek = week + weeksInYear(resYear, dow, doy); + } else if (week > weeksInYear(mom.year(), dow, doy)) { + resWeek = week - weeksInYear(mom.year(), dow, doy); + resYear = mom.year() + 1; + } else { + resYear = mom.year(); + resWeek = week; + } + + return { + week: resWeek, + year: resYear + }; + } + + function weeksInYear(year, dow, doy) { + var weekOffset = firstWeekOffset(year, dow, doy), + weekOffsetNext = firstWeekOffset(year + 1, dow, doy); + return (daysInYear(year) - weekOffset + weekOffsetNext) / 7; + } // FORMATTING + + + addFormatToken('w', ['ww', 2], 'wo', 'week'); + addFormatToken('W', ['WW', 2], 'Wo', 'isoWeek'); // ALIASES + + addUnitAlias('week', 'w'); + addUnitAlias('isoWeek', 'W'); // PRIORITIES + + addUnitPriority('week', 5); + addUnitPriority('isoWeek', 5); // PARSING + + addRegexToken('w', match1to2); + addRegexToken('ww', match1to2, match2); + addRegexToken('W', match1to2); + addRegexToken('WW', match1to2, match2); + addWeekParseToken(['w', 'ww', 'W', 'WW'], function (input, week, config, token) { + week[token.substr(0, 1)] = toInt(input); + }); // HELPERS + // LOCALES + + function localeWeek(mom) { + return weekOfYear(mom, this._week.dow, this._week.doy).week; + } + + var defaultLocaleWeek = { + dow: 0, + // Sunday is the first day of the week. + doy: 6 // The week that contains Jan 6th is the first week of the year. + + }; + + function localeFirstDayOfWeek() { + return this._week.dow; + } + + function localeFirstDayOfYear() { + return this._week.doy; + } // MOMENTS + + + function getSetWeek(input) { + var week = this.localeData().week(this); + return input == null ? week : this.add((input - week) * 7, 'd'); + } + + function getSetISOWeek(input) { + var week = weekOfYear(this, 1, 4).week; + return input == null ? week : this.add((input - week) * 7, 'd'); + } // FORMATTING + + + addFormatToken('d', 0, 'do', 'day'); + addFormatToken('dd', 0, 0, function (format) { + return this.localeData().weekdaysMin(this, format); + }); + addFormatToken('ddd', 0, 0, function (format) { + return this.localeData().weekdaysShort(this, format); + }); + addFormatToken('dddd', 0, 0, function (format) { + return this.localeData().weekdays(this, format); + }); + addFormatToken('e', 0, 0, 'weekday'); + addFormatToken('E', 0, 0, 'isoWeekday'); // ALIASES + + addUnitAlias('day', 'd'); + addUnitAlias('weekday', 'e'); + addUnitAlias('isoWeekday', 'E'); // PRIORITY + + addUnitPriority('day', 11); + addUnitPriority('weekday', 11); + addUnitPriority('isoWeekday', 11); // PARSING + + addRegexToken('d', match1to2); + addRegexToken('e', match1to2); + addRegexToken('E', match1to2); + addRegexToken('dd', function (isStrict, locale) { + return locale.weekdaysMinRegex(isStrict); + }); + addRegexToken('ddd', function (isStrict, locale) { + return locale.weekdaysShortRegex(isStrict); + }); + addRegexToken('dddd', function (isStrict, locale) { + return locale.weekdaysRegex(isStrict); + }); + addWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) { + var weekday = config._locale.weekdaysParse(input, token, config._strict); // if we didn't get a weekday name, mark the date as invalid + + + if (weekday != null) { + week.d = weekday; + } else { + getParsingFlags(config).invalidWeekday = input; + } + }); + addWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) { + week[token] = toInt(input); + }); // HELPERS + + function parseWeekday(input, locale) { + if (typeof input !== 'string') { + return input; + } + + if (!isNaN(input)) { + return parseInt(input, 10); + } + + input = locale.weekdaysParse(input); + + if (typeof input === 'number') { + return input; + } + + return null; + } + + function parseIsoWeekday(input, locale) { + if (typeof input === 'string') { + return locale.weekdaysParse(input) % 7 || 7; + } + + return isNaN(input) ? null : input; + } // LOCALES + + + function shiftWeekdays(ws, n) { + return ws.slice(n, 7).concat(ws.slice(0, n)); + } + + var defaultLocaleWeekdays = 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'); + + function localeWeekdays(m, format) { + var weekdays = isArray(this._weekdays) ? this._weekdays : this._weekdays[m && m !== true && this._weekdays.isFormat.test(format) ? 'format' : 'standalone']; + return m === true ? shiftWeekdays(weekdays, this._week.dow) : m ? weekdays[m.day()] : weekdays; + } + + var defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'); + + function localeWeekdaysShort(m) { + return m === true ? shiftWeekdays(this._weekdaysShort, this._week.dow) : m ? this._weekdaysShort[m.day()] : this._weekdaysShort; + } + + var defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'); + + function localeWeekdaysMin(m) { + return m === true ? shiftWeekdays(this._weekdaysMin, this._week.dow) : m ? this._weekdaysMin[m.day()] : this._weekdaysMin; + } + + function handleStrictParse$1(weekdayName, format, strict) { + var i, + ii, + mom, + llc = weekdayName.toLocaleLowerCase(); + + if (!this._weekdaysParse) { + this._weekdaysParse = []; + this._shortWeekdaysParse = []; + this._minWeekdaysParse = []; + + for (i = 0; i < 7; ++i) { + mom = createUTC([2000, 1]).day(i); + this._minWeekdaysParse[i] = this.weekdaysMin(mom, '').toLocaleLowerCase(); + this._shortWeekdaysParse[i] = this.weekdaysShort(mom, '').toLocaleLowerCase(); + this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase(); + } + } + + if (strict) { + if (format === 'dddd') { + ii = indexOf.call(this._weekdaysParse, llc); + return ii !== -1 ? ii : null; + } else if (format === 'ddd') { + ii = indexOf.call(this._shortWeekdaysParse, llc); + return ii !== -1 ? ii : null; + } else { + ii = indexOf.call(this._minWeekdaysParse, llc); + return ii !== -1 ? ii : null; + } + } else { + if (format === 'dddd') { + ii = indexOf.call(this._weekdaysParse, llc); + + if (ii !== -1) { + return ii; + } + + ii = indexOf.call(this._shortWeekdaysParse, llc); + + if (ii !== -1) { + return ii; + } + + ii = indexOf.call(this._minWeekdaysParse, llc); + return ii !== -1 ? ii : null; + } else if (format === 'ddd') { + ii = indexOf.call(this._shortWeekdaysParse, llc); + + if (ii !== -1) { + return ii; + } + + ii = indexOf.call(this._weekdaysParse, llc); + + if (ii !== -1) { + return ii; + } + + ii = indexOf.call(this._minWeekdaysParse, llc); + return ii !== -1 ? ii : null; + } else { + ii = indexOf.call(this._minWeekdaysParse, llc); + + if (ii !== -1) { + return ii; + } + + ii = indexOf.call(this._weekdaysParse, llc); + + if (ii !== -1) { + return ii; + } + + ii = indexOf.call(this._shortWeekdaysParse, llc); + return ii !== -1 ? ii : null; + } + } + } + + function localeWeekdaysParse(weekdayName, format, strict) { + var i, mom, regex; + + if (this._weekdaysParseExact) { + return handleStrictParse$1.call(this, weekdayName, format, strict); + } + + if (!this._weekdaysParse) { + this._weekdaysParse = []; + this._minWeekdaysParse = []; + this._shortWeekdaysParse = []; + this._fullWeekdaysParse = []; + } + + for (i = 0; i < 7; i++) { + // make the regex if we don't have it already + mom = createUTC([2000, 1]).day(i); + + if (strict && !this._fullWeekdaysParse[i]) { + this._fullWeekdaysParse[i] = new RegExp('^' + this.weekdays(mom, '').replace('.', '\\.?') + '$', 'i'); + this._shortWeekdaysParse[i] = new RegExp('^' + this.weekdaysShort(mom, '').replace('.', '\\.?') + '$', 'i'); + this._minWeekdaysParse[i] = new RegExp('^' + this.weekdaysMin(mom, '').replace('.', '\\.?') + '$', 'i'); + } + + if (!this._weekdaysParse[i]) { + regex = '^' + this.weekdays(mom, '') + '|^' + this.weekdaysShort(mom, '') + '|^' + this.weekdaysMin(mom, ''); + this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i'); + } // test the regex + + + if (strict && format === 'dddd' && this._fullWeekdaysParse[i].test(weekdayName)) { + return i; + } else if (strict && format === 'ddd' && this._shortWeekdaysParse[i].test(weekdayName)) { + return i; + } else if (strict && format === 'dd' && this._minWeekdaysParse[i].test(weekdayName)) { + return i; + } else if (!strict && this._weekdaysParse[i].test(weekdayName)) { + return i; + } + } + } // MOMENTS + + + function getSetDayOfWeek(input) { + if (!this.isValid()) { + return input != null ? this : NaN; + } + + var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay(); + + if (input != null) { + input = parseWeekday(input, this.localeData()); + return this.add(input - day, 'd'); + } else { + return day; + } + } + + function getSetLocaleDayOfWeek(input) { + if (!this.isValid()) { + return input != null ? this : NaN; + } + + var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7; + return input == null ? weekday : this.add(input - weekday, 'd'); + } + + function getSetISODayOfWeek(input) { + if (!this.isValid()) { + return input != null ? this : NaN; + } // behaves the same as moment#day except + // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6) + // as a setter, sunday should belong to the previous week. + + + if (input != null) { + var weekday = parseIsoWeekday(input, this.localeData()); + return this.day(this.day() % 7 ? weekday : weekday - 7); + } else { + return this.day() || 7; + } + } + + var defaultWeekdaysRegex = matchWord; + + function weekdaysRegex(isStrict) { + if (this._weekdaysParseExact) { + if (!hasOwnProp(this, '_weekdaysRegex')) { + computeWeekdaysParse.call(this); + } + + if (isStrict) { + return this._weekdaysStrictRegex; + } else { + return this._weekdaysRegex; + } + } else { + if (!hasOwnProp(this, '_weekdaysRegex')) { + this._weekdaysRegex = defaultWeekdaysRegex; + } + + return this._weekdaysStrictRegex && isStrict ? this._weekdaysStrictRegex : this._weekdaysRegex; + } + } + + var defaultWeekdaysShortRegex = matchWord; + + function weekdaysShortRegex(isStrict) { + if (this._weekdaysParseExact) { + if (!hasOwnProp(this, '_weekdaysRegex')) { + computeWeekdaysParse.call(this); + } + + if (isStrict) { + return this._weekdaysShortStrictRegex; + } else { + return this._weekdaysShortRegex; + } + } else { + if (!hasOwnProp(this, '_weekdaysShortRegex')) { + this._weekdaysShortRegex = defaultWeekdaysShortRegex; + } + + return this._weekdaysShortStrictRegex && isStrict ? this._weekdaysShortStrictRegex : this._weekdaysShortRegex; + } + } + + var defaultWeekdaysMinRegex = matchWord; + + function weekdaysMinRegex(isStrict) { + if (this._weekdaysParseExact) { + if (!hasOwnProp(this, '_weekdaysRegex')) { + computeWeekdaysParse.call(this); + } + + if (isStrict) { + return this._weekdaysMinStrictRegex; + } else { + return this._weekdaysMinRegex; + } + } else { + if (!hasOwnProp(this, '_weekdaysMinRegex')) { + this._weekdaysMinRegex = defaultWeekdaysMinRegex; + } + + return this._weekdaysMinStrictRegex && isStrict ? this._weekdaysMinStrictRegex : this._weekdaysMinRegex; + } + } + + function computeWeekdaysParse() { + function cmpLenRev(a, b) { + return b.length - a.length; + } + + var minPieces = [], + shortPieces = [], + longPieces = [], + mixedPieces = [], + i, + mom, + minp, + shortp, + longp; + + for (i = 0; i < 7; i++) { + // make the regex if we don't have it already + mom = createUTC([2000, 1]).day(i); + minp = this.weekdaysMin(mom, ''); + shortp = this.weekdaysShort(mom, ''); + longp = this.weekdays(mom, ''); + minPieces.push(minp); + shortPieces.push(shortp); + longPieces.push(longp); + mixedPieces.push(minp); + mixedPieces.push(shortp); + mixedPieces.push(longp); + } // Sorting makes sure if one weekday (or abbr) is a prefix of another it + // will match the longer piece. + + + minPieces.sort(cmpLenRev); + shortPieces.sort(cmpLenRev); + longPieces.sort(cmpLenRev); + mixedPieces.sort(cmpLenRev); + + for (i = 0; i < 7; i++) { + shortPieces[i] = regexEscape(shortPieces[i]); + longPieces[i] = regexEscape(longPieces[i]); + mixedPieces[i] = regexEscape(mixedPieces[i]); + } + + this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i'); + this._weekdaysShortRegex = this._weekdaysRegex; + this._weekdaysMinRegex = this._weekdaysRegex; + this._weekdaysStrictRegex = new RegExp('^(' + longPieces.join('|') + ')', 'i'); + this._weekdaysShortStrictRegex = new RegExp('^(' + shortPieces.join('|') + ')', 'i'); + this._weekdaysMinStrictRegex = new RegExp('^(' + minPieces.join('|') + ')', 'i'); + } // FORMATTING + + + function hFormat() { + return this.hours() % 12 || 12; + } + + function kFormat() { + return this.hours() || 24; + } + + addFormatToken('H', ['HH', 2], 0, 'hour'); + addFormatToken('h', ['hh', 2], 0, hFormat); + addFormatToken('k', ['kk', 2], 0, kFormat); + addFormatToken('hmm', 0, 0, function () { + return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2); + }); + addFormatToken('hmmss', 0, 0, function () { + return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2) + zeroFill(this.seconds(), 2); + }); + addFormatToken('Hmm', 0, 0, function () { + return '' + this.hours() + zeroFill(this.minutes(), 2); + }); + addFormatToken('Hmmss', 0, 0, function () { + return '' + this.hours() + zeroFill(this.minutes(), 2) + zeroFill(this.seconds(), 2); + }); + + function meridiem(token, lowercase) { + addFormatToken(token, 0, 0, function () { + return this.localeData().meridiem(this.hours(), this.minutes(), lowercase); + }); + } + + meridiem('a', true); + meridiem('A', false); // ALIASES + + addUnitAlias('hour', 'h'); // PRIORITY + + addUnitPriority('hour', 13); // PARSING + + function matchMeridiem(isStrict, locale) { + return locale._meridiemParse; + } + + addRegexToken('a', matchMeridiem); + addRegexToken('A', matchMeridiem); + addRegexToken('H', match1to2); + addRegexToken('h', match1to2); + addRegexToken('k', match1to2); + addRegexToken('HH', match1to2, match2); + addRegexToken('hh', match1to2, match2); + addRegexToken('kk', match1to2, match2); + addRegexToken('hmm', match3to4); + addRegexToken('hmmss', match5to6); + addRegexToken('Hmm', match3to4); + addRegexToken('Hmmss', match5to6); + addParseToken(['H', 'HH'], HOUR); + addParseToken(['k', 'kk'], function (input, array, config) { + var kInput = toInt(input); + array[HOUR] = kInput === 24 ? 0 : kInput; + }); + addParseToken(['a', 'A'], function (input, array, config) { + config._isPm = config._locale.isPM(input); + config._meridiem = input; + }); + addParseToken(['h', 'hh'], function (input, array, config) { + array[HOUR] = toInt(input); + getParsingFlags(config).bigHour = true; + }); + addParseToken('hmm', function (input, array, config) { + var pos = input.length - 2; + array[HOUR] = toInt(input.substr(0, pos)); + array[MINUTE] = toInt(input.substr(pos)); + getParsingFlags(config).bigHour = true; + }); + addParseToken('hmmss', function (input, array, config) { + var pos1 = input.length - 4; + var pos2 = input.length - 2; + array[HOUR] = toInt(input.substr(0, pos1)); + array[MINUTE] = toInt(input.substr(pos1, 2)); + array[SECOND] = toInt(input.substr(pos2)); + getParsingFlags(config).bigHour = true; + }); + addParseToken('Hmm', function (input, array, config) { + var pos = input.length - 2; + array[HOUR] = toInt(input.substr(0, pos)); + array[MINUTE] = toInt(input.substr(pos)); + }); + addParseToken('Hmmss', function (input, array, config) { + var pos1 = input.length - 4; + var pos2 = input.length - 2; + array[HOUR] = toInt(input.substr(0, pos1)); + array[MINUTE] = toInt(input.substr(pos1, 2)); + array[SECOND] = toInt(input.substr(pos2)); + }); // LOCALES + + function localeIsPM(input) { + // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays + // Using charAt should be more compatible. + return (input + '').toLowerCase().charAt(0) === 'p'; + } + + var defaultLocaleMeridiemParse = /[ap]\.?m?\.?/i; + + function localeMeridiem(hours, minutes, isLower) { + if (hours > 11) { + return isLower ? 'pm' : 'PM'; + } else { + return isLower ? 'am' : 'AM'; + } + } // MOMENTS + // Setting the hour should keep the time, because the user explicitly + // specified which hour they want. So trying to maintain the same hour (in + // a new timezone) makes sense. Adding/subtracting hours does not follow + // this rule. + + + var getSetHour = makeGetSet('Hours', true); + var baseConfig = { + calendar: defaultCalendar, + longDateFormat: defaultLongDateFormat, + invalidDate: defaultInvalidDate, + ordinal: defaultOrdinal, + dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse, + relativeTime: defaultRelativeTime, + months: defaultLocaleMonths, + monthsShort: defaultLocaleMonthsShort, + week: defaultLocaleWeek, + weekdays: defaultLocaleWeekdays, + weekdaysMin: defaultLocaleWeekdaysMin, + weekdaysShort: defaultLocaleWeekdaysShort, + meridiemParse: defaultLocaleMeridiemParse + }; // internal storage for locale config files + + var locales = {}; + var localeFamilies = {}; + var globalLocale; + + function normalizeLocale(key) { + return key ? key.toLowerCase().replace('_', '-') : key; + } // pick the locale from the array + // try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each + // substring from most specific to least, but move to the next array item if it's a more specific variant than the current root + + + function chooseLocale(names) { + var i = 0, + j, + next, + locale, + split; + + while (i < names.length) { + split = normalizeLocale(names[i]).split('-'); + j = split.length; + next = normalizeLocale(names[i + 1]); + next = next ? next.split('-') : null; + + while (j > 0) { + locale = loadLocale(split.slice(0, j).join('-')); + + if (locale) { + return locale; + } + + if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) { + //the next array item is better than a shallower substring of this one + break; + } + + j--; + } + + i++; + } + + return globalLocale; + } + + function loadLocale(name) { + var oldLocale = null; // TODO: Find a better way to register and load all the locales in Node + + if (!locales[name] && 'object' !== 'undefined' && module && module.exports) { + try { + oldLocale = globalLocale._abbr; + var aliasedRequire = commonjsRequire$2; + aliasedRequire('./locale/' + name); + getSetGlobalLocale(oldLocale); + } catch (e) {} + } + + return locales[name]; + } // This function will load locale and then set the global locale. If + // no arguments are passed in, it will simply return the current global + // locale key. + + + function getSetGlobalLocale(key, values) { + var data; + + if (key) { + if (isUndefined(values)) { + data = getLocale(key); + } else { + data = defineLocale(key, values); + } + + if (data) { + // moment.duration._locale = moment._locale = data; + globalLocale = data; + } else { + if (typeof console !== 'undefined' && console.warn) { + //warn user if arguments are passed but the locale could not be set + console.warn('Locale ' + key + ' not found. Did you forget to load it?'); + } + } + } + + return globalLocale._abbr; + } + + function defineLocale(name, config) { + if (config !== null) { + var locale, + parentConfig = baseConfig; + config.abbr = name; + + if (locales[name] != null) { + deprecateSimple('defineLocaleOverride', 'use moment.updateLocale(localeName, config) to change ' + 'an existing locale. moment.defineLocale(localeName, ' + 'config) should only be used for creating a new locale ' + 'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.'); + parentConfig = locales[name]._config; + } else if (config.parentLocale != null) { + if (locales[config.parentLocale] != null) { + parentConfig = locales[config.parentLocale]._config; + } else { + locale = loadLocale(config.parentLocale); + + if (locale != null) { + parentConfig = locale._config; + } else { + if (!localeFamilies[config.parentLocale]) { + localeFamilies[config.parentLocale] = []; + } + + localeFamilies[config.parentLocale].push({ + name: name, + config: config + }); + return null; + } + } + } + + locales[name] = new Locale(mergeConfigs(parentConfig, config)); + + if (localeFamilies[name]) { + localeFamilies[name].forEach(function (x) { + defineLocale(x.name, x.config); + }); + } // backwards compat for now: also set the locale + // make sure we set the locale AFTER all child locales have been + // created, so we won't end up with the child locale set. + + + getSetGlobalLocale(name); + return locales[name]; + } else { + // useful for testing + delete locales[name]; + return null; + } + } + + function updateLocale(name, config) { + if (config != null) { + var locale, + tmpLocale, + parentConfig = baseConfig; // MERGE + + tmpLocale = loadLocale(name); + + if (tmpLocale != null) { + parentConfig = tmpLocale._config; + } + + config = mergeConfigs(parentConfig, config); + locale = new Locale(config); + locale.parentLocale = locales[name]; + locales[name] = locale; // backwards compat for now: also set the locale + + getSetGlobalLocale(name); + } else { + // pass null for config to unupdate, useful for tests + if (locales[name] != null) { + if (locales[name].parentLocale != null) { + locales[name] = locales[name].parentLocale; + } else if (locales[name] != null) { + delete locales[name]; + } + } + } + + return locales[name]; + } // returns locale data + + + function getLocale(key) { + var locale; + + if (key && key._locale && key._locale._abbr) { + key = key._locale._abbr; + } + + if (!key) { + return globalLocale; + } + + if (!isArray(key)) { + //short-circuit everything else + locale = loadLocale(key); + + if (locale) { + return locale; + } + + key = [key]; + } + + return chooseLocale(key); + } + + function listLocales() { + return keys(locales); + } + + function checkOverflow(m) { + var overflow; + var a = m._a; + + if (a && getParsingFlags(m).overflow === -2) { + overflow = a[MONTH] < 0 || a[MONTH] > 11 ? MONTH : a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH]) ? DATE : a[HOUR] < 0 || a[HOUR] > 24 || a[HOUR] === 24 && (a[MINUTE] !== 0 || a[SECOND] !== 0 || a[MILLISECOND] !== 0) ? HOUR : a[MINUTE] < 0 || a[MINUTE] > 59 ? MINUTE : a[SECOND] < 0 || a[SECOND] > 59 ? SECOND : a[MILLISECOND] < 0 || a[MILLISECOND] > 999 ? MILLISECOND : -1; + + if (getParsingFlags(m)._overflowDayOfYear && (overflow < YEAR || overflow > DATE)) { + overflow = DATE; + } + + if (getParsingFlags(m)._overflowWeeks && overflow === -1) { + overflow = WEEK; + } + + if (getParsingFlags(m)._overflowWeekday && overflow === -1) { + overflow = WEEKDAY; + } + + getParsingFlags(m).overflow = overflow; + } + + return m; + } // Pick the first defined of two or three arguments. + + + function defaults(a, b, c) { + if (a != null) { + return a; + } + + if (b != null) { + return b; + } + + return c; + } + + function currentDateArray(config) { + // hooks is actually the exported moment object + var nowValue = new Date(hooks.now()); + + if (config._useUTC) { + return [nowValue.getUTCFullYear(), nowValue.getUTCMonth(), nowValue.getUTCDate()]; + } + + return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()]; + } // convert an array to a date. + // the array should mirror the parameters below + // note: all values past the year are optional and will default to the lowest possible value. + // [year, month, day , hour, minute, second, millisecond] + + + function configFromArray(config) { + var i, + date, + input = [], + currentDate, + expectedWeekday, + yearToUse; + + if (config._d) { + return; + } + + currentDate = currentDateArray(config); //compute day of the year from weeks and weekdays + + if (config._w && config._a[DATE] == null && config._a[MONTH] == null) { + dayOfYearFromWeekInfo(config); + } //if the day of the year is set, figure out what it is + + + if (config._dayOfYear != null) { + yearToUse = defaults(config._a[YEAR], currentDate[YEAR]); + + if (config._dayOfYear > daysInYear(yearToUse) || config._dayOfYear === 0) { + getParsingFlags(config)._overflowDayOfYear = true; + } + + date = createUTCDate(yearToUse, 0, config._dayOfYear); + config._a[MONTH] = date.getUTCMonth(); + config._a[DATE] = date.getUTCDate(); + } // Default to current date. + // * if no year, month, day of month are given, default to today + // * if day of month is given, default month and year + // * if month is given, default only year + // * if year is given, don't default anything + + + for (i = 0; i < 3 && config._a[i] == null; ++i) { + config._a[i] = input[i] = currentDate[i]; + } // Zero out whatever was not defaulted, including time + + + for (; i < 7; i++) { + config._a[i] = input[i] = config._a[i] == null ? i === 2 ? 1 : 0 : config._a[i]; + } // Check for 24:00:00.000 + + + if (config._a[HOUR] === 24 && config._a[MINUTE] === 0 && config._a[SECOND] === 0 && config._a[MILLISECOND] === 0) { + config._nextDay = true; + config._a[HOUR] = 0; + } + + config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input); + expectedWeekday = config._useUTC ? config._d.getUTCDay() : config._d.getDay(); // Apply timezone offset from input. The actual utcOffset can be changed + // with parseZone. + + if (config._tzm != null) { + config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm); + } + + if (config._nextDay) { + config._a[HOUR] = 24; + } // check for mismatching day of week + + + if (config._w && typeof config._w.d !== 'undefined' && config._w.d !== expectedWeekday) { + getParsingFlags(config).weekdayMismatch = true; + } + } + + function dayOfYearFromWeekInfo(config) { + var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow; + w = config._w; + + if (w.GG != null || w.W != null || w.E != null) { + dow = 1; + doy = 4; // TODO: We need to take the current isoWeekYear, but that depends on + // how we interpret now (local, utc, fixed offset). So create + // a now version of current config (take local/utc/offset flags, and + // create now). + + weekYear = defaults(w.GG, config._a[YEAR], weekOfYear(createLocal(), 1, 4).year); + week = defaults(w.W, 1); + weekday = defaults(w.E, 1); + + if (weekday < 1 || weekday > 7) { + weekdayOverflow = true; + } + } else { + dow = config._locale._week.dow; + doy = config._locale._week.doy; + var curWeek = weekOfYear(createLocal(), dow, doy); + weekYear = defaults(w.gg, config._a[YEAR], curWeek.year); // Default to current week. + + week = defaults(w.w, curWeek.week); + + if (w.d != null) { + // weekday -- low day numbers are considered next week + weekday = w.d; + + if (weekday < 0 || weekday > 6) { + weekdayOverflow = true; + } + } else if (w.e != null) { + // local weekday -- counting starts from beginning of week + weekday = w.e + dow; + + if (w.e < 0 || w.e > 6) { + weekdayOverflow = true; + } + } else { + // default to beginning of week + weekday = dow; + } + } + + if (week < 1 || week > weeksInYear(weekYear, dow, doy)) { + getParsingFlags(config)._overflowWeeks = true; + } else if (weekdayOverflow != null) { + getParsingFlags(config)._overflowWeekday = true; + } else { + temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy); + config._a[YEAR] = temp.year; + config._dayOfYear = temp.dayOfYear; + } + } // iso 8601 regex + // 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00) + + + var extendedIsoRegex = /^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/; + var basicIsoRegex = /^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/; + var tzRegex = /Z|[+-]\d\d(?::?\d\d)?/; + var isoDates = [['YYYYYY-MM-DD', /[+-]\d{6}-\d\d-\d\d/], ['YYYY-MM-DD', /\d{4}-\d\d-\d\d/], ['GGGG-[W]WW-E', /\d{4}-W\d\d-\d/], ['GGGG-[W]WW', /\d{4}-W\d\d/, false], ['YYYY-DDD', /\d{4}-\d{3}/], ['YYYY-MM', /\d{4}-\d\d/, false], ['YYYYYYMMDD', /[+-]\d{10}/], ['YYYYMMDD', /\d{8}/], // YYYYMM is NOT allowed by the standard + ['GGGG[W]WWE', /\d{4}W\d{3}/], ['GGGG[W]WW', /\d{4}W\d{2}/, false], ['YYYYDDD', /\d{7}/]]; // iso time formats and regexes + + var isoTimes = [['HH:mm:ss.SSSS', /\d\d:\d\d:\d\d\.\d+/], ['HH:mm:ss,SSSS', /\d\d:\d\d:\d\d,\d+/], ['HH:mm:ss', /\d\d:\d\d:\d\d/], ['HH:mm', /\d\d:\d\d/], ['HHmmss.SSSS', /\d\d\d\d\d\d\.\d+/], ['HHmmss,SSSS', /\d\d\d\d\d\d,\d+/], ['HHmmss', /\d\d\d\d\d\d/], ['HHmm', /\d\d\d\d/], ['HH', /\d\d/]]; + var aspNetJsonRegex = /^\/?Date\((\-?\d+)/i; // date from iso format + + function configFromISO(config) { + var i, + l, + string = config._i, + match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string), + allowTime, + dateFormat, + timeFormat, + tzFormat; + + if (match) { + getParsingFlags(config).iso = true; + + for (i = 0, l = isoDates.length; i < l; i++) { + if (isoDates[i][1].exec(match[1])) { + dateFormat = isoDates[i][0]; + allowTime = isoDates[i][2] !== false; + break; + } + } + + if (dateFormat == null) { + config._isValid = false; + return; + } + + if (match[3]) { + for (i = 0, l = isoTimes.length; i < l; i++) { + if (isoTimes[i][1].exec(match[3])) { + // match[2] should be 'T' or space + timeFormat = (match[2] || ' ') + isoTimes[i][0]; + break; + } + } + + if (timeFormat == null) { + config._isValid = false; + return; + } + } + + if (!allowTime && timeFormat != null) { + config._isValid = false; + return; + } + + if (match[4]) { + if (tzRegex.exec(match[4])) { + tzFormat = 'Z'; + } else { + config._isValid = false; + return; + } + } + + config._f = dateFormat + (timeFormat || '') + (tzFormat || ''); + configFromStringAndFormat(config); + } else { + config._isValid = false; + } + } // RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3 + + + var rfc2822 = /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/; + + function extractFromRFC2822Strings(yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr) { + var result = [untruncateYear(yearStr), defaultLocaleMonthsShort.indexOf(monthStr), parseInt(dayStr, 10), parseInt(hourStr, 10), parseInt(minuteStr, 10)]; + + if (secondStr) { + result.push(parseInt(secondStr, 10)); + } + + return result; + } + + function untruncateYear(yearStr) { + var year = parseInt(yearStr, 10); + + if (year <= 49) { + return 2000 + year; + } else if (year <= 999) { + return 1900 + year; + } + + return year; + } + + function preprocessRFC2822(s) { + // Remove comments and folding whitespace and replace multiple-spaces with a single space + return s.replace(/\([^)]*\)|[\n\t]/g, ' ').replace(/(\s\s+)/g, ' ').replace(/^\s\s*/, '').replace(/\s\s*$/, ''); + } + + function checkWeekday(weekdayStr, parsedInput, config) { + if (weekdayStr) { + // TODO: Replace the vanilla JS Date object with an indepentent day-of-week check. + var weekdayProvided = defaultLocaleWeekdaysShort.indexOf(weekdayStr), + weekdayActual = new Date(parsedInput[0], parsedInput[1], parsedInput[2]).getDay(); + + if (weekdayProvided !== weekdayActual) { + getParsingFlags(config).weekdayMismatch = true; + config._isValid = false; + return false; + } + } + + return true; + } + + var obsOffsets = { + UT: 0, + GMT: 0, + EDT: -4 * 60, + EST: -5 * 60, + CDT: -5 * 60, + CST: -6 * 60, + MDT: -6 * 60, + MST: -7 * 60, + PDT: -7 * 60, + PST: -8 * 60 + }; + + function calculateOffset(obsOffset, militaryOffset, numOffset) { + if (obsOffset) { + return obsOffsets[obsOffset]; + } else if (militaryOffset) { + // the only allowed military tz is Z + return 0; + } else { + var hm = parseInt(numOffset, 10); + var m = hm % 100, + h = (hm - m) / 100; + return h * 60 + m; + } + } // date and time from ref 2822 format + + + function configFromRFC2822(config) { + var match = rfc2822.exec(preprocessRFC2822(config._i)); + + if (match) { + var parsedArray = extractFromRFC2822Strings(match[4], match[3], match[2], match[5], match[6], match[7]); + + if (!checkWeekday(match[1], parsedArray, config)) { + return; + } + + config._a = parsedArray; + config._tzm = calculateOffset(match[8], match[9], match[10]); + config._d = createUTCDate.apply(null, config._a); + + config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm); + + getParsingFlags(config).rfc2822 = true; + } else { + config._isValid = false; + } + } // date from iso format or fallback + + + function configFromString(config) { + var matched = aspNetJsonRegex.exec(config._i); + + if (matched !== null) { + config._d = new Date(+matched[1]); + return; + } + + configFromISO(config); + + if (config._isValid === false) { + delete config._isValid; + } else { + return; + } + + configFromRFC2822(config); + + if (config._isValid === false) { + delete config._isValid; + } else { + return; + } // Final attempt, use Input Fallback + + + hooks.createFromInputFallback(config); + } + + hooks.createFromInputFallback = deprecate('value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), ' + 'which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are ' + 'discouraged and will be removed in an upcoming major release. Please refer to ' + 'http://momentjs.com/guides/#/warnings/js-date/ for more info.', function (config) { + config._d = new Date(config._i + (config._useUTC ? ' UTC' : '')); + }); // constant that refers to the ISO standard + + hooks.ISO_8601 = function () {}; // constant that refers to the RFC 2822 form + + + hooks.RFC_2822 = function () {}; // date from string and format string + + + function configFromStringAndFormat(config) { + // TODO: Move this to another part of the creation flow to prevent circular deps + if (config._f === hooks.ISO_8601) { + configFromISO(config); + return; + } + + if (config._f === hooks.RFC_2822) { + configFromRFC2822(config); + return; + } + + config._a = []; + getParsingFlags(config).empty = true; // This array is used to make a Date, either with `new Date` or `Date.UTC` + + var string = '' + config._i, + i, + parsedInput, + tokens, + token, + skipped, + stringLength = string.length, + totalParsedInputLength = 0; + tokens = expandFormat(config._f, config._locale).match(formattingTokens) || []; + + for (i = 0; i < tokens.length; i++) { + token = tokens[i]; + parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0]; // console.log('token', token, 'parsedInput', parsedInput, + // 'regex', getParseRegexForToken(token, config)); + + if (parsedInput) { + skipped = string.substr(0, string.indexOf(parsedInput)); + + if (skipped.length > 0) { + getParsingFlags(config).unusedInput.push(skipped); + } + + string = string.slice(string.indexOf(parsedInput) + parsedInput.length); + totalParsedInputLength += parsedInput.length; + } // don't parse if it's not a known token + + + if (formatTokenFunctions[token]) { + if (parsedInput) { + getParsingFlags(config).empty = false; + } else { + getParsingFlags(config).unusedTokens.push(token); + } + + addTimeToArrayFromToken(token, parsedInput, config); + } else if (config._strict && !parsedInput) { + getParsingFlags(config).unusedTokens.push(token); + } + } // add remaining unparsed input length to the string + + + getParsingFlags(config).charsLeftOver = stringLength - totalParsedInputLength; + + if (string.length > 0) { + getParsingFlags(config).unusedInput.push(string); + } // clear _12h flag if hour is <= 12 + + + if (config._a[HOUR] <= 12 && getParsingFlags(config).bigHour === true && config._a[HOUR] > 0) { + getParsingFlags(config).bigHour = undefined; + } + + getParsingFlags(config).parsedDateParts = config._a.slice(0); + getParsingFlags(config).meridiem = config._meridiem; // handle meridiem + + config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR], config._meridiem); + configFromArray(config); + checkOverflow(config); + } + + function meridiemFixWrap(locale, hour, meridiem) { + var isPm; + + if (meridiem == null) { + // nothing to do + return hour; + } + + if (locale.meridiemHour != null) { + return locale.meridiemHour(hour, meridiem); + } else if (locale.isPM != null) { + // Fallback + isPm = locale.isPM(meridiem); + + if (isPm && hour < 12) { + hour += 12; + } + + if (!isPm && hour === 12) { + hour = 0; + } + + return hour; + } else { + // this is not supposed to happen + return hour; + } + } // date from string and array of format strings + + + function configFromStringAndArray(config) { + var tempConfig, bestMoment, scoreToBeat, i, currentScore; + + if (config._f.length === 0) { + getParsingFlags(config).invalidFormat = true; + config._d = new Date(NaN); + return; + } + + for (i = 0; i < config._f.length; i++) { + currentScore = 0; + tempConfig = copyConfig({}, config); + + if (config._useUTC != null) { + tempConfig._useUTC = config._useUTC; + } + + tempConfig._f = config._f[i]; + configFromStringAndFormat(tempConfig); + + if (!isValid(tempConfig)) { + continue; + } // if there is any input that was not parsed add a penalty for that format + + + currentScore += getParsingFlags(tempConfig).charsLeftOver; //or tokens + + currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10; + getParsingFlags(tempConfig).score = currentScore; + + if (scoreToBeat == null || currentScore < scoreToBeat) { + scoreToBeat = currentScore; + bestMoment = tempConfig; + } + } + + extend(config, bestMoment || tempConfig); + } + + function configFromObject(config) { + if (config._d) { + return; + } + + var i = normalizeObjectUnits(config._i); + config._a = map([i.year, i.month, i.day || i.date, i.hour, i.minute, i.second, i.millisecond], function (obj) { + return obj && parseInt(obj, 10); + }); + configFromArray(config); + } + + function createFromConfig(config) { + var res = new Moment(checkOverflow(prepareConfig(config))); + + if (res._nextDay) { + // Adding is smart enough around DST + res.add(1, 'd'); + res._nextDay = undefined; + } + + return res; + } + + function prepareConfig(config) { + var input = config._i, + format = config._f; + config._locale = config._locale || getLocale(config._l); + + if (input === null || format === undefined && input === '') { + return createInvalid({ + nullInput: true + }); + } + + if (typeof input === 'string') { + config._i = input = config._locale.preparse(input); + } + + if (isMoment(input)) { + return new Moment(checkOverflow(input)); + } else if (isDate(input)) { + config._d = input; + } else if (isArray(format)) { + configFromStringAndArray(config); + } else if (format) { + configFromStringAndFormat(config); + } else { + configFromInput(config); + } + + if (!isValid(config)) { + config._d = null; + } + + return config; + } + + function configFromInput(config) { + var input = config._i; + + if (isUndefined(input)) { + config._d = new Date(hooks.now()); + } else if (isDate(input)) { + config._d = new Date(input.valueOf()); + } else if (typeof input === 'string') { + configFromString(config); + } else if (isArray(input)) { + config._a = map(input.slice(0), function (obj) { + return parseInt(obj, 10); + }); + configFromArray(config); + } else if (isObject(input)) { + configFromObject(config); + } else if (isNumber(input)) { + // from milliseconds + config._d = new Date(input); + } else { + hooks.createFromInputFallback(config); + } + } + + function createLocalOrUTC(input, format, locale, strict, isUTC) { + var c = {}; + + if (locale === true || locale === false) { + strict = locale; + locale = undefined; + } + + if (isObject(input) && isObjectEmpty(input) || isArray(input) && input.length === 0) { + input = undefined; + } // object construction must be done this way. + // https://github.com/moment/moment/issues/1423 + + + c._isAMomentObject = true; + c._useUTC = c._isUTC = isUTC; + c._l = locale; + c._i = input; + c._f = format; + c._strict = strict; + return createFromConfig(c); + } + + function createLocal(input, format, locale, strict) { + return createLocalOrUTC(input, format, locale, strict, false); + } + + var prototypeMin = deprecate('moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/', function () { + var other = createLocal.apply(null, arguments); + + if (this.isValid() && other.isValid()) { + return other < this ? this : other; + } else { + return createInvalid(); + } + }); + var prototypeMax = deprecate('moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/', function () { + var other = createLocal.apply(null, arguments); + + if (this.isValid() && other.isValid()) { + return other > this ? this : other; + } else { + return createInvalid(); + } + }); // Pick a moment m from moments so that m[fn](other) is true for all + // other. This relies on the function fn to be transitive. + // + // moments should either be an array of moment objects or an array, whose + // first element is an array of moment objects. + + function pickBy(fn, moments) { + var res, i; + + if (moments.length === 1 && isArray(moments[0])) { + moments = moments[0]; + } + + if (!moments.length) { + return createLocal(); + } + + res = moments[0]; + + for (i = 1; i < moments.length; ++i) { + if (!moments[i].isValid() || moments[i][fn](res)) { + res = moments[i]; + } + } + + return res; + } // TODO: Use [].sort instead? + + + function min() { + var args = [].slice.call(arguments, 0); + return pickBy('isBefore', args); + } + + function max() { + var args = [].slice.call(arguments, 0); + return pickBy('isAfter', args); + } + + var now = function () { + return Date.now ? Date.now() : +new Date(); + }; + + var ordering = ['year', 'quarter', 'month', 'week', 'day', 'hour', 'minute', 'second', 'millisecond']; + + function isDurationValid(m) { + for (var key in m) { + if (!(indexOf.call(ordering, key) !== -1 && (m[key] == null || !isNaN(m[key])))) { + return false; + } + } + + var unitHasDecimal = false; + + for (var i = 0; i < ordering.length; ++i) { + if (m[ordering[i]]) { + if (unitHasDecimal) { + return false; // only allow non-integers for smallest unit + } + + if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) { + unitHasDecimal = true; + } + } + } + + return true; + } + + function isValid$1() { + return this._isValid; + } + + function createInvalid$1() { + return createDuration(NaN); + } + + function Duration(duration) { + var normalizedInput = normalizeObjectUnits(duration), + years = normalizedInput.year || 0, + quarters = normalizedInput.quarter || 0, + months = normalizedInput.month || 0, + weeks = normalizedInput.week || normalizedInput.isoWeek || 0, + days = normalizedInput.day || 0, + hours = normalizedInput.hour || 0, + minutes = normalizedInput.minute || 0, + seconds = normalizedInput.second || 0, + milliseconds = normalizedInput.millisecond || 0; + this._isValid = isDurationValid(normalizedInput); // representation for dateAddRemove + + this._milliseconds = +milliseconds + seconds * 1e3 + // 1000 + minutes * 6e4 + // 1000 * 60 + hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978 + // Because of dateAddRemove treats 24 hours as different from a + // day when working around DST, we need to store them separately + + this._days = +days + weeks * 7; // It is impossible to translate months into days without knowing + // which months you are are talking about, so we have to store + // it separately. + + this._months = +months + quarters * 3 + years * 12; + this._data = {}; + this._locale = getLocale(); + + this._bubble(); + } + + function isDuration(obj) { + return obj instanceof Duration; + } + + function absRound(number) { + if (number < 0) { + return Math.round(-1 * number) * -1; + } else { + return Math.round(number); + } + } // FORMATTING + + + function offset(token, separator) { + addFormatToken(token, 0, 0, function () { + var offset = this.utcOffset(); + var sign = '+'; + + if (offset < 0) { + offset = -offset; + sign = '-'; + } + + return sign + zeroFill(~~(offset / 60), 2) + separator + zeroFill(~~offset % 60, 2); + }); + } + + offset('Z', ':'); + offset('ZZ', ''); // PARSING + + addRegexToken('Z', matchShortOffset); + addRegexToken('ZZ', matchShortOffset); + addParseToken(['Z', 'ZZ'], function (input, array, config) { + config._useUTC = true; + config._tzm = offsetFromString(matchShortOffset, input); + }); // HELPERS + // timezone chunker + // '+10:00' > ['10', '00'] + // '-1530' > ['-15', '30'] + + var chunkOffset = /([\+\-]|\d\d)/gi; + + function offsetFromString(matcher, string) { + var matches = (string || '').match(matcher); + + if (matches === null) { + return null; + } + + var chunk = matches[matches.length - 1] || []; + var parts = (chunk + '').match(chunkOffset) || ['-', 0, 0]; + var minutes = +(parts[1] * 60) + toInt(parts[2]); + return minutes === 0 ? 0 : parts[0] === '+' ? minutes : -minutes; + } // Return a moment from input, that is local/utc/zone equivalent to model. + + + function cloneWithOffset(input, model) { + var res, diff; + + if (model._isUTC) { + res = model.clone(); + diff = (isMoment(input) || isDate(input) ? input.valueOf() : createLocal(input).valueOf()) - res.valueOf(); // Use low-level api, because this fn is low-level api. + + res._d.setTime(res._d.valueOf() + diff); + + hooks.updateOffset(res, false); + return res; + } else { + return createLocal(input).local(); + } + } + + function getDateOffset(m) { + // On Firefox.24 Date#getTimezoneOffset returns a floating point. + // https://github.com/moment/moment/pull/1871 + return -Math.round(m._d.getTimezoneOffset() / 15) * 15; + } // HOOKS + // This function will be called whenever a moment is mutated. + // It is intended to keep the offset in sync with the timezone. + + + hooks.updateOffset = function () {}; // MOMENTS + // keepLocalTime = true means only change the timezone, without + // affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]--> + // 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset + // +0200, so we adjust the time as needed, to be valid. + // + // Keeping the time actually adds/subtracts (one hour) + // from the actual represented time. That is why we call updateOffset + // a second time. In case it wants us to change the offset again + // _changeInProgress == true case, then we have to adjust, because + // there is no such time in the given timezone. + + + function getSetOffset(input, keepLocalTime, keepMinutes) { + var offset = this._offset || 0, + localAdjust; + + if (!this.isValid()) { + return input != null ? this : NaN; + } + + if (input != null) { + if (typeof input === 'string') { + input = offsetFromString(matchShortOffset, input); + + if (input === null) { + return this; + } + } else if (Math.abs(input) < 16 && !keepMinutes) { + input = input * 60; + } + + if (!this._isUTC && keepLocalTime) { + localAdjust = getDateOffset(this); + } + + this._offset = input; + this._isUTC = true; + + if (localAdjust != null) { + this.add(localAdjust, 'm'); + } + + if (offset !== input) { + if (!keepLocalTime || this._changeInProgress) { + addSubtract(this, createDuration(input - offset, 'm'), 1, false); + } else if (!this._changeInProgress) { + this._changeInProgress = true; + hooks.updateOffset(this, true); + this._changeInProgress = null; + } + } + + return this; + } else { + return this._isUTC ? offset : getDateOffset(this); + } + } + + function getSetZone(input, keepLocalTime) { + if (input != null) { + if (typeof input !== 'string') { + input = -input; + } + + this.utcOffset(input, keepLocalTime); + return this; + } else { + return -this.utcOffset(); + } + } + + function setOffsetToUTC(keepLocalTime) { + return this.utcOffset(0, keepLocalTime); + } + + function setOffsetToLocal(keepLocalTime) { + if (this._isUTC) { + this.utcOffset(0, keepLocalTime); + this._isUTC = false; + + if (keepLocalTime) { + this.subtract(getDateOffset(this), 'm'); + } + } + + return this; + } + + function setOffsetToParsedOffset() { + if (this._tzm != null) { + this.utcOffset(this._tzm, false, true); + } else if (typeof this._i === 'string') { + var tZone = offsetFromString(matchOffset, this._i); + + if (tZone != null) { + this.utcOffset(tZone); + } else { + this.utcOffset(0, true); + } + } + + return this; + } + + function hasAlignedHourOffset(input) { + if (!this.isValid()) { + return false; + } + + input = input ? createLocal(input).utcOffset() : 0; + return (this.utcOffset() - input) % 60 === 0; + } + + function isDaylightSavingTime() { + return this.utcOffset() > this.clone().month(0).utcOffset() || this.utcOffset() > this.clone().month(5).utcOffset(); + } + + function isDaylightSavingTimeShifted() { + if (!isUndefined(this._isDSTShifted)) { + return this._isDSTShifted; + } + + var c = {}; + copyConfig(c, this); + c = prepareConfig(c); + + if (c._a) { + var other = c._isUTC ? createUTC(c._a) : createLocal(c._a); + this._isDSTShifted = this.isValid() && compareArrays(c._a, other.toArray()) > 0; + } else { + this._isDSTShifted = false; + } + + return this._isDSTShifted; + } + + function isLocal() { + return this.isValid() ? !this._isUTC : false; + } + + function isUtcOffset() { + return this.isValid() ? this._isUTC : false; + } + + function isUtc() { + return this.isValid() ? this._isUTC && this._offset === 0 : false; + } // ASP.NET json date format regex + + + var aspNetRegex = /^(\-|\+)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/; // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html + // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere + // and further modified to allow for strings containing both week and day + + var isoRegex = /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/; + + function createDuration(input, key) { + var duration = input, + // matching against regexp is expensive, do it on demand + match = null, + sign, + ret, + diffRes; + + if (isDuration(input)) { + duration = { + ms: input._milliseconds, + d: input._days, + M: input._months + }; + } else if (isNumber(input)) { + duration = {}; + + if (key) { + duration[key] = input; + } else { + duration.milliseconds = input; + } + } else if (!!(match = aspNetRegex.exec(input))) { + sign = match[1] === '-' ? -1 : 1; + duration = { + y: 0, + d: toInt(match[DATE]) * sign, + h: toInt(match[HOUR]) * sign, + m: toInt(match[MINUTE]) * sign, + s: toInt(match[SECOND]) * sign, + ms: toInt(absRound(match[MILLISECOND] * 1000)) * sign // the millisecond decimal point is included in the match + + }; + } else if (!!(match = isoRegex.exec(input))) { + sign = match[1] === '-' ? -1 : 1; + duration = { + y: parseIso(match[2], sign), + M: parseIso(match[3], sign), + w: parseIso(match[4], sign), + d: parseIso(match[5], sign), + h: parseIso(match[6], sign), + m: parseIso(match[7], sign), + s: parseIso(match[8], sign) + }; + } else if (duration == null) { + // checks for null or undefined + duration = {}; + } else if (typeof duration === 'object' && ('from' in duration || 'to' in duration)) { + diffRes = momentsDifference(createLocal(duration.from), createLocal(duration.to)); + duration = {}; + duration.ms = diffRes.milliseconds; + duration.M = diffRes.months; + } + + ret = new Duration(duration); + + if (isDuration(input) && hasOwnProp(input, '_locale')) { + ret._locale = input._locale; + } + + return ret; + } + + createDuration.fn = Duration.prototype; + createDuration.invalid = createInvalid$1; + + function parseIso(inp, sign) { + // We'd normally use ~~inp for this, but unfortunately it also + // converts floats to ints. + // inp may be undefined, so careful calling replace on it. + var res = inp && parseFloat(inp.replace(',', '.')); // apply sign while we're at it + + return (isNaN(res) ? 0 : res) * sign; + } + + function positiveMomentsDifference(base, other) { + var res = {}; + res.months = other.month() - base.month() + (other.year() - base.year()) * 12; + + if (base.clone().add(res.months, 'M').isAfter(other)) { + --res.months; + } + + res.milliseconds = +other - +base.clone().add(res.months, 'M'); + return res; + } + + function momentsDifference(base, other) { + var res; + + if (!(base.isValid() && other.isValid())) { + return { + milliseconds: 0, + months: 0 + }; + } + + other = cloneWithOffset(other, base); + + if (base.isBefore(other)) { + res = positiveMomentsDifference(base, other); + } else { + res = positiveMomentsDifference(other, base); + res.milliseconds = -res.milliseconds; + res.months = -res.months; + } + + return res; + } // TODO: remove 'name' arg after deprecation is removed + + + function createAdder(direction, name) { + return function (val, period) { + var dur, tmp; //invert the arguments, but complain about it + + if (period !== null && !isNaN(+period)) { + deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' + 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.'); + tmp = val; + val = period; + period = tmp; + } + + val = typeof val === 'string' ? +val : val; + dur = createDuration(val, period); + addSubtract(this, dur, direction); + return this; + }; + } + + function addSubtract(mom, duration, isAdding, updateOffset) { + var milliseconds = duration._milliseconds, + days = absRound(duration._days), + months = absRound(duration._months); + + if (!mom.isValid()) { + // No op + return; + } + + updateOffset = updateOffset == null ? true : updateOffset; + + if (months) { + setMonth(mom, get(mom, 'Month') + months * isAdding); + } + + if (days) { + set$1(mom, 'Date', get(mom, 'Date') + days * isAdding); + } + + if (milliseconds) { + mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding); + } + + if (updateOffset) { + hooks.updateOffset(mom, days || months); + } + } + + var add = createAdder(1, 'add'); + var subtract = createAdder(-1, 'subtract'); + + function getCalendarFormat(myMoment, now) { + var diff = myMoment.diff(now, 'days', true); + return diff < -6 ? 'sameElse' : diff < -1 ? 'lastWeek' : diff < 0 ? 'lastDay' : diff < 1 ? 'sameDay' : diff < 2 ? 'nextDay' : diff < 7 ? 'nextWeek' : 'sameElse'; + } + + function calendar$1(time, formats) { + // We want to compare the start of today, vs this. + // Getting start-of-today depends on whether we're local/utc/offset or not. + var now = time || createLocal(), + sod = cloneWithOffset(now, this).startOf('day'), + format = hooks.calendarFormat(this, sod) || 'sameElse'; + var output = formats && (isFunction(formats[format]) ? formats[format].call(this, now) : formats[format]); + return this.format(output || this.localeData().calendar(format, this, createLocal(now))); + } + + function clone() { + return new Moment(this); + } + + function isAfter(input, units) { + var localInput = isMoment(input) ? input : createLocal(input); + + if (!(this.isValid() && localInput.isValid())) { + return false; + } + + units = normalizeUnits(units) || 'millisecond'; + + if (units === 'millisecond') { + return this.valueOf() > localInput.valueOf(); + } else { + return localInput.valueOf() < this.clone().startOf(units).valueOf(); + } + } + + function isBefore(input, units) { + var localInput = isMoment(input) ? input : createLocal(input); + + if (!(this.isValid() && localInput.isValid())) { + return false; + } + + units = normalizeUnits(units) || 'millisecond'; + + if (units === 'millisecond') { + return this.valueOf() < localInput.valueOf(); + } else { + return this.clone().endOf(units).valueOf() < localInput.valueOf(); + } + } + + function isBetween(from, to, units, inclusivity) { + var localFrom = isMoment(from) ? from : createLocal(from), + localTo = isMoment(to) ? to : createLocal(to); + + if (!(this.isValid() && localFrom.isValid() && localTo.isValid())) { + return false; + } + + inclusivity = inclusivity || '()'; + return (inclusivity[0] === '(' ? this.isAfter(localFrom, units) : !this.isBefore(localFrom, units)) && (inclusivity[1] === ')' ? this.isBefore(localTo, units) : !this.isAfter(localTo, units)); + } + + function isSame(input, units) { + var localInput = isMoment(input) ? input : createLocal(input), + inputMs; + + if (!(this.isValid() && localInput.isValid())) { + return false; + } + + units = normalizeUnits(units) || 'millisecond'; + + if (units === 'millisecond') { + return this.valueOf() === localInput.valueOf(); + } else { + inputMs = localInput.valueOf(); + return this.clone().startOf(units).valueOf() <= inputMs && inputMs <= this.clone().endOf(units).valueOf(); + } + } + + function isSameOrAfter(input, units) { + return this.isSame(input, units) || this.isAfter(input, units); + } + + function isSameOrBefore(input, units) { + return this.isSame(input, units) || this.isBefore(input, units); + } + + function diff(input, units, asFloat) { + var that, zoneDelta, output; + + if (!this.isValid()) { + return NaN; + } + + that = cloneWithOffset(input, this); + + if (!that.isValid()) { + return NaN; + } + + zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4; + units = normalizeUnits(units); + + switch (units) { + case 'year': + output = monthDiff(this, that) / 12; + break; + + case 'month': + output = monthDiff(this, that); + break; + + case 'quarter': + output = monthDiff(this, that) / 3; + break; + + case 'second': + output = (this - that) / 1e3; + break; + // 1000 + + case 'minute': + output = (this - that) / 6e4; + break; + // 1000 * 60 + + case 'hour': + output = (this - that) / 36e5; + break; + // 1000 * 60 * 60 + + case 'day': + output = (this - that - zoneDelta) / 864e5; + break; + // 1000 * 60 * 60 * 24, negate dst + + case 'week': + output = (this - that - zoneDelta) / 6048e5; + break; + // 1000 * 60 * 60 * 24 * 7, negate dst + + default: + output = this - that; + } + + return asFloat ? output : absFloor(output); + } + + function monthDiff(a, b) { + // difference in months + var wholeMonthDiff = (b.year() - a.year()) * 12 + (b.month() - a.month()), + // b is in (anchor - 1 month, anchor + 1 month) + anchor = a.clone().add(wholeMonthDiff, 'months'), + anchor2, + adjust; + + if (b - anchor < 0) { + anchor2 = a.clone().add(wholeMonthDiff - 1, 'months'); // linear across the month + + adjust = (b - anchor) / (anchor - anchor2); + } else { + anchor2 = a.clone().add(wholeMonthDiff + 1, 'months'); // linear across the month + + adjust = (b - anchor) / (anchor2 - anchor); + } //check for negative zero, return zero if negative zero + + + return -(wholeMonthDiff + adjust) || 0; + } + + hooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ'; + hooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]'; + + function toString() { + return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ'); + } + + function toISOString(keepOffset) { + if (!this.isValid()) { + return null; + } + + var utc = keepOffset !== true; + var m = utc ? this.clone().utc() : this; + + if (m.year() < 0 || m.year() > 9999) { + return formatMoment(m, utc ? 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYYYY-MM-DD[T]HH:mm:ss.SSSZ'); + } + + if (isFunction(Date.prototype.toISOString)) { + // native implementation is ~50x faster, use it when we can + if (utc) { + return this.toDate().toISOString(); + } else { + return new Date(this.valueOf() + this.utcOffset() * 60 * 1000).toISOString().replace('Z', formatMoment(m, 'Z')); + } + } + + return formatMoment(m, utc ? 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYY-MM-DD[T]HH:mm:ss.SSSZ'); + } + /** + * Return a human readable representation of a moment that can + * also be evaluated to get a new moment which is the same + * + * @link https://nodejs.org/dist/latest/docs/api/util.html#util_custom_inspect_function_on_objects + */ + + + function inspect() { + if (!this.isValid()) { + return 'moment.invalid(/* ' + this._i + ' */)'; + } + + var func = 'moment'; + var zone = ''; + + if (!this.isLocal()) { + func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone'; + zone = 'Z'; + } + + var prefix = '[' + func + '("]'; + var year = 0 <= this.year() && this.year() <= 9999 ? 'YYYY' : 'YYYYYY'; + var datetime = '-MM-DD[T]HH:mm:ss.SSS'; + var suffix = zone + '[")]'; + return this.format(prefix + year + datetime + suffix); + } + + function format(inputString) { + if (!inputString) { + inputString = this.isUtc() ? hooks.defaultFormatUtc : hooks.defaultFormat; + } + + var output = formatMoment(this, inputString); + return this.localeData().postformat(output); + } + + function from(time, withoutSuffix) { + if (this.isValid() && (isMoment(time) && time.isValid() || createLocal(time).isValid())) { + return createDuration({ + to: this, + from: time + }).locale(this.locale()).humanize(!withoutSuffix); + } else { + return this.localeData().invalidDate(); + } + } + + function fromNow(withoutSuffix) { + return this.from(createLocal(), withoutSuffix); + } + + function to(time, withoutSuffix) { + if (this.isValid() && (isMoment(time) && time.isValid() || createLocal(time).isValid())) { + return createDuration({ + from: this, + to: time + }).locale(this.locale()).humanize(!withoutSuffix); + } else { + return this.localeData().invalidDate(); + } + } + + function toNow(withoutSuffix) { + return this.to(createLocal(), withoutSuffix); + } // If passed a locale key, it will set the locale for this + // instance. Otherwise, it will return the locale configuration + // variables for this instance. + + + function locale(key) { + var newLocaleData; + + if (key === undefined) { + return this._locale._abbr; + } else { + newLocaleData = getLocale(key); + + if (newLocaleData != null) { + this._locale = newLocaleData; + } + + return this; + } + } + + var lang = deprecate('moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.', function (key) { + if (key === undefined) { + return this.localeData(); + } else { + return this.locale(key); + } + }); + + function localeData() { + return this._locale; + } + + var MS_PER_SECOND = 1000; + var MS_PER_MINUTE = 60 * MS_PER_SECOND; + var MS_PER_HOUR = 60 * MS_PER_MINUTE; + var MS_PER_400_YEARS = (365 * 400 + 97) * 24 * MS_PER_HOUR; // actual modulo - handles negative numbers (for dates before 1970): + + function mod$1(dividend, divisor) { + return (dividend % divisor + divisor) % divisor; + } + + function localStartOfDate(y, m, d) { + // the date constructor remaps years 0-99 to 1900-1999 + if (y < 100 && y >= 0) { + // preserve leap years using a full 400 year cycle, then reset + return new Date(y + 400, m, d) - MS_PER_400_YEARS; + } else { + return new Date(y, m, d).valueOf(); + } + } + + function utcStartOfDate(y, m, d) { + // Date.UTC remaps years 0-99 to 1900-1999 + if (y < 100 && y >= 0) { + // preserve leap years using a full 400 year cycle, then reset + return Date.UTC(y + 400, m, d) - MS_PER_400_YEARS; + } else { + return Date.UTC(y, m, d); + } + } + + function startOf(units) { + var time; + units = normalizeUnits(units); + + if (units === undefined || units === 'millisecond' || !this.isValid()) { + return this; + } + + var startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate; + + switch (units) { + case 'year': + time = startOfDate(this.year(), 0, 1); + break; + + case 'quarter': + time = startOfDate(this.year(), this.month() - this.month() % 3, 1); + break; + + case 'month': + time = startOfDate(this.year(), this.month(), 1); + break; + + case 'week': + time = startOfDate(this.year(), this.month(), this.date() - this.weekday()); + break; + + case 'isoWeek': + time = startOfDate(this.year(), this.month(), this.date() - (this.isoWeekday() - 1)); + break; + + case 'day': + case 'date': + time = startOfDate(this.year(), this.month(), this.date()); + break; + + case 'hour': + time = this._d.valueOf(); + time -= mod$1(time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE), MS_PER_HOUR); + break; + + case 'minute': + time = this._d.valueOf(); + time -= mod$1(time, MS_PER_MINUTE); + break; + + case 'second': + time = this._d.valueOf(); + time -= mod$1(time, MS_PER_SECOND); + break; + } + + this._d.setTime(time); + + hooks.updateOffset(this, true); + return this; + } + + function endOf(units) { + var time; + units = normalizeUnits(units); + + if (units === undefined || units === 'millisecond' || !this.isValid()) { + return this; + } + + var startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate; + + switch (units) { + case 'year': + time = startOfDate(this.year() + 1, 0, 1) - 1; + break; + + case 'quarter': + time = startOfDate(this.year(), this.month() - this.month() % 3 + 3, 1) - 1; + break; + + case 'month': + time = startOfDate(this.year(), this.month() + 1, 1) - 1; + break; + + case 'week': + time = startOfDate(this.year(), this.month(), this.date() - this.weekday() + 7) - 1; + break; + + case 'isoWeek': + time = startOfDate(this.year(), this.month(), this.date() - (this.isoWeekday() - 1) + 7) - 1; + break; + + case 'day': + case 'date': + time = startOfDate(this.year(), this.month(), this.date() + 1) - 1; + break; + + case 'hour': + time = this._d.valueOf(); + time += MS_PER_HOUR - mod$1(time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE), MS_PER_HOUR) - 1; + break; + + case 'minute': + time = this._d.valueOf(); + time += MS_PER_MINUTE - mod$1(time, MS_PER_MINUTE) - 1; + break; + + case 'second': + time = this._d.valueOf(); + time += MS_PER_SECOND - mod$1(time, MS_PER_SECOND) - 1; + break; + } + + this._d.setTime(time); + + hooks.updateOffset(this, true); + return this; + } + + function valueOf() { + return this._d.valueOf() - (this._offset || 0) * 60000; + } + + function unix() { + return Math.floor(this.valueOf() / 1000); + } + + function toDate() { + return new Date(this.valueOf()); + } + + function toArray() { + var m = this; + return [m.year(), m.month(), m.date(), m.hour(), m.minute(), m.second(), m.millisecond()]; + } + + function toObject() { + var m = this; + return { + years: m.year(), + months: m.month(), + date: m.date(), + hours: m.hours(), + minutes: m.minutes(), + seconds: m.seconds(), + milliseconds: m.milliseconds() + }; + } + + function toJSON() { + // new Date(NaN).toJSON() === null + return this.isValid() ? this.toISOString() : null; + } + + function isValid$2() { + return isValid(this); + } + + function parsingFlags() { + return extend({}, getParsingFlags(this)); + } + + function invalidAt() { + return getParsingFlags(this).overflow; + } + + function creationData() { + return { + input: this._i, + format: this._f, + locale: this._locale, + isUTC: this._isUTC, + strict: this._strict + }; + } // FORMATTING + + + addFormatToken(0, ['gg', 2], 0, function () { + return this.weekYear() % 100; + }); + addFormatToken(0, ['GG', 2], 0, function () { + return this.isoWeekYear() % 100; + }); + + function addWeekYearFormatToken(token, getter) { + addFormatToken(0, [token, token.length], 0, getter); + } + + addWeekYearFormatToken('gggg', 'weekYear'); + addWeekYearFormatToken('ggggg', 'weekYear'); + addWeekYearFormatToken('GGGG', 'isoWeekYear'); + addWeekYearFormatToken('GGGGG', 'isoWeekYear'); // ALIASES + + addUnitAlias('weekYear', 'gg'); + addUnitAlias('isoWeekYear', 'GG'); // PRIORITY + + addUnitPriority('weekYear', 1); + addUnitPriority('isoWeekYear', 1); // PARSING + + addRegexToken('G', matchSigned); + addRegexToken('g', matchSigned); + addRegexToken('GG', match1to2, match2); + addRegexToken('gg', match1to2, match2); + addRegexToken('GGGG', match1to4, match4); + addRegexToken('gggg', match1to4, match4); + addRegexToken('GGGGG', match1to6, match6); + addRegexToken('ggggg', match1to6, match6); + addWeekParseToken(['gggg', 'ggggg', 'GGGG', 'GGGGG'], function (input, week, config, token) { + week[token.substr(0, 2)] = toInt(input); + }); + addWeekParseToken(['gg', 'GG'], function (input, week, config, token) { + week[token] = hooks.parseTwoDigitYear(input); + }); // MOMENTS + + function getSetWeekYear(input) { + return getSetWeekYearHelper.call(this, input, this.week(), this.weekday(), this.localeData()._week.dow, this.localeData()._week.doy); + } + + function getSetISOWeekYear(input) { + return getSetWeekYearHelper.call(this, input, this.isoWeek(), this.isoWeekday(), 1, 4); + } + + function getISOWeeksInYear() { + return weeksInYear(this.year(), 1, 4); + } + + function getWeeksInYear() { + var weekInfo = this.localeData()._week; + + return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy); + } + + function getSetWeekYearHelper(input, week, weekday, dow, doy) { + var weeksTarget; + + if (input == null) { + return weekOfYear(this, dow, doy).year; + } else { + weeksTarget = weeksInYear(input, dow, doy); + + if (week > weeksTarget) { + week = weeksTarget; + } + + return setWeekAll.call(this, input, week, weekday, dow, doy); + } + } + + function setWeekAll(weekYear, week, weekday, dow, doy) { + var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy), + date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear); + this.year(date.getUTCFullYear()); + this.month(date.getUTCMonth()); + this.date(date.getUTCDate()); + return this; + } // FORMATTING + + + addFormatToken('Q', 0, 'Qo', 'quarter'); // ALIASES + + addUnitAlias('quarter', 'Q'); // PRIORITY + + addUnitPriority('quarter', 7); // PARSING + + addRegexToken('Q', match1); + addParseToken('Q', function (input, array) { + array[MONTH] = (toInt(input) - 1) * 3; + }); // MOMENTS + + function getSetQuarter(input) { + return input == null ? Math.ceil((this.month() + 1) / 3) : this.month((input - 1) * 3 + this.month() % 3); + } // FORMATTING + + + addFormatToken('D', ['DD', 2], 'Do', 'date'); // ALIASES + + addUnitAlias('date', 'D'); // PRIORITY + + addUnitPriority('date', 9); // PARSING + + addRegexToken('D', match1to2); + addRegexToken('DD', match1to2, match2); + addRegexToken('Do', function (isStrict, locale) { + // TODO: Remove "ordinalParse" fallback in next major release. + return isStrict ? locale._dayOfMonthOrdinalParse || locale._ordinalParse : locale._dayOfMonthOrdinalParseLenient; + }); + addParseToken(['D', 'DD'], DATE); + addParseToken('Do', function (input, array) { + array[DATE] = toInt(input.match(match1to2)[0]); + }); // MOMENTS + + var getSetDayOfMonth = makeGetSet('Date', true); // FORMATTING + + addFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear'); // ALIASES + + addUnitAlias('dayOfYear', 'DDD'); // PRIORITY + + addUnitPriority('dayOfYear', 4); // PARSING + + addRegexToken('DDD', match1to3); + addRegexToken('DDDD', match3); + addParseToken(['DDD', 'DDDD'], function (input, array, config) { + config._dayOfYear = toInt(input); + }); // HELPERS + // MOMENTS + + function getSetDayOfYear(input) { + var dayOfYear = Math.round((this.clone().startOf('day') - this.clone().startOf('year')) / 864e5) + 1; + return input == null ? dayOfYear : this.add(input - dayOfYear, 'd'); + } // FORMATTING + + + addFormatToken('m', ['mm', 2], 0, 'minute'); // ALIASES + + addUnitAlias('minute', 'm'); // PRIORITY + + addUnitPriority('minute', 14); // PARSING + + addRegexToken('m', match1to2); + addRegexToken('mm', match1to2, match2); + addParseToken(['m', 'mm'], MINUTE); // MOMENTS + + var getSetMinute = makeGetSet('Minutes', false); // FORMATTING + + addFormatToken('s', ['ss', 2], 0, 'second'); // ALIASES + + addUnitAlias('second', 's'); // PRIORITY + + addUnitPriority('second', 15); // PARSING + + addRegexToken('s', match1to2); + addRegexToken('ss', match1to2, match2); + addParseToken(['s', 'ss'], SECOND); // MOMENTS + + var getSetSecond = makeGetSet('Seconds', false); // FORMATTING + + addFormatToken('S', 0, 0, function () { + return ~~(this.millisecond() / 100); + }); + addFormatToken(0, ['SS', 2], 0, function () { + return ~~(this.millisecond() / 10); + }); + addFormatToken(0, ['SSS', 3], 0, 'millisecond'); + addFormatToken(0, ['SSSS', 4], 0, function () { + return this.millisecond() * 10; + }); + addFormatToken(0, ['SSSSS', 5], 0, function () { + return this.millisecond() * 100; + }); + addFormatToken(0, ['SSSSSS', 6], 0, function () { + return this.millisecond() * 1000; + }); + addFormatToken(0, ['SSSSSSS', 7], 0, function () { + return this.millisecond() * 10000; + }); + addFormatToken(0, ['SSSSSSSS', 8], 0, function () { + return this.millisecond() * 100000; + }); + addFormatToken(0, ['SSSSSSSSS', 9], 0, function () { + return this.millisecond() * 1000000; + }); // ALIASES + + addUnitAlias('millisecond', 'ms'); // PRIORITY + + addUnitPriority('millisecond', 16); // PARSING + + addRegexToken('S', match1to3, match1); + addRegexToken('SS', match1to3, match2); + addRegexToken('SSS', match1to3, match3); + var token; + + for (token = 'SSSS'; token.length <= 9; token += 'S') { + addRegexToken(token, matchUnsigned); + } + + function parseMs(input, array) { + array[MILLISECOND] = toInt(('0.' + input) * 1000); + } + + for (token = 'S'; token.length <= 9; token += 'S') { + addParseToken(token, parseMs); + } // MOMENTS + + + var getSetMillisecond = makeGetSet('Milliseconds', false); // FORMATTING + + addFormatToken('z', 0, 0, 'zoneAbbr'); + addFormatToken('zz', 0, 0, 'zoneName'); // MOMENTS + + function getZoneAbbr() { + return this._isUTC ? 'UTC' : ''; + } + + function getZoneName() { + return this._isUTC ? 'Coordinated Universal Time' : ''; + } + + var proto = Moment.prototype; + proto.add = add; + proto.calendar = calendar$1; + proto.clone = clone; + proto.diff = diff; + proto.endOf = endOf; + proto.format = format; + proto.from = from; + proto.fromNow = fromNow; + proto.to = to; + proto.toNow = toNow; + proto.get = stringGet; + proto.invalidAt = invalidAt; + proto.isAfter = isAfter; + proto.isBefore = isBefore; + proto.isBetween = isBetween; + proto.isSame = isSame; + proto.isSameOrAfter = isSameOrAfter; + proto.isSameOrBefore = isSameOrBefore; + proto.isValid = isValid$2; + proto.lang = lang; + proto.locale = locale; + proto.localeData = localeData; + proto.max = prototypeMax; + proto.min = prototypeMin; + proto.parsingFlags = parsingFlags; + proto.set = stringSet; + proto.startOf = startOf; + proto.subtract = subtract; + proto.toArray = toArray; + proto.toObject = toObject; + proto.toDate = toDate; + proto.toISOString = toISOString; + proto.inspect = inspect; + proto.toJSON = toJSON; + proto.toString = toString; + proto.unix = unix; + proto.valueOf = valueOf; + proto.creationData = creationData; + proto.year = getSetYear; + proto.isLeapYear = getIsLeapYear; + proto.weekYear = getSetWeekYear; + proto.isoWeekYear = getSetISOWeekYear; + proto.quarter = proto.quarters = getSetQuarter; + proto.month = getSetMonth; + proto.daysInMonth = getDaysInMonth; + proto.week = proto.weeks = getSetWeek; + proto.isoWeek = proto.isoWeeks = getSetISOWeek; + proto.weeksInYear = getWeeksInYear; + proto.isoWeeksInYear = getISOWeeksInYear; + proto.date = getSetDayOfMonth; + proto.day = proto.days = getSetDayOfWeek; + proto.weekday = getSetLocaleDayOfWeek; + proto.isoWeekday = getSetISODayOfWeek; + proto.dayOfYear = getSetDayOfYear; + proto.hour = proto.hours = getSetHour; + proto.minute = proto.minutes = getSetMinute; + proto.second = proto.seconds = getSetSecond; + proto.millisecond = proto.milliseconds = getSetMillisecond; + proto.utcOffset = getSetOffset; + proto.utc = setOffsetToUTC; + proto.local = setOffsetToLocal; + proto.parseZone = setOffsetToParsedOffset; + proto.hasAlignedHourOffset = hasAlignedHourOffset; + proto.isDST = isDaylightSavingTime; + proto.isLocal = isLocal; + proto.isUtcOffset = isUtcOffset; + proto.isUtc = isUtc; + proto.isUTC = isUtc; + proto.zoneAbbr = getZoneAbbr; + proto.zoneName = getZoneName; + proto.dates = deprecate('dates accessor is deprecated. Use date instead.', getSetDayOfMonth); + proto.months = deprecate('months accessor is deprecated. Use month instead', getSetMonth); + proto.years = deprecate('years accessor is deprecated. Use year instead', getSetYear); + proto.zone = deprecate('moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/', getSetZone); + proto.isDSTShifted = deprecate('isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information', isDaylightSavingTimeShifted); + + function createUnix(input) { + return createLocal(input * 1000); + } + + function createInZone() { + return createLocal.apply(null, arguments).parseZone(); + } + + function preParsePostFormat(string) { + return string; + } + + var proto$1 = Locale.prototype; + proto$1.calendar = calendar; + proto$1.longDateFormat = longDateFormat; + proto$1.invalidDate = invalidDate; + proto$1.ordinal = ordinal; + proto$1.preparse = preParsePostFormat; + proto$1.postformat = preParsePostFormat; + proto$1.relativeTime = relativeTime; + proto$1.pastFuture = pastFuture; + proto$1.set = set; + proto$1.months = localeMonths; + proto$1.monthsShort = localeMonthsShort; + proto$1.monthsParse = localeMonthsParse; + proto$1.monthsRegex = monthsRegex; + proto$1.monthsShortRegex = monthsShortRegex; + proto$1.week = localeWeek; + proto$1.firstDayOfYear = localeFirstDayOfYear; + proto$1.firstDayOfWeek = localeFirstDayOfWeek; + proto$1.weekdays = localeWeekdays; + proto$1.weekdaysMin = localeWeekdaysMin; + proto$1.weekdaysShort = localeWeekdaysShort; + proto$1.weekdaysParse = localeWeekdaysParse; + proto$1.weekdaysRegex = weekdaysRegex; + proto$1.weekdaysShortRegex = weekdaysShortRegex; + proto$1.weekdaysMinRegex = weekdaysMinRegex; + proto$1.isPM = localeIsPM; + proto$1.meridiem = localeMeridiem; + + function get$1(format, index, field, setter) { + var locale = getLocale(); + var utc = createUTC().set(setter, index); + return locale[field](utc, format); + } + + function listMonthsImpl(format, index, field) { + if (isNumber(format)) { + index = format; + format = undefined; + } + + format = format || ''; + + if (index != null) { + return get$1(format, index, field, 'month'); + } + + var i; + var out = []; + + for (i = 0; i < 12; i++) { + out[i] = get$1(format, i, field, 'month'); + } + + return out; + } // () + // (5) + // (fmt, 5) + // (fmt) + // (true) + // (true, 5) + // (true, fmt, 5) + // (true, fmt) + + + function listWeekdaysImpl(localeSorted, format, index, field) { + if (typeof localeSorted === 'boolean') { + if (isNumber(format)) { + index = format; + format = undefined; + } + + format = format || ''; + } else { + format = localeSorted; + index = format; + localeSorted = false; + + if (isNumber(format)) { + index = format; + format = undefined; + } + + format = format || ''; + } + + var locale = getLocale(), + shift = localeSorted ? locale._week.dow : 0; + + if (index != null) { + return get$1(format, (index + shift) % 7, field, 'day'); + } + + var i; + var out = []; + + for (i = 0; i < 7; i++) { + out[i] = get$1(format, (i + shift) % 7, field, 'day'); + } + + return out; + } + + function listMonths(format, index) { + return listMonthsImpl(format, index, 'months'); + } + + function listMonthsShort(format, index) { + return listMonthsImpl(format, index, 'monthsShort'); + } + + function listWeekdays(localeSorted, format, index) { + return listWeekdaysImpl(localeSorted, format, index, 'weekdays'); + } + + function listWeekdaysShort(localeSorted, format, index) { + return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort'); + } + + function listWeekdaysMin(localeSorted, format, index) { + return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin'); + } + + getSetGlobalLocale('en', { + dayOfMonthOrdinalParse: /\d{1,2}(th|st|nd|rd)/, + ordinal: function (number) { + var b = number % 10, + output = toInt(number % 100 / 10) === 1 ? 'th' : b === 1 ? 'st' : b === 2 ? 'nd' : b === 3 ? 'rd' : 'th'; + return number + output; + } + }); // Side effect imports + + hooks.lang = deprecate('moment.lang is deprecated. Use moment.locale instead.', getSetGlobalLocale); + hooks.langData = deprecate('moment.langData is deprecated. Use moment.localeData instead.', getLocale); + var mathAbs = Math.abs; + + function abs() { + var data = this._data; + this._milliseconds = mathAbs(this._milliseconds); + this._days = mathAbs(this._days); + this._months = mathAbs(this._months); + data.milliseconds = mathAbs(data.milliseconds); + data.seconds = mathAbs(data.seconds); + data.minutes = mathAbs(data.minutes); + data.hours = mathAbs(data.hours); + data.months = mathAbs(data.months); + data.years = mathAbs(data.years); + return this; + } + + function addSubtract$1(duration, input, value, direction) { + var other = createDuration(input, value); + duration._milliseconds += direction * other._milliseconds; + duration._days += direction * other._days; + duration._months += direction * other._months; + return duration._bubble(); + } // supports only 2.0-style add(1, 's') or add(duration) + + + function add$1(input, value) { + return addSubtract$1(this, input, value, 1); + } // supports only 2.0-style subtract(1, 's') or subtract(duration) + + + function subtract$1(input, value) { + return addSubtract$1(this, input, value, -1); + } + + function absCeil(number) { + if (number < 0) { + return Math.floor(number); + } else { + return Math.ceil(number); + } + } + + function bubble() { + var milliseconds = this._milliseconds; + var days = this._days; + var months = this._months; + var data = this._data; + var seconds, minutes, hours, years, monthsFromDays; // if we have a mix of positive and negative values, bubble down first + // check: https://github.com/moment/moment/issues/2166 + + if (!(milliseconds >= 0 && days >= 0 && months >= 0 || milliseconds <= 0 && days <= 0 && months <= 0)) { + milliseconds += absCeil(monthsToDays(months) + days) * 864e5; + days = 0; + months = 0; + } // The following code bubbles up values, see the tests for + // examples of what that means. + + + data.milliseconds = milliseconds % 1000; + seconds = absFloor(milliseconds / 1000); + data.seconds = seconds % 60; + minutes = absFloor(seconds / 60); + data.minutes = minutes % 60; + hours = absFloor(minutes / 60); + data.hours = hours % 24; + days += absFloor(hours / 24); // convert days to months + + monthsFromDays = absFloor(daysToMonths(days)); + months += monthsFromDays; + days -= absCeil(monthsToDays(monthsFromDays)); // 12 months -> 1 year + + years = absFloor(months / 12); + months %= 12; + data.days = days; + data.months = months; + data.years = years; + return this; + } + + function daysToMonths(days) { + // 400 years have 146097 days (taking into account leap year rules) + // 400 years have 12 months === 4800 + return days * 4800 / 146097; + } + + function monthsToDays(months) { + // the reverse of daysToMonths + return months * 146097 / 4800; + } + + function as(units) { + if (!this.isValid()) { + return NaN; + } + + var days; + var months; + var milliseconds = this._milliseconds; + units = normalizeUnits(units); + + if (units === 'month' || units === 'quarter' || units === 'year') { + days = this._days + milliseconds / 864e5; + months = this._months + daysToMonths(days); + + switch (units) { + case 'month': + return months; + + case 'quarter': + return months / 3; + + case 'year': + return months / 12; + } + } else { + // handle milliseconds separately because of floating point math errors (issue #1867) + days = this._days + Math.round(monthsToDays(this._months)); + + switch (units) { + case 'week': + return days / 7 + milliseconds / 6048e5; + + case 'day': + return days + milliseconds / 864e5; + + case 'hour': + return days * 24 + milliseconds / 36e5; + + case 'minute': + return days * 1440 + milliseconds / 6e4; + + case 'second': + return days * 86400 + milliseconds / 1000; + // Math.floor prevents floating point math errors here + + case 'millisecond': + return Math.floor(days * 864e5) + milliseconds; + + default: + throw new Error('Unknown unit ' + units); + } + } + } // TODO: Use this.as('ms')? + + + function valueOf$1() { + if (!this.isValid()) { + return NaN; + } + + return this._milliseconds + this._days * 864e5 + this._months % 12 * 2592e6 + toInt(this._months / 12) * 31536e6; + } + + function makeAs(alias) { + return function () { + return this.as(alias); + }; + } + + var asMilliseconds = makeAs('ms'); + var asSeconds = makeAs('s'); + var asMinutes = makeAs('m'); + var asHours = makeAs('h'); + var asDays = makeAs('d'); + var asWeeks = makeAs('w'); + var asMonths = makeAs('M'); + var asQuarters = makeAs('Q'); + var asYears = makeAs('y'); + + function clone$1() { + return createDuration(this); + } + + function get$2(units) { + units = normalizeUnits(units); + return this.isValid() ? this[units + 's']() : NaN; + } + + function makeGetter(name) { + return function () { + return this.isValid() ? this._data[name] : NaN; + }; + } + + var milliseconds = makeGetter('milliseconds'); + var seconds = makeGetter('seconds'); + var minutes = makeGetter('minutes'); + var hours = makeGetter('hours'); + var days = makeGetter('days'); + var months = makeGetter('months'); + var years = makeGetter('years'); + + function weeks() { + return absFloor(this.days() / 7); + } + + var round = Math.round; + var thresholds = { + ss: 44, + // a few seconds to seconds + s: 45, + // seconds to minute + m: 45, + // minutes to hour + h: 22, + // hours to day + d: 26, + // days to month + M: 11 // months to year + + }; // helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize + + function substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) { + return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture); + } + + function relativeTime$1(posNegDuration, withoutSuffix, locale) { + var duration = createDuration(posNegDuration).abs(); + var seconds = round(duration.as('s')); + var minutes = round(duration.as('m')); + var hours = round(duration.as('h')); + var days = round(duration.as('d')); + var months = round(duration.as('M')); + var years = round(duration.as('y')); + var a = seconds <= thresholds.ss && ['s', seconds] || seconds < thresholds.s && ['ss', seconds] || minutes <= 1 && ['m'] || minutes < thresholds.m && ['mm', minutes] || hours <= 1 && ['h'] || hours < thresholds.h && ['hh', hours] || days <= 1 && ['d'] || days < thresholds.d && ['dd', days] || months <= 1 && ['M'] || months < thresholds.M && ['MM', months] || years <= 1 && ['y'] || ['yy', years]; + a[2] = withoutSuffix; + a[3] = +posNegDuration > 0; + a[4] = locale; + return substituteTimeAgo.apply(null, a); + } // This function allows you to set the rounding function for relative time strings + + + function getSetRelativeTimeRounding(roundingFunction) { + if (roundingFunction === undefined) { + return round; + } + + if (typeof roundingFunction === 'function') { + round = roundingFunction; + return true; + } + + return false; + } // This function allows you to set a threshold for relative time strings + + + function getSetRelativeTimeThreshold(threshold, limit) { + if (thresholds[threshold] === undefined) { + return false; + } + + if (limit === undefined) { + return thresholds[threshold]; + } + + thresholds[threshold] = limit; + + if (threshold === 's') { + thresholds.ss = limit - 1; + } + + return true; + } + + function humanize(withSuffix) { + if (!this.isValid()) { + return this.localeData().invalidDate(); + } + + var locale = this.localeData(); + var output = relativeTime$1(this, !withSuffix, locale); + + if (withSuffix) { + output = locale.pastFuture(+this, output); + } + + return locale.postformat(output); + } + + var abs$1 = Math.abs; + + function sign(x) { + return (x > 0) - (x < 0) || +x; + } + + function toISOString$1() { + // for ISO strings we do not use the normal bubbling rules: + // * milliseconds bubble up until they become hours + // * days do not bubble at all + // * months bubble up until they become years + // This is because there is no context-free conversion between hours and days + // (think of clock changes) + // and also not between days and months (28-31 days per month) + if (!this.isValid()) { + return this.localeData().invalidDate(); + } + + var seconds = abs$1(this._milliseconds) / 1000; + var days = abs$1(this._days); + var months = abs$1(this._months); + var minutes, hours, years; // 3600 seconds -> 60 minutes -> 1 hour + + minutes = absFloor(seconds / 60); + hours = absFloor(minutes / 60); + seconds %= 60; + minutes %= 60; // 12 months -> 1 year + + years = absFloor(months / 12); + months %= 12; // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js + + var Y = years; + var M = months; + var D = days; + var h = hours; + var m = minutes; + var s = seconds ? seconds.toFixed(3).replace(/\.?0+$/, '') : ''; + var total = this.asSeconds(); + + if (!total) { + // this is the same as C#'s (Noda) and python (isodate)... + // but not other JS (goog.date) + return 'P0D'; + } + + var totalSign = total < 0 ? '-' : ''; + var ymSign = sign(this._months) !== sign(total) ? '-' : ''; + var daysSign = sign(this._days) !== sign(total) ? '-' : ''; + var hmsSign = sign(this._milliseconds) !== sign(total) ? '-' : ''; + return totalSign + 'P' + (Y ? ymSign + Y + 'Y' : '') + (M ? ymSign + M + 'M' : '') + (D ? daysSign + D + 'D' : '') + (h || m || s ? 'T' : '') + (h ? hmsSign + h + 'H' : '') + (m ? hmsSign + m + 'M' : '') + (s ? hmsSign + s + 'S' : ''); + } + + var proto$2 = Duration.prototype; + proto$2.isValid = isValid$1; + proto$2.abs = abs; + proto$2.add = add$1; + proto$2.subtract = subtract$1; + proto$2.as = as; + proto$2.asMilliseconds = asMilliseconds; + proto$2.asSeconds = asSeconds; + proto$2.asMinutes = asMinutes; + proto$2.asHours = asHours; + proto$2.asDays = asDays; + proto$2.asWeeks = asWeeks; + proto$2.asMonths = asMonths; + proto$2.asQuarters = asQuarters; + proto$2.asYears = asYears; + proto$2.valueOf = valueOf$1; + proto$2._bubble = bubble; + proto$2.clone = clone$1; + proto$2.get = get$2; + proto$2.milliseconds = milliseconds; + proto$2.seconds = seconds; + proto$2.minutes = minutes; + proto$2.hours = hours; + proto$2.days = days; + proto$2.weeks = weeks; + proto$2.months = months; + proto$2.years = years; + proto$2.humanize = humanize; + proto$2.toISOString = toISOString$1; + proto$2.toString = toISOString$1; + proto$2.toJSON = toISOString$1; + proto$2.locale = locale; + proto$2.localeData = localeData; + proto$2.toIsoString = deprecate('toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)', toISOString$1); + proto$2.lang = lang; // Side effect imports + // FORMATTING + + addFormatToken('X', 0, 0, 'unix'); + addFormatToken('x', 0, 0, 'valueOf'); // PARSING + + addRegexToken('x', matchSigned); + addRegexToken('X', matchTimestamp); + addParseToken('X', function (input, array, config) { + config._d = new Date(parseFloat(input, 10) * 1000); + }); + addParseToken('x', function (input, array, config) { + config._d = new Date(toInt(input)); + }); // Side effect imports + + hooks.version = '2.24.0'; + setHookCallback(createLocal); + hooks.fn = proto; + hooks.min = min; + hooks.max = max; + hooks.now = now; + hooks.utc = createUTC; + hooks.unix = createUnix; + hooks.months = listMonths; + hooks.isDate = isDate; + hooks.locale = getSetGlobalLocale; + hooks.invalid = createInvalid; + hooks.duration = createDuration; + hooks.isMoment = isMoment; + hooks.weekdays = listWeekdays; + hooks.parseZone = createInZone; + hooks.localeData = getLocale; + hooks.isDuration = isDuration; + hooks.monthsShort = listMonthsShort; + hooks.weekdaysMin = listWeekdaysMin; + hooks.defineLocale = defineLocale; + hooks.updateLocale = updateLocale; + hooks.locales = listLocales; + hooks.weekdaysShort = listWeekdaysShort; + hooks.normalizeUnits = normalizeUnits; + hooks.relativeTimeRounding = getSetRelativeTimeRounding; + hooks.relativeTimeThreshold = getSetRelativeTimeThreshold; + hooks.calendarFormat = getCalendarFormat; + hooks.prototype = proto; // currently HTML5 input type only supports 24-hour formats + + hooks.HTML5_FMT = { + DATETIME_LOCAL: 'YYYY-MM-DDTHH:mm', + // + DATETIME_LOCAL_SECONDS: 'YYYY-MM-DDTHH:mm:ss', + // + DATETIME_LOCAL_MS: 'YYYY-MM-DDTHH:mm:ss.SSS', + // + DATE: 'YYYY-MM-DD', + // + TIME: 'HH:mm', + // + TIME_SECONDS: 'HH:mm:ss', + // + TIME_MS: 'HH:mm:ss.SSS', + // + WEEK: 'GGGG-[W]WW', + // + MONTH: 'YYYY-MM' // + + }; + return hooks; + }); +}); + +// use this instance. Else, load via commonjs. + +var moment$3 = typeof window !== 'undefined' && window['moment'] || moment$2; + +var moment$4 = /*#__PURE__*/Object.freeze({ + 'default': moment$3, + __moduleExports: moment$3 +}); + +// vis-util +var network = { + Images: Images, + dotparser: dotparser$1, + gephiParser: gephiParser, + allOptions: allOptions$2, + convertDot: DOTToGraph_1, + convertGephi: parseGephi +}; // utils + +var index$2 = /*#__PURE__*/Object.freeze({ + util: esm, + data: esm$1, + network: network, + DOMutil: DOMutil$1, + moment: moment$4, + Hammer: hammer$1, + keycharm: keycharm$1, + DataSet: DataSet, + DataView: DataView, + Queue: Queue, + Network: Network +}); + +export default index$2; +export { DOMutil$1 as DOMutil, DataSet, DataView, hammer$1 as Hammer, Network, Queue, esm$1 as data, keycharm$1 as keycharm, moment$4 as moment, network, esm as util }; +//# sourceMappingURL=vis-network.esm.js.map diff --git a/node_modules/vis-network/dist/vis-network.esm.js.map b/node_modules/vis-network/dist/vis-network.esm.js.map new file mode 100644 index 0000000000000000000000000000000000000000..1b10f66ccb9c6faa47b87b034e7047360bd1af3d --- /dev/null +++ b/node_modules/vis-network/dist/vis-network.esm.js.map @@ -0,0 +1 @@ +{"version":3,"file":"vis-network.esm.js","sources":["../node_modules/vis-util/dist/esm.js","../node_modules/vis-data/dist/esm.js","../lib/network/shapes.js","../node_modules/component-emitter/index.js","../lib/network/dotparser.js","../lib/network/gephiParser.ts","../node_modules/keycharm/keycharm.js","../node_modules/@egjs/hammerjs/dist/hammer.esm.js","../lib/module/hammer.js","../lib/shared/Activator.js","../lib/network/locales.js","../node_modules/@babel/runtime/helpers/classCallCheck.js","../node_modules/@babel/runtime/helpers/createClass.js","../lib/network/CachedImage.js","../lib/network/Images.js","../lib/network/modules/Groups.js","../node_modules/@babel/runtime/helpers/arrayWithHoles.js","../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js","../node_modules/@babel/runtime/helpers/nonIterableRest.js","../node_modules/@babel/runtime/helpers/slicedToArray.js","../node_modules/@babel/runtime/helpers/typeof.js","../lib/network/modules/components/shared/ComponentUtil.js","../lib/network/modules/components/shared/LabelAccumulator.js","../lib/network/modules/components/shared/LabelSplitter.js","../lib/network/modules/components/shared/Label.js","../node_modules/@babel/runtime/helpers/assertThisInitialized.js","../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js","../node_modules/@babel/runtime/helpers/getPrototypeOf.js","../node_modules/@babel/runtime/helpers/setPrototypeOf.js","../node_modules/@babel/runtime/helpers/inherits.js","../lib/network/modules/components/nodes/util/NodeBase.js","../lib/network/modules/components/nodes/shapes/Box.js","../lib/network/modules/components/nodes/util/CircleImageBase.js","../lib/network/modules/components/nodes/shapes/Circle.js","../lib/network/modules/components/nodes/shapes/CircularImage.js","../lib/network/modules/components/nodes/shapes/Database.js","../lib/network/modules/components/nodes/util/ShapeBase.js","../lib/network/modules/components/nodes/shapes/Diamond.js","../lib/network/modules/components/nodes/shapes/Dot.js","../lib/network/modules/components/nodes/shapes/Ellipse.js","../lib/network/modules/components/nodes/shapes/Icon.js","../lib/network/modules/components/nodes/shapes/Image.js","../lib/network/modules/components/nodes/shapes/Square.js","../lib/network/modules/components/nodes/shapes/Hexagon.js","../lib/network/modules/components/nodes/shapes/Star.js","../lib/network/modules/components/nodes/shapes/Text.js","../lib/network/modules/components/nodes/shapes/Triangle.js","../lib/network/modules/components/nodes/shapes/TriangleDown.js","../lib/shared/Validator.js","../lib/network/modules/components/Node.js","../lib/network/modules/NodesHandler.js","../lib/network/modules/components/edges/util/EndPoints.js","../lib/network/modules/components/edges/util/EdgeBase.js","../lib/network/modules/components/edges/util/BezierEdgeBase.js","../lib/network/modules/components/edges/util/CubicBezierEdgeBase.js","../lib/network/modules/components/edges/CubicBezierEdge.js","../lib/network/modules/components/edges/BezierEdgeDynamic.js","../lib/network/modules/components/edges/BezierEdgeStatic.js","../lib/network/modules/components/edges/StraightEdge.js","../lib/network/modules/components/Edge.js","../lib/network/modules/EdgesHandler.js","../lib/network/modules/components/physics/BarnesHutSolver.js","../lib/network/modules/components/physics/RepulsionSolver.js","../lib/network/modules/components/physics/HierarchicalRepulsionSolver.js","../lib/network/modules/components/physics/SpringSolver.js","../lib/network/modules/components/physics/HierarchicalSpringSolver.js","../lib/network/modules/components/physics/CentralGravitySolver.js","../lib/network/modules/components/physics/FA2BasedRepulsionSolver.js","../lib/network/modules/components/physics/FA2BasedCentralGravitySolver.js","../lib/network/modules/PhysicsEngine.js","../lib/network/NetworkUtil.js","../lib/network/modules/components/nodes/Cluster.js","../lib/network/modules/Clustering.js","../lib/network/modules/CanvasRenderer.js","../lib/hammerUtil.js","../lib/network/modules/Canvas.js","../lib/network/modules/View.js","../lib/network/modules/components/NavigationHandler.js","../lib/shared/Popup.js","../lib/network/modules/InteractionHandler.js","../lib/network/modules/SelectionHandler.js","../node_modules/timsort/build/timsort.js","../node_modules/timsort/index.js","../lib/network/modules/components/DirectionStrategy.js","../lib/network/modules/LayoutEngine.js","../lib/network/modules/ManipulationSystem.js","../lib/shared/ColorPicker.js","../lib/shared/Configurator.js","../lib/network/options.js","../lib/network/modules/components/algorithms/FloydWarshall.js","../lib/network/modules/KamadaKawai.js","../lib/network/Network.js","../lib/DOMutil.js","../node_modules/moment/moment.js","../lib/module/moment.js","../lib/index.ts"],"sourcesContent":["var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};\n\nfunction commonjsRequire () {\n\tthrow new Error('Dynamic requires are not currently supported by rollup-plugin-commonjs');\n}\n\nfunction createCommonjsModule(fn, module) {\n\treturn module = { exports: {} }, fn(module, module.exports), module.exports;\n}\n\nvar _global = createCommonjsModule(function (module) {\n // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028\n var global = module.exports = typeof window != 'undefined' && window.Math == Math ? window : typeof self != 'undefined' && self.Math == Math ? self // eslint-disable-next-line no-new-func\n : Function('return this')();\n if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef\n});\n\nvar _core = createCommonjsModule(function (module) {\n var core = module.exports = {\n version: '2.6.9'\n };\n if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef\n});\nvar _core_1 = _core.version;\n\nvar _library = false;\n\nvar _shared = createCommonjsModule(function (module) {\n var SHARED = '__core-js_shared__';\n var store = _global[SHARED] || (_global[SHARED] = {});\n (module.exports = function (key, value) {\n return store[key] || (store[key] = value !== undefined ? value : {});\n })('versions', []).push({\n version: _core.version,\n mode: 'global',\n copyright: '© 2019 Denis Pushkarev (zloirock.ru)'\n });\n});\n\nvar id = 0;\nvar px = Math.random();\n\nvar _uid = function (key) {\n return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));\n};\n\nvar _wks = createCommonjsModule(function (module) {\n var store = _shared('wks');\n var Symbol = _global.Symbol;\n var USE_SYMBOL = typeof Symbol == 'function';\n\n var $exports = module.exports = function (name) {\n return store[name] || (store[name] = USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : _uid)('Symbol.' + name));\n };\n\n $exports.store = store;\n});\n\nvar f = _wks;\nvar _wksExt = {\n f: f\n};\n\nvar _isObject = function (it) {\n return typeof it === 'object' ? it !== null : typeof it === 'function';\n};\n\nvar _anObject = function (it) {\n if (!_isObject(it)) throw TypeError(it + ' is not an object!');\n return it;\n};\n\nvar _fails = function (exec) {\n try {\n return !!exec();\n } catch (e) {\n return true;\n }\n};\n\nvar _descriptors = !_fails(function () {\n return Object.defineProperty({}, 'a', {\n get: function () {\n return 7;\n }\n }).a != 7;\n});\n\nvar document$1 = _global.document; // typeof document.createElement is 'object' in old IE\n\nvar is = _isObject(document$1) && _isObject(document$1.createElement);\n\nvar _domCreate = function (it) {\n return is ? document$1.createElement(it) : {};\n};\n\nvar _ie8DomDefine = !_descriptors && !_fails(function () {\n return Object.defineProperty(_domCreate('div'), 'a', {\n get: function () {\n return 7;\n }\n }).a != 7;\n});\n\n// instead of the ES6 spec version, we didn't implement @@toPrimitive case\n// and the second argument - flag - preferred type is a string\n\nvar _toPrimitive = function (it, S) {\n if (!_isObject(it)) return it;\n var fn, val;\n if (S && typeof (fn = it.toString) == 'function' && !_isObject(val = fn.call(it))) return val;\n if (typeof (fn = it.valueOf) == 'function' && !_isObject(val = fn.call(it))) return val;\n if (!S && typeof (fn = it.toString) == 'function' && !_isObject(val = fn.call(it))) return val;\n throw TypeError(\"Can't convert object to primitive value\");\n};\n\nvar dP = Object.defineProperty;\nvar f$1 = _descriptors ? Object.defineProperty : function defineProperty(O, P, Attributes) {\n _anObject(O);\n P = _toPrimitive(P, true);\n _anObject(Attributes);\n if (_ie8DomDefine) try {\n return dP(O, P, Attributes);\n } catch (e) {\n /* empty */\n }\n if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!');\n if ('value' in Attributes) O[P] = Attributes.value;\n return O;\n};\nvar _objectDp = {\n f: f$1\n};\n\nvar defineProperty = _objectDp.f;\n\nvar _wksDefine = function (name) {\n var $Symbol = _core.Symbol || (_core.Symbol = _global.Symbol || {});\n if (name.charAt(0) != '_' && !(name in $Symbol)) defineProperty($Symbol, name, {\n value: _wksExt.f(name)\n });\n};\n\n_wksDefine('asyncIterator');\n\nvar hasOwnProperty = {}.hasOwnProperty;\n\nvar _has = function (it, key) {\n return hasOwnProperty.call(it, key);\n};\n\nvar _propertyDesc = function (bitmap, value) {\n return {\n enumerable: !(bitmap & 1),\n configurable: !(bitmap & 2),\n writable: !(bitmap & 4),\n value: value\n };\n};\n\nvar _hide = _descriptors ? function (object, key, value) {\n return _objectDp.f(object, key, _propertyDesc(1, value));\n} : function (object, key, value) {\n object[key] = value;\n return object;\n};\n\nvar _functionToString = _shared('native-function-to-string', Function.toString);\n\nvar _redefine = createCommonjsModule(function (module) {\n var SRC = _uid('src');\n var TO_STRING = 'toString';\n var TPL = ('' + _functionToString).split(TO_STRING);\n\n _core.inspectSource = function (it) {\n return _functionToString.call(it);\n };\n\n (module.exports = function (O, key, val, safe) {\n var isFunction = typeof val == 'function';\n if (isFunction) _has(val, 'name') || _hide(val, 'name', key);\n if (O[key] === val) return;\n if (isFunction) _has(val, SRC) || _hide(val, SRC, O[key] ? '' + O[key] : TPL.join(String(key)));\n\n if (O === _global) {\n O[key] = val;\n } else if (!safe) {\n delete O[key];\n _hide(O, key, val);\n } else if (O[key]) {\n O[key] = val;\n } else {\n _hide(O, key, val);\n } // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative\n\n })(Function.prototype, TO_STRING, function toString() {\n return typeof this == 'function' && this[SRC] || _functionToString.call(this);\n });\n});\n\nvar _aFunction = function (it) {\n if (typeof it != 'function') throw TypeError(it + ' is not a function!');\n return it;\n};\n\nvar _ctx = function (fn, that, length) {\n _aFunction(fn);\n if (that === undefined) return fn;\n\n switch (length) {\n case 1:\n return function (a) {\n return fn.call(that, a);\n };\n\n case 2:\n return function (a, b) {\n return fn.call(that, a, b);\n };\n\n case 3:\n return function (a, b, c) {\n return fn.call(that, a, b, c);\n };\n }\n\n return function ()\n /* ...args */\n {\n return fn.apply(that, arguments);\n };\n};\n\nvar PROTOTYPE = 'prototype';\n\nvar $export = function (type, name, source) {\n var IS_FORCED = type & $export.F;\n var IS_GLOBAL = type & $export.G;\n var IS_STATIC = type & $export.S;\n var IS_PROTO = type & $export.P;\n var IS_BIND = type & $export.B;\n var target = IS_GLOBAL ? _global : IS_STATIC ? _global[name] || (_global[name] = {}) : (_global[name] || {})[PROTOTYPE];\n var exports = IS_GLOBAL ? _core : _core[name] || (_core[name] = {});\n var expProto = exports[PROTOTYPE] || (exports[PROTOTYPE] = {});\n var key, own, out, exp;\n if (IS_GLOBAL) source = name;\n\n for (key in source) {\n // contains in native\n own = !IS_FORCED && target && target[key] !== undefined; // export native or passed\n\n out = (own ? target : source)[key]; // bind timers to global for call from export context\n\n exp = IS_BIND && own ? _ctx(out, _global) : IS_PROTO && typeof out == 'function' ? _ctx(Function.call, out) : out; // extend global\n\n if (target) _redefine(target, key, out, type & $export.U); // export\n\n if (exports[key] != out) _hide(exports, key, exp);\n if (IS_PROTO && expProto[key] != out) expProto[key] = out;\n }\n};\n\n_global.core = _core; // type bitmap\n\n$export.F = 1; // forced\n\n$export.G = 2; // global\n\n$export.S = 4; // static\n\n$export.P = 8; // proto\n\n$export.B = 16; // bind\n\n$export.W = 32; // wrap\n\n$export.U = 64; // safe\n\n$export.R = 128; // real proto method for `library`\n\nvar _export = $export;\n\nvar _meta = createCommonjsModule(function (module) {\n var META = _uid('meta');\n var setDesc = _objectDp.f;\n var id = 0;\n\n var isExtensible = Object.isExtensible || function () {\n return true;\n };\n\n var FREEZE = !_fails(function () {\n return isExtensible(Object.preventExtensions({}));\n });\n\n var setMeta = function (it) {\n setDesc(it, META, {\n value: {\n i: 'O' + ++id,\n // object ID\n w: {} // weak collections IDs\n\n }\n });\n };\n\n var fastKey = function (it, create) {\n // return primitive with prefix\n if (!_isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it;\n\n if (!_has(it, META)) {\n // can't set metadata to uncaught frozen object\n if (!isExtensible(it)) return 'F'; // not necessary to add metadata\n\n if (!create) return 'E'; // add missing metadata\n\n setMeta(it); // return object ID\n }\n\n return it[META].i;\n };\n\n var getWeak = function (it, create) {\n if (!_has(it, META)) {\n // can't set metadata to uncaught frozen object\n if (!isExtensible(it)) return true; // not necessary to add metadata\n\n if (!create) return false; // add missing metadata\n\n setMeta(it); // return hash weak collections IDs\n }\n\n return it[META].w;\n }; // add metadata on freeze-family methods calling\n\n\n var onFreeze = function (it) {\n if (FREEZE && meta.NEED && isExtensible(it) && !_has(it, META)) setMeta(it);\n return it;\n };\n\n var meta = module.exports = {\n KEY: META,\n NEED: false,\n fastKey: fastKey,\n getWeak: getWeak,\n onFreeze: onFreeze\n };\n});\nvar _meta_1 = _meta.KEY;\nvar _meta_2 = _meta.NEED;\nvar _meta_3 = _meta.fastKey;\nvar _meta_4 = _meta.getWeak;\nvar _meta_5 = _meta.onFreeze;\n\nvar def = _objectDp.f;\nvar TAG = _wks('toStringTag');\n\nvar _setToStringTag = function (it, tag, stat) {\n if (it && !_has(it = stat ? it : it.prototype, TAG)) def(it, TAG, {\n configurable: true,\n value: tag\n });\n};\n\nvar toString = {}.toString;\n\nvar _cof = function (it) {\n return toString.call(it).slice(8, -1);\n};\n\n// eslint-disable-next-line no-prototype-builtins\n\nvar _iobject = Object('z').propertyIsEnumerable(0) ? Object : function (it) {\n return _cof(it) == 'String' ? it.split('') : Object(it);\n};\n\n// 7.2.1 RequireObjectCoercible(argument)\nvar _defined = function (it) {\n if (it == undefined) throw TypeError(\"Can't call method on \" + it);\n return it;\n};\n\nvar _toIobject = function (it) {\n return _iobject(_defined(it));\n};\n\n// 7.1.4 ToInteger\nvar ceil = Math.ceil;\nvar floor = Math.floor;\n\nvar _toInteger = function (it) {\n return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);\n};\n\nvar min = Math.min;\n\nvar _toLength = function (it) {\n return it > 0 ? min(_toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991\n};\n\nvar max = Math.max;\nvar min$1 = Math.min;\n\nvar _toAbsoluteIndex = function (index, length) {\n index = _toInteger(index);\n return index < 0 ? max(index + length, 0) : min$1(index, length);\n};\n\n// true -> Array#includes\n\nvar _arrayIncludes = function (IS_INCLUDES) {\n return function ($this, el, fromIndex) {\n var O = _toIobject($this);\n var length = _toLength(O.length);\n var index = _toAbsoluteIndex(fromIndex, length);\n var value; // Array#includes uses SameValueZero equality algorithm\n // eslint-disable-next-line no-self-compare\n\n if (IS_INCLUDES && el != el) while (length > index) {\n value = O[index++]; // eslint-disable-next-line no-self-compare\n\n if (value != value) return true; // Array#indexOf ignores holes, Array#includes - not\n } else for (; length > index; index++) if (IS_INCLUDES || index in O) {\n if (O[index] === el) return IS_INCLUDES || index || 0;\n }\n return !IS_INCLUDES && -1;\n };\n};\n\nvar shared = _shared('keys');\n\nvar _sharedKey = function (key) {\n return shared[key] || (shared[key] = _uid(key));\n};\n\nvar arrayIndexOf = _arrayIncludes(false);\nvar IE_PROTO = _sharedKey('IE_PROTO');\n\nvar _objectKeysInternal = function (object, names) {\n var O = _toIobject(object);\n var i = 0;\n var result = [];\n var key;\n\n for (key in O) if (key != IE_PROTO) _has(O, key) && result.push(key); // Don't enum bug & hidden keys\n\n\n while (names.length > i) if (_has(O, key = names[i++])) {\n ~arrayIndexOf(result, key) || result.push(key);\n }\n\n return result;\n};\n\n// IE 8- don't enum bug keys\nvar _enumBugKeys = 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'.split(',');\n\nvar _objectKeys = Object.keys || function keys(O) {\n return _objectKeysInternal(O, _enumBugKeys);\n};\n\nvar f$2 = Object.getOwnPropertySymbols;\nvar _objectGops = {\n f: f$2\n};\n\nvar f$3 = {}.propertyIsEnumerable;\nvar _objectPie = {\n f: f$3\n};\n\nvar _enumKeys = function (it) {\n var result = _objectKeys(it);\n var getSymbols = _objectGops.f;\n\n if (getSymbols) {\n var symbols = getSymbols(it);\n var isEnum = _objectPie.f;\n var i = 0;\n var key;\n\n while (symbols.length > i) if (isEnum.call(it, key = symbols[i++])) result.push(key);\n }\n\n return result;\n};\n\nvar _isArray = Array.isArray || function isArray(arg) {\n return _cof(arg) == 'Array';\n};\n\nvar _toObject = function (it) {\n return Object(_defined(it));\n};\n\nvar _objectDps = _descriptors ? Object.defineProperties : function defineProperties(O, Properties) {\n _anObject(O);\n var keys = _objectKeys(Properties);\n var length = keys.length;\n var i = 0;\n var P;\n\n while (length > i) _objectDp.f(O, P = keys[i++], Properties[P]);\n\n return O;\n};\n\nvar document$2 = _global.document;\n\nvar _html = document$2 && document$2.documentElement;\n\nvar IE_PROTO$1 = _sharedKey('IE_PROTO');\n\nvar Empty = function () {\n /* empty */\n};\n\nvar PROTOTYPE$1 = 'prototype'; // Create object with fake `null` prototype: use iframe Object with cleared prototype\n\nvar createDict = function () {\n // Thrash, waste and sodomy: IE GC bug\n var iframe = _domCreate('iframe');\n var i = _enumBugKeys.length;\n var lt = '<';\n var gt = '>';\n var iframeDocument;\n iframe.style.display = 'none';\n _html.appendChild(iframe);\n iframe.src = 'javascript:'; // eslint-disable-line no-script-url\n // createDict = iframe.contentWindow.Object;\n // html.removeChild(iframe);\n\n iframeDocument = iframe.contentWindow.document;\n iframeDocument.open();\n iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt);\n iframeDocument.close();\n createDict = iframeDocument.F;\n\n while (i--) delete createDict[PROTOTYPE$1][_enumBugKeys[i]];\n\n return createDict();\n};\n\nvar _objectCreate = Object.create || function create(O, Properties) {\n var result;\n\n if (O !== null) {\n Empty[PROTOTYPE$1] = _anObject(O);\n result = new Empty();\n Empty[PROTOTYPE$1] = null; // add \"__proto__\" for Object.getPrototypeOf polyfill\n\n result[IE_PROTO$1] = O;\n } else result = createDict();\n\n return Properties === undefined ? result : _objectDps(result, Properties);\n};\n\nvar hiddenKeys = _enumBugKeys.concat('length', 'prototype');\n\nvar f$4 = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {\n return _objectKeysInternal(O, hiddenKeys);\n};\n\nvar _objectGopn = {\n f: f$4\n};\n\nvar gOPN = _objectGopn.f;\nvar toString$1 = {}.toString;\nvar windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames ? Object.getOwnPropertyNames(window) : [];\n\nvar getWindowNames = function (it) {\n try {\n return gOPN(it);\n } catch (e) {\n return windowNames.slice();\n }\n};\n\nvar f$5 = function getOwnPropertyNames(it) {\n return windowNames && toString$1.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(_toIobject(it));\n};\n\nvar _objectGopnExt = {\n f: f$5\n};\n\nvar gOPD = Object.getOwnPropertyDescriptor;\nvar f$6 = _descriptors ? gOPD : function getOwnPropertyDescriptor(O, P) {\n O = _toIobject(O);\n P = _toPrimitive(P, true);\n if (_ie8DomDefine) try {\n return gOPD(O, P);\n } catch (e) {\n /* empty */\n }\n if (_has(O, P)) return _propertyDesc(!_objectPie.f.call(O, P), O[P]);\n};\nvar _objectGopd = {\n f: f$6\n};\n\nvar META = _meta.KEY;\nvar gOPD$1 = _objectGopd.f;\nvar dP$1 = _objectDp.f;\nvar gOPN$1 = _objectGopnExt.f;\nvar $Symbol = _global.Symbol;\nvar $JSON = _global.JSON;\n\nvar _stringify = $JSON && $JSON.stringify;\n\nvar PROTOTYPE$2 = 'prototype';\nvar HIDDEN = _wks('_hidden');\nvar TO_PRIMITIVE = _wks('toPrimitive');\nvar isEnum = {}.propertyIsEnumerable;\nvar SymbolRegistry = _shared('symbol-registry');\nvar AllSymbols = _shared('symbols');\nvar OPSymbols = _shared('op-symbols');\nvar ObjectProto = Object[PROTOTYPE$2];\nvar USE_NATIVE = typeof $Symbol == 'function' && !!_objectGops.f;\nvar QObject = _global.QObject; // Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173\n\nvar setter = !QObject || !QObject[PROTOTYPE$2] || !QObject[PROTOTYPE$2].findChild; // fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687\n\nvar setSymbolDesc = _descriptors && _fails(function () {\n return _objectCreate(dP$1({}, 'a', {\n get: function () {\n return dP$1(this, 'a', {\n value: 7\n }).a;\n }\n })).a != 7;\n}) ? function (it, key, D) {\n var protoDesc = gOPD$1(ObjectProto, key);\n if (protoDesc) delete ObjectProto[key];\n dP$1(it, key, D);\n if (protoDesc && it !== ObjectProto) dP$1(ObjectProto, key, protoDesc);\n} : dP$1;\n\nvar wrap = function (tag) {\n var sym = AllSymbols[tag] = _objectCreate($Symbol[PROTOTYPE$2]);\n\n sym._k = tag;\n return sym;\n};\n\nvar isSymbol = USE_NATIVE && typeof $Symbol.iterator == 'symbol' ? function (it) {\n return typeof it == 'symbol';\n} : function (it) {\n return it instanceof $Symbol;\n};\n\nvar $defineProperty = function defineProperty(it, key, D) {\n if (it === ObjectProto) $defineProperty(OPSymbols, key, D);\n _anObject(it);\n key = _toPrimitive(key, true);\n _anObject(D);\n\n if (_has(AllSymbols, key)) {\n if (!D.enumerable) {\n if (!_has(it, HIDDEN)) dP$1(it, HIDDEN, _propertyDesc(1, {}));\n it[HIDDEN][key] = true;\n } else {\n if (_has(it, HIDDEN) && it[HIDDEN][key]) it[HIDDEN][key] = false;\n D = _objectCreate(D, {\n enumerable: _propertyDesc(0, false)\n });\n }\n\n return setSymbolDesc(it, key, D);\n }\n\n return dP$1(it, key, D);\n};\n\nvar $defineProperties = function defineProperties(it, P) {\n _anObject(it);\n var keys = _enumKeys(P = _toIobject(P));\n var i = 0;\n var l = keys.length;\n var key;\n\n while (l > i) $defineProperty(it, key = keys[i++], P[key]);\n\n return it;\n};\n\nvar $create = function create(it, P) {\n return P === undefined ? _objectCreate(it) : $defineProperties(_objectCreate(it), P);\n};\n\nvar $propertyIsEnumerable = function propertyIsEnumerable(key) {\n var E = isEnum.call(this, key = _toPrimitive(key, true));\n if (this === ObjectProto && _has(AllSymbols, key) && !_has(OPSymbols, key)) return false;\n return E || !_has(this, key) || !_has(AllSymbols, key) || _has(this, HIDDEN) && this[HIDDEN][key] ? E : true;\n};\n\nvar $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key) {\n it = _toIobject(it);\n key = _toPrimitive(key, true);\n if (it === ObjectProto && _has(AllSymbols, key) && !_has(OPSymbols, key)) return;\n var D = gOPD$1(it, key);\n if (D && _has(AllSymbols, key) && !(_has(it, HIDDEN) && it[HIDDEN][key])) D.enumerable = true;\n return D;\n};\n\nvar $getOwnPropertyNames = function getOwnPropertyNames(it) {\n var names = gOPN$1(_toIobject(it));\n var result = [];\n var i = 0;\n var key;\n\n while (names.length > i) {\n if (!_has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META) result.push(key);\n }\n\n return result;\n};\n\nvar $getOwnPropertySymbols = function getOwnPropertySymbols(it) {\n var IS_OP = it === ObjectProto;\n var names = gOPN$1(IS_OP ? OPSymbols : _toIobject(it));\n var result = [];\n var i = 0;\n var key;\n\n while (names.length > i) {\n if (_has(AllSymbols, key = names[i++]) && (IS_OP ? _has(ObjectProto, key) : true)) result.push(AllSymbols[key]);\n }\n\n return result;\n}; // 19.4.1.1 Symbol([description])\n\n\nif (!USE_NATIVE) {\n $Symbol = function Symbol() {\n if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor!');\n var tag = _uid(arguments.length > 0 ? arguments[0] : undefined);\n\n var $set = function (value) {\n if (this === ObjectProto) $set.call(OPSymbols, value);\n if (_has(this, HIDDEN) && _has(this[HIDDEN], tag)) this[HIDDEN][tag] = false;\n setSymbolDesc(this, tag, _propertyDesc(1, value));\n };\n\n if (_descriptors && setter) setSymbolDesc(ObjectProto, tag, {\n configurable: true,\n set: $set\n });\n return wrap(tag);\n };\n\n _redefine($Symbol[PROTOTYPE$2], 'toString', function toString() {\n return this._k;\n });\n _objectGopd.f = $getOwnPropertyDescriptor;\n _objectDp.f = $defineProperty;\n _objectGopn.f = _objectGopnExt.f = $getOwnPropertyNames;\n _objectPie.f = $propertyIsEnumerable;\n _objectGops.f = $getOwnPropertySymbols;\n\n if (_descriptors && !_library) {\n _redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true);\n }\n\n _wksExt.f = function (name) {\n return wrap(_wks(name));\n };\n}\n\n_export(_export.G + _export.W + _export.F * !USE_NATIVE, {\n Symbol: $Symbol\n});\n\nfor (var es6Symbols = // 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14\n'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables'.split(','), j = 0; es6Symbols.length > j;) _wks(es6Symbols[j++]);\n\nfor (var wellKnownSymbols = _objectKeys(_wks.store), k = 0; wellKnownSymbols.length > k;) _wksDefine(wellKnownSymbols[k++]);\n\n_export(_export.S + _export.F * !USE_NATIVE, 'Symbol', {\n // 19.4.2.1 Symbol.for(key)\n 'for': function (key) {\n return _has(SymbolRegistry, key += '') ? SymbolRegistry[key] : SymbolRegistry[key] = $Symbol(key);\n },\n // 19.4.2.5 Symbol.keyFor(sym)\n keyFor: function keyFor(sym) {\n if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol!');\n\n for (var key in SymbolRegistry) if (SymbolRegistry[key] === sym) return key;\n },\n useSetter: function () {\n setter = true;\n },\n useSimple: function () {\n setter = false;\n }\n});\n_export(_export.S + _export.F * !USE_NATIVE, 'Object', {\n // 19.1.2.2 Object.create(O [, Properties])\n create: $create,\n // 19.1.2.4 Object.defineProperty(O, P, Attributes)\n defineProperty: $defineProperty,\n // 19.1.2.3 Object.defineProperties(O, Properties)\n defineProperties: $defineProperties,\n // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P)\n getOwnPropertyDescriptor: $getOwnPropertyDescriptor,\n // 19.1.2.7 Object.getOwnPropertyNames(O)\n getOwnPropertyNames: $getOwnPropertyNames,\n // 19.1.2.8 Object.getOwnPropertySymbols(O)\n getOwnPropertySymbols: $getOwnPropertySymbols\n}); // Chrome 38 and 39 `Object.getOwnPropertySymbols` fails on primitives\n// https://bugs.chromium.org/p/v8/issues/detail?id=3443\n\nvar FAILS_ON_PRIMITIVES = _fails(function () {\n _objectGops.f(1);\n});\n_export(_export.S + _export.F * FAILS_ON_PRIMITIVES, 'Object', {\n getOwnPropertySymbols: function getOwnPropertySymbols(it) {\n return _objectGops.f(_toObject(it));\n }\n}); // 24.3.2 JSON.stringify(value [, replacer [, space]])\n\n$JSON && _export(_export.S + _export.F * (!USE_NATIVE || _fails(function () {\n var S = $Symbol(); // MS Edge converts symbol values to JSON as {}\n // WebKit converts symbol values to JSON as null\n // V8 throws on boxed symbols\n\n return _stringify([S]) != '[null]' || _stringify({\n a: S\n }) != '{}' || _stringify(Object(S)) != '{}';\n})), 'JSON', {\n stringify: function stringify(it) {\n var args = [it];\n var i = 1;\n var replacer, $replacer;\n\n while (arguments.length > i) args.push(arguments[i++]);\n\n $replacer = replacer = args[1];\n if (!_isObject(replacer) && it === undefined || isSymbol(it)) return; // IE8 returns string on undefined\n\n if (!_isArray(replacer)) replacer = function (key, value) {\n if (typeof $replacer == 'function') value = $replacer.call(this, key, value);\n if (!isSymbol(value)) return value;\n };\n args[1] = replacer;\n return _stringify.apply($JSON, args);\n }\n}); // 19.4.3.4 Symbol.prototype[@@toPrimitive](hint)\n\n$Symbol[PROTOTYPE$2][TO_PRIMITIVE] || _hide($Symbol[PROTOTYPE$2], TO_PRIMITIVE, $Symbol[PROTOTYPE$2].valueOf); // 19.4.3.5 Symbol.prototype[@@toStringTag]\n\n_setToStringTag($Symbol, 'Symbol'); // 20.2.1.9 Math[@@toStringTag]\n\n_setToStringTag(Math, 'Math', true); // 24.3.3 JSON[@@toStringTag]\n\n_setToStringTag(_global.JSON, 'JSON', true);\n\nfunction _typeof(obj) {\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function (obj) {\n return typeof obj;\n };\n } else {\n _typeof = function (obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n\n if (Object.getOwnPropertySymbols) {\n keys.push.apply(keys, Object.getOwnPropertySymbols(object));\n }\n\n if (enumerableOnly) keys = keys.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n return keys;\n}\n\nfunction _objectSpread2(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n\n if (i % 2) {\n ownKeys(source, true).forEach(function (key) {\n _defineProperty(target, key, source[key]);\n });\n } else if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(source).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n }\n\n return target;\n}\n\nfunction _toConsumableArray(arr) {\n return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread();\n}\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) {\n for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) arr2[i] = arr[i];\n\n return arr2;\n }\n}\n\nfunction _iterableToArray(iter) {\n if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === \"[object Arguments]\") return Array.from(iter);\n}\n\nfunction _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance\");\n}\n\nvar _objectSap = function (KEY, exec) {\n var fn = (_core.Object || {})[KEY] || Object[KEY];\n var exp = {};\n exp[KEY] = exec(fn);\n _export(_export.S + _export.F * _fails(function () {\n fn(1);\n }), 'Object', exp);\n};\n\n_objectSap('keys', function () {\n return function keys(it) {\n return _objectKeys(_toObject(it));\n };\n});\n\nvar _flags = function () {\n var that = _anObject(this);\n var result = '';\n if (that.global) result += 'g';\n if (that.ignoreCase) result += 'i';\n if (that.multiline) result += 'm';\n if (that.unicode) result += 'u';\n if (that.sticky) result += 'y';\n return result;\n};\n\nif (_descriptors && /./g.flags != 'g') _objectDp.f(RegExp.prototype, 'flags', {\n configurable: true,\n get: _flags\n});\n\nvar TO_STRING = 'toString';\nvar $toString = /./[TO_STRING];\n\nvar define = function (fn) {\n _redefine(RegExp.prototype, TO_STRING, fn, true);\n}; // 21.2.5.14 RegExp.prototype.toString()\n\n\nif (_fails(function () {\n return $toString.call({\n source: 'a',\n flags: 'b'\n }) != '/a/b';\n})) {\n define(function toString() {\n var R = _anObject(this);\n return '/'.concat(R.source, '/', 'flags' in R ? R.flags : !_descriptors && R instanceof RegExp ? _flags.call(R) : undefined);\n }); // FF44- RegExp#toString has a wrong name\n} else if ($toString.name != TO_STRING) {\n define(function toString() {\n return $toString.call(this);\n });\n}\n\n// false -> String#codePointAt\n\nvar _stringAt = function (TO_STRING) {\n return function (that, pos) {\n var s = String(_defined(that));\n var i = _toInteger(pos);\n var l = s.length;\n var a, b;\n if (i < 0 || i >= l) return TO_STRING ? '' : undefined;\n a = s.charCodeAt(i);\n return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff ? TO_STRING ? s.charAt(i) : a : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000;\n };\n};\n\nvar at = _stringAt(true); // `AdvanceStringIndex` abstract operation\n// https://tc39.github.io/ecma262/#sec-advancestringindex\n\nvar _advanceStringIndex = function (S, index, unicode) {\n return index + (unicode ? at(S, index).length : 1);\n};\n\nvar TAG$1 = _wks('toStringTag'); // ES3 wrong here\n\nvar ARG = _cof(function () {\n return arguments;\n}()) == 'Arguments'; // fallback for IE11 Script Access Denied error\n\nvar tryGet = function (it, key) {\n try {\n return it[key];\n } catch (e) {\n /* empty */\n }\n};\n\nvar _classof = function (it) {\n var O, T, B;\n return it === undefined ? 'Undefined' : it === null ? 'Null' // @@toStringTag case\n : typeof (T = tryGet(O = Object(it), TAG$1)) == 'string' ? T // builtinTag case\n : ARG ? _cof(O) // ES3 arguments fallback\n : (B = _cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B;\n};\n\nvar builtinExec = RegExp.prototype.exec; // `RegExpExec` abstract operation\n// https://tc39.github.io/ecma262/#sec-regexpexec\n\nvar _regexpExecAbstract = function (R, S) {\n var exec = R.exec;\n\n if (typeof exec === 'function') {\n var result = exec.call(R, S);\n\n if (typeof result !== 'object') {\n throw new TypeError('RegExp exec method returned something other than an Object or null');\n }\n\n return result;\n }\n\n if (_classof(R) !== 'RegExp') {\n throw new TypeError('RegExp#exec called on incompatible receiver');\n }\n\n return builtinExec.call(R, S);\n};\n\nvar nativeExec = RegExp.prototype.exec; // This always refers to the native implementation, because the\n// String#replace polyfill uses ./fix-regexp-well-known-symbol-logic.js,\n// which loads this file before patching the method.\n\nvar nativeReplace = String.prototype.replace;\nvar patchedExec = nativeExec;\nvar LAST_INDEX = 'lastIndex';\n\nvar UPDATES_LAST_INDEX_WRONG = function () {\n var re1 = /a/,\n re2 = /b*/g;\n nativeExec.call(re1, 'a');\n nativeExec.call(re2, 'a');\n return re1[LAST_INDEX] !== 0 || re2[LAST_INDEX] !== 0;\n}(); // nonparticipating capturing group, copied from es5-shim's String#split patch.\n\n\nvar NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;\nvar PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED;\n\nif (PATCH) {\n patchedExec = function exec(str) {\n var re = this;\n var lastIndex, reCopy, match, i;\n\n if (NPCG_INCLUDED) {\n reCopy = new RegExp('^' + re.source + '$(?!\\\\s)', _flags.call(re));\n }\n\n if (UPDATES_LAST_INDEX_WRONG) lastIndex = re[LAST_INDEX];\n match = nativeExec.call(re, str);\n\n if (UPDATES_LAST_INDEX_WRONG && match) {\n re[LAST_INDEX] = re.global ? match.index + match[0].length : lastIndex;\n }\n\n if (NPCG_INCLUDED && match && match.length > 1) {\n // Fix browsers whose `exec` methods don't consistently return `undefined`\n // for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/\n // eslint-disable-next-line no-loop-func\n nativeReplace.call(match[0], reCopy, function () {\n for (i = 1; i < arguments.length - 2; i++) {\n if (arguments[i] === undefined) match[i] = undefined;\n }\n });\n }\n\n return match;\n };\n}\n\nvar _regexpExec = patchedExec;\n\n_export({\n target: 'RegExp',\n proto: true,\n forced: _regexpExec !== /./.exec\n}, {\n exec: _regexpExec\n});\n\nvar SPECIES = _wks('species');\nvar REPLACE_SUPPORTS_NAMED_GROUPS = !_fails(function () {\n // #replace needs built-in support for named groups.\n // #match works fine because it just return the exec results, even if it has\n // a \"grops\" property.\n var re = /./;\n\n re.exec = function () {\n var result = [];\n result.groups = {\n a: '7'\n };\n return result;\n };\n\n return ''.replace(re, '$') !== '7';\n});\n\nvar SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = function () {\n // Chrome 51 has a buggy \"split\" implementation when RegExp#exec !== nativeExec\n var re = /(?:)/;\n var originalExec = re.exec;\n\n re.exec = function () {\n return originalExec.apply(this, arguments);\n };\n\n var result = 'ab'.split(re);\n return result.length === 2 && result[0] === 'a' && result[1] === 'b';\n}();\n\nvar _fixReWks = function (KEY, length, exec) {\n var SYMBOL = _wks(KEY);\n var DELEGATES_TO_SYMBOL = !_fails(function () {\n // String methods call symbol-named RegEp methods\n var O = {};\n\n O[SYMBOL] = function () {\n return 7;\n };\n\n return ''[KEY](O) != 7;\n });\n var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL ? !_fails(function () {\n // Symbol-named RegExp methods call .exec\n var execCalled = false;\n var re = /a/;\n\n re.exec = function () {\n execCalled = true;\n return null;\n };\n\n if (KEY === 'split') {\n // RegExp[@@split] doesn't call the regex's exec method, but first creates\n // a new one. We need to return the patched regex when creating the new one.\n re.constructor = {};\n\n re.constructor[SPECIES] = function () {\n return re;\n };\n }\n\n re[SYMBOL]('');\n return !execCalled;\n }) : undefined;\n\n if (!DELEGATES_TO_SYMBOL || !DELEGATES_TO_EXEC || KEY === 'replace' && !REPLACE_SUPPORTS_NAMED_GROUPS || KEY === 'split' && !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC) {\n var nativeRegExpMethod = /./[SYMBOL];\n var fns = exec(_defined, SYMBOL, ''[KEY], function maybeCallNative(nativeMethod, regexp, str, arg2, forceStringMethod) {\n if (regexp.exec === _regexpExec) {\n if (DELEGATES_TO_SYMBOL && !forceStringMethod) {\n // The native String method already delegates to @@method (this\n // polyfilled function), leasing to infinite recursion.\n // We avoid it by directly calling the native @@method method.\n return {\n done: true,\n value: nativeRegExpMethod.call(regexp, str, arg2)\n };\n }\n\n return {\n done: true,\n value: nativeMethod.call(str, regexp, arg2)\n };\n }\n\n return {\n done: false\n };\n });\n var strfn = fns[0];\n var rxfn = fns[1];\n _redefine(String.prototype, KEY, strfn);\n _hide(RegExp.prototype, SYMBOL, length == 2 // 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue)\n // 21.2.5.11 RegExp.prototype[@@split](string, limit)\n ? function (string, arg) {\n return rxfn.call(string, this, arg);\n } // 21.2.5.6 RegExp.prototype[@@match](string)\n // 21.2.5.9 RegExp.prototype[@@search](string)\n : function (string) {\n return rxfn.call(string, this);\n });\n }\n};\n\nvar max$1 = Math.max;\nvar min$2 = Math.min;\nvar floor$1 = Math.floor;\nvar SUBSTITUTION_SYMBOLS = /\\$([$&`']|\\d\\d?|<[^>]*>)/g;\nvar SUBSTITUTION_SYMBOLS_NO_NAMED = /\\$([$&`']|\\d\\d?)/g;\n\nvar maybeToString = function (it) {\n return it === undefined ? it : String(it);\n}; // @@replace logic\n\n\n_fixReWks('replace', 2, function (defined, REPLACE, $replace, maybeCallNative) {\n return [// `String.prototype.replace` method\n // https://tc39.github.io/ecma262/#sec-string.prototype.replace\n function replace(searchValue, replaceValue) {\n var O = defined(this);\n var fn = searchValue == undefined ? undefined : searchValue[REPLACE];\n return fn !== undefined ? fn.call(searchValue, O, replaceValue) : $replace.call(String(O), searchValue, replaceValue);\n }, // `RegExp.prototype[@@replace]` method\n // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@replace\n function (regexp, replaceValue) {\n var res = maybeCallNative($replace, regexp, this, replaceValue);\n if (res.done) return res.value;\n var rx = _anObject(regexp);\n var S = String(this);\n var functionalReplace = typeof replaceValue === 'function';\n if (!functionalReplace) replaceValue = String(replaceValue);\n var global = rx.global;\n\n if (global) {\n var fullUnicode = rx.unicode;\n rx.lastIndex = 0;\n }\n\n var results = [];\n\n while (true) {\n var result = _regexpExecAbstract(rx, S);\n if (result === null) break;\n results.push(result);\n if (!global) break;\n var matchStr = String(result[0]);\n if (matchStr === '') rx.lastIndex = _advanceStringIndex(S, _toLength(rx.lastIndex), fullUnicode);\n }\n\n var accumulatedResult = '';\n var nextSourcePosition = 0;\n\n for (var i = 0; i < results.length; i++) {\n result = results[i];\n var matched = String(result[0]);\n var position = max$1(min$2(_toInteger(result.index), S.length), 0);\n var captures = []; // NOTE: This is equivalent to\n // captures = result.slice(1).map(maybeToString)\n // but for some reason `nativeSlice.call(result, 1, result.length)` (called in\n // the slice polyfill when slicing native arrays) \"doesn't work\" in safari 9 and\n // causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it.\n\n for (var j = 1; j < result.length; j++) captures.push(maybeToString(result[j]));\n\n var namedCaptures = result.groups;\n\n if (functionalReplace) {\n var replacerArgs = [matched].concat(captures, position, S);\n if (namedCaptures !== undefined) replacerArgs.push(namedCaptures);\n var replacement = String(replaceValue.apply(undefined, replacerArgs));\n } else {\n replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue);\n }\n\n if (position >= nextSourcePosition) {\n accumulatedResult += S.slice(nextSourcePosition, position) + replacement;\n nextSourcePosition = position + matched.length;\n }\n }\n\n return accumulatedResult + S.slice(nextSourcePosition);\n }]; // https://tc39.github.io/ecma262/#sec-getsubstitution\n\n function getSubstitution(matched, str, position, captures, namedCaptures, replacement) {\n var tailPos = position + matched.length;\n var m = captures.length;\n var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED;\n\n if (namedCaptures !== undefined) {\n namedCaptures = _toObject(namedCaptures);\n symbols = SUBSTITUTION_SYMBOLS;\n }\n\n return $replace.call(replacement, symbols, function (match, ch) {\n var capture;\n\n switch (ch.charAt(0)) {\n case '$':\n return '$';\n\n case '&':\n return matched;\n\n case '`':\n return str.slice(0, position);\n\n case \"'\":\n return str.slice(tailPos);\n\n case '<':\n capture = namedCaptures[ch.slice(1, -1)];\n break;\n\n default:\n // \\d\\d?\n var n = +ch;\n if (n === 0) return match;\n\n if (n > m) {\n var f = floor$1(n / 10);\n if (f === 0) return match;\n if (f <= m) return captures[f - 1] === undefined ? ch.charAt(1) : captures[f - 1] + ch.charAt(1);\n return match;\n }\n\n capture = captures[n - 1];\n }\n\n return capture === undefined ? '' : capture;\n });\n }\n});\n\nvar UNSCOPABLES = _wks('unscopables');\nvar ArrayProto = Array.prototype;\nif (ArrayProto[UNSCOPABLES] == undefined) _hide(ArrayProto, UNSCOPABLES, {});\n\nvar _addToUnscopables = function (key) {\n ArrayProto[UNSCOPABLES][key] = true;\n};\n\nvar _iterStep = function (done, value) {\n return {\n value: value,\n done: !!done\n };\n};\n\nvar _iterators = {};\n\nvar IteratorPrototype = {}; // 25.1.2.1.1 %IteratorPrototype%[@@iterator]()\n\n_hide(IteratorPrototype, _wks('iterator'), function () {\n return this;\n});\n\nvar _iterCreate = function (Constructor, NAME, next) {\n Constructor.prototype = _objectCreate(IteratorPrototype, {\n next: _propertyDesc(1, next)\n });\n _setToStringTag(Constructor, NAME + ' Iterator');\n};\n\nvar IE_PROTO$2 = _sharedKey('IE_PROTO');\nvar ObjectProto$1 = Object.prototype;\n\nvar _objectGpo = Object.getPrototypeOf || function (O) {\n O = _toObject(O);\n if (_has(O, IE_PROTO$2)) return O[IE_PROTO$2];\n\n if (typeof O.constructor == 'function' && O instanceof O.constructor) {\n return O.constructor.prototype;\n }\n\n return O instanceof Object ? ObjectProto$1 : null;\n};\n\nvar ITERATOR = _wks('iterator');\nvar BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next`\n\nvar FF_ITERATOR = '@@iterator';\nvar KEYS = 'keys';\nvar VALUES = 'values';\n\nvar returnThis = function () {\n return this;\n};\n\nvar _iterDefine = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) {\n _iterCreate(Constructor, NAME, next);\n\n var getMethod = function (kind) {\n if (!BUGGY && kind in proto) return proto[kind];\n\n switch (kind) {\n case KEYS:\n return function keys() {\n return new Constructor(this, kind);\n };\n\n case VALUES:\n return function values() {\n return new Constructor(this, kind);\n };\n }\n\n return function entries() {\n return new Constructor(this, kind);\n };\n };\n\n var TAG = NAME + ' Iterator';\n var DEF_VALUES = DEFAULT == VALUES;\n var VALUES_BUG = false;\n var proto = Base.prototype;\n var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT];\n var $default = $native || getMethod(DEFAULT);\n var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined;\n var $anyNative = NAME == 'Array' ? proto.entries || $native : $native;\n var methods, key, IteratorPrototype; // Fix native\n\n if ($anyNative) {\n IteratorPrototype = _objectGpo($anyNative.call(new Base()));\n\n if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) {\n // Set @@toStringTag to native iterators\n _setToStringTag(IteratorPrototype, TAG, true); // fix for some old engines\n\n if ( typeof IteratorPrototype[ITERATOR] != 'function') _hide(IteratorPrototype, ITERATOR, returnThis);\n }\n } // fix Array#{values, @@iterator}.name in V8 / FF\n\n\n if (DEF_VALUES && $native && $native.name !== VALUES) {\n VALUES_BUG = true;\n\n $default = function values() {\n return $native.call(this);\n };\n } // Define iterator\n\n\n if ( (BUGGY || VALUES_BUG || !proto[ITERATOR])) {\n _hide(proto, ITERATOR, $default);\n } // Plug for library\n\n\n _iterators[NAME] = $default;\n _iterators[TAG] = returnThis;\n\n if (DEFAULT) {\n methods = {\n values: DEF_VALUES ? $default : getMethod(VALUES),\n keys: IS_SET ? $default : getMethod(KEYS),\n entries: $entries\n };\n if (FORCED) for (key in methods) {\n if (!(key in proto)) _redefine(proto, key, methods[key]);\n } else _export(_export.P + _export.F * (BUGGY || VALUES_BUG), NAME, methods);\n }\n\n return methods;\n};\n\n// 22.1.3.13 Array.prototype.keys()\n// 22.1.3.29 Array.prototype.values()\n// 22.1.3.30 Array.prototype[@@iterator]()\n\n\nvar es6_array_iterator = _iterDefine(Array, 'Array', function (iterated, kind) {\n this._t = _toIobject(iterated); // target\n\n this._i = 0; // next index\n\n this._k = kind; // kind\n // 22.1.5.2.1 %ArrayIteratorPrototype%.next()\n}, function () {\n var O = this._t;\n var kind = this._k;\n var index = this._i++;\n\n if (!O || index >= O.length) {\n this._t = undefined;\n return _iterStep(1);\n }\n\n if (kind == 'keys') return _iterStep(0, index);\n if (kind == 'values') return _iterStep(0, O[index]);\n return _iterStep(0, [index, O[index]]);\n}, 'values'); // argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7)\n\n_iterators.Arguments = _iterators.Array;\n_addToUnscopables('keys');\n_addToUnscopables('values');\n_addToUnscopables('entries');\n\nvar ITERATOR$1 = _wks('iterator');\nvar TO_STRING_TAG = _wks('toStringTag');\nvar ArrayValues = _iterators.Array;\nvar DOMIterables = {\n CSSRuleList: true,\n // TODO: Not spec compliant, should be false.\n CSSStyleDeclaration: false,\n CSSValueList: false,\n ClientRectList: false,\n DOMRectList: false,\n DOMStringList: false,\n DOMTokenList: true,\n DataTransferItemList: false,\n FileList: false,\n HTMLAllCollection: false,\n HTMLCollection: false,\n HTMLFormElement: false,\n HTMLSelectElement: false,\n MediaList: true,\n // TODO: Not spec compliant, should be false.\n MimeTypeArray: false,\n NamedNodeMap: false,\n NodeList: true,\n PaintRequestList: false,\n Plugin: false,\n PluginArray: false,\n SVGLengthList: false,\n SVGNumberList: false,\n SVGPathSegList: false,\n SVGPointList: false,\n SVGStringList: false,\n SVGTransformList: false,\n SourceBufferList: false,\n StyleSheetList: true,\n // TODO: Not spec compliant, should be false.\n TextTrackCueList: false,\n TextTrackList: false,\n TouchList: false\n};\n\nfor (var collections = _objectKeys(DOMIterables), i = 0; i < collections.length; i++) {\n var NAME = collections[i];\n var explicit = DOMIterables[NAME];\n var Collection = _global[NAME];\n var proto = Collection && Collection.prototype;\n var key;\n\n if (proto) {\n if (!proto[ITERATOR$1]) _hide(proto, ITERATOR$1, ArrayValues);\n if (!proto[TO_STRING_TAG]) _hide(proto, TO_STRING_TAG, NAME);\n _iterators[NAME] = ArrayValues;\n if (explicit) for (key in es6_array_iterator) if (!proto[key]) _redefine(proto, key, es6_array_iterator[key], true);\n }\n}\n\nvar test = {};\ntest[_wks('toStringTag')] = 'z';\n\nif (test + '' != '[object z]') {\n _redefine(Object.prototype, 'toString', function toString() {\n return '[object ' + _classof(this) + ']';\n }, true);\n}\n\nvar isEnum$1 = _objectPie.f;\n\nvar _objectToArray = function (isEntries) {\n return function (it) {\n var O = _toIobject(it);\n var keys = _objectKeys(O);\n var length = keys.length;\n var i = 0;\n var result = [];\n var key;\n\n while (length > i) {\n key = keys[i++];\n\n if (!_descriptors || isEnum$1.call(O, key)) {\n result.push(isEntries ? [key, O[key]] : O[key]);\n }\n }\n\n return result;\n };\n};\n\nvar $values = _objectToArray(false);\n_export(_export.S, 'Object', {\n values: function values(it) {\n return $values(it);\n }\n});\n\nvar MATCH = _wks('match');\n\nvar _isRegexp = function (it) {\n var isRegExp;\n return _isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : _cof(it) == 'RegExp');\n};\n\nvar SPECIES$1 = _wks('species');\n\nvar _speciesConstructor = function (O, D) {\n var C = _anObject(O).constructor;\n var S;\n return C === undefined || (S = _anObject(C)[SPECIES$1]) == undefined ? D : _aFunction(S);\n};\n\nvar $min = Math.min;\nvar $push = [].push;\nvar $SPLIT = 'split';\nvar LENGTH = 'length';\nvar LAST_INDEX$1 = 'lastIndex';\nvar MAX_UINT32 = 0xffffffff; // babel-minify transpiles RegExp('x', 'y') -> /x/y and it causes SyntaxError\n\nvar SUPPORTS_Y = !_fails(function () {\n RegExp(MAX_UINT32, 'y');\n}); // @@split logic\n\n_fixReWks('split', 2, function (defined, SPLIT, $split, maybeCallNative) {\n var internalSplit;\n\n if ('abbc'[$SPLIT](/(b)*/)[1] == 'c' || 'test'[$SPLIT](/(?:)/, -1)[LENGTH] != 4 || 'ab'[$SPLIT](/(?:ab)*/)[LENGTH] != 2 || '.'[$SPLIT](/(.?)(.?)/)[LENGTH] != 4 || '.'[$SPLIT](/()()/)[LENGTH] > 1 || ''[$SPLIT](/.?/)[LENGTH]) {\n // based on es5-shim implementation, need to rework it\n internalSplit = function (separator, limit) {\n var string = String(this);\n if (separator === undefined && limit === 0) return []; // If `separator` is not a regex, use native split\n\n if (!_isRegexp(separator)) return $split.call(string, separator, limit);\n var output = [];\n var flags = (separator.ignoreCase ? 'i' : '') + (separator.multiline ? 'm' : '') + (separator.unicode ? 'u' : '') + (separator.sticky ? 'y' : '');\n var lastLastIndex = 0;\n var splitLimit = limit === undefined ? MAX_UINT32 : limit >>> 0; // Make `global` and avoid `lastIndex` issues by working with a copy\n\n var separatorCopy = new RegExp(separator.source, flags + 'g');\n var match, lastIndex, lastLength;\n\n while (match = _regexpExec.call(separatorCopy, string)) {\n lastIndex = separatorCopy[LAST_INDEX$1];\n\n if (lastIndex > lastLastIndex) {\n output.push(string.slice(lastLastIndex, match.index));\n if (match[LENGTH] > 1 && match.index < string[LENGTH]) $push.apply(output, match.slice(1));\n lastLength = match[0][LENGTH];\n lastLastIndex = lastIndex;\n if (output[LENGTH] >= splitLimit) break;\n }\n\n if (separatorCopy[LAST_INDEX$1] === match.index) separatorCopy[LAST_INDEX$1]++; // Avoid an infinite loop\n }\n\n if (lastLastIndex === string[LENGTH]) {\n if (lastLength || !separatorCopy.test('')) output.push('');\n } else output.push(string.slice(lastLastIndex));\n\n return output[LENGTH] > splitLimit ? output.slice(0, splitLimit) : output;\n }; // Chakra, V8\n\n } else if ('0'[$SPLIT](undefined, 0)[LENGTH]) {\n internalSplit = function (separator, limit) {\n return separator === undefined && limit === 0 ? [] : $split.call(this, separator, limit);\n };\n } else {\n internalSplit = $split;\n }\n\n return [// `String.prototype.split` method\n // https://tc39.github.io/ecma262/#sec-string.prototype.split\n function split(separator, limit) {\n var O = defined(this);\n var splitter = separator == undefined ? undefined : separator[SPLIT];\n return splitter !== undefined ? splitter.call(separator, O, limit) : internalSplit.call(String(O), separator, limit);\n }, // `RegExp.prototype[@@split]` method\n // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@split\n //\n // NOTE: This cannot be properly polyfilled in engines that don't support\n // the 'y' flag.\n function (regexp, limit) {\n var res = maybeCallNative(internalSplit, regexp, this, limit, internalSplit !== $split);\n if (res.done) return res.value;\n var rx = _anObject(regexp);\n var S = String(this);\n var C = _speciesConstructor(rx, RegExp);\n var unicodeMatching = rx.unicode;\n var flags = (rx.ignoreCase ? 'i' : '') + (rx.multiline ? 'm' : '') + (rx.unicode ? 'u' : '') + (SUPPORTS_Y ? 'y' : 'g'); // ^(? + rx + ) is needed, in combination with some S slicing, to\n // simulate the 'y' flag.\n\n var splitter = new C(SUPPORTS_Y ? rx : '^(?:' + rx.source + ')', flags);\n var lim = limit === undefined ? MAX_UINT32 : limit >>> 0;\n if (lim === 0) return [];\n if (S.length === 0) return _regexpExecAbstract(splitter, S) === null ? [S] : [];\n var p = 0;\n var q = 0;\n var A = [];\n\n while (q < S.length) {\n splitter.lastIndex = SUPPORTS_Y ? q : 0;\n var z = _regexpExecAbstract(splitter, SUPPORTS_Y ? S : S.slice(q));\n var e;\n\n if (z === null || (e = $min(_toLength(splitter.lastIndex + (SUPPORTS_Y ? 0 : q)), S.length)) === p) {\n q = _advanceStringIndex(S, q, unicodeMatching);\n } else {\n A.push(S.slice(p, q));\n if (A.length === lim) return A;\n\n for (var i = 1; i <= z.length - 1; i++) {\n A.push(z[i]);\n if (A.length === lim) return A;\n }\n\n q = p = e;\n }\n }\n\n A.push(S.slice(p));\n return A;\n }];\n});\n\nvar $assign = Object.assign; // should work with symbols and should have deterministic property order (V8 bug)\n\nvar _objectAssign = !$assign || _fails(function () {\n var A = {};\n var B = {}; // eslint-disable-next-line no-undef\n\n var S = Symbol();\n var K = 'abcdefghijklmnopqrst';\n A[S] = 7;\n K.split('').forEach(function (k) {\n B[k] = k;\n });\n return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K;\n}) ? function assign(target, source) {\n // eslint-disable-line no-unused-vars\n var T = _toObject(target);\n var aLen = arguments.length;\n var index = 1;\n var getSymbols = _objectGops.f;\n var isEnum = _objectPie.f;\n\n while (aLen > index) {\n var S = _iobject(arguments[index++]);\n var keys = getSymbols ? _objectKeys(S).concat(getSymbols(S)) : _objectKeys(S);\n var length = keys.length;\n var j = 0;\n var key;\n\n while (length > j) {\n key = keys[j++];\n if (!_descriptors || isEnum.call(S, key)) T[key] = S[key];\n }\n }\n\n return T;\n} : $assign;\n\n_export(_export.S + _export.F, 'Object', {\n assign: _objectAssign\n});\n\n/* eslint-disable no-proto */\n\nvar check = function (O, proto) {\n _anObject(O);\n if (!_isObject(proto) && proto !== null) throw TypeError(proto + \": can't set as prototype!\");\n};\n\nvar _setProto = {\n set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line\n function (test, buggy, set) {\n try {\n set = _ctx(Function.call, _objectGopd.f(Object.prototype, '__proto__').set, 2);\n set(test, []);\n buggy = !(test instanceof Array);\n } catch (e) {\n buggy = true;\n }\n\n return function setPrototypeOf(O, proto) {\n check(O, proto);\n if (buggy) O.__proto__ = proto;else set(O, proto);\n return O;\n };\n }({}, false) : undefined),\n check: check\n};\n\nvar setPrototypeOf = _setProto.set;\n\nvar _inheritIfRequired = function (that, target, C) {\n var S = target.constructor;\n var P;\n\n if (S !== C && typeof S == 'function' && (P = S.prototype) !== C.prototype && _isObject(P) && setPrototypeOf) {\n setPrototypeOf(that, P);\n }\n\n return that;\n};\n\nvar _stringWs = '\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003' + '\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF';\n\nvar space = '[' + _stringWs + ']';\nvar non = '\\u200b\\u0085';\nvar ltrim = RegExp('^' + space + space + '*');\nvar rtrim = RegExp(space + space + '*$');\n\nvar exporter = function (KEY, exec, ALIAS) {\n var exp = {};\n var FORCE = _fails(function () {\n return !!_stringWs[KEY]() || non[KEY]() != non;\n });\n var fn = exp[KEY] = FORCE ? exec(trim) : _stringWs[KEY];\n if (ALIAS) exp[ALIAS] = fn;\n _export(_export.P + _export.F * FORCE, 'String', exp);\n}; // 1 -> String#trimLeft\n// 2 -> String#trimRight\n// 3 -> String#trim\n\n\nvar trim = exporter.trim = function (string, TYPE) {\n string = String(_defined(string));\n if (TYPE & 1) string = string.replace(ltrim, '');\n if (TYPE & 2) string = string.replace(rtrim, '');\n return string;\n};\n\nvar _stringTrim = exporter;\n\nvar gOPN$2 = _objectGopn.f;\nvar gOPD$2 = _objectGopd.f;\nvar dP$2 = _objectDp.f;\nvar $trim = _stringTrim.trim;\nvar NUMBER = 'Number';\nvar $Number = _global[NUMBER];\nvar Base = $Number;\nvar proto$1 = $Number.prototype; // Opera ~12 has broken Object#toString\n\nvar BROKEN_COF = _cof(_objectCreate(proto$1)) == NUMBER;\nvar TRIM = 'trim' in String.prototype; // 7.1.3 ToNumber(argument)\n\nvar toNumber = function (argument) {\n var it = _toPrimitive(argument, false);\n\n if (typeof it == 'string' && it.length > 2) {\n it = TRIM ? it.trim() : $trim(it, 3);\n var first = it.charCodeAt(0);\n var third, radix, maxCode;\n\n if (first === 43 || first === 45) {\n third = it.charCodeAt(2);\n if (third === 88 || third === 120) return NaN; // Number('+0x1') should be NaN, old V8 fix\n } else if (first === 48) {\n switch (it.charCodeAt(1)) {\n case 66:\n case 98:\n radix = 2;\n maxCode = 49;\n break;\n // fast equal /^0b[01]+$/i\n\n case 79:\n case 111:\n radix = 8;\n maxCode = 55;\n break;\n // fast equal /^0o[0-7]+$/i\n\n default:\n return +it;\n }\n\n for (var digits = it.slice(2), i = 0, l = digits.length, code; i < l; i++) {\n code = digits.charCodeAt(i); // parseInt parses a string to a first unavailable symbol\n // but ToNumber should return NaN if a string contains unavailable symbols\n\n if (code < 48 || code > maxCode) return NaN;\n }\n\n return parseInt(digits, radix);\n }\n }\n\n return +it;\n};\n\nif (!$Number(' 0o1') || !$Number('0b1') || $Number('+0x1')) {\n $Number = function Number(value) {\n var it = arguments.length < 1 ? 0 : value;\n var that = this;\n return that instanceof $Number // check on 1..constructor(foo) case\n && (BROKEN_COF ? _fails(function () {\n proto$1.valueOf.call(that);\n }) : _cof(that) != NUMBER) ? _inheritIfRequired(new Base(toNumber(it)), that, $Number) : toNumber(it);\n };\n\n for (var keys = _descriptors ? gOPN$2(Base) : ( // ES3:\n 'MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,' + // ES6 (in case, if modules with ES6 Number statics required before):\n 'EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,' + 'MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger').split(','), j$1 = 0, key$1; keys.length > j$1; j$1++) {\n if (_has(Base, key$1 = keys[j$1]) && !_has($Number, key$1)) {\n dP$2($Number, key$1, gOPD$2(Base, key$1));\n }\n }\n\n $Number.prototype = proto$1;\n proto$1.constructor = $Number;\n _redefine(_global, NUMBER, $Number);\n}\n\nvar moment = createCommonjsModule(function (module, exports) {\n\n (function (global, factory) {\n module.exports = factory() ;\n })(commonjsGlobal, function () {\n\n var hookCallback;\n\n function hooks() {\n return hookCallback.apply(null, arguments);\n } // This is done to register the method called with moment()\n // without creating circular dependencies.\n\n\n function setHookCallback(callback) {\n hookCallback = callback;\n }\n\n function isArray(input) {\n return input instanceof Array || Object.prototype.toString.call(input) === '[object Array]';\n }\n\n function isObject(input) {\n // IE8 will treat undefined and null as object if it wasn't for\n // input != null\n return input != null && Object.prototype.toString.call(input) === '[object Object]';\n }\n\n function isObjectEmpty(obj) {\n if (Object.getOwnPropertyNames) {\n return Object.getOwnPropertyNames(obj).length === 0;\n } else {\n var k;\n\n for (k in obj) {\n if (obj.hasOwnProperty(k)) {\n return false;\n }\n }\n\n return true;\n }\n }\n\n function isUndefined(input) {\n return input === void 0;\n }\n\n function isNumber(input) {\n return typeof input === 'number' || Object.prototype.toString.call(input) === '[object Number]';\n }\n\n function isDate(input) {\n return input instanceof Date || Object.prototype.toString.call(input) === '[object Date]';\n }\n\n function map(arr, fn) {\n var res = [],\n i;\n\n for (i = 0; i < arr.length; ++i) {\n res.push(fn(arr[i], i));\n }\n\n return res;\n }\n\n function hasOwnProp(a, b) {\n return Object.prototype.hasOwnProperty.call(a, b);\n }\n\n function extend(a, b) {\n for (var i in b) {\n if (hasOwnProp(b, i)) {\n a[i] = b[i];\n }\n }\n\n if (hasOwnProp(b, 'toString')) {\n a.toString = b.toString;\n }\n\n if (hasOwnProp(b, 'valueOf')) {\n a.valueOf = b.valueOf;\n }\n\n return a;\n }\n\n function createUTC(input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, true).utc();\n }\n\n function defaultParsingFlags() {\n // We need to deep clone this object.\n return {\n empty: false,\n unusedTokens: [],\n unusedInput: [],\n overflow: -2,\n charsLeftOver: 0,\n nullInput: false,\n invalidMonth: null,\n invalidFormat: false,\n userInvalidated: false,\n iso: false,\n parsedDateParts: [],\n meridiem: null,\n rfc2822: false,\n weekdayMismatch: false\n };\n }\n\n function getParsingFlags(m) {\n if (m._pf == null) {\n m._pf = defaultParsingFlags();\n }\n\n return m._pf;\n }\n\n var some;\n\n if (Array.prototype.some) {\n some = Array.prototype.some;\n } else {\n some = function (fun) {\n var t = Object(this);\n var len = t.length >>> 0;\n\n for (var i = 0; i < len; i++) {\n if (i in t && fun.call(this, t[i], i, t)) {\n return true;\n }\n }\n\n return false;\n };\n }\n\n function isValid(m) {\n if (m._isValid == null) {\n var flags = getParsingFlags(m);\n var parsedParts = some.call(flags.parsedDateParts, function (i) {\n return i != null;\n });\n var isNowValid = !isNaN(m._d.getTime()) && flags.overflow < 0 && !flags.empty && !flags.invalidMonth && !flags.invalidWeekday && !flags.weekdayMismatch && !flags.nullInput && !flags.invalidFormat && !flags.userInvalidated && (!flags.meridiem || flags.meridiem && parsedParts);\n\n if (m._strict) {\n isNowValid = isNowValid && flags.charsLeftOver === 0 && flags.unusedTokens.length === 0 && flags.bigHour === undefined;\n }\n\n if (Object.isFrozen == null || !Object.isFrozen(m)) {\n m._isValid = isNowValid;\n } else {\n return isNowValid;\n }\n }\n\n return m._isValid;\n }\n\n function createInvalid(flags) {\n var m = createUTC(NaN);\n\n if (flags != null) {\n extend(getParsingFlags(m), flags);\n } else {\n getParsingFlags(m).userInvalidated = true;\n }\n\n return m;\n } // Plugins that add properties should also add the key here (null value),\n // so we can properly clone ourselves.\n\n\n var momentProperties = hooks.momentProperties = [];\n\n function copyConfig(to, from) {\n var i, prop, val;\n\n if (!isUndefined(from._isAMomentObject)) {\n to._isAMomentObject = from._isAMomentObject;\n }\n\n if (!isUndefined(from._i)) {\n to._i = from._i;\n }\n\n if (!isUndefined(from._f)) {\n to._f = from._f;\n }\n\n if (!isUndefined(from._l)) {\n to._l = from._l;\n }\n\n if (!isUndefined(from._strict)) {\n to._strict = from._strict;\n }\n\n if (!isUndefined(from._tzm)) {\n to._tzm = from._tzm;\n }\n\n if (!isUndefined(from._isUTC)) {\n to._isUTC = from._isUTC;\n }\n\n if (!isUndefined(from._offset)) {\n to._offset = from._offset;\n }\n\n if (!isUndefined(from._pf)) {\n to._pf = getParsingFlags(from);\n }\n\n if (!isUndefined(from._locale)) {\n to._locale = from._locale;\n }\n\n if (momentProperties.length > 0) {\n for (i = 0; i < momentProperties.length; i++) {\n prop = momentProperties[i];\n val = from[prop];\n\n if (!isUndefined(val)) {\n to[prop] = val;\n }\n }\n }\n\n return to;\n }\n\n var updateInProgress = false; // Moment prototype object\n\n function Moment(config) {\n copyConfig(this, config);\n this._d = new Date(config._d != null ? config._d.getTime() : NaN);\n\n if (!this.isValid()) {\n this._d = new Date(NaN);\n } // Prevent infinite loop in case updateOffset creates new moment\n // objects.\n\n\n if (updateInProgress === false) {\n updateInProgress = true;\n hooks.updateOffset(this);\n updateInProgress = false;\n }\n }\n\n function isMoment(obj) {\n return obj instanceof Moment || obj != null && obj._isAMomentObject != null;\n }\n\n function absFloor(number) {\n if (number < 0) {\n // -0 -> 0\n return Math.ceil(number) || 0;\n } else {\n return Math.floor(number);\n }\n }\n\n function toInt(argumentForCoercion) {\n var coercedNumber = +argumentForCoercion,\n value = 0;\n\n if (coercedNumber !== 0 && isFinite(coercedNumber)) {\n value = absFloor(coercedNumber);\n }\n\n return value;\n } // compare two arrays, return the number of differences\n\n\n function compareArrays(array1, array2, dontConvert) {\n var len = Math.min(array1.length, array2.length),\n lengthDiff = Math.abs(array1.length - array2.length),\n diffs = 0,\n i;\n\n for (i = 0; i < len; i++) {\n if (dontConvert && array1[i] !== array2[i] || !dontConvert && toInt(array1[i]) !== toInt(array2[i])) {\n diffs++;\n }\n }\n\n return diffs + lengthDiff;\n }\n\n function warn(msg) {\n if (hooks.suppressDeprecationWarnings === false && typeof console !== 'undefined' && console.warn) {\n console.warn('Deprecation warning: ' + msg);\n }\n }\n\n function deprecate(msg, fn) {\n var firstTime = true;\n return extend(function () {\n if (hooks.deprecationHandler != null) {\n hooks.deprecationHandler(null, msg);\n }\n\n if (firstTime) {\n var args = [];\n var arg;\n\n for (var i = 0; i < arguments.length; i++) {\n arg = '';\n\n if (typeof arguments[i] === 'object') {\n arg += '\\n[' + i + '] ';\n\n for (var key in arguments[0]) {\n arg += key + ': ' + arguments[0][key] + ', ';\n }\n\n arg = arg.slice(0, -2); // Remove trailing comma and space\n } else {\n arg = arguments[i];\n }\n\n args.push(arg);\n }\n\n warn(msg + '\\nArguments: ' + Array.prototype.slice.call(args).join('') + '\\n' + new Error().stack);\n firstTime = false;\n }\n\n return fn.apply(this, arguments);\n }, fn);\n }\n\n var deprecations = {};\n\n function deprecateSimple(name, msg) {\n if (hooks.deprecationHandler != null) {\n hooks.deprecationHandler(name, msg);\n }\n\n if (!deprecations[name]) {\n warn(msg);\n deprecations[name] = true;\n }\n }\n\n hooks.suppressDeprecationWarnings = false;\n hooks.deprecationHandler = null;\n\n function isFunction(input) {\n return input instanceof Function || Object.prototype.toString.call(input) === '[object Function]';\n }\n\n function set(config) {\n var prop, i;\n\n for (i in config) {\n prop = config[i];\n\n if (isFunction(prop)) {\n this[i] = prop;\n } else {\n this['_' + i] = prop;\n }\n }\n\n this._config = config; // Lenient ordinal parsing accepts just a number in addition to\n // number + (possibly) stuff coming from _dayOfMonthOrdinalParse.\n // TODO: Remove \"ordinalParse\" fallback in next major release.\n\n this._dayOfMonthOrdinalParseLenient = new RegExp((this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) + '|' + /\\d{1,2}/.source);\n }\n\n function mergeConfigs(parentConfig, childConfig) {\n var res = extend({}, parentConfig),\n prop;\n\n for (prop in childConfig) {\n if (hasOwnProp(childConfig, prop)) {\n if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) {\n res[prop] = {};\n extend(res[prop], parentConfig[prop]);\n extend(res[prop], childConfig[prop]);\n } else if (childConfig[prop] != null) {\n res[prop] = childConfig[prop];\n } else {\n delete res[prop];\n }\n }\n }\n\n for (prop in parentConfig) {\n if (hasOwnProp(parentConfig, prop) && !hasOwnProp(childConfig, prop) && isObject(parentConfig[prop])) {\n // make sure changes to properties don't modify parent config\n res[prop] = extend({}, res[prop]);\n }\n }\n\n return res;\n }\n\n function Locale(config) {\n if (config != null) {\n this.set(config);\n }\n }\n\n var keys;\n\n if (Object.keys) {\n keys = Object.keys;\n } else {\n keys = function (obj) {\n var i,\n res = [];\n\n for (i in obj) {\n if (hasOwnProp(obj, i)) {\n res.push(i);\n }\n }\n\n return res;\n };\n }\n\n var defaultCalendar = {\n sameDay: '[Today at] LT',\n nextDay: '[Tomorrow at] LT',\n nextWeek: 'dddd [at] LT',\n lastDay: '[Yesterday at] LT',\n lastWeek: '[Last] dddd [at] LT',\n sameElse: 'L'\n };\n\n function calendar(key, mom, now) {\n var output = this._calendar[key] || this._calendar['sameElse'];\n return isFunction(output) ? output.call(mom, now) : output;\n }\n\n var defaultLongDateFormat = {\n LTS: 'h:mm:ss A',\n LT: 'h:mm A',\n L: 'MM/DD/YYYY',\n LL: 'MMMM D, YYYY',\n LLL: 'MMMM D, YYYY h:mm A',\n LLLL: 'dddd, MMMM D, YYYY h:mm A'\n };\n\n function longDateFormat(key) {\n var format = this._longDateFormat[key],\n formatUpper = this._longDateFormat[key.toUpperCase()];\n\n if (format || !formatUpper) {\n return format;\n }\n\n this._longDateFormat[key] = formatUpper.replace(/MMMM|MM|DD|dddd/g, function (val) {\n return val.slice(1);\n });\n return this._longDateFormat[key];\n }\n\n var defaultInvalidDate = 'Invalid date';\n\n function invalidDate() {\n return this._invalidDate;\n }\n\n var defaultOrdinal = '%d';\n var defaultDayOfMonthOrdinalParse = /\\d{1,2}/;\n\n function ordinal(number) {\n return this._ordinal.replace('%d', number);\n }\n\n var defaultRelativeTime = {\n future: 'in %s',\n past: '%s ago',\n s: 'a few seconds',\n ss: '%d seconds',\n m: 'a minute',\n mm: '%d minutes',\n h: 'an hour',\n hh: '%d hours',\n d: 'a day',\n dd: '%d days',\n M: 'a month',\n MM: '%d months',\n y: 'a year',\n yy: '%d years'\n };\n\n function relativeTime(number, withoutSuffix, string, isFuture) {\n var output = this._relativeTime[string];\n return isFunction(output) ? output(number, withoutSuffix, string, isFuture) : output.replace(/%d/i, number);\n }\n\n function pastFuture(diff, output) {\n var format = this._relativeTime[diff > 0 ? 'future' : 'past'];\n return isFunction(format) ? format(output) : format.replace(/%s/i, output);\n }\n\n var aliases = {};\n\n function addUnitAlias(unit, shorthand) {\n var lowerCase = unit.toLowerCase();\n aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit;\n }\n\n function normalizeUnits(units) {\n return typeof units === 'string' ? aliases[units] || aliases[units.toLowerCase()] : undefined;\n }\n\n function normalizeObjectUnits(inputObject) {\n var normalizedInput = {},\n normalizedProp,\n prop;\n\n for (prop in inputObject) {\n if (hasOwnProp(inputObject, prop)) {\n normalizedProp = normalizeUnits(prop);\n\n if (normalizedProp) {\n normalizedInput[normalizedProp] = inputObject[prop];\n }\n }\n }\n\n return normalizedInput;\n }\n\n var priorities = {};\n\n function addUnitPriority(unit, priority) {\n priorities[unit] = priority;\n }\n\n function getPrioritizedUnits(unitsObj) {\n var units = [];\n\n for (var u in unitsObj) {\n units.push({\n unit: u,\n priority: priorities[u]\n });\n }\n\n units.sort(function (a, b) {\n return a.priority - b.priority;\n });\n return units;\n }\n\n function zeroFill(number, targetLength, forceSign) {\n var absNumber = '' + Math.abs(number),\n zerosToFill = targetLength - absNumber.length,\n sign = number >= 0;\n return (sign ? forceSign ? '+' : '' : '-') + Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) + absNumber;\n }\n\n var formattingTokens = /(\\[[^\\[]*\\])|(\\\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g;\n var localFormattingTokens = /(\\[[^\\[]*\\])|(\\\\)?(LTS|LT|LL?L?L?|l{1,4})/g;\n var formatFunctions = {};\n var formatTokenFunctions = {}; // token: 'M'\n // padded: ['MM', 2]\n // ordinal: 'Mo'\n // callback: function () { this.month() + 1 }\n\n function addFormatToken(token, padded, ordinal, callback) {\n var func = callback;\n\n if (typeof callback === 'string') {\n func = function () {\n return this[callback]();\n };\n }\n\n if (token) {\n formatTokenFunctions[token] = func;\n }\n\n if (padded) {\n formatTokenFunctions[padded[0]] = function () {\n return zeroFill(func.apply(this, arguments), padded[1], padded[2]);\n };\n }\n\n if (ordinal) {\n formatTokenFunctions[ordinal] = function () {\n return this.localeData().ordinal(func.apply(this, arguments), token);\n };\n }\n }\n\n function removeFormattingTokens(input) {\n if (input.match(/\\[[\\s\\S]/)) {\n return input.replace(/^\\[|\\]$/g, '');\n }\n\n return input.replace(/\\\\/g, '');\n }\n\n function makeFormatFunction(format) {\n var array = format.match(formattingTokens),\n i,\n length;\n\n for (i = 0, length = array.length; i < length; i++) {\n if (formatTokenFunctions[array[i]]) {\n array[i] = formatTokenFunctions[array[i]];\n } else {\n array[i] = removeFormattingTokens(array[i]);\n }\n }\n\n return function (mom) {\n var output = '',\n i;\n\n for (i = 0; i < length; i++) {\n output += isFunction(array[i]) ? array[i].call(mom, format) : array[i];\n }\n\n return output;\n };\n } // format date using native date object\n\n\n function formatMoment(m, format) {\n if (!m.isValid()) {\n return m.localeData().invalidDate();\n }\n\n format = expandFormat(format, m.localeData());\n formatFunctions[format] = formatFunctions[format] || makeFormatFunction(format);\n return formatFunctions[format](m);\n }\n\n function expandFormat(format, locale) {\n var i = 5;\n\n function replaceLongDateFormatTokens(input) {\n return locale.longDateFormat(input) || input;\n }\n\n localFormattingTokens.lastIndex = 0;\n\n while (i >= 0 && localFormattingTokens.test(format)) {\n format = format.replace(localFormattingTokens, replaceLongDateFormatTokens);\n localFormattingTokens.lastIndex = 0;\n i -= 1;\n }\n\n return format;\n }\n\n var match1 = /\\d/; // 0 - 9\n\n var match2 = /\\d\\d/; // 00 - 99\n\n var match3 = /\\d{3}/; // 000 - 999\n\n var match4 = /\\d{4}/; // 0000 - 9999\n\n var match6 = /[+-]?\\d{6}/; // -999999 - 999999\n\n var match1to2 = /\\d\\d?/; // 0 - 99\n\n var match3to4 = /\\d\\d\\d\\d?/; // 999 - 9999\n\n var match5to6 = /\\d\\d\\d\\d\\d\\d?/; // 99999 - 999999\n\n var match1to3 = /\\d{1,3}/; // 0 - 999\n\n var match1to4 = /\\d{1,4}/; // 0 - 9999\n\n var match1to6 = /[+-]?\\d{1,6}/; // -999999 - 999999\n\n var matchUnsigned = /\\d+/; // 0 - inf\n\n var matchSigned = /[+-]?\\d+/; // -inf - inf\n\n var matchOffset = /Z|[+-]\\d\\d:?\\d\\d/gi; // +00:00 -00:00 +0000 -0000 or Z\n\n var matchShortOffset = /Z|[+-]\\d\\d(?::?\\d\\d)?/gi; // +00 -00 +00:00 -00:00 +0000 -0000 or Z\n\n var matchTimestamp = /[+-]?\\d+(\\.\\d{1,3})?/; // 123456789 123456789.123\n // any word (or two) characters or numbers including two/three word month in arabic.\n // includes scottish gaelic two word and hyphenated months\n\n var matchWord = /[0-9]{0,256}['a-z\\u00A0-\\u05FF\\u0700-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFF07\\uFF10-\\uFFEF]{1,256}|[\\u0600-\\u06FF\\/]{1,256}(\\s*?[\\u0600-\\u06FF]{1,256}){1,2}/i;\n var regexes = {};\n\n function addRegexToken(token, regex, strictRegex) {\n regexes[token] = isFunction(regex) ? regex : function (isStrict, localeData) {\n return isStrict && strictRegex ? strictRegex : regex;\n };\n }\n\n function getParseRegexForToken(token, config) {\n if (!hasOwnProp(regexes, token)) {\n return new RegExp(unescapeFormat(token));\n }\n\n return regexes[token](config._strict, config._locale);\n } // Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript\n\n\n function unescapeFormat(s) {\n return regexEscape(s.replace('\\\\', '').replace(/\\\\(\\[)|\\\\(\\])|\\[([^\\]\\[]*)\\]|\\\\(.)/g, function (matched, p1, p2, p3, p4) {\n return p1 || p2 || p3 || p4;\n }));\n }\n\n function regexEscape(s) {\n return s.replace(/[-\\/\\\\^$*+?.()|[\\]{}]/g, '\\\\$&');\n }\n\n var tokens = {};\n\n function addParseToken(token, callback) {\n var i,\n func = callback;\n\n if (typeof token === 'string') {\n token = [token];\n }\n\n if (isNumber(callback)) {\n func = function (input, array) {\n array[callback] = toInt(input);\n };\n }\n\n for (i = 0; i < token.length; i++) {\n tokens[token[i]] = func;\n }\n }\n\n function addWeekParseToken(token, callback) {\n addParseToken(token, function (input, array, config, token) {\n config._w = config._w || {};\n callback(input, config._w, config, token);\n });\n }\n\n function addTimeToArrayFromToken(token, input, config) {\n if (input != null && hasOwnProp(tokens, token)) {\n tokens[token](input, config._a, config, token);\n }\n }\n\n var YEAR = 0;\n var MONTH = 1;\n var DATE = 2;\n var HOUR = 3;\n var MINUTE = 4;\n var SECOND = 5;\n var MILLISECOND = 6;\n var WEEK = 7;\n var WEEKDAY = 8; // FORMATTING\n\n addFormatToken('Y', 0, 0, function () {\n var y = this.year();\n return y <= 9999 ? '' + y : '+' + y;\n });\n addFormatToken(0, ['YY', 2], 0, function () {\n return this.year() % 100;\n });\n addFormatToken(0, ['YYYY', 4], 0, 'year');\n addFormatToken(0, ['YYYYY', 5], 0, 'year');\n addFormatToken(0, ['YYYYYY', 6, true], 0, 'year'); // ALIASES\n\n addUnitAlias('year', 'y'); // PRIORITIES\n\n addUnitPriority('year', 1); // PARSING\n\n addRegexToken('Y', matchSigned);\n addRegexToken('YY', match1to2, match2);\n addRegexToken('YYYY', match1to4, match4);\n addRegexToken('YYYYY', match1to6, match6);\n addRegexToken('YYYYYY', match1to6, match6);\n addParseToken(['YYYYY', 'YYYYYY'], YEAR);\n addParseToken('YYYY', function (input, array) {\n array[YEAR] = input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input);\n });\n addParseToken('YY', function (input, array) {\n array[YEAR] = hooks.parseTwoDigitYear(input);\n });\n addParseToken('Y', function (input, array) {\n array[YEAR] = parseInt(input, 10);\n }); // HELPERS\n\n function daysInYear(year) {\n return isLeapYear(year) ? 366 : 365;\n }\n\n function isLeapYear(year) {\n return year % 4 === 0 && year % 100 !== 0 || year % 400 === 0;\n } // HOOKS\n\n\n hooks.parseTwoDigitYear = function (input) {\n return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);\n }; // MOMENTS\n\n\n var getSetYear = makeGetSet('FullYear', true);\n\n function getIsLeapYear() {\n return isLeapYear(this.year());\n }\n\n function makeGetSet(unit, keepTime) {\n return function (value) {\n if (value != null) {\n set$1(this, unit, value);\n hooks.updateOffset(this, keepTime);\n return this;\n } else {\n return get(this, unit);\n }\n };\n }\n\n function get(mom, unit) {\n return mom.isValid() ? mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]() : NaN;\n }\n\n function set$1(mom, unit, value) {\n if (mom.isValid() && !isNaN(value)) {\n if (unit === 'FullYear' && isLeapYear(mom.year()) && mom.month() === 1 && mom.date() === 29) {\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value, mom.month(), daysInMonth(value, mom.month()));\n } else {\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value);\n }\n }\n } // MOMENTS\n\n\n function stringGet(units) {\n units = normalizeUnits(units);\n\n if (isFunction(this[units])) {\n return this[units]();\n }\n\n return this;\n }\n\n function stringSet(units, value) {\n if (typeof units === 'object') {\n units = normalizeObjectUnits(units);\n var prioritized = getPrioritizedUnits(units);\n\n for (var i = 0; i < prioritized.length; i++) {\n this[prioritized[i].unit](units[prioritized[i].unit]);\n }\n } else {\n units = normalizeUnits(units);\n\n if (isFunction(this[units])) {\n return this[units](value);\n }\n }\n\n return this;\n }\n\n function mod(n, x) {\n return (n % x + x) % x;\n }\n\n var indexOf;\n\n if (Array.prototype.indexOf) {\n indexOf = Array.prototype.indexOf;\n } else {\n indexOf = function (o) {\n // I know\n var i;\n\n for (i = 0; i < this.length; ++i) {\n if (this[i] === o) {\n return i;\n }\n }\n\n return -1;\n };\n }\n\n function daysInMonth(year, month) {\n if (isNaN(year) || isNaN(month)) {\n return NaN;\n }\n\n var modMonth = mod(month, 12);\n year += (month - modMonth) / 12;\n return modMonth === 1 ? isLeapYear(year) ? 29 : 28 : 31 - modMonth % 7 % 2;\n } // FORMATTING\n\n\n addFormatToken('M', ['MM', 2], 'Mo', function () {\n return this.month() + 1;\n });\n addFormatToken('MMM', 0, 0, function (format) {\n return this.localeData().monthsShort(this, format);\n });\n addFormatToken('MMMM', 0, 0, function (format) {\n return this.localeData().months(this, format);\n }); // ALIASES\n\n addUnitAlias('month', 'M'); // PRIORITY\n\n addUnitPriority('month', 8); // PARSING\n\n addRegexToken('M', match1to2);\n addRegexToken('MM', match1to2, match2);\n addRegexToken('MMM', function (isStrict, locale) {\n return locale.monthsShortRegex(isStrict);\n });\n addRegexToken('MMMM', function (isStrict, locale) {\n return locale.monthsRegex(isStrict);\n });\n addParseToken(['M', 'MM'], function (input, array) {\n array[MONTH] = toInt(input) - 1;\n });\n addParseToken(['MMM', 'MMMM'], function (input, array, config, token) {\n var month = config._locale.monthsParse(input, token, config._strict); // if we didn't find a month name, mark the date as invalid.\n\n\n if (month != null) {\n array[MONTH] = month;\n } else {\n getParsingFlags(config).invalidMonth = input;\n }\n }); // LOCALES\n\n var MONTHS_IN_FORMAT = /D[oD]?(\\[[^\\[\\]]*\\]|\\s)+MMMM?/;\n var defaultLocaleMonths = 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_');\n\n function localeMonths(m, format) {\n if (!m) {\n return isArray(this._months) ? this._months : this._months['standalone'];\n }\n\n return isArray(this._months) ? this._months[m.month()] : this._months[(this._months.isFormat || MONTHS_IN_FORMAT).test(format) ? 'format' : 'standalone'][m.month()];\n }\n\n var defaultLocaleMonthsShort = 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_');\n\n function localeMonthsShort(m, format) {\n if (!m) {\n return isArray(this._monthsShort) ? this._monthsShort : this._monthsShort['standalone'];\n }\n\n return isArray(this._monthsShort) ? this._monthsShort[m.month()] : this._monthsShort[MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'][m.month()];\n }\n\n function handleStrictParse(monthName, format, strict) {\n var i,\n ii,\n mom,\n llc = monthName.toLocaleLowerCase();\n\n if (!this._monthsParse) {\n // this is not used\n this._monthsParse = [];\n this._longMonthsParse = [];\n this._shortMonthsParse = [];\n\n for (i = 0; i < 12; ++i) {\n mom = createUTC([2000, i]);\n this._shortMonthsParse[i] = this.monthsShort(mom, '').toLocaleLowerCase();\n this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase();\n }\n }\n\n if (strict) {\n if (format === 'MMM') {\n ii = indexOf.call(this._shortMonthsParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._longMonthsParse, llc);\n return ii !== -1 ? ii : null;\n }\n } else {\n if (format === 'MMM') {\n ii = indexOf.call(this._shortMonthsParse, llc);\n\n if (ii !== -1) {\n return ii;\n }\n\n ii = indexOf.call(this._longMonthsParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._longMonthsParse, llc);\n\n if (ii !== -1) {\n return ii;\n }\n\n ii = indexOf.call(this._shortMonthsParse, llc);\n return ii !== -1 ? ii : null;\n }\n }\n }\n\n function localeMonthsParse(monthName, format, strict) {\n var i, mom, regex;\n\n if (this._monthsParseExact) {\n return handleStrictParse.call(this, monthName, format, strict);\n }\n\n if (!this._monthsParse) {\n this._monthsParse = [];\n this._longMonthsParse = [];\n this._shortMonthsParse = [];\n } // TODO: add sorting\n // Sorting makes sure if one month (or abbr) is a prefix of another\n // see sorting in computeMonthsParse\n\n\n for (i = 0; i < 12; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, i]);\n\n if (strict && !this._longMonthsParse[i]) {\n this._longMonthsParse[i] = new RegExp('^' + this.months(mom, '').replace('.', '') + '$', 'i');\n this._shortMonthsParse[i] = new RegExp('^' + this.monthsShort(mom, '').replace('.', '') + '$', 'i');\n }\n\n if (!strict && !this._monthsParse[i]) {\n regex = '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, '');\n this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i');\n } // test the regex\n\n\n if (strict && format === 'MMMM' && this._longMonthsParse[i].test(monthName)) {\n return i;\n } else if (strict && format === 'MMM' && this._shortMonthsParse[i].test(monthName)) {\n return i;\n } else if (!strict && this._monthsParse[i].test(monthName)) {\n return i;\n }\n }\n } // MOMENTS\n\n\n function setMonth(mom, value) {\n var dayOfMonth;\n\n if (!mom.isValid()) {\n // No op\n return mom;\n }\n\n if (typeof value === 'string') {\n if (/^\\d+$/.test(value)) {\n value = toInt(value);\n } else {\n value = mom.localeData().monthsParse(value); // TODO: Another silent failure?\n\n if (!isNumber(value)) {\n return mom;\n }\n }\n }\n\n dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value));\n\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth);\n\n return mom;\n }\n\n function getSetMonth(value) {\n if (value != null) {\n setMonth(this, value);\n hooks.updateOffset(this, true);\n return this;\n } else {\n return get(this, 'Month');\n }\n }\n\n function getDaysInMonth() {\n return daysInMonth(this.year(), this.month());\n }\n\n var defaultMonthsShortRegex = matchWord;\n\n function monthsShortRegex(isStrict) {\n if (this._monthsParseExact) {\n if (!hasOwnProp(this, '_monthsRegex')) {\n computeMonthsParse.call(this);\n }\n\n if (isStrict) {\n return this._monthsShortStrictRegex;\n } else {\n return this._monthsShortRegex;\n }\n } else {\n if (!hasOwnProp(this, '_monthsShortRegex')) {\n this._monthsShortRegex = defaultMonthsShortRegex;\n }\n\n return this._monthsShortStrictRegex && isStrict ? this._monthsShortStrictRegex : this._monthsShortRegex;\n }\n }\n\n var defaultMonthsRegex = matchWord;\n\n function monthsRegex(isStrict) {\n if (this._monthsParseExact) {\n if (!hasOwnProp(this, '_monthsRegex')) {\n computeMonthsParse.call(this);\n }\n\n if (isStrict) {\n return this._monthsStrictRegex;\n } else {\n return this._monthsRegex;\n }\n } else {\n if (!hasOwnProp(this, '_monthsRegex')) {\n this._monthsRegex = defaultMonthsRegex;\n }\n\n return this._monthsStrictRegex && isStrict ? this._monthsStrictRegex : this._monthsRegex;\n }\n }\n\n function computeMonthsParse() {\n function cmpLenRev(a, b) {\n return b.length - a.length;\n }\n\n var shortPieces = [],\n longPieces = [],\n mixedPieces = [],\n i,\n mom;\n\n for (i = 0; i < 12; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, i]);\n shortPieces.push(this.monthsShort(mom, ''));\n longPieces.push(this.months(mom, ''));\n mixedPieces.push(this.months(mom, ''));\n mixedPieces.push(this.monthsShort(mom, ''));\n } // Sorting makes sure if one month (or abbr) is a prefix of another it\n // will match the longer piece.\n\n\n shortPieces.sort(cmpLenRev);\n longPieces.sort(cmpLenRev);\n mixedPieces.sort(cmpLenRev);\n\n for (i = 0; i < 12; i++) {\n shortPieces[i] = regexEscape(shortPieces[i]);\n longPieces[i] = regexEscape(longPieces[i]);\n }\n\n for (i = 0; i < 24; i++) {\n mixedPieces[i] = regexEscape(mixedPieces[i]);\n }\n\n this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._monthsShortRegex = this._monthsRegex;\n this._monthsStrictRegex = new RegExp('^(' + longPieces.join('|') + ')', 'i');\n this._monthsShortStrictRegex = new RegExp('^(' + shortPieces.join('|') + ')', 'i');\n }\n\n function createDate(y, m, d, h, M, s, ms) {\n // can't just apply() to create a date:\n // https://stackoverflow.com/q/181348\n var date; // the date constructor remaps years 0-99 to 1900-1999\n\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n date = new Date(y + 400, m, d, h, M, s, ms);\n\n if (isFinite(date.getFullYear())) {\n date.setFullYear(y);\n }\n } else {\n date = new Date(y, m, d, h, M, s, ms);\n }\n\n return date;\n }\n\n function createUTCDate(y) {\n var date; // the Date.UTC function remaps years 0-99 to 1900-1999\n\n if (y < 100 && y >= 0) {\n var args = Array.prototype.slice.call(arguments); // preserve leap years using a full 400 year cycle, then reset\n\n args[0] = y + 400;\n date = new Date(Date.UTC.apply(null, args));\n\n if (isFinite(date.getUTCFullYear())) {\n date.setUTCFullYear(y);\n }\n } else {\n date = new Date(Date.UTC.apply(null, arguments));\n }\n\n return date;\n } // start-of-first-week - start-of-year\n\n\n function firstWeekOffset(year, dow, doy) {\n var // first-week day -- which january is always in the first week (4 for iso, 1 for other)\n fwd = 7 + dow - doy,\n // first-week day local weekday -- which local weekday is fwd\n fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7;\n return -fwdlw + fwd - 1;\n } // https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday\n\n\n function dayOfYearFromWeeks(year, week, weekday, dow, doy) {\n var localWeekday = (7 + weekday - dow) % 7,\n weekOffset = firstWeekOffset(year, dow, doy),\n dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset,\n resYear,\n resDayOfYear;\n\n if (dayOfYear <= 0) {\n resYear = year - 1;\n resDayOfYear = daysInYear(resYear) + dayOfYear;\n } else if (dayOfYear > daysInYear(year)) {\n resYear = year + 1;\n resDayOfYear = dayOfYear - daysInYear(year);\n } else {\n resYear = year;\n resDayOfYear = dayOfYear;\n }\n\n return {\n year: resYear,\n dayOfYear: resDayOfYear\n };\n }\n\n function weekOfYear(mom, dow, doy) {\n var weekOffset = firstWeekOffset(mom.year(), dow, doy),\n week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1,\n resWeek,\n resYear;\n\n if (week < 1) {\n resYear = mom.year() - 1;\n resWeek = week + weeksInYear(resYear, dow, doy);\n } else if (week > weeksInYear(mom.year(), dow, doy)) {\n resWeek = week - weeksInYear(mom.year(), dow, doy);\n resYear = mom.year() + 1;\n } else {\n resYear = mom.year();\n resWeek = week;\n }\n\n return {\n week: resWeek,\n year: resYear\n };\n }\n\n function weeksInYear(year, dow, doy) {\n var weekOffset = firstWeekOffset(year, dow, doy),\n weekOffsetNext = firstWeekOffset(year + 1, dow, doy);\n return (daysInYear(year) - weekOffset + weekOffsetNext) / 7;\n } // FORMATTING\n\n\n addFormatToken('w', ['ww', 2], 'wo', 'week');\n addFormatToken('W', ['WW', 2], 'Wo', 'isoWeek'); // ALIASES\n\n addUnitAlias('week', 'w');\n addUnitAlias('isoWeek', 'W'); // PRIORITIES\n\n addUnitPriority('week', 5);\n addUnitPriority('isoWeek', 5); // PARSING\n\n addRegexToken('w', match1to2);\n addRegexToken('ww', match1to2, match2);\n addRegexToken('W', match1to2);\n addRegexToken('WW', match1to2, match2);\n addWeekParseToken(['w', 'ww', 'W', 'WW'], function (input, week, config, token) {\n week[token.substr(0, 1)] = toInt(input);\n }); // HELPERS\n // LOCALES\n\n function localeWeek(mom) {\n return weekOfYear(mom, this._week.dow, this._week.doy).week;\n }\n\n var defaultLocaleWeek = {\n dow: 0,\n // Sunday is the first day of the week.\n doy: 6 // The week that contains Jan 6th is the first week of the year.\n\n };\n\n function localeFirstDayOfWeek() {\n return this._week.dow;\n }\n\n function localeFirstDayOfYear() {\n return this._week.doy;\n } // MOMENTS\n\n\n function getSetWeek(input) {\n var week = this.localeData().week(this);\n return input == null ? week : this.add((input - week) * 7, 'd');\n }\n\n function getSetISOWeek(input) {\n var week = weekOfYear(this, 1, 4).week;\n return input == null ? week : this.add((input - week) * 7, 'd');\n } // FORMATTING\n\n\n addFormatToken('d', 0, 'do', 'day');\n addFormatToken('dd', 0, 0, function (format) {\n return this.localeData().weekdaysMin(this, format);\n });\n addFormatToken('ddd', 0, 0, function (format) {\n return this.localeData().weekdaysShort(this, format);\n });\n addFormatToken('dddd', 0, 0, function (format) {\n return this.localeData().weekdays(this, format);\n });\n addFormatToken('e', 0, 0, 'weekday');\n addFormatToken('E', 0, 0, 'isoWeekday'); // ALIASES\n\n addUnitAlias('day', 'd');\n addUnitAlias('weekday', 'e');\n addUnitAlias('isoWeekday', 'E'); // PRIORITY\n\n addUnitPriority('day', 11);\n addUnitPriority('weekday', 11);\n addUnitPriority('isoWeekday', 11); // PARSING\n\n addRegexToken('d', match1to2);\n addRegexToken('e', match1to2);\n addRegexToken('E', match1to2);\n addRegexToken('dd', function (isStrict, locale) {\n return locale.weekdaysMinRegex(isStrict);\n });\n addRegexToken('ddd', function (isStrict, locale) {\n return locale.weekdaysShortRegex(isStrict);\n });\n addRegexToken('dddd', function (isStrict, locale) {\n return locale.weekdaysRegex(isStrict);\n });\n addWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) {\n var weekday = config._locale.weekdaysParse(input, token, config._strict); // if we didn't get a weekday name, mark the date as invalid\n\n\n if (weekday != null) {\n week.d = weekday;\n } else {\n getParsingFlags(config).invalidWeekday = input;\n }\n });\n addWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) {\n week[token] = toInt(input);\n }); // HELPERS\n\n function parseWeekday(input, locale) {\n if (typeof input !== 'string') {\n return input;\n }\n\n if (!isNaN(input)) {\n return parseInt(input, 10);\n }\n\n input = locale.weekdaysParse(input);\n\n if (typeof input === 'number') {\n return input;\n }\n\n return null;\n }\n\n function parseIsoWeekday(input, locale) {\n if (typeof input === 'string') {\n return locale.weekdaysParse(input) % 7 || 7;\n }\n\n return isNaN(input) ? null : input;\n } // LOCALES\n\n\n function shiftWeekdays(ws, n) {\n return ws.slice(n, 7).concat(ws.slice(0, n));\n }\n\n var defaultLocaleWeekdays = 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_');\n\n function localeWeekdays(m, format) {\n var weekdays = isArray(this._weekdays) ? this._weekdays : this._weekdays[m && m !== true && this._weekdays.isFormat.test(format) ? 'format' : 'standalone'];\n return m === true ? shiftWeekdays(weekdays, this._week.dow) : m ? weekdays[m.day()] : weekdays;\n }\n\n var defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_');\n\n function localeWeekdaysShort(m) {\n return m === true ? shiftWeekdays(this._weekdaysShort, this._week.dow) : m ? this._weekdaysShort[m.day()] : this._weekdaysShort;\n }\n\n var defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_');\n\n function localeWeekdaysMin(m) {\n return m === true ? shiftWeekdays(this._weekdaysMin, this._week.dow) : m ? this._weekdaysMin[m.day()] : this._weekdaysMin;\n }\n\n function handleStrictParse$1(weekdayName, format, strict) {\n var i,\n ii,\n mom,\n llc = weekdayName.toLocaleLowerCase();\n\n if (!this._weekdaysParse) {\n this._weekdaysParse = [];\n this._shortWeekdaysParse = [];\n this._minWeekdaysParse = [];\n\n for (i = 0; i < 7; ++i) {\n mom = createUTC([2000, 1]).day(i);\n this._minWeekdaysParse[i] = this.weekdaysMin(mom, '').toLocaleLowerCase();\n this._shortWeekdaysParse[i] = this.weekdaysShort(mom, '').toLocaleLowerCase();\n this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase();\n }\n }\n\n if (strict) {\n if (format === 'dddd') {\n ii = indexOf.call(this._weekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else if (format === 'ddd') {\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n }\n } else {\n if (format === 'dddd') {\n ii = indexOf.call(this._weekdaysParse, llc);\n\n if (ii !== -1) {\n return ii;\n }\n\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n\n if (ii !== -1) {\n return ii;\n }\n\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else if (format === 'ddd') {\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n\n if (ii !== -1) {\n return ii;\n }\n\n ii = indexOf.call(this._weekdaysParse, llc);\n\n if (ii !== -1) {\n return ii;\n }\n\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._minWeekdaysParse, llc);\n\n if (ii !== -1) {\n return ii;\n }\n\n ii = indexOf.call(this._weekdaysParse, llc);\n\n if (ii !== -1) {\n return ii;\n }\n\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n }\n }\n }\n\n function localeWeekdaysParse(weekdayName, format, strict) {\n var i, mom, regex;\n\n if (this._weekdaysParseExact) {\n return handleStrictParse$1.call(this, weekdayName, format, strict);\n }\n\n if (!this._weekdaysParse) {\n this._weekdaysParse = [];\n this._minWeekdaysParse = [];\n this._shortWeekdaysParse = [];\n this._fullWeekdaysParse = [];\n }\n\n for (i = 0; i < 7; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, 1]).day(i);\n\n if (strict && !this._fullWeekdaysParse[i]) {\n this._fullWeekdaysParse[i] = new RegExp('^' + this.weekdays(mom, '').replace('.', '\\\\.?') + '$', 'i');\n this._shortWeekdaysParse[i] = new RegExp('^' + this.weekdaysShort(mom, '').replace('.', '\\\\.?') + '$', 'i');\n this._minWeekdaysParse[i] = new RegExp('^' + this.weekdaysMin(mom, '').replace('.', '\\\\.?') + '$', 'i');\n }\n\n if (!this._weekdaysParse[i]) {\n regex = '^' + this.weekdays(mom, '') + '|^' + this.weekdaysShort(mom, '') + '|^' + this.weekdaysMin(mom, '');\n this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i');\n } // test the regex\n\n\n if (strict && format === 'dddd' && this._fullWeekdaysParse[i].test(weekdayName)) {\n return i;\n } else if (strict && format === 'ddd' && this._shortWeekdaysParse[i].test(weekdayName)) {\n return i;\n } else if (strict && format === 'dd' && this._minWeekdaysParse[i].test(weekdayName)) {\n return i;\n } else if (!strict && this._weekdaysParse[i].test(weekdayName)) {\n return i;\n }\n }\n } // MOMENTS\n\n\n function getSetDayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n\n var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay();\n\n if (input != null) {\n input = parseWeekday(input, this.localeData());\n return this.add(input - day, 'd');\n } else {\n return day;\n }\n }\n\n function getSetLocaleDayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n\n var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7;\n return input == null ? weekday : this.add(input - weekday, 'd');\n }\n\n function getSetISODayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n } // behaves the same as moment#day except\n // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)\n // as a setter, sunday should belong to the previous week.\n\n\n if (input != null) {\n var weekday = parseIsoWeekday(input, this.localeData());\n return this.day(this.day() % 7 ? weekday : weekday - 7);\n } else {\n return this.day() || 7;\n }\n }\n\n var defaultWeekdaysRegex = matchWord;\n\n function weekdaysRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n\n if (isStrict) {\n return this._weekdaysStrictRegex;\n } else {\n return this._weekdaysRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n this._weekdaysRegex = defaultWeekdaysRegex;\n }\n\n return this._weekdaysStrictRegex && isStrict ? this._weekdaysStrictRegex : this._weekdaysRegex;\n }\n }\n\n var defaultWeekdaysShortRegex = matchWord;\n\n function weekdaysShortRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n\n if (isStrict) {\n return this._weekdaysShortStrictRegex;\n } else {\n return this._weekdaysShortRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysShortRegex')) {\n this._weekdaysShortRegex = defaultWeekdaysShortRegex;\n }\n\n return this._weekdaysShortStrictRegex && isStrict ? this._weekdaysShortStrictRegex : this._weekdaysShortRegex;\n }\n }\n\n var defaultWeekdaysMinRegex = matchWord;\n\n function weekdaysMinRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n\n if (isStrict) {\n return this._weekdaysMinStrictRegex;\n } else {\n return this._weekdaysMinRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysMinRegex')) {\n this._weekdaysMinRegex = defaultWeekdaysMinRegex;\n }\n\n return this._weekdaysMinStrictRegex && isStrict ? this._weekdaysMinStrictRegex : this._weekdaysMinRegex;\n }\n }\n\n function computeWeekdaysParse() {\n function cmpLenRev(a, b) {\n return b.length - a.length;\n }\n\n var minPieces = [],\n shortPieces = [],\n longPieces = [],\n mixedPieces = [],\n i,\n mom,\n minp,\n shortp,\n longp;\n\n for (i = 0; i < 7; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, 1]).day(i);\n minp = this.weekdaysMin(mom, '');\n shortp = this.weekdaysShort(mom, '');\n longp = this.weekdays(mom, '');\n minPieces.push(minp);\n shortPieces.push(shortp);\n longPieces.push(longp);\n mixedPieces.push(minp);\n mixedPieces.push(shortp);\n mixedPieces.push(longp);\n } // Sorting makes sure if one weekday (or abbr) is a prefix of another it\n // will match the longer piece.\n\n\n minPieces.sort(cmpLenRev);\n shortPieces.sort(cmpLenRev);\n longPieces.sort(cmpLenRev);\n mixedPieces.sort(cmpLenRev);\n\n for (i = 0; i < 7; i++) {\n shortPieces[i] = regexEscape(shortPieces[i]);\n longPieces[i] = regexEscape(longPieces[i]);\n mixedPieces[i] = regexEscape(mixedPieces[i]);\n }\n\n this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._weekdaysShortRegex = this._weekdaysRegex;\n this._weekdaysMinRegex = this._weekdaysRegex;\n this._weekdaysStrictRegex = new RegExp('^(' + longPieces.join('|') + ')', 'i');\n this._weekdaysShortStrictRegex = new RegExp('^(' + shortPieces.join('|') + ')', 'i');\n this._weekdaysMinStrictRegex = new RegExp('^(' + minPieces.join('|') + ')', 'i');\n } // FORMATTING\n\n\n function hFormat() {\n return this.hours() % 12 || 12;\n }\n\n function kFormat() {\n return this.hours() || 24;\n }\n\n addFormatToken('H', ['HH', 2], 0, 'hour');\n addFormatToken('h', ['hh', 2], 0, hFormat);\n addFormatToken('k', ['kk', 2], 0, kFormat);\n addFormatToken('hmm', 0, 0, function () {\n return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2);\n });\n addFormatToken('hmmss', 0, 0, function () {\n return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2) + zeroFill(this.seconds(), 2);\n });\n addFormatToken('Hmm', 0, 0, function () {\n return '' + this.hours() + zeroFill(this.minutes(), 2);\n });\n addFormatToken('Hmmss', 0, 0, function () {\n return '' + this.hours() + zeroFill(this.minutes(), 2) + zeroFill(this.seconds(), 2);\n });\n\n function meridiem(token, lowercase) {\n addFormatToken(token, 0, 0, function () {\n return this.localeData().meridiem(this.hours(), this.minutes(), lowercase);\n });\n }\n\n meridiem('a', true);\n meridiem('A', false); // ALIASES\n\n addUnitAlias('hour', 'h'); // PRIORITY\n\n addUnitPriority('hour', 13); // PARSING\n\n function matchMeridiem(isStrict, locale) {\n return locale._meridiemParse;\n }\n\n addRegexToken('a', matchMeridiem);\n addRegexToken('A', matchMeridiem);\n addRegexToken('H', match1to2);\n addRegexToken('h', match1to2);\n addRegexToken('k', match1to2);\n addRegexToken('HH', match1to2, match2);\n addRegexToken('hh', match1to2, match2);\n addRegexToken('kk', match1to2, match2);\n addRegexToken('hmm', match3to4);\n addRegexToken('hmmss', match5to6);\n addRegexToken('Hmm', match3to4);\n addRegexToken('Hmmss', match5to6);\n addParseToken(['H', 'HH'], HOUR);\n addParseToken(['k', 'kk'], function (input, array, config) {\n var kInput = toInt(input);\n array[HOUR] = kInput === 24 ? 0 : kInput;\n });\n addParseToken(['a', 'A'], function (input, array, config) {\n config._isPm = config._locale.isPM(input);\n config._meridiem = input;\n });\n addParseToken(['h', 'hh'], function (input, array, config) {\n array[HOUR] = toInt(input);\n getParsingFlags(config).bigHour = true;\n });\n addParseToken('hmm', function (input, array, config) {\n var pos = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos));\n array[MINUTE] = toInt(input.substr(pos));\n getParsingFlags(config).bigHour = true;\n });\n addParseToken('hmmss', function (input, array, config) {\n var pos1 = input.length - 4;\n var pos2 = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos1));\n array[MINUTE] = toInt(input.substr(pos1, 2));\n array[SECOND] = toInt(input.substr(pos2));\n getParsingFlags(config).bigHour = true;\n });\n addParseToken('Hmm', function (input, array, config) {\n var pos = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos));\n array[MINUTE] = toInt(input.substr(pos));\n });\n addParseToken('Hmmss', function (input, array, config) {\n var pos1 = input.length - 4;\n var pos2 = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos1));\n array[MINUTE] = toInt(input.substr(pos1, 2));\n array[SECOND] = toInt(input.substr(pos2));\n }); // LOCALES\n\n function localeIsPM(input) {\n // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays\n // Using charAt should be more compatible.\n return (input + '').toLowerCase().charAt(0) === 'p';\n }\n\n var defaultLocaleMeridiemParse = /[ap]\\.?m?\\.?/i;\n\n function localeMeridiem(hours, minutes, isLower) {\n if (hours > 11) {\n return isLower ? 'pm' : 'PM';\n } else {\n return isLower ? 'am' : 'AM';\n }\n } // MOMENTS\n // Setting the hour should keep the time, because the user explicitly\n // specified which hour they want. So trying to maintain the same hour (in\n // a new timezone) makes sense. Adding/subtracting hours does not follow\n // this rule.\n\n\n var getSetHour = makeGetSet('Hours', true);\n var baseConfig = {\n calendar: defaultCalendar,\n longDateFormat: defaultLongDateFormat,\n invalidDate: defaultInvalidDate,\n ordinal: defaultOrdinal,\n dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse,\n relativeTime: defaultRelativeTime,\n months: defaultLocaleMonths,\n monthsShort: defaultLocaleMonthsShort,\n week: defaultLocaleWeek,\n weekdays: defaultLocaleWeekdays,\n weekdaysMin: defaultLocaleWeekdaysMin,\n weekdaysShort: defaultLocaleWeekdaysShort,\n meridiemParse: defaultLocaleMeridiemParse\n }; // internal storage for locale config files\n\n var locales = {};\n var localeFamilies = {};\n var globalLocale;\n\n function normalizeLocale(key) {\n return key ? key.toLowerCase().replace('_', '-') : key;\n } // pick the locale from the array\n // try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each\n // substring from most specific to least, but move to the next array item if it's a more specific variant than the current root\n\n\n function chooseLocale(names) {\n var i = 0,\n j,\n next,\n locale,\n split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n\n if (locale) {\n return locale;\n }\n\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n\n j--;\n }\n\n i++;\n }\n\n return globalLocale;\n }\n\n function loadLocale(name) {\n var oldLocale = null; // TODO: Find a better way to register and load all the locales in Node\n\n if (!locales[name] && 'object' !== 'undefined' && module && module.exports) {\n try {\n oldLocale = globalLocale._abbr;\n var aliasedRequire = commonjsRequire;\n aliasedRequire('./locale/' + name);\n getSetGlobalLocale(oldLocale);\n } catch (e) {}\n }\n\n return locales[name];\n } // This function will load locale and then set the global locale. If\n // no arguments are passed in, it will simply return the current global\n // locale key.\n\n\n function getSetGlobalLocale(key, values) {\n var data;\n\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n } else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n } else {\n if (typeof console !== 'undefined' && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n }\n\n function defineLocale(name, config) {\n if (config !== null) {\n var locale,\n parentConfig = baseConfig;\n config.abbr = name;\n\n if (locales[name] != null) {\n deprecateSimple('defineLocaleOverride', 'use moment.updateLocale(localeName, config) to change ' + 'an existing locale. moment.defineLocale(localeName, ' + 'config) should only be used for creating a new locale ' + 'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.');\n parentConfig = locales[name]._config;\n } else if (config.parentLocale != null) {\n if (locales[config.parentLocale] != null) {\n parentConfig = locales[config.parentLocale]._config;\n } else {\n locale = loadLocale(config.parentLocale);\n\n if (locale != null) {\n parentConfig = locale._config;\n } else {\n if (!localeFamilies[config.parentLocale]) {\n localeFamilies[config.parentLocale] = [];\n }\n\n localeFamilies[config.parentLocale].push({\n name: name,\n config: config\n });\n return null;\n }\n }\n }\n\n locales[name] = new Locale(mergeConfigs(parentConfig, config));\n\n if (localeFamilies[name]) {\n localeFamilies[name].forEach(function (x) {\n defineLocale(x.name, x.config);\n });\n } // backwards compat for now: also set the locale\n // make sure we set the locale AFTER all child locales have been\n // created, so we won't end up with the child locale set.\n\n\n getSetGlobalLocale(name);\n return locales[name];\n } else {\n // useful for testing\n delete locales[name];\n return null;\n }\n }\n\n function updateLocale(name, config) {\n if (config != null) {\n var locale,\n tmpLocale,\n parentConfig = baseConfig; // MERGE\n\n tmpLocale = loadLocale(name);\n\n if (tmpLocale != null) {\n parentConfig = tmpLocale._config;\n }\n\n config = mergeConfigs(parentConfig, config);\n locale = new Locale(config);\n locale.parentLocale = locales[name];\n locales[name] = locale; // backwards compat for now: also set the locale\n\n getSetGlobalLocale(name);\n } else {\n // pass null for config to unupdate, useful for tests\n if (locales[name] != null) {\n if (locales[name].parentLocale != null) {\n locales[name] = locales[name].parentLocale;\n } else if (locales[name] != null) {\n delete locales[name];\n }\n }\n }\n\n return locales[name];\n } // returns locale data\n\n\n function getLocale(key) {\n var locale;\n\n if (key && key._locale && key._locale._abbr) {\n key = key._locale._abbr;\n }\n\n if (!key) {\n return globalLocale;\n }\n\n if (!isArray(key)) {\n //short-circuit everything else\n locale = loadLocale(key);\n\n if (locale) {\n return locale;\n }\n\n key = [key];\n }\n\n return chooseLocale(key);\n }\n\n function listLocales() {\n return keys(locales);\n }\n\n function checkOverflow(m) {\n var overflow;\n var a = m._a;\n\n if (a && getParsingFlags(m).overflow === -2) {\n overflow = a[MONTH] < 0 || a[MONTH] > 11 ? MONTH : a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH]) ? DATE : a[HOUR] < 0 || a[HOUR] > 24 || a[HOUR] === 24 && (a[MINUTE] !== 0 || a[SECOND] !== 0 || a[MILLISECOND] !== 0) ? HOUR : a[MINUTE] < 0 || a[MINUTE] > 59 ? MINUTE : a[SECOND] < 0 || a[SECOND] > 59 ? SECOND : a[MILLISECOND] < 0 || a[MILLISECOND] > 999 ? MILLISECOND : -1;\n\n if (getParsingFlags(m)._overflowDayOfYear && (overflow < YEAR || overflow > DATE)) {\n overflow = DATE;\n }\n\n if (getParsingFlags(m)._overflowWeeks && overflow === -1) {\n overflow = WEEK;\n }\n\n if (getParsingFlags(m)._overflowWeekday && overflow === -1) {\n overflow = WEEKDAY;\n }\n\n getParsingFlags(m).overflow = overflow;\n }\n\n return m;\n } // Pick the first defined of two or three arguments.\n\n\n function defaults(a, b, c) {\n if (a != null) {\n return a;\n }\n\n if (b != null) {\n return b;\n }\n\n return c;\n }\n\n function currentDateArray(config) {\n // hooks is actually the exported moment object\n var nowValue = new Date(hooks.now());\n\n if (config._useUTC) {\n return [nowValue.getUTCFullYear(), nowValue.getUTCMonth(), nowValue.getUTCDate()];\n }\n\n return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()];\n } // convert an array to a date.\n // the array should mirror the parameters below\n // note: all values past the year are optional and will default to the lowest possible value.\n // [year, month, day , hour, minute, second, millisecond]\n\n\n function configFromArray(config) {\n var i,\n date,\n input = [],\n currentDate,\n expectedWeekday,\n yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config); //compute day of the year from weeks and weekdays\n\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n } //if the day of the year is set, figure out what it is\n\n\n if (config._dayOfYear != null) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse) || config._dayOfYear === 0) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n } // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n\n\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n } // Zero out whatever was not defaulted, including time\n\n\n for (; i < 7; i++) {\n config._a[i] = input[i] = config._a[i] == null ? i === 2 ? 1 : 0 : config._a[i];\n } // Check for 24:00:00.000\n\n\n if (config._a[HOUR] === 24 && config._a[MINUTE] === 0 && config._a[SECOND] === 0 && config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n expectedWeekday = config._useUTC ? config._d.getUTCDay() : config._d.getDay(); // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n } // check for mismatching day of week\n\n\n if (config._w && typeof config._w.d !== 'undefined' && config._w.d !== expectedWeekday) {\n getParsingFlags(config).weekdayMismatch = true;\n }\n }\n\n function dayOfYearFromWeekInfo(config) {\n var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow;\n w = config._w;\n\n if (w.GG != null || w.W != null || w.E != null) {\n dow = 1;\n doy = 4; // TODO: We need to take the current isoWeekYear, but that depends on\n // how we interpret now (local, utc, fixed offset). So create\n // a now version of current config (take local/utc/offset flags, and\n // create now).\n\n weekYear = defaults(w.GG, config._a[YEAR], weekOfYear(createLocal(), 1, 4).year);\n week = defaults(w.W, 1);\n weekday = defaults(w.E, 1);\n\n if (weekday < 1 || weekday > 7) {\n weekdayOverflow = true;\n }\n } else {\n dow = config._locale._week.dow;\n doy = config._locale._week.doy;\n var curWeek = weekOfYear(createLocal(), dow, doy);\n weekYear = defaults(w.gg, config._a[YEAR], curWeek.year); // Default to current week.\n\n week = defaults(w.w, curWeek.week);\n\n if (w.d != null) {\n // weekday -- low day numbers are considered next week\n weekday = w.d;\n\n if (weekday < 0 || weekday > 6) {\n weekdayOverflow = true;\n }\n } else if (w.e != null) {\n // local weekday -- counting starts from beginning of week\n weekday = w.e + dow;\n\n if (w.e < 0 || w.e > 6) {\n weekdayOverflow = true;\n }\n } else {\n // default to beginning of week\n weekday = dow;\n }\n }\n\n if (week < 1 || week > weeksInYear(weekYear, dow, doy)) {\n getParsingFlags(config)._overflowWeeks = true;\n } else if (weekdayOverflow != null) {\n getParsingFlags(config)._overflowWeekday = true;\n } else {\n temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy);\n config._a[YEAR] = temp.year;\n config._dayOfYear = temp.dayOfYear;\n }\n } // iso 8601 regex\n // 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00)\n\n\n var extendedIsoRegex = /^\\s*((?:[+-]\\d{6}|\\d{4})-(?:\\d\\d-\\d\\d|W\\d\\d-\\d|W\\d\\d|\\d\\d\\d|\\d\\d))(?:(T| )(\\d\\d(?::\\d\\d(?::\\d\\d(?:[.,]\\d+)?)?)?)([\\+\\-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/;\n var basicIsoRegex = /^\\s*((?:[+-]\\d{6}|\\d{4})(?:\\d\\d\\d\\d|W\\d\\d\\d|W\\d\\d|\\d\\d\\d|\\d\\d))(?:(T| )(\\d\\d(?:\\d\\d(?:\\d\\d(?:[.,]\\d+)?)?)?)([\\+\\-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/;\n var tzRegex = /Z|[+-]\\d\\d(?::?\\d\\d)?/;\n var isoDates = [['YYYYYY-MM-DD', /[+-]\\d{6}-\\d\\d-\\d\\d/], ['YYYY-MM-DD', /\\d{4}-\\d\\d-\\d\\d/], ['GGGG-[W]WW-E', /\\d{4}-W\\d\\d-\\d/], ['GGGG-[W]WW', /\\d{4}-W\\d\\d/, false], ['YYYY-DDD', /\\d{4}-\\d{3}/], ['YYYY-MM', /\\d{4}-\\d\\d/, false], ['YYYYYYMMDD', /[+-]\\d{10}/], ['YYYYMMDD', /\\d{8}/], // YYYYMM is NOT allowed by the standard\n ['GGGG[W]WWE', /\\d{4}W\\d{3}/], ['GGGG[W]WW', /\\d{4}W\\d{2}/, false], ['YYYYDDD', /\\d{7}/]]; // iso time formats and regexes\n\n var isoTimes = [['HH:mm:ss.SSSS', /\\d\\d:\\d\\d:\\d\\d\\.\\d+/], ['HH:mm:ss,SSSS', /\\d\\d:\\d\\d:\\d\\d,\\d+/], ['HH:mm:ss', /\\d\\d:\\d\\d:\\d\\d/], ['HH:mm', /\\d\\d:\\d\\d/], ['HHmmss.SSSS', /\\d\\d\\d\\d\\d\\d\\.\\d+/], ['HHmmss,SSSS', /\\d\\d\\d\\d\\d\\d,\\d+/], ['HHmmss', /\\d\\d\\d\\d\\d\\d/], ['HHmm', /\\d\\d\\d\\d/], ['HH', /\\d\\d/]];\n var aspNetJsonRegex = /^\\/?Date\\((\\-?\\d+)/i; // date from iso format\n\n function configFromISO(config) {\n var i,\n l,\n string = config._i,\n match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string),\n allowTime,\n dateFormat,\n timeFormat,\n tzFormat;\n\n if (match) {\n getParsingFlags(config).iso = true;\n\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(match[1])) {\n dateFormat = isoDates[i][0];\n allowTime = isoDates[i][2] !== false;\n break;\n }\n }\n\n if (dateFormat == null) {\n config._isValid = false;\n return;\n }\n\n if (match[3]) {\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(match[3])) {\n // match[2] should be 'T' or space\n timeFormat = (match[2] || ' ') + isoTimes[i][0];\n break;\n }\n }\n\n if (timeFormat == null) {\n config._isValid = false;\n return;\n }\n }\n\n if (!allowTime && timeFormat != null) {\n config._isValid = false;\n return;\n }\n\n if (match[4]) {\n if (tzRegex.exec(match[4])) {\n tzFormat = 'Z';\n } else {\n config._isValid = false;\n return;\n }\n }\n\n config._f = dateFormat + (timeFormat || '') + (tzFormat || '');\n configFromStringAndFormat(config);\n } else {\n config._isValid = false;\n }\n } // RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3\n\n\n var rfc2822 = /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\\s)?(\\d{1,2})\\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\\s(\\d{2,4})\\s(\\d\\d):(\\d\\d)(?::(\\d\\d))?\\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\\d{4}))$/;\n\n function extractFromRFC2822Strings(yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr) {\n var result = [untruncateYear(yearStr), defaultLocaleMonthsShort.indexOf(monthStr), parseInt(dayStr, 10), parseInt(hourStr, 10), parseInt(minuteStr, 10)];\n\n if (secondStr) {\n result.push(parseInt(secondStr, 10));\n }\n\n return result;\n }\n\n function untruncateYear(yearStr) {\n var year = parseInt(yearStr, 10);\n\n if (year <= 49) {\n return 2000 + year;\n } else if (year <= 999) {\n return 1900 + year;\n }\n\n return year;\n }\n\n function preprocessRFC2822(s) {\n // Remove comments and folding whitespace and replace multiple-spaces with a single space\n return s.replace(/\\([^)]*\\)|[\\n\\t]/g, ' ').replace(/(\\s\\s+)/g, ' ').replace(/^\\s\\s*/, '').replace(/\\s\\s*$/, '');\n }\n\n function checkWeekday(weekdayStr, parsedInput, config) {\n if (weekdayStr) {\n // TODO: Replace the vanilla JS Date object with an indepentent day-of-week check.\n var weekdayProvided = defaultLocaleWeekdaysShort.indexOf(weekdayStr),\n weekdayActual = new Date(parsedInput[0], parsedInput[1], parsedInput[2]).getDay();\n\n if (weekdayProvided !== weekdayActual) {\n getParsingFlags(config).weekdayMismatch = true;\n config._isValid = false;\n return false;\n }\n }\n\n return true;\n }\n\n var obsOffsets = {\n UT: 0,\n GMT: 0,\n EDT: -4 * 60,\n EST: -5 * 60,\n CDT: -5 * 60,\n CST: -6 * 60,\n MDT: -6 * 60,\n MST: -7 * 60,\n PDT: -7 * 60,\n PST: -8 * 60\n };\n\n function calculateOffset(obsOffset, militaryOffset, numOffset) {\n if (obsOffset) {\n return obsOffsets[obsOffset];\n } else if (militaryOffset) {\n // the only allowed military tz is Z\n return 0;\n } else {\n var hm = parseInt(numOffset, 10);\n var m = hm % 100,\n h = (hm - m) / 100;\n return h * 60 + m;\n }\n } // date and time from ref 2822 format\n\n\n function configFromRFC2822(config) {\n var match = rfc2822.exec(preprocessRFC2822(config._i));\n\n if (match) {\n var parsedArray = extractFromRFC2822Strings(match[4], match[3], match[2], match[5], match[6], match[7]);\n\n if (!checkWeekday(match[1], parsedArray, config)) {\n return;\n }\n\n config._a = parsedArray;\n config._tzm = calculateOffset(match[8], match[9], match[10]);\n config._d = createUTCDate.apply(null, config._a);\n\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n\n getParsingFlags(config).rfc2822 = true;\n } else {\n config._isValid = false;\n }\n } // date from iso format or fallback\n\n\n function configFromString(config) {\n var matched = aspNetJsonRegex.exec(config._i);\n\n if (matched !== null) {\n config._d = new Date(+matched[1]);\n return;\n }\n\n configFromISO(config);\n\n if (config._isValid === false) {\n delete config._isValid;\n } else {\n return;\n }\n\n configFromRFC2822(config);\n\n if (config._isValid === false) {\n delete config._isValid;\n } else {\n return;\n } // Final attempt, use Input Fallback\n\n\n hooks.createFromInputFallback(config);\n }\n\n hooks.createFromInputFallback = deprecate('value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), ' + 'which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are ' + 'discouraged and will be removed in an upcoming major release. Please refer to ' + 'http://momentjs.com/guides/#/warnings/js-date/ for more info.', function (config) {\n config._d = new Date(config._i + (config._useUTC ? ' UTC' : ''));\n }); // constant that refers to the ISO standard\n\n hooks.ISO_8601 = function () {}; // constant that refers to the RFC 2822 form\n\n\n hooks.RFC_2822 = function () {}; // date from string and format string\n\n\n function configFromStringAndFormat(config) {\n // TODO: Move this to another part of the creation flow to prevent circular deps\n if (config._f === hooks.ISO_8601) {\n configFromISO(config);\n return;\n }\n\n if (config._f === hooks.RFC_2822) {\n configFromRFC2822(config);\n return;\n }\n\n config._a = [];\n getParsingFlags(config).empty = true; // This array is used to make a Date, either with `new Date` or `Date.UTC`\n\n var string = '' + config._i,\n i,\n parsedInput,\n tokens,\n token,\n skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0]; // console.log('token', token, 'parsedInput', parsedInput,\n // 'regex', getParseRegexForToken(token, config));\n\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n\n if (skipped.length > 0) {\n getParsingFlags(config).unusedInput.push(skipped);\n }\n\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n } // don't parse if it's not a known token\n\n\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n getParsingFlags(config).empty = false;\n } else {\n getParsingFlags(config).unusedTokens.push(token);\n }\n\n addTimeToArrayFromToken(token, parsedInput, config);\n } else if (config._strict && !parsedInput) {\n getParsingFlags(config).unusedTokens.push(token);\n }\n } // add remaining unparsed input length to the string\n\n\n getParsingFlags(config).charsLeftOver = stringLength - totalParsedInputLength;\n\n if (string.length > 0) {\n getParsingFlags(config).unusedInput.push(string);\n } // clear _12h flag if hour is <= 12\n\n\n if (config._a[HOUR] <= 12 && getParsingFlags(config).bigHour === true && config._a[HOUR] > 0) {\n getParsingFlags(config).bigHour = undefined;\n }\n\n getParsingFlags(config).parsedDateParts = config._a.slice(0);\n getParsingFlags(config).meridiem = config._meridiem; // handle meridiem\n\n config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR], config._meridiem);\n configFromArray(config);\n checkOverflow(config);\n }\n\n function meridiemFixWrap(locale, hour, meridiem) {\n var isPm;\n\n if (meridiem == null) {\n // nothing to do\n return hour;\n }\n\n if (locale.meridiemHour != null) {\n return locale.meridiemHour(hour, meridiem);\n } else if (locale.isPM != null) {\n // Fallback\n isPm = locale.isPM(meridiem);\n\n if (isPm && hour < 12) {\n hour += 12;\n }\n\n if (!isPm && hour === 12) {\n hour = 0;\n }\n\n return hour;\n } else {\n // this is not supposed to happen\n return hour;\n }\n } // date from string and array of format strings\n\n\n function configFromStringAndArray(config) {\n var tempConfig, bestMoment, scoreToBeat, i, currentScore;\n\n if (config._f.length === 0) {\n getParsingFlags(config).invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < config._f.length; i++) {\n currentScore = 0;\n tempConfig = copyConfig({}, config);\n\n if (config._useUTC != null) {\n tempConfig._useUTC = config._useUTC;\n }\n\n tempConfig._f = config._f[i];\n configFromStringAndFormat(tempConfig);\n\n if (!isValid(tempConfig)) {\n continue;\n } // if there is any input that was not parsed add a penalty for that format\n\n\n currentScore += getParsingFlags(tempConfig).charsLeftOver; //or tokens\n\n currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10;\n getParsingFlags(tempConfig).score = currentScore;\n\n if (scoreToBeat == null || currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n\n extend(config, bestMoment || tempConfig);\n }\n\n function configFromObject(config) {\n if (config._d) {\n return;\n }\n\n var i = normalizeObjectUnits(config._i);\n config._a = map([i.year, i.month, i.day || i.date, i.hour, i.minute, i.second, i.millisecond], function (obj) {\n return obj && parseInt(obj, 10);\n });\n configFromArray(config);\n }\n\n function createFromConfig(config) {\n var res = new Moment(checkOverflow(prepareConfig(config)));\n\n if (res._nextDay) {\n // Adding is smart enough around DST\n res.add(1, 'd');\n res._nextDay = undefined;\n }\n\n return res;\n }\n\n function prepareConfig(config) {\n var input = config._i,\n format = config._f;\n config._locale = config._locale || getLocale(config._l);\n\n if (input === null || format === undefined && input === '') {\n return createInvalid({\n nullInput: true\n });\n }\n\n if (typeof input === 'string') {\n config._i = input = config._locale.preparse(input);\n }\n\n if (isMoment(input)) {\n return new Moment(checkOverflow(input));\n } else if (isDate(input)) {\n config._d = input;\n } else if (isArray(format)) {\n configFromStringAndArray(config);\n } else if (format) {\n configFromStringAndFormat(config);\n } else {\n configFromInput(config);\n }\n\n if (!isValid(config)) {\n config._d = null;\n }\n\n return config;\n }\n\n function configFromInput(config) {\n var input = config._i;\n\n if (isUndefined(input)) {\n config._d = new Date(hooks.now());\n } else if (isDate(input)) {\n config._d = new Date(input.valueOf());\n } else if (typeof input === 'string') {\n configFromString(config);\n } else if (isArray(input)) {\n config._a = map(input.slice(0), function (obj) {\n return parseInt(obj, 10);\n });\n configFromArray(config);\n } else if (isObject(input)) {\n configFromObject(config);\n } else if (isNumber(input)) {\n // from milliseconds\n config._d = new Date(input);\n } else {\n hooks.createFromInputFallback(config);\n }\n }\n\n function createLocalOrUTC(input, format, locale, strict, isUTC) {\n var c = {};\n\n if (locale === true || locale === false) {\n strict = locale;\n locale = undefined;\n }\n\n if (isObject(input) && isObjectEmpty(input) || isArray(input) && input.length === 0) {\n input = undefined;\n } // object construction must be done this way.\n // https://github.com/moment/moment/issues/1423\n\n\n c._isAMomentObject = true;\n c._useUTC = c._isUTC = isUTC;\n c._l = locale;\n c._i = input;\n c._f = format;\n c._strict = strict;\n return createFromConfig(c);\n }\n\n function createLocal(input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, false);\n }\n\n var prototypeMin = deprecate('moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/', function () {\n var other = createLocal.apply(null, arguments);\n\n if (this.isValid() && other.isValid()) {\n return other < this ? this : other;\n } else {\n return createInvalid();\n }\n });\n var prototypeMax = deprecate('moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/', function () {\n var other = createLocal.apply(null, arguments);\n\n if (this.isValid() && other.isValid()) {\n return other > this ? this : other;\n } else {\n return createInvalid();\n }\n }); // Pick a moment m from moments so that m[fn](other) is true for all\n // other. This relies on the function fn to be transitive.\n //\n // moments should either be an array of moment objects or an array, whose\n // first element is an array of moment objects.\n\n function pickBy(fn, moments) {\n var res, i;\n\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n\n if (!moments.length) {\n return createLocal();\n }\n\n res = moments[0];\n\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n\n return res;\n } // TODO: Use [].sort instead?\n\n\n function min() {\n var args = [].slice.call(arguments, 0);\n return pickBy('isBefore', args);\n }\n\n function max() {\n var args = [].slice.call(arguments, 0);\n return pickBy('isAfter', args);\n }\n\n var now = function () {\n return Date.now ? Date.now() : +new Date();\n };\n\n var ordering = ['year', 'quarter', 'month', 'week', 'day', 'hour', 'minute', 'second', 'millisecond'];\n\n function isDurationValid(m) {\n for (var key in m) {\n if (!(indexOf.call(ordering, key) !== -1 && (m[key] == null || !isNaN(m[key])))) {\n return false;\n }\n }\n\n var unitHasDecimal = false;\n\n for (var i = 0; i < ordering.length; ++i) {\n if (m[ordering[i]]) {\n if (unitHasDecimal) {\n return false; // only allow non-integers for smallest unit\n }\n\n if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) {\n unitHasDecimal = true;\n }\n }\n }\n\n return true;\n }\n\n function isValid$1() {\n return this._isValid;\n }\n\n function createInvalid$1() {\n return createDuration(NaN);\n }\n\n function Duration(duration) {\n var normalizedInput = normalizeObjectUnits(duration),\n years = normalizedInput.year || 0,\n quarters = normalizedInput.quarter || 0,\n months = normalizedInput.month || 0,\n weeks = normalizedInput.week || normalizedInput.isoWeek || 0,\n days = normalizedInput.day || 0,\n hours = normalizedInput.hour || 0,\n minutes = normalizedInput.minute || 0,\n seconds = normalizedInput.second || 0,\n milliseconds = normalizedInput.millisecond || 0;\n this._isValid = isDurationValid(normalizedInput); // representation for dateAddRemove\n\n this._milliseconds = +milliseconds + seconds * 1e3 + // 1000\n minutes * 6e4 + // 1000 * 60\n hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978\n // Because of dateAddRemove treats 24 hours as different from a\n // day when working around DST, we need to store them separately\n\n this._days = +days + weeks * 7; // It is impossible to translate months into days without knowing\n // which months you are are talking about, so we have to store\n // it separately.\n\n this._months = +months + quarters * 3 + years * 12;\n this._data = {};\n this._locale = getLocale();\n\n this._bubble();\n }\n\n function isDuration(obj) {\n return obj instanceof Duration;\n }\n\n function absRound(number) {\n if (number < 0) {\n return Math.round(-1 * number) * -1;\n } else {\n return Math.round(number);\n }\n } // FORMATTING\n\n\n function offset(token, separator) {\n addFormatToken(token, 0, 0, function () {\n var offset = this.utcOffset();\n var sign = '+';\n\n if (offset < 0) {\n offset = -offset;\n sign = '-';\n }\n\n return sign + zeroFill(~~(offset / 60), 2) + separator + zeroFill(~~offset % 60, 2);\n });\n }\n\n offset('Z', ':');\n offset('ZZ', ''); // PARSING\n\n addRegexToken('Z', matchShortOffset);\n addRegexToken('ZZ', matchShortOffset);\n addParseToken(['Z', 'ZZ'], function (input, array, config) {\n config._useUTC = true;\n config._tzm = offsetFromString(matchShortOffset, input);\n }); // HELPERS\n // timezone chunker\n // '+10:00' > ['10', '00']\n // '-1530' > ['-15', '30']\n\n var chunkOffset = /([\\+\\-]|\\d\\d)/gi;\n\n function offsetFromString(matcher, string) {\n var matches = (string || '').match(matcher);\n\n if (matches === null) {\n return null;\n }\n\n var chunk = matches[matches.length - 1] || [];\n var parts = (chunk + '').match(chunkOffset) || ['-', 0, 0];\n var minutes = +(parts[1] * 60) + toInt(parts[2]);\n return minutes === 0 ? 0 : parts[0] === '+' ? minutes : -minutes;\n } // Return a moment from input, that is local/utc/zone equivalent to model.\n\n\n function cloneWithOffset(input, model) {\n var res, diff;\n\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? input.valueOf() : createLocal(input).valueOf()) - res.valueOf(); // Use low-level api, because this fn is low-level api.\n\n res._d.setTime(res._d.valueOf() + diff);\n\n hooks.updateOffset(res, false);\n return res;\n } else {\n return createLocal(input).local();\n }\n }\n\n function getDateOffset(m) {\n // On Firefox.24 Date#getTimezoneOffset returns a floating point.\n // https://github.com/moment/moment/pull/1871\n return -Math.round(m._d.getTimezoneOffset() / 15) * 15;\n } // HOOKS\n // This function will be called whenever a moment is mutated.\n // It is intended to keep the offset in sync with the timezone.\n\n\n hooks.updateOffset = function () {}; // MOMENTS\n // keepLocalTime = true means only change the timezone, without\n // affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]-->\n // 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset\n // +0200, so we adjust the time as needed, to be valid.\n //\n // Keeping the time actually adds/subtracts (one hour)\n // from the actual represented time. That is why we call updateOffset\n // a second time. In case it wants us to change the offset again\n // _changeInProgress == true case, then we have to adjust, because\n // there is no such time in the given timezone.\n\n\n function getSetOffset(input, keepLocalTime, keepMinutes) {\n var offset = this._offset || 0,\n localAdjust;\n\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n\n if (input === null) {\n return this;\n }\n } else if (Math.abs(input) < 16 && !keepMinutes) {\n input = input * 60;\n }\n\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n\n this._offset = input;\n this._isUTC = true;\n\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n addSubtract(this, createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }\n\n function getSetZone(input, keepLocalTime) {\n if (input != null) {\n if (typeof input !== 'string') {\n input = -input;\n }\n\n this.utcOffset(input, keepLocalTime);\n return this;\n } else {\n return -this.utcOffset();\n }\n }\n\n function setOffsetToUTC(keepLocalTime) {\n return this.utcOffset(0, keepLocalTime);\n }\n\n function setOffsetToLocal(keepLocalTime) {\n if (this._isUTC) {\n this.utcOffset(0, keepLocalTime);\n this._isUTC = false;\n\n if (keepLocalTime) {\n this.subtract(getDateOffset(this), 'm');\n }\n }\n\n return this;\n }\n\n function setOffsetToParsedOffset() {\n if (this._tzm != null) {\n this.utcOffset(this._tzm, false, true);\n } else if (typeof this._i === 'string') {\n var tZone = offsetFromString(matchOffset, this._i);\n\n if (tZone != null) {\n this.utcOffset(tZone);\n } else {\n this.utcOffset(0, true);\n }\n }\n\n return this;\n }\n\n function hasAlignedHourOffset(input) {\n if (!this.isValid()) {\n return false;\n }\n\n input = input ? createLocal(input).utcOffset() : 0;\n return (this.utcOffset() - input) % 60 === 0;\n }\n\n function isDaylightSavingTime() {\n return this.utcOffset() > this.clone().month(0).utcOffset() || this.utcOffset() > this.clone().month(5).utcOffset();\n }\n\n function isDaylightSavingTimeShifted() {\n if (!isUndefined(this._isDSTShifted)) {\n return this._isDSTShifted;\n }\n\n var c = {};\n copyConfig(c, this);\n c = prepareConfig(c);\n\n if (c._a) {\n var other = c._isUTC ? createUTC(c._a) : createLocal(c._a);\n this._isDSTShifted = this.isValid() && compareArrays(c._a, other.toArray()) > 0;\n } else {\n this._isDSTShifted = false;\n }\n\n return this._isDSTShifted;\n }\n\n function isLocal() {\n return this.isValid() ? !this._isUTC : false;\n }\n\n function isUtcOffset() {\n return this.isValid() ? this._isUTC : false;\n }\n\n function isUtc() {\n return this.isValid() ? this._isUTC && this._offset === 0 : false;\n } // ASP.NET json date format regex\n\n\n var aspNetRegex = /^(\\-|\\+)?(?:(\\d*)[. ])?(\\d+)\\:(\\d+)(?:\\:(\\d+)(\\.\\d*)?)?$/; // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html\n // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere\n // and further modified to allow for strings containing both week and day\n\n var isoRegex = /^(-|\\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;\n\n function createDuration(input, key) {\n var duration = input,\n // matching against regexp is expensive, do it on demand\n match = null,\n sign,\n ret,\n diffRes;\n\n if (isDuration(input)) {\n duration = {\n ms: input._milliseconds,\n d: input._days,\n M: input._months\n };\n } else if (isNumber(input)) {\n duration = {};\n\n if (key) {\n duration[key] = input;\n } else {\n duration.milliseconds = input;\n }\n } else if (!!(match = aspNetRegex.exec(input))) {\n sign = match[1] === '-' ? -1 : 1;\n duration = {\n y: 0,\n d: toInt(match[DATE]) * sign,\n h: toInt(match[HOUR]) * sign,\n m: toInt(match[MINUTE]) * sign,\n s: toInt(match[SECOND]) * sign,\n ms: toInt(absRound(match[MILLISECOND] * 1000)) * sign // the millisecond decimal point is included in the match\n\n };\n } else if (!!(match = isoRegex.exec(input))) {\n sign = match[1] === '-' ? -1 : 1;\n duration = {\n y: parseIso(match[2], sign),\n M: parseIso(match[3], sign),\n w: parseIso(match[4], sign),\n d: parseIso(match[5], sign),\n h: parseIso(match[6], sign),\n m: parseIso(match[7], sign),\n s: parseIso(match[8], sign)\n };\n } else if (duration == null) {\n // checks for null or undefined\n duration = {};\n } else if (typeof duration === 'object' && ('from' in duration || 'to' in duration)) {\n diffRes = momentsDifference(createLocal(duration.from), createLocal(duration.to));\n duration = {};\n duration.ms = diffRes.milliseconds;\n duration.M = diffRes.months;\n }\n\n ret = new Duration(duration);\n\n if (isDuration(input) && hasOwnProp(input, '_locale')) {\n ret._locale = input._locale;\n }\n\n return ret;\n }\n\n createDuration.fn = Duration.prototype;\n createDuration.invalid = createInvalid$1;\n\n function parseIso(inp, sign) {\n // We'd normally use ~~inp for this, but unfortunately it also\n // converts floats to ints.\n // inp may be undefined, so careful calling replace on it.\n var res = inp && parseFloat(inp.replace(',', '.')); // apply sign while we're at it\n\n return (isNaN(res) ? 0 : res) * sign;\n }\n\n function positiveMomentsDifference(base, other) {\n var res = {};\n res.months = other.month() - base.month() + (other.year() - base.year()) * 12;\n\n if (base.clone().add(res.months, 'M').isAfter(other)) {\n --res.months;\n }\n\n res.milliseconds = +other - +base.clone().add(res.months, 'M');\n return res;\n }\n\n function momentsDifference(base, other) {\n var res;\n\n if (!(base.isValid() && other.isValid())) {\n return {\n milliseconds: 0,\n months: 0\n };\n }\n\n other = cloneWithOffset(other, base);\n\n if (base.isBefore(other)) {\n res = positiveMomentsDifference(base, other);\n } else {\n res = positiveMomentsDifference(other, base);\n res.milliseconds = -res.milliseconds;\n res.months = -res.months;\n }\n\n return res;\n } // TODO: remove 'name' arg after deprecation is removed\n\n\n function createAdder(direction, name) {\n return function (val, period) {\n var dur, tmp; //invert the arguments, but complain about it\n\n if (period !== null && !isNaN(+period)) {\n deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' + 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.');\n tmp = val;\n val = period;\n period = tmp;\n }\n\n val = typeof val === 'string' ? +val : val;\n dur = createDuration(val, period);\n addSubtract(this, dur, direction);\n return this;\n };\n }\n\n function addSubtract(mom, duration, isAdding, updateOffset) {\n var milliseconds = duration._milliseconds,\n days = absRound(duration._days),\n months = absRound(duration._months);\n\n if (!mom.isValid()) {\n // No op\n return;\n }\n\n updateOffset = updateOffset == null ? true : updateOffset;\n\n if (months) {\n setMonth(mom, get(mom, 'Month') + months * isAdding);\n }\n\n if (days) {\n set$1(mom, 'Date', get(mom, 'Date') + days * isAdding);\n }\n\n if (milliseconds) {\n mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding);\n }\n\n if (updateOffset) {\n hooks.updateOffset(mom, days || months);\n }\n }\n\n var add = createAdder(1, 'add');\n var subtract = createAdder(-1, 'subtract');\n\n function getCalendarFormat(myMoment, now) {\n var diff = myMoment.diff(now, 'days', true);\n return diff < -6 ? 'sameElse' : diff < -1 ? 'lastWeek' : diff < 0 ? 'lastDay' : diff < 1 ? 'sameDay' : diff < 2 ? 'nextDay' : diff < 7 ? 'nextWeek' : 'sameElse';\n }\n\n function calendar$1(time, formats) {\n // We want to compare the start of today, vs this.\n // Getting start-of-today depends on whether we're local/utc/offset or not.\n var now = time || createLocal(),\n sod = cloneWithOffset(now, this).startOf('day'),\n format = hooks.calendarFormat(this, sod) || 'sameElse';\n var output = formats && (isFunction(formats[format]) ? formats[format].call(this, now) : formats[format]);\n return this.format(output || this.localeData().calendar(format, this, createLocal(now)));\n }\n\n function clone() {\n return new Moment(this);\n }\n\n function isAfter(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input);\n\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n\n units = normalizeUnits(units) || 'millisecond';\n\n if (units === 'millisecond') {\n return this.valueOf() > localInput.valueOf();\n } else {\n return localInput.valueOf() < this.clone().startOf(units).valueOf();\n }\n }\n\n function isBefore(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input);\n\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n\n units = normalizeUnits(units) || 'millisecond';\n\n if (units === 'millisecond') {\n return this.valueOf() < localInput.valueOf();\n } else {\n return this.clone().endOf(units).valueOf() < localInput.valueOf();\n }\n }\n\n function isBetween(from, to, units, inclusivity) {\n var localFrom = isMoment(from) ? from : createLocal(from),\n localTo = isMoment(to) ? to : createLocal(to);\n\n if (!(this.isValid() && localFrom.isValid() && localTo.isValid())) {\n return false;\n }\n\n inclusivity = inclusivity || '()';\n return (inclusivity[0] === '(' ? this.isAfter(localFrom, units) : !this.isBefore(localFrom, units)) && (inclusivity[1] === ')' ? this.isBefore(localTo, units) : !this.isAfter(localTo, units));\n }\n\n function isSame(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input),\n inputMs;\n\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n\n units = normalizeUnits(units) || 'millisecond';\n\n if (units === 'millisecond') {\n return this.valueOf() === localInput.valueOf();\n } else {\n inputMs = localInput.valueOf();\n return this.clone().startOf(units).valueOf() <= inputMs && inputMs <= this.clone().endOf(units).valueOf();\n }\n }\n\n function isSameOrAfter(input, units) {\n return this.isSame(input, units) || this.isAfter(input, units);\n }\n\n function isSameOrBefore(input, units) {\n return this.isSame(input, units) || this.isBefore(input, units);\n }\n\n function diff(input, units, asFloat) {\n var that, zoneDelta, output;\n\n if (!this.isValid()) {\n return NaN;\n }\n\n that = cloneWithOffset(input, this);\n\n if (!that.isValid()) {\n return NaN;\n }\n\n zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4;\n units = normalizeUnits(units);\n\n switch (units) {\n case 'year':\n output = monthDiff(this, that) / 12;\n break;\n\n case 'month':\n output = monthDiff(this, that);\n break;\n\n case 'quarter':\n output = monthDiff(this, that) / 3;\n break;\n\n case 'second':\n output = (this - that) / 1e3;\n break;\n // 1000\n\n case 'minute':\n output = (this - that) / 6e4;\n break;\n // 1000 * 60\n\n case 'hour':\n output = (this - that) / 36e5;\n break;\n // 1000 * 60 * 60\n\n case 'day':\n output = (this - that - zoneDelta) / 864e5;\n break;\n // 1000 * 60 * 60 * 24, negate dst\n\n case 'week':\n output = (this - that - zoneDelta) / 6048e5;\n break;\n // 1000 * 60 * 60 * 24 * 7, negate dst\n\n default:\n output = this - that;\n }\n\n return asFloat ? output : absFloor(output);\n }\n\n function monthDiff(a, b) {\n // difference in months\n var wholeMonthDiff = (b.year() - a.year()) * 12 + (b.month() - a.month()),\n // b is in (anchor - 1 month, anchor + 1 month)\n anchor = a.clone().add(wholeMonthDiff, 'months'),\n anchor2,\n adjust;\n\n if (b - anchor < 0) {\n anchor2 = a.clone().add(wholeMonthDiff - 1, 'months'); // linear across the month\n\n adjust = (b - anchor) / (anchor - anchor2);\n } else {\n anchor2 = a.clone().add(wholeMonthDiff + 1, 'months'); // linear across the month\n\n adjust = (b - anchor) / (anchor2 - anchor);\n } //check for negative zero, return zero if negative zero\n\n\n return -(wholeMonthDiff + adjust) || 0;\n }\n\n hooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ';\n hooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]';\n\n function toString() {\n return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ');\n }\n\n function toISOString(keepOffset) {\n if (!this.isValid()) {\n return null;\n }\n\n var utc = keepOffset !== true;\n var m = utc ? this.clone().utc() : this;\n\n if (m.year() < 0 || m.year() > 9999) {\n return formatMoment(m, utc ? 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYYYY-MM-DD[T]HH:mm:ss.SSSZ');\n }\n\n if (isFunction(Date.prototype.toISOString)) {\n // native implementation is ~50x faster, use it when we can\n if (utc) {\n return this.toDate().toISOString();\n } else {\n return new Date(this.valueOf() + this.utcOffset() * 60 * 1000).toISOString().replace('Z', formatMoment(m, 'Z'));\n }\n }\n\n return formatMoment(m, utc ? 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYY-MM-DD[T]HH:mm:ss.SSSZ');\n }\n /**\n * Return a human readable representation of a moment that can\n * also be evaluated to get a new moment which is the same\n *\n * @link https://nodejs.org/dist/latest/docs/api/util.html#util_custom_inspect_function_on_objects\n */\n\n\n function inspect() {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n\n var func = 'moment';\n var zone = '';\n\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n\n var prefix = '[' + func + '(\"]';\n var year = 0 <= this.year() && this.year() <= 9999 ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n return this.format(prefix + year + datetime + suffix);\n }\n\n function format(inputString) {\n if (!inputString) {\n inputString = this.isUtc() ? hooks.defaultFormatUtc : hooks.defaultFormat;\n }\n\n var output = formatMoment(this, inputString);\n return this.localeData().postformat(output);\n }\n\n function from(time, withoutSuffix) {\n if (this.isValid() && (isMoment(time) && time.isValid() || createLocal(time).isValid())) {\n return createDuration({\n to: this,\n from: time\n }).locale(this.locale()).humanize(!withoutSuffix);\n } else {\n return this.localeData().invalidDate();\n }\n }\n\n function fromNow(withoutSuffix) {\n return this.from(createLocal(), withoutSuffix);\n }\n\n function to(time, withoutSuffix) {\n if (this.isValid() && (isMoment(time) && time.isValid() || createLocal(time).isValid())) {\n return createDuration({\n from: this,\n to: time\n }).locale(this.locale()).humanize(!withoutSuffix);\n } else {\n return this.localeData().invalidDate();\n }\n }\n\n function toNow(withoutSuffix) {\n return this.to(createLocal(), withoutSuffix);\n } // If passed a locale key, it will set the locale for this\n // instance. Otherwise, it will return the locale configuration\n // variables for this instance.\n\n\n function locale(key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n\n return this;\n }\n }\n\n var lang = deprecate('moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.', function (key) {\n if (key === undefined) {\n return this.localeData();\n } else {\n return this.locale(key);\n }\n });\n\n function localeData() {\n return this._locale;\n }\n\n var MS_PER_SECOND = 1000;\n var MS_PER_MINUTE = 60 * MS_PER_SECOND;\n var MS_PER_HOUR = 60 * MS_PER_MINUTE;\n var MS_PER_400_YEARS = (365 * 400 + 97) * 24 * MS_PER_HOUR; // actual modulo - handles negative numbers (for dates before 1970):\n\n function mod$1(dividend, divisor) {\n return (dividend % divisor + divisor) % divisor;\n }\n\n function localStartOfDate(y, m, d) {\n // the date constructor remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n return new Date(y + 400, m, d) - MS_PER_400_YEARS;\n } else {\n return new Date(y, m, d).valueOf();\n }\n }\n\n function utcStartOfDate(y, m, d) {\n // Date.UTC remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n return Date.UTC(y + 400, m, d) - MS_PER_400_YEARS;\n } else {\n return Date.UTC(y, m, d);\n }\n }\n\n function startOf(units) {\n var time;\n units = normalizeUnits(units);\n\n if (units === undefined || units === 'millisecond' || !this.isValid()) {\n return this;\n }\n\n var startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;\n\n switch (units) {\n case 'year':\n time = startOfDate(this.year(), 0, 1);\n break;\n\n case 'quarter':\n time = startOfDate(this.year(), this.month() - this.month() % 3, 1);\n break;\n\n case 'month':\n time = startOfDate(this.year(), this.month(), 1);\n break;\n\n case 'week':\n time = startOfDate(this.year(), this.month(), this.date() - this.weekday());\n break;\n\n case 'isoWeek':\n time = startOfDate(this.year(), this.month(), this.date() - (this.isoWeekday() - 1));\n break;\n\n case 'day':\n case 'date':\n time = startOfDate(this.year(), this.month(), this.date());\n break;\n\n case 'hour':\n time = this._d.valueOf();\n time -= mod$1(time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE), MS_PER_HOUR);\n break;\n\n case 'minute':\n time = this._d.valueOf();\n time -= mod$1(time, MS_PER_MINUTE);\n break;\n\n case 'second':\n time = this._d.valueOf();\n time -= mod$1(time, MS_PER_SECOND);\n break;\n }\n\n this._d.setTime(time);\n\n hooks.updateOffset(this, true);\n return this;\n }\n\n function endOf(units) {\n var time;\n units = normalizeUnits(units);\n\n if (units === undefined || units === 'millisecond' || !this.isValid()) {\n return this;\n }\n\n var startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;\n\n switch (units) {\n case 'year':\n time = startOfDate(this.year() + 1, 0, 1) - 1;\n break;\n\n case 'quarter':\n time = startOfDate(this.year(), this.month() - this.month() % 3 + 3, 1) - 1;\n break;\n\n case 'month':\n time = startOfDate(this.year(), this.month() + 1, 1) - 1;\n break;\n\n case 'week':\n time = startOfDate(this.year(), this.month(), this.date() - this.weekday() + 7) - 1;\n break;\n\n case 'isoWeek':\n time = startOfDate(this.year(), this.month(), this.date() - (this.isoWeekday() - 1) + 7) - 1;\n break;\n\n case 'day':\n case 'date':\n time = startOfDate(this.year(), this.month(), this.date() + 1) - 1;\n break;\n\n case 'hour':\n time = this._d.valueOf();\n time += MS_PER_HOUR - mod$1(time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE), MS_PER_HOUR) - 1;\n break;\n\n case 'minute':\n time = this._d.valueOf();\n time += MS_PER_MINUTE - mod$1(time, MS_PER_MINUTE) - 1;\n break;\n\n case 'second':\n time = this._d.valueOf();\n time += MS_PER_SECOND - mod$1(time, MS_PER_SECOND) - 1;\n break;\n }\n\n this._d.setTime(time);\n\n hooks.updateOffset(this, true);\n return this;\n }\n\n function valueOf() {\n return this._d.valueOf() - (this._offset || 0) * 60000;\n }\n\n function unix() {\n return Math.floor(this.valueOf() / 1000);\n }\n\n function toDate() {\n return new Date(this.valueOf());\n }\n\n function toArray() {\n var m = this;\n return [m.year(), m.month(), m.date(), m.hour(), m.minute(), m.second(), m.millisecond()];\n }\n\n function toObject() {\n var m = this;\n return {\n years: m.year(),\n months: m.month(),\n date: m.date(),\n hours: m.hours(),\n minutes: m.minutes(),\n seconds: m.seconds(),\n milliseconds: m.milliseconds()\n };\n }\n\n function toJSON() {\n // new Date(NaN).toJSON() === null\n return this.isValid() ? this.toISOString() : null;\n }\n\n function isValid$2() {\n return isValid(this);\n }\n\n function parsingFlags() {\n return extend({}, getParsingFlags(this));\n }\n\n function invalidAt() {\n return getParsingFlags(this).overflow;\n }\n\n function creationData() {\n return {\n input: this._i,\n format: this._f,\n locale: this._locale,\n isUTC: this._isUTC,\n strict: this._strict\n };\n } // FORMATTING\n\n\n addFormatToken(0, ['gg', 2], 0, function () {\n return this.weekYear() % 100;\n });\n addFormatToken(0, ['GG', 2], 0, function () {\n return this.isoWeekYear() % 100;\n });\n\n function addWeekYearFormatToken(token, getter) {\n addFormatToken(0, [token, token.length], 0, getter);\n }\n\n addWeekYearFormatToken('gggg', 'weekYear');\n addWeekYearFormatToken('ggggg', 'weekYear');\n addWeekYearFormatToken('GGGG', 'isoWeekYear');\n addWeekYearFormatToken('GGGGG', 'isoWeekYear'); // ALIASES\n\n addUnitAlias('weekYear', 'gg');\n addUnitAlias('isoWeekYear', 'GG'); // PRIORITY\n\n addUnitPriority('weekYear', 1);\n addUnitPriority('isoWeekYear', 1); // PARSING\n\n addRegexToken('G', matchSigned);\n addRegexToken('g', matchSigned);\n addRegexToken('GG', match1to2, match2);\n addRegexToken('gg', match1to2, match2);\n addRegexToken('GGGG', match1to4, match4);\n addRegexToken('gggg', match1to4, match4);\n addRegexToken('GGGGG', match1to6, match6);\n addRegexToken('ggggg', match1to6, match6);\n addWeekParseToken(['gggg', 'ggggg', 'GGGG', 'GGGGG'], function (input, week, config, token) {\n week[token.substr(0, 2)] = toInt(input);\n });\n addWeekParseToken(['gg', 'GG'], function (input, week, config, token) {\n week[token] = hooks.parseTwoDigitYear(input);\n }); // MOMENTS\n\n function getSetWeekYear(input) {\n return getSetWeekYearHelper.call(this, input, this.week(), this.weekday(), this.localeData()._week.dow, this.localeData()._week.doy);\n }\n\n function getSetISOWeekYear(input) {\n return getSetWeekYearHelper.call(this, input, this.isoWeek(), this.isoWeekday(), 1, 4);\n }\n\n function getISOWeeksInYear() {\n return weeksInYear(this.year(), 1, 4);\n }\n\n function getWeeksInYear() {\n var weekInfo = this.localeData()._week;\n\n return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy);\n }\n\n function getSetWeekYearHelper(input, week, weekday, dow, doy) {\n var weeksTarget;\n\n if (input == null) {\n return weekOfYear(this, dow, doy).year;\n } else {\n weeksTarget = weeksInYear(input, dow, doy);\n\n if (week > weeksTarget) {\n week = weeksTarget;\n }\n\n return setWeekAll.call(this, input, week, weekday, dow, doy);\n }\n }\n\n function setWeekAll(weekYear, week, weekday, dow, doy) {\n var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy),\n date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear);\n this.year(date.getUTCFullYear());\n this.month(date.getUTCMonth());\n this.date(date.getUTCDate());\n return this;\n } // FORMATTING\n\n\n addFormatToken('Q', 0, 'Qo', 'quarter'); // ALIASES\n\n addUnitAlias('quarter', 'Q'); // PRIORITY\n\n addUnitPriority('quarter', 7); // PARSING\n\n addRegexToken('Q', match1);\n addParseToken('Q', function (input, array) {\n array[MONTH] = (toInt(input) - 1) * 3;\n }); // MOMENTS\n\n function getSetQuarter(input) {\n return input == null ? Math.ceil((this.month() + 1) / 3) : this.month((input - 1) * 3 + this.month() % 3);\n } // FORMATTING\n\n\n addFormatToken('D', ['DD', 2], 'Do', 'date'); // ALIASES\n\n addUnitAlias('date', 'D'); // PRIORITY\n\n addUnitPriority('date', 9); // PARSING\n\n addRegexToken('D', match1to2);\n addRegexToken('DD', match1to2, match2);\n addRegexToken('Do', function (isStrict, locale) {\n // TODO: Remove \"ordinalParse\" fallback in next major release.\n return isStrict ? locale._dayOfMonthOrdinalParse || locale._ordinalParse : locale._dayOfMonthOrdinalParseLenient;\n });\n addParseToken(['D', 'DD'], DATE);\n addParseToken('Do', function (input, array) {\n array[DATE] = toInt(input.match(match1to2)[0]);\n }); // MOMENTS\n\n var getSetDayOfMonth = makeGetSet('Date', true); // FORMATTING\n\n addFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear'); // ALIASES\n\n addUnitAlias('dayOfYear', 'DDD'); // PRIORITY\n\n addUnitPriority('dayOfYear', 4); // PARSING\n\n addRegexToken('DDD', match1to3);\n addRegexToken('DDDD', match3);\n addParseToken(['DDD', 'DDDD'], function (input, array, config) {\n config._dayOfYear = toInt(input);\n }); // HELPERS\n // MOMENTS\n\n function getSetDayOfYear(input) {\n var dayOfYear = Math.round((this.clone().startOf('day') - this.clone().startOf('year')) / 864e5) + 1;\n return input == null ? dayOfYear : this.add(input - dayOfYear, 'd');\n } // FORMATTING\n\n\n addFormatToken('m', ['mm', 2], 0, 'minute'); // ALIASES\n\n addUnitAlias('minute', 'm'); // PRIORITY\n\n addUnitPriority('minute', 14); // PARSING\n\n addRegexToken('m', match1to2);\n addRegexToken('mm', match1to2, match2);\n addParseToken(['m', 'mm'], MINUTE); // MOMENTS\n\n var getSetMinute = makeGetSet('Minutes', false); // FORMATTING\n\n addFormatToken('s', ['ss', 2], 0, 'second'); // ALIASES\n\n addUnitAlias('second', 's'); // PRIORITY\n\n addUnitPriority('second', 15); // PARSING\n\n addRegexToken('s', match1to2);\n addRegexToken('ss', match1to2, match2);\n addParseToken(['s', 'ss'], SECOND); // MOMENTS\n\n var getSetSecond = makeGetSet('Seconds', false); // FORMATTING\n\n addFormatToken('S', 0, 0, function () {\n return ~~(this.millisecond() / 100);\n });\n addFormatToken(0, ['SS', 2], 0, function () {\n return ~~(this.millisecond() / 10);\n });\n addFormatToken(0, ['SSS', 3], 0, 'millisecond');\n addFormatToken(0, ['SSSS', 4], 0, function () {\n return this.millisecond() * 10;\n });\n addFormatToken(0, ['SSSSS', 5], 0, function () {\n return this.millisecond() * 100;\n });\n addFormatToken(0, ['SSSSSS', 6], 0, function () {\n return this.millisecond() * 1000;\n });\n addFormatToken(0, ['SSSSSSS', 7], 0, function () {\n return this.millisecond() * 10000;\n });\n addFormatToken(0, ['SSSSSSSS', 8], 0, function () {\n return this.millisecond() * 100000;\n });\n addFormatToken(0, ['SSSSSSSSS', 9], 0, function () {\n return this.millisecond() * 1000000;\n }); // ALIASES\n\n addUnitAlias('millisecond', 'ms'); // PRIORITY\n\n addUnitPriority('millisecond', 16); // PARSING\n\n addRegexToken('S', match1to3, match1);\n addRegexToken('SS', match1to3, match2);\n addRegexToken('SSS', match1to3, match3);\n var token;\n\n for (token = 'SSSS'; token.length <= 9; token += 'S') {\n addRegexToken(token, matchUnsigned);\n }\n\n function parseMs(input, array) {\n array[MILLISECOND] = toInt(('0.' + input) * 1000);\n }\n\n for (token = 'S'; token.length <= 9; token += 'S') {\n addParseToken(token, parseMs);\n } // MOMENTS\n\n\n var getSetMillisecond = makeGetSet('Milliseconds', false); // FORMATTING\n\n addFormatToken('z', 0, 0, 'zoneAbbr');\n addFormatToken('zz', 0, 0, 'zoneName'); // MOMENTS\n\n function getZoneAbbr() {\n return this._isUTC ? 'UTC' : '';\n }\n\n function getZoneName() {\n return this._isUTC ? 'Coordinated Universal Time' : '';\n }\n\n var proto = Moment.prototype;\n proto.add = add;\n proto.calendar = calendar$1;\n proto.clone = clone;\n proto.diff = diff;\n proto.endOf = endOf;\n proto.format = format;\n proto.from = from;\n proto.fromNow = fromNow;\n proto.to = to;\n proto.toNow = toNow;\n proto.get = stringGet;\n proto.invalidAt = invalidAt;\n proto.isAfter = isAfter;\n proto.isBefore = isBefore;\n proto.isBetween = isBetween;\n proto.isSame = isSame;\n proto.isSameOrAfter = isSameOrAfter;\n proto.isSameOrBefore = isSameOrBefore;\n proto.isValid = isValid$2;\n proto.lang = lang;\n proto.locale = locale;\n proto.localeData = localeData;\n proto.max = prototypeMax;\n proto.min = prototypeMin;\n proto.parsingFlags = parsingFlags;\n proto.set = stringSet;\n proto.startOf = startOf;\n proto.subtract = subtract;\n proto.toArray = toArray;\n proto.toObject = toObject;\n proto.toDate = toDate;\n proto.toISOString = toISOString;\n proto.inspect = inspect;\n proto.toJSON = toJSON;\n proto.toString = toString;\n proto.unix = unix;\n proto.valueOf = valueOf;\n proto.creationData = creationData;\n proto.year = getSetYear;\n proto.isLeapYear = getIsLeapYear;\n proto.weekYear = getSetWeekYear;\n proto.isoWeekYear = getSetISOWeekYear;\n proto.quarter = proto.quarters = getSetQuarter;\n proto.month = getSetMonth;\n proto.daysInMonth = getDaysInMonth;\n proto.week = proto.weeks = getSetWeek;\n proto.isoWeek = proto.isoWeeks = getSetISOWeek;\n proto.weeksInYear = getWeeksInYear;\n proto.isoWeeksInYear = getISOWeeksInYear;\n proto.date = getSetDayOfMonth;\n proto.day = proto.days = getSetDayOfWeek;\n proto.weekday = getSetLocaleDayOfWeek;\n proto.isoWeekday = getSetISODayOfWeek;\n proto.dayOfYear = getSetDayOfYear;\n proto.hour = proto.hours = getSetHour;\n proto.minute = proto.minutes = getSetMinute;\n proto.second = proto.seconds = getSetSecond;\n proto.millisecond = proto.milliseconds = getSetMillisecond;\n proto.utcOffset = getSetOffset;\n proto.utc = setOffsetToUTC;\n proto.local = setOffsetToLocal;\n proto.parseZone = setOffsetToParsedOffset;\n proto.hasAlignedHourOffset = hasAlignedHourOffset;\n proto.isDST = isDaylightSavingTime;\n proto.isLocal = isLocal;\n proto.isUtcOffset = isUtcOffset;\n proto.isUtc = isUtc;\n proto.isUTC = isUtc;\n proto.zoneAbbr = getZoneAbbr;\n proto.zoneName = getZoneName;\n proto.dates = deprecate('dates accessor is deprecated. Use date instead.', getSetDayOfMonth);\n proto.months = deprecate('months accessor is deprecated. Use month instead', getSetMonth);\n proto.years = deprecate('years accessor is deprecated. Use year instead', getSetYear);\n proto.zone = deprecate('moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/', getSetZone);\n proto.isDSTShifted = deprecate('isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information', isDaylightSavingTimeShifted);\n\n function createUnix(input) {\n return createLocal(input * 1000);\n }\n\n function createInZone() {\n return createLocal.apply(null, arguments).parseZone();\n }\n\n function preParsePostFormat(string) {\n return string;\n }\n\n var proto$1 = Locale.prototype;\n proto$1.calendar = calendar;\n proto$1.longDateFormat = longDateFormat;\n proto$1.invalidDate = invalidDate;\n proto$1.ordinal = ordinal;\n proto$1.preparse = preParsePostFormat;\n proto$1.postformat = preParsePostFormat;\n proto$1.relativeTime = relativeTime;\n proto$1.pastFuture = pastFuture;\n proto$1.set = set;\n proto$1.months = localeMonths;\n proto$1.monthsShort = localeMonthsShort;\n proto$1.monthsParse = localeMonthsParse;\n proto$1.monthsRegex = monthsRegex;\n proto$1.monthsShortRegex = monthsShortRegex;\n proto$1.week = localeWeek;\n proto$1.firstDayOfYear = localeFirstDayOfYear;\n proto$1.firstDayOfWeek = localeFirstDayOfWeek;\n proto$1.weekdays = localeWeekdays;\n proto$1.weekdaysMin = localeWeekdaysMin;\n proto$1.weekdaysShort = localeWeekdaysShort;\n proto$1.weekdaysParse = localeWeekdaysParse;\n proto$1.weekdaysRegex = weekdaysRegex;\n proto$1.weekdaysShortRegex = weekdaysShortRegex;\n proto$1.weekdaysMinRegex = weekdaysMinRegex;\n proto$1.isPM = localeIsPM;\n proto$1.meridiem = localeMeridiem;\n\n function get$1(format, index, field, setter) {\n var locale = getLocale();\n var utc = createUTC().set(setter, index);\n return locale[field](utc, format);\n }\n\n function listMonthsImpl(format, index, field) {\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n\n if (index != null) {\n return get$1(format, index, field, 'month');\n }\n\n var i;\n var out = [];\n\n for (i = 0; i < 12; i++) {\n out[i] = get$1(format, i, field, 'month');\n }\n\n return out;\n } // ()\n // (5)\n // (fmt, 5)\n // (fmt)\n // (true)\n // (true, 5)\n // (true, fmt, 5)\n // (true, fmt)\n\n\n function listWeekdaysImpl(localeSorted, format, index, field) {\n if (typeof localeSorted === 'boolean') {\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n } else {\n format = localeSorted;\n index = format;\n localeSorted = false;\n\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n }\n\n var locale = getLocale(),\n shift = localeSorted ? locale._week.dow : 0;\n\n if (index != null) {\n return get$1(format, (index + shift) % 7, field, 'day');\n }\n\n var i;\n var out = [];\n\n for (i = 0; i < 7; i++) {\n out[i] = get$1(format, (i + shift) % 7, field, 'day');\n }\n\n return out;\n }\n\n function listMonths(format, index) {\n return listMonthsImpl(format, index, 'months');\n }\n\n function listMonthsShort(format, index) {\n return listMonthsImpl(format, index, 'monthsShort');\n }\n\n function listWeekdays(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdays');\n }\n\n function listWeekdaysShort(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort');\n }\n\n function listWeekdaysMin(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin');\n }\n\n getSetGlobalLocale('en', {\n dayOfMonthOrdinalParse: /\\d{1,2}(th|st|nd|rd)/,\n ordinal: function (number) {\n var b = number % 10,\n output = toInt(number % 100 / 10) === 1 ? 'th' : b === 1 ? 'st' : b === 2 ? 'nd' : b === 3 ? 'rd' : 'th';\n return number + output;\n }\n }); // Side effect imports\n\n hooks.lang = deprecate('moment.lang is deprecated. Use moment.locale instead.', getSetGlobalLocale);\n hooks.langData = deprecate('moment.langData is deprecated. Use moment.localeData instead.', getLocale);\n var mathAbs = Math.abs;\n\n function abs() {\n var data = this._data;\n this._milliseconds = mathAbs(this._milliseconds);\n this._days = mathAbs(this._days);\n this._months = mathAbs(this._months);\n data.milliseconds = mathAbs(data.milliseconds);\n data.seconds = mathAbs(data.seconds);\n data.minutes = mathAbs(data.minutes);\n data.hours = mathAbs(data.hours);\n data.months = mathAbs(data.months);\n data.years = mathAbs(data.years);\n return this;\n }\n\n function addSubtract$1(duration, input, value, direction) {\n var other = createDuration(input, value);\n duration._milliseconds += direction * other._milliseconds;\n duration._days += direction * other._days;\n duration._months += direction * other._months;\n return duration._bubble();\n } // supports only 2.0-style add(1, 's') or add(duration)\n\n\n function add$1(input, value) {\n return addSubtract$1(this, input, value, 1);\n } // supports only 2.0-style subtract(1, 's') or subtract(duration)\n\n\n function subtract$1(input, value) {\n return addSubtract$1(this, input, value, -1);\n }\n\n function absCeil(number) {\n if (number < 0) {\n return Math.floor(number);\n } else {\n return Math.ceil(number);\n }\n }\n\n function bubble() {\n var milliseconds = this._milliseconds;\n var days = this._days;\n var months = this._months;\n var data = this._data;\n var seconds, minutes, hours, years, monthsFromDays; // if we have a mix of positive and negative values, bubble down first\n // check: https://github.com/moment/moment/issues/2166\n\n if (!(milliseconds >= 0 && days >= 0 && months >= 0 || milliseconds <= 0 && days <= 0 && months <= 0)) {\n milliseconds += absCeil(monthsToDays(months) + days) * 864e5;\n days = 0;\n months = 0;\n } // The following code bubbles up values, see the tests for\n // examples of what that means.\n\n\n data.milliseconds = milliseconds % 1000;\n seconds = absFloor(milliseconds / 1000);\n data.seconds = seconds % 60;\n minutes = absFloor(seconds / 60);\n data.minutes = minutes % 60;\n hours = absFloor(minutes / 60);\n data.hours = hours % 24;\n days += absFloor(hours / 24); // convert days to months\n\n monthsFromDays = absFloor(daysToMonths(days));\n months += monthsFromDays;\n days -= absCeil(monthsToDays(monthsFromDays)); // 12 months -> 1 year\n\n years = absFloor(months / 12);\n months %= 12;\n data.days = days;\n data.months = months;\n data.years = years;\n return this;\n }\n\n function daysToMonths(days) {\n // 400 years have 146097 days (taking into account leap year rules)\n // 400 years have 12 months === 4800\n return days * 4800 / 146097;\n }\n\n function monthsToDays(months) {\n // the reverse of daysToMonths\n return months * 146097 / 4800;\n }\n\n function as(units) {\n if (!this.isValid()) {\n return NaN;\n }\n\n var days;\n var months;\n var milliseconds = this._milliseconds;\n units = normalizeUnits(units);\n\n if (units === 'month' || units === 'quarter' || units === 'year') {\n days = this._days + milliseconds / 864e5;\n months = this._months + daysToMonths(days);\n\n switch (units) {\n case 'month':\n return months;\n\n case 'quarter':\n return months / 3;\n\n case 'year':\n return months / 12;\n }\n } else {\n // handle milliseconds separately because of floating point math errors (issue #1867)\n days = this._days + Math.round(monthsToDays(this._months));\n\n switch (units) {\n case 'week':\n return days / 7 + milliseconds / 6048e5;\n\n case 'day':\n return days + milliseconds / 864e5;\n\n case 'hour':\n return days * 24 + milliseconds / 36e5;\n\n case 'minute':\n return days * 1440 + milliseconds / 6e4;\n\n case 'second':\n return days * 86400 + milliseconds / 1000;\n // Math.floor prevents floating point math errors here\n\n case 'millisecond':\n return Math.floor(days * 864e5) + milliseconds;\n\n default:\n throw new Error('Unknown unit ' + units);\n }\n }\n } // TODO: Use this.as('ms')?\n\n\n function valueOf$1() {\n if (!this.isValid()) {\n return NaN;\n }\n\n return this._milliseconds + this._days * 864e5 + this._months % 12 * 2592e6 + toInt(this._months / 12) * 31536e6;\n }\n\n function makeAs(alias) {\n return function () {\n return this.as(alias);\n };\n }\n\n var asMilliseconds = makeAs('ms');\n var asSeconds = makeAs('s');\n var asMinutes = makeAs('m');\n var asHours = makeAs('h');\n var asDays = makeAs('d');\n var asWeeks = makeAs('w');\n var asMonths = makeAs('M');\n var asQuarters = makeAs('Q');\n var asYears = makeAs('y');\n\n function clone$1() {\n return createDuration(this);\n }\n\n function get$2(units) {\n units = normalizeUnits(units);\n return this.isValid() ? this[units + 's']() : NaN;\n }\n\n function makeGetter(name) {\n return function () {\n return this.isValid() ? this._data[name] : NaN;\n };\n }\n\n var milliseconds = makeGetter('milliseconds');\n var seconds = makeGetter('seconds');\n var minutes = makeGetter('minutes');\n var hours = makeGetter('hours');\n var days = makeGetter('days');\n var months = makeGetter('months');\n var years = makeGetter('years');\n\n function weeks() {\n return absFloor(this.days() / 7);\n }\n\n var round = Math.round;\n var thresholds = {\n ss: 44,\n // a few seconds to seconds\n s: 45,\n // seconds to minute\n m: 45,\n // minutes to hour\n h: 22,\n // hours to day\n d: 26,\n // days to month\n M: 11 // months to year\n\n }; // helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize\n\n function substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) {\n return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture);\n }\n\n function relativeTime$1(posNegDuration, withoutSuffix, locale) {\n var duration = createDuration(posNegDuration).abs();\n var seconds = round(duration.as('s'));\n var minutes = round(duration.as('m'));\n var hours = round(duration.as('h'));\n var days = round(duration.as('d'));\n var months = round(duration.as('M'));\n var years = round(duration.as('y'));\n var a = seconds <= thresholds.ss && ['s', seconds] || seconds < thresholds.s && ['ss', seconds] || minutes <= 1 && ['m'] || minutes < thresholds.m && ['mm', minutes] || hours <= 1 && ['h'] || hours < thresholds.h && ['hh', hours] || days <= 1 && ['d'] || days < thresholds.d && ['dd', days] || months <= 1 && ['M'] || months < thresholds.M && ['MM', months] || years <= 1 && ['y'] || ['yy', years];\n a[2] = withoutSuffix;\n a[3] = +posNegDuration > 0;\n a[4] = locale;\n return substituteTimeAgo.apply(null, a);\n } // This function allows you to set the rounding function for relative time strings\n\n\n function getSetRelativeTimeRounding(roundingFunction) {\n if (roundingFunction === undefined) {\n return round;\n }\n\n if (typeof roundingFunction === 'function') {\n round = roundingFunction;\n return true;\n }\n\n return false;\n } // This function allows you to set a threshold for relative time strings\n\n\n function getSetRelativeTimeThreshold(threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n\n if (limit === undefined) {\n return thresholds[threshold];\n }\n\n thresholds[threshold] = limit;\n\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n\n return true;\n }\n\n function humanize(withSuffix) {\n if (!this.isValid()) {\n return this.localeData().invalidDate();\n }\n\n var locale = this.localeData();\n var output = relativeTime$1(this, !withSuffix, locale);\n\n if (withSuffix) {\n output = locale.pastFuture(+this, output);\n }\n\n return locale.postformat(output);\n }\n\n var abs$1 = Math.abs;\n\n function sign(x) {\n return (x > 0) - (x < 0) || +x;\n }\n\n function toISOString$1() {\n // for ISO strings we do not use the normal bubbling rules:\n // * milliseconds bubble up until they become hours\n // * days do not bubble at all\n // * months bubble up until they become years\n // This is because there is no context-free conversion between hours and days\n // (think of clock changes)\n // and also not between days and months (28-31 days per month)\n if (!this.isValid()) {\n return this.localeData().invalidDate();\n }\n\n var seconds = abs$1(this._milliseconds) / 1000;\n var days = abs$1(this._days);\n var months = abs$1(this._months);\n var minutes, hours, years; // 3600 seconds -> 60 minutes -> 1 hour\n\n minutes = absFloor(seconds / 60);\n hours = absFloor(minutes / 60);\n seconds %= 60;\n minutes %= 60; // 12 months -> 1 year\n\n years = absFloor(months / 12);\n months %= 12; // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js\n\n var Y = years;\n var M = months;\n var D = days;\n var h = hours;\n var m = minutes;\n var s = seconds ? seconds.toFixed(3).replace(/\\.?0+$/, '') : '';\n var total = this.asSeconds();\n\n if (!total) {\n // this is the same as C#'s (Noda) and python (isodate)...\n // but not other JS (goog.date)\n return 'P0D';\n }\n\n var totalSign = total < 0 ? '-' : '';\n var ymSign = sign(this._months) !== sign(total) ? '-' : '';\n var daysSign = sign(this._days) !== sign(total) ? '-' : '';\n var hmsSign = sign(this._milliseconds) !== sign(total) ? '-' : '';\n return totalSign + 'P' + (Y ? ymSign + Y + 'Y' : '') + (M ? ymSign + M + 'M' : '') + (D ? daysSign + D + 'D' : '') + (h || m || s ? 'T' : '') + (h ? hmsSign + h + 'H' : '') + (m ? hmsSign + m + 'M' : '') + (s ? hmsSign + s + 'S' : '');\n }\n\n var proto$2 = Duration.prototype;\n proto$2.isValid = isValid$1;\n proto$2.abs = abs;\n proto$2.add = add$1;\n proto$2.subtract = subtract$1;\n proto$2.as = as;\n proto$2.asMilliseconds = asMilliseconds;\n proto$2.asSeconds = asSeconds;\n proto$2.asMinutes = asMinutes;\n proto$2.asHours = asHours;\n proto$2.asDays = asDays;\n proto$2.asWeeks = asWeeks;\n proto$2.asMonths = asMonths;\n proto$2.asQuarters = asQuarters;\n proto$2.asYears = asYears;\n proto$2.valueOf = valueOf$1;\n proto$2._bubble = bubble;\n proto$2.clone = clone$1;\n proto$2.get = get$2;\n proto$2.milliseconds = milliseconds;\n proto$2.seconds = seconds;\n proto$2.minutes = minutes;\n proto$2.hours = hours;\n proto$2.days = days;\n proto$2.weeks = weeks;\n proto$2.months = months;\n proto$2.years = years;\n proto$2.humanize = humanize;\n proto$2.toISOString = toISOString$1;\n proto$2.toString = toISOString$1;\n proto$2.toJSON = toISOString$1;\n proto$2.locale = locale;\n proto$2.localeData = localeData;\n proto$2.toIsoString = deprecate('toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)', toISOString$1);\n proto$2.lang = lang; // Side effect imports\n // FORMATTING\n\n addFormatToken('X', 0, 0, 'unix');\n addFormatToken('x', 0, 0, 'valueOf'); // PARSING\n\n addRegexToken('x', matchSigned);\n addRegexToken('X', matchTimestamp);\n addParseToken('X', function (input, array, config) {\n config._d = new Date(parseFloat(input, 10) * 1000);\n });\n addParseToken('x', function (input, array, config) {\n config._d = new Date(toInt(input));\n }); // Side effect imports\n\n hooks.version = '2.24.0';\n setHookCallback(createLocal);\n hooks.fn = proto;\n hooks.min = min;\n hooks.max = max;\n hooks.now = now;\n hooks.utc = createUTC;\n hooks.unix = createUnix;\n hooks.months = listMonths;\n hooks.isDate = isDate;\n hooks.locale = getSetGlobalLocale;\n hooks.invalid = createInvalid;\n hooks.duration = createDuration;\n hooks.isMoment = isMoment;\n hooks.weekdays = listWeekdays;\n hooks.parseZone = createInZone;\n hooks.localeData = getLocale;\n hooks.isDuration = isDuration;\n hooks.monthsShort = listMonthsShort;\n hooks.weekdaysMin = listWeekdaysMin;\n hooks.defineLocale = defineLocale;\n hooks.updateLocale = updateLocale;\n hooks.locales = listLocales;\n hooks.weekdaysShort = listWeekdaysShort;\n hooks.normalizeUnits = normalizeUnits;\n hooks.relativeTimeRounding = getSetRelativeTimeRounding;\n hooks.relativeTimeThreshold = getSetRelativeTimeThreshold;\n hooks.calendarFormat = getCalendarFormat;\n hooks.prototype = proto; // currently HTML5 input type only supports 24-hour formats\n\n hooks.HTML5_FMT = {\n DATETIME_LOCAL: 'YYYY-MM-DDTHH:mm',\n // \n DATETIME_LOCAL_SECONDS: 'YYYY-MM-DDTHH:mm:ss',\n // \n DATETIME_LOCAL_MS: 'YYYY-MM-DDTHH:mm:ss.SSS',\n // \n DATE: 'YYYY-MM-DD',\n // \n TIME: 'HH:mm',\n // \n TIME_SECONDS: 'HH:mm:ss',\n // \n TIME_MS: 'HH:mm:ss.SSS',\n // \n WEEK: 'GGGG-[W]WW',\n // \n MONTH: 'YYYY-MM' // \n\n };\n return hooks;\n });\n});\n\n// Maps for number <-> hex string conversion\nvar byteToHex = [];\n\nfor (var i$1 = 0; i$1 < 256; i$1++) {\n byteToHex[i$1] = (i$1 + 0x100).toString(16).substr(1);\n}\n/**\n * Represent binary UUID into it's string representation.\n *\n * @param buf - Buffer containing UUID bytes.\n * @param offset - Offset from the start of the buffer where the UUID is saved (not needed if the buffer starts with the UUID).\n *\n * @returns String representation of the UUID.\n */\n\n\nfunction stringifyUUID(buf, offset) {\n var i = offset || 0;\n var bth = byteToHex;\n return bth[buf[i++]] + bth[buf[i++]] + bth[buf[i++]] + bth[buf[i++]] + '-' + bth[buf[i++]] + bth[buf[i++]] + '-' + bth[buf[i++]] + bth[buf[i++]] + '-' + bth[buf[i++]] + bth[buf[i++]] + '-' + bth[buf[i++]] + bth[buf[i++]] + bth[buf[i++]] + bth[buf[i++]] + bth[buf[i++]] + bth[buf[i++]];\n}\n/**\n * Generate 16 random bytes to be used as a base for UUID.\n *\n * @ignore\n */\n\n\nvar random = function () {\n if (typeof crypto !== 'undefined' && crypto.getRandomValues) {\n // WHATWG crypto-based RNG - http://wiki.whatwg.org/wiki/Crypto\n // Moderately fast, high quality\n var _rnds8 = new Uint8Array(16);\n\n return function whatwgRNG() {\n crypto.getRandomValues(_rnds8);\n return _rnds8;\n };\n } // Math.random()-based (RNG)\n //\n // If all else fails, use Math.random().\n // It's fast, but is of unspecified quality.\n\n\n var _rnds = new Array(16);\n\n return function () {\n for (var i = 0, r; i < 16; i++) {\n if ((i & 0x03) === 0) {\n r = Math.random() * 0x100000000;\n }\n\n _rnds[i] = r >>> ((i & 0x03) << 3) & 0xff;\n }\n\n return _rnds;\n }; // uuid.js\n //\n // Copyright (c) 2010-2012 Robert Kieffer\n // MIT License - http://opensource.org/licenses/mit-license.php\n // Unique ID creation requires a high quality random # generator. We feature\n // detect to determine the best RNG source, normalizing to a function that\n // returns 128-bits of randomness, since that's what's usually required\n // return require('./rng');\n}();\n\nvar byteToHex$1 = [];\n\nfor (var i$1$1 = 0; i$1$1 < 256; i$1$1++) {\n byteToHex$1[i$1$1] = (i$1$1 + 0x100).toString(16).substr(1);\n} // **`v1()` - Generate time-based UUID**\n//\n// Inspired by https://github.com/LiosK/UUID.js\n// and http://docs.python.org/library/uuid.html\n// random #'s we need to init node and clockseq\n\n\nvar seedBytes = random(); // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)\n\nvar defaultNodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]]; // Per 4.2.2, randomize (14 bit) clockseq\n\nvar defaultClockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff; // Previous uuid creation time\n/**\n * UUIDv4 options.\n */\n\n/**\n * Generate UUIDv4\n *\n * @param options - Options to be used instead of default generated values.\n * String 'binary' is a shorthand for uuid4({}, new Array(16)).\n * @param buf - If present the buffer will be filled with the generated UUID.\n * @param offset - Offset of the UUID from the start of the buffer.\n *\n * @returns UUIDv4\n */\n\n\nfunction uuid4() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var buf = arguments.length > 1 ? arguments[1] : undefined;\n var offset = arguments.length > 2 ? arguments[2] : undefined; // Deprecated - 'format' argument, as supported in v1.2\n\n var i = buf && offset || 0;\n\n if (typeof options === 'string') {\n buf = options === 'binary' ? new Array(16) : undefined;\n options = {};\n }\n\n var rnds = options.random || (options.rng || random)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n for (var ii = 0; ii < 16; ii++) {\n buf[i + ii] = rnds[ii];\n }\n }\n\n return buf || stringifyUUID(rnds);\n} // Rollup will complain about mixing default and named exports in UMD build,\n\n// for example '/Date(1198908717056)/' or '/Date(1198908717056-0700)/'\n// code from http://momentjs.com/\n\nvar ASPDateRegex = /^\\/?Date\\((-?\\d+)/i; // Color REs\n\nvar fullHexRE = /^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i;\nvar shortHexRE = /^#?([a-f\\d])([a-f\\d])([a-f\\d])$/i;\nvar rgbRE = /^rgb\\( *(1?\\d{1,2}|2[0-4]\\d|25[0-5]) *, *(1?\\d{1,2}|2[0-4]\\d|25[0-5]) *, *(1?\\d{1,2}|2[0-4]\\d|25[0-5]) *\\)$/i;\nvar rgbaRE = /^rgba\\( *(1?\\d{1,2}|2[0-4]\\d|25[0-5]) *, *(1?\\d{1,2}|2[0-4]\\d|25[0-5]) *, *(1?\\d{1,2}|2[0-4]\\d|25[0-5]) *, *([01]|0?\\.\\d+) *\\)$/i;\n/**\n * Hue, Saturation, Value.\n */\n\n/**\n * Test whether given object is a number\n *\n * @param value - Input value of unknown type.\n *\n * @returns True if number, false otherwise.\n */\nfunction isNumber(value) {\n return value instanceof Number || typeof value === \"number\";\n}\n/**\n * Remove everything in the DOM object\n *\n * @param DOMobject - Node whose child nodes will be recursively deleted.\n */\n\nfunction recursiveDOMDelete(DOMobject) {\n if (DOMobject) {\n while (DOMobject.hasChildNodes() === true) {\n var child = DOMobject.firstChild;\n\n if (child) {\n recursiveDOMDelete(child);\n DOMobject.removeChild(child);\n }\n }\n }\n}\n/**\n * Test whether given object is a string\n *\n * @param value - Input value of unknown type.\n *\n * @returns True if string, false otherwise.\n */\n\nfunction isString(value) {\n return value instanceof String || typeof value === \"string\";\n}\n/**\n * Test whether given object is a object (not primitive or null).\n *\n * @param value - Input value of unknown type.\n *\n * @returns True if not null object, false otherwise.\n */\n\nfunction isObject(value) {\n return _typeof(value) === \"object\" && value !== null;\n}\n/**\n * Test whether given object is a Date, or a String containing a Date\n *\n * @param value - Input value of unknown type.\n *\n * @returns True if Date instance or string date representation, false otherwise.\n */\n\nfunction isDate(value) {\n if (value instanceof Date) {\n return true;\n } else if (isString(value)) {\n // test whether this string contains a date\n var match = ASPDateRegex.exec(value);\n\n if (match) {\n return true;\n } else if (!isNaN(Date.parse(value))) {\n return true;\n }\n }\n\n return false;\n}\n/**\n * Test whether given object is a Moment date.\n * @TODO: This is basically a workaround, if Moment was imported property it wouldn't necessary as moment.isMoment is a TS type guard.\n *\n * @param value - Input value of unknown type.\n *\n * @returns True if Moment instance, false otherwise.\n */\n\nfunction isMoment(value) {\n return moment.isMoment(value);\n}\n/**\n * Copy property from b to a if property present in a.\n * If property in b explicitly set to null, delete it if `allowDeletion` set.\n *\n * Internal helper routine, should not be exported. Not added to `exports` for that reason.\n *\n * @param a - Target object.\n * @param b - Source object.\n * @param prop - Name of property to copy from b to a.\n * @param allowDeletion if true, delete property in a if explicitly set to null in b\n */\n\nfunction copyOrDelete(a, b, prop, allowDeletion) {\n var doDeletion = false;\n\n if (allowDeletion === true) {\n doDeletion = b[prop] === null && a[prop] !== undefined;\n }\n\n if (doDeletion) {\n delete a[prop];\n } else {\n a[prop] = b[prop]; // Remember, this is a reference copy!\n }\n}\n/**\n * Fill an object with a possibly partially defined other object.\n *\n * Only copies values for the properties already present in a.\n * That means an object is not created on a property if only the b object has it.\n *\n * @param a - The object that will have it's properties updated.\n * @param b - The object with property updates.\n * @param allowDeletion - if true, delete properties in a that are explicitly set to null in b\n */\n\n\nfunction fillIfDefined(a, b) {\n var allowDeletion = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n\n // NOTE: iteration of properties of a\n // NOTE: prototype properties iterated over as well\n for (var prop in a) {\n if (b[prop] !== undefined) {\n if (b[prop] === null || _typeof(b[prop]) !== \"object\") {\n // Note: typeof null === 'object'\n copyOrDelete(a, b, prop, allowDeletion);\n } else {\n var aProp = a[prop];\n var bProp = b[prop];\n\n if (isObject(aProp) && isObject(bProp)) {\n fillIfDefined(aProp, bProp, allowDeletion);\n }\n }\n }\n }\n}\n/**\n * Copy the values of all of the enumerable own properties from one or more source objects to a\n * target object. Returns the target object.\n *\n * @param target - The target object to copy to.\n * @param source - The source object from which to copy properties.\n *\n * @return The target object.\n */\n\nvar extend = Object.assign;\n/**\n * Extend object a with selected properties of object b or a series of objects\n * Only properties with defined values are copied\n *\n * @param props - Properties to be copied to a.\n * @param a - The target.\n * @param others - The sources.\n *\n * @returns Argument a.\n */\n\nfunction selectiveExtend(props, a) {\n if (!Array.isArray(props)) {\n throw new Error(\"Array with property names expected as first argument\");\n }\n\n for (var _len = arguments.length, others = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {\n others[_key - 2] = arguments[_key];\n }\n\n for (var _i = 0, _others = others; _i < _others.length; _i++) {\n var other = _others[_i];\n\n for (var p = 0; p < props.length; p++) {\n var prop = props[p];\n\n if (other && Object.prototype.hasOwnProperty.call(other, prop)) {\n a[prop] = other[prop];\n }\n }\n }\n\n return a;\n}\n/**\n * Extend object a with selected properties of object b.\n * Only properties with defined values are copied.\n *\n * **Note:** Previous version of this routine implied that multiple source objects\n * could be used; however, the implementation was **wrong**.\n * Since multiple (>1) sources weren't used anywhere in the `vis.js` code,\n * this has been removed\n *\n * @param props - Names of first-level properties to copy over.\n * @param a - Target object.\n * @param b - Source object.\n * @param allowDeletion - If true, delete property in a if explicitly set to null in b.\n *\n * @returns Argument a.\n */\n\nfunction selectiveDeepExtend(props, a, b) {\n var allowDeletion = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;\n\n // TODO: add support for Arrays to deepExtend\n if (Array.isArray(b)) {\n throw new TypeError(\"Arrays are not supported by deepExtend\");\n }\n\n for (var p = 0; p < props.length; p++) {\n var prop = props[p];\n\n if (Object.prototype.hasOwnProperty.call(b, prop)) {\n if (b[prop] && b[prop].constructor === Object) {\n if (a[prop] === undefined) {\n a[prop] = {};\n }\n\n if (a[prop].constructor === Object) {\n deepExtend(a[prop], b[prop], false, allowDeletion);\n } else {\n copyOrDelete(a, b, prop, allowDeletion);\n }\n } else if (Array.isArray(b[prop])) {\n throw new TypeError(\"Arrays are not supported by deepExtend\");\n } else {\n copyOrDelete(a, b, prop, allowDeletion);\n }\n }\n }\n\n return a;\n}\n/**\n * Extend object `a` with properties of object `b`, ignoring properties which are explicitly\n * specified to be excluded.\n *\n * The properties of `b` are considered for copying.\n * Properties which are themselves objects are are also extended.\n * Only properties with defined values are copied\n *\n * @param propsToExclude - Names of properties which should *not* be copied.\n * @param a - Object to extend.\n * @param b - Object to take properties from for extension.\n * @param allowDeletion - If true, delete properties in a that are explicitly set to null in b.\n *\n * @returns Argument a.\n */\n\nfunction selectiveNotDeepExtend(propsToExclude, a, b) {\n var allowDeletion = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;\n\n // TODO: add support for Arrays to deepExtend\n // NOTE: array properties have an else-below; apparently, there is a problem here.\n if (Array.isArray(b)) {\n throw new TypeError(\"Arrays are not supported by deepExtend\");\n }\n\n for (var prop in b) {\n if (!Object.prototype.hasOwnProperty.call(b, prop)) {\n continue;\n } // Handle local properties only\n\n\n if (propsToExclude.indexOf(prop) !== -1) {\n continue;\n } // In exclusion list, skip\n\n\n if (b[prop] && b[prop].constructor === Object) {\n if (a[prop] === undefined) {\n a[prop] = {};\n }\n\n if (a[prop].constructor === Object) {\n deepExtend(a[prop], b[prop]); // NOTE: allowDeletion not propagated!\n } else {\n copyOrDelete(a, b, prop, allowDeletion);\n }\n } else if (Array.isArray(b[prop])) {\n a[prop] = [];\n\n for (var i = 0; i < b[prop].length; i++) {\n a[prop].push(b[prop][i]);\n }\n } else {\n copyOrDelete(a, b, prop, allowDeletion);\n }\n }\n\n return a;\n}\n/**\n * Deep extend an object a with the properties of object b\n *\n * @param a - Target object.\n * @param b - Source object.\n * @param protoExtend - If true, the prototype values will also be extended\n * (ie. the options objects that inherit from others will also get the inherited options).\n * @param allowDeletion - If true, the values of fields that are null will be deleted.\n *\n * @returns Argument a.\n */\n\nfunction deepExtend(a, b) {\n var protoExtend = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n var allowDeletion = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;\n\n for (var prop in b) {\n if (Object.prototype.hasOwnProperty.call(b, prop) || protoExtend === true) {\n if (b[prop] && Object.getPrototypeOf(b[prop]) === Object.prototype) {\n if (a[prop] === undefined) {\n a[prop] = deepExtend({}, b[prop], protoExtend); // NOTE: allowDeletion not propagated!\n } else if (a[prop] && Object.getPrototypeOf(a[prop]) === Object.prototype) {\n deepExtend(a[prop], b[prop], protoExtend); // NOTE: allowDeletion not propagated!\n } else {\n copyOrDelete(a, b, prop, allowDeletion);\n }\n } else if (Array.isArray(b[prop])) {\n a[prop] = b[prop].slice();\n } else {\n copyOrDelete(a, b, prop, allowDeletion);\n }\n }\n }\n\n return a;\n}\n/**\n * Test whether all elements in two arrays are equal.\n *\n * @param a - First array.\n * @param b - Second array.\n *\n * @returns True if both arrays have the same length and same elements (1 = '1').\n */\n\nfunction equalArray(a, b) {\n if (a.length !== b.length) {\n return false;\n }\n\n for (var i = 0, len = a.length; i < len; i++) {\n if (a[i] != b[i]) {\n return false;\n }\n }\n\n return true;\n}\n\n/**\n * Convert an object into another type\n *\n * @param object - Value of unknown type.\n * @param type - Name of the desired type.\n *\n * @returns Object in the desired type.\n * @throws Error\n */\nfunction convert(object, type) {\n var match;\n\n if (object === undefined) {\n return undefined;\n }\n\n if (object === null) {\n return null;\n }\n\n if (!type) {\n return object;\n }\n\n if (!(typeof type === \"string\") && !(type instanceof String)) {\n throw new Error(\"Type must be a string\");\n } //noinspection FallthroughInSwitchStatementJS\n\n\n switch (type) {\n case \"boolean\":\n case \"Boolean\":\n return Boolean(object);\n\n case \"number\":\n case \"Number\":\n if (isString(object) && !isNaN(Date.parse(object))) {\n return moment(object).valueOf();\n } else {\n // @TODO: I don't think that Number and String constructors are a good idea.\n // This could also fail if the object doesn't have valueOf method or if it's redefined.\n // For example: Object.create(null) or { valueOf: 7 }.\n return Number(object.valueOf());\n }\n\n case \"string\":\n case \"String\":\n return String(object);\n\n case \"Date\":\n if (isNumber(object)) {\n return new Date(object);\n }\n\n if (object instanceof Date) {\n return new Date(object.valueOf());\n } else if (isMoment(object)) {\n return new Date(object.valueOf());\n }\n\n if (isString(object)) {\n match = ASPDateRegex.exec(object);\n\n if (match) {\n // object is an ASP date\n return new Date(Number(match[1])); // parse number\n } else {\n return moment(new Date(object)).toDate(); // parse string\n }\n } else {\n throw new Error(\"Cannot convert object of type \" + getType(object) + \" to type Date\");\n }\n\n case \"Moment\":\n if (isNumber(object)) {\n return moment(object);\n }\n\n if (object instanceof Date) {\n return moment(object.valueOf());\n } else if (isMoment(object)) {\n return moment(object);\n }\n\n if (isString(object)) {\n match = ASPDateRegex.exec(object);\n\n if (match) {\n // object is an ASP date\n return moment(Number(match[1])); // parse number\n } else {\n return moment(object); // parse string\n }\n } else {\n throw new Error(\"Cannot convert object of type \" + getType(object) + \" to type Date\");\n }\n\n case \"ISODate\":\n if (isNumber(object)) {\n return new Date(object);\n } else if (object instanceof Date) {\n return object.toISOString();\n } else if (isMoment(object)) {\n return object.toDate().toISOString();\n } else if (isString(object)) {\n match = ASPDateRegex.exec(object);\n\n if (match) {\n // object is an ASP date\n return new Date(Number(match[1])).toISOString(); // parse number\n } else {\n return moment(object).format(); // ISO 8601\n }\n } else {\n throw new Error(\"Cannot convert object of type \" + getType(object) + \" to type ISODate\");\n }\n\n case \"ASPDate\":\n if (isNumber(object)) {\n return \"/Date(\" + object + \")/\";\n } else if (object instanceof Date || isMoment(object)) {\n return \"/Date(\" + object.valueOf() + \")/\";\n } else if (isString(object)) {\n match = ASPDateRegex.exec(object);\n\n var _value;\n\n if (match) {\n // object is an ASP date\n _value = new Date(Number(match[1])).valueOf(); // parse number\n } else {\n _value = new Date(object).valueOf(); // parse string\n }\n\n return \"/Date(\" + _value + \")/\";\n } else {\n throw new Error(\"Cannot convert object of type \" + getType(object) + \" to type ASPDate\");\n }\n\n default:\n var never = type;\n throw new Error(\"Unknown type \".concat(never));\n }\n}\n/**\n * Get the type of an object, for example exports.getType([]) returns 'Array'\n *\n * @param object - Input value of unknown type.\n *\n * @returns Detected type.\n */\n\nfunction getType(object) {\n var type = _typeof(object);\n\n if (type === \"object\") {\n if (object === null) {\n return \"null\";\n }\n\n if (object instanceof Boolean) {\n return \"Boolean\";\n }\n\n if (object instanceof Number) {\n return \"Number\";\n }\n\n if (object instanceof String) {\n return \"String\";\n }\n\n if (Array.isArray(object)) {\n return \"Array\";\n }\n\n if (object instanceof Date) {\n return \"Date\";\n }\n\n return \"Object\";\n }\n\n if (type === \"number\") {\n return \"Number\";\n }\n\n if (type === \"boolean\") {\n return \"Boolean\";\n }\n\n if (type === \"string\") {\n return \"String\";\n }\n\n if (type === undefined) {\n return \"undefined\";\n }\n\n return type;\n}\n\n/**\n * Used to extend an array and copy it. This is used to propagate paths recursively.\n *\n * @param arr - First part.\n * @param newValue - The value to be aadded into the array.\n *\n * @returns A new array with all items from arr and newValue (which is last).\n */\nfunction copyAndExtendArray(arr, newValue) {\n return [].concat(_toConsumableArray(arr), [newValue]);\n}\n/**\n * Used to extend an array and copy it. This is used to propagate paths recursively.\n *\n * @param arr - The array to be copied.\n *\n * @returns Shallow copy of arr.\n */\n\nfunction copyArray(arr) {\n return arr.slice();\n}\n/**\n * Retrieve the absolute left value of a DOM element\n *\n * @param elem - A dom element, for example a div.\n *\n * @returns The absolute left position of this element in the browser page.\n */\n\nfunction getAbsoluteLeft(elem) {\n return elem.getBoundingClientRect().left;\n}\n/**\n * Retrieve the absolute right value of a DOM element\n *\n * @param elem - A dom element, for example a div.\n *\n * @returns The absolute right position of this element in the browser page.\n */\n\nfunction getAbsoluteRight(elem) {\n return elem.getBoundingClientRect().right;\n}\n/**\n * Retrieve the absolute top value of a DOM element\n *\n * @param elem - A dom element, for example a div.\n *\n * @returns The absolute top position of this element in the browser page.\n */\n\nfunction getAbsoluteTop(elem) {\n return elem.getBoundingClientRect().top;\n}\n/**\n * Add a className to the given elements style.\n *\n * @param elem - The element to which the classes will be added.\n * @param classNames - Space separated list of classes.\n */\n\nfunction addClassName(elem, classNames) {\n var classes = elem.className.split(\" \");\n var newClasses = classNames.split(\" \");\n classes = classes.concat(newClasses.filter(function (className) {\n return classes.indexOf(className) < 0;\n }));\n elem.className = classes.join(\" \");\n}\n/**\n * Remove a className from the given elements style.\n *\n * @param elem - The element from which the classes will be removed.\n * @param classNames - Space separated list of classes.\n */\n\nfunction removeClassName(elem, classNames) {\n var classes = elem.className.split(\" \");\n var oldClasses = classNames.split(\" \");\n classes = classes.filter(function (className) {\n return oldClasses.indexOf(className) < 0;\n });\n elem.className = classes.join(\" \");\n}\n\n/**\n * For each method for both arrays and objects.\n * In case of an array, the built-in Array.forEach() is applied (**No, it's not!**).\n * In case of an Object, the method loops over all properties of the object.\n *\n * @param object - An Object or Array to be iterated over.\n * @param callback - Array.forEach-like callback.\n */\nfunction forEach(object, callback) {\n if (Array.isArray(object)) {\n // array\n var len = object.length;\n\n for (var i = 0; i < len; i++) {\n callback(object[i], i, object);\n }\n } else {\n // object\n for (var _key2 in object) {\n if (Object.prototype.hasOwnProperty.call(object, _key2)) {\n callback(object[_key2], _key2, object);\n }\n }\n }\n}\n/**\n * Convert an object into an array: all objects properties are put into the array. The resulting array is unordered.\n *\n * @param o - Object that contains the properties and methods.\n *\n * @returns An array of unordered values.\n */\n\nvar toArray = Object.values;\n/**\n * Update a property in an object\n *\n * @param object - The object whose property will be updated.\n * @param key - Name of the property to be updated.\n * @param value - The new value to be assigned.\n *\n * @returns Whether the value was updated (true) or already strictly the same in the original object (false).\n */\n\nfunction updateProperty(object, key, value) {\n if (object[key] !== value) {\n object[key] = value;\n return true;\n } else {\n return false;\n }\n}\n/**\n * Throttle the given function to be only executed once per animation frame.\n *\n * @param fn - The original function.\n *\n * @returns The throttled function.\n */\n\nfunction throttle(fn) {\n var scheduled = false;\n return function () {\n if (!scheduled) {\n scheduled = true;\n requestAnimationFrame(function () {\n scheduled = false;\n fn();\n });\n }\n };\n}\n/**\n * Add and event listener. Works for all browsers.\n *\n * @param element - The element to bind the event listener to.\n * @param action - Same as Element.addEventListener(action, —, —).\n * @param listener - Same as Element.addEventListener(—, listener, —).\n * @param useCapture - Same as Element.addEventListener(—, —, useCapture).\n */\n\nfunction addEventListener(element, action, listener, useCapture) {\n if (element.addEventListener) {\n if (useCapture === undefined) {\n useCapture = false;\n }\n\n if (action === \"mousewheel\" && navigator.userAgent.indexOf(\"Firefox\") >= 0) {\n action = \"DOMMouseScroll\"; // For Firefox\n }\n\n element.addEventListener(action, listener, useCapture);\n } else {\n // @TODO: IE types? Does anyone care?\n element.attachEvent(\"on\" + action, listener); // IE browsers\n }\n}\n/**\n * Remove an event listener from an element\n *\n * @param element - The element to bind the event listener to.\n * @param action - Same as Element.removeEventListener(action, —, —).\n * @param listener - Same as Element.removeEventListener(—, listener, —).\n * @param useCapture - Same as Element.removeEventListener(—, —, useCapture).\n */\n\nfunction removeEventListener(element, action, listener, useCapture) {\n if (element.removeEventListener) {\n // non-IE browsers\n if (useCapture === undefined) {\n useCapture = false;\n }\n\n if (action === \"mousewheel\" && navigator.userAgent.indexOf(\"Firefox\") >= 0) {\n action = \"DOMMouseScroll\"; // For Firefox\n }\n\n element.removeEventListener(action, listener, useCapture);\n } else {\n // @TODO: IE types? Does anyone care?\n element.detachEvent(\"on\" + action, listener); // IE browsers\n }\n}\n/**\n * Cancels the event's default action if it is cancelable, without stopping further propagation of the event.\n *\n * @param event - The event whose default action should be prevented.\n */\n\nfunction preventDefault(event) {\n if (!event) {\n event = window.event;\n }\n\n if (!event) ; else if (event.preventDefault) {\n event.preventDefault(); // non-IE browsers\n } else {\n // @TODO: IE types? Does anyone care?\n event.returnValue = false; // IE browsers\n }\n}\n/**\n * Get HTML element which is the target of the event.\n *\n * @param event - The event.\n *\n * @returns The element or null if not obtainable.\n */\n\nfunction getTarget() {\n var event = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : window.event;\n // code from http://www.quirksmode.org/js/events_properties.html\n // @TODO: EventTarget can be almost anything, is it okay to return only Elements?\n var target = null;\n\n if (!event) ; else if (event.target) {\n target = event.target;\n } else if (event.srcElement) {\n target = event.srcElement;\n }\n\n if (!(target instanceof Element)) {\n return null;\n }\n\n if (target.nodeType != null && target.nodeType == 3) {\n // defeat Safari bug\n target = target.parentNode;\n\n if (!(target instanceof Element)) {\n return null;\n }\n }\n\n return target;\n}\n/**\n * Check if given element contains given parent somewhere in the DOM tree\n *\n * @param element - The element to be tested.\n * @param parent - The ancestor (not necessarily parent) of the element.\n *\n * @returns True if parent is an ancestor of the element, false otherwise.\n */\n\nfunction hasParent(element, parent) {\n var elem = element;\n\n while (elem) {\n if (elem === parent) {\n return true;\n } else if (elem.parentNode) {\n elem = elem.parentNode;\n } else {\n return false;\n }\n }\n\n return false;\n}\nvar option = {\n /**\n * Convert a value into a boolean.\n *\n * @param value - Value to be converted intoboolean, a function will be executed as (() => unknown).\n * @param defaultValue - If the value or the return value of the function == null then this will be returned.\n *\n * @returns Corresponding boolean value, if none then the default value, if none then null.\n */\n asBoolean: function asBoolean(value, defaultValue) {\n if (typeof value == \"function\") {\n value = value();\n }\n\n if (value != null) {\n return value != false;\n }\n\n return defaultValue || null;\n },\n\n /**\n * Convert a value into a number.\n *\n * @param value - Value to be converted intonumber, a function will be executed as (() => unknown).\n * @param defaultValue - If the value or the return value of the function == null then this will be returned.\n *\n * @returns Corresponding **boxed** number value, if none then the default value, if none then null.\n */\n asNumber: function asNumber(value, defaultValue) {\n if (typeof value == \"function\") {\n value = value();\n }\n\n if (value != null) {\n return Number(value) || defaultValue || null;\n }\n\n return defaultValue || null;\n },\n\n /**\n * Convert a value into a string.\n *\n * @param value - Value to be converted intostring, a function will be executed as (() => unknown).\n * @param defaultValue - If the value or the return value of the function == null then this will be returned.\n *\n * @returns Corresponding **boxed** string value, if none then the default value, if none then null.\n */\n asString: function asString(value, defaultValue) {\n if (typeof value == \"function\") {\n value = value();\n }\n\n if (value != null) {\n return String(value);\n }\n\n return defaultValue || null;\n },\n\n /**\n * Convert a value into a size.\n *\n * @param value - Value to be converted intosize, a function will be executed as (() => unknown).\n * @param defaultValue - If the value or the return value of the function == null then this will be returned.\n *\n * @returns Corresponding string value (number + 'px'), if none then the default value, if none then null.\n */\n asSize: function asSize(value, defaultValue) {\n if (typeof value == \"function\") {\n value = value();\n }\n\n if (isString(value)) {\n return value;\n } else if (isNumber(value)) {\n return value + \"px\";\n } else {\n return defaultValue || null;\n }\n },\n\n /**\n * Convert a value into a DOM Element.\n *\n * @param value - Value to be converted into DOM Element, a function will be executed as (() => unknown).\n * @param defaultValue - If the value or the return value of the function == null then this will be returned.\n *\n * @returns The DOM Element, if none then the default value, if none then null.\n */\n asElement: function asElement(value, defaultValue) {\n if (typeof value == \"function\") {\n value = value();\n }\n\n return value || defaultValue || null;\n }\n};\n/**\n * Convert hex color string into RGB color object.\n * http://stackoverflow.com/questions/5623838/rgb-to-hex-and-hex-to-rgb\n *\n * @param hex - Hex color string (3 or 6 digits, with or without #).\n *\n * @returns RGB color object.\n */\n\nfunction hexToRGB(hex) {\n var result;\n\n switch (hex.length) {\n case 3:\n case 4:\n result = shortHexRE.exec(hex);\n return result ? {\n r: parseInt(result[1] + result[1], 16),\n g: parseInt(result[2] + result[2], 16),\n b: parseInt(result[3] + result[3], 16)\n } : null;\n\n case 6:\n case 7:\n result = fullHexRE.exec(hex);\n return result ? {\n r: parseInt(result[1], 16),\n g: parseInt(result[2], 16),\n b: parseInt(result[3], 16)\n } : null;\n\n default:\n return null;\n }\n}\n/**\n * This function takes string color in hex or RGB format and adds the opacity, RGBA is passed through unchanged.\n *\n * @param color - The color string (hex, RGB, RGBA).\n * @param opacity - The new opacity.\n *\n * @returns RGBA string, for example 'rgba(255, 0, 127, 0.3)'.\n */\n\nfunction overrideOpacity(color, opacity) {\n if (color.indexOf(\"rgba\") !== -1) {\n return color;\n } else if (color.indexOf(\"rgb\") !== -1) {\n var rgb = color.substr(color.indexOf(\"(\") + 1).replace(\")\", \"\").split(\",\");\n return \"rgba(\" + rgb[0] + \",\" + rgb[1] + \",\" + rgb[2] + \",\" + opacity + \")\";\n } else {\n var _rgb = hexToRGB(color);\n\n if (_rgb == null) {\n return color;\n } else {\n return \"rgba(\" + _rgb.r + \",\" + _rgb.g + \",\" + _rgb.b + \",\" + opacity + \")\";\n }\n }\n}\n/**\n * Convert RGB <0, 255> into hex color string.\n *\n * @param red - Red channel.\n * @param green - Green channel.\n * @param blue - Blue channel.\n *\n * @returns Hex color string (for example: '#0acdc0').\n */\n\nfunction RGBToHex(red, green, blue) {\n return \"#\" + ((1 << 24) + (red << 16) + (green << 8) + blue).toString(16).slice(1);\n}\n\n/**\n * Parse a color property into an object with border, background, and highlight colors\n *\n * @param inputColor - Shorthand color string or input color object.\n * @param defaultColor - Full color object to fill in missing values in inputColor.\n *\n * @returns Color object.\n */\nfunction parseColor(inputColor, defaultColor) {\n if (isString(inputColor)) {\n var colorStr = inputColor;\n\n if (isValidRGB(colorStr)) {\n var rgb = colorStr.substr(4).substr(0, colorStr.length - 5).split(\",\").map(function (value) {\n return parseInt(value);\n });\n colorStr = RGBToHex(rgb[0], rgb[1], rgb[2]);\n }\n\n if (isValidHex(colorStr) === true) {\n var hsv = hexToHSV(colorStr);\n var lighterColorHSV = {\n h: hsv.h,\n s: hsv.s * 0.8,\n v: Math.min(1, hsv.v * 1.02)\n };\n var darkerColorHSV = {\n h: hsv.h,\n s: Math.min(1, hsv.s * 1.25),\n v: hsv.v * 0.8\n };\n var darkerColorHex = HSVToHex(darkerColorHSV.h, darkerColorHSV.s, darkerColorHSV.v);\n var lighterColorHex = HSVToHex(lighterColorHSV.h, lighterColorHSV.s, lighterColorHSV.v);\n return {\n background: colorStr,\n border: darkerColorHex,\n highlight: {\n background: lighterColorHex,\n border: darkerColorHex\n },\n hover: {\n background: lighterColorHex,\n border: darkerColorHex\n }\n };\n } else {\n return {\n background: colorStr,\n border: colorStr,\n highlight: {\n background: colorStr,\n border: colorStr\n },\n hover: {\n background: colorStr,\n border: colorStr\n }\n };\n }\n } else {\n if (defaultColor) {\n var color = {\n background: inputColor.background || defaultColor.background,\n border: inputColor.border || defaultColor.border,\n highlight: isString(inputColor.highlight) ? {\n border: inputColor.highlight,\n background: inputColor.highlight\n } : {\n background: inputColor.highlight && inputColor.highlight.background || defaultColor.highlight.background,\n border: inputColor.highlight && inputColor.highlight.border || defaultColor.highlight.border\n },\n hover: isString(inputColor.hover) ? {\n border: inputColor.hover,\n background: inputColor.hover\n } : {\n border: inputColor.hover && inputColor.hover.border || defaultColor.hover.border,\n background: inputColor.hover && inputColor.hover.background || defaultColor.hover.background\n }\n };\n return color;\n } else {\n var _color = {\n background: inputColor.background || undefined,\n border: inputColor.border || undefined,\n highlight: isString(inputColor.highlight) ? {\n border: inputColor.highlight,\n background: inputColor.highlight\n } : {\n background: inputColor.highlight && inputColor.highlight.background || undefined,\n border: inputColor.highlight && inputColor.highlight.border || undefined\n },\n hover: isString(inputColor.hover) ? {\n border: inputColor.hover,\n background: inputColor.hover\n } : {\n border: inputColor.hover && inputColor.hover.border || undefined,\n background: inputColor.hover && inputColor.hover.background || undefined\n }\n };\n return _color;\n }\n }\n}\n/**\n * Convert RGB <0, 255> into HSV object.\n * http://www.javascripter.net/faq/rgb2hsv.htm\n *\n * @param red - Red channel.\n * @param green - Green channel.\n * @param blue - Blue channel.\n *\n * @returns HSV color object.\n */\n\nfunction RGBToHSV(red, green, blue) {\n red = red / 255;\n green = green / 255;\n blue = blue / 255;\n var minRGB = Math.min(red, Math.min(green, blue));\n var maxRGB = Math.max(red, Math.max(green, blue)); // Black-gray-white\n\n if (minRGB === maxRGB) {\n return {\n h: 0,\n s: 0,\n v: minRGB\n };\n } // Colors other than black-gray-white:\n\n\n var d = red === minRGB ? green - blue : blue === minRGB ? red - green : blue - red;\n var h = red === minRGB ? 3 : blue === minRGB ? 1 : 5;\n var hue = 60 * (h - d / (maxRGB - minRGB)) / 360;\n var saturation = (maxRGB - minRGB) / maxRGB;\n var value = maxRGB;\n return {\n h: hue,\n s: saturation,\n v: value\n };\n}\nvar cssUtil = {\n // split a string with css styles into an object with key/values\n split: function split(cssText) {\n var styles = {};\n cssText.split(\";\").forEach(function (style) {\n if (style.trim() != \"\") {\n var parts = style.split(\":\");\n\n var _key3 = parts[0].trim();\n\n var _value2 = parts[1].trim();\n\n styles[_key3] = _value2;\n }\n });\n return styles;\n },\n // build a css text string from an object with key/values\n join: function join(styles) {\n return Object.keys(styles).map(function (key) {\n return key + \": \" + styles[key];\n }).join(\"; \");\n }\n};\n/**\n * Append a string with css styles to an element\n *\n * @param element - The element that will receive new styles.\n * @param cssText - The styles to be appended.\n */\n\nfunction addCssText(element, cssText) {\n var currentStyles = cssUtil.split(element.style.cssText);\n var newStyles = cssUtil.split(cssText);\n\n var styles = _objectSpread2({}, currentStyles, {}, newStyles);\n\n element.style.cssText = cssUtil.join(styles);\n}\n/**\n * Remove a string with css styles from an element\n *\n * @param element - The element from which styles should be removed.\n * @param cssText - The styles to be removed.\n */\n\nfunction removeCssText(element, cssText) {\n var styles = cssUtil.split(element.style.cssText);\n var removeStyles = cssUtil.split(cssText);\n\n for (var _key4 in removeStyles) {\n if (Object.prototype.hasOwnProperty.call(removeStyles, _key4)) {\n delete styles[_key4];\n }\n }\n\n element.style.cssText = cssUtil.join(styles);\n}\n/**\n * Convert HSV <0, 1> into RGB color object.\n * https://gist.github.com/mjijackson/5311256\n *\n * @param h - Hue\n * @param s - Saturation\n * @param v - Value\n *\n * @returns RGB color object.\n */\n\nfunction HSVToRGB(h, s, v) {\n var r;\n var g;\n var b;\n var i = Math.floor(h * 6);\n var f = h * 6 - i;\n var p = v * (1 - s);\n var q = v * (1 - f * s);\n var t = v * (1 - (1 - f) * s);\n\n switch (i % 6) {\n case 0:\n r = v, g = t, b = p;\n break;\n\n case 1:\n r = q, g = v, b = p;\n break;\n\n case 2:\n r = p, g = v, b = t;\n break;\n\n case 3:\n r = p, g = q, b = v;\n break;\n\n case 4:\n r = t, g = p, b = v;\n break;\n\n case 5:\n r = v, g = p, b = q;\n break;\n }\n\n return {\n r: Math.floor(r * 255),\n g: Math.floor(g * 255),\n b: Math.floor(b * 255)\n };\n}\n/**\n * Convert HSV <0, 1> into hex color string.\n *\n * @param h - Hue\n * @param s - Saturation\n * @param v - Value\n *\n * @returns Hex color string.\n */\n\nfunction HSVToHex(h, s, v) {\n var rgb = HSVToRGB(h, s, v);\n return RGBToHex(rgb.r, rgb.g, rgb.b);\n}\n/**\n * Convert hex color string into HSV <0, 1>.\n *\n * @param hex - Hex color string.\n *\n * @returns HSV color object.\n */\n\nfunction hexToHSV(hex) {\n var rgb = hexToRGB(hex);\n\n if (!rgb) {\n throw new TypeError(\"'\".concat(hex, \"' is not a valid color.\"));\n }\n\n return RGBToHSV(rgb.r, rgb.g, rgb.b);\n}\n/**\n * Validate hex color string.\n *\n * @param hex - Unknown string that may contain a color.\n *\n * @returns True if the string is valid, false otherwise.\n */\n\nfunction isValidHex(hex) {\n var isOk = /(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(hex);\n return isOk;\n}\n/**\n * Validate RGB color string.\n *\n * @param rgb - Unknown string that may contain a color.\n *\n * @returns True if the string is valid, false otherwise.\n */\n\nfunction isValidRGB(rgb) {\n return rgbRE.test(rgb);\n}\n/**\n * Validate RGBA color string.\n *\n * @param rgba - Unknown string that may contain a color.\n *\n * @returns True if the string is valid, false otherwise.\n */\n\nfunction isValidRGBA(rgba) {\n return rgbaRE.test(rgba);\n}\n/**\n * This recursively redirects the prototype of JSON objects to the referenceObject.\n * This is used for default options.\n *\n * @param fields - Names of properties to be bridged.\n * @param referenceObject - The original object.\n *\n * @returns A new object inheriting from the referenceObject.\n */\n\nfunction selectiveBridgeObject(fields, referenceObject) {\n if (referenceObject !== null && _typeof(referenceObject) === \"object\") {\n // !!! typeof null === 'object'\n var objectTo = Object.create(referenceObject);\n\n for (var i = 0; i < fields.length; i++) {\n if (Object.prototype.hasOwnProperty.call(referenceObject, fields[i])) {\n if (_typeof(referenceObject[fields[i]]) == \"object\") {\n objectTo[fields[i]] = bridgeObject(referenceObject[fields[i]]);\n }\n }\n }\n\n return objectTo;\n } else {\n return null;\n }\n}\n\n/**\n * This recursively redirects the prototype of JSON objects to the referenceObject.\n * This is used for default options.\n *\n * @param referenceObject - The original object.\n *\n * @returns The Element if the referenceObject is an Element, or a new object inheriting from the referenceObject.\n */\nfunction bridgeObject(referenceObject) {\n if (referenceObject === null || _typeof(referenceObject) !== \"object\") {\n return null;\n }\n\n if (referenceObject instanceof Element) {\n // Avoid bridging DOM objects\n return referenceObject;\n }\n\n var objectTo = Object.create(referenceObject);\n\n for (var i in referenceObject) {\n if (Object.prototype.hasOwnProperty.call(referenceObject, i)) {\n if (_typeof(referenceObject[i]) == \"object\") {\n objectTo[i] = bridgeObject(referenceObject[i]);\n }\n }\n }\n\n return objectTo;\n}\n/**\n * This method provides a stable sort implementation, very fast for presorted data.\n *\n * @param a - The array to be sorted (in-place).\n * @param compare - An order comparator.\n *\n * @returns The argument a.\n */\n\nfunction insertSort(a, compare) {\n for (var i = 0; i < a.length; i++) {\n var k = a[i];\n var j = void 0;\n\n for (j = i; j > 0 && compare(k, a[j - 1]) < 0; j--) {\n a[j] = a[j - 1];\n }\n\n a[j] = k;\n }\n\n return a;\n}\n/**\n * This is used to set the options of subobjects in the options object.\n *\n * A requirement of these subobjects is that they have an 'enabled' element\n * which is optional for the user but mandatory for the program.\n *\n * The added value here of the merge is that option 'enabled' is set as required.\n *\n * @param mergeTarget - Either this.options or the options used for the groups.\n * @param options - Options.\n * @param option - Option key in the options argument.\n * @param globalOptions - Global options, passed in to determine value of option 'enabled'.\n */\n\nfunction mergeOptions(mergeTarget, options, option) {\n var globalOptions = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};\n\n // Local helpers\n var isPresent = function isPresent(obj) {\n return obj !== null && obj !== undefined;\n };\n\n var isObject = function isObject(obj) {\n return obj !== null && _typeof(obj) === \"object\";\n }; // https://stackoverflow.com/a/34491287/1223531\n\n\n var isEmpty = function isEmpty(obj) {\n for (var x in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, x)) {\n return false;\n }\n }\n\n return true;\n }; // Guards\n\n\n if (!isObject(mergeTarget)) {\n throw new Error(\"Parameter mergeTarget must be an object\");\n }\n\n if (!isObject(options)) {\n throw new Error(\"Parameter options must be an object\");\n }\n\n if (!isPresent(option)) {\n throw new Error(\"Parameter option must have a value\");\n }\n\n if (!isObject(globalOptions)) {\n throw new Error(\"Parameter globalOptions must be an object\");\n } //\n // Actual merge routine, separated from main logic\n // Only a single level of options is merged. Deeper levels are ref'd. This may actually be an issue.\n //\n\n\n var doMerge = function doMerge(target, options, option) {\n if (!isObject(target[option])) {\n target[option] = {};\n }\n\n var src = options[option];\n var dst = target[option];\n\n for (var prop in src) {\n if (Object.prototype.hasOwnProperty.call(src, prop)) {\n dst[prop] = src[prop];\n }\n }\n }; // Local initialization\n\n\n var srcOption = options[option];\n var globalPassed = isObject(globalOptions) && !isEmpty(globalOptions);\n var globalOption = globalPassed ? globalOptions[option] : undefined;\n var globalEnabled = globalOption ? globalOption.enabled : undefined; /////////////////////////////////////////\n // Main routine\n /////////////////////////////////////////\n\n if (srcOption === undefined) {\n return; // Nothing to do\n }\n\n if (typeof srcOption === \"boolean\") {\n if (!isObject(mergeTarget[option])) {\n mergeTarget[option] = {};\n }\n\n mergeTarget[option].enabled = srcOption;\n return;\n }\n\n if (srcOption === null && !isObject(mergeTarget[option])) {\n // If possible, explicit copy from globals\n if (isPresent(globalOption)) {\n mergeTarget[option] = Object.create(globalOption);\n } else {\n return; // Nothing to do\n }\n }\n\n if (!isObject(srcOption)) {\n return;\n } //\n // Ensure that 'enabled' is properly set. It is required internally\n // Note that the value from options will always overwrite the existing value\n //\n\n\n var enabled = true; // default value\n\n if (srcOption.enabled !== undefined) {\n enabled = srcOption.enabled;\n } else {\n // Take from globals, if present\n if (globalEnabled !== undefined) {\n enabled = globalOption.enabled;\n }\n }\n\n doMerge(mergeTarget, options, option);\n mergeTarget[option].enabled = enabled;\n}\n\n/**\n * This function does a binary search for a visible item in a sorted list. If we find a visible item, the code that uses\n * this function will then iterate in both directions over this sorted list to find all visible items.\n *\n * @param orderedItems - Items ordered by start\n * @param comparator - -1 is lower, 0 is equal, 1 is higher\n * @param field - Property name on an item (i.e. item[field]).\n * @param field2 - Second property name on an item (i.e. item[field][field2]).\n *\n * @returns Index of the found item or -1 if nothing was found.\n */\nfunction binarySearchCustom(orderedItems, comparator, field, field2) {\n var maxIterations = 10000;\n var iteration = 0;\n var low = 0;\n var high = orderedItems.length - 1;\n\n while (low <= high && iteration < maxIterations) {\n var middle = Math.floor((low + high) / 2);\n var item = orderedItems[middle];\n\n var _value3 = field2 === undefined ? item[field] : item[field][field2];\n\n var searchResult = comparator(_value3);\n\n if (searchResult == 0) {\n // jihaa, found a visible item!\n return middle;\n } else if (searchResult == -1) {\n // it is too small --> increase low\n low = middle + 1;\n } else {\n // it is too big --> decrease high\n high = middle - 1;\n }\n\n iteration++;\n }\n\n return -1;\n}\n/**\n * This function does a binary search for a specific value in a sorted array. If it does not exist but is in between of\n * two values, we return either the one before or the one after, depending on user input\n * If it is found, we return the index, else -1.\n *\n * @param orderedItems - Sorted array.\n * @param target - The searched value.\n * @param field - Name of the property in items to be searched.\n * @param sidePreference - If the target is between two values, should the index of the before or the after be returned?\n * @param comparator - An optional comparator, returning -1, 0, 1 for <, ===, >.\n *\n * @returns The index of found value or -1 if nothing was found.\n */\n\nfunction binarySearchValue(orderedItems, target, field, sidePreference, comparator) {\n var maxIterations = 10000;\n var iteration = 0;\n var low = 0;\n var high = orderedItems.length - 1;\n var prevValue;\n var value;\n var nextValue;\n var middle;\n comparator = comparator != undefined ? comparator : function (a, b) {\n return a == b ? 0 : a < b ? -1 : 1;\n };\n\n while (low <= high && iteration < maxIterations) {\n // get a new guess\n middle = Math.floor(0.5 * (high + low));\n prevValue = orderedItems[Math.max(0, middle - 1)][field];\n value = orderedItems[middle][field];\n nextValue = orderedItems[Math.min(orderedItems.length - 1, middle + 1)][field];\n\n if (comparator(value, target) == 0) {\n // we found the target\n return middle;\n } else if (comparator(prevValue, target) < 0 && comparator(value, target) > 0) {\n // target is in between of the previous and the current\n return sidePreference == \"before\" ? Math.max(0, middle - 1) : middle;\n } else if (comparator(value, target) < 0 && comparator(nextValue, target) > 0) {\n // target is in between of the current and the next\n return sidePreference == \"before\" ? middle : Math.min(orderedItems.length - 1, middle + 1);\n } else {\n // didnt find the target, we need to change our boundaries.\n if (comparator(value, target) < 0) {\n // it is too small --> increase low\n low = middle + 1;\n } else {\n // it is too big --> decrease high\n high = middle - 1;\n }\n }\n\n iteration++;\n } // didnt find anything. Return -1.\n\n\n return -1;\n}\n/*\n * Easing Functions.\n * Only considering the t value for the range [0, 1] => [0, 1].\n *\n * Inspiration: from http://gizma.com/easing/\n * https://gist.github.com/gre/1650294\n */\n\nvar easingFunctions = {\n /**\n * no easing, no acceleration\n *\n * @param t - Time.\n *\n * @returns Value at time t.\n */\n linear: function linear(t) {\n return t;\n },\n\n /**\n * accelerating from zero velocity\n *\n * @param t - Time.\n *\n * @returns Value at time t.\n */\n easeInQuad: function easeInQuad(t) {\n return t * t;\n },\n\n /**\n * decelerating to zero velocity\n *\n * @param t - Time.\n *\n * @returns Value at time t.\n */\n easeOutQuad: function easeOutQuad(t) {\n return t * (2 - t);\n },\n\n /**\n * acceleration until halfway, then deceleration\n *\n * @param t - Time.\n *\n * @returns Value at time t.\n */\n easeInOutQuad: function easeInOutQuad(t) {\n return t < 0.5 ? 2 * t * t : -1 + (4 - 2 * t) * t;\n },\n\n /**\n * accelerating from zero velocity\n *\n * @param t - Time.\n *\n * @returns Value at time t.\n */\n easeInCubic: function easeInCubic(t) {\n return t * t * t;\n },\n\n /**\n * decelerating to zero velocity\n *\n * @param t - Time.\n *\n * @returns Value at time t.\n */\n easeOutCubic: function easeOutCubic(t) {\n return --t * t * t + 1;\n },\n\n /**\n * acceleration until halfway, then deceleration\n *\n * @param t - Time.\n *\n * @returns Value at time t.\n */\n easeInOutCubic: function easeInOutCubic(t) {\n return t < 0.5 ? 4 * t * t * t : (t - 1) * (2 * t - 2) * (2 * t - 2) + 1;\n },\n\n /**\n * accelerating from zero velocity\n *\n * @param t - Time.\n *\n * @returns Value at time t.\n */\n easeInQuart: function easeInQuart(t) {\n return t * t * t * t;\n },\n\n /**\n * decelerating to zero velocity\n *\n * @param t - Time.\n *\n * @returns Value at time t.\n */\n easeOutQuart: function easeOutQuart(t) {\n return 1 - --t * t * t * t;\n },\n\n /**\n * acceleration until halfway, then deceleration\n *\n * @param t - Time.\n *\n * @returns Value at time t.\n */\n easeInOutQuart: function easeInOutQuart(t) {\n return t < 0.5 ? 8 * t * t * t * t : 1 - 8 * --t * t * t * t;\n },\n\n /**\n * accelerating from zero velocity\n *\n * @param t - Time.\n *\n * @returns Value at time t.\n */\n easeInQuint: function easeInQuint(t) {\n return t * t * t * t * t;\n },\n\n /**\n * decelerating to zero velocity\n *\n * @param t - Time.\n *\n * @returns Value at time t.\n */\n easeOutQuint: function easeOutQuint(t) {\n return 1 + --t * t * t * t * t;\n },\n\n /**\n * acceleration until halfway, then deceleration\n *\n * @param t - Time.\n *\n * @returns Value at time t.\n */\n easeInOutQuint: function easeInOutQuint(t) {\n return t < 0.5 ? 16 * t * t * t * t * t : 1 + 16 * --t * t * t * t * t;\n }\n};\n/**\n * Experimentaly compute the width of the scrollbar for this browser.\n *\n * @returns The width in pixels.\n */\n\nfunction getScrollBarWidth() {\n var inner = document.createElement(\"p\");\n inner.style.width = \"100%\";\n inner.style.height = \"200px\";\n var outer = document.createElement(\"div\");\n outer.style.position = \"absolute\";\n outer.style.top = \"0px\";\n outer.style.left = \"0px\";\n outer.style.visibility = \"hidden\";\n outer.style.width = \"200px\";\n outer.style.height = \"150px\";\n outer.style.overflow = \"hidden\";\n outer.appendChild(inner);\n document.body.appendChild(outer);\n var w1 = inner.offsetWidth;\n outer.style.overflow = \"scroll\";\n var w2 = inner.offsetWidth;\n\n if (w1 == w2) {\n w2 = outer.clientWidth;\n }\n\n document.body.removeChild(outer);\n return w1 - w2;\n} // @TODO: This doesn't work properly.\n// It works only for single property objects,\n// otherwise it combines all of the types in a union.\n// export function topMost (\n// pile: Record[],\n// accessors: K1 | [K1]\n// ): undefined | V1\n// export function topMost (\n// pile: Record>[],\n// accessors: [K1, K2]\n// ): undefined | V1 | V2\n// export function topMost (\n// pile: Record>>[],\n// accessors: [K1, K2, K3]\n// ): undefined | V1 | V2 | V3\n\n/**\n * Get the top most property value from a pile of objects.\n *\n * @param pile - Array of objects, no required format.\n * @param accessors - Array of property names (e.g. object['foo']['bar'] → ['foo', 'bar']).\n *\n * @returns Value of the property with given accessors path from the first pile item where it's not undefined.\n */\n\nfunction topMost(pile, accessors) {\n var candidate;\n\n if (!Array.isArray(accessors)) {\n accessors = [accessors];\n }\n\n var _iteratorNormalCompletion = true;\n var _didIteratorError = false;\n var _iteratorError = undefined;\n\n try {\n for (var _iterator = pile[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var member = _step.value;\n\n if (member) {\n candidate = member[accessors[0]];\n\n for (var i = 1; i < accessors.length; i++) {\n if (candidate) {\n candidate = candidate[accessors[i]];\n }\n }\n\n if (typeof candidate !== \"undefined\") {\n break;\n }\n }\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return != null) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n\n return candidate;\n}\n\nvar util = /*#__PURE__*/Object.freeze({\n\tisNumber: isNumber,\n\trecursiveDOMDelete: recursiveDOMDelete,\n\tisString: isString,\n\tisObject: isObject,\n\tisDate: isDate,\n\tisMoment: isMoment,\n\tfillIfDefined: fillIfDefined,\n\textend: extend,\n\tselectiveExtend: selectiveExtend,\n\tselectiveDeepExtend: selectiveDeepExtend,\n\tselectiveNotDeepExtend: selectiveNotDeepExtend,\n\tdeepExtend: deepExtend,\n\tequalArray: equalArray,\n\tconvert: convert,\n\tgetType: getType,\n\tcopyAndExtendArray: copyAndExtendArray,\n\tcopyArray: copyArray,\n\tgetAbsoluteLeft: getAbsoluteLeft,\n\tgetAbsoluteRight: getAbsoluteRight,\n\tgetAbsoluteTop: getAbsoluteTop,\n\taddClassName: addClassName,\n\tremoveClassName: removeClassName,\n\tforEach: forEach,\n\ttoArray: toArray,\n\tupdateProperty: updateProperty,\n\tthrottle: throttle,\n\taddEventListener: addEventListener,\n\tremoveEventListener: removeEventListener,\n\tpreventDefault: preventDefault,\n\tgetTarget: getTarget,\n\thasParent: hasParent,\n\toption: option,\n\thexToRGB: hexToRGB,\n\toverrideOpacity: overrideOpacity,\n\tRGBToHex: RGBToHex,\n\tparseColor: parseColor,\n\tRGBToHSV: RGBToHSV,\n\taddCssText: addCssText,\n\tremoveCssText: removeCssText,\n\tHSVToRGB: HSVToRGB,\n\tHSVToHex: HSVToHex,\n\thexToHSV: hexToHSV,\n\tisValidHex: isValidHex,\n\tisValidRGB: isValidRGB,\n\tisValidRGBA: isValidRGBA,\n\tselectiveBridgeObject: selectiveBridgeObject,\n\tbridgeObject: bridgeObject,\n\tinsertSort: insertSort,\n\tmergeOptions: mergeOptions,\n\tbinarySearchCustom: binarySearchCustom,\n\tbinarySearchValue: binarySearchValue,\n\teasingFunctions: easingFunctions,\n\tgetScrollBarWidth: getScrollBarWidth,\n\ttopMost: topMost,\n\trandomUUID: uuid4\n});\n\n// New API (tree shakeable).\n\nexport default util;\nexport { HSVToHex, HSVToRGB, RGBToHSV, RGBToHex, addClassName, addCssText, addEventListener, binarySearchCustom, binarySearchValue, bridgeObject, convert, copyAndExtendArray, copyArray, deepExtend, easingFunctions, equalArray, extend, fillIfDefined, forEach, getAbsoluteLeft, getAbsoluteRight, getAbsoluteTop, getScrollBarWidth, getTarget, getType, hasParent, hexToHSV, hexToRGB, insertSort, isDate, isMoment, isNumber, isObject, isString, isValidHex, isValidRGB, isValidRGBA, mergeOptions, option, overrideOpacity, parseColor, preventDefault, uuid4 as randomUUID, recursiveDOMDelete, removeClassName, removeCssText, removeEventListener, selectiveBridgeObject, selectiveDeepExtend, selectiveExtend, selectiveNotDeepExtend, throttle, toArray, topMost, updateProperty };\n","/** \n * vis-data - data\n * http://visjs.org/\n * \n * Manage unstructured data using DataSet. Add, update, and remove data, and listen for changes in the data.\n * \n * @version 6.1.0\n * @date 2019-07-16T13:37:00Z\n * \n * @copyright (c) 2011-2017 Almende B.V, http://almende.com\n * @copyright (c) 2018-2019 visjs contributors, https://github.com/visjs\n * \n * @license \n * vis.js is dual licensed under both\n * \n * 1. The Apache 2.0 License\n * http://www.apache.org/licenses/LICENSE-2.0\n * \n * and\n * \n * 2. The MIT License\n * http://opensource.org/licenses/MIT\n * \n * vis.js may be distributed under either license.\n */\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nvar defineProperty = _defineProperty;\n\nfunction createCommonjsModule(fn, module) {\n\treturn module = { exports: {} }, fn(module, module.exports), module.exports;\n}\n\nvar _typeof_1 = createCommonjsModule(function (module) {\n function _typeof2(obj) {\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof2 = function _typeof2(obj) {\n return typeof obj;\n };\n } else {\n _typeof2 = function _typeof2(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof2(obj);\n }\n\n function _typeof(obj) {\n if (typeof Symbol === \"function\" && _typeof2(Symbol.iterator) === \"symbol\") {\n module.exports = _typeof = function _typeof(obj) {\n return _typeof2(obj);\n };\n } else {\n module.exports = _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : _typeof2(obj);\n };\n }\n\n return _typeof(obj);\n }\n\n module.exports = _typeof;\n});\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nvar classCallCheck = _classCallCheck;\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nvar createClass = _createClass;\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nvar assertThisInitialized = _assertThisInitialized;\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof_1(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return assertThisInitialized(self);\n}\n\nvar possibleConstructorReturn = _possibleConstructorReturn;\n\nvar getPrototypeOf = createCommonjsModule(function (module) {\n function _getPrototypeOf(o) {\n module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n }\n\n module.exports = _getPrototypeOf;\n});\n\nvar setPrototypeOf = createCommonjsModule(function (module) {\n function _setPrototypeOf(o, p) {\n module.exports = _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n }\n\n module.exports = _setPrototypeOf;\n});\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) setPrototypeOf(subClass, superClass);\n}\n\nvar inherits = _inherits;\n\n// Maps for number <-> hex string conversion\nvar byteToHex = [];\n\nfor (var i = 0; i < 256; i++) {\n byteToHex[i] = (i + 0x100).toString(16).substr(1);\n}\n/**\n * Represent binary UUID into it's string representation.\n *\n * @param buf - Buffer containing UUID bytes.\n * @param offset - Offset from the start of the buffer where the UUID is saved (not needed if the buffer starts with the UUID).\n *\n * @returns String representation of the UUID.\n */\n\n\nfunction stringifyUUID(buf, offset) {\n var i = offset || 0;\n var bth = byteToHex;\n return bth[buf[i++]] + bth[buf[i++]] + bth[buf[i++]] + bth[buf[i++]] + '-' + bth[buf[i++]] + bth[buf[i++]] + '-' + bth[buf[i++]] + bth[buf[i++]] + '-' + bth[buf[i++]] + bth[buf[i++]] + '-' + bth[buf[i++]] + bth[buf[i++]] + bth[buf[i++]] + bth[buf[i++]] + bth[buf[i++]] + bth[buf[i++]];\n}\n/**\n * Generate 16 random bytes to be used as a base for UUID.\n *\n * @ignore\n */\n\n\nvar random = function () {\n if (typeof crypto !== 'undefined' && crypto.getRandomValues) {\n // WHATWG crypto-based RNG - http://wiki.whatwg.org/wiki/Crypto\n // Moderately fast, high quality\n var _rnds8 = new Uint8Array(16);\n\n return function whatwgRNG() {\n crypto.getRandomValues(_rnds8);\n return _rnds8;\n };\n } // Math.random()-based (RNG)\n //\n // If all else fails, use Math.random().\n // It's fast, but is of unspecified quality.\n\n\n var _rnds = new Array(16);\n\n return function () {\n for (var i = 0, r; i < 16; i++) {\n if ((i & 0x03) === 0) {\n r = Math.random() * 0x100000000;\n }\n\n _rnds[i] = r >>> ((i & 0x03) << 3) & 0xff;\n }\n\n return _rnds;\n }; // uuid.js\n //\n // Copyright (c) 2010-2012 Robert Kieffer\n // MIT License - http://opensource.org/licenses/mit-license.php\n // Unique ID creation requires a high quality random # generator. We feature\n // detect to determine the best RNG source, normalizing to a function that\n // returns 128-bits of randomness, since that's what's usually required\n // return require('./rng');\n}();\n\nvar byteToHex$1 = [];\n\nfor (var i$1 = 0; i$1 < 256; i$1++) {\n byteToHex$1[i$1] = (i$1 + 0x100).toString(16).substr(1);\n} // **`v1()` - Generate time-based UUID**\n//\n// Inspired by https://github.com/LiosK/UUID.js\n// and http://docs.python.org/library/uuid.html\n// random #'s we need to init node and clockseq\n\n\nvar seedBytes = random(); // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)\n\nvar defaultNodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]]; // Per 4.2.2, randomize (14 bit) clockseq\n\nvar defaultClockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff; // Previous uuid creation time\n/**\n * UUIDv4 options.\n */\n\n/**\n * Generate UUIDv4\n *\n * @param options - Options to be used instead of default generated values.\n * String 'binary' is a shorthand for uuid4({}, new Array(16)).\n * @param buf - If present the buffer will be filled with the generated UUID.\n * @param offset - Offset of the UUID from the start of the buffer.\n *\n * @returns UUIDv4\n */\n\n\nfunction uuid4() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var buf = arguments.length > 1 ? arguments[1] : undefined;\n var offset = arguments.length > 2 ? arguments[2] : undefined; // Deprecated - 'format' argument, as supported in v1.2\n\n var i = buf && offset || 0;\n\n if (typeof options === 'string') {\n buf = options === 'binary' ? new Array(16) : undefined;\n options = {};\n }\n\n var rnds = options.random || (options.rng || random)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n for (var ii = 0; ii < 16; ii++) {\n buf[i + ii] = rnds[ii];\n }\n }\n\n return buf || stringifyUUID(rnds);\n} // Rollup will complain about mixing default and named exports in UMD build,\n\nfunction _typeof(obj) {\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function (obj) {\n return typeof obj;\n };\n } else {\n _typeof = function (obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nvar commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};\n\nfunction commonjsRequire() {\n throw new Error('Dynamic requires are not currently supported by rollup-plugin-commonjs');\n}\n\nfunction createCommonjsModule$1(fn, module) {\n return module = {\n exports: {}\n }, fn(module, module.exports), module.exports;\n}\n\nvar moment = createCommonjsModule$1(function (module, exports) {\n (function (global, factory) {\n module.exports = factory();\n })(commonjsGlobal, function () {\n var hookCallback;\n\n function hooks() {\n return hookCallback.apply(null, arguments);\n } // This is done to register the method called with moment()\n // without creating circular dependencies.\n\n\n function setHookCallback(callback) {\n hookCallback = callback;\n }\n\n function isArray(input) {\n return input instanceof Array || Object.prototype.toString.call(input) === '[object Array]';\n }\n\n function isObject(input) {\n // IE8 will treat undefined and null as object if it wasn't for\n // input != null\n return input != null && Object.prototype.toString.call(input) === '[object Object]';\n }\n\n function isObjectEmpty(obj) {\n if (Object.getOwnPropertyNames) {\n return Object.getOwnPropertyNames(obj).length === 0;\n } else {\n var k;\n\n for (k in obj) {\n if (obj.hasOwnProperty(k)) {\n return false;\n }\n }\n\n return true;\n }\n }\n\n function isUndefined(input) {\n return input === void 0;\n }\n\n function isNumber(input) {\n return typeof input === 'number' || Object.prototype.toString.call(input) === '[object Number]';\n }\n\n function isDate(input) {\n return input instanceof Date || Object.prototype.toString.call(input) === '[object Date]';\n }\n\n function map(arr, fn) {\n var res = [],\n i;\n\n for (i = 0; i < arr.length; ++i) {\n res.push(fn(arr[i], i));\n }\n\n return res;\n }\n\n function hasOwnProp(a, b) {\n return Object.prototype.hasOwnProperty.call(a, b);\n }\n\n function extend(a, b) {\n for (var i in b) {\n if (hasOwnProp(b, i)) {\n a[i] = b[i];\n }\n }\n\n if (hasOwnProp(b, 'toString')) {\n a.toString = b.toString;\n }\n\n if (hasOwnProp(b, 'valueOf')) {\n a.valueOf = b.valueOf;\n }\n\n return a;\n }\n\n function createUTC(input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, true).utc();\n }\n\n function defaultParsingFlags() {\n // We need to deep clone this object.\n return {\n empty: false,\n unusedTokens: [],\n unusedInput: [],\n overflow: -2,\n charsLeftOver: 0,\n nullInput: false,\n invalidMonth: null,\n invalidFormat: false,\n userInvalidated: false,\n iso: false,\n parsedDateParts: [],\n meridiem: null,\n rfc2822: false,\n weekdayMismatch: false\n };\n }\n\n function getParsingFlags(m) {\n if (m._pf == null) {\n m._pf = defaultParsingFlags();\n }\n\n return m._pf;\n }\n\n var some;\n\n if (Array.prototype.some) {\n some = Array.prototype.some;\n } else {\n some = function (fun) {\n var t = Object(this);\n var len = t.length >>> 0;\n\n for (var i = 0; i < len; i++) {\n if (i in t && fun.call(this, t[i], i, t)) {\n return true;\n }\n }\n\n return false;\n };\n }\n\n function isValid(m) {\n if (m._isValid == null) {\n var flags = getParsingFlags(m);\n var parsedParts = some.call(flags.parsedDateParts, function (i) {\n return i != null;\n });\n var isNowValid = !isNaN(m._d.getTime()) && flags.overflow < 0 && !flags.empty && !flags.invalidMonth && !flags.invalidWeekday && !flags.weekdayMismatch && !flags.nullInput && !flags.invalidFormat && !flags.userInvalidated && (!flags.meridiem || flags.meridiem && parsedParts);\n\n if (m._strict) {\n isNowValid = isNowValid && flags.charsLeftOver === 0 && flags.unusedTokens.length === 0 && flags.bigHour === undefined;\n }\n\n if (Object.isFrozen == null || !Object.isFrozen(m)) {\n m._isValid = isNowValid;\n } else {\n return isNowValid;\n }\n }\n\n return m._isValid;\n }\n\n function createInvalid(flags) {\n var m = createUTC(NaN);\n\n if (flags != null) {\n extend(getParsingFlags(m), flags);\n } else {\n getParsingFlags(m).userInvalidated = true;\n }\n\n return m;\n } // Plugins that add properties should also add the key here (null value),\n // so we can properly clone ourselves.\n\n\n var momentProperties = hooks.momentProperties = [];\n\n function copyConfig(to, from) {\n var i, prop, val;\n\n if (!isUndefined(from._isAMomentObject)) {\n to._isAMomentObject = from._isAMomentObject;\n }\n\n if (!isUndefined(from._i)) {\n to._i = from._i;\n }\n\n if (!isUndefined(from._f)) {\n to._f = from._f;\n }\n\n if (!isUndefined(from._l)) {\n to._l = from._l;\n }\n\n if (!isUndefined(from._strict)) {\n to._strict = from._strict;\n }\n\n if (!isUndefined(from._tzm)) {\n to._tzm = from._tzm;\n }\n\n if (!isUndefined(from._isUTC)) {\n to._isUTC = from._isUTC;\n }\n\n if (!isUndefined(from._offset)) {\n to._offset = from._offset;\n }\n\n if (!isUndefined(from._pf)) {\n to._pf = getParsingFlags(from);\n }\n\n if (!isUndefined(from._locale)) {\n to._locale = from._locale;\n }\n\n if (momentProperties.length > 0) {\n for (i = 0; i < momentProperties.length; i++) {\n prop = momentProperties[i];\n val = from[prop];\n\n if (!isUndefined(val)) {\n to[prop] = val;\n }\n }\n }\n\n return to;\n }\n\n var updateInProgress = false; // Moment prototype object\n\n function Moment(config) {\n copyConfig(this, config);\n this._d = new Date(config._d != null ? config._d.getTime() : NaN);\n\n if (!this.isValid()) {\n this._d = new Date(NaN);\n } // Prevent infinite loop in case updateOffset creates new moment\n // objects.\n\n\n if (updateInProgress === false) {\n updateInProgress = true;\n hooks.updateOffset(this);\n updateInProgress = false;\n }\n }\n\n function isMoment(obj) {\n return obj instanceof Moment || obj != null && obj._isAMomentObject != null;\n }\n\n function absFloor(number) {\n if (number < 0) {\n // -0 -> 0\n return Math.ceil(number) || 0;\n } else {\n return Math.floor(number);\n }\n }\n\n function toInt(argumentForCoercion) {\n var coercedNumber = +argumentForCoercion,\n value = 0;\n\n if (coercedNumber !== 0 && isFinite(coercedNumber)) {\n value = absFloor(coercedNumber);\n }\n\n return value;\n } // compare two arrays, return the number of differences\n\n\n function compareArrays(array1, array2, dontConvert) {\n var len = Math.min(array1.length, array2.length),\n lengthDiff = Math.abs(array1.length - array2.length),\n diffs = 0,\n i;\n\n for (i = 0; i < len; i++) {\n if (dontConvert && array1[i] !== array2[i] || !dontConvert && toInt(array1[i]) !== toInt(array2[i])) {\n diffs++;\n }\n }\n\n return diffs + lengthDiff;\n }\n\n function warn(msg) {\n if (hooks.suppressDeprecationWarnings === false && typeof console !== 'undefined' && console.warn) {\n console.warn('Deprecation warning: ' + msg);\n }\n }\n\n function deprecate(msg, fn) {\n var firstTime = true;\n return extend(function () {\n if (hooks.deprecationHandler != null) {\n hooks.deprecationHandler(null, msg);\n }\n\n if (firstTime) {\n var args = [];\n var arg;\n\n for (var i = 0; i < arguments.length; i++) {\n arg = '';\n\n if (typeof arguments[i] === 'object') {\n arg += '\\n[' + i + '] ';\n\n for (var key in arguments[0]) {\n arg += key + ': ' + arguments[0][key] + ', ';\n }\n\n arg = arg.slice(0, -2); // Remove trailing comma and space\n } else {\n arg = arguments[i];\n }\n\n args.push(arg);\n }\n\n warn(msg + '\\nArguments: ' + Array.prototype.slice.call(args).join('') + '\\n' + new Error().stack);\n firstTime = false;\n }\n\n return fn.apply(this, arguments);\n }, fn);\n }\n\n var deprecations = {};\n\n function deprecateSimple(name, msg) {\n if (hooks.deprecationHandler != null) {\n hooks.deprecationHandler(name, msg);\n }\n\n if (!deprecations[name]) {\n warn(msg);\n deprecations[name] = true;\n }\n }\n\n hooks.suppressDeprecationWarnings = false;\n hooks.deprecationHandler = null;\n\n function isFunction(input) {\n return input instanceof Function || Object.prototype.toString.call(input) === '[object Function]';\n }\n\n function set(config) {\n var prop, i;\n\n for (i in config) {\n prop = config[i];\n\n if (isFunction(prop)) {\n this[i] = prop;\n } else {\n this['_' + i] = prop;\n }\n }\n\n this._config = config; // Lenient ordinal parsing accepts just a number in addition to\n // number + (possibly) stuff coming from _dayOfMonthOrdinalParse.\n // TODO: Remove \"ordinalParse\" fallback in next major release.\n\n this._dayOfMonthOrdinalParseLenient = new RegExp((this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) + '|' + /\\d{1,2}/.source);\n }\n\n function mergeConfigs(parentConfig, childConfig) {\n var res = extend({}, parentConfig),\n prop;\n\n for (prop in childConfig) {\n if (hasOwnProp(childConfig, prop)) {\n if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) {\n res[prop] = {};\n extend(res[prop], parentConfig[prop]);\n extend(res[prop], childConfig[prop]);\n } else if (childConfig[prop] != null) {\n res[prop] = childConfig[prop];\n } else {\n delete res[prop];\n }\n }\n }\n\n for (prop in parentConfig) {\n if (hasOwnProp(parentConfig, prop) && !hasOwnProp(childConfig, prop) && isObject(parentConfig[prop])) {\n // make sure changes to properties don't modify parent config\n res[prop] = extend({}, res[prop]);\n }\n }\n\n return res;\n }\n\n function Locale(config) {\n if (config != null) {\n this.set(config);\n }\n }\n\n var keys;\n\n if (Object.keys) {\n keys = Object.keys;\n } else {\n keys = function (obj) {\n var i,\n res = [];\n\n for (i in obj) {\n if (hasOwnProp(obj, i)) {\n res.push(i);\n }\n }\n\n return res;\n };\n }\n\n var defaultCalendar = {\n sameDay: '[Today at] LT',\n nextDay: '[Tomorrow at] LT',\n nextWeek: 'dddd [at] LT',\n lastDay: '[Yesterday at] LT',\n lastWeek: '[Last] dddd [at] LT',\n sameElse: 'L'\n };\n\n function calendar(key, mom, now) {\n var output = this._calendar[key] || this._calendar['sameElse'];\n return isFunction(output) ? output.call(mom, now) : output;\n }\n\n var defaultLongDateFormat = {\n LTS: 'h:mm:ss A',\n LT: 'h:mm A',\n L: 'MM/DD/YYYY',\n LL: 'MMMM D, YYYY',\n LLL: 'MMMM D, YYYY h:mm A',\n LLLL: 'dddd, MMMM D, YYYY h:mm A'\n };\n\n function longDateFormat(key) {\n var format = this._longDateFormat[key],\n formatUpper = this._longDateFormat[key.toUpperCase()];\n\n if (format || !formatUpper) {\n return format;\n }\n\n this._longDateFormat[key] = formatUpper.replace(/MMMM|MM|DD|dddd/g, function (val) {\n return val.slice(1);\n });\n return this._longDateFormat[key];\n }\n\n var defaultInvalidDate = 'Invalid date';\n\n function invalidDate() {\n return this._invalidDate;\n }\n\n var defaultOrdinal = '%d';\n var defaultDayOfMonthOrdinalParse = /\\d{1,2}/;\n\n function ordinal(number) {\n return this._ordinal.replace('%d', number);\n }\n\n var defaultRelativeTime = {\n future: 'in %s',\n past: '%s ago',\n s: 'a few seconds',\n ss: '%d seconds',\n m: 'a minute',\n mm: '%d minutes',\n h: 'an hour',\n hh: '%d hours',\n d: 'a day',\n dd: '%d days',\n M: 'a month',\n MM: '%d months',\n y: 'a year',\n yy: '%d years'\n };\n\n function relativeTime(number, withoutSuffix, string, isFuture) {\n var output = this._relativeTime[string];\n return isFunction(output) ? output(number, withoutSuffix, string, isFuture) : output.replace(/%d/i, number);\n }\n\n function pastFuture(diff, output) {\n var format = this._relativeTime[diff > 0 ? 'future' : 'past'];\n return isFunction(format) ? format(output) : format.replace(/%s/i, output);\n }\n\n var aliases = {};\n\n function addUnitAlias(unit, shorthand) {\n var lowerCase = unit.toLowerCase();\n aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit;\n }\n\n function normalizeUnits(units) {\n return typeof units === 'string' ? aliases[units] || aliases[units.toLowerCase()] : undefined;\n }\n\n function normalizeObjectUnits(inputObject) {\n var normalizedInput = {},\n normalizedProp,\n prop;\n\n for (prop in inputObject) {\n if (hasOwnProp(inputObject, prop)) {\n normalizedProp = normalizeUnits(prop);\n\n if (normalizedProp) {\n normalizedInput[normalizedProp] = inputObject[prop];\n }\n }\n }\n\n return normalizedInput;\n }\n\n var priorities = {};\n\n function addUnitPriority(unit, priority) {\n priorities[unit] = priority;\n }\n\n function getPrioritizedUnits(unitsObj) {\n var units = [];\n\n for (var u in unitsObj) {\n units.push({\n unit: u,\n priority: priorities[u]\n });\n }\n\n units.sort(function (a, b) {\n return a.priority - b.priority;\n });\n return units;\n }\n\n function zeroFill(number, targetLength, forceSign) {\n var absNumber = '' + Math.abs(number),\n zerosToFill = targetLength - absNumber.length,\n sign = number >= 0;\n return (sign ? forceSign ? '+' : '' : '-') + Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) + absNumber;\n }\n\n var formattingTokens = /(\\[[^\\[]*\\])|(\\\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g;\n var localFormattingTokens = /(\\[[^\\[]*\\])|(\\\\)?(LTS|LT|LL?L?L?|l{1,4})/g;\n var formatFunctions = {};\n var formatTokenFunctions = {}; // token: 'M'\n // padded: ['MM', 2]\n // ordinal: 'Mo'\n // callback: function () { this.month() + 1 }\n\n function addFormatToken(token, padded, ordinal, callback) {\n var func = callback;\n\n if (typeof callback === 'string') {\n func = function () {\n return this[callback]();\n };\n }\n\n if (token) {\n formatTokenFunctions[token] = func;\n }\n\n if (padded) {\n formatTokenFunctions[padded[0]] = function () {\n return zeroFill(func.apply(this, arguments), padded[1], padded[2]);\n };\n }\n\n if (ordinal) {\n formatTokenFunctions[ordinal] = function () {\n return this.localeData().ordinal(func.apply(this, arguments), token);\n };\n }\n }\n\n function removeFormattingTokens(input) {\n if (input.match(/\\[[\\s\\S]/)) {\n return input.replace(/^\\[|\\]$/g, '');\n }\n\n return input.replace(/\\\\/g, '');\n }\n\n function makeFormatFunction(format) {\n var array = format.match(formattingTokens),\n i,\n length;\n\n for (i = 0, length = array.length; i < length; i++) {\n if (formatTokenFunctions[array[i]]) {\n array[i] = formatTokenFunctions[array[i]];\n } else {\n array[i] = removeFormattingTokens(array[i]);\n }\n }\n\n return function (mom) {\n var output = '',\n i;\n\n for (i = 0; i < length; i++) {\n output += isFunction(array[i]) ? array[i].call(mom, format) : array[i];\n }\n\n return output;\n };\n } // format date using native date object\n\n\n function formatMoment(m, format) {\n if (!m.isValid()) {\n return m.localeData().invalidDate();\n }\n\n format = expandFormat(format, m.localeData());\n formatFunctions[format] = formatFunctions[format] || makeFormatFunction(format);\n return formatFunctions[format](m);\n }\n\n function expandFormat(format, locale) {\n var i = 5;\n\n function replaceLongDateFormatTokens(input) {\n return locale.longDateFormat(input) || input;\n }\n\n localFormattingTokens.lastIndex = 0;\n\n while (i >= 0 && localFormattingTokens.test(format)) {\n format = format.replace(localFormattingTokens, replaceLongDateFormatTokens);\n localFormattingTokens.lastIndex = 0;\n i -= 1;\n }\n\n return format;\n }\n\n var match1 = /\\d/; // 0 - 9\n\n var match2 = /\\d\\d/; // 00 - 99\n\n var match3 = /\\d{3}/; // 000 - 999\n\n var match4 = /\\d{4}/; // 0000 - 9999\n\n var match6 = /[+-]?\\d{6}/; // -999999 - 999999\n\n var match1to2 = /\\d\\d?/; // 0 - 99\n\n var match3to4 = /\\d\\d\\d\\d?/; // 999 - 9999\n\n var match5to6 = /\\d\\d\\d\\d\\d\\d?/; // 99999 - 999999\n\n var match1to3 = /\\d{1,3}/; // 0 - 999\n\n var match1to4 = /\\d{1,4}/; // 0 - 9999\n\n var match1to6 = /[+-]?\\d{1,6}/; // -999999 - 999999\n\n var matchUnsigned = /\\d+/; // 0 - inf\n\n var matchSigned = /[+-]?\\d+/; // -inf - inf\n\n var matchOffset = /Z|[+-]\\d\\d:?\\d\\d/gi; // +00:00 -00:00 +0000 -0000 or Z\n\n var matchShortOffset = /Z|[+-]\\d\\d(?::?\\d\\d)?/gi; // +00 -00 +00:00 -00:00 +0000 -0000 or Z\n\n var matchTimestamp = /[+-]?\\d+(\\.\\d{1,3})?/; // 123456789 123456789.123\n // any word (or two) characters or numbers including two/three word month in arabic.\n // includes scottish gaelic two word and hyphenated months\n\n var matchWord = /[0-9]{0,256}['a-z\\u00A0-\\u05FF\\u0700-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFF07\\uFF10-\\uFFEF]{1,256}|[\\u0600-\\u06FF\\/]{1,256}(\\s*?[\\u0600-\\u06FF]{1,256}){1,2}/i;\n var regexes = {};\n\n function addRegexToken(token, regex, strictRegex) {\n regexes[token] = isFunction(regex) ? regex : function (isStrict, localeData) {\n return isStrict && strictRegex ? strictRegex : regex;\n };\n }\n\n function getParseRegexForToken(token, config) {\n if (!hasOwnProp(regexes, token)) {\n return new RegExp(unescapeFormat(token));\n }\n\n return regexes[token](config._strict, config._locale);\n } // Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript\n\n\n function unescapeFormat(s) {\n return regexEscape(s.replace('\\\\', '').replace(/\\\\(\\[)|\\\\(\\])|\\[([^\\]\\[]*)\\]|\\\\(.)/g, function (matched, p1, p2, p3, p4) {\n return p1 || p2 || p3 || p4;\n }));\n }\n\n function regexEscape(s) {\n return s.replace(/[-\\/\\\\^$*+?.()|[\\]{}]/g, '\\\\$&');\n }\n\n var tokens = {};\n\n function addParseToken(token, callback) {\n var i,\n func = callback;\n\n if (typeof token === 'string') {\n token = [token];\n }\n\n if (isNumber(callback)) {\n func = function (input, array) {\n array[callback] = toInt(input);\n };\n }\n\n for (i = 0; i < token.length; i++) {\n tokens[token[i]] = func;\n }\n }\n\n function addWeekParseToken(token, callback) {\n addParseToken(token, function (input, array, config, token) {\n config._w = config._w || {};\n callback(input, config._w, config, token);\n });\n }\n\n function addTimeToArrayFromToken(token, input, config) {\n if (input != null && hasOwnProp(tokens, token)) {\n tokens[token](input, config._a, config, token);\n }\n }\n\n var YEAR = 0;\n var MONTH = 1;\n var DATE = 2;\n var HOUR = 3;\n var MINUTE = 4;\n var SECOND = 5;\n var MILLISECOND = 6;\n var WEEK = 7;\n var WEEKDAY = 8; // FORMATTING\n\n addFormatToken('Y', 0, 0, function () {\n var y = this.year();\n return y <= 9999 ? '' + y : '+' + y;\n });\n addFormatToken(0, ['YY', 2], 0, function () {\n return this.year() % 100;\n });\n addFormatToken(0, ['YYYY', 4], 0, 'year');\n addFormatToken(0, ['YYYYY', 5], 0, 'year');\n addFormatToken(0, ['YYYYYY', 6, true], 0, 'year'); // ALIASES\n\n addUnitAlias('year', 'y'); // PRIORITIES\n\n addUnitPriority('year', 1); // PARSING\n\n addRegexToken('Y', matchSigned);\n addRegexToken('YY', match1to2, match2);\n addRegexToken('YYYY', match1to4, match4);\n addRegexToken('YYYYY', match1to6, match6);\n addRegexToken('YYYYYY', match1to6, match6);\n addParseToken(['YYYYY', 'YYYYYY'], YEAR);\n addParseToken('YYYY', function (input, array) {\n array[YEAR] = input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input);\n });\n addParseToken('YY', function (input, array) {\n array[YEAR] = hooks.parseTwoDigitYear(input);\n });\n addParseToken('Y', function (input, array) {\n array[YEAR] = parseInt(input, 10);\n }); // HELPERS\n\n function daysInYear(year) {\n return isLeapYear(year) ? 366 : 365;\n }\n\n function isLeapYear(year) {\n return year % 4 === 0 && year % 100 !== 0 || year % 400 === 0;\n } // HOOKS\n\n\n hooks.parseTwoDigitYear = function (input) {\n return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);\n }; // MOMENTS\n\n\n var getSetYear = makeGetSet('FullYear', true);\n\n function getIsLeapYear() {\n return isLeapYear(this.year());\n }\n\n function makeGetSet(unit, keepTime) {\n return function (value) {\n if (value != null) {\n set$1(this, unit, value);\n hooks.updateOffset(this, keepTime);\n return this;\n } else {\n return get(this, unit);\n }\n };\n }\n\n function get(mom, unit) {\n return mom.isValid() ? mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]() : NaN;\n }\n\n function set$1(mom, unit, value) {\n if (mom.isValid() && !isNaN(value)) {\n if (unit === 'FullYear' && isLeapYear(mom.year()) && mom.month() === 1 && mom.date() === 29) {\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value, mom.month(), daysInMonth(value, mom.month()));\n } else {\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value);\n }\n }\n } // MOMENTS\n\n\n function stringGet(units) {\n units = normalizeUnits(units);\n\n if (isFunction(this[units])) {\n return this[units]();\n }\n\n return this;\n }\n\n function stringSet(units, value) {\n if (typeof units === 'object') {\n units = normalizeObjectUnits(units);\n var prioritized = getPrioritizedUnits(units);\n\n for (var i = 0; i < prioritized.length; i++) {\n this[prioritized[i].unit](units[prioritized[i].unit]);\n }\n } else {\n units = normalizeUnits(units);\n\n if (isFunction(this[units])) {\n return this[units](value);\n }\n }\n\n return this;\n }\n\n function mod(n, x) {\n return (n % x + x) % x;\n }\n\n var indexOf;\n\n if (Array.prototype.indexOf) {\n indexOf = Array.prototype.indexOf;\n } else {\n indexOf = function (o) {\n // I know\n var i;\n\n for (i = 0; i < this.length; ++i) {\n if (this[i] === o) {\n return i;\n }\n }\n\n return -1;\n };\n }\n\n function daysInMonth(year, month) {\n if (isNaN(year) || isNaN(month)) {\n return NaN;\n }\n\n var modMonth = mod(month, 12);\n year += (month - modMonth) / 12;\n return modMonth === 1 ? isLeapYear(year) ? 29 : 28 : 31 - modMonth % 7 % 2;\n } // FORMATTING\n\n\n addFormatToken('M', ['MM', 2], 'Mo', function () {\n return this.month() + 1;\n });\n addFormatToken('MMM', 0, 0, function (format) {\n return this.localeData().monthsShort(this, format);\n });\n addFormatToken('MMMM', 0, 0, function (format) {\n return this.localeData().months(this, format);\n }); // ALIASES\n\n addUnitAlias('month', 'M'); // PRIORITY\n\n addUnitPriority('month', 8); // PARSING\n\n addRegexToken('M', match1to2);\n addRegexToken('MM', match1to2, match2);\n addRegexToken('MMM', function (isStrict, locale) {\n return locale.monthsShortRegex(isStrict);\n });\n addRegexToken('MMMM', function (isStrict, locale) {\n return locale.monthsRegex(isStrict);\n });\n addParseToken(['M', 'MM'], function (input, array) {\n array[MONTH] = toInt(input) - 1;\n });\n addParseToken(['MMM', 'MMMM'], function (input, array, config, token) {\n var month = config._locale.monthsParse(input, token, config._strict); // if we didn't find a month name, mark the date as invalid.\n\n\n if (month != null) {\n array[MONTH] = month;\n } else {\n getParsingFlags(config).invalidMonth = input;\n }\n }); // LOCALES\n\n var MONTHS_IN_FORMAT = /D[oD]?(\\[[^\\[\\]]*\\]|\\s)+MMMM?/;\n var defaultLocaleMonths = 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_');\n\n function localeMonths(m, format) {\n if (!m) {\n return isArray(this._months) ? this._months : this._months['standalone'];\n }\n\n return isArray(this._months) ? this._months[m.month()] : this._months[(this._months.isFormat || MONTHS_IN_FORMAT).test(format) ? 'format' : 'standalone'][m.month()];\n }\n\n var defaultLocaleMonthsShort = 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_');\n\n function localeMonthsShort(m, format) {\n if (!m) {\n return isArray(this._monthsShort) ? this._monthsShort : this._monthsShort['standalone'];\n }\n\n return isArray(this._monthsShort) ? this._monthsShort[m.month()] : this._monthsShort[MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'][m.month()];\n }\n\n function handleStrictParse(monthName, format, strict) {\n var i,\n ii,\n mom,\n llc = monthName.toLocaleLowerCase();\n\n if (!this._monthsParse) {\n // this is not used\n this._monthsParse = [];\n this._longMonthsParse = [];\n this._shortMonthsParse = [];\n\n for (i = 0; i < 12; ++i) {\n mom = createUTC([2000, i]);\n this._shortMonthsParse[i] = this.monthsShort(mom, '').toLocaleLowerCase();\n this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase();\n }\n }\n\n if (strict) {\n if (format === 'MMM') {\n ii = indexOf.call(this._shortMonthsParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._longMonthsParse, llc);\n return ii !== -1 ? ii : null;\n }\n } else {\n if (format === 'MMM') {\n ii = indexOf.call(this._shortMonthsParse, llc);\n\n if (ii !== -1) {\n return ii;\n }\n\n ii = indexOf.call(this._longMonthsParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._longMonthsParse, llc);\n\n if (ii !== -1) {\n return ii;\n }\n\n ii = indexOf.call(this._shortMonthsParse, llc);\n return ii !== -1 ? ii : null;\n }\n }\n }\n\n function localeMonthsParse(monthName, format, strict) {\n var i, mom, regex;\n\n if (this._monthsParseExact) {\n return handleStrictParse.call(this, monthName, format, strict);\n }\n\n if (!this._monthsParse) {\n this._monthsParse = [];\n this._longMonthsParse = [];\n this._shortMonthsParse = [];\n } // TODO: add sorting\n // Sorting makes sure if one month (or abbr) is a prefix of another\n // see sorting in computeMonthsParse\n\n\n for (i = 0; i < 12; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, i]);\n\n if (strict && !this._longMonthsParse[i]) {\n this._longMonthsParse[i] = new RegExp('^' + this.months(mom, '').replace('.', '') + '$', 'i');\n this._shortMonthsParse[i] = new RegExp('^' + this.monthsShort(mom, '').replace('.', '') + '$', 'i');\n }\n\n if (!strict && !this._monthsParse[i]) {\n regex = '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, '');\n this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i');\n } // test the regex\n\n\n if (strict && format === 'MMMM' && this._longMonthsParse[i].test(monthName)) {\n return i;\n } else if (strict && format === 'MMM' && this._shortMonthsParse[i].test(monthName)) {\n return i;\n } else if (!strict && this._monthsParse[i].test(monthName)) {\n return i;\n }\n }\n } // MOMENTS\n\n\n function setMonth(mom, value) {\n var dayOfMonth;\n\n if (!mom.isValid()) {\n // No op\n return mom;\n }\n\n if (typeof value === 'string') {\n if (/^\\d+$/.test(value)) {\n value = toInt(value);\n } else {\n value = mom.localeData().monthsParse(value); // TODO: Another silent failure?\n\n if (!isNumber(value)) {\n return mom;\n }\n }\n }\n\n dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value));\n\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth);\n\n return mom;\n }\n\n function getSetMonth(value) {\n if (value != null) {\n setMonth(this, value);\n hooks.updateOffset(this, true);\n return this;\n } else {\n return get(this, 'Month');\n }\n }\n\n function getDaysInMonth() {\n return daysInMonth(this.year(), this.month());\n }\n\n var defaultMonthsShortRegex = matchWord;\n\n function monthsShortRegex(isStrict) {\n if (this._monthsParseExact) {\n if (!hasOwnProp(this, '_monthsRegex')) {\n computeMonthsParse.call(this);\n }\n\n if (isStrict) {\n return this._monthsShortStrictRegex;\n } else {\n return this._monthsShortRegex;\n }\n } else {\n if (!hasOwnProp(this, '_monthsShortRegex')) {\n this._monthsShortRegex = defaultMonthsShortRegex;\n }\n\n return this._monthsShortStrictRegex && isStrict ? this._monthsShortStrictRegex : this._monthsShortRegex;\n }\n }\n\n var defaultMonthsRegex = matchWord;\n\n function monthsRegex(isStrict) {\n if (this._monthsParseExact) {\n if (!hasOwnProp(this, '_monthsRegex')) {\n computeMonthsParse.call(this);\n }\n\n if (isStrict) {\n return this._monthsStrictRegex;\n } else {\n return this._monthsRegex;\n }\n } else {\n if (!hasOwnProp(this, '_monthsRegex')) {\n this._monthsRegex = defaultMonthsRegex;\n }\n\n return this._monthsStrictRegex && isStrict ? this._monthsStrictRegex : this._monthsRegex;\n }\n }\n\n function computeMonthsParse() {\n function cmpLenRev(a, b) {\n return b.length - a.length;\n }\n\n var shortPieces = [],\n longPieces = [],\n mixedPieces = [],\n i,\n mom;\n\n for (i = 0; i < 12; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, i]);\n shortPieces.push(this.monthsShort(mom, ''));\n longPieces.push(this.months(mom, ''));\n mixedPieces.push(this.months(mom, ''));\n mixedPieces.push(this.monthsShort(mom, ''));\n } // Sorting makes sure if one month (or abbr) is a prefix of another it\n // will match the longer piece.\n\n\n shortPieces.sort(cmpLenRev);\n longPieces.sort(cmpLenRev);\n mixedPieces.sort(cmpLenRev);\n\n for (i = 0; i < 12; i++) {\n shortPieces[i] = regexEscape(shortPieces[i]);\n longPieces[i] = regexEscape(longPieces[i]);\n }\n\n for (i = 0; i < 24; i++) {\n mixedPieces[i] = regexEscape(mixedPieces[i]);\n }\n\n this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._monthsShortRegex = this._monthsRegex;\n this._monthsStrictRegex = new RegExp('^(' + longPieces.join('|') + ')', 'i');\n this._monthsShortStrictRegex = new RegExp('^(' + shortPieces.join('|') + ')', 'i');\n }\n\n function createDate(y, m, d, h, M, s, ms) {\n // can't just apply() to create a date:\n // https://stackoverflow.com/q/181348\n var date; // the date constructor remaps years 0-99 to 1900-1999\n\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n date = new Date(y + 400, m, d, h, M, s, ms);\n\n if (isFinite(date.getFullYear())) {\n date.setFullYear(y);\n }\n } else {\n date = new Date(y, m, d, h, M, s, ms);\n }\n\n return date;\n }\n\n function createUTCDate(y) {\n var date; // the Date.UTC function remaps years 0-99 to 1900-1999\n\n if (y < 100 && y >= 0) {\n var args = Array.prototype.slice.call(arguments); // preserve leap years using a full 400 year cycle, then reset\n\n args[0] = y + 400;\n date = new Date(Date.UTC.apply(null, args));\n\n if (isFinite(date.getUTCFullYear())) {\n date.setUTCFullYear(y);\n }\n } else {\n date = new Date(Date.UTC.apply(null, arguments));\n }\n\n return date;\n } // start-of-first-week - start-of-year\n\n\n function firstWeekOffset(year, dow, doy) {\n var // first-week day -- which january is always in the first week (4 for iso, 1 for other)\n fwd = 7 + dow - doy,\n // first-week day local weekday -- which local weekday is fwd\n fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7;\n return -fwdlw + fwd - 1;\n } // https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday\n\n\n function dayOfYearFromWeeks(year, week, weekday, dow, doy) {\n var localWeekday = (7 + weekday - dow) % 7,\n weekOffset = firstWeekOffset(year, dow, doy),\n dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset,\n resYear,\n resDayOfYear;\n\n if (dayOfYear <= 0) {\n resYear = year - 1;\n resDayOfYear = daysInYear(resYear) + dayOfYear;\n } else if (dayOfYear > daysInYear(year)) {\n resYear = year + 1;\n resDayOfYear = dayOfYear - daysInYear(year);\n } else {\n resYear = year;\n resDayOfYear = dayOfYear;\n }\n\n return {\n year: resYear,\n dayOfYear: resDayOfYear\n };\n }\n\n function weekOfYear(mom, dow, doy) {\n var weekOffset = firstWeekOffset(mom.year(), dow, doy),\n week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1,\n resWeek,\n resYear;\n\n if (week < 1) {\n resYear = mom.year() - 1;\n resWeek = week + weeksInYear(resYear, dow, doy);\n } else if (week > weeksInYear(mom.year(), dow, doy)) {\n resWeek = week - weeksInYear(mom.year(), dow, doy);\n resYear = mom.year() + 1;\n } else {\n resYear = mom.year();\n resWeek = week;\n }\n\n return {\n week: resWeek,\n year: resYear\n };\n }\n\n function weeksInYear(year, dow, doy) {\n var weekOffset = firstWeekOffset(year, dow, doy),\n weekOffsetNext = firstWeekOffset(year + 1, dow, doy);\n return (daysInYear(year) - weekOffset + weekOffsetNext) / 7;\n } // FORMATTING\n\n\n addFormatToken('w', ['ww', 2], 'wo', 'week');\n addFormatToken('W', ['WW', 2], 'Wo', 'isoWeek'); // ALIASES\n\n addUnitAlias('week', 'w');\n addUnitAlias('isoWeek', 'W'); // PRIORITIES\n\n addUnitPriority('week', 5);\n addUnitPriority('isoWeek', 5); // PARSING\n\n addRegexToken('w', match1to2);\n addRegexToken('ww', match1to2, match2);\n addRegexToken('W', match1to2);\n addRegexToken('WW', match1to2, match2);\n addWeekParseToken(['w', 'ww', 'W', 'WW'], function (input, week, config, token) {\n week[token.substr(0, 1)] = toInt(input);\n }); // HELPERS\n // LOCALES\n\n function localeWeek(mom) {\n return weekOfYear(mom, this._week.dow, this._week.doy).week;\n }\n\n var defaultLocaleWeek = {\n dow: 0,\n // Sunday is the first day of the week.\n doy: 6 // The week that contains Jan 6th is the first week of the year.\n\n };\n\n function localeFirstDayOfWeek() {\n return this._week.dow;\n }\n\n function localeFirstDayOfYear() {\n return this._week.doy;\n } // MOMENTS\n\n\n function getSetWeek(input) {\n var week = this.localeData().week(this);\n return input == null ? week : this.add((input - week) * 7, 'd');\n }\n\n function getSetISOWeek(input) {\n var week = weekOfYear(this, 1, 4).week;\n return input == null ? week : this.add((input - week) * 7, 'd');\n } // FORMATTING\n\n\n addFormatToken('d', 0, 'do', 'day');\n addFormatToken('dd', 0, 0, function (format) {\n return this.localeData().weekdaysMin(this, format);\n });\n addFormatToken('ddd', 0, 0, function (format) {\n return this.localeData().weekdaysShort(this, format);\n });\n addFormatToken('dddd', 0, 0, function (format) {\n return this.localeData().weekdays(this, format);\n });\n addFormatToken('e', 0, 0, 'weekday');\n addFormatToken('E', 0, 0, 'isoWeekday'); // ALIASES\n\n addUnitAlias('day', 'd');\n addUnitAlias('weekday', 'e');\n addUnitAlias('isoWeekday', 'E'); // PRIORITY\n\n addUnitPriority('day', 11);\n addUnitPriority('weekday', 11);\n addUnitPriority('isoWeekday', 11); // PARSING\n\n addRegexToken('d', match1to2);\n addRegexToken('e', match1to2);\n addRegexToken('E', match1to2);\n addRegexToken('dd', function (isStrict, locale) {\n return locale.weekdaysMinRegex(isStrict);\n });\n addRegexToken('ddd', function (isStrict, locale) {\n return locale.weekdaysShortRegex(isStrict);\n });\n addRegexToken('dddd', function (isStrict, locale) {\n return locale.weekdaysRegex(isStrict);\n });\n addWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) {\n var weekday = config._locale.weekdaysParse(input, token, config._strict); // if we didn't get a weekday name, mark the date as invalid\n\n\n if (weekday != null) {\n week.d = weekday;\n } else {\n getParsingFlags(config).invalidWeekday = input;\n }\n });\n addWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) {\n week[token] = toInt(input);\n }); // HELPERS\n\n function parseWeekday(input, locale) {\n if (typeof input !== 'string') {\n return input;\n }\n\n if (!isNaN(input)) {\n return parseInt(input, 10);\n }\n\n input = locale.weekdaysParse(input);\n\n if (typeof input === 'number') {\n return input;\n }\n\n return null;\n }\n\n function parseIsoWeekday(input, locale) {\n if (typeof input === 'string') {\n return locale.weekdaysParse(input) % 7 || 7;\n }\n\n return isNaN(input) ? null : input;\n } // LOCALES\n\n\n function shiftWeekdays(ws, n) {\n return ws.slice(n, 7).concat(ws.slice(0, n));\n }\n\n var defaultLocaleWeekdays = 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_');\n\n function localeWeekdays(m, format) {\n var weekdays = isArray(this._weekdays) ? this._weekdays : this._weekdays[m && m !== true && this._weekdays.isFormat.test(format) ? 'format' : 'standalone'];\n return m === true ? shiftWeekdays(weekdays, this._week.dow) : m ? weekdays[m.day()] : weekdays;\n }\n\n var defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_');\n\n function localeWeekdaysShort(m) {\n return m === true ? shiftWeekdays(this._weekdaysShort, this._week.dow) : m ? this._weekdaysShort[m.day()] : this._weekdaysShort;\n }\n\n var defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_');\n\n function localeWeekdaysMin(m) {\n return m === true ? shiftWeekdays(this._weekdaysMin, this._week.dow) : m ? this._weekdaysMin[m.day()] : this._weekdaysMin;\n }\n\n function handleStrictParse$1(weekdayName, format, strict) {\n var i,\n ii,\n mom,\n llc = weekdayName.toLocaleLowerCase();\n\n if (!this._weekdaysParse) {\n this._weekdaysParse = [];\n this._shortWeekdaysParse = [];\n this._minWeekdaysParse = [];\n\n for (i = 0; i < 7; ++i) {\n mom = createUTC([2000, 1]).day(i);\n this._minWeekdaysParse[i] = this.weekdaysMin(mom, '').toLocaleLowerCase();\n this._shortWeekdaysParse[i] = this.weekdaysShort(mom, '').toLocaleLowerCase();\n this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase();\n }\n }\n\n if (strict) {\n if (format === 'dddd') {\n ii = indexOf.call(this._weekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else if (format === 'ddd') {\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n }\n } else {\n if (format === 'dddd') {\n ii = indexOf.call(this._weekdaysParse, llc);\n\n if (ii !== -1) {\n return ii;\n }\n\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n\n if (ii !== -1) {\n return ii;\n }\n\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else if (format === 'ddd') {\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n\n if (ii !== -1) {\n return ii;\n }\n\n ii = indexOf.call(this._weekdaysParse, llc);\n\n if (ii !== -1) {\n return ii;\n }\n\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._minWeekdaysParse, llc);\n\n if (ii !== -1) {\n return ii;\n }\n\n ii = indexOf.call(this._weekdaysParse, llc);\n\n if (ii !== -1) {\n return ii;\n }\n\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n }\n }\n }\n\n function localeWeekdaysParse(weekdayName, format, strict) {\n var i, mom, regex;\n\n if (this._weekdaysParseExact) {\n return handleStrictParse$1.call(this, weekdayName, format, strict);\n }\n\n if (!this._weekdaysParse) {\n this._weekdaysParse = [];\n this._minWeekdaysParse = [];\n this._shortWeekdaysParse = [];\n this._fullWeekdaysParse = [];\n }\n\n for (i = 0; i < 7; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, 1]).day(i);\n\n if (strict && !this._fullWeekdaysParse[i]) {\n this._fullWeekdaysParse[i] = new RegExp('^' + this.weekdays(mom, '').replace('.', '\\\\.?') + '$', 'i');\n this._shortWeekdaysParse[i] = new RegExp('^' + this.weekdaysShort(mom, '').replace('.', '\\\\.?') + '$', 'i');\n this._minWeekdaysParse[i] = new RegExp('^' + this.weekdaysMin(mom, '').replace('.', '\\\\.?') + '$', 'i');\n }\n\n if (!this._weekdaysParse[i]) {\n regex = '^' + this.weekdays(mom, '') + '|^' + this.weekdaysShort(mom, '') + '|^' + this.weekdaysMin(mom, '');\n this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i');\n } // test the regex\n\n\n if (strict && format === 'dddd' && this._fullWeekdaysParse[i].test(weekdayName)) {\n return i;\n } else if (strict && format === 'ddd' && this._shortWeekdaysParse[i].test(weekdayName)) {\n return i;\n } else if (strict && format === 'dd' && this._minWeekdaysParse[i].test(weekdayName)) {\n return i;\n } else if (!strict && this._weekdaysParse[i].test(weekdayName)) {\n return i;\n }\n }\n } // MOMENTS\n\n\n function getSetDayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n\n var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay();\n\n if (input != null) {\n input = parseWeekday(input, this.localeData());\n return this.add(input - day, 'd');\n } else {\n return day;\n }\n }\n\n function getSetLocaleDayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n\n var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7;\n return input == null ? weekday : this.add(input - weekday, 'd');\n }\n\n function getSetISODayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n } // behaves the same as moment#day except\n // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)\n // as a setter, sunday should belong to the previous week.\n\n\n if (input != null) {\n var weekday = parseIsoWeekday(input, this.localeData());\n return this.day(this.day() % 7 ? weekday : weekday - 7);\n } else {\n return this.day() || 7;\n }\n }\n\n var defaultWeekdaysRegex = matchWord;\n\n function weekdaysRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n\n if (isStrict) {\n return this._weekdaysStrictRegex;\n } else {\n return this._weekdaysRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n this._weekdaysRegex = defaultWeekdaysRegex;\n }\n\n return this._weekdaysStrictRegex && isStrict ? this._weekdaysStrictRegex : this._weekdaysRegex;\n }\n }\n\n var defaultWeekdaysShortRegex = matchWord;\n\n function weekdaysShortRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n\n if (isStrict) {\n return this._weekdaysShortStrictRegex;\n } else {\n return this._weekdaysShortRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysShortRegex')) {\n this._weekdaysShortRegex = defaultWeekdaysShortRegex;\n }\n\n return this._weekdaysShortStrictRegex && isStrict ? this._weekdaysShortStrictRegex : this._weekdaysShortRegex;\n }\n }\n\n var defaultWeekdaysMinRegex = matchWord;\n\n function weekdaysMinRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n\n if (isStrict) {\n return this._weekdaysMinStrictRegex;\n } else {\n return this._weekdaysMinRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysMinRegex')) {\n this._weekdaysMinRegex = defaultWeekdaysMinRegex;\n }\n\n return this._weekdaysMinStrictRegex && isStrict ? this._weekdaysMinStrictRegex : this._weekdaysMinRegex;\n }\n }\n\n function computeWeekdaysParse() {\n function cmpLenRev(a, b) {\n return b.length - a.length;\n }\n\n var minPieces = [],\n shortPieces = [],\n longPieces = [],\n mixedPieces = [],\n i,\n mom,\n minp,\n shortp,\n longp;\n\n for (i = 0; i < 7; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, 1]).day(i);\n minp = this.weekdaysMin(mom, '');\n shortp = this.weekdaysShort(mom, '');\n longp = this.weekdays(mom, '');\n minPieces.push(minp);\n shortPieces.push(shortp);\n longPieces.push(longp);\n mixedPieces.push(minp);\n mixedPieces.push(shortp);\n mixedPieces.push(longp);\n } // Sorting makes sure if one weekday (or abbr) is a prefix of another it\n // will match the longer piece.\n\n\n minPieces.sort(cmpLenRev);\n shortPieces.sort(cmpLenRev);\n longPieces.sort(cmpLenRev);\n mixedPieces.sort(cmpLenRev);\n\n for (i = 0; i < 7; i++) {\n shortPieces[i] = regexEscape(shortPieces[i]);\n longPieces[i] = regexEscape(longPieces[i]);\n mixedPieces[i] = regexEscape(mixedPieces[i]);\n }\n\n this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._weekdaysShortRegex = this._weekdaysRegex;\n this._weekdaysMinRegex = this._weekdaysRegex;\n this._weekdaysStrictRegex = new RegExp('^(' + longPieces.join('|') + ')', 'i');\n this._weekdaysShortStrictRegex = new RegExp('^(' + shortPieces.join('|') + ')', 'i');\n this._weekdaysMinStrictRegex = new RegExp('^(' + minPieces.join('|') + ')', 'i');\n } // FORMATTING\n\n\n function hFormat() {\n return this.hours() % 12 || 12;\n }\n\n function kFormat() {\n return this.hours() || 24;\n }\n\n addFormatToken('H', ['HH', 2], 0, 'hour');\n addFormatToken('h', ['hh', 2], 0, hFormat);\n addFormatToken('k', ['kk', 2], 0, kFormat);\n addFormatToken('hmm', 0, 0, function () {\n return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2);\n });\n addFormatToken('hmmss', 0, 0, function () {\n return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2) + zeroFill(this.seconds(), 2);\n });\n addFormatToken('Hmm', 0, 0, function () {\n return '' + this.hours() + zeroFill(this.minutes(), 2);\n });\n addFormatToken('Hmmss', 0, 0, function () {\n return '' + this.hours() + zeroFill(this.minutes(), 2) + zeroFill(this.seconds(), 2);\n });\n\n function meridiem(token, lowercase) {\n addFormatToken(token, 0, 0, function () {\n return this.localeData().meridiem(this.hours(), this.minutes(), lowercase);\n });\n }\n\n meridiem('a', true);\n meridiem('A', false); // ALIASES\n\n addUnitAlias('hour', 'h'); // PRIORITY\n\n addUnitPriority('hour', 13); // PARSING\n\n function matchMeridiem(isStrict, locale) {\n return locale._meridiemParse;\n }\n\n addRegexToken('a', matchMeridiem);\n addRegexToken('A', matchMeridiem);\n addRegexToken('H', match1to2);\n addRegexToken('h', match1to2);\n addRegexToken('k', match1to2);\n addRegexToken('HH', match1to2, match2);\n addRegexToken('hh', match1to2, match2);\n addRegexToken('kk', match1to2, match2);\n addRegexToken('hmm', match3to4);\n addRegexToken('hmmss', match5to6);\n addRegexToken('Hmm', match3to4);\n addRegexToken('Hmmss', match5to6);\n addParseToken(['H', 'HH'], HOUR);\n addParseToken(['k', 'kk'], function (input, array, config) {\n var kInput = toInt(input);\n array[HOUR] = kInput === 24 ? 0 : kInput;\n });\n addParseToken(['a', 'A'], function (input, array, config) {\n config._isPm = config._locale.isPM(input);\n config._meridiem = input;\n });\n addParseToken(['h', 'hh'], function (input, array, config) {\n array[HOUR] = toInt(input);\n getParsingFlags(config).bigHour = true;\n });\n addParseToken('hmm', function (input, array, config) {\n var pos = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos));\n array[MINUTE] = toInt(input.substr(pos));\n getParsingFlags(config).bigHour = true;\n });\n addParseToken('hmmss', function (input, array, config) {\n var pos1 = input.length - 4;\n var pos2 = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos1));\n array[MINUTE] = toInt(input.substr(pos1, 2));\n array[SECOND] = toInt(input.substr(pos2));\n getParsingFlags(config).bigHour = true;\n });\n addParseToken('Hmm', function (input, array, config) {\n var pos = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos));\n array[MINUTE] = toInt(input.substr(pos));\n });\n addParseToken('Hmmss', function (input, array, config) {\n var pos1 = input.length - 4;\n var pos2 = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos1));\n array[MINUTE] = toInt(input.substr(pos1, 2));\n array[SECOND] = toInt(input.substr(pos2));\n }); // LOCALES\n\n function localeIsPM(input) {\n // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays\n // Using charAt should be more compatible.\n return (input + '').toLowerCase().charAt(0) === 'p';\n }\n\n var defaultLocaleMeridiemParse = /[ap]\\.?m?\\.?/i;\n\n function localeMeridiem(hours, minutes, isLower) {\n if (hours > 11) {\n return isLower ? 'pm' : 'PM';\n } else {\n return isLower ? 'am' : 'AM';\n }\n } // MOMENTS\n // Setting the hour should keep the time, because the user explicitly\n // specified which hour they want. So trying to maintain the same hour (in\n // a new timezone) makes sense. Adding/subtracting hours does not follow\n // this rule.\n\n\n var getSetHour = makeGetSet('Hours', true);\n var baseConfig = {\n calendar: defaultCalendar,\n longDateFormat: defaultLongDateFormat,\n invalidDate: defaultInvalidDate,\n ordinal: defaultOrdinal,\n dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse,\n relativeTime: defaultRelativeTime,\n months: defaultLocaleMonths,\n monthsShort: defaultLocaleMonthsShort,\n week: defaultLocaleWeek,\n weekdays: defaultLocaleWeekdays,\n weekdaysMin: defaultLocaleWeekdaysMin,\n weekdaysShort: defaultLocaleWeekdaysShort,\n meridiemParse: defaultLocaleMeridiemParse\n }; // internal storage for locale config files\n\n var locales = {};\n var localeFamilies = {};\n var globalLocale;\n\n function normalizeLocale(key) {\n return key ? key.toLowerCase().replace('_', '-') : key;\n } // pick the locale from the array\n // try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each\n // substring from most specific to least, but move to the next array item if it's a more specific variant than the current root\n\n\n function chooseLocale(names) {\n var i = 0,\n j,\n next,\n locale,\n split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n\n if (locale) {\n return locale;\n }\n\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n\n j--;\n }\n\n i++;\n }\n\n return globalLocale;\n }\n\n function loadLocale(name) {\n var oldLocale = null; // TODO: Find a better way to register and load all the locales in Node\n\n if (!locales[name] && 'object' !== 'undefined' && module && module.exports) {\n try {\n oldLocale = globalLocale._abbr;\n var aliasedRequire = commonjsRequire;\n aliasedRequire('./locale/' + name);\n getSetGlobalLocale(oldLocale);\n } catch (e) {}\n }\n\n return locales[name];\n } // This function will load locale and then set the global locale. If\n // no arguments are passed in, it will simply return the current global\n // locale key.\n\n\n function getSetGlobalLocale(key, values) {\n var data;\n\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n } else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n } else {\n if (typeof console !== 'undefined' && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n }\n\n function defineLocale(name, config) {\n if (config !== null) {\n var locale,\n parentConfig = baseConfig;\n config.abbr = name;\n\n if (locales[name] != null) {\n deprecateSimple('defineLocaleOverride', 'use moment.updateLocale(localeName, config) to change ' + 'an existing locale. moment.defineLocale(localeName, ' + 'config) should only be used for creating a new locale ' + 'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.');\n parentConfig = locales[name]._config;\n } else if (config.parentLocale != null) {\n if (locales[config.parentLocale] != null) {\n parentConfig = locales[config.parentLocale]._config;\n } else {\n locale = loadLocale(config.parentLocale);\n\n if (locale != null) {\n parentConfig = locale._config;\n } else {\n if (!localeFamilies[config.parentLocale]) {\n localeFamilies[config.parentLocale] = [];\n }\n\n localeFamilies[config.parentLocale].push({\n name: name,\n config: config\n });\n return null;\n }\n }\n }\n\n locales[name] = new Locale(mergeConfigs(parentConfig, config));\n\n if (localeFamilies[name]) {\n localeFamilies[name].forEach(function (x) {\n defineLocale(x.name, x.config);\n });\n } // backwards compat for now: also set the locale\n // make sure we set the locale AFTER all child locales have been\n // created, so we won't end up with the child locale set.\n\n\n getSetGlobalLocale(name);\n return locales[name];\n } else {\n // useful for testing\n delete locales[name];\n return null;\n }\n }\n\n function updateLocale(name, config) {\n if (config != null) {\n var locale,\n tmpLocale,\n parentConfig = baseConfig; // MERGE\n\n tmpLocale = loadLocale(name);\n\n if (tmpLocale != null) {\n parentConfig = tmpLocale._config;\n }\n\n config = mergeConfigs(parentConfig, config);\n locale = new Locale(config);\n locale.parentLocale = locales[name];\n locales[name] = locale; // backwards compat for now: also set the locale\n\n getSetGlobalLocale(name);\n } else {\n // pass null for config to unupdate, useful for tests\n if (locales[name] != null) {\n if (locales[name].parentLocale != null) {\n locales[name] = locales[name].parentLocale;\n } else if (locales[name] != null) {\n delete locales[name];\n }\n }\n }\n\n return locales[name];\n } // returns locale data\n\n\n function getLocale(key) {\n var locale;\n\n if (key && key._locale && key._locale._abbr) {\n key = key._locale._abbr;\n }\n\n if (!key) {\n return globalLocale;\n }\n\n if (!isArray(key)) {\n //short-circuit everything else\n locale = loadLocale(key);\n\n if (locale) {\n return locale;\n }\n\n key = [key];\n }\n\n return chooseLocale(key);\n }\n\n function listLocales() {\n return keys(locales);\n }\n\n function checkOverflow(m) {\n var overflow;\n var a = m._a;\n\n if (a && getParsingFlags(m).overflow === -2) {\n overflow = a[MONTH] < 0 || a[MONTH] > 11 ? MONTH : a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH]) ? DATE : a[HOUR] < 0 || a[HOUR] > 24 || a[HOUR] === 24 && (a[MINUTE] !== 0 || a[SECOND] !== 0 || a[MILLISECOND] !== 0) ? HOUR : a[MINUTE] < 0 || a[MINUTE] > 59 ? MINUTE : a[SECOND] < 0 || a[SECOND] > 59 ? SECOND : a[MILLISECOND] < 0 || a[MILLISECOND] > 999 ? MILLISECOND : -1;\n\n if (getParsingFlags(m)._overflowDayOfYear && (overflow < YEAR || overflow > DATE)) {\n overflow = DATE;\n }\n\n if (getParsingFlags(m)._overflowWeeks && overflow === -1) {\n overflow = WEEK;\n }\n\n if (getParsingFlags(m)._overflowWeekday && overflow === -1) {\n overflow = WEEKDAY;\n }\n\n getParsingFlags(m).overflow = overflow;\n }\n\n return m;\n } // Pick the first defined of two or three arguments.\n\n\n function defaults(a, b, c) {\n if (a != null) {\n return a;\n }\n\n if (b != null) {\n return b;\n }\n\n return c;\n }\n\n function currentDateArray(config) {\n // hooks is actually the exported moment object\n var nowValue = new Date(hooks.now());\n\n if (config._useUTC) {\n return [nowValue.getUTCFullYear(), nowValue.getUTCMonth(), nowValue.getUTCDate()];\n }\n\n return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()];\n } // convert an array to a date.\n // the array should mirror the parameters below\n // note: all values past the year are optional and will default to the lowest possible value.\n // [year, month, day , hour, minute, second, millisecond]\n\n\n function configFromArray(config) {\n var i,\n date,\n input = [],\n currentDate,\n expectedWeekday,\n yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config); //compute day of the year from weeks and weekdays\n\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n } //if the day of the year is set, figure out what it is\n\n\n if (config._dayOfYear != null) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse) || config._dayOfYear === 0) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n } // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n\n\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n } // Zero out whatever was not defaulted, including time\n\n\n for (; i < 7; i++) {\n config._a[i] = input[i] = config._a[i] == null ? i === 2 ? 1 : 0 : config._a[i];\n } // Check for 24:00:00.000\n\n\n if (config._a[HOUR] === 24 && config._a[MINUTE] === 0 && config._a[SECOND] === 0 && config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n expectedWeekday = config._useUTC ? config._d.getUTCDay() : config._d.getDay(); // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n } // check for mismatching day of week\n\n\n if (config._w && typeof config._w.d !== 'undefined' && config._w.d !== expectedWeekday) {\n getParsingFlags(config).weekdayMismatch = true;\n }\n }\n\n function dayOfYearFromWeekInfo(config) {\n var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow;\n w = config._w;\n\n if (w.GG != null || w.W != null || w.E != null) {\n dow = 1;\n doy = 4; // TODO: We need to take the current isoWeekYear, but that depends on\n // how we interpret now (local, utc, fixed offset). So create\n // a now version of current config (take local/utc/offset flags, and\n // create now).\n\n weekYear = defaults(w.GG, config._a[YEAR], weekOfYear(createLocal(), 1, 4).year);\n week = defaults(w.W, 1);\n weekday = defaults(w.E, 1);\n\n if (weekday < 1 || weekday > 7) {\n weekdayOverflow = true;\n }\n } else {\n dow = config._locale._week.dow;\n doy = config._locale._week.doy;\n var curWeek = weekOfYear(createLocal(), dow, doy);\n weekYear = defaults(w.gg, config._a[YEAR], curWeek.year); // Default to current week.\n\n week = defaults(w.w, curWeek.week);\n\n if (w.d != null) {\n // weekday -- low day numbers are considered next week\n weekday = w.d;\n\n if (weekday < 0 || weekday > 6) {\n weekdayOverflow = true;\n }\n } else if (w.e != null) {\n // local weekday -- counting starts from beginning of week\n weekday = w.e + dow;\n\n if (w.e < 0 || w.e > 6) {\n weekdayOverflow = true;\n }\n } else {\n // default to beginning of week\n weekday = dow;\n }\n }\n\n if (week < 1 || week > weeksInYear(weekYear, dow, doy)) {\n getParsingFlags(config)._overflowWeeks = true;\n } else if (weekdayOverflow != null) {\n getParsingFlags(config)._overflowWeekday = true;\n } else {\n temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy);\n config._a[YEAR] = temp.year;\n config._dayOfYear = temp.dayOfYear;\n }\n } // iso 8601 regex\n // 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00)\n\n\n var extendedIsoRegex = /^\\s*((?:[+-]\\d{6}|\\d{4})-(?:\\d\\d-\\d\\d|W\\d\\d-\\d|W\\d\\d|\\d\\d\\d|\\d\\d))(?:(T| )(\\d\\d(?::\\d\\d(?::\\d\\d(?:[.,]\\d+)?)?)?)([\\+\\-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/;\n var basicIsoRegex = /^\\s*((?:[+-]\\d{6}|\\d{4})(?:\\d\\d\\d\\d|W\\d\\d\\d|W\\d\\d|\\d\\d\\d|\\d\\d))(?:(T| )(\\d\\d(?:\\d\\d(?:\\d\\d(?:[.,]\\d+)?)?)?)([\\+\\-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/;\n var tzRegex = /Z|[+-]\\d\\d(?::?\\d\\d)?/;\n var isoDates = [['YYYYYY-MM-DD', /[+-]\\d{6}-\\d\\d-\\d\\d/], ['YYYY-MM-DD', /\\d{4}-\\d\\d-\\d\\d/], ['GGGG-[W]WW-E', /\\d{4}-W\\d\\d-\\d/], ['GGGG-[W]WW', /\\d{4}-W\\d\\d/, false], ['YYYY-DDD', /\\d{4}-\\d{3}/], ['YYYY-MM', /\\d{4}-\\d\\d/, false], ['YYYYYYMMDD', /[+-]\\d{10}/], ['YYYYMMDD', /\\d{8}/], // YYYYMM is NOT allowed by the standard\n ['GGGG[W]WWE', /\\d{4}W\\d{3}/], ['GGGG[W]WW', /\\d{4}W\\d{2}/, false], ['YYYYDDD', /\\d{7}/]]; // iso time formats and regexes\n\n var isoTimes = [['HH:mm:ss.SSSS', /\\d\\d:\\d\\d:\\d\\d\\.\\d+/], ['HH:mm:ss,SSSS', /\\d\\d:\\d\\d:\\d\\d,\\d+/], ['HH:mm:ss', /\\d\\d:\\d\\d:\\d\\d/], ['HH:mm', /\\d\\d:\\d\\d/], ['HHmmss.SSSS', /\\d\\d\\d\\d\\d\\d\\.\\d+/], ['HHmmss,SSSS', /\\d\\d\\d\\d\\d\\d,\\d+/], ['HHmmss', /\\d\\d\\d\\d\\d\\d/], ['HHmm', /\\d\\d\\d\\d/], ['HH', /\\d\\d/]];\n var aspNetJsonRegex = /^\\/?Date\\((\\-?\\d+)/i; // date from iso format\n\n function configFromISO(config) {\n var i,\n l,\n string = config._i,\n match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string),\n allowTime,\n dateFormat,\n timeFormat,\n tzFormat;\n\n if (match) {\n getParsingFlags(config).iso = true;\n\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(match[1])) {\n dateFormat = isoDates[i][0];\n allowTime = isoDates[i][2] !== false;\n break;\n }\n }\n\n if (dateFormat == null) {\n config._isValid = false;\n return;\n }\n\n if (match[3]) {\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(match[3])) {\n // match[2] should be 'T' or space\n timeFormat = (match[2] || ' ') + isoTimes[i][0];\n break;\n }\n }\n\n if (timeFormat == null) {\n config._isValid = false;\n return;\n }\n }\n\n if (!allowTime && timeFormat != null) {\n config._isValid = false;\n return;\n }\n\n if (match[4]) {\n if (tzRegex.exec(match[4])) {\n tzFormat = 'Z';\n } else {\n config._isValid = false;\n return;\n }\n }\n\n config._f = dateFormat + (timeFormat || '') + (tzFormat || '');\n configFromStringAndFormat(config);\n } else {\n config._isValid = false;\n }\n } // RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3\n\n\n var rfc2822 = /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\\s)?(\\d{1,2})\\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\\s(\\d{2,4})\\s(\\d\\d):(\\d\\d)(?::(\\d\\d))?\\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\\d{4}))$/;\n\n function extractFromRFC2822Strings(yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr) {\n var result = [untruncateYear(yearStr), defaultLocaleMonthsShort.indexOf(monthStr), parseInt(dayStr, 10), parseInt(hourStr, 10), parseInt(minuteStr, 10)];\n\n if (secondStr) {\n result.push(parseInt(secondStr, 10));\n }\n\n return result;\n }\n\n function untruncateYear(yearStr) {\n var year = parseInt(yearStr, 10);\n\n if (year <= 49) {\n return 2000 + year;\n } else if (year <= 999) {\n return 1900 + year;\n }\n\n return year;\n }\n\n function preprocessRFC2822(s) {\n // Remove comments and folding whitespace and replace multiple-spaces with a single space\n return s.replace(/\\([^)]*\\)|[\\n\\t]/g, ' ').replace(/(\\s\\s+)/g, ' ').replace(/^\\s\\s*/, '').replace(/\\s\\s*$/, '');\n }\n\n function checkWeekday(weekdayStr, parsedInput, config) {\n if (weekdayStr) {\n // TODO: Replace the vanilla JS Date object with an indepentent day-of-week check.\n var weekdayProvided = defaultLocaleWeekdaysShort.indexOf(weekdayStr),\n weekdayActual = new Date(parsedInput[0], parsedInput[1], parsedInput[2]).getDay();\n\n if (weekdayProvided !== weekdayActual) {\n getParsingFlags(config).weekdayMismatch = true;\n config._isValid = false;\n return false;\n }\n }\n\n return true;\n }\n\n var obsOffsets = {\n UT: 0,\n GMT: 0,\n EDT: -4 * 60,\n EST: -5 * 60,\n CDT: -5 * 60,\n CST: -6 * 60,\n MDT: -6 * 60,\n MST: -7 * 60,\n PDT: -7 * 60,\n PST: -8 * 60\n };\n\n function calculateOffset(obsOffset, militaryOffset, numOffset) {\n if (obsOffset) {\n return obsOffsets[obsOffset];\n } else if (militaryOffset) {\n // the only allowed military tz is Z\n return 0;\n } else {\n var hm = parseInt(numOffset, 10);\n var m = hm % 100,\n h = (hm - m) / 100;\n return h * 60 + m;\n }\n } // date and time from ref 2822 format\n\n\n function configFromRFC2822(config) {\n var match = rfc2822.exec(preprocessRFC2822(config._i));\n\n if (match) {\n var parsedArray = extractFromRFC2822Strings(match[4], match[3], match[2], match[5], match[6], match[7]);\n\n if (!checkWeekday(match[1], parsedArray, config)) {\n return;\n }\n\n config._a = parsedArray;\n config._tzm = calculateOffset(match[8], match[9], match[10]);\n config._d = createUTCDate.apply(null, config._a);\n\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n\n getParsingFlags(config).rfc2822 = true;\n } else {\n config._isValid = false;\n }\n } // date from iso format or fallback\n\n\n function configFromString(config) {\n var matched = aspNetJsonRegex.exec(config._i);\n\n if (matched !== null) {\n config._d = new Date(+matched[1]);\n return;\n }\n\n configFromISO(config);\n\n if (config._isValid === false) {\n delete config._isValid;\n } else {\n return;\n }\n\n configFromRFC2822(config);\n\n if (config._isValid === false) {\n delete config._isValid;\n } else {\n return;\n } // Final attempt, use Input Fallback\n\n\n hooks.createFromInputFallback(config);\n }\n\n hooks.createFromInputFallback = deprecate('value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), ' + 'which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are ' + 'discouraged and will be removed in an upcoming major release. Please refer to ' + 'http://momentjs.com/guides/#/warnings/js-date/ for more info.', function (config) {\n config._d = new Date(config._i + (config._useUTC ? ' UTC' : ''));\n }); // constant that refers to the ISO standard\n\n hooks.ISO_8601 = function () {}; // constant that refers to the RFC 2822 form\n\n\n hooks.RFC_2822 = function () {}; // date from string and format string\n\n\n function configFromStringAndFormat(config) {\n // TODO: Move this to another part of the creation flow to prevent circular deps\n if (config._f === hooks.ISO_8601) {\n configFromISO(config);\n return;\n }\n\n if (config._f === hooks.RFC_2822) {\n configFromRFC2822(config);\n return;\n }\n\n config._a = [];\n getParsingFlags(config).empty = true; // This array is used to make a Date, either with `new Date` or `Date.UTC`\n\n var string = '' + config._i,\n i,\n parsedInput,\n tokens,\n token,\n skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0]; // console.log('token', token, 'parsedInput', parsedInput,\n // 'regex', getParseRegexForToken(token, config));\n\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n\n if (skipped.length > 0) {\n getParsingFlags(config).unusedInput.push(skipped);\n }\n\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n } // don't parse if it's not a known token\n\n\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n getParsingFlags(config).empty = false;\n } else {\n getParsingFlags(config).unusedTokens.push(token);\n }\n\n addTimeToArrayFromToken(token, parsedInput, config);\n } else if (config._strict && !parsedInput) {\n getParsingFlags(config).unusedTokens.push(token);\n }\n } // add remaining unparsed input length to the string\n\n\n getParsingFlags(config).charsLeftOver = stringLength - totalParsedInputLength;\n\n if (string.length > 0) {\n getParsingFlags(config).unusedInput.push(string);\n } // clear _12h flag if hour is <= 12\n\n\n if (config._a[HOUR] <= 12 && getParsingFlags(config).bigHour === true && config._a[HOUR] > 0) {\n getParsingFlags(config).bigHour = undefined;\n }\n\n getParsingFlags(config).parsedDateParts = config._a.slice(0);\n getParsingFlags(config).meridiem = config._meridiem; // handle meridiem\n\n config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR], config._meridiem);\n configFromArray(config);\n checkOverflow(config);\n }\n\n function meridiemFixWrap(locale, hour, meridiem) {\n var isPm;\n\n if (meridiem == null) {\n // nothing to do\n return hour;\n }\n\n if (locale.meridiemHour != null) {\n return locale.meridiemHour(hour, meridiem);\n } else if (locale.isPM != null) {\n // Fallback\n isPm = locale.isPM(meridiem);\n\n if (isPm && hour < 12) {\n hour += 12;\n }\n\n if (!isPm && hour === 12) {\n hour = 0;\n }\n\n return hour;\n } else {\n // this is not supposed to happen\n return hour;\n }\n } // date from string and array of format strings\n\n\n function configFromStringAndArray(config) {\n var tempConfig, bestMoment, scoreToBeat, i, currentScore;\n\n if (config._f.length === 0) {\n getParsingFlags(config).invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < config._f.length; i++) {\n currentScore = 0;\n tempConfig = copyConfig({}, config);\n\n if (config._useUTC != null) {\n tempConfig._useUTC = config._useUTC;\n }\n\n tempConfig._f = config._f[i];\n configFromStringAndFormat(tempConfig);\n\n if (!isValid(tempConfig)) {\n continue;\n } // if there is any input that was not parsed add a penalty for that format\n\n\n currentScore += getParsingFlags(tempConfig).charsLeftOver; //or tokens\n\n currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10;\n getParsingFlags(tempConfig).score = currentScore;\n\n if (scoreToBeat == null || currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n\n extend(config, bestMoment || tempConfig);\n }\n\n function configFromObject(config) {\n if (config._d) {\n return;\n }\n\n var i = normalizeObjectUnits(config._i);\n config._a = map([i.year, i.month, i.day || i.date, i.hour, i.minute, i.second, i.millisecond], function (obj) {\n return obj && parseInt(obj, 10);\n });\n configFromArray(config);\n }\n\n function createFromConfig(config) {\n var res = new Moment(checkOverflow(prepareConfig(config)));\n\n if (res._nextDay) {\n // Adding is smart enough around DST\n res.add(1, 'd');\n res._nextDay = undefined;\n }\n\n return res;\n }\n\n function prepareConfig(config) {\n var input = config._i,\n format = config._f;\n config._locale = config._locale || getLocale(config._l);\n\n if (input === null || format === undefined && input === '') {\n return createInvalid({\n nullInput: true\n });\n }\n\n if (typeof input === 'string') {\n config._i = input = config._locale.preparse(input);\n }\n\n if (isMoment(input)) {\n return new Moment(checkOverflow(input));\n } else if (isDate(input)) {\n config._d = input;\n } else if (isArray(format)) {\n configFromStringAndArray(config);\n } else if (format) {\n configFromStringAndFormat(config);\n } else {\n configFromInput(config);\n }\n\n if (!isValid(config)) {\n config._d = null;\n }\n\n return config;\n }\n\n function configFromInput(config) {\n var input = config._i;\n\n if (isUndefined(input)) {\n config._d = new Date(hooks.now());\n } else if (isDate(input)) {\n config._d = new Date(input.valueOf());\n } else if (typeof input === 'string') {\n configFromString(config);\n } else if (isArray(input)) {\n config._a = map(input.slice(0), function (obj) {\n return parseInt(obj, 10);\n });\n configFromArray(config);\n } else if (isObject(input)) {\n configFromObject(config);\n } else if (isNumber(input)) {\n // from milliseconds\n config._d = new Date(input);\n } else {\n hooks.createFromInputFallback(config);\n }\n }\n\n function createLocalOrUTC(input, format, locale, strict, isUTC) {\n var c = {};\n\n if (locale === true || locale === false) {\n strict = locale;\n locale = undefined;\n }\n\n if (isObject(input) && isObjectEmpty(input) || isArray(input) && input.length === 0) {\n input = undefined;\n } // object construction must be done this way.\n // https://github.com/moment/moment/issues/1423\n\n\n c._isAMomentObject = true;\n c._useUTC = c._isUTC = isUTC;\n c._l = locale;\n c._i = input;\n c._f = format;\n c._strict = strict;\n return createFromConfig(c);\n }\n\n function createLocal(input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, false);\n }\n\n var prototypeMin = deprecate('moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/', function () {\n var other = createLocal.apply(null, arguments);\n\n if (this.isValid() && other.isValid()) {\n return other < this ? this : other;\n } else {\n return createInvalid();\n }\n });\n var prototypeMax = deprecate('moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/', function () {\n var other = createLocal.apply(null, arguments);\n\n if (this.isValid() && other.isValid()) {\n return other > this ? this : other;\n } else {\n return createInvalid();\n }\n }); // Pick a moment m from moments so that m[fn](other) is true for all\n // other. This relies on the function fn to be transitive.\n //\n // moments should either be an array of moment objects or an array, whose\n // first element is an array of moment objects.\n\n function pickBy(fn, moments) {\n var res, i;\n\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n\n if (!moments.length) {\n return createLocal();\n }\n\n res = moments[0];\n\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n\n return res;\n } // TODO: Use [].sort instead?\n\n\n function min() {\n var args = [].slice.call(arguments, 0);\n return pickBy('isBefore', args);\n }\n\n function max() {\n var args = [].slice.call(arguments, 0);\n return pickBy('isAfter', args);\n }\n\n var now = function () {\n return Date.now ? Date.now() : +new Date();\n };\n\n var ordering = ['year', 'quarter', 'month', 'week', 'day', 'hour', 'minute', 'second', 'millisecond'];\n\n function isDurationValid(m) {\n for (var key in m) {\n if (!(indexOf.call(ordering, key) !== -1 && (m[key] == null || !isNaN(m[key])))) {\n return false;\n }\n }\n\n var unitHasDecimal = false;\n\n for (var i = 0; i < ordering.length; ++i) {\n if (m[ordering[i]]) {\n if (unitHasDecimal) {\n return false; // only allow non-integers for smallest unit\n }\n\n if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) {\n unitHasDecimal = true;\n }\n }\n }\n\n return true;\n }\n\n function isValid$1() {\n return this._isValid;\n }\n\n function createInvalid$1() {\n return createDuration(NaN);\n }\n\n function Duration(duration) {\n var normalizedInput = normalizeObjectUnits(duration),\n years = normalizedInput.year || 0,\n quarters = normalizedInput.quarter || 0,\n months = normalizedInput.month || 0,\n weeks = normalizedInput.week || normalizedInput.isoWeek || 0,\n days = normalizedInput.day || 0,\n hours = normalizedInput.hour || 0,\n minutes = normalizedInput.minute || 0,\n seconds = normalizedInput.second || 0,\n milliseconds = normalizedInput.millisecond || 0;\n this._isValid = isDurationValid(normalizedInput); // representation for dateAddRemove\n\n this._milliseconds = +milliseconds + seconds * 1e3 + // 1000\n minutes * 6e4 + // 1000 * 60\n hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978\n // Because of dateAddRemove treats 24 hours as different from a\n // day when working around DST, we need to store them separately\n\n this._days = +days + weeks * 7; // It is impossible to translate months into days without knowing\n // which months you are are talking about, so we have to store\n // it separately.\n\n this._months = +months + quarters * 3 + years * 12;\n this._data = {};\n this._locale = getLocale();\n\n this._bubble();\n }\n\n function isDuration(obj) {\n return obj instanceof Duration;\n }\n\n function absRound(number) {\n if (number < 0) {\n return Math.round(-1 * number) * -1;\n } else {\n return Math.round(number);\n }\n } // FORMATTING\n\n\n function offset(token, separator) {\n addFormatToken(token, 0, 0, function () {\n var offset = this.utcOffset();\n var sign = '+';\n\n if (offset < 0) {\n offset = -offset;\n sign = '-';\n }\n\n return sign + zeroFill(~~(offset / 60), 2) + separator + zeroFill(~~offset % 60, 2);\n });\n }\n\n offset('Z', ':');\n offset('ZZ', ''); // PARSING\n\n addRegexToken('Z', matchShortOffset);\n addRegexToken('ZZ', matchShortOffset);\n addParseToken(['Z', 'ZZ'], function (input, array, config) {\n config._useUTC = true;\n config._tzm = offsetFromString(matchShortOffset, input);\n }); // HELPERS\n // timezone chunker\n // '+10:00' > ['10', '00']\n // '-1530' > ['-15', '30']\n\n var chunkOffset = /([\\+\\-]|\\d\\d)/gi;\n\n function offsetFromString(matcher, string) {\n var matches = (string || '').match(matcher);\n\n if (matches === null) {\n return null;\n }\n\n var chunk = matches[matches.length - 1] || [];\n var parts = (chunk + '').match(chunkOffset) || ['-', 0, 0];\n var minutes = +(parts[1] * 60) + toInt(parts[2]);\n return minutes === 0 ? 0 : parts[0] === '+' ? minutes : -minutes;\n } // Return a moment from input, that is local/utc/zone equivalent to model.\n\n\n function cloneWithOffset(input, model) {\n var res, diff;\n\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? input.valueOf() : createLocal(input).valueOf()) - res.valueOf(); // Use low-level api, because this fn is low-level api.\n\n res._d.setTime(res._d.valueOf() + diff);\n\n hooks.updateOffset(res, false);\n return res;\n } else {\n return createLocal(input).local();\n }\n }\n\n function getDateOffset(m) {\n // On Firefox.24 Date#getTimezoneOffset returns a floating point.\n // https://github.com/moment/moment/pull/1871\n return -Math.round(m._d.getTimezoneOffset() / 15) * 15;\n } // HOOKS\n // This function will be called whenever a moment is mutated.\n // It is intended to keep the offset in sync with the timezone.\n\n\n hooks.updateOffset = function () {}; // MOMENTS\n // keepLocalTime = true means only change the timezone, without\n // affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]-->\n // 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset\n // +0200, so we adjust the time as needed, to be valid.\n //\n // Keeping the time actually adds/subtracts (one hour)\n // from the actual represented time. That is why we call updateOffset\n // a second time. In case it wants us to change the offset again\n // _changeInProgress == true case, then we have to adjust, because\n // there is no such time in the given timezone.\n\n\n function getSetOffset(input, keepLocalTime, keepMinutes) {\n var offset = this._offset || 0,\n localAdjust;\n\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n\n if (input === null) {\n return this;\n }\n } else if (Math.abs(input) < 16 && !keepMinutes) {\n input = input * 60;\n }\n\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n\n this._offset = input;\n this._isUTC = true;\n\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n addSubtract(this, createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }\n\n function getSetZone(input, keepLocalTime) {\n if (input != null) {\n if (typeof input !== 'string') {\n input = -input;\n }\n\n this.utcOffset(input, keepLocalTime);\n return this;\n } else {\n return -this.utcOffset();\n }\n }\n\n function setOffsetToUTC(keepLocalTime) {\n return this.utcOffset(0, keepLocalTime);\n }\n\n function setOffsetToLocal(keepLocalTime) {\n if (this._isUTC) {\n this.utcOffset(0, keepLocalTime);\n this._isUTC = false;\n\n if (keepLocalTime) {\n this.subtract(getDateOffset(this), 'm');\n }\n }\n\n return this;\n }\n\n function setOffsetToParsedOffset() {\n if (this._tzm != null) {\n this.utcOffset(this._tzm, false, true);\n } else if (typeof this._i === 'string') {\n var tZone = offsetFromString(matchOffset, this._i);\n\n if (tZone != null) {\n this.utcOffset(tZone);\n } else {\n this.utcOffset(0, true);\n }\n }\n\n return this;\n }\n\n function hasAlignedHourOffset(input) {\n if (!this.isValid()) {\n return false;\n }\n\n input = input ? createLocal(input).utcOffset() : 0;\n return (this.utcOffset() - input) % 60 === 0;\n }\n\n function isDaylightSavingTime() {\n return this.utcOffset() > this.clone().month(0).utcOffset() || this.utcOffset() > this.clone().month(5).utcOffset();\n }\n\n function isDaylightSavingTimeShifted() {\n if (!isUndefined(this._isDSTShifted)) {\n return this._isDSTShifted;\n }\n\n var c = {};\n copyConfig(c, this);\n c = prepareConfig(c);\n\n if (c._a) {\n var other = c._isUTC ? createUTC(c._a) : createLocal(c._a);\n this._isDSTShifted = this.isValid() && compareArrays(c._a, other.toArray()) > 0;\n } else {\n this._isDSTShifted = false;\n }\n\n return this._isDSTShifted;\n }\n\n function isLocal() {\n return this.isValid() ? !this._isUTC : false;\n }\n\n function isUtcOffset() {\n return this.isValid() ? this._isUTC : false;\n }\n\n function isUtc() {\n return this.isValid() ? this._isUTC && this._offset === 0 : false;\n } // ASP.NET json date format regex\n\n\n var aspNetRegex = /^(\\-|\\+)?(?:(\\d*)[. ])?(\\d+)\\:(\\d+)(?:\\:(\\d+)(\\.\\d*)?)?$/; // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html\n // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere\n // and further modified to allow for strings containing both week and day\n\n var isoRegex = /^(-|\\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;\n\n function createDuration(input, key) {\n var duration = input,\n // matching against regexp is expensive, do it on demand\n match = null,\n sign,\n ret,\n diffRes;\n\n if (isDuration(input)) {\n duration = {\n ms: input._milliseconds,\n d: input._days,\n M: input._months\n };\n } else if (isNumber(input)) {\n duration = {};\n\n if (key) {\n duration[key] = input;\n } else {\n duration.milliseconds = input;\n }\n } else if (!!(match = aspNetRegex.exec(input))) {\n sign = match[1] === '-' ? -1 : 1;\n duration = {\n y: 0,\n d: toInt(match[DATE]) * sign,\n h: toInt(match[HOUR]) * sign,\n m: toInt(match[MINUTE]) * sign,\n s: toInt(match[SECOND]) * sign,\n ms: toInt(absRound(match[MILLISECOND] * 1000)) * sign // the millisecond decimal point is included in the match\n\n };\n } else if (!!(match = isoRegex.exec(input))) {\n sign = match[1] === '-' ? -1 : 1;\n duration = {\n y: parseIso(match[2], sign),\n M: parseIso(match[3], sign),\n w: parseIso(match[4], sign),\n d: parseIso(match[5], sign),\n h: parseIso(match[6], sign),\n m: parseIso(match[7], sign),\n s: parseIso(match[8], sign)\n };\n } else if (duration == null) {\n // checks for null or undefined\n duration = {};\n } else if (typeof duration === 'object' && ('from' in duration || 'to' in duration)) {\n diffRes = momentsDifference(createLocal(duration.from), createLocal(duration.to));\n duration = {};\n duration.ms = diffRes.milliseconds;\n duration.M = diffRes.months;\n }\n\n ret = new Duration(duration);\n\n if (isDuration(input) && hasOwnProp(input, '_locale')) {\n ret._locale = input._locale;\n }\n\n return ret;\n }\n\n createDuration.fn = Duration.prototype;\n createDuration.invalid = createInvalid$1;\n\n function parseIso(inp, sign) {\n // We'd normally use ~~inp for this, but unfortunately it also\n // converts floats to ints.\n // inp may be undefined, so careful calling replace on it.\n var res = inp && parseFloat(inp.replace(',', '.')); // apply sign while we're at it\n\n return (isNaN(res) ? 0 : res) * sign;\n }\n\n function positiveMomentsDifference(base, other) {\n var res = {};\n res.months = other.month() - base.month() + (other.year() - base.year()) * 12;\n\n if (base.clone().add(res.months, 'M').isAfter(other)) {\n --res.months;\n }\n\n res.milliseconds = +other - +base.clone().add(res.months, 'M');\n return res;\n }\n\n function momentsDifference(base, other) {\n var res;\n\n if (!(base.isValid() && other.isValid())) {\n return {\n milliseconds: 0,\n months: 0\n };\n }\n\n other = cloneWithOffset(other, base);\n\n if (base.isBefore(other)) {\n res = positiveMomentsDifference(base, other);\n } else {\n res = positiveMomentsDifference(other, base);\n res.milliseconds = -res.milliseconds;\n res.months = -res.months;\n }\n\n return res;\n } // TODO: remove 'name' arg after deprecation is removed\n\n\n function createAdder(direction, name) {\n return function (val, period) {\n var dur, tmp; //invert the arguments, but complain about it\n\n if (period !== null && !isNaN(+period)) {\n deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' + 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.');\n tmp = val;\n val = period;\n period = tmp;\n }\n\n val = typeof val === 'string' ? +val : val;\n dur = createDuration(val, period);\n addSubtract(this, dur, direction);\n return this;\n };\n }\n\n function addSubtract(mom, duration, isAdding, updateOffset) {\n var milliseconds = duration._milliseconds,\n days = absRound(duration._days),\n months = absRound(duration._months);\n\n if (!mom.isValid()) {\n // No op\n return;\n }\n\n updateOffset = updateOffset == null ? true : updateOffset;\n\n if (months) {\n setMonth(mom, get(mom, 'Month') + months * isAdding);\n }\n\n if (days) {\n set$1(mom, 'Date', get(mom, 'Date') + days * isAdding);\n }\n\n if (milliseconds) {\n mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding);\n }\n\n if (updateOffset) {\n hooks.updateOffset(mom, days || months);\n }\n }\n\n var add = createAdder(1, 'add');\n var subtract = createAdder(-1, 'subtract');\n\n function getCalendarFormat(myMoment, now) {\n var diff = myMoment.diff(now, 'days', true);\n return diff < -6 ? 'sameElse' : diff < -1 ? 'lastWeek' : diff < 0 ? 'lastDay' : diff < 1 ? 'sameDay' : diff < 2 ? 'nextDay' : diff < 7 ? 'nextWeek' : 'sameElse';\n }\n\n function calendar$1(time, formats) {\n // We want to compare the start of today, vs this.\n // Getting start-of-today depends on whether we're local/utc/offset or not.\n var now = time || createLocal(),\n sod = cloneWithOffset(now, this).startOf('day'),\n format = hooks.calendarFormat(this, sod) || 'sameElse';\n var output = formats && (isFunction(formats[format]) ? formats[format].call(this, now) : formats[format]);\n return this.format(output || this.localeData().calendar(format, this, createLocal(now)));\n }\n\n function clone() {\n return new Moment(this);\n }\n\n function isAfter(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input);\n\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n\n units = normalizeUnits(units) || 'millisecond';\n\n if (units === 'millisecond') {\n return this.valueOf() > localInput.valueOf();\n } else {\n return localInput.valueOf() < this.clone().startOf(units).valueOf();\n }\n }\n\n function isBefore(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input);\n\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n\n units = normalizeUnits(units) || 'millisecond';\n\n if (units === 'millisecond') {\n return this.valueOf() < localInput.valueOf();\n } else {\n return this.clone().endOf(units).valueOf() < localInput.valueOf();\n }\n }\n\n function isBetween(from, to, units, inclusivity) {\n var localFrom = isMoment(from) ? from : createLocal(from),\n localTo = isMoment(to) ? to : createLocal(to);\n\n if (!(this.isValid() && localFrom.isValid() && localTo.isValid())) {\n return false;\n }\n\n inclusivity = inclusivity || '()';\n return (inclusivity[0] === '(' ? this.isAfter(localFrom, units) : !this.isBefore(localFrom, units)) && (inclusivity[1] === ')' ? this.isBefore(localTo, units) : !this.isAfter(localTo, units));\n }\n\n function isSame(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input),\n inputMs;\n\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n\n units = normalizeUnits(units) || 'millisecond';\n\n if (units === 'millisecond') {\n return this.valueOf() === localInput.valueOf();\n } else {\n inputMs = localInput.valueOf();\n return this.clone().startOf(units).valueOf() <= inputMs && inputMs <= this.clone().endOf(units).valueOf();\n }\n }\n\n function isSameOrAfter(input, units) {\n return this.isSame(input, units) || this.isAfter(input, units);\n }\n\n function isSameOrBefore(input, units) {\n return this.isSame(input, units) || this.isBefore(input, units);\n }\n\n function diff(input, units, asFloat) {\n var that, zoneDelta, output;\n\n if (!this.isValid()) {\n return NaN;\n }\n\n that = cloneWithOffset(input, this);\n\n if (!that.isValid()) {\n return NaN;\n }\n\n zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4;\n units = normalizeUnits(units);\n\n switch (units) {\n case 'year':\n output = monthDiff(this, that) / 12;\n break;\n\n case 'month':\n output = monthDiff(this, that);\n break;\n\n case 'quarter':\n output = monthDiff(this, that) / 3;\n break;\n\n case 'second':\n output = (this - that) / 1e3;\n break;\n // 1000\n\n case 'minute':\n output = (this - that) / 6e4;\n break;\n // 1000 * 60\n\n case 'hour':\n output = (this - that) / 36e5;\n break;\n // 1000 * 60 * 60\n\n case 'day':\n output = (this - that - zoneDelta) / 864e5;\n break;\n // 1000 * 60 * 60 * 24, negate dst\n\n case 'week':\n output = (this - that - zoneDelta) / 6048e5;\n break;\n // 1000 * 60 * 60 * 24 * 7, negate dst\n\n default:\n output = this - that;\n }\n\n return asFloat ? output : absFloor(output);\n }\n\n function monthDiff(a, b) {\n // difference in months\n var wholeMonthDiff = (b.year() - a.year()) * 12 + (b.month() - a.month()),\n // b is in (anchor - 1 month, anchor + 1 month)\n anchor = a.clone().add(wholeMonthDiff, 'months'),\n anchor2,\n adjust;\n\n if (b - anchor < 0) {\n anchor2 = a.clone().add(wholeMonthDiff - 1, 'months'); // linear across the month\n\n adjust = (b - anchor) / (anchor - anchor2);\n } else {\n anchor2 = a.clone().add(wholeMonthDiff + 1, 'months'); // linear across the month\n\n adjust = (b - anchor) / (anchor2 - anchor);\n } //check for negative zero, return zero if negative zero\n\n\n return -(wholeMonthDiff + adjust) || 0;\n }\n\n hooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ';\n hooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]';\n\n function toString() {\n return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ');\n }\n\n function toISOString(keepOffset) {\n if (!this.isValid()) {\n return null;\n }\n\n var utc = keepOffset !== true;\n var m = utc ? this.clone().utc() : this;\n\n if (m.year() < 0 || m.year() > 9999) {\n return formatMoment(m, utc ? 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYYYY-MM-DD[T]HH:mm:ss.SSSZ');\n }\n\n if (isFunction(Date.prototype.toISOString)) {\n // native implementation is ~50x faster, use it when we can\n if (utc) {\n return this.toDate().toISOString();\n } else {\n return new Date(this.valueOf() + this.utcOffset() * 60 * 1000).toISOString().replace('Z', formatMoment(m, 'Z'));\n }\n }\n\n return formatMoment(m, utc ? 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYY-MM-DD[T]HH:mm:ss.SSSZ');\n }\n /**\n * Return a human readable representation of a moment that can\n * also be evaluated to get a new moment which is the same\n *\n * @link https://nodejs.org/dist/latest/docs/api/util.html#util_custom_inspect_function_on_objects\n */\n\n\n function inspect() {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n\n var func = 'moment';\n var zone = '';\n\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n\n var prefix = '[' + func + '(\"]';\n var year = 0 <= this.year() && this.year() <= 9999 ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n return this.format(prefix + year + datetime + suffix);\n }\n\n function format(inputString) {\n if (!inputString) {\n inputString = this.isUtc() ? hooks.defaultFormatUtc : hooks.defaultFormat;\n }\n\n var output = formatMoment(this, inputString);\n return this.localeData().postformat(output);\n }\n\n function from(time, withoutSuffix) {\n if (this.isValid() && (isMoment(time) && time.isValid() || createLocal(time).isValid())) {\n return createDuration({\n to: this,\n from: time\n }).locale(this.locale()).humanize(!withoutSuffix);\n } else {\n return this.localeData().invalidDate();\n }\n }\n\n function fromNow(withoutSuffix) {\n return this.from(createLocal(), withoutSuffix);\n }\n\n function to(time, withoutSuffix) {\n if (this.isValid() && (isMoment(time) && time.isValid() || createLocal(time).isValid())) {\n return createDuration({\n from: this,\n to: time\n }).locale(this.locale()).humanize(!withoutSuffix);\n } else {\n return this.localeData().invalidDate();\n }\n }\n\n function toNow(withoutSuffix) {\n return this.to(createLocal(), withoutSuffix);\n } // If passed a locale key, it will set the locale for this\n // instance. Otherwise, it will return the locale configuration\n // variables for this instance.\n\n\n function locale(key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n\n return this;\n }\n }\n\n var lang = deprecate('moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.', function (key) {\n if (key === undefined) {\n return this.localeData();\n } else {\n return this.locale(key);\n }\n });\n\n function localeData() {\n return this._locale;\n }\n\n var MS_PER_SECOND = 1000;\n var MS_PER_MINUTE = 60 * MS_PER_SECOND;\n var MS_PER_HOUR = 60 * MS_PER_MINUTE;\n var MS_PER_400_YEARS = (365 * 400 + 97) * 24 * MS_PER_HOUR; // actual modulo - handles negative numbers (for dates before 1970):\n\n function mod$1(dividend, divisor) {\n return (dividend % divisor + divisor) % divisor;\n }\n\n function localStartOfDate(y, m, d) {\n // the date constructor remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n return new Date(y + 400, m, d) - MS_PER_400_YEARS;\n } else {\n return new Date(y, m, d).valueOf();\n }\n }\n\n function utcStartOfDate(y, m, d) {\n // Date.UTC remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n return Date.UTC(y + 400, m, d) - MS_PER_400_YEARS;\n } else {\n return Date.UTC(y, m, d);\n }\n }\n\n function startOf(units) {\n var time;\n units = normalizeUnits(units);\n\n if (units === undefined || units === 'millisecond' || !this.isValid()) {\n return this;\n }\n\n var startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;\n\n switch (units) {\n case 'year':\n time = startOfDate(this.year(), 0, 1);\n break;\n\n case 'quarter':\n time = startOfDate(this.year(), this.month() - this.month() % 3, 1);\n break;\n\n case 'month':\n time = startOfDate(this.year(), this.month(), 1);\n break;\n\n case 'week':\n time = startOfDate(this.year(), this.month(), this.date() - this.weekday());\n break;\n\n case 'isoWeek':\n time = startOfDate(this.year(), this.month(), this.date() - (this.isoWeekday() - 1));\n break;\n\n case 'day':\n case 'date':\n time = startOfDate(this.year(), this.month(), this.date());\n break;\n\n case 'hour':\n time = this._d.valueOf();\n time -= mod$1(time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE), MS_PER_HOUR);\n break;\n\n case 'minute':\n time = this._d.valueOf();\n time -= mod$1(time, MS_PER_MINUTE);\n break;\n\n case 'second':\n time = this._d.valueOf();\n time -= mod$1(time, MS_PER_SECOND);\n break;\n }\n\n this._d.setTime(time);\n\n hooks.updateOffset(this, true);\n return this;\n }\n\n function endOf(units) {\n var time;\n units = normalizeUnits(units);\n\n if (units === undefined || units === 'millisecond' || !this.isValid()) {\n return this;\n }\n\n var startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;\n\n switch (units) {\n case 'year':\n time = startOfDate(this.year() + 1, 0, 1) - 1;\n break;\n\n case 'quarter':\n time = startOfDate(this.year(), this.month() - this.month() % 3 + 3, 1) - 1;\n break;\n\n case 'month':\n time = startOfDate(this.year(), this.month() + 1, 1) - 1;\n break;\n\n case 'week':\n time = startOfDate(this.year(), this.month(), this.date() - this.weekday() + 7) - 1;\n break;\n\n case 'isoWeek':\n time = startOfDate(this.year(), this.month(), this.date() - (this.isoWeekday() - 1) + 7) - 1;\n break;\n\n case 'day':\n case 'date':\n time = startOfDate(this.year(), this.month(), this.date() + 1) - 1;\n break;\n\n case 'hour':\n time = this._d.valueOf();\n time += MS_PER_HOUR - mod$1(time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE), MS_PER_HOUR) - 1;\n break;\n\n case 'minute':\n time = this._d.valueOf();\n time += MS_PER_MINUTE - mod$1(time, MS_PER_MINUTE) - 1;\n break;\n\n case 'second':\n time = this._d.valueOf();\n time += MS_PER_SECOND - mod$1(time, MS_PER_SECOND) - 1;\n break;\n }\n\n this._d.setTime(time);\n\n hooks.updateOffset(this, true);\n return this;\n }\n\n function valueOf() {\n return this._d.valueOf() - (this._offset || 0) * 60000;\n }\n\n function unix() {\n return Math.floor(this.valueOf() / 1000);\n }\n\n function toDate() {\n return new Date(this.valueOf());\n }\n\n function toArray() {\n var m = this;\n return [m.year(), m.month(), m.date(), m.hour(), m.minute(), m.second(), m.millisecond()];\n }\n\n function toObject() {\n var m = this;\n return {\n years: m.year(),\n months: m.month(),\n date: m.date(),\n hours: m.hours(),\n minutes: m.minutes(),\n seconds: m.seconds(),\n milliseconds: m.milliseconds()\n };\n }\n\n function toJSON() {\n // new Date(NaN).toJSON() === null\n return this.isValid() ? this.toISOString() : null;\n }\n\n function isValid$2() {\n return isValid(this);\n }\n\n function parsingFlags() {\n return extend({}, getParsingFlags(this));\n }\n\n function invalidAt() {\n return getParsingFlags(this).overflow;\n }\n\n function creationData() {\n return {\n input: this._i,\n format: this._f,\n locale: this._locale,\n isUTC: this._isUTC,\n strict: this._strict\n };\n } // FORMATTING\n\n\n addFormatToken(0, ['gg', 2], 0, function () {\n return this.weekYear() % 100;\n });\n addFormatToken(0, ['GG', 2], 0, function () {\n return this.isoWeekYear() % 100;\n });\n\n function addWeekYearFormatToken(token, getter) {\n addFormatToken(0, [token, token.length], 0, getter);\n }\n\n addWeekYearFormatToken('gggg', 'weekYear');\n addWeekYearFormatToken('ggggg', 'weekYear');\n addWeekYearFormatToken('GGGG', 'isoWeekYear');\n addWeekYearFormatToken('GGGGG', 'isoWeekYear'); // ALIASES\n\n addUnitAlias('weekYear', 'gg');\n addUnitAlias('isoWeekYear', 'GG'); // PRIORITY\n\n addUnitPriority('weekYear', 1);\n addUnitPriority('isoWeekYear', 1); // PARSING\n\n addRegexToken('G', matchSigned);\n addRegexToken('g', matchSigned);\n addRegexToken('GG', match1to2, match2);\n addRegexToken('gg', match1to2, match2);\n addRegexToken('GGGG', match1to4, match4);\n addRegexToken('gggg', match1to4, match4);\n addRegexToken('GGGGG', match1to6, match6);\n addRegexToken('ggggg', match1to6, match6);\n addWeekParseToken(['gggg', 'ggggg', 'GGGG', 'GGGGG'], function (input, week, config, token) {\n week[token.substr(0, 2)] = toInt(input);\n });\n addWeekParseToken(['gg', 'GG'], function (input, week, config, token) {\n week[token] = hooks.parseTwoDigitYear(input);\n }); // MOMENTS\n\n function getSetWeekYear(input) {\n return getSetWeekYearHelper.call(this, input, this.week(), this.weekday(), this.localeData()._week.dow, this.localeData()._week.doy);\n }\n\n function getSetISOWeekYear(input) {\n return getSetWeekYearHelper.call(this, input, this.isoWeek(), this.isoWeekday(), 1, 4);\n }\n\n function getISOWeeksInYear() {\n return weeksInYear(this.year(), 1, 4);\n }\n\n function getWeeksInYear() {\n var weekInfo = this.localeData()._week;\n\n return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy);\n }\n\n function getSetWeekYearHelper(input, week, weekday, dow, doy) {\n var weeksTarget;\n\n if (input == null) {\n return weekOfYear(this, dow, doy).year;\n } else {\n weeksTarget = weeksInYear(input, dow, doy);\n\n if (week > weeksTarget) {\n week = weeksTarget;\n }\n\n return setWeekAll.call(this, input, week, weekday, dow, doy);\n }\n }\n\n function setWeekAll(weekYear, week, weekday, dow, doy) {\n var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy),\n date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear);\n this.year(date.getUTCFullYear());\n this.month(date.getUTCMonth());\n this.date(date.getUTCDate());\n return this;\n } // FORMATTING\n\n\n addFormatToken('Q', 0, 'Qo', 'quarter'); // ALIASES\n\n addUnitAlias('quarter', 'Q'); // PRIORITY\n\n addUnitPriority('quarter', 7); // PARSING\n\n addRegexToken('Q', match1);\n addParseToken('Q', function (input, array) {\n array[MONTH] = (toInt(input) - 1) * 3;\n }); // MOMENTS\n\n function getSetQuarter(input) {\n return input == null ? Math.ceil((this.month() + 1) / 3) : this.month((input - 1) * 3 + this.month() % 3);\n } // FORMATTING\n\n\n addFormatToken('D', ['DD', 2], 'Do', 'date'); // ALIASES\n\n addUnitAlias('date', 'D'); // PRIORITY\n\n addUnitPriority('date', 9); // PARSING\n\n addRegexToken('D', match1to2);\n addRegexToken('DD', match1to2, match2);\n addRegexToken('Do', function (isStrict, locale) {\n // TODO: Remove \"ordinalParse\" fallback in next major release.\n return isStrict ? locale._dayOfMonthOrdinalParse || locale._ordinalParse : locale._dayOfMonthOrdinalParseLenient;\n });\n addParseToken(['D', 'DD'], DATE);\n addParseToken('Do', function (input, array) {\n array[DATE] = toInt(input.match(match1to2)[0]);\n }); // MOMENTS\n\n var getSetDayOfMonth = makeGetSet('Date', true); // FORMATTING\n\n addFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear'); // ALIASES\n\n addUnitAlias('dayOfYear', 'DDD'); // PRIORITY\n\n addUnitPriority('dayOfYear', 4); // PARSING\n\n addRegexToken('DDD', match1to3);\n addRegexToken('DDDD', match3);\n addParseToken(['DDD', 'DDDD'], function (input, array, config) {\n config._dayOfYear = toInt(input);\n }); // HELPERS\n // MOMENTS\n\n function getSetDayOfYear(input) {\n var dayOfYear = Math.round((this.clone().startOf('day') - this.clone().startOf('year')) / 864e5) + 1;\n return input == null ? dayOfYear : this.add(input - dayOfYear, 'd');\n } // FORMATTING\n\n\n addFormatToken('m', ['mm', 2], 0, 'minute'); // ALIASES\n\n addUnitAlias('minute', 'm'); // PRIORITY\n\n addUnitPriority('minute', 14); // PARSING\n\n addRegexToken('m', match1to2);\n addRegexToken('mm', match1to2, match2);\n addParseToken(['m', 'mm'], MINUTE); // MOMENTS\n\n var getSetMinute = makeGetSet('Minutes', false); // FORMATTING\n\n addFormatToken('s', ['ss', 2], 0, 'second'); // ALIASES\n\n addUnitAlias('second', 's'); // PRIORITY\n\n addUnitPriority('second', 15); // PARSING\n\n addRegexToken('s', match1to2);\n addRegexToken('ss', match1to2, match2);\n addParseToken(['s', 'ss'], SECOND); // MOMENTS\n\n var getSetSecond = makeGetSet('Seconds', false); // FORMATTING\n\n addFormatToken('S', 0, 0, function () {\n return ~~(this.millisecond() / 100);\n });\n addFormatToken(0, ['SS', 2], 0, function () {\n return ~~(this.millisecond() / 10);\n });\n addFormatToken(0, ['SSS', 3], 0, 'millisecond');\n addFormatToken(0, ['SSSS', 4], 0, function () {\n return this.millisecond() * 10;\n });\n addFormatToken(0, ['SSSSS', 5], 0, function () {\n return this.millisecond() * 100;\n });\n addFormatToken(0, ['SSSSSS', 6], 0, function () {\n return this.millisecond() * 1000;\n });\n addFormatToken(0, ['SSSSSSS', 7], 0, function () {\n return this.millisecond() * 10000;\n });\n addFormatToken(0, ['SSSSSSSS', 8], 0, function () {\n return this.millisecond() * 100000;\n });\n addFormatToken(0, ['SSSSSSSSS', 9], 0, function () {\n return this.millisecond() * 1000000;\n }); // ALIASES\n\n addUnitAlias('millisecond', 'ms'); // PRIORITY\n\n addUnitPriority('millisecond', 16); // PARSING\n\n addRegexToken('S', match1to3, match1);\n addRegexToken('SS', match1to3, match2);\n addRegexToken('SSS', match1to3, match3);\n var token;\n\n for (token = 'SSSS'; token.length <= 9; token += 'S') {\n addRegexToken(token, matchUnsigned);\n }\n\n function parseMs(input, array) {\n array[MILLISECOND] = toInt(('0.' + input) * 1000);\n }\n\n for (token = 'S'; token.length <= 9; token += 'S') {\n addParseToken(token, parseMs);\n } // MOMENTS\n\n\n var getSetMillisecond = makeGetSet('Milliseconds', false); // FORMATTING\n\n addFormatToken('z', 0, 0, 'zoneAbbr');\n addFormatToken('zz', 0, 0, 'zoneName'); // MOMENTS\n\n function getZoneAbbr() {\n return this._isUTC ? 'UTC' : '';\n }\n\n function getZoneName() {\n return this._isUTC ? 'Coordinated Universal Time' : '';\n }\n\n var proto = Moment.prototype;\n proto.add = add;\n proto.calendar = calendar$1;\n proto.clone = clone;\n proto.diff = diff;\n proto.endOf = endOf;\n proto.format = format;\n proto.from = from;\n proto.fromNow = fromNow;\n proto.to = to;\n proto.toNow = toNow;\n proto.get = stringGet;\n proto.invalidAt = invalidAt;\n proto.isAfter = isAfter;\n proto.isBefore = isBefore;\n proto.isBetween = isBetween;\n proto.isSame = isSame;\n proto.isSameOrAfter = isSameOrAfter;\n proto.isSameOrBefore = isSameOrBefore;\n proto.isValid = isValid$2;\n proto.lang = lang;\n proto.locale = locale;\n proto.localeData = localeData;\n proto.max = prototypeMax;\n proto.min = prototypeMin;\n proto.parsingFlags = parsingFlags;\n proto.set = stringSet;\n proto.startOf = startOf;\n proto.subtract = subtract;\n proto.toArray = toArray;\n proto.toObject = toObject;\n proto.toDate = toDate;\n proto.toISOString = toISOString;\n proto.inspect = inspect;\n proto.toJSON = toJSON;\n proto.toString = toString;\n proto.unix = unix;\n proto.valueOf = valueOf;\n proto.creationData = creationData;\n proto.year = getSetYear;\n proto.isLeapYear = getIsLeapYear;\n proto.weekYear = getSetWeekYear;\n proto.isoWeekYear = getSetISOWeekYear;\n proto.quarter = proto.quarters = getSetQuarter;\n proto.month = getSetMonth;\n proto.daysInMonth = getDaysInMonth;\n proto.week = proto.weeks = getSetWeek;\n proto.isoWeek = proto.isoWeeks = getSetISOWeek;\n proto.weeksInYear = getWeeksInYear;\n proto.isoWeeksInYear = getISOWeeksInYear;\n proto.date = getSetDayOfMonth;\n proto.day = proto.days = getSetDayOfWeek;\n proto.weekday = getSetLocaleDayOfWeek;\n proto.isoWeekday = getSetISODayOfWeek;\n proto.dayOfYear = getSetDayOfYear;\n proto.hour = proto.hours = getSetHour;\n proto.minute = proto.minutes = getSetMinute;\n proto.second = proto.seconds = getSetSecond;\n proto.millisecond = proto.milliseconds = getSetMillisecond;\n proto.utcOffset = getSetOffset;\n proto.utc = setOffsetToUTC;\n proto.local = setOffsetToLocal;\n proto.parseZone = setOffsetToParsedOffset;\n proto.hasAlignedHourOffset = hasAlignedHourOffset;\n proto.isDST = isDaylightSavingTime;\n proto.isLocal = isLocal;\n proto.isUtcOffset = isUtcOffset;\n proto.isUtc = isUtc;\n proto.isUTC = isUtc;\n proto.zoneAbbr = getZoneAbbr;\n proto.zoneName = getZoneName;\n proto.dates = deprecate('dates accessor is deprecated. Use date instead.', getSetDayOfMonth);\n proto.months = deprecate('months accessor is deprecated. Use month instead', getSetMonth);\n proto.years = deprecate('years accessor is deprecated. Use year instead', getSetYear);\n proto.zone = deprecate('moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/', getSetZone);\n proto.isDSTShifted = deprecate('isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information', isDaylightSavingTimeShifted);\n\n function createUnix(input) {\n return createLocal(input * 1000);\n }\n\n function createInZone() {\n return createLocal.apply(null, arguments).parseZone();\n }\n\n function preParsePostFormat(string) {\n return string;\n }\n\n var proto$1 = Locale.prototype;\n proto$1.calendar = calendar;\n proto$1.longDateFormat = longDateFormat;\n proto$1.invalidDate = invalidDate;\n proto$1.ordinal = ordinal;\n proto$1.preparse = preParsePostFormat;\n proto$1.postformat = preParsePostFormat;\n proto$1.relativeTime = relativeTime;\n proto$1.pastFuture = pastFuture;\n proto$1.set = set;\n proto$1.months = localeMonths;\n proto$1.monthsShort = localeMonthsShort;\n proto$1.monthsParse = localeMonthsParse;\n proto$1.monthsRegex = monthsRegex;\n proto$1.monthsShortRegex = monthsShortRegex;\n proto$1.week = localeWeek;\n proto$1.firstDayOfYear = localeFirstDayOfYear;\n proto$1.firstDayOfWeek = localeFirstDayOfWeek;\n proto$1.weekdays = localeWeekdays;\n proto$1.weekdaysMin = localeWeekdaysMin;\n proto$1.weekdaysShort = localeWeekdaysShort;\n proto$1.weekdaysParse = localeWeekdaysParse;\n proto$1.weekdaysRegex = weekdaysRegex;\n proto$1.weekdaysShortRegex = weekdaysShortRegex;\n proto$1.weekdaysMinRegex = weekdaysMinRegex;\n proto$1.isPM = localeIsPM;\n proto$1.meridiem = localeMeridiem;\n\n function get$1(format, index, field, setter) {\n var locale = getLocale();\n var utc = createUTC().set(setter, index);\n return locale[field](utc, format);\n }\n\n function listMonthsImpl(format, index, field) {\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n\n if (index != null) {\n return get$1(format, index, field, 'month');\n }\n\n var i;\n var out = [];\n\n for (i = 0; i < 12; i++) {\n out[i] = get$1(format, i, field, 'month');\n }\n\n return out;\n } // ()\n // (5)\n // (fmt, 5)\n // (fmt)\n // (true)\n // (true, 5)\n // (true, fmt, 5)\n // (true, fmt)\n\n\n function listWeekdaysImpl(localeSorted, format, index, field) {\n if (typeof localeSorted === 'boolean') {\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n } else {\n format = localeSorted;\n index = format;\n localeSorted = false;\n\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n }\n\n var locale = getLocale(),\n shift = localeSorted ? locale._week.dow : 0;\n\n if (index != null) {\n return get$1(format, (index + shift) % 7, field, 'day');\n }\n\n var i;\n var out = [];\n\n for (i = 0; i < 7; i++) {\n out[i] = get$1(format, (i + shift) % 7, field, 'day');\n }\n\n return out;\n }\n\n function listMonths(format, index) {\n return listMonthsImpl(format, index, 'months');\n }\n\n function listMonthsShort(format, index) {\n return listMonthsImpl(format, index, 'monthsShort');\n }\n\n function listWeekdays(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdays');\n }\n\n function listWeekdaysShort(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort');\n }\n\n function listWeekdaysMin(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin');\n }\n\n getSetGlobalLocale('en', {\n dayOfMonthOrdinalParse: /\\d{1,2}(th|st|nd|rd)/,\n ordinal: function (number) {\n var b = number % 10,\n output = toInt(number % 100 / 10) === 1 ? 'th' : b === 1 ? 'st' : b === 2 ? 'nd' : b === 3 ? 'rd' : 'th';\n return number + output;\n }\n }); // Side effect imports\n\n hooks.lang = deprecate('moment.lang is deprecated. Use moment.locale instead.', getSetGlobalLocale);\n hooks.langData = deprecate('moment.langData is deprecated. Use moment.localeData instead.', getLocale);\n var mathAbs = Math.abs;\n\n function abs() {\n var data = this._data;\n this._milliseconds = mathAbs(this._milliseconds);\n this._days = mathAbs(this._days);\n this._months = mathAbs(this._months);\n data.milliseconds = mathAbs(data.milliseconds);\n data.seconds = mathAbs(data.seconds);\n data.minutes = mathAbs(data.minutes);\n data.hours = mathAbs(data.hours);\n data.months = mathAbs(data.months);\n data.years = mathAbs(data.years);\n return this;\n }\n\n function addSubtract$1(duration, input, value, direction) {\n var other = createDuration(input, value);\n duration._milliseconds += direction * other._milliseconds;\n duration._days += direction * other._days;\n duration._months += direction * other._months;\n return duration._bubble();\n } // supports only 2.0-style add(1, 's') or add(duration)\n\n\n function add$1(input, value) {\n return addSubtract$1(this, input, value, 1);\n } // supports only 2.0-style subtract(1, 's') or subtract(duration)\n\n\n function subtract$1(input, value) {\n return addSubtract$1(this, input, value, -1);\n }\n\n function absCeil(number) {\n if (number < 0) {\n return Math.floor(number);\n } else {\n return Math.ceil(number);\n }\n }\n\n function bubble() {\n var milliseconds = this._milliseconds;\n var days = this._days;\n var months = this._months;\n var data = this._data;\n var seconds, minutes, hours, years, monthsFromDays; // if we have a mix of positive and negative values, bubble down first\n // check: https://github.com/moment/moment/issues/2166\n\n if (!(milliseconds >= 0 && days >= 0 && months >= 0 || milliseconds <= 0 && days <= 0 && months <= 0)) {\n milliseconds += absCeil(monthsToDays(months) + days) * 864e5;\n days = 0;\n months = 0;\n } // The following code bubbles up values, see the tests for\n // examples of what that means.\n\n\n data.milliseconds = milliseconds % 1000;\n seconds = absFloor(milliseconds / 1000);\n data.seconds = seconds % 60;\n minutes = absFloor(seconds / 60);\n data.minutes = minutes % 60;\n hours = absFloor(minutes / 60);\n data.hours = hours % 24;\n days += absFloor(hours / 24); // convert days to months\n\n monthsFromDays = absFloor(daysToMonths(days));\n months += monthsFromDays;\n days -= absCeil(monthsToDays(monthsFromDays)); // 12 months -> 1 year\n\n years = absFloor(months / 12);\n months %= 12;\n data.days = days;\n data.months = months;\n data.years = years;\n return this;\n }\n\n function daysToMonths(days) {\n // 400 years have 146097 days (taking into account leap year rules)\n // 400 years have 12 months === 4800\n return days * 4800 / 146097;\n }\n\n function monthsToDays(months) {\n // the reverse of daysToMonths\n return months * 146097 / 4800;\n }\n\n function as(units) {\n if (!this.isValid()) {\n return NaN;\n }\n\n var days;\n var months;\n var milliseconds = this._milliseconds;\n units = normalizeUnits(units);\n\n if (units === 'month' || units === 'quarter' || units === 'year') {\n days = this._days + milliseconds / 864e5;\n months = this._months + daysToMonths(days);\n\n switch (units) {\n case 'month':\n return months;\n\n case 'quarter':\n return months / 3;\n\n case 'year':\n return months / 12;\n }\n } else {\n // handle milliseconds separately because of floating point math errors (issue #1867)\n days = this._days + Math.round(monthsToDays(this._months));\n\n switch (units) {\n case 'week':\n return days / 7 + milliseconds / 6048e5;\n\n case 'day':\n return days + milliseconds / 864e5;\n\n case 'hour':\n return days * 24 + milliseconds / 36e5;\n\n case 'minute':\n return days * 1440 + milliseconds / 6e4;\n\n case 'second':\n return days * 86400 + milliseconds / 1000;\n // Math.floor prevents floating point math errors here\n\n case 'millisecond':\n return Math.floor(days * 864e5) + milliseconds;\n\n default:\n throw new Error('Unknown unit ' + units);\n }\n }\n } // TODO: Use this.as('ms')?\n\n\n function valueOf$1() {\n if (!this.isValid()) {\n return NaN;\n }\n\n return this._milliseconds + this._days * 864e5 + this._months % 12 * 2592e6 + toInt(this._months / 12) * 31536e6;\n }\n\n function makeAs(alias) {\n return function () {\n return this.as(alias);\n };\n }\n\n var asMilliseconds = makeAs('ms');\n var asSeconds = makeAs('s');\n var asMinutes = makeAs('m');\n var asHours = makeAs('h');\n var asDays = makeAs('d');\n var asWeeks = makeAs('w');\n var asMonths = makeAs('M');\n var asQuarters = makeAs('Q');\n var asYears = makeAs('y');\n\n function clone$1() {\n return createDuration(this);\n }\n\n function get$2(units) {\n units = normalizeUnits(units);\n return this.isValid() ? this[units + 's']() : NaN;\n }\n\n function makeGetter(name) {\n return function () {\n return this.isValid() ? this._data[name] : NaN;\n };\n }\n\n var milliseconds = makeGetter('milliseconds');\n var seconds = makeGetter('seconds');\n var minutes = makeGetter('minutes');\n var hours = makeGetter('hours');\n var days = makeGetter('days');\n var months = makeGetter('months');\n var years = makeGetter('years');\n\n function weeks() {\n return absFloor(this.days() / 7);\n }\n\n var round = Math.round;\n var thresholds = {\n ss: 44,\n // a few seconds to seconds\n s: 45,\n // seconds to minute\n m: 45,\n // minutes to hour\n h: 22,\n // hours to day\n d: 26,\n // days to month\n M: 11 // months to year\n\n }; // helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize\n\n function substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) {\n return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture);\n }\n\n function relativeTime$1(posNegDuration, withoutSuffix, locale) {\n var duration = createDuration(posNegDuration).abs();\n var seconds = round(duration.as('s'));\n var minutes = round(duration.as('m'));\n var hours = round(duration.as('h'));\n var days = round(duration.as('d'));\n var months = round(duration.as('M'));\n var years = round(duration.as('y'));\n var a = seconds <= thresholds.ss && ['s', seconds] || seconds < thresholds.s && ['ss', seconds] || minutes <= 1 && ['m'] || minutes < thresholds.m && ['mm', minutes] || hours <= 1 && ['h'] || hours < thresholds.h && ['hh', hours] || days <= 1 && ['d'] || days < thresholds.d && ['dd', days] || months <= 1 && ['M'] || months < thresholds.M && ['MM', months] || years <= 1 && ['y'] || ['yy', years];\n a[2] = withoutSuffix;\n a[3] = +posNegDuration > 0;\n a[4] = locale;\n return substituteTimeAgo.apply(null, a);\n } // This function allows you to set the rounding function for relative time strings\n\n\n function getSetRelativeTimeRounding(roundingFunction) {\n if (roundingFunction === undefined) {\n return round;\n }\n\n if (typeof roundingFunction === 'function') {\n round = roundingFunction;\n return true;\n }\n\n return false;\n } // This function allows you to set a threshold for relative time strings\n\n\n function getSetRelativeTimeThreshold(threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n\n if (limit === undefined) {\n return thresholds[threshold];\n }\n\n thresholds[threshold] = limit;\n\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n\n return true;\n }\n\n function humanize(withSuffix) {\n if (!this.isValid()) {\n return this.localeData().invalidDate();\n }\n\n var locale = this.localeData();\n var output = relativeTime$1(this, !withSuffix, locale);\n\n if (withSuffix) {\n output = locale.pastFuture(+this, output);\n }\n\n return locale.postformat(output);\n }\n\n var abs$1 = Math.abs;\n\n function sign(x) {\n return (x > 0) - (x < 0) || +x;\n }\n\n function toISOString$1() {\n // for ISO strings we do not use the normal bubbling rules:\n // * milliseconds bubble up until they become hours\n // * days do not bubble at all\n // * months bubble up until they become years\n // This is because there is no context-free conversion between hours and days\n // (think of clock changes)\n // and also not between days and months (28-31 days per month)\n if (!this.isValid()) {\n return this.localeData().invalidDate();\n }\n\n var seconds = abs$1(this._milliseconds) / 1000;\n var days = abs$1(this._days);\n var months = abs$1(this._months);\n var minutes, hours, years; // 3600 seconds -> 60 minutes -> 1 hour\n\n minutes = absFloor(seconds / 60);\n hours = absFloor(minutes / 60);\n seconds %= 60;\n minutes %= 60; // 12 months -> 1 year\n\n years = absFloor(months / 12);\n months %= 12; // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js\n\n var Y = years;\n var M = months;\n var D = days;\n var h = hours;\n var m = minutes;\n var s = seconds ? seconds.toFixed(3).replace(/\\.?0+$/, '') : '';\n var total = this.asSeconds();\n\n if (!total) {\n // this is the same as C#'s (Noda) and python (isodate)...\n // but not other JS (goog.date)\n return 'P0D';\n }\n\n var totalSign = total < 0 ? '-' : '';\n var ymSign = sign(this._months) !== sign(total) ? '-' : '';\n var daysSign = sign(this._days) !== sign(total) ? '-' : '';\n var hmsSign = sign(this._milliseconds) !== sign(total) ? '-' : '';\n return totalSign + 'P' + (Y ? ymSign + Y + 'Y' : '') + (M ? ymSign + M + 'M' : '') + (D ? daysSign + D + 'D' : '') + (h || m || s ? 'T' : '') + (h ? hmsSign + h + 'H' : '') + (m ? hmsSign + m + 'M' : '') + (s ? hmsSign + s + 'S' : '');\n }\n\n var proto$2 = Duration.prototype;\n proto$2.isValid = isValid$1;\n proto$2.abs = abs;\n proto$2.add = add$1;\n proto$2.subtract = subtract$1;\n proto$2.as = as;\n proto$2.asMilliseconds = asMilliseconds;\n proto$2.asSeconds = asSeconds;\n proto$2.asMinutes = asMinutes;\n proto$2.asHours = asHours;\n proto$2.asDays = asDays;\n proto$2.asWeeks = asWeeks;\n proto$2.asMonths = asMonths;\n proto$2.asQuarters = asQuarters;\n proto$2.asYears = asYears;\n proto$2.valueOf = valueOf$1;\n proto$2._bubble = bubble;\n proto$2.clone = clone$1;\n proto$2.get = get$2;\n proto$2.milliseconds = milliseconds;\n proto$2.seconds = seconds;\n proto$2.minutes = minutes;\n proto$2.hours = hours;\n proto$2.days = days;\n proto$2.weeks = weeks;\n proto$2.months = months;\n proto$2.years = years;\n proto$2.humanize = humanize;\n proto$2.toISOString = toISOString$1;\n proto$2.toString = toISOString$1;\n proto$2.toJSON = toISOString$1;\n proto$2.locale = locale;\n proto$2.localeData = localeData;\n proto$2.toIsoString = deprecate('toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)', toISOString$1);\n proto$2.lang = lang; // Side effect imports\n // FORMATTING\n\n addFormatToken('X', 0, 0, 'unix');\n addFormatToken('x', 0, 0, 'valueOf'); // PARSING\n\n addRegexToken('x', matchSigned);\n addRegexToken('X', matchTimestamp);\n addParseToken('X', function (input, array, config) {\n config._d = new Date(parseFloat(input, 10) * 1000);\n });\n addParseToken('x', function (input, array, config) {\n config._d = new Date(toInt(input));\n }); // Side effect imports\n\n hooks.version = '2.24.0';\n setHookCallback(createLocal);\n hooks.fn = proto;\n hooks.min = min;\n hooks.max = max;\n hooks.now = now;\n hooks.utc = createUTC;\n hooks.unix = createUnix;\n hooks.months = listMonths;\n hooks.isDate = isDate;\n hooks.locale = getSetGlobalLocale;\n hooks.invalid = createInvalid;\n hooks.duration = createDuration;\n hooks.isMoment = isMoment;\n hooks.weekdays = listWeekdays;\n hooks.parseZone = createInZone;\n hooks.localeData = getLocale;\n hooks.isDuration = isDuration;\n hooks.monthsShort = listMonthsShort;\n hooks.weekdaysMin = listWeekdaysMin;\n hooks.defineLocale = defineLocale;\n hooks.updateLocale = updateLocale;\n hooks.locales = listLocales;\n hooks.weekdaysShort = listWeekdaysShort;\n hooks.normalizeUnits = normalizeUnits;\n hooks.relativeTimeRounding = getSetRelativeTimeRounding;\n hooks.relativeTimeThreshold = getSetRelativeTimeThreshold;\n hooks.calendarFormat = getCalendarFormat;\n hooks.prototype = proto; // currently HTML5 input type only supports 24-hour formats\n\n hooks.HTML5_FMT = {\n DATETIME_LOCAL: 'YYYY-MM-DDTHH:mm',\n // \n DATETIME_LOCAL_SECONDS: 'YYYY-MM-DDTHH:mm:ss',\n // \n DATETIME_LOCAL_MS: 'YYYY-MM-DDTHH:mm:ss.SSS',\n // \n DATE: 'YYYY-MM-DD',\n // \n TIME: 'HH:mm',\n // \n TIME_SECONDS: 'HH:mm:ss',\n // \n TIME_MS: 'HH:mm:ss.SSS',\n // \n WEEK: 'GGGG-[W]WW',\n // \n MONTH: 'YYYY-MM' // \n\n };\n return hooks;\n });\n}); // Maps for number <-> hex string conversion\n\nvar byteToHex$2 = [];\n\nfor (var i$2 = 0; i$2 < 256; i$2++) {\n byteToHex$2[i$2] = (i$2 + 0x100).toString(16).substr(1);\n}\n/**\n * Generate 16 random bytes to be used as a base for UUID.\n *\n * @ignore\n */\n\n\nvar random$1 = function () {\n if (typeof crypto !== 'undefined' && crypto.getRandomValues) {\n // WHATWG crypto-based RNG - http://wiki.whatwg.org/wiki/Crypto\n // Moderately fast, high quality\n var _rnds8 = new Uint8Array(16);\n\n return function whatwgRNG() {\n crypto.getRandomValues(_rnds8);\n return _rnds8;\n };\n } // Math.random()-based (RNG)\n //\n // If all else fails, use Math.random().\n // It's fast, but is of unspecified quality.\n\n\n var _rnds = new Array(16);\n\n return function () {\n for (var i = 0, r; i < 16; i++) {\n if ((i & 0x03) === 0) {\n r = Math.random() * 0x100000000;\n }\n\n _rnds[i] = r >>> ((i & 0x03) << 3) & 0xff;\n }\n\n return _rnds;\n }; // uuid.js\n //\n // Copyright (c) 2010-2012 Robert Kieffer\n // MIT License - http://opensource.org/licenses/mit-license.php\n // Unique ID creation requires a high quality random # generator. We feature\n // detect to determine the best RNG source, normalizing to a function that\n // returns 128-bits of randomness, since that's what's usually required\n // return require('./rng');\n}();\n\nvar byteToHex$1$1 = [];\n\nfor (var i$1$1 = 0; i$1$1 < 256; i$1$1++) {\n byteToHex$1$1[i$1$1] = (i$1$1 + 0x100).toString(16).substr(1);\n} // **`v1()` - Generate time-based UUID**\n//\n// Inspired by https://github.com/LiosK/UUID.js\n// and http://docs.python.org/library/uuid.html\n// random #'s we need to init node and clockseq\n\n\nvar seedBytes$1 = random$1(); // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)\n\nvar defaultNodeId$1 = [seedBytes$1[0] | 0x01, seedBytes$1[1], seedBytes$1[2], seedBytes$1[3], seedBytes$1[4], seedBytes$1[5]]; // Per 4.2.2, randomize (14 bit) clockseq\n\nvar defaultClockseq$1 = (seedBytes$1[6] << 8 | seedBytes$1[7]) & 0x3fff; // Previous uuid creation time\n// for example '/Date(1198908717056)/' or '/Date(1198908717056-0700)/'\n// code from http://momentjs.com/\n\n\nvar ASPDateRegex = /^\\/?Date\\((-?\\d+)/i; // Hex color\n/**\n * Hue, Saturation, Value.\n */\n\n/**\n * Test whether given object is a number\n *\n * @param value - Input value of unknown type.\n *\n * @returns True if number, false otherwise.\n */\n\nfunction isNumber(value) {\n return value instanceof Number || typeof value === 'number';\n}\n/**\n * Test whether given object is a string\n *\n * @param value - Input value of unknown type.\n *\n * @returns True if string, false otherwise.\n */\n\n\nfunction isString(value) {\n return value instanceof String || typeof value === 'string';\n}\n/**\n * Test whether given object is a Moment date.\n * @TODO: This is basically a workaround, if Moment was imported property it wouldn't necessary as moment.isMoment is a TS type guard.\n *\n * @param value - Input value of unknown type.\n *\n * @returns True if Moment instance, false otherwise.\n */\n\n\nfunction isMoment(value) {\n return moment.isMoment(value);\n}\n/**\n * Convert an object into another type\n *\n * @param object - Value of unknown type.\n * @param type - Name of the desired type.\n *\n * @returns Object in the desired type.\n * @throws Error\n */\n\n\nfunction convert(object, type) {\n var match;\n\n if (object === undefined) {\n return undefined;\n }\n\n if (object === null) {\n return null;\n }\n\n if (!type) {\n return object;\n }\n\n if (!(typeof type === 'string') && !(type instanceof String)) {\n throw new Error('Type must be a string');\n } //noinspection FallthroughInSwitchStatementJS\n\n\n switch (type) {\n case 'boolean':\n case 'Boolean':\n return Boolean(object);\n\n case 'number':\n case 'Number':\n if (isString(object) && !isNaN(Date.parse(object))) {\n return moment(object).valueOf();\n } else {\n // @TODO: I don't think that Number and String constructors are a good idea.\n // This could also fail if the object doesn't have valueOf method or if it's redefined.\n // For example: Object.create(null) or { valueOf: 7 }.\n return Number(object.valueOf());\n }\n\n case 'string':\n case 'String':\n return String(object);\n\n case 'Date':\n if (isNumber(object)) {\n return new Date(object);\n }\n\n if (object instanceof Date) {\n return new Date(object.valueOf());\n } else if (isMoment(object)) {\n return new Date(object.valueOf());\n }\n\n if (isString(object)) {\n match = ASPDateRegex.exec(object);\n\n if (match) {\n // object is an ASP date\n return new Date(Number(match[1])); // parse number\n } else {\n return moment(new Date(object)).toDate(); // parse string\n }\n } else {\n throw new Error('Cannot convert object of type ' + getType(object) + ' to type Date');\n }\n\n case 'Moment':\n if (isNumber(object)) {\n return moment(object);\n }\n\n if (object instanceof Date) {\n return moment(object.valueOf());\n } else if (isMoment(object)) {\n return moment(object);\n }\n\n if (isString(object)) {\n match = ASPDateRegex.exec(object);\n\n if (match) {\n // object is an ASP date\n return moment(Number(match[1])); // parse number\n } else {\n return moment(object); // parse string\n }\n } else {\n throw new Error('Cannot convert object of type ' + getType(object) + ' to type Date');\n }\n\n case 'ISODate':\n if (isNumber(object)) {\n return new Date(object);\n } else if (object instanceof Date) {\n return object.toISOString();\n } else if (isMoment(object)) {\n return object.toDate().toISOString();\n } else if (isString(object)) {\n match = ASPDateRegex.exec(object);\n\n if (match) {\n // object is an ASP date\n return new Date(Number(match[1])).toISOString(); // parse number\n } else {\n return moment(object).format(); // ISO 8601\n }\n } else {\n throw new Error('Cannot convert object of type ' + getType(object) + ' to type ISODate');\n }\n\n case 'ASPDate':\n if (isNumber(object)) {\n return '/Date(' + object + ')/';\n } else if (object instanceof Date) {\n return '/Date(' + object.valueOf() + ')/';\n } else if (isString(object)) {\n match = ASPDateRegex.exec(object);\n\n var _value;\n\n if (match) {\n // object is an ASP date\n _value = new Date(Number(match[1])).valueOf(); // parse number\n } else {\n _value = new Date(object).valueOf(); // parse string\n }\n\n return '/Date(' + _value + ')/';\n } else {\n throw new Error('Cannot convert object of type ' + getType(object) + ' to type ASPDate');\n }\n\n default:\n var never = type;\n throw new Error(\"Unknown type \".concat(never));\n }\n}\n/**\n * Get the type of an object, for example exports.getType([]) returns 'Array'\n *\n * @param object - Input value of unknown type.\n *\n * @returns Detected type.\n */\n\n\nfunction getType(object) {\n var type = _typeof(object);\n\n if (type === 'object') {\n if (object === null) {\n return 'null';\n }\n\n if (object instanceof Boolean) {\n return 'Boolean';\n }\n\n if (object instanceof Number) {\n return 'Number';\n }\n\n if (object instanceof String) {\n return 'String';\n }\n\n if (Array.isArray(object)) {\n return 'Array';\n }\n\n if (object instanceof Date) {\n return 'Date';\n }\n\n return 'Object';\n }\n\n if (type === 'number') {\n return 'Number';\n }\n\n if (type === 'boolean') {\n return 'Boolean';\n }\n\n if (type === 'string') {\n return 'String';\n }\n\n if (type === undefined) {\n return 'undefined';\n }\n\n return type;\n}\n\n/**\r\n * Determine whether a value can be used as an id.\r\n *\r\n * @param value - Input value of unknown type.\r\n *\r\n * @returns True if the value is valid id, false otherwise.\r\n */\nfunction isId(value) {\n return typeof value === 'string' || typeof value === 'number';\n}\n\n/**\r\n * A queue.\r\n *\r\n * @typeParam T - The type of method names to be replaced by queued versions.\r\n */\nvar Queue =\n/*#__PURE__*/\nfunction () {\n /**\r\n * Construct a new Queue.\r\n *\r\n * @param options - Queue configuration.\r\n */\n function Queue(options) {\n classCallCheck(this, Queue);\n\n this._queue = [];\n this._timeout = null;\n this._extended = null; // options\n\n this.delay = null;\n this.max = Infinity;\n this.setOptions(options);\n }\n /**\r\n * Update the configuration of the queue.\r\n *\r\n * @param options - Queue configuration.\r\n */\n\n\n createClass(Queue, [{\n key: \"setOptions\",\n value: function setOptions(options) {\n if (options && typeof options.delay !== 'undefined') {\n this.delay = options.delay;\n }\n\n if (options && typeof options.max !== 'undefined') {\n this.max = options.max;\n }\n\n this._flushIfNeeded();\n }\n /**\r\n * Extend an object with queuing functionality.\r\n * The object will be extended with a function flush, and the methods provided in options.replace will be replaced with queued ones.\r\n *\r\n * @param object - The object to be extended.\r\n * @param options - Additional options.\r\n *\r\n * @returns The created queue.\r\n */\n\n }, {\n key: \"destroy\",\n\n /**\r\n * Destroy the queue. The queue will first flush all queued actions, and in case it has extended an object, will restore the original object.\r\n */\n value: function destroy() {\n this.flush();\n\n if (this._extended) {\n var object = this._extended.object;\n var methods = this._extended.methods;\n\n for (var i = 0; i < methods.length; i++) {\n var method = methods[i];\n\n if (method.original) {\n object[method.name] = method.original;\n } else {\n // @TODO: better solution?\n delete object[method.name];\n }\n }\n\n this._extended = null;\n }\n }\n /**\r\n * Replace a method on an object with a queued version.\r\n *\r\n * @param object - Object having the method.\r\n * @param method - The method name.\r\n */\n\n }, {\n key: \"replace\",\n value: function replace(object, method) {\n var me = this;\n var original = object[method];\n\n if (!original) {\n throw new Error('Method ' + method + ' undefined');\n }\n\n object[method] = function () {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n // add this call to the queue\n me.queue({\n args: args,\n fn: original,\n context: this\n });\n };\n }\n /**\r\n * Queue a call.\r\n *\r\n * @param entry - The function or entry to be queued.\r\n */\n\n }, {\n key: \"queue\",\n value: function queue(entry) {\n if (typeof entry === 'function') {\n this._queue.push({\n fn: entry\n });\n } else {\n this._queue.push(entry);\n }\n\n this._flushIfNeeded();\n }\n /**\r\n * Check whether the queue needs to be flushed.\r\n */\n\n }, {\n key: \"_flushIfNeeded\",\n value: function _flushIfNeeded() {\n var _this = this;\n\n // flush when the maximum is exceeded.\n if (this._queue.length > this.max) {\n this.flush();\n } // flush after a period of inactivity when a delay is configured\n\n\n if (this._timeout != null) {\n clearTimeout(this._timeout);\n this._timeout = null;\n }\n\n if (this.queue.length > 0 && typeof this.delay === 'number') {\n this._timeout = setTimeout(function () {\n _this.flush();\n }, this.delay);\n }\n }\n /**\r\n * Flush all queued calls\r\n */\n\n }, {\n key: \"flush\",\n value: function flush() {\n this._queue.splice(0).forEach(function (entry) {\n entry.fn.apply(entry.context || entry.fn, entry.args || []);\n });\n }\n }], [{\n key: \"extend\",\n value: function extend(object, options) {\n var queue = new Queue(options);\n\n if (object.flush !== undefined) {\n throw new Error('Target object already has a property flush');\n }\n\n object.flush = function () {\n queue.flush();\n };\n\n var methods = [{\n name: 'flush',\n original: undefined\n }];\n\n if (options && options.replace) {\n for (var i = 0; i < options.replace.length; i++) {\n var name = options.replace[i];\n methods.push({\n name: name,\n // @TODO: better solution?\n original: object[name]\n }); // @TODO: better solution?\n\n queue.replace(object, name);\n }\n }\n\n queue._extended = {\n object: object,\n methods: methods\n };\n return queue;\n }\n }]);\n\n return Queue;\n}();\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) {\n for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n }\n}\n\nvar arrayWithoutHoles = _arrayWithoutHoles;\n\nfunction _iterableToArray(iter) {\n if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === \"[object Arguments]\") return Array.from(iter);\n}\n\nvar iterableToArray = _iterableToArray;\n\nfunction _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance\");\n}\n\nvar nonIterableSpread = _nonIterableSpread;\n\nfunction _toConsumableArray(arr) {\n return arrayWithoutHoles(arr) || iterableToArray(arr) || nonIterableSpread();\n}\n\nvar toConsumableArray = _toConsumableArray;\n\n/**\r\n * [[DataSet]] code that can be reused in [[DataView]] or other similar implementations of [[DataInterface]].\r\n *\r\n * @typeParam Item - Item type that may or may not have an id.\r\n * @typeParam IdProp - Name of the property that contains the id.\r\n */\nvar DataSetPart =\n/*#__PURE__*/\nfunction () {\n function DataSetPart() {\n classCallCheck(this, DataSetPart);\n\n this._subscribers = {\n '*': [],\n add: [],\n remove: [],\n update: []\n };\n /**\r\n * @deprecated Use on instead (PS: DataView.subscribe === DataView.on).\r\n */\n\n this.subscribe = DataSetPart.prototype.on;\n /**\r\n * @deprecated Use off instead (PS: DataView.unsubscribe === DataView.off).\r\n */\n\n this.unsubscribe = DataSetPart.prototype.off;\n }\n /**\r\n * Trigger an event\r\n *\r\n * @param event - Event name.\r\n * @param payload - Event payload.\r\n * @param senderId - Id of the sender.\r\n */\n\n\n createClass(DataSetPart, [{\n key: \"_trigger\",\n value: function _trigger(event, payload, senderId) {\n if (event === '*') {\n throw new Error('Cannot trigger event *');\n }\n\n var subscribers = [].concat(toConsumableArray(this._subscribers[event]), toConsumableArray(this._subscribers['*']));\n\n for (var i = 0, len = subscribers.length; i < len; i++) {\n var subscriber = subscribers[i];\n\n if (subscriber.callback) {\n subscriber.callback(event, payload, senderId != null ? senderId : null);\n }\n }\n }\n /**\r\n * Subscribe to an event, add an event listener.\r\n *\r\n * @param event - Event name.\r\n * @param callback - Callback method.\r\n */\n\n }, {\n key: \"on\",\n value: function on(event, callback) {\n this._subscribers[event].push({\n callback: callback\n });\n }\n /**\r\n * Unsubscribe from an event, remove an event listener.\r\n *\r\n * @remarks If the same callback was subscribed more than once **all** occurences will be removed.\r\n *\r\n * @param event - Event name.\r\n * @param callback - Callback method.\r\n */\n\n }, {\n key: \"off\",\n value: function off(event, callback) {\n this._subscribers[event] = this._subscribers[event].filter(function (listener) {\n return listener.callback !== callback;\n });\n }\n }]);\n\n return DataSetPart;\n}();\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { keys.push.apply(keys, Object.getOwnPropertySymbols(object)); } if (enumerableOnly) keys = keys.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n/**\r\n * # DataSet\r\n *\r\n * Vis.js comes with a flexible DataSet, which can be used to hold and manipulate unstructured data and listen for changes in the data. The DataSet is key/value based. Data items can be added, updated and removed from the DataSet, and one can subscribe to changes in the DataSet. The data in the DataSet can be filtered and ordered, and fields (like dates) can be converted to a specific type. Data can be normalized when appending it to the DataSet as well.\r\n *\r\n * ## Example\r\n *\r\n * The following example shows how to use a DataSet.\r\n *\r\n * ```javascript\r\n * // create a DataSet\r\n * var options = {};\r\n * var data = new vis.DataSet(options);\r\n *\r\n * // add items\r\n * // note that the data items can contain different properties and data formats\r\n * data.add([\r\n * {id: 1, text: 'item 1', date: new Date(2013, 6, 20), group: 1, first: true},\r\n * {id: 2, text: 'item 2', date: '2013-06-23', group: 2},\r\n * {id: 3, text: 'item 3', date: '2013-06-25', group: 2},\r\n * {id: 4, text: 'item 4'}\r\n * ]);\r\n *\r\n * // subscribe to any change in the DataSet\r\n * data.on('*', function (event, properties, senderId) {\r\n * console.log('event', event, properties);\r\n * });\r\n *\r\n * // update an existing item\r\n * data.update({id: 2, group: 1});\r\n *\r\n * // remove an item\r\n * data.remove(4);\r\n *\r\n * // get all ids\r\n * var ids = data.getIds();\r\n * console.log('ids', ids);\r\n *\r\n * // get a specific item\r\n * var item1 = data.get(1);\r\n * console.log('item1', item1);\r\n *\r\n * // retrieve a filtered subset of the data\r\n * var items = data.get({\r\n * filter: function (item) {\r\n * return item.group == 1;\r\n * }\r\n * });\r\n * console.log('filtered items', items);\r\n *\r\n * // retrieve formatted items\r\n * var items = data.get({\r\n * fields: ['id', 'date'],\r\n * type: {\r\n * date: 'ISODate'\r\n * }\r\n * });\r\n * console.log('formatted items', items);\r\n * ```\r\n *\r\n * @typeParam Item - Item type that may or may not have an id.\r\n * @typeParam IdProp - Name of the property that contains the id.\r\n */\n\nvar DataSet =\n/*#__PURE__*/\nfunction (_DataSetPart) {\n inherits(DataSet, _DataSetPart);\n\n /**\r\n * Construct a new DataSet.\r\n *\r\n * @param data - Initial data or options.\r\n * @param options - Options (type error if data is also options).\r\n */\n function DataSet(data, options) {\n var _this;\n\n classCallCheck(this, DataSet);\n\n _this = possibleConstructorReturn(this, getPrototypeOf(DataSet).call(this)); // correctly read optional arguments\n\n if (data && !Array.isArray(data)) {\n options = data;\n data = [];\n }\n\n _this._options = options || {};\n _this._data = Object.create({}); // map with data indexed by id\n\n _this.length = 0; // number of items in the DataSet\n\n _this._idProp = _this._options.fieldId || 'id'; // name of the field containing id\n\n _this._type = {}; // internal field types (NOTE: this can differ from this._options.type)\n // all variants of a Date are internally stored as Date, so we can convert\n // from everything to everything (also from ISODate to Number for example)\n\n if (_this._options.type) {\n var fields = Object.keys(_this._options.type);\n\n for (var i = 0, len = fields.length; i < len; i++) {\n var field = fields[i];\n var value = _this._options.type[field];\n\n if (value == 'Date' || value == 'ISODate' || value == 'ASPDate') {\n _this._type[field] = 'Date';\n } else {\n _this._type[field] = value;\n }\n }\n } // add initial data when provided\n\n\n if (data && data.length) {\n _this.add(data);\n }\n\n _this.setOptions(options);\n\n return _this;\n }\n /**\r\n * Set new options.\r\n *\r\n * @param options - The new options.\r\n */\n\n\n createClass(DataSet, [{\n key: \"setOptions\",\n value: function setOptions(options) {\n if (options && options.queue !== undefined) {\n if (options.queue === false) {\n // delete queue if loaded\n if (this._queue) {\n this._queue.destroy();\n\n delete this._queue;\n }\n } else {\n // create queue and update its options\n if (!this._queue) {\n this._queue = Queue.extend(this, {\n replace: ['add', 'update', 'remove']\n });\n }\n\n if (options.queue && _typeof_1(options.queue) === 'object') {\n this._queue.setOptions(options.queue);\n }\n }\n }\n }\n /**\r\n * Add a data item or an array with items.\r\n *\r\n * After the items are added to the DataSet, the DataSet will trigger an event `add`. When a `senderId` is provided, this id will be passed with the triggered event to all subscribers.\r\n *\r\n * ## Example\r\n *\r\n * ```javascript\r\n * // create a DataSet\r\n * const data = new vis.DataSet()\r\n *\r\n * // add items\r\n * const ids = data.add([\r\n * { id: 1, text: 'item 1' },\r\n * { id: 2, text: 'item 2' },\r\n * { text: 'item without an id' }\r\n * ])\r\n *\r\n * console.log(ids) // [1, 2, '']\r\n * ```\r\n *\r\n * @param data - Items to be added (ids will be generated if missing).\r\n * @param senderId - Sender id.\r\n *\r\n * @returns addedIds - Array with the ids (generated if not present) of the added items.\r\n *\r\n * @throws When an item with the same id as any of the added items already exists.\r\n */\n\n }, {\n key: \"add\",\n value: function add(data, senderId) {\n var addedIds = [];\n var id;\n\n if (Array.isArray(data)) {\n // Array\n for (var i = 0, len = data.length; i < len; i++) {\n id = this._addItem(data[i]);\n addedIds.push(id);\n }\n } else if (data && _typeof_1(data) === 'object') {\n // Single item\n id = this._addItem(data);\n addedIds.push(id);\n } else {\n throw new Error('Unknown dataType');\n }\n\n if (addedIds.length) {\n this._trigger('add', {\n items: addedIds\n }, senderId);\n }\n\n return addedIds;\n }\n /**\r\n * Update existing items. When an item does not exist, it will be created\r\n *\r\n * The provided properties will be merged in the existing item. When an item does not exist, it will be created.\r\n *\r\n * After the items are updated, the DataSet will trigger an event `add` for the added items, and an event `update`. When a `senderId` is provided, this id will be passed with the triggered event to all subscribers.\r\n *\r\n * ## Example\r\n *\r\n * ```javascript\r\n * // create a DataSet\r\n * const data = new vis.DataSet([\r\n * { id: 1, text: 'item 1' },\r\n * { id: 2, text: 'item 2' },\r\n * { id: 3, text: 'item 3' }\r\n * ])\r\n *\r\n * // update items\r\n * const ids = data.update([\r\n * { id: 2, text: 'item 2 (updated)' },\r\n * { id: 4, text: 'item 4 (new)' }\r\n * ])\r\n *\r\n * console.log(ids) // [2, 4]\r\n * ```\r\n *\r\n * @param data - Items to be updated (if the id is already present) or added (if the id is missing).\r\n * @param senderId - Sender id.\r\n *\r\n * @returns updatedIds - The ids of the added (these may be newly generated if there was no id in the item from the data) or updated items.\r\n *\r\n * @throws When the supplied data is neither an item nor an array of items.\r\n */\n\n }, {\n key: \"update\",\n value: function update(data, senderId) {\n var _this2 = this;\n\n var addedIds = [];\n var updatedIds = [];\n var oldData = [];\n var updatedData = [];\n var idProp = this._idProp;\n\n var addOrUpdate = function addOrUpdate(item) {\n var origId = item[idProp];\n\n if (origId != null && _this2._data[origId]) {\n var fullItem = item; // it has an id, therefore it is a fullitem\n\n var oldItem = Object.assign({}, _this2._data[origId]); // update item\n\n var id = _this2._updateItem(fullItem);\n\n updatedIds.push(id);\n updatedData.push(fullItem);\n oldData.push(oldItem);\n } else {\n // add new item\n var _id = _this2._addItem(item);\n\n addedIds.push(_id);\n }\n };\n\n if (Array.isArray(data)) {\n // Array\n for (var i = 0, len = data.length; i < len; i++) {\n if (data[i] && _typeof_1(data[i]) === 'object') {\n addOrUpdate(data[i]);\n } else {\n console.warn('Ignoring input item, which is not an object at index ' + i);\n }\n }\n } else if (data && _typeof_1(data) === 'object') {\n // Single item\n addOrUpdate(data);\n } else {\n throw new Error('Unknown dataType');\n }\n\n if (addedIds.length) {\n this._trigger('add', {\n items: addedIds\n }, senderId);\n }\n\n if (updatedIds.length) {\n var props = {\n items: updatedIds,\n oldData: oldData,\n data: updatedData\n }; // TODO: remove deprecated property 'data' some day\n //Object.defineProperty(props, 'data', {\n // 'get': (function() {\n // console.warn('Property data is deprecated. Use DataSet.get(ids) to retrieve the new data, use the oldData property on this object to get the old data');\n // return updatedData;\n // }).bind(this)\n //});\n\n this._trigger('update', props, senderId);\n }\n\n return addedIds.concat(updatedIds);\n }\n /** @inheritdoc */\n\n }, {\n key: \"get\",\n value: function get(first, second) {\n // @TODO: Woudn't it be better to split this into multiple methods?\n // parse the arguments\n var id = undefined;\n var ids = undefined;\n var options = undefined;\n\n if (isId(first)) {\n // get(id [, options])\n id = first;\n options = second;\n } else if (Array.isArray(first)) {\n // get(ids [, options])\n ids = first;\n options = second;\n } else {\n // get([, options])\n options = first;\n } // determine the return type\n\n\n var returnType = options && options.returnType === 'Object' ? 'Object' : 'Array'; // @TODO: WTF is this? Or am I missing something?\n // var returnType\n // if (options && options.returnType) {\n // var allowedValues = ['Array', 'Object']\n // returnType =\n // allowedValues.indexOf(options.returnType) == -1\n // ? 'Array'\n // : options.returnType\n // } else {\n // returnType = 'Array'\n // }\n // build options\n\n var type = options && options.type || this._options.type;\n var filter = options && options.filter;\n var items = [];\n var item = null;\n var itemIds = null;\n var itemId = null; // convert items\n\n if (id != null) {\n // return a single item\n item = this._getItem(id, type);\n\n if (item && filter && !filter(item)) {\n item = null;\n }\n } else if (ids != null) {\n // return a subset of items\n for (var i = 0, len = ids.length; i < len; i++) {\n item = this._getItem(ids[i], type);\n\n if (item != null && (!filter || filter(item))) {\n items.push(item);\n }\n }\n } else {\n // return all items\n itemIds = Object.keys(this._data);\n\n for (var _i = 0, _len = itemIds.length; _i < _len; _i++) {\n itemId = itemIds[_i];\n item = this._getItem(itemId, type);\n\n if (item != null && (!filter || filter(item))) {\n items.push(item);\n }\n }\n } // order the results\n\n\n if (options && options.order && id == undefined) {\n this._sort(items, options.order);\n } // filter fields of the items\n\n\n if (options && options.fields) {\n var fields = options.fields;\n\n if (id != undefined && item != null) {\n item = this._filterFields(item, fields);\n } else {\n for (var _i2 = 0, _len2 = items.length; _i2 < _len2; _i2++) {\n items[_i2] = this._filterFields(items[_i2], fields);\n }\n }\n } // return the results\n\n\n if (returnType == 'Object') {\n var result = {};\n\n for (var _i3 = 0, _len3 = items.length; _i3 < _len3; _i3++) {\n var resultant = items[_i3]; // @TODO: Shoudn't this be this._fieldId?\n // result[resultant.id] = resultant\n\n var _id2 = resultant[this._idProp];\n result[_id2] = resultant;\n }\n\n return result;\n } else {\n if (id != null) {\n // a single item\n return item;\n } else {\n // just return our array\n return items;\n }\n }\n }\n /** @inheritdoc */\n\n }, {\n key: \"getIds\",\n value: function getIds(options) {\n var data = this._data;\n var filter = options && options.filter;\n var order = options && options.order;\n var type = options && options.type || this._options.type;\n var itemIds = Object.keys(data);\n var ids = [];\n var item;\n var items;\n\n if (filter) {\n // get filtered items\n if (order) {\n // create ordered list\n items = [];\n\n for (var i = 0, len = itemIds.length; i < len; i++) {\n var id = itemIds[i];\n item = this._getItem(id, type);\n\n if (filter(item)) {\n items.push(item);\n }\n }\n\n this._sort(items, order);\n\n for (var _i4 = 0, _len4 = items.length; _i4 < _len4; _i4++) {\n ids.push(items[_i4][this._idProp]);\n }\n } else {\n // create unordered list\n for (var _i5 = 0, _len5 = itemIds.length; _i5 < _len5; _i5++) {\n var _id3 = itemIds[_i5];\n item = this._getItem(_id3, type);\n\n if (filter(item)) {\n ids.push(item[this._idProp]);\n }\n }\n }\n } else {\n // get all items\n if (order) {\n // create an ordered list\n items = [];\n\n for (var _i6 = 0, _len6 = itemIds.length; _i6 < _len6; _i6++) {\n var _id4 = itemIds[_i6];\n items.push(data[_id4]);\n }\n\n this._sort(items, order);\n\n for (var _i7 = 0, _len7 = items.length; _i7 < _len7; _i7++) {\n ids.push(items[_i7][this._idProp]);\n }\n } else {\n // create unordered list\n for (var _i8 = 0, _len8 = itemIds.length; _i8 < _len8; _i8++) {\n var _id5 = itemIds[_i8];\n item = data[_id5];\n ids.push(item[this._idProp]);\n }\n }\n }\n\n return ids;\n }\n /** @inheritdoc */\n\n }, {\n key: \"getDataSet\",\n value: function getDataSet() {\n return this;\n }\n /** @inheritdoc */\n\n }, {\n key: \"forEach\",\n value: function forEach(callback, options) {\n var filter = options && options.filter;\n var type = options && options.type || this._options.type;\n var data = this._data;\n var itemIds = Object.keys(data);\n\n if (options && options.order) {\n // execute forEach on ordered list\n var items = this.get(options);\n\n for (var i = 0, len = items.length; i < len; i++) {\n var item = items[i];\n var id = item[this._idProp];\n callback(item, id);\n }\n } else {\n // unordered\n for (var _i9 = 0, _len9 = itemIds.length; _i9 < _len9; _i9++) {\n var _id6 = itemIds[_i9];\n\n var _item = this._getItem(_id6, type);\n\n if (!filter || filter(_item)) {\n callback(_item, _id6);\n }\n }\n }\n }\n /** @inheritdoc */\n\n }, {\n key: \"map\",\n value: function map(callback, options) {\n var filter = options && options.filter;\n var type = options && options.type || this._options.type;\n var mappedItems = [];\n var data = this._data;\n var itemIds = Object.keys(data); // convert and filter items\n\n for (var i = 0, len = itemIds.length; i < len; i++) {\n var id = itemIds[i];\n\n var item = this._getItem(id, type);\n\n if (!filter || filter(item)) {\n mappedItems.push(callback(item, id));\n }\n } // order items\n\n\n if (options && options.order) {\n this._sort(mappedItems, options.order);\n }\n\n return mappedItems;\n }\n /**\r\n * Filter the fields of an item.\r\n *\r\n * @param item - The item whose fields should be filtered.\r\n * @param fields - The names of the fields that will be kept.\r\n *\r\n * @typeParam K - Field name type.\r\n *\r\n * @returns The item without any additional fields.\r\n */\n\n }, {\n key: \"_filterFields\",\n value: function _filterFields(item, fields) {\n if (!item) {\n // item is null\n return item;\n }\n\n return (Array.isArray(fields) ? // Use the supplied array\n fields : // Use the keys of the supplied object\n Object.keys(fields)).reduce(function (filteredItem, field) {\n filteredItem[field] = item[field];\n return filteredItem;\n }, {});\n }\n /**\r\n * Sort the provided array with items.\r\n *\r\n * @param items - Items to be sorted in place.\r\n * @param order - A field name or custom sort function.\r\n *\r\n * @typeParam T - The type of the items in the items array.\r\n */\n\n }, {\n key: \"_sort\",\n value: function _sort(items, order) {\n if (typeof order === 'string') {\n // order by provided field name\n var name = order; // field name\n\n items.sort(function (a, b) {\n // @TODO: How to treat missing properties?\n var av = a[name];\n var bv = b[name];\n return av > bv ? 1 : av < bv ? -1 : 0;\n });\n } else if (typeof order === 'function') {\n // order by sort function\n items.sort(order);\n } else {\n // TODO: extend order by an Object {field:string, direction:string}\n // where direction can be 'asc' or 'desc'\n throw new TypeError('Order must be a function or a string');\n }\n }\n /**\r\n * Remove an item or multiple items by “reference” (only the id is used) or by id.\r\n *\r\n * The method ignores removal of non-existing items, and returns an array containing the ids of the items which are actually removed from the DataSet.\r\n *\r\n * After the items are removed, the DataSet will trigger an event `remove` for the removed items. When a `senderId` is provided, this id will be passed with the triggered event to all subscribers.\r\n *\r\n * ## Example\r\n * ```javascript\r\n * // create a DataSet\r\n * const data = new vis.DataSet([\r\n * { id: 1, text: 'item 1' },\r\n * { id: 2, text: 'item 2' },\r\n * { id: 3, text: 'item 3' }\r\n * ])\r\n *\r\n * // remove items\r\n * const ids = data.remove([2, { id: 3 }, 4])\r\n *\r\n * console.log(ids) // [2, 3]\r\n * ```\r\n *\r\n * @param id - One or more items or ids of items to be removed.\r\n * @param senderId - Sender id.\r\n *\r\n * @returns The ids of the removed items.\r\n */\n\n }, {\n key: \"remove\",\n value: function remove(id, senderId) {\n var removedIds = [];\n var removedItems = []; // force everything to be an array for simplicity\n\n var ids = Array.isArray(id) ? id : [id];\n\n for (var i = 0, len = ids.length; i < len; i++) {\n var item = this._remove(ids[i]);\n\n if (item) {\n var itemId = item[this._idProp];\n\n if (itemId != null) {\n removedIds.push(itemId);\n removedItems.push(item);\n }\n }\n }\n\n if (removedIds.length) {\n this._trigger('remove', {\n items: removedIds,\n oldData: removedItems\n }, senderId);\n }\n\n return removedIds;\n }\n /**\r\n * Remove an item by its id or reference.\r\n *\r\n * @param id - Id of an item or the item itself.\r\n *\r\n * @returns The removed item if removed, null otherwise.\r\n */\n\n }, {\n key: \"_remove\",\n value: function _remove(id) {\n // @TODO: It origianlly returned the item although the docs say id.\n // The code expects the item, so probably an error in the docs.\n var ident; // confirm the id to use based on the args type\n\n if (isId(id)) {\n ident = id;\n } else if (id && _typeof_1(id) === 'object') {\n ident = id[this._idProp]; // look for the identifier field using ._idProp\n } // do the removing if the item is found\n\n\n if (ident != null && this._data[ident]) {\n var item = this._data[ident];\n delete this._data[ident];\n --this.length;\n return item;\n }\n\n return null;\n }\n /**\r\n * Clear the entire data set.\r\n *\r\n * After the items are removed, the [[DataSet]] will trigger an event `remove` for all removed items. When a `senderId` is provided, this id will be passed with the triggered event to all subscribers.\r\n *\r\n * @param senderId - Sender id.\r\n *\r\n * @returns removedIds - The ids of all removed items.\r\n */\n\n }, {\n key: \"clear\",\n value: function clear(senderId) {\n var ids = Object.keys(this._data);\n var items = [];\n\n for (var i = 0, len = ids.length; i < len; i++) {\n items.push(this._data[ids[i]]);\n }\n\n this._data = {};\n this.length = 0;\n\n this._trigger('remove', {\n items: ids,\n oldData: items\n }, senderId);\n\n return ids;\n }\n /**\r\n * Find the item with maximum value of a specified field.\r\n *\r\n * @param field - Name of the property that should be searched for max value.\r\n *\r\n * @returns Item containing max value, or null if no items.\r\n */\n\n }, {\n key: \"max\",\n value: function max(field) {\n var data = this._data;\n var itemIds = Object.keys(data);\n var max = null;\n var maxField = null;\n\n for (var i = 0, len = itemIds.length; i < len; i++) {\n var id = itemIds[i];\n var item = data[id];\n var itemField = item[field];\n\n if (itemField != null && (maxField == null || itemField > maxField)) {\n max = item;\n maxField = itemField;\n }\n }\n\n return max;\n }\n /**\r\n * Find the item with minimum value of a specified field.\r\n *\r\n * @param field - Name of the property that should be searched for min value.\r\n *\r\n * @returns Item containing min value, or null if no items.\r\n */\n\n }, {\n key: \"min\",\n value: function min(field) {\n var data = this._data;\n var itemIds = Object.keys(data);\n var min = null;\n var minField = null;\n\n for (var i = 0, len = itemIds.length; i < len; i++) {\n var id = itemIds[i];\n var item = data[id];\n var itemField = item[field];\n\n if (itemField != null && (minField == null || itemField < minField)) {\n min = item;\n minField = itemField;\n }\n }\n\n return min;\n }\n /**\r\n * Find all distinct values of a specified field\r\n *\r\n * @param prop - The property name whose distinct values should be returned.\r\n *\r\n * @returns Unordered array containing all distinct values. Items without specified property are ignored.\r\n */\n\n }, {\n key: \"distinct\",\n value: function distinct(prop) {\n var data = this._data;\n var itemIds = Object.keys(data);\n var values = [];\n var fieldType = this._options.type && this._options.type[prop] || null;\n var count = 0;\n\n for (var i = 0, len = itemIds.length; i < len; i++) {\n var id = itemIds[i];\n var item = data[id];\n var value = item[prop];\n var exists = false;\n\n for (var j = 0; j < count; j++) {\n if (values[j] == value) {\n exists = true;\n break;\n }\n }\n\n if (!exists && value !== undefined) {\n values[count] = value;\n count++;\n }\n }\n\n if (fieldType) {\n for (var _i10 = 0, _len10 = values.length; _i10 < _len10; _i10++) {\n values[_i10] = convert(values[_i10], fieldType);\n }\n }\n\n return values;\n }\n /**\r\n * Add a single item. Will fail when an item with the same id already exists.\r\n *\r\n * @param item - A new item to be added.\r\n *\r\n * @returns Added item's id. An id is generated when it is not present in the item.\r\n */\n\n }, {\n key: \"_addItem\",\n value: function _addItem(item) {\n var id = item[this._idProp];\n\n if (id != null) {\n // check whether this id is already taken\n if (this._data[id]) {\n // item already exists\n throw new Error('Cannot add item: item with id ' + id + ' already exists');\n }\n } else {\n // generate an id\n id = uuid4();\n item[this._idProp] = id;\n }\n\n var d = {};\n var fields = Object.keys(item);\n\n for (var i = 0, len = fields.length; i < len; i++) {\n var field = fields[i];\n var fieldType = this._type[field]; // type may be undefined\n\n d[field] = convert(item[field], fieldType);\n }\n\n this._data[id] = d;\n this.length++;\n return id;\n }\n /**\r\n * Get an item. Fields can be converted to a specific type\r\n *\r\n * @param id - Id of the requested item.\r\n * @param types - Property name to type name object map of type converstions.\r\n *\r\n * @returns The item, optionally after type conversion.\r\n */\n\n }, {\n key: \"_getItem\",\n value: function _getItem(id, types) {\n // @TODO: I have no idea how to type this.\n // get the item from the dataset\n var raw = this._data[id];\n\n if (!raw) {\n return null;\n } // convert the items field types\n\n\n var converted;\n var fields = Object.keys(raw);\n\n if (types) {\n converted = {};\n\n for (var i = 0, len = fields.length; i < len; i++) {\n var field = fields[i];\n var value = raw[field];\n converted[field] = convert(value, types[field]);\n }\n } else {\n // no field types specified, no converting needed\n converted = _objectSpread({}, raw);\n }\n\n if (converted[this._idProp] == null) {\n converted[this._idProp] = raw.id;\n }\n\n return converted;\n }\n /**\r\n * Update a single item: merge with existing item.\r\n * Will fail when the item has no id, or when there does not exist an item with the same id.\r\n *\r\n * @param item - The new item\r\n *\r\n * @returns The id of the updated item.\r\n */\n\n }, {\n key: \"_updateItem\",\n value: function _updateItem(item) {\n var id = item[this._idProp];\n\n if (id == null) {\n throw new Error('Cannot update item: item has no id (item: ' + JSON.stringify(item) + ')');\n }\n\n var d = this._data[id];\n\n if (!d) {\n // item doesn't exist\n throw new Error('Cannot update item: no item with id ' + id + ' found');\n } // merge with current item\n\n\n var fields = Object.keys(item);\n\n for (var i = 0, len = fields.length; i < len; i++) {\n var field = fields[i];\n var fieldType = this._type[field] // type may be undefined\n ;\n d[field] = convert(item[field], fieldType);\n }\n\n return id;\n }\n }]);\n\n return DataSet;\n}(DataSetPart);\n\n/**\r\n * DataView\r\n *\r\n * A DataView offers a filtered and/or formatted view on a DataSet. One can subscribe to changes in a DataView, and easily get filtered or formatted data without having to specify filters and field types all the time.\r\n *\r\n * ## Example\r\n * ```javascript\r\n * // create a DataSet\r\n * var data = new vis.DataSet();\r\n * data.add([\r\n * {id: 1, text: 'item 1', date: new Date(2013, 6, 20), group: 1, first: true},\r\n * {id: 2, text: 'item 2', date: '2013-06-23', group: 2},\r\n * {id: 3, text: 'item 3', date: '2013-06-25', group: 2},\r\n * {id: 4, text: 'item 4'}\r\n * ]);\r\n *\r\n * // create a DataView\r\n * // the view will only contain items having a property group with value 1,\r\n * // and will only output fields id, text, and date.\r\n * var view = new vis.DataView(data, {\r\n * filter: function (item) {\r\n * return (item.group == 1);\r\n * },\r\n * fields: ['id', 'text', 'date']\r\n * });\r\n *\r\n * // subscribe to any change in the DataView\r\n * view.on('*', function (event, properties, senderId) {\r\n * console.log('event', event, properties);\r\n * });\r\n *\r\n * // update an item in the data set\r\n * data.update({id: 2, group: 1});\r\n *\r\n * // get all ids in the view\r\n * var ids = view.getIds();\r\n * console.log('ids', ids); // will output [1, 2]\r\n *\r\n * // get all items in the view\r\n * var items = view.get();\r\n * ```\r\n *\r\n * @typeParam Item - Item type that may or may not have an id.\r\n * @typeParam IdProp - Name of the property that contains the id.\r\n */\n\nvar DataView =\n/*#__PURE__*/\nfunction (_DataSetPart) {\n inherits(DataView, _DataSetPart);\n\n /**\r\n * Create a DataView.\r\n *\r\n * @param data - The instance containing data (directly or indirectly).\r\n * @param options - Options to configure this data view.\r\n */\n function DataView(data, options) {\n var _this;\n\n classCallCheck(this, DataView);\n\n _this = possibleConstructorReturn(this, getPrototypeOf(DataView).call(this));\n /** @inheritdoc */\n\n _this.length = 0;\n _this._ids = {}; // ids of the items currently in memory (just contains a boolean true)\n\n _this._options = options || {};\n _this.listener = _this._onEvent.bind(assertThisInitialized(_this));\n\n _this.setData(data);\n\n return _this;\n } // TODO: implement a function .config() to dynamically update things like configured filter\n // and trigger changes accordingly\n\n /**\r\n * Set a data source for the view.\r\n *\r\n * @param data - The instance containing data (directly or indirectly).\r\n */\n\n\n createClass(DataView, [{\n key: \"setData\",\n value: function setData(data) {\n if (this._data) {\n // unsubscribe from current dataset\n if (this._data.off) {\n this._data.off('*', this.listener);\n } // trigger a remove of all items in memory\n\n\n var ids = this._data.getIds({\n filter: this._options.filter\n });\n\n var items = this._data.get(ids);\n\n this._ids = {};\n this.length = 0;\n\n this._trigger('remove', {\n items: ids,\n oldData: items\n });\n }\n\n if (data != null) {\n this._data = data; // trigger an add of all added items\n\n var _ids = this._data.getIds({\n filter: this._options.filter\n });\n\n for (var i = 0, len = _ids.length; i < len; i++) {\n var id = _ids[i];\n this._ids[id] = true;\n }\n\n this.length = _ids.length;\n\n this._trigger('add', {\n items: _ids\n });\n } else {\n this._data = new DataSet();\n } // subscribe to new dataset\n\n\n if (this._data.on) {\n this._data.on('*', this.listener);\n }\n }\n /**\r\n * Refresh the DataView.\r\n * Useful when the DataView has a filter function containing a variable parameter.\r\n */\n\n }, {\n key: \"refresh\",\n value: function refresh() {\n var ids = this._data.getIds({\n filter: this._options.filter\n });\n\n var oldIds = Object.keys(this._ids);\n var newIds = {};\n var addedIds = [];\n var removedIds = [];\n var removedItems = []; // check for additions\n\n for (var i = 0, len = ids.length; i < len; i++) {\n var id = ids[i];\n newIds[id] = true;\n\n if (!this._ids[id]) {\n addedIds.push(id);\n this._ids[id] = true;\n }\n } // check for removals\n\n\n for (var _i = 0, _len = oldIds.length; _i < _len; _i++) {\n var _id = oldIds[_i];\n\n var item = this._data.get(_id);\n\n if (item == null) {\n // @TODO: Investigate.\n // Doesn't happen during tests or examples.\n // Is it really impossible or could it eventually happen?\n // How to handle it if it does? The types guarantee non-nullable items.\n console.error('If you see this, report it please.');\n } else if (!newIds[_id]) {\n removedIds.push(_id);\n removedItems.push(item);\n delete this._ids[_id];\n }\n }\n\n this.length += addedIds.length - removedIds.length; // trigger events\n\n if (addedIds.length) {\n this._trigger('add', {\n items: addedIds\n });\n }\n\n if (removedIds.length) {\n this._trigger('remove', {\n items: removedIds,\n oldData: removedItems\n });\n }\n }\n /** @inheritdoc */\n\n }, {\n key: \"get\",\n value: function get(first, second) {\n if (this._data == null) {\n return null;\n } // parse the arguments\n\n\n var ids = null;\n var options;\n\n if (isId(first) || Array.isArray(first)) {\n ids = first;\n options = second;\n } else {\n options = first;\n } // extend the options with the default options and provided options\n\n\n var viewOptions = Object.assign({}, this._options, options); // create a combined filter method when needed\n\n var thisFilter = this._options.filter;\n var optionsFilter = options && options.filter;\n\n if (thisFilter && optionsFilter) {\n viewOptions.filter = function (item) {\n return thisFilter(item) && optionsFilter(item);\n };\n }\n\n if (ids == null) {\n return this._data.get(viewOptions);\n } else {\n return this._data.get(ids, viewOptions);\n }\n }\n /** @inheritdoc */\n\n }, {\n key: \"getIds\",\n value: function getIds(options) {\n if (this._data.length) {\n var defaultFilter = this._options.filter;\n var optionsFilter = options != null ? options.filter : null;\n var filter;\n\n if (optionsFilter) {\n if (defaultFilter) {\n filter = function filter(item) {\n return defaultFilter(item) && optionsFilter(item);\n };\n } else {\n filter = optionsFilter;\n }\n } else {\n filter = defaultFilter;\n }\n\n return this._data.getIds({\n filter: filter,\n order: options && options.order\n });\n } else {\n return [];\n }\n }\n /** @inheritdoc */\n\n }, {\n key: \"forEach\",\n value: function forEach(callback, options) {\n if (this._data) {\n var defaultFilter = this._options.filter;\n var optionsFilter = options && options.filter;\n var filter;\n\n if (optionsFilter) {\n if (defaultFilter) {\n filter = function filter(item) {\n return defaultFilter(item) && optionsFilter(item);\n };\n } else {\n filter = optionsFilter;\n }\n } else {\n filter = defaultFilter;\n }\n\n this._data.forEach(callback, {\n filter: filter,\n order: options && options.order\n });\n }\n }\n /** @inheritdoc */\n\n }, {\n key: \"map\",\n value: function map(callback, options) {\n if (this._data) {\n var defaultFilter = this._options.filter;\n var optionsFilter = options && options.filter;\n var filter;\n\n if (optionsFilter) {\n if (defaultFilter) {\n filter = function filter(item) {\n return defaultFilter(item) && optionsFilter(item);\n };\n } else {\n filter = optionsFilter;\n }\n } else {\n filter = defaultFilter;\n }\n\n return this._data.map(callback, {\n filter: filter,\n order: options && options.order\n });\n } else {\n return [];\n }\n }\n /** @inheritdoc */\n\n }, {\n key: \"getDataSet\",\n value: function getDataSet() {\n return this._data.getDataSet();\n }\n /**\r\n * Event listener. Will propagate all events from the connected data set to the subscribers of the DataView, but will filter the items and only trigger when there are changes in the filtered data set.\r\n *\r\n * @param event - The name of the event.\r\n * @param params - Parameters of the event.\r\n * @param senderId - Id supplied by the sender.\r\n */\n\n }, {\n key: \"_onEvent\",\n value: function _onEvent(event, params, senderId) {\n if (!params || !params.items || !this._data) {\n return;\n }\n\n var ids = params.items;\n var addedIds = [];\n var updatedIds = [];\n var removedIds = [];\n var oldItems = [];\n var updatedItems = [];\n var removedItems = [];\n\n switch (event) {\n case 'add':\n // filter the ids of the added items\n for (var i = 0, len = ids.length; i < len; i++) {\n var id = ids[i];\n var item = this.get(id);\n\n if (item) {\n this._ids[id] = true;\n addedIds.push(id);\n }\n }\n\n break;\n\n case 'update':\n // determine the event from the views viewpoint: an updated\n // item can be added, updated, or removed from this view.\n for (var _i2 = 0, _len2 = ids.length; _i2 < _len2; _i2++) {\n var _id2 = ids[_i2];\n\n var _item = this.get(_id2);\n\n if (_item) {\n if (this._ids[_id2]) {\n updatedIds.push(_id2);\n updatedItems.push(params.data[_i2]);\n oldItems.push(params.oldData[_i2]);\n } else {\n this._ids[_id2] = true;\n addedIds.push(_id2);\n }\n } else {\n if (this._ids[_id2]) {\n delete this._ids[_id2];\n removedIds.push(_id2);\n removedItems.push(params.oldData[_i2]);\n }\n }\n }\n\n break;\n\n case 'remove':\n // filter the ids of the removed items\n for (var _i3 = 0, _len3 = ids.length; _i3 < _len3; _i3++) {\n var _id3 = ids[_i3];\n\n if (this._ids[_id3]) {\n delete this._ids[_id3];\n removedIds.push(_id3);\n removedItems.push(params.oldData[_i3]);\n }\n }\n\n break;\n }\n\n this.length += addedIds.length - removedIds.length;\n\n if (addedIds.length) {\n this._trigger('add', {\n items: addedIds\n }, senderId);\n }\n\n if (updatedIds.length) {\n this._trigger('update', {\n items: updatedIds,\n oldData: oldItems,\n data: updatedItems\n }, senderId);\n }\n\n if (removedIds.length) {\n this._trigger('remove', {\n items: removedIds,\n oldData: removedItems\n }, senderId);\n }\n }\n }]);\n\n return DataView;\n}(DataSetPart);\n\nvar index = {\n DataSet: DataSet,\n DataView: DataView,\n Queue: Queue\n};\n\nexport default index;\nexport { DataSet, DataView, Queue };\n","/**\n * Canvas shapes used by Network\n */\nif (typeof CanvasRenderingContext2D !== 'undefined') {\n\n /**\n * Draw a circle shape\n *\n * @param {number} x\n * @param {number} y\n * @param {number} r\n */\n CanvasRenderingContext2D.prototype.circle = function (x, y, r) {\n this.beginPath();\n this.arc(x, y, r, 0, 2 * Math.PI, false);\n this.closePath();\n };\n\n /**\n * Draw a square shape\n * @param {number} x horizontal center\n * @param {number} y vertical center\n * @param {number} r size, width and height of the square\n */\n CanvasRenderingContext2D.prototype.square = function (x, y, r) {\n this.beginPath();\n this.rect(x - r, y - r, r * 2, r * 2);\n this.closePath();\n };\n\n /**\n * Draw a triangle shape\n * @param {number} x horizontal center\n * @param {number} y vertical center\n * @param {number} r radius, half the length of the sides of the triangle\n */\n CanvasRenderingContext2D.prototype.triangle = function (x, y, r) {\n // http://en.wikipedia.org/wiki/Equilateral_triangle\n this.beginPath();\n\n // the change in radius and the offset is here to center the shape\n r *= 1.15;\n y += 0.275 * r;\n\n var s = r * 2;\n var s2 = s / 2;\n var ir = Math.sqrt(3) / 6 * s; // radius of inner circle\n var h = Math.sqrt(s * s - s2 * s2); // height\n\n\n this.moveTo(x, y - (h - ir));\n this.lineTo(x + s2, y + ir);\n this.lineTo(x - s2, y + ir);\n this.lineTo(x, y - (h - ir));\n this.closePath();\n\n\n };\n\n /**\n * Draw a triangle shape in downward orientation\n * @param {number} x horizontal center\n * @param {number} y vertical center\n * @param {number} r radius\n */\n CanvasRenderingContext2D.prototype.triangleDown = function (x, y, r) {\n // http://en.wikipedia.org/wiki/Equilateral_triangle\n this.beginPath();\n\n // the change in radius and the offset is here to center the shape\n r *= 1.15;\n y -= 0.275 * r;\n\n var s = r * 2;\n var s2 = s / 2;\n var ir = Math.sqrt(3) / 6 * s; // radius of inner circle\n var h = Math.sqrt(s * s - s2 * s2); // height\n\n this.moveTo(x, y + (h - ir));\n this.lineTo(x + s2, y - ir);\n this.lineTo(x - s2, y - ir);\n this.lineTo(x, y + (h - ir));\n this.closePath();\n };\n\n /**\n * Draw a star shape, a star with 5 points\n * @param {number} x horizontal center\n * @param {number} y vertical center\n * @param {number} r radius, half the length of the sides of the triangle\n */\n CanvasRenderingContext2D.prototype.star = function (x, y, r) {\n // http://www.html5canvastutorials.com/labs/html5-canvas-star-spinner/\n this.beginPath();\n\n // the change in radius and the offset is here to center the shape\n r *= 0.82;\n y += 0.1 * r;\n\n for (var n = 0; n < 10; n++) {\n var radius = (n % 2 === 0) ? r * 1.3 : r * 0.5;\n this.lineTo(\n x + radius * Math.sin(n * 2 * Math.PI / 10),\n y - radius * Math.cos(n * 2 * Math.PI / 10)\n );\n }\n\n this.closePath();\n };\n\n /**\n * Draw a Diamond shape\n * @param {number} x horizontal center\n * @param {number} y vertical center\n * @param {number} r radius, half the length of the sides of the triangle\n */\n CanvasRenderingContext2D.prototype.diamond = function (x, y, r) {\n // http://www.html5canvastutorials.com/labs/html5-canvas-star-spinner/\n this.beginPath();\n\n this.lineTo(x, y + r);\n this.lineTo(x + r, y);\n this.lineTo(x, y - r);\n this.lineTo(x - r, y);\n\n\n this.closePath();\n };\n\n /**\n * http://stackoverflow.com/questions/1255512/how-to-draw-a-rounded-rectangle-on-html-canvas\n *\n * @param {number} x\n * @param {number} y\n * @param {number} w\n * @param {number} h\n * @param {number} r\n */\n CanvasRenderingContext2D.prototype.roundRect = function (x, y, w, h, r) {\n var r2d = Math.PI / 180;\n if (w - ( 2 * r ) < 0) {\n r = ( w / 2 );\n } //ensure that the radius isn't too large for x\n if (h - ( 2 * r ) < 0) {\n r = ( h / 2 );\n } //ensure that the radius isn't too large for y\n this.beginPath();\n this.moveTo(x + r, y);\n this.lineTo(x + w - r, y);\n this.arc(x + w - r, y + r, r, r2d * 270, r2d * 360, false);\n this.lineTo(x + w, y + h - r);\n this.arc(x + w - r, y + h - r, r, 0, r2d * 90, false);\n this.lineTo(x + r, y + h);\n this.arc(x + r, y + h - r, r, r2d * 90, r2d * 180, false);\n this.lineTo(x, y + r);\n this.arc(x + r, y + r, r, r2d * 180, r2d * 270, false);\n this.closePath();\n };\n\n /**\n * http://stackoverflow.com/questions/2172798/how-to-draw-an-oval-in-html5-canvas\n *\n * Postfix '_vis' added to discern it from standard method ellipse().\n *\n * @param {number} x\n * @param {number} y\n * @param {number} w\n * @param {number} h\n */\n CanvasRenderingContext2D.prototype.ellipse_vis = function (x, y, w, h) {\n var kappa = .5522848,\n ox = (w / 2) * kappa, // control point offset horizontal\n oy = (h / 2) * kappa, // control point offset vertical\n xe = x + w, // x-end\n ye = y + h, // y-end\n xm = x + w / 2, // x-middle\n ym = y + h / 2; // y-middle\n\n this.beginPath();\n this.moveTo(x, ym);\n this.bezierCurveTo(x, ym - oy, xm - ox, y, xm, y);\n this.bezierCurveTo(xm + ox, y, xe, ym - oy, xe, ym);\n this.bezierCurveTo(xe, ym + oy, xm + ox, ye, xm, ye);\n this.bezierCurveTo(xm - ox, ye, x, ym + oy, x, ym);\n this.closePath();\n };\n\n\n /**\n * http://stackoverflow.com/questions/2172798/how-to-draw-an-oval-in-html5-canvas\n *\n * @param {number} x\n * @param {number} y\n * @param {number} w\n * @param {number} h\n */\n CanvasRenderingContext2D.prototype.database = function (x, y, w, h) {\n var f = 1 / 3;\n var wEllipse = w;\n var hEllipse = h * f;\n\n var kappa = .5522848,\n ox = (wEllipse / 2) * kappa, // control point offset horizontal\n oy = (hEllipse / 2) * kappa, // control point offset vertical\n xe = x + wEllipse, // x-end\n ye = y + hEllipse, // y-end\n xm = x + wEllipse / 2, // x-middle\n ym = y + hEllipse / 2, // y-middle\n ymb = y + (h - hEllipse / 2), // y-midlle, bottom ellipse\n yeb = y + h; // y-end, bottom ellipse\n\n this.beginPath();\n this.moveTo(xe, ym);\n\n this.bezierCurveTo(xe, ym + oy, xm + ox, ye, xm, ye);\n this.bezierCurveTo(xm - ox, ye, x, ym + oy, x, ym);\n\n this.bezierCurveTo(x, ym - oy, xm - ox, y, xm, y);\n this.bezierCurveTo(xm + ox, y, xe, ym - oy, xe, ym);\n\n this.lineTo(xe, ymb);\n\n this.bezierCurveTo(xe, ymb + oy, xm + ox, yeb, xm, yeb);\n this.bezierCurveTo(xm - ox, yeb, x, ymb + oy, x, ymb);\n\n this.lineTo(x, ym);\n };\n\n\n /**\n * Sets up the dashedLine functionality for drawing\n * Original code came from http://stackoverflow.com/questions/4576724/dotted-stroke-in-canvas\n * @author David Jordan\n * @date 2012-08-08\n *\n * @param {number} x\n * @param {number} y\n * @param {number} x2\n * @param {number} y2\n * @param {string} pattern\n */\n CanvasRenderingContext2D.prototype.dashedLine = function (x, y, x2, y2, pattern) {\n this.beginPath();\n this.moveTo(x, y);\n\n var patternLength = pattern.length;\n var dx = (x2 - x);\n var dy = (y2 - y);\n var slope = dy / dx;\n var distRemaining = Math.sqrt(dx * dx + dy * dy);\n var patternIndex = 0;\n var draw = true;\n var xStep = 0;\n var dashLength = pattern[0];\n\n while (distRemaining >= 0.1) {\n dashLength = pattern[patternIndex++ % patternLength];\n if (dashLength > distRemaining) {\n dashLength = distRemaining;\n }\n\n xStep = Math.sqrt(dashLength * dashLength / (1 + slope * slope));\n xStep = dx < 0 ? -xStep : xStep;\n x += xStep;\n y += slope * xStep;\n\n if (draw === true) {this.lineTo(x,y);}\n else {this.moveTo(x,y);}\n\n distRemaining -= dashLength;\n draw = !draw;\n }\n };\n\n /**\n * Draw a Hexagon shape with 6 sides\n * @param {Number} x horizontal center\n * @param {Number} y vertical center\n * @param {Number} r radius\n */\n CanvasRenderingContext2D.prototype.hexagon = function (x, y, r) {\n this.beginPath();\n var sides = 6;\n var a = (Math.PI*2)/sides;\n this.moveTo(x+r,y);\n for (var i = 1; i < sides; i++) {\n this.lineTo(x+r*Math.cos(a*i),y+r*Math.sin(a*i));\n }\n this.closePath();\n };\n}\n","\r\n/**\r\n * Expose `Emitter`.\r\n */\r\n\r\nif (typeof module !== 'undefined') {\r\n module.exports = Emitter;\r\n}\r\n\r\n/**\r\n * Initialize a new `Emitter`.\r\n *\r\n * @api public\r\n */\r\n\r\nfunction Emitter(obj) {\r\n if (obj) return mixin(obj);\r\n};\r\n\r\n/**\r\n * Mixin the emitter properties.\r\n *\r\n * @param {Object} obj\r\n * @return {Object}\r\n * @api private\r\n */\r\n\r\nfunction mixin(obj) {\r\n for (var key in Emitter.prototype) {\r\n obj[key] = Emitter.prototype[key];\r\n }\r\n return obj;\r\n}\r\n\r\n/**\r\n * Listen on the given `event` with `fn`.\r\n *\r\n * @param {String} event\r\n * @param {Function} fn\r\n * @return {Emitter}\r\n * @api public\r\n */\r\n\r\nEmitter.prototype.on =\r\nEmitter.prototype.addEventListener = function(event, fn){\r\n this._callbacks = this._callbacks || {};\r\n (this._callbacks['$' + event] = this._callbacks['$' + event] || [])\r\n .push(fn);\r\n return this;\r\n};\r\n\r\n/**\r\n * Adds an `event` listener that will be invoked a single\r\n * time then automatically removed.\r\n *\r\n * @param {String} event\r\n * @param {Function} fn\r\n * @return {Emitter}\r\n * @api public\r\n */\r\n\r\nEmitter.prototype.once = function(event, fn){\r\n function on() {\r\n this.off(event, on);\r\n fn.apply(this, arguments);\r\n }\r\n\r\n on.fn = fn;\r\n this.on(event, on);\r\n return this;\r\n};\r\n\r\n/**\r\n * Remove the given callback for `event` or all\r\n * registered callbacks.\r\n *\r\n * @param {String} event\r\n * @param {Function} fn\r\n * @return {Emitter}\r\n * @api public\r\n */\r\n\r\nEmitter.prototype.off =\r\nEmitter.prototype.removeListener =\r\nEmitter.prototype.removeAllListeners =\r\nEmitter.prototype.removeEventListener = function(event, fn){\r\n this._callbacks = this._callbacks || {};\r\n\r\n // all\r\n if (0 == arguments.length) {\r\n this._callbacks = {};\r\n return this;\r\n }\r\n\r\n // specific event\r\n var callbacks = this._callbacks['$' + event];\r\n if (!callbacks) return this;\r\n\r\n // remove all handlers\r\n if (1 == arguments.length) {\r\n delete this._callbacks['$' + event];\r\n return this;\r\n }\r\n\r\n // remove specific handler\r\n var cb;\r\n for (var i = 0; i < callbacks.length; i++) {\r\n cb = callbacks[i];\r\n if (cb === fn || cb.fn === fn) {\r\n callbacks.splice(i, 1);\r\n break;\r\n }\r\n }\r\n\r\n // Remove event specific arrays for event types that no\r\n // one is subscribed for to avoid memory leak.\r\n if (callbacks.length === 0) {\r\n delete this._callbacks['$' + event];\r\n }\r\n\r\n return this;\r\n};\r\n\r\n/**\r\n * Emit `event` with the given args.\r\n *\r\n * @param {String} event\r\n * @param {Mixed} ...\r\n * @return {Emitter}\r\n */\r\n\r\nEmitter.prototype.emit = function(event){\r\n this._callbacks = this._callbacks || {};\r\n\r\n var args = new Array(arguments.length - 1)\r\n , callbacks = this._callbacks['$' + event];\r\n\r\n for (var i = 1; i < arguments.length; i++) {\r\n args[i - 1] = arguments[i];\r\n }\r\n\r\n if (callbacks) {\r\n callbacks = callbacks.slice(0);\r\n for (var i = 0, len = callbacks.length; i < len; ++i) {\r\n callbacks[i].apply(this, args);\r\n }\r\n }\r\n\r\n return this;\r\n};\r\n\r\n/**\r\n * Return array of callbacks for `event`.\r\n *\r\n * @param {String} event\r\n * @return {Array}\r\n * @api public\r\n */\r\n\r\nEmitter.prototype.listeners = function(event){\r\n this._callbacks = this._callbacks || {};\r\n return this._callbacks['$' + event] || [];\r\n};\r\n\r\n/**\r\n * Check if this emitter has `event` handlers.\r\n *\r\n * @param {String} event\r\n * @return {Boolean}\r\n * @api public\r\n */\r\n\r\nEmitter.prototype.hasListeners = function(event){\r\n return !! this.listeners(event).length;\r\n};\r\n","/**\n * Parse a text source containing data in DOT language into a JSON object.\n * The object contains two lists: one with nodes and one with edges.\n *\n * DOT language reference: http://www.graphviz.org/doc/info/lang.html\n *\n * DOT language attributes: http://graphviz.org/content/attrs\n *\n * @param {string} data Text containing a graph in DOT-notation\n * @return {Object} graph An object containing two parameters:\n * {Object[]} nodes\n * {Object[]} edges\n *\n * -------------------------------------------\n * TODO\n * ====\n *\n * For label handling, this is an incomplete implementation. From docs (quote #3015):\n * \n * > the escape sequences \"\\n\", \"\\l\" and \"\\r\" divide the label into lines, centered, \n * > left-justified, and right-justified, respectively.\n *\n * Source: http://www.graphviz.org/content/attrs#kescString\n *\n * > As another aid for readability, dot allows double-quoted strings to span multiple physical\n * > lines using the standard C convention of a backslash immediately preceding a newline\n * > character\n * > In addition, double-quoted strings can be concatenated using a '+' operator.\n * > As HTML strings can contain newline characters, which are used solely for formatting,\n * > the language does not allow escaped newlines or concatenation operators to be used\n * > within them.\n *\n * - Currently, only '\\\\n' is handled\n * - Note that text explicitly says 'labels'; the dot parser currently handles escape\n * sequences in **all** strings.\n */\nfunction parseDOT (data) {\n dot = data;\n return parseGraph();\n}\n\n// mapping of attributes from DOT (the keys) to vis.js (the values)\nvar NODE_ATTR_MAPPING = {\n 'fontsize': 'font.size',\n 'fontcolor': 'font.color',\n 'labelfontcolor': 'font.color',\n 'fontname': 'font.face',\n 'color': ['color.border', 'color.background'],\n 'fillcolor': 'color.background',\n 'tooltip': 'title',\n 'labeltooltip': 'title'\n};\nvar EDGE_ATTR_MAPPING = Object.create(NODE_ATTR_MAPPING);\nEDGE_ATTR_MAPPING.color = 'color.color';\nEDGE_ATTR_MAPPING.style = 'dashes';\n\n// token types enumeration\nvar TOKENTYPE = {\n NULL : 0,\n DELIMITER : 1,\n IDENTIFIER: 2,\n UNKNOWN : 3\n};\n\n// map with all delimiters\nvar DELIMITERS = {\n '{': true,\n '}': true,\n '[': true,\n ']': true,\n ';': true,\n '=': true,\n ',': true,\n\n '->': true,\n '--': true\n};\n\nvar dot = ''; // current dot file\nvar index = 0; // current index in dot file\nvar c = ''; // current token character in expr\nvar token = ''; // current token\nvar tokenType = TOKENTYPE.NULL; // type of the token\n\n/**\n * Get the first character from the dot file.\n * The character is stored into the char c. If the end of the dot file is\n * reached, the function puts an empty string in c.\n */\nfunction first() {\n index = 0;\n c = dot.charAt(0);\n}\n\n/**\n * Get the next character from the dot file.\n * The character is stored into the char c. If the end of the dot file is\n * reached, the function puts an empty string in c.\n */\nfunction next() {\n index++;\n c = dot.charAt(index);\n}\n\n/**\n * Preview the next character from the dot file.\n * @return {string} cNext\n */\nfunction nextPreview() {\n return dot.charAt(index + 1);\n}\n\nvar regexAlphaNumeric = /[a-zA-Z_0-9.:#]/;\n/**\n * Test whether given character is alphabetic or numeric\n * @param {string} c\n * @return {Boolean} isAlphaNumeric\n */\nfunction isAlphaNumeric(c) {\n return regexAlphaNumeric.test(c);\n}\n\n/**\n * Merge all options of object b into object b\n * @param {Object} a\n * @param {Object} b\n * @return {Object} a\n */\nfunction merge (a, b) {\n if (!a) {\n a = {};\n }\n\n if (b) {\n for (var name in b) {\n if (b.hasOwnProperty(name)) {\n a[name] = b[name];\n }\n }\n }\n return a;\n}\n\n/**\n * Set a value in an object, where the provided parameter name can be a\n * path with nested parameters. For example:\n *\n * var obj = {a: 2};\n * setValue(obj, 'b.c', 3); // obj = {a: 2, b: {c: 3}}\n *\n * @param {Object} obj\n * @param {string} path A parameter name or dot-separated parameter path,\n * like \"color.highlight.border\".\n * @param {*} value\n */\nfunction setValue(obj, path, value) {\n var keys = path.split('.');\n var o = obj;\n while (keys.length) {\n var key = keys.shift();\n if (keys.length) {\n // this isn't the end point\n if (!o[key]) {\n o[key] = {};\n }\n o = o[key];\n }\n else {\n // this is the end point\n o[key] = value;\n }\n }\n}\n\n/**\n * Add a node to a graph object. If there is already a node with\n * the same id, their attributes will be merged.\n * @param {Object} graph\n * @param {Object} node\n */\nfunction addNode(graph, node) {\n var i, len;\n var current = null;\n\n // find root graph (in case of subgraph)\n var graphs = [graph]; // list with all graphs from current graph to root graph\n var root = graph;\n while (root.parent) {\n graphs.push(root.parent);\n root = root.parent;\n }\n\n // find existing node (at root level) by its id\n if (root.nodes) {\n for (i = 0, len = root.nodes.length; i < len; i++) {\n if (node.id === root.nodes[i].id) {\n current = root.nodes[i];\n break;\n }\n }\n }\n\n if (!current) {\n // this is a new node\n current = {\n id: node.id\n };\n if (graph.node) {\n // clone default attributes\n current.attr = merge(current.attr, graph.node);\n }\n }\n\n // add node to this (sub)graph and all its parent graphs\n for (i = graphs.length - 1; i >= 0; i--) {\n var g = graphs[i];\n\n if (!g.nodes) {\n g.nodes = [];\n }\n if (g.nodes.indexOf(current) === -1) {\n g.nodes.push(current);\n }\n }\n\n // merge attributes\n if (node.attr) {\n current.attr = merge(current.attr, node.attr);\n }\n}\n\n/**\n * Add an edge to a graph object\n * @param {Object} graph\n * @param {Object} edge\n */\nfunction addEdge(graph, edge) {\n if (!graph.edges) {\n graph.edges = [];\n }\n graph.edges.push(edge);\n if (graph.edge) {\n var attr = merge({}, graph.edge); // clone default attributes\n edge.attr = merge(attr, edge.attr); // merge attributes\n }\n}\n\n/**\n * Create an edge to a graph object\n * @param {Object} graph\n * @param {string | number | Object} from\n * @param {string | number | Object} to\n * @param {string} type\n * @param {Object | null} attr\n * @return {Object} edge\n */\nfunction createEdge(graph, from, to, type, attr) {\n var edge = {\n from: from,\n to: to,\n type: type\n };\n\n if (graph.edge) {\n edge.attr = merge({}, graph.edge); // clone default attributes\n }\n edge.attr = merge(edge.attr || {}, attr); // merge attributes\n\n // Move arrows attribute from attr to edge temporally created in\n // parseAttributeList().\n if (attr != null) {\n if (attr.hasOwnProperty('arrows') && attr['arrows'] != null) {\n edge['arrows'] = {to: {enabled: true, type: attr.arrows.type}};\n attr['arrows'] = null;\n }\n }\n return edge;\n}\n\n/**\n * Get next token in the current dot file.\n * The token and token type are available as token and tokenType\n */\nfunction getToken() {\n tokenType = TOKENTYPE.NULL;\n token = '';\n\n // skip over whitespaces\n while (c === ' ' || c === '\\t' || c === '\\n' || c === '\\r') { // space, tab, enter\n next();\n }\n\n do {\n var isComment = false;\n\n // skip comment\n if (c === '#') {\n // find the previous non-space character\n var i = index - 1;\n while (dot.charAt(i) === ' ' || dot.charAt(i) === '\\t') {\n i--;\n }\n if (dot.charAt(i) === '\\n' || dot.charAt(i) === '') {\n // the # is at the start of a line, this is indeed a line comment\n while (c != '' && c != '\\n') {\n next();\n }\n isComment = true;\n }\n }\n if (c === '/' && nextPreview() === '/') {\n // skip line comment\n while (c != '' && c != '\\n') {\n next();\n }\n isComment = true;\n }\n if (c === '/' && nextPreview() === '*') {\n // skip block comment\n while (c != '') {\n if (c === '*' && nextPreview() === '/') {\n // end of block comment found. skip these last two characters\n next();\n next();\n break;\n }\n else {\n next();\n }\n }\n isComment = true;\n }\n\n // skip over whitespaces\n while (c === ' ' || c === '\\t' || c === '\\n' || c === '\\r') { // space, tab, enter\n next();\n }\n }\n while (isComment);\n\n // check for end of dot file\n if (c === '') {\n // token is still empty\n tokenType = TOKENTYPE.DELIMITER;\n return;\n }\n\n // check for delimiters consisting of 2 characters\n var c2 = c + nextPreview();\n if (DELIMITERS[c2]) {\n tokenType = TOKENTYPE.DELIMITER;\n token = c2;\n next();\n next();\n return;\n }\n\n // check for delimiters consisting of 1 character\n if (DELIMITERS[c]) {\n tokenType = TOKENTYPE.DELIMITER;\n token = c;\n next();\n return;\n }\n\n // check for an identifier (number or string)\n // TODO: more precise parsing of numbers/strings (and the port separator ':')\n if (isAlphaNumeric(c) || c === '-') {\n token += c;\n next();\n\n while (isAlphaNumeric(c)) {\n token += c;\n next();\n }\n if (token === 'false') {\n token = false; // convert to boolean\n }\n else if (token === 'true') {\n token = true; // convert to boolean\n }\n else if (!isNaN(Number(token))) {\n token = Number(token); // convert to number\n }\n tokenType = TOKENTYPE.IDENTIFIER;\n return;\n }\n\n // check for a string enclosed by double quotes\n if (c === '\"') {\n next();\n while (c != '' && (c != '\"' || (c === '\"' && nextPreview() === '\"'))) {\n if (c === '\"') { // skip the escape character\n token += c;\n next();\n } else if (c === '\\\\' && nextPreview() === 'n') { // Honor a newline escape sequence\n token += '\\n';\n next();\n } else {\n token += c;\n }\n next();\n }\n if (c != '\"') {\n throw newSyntaxError('End of string \" expected');\n }\n next();\n tokenType = TOKENTYPE.IDENTIFIER;\n return;\n }\n\n // something unknown is found, wrong characters, a syntax error\n tokenType = TOKENTYPE.UNKNOWN;\n while (c != '') {\n token += c;\n next();\n }\n throw new SyntaxError('Syntax error in part \"' + chop(token, 30) + '\"');\n}\n\n/**\n * Parse a graph.\n * @returns {Object} graph\n */\nfunction parseGraph() {\n var graph = {};\n\n first();\n getToken();\n\n // optional strict keyword\n if (token === 'strict') {\n graph.strict = true;\n getToken();\n }\n\n // graph or digraph keyword\n if (token === 'graph' || token === 'digraph') {\n graph.type = token;\n getToken();\n }\n\n // optional graph id\n if (tokenType === TOKENTYPE.IDENTIFIER) {\n graph.id = token;\n getToken();\n }\n\n // open angle bracket\n if (token != '{') {\n throw newSyntaxError('Angle bracket { expected');\n }\n getToken();\n\n // statements\n parseStatements(graph);\n\n // close angle bracket\n if (token != '}') {\n throw newSyntaxError('Angle bracket } expected');\n }\n getToken();\n\n // end of file\n if (token !== '') {\n throw newSyntaxError('End of file expected');\n }\n getToken();\n\n // remove temporary default options\n delete graph.node;\n delete graph.edge;\n delete graph.graph;\n\n return graph;\n}\n\n/**\n * Parse a list with statements.\n * @param {Object} graph\n */\nfunction parseStatements (graph) {\n while (token !== '' && token != '}') {\n parseStatement(graph);\n if (token === ';') {\n getToken();\n }\n }\n}\n\n/**\n * Parse a single statement. Can be a an attribute statement, node\n * statement, a series of node statements and edge statements, or a\n * parameter.\n * @param {Object} graph\n */\nfunction parseStatement(graph) {\n // parse subgraph\n var subgraph = parseSubgraph(graph);\n if (subgraph) {\n // edge statements\n parseEdge(graph, subgraph);\n\n return;\n }\n\n // parse an attribute statement\n var attr = parseAttributeStatement(graph);\n if (attr) {\n return;\n }\n\n // parse node\n if (tokenType != TOKENTYPE.IDENTIFIER) {\n throw newSyntaxError('Identifier expected');\n }\n var id = token; // id can be a string or a number\n getToken();\n\n if (token === '=') {\n // id statement\n getToken();\n if (tokenType != TOKENTYPE.IDENTIFIER) {\n throw newSyntaxError('Identifier expected');\n }\n graph[id] = token;\n getToken();\n // TODO: implement comma separated list with \"a_list: ID=ID [','] [a_list] \"\n }\n else {\n parseNodeStatement(graph, id);\n }\n}\n\n/**\n * Parse a subgraph\n * @param {Object} graph parent graph object\n * @return {Object | null} subgraph\n */\nfunction parseSubgraph (graph) {\n var subgraph = null;\n\n // optional subgraph keyword\n if (token === 'subgraph') {\n subgraph = {};\n subgraph.type = 'subgraph';\n getToken();\n\n // optional graph id\n if (tokenType === TOKENTYPE.IDENTIFIER) {\n subgraph.id = token;\n getToken();\n }\n }\n\n // open angle bracket\n if (token === '{') {\n getToken();\n\n if (!subgraph) {\n subgraph = {};\n }\n subgraph.parent = graph;\n subgraph.node = graph.node;\n subgraph.edge = graph.edge;\n subgraph.graph = graph.graph;\n\n // statements\n parseStatements(subgraph);\n\n // close angle bracket\n if (token != '}') {\n throw newSyntaxError('Angle bracket } expected');\n }\n getToken();\n\n // remove temporary default options\n delete subgraph.node;\n delete subgraph.edge;\n delete subgraph.graph;\n delete subgraph.parent;\n\n // register at the parent graph\n if (!graph.subgraphs) {\n graph.subgraphs = [];\n }\n graph.subgraphs.push(subgraph);\n }\n\n return subgraph;\n}\n\n/**\n * parse an attribute statement like \"node [shape=circle fontSize=16]\".\n * Available keywords are 'node', 'edge', 'graph'.\n * The previous list with default attributes will be replaced\n * @param {Object} graph\n * @returns {String | null} keyword Returns the name of the parsed attribute\n * (node, edge, graph), or null if nothing\n * is parsed.\n */\nfunction parseAttributeStatement (graph) {\n // attribute statements\n if (token === 'node') {\n getToken();\n\n // node attributes\n graph.node = parseAttributeList();\n return 'node';\n }\n else if (token === 'edge') {\n getToken();\n\n // edge attributes\n graph.edge = parseAttributeList();\n return 'edge';\n }\n else if (token === 'graph') {\n getToken();\n\n // graph attributes\n graph.graph = parseAttributeList();\n return 'graph';\n }\n\n return null;\n}\n\n/**\n * parse a node statement\n * @param {Object} graph\n * @param {string | number} id\n */\nfunction parseNodeStatement(graph, id) {\n // node statement\n var node = {\n id: id\n };\n var attr = parseAttributeList();\n if (attr) {\n node.attr = attr;\n }\n addNode(graph, node);\n\n // edge statements\n parseEdge(graph, id);\n}\n\n/**\n * Parse an edge or a series of edges\n * @param {Object} graph\n * @param {string | number} from Id of the from node\n */\nfunction parseEdge(graph, from) {\n while (token === '->' || token === '--') {\n var to;\n var type = token;\n getToken();\n\n var subgraph = parseSubgraph(graph);\n if (subgraph) {\n to = subgraph;\n }\n else {\n if (tokenType != TOKENTYPE.IDENTIFIER) {\n throw newSyntaxError('Identifier or subgraph expected');\n }\n to = token;\n addNode(graph, {\n id: to\n });\n getToken();\n }\n\n // parse edge attributes\n var attr = parseAttributeList();\n\n // create edge\n var edge = createEdge(graph, from, to, type, attr);\n addEdge(graph, edge);\n\n from = to;\n }\n}\n\n/**\n * As explained in [1], graphviz has limitations for combination of\n * arrow[head|tail] and dir. If attribute list includes 'dir',\n * following cases just be supported.\n * 1. both or none + arrowhead, arrowtail\n * 2. forward + arrowhead (arrowtail is not affedted)\n * 3. back + arrowtail (arrowhead is not affected)\n * [1] https://www.graphviz.org/doc/info/attrs.html#h:undir_note\n *\n * This function is called from parseAttributeList() to parse 'dir'\n * attribute with given 'attr_names' and 'attr_list'.\n * @param {Object} attr_names Array of attribute names\n * @param {Object} attr_list Array of objects of attribute set\n * @return {Object} attr_list Updated attr_list\n */\nfunction parseDirAttribute(attr_names, attr_list) {\n var i;\n if (attr_names.includes('dir')) {\n var idx = {}; // get index of 'arrows' and 'dir'\n idx.arrows = {};\n for (i = 0; i < attr_list.length; i++) {\n if (attr_list[i].name === 'arrows') {\n if (attr_list[i].value.to != null) {\n idx.arrows.to = i;\n } else if (attr_list[i].value.from != null) {\n idx.arrows.from = i;\n } else {\n throw newSyntaxError('Invalid value of arrows');\n }\n } else if (attr_list[i].name === 'dir') {\n idx.dir = i;\n }\n }\n\n // first, add default arrow shape if it is not assigned to avoid error\n var dir_type = attr_list[idx.dir].value;\n if (!attr_names.includes('arrows')) {\n if (dir_type === 'both') {\n attr_list.push(\n {'attr': attr_list[idx.dir].attr, 'name': 'arrows',\n 'value': {'to': {'enabled': true}}\n }\n );\n idx.arrows.to = attr_list.length - 1;\n attr_list.push(\n {'attr': attr_list[idx.dir].attr, 'name': 'arrows',\n 'value': {'from': {'enabled': true}}\n }\n );\n idx.arrows.from = attr_list.length - 1;\n } else if (dir_type === 'forward') {\n attr_list.push(\n {'attr': attr_list[idx.dir].attr, 'name': 'arrows',\n 'value': {'to': {'enabled': true}}\n }\n );\n idx.arrows.to = attr_list.length - 1;\n } else if (dir_type === 'back') {\n attr_list.push(\n {'attr': attr_list[idx.dir].attr, 'name': 'arrows',\n 'value': {'from': {'enabled': true}}\n }\n );\n idx.arrows.from = attr_list.length - 1;\n } else if (dir_type === 'none') {\n attr_list.push(\n {'attr': attr_list[idx.dir].attr, 'name': 'arrows', 'value': ''}\n );\n idx.arrows.to = attr_list.length - 1;\n } else {\n throw newSyntaxError('Invalid dir type \"' + dir_type + '\"');\n }\n }\n\n var from_type;\n var to_type;\n // update 'arrows' attribute from 'dir'.\n if (dir_type === 'both') {\n // both of shapes of 'from' and 'to' are given\n if (idx.arrows.to && idx.arrows.from) {\n to_type = attr_list[idx.arrows.to].value.to.type;\n from_type = attr_list[idx.arrows.from].value.from.type;\n attr_list[idx.arrows.to] = {\n 'attr': attr_list[idx.arrows.to].attr,\n 'name': attr_list[idx.arrows.to].name,\n 'value': {\n 'to': {'enabled': true, 'type': to_type},\n 'from': {'enabled': true, 'type': from_type}\n }\n };\n attr_list.splice(idx.arrows.from, 1);\n\n // shape of 'to' is assigned and use default to 'from'\n } else if (idx.arrows.to) {\n to_type = attr_list[idx.arrows.to].value.to.type;\n from_type = 'arrow';\n attr_list[idx.arrows.to] = {\n 'attr': attr_list[idx.arrows.to].attr,\n 'name': attr_list[idx.arrows.to].name,\n 'value': {\n 'to': {'enabled': true, 'type': to_type},\n 'from': {'enabled': true, 'type': from_type}\n }\n };\n\n // only shape of 'from' is assigned and use default for 'to'\n } else if (idx.arrows.from) {\n to_type = 'arrow';\n from_type = attr_list[idx.arrows.from].value.from.type;\n attr_list[idx.arrows.from] = {\n 'attr': attr_list[idx.arrows.from].attr,\n 'name': attr_list[idx.arrows.from].name,\n 'value': {\n 'to': {'enabled': true, 'type': to_type},\n 'from': {'enabled': true, 'type': from_type}\n }\n };\n }\n\n } else if (dir_type === 'back') {\n // given both of shapes, but use only 'from'\n if (idx.arrows.to && idx.arrows.from) {\n to_type = '';\n from_type = attr_list[idx.arrows.from].value.from.type;\n attr_list[idx.arrows.from] = {\n 'attr': attr_list[idx.arrows.from].attr,\n 'name': attr_list[idx.arrows.from].name,\n 'value': {\n 'to': {'enabled': true, 'type': to_type},\n 'from': {'enabled': true, 'type': from_type}\n }\n };\n\n // given shape of 'to', but does not use it\n } else if (idx.arrows.to) {\n to_type = '';\n from_type = 'arrow';\n idx.arrows.from = idx.arrows.to;\n attr_list[idx.arrows.from] = {\n 'attr': attr_list[idx.arrows.from].attr,\n 'name': attr_list[idx.arrows.from].name,\n 'value': {\n 'to': {'enabled': true, 'type': to_type},\n 'from': {'enabled': true, 'type': from_type}\n }\n };\n\n // assign given 'from' shape\n } else if (idx.arrows.from) {\n to_type = '';\n from_type = attr_list[idx.arrows.from].value.from.type;\n attr_list[idx.arrows.to] = {\n 'attr': attr_list[idx.arrows.from].attr,\n 'name': attr_list[idx.arrows.from].name,\n 'value': {\n 'to': {'enabled': true, 'type': to_type},\n 'from': {'enabled': true, 'type': from_type}\n }\n };\n }\n\n attr_list[idx.arrows.from] = {\n 'attr': attr_list[idx.arrows.from].attr,\n 'name': attr_list[idx.arrows.from].name,\n 'value': {\n 'from': {\n 'enabled': true,\n 'type': attr_list[idx.arrows.from].value.from.type}\n }\n };\n\n } else if (dir_type === 'none') {\n var idx_arrow;\n if (idx.arrows.to) {\n idx_arrow = idx.arrows.to;\n } else {\n idx_arrow = idx.arrows.from;\n }\n\n attr_list[idx_arrow] = {\n 'attr': attr_list[idx_arrow].attr,\n 'name': attr_list[idx_arrow].name,\n 'value': ''\n };\n\n } else if (dir_type === 'forward'){\n // given both of shapes, but use only 'to'\n if (idx.arrows.to && idx.arrows.from) {\n to_type = attr_list[idx.arrows.to].value.to.type;\n from_type = '';\n attr_list[idx.arrows.to] = {\n 'attr': attr_list[idx.arrows.to].attr,\n 'name': attr_list[idx.arrows.to].name,\n 'value': {\n 'to': {'enabled': true, 'type': to_type},\n 'from': {'enabled': true, 'type': from_type}\n }\n };\n\n // assign given 'to' shape\n } else if (idx.arrows.to) {\n to_type = attr_list[idx.arrows.to].value.to.type;\n from_type = '';\n attr_list[idx.arrows.to] = {\n 'attr': attr_list[idx.arrows.to].attr,\n 'name': attr_list[idx.arrows.to].name,\n 'value': {\n 'to': {'enabled': true, 'type': to_type},\n 'from': {'enabled': true, 'type': from_type}\n }\n };\n\n // given shape of 'from', but does not use it\n } else if (idx.arrows.from) {\n to_type = 'arrow';\n from_type = '';\n idx.arrows.to = idx.arrows.from;\n attr_list[idx.arrows.to] = {\n 'attr': attr_list[idx.arrows.to].attr,\n 'name': attr_list[idx.arrows.to].name,\n 'value': {\n 'to': {'enabled': true, 'type': to_type},\n 'from': {'enabled': true, 'type': from_type}\n }\n };\n }\n\n attr_list[idx.arrows.to] = {\n 'attr': attr_list[idx.arrows.to].attr,\n 'name': attr_list[idx.arrows.to].name,\n 'value': {\n 'to': {\n 'enabled': true,\n 'type': attr_list[idx.arrows.to].value.to.type\n }\n }\n };\n } else {\n throw newSyntaxError('Invalid dir type \"' + dir_type + '\"');\n }\n\n // remove 'dir' attribute no need anymore\n attr_list.splice(idx.dir, 1);\n }\n return attr_list;\n}\n\n/**\n * Parse a set with attributes,\n * for example [label=\"1.000\", shape=solid]\n * @return {Object | null} attr\n */\nfunction parseAttributeList() {\n var i;\n var attr = null;\n\n // edge styles of dot and vis\n var edgeStyles = {\n 'dashed': true,\n 'solid': false,\n 'dotted': [1, 5]\n };\n\n /**\n * Define arrow types.\n * vis currently supports types defined in 'arrowTypes'.\n * Details of arrow shapes are described in\n * http://www.graphviz.org/content/arrow-shapes\n */\n var arrowTypes = {\n dot: 'circle',\n box: 'box',\n crow: 'crow',\n curve: 'curve',\n icurve: 'inv_curve',\n normal: 'triangle',\n inv: 'inv_triangle',\n diamond: 'diamond',\n tee: 'bar',\n vee: 'vee'\n };\n\n /**\n * 'attr_list' contains attributes for checking if some of them are affected\n * later. For instance, both of 'arrowhead' and 'dir' (edge style defined\n * in DOT) make changes to 'arrows' attribute in vis.\n */\n var attr_list = new Array();\n var attr_names = new Array(); // used for checking the case.\n\n // parse attributes\n while (token === '[') {\n getToken();\n attr = {};\n while (token !== '' && token != ']') {\n if (tokenType != TOKENTYPE.IDENTIFIER) {\n throw newSyntaxError('Attribute name expected');\n }\n var name = token;\n\n getToken();\n if (token != '=') {\n throw newSyntaxError('Equal sign = expected');\n }\n getToken();\n\n if (tokenType != TOKENTYPE.IDENTIFIER) {\n throw newSyntaxError('Attribute value expected');\n }\n var value = token;\n\n // convert from dot style to vis\n if (name === 'style') {\n value = edgeStyles[value];\n }\n\n var arrowType;\n if (name === 'arrowhead') {\n arrowType = arrowTypes[value];\n name = 'arrows';\n value = {'to': {'enabled': true, 'type': arrowType}};\n }\n\n if (name === 'arrowtail') {\n arrowType = arrowTypes[value];\n name = 'arrows';\n value = {'from': {'enabled': true, 'type': arrowType}};\n }\n\n attr_list.push(\n {'attr': attr, 'name': name, 'value': value}\n );\n attr_names.push(name);\n\n getToken();\n if (token == ',') {\n getToken();\n }\n }\n\n if (token != ']') {\n throw newSyntaxError('Bracket ] expected');\n }\n getToken();\n }\n\n /**\n * As explained in [1], graphviz has limitations for combination of\n * arrow[head|tail] and dir. If attribute list includes 'dir',\n * following cases just be supported.\n * 1. both or none + arrowhead, arrowtail\n * 2. forward + arrowhead (arrowtail is not affedted)\n * 3. back + arrowtail (arrowhead is not affected)\n * [1] https://www.graphviz.org/doc/info/attrs.html#h:undir_note\n */\n if (attr_names.includes('dir')) {\n var idx = {}; // get index of 'arrows' and 'dir'\n idx.arrows = {};\n for (i = 0; i < attr_list.length; i++) {\n if (attr_list[i].name === 'arrows') {\n if (attr_list[i].value.to != null) {\n idx.arrows.to = i;\n } else if (attr_list[i].value.from != null) {\n idx.arrows.from = i;\n } else {\n throw newSyntaxError('Invalid value of arrows');\n }\n } else if (attr_list[i].name === 'dir') {\n idx.dir = i;\n }\n }\n\n // first, add default arrow shape if it is not assigned to avoid error\n var dir_type = attr_list[idx.dir].value;\n if (!attr_names.includes('arrows')) {\n if (dir_type === 'both') {\n attr_list.push(\n {'attr': attr_list[idx.dir].attr, 'name': 'arrows',\n 'value': {to: {enabled:true}}\n }\n );\n idx.arrows.to = attr_list.length - 1;\n attr_list.push(\n {'attr': attr_list[idx.dir].attr, 'name': 'arrows',\n 'value': {from: {enabled:true}}\n }\n );\n idx.arrows.from = attr_list.length - 1;\n } else if (dir_type === 'forward') {\n attr_list.push(\n {'attr': attr_list[idx.dir].attr, 'name': 'arrows',\n 'value': {to: {enabled:true}}\n }\n );\n idx.arrows.to = attr_list.length - 1;\n } else if (dir_type === 'back') {\n attr_list.push(\n {'attr': attr_list[idx.dir].attr, 'name': 'arrows',\n 'value': {from: {enabled:true}}\n }\n );\n idx.arrows.from = attr_list.length - 1;\n } else if (dir_type === 'none') {\n attr_list.push(\n {'attr': attr_list[idx.dir].attr, 'name': 'arrows', 'value': ''}\n );\n idx.arrows.to = attr_list.length - 1;\n } else {\n throw newSyntaxError('Invalid dir type \"' + dir_type + '\"');\n }\n }\n\n var from_type;\n var to_type;\n // update 'arrows' attribute from 'dir'.\n if (dir_type === 'both') {\n // both of shapes of 'from' and 'to' are given\n if (idx.arrows.to && idx.arrows.from) {\n to_type = attr_list[idx.arrows.to].value.to.type;\n from_type = attr_list[idx.arrows.from].value.from.type;\n attr_list[idx.arrows.to] = {\n 'attr': attr_list[idx.arrows.to].attr,\n 'name': attr_list[idx.arrows.to].name,\n 'value': {\n to:{enabled:true, type: to_type},\n from:{enabled:true, type: from_type}\n }\n };\n attr_list.splice(idx.arrows.from, 1);\n\n // shape of 'to' is assigned and use default to 'from'\n } else if (idx.arrows.to) {\n to_type = attr_list[idx.arrows.to].value.to.type;\n from_type = 'arrow';\n attr_list[idx.arrows.to] = {\n 'attr': attr_list[idx.arrows.to].attr,\n 'name': attr_list[idx.arrows.to].name,\n 'value': {\n to:{enabled:true, type: to_type},\n from:{enabled:true, type: from_type}\n }\n };\n\n // only shape of 'from' is assigned and use default for 'to'\n } else if (idx.arrows.from) {\n to_type = 'arrow';\n from_type = attr_list[idx.arrows.from].value.from.type;\n attr_list[idx.arrows.from] = {\n 'attr': attr_list[idx.arrows.from].attr,\n 'name': attr_list[idx.arrows.from].name,\n 'value': {\n to:{enabled:true, type: to_type},\n from:{enabled:true, type: from_type}\n }\n };\n }\n\n } else if (dir_type === 'back') {\n // given both of shapes, but use only 'from'\n if (idx.arrows.to && idx.arrows.from) {\n to_type = '';\n from_type = attr_list[idx.arrows.from].value.from.type;\n attr_list[idx.arrows.from] = {\n 'attr': attr_list[idx.arrows.from].attr,\n 'name': attr_list[idx.arrows.from].name,\n 'value': {\n to:{enabled:true, type: to_type},\n from:{enabled:true, type: from_type}\n }\n };\n\n // given shape of 'to', but does not use it\n } else if (idx.arrows.to) {\n to_type = '';\n from_type = 'arrow';\n idx.arrows.from = idx.arrows.to;\n attr_list[idx.arrows.from] = {\n 'attr': attr_list[idx.arrows.from].attr,\n 'name': attr_list[idx.arrows.from].name,\n 'value': {\n to:{enabled:true, type: to_type},\n from:{enabled:true, type: from_type}\n }\n };\n\n // assign given 'from' shape\n } else if (idx.arrows.from) {\n to_type = '';\n from_type = attr_list[idx.arrows.from].value.from.type;\n attr_list[idx.arrows.to] = {\n 'attr': attr_list[idx.arrows.from].attr,\n 'name': attr_list[idx.arrows.from].name,\n 'value': {\n to:{enabled:true, type: to_type},\n from:{enabled:true, type: from_type}\n }\n };\n }\n\n attr_list[idx.arrows.from] = {\n 'attr': attr_list[idx.arrows.from].attr,\n 'name': attr_list[idx.arrows.from].name,\n 'value': {from: {enabled:true, type: attr_list[idx.arrows.from].value.from.type}}\n };\n\n } else if (dir_type === 'none') {\n var idx_arrow;\n if (idx.arrows.to) {\n idx_arrow = idx.arrows.to;\n } else {\n idx_arrow = idx.arrows.from;\n }\n\n attr_list[idx_arrow] = {\n 'attr': attr_list[idx_arrow].attr,\n 'name': attr_list[idx_arrow].name,\n 'value': ''\n };\n\n } else if (dir_type === 'forward'){\n // given both of shapes, but use only 'to'\n if (idx.arrows.to && idx.arrows.from) {\n to_type = attr_list[idx.arrows.to].value.to.type;\n from_type = '';\n attr_list[idx.arrows.to] = {\n 'attr': attr_list[idx.arrows.to].attr,\n 'name': attr_list[idx.arrows.to].name,\n 'value': {\n to:{enabled:true, type: to_type},\n from:{enabled:true, type: from_type}\n }\n };\n\n // assign given 'to' shape\n } else if (idx.arrows.to) {\n to_type = attr_list[idx.arrows.to].value.to.type;\n from_type = '';\n attr_list[idx.arrows.to] = {\n 'attr': attr_list[idx.arrows.to].attr,\n 'name': attr_list[idx.arrows.to].name,\n 'value': {\n to:{enabled:true, type: to_type},\n from:{enabled:true, type: from_type}\n }\n };\n\n // given shape of 'from', but does not use it\n } else if (idx.arrows.from) {\n to_type = 'arrow';\n from_type = '';\n idx.arrows.to = idx.arrows.from;\n attr_list[idx.arrows.to] = {\n 'attr': attr_list[idx.arrows.to].attr,\n 'name': attr_list[idx.arrows.to].name,\n 'value': {\n to:{enabled:true, type: to_type},\n from:{enabled:true, type: from_type}\n }\n };\n }\n\n attr_list[idx.arrows.to] = {\n 'attr': attr_list[idx.arrows.to].attr,\n 'name': attr_list[idx.arrows.to].name,\n 'value': {\n to: {enabled:true, type: attr_list[idx.arrows.to].value.to.type}\n }\n };\n } else {\n throw newSyntaxError('Invalid dir type \"' + dir_type + '\"');\n }\n\n // remove 'dir' attribute no need anymore\n attr_list.splice(idx.dir, 1);\n }\n\n // parse 'penwidth'\n var nof_attr_list;\n if (attr_names.includes('penwidth')) {\n var tmp_attr_list = [];\n\n nof_attr_list = attr_list.length;\n for (i = 0; i < nof_attr_list; i++) {\n // exclude 'width' from attr_list if 'penwidth' exists\n if (attr_list[i].name !== 'width') {\n if (attr_list[i].name === 'penwidth') {\n attr_list[i].name = 'width';\n }\n tmp_attr_list.push(attr_list[i]);\n }\n }\n attr_list = tmp_attr_list;\n }\n\n nof_attr_list = attr_list.length;\n for (i = 0; i < nof_attr_list; i++) {\n setValue(attr_list[i].attr, attr_list[i].name, attr_list[i].value);\n }\n\n return attr;\n}\n\n/**\n * Create a syntax error with extra information on current token and index.\n * @param {string} message\n * @returns {SyntaxError} err\n */\nfunction newSyntaxError(message) {\n return new SyntaxError(message + ', got \"' + chop(token, 30) + '\" (char ' + index + ')');\n}\n\n/**\n * Chop off text after a maximum length\n * @param {string} text\n * @param {number} maxLength\n * @returns {String}\n */\nfunction chop (text, maxLength) {\n return (text.length <= maxLength) ? text : (text.substr(0, 27) + '...');\n}\n\n/**\n * Execute a function fn for each pair of elements in two arrays\n * @param {Array | *} array1\n * @param {Array | *} array2\n * @param {function} fn\n */\nfunction forEach2(array1, array2, fn) {\n if (Array.isArray(array1)) {\n array1.forEach(function (elem1) {\n if (Array.isArray(array2)) {\n array2.forEach(function (elem2) {\n fn(elem1, elem2);\n });\n }\n else {\n fn(elem1, array2);\n }\n });\n }\n else {\n if (Array.isArray(array2)) {\n array2.forEach(function (elem2) {\n fn(array1, elem2);\n });\n }\n else {\n fn(array1, array2);\n }\n }\n}\n\n/**\n * Set a nested property on an object\n * When nested objects are missing, they will be created.\n * For example setProp({}, 'font.color', 'red') will return {font: {color: 'red'}}\n * @param {Object} object\n * @param {string} path A dot separated string like 'font.color'\n * @param {*} value Value for the property\n * @return {Object} Returns the original object, allows for chaining.\n */\nfunction setProp(object, path, value) {\n var names = path.split('.');\n var prop = names.pop();\n\n // traverse over the nested objects\n var obj = object;\n for (var i = 0; i < names.length; i++) {\n var name = names[i];\n if (!(name in obj)) {\n obj[name] = {};\n }\n obj = obj[name];\n }\n\n // set the property value\n obj[prop] = value;\n\n return object;\n}\n\n/**\n * Convert an object with DOT attributes to their vis.js equivalents.\n * @param {Object} attr Object with DOT attributes\n * @param {Object} mapping\n * @return {Object} Returns an object with vis.js attributes\n */\nfunction convertAttr (attr, mapping) {\n var converted = {};\n\n for (var prop in attr) {\n if (attr.hasOwnProperty(prop)) {\n var visProp = mapping[prop];\n if (Array.isArray(visProp)) {\n visProp.forEach(function (visPropI) {\n setProp(converted, visPropI, attr[prop]);\n })\n }\n else if (typeof visProp === 'string') {\n setProp(converted, visProp, attr[prop]);\n }\n else {\n setProp(converted, prop, attr[prop]);\n }\n }\n }\n\n return converted;\n}\n\n/**\n * Convert a string containing a graph in DOT language into a map containing\n * with nodes and edges in the format of graph.\n * @param {string} data Text containing a graph in DOT-notation\n * @return {Object} graphData\n */\nfunction DOTToGraph (data) {\n // parse the DOT file\n var dotData = parseDOT(data);\n var graphData = {\n nodes: [],\n edges: [],\n options: {}\n };\n\n // copy the nodes\n if (dotData.nodes) {\n dotData.nodes.forEach(function (dotNode) {\n var graphNode = {\n id: dotNode.id,\n label: String(dotNode.label || dotNode.id)\n };\n merge(graphNode, convertAttr(dotNode.attr, NODE_ATTR_MAPPING));\n if (graphNode.image) {\n graphNode.shape = 'image';\n }\n graphData.nodes.push(graphNode);\n });\n }\n\n // copy the edges\n if (dotData.edges) {\n /**\n * Convert an edge in DOT format to an edge with VisGraph format\n * @param {Object} dotEdge\n * @returns {Object} graphEdge\n */\n var convertEdge = function (dotEdge) {\n var graphEdge = {\n from: dotEdge.from,\n to: dotEdge.to\n };\n merge(graphEdge, convertAttr(dotEdge.attr, EDGE_ATTR_MAPPING));\n\n // Add arrows attribute to default styled arrow.\n // The reason why default style is not added in parseAttributeList() is\n // because only default is cleared before here.\n if (graphEdge.arrows == null && dotEdge.type === '->') {\n graphEdge.arrows = 'to';\n }\n\n return graphEdge;\n };\n\n dotData.edges.forEach(function (dotEdge) {\n var from, to;\n if (dotEdge.from instanceof Object) {\n from = dotEdge.from.nodes;\n }\n else {\n from = {\n id: dotEdge.from\n }\n }\n\n if (dotEdge.to instanceof Object) {\n to = dotEdge.to.nodes;\n }\n else {\n to = {\n id: dotEdge.to\n }\n }\n\n if (dotEdge.from instanceof Object && dotEdge.from.edges) {\n dotEdge.from.edges.forEach(function (subEdge) {\n var graphEdge = convertEdge(subEdge);\n graphData.edges.push(graphEdge);\n });\n }\n\n forEach2(from, to, function (from, to) {\n var subEdge = createEdge(graphData, from.id, to.id, dotEdge.type, dotEdge.attr);\n var graphEdge = convertEdge(subEdge);\n graphData.edges.push(graphEdge);\n });\n\n if (dotEdge.to instanceof Object && dotEdge.to.edges) {\n dotEdge.to.edges.forEach(function (subEdge) {\n var graphEdge = convertEdge(subEdge);\n graphData.edges.push(graphEdge);\n });\n }\n });\n }\n\n // copy the options\n if (dotData.attr) {\n graphData.options = dotData.attr;\n }\n\n return graphData;\n}\n\n// exports\nexports.parseDOT = parseDOT;\nexports.DOTToGraph = DOTToGraph;\n","export type Id = number | string\n\nexport interface ColorObject {\n background: string\n border: string\n highlight: {\n background: string\n border: string\n }\n hover: {\n background: string\n border: string\n }\n}\n\nexport interface GephiData {\n nodes: GephiNode[]\n edges: GephiEdge[]\n}\nexport interface GephiParseOptions {\n fixed?: boolean\n inheritColor?: boolean\n parseColor?: boolean\n}\n\nexport interface GephiNode {\n id: Id\n\n attributes?: { title?: string }\n color?: string\n label?: string\n size?: number\n title?: string\n x?: number\n y?: number\n}\nexport interface GephiEdge {\n id: Id\n source: Id\n target: Id\n\n attributes?: { title?: string }\n color?: string\n label?: string\n type?: string\n}\n\nexport interface VisData {\n nodes: VisNode[]\n edges: VisEdge[]\n}\n\nexport interface VisNode {\n id: Id\n fixed: boolean\n\n color?: string | ColorObject\n label?: string\n size?: number\n title?: string\n x?: number\n y?: number\n\n attributes?: unknown\n}\nexport interface VisEdge {\n id: Id\n from: Id\n to: Id\n\n arrows?: 'to'\n color?: string\n label?: string\n title?: string\n\n attributes?: unknown\n}\n\n/**\n * Convert Gephi to Vis.\n *\n * @param gephiJSON - The parsed JSON data in Gephi format.\n * @param optionsObj - Additional options.\n *\n * @returns The converted data ready to be used in Vis.\n */\nexport function parseGephi(\n gephiJSON: GephiData,\n optionsObj?: GephiParseOptions\n): VisData {\n const options = {\n edges: {\n inheritColor: false,\n },\n nodes: {\n fixed: false,\n parseColor: false,\n },\n }\n\n if (optionsObj != null) {\n if (optionsObj.fixed != null) {\n options.nodes.fixed = optionsObj.fixed\n }\n if (optionsObj.parseColor != null) {\n options.nodes.parseColor = optionsObj.parseColor\n }\n if (optionsObj.inheritColor != null) {\n options.edges.inheritColor = optionsObj.inheritColor\n }\n }\n\n const gEdges = gephiJSON.edges\n const vEdges = gEdges.map(\n (gEdge): VisEdge => {\n const vEdge: VisEdge = {\n from: gEdge.source,\n id: gEdge.id,\n to: gEdge.target,\n }\n\n if (gEdge.attributes != null) {\n vEdge.attributes = gEdge.attributes\n }\n if (gEdge.label != null) {\n vEdge.label = gEdge.label\n }\n if (gEdge.attributes != null && gEdge.attributes.title != null) {\n vEdge.title = gEdge.attributes.title\n }\n if (gEdge.type === 'Directed') {\n vEdge.arrows = 'to'\n }\n // edge['value'] = gEdge.attributes != null ? gEdge.attributes.Weight : undefined;\n // edge['width'] = edge['value'] != null ? undefined : edgegEdge.size;\n if (gEdge.color && options.edges.inheritColor === false) {\n vEdge.color = gEdge.color\n }\n\n return vEdge\n }\n )\n\n const vNodes = gephiJSON.nodes.map(\n (gNode): VisNode => {\n const vNode: VisNode = {\n id: gNode.id,\n fixed: options.nodes.fixed && gNode.x != null && gNode.y != null,\n }\n\n if (gNode.attributes != null) {\n vNode.attributes = gNode.attributes\n }\n if (gNode.label != null) {\n vNode.label = gNode.label\n }\n if (gNode.size != null) {\n vNode.size = gNode.size\n }\n if (gNode.attributes != null && gNode.attributes.title != null) {\n vNode.title = gNode.attributes.title\n }\n if (gNode.title != null) {\n vNode.title = gNode.title\n }\n if (gNode.x != null) {\n vNode.x = gNode.x\n }\n if (gNode.y != null) {\n vNode.y = gNode.y\n }\n if (gNode.color != null) {\n if (options.nodes.parseColor === true) {\n vNode.color = gNode.color\n } else {\n vNode.color = {\n background: gNode.color,\n border: gNode.color,\n highlight: {\n background: gNode.color,\n border: gNode.color,\n },\n hover: {\n background: gNode.color,\n border: gNode.color,\n },\n }\n }\n }\n\n return vNode\n }\n )\n\n return { nodes: vNodes, edges: vEdges }\n}\n","\"use strict\";\r\n/**\r\n * Created by Alex on 11/6/2014.\r\n */\r\n\r\n// https://github.com/umdjs/umd/blob/master/returnExports.js#L40-L60\r\n// if the module has no dependencies, the above pattern can be simplified to\r\n(function (root, factory) {\r\n if (typeof define === 'function' && define.amd) {\r\n // AMD. Register as an anonymous module.\r\n define([], factory);\r\n } else if (typeof exports === 'object') {\r\n // Node. Does not work with strict CommonJS, but\r\n // only CommonJS-like environments that support module.exports,\r\n // like Node.\r\n module.exports = factory();\r\n } else {\r\n // Browser globals (root is window)\r\n root.keycharm = factory();\r\n }\r\n}(this, function () {\r\n\r\n function keycharm(options) {\r\n var preventDefault = options && options.preventDefault || false;\r\n\r\n var container = options && options.container || window;\r\n\r\n var _exportFunctions = {};\r\n var _bound = {keydown:{}, keyup:{}};\r\n var _keys = {};\r\n var i;\r\n\r\n // a - z\r\n for (i = 97; i <= 122; i++) {_keys[String.fromCharCode(i)] = {code:65 + (i - 97), shift: false};}\r\n // A - Z\r\n for (i = 65; i <= 90; i++) {_keys[String.fromCharCode(i)] = {code:i, shift: true};}\r\n // 0 - 9\r\n for (i = 0; i <= 9; i++) {_keys['' + i] = {code:48 + i, shift: false};}\r\n // F1 - F12\r\n for (i = 1; i <= 12; i++) {_keys['F' + i] = {code:111 + i, shift: false};}\r\n // num0 - num9\r\n for (i = 0; i <= 9; i++) {_keys['num' + i] = {code:96 + i, shift: false};}\r\n\r\n // numpad misc\r\n _keys['num*'] = {code:106, shift: false};\r\n _keys['num+'] = {code:107, shift: false};\r\n _keys['num-'] = {code:109, shift: false};\r\n _keys['num/'] = {code:111, shift: false};\r\n _keys['num.'] = {code:110, shift: false};\r\n // arrows\r\n _keys['left'] = {code:37, shift: false};\r\n _keys['up'] = {code:38, shift: false};\r\n _keys['right'] = {code:39, shift: false};\r\n _keys['down'] = {code:40, shift: false};\r\n // extra keys\r\n _keys['space'] = {code:32, shift: false};\r\n _keys['enter'] = {code:13, shift: false};\r\n _keys['shift'] = {code:16, shift: undefined};\r\n _keys['esc'] = {code:27, shift: false};\r\n _keys['backspace'] = {code:8, shift: false};\r\n _keys['tab'] = {code:9, shift: false};\r\n _keys['ctrl'] = {code:17, shift: false};\r\n _keys['alt'] = {code:18, shift: false};\r\n _keys['delete'] = {code:46, shift: false};\r\n _keys['pageup'] = {code:33, shift: false};\r\n _keys['pagedown'] = {code:34, shift: false};\r\n // symbols\r\n _keys['='] = {code:187, shift: false};\r\n _keys['-'] = {code:189, shift: false};\r\n _keys[']'] = {code:221, shift: false};\r\n _keys['['] = {code:219, shift: false};\r\n\r\n\r\n\r\n var down = function(event) {handleEvent(event,'keydown');};\r\n var up = function(event) {handleEvent(event,'keyup');};\r\n\r\n // handle the actualy bound key with the event\r\n var handleEvent = function(event,type) {\r\n if (_bound[type][event.keyCode] !== undefined) {\r\n var bound = _bound[type][event.keyCode];\r\n for (var i = 0; i < bound.length; i++) {\r\n if (bound[i].shift === undefined) {\r\n bound[i].fn(event);\r\n }\r\n else if (bound[i].shift == true && event.shiftKey == true) {\r\n bound[i].fn(event);\r\n }\r\n else if (bound[i].shift == false && event.shiftKey == false) {\r\n bound[i].fn(event);\r\n }\r\n }\r\n\r\n if (preventDefault == true) {\r\n event.preventDefault();\r\n }\r\n }\r\n };\r\n\r\n // bind a key to a callback\r\n _exportFunctions.bind = function(key, callback, type) {\r\n if (type === undefined) {\r\n type = 'keydown';\r\n }\r\n if (_keys[key] === undefined) {\r\n throw new Error(\"unsupported key: \" + key);\r\n }\r\n if (_bound[type][_keys[key].code] === undefined) {\r\n _bound[type][_keys[key].code] = [];\r\n }\r\n _bound[type][_keys[key].code].push({fn:callback, shift:_keys[key].shift});\r\n };\r\n\r\n\r\n // bind all keys to a call back (demo purposes)\r\n _exportFunctions.bindAll = function(callback, type) {\r\n if (type === undefined) {\r\n type = 'keydown';\r\n }\r\n for (var key in _keys) {\r\n if (_keys.hasOwnProperty(key)) {\r\n _exportFunctions.bind(key,callback,type);\r\n }\r\n }\r\n };\r\n\r\n // get the key label from an event\r\n _exportFunctions.getKey = function(event) {\r\n for (var key in _keys) {\r\n if (_keys.hasOwnProperty(key)) {\r\n if (event.shiftKey == true && _keys[key].shift == true && event.keyCode == _keys[key].code) {\r\n return key;\r\n }\r\n else if (event.shiftKey == false && _keys[key].shift == false && event.keyCode == _keys[key].code) {\r\n return key;\r\n }\r\n else if (event.keyCode == _keys[key].code && key == 'shift') {\r\n return key;\r\n }\r\n }\r\n }\r\n return \"unknown key, currently not supported\";\r\n };\r\n\r\n // unbind either a specific callback from a key or all of them (by leaving callback undefined)\r\n _exportFunctions.unbind = function(key, callback, type) {\r\n if (type === undefined) {\r\n type = 'keydown';\r\n }\r\n if (_keys[key] === undefined) {\r\n throw new Error(\"unsupported key: \" + key);\r\n }\r\n if (callback !== undefined) {\r\n var newBindings = [];\r\n var bound = _bound[type][_keys[key].code];\r\n if (bound !== undefined) {\r\n for (var i = 0; i < bound.length; i++) {\r\n if (!(bound[i].fn == callback && bound[i].shift == _keys[key].shift)) {\r\n newBindings.push(_bound[type][_keys[key].code][i]);\r\n }\r\n }\r\n }\r\n _bound[type][_keys[key].code] = newBindings;\r\n }\r\n else {\r\n _bound[type][_keys[key].code] = [];\r\n }\r\n };\r\n\r\n // reset all bound variables.\r\n _exportFunctions.reset = function() {\r\n _bound = {keydown:{}, keyup:{}};\r\n };\r\n\r\n // unbind all listeners and reset all variables.\r\n _exportFunctions.destroy = function() {\r\n _bound = {keydown:{}, keyup:{}};\r\n container.removeEventListener('keydown', down, true);\r\n container.removeEventListener('keyup', up, true);\r\n };\r\n\r\n // create listeners.\r\n container.addEventListener('keydown',down,true);\r\n container.addEventListener('keyup',up,true);\r\n\r\n // return the public functions.\r\n return _exportFunctions;\r\n }\r\n\r\n return keycharm;\r\n}));\r\n\r\n\r\n","/*! Hammer.JS - v2.0.15 - 2019-04-04\n * http://naver.github.io/egjs\n *\n * Forked By Naver egjs\n * Copyright (c) hammerjs\n * Licensed under the MIT license */\nfunction _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}\n\nfunction _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n subClass.__proto__ = superClass;\n}\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\n/**\n * @private\n * extend object.\n * means that properties in dest will be overwritten by the ones in src.\n * @param {Object} target\n * @param {...Object} objects_to_assign\n * @returns {Object} target\n */\nvar assign;\n\nif (typeof Object.assign !== 'function') {\n assign = function assign(target) {\n if (target === undefined || target === null) {\n throw new TypeError('Cannot convert undefined or null to object');\n }\n\n var output = Object(target);\n\n for (var index = 1; index < arguments.length; index++) {\n var source = arguments[index];\n\n if (source !== undefined && source !== null) {\n for (var nextKey in source) {\n if (source.hasOwnProperty(nextKey)) {\n output[nextKey] = source[nextKey];\n }\n }\n }\n }\n\n return output;\n };\n} else {\n assign = Object.assign;\n}\n\nvar assign$1 = assign;\n\nvar VENDOR_PREFIXES = ['', 'webkit', 'Moz', 'MS', 'ms', 'o'];\nvar TEST_ELEMENT = typeof document === \"undefined\" ? {\n style: {}\n} : document.createElement('div');\nvar TYPE_FUNCTION = 'function';\nvar round = Math.round,\n abs = Math.abs;\nvar now = Date.now;\n\n/**\n * @private\n * get the prefixed property\n * @param {Object} obj\n * @param {String} property\n * @returns {String|Undefined} prefixed\n */\n\nfunction prefixed(obj, property) {\n var prefix;\n var prop;\n var camelProp = property[0].toUpperCase() + property.slice(1);\n var i = 0;\n\n while (i < VENDOR_PREFIXES.length) {\n prefix = VENDOR_PREFIXES[i];\n prop = prefix ? prefix + camelProp : property;\n\n if (prop in obj) {\n return prop;\n }\n\n i++;\n }\n\n return undefined;\n}\n\n/* eslint-disable no-new-func, no-nested-ternary */\nvar win;\n\nif (typeof window === \"undefined\") {\n // window is undefined in node.js\n win = {};\n} else {\n win = window;\n}\n\nvar PREFIXED_TOUCH_ACTION = prefixed(TEST_ELEMENT.style, 'touchAction');\nvar NATIVE_TOUCH_ACTION = PREFIXED_TOUCH_ACTION !== undefined;\nfunction getTouchActionProps() {\n if (!NATIVE_TOUCH_ACTION) {\n return false;\n }\n\n var touchMap = {};\n var cssSupports = win.CSS && win.CSS.supports;\n ['auto', 'manipulation', 'pan-y', 'pan-x', 'pan-x pan-y', 'none'].forEach(function (val) {\n // If css.supports is not supported but there is native touch-action assume it supports\n // all values. This is the case for IE 10 and 11.\n return touchMap[val] = cssSupports ? win.CSS.supports('touch-action', val) : true;\n });\n return touchMap;\n}\n\nvar TOUCH_ACTION_COMPUTE = 'compute';\nvar TOUCH_ACTION_AUTO = 'auto';\nvar TOUCH_ACTION_MANIPULATION = 'manipulation'; // not implemented\n\nvar TOUCH_ACTION_NONE = 'none';\nvar TOUCH_ACTION_PAN_X = 'pan-x';\nvar TOUCH_ACTION_PAN_Y = 'pan-y';\nvar TOUCH_ACTION_MAP = getTouchActionProps();\n\nvar MOBILE_REGEX = /mobile|tablet|ip(ad|hone|od)|android/i;\nvar SUPPORT_TOUCH = 'ontouchstart' in win;\nvar SUPPORT_POINTER_EVENTS = prefixed(win, 'PointerEvent') !== undefined;\nvar SUPPORT_ONLY_TOUCH = SUPPORT_TOUCH && MOBILE_REGEX.test(navigator.userAgent);\nvar INPUT_TYPE_TOUCH = 'touch';\nvar INPUT_TYPE_PEN = 'pen';\nvar INPUT_TYPE_MOUSE = 'mouse';\nvar INPUT_TYPE_KINECT = 'kinect';\nvar COMPUTE_INTERVAL = 25;\nvar INPUT_START = 1;\nvar INPUT_MOVE = 2;\nvar INPUT_END = 4;\nvar INPUT_CANCEL = 8;\nvar DIRECTION_NONE = 1;\nvar DIRECTION_LEFT = 2;\nvar DIRECTION_RIGHT = 4;\nvar DIRECTION_UP = 8;\nvar DIRECTION_DOWN = 16;\nvar DIRECTION_HORIZONTAL = DIRECTION_LEFT | DIRECTION_RIGHT;\nvar DIRECTION_VERTICAL = DIRECTION_UP | DIRECTION_DOWN;\nvar DIRECTION_ALL = DIRECTION_HORIZONTAL | DIRECTION_VERTICAL;\nvar PROPS_XY = ['x', 'y'];\nvar PROPS_CLIENT_XY = ['clientX', 'clientY'];\n\n/**\n * @private\n * walk objects and arrays\n * @param {Object} obj\n * @param {Function} iterator\n * @param {Object} context\n */\nfunction each(obj, iterator, context) {\n var i;\n\n if (!obj) {\n return;\n }\n\n if (obj.forEach) {\n obj.forEach(iterator, context);\n } else if (obj.length !== undefined) {\n i = 0;\n\n while (i < obj.length) {\n iterator.call(context, obj[i], i, obj);\n i++;\n }\n } else {\n for (i in obj) {\n obj.hasOwnProperty(i) && iterator.call(context, obj[i], i, obj);\n }\n }\n}\n\n/**\n * @private\n * let a boolean value also be a function that must return a boolean\n * this first item in args will be used as the context\n * @param {Boolean|Function} val\n * @param {Array} [args]\n * @returns {Boolean}\n */\n\nfunction boolOrFn(val, args) {\n if (typeof val === TYPE_FUNCTION) {\n return val.apply(args ? args[0] || undefined : undefined, args);\n }\n\n return val;\n}\n\n/**\n * @private\n * small indexOf wrapper\n * @param {String} str\n * @param {String} find\n * @returns {Boolean} found\n */\nfunction inStr(str, find) {\n return str.indexOf(find) > -1;\n}\n\n/**\n * @private\n * when the touchActions are collected they are not a valid value, so we need to clean things up. *\n * @param {String} actions\n * @returns {*}\n */\n\nfunction cleanTouchActions(actions) {\n // none\n if (inStr(actions, TOUCH_ACTION_NONE)) {\n return TOUCH_ACTION_NONE;\n }\n\n var hasPanX = inStr(actions, TOUCH_ACTION_PAN_X);\n var hasPanY = inStr(actions, TOUCH_ACTION_PAN_Y); // if both pan-x and pan-y are set (different recognizers\n // for different directions, e.g. horizontal pan but vertical swipe?)\n // we need none (as otherwise with pan-x pan-y combined none of these\n // recognizers will work, since the browser would handle all panning\n\n if (hasPanX && hasPanY) {\n return TOUCH_ACTION_NONE;\n } // pan-x OR pan-y\n\n\n if (hasPanX || hasPanY) {\n return hasPanX ? TOUCH_ACTION_PAN_X : TOUCH_ACTION_PAN_Y;\n } // manipulation\n\n\n if (inStr(actions, TOUCH_ACTION_MANIPULATION)) {\n return TOUCH_ACTION_MANIPULATION;\n }\n\n return TOUCH_ACTION_AUTO;\n}\n\n/**\n * @private\n * Touch Action\n * sets the touchAction property or uses the js alternative\n * @param {Manager} manager\n * @param {String} value\n * @constructor\n */\n\nvar TouchAction =\n/*#__PURE__*/\nfunction () {\n function TouchAction(manager, value) {\n this.manager = manager;\n this.set(value);\n }\n /**\n * @private\n * set the touchAction value on the element or enable the polyfill\n * @param {String} value\n */\n\n\n var _proto = TouchAction.prototype;\n\n _proto.set = function set(value) {\n // find out the touch-action by the event handlers\n if (value === TOUCH_ACTION_COMPUTE) {\n value = this.compute();\n }\n\n if (NATIVE_TOUCH_ACTION && this.manager.element.style && TOUCH_ACTION_MAP[value]) {\n this.manager.element.style[PREFIXED_TOUCH_ACTION] = value;\n }\n\n this.actions = value.toLowerCase().trim();\n };\n /**\n * @private\n * just re-set the touchAction value\n */\n\n\n _proto.update = function update() {\n this.set(this.manager.options.touchAction);\n };\n /**\n * @private\n * compute the value for the touchAction property based on the recognizer's settings\n * @returns {String} value\n */\n\n\n _proto.compute = function compute() {\n var actions = [];\n each(this.manager.recognizers, function (recognizer) {\n if (boolOrFn(recognizer.options.enable, [recognizer])) {\n actions = actions.concat(recognizer.getTouchAction());\n }\n });\n return cleanTouchActions(actions.join(' '));\n };\n /**\n * @private\n * this method is called on each input cycle and provides the preventing of the browser behavior\n * @param {Object} input\n */\n\n\n _proto.preventDefaults = function preventDefaults(input) {\n var srcEvent = input.srcEvent;\n var direction = input.offsetDirection; // if the touch action did prevented once this session\n\n if (this.manager.session.prevented) {\n srcEvent.preventDefault();\n return;\n }\n\n var actions = this.actions;\n var hasNone = inStr(actions, TOUCH_ACTION_NONE) && !TOUCH_ACTION_MAP[TOUCH_ACTION_NONE];\n var hasPanY = inStr(actions, TOUCH_ACTION_PAN_Y) && !TOUCH_ACTION_MAP[TOUCH_ACTION_PAN_Y];\n var hasPanX = inStr(actions, TOUCH_ACTION_PAN_X) && !TOUCH_ACTION_MAP[TOUCH_ACTION_PAN_X];\n\n if (hasNone) {\n // do not prevent defaults if this is a tap gesture\n var isTapPointer = input.pointers.length === 1;\n var isTapMovement = input.distance < 2;\n var isTapTouchTime = input.deltaTime < 250;\n\n if (isTapPointer && isTapMovement && isTapTouchTime) {\n return;\n }\n }\n\n if (hasPanX && hasPanY) {\n // `pan-x pan-y` means browser handles all scrolling/panning, do not prevent\n return;\n }\n\n if (hasNone || hasPanY && direction & DIRECTION_HORIZONTAL || hasPanX && direction & DIRECTION_VERTICAL) {\n return this.preventSrc(srcEvent);\n }\n };\n /**\n * @private\n * call preventDefault to prevent the browser's default behavior (scrolling in most cases)\n * @param {Object} srcEvent\n */\n\n\n _proto.preventSrc = function preventSrc(srcEvent) {\n this.manager.session.prevented = true;\n srcEvent.preventDefault();\n };\n\n return TouchAction;\n}();\n\n/**\n * @private\n * find if a node is in the given parent\n * @method hasParent\n * @param {HTMLElement} node\n * @param {HTMLElement} parent\n * @return {Boolean} found\n */\nfunction hasParent(node, parent) {\n while (node) {\n if (node === parent) {\n return true;\n }\n\n node = node.parentNode;\n }\n\n return false;\n}\n\n/**\n * @private\n * get the center of all the pointers\n * @param {Array} pointers\n * @return {Object} center contains `x` and `y` properties\n */\n\nfunction getCenter(pointers) {\n var pointersLength = pointers.length; // no need to loop when only one touch\n\n if (pointersLength === 1) {\n return {\n x: round(pointers[0].clientX),\n y: round(pointers[0].clientY)\n };\n }\n\n var x = 0;\n var y = 0;\n var i = 0;\n\n while (i < pointersLength) {\n x += pointers[i].clientX;\n y += pointers[i].clientY;\n i++;\n }\n\n return {\n x: round(x / pointersLength),\n y: round(y / pointersLength)\n };\n}\n\n/**\n * @private\n * create a simple clone from the input used for storage of firstInput and firstMultiple\n * @param {Object} input\n * @returns {Object} clonedInputData\n */\n\nfunction simpleCloneInputData(input) {\n // make a simple copy of the pointers because we will get a reference if we don't\n // we only need clientXY for the calculations\n var pointers = [];\n var i = 0;\n\n while (i < input.pointers.length) {\n pointers[i] = {\n clientX: round(input.pointers[i].clientX),\n clientY: round(input.pointers[i].clientY)\n };\n i++;\n }\n\n return {\n timeStamp: now(),\n pointers: pointers,\n center: getCenter(pointers),\n deltaX: input.deltaX,\n deltaY: input.deltaY\n };\n}\n\n/**\n * @private\n * calculate the absolute distance between two points\n * @param {Object} p1 {x, y}\n * @param {Object} p2 {x, y}\n * @param {Array} [props] containing x and y keys\n * @return {Number} distance\n */\n\nfunction getDistance(p1, p2, props) {\n if (!props) {\n props = PROPS_XY;\n }\n\n var x = p2[props[0]] - p1[props[0]];\n var y = p2[props[1]] - p1[props[1]];\n return Math.sqrt(x * x + y * y);\n}\n\n/**\n * @private\n * calculate the angle between two coordinates\n * @param {Object} p1\n * @param {Object} p2\n * @param {Array} [props] containing x and y keys\n * @return {Number} angle\n */\n\nfunction getAngle(p1, p2, props) {\n if (!props) {\n props = PROPS_XY;\n }\n\n var x = p2[props[0]] - p1[props[0]];\n var y = p2[props[1]] - p1[props[1]];\n return Math.atan2(y, x) * 180 / Math.PI;\n}\n\n/**\n * @private\n * get the direction between two points\n * @param {Number} x\n * @param {Number} y\n * @return {Number} direction\n */\n\nfunction getDirection(x, y) {\n if (x === y) {\n return DIRECTION_NONE;\n }\n\n if (abs(x) >= abs(y)) {\n return x < 0 ? DIRECTION_LEFT : DIRECTION_RIGHT;\n }\n\n return y < 0 ? DIRECTION_UP : DIRECTION_DOWN;\n}\n\nfunction computeDeltaXY(session, input) {\n var center = input.center; // let { offsetDelta:offset = {}, prevDelta = {}, prevInput = {} } = session;\n // jscs throwing error on defalut destructured values and without defaults tests fail\n\n var offset = session.offsetDelta || {};\n var prevDelta = session.prevDelta || {};\n var prevInput = session.prevInput || {};\n\n if (input.eventType === INPUT_START || prevInput.eventType === INPUT_END) {\n prevDelta = session.prevDelta = {\n x: prevInput.deltaX || 0,\n y: prevInput.deltaY || 0\n };\n offset = session.offsetDelta = {\n x: center.x,\n y: center.y\n };\n }\n\n input.deltaX = prevDelta.x + (center.x - offset.x);\n input.deltaY = prevDelta.y + (center.y - offset.y);\n}\n\n/**\n * @private\n * calculate the velocity between two points. unit is in px per ms.\n * @param {Number} deltaTime\n * @param {Number} x\n * @param {Number} y\n * @return {Object} velocity `x` and `y`\n */\nfunction getVelocity(deltaTime, x, y) {\n return {\n x: x / deltaTime || 0,\n y: y / deltaTime || 0\n };\n}\n\n/**\n * @private\n * calculate the scale factor between two pointersets\n * no scale is 1, and goes down to 0 when pinched together, and bigger when pinched out\n * @param {Array} start array of pointers\n * @param {Array} end array of pointers\n * @return {Number} scale\n */\n\nfunction getScale(start, end) {\n return getDistance(end[0], end[1], PROPS_CLIENT_XY) / getDistance(start[0], start[1], PROPS_CLIENT_XY);\n}\n\n/**\n * @private\n * calculate the rotation degrees between two pointersets\n * @param {Array} start array of pointers\n * @param {Array} end array of pointers\n * @return {Number} rotation\n */\n\nfunction getRotation(start, end) {\n return getAngle(end[1], end[0], PROPS_CLIENT_XY) + getAngle(start[1], start[0], PROPS_CLIENT_XY);\n}\n\n/**\n * @private\n * velocity is calculated every x ms\n * @param {Object} session\n * @param {Object} input\n */\n\nfunction computeIntervalInputData(session, input) {\n var last = session.lastInterval || input;\n var deltaTime = input.timeStamp - last.timeStamp;\n var velocity;\n var velocityX;\n var velocityY;\n var direction;\n\n if (input.eventType !== INPUT_CANCEL && (deltaTime > COMPUTE_INTERVAL || last.velocity === undefined)) {\n var deltaX = input.deltaX - last.deltaX;\n var deltaY = input.deltaY - last.deltaY;\n var v = getVelocity(deltaTime, deltaX, deltaY);\n velocityX = v.x;\n velocityY = v.y;\n velocity = abs(v.x) > abs(v.y) ? v.x : v.y;\n direction = getDirection(deltaX, deltaY);\n session.lastInterval = input;\n } else {\n // use latest velocity info if it doesn't overtake a minimum period\n velocity = last.velocity;\n velocityX = last.velocityX;\n velocityY = last.velocityY;\n direction = last.direction;\n }\n\n input.velocity = velocity;\n input.velocityX = velocityX;\n input.velocityY = velocityY;\n input.direction = direction;\n}\n\n/**\n* @private\n * extend the data with some usable properties like scale, rotate, velocity etc\n * @param {Object} manager\n * @param {Object} input\n */\n\nfunction computeInputData(manager, input) {\n var session = manager.session;\n var pointers = input.pointers;\n var pointersLength = pointers.length; // store the first input to calculate the distance and direction\n\n if (!session.firstInput) {\n session.firstInput = simpleCloneInputData(input);\n } // to compute scale and rotation we need to store the multiple touches\n\n\n if (pointersLength > 1 && !session.firstMultiple) {\n session.firstMultiple = simpleCloneInputData(input);\n } else if (pointersLength === 1) {\n session.firstMultiple = false;\n }\n\n var firstInput = session.firstInput,\n firstMultiple = session.firstMultiple;\n var offsetCenter = firstMultiple ? firstMultiple.center : firstInput.center;\n var center = input.center = getCenter(pointers);\n input.timeStamp = now();\n input.deltaTime = input.timeStamp - firstInput.timeStamp;\n input.angle = getAngle(offsetCenter, center);\n input.distance = getDistance(offsetCenter, center);\n computeDeltaXY(session, input);\n input.offsetDirection = getDirection(input.deltaX, input.deltaY);\n var overallVelocity = getVelocity(input.deltaTime, input.deltaX, input.deltaY);\n input.overallVelocityX = overallVelocity.x;\n input.overallVelocityY = overallVelocity.y;\n input.overallVelocity = abs(overallVelocity.x) > abs(overallVelocity.y) ? overallVelocity.x : overallVelocity.y;\n input.scale = firstMultiple ? getScale(firstMultiple.pointers, pointers) : 1;\n input.rotation = firstMultiple ? getRotation(firstMultiple.pointers, pointers) : 0;\n input.maxPointers = !session.prevInput ? input.pointers.length : input.pointers.length > session.prevInput.maxPointers ? input.pointers.length : session.prevInput.maxPointers;\n computeIntervalInputData(session, input); // find the correct target\n\n var target = manager.element;\n\n if (hasParent(input.srcEvent.target, target)) {\n target = input.srcEvent.target;\n }\n\n input.target = target;\n}\n\n/**\n * @private\n * handle input events\n * @param {Manager} manager\n * @param {String} eventType\n * @param {Object} input\n */\n\nfunction inputHandler(manager, eventType, input) {\n var pointersLen = input.pointers.length;\n var changedPointersLen = input.changedPointers.length;\n var isFirst = eventType & INPUT_START && pointersLen - changedPointersLen === 0;\n var isFinal = eventType & (INPUT_END | INPUT_CANCEL) && pointersLen - changedPointersLen === 0;\n input.isFirst = !!isFirst;\n input.isFinal = !!isFinal;\n\n if (isFirst) {\n manager.session = {};\n } // source event is the normalized value of the domEvents\n // like 'touchstart, mouseup, pointerdown'\n\n\n input.eventType = eventType; // compute scale, rotation etc\n\n computeInputData(manager, input); // emit secret event\n\n manager.emit('hammer.input', input);\n manager.recognize(input);\n manager.session.prevInput = input;\n}\n\n/**\n * @private\n * split string on whitespace\n * @param {String} str\n * @returns {Array} words\n */\nfunction splitStr(str) {\n return str.trim().split(/\\s+/g);\n}\n\n/**\n * @private\n * addEventListener with multiple events at once\n * @param {EventTarget} target\n * @param {String} types\n * @param {Function} handler\n */\n\nfunction addEventListeners(target, types, handler) {\n each(splitStr(types), function (type) {\n target.addEventListener(type, handler, false);\n });\n}\n\n/**\n * @private\n * removeEventListener with multiple events at once\n * @param {EventTarget} target\n * @param {String} types\n * @param {Function} handler\n */\n\nfunction removeEventListeners(target, types, handler) {\n each(splitStr(types), function (type) {\n target.removeEventListener(type, handler, false);\n });\n}\n\n/**\n * @private\n * get the window object of an element\n * @param {HTMLElement} element\n * @returns {DocumentView|Window}\n */\nfunction getWindowForElement(element) {\n var doc = element.ownerDocument || element;\n return doc.defaultView || doc.parentWindow || window;\n}\n\n/**\n * @private\n * create new input type manager\n * @param {Manager} manager\n * @param {Function} callback\n * @returns {Input}\n * @constructor\n */\n\nvar Input =\n/*#__PURE__*/\nfunction () {\n function Input(manager, callback) {\n var self = this;\n this.manager = manager;\n this.callback = callback;\n this.element = manager.element;\n this.target = manager.options.inputTarget; // smaller wrapper around the handler, for the scope and the enabled state of the manager,\n // so when disabled the input events are completely bypassed.\n\n this.domHandler = function (ev) {\n if (boolOrFn(manager.options.enable, [manager])) {\n self.handler(ev);\n }\n };\n\n this.init();\n }\n /**\n * @private\n * should handle the inputEvent data and trigger the callback\n * @virtual\n */\n\n\n var _proto = Input.prototype;\n\n _proto.handler = function handler() {};\n /**\n * @private\n * bind the events\n */\n\n\n _proto.init = function init() {\n this.evEl && addEventListeners(this.element, this.evEl, this.domHandler);\n this.evTarget && addEventListeners(this.target, this.evTarget, this.domHandler);\n this.evWin && addEventListeners(getWindowForElement(this.element), this.evWin, this.domHandler);\n };\n /**\n * @private\n * unbind the events\n */\n\n\n _proto.destroy = function destroy() {\n this.evEl && removeEventListeners(this.element, this.evEl, this.domHandler);\n this.evTarget && removeEventListeners(this.target, this.evTarget, this.domHandler);\n this.evWin && removeEventListeners(getWindowForElement(this.element), this.evWin, this.domHandler);\n };\n\n return Input;\n}();\n\n/**\n * @private\n * find if a array contains the object using indexOf or a simple polyFill\n * @param {Array} src\n * @param {String} find\n * @param {String} [findByKey]\n * @return {Boolean|Number} false when not found, or the index\n */\nfunction inArray(src, find, findByKey) {\n if (src.indexOf && !findByKey) {\n return src.indexOf(find);\n } else {\n var i = 0;\n\n while (i < src.length) {\n if (findByKey && src[i][findByKey] == find || !findByKey && src[i] === find) {\n // do not use === here, test fails\n return i;\n }\n\n i++;\n }\n\n return -1;\n }\n}\n\nvar POINTER_INPUT_MAP = {\n pointerdown: INPUT_START,\n pointermove: INPUT_MOVE,\n pointerup: INPUT_END,\n pointercancel: INPUT_CANCEL,\n pointerout: INPUT_CANCEL\n}; // in IE10 the pointer types is defined as an enum\n\nvar IE10_POINTER_TYPE_ENUM = {\n 2: INPUT_TYPE_TOUCH,\n 3: INPUT_TYPE_PEN,\n 4: INPUT_TYPE_MOUSE,\n 5: INPUT_TYPE_KINECT // see https://twitter.com/jacobrossi/status/480596438489890816\n\n};\nvar POINTER_ELEMENT_EVENTS = 'pointerdown';\nvar POINTER_WINDOW_EVENTS = 'pointermove pointerup pointercancel'; // IE10 has prefixed support, and case-sensitive\n\nif (win.MSPointerEvent && !win.PointerEvent) {\n POINTER_ELEMENT_EVENTS = 'MSPointerDown';\n POINTER_WINDOW_EVENTS = 'MSPointerMove MSPointerUp MSPointerCancel';\n}\n/**\n * @private\n * Pointer events input\n * @constructor\n * @extends Input\n */\n\n\nvar PointerEventInput =\n/*#__PURE__*/\nfunction (_Input) {\n _inheritsLoose(PointerEventInput, _Input);\n\n function PointerEventInput() {\n var _this;\n\n var proto = PointerEventInput.prototype;\n proto.evEl = POINTER_ELEMENT_EVENTS;\n proto.evWin = POINTER_WINDOW_EVENTS;\n _this = _Input.apply(this, arguments) || this;\n _this.store = _this.manager.session.pointerEvents = [];\n return _this;\n }\n /**\n * @private\n * handle mouse events\n * @param {Object} ev\n */\n\n\n var _proto = PointerEventInput.prototype;\n\n _proto.handler = function handler(ev) {\n var store = this.store;\n var removePointer = false;\n var eventTypeNormalized = ev.type.toLowerCase().replace('ms', '');\n var eventType = POINTER_INPUT_MAP[eventTypeNormalized];\n var pointerType = IE10_POINTER_TYPE_ENUM[ev.pointerType] || ev.pointerType;\n var isTouch = pointerType === INPUT_TYPE_TOUCH; // get index of the event in the store\n\n var storeIndex = inArray(store, ev.pointerId, 'pointerId'); // start and mouse must be down\n\n if (eventType & INPUT_START && (ev.button === 0 || isTouch)) {\n if (storeIndex < 0) {\n store.push(ev);\n storeIndex = store.length - 1;\n }\n } else if (eventType & (INPUT_END | INPUT_CANCEL)) {\n removePointer = true;\n } // it not found, so the pointer hasn't been down (so it's probably a hover)\n\n\n if (storeIndex < 0) {\n return;\n } // update the event in the store\n\n\n store[storeIndex] = ev;\n this.callback(this.manager, eventType, {\n pointers: store,\n changedPointers: [ev],\n pointerType: pointerType,\n srcEvent: ev\n });\n\n if (removePointer) {\n // remove from the store\n store.splice(storeIndex, 1);\n }\n };\n\n return PointerEventInput;\n}(Input);\n\n/**\n * @private\n * convert array-like objects to real arrays\n * @param {Object} obj\n * @returns {Array}\n */\nfunction toArray(obj) {\n return Array.prototype.slice.call(obj, 0);\n}\n\n/**\n * @private\n * unique array with objects based on a key (like 'id') or just by the array's value\n * @param {Array} src [{id:1},{id:2},{id:1}]\n * @param {String} [key]\n * @param {Boolean} [sort=False]\n * @returns {Array} [{id:1},{id:2}]\n */\n\nfunction uniqueArray(src, key, sort) {\n var results = [];\n var values = [];\n var i = 0;\n\n while (i < src.length) {\n var val = key ? src[i][key] : src[i];\n\n if (inArray(values, val) < 0) {\n results.push(src[i]);\n }\n\n values[i] = val;\n i++;\n }\n\n if (sort) {\n if (!key) {\n results = results.sort();\n } else {\n results = results.sort(function (a, b) {\n return a[key] > b[key];\n });\n }\n }\n\n return results;\n}\n\nvar TOUCH_INPUT_MAP = {\n touchstart: INPUT_START,\n touchmove: INPUT_MOVE,\n touchend: INPUT_END,\n touchcancel: INPUT_CANCEL\n};\nvar TOUCH_TARGET_EVENTS = 'touchstart touchmove touchend touchcancel';\n/**\n * @private\n * Multi-user touch events input\n * @constructor\n * @extends Input\n */\n\nvar TouchInput =\n/*#__PURE__*/\nfunction (_Input) {\n _inheritsLoose(TouchInput, _Input);\n\n function TouchInput() {\n var _this;\n\n TouchInput.prototype.evTarget = TOUCH_TARGET_EVENTS;\n _this = _Input.apply(this, arguments) || this;\n _this.targetIds = {}; // this.evTarget = TOUCH_TARGET_EVENTS;\n\n return _this;\n }\n\n var _proto = TouchInput.prototype;\n\n _proto.handler = function handler(ev) {\n var type = TOUCH_INPUT_MAP[ev.type];\n var touches = getTouches.call(this, ev, type);\n\n if (!touches) {\n return;\n }\n\n this.callback(this.manager, type, {\n pointers: touches[0],\n changedPointers: touches[1],\n pointerType: INPUT_TYPE_TOUCH,\n srcEvent: ev\n });\n };\n\n return TouchInput;\n}(Input);\n\nfunction getTouches(ev, type) {\n var allTouches = toArray(ev.touches);\n var targetIds = this.targetIds; // when there is only one touch, the process can be simplified\n\n if (type & (INPUT_START | INPUT_MOVE) && allTouches.length === 1) {\n targetIds[allTouches[0].identifier] = true;\n return [allTouches, allTouches];\n }\n\n var i;\n var targetTouches;\n var changedTouches = toArray(ev.changedTouches);\n var changedTargetTouches = [];\n var target = this.target; // get target touches from touches\n\n targetTouches = allTouches.filter(function (touch) {\n return hasParent(touch.target, target);\n }); // collect touches\n\n if (type === INPUT_START) {\n i = 0;\n\n while (i < targetTouches.length) {\n targetIds[targetTouches[i].identifier] = true;\n i++;\n }\n } // filter changed touches to only contain touches that exist in the collected target ids\n\n\n i = 0;\n\n while (i < changedTouches.length) {\n if (targetIds[changedTouches[i].identifier]) {\n changedTargetTouches.push(changedTouches[i]);\n } // cleanup removed touches\n\n\n if (type & (INPUT_END | INPUT_CANCEL)) {\n delete targetIds[changedTouches[i].identifier];\n }\n\n i++;\n }\n\n if (!changedTargetTouches.length) {\n return;\n }\n\n return [// merge targetTouches with changedTargetTouches so it contains ALL touches, including 'end' and 'cancel'\n uniqueArray(targetTouches.concat(changedTargetTouches), 'identifier', true), changedTargetTouches];\n}\n\nvar MOUSE_INPUT_MAP = {\n mousedown: INPUT_START,\n mousemove: INPUT_MOVE,\n mouseup: INPUT_END\n};\nvar MOUSE_ELEMENT_EVENTS = 'mousedown';\nvar MOUSE_WINDOW_EVENTS = 'mousemove mouseup';\n/**\n * @private\n * Mouse events input\n * @constructor\n * @extends Input\n */\n\nvar MouseInput =\n/*#__PURE__*/\nfunction (_Input) {\n _inheritsLoose(MouseInput, _Input);\n\n function MouseInput() {\n var _this;\n\n var proto = MouseInput.prototype;\n proto.evEl = MOUSE_ELEMENT_EVENTS;\n proto.evWin = MOUSE_WINDOW_EVENTS;\n _this = _Input.apply(this, arguments) || this;\n _this.pressed = false; // mousedown state\n\n return _this;\n }\n /**\n * @private\n * handle mouse events\n * @param {Object} ev\n */\n\n\n var _proto = MouseInput.prototype;\n\n _proto.handler = function handler(ev) {\n var eventType = MOUSE_INPUT_MAP[ev.type]; // on start we want to have the left mouse button down\n\n if (eventType & INPUT_START && ev.button === 0) {\n this.pressed = true;\n }\n\n if (eventType & INPUT_MOVE && ev.which !== 1) {\n eventType = INPUT_END;\n } // mouse must be down\n\n\n if (!this.pressed) {\n return;\n }\n\n if (eventType & INPUT_END) {\n this.pressed = false;\n }\n\n this.callback(this.manager, eventType, {\n pointers: [ev],\n changedPointers: [ev],\n pointerType: INPUT_TYPE_MOUSE,\n srcEvent: ev\n });\n };\n\n return MouseInput;\n}(Input);\n\n/**\n * @private\n * Combined touch and mouse input\n *\n * Touch has a higher priority then mouse, and while touching no mouse events are allowed.\n * This because touch devices also emit mouse events while doing a touch.\n *\n * @constructor\n * @extends Input\n */\n\nvar DEDUP_TIMEOUT = 2500;\nvar DEDUP_DISTANCE = 25;\n\nfunction setLastTouch(eventData) {\n var _eventData$changedPoi = eventData.changedPointers,\n touch = _eventData$changedPoi[0];\n\n if (touch.identifier === this.primaryTouch) {\n var lastTouch = {\n x: touch.clientX,\n y: touch.clientY\n };\n var lts = this.lastTouches;\n this.lastTouches.push(lastTouch);\n\n var removeLastTouch = function removeLastTouch() {\n var i = lts.indexOf(lastTouch);\n\n if (i > -1) {\n lts.splice(i, 1);\n }\n };\n\n setTimeout(removeLastTouch, DEDUP_TIMEOUT);\n }\n}\n\nfunction recordTouches(eventType, eventData) {\n if (eventType & INPUT_START) {\n this.primaryTouch = eventData.changedPointers[0].identifier;\n setLastTouch.call(this, eventData);\n } else if (eventType & (INPUT_END | INPUT_CANCEL)) {\n setLastTouch.call(this, eventData);\n }\n}\n\nfunction isSyntheticEvent(eventData) {\n var x = eventData.srcEvent.clientX;\n var y = eventData.srcEvent.clientY;\n\n for (var i = 0; i < this.lastTouches.length; i++) {\n var t = this.lastTouches[i];\n var dx = Math.abs(x - t.x);\n var dy = Math.abs(y - t.y);\n\n if (dx <= DEDUP_DISTANCE && dy <= DEDUP_DISTANCE) {\n return true;\n }\n }\n\n return false;\n}\n\nvar TouchMouseInput =\n/*#__PURE__*/\nfunction () {\n var TouchMouseInput =\n /*#__PURE__*/\n function (_Input) {\n _inheritsLoose(TouchMouseInput, _Input);\n\n function TouchMouseInput(_manager, callback) {\n var _this;\n\n _this = _Input.call(this, _manager, callback) || this;\n\n _this.handler = function (manager, inputEvent, inputData) {\n var isTouch = inputData.pointerType === INPUT_TYPE_TOUCH;\n var isMouse = inputData.pointerType === INPUT_TYPE_MOUSE;\n\n if (isMouse && inputData.sourceCapabilities && inputData.sourceCapabilities.firesTouchEvents) {\n return;\n } // when we're in a touch event, record touches to de-dupe synthetic mouse event\n\n\n if (isTouch) {\n recordTouches.call(_assertThisInitialized(_assertThisInitialized(_this)), inputEvent, inputData);\n } else if (isMouse && isSyntheticEvent.call(_assertThisInitialized(_assertThisInitialized(_this)), inputData)) {\n return;\n }\n\n _this.callback(manager, inputEvent, inputData);\n };\n\n _this.touch = new TouchInput(_this.manager, _this.handler);\n _this.mouse = new MouseInput(_this.manager, _this.handler);\n _this.primaryTouch = null;\n _this.lastTouches = [];\n return _this;\n }\n /**\n * @private\n * handle mouse and touch events\n * @param {Hammer} manager\n * @param {String} inputEvent\n * @param {Object} inputData\n */\n\n\n var _proto = TouchMouseInput.prototype;\n\n /**\n * @private\n * remove the event listeners\n */\n _proto.destroy = function destroy() {\n this.touch.destroy();\n this.mouse.destroy();\n };\n\n return TouchMouseInput;\n }(Input);\n\n return TouchMouseInput;\n}();\n\n/**\n * @private\n * create new input type manager\n * called by the Manager constructor\n * @param {Hammer} manager\n * @returns {Input}\n */\n\nfunction createInputInstance(manager) {\n var Type; // let inputClass = manager.options.inputClass;\n\n var inputClass = manager.options.inputClass;\n\n if (inputClass) {\n Type = inputClass;\n } else if (SUPPORT_POINTER_EVENTS) {\n Type = PointerEventInput;\n } else if (SUPPORT_ONLY_TOUCH) {\n Type = TouchInput;\n } else if (!SUPPORT_TOUCH) {\n Type = MouseInput;\n } else {\n Type = TouchMouseInput;\n }\n\n return new Type(manager, inputHandler);\n}\n\n/**\n * @private\n * if the argument is an array, we want to execute the fn on each entry\n * if it aint an array we don't want to do a thing.\n * this is used by all the methods that accept a single and array argument.\n * @param {*|Array} arg\n * @param {String} fn\n * @param {Object} [context]\n * @returns {Boolean}\n */\n\nfunction invokeArrayArg(arg, fn, context) {\n if (Array.isArray(arg)) {\n each(arg, context[fn], context);\n return true;\n }\n\n return false;\n}\n\nvar STATE_POSSIBLE = 1;\nvar STATE_BEGAN = 2;\nvar STATE_CHANGED = 4;\nvar STATE_ENDED = 8;\nvar STATE_RECOGNIZED = STATE_ENDED;\nvar STATE_CANCELLED = 16;\nvar STATE_FAILED = 32;\n\n/**\n * @private\n * get a unique id\n * @returns {number} uniqueId\n */\nvar _uniqueId = 1;\nfunction uniqueId() {\n return _uniqueId++;\n}\n\n/**\n * @private\n * get a recognizer by name if it is bound to a manager\n * @param {Recognizer|String} otherRecognizer\n * @param {Recognizer} recognizer\n * @returns {Recognizer}\n */\nfunction getRecognizerByNameIfManager(otherRecognizer, recognizer) {\n var manager = recognizer.manager;\n\n if (manager) {\n return manager.get(otherRecognizer);\n }\n\n return otherRecognizer;\n}\n\n/**\n * @private\n * get a usable string, used as event postfix\n * @param {constant} state\n * @returns {String} state\n */\n\nfunction stateStr(state) {\n if (state & STATE_CANCELLED) {\n return 'cancel';\n } else if (state & STATE_ENDED) {\n return 'end';\n } else if (state & STATE_CHANGED) {\n return 'move';\n } else if (state & STATE_BEGAN) {\n return 'start';\n }\n\n return '';\n}\n\n/**\n * @private\n * Recognizer flow explained; *\n * All recognizers have the initial state of POSSIBLE when a input session starts.\n * The definition of a input session is from the first input until the last input, with all it's movement in it. *\n * Example session for mouse-input: mousedown -> mousemove -> mouseup\n *\n * On each recognizing cycle (see Manager.recognize) the .recognize() method is executed\n * which determines with state it should be.\n *\n * If the recognizer has the state FAILED, CANCELLED or RECOGNIZED (equals ENDED), it is reset to\n * POSSIBLE to give it another change on the next cycle.\n *\n * Possible\n * |\n * +-----+---------------+\n * | |\n * +-----+-----+ |\n * | | |\n * Failed Cancelled |\n * +-------+------+\n * | |\n * Recognized Began\n * |\n * Changed\n * |\n * Ended/Recognized\n */\n\n/**\n * @private\n * Recognizer\n * Every recognizer needs to extend from this class.\n * @constructor\n * @param {Object} options\n */\n\nvar Recognizer =\n/*#__PURE__*/\nfunction () {\n function Recognizer(options) {\n if (options === void 0) {\n options = {};\n }\n\n this.options = _extends({\n enable: true\n }, options);\n this.id = uniqueId();\n this.manager = null; // default is enable true\n\n this.state = STATE_POSSIBLE;\n this.simultaneous = {};\n this.requireFail = [];\n }\n /**\n * @private\n * set options\n * @param {Object} options\n * @return {Recognizer}\n */\n\n\n var _proto = Recognizer.prototype;\n\n _proto.set = function set(options) {\n assign$1(this.options, options); // also update the touchAction, in case something changed about the directions/enabled state\n\n this.manager && this.manager.touchAction.update();\n return this;\n };\n /**\n * @private\n * recognize simultaneous with an other recognizer.\n * @param {Recognizer} otherRecognizer\n * @returns {Recognizer} this\n */\n\n\n _proto.recognizeWith = function recognizeWith(otherRecognizer) {\n if (invokeArrayArg(otherRecognizer, 'recognizeWith', this)) {\n return this;\n }\n\n var simultaneous = this.simultaneous;\n otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this);\n\n if (!simultaneous[otherRecognizer.id]) {\n simultaneous[otherRecognizer.id] = otherRecognizer;\n otherRecognizer.recognizeWith(this);\n }\n\n return this;\n };\n /**\n * @private\n * drop the simultaneous link. it doesnt remove the link on the other recognizer.\n * @param {Recognizer} otherRecognizer\n * @returns {Recognizer} this\n */\n\n\n _proto.dropRecognizeWith = function dropRecognizeWith(otherRecognizer) {\n if (invokeArrayArg(otherRecognizer, 'dropRecognizeWith', this)) {\n return this;\n }\n\n otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this);\n delete this.simultaneous[otherRecognizer.id];\n return this;\n };\n /**\n * @private\n * recognizer can only run when an other is failing\n * @param {Recognizer} otherRecognizer\n * @returns {Recognizer} this\n */\n\n\n _proto.requireFailure = function requireFailure(otherRecognizer) {\n if (invokeArrayArg(otherRecognizer, 'requireFailure', this)) {\n return this;\n }\n\n var requireFail = this.requireFail;\n otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this);\n\n if (inArray(requireFail, otherRecognizer) === -1) {\n requireFail.push(otherRecognizer);\n otherRecognizer.requireFailure(this);\n }\n\n return this;\n };\n /**\n * @private\n * drop the requireFailure link. it does not remove the link on the other recognizer.\n * @param {Recognizer} otherRecognizer\n * @returns {Recognizer} this\n */\n\n\n _proto.dropRequireFailure = function dropRequireFailure(otherRecognizer) {\n if (invokeArrayArg(otherRecognizer, 'dropRequireFailure', this)) {\n return this;\n }\n\n otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this);\n var index = inArray(this.requireFail, otherRecognizer);\n\n if (index > -1) {\n this.requireFail.splice(index, 1);\n }\n\n return this;\n };\n /**\n * @private\n * has require failures boolean\n * @returns {boolean}\n */\n\n\n _proto.hasRequireFailures = function hasRequireFailures() {\n return this.requireFail.length > 0;\n };\n /**\n * @private\n * if the recognizer can recognize simultaneous with an other recognizer\n * @param {Recognizer} otherRecognizer\n * @returns {Boolean}\n */\n\n\n _proto.canRecognizeWith = function canRecognizeWith(otherRecognizer) {\n return !!this.simultaneous[otherRecognizer.id];\n };\n /**\n * @private\n * You should use `tryEmit` instead of `emit` directly to check\n * that all the needed recognizers has failed before emitting.\n * @param {Object} input\n */\n\n\n _proto.emit = function emit(input) {\n var self = this;\n var state = this.state;\n\n function emit(event) {\n self.manager.emit(event, input);\n } // 'panstart' and 'panmove'\n\n\n if (state < STATE_ENDED) {\n emit(self.options.event + stateStr(state));\n }\n\n emit(self.options.event); // simple 'eventName' events\n\n if (input.additionalEvent) {\n // additional event(panleft, panright, pinchin, pinchout...)\n emit(input.additionalEvent);\n } // panend and pancancel\n\n\n if (state >= STATE_ENDED) {\n emit(self.options.event + stateStr(state));\n }\n };\n /**\n * @private\n * Check that all the require failure recognizers has failed,\n * if true, it emits a gesture event,\n * otherwise, setup the state to FAILED.\n * @param {Object} input\n */\n\n\n _proto.tryEmit = function tryEmit(input) {\n if (this.canEmit()) {\n return this.emit(input);\n } // it's failing anyway\n\n\n this.state = STATE_FAILED;\n };\n /**\n * @private\n * can we emit?\n * @returns {boolean}\n */\n\n\n _proto.canEmit = function canEmit() {\n var i = 0;\n\n while (i < this.requireFail.length) {\n if (!(this.requireFail[i].state & (STATE_FAILED | STATE_POSSIBLE))) {\n return false;\n }\n\n i++;\n }\n\n return true;\n };\n /**\n * @private\n * update the recognizer\n * @param {Object} inputData\n */\n\n\n _proto.recognize = function recognize(inputData) {\n // make a new copy of the inputData\n // so we can change the inputData without messing up the other recognizers\n var inputDataClone = assign$1({}, inputData); // is is enabled and allow recognizing?\n\n if (!boolOrFn(this.options.enable, [this, inputDataClone])) {\n this.reset();\n this.state = STATE_FAILED;\n return;\n } // reset when we've reached the end\n\n\n if (this.state & (STATE_RECOGNIZED | STATE_CANCELLED | STATE_FAILED)) {\n this.state = STATE_POSSIBLE;\n }\n\n this.state = this.process(inputDataClone); // the recognizer has recognized a gesture\n // so trigger an event\n\n if (this.state & (STATE_BEGAN | STATE_CHANGED | STATE_ENDED | STATE_CANCELLED)) {\n this.tryEmit(inputDataClone);\n }\n };\n /**\n * @private\n * return the state of the recognizer\n * the actual recognizing happens in this method\n * @virtual\n * @param {Object} inputData\n * @returns {constant} STATE\n */\n\n /* jshint ignore:start */\n\n\n _proto.process = function process(inputData) {};\n /* jshint ignore:end */\n\n /**\n * @private\n * return the preferred touch-action\n * @virtual\n * @returns {Array}\n */\n\n\n _proto.getTouchAction = function getTouchAction() {};\n /**\n * @private\n * called when the gesture isn't allowed to recognize\n * like when another is being recognized or it is disabled\n * @virtual\n */\n\n\n _proto.reset = function reset() {};\n\n return Recognizer;\n}();\n\nvar defaults = {\n /**\n * @private\n * set if DOM events are being triggered.\n * But this is slower and unused by simple implementations, so disabled by default.\n * @type {Boolean}\n * @default false\n */\n domEvents: false,\n\n /**\n * @private\n * The value for the touchAction property/fallback.\n * When set to `compute` it will magically set the correct value based on the added recognizers.\n * @type {String}\n * @default compute\n */\n touchAction: TOUCH_ACTION_COMPUTE,\n\n /**\n * @private\n * @type {Boolean}\n * @default true\n */\n enable: true,\n\n /**\n * @private\n * EXPERIMENTAL FEATURE -- can be removed/changed\n * Change the parent input target element.\n * If Null, then it is being set the to main element.\n * @type {Null|EventTarget}\n * @default null\n */\n inputTarget: null,\n\n /**\n * @private\n * force an input class\n * @type {Null|Function}\n * @default null\n */\n inputClass: null,\n\n /**\n * @private\n * Default recognizer setup when calling `Hammer()`\n * When creating a new Manager these will be skipped.\n * @type {Array}\n */\n preset: [],\n\n /**\n * @private\n * Some CSS properties can be used to improve the working of Hammer.\n * Add them to this method and they will be set when creating a new Manager.\n * @namespace\n */\n cssProps: {\n /**\n * @private\n * Disables text selection to improve the dragging gesture. Mainly for desktop browsers.\n * @type {String}\n * @default 'none'\n */\n userSelect: \"none\",\n\n /**\n * @private\n * Disable the Windows Phone grippers when pressing an element.\n * @type {String}\n * @default 'none'\n */\n touchSelect: \"none\",\n\n /**\n * @private\n * Disables the default callout shown when you touch and hold a touch target.\n * On iOS, when you touch and hold a touch target such as a link, Safari displays\n * a callout containing information about the link. This property allows you to disable that callout.\n * @type {String}\n * @default 'none'\n */\n touchCallout: \"none\",\n\n /**\n * @private\n * Specifies whether zooming is enabled. Used by IE10>\n * @type {String}\n * @default 'none'\n */\n contentZooming: \"none\",\n\n /**\n * @private\n * Specifies that an entire element should be draggable instead of its contents. Mainly for desktop browsers.\n * @type {String}\n * @default 'none'\n */\n userDrag: \"none\",\n\n /**\n * @private\n * Overrides the highlight color shown when the user taps a link or a JavaScript\n * clickable element in iOS. This property obeys the alpha value, if specified.\n * @type {String}\n * @default 'rgba(0,0,0,0)'\n */\n tapHighlightColor: \"rgba(0,0,0,0)\"\n }\n};\n\nvar STOP = 1;\nvar FORCED_STOP = 2;\n/**\n * @private\n * add/remove the css properties as defined in manager.options.cssProps\n * @param {Manager} manager\n * @param {Boolean} add\n */\n\nfunction toggleCssProps(manager, add) {\n var element = manager.element;\n\n if (!element.style) {\n return;\n }\n\n var prop;\n each(manager.options.cssProps, function (value, name) {\n prop = prefixed(element.style, name);\n\n if (add) {\n manager.oldCssProps[prop] = element.style[prop];\n element.style[prop] = value;\n } else {\n element.style[prop] = manager.oldCssProps[prop] || \"\";\n }\n });\n\n if (!add) {\n manager.oldCssProps = {};\n }\n}\n/**\n * @private\n * trigger dom event\n * @param {String} event\n * @param {Object} data\n */\n\n\nfunction triggerDomEvent(event, data) {\n var gestureEvent = document.createEvent(\"Event\");\n gestureEvent.initEvent(event, true, true);\n gestureEvent.gesture = data;\n data.target.dispatchEvent(gestureEvent);\n}\n/**\n* @private\n * Manager\n * @param {HTMLElement} element\n * @param {Object} [options]\n * @constructor\n */\n\n\nvar Manager =\n/*#__PURE__*/\nfunction () {\n function Manager(element, options) {\n var _this = this;\n\n this.options = assign$1({}, defaults, options || {});\n this.options.inputTarget = this.options.inputTarget || element;\n this.handlers = {};\n this.session = {};\n this.recognizers = [];\n this.oldCssProps = {};\n this.element = element;\n this.input = createInputInstance(this);\n this.touchAction = new TouchAction(this, this.options.touchAction);\n toggleCssProps(this, true);\n each(this.options.recognizers, function (item) {\n var recognizer = _this.add(new item[0](item[1]));\n\n item[2] && recognizer.recognizeWith(item[2]);\n item[3] && recognizer.requireFailure(item[3]);\n }, this);\n }\n /**\n * @private\n * set options\n * @param {Object} options\n * @returns {Manager}\n */\n\n\n var _proto = Manager.prototype;\n\n _proto.set = function set(options) {\n assign$1(this.options, options); // Options that need a little more setup\n\n if (options.touchAction) {\n this.touchAction.update();\n }\n\n if (options.inputTarget) {\n // Clean up existing event listeners and reinitialize\n this.input.destroy();\n this.input.target = options.inputTarget;\n this.input.init();\n }\n\n return this;\n };\n /**\n * @private\n * stop recognizing for this session.\n * This session will be discarded, when a new [input]start event is fired.\n * When forced, the recognizer cycle is stopped immediately.\n * @param {Boolean} [force]\n */\n\n\n _proto.stop = function stop(force) {\n this.session.stopped = force ? FORCED_STOP : STOP;\n };\n /**\n * @private\n * run the recognizers!\n * called by the inputHandler function on every movement of the pointers (touches)\n * it walks through all the recognizers and tries to detect the gesture that is being made\n * @param {Object} inputData\n */\n\n\n _proto.recognize = function recognize(inputData) {\n var session = this.session;\n\n if (session.stopped) {\n return;\n } // run the touch-action polyfill\n\n\n this.touchAction.preventDefaults(inputData);\n var recognizer;\n var recognizers = this.recognizers; // this holds the recognizer that is being recognized.\n // so the recognizer's state needs to be BEGAN, CHANGED, ENDED or RECOGNIZED\n // if no recognizer is detecting a thing, it is set to `null`\n\n var curRecognizer = session.curRecognizer; // reset when the last recognizer is recognized\n // or when we're in a new session\n\n if (!curRecognizer || curRecognizer && curRecognizer.state & STATE_RECOGNIZED) {\n session.curRecognizer = null;\n curRecognizer = null;\n }\n\n var i = 0;\n\n while (i < recognizers.length) {\n recognizer = recognizers[i]; // find out if we are allowed try to recognize the input for this one.\n // 1. allow if the session is NOT forced stopped (see the .stop() method)\n // 2. allow if we still haven't recognized a gesture in this session, or the this recognizer is the one\n // that is being recognized.\n // 3. allow if the recognizer is allowed to run simultaneous with the current recognized recognizer.\n // this can be setup with the `recognizeWith()` method on the recognizer.\n\n if (session.stopped !== FORCED_STOP && ( // 1\n !curRecognizer || recognizer === curRecognizer || // 2\n recognizer.canRecognizeWith(curRecognizer))) {\n // 3\n recognizer.recognize(inputData);\n } else {\n recognizer.reset();\n } // if the recognizer has been recognizing the input as a valid gesture, we want to store this one as the\n // current active recognizer. but only if we don't already have an active recognizer\n\n\n if (!curRecognizer && recognizer.state & (STATE_BEGAN | STATE_CHANGED | STATE_ENDED)) {\n session.curRecognizer = recognizer;\n curRecognizer = recognizer;\n }\n\n i++;\n }\n };\n /**\n * @private\n * get a recognizer by its event name.\n * @param {Recognizer|String} recognizer\n * @returns {Recognizer|Null}\n */\n\n\n _proto.get = function get(recognizer) {\n if (recognizer instanceof Recognizer) {\n return recognizer;\n }\n\n var recognizers = this.recognizers;\n\n for (var i = 0; i < recognizers.length; i++) {\n if (recognizers[i].options.event === recognizer) {\n return recognizers[i];\n }\n }\n\n return null;\n };\n /**\n * @private add a recognizer to the manager\n * existing recognizers with the same event name will be removed\n * @param {Recognizer} recognizer\n * @returns {Recognizer|Manager}\n */\n\n\n _proto.add = function add(recognizer) {\n if (invokeArrayArg(recognizer, \"add\", this)) {\n return this;\n } // remove existing\n\n\n var existing = this.get(recognizer.options.event);\n\n if (existing) {\n this.remove(existing);\n }\n\n this.recognizers.push(recognizer);\n recognizer.manager = this;\n this.touchAction.update();\n return recognizer;\n };\n /**\n * @private\n * remove a recognizer by name or instance\n * @param {Recognizer|String} recognizer\n * @returns {Manager}\n */\n\n\n _proto.remove = function remove(recognizer) {\n if (invokeArrayArg(recognizer, \"remove\", this)) {\n return this;\n }\n\n var targetRecognizer = this.get(recognizer); // let's make sure this recognizer exists\n\n if (recognizer) {\n var recognizers = this.recognizers;\n var index = inArray(recognizers, targetRecognizer);\n\n if (index !== -1) {\n recognizers.splice(index, 1);\n this.touchAction.update();\n }\n }\n\n return this;\n };\n /**\n * @private\n * bind event\n * @param {String} events\n * @param {Function} handler\n * @returns {EventEmitter} this\n */\n\n\n _proto.on = function on(events, handler) {\n if (events === undefined || handler === undefined) {\n return this;\n }\n\n var handlers = this.handlers;\n each(splitStr(events), function (event) {\n handlers[event] = handlers[event] || [];\n handlers[event].push(handler);\n });\n return this;\n };\n /**\n * @private unbind event, leave emit blank to remove all handlers\n * @param {String} events\n * @param {Function} [handler]\n * @returns {EventEmitter} this\n */\n\n\n _proto.off = function off(events, handler) {\n if (events === undefined) {\n return this;\n }\n\n var handlers = this.handlers;\n each(splitStr(events), function (event) {\n if (!handler) {\n delete handlers[event];\n } else {\n handlers[event] && handlers[event].splice(inArray(handlers[event], handler), 1);\n }\n });\n return this;\n };\n /**\n * @private emit event to the listeners\n * @param {String} event\n * @param {Object} data\n */\n\n\n _proto.emit = function emit(event, data) {\n // we also want to trigger dom events\n if (this.options.domEvents) {\n triggerDomEvent(event, data);\n } // no handlers, so skip it all\n\n\n var handlers = this.handlers[event] && this.handlers[event].slice();\n\n if (!handlers || !handlers.length) {\n return;\n }\n\n data.type = event;\n\n data.preventDefault = function () {\n data.srcEvent.preventDefault();\n };\n\n var i = 0;\n\n while (i < handlers.length) {\n handlers[i](data);\n i++;\n }\n };\n /**\n * @private\n * destroy the manager and unbinds all events\n * it doesn't unbind dom events, that is the user own responsibility\n */\n\n\n _proto.destroy = function destroy() {\n this.element && toggleCssProps(this, false);\n this.handlers = {};\n this.session = {};\n this.input.destroy();\n this.element = null;\n };\n\n return Manager;\n}();\n\nvar SINGLE_TOUCH_INPUT_MAP = {\n touchstart: INPUT_START,\n touchmove: INPUT_MOVE,\n touchend: INPUT_END,\n touchcancel: INPUT_CANCEL\n};\nvar SINGLE_TOUCH_TARGET_EVENTS = 'touchstart';\nvar SINGLE_TOUCH_WINDOW_EVENTS = 'touchstart touchmove touchend touchcancel';\n/**\n * @private\n * Touch events input\n * @constructor\n * @extends Input\n */\n\nvar SingleTouchInput =\n/*#__PURE__*/\nfunction (_Input) {\n _inheritsLoose(SingleTouchInput, _Input);\n\n function SingleTouchInput() {\n var _this;\n\n var proto = SingleTouchInput.prototype;\n proto.evTarget = SINGLE_TOUCH_TARGET_EVENTS;\n proto.evWin = SINGLE_TOUCH_WINDOW_EVENTS;\n _this = _Input.apply(this, arguments) || this;\n _this.started = false;\n return _this;\n }\n\n var _proto = SingleTouchInput.prototype;\n\n _proto.handler = function handler(ev) {\n var type = SINGLE_TOUCH_INPUT_MAP[ev.type]; // should we handle the touch events?\n\n if (type === INPUT_START) {\n this.started = true;\n }\n\n if (!this.started) {\n return;\n }\n\n var touches = normalizeSingleTouches.call(this, ev, type); // when done, reset the started state\n\n if (type & (INPUT_END | INPUT_CANCEL) && touches[0].length - touches[1].length === 0) {\n this.started = false;\n }\n\n this.callback(this.manager, type, {\n pointers: touches[0],\n changedPointers: touches[1],\n pointerType: INPUT_TYPE_TOUCH,\n srcEvent: ev\n });\n };\n\n return SingleTouchInput;\n}(Input);\n\nfunction normalizeSingleTouches(ev, type) {\n var all = toArray(ev.touches);\n var changed = toArray(ev.changedTouches);\n\n if (type & (INPUT_END | INPUT_CANCEL)) {\n all = uniqueArray(all.concat(changed), 'identifier', true);\n }\n\n return [all, changed];\n}\n\n/**\n * @private\n * This recognizer is just used as a base for the simple attribute recognizers.\n * @constructor\n * @extends Recognizer\n */\n\nvar AttrRecognizer =\n/*#__PURE__*/\nfunction (_Recognizer) {\n _inheritsLoose(AttrRecognizer, _Recognizer);\n\n function AttrRecognizer(options) {\n if (options === void 0) {\n options = {};\n }\n\n return _Recognizer.call(this, _extends({\n pointers: 1\n }, options)) || this;\n }\n /**\n * @private\n * Used to check if it the recognizer receives valid input, like input.distance > 10.\n * @memberof AttrRecognizer\n * @param {Object} input\n * @returns {Boolean} recognized\n */\n\n\n var _proto = AttrRecognizer.prototype;\n\n _proto.attrTest = function attrTest(input) {\n var optionPointers = this.options.pointers;\n return optionPointers === 0 || input.pointers.length === optionPointers;\n };\n /**\n * @private\n * Process the input and return the state for the recognizer\n * @memberof AttrRecognizer\n * @param {Object} input\n * @returns {*} State\n */\n\n\n _proto.process = function process(input) {\n var state = this.state;\n var eventType = input.eventType;\n var isRecognized = state & (STATE_BEGAN | STATE_CHANGED);\n var isValid = this.attrTest(input); // on cancel input and we've recognized before, return STATE_CANCELLED\n\n if (isRecognized && (eventType & INPUT_CANCEL || !isValid)) {\n return state | STATE_CANCELLED;\n } else if (isRecognized || isValid) {\n if (eventType & INPUT_END) {\n return state | STATE_ENDED;\n } else if (!(state & STATE_BEGAN)) {\n return STATE_BEGAN;\n }\n\n return state | STATE_CHANGED;\n }\n\n return STATE_FAILED;\n };\n\n return AttrRecognizer;\n}(Recognizer);\n\n/**\n * @private\n * A tap is recognized when the pointer is doing a small tap/click. Multiple taps are recognized if they occur\n * between the given interval and position. The delay option can be used to recognize multi-taps without firing\n * a single tap.\n *\n * The eventData from the emitted event contains the property `tapCount`, which contains the amount of\n * multi-taps being recognized.\n * @constructor\n * @extends Recognizer\n */\n\nvar TapRecognizer =\n/*#__PURE__*/\nfunction (_Recognizer) {\n _inheritsLoose(TapRecognizer, _Recognizer);\n\n function TapRecognizer(options) {\n var _this;\n\n if (options === void 0) {\n options = {};\n }\n\n _this = _Recognizer.call(this, _extends({\n event: 'tap',\n pointers: 1,\n taps: 1,\n interval: 300,\n // max time between the multi-tap taps\n time: 250,\n // max time of the pointer to be down (like finger on the screen)\n threshold: 9,\n // a minimal movement is ok, but keep it low\n posThreshold: 10\n }, options)) || this; // previous time and center,\n // used for tap counting\n\n _this.pTime = false;\n _this.pCenter = false;\n _this._timer = null;\n _this._input = null;\n _this.count = 0;\n return _this;\n }\n\n var _proto = TapRecognizer.prototype;\n\n _proto.getTouchAction = function getTouchAction() {\n return [TOUCH_ACTION_MANIPULATION];\n };\n\n _proto.process = function process(input) {\n var _this2 = this;\n\n var options = this.options;\n var validPointers = input.pointers.length === options.pointers;\n var validMovement = input.distance < options.threshold;\n var validTouchTime = input.deltaTime < options.time;\n this.reset();\n\n if (input.eventType & INPUT_START && this.count === 0) {\n return this.failTimeout();\n } // we only allow little movement\n // and we've reached an end event, so a tap is possible\n\n\n if (validMovement && validTouchTime && validPointers) {\n if (input.eventType !== INPUT_END) {\n return this.failTimeout();\n }\n\n var validInterval = this.pTime ? input.timeStamp - this.pTime < options.interval : true;\n var validMultiTap = !this.pCenter || getDistance(this.pCenter, input.center) < options.posThreshold;\n this.pTime = input.timeStamp;\n this.pCenter = input.center;\n\n if (!validMultiTap || !validInterval) {\n this.count = 1;\n } else {\n this.count += 1;\n }\n\n this._input = input; // if tap count matches we have recognized it,\n // else it has began recognizing...\n\n var tapCount = this.count % options.taps;\n\n if (tapCount === 0) {\n // no failing requirements, immediately trigger the tap event\n // or wait as long as the multitap interval to trigger\n if (!this.hasRequireFailures()) {\n return STATE_RECOGNIZED;\n } else {\n this._timer = setTimeout(function () {\n _this2.state = STATE_RECOGNIZED;\n\n _this2.tryEmit();\n }, options.interval);\n return STATE_BEGAN;\n }\n }\n }\n\n return STATE_FAILED;\n };\n\n _proto.failTimeout = function failTimeout() {\n var _this3 = this;\n\n this._timer = setTimeout(function () {\n _this3.state = STATE_FAILED;\n }, this.options.interval);\n return STATE_FAILED;\n };\n\n _proto.reset = function reset() {\n clearTimeout(this._timer);\n };\n\n _proto.emit = function emit() {\n if (this.state === STATE_RECOGNIZED) {\n this._input.tapCount = this.count;\n this.manager.emit(this.options.event, this._input);\n }\n };\n\n return TapRecognizer;\n}(Recognizer);\n\n/**\n * @private\n * direction cons to string\n * @param {constant} direction\n * @returns {String}\n */\n\nfunction directionStr(direction) {\n if (direction === DIRECTION_DOWN) {\n return 'down';\n } else if (direction === DIRECTION_UP) {\n return 'up';\n } else if (direction === DIRECTION_LEFT) {\n return 'left';\n } else if (direction === DIRECTION_RIGHT) {\n return 'right';\n }\n\n return '';\n}\n\n/**\n * @private\n * Pan\n * Recognized when the pointer is down and moved in the allowed direction.\n * @constructor\n * @extends AttrRecognizer\n */\n\nvar PanRecognizer =\n/*#__PURE__*/\nfunction (_AttrRecognizer) {\n _inheritsLoose(PanRecognizer, _AttrRecognizer);\n\n function PanRecognizer(options) {\n var _this;\n\n if (options === void 0) {\n options = {};\n }\n\n _this = _AttrRecognizer.call(this, _extends({\n event: 'pan',\n threshold: 10,\n pointers: 1,\n direction: DIRECTION_ALL\n }, options)) || this;\n _this.pX = null;\n _this.pY = null;\n return _this;\n }\n\n var _proto = PanRecognizer.prototype;\n\n _proto.getTouchAction = function getTouchAction() {\n var direction = this.options.direction;\n var actions = [];\n\n if (direction & DIRECTION_HORIZONTAL) {\n actions.push(TOUCH_ACTION_PAN_Y);\n }\n\n if (direction & DIRECTION_VERTICAL) {\n actions.push(TOUCH_ACTION_PAN_X);\n }\n\n return actions;\n };\n\n _proto.directionTest = function directionTest(input) {\n var options = this.options;\n var hasMoved = true;\n var distance = input.distance;\n var direction = input.direction;\n var x = input.deltaX;\n var y = input.deltaY; // lock to axis?\n\n if (!(direction & options.direction)) {\n if (options.direction & DIRECTION_HORIZONTAL) {\n direction = x === 0 ? DIRECTION_NONE : x < 0 ? DIRECTION_LEFT : DIRECTION_RIGHT;\n hasMoved = x !== this.pX;\n distance = Math.abs(input.deltaX);\n } else {\n direction = y === 0 ? DIRECTION_NONE : y < 0 ? DIRECTION_UP : DIRECTION_DOWN;\n hasMoved = y !== this.pY;\n distance = Math.abs(input.deltaY);\n }\n }\n\n input.direction = direction;\n return hasMoved && distance > options.threshold && direction & options.direction;\n };\n\n _proto.attrTest = function attrTest(input) {\n return AttrRecognizer.prototype.attrTest.call(this, input) && ( // replace with a super call\n this.state & STATE_BEGAN || !(this.state & STATE_BEGAN) && this.directionTest(input));\n };\n\n _proto.emit = function emit(input) {\n this.pX = input.deltaX;\n this.pY = input.deltaY;\n var direction = directionStr(input.direction);\n\n if (direction) {\n input.additionalEvent = this.options.event + direction;\n }\n\n _AttrRecognizer.prototype.emit.call(this, input);\n };\n\n return PanRecognizer;\n}(AttrRecognizer);\n\n/**\n * @private\n * Swipe\n * Recognized when the pointer is moving fast (velocity), with enough distance in the allowed direction.\n * @constructor\n * @extends AttrRecognizer\n */\n\nvar SwipeRecognizer =\n/*#__PURE__*/\nfunction (_AttrRecognizer) {\n _inheritsLoose(SwipeRecognizer, _AttrRecognizer);\n\n function SwipeRecognizer(options) {\n if (options === void 0) {\n options = {};\n }\n\n return _AttrRecognizer.call(this, _extends({\n event: 'swipe',\n threshold: 10,\n velocity: 0.3,\n direction: DIRECTION_HORIZONTAL | DIRECTION_VERTICAL,\n pointers: 1\n }, options)) || this;\n }\n\n var _proto = SwipeRecognizer.prototype;\n\n _proto.getTouchAction = function getTouchAction() {\n return PanRecognizer.prototype.getTouchAction.call(this);\n };\n\n _proto.attrTest = function attrTest(input) {\n var direction = this.options.direction;\n var velocity;\n\n if (direction & (DIRECTION_HORIZONTAL | DIRECTION_VERTICAL)) {\n velocity = input.overallVelocity;\n } else if (direction & DIRECTION_HORIZONTAL) {\n velocity = input.overallVelocityX;\n } else if (direction & DIRECTION_VERTICAL) {\n velocity = input.overallVelocityY;\n }\n\n return _AttrRecognizer.prototype.attrTest.call(this, input) && direction & input.offsetDirection && input.distance > this.options.threshold && input.maxPointers === this.options.pointers && abs(velocity) > this.options.velocity && input.eventType & INPUT_END;\n };\n\n _proto.emit = function emit(input) {\n var direction = directionStr(input.offsetDirection);\n\n if (direction) {\n this.manager.emit(this.options.event + direction, input);\n }\n\n this.manager.emit(this.options.event, input);\n };\n\n return SwipeRecognizer;\n}(AttrRecognizer);\n\n/**\n * @private\n * Pinch\n * Recognized when two or more pointers are moving toward (zoom-in) or away from each other (zoom-out).\n * @constructor\n * @extends AttrRecognizer\n */\n\nvar PinchRecognizer =\n/*#__PURE__*/\nfunction (_AttrRecognizer) {\n _inheritsLoose(PinchRecognizer, _AttrRecognizer);\n\n function PinchRecognizer(options) {\n if (options === void 0) {\n options = {};\n }\n\n return _AttrRecognizer.call(this, _extends({\n event: 'pinch',\n threshold: 0,\n pointers: 2\n }, options)) || this;\n }\n\n var _proto = PinchRecognizer.prototype;\n\n _proto.getTouchAction = function getTouchAction() {\n return [TOUCH_ACTION_NONE];\n };\n\n _proto.attrTest = function attrTest(input) {\n return _AttrRecognizer.prototype.attrTest.call(this, input) && (Math.abs(input.scale - 1) > this.options.threshold || this.state & STATE_BEGAN);\n };\n\n _proto.emit = function emit(input) {\n if (input.scale !== 1) {\n var inOut = input.scale < 1 ? 'in' : 'out';\n input.additionalEvent = this.options.event + inOut;\n }\n\n _AttrRecognizer.prototype.emit.call(this, input);\n };\n\n return PinchRecognizer;\n}(AttrRecognizer);\n\n/**\n * @private\n * Rotate\n * Recognized when two or more pointer are moving in a circular motion.\n * @constructor\n * @extends AttrRecognizer\n */\n\nvar RotateRecognizer =\n/*#__PURE__*/\nfunction (_AttrRecognizer) {\n _inheritsLoose(RotateRecognizer, _AttrRecognizer);\n\n function RotateRecognizer(options) {\n if (options === void 0) {\n options = {};\n }\n\n return _AttrRecognizer.call(this, _extends({\n event: 'rotate',\n threshold: 0,\n pointers: 2\n }, options)) || this;\n }\n\n var _proto = RotateRecognizer.prototype;\n\n _proto.getTouchAction = function getTouchAction() {\n return [TOUCH_ACTION_NONE];\n };\n\n _proto.attrTest = function attrTest(input) {\n return _AttrRecognizer.prototype.attrTest.call(this, input) && (Math.abs(input.rotation) > this.options.threshold || this.state & STATE_BEGAN);\n };\n\n return RotateRecognizer;\n}(AttrRecognizer);\n\n/**\n * @private\n * Press\n * Recognized when the pointer is down for x ms without any movement.\n * @constructor\n * @extends Recognizer\n */\n\nvar PressRecognizer =\n/*#__PURE__*/\nfunction (_Recognizer) {\n _inheritsLoose(PressRecognizer, _Recognizer);\n\n function PressRecognizer(options) {\n var _this;\n\n if (options === void 0) {\n options = {};\n }\n\n _this = _Recognizer.call(this, _extends({\n event: 'press',\n pointers: 1,\n time: 251,\n // minimal time of the pointer to be pressed\n threshold: 9\n }, options)) || this;\n _this._timer = null;\n _this._input = null;\n return _this;\n }\n\n var _proto = PressRecognizer.prototype;\n\n _proto.getTouchAction = function getTouchAction() {\n return [TOUCH_ACTION_AUTO];\n };\n\n _proto.process = function process(input) {\n var _this2 = this;\n\n var options = this.options;\n var validPointers = input.pointers.length === options.pointers;\n var validMovement = input.distance < options.threshold;\n var validTime = input.deltaTime > options.time;\n this._input = input; // we only allow little movement\n // and we've reached an end event, so a tap is possible\n\n if (!validMovement || !validPointers || input.eventType & (INPUT_END | INPUT_CANCEL) && !validTime) {\n this.reset();\n } else if (input.eventType & INPUT_START) {\n this.reset();\n this._timer = setTimeout(function () {\n _this2.state = STATE_RECOGNIZED;\n\n _this2.tryEmit();\n }, options.time);\n } else if (input.eventType & INPUT_END) {\n return STATE_RECOGNIZED;\n }\n\n return STATE_FAILED;\n };\n\n _proto.reset = function reset() {\n clearTimeout(this._timer);\n };\n\n _proto.emit = function emit(input) {\n if (this.state !== STATE_RECOGNIZED) {\n return;\n }\n\n if (input && input.eventType & INPUT_END) {\n this.manager.emit(this.options.event + \"up\", input);\n } else {\n this._input.timeStamp = now();\n this.manager.emit(this.options.event, this._input);\n }\n };\n\n return PressRecognizer;\n}(Recognizer);\n\n/**\n * @private\n * wrap a method with a deprecation warning and stack trace\n * @param {Function} method\n * @param {String} name\n * @param {String} message\n * @returns {Function} A new function wrapping the supplied method.\n */\nfunction deprecate(method, name, message) {\n var deprecationMessage = \"DEPRECATED METHOD: \" + name + \"\\n\" + message + \" AT \\n\";\n return function () {\n var e = new Error('get-stack-trace');\n var stack = e && e.stack ? e.stack.replace(/^[^\\(]+?[\\n$]/gm, '').replace(/^\\s+at\\s+/gm, '').replace(/^Object.\\s*\\(/gm, '{anonymous}()@') : 'Unknown Stack Trace';\n var log = window.console && (window.console.warn || window.console.log);\n\n if (log) {\n log.call(window.console, deprecationMessage, stack);\n }\n\n return method.apply(this, arguments);\n };\n}\n\n/**\n * @private\n * extend object.\n * means that properties in dest will be overwritten by the ones in src.\n * @param {Object} dest\n * @param {Object} src\n * @param {Boolean} [merge=false]\n * @returns {Object} dest\n */\n\nvar extend = deprecate(function (dest, src, merge) {\n var keys = Object.keys(src);\n var i = 0;\n\n while (i < keys.length) {\n if (!merge || merge && dest[keys[i]] === undefined) {\n dest[keys[i]] = src[keys[i]];\n }\n\n i++;\n }\n\n return dest;\n}, 'extend', 'Use `assign`.');\n\n/**\n * @private\n * merge the values from src in the dest.\n * means that properties that exist in dest will not be overwritten by src\n * @param {Object} dest\n * @param {Object} src\n * @returns {Object} dest\n */\n\nvar merge = deprecate(function (dest, src) {\n return extend(dest, src, true);\n}, 'merge', 'Use `assign`.');\n\n/**\n * @private\n * simple class inheritance\n * @param {Function} child\n * @param {Function} base\n * @param {Object} [properties]\n */\n\nfunction inherit(child, base, properties) {\n var baseP = base.prototype;\n var childP;\n childP = child.prototype = Object.create(baseP);\n childP.constructor = child;\n childP._super = baseP;\n\n if (properties) {\n assign$1(childP, properties);\n }\n}\n\n/**\n * @private\n * simple function bind\n * @param {Function} fn\n * @param {Object} context\n * @returns {Function}\n */\nfunction bindFn(fn, context) {\n return function boundFn() {\n return fn.apply(context, arguments);\n };\n}\n\n/**\n * @private\n * Simple way to create a manager with a default set of recognizers.\n * @param {HTMLElement} element\n * @param {Object} [options]\n * @constructor\n */\n\nvar Hammer =\n/*#__PURE__*/\nfunction () {\n var Hammer =\n /**\n * @private\n * @const {string}\n */\n function Hammer(element, options) {\n if (options === void 0) {\n options = {};\n }\n\n return new Manager(element, _extends({\n recognizers: [// RecognizerClass, options, [recognizeWith, ...], [requireFailure, ...]\n [RotateRecognizer, {\n enable: false\n }], [PinchRecognizer, {\n enable: false\n }, ['rotate']], [SwipeRecognizer, {\n direction: DIRECTION_HORIZONTAL\n }], [PanRecognizer, {\n direction: DIRECTION_HORIZONTAL\n }, ['swipe']], [TapRecognizer], [TapRecognizer, {\n event: 'doubletap',\n taps: 2\n }, ['tap']], [PressRecognizer]]\n }, options));\n };\n\n Hammer.VERSION = \"2.0.15\";\n Hammer.DIRECTION_ALL = DIRECTION_ALL;\n Hammer.DIRECTION_DOWN = DIRECTION_DOWN;\n Hammer.DIRECTION_LEFT = DIRECTION_LEFT;\n Hammer.DIRECTION_RIGHT = DIRECTION_RIGHT;\n Hammer.DIRECTION_UP = DIRECTION_UP;\n Hammer.DIRECTION_HORIZONTAL = DIRECTION_HORIZONTAL;\n Hammer.DIRECTION_VERTICAL = DIRECTION_VERTICAL;\n Hammer.DIRECTION_NONE = DIRECTION_NONE;\n Hammer.DIRECTION_DOWN = DIRECTION_DOWN;\n Hammer.INPUT_START = INPUT_START;\n Hammer.INPUT_MOVE = INPUT_MOVE;\n Hammer.INPUT_END = INPUT_END;\n Hammer.INPUT_CANCEL = INPUT_CANCEL;\n Hammer.STATE_POSSIBLE = STATE_POSSIBLE;\n Hammer.STATE_BEGAN = STATE_BEGAN;\n Hammer.STATE_CHANGED = STATE_CHANGED;\n Hammer.STATE_ENDED = STATE_ENDED;\n Hammer.STATE_RECOGNIZED = STATE_RECOGNIZED;\n Hammer.STATE_CANCELLED = STATE_CANCELLED;\n Hammer.STATE_FAILED = STATE_FAILED;\n Hammer.Manager = Manager;\n Hammer.Input = Input;\n Hammer.TouchAction = TouchAction;\n Hammer.TouchInput = TouchInput;\n Hammer.MouseInput = MouseInput;\n Hammer.PointerEventInput = PointerEventInput;\n Hammer.TouchMouseInput = TouchMouseInput;\n Hammer.SingleTouchInput = SingleTouchInput;\n Hammer.Recognizer = Recognizer;\n Hammer.AttrRecognizer = AttrRecognizer;\n Hammer.Tap = TapRecognizer;\n Hammer.Pan = PanRecognizer;\n Hammer.Swipe = SwipeRecognizer;\n Hammer.Pinch = PinchRecognizer;\n Hammer.Rotate = RotateRecognizer;\n Hammer.Press = PressRecognizer;\n Hammer.on = addEventListeners;\n Hammer.off = removeEventListeners;\n Hammer.each = each;\n Hammer.merge = merge;\n Hammer.extend = extend;\n Hammer.bindFn = bindFn;\n Hammer.assign = assign$1;\n Hammer.inherit = inherit;\n Hammer.bindFn = bindFn;\n Hammer.prefixed = prefixed;\n Hammer.toArray = toArray;\n Hammer.inArray = inArray;\n Hammer.uniqueArray = uniqueArray;\n Hammer.splitStr = splitStr;\n Hammer.boolOrFn = boolOrFn;\n Hammer.hasParent = hasParent;\n Hammer.addEventListeners = addEventListeners;\n Hammer.removeEventListeners = removeEventListeners;\n Hammer.defaults = defaults;\n return Hammer;\n}();\n\nexport default Hammer;\nexport { INPUT_START, INPUT_MOVE, INPUT_END, INPUT_CANCEL, STATE_POSSIBLE, STATE_BEGAN, STATE_CHANGED, STATE_ENDED, STATE_RECOGNIZED, STATE_CANCELLED, STATE_FAILED, DIRECTION_NONE, DIRECTION_LEFT, DIRECTION_RIGHT, DIRECTION_UP, DIRECTION_DOWN, DIRECTION_HORIZONTAL, DIRECTION_VERTICAL, DIRECTION_ALL, Manager, Input, TouchAction, TouchInput, MouseInput, PointerEventInput, TouchMouseInput, SingleTouchInput, Recognizer, AttrRecognizer, TapRecognizer as Tap, PanRecognizer as Pan, SwipeRecognizer as Swipe, PinchRecognizer as Pinch, RotateRecognizer as Rotate, PressRecognizer as Press, addEventListeners as on, removeEventListeners as off, each, merge, extend, assign$1 as assign, inherit, bindFn, prefixed, toArray, inArray, uniqueArray, splitStr, boolOrFn, hasParent, addEventListeners, removeEventListeners, defaults };\n//# sourceMappingURL=hammer.esm.js.map\n","/**\n * Setup a mock hammer.js object, for unit testing.\n *\n * Inspiration: https://github.com/uber/deck.gl/pull/658\n *\n * @returns {{on: noop, off: noop, destroy: noop, emit: noop, get: get}}\n */\nfunction hammerMock() {\n const noop = () => {};\n\n return {\n on: noop,\n off: noop,\n destroy: noop,\n emit: noop,\n\n get: function(m) {\t//eslint-disable-line no-unused-vars\n return {\n set: noop\n };\n }\n };\n}\n\n\nif (typeof window !== 'undefined') {\n var Hammer = window['Hammer'] || require('@egjs/hammerjs');\n module.exports = Hammer;\n}\nelse {\n module.exports = function () {\n // hammer.js is only available in a browser, not in node.js. Replacing it with a mock object.\n return hammerMock();\n }\n}\n","require('./Activator.css');\n\nvar keycharm = require('keycharm');\nvar Emitter = require('component-emitter');\nvar Hammer = require('../module/hammer');\nvar util = require('vis-util');\n\n/**\n * Turn an element into an clickToUse element.\n * When not active, the element has a transparent overlay. When the overlay is\n * clicked, the mode is changed to active.\n * When active, the element is displayed with a blue border around it, and\n * the interactive contents of the element can be used. When clicked outside\n * the element, the elements mode is changed to inactive.\n * @param {Element} container\n * @constructor Activator\n */\nfunction Activator(container) {\n this.active = false;\n\n this.dom = {\n container: container\n };\n\n this.dom.overlay = document.createElement('div');\n this.dom.overlay.className = 'vis-overlay';\n\n this.dom.container.appendChild(this.dom.overlay);\n\n this.hammer = Hammer(this.dom.overlay);\n this.hammer.on('tap', this._onTapOverlay.bind(this));\n\n // block all touch events (except tap)\n var me = this;\n var events = [\n 'tap', 'doubletap', 'press',\n 'pinch',\n 'pan', 'panstart', 'panmove', 'panend'\n ];\n events.forEach(function (event) {\n me.hammer.on(event, function (event) {\n event.stopPropagation();\n });\n });\n\n // attach a click event to the window, in order to deactivate when clicking outside the timeline\n if (document && document.body) {\n this.onClick = function (event) {\n if (!_hasParent(event.target, container)) {\n me.deactivate();\n }\n };\n document.body.addEventListener('click', this.onClick);\n }\n\n if (this.keycharm !== undefined) {\n this.keycharm.destroy();\n }\n this.keycharm = keycharm();\n\n // keycharm listener only bounded when active)\n this.escListener = this.deactivate.bind(this);\n}\n\n// turn into an event emitter\nEmitter(Activator.prototype);\n\n// The currently active activator\nActivator.current = null;\n\n/**\n * Destroy the activator. Cleans up all created DOM and event listeners\n */\nActivator.prototype.destroy = function () {\n this.deactivate();\n\n // remove dom\n this.dom.overlay.parentNode.removeChild(this.dom.overlay);\n\n // remove global event listener\n if (this.onClick) {\n document.body.removeEventListener('click', this.onClick);\n }\n // remove keycharm\n if (this.keycharm !== undefined) {\n this.keycharm.destroy();\n }\n this.keycharm = null;\n // cleanup hammer instances\n this.hammer.destroy();\n this.hammer = null;\n // FIXME: cleaning up hammer instances doesn't work (Timeline not removed from memory)\n};\n\n/**\n * Activate the element\n * Overlay is hidden, element is decorated with a blue shadow border\n */\nActivator.prototype.activate = function () {\n // we allow only one active activator at a time\n if (Activator.current) {\n Activator.current.deactivate();\n }\n Activator.current = this;\n\n this.active = true;\n this.dom.overlay.style.display = 'none';\n util.addClassName(this.dom.container, 'vis-active');\n\n this.emit('change');\n this.emit('activate');\n\n // ugly hack: bind ESC after emitting the events, as the Network rebinds all\n // keyboard events on a 'change' event\n this.keycharm.bind('esc', this.escListener);\n};\n\n/**\n * Deactivate the element\n * Overlay is displayed on top of the element\n */\nActivator.prototype.deactivate = function () {\n this.active = false;\n this.dom.overlay.style.display = '';\n util.removeClassName(this.dom.container, 'vis-active');\n this.keycharm.unbind('esc', this.escListener);\n\n this.emit('change');\n this.emit('deactivate');\n};\n\n/**\n * Handle a tap event: activate the container\n * @param {Event} event The event\n * @private\n */\nActivator.prototype._onTapOverlay = function (event) {\n // activate the container\n this.activate();\n event.stopPropagation();\n};\n\n/**\n * Test whether the element has the requested parent element somewhere in\n * its chain of parent nodes.\n * @param {HTMLElement} element\n * @param {HTMLElement} parent\n * @returns {boolean} Returns true when the parent is found somewhere in the\n * chain of parent nodes.\n * @private\n */\nfunction _hasParent(element, parent) {\n while (element) {\n if (element === parent) {\n return true\n }\n element = element.parentNode;\n }\n return false;\n}\n\nmodule.exports = Activator;\n","// English\nexports['en'] = {\n edit: 'Edit',\n del: 'Delete selected',\n back: 'Back',\n addNode: 'Add Node',\n addEdge: 'Add Edge',\n editNode: 'Edit Node',\n editEdge: 'Edit Edge',\n addDescription: 'Click in an empty space to place a new node.',\n edgeDescription: 'Click on a node and drag the edge to another node to connect them.',\n editEdgeDescription: 'Click on the control points and drag them to a node to connect to it.',\n createEdgeError: 'Cannot link edges to a cluster.',\n deleteClusterError: 'Clusters cannot be deleted.',\n editClusterError: 'Clusters cannot be edited.'\n};\nexports['en_EN'] = exports['en'];\nexports['en_US'] = exports['en'];\n\n// German\nexports['de'] = {\n edit: 'Editieren',\n del: 'L\\u00f6sche Auswahl',\n back: 'Zur\\u00fcck',\n addNode: 'Knoten hinzuf\\u00fcgen',\n addEdge: 'Kante hinzuf\\u00fcgen',\n editNode: 'Knoten editieren',\n editEdge: 'Kante editieren',\n addDescription: 'Klicke auf eine freie Stelle, um einen neuen Knoten zu plazieren.',\n edgeDescription: 'Klicke auf einen Knoten und ziehe die Kante zu einem anderen Knoten, um diese zu verbinden.',\n editEdgeDescription: 'Klicke auf die Verbindungspunkte und ziehe diese auf einen Knoten, um sie zu verbinden.',\n createEdgeError: 'Es ist nicht m\\u00f6glich, Kanten mit Clustern zu verbinden.',\n deleteClusterError: 'Cluster k\\u00f6nnen nicht gel\\u00f6scht werden.',\n editClusterError: 'Cluster k\\u00f6nnen nicht editiert werden.'\n};\nexports['de_DE'] = exports['de'];\n\n// Spanish\nexports['es'] = {\n edit: 'Editar',\n del: 'Eliminar selecci\\u00f3n',\n back: 'Atr\\u00e1s',\n addNode: 'A\\u00f1adir nodo',\n addEdge: 'A\\u00f1adir arista',\n editNode: 'Editar nodo',\n editEdge: 'Editar arista',\n addDescription: 'Haga clic en un lugar vac\\u00edo para colocar un nuevo nodo.',\n edgeDescription: 'Haga clic en un nodo y arrastre la arista hacia otro nodo para conectarlos.',\n editEdgeDescription: 'Haga clic en un punto de control y arrastrelo a un nodo para conectarlo.',\n createEdgeError: 'No se puede conectar una arista a un grupo.',\n deleteClusterError: 'No es posible eliminar grupos.',\n editClusterError: 'No es posible editar grupos.'\n};\nexports['es_ES'] = exports['es'];\n\n//Italiano\nexports['it'] = {\n edit: 'Modifica',\n del: 'Cancella la selezione',\n back: 'Indietro',\n addNode: 'Aggiungi un nodo',\n addEdge: 'Aggiungi un vertice',\n editNode: 'Modifica il nodo',\n editEdge: 'Modifica il vertice',\n addDescription: 'Clicca per aggiungere un nuovo nodo',\n edgeDescription: 'Clicca su un nodo e trascinalo ad un altro nodo per connetterli.',\n editEdgeDescription: 'Clicca sui Punti di controllo e trascinali ad un nodo per connetterli.',\n createEdgeError: 'Non si possono collegare vertici ad un cluster',\n deleteClusterError: 'I cluster non possono essere cancellati',\n editClusterError: 'I clusters non possono essere modificati.'\n};\nexports['it_IT'] = exports['it'];\n\n// Dutch\nexports['nl'] = {\n edit: 'Wijzigen',\n del: 'Selectie verwijderen',\n back: 'Terug',\n addNode: 'Node toevoegen',\n addEdge: 'Link toevoegen',\n editNode: 'Node wijzigen',\n editEdge: 'Link wijzigen',\n addDescription: 'Klik op een leeg gebied om een nieuwe node te maken.',\n edgeDescription: 'Klik op een node en sleep de link naar een andere node om ze te verbinden.',\n editEdgeDescription: 'Klik op de verbindingspunten en sleep ze naar een node om daarmee te verbinden.',\n createEdgeError: 'Kan geen link maken naar een cluster.',\n deleteClusterError: 'Clusters kunnen niet worden verwijderd.',\n editClusterError: 'Clusters kunnen niet worden aangepast.'\n};\nexports['nl_NL'] = exports['nl'];\nexports['nl_BE'] = exports['nl'];\n\n// Portuguese Brazil\nexports['pt-br'] = {\n edit: 'Editar',\n del: 'Remover selecionado',\n back: 'Voltar',\n addNode: 'Adicionar nó',\n addEdge: 'Adicionar aresta',\n editNode: 'Editar nó',\n editEdge: 'Editar aresta',\n addDescription: 'Clique em um espaço em branco para adicionar um novo nó',\n edgeDescription: 'Clique em um nó e arraste a aresta até outro nó para conectá-los',\n editEdgeDescription: 'Clique nos pontos de controle e os arraste para um nó para conectá-los',\n createEdgeError: 'Não foi possível linkar arestas a um cluster.',\n deleteClusterError: 'Clusters não puderam ser removidos.',\n editClusterError: 'Clusters não puderam ser editados.'\n};\nexports['pt-BR'] = exports['pt-br'];\nexports['pt_BR'] = exports['pt-br'];\nexports['pt_br'] = exports['pt-br'];\n\n// Russian\nexports['ru'] = {\n edit: 'Редактировать',\n del: 'Удалить выбранное',\n back: 'Назад',\n addNode: 'Добавить узел',\n addEdge: 'Добавить ребро',\n editNode: 'Редактировать узел',\n editEdge: 'Редактировать ребро',\n addDescription: 'Кликните в свободное место, чтобы добавить новый узел.',\n edgeDescription: 'Кликните на узел и протяните ребро к другому узлу, чтобы соединить их.',\n editEdgeDescription: 'Кликните на контрольные точки и перетащите их в узел, чтобы подключиться к нему.',\n createEdgeError: 'Невозможно соединить ребра в кластер.',\n deleteClusterError: 'Кластеры не могут быть удалены',\n editClusterError: 'Кластеры недоступны для редактирования.'\n};\nexports['ru_RU'] = exports['ru'];\n\n// Chinese\nexports['cn'] = {\n edit: '编辑',\n del: '删除选定',\n back: '返回',\n addNode: '添加节点',\n addEdge: '添加连接线',\n editNode: '编辑节点',\n editEdge: '编辑连接线',\n addDescription: '单击空白处放置新节点。',\n edgeDescription: '单击某个节点并将该连接线拖动到另一个节点以连接它们。',\n editEdgeDescription: '单击控制节点并将它们拖到节点上连接。',\n createEdgeError: '无法将连接线连接到群集。',\n deleteClusterError: '无法删除群集。',\n editClusterError: '无法编辑群集。'\n};\nexports['zh_CN'] = exports['cn'];\n\n// Ukrainian\nexports['uk'] = {\n edit: 'Редагувати',\n del: 'Видалити обране',\n back: 'Назад',\n addNode: 'Додати вузол',\n addEdge: 'Додати край',\n editNode: 'Редагувати вузол',\n editEdge: 'Редагувати край',\n addDescription: 'Kлікніть на вільне місце, щоб додати новий вузол.',\n edgeDescription: 'Клікніть на вузол і перетягніть край до іншого вузла, щоб їх з\\'єднати.',\n editEdgeDescription: 'Клікніть на контрольні точки і перетягніть їх у вузол, щоб підключитися до нього.',\n createEdgeError: 'Не можливо об\\'єднати краї в групу.',\n deleteClusterError: 'Групи не можуть бути видалені.',\n editClusterError: 'Групи недоступні для редагування.'\n};\nexports['uk_UA'] = exports['uk'];\n\n// French\nexports['fr'] = {\n edit: 'Editer',\n del: 'Effacer la selection',\n back: 'Retour',\n addNode: 'Ajouter un noeud',\n addEdge: 'Ajouter un lien',\n editNode: 'Editer le noeud',\n editEdge: 'Editer le lien',\n addDescription: 'Cliquez dans un endroit vide pour placer un noeud.',\n edgeDescription: 'Cliquez sur un noeud et glissez le lien vers un autre noeud pour les connecter.',\n editEdgeDescription: 'Cliquez sur les points de contrôle et glissez-les pour connecter un noeud.',\n createEdgeError: 'Impossible de créer un lien vers un cluster.',\n deleteClusterError: 'Les clusters ne peuvent pas être éffacés.',\n editClusterError: 'Les clusters ne peuvent pas être édites.'\n};\nexports['fr_FR'] = exports['fr'];\n\n// Czech\nexports['cs'] = {\n edit: 'Upravit',\n del: 'Smazat výběr',\n back: 'Zpět',\n addNode: 'Přidat vrchol',\n addEdge: 'Přidat hranu',\n editNode: 'Upravit vrchol',\n editEdge: 'Upravit hranu',\n addDescription: 'Kluknutím do prázdného prostoru můžete přidat nový vrchol.',\n edgeDescription: 'Přetažením z jednoho vrcholu do druhého můžete spojit tyto vrcholy novou hranou.',\n editEdgeDescription: 'Přetažením kontrolního vrcholu hrany ji můžete připojit k jinému vrcholu.',\n createEdgeError: 'Nelze připojit hranu ke shluku.',\n deleteClusterError: 'Nelze mazat shluky.',\n editClusterError: 'Nelze upravovat shluky.'\n};\nexports['cs_CZ'] = exports['cs'];\n","function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nmodule.exports = _classCallCheck;","function _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nmodule.exports = _createClass;","\n/**\n * Associates a canvas to a given image, containing a number of renderings\n * of the image at various sizes.\n *\n * This technique is known as 'mipmapping'.\n *\n * NOTE: Images can also be of type 'data:svg+xml`. This code also works\n * for svg, but the mipmapping may not be necessary.\n *\n * @param {Image} image\n */\nclass CachedImage {\n /**\n * @ignore\n */ \n constructor() { // eslint-disable-line no-unused-vars\n this.NUM_ITERATIONS = 4; // Number of items in the coordinates array\n\n this.image = new Image();\n this.canvas = document.createElement('canvas');\n }\n\n\n /**\n * Called when the image has been successfully loaded.\n */\n init() {\n if (this.initialized()) return;\n\n this.src = this.image.src; // For same interface with Image\n var w = this.image.width;\n var h = this.image.height;\n\n // Ease external access\n this.width = w;\n this.height = h;\n\n var h2 = Math.floor(h/2);\n var h4 = Math.floor(h/4);\n var h8 = Math.floor(h/8);\n var h16 = Math.floor(h/16);\n\n var w2 = Math.floor(w/2);\n var w4 = Math.floor(w/4);\n var w8 = Math.floor(w/8);\n var w16 = Math.floor(w/16);\n\n // Make canvas as small as possible\n this.canvas.width = 3*w4;\n this.canvas.height = h2;\n\n // Coordinates and sizes of images contained in the canvas\n // Values per row: [top x, left y, width, height]\n\n this.coordinates = [\n [ 0 , 0 , w2 , h2],\n [ w2 , 0 , w4 , h4],\n [ w2 , h4, w8 , h8],\n [ 5*w8, h4, w16, h16]\n ];\n\n this._fillMipMap();\n }\n\n\n /**\n * @return {Boolean} true if init() has been called, false otherwise.\n */\n initialized() {\n return (this.coordinates !== undefined);\n }\n\n\n /**\n * Redraw main image in various sizes to the context.\n *\n * The rationale behind this is to reduce artefacts due to interpolation\n * at differing zoom levels.\n *\n * Source: http://stackoverflow.com/q/18761404/1223531\n *\n * This methods takes the resizing out of the drawing loop, in order to\n * reduce performance overhead.\n *\n * TODO: The code assumes that a 2D context can always be gotten. This is\n * not necessarily true! OTOH, if not true then usage of this class\n * is senseless.\n *\n * @private\n */\n _fillMipMap() {\n var ctx = this.canvas.getContext('2d');\n\n // First zoom-level comes from the image\n var to = this.coordinates[0];\n ctx.drawImage(this.image, to[0], to[1], to[2], to[3]);\n\n // The rest are copy actions internal to the canvas/context\n for (let iterations = 1; iterations < this.NUM_ITERATIONS; iterations++) {\n let from = this.coordinates[iterations - 1];\n let to = this.coordinates[iterations];\n\n ctx.drawImage(this.canvas,\n from[0], from[1], from[2], from[3],\n to[0], to[1], to[2], to[3]\n );\n }\n }\n\n\n /**\n * Draw the image, using the mipmap if necessary.\n *\n * MipMap is only used if param factor > 2; otherwise, original bitmap\n * is resized. This is also used to skip mipmap usage, e.g. by setting factor = 1\n *\n * Credits to 'Alex de Mulder' for original implementation.\n *\n * @param {CanvasRenderingContext2D} ctx context on which to draw zoomed image\n * @param {Float} factor scale factor at which to draw\n * @param {number} left\n * @param {number} top\n * @param {number} width\n * @param {number} height\n */\n drawImageAtPosition(ctx, factor, left, top, width, height) {\n\n if(!this.initialized())\n return; //can't draw image yet not intialized\n\n if (factor > 2) {\n // Determine which zoomed image to use\n factor *= 0.5;\n let iterations = 0;\n while (factor > 2 && iterations < this.NUM_ITERATIONS) {\n factor *= 0.5;\n iterations += 1;\n }\n\n if (iterations >= this.NUM_ITERATIONS) {\n iterations = this.NUM_ITERATIONS - 1;\n }\n //console.log(\"iterations: \" + iterations);\n\n let from = this.coordinates[iterations];\n ctx.drawImage(this.canvas,\n from[0], from[1], from[2], from[3],\n left, top, width, height\n );\n } else {\n // Draw image directly\n ctx.drawImage(this.image, left, top, width, height);\n }\n }\n\n}\n\n\nexport default CachedImage;\n","import CachedImage from './CachedImage';\n\n/**\n * This callback is a callback that accepts an Image.\n * @callback ImageCallback\n * @param {Image} image\n */\n\n/**\n * This class loads images and keeps them stored.\n *\n * @param {ImageCallback} callback\n */\nclass Images {\n /**\n * @param {ImageCallback} callback\n */\n constructor(callback){\n this.images = {};\n this.imageBroken = {};\n this.callback = callback;\n }\n \n /**\n * @param {string} url The original Url that failed to load, if the broken image is successfully loaded it will be added to the cache using this Url as the key so that subsequent requests for this Url will return the broken image\n * @param {string} brokenUrl Url the broken image to try and load\n * @param {Image} imageToLoadBrokenUrlOn The image object\n */ \n _tryloadBrokenUrl (url, brokenUrl, imageToLoadBrokenUrlOn) {\n //If these parameters aren't specified then exit the function because nothing constructive can be done\n if (url === undefined || imageToLoadBrokenUrlOn === undefined) return;\n if (brokenUrl === undefined) {\n console.warn(\"No broken url image defined\");\n return;\n }\n \n //Clear the old subscription to the error event and put a new in place that only handle errors in loading the brokenImageUrl\n imageToLoadBrokenUrlOn.image.onerror = () => {\n console.error(\"Could not load brokenImage:\", brokenUrl);\n // cache item will contain empty image, this should be OK for default\n };\n \n //Set the source of the image to the brokenUrl, this is actually what kicks off the loading of the broken image\n imageToLoadBrokenUrlOn.image.src = brokenUrl;\n }\n \n /**\n *\n * @param {vis.Image} imageToRedrawWith\n * @private\n */\n _redrawWithImage (imageToRedrawWith) {\n if (this.callback) {\n this.callback(imageToRedrawWith);\n }\n }\n \n /**\n * @param {string} url Url of the image\n * @param {string} brokenUrl Url of an image to use if the url image is not found\n * @return {Image} img The image object\n */ \n load (url, brokenUrl) {\n //Try and get the image from the cache, if successful then return the cached image \n var cachedImage = this.images[url]; \n if (cachedImage) return cachedImage;\n \n //Create a new image\n var img = new CachedImage();\n\n // Need to add to cache here, otherwise final return will spawn different copies of the same image,\n // Also, there will be multiple loads of the same image.\n this.images[url] = img; \n \n //Subscribe to the event that is raised if the image loads successfully \n img.image.onload = () => {\n // Properly init the cached item and then request a redraw\n this._fixImageCoordinates(img.image);\n img.init();\n this._redrawWithImage(img);\n };\n \n //Subscribe to the event that is raised if the image fails to load\n img.image.onerror = () => {\n console.error(\"Could not load image:\", url);\n //Try and load the image specified by the brokenUrl using\n this._tryloadBrokenUrl(url, brokenUrl, img);\n };\n \n //Set the source of the image to the url, this is what actually kicks off the loading of the image\n img.image.src = url;\n \n //Return the new image\n return img;\n }\n\n\n /**\n * IE11 fix -- thanks dponch!\n *\n * Local helper function\n * @param {vis.Image} imageToCache\n * @private\n */\n _fixImageCoordinates(imageToCache) {\n if (imageToCache.width === 0) {\n document.body.appendChild(imageToCache);\n imageToCache.width = imageToCache.offsetWidth;\n imageToCache.height = imageToCache.offsetHeight;\n document.body.removeChild(imageToCache);\n }\n }\n}\n\nexport default Images;\n","import util from 'vis-util';\n\n/**\n * This class can store groups and options specific for groups.\n */\nclass Groups {\n /**\n * @ignore\n */\n constructor() {\n this.clear();\n this.defaultIndex = 0;\n this.groupsArray = [];\n this.groupIndex = 0;\n\n this.defaultGroups = [\n {border: \"#2B7CE9\", background: \"#97C2FC\", highlight: {border: \"#2B7CE9\", background: \"#D2E5FF\"}, hover: {border: \"#2B7CE9\", background: \"#D2E5FF\"}}, // 0: blue\n {border: \"#FFA500\", background: \"#FFFF00\", highlight: {border: \"#FFA500\", background: \"#FFFFA3\"}, hover: {border: \"#FFA500\", background: \"#FFFFA3\"}}, // 1: yellow\n {border: \"#FA0A10\", background: \"#FB7E81\", highlight: {border: \"#FA0A10\", background: \"#FFAFB1\"}, hover: {border: \"#FA0A10\", background: \"#FFAFB1\"}}, // 2: red\n {border: \"#41A906\", background: \"#7BE141\", highlight: {border: \"#41A906\", background: \"#A1EC76\"}, hover: {border: \"#41A906\", background: \"#A1EC76\"}}, // 3: green\n {border: \"#E129F0\", background: \"#EB7DF4\", highlight: {border: \"#E129F0\", background: \"#F0B3F5\"}, hover: {border: \"#E129F0\", background: \"#F0B3F5\"}}, // 4: magenta\n {border: \"#7C29F0\", background: \"#AD85E4\", highlight: {border: \"#7C29F0\", background: \"#D3BDF0\"}, hover: {border: \"#7C29F0\", background: \"#D3BDF0\"}}, // 5: purple\n {border: \"#C37F00\", background: \"#FFA807\", highlight: {border: \"#C37F00\", background: \"#FFCA66\"}, hover: {border: \"#C37F00\", background: \"#FFCA66\"}}, // 6: orange\n {border: \"#4220FB\", background: \"#6E6EFD\", highlight: {border: \"#4220FB\", background: \"#9B9BFD\"}, hover: {border: \"#4220FB\", background: \"#9B9BFD\"}}, // 7: darkblue\n {border: \"#FD5A77\", background: \"#FFC0CB\", highlight: {border: \"#FD5A77\", background: \"#FFD1D9\"}, hover: {border: \"#FD5A77\", background: \"#FFD1D9\"}}, // 8: pink\n {border: \"#4AD63A\", background: \"#C2FABC\", highlight: {border: \"#4AD63A\", background: \"#E6FFE3\"}, hover: {border: \"#4AD63A\", background: \"#E6FFE3\"}}, // 9: mint\n\n {border: \"#990000\", background: \"#EE0000\", highlight: {border: \"#BB0000\", background: \"#FF3333\"}, hover: {border: \"#BB0000\", background: \"#FF3333\"}}, // 10:bright red\n\n {border: \"#FF6000\", background: \"#FF6000\", highlight: {border: \"#FF6000\", background: \"#FF6000\"}, hover: {border: \"#FF6000\", background: \"#FF6000\"}}, // 12: real orange\n {border: \"#97C2FC\", background: \"#2B7CE9\", highlight: {border: \"#D2E5FF\", background: \"#2B7CE9\"}, hover: {border: \"#D2E5FF\", background: \"#2B7CE9\"}}, // 13: blue\n {border: \"#399605\", background: \"#255C03\", highlight: {border: \"#399605\", background: \"#255C03\"}, hover: {border: \"#399605\", background: \"#255C03\"}}, // 14: green\n {border: \"#B70054\", background: \"#FF007E\", highlight: {border: \"#B70054\", background: \"#FF007E\"}, hover: {border: \"#B70054\", background: \"#FF007E\"}}, // 15: magenta\n {border: \"#AD85E4\", background: \"#7C29F0\", highlight: {border: \"#D3BDF0\", background: \"#7C29F0\"}, hover: {border: \"#D3BDF0\", background: \"#7C29F0\"}}, // 16: purple\n {border: \"#4557FA\", background: \"#000EA1\", highlight: {border: \"#6E6EFD\", background: \"#000EA1\"}, hover: {border: \"#6E6EFD\", background: \"#000EA1\"}}, // 17: darkblue\n {border: \"#FFC0CB\", background: \"#FD5A77\", highlight: {border: \"#FFD1D9\", background: \"#FD5A77\"}, hover: {border: \"#FFD1D9\", background: \"#FD5A77\"}}, // 18: pink\n {border: \"#C2FABC\", background: \"#74D66A\", highlight: {border: \"#E6FFE3\", background: \"#74D66A\"}, hover: {border: \"#E6FFE3\", background: \"#74D66A\"}}, // 19: mint\n\n {border: \"#EE0000\", background: \"#990000\", highlight: {border: \"#FF3333\", background: \"#BB0000\"}, hover: {border: \"#FF3333\", background: \"#BB0000\"}} // 20:bright red\n ];\n\n this.options = {};\n this.defaultOptions = {\n useDefaultGroups: true\n };\n util.extend(this.options, this.defaultOptions);\n }\n\n /**\n *\n * @param {Object} options\n */\n setOptions(options) {\n let optionFields = ['useDefaultGroups'];\n\n if (options !== undefined) {\n for (let groupName in options) {\n if (options.hasOwnProperty(groupName)) {\n if (optionFields.indexOf(groupName) === -1) {\n let group = options[groupName];\n this.add(groupName, group);\n }\n }\n }\n }\n }\n\n \n /**\n * Clear all groups\n */\n clear() {\n this.groups = {};\n this.groupsArray = [];\n }\n \n /**\n * Get group options of a groupname.\n * If groupname is not found, a new group may be created.\n *\n * @param {*} groupname Can be a number, string, Date, etc.\n * @param {boolean} [shouldCreate=true] If true, create a new group\n * @return {Object} The found or created group\n */\n get(groupname, shouldCreate = true) {\n let group = this.groups[groupname];\n\n if (group === undefined && shouldCreate) {\n if (this.options.useDefaultGroups === false && this.groupsArray.length > 0) {\n // create new group\n let index = this.groupIndex % this.groupsArray.length;\n this.groupIndex++;\n group = {};\n group.color = this.groups[this.groupsArray[index]];\n this.groups[groupname] = group;\n }\n else {\n // create new group\n let index = this.defaultIndex % this.defaultGroups.length;\n this.defaultIndex++;\n group = {};\n group.color = this.defaultGroups[index];\n this.groups[groupname] = group;\n }\n }\n \n return group;\n }\n \n /**\n * Add a custom group style\n * @param {string} groupName\n * @param {Object} style An object containing borderColor,\n * backgroundColor, etc.\n * @return {Object} group The created group object\n */\n add(groupName, style) {\n this.groups[groupName] = style;\n this.groupsArray.push(groupName);\n return style;\n }\n}\n\nexport default Groups;\n","function _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n\nmodule.exports = _arrayWithHoles;","function _iterableToArrayLimit(arr, i) {\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}\n\nmodule.exports = _iterableToArrayLimit;","function _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance\");\n}\n\nmodule.exports = _nonIterableRest;","var arrayWithHoles = require(\"./arrayWithHoles\");\n\nvar iterableToArrayLimit = require(\"./iterableToArrayLimit\");\n\nvar nonIterableRest = require(\"./nonIterableRest\");\n\nfunction _slicedToArray(arr, i) {\n return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || nonIterableRest();\n}\n\nmodule.exports = _slicedToArray;","function _typeof2(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof2 = function _typeof2(obj) { return typeof obj; }; } else { _typeof2 = function _typeof2(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof2(obj); }\n\nfunction _typeof(obj) {\n if (typeof Symbol === \"function\" && _typeof2(Symbol.iterator) === \"symbol\") {\n module.exports = _typeof = function _typeof(obj) {\n return _typeof2(obj);\n };\n } else {\n module.exports = _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : _typeof2(obj);\n };\n }\n\n return _typeof(obj);\n}\n\nmodule.exports = _typeof;","import util from 'vis-util';\n\n/**\n * Helper functions for components\n * @class\n */\nclass ComponentUtil {\n /**\n * Determine values to use for (sub)options of 'chosen'.\n *\n * This option is either a boolean or an object whose values should be examined further.\n * The relevant structures are:\n *\n * - chosen: \n * - chosen: { subOption: }\n *\n * Where subOption is 'node', 'edge' or 'label'.\n *\n * The intention of this method appears to be to set a specific priority to the options;\n * Since most properties are either bridged or merged into the local options objects, there\n * is not much point in handling them separately.\n * TODO: examine if 'most' in previous sentence can be replaced with 'all'. In that case, we\n * should be able to get rid of this method.\n *\n * @param {string} subOption option within object 'chosen' to consider; either 'node', 'edge' or 'label'\n * @param {Object} pile array of options objects to consider\n * \n * @return {boolean|function} value for passed subOption of 'chosen' to use\n */\n static choosify(subOption, pile) {\n // allowed values for subOption\n let allowed = [ 'node', 'edge', 'label'];\n let value = true;\n\n let chosen = util.topMost(pile, 'chosen');\n if (typeof chosen === 'boolean') {\n value = chosen;\n } else if (typeof chosen === 'object') {\n if (allowed.indexOf(subOption) === -1 ) {\n throw new Error('choosify: subOption \\'' + subOption + '\\' should be one of '\n + \"'\" + allowed.join(\"', '\") + \"'\");\n }\n\n let chosenEdge = util.topMost(pile, ['chosen', subOption]);\n if ((typeof chosenEdge === 'boolean') || (typeof chosenEdge === 'function')) {\n value = chosenEdge;\n }\n }\n\n return value;\n }\n\n\n /**\n * Check if the point falls within the given rectangle.\n *\n * @param {rect} rect\n * @param {point} point\n * @param {rotationPoint} [rotationPoint] if specified, the rotation that applies to the rectangle.\n * @returns {boolean} true if point within rectangle, false otherwise\n * @static\n */\n static pointInRect(rect, point, rotationPoint) {\n if (rect.width <= 0 || rect.height <= 0) {\n return false; // early out\n }\n\n if (rotationPoint !== undefined) {\n // Rotate the point the same amount as the rectangle\n var tmp = {\n x: point.x - rotationPoint.x,\n y: point.y - rotationPoint.y\n };\n\n if (rotationPoint.angle !== 0) {\n // In order to get the coordinates the same, you need to \n // rotate in the reverse direction\n var angle = -rotationPoint.angle;\n\n var tmp2 = {\n x: Math.cos(angle)*tmp.x - Math.sin(angle)*tmp.y,\n y: Math.sin(angle)*tmp.x + Math.cos(angle)*tmp.y\n };\n point = tmp2;\n } else {\n point = tmp;\n }\n\n // Note that if a rotation is specified, the rectangle coordinates\n // are **not* the full canvas coordinates. They are relative to the\n // rotationPoint. Hence, the point coordinates need not be translated\n // back in this case.\n }\n\n var right = rect.x + rect.width;\n var bottom = rect.y + rect.width;\n\n return (\n rect.left < point.x &&\n right > point.x &&\n rect.top < point.y &&\n bottom > point.y\n );\n }\n\n\n /**\n * Check if given value is acceptable as a label text.\n *\n * @param {*} text value to check; can be anything at this point\n * @returns {boolean} true if valid label value, false otherwise\n */\n static isValidLabel(text) {\n // Note that this is quite strict: types that *might* be converted to string are disallowed\n return (typeof text === 'string' && text !== '');\n }\n}\n\nexport default ComponentUtil;\n","/**\n * Callback to determine text dimensions, using the parent label settings.\n * @callback MeasureText\n * @param {text} text\n * @param {text} mod\n * @return {Object} { width, values} width in pixels and font attributes\n */\n\n\n/**\n * Helper class for Label which collects results of splitting labels into lines and blocks.\n *\n * @private\n */\nclass LabelAccumulator {\n\n /**\n * @param {MeasureText} measureText\n */\n constructor(measureText) {\n this.measureText = measureText;\n this.current = 0;\n this.width = 0;\n this.height = 0;\n this.lines = [];\n }\n\n\n /**\n * Append given text to the given line.\n *\n * @param {number} l index of line to add to\n * @param {string} text string to append to line\n * @param {'bold'|'ital'|'boldital'|'mono'|'normal'} [mod='normal']\n * @private\n */\n _add(l, text, mod = 'normal') { \n\n if (this.lines[l] === undefined) {\n this.lines[l] = {\n width : 0,\n height: 0,\n blocks: []\n };\n }\n\n // We still need to set a block for undefined and empty texts, hence return at this point\n // This is necessary because we don't know at this point if we're at the\n // start of an empty line or not.\n // To compensate, empty blocks are removed in `finalize()`.\n //\n // Empty strings should still have a height\n let tmpText = text;\n if (text === undefined || text === \"\") tmpText = \" \";\n\n // Determine width and get the font properties\n let result = this.measureText(tmpText, mod);\n let block = Object.assign({}, result.values);\n block.text = text;\n block.width = result.width;\n block.mod = mod;\n\n if (text === undefined || text === \"\") {\n block.width = 0;\n }\n\n this.lines[l].blocks.push(block);\n\n // Update the line width. We need this for determining if a string goes over max width\n this.lines[l].width += block.width;\n }\n\n\n /**\n * Returns the width in pixels of the current line.\n *\n * @returns {number}\n */\n curWidth() {\n let line = this.lines[this.current];\n if (line === undefined) return 0;\n\n return line.width;\n }\n\n\n /**\n * Add text in block to current line\n *\n * @param {string} text\n * @param {'bold'|'ital'|'boldital'|'mono'|'normal'} [mod='normal']\n */\n append(text, mod = 'normal') { \n this._add(this.current, text, mod);\n }\n\n\n /**\n * Add text in block to current line and start a new line\n *\n * @param {string} text\n * @param {'bold'|'ital'|'boldital'|'mono'|'normal'} [mod='normal']\n */\n newLine(text, mod = 'normal') {\n this._add(this.current, text, mod);\n this.current++;\n }\n\n\n /**\n * Determine and set the heights of all the lines currently contained in this instance\n *\n * Note that width has already been set.\n * \n * @private\n */\n determineLineHeights() {\n for (let k = 0; k < this.lines.length; k++) {\n let line = this.lines[k];\n\n // Looking for max height of blocks in line\n let height = 0;\n\n if (line.blocks !== undefined) { // Can happen if text contains e.g. '\\n '\n for (let l = 0; l < line.blocks.length; l++) {\n let block = line.blocks[l];\n\n if (height < block.height) {\n height = block.height;\n }\n }\n }\n \n line.height = height;\n }\n }\n\n\n /**\n * Determine the full size of the label text, as determined by current lines and blocks\n * \n * @private\n */\n determineLabelSize() {\n let width = 0;\n let height = 0;\n for (let k = 0; k < this.lines.length; k++) {\n let line = this.lines[k];\n\n if (line.width > width) {\n width = line.width;\n }\n height += line.height;\n }\n\n this.width = width;\n this.height = height;\n }\n\n\n /**\n * Remove all empty blocks and empty lines we don't need\n * \n * This must be done after the width/height determination,\n * so that these are set properly for processing here.\n *\n * @returns {Array} Lines with empty blocks (and some empty lines) removed\n * @private\n */\n removeEmptyBlocks() {\n let tmpLines = [];\n for (let k = 0; k < this.lines.length; k++) {\n let line = this.lines[k];\n\n // Note: an empty line in between text has width zero but is still relevant to layout.\n // So we can't use width for testing empty line here\n if (line.blocks.length === 0) continue;\n\n // Discard final empty line always\n if(k === this.lines.length - 1) {\n if (line.width === 0) continue;\n }\n\n let tmpLine = {};\n Object.assign(tmpLine, line);\n tmpLine.blocks = [];\n\n let firstEmptyBlock;\n let tmpBlocks = []\n for (let l = 0; l < line.blocks.length; l++) {\n let block = line.blocks[l];\n if (block.width !== 0) {\n tmpBlocks.push(block);\n } else {\n if (firstEmptyBlock === undefined) {\n firstEmptyBlock = block;\n }\n }\n }\n\n // Ensure that there is *some* text present\n if (tmpBlocks.length === 0 && firstEmptyBlock !== undefined) {\n tmpBlocks.push(firstEmptyBlock);\n }\n\n tmpLine.blocks = tmpBlocks;\n\n tmpLines.push(tmpLine);\n }\n\n return tmpLines;\n }\n\n\n /**\n * Set the sizes for all lines and the whole thing.\n *\n * @returns {{width: (number|*), height: (number|*), lines: Array}}\n */\n finalize() {\n //console.log(JSON.stringify(this.lines, null, 2));\n\n this.determineLineHeights();\n this.determineLabelSize();\n let tmpLines = this.removeEmptyBlocks();\n\n\n // Return a simple hash object for further processing.\n return {\n width : this.width,\n height: this.height,\n lines : tmpLines\n }\n }\n} \n\n\nexport default LabelAccumulator;\n","import LabelAccumulator from './LabelAccumulator';\nimport ComponentUtil from './ComponentUtil';\n\n// Hash of prepared regexp's for tags\nvar tagPattern = {\n // HTML\n '': //,\n '': //,\n '': //,\n '': /<\\/b>/,\n '': /<\\/i>/,\n '': /<\\/code>/,\n // Markdown\n '*': /\\*/, // bold\n '_': /\\_/, // ital\n '`': /`/, // mono\n 'afterBold': /[^\\*]/,\n 'afterItal': /[^_]/,\n 'afterMono': /[^`]/,\n};\n\n\n/**\n * Internal helper class for parsing the markup tags for HTML and Markdown.\n *\n * NOTE: Sequences of tabs and spaces are reduced to single space.\n * Scan usage of `this.spacing` within method\n */\nclass MarkupAccumulator {\n\n /**\n * Create an instance\n *\n * @param {string} text text to parse for markup\n */\n constructor(text) {\n this.text = text;\n this.bold = false;\n this.ital = false;\n this.mono = false;\n this.spacing = false;\n this.position = 0;\n this.buffer = \"\";\n this.modStack = [];\n\n this.blocks = [];\n }\n\n\n /**\n * Return the mod label currently on the top of the stack\n *\n * @returns {string} label of topmost mod \n * @private\n */\n mod() {\n return (this.modStack.length === 0) ? 'normal' : this.modStack[0];\n }\n\n\n /**\n * Return the mod label currently active\n * \n * @returns {string} label of active mod \n * @private\n */\n modName() {\n if (this.modStack.length === 0)\n return 'normal';\n else if (this.modStack[0] === 'mono')\n return 'mono';\n else {\n if (this.bold && this.ital) {\n return 'boldital';\n } else if (this.bold) {\n return 'bold';\n } else if (this.ital) {\n return 'ital';\n }\n }\n }\n\n\n /**\n * @private\n */\n emitBlock() {\n if (this.spacing) {\n this.add(\" \");\n this.spacing = false;\n }\n if (this.buffer.length > 0) {\n this.blocks.push({ text: this.buffer, mod: this.modName() });\n this.buffer = \"\";\n }\n }\n\n\n /**\n * Output text to buffer\n *\n * @param {string} text text to add\n * @private\n */\n add(text) {\n if (text === \" \") {\n this.spacing = true;\n }\n if (this.spacing) {\n this.buffer += \" \";\n this.spacing = false;\n }\n if (text != \" \") {\n this.buffer += text;\n }\n }\n\n\n /**\n * Handle parsing of whitespace\n *\n * @param {string} ch the character to check\n * @returns {boolean} true if the character was processed as whitespace, false otherwise\n */\n parseWS(ch) {\n if (/[ \\t]/.test(ch)) {\n if (!this.mono) {\n this.spacing = true;\n } else {\n this.add(ch);\n }\n return true;\n }\n\n return false;\n }\n\n\n /**\n * @param {string} tagName label for block type to set\n * @private\n */\n setTag(tagName) {\n this.emitBlock();\n this[tagName] = true;\n this.modStack.unshift(tagName);\n }\n\n\n /**\n * @param {string} tagName label for block type to unset\n * @private\n */\n unsetTag(tagName) {\n this.emitBlock();\n this[tagName] = false;\n this.modStack.shift();\n }\n\n\n /**\n * @param {string} tagName label for block type we are currently processing\n * @param {string|RegExp} tag string to match in text\n * @returns {boolean} true if the tag was processed, false otherwise\n */\n parseStartTag(tagName, tag) {\n // Note: if 'mono' passed as tagName, there is a double check here. This is OK\n if (!this.mono && !this[tagName] && this.match(tag)) {\n this.setTag(tagName);\n return true;\n }\n\n return false;\n }\n\n\n /**\n * @param {string|RegExp} tag\n * @param {number} [advance=true] if set, advance current position in text\n * @returns {boolean} true if match at given position, false otherwise\n * @private\n */\n match(tag, advance = true) {\n let [regExp, length] = this.prepareRegExp(tag);\n let matched = regExp.test(this.text.substr(this.position, length));\n\n if (matched && advance) {\n this.position += length - 1;\n }\n\n return matched;\n }\n\n\n /**\n * @param {string} tagName label for block type we are currently processing\n * @param {string|RegExp} tag string to match in text\n * @param {RegExp} [nextTag] regular expression to match for characters *following* the current tag \n * @returns {boolean} true if the tag was processed, false otherwise\n */\n parseEndTag(tagName, tag, nextTag) {\n let checkTag = (this.mod() === tagName);\n if (tagName === 'mono') { // special handling for 'mono'\n checkTag = checkTag && this.mono;\n } else {\n checkTag = checkTag && !this.mono;\n }\n\n if (checkTag && this.match(tag)) {\n if (nextTag !== undefined) {\n // Purpose of the following match is to prevent a direct unset/set of a given tag\n // E.g. '*bold **still bold*' => '*bold still bold*'\n if ((this.position === this.text.length-1) || this.match(nextTag, false)) {\n this.unsetTag(tagName);\n }\n } else {\n this.unsetTag(tagName);\n }\n\n return true;\n }\n\n return false;\n }\n\n\n /**\n * @param {string|RegExp} tag string to match in text\n * @param {value} value string to replace tag with, if found at current position\n * @returns {boolean} true if the tag was processed, false otherwise\n */\n replace(tag, value) {\n if (this.match(tag)) {\n this.add(value);\n this.position += length - 1;\n return true;\n }\n\n return false;\n }\n\n\n /**\n * Create a regular expression for the tag if it isn't already one.\n *\n * The return value is an array `[RegExp, number]`, with exactly two value, where:\n * - RegExp is the regular expression to use\n * - number is the lenth of the input string to match\n *\n * @param {string|RegExp} tag string to match in text\n * @returns {Array} regular expression to use and length of input string to match\n * @private\n */\n prepareRegExp(tag) {\n let length;\n let regExp;\n if (tag instanceof RegExp) {\n regExp = tag;\n length = 1; // ASSUMPTION: regexp only tests one character\n } else {\n // use prepared regexp if present\n var prepared = tagPattern[tag];\n if (prepared !== undefined) {\n regExp = prepared;\n } else {\n regExp = new RegExp(tag);\n }\n\n length = tag.length;\n }\n\n return [regExp, length];\n }\n}\n\n\n/**\n * Helper class for Label which explodes the label text into lines and blocks within lines\n *\n * @private\n */\nclass LabelSplitter {\n\n /**\n * @param {CanvasRenderingContext2D} ctx Canvas rendering context\n * @param {Label} parent reference to the Label instance using current instance\n * @param {boolean} selected \n * @param {boolean} hover\n */\n constructor(ctx, parent, selected, hover) {\n this.ctx = ctx;\n this.parent = parent;\n this.selected = selected;\n this.hover = hover;\n\n /**\n * Callback to determine text width; passed to LabelAccumulator instance\n *\n * @param {String} text string to determine width of\n * @param {String} mod font type to use for this text\n * @return {Object} { width, values} width in pixels and font attributes\n */\n let textWidth = (text, mod) => {\n if (text === undefined) return 0;\n\n // TODO: This can be done more efficiently with caching\n // This will set the ctx.font correctly, depending on selected/hover and mod - so that ctx.measureText() will be accurate.\n let values = this.parent.getFormattingValues(ctx, selected, hover, mod);\n\n let width = 0;\n if (text !== '') {\n let measure = this.ctx.measureText(text);\n width = measure.width;\n }\n\n return {width, values: values};\n };\n\n\n this.lines = new LabelAccumulator(textWidth);\n }\n\n\n /**\n * Split passed text of a label into lines and blocks.\n *\n * # NOTE\n *\n * The handling of spacing is option dependent:\n *\n * - if `font.multi : false`, all spaces are retained\n * - if `font.multi : true`, every sequence of spaces is compressed to a single space\n *\n * This might not be the best way to do it, but this is as it has been working till now.\n * In order not to break existing functionality, for the time being this behaviour will\n * be retained in any code changes. \n *\n * @param {string} text text to split\n * @returns {Array}\n */\n process(text) {\n if (!ComponentUtil.isValidLabel(text)) {\n return this.lines.finalize();\n }\n\n var font = this.parent.fontOptions;\n\n // Normalize the end-of-line's to a single representation - order important\n text = text.replace(/\\r\\n/g, '\\n'); // Dos EOL's\n text = text.replace(/\\r/g, '\\n'); // Mac EOL's\n\n // Note that at this point, there can be no \\r's in the text.\n // This is used later on splitStringIntoLines() to split multifont texts.\n\n let nlLines = String(text).split('\\n');\n let lineCount = nlLines.length;\n\n if (font.multi) {\n // Multi-font case: styling tags active\n for (let i = 0; i < lineCount; i++) {\n let blocks = this.splitBlocks(nlLines[i], font.multi);\n // Post: Sequences of tabs and spaces are reduced to single space\n\n if (blocks === undefined) continue;\n\n if (blocks.length === 0) {\n this.lines.newLine(\"\");\n continue;\n }\n\n if (font.maxWdt > 0) {\n // widthConstraint.maximum defined\n //console.log('Running widthConstraint multi, max: ' + this.fontOptions.maxWdt);\n for (let j = 0; j < blocks.length; j++) {\n let mod = blocks[j].mod;\n let text = blocks[j].text;\n this.splitStringIntoLines(text, mod, true);\n }\n } else {\n // widthConstraint.maximum NOT defined\n for (let j = 0; j < blocks.length; j++) {\n let mod = blocks[j].mod;\n let text = blocks[j].text;\n this.lines.append(text, mod); \n }\n }\n\n this.lines.newLine();\n }\n } else {\n // Single-font case\n if (font.maxWdt > 0) {\n // widthConstraint.maximum defined\n // console.log('Running widthConstraint normal, max: ' + this.fontOptions.maxWdt);\n for (let i = 0; i < lineCount; i++) {\n this.splitStringIntoLines(nlLines[i]);\n }\n } else {\n // widthConstraint.maximum NOT defined\n for (let i = 0; i < lineCount; i++) {\n this.lines.newLine(nlLines[i]); \n }\n }\n }\n \n return this.lines.finalize();\n }\n\n\n /**\n * normalize the markup system\n *\n * @param {boolean|'md'|'markdown'|'html'} markupSystem\n * @returns {string}\n */\n decodeMarkupSystem(markupSystem) {\n let system = 'none';\n if (markupSystem === 'markdown' || markupSystem === 'md') {\n system = 'markdown';\n } else if (markupSystem === true || markupSystem === 'html') {\n system = 'html'\n }\n return system;\n }\n\n\n /**\n *\n * @param {string} text\n * @returns {Array}\n */\n splitHtmlBlocks(text) {\n let s = new MarkupAccumulator(text);\n\n let parseEntities = (ch) => {\n if (/&/.test(ch)) {\n let parsed = s.replace(s.text, '<', '<')\n || s.replace(s.text, '&', '&');\n\n if (!parsed) {\n s.add(\"&\");\n }\n\n return true;\n }\n\n return false;\n };\n\n while (s.position < s.text.length) {\n let ch = s.text.charAt(s.position);\n\n let parsed = s.parseWS(ch)\n || (/')\n || s.parseStartTag('ital', '')\n || s.parseStartTag('mono', '')\n || s.parseEndTag('bold', '')\n || s.parseEndTag('ital', '')\n || s.parseEndTag('mono', '')))\n || parseEntities(ch);\n\n if (!parsed) {\n s.add(ch);\n }\n s.position++\n }\n s.emitBlock();\n return s.blocks;\n }\n\n\n /**\n *\n * @param {string} text\n * @returns {Array}\n */\n splitMarkdownBlocks(text) {\n let s = new MarkupAccumulator(text); \n let beginable = true;\n\n let parseOverride = (ch) => {\n if (/\\\\/.test(ch)) {\n if (s.position < this.text.length + 1) {\n s.position++;\n ch = this.text.charAt(s.position);\n if (/ \\t/.test(ch)) {\n s.spacing = true;\n } else {\n s.add(ch);\n beginable = false;\n }\n }\n\n return true\n }\n\n return false;\n }\n\n while (s.position < s.text.length) {\n let ch = s.text.charAt(s.position);\n\n let parsed = s.parseWS(ch)\n || parseOverride(ch)\n || ((beginable || s.spacing) && (\n s.parseStartTag('bold', '*')\n || s.parseStartTag('ital', '_')\n || s.parseStartTag('mono', '`')))\n || s.parseEndTag('bold', '*', 'afterBold')\n || s.parseEndTag('ital', '_', 'afterItal')\n || s.parseEndTag('mono', '`', 'afterMono');\n\n if (!parsed) {\n s.add(ch);\n beginable = false;\n }\n s.position++\n }\n s.emitBlock();\n return s.blocks;\n }\n\n\n /**\n * Explodes a piece of text into single-font blocks using a given markup\n *\n * @param {string} text\n * @param {boolean|'md'|'markdown'|'html'} markupSystem\n * @returns {Array.<{text: string, mod: string}>}\n * @private\n */\n splitBlocks(text, markupSystem) {\n let system = this.decodeMarkupSystem(markupSystem);\n if (system === 'none') {\n return [{\n text: text,\n mod: 'normal'\n }]\n } else if (system === 'markdown') {\n return this.splitMarkdownBlocks(text);\n } else if (system === 'html') {\n return this.splitHtmlBlocks(text);\n }\n }\n\n\n /**\n * @param {string} text\n * @returns {boolean} true if text length over the current max with\n * @private\n */\n overMaxWidth(text) {\n let width = this.ctx.measureText(text).width;\n return (this.lines.curWidth() + width > this.parent.fontOptions.maxWdt);\n }\n\n\n /**\n * Determine the longest part of the sentence which still fits in the \n * current max width.\n * \n * @param {Array} words Array of strings signifying a text lines\n * @return {number} index of first item in string making string go over max\n * @private\n */\n getLongestFit(words) {\n let text = '';\n let w = 0;\n\n while (w < words.length) {\n let pre = (text === '') ? '' : ' ';\n let newText = text + pre + words[w];\n\n if (this.overMaxWidth(newText)) break;\n text = newText;\n w++;\n }\n\n return w;\n }\n\n\n /**\n * Determine the longest part of the string which still fits in the\n * current max width.\n * \n * @param {Array} words Array of strings signifying a text lines\n * @return {number} index of first item in string making string go over max\n */\n getLongestFitWord(words) {\n let w = 0;\n\n while (w < words.length) {\n if (this.overMaxWidth(words.slice(0,w))) break;\n w++;\n }\n\n return w;\n }\n\n\n /**\n * Split the passed text into lines, according to width constraint (if any).\n * \n * The method assumes that the input string is a single line, i.e. without lines break.\n *\n * This method retains spaces, if still present (case `font.multi: false`).\n * A space which falls on an internal line break, will be replaced by a newline.\n * There is no special handling of tabs; these go along with the flow.\n * \n * @param {string} str\n * @param {string} [mod='normal']\n * @param {boolean} [appendLast=false]\n * @private\n */\n splitStringIntoLines(str, mod = 'normal', appendLast = false) {\n // Set the canvas context font, based upon the current selected/hover state\n // and the provided mod, so the text measurement performed by getLongestFit\n // will be accurate - and not just use the font of whoever last used the canvas.\n this.parent.getFormattingValues(this.ctx, this.selected, this.hover, mod)\n\n // Still-present spaces are relevant, retain them\n str = str.replace(/^( +)/g, '$1\\r');\n str = str.replace(/([^\\r][^ ]*)( +)/g, '$1\\r$2\\r');\n let words = str.split('\\r');\n\n while (words.length > 0) {\n let w = this.getLongestFit(words);\n\n if (w === 0) {\n // Special case: the first word is already larger than the max width.\n let word = words[0];\n\n // Break the word to the largest part that fits the line\n let x = this.getLongestFitWord(word);\n this.lines.newLine(word.slice(0, x), mod);\n\n // Adjust the word, so that the rest will be done next iteration\n words[0] = word.slice(x);\n } else {\n // skip any space that is replaced by a newline\n let newW = w;\n if (words[w - 1] === ' ') {\n w--;\n } else if (words[newW] === ' ') {\n newW++;\n }\n\n let text = words.slice(0, w).join(\"\");\n\n if (w == words.length && appendLast) {\n this.lines.append(text, mod); \n } else {\n this.lines.newLine(text, mod); \n }\n\n // Adjust the word, so that the rest will be done next iteration\n words = words.slice(newW);\n }\n }\n }\n} \n\nexport default LabelSplitter;\n","import util from 'vis-util';\nimport ComponentUtil from './ComponentUtil';\nimport LabelSplitter from './LabelSplitter';\n\n\n/**\n * List of special styles for multi-fonts\n * @private\n */\nconst multiFontStyle = ['bold', 'ital', 'boldital', 'mono'];\n\n\n/**\n * A Label to be used for Nodes or Edges.\n */\nclass Label {\n\n /**\n * @param {Object} body\n * @param {Object} options\n * @param {boolean} [edgelabel=false]\n */\n constructor(body, options, edgelabel = false) {\n this.body = body;\n this.pointToSelf = false;\n this.baseSize = undefined;\n this.fontOptions = {}; // instance variable containing the *instance-local* font options\n this.setOptions(options);\n this.size = {top: 0, left: 0, width: 0, height: 0, yLine: 0};\n this.isEdgeLabel = edgelabel;\n }\n\n\n /**\n * @param {Object} options the options of the parent Node-instance\n */\n setOptions(options) {\n this.elementOptions = options; // Reference to the options of the parent Node-instance \n\n this.initFontOptions(options.font);\n\n if (ComponentUtil.isValidLabel(options.label)) {\n this.labelDirty = true;\n } else {\n // Bad label! Change the option value to prevent bad stuff happening\n options.label = undefined\n }\n\n if (options.font !== undefined && options.font !== null) { // font options can be deleted at various levels\n if (typeof options.font === 'string') {\n this.baseSize = this.fontOptions.size;\n }\n else if (typeof options.font === 'object') {\n let size = options.font.size;\n \n if (size !== undefined) {\n this.baseSize = size;\n }\n }\n }\n }\n\n\n /**\n * Init the font Options structure.\n *\n * Member fontOptions serves as an accumulator for the current font options.\n * As such, it needs to be completely separated from the node options.\n *\n * @param {Object} newFontOptions the new font options to process\n * @private\n */\n initFontOptions(newFontOptions) {\n // Prepare the multi-font option objects.\n // These will be filled in propagateFonts(), if required\n util.forEach(multiFontStyle, (style) => {\n this.fontOptions[style] = {};\n });\n\n // Handle shorthand option, if present\n if (Label.parseFontString(this.fontOptions, newFontOptions)) {\n this.fontOptions.vadjust = 0;\n return;\n }\n\n // Copy over the non-multifont options, if specified\n util.forEach(newFontOptions, (prop, n) => {\n if (prop !== undefined && prop !== null && typeof prop !== 'object') {\n this.fontOptions[n] = prop;\n }\n });\n }\n\n\n /**\n * If in-variable is a string, parse it as a font specifier.\n *\n * Note that following is not done here and have to be done after the call:\n * - Not all font options are set (vadjust, mod)\n *\n * @param {Object} outOptions out-parameter, object in which to store the parse results (if any)\n * @param {Object} inOptions font options to parse\n * @return {boolean} true if font parsed as string, false otherwise\n * @static\n */\n static parseFontString(outOptions, inOptions) {\n if (!inOptions || typeof inOptions !== 'string') return false;\n\n let newOptionsArray = inOptions.split(\" \");\n\n outOptions.size = +newOptionsArray[0].replace(\"px\",'');\n outOptions.face = newOptionsArray[1];\n outOptions.color = newOptionsArray[2];\n\n return true;\n }\n\n\n /**\n * Set the width and height constraints based on 'nearest' value\n *\n * @param {Array} pile array of option objects to consider\n * @returns {object} the actual constraint values to use\n * @private\n */\n constrain(pile) {\n // NOTE: constrainWidth and constrainHeight never set!\n // NOTE: for edge labels, only 'maxWdt' set\n // Node labels can set all the fields\n let fontOptions = {\n constrainWidth: false,\n maxWdt: -1,\n minWdt: -1,\n constrainHeight: false,\n minHgt: -1,\n valign: 'middle',\n }\n\n let widthConstraint = util.topMost(pile, 'widthConstraint');\n if (typeof widthConstraint === 'number') {\n fontOptions.maxWdt = Number(widthConstraint);\n fontOptions.minWdt = Number(widthConstraint);\n } else if (typeof widthConstraint === 'object') {\n let widthConstraintMaximum = util.topMost(pile, ['widthConstraint', 'maximum']);\n if (typeof widthConstraintMaximum === 'number') {\n fontOptions.maxWdt = Number(widthConstraintMaximum);\n }\n let widthConstraintMinimum = util.topMost(pile, ['widthConstraint', 'minimum'])\n if (typeof widthConstraintMinimum === 'number') {\n fontOptions.minWdt = Number(widthConstraintMinimum);\n }\n }\n\n\n let heightConstraint = util.topMost(pile, 'heightConstraint');\n if (typeof heightConstraint === 'number') {\n fontOptions.minHgt = Number(heightConstraint);\n } else if (typeof heightConstraint === 'object') {\n let heightConstraintMinimum = util.topMost(pile, ['heightConstraint', 'minimum']);\n if (typeof heightConstraintMinimum === 'number') {\n fontOptions.minHgt = Number(heightConstraintMinimum);\n }\n let heightConstraintValign = util.topMost(pile, ['heightConstraint', 'valign']);\n if (typeof heightConstraintValign === 'string') {\n if ((heightConstraintValign === 'top')|| (heightConstraintValign === 'bottom')) {\n fontOptions.valign = heightConstraintValign;\n }\n }\n }\n\n return fontOptions;\n }\n\n\n /**\n * Set options and update internal state\n *\n * @param {Object} options options to set\n * @param {Array} pile array of option objects to consider for option 'chosen'\n */\n update(options, pile) {\n this.setOptions(options, true);\n this.propagateFonts(pile);\n util.deepExtend(this.fontOptions, this.constrain(pile));\n this.fontOptions.chooser = ComponentUtil.choosify('label', pile);\n }\n\n\n /**\n * When margins are set in an element, adjust sizes is called to remove them\n * from the width/height constraints. This must be done prior to label sizing.\n *\n * @param {{top: number, right: number, bottom: number, left: number}} margins\n */\n adjustSizes(margins) {\n let widthBias = (margins) ? (margins.right + margins.left) : 0;\n if (this.fontOptions.constrainWidth) {\n this.fontOptions.maxWdt -= widthBias;\n this.fontOptions.minWdt -= widthBias;\n }\n let heightBias = (margins) ? (margins.top + margins.bottom) : 0;\n if (this.fontOptions.constrainHeight) {\n this.fontOptions.minHgt -= heightBias;\n }\n }\n\n\n/////////////////////////////////////////////////////////\n// Methods for handling options piles\n// Eventually, these will be moved to a separate class\n/////////////////////////////////////////////////////////\n\n /**\n * Add the font members of the passed list of option objects to the pile.\n *\n * @param {Pile} dstPile pile of option objects add to \n * @param {Pile} srcPile pile of option objects to take font options from\n * @private\n */\n addFontOptionsToPile(dstPile, srcPile) {\n for (let i = 0; i < srcPile.length; ++i) {\n this.addFontToPile(dstPile, srcPile[i]);\n }\n }\n\n\n /**\n * Add given font option object to the list of objects (the 'pile') to consider for determining\n * multi-font option values.\n *\n * @param {Pile} pile pile of option objects to use\n * @param {object} options instance to add to pile\n * @private\n */\n addFontToPile(pile, options) {\n if (options === undefined) return;\n if (options.font === undefined || options.font === null) return;\n\n let item = options.font;\n pile.push(item);\n }\n\n\n /**\n * Collect all own-property values from the font pile that aren't multi-font option objectss.\n *\n * @param {Pile} pile pile of option objects to use\n * @returns {object} object with all current own basic font properties\n * @private\n */\n getBasicOptions(pile) {\n let ret = {};\n\n // Scans the whole pile to get all options present\n for (let n = 0; n < pile.length; ++n) {\n let fontOptions = pile[n];\n\n // Convert shorthand if necessary\n let tmpShorthand = {};\n if (Label.parseFontString(tmpShorthand, fontOptions)) {\n fontOptions = tmpShorthand;\n }\n\n util.forEach(fontOptions, (opt, name) => {\n if (opt === undefined) return; // multi-font option need not be present \n if (ret.hasOwnProperty(name)) return; // Keep first value we encounter\n\n if (multiFontStyle.indexOf(name) !== -1) {\n // Skip multi-font properties but we do need the structure\n ret[name] = {};\n } else {\n ret[name] = opt;\n }\n });\n }\n\n return ret;\n }\n\n\n /**\n * Return the value for given option for the given multi-font.\n *\n * All available option objects are trawled in the set order to construct the option values.\n *\n * ---------------------------------------------------------------------\n * ## Traversal of pile for multi-fonts\n *\n * The determination of multi-font option values is a special case, because any values not\n * present in the multi-font options should by definition be taken from the main font options,\n * i.e. from the current 'parent' object of the multi-font option.\n *\n * ### Search order for multi-fonts\n *\n * 'bold' used as example:\n *\n * - search in option group 'bold' in local properties\n * - search in main font option group in local properties\n *\n * ---------------------------------------------------------------------\n *\n * @param {Pile} pile pile of option objects to use\n * @param {MultiFontStyle} multiName sub path for the multi-font\n * @param {string} option the option to search for, for the given multi-font\n * @returns {string|number} the value for the given option\n * @private\n */\n getFontOption(pile, multiName, option) {\n let multiFont;\n\n // Search multi font in local properties\n for (let n = 0; n < pile.length; ++n) {\n let fontOptions = pile[n];\n\n if (fontOptions.hasOwnProperty(multiName)) {\n multiFont = fontOptions[multiName];\n if (multiFont === undefined || multiFont === null) continue;\n\n // Convert shorthand if necessary\n // TODO: inefficient to do this conversion every time; find a better way.\n let tmpShorthand = {};\n if (Label.parseFontString(tmpShorthand, multiFont)) {\n multiFont = tmpShorthand;\n }\n\n if (multiFont.hasOwnProperty(option)) {\n return multiFont[option];\n }\n }\n }\n\n // Option is not mentioned in the multi font options; take it from the parent font options.\n // These have already been converted with getBasicOptions(), so use the converted values.\n if (this.fontOptions.hasOwnProperty(option)) {\n return this.fontOptions[option];\n }\n\n // A value **must** be found; you should never get here.\n throw new Error(\"Did not find value for multi-font for property: '\" + option + \"'\");\n }\n\n\n /**\n * Return all options values for the given multi-font.\n *\n * All available option objects are trawled in the set order to construct the option values.\n *\n * @param {Pile} pile pile of option objects to use\n * @param {MultiFontStyle} multiName sub path for the mod-font\n * @returns {MultiFontOptions}\n * @private\n */\n getFontOptions(pile, multiName) {\n let result = {};\n let optionNames = ['color', 'size', 'face', 'mod', 'vadjust']; // List of allowed options per multi-font\n\n for (let i = 0; i < optionNames.length; ++i) {\n let mod = optionNames[i];\n result[mod] = this.getFontOption(pile, multiName, mod);\n }\n\n return result;\n }\n\n/////////////////////////////////////////////////////////\n// End methods for handling options piles\n/////////////////////////////////////////////////////////\n\n\n /**\n * Collapse the font options for the multi-font to single objects, from\n * the chain of option objects passed (the 'pile').\n *\n * @param {Pile} pile sequence of option objects to consider.\n * First item in list assumed to be the newly set options.\n */\n propagateFonts(pile) {\n let fontPile = []; // sequence of font objects to consider, order important\n\n // Note that this.elementOptions is not used here.\n this.addFontOptionsToPile(fontPile, pile);\n this.fontOptions = this.getBasicOptions(fontPile);\n\n // We set multifont values even if multi === false, for consistency (things break otherwise)\n for (let i = 0; i < multiFontStyle.length; ++i) {\n let mod = multiFontStyle[i];\n let modOptions = this.fontOptions[mod];\n let tmpMultiFontOptions = this.getFontOptions(fontPile, mod);\n\n // Copy over found values\n util.forEach(tmpMultiFontOptions, (option, n) => {\n modOptions[n] = option;\n });\n\n modOptions.size = Number(modOptions.size);\n modOptions.vadjust = Number(modOptions.vadjust);\n }\n }\n\n\n /**\n * Main function. This is called from anything that wants to draw a label.\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} x\n * @param {number} y\n * @param {boolean} selected\n * @param {boolean} hover\n * @param {string} [baseline='middle']\n */\n draw(ctx, x, y, selected, hover, baseline = 'middle') {\n // if no label, return\n if (this.elementOptions.label === undefined)\n return;\n\n // check if we have to render the label\n let viewFontSize = this.fontOptions.size * this.body.view.scale;\n if (this.elementOptions.label && viewFontSize < this.elementOptions.scaling.label.drawThreshold - 1)\n return;\n\n // This ensures that there will not be HUGE letters on screen\n // by setting an upper limit on the visible text size (regardless of zoomLevel)\n if (viewFontSize >= this.elementOptions.scaling.label.maxVisible) {\n viewFontSize = Number(this.elementOptions.scaling.label.maxVisible) / this.body.view.scale;\n }\n\n // update the size cache if required\n this.calculateLabelSize(ctx, selected, hover, x, y, baseline);\n this._drawBackground(ctx);\n this._drawText(ctx, x, this.size.yLine, baseline, viewFontSize);\n }\n\n\n /**\n * Draws the label background\n * @param {CanvasRenderingContext2D} ctx\n * @private\n */\n _drawBackground(ctx) {\n if (this.fontOptions.background !== undefined && this.fontOptions.background !== \"none\") {\n ctx.fillStyle = this.fontOptions.background;\n let size = this.getSize();\n ctx.fillRect(size.left, size.top, size.width, size.height);\n }\n }\n\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} x\n * @param {number} y\n * @param {string} [baseline='middle']\n * @param {number} viewFontSize \n * @private\n */\n _drawText(ctx, x, y, baseline = 'middle', viewFontSize) {\n [x, y] = this._setAlignment(ctx, x, y, baseline);\n\n ctx.textAlign = 'left';\n x = x - this.size.width / 2; // Shift label 1/2-distance to the left\n if ((this.fontOptions.valign) && (this.size.height > this.size.labelHeight)) {\n if (this.fontOptions.valign === 'top') {\n y -= (this.size.height - this.size.labelHeight) / 2;\n }\n if (this.fontOptions.valign === 'bottom') {\n y += (this.size.height - this.size.labelHeight) / 2;\n }\n }\n\n // draw the text\n for (let i = 0; i < this.lineCount; i++) {\n let line = this.lines[i];\n if (line && line.blocks) {\n let width = 0;\n if (this.isEdgeLabel || this.fontOptions.align === 'center') {\n width += (this.size.width - line.width) / 2\n } else if (this.fontOptions.align === 'right') {\n width += (this.size.width - line.width)\n }\n for (let j = 0; j < line.blocks.length; j++) {\n let block = line.blocks[j];\n ctx.font = block.font;\n let [fontColor, strokeColor] = this._getColor(block.color, viewFontSize, block.strokeColor);\n if (block.strokeWidth > 0) {\n ctx.lineWidth = block.strokeWidth;\n ctx.strokeStyle = strokeColor;\n ctx.lineJoin = 'round';\n }\n ctx.fillStyle = fontColor;\n\n if (block.strokeWidth > 0) {\n ctx.strokeText(block.text, x + width, y + block.vadjust);\n }\n ctx.fillText(block.text, x + width, y + block.vadjust);\n width += block.width;\n }\n y += line.height;\n }\n }\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} x\n * @param {number} y\n * @param {string} baseline\n * @returns {Array.}\n * @private\n */\n _setAlignment(ctx, x, y, baseline) {\n // check for label alignment (for edges)\n // TODO: make alignment for nodes\n if (this.isEdgeLabel && this.fontOptions.align !== 'horizontal' && this.pointToSelf === false) {\n x = 0;\n y = 0;\n\n let lineMargin = 2;\n if (this.fontOptions.align === 'top') {\n ctx.textBaseline = 'alphabetic';\n y -= 2 * lineMargin; // distance from edge, required because we use alphabetic. Alphabetic has less difference between browsers\n }\n else if (this.fontOptions.align === 'bottom') {\n ctx.textBaseline = 'hanging';\n y += 2 * lineMargin;// distance from edge, required because we use hanging. Hanging has less difference between browsers\n }\n else {\n ctx.textBaseline = 'middle';\n }\n }\n else {\n ctx.textBaseline = baseline;\n }\n return [x,y];\n }\n\n /**\n * fade in when relative scale is between threshold and threshold - 1.\n * If the relative scale would be smaller than threshold -1 the draw function would have returned before coming here.\n *\n * @param {string} color The font color to use\n * @param {number} viewFontSize\n * @param {string} initialStrokeColor\n * @returns {Array.} An array containing the font color and stroke color\n * @private\n */\n _getColor(color, viewFontSize, initialStrokeColor) {\n let fontColor = color || '#000000';\n let strokeColor = initialStrokeColor || '#ffffff';\n if (viewFontSize <= this.elementOptions.scaling.label.drawThreshold) {\n let opacity = Math.max(0, Math.min(1, 1 - (this.elementOptions.scaling.label.drawThreshold - viewFontSize)));\n fontColor = util.overrideOpacity(fontColor, opacity);\n strokeColor = util.overrideOpacity(strokeColor, opacity);\n }\n return [fontColor, strokeColor];\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {boolean} selected\n * @param {boolean} hover\n * @returns {{width: number, height: number}}\n */\n getTextSize(ctx, selected = false, hover = false) {\n this._processLabel(ctx, selected, hover);\n return {\n width: this.size.width,\n height: this.size.height,\n lineCount: this.lineCount\n };\n }\n\n\n /**\n * Get the current dimensions of the label\n *\n * @return {rect}\n */\n getSize() {\n let lineMargin = 2;\n let x = this.size.left; // default values which might be overridden below\n let y = this.size.top - 0.5*lineMargin; // idem\n\n if (this.isEdgeLabel) {\n const x2 = -this.size.width * 0.5;\n\n switch (this.fontOptions.align) {\n case 'middle':\n x = x2;\n y = -this.size.height * 0.5\n break;\n case 'top':\n x = x2;\n y = -(this.size.height + lineMargin);\n break;\n case 'bottom':\n x = x2;\n y = lineMargin;\n break;\n }\n }\n\n var ret = {\n left : x,\n top : y,\n width : this.size.width,\n height: this.size.height,\n };\n\n return ret;\n }\n\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {boolean} selected\n * @param {boolean} hover\n * @param {number} [x=0]\n * @param {number} [y=0]\n * @param {'middle'|'hanging'} [baseline='middle']\n */\n calculateLabelSize(ctx, selected, hover, x = 0, y = 0, baseline = 'middle') {\n this._processLabel(ctx, selected, hover);\n this.size.left = x - this.size.width * 0.5;\n this.size.top = y - this.size.height * 0.5;\n this.size.yLine = y + (1 - this.lineCount) * 0.5 * this.fontOptions.size;\n if (baseline === \"hanging\") {\n this.size.top += 0.5 * this.fontOptions.size;\n this.size.top += 4; // distance from node, required because we use hanging. Hanging has less difference between browsers\n this.size.yLine += 4; // distance from node\n }\n }\n\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {boolean} selected\n * @param {boolean} hover\n * @param {string} mod\n * @returns {{color, size, face, mod, vadjust, strokeWidth: *, strokeColor: (*|string|allOptions.edges.font.strokeColor|{string}|allOptions.nodes.font.strokeColor|Array)}}\n */\n getFormattingValues(ctx, selected, hover, mod) {\n let getValue = function(fontOptions, mod, option) {\n if (mod === \"normal\") {\n if (option === 'mod' ) return \"\";\n return fontOptions[option];\n }\n\n if (fontOptions[mod][option] !== undefined) { // Grumbl leaving out test on undefined equals false for \"\" \n return fontOptions[mod][option];\n } else {\n // Take from parent font option\n return fontOptions[option];\n }\n };\n\n let values = {\n color : getValue(this.fontOptions, mod, 'color' ),\n size : getValue(this.fontOptions, mod, 'size' ),\n face : getValue(this.fontOptions, mod, 'face' ),\n mod : getValue(this.fontOptions, mod, 'mod' ),\n vadjust: getValue(this.fontOptions, mod, 'vadjust'),\n strokeWidth: this.fontOptions.strokeWidth,\n strokeColor: this.fontOptions.strokeColor\n };\n if (selected || hover) {\n if (mod === \"normal\" && (this.fontOptions.chooser === true) && (this.elementOptions.labelHighlightBold)) {\n values.mod = 'bold';\n } else {\n if (typeof this.fontOptions.chooser === 'function') {\n this.fontOptions.chooser(values, this.elementOptions.id, selected, hover);\n }\n }\n }\n\n let fontString = \"\";\n if (values.mod !== undefined && values.mod !== \"\") { // safeguard for undefined - this happened\n fontString += values.mod + \" \";\n }\n fontString += values.size + \"px \" + values.face;\n\n ctx.font = fontString.replace(/\"/g, \"\");\n values.font = ctx.font;\n values.height = values.size;\n return values;\n }\n\n\n /**\n *\n * @param {boolean} selected\n * @param {boolean} hover\n * @returns {boolean}\n */\n differentState(selected, hover) {\n return ((selected !== this.selectedState) || (hover !== this.hoverState));\n }\n \n\n /**\n * This explodes the passed text into lines and determines the width, height and number of lines.\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {boolean} selected\n * @param {boolean} hover\n * @param {string} inText the text to explode\n * @returns {{width, height, lines}|*}\n * @private\n */\n _processLabelText(ctx, selected, hover, inText) {\n let splitter = new LabelSplitter(ctx, this, selected, hover);\n return splitter.process(inText);\n }\n\n\n /**\n * This explodes the label string into lines and sets the width, height and number of lines.\n * @param {CanvasRenderingContext2D} ctx\n * @param {boolean} selected\n * @param {boolean} hover\n * @private\n */\n _processLabel(ctx, selected, hover) {\n\n if(this.labelDirty === false && !this.differentState(selected,hover))\n return;\n \n let state = this._processLabelText(ctx, selected, hover, this.elementOptions.label);\n\n if ((this.fontOptions.minWdt > 0) && (state.width < this.fontOptions.minWdt)) {\n state.width = this.fontOptions.minWdt;\n }\n\n this.size.labelHeight =state.height;\n if ((this.fontOptions.minHgt > 0) && (state.height < this.fontOptions.minHgt)) {\n state.height = this.fontOptions.minHgt;\n }\n\n this.lines = state.lines;\n this.lineCount = state.lines.length;\n this.size.width = state.width;\n this.size.height = state.height;\n this.selectedState = selected;\n this.hoverState = hover;\n\n this.labelDirty = false;\n }\n\n\n /**\n * Check if this label is visible\n *\n * @return {boolean} true if this label will be show, false otherwise\n */\n visible() {\n if ((this.size.width === 0 || this.size.height === 0)\n || this.elementOptions.label === undefined) {\n return false; // nothing to display\n }\n\n let viewFontSize = this.fontOptions.size * this.body.view.scale;\n if (viewFontSize < this.elementOptions.scaling.label.drawThreshold - 1) {\n return false; // Too small or too far away to show\n }\n\n return true;\n }\n}\n\nexport default Label;\n","function _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nmodule.exports = _assertThisInitialized;","var _typeof = require(\"../helpers/typeof\");\n\nvar assertThisInitialized = require(\"./assertThisInitialized\");\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return assertThisInitialized(self);\n}\n\nmodule.exports = _possibleConstructorReturn;","function _getPrototypeOf(o) {\n module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nmodule.exports = _getPrototypeOf;","function _setPrototypeOf(o, p) {\n module.exports = _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nmodule.exports = _setPrototypeOf;","var setPrototypeOf = require(\"./setPrototypeOf\");\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) setPrototypeOf(subClass, superClass);\n}\n\nmodule.exports = _inherits;","/**\n * The Base class for all Nodes.\n */\nclass NodeBase {\n /**\n * @param {Object} options\n * @param {Object} body\n * @param {Label} labelModule\n */\n constructor(options, body, labelModule) {\n this.body = body;\n this.labelModule = labelModule;\n this.setOptions(options);\n this.top = undefined;\n this.left = undefined;\n this.height = undefined;\n this.width = undefined;\n this.radius = undefined;\n this.margin = undefined;\n this.refreshNeeded = true;\n this.boundingBox = {top: 0, left: 0, right: 0, bottom: 0};\n }\n\n /**\n *\n * @param {Object} options\n */\n setOptions(options) {\n this.options = options;\n }\n\n /**\n *\n * @param {Label} labelModule\n * @private\n */\n _setMargins(labelModule) {\n this.margin = {};\n if (this.options.margin) {\n if (typeof this.options.margin == 'object') {\n this.margin.top = this.options.margin.top;\n this.margin.right = this.options.margin.right;\n this.margin.bottom = this.options.margin.bottom;\n this.margin.left = this.options.margin.left;\n } else {\n this.margin.top = this.options.margin;\n this.margin.right = this.options.margin;\n this.margin.bottom = this.options.margin;\n this.margin.left = this.options.margin;\n }\n }\n labelModule.adjustSizes(this.margin)\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} angle\n * @returns {number}\n * @private\n */\n _distanceToBorder(ctx,angle) {\n var borderWidth = this.options.borderWidth;\n this.resize(ctx);\n return Math.min(\n Math.abs(this.width / 2 / Math.cos(angle)),\n Math.abs(this.height / 2 / Math.sin(angle))) + borderWidth;\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {ArrowOptions} values\n */\n enableShadow(ctx, values) {\n if (values.shadow) {\n ctx.shadowColor = values.shadowColor;\n ctx.shadowBlur = values.shadowSize;\n ctx.shadowOffsetX = values.shadowX;\n ctx.shadowOffsetY = values.shadowY;\n }\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {ArrowOptions} values\n */\n disableShadow(ctx, values) {\n if (values.shadow) {\n ctx.shadowColor = 'rgba(0,0,0,0)';\n ctx.shadowBlur = 0;\n ctx.shadowOffsetX = 0;\n ctx.shadowOffsetY = 0;\n }\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {ArrowOptions} values\n */\n enableBorderDashes(ctx, values) {\n if (values.borderDashes !== false) {\n if (ctx.setLineDash !== undefined) {\n let dashes = values.borderDashes;\n if (dashes === true) {\n dashes = [5,15]\n }\n ctx.setLineDash(dashes);\n }\n else {\n console.warn(\"setLineDash is not supported in this browser. The dashed borders cannot be used.\");\n this.options.shapeProperties.borderDashes = false;\n values.borderDashes = false;\n }\n }\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {ArrowOptions} values\n */\n disableBorderDashes(ctx, values) {\n if (values.borderDashes !== false) {\n if (ctx.setLineDash !== undefined) {\n ctx.setLineDash([0]);\n }\n else {\n console.warn(\"setLineDash is not supported in this browser. The dashed borders cannot be used.\");\n this.options.shapeProperties.borderDashes = false;\n values.borderDashes = false;\n }\n }\n }\n\n /**\n * Determine if the shape of a node needs to be recalculated.\n *\n * @param {boolean} selected\n * @param {boolean} hover\n * @returns {boolean}\n * @protected\n */\n needsRefresh(selected, hover) {\n if (this.refreshNeeded === true) {\n // This is probably not the best location to reset this member.\n // However, in the current logic, it is the most convenient one.\n this.refreshNeeded = false;\n return true;\n }\n\n return (this.width === undefined) || (this.labelModule.differentState(selected, hover));\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {ArrowOptions} values\n */\n initContextForDraw(ctx, values) {\n var borderWidth = values.borderWidth / this.body.view.scale;\n\n ctx.lineWidth = Math.min(this.width, borderWidth);\n ctx.strokeStyle = values.borderColor;\n ctx.fillStyle = values.color;\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {ArrowOptions} values\n */\n performStroke(ctx, values) {\n var borderWidth = values.borderWidth / this.body.view.scale;\n\n //draw dashed border if enabled, save and restore is required for firefox not to crash on unix.\n ctx.save();\n // if borders are zero width, they will be drawn with width 1 by default. This prevents that\n if (borderWidth > 0) {\n this.enableBorderDashes(ctx, values);\n //draw the border\n ctx.stroke();\n //disable dashed border for other elements\n this.disableBorderDashes(ctx, values);\n }\n ctx.restore();\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {ArrowOptions} values\n */\n performFill(ctx, values) {\n // draw shadow if enabled\n this.enableShadow(ctx, values);\n // draw the background\n ctx.fill();\n // disable shadows for other elements.\n this.disableShadow(ctx, values);\n\n this.performStroke(ctx, values);\n }\n\n\n /**\n *\n * @param {number} margin\n * @private\n */\n _addBoundingBoxMargin(margin) {\n this.boundingBox.left -= margin;\n this.boundingBox.top -= margin;\n this.boundingBox.bottom += margin;\n this.boundingBox.right += margin;\n }\n\n\n /**\n * Actual implementation of this method call.\n *\n * Doing it like this makes it easier to override\n * in the child classes.\n *\n * @param {number} x width\n * @param {number} y height\n * @param {CanvasRenderingContext2D} ctx\n * @param {boolean} selected\n * @param {boolean} hover\n * @private\n */\n _updateBoundingBox(x, y, ctx, selected, hover) {\n if (ctx !== undefined) {\n this.resize(ctx, selected, hover);\n }\n\n this.left = x - this.width / 2;\n this.top = y - this.height/ 2;\n\n this.boundingBox.left = this.left;\n this.boundingBox.top = this.top;\n this.boundingBox.bottom = this.top + this.height;\n this.boundingBox.right = this.left + this.width;\n }\n\n\n /**\n * Default implementation of this method call.\n * This acts as a stub which can be overridden.\n *\n * @param {number} x width\n * @param {number} y height\n * @param {CanvasRenderingContext2D} ctx\n * @param {boolean} selected\n * @param {boolean} hover\n */\n updateBoundingBox(x, y, ctx, selected, hover) {\n this._updateBoundingBox(x, y, ctx, selected, hover);\n }\n\n\n /**\n * Determine the dimensions to use for nodes with an internal label\n *\n * Currently, these are: Circle, Ellipse, Database, Box\n * The other nodes have external labels, and will not call this method\n *\n * If there is no label, decent default values are supplied.\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {boolean} [selected]\n * @param {boolean} [hover]\n * @returns {{width:number, height:number}}\n */\n getDimensionsFromLabel(ctx, selected, hover) {\n // NOTE: previously 'textSize' was not put in 'this' for Ellipse\n // TODO: examine the consequences.\n this.textSize = this.labelModule.getTextSize(ctx, selected, hover);\n var width = this.textSize.width;\n var height = this.textSize.height;\n\n const DEFAULT_SIZE = 14;\n if (width === 0) {\n // This happens when there is no label text set\n width = DEFAULT_SIZE; // use a decent default\n height = DEFAULT_SIZE; // if width zero, then height also always zero\n }\n\n return {width:width, height:height};\n }\n}\n\nexport default NodeBase;\n","'use strict';\n\nimport NodeBase from '../util/NodeBase'\n\n/**\n * A Box Node/Cluster shape.\n *\n * @extends NodeBase\n */\nclass Box extends NodeBase {\n /**\n * @param {Object} options\n * @param {Object} body\n * @param {Label} labelModule\n */\n constructor (options, body, labelModule) {\n super(options,body,labelModule);\n this._setMargins(labelModule);\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {boolean} [selected]\n * @param {boolean} [hover]\n */\n resize(ctx, selected = this.selected, hover = this.hover) {\n if (this.needsRefresh(selected, hover)) {\n var dimensions = this.getDimensionsFromLabel(ctx, selected, hover);\n\n this.width = dimensions.width + this.margin.right + this.margin.left;\n this.height = dimensions.height + this.margin.top + this.margin.bottom;\n this.radius = this.width / 2;\n }\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} x width\n * @param {number} y height\n * @param {boolean} selected\n * @param {boolean} hover\n * @param {ArrowOptions} values\n */\n draw(ctx, x, y, selected, hover, values) {\n this.resize(ctx, selected, hover);\n this.left = x - this.width / 2;\n this.top = y - this.height / 2;\n\n this.initContextForDraw(ctx, values);\n ctx.roundRect(this.left, this.top, this.width, this.height, values.borderRadius);\n this.performFill(ctx, values);\n\n this.updateBoundingBox(x, y, ctx, selected, hover);\n this.labelModule.draw(ctx, this.left + this.textSize.width / 2 + this.margin.left,\n this.top + this.textSize.height / 2 + this.margin.top, selected, hover);\n }\n\n /**\n *\n * @param {number} x width\n * @param {number} y height\n * @param {CanvasRenderingContext2D} ctx\n * @param {boolean} selected\n * @param {boolean} hover\n */\n updateBoundingBox(x, y, ctx, selected, hover) {\n this._updateBoundingBox(x, y, ctx, selected, hover);\n\n let borderRadius = this.options.shapeProperties.borderRadius; // only effective for box\n this._addBoundingBoxMargin(borderRadius);\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} angle\n * @returns {number}\n */\n distanceToBorder(ctx, angle) {\n this.resize(ctx);\n let borderWidth = this.options.borderWidth;\n\n return Math.min(\n Math.abs((this.width) / 2 / Math.cos(angle)),\n Math.abs((this.height) / 2 / Math.sin(angle))) + borderWidth;\n }\n}\n\nexport default Box;\n","import NodeBase from './NodeBase';\n\n/**\n * NOTE: This is a bad base class\n *\n * Child classes are:\n *\n * Image - uses *only* image methods\n * Circle - uses *only* _drawRawCircle\n * CircleImage - uses all\n *\n * TODO: Refactor, move _drawRawCircle to different module, derive Circle from NodeBase\n * Rename this to ImageBase\n * Consolidate common code in Image and CircleImage to base class\n *\n * @extends NodeBase\n */\nclass CircleImageBase extends NodeBase {\n /**\n * @param {Object} options\n * @param {Object} body\n * @param {Label} labelModule\n */\n constructor(options, body, labelModule) {\n super(options, body, labelModule);\n this.labelOffset = 0;\n this.selected = false;\n }\n\n /**\n *\n * @param {Object} options\n * @param {Object} [imageObj]\n * @param {Object} [imageObjAlt]\n */\n setOptions(options, imageObj, imageObjAlt) {\n this.options = options;\n\n if (!(imageObj === undefined && imageObjAlt === undefined)) {\n this.setImages(imageObj, imageObjAlt);\n }\n }\n\n\n /**\n * Set the images for this node.\n *\n * The images can be updated after the initial setting of options;\n * therefore, this method needs to be reentrant. \n *\n * For correct working in error cases, it is necessary to properly set\n * field 'nodes.brokenImage' in the options.\n *\n * @param {Image} imageObj required; main image to show for this node\n * @param {Image|undefined} imageObjAlt optional; image to show when node is selected\n */\n setImages(imageObj, imageObjAlt) {\n if (imageObjAlt && this.selected) {\n this.imageObj = imageObjAlt;\n this.imageObjAlt = imageObj;\n } else {\n this.imageObj = imageObj;\n this.imageObjAlt = imageObjAlt;\n }\n }\n\n /**\n * Set selection and switch between the base and the selected image.\n *\n * Do the switch only if imageObjAlt exists.\n *\n * @param {boolean} selected value of new selected state for current node\n */\n switchImages(selected) {\n var selection_changed = ((selected && !this.selected) || (!selected && this.selected));\n this.selected = selected; // Remember new selection\n\n if (this.imageObjAlt !== undefined && selection_changed) {\n let imageTmp = this.imageObj;\n this.imageObj = this.imageObjAlt;\n this.imageObjAlt = imageTmp;\n }\n }\n\n /**\n * Adjust the node dimensions for a loaded image.\n *\n * Pre: this.imageObj is valid\n */\n _resizeImage() {\n var width, height;\n\n if (this.options.shapeProperties.useImageSize === false) {\n // Use the size property\n var ratio_width = 1;\n var ratio_height = 1;\n\n // Only calculate the proper ratio if both width and height not zero\n if (this.imageObj.width && this.imageObj.height) {\n if (this.imageObj.width > this.imageObj.height) {\n ratio_width = this.imageObj.width / this.imageObj.height;\n }\n else {\n ratio_height = this.imageObj.height / this.imageObj.width;\n }\n }\n\n width = this.options.size * 2 * ratio_width;\n height = this.options.size * 2 * ratio_height;\n }\n else {\n // Use the image size\n width = this.imageObj.width;\n height = this.imageObj.height;\n }\n\n this.width = width;\n this.height = height;\n this.radius = 0.5 * this.width;\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} x width\n * @param {number} y height\n * @param {ArrowOptions} values\n * @private\n */\n _drawRawCircle(ctx, x, y, values) {\n this.initContextForDraw(ctx, values);\n ctx.circle(x, y, values.size);\n this.performFill(ctx, values);\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {ArrowOptions} values\n * @private\n */\n _drawImageAtPosition(ctx, values) {\n if (this.imageObj.width != 0) {\n // draw the image\n ctx.globalAlpha = 1.0;\n\n // draw shadow if enabled\n this.enableShadow(ctx, values);\n\n let factor = 1;\n if (this.options.shapeProperties.interpolation === true) {\n factor = (this.imageObj.width / this.width) / this.body.view.scale;\n }\n\n this.imageObj.drawImageAtPosition(ctx, factor, this.left, this.top, this.width, this.height);\n\n // disable shadows for other elements.\n this.disableShadow(ctx, values);\n }\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} x width\n * @param {number} y height\n * @param {boolean} selected\n * @param {boolean} hover\n * @private\n */\n _drawImageLabel(ctx, x, y, selected, hover) {\n var yLabel;\n var offset = 0;\n\n if (this.height !== undefined) {\n offset = this.height * 0.5;\n var labelDimensions = this.labelModule.getTextSize(ctx, selected, hover);\n if (labelDimensions.lineCount >= 1) {\n offset += labelDimensions.height / 2;\n }\n }\n\n yLabel = y + offset;\n\n if (this.options.label) {\n this.labelOffset = offset;\n }\n this.labelModule.draw(ctx, x, yLabel, selected, hover, 'hanging');\n }\n}\n\nexport default CircleImageBase;\n","'use strict';\n\nimport CircleImageBase from '../util/CircleImageBase'\n\n/**\n * A Circle Node/Cluster shape.\n *\n * @extends CircleImageBase\n */\nclass Circle extends CircleImageBase {\n /**\n * @param {Object} options\n * @param {Object} body\n * @param {Label} labelModule\n */\n constructor(options, body, labelModule) {\n super(options, body, labelModule);\n this._setMargins(labelModule);\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {boolean} [selected]\n * @param {boolean} [hover]\n */\n resize(ctx, selected = this.selected, hover = this.hover) {\n if (this.needsRefresh(selected, hover)) {\n var dimensions = this.getDimensionsFromLabel(ctx, selected, hover);\n\n var diameter = Math.max(dimensions.width + this.margin.right + this.margin.left,\n dimensions.height + this.margin.top + this.margin.bottom);\n\n this.options.size = diameter / 2; // NOTE: this size field only set here, not in Ellipse, Database, Box\n this.width = diameter;\n this.height = diameter;\n this.radius = this.width / 2;\n }\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} x width\n * @param {number} y height\n * @param {boolean} selected\n * @param {boolean} hover\n * @param {ArrowOptions} values\n */\n draw(ctx, x, y, selected, hover, values) {\n this.resize(ctx, selected, hover);\n this.left = x - this.width / 2;\n this.top = y - this.height / 2;\n\n this._drawRawCircle(ctx, x, y, values);\n\n this.updateBoundingBox(x,y);\n this.labelModule.draw(ctx, this.left + this.textSize.width / 2 + this.margin.left,\n y, selected, hover);\n }\n\n /**\n *\n * @param {number} x width\n * @param {number} y height\n */\n updateBoundingBox(x, y) {\n this.boundingBox.top = y - this.options.size;\n this.boundingBox.left = x - this.options.size;\n this.boundingBox.right = x + this.options.size;\n this.boundingBox.bottom = y + this.options.size;\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} angle - Unused\n * @returns {number}\n */\n distanceToBorder(ctx, angle) { // eslint-disable-line no-unused-vars\n this.resize(ctx);\n return this.width * 0.5;\n }\n}\n\nexport default Circle;\n","'use strict';\n\nimport CircleImageBase from '../util/CircleImageBase'\n\n/**\n * A CircularImage Node/Cluster shape.\n *\n * @extends CircleImageBase\n */\nclass CircularImage extends CircleImageBase {\n /**\n * @param {Object} options\n * @param {Object} body\n * @param {Label} labelModule\n * @param {Image} imageObj\n * @param {Image} imageObjAlt\n */\n constructor (options, body, labelModule, imageObj, imageObjAlt) {\n super(options, body, labelModule);\n\n this.setImages(imageObj, imageObjAlt);\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {boolean} [selected]\n * @param {boolean} [hover]\n */\n resize(ctx, selected = this.selected, hover = this.hover) {\n var imageAbsent = (this.imageObj.src === undefined) ||\n (this.imageObj.width === undefined) ||\n (this.imageObj.height === undefined);\n\n if (imageAbsent) {\n var diameter = this.options.size * 2;\n this.width = diameter;\n this.height = diameter;\n this.radius = 0.5*this.width;\n\t\t\treturn;\n }\n\n // At this point, an image is present, i.e. this.imageObj is valid.\n if (this.needsRefresh(selected, hover)) {\n this._resizeImage();\n }\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} x width\n * @param {number} y height\n * @param {boolean} selected\n * @param {boolean} hover\n * @param {ArrowOptions} values\n */\n draw(ctx, x, y, selected, hover, values) {\n this.switchImages(selected);\n this.resize();\n this.left = x - this.width / 2;\n this.top = y - this.height / 2;\n\n // draw the background circle. IMPORTANT: the stroke in this method is used by the clip method below.\n this._drawRawCircle(ctx, x, y, values);\n\n // now we draw in the circle, we save so we can revert the clip operation after drawing.\n ctx.save();\n // clip is used to use the stroke in drawRawCircle as an area that we can draw in.\n ctx.clip();\n // draw the image\n this._drawImageAtPosition(ctx, values);\n // restore so we can again draw on the full canvas\n ctx.restore();\n\n this._drawImageLabel(ctx, x, y, selected, hover);\n\n this.updateBoundingBox(x,y);\n }\n\n // TODO: compare with Circle.updateBoundingBox(), consolidate? More stuff is happening here\n /**\n *\n * @param {number} x width\n * @param {number} y height\n */\n updateBoundingBox(x,y) {\n this.boundingBox.top = y - this.options.size;\n this.boundingBox.left = x - this.options.size;\n this.boundingBox.right = x + this.options.size;\n this.boundingBox.bottom = y + this.options.size;\n\n // TODO: compare with Image.updateBoundingBox(), consolidate?\n this.boundingBox.left = Math.min(this.boundingBox.left, this.labelModule.size.left);\n this.boundingBox.right = Math.max(this.boundingBox.right, this.labelModule.size.left + this.labelModule.size.width);\n this.boundingBox.bottom = Math.max(this.boundingBox.bottom, this.boundingBox.bottom + this.labelOffset);\n }\n\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} angle - Unused\n * @returns {number}\n */\n distanceToBorder(ctx, angle) { // eslint-disable-line no-unused-vars\n this.resize(ctx);\n return this.width * 0.5;\n }\n}\n\nexport default CircularImage;\n","'use strict';\n\nimport NodeBase from '../util/NodeBase'\n\n/**\n * A Database Node/Cluster shape.\n *\n * @extends NodeBase\n */\nclass Database extends NodeBase {\n /**\n * @param {Object} options\n * @param {Object} body\n * @param {Label} labelModule\n */\n constructor (options, body, labelModule) {\n super(options, body, labelModule);\n this._setMargins(labelModule);\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {boolean} selected\n * @param {boolean} hover\n */\n resize(ctx, selected, hover) {\n if (this.needsRefresh(selected, hover)) {\n var dimensions = this.getDimensionsFromLabel(ctx, selected, hover);\n var size = dimensions.width + this.margin.right + this.margin.left;\n\n this.width = size;\n this.height = size;\n this.radius = this.width / 2;\n }\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} x width\n * @param {number} y height\n * @param {boolean} selected\n * @param {boolean} hover\n * @param {ArrowOptions} values\n */\n draw(ctx, x, y, selected, hover, values) {\n this.resize(ctx, selected, hover);\n this.left = x - this.width / 2;\n this.top = y - this.height / 2;\n\n this.initContextForDraw(ctx, values);\n ctx.database(x - this.width / 2, y - this.height / 2, this.width, this.height);\n this.performFill(ctx, values);\n\n this.updateBoundingBox(x, y, ctx, selected, hover);\n this.labelModule.draw(ctx, this.left + this.textSize.width / 2 + this.margin.left,\n this.top + this.textSize.height / 2 + this.margin.top, selected, hover);\n }\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} angle\n * @returns {number}\n */\n distanceToBorder(ctx, angle) {\n return this._distanceToBorder(ctx, angle);\n }\n}\n\nexport default Database;\n","import NodeBase from '../util/NodeBase'\n\n/**\n * Base class for constructing Node/Cluster Shapes.\n *\n * @extends NodeBase\n */\nclass ShapeBase extends NodeBase {\n /**\n * @param {Object} options\n * @param {Object} body\n * @param {Label} labelModule\n */\n constructor(options, body, labelModule) {\n super(options, body, labelModule)\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {boolean} [selected]\n * @param {boolean} [hover]\n * @param {Object} [values={size: this.options.size}]\n */\n resize(ctx, selected = this.selected, hover = this.hover, values = { size: this.options.size }) {\n if (this.needsRefresh(selected, hover)) {\n this.labelModule.getTextSize(ctx, selected, hover);\n var size = 2 * values.size;\n this.width = size;\n this.height = size;\n this.radius = 0.5*this.width;\n }\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {string} shape\n * @param {number} sizeMultiplier - Unused! TODO: Remove next major release\n * @param {number} x\n * @param {number} y\n * @param {boolean} selected\n * @param {boolean} hover\n * @param {ArrowOptions} values\n * @private\n */\n _drawShape(ctx, shape, sizeMultiplier, x, y, selected, hover, values) {\n this.resize(ctx, selected, hover, values);\n this.left = x - this.width / 2;\n this.top = y - this.height / 2;\n\n this.initContextForDraw(ctx, values);\n ctx[shape](x, y, values.size);\n this.performFill(ctx, values);\n \n if (this.options.icon !== undefined) {\n if (this.options.icon.code !== undefined) {\n ctx.font = (selected ? \"bold \" : \"\")\n + (this.height / 2) + \"px \"\n + (this.options.icon.face || 'FontAwesome');\n ctx.fillStyle = this.options.icon.color || \"black\";\n ctx.textAlign = \"center\";\n ctx.textBaseline = \"middle\";\n ctx.fillText(this.options.icon.code, x, y);\n }\n }\n\n if (this.options.label !== undefined) {\n // Need to call following here in order to ensure value for `this.labelModule.size.height`\n this.labelModule.calculateLabelSize(ctx, selected, hover, x, y, 'hanging')\n let yLabel = y + 0.5 * this.height + 0.5 * this.labelModule.size.height;\n this.labelModule.draw(ctx, x, yLabel, selected, hover, 'hanging');\n }\n\n this.updateBoundingBox(x,y);\n }\n\n /**\n *\n * @param {number} x\n * @param {number} y\n */\n updateBoundingBox(x, y) {\n this.boundingBox.top = y - this.options.size;\n this.boundingBox.left = x - this.options.size;\n this.boundingBox.right = x + this.options.size;\n this.boundingBox.bottom = y + this.options.size;\n\n if (this.options.label !== undefined && this.labelModule.size.width > 0) {\n this.boundingBox.left = Math.min(this.boundingBox.left, this.labelModule.size.left);\n this.boundingBox.right = Math.max(this.boundingBox.right, this.labelModule.size.left + this.labelModule.size.width);\n this.boundingBox.bottom = Math.max(this.boundingBox.bottom, this.boundingBox.bottom + this.labelModule.size.height);\n }\n }\n}\n\nexport default ShapeBase;\n","'use strict';\n\nimport ShapeBase from '../util/ShapeBase'\n\n/**\n * A Diamond Node/Cluster shape.\n *\n * @extends ShapeBase\n */\nclass Diamond extends ShapeBase {\n /**\n * @param {Object} options\n * @param {Object} body\n * @param {Label} labelModule\n */\n constructor(options, body, labelModule) {\n super(options, body, labelModule)\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} x width\n * @param {number} y height\n * @param {boolean} selected\n * @param {boolean} hover\n * @param {ArrowOptions} values\n */\n draw(ctx, x, y, selected, hover, values) {\n this._drawShape(ctx, 'diamond', 4, x, y, selected, hover, values);\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} angle\n * @returns {number}\n */\n distanceToBorder(ctx, angle) {\n return this._distanceToBorder(ctx,angle);\n }\n}\n\nexport default Diamond;\n","'use strict';\n\nimport ShapeBase from '../util/ShapeBase'\n\n/**\n * A Dot Node/Cluster shape.\n *\n * @extends ShapeBase\n */\nclass Dot extends ShapeBase {\n /**\n * @param {Object} options\n * @param {Object} body\n * @param {Label} labelModule\n */\n constructor(options, body, labelModule) {\n super(options, body, labelModule)\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} x width\n * @param {number} y height\n * @param {boolean} selected\n * @param {boolean} hover\n * @param {ArrowOptions} values\n */\n draw(ctx, x, y, selected, hover, values) {\n this._drawShape(ctx, 'circle', 2, x, y, selected, hover, values);\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} angle\n * @returns {number}\n */\n distanceToBorder(ctx, angle) { // eslint-disable-line no-unused-vars\n this.resize(ctx);\n return this.options.size;\n }\n}\n\nexport default Dot;\n","'use strict';\n\nimport NodeBase from '../util/NodeBase'\n\n/**\n * Am Ellipse Node/Cluster shape.\n *\n * @extends NodeBase\n */\nclass Ellipse extends NodeBase {\n /**\n * @param {Object} options\n * @param {Object} body\n * @param {Label} labelModule\n */\n constructor(options, body, labelModule) {\n super(options, body, labelModule);\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {boolean} [selected]\n * @param {boolean} [hover]\n */\n resize(ctx, selected = this.selected, hover = this.hover) {\n if (this.needsRefresh(selected, hover)) {\n var dimensions = this.getDimensionsFromLabel(ctx, selected, hover);\n\n this.height = dimensions.height * 2;\n this.width = dimensions.width + dimensions.height;\n this.radius = 0.5*this.width;\n }\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} x width\n * @param {number} y height\n * @param {boolean} selected\n * @param {boolean} hover\n * @param {ArrowOptions} values\n */\n draw(ctx, x, y, selected, hover, values) {\n this.resize(ctx, selected, hover);\n this.left = x - this.width * 0.5;\n this.top = y - this.height * 0.5;\n\n this.initContextForDraw(ctx, values);\n ctx.ellipse_vis(this.left, this.top, this.width, this.height);\n this.performFill(ctx, values);\n\n this.updateBoundingBox(x, y, ctx, selected, hover);\n this.labelModule.draw(ctx, x, y, selected, hover);\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} angle\n * @returns {number}\n */\n distanceToBorder(ctx, angle) {\n this.resize(ctx);\n var a = this.width * 0.5;\n var b = this.height * 0.5;\n var w = (Math.sin(angle) * a);\n var h = (Math.cos(angle) * b);\n return a * b / Math.sqrt(w * w + h * h);\n }\n}\n\nexport default Ellipse;\n","'use strict';\n\nimport NodeBase from '../util/NodeBase'\n\n/**\n * An icon replacement for the default Node shape.\n *\n * @extends NodeBase\n */\nclass Icon extends NodeBase {\n /**\n * @param {Object} options\n * @param {Object} body\n * @param {Label} labelModule\n */\n constructor(options, body, labelModule) {\n super(options, body, labelModule);\n this._setMargins(labelModule);\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx - Unused.\n * @param {boolean} [selected]\n * @param {boolean} [hover]\n */\n resize(ctx, selected, hover) {\n if (this.needsRefresh(selected, hover)) {\n this.iconSize = {\n width: Number(this.options.icon.size),\n height: Number(this.options.icon.size)\n };\n this.width = this.iconSize.width + this.margin.right + this.margin.left;\n this.height = this.iconSize.height + this.margin.top + this.margin.bottom;\n this.radius = 0.5*this.width;\n }\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} x width\n * @param {number} y height\n * @param {boolean} selected\n * @param {boolean} hover\n * @param {ArrowOptions} values\n */\n draw(ctx, x, y, selected, hover, values) {\n this.resize(ctx, selected, hover);\n this.options.icon.size = this.options.icon.size || 50;\n\n this.left = x - this.width / 2;\n this.top = y - this.height / 2;\n this._icon(ctx, x, y, selected, hover, values);\n\n if (this.options.label !== undefined) {\n var iconTextSpacing = 5;\n this.labelModule.draw(ctx, this.left + this.iconSize.width / 2 + this.margin.left,\n y + this.height / 2 + iconTextSpacing, selected);\n }\n\n this.updateBoundingBox(x, y)\n }\n\n /**\n *\n * @param {number} x\n * @param {number} y\n */\n updateBoundingBox(x, y) {\n this.boundingBox.top = y - this.options.icon.size * 0.5;\n this.boundingBox.left = x - this.options.icon.size * 0.5;\n this.boundingBox.right = x + this.options.icon.size * 0.5;\n this.boundingBox.bottom = y + this.options.icon.size * 0.5;\n\n if (this.options.label !== undefined && this.labelModule.size.width > 0) {\n var iconTextSpacing = 5;\n this.boundingBox.left = Math.min(this.boundingBox.left, this.labelModule.size.left);\n this.boundingBox.right = Math.max(this.boundingBox.right, this.labelModule.size.left + this.labelModule.size.width);\n this.boundingBox.bottom = Math.max(this.boundingBox.bottom, this.boundingBox.bottom + this.labelModule.size.height + iconTextSpacing);\n }\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} x width\n * @param {number} y height\n * @param {boolean} selected\n * @param {boolean} hover - Unused\n * @param {ArrowOptions} values\n */\n _icon(ctx, x, y, selected, hover, values) {\n let iconSize = Number(this.options.icon.size);\n\n if (this.options.icon.code !== undefined) {\n ctx.font = (selected ? \"bold \" : \"\") + iconSize + \"px \" + this.options.icon.face;\n\n // draw icon\n ctx.fillStyle = this.options.icon.color || \"black\";\n ctx.textAlign = \"center\";\n ctx.textBaseline = \"middle\";\n\n // draw shadow if enabled\n this.enableShadow(ctx, values);\n ctx.fillText(this.options.icon.code, x, y);\n\n // disable shadows for other elements.\n this.disableShadow(ctx, values);\n } else {\n console.error('When using the icon shape, you need to define the code in the icon options object. This can be done per node or globally.')\n }\n\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} angle\n * @returns {number}\n */\n distanceToBorder(ctx, angle) {\n return this._distanceToBorder(ctx,angle);\n }\n}\n\nexport default Icon;\n","'use strict';\n\nimport CircleImageBase from '../util/CircleImageBase'\n\n\n/**\n * An image-based replacement for the default Node shape.\n *\n * @extends CircleImageBase\n */\nclass Image extends CircleImageBase {\n /**\n * @param {Object} options\n * @param {Object} body\n * @param {Label} labelModule\n * @param {Image} imageObj\n * @param {Image} imageObjAlt\n */\n constructor (options, body, labelModule, imageObj, imageObjAlt) {\n super(options, body, labelModule);\n\n this.setImages(imageObj, imageObjAlt);\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx - Unused.\n * @param {boolean} [selected]\n * @param {boolean} [hover]\n */\n resize(ctx, selected = this.selected, hover = this.hover) {\n var imageAbsent = (this.imageObj.src === undefined) ||\n (this.imageObj.width === undefined) ||\n (this.imageObj.height === undefined);\n\n if (imageAbsent) {\n var side = this.options.size * 2;\n this.width = side;\n this.height = side;\n return;\n }\n\n if (this.needsRefresh(selected, hover)) {\n this._resizeImage();\n }\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} x width\n * @param {number} y height\n * @param {boolean} selected\n * @param {boolean} hover\n * @param {ArrowOptions} values\n */\n draw(ctx, x, y, selected, hover, values) {\n this.switchImages(selected);\n this.resize();\n this.left = x - this.width / 2;\n this.top = y - this.height / 2;\n\n if (this.options.shapeProperties.useBorderWithImage === true) {\n var neutralborderWidth = this.options.borderWidth;\n var selectionLineWidth = this.options.borderWidthSelected || 2 * this.options.borderWidth;\n var borderWidth = (selected ? selectionLineWidth : neutralborderWidth) / this.body.view.scale;\n ctx.lineWidth = Math.min(this.width, borderWidth);\n\n ctx.beginPath();\n\n // setup the line properties.\n ctx.strokeStyle = selected ? this.options.color.highlight.border : hover ? this.options.color.hover.border : this.options.color.border;\n\n // set a fillstyle\n ctx.fillStyle = selected ? this.options.color.highlight.background : hover ? this.options.color.hover.background : this.options.color.background;\n\n // draw a rectangle to form the border around. This rectangle is filled so the opacity of a picture (in future vis releases?) can be used to tint the image\n ctx.rect(this.left - 0.5 * ctx.lineWidth,\n this.top - 0.5 * ctx.lineWidth,\n this.width + ctx.lineWidth,\n this.height + ctx.lineWidth);\n ctx.fill();\n\n this.performStroke(ctx, values);\n \n ctx.closePath();\n }\n\n this._drawImageAtPosition(ctx, values);\n\n this._drawImageLabel(ctx, x, y, selected, hover);\n\n this.updateBoundingBox(x,y);\n }\n\n /**\n *\n * @param {number} x\n * @param {number} y\n */\n updateBoundingBox(x, y) {\n this.resize();\n this._updateBoundingBox(x, y);\n\n if (this.options.label !== undefined && this.labelModule.size.width > 0) {\n this.boundingBox.left = Math.min(this.boundingBox.left, this.labelModule.size.left);\n this.boundingBox.right = Math.max(this.boundingBox.right, this.labelModule.size.left + this.labelModule.size.width);\n this.boundingBox.bottom = Math.max(this.boundingBox.bottom, this.boundingBox.bottom + this.labelOffset);\n }\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} angle\n * @returns {number}\n */\n distanceToBorder(ctx, angle) {\n return this._distanceToBorder(ctx,angle);\n }\n}\n\nexport default Image;\n","'use strict';\n\nimport ShapeBase from '../util/ShapeBase'\n\n/**\n * A Square Node/Cluster shape.\n *\n * @extends ShapeBase\n */\nclass Square extends ShapeBase {\n /**\n * @param {Object} options\n * @param {Object} body\n * @param {Label} labelModule\n */\n constructor(options, body, labelModule) {\n super(options, body, labelModule)\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} x width\n * @param {number} y height\n * @param {boolean} selected\n * @param {boolean} hover\n * @param {ArrowOptions} values\n */\n draw(ctx, x, y, selected, hover, values) {\n this._drawShape(ctx, 'square', 2, x, y, selected, hover, values);\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} angle\n * @returns {number}\n */\n distanceToBorder(ctx, angle) {\n return this._distanceToBorder(ctx,angle);\n }\n}\n\nexport default Square;\n","'use strict';\n\nimport ShapeBase from '../util/ShapeBase'\n\n/**\n * A Hexagon Node/Cluster shape.\n *\n * @extends ShapeBase\n */\nclass Hexagon extends ShapeBase {\n /**\n * @param {Object} options\n * @param {Object} body\n * @param {Label} labelModule\n */\n constructor(options, body, labelModule) {\n super(options, body, labelModule)\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} x width\n * @param {number} y height\n * @param {boolean} selected\n * @param {boolean} hover\n * @param {ArrowOptions} values\n */\n draw(ctx, x, y, selected, hover, values) {\n this._drawShape(ctx, 'hexagon', 4, x, y, selected, hover, values);\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} angle\n * @returns {number}\n */\n distanceToBorder(ctx, angle) {\n return this._distanceToBorder(ctx,angle);\n }\n}\n\nexport default Hexagon;\n","'use strict';\n\nimport ShapeBase from '../util/ShapeBase'\n\n/**\n * A Star Node/Cluster shape.\n *\n * @extends ShapeBase\n */\nclass Star extends ShapeBase {\n /**\n * @param {Object} options\n * @param {Object} body\n * @param {Label} labelModule\n */\n constructor(options, body, labelModule) {\n super(options, body, labelModule)\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} x width\n * @param {number} y height\n * @param {boolean} selected\n * @param {boolean} hover\n * @param {ArrowOptions} values\n */\n draw(ctx, x, y, selected, hover, values) {\n this._drawShape(ctx, 'star', 4, x, y, selected, hover, values);\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} angle\n * @returns {number}\n */\n distanceToBorder(ctx, angle) {\n return this._distanceToBorder(ctx,angle);\n }\n}\n\nexport default Star;\n","'use strict';\n\nimport NodeBase from '../util/NodeBase'\n\n/**\n * A text-based replacement for the default Node shape.\n *\n * @extends NodeBase\n */\nclass Text extends NodeBase {\n /**\n * @param {Object} options\n * @param {Object} body\n * @param {Label} labelModule\n */\n constructor(options, body, labelModule) {\n super(options, body, labelModule);\n this._setMargins(labelModule);\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {boolean} selected\n * @param {boolean} hover\n */\n resize(ctx, selected, hover) {\n if (this.needsRefresh(selected, hover)) {\n this.textSize = this.labelModule.getTextSize(ctx, selected, hover);\n this.width = this.textSize.width + this.margin.right + this.margin.left;\n this.height = this.textSize.height + this.margin.top + this.margin.bottom;\n this.radius = 0.5*this.width;\n }\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} x width\n * @param {number} y height\n * @param {boolean} selected\n * @param {boolean} hover\n * @param {ArrowOptions} values\n */\n draw(ctx, x, y, selected, hover, values) {\n this.resize(ctx, selected, hover);\n this.left = x - this.width / 2;\n this.top = y - this.height / 2;\n\n // draw shadow if enabled\n this.enableShadow(ctx, values);\n this.labelModule.draw(ctx, this.left + this.textSize.width / 2 + this.margin.left,\n this.top + this.textSize.height / 2 + this.margin.top, selected, hover);\n\n // disable shadows for other elements.\n this.disableShadow(ctx, values);\n\n this.updateBoundingBox(x, y, ctx, selected, hover);\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} angle\n * @returns {number}\n */\n distanceToBorder(ctx, angle) {\n return this._distanceToBorder(ctx,angle);\n }\n}\n\nexport default Text;\n","'use strict';\n\nimport ShapeBase from '../util/ShapeBase'\n\n/**\n * A Triangle Node/Cluster shape.\n *\n * @extends ShapeBase\n */\nclass Triangle extends ShapeBase {\n /**\n * @param {Object} options\n * @param {Object} body\n * @param {Label} labelModule\n */\n constructor(options, body, labelModule) {\n super(options, body, labelModule)\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} x\n * @param {number} y\n * @param {boolean} selected\n * @param {boolean} hover\n * @param {ArrowOptions} values\n */\n draw(ctx, x, y, selected, hover, values) {\n this._drawShape(ctx, 'triangle', 3, x, y, selected, hover, values);\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} angle\n * @returns {number}\n */\n distanceToBorder(ctx, angle) {\n return this._distanceToBorder(ctx,angle);\n }\n}\n\nexport default Triangle;\n","'use strict';\n\nimport ShapeBase from '../util/ShapeBase'\n\n/**\n * A downward facing Triangle Node/Cluster shape.\n *\n * @extends ShapeBase\n */\nclass TriangleDown extends ShapeBase {\n /**\n * @param {Object} options\n * @param {Object} body\n * @param {Label} labelModule\n */\n constructor(options, body, labelModule) {\n super(options, body, labelModule)\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} x\n * @param {number} y\n * @param {boolean} selected\n * @param {boolean} hover\n * @param {ArrowOptions} values\n */\n draw(ctx, x, y, selected, hover, values) {\n this._drawShape(ctx, 'triangleDown', 3, x, y, selected, hover, values);\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} angle\n * @returns {number}\n */\n distanceToBorder(ctx, angle) {\n return this._distanceToBorder(ctx,angle);\n }\n}\n\nexport default TriangleDown;\n","import util from 'vis-util';\n\nlet errorFound = false;\nlet allOptions;\nlet printStyle = 'background: #FFeeee; color: #dd0000';\n/**\n * Used to validate options.\n */\nclass Validator {\n /**\n * @ignore\n */\n constructor() {\n }\n\n /**\n * Main function to be called\n * @param {Object} options\n * @param {Object} referenceOptions\n * @param {Object} subObject\n * @returns {boolean}\n * @static\n */\n static validate(options, referenceOptions, subObject) {\n errorFound = false;\n allOptions = referenceOptions;\n let usedOptions = referenceOptions;\n if (subObject !== undefined) {\n usedOptions = referenceOptions[subObject];\n }\n Validator.parse(options, usedOptions, []);\n return errorFound;\n }\n\n\n /**\n * Will traverse an object recursively and check every value\n * @param {Object} options\n * @param {Object} referenceOptions\n * @param {array} path | where to look for the actual option\n * @static\n */\n static parse(options, referenceOptions, path) {\n for (let option in options) {\n if (options.hasOwnProperty(option)) {\n Validator.check(option, options, referenceOptions, path);\n }\n }\n }\n\n\n /**\n * Check every value. If the value is an object, call the parse function on that object.\n * @param {string} option\n * @param {Object} options\n * @param {Object} referenceOptions\n * @param {array} path | where to look for the actual option\n * @static\n */\n static check(option, options, referenceOptions, path) {\n if (referenceOptions[option] === undefined && referenceOptions.__any__ === undefined) {\n Validator.getSuggestion(option, referenceOptions, path);\n return;\n }\n\n let referenceOption = option;\n let is_object = true;\n\n if (referenceOptions[option] === undefined && referenceOptions.__any__ !== undefined) {\n // NOTE: This only triggers if the __any__ is in the top level of the options object.\n // THAT'S A REALLY BAD PLACE TO ALLOW IT!!!!\n // TODO: Examine if needed, remove if possible\n\n // __any__ is a wildcard. Any value is accepted and will be further analysed by reference.\n referenceOption = '__any__';\n\n // if the any-subgroup is not a predefined object in the configurator,\n // we do not look deeper into the object.\n is_object = (Validator.getType(options[option]) === 'object');\n }\n else {\n // Since all options in the reference are objects, we can check whether \n // they are supposed to be the object to look for the __type__ field.\n // if this is an object, we check if the correct type has been supplied to account for shorthand options.\n }\n\n let refOptionObj = referenceOptions[referenceOption];\n if (is_object && refOptionObj.__type__ !== undefined) {\n refOptionObj = refOptionObj.__type__;\n }\n\n Validator.checkFields(option, options, referenceOptions, referenceOption, refOptionObj, path);\n }\n\n /**\n *\n * @param {string} option | the option property\n * @param {Object} options | The supplied options object\n * @param {Object} referenceOptions | The reference options containing all options and their allowed formats\n * @param {string} referenceOption | Usually this is the same as option, except when handling an __any__ tag.\n * @param {string} refOptionObj | This is the type object from the reference options\n * @param {Array} path | where in the object is the option\n * @static\n */\n static checkFields(option, options, referenceOptions, referenceOption, refOptionObj, path) {\n let log = function(message) {\n console.log('%c' + message + Validator.printLocation(path, option), printStyle);\n };\n\n let optionType = Validator.getType(options[option]);\n let refOptionType = refOptionObj[optionType];\n\n if (refOptionType !== undefined) {\n // if the type is correct, we check if it is supposed to be one of a few select values\n if (Validator.getType(refOptionType) === 'array' && refOptionType.indexOf(options[option]) === -1) {\n log('Invalid option detected in \"' + option + '\".' +\n ' Allowed values are:' + Validator.print(refOptionType) +\n ' not \"' + options[option] + '\". ');\n errorFound = true;\n }\n else if (optionType === 'object' && referenceOption !== \"__any__\") {\n path = util.copyAndExtendArray(path, option);\n Validator.parse(options[option], referenceOptions[referenceOption], path);\n }\n }\n else if (refOptionObj['any'] === undefined) {\n // type of the field is incorrect and the field cannot be any\n log('Invalid type received for \"' + option +\n '\". Expected: ' + Validator.print(Object.keys(refOptionObj)) +\n '. Received [' + optionType + '] \"' + options[option] + '\"');\n errorFound = true;\n }\n }\n\n /**\n *\n * @param {Object|boolean|number|string|Array.|Date|Node|Moment|undefined|null} object\n * @returns {string}\n * @static\n */\n static getType(object) {\n var type = typeof object;\n\n if (type === 'object') {\n if (object === null) {\n return 'null';\n }\n if (object instanceof Boolean) {\n return 'boolean';\n }\n if (object instanceof Number) {\n return 'number';\n }\n if (object instanceof String) {\n return 'string';\n }\n if (Array.isArray(object)) {\n return 'array';\n }\n if (object instanceof Date) {\n return 'date';\n }\n if (object.nodeType !== undefined) {\n return 'dom';\n }\n if (object._isAMomentObject === true) {\n return 'moment';\n }\n return 'object';\n }\n else if (type === 'number') {\n return 'number';\n }\n else if (type === 'boolean') {\n return 'boolean';\n }\n else if (type === 'string') {\n return 'string';\n }\n else if (type === undefined) {\n return 'undefined';\n }\n return type;\n }\n\n /**\n * @param {string} option\n * @param {Object} options\n * @param {Array.} path\n * @static\n */\n static getSuggestion(option, options, path) {\n let localSearch = Validator.findInOptions(option,options,path,false);\n let globalSearch = Validator.findInOptions(option,allOptions,[],true);\n\n let localSearchThreshold = 8;\n let globalSearchThreshold = 4;\n\n let msg;\n if (localSearch.indexMatch !== undefined) {\n msg = ' in ' + Validator.printLocation(localSearch.path, option,'') +\n 'Perhaps it was incomplete? Did you mean: \"' + localSearch.indexMatch + '\"?\\n\\n';\n }\n else if (globalSearch.distance <= globalSearchThreshold && localSearch.distance > globalSearch.distance) {\n msg = ' in ' + Validator.printLocation(localSearch.path, option,'') +\n 'Perhaps it was misplaced? Matching option found at: ' +\n Validator.printLocation(globalSearch.path, globalSearch.closestMatch,'');\n }\n else if (localSearch.distance <= localSearchThreshold) {\n msg = '. Did you mean \"' + localSearch.closestMatch + '\"?' +\n Validator.printLocation(localSearch.path, option);\n }\n else {\n msg = '. Did you mean one of these: ' + Validator.print(Object.keys(options)) +\n Validator.printLocation(path, option);\n }\n\n console.log('%cUnknown option detected: \"' + option + '\"' + msg, printStyle);\n errorFound = true;\n }\n\n /**\n * traverse the options in search for a match.\n * @param {string} option\n * @param {Object} options\n * @param {Array} path | where to look for the actual option\n * @param {boolean} [recursive=false]\n * @returns {{closestMatch: string, path: Array, distance: number}}\n * @static\n */\n static findInOptions(option, options, path, recursive = false) {\n let min = 1e9;\n let closestMatch = '';\n let closestMatchPath = [];\n let lowerCaseOption = option.toLowerCase();\n let indexMatch = undefined;\n for (let op in options) { // eslint-disable-line guard-for-in\n let distance;\n if (options[op].__type__ !== undefined && recursive === true) {\n let result = Validator.findInOptions(option, options[op], util.copyAndExtendArray(path,op));\n if (min > result.distance) {\n closestMatch = result.closestMatch;\n closestMatchPath = result.path;\n min = result.distance;\n indexMatch = result.indexMatch;\n }\n }\n else {\n if (op.toLowerCase().indexOf(lowerCaseOption) !== -1) {\n indexMatch = op;\n }\n distance = Validator.levenshteinDistance(option, op);\n if (min > distance) {\n closestMatch = op;\n closestMatchPath = util.copyArray(path);\n min = distance;\n }\n }\n }\n return {closestMatch:closestMatch, path:closestMatchPath, distance:min, indexMatch: indexMatch};\n }\n\n /**\n * @param {Array.} path\n * @param {Object} option\n * @param {string} prefix\n * @returns {String}\n * @static\n */\n static printLocation(path, option, prefix = 'Problem value found at: \\n') {\n let str = '\\n\\n' + prefix + 'options = {\\n';\n for (let i = 0; i < path.length; i++) {\n for (let j = 0; j < i + 1; j++) {\n str += ' ';\n }\n str += path[i] + ': {\\n'\n }\n for (let j = 0; j < path.length + 1; j++) {\n str += ' ';\n }\n str += option + '\\n';\n for (let i = 0; i < path.length + 1; i++) {\n for (let j = 0; j < path.length - i; j++) {\n str += ' ';\n }\n str += '}\\n'\n }\n return str + '\\n\\n';\n }\n\n /**\n * @param {Object} options\n * @returns {String}\n * @static\n */\n static print(options) {\n return JSON.stringify(options).replace(/(\\\")|(\\[)|(\\])|(,\"__type__\")/g, \"\").replace(/(\\,)/g, ', ')\n }\n\n\n /**\n * Compute the edit distance between the two given strings\n * http://en.wikibooks.org/wiki/Algorithm_Implementation/Strings/Levenshtein_distance#JavaScript\n *\n * Copyright (c) 2011 Andrei Mackenzie\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n *\n * @param {string} a\n * @param {string} b\n * @returns {Array.>}}\n * @static\n */\n static levenshteinDistance(a, b) {\n if (a.length === 0) return b.length;\n if (b.length === 0) return a.length;\n\n var matrix = [];\n\n // increment along the first column of each row\n var i;\n for (i = 0; i <= b.length; i++) {\n matrix[i] = [i];\n }\n\n // increment each column in the first row\n var j;\n for (j = 0; j <= a.length; j++) {\n matrix[0][j] = j;\n }\n\n // Fill in the rest of the matrix\n for (i = 1; i <= b.length; i++) {\n for (j = 1; j <= a.length; j++) {\n if (b.charAt(i - 1) == a.charAt(j - 1)) {\n matrix[i][j] = matrix[i - 1][j - 1];\n } else {\n matrix[i][j] = Math.min(matrix[i - 1][j - 1] + 1, // substitution\n Math.min(matrix[i][j - 1] + 1, // insertion\n matrix[i - 1][j] + 1)); // deletion\n }\n }\n }\n\n return matrix[b.length][a.length];\n }\n}\n\n\nexport {\n Validator,\n printStyle\n};\n","import util from 'vis-util';\n\nimport Label from './shared/Label';\nimport ComponentUtil from './shared/ComponentUtil';\nimport Box from './nodes/shapes/Box';\nimport Circle from './nodes/shapes/Circle';\nimport CircularImage from './nodes/shapes/CircularImage';\nimport Database from './nodes/shapes/Database';\nimport Diamond from './nodes/shapes/Diamond';\nimport Dot from './nodes/shapes/Dot';\nimport Ellipse from './nodes/shapes/Ellipse';\nimport Icon from './nodes/shapes/Icon';\nimport Image from './nodes/shapes/Image';\nimport Square from './nodes/shapes/Square';\nimport Hexagon from './nodes/shapes/Hexagon';\nimport Star from './nodes/shapes/Star';\nimport Text from './nodes/shapes/Text';\nimport Triangle from './nodes/shapes/Triangle';\nimport TriangleDown from './nodes/shapes/TriangleDown';\nimport { printStyle } from \"../../../shared/Validator\";\n\n\n/**\n * A node. A node can be connected to other nodes via one or multiple edges.\n */\nclass Node {\n /**\n *\n * @param {object} options An object containing options for the node. All\n * options are optional, except for the id.\n * {number} id Id of the node. Required\n * {string} label Text label for the node\n * {number} x Horizontal position of the node\n * {number} y Vertical position of the node\n * {string} shape Node shape\n * {string} image An image url\n * {string} title A title text, can be HTML\n * {anytype} group A group name or number\n *\n * @param {Object} body Shared state of current network instance\n * @param {Network.Images} imagelist A list with images. Only needed when the node has an image\n * @param {Groups} grouplist A list with groups. Needed for retrieving group options\n * @param {Object} globalOptions Current global node options; these serve as defaults for the node instance\n * @param {Object} defaultOptions Global default options for nodes; note that this is also the prototype\n * for parameter `globalOptions`.\n */\n constructor(options, body, imagelist, grouplist, globalOptions, defaultOptions) {\n this.options = util.bridgeObject(globalOptions);\n this.globalOptions = globalOptions;\n this.defaultOptions = defaultOptions;\n this.body = body;\n\n this.edges = []; // all edges connected to this node\n\n // set defaults for the options\n this.id = undefined;\n this.imagelist = imagelist;\n this.grouplist = grouplist;\n\n // state options\n this.x = undefined;\n this.y = undefined;\n this.baseSize = this.options.size;\n this.baseFontSize = this.options.font.size;\n this.predefinedPosition = false; // used to check if initial fit should just take the range or approximate\n this.selected = false;\n this.hover = false;\n\n this.labelModule = new Label(this.body, this.options, false /* Not edge label */);\n this.setOptions(options);\n }\n\n\n /**\n * Attach a edge to the node\n * @param {Edge} edge\n */\n attachEdge(edge) {\n if (this.edges.indexOf(edge) === -1) {\n this.edges.push(edge);\n }\n }\n\n\n /**\n * Detach a edge from the node\n *\n * @param {Edge} edge\n */\n detachEdge(edge) {\n var index = this.edges.indexOf(edge);\n if (index != -1) {\n this.edges.splice(index, 1);\n }\n }\n\n\n /**\n * Set or overwrite options for the node\n *\n * @param {Object} options an object with options\n * @returns {null|boolean}\n */\n setOptions(options) {\n let currentShape = this.options.shape;\n if (!options) {\n return; // Note that the return value will be 'undefined'! This is OK.\n }\n\n // basic options\n if (options.id !== undefined) {this.id = options.id;}\n\n if (this.id === undefined) {\n throw new Error(\"Node must have an id\");\n }\n\n Node.checkMass(options, this.id);\n\n // set these options locally\n // clear x and y positions\n if (options.x !== undefined) {\n if (options.x === null) {this.x = undefined; this.predefinedPosition = false;}\n else {this.x = parseInt(options.x); this.predefinedPosition = true;}\n }\n if (options.y !== undefined) {\n if (options.y === null) {this.y = undefined; this.predefinedPosition = false;}\n else {this.y = parseInt(options.y); this.predefinedPosition = true;}\n }\n if (options.size !== undefined) {this.baseSize = options.size;}\n if (options.value !== undefined) {options.value = parseFloat(options.value);}\n\n // this transforms all shorthands into fully defined options\n Node.parseOptions(this.options, options, true, this.globalOptions, this.grouplist);\n\n let pile = [options, this.options, this.defaultOptions];\n this.chooser = ComponentUtil.choosify('node', pile);\n\n this._load_images();\n this.updateLabelModule(options);\n this.updateShape(currentShape);\n\n return (options.hidden !== undefined || options.physics !== undefined);\n }\n\n\n /**\n * Load the images from the options, for the nodes that need them.\n *\n * Images are always loaded, even if they are not used in the current shape.\n * The user may switch to an image shape later on.\n *\n * @private\n */\n _load_images() {\n if (this.options.shape === 'circularImage' || this.options.shape === 'image') {\n if (this.options.image === undefined) {\n throw new Error(\"Option image must be defined for node type '\" + this.options.shape + \"'\");\n }\n }\n\n if (this.options.image === undefined) {\n return;\n }\n\n if (this.imagelist === undefined) {\n throw new Error(\"Internal Error: No images provided\");\n }\n\n if (typeof this.options.image === 'string') {\n this.imageObj = this.imagelist.load(this.options.image, this.options.brokenImage, this.id);\n } else {\n if (this.options.image.unselected === undefined) {\n throw new Error(\"No unselected image provided\");\n }\n\n this.imageObj = this.imagelist.load(this.options.image.unselected, this.options.brokenImage, this.id);\n\n if (this.options.image.selected !== undefined) {\n this.imageObjAlt = this.imagelist.load(this.options.image.selected, this.options.brokenImage, this.id);\n } else {\n this.imageObjAlt = undefined;\n }\n }\n }\n\n\n /**\n * Copy group option values into the node options.\n *\n * The group options override the global node options, so the copy of group options\n * must happen *after* the global node options have been set.\n *\n * This method must also be called also if the global node options have changed and the group options did not.\n *\n * @param {Object} parentOptions\n * @param {Object} newOptions new values for the options, currently only passed in for check\n * @param {Object} groupList\n */\n static updateGroupOptions(parentOptions, newOptions, groupList) {\n if (groupList === undefined) return; // No groups, nothing to do\n\n var group = parentOptions.group;\n\n // paranoia: the selected group is already merged into node options, check.\n if (newOptions !== undefined && newOptions.group !== undefined && group !== newOptions.group) {\n throw new Error(\"updateGroupOptions: group values in options don't match.\");\n }\n\n var hasGroup = (typeof group === 'number' || (typeof group === 'string' && group != ''));\n if (!hasGroup) return; // current node has no group, no need to merge\n\n var groupObj = groupList.get(group);\n\n // Skip merging of group font options into parent; these are required to be distinct for labels\n // Also skip mergin of color IF it is already defined in the node itself. This is to avoid the color of the\n // group overriding the color set at the node level\n // TODO: It might not be a good idea either to merge the rest of the options, investigate this.\n var skipProperties = ['font'];\n if (newOptions !== undefined && newOptions.color !== undefined && newOptions.color != null) skipProperties.push('color');\n util.selectiveNotDeepExtend(skipProperties, parentOptions, groupObj);\n\n // the color object needs to be completely defined.\n // Since groups can partially overwrite the colors, we parse it again, just in case.\n parentOptions.color = util.parseColor(parentOptions.color);\n }\n\n\n /**\n * This process all possible shorthands in the new options and makes sure that the parentOptions are fully defined.\n * Static so it can also be used by the handler.\n *\n * @param {Object} parentOptions\n * @param {Object} newOptions\n * @param {boolean} [allowDeletion=false]\n * @param {Object} [globalOptions={}]\n * @param {Object} [groupList]\n * @static\n */\n static parseOptions(parentOptions, newOptions, allowDeletion = false, globalOptions = {}, groupList) {\n\n var fields = [\n 'color',\n 'fixed',\n 'shadow'\n ];\n util.selectiveNotDeepExtend(fields, parentOptions, newOptions, allowDeletion);\n\n Node.checkMass(newOptions);\n\n // merge the shadow options into the parent.\n util.mergeOptions(parentOptions, newOptions, 'shadow', globalOptions);\n\n // individual shape newOptions\n if (newOptions.color !== undefined && newOptions.color !== null) {\n let parsedColor = util.parseColor(newOptions.color);\n util.fillIfDefined(parentOptions.color, parsedColor);\n }\n else if (allowDeletion === true && newOptions.color === null) {\n parentOptions.color = util.bridgeObject(globalOptions.color); // set the object back to the global options\n }\n\n // handle the fixed options\n if (newOptions.fixed !== undefined && newOptions.fixed !== null) {\n if (typeof newOptions.fixed === 'boolean') {\n parentOptions.fixed.x = newOptions.fixed;\n parentOptions.fixed.y = newOptions.fixed;\n }\n else {\n if (newOptions.fixed.x !== undefined && typeof newOptions.fixed.x === 'boolean') {\n parentOptions.fixed.x = newOptions.fixed.x;\n }\n if (newOptions.fixed.y !== undefined && typeof newOptions.fixed.y === 'boolean') {\n parentOptions.fixed.y = newOptions.fixed.y;\n }\n }\n }\n\n if (allowDeletion === true && newOptions.font === null) {\n parentOptions.font = util.bridgeObject(globalOptions.font); // set the object back to the global options\n }\n\n Node.updateGroupOptions(parentOptions, newOptions, groupList);\n\n // handle the scaling options, specifically the label part\n if (newOptions.scaling !== undefined) {\n util.mergeOptions(parentOptions.scaling, newOptions.scaling, 'label', globalOptions.scaling);\n }\n }\n\n\n /**\n *\n * @returns {{color: *, borderWidth: *, borderColor: *, size: *, borderDashes: (boolean|Array|allOptions.nodes.shapeProperties.borderDashes|{boolean, array}), borderRadius: (number|allOptions.nodes.shapeProperties.borderRadius|{number}|Array), shadow: *, shadowColor: *, shadowSize: *, shadowX: *, shadowY: *}}\n */\n getFormattingValues() {\n let values = {\n color: this.options.color.background,\n borderWidth: this.options.borderWidth,\n borderColor: this.options.color.border,\n size: this.options.size,\n borderDashes: this.options.shapeProperties.borderDashes,\n borderRadius: this.options.shapeProperties.borderRadius,\n shadow: this.options.shadow.enabled,\n shadowColor: this.options.shadow.color,\n shadowSize: this.options.shadow.size,\n shadowX: this.options.shadow.x,\n shadowY: this.options.shadow.y\n };\n if (this.selected || this.hover) {\n if (this.chooser === true) {\n if (this.selected) {\n values.borderWidth *= 2;\n values.color = this.options.color.highlight.background;\n values.borderColor = this.options.color.highlight.border;\n values.shadow = this.options.shadow.enabled;\n } else if (this.hover) {\n values.color = this.options.color.hover.background;\n values.borderColor = this.options.color.hover.border;\n values.shadow = this.options.shadow.enabled;\n }\n } else if (typeof this.chooser === 'function') {\n this.chooser(values, this.options.id, this.selected, this.hover);\n if (values.shadow === false) {\n if ((values.shadowColor !== this.options.shadow.color) ||\n (values.shadowSize !== this.options.shadow.size) ||\n (values.shadowX !== this.options.shadow.x) ||\n (values.shadowY !== this.options.shadow.y)) {\n values.shadow = true;\n }\n }\n }\n } else {\n values.shadow = this.options.shadow.enabled;\n }\n return values;\n }\n\n\n /**\n *\n * @param {Object} options\n */\n updateLabelModule(options) {\n if (this.options.label === undefined || this.options.label === null) {\n this.options.label = '';\n }\n\n Node.updateGroupOptions(this.options, options, this.grouplist);\n\n //\n // Note:The prototype chain for this.options is:\n //\n // this.options -> NodesHandler.options -> NodesHandler.defaultOptions\n // (also: this.globalOptions)\n //\n // Note that the prototypes are mentioned explicitly in the pile list below;\n // WE DON'T WANT THE ORDER OF THE PROTOTYPES!!!! At least, not for font handling of labels.\n // This is a good indication that the prototype usage of options is deficient.\n //\n var currentGroup = this.grouplist.get(this.options.group, false);\n let pile = [\n options, // new options\n this.options, // current node options, see comment above for prototype\n currentGroup, // group options, if any\n this.globalOptions, // Currently set global node options\n this.defaultOptions // Default global node options\n ];\n this.labelModule.update(this.options, pile);\n\n if (this.labelModule.baseSize !== undefined) {\n this.baseFontSize = this.labelModule.baseSize;\n }\n }\n\n\n /**\n *\n * @param {string} currentShape\n */\n updateShape(currentShape) {\n if (currentShape === this.options.shape && this.shape) {\n this.shape.setOptions(this.options, this.imageObj, this.imageObjAlt);\n }\n else {\n // choose draw method depending on the shape\n switch (this.options.shape) {\n case 'box':\n this.shape = new Box(this.options, this.body, this.labelModule);\n break;\n case 'circle':\n this.shape = new Circle(this.options, this.body, this.labelModule);\n break;\n case 'circularImage':\n this.shape = new CircularImage(this.options, this.body, this.labelModule, this.imageObj, this.imageObjAlt);\n break;\n case 'database':\n this.shape = new Database(this.options, this.body, this.labelModule);\n break;\n case 'diamond':\n this.shape = new Diamond(this.options, this.body, this.labelModule);\n break;\n case 'dot':\n this.shape = new Dot(this.options, this.body, this.labelModule);\n break;\n case 'ellipse':\n this.shape = new Ellipse(this.options, this.body, this.labelModule);\n break;\n case 'icon':\n this.shape = new Icon(this.options, this.body, this.labelModule);\n break;\n case 'image':\n this.shape = new Image(this.options, this.body, this.labelModule, this.imageObj, this.imageObjAlt);\n break;\n case 'square':\n this.shape = new Square(this.options, this.body, this.labelModule);\n break;\n case 'hexagon':\n this.shape = new Hexagon(this.options, this.body, this.labelModule);\n break;\n case 'star':\n this.shape = new Star(this.options, this.body, this.labelModule);\n break;\n case 'text':\n this.shape = new Text(this.options, this.body, this.labelModule);\n break;\n case 'triangle':\n this.shape = new Triangle(this.options, this.body, this.labelModule);\n break;\n case 'triangleDown':\n this.shape = new TriangleDown(this.options, this.body, this.labelModule);\n break;\n default:\n this.shape = new Ellipse(this.options, this.body, this.labelModule);\n break;\n }\n }\n this.needsRefresh();\n }\n\n\n /**\n * select this node\n */\n select() {\n this.selected = true;\n this.needsRefresh();\n }\n\n\n /**\n * unselect this node\n */\n unselect() {\n this.selected = false;\n this.needsRefresh();\n }\n\n\n\n /**\n * Reset the calculated size of the node, forces it to recalculate its size\n */\n needsRefresh() {\n this.shape.refreshNeeded = true;\n }\n\n\n /**\n * get the title of this node.\n * @return {string} title The title of the node, or undefined when no title\n * has been set.\n */\n getTitle() {\n return this.options.title;\n }\n\n\n /**\n * Calculate the distance to the border of the Node\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} angle Angle in radians\n * @returns {number} distance Distance to the border in pixels\n */\n distanceToBorder(ctx, angle) {\n return this.shape.distanceToBorder(ctx,angle);\n }\n\n\n /**\n * Check if this node has a fixed x and y position\n * @return {boolean} true if fixed, false if not\n */\n isFixed() {\n return (this.options.fixed.x && this.options.fixed.y);\n }\n\n\n /**\n * check if this node is selecte\n * @return {boolean} selected True if node is selected, else false\n */\n isSelected() {\n return this.selected;\n }\n\n\n /**\n * Retrieve the value of the node. Can be undefined\n * @return {number} value\n */\n getValue() {\n return this.options.value;\n }\n\n\n /**\n * Get the current dimensions of the label\n *\n * @return {rect}\n */\n getLabelSize() {\n return this.labelModule.size();\n }\n\n\n /**\n * Adjust the value range of the node. The node will adjust it's size\n * based on its value.\n * @param {number} min\n * @param {number} max\n * @param {number} total\n */\n setValueRange(min, max, total) {\n if (this.options.value !== undefined) {\n var scale = this.options.scaling.customScalingFunction(min, max, total, this.options.value);\n var sizeDiff = this.options.scaling.max - this.options.scaling.min;\n if (this.options.scaling.label.enabled === true) {\n var fontDiff = this.options.scaling.label.max - this.options.scaling.label.min;\n this.options.font.size = this.options.scaling.label.min + scale * fontDiff;\n }\n this.options.size = this.options.scaling.min + scale * sizeDiff;\n }\n else {\n this.options.size = this.baseSize;\n this.options.font.size = this.baseFontSize;\n }\n\n this.updateLabelModule();\n }\n\n\n /**\n * Draw this node in the given canvas\n * The 2d context of a HTML canvas can be retrieved by canvas.getContext(\"2d\");\n * @param {CanvasRenderingContext2D} ctx\n */\n draw(ctx) {\n let values = this.getFormattingValues();\n this.shape.draw(ctx, this.x, this.y, this.selected, this.hover, values);\n }\n\n\n /**\n * Update the bounding box of the shape\n * @param {CanvasRenderingContext2D} ctx\n */\n updateBoundingBox(ctx) {\n this.shape.updateBoundingBox(this.x,this.y,ctx);\n }\n\n\n /**\n * Recalculate the size of this node in the given canvas\n * The 2d context of a HTML canvas can be retrieved by canvas.getContext(\"2d\");\n * @param {CanvasRenderingContext2D} ctx\n */\n resize(ctx) {\n let values = this.getFormattingValues();\n this.shape.resize(ctx, this.selected, this.hover, values);\n }\n\n\n /**\n * Determine all visual elements of this node instance, in which the given\n * point falls within the bounding shape.\n *\n * @param {point} point\n * @returns {Array.} list with the items which are on the point\n */\n getItemsOnPoint(point) {\n var ret = [];\n\n if (this.labelModule.visible()) {\n if (ComponentUtil.pointInRect(this.labelModule.getSize(), point)) {\n ret.push({nodeId:this.id, labelId:0});\n }\n }\n\n if (ComponentUtil.pointInRect(this.shape.boundingBox, point)) {\n ret.push({nodeId:this.id});\n }\n\n return ret;\n }\n\n\n /**\n * Check if this object is overlapping with the provided object\n * @param {Object} obj an object with parameters left, top, right, bottom\n * @return {boolean} True if location is located on node\n */\n isOverlappingWith(obj) {\n return (\n this.shape.left < obj.right &&\n this.shape.left + this.shape.width > obj.left &&\n this.shape.top < obj.bottom &&\n this.shape.top + this.shape.height > obj.top\n );\n }\n\n\n /**\n * Check if this object is overlapping with the provided object\n * @param {Object} obj an object with parameters left, top, right, bottom\n * @return {boolean} True if location is located on node\n */\n isBoundingBoxOverlappingWith(obj) {\n return (\n this.shape.boundingBox.left < obj.right &&\n this.shape.boundingBox.right > obj.left &&\n this.shape.boundingBox.top < obj.bottom &&\n this.shape.boundingBox.bottom > obj.top\n );\n }\n\n\n /**\n * Check valid values for mass\n *\n * The mass may not be negative or zero. If it is, reset to 1\n *\n * @param {object} options\n * @param {Node.id} id\n * @static\n */\n static checkMass(options, id) {\n if (options.mass !== undefined && options.mass <= 0) {\n let strId = '';\n if (id !== undefined) {\n strId = ' in node id: ' + id;\n }\n console.log('%cNegative or zero mass disallowed' + strId +\n ', setting mass to 1.' , printStyle);\n options.mass = 1;\n }\n }\n}\n\nexport default Node;\n","import util from 'vis-util';\nimport { DataSet, DataView } from 'vis-data';\nimport Node from \"./components/Node\";\n\n/**\n * Handler for Nodes\n */\nclass NodesHandler {\n /**\n * @param {Object} body\n * @param {Images} images\n * @param {Array.} groups\n * @param {LayoutEngine} layoutEngine\n */\n constructor(body, images, groups, layoutEngine) {\n this.body = body;\n this.images = images;\n this.groups = groups;\n this.layoutEngine = layoutEngine;\n\n // create the node API in the body container\n this.body.functions.createNode = this.create.bind(this);\n\n this.nodesListeners = {\n add: (event, params) => { this.add(params.items); },\n update: (event, params) => { this.update(params.items, params.data, params.oldData); },\n remove: (event, params) => { this.remove(params.items); }\n };\n\n this.defaultOptions = {\n borderWidth: 1,\n borderWidthSelected: 2,\n brokenImage: undefined,\n color: {\n border: '#2B7CE9',\n background: '#97C2FC',\n highlight: {\n border: '#2B7CE9',\n background: '#D2E5FF'\n },\n hover: {\n border: '#2B7CE9',\n background: '#D2E5FF'\n }\n },\n fixed: {\n x: false,\n y: false\n },\n font: {\n color: '#343434',\n size: 14, // px\n face: 'arial',\n background: 'none',\n strokeWidth: 0, // px\n strokeColor: '#ffffff',\n align: 'center',\n vadjust: 0,\n multi: false,\n bold: {\n mod: 'bold'\n },\n boldital: {\n mod: 'bold italic'\n },\n ital: {\n mod: 'italic'\n },\n mono: {\n mod: '',\n size: 15, // px\n face: 'monospace',\n vadjust: 2\n }\n },\n group: undefined,\n hidden: false,\n icon: {\n face: 'FontAwesome', //'FontAwesome',\n code: undefined, //'\\uf007',\n size: 50, //50,\n color: '#2B7CE9' //'#aa00ff'\n },\n image: undefined, // --> URL\n label: undefined,\n labelHighlightBold: true,\n level: undefined,\n margin: {\n top: 5,\n right: 5,\n bottom: 5,\n left: 5\n },\n mass: 1,\n physics: true,\n scaling: {\n min: 10,\n max: 30,\n label: {\n enabled: false,\n min: 14,\n max: 30,\n maxVisible: 30,\n drawThreshold: 5\n },\n customScalingFunction: function (min, max, total, value) {\n if (max === min) {\n return 0.5;\n }\n else {\n let scale = 1 / (max - min);\n return Math.max(0, (value - min) * scale);\n }\n }\n },\n shadow: {\n enabled: false,\n color: 'rgba(0,0,0,0.5)',\n size: 10,\n x: 5,\n y: 5\n },\n shape: 'ellipse',\n shapeProperties: {\n borderDashes: false, // only for borders\n borderRadius: 6, // only for box shape\n interpolation: true, // only for image and circularImage shapes\n useImageSize: false, // only for image and circularImage shapes\n useBorderWithImage: false // only for image shape\n },\n size: 25,\n title: undefined,\n value: undefined,\n x: undefined,\n y: undefined\n };\n\n // Protect from idiocy\n if (this.defaultOptions.mass <= 0) {\n throw 'Internal error: mass in defaultOptions of NodesHandler may not be zero or negative';\n }\n\n this.options = util.bridgeObject(this.defaultOptions);\n\n this.bindEventListeners();\n }\n\n /**\n * Binds event listeners\n */\n bindEventListeners() {\n // refresh the nodes. Used when reverting from hierarchical layout\n this.body.emitter.on('refreshNodes', this.refresh.bind(this));\n this.body.emitter.on('refresh', this.refresh.bind(this));\n this.body.emitter.on('destroy', () => {\n util.forEach(this.nodesListeners, (callback, event) => {\n if (this.body.data.nodes)\n this.body.data.nodes.off(event, callback);\n });\n delete this.body.functions.createNode;\n delete this.nodesListeners.add;\n delete this.nodesListeners.update;\n delete this.nodesListeners.remove;\n delete this.nodesListeners;\n });\n }\n\n /**\n *\n * @param {Object} options\n */\n setOptions(options) {\n if (options !== undefined) {\n Node.parseOptions(this.options, options);\n\n // update the shape in all nodes\n if (options.shape !== undefined) {\n for (let nodeId in this.body.nodes) {\n if (this.body.nodes.hasOwnProperty(nodeId)) {\n this.body.nodes[nodeId].updateShape();\n }\n }\n }\n\n // update the font in all nodes\n if (options.font !== undefined) {\n for (let nodeId in this.body.nodes) {\n if (this.body.nodes.hasOwnProperty(nodeId)) {\n this.body.nodes[nodeId].updateLabelModule();\n this.body.nodes[nodeId].needsRefresh();\n }\n }\n }\n\n // update the shape size in all nodes\n if (options.size !== undefined) {\n for (let nodeId in this.body.nodes) {\n if (this.body.nodes.hasOwnProperty(nodeId)) {\n this.body.nodes[nodeId].needsRefresh();\n }\n }\n }\n\n // update the state of the variables if needed\n if (options.hidden !== undefined || options.physics !== undefined) {\n this.body.emitter.emit('_dataChanged');\n }\n }\n }\n\n /**\n * Set a data set with nodes for the network\n * @param {Array | DataSet | DataView} nodes The data containing the nodes.\n * @param {boolean} [doNotEmit=false]\n * @private\n */\n setData(nodes, doNotEmit = false) {\n let oldNodesData = this.body.data.nodes;\n\n if (nodes instanceof DataSet || nodes instanceof DataView) {\n this.body.data.nodes = nodes;\n }\n else if (Array.isArray(nodes)) {\n this.body.data.nodes = new DataSet();\n this.body.data.nodes.add(nodes);\n }\n else if (!nodes) {\n this.body.data.nodes = new DataSet();\n }\n else {\n throw new TypeError('Array or DataSet expected');\n }\n\n if (oldNodesData) {\n // unsubscribe from old dataset\n util.forEach(this.nodesListeners, function (callback, event) {\n oldNodesData.off(event, callback);\n });\n }\n\n // remove drawn nodes\n this.body.nodes = {};\n\n if (this.body.data.nodes) {\n // subscribe to new dataset\n let me = this;\n util.forEach(this.nodesListeners, function (callback, event) {\n me.body.data.nodes.on(event, callback);\n });\n\n // draw all new nodes\n let ids = this.body.data.nodes.getIds();\n this.add(ids, true);\n }\n\n if (doNotEmit === false) {\n this.body.emitter.emit(\"_dataChanged\");\n }\n }\n\n\n /**\n * Add nodes\n * @param {number[] | string[]} ids\n * @param {boolean} [doNotEmit=false]\n * @private\n */\n add(ids, doNotEmit = false) {\n let id;\n let newNodes = [];\n for (let i = 0; i < ids.length; i++) {\n id = ids[i];\n let properties = this.body.data.nodes.get(id);\n let node = this.create(properties);\n newNodes.push(node);\n this.body.nodes[id] = node; // note: this may replace an existing node\n }\n\n this.layoutEngine.positionInitially(newNodes);\n\n if (doNotEmit === false) {\n this.body.emitter.emit(\"_dataChanged\");\n }\n }\n\n /**\n * Update existing nodes, or create them when not yet existing\n * @param {number[] | string[]} ids id's of changed nodes\n * @param {Array} changedData array with changed data\n * @param {Array|undefined} oldData optional; array with previous data\n * @private\n */\n update(ids, changedData, oldData) {\n let nodes = this.body.nodes;\n let dataChanged = false;\n for (let i = 0; i < ids.length; i++) {\n let id = ids[i];\n let node = nodes[id];\n let data = changedData[i];\n if (node !== undefined) {\n // update node\n if (node.setOptions(data)) {\n dataChanged = true;\n }\n }\n else {\n dataChanged = true;\n // create node\n node = this.create(data);\n nodes[id] = node;\n }\n }\n\n if (!dataChanged && oldData !== undefined) {\n // Check for any changes which should trigger a layout recalculation\n // For now, this is just 'level' for hierarchical layout\n // Assumption: old and new data arranged in same order; at time of writing, this holds.\n dataChanged = changedData.some(function(newValue, index) {\n let oldValue = oldData[index];\n return (oldValue && oldValue.level !== newValue.level);\n });\n }\n\n if (dataChanged === true) {\n this.body.emitter.emit(\"_dataChanged\");\n }\n else {\n this.body.emitter.emit(\"_dataUpdated\");\n }\n }\n\n /**\n * Remove existing nodes. If nodes do not exist, the method will just ignore it.\n * @param {number[] | string[]} ids\n * @private\n */\n remove(ids) {\n let nodes = this.body.nodes;\n\n for (let i = 0; i < ids.length; i++) {\n let id = ids[i];\n delete nodes[id];\n }\n\n this.body.emitter.emit(\"_dataChanged\");\n }\n\n\n /**\n * create a node\n * @param {Object} properties\n * @param {class} [constructorClass=Node.default]\n * @returns {*}\n */\n create(properties, constructorClass = Node) {\n return new constructorClass(properties, this.body, this.images, this.groups, this.options, this.defaultOptions)\n }\n\n\n /**\n *\n * @param {boolean} [clearPositions=false]\n */\n refresh(clearPositions = false) {\n util.forEach(this.body.nodes, (node, nodeId) => {\n let data = this.body.data.nodes.get(nodeId);\n if (data !== undefined) {\n if (clearPositions === true) {\n node.setOptions({x:null, y:null});\n }\n node.setOptions({ fixed: false });\n node.setOptions(data);\n }\n });\n }\n\n\n /**\n * Returns the positions of the nodes.\n * @param {Array.|String} [ids] --> optional, can be array of nodeIds, can be string\n * @returns {{}}\n */\n getPositions(ids) {\n let dataArray = {};\n if (ids !== undefined) {\n if (Array.isArray(ids) === true) {\n for (let i = 0; i < ids.length; i++) {\n if (this.body.nodes[ids[i]] !== undefined) {\n let node = this.body.nodes[ids[i]];\n dataArray[ids[i]] = { x: Math.round(node.x), y: Math.round(node.y) };\n }\n }\n }\n else {\n if (this.body.nodes[ids] !== undefined) {\n let node = this.body.nodes[ids];\n dataArray[ids] = { x: Math.round(node.x), y: Math.round(node.y) };\n }\n }\n }\n else {\n for (let i = 0; i < this.body.nodeIndices.length; i++) {\n let node = this.body.nodes[this.body.nodeIndices[i]];\n dataArray[this.body.nodeIndices[i]] = { x: Math.round(node.x), y: Math.round(node.y) };\n }\n }\n return dataArray;\n }\n\n\n /**\n * Load the XY positions of the nodes into the dataset.\n */\n storePositions() {\n // todo: add support for clusters and hierarchical.\n let dataArray = [];\n var dataset = this.body.data.nodes.getDataSet();\n\n for (let nodeId in dataset._data) {\n if (dataset._data.hasOwnProperty(nodeId)) {\n let node = this.body.nodes[nodeId];\n if (dataset._data[nodeId].x != Math.round(node.x) || dataset._data[nodeId].y != Math.round(node.y)) {\n dataArray.push({ id: node.id, x: Math.round(node.x), y: Math.round(node.y) });\n }\n }\n }\n dataset.update(dataArray);\n }\n\n /**\n * get the bounding box of a node.\n * @param {Node.id} nodeId\n * @returns {j|*}\n */\n getBoundingBox(nodeId) {\n if (this.body.nodes[nodeId] !== undefined) {\n return this.body.nodes[nodeId].shape.boundingBox;\n }\n }\n\n\n /**\n * Get the Ids of nodes connected to this node.\n * @param {Node.id} nodeId\n * @param {'to'|'from'|undefined} direction values 'from' and 'to' select respectively parent and child nodes only.\n * Any other value returns both parent and child nodes.\n * @returns {Array}\n */\n getConnectedNodes(nodeId, direction) {\n let nodeList = [];\n if (this.body.nodes[nodeId] !== undefined) {\n let node = this.body.nodes[nodeId];\n let nodeObj = {}; // used to quickly check if node already exists\n for (let i = 0; i < node.edges.length; i++) {\n let edge = node.edges[i];\n if (direction !== 'to' && edge.toId == node.id) { // these are double equals since ids can be numeric or string\n if (nodeObj[edge.fromId] === undefined) {\n nodeList.push(edge.fromId);\n nodeObj[edge.fromId] = true;\n }\n }\n else if (direction !== 'from' && edge.fromId == node.id) { // these are double equals since ids can be numeric or string\n if (nodeObj[edge.toId] === undefined) {\n nodeList.push(edge.toId);\n nodeObj[edge.toId] = true;\n }\n }\n }\n }\n return nodeList;\n }\n\n /**\n * Get the ids of the edges connected to this node.\n * @param {Node.id} nodeId\n * @returns {*}\n */\n getConnectedEdges(nodeId) {\n let edgeList = [];\n if (this.body.nodes[nodeId] !== undefined) {\n let node = this.body.nodes[nodeId];\n for (let i = 0; i < node.edges.length; i++) {\n edgeList.push(node.edges[i].id)\n }\n }\n else {\n console.log(\"NodeId provided for getConnectedEdges does not exist. Provided: \", nodeId);\n }\n return edgeList;\n }\n\n\n /**\n * Move a node.\n *\n * @param {Node.id} nodeId\n * @param {number} x\n * @param {number} y\n */\n moveNode(nodeId, x, y) {\n if (this.body.nodes[nodeId] !== undefined) {\n this.body.nodes[nodeId].x = Number(x);\n this.body.nodes[nodeId].y = Number(y);\n setTimeout(() => {this.body.emitter.emit(\"startSimulation\")},0);\n }\n else {\n console.log(\"Node id supplied to moveNode does not exist. Provided: \", nodeId);\n }\n }\n}\n\nexport default NodesHandler;\n","/** ============================================================================\n * Location of all the endpoint drawing routines.\n *\n * Every endpoint has its own drawing routine, which contains an endpoint definition.\n *\n * The endpoint definitions must have the following properies:\n *\n * - (0,0) is the connection point to the node it attaches to\n * - The endpoints are orientated to the positive x-direction\n * - The length of the endpoint is at most 1\n *\n * As long as the endpoint classes remain simple and not too numerous, they will\n * be contained within this module.\n * All classes here except `EndPoints` should be considered as private to this module.\n *\n * -----------------------------------------------------------------------------\n * ### Further Actions\n *\n * After adding a new endpoint here, you also need to do the following things:\n *\n * - Add the new endpoint name to `network/options.js` in array `endPoints`.\n * - Add the new endpoint name to the documentation.\n * Scan for 'arrows.to.type` and add it to the description.\n * - Add the endpoint to the examples. At the very least, add it to example\n * `edgeStyles/arrowTypes`.\n * ============================================================================= */\n\n/**\n * Common methods for endpoints\n *\n * @class\n */\nclass EndPoint {\n\n /**\n * Apply transformation on points for display.\n *\n * The following is done:\n * - rotate by the specified angle\n * - multiply the (normalized) coordinates by the passed length\n * - offset by the target coordinates\n *\n * @param {Array} points\n * @param {ArrowData} arrowData\n * @static\n */\n static transform(points, arrowData) {\n if (!(points instanceof Array)) {\n points = [points];\n }\n\n var x = arrowData.point.x;\n var y = arrowData.point.y;\n var angle = arrowData.angle\n var length = arrowData.length;\n\n for(var i = 0; i < points.length; ++i) {\n var p = points[i];\n var xt = p.x * Math.cos(angle) - p.y * Math.sin(angle);\n var yt = p.x * Math.sin(angle) + p.y * Math.cos(angle);\n\n p.x = x + length*xt;\n p.y = y + length*yt;\n }\n }\n\n\n /**\n * Draw a closed path using the given real coordinates.\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {Array.} points\n * @static\n */\n static drawPath(ctx, points) {\n ctx.beginPath();\n ctx.moveTo(points[0].x, points[0].y);\n for(var i = 1; i < points.length; ++i) {\n ctx.lineTo(points[i].x, points[i].y);\n }\n ctx.closePath();\n }\n}\n\n\n\n\n/**\n * Drawing methods for the arrow endpoint.\n * @extends EndPoint\n */\nclass Arrow extends EndPoint {\n\n /**\n * Draw this shape at the end of a line.\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {ArrowData} arrowData\n * @static\n */\n static draw(ctx, arrowData) {\n // Normalized points of closed path, in the order that they should be drawn.\n // (0, 0) is the attachment point, and the point around which should be rotated\n var points = [\n { x: 0 , y: 0 },\n { x:-1 , y: 0.3},\n { x:-0.9, y: 0 },\n { x:-1 , y:-0.3},\n ];\n\n EndPoint.transform(points, arrowData);\n EndPoint.drawPath(ctx, points);\n }\n}\n\n/**\n * Drawing methods for the crow endpoint.\n * @extends EndPoint\n */\nclass Crow {\n\n /**\n * Draw this shape at the end of a line.\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {ArrowData} arrowData\n * @static\n */\n static draw(ctx, arrowData) {\n // Normalized points of closed path, in the order that they should be drawn.\n // (0, 0) is the attachment point, and the point around which should be rotated\n var points = [\n { x:-1, y: 0},\n { x:0, y: 0.3},\n { x:-0.4, y: 0},\n { x:0, y:-0.3},\n ];\n\n EndPoint.transform(points, arrowData);\n EndPoint.drawPath(ctx, points);\n }\n}\n\n/**\n * Drawing methods for the curve endpoint.\n * @extends EndPoint\n */\nclass Curve {\n\n /**\n * Draw this shape at the end of a line.\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {ArrowData} arrowData\n * @static\n */\n static draw(ctx, arrowData) {\n // Normalized points of closed path, in the order that they should be drawn.\n // (0, 0) is the attachment point, and the point around which should be rotated\n var point = {x:-0.4, y:0};\n EndPoint.transform(point, arrowData);\n\n // Update endpoint style for drawing transparent arc.\n ctx.strokeStyle = ctx.fillStyle;\n ctx.fillStyle = 'rgba(0, 0, 0, 0)';\n\n // Define curve endpoint as semicircle.\n var pi = Math.PI\n var start_angle = arrowData.angle - pi/2;\n var end_angle = arrowData.angle + pi/2;\n ctx.beginPath();\n ctx.arc(point.x, point.y, arrowData.length*0.4, start_angle, end_angle, false);\n ctx.stroke()\n }\n}\n\n/**\n * Drawing methods for the inverted curve endpoint.\n * @extends EndPoint\n */\nclass InvertedCurve {\n\n /**\n * Draw this shape at the end of a line.\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {ArrowData} arrowData\n * @static\n */\n static draw(ctx, arrowData) {\n // Normalized points of closed path, in the order that they should be drawn.\n // (0, 0) is the attachment point, and the point around which should be rotated\n var point = {x:-0.3, y:0};\n EndPoint.transform(point, arrowData);\n\n // Update endpoint style for drawing transparent arc.\n ctx.strokeStyle = ctx.fillStyle;\n ctx.fillStyle = 'rgba(0, 0, 0, 0)';\n\n // Define inverted curve endpoint as semicircle.\n var pi = Math.PI\n var start_angle = arrowData.angle + pi/2;\n var end_angle = arrowData.angle + 3*pi/2;\n ctx.beginPath();\n ctx.arc(point.x, point.y, arrowData.length*0.4, start_angle, end_angle, false);\n ctx.stroke()\n }\n}\n\n/**\n * Drawing methods for the trinagle endpoint.\n * @extends EndPoint\n */\nclass Triangle {\n\n /**\n * Draw this shape at the end of a line.\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {ArrowData} arrowData\n * @static\n */\n static draw(ctx, arrowData) {\n // Normalized points of closed path, in the order that they should be drawn.\n // (0, 0) is the attachment point, and the point around which should be rotated\n var points = [\n { x:0.02, y:0},\n { x:-1, y: 0.3},\n { x:-1, y:-0.3},\n ];\n\n EndPoint.transform(points, arrowData);\n EndPoint.drawPath(ctx, points);\n }\n}\n\n/**\n * Drawing methods for the inverted trinagle endpoint.\n * @extends EndPoint\n */\nclass InvertedTriangle {\n\n /**\n * Draw this shape at the end of a line.\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {ArrowData} arrowData\n * @static\n */\n static draw(ctx, arrowData) {\n // Normalized points of closed path, in the order that they should be drawn.\n // (0, 0) is the attachment point, and the point around which should be rotated\n var points = [\n { x:0, y:0.3},\n { x:0, y: -0.3},\n { x:-1, y:0},\n ];\n\n EndPoint.transform(points, arrowData);\n EndPoint.drawPath(ctx, points);\n }\n}\n\n/**\n * Drawing methods for the circle endpoint.\n */\nclass Circle {\n\n /**\n * Draw this shape at the end of a line.\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {ArrowData} arrowData\n * @static\n */\n static draw(ctx, arrowData) {\n var point = {x:-0.4, y:0};\n\n EndPoint.transform(point, arrowData);\n ctx.circle(point.x, point.y, arrowData.length*0.4);\n }\n}\n\n\n/**\n * Drawing methods for the bar endpoint.\n */\nclass Bar {\n\n /**\n * Draw this shape at the end of a line.\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {ArrowData} arrowData\n * @static\n */\n static draw(ctx, arrowData) {\n/*\n var points = [\n {x:0, y:0.5},\n {x:0, y:-0.5}\n ];\n\n EndPoint.transform(points, arrowData);\n ctx.beginPath();\n ctx.moveTo(points[0].x, points[0].y);\n ctx.lineTo(points[1].x, points[1].y);\n ctx.stroke();\n*/\n\n var points = [\n {x:0, y:0.5},\n {x:0, y:-0.5},\n {x:-0.15, y:-0.5},\n {x:-0.15, y:0.5},\n ];\n\n EndPoint.transform(points, arrowData);\n EndPoint.drawPath(ctx, points);\n }\n}\n\n/**\n * Drawing methods for the box endpoint.\n */\nclass Box {\n\n /**\n * Draw this shape at the end of a line.\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {ArrowData} arrowData\n * @static\n */\n static draw(ctx, arrowData) {\n var points = [\n {x:0, y:0.3},\n {x:0, y:-0.3},\n {x:-0.6, y:-0.3},\n {x:-0.6, y:0.3},\n ];\n\n EndPoint.transform(points, arrowData);\n EndPoint.drawPath(ctx, points);\n }\n}\n\n/**\n * Drawing methods for the diamond endpoint.\n */\nclass Diamond {\n\n /**\n * Draw this shape at the end of a line.\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {ArrowData} arrowData\n * @static\n */\n static draw(ctx, arrowData) {\n var points = [\n {x:0, y:0},\n {x:-0.5, y:-0.3},\n {x:-1, y:0},\n {x:-0.5, y:0.3},\n ];\n\n EndPoint.transform(points, arrowData);\n EndPoint.drawPath(ctx, points);\n }\n}\n\n/**\n * Drawing methods for the vee endpoint.\n * @extends EndPoint\n */\nclass Vee {\n\n /**\n * Draw this shape at the end of a line.\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {ArrowData} arrowData\n * @static\n */\n static draw(ctx, arrowData) {\n // Normalized points of closed path, in the order that they should be drawn.\n // (0, 0) is the attachment point, and the point around which should be rotated\n var points = [\n { x:-1, y: 0.3},\n { x:-0.5, y: 0},\n { x:-1, y:-0.3},\n { x:0, y: 0},\n ];\n\n EndPoint.transform(points, arrowData);\n EndPoint.drawPath(ctx, points);\n }\n}\n\n/**\n * Drawing methods for the endpoints.\n */\nclass EndPoints {\n\n /**\n * Draw an endpoint\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {ArrowData} arrowData\n * @static\n */\n static draw(ctx, arrowData) {\n var type;\n if (arrowData.type) {\n type = arrowData.type.toLowerCase();\n }\n\n switch (type) {\n case 'circle':\n Circle.draw(ctx, arrowData);\n break;\n case 'box':\n Box.draw(ctx, arrowData);\n break;\n case 'crow':\n Crow.draw(ctx, arrowData);\n break;\n case 'curve':\n Curve.draw(ctx, arrowData);\n break;\n case 'diamond':\n Diamond.draw(ctx, arrowData);\n break;\n case 'inv_curve':\n InvertedCurve.draw(ctx, arrowData);\n break;\n case 'triangle':\n Triangle.draw(ctx, arrowData);\n break;\n case 'inv_triangle':\n InvertedTriangle.draw(ctx, arrowData);\n break;\n case 'bar':\n Bar.draw(ctx, arrowData);\n break;\n case 'vee':\n Vee.draw(ctx, arrowData);\n break;\n case 'arrow': // fall-through\n default:\n Arrow.draw(ctx, arrowData);\n }\n }\n}\n\nexport default EndPoints;\n","import util from 'vis-util';\nimport EndPoints from './EndPoints';\n\n\n/**\n * The Base Class for all edges.\n *\n */\nclass EdgeBase {\n /**\n * @param {Object} options\n * @param {Object} body\n * @param {Label} labelModule\n */\n constructor(options, body, labelModule) {\n this.body = body;\n this.labelModule = labelModule;\n this.options = {};\n this.setOptions(options);\n this.colorDirty = true;\n this.color = {};\n this.selectionWidth = 2;\n this.hoverWidth = 1.5;\n this.fromPoint = this.from;\n this.toPoint = this.to;\n }\n\n /**\n * Connects a node to itself\n */\n connect() {\n this.from = this.body.nodes[this.options.from];\n this.to = this.body.nodes[this.options.to];\n }\n\n /**\n *\n * @returns {boolean} always false\n */\n cleanup() {\n return false;\n }\n\n /**\n *\n * @param {Object} options\n */\n setOptions(options) {\n this.options = options;\n this.from = this.body.nodes[this.options.from];\n this.to = this.body.nodes[this.options.to];\n this.id = this.options.id;\n }\n\n /**\n * Redraw a edge as a line\n * Draw this edge in the given canvas\n * The 2d context of a HTML canvas can be retrieved by canvas.getContext(\"2d\");\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {Array} values\n * @param {boolean} selected\n * @param {boolean} hover\n * @param {Node} viaNode\n * @private\n */\n drawLine(ctx, values, selected, hover, viaNode) {\n // set style\n ctx.strokeStyle = this.getColor(ctx, values, selected, hover);\n ctx.lineWidth = values.width;\n\n if (values.dashes !== false) {\n this._drawDashedLine(ctx, values, viaNode);\n }\n else {\n this._drawLine(ctx, values, viaNode);\n }\n }\n\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {Array} values\n * @param {Node} viaNode\n * @param {{x: number, y: number}} [fromPoint]\n * @param {{x: number, y: number}} [toPoint]\n * @private\n */\n _drawLine(ctx, values, viaNode, fromPoint, toPoint) {\n if (this.from != this.to) {\n // draw line\n this._line(ctx, values, viaNode, fromPoint, toPoint);\n }\n else {\n let [x,y,radius] = this._getCircleData(ctx);\n this._circle(ctx, values, x, y, radius);\n }\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {Array} values\n * @param {Node} viaNode\n * @param {{x: number, y: number}} [fromPoint] TODO: Remove in next major release\n * @param {{x: number, y: number}} [toPoint] TODO: Remove in next major release\n * @private\n */\n _drawDashedLine(ctx, values, viaNode, fromPoint, toPoint) { // eslint-disable-line no-unused-vars\n ctx.lineCap = 'round';\n let pattern = [5,5];\n if (Array.isArray(values.dashes) === true) {\n pattern = values.dashes;\n }\n\n // only firefox and chrome support this method, else we use the legacy one.\n if (ctx.setLineDash !== undefined) {\n ctx.save();\n\n // set dash settings for chrome or firefox\n ctx.setLineDash(pattern);\n ctx.lineDashOffset = 0;\n\n // draw the line\n if (this.from != this.to) {\n // draw line\n this._line(ctx, values, viaNode);\n }\n else {\n let [x,y,radius] = this._getCircleData(ctx);\n this._circle(ctx, values, x, y, radius);\n }\n\n // restore the dash settings.\n ctx.setLineDash([0]);\n ctx.lineDashOffset = 0;\n ctx.restore();\n }\n else { // unsupporting smooth lines\n if (this.from != this.to) {\n // draw line\n ctx.dashedLine(this.from.x, this.from.y, this.to.x, this.to.y, pattern);\n }\n else {\n let [x,y,radius] = this._getCircleData(ctx);\n this._circle(ctx, values, x, y, radius);\n }\n // draw shadow if enabled\n this.enableShadow(ctx, values);\n\n ctx.stroke();\n\n // disable shadows for other elements.\n this.disableShadow(ctx, values);\n }\n }\n\n\n /**\n *\n * @param {Node} nearNode\n * @param {CanvasRenderingContext2D} ctx\n * @param {Object} options\n * @returns {{x: number, y: number}}\n */\n findBorderPosition(nearNode, ctx, options) {\n if (this.from != this.to) {\n return this._findBorderPosition(nearNode, ctx, options);\n }\n else {\n return this._findBorderPositionCircle(nearNode, ctx, options);\n }\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @returns {{from: ({x: number, y: number, t: number}|*), to: ({x: number, y: number, t: number}|*)}}\n */\n findBorderPositions(ctx) {\n let from = {};\n let to = {};\n if (this.from != this.to) {\n from = this._findBorderPosition(this.from, ctx);\n to = this._findBorderPosition(this.to, ctx);\n }\n else {\n let [x,y] = this._getCircleData(ctx).slice(0, 2);\n\n from = this._findBorderPositionCircle(this.from, ctx, {x, y, low:0.25, high:0.6, direction:-1});\n to = this._findBorderPositionCircle(this.from, ctx, {x, y, low:0.6, high:0.8, direction:1});\n }\n return {from, to};\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @returns {Array.} x, y, radius\n * @private\n */\n _getCircleData(ctx) {\n let x, y;\n let node = this.from;\n let radius = this.options.selfReferenceSize;\n\n if (ctx !== undefined) {\n if (node.shape.width === undefined) {\n node.shape.resize(ctx);\n }\n }\n\n // get circle coordinates\n if (node.shape.width > node.shape.height) {\n x = node.x + node.shape.width * 0.5;\n y = node.y - radius;\n }\n else {\n x = node.x + radius;\n y = node.y - node.shape.height * 0.5;\n }\n return [x,y,radius];\n }\n\n /**\n * Get a point on a circle\n * @param {number} x\n * @param {number} y\n * @param {number} radius\n * @param {number} percentage - Value between 0 (line start) and 1 (line end)\n * @return {Object} point\n * @private\n */\n _pointOnCircle(x, y, radius, percentage) {\n let angle = percentage * 2 * Math.PI;\n return {\n x: x + radius * Math.cos(angle),\n y: y - radius * Math.sin(angle)\n }\n }\n\n /**\n * This function uses binary search to look for the point where the circle crosses the border of the node.\n * @param {Node} node\n * @param {CanvasRenderingContext2D} ctx\n * @param {Object} options\n * @returns {*}\n * @private\n */\n _findBorderPositionCircle(node, ctx, options) {\n let x = options.x;\n let y = options.y;\n let low = options.low;\n let high = options.high;\n let direction = options.direction;\n\n let maxIterations = 10;\n let iteration = 0;\n let radius = this.options.selfReferenceSize;\n let pos, angle, distanceToBorder, distanceToPoint, difference;\n let threshold = 0.05;\n let middle = (low + high) * 0.5;\n\n while (low <= high && iteration < maxIterations) {\n middle = (low + high) * 0.5;\n\n pos = this._pointOnCircle(x, y, radius, middle);\n angle = Math.atan2((node.y - pos.y), (node.x - pos.x));\n distanceToBorder = node.distanceToBorder(ctx, angle);\n distanceToPoint = Math.sqrt(Math.pow(pos.x - node.x, 2) + Math.pow(pos.y - node.y, 2));\n difference = distanceToBorder - distanceToPoint;\n if (Math.abs(difference) < threshold) {\n break; // found\n }\n else if (difference > 0) { // distance to nodes is larger than distance to border --> t needs to be bigger if we're looking at the to node.\n if (direction > 0) {\n low = middle;\n }\n else {\n high = middle;\n }\n }\n else {\n if (direction > 0) {\n high = middle;\n }\n else {\n low = middle;\n }\n }\n iteration++;\n\n }\n pos.t = middle;\n\n return pos;\n }\n\n /**\n * Get the line width of the edge. Depends on width and whether one of the\n * connected nodes is selected.\n * @param {boolean} selected\n * @param {boolean} hover\n * @returns {number} width\n * @private\n */\n getLineWidth(selected, hover) {\n if (selected === true) {\n return Math.max(this.selectionWidth, 0.3 / this.body.view.scale);\n }\n else {\n if (hover === true) {\n return Math.max(this.hoverWidth, 0.3 / this.body.view.scale);\n }\n else {\n return Math.max(this.options.width, 0.3 / this.body.view.scale);\n }\n }\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {ArrowOptions} values\n * @param {boolean} selected - Unused\n * @param {boolean} hover - Unused\n * @returns {string}\n */\n getColor(ctx, values, selected, hover) { // eslint-disable-line no-unused-vars\n if (values.inheritsColor !== false) {\n // when this is a loop edge, just use the 'from' method\n if ((values.inheritsColor === 'both') && (this.from.id !== this.to.id)) {\n let grd = ctx.createLinearGradient(this.from.x, this.from.y, this.to.x, this.to.y);\n let fromColor, toColor;\n fromColor = this.from.options.color.highlight.border;\n toColor = this.to.options.color.highlight.border;\n\n if ((this.from.selected === false) && (this.to.selected === false)) {\n fromColor = util.overrideOpacity(this.from.options.color.border, values.opacity);\n toColor = util.overrideOpacity(this.to.options.color.border, values.opacity);\n }\n else if ((this.from.selected === true) && (this.to.selected === false)) {\n toColor = this.to.options.color.border;\n }\n else if ((this.from.selected === false) && (this.to.selected === true)) {\n fromColor = this.from.options.color.border;\n }\n grd.addColorStop(0, fromColor);\n grd.addColorStop(1, toColor);\n\n // -------------------- this returns -------------------- //\n return grd;\n }\n\n if (values.inheritsColor === \"to\") {\n return util.overrideOpacity(this.to.options.color.border, values.opacity);\n } else { // \"from\"\n return util.overrideOpacity(this.from.options.color.border, values.opacity);\n }\n } else {\n return util.overrideOpacity(values.color, values.opacity);\n }\n }\n\n /**\n * Draw a line from a node to itself, a circle\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {Array} values\n * @param {number} x\n * @param {number} y\n * @param {number} radius\n * @private\n */\n _circle(ctx, values, x, y, radius) {\n // draw shadow if enabled\n this.enableShadow(ctx, values);\n\n // draw a circle\n ctx.beginPath();\n ctx.arc(x, y, radius, 0, 2 * Math.PI, false);\n ctx.stroke();\n\n // disable shadows for other elements.\n this.disableShadow(ctx, values);\n }\n\n\n /**\n * Calculate the distance between a point (x3,y3) and a line segment from (x1,y1) to (x2,y2).\n * (x3,y3) is the point.\n *\n * http://stackoverflow.com/questions/849211/shortest-distancae-between-a-point-and-a-line-segment\n *\n * @param {number} x1\n * @param {number} y1\n * @param {number} x2\n * @param {number} y2\n * @param {number} x3\n * @param {number} y3\n * @param {Node} via\n * @param {Array} values\n * @returns {number}\n */\n getDistanceToEdge(x1, y1, x2, y2, x3, y3, via, values) { // eslint-disable-line no-unused-vars\n let returnValue = 0;\n if (this.from != this.to) {\n returnValue = this._getDistanceToEdge(x1, y1, x2, y2, x3, y3, via)\n }\n else {\n let [x,y,radius] = this._getCircleData(undefined);\n let dx = x - x3;\n let dy = y - y3;\n returnValue = Math.abs(Math.sqrt(dx * dx + dy * dy) - radius);\n }\n\n return returnValue;\n }\n\n\n /**\n *\n * @param {number} x1\n * @param {number} y1\n * @param {number} x2\n * @param {number} y2\n * @param {number} x3\n * @param {number} y3\n * @returns {number}\n * @private\n */\n _getDistanceToLine(x1, y1, x2, y2, x3, y3) {\n let px = x2 - x1;\n let py = y2 - y1;\n let something = px * px + py * py;\n let u = ((x3 - x1) * px + (y3 - y1) * py) / something;\n\n if (u > 1) {\n u = 1;\n }\n else if (u < 0) {\n u = 0;\n }\n\n let x = x1 + u * px;\n let y = y1 + u * py;\n let dx = x - x3;\n let dy = y - y3;\n\n //# Note: If the actual distance does not matter,\n //# if you only want to compare what this function\n //# returns to other results of this function, you\n //# can just return the squared distance instead\n //# (i.e. remove the sqrt) to gain a little performance\n\n return Math.sqrt(dx * dx + dy * dy);\n }\n\n\n /**\n * @param {CanvasRenderingContext2D} ctx\n * @param {string} position\n * @param {Node} viaNode\n * @param {boolean} selected\n * @param {boolean} hover\n * @param {Array} values\n * @returns {{point: *, core: {x: number, y: number}, angle: *, length: number, type: *}}\n */\n getArrowData(ctx, position, viaNode, selected, hover, values) {\n // set lets\n let angle;\n let arrowPoint;\n let node1;\n let node2;\n let guideOffset;\n let scaleFactor;\n let type;\n let lineWidth = values.width;\n\n if (position === 'from') {\n node1 = this.from;\n node2 = this.to;\n guideOffset = 0.1;\n scaleFactor = values.fromArrowScale;\n type = values.fromArrowType;\n }\n else if (position === 'to') {\n node1 = this.to;\n node2 = this.from;\n guideOffset = -0.1;\n scaleFactor = values.toArrowScale;\n type = values.toArrowType;\n }\n else {\n node1 = this.to;\n node2 = this.from;\n scaleFactor = values.middleArrowScale;\n type = values.middleArrowType;\n }\n\n // if not connected to itself\n if (node1 != node2) {\n if (position !== 'middle') {\n // draw arrow head\n if (this.options.smooth.enabled === true) {\n arrowPoint = this.findBorderPosition(node1, ctx, { via: viaNode });\n let guidePos = this.getPoint(Math.max(0.0, Math.min(1.0, arrowPoint.t + guideOffset)), viaNode);\n angle = Math.atan2((arrowPoint.y - guidePos.y), (arrowPoint.x - guidePos.x));\n } else {\n angle = Math.atan2((node1.y - node2.y), (node1.x - node2.x));\n arrowPoint = this.findBorderPosition(node1, ctx);\n }\n } else {\n angle = Math.atan2((node1.y - node2.y), (node1.x - node2.x));\n arrowPoint = this.getPoint(0.5, viaNode); // this is 0.6 to account for the size of the arrow.\n }\n } else {\n // draw circle\n let [x,y,radius] = this._getCircleData(ctx);\n\n if (position === 'from') {\n arrowPoint = this.findBorderPosition(this.from, ctx, { x, y, low: 0.25, high: 0.6, direction: -1 });\n angle = arrowPoint.t * -2 * Math.PI + 1.5 * Math.PI + 0.1 * Math.PI;\n } else if (position === 'to') {\n arrowPoint = this.findBorderPosition(this.from, ctx, { x, y, low: 0.6, high: 1.0, direction: 1 });\n angle = arrowPoint.t * -2 * Math.PI + 1.5 * Math.PI - 1.1 * Math.PI;\n } else {\n arrowPoint = this._pointOnCircle(x, y, radius, 0.175);\n angle = 3.9269908169872414; // === 0.175 * -2 * Math.PI + 1.5 * Math.PI + 0.1 * Math.PI;\n }\n }\n\n if (position === 'middle' && scaleFactor < 0) lineWidth *= -1; // reversed middle arrow\n let length = 15 * scaleFactor + 3 * lineWidth; // 3* lineWidth is the width of the edge.\n\n var xi = arrowPoint.x - length * 0.9 * Math.cos(angle);\n var yi = arrowPoint.y - length * 0.9 * Math.sin(angle);\n let arrowCore = { x: xi, y: yi };\n\n return { point: arrowPoint, core: arrowCore, angle: angle, length: length, type: type };\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {ArrowOptions} values\n * @param {boolean} selected\n * @param {boolean} hover\n * @param {Object} arrowData\n */\n drawArrowHead(ctx, values, selected, hover, arrowData) {\n // set style\n ctx.strokeStyle = this.getColor(ctx, values, selected, hover);\n ctx.fillStyle = ctx.strokeStyle;\n ctx.lineWidth = values.width;\n\n EndPoints.draw(ctx, arrowData);\n\n // draw shadow if enabled\n this.enableShadow(ctx, values);\n ctx.fill();\n // disable shadows for other elements.\n this.disableShadow(ctx, values);\n }\n\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {ArrowOptions} values\n */\n enableShadow(ctx, values) {\n if (values.shadow === true) {\n ctx.shadowColor = values.shadowColor;\n ctx.shadowBlur = values.shadowSize;\n ctx.shadowOffsetX = values.shadowX;\n ctx.shadowOffsetY = values.shadowY;\n }\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {ArrowOptions} values\n */\n disableShadow(ctx, values) {\n if (values.shadow === true) {\n ctx.shadowColor = 'rgba(0,0,0,0)';\n ctx.shadowBlur = 0;\n ctx.shadowOffsetX = 0;\n ctx.shadowOffsetY = 0;\n }\n }\n \n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {{toArrow: boolean, toArrowScale: (allOptions.edges.arrows.to.scaleFactor|{number}|allOptions.edges.arrows.middle.scaleFactor|allOptions.edges.arrows.from.scaleFactor|Array|number), toArrowType: *, middleArrow: boolean, middleArrowScale: (number|allOptions.edges.arrows.middle.scaleFactor|{number}|Array), middleArrowType: (allOptions.edges.arrows.middle.type|{string}|string|*), fromArrow: boolean, fromArrowScale: (allOptions.edges.arrows.to.scaleFactor|{number}|allOptions.edges.arrows.middle.scaleFactor|allOptions.edges.arrows.from.scaleFactor|Array|number), fromArrowType: *, arrowStrikethrough: (*|boolean|allOptions.edges.arrowStrikethrough|{boolean}), color: undefined, inheritsColor: (string|string|string|allOptions.edges.color.inherit|{string, boolean}|Array|*), opacity: *, hidden: *, length: *, shadow: *, shadowColor: *, shadowSize: *, shadowX: *, shadowY: *, dashes: (*|boolean|Array|allOptions.edges.dashes|{boolean, array}), width: *}} values\n */\n drawBackground(ctx, values) {\n if (values.background !== false) {\n let attrs = ['strokeStyle', 'lineWidth', 'dashes'];\n let origCtxAttr = {};\n // save original line attrs\n attrs.forEach(function(attrname) {\n origCtxAttr[attrname] = ctx[attrname];\n });\n\n ctx.strokeStyle = values.backgroundColor;\n ctx.lineWidth = values.backgroundSize;\n this.setStrokeDashed(ctx, values.backgroundDashes);\n\n ctx.stroke();\n\n // restore original line attrs\n attrs.forEach(function(attrname) {\n ctx[attrname] = origCtxAttr[attrname];\n });\n this.setStrokeDashed(ctx, values.dashes);\n }\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {boolean|Array} dashes\n */\n setStrokeDashed(ctx, dashes) {\n if (dashes !== false) {\n if (ctx.setLineDash !== undefined) {\n let pattern = [5, 5];\n if (Array.isArray(dashes) === true) {\n pattern = dashes;\n }\n ctx.setLineDash(pattern);\n }\n else {\n console.warn(\"setLineDash is not supported in this browser. The dashed stroke cannot be used.\");\n }\n }\n else {\n if (ctx.setLineDash !== undefined) {\n ctx.setLineDash([]);\n }\n else {\n console.warn(\"setLineDash is not supported in this browser. The dashed stroke cannot be used.\");\n }\n }\n }\n}\n\nexport default EdgeBase;\n","import EdgeBase from './EdgeBase'\n\n/**\n * The Base Class for all Bezier edges. Bezier curves are used to model smooth\n * gradual curves in paths between nodes.\n *\n * @extends EdgeBase\n */\nclass BezierEdgeBase extends EdgeBase {\n /**\n * @param {Object} options\n * @param {Object} body\n * @param {Label} labelModule\n */\n constructor(options, body, labelModule) {\n super(options, body, labelModule);\n }\n\n /**\n * This function uses binary search to look for the point where the bezier curve crosses the border of the node.\n *\n * @param {Node} nearNode\n * @param {CanvasRenderingContext2D} ctx\n * @param {Node} viaNode\n * @returns {*}\n * @private\n */\n _findBorderPositionBezier(nearNode, ctx, viaNode = this._getViaCoordinates()) {\n var maxIterations = 10;\n var iteration = 0;\n var low = 0;\n var high = 1;\n var pos, angle, distanceToBorder, distanceToPoint, difference;\n var threshold = 0.2;\n var node = this.to;\n var from = false;\n if (nearNode.id === this.from.id) {\n node = this.from;\n from = true;\n }\n\n while (low <= high && iteration < maxIterations) {\n var middle = (low + high) * 0.5;\n\n pos = this.getPoint(middle, viaNode);\n angle = Math.atan2((node.y - pos.y), (node.x - pos.x));\n distanceToBorder = node.distanceToBorder(ctx, angle);\n distanceToPoint = Math.sqrt(Math.pow(pos.x - node.x, 2) + Math.pow(pos.y - node.y, 2));\n difference = distanceToBorder - distanceToPoint;\n if (Math.abs(difference) < threshold) {\n break; // found\n }\n else if (difference < 0) { // distance to nodes is larger than distance to border --> t needs to be bigger if we're looking at the to node.\n if (from === false) {\n low = middle;\n }\n else {\n high = middle;\n }\n }\n else {\n if (from === false) {\n high = middle;\n }\n else {\n low = middle;\n }\n }\n\n iteration++;\n }\n pos.t = middle;\n\n return pos;\n }\n\n\n\n /**\n * Calculate the distance between a point (x3,y3) and a line segment from\n * (x1,y1) to (x2,y2).\n * http://stackoverflow.com/questions/849211/shortest-distancae-between-a-point-and-a-line-segment\n * @param {number} x1 from x\n * @param {number} y1 from y\n * @param {number} x2 to x\n * @param {number} y2 to y\n * @param {number} x3 point to check x\n * @param {number} y3 point to check y\n * @param {Node} via\n * @returns {number}\n * @private\n */\n _getDistanceToBezierEdge(x1, y1, x2, y2, x3, y3, via) { // x3,y3 is the point\n let minDistance = 1e9;\n let distance;\n let i, t, x, y;\n let lastX = x1;\n let lastY = y1;\n for (i = 1; i < 10; i++) {\n t = 0.1 * i;\n x = Math.pow(1 - t, 2) * x1 + (2 * t * (1 - t)) * via.x + Math.pow(t, 2) * x2;\n y = Math.pow(1 - t, 2) * y1 + (2 * t * (1 - t)) * via.y + Math.pow(t, 2) * y2;\n if (i > 0) {\n distance = this._getDistanceToLine(lastX, lastY, x, y, x3, y3);\n minDistance = distance < minDistance ? distance : minDistance;\n }\n lastX = x;\n lastY = y;\n }\n\n return minDistance;\n }\n\n\n /**\n * Draw a bezier curve between two nodes\n *\n * The method accepts zero, one or two control points.\n * Passing zero control points just draws a straight line\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {Object} values | options for shadow drawing\n * @param {Object|undefined} viaNode1 | first control point for curve drawing\n * @param {Object|undefined} viaNode2 | second control point for curve drawing\n *\n * @protected\n */\n _bezierCurve(ctx, values, viaNode1, viaNode2) {\n var hasNode1 = (viaNode1 !== undefined && viaNode1.x !== undefined);\n var hasNode2 = (viaNode2 !== undefined && viaNode2.x !== undefined);\n\n ctx.beginPath();\n ctx.moveTo(this.fromPoint.x, this.fromPoint.y);\n\n if (hasNode1 && hasNode2) {\n ctx.bezierCurveTo(viaNode1.x, viaNode1.y, viaNode2.x, viaNode2.y, this.toPoint.x, this.toPoint.y);\n } else if (hasNode1) {\n ctx.quadraticCurveTo(viaNode1.x, viaNode1.y, this.toPoint.x, this.toPoint.y);\n } else {\n // fallback to normal straight edge\n ctx.lineTo(this.toPoint.x, this.toPoint.y);\n }\n // draw a background\n this.drawBackground(ctx, values);\n\n // draw shadow if enabled\n this.enableShadow(ctx, values);\n ctx.stroke();\n this.disableShadow(ctx, values);\n }\n\n /**\n *\n * @returns {*|{x, y}|{x: undefined, y: undefined}}\n */\n getViaNode() {\n return this._getViaCoordinates();\n }\n}\n\nexport default BezierEdgeBase;\n","import BezierEdgeBase from './BezierEdgeBase'\n\n/**\n * A Base Class for all Cubic Bezier Edges. Bezier curves are used to model\n * smooth gradual curves in paths between nodes.\n *\n * @extends BezierEdgeBase\n */\nclass CubicBezierEdgeBase extends BezierEdgeBase {\n /**\n * @param {Object} options\n * @param {Object} body\n * @param {Label} labelModule\n */\n constructor(options, body, labelModule) {\n super(options, body, labelModule);\n }\n\n /**\n * Calculate the distance between a point (x3,y3) and a line segment from\n * (x1,y1) to (x2,y2).\n * http://stackoverflow.com/questions/849211/shortest-distancae-between-a-point-and-a-line-segment\n * https://en.wikipedia.org/wiki/B%C3%A9zier_curve\n * @param {number} x1 from x\n * @param {number} y1 from y\n * @param {number} x2 to x\n * @param {number} y2 to y\n * @param {number} x3 point to check x\n * @param {number} y3 point to check y\n * @param {Node} via1\n * @param {Node} via2\n * @returns {number}\n * @private\n */\n _getDistanceToBezierEdge(x1, y1, x2, y2, x3, y3, via1, via2) { // x3,y3 is the point\n let minDistance = 1e9;\n let distance;\n let i, t, x, y;\n let lastX = x1;\n let lastY = y1;\n let vec = [0,0,0,0]\n for (i = 1; i < 10; i++) {\n t = 0.1 * i;\n vec[0] = Math.pow(1 - t, 3);\n vec[1] = 3 * t * Math.pow(1 - t, 2);\n vec[2] = 3 * Math.pow(t,2) * (1 - t);\n vec[3] = Math.pow(t, 3);\n x = vec[0] * x1 + vec[1] * via1.x + vec[2] * via2.x + vec[3] * x2;\n y = vec[0] * y1 + vec[1] * via1.y + vec[2] * via2.y + vec[3] * y2;\n if (i > 0) {\n distance = this._getDistanceToLine(lastX, lastY, x, y, x3, y3);\n minDistance = distance < minDistance ? distance : minDistance;\n }\n lastX = x;\n lastY = y;\n }\n\n return minDistance;\n }\n}\n\nexport default CubicBezierEdgeBase;","import CubicBezierEdgeBase from './util/CubicBezierEdgeBase'\n\n/**\n * A Cubic Bezier Edge. Bezier curves are used to model smooth gradual\n * curves in paths between nodes.\n *\n * @extends CubicBezierEdgeBase\n */\nclass CubicBezierEdge extends CubicBezierEdgeBase {\n /**\n * @param {Object} options\n * @param {Object} body\n * @param {Label} labelModule\n */\n constructor(options, body, labelModule) {\n super(options, body, labelModule);\n }\n\n /**\n * Draw a line between two nodes\n * @param {CanvasRenderingContext2D} ctx\n * @param {ArrowOptions} values\n * @param {Array.} viaNodes\n * @private\n */\n _line(ctx, values, viaNodes) {\n // get the coordinates of the support points.\n let via1 = viaNodes[0];\n let via2 = viaNodes[1];\n this._bezierCurve(ctx, values, via1, via2);\n }\n\n /**\n *\n * @returns {Array.<{x: number, y: number}>}\n * @private\n */\n _getViaCoordinates() {\n let dx = this.from.x - this.to.x;\n let dy = this.from.y - this.to.y;\n\n let x1, y1, x2, y2;\n let roundness = this.options.smooth.roundness;\n\n // horizontal if x > y or if direction is forced or if direction is horizontal\n if ((Math.abs(dx) > Math.abs(dy) || this.options.smooth.forceDirection === true || this.options.smooth.forceDirection === 'horizontal') && this.options.smooth.forceDirection !== 'vertical') {\n y1 = this.from.y;\n y2 = this.to.y;\n x1 = this.from.x - roundness * dx;\n x2 = this.to.x + roundness * dx;\n }\n else {\n y1 = this.from.y - roundness * dy;\n y2 = this.to.y + roundness * dy;\n x1 = this.from.x;\n x2 = this.to.x;\n }\n\n return [{x: x1, y: y1},{x: x2, y: y2}];\n }\n\n /**\n *\n * @returns {Array.<{x: number, y: number}>}\n */\n getViaNode() {\n return this._getViaCoordinates();\n }\n\n /**\n *\n * @param {Node} nearNode\n * @param {CanvasRenderingContext2D} ctx\n * @returns {{x: number, y: number, t: number}}\n * @private\n */\n _findBorderPosition(nearNode, ctx) {\n return this._findBorderPositionBezier(nearNode, ctx);\n }\n\n /**\n *\n * @param {number} x1\n * @param {number} y1\n * @param {number} x2\n * @param {number} y2\n * @param {number} x3\n * @param {number} y3\n * @param {Node} via1\n * @param {Node} via2\n * @returns {number}\n * @private\n */\n _getDistanceToEdge(x1, y1, x2, y2, x3, y3, [via1, via2] = this._getViaCoordinates()) { // x3,y3 is the point\n return this._getDistanceToBezierEdge(x1, y1, x2, y2, x3, y3, via1, via2);\n }\n\n /**\n * Combined function of pointOnLine and pointOnBezier. This gives the coordinates of a point on the line at a certain percentage of the way\n * @param {number} percentage\n * @param {{x: number, y: number}} [via1=this._getViaCoordinates()[0]]\n * @param {{x: number, y: number}} [via2=this._getViaCoordinates()[1]]\n * @returns {{x: number, y: number}}\n * @private\n */\n getPoint(percentage, [via1, via2] = this._getViaCoordinates()) {\n let t = percentage;\n let vec = [];\n vec[0] = Math.pow(1 - t, 3);\n vec[1] = 3 * t * Math.pow(1 - t, 2);\n vec[2] = 3 * Math.pow(t,2) * (1 - t);\n vec[3] = Math.pow(t, 3);\n let x = vec[0] * this.fromPoint.x + vec[1] * via1.x + vec[2] * via2.x + vec[3] * this.toPoint.x;\n let y = vec[0] * this.fromPoint.y + vec[1] * via1.y + vec[2] * via2.y + vec[3] * this.toPoint.y;\n\n return {x: x, y: y};\n }\n}\n\n\nexport default CubicBezierEdge;\n","import BezierEdgeBase from './util/BezierEdgeBase'\n\n/**\n * A Dynamic Bezier Edge. Bezier curves are used to model smooth gradual\n * curves in paths between nodes. The Dynamic piece refers to how the curve\n * reacts to physics changes.\n *\n * @extends BezierEdgeBase\n */\nclass BezierEdgeDynamic extends BezierEdgeBase {\n /**\n * @param {Object} options\n * @param {Object} body\n * @param {Label} labelModule\n */\n constructor(options, body, labelModule) {\n //this.via = undefined; // Here for completeness but not allowed to defined before super() is invoked.\n super(options, body, labelModule); // --> this calls the setOptions below\n this._boundFunction = () => {this.positionBezierNode();};\n this.body.emitter.on(\"_repositionBezierNodes\", this._boundFunction);\n }\n\n /**\n *\n * @param {Object} options\n */\n setOptions(options) {\n // check if the physics has changed.\n let physicsChange = false;\n if (this.options.physics !== options.physics) {\n physicsChange = true;\n }\n\n // set the options and the to and from nodes\n this.options = options;\n this.id = this.options.id;\n this.from = this.body.nodes[this.options.from];\n this.to = this.body.nodes[this.options.to];\n\n // setup the support node and connect\n this.setupSupportNode();\n this.connect();\n\n // when we change the physics state of the edge, we reposition the support node.\n if (physicsChange === true) {\n this.via.setOptions({physics: this.options.physics});\n this.positionBezierNode();\n }\n }\n\n /**\n * Connects an edge to node(s)\n */\n connect() {\n this.from = this.body.nodes[this.options.from];\n this.to = this.body.nodes[this.options.to];\n if (this.from === undefined || this.to === undefined || this.options.physics === false) {\n this.via.setOptions({physics:false})\n }\n else {\n // fix weird behaviour where a self referencing node has physics enabled\n if (this.from.id === this.to.id) {\n this.via.setOptions({physics: false})\n }\n else {\n this.via.setOptions({physics: true})\n }\n }\n }\n\n /**\n * remove the support nodes\n * @returns {boolean}\n */\n cleanup() {\n this.body.emitter.off(\"_repositionBezierNodes\", this._boundFunction);\n if (this.via !== undefined) {\n delete this.body.nodes[this.via.id];\n this.via = undefined;\n return true;\n }\n return false;\n }\n\n /**\n * Bezier curves require an anchor point to calculate the smooth flow. These points are nodes. These nodes are invisible but\n * are used for the force calculation.\n *\n * The changed data is not called, if needed, it is returned by the main edge constructor.\n * @private\n */\n setupSupportNode() {\n if (this.via === undefined) {\n var nodeId = \"edgeId:\" + this.id;\n var node = this.body.functions.createNode({\n id: nodeId,\n shape: 'circle',\n physics:true,\n hidden:true\n });\n this.body.nodes[nodeId] = node;\n this.via = node;\n this.via.parentEdgeId = this.id;\n this.positionBezierNode();\n }\n }\n\n /**\n * Positions bezier node\n */\n positionBezierNode() {\n if (this.via !== undefined && this.from !== undefined && this.to !== undefined) {\n this.via.x = 0.5 * (this.from.x + this.to.x);\n this.via.y = 0.5 * (this.from.y + this.to.y);\n }\n else if (this.via !== undefined) {\n this.via.x = 0;\n this.via.y = 0;\n }\n }\n\n /**\n * Draw a line between two nodes\n * @param {CanvasRenderingContext2D} ctx\n * @param {ArrowOptions} values\n * @param {Node} viaNode\n * @private\n */\n _line(ctx, values, viaNode) {\n this._bezierCurve(ctx, values, viaNode);\n }\n\n /**\n *\n * @returns {Node|undefined|*|{index, line, column}}\n */\n getViaNode() {\n return this.via;\n }\n\n\n /**\n * Combined function of pointOnLine and pointOnBezier. This gives the coordinates of a point on the line at a certain percentage of the way\n *\n * @param {number} percentage\n * @param {Node} viaNode\n * @returns {{x: number, y: number}}\n * @private\n */\n getPoint(percentage, viaNode = this.via) {\n let t = percentage;\n let x, y;\n if (this.from === this.to){\n let [cx,cy,cr] = this._getCircleData(this.from);\n let a = 2 * Math.PI * (1 - t);\n x = cx + cr * Math.sin(a);\n y = cy + cr - cr * (1 - Math.cos(a));\n } else {\n x = Math.pow(1 - t, 2) * this.fromPoint.x + 2 * t * (1 - t) * viaNode.x + Math.pow(t, 2) * this.toPoint.x;\n y = Math.pow(1 - t, 2) * this.fromPoint.y + 2 * t * (1 - t) * viaNode.y + Math.pow(t, 2) * this.toPoint.y;\n }\n\n return {x: x, y: y};\n }\n\n /**\n *\n * @param {Node} nearNode\n * @param {CanvasRenderingContext2D} ctx\n * @returns {*}\n * @private\n */\n _findBorderPosition(nearNode, ctx) {\n return this._findBorderPositionBezier(nearNode, ctx, this.via);\n }\n\n /**\n *\n * @param {number} x1\n * @param {number} y1\n * @param {number} x2\n * @param {number} y2\n * @param {number} x3\n * @param {number} y3\n * @returns {number}\n * @private\n */\n _getDistanceToEdge(x1, y1, x2, y2, x3, y3) { // x3,y3 is the point\n return this._getDistanceToBezierEdge(x1, y1, x2, y2, x3, y3, this.via);\n }\n}\n\n\nexport default BezierEdgeDynamic;\n","import BezierEdgeBase from './util/BezierEdgeBase'\n\n/**\n * A Static Bezier Edge. Bezier curves are used to model smooth gradual\n * curves in paths between nodes.\n *\n * @extends BezierEdgeBase\n */\nclass BezierEdgeStatic extends BezierEdgeBase {\n /**\n * @param {Object} options\n * @param {Object} body\n * @param {Label} labelModule\n */\n constructor(options, body, labelModule) {\n super(options, body, labelModule);\n }\n\n /**\n * Draw a line between two nodes\n * @param {CanvasRenderingContext2D} ctx\n * @param {ArrowOptions} values\n * @param {Node} viaNode\n * @private\n */\n _line(ctx, values, viaNode) {\n this._bezierCurve(ctx, values, viaNode);\n }\n\n /**\n *\n * @returns {Array.<{x: number, y: number}>}\n */\n getViaNode() {\n return this._getViaCoordinates();\n }\n\n\n /**\n * We do not use the to and fromPoints here to make the via nodes the same as edges without arrows.\n * @returns {{x: undefined, y: undefined}}\n * @private\n */\n _getViaCoordinates() {\n // Assumption: x/y coordinates in from/to always defined\n let xVia = undefined;\n let yVia = undefined;\n let factor = this.options.smooth.roundness;\n let type = this.options.smooth.type;\n let dx = Math.abs(this.from.x - this.to.x);\n let dy = Math.abs(this.from.y - this.to.y);\n if (type === 'discrete' || type === 'diagonalCross') {\n let stepX;\n let stepY;\n\n if (dx <= dy) {\n stepX = stepY = factor * dy;\n } else {\n stepX = stepY = factor * dx;\n }\n\n if (this.from.x > this.to.x) stepX = -stepX;\n if (this.from.y >= this.to.y) stepY = -stepY;\n\n xVia = this.from.x + stepX;\n yVia = this.from.y + stepY;\n\n if (type === \"discrete\") {\n if (dx <= dy) {\n xVia = dx < factor * dy ? this.from.x : xVia;\n } else {\n yVia = dy < factor * dx ? this.from.y : yVia;\n }\n }\n }\n else if (type === \"straightCross\") {\n let stepX = (1 - factor) * dx;\n let stepY = (1 - factor) * dy;\n\n if (dx <= dy) { // up - down\n stepX = 0;\n if (this.from.y < this.to.y) stepY = -stepY;\n }\n else { // left - right\n if (this.from.x < this.to.x) stepX = -stepX;\n stepY = 0;\n }\n xVia = this.to.x + stepX;\n yVia = this.to.y + stepY;\n }\n else if (type === 'horizontal') {\n let stepX = (1 - factor) * dx;\n if (this.from.x < this.to.x) stepX = -stepX;\n xVia = this.to.x + stepX;\n yVia = this.from.y;\n }\n else if (type === 'vertical') {\n let stepY = (1 - factor) * dy;\n if (this.from.y < this.to.y) stepY = -stepY;\n xVia = this.from.x;\n yVia = this.to.y + stepY;\n }\n else if (type === 'curvedCW') {\n dx = this.to.x - this.from.x;\n dy = this.from.y - this.to.y;\n let radius = Math.sqrt(dx * dx + dy * dy);\n let pi = Math.PI;\n\n let originalAngle = Math.atan2(dy, dx);\n let myAngle = (originalAngle + ((factor * 0.5) + 0.5) * pi) % (2 * pi);\n\n xVia = this.from.x + (factor * 0.5 + 0.5) * radius * Math.sin(myAngle);\n yVia = this.from.y + (factor * 0.5 + 0.5) * radius * Math.cos(myAngle);\n }\n else if (type === 'curvedCCW') {\n dx = this.to.x - this.from.x;\n dy = this.from.y - this.to.y;\n let radius = Math.sqrt(dx * dx + dy * dy);\n let pi = Math.PI;\n\n let originalAngle = Math.atan2(dy, dx);\n let myAngle = (originalAngle + ((-factor * 0.5) + 0.5) * pi) % (2 * pi);\n\n xVia = this.from.x + (factor * 0.5 + 0.5) * radius * Math.sin(myAngle);\n yVia = this.from.y + (factor * 0.5 + 0.5) * radius * Math.cos(myAngle);\n }\n else { // continuous\n let stepX;\n let stepY;\n\n if (dx <= dy) {\n stepX = stepY = factor * dy;\n } else {\n stepX = stepY = factor * dx;\n }\n\n if (this.from.x > this.to.x) stepX = -stepX;\n if (this.from.y >= this.to.y) stepY = -stepY;\n\n xVia = this.from.x + stepX;\n yVia = this.from.y + stepY;\n\n if (dx <= dy) {\n if (this.from.x <= this.to.x) {\n xVia = this.to.x < xVia ? this.to.x : xVia;\n }\n else {\n xVia = this.to.x > xVia ? this.to.x : xVia;\n }\n }\n else {\n if (this.from.y >= this.to.y) {\n yVia = this.to.y > yVia ? this.to.y : yVia;\n } else {\n yVia = this.to.y < yVia ? this.to.y : yVia;\n }\n }\n }\n return {x: xVia, y: yVia};\n }\n\n /**\n *\n * @param {Node} nearNode\n * @param {CanvasRenderingContext2D} ctx\n * @param {Object} options\n * @returns {*}\n * @private\n */\n _findBorderPosition(nearNode, ctx, options = {}) {\n return this._findBorderPositionBezier(nearNode, ctx, options.via);\n }\n\n /**\n *\n * @param {number} x1\n * @param {number} y1\n * @param {number} x2\n * @param {number} y2\n * @param {number} x3\n * @param {number} y3\n * @param {Node} viaNode\n * @returns {number}\n * @private\n */\n _getDistanceToEdge(x1, y1, x2, y2, x3, y3, viaNode = this._getViaCoordinates()) { // x3,y3 is the point\n return this._getDistanceToBezierEdge(x1, y1, x2, y2, x3, y3, viaNode);\n }\n\n /**\n * Combined function of pointOnLine and pointOnBezier. This gives the coordinates of a point on the line at a certain percentage of the way\n * @param {number} percentage\n * @param {Node} viaNode\n * @returns {{x: number, y: number}}\n * @private\n */\n getPoint(percentage, viaNode = this._getViaCoordinates()) {\n var t = percentage;\n var x = Math.pow(1 - t, 2) * this.fromPoint.x + (2 * t * (1 - t)) * viaNode.x + Math.pow(t, 2) * this.toPoint.x;\n var y = Math.pow(1 - t, 2) * this.fromPoint.y + (2 * t * (1 - t)) * viaNode.y + Math.pow(t, 2) * this.toPoint.y;\n\n return {x: x, y: y};\n }\n}\n\n\nexport default BezierEdgeStatic;\n","import EdgeBase from './util/EdgeBase'\n\n/**\n * A Straight Edge.\n *\n * @extends EdgeBase\n */\nclass StraightEdge extends EdgeBase {\n /**\n * @param {Object} options\n * @param {Object} body\n * @param {Label} labelModule\n */\n constructor(options, body, labelModule) {\n super(options, body, labelModule);\n }\n\n /**\n * Draw a line between two nodes\n * @param {CanvasRenderingContext2D} ctx\n * @param {ArrowOptions} values\n * @private\n */\n _line(ctx, values) {\n // draw a straight line\n ctx.beginPath();\n ctx.moveTo(this.fromPoint.x, this.fromPoint.y);\n ctx.lineTo(this.toPoint.x, this.toPoint.y);\n // draw shadow if enabled\n this.enableShadow(ctx, values);\n ctx.stroke();\n this.disableShadow(ctx, values);\n }\n\n /**\n *\n * @returns {undefined}\n */\n getViaNode() {\n return undefined;\n }\n\n /**\n * Combined function of pointOnLine and pointOnBezier. This gives the coordinates of a point on the line at a certain percentage of the way\n *\n * @param {number} percentage\n * @returns {{x: number, y: number}}\n * @private\n */\n getPoint(percentage) {\n return {\n x: (1 - percentage) * this.fromPoint.x + percentage * this.toPoint.x,\n y: (1 - percentage) * this.fromPoint.y + percentage * this.toPoint.y\n }\n }\n\n /**\n *\n * @param {Node} nearNode\n * @param {CanvasRenderingContext2D} ctx\n * @returns {{x: number, y: number}}\n * @private\n */\n _findBorderPosition(nearNode, ctx) {\n let node1 = this.to;\n let node2 = this.from;\n if (nearNode.id === this.from.id) {\n node1 = this.from;\n node2 = this.to;\n }\n\n let angle = Math.atan2((node1.y - node2.y), (node1.x - node2.x));\n let dx = (node1.x - node2.x);\n let dy = (node1.y - node2.y);\n let edgeSegmentLength = Math.sqrt(dx * dx + dy * dy);\n let toBorderDist = nearNode.distanceToBorder(ctx, angle);\n let toBorderPoint = (edgeSegmentLength - toBorderDist) / edgeSegmentLength;\n\n let borderPos = {};\n borderPos.x = (1 - toBorderPoint) * node2.x + toBorderPoint * node1.x;\n borderPos.y = (1 - toBorderPoint) * node2.y + toBorderPoint * node1.y;\n\n return borderPos;\n }\n\n /**\n *\n * @param {number} x1\n * @param {number} y1\n * @param {number} x2\n * @param {number} y2\n * @param {number} x3\n * @param {number} y3\n * @returns {number}\n * @private\n */\n _getDistanceToEdge(x1, y1, x2, y2, x3, y3) { // x3,y3 is the point\n return this._getDistanceToLine(x1, y1, x2, y2, x3, y3);\n }\n\n}\n\nexport default StraightEdge;\n","import util from 'vis-util';\nimport Label from './shared/Label';\nimport ComponentUtil from './shared/ComponentUtil';\nimport CubicBezierEdge from './edges/CubicBezierEdge';\nimport BezierEdgeDynamic from './edges/BezierEdgeDynamic';\nimport BezierEdgeStatic from './edges/BezierEdgeStatic';\nimport StraightEdge from './edges/StraightEdge';\n\n\n/**\n * An edge connects two nodes and has a specific direction.\n */\nclass Edge {\n /**\n * @param {Object} options values specific to this edge, must contain at least 'from' and 'to'\n * @param {Object} body shared state from Network instance\n * @param {Object} globalOptions options from the EdgesHandler instance\n * @param {Object} defaultOptions default options from the EdgeHandler instance. Value and reference are constant\n */\n constructor(options, body, globalOptions, defaultOptions) {\n if (body === undefined) {\n throw new Error(\"No body provided\");\n }\n\n // Since globalOptions is constant in values as well as reference,\n // Following needs to be done only once.\n\n this.options = util.bridgeObject(globalOptions);\n this.globalOptions = globalOptions;\n this.defaultOptions = defaultOptions;\n this.body = body;\n\n // initialize variables\n this.id = undefined;\n this.fromId = undefined;\n this.toId = undefined;\n this.selected = false;\n this.hover = false;\n this.labelDirty = true;\n\n this.baseWidth = this.options.width;\n this.baseFontSize = this.options.font.size;\n\n this.from = undefined; // a node\n this.to = undefined; // a node\n\n this.edgeType = undefined;\n\n this.connected = false;\n\n this.labelModule = new Label(this.body, this.options, true /* It's an edge label */);\n this.setOptions(options);\n }\n\n\n /**\n * Set or overwrite options for the edge\n * @param {Object} options an object with options\n * @returns {null|boolean} null if no options, boolean if date changed\n */\n setOptions(options) {\n if (!options) {\n return;\n }\n\n // record old value of this.options.hidden\n let oldHidden = this.options.hidden\n\n if (oldHidden === undefined || oldHidden === null) {\n oldHidden = false\n }\n\n Edge.parseOptions(this.options, options, true, this.globalOptions);\n\n if (options.id !== undefined) {\n this.id = options.id;\n }\n if (options.from !== undefined) {\n this.fromId = options.from;\n }\n if (options.to !== undefined) {\n this.toId = options.to;\n }\n if (options.title !== undefined) {\n this.title = options.title;\n }\n if (options.value !== undefined) {\n options.value = parseFloat(options.value);\n }\n\n let pile = [options, this.options, this.defaultOptions];\n this.chooser = ComponentUtil.choosify('edge', pile);\n\n // update label Module\n this.updateLabelModule(options);\n\n let dataChanged = this.updateEdgeType();\n\n // if anything has been updates, reset the selection width and the hover width\n this._setInteractionWidths();\n\n // A node is connected when it has a from and to node that both exist in the network.body.nodes.\n this.connect();\n\n let newHidden = this.options.hidden\n\n if (newHidden === undefined || newHidden === null) {\n newHidden = false\n }\n if (newHidden != oldHidden || options.physics !== undefined) {\n dataChanged = true\n }\n\n // there might be a similar problem with physics, but a bug has not been reported\t\n if (options.physics !== undefined) {\n dataChanged = true;\n }\n\n return dataChanged;\n }\n\n\n /**\n *\n * @param {Object} parentOptions\n * @param {Object} newOptions\n * @param {boolean} [allowDeletion=false]\n * @param {Object} [globalOptions={}]\n * @param {boolean} [copyFromGlobals=false]\n */\n static parseOptions(parentOptions, newOptions, allowDeletion = false, globalOptions = {}, copyFromGlobals = false) {\n var fields = [\n 'arrowStrikethrough',\n 'id',\n 'from',\n 'hidden',\n 'hoverWidth',\n 'labelHighlightBold',\n 'length',\n 'line',\n 'opacity',\n 'physics',\n 'scaling',\n 'selectionWidth',\n 'selfReferenceSize',\n 'to',\n 'title',\n 'value',\n 'width',\n 'font',\n 'chosen',\n 'widthConstraint'\n ];\n\n // only deep extend the items in the field array. These do not have shorthand.\n util.selectiveDeepExtend(fields, parentOptions, newOptions, allowDeletion);\n\n // Only copy label if it's a legal value.\n if (ComponentUtil.isValidLabel(newOptions.label)) {\n parentOptions.label = newOptions.label;\n } else if (!ComponentUtil.isValidLabel(parentOptions.label)) {\n parentOptions.label = undefined;\n }\n\n util.mergeOptions(parentOptions, newOptions, 'smooth', globalOptions);\n util.mergeOptions(parentOptions, newOptions, 'shadow', globalOptions);\n util.mergeOptions(parentOptions, newOptions, 'background', globalOptions);\n\n if (newOptions.dashes !== undefined && newOptions.dashes !== null) {\n parentOptions.dashes = newOptions.dashes;\n }\n else if (allowDeletion === true && newOptions.dashes === null) {\n parentOptions.dashes = Object.create(globalOptions.dashes); // this sets the pointer of the option back to the global option.\n }\n\n // set the scaling newOptions\n if (newOptions.scaling !== undefined && newOptions.scaling !== null) {\n if (newOptions.scaling.min !== undefined) {parentOptions.scaling.min = newOptions.scaling.min;}\n if (newOptions.scaling.max !== undefined) {parentOptions.scaling.max = newOptions.scaling.max;}\n util.mergeOptions(parentOptions.scaling, newOptions.scaling, 'label', globalOptions.scaling);\n }\n else if (allowDeletion === true && newOptions.scaling === null) {\n parentOptions.scaling = Object.create(globalOptions.scaling); // this sets the pointer of the option back to the global option.\n }\n\n // handle multiple input cases for arrows\n if (newOptions.arrows !== undefined && newOptions.arrows !== null) {\n if (typeof newOptions.arrows === 'string') {\n let arrows = newOptions.arrows.toLowerCase();\n parentOptions.arrows.to.enabled = arrows.indexOf(\"to\") != -1;\n parentOptions.arrows.middle.enabled = arrows.indexOf(\"middle\") != -1;\n parentOptions.arrows.from.enabled = arrows.indexOf(\"from\") != -1;\n }\n else if (typeof newOptions.arrows === 'object') {\n util.mergeOptions(parentOptions.arrows, newOptions.arrows, 'to', globalOptions.arrows);\n util.mergeOptions(parentOptions.arrows, newOptions.arrows, 'middle', globalOptions.arrows);\n util.mergeOptions(parentOptions.arrows, newOptions.arrows, 'from', globalOptions.arrows);\n }\n else {\n throw new Error(\"The arrow newOptions can only be an object or a string. Refer to the documentation. You used:\" + JSON.stringify(newOptions.arrows));\n }\n }\n else if (allowDeletion === true && newOptions.arrows === null) {\n parentOptions.arrows = Object.create(globalOptions.arrows); // this sets the pointer of the option back to the global option.\n }\n\n // handle multiple input cases for color\n if (newOptions.color !== undefined && newOptions.color !== null) {\n let fromColor = newOptions.color;\n let toColor = parentOptions.color;\n\n // If passed, fill in values from default options - required in the case of no prototype bridging\n if (copyFromGlobals) {\n util.deepExtend(toColor, globalOptions.color, false, allowDeletion);\n } else {\n // Clear local properties - need to do it like this in order to retain prototype bridges\n for (var i in toColor) {\n if (toColor.hasOwnProperty(i)) {\n delete toColor[i];\n }\n }\n }\n\n if (util.isString(toColor)) {\n toColor.color = toColor;\n toColor.highlight = toColor;\n toColor.hover = toColor;\n toColor.inherit = false;\n if (fromColor.opacity === undefined) {\n toColor.opacity = 1.0; // set default\n }\n }\n else {\n let colorsDefined = false;\n if (fromColor.color !== undefined) {toColor.color = fromColor.color; colorsDefined = true;}\n if (fromColor.highlight !== undefined) {toColor.highlight = fromColor.highlight; colorsDefined = true;}\n if (fromColor.hover !== undefined) {toColor.hover = fromColor.hover; colorsDefined = true;}\n if (fromColor.inherit !== undefined) {toColor.inherit = fromColor.inherit;}\n if (fromColor.opacity !== undefined) {toColor.opacity = Math.min(1,Math.max(0,fromColor.opacity));}\n\n if (colorsDefined === true) {\n toColor.inherit = false;\n } else {\n if (toColor.inherit === undefined) {\n toColor.inherit = 'from'; // Set default\n }\n }\n }\n }\n else if (allowDeletion === true && newOptions.color === null) {\n parentOptions.color = util.bridgeObject(globalOptions.color); // set the object back to the global options\n }\n\n if (allowDeletion === true && newOptions.font === null) {\n parentOptions.font = util.bridgeObject(globalOptions.font); // set the object back to the global options\n }\n }\n\n\n /**\n *\n * @returns {ArrowOptions}\n */\n getFormattingValues() {\n let toArrow = (this.options.arrows.to === true) || (this.options.arrows.to.enabled === true)\n let fromArrow = (this.options.arrows.from === true) || (this.options.arrows.from.enabled === true)\n let middleArrow = (this.options.arrows.middle === true) || (this.options.arrows.middle.enabled === true)\n let inheritsColor = this.options.color.inherit;\n let values = {\n toArrow: toArrow,\n toArrowScale: this.options.arrows.to.scaleFactor,\n toArrowType: this.options.arrows.to.type,\n middleArrow: middleArrow,\n middleArrowScale: this.options.arrows.middle.scaleFactor,\n middleArrowType: this.options.arrows.middle.type,\n fromArrow: fromArrow,\n fromArrowScale: this.options.arrows.from.scaleFactor,\n fromArrowType: this.options.arrows.from.type,\n arrowStrikethrough: this.options.arrowStrikethrough,\n color: (inheritsColor? undefined : this.options.color.color),\n inheritsColor: inheritsColor,\n opacity: this.options.color.opacity,\n hidden: this.options.hidden,\n length: this.options.length,\n shadow: this.options.shadow.enabled,\n shadowColor: this.options.shadow.color,\n shadowSize: this.options.shadow.size,\n shadowX: this.options.shadow.x,\n shadowY: this.options.shadow.y,\n dashes: this.options.dashes,\n width: this.options.width,\n background: this.options.background.enabled,\n backgroundColor: this.options.background.color,\n backgroundSize: this.options.background.size,\n backgroundDashes: this.options.background.dashes\n };\n if (this.selected || this.hover) {\n if (this.chooser === true) {\n if (this.selected) {\n let selectedWidth = this.options.selectionWidth;\n if (typeof selectedWidth === 'function') {\n values.width = selectedWidth(values.width);\n } else if (typeof selectedWidth === 'number') {\n values.width += selectedWidth;\n }\n values.width = Math.max(values.width, 0.3 / this.body.view.scale);\n values.color = this.options.color.highlight;\n values.shadow = this.options.shadow.enabled;\n } else if (this.hover) {\n let hoverWidth = this.options.hoverWidth;\n if (typeof hoverWidth === 'function') {\n values.width = hoverWidth(values.width);\n } else if (typeof hoverWidth === 'number') {\n values.width += hoverWidth;\n }\n values.width = Math.max(values.width, 0.3 / this.body.view.scale);\n values.color = this.options.color.hover;\n values.shadow = this.options.shadow.enabled;\n }\n } else if (typeof this.chooser === 'function') {\n this.chooser(values, this.options.id, this.selected, this.hover);\n if (values.color !== undefined) {\n values.inheritsColor = false;\n }\n if (values.shadow === false) {\n if ((values.shadowColor !== this.options.shadow.color) ||\n (values.shadowSize !== this.options.shadow.size) ||\n (values.shadowX !== this.options.shadow.x) ||\n (values.shadowY !== this.options.shadow.y)) {\n values.shadow = true;\n }\n }\n }\n } else {\n values.shadow = this.options.shadow.enabled;\n values.width = Math.max(values.width, 0.3 / this.body.view.scale);\n }\n return values;\n }\n\n /**\n * update the options in the label module\n *\n * @param {Object} options\n */\n updateLabelModule(options) {\n let pile = [\n options,\n this.options,\n this.globalOptions, // Currently set global edge options\n this.defaultOptions\n ];\n\n this.labelModule.update(this.options, pile);\n\n if (this.labelModule.baseSize !== undefined) {\n this.baseFontSize = this.labelModule.baseSize;\n }\n }\n\n /**\n * update the edge type, set the options\n * @returns {boolean}\n */\n updateEdgeType() {\n let smooth = this.options.smooth;\n let dataChanged = false;\n let changeInType = true;\n if (this.edgeType !== undefined) {\n if ((((this.edgeType instanceof BezierEdgeDynamic) &&\n (smooth.enabled === true) &&\n (smooth.type === 'dynamic'))) ||\n (((this.edgeType instanceof CubicBezierEdge) &&\n (smooth.enabled === true) &&\n (smooth.type === 'cubicBezier'))) ||\n (((this.edgeType instanceof BezierEdgeStatic) &&\n (smooth.enabled === true) &&\n (smooth.type !== 'dynamic') &&\n (smooth.type !== 'cubicBezier'))) ||\n (((this.edgeType instanceof StraightEdge) &&\n (smooth.type.enabled === false)))) {\n changeInType = false;\n }\n if (changeInType === true) {\n dataChanged = this.cleanup();\n }\n }\n if (changeInType === true) {\n if (smooth.enabled === true) {\n if (smooth.type === 'dynamic') {\n dataChanged = true;\n this.edgeType = new BezierEdgeDynamic(this.options, this.body, this.labelModule);\n } else if (smooth.type === 'cubicBezier') {\n this.edgeType = new CubicBezierEdge(this.options, this.body, this.labelModule);\n } else {\n this.edgeType = new BezierEdgeStatic(this.options, this.body, this.labelModule);\n }\n } else {\n this.edgeType = new StraightEdge(this.options, this.body, this.labelModule);\n }\n } else { // if nothing changes, we just set the options.\n this.edgeType.setOptions(this.options);\n }\n return dataChanged;\n }\n\n /**\n * Connect an edge to its nodes\n */\n connect() {\n this.disconnect();\n\n this.from = this.body.nodes[this.fromId] || undefined;\n this.to = this.body.nodes[this.toId] || undefined;\n this.connected = (this.from !== undefined && this.to !== undefined);\n\n if (this.connected === true) {\n this.from.attachEdge(this);\n this.to.attachEdge(this);\n }\n else {\n if (this.from) {\n this.from.detachEdge(this);\n }\n if (this.to) {\n this.to.detachEdge(this);\n }\n }\n\n this.edgeType.connect();\n }\n\n\n /**\n * Disconnect an edge from its nodes\n */\n disconnect() {\n if (this.from) {\n this.from.detachEdge(this);\n this.from = undefined;\n }\n if (this.to) {\n this.to.detachEdge(this);\n this.to = undefined;\n }\n\n this.connected = false;\n }\n\n\n /**\n * get the title of this edge.\n * @return {string} title The title of the edge, or undefined when no title\n * has been set.\n */\n getTitle() {\n return this.title;\n }\n\n\n /**\n * check if this node is selecte\n * @return {boolean} selected True if node is selected, else false\n */\n isSelected() {\n return this.selected;\n }\n\n\n /**\n * Retrieve the value of the edge. Can be undefined\n * @return {number} value\n */\n getValue() {\n return this.options.value;\n }\n\n\n /**\n * Adjust the value range of the edge. The edge will adjust it's width\n * based on its value.\n * @param {number} min\n * @param {number} max\n * @param {number} total\n */\n setValueRange(min, max, total) {\n if (this.options.value !== undefined) {\n var scale = this.options.scaling.customScalingFunction(min, max, total, this.options.value);\n var widthDiff = this.options.scaling.max - this.options.scaling.min;\n if (this.options.scaling.label.enabled === true) {\n var fontDiff = this.options.scaling.label.max - this.options.scaling.label.min;\n this.options.font.size = this.options.scaling.label.min + scale * fontDiff;\n }\n this.options.width = this.options.scaling.min + scale * widthDiff;\n }\n else {\n this.options.width = this.baseWidth;\n this.options.font.size = this.baseFontSize;\n }\n\n this._setInteractionWidths();\n this.updateLabelModule();\n }\n\n /**\n *\n * @private\n */\n _setInteractionWidths() {\n if (typeof this.options.hoverWidth === 'function') {\n this.edgeType.hoverWidth = this.options.hoverWidth(this.options.width);\n } else {\n this.edgeType.hoverWidth = this.options.hoverWidth + this.options.width;\n }\n if (typeof this.options.selectionWidth === 'function') {\n this.edgeType.selectionWidth = this.options.selectionWidth(this.options.width);\n } else {\n this.edgeType.selectionWidth = this.options.selectionWidth + this.options.width;\n }\n }\n\n\n /**\n * Redraw a edge\n * Draw this edge in the given canvas\n * The 2d context of a HTML canvas can be retrieved by canvas.getContext(\"2d\");\n * @param {CanvasRenderingContext2D} ctx\n */\n draw(ctx) {\n let values = this.getFormattingValues();\n if (values.hidden) {\n return;\n }\n\n // get the via node from the edge type\n let viaNode = this.edgeType.getViaNode();\n let arrowData = {};\n\n // restore edge targets to defaults\n this.edgeType.fromPoint = this.edgeType.from;\n this.edgeType.toPoint = this.edgeType.to;\n\n // from and to arrows give a different end point for edges. we set them here\n if (values.fromArrow) {\n arrowData.from = this.edgeType.getArrowData(ctx, 'from', viaNode, this.selected, this.hover, values);\n if (values.arrowStrikethrough === false)\n this.edgeType.fromPoint = arrowData.from.core;\n }\n if (values.toArrow) {\n arrowData.to = this.edgeType.getArrowData(ctx, 'to', viaNode, this.selected, this.hover, values);\n if (values.arrowStrikethrough === false)\n this.edgeType.toPoint = arrowData.to.core;\n }\n\n // the middle arrow depends on the line, which can depend on the to and from arrows so we do this one lastly.\n if (values.middleArrow) {\n arrowData.middle = this.edgeType.getArrowData(ctx,'middle', viaNode, this.selected, this.hover, values);\n }\n\n // draw everything\n this.edgeType.drawLine(ctx, values, this.selected, this.hover, viaNode);\n this.drawArrows(ctx, arrowData, values);\n this.drawLabel(ctx, viaNode);\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {Object} arrowData\n * @param {ArrowOptions} values\n */\n drawArrows(ctx, arrowData, values) {\n if (values.fromArrow) {\n this.edgeType.drawArrowHead(ctx, values, this.selected, this.hover, arrowData.from);\n }\n if (values.middleArrow) {\n this.edgeType.drawArrowHead(ctx, values, this.selected, this.hover, arrowData.middle);\n }\n if (values.toArrow) {\n this.edgeType.drawArrowHead(ctx, values, this.selected, this.hover, arrowData.to);\n }\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {Node} viaNode\n */\n drawLabel(ctx, viaNode) {\n if (this.options.label !== undefined) {\n // set style\n var node1 = this.from;\n var node2 = this.to;\n\n if (this.labelModule.differentState(this.selected, this.hover)) {\n this.labelModule.getTextSize(ctx, this.selected, this.hover);\n }\n\n if (node1.id != node2.id) {\n this.labelModule.pointToSelf = false;\n var point = this.edgeType.getPoint(0.5, viaNode);\n ctx.save();\n\n let rotationPoint = this._getRotation(ctx);\n if (rotationPoint.angle != 0) {\n ctx.translate(rotationPoint.x, rotationPoint.y);\n ctx.rotate(rotationPoint.angle);\n }\n\n // draw the label\n this.labelModule.draw(ctx, point.x, point.y, this.selected, this.hover);\n\n/*\n // Useful debug code: draw a border around the label\n // This should **not** be enabled in production!\n var size = this.labelModule.getSize();; // ;; intentional so lint catches it\n ctx.strokeStyle = \"#ff0000\";\n ctx.strokeRect(size.left, size.top, size.width, size.height);\n // End debug code\n*/\n\n ctx.restore();\n }\n else {\n // Ignore the orientations.\n this.labelModule.pointToSelf = true;\n var x, y;\n var radius = this.options.selfReferenceSize;\n if (node1.shape.width > node1.shape.height) {\n x = node1.x + node1.shape.width * 0.5;\n y = node1.y - radius;\n }\n else {\n x = node1.x + radius;\n y = node1.y - node1.shape.height * 0.5;\n }\n point = this._pointOnCircle(x, y, radius, 0.125);\n this.labelModule.draw(ctx, point.x, point.y, this.selected, this.hover);\n }\n }\n }\n\n\n /**\n * Determine all visual elements of this edge instance, in which the given\n * point falls within the bounding shape.\n *\n * @param {point} point\n * @returns {Array.} list with the items which are on the point\n */\n getItemsOnPoint(point) {\n var ret = [];\n\n if (this.labelModule.visible()) {\n let rotationPoint = this._getRotation();\n if (ComponentUtil.pointInRect(this.labelModule.getSize(), point, rotationPoint)) {\n ret.push({edgeId:this.id, labelId:0});\n }\n }\n\n let obj = {\n left: point.x,\n top: point.y\n };\n\n if (this.isOverlappingWith(obj)) {\n ret.push({edgeId:this.id});\n }\n\n return ret;\n }\n\n\n /**\n * Check if this object is overlapping with the provided object\n * @param {Object} obj an object with parameters left, top\n * @return {boolean} True if location is located on the edge\n */\n isOverlappingWith(obj) {\n if (this.connected) {\n var distMax = 10;\n var xFrom = this.from.x;\n var yFrom = this.from.y;\n var xTo = this.to.x;\n var yTo = this.to.y;\n var xObj = obj.left;\n var yObj = obj.top;\n\n var dist = this.edgeType.getDistanceToEdge(xFrom, yFrom, xTo, yTo, xObj, yObj);\n\n return (dist < distMax);\n }\n else {\n return false\n }\n }\n\n\n /** \n * Determine the rotation point, if any.\n *\n * @param {CanvasRenderingContext2D} [ctx] if passed, do a recalculation of the label size\n * @returns {rotationPoint} the point to rotate around and the angle in radians to rotate\n * @private\n */\n _getRotation(ctx) {\n let viaNode = this.edgeType.getViaNode();\n let point = this.edgeType.getPoint(0.5, viaNode);\n\n if (ctx !== undefined) {\n this.labelModule.calculateLabelSize(ctx, this.selected, this.hover, point.x, point.y);\n }\n\n let ret = {\n x: point.x,\n y: this.labelModule.size.yLine,\n angle: 0\n };\n\n if (!this.labelModule.visible()) {\n return ret; // Don't even bother doing the atan2, there's nothing to draw\n }\n\n if (this.options.font.align === \"horizontal\") {\n return ret; // No need to calculate angle\n }\n\n var dy = this.from.y - this.to.y;\n var dx = this.from.x - this.to.x;\n var angle = Math.atan2(dy, dx); // radians\n\n // rotate so that label is readable\n if ((angle < -1 && dx < 0) || (angle > 0 && dx < 0)) {\n angle += Math.PI;\n }\n ret.angle = angle;\n\n return ret;\n }\n\n\n /**\n * Get a point on a circle\n * @param {number} x\n * @param {number} y\n * @param {number} radius\n * @param {number} percentage Value between 0 (line start) and 1 (line end)\n * @return {Object} point\n * @private\n */\n _pointOnCircle(x, y, radius, percentage) {\n var angle = percentage * 2 * Math.PI;\n return {\n x: x + radius * Math.cos(angle),\n y: y - radius * Math.sin(angle)\n }\n }\n\n /**\n * Sets selected state to true\n */\n select() {\n this.selected = true;\n }\n\n /**\n * Sets selected state to false\n */\n unselect() {\n this.selected = false;\n }\n\n\n /**\n * cleans all required things on delete\n * @returns {*}\n */\n cleanup() {\n return this.edgeType.cleanup();\n }\n\n\n /**\n * Remove edge from the list and perform necessary cleanup.\n */\n remove() {\n this.cleanup();\n this.disconnect();\n delete this.body.edges[this.id];\n }\n\n\n /**\n * Check if both connecting nodes exist\n * @returns {boolean}\n */\n endPointsValid() {\n return this.body.nodes[this.fromId] !== undefined\n && this.body.nodes[this.toId] !== undefined;\n }\n}\n\nexport default Edge;\n","import util from 'vis-util';\nimport { DataSet, DataView } from 'vis-data';\nimport Edge from './components/Edge';\n\n/**\n * Handler for Edges\n */\nclass EdgesHandler {\n /**\n * @param {Object} body\n * @param {Array.} images\n * @param {Array.} groups\n */\n constructor(body, images, groups) {\n this.body = body;\n this.images = images;\n this.groups = groups;\n\n // create the edge API in the body container\n this.body.functions.createEdge = this.create.bind(this);\n\n this.edgesListeners = {\n add: (event, params) => {this.add(params.items);},\n update: (event, params) => {this.update(params.items);},\n remove: (event, params) => {this.remove(params.items);}\n };\n\n this.options = {};\n this.defaultOptions = {\n arrows: {\n to: {enabled: false, scaleFactor:1, type: 'arrow'},// boolean / {arrowScaleFactor:1} / {enabled: false, arrowScaleFactor:1}\n middle: {enabled: false, scaleFactor:1, type: 'arrow'},\n from: {enabled: false, scaleFactor:1, type: 'arrow'}\n },\n arrowStrikethrough: true,\n color: {\n color:'#848484',\n highlight:'#848484',\n hover: '#848484',\n inherit: 'from',\n opacity:1.0\n },\n dashes: false,\n font: {\n color: '#343434',\n size: 14, // px\n face: 'arial',\n background: 'none',\n strokeWidth: 2, // px\n strokeColor: '#ffffff',\n align:'horizontal',\n multi: false,\n vadjust: 0,\n bold: {\n mod: 'bold'\n },\n boldital: {\n mod: 'bold italic'\n },\n ital: {\n mod: 'italic'\n },\n mono: {\n mod: '',\n size: 15, // px\n face: 'courier new',\n vadjust: 2\n }\n },\n hidden: false,\n hoverWidth: 1.5,\n label: undefined,\n labelHighlightBold: true,\n length: undefined,\n physics: true,\n scaling:{\n min: 1,\n max: 15,\n label: {\n enabled: true,\n min: 14,\n max: 30,\n maxVisible: 30,\n drawThreshold: 5\n },\n customScalingFunction: function (min,max,total,value) {\n if (max === min) {\n return 0.5;\n }\n else {\n var scale = 1 / (max - min);\n return Math.max(0,(value - min)*scale);\n }\n }\n },\n selectionWidth: 1.5,\n selfReferenceSize:20,\n shadow:{\n enabled: false,\n color: 'rgba(0,0,0,0.5)',\n size:10,\n x:5,\n y:5\n },\n background:{\n enabled: false,\n color: 'rgba(111,111,111,1)',\n size:10,\n dashes: false\n },\n smooth: {\n enabled: true,\n type: \"dynamic\",\n forceDirection:'none',\n roundness: 0.5\n },\n title:undefined,\n width: 1,\n value: undefined\n };\n\n util.deepExtend(this.options, this.defaultOptions);\n\n this.bindEventListeners();\n }\n\n /**\n * Binds event listeners\n */\n bindEventListeners() {\n // this allows external modules to force all dynamic curves to turn static.\n this.body.emitter.on(\"_forceDisableDynamicCurves\", (type, emit = true) => {\n if (type === 'dynamic') {\n type = 'continuous';\n }\n let dataChanged = false;\n for (let edgeId in this.body.edges) {\n if (this.body.edges.hasOwnProperty(edgeId)) {\n let edge = this.body.edges[edgeId];\n let edgeData = this.body.data.edges._data[edgeId];\n\n // only forcibly remove the smooth curve if the data has been set of the edge has the smooth curves defined.\n // this is because a change in the global would not affect these curves.\n if (edgeData !== undefined) {\n let smoothOptions = edgeData.smooth;\n if (smoothOptions !== undefined) {\n if (smoothOptions.enabled === true && smoothOptions.type === 'dynamic') {\n if (type === undefined) {\n edge.setOptions({smooth: false});\n }\n else {\n edge.setOptions({smooth: {type: type}});\n }\n dataChanged = true;\n }\n }\n }\n }\n }\n if (emit === true && dataChanged === true) {\n this.body.emitter.emit(\"_dataChanged\");\n }\n });\n\n // this is called when options of EXISTING nodes or edges have changed.\n //\n // NOTE: Not true, called when options have NOT changed, for both existing as well as new nodes.\n // See update() for logic.\n // TODO: Verify and examine the consequences of this. It might still trigger when\n // non-option fields have changed, but then reconnecting edges is still useless.\n // Alternatively, it might also be called when edges are removed.\n //\n this.body.emitter.on(\"_dataUpdated\", () => {\n this.reconnectEdges();\n });\n\n // refresh the edges. Used when reverting from hierarchical layout\n this.body.emitter.on(\"refreshEdges\", this.refresh.bind(this));\n this.body.emitter.on(\"refresh\", this.refresh.bind(this));\n this.body.emitter.on(\"destroy\", () => {\n util.forEach(this.edgesListeners, (callback, event) => {\n if (this.body.data.edges)\n this.body.data.edges.off(event, callback);\n });\n delete this.body.functions.createEdge;\n delete this.edgesListeners.add;\n delete this.edgesListeners.update;\n delete this.edgesListeners.remove;\n delete this.edgesListeners;\n });\n\n }\n\n /**\n *\n * @param {Object} options\n */\n setOptions(options) {\n if (options !== undefined) {\n // use the parser from the Edge class to fill in all shorthand notations\n Edge.parseOptions(this.options, options, true, this.defaultOptions, true);\n\n // update smooth settings in all edges\n let dataChanged = false;\n if (options.smooth !== undefined) {\n for (let edgeId in this.body.edges) {\n if (this.body.edges.hasOwnProperty(edgeId)) {\n dataChanged = this.body.edges[edgeId].updateEdgeType() || dataChanged;\n }\n }\n }\n\n // update fonts in all edges\n if (options.font !== undefined) {\n for (let edgeId in this.body.edges) {\n if (this.body.edges.hasOwnProperty(edgeId)) {\n this.body.edges[edgeId].updateLabelModule();\n }\n }\n }\n\n // update the state of the variables if needed\n if (options.hidden !== undefined || options.physics !== undefined || dataChanged === true) {\n this.body.emitter.emit('_dataChanged');\n }\n }\n }\n\n\n /**\n * Load edges by reading the data table\n * @param {Array | DataSet | DataView} edges The data containing the edges.\n * @param {boolean} [doNotEmit=false]\n * @private\n */\n setData(edges, doNotEmit = false) {\n var oldEdgesData = this.body.data.edges;\n\n if (edges instanceof DataSet || edges instanceof DataView) {\n this.body.data.edges = edges;\n }\n else if (Array.isArray(edges)) {\n this.body.data.edges = new DataSet();\n this.body.data.edges.add(edges);\n }\n else if (!edges) {\n this.body.data.edges = new DataSet();\n }\n else {\n throw new TypeError('Array or DataSet expected');\n }\n\n // TODO: is this null or undefined or false?\n if (oldEdgesData) {\n // unsubscribe from old dataset\n util.forEach(this.edgesListeners, (callback, event) => {oldEdgesData.off(event, callback);});\n }\n\n // remove drawn edges\n this.body.edges = {};\n\n // TODO: is this null or undefined or false?\n if (this.body.data.edges) {\n // subscribe to new dataset\n util.forEach(this.edgesListeners, (callback, event) => {this.body.data.edges.on(event, callback);});\n\n // draw all new nodes\n var ids = this.body.data.edges.getIds();\n this.add(ids, true);\n }\n\n this.body.emitter.emit('_adjustEdgesForHierarchicalLayout');\n if (doNotEmit === false) {\n this.body.emitter.emit(\"_dataChanged\");\n }\n }\n\n\n /**\n * Add edges\n * @param {number[] | string[]} ids\n * @param {boolean} [doNotEmit=false]\n * @private\n */\n add(ids, doNotEmit = false) {\n var edges = this.body.edges;\n var edgesData = this.body.data.edges;\n\n for (let i = 0; i < ids.length; i++) {\n var id = ids[i];\n\n var oldEdge = edges[id];\n if (oldEdge) {\n oldEdge.disconnect();\n }\n\n var data = edgesData.get(id, {\"showInternalIds\" : true});\n edges[id] = this.create(data);\n }\n\n this.body.emitter.emit('_adjustEdgesForHierarchicalLayout');\n\n if (doNotEmit === false) {\n this.body.emitter.emit(\"_dataChanged\");\n }\n }\n\n\n\n /**\n * Update existing edges, or create them when not yet existing\n * @param {number[] | string[]} ids\n * @private\n */\n update(ids) {\n var edges = this.body.edges;\n var edgesData = this.body.data.edges;\n var dataChanged = false;\n for (var i = 0; i < ids.length; i++) {\n var id = ids[i];\n var data = edgesData.get(id);\n var edge = edges[id];\n if (edge !== undefined) {\n // update edge\n edge.disconnect();\n dataChanged = edge.setOptions(data) || dataChanged; // if a support node is added, data can be changed.\n edge.connect();\n }\n else {\n // create edge\n this.body.edges[id] = this.create(data);\n dataChanged = true;\n }\n }\n\n if (dataChanged === true) {\n this.body.emitter.emit('_adjustEdgesForHierarchicalLayout');\n this.body.emitter.emit(\"_dataChanged\");\n }\n else {\n this.body.emitter.emit(\"_dataUpdated\");\n }\n }\n\n\n /**\n * Remove existing edges. Non existing ids will be ignored\n * @param {number[] | string[]} ids\n * @param {boolean} [emit=true]\n * @private\n */\n remove(ids, emit = true) {\n if (ids.length === 0) return; // early out\n\n var edges = this.body.edges;\n util.forEach(ids, (id) => {\n var edge = edges[id];\n if (edge !== undefined) {\n edge.remove();\n }\n });\n\n if (emit) {\n this.body.emitter.emit(\"_dataChanged\");\n }\n }\n\n /**\n * Refreshes Edge Handler\n */\n refresh() {\n util.forEach(this.body.edges, (edge, edgeId) => {\n let data = this.body.data.edges._data[edgeId];\n if (data !== undefined) {\n edge.setOptions(data);\n }\n });\n }\n\n /**\n *\n * @param {Object} properties\n * @returns {Edge}\n */\n create(properties) {\n return new Edge(properties, this.body, this.options, this.defaultOptions)\n }\n\n /**\n * Reconnect all edges\n * @private\n */\n reconnectEdges() {\n var id;\n var nodes = this.body.nodes;\n var edges = this.body.edges;\n\n for (id in nodes) {\n if (nodes.hasOwnProperty(id)) {\n nodes[id].edges = [];\n }\n }\n\n for (id in edges) {\n if (edges.hasOwnProperty(id)) {\n var edge = edges[id];\n edge.from = null;\n edge.to = null;\n edge.connect();\n }\n }\n }\n\n /**\n *\n * @param {Edge.id} edgeId\n * @returns {Array}\n */\n getConnectedNodes(edgeId) {\n let nodeList = [];\n if (this.body.edges[edgeId] !== undefined) {\n let edge = this.body.edges[edgeId];\n if (edge.fromId !== undefined) {nodeList.push(edge.fromId);}\n if (edge.toId !== undefined) {nodeList.push(edge.toId);}\n }\n return nodeList;\n }\n\n /**\n * There is no direct relation between the nodes and the edges DataSet,\n * so the right place to do call this is in the handler for event `_dataUpdated`.\n */\n _updateState() {\n this._addMissingEdges();\n this._removeInvalidEdges();\n }\n\n /**\n * Scan for missing nodes and remove corresponding edges, if any.\n * @private\n */\n _removeInvalidEdges() {\n \n let edgesToDelete = [];\n\n util.forEach(this.body.edges, (edge, id) => {\n let toNode = this.body.nodes[edge.toId];\n let fromNode = this.body.nodes[edge.fromId];\n\n // Skip clustering edges here, let the Clustering module handle those\n if ((toNode !== undefined && toNode.isCluster === true)\n || (fromNode !== undefined && fromNode.isCluster === true)) {\n return;\n }\n\n if (toNode === undefined || fromNode === undefined) {\n edgesToDelete.push(id);\n }\n });\n\n this.remove(edgesToDelete, false);\n }\n\n /**\n * add all edges from dataset that are not in the cached state\n * @private\n */ \n _addMissingEdges() {\n let edgesData = this.body.data.edges;\n if (edgesData === undefined || edgesData === null) {\n return; // No edges DataSet yet; can happen on startup \n }\n\n let edges = this.body.edges;\n let addIds = [];\n\n edgesData.forEach((edgeData, edgeId) => {\n let edge = edges[edgeId];\n if(edge===undefined) {\n addIds.push(edgeId);\n }\n });\n \n this.add(addIds,true);\n } \n}\n\nexport default EdgesHandler;\n","/**\n * Barnes Hut Solver\n */\nclass BarnesHutSolver {\n /**\n * @param {Object} body\n * @param {{physicsNodeIndices: Array, physicsEdgeIndices: Array, forces: {}, velocities: {}}} physicsBody\n * @param {Object} options\n */\n constructor(body, physicsBody, options) {\n this.body = body;\n this.physicsBody = physicsBody;\n this.barnesHutTree;\n this.setOptions(options);\n this.randomSeed = 5;\n\n // debug: show grid\n // this.body.emitter.on(\"afterDrawing\", (ctx) => {this._debug(ctx,'#ff0000')})\n }\n\n /**\n *\n * @param {Object} options\n */\n setOptions(options) {\n this.options = options;\n this.thetaInversed = 1 / this.options.theta;\n\n // if 1 then min distance = 0.5, if 0.5 then min distance = 0.5 + 0.5*node.shape.radius\n this.overlapAvoidanceFactor = 1 - Math.max(0, Math.min(1, this.options.avoidOverlap));\n }\n\n /**\n *\n * @returns {number} random integer\n */\n seededRandom() {\n var x = Math.sin(this.randomSeed++) * 10000;\n return x - Math.floor(x);\n }\n\n\n /**\n * This function calculates the forces the nodes apply on each other based on a gravitational model.\n * The Barnes Hut method is used to speed up this N-body simulation.\n *\n * @private\n */\n solve() {\n if (this.options.gravitationalConstant !== 0 && this.physicsBody.physicsNodeIndices.length > 0) {\n let node;\n let nodes = this.body.nodes;\n let nodeIndices = this.physicsBody.physicsNodeIndices;\n let nodeCount = nodeIndices.length;\n\n // create the tree\n let barnesHutTree = this._formBarnesHutTree(nodes, nodeIndices);\n\n // for debugging\n this.barnesHutTree = barnesHutTree;\n\n // place the nodes one by one recursively\n for (let i = 0; i < nodeCount; i++) {\n node = nodes[nodeIndices[i]];\n if (node.options.mass > 0) {\n // starting with root is irrelevant, it never passes the BarnesHutSolver condition\n this._getForceContributions(barnesHutTree.root, node);\n }\n }\n }\n }\n\n\n /**\n * @param {Object} parentBranch\n * @param {Node} node\n * @private\n */\n _getForceContributions(parentBranch, node) {\n this._getForceContribution(parentBranch.children.NW, node);\n this._getForceContribution(parentBranch.children.NE, node);\n this._getForceContribution(parentBranch.children.SW, node);\n this._getForceContribution(parentBranch.children.SE, node);\n }\n\n\n /**\n * This function traverses the barnesHutTree. It checks when it can approximate distant nodes with their center of mass.\n * If a region contains a single node, we check if it is not itself, then we apply the force.\n *\n * @param {Object} parentBranch\n * @param {Node} node\n * @private\n */\n _getForceContribution(parentBranch, node) {\n // we get no force contribution from an empty region\n if (parentBranch.childrenCount > 0) {\n let dx, dy, distance;\n\n // get the distance from the center of mass to the node.\n dx = parentBranch.centerOfMass.x - node.x;\n dy = parentBranch.centerOfMass.y - node.y;\n distance = Math.sqrt(dx * dx + dy * dy);\n\n // BarnesHutSolver condition\n // original condition : s/d < theta = passed === d/s > 1/theta = passed\n // calcSize = 1/s --> d * 1/s > 1/theta = passed\n if (distance * parentBranch.calcSize > this.thetaInversed) {\n this._calculateForces(distance, dx, dy, node, parentBranch);\n }\n else {\n // Did not pass the condition, go into children if available\n if (parentBranch.childrenCount === 4) {\n this._getForceContributions(parentBranch, node);\n }\n else { // parentBranch must have only one node, if it was empty we wouldnt be here\n if (parentBranch.children.data.id != node.id) { // if it is not self\n this._calculateForces(distance, dx, dy, node, parentBranch);\n }\n }\n }\n }\n }\n\n\n /**\n * Calculate the forces based on the distance.\n *\n * @param {number} distance\n * @param {number} dx\n * @param {number} dy\n * @param {Node} node\n * @param {Object} parentBranch\n * @private\n */\n _calculateForces(distance, dx, dy, node, parentBranch) {\n if (distance === 0) {\n distance = 0.1;\n dx = distance;\n }\n\n if (this.overlapAvoidanceFactor < 1 && node.shape.radius) {\n distance = Math.max(0.1 + (this.overlapAvoidanceFactor * node.shape.radius), distance - node.shape.radius);\n }\n\n // the dividing by the distance cubed instead of squared allows us to get the fx and fy components without sines and cosines\n // it is shorthand for gravityforce with distance squared and fx = dx/distance * gravityForce\n let gravityForce = this.options.gravitationalConstant * parentBranch.mass * node.options.mass / Math.pow(distance,3);\n let fx = dx * gravityForce;\n let fy = dy * gravityForce;\n\n this.physicsBody.forces[node.id].x += fx;\n this.physicsBody.forces[node.id].y += fy;\n }\n\n\n /**\n * This function constructs the barnesHut tree recursively. It creates the root, splits it and starts placing the nodes.\n *\n * @param {Array.} nodes\n * @param {Array.} nodeIndices\n * @returns {{root: {centerOfMass: {x: number, y: number}, mass: number, range: {minX: number, maxX: number, minY: number, maxY: number}, size: number, calcSize: number, children: {data: null}, maxWidth: number, level: number, childrenCount: number}}} BarnesHutTree\n * @private\n */\n _formBarnesHutTree(nodes, nodeIndices) {\n let node;\n let nodeCount = nodeIndices.length;\n\n let minX = nodes[nodeIndices[0]].x;\n let minY = nodes[nodeIndices[0]].y;\n let maxX = nodes[nodeIndices[0]].x;\n let maxY = nodes[nodeIndices[0]].y;\n\n // get the range of the nodes\n for (let i = 1; i < nodeCount; i++) {\n let node = nodes[nodeIndices[i]];\n let x = node.x;\n let y = node.y;\n if (node.options.mass > 0) {\n if (x < minX) {\n minX = x;\n }\n if (x > maxX) {\n maxX = x;\n }\n if (y < minY) {\n minY = y;\n }\n if (y > maxY) {\n maxY = y;\n }\n }\n }\n // make the range a square\n let sizeDiff = Math.abs(maxX - minX) - Math.abs(maxY - minY); // difference between X and Y\n if (sizeDiff > 0) {\n minY -= 0.5 * sizeDiff;\n maxY += 0.5 * sizeDiff;\n } // xSize > ySize\n else {\n minX += 0.5 * sizeDiff;\n maxX -= 0.5 * sizeDiff;\n } // xSize < ySize\n\n\n let minimumTreeSize = 1e-5;\n let rootSize = Math.max(minimumTreeSize, Math.abs(maxX - minX));\n let halfRootSize = 0.5 * rootSize;\n let centerX = 0.5 * (minX + maxX), centerY = 0.5 * (minY + maxY);\n\n // construct the barnesHutTree\n let barnesHutTree = {\n root: {\n centerOfMass: {x: 0, y: 0},\n mass: 0,\n range: {\n minX: centerX - halfRootSize, maxX: centerX + halfRootSize,\n minY: centerY - halfRootSize, maxY: centerY + halfRootSize\n },\n size: rootSize,\n calcSize: 1 / rootSize,\n children: {data: null},\n maxWidth: 0,\n level: 0,\n childrenCount: 4\n }\n };\n this._splitBranch(barnesHutTree.root);\n\n // place the nodes one by one recursively\n for (let i = 0; i < nodeCount; i++) {\n node = nodes[nodeIndices[i]];\n if (node.options.mass > 0) {\n this._placeInTree(barnesHutTree.root, node);\n }\n }\n\n // make global\n return barnesHutTree\n }\n\n\n /**\n * this updates the mass of a branch. this is increased by adding a node.\n *\n * @param {Object} parentBranch\n * @param {Node} node\n * @private\n */\n _updateBranchMass(parentBranch, node) {\n let centerOfMass = parentBranch.centerOfMass;\n let totalMass = parentBranch.mass + node.options.mass;\n let totalMassInv = 1 / totalMass;\n\n centerOfMass.x = centerOfMass.x * parentBranch.mass + node.x * node.options.mass;\n centerOfMass.x *= totalMassInv;\n\n centerOfMass.y = centerOfMass.y * parentBranch.mass + node.y * node.options.mass;\n centerOfMass.y *= totalMassInv;\n\n parentBranch.mass = totalMass;\n let biggestSize = Math.max(Math.max(node.height, node.radius), node.width);\n parentBranch.maxWidth = (parentBranch.maxWidth < biggestSize) ? biggestSize : parentBranch.maxWidth;\n\n }\n\n\n /**\n * determine in which branch the node will be placed.\n *\n * @param {Object} parentBranch\n * @param {Node} node\n * @param {boolean} skipMassUpdate\n * @private\n */\n _placeInTree(parentBranch, node, skipMassUpdate) {\n if (skipMassUpdate != true || skipMassUpdate === undefined) {\n // update the mass of the branch.\n this._updateBranchMass(parentBranch, node);\n }\n\n let range = parentBranch.children.NW.range;\n let region;\n if (range.maxX > node.x) { // in NW or SW\n if (range.maxY > node.y) {\n region = \"NW\";\n }\n else {\n region = \"SW\";\n }\n }\n else { // in NE or SE\n if (range.maxY > node.y) {\n region = \"NE\";\n }\n else {\n region = \"SE\";\n }\n }\n\n this._placeInRegion(parentBranch, node, region);\n }\n\n\n /**\n * actually place the node in a region (or branch)\n *\n * @param {Object} parentBranch\n * @param {Node} node\n * @param {'NW'| 'NE' | 'SW' | 'SE'} region\n * @private\n */\n _placeInRegion(parentBranch, node, region) {\n let children = parentBranch.children[region];\n\n switch (children.childrenCount) {\n case 0: // place node here\n children.children.data = node;\n children.childrenCount = 1;\n this._updateBranchMass(children, node);\n break;\n case 1: // convert into children\n // if there are two nodes exactly overlapping (on init, on opening of cluster etc.)\n // we move one node a little bit and we do not put it in the tree.\n if (children.children.data.x === node.x && children.children.data.y === node.y) {\n node.x += this.seededRandom();\n node.y += this.seededRandom();\n }\n else {\n this._splitBranch(children);\n this._placeInTree(children, node);\n }\n break;\n case 4: // place in branch\n this._placeInTree(children, node);\n break;\n }\n }\n\n\n /**\n * this function splits a branch into 4 sub branches. If the branch contained a node, we place it in the subbranch\n * after the split is complete.\n *\n * @param {Object} parentBranch\n * @private\n */\n _splitBranch(parentBranch) {\n // if the branch is shaded with a node, replace the node in the new subset.\n let containedNode = null;\n if (parentBranch.childrenCount === 1) {\n containedNode = parentBranch.children.data;\n parentBranch.mass = 0;\n parentBranch.centerOfMass.x = 0;\n parentBranch.centerOfMass.y = 0;\n }\n parentBranch.childrenCount = 4;\n parentBranch.children.data = null;\n this._insertRegion(parentBranch, \"NW\");\n this._insertRegion(parentBranch, \"NE\");\n this._insertRegion(parentBranch, \"SW\");\n this._insertRegion(parentBranch, \"SE\");\n\n if (containedNode != null) {\n this._placeInTree(parentBranch, containedNode);\n }\n }\n\n\n /**\n * This function subdivides the region into four new segments.\n * Specifically, this inserts a single new segment.\n * It fills the children section of the parentBranch\n *\n * @param {Object} parentBranch\n * @param {'NW'| 'NE' | 'SW' | 'SE'} region\n * @private\n */\n _insertRegion(parentBranch, region) {\n let minX, maxX, minY, maxY;\n let childSize = 0.5 * parentBranch.size;\n switch (region) {\n case \"NW\":\n minX = parentBranch.range.minX;\n maxX = parentBranch.range.minX + childSize;\n minY = parentBranch.range.minY;\n maxY = parentBranch.range.minY + childSize;\n break;\n case \"NE\":\n minX = parentBranch.range.minX + childSize;\n maxX = parentBranch.range.maxX;\n minY = parentBranch.range.minY;\n maxY = parentBranch.range.minY + childSize;\n break;\n case \"SW\":\n minX = parentBranch.range.minX;\n maxX = parentBranch.range.minX + childSize;\n minY = parentBranch.range.minY + childSize;\n maxY = parentBranch.range.maxY;\n break;\n case \"SE\":\n minX = parentBranch.range.minX + childSize;\n maxX = parentBranch.range.maxX;\n minY = parentBranch.range.minY + childSize;\n maxY = parentBranch.range.maxY;\n break;\n }\n\n\n parentBranch.children[region] = {\n centerOfMass: {x: 0, y: 0},\n mass: 0,\n range: {minX: minX, maxX: maxX, minY: minY, maxY: maxY},\n size: 0.5 * parentBranch.size,\n calcSize: 2 * parentBranch.calcSize,\n children: {data: null},\n maxWidth: 0,\n level: parentBranch.level + 1,\n childrenCount: 0\n };\n }\n\n\n //--------------------------- DEBUGGING BELOW ---------------------------//\n\n\n /**\n * This function is for debugging purposed, it draws the tree.\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {string} color\n * @private\n */\n _debug(ctx, color) {\n if (this.barnesHutTree !== undefined) {\n\n ctx.lineWidth = 1;\n\n this._drawBranch(this.barnesHutTree.root, ctx, color);\n }\n }\n\n\n /**\n * This function is for debugging purposes. It draws the branches recursively.\n *\n * @param {Object} branch\n * @param {CanvasRenderingContext2D} ctx\n * @param {string} color\n * @private\n */\n _drawBranch(branch, ctx, color) {\n if (color === undefined) {\n color = \"#FF0000\";\n }\n\n if (branch.childrenCount === 4) {\n this._drawBranch(branch.children.NW, ctx);\n this._drawBranch(branch.children.NE, ctx);\n this._drawBranch(branch.children.SE, ctx);\n this._drawBranch(branch.children.SW, ctx);\n }\n ctx.strokeStyle = color;\n ctx.beginPath();\n ctx.moveTo(branch.range.minX, branch.range.minY);\n ctx.lineTo(branch.range.maxX, branch.range.minY);\n ctx.stroke();\n\n ctx.beginPath();\n ctx.moveTo(branch.range.maxX, branch.range.minY);\n ctx.lineTo(branch.range.maxX, branch.range.maxY);\n ctx.stroke();\n\n ctx.beginPath();\n ctx.moveTo(branch.range.maxX, branch.range.maxY);\n ctx.lineTo(branch.range.minX, branch.range.maxY);\n ctx.stroke();\n\n ctx.beginPath();\n ctx.moveTo(branch.range.minX, branch.range.maxY);\n ctx.lineTo(branch.range.minX, branch.range.minY);\n ctx.stroke();\n\n /*\n if (branch.mass > 0) {\n ctx.circle(branch.centerOfMass.x, branch.centerOfMass.y, 3*branch.mass);\n ctx.stroke();\n }\n */\n }\n}\n\n\nexport default BarnesHutSolver;\n","/**\n * Repulsion Solver\n */\nclass RepulsionSolver {\n /**\n * @param {Object} body\n * @param {{physicsNodeIndices: Array, physicsEdgeIndices: Array, forces: {}, velocities: {}}} physicsBody\n * @param {Object} options\n */\n constructor(body, physicsBody, options) {\n this.body = body;\n this.physicsBody = physicsBody;\n this.setOptions(options);\n }\n\n /**\n *\n * @param {Object} options\n */\n setOptions(options) {\n this.options = options;\n }\n\n /**\n * Calculate the forces the nodes apply on each other based on a repulsion field.\n * This field is linearly approximated.\n *\n * @private\n */\n solve() {\n var dx, dy, distance, fx, fy, repulsingForce, node1, node2;\n\n var nodes = this.body.nodes;\n var nodeIndices = this.physicsBody.physicsNodeIndices;\n var forces = this.physicsBody.forces;\n\n // repulsing forces between nodes\n var nodeDistance = this.options.nodeDistance;\n\n // approximation constants\n var a = (-2 / 3) / nodeDistance;\n var b = 4 / 3;\n\n // we loop from i over all but the last entree in the array\n // j loops from i+1 to the last. This way we do not double count any of the indices, nor i === j\n for (let i = 0; i < nodeIndices.length - 1; i++) {\n node1 = nodes[nodeIndices[i]];\n for (let j = i + 1; j < nodeIndices.length; j++) {\n node2 = nodes[nodeIndices[j]];\n\n dx = node2.x - node1.x;\n dy = node2.y - node1.y;\n distance = Math.sqrt(dx * dx + dy * dy);\n\n // same condition as BarnesHutSolver, making sure nodes are never 100% overlapping.\n if (distance === 0) {\n distance = 0.1*Math.random();\n dx = distance;\n }\n\n if (distance < 2 * nodeDistance) {\n if (distance < 0.5 * nodeDistance) {\n repulsingForce = 1.0;\n }\n else {\n repulsingForce = a * distance + b; // linear approx of 1 / (1 + Math.exp((distance / nodeDistance - 1) * steepness))\n }\n repulsingForce = repulsingForce / distance;\n\n fx = dx * repulsingForce;\n fy = dy * repulsingForce;\n\n forces[node1.id].x -= fx;\n forces[node1.id].y -= fy;\n forces[node2.id].x += fx;\n forces[node2.id].y += fy;\n }\n }\n }\n }\n}\n\n\nexport default RepulsionSolver;","/**\n * Hierarchical Repulsion Solver\n */\nclass HierarchicalRepulsionSolver {\n /**\n * @param {Object} body\n * @param {{physicsNodeIndices: Array, physicsEdgeIndices: Array, forces: {}, velocities: {}}} physicsBody\n * @param {Object} options\n */\n constructor(body, physicsBody, options) {\n this.body = body;\n this.physicsBody = physicsBody;\n this.setOptions(options);\n }\n\n /**\n *\n * @param {Object} options\n */\n setOptions(options) {\n this.options = options;\n }\n\n /**\n * Calculate the forces the nodes apply on each other based on a repulsion field.\n * This field is linearly approximated.\n *\n * @private\n */\n solve() {\n var dx, dy, distance, fx, fy, repulsingForce, node1, node2, i, j;\n\n var nodes = this.body.nodes;\n var nodeIndices = this.physicsBody.physicsNodeIndices;\n var forces = this.physicsBody.forces;\n\n // repulsing forces between nodes\n var nodeDistance = this.options.nodeDistance;\n\n // we loop from i over all but the last entree in the array\n // j loops from i+1 to the last. This way we do not double count any of the indices, nor i === j\n for (i = 0; i < nodeIndices.length - 1; i++) {\n node1 = nodes[nodeIndices[i]];\n for (j = i + 1; j < nodeIndices.length; j++) {\n node2 = nodes[nodeIndices[j]];\n\n // nodes only affect nodes on their level\n if (node1.level === node2.level) {\n dx = node2.x - node1.x;\n dy = node2.y - node1.y;\n distance = Math.sqrt(dx * dx + dy * dy);\n\n var steepness = 0.05;\n if (distance < nodeDistance) {\n repulsingForce = -Math.pow(steepness * distance, 2) + Math.pow(steepness * nodeDistance, 2);\n }\n else {\n repulsingForce = 0;\n }\n // normalize force with\n if (distance === 0) {\n distance = 0.01;\n }\n else {\n repulsingForce = repulsingForce / distance;\n }\n fx = dx * repulsingForce;\n fy = dy * repulsingForce;\n\n forces[node1.id].x -= fx;\n forces[node1.id].y -= fy;\n forces[node2.id].x += fx;\n forces[node2.id].y += fy;\n }\n }\n }\n }\n}\n\n\nexport default HierarchicalRepulsionSolver;","/**\n * Spring Solver\n */\nclass SpringSolver {\n /**\n * @param {Object} body\n * @param {{physicsNodeIndices: Array, physicsEdgeIndices: Array, forces: {}, velocities: {}}} physicsBody\n * @param {Object} options\n */\n constructor(body, physicsBody, options) {\n this.body = body;\n this.physicsBody = physicsBody;\n this.setOptions(options);\n }\n\n /**\n *\n * @param {Object} options\n */\n setOptions(options) {\n this.options = options;\n }\n\n /**\n * This function calculates the springforces on the nodes, accounting for the support nodes.\n *\n * @private\n */\n solve() {\n let edgeLength, edge;\n let edgeIndices = this.physicsBody.physicsEdgeIndices;\n let edges = this.body.edges;\n let node1, node2, node3;\n\n // forces caused by the edges, modelled as springs\n for (let i = 0; i < edgeIndices.length; i++) {\n edge = edges[edgeIndices[i]];\n if (edge.connected === true && edge.toId !== edge.fromId) {\n // only calculate forces if nodes are in the same sector\n if (this.body.nodes[edge.toId] !== undefined && this.body.nodes[edge.fromId] !== undefined) {\n if (edge.edgeType.via !== undefined) {\n edgeLength = edge.options.length === undefined ? this.options.springLength : edge.options.length;\n node1 = edge.to;\n node2 = edge.edgeType.via;\n node3 = edge.from;\n\n this._calculateSpringForce(node1, node2, 0.5 * edgeLength);\n this._calculateSpringForce(node2, node3, 0.5 * edgeLength);\n }\n else {\n // the * 1.5 is here so the edge looks as large as a smooth edge. It does not initially because the smooth edges use\n // the support nodes which exert a repulsive force on the to and from nodes, making the edge appear larger.\n edgeLength = edge.options.length === undefined ? this.options.springLength * 1.5: edge.options.length;\n this._calculateSpringForce(edge.from, edge.to, edgeLength);\n }\n }\n }\n }\n }\n\n\n /**\n * This is the code actually performing the calculation for the function above.\n *\n * @param {Node} node1\n * @param {Node} node2\n * @param {number} edgeLength\n * @private\n */\n _calculateSpringForce(node1, node2, edgeLength) {\n let dx = (node1.x - node2.x);\n let dy = (node1.y - node2.y);\n let distance = Math.max(Math.sqrt(dx * dx + dy * dy),0.01);\n\n // the 1/distance is so the fx and fy can be calculated without sine or cosine.\n let springForce = this.options.springConstant * (edgeLength - distance) / distance;\n\n let fx = dx * springForce;\n let fy = dy * springForce;\n\n // handle the case where one node is not part of the physcis\n if (this.physicsBody.forces[node1.id] !== undefined) {\n this.physicsBody.forces[node1.id].x += fx;\n this.physicsBody.forces[node1.id].y += fy;\n }\n\n if (this.physicsBody.forces[node2.id] !== undefined) {\n this.physicsBody.forces[node2.id].x -= fx;\n this.physicsBody.forces[node2.id].y -= fy;\n }\n }\n}\n\nexport default SpringSolver;","/**\n * Hierarchical Spring Solver\n */\nclass HierarchicalSpringSolver {\n /**\n * @param {Object} body\n * @param {{physicsNodeIndices: Array, physicsEdgeIndices: Array, forces: {}, velocities: {}}} physicsBody\n * @param {Object} options\n */\n constructor(body, physicsBody, options) {\n this.body = body;\n this.physicsBody = physicsBody;\n this.setOptions(options);\n }\n\n /**\n *\n * @param {Object} options\n */\n setOptions(options) {\n this.options = options;\n }\n\n /**\n * This function calculates the springforces on the nodes, accounting for the support nodes.\n *\n * @private\n */\n solve() {\n var edgeLength, edge;\n var dx, dy, fx, fy, springForce, distance;\n var edges = this.body.edges;\n var factor = 0.5;\n\n var edgeIndices = this.physicsBody.physicsEdgeIndices;\n var nodeIndices = this.physicsBody.physicsNodeIndices;\n var forces = this.physicsBody.forces;\n\n // initialize the spring force counters\n for (let i = 0; i < nodeIndices.length; i++) {\n let nodeId = nodeIndices[i];\n forces[nodeId].springFx = 0;\n forces[nodeId].springFy = 0;\n }\n\n\n // forces caused by the edges, modelled as springs\n for (let i = 0; i < edgeIndices.length; i++) {\n edge = edges[edgeIndices[i]];\n if (edge.connected === true) {\n edgeLength = edge.options.length === undefined ? this.options.springLength : edge.options.length;\n\n dx = (edge.from.x - edge.to.x);\n dy = (edge.from.y - edge.to.y);\n distance = Math.sqrt(dx * dx + dy * dy);\n distance = distance === 0 ? 0.01 : distance;\n\n // the 1/distance is so the fx and fy can be calculated without sine or cosine.\n springForce = this.options.springConstant * (edgeLength - distance) / distance;\n\n fx = dx * springForce;\n fy = dy * springForce;\n\n if (edge.to.level != edge.from.level) {\n if (forces[edge.toId] !== undefined) {\n forces[edge.toId].springFx -= fx;\n forces[edge.toId].springFy -= fy;\n }\n if (forces[edge.fromId] !== undefined) {\n forces[edge.fromId].springFx += fx;\n forces[edge.fromId].springFy += fy;\n }\n }\n else {\n if (forces[edge.toId] !== undefined) {\n forces[edge.toId].x -= factor * fx;\n forces[edge.toId].y -= factor * fy;\n }\n if (forces[edge.fromId] !== undefined) {\n forces[edge.fromId].x += factor * fx;\n forces[edge.fromId].y += factor * fy;\n }\n }\n }\n }\n\n // normalize spring forces\n springForce = 1;\n var springFx, springFy;\n for (let i = 0; i < nodeIndices.length; i++) {\n let nodeId = nodeIndices[i];\n springFx = Math.min(springForce,Math.max(-springForce,forces[nodeId].springFx));\n springFy = Math.min(springForce,Math.max(-springForce,forces[nodeId].springFy));\n\n forces[nodeId].x += springFx;\n forces[nodeId].y += springFy;\n }\n\n // retain energy balance\n var totalFx = 0;\n var totalFy = 0;\n for (let i = 0; i < nodeIndices.length; i++) {\n let nodeId = nodeIndices[i];\n totalFx += forces[nodeId].x;\n totalFy += forces[nodeId].y;\n }\n var correctionFx = totalFx / nodeIndices.length;\n var correctionFy = totalFy / nodeIndices.length;\n\n for (let i = 0; i < nodeIndices.length; i++) {\n let nodeId = nodeIndices[i];\n forces[nodeId].x -= correctionFx;\n forces[nodeId].y -= correctionFy;\n }\n }\n}\n\nexport default HierarchicalSpringSolver;\n","/**\n * Central Gravity Solver\n */\nclass CentralGravitySolver {\n /**\n * @param {Object} body\n * @param {{physicsNodeIndices: Array, physicsEdgeIndices: Array, forces: {}, velocities: {}}} physicsBody\n * @param {Object} options\n */\n constructor(body, physicsBody, options) {\n this.body = body;\n this.physicsBody = physicsBody;\n this.setOptions(options);\n }\n\n /**\n *\n * @param {Object} options\n */\n setOptions(options) {\n this.options = options;\n }\n\n /**\n * Calculates forces for each node\n */\n solve() {\n let dx, dy, distance, node;\n let nodes = this.body.nodes;\n let nodeIndices = this.physicsBody.physicsNodeIndices;\n let forces = this.physicsBody.forces;\n\n for (let i = 0; i < nodeIndices.length; i++) {\n let nodeId = nodeIndices[i];\n node = nodes[nodeId];\n dx = -node.x;\n dy = -node.y;\n distance = Math.sqrt(dx * dx + dy * dy);\n\n this._calculateForces(distance, dx, dy, forces, node);\n }\n }\n\n /**\n * Calculate the forces based on the distance.\n * @param {number} distance\n * @param {number} dx\n * @param {number} dy\n * @param {Object} forces\n * @param {Node} node\n * @private\n */\n _calculateForces(distance, dx, dy, forces, node) {\n let gravityForce = (distance === 0) ? 0 : (this.options.centralGravity / distance);\n forces[node.id].x = dx * gravityForce;\n forces[node.id].y = dy * gravityForce;\n }\n}\n\n\nexport default CentralGravitySolver;","import BarnesHutSolver from \"./BarnesHutSolver\"\n\n/**\n * @extends BarnesHutSolver\n */\nclass ForceAtlas2BasedRepulsionSolver extends BarnesHutSolver {\n /**\n * @param {Object} body\n * @param {{physicsNodeIndices: Array, physicsEdgeIndices: Array, forces: {}, velocities: {}}} physicsBody\n * @param {Object} options\n */\n constructor(body, physicsBody, options) {\n super(body, physicsBody, options);\n }\n\n /**\n * Calculate the forces based on the distance.\n *\n * @param {number} distance\n * @param {number} dx\n * @param {number} dy\n * @param {Node} node\n * @param {Object} parentBranch\n * @private\n */\n _calculateForces(distance, dx, dy, node, parentBranch) {\n if (distance === 0) {\n distance = 0.1 * Math.random();\n dx = distance;\n }\n\n if (this.overlapAvoidanceFactor < 1 && node.shape.radius) {\n distance = Math.max(0.1 + (this.overlapAvoidanceFactor * node.shape.radius), distance - node.shape.radius);\n }\n\n let degree = (node.edges.length + 1);\n // the dividing by the distance cubed instead of squared allows us to get the fx and fy components without sines and cosines\n // it is shorthand for gravityforce with distance squared and fx = dx/distance * gravityForce\n let gravityForce = this.options.gravitationalConstant * parentBranch.mass * node.options.mass * degree / Math.pow(distance,2);\n let fx = dx * gravityForce;\n let fy = dy * gravityForce;\n\n this.physicsBody.forces[node.id].x += fx;\n this.physicsBody.forces[node.id].y += fy;\n }\n}\n\nexport default ForceAtlas2BasedRepulsionSolver;\n","import CentralGravitySolver from \"./CentralGravitySolver\"\n\n/**\n * @extends CentralGravitySolver\n */\nclass ForceAtlas2BasedCentralGravitySolver extends CentralGravitySolver {\n /**\n * @param {Object} body\n * @param {{physicsNodeIndices: Array, physicsEdgeIndices: Array, forces: {}, velocities: {}}} physicsBody\n * @param {Object} options\n */\n constructor(body, physicsBody, options) {\n super(body, physicsBody, options);\n }\n\n\n /**\n * Calculate the forces based on the distance.\n *\n * @param {number} distance\n * @param {number} dx\n * @param {number} dy\n * @param {Object} forces\n * @param {Node} node\n * @private\n */\n _calculateForces(distance, dx, dy, forces, node) {\n if (distance > 0) {\n let degree = (node.edges.length + 1);\n let gravityForce = this.options.centralGravity * degree * node.options.mass;\n forces[node.id].x = dx * gravityForce;\n forces[node.id].y = dy * gravityForce;\n }\n }\n}\n\nexport default ForceAtlas2BasedCentralGravitySolver;","import BarnesHutSolver from './components/physics/BarnesHutSolver';\nimport Repulsion from './components/physics/RepulsionSolver';\nimport HierarchicalRepulsion from './components/physics/HierarchicalRepulsionSolver';\nimport SpringSolver from './components/physics/SpringSolver';\nimport HierarchicalSpringSolver from './components/physics/HierarchicalSpringSolver';\nimport CentralGravitySolver from './components/physics/CentralGravitySolver';\nimport ForceAtlas2BasedRepulsionSolver from './components/physics/FA2BasedRepulsionSolver';\nimport ForceAtlas2BasedCentralGravitySolver from './components/physics/FA2BasedCentralGravitySolver';\nimport util from 'vis-util';\nimport EndPoints from './components/edges/util/EndPoints'; // for debugging with _drawForces()\n\n\n/**\n * The physics engine\n */\nclass PhysicsEngine {\n /**\n * @param {Object} body\n */\n constructor(body) {\n this.body = body;\n this.physicsBody = {physicsNodeIndices:[], physicsEdgeIndices:[], forces: {}, velocities: {}};\n\n this.physicsEnabled = true;\n this.simulationInterval = 1000 / 60;\n this.requiresTimeout = true;\n this.previousStates = {};\n this.referenceState = {};\n this.freezeCache = {};\n this.renderTimer = undefined;\n\n // parameters for the adaptive timestep\n this.adaptiveTimestep = false;\n this.adaptiveTimestepEnabled = false;\n this.adaptiveCounter = 0;\n this.adaptiveInterval = 3;\n\n this.stabilized = false;\n this.startedStabilization = false;\n this.stabilizationIterations = 0;\n this.ready = false; // will be set to true if the stabilize\n\n // default options\n this.options = {};\n this.defaultOptions = {\n enabled: true,\n barnesHut: {\n theta: 0.5,\n gravitationalConstant: -2000,\n centralGravity: 0.3,\n springLength: 95,\n springConstant: 0.04,\n damping: 0.09,\n avoidOverlap: 0\n },\n forceAtlas2Based: {\n theta: 0.5,\n gravitationalConstant: -50,\n centralGravity: 0.01,\n springConstant: 0.08,\n springLength: 100,\n damping: 0.4,\n avoidOverlap: 0\n },\n repulsion: {\n centralGravity: 0.2,\n springLength: 200,\n springConstant: 0.05,\n nodeDistance: 100,\n damping: 0.09,\n avoidOverlap: 0\n },\n hierarchicalRepulsion: {\n centralGravity: 0.0,\n springLength: 100,\n springConstant: 0.01,\n nodeDistance: 120,\n damping: 0.09\n },\n maxVelocity: 50,\n minVelocity: 0.75, // px/s\n solver: 'barnesHut',\n stabilization: {\n enabled: true,\n iterations: 1000, // maximum number of iteration to stabilize\n updateInterval: 50,\n onlyDynamicEdges: false,\n fit: true\n },\n timestep: 0.5,\n adaptiveTimestep: true\n };\n util.extend(this.options, this.defaultOptions);\n this.timestep = 0.5;\n this.layoutFailed = false;\n\n this.bindEventListeners();\n }\n\n /**\n * Binds event listeners\n */\n bindEventListeners() {\n this.body.emitter.on('initPhysics', () => {this.initPhysics();});\n this.body.emitter.on('_layoutFailed', () => {this.layoutFailed = true;});\n this.body.emitter.on('resetPhysics', () => {this.stopSimulation(); this.ready = false;});\n this.body.emitter.on('disablePhysics', () => {this.physicsEnabled = false; this.stopSimulation();});\n this.body.emitter.on('restorePhysics', () => {\n this.setOptions(this.options);\n if (this.ready === true) {\n this.startSimulation();\n }\n });\n this.body.emitter.on('startSimulation', () => {\n if (this.ready === true) {\n this.startSimulation();\n }\n });\n this.body.emitter.on('stopSimulation', () => {this.stopSimulation();});\n this.body.emitter.on('destroy', () => {\n this.stopSimulation(false);\n this.body.emitter.off();\n });\n this.body.emitter.on(\"_dataChanged\", () => {\n // Nodes and/or edges have been added or removed, update shortcut lists.\n this.updatePhysicsData();\n });\n\n // debug: show forces\n // this.body.emitter.on(\"afterDrawing\", (ctx) => {this._drawForces(ctx);});\n }\n\n\n /**\n * set the physics options\n * @param {Object} options\n */\n setOptions(options) {\n if (options !== undefined) {\n if (options === false) {\n this.options.enabled = false;\n this.physicsEnabled = false;\n this.stopSimulation();\n }\n else if (options === true) {\n this.options.enabled = true;\n this.physicsEnabled = true;\n this.startSimulation();\n }\n else {\n this.physicsEnabled = true;\n util.selectiveNotDeepExtend(['stabilization'], this.options, options);\n util.mergeOptions(this.options, options, 'stabilization');\n\n if (options.enabled === undefined) {\n this.options.enabled = true;\n }\n\n if (this.options.enabled === false) {\n this.physicsEnabled = false;\n this.stopSimulation();\n }\n\n // set the timestep\n this.timestep = this.options.timestep;\n }\n }\n this.init();\n }\n\n\n /**\n * configure the engine.\n */\n init() {\n var options;\n if (this.options.solver === 'forceAtlas2Based') {\n options = this.options.forceAtlas2Based;\n this.nodesSolver = new ForceAtlas2BasedRepulsionSolver(this.body, this.physicsBody, options);\n this.edgesSolver = new SpringSolver(this.body, this.physicsBody, options);\n this.gravitySolver = new ForceAtlas2BasedCentralGravitySolver(this.body, this.physicsBody, options);\n }\n else if (this.options.solver === 'repulsion') {\n options = this.options.repulsion;\n this.nodesSolver = new Repulsion(this.body, this.physicsBody, options);\n this.edgesSolver = new SpringSolver(this.body, this.physicsBody, options);\n this.gravitySolver = new CentralGravitySolver(this.body, this.physicsBody, options);\n }\n else if (this.options.solver === 'hierarchicalRepulsion') {\n options = this.options.hierarchicalRepulsion;\n this.nodesSolver = new HierarchicalRepulsion(this.body, this.physicsBody, options);\n this.edgesSolver = new HierarchicalSpringSolver(this.body, this.physicsBody, options);\n this.gravitySolver = new CentralGravitySolver(this.body, this.physicsBody, options);\n }\n else { // barnesHut\n options = this.options.barnesHut;\n this.nodesSolver = new BarnesHutSolver(this.body, this.physicsBody, options);\n this.edgesSolver = new SpringSolver(this.body, this.physicsBody, options);\n this.gravitySolver = new CentralGravitySolver(this.body, this.physicsBody, options);\n }\n\n this.modelOptions = options;\n }\n\n\n /**\n * initialize the engine\n */\n initPhysics() {\n if (this.physicsEnabled === true && this.options.enabled === true) {\n if (this.options.stabilization.enabled === true) {\n this.stabilize();\n }\n else {\n this.stabilized = false;\n this.ready = true;\n this.body.emitter.emit('fit', {}, this.layoutFailed); // if the layout failed, we use the approximation for the zoom\n this.startSimulation();\n }\n }\n else {\n this.ready = true;\n this.body.emitter.emit('fit');\n }\n }\n\n /**\n * Start the simulation\n */\n startSimulation() {\n if (this.physicsEnabled === true && this.options.enabled === true) {\n this.stabilized = false;\n\n // when visible, adaptivity is disabled.\n this.adaptiveTimestep = false;\n\n // this sets the width of all nodes initially which could be required for the avoidOverlap\n this.body.emitter.emit(\"_resizeNodes\");\n if (this.viewFunction === undefined) {\n this.viewFunction = this.simulationStep.bind(this);\n this.body.emitter.on('initRedraw', this.viewFunction);\n this.body.emitter.emit('_startRendering');\n }\n }\n else {\n this.body.emitter.emit('_redraw');\n }\n }\n\n\n /**\n * Stop the simulation, force stabilization.\n * @param {boolean} [emit=true]\n */\n stopSimulation(emit = true) {\n this.stabilized = true;\n if (emit === true) {\n this._emitStabilized();\n }\n if (this.viewFunction !== undefined) {\n this.body.emitter.off('initRedraw', this.viewFunction);\n this.viewFunction = undefined;\n if (emit === true) {\n this.body.emitter.emit('_stopRendering');\n }\n }\n }\n\n\n /**\n * The viewFunction inserts this step into each render loop. It calls the physics tick and handles the cleanup at stabilized.\n *\n */\n simulationStep() {\n // check if the physics have settled\n var startTime = Date.now();\n this.physicsTick();\n var physicsTime = Date.now() - startTime;\n\n // run double speed if it is a little graph\n if ((physicsTime < 0.4 * this.simulationInterval || this.runDoubleSpeed === true) && this.stabilized === false) {\n this.physicsTick();\n\n // this makes sure there is no jitter. The decision is taken once to run it at double speed.\n this.runDoubleSpeed = true;\n }\n\n if (this.stabilized === true) {\n this.stopSimulation();\n }\n }\n\n\n /**\n * trigger the stabilized event.\n *\n * @param {number} [amountOfIterations=this.stabilizationIterations]\n * @private\n */\n _emitStabilized(amountOfIterations = this.stabilizationIterations) {\n if (this.stabilizationIterations > 1 || this.startedStabilization === true) {\n setTimeout(() => {\n this.body.emitter.emit('stabilized', {iterations: amountOfIterations});\n this.startedStabilization = false;\n this.stabilizationIterations = 0;\n }, 0);\n }\n }\n\n\n /**\n * Calculate the forces for one physics iteration and move the nodes.\n * @private\n */\n physicsStep() {\n this.gravitySolver.solve();\n this.nodesSolver.solve();\n this.edgesSolver.solve();\n this.moveNodes();\n }\n\n\n /**\n * Make dynamic adjustments to the timestep, based on current state.\n *\n * Helper function for physicsTick().\n * @private\n */\n adjustTimeStep() {\n const factor = 1.2; // Factor for increasing the timestep on success.\n\n // we compare the two steps. if it is acceptable we double the step.\n if (this._evaluateStepQuality() === true) {\n this.timestep = factor * this.timestep;\n }\n else {\n // if not, we decrease the step to a minimum of the options timestep.\n // if the decreased timestep is smaller than the options step, we do not reset the counter\n // we assume that the options timestep is stable enough.\n if (this.timestep/factor < this.options.timestep) {\n this.timestep = this.options.timestep;\n }\n else {\n // if the timestep was larger than 2 times the option one we check the adaptivity again to ensure\n // that large instabilities do not form.\n this.adaptiveCounter = -1; // check again next iteration\n this.timestep = Math.max(this.options.timestep, this.timestep/factor);\n }\n }\n }\n\n\n /**\n * A single simulation step (or 'tick') in the physics simulation\n *\n * @private\n */\n physicsTick() {\n this._startStabilizing(); // this ensures that there is no start event when the network is already stable.\n if (this.stabilized === true) return;\n\n // adaptivity means the timestep adapts to the situation, only applicable for stabilization\n if (this.adaptiveTimestep === true && this.adaptiveTimestepEnabled === true) {\n // timestep remains stable for \"interval\" iterations.\n let doAdaptive = (this.adaptiveCounter % this.adaptiveInterval === 0);\n\n if (doAdaptive) {\n // first the big step and revert.\n this.timestep = 2 * this.timestep;\n this.physicsStep();\n this.revert(); // saves the reference state\n\n // now the normal step. Since this is the last step, it is the more stable one and we will take this.\n this.timestep = 0.5 * this.timestep;\n\n // since it's half the step, we do it twice.\n this.physicsStep();\n this.physicsStep();\n\n this.adjustTimeStep();\n }\n else {\n this.physicsStep(); // normal step, keeping timestep constant\n }\n\n this.adaptiveCounter += 1;\n }\n else {\n // case for the static timestep, we reset it to the one in options and take a normal step.\n this.timestep = this.options.timestep;\n this.physicsStep();\n }\n\n if (this.stabilized === true) this.revert();\n this.stabilizationIterations++;\n }\n\n\n /**\n * Nodes and edges can have the physics toggles on or off. A collection of indices is created here so we can skip the check all the time.\n *\n * @private\n */\n updatePhysicsData() {\n this.physicsBody.forces = {};\n this.physicsBody.physicsNodeIndices = [];\n this.physicsBody.physicsEdgeIndices = [];\n let nodes = this.body.nodes;\n let edges = this.body.edges;\n\n // get node indices for physics\n for (let nodeId in nodes) {\n if (nodes.hasOwnProperty(nodeId)) {\n if (nodes[nodeId].options.physics === true) {\n this.physicsBody.physicsNodeIndices.push(nodes[nodeId].id);\n }\n }\n }\n\n // get edge indices for physics\n for (let edgeId in edges) {\n if (edges.hasOwnProperty(edgeId)) {\n if (edges[edgeId].options.physics === true) {\n this.physicsBody.physicsEdgeIndices.push(edges[edgeId].id);\n }\n }\n }\n\n // get the velocity and the forces vector\n for (let i = 0; i < this.physicsBody.physicsNodeIndices.length; i++) {\n let nodeId = this.physicsBody.physicsNodeIndices[i];\n this.physicsBody.forces[nodeId] = {x:0,y:0};\n\n // forces can be reset because they are recalculated. Velocities have to persist.\n if (this.physicsBody.velocities[nodeId] === undefined) {\n this.physicsBody.velocities[nodeId] = {x:0,y:0};\n }\n }\n\n // clean deleted nodes from the velocity vector\n for (let nodeId in this.physicsBody.velocities) {\n if (nodes[nodeId] === undefined) {\n delete this.physicsBody.velocities[nodeId];\n }\n }\n }\n\n\n /**\n * Revert the simulation one step. This is done so after stabilization, every new start of the simulation will also say stabilized.\n */\n revert() {\n var nodeIds = Object.keys(this.previousStates);\n var nodes = this.body.nodes;\n var velocities = this.physicsBody.velocities;\n this.referenceState = {};\n\n for (let i = 0; i < nodeIds.length; i++) {\n let nodeId = nodeIds[i];\n if (nodes[nodeId] !== undefined) {\n if (nodes[nodeId].options.physics === true) {\n this.referenceState[nodeId] = {\n positions: {x:nodes[nodeId].x, y:nodes[nodeId].y}\n };\n velocities[nodeId].x = this.previousStates[nodeId].vx;\n velocities[nodeId].y = this.previousStates[nodeId].vy;\n nodes[nodeId].x = this.previousStates[nodeId].x;\n nodes[nodeId].y = this.previousStates[nodeId].y;\n }\n }\n else {\n delete this.previousStates[nodeId];\n }\n }\n }\n\n /**\n * This compares the reference state to the current state\n *\n * @returns {boolean}\n * @private\n */\n _evaluateStepQuality() {\n let dx, dy, dpos;\n let nodes = this.body.nodes;\n let reference = this.referenceState;\n let posThreshold = 0.3;\n\n for (let nodeId in this.referenceState) {\n if (this.referenceState.hasOwnProperty(nodeId) && nodes[nodeId] !== undefined) {\n dx = nodes[nodeId].x - reference[nodeId].positions.x;\n dy = nodes[nodeId].y - reference[nodeId].positions.y;\n\n dpos = Math.sqrt(Math.pow(dx,2) + Math.pow(dy,2))\n\n if (dpos > posThreshold) {\n return false;\n }\n }\n }\n return true;\n }\n\n /**\n * move the nodes one timestep and check if they are stabilized\n */\n moveNodes() {\n var nodeIndices = this.physicsBody.physicsNodeIndices;\n var maxNodeVelocity = 0;\n var averageNodeVelocity = 0;\n\n // the velocity threshold (energy in the system) for the adaptivity toggle\n var velocityAdaptiveThreshold = 5;\n\n for (let i = 0; i < nodeIndices.length; i++) {\n let nodeId = nodeIndices[i];\n let nodeVelocity = this._performStep(nodeId);\n // stabilized is true if stabilized is true and velocity is smaller than vmin --> all nodes must be stabilized\n maxNodeVelocity = Math.max(maxNodeVelocity, nodeVelocity);\n averageNodeVelocity += nodeVelocity;\n }\n\n // evaluating the stabilized and adaptiveTimestepEnabled conditions\n this.adaptiveTimestepEnabled = (averageNodeVelocity/nodeIndices.length) < velocityAdaptiveThreshold;\n this.stabilized = maxNodeVelocity < this.options.minVelocity;\n }\n\n\n /**\n * Calculate new velocity for a coordinate direction\n *\n * @param {number} v velocity for current coordinate\n * @param {number} f regular force for current coordinate\n * @param {number} m mass of current node\n * @returns {number} new velocity for current coordinate\n * @private\n */\n calculateComponentVelocity(v,f, m) {\n let df = this.modelOptions.damping * v; // damping force\n let a = (f - df) / m; // acceleration\n\n v += a * this.timestep;\n\n // Put a limit on the velocities if it is really high\n let maxV = this.options.maxVelocity || 1e9;\n if (Math.abs(v) > maxV) {\n v = ((v > 0) ? maxV: -maxV);\n }\n\n return v;\n }\n\n\n /**\n * Perform the actual step\n *\n * @param {Node.id} nodeId\n * @returns {number} the new velocity of given node\n * @private\n */\n _performStep(nodeId) {\n let node = this.body.nodes[nodeId];\n let force = this.physicsBody.forces[nodeId];\n let velocity = this.physicsBody.velocities[nodeId];\n\n // store the state so we can revert\n this.previousStates[nodeId] = {x:node.x, y:node.y, vx:velocity.x, vy:velocity.y};\n\n if (node.options.fixed.x === false) {\n velocity.x = this.calculateComponentVelocity(velocity.x, force.x, node.options.mass);\n node.x += velocity.x * this.timestep;\n }\n else {\n force.x = 0;\n velocity.x = 0;\n }\n\n if (node.options.fixed.y === false) {\n velocity.y = this.calculateComponentVelocity(velocity.y, force.y, node.options.mass);\n node.y += velocity.y * this.timestep;\n }\n else {\n force.y = 0;\n velocity.y = 0;\n }\n\n let totalVelocity = Math.sqrt(Math.pow(velocity.x,2) + Math.pow(velocity.y,2));\n return totalVelocity;\n }\n\n\n /**\n * When initializing and stabilizing, we can freeze nodes with a predefined position.\n * This greatly speeds up stabilization because only the supportnodes for the smoothCurves have to settle.\n *\n * @private\n */\n _freezeNodes() {\n var nodes = this.body.nodes;\n for (var id in nodes) {\n if (nodes.hasOwnProperty(id)) {\n if (nodes[id].x && nodes[id].y) {\n let fixed = nodes[id].options.fixed;\n this.freezeCache[id] = {x:fixed.x, y:fixed.y};\n fixed.x = true;\n fixed.y = true;\n }\n }\n }\n }\n\n\n /**\n * Unfreezes the nodes that have been frozen by _freezeDefinedNodes.\n *\n * @private\n */\n _restoreFrozenNodes() {\n var nodes = this.body.nodes;\n for (var id in nodes) {\n if (nodes.hasOwnProperty(id)) {\n if (this.freezeCache[id] !== undefined) {\n nodes[id].options.fixed.x = this.freezeCache[id].x;\n nodes[id].options.fixed.y = this.freezeCache[id].y;\n }\n }\n }\n this.freezeCache = {};\n }\n\n /**\n * Find a stable position for all nodes\n *\n * @param {number} [iterations=this.options.stabilization.iterations]\n */\n stabilize(iterations = this.options.stabilization.iterations) {\n if (typeof iterations !== 'number') {\n iterations = this.options.stabilization.iterations;\n console.log('The stabilize method needs a numeric amount of iterations. Switching to default: ', iterations);\n }\n\n if (this.physicsBody.physicsNodeIndices.length === 0) {\n this.ready = true;\n return;\n }\n\n // enable adaptive timesteps\n this.adaptiveTimestep = true && this.options.adaptiveTimestep;\n\n // this sets the width of all nodes initially which could be required for the avoidOverlap\n this.body.emitter.emit(\"_resizeNodes\");\n\n this.stopSimulation(); // stop the render loop\n this.stabilized = false;\n\n // block redraw requests\n this.body.emitter.emit('_blockRedraw');\n this.targetIterations = iterations;\n\n // start the stabilization\n if (this.options.stabilization.onlyDynamicEdges === true) {\n this._freezeNodes();\n }\n this.stabilizationIterations = 0;\n\n setTimeout(() => this._stabilizationBatch(),0);\n }\n\n\n /**\n * If not already stabilizing, start it and emit a start event.\n *\n * @returns {boolean} true if stabilization started with this call\n * @private\n */\n _startStabilizing() {\n if (this.startedStabilization === true) return false;\n\n this.body.emitter.emit('startStabilizing');\n this.startedStabilization = true;\n return true;\n }\n\n\n /**\n * One batch of stabilization\n * @private\n */\n _stabilizationBatch() {\n var running = () => (this.stabilized === false && this.stabilizationIterations < this.targetIterations);\n\n var sendProgress = () => {\n this.body.emitter.emit('stabilizationProgress', {\n iterations: this.stabilizationIterations,\n total: this.targetIterations\n });\n };\n\n if (this._startStabilizing()) {\n sendProgress(); // Ensure that there is at least one start event.\n }\n\n var count = 0;\n while (running() && count < this.options.stabilization.updateInterval) {\n this.physicsTick();\n count++;\n }\n\n sendProgress();\n\n if (running()) {\n setTimeout(this._stabilizationBatch.bind(this),0);\n }\n else {\n this._finalizeStabilization();\n }\n }\n\n\n /**\n * Wrap up the stabilization, fit and emit the events.\n * @private\n */\n _finalizeStabilization() {\n this.body.emitter.emit('_allowRedraw');\n if (this.options.stabilization.fit === true) {\n this.body.emitter.emit('fit');\n }\n\n if (this.options.stabilization.onlyDynamicEdges === true) {\n this._restoreFrozenNodes();\n }\n\n this.body.emitter.emit('stabilizationIterationsDone');\n this.body.emitter.emit('_requestRedraw');\n\n if (this.stabilized === true) {\n this._emitStabilized();\n }\n else {\n this.startSimulation();\n }\n\n this.ready = true;\n }\n\n\n //--------------------------- DEBUGGING BELOW ---------------------------//\n\n\n /**\n * Debug function that display arrows for the forces currently active in the network.\n *\n * Use this when debugging only.\n *\n * @param {CanvasRenderingContext2D} ctx\n * @private\n */\n _drawForces(ctx) {\n for (var i = 0; i < this.physicsBody.physicsNodeIndices.length; i++) {\n let index = this.physicsBody.physicsNodeIndices[i];\n let node = this.body.nodes[index];\n let force = this.physicsBody.forces[index];\n let factor = 20;\n let colorFactor = 0.03;\n let forceSize = Math.sqrt(Math.pow(force.x,2) + Math.pow(force.x,2));\n\n let size = Math.min(Math.max(5,forceSize),15);\n let arrowSize = 3*size;\n\n let color = util.HSVToHex((180 - Math.min(1,Math.max(0,colorFactor*forceSize))*180) / 360,1,1);\n\n let point = {\n x: node.x + factor*force.x,\n y: node.y + factor*force.y\n };\n\n ctx.lineWidth = size;\n ctx.strokeStyle = color;\n ctx.beginPath();\n ctx.moveTo(node.x,node.y);\n ctx.lineTo(point.x, point.y);\n ctx.stroke();\n\n let angle = Math.atan2(force.y, force.x);\n ctx.fillStyle = color;\n EndPoints.draw(ctx, {type: 'arrow', point: point, angle: angle, length: arrowSize});\n ctx.fill();\n\n }\n }\n}\n\nexport default PhysicsEngine;\n","import util from 'vis-util';\n\n/**\n * Utility Class\n */\nclass NetworkUtil {\n /**\n * @ignore\n */\n constructor() {}\n\n /**\n * Find the center position of the network considering the bounding boxes\n *\n * @param {Array.} allNodes\n * @param {Array.} [specificNodes=[]]\n * @returns {{minX: number, maxX: number, minY: number, maxY: number}}\n * @static\n */\n static getRange(allNodes, specificNodes = []) {\n var minY = 1e9, maxY = -1e9, minX = 1e9, maxX = -1e9, node;\n if (specificNodes.length > 0) {\n for (var i = 0; i < specificNodes.length; i++) {\n node = allNodes[specificNodes[i]];\n if (minX > node.shape.boundingBox.left) {\n minX = node.shape.boundingBox.left;\n }\n if (maxX < node.shape.boundingBox.right) {\n maxX = node.shape.boundingBox.right;\n }\n if (minY > node.shape.boundingBox.top) {\n minY = node.shape.boundingBox.top;\n } // top is negative, bottom is positive\n if (maxY < node.shape.boundingBox.bottom) {\n maxY = node.shape.boundingBox.bottom;\n } // top is negative, bottom is positive\n }\n }\n\n if (minX === 1e9 && maxX === -1e9 && minY === 1e9 && maxY === -1e9) {\n minY = 0, maxY = 0, minX = 0, maxX = 0;\n }\n return {minX: minX, maxX: maxX, minY: minY, maxY: maxY};\n }\n\n /**\n * Find the center position of the network\n *\n * @param {Array.} allNodes\n * @param {Array.} [specificNodes=[]]\n * @returns {{minX: number, maxX: number, minY: number, maxY: number}}\n * @static\n */\n static getRangeCore(allNodes, specificNodes = []) {\n var minY = 1e9, maxY = -1e9, minX = 1e9, maxX = -1e9, node;\n if (specificNodes.length > 0) {\n for (var i = 0; i < specificNodes.length; i++) {\n node = allNodes[specificNodes[i]];\n if (minX > node.x) {\n minX = node.x;\n }\n if (maxX < node.x) {\n maxX = node.x;\n }\n if (minY > node.y) {\n minY = node.y;\n } // top is negative, bottom is positive\n if (maxY < node.y) {\n maxY = node.y;\n } // top is negative, bottom is positive\n }\n }\n\n if (minX === 1e9 && maxX === -1e9 && minY === 1e9 && maxY === -1e9) {\n minY = 0, maxY = 0, minX = 0, maxX = 0;\n }\n return {minX: minX, maxX: maxX, minY: minY, maxY: maxY};\n }\n\n\n /**\n * @param {object} range = {minX: minX, maxX: maxX, minY: minY, maxY: maxY};\n * @returns {{x: number, y: number}}\n * @static\n */\n static findCenter(range) {\n return {x: (0.5 * (range.maxX + range.minX)),\n y: (0.5 * (range.maxY + range.minY))};\n }\n\n\n /**\n * This returns a clone of the options or options of the edge or node to be used for construction of new edges or check functions for new nodes.\n * @param {vis.Item} item\n * @param {'node'|undefined} type\n * @returns {{}}\n * @static\n */\n static cloneOptions(item, type) {\n let clonedOptions = {};\n if (type === undefined || type === 'node') {\n util.deepExtend(clonedOptions, item.options, true);\n clonedOptions.x = item.x;\n clonedOptions.y = item.y;\n clonedOptions.amountOfConnections = item.edges.length;\n }\n else {\n util.deepExtend(clonedOptions, item.options, true);\n }\n return clonedOptions;\n }\n\n}\n\nexport default NetworkUtil;","import util from 'vis-util';\nimport Node from \"../Node\";\n\n/**\n * A Cluster is a special Node that allows a group of Nodes positioned closely together\n * to be represented by a single Cluster Node.\n *\n * @extends Node\n */\nclass Cluster extends Node {\n /**\n * @param {Object} options\n * @param {Object} body\n * @param {Array.}imagelist\n * @param {Array} grouplist\n * @param {Object} globalOptions\n * @param {Object} defaultOptions Global default options for nodes\n */\n constructor(options, body, imagelist, grouplist, globalOptions, defaultOptions) {\n super(options, body, imagelist, grouplist, globalOptions, defaultOptions);\n\n this.isCluster = true;\n this.containedNodes = {};\n this.containedEdges = {};\n }\n\n\n /**\n * Transfer child cluster data to current and disconnect the child cluster.\n *\n * Please consult the header comment in 'Clustering.js' for the fields set here.\n *\n * @param {string|number} childClusterId id of child cluster to open\n */\n _openChildCluster(childClusterId) {\n let childCluster = this.body.nodes[childClusterId];\n if (this.containedNodes[childClusterId] === undefined) {\n throw new Error('node with id: ' + childClusterId + ' not in current cluster');\n }\n if (!childCluster.isCluster) {\n throw new Error('node with id: ' + childClusterId + ' is not a cluster');\n }\n\n // Disconnect child cluster from current cluster\n delete this.containedNodes[childClusterId];\n util.forEach(childCluster.edges, (edge) => {\n delete this.containedEdges[edge.id];\n });\n\n // Transfer nodes and edges\n util.forEach(childCluster.containedNodes, (node, nodeId) => {\n this.containedNodes[nodeId] = node;\n });\n childCluster.containedNodes = {};\n\n util.forEach(childCluster.containedEdges, (edge, edgeId) => {\n this.containedEdges[edgeId] = edge;\n });\n childCluster.containedEdges = {};\n\n // Transfer edges within cluster edges which are clustered\n util.forEach(childCluster.edges, (clusterEdge) => {\n util.forEach(this.edges, (parentClusterEdge) => {\n // Assumption: a clustered edge can only be present in a single clustering edge\n // Not tested here\n let index = parentClusterEdge.clusteringEdgeReplacingIds.indexOf(clusterEdge.id);\n if (index === -1) return;\n\n util.forEach(clusterEdge.clusteringEdgeReplacingIds, (srcId) => {\n parentClusterEdge.clusteringEdgeReplacingIds.push(srcId);\n\n // Maintain correct bookkeeping for transferred edge\n this.body.edges[srcId].edgeReplacedById = parentClusterEdge.id;\n });\n\n // Remove cluster edge from parent cluster edge\n parentClusterEdge.clusteringEdgeReplacingIds.splice(index, 1);\n });\n });\n childCluster.edges = [];\n }\n}\n\n\nexport default Cluster;\n","/* ===========================================================================\n\n# TODO\n\n- `edgeReplacedById` not cleaned up yet on cluster edge removal\n- allowSingleNodeCluster could be a global option as well; currently needs to always\n be passed to clustering methods\n\n----------------------------------------------\n\n# State Model for Clustering\n\nThe total state for clustering is non-trivial. It is useful to have a model\navailable as to how it works. The following documents the relevant state items.\n\n\n## Network State\n\nThe following `network`-members are relevant to clustering:\n\n- `body.nodes` - all nodes actively participating in the network\n- `body.edges` - same for edges\n- `body.nodeIndices` - id's of nodes that are visible at a given moment\n- `body.edgeIndices` - same for edges\n\nThis includes:\n\n- helper nodes for dragging in `manipulation`\n- helper nodes for edge type `dynamic`\n- cluster nodes and edges\n- there may be more than this.\n\nA node/edge may be missing in the `Indices` member if:\n\n- it is a helper node\n- the node or edge state has option `hidden` set\n- It is not visible due to clustering\n\n\n## Clustering State\n\nFor the hashes, the id's of the nodes/edges are used as key.\n\nMember `network.clustering` contains the following items:\n\n- `clusteredNodes` - hash with values: { clusterId: , node: }\n- `clusteredEdges` - hash with values: restore information for given edge\n\n\nDue to nesting of clusters, these members can contain cluster nodes and edges as well.\n\nThe important thing to note here, is that the clustered nodes and edges also\nappear in the members of the cluster nodes. For data update, it is therefore \nimportant to scan these lists as well as the cluster nodes.\n\n\n### Cluster Node\n\nA cluster node has the following extra fields:\n\n- `isCluster : true` - indication that this is a cluster node\n- `containedNodes` - hash of nodes contained in this cluster\n- `containedEdges` - same for edges\n- `edges` - array of cluster edges for this node \n\n\n**NOTE:**\n\n- `containedEdges` can also contain edges which are not clustered; e.g. an edge\n connecting two nodes in the same cluster.\n\n\n### Cluster Edge\n\nThese are the items in the `edges` member of a clustered node. They have the\nfollowing relevant members:\n\n- 'clusteringEdgeReplacingIds` - array of id's of edges replaced by this edge\n\nNote that it's possible to nest clusters, so that `clusteringEdgeReplacingIds`\ncan contain edge id's of other clusters.\n\n\n### Clustered Edge\n\nThis is any edge contained by a cluster edge. It gets the following additional\nmember:\n\n- `edgeReplacedById` - id of the cluster edge in which current edge is clustered\n\n\n =========================================================================== */\nimport util from 'vis-util';\nimport NetworkUtil from'../NetworkUtil';\nimport Cluster from'./components/nodes/Cluster';\nimport Edge from './components/Edge'; // Only needed for check on type!\nimport Node from './components/Node'; // Only needed for check on type!\n\n/**\n * The clustering engine\n */\nclass ClusterEngine {\n /**\n * @param {Object} body\n */\n constructor(body) {\n this.body = body;\n this.clusteredNodes = {}; // key: node id, value: { clusterId: , node: }\n this.clusteredEdges = {}; // key: edge id, value: restore information for given edge\n\n this.options = {};\n this.defaultOptions = {};\n util.extend(this.options, this.defaultOptions);\n\n this.body.emitter.on('_resetData', () => {this.clusteredNodes = {}; this.clusteredEdges = {};})\n }\n\n /**\n *\n * @param {number} hubsize\n * @param {Object} options\n */\n clusterByHubsize(hubsize, options) {\n if (hubsize === undefined) {\n hubsize = this._getHubSize();\n }\n else if (typeof(hubsize) === \"object\") {\n options = this._checkOptions(hubsize);\n hubsize = this._getHubSize();\n }\n\n let nodesToCluster = [];\n for (let i = 0; i < this.body.nodeIndices.length; i++) {\n let node = this.body.nodes[this.body.nodeIndices[i]];\n if (node.edges.length >= hubsize) {\n nodesToCluster.push(node.id);\n }\n }\n\n for (let i = 0; i < nodesToCluster.length; i++) {\n this.clusterByConnection(nodesToCluster[i],options,true);\n }\n\n this.body.emitter.emit('_dataChanged');\n }\n\n\n /**\n * loop over all nodes, check if they adhere to the condition and cluster if needed.\n * @param {Object} options\n * @param {boolean} [refreshData=true]\n */\n cluster(options = {}, refreshData = true) {\n if (options.joinCondition === undefined) {throw new Error(\"Cannot call clusterByNodeData without a joinCondition function in the options.\");}\n\n // check if the options object is fine, append if needed\n options = this._checkOptions(options);\n\n let childNodesObj = {};\n let childEdgesObj = {};\n\n // collect the nodes that will be in the cluster\n util.forEach(this.body.nodes, (node, nodeId) => {\n if (node.options && options.joinCondition(node.options) === true) {\n childNodesObj[nodeId] = node;\n\n // collect the edges that will be in the cluster\n util.forEach(node.edges, (edge) => {\n if (this.clusteredEdges[edge.id] === undefined) {\n childEdgesObj[edge.id] = edge;\n }\n });\n }\n });\n\n this._cluster(childNodesObj, childEdgesObj, options, refreshData);\n }\n\n\n /**\n * Cluster all nodes in the network that have only X edges\n * @param {number} edgeCount\n * @param {Object} options\n * @param {boolean} [refreshData=true]\n */\n clusterByEdgeCount(edgeCount, options, refreshData = true) {\n options = this._checkOptions(options);\n let clusters = [];\n let usedNodes = {};\n let edge, edges, relevantEdgeCount;\n // collect the nodes that will be in the cluster\n for (let i = 0; i < this.body.nodeIndices.length; i++) {\n let childNodesObj = {};\n let childEdgesObj = {};\n let nodeId = this.body.nodeIndices[i];\n let node = this.body.nodes[nodeId];\n\n // if this node is already used in another cluster this session, we do not have to re-evaluate it.\n if (usedNodes[nodeId] === undefined) {\n relevantEdgeCount = 0;\n edges = [];\n for (let j = 0; j < node.edges.length; j++) {\n edge = node.edges[j];\n if (this.clusteredEdges[edge.id] === undefined) {\n if (edge.toId !== edge.fromId) {\n relevantEdgeCount++;\n }\n edges.push(edge);\n }\n }\n\n // this node qualifies, we collect its neighbours to start the clustering process.\n if (relevantEdgeCount === edgeCount) {\n var checkJoinCondition = function(node) {\n if (options.joinCondition === undefined || options.joinCondition === null) {\n return true;\n }\n\n let clonedOptions = NetworkUtil.cloneOptions(node);\n return options.joinCondition(clonedOptions);\n }\n\n let gatheringSuccessful = true;\n for (let j = 0; j < edges.length; j++) {\n edge = edges[j];\n let childNodeId = this._getConnectedId(edge, nodeId);\n // add the nodes to the list by the join condition.\n if (checkJoinCondition(node)) {\n childEdgesObj[edge.id] = edge;\n childNodesObj[nodeId] = node;\n childNodesObj[childNodeId] = this.body.nodes[childNodeId];\n usedNodes[nodeId] = true;\n } else {\n // this node does not qualify after all.\n gatheringSuccessful = false;\n break;\n }\n }\n\n // add to the cluster queue\n if (Object.keys(childNodesObj).length > 0 && Object.keys(childEdgesObj).length > 0 && gatheringSuccessful === true) {\n /**\n * Search for cluster data that contains any of the node id's\n * @returns {Boolean} true if no joinCondition, otherwise return value of joinCondition\n */\n var findClusterData = function() {\n for (let n = 0; n < clusters.length; ++n) {\n // Search for a cluster containing any of the node id's\n for (var m in childNodesObj) {\n if (clusters[n].nodes[m] !== undefined) {\n return clusters[n];\n }\n }\n }\n\n return undefined;\n };\n\n\n // If any of the found nodes is part of a cluster found in this method,\n // add the current values to that cluster\n var foundCluster = findClusterData();\n if (foundCluster !== undefined) {\n // Add nodes to found cluster if not present\n for (let m in childNodesObj) {\n if (foundCluster.nodes[m] === undefined) {\n foundCluster.nodes[m] = childNodesObj[m];\n }\n }\n\n // Add edges to found cluster, if not present\n for (let m in childEdgesObj) {\n if (foundCluster.edges[m] === undefined) {\n foundCluster.edges[m] = childEdgesObj[m];\n }\n }\n } else {\n // Create a new cluster group\n clusters.push({nodes: childNodesObj, edges: childEdgesObj})\n }\n }\n }\n }\n }\n\n for (let i = 0; i < clusters.length; i++) {\n this._cluster(clusters[i].nodes, clusters[i].edges, options, false)\n }\n\n if (refreshData === true) {\n this.body.emitter.emit('_dataChanged');\n }\n }\n\n /**\n * Cluster all nodes in the network that have only 1 edge\n * @param {Object} options\n * @param {boolean} [refreshData=true]\n */\n clusterOutliers(options, refreshData = true) {\n this.clusterByEdgeCount(1,options,refreshData);\n }\n\n /**\n * Cluster all nodes in the network that have only 2 edge\n * @param {Object} options\n * @param {boolean} [refreshData=true]\n */\n clusterBridges(options, refreshData = true) {\n this.clusterByEdgeCount(2,options,refreshData);\n }\n\n\n\n /**\n * suck all connected nodes of a node into the node.\n * @param {Node.id} nodeId\n * @param {Object} options\n * @param {boolean} [refreshData=true]\n */\n clusterByConnection(nodeId, options, refreshData = true) {\n // kill conditions\n if (nodeId === undefined) {throw new Error(\"No nodeId supplied to clusterByConnection!\");}\n if (this.body.nodes[nodeId] === undefined) {throw new Error(\"The nodeId given to clusterByConnection does not exist!\");}\n\n let node = this.body.nodes[nodeId];\n options = this._checkOptions(options, node);\n if (options.clusterNodeProperties.x === undefined) {options.clusterNodeProperties.x = node.x;}\n if (options.clusterNodeProperties.y === undefined) {options.clusterNodeProperties.y = node.y;}\n if (options.clusterNodeProperties.fixed === undefined) {\n options.clusterNodeProperties.fixed = {};\n options.clusterNodeProperties.fixed.x = node.options.fixed.x;\n options.clusterNodeProperties.fixed.y = node.options.fixed.y;\n }\n\n\n let childNodesObj = {};\n let childEdgesObj = {};\n let parentNodeId = node.id;\n let parentClonedOptions = NetworkUtil.cloneOptions(node);\n childNodesObj[parentNodeId] = node;\n\n // collect the nodes that will be in the cluster\n for (let i = 0; i < node.edges.length; i++) {\n let edge = node.edges[i];\n if (this.clusteredEdges[edge.id] === undefined) {\n let childNodeId = this._getConnectedId(edge, parentNodeId);\n\n // if the child node is not in a cluster\n if (this.clusteredNodes[childNodeId] === undefined) {\n if (childNodeId !== parentNodeId) {\n if (options.joinCondition === undefined) {\n childEdgesObj[edge.id] = edge;\n childNodesObj[childNodeId] = this.body.nodes[childNodeId];\n }\n else {\n // clone the options and insert some additional parameters that could be interesting.\n let childClonedOptions = NetworkUtil.cloneOptions(this.body.nodes[childNodeId]);\n if (options.joinCondition(parentClonedOptions, childClonedOptions) === true) {\n childEdgesObj[edge.id] = edge;\n childNodesObj[childNodeId] = this.body.nodes[childNodeId];\n }\n }\n }\n else {\n // swallow the edge if it is self-referencing.\n childEdgesObj[edge.id] = edge;\n }\n }\n }\n }\n var childNodeIDs = Object.keys(childNodesObj).map(function(childNode){\n return childNodesObj[childNode].id;\n })\n\n for (childNode in childNodesObj) {\n if (!childNodesObj.hasOwnProperty(childNode)) continue;\n\n var childNode = childNodesObj[childNode];\n for (var y=0; y < childNode.edges.length; y++){\n var childEdge = childNode.edges[y];\n if (childNodeIDs.indexOf(this._getConnectedId(childEdge,childNode.id)) > -1){\n childEdgesObj[childEdge.id] = childEdge;\n }\n }\n }\n this._cluster(childNodesObj, childEdgesObj, options, refreshData);\n }\n\n\n /**\n * This function creates the edges that will be attached to the cluster\n * It looks for edges that are connected to the nodes from the \"outside' of the cluster.\n *\n * @param {{Node.id: vis.Node}} childNodesObj\n * @param {{vis.Edge.id: vis.Edge}} childEdgesObj\n * @param {Object} clusterNodeProperties\n * @param {Object} clusterEdgeProperties\n * @private\n */\n _createClusterEdges (childNodesObj, childEdgesObj, clusterNodeProperties, clusterEdgeProperties) {\n let edge, childNodeId, childNode, toId, fromId, otherNodeId;\n\n // loop over all child nodes and their edges to find edges going out of the cluster\n // these edges will be replaced by clusterEdges.\n let childKeys = Object.keys(childNodesObj);\n let createEdges = [];\n for (let i = 0; i < childKeys.length; i++) {\n childNodeId = childKeys[i];\n childNode = childNodesObj[childNodeId];\n\n // construct new edges from the cluster to others\n for (let j = 0; j < childNode.edges.length; j++) {\n edge = childNode.edges[j];\n // we only handle edges that are visible to the system, not the disabled ones from the clustering process.\n if (this.clusteredEdges[edge.id] === undefined) {\n // self-referencing edges will be added to the \"hidden\" list\n if (edge.toId == edge.fromId) {\n childEdgesObj[edge.id] = edge;\n }\n else {\n // set up the from and to.\n if (edge.toId == childNodeId) { // this is a double equals because ints and strings can be interchanged here.\n toId = clusterNodeProperties.id;\n fromId = edge.fromId;\n otherNodeId = fromId;\n }\n else {\n toId = edge.toId;\n fromId = clusterNodeProperties.id;\n otherNodeId = toId;\n }\n }\n\n // Only edges from the cluster outwards are being replaced.\n if (childNodesObj[otherNodeId] === undefined) {\n createEdges.push({edge: edge, fromId: fromId, toId: toId});\n }\n }\n }\n }\n\n\n //\n // Here we actually create the replacement edges.\n //\n // We could not do this in the loop above as the creation process\n // would add an edge to the edges array we are iterating over.\n //\n // NOTE: a clustered edge can have multiple base edges!\n //\n var newEdges = [];\n\n /**\n * Find a cluster edge which matches the given created edge.\n * @param {vis.Edge} createdEdge\n * @returns {vis.Edge}\n */\n var getNewEdge = function(createdEdge) {\n for (let j = 0; j < newEdges.length; j++) {\n let newEdge = newEdges[j];\n\n // We replace both to and from edges with a single cluster edge\n let matchToDirection = (createdEdge.fromId === newEdge.fromId && createdEdge.toId === newEdge.toId);\n let matchFromDirection = (createdEdge.fromId === newEdge.toId && createdEdge.toId === newEdge.fromId);\n\n if (matchToDirection || matchFromDirection ) {\n return newEdge;\n }\n }\n\n return null;\n };\n\n\n for (let j = 0; j < createEdges.length; j++) {\n let createdEdge = createEdges[j];\n let edge = createdEdge.edge;\n let newEdge = getNewEdge(createdEdge);\n\n if (newEdge === null) {\n // Create a clustered edge for this connection\n newEdge = this._createClusteredEdge(\n createdEdge.fromId,\n createdEdge.toId,\n edge,\n clusterEdgeProperties);\n\n newEdges.push(newEdge);\n } else {\n newEdge.clusteringEdgeReplacingIds.push(edge.id);\n }\n\n // also reference the new edge in the old edge\n this.body.edges[edge.id].edgeReplacedById = newEdge.id;\n\n // hide the replaced edge\n this._backupEdgeOptions(edge);\n edge.setOptions({physics:false});\n }\n }\n\n /**\n * This function checks the options that can be supplied to the different cluster functions\n * for certain fields and inserts defaults if needed\n * @param {Object} options\n * @returns {*}\n * @private\n */\n _checkOptions(options = {}) {\n if (options.clusterEdgeProperties === undefined) {options.clusterEdgeProperties = {};}\n if (options.clusterNodeProperties === undefined) {options.clusterNodeProperties = {};}\n\n return options;\n }\n\n /**\n *\n * @param {Object} childNodesObj | object with node objects, id as keys, same as childNodes except it also contains a source node\n * @param {Object} childEdgesObj | object with edge objects, id as keys\n * @param {Array} options | object with {clusterNodeProperties, clusterEdgeProperties, processProperties}\n * @param {boolean} refreshData | when true, do not wrap up\n * @private\n */\n _cluster(childNodesObj, childEdgesObj, options, refreshData = true) {\n // Remove nodes which are already clustered\n var tmpNodesToRemove = []\n for (let nodeId in childNodesObj) {\n if (childNodesObj.hasOwnProperty(nodeId)) {\n if (this.clusteredNodes[nodeId] !== undefined) {\n tmpNodesToRemove.push(nodeId);\n }\n }\n }\n\n for (var n = 0; n < tmpNodesToRemove.length; ++n) {\n delete childNodesObj[tmpNodesToRemove[n]];\n }\n\n // kill condition: no nodes don't bother\n if (Object.keys(childNodesObj).length == 0) {return;}\n\n // allow clusters of 1 if options allow\n if (Object.keys(childNodesObj).length == 1 && options.clusterNodeProperties.allowSingleNodeCluster != true) {return;}\n\n let clusterNodeProperties = util.deepExtend({},options.clusterNodeProperties);\n\n // construct the clusterNodeProperties\n if (options.processProperties !== undefined) {\n // get the childNode options\n let childNodesOptions = [];\n for (let nodeId in childNodesObj) {\n if (childNodesObj.hasOwnProperty(nodeId)) {\n let clonedOptions = NetworkUtil.cloneOptions(childNodesObj[nodeId]);\n childNodesOptions.push(clonedOptions);\n }\n }\n\n // get cluster properties based on childNodes\n let childEdgesOptions = [];\n for (let edgeId in childEdgesObj) {\n if (childEdgesObj.hasOwnProperty(edgeId)) {\n // these cluster edges will be removed on creation of the cluster.\n if (edgeId.substr(0, 12) !== \"clusterEdge:\") {\n let clonedOptions = NetworkUtil.cloneOptions(childEdgesObj[edgeId], 'edge');\n childEdgesOptions.push(clonedOptions);\n }\n }\n }\n\n clusterNodeProperties = options.processProperties(clusterNodeProperties, childNodesOptions, childEdgesOptions);\n if (!clusterNodeProperties) {\n throw new Error(\"The processProperties function does not return properties!\");\n }\n }\n\n // check if we have an unique id;\n if (clusterNodeProperties.id === undefined) {clusterNodeProperties.id = 'cluster:' + util.randomUUID();}\n let clusterId = clusterNodeProperties.id;\n\n if (clusterNodeProperties.label === undefined) {\n clusterNodeProperties.label = 'cluster';\n }\n\n\n // give the clusterNode a position if it does not have one.\n let pos = undefined;\n if (clusterNodeProperties.x === undefined) {\n pos = this._getClusterPosition(childNodesObj);\n clusterNodeProperties.x = pos.x;\n }\n if (clusterNodeProperties.y === undefined) {\n if (pos === undefined) {pos = this._getClusterPosition(childNodesObj);}\n clusterNodeProperties.y = pos.y;\n }\n\n // force the ID to remain the same\n clusterNodeProperties.id = clusterId;\n\n // create the cluster Node\n // Note that allowSingleNodeCluster, if present, is stored in the options as well\n let clusterNode = this.body.functions.createNode(clusterNodeProperties, Cluster);\n clusterNode.containedNodes = childNodesObj;\n clusterNode.containedEdges = childEdgesObj;\n // cache a copy from the cluster edge properties if we have to reconnect others later on\n clusterNode.clusterEdgeProperties = options.clusterEdgeProperties;\n\n // finally put the cluster node into global\n this.body.nodes[clusterNodeProperties.id] = clusterNode;\n\n this._clusterEdges(childNodesObj, childEdgesObj, clusterNodeProperties, options.clusterEdgeProperties);\n\n // set ID to undefined so no duplicates arise\n clusterNodeProperties.id = undefined;\n\n // wrap up\n if (refreshData === true) {\n this.body.emitter.emit('_dataChanged');\n }\n }\n\n /**\n *\n * @param {Edge} edge\n * @private\n */\n _backupEdgeOptions(edge) {\n if (this.clusteredEdges[edge.id] === undefined) {\n this.clusteredEdges[edge.id] = {physics: edge.options.physics};\n }\n }\n\n /**\n *\n * @param {Edge} edge\n * @private\n */\n _restoreEdge(edge) {\n let originalOptions = this.clusteredEdges[edge.id];\n if (originalOptions !== undefined) {\n edge.setOptions({physics: originalOptions.physics});\n delete this.clusteredEdges[edge.id];\n }\n }\n\n\n /**\n * Check if a node is a cluster.\n * @param {Node.id} nodeId\n * @returns {*}\n */\n isCluster(nodeId) {\n if (this.body.nodes[nodeId] !== undefined) {\n return this.body.nodes[nodeId].isCluster === true;\n }\n else {\n console.log(\"Node does not exist.\");\n return false;\n }\n }\n\n /**\n * get the position of the cluster node based on what's inside\n * @param {object} childNodesObj | object with node objects, id as keys\n * @returns {{x: number, y: number}}\n * @private\n */\n _getClusterPosition(childNodesObj) {\n let childKeys = Object.keys(childNodesObj);\n let minX = childNodesObj[childKeys[0]].x;\n let maxX = childNodesObj[childKeys[0]].x;\n let minY = childNodesObj[childKeys[0]].y;\n let maxY = childNodesObj[childKeys[0]].y;\n let node;\n for (let i = 1; i < childKeys.length; i++) {\n node = childNodesObj[childKeys[i]];\n minX = node.x < minX ? node.x : minX;\n maxX = node.x > maxX ? node.x : maxX;\n minY = node.y < minY ? node.y : minY;\n maxY = node.y > maxY ? node.y : maxY;\n }\n\n return {x: 0.5*(minX + maxX), y: 0.5*(minY + maxY)};\n }\n\n\n\n /**\n * Open a cluster by calling this function.\n * @param {vis.Edge.id} clusterNodeId | the ID of the cluster node\n * @param {Object} options\n * @param {boolean} refreshData | wrap up afterwards if not true\n */\n openCluster(clusterNodeId, options, refreshData = true) {\n // kill conditions\n if (clusterNodeId === undefined) {\n throw new Error(\"No clusterNodeId supplied to openCluster.\");\n }\n\n let clusterNode = this.body.nodes[clusterNodeId];\n\n if (clusterNode === undefined) {\n throw new Error(\"The clusterNodeId supplied to openCluster does not exist.\");\n }\n if (clusterNode.isCluster !== true\n || clusterNode.containedNodes === undefined\n || clusterNode.containedEdges === undefined) {\n throw new Error(\"The node:\" + clusterNodeId + \" is not a valid cluster.\");\n }\n\n // Check if current cluster is clustered itself\n let stack = this.findNode(clusterNodeId);\n let parentIndex = stack.indexOf(clusterNodeId) - 1;\n if (parentIndex >= 0) {\n // Current cluster is clustered; transfer contained nodes and edges to parent\n let parentClusterNodeId = stack[parentIndex];\n let parentClusterNode = this.body.nodes[parentClusterNodeId];\n\n // clustering.clusteredNodes and clustering.clusteredEdges remain unchanged\n parentClusterNode._openChildCluster(clusterNodeId);\n\n // All components of child cluster node have been transferred. It can die now.\n delete this.body.nodes[clusterNodeId];\n if (refreshData === true) {\n this.body.emitter.emit('_dataChanged');\n }\n\n return;\n }\n\n // main body \n let containedNodes = clusterNode.containedNodes;\n let containedEdges = clusterNode.containedEdges;\n\n // allow the user to position the nodes after release.\n if (options !== undefined && options.releaseFunction !== undefined && typeof options.releaseFunction === 'function') {\n let positions = {};\n let clusterPosition = {x:clusterNode.x, y:clusterNode.y};\n for (let nodeId in containedNodes) {\n if (containedNodes.hasOwnProperty(nodeId)) {\n let containedNode = this.body.nodes[nodeId];\n positions[nodeId] = {x: containedNode.x, y: containedNode.y};\n }\n }\n let newPositions = options.releaseFunction(clusterPosition, positions);\n\n for (let nodeId in containedNodes) {\n if (containedNodes.hasOwnProperty(nodeId)) {\n let containedNode = this.body.nodes[nodeId];\n if (newPositions[nodeId] !== undefined) {\n containedNode.x = (newPositions[nodeId].x === undefined ? clusterNode.x : newPositions[nodeId].x);\n containedNode.y = (newPositions[nodeId].y === undefined ? clusterNode.y : newPositions[nodeId].y);\n }\n }\n }\n }\n else {\n // copy the position from the cluster\n util.forEach(containedNodes, function(containedNode) {\n // inherit position\n if (containedNode.options.fixed.x === false) {containedNode.x = clusterNode.x;}\n if (containedNode.options.fixed.y === false) {containedNode.y = clusterNode.y;}\n });\n }\n\n // release nodes\n for (let nodeId in containedNodes) {\n if (containedNodes.hasOwnProperty(nodeId)) {\n let containedNode = this.body.nodes[nodeId];\n\n // inherit speed\n containedNode.vx = clusterNode.vx;\n containedNode.vy = clusterNode.vy;\n\n containedNode.setOptions({physics:true});\n\n delete this.clusteredNodes[nodeId];\n }\n }\n\n // copy the clusterNode edges because we cannot iterate over an object that we add or remove from.\n let edgesToBeDeleted = [];\n for (let i = 0; i < clusterNode.edges.length; i++) {\n edgesToBeDeleted.push(clusterNode.edges[i]);\n }\n\n // actually handling the deleting.\n for (let i = 0; i < edgesToBeDeleted.length; i++) {\n let edge = edgesToBeDeleted[i];\n let otherNodeId = this._getConnectedId(edge, clusterNodeId);\n let otherNode = this.clusteredNodes[otherNodeId];\n\n for (let j = 0; j < edge.clusteringEdgeReplacingIds.length; j++) {\n let transferId = edge.clusteringEdgeReplacingIds[j];\n let transferEdge = this.body.edges[transferId];\n if (transferEdge === undefined) continue; \n\n // if the other node is in another cluster, we transfer ownership of this edge to the other cluster\n if (otherNode !== undefined) {\n // transfer ownership:\n let otherCluster = this.body.nodes[otherNode.clusterId];\n otherCluster.containedEdges[transferEdge.id] = transferEdge;\n\n // delete local reference\n delete containedEdges[transferEdge.id];\n\n // get to and from\n let fromId = transferEdge.fromId;\n let toId = transferEdge.toId;\n if (transferEdge.toId == otherNodeId) {\n toId = otherNode.clusterId;\n }\n else {\n fromId = otherNode.clusterId;\n }\n\n // create new cluster edge from the otherCluster\n this._createClusteredEdge(\n fromId,\n toId,\n transferEdge,\n otherCluster.clusterEdgeProperties,\n {hidden: false, physics: true});\n\n } else {\n this._restoreEdge(transferEdge);\n }\n }\n\n edge.remove();\n }\n\n // handle the releasing of the edges\n for (let edgeId in containedEdges) {\n if (containedEdges.hasOwnProperty(edgeId)) {\n this._restoreEdge(containedEdges[edgeId]);\n }\n }\n\n // remove clusterNode\n delete this.body.nodes[clusterNodeId];\n\n if (refreshData === true) {\n this.body.emitter.emit('_dataChanged');\n }\n }\n\n /**\n *\n * @param {Cluster.id} clusterId\n * @returns {Array.}\n */\n getNodesInCluster(clusterId) {\n let nodesArray = [];\n if (this.isCluster(clusterId) === true) {\n let containedNodes = this.body.nodes[clusterId].containedNodes;\n for (let nodeId in containedNodes) {\n if (containedNodes.hasOwnProperty(nodeId)) {\n nodesArray.push(this.body.nodes[nodeId].id)\n }\n }\n }\n\n return nodesArray;\n }\n\n /**\n * Get the stack clusterId's that a certain node resides in. cluster A -> cluster B -> cluster C -> node\n *\n * If a node can't be found in the chain, return an empty array.\n *\n * @param {string|number} nodeId\n * @returns {Array}\n */\n findNode(nodeId) {\n let stack = [];\n let max = 100;\n let counter = 0;\n let node;\n\n while (this.clusteredNodes[nodeId] !== undefined && counter < max) {\n node = this.body.nodes[nodeId]\n if (node === undefined) return [];\n stack.push(node.id);\n\n nodeId = this.clusteredNodes[nodeId].clusterId;\n counter++;\n }\n\n node = this.body.nodes[nodeId]\n if (node === undefined) return [];\n stack.push(node.id);\n\n stack.reverse();\n return stack;\n }\n\n /**\n * Using a clustered nodeId, update with the new options\n * @param {vis.Edge.id} clusteredNodeId\n * @param {object} newOptions\n */\n updateClusteredNode(clusteredNodeId, newOptions) {\n if (clusteredNodeId === undefined) {throw new Error(\"No clusteredNodeId supplied to updateClusteredNode.\");}\n if (newOptions === undefined) {throw new Error(\"No newOptions supplied to updateClusteredNode.\");}\n if (this.body.nodes[clusteredNodeId] === undefined) {throw new Error(\"The clusteredNodeId supplied to updateClusteredNode does not exist.\");}\n\n this.body.nodes[clusteredNodeId].setOptions(newOptions);\n this.body.emitter.emit('_dataChanged');\n }\n\n /**\n * Using a base edgeId, update all related clustered edges with the new options\n * @param {vis.Edge.id} startEdgeId\n * @param {object} newOptions\n */\n updateEdge(startEdgeId, newOptions) {\n if (startEdgeId === undefined) {throw new Error(\"No startEdgeId supplied to updateEdge.\");}\n if (newOptions === undefined) {throw new Error(\"No newOptions supplied to updateEdge.\");}\n if (this.body.edges[startEdgeId] === undefined) {throw new Error(\"The startEdgeId supplied to updateEdge does not exist.\");}\n\n let allEdgeIds = this.getClusteredEdges(startEdgeId);\n for (let i = 0; i < allEdgeIds.length; i++) {\n var edge = this.body.edges[allEdgeIds[i]];\n edge.setOptions(newOptions);\n }\n this.body.emitter.emit('_dataChanged');\n }\n\n /**\n * Get a stack of clusterEdgeId's (+base edgeid) that a base edge is the same as. cluster edge C -> cluster edge B -> cluster edge A -> base edge(edgeId)\n * @param {vis.Edge.id} edgeId\n * @returns {Array.}\n */\n getClusteredEdges(edgeId) {\n let stack = [];\n let max = 100;\n let counter = 0;\n\n while (edgeId !== undefined && this.body.edges[edgeId] !== undefined && counter < max) {\n stack.push(this.body.edges[edgeId].id);\n edgeId = this.body.edges[edgeId].edgeReplacedById;\n counter++;\n }\n stack.reverse();\n return stack;\n }\n\n /**\n * Get the base edge id of clusterEdgeId. cluster edge (clusteredEdgeId) -> cluster edge B -> cluster edge C -> base edge\n * @param {vis.Edge.id} clusteredEdgeId\n * @returns {vis.Edge.id} baseEdgeId\n *\n * TODO: deprecate in 5.0.0. Method getBaseEdges() is the correct one to use.\n */\n getBaseEdge(clusteredEdgeId) {\n // Just kludge this by returning the first base edge id found\n return this.getBaseEdges(clusteredEdgeId)[0];\n }\n\n\n /**\n * Get all regular edges for this clustered edge id.\n *\n * @param {vis.Edge.id} clusteredEdgeId\n * @returns {Array.} all baseEdgeId's under this clustered edge\n */\n getBaseEdges(clusteredEdgeId) {\n let IdsToHandle = [clusteredEdgeId];\n let doneIds = [];\n let foundIds = [];\n let max = 100;\n let counter = 0;\n\n while (IdsToHandle.length > 0 && counter < max) {\n let nextId = IdsToHandle.pop();\n if (nextId === undefined) continue; // Paranoia here and onwards\n let nextEdge = this.body.edges[nextId];\n if (nextEdge === undefined) continue;\n counter++;\n\n let replacingIds = nextEdge.clusteringEdgeReplacingIds;\n if (replacingIds === undefined) {\n // nextId is a base id\n foundIds.push(nextId);\n } else {\n // Another cluster edge, unravel this one as well\n for (let i = 0; i < replacingIds.length; ++i) {\n let replacingId = replacingIds[i];\n\n // Don't add if already handled\n // TODO: never triggers; find a test-case which does\n if (IdsToHandle.indexOf(replacingIds) !== -1 || doneIds.indexOf(replacingIds) !== -1) {\n continue;\n }\n\n IdsToHandle.push(replacingId);\n }\n }\n\n doneIds.push(nextId);\n }\n\n return foundIds;\n }\n\n\n /**\n * Get the Id the node is connected to\n * @param {vis.Edge} edge\n * @param {Node.id} nodeId\n * @returns {*}\n * @private\n */\n _getConnectedId(edge, nodeId) {\n if (edge.toId != nodeId) {\n return edge.toId;\n }\n else if (edge.fromId != nodeId) {\n return edge.fromId;\n }\n else {\n return edge.fromId;\n }\n }\n\n /**\n * We determine how many connections denote an important hub.\n * We take the mean + 2*std as the important hub size. (Assuming a normal distribution of data, ~2.2%)\n *\n * @returns {number}\n * @private\n */\n _getHubSize() {\n let average = 0;\n let averageSquared = 0;\n let hubCounter = 0;\n let largestHub = 0;\n\n for (let i = 0; i < this.body.nodeIndices.length; i++) {\n let node = this.body.nodes[this.body.nodeIndices[i]];\n if (node.edges.length > largestHub) {\n largestHub = node.edges.length;\n }\n average += node.edges.length;\n averageSquared += Math.pow(node.edges.length,2);\n hubCounter += 1;\n }\n average = average / hubCounter;\n averageSquared = averageSquared / hubCounter;\n\n let variance = averageSquared - Math.pow(average,2);\n let standardDeviation = Math.sqrt(variance);\n\n let hubThreshold = Math.floor(average + 2*standardDeviation);\n\n // always have at least one to cluster\n if (hubThreshold > largestHub) {\n hubThreshold = largestHub;\n }\n\n return hubThreshold;\n }\n\n\n /**\n * Create an edge for the cluster representation.\n *\n * @param {Node.id} fromId\n * @param {Node.id} toId\n * @param {vis.Edge} baseEdge\n * @param {Object} clusterEdgeProperties\n * @param {Object} extraOptions\n * @returns {Edge} newly created clustered edge\n * @private\n */\n _createClusteredEdge(fromId, toId, baseEdge, clusterEdgeProperties, extraOptions) {\n // copy the options of the edge we will replace\n let clonedOptions = NetworkUtil.cloneOptions(baseEdge, 'edge');\n // make sure the properties of clusterEdges are superimposed on it\n util.deepExtend(clonedOptions, clusterEdgeProperties);\n\n // set up the edge\n clonedOptions.from = fromId;\n clonedOptions.to = toId;\n clonedOptions.id = 'clusterEdge:' + util.randomUUID();\n\n // apply the edge specific options to it if specified\n if (extraOptions !== undefined) {\n util.deepExtend(clonedOptions, extraOptions);\n }\n\n let newEdge = this.body.functions.createEdge(clonedOptions);\n newEdge.clusteringEdgeReplacingIds = [baseEdge.id];\n newEdge.connect();\n\n // Register the new edge\n this.body.edges[newEdge.id] = newEdge;\n\n return newEdge;\n }\n\n\n /**\n * Add the passed child nodes and edges to the given cluster node.\n *\n * @param {Object|Node} childNodes hash of nodes or single node to add in cluster\n * @param {Object|Edge} childEdges hash of edges or single edge to take into account when clustering\n * @param {Node} clusterNode cluster node to add nodes and edges to\n * @param {Object} [clusterEdgeProperties]\n * @private\n */\n _clusterEdges(childNodes, childEdges, clusterNode, clusterEdgeProperties) {\n if (childEdges instanceof Edge) {\n let edge = childEdges;\n let obj = {};\n obj[edge.id] = edge;\n childEdges = obj;\n }\n\n if (childNodes instanceof Node) {\n let node = childNodes;\n let obj = {};\n obj[node.id] = node;\n childNodes = obj;\n }\n\n if (clusterNode === undefined || clusterNode === null) {\n throw new Error(\"_clusterEdges: parameter clusterNode required\");\n }\n\n if (clusterEdgeProperties === undefined) {\n // Take the required properties from the cluster node\n clusterEdgeProperties = clusterNode.clusterEdgeProperties;\n }\n\n // create the new edges that will connect to the cluster.\n // All self-referencing edges will be added to childEdges here.\n this._createClusterEdges(childNodes, childEdges, clusterNode, clusterEdgeProperties);\n\n // disable the childEdges\n for (let edgeId in childEdges) {\n if (childEdges.hasOwnProperty(edgeId)) {\n if (this.body.edges[edgeId] !== undefined) {\n let edge = this.body.edges[edgeId];\n // cache the options before changing\n this._backupEdgeOptions(edge);\n // disable physics and hide the edge\n edge.setOptions({physics:false});\n }\n }\n }\n\n // disable the childNodes\n for (let nodeId in childNodes) {\n if (childNodes.hasOwnProperty(nodeId)) {\n this.clusteredNodes[nodeId] = {clusterId:clusterNode.id, node: this.body.nodes[nodeId]};\n this.body.nodes[nodeId].setOptions({physics:false});\n }\n }\n }\n\n\n /**\n * Determine in which cluster given nodeId resides.\n *\n * If not in cluster, return undefined.\n *\n * NOTE: If you know a cleaner way to do this, please enlighten me (wimrijnders).\n *\n * @param {Node.id} nodeId\n * @returns {Node|undefined} Node instance for cluster, if present\n * @private\n */\n _getClusterNodeForNode(nodeId) {\n if (nodeId === undefined) return undefined;\n let clusteredNode = this.clusteredNodes[nodeId];\n\n // NOTE: If no cluster info found, it should actually be an error\n if (clusteredNode === undefined) return undefined;\n let clusterId = clusteredNode.clusterId;\n if (clusterId === undefined) return undefined;\n\n return this.body.nodes[clusterId];\n }\n\n\n /**\n * Internal helper function for conditionally removing items in array\n *\n * Done like this because Array.filter() is not fully supported by all IE's.\n *\n * @param {Array} arr\n * @param {function} callback\n * @returns {Array}\n * @private\n */\n _filter(arr, callback) {\n let ret = [];\n\n util.forEach(arr, (item) => {\n if (callback(item)) {\n ret.push(item);\n }\n });\n\n return ret;\n }\n\n\n /**\n * Scan all edges for changes in clustering and adjust this if necessary.\n *\n * Call this (internally) after there has been a change in node or edge data.\n *\n * Pre: States of this.body.nodes and this.body.edges consistent\n * Pre: this.clusteredNodes and this.clusteredEdge consistent with containedNodes and containedEdges\n * of cluster nodes.\n */\n _updateState() {\n let nodeId;\n let deletedNodeIds = [];\n let deletedEdgeIds = {};\n\n /**\n * Utility function to iterate over clustering nodes only\n *\n * @param {Function} callback function to call for each cluster node\n */\n let eachClusterNode = (callback) => {\n util.forEach(this.body.nodes, (node) => {\n if (node.isCluster === true) {\n callback(node);\n }\n });\n };\n\n\n //\n // Remove deleted regular nodes from clustering\n //\n\n // Determine the deleted nodes\n for (nodeId in this.clusteredNodes) {\n if (!this.clusteredNodes.hasOwnProperty(nodeId)) continue;\n let node = this.body.nodes[nodeId];\n\n if (node === undefined) {\n deletedNodeIds.push(nodeId);\n }\n }\n\n // Remove nodes from cluster nodes\n eachClusterNode(function(clusterNode) {\n for (let n = 0; n < deletedNodeIds.length; n++) {\n delete clusterNode.containedNodes[deletedNodeIds[n]];\n }\n });\n\n // Remove nodes from cluster list\n for (let n = 0; n < deletedNodeIds.length; n++) {\n delete this.clusteredNodes[deletedNodeIds[n]];\n }\n\n\n //\n // Remove deleted edges from clustering\n //\n\n // Add the deleted clustered edges to the list\n util.forEach(this.clusteredEdges, (edgeId) => {\n let edge = this.body.edges[edgeId];\n if (edge === undefined || !edge.endPointsValid()) {\n deletedEdgeIds[edgeId] = edgeId;\n }\n });\n\n // Cluster nodes can also contain edges which are not clustered, \n // i.e. nodes 1-2 within cluster with an edge in between.\n // So the cluster nodes also need to be scanned for invalid edges\n eachClusterNode(function(clusterNode) {\n util.forEach(clusterNode.containedEdges, (edge, edgeId) => {\n if (!edge.endPointsValid() && !deletedEdgeIds[edgeId]) {\n deletedEdgeIds[edgeId] = edgeId;\n }\n });\n });\n\n // Also scan for cluster edges which need to be removed in the active list.\n // Regular edges have been removed beforehand, so this only picks up the cluster edges.\n util.forEach(this.body.edges, (edge, edgeId) => {\n // Explicitly scan the contained edges for validity\n let isValid = true;\n let replacedIds = edge.clusteringEdgeReplacingIds;\n if (replacedIds !== undefined) {\n let numValid = 0;\n\n util.forEach(replacedIds, (containedEdgeId) => {\n let containedEdge = this.body.edges[containedEdgeId];\n\n if (containedEdge !== undefined && containedEdge.endPointsValid()) {\n numValid += 1;\n }\n });\n\n isValid = (numValid > 0);\n }\n\n if (!edge.endPointsValid() || !isValid) {\n deletedEdgeIds[edgeId] = edgeId;\n }\n });\n\n // Remove edges from cluster nodes\n eachClusterNode((clusterNode) => {\n util.forEach(deletedEdgeIds, (deletedEdgeId) => {\n delete clusterNode.containedEdges[deletedEdgeId];\n\n util.forEach(clusterNode.edges, (edge, m) => {\n if (edge.id === deletedEdgeId) {\n clusterNode.edges[m] = null; // Don't want to directly delete here, because in the loop\n return;\n }\n\n edge.clusteringEdgeReplacingIds = this._filter(edge.clusteringEdgeReplacingIds, function(id) {\n return !deletedEdgeIds[id];\n });\n });\n\n // Clean up the nulls\n clusterNode.edges = this._filter(clusterNode.edges, function(item) {return item !== null});\n });\n });\n\n\n // Remove from cluster list\n util.forEach(deletedEdgeIds, (edgeId) => {\n delete this.clusteredEdges[edgeId];\n });\n\n // Remove cluster edges from active list (this.body.edges).\n // deletedEdgeIds still contains id of regular edges, but these should all\n // be gone when you reach here.\n util.forEach(deletedEdgeIds, (edgeId) => {\n delete this.body.edges[edgeId];\n });\n\n\n //\n // Check changed cluster state of edges\n //\n\n // Iterating over keys here, because edges may be removed in the loop\n let ids = Object.keys(this.body.edges);\n util.forEach(ids, (edgeId) => {\n let edge = this.body.edges[edgeId];\n\n let shouldBeClustered = this._isClusteredNode(edge.fromId) || this._isClusteredNode(edge.toId);\n if (shouldBeClustered === this._isClusteredEdge(edge.id)) {\n return; // all is well\n }\n\n if (shouldBeClustered) {\n // add edge to clustering\n let clusterFrom = this._getClusterNodeForNode(edge.fromId);\n if (clusterFrom !== undefined) {\n this._clusterEdges(this.body.nodes[edge.fromId], edge, clusterFrom);\n }\n\n let clusterTo = this._getClusterNodeForNode(edge.toId);\n if (clusterTo !== undefined) {\n this._clusterEdges(this.body.nodes[edge.toId], edge, clusterTo);\n }\n\n\t\t\t\t// TODO: check that it works for both edges clustered\n // (This might be paranoia)\n } else {\n delete this._clusterEdges[edgeId];\n this._restoreEdge(edge);\n // This should not be happening, the state should\n // be properly updated at this point.\n // \n // If it *is* reached during normal operation, then we have to implement\n // undo clustering for this edge here.\n // throw new Error('remove edge from clustering not implemented!')\n }\n });\n\n\n // Clusters may be nested to any level. Keep on opening until nothing to open\n var changed = false;\n var continueLoop = true;\n while (continueLoop) {\n let clustersToOpen = [];\n\n // Determine the id's of clusters that need opening\n eachClusterNode(function(clusterNode) {\n let numNodes = Object.keys(clusterNode.containedNodes).length;\n let allowSingle = (clusterNode.options.allowSingleNodeCluster === true);\n if ((allowSingle && numNodes < 1) || (!allowSingle && numNodes < 2)) {\n clustersToOpen.push(clusterNode.id);\n }\n });\n\n // Open them\n for (let n = 0; n < clustersToOpen.length; ++n) {\n this.openCluster(clustersToOpen[n], {}, false /* Don't refresh, we're in an refresh/update already */);\n }\n\n continueLoop = (clustersToOpen.length > 0);\n changed = changed || continueLoop;\n }\n\n if (changed) {\n this._updateState() // Redo this method (recursion possible! should be safe)\n }\n }\n\n\n /**\n * Determine if node with given id is part of a cluster.\n *\n * @param {Node.id} nodeId\n * @return {boolean} true if part of a cluster.\n */\n _isClusteredNode(nodeId) {\n return this.clusteredNodes[nodeId] !== undefined;\n }\n\n\n /**\n * Determine if edge with given id is not visible due to clustering.\n *\n * An edge is considered clustered if:\n * - it is directly replaced by a clustering edge\n * - any of its connecting nodes is in a cluster\n *\n * @param {vis.Edge.id} edgeId\n * @return {boolean} true if part of a cluster.\n */\n _isClusteredEdge(edgeId) {\n return this.clusteredEdges[edgeId] !== undefined;\n }\n}\n\n\nexport default ClusterEngine;\n","/**\n * Initializes window.requestAnimationFrame() to a usable form.\n *\n * Specifically, set up this method for the case of running on node.js with jsdom enabled.\n *\n * NOTES:\n *\n * * On node.js, when calling this directly outside of this class, `window` is not defined.\n * This happens even if jsdom is used.\n * * For node.js + jsdom, `window` is available at the moment the constructor is called.\n * For this reason, the called is placed within the constructor.\n * * Even then, `window.requestAnimationFrame()` is not defined, so it still needs to be added.\n * * During unit testing, it happens that the window object is reset during execution, causing\n * a runtime error due to missing `requestAnimationFrame()`. This needs to be compensated for,\n * see `_requestNextFrame()`.\n * * Since this is a global object, it may affect other modules besides `Network`. With normal\n * usage, this does not cause any problems. During unit testing, errors may occur. These have\n * been compensated for, see comment block in _requestNextFrame().\n *\n * @private\n */\nfunction _initRequestAnimationFrame() {\n var func;\n\n if (window !== undefined) {\n func = window.requestAnimationFrame\n || window.mozRequestAnimationFrame\n || window.webkitRequestAnimationFrame\n || window.msRequestAnimationFrame;\n }\n\n if (func === undefined) {\n // window or method not present, setting mock requestAnimationFrame\n window.requestAnimationFrame =\n function(callback) {\n //console.log(\"Called mock requestAnimationFrame\");\n callback();\n }\n } else {\n window.requestAnimationFrame = func;\n }\n}\n\nimport util from 'vis-util';\n\n/**\n * The canvas renderer\n */\nclass CanvasRenderer {\n /**\n * @param {Object} body\n * @param {Canvas} canvas\n */\n constructor(body, canvas) {\n _initRequestAnimationFrame();\n this.body = body;\n this.canvas = canvas;\n\n this.redrawRequested = false;\n this.renderTimer = undefined;\n this.requiresTimeout = true;\n this.renderingActive = false;\n this.renderRequests = 0;\n this.allowRedraw = true;\n\n this.dragging = false;\n this.zooming = false;\n this.options = {};\n this.defaultOptions = {\n hideEdgesOnDrag: false,\n hideEdgesOnZoom: false,\n hideNodesOnDrag: false,\n };\n util.extend(this.options, this.defaultOptions);\n\n this._determineBrowserMethod();\n this.bindEventListeners();\n }\n\n /**\n * Binds event listeners\n */\n bindEventListeners() {\n this.body.emitter.on(\"dragStart\", () => { this.dragging = true; });\n this.body.emitter.on(\"dragEnd\", () => { this.dragging = false; });\n this.body.emitter.on(\"zoom\", () => {\n this.zooming = true;\n window.clearTimeout(this.zoomTimeoutId)\n this.zoomTimeoutId = window.setTimeout(() => { \n this.zooming = false;\n this._requestRedraw.bind(this)()\n }, 250) \n });\n this.body.emitter.on(\"_resizeNodes\", () => { this._resizeNodes(); });\n this.body.emitter.on(\"_redraw\", () => {\n if (this.renderingActive === false) {\n this._redraw();\n }\n });\n this.body.emitter.on(\"_blockRedraw\", () => {this.allowRedraw = false;});\n this.body.emitter.on(\"_allowRedraw\", () => {this.allowRedraw = true; this.redrawRequested = false;});\n this.body.emitter.on(\"_requestRedraw\", this._requestRedraw.bind(this));\n this.body.emitter.on(\"_startRendering\", () => {\n this.renderRequests += 1;\n this.renderingActive = true;\n this._startRendering();\n });\n this.body.emitter.on(\"_stopRendering\", () => {\n this.renderRequests -= 1;\n this.renderingActive = this.renderRequests > 0;\n this.renderTimer = undefined;\n });\n this.body.emitter.on('destroy', () => {\n this.renderRequests = 0;\n this.allowRedraw = false;\n this.renderingActive = false;\n if (this.requiresTimeout === true) {\n clearTimeout(this.renderTimer);\n }\n else {\n window.cancelAnimationFrame(this.renderTimer);\n }\n this.body.emitter.off();\n });\n\n\n }\n\n /**\n *\n * @param {Object} options\n */\n setOptions(options) {\n if (options !== undefined) {\n let fields = ['hideEdgesOnDrag', 'hideEdgesOnZoom', 'hideNodesOnDrag'];\n util.selectiveDeepExtend(fields,this.options, options);\n }\n }\n\n\n /**\n * Prepare the drawing of the next frame.\n *\n * Calls the callback when the next frame can or will be drawn.\n *\n * @param {function} callback\n * @param {number} delay - timeout case only, wait this number of milliseconds\n * @returns {function|undefined}\n * @private\n */\n _requestNextFrame(callback, delay) { \n // During unit testing, it happens that the mock window object is reset while\n // the next frame is still pending. Then, either 'window' is not present, or\n // 'requestAnimationFrame()' is not present because it is not defined on the\n // mock window object.\n //\n // As a consequence, unrelated unit tests may appear to fail, even if the problem\n // described happens in the current unit test.\n //\n // This is not something that will happen in normal operation, but we still need\n // to take it into account.\n //\n if (typeof window === 'undefined') return; // Doing `if (window === undefined)` does not work here!\n\n let timer;\n\n var myWindow = window; // Grab a reference to reduce the possibility that 'window' is reset\n // while running this method.\n\n if (this.requiresTimeout === true) {\n // wait given number of milliseconds and perform the animation step function\n timer = myWindow.setTimeout(callback, delay);\n } else {\n if (myWindow.requestAnimationFrame) {\n timer = myWindow.requestAnimationFrame(callback);\n }\n }\n\n return timer;\n }\n\n /**\n *\n * @private\n */\n _startRendering() {\n if (this.renderingActive === true) {\n if (this.renderTimer === undefined) {\n this.renderTimer = this._requestNextFrame(this._renderStep.bind(this), this.simulationInterval);\n }\n }\n }\n\n /**\n *\n * @private\n */\n _renderStep() {\n if (this.renderingActive === true) {\n // reset the renderTimer so a new scheduled animation step can be set\n this.renderTimer = undefined;\n\n if (this.requiresTimeout === true) {\n // this schedules a new simulation step\n this._startRendering();\n }\n\n this._redraw();\n\n if (this.requiresTimeout === false) {\n // this schedules a new simulation step\n this._startRendering();\n }\n }\n }\n\n /**\n * Redraw the network with the current data\n * chart will be resized too.\n */\n redraw() {\n this.body.emitter.emit('setSize');\n this._redraw();\n }\n\n /**\n * Redraw the network with the current data\n * @private\n */\n _requestRedraw() {\n if (this.redrawRequested !== true && this.renderingActive === false && this.allowRedraw === true) {\n this.redrawRequested = true;\n this._requestNextFrame(() => {this._redraw(false);}, 0);\n }\n }\n\n /**\n * Redraw the network with the current data\n * @param {boolean} [hidden=false] | Used to get the first estimate of the node sizes.\n * Only the nodes are drawn after which they are quickly drawn over.\n * @private\n */\n _redraw(hidden = false) {\n if (this.allowRedraw === true) {\n this.body.emitter.emit(\"initRedraw\");\n\n this.redrawRequested = false;\n\n // when the container div was hidden, this fixes it back up!\n if (this.canvas.frame.canvas.width === 0 || this.canvas.frame.canvas.height === 0) {\n this.canvas.setSize();\n }\n\n this.canvas.setTransform();\n\n let ctx = this.canvas.getContext();\n\n // clear the canvas\n let w = this.canvas.frame.canvas.clientWidth;\n let h = this.canvas.frame.canvas.clientHeight;\n ctx.clearRect(0, 0, w, h);\n\n // if the div is hidden, we stop the redraw here for performance.\n if (this.canvas.frame.clientWidth === 0) {\n return;\n }\n\n // set scaling and translation\n ctx.save();\n ctx.translate(this.body.view.translation.x, this.body.view.translation.y);\n ctx.scale(this.body.view.scale, this.body.view.scale);\n\n ctx.beginPath();\n this.body.emitter.emit(\"beforeDrawing\", ctx);\n ctx.closePath();\n\n if (hidden === false) {\n if (\n (this.dragging === false || (this.dragging === true && this.options.hideEdgesOnDrag === false)) && \n (this.zooming === false || (this.zooming === true && this.options.hideEdgesOnZoom === false))\n ) {\n this._drawEdges(ctx);\n }\n }\n\n if (this.dragging === false || (this.dragging === true && this.options.hideNodesOnDrag === false)) {\n this._drawNodes(ctx, hidden);\n }\n\n ctx.beginPath();\n this.body.emitter.emit(\"afterDrawing\", ctx);\n ctx.closePath();\n\n\n // restore original scaling and translation\n ctx.restore();\n if (hidden === true) {\n ctx.clearRect(0, 0, w, h);\n }\n }\n }\n\n\n /**\n * Redraw all nodes\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {boolean} [alwaysShow]\n * @private\n */\n _resizeNodes() {\n this.canvas.setTransform();\n let ctx = this.canvas.getContext();\n ctx.save();\n ctx.translate(this.body.view.translation.x, this.body.view.translation.y);\n ctx.scale(this.body.view.scale, this.body.view.scale);\n\n let nodes = this.body.nodes;\n let node;\n\n // resize all nodes\n for (let nodeId in nodes) {\n if (nodes.hasOwnProperty(nodeId)) {\n node = nodes[nodeId];\n node.resize(ctx);\n node.updateBoundingBox(ctx, node.selected);\n }\n }\n\n // restore original scaling and translation\n ctx.restore();\n }\n\n /**\n * Redraw all nodes\n *\n * @param {CanvasRenderingContext2D} ctx 2D context of a HTML canvas\n * @param {boolean} [alwaysShow]\n * @private\n */\n _drawNodes(ctx, alwaysShow = false) {\n let nodes = this.body.nodes;\n let nodeIndices = this.body.nodeIndices;\n let node;\n let selected = [];\n let margin = 20;\n let topLeft = this.canvas.DOMtoCanvas({x:-margin,y:-margin});\n let bottomRight = this.canvas.DOMtoCanvas({\n x: this.canvas.frame.canvas.clientWidth+margin,\n y: this.canvas.frame.canvas.clientHeight+margin\n });\n let viewableArea = {top:topLeft.y,left:topLeft.x,bottom:bottomRight.y,right:bottomRight.x};\n\n // draw unselected nodes;\n for (let i = 0; i < nodeIndices.length; i++) {\n node = nodes[nodeIndices[i]];\n // set selected nodes aside\n if (node.isSelected()) {\n selected.push(nodeIndices[i]);\n }\n else {\n if (alwaysShow === true) {\n node.draw(ctx);\n }\n else if (node.isBoundingBoxOverlappingWith(viewableArea) === true) {\n node.draw(ctx);\n }\n else {\n node.updateBoundingBox(ctx, node.selected);\n }\n }\n }\n\n // draw the selected nodes on top\n for (let i = 0; i < selected.length; i++) {\n node = nodes[selected[i]];\n node.draw(ctx);\n }\n }\n\n\n /**\n * Redraw all edges\n * @param {CanvasRenderingContext2D} ctx 2D context of a HTML canvas\n * @private\n */\n _drawEdges(ctx) {\n let edges = this.body.edges;\n let edgeIndices = this.body.edgeIndices;\n let edge;\n\n for (let i = 0; i < edgeIndices.length; i++) {\n edge = edges[edgeIndices[i]];\n if (edge.connected === true) {\n edge.draw(ctx);\n }\n }\n }\n\n /**\n * Determine if the browser requires a setTimeout or a requestAnimationFrame. This was required because\n * some implementations (safari and IE9) did not support requestAnimationFrame\n * @private\n */\n _determineBrowserMethod() {\n if (typeof window !== 'undefined') {\n let browserType = navigator.userAgent.toLowerCase();\n this.requiresTimeout = false;\n if (browserType.indexOf('msie 9.0') != -1) { // IE 9\n this.requiresTimeout = true;\n }\n else if (browserType.indexOf('safari') != -1) { // safari\n if (browserType.indexOf('chrome') <= -1) {\n this.requiresTimeout = true;\n }\n }\n }\n else {\n this.requiresTimeout = true;\n }\n }\n}\n\nexport default CanvasRenderer;\n","/**\n * Register a touch event, taking place before a gesture\n * @param {Hammer} hammer A hammer instance\n * @param {function} callback Callback, called as callback(event)\n */\nexports.onTouch = function (hammer, callback) {\n callback.inputHandler = function (event) {\n if (event.isFirst) {\n callback(event);\n }\n };\n\n hammer.on('hammer.input', callback.inputHandler);\n};\n\n/**\n * Register a release event, taking place after a gesture\n * @param {Hammer} hammer A hammer instance\n * @param {function} callback Callback, called as callback(event)\n * @returns {*}\n */\nexports.onRelease = function (hammer, callback) {\n callback.inputHandler = function (event) {\n if (event.isFinal) {\n callback(event);\n }\n };\n\n return hammer.on('hammer.input', callback.inputHandler);\n};\n\n\n/**\n * Unregister a touch event, taking place before a gesture\n * @param {Hammer} hammer A hammer instance\n * @param {function} callback Callback, called as callback(event)\n */\nexports.offTouch = function (hammer, callback) {\n hammer.off('hammer.input', callback.inputHandler);\n};\n\n/**\n * Unregister a release event, taking place before a gesture\n * @param {Hammer} hammer A hammer instance\n * @param {function} callback Callback, called as callback(event)\n */\nexports.offRelease = exports.offTouch;\n\n/**\n * Hack the PinchRecognizer such that it doesn't prevent default behavior\n * for vertical panning.\n *\n * Yeah ... this is quite a hack ... see https://github.com/hammerjs/hammer.js/issues/932\n *\n * @param {Hammer.Pinch} pinchRecognizer\n * @return {Hammer.Pinch} returns the pinchRecognizer\n */\nexports.disablePreventDefaultVertically = function (pinchRecognizer) {\n var TOUCH_ACTION_PAN_Y = 'pan-y';\n\n pinchRecognizer.getTouchAction = function() {\n // default method returns [TOUCH_ACTION_NONE]\n return [TOUCH_ACTION_PAN_Y];\n };\n\n return pinchRecognizer;\n};\n","import Hammer from '../../module/hammer';\nimport hammerUtil from '../../hammerUtil';\n\nimport util from 'vis-util';\n\n/**\n * Create the main frame for the Network.\n * This function is executed once when a Network object is created. The frame\n * contains a canvas, and this canvas contains all objects like the axis and\n * nodes.\n */\nclass Canvas {\n /**\n * @param {Object} body\n */\n constructor(body) {\n this.body = body;\n this.pixelRatio = 1;\n this.resizeTimer = undefined;\n this.resizeFunction = this._onResize.bind(this);\n this.cameraState = {};\n this.initialized = false;\n this.canvasViewCenter = {};\n\n this.options = {};\n this.defaultOptions = {\n autoResize: true,\n height: '100%',\n width: '100%'\n };\n util.extend(this.options, this.defaultOptions);\n\n this.bindEventListeners();\n }\n\n /**\n * Binds event listeners\n */\n bindEventListeners() {\n // bind the events\n this.body.emitter.once(\"resize\", (obj) => {\n if (obj.width !== 0) {\n this.body.view.translation.x = obj.width * 0.5;\n }\n if (obj.height !== 0) {\n this.body.view.translation.y = obj.height * 0.5;\n }\n });\n this.body.emitter.on(\"setSize\", this.setSize.bind(this));\n this.body.emitter.on(\"destroy\", () => {\n this.hammerFrame.destroy();\n this.hammer.destroy();\n this._cleanUp();\n });\n }\n\n /**\n * @param {Object} options\n */\n setOptions(options) {\n if (options !== undefined) {\n let fields = ['width','height','autoResize'];\n util.selectiveDeepExtend(fields,this.options, options);\n }\n\n if (this.options.autoResize === true) {\n // automatically adapt to a changing size of the browser.\n this._cleanUp();\n this.resizeTimer = setInterval(() => {\n let changed = this.setSize();\n if (changed === true) {\n this.body.emitter.emit(\"_requestRedraw\");\n }\n }, 1000);\n this.resizeFunction = this._onResize.bind(this);\n util.addEventListener(window,'resize',this.resizeFunction);\n }\n }\n\n /**\n * @private\n */\n _cleanUp() {\n // automatically adapt to a changing size of the browser.\n if (this.resizeTimer !== undefined) {\n clearInterval(this.resizeTimer);\n }\n util.removeEventListener(window,'resize',this.resizeFunction);\n this.resizeFunction = undefined;\n }\n\n /**\n * @private\n */\n _onResize() {\n this.setSize();\n this.body.emitter.emit(\"_redraw\");\n }\n\n /**\n * Get and store the cameraState\n *\n * @param {number} [pixelRatio=this.pixelRatio]\n * @private\n */\n _getCameraState(pixelRatio = this.pixelRatio) {\n if (this.initialized === true) {\n this.cameraState.previousWidth = this.frame.canvas.width / pixelRatio;\n this.cameraState.previousHeight = this.frame.canvas.height / pixelRatio;\n this.cameraState.scale = this.body.view.scale;\n this.cameraState.position = this.DOMtoCanvas({\n x: 0.5 * this.frame.canvas.width / pixelRatio,\n y: 0.5 * this.frame.canvas.height / pixelRatio\n });\n }\n }\n\n /**\n * Set the cameraState\n * @private\n */\n _setCameraState() {\n if (this.cameraState.scale !== undefined &&\n this.frame.canvas.clientWidth !== 0 &&\n this.frame.canvas.clientHeight !== 0 &&\n this.pixelRatio !== 0 &&\n this.cameraState.previousWidth > 0) {\n\n let widthRatio = (this.frame.canvas.width / this.pixelRatio) / this.cameraState.previousWidth;\n let heightRatio = (this.frame.canvas.height / this.pixelRatio) / this.cameraState.previousHeight;\n let newScale = this.cameraState.scale;\n\n if (widthRatio != 1 && heightRatio != 1) {\n newScale = this.cameraState.scale * 0.5 * (widthRatio + heightRatio);\n }\n else if (widthRatio != 1) {\n newScale = this.cameraState.scale * widthRatio;\n }\n else if (heightRatio != 1) {\n newScale = this.cameraState.scale * heightRatio;\n }\n\n this.body.view.scale = newScale;\n // this comes from the view module.\n var currentViewCenter = this.DOMtoCanvas({\n x: 0.5 * this.frame.canvas.clientWidth,\n y: 0.5 * this.frame.canvas.clientHeight\n });\n\n var distanceFromCenter = { // offset from view, distance view has to change by these x and y to center the node\n x: currentViewCenter.x - this.cameraState.position.x,\n y: currentViewCenter.y - this.cameraState.position.y\n };\n this.body.view.translation.x += distanceFromCenter.x * this.body.view.scale;\n this.body.view.translation.y += distanceFromCenter.y * this.body.view.scale;\n }\n }\n\n /**\n *\n * @param {number|string} value\n * @returns {string}\n * @private\n */\n _prepareValue(value) {\n if (typeof value === 'number') {\n return value + 'px';\n }\n else if (typeof value === 'string') {\n if (value.indexOf('%') !== -1 || value.indexOf('px') !== -1) {\n return value;\n }\n else if (value.indexOf('%') === -1) {\n return value + 'px';\n }\n }\n throw new Error('Could not use the value supplied for width or height:' + value);\n }\n\n\n /**\n * Create the HTML\n */\n _create() {\n // remove all elements from the container element.\n while (this.body.container.hasChildNodes()) {\n this.body.container.removeChild(this.body.container.firstChild);\n }\n\n this.frame = document.createElement('div');\n this.frame.className = 'vis-network';\n this.frame.style.position = 'relative';\n this.frame.style.overflow = 'hidden';\n this.frame.tabIndex = 900; // tab index is required for keycharm to bind keystrokes to the div instead of the window\n\n //////////////////////////////////////////////////////////////////\n\n this.frame.canvas = document.createElement(\"canvas\");\n this.frame.canvas.style.position = 'relative';\n this.frame.appendChild(this.frame.canvas);\n\n if (!this.frame.canvas.getContext) {\n let noCanvas = document.createElement( 'DIV' );\n noCanvas.style.color = 'red';\n noCanvas.style.fontWeight = 'bold' ;\n noCanvas.style.padding = '10px';\n noCanvas.innerHTML = 'Error: your browser does not support HTML canvas';\n this.frame.canvas.appendChild(noCanvas);\n }\n else {\n this._setPixelRatio();\n this.setTransform();\n }\n\n // add the frame to the container element\n this.body.container.appendChild(this.frame);\n\n this.body.view.scale = 1;\n this.body.view.translation = {x: 0.5 * this.frame.canvas.clientWidth,y: 0.5 * this.frame.canvas.clientHeight};\n\n this._bindHammer();\n }\n\n\n /**\n * This function binds hammer, it can be repeated over and over due to the uniqueness check.\n * @private\n */\n _bindHammer() {\n if (this.hammer !== undefined) {\n this.hammer.destroy();\n }\n this.drag = {};\n this.pinch = {};\n\n // init hammer\n this.hammer = new Hammer(this.frame.canvas);\n this.hammer.get('pinch').set({enable: true});\n // enable to get better response, todo: test on mobile.\n this.hammer.get('pan').set({threshold:5, direction: Hammer.DIRECTION_ALL});\n\n hammerUtil.onTouch(this.hammer, (event) => {this.body.eventListeners.onTouch(event)});\n this.hammer.on('tap', (event) => {this.body.eventListeners.onTap(event)});\n this.hammer.on('doubletap', (event) => {this.body.eventListeners.onDoubleTap(event)});\n this.hammer.on('press', (event) => {this.body.eventListeners.onHold(event)});\n this.hammer.on('panstart', (event) => {this.body.eventListeners.onDragStart(event)});\n this.hammer.on('panmove', (event) => {this.body.eventListeners.onDrag(event)});\n this.hammer.on('panend', (event) => {this.body.eventListeners.onDragEnd(event)});\n this.hammer.on('pinch', (event) => {this.body.eventListeners.onPinch(event)});\n\n // TODO: neatly cleanup these handlers when re-creating the Canvas, IF these are done with hammer, event.stopPropagation will not work?\n this.frame.canvas.addEventListener('mousewheel', (event) => {this.body.eventListeners.onMouseWheel(event)});\n this.frame.canvas.addEventListener('DOMMouseScroll', (event) => {this.body.eventListeners.onMouseWheel(event)});\n\n this.frame.canvas.addEventListener('mousemove', (event) => {this.body.eventListeners.onMouseMove(event)});\n this.frame.canvas.addEventListener('contextmenu', (event) => {this.body.eventListeners.onContext(event)});\n\n this.hammerFrame = new Hammer(this.frame);\n hammerUtil.onRelease(this.hammerFrame, (event) => {this.body.eventListeners.onRelease(event)});\n }\n\n\n /**\n * Set a new size for the network\n * @param {string} width Width in pixels or percentage (for example '800px'\n * or '50%')\n * @param {string} height Height in pixels or percentage (for example '400px'\n * or '30%')\n * @returns {boolean}\n */\n setSize(width = this.options.width, height = this.options.height) {\n width = this._prepareValue(width);\n height= this._prepareValue(height);\n\n let emitEvent = false;\n let oldWidth = this.frame.canvas.width;\n let oldHeight = this.frame.canvas.height;\n\n // update the pixel ratio\n //\n // NOTE: Comment in following is rather inconsistent; this is the ONLY place in the code\n // where it is assumed that the pixel ratio could change at runtime.\n // The only way I can think of this happening is a rotating screen or tablet; but then\n // there should be a mechanism for reloading the data (TODO: check if this is present).\n //\n // If the assumption is true (i.e. pixel ratio can change at runtime), then *all* usage\n // of pixel ratio must be overhauled for this.\n //\n // For the time being, I will humor the assumption here, and in the rest of the code assume it is\n // constant.\n let previousRatio = this.pixelRatio; // we cache this because the camera state storage needs the old value\n this._setPixelRatio();\n\n if (width != this.options.width || height != this.options.height || this.frame.style.width != width || this.frame.style.height != height) {\n this._getCameraState(previousRatio);\n\n this.frame.style.width = width;\n this.frame.style.height = height;\n\n this.frame.canvas.style.width = '100%';\n this.frame.canvas.style.height = '100%';\n\n this.frame.canvas.width = Math.round(this.frame.canvas.clientWidth * this.pixelRatio);\n this.frame.canvas.height = Math.round(this.frame.canvas.clientHeight * this.pixelRatio);\n\n this.options.width = width;\n this.options.height = height;\n\n this.canvasViewCenter = {\n x: 0.5 * this.frame.clientWidth,\n y: 0.5 * this.frame.clientHeight\n };\n\n emitEvent = true;\n }\n else {\n // this would adapt the width of the canvas to the width from 100% if and only if\n // there is a change.\n\n let newWidth = Math.round(this.frame.canvas.clientWidth * this.pixelRatio);\n let newHeight = Math.round(this.frame.canvas.clientHeight * this.pixelRatio);\n\n // store the camera if there is a change in size.\n if (this.frame.canvas.width !== newWidth || this.frame.canvas.height !== newHeight) {\n this._getCameraState(previousRatio);\n }\n\n if (this.frame.canvas.width !== newWidth) {\n this.frame.canvas.width = newWidth;\n emitEvent = true;\n }\n if (this.frame.canvas.height !== newHeight) {\n this.frame.canvas.height = newHeight;\n emitEvent = true;\n }\n }\n\n if (emitEvent === true) {\n this.body.emitter.emit('resize', {\n width : Math.round(this.frame.canvas.width / this.pixelRatio),\n height : Math.round(this.frame.canvas.height / this.pixelRatio),\n oldWidth : Math.round(oldWidth / this.pixelRatio),\n oldHeight: Math.round(oldHeight / this.pixelRatio)\n });\n\n // restore the camera on change.\n this._setCameraState();\n }\n\n\n // set initialized so the get and set camera will work from now on.\n this.initialized = true;\n return emitEvent;\n }\n\n /**\n *\n * @returns {CanvasRenderingContext2D}\n */\n getContext() {\n return this.frame.canvas.getContext(\"2d\");\n }\n\n /**\n * Determine the pixel ratio for various browsers.\n *\n * @returns {number}\n * @private\n */\n _determinePixelRatio() {\n let ctx = this.getContext();\n if (ctx === undefined) {\n throw new Error(\"Could not get canvax context\");\n }\n\n var numerator = 1;\n if(typeof window !== 'undefined') { // (window !== undefined) doesn't work here!\n // Protection during unit tests, where 'window' can be missing\n numerator = (window.devicePixelRatio || 1);\n }\n\n var denominator = (ctx.webkitBackingStorePixelRatio ||\n ctx.mozBackingStorePixelRatio ||\n ctx.msBackingStorePixelRatio ||\n ctx.oBackingStorePixelRatio ||\n ctx.backingStorePixelRatio || 1);\n\n return numerator / denominator;\n }\n\n /**\n * Lazy determination of pixel ratio.\n *\n * @private\n */\n _setPixelRatio() {\n this.pixelRatio = this._determinePixelRatio();\n }\n\n /**\n * Set the transform in the contained context, based on its pixelRatio\n */\n setTransform() {\n let ctx = this.getContext();\n if (ctx === undefined) {\n throw new Error(\"Could not get canvax context\");\n }\n\n ctx.setTransform(this.pixelRatio, 0, 0, this.pixelRatio, 0, 0);\n }\n\n\n /**\n * Convert the X coordinate in DOM-space (coordinate point in browser relative to the container div) to\n * the X coordinate in canvas-space (the simulation sandbox, which the camera looks upon)\n * @param {number} x\n * @returns {number}\n * @private\n */\n _XconvertDOMtoCanvas(x) {\n return (x - this.body.view.translation.x) / this.body.view.scale;\n }\n\n /**\n * Convert the X coordinate in canvas-space (the simulation sandbox, which the camera looks upon) to\n * the X coordinate in DOM-space (coordinate point in browser relative to the container div)\n * @param {number} x\n * @returns {number}\n * @private\n */\n _XconvertCanvasToDOM(x) {\n return x * this.body.view.scale + this.body.view.translation.x;\n }\n\n /**\n * Convert the Y coordinate in DOM-space (coordinate point in browser relative to the container div) to\n * the Y coordinate in canvas-space (the simulation sandbox, which the camera looks upon)\n * @param {number} y\n * @returns {number}\n * @private\n */\n _YconvertDOMtoCanvas(y) {\n return (y - this.body.view.translation.y) / this.body.view.scale;\n }\n\n /**\n * Convert the Y coordinate in canvas-space (the simulation sandbox, which the camera looks upon) to\n * the Y coordinate in DOM-space (coordinate point in browser relative to the container div)\n * @param {number} y\n * @returns {number}\n * @private\n */\n _YconvertCanvasToDOM(y) {\n return y * this.body.view.scale + this.body.view.translation.y;\n }\n\n\n /**\n * @param {point} pos\n * @returns {point}\n */\n canvasToDOM (pos) {\n return {x: this._XconvertCanvasToDOM(pos.x), y: this._YconvertCanvasToDOM(pos.y)};\n }\n\n /**\n *\n * @param {point} pos\n * @returns {point}\n */\n DOMtoCanvas (pos) {\n return {x: this._XconvertDOMtoCanvas(pos.x), y: this._YconvertDOMtoCanvas(pos.y)};\n }\n\n}\n\nexport default Canvas;\n","import util from 'vis-util';\n\nimport NetworkUtil from '../NetworkUtil';\n\n/**\n * The view\n */\nclass View {\n /**\n * @param {Object} body\n * @param {Canvas} canvas\n */\n constructor(body, canvas) {\n this.body = body;\n this.canvas = canvas;\n\n this.animationSpeed = 1/this.renderRefreshRate;\n this.animationEasingFunction = \"easeInOutQuint\";\n this.easingTime = 0;\n this.sourceScale = 0;\n this.targetScale = 0;\n this.sourceTranslation = 0;\n this.targetTranslation = 0;\n this.lockedOnNodeId = undefined;\n this.lockedOnNodeOffset = undefined;\n this.touchTime = 0;\n\n this.viewFunction = undefined;\n\n this.body.emitter.on(\"fit\", this.fit.bind(this));\n this.body.emitter.on(\"animationFinished\", () => {this.body.emitter.emit(\"_stopRendering\");});\n this.body.emitter.on(\"unlockNode\", this.releaseNode.bind(this));\n }\n\n /**\n *\n * @param {Object} [options={}]\n */\n setOptions(options = {}) {\n this.options = options;\n }\n\n\n /**\n * This function zooms out to fit all data on screen based on amount of nodes\n * @param {Object} [options={{nodes=Array}}]\n * @param {boolean} [initialZoom=false] | zoom based on fitted formula or range, true = fitted, default = false;\n */\n fit(options = {nodes:[]}, initialZoom = false) {\n let range;\n let zoomLevel;\n options = Object.assign({}, options);\n if (options.nodes === undefined || options.nodes.length === 0) {\n options.nodes = this.body.nodeIndices;\n }\n\n\n if (initialZoom === true) {\n // check if more than half of the nodes have a predefined position. If so, we use the range, not the approximation.\n let positionDefined = 0;\n for (let nodeId in this.body.nodes) {\n if (this.body.nodes.hasOwnProperty(nodeId)) {\n let node = this.body.nodes[nodeId];\n if (node.predefinedPosition === true) {\n positionDefined += 1;\n }\n }\n }\n if (positionDefined > 0.5 * this.body.nodeIndices.length) {\n this.fit(options,false);\n return;\n }\n\n range = NetworkUtil.getRange(this.body.nodes, options.nodes);\n\n let numberOfNodes = this.body.nodeIndices.length;\n zoomLevel = 12.662 / (numberOfNodes + 7.4147) + 0.0964822; // this is obtained from fitting a dataset from 5 points with scale levels that looked good.\n\n // correct for larger canvasses.\n let factor = Math.min(this.canvas.frame.canvas.clientWidth / 600, this.canvas.frame.canvas.clientHeight / 600);\n zoomLevel *= factor;\n }\n else {\n this.body.emitter.emit(\"_resizeNodes\");\n range = NetworkUtil.getRange(this.body.nodes, options.nodes);\n\n let xDistance = Math.abs(range.maxX - range.minX) * 1.1;\n let yDistance = Math.abs(range.maxY - range.minY) * 1.1;\n\n let xZoomLevel = this.canvas.frame.canvas.clientWidth / xDistance;\n let yZoomLevel = this.canvas.frame.canvas.clientHeight / yDistance;\n\n zoomLevel = (xZoomLevel <= yZoomLevel) ? xZoomLevel : yZoomLevel;\n }\n\n if (zoomLevel > 1.0) {\n zoomLevel = 1.0;\n }\n else if (zoomLevel === 0) {\n zoomLevel = 1.0;\n }\n\n let center = NetworkUtil.findCenter(range);\n let animationOptions = {position: center, scale: zoomLevel, animation: options.animation};\n this.moveTo(animationOptions);\n }\n \n // animation\n\n /**\n * Center a node in view.\n *\n * @param {number} nodeId\n * @param {number} [options]\n */\n focus(nodeId, options = {}) {\n if (this.body.nodes[nodeId] !== undefined) {\n let nodePosition = {x: this.body.nodes[nodeId].x, y: this.body.nodes[nodeId].y};\n options.position = nodePosition;\n options.lockedOnNode = nodeId;\n\n this.moveTo(options)\n }\n else {\n console.log(\"Node: \" + nodeId + \" cannot be found.\");\n }\n }\n\n /**\n *\n * @param {Object} options | options.offset = {x:number, y:number} // offset from the center in DOM pixels\n * | options.scale = number // scale to move to\n * | options.position = {x:number, y:number} // position to move to\n * | options.animation = {duration:number, easingFunction:String} || Boolean // position to move to\n */\n moveTo(options) {\n if (options === undefined) {\n options = {};\n return;\n }\n\n if (options.offset != null) {\n if (options.offset.x != null) {\n // Coerce and verify that x is valid.\n options.offset.x = +options.offset.x\n if (!Number.isFinite(options.offset.x)) {\n throw new TypeError('The option \"offset.x\" has to be a finite number.')\n }\n } else {\n options.offset.x = 0\n }\n\n if (options.offset.y != null) {\n // Coerce and verify that y is valid.\n options.offset.y = +options.offset.y\n if (!Number.isFinite(options.offset.y)) {\n throw new TypeError('The option \"offset.y\" has to be a finite number.')\n }\n } else {\n options.offset.x = 0\n }\n } else {\n options.offset = {\n x: 0,\n y: 0\n }\n }\n\n if (options.position != null) {\n if (options.position.x != null) {\n // Coerce and verify that x is valid.\n options.position.x = +options.position.x\n if (!Number.isFinite(options.position.x)) {\n throw new TypeError('The option \"position.x\" has to be a finite number.')\n }\n } else {\n options.position.x = 0\n }\n\n if (options.position.y != null) {\n // Coerce and verify that y is valid.\n options.position.y = +options.position.y\n if (!Number.isFinite(options.position.y)) {\n throw new TypeError('The option \"position.y\" has to be a finite number.')\n }\n } else {\n options.position.x = 0\n }\n } else {\n options.position = this.getViewPosition()\n }\n\n if (options.scale != null) {\n // Coerce and verify that the scale is valid.\n options.scale = +options.scale\n if (!(options.scale > 0)) {\n throw new TypeError('The option \"scale\" has to be a number greater than zero.')\n }\n } else {\n options.scale = this.body.view.scale\n }\n\n if (options.animation === undefined) {options.animation = {duration:0}; }\n if (options.animation === false ) {options.animation = {duration:0}; }\n if (options.animation === true ) {options.animation = {}; }\n if (options.animation.duration === undefined) {options.animation.duration = 1000; } // default duration\n if (options.animation.easingFunction === undefined) {options.animation.easingFunction = \"easeInOutQuad\"; } // default easing function\n\n this.animateView(options);\n }\n\n /**\n *\n * @param {Object} options | options.offset = {x:number, y:number} // offset from the center in DOM pixels\n * | options.time = number // animation time in milliseconds\n * | options.scale = number // scale to animate to\n * | options.position = {x:number, y:number} // position to animate to\n * | options.easingFunction = String // linear, easeInQuad, easeOutQuad, easeInOutQuad,\n * // easeInCubic, easeOutCubic, easeInOutCubic,\n * // easeInQuart, easeOutQuart, easeInOutQuart,\n * // easeInQuint, easeOutQuint, easeInOutQuint\n */\n animateView(options) {\n if (options === undefined) {\n return;\n }\n this.animationEasingFunction = options.animation.easingFunction;\n // release if something focussed on the node\n this.releaseNode();\n if (options.locked === true) {\n this.lockedOnNodeId = options.lockedOnNode;\n this.lockedOnNodeOffset = options.offset;\n }\n\n // forcefully complete the old animation if it was still running\n if (this.easingTime != 0) {\n this._transitionRedraw(true); // by setting easingtime to 1, we finish the animation.\n }\n\n this.sourceScale = this.body.view.scale;\n this.sourceTranslation = this.body.view.translation;\n this.targetScale = options.scale;\n\n // set the scale so the viewCenter is based on the correct zoom level. This is overridden in the transitionRedraw\n // but at least then we'll have the target transition\n this.body.view.scale = this.targetScale;\n let viewCenter = this.canvas.DOMtoCanvas({x: 0.5 * this.canvas.frame.canvas.clientWidth, y: 0.5 * this.canvas.frame.canvas.clientHeight});\n\n let distanceFromCenter = { // offset from view, distance view has to change by these x and y to center the node\n x: viewCenter.x - options.position.x,\n y: viewCenter.y - options.position.y\n };\n this.targetTranslation = {\n x: this.sourceTranslation.x + distanceFromCenter.x * this.targetScale + options.offset.x,\n y: this.sourceTranslation.y + distanceFromCenter.y * this.targetScale + options.offset.y\n };\n\n // if the time is set to 0, don't do an animation\n if (options.animation.duration === 0) {\n if (this.lockedOnNodeId != undefined) {\n this.viewFunction = this._lockedRedraw.bind(this);\n this.body.emitter.on(\"initRedraw\", this.viewFunction);\n }\n else {\n this.body.view.scale = this.targetScale;\n this.body.view.translation = this.targetTranslation;\n this.body.emitter.emit(\"_requestRedraw\");\n }\n }\n else {\n this.animationSpeed = 1 / (60 * options.animation.duration * 0.001) || 1 / 60; // 60 for 60 seconds, 0.001 for milli's\n this.animationEasingFunction = options.animation.easingFunction;\n\n\n this.viewFunction = this._transitionRedraw.bind(this);\n this.body.emitter.on(\"initRedraw\", this.viewFunction);\n this.body.emitter.emit(\"_startRendering\");\n }\n }\n\n /**\n * used to animate smoothly by hijacking the redraw function.\n * @private\n */\n _lockedRedraw() {\n let nodePosition = {x: this.body.nodes[this.lockedOnNodeId].x, y: this.body.nodes[this.lockedOnNodeId].y};\n let viewCenter = this.canvas.DOMtoCanvas({x: 0.5 * this.canvas.frame.canvas.clientWidth, y: 0.5 * this.canvas.frame.canvas.clientHeight});\n let distanceFromCenter = { // offset from view, distance view has to change by these x and y to center the node\n x: viewCenter.x - nodePosition.x,\n y: viewCenter.y - nodePosition.y\n };\n let sourceTranslation = this.body.view.translation;\n let targetTranslation = {\n x: sourceTranslation.x + distanceFromCenter.x * this.body.view.scale + this.lockedOnNodeOffset.x,\n y: sourceTranslation.y + distanceFromCenter.y * this.body.view.scale + this.lockedOnNodeOffset.y\n };\n\n this.body.view.translation = targetTranslation;\n }\n\n /**\n * Resets state of a locked on Node\n */\n releaseNode() {\n if (this.lockedOnNodeId !== undefined && this.viewFunction !== undefined) {\n this.body.emitter.off(\"initRedraw\", this.viewFunction);\n this.lockedOnNodeId = undefined;\n this.lockedOnNodeOffset = undefined;\n }\n }\n\n /**\n * @param {boolean} [finished=false]\n * @private\n */\n _transitionRedraw(finished = false) {\n this.easingTime += this.animationSpeed;\n this.easingTime = finished === true ? 1.0 : this.easingTime;\n\n let progress = util.easingFunctions[this.animationEasingFunction](this.easingTime);\n\n this.body.view.scale = this.sourceScale + (this.targetScale - this.sourceScale) * progress;\n this.body.view.translation = {\n x: this.sourceTranslation.x + (this.targetTranslation.x - this.sourceTranslation.x) * progress,\n y: this.sourceTranslation.y + (this.targetTranslation.y - this.sourceTranslation.y) * progress\n };\n\n // cleanup\n if (this.easingTime >= 1.0) {\n this.body.emitter.off(\"initRedraw\", this.viewFunction);\n this.easingTime = 0;\n if (this.lockedOnNodeId != undefined) {\n this.viewFunction = this._lockedRedraw.bind(this);\n this.body.emitter.on(\"initRedraw\", this.viewFunction);\n }\n this.body.emitter.emit(\"animationFinished\");\n }\n }\n\n\n /**\n *\n * @returns {number}\n */\n getScale() {\n return this.body.view.scale;\n }\n\n /**\n *\n * @returns {{x: number, y: number}}\n */\n getViewPosition() {\n return this.canvas.DOMtoCanvas({x: 0.5 * this.canvas.frame.canvas.clientWidth, y: 0.5 * this.canvas.frame.canvas.clientHeight});\n }\n\n\n}\n\nexport default View;\n","import './NavigationHandler.css';\n\nimport Hammer from '../../../module/hammer';\nimport hammerUtil from '../../../hammerUtil';\nimport keycharm from 'keycharm';\n\n/**\n * Navigation Handler\n */\nclass NavigationHandler {\n /**\n * @param {Object} body\n * @param {Canvas} canvas\n */\n constructor(body, canvas) {\n this.body = body;\n this.canvas = canvas;\n\n this.iconsCreated = false;\n this.navigationHammers = [];\n this.boundFunctions = {};\n this.touchTime = 0;\n this.activated = false;\n\n\n this.body.emitter.on(\"activate\", () => {this.activated = true; this.configureKeyboardBindings();});\n this.body.emitter.on(\"deactivate\", () => {this.activated = false; this.configureKeyboardBindings();});\n this.body.emitter.on(\"destroy\", () => {if (this.keycharm !== undefined) {this.keycharm.destroy();}});\n\n this.options = {}\n }\n\n /**\n *\n * @param {Object} options\n */\n setOptions(options) {\n if (options !== undefined) {\n this.options = options;\n this.create();\n }\n }\n\n /**\n * Creates or refreshes navigation and sets key bindings\n */\n create() {\n if (this.options.navigationButtons === true) {\n if (this.iconsCreated === false) {\n this.loadNavigationElements();\n }\n }\n else if (this.iconsCreated === true) {\n this.cleanNavigation();\n }\n\n this.configureKeyboardBindings();\n }\n\n /**\n * Cleans up previous navigation items\n */\n cleanNavigation() {\n // clean hammer bindings\n if (this.navigationHammers.length != 0) {\n for (var i = 0; i < this.navigationHammers.length; i++) {\n this.navigationHammers[i].destroy();\n }\n this.navigationHammers = [];\n }\n\n // clean up previous navigation items\n if (this.navigationDOM && this.navigationDOM['wrapper'] && this.navigationDOM['wrapper'].parentNode) {\n this.navigationDOM['wrapper'].parentNode.removeChild(this.navigationDOM['wrapper']);\n }\n\n this.iconsCreated = false;\n }\n\n /**\n * Creation of the navigation controls nodes. They are drawn over the rest of the nodes and are not affected by scale and translation\n * they have a triggerFunction which is called on click. If the position of the navigation controls is dependent\n * on this.frame.canvas.clientWidth or this.frame.canvas.clientHeight, we flag horizontalAlignLeft and verticalAlignTop false.\n * This means that the location will be corrected by the _relocateNavigation function on a size change of the canvas.\n *\n * @private\n */\n loadNavigationElements() {\n this.cleanNavigation();\n\n this.navigationDOM = {};\n var navigationDivs = ['up','down','left','right','zoomIn','zoomOut','zoomExtends'];\n var navigationDivActions = ['_moveUp','_moveDown','_moveLeft','_moveRight','_zoomIn','_zoomOut','_fit'];\n\n this.navigationDOM['wrapper'] = document.createElement('div');\n this.navigationDOM['wrapper'].className = 'vis-navigation';\n this.canvas.frame.appendChild(this.navigationDOM['wrapper']);\n\n for (var i = 0; i < navigationDivs.length; i++) {\n this.navigationDOM[navigationDivs[i]] = document.createElement('div');\n this.navigationDOM[navigationDivs[i]].className = 'vis-button vis-' + navigationDivs[i];\n this.navigationDOM['wrapper'].appendChild(this.navigationDOM[navigationDivs[i]]);\n\n var hammer = new Hammer(this.navigationDOM[navigationDivs[i]]);\n if (navigationDivActions[i] === \"_fit\") {\n hammerUtil.onTouch(hammer, this._fit.bind(this));\n }\n else {\n hammerUtil.onTouch(hammer, this.bindToRedraw.bind(this,navigationDivActions[i]));\n }\n\n this.navigationHammers.push(hammer);\n }\n\n // use a hammer for the release so we do not require the one used in the rest of the network\n // the one the rest uses can be overloaded by the manipulation system.\n var hammerFrame = new Hammer(this.canvas.frame);\n hammerUtil.onRelease(hammerFrame, () => {this._stopMovement();});\n this.navigationHammers.push(hammerFrame);\n\n this.iconsCreated = true;\n }\n\n /**\n *\n * @param {string} action\n */\n bindToRedraw(action) {\n if (this.boundFunctions[action] === undefined) {\n this.boundFunctions[action] = this[action].bind(this);\n this.body.emitter.on(\"initRedraw\", this.boundFunctions[action]);\n this.body.emitter.emit(\"_startRendering\");\n }\n }\n\n /**\n *\n * @param {string} action\n */\n unbindFromRedraw(action) {\n if (this.boundFunctions[action] !== undefined) {\n this.body.emitter.off(\"initRedraw\", this.boundFunctions[action]);\n this.body.emitter.emit(\"_stopRendering\");\n delete this.boundFunctions[action];\n }\n }\n\n /**\n * this stops all movement induced by the navigation buttons\n *\n * @private\n */\n _fit() {\n if (new Date().valueOf() - this.touchTime > 700) { // TODO: fix ugly hack to avoid hammer's double fireing of event (because we use release?)\n this.body.emitter.emit(\"fit\", {duration: 700});\n this.touchTime = new Date().valueOf();\n }\n }\n\n /**\n * this stops all movement induced by the navigation buttons\n *\n * @private\n */\n _stopMovement() {\n for (let boundAction in this.boundFunctions) {\n if (this.boundFunctions.hasOwnProperty(boundAction)) {\n this.body.emitter.off(\"initRedraw\", this.boundFunctions[boundAction]);\n this.body.emitter.emit(\"_stopRendering\");\n }\n }\n this.boundFunctions = {};\n }\n /**\n *\n * @private\n */\n _moveUp() {this.body.view.translation.y += this.options.keyboard.speed.y;}\n /**\n *\n * @private\n */\n _moveDown() {this.body.view.translation.y -= this.options.keyboard.speed.y;}\n /**\n *\n * @private\n */\n _moveLeft() {this.body.view.translation.x += this.options.keyboard.speed.x;}\n /**\n *\n * @private\n */\n _moveRight(){this.body.view.translation.x -= this.options.keyboard.speed.x;}\n /**\n *\n * @private\n */\n _zoomIn() {\n var scaleOld = this.body.view.scale;\n var scale = this.body.view.scale * (1 + this.options.keyboard.speed.zoom);\n var translation = this.body.view.translation;\n var scaleFrac = scale / scaleOld;\n var tx = (1 - scaleFrac) * this.canvas.canvasViewCenter.x + translation.x * scaleFrac;\n var ty = (1 - scaleFrac) * this.canvas.canvasViewCenter.y + translation.y * scaleFrac;\n\n this.body.view.scale = scale;\n this.body.view.translation = { x: tx, y: ty };\n this.body.emitter.emit('zoom', { direction: '+', scale: this.body.view.scale, pointer: null });\n\n }\n\n /**\n *\n * @private\n */\n _zoomOut() {\n var scaleOld = this.body.view.scale;\n var scale = this.body.view.scale / (1 + this.options.keyboard.speed.zoom);\n var translation = this.body.view.translation;\n var scaleFrac = scale / scaleOld;\n var tx = (1 - scaleFrac) * this.canvas.canvasViewCenter.x + translation.x * scaleFrac;\n var ty = (1 - scaleFrac) * this.canvas.canvasViewCenter.y + translation.y * scaleFrac;\n\n this.body.view.scale = scale;\n this.body.view.translation = { x: tx, y: ty };\n this.body.emitter.emit('zoom', { direction: '-', scale: this.body.view.scale, pointer: null });\n }\n\n\n /**\n * bind all keys using keycharm.\n */\n configureKeyboardBindings() {\n if (this.keycharm !== undefined) {\n this.keycharm.destroy();\n }\n\n if (this.options.keyboard.enabled === true) {\n if (this.options.keyboard.bindToWindow === true) {\n this.keycharm = keycharm({container: window, preventDefault: true});\n }\n else {\n this.keycharm = keycharm({container: this.canvas.frame, preventDefault: true});\n }\n\n this.keycharm.reset();\n\n if (this.activated === true) {\n this.keycharm.bind(\"up\", () => {this.bindToRedraw(\"_moveUp\") ;}, \"keydown\");\n this.keycharm.bind(\"down\", () => {this.bindToRedraw(\"_moveDown\") ;}, \"keydown\");\n this.keycharm.bind(\"left\", () => {this.bindToRedraw(\"_moveLeft\") ;}, \"keydown\");\n this.keycharm.bind(\"right\", () => {this.bindToRedraw(\"_moveRight\");}, \"keydown\");\n this.keycharm.bind(\"=\", () => {this.bindToRedraw(\"_zoomIn\") ;}, \"keydown\");\n this.keycharm.bind(\"num+\", () => {this.bindToRedraw(\"_zoomIn\") ;}, \"keydown\");\n this.keycharm.bind(\"num-\", () => {this.bindToRedraw(\"_zoomOut\") ;}, \"keydown\");\n this.keycharm.bind(\"-\", () => {this.bindToRedraw(\"_zoomOut\") ;}, \"keydown\");\n this.keycharm.bind(\"[\", () => {this.bindToRedraw(\"_zoomOut\") ;}, \"keydown\");\n this.keycharm.bind(\"]\", () => {this.bindToRedraw(\"_zoomIn\") ;}, \"keydown\");\n this.keycharm.bind(\"pageup\", () => {this.bindToRedraw(\"_zoomIn\") ;}, \"keydown\");\n this.keycharm.bind(\"pagedown\", () => {this.bindToRedraw(\"_zoomOut\") ;}, \"keydown\");\n\n this.keycharm.bind(\"up\", () => {this.unbindFromRedraw(\"_moveUp\") ;}, \"keyup\");\n this.keycharm.bind(\"down\", () => {this.unbindFromRedraw(\"_moveDown\") ;}, \"keyup\");\n this.keycharm.bind(\"left\", () => {this.unbindFromRedraw(\"_moveLeft\") ;}, \"keyup\");\n this.keycharm.bind(\"right\", () => {this.unbindFromRedraw(\"_moveRight\");}, \"keyup\");\n this.keycharm.bind(\"=\", () => {this.unbindFromRedraw(\"_zoomIn\") ;}, \"keyup\");\n this.keycharm.bind(\"num+\", () => {this.unbindFromRedraw(\"_zoomIn\") ;}, \"keyup\");\n this.keycharm.bind(\"num-\", () => {this.unbindFromRedraw(\"_zoomOut\") ;}, \"keyup\");\n this.keycharm.bind(\"-\", () => {this.unbindFromRedraw(\"_zoomOut\") ;}, \"keyup\");\n this.keycharm.bind(\"[\", () => {this.unbindFromRedraw(\"_zoomOut\") ;}, \"keyup\");\n this.keycharm.bind(\"]\", () => {this.unbindFromRedraw(\"_zoomIn\") ;}, \"keyup\");\n this.keycharm.bind(\"pageup\", () => {this.unbindFromRedraw(\"_zoomIn\") ;}, \"keyup\");\n this.keycharm.bind(\"pagedown\", () => {this.unbindFromRedraw(\"_zoomOut\") ;}, \"keyup\");\n }\n }\n }\n}\n\n\nexport default NavigationHandler;\n","import './Popup.css';\n\n/**\n * Popup is a class to create a popup window with some text\n */\nclass Popup {\n /**\n * @param {Element} container The container object.\n * @param {string} overflowMethod How the popup should act to overflowing ('flip' or 'cap')\n */\n constructor(container, overflowMethod) {\n this.container = container;\n this.overflowMethod = overflowMethod || 'cap';\n\n this.x = 0;\n this.y = 0;\n this.padding = 5;\n this.hidden = false;\n\n // create the frame\n this.frame = document.createElement('div');\n this.frame.className = 'vis-tooltip';\n this.container.appendChild(this.frame);\n }\n\n /**\n * @param {number} x Horizontal position of the popup window\n * @param {number} y Vertical position of the popup window\n */\n setPosition(x, y) {\n this.x = parseInt(x);\n this.y = parseInt(y);\n }\n\n /**\n * Set the content for the popup window. This can be HTML code or text.\n * @param {string | Element} content\n */\n setText(content) {\n if (content instanceof Element) {\n this.frame.innerHTML = '';\n this.frame.appendChild(content);\n }\n else {\n this.frame.innerHTML = content; // string containing text or HTML\n }\n }\n\n /**\n * Show the popup window\n * @param {boolean} [doShow] Show or hide the window\n */\n show(doShow) {\n if (doShow === undefined) {\n doShow = true;\n }\n\n if (doShow === true) {\n var height = this.frame.clientHeight;\n var width = this.frame.clientWidth;\n var maxHeight = this.frame.parentNode.clientHeight;\n var maxWidth = this.frame.parentNode.clientWidth;\n\n var left = 0, top = 0;\n\n if (this.overflowMethod == 'flip') {\n var isLeft = false, isTop = true; // Where around the position it's located\n\n if (this.y - height < this.padding) {\n isTop = false;\n }\n\n if (this.x + width > maxWidth - this.padding) {\n isLeft = true;\n }\n\n if (isLeft) {\n left = this.x - width;\n } else {\n left = this.x;\n }\n\n if (isTop) {\n top = this.y - height;\n } else {\n top = this.y;\n }\n } else {\n top = (this.y - height);\n if (top + height + this.padding > maxHeight) {\n top = maxHeight - height - this.padding;\n }\n if (top < this.padding) {\n top = this.padding;\n }\n\n left = this.x;\n if (left + width + this.padding > maxWidth) {\n left = maxWidth - width - this.padding;\n }\n if (left < this.padding) {\n left = this.padding;\n }\n }\n\n this.frame.style.left = left + \"px\";\n this.frame.style.top = top + \"px\";\n this.frame.style.visibility = \"visible\";\n this.hidden = false;\n }\n else {\n this.hide();\n }\n }\n\n /**\n * Hide the popup window\n */\n hide() {\n this.hidden = true;\n this.frame.style.left = \"0\";\n this.frame.style.top = \"0\";\n this.frame.style.visibility = \"hidden\";\n }\n\n /**\n * Remove the popup window\n */\n destroy() {\n this.frame.parentNode.removeChild(this.frame); // Remove element from DOM\n }\n}\n\nexport default Popup;\n","import util from 'vis-util';\nimport NavigationHandler from './components/NavigationHandler';\nimport Popup from './../../shared/Popup';\n\n\n/**\n * Handler for interactions\n */\nclass InteractionHandler {\n /**\n * @param {Object} body\n * @param {Canvas} canvas\n * @param {SelectionHandler} selectionHandler\n */\n constructor(body, canvas, selectionHandler) {\n this.body = body;\n this.canvas = canvas;\n this.selectionHandler = selectionHandler;\n this.navigationHandler = new NavigationHandler(body,canvas);\n\n // bind the events from hammer to functions in this object\n this.body.eventListeners.onTap = this.onTap.bind(this);\n this.body.eventListeners.onTouch = this.onTouch.bind(this);\n this.body.eventListeners.onDoubleTap = this.onDoubleTap.bind(this);\n this.body.eventListeners.onHold = this.onHold.bind(this);\n this.body.eventListeners.onDragStart = this.onDragStart.bind(this);\n this.body.eventListeners.onDrag = this.onDrag.bind(this);\n this.body.eventListeners.onDragEnd = this.onDragEnd.bind(this);\n this.body.eventListeners.onMouseWheel = this.onMouseWheel.bind(this);\n this.body.eventListeners.onPinch = this.onPinch.bind(this);\n this.body.eventListeners.onMouseMove = this.onMouseMove.bind(this);\n this.body.eventListeners.onRelease = this.onRelease.bind(this);\n this.body.eventListeners.onContext = this.onContext.bind(this);\n\n this.touchTime = 0;\n this.drag = {};\n this.pinch = {};\n this.popup = undefined;\n this.popupObj = undefined;\n this.popupTimer = undefined;\n\n this.body.functions.getPointer = this.getPointer.bind(this);\n\n this.options = {};\n this.defaultOptions = {\n dragNodes:true,\n dragView: true,\n hover: false,\n keyboard: {\n enabled: false,\n speed: {x: 10, y: 10, zoom: 0.02},\n bindToWindow: true\n },\n navigationButtons: false,\n tooltipDelay: 300,\n zoomView: true,\n zoomSpeed: 1\n };\n util.extend(this.options,this.defaultOptions);\n\n this.bindEventListeners()\n }\n\n /**\n * Binds event listeners\n */\n bindEventListeners() {\n this.body.emitter.on('destroy', () => {\n clearTimeout(this.popupTimer);\n delete this.body.functions.getPointer;\n })\n }\n\n /**\n *\n * @param {Object} options\n */\n setOptions(options) {\n if (options !== undefined) {\n // extend all but the values in fields\n let fields = ['hideEdgesOnDrag', 'hideEdgesOnZoom', 'hideNodesOnDrag','keyboard','multiselect','selectable','selectConnectedEdges'];\n util.selectiveNotDeepExtend(fields, this.options, options);\n\n // merge the keyboard options in.\n util.mergeOptions(this.options, options, 'keyboard');\n\n if (options.tooltip) {\n util.extend(this.options.tooltip, options.tooltip);\n if (options.tooltip.color) {\n this.options.tooltip.color = util.parseColor(options.tooltip.color);\n }\n }\n }\n\n this.navigationHandler.setOptions(this.options);\n }\n\n\n /**\n * Get the pointer location from a touch location\n * @param {{x: number, y: number}} touch\n * @return {{x: number, y: number}} pointer\n * @private\n */\n getPointer(touch) {\n return {\n x: touch.x - util.getAbsoluteLeft(this.canvas.frame.canvas),\n y: touch.y - util.getAbsoluteTop(this.canvas.frame.canvas)\n };\n }\n\n\n /**\n * On start of a touch gesture, store the pointer\n * @param {Event} event The event\n * @private\n */\n onTouch(event) {\n if (new Date().valueOf() - this.touchTime > 50) {\n this.drag.pointer = this.getPointer(event.center);\n this.drag.pinched = false;\n this.pinch.scale = this.body.view.scale;\n // to avoid double fireing of this event because we have two hammer instances. (on canvas and on frame)\n this.touchTime = new Date().valueOf();\n }\n }\n\n\n /**\n * handle tap/click event: select/unselect a node\n * @param {Event} event\n * @private\n */\n onTap(event) {\n let pointer = this.getPointer(event.center);\n let multiselect = this.selectionHandler.options.multiselect &&\n (event.changedPointers[0].ctrlKey || event.changedPointers[0].metaKey);\n\n this.checkSelectionChanges(pointer, event, multiselect);\n this.selectionHandler._generateClickEvent('click', event, pointer);\n }\n\n\n /**\n * handle doubletap event\n * @param {Event} event\n * @private\n */\n onDoubleTap(event) {\n let pointer = this.getPointer(event.center);\n this.selectionHandler._generateClickEvent('doubleClick', event, pointer);\n }\n\n\n /**\n * handle long tap event: multi select nodes\n * @param {Event} event\n * @private\n */\n onHold(event) {\n let pointer = this.getPointer(event.center);\n let multiselect = this.selectionHandler.options.multiselect;\n\n this.checkSelectionChanges(pointer, event, multiselect);\n\n this.selectionHandler._generateClickEvent('click', event, pointer);\n this.selectionHandler._generateClickEvent('hold', event, pointer);\n }\n\n\n /**\n * handle the release of the screen\n *\n * @param {Event} event\n * @private\n */\n onRelease(event) {\n if (new Date().valueOf() - this.touchTime > 10) {\n let pointer = this.getPointer(event.center);\n this.selectionHandler._generateClickEvent('release', event, pointer);\n // to avoid double fireing of this event because we have two hammer instances. (on canvas and on frame)\n this.touchTime = new Date().valueOf();\n }\n }\n\n /**\n *\n * @param {Event} event\n */\n onContext(event) {\n let pointer = this.getPointer({x:event.clientX, y:event.clientY});\n this.selectionHandler._generateClickEvent('oncontext', event, pointer);\n }\n\n\n /**\n * Select and deselect nodes depending current selection change.\n *\n * For changing nodes, select/deselect events are fired.\n *\n * NOTE: For a given edge, if one connecting node is deselected and with the same\n * click the other node is selected, no events for the edge will fire.\n * It was selected and it will remain selected.\n *\n * TODO: This is all SelectionHandler calls; the method should be moved to there.\n *\n * @param {{x: number, y: number}} pointer\n * @param {Event} event\n * @param {boolean} [add=false]\n */\n checkSelectionChanges(pointer, event, add = false) {\n let previousSelection = this.selectionHandler.getSelection();\n let selected = false;\n if (add === true) {\n selected = this.selectionHandler.selectAdditionalOnPoint(pointer);\n }\n else {\n selected = this.selectionHandler.selectOnPoint(pointer);\n }\n let currentSelection = this.selectionHandler.getSelection();\n\n // See NOTE in method comment for the reason to do it like this\n let deselectedItems = this._determineDifference(previousSelection, currentSelection);\n let selectedItems = this._determineDifference(currentSelection , previousSelection);\n\n if (deselectedItems.edges.length > 0) {\n this.selectionHandler._generateClickEvent('deselectEdge', event, pointer, previousSelection);\n selected = true;\n }\n\n if (deselectedItems.nodes.length > 0) {\n this.selectionHandler._generateClickEvent('deselectNode', event, pointer, previousSelection);\n selected = true;\n }\n\n if (selectedItems.nodes.length > 0) {\n this.selectionHandler._generateClickEvent('selectNode', event, pointer);\n selected = true;\n }\n\n if (selectedItems.edges.length > 0) {\n this.selectionHandler._generateClickEvent('selectEdge', event, pointer);\n selected = true;\n }\n\n // fire the select event if anything has been selected or deselected\n if (selected === true) { // select or unselect\n this.selectionHandler._generateClickEvent('select', event, pointer);\n }\n }\n\n\n /**\n * Remove all node and edge id's from the first set that are present in the second one.\n *\n * @param {{nodes: Array., edges: Array.}} firstSet\n * @param {{nodes: Array., edges: Array.}} secondSet\n * @returns {{nodes: Array., edges: Array.}}\n * @private\n */\n _determineDifference(firstSet, secondSet) {\n let arrayDiff = function(firstArr, secondArr) {\n let result = [];\n\n for (let i = 0; i < firstArr.length; i++) {\n let value = firstArr[i];\n if (secondArr.indexOf(value) === -1) {\n result.push(value);\n }\n }\n\n return result;\n };\n\n return {\n nodes: arrayDiff(firstSet.nodes, secondSet.nodes),\n edges: arrayDiff(firstSet.edges, secondSet.edges)\n };\n }\n\n\n /**\n * This function is called by onDragStart.\n * It is separated out because we can then overload it for the datamanipulation system.\n *\n * @param {Event} event\n * @private\n */\n onDragStart(event) {\n //in case the touch event was triggered on an external div, do the initial touch now.\n if (this.drag.pointer === undefined) {\n this.onTouch(event);\n }\n\n // note: drag.pointer is set in onTouch to get the initial touch location\n let node = this.selectionHandler.getNodeAt(this.drag.pointer);\n\n this.drag.dragging = true;\n this.drag.selection = [];\n this.drag.translation = util.extend({},this.body.view.translation); // copy the object\n this.drag.nodeId = undefined;\n\n if (node !== undefined && this.options.dragNodes === true) {\n this.drag.nodeId = node.id;\n // select the clicked node if not yet selected\n if (node.isSelected() === false) {\n this.selectionHandler.unselectAll();\n this.selectionHandler.selectObject(node);\n }\n\n // after select to contain the node\n this.selectionHandler._generateClickEvent('dragStart', event, this.drag.pointer);\n\n let selection = this.selectionHandler.selectionObj.nodes;\n // create an array with the selected nodes and their original location and status\n for (let nodeId in selection) {\n if (selection.hasOwnProperty(nodeId)) {\n let object = selection[nodeId];\n let s = {\n id: object.id,\n node: object,\n\n // store original x, y, xFixed and yFixed, make the node temporarily Fixed\n x: object.x,\n y: object.y,\n xFixed: object.options.fixed.x,\n yFixed: object.options.fixed.y\n };\n\n object.options.fixed.x = true;\n object.options.fixed.y = true;\n\n this.drag.selection.push(s);\n }\n }\n }\n else {\n // fallback if no node is selected and thus the view is dragged.\n this.selectionHandler._generateClickEvent('dragStart', event, this.drag.pointer, undefined, true);\n }\n }\n\n\n /**\n * handle drag event\n * @param {Event} event\n * @private\n */\n onDrag(event) {\n if (this.drag.pinched === true) {\n return;\n }\n\n // remove the focus on node if it is focussed on by the focusOnNode\n this.body.emitter.emit('unlockNode');\n\n let pointer = this.getPointer(event.center);\n\n let selection = this.drag.selection;\n if (selection && selection.length && this.options.dragNodes === true) {\n this.selectionHandler._generateClickEvent('dragging', event, pointer);\n\n // calculate delta's and new location\n let deltaX = pointer.x - this.drag.pointer.x;\n let deltaY = pointer.y - this.drag.pointer.y;\n\n // update position of all selected nodes\n selection.forEach((selection) => {\n let node = selection.node;\n // only move the node if it was not fixed initially\n if (selection.xFixed === false) {\n node.x = this.canvas._XconvertDOMtoCanvas(this.canvas._XconvertCanvasToDOM(selection.x) + deltaX);\n }\n // only move the node if it was not fixed initially\n if (selection.yFixed === false) {\n node.y = this.canvas._YconvertDOMtoCanvas(this.canvas._YconvertCanvasToDOM(selection.y) + deltaY);\n }\n });\n\n // start the simulation of the physics\n this.body.emitter.emit('startSimulation');\n }\n else {\n // move the network\n if (this.options.dragView === true) {\n this.selectionHandler._generateClickEvent('dragging', event, pointer, undefined, true);\n\n // if the drag was not started properly because the click started outside the network div, start it now.\n if (this.drag.pointer === undefined) {\n this.onDragStart(event);\n return;\n }\n let diffX = pointer.x - this.drag.pointer.x;\n let diffY = pointer.y - this.drag.pointer.y;\n\n this.body.view.translation = {x:this.drag.translation.x + diffX, y:this.drag.translation.y + diffY};\n this.body.emitter.emit('_requestRedraw');\n }\n }\n }\n\n\n /**\n * handle drag start event\n * @param {Event} event\n * @private\n */\n onDragEnd(event) {\n this.drag.dragging = false;\n let selection = this.drag.selection;\n if (selection && selection.length) {\n selection.forEach(function (s) {\n // restore original xFixed and yFixed\n s.node.options.fixed.x = s.xFixed;\n s.node.options.fixed.y = s.yFixed;\n });\n this.selectionHandler._generateClickEvent('dragEnd', event, this.getPointer(event.center));\n this.body.emitter.emit('startSimulation');\n }\n else {\n this.selectionHandler._generateClickEvent('dragEnd', event, this.getPointer(event.center), undefined, true);\n this.body.emitter.emit('_requestRedraw');\n }\n }\n\n\n\n /**\n * Handle pinch event\n * @param {Event} event The event\n * @private\n */\n onPinch(event) {\n let pointer = this.getPointer(event.center);\n\n this.drag.pinched = true;\n if (this.pinch['scale'] === undefined) {\n this.pinch.scale = 1;\n }\n\n // TODO: enabled moving while pinching?\n let scale = this.pinch.scale * event.scale;\n this.zoom(scale, pointer)\n }\n\n\n /**\n * Zoom the network in or out\n * @param {number} scale a number around 1, and between 0.01 and 10\n * @param {{x: number, y: number}} pointer Position on screen\n * @private\n */\n zoom(scale, pointer) {\n if (this.options.zoomView === true) {\n let scaleOld = this.body.view.scale;\n if (scale < 0.00001) {\n scale = 0.00001;\n }\n if (scale > 10) {\n scale = 10;\n }\n\n let preScaleDragPointer = undefined;\n if (this.drag !== undefined) {\n if (this.drag.dragging === true) {\n preScaleDragPointer = this.canvas.DOMtoCanvas(this.drag.pointer);\n }\n }\n // + this.canvas.frame.canvas.clientHeight / 2\n let translation = this.body.view.translation;\n\n let scaleFrac = scale / scaleOld;\n let tx = (1 - scaleFrac) * pointer.x + translation.x * scaleFrac;\n let ty = (1 - scaleFrac) * pointer.y + translation.y * scaleFrac;\n\n this.body.view.scale = scale;\n this.body.view.translation = {x:tx, y:ty};\n\n if (preScaleDragPointer != undefined) {\n let postScaleDragPointer = this.canvas.canvasToDOM(preScaleDragPointer);\n this.drag.pointer.x = postScaleDragPointer.x;\n this.drag.pointer.y = postScaleDragPointer.y;\n }\n\n this.body.emitter.emit('_requestRedraw');\n\n if (scaleOld < scale) {\n this.body.emitter.emit('zoom', {direction: '+', scale: this.body.view.scale, pointer: pointer});\n }\n else {\n this.body.emitter.emit('zoom', {direction: '-', scale: this.body.view.scale, pointer: pointer});\n }\n }\n }\n\n\n /**\n * Event handler for mouse wheel event, used to zoom the timeline\n * See http://adomas.org/javascript-mouse-wheel/\n * https://github.com/EightMedia/hammer.js/issues/256\n * @param {MouseEvent} event\n * @private\n */\n onMouseWheel(event) {\n if (this.options.zoomView === true) {\n // retrieve delta\n let delta = 0;\n if (event.wheelDelta) { /* IE/Opera. */\n delta = event.wheelDelta / 120;\n }\n else if (event.detail) { /* Mozilla case. */\n // In Mozilla, sign of delta is different than in IE.\n // Also, delta is multiple of 3.\n delta = -event.detail / 3;\n }\n\n // If delta is nonzero, handle it.\n // Basically, delta is now positive if wheel was scrolled up,\n // and negative, if wheel was scrolled down.\n if (delta !== 0) {\n\n // calculate the new scale\n let scale = this.body.view.scale;\n let zoom = delta * (this.options.zoomSpeed / 10);\n if (delta < 0) {\n zoom = zoom / (1 - zoom);\n }\n scale *= (1 + zoom);\n\n // calculate the pointer location\n let pointer = this.getPointer({x: event.clientX, y: event.clientY});\n\n // apply the new scale\n this.zoom(scale, pointer);\n }\n\n // Prevent default actions caused by mouse wheel.\n event.preventDefault();\n }\n }\n\n\n /**\n * Mouse move handler for checking whether the title moves over a node with a title.\n * @param {Event} event\n * @private\n */\n onMouseMove(event) {\n let pointer = this.getPointer({x:event.clientX, y:event.clientY});\n let popupVisible = false;\n\n // check if the previously selected node is still selected\n if (this.popup !== undefined) {\n if (this.popup.hidden === false) {\n this._checkHidePopup(pointer);\n }\n\n // if the popup was not hidden above\n if (this.popup.hidden === false) {\n popupVisible = true;\n this.popup.setPosition(pointer.x + 3, pointer.y - 5);\n this.popup.show();\n }\n }\n\n // if we bind the keyboard to the div, we have to highlight it to use it. This highlights it on mouse over.\n if (this.options.keyboard.bindToWindow === false && this.options.keyboard.enabled === true) {\n this.canvas.frame.focus();\n }\n\n // start a timeout that will check if the mouse is positioned above an element\n if (popupVisible === false) {\n if (this.popupTimer !== undefined) {\n clearInterval(this.popupTimer); // stop any running calculationTimer\n this.popupTimer = undefined;\n }\n if (!this.drag.dragging) {\n this.popupTimer = setTimeout(() => this._checkShowPopup(pointer), this.options.tooltipDelay);\n }\n }\n\n // adding hover highlights\n if (this.options.hover === true) {\n this.selectionHandler.hoverObject(event, pointer);\n }\n }\n\n\n\n /**\n * Check if there is an element on the given position in the network\n * (a node or edge). If so, and if this element has a title,\n * show a popup window with its title.\n *\n * @param {{x:number, y:number}} pointer\n * @private\n */\n _checkShowPopup(pointer) {\n let x = this.canvas._XconvertDOMtoCanvas(pointer.x);\n let y = this.canvas._YconvertDOMtoCanvas(pointer.y);\n let pointerObj = {\n left: x,\n top: y,\n right: x,\n bottom: y\n };\n\n let previousPopupObjId = this.popupObj === undefined ? undefined : this.popupObj.id;\n let nodeUnderCursor = false;\n let popupType = 'node';\n\n // check if a node is under the cursor.\n if (this.popupObj === undefined) {\n // search the nodes for overlap, select the top one in case of multiple nodes\n let nodeIndices = this.body.nodeIndices;\n let nodes = this.body.nodes;\n let node;\n let overlappingNodes = [];\n for (let i = 0; i < nodeIndices.length; i++) {\n node = nodes[nodeIndices[i]];\n if (node.isOverlappingWith(pointerObj) === true) {\n nodeUnderCursor = true;\n if (node.getTitle() !== undefined) {\n overlappingNodes.push(nodeIndices[i]);\n }\n }\n }\n\n if (overlappingNodes.length > 0) {\n // if there are overlapping nodes, select the last one, this is the one which is drawn on top of the others\n this.popupObj = nodes[overlappingNodes[overlappingNodes.length - 1]];\n // if you hover over a node, the title of the edge is not supposed to be shown.\n nodeUnderCursor = true;\n }\n }\n\n if (this.popupObj === undefined && nodeUnderCursor === false) {\n // search the edges for overlap\n let edgeIndices = this.body.edgeIndices;\n let edges = this.body.edges;\n let edge;\n let overlappingEdges = [];\n for (let i = 0; i < edgeIndices.length; i++) {\n edge = edges[edgeIndices[i]];\n if (edge.isOverlappingWith(pointerObj) === true) {\n if (edge.connected === true && edge.getTitle() !== undefined) {\n overlappingEdges.push(edgeIndices[i]);\n }\n }\n }\n\n if (overlappingEdges.length > 0) {\n this.popupObj = edges[overlappingEdges[overlappingEdges.length - 1]];\n popupType = 'edge';\n }\n }\n\n if (this.popupObj !== undefined) {\n // show popup message window\n if (this.popupObj.id !== previousPopupObjId) {\n if (this.popup === undefined) {\n this.popup = new Popup(this.canvas.frame);\n }\n\n this.popup.popupTargetType = popupType;\n this.popup.popupTargetId = this.popupObj.id;\n\n // adjust a small offset such that the mouse cursor is located in the\n // bottom left location of the popup, and you can easily move over the\n // popup area\n this.popup.setPosition(pointer.x + 3, pointer.y - 5);\n this.popup.setText(this.popupObj.getTitle());\n this.popup.show();\n this.body.emitter.emit('showPopup',this.popupObj.id);\n }\n }\n else {\n if (this.popup !== undefined) {\n this.popup.hide();\n this.body.emitter.emit('hidePopup');\n }\n }\n }\n\n\n /**\n * Check if the popup must be hidden, which is the case when the mouse is no\n * longer hovering on the object\n * @param {{x:number, y:number}} pointer\n * @private\n */\n _checkHidePopup(pointer) {\n let pointerObj = this.selectionHandler._pointerToPositionObject(pointer);\n\n let stillOnObj = false;\n if (this.popup.popupTargetType === 'node') {\n if (this.body.nodes[this.popup.popupTargetId] !== undefined) {\n stillOnObj = this.body.nodes[this.popup.popupTargetId].isOverlappingWith(pointerObj);\n\n // if the mouse is still one the node, we have to check if it is not also on one that is drawn on top of it.\n // we initially only check stillOnObj because this is much faster.\n if (stillOnObj === true) {\n let overNode = this.selectionHandler.getNodeAt(pointer);\n stillOnObj = overNode === undefined ? false : overNode.id === this.popup.popupTargetId;\n }\n }\n }\n else {\n if (this.selectionHandler.getNodeAt(pointer) === undefined) {\n if (this.body.edges[this.popup.popupTargetId] !== undefined) {\n stillOnObj = this.body.edges[this.popup.popupTargetId].isOverlappingWith(pointerObj);\n }\n }\n }\n\n\n if (stillOnObj === false) {\n this.popupObj = undefined;\n this.popup.hide();\n this.body.emitter.emit('hidePopup');\n }\n }\n}\n\nexport default InteractionHandler;\n","import Node from './components/Node';\nimport Edge from './components/Edge';\n\nimport util from 'vis-util';\n\n/**\n * The handler for selections\n */\nclass SelectionHandler {\n /**\n * @param {Object} body\n * @param {Canvas} canvas\n */\n constructor(body, canvas) {\n this.body = body;\n this.canvas = canvas;\n this.selectionObj = { nodes: [], edges: [] };\n this.hoverObj = { nodes: {}, edges: {} };\n\n this.options = {};\n this.defaultOptions = {\n multiselect: false,\n selectable: true,\n selectConnectedEdges: true,\n hoverConnectedEdges: true\n };\n util.extend(this.options, this.defaultOptions);\n\n this.body.emitter.on(\"_dataChanged\", () => {\n this.updateSelection()\n });\n }\n\n\n /**\n *\n * @param {Object} [options]\n */\n setOptions(options) {\n if (options !== undefined) {\n let fields = ['multiselect', 'hoverConnectedEdges', 'selectable', 'selectConnectedEdges'];\n util.selectiveDeepExtend(fields, this.options, options);\n }\n }\n\n\n /**\n * handles the selection part of the tap;\n *\n * @param {{x: number, y: number}} pointer\n * @returns {boolean}\n */\n selectOnPoint(pointer) {\n let selected = false;\n if (this.options.selectable === true) {\n let obj = this.getNodeAt(pointer) || this.getEdgeAt(pointer);\n\n // unselect after getting the objects in order to restore width and height.\n this.unselectAll();\n\n if (obj !== undefined) {\n selected = this.selectObject(obj);\n }\n this.body.emitter.emit(\"_requestRedraw\");\n }\n return selected;\n }\n\n /**\n *\n * @param {{x: number, y: number}} pointer\n * @returns {boolean}\n */\n selectAdditionalOnPoint(pointer) {\n let selectionChanged = false;\n if (this.options.selectable === true) {\n let obj = this.getNodeAt(pointer) || this.getEdgeAt(pointer);\n\n if (obj !== undefined) {\n selectionChanged = true;\n if (obj.isSelected() === true) {\n this.deselectObject(obj);\n }\n else {\n this.selectObject(obj);\n }\n\n this.body.emitter.emit(\"_requestRedraw\");\n }\n }\n return selectionChanged;\n }\n\n\n /**\n * Create an object containing the standard fields for an event.\n *\n * @param {Event} event\n * @param {{x: number, y: number}} pointer Object with the x and y screen coordinates of the mouse\n * @returns {{}}\n * @private\n */\n _initBaseEvent(event, pointer) {\n let properties = {};\n\n properties['pointer'] = {\n DOM: { x: pointer.x, y: pointer.y },\n canvas: this.canvas.DOMtoCanvas(pointer)\n };\n properties['event'] = event;\n\n return properties;\n }\n\n\n /**\n * Generate an event which the user can catch.\n *\n * This adds some extra data to the event with respect to cursor position and\n * selected nodes and edges.\n *\n * @param {string} eventType Name of event to send\n * @param {Event} event\n * @param {{x: number, y: number}} pointer Object with the x and y screen coordinates of the mouse\n * @param {Object|undefined} oldSelection If present, selection state before event occured\n * @param {boolean|undefined} [emptySelection=false] Indicate if selection data should be passed\n */\n _generateClickEvent(eventType, event, pointer, oldSelection, emptySelection = false) {\n let properties = this._initBaseEvent(event, pointer);\n\n if (emptySelection === true) {\n properties.nodes = [];\n properties.edges = [];\n }\n else {\n let tmp = this.getSelection();\n properties.nodes = tmp.nodes;\n properties.edges = tmp.edges;\n }\n\n if (oldSelection !== undefined) {\n properties['previousSelection'] = oldSelection;\n }\n\n if (eventType == 'click') {\n // For the time being, restrict this functionality to\n // just the click event.\n properties.items = this.getClickedItems(pointer);\n }\n\n if (event.controlEdge !== undefined) {\n properties.controlEdge = event.controlEdge;\n }\n\n this.body.emitter.emit(eventType, properties);\n }\n\n /**\n *\n * @param {Object} obj\n * @param {boolean} [highlightEdges=this.options.selectConnectedEdges]\n * @returns {boolean}\n */\n selectObject(obj, highlightEdges = this.options.selectConnectedEdges) {\n if (obj !== undefined) {\n if (obj instanceof Node) {\n if (highlightEdges === true) {\n this._selectConnectedEdges(obj);\n }\n }\n obj.select();\n this._addToSelection(obj);\n return true;\n }\n return false;\n }\n\n /**\n *\n * @param {Object} obj\n */\n deselectObject(obj) {\n if (obj.isSelected() === true) {\n obj.selected = false;\n this._removeFromSelection(obj);\n }\n }\n\n\n\n /**\n * retrieve all nodes overlapping with given object\n * @param {Object} object An object with parameters left, top, right, bottom\n * @return {number[]} An array with id's of the overlapping nodes\n * @private\n */\n _getAllNodesOverlappingWith(object) {\n let overlappingNodes = [];\n let nodes = this.body.nodes;\n for (let i = 0; i < this.body.nodeIndices.length; i++) {\n let nodeId = this.body.nodeIndices[i];\n if (nodes[nodeId].isOverlappingWith(object)) {\n overlappingNodes.push(nodeId);\n }\n }\n return overlappingNodes;\n }\n\n\n /**\n * Return a position object in canvasspace from a single point in screenspace\n *\n * @param {{x: number, y: number}} pointer\n * @returns {{left: number, top: number, right: number, bottom: number}}\n * @private\n */\n _pointerToPositionObject(pointer) {\n let canvasPos = this.canvas.DOMtoCanvas(pointer);\n return {\n left: canvasPos.x - 1,\n top: canvasPos.y + 1,\n right: canvasPos.x + 1,\n bottom: canvasPos.y - 1\n };\n }\n\n\n /**\n * Get the top node at the passed point (like a click)\n *\n * @param {{x: number, y: number}} pointer\n * @param {boolean} [returnNode=true]\n * @return {Node | undefined} node\n */\n getNodeAt(pointer, returnNode = true) {\n // we first check if this is an navigation controls element\n let positionObject = this._pointerToPositionObject(pointer);\n let overlappingNodes = this._getAllNodesOverlappingWith(positionObject);\n // if there are overlapping nodes, select the last one, this is the\n // one which is drawn on top of the others\n if (overlappingNodes.length > 0) {\n if (returnNode === true) {\n return this.body.nodes[overlappingNodes[overlappingNodes.length - 1]];\n }\n else {\n return overlappingNodes[overlappingNodes.length - 1];\n }\n }\n else {\n return undefined;\n }\n }\n\n\n /**\n * retrieve all edges overlapping with given object, selector is around center\n * @param {Object} object An object with parameters left, top, right, bottom\n * @param {number[]} overlappingEdges An array with id's of the overlapping nodes\n * @private\n */\n _getEdgesOverlappingWith(object, overlappingEdges) {\n let edges = this.body.edges;\n for (let i = 0; i < this.body.edgeIndices.length; i++) {\n let edgeId = this.body.edgeIndices[i];\n if (edges[edgeId].isOverlappingWith(object)) {\n overlappingEdges.push(edgeId);\n }\n }\n }\n\n\n /**\n * retrieve all nodes overlapping with given object\n * @param {Object} object An object with parameters left, top, right, bottom\n * @return {number[]} An array with id's of the overlapping nodes\n * @private\n */\n _getAllEdgesOverlappingWith(object) {\n let overlappingEdges = [];\n this._getEdgesOverlappingWith(object, overlappingEdges);\n return overlappingEdges;\n }\n\n\n /**\n * Get the edges nearest to the passed point (like a click)\n *\n * @param {{x: number, y: number}} pointer\n * @param {boolean} [returnEdge=true]\n * @return {Edge | undefined} node\n */\n getEdgeAt(pointer, returnEdge = true) {\n // Iterate over edges, pick closest within 10\n var canvasPos = this.canvas.DOMtoCanvas(pointer);\n var mindist = 10;\n var overlappingEdge = null;\n var edges = this.body.edges;\n for (var i = 0; i < this.body.edgeIndices.length; i++) {\n var edgeId = this.body.edgeIndices[i];\n var edge = edges[edgeId];\n if (edge.connected) {\n var xFrom = edge.from.x;\n var yFrom = edge.from.y;\n var xTo = edge.to.x;\n var yTo = edge.to.y;\n var dist = edge.edgeType.getDistanceToEdge(xFrom, yFrom, xTo, yTo, canvasPos.x, canvasPos.y);\n if (dist < mindist) {\n overlappingEdge = edgeId;\n mindist = dist;\n }\n }\n }\n if (overlappingEdge !== null) {\n if (returnEdge === true) {\n return this.body.edges[overlappingEdge];\n }\n else {\n return overlappingEdge;\n }\n }\n else {\n return undefined;\n }\n }\n\n\n /**\n * Add object to the selection array.\n *\n * @param {Object} obj\n * @private\n */\n _addToSelection(obj) {\n if (obj instanceof Node) {\n this.selectionObj.nodes[obj.id] = obj;\n }\n else {\n this.selectionObj.edges[obj.id] = obj;\n }\n }\n\n /**\n * Add object to the selection array.\n *\n * @param {Object} obj\n * @private\n */\n _addToHover(obj) {\n if (obj instanceof Node) {\n this.hoverObj.nodes[obj.id] = obj;\n }\n else {\n this.hoverObj.edges[obj.id] = obj;\n }\n }\n\n\n /**\n * Remove a single option from selection.\n *\n * @param {Object} obj\n * @private\n */\n _removeFromSelection(obj) {\n if (obj instanceof Node) {\n delete this.selectionObj.nodes[obj.id];\n this._unselectConnectedEdges(obj);\n }\n else {\n delete this.selectionObj.edges[obj.id];\n }\n }\n\n /**\n * Unselect all. The selectionObj is useful for this.\n */\n unselectAll() {\n for (let nodeId in this.selectionObj.nodes) {\n if (this.selectionObj.nodes.hasOwnProperty(nodeId)) {\n this.selectionObj.nodes[nodeId].unselect();\n }\n }\n for (let edgeId in this.selectionObj.edges) {\n if (this.selectionObj.edges.hasOwnProperty(edgeId)) {\n this.selectionObj.edges[edgeId].unselect();\n }\n }\n\n this.selectionObj = { nodes: {}, edges: {} };\n }\n\n\n /**\n * return the number of selected nodes\n *\n * @returns {number}\n * @private\n */\n _getSelectedNodeCount() {\n let count = 0;\n for (let nodeId in this.selectionObj.nodes) {\n if (this.selectionObj.nodes.hasOwnProperty(nodeId)) {\n count += 1;\n }\n }\n return count;\n }\n\n /**\n * return the selected node\n *\n * @returns {number}\n * @private\n */\n _getSelectedNode() {\n for (let nodeId in this.selectionObj.nodes) {\n if (this.selectionObj.nodes.hasOwnProperty(nodeId)) {\n return this.selectionObj.nodes[nodeId];\n }\n }\n return undefined;\n }\n\n /**\n * return the selected edge\n *\n * @returns {number}\n * @private\n */\n _getSelectedEdge() {\n for (let edgeId in this.selectionObj.edges) {\n if (this.selectionObj.edges.hasOwnProperty(edgeId)) {\n return this.selectionObj.edges[edgeId];\n }\n }\n return undefined;\n }\n\n\n /**\n * return the number of selected edges\n *\n * @returns {number}\n * @private\n */\n _getSelectedEdgeCount() {\n let count = 0;\n for (let edgeId in this.selectionObj.edges) {\n if (this.selectionObj.edges.hasOwnProperty(edgeId)) {\n count += 1;\n }\n }\n return count;\n }\n\n\n /**\n * return the number of selected objects.\n *\n * @returns {number}\n * @private\n */\n _getSelectedObjectCount() {\n let count = 0;\n for (let nodeId in this.selectionObj.nodes) {\n if (this.selectionObj.nodes.hasOwnProperty(nodeId)) {\n count += 1;\n }\n }\n for (let edgeId in this.selectionObj.edges) {\n if (this.selectionObj.edges.hasOwnProperty(edgeId)) {\n count += 1;\n }\n }\n return count;\n }\n\n /**\n * Check if anything is selected\n *\n * @returns {boolean}\n * @private\n */\n _selectionIsEmpty() {\n for (let nodeId in this.selectionObj.nodes) {\n if (this.selectionObj.nodes.hasOwnProperty(nodeId)) {\n return false;\n }\n }\n for (let edgeId in this.selectionObj.edges) {\n if (this.selectionObj.edges.hasOwnProperty(edgeId)) {\n return false;\n }\n }\n return true;\n }\n\n\n /**\n * check if one of the selected nodes is a cluster.\n *\n * @returns {boolean}\n * @private\n */\n _clusterInSelection() {\n for (let nodeId in this.selectionObj.nodes) {\n if (this.selectionObj.nodes.hasOwnProperty(nodeId)) {\n if (this.selectionObj.nodes[nodeId].clusterSize > 1) {\n return true;\n }\n }\n }\n return false;\n }\n\n /**\n * select the edges connected to the node that is being selected\n *\n * @param {Node} node\n * @private\n */\n _selectConnectedEdges(node) {\n for (let i = 0; i < node.edges.length; i++) {\n let edge = node.edges[i];\n edge.select();\n this._addToSelection(edge);\n }\n }\n\n /**\n * select the edges connected to the node that is being selected\n *\n * @param {Node} node\n * @private\n */\n _hoverConnectedEdges(node) {\n for (let i = 0; i < node.edges.length; i++) {\n let edge = node.edges[i];\n edge.hover = true;\n this._addToHover(edge);\n }\n }\n\n\n /**\n * unselect the edges connected to the node that is being selected\n *\n * @param {Node} node\n * @private\n */\n _unselectConnectedEdges(node) {\n for (let i = 0; i < node.edges.length; i++) {\n let edge = node.edges[i];\n edge.unselect();\n this._removeFromSelection(edge);\n }\n }\n\n\n /**\n * Remove the highlight from a node or edge, in response to mouse movement\n *\n * @param {Event} event\n * @param {{x: number, y: number}} pointer object with the x and y screen coordinates of the mouse\n * @param {Node|vis.Edge} object\n * @private\n */\n emitBlurEvent(event, pointer, object) {\n let properties = this._initBaseEvent(event, pointer);\n\n if (object.hover === true) {\n object.hover = false;\n if (object instanceof Node) {\n properties.node = object.id;\n this.body.emitter.emit(\"blurNode\", properties);\n }\n else {\n properties.edge = object.id;\n this.body.emitter.emit(\"blurEdge\", properties);\n }\n }\n }\n\n\n /**\n * Create the highlight for a node or edge, in response to mouse movement\n *\n * @param {Event} event\n * @param {{x: number, y: number}} pointer object with the x and y screen coordinates of the mouse\n * @param {Node|vis.Edge} object\n * @returns {boolean} hoverChanged\n * @private\n */\n emitHoverEvent(event, pointer, object) {\n let properties = this._initBaseEvent(event, pointer);\n let hoverChanged = false;\n\n if (object.hover === false) {\n object.hover = true;\n this._addToHover(object);\n hoverChanged = true;\n if (object instanceof Node) {\n properties.node = object.id;\n this.body.emitter.emit(\"hoverNode\", properties);\n }\n else {\n properties.edge = object.id;\n this.body.emitter.emit(\"hoverEdge\", properties);\n }\n }\n\n return hoverChanged;\n }\n\n\n /**\n * Perform actions in response to a mouse movement.\n *\n * @param {Event} event\n * @param {{x: number, y: number}} pointer | object with the x and y screen coordinates of the mouse\n */\n hoverObject(event, pointer) {\n let object = this.getNodeAt(pointer);\n if (object === undefined) {\n object = this.getEdgeAt(pointer);\n }\n\n let hoverChanged = false;\n // remove all node hover highlights\n for (let nodeId in this.hoverObj.nodes) {\n if (this.hoverObj.nodes.hasOwnProperty(nodeId)) {\n if (object === undefined || (object instanceof Node && object.id != nodeId) || object instanceof Edge) {\n this.emitBlurEvent(event, pointer, this.hoverObj.nodes[nodeId]);\n delete this.hoverObj.nodes[nodeId];\n hoverChanged = true;\n }\n }\n }\n\n // removing all edge hover highlights\n for (let edgeId in this.hoverObj.edges) {\n if (this.hoverObj.edges.hasOwnProperty(edgeId)) {\n // if the hover has been changed here it means that the node has been hovered over or off\n // we then do not use the emitBlurEvent method here.\n if (hoverChanged === true) {\n this.hoverObj.edges[edgeId].hover = false;\n delete this.hoverObj.edges[edgeId];\n }\n // if the blur remains the same and the object is undefined (mouse off) or another\n // edge has been hovered, or another node has been hovered we blur the edge.\n else if (object === undefined || (object instanceof Edge && object.id != edgeId) || (object instanceof Node && !object.hover)) {\n this.emitBlurEvent(event, pointer, this.hoverObj.edges[edgeId]);\n delete this.hoverObj.edges[edgeId];\n hoverChanged = true;\n }\n }\n }\n\n if (object !== undefined) {\n const hoveredEdgesCount = Object.keys(this.hoverObj.edges).length;\n const hoveredNodesCount = Object.keys(this.hoverObj.nodes).length;\n const newOnlyHoveredEdge = object instanceof Edge && hoveredEdgesCount === 0 && hoveredNodesCount === 0;\n const newOnlyHoveredNode = object instanceof Node && hoveredEdgesCount === 0 && hoveredNodesCount === 0;\n\n if (hoverChanged || newOnlyHoveredEdge || newOnlyHoveredNode) {\n hoverChanged = this.emitHoverEvent(event, pointer, object);\n }\n\n if (object instanceof Node && this.options.hoverConnectedEdges === true) {\n this._hoverConnectedEdges(object);\n }\n }\n\n if (hoverChanged === true) {\n this.body.emitter.emit('_requestRedraw');\n }\n }\n\n\n\n\n /**\n *\n * retrieve the currently selected objects\n * @return {{nodes: Array., edges: Array.}} selection\n */\n getSelection() {\n let nodeIds = this.getSelectedNodes();\n let edgeIds = this.getSelectedEdges();\n return { nodes: nodeIds, edges: edgeIds };\n }\n\n /**\n *\n * retrieve the currently selected nodes\n * @return {string[]} selection An array with the ids of the\n * selected nodes.\n */\n getSelectedNodes() {\n let idArray = [];\n if (this.options.selectable === true) {\n for (let nodeId in this.selectionObj.nodes) {\n if (this.selectionObj.nodes.hasOwnProperty(nodeId)) {\n idArray.push(this.selectionObj.nodes[nodeId].id);\n }\n }\n }\n return idArray;\n }\n\n /**\n *\n * retrieve the currently selected edges\n * @return {Array} selection An array with the ids of the\n * selected nodes.\n */\n getSelectedEdges() {\n let idArray = [];\n if (this.options.selectable === true) {\n for (let edgeId in this.selectionObj.edges) {\n if (this.selectionObj.edges.hasOwnProperty(edgeId)) {\n idArray.push(this.selectionObj.edges[edgeId].id);\n }\n }\n }\n return idArray;\n }\n\n /**\n * Updates the current selection\n * @param {{nodes: Array., edges: Array.}} selection\n * @param {Object} options Options\n */\n setSelection(selection, options = {}) {\n let i, id;\n\n if (!selection || (!selection.nodes && !selection.edges))\n throw 'Selection must be an object with nodes and/or edges properties';\n // first unselect any selected node, if option is true or undefined\n if (options.unselectAll || options.unselectAll === undefined) {\n this.unselectAll();\n }\n if (selection.nodes) {\n for (i = 0; i < selection.nodes.length; i++) {\n id = selection.nodes[i];\n\n let node = this.body.nodes[id];\n if (!node) {\n throw new RangeError('Node with id \"' + id + '\" not found');\n }\n // don't select edges with it\n this.selectObject(node, options.highlightEdges);\n }\n }\n\n if (selection.edges) {\n for (i = 0; i < selection.edges.length; i++) {\n id = selection.edges[i];\n\n let edge = this.body.edges[id];\n if (!edge) {\n throw new RangeError('Edge with id \"' + id + '\" not found');\n }\n this.selectObject(edge);\n }\n }\n this.body.emitter.emit('_requestRedraw');\n }\n\n\n /**\n * select zero or more nodes with the option to highlight edges\n * @param {number[] | string[]} selection An array with the ids of the\n * selected nodes.\n * @param {boolean} [highlightEdges]\n */\n selectNodes(selection, highlightEdges = true) {\n if (!selection || (selection.length === undefined))\n throw 'Selection must be an array with ids';\n\n this.setSelection({ nodes: selection }, { highlightEdges: highlightEdges });\n }\n\n\n /**\n * select zero or more edges\n * @param {number[] | string[]} selection An array with the ids of the\n * selected nodes.\n */\n selectEdges(selection) {\n if (!selection || (selection.length === undefined))\n throw 'Selection must be an array with ids';\n\n this.setSelection({ edges: selection });\n }\n\n /**\n * Validate the selection: remove ids of nodes which no longer exist\n * @private\n */\n updateSelection() {\n for (let nodeId in this.selectionObj.nodes) {\n if (this.selectionObj.nodes.hasOwnProperty(nodeId)) {\n if (!this.body.nodes.hasOwnProperty(nodeId)) {\n delete this.selectionObj.nodes[nodeId];\n }\n }\n }\n for (let edgeId in this.selectionObj.edges) {\n if (this.selectionObj.edges.hasOwnProperty(edgeId)) {\n if (!this.body.edges.hasOwnProperty(edgeId)) {\n delete this.selectionObj.edges[edgeId];\n }\n }\n }\n }\n\n\n /**\n * Determine all the visual elements clicked which are on the given point.\n *\n * All elements are returned; this includes nodes, edges and their labels.\n * The order returned is from highest to lowest, i.e. element 0 of the return\n * value is the topmost item clicked on.\n *\n * The return value consists of an array of the following possible elements:\n *\n * - `{nodeId:number}` - node with given id clicked on\n * - `{nodeId:number, labelId:0}` - label of node with given id clicked on\n * - `{edgeId:number}` - edge with given id clicked on\n * - `{edge:number, labelId:0}` - label of edge with given id clicked on\n *\n * ## NOTES\n *\n * - Currently, there is only one label associated with a node or an edge,\n * but this is expected to change somewhere in the future.\n * - Since there is no z-indexing yet, it is not really possible to set the nodes and\n * edges in the correct order. For the time being, nodes come first.\n *\n * @param {point} pointer mouse position in screen coordinates\n * @returns {Array.}\n * @private\n */\n getClickedItems(pointer) {\n let point = this.canvas.DOMtoCanvas(pointer);\n var items = [];\n\n // Note reverse order; we want the topmost clicked items to be first in the array\n // Also note that selected nodes are disregarded here; these normally display on top\n let nodeIndices = this.body.nodeIndices;\n let nodes = this.body.nodes;\n for (let i = nodeIndices.length - 1; i >= 0; i--) {\n let node = nodes[nodeIndices[i]];\n let ret = node.getItemsOnPoint(point);\n items.push.apply(items, ret); // Append the return value to the running list.\n }\n\n let edgeIndices = this.body.edgeIndices;\n let edges = this.body.edges;\n for (let i = edgeIndices.length - 1; i >= 0; i--) {\n let edge = edges[edgeIndices[i]];\n let ret = edge.getItemsOnPoint(point);\n items.push.apply(items, ret); // Append the return value to the running list.\n }\n\n return items;\n }\n}\n\nexport default SelectionHandler;\n","/****\n * The MIT License\n *\n * Copyright (c) 2015 Marco Ziccardi\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n *\n ****/\n(function (global, factory) {\n if (typeof define === 'function' && define.amd) {\n define('timsort', ['exports'], factory);\n } else if (typeof exports !== 'undefined') {\n factory(exports);\n } else {\n var mod = {\n exports: {}\n };\n factory(mod.exports);\n global.timsort = mod.exports;\n }\n})(this, function (exports) {\n 'use strict';\n\n exports.__esModule = true;\n exports.sort = sort;\n\n function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError('Cannot call a class as a function');\n }\n }\n\n var DEFAULT_MIN_MERGE = 32;\n\n var DEFAULT_MIN_GALLOPING = 7;\n\n var DEFAULT_TMP_STORAGE_LENGTH = 256;\n\n var POWERS_OF_TEN = [1e0, 1e1, 1e2, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9];\n\n function log10(x) {\n if (x < 1e5) {\n if (x < 1e2) {\n return x < 1e1 ? 0 : 1;\n }\n\n if (x < 1e4) {\n return x < 1e3 ? 2 : 3;\n }\n\n return 4;\n }\n\n if (x < 1e7) {\n return x < 1e6 ? 5 : 6;\n }\n\n if (x < 1e9) {\n return x < 1e8 ? 7 : 8;\n }\n\n return 9;\n }\n\n function alphabeticalCompare(a, b) {\n if (a === b) {\n return 0;\n }\n\n if (~ ~a === a && ~ ~b === b) {\n if (a === 0 || b === 0) {\n return a < b ? -1 : 1;\n }\n\n if (a < 0 || b < 0) {\n if (b >= 0) {\n return -1;\n }\n\n if (a >= 0) {\n return 1;\n }\n\n a = -a;\n b = -b;\n }\n\n var al = log10(a);\n var bl = log10(b);\n\n var t = 0;\n\n if (al < bl) {\n a *= POWERS_OF_TEN[bl - al - 1];\n b /= 10;\n t = -1;\n } else if (al > bl) {\n b *= POWERS_OF_TEN[al - bl - 1];\n a /= 10;\n t = 1;\n }\n\n if (a === b) {\n return t;\n }\n\n return a < b ? -1 : 1;\n }\n\n var aStr = String(a);\n var bStr = String(b);\n\n if (aStr === bStr) {\n return 0;\n }\n\n return aStr < bStr ? -1 : 1;\n }\n\n function minRunLength(n) {\n var r = 0;\n\n while (n >= DEFAULT_MIN_MERGE) {\n r |= n & 1;\n n >>= 1;\n }\n\n return n + r;\n }\n\n function makeAscendingRun(array, lo, hi, compare) {\n var runHi = lo + 1;\n\n if (runHi === hi) {\n return 1;\n }\n\n if (compare(array[runHi++], array[lo]) < 0) {\n while (runHi < hi && compare(array[runHi], array[runHi - 1]) < 0) {\n runHi++;\n }\n\n reverseRun(array, lo, runHi);\n } else {\n while (runHi < hi && compare(array[runHi], array[runHi - 1]) >= 0) {\n runHi++;\n }\n }\n\n return runHi - lo;\n }\n\n function reverseRun(array, lo, hi) {\n hi--;\n\n while (lo < hi) {\n var t = array[lo];\n array[lo++] = array[hi];\n array[hi--] = t;\n }\n }\n\n function binaryInsertionSort(array, lo, hi, start, compare) {\n if (start === lo) {\n start++;\n }\n\n for (; start < hi; start++) {\n var pivot = array[start];\n\n var left = lo;\n var right = start;\n\n while (left < right) {\n var mid = left + right >>> 1;\n\n if (compare(pivot, array[mid]) < 0) {\n right = mid;\n } else {\n left = mid + 1;\n }\n }\n\n var n = start - left;\n\n switch (n) {\n case 3:\n array[left + 3] = array[left + 2];\n\n case 2:\n array[left + 2] = array[left + 1];\n\n case 1:\n array[left + 1] = array[left];\n break;\n default:\n while (n > 0) {\n array[left + n] = array[left + n - 1];\n n--;\n }\n }\n\n array[left] = pivot;\n }\n }\n\n function gallopLeft(value, array, start, length, hint, compare) {\n var lastOffset = 0;\n var maxOffset = 0;\n var offset = 1;\n\n if (compare(value, array[start + hint]) > 0) {\n maxOffset = length - hint;\n\n while (offset < maxOffset && compare(value, array[start + hint + offset]) > 0) {\n lastOffset = offset;\n offset = (offset << 1) + 1;\n\n if (offset <= 0) {\n offset = maxOffset;\n }\n }\n\n if (offset > maxOffset) {\n offset = maxOffset;\n }\n\n lastOffset += hint;\n offset += hint;\n } else {\n maxOffset = hint + 1;\n while (offset < maxOffset && compare(value, array[start + hint - offset]) <= 0) {\n lastOffset = offset;\n offset = (offset << 1) + 1;\n\n if (offset <= 0) {\n offset = maxOffset;\n }\n }\n if (offset > maxOffset) {\n offset = maxOffset;\n }\n\n var tmp = lastOffset;\n lastOffset = hint - offset;\n offset = hint - tmp;\n }\n\n lastOffset++;\n while (lastOffset < offset) {\n var m = lastOffset + (offset - lastOffset >>> 1);\n\n if (compare(value, array[start + m]) > 0) {\n lastOffset = m + 1;\n } else {\n offset = m;\n }\n }\n return offset;\n }\n\n function gallopRight(value, array, start, length, hint, compare) {\n var lastOffset = 0;\n var maxOffset = 0;\n var offset = 1;\n\n if (compare(value, array[start + hint]) < 0) {\n maxOffset = hint + 1;\n\n while (offset < maxOffset && compare(value, array[start + hint - offset]) < 0) {\n lastOffset = offset;\n offset = (offset << 1) + 1;\n\n if (offset <= 0) {\n offset = maxOffset;\n }\n }\n\n if (offset > maxOffset) {\n offset = maxOffset;\n }\n\n var tmp = lastOffset;\n lastOffset = hint - offset;\n offset = hint - tmp;\n } else {\n maxOffset = length - hint;\n\n while (offset < maxOffset && compare(value, array[start + hint + offset]) >= 0) {\n lastOffset = offset;\n offset = (offset << 1) + 1;\n\n if (offset <= 0) {\n offset = maxOffset;\n }\n }\n\n if (offset > maxOffset) {\n offset = maxOffset;\n }\n\n lastOffset += hint;\n offset += hint;\n }\n\n lastOffset++;\n\n while (lastOffset < offset) {\n var m = lastOffset + (offset - lastOffset >>> 1);\n\n if (compare(value, array[start + m]) < 0) {\n offset = m;\n } else {\n lastOffset = m + 1;\n }\n }\n\n return offset;\n }\n\n var TimSort = (function () {\n function TimSort(array, compare) {\n _classCallCheck(this, TimSort);\n\n this.array = null;\n this.compare = null;\n this.minGallop = DEFAULT_MIN_GALLOPING;\n this.length = 0;\n this.tmpStorageLength = DEFAULT_TMP_STORAGE_LENGTH;\n this.stackLength = 0;\n this.runStart = null;\n this.runLength = null;\n this.stackSize = 0;\n\n this.array = array;\n this.compare = compare;\n\n this.length = array.length;\n\n if (this.length < 2 * DEFAULT_TMP_STORAGE_LENGTH) {\n this.tmpStorageLength = this.length >>> 1;\n }\n\n this.tmp = new Array(this.tmpStorageLength);\n\n this.stackLength = this.length < 120 ? 5 : this.length < 1542 ? 10 : this.length < 119151 ? 19 : 40;\n\n this.runStart = new Array(this.stackLength);\n this.runLength = new Array(this.stackLength);\n }\n\n TimSort.prototype.pushRun = function pushRun(runStart, runLength) {\n this.runStart[this.stackSize] = runStart;\n this.runLength[this.stackSize] = runLength;\n this.stackSize += 1;\n };\n\n TimSort.prototype.mergeRuns = function mergeRuns() {\n while (this.stackSize > 1) {\n var n = this.stackSize - 2;\n\n if (n >= 1 && this.runLength[n - 1] <= this.runLength[n] + this.runLength[n + 1] || n >= 2 && this.runLength[n - 2] <= this.runLength[n] + this.runLength[n - 1]) {\n\n if (this.runLength[n - 1] < this.runLength[n + 1]) {\n n--;\n }\n } else if (this.runLength[n] > this.runLength[n + 1]) {\n break;\n }\n this.mergeAt(n);\n }\n };\n\n TimSort.prototype.forceMergeRuns = function forceMergeRuns() {\n while (this.stackSize > 1) {\n var n = this.stackSize - 2;\n\n if (n > 0 && this.runLength[n - 1] < this.runLength[n + 1]) {\n n--;\n }\n\n this.mergeAt(n);\n }\n };\n\n TimSort.prototype.mergeAt = function mergeAt(i) {\n var compare = this.compare;\n var array = this.array;\n\n var start1 = this.runStart[i];\n var length1 = this.runLength[i];\n var start2 = this.runStart[i + 1];\n var length2 = this.runLength[i + 1];\n\n this.runLength[i] = length1 + length2;\n\n if (i === this.stackSize - 3) {\n this.runStart[i + 1] = this.runStart[i + 2];\n this.runLength[i + 1] = this.runLength[i + 2];\n }\n\n this.stackSize--;\n\n var k = gallopRight(array[start2], array, start1, length1, 0, compare);\n start1 += k;\n length1 -= k;\n\n if (length1 === 0) {\n return;\n }\n\n length2 = gallopLeft(array[start1 + length1 - 1], array, start2, length2, length2 - 1, compare);\n\n if (length2 === 0) {\n return;\n }\n\n if (length1 <= length2) {\n this.mergeLow(start1, length1, start2, length2);\n } else {\n this.mergeHigh(start1, length1, start2, length2);\n }\n };\n\n TimSort.prototype.mergeLow = function mergeLow(start1, length1, start2, length2) {\n\n var compare = this.compare;\n var array = this.array;\n var tmp = this.tmp;\n var i = 0;\n\n for (i = 0; i < length1; i++) {\n tmp[i] = array[start1 + i];\n }\n\n var cursor1 = 0;\n var cursor2 = start2;\n var dest = start1;\n\n array[dest++] = array[cursor2++];\n\n if (--length2 === 0) {\n for (i = 0; i < length1; i++) {\n array[dest + i] = tmp[cursor1 + i];\n }\n return;\n }\n\n if (length1 === 1) {\n for (i = 0; i < length2; i++) {\n array[dest + i] = array[cursor2 + i];\n }\n array[dest + length2] = tmp[cursor1];\n return;\n }\n\n var minGallop = this.minGallop;\n\n while (true) {\n var count1 = 0;\n var count2 = 0;\n var exit = false;\n\n do {\n if (compare(array[cursor2], tmp[cursor1]) < 0) {\n array[dest++] = array[cursor2++];\n count2++;\n count1 = 0;\n\n if (--length2 === 0) {\n exit = true;\n break;\n }\n } else {\n array[dest++] = tmp[cursor1++];\n count1++;\n count2 = 0;\n if (--length1 === 1) {\n exit = true;\n break;\n }\n }\n } while ((count1 | count2) < minGallop);\n\n if (exit) {\n break;\n }\n\n do {\n count1 = gallopRight(array[cursor2], tmp, cursor1, length1, 0, compare);\n\n if (count1 !== 0) {\n for (i = 0; i < count1; i++) {\n array[dest + i] = tmp[cursor1 + i];\n }\n\n dest += count1;\n cursor1 += count1;\n length1 -= count1;\n if (length1 <= 1) {\n exit = true;\n break;\n }\n }\n\n array[dest++] = array[cursor2++];\n\n if (--length2 === 0) {\n exit = true;\n break;\n }\n\n count2 = gallopLeft(tmp[cursor1], array, cursor2, length2, 0, compare);\n\n if (count2 !== 0) {\n for (i = 0; i < count2; i++) {\n array[dest + i] = array[cursor2 + i];\n }\n\n dest += count2;\n cursor2 += count2;\n length2 -= count2;\n\n if (length2 === 0) {\n exit = true;\n break;\n }\n }\n array[dest++] = tmp[cursor1++];\n\n if (--length1 === 1) {\n exit = true;\n break;\n }\n\n minGallop--;\n } while (count1 >= DEFAULT_MIN_GALLOPING || count2 >= DEFAULT_MIN_GALLOPING);\n\n if (exit) {\n break;\n }\n\n if (minGallop < 0) {\n minGallop = 0;\n }\n\n minGallop += 2;\n }\n\n this.minGallop = minGallop;\n\n if (minGallop < 1) {\n this.minGallop = 1;\n }\n\n if (length1 === 1) {\n for (i = 0; i < length2; i++) {\n array[dest + i] = array[cursor2 + i];\n }\n array[dest + length2] = tmp[cursor1];\n } else if (length1 === 0) {\n throw new Error('mergeLow preconditions were not respected');\n } else {\n for (i = 0; i < length1; i++) {\n array[dest + i] = tmp[cursor1 + i];\n }\n }\n };\n\n TimSort.prototype.mergeHigh = function mergeHigh(start1, length1, start2, length2) {\n var compare = this.compare;\n var array = this.array;\n var tmp = this.tmp;\n var i = 0;\n\n for (i = 0; i < length2; i++) {\n tmp[i] = array[start2 + i];\n }\n\n var cursor1 = start1 + length1 - 1;\n var cursor2 = length2 - 1;\n var dest = start2 + length2 - 1;\n var customCursor = 0;\n var customDest = 0;\n\n array[dest--] = array[cursor1--];\n\n if (--length1 === 0) {\n customCursor = dest - (length2 - 1);\n\n for (i = 0; i < length2; i++) {\n array[customCursor + i] = tmp[i];\n }\n\n return;\n }\n\n if (length2 === 1) {\n dest -= length1;\n cursor1 -= length1;\n customDest = dest + 1;\n customCursor = cursor1 + 1;\n\n for (i = length1 - 1; i >= 0; i--) {\n array[customDest + i] = array[customCursor + i];\n }\n\n array[dest] = tmp[cursor2];\n return;\n }\n\n var minGallop = this.minGallop;\n\n while (true) {\n var count1 = 0;\n var count2 = 0;\n var exit = false;\n\n do {\n if (compare(tmp[cursor2], array[cursor1]) < 0) {\n array[dest--] = array[cursor1--];\n count1++;\n count2 = 0;\n if (--length1 === 0) {\n exit = true;\n break;\n }\n } else {\n array[dest--] = tmp[cursor2--];\n count2++;\n count1 = 0;\n if (--length2 === 1) {\n exit = true;\n break;\n }\n }\n } while ((count1 | count2) < minGallop);\n\n if (exit) {\n break;\n }\n\n do {\n count1 = length1 - gallopRight(tmp[cursor2], array, start1, length1, length1 - 1, compare);\n\n if (count1 !== 0) {\n dest -= count1;\n cursor1 -= count1;\n length1 -= count1;\n customDest = dest + 1;\n customCursor = cursor1 + 1;\n\n for (i = count1 - 1; i >= 0; i--) {\n array[customDest + i] = array[customCursor + i];\n }\n\n if (length1 === 0) {\n exit = true;\n break;\n }\n }\n\n array[dest--] = tmp[cursor2--];\n\n if (--length2 === 1) {\n exit = true;\n break;\n }\n\n count2 = length2 - gallopLeft(array[cursor1], tmp, 0, length2, length2 - 1, compare);\n\n if (count2 !== 0) {\n dest -= count2;\n cursor2 -= count2;\n length2 -= count2;\n customDest = dest + 1;\n customCursor = cursor2 + 1;\n\n for (i = 0; i < count2; i++) {\n array[customDest + i] = tmp[customCursor + i];\n }\n\n if (length2 <= 1) {\n exit = true;\n break;\n }\n }\n\n array[dest--] = array[cursor1--];\n\n if (--length1 === 0) {\n exit = true;\n break;\n }\n\n minGallop--;\n } while (count1 >= DEFAULT_MIN_GALLOPING || count2 >= DEFAULT_MIN_GALLOPING);\n\n if (exit) {\n break;\n }\n\n if (minGallop < 0) {\n minGallop = 0;\n }\n\n minGallop += 2;\n }\n\n this.minGallop = minGallop;\n\n if (minGallop < 1) {\n this.minGallop = 1;\n }\n\n if (length2 === 1) {\n dest -= length1;\n cursor1 -= length1;\n customDest = dest + 1;\n customCursor = cursor1 + 1;\n\n for (i = length1 - 1; i >= 0; i--) {\n array[customDest + i] = array[customCursor + i];\n }\n\n array[dest] = tmp[cursor2];\n } else if (length2 === 0) {\n throw new Error('mergeHigh preconditions were not respected');\n } else {\n customCursor = dest - (length2 - 1);\n for (i = 0; i < length2; i++) {\n array[customCursor + i] = tmp[i];\n }\n }\n };\n\n return TimSort;\n })();\n\n function sort(array, compare, lo, hi) {\n if (!Array.isArray(array)) {\n throw new TypeError('Can only sort arrays');\n }\n\n if (!compare) {\n compare = alphabeticalCompare;\n } else if (typeof compare !== 'function') {\n hi = lo;\n lo = compare;\n compare = alphabeticalCompare;\n }\n\n if (!lo) {\n lo = 0;\n }\n if (!hi) {\n hi = array.length;\n }\n\n var remaining = hi - lo;\n\n if (remaining < 2) {\n return;\n }\n\n var runLength = 0;\n\n if (remaining < DEFAULT_MIN_MERGE) {\n runLength = makeAscendingRun(array, lo, hi, compare);\n binaryInsertionSort(array, lo, hi, lo + runLength, compare);\n return;\n }\n\n var ts = new TimSort(array, compare);\n\n var minRun = minRunLength(remaining);\n\n do {\n runLength = makeAscendingRun(array, lo, hi, compare);\n if (runLength < minRun) {\n var force = remaining;\n if (force > minRun) {\n force = minRun;\n }\n\n binaryInsertionSort(array, lo, lo + force, lo + runLength, compare);\n runLength = force;\n }\n\n ts.pushRun(lo, runLength);\n ts.mergeRuns();\n\n remaining -= runLength;\n lo += runLength;\n } while (remaining !== 0);\n\n ts.forceMergeRuns();\n }\n});\n","module.exports = require('./build/timsort.js');","/**\n * Helper classes for LayoutEngine.\n *\n * Strategy pattern for usage of direction methods for hierarchical layouts.\n */\nimport TimSort from 'timsort';\n\n\n/**\n * Interface definition for direction strategy classes.\n *\n * This class describes the interface for the Strategy\n * pattern classes used to differentiate horizontal and vertical\n * direction of hierarchical results.\n *\n * For a given direction, one coordinate will be 'fixed', meaning that it is\n * determined by level.\n * The other coordinate is 'unfixed', meaning that the nodes on a given level\n * can still move along that coordinate. So:\n *\n * - `vertical` layout: `x` unfixed, `y` fixed per level\n * - `horizontal` layout: `x` fixed per level, `y` unfixed\n *\n * The local methods are stubs and should be regarded as abstract.\n * Derived classes **must** implement all the methods themselves.\n *\n * @private\n */\nclass DirectionInterface {\n /** @ignore **/\n abstract() {\n throw new Error(\"Can't instantiate abstract class!\");\n }\n\n /**\n * This is a dummy call which is used to suppress the jsdoc errors of type:\n *\n * \"'param' is assigned a value but never used\"\n *\n * @ignore\n **/\n fake_use() {\n // Do nothing special\n }\n\n /**\n * Type to use to translate dynamic curves to, in the case of hierarchical layout.\n * Dynamic curves do not work for these.\n *\n * The value should be perpendicular to the actual direction of the layout.\n *\n * @return {string} Direction, either 'vertical' or 'horizontal'\n */\n curveType() { return this.abstract(); }\n\n\n /**\n * Return the value of the coordinate that is not fixed for this direction.\n *\n * @param {Node} node The node to read\n * @return {number} Value of the unfixed coordinate\n */\n getPosition(node) { this.fake_use(node); return this.abstract(); }\n\n\n /**\n * Set the value of the coordinate that is not fixed for this direction.\n *\n * @param {Node} node The node to adjust\n * @param {number} position\n * @param {number} [level] if specified, the hierarchy level that this node should be fixed to\n */\n setPosition(node, position, level = undefined) { this.fake_use(node, position, level); this.abstract(); }\n\n\n /**\n * Get the width of a tree.\n *\n * A `tree` here is a subset of nodes within the network which are not connected to other nodes,\n * only among themselves. In essence, it is a sub-network.\n *\n * @param {number} index The index number of a tree\n * @return {number} the width of a tree in the view coordinates\n */\n getTreeSize(index) { this.fake_use(index); return this.abstract(); }\n\n\n /**\n * Sort array of nodes on the unfixed coordinates.\n *\n * **Note:** chrome has non-stable sorting implementation, which\n * has a tendency to change the order of the array items,\n * even if the custom sort function returns 0.\n *\n * For this reason, an external sort implementation is used,\n * which has the added benefit of being faster than the standard\n * platforms implementation. This has been verified on `node.js`,\n * `firefox` and `chrome` (all linux).\n *\n * @param {Array.} nodeArray array of nodes to sort\n */\n sort(nodeArray) { this.fake_use(nodeArray); this.abstract(); }\n\n\n /**\n * Assign the fixed coordinate of the node to the given level\n *\n * @param {Node} node The node to adjust\n * @param {number} level The level to fix to\n */\n fix(node, level) { this.fake_use(node, level); this.abstract(); }\n\n\n /**\n * Add an offset to the unfixed coordinate of the given node. \n *\n * @param {NodeId} nodeId Id of the node to adjust\n * @param {number} diff Offset to add to the unfixed coordinate\n */\n shift(nodeId, diff) { this.fake_use(nodeId, diff); this.abstract(); }\n}\n\n\n/**\n * Vertical Strategy\n *\n * Coordinate `y` is fixed on levels, coordinate `x` is unfixed.\n *\n * @extends DirectionInterface\n * @private\n */\nclass VerticalStrategy extends DirectionInterface {\n /**\n * Constructor\n *\n * @param {Object} layout reference to the parent LayoutEngine instance.\n */\n constructor(layout) {\n super();\n this.layout = layout;\n }\n\n /** @inheritdoc */\n curveType() {\n return 'horizontal';\n }\n\n /** @inheritdoc */\n getPosition(node) {\n return node.x;\n }\n\n /** @inheritdoc */\n setPosition(node, position, level = undefined) {\n if (level !== undefined) {\n this.layout.hierarchical.addToOrdering(node, level);\n }\n node.x = position;\n }\n\n /** @inheritdoc */\n getTreeSize(index) {\n let res = this.layout.hierarchical.getTreeSize(this.layout.body.nodes, index);\n return {min: res.min_x, max: res.max_x};\n }\n\n /** @inheritdoc */\n sort(nodeArray) {\n TimSort.sort(nodeArray, function(a, b) {\n return a.x - b.x;\n });\n }\n\n /** @inheritdoc */\n fix(node, level) {\n node.y = this.layout.options.hierarchical.levelSeparation * level;\n node.options.fixed.y = true;\n }\n\n /** @inheritdoc */\n shift(nodeId, diff) {\n this.layout.body.nodes[nodeId].x += diff;\n }\n}\n\n\n/**\n * Horizontal Strategy\n *\n * Coordinate `x` is fixed on levels, coordinate `y` is unfixed.\n *\n * @extends DirectionInterface\n * @private\n */\nclass HorizontalStrategy extends DirectionInterface {\n /**\n * Constructor\n *\n * @param {Object} layout reference to the parent LayoutEngine instance.\n */\n constructor(layout) {\n super();\n this.layout = layout;\n }\n\n /** @inheritdoc */\n curveType() {\n return 'vertical';\n }\n\n /** @inheritdoc */\n getPosition(node) {\n return node.y;\n }\n\n /** @inheritdoc */\n setPosition(node, position, level = undefined) {\n if (level !== undefined) {\n this.layout.hierarchical.addToOrdering(node, level);\n }\n node.y = position;\n }\n\n /** @inheritdoc */\n getTreeSize(index) {\n let res = this.layout.hierarchical.getTreeSize(this.layout.body.nodes, index);\n return {min: res.min_y, max: res.max_y};\n }\n\n /** @inheritdoc */\n sort(nodeArray) {\n TimSort.sort(nodeArray, function(a, b) {\n return a.y - b.y;\n });\n }\n\n /** @inheritdoc */\n fix(node, level) {\n node.x = this.layout.options.hierarchical.levelSeparation * level;\n node.options.fixed.x = true;\n }\n\n /** @inheritdoc */\n shift(nodeId, diff) {\n this.layout.body.nodes[nodeId].y += diff;\n }\n}\n\n\nexport {HorizontalStrategy, VerticalStrategy};\n","/**\n * There's a mix-up with terms in the code. Following are the formal definitions:\n *\n * tree - a strict hierarchical network, i.e. every node has at most one parent\n * forest - a collection of trees. These distinct trees are thus not connected.\n *\n * So:\n * - in a network that is not a tree, there exist nodes with multiple parents.\n * - a network consisting of unconnected sub-networks, of which at least one\n * is not a tree, is not a forest.\n *\n * In the code, the definitions are:\n *\n * tree - any disconnected sub-network, strict hierarchical or not.\n * forest - a bunch of these sub-networks\n *\n * The difference between tree and not-tree is important in the code, notably within\n * to the block-shifting algorithm. The algorithm assumes formal trees and fails\n * for not-trees, often in a spectacular manner (search for 'exploding network' in the issues).\n *\n * In order to distinguish the definitions in the following code, the adjective 'formal' is\n * used. If 'formal' is absent, you must assume the non-formal definition.\n *\n * ----------------------------------------------------------------------------------\n * NOTES\n * =====\n *\n * A hierarchical layout is a different thing from a hierarchical network.\n * The layout is a way to arrange the nodes in the view; this can be done\n * on non-hierarchical networks as well. The converse is also possible.\n */\n'use strict';\nimport TimSort from 'timsort';\nimport util from 'vis-util';\nimport NetworkUtil from '../NetworkUtil';\nimport { HorizontalStrategy, VerticalStrategy } from './components/DirectionStrategy.js';\n\n\n/**\n * Container for derived data on current network, relating to hierarchy.\n *\n * @private\n */\nclass HierarchicalStatus {\n /**\n * @ignore\n */\n constructor() {\n this.childrenReference = {}; // child id's per node id\n this.parentReference = {}; // parent id's per node id\n this.trees = {}; // tree id per node id; i.e. to which tree does given node id belong\n\n this.distributionOrdering = {}; // The nodes per level, in the display order\n this.levels = {}; // hierarchy level per node id\n this.distributionIndex = {}; // The position of the node in the level sorting order, per node id.\n\n this.isTree = false; // True if current network is a formal tree \n this.treeIndex = -1; // Highest tree id in current network.\n }\n\n /**\n * Add the relation between given nodes to the current state.\n *\n * @param {Node.id} parentNodeId\n * @param {Node.id} childNodeId\n */\n addRelation(parentNodeId, childNodeId) {\n if (this.childrenReference[parentNodeId] === undefined) {\n this.childrenReference[parentNodeId] = [];\n }\n this.childrenReference[parentNodeId].push(childNodeId);\n\n if (this.parentReference[childNodeId] === undefined) {\n this.parentReference[childNodeId] = [];\n }\n this.parentReference[childNodeId].push(parentNodeId);\n }\n\n\n /**\n * Check if the current state is for a formal tree or formal forest.\n *\n * This is the case if every node has at most one parent.\n *\n * Pre: parentReference init'ed properly for current network\n */\n checkIfTree() {\n for (let i in this.parentReference) {\n if (this.parentReference[i].length > 1) {\n this.isTree = false;\n return;\n }\n }\n\n this.isTree = true;\n }\n\n\n /**\n * Return the number of separate trees in the current network.\n * @returns {number}\n */\n numTrees() {\n return (this.treeIndex + 1); // This assumes the indexes are assigned consecitively\n }\n\n\n /**\n * Assign a tree id to a node\n * @param {Node} node\n * @param {string|number} treeId\n */\n setTreeIndex(node, treeId) {\n if (treeId === undefined) return; // Don't bother\n\n if (this.trees[node.id] === undefined) {\n this.trees[node.id] = treeId;\n this.treeIndex = Math.max(treeId, this.treeIndex);\n }\n }\n\n\n /**\n * Ensure level for given id is defined.\n *\n * Sets level to zero for given node id if not already present\n *\n * @param {Node.id} nodeId\n */\n ensureLevel(nodeId) {\n if (this.levels[nodeId] === undefined) {\n this.levels[nodeId] = 0;\n }\n }\n\n\n /**\n * get the maximum level of a branch.\n *\n * TODO: Never entered; find a test case to test this!\n * @param {Node.id} nodeId\n * @returns {number}\n */\n getMaxLevel(nodeId) {\n let accumulator = {};\n\n let _getMaxLevel = (nodeId) => {\n if (accumulator[nodeId] !== undefined) {\n return accumulator[nodeId];\n }\n let level = this.levels[nodeId];\n if (this.childrenReference[nodeId]) {\n let children = this.childrenReference[nodeId];\n if (children.length > 0) {\n for (let i = 0; i < children.length; i++) {\n level = Math.max(level,_getMaxLevel(children[i]));\n }\n }\n }\n accumulator[nodeId] = level;\n return level;\n };\n\n return _getMaxLevel(nodeId);\n }\n\n\n /**\n *\n * @param {Node} nodeA\n * @param {Node} nodeB\n */\n levelDownstream(nodeA, nodeB) {\n if (this.levels[nodeB.id] === undefined) {\n // set initial level\n if (this.levels[nodeA.id] === undefined) {\n this.levels[nodeA.id] = 0;\n }\n // set level\n this.levels[nodeB.id] = this.levels[nodeA.id] + 1;\n }\n }\n\n\n /**\n * Small util method to set the minimum levels of the nodes to zero.\n *\n * @param {Array.} nodes\n */\n setMinLevelToZero(nodes) {\n let minLevel = 1e9;\n // get the minimum level\n for (let nodeId in nodes) {\n if (nodes.hasOwnProperty(nodeId)) {\n if (this.levels[nodeId] !== undefined) {\n minLevel = Math.min(this.levels[nodeId], minLevel);\n }\n }\n }\n\n // subtract the minimum from the set so we have a range starting from 0\n for (let nodeId in nodes) {\n if (nodes.hasOwnProperty(nodeId)) {\n if (this.levels[nodeId] !== undefined) {\n this.levels[nodeId] -= minLevel;\n }\n }\n }\n }\n\n\n /**\n * Get the min and max xy-coordinates of a given tree\n *\n * @param {Array.} nodes\n * @param {number} index\n * @returns {{min_x: number, max_x: number, min_y: number, max_y: number}}\n */\n getTreeSize(nodes, index) {\n let min_x = 1e9;\n let max_x = -1e9;\n let min_y = 1e9;\n let max_y = -1e9;\n\n for (let nodeId in this.trees) {\n if (this.trees.hasOwnProperty(nodeId)) {\n if (this.trees[nodeId] === index) {\n let node = nodes[nodeId];\n min_x = Math.min(node.x, min_x);\n max_x = Math.max(node.x, max_x);\n min_y = Math.min(node.y, min_y);\n max_y = Math.max(node.y, max_y);\n }\n }\n }\n\n return {\n min_x: min_x,\n max_x: max_x,\n min_y: min_y,\n max_y: max_y\n };\n }\n\n\n /**\n * Check if two nodes have the same parent(s)\n *\n * @param {Node} node1\n * @param {Node} node2\n * @return {boolean} true if the two nodes have a same ancestor node, false otherwise\n */\n hasSameParent(node1, node2) {\n let parents1 = this.parentReference[node1.id];\n let parents2 = this.parentReference[node2.id];\n if (parents1 === undefined || parents2 === undefined) {\n return false;\n }\n\n for (let i = 0; i < parents1.length; i++) {\n for (let j = 0; j < parents2.length; j++) {\n if (parents1[i] == parents2[j]) {\n return true;\n }\n }\n }\n return false;\n }\n\n\n /**\n * Check if two nodes are in the same tree.\n *\n * @param {Node} node1\n * @param {Node} node2\n * @return {Boolean} true if this is so, false otherwise\n */\n inSameSubNetwork(node1, node2) {\n return (this.trees[node1.id] === this.trees[node2.id]);\n }\n\n\n /**\n * Get a list of the distinct levels in the current network\n *\n * @returns {Array}\n */\n getLevels() {\n return Object.keys(this.distributionOrdering);\n }\n\n\n /**\n * Add a node to the ordering per level\n *\n * @param {Node} node\n * @param {number} level\n */\n addToOrdering(node, level) {\n if (this.distributionOrdering[level] === undefined) {\n this.distributionOrdering[level] = [];\n }\n\n var isPresent = false;\n var curLevel = this.distributionOrdering[level];\n for (var n in curLevel) {\n //if (curLevel[n].id === node.id) {\n if (curLevel[n] === node) {\n isPresent = true;\n break;\n }\n }\n\n if (!isPresent) {\n this.distributionOrdering[level].push(node);\n this.distributionIndex[node.id] = this.distributionOrdering[level].length - 1;\n }\n }\n}\n\n/**\n * The Layout Engine\n */\nclass LayoutEngine {\n /**\n * @param {Object} body\n */\n constructor(body) {\n this.body = body;\n\n this.initialRandomSeed = Math.round(Math.random() * 1000000);\n this.randomSeed = this.initialRandomSeed;\n this.setPhysics = false;\n this.options = {};\n this.optionsBackup = {physics:{}};\n\n this.defaultOptions = {\n randomSeed: undefined,\n improvedLayout: true,\n hierarchical: {\n enabled:false,\n levelSeparation: 150,\n nodeSpacing: 100,\n treeSpacing: 200,\n blockShifting: true,\n edgeMinimization: true,\n parentCentralization: true,\n direction: 'UD', // UD, DU, LR, RL\n sortMethod: 'hubsize' // hubsize, directed\n }\n };\n util.extend(this.options, this.defaultOptions);\n this.bindEventListeners();\n }\n\n /**\n * Binds event listeners\n */\n bindEventListeners() {\n this.body.emitter.on('_dataChanged', () => {\n this.setupHierarchicalLayout();\n });\n this.body.emitter.on('_dataLoaded', () => {\n this.layoutNetwork();\n });\n this.body.emitter.on('_resetHierarchicalLayout', () => {\n this.setupHierarchicalLayout();\n });\n this.body.emitter.on('_adjustEdgesForHierarchicalLayout', () => {\n if (this.options.hierarchical.enabled !== true) {\n return;\n }\n // get the type of static smooth curve in case it is required\n let type = this.direction.curveType();\n\n // force all edges into static smooth curves.\n this.body.emitter.emit('_forceDisableDynamicCurves', type, false);\n });\n }\n\n /**\n *\n * @param {Object} options\n * @param {Object} allOptions\n * @returns {Object}\n */\n setOptions(options, allOptions) {\n if (options !== undefined) {\n let hierarchical = this.options.hierarchical;\n let prevHierarchicalState = hierarchical.enabled;\n util.selectiveDeepExtend([\"randomSeed\", \"improvedLayout\"],this.options, options);\n util.mergeOptions(this.options, options, 'hierarchical');\n if (options.randomSeed !== undefined) {this.initialRandomSeed = options.randomSeed;}\n\n if (hierarchical.enabled === true) {\n if (prevHierarchicalState === true) {\n // refresh the overridden options for nodes and edges.\n this.body.emitter.emit('refresh', true);\n }\n\n // make sure the level separation is the right way up\n if (hierarchical.direction === 'RL' || hierarchical.direction === 'DU') {\n if (hierarchical.levelSeparation > 0) {\n hierarchical.levelSeparation *= -1;\n }\n }\n else {\n if (hierarchical.levelSeparation < 0) {\n hierarchical.levelSeparation *= -1;\n }\n }\n\n this.setDirectionStrategy();\n\n this.body.emitter.emit('_resetHierarchicalLayout');\n // because the hierarchical system needs it's own physics and smooth curve settings,\n // we adapt the other options if needed.\n return this.adaptAllOptionsForHierarchicalLayout(allOptions);\n }\n else {\n if (prevHierarchicalState === true) {\n // refresh the overridden options for nodes and edges.\n this.body.emitter.emit('refresh');\n return util.deepExtend(allOptions,this.optionsBackup);\n }\n }\n }\n return allOptions;\n }\n\n /**\n *\n * @param {Object} allOptions\n * @returns {Object}\n */\n adaptAllOptionsForHierarchicalLayout(allOptions) {\n if (this.options.hierarchical.enabled === true) {\n let backupPhysics = this.optionsBackup.physics;\n\n // set the physics\n if (allOptions.physics === undefined || allOptions.physics === true) {\n allOptions.physics = {\n enabled: backupPhysics.enabled === undefined ? true : backupPhysics.enabled,\n solver :'hierarchicalRepulsion'\n };\n backupPhysics.enabled = backupPhysics.enabled === undefined ? true : backupPhysics.enabled;\n backupPhysics.solver = backupPhysics.solver || 'barnesHut';\n }\n else if (typeof allOptions.physics === 'object') {\n backupPhysics.enabled = allOptions.physics.enabled === undefined ? true : allOptions.physics.enabled;\n backupPhysics.solver = allOptions.physics.solver || 'barnesHut';\n allOptions.physics.solver = 'hierarchicalRepulsion';\n }\n else if (allOptions.physics !== false) {\n backupPhysics.solver ='barnesHut';\n allOptions.physics = {solver:'hierarchicalRepulsion'};\n }\n\n // get the type of static smooth curve in case it is required\n let type = this.direction.curveType();\n\n // disable smooth curves if nothing is defined. If smooth curves have been turned on,\n // turn them into static smooth curves.\n if (allOptions.edges === undefined) {\n this.optionsBackup.edges = {smooth:{enabled:true, type:'dynamic'}};\n allOptions.edges = {smooth: false};\n }\n else if (allOptions.edges.smooth === undefined) {\n this.optionsBackup.edges = {smooth:{enabled:true, type:'dynamic'}};\n allOptions.edges.smooth = false;\n }\n else {\n if (typeof allOptions.edges.smooth === 'boolean') {\n this.optionsBackup.edges = {smooth:allOptions.edges.smooth};\n allOptions.edges.smooth = {enabled: allOptions.edges.smooth, type:type}\n }\n else {\n let smooth = allOptions.edges.smooth;\n\n // allow custom types except for dynamic\n if (smooth.type !== undefined && smooth.type !== 'dynamic') {\n type = smooth.type;\n }\n\n // TODO: this is options merging; see if the standard routines can be used here.\n this.optionsBackup.edges = {\n smooth : smooth.enabled === undefined ? true : smooth.enabled,\n type : smooth.type === undefined ? 'dynamic': smooth.type,\n roundness : smooth.roundness === undefined ? 0.5 : smooth.roundness,\n forceDirection: smooth.forceDirection === undefined ? false : smooth.forceDirection\n };\n\n\n // NOTE: Copying an object to self; this is basically setting defaults for undefined variables\n allOptions.edges.smooth = {\n enabled : smooth.enabled === undefined ? true : smooth.enabled,\n type : type,\n roundness : smooth.roundness === undefined ? 0.5 : smooth.roundness,\n forceDirection: smooth.forceDirection === undefined ? false: smooth.forceDirection\n }\n }\n }\n\n // Force all edges into static smooth curves.\n // Only applies to edges that do not use the global options for smooth.\n this.body.emitter.emit('_forceDisableDynamicCurves', type);\n }\n\n return allOptions;\n }\n\n /**\n *\n * @returns {number}\n */\n seededRandom() {\n let x = Math.sin(this.randomSeed++) * 10000;\n return x - Math.floor(x);\n }\n\n /**\n *\n * @param {Array.} nodesArray\n */\n positionInitially(nodesArray) {\n if (this.options.hierarchical.enabled !== true) {\n this.randomSeed = this.initialRandomSeed;\n let radius = nodesArray.length + 50;\n for (let i = 0; i < nodesArray.length; i++) {\n let node = nodesArray[i];\n let angle = 2 * Math.PI * this.seededRandom();\n if (node.x === undefined) {\n node.x = radius * Math.cos(angle);\n }\n if (node.y === undefined) {\n node.y = radius * Math.sin(angle);\n }\n }\n }\n }\n\n\n /**\n * Use Kamada Kawai to position nodes. This is quite a heavy algorithm so if there are a lot of nodes we\n * cluster them first to reduce the amount.\n */\n layoutNetwork() {\n if (this.options.hierarchical.enabled !== true && this.options.improvedLayout === true) {\n let indices = this.body.nodeIndices;\n\n // first check if we should Kamada Kawai to layout. The threshold is if less than half of the visible\n // nodes have predefined positions we use this.\n let positionDefined = 0;\n for (let i = 0; i < indices.length; i++) {\n let node = this.body.nodes[indices[i]];\n if (node.predefinedPosition === true) {\n positionDefined += 1;\n }\n }\n\n // if less than half of the nodes have a predefined position we continue\n if (positionDefined < 0.5 * indices.length) {\n let MAX_LEVELS = 10;\n let level = 0;\n let clusterThreshold = 150; // TODO add this to options\n\n //\n // Define the options for the hidden cluster nodes\n // These options don't propagate outside the clustering phase.\n //\n // Some options are explicitly disabled, because they may be set in group or default node options.\n // The clusters are never displayed, so most explicit settings here serve as performance optimizations.\n //\n // The explicit setting of 'shape' is to avoid `shape: 'image'`; images are not passed to the hidden\n // cluster nodes, leading to an exception on creation.\n //\n // All settings here are performance related, except when noted otherwise.\n //\n let clusterOptions = {\n clusterNodeProperties:{\n shape: 'ellipse', // Bugfix: avoid type 'image', no images supplied\n label: '', // avoid label handling\n group: '', // avoid group handling\n font: {multi: false}, // avoid font propagation\n },\n clusterEdgeProperties:{\n label: '', // avoid label handling\n font: {multi: false}, // avoid font propagation\n smooth: {\n enabled: false // avoid drawing penalty for complex edges\n }\n }\n };\n\n // if there are a lot of nodes, we cluster before we run the algorithm.\n // NOTE: this part fails to find clusters for large scale-free networks, which should\n // be easily clusterable.\n // TODO: examine why this is so\n if (indices.length > clusterThreshold) {\n let startLength = indices.length;\n while (indices.length > clusterThreshold && level <= MAX_LEVELS) {\n //console.time(\"clustering\")\n level += 1;\n let before = indices.length;\n // if there are many nodes we do a hubsize cluster\n if (level % 3 === 0) {\n this.body.modules.clustering.clusterBridges(clusterOptions);\n }\n else {\n this.body.modules.clustering.clusterOutliers(clusterOptions);\n }\n let after = indices.length;\n if (before == after && level % 3 !== 0) {\n this._declusterAll();\n this.body.emitter.emit(\"_layoutFailed\");\n console.info(\"This network could not be positioned by this version of the improved layout algorithm.\"\n + \" Please disable improvedLayout for better performance.\");\n return;\n }\n //console.timeEnd(\"clustering\")\n //console.log(before,level,after);\n }\n // increase the size of the edges\n this.body.modules.kamadaKawai.setOptions({springLength: Math.max(150, 2 * startLength)})\n }\n if (level > MAX_LEVELS){\n console.info(\"The clustering didn't succeed within the amount of interations allowed,\"\n + \" progressing with partial result.\");\n }\n\n // position the system for these nodes and edges\n this.body.modules.kamadaKawai.solve(indices, this.body.edgeIndices, true);\n\n // shift to center point\n this._shiftToCenter();\n\n // perturb the nodes a little bit to force the physics to kick in\n let offset = 70;\n for (let i = 0; i < indices.length; i++) {\n // Only perturb the nodes that aren't fixed\n let node = this.body.nodes[indices[i]];\n if (node.predefinedPosition === false) {\n node.x += (0.5 - this.seededRandom())*offset;\n node.y += (0.5 - this.seededRandom())*offset;\n }\n }\n\n // uncluster all clusters\n this._declusterAll();\n\n // reposition all bezier nodes.\n this.body.emitter.emit(\"_repositionBezierNodes\");\n }\n }\n }\n\n /**\n * Move all the nodes towards to the center so gravitational pull wil not move the nodes away from view\n * @private\n */\n _shiftToCenter() {\n let range = NetworkUtil.getRangeCore(this.body.nodes, this.body.nodeIndices);\n let center = NetworkUtil.findCenter(range);\n for (let i = 0; i < this.body.nodeIndices.length; i++) {\n let node = this.body.nodes[this.body.nodeIndices[i]];\n node.x -= center.x;\n node.y -= center.y;\n }\n }\n\n /**\n * Expands all clusters\n * @private\n */\n _declusterAll() {\n let clustersPresent = true;\n while (clustersPresent === true) {\n clustersPresent = false;\n for (let i = 0; i < this.body.nodeIndices.length; i++) {\n if (this.body.nodes[this.body.nodeIndices[i]].isCluster === true) {\n clustersPresent = true;\n this.body.modules.clustering.openCluster(this.body.nodeIndices[i], {}, false);\n }\n }\n if (clustersPresent === true) {\n this.body.emitter.emit('_dataChanged');\n }\n }\n }\n\n /**\n *\n * @returns {number|*}\n */\n getSeed() {\n return this.initialRandomSeed;\n }\n\n /**\n * This is the main function to layout the nodes in a hierarchical way.\n * It checks if the node details are supplied correctly\n *\n * @private\n */\n setupHierarchicalLayout() {\n if (this.options.hierarchical.enabled === true && this.body.nodeIndices.length > 0) {\n // get the size of the largest hubs and check if the user has defined a level for a node.\n let node, nodeId;\n let definedLevel = false;\n let undefinedLevel = false;\n this.lastNodeOnLevel = {};\n this.hierarchical = new HierarchicalStatus();\n\n for (nodeId in this.body.nodes) {\n if (this.body.nodes.hasOwnProperty(nodeId)) {\n node = this.body.nodes[nodeId];\n if (node.options.level !== undefined) {\n definedLevel = true;\n this.hierarchical.levels[nodeId] = node.options.level;\n }\n else {\n undefinedLevel = true;\n }\n }\n }\n\n // if the user defined some levels but not all, alert and run without hierarchical layout\n if (undefinedLevel === true && definedLevel === true) {\n throw new Error('To use the hierarchical layout, nodes require either no predefined levels'\n + ' or levels have to be defined for all nodes.');\n }\n else {\n // define levels if undefined by the users. Based on hubsize.\n if (undefinedLevel === true) {\n let sortMethod = this.options.hierarchical.sortMethod;\n if (sortMethod === 'hubsize') {\n this._determineLevelsByHubsize();\n }\n else if (sortMethod === 'directed') {\n this._determineLevelsDirected();\n }\n else if (sortMethod === 'custom') {\n this._determineLevelsCustomCallback();\n }\n }\n\n\n // fallback for cases where there are nodes but no edges\n for (let nodeId in this.body.nodes) {\n if (this.body.nodes.hasOwnProperty(nodeId)) {\n this.hierarchical.ensureLevel(nodeId);\n }\n }\n // check the distribution of the nodes per level.\n let distribution = this._getDistribution();\n\n // get the parent children relations.\n this._generateMap();\n\n // place the nodes on the canvas.\n this._placeNodesByHierarchy(distribution);\n\n // condense the whitespace.\n this._condenseHierarchy();\n\n // shift to center so gravity does not have to do much\n this._shiftToCenter();\n }\n }\n }\n\n /**\n * @private\n */\n _condenseHierarchy() {\n // Global var in this scope to define when the movement has stopped.\n let stillShifting = false;\n let branches = {};\n // first we have some methods to help shifting trees around.\n // the main method to shift the trees\n let shiftTrees = () => {\n let treeSizes = getTreeSizes();\n let shiftBy = 0;\n for (let i = 0; i < treeSizes.length - 1; i++) {\n let diff = treeSizes[i].max - treeSizes[i+1].min;\n shiftBy += diff + this.options.hierarchical.treeSpacing;\n shiftTree(i + 1, shiftBy);\n }\n };\n\n // shift a single tree by an offset\n let shiftTree = (index, offset) => {\n let trees = this.hierarchical.trees;\n\n for (let nodeId in trees) {\n if (trees.hasOwnProperty(nodeId)) {\n if (trees[nodeId] === index) {\n this.direction.shift(nodeId, offset);\n }\n }\n }\n };\n\n // get the width of all trees\n let getTreeSizes = () => {\n let treeWidths = [];\n for (let i = 0; i < this.hierarchical.numTrees(); i++) {\n treeWidths.push(this.direction.getTreeSize(i));\n }\n return treeWidths;\n };\n\n\n // get a map of all nodes in this branch\n let getBranchNodes = (source, map) => {\n if (map[source.id]) {\n return;\n }\n map[source.id] = true;\n if (this.hierarchical.childrenReference[source.id]) {\n let children = this.hierarchical.childrenReference[source.id];\n if (children.length > 0) {\n for (let i = 0; i < children.length; i++) {\n getBranchNodes(this.body.nodes[children[i]], map);\n }\n }\n }\n };\n\n // get a min max width as well as the maximum movement space it has on either sides\n // we use min max terminology because width and height can interchange depending on the direction of the layout\n let getBranchBoundary = (branchMap, maxLevel = 1e9) => {\n let minSpace = 1e9;\n let maxSpace = 1e9;\n let min = 1e9;\n let max = -1e9;\n for (let branchNode in branchMap) {\n if (branchMap.hasOwnProperty(branchNode)) {\n let node = this.body.nodes[branchNode];\n let level = this.hierarchical.levels[node.id];\n let position = this.direction.getPosition(node);\n\n // get the space around the node.\n let [minSpaceNode, maxSpaceNode] = this._getSpaceAroundNode(node,branchMap);\n minSpace = Math.min(minSpaceNode, minSpace);\n maxSpace = Math.min(maxSpaceNode, maxSpace);\n\n // the width is only relevant for the levels two nodes have in common. This is why we filter on this.\n if (level <= maxLevel) {\n min = Math.min(position, min);\n max = Math.max(position, max);\n }\n }\n }\n\n return [min, max, minSpace, maxSpace];\n }\n\n\n // check what the maximum level is these nodes have in common.\n let getCollisionLevel = (node1, node2) => {\n let maxLevel1 = this.hierarchical.getMaxLevel(node1.id);\n let maxLevel2 = this.hierarchical.getMaxLevel(node2.id);\n return Math.min(maxLevel1, maxLevel2);\n };\n\n\n /**\n * Condense elements. These can be nodes or branches depending on the callback.\n *\n * @param {function} callback\n * @param {Array.} levels\n * @param {*} centerParents\n */\n let shiftElementsCloser = (callback, levels, centerParents) => {\n let hier = this.hierarchical;\n\n for (let i = 0; i < levels.length; i++) {\n let level = levels[i];\n let levelNodes = hier.distributionOrdering[level];\n if (levelNodes.length > 1) {\n for (let j = 0; j < levelNodes.length - 1; j++) {\n let node1 = levelNodes[j];\n let node2 = levelNodes[j+1];\n\n // NOTE: logic maintained as it was; if nodes have same ancestor,\n // then of course they are in the same sub-network.\n if (hier.hasSameParent(node1, node2) && hier.inSameSubNetwork(node1, node2) ) {\n callback(node1, node2, centerParents);\n }\n }\n }\n }\n };\n\n\n // callback for shifting branches\n let branchShiftCallback = (node1, node2, centerParent = false) => {\n //window.CALLBACKS.push(() => {\n let pos1 = this.direction.getPosition(node1);\n let pos2 = this.direction.getPosition(node2);\n let diffAbs = Math.abs(pos2 - pos1);\n let nodeSpacing = this.options.hierarchical.nodeSpacing;\n //console.log(\"NOW CHECKING:\", node1.id, node2.id, diffAbs);\n if (diffAbs > nodeSpacing) {\n let branchNodes1 = {};\n let branchNodes2 = {};\n\n getBranchNodes(node1, branchNodes1);\n getBranchNodes(node2, branchNodes2);\n\n // check the largest distance between the branches\n let maxLevel = getCollisionLevel(node1, node2);\n let branchNodeBoundary1 = getBranchBoundary(branchNodes1, maxLevel);\n let branchNodeBoundary2 = getBranchBoundary(branchNodes2, maxLevel);\n let max1 = branchNodeBoundary1[1];\n let min2 = branchNodeBoundary2[0];\n let minSpace2 = branchNodeBoundary2[2];\n\n //console.log(node1.id, getBranchBoundary(branchNodes1, maxLevel), node2.id,\n // getBranchBoundary(branchNodes2, maxLevel), maxLevel);\n let diffBranch = Math.abs(max1 - min2);\n if (diffBranch > nodeSpacing) {\n let offset = max1 - min2 + nodeSpacing;\n if (offset < -minSpace2 + nodeSpacing) {\n offset = -minSpace2 + nodeSpacing;\n //console.log(\"RESETTING OFFSET\", max1 - min2 + this.options.hierarchical.nodeSpacing, -minSpace2, offset);\n }\n if (offset < 0) {\n //console.log(\"SHIFTING\", node2.id, offset);\n this._shiftBlock(node2.id, offset);\n stillShifting = true;\n\n if (centerParent === true)\n this._centerParent(node2);\n }\n }\n\n }\n //this.body.emitter.emit(\"_redraw\");})\n };\n\n let minimizeEdgeLength = (iterations, node) => {\n //window.CALLBACKS.push(() => {\n // console.log(\"ts\",node.id);\n let nodeId = node.id;\n let allEdges = node.edges;\n let nodeLevel = this.hierarchical.levels[node.id];\n\n // gather constants\n let C2 = this.options.hierarchical.levelSeparation * this.options.hierarchical.levelSeparation;\n let referenceNodes = {};\n let aboveEdges = [];\n for (let i = 0; i < allEdges.length; i++) {\n let edge = allEdges[i];\n if (edge.toId != edge.fromId) {\n let otherNode = edge.toId == nodeId ? edge.from : edge.to;\n referenceNodes[allEdges[i].id] = otherNode;\n if (this.hierarchical.levels[otherNode.id] < nodeLevel) {\n aboveEdges.push(edge);\n }\n }\n }\n\n // differentiated sum of lengths based on only moving one node over one axis\n let getFx = (point, edges) => {\n let sum = 0;\n for (let i = 0; i < edges.length; i++) {\n if (referenceNodes[edges[i].id] !== undefined) {\n let a = this.direction.getPosition(referenceNodes[edges[i].id]) - point;\n sum += a / Math.sqrt(a * a + C2);\n }\n }\n return sum;\n };\n\n // doubly differentiated sum of lengths based on only moving one node over one axis\n let getDFx = (point, edges) => {\n let sum = 0;\n for (let i = 0; i < edges.length; i++) {\n if (referenceNodes[edges[i].id] !== undefined) {\n let a = this.direction.getPosition(referenceNodes[edges[i].id]) - point;\n sum -= (C2 * Math.pow(a * a + C2, -1.5));\n }\n }\n return sum;\n };\n\n let getGuess = (iterations, edges) => {\n let guess = this.direction.getPosition(node);\n // Newton's method for optimization\n let guessMap = {};\n for (let i = 0; i < iterations; i++) {\n let fx = getFx(guess, edges);\n let dfx = getDFx(guess, edges);\n\n // we limit the movement to avoid instability.\n let limit = 40;\n let ratio = Math.max(-limit, Math.min(limit, Math.round(fx/dfx)));\n guess = guess - ratio;\n // reduce duplicates\n if (guessMap[guess] !== undefined) {\n break;\n }\n guessMap[guess] = i;\n }\n return guess;\n };\n\n let moveBranch = (guess) => {\n // position node if there is space\n let nodePosition = this.direction.getPosition(node);\n\n // check movable area of the branch\n if (branches[node.id] === undefined) {\n let branchNodes = {};\n getBranchNodes(node, branchNodes);\n branches[node.id] = branchNodes;\n }\n let branchBoundary = getBranchBoundary(branches[node.id]);\n let minSpaceBranch = branchBoundary[2];\n let maxSpaceBranch = branchBoundary[3];\n\n let diff = guess - nodePosition;\n\n // check if we are allowed to move the node:\n let branchOffset = 0;\n if (diff > 0) {\n branchOffset = Math.min(diff, maxSpaceBranch - this.options.hierarchical.nodeSpacing);\n }\n else if (diff < 0) {\n branchOffset = -Math.min(-diff, minSpaceBranch - this.options.hierarchical.nodeSpacing);\n }\n\n if (branchOffset != 0) {\n //console.log(\"moving branch:\",branchOffset, maxSpaceBranch, minSpaceBranch)\n this._shiftBlock(node.id, branchOffset);\n //this.body.emitter.emit(\"_redraw\");\n stillShifting = true;\n }\n };\n\n let moveNode = (guess) => {\n let nodePosition = this.direction.getPosition(node);\n\n // position node if there is space\n let [minSpace, maxSpace] = this._getSpaceAroundNode(node);\n let diff = guess - nodePosition;\n // check if we are allowed to move the node:\n let newPosition = nodePosition;\n if (diff > 0) {\n newPosition = Math.min(nodePosition + (maxSpace - this.options.hierarchical.nodeSpacing), guess);\n }\n else if (diff < 0) {\n newPosition = Math.max(nodePosition - (minSpace - this.options.hierarchical.nodeSpacing), guess);\n }\n\n if (newPosition !== nodePosition) {\n //console.log(\"moving Node:\",diff, minSpace, maxSpace);\n this.direction.setPosition(node, newPosition);\n //this.body.emitter.emit(\"_redraw\");\n stillShifting = true;\n }\n };\n\n let guess = getGuess(iterations, aboveEdges);\n moveBranch(guess);\n guess = getGuess(iterations, allEdges);\n moveNode(guess);\n //})\n };\n\n // method to remove whitespace between branches. Because we do bottom up, we can center the parents.\n let minimizeEdgeLengthBottomUp = (iterations) => {\n let levels = this.hierarchical.getLevels();\n levels = levels.reverse();\n for (let i = 0; i < iterations; i++) {\n stillShifting = false;\n for (let j = 0; j < levels.length; j++) {\n let level = levels[j];\n let levelNodes = this.hierarchical.distributionOrdering[level];\n for (let k = 0; k < levelNodes.length; k++) {\n minimizeEdgeLength(1000, levelNodes[k]);\n }\n }\n if (stillShifting !== true) {\n //console.log(\"FINISHED minimizeEdgeLengthBottomUp IN \" + i);\n break;\n }\n }\n };\n\n // method to remove whitespace between branches. Because we do bottom up, we can center the parents.\n let shiftBranchesCloserBottomUp = (iterations) => {\n let levels = this.hierarchical.getLevels();\n levels = levels.reverse();\n for (let i = 0; i < iterations; i++) {\n stillShifting = false;\n shiftElementsCloser(branchShiftCallback, levels, true);\n if (stillShifting !== true) {\n //console.log(\"FINISHED shiftBranchesCloserBottomUp IN \" + (i+1));\n break;\n }\n }\n };\n\n // center all parents\n let centerAllParents = () => {\n for (let nodeId in this.body.nodes) {\n if (this.body.nodes.hasOwnProperty(nodeId))\n this._centerParent(this.body.nodes[nodeId]);\n }\n };\n\n // center all parents\n let centerAllParentsBottomUp = () => {\n let levels = this.hierarchical.getLevels();\n levels = levels.reverse();\n for (let i = 0; i < levels.length; i++) {\n let level = levels[i];\n let levelNodes = this.hierarchical.distributionOrdering[level];\n for (let j = 0; j < levelNodes.length; j++) {\n this._centerParent(levelNodes[j]);\n }\n }\n };\n\n // the actual work is done here.\n if (this.options.hierarchical.blockShifting === true) {\n shiftBranchesCloserBottomUp(5);\n centerAllParents();\n }\n\n // minimize edge length\n if (this.options.hierarchical.edgeMinimization === true) {\n minimizeEdgeLengthBottomUp(20);\n }\n\n if (this.options.hierarchical.parentCentralization === true) {\n centerAllParentsBottomUp()\n }\n\n shiftTrees();\n }\n\n /**\n * This gives the space around the node. IF a map is supplied, it will only check against nodes NOT in the map.\n * This is used to only get the distances to nodes outside of a branch.\n * @param {Node} node\n * @param {{Node.id: vis.Node}} map\n * @returns {number[]}\n * @private\n */\n _getSpaceAroundNode(node, map) {\n let useMap = true;\n if (map === undefined) {\n useMap = false;\n }\n let level = this.hierarchical.levels[node.id];\n if (level !== undefined) {\n let index = this.hierarchical.distributionIndex[node.id];\n let position = this.direction.getPosition(node);\n let ordering = this.hierarchical.distributionOrdering[level];\n let minSpace = 1e9;\n let maxSpace = 1e9;\n if (index !== 0) {\n let prevNode = ordering[index - 1];\n if ((useMap === true && map[prevNode.id] === undefined) || useMap === false) {\n let prevPos = this.direction.getPosition(prevNode);\n minSpace = position - prevPos;\n }\n }\n\n if (index != ordering.length - 1) {\n let nextNode = ordering[index + 1];\n if ((useMap === true && map[nextNode.id] === undefined) || useMap === false) {\n let nextPos = this.direction.getPosition(nextNode);\n maxSpace = Math.min(maxSpace, nextPos - position);\n }\n }\n\n return [minSpace, maxSpace];\n }\n else {\n return [0, 0];\n }\n }\n\n\n /**\n * We use this method to center a parent node and check if it does not cross other nodes when it does.\n * @param {Node} node\n * @private\n */\n _centerParent(node) {\n if (this.hierarchical.parentReference[node.id]) {\n let parents = this.hierarchical.parentReference[node.id];\n for (var i = 0; i < parents.length; i++) {\n let parentId = parents[i];\n let parentNode = this.body.nodes[parentId];\n let children = this.hierarchical.childrenReference[parentId];\n\n if (children !== undefined) {\n // get the range of the children\n let newPosition = this._getCenterPosition(children);\n\n let position = this.direction.getPosition(parentNode);\n let [minSpace, maxSpace] = this._getSpaceAroundNode(parentNode);\n let diff = position - newPosition;\n if ((diff < 0 && Math.abs(diff) < maxSpace - this.options.hierarchical.nodeSpacing) ||\n (diff > 0 && Math.abs(diff) < minSpace - this.options.hierarchical.nodeSpacing)) {\n this.direction.setPosition(parentNode, newPosition);\n }\n }\n }\n }\n }\n\n\n /**\n * This function places the nodes on the canvas based on the hierarchial distribution.\n *\n * @param {Object} distribution | obtained by the function this._getDistribution()\n * @private\n */\n _placeNodesByHierarchy(distribution) {\n this.positionedNodes = {};\n // start placing all the level 0 nodes first. Then recursively position their branches.\n for (let level in distribution) {\n if (distribution.hasOwnProperty(level)) {\n // sort nodes in level by position:\n let nodeArray = Object.keys(distribution[level]);\n nodeArray = this._indexArrayToNodes(nodeArray);\n this.direction.sort(nodeArray);\n let handledNodeCount = 0;\n\n for (let i = 0; i < nodeArray.length; i++) {\n let node = nodeArray[i];\n if (this.positionedNodes[node.id] === undefined) {\n let spacing = this.options.hierarchical.nodeSpacing;\n let pos = spacing * handledNodeCount;\n // We get the X or Y values we need and store them in pos and previousPos.\n // The get and set make sure we get X or Y\n if (handledNodeCount > 0) {\n pos = this.direction.getPosition(nodeArray[i-1]) + spacing;\n }\n this.direction.setPosition(node, pos, level);\n this._validatePositionAndContinue(node, level, pos);\n\n handledNodeCount++;\n }\n }\n }\n }\n }\n\n\n /**\n * This is a recursively called function to enumerate the branches from the largest hubs and place the nodes\n * on a X position that ensures there will be no overlap.\n *\n * @param {Node.id} parentId\n * @param {number} parentLevel\n * @private\n */\n _placeBranchNodes(parentId, parentLevel) {\n let childRef = this.hierarchical.childrenReference[parentId];\n\n // if this is not a parent, cancel the placing. This can happen with multiple parents to one child.\n if (childRef === undefined) {\n return;\n }\n\n // get a list of childNodes\n let childNodes = [];\n for (let i = 0; i < childRef.length; i++) {\n childNodes.push(this.body.nodes[childRef[i]]);\n }\n\n // use the positions to order the nodes.\n this.direction.sort(childNodes);\n\n // position the childNodes\n for (let i = 0; i < childNodes.length; i++) {\n let childNode = childNodes[i];\n let childNodeLevel = this.hierarchical.levels[childNode.id];\n // check if the child node is below the parent node and if it has already been positioned.\n if (childNodeLevel > parentLevel && this.positionedNodes[childNode.id] === undefined) {\n // get the amount of space required for this node. If parent the width is based on the amount of children.\n let spacing = this.options.hierarchical.nodeSpacing;\n let pos;\n\n // we get the X or Y values we need and store them in pos and previousPos.\n // The get and set make sure we get X or Y\n if (i === 0) {\n pos = this.direction.getPosition(this.body.nodes[parentId]);\n } else {\n pos = this.direction.getPosition(childNodes[i-1]) + spacing;\n }\n this.direction.setPosition(childNode, pos, childNodeLevel);\n this._validatePositionAndContinue(childNode, childNodeLevel, pos);\n }\n else {\n return;\n }\n }\n\n // center the parent nodes.\n let center = this._getCenterPosition(childNodes);\n this.direction.setPosition(this.body.nodes[parentId], center, parentLevel);\n }\n\n\n /**\n * This method checks for overlap and if required shifts the branch. It also keeps records of positioned nodes.\n * Finally it will call _placeBranchNodes to place the branch nodes.\n * @param {Node} node\n * @param {number} level\n * @param {number} pos\n * @private\n */\n _validatePositionAndContinue(node, level, pos) {\n // This method only works for formal trees and formal forests\n // Early exit if this is not the case\n if (!this.hierarchical.isTree) return;\n\n // if overlap has been detected, we shift the branch\n if (this.lastNodeOnLevel[level] !== undefined) {\n let previousPos = this.direction.getPosition(this.body.nodes[this.lastNodeOnLevel[level]]);\n if (pos - previousPos < this.options.hierarchical.nodeSpacing) {\n let diff = (previousPos + this.options.hierarchical.nodeSpacing) - pos;\n let sharedParent = this._findCommonParent(this.lastNodeOnLevel[level], node.id);\n this._shiftBlock(sharedParent.withChild, diff);\n }\n }\n\n this.lastNodeOnLevel[level] = node.id; // store change in position.\n this.positionedNodes[node.id] = true;\n this._placeBranchNodes(node.id, level);\n }\n\n /**\n * Receives an array with node indices and returns an array with the actual node references.\n * Used for sorting based on node properties.\n * @param {Array.} idArray\n * @returns {Array.}\n */\n _indexArrayToNodes(idArray) {\n let array = [];\n for (let i = 0; i < idArray.length; i++) {\n array.push(this.body.nodes[idArray[i]])\n }\n return array;\n }\n\n /**\n * This function get the distribution of levels based on hubsize\n *\n * @returns {Object}\n * @private\n */\n _getDistribution() {\n let distribution = {};\n let nodeId, node;\n\n // we fix Y because the hierarchy is vertical,\n // we fix X so we do not give a node an x position for a second time.\n // the fix of X is removed after the x value has been set.\n for (nodeId in this.body.nodes) {\n if (this.body.nodes.hasOwnProperty(nodeId)) {\n node = this.body.nodes[nodeId];\n let level = this.hierarchical.levels[nodeId] === undefined ? 0 : this.hierarchical.levels[nodeId];\n this.direction.fix(node, level);\n if (distribution[level] === undefined) {\n distribution[level] = {};\n }\n distribution[level][nodeId] = node;\n }\n }\n return distribution;\n }\n\n\n /**\n * Return the active (i.e. visible) edges for this node\n *\n * @param {Node} node\n * @returns {Array.} Array of edge instances\n * @private\n */\n _getActiveEdges(node) {\n let result = [];\n\n util.forEach(node.edges, (edge) => { \n if (this.body.edgeIndices.indexOf(edge.id) !== -1) {\n result.push(edge);\n }\n });\n\n return result;\n }\n\n\n /**\n * Get the hubsizes for all active nodes.\n *\n * @returns {number}\n * @private\n */\n _getHubSizes() {\n let hubSizes = {};\n let nodeIds = this.body.nodeIndices;\n\n util.forEach(nodeIds, (nodeId) => { \n let node = this.body.nodes[nodeId];\n let hubSize = this._getActiveEdges(node).length;\n hubSizes[hubSize] = true;\n });\n\n // Make an array of the size sorted descending\n let result = [];\n util.forEach(hubSizes, (size) => { \n result.push(Number(size));\n });\n\n TimSort.sort(result, function(a, b) {\n return b - a;\n });\n\n return result;\n }\n\n\n /**\n * this function allocates nodes in levels based on the recursive branching from the largest hubs.\n *\n * @private\n */\n _determineLevelsByHubsize() {\n let levelDownstream = (nodeA, nodeB) => {\n this.hierarchical.levelDownstream(nodeA, nodeB);\n }\n\n let hubSizes = this._getHubSizes();\n\n for (let i = 0; i < hubSizes.length; ++i ) {\n let hubSize = hubSizes[i];\n if (hubSize === 0) break;\n\n util.forEach(this.body.nodeIndices, (nodeId) => { \n let node = this.body.nodes[nodeId];\n\n if (hubSize === this._getActiveEdges(node).length) {\n this._crawlNetwork(levelDownstream, nodeId);\n }\n });\n }\n }\n\n\n /**\n * TODO: release feature\n * TODO: Determine if this feature is needed at all\n *\n * @private\n */\n _determineLevelsCustomCallback() {\n let minLevel = 100000;\n\n // TODO: this should come from options.\n let customCallback = function(nodeA, nodeB, edge) { // eslint-disable-line no-unused-vars\n\n };\n\n // TODO: perhaps move to HierarchicalStatus.\n // But I currently don't see the point, this method is not used.\n let levelByDirection = (nodeA, nodeB, edge) => {\n let levelA = this.hierarchical.levels[nodeA.id];\n // set initial level\n if (levelA === undefined) { levelA = this.hierarchical.levels[nodeA.id] = minLevel;}\n\n let diff = customCallback(\n NetworkUtil.cloneOptions(nodeA,'node'),\n NetworkUtil.cloneOptions(nodeB,'node'),\n NetworkUtil.cloneOptions(edge,'edge')\n );\n\n this.hierarchical.levels[nodeB.id] = levelA + diff;\n };\n\n this._crawlNetwork(levelByDirection);\n this.hierarchical.setMinLevelToZero(this.body.nodes);\n }\n\n /**\n * Allocate nodes in levels based on the direction of the edges.\n *\n * @private\n */\n _determineLevelsDirected() {\n let minLevel = 10000;\n\n /**\n * Check if there is an edge going the opposite direction for given edge\n *\n * @param {Edge} edge edge to check\n * @returns {boolean} true if there's another edge going into the opposite direction\n */\n let isBidirectional = (edge) => {\n util.forEach(this.body.edges, (otherEdge) => {\n if (otherEdge.toId === edge.fromId && otherEdge.fromId === edge.toId) {\n return true;\n }\n });\n\n return false;\n };\n\n\n let levelByDirection = (nodeA, nodeB, edge) => {\n let levelA = this.hierarchical.levels[nodeA.id];\n let levelB = this.hierarchical.levels[nodeB.id];\n\n if (isBidirectional(edge) && levelA !== undefined && levelB !== undefined) {\n // Don't redo the level determination if already done in this case.\n return;\n }\n\n // set initial level\n if (levelA === undefined) { levelA = this.hierarchical.levels[nodeA.id] = minLevel;}\n if (edge.toId == nodeB.id) {\n this.hierarchical.levels[nodeB.id] = levelA + 1;\n }\n else {\n this.hierarchical.levels[nodeB.id] = levelA - 1;\n }\n };\n\n this._crawlNetwork(levelByDirection);\n this.hierarchical.setMinLevelToZero(this.body.nodes);\n }\n\n\n /**\n * Update the bookkeeping of parent and child.\n * @private\n */\n _generateMap() {\n let fillInRelations = (parentNode, childNode) => {\n if (this.hierarchical.levels[childNode.id] > this.hierarchical.levels[parentNode.id]) {\n this.hierarchical.addRelation(parentNode.id, childNode.id);\n }\n };\n\n this._crawlNetwork(fillInRelations);\n this.hierarchical.checkIfTree();\n }\n\n\n /**\n * Crawl over the entire network and use a callback on each node couple that is connected to each other.\n * @param {function} [callback=function(){}] | will receive nodeA, nodeB and the connecting edge. A and B are distinct.\n * @param {Node.id} startingNodeId\n * @private\n */\n _crawlNetwork(callback = function() {}, startingNodeId) {\n let progress = {};\n\n let crawler = (node, tree) => {\n if (progress[node.id] === undefined) {\n this.hierarchical.setTreeIndex(node, tree);\n\n progress[node.id] = true;\n let childNode;\n let edges = this._getActiveEdges(node);\n for (let i = 0; i < edges.length; i++) {\n let edge = edges[i];\n if (edge.connected === true) {\n if (edge.toId == node.id) { // Not '===' because id's can be string and numeric\n childNode = edge.from;\n }\n else {\n childNode = edge.to;\n }\n\n if (node.id != childNode.id) { // Not '!==' because id's can be string and numeric\n callback(node, childNode, edge);\n crawler(childNode, tree);\n }\n }\n }\n }\n };\n\n\n if (startingNodeId === undefined) {\n // Crawl over all nodes\n let treeIndex = 0; // Serves to pass a unique id for the current distinct tree\n\n for (let i = 0; i < this.body.nodeIndices.length; i++) {\n let nodeId = this.body.nodeIndices[i];\n\n if (progress[nodeId] === undefined) {\n let node = this.body.nodes[nodeId];\n crawler(node, treeIndex);\n treeIndex += 1;\n }\n }\n }\n else {\n // Crawl from the given starting node\n let node = this.body.nodes[startingNodeId];\n if (node === undefined) {\n console.error(\"Node not found:\", startingNodeId);\n return;\n }\n crawler(node);\n }\n }\n\n\n /**\n * Shift a branch a certain distance\n * @param {Node.id} parentId\n * @param {number} diff\n * @private\n */\n _shiftBlock(parentId, diff) {\n let progress = {};\n let shifter = (parentId) => {\n if (progress[parentId]) {\n return;\n }\n progress[parentId] = true;\n this.direction.shift(parentId, diff);\n\n let childRef = this.hierarchical.childrenReference[parentId];\n if (childRef !== undefined) {\n for (let i = 0; i < childRef.length; i++) {\n shifter(childRef[i]);\n }\n }\n };\n shifter(parentId);\n }\n\n\n /**\n * Find a common parent between branches.\n * @param {Node.id} childA\n * @param {Node.id} childB\n * @returns {{foundParent, withChild}}\n * @private\n */\n _findCommonParent(childA,childB) {\n let parents = {};\n let iterateParents = (parents,child) => {\n let parentRef = this.hierarchical.parentReference[child];\n if (parentRef !== undefined) {\n for (let i = 0; i < parentRef.length; i++) {\n let parent = parentRef[i];\n parents[parent] = true;\n iterateParents(parents, parent)\n }\n }\n };\n let findParent = (parents, child) => {\n let parentRef = this.hierarchical.parentReference[child];\n if (parentRef !== undefined) {\n for (let i = 0; i < parentRef.length; i++) {\n let parent = parentRef[i];\n if (parents[parent] !== undefined) {\n return {foundParent:parent, withChild:child};\n }\n let branch = findParent(parents, parent);\n if (branch.foundParent !== null) {\n return branch;\n }\n }\n }\n return {foundParent:null, withChild:child};\n };\n\n iterateParents(parents, childA);\n return findParent(parents, childB);\n }\n\n\n /**\n * Set the strategy pattern for handling the coordinates given the current direction.\n *\n * The individual instances contain all the operations and data specific to a layout direction.\n *\n * @param {Node} node\n * @param {{x: number, y: number}} position\n * @param {number} level\n * @param {boolean} [doNotUpdate=false]\n * @private\n */\n setDirectionStrategy() {\n var isVertical = (this.options.hierarchical.direction === 'UD'\n || this.options.hierarchical.direction === 'DU');\n\n if(isVertical) {\n this.direction = new VerticalStrategy(this); \n } else {\n this.direction = new HorizontalStrategy(this); \n }\n }\n\n\n /**\n * Determine the center position of a branch from the passed list of child nodes\n *\n * This takes into account the positions of all the child nodes.\n * @param {Array.} childNodes Array of either child nodes or node id's\n * @return {number}\n * @private\n */\n _getCenterPosition(childNodes) {\n let minPos = 1e9;\n let maxPos = -1e9;\n\n for (let i = 0; i < childNodes.length; i++) {\n let childNode;\n if (childNodes[i].id !== undefined) {\n childNode = childNodes[i];\n } else {\n let childNodeId = childNodes[i];\n childNode = this.body.nodes[childNodeId];\n }\n\n let position = this.direction.getPosition(childNode);\n minPos = Math.min(minPos, position);\n maxPos = Math.max(maxPos, position);\n }\n\n return 0.5 * (minPos + maxPos);\n }\n}\n\nexport default LayoutEngine;\n","import './ManipulationSystem.css';\n\nimport util from 'vis-util';\nimport Hammer from '../../module/hammer';\nimport hammerUtil from '../../hammerUtil';\n\n/**\n * Clears the toolbar div element of children\n *\n * @private\n */\nclass ManipulationSystem {\n /**\n * @param {Object} body\n * @param {Canvas} canvas\n * @param {SelectionHandler} selectionHandler\n */\n constructor(body, canvas, selectionHandler) {\n this.body = body;\n this.canvas = canvas;\n this.selectionHandler = selectionHandler;\n\n this.editMode = false;\n this.manipulationDiv = undefined;\n this.editModeDiv = undefined;\n this.closeDiv = undefined;\n\n this.manipulationHammers = [];\n this.temporaryUIFunctions = {};\n this.temporaryEventFunctions = [];\n\n this.touchTime = 0;\n this.temporaryIds = {nodes: [], edges:[]};\n this.guiEnabled = false;\n this.inMode = false;\n this.selectedControlNode = undefined;\n\n this.options = {};\n this.defaultOptions = {\n enabled: false,\n initiallyActive: false,\n addNode: true,\n addEdge: true,\n editNode: undefined,\n editEdge: true,\n deleteNode: true,\n deleteEdge: true,\n controlNodeStyle:{\n shape:'dot',\n size:6,\n color: {background: '#ff0000', border: '#3c3c3c', highlight: {background: '#07f968', border: '#3c3c3c'}},\n borderWidth: 2,\n borderWidthSelected: 2\n }\n };\n util.extend(this.options, this.defaultOptions);\n\n this.body.emitter.on('destroy', () => {this._clean();});\n this.body.emitter.on('_dataChanged',this._restore.bind(this));\n this.body.emitter.on('_resetData', this._restore.bind(this));\n }\n\n\n /**\n * If something changes in the data during editing, switch back to the initial datamanipulation state and close all edit modes.\n * @private\n */\n _restore() {\n if (this.inMode !== false) {\n if (this.options.initiallyActive === true) {\n this.enableEditMode();\n }\n else {\n this.disableEditMode();\n }\n }\n }\n\n /**\n * Set the Options\n *\n * @param {Object} options\n * @param {Object} allOptions\n * @param {Object} globalOptions\n */\n setOptions(options, allOptions, globalOptions) {\n if (allOptions !== undefined) {\n if (allOptions.locale !== undefined) {this.options.locale = allOptions.locale} else {this.options.locale = globalOptions.locale;}\n if (allOptions.locales !== undefined) {this.options.locales = allOptions.locales} else {this.options.locales = globalOptions.locales;}\n }\n\n if (options !== undefined) {\n if (typeof options === 'boolean') {\n this.options.enabled = options;\n }\n else {\n this.options.enabled = true;\n util.deepExtend(this.options, options);\n }\n if (this.options.initiallyActive === true) {\n this.editMode = true;\n }\n this._setup();\n }\n }\n\n\n /**\n * Enable or disable edit-mode. Draws the DOM required and cleans up after itself.\n *\n * @private\n */\n toggleEditMode() {\n if (this.editMode === true) {\n this.disableEditMode();\n }\n else {\n this.enableEditMode();\n }\n }\n\n\n /**\n * Enables Edit Mode\n */\n enableEditMode() {\n this.editMode = true;\n\n this._clean();\n if (this.guiEnabled === true) {\n this.manipulationDiv.style.display = 'block';\n this.closeDiv.style.display = 'block';\n this.editModeDiv.style.display = 'none';\n this.showManipulatorToolbar();\n }\n }\n\n /**\n * Disables Edit Mode\n */\n disableEditMode() {\n this.editMode = false;\n\n this._clean();\n if (this.guiEnabled === true) {\n this.manipulationDiv.style.display = 'none';\n this.closeDiv.style.display = 'none';\n this.editModeDiv.style.display = 'block';\n this._createEditButton();\n }\n }\n\n /**\n * Creates the main toolbar. Removes functions bound to the select event. Binds all the buttons of the toolbar.\n *\n * @private\n */\n showManipulatorToolbar() {\n // restore the state of any bound functions or events, remove control nodes, restore physics\n this._clean();\n\n // reset global variables\n this.manipulationDOM = {};\n\n // if the gui is enabled, draw all elements.\n if (this.guiEnabled === true) {\n // a _restore will hide these menus\n this.editMode = true;\n this.manipulationDiv.style.display = 'block';\n this.closeDiv.style.display = 'block';\n\n let selectedNodeCount = this.selectionHandler._getSelectedNodeCount();\n let selectedEdgeCount = this.selectionHandler._getSelectedEdgeCount();\n let selectedTotalCount = selectedNodeCount + selectedEdgeCount;\n let locale = this.options.locales[this.options.locale];\n let needSeperator = false;\n\n\n if (this.options.addNode !== false) {\n this._createAddNodeButton(locale);\n needSeperator = true;\n }\n if (this.options.addEdge !== false) {\n if (needSeperator === true) {\n this._createSeperator(1);\n } else {\n needSeperator = true;\n }\n this._createAddEdgeButton(locale);\n }\n\n if (selectedNodeCount === 1 && typeof this.options.editNode === 'function') {\n if (needSeperator === true) {\n this._createSeperator(2);\n } else {\n needSeperator = true;\n }\n this._createEditNodeButton(locale);\n }\n else if (selectedEdgeCount === 1 && selectedNodeCount === 0 && this.options.editEdge !== false) {\n if (needSeperator === true) {\n this._createSeperator(3);\n } else {\n needSeperator = true;\n }\n this._createEditEdgeButton(locale);\n }\n\n // remove buttons\n if (selectedTotalCount !== 0) {\n if (selectedNodeCount > 0 && this.options.deleteNode !== false) {\n if (needSeperator === true) {\n this._createSeperator(4);\n }\n this._createDeleteButton(locale);\n }\n else if (selectedNodeCount === 0 && this.options.deleteEdge !== false) {\n if (needSeperator === true) {\n this._createSeperator(4);\n }\n this._createDeleteButton(locale);\n }\n }\n\n // bind the close button\n this._bindHammerToDiv(this.closeDiv, this.toggleEditMode.bind(this));\n\n // refresh this bar based on what has been selected\n this._temporaryBindEvent('select', this.showManipulatorToolbar.bind(this));\n }\n\n // redraw to show any possible changes\n this.body.emitter.emit('_redraw');\n\n }\n\n\n /**\n * Create the toolbar for adding Nodes\n */\n addNodeMode() {\n // when using the gui, enable edit mode if it wasnt already.\n if (this.editMode !== true) {\n this.enableEditMode();\n }\n\n // restore the state of any bound functions or events, remove control nodes, restore physics\n this._clean();\n\n this.inMode = 'addNode';\n if (this.guiEnabled === true) {\n let locale = this.options.locales[this.options.locale];\n this.manipulationDOM = {};\n this._createBackButton(locale);\n this._createSeperator();\n this._createDescription(locale['addDescription'] || this.options.locales['en']['addDescription']);\n\n // bind the close button\n this._bindHammerToDiv(this.closeDiv, this.toggleEditMode.bind(this));\n }\n\n this._temporaryBindEvent('click', this._performAddNode.bind(this));\n }\n\n /**\n * call the bound function to handle the editing of the node. The node has to be selected.\n */\n editNode() {\n // when using the gui, enable edit mode if it wasnt already.\n if (this.editMode !== true) {\n this.enableEditMode();\n }\n\n // restore the state of any bound functions or events, remove control nodes, restore physics\n this._clean();\n let node = this.selectionHandler._getSelectedNode();\n if (node !== undefined) {\n this.inMode = 'editNode';\n if (typeof this.options.editNode === 'function') {\n if (node.isCluster !== true) {\n let data = util.deepExtend({}, node.options, false);\n data.x = node.x;\n data.y = node.y;\n\n if (this.options.editNode.length === 2) {\n this.options.editNode(data, (finalizedData) => {\n if (finalizedData !== null && finalizedData !== undefined && this.inMode === 'editNode') { // if for whatever reason the mode has changes (due to dataset change) disregard the callback) {\n this.body.data.nodes.getDataSet().update(finalizedData);\n }\n this.showManipulatorToolbar();\n });\n }\n else {\n throw new Error('The function for edit does not support two arguments (data, callback)');\n }\n }\n else {\n alert(this.options.locales[this.options.locale]['editClusterError'] || this.options.locales['en']['editClusterError']);\n }\n }\n else {\n throw new Error('No function has been configured to handle the editing of nodes.');\n }\n }\n else {\n this.showManipulatorToolbar();\n }\n }\n\n\n /**\n * create the toolbar to connect nodes\n */\n addEdgeMode() {\n // when using the gui, enable edit mode if it wasnt already.\n if (this.editMode !== true) {\n this.enableEditMode();\n }\n\n // restore the state of any bound functions or events, remove control nodes, restore physics\n this._clean();\n\n this.inMode = 'addEdge';\n if (this.guiEnabled === true) {\n let locale = this.options.locales[this.options.locale];\n this.manipulationDOM = {};\n this._createBackButton(locale);\n this._createSeperator();\n this._createDescription(locale['edgeDescription'] || this.options.locales['en']['edgeDescription']);\n\n // bind the close button\n this._bindHammerToDiv(this.closeDiv, this.toggleEditMode.bind(this));\n }\n\n // temporarily overload functions\n this._temporaryBindUI('onTouch', this._handleConnect.bind(this));\n this._temporaryBindUI('onDragEnd', this._finishConnect.bind(this));\n this._temporaryBindUI('onDrag', this._dragControlNode.bind(this));\n this._temporaryBindUI('onRelease', this._finishConnect.bind(this));\n this._temporaryBindUI('onDragStart',this._dragStartEdge.bind(this));\n this._temporaryBindUI('onHold', () => {});\n }\n\n /**\n * create the toolbar to edit edges\n */\n editEdgeMode() {\n // when using the gui, enable edit mode if it wasn't already.\n if (this.editMode !== true) {\n this.enableEditMode();\n }\n\n // restore the state of any bound functions or events, remove control nodes, restore physics\n this._clean();\n\n this.inMode = 'editEdge';\n if (typeof this.options.editEdge === 'object' && typeof this.options.editEdge.editWithoutDrag === \"function\") {\n this.edgeBeingEditedId = this.selectionHandler.getSelectedEdges()[0];\n if (this.edgeBeingEditedId !== undefined) {\n var edge = this.body.edges[this.edgeBeingEditedId];\n this._performEditEdge(edge.from, edge.to);\n return;\n }\n }\n if (this.guiEnabled === true) {\n let locale = this.options.locales[this.options.locale];\n this.manipulationDOM = {};\n this._createBackButton(locale);\n this._createSeperator();\n this._createDescription(locale['editEdgeDescription'] || this.options.locales['en']['editEdgeDescription']);\n\n // bind the close button\n this._bindHammerToDiv(this.closeDiv, this.toggleEditMode.bind(this));\n }\n\n this.edgeBeingEditedId = this.selectionHandler.getSelectedEdges()[0];\n if (this.edgeBeingEditedId !== undefined) {\n let edge = this.body.edges[this.edgeBeingEditedId];\n\n // create control nodes\n let controlNodeFrom = this._getNewTargetNode(edge.from.x, edge.from.y);\n let controlNodeTo = this._getNewTargetNode(edge.to.x, edge.to.y);\n\n this.temporaryIds.nodes.push(controlNodeFrom.id);\n this.temporaryIds.nodes.push(controlNodeTo.id);\n\n this.body.nodes[controlNodeFrom.id] = controlNodeFrom;\n this.body.nodeIndices.push(controlNodeFrom.id);\n this.body.nodes[controlNodeTo.id] = controlNodeTo;\n this.body.nodeIndices.push(controlNodeTo.id);\n\n // temporarily overload UI functions, cleaned up automatically because of _temporaryBindUI\n this._temporaryBindUI('onTouch', this._controlNodeTouch.bind(this)); // used to get the position\n this._temporaryBindUI('onTap', () => {}); // disabled\n this._temporaryBindUI('onHold', () => {}); // disabled\n this._temporaryBindUI('onDragStart', this._controlNodeDragStart.bind(this));// used to select control node\n this._temporaryBindUI('onDrag', this._controlNodeDrag.bind(this)); // used to drag control node\n this._temporaryBindUI('onDragEnd', this._controlNodeDragEnd.bind(this)); // used to connect or revert control nodes\n this._temporaryBindUI('onMouseMove', () => {}); // disabled\n\n // create function to position control nodes correctly on movement\n // automatically cleaned up because we use the temporary bind\n this._temporaryBindEvent('beforeDrawing', (ctx) => {\n let positions = edge.edgeType.findBorderPositions(ctx);\n if (controlNodeFrom.selected === false) {\n controlNodeFrom.x = positions.from.x;\n controlNodeFrom.y = positions.from.y;\n }\n if (controlNodeTo.selected === false) {\n controlNodeTo.x = positions.to.x;\n controlNodeTo.y = positions.to.y;\n }\n });\n\n this.body.emitter.emit('_redraw');\n }\n else {\n this.showManipulatorToolbar();\n }\n }\n\n /**\n * delete everything in the selection\n */\n deleteSelected() {\n // when using the gui, enable edit mode if it wasnt already.\n if (this.editMode !== true) {\n this.enableEditMode();\n }\n\n // restore the state of any bound functions or events, remove control nodes, restore physics\n this._clean();\n\n this.inMode = 'delete';\n let selectedNodes = this.selectionHandler.getSelectedNodes();\n let selectedEdges = this.selectionHandler.getSelectedEdges();\n let deleteFunction = undefined;\n if (selectedNodes.length > 0) {\n for (let i = 0; i < selectedNodes.length; i++) {\n if (this.body.nodes[selectedNodes[i]].isCluster === true) {\n alert(this.options.locales[this.options.locale]['deleteClusterError'] || this.options.locales['en']['deleteClusterError']);\n return;\n }\n }\n\n if (typeof this.options.deleteNode === 'function') {\n deleteFunction = this.options.deleteNode;\n }\n }\n else if (selectedEdges.length > 0) {\n if (typeof this.options.deleteEdge === 'function') {\n deleteFunction = this.options.deleteEdge;\n }\n }\n\n if (typeof deleteFunction === 'function') {\n let data = {nodes: selectedNodes, edges: selectedEdges};\n if (deleteFunction.length === 2) {\n deleteFunction(data, (finalizedData) => {\n if (finalizedData !== null && finalizedData !== undefined && this.inMode === 'delete') { // if for whatever reason the mode has changes (due to dataset change) disregard the callback) {\n this.body.data.edges.getDataSet().remove(finalizedData.edges);\n this.body.data.nodes.getDataSet().remove(finalizedData.nodes);\n this.body.emitter.emit('startSimulation');\n this.showManipulatorToolbar();\n }\n else {\n this.body.emitter.emit('startSimulation');\n this.showManipulatorToolbar();\n }\n });\n }\n else {\n throw new Error('The function for delete does not support two arguments (data, callback)')\n }\n }\n else {\n this.body.data.edges.getDataSet().remove(selectedEdges);\n this.body.data.nodes.getDataSet().remove(selectedNodes);\n this.body.emitter.emit('startSimulation');\n this.showManipulatorToolbar();\n }\n }\n\n\n\n\n //********************************************** PRIVATE ***************************************//\n\n /**\n * draw or remove the DOM\n * @private\n */\n _setup() {\n if (this.options.enabled === true) {\n // Enable the GUI\n this.guiEnabled = true;\n\n this._createWrappers();\n if (this.editMode === false) {\n this._createEditButton();\n }\n else {\n this.showManipulatorToolbar();\n }\n }\n else {\n this._removeManipulationDOM();\n\n // disable the gui\n this.guiEnabled = false;\n }\n }\n\n\n /**\n * create the div overlays that contain the DOM\n * @private\n */\n _createWrappers() {\n // load the manipulator HTML elements. All styling done in css.\n if (this.manipulationDiv === undefined) {\n this.manipulationDiv = document.createElement('div');\n this.manipulationDiv.className = 'vis-manipulation';\n if (this.editMode === true) {\n this.manipulationDiv.style.display = 'block';\n }\n else {\n this.manipulationDiv.style.display = 'none';\n }\n this.canvas.frame.appendChild(this.manipulationDiv);\n }\n\n // container for the edit button.\n if (this.editModeDiv === undefined) {\n this.editModeDiv = document.createElement('div');\n this.editModeDiv.className = 'vis-edit-mode';\n if (this.editMode === true) {\n this.editModeDiv.style.display = 'none';\n }\n else {\n this.editModeDiv.style.display = 'block';\n }\n this.canvas.frame.appendChild(this.editModeDiv);\n }\n\n\n // container for the close div button\n if (this.closeDiv === undefined) {\n this.closeDiv = document.createElement('div');\n this.closeDiv.className = 'vis-close';\n this.closeDiv.style.display = this.manipulationDiv.style.display;\n this.canvas.frame.appendChild(this.closeDiv);\n }\n }\n\n\n /**\n * generate a new target node. Used for creating new edges and editing edges\n *\n * @param {number} x\n * @param {number} y\n * @returns {Node}\n * @private\n */\n _getNewTargetNode(x,y) {\n let controlNodeStyle = util.deepExtend({}, this.options.controlNodeStyle);\n\n controlNodeStyle.id = 'targetNode' + util.randomUUID();\n controlNodeStyle.hidden = false;\n controlNodeStyle.physics = false;\n controlNodeStyle.x = x;\n controlNodeStyle.y = y;\n\n // we have to define the bounding box in order for the nodes to be drawn immediately\n let node = this.body.functions.createNode(controlNodeStyle);\n node.shape.boundingBox = {left: x, right:x, top:y, bottom:y};\n\n return node;\n }\n\n\n /**\n * Create the edit button\n */\n _createEditButton() {\n // restore everything to it's original state (if applicable)\n this._clean();\n\n // reset the manipulationDOM\n this.manipulationDOM = {};\n\n // empty the editModeDiv\n util.recursiveDOMDelete(this.editModeDiv);\n\n\n // create the contents for the editMode button\n let locale = this.options.locales[this.options.locale];\n let button = this._createButton('editMode', 'vis-button vis-edit vis-edit-mode', locale['edit'] || this.options.locales['en']['edit']);\n this.editModeDiv.appendChild(button);\n\n // bind a hammer listener to the button, calling the function toggleEditMode.\n this._bindHammerToDiv(button, this.toggleEditMode.bind(this));\n }\n\n\n /**\n * this function cleans up after everything this module does. Temporary elements, functions and events are removed, physics restored, hammers removed.\n * @private\n */\n _clean() {\n // not in mode\n this.inMode = false;\n\n // _clean the divs\n if (this.guiEnabled === true) {\n util.recursiveDOMDelete(this.editModeDiv);\n util.recursiveDOMDelete(this.manipulationDiv);\n\n // removes all the bindings and overloads\n this._cleanManipulatorHammers();\n }\n\n // remove temporary nodes and edges\n this._cleanupTemporaryNodesAndEdges();\n\n // restore overloaded UI functions\n this._unbindTemporaryUIs();\n\n // remove the temporaryEventFunctions\n this._unbindTemporaryEvents();\n\n // restore the physics if required\n this.body.emitter.emit('restorePhysics');\n }\n\n\n /**\n * Each dom element has it's own hammer. They are stored in this.manipulationHammers. This cleans them up.\n * @private\n */\n _cleanManipulatorHammers() {\n // _clean hammer bindings\n if (this.manipulationHammers.length != 0) {\n for (let i = 0; i < this.manipulationHammers.length; i++) {\n this.manipulationHammers[i].destroy();\n }\n this.manipulationHammers = [];\n }\n }\n\n\n /**\n * Remove all DOM elements created by this module.\n * @private\n */\n _removeManipulationDOM() {\n // removes all the bindings and overloads\n this._clean();\n\n // empty the manipulation divs\n util.recursiveDOMDelete(this.manipulationDiv);\n util.recursiveDOMDelete(this.editModeDiv);\n util.recursiveDOMDelete(this.closeDiv);\n\n // remove the manipulation divs\n if (this.manipulationDiv) {this.canvas.frame.removeChild(this.manipulationDiv);}\n if (this.editModeDiv) {this.canvas.frame.removeChild(this.editModeDiv);}\n if (this.closeDiv) {this.canvas.frame.removeChild(this.closeDiv);}\n\n // set the references to undefined\n this.manipulationDiv = undefined;\n this.editModeDiv = undefined;\n this.closeDiv = undefined;\n }\n\n\n /**\n * create a seperator line. the index is to differentiate in the manipulation dom\n * @param {number} [index=1]\n * @private\n */\n _createSeperator(index = 1) {\n this.manipulationDOM['seperatorLineDiv' + index] = document.createElement('div');\n this.manipulationDOM['seperatorLineDiv' + index].className = 'vis-separator-line';\n this.manipulationDiv.appendChild(this.manipulationDOM['seperatorLineDiv' + index]);\n }\n\n // ---------------------- DOM functions for buttons --------------------------//\n\n /**\n *\n * @param {Locale} locale\n * @private\n */\n _createAddNodeButton(locale) {\n let button = this._createButton('addNode', 'vis-button vis-add', locale['addNode'] || this.options.locales['en']['addNode']);\n this.manipulationDiv.appendChild(button);\n this._bindHammerToDiv(button, this.addNodeMode.bind(this));\n }\n\n /**\n *\n * @param {Locale} locale\n * @private\n */\n _createAddEdgeButton(locale) {\n let button = this._createButton('addEdge', 'vis-button vis-connect', locale['addEdge'] || this.options.locales['en']['addEdge']);\n this.manipulationDiv.appendChild(button);\n this._bindHammerToDiv(button, this.addEdgeMode.bind(this));\n }\n\n /**\n *\n * @param {Locale} locale\n * @private\n */\n _createEditNodeButton(locale) {\n let button = this._createButton('editNode', 'vis-button vis-edit', locale['editNode'] || this.options.locales['en']['editNode']);\n this.manipulationDiv.appendChild(button);\n this._bindHammerToDiv(button, this.editNode.bind(this));\n }\n\n /**\n *\n * @param {Locale} locale\n * @private\n */\n _createEditEdgeButton(locale) {\n let button = this._createButton('editEdge', 'vis-button vis-edit', locale['editEdge'] || this.options.locales['en']['editEdge']);\n this.manipulationDiv.appendChild(button);\n this._bindHammerToDiv(button, this.editEdgeMode.bind(this));\n }\n\n /**\n *\n * @param {Locale} locale\n * @private\n */\n _createDeleteButton(locale) {\n var deleteBtnClass;\n if (this.options.rtl) {\n deleteBtnClass = 'vis-button vis-delete-rtl';\n } else {\n deleteBtnClass = 'vis-button vis-delete';\n }\n let button = this._createButton('delete', deleteBtnClass, locale['del'] || this.options.locales['en']['del']);\n this.manipulationDiv.appendChild(button);\n this._bindHammerToDiv(button, this.deleteSelected.bind(this));\n }\n\n /**\n *\n * @param {Locale} locale\n * @private\n */\n _createBackButton(locale) {\n let button = this._createButton('back', 'vis-button vis-back', locale['back'] || this.options.locales['en']['back']);\n this.manipulationDiv.appendChild(button);\n this._bindHammerToDiv(button, this.showManipulatorToolbar.bind(this));\n }\n\n /**\n *\n * @param {number|string} id\n * @param {string} className\n * @param {label} label\n * @param {string} labelClassName\n * @returns {HTMLElement}\n * @private\n */\n _createButton(id, className, label, labelClassName = 'vis-label') {\n\n this.manipulationDOM[id+'Div'] = document.createElement('div');\n this.manipulationDOM[id+'Div'].className = className;\n this.manipulationDOM[id+'Label'] = document.createElement('div');\n this.manipulationDOM[id+'Label'].className = labelClassName;\n this.manipulationDOM[id+'Label'].innerHTML = label;\n this.manipulationDOM[id+'Div'].appendChild(this.manipulationDOM[id+'Label']);\n return this.manipulationDOM[id+'Div'];\n }\n\n /**\n *\n * @param {Label} label\n * @private\n */\n _createDescription(label) {\n this.manipulationDiv.appendChild(\n this._createButton('description', 'vis-button vis-none', label)\n );\n }\n\n // -------------------------- End of DOM functions for buttons ------------------------------//\n\n /**\n * this binds an event until cleanup by the clean functions.\n * @param {Event} event The event\n * @param {function} newFunction\n * @private\n */\n _temporaryBindEvent(event, newFunction) {\n this.temporaryEventFunctions.push({event:event, boundFunction:newFunction});\n this.body.emitter.on(event, newFunction);\n }\n\n /**\n * this overrides an UI function until cleanup by the clean function\n * @param {string} UIfunctionName\n * @param {function} newFunction\n * @private\n */\n _temporaryBindUI(UIfunctionName, newFunction) {\n if (this.body.eventListeners[UIfunctionName] !== undefined) {\n this.temporaryUIFunctions[UIfunctionName] = this.body.eventListeners[UIfunctionName];\n this.body.eventListeners[UIfunctionName] = newFunction;\n }\n else {\n throw new Error('This UI function does not exist. Typo? You tried: ' + UIfunctionName + ' possible are: ' + JSON.stringify(Object.keys(this.body.eventListeners)));\n }\n }\n\n /**\n * Restore the overridden UI functions to their original state.\n *\n * @private\n */\n _unbindTemporaryUIs() {\n for (let functionName in this.temporaryUIFunctions) {\n if (this.temporaryUIFunctions.hasOwnProperty(functionName)) {\n this.body.eventListeners[functionName] = this.temporaryUIFunctions[functionName];\n delete this.temporaryUIFunctions[functionName];\n }\n }\n this.temporaryUIFunctions = {};\n }\n\n /**\n * Unbind the events created by _temporaryBindEvent\n * @private\n */\n _unbindTemporaryEvents() {\n for (let i = 0; i < this.temporaryEventFunctions.length; i++) {\n let eventName = this.temporaryEventFunctions[i].event;\n let boundFunction = this.temporaryEventFunctions[i].boundFunction;\n this.body.emitter.off(eventName, boundFunction);\n }\n this.temporaryEventFunctions = [];\n }\n\n /**\n * Bind an hammer instance to a DOM element.\n *\n * @param {Element} domElement\n * @param {function} boundFunction\n */\n _bindHammerToDiv(domElement, boundFunction) {\n let hammer = new Hammer(domElement, {});\n hammerUtil.onTouch(hammer, boundFunction);\n this.manipulationHammers.push(hammer);\n }\n\n\n /**\n * Neatly clean up temporary edges and nodes\n * @private\n */\n _cleanupTemporaryNodesAndEdges() {\n // _clean temporary edges\n for (let i = 0; i < this.temporaryIds.edges.length; i++) {\n this.body.edges[this.temporaryIds.edges[i]].disconnect();\n delete this.body.edges[this.temporaryIds.edges[i]];\n let indexTempEdge = this.body.edgeIndices.indexOf(this.temporaryIds.edges[i]);\n if (indexTempEdge !== -1) {this.body.edgeIndices.splice(indexTempEdge,1);}\n }\n\n // _clean temporary nodes\n for (let i = 0; i < this.temporaryIds.nodes.length; i++) {\n delete this.body.nodes[this.temporaryIds.nodes[i]];\n let indexTempNode = this.body.nodeIndices.indexOf(this.temporaryIds.nodes[i]);\n if (indexTempNode !== -1) {this.body.nodeIndices.splice(indexTempNode,1);}\n }\n\n this.temporaryIds = {nodes: [], edges: []};\n }\n\n // ------------------------------------------ EDIT EDGE FUNCTIONS -----------------------------------------//\n\n /**\n * the touch is used to get the position of the initial click\n * @param {Event} event The event\n * @private\n */\n _controlNodeTouch(event) {\n this.selectionHandler.unselectAll();\n this.lastTouch = this.body.functions.getPointer(event.center);\n this.lastTouch.translation = util.extend({},this.body.view.translation); // copy the object\n }\n\n\n /**\n * the drag start is used to mark one of the control nodes as selected.\n * @param {Event} event The event\n * @private\n */\n _controlNodeDragStart(event) { // eslint-disable-line no-unused-vars\n let pointer = this.lastTouch;\n let pointerObj = this.selectionHandler._pointerToPositionObject(pointer);\n let from = this.body.nodes[this.temporaryIds.nodes[0]];\n let to = this.body.nodes[this.temporaryIds.nodes[1]];\n let edge = this.body.edges[this.edgeBeingEditedId];\n this.selectedControlNode = undefined;\n\n let fromSelect = from.isOverlappingWith(pointerObj);\n let toSelect = to.isOverlappingWith(pointerObj);\n\n if (fromSelect === true) {\n this.selectedControlNode = from;\n edge.edgeType.from = from;\n }\n else if (toSelect === true) {\n this.selectedControlNode = to;\n edge.edgeType.to = to;\n }\n\n // we use the selection to find the node that is being dragged. We explicitly select it here.\n if (this.selectedControlNode !== undefined) {\n this.selectionHandler.selectObject(this.selectedControlNode)\n }\n\n this.body.emitter.emit('_redraw');\n }\n\n /**\n * dragging the control nodes or the canvas\n * @param {Event} event The event\n * @private\n */\n _controlNodeDrag(event) {\n this.body.emitter.emit('disablePhysics');\n let pointer = this.body.functions.getPointer(event.center);\n let pos = this.canvas.DOMtoCanvas(pointer);\n if (this.selectedControlNode !== undefined) {\n this.selectedControlNode.x = pos.x;\n this.selectedControlNode.y = pos.y;\n }\n else {\n // if the drag was not started properly because the click started outside the network div, start it now.\n let diffX = pointer.x - this.lastTouch.x;\n let diffY = pointer.y - this.lastTouch.y;\n this.body.view.translation = {x:this.lastTouch.translation.x + diffX, y:this.lastTouch.translation.y + diffY};\n }\n this.body.emitter.emit('_redraw');\n }\n\n\n /**\n * connecting or restoring the control nodes.\n * @param {Event} event The event\n * @private\n */\n _controlNodeDragEnd(event) {\n let pointer = this.body.functions.getPointer(event.center);\n let pointerObj = this.selectionHandler._pointerToPositionObject(pointer);\n let edge = this.body.edges[this.edgeBeingEditedId];\n // if the node that was dragged is not a control node, return\n if (this.selectedControlNode === undefined) {\n return;\n }\n\n // we use the selection to find the node that is being dragged. We explicitly DEselect the control node here.\n this.selectionHandler.unselectAll();\n let overlappingNodeIds = this.selectionHandler._getAllNodesOverlappingWith(pointerObj);\n let node = undefined;\n for (let i = overlappingNodeIds.length-1; i >= 0; i--) {\n if (overlappingNodeIds[i] !== this.selectedControlNode.id) {\n node = this.body.nodes[overlappingNodeIds[i]];\n break;\n }\n }\n // perform the connection\n if (node !== undefined && this.selectedControlNode !== undefined) {\n if (node.isCluster === true) {\n alert(this.options.locales[this.options.locale]['createEdgeError'] || this.options.locales['en']['createEdgeError'])\n }\n else {\n let from = this.body.nodes[this.temporaryIds.nodes[0]];\n if (this.selectedControlNode.id === from.id) {\n this._performEditEdge(node.id, edge.to.id);\n }\n else {\n this._performEditEdge(edge.from.id, node.id);\n }\n }\n }\n else {\n edge.updateEdgeType();\n this.body.emitter.emit('restorePhysics');\n }\n\n this.body.emitter.emit('_redraw');\n }\n\n // ------------------------------------ END OF EDIT EDGE FUNCTIONS -----------------------------------------//\n\n\n\n // ------------------------------------------- ADD EDGE FUNCTIONS -----------------------------------------//\n /**\n * the function bound to the selection event. It checks if you want to connect a cluster and changes the description\n * to walk the user through the process.\n *\n * @param {Event} event\n * @private\n */\n _handleConnect(event) {\n // check to avoid double fireing of this function.\n if (new Date().valueOf() - this.touchTime > 100) {\n this.lastTouch = this.body.functions.getPointer(event.center);\n this.lastTouch.translation = util.extend({},this.body.view.translation); // copy the object\n\n let pointer = this.lastTouch;\n let node = this.selectionHandler.getNodeAt(pointer);\n\n if (node !== undefined) {\n if (node.isCluster === true) {\n alert(this.options.locales[this.options.locale]['createEdgeError'] || this.options.locales['en']['createEdgeError'])\n }\n else {\n // create a node the temporary line can look at\n let targetNode = this._getNewTargetNode(node.x,node.y);\n this.body.nodes[targetNode.id] = targetNode;\n this.body.nodeIndices.push(targetNode.id);\n\n // create a temporary edge\n let connectionEdge = this.body.functions.createEdge({\n id: 'connectionEdge' + util.randomUUID(),\n from: node.id,\n to: targetNode.id,\n physics: false,\n smooth: {\n enabled: true,\n type: 'continuous',\n roundness: 0.5\n }\n });\n this.body.edges[connectionEdge.id] = connectionEdge;\n this.body.edgeIndices.push(connectionEdge.id);\n\n this.temporaryIds.nodes.push(targetNode.id);\n this.temporaryIds.edges.push(connectionEdge.id);\n }\n }\n this.touchTime = new Date().valueOf();\n }\n }\n\n /**\n *\n * @param {Event} event\n * @private\n */\n _dragControlNode(event) {\n let pointer = this.body.functions.getPointer(event.center);\n\n var pointerObj = this.selectionHandler._pointerToPositionObject(pointer);\n // remember the edge id\n var connectFromId = undefined;\n if (this.temporaryIds.edges[0] !== undefined) {\n connectFromId = this.body.edges[this.temporaryIds.edges[0]].fromId;\n }\n\n // get the overlapping node but NOT the temporary node;\n var overlappingNodeIds = this.selectionHandler._getAllNodesOverlappingWith(pointerObj);\n var node = undefined;\n for (var i = overlappingNodeIds.length - 1; i >= 0; i--) {\n // if the node id is NOT a temporary node, accept the node.\n if (this.temporaryIds.nodes.indexOf(overlappingNodeIds[i]) === -1) {\n node = this.body.nodes[overlappingNodeIds[i]];\n break;\n }\n }\n \n event.controlEdge = { from: connectFromId, to: node ? node.id : undefined };\n this.selectionHandler._generateClickEvent('controlNodeDragging', event, pointer);\n\n if (this.temporaryIds.nodes[0] !== undefined) {\n let targetNode = this.body.nodes[this.temporaryIds.nodes[0]]; // there is only one temp node in the add edge mode.\n targetNode.x = this.canvas._XconvertDOMtoCanvas(pointer.x);\n targetNode.y = this.canvas._YconvertDOMtoCanvas(pointer.y);\n this.body.emitter.emit('_redraw');\n }\n else {\n let diffX = pointer.x - this.lastTouch.x;\n let diffY = pointer.y - this.lastTouch.y;\n this.body.view.translation = {x:this.lastTouch.translation.x + diffX, y:this.lastTouch.translation.y + diffY};\n }\n\n }\n\n\n /**\n * Connect the new edge to the target if one exists, otherwise remove temp line\n * @param {Event} event The event\n * @private\n */\n _finishConnect(event) {\n let pointer = this.body.functions.getPointer(event.center);\n let pointerObj = this.selectionHandler._pointerToPositionObject(pointer);\n\n // remember the edge id\n let connectFromId = undefined;\n if (this.temporaryIds.edges[0] !== undefined) {\n connectFromId = this.body.edges[this.temporaryIds.edges[0]].fromId;\n }\n\n // get the overlapping node but NOT the temporary node;\n let overlappingNodeIds = this.selectionHandler._getAllNodesOverlappingWith(pointerObj);\n let node = undefined;\n for (let i = overlappingNodeIds.length-1; i >= 0; i--) {\n // if the node id is NOT a temporary node, accept the node.\n if (this.temporaryIds.nodes.indexOf(overlappingNodeIds[i]) === -1) {\n node = this.body.nodes[overlappingNodeIds[i]];\n break;\n }\n }\n\n // clean temporary nodes and edges.\n this._cleanupTemporaryNodesAndEdges();\n\n // perform the connection\n if (node !== undefined) {\n if (node.isCluster === true) {\n alert(this.options.locales[this.options.locale]['createEdgeError'] || this.options.locales['en']['createEdgeError']);\n }\n else {\n if (this.body.nodes[connectFromId] !== undefined && this.body.nodes[node.id] !== undefined) {\n this._performAddEdge(connectFromId, node.id);\n }\n }\n }\n\n event.controlEdge = { from: connectFromId, to: node ? node.id : undefined };\n this.selectionHandler._generateClickEvent('controlNodeDragEnd', event, pointer);\n\n // No need to do _generateclickevent('dragEnd') here, the regular dragEnd event fires.\n this.body.emitter.emit('_redraw');\n }\n\n\n /**\n *\n * @param {Event} event\n * @private\n */\n _dragStartEdge(event) {\n let pointer = this.lastTouch;\n this.selectionHandler._generateClickEvent('dragStart', event, pointer, undefined, true);\n }\n\n // --------------------------------------- END OF ADD EDGE FUNCTIONS -------------------------------------//\n\n\n // ------------------------------ Performing all the actual data manipulation ------------------------//\n\n /**\n * Adds a node on the specified location\n *\n * @param {Object} clickData\n * @private\n */\n _performAddNode(clickData) {\n let defaultData = {\n id: util.randomUUID(),\n x: clickData.pointer.canvas.x,\n y: clickData.pointer.canvas.y,\n label: 'new'\n };\n\n if (typeof this.options.addNode === 'function') {\n if (this.options.addNode.length === 2) {\n this.options.addNode(defaultData, (finalizedData) => {\n if (finalizedData !== null && finalizedData !== undefined && this.inMode === 'addNode') { // if for whatever reason the mode has changes (due to dataset change) disregard the callback\n this.body.data.nodes.getDataSet().add(finalizedData);\n }\n this.showManipulatorToolbar();\n });\n }\n else {\n this.showManipulatorToolbar();\n throw new Error('The function for add does not support two arguments (data,callback)');\n }\n }\n else {\n this.body.data.nodes.getDataSet().add(defaultData);\n this.showManipulatorToolbar();\n }\n }\n\n\n /**\n * connect two nodes with a new edge.\n *\n * @param {Node.id} sourceNodeId\n * @param {Node.id} targetNodeId\n * @private\n */\n _performAddEdge(sourceNodeId, targetNodeId) {\n let defaultData = {from: sourceNodeId, to: targetNodeId};\n if (typeof this.options.addEdge === 'function') {\n if (this.options.addEdge.length === 2) {\n this.options.addEdge(defaultData, (finalizedData) => {\n if (finalizedData !== null && finalizedData !== undefined && this.inMode === 'addEdge') { // if for whatever reason the mode has changes (due to dataset change) disregard the callback\n this.body.data.edges.getDataSet().add(finalizedData);\n this.selectionHandler.unselectAll();\n this.showManipulatorToolbar();\n }\n });\n }\n else {\n throw new Error('The function for connect does not support two arguments (data,callback)');\n }\n }\n else {\n this.body.data.edges.getDataSet().add(defaultData);\n this.selectionHandler.unselectAll();\n this.showManipulatorToolbar();\n }\n }\n\n /**\n * connect two nodes with a new edge.\n *\n * @param {Node.id} sourceNodeId\n * @param {Node.id} targetNodeId\n * @private\n */\n _performEditEdge(sourceNodeId, targetNodeId) {\n let defaultData = {id: this.edgeBeingEditedId, from: sourceNodeId, to: targetNodeId, label: this.body.data.edges._data[this.edgeBeingEditedId].label };\n let eeFunct = this.options.editEdge;\n if (typeof eeFunct === 'object') {\n eeFunct = eeFunct.editWithoutDrag;\n }\n if (typeof eeFunct === 'function') {\n if (eeFunct.length === 2) {\n eeFunct(defaultData, (finalizedData) => {\n if (finalizedData === null || finalizedData === undefined || this.inMode !== 'editEdge') { // if for whatever reason the mode has changes (due to dataset change) disregard the callback) {\n this.body.edges[defaultData.id].updateEdgeType();\n this.body.emitter.emit('_redraw');\n this.showManipulatorToolbar();\n }\n else {\n this.body.data.edges.getDataSet().update(finalizedData);\n this.selectionHandler.unselectAll();\n this.showManipulatorToolbar();\n }\n });\n }\n else {\n throw new Error('The function for edit does not support two arguments (data, callback)');\n }\n }\n else {\n this.body.data.edges.getDataSet().update(defaultData);\n this.selectionHandler.unselectAll();\n this.showManipulatorToolbar();\n }\n }\n\n\n}\n\nexport default ManipulationSystem;\n","import './ColorPicker.css';\n\nimport Hammer from '../module/hammer';\nimport hammerUtil from '../hammerUtil';\nimport util from 'vis-util';\n\n\nvar htmlColors = {black: '#000000', navy: '#000080', darkblue: '#00008B', mediumblue: '#0000CD', blue: '#0000FF', darkgreen: '#006400', green: '#008000', teal: '#008080', darkcyan: '#008B8B', deepskyblue: '#00BFFF', darkturquoise: '#00CED1', mediumspringgreen: '#00FA9A', lime: '#00FF00', springgreen: '#00FF7F', aqua: '#00FFFF', cyan: '#00FFFF', midnightblue: '#191970', dodgerblue: '#1E90FF', lightseagreen: '#20B2AA', forestgreen: '#228B22', seagreen: '#2E8B57', darkslategray: '#2F4F4F', limegreen: '#32CD32', mediumseagreen: '#3CB371', turquoise: '#40E0D0', royalblue: '#4169E1', steelblue: '#4682B4', darkslateblue: '#483D8B', mediumturquoise: '#48D1CC', indigo: '#4B0082', darkolivegreen: '#556B2F', cadetblue: '#5F9EA0', cornflowerblue: '#6495ED', mediumaquamarine: '#66CDAA', dimgray: '#696969', slateblue: '#6A5ACD', olivedrab: '#6B8E23', slategray: '#708090', lightslategray: '#778899', mediumslateblue: '#7B68EE', lawngreen: '#7CFC00', chartreuse: '#7FFF00', aquamarine: '#7FFFD4', maroon: '#800000', purple: '#800080', olive: '#808000', gray: '#808080', skyblue: '#87CEEB', lightskyblue: '#87CEFA', blueviolet: '#8A2BE2', darkred: '#8B0000', darkmagenta: '#8B008B', saddlebrown: '#8B4513', darkseagreen: '#8FBC8F', lightgreen: '#90EE90', mediumpurple: '#9370D8', darkviolet: '#9400D3', palegreen: '#98FB98', darkorchid: '#9932CC', yellowgreen: '#9ACD32', sienna: '#A0522D', brown: '#A52A2A', darkgray: '#A9A9A9', lightblue: '#ADD8E6', greenyellow: '#ADFF2F', paleturquoise: '#AFEEEE', lightsteelblue: '#B0C4DE', powderblue: '#B0E0E6', firebrick: '#B22222', darkgoldenrod: '#B8860B', mediumorchid: '#BA55D3', rosybrown: '#BC8F8F', darkkhaki: '#BDB76B', silver: '#C0C0C0', mediumvioletred: '#C71585', indianred: '#CD5C5C', peru: '#CD853F', chocolate: '#D2691E', tan: '#D2B48C', lightgrey: '#D3D3D3', palevioletred: '#D87093', thistle: '#D8BFD8', orchid: '#DA70D6', goldenrod: '#DAA520', crimson: '#DC143C', gainsboro: '#DCDCDC', plum: '#DDA0DD', burlywood: '#DEB887', lightcyan: '#E0FFFF', lavender: '#E6E6FA', darksalmon: '#E9967A', violet: '#EE82EE', palegoldenrod: '#EEE8AA', lightcoral: '#F08080', khaki: '#F0E68C', aliceblue: '#F0F8FF', honeydew: '#F0FFF0', azure: '#F0FFFF', sandybrown: '#F4A460', wheat: '#F5DEB3', beige: '#F5F5DC', whitesmoke: '#F5F5F5', mintcream: '#F5FFFA', ghostwhite: '#F8F8FF', salmon: '#FA8072', antiquewhite: '#FAEBD7', linen: '#FAF0E6', lightgoldenrodyellow: '#FAFAD2', oldlace: '#FDF5E6', red: '#FF0000', fuchsia: '#FF00FF', magenta: '#FF00FF', deeppink: '#FF1493', orangered: '#FF4500', tomato: '#FF6347', hotpink: '#FF69B4', coral: '#FF7F50', darkorange: '#FF8C00', lightsalmon: '#FFA07A', orange: '#FFA500', lightpink: '#FFB6C1', pink: '#FFC0CB', gold: '#FFD700', peachpuff: '#FFDAB9', navajowhite: '#FFDEAD', moccasin: '#FFE4B5', bisque: '#FFE4C4', mistyrose: '#FFE4E1', blanchedalmond: '#FFEBCD', papayawhip: '#FFEFD5', lavenderblush: '#FFF0F5', seashell: '#FFF5EE', cornsilk: '#FFF8DC', lemonchiffon: '#FFFACD', floralwhite: '#FFFAF0', snow: '#FFFAFA', yellow: '#FFFF00', lightyellow: '#FFFFE0', ivory: '#FFFFF0', white: '#FFFFFF'};\n\n/**\n * @param {number} [pixelRatio=1]\n */\nclass ColorPicker {\n /**\n * @param {number} [pixelRatio=1]\n */\n constructor(pixelRatio = 1) {\n this.pixelRatio = pixelRatio;\n this.generated = false;\n this.centerCoordinates = {x:289/2, y:289/2};\n this.r = 289 * 0.49;\n this.color = {r:255,g:255,b:255,a:1.0};\n this.hueCircle = undefined;\n this.initialColor = {r:255,g:255,b:255,a:1.0};\n this.previousColor= undefined;\n this.applied = false;\n\n // bound by\n this.updateCallback = () => {};\n this.closeCallback = () => {};\n\n // create all DOM elements\n this._create();\n }\n\n\n /**\n * this inserts the colorPicker into a div from the DOM\n * @param {Element} container\n */\n insertTo(container) {\n if (this.hammer !== undefined) {\n this.hammer.destroy();\n this.hammer = undefined;\n }\n this.container = container;\n this.container.appendChild(this.frame);\n this._bindHammer();\n\n this._setSize();\n }\n\n /**\n * the callback is executed on apply and save. Bind it to the application\n * @param {function} callback\n */\n setUpdateCallback(callback) {\n if (typeof callback === 'function') {\n this.updateCallback = callback;\n }\n else {\n throw new Error(\"Function attempted to set as colorPicker update callback is not a function.\");\n }\n }\n\n /**\n * the callback is executed on apply and save. Bind it to the application\n * @param {function} callback\n */\n setCloseCallback(callback) {\n if (typeof callback === 'function') {\n this.closeCallback = callback;\n }\n else {\n throw new Error(\"Function attempted to set as colorPicker closing callback is not a function.\");\n }\n }\n\n /**\n *\n * @param {string} color\n * @returns {String}\n * @private\n */\n _isColorString(color) {\n if (typeof color === 'string') {\n return htmlColors[color];\n }\n }\n\n\n /**\n * Set the color of the colorPicker\n * Supported formats:\n * 'red' --> HTML color string\n * '#ffffff' --> hex string\n * 'rgb(255,255,255)' --> rgb string\n * 'rgba(255,255,255,1.0)' --> rgba string\n * {r:255,g:255,b:255} --> rgb object\n * {r:255,g:255,b:255,a:1.0} --> rgba object\n * @param {string|Object} color\n * @param {boolean} [setInitial=true]\n */\n setColor(color, setInitial = true) {\n if (color === 'none') {\n return;\n }\n\n let rgba;\n\n // if a html color shorthand is used, convert to hex\n var htmlColor = this._isColorString(color);\n if (htmlColor !== undefined) {\n color = htmlColor;\n }\n\n // check format\n if (util.isString(color) === true) {\n if (util.isValidRGB(color) === true) {\n let rgbaArray = color.substr(4).substr(0, color.length - 5).split(',');\n rgba = {r:rgbaArray[0], g:rgbaArray[1], b:rgbaArray[2], a:1.0};\n }\n else if (util.isValidRGBA(color) === true) {\n let rgbaArray = color.substr(5).substr(0, color.length - 6).split(',');\n rgba = {r:rgbaArray[0], g:rgbaArray[1], b:rgbaArray[2], a:rgbaArray[3]};\n }\n else if (util.isValidHex(color) === true) {\n let rgbObj = util.hexToRGB(color);\n rgba = {r:rgbObj.r, g:rgbObj.g, b:rgbObj.b, a:1.0};\n }\n }\n else {\n if (color instanceof Object) {\n if (color.r !== undefined && color.g !== undefined && color.b !== undefined) {\n let alpha = color.a !== undefined ? color.a : '1.0';\n rgba = {r:color.r, g:color.g, b:color.b, a:alpha};\n }\n }\n }\n\n // set color\n if (rgba === undefined) {\n throw new Error(\"Unknown color passed to the colorPicker. Supported are strings: rgb, hex, rgba. Object: rgb ({r:r,g:g,b:b,[a:a]}). Supplied: \" + JSON.stringify(color));\n }\n else {\n this._setColor(rgba, setInitial);\n }\n }\n\n\n /**\n * this shows the color picker.\n * The hue circle is constructed once and stored.\n */\n show() {\n if (this.closeCallback !== undefined) {\n this.closeCallback();\n this.closeCallback = undefined;\n }\n\n this.applied = false;\n this.frame.style.display = 'block';\n this._generateHueCircle();\n }\n\n // ------------------------------------------ PRIVATE ----------------------------- //\n\n /**\n * Hide the picker. Is called by the cancel button.\n * Optional boolean to store the previous color for easy access later on.\n * @param {boolean} [storePrevious=true]\n * @private\n */\n _hide(storePrevious = true) {\n // store the previous color for next time;\n if (storePrevious === true) {\n this.previousColor = util.extend({}, this.color);\n }\n\n if (this.applied === true) {\n this.updateCallback(this.initialColor);\n }\n\n this.frame.style.display = 'none';\n\n // call the closing callback, restoring the onclick method.\n // this is in a setTimeout because it will trigger the show again before the click is done.\n setTimeout(() => {\n if (this.closeCallback !== undefined) {\n this.closeCallback();\n this.closeCallback = undefined;\n }\n },0);\n }\n\n\n /**\n * bound to the save button. Saves and hides.\n * @private\n */\n _save() {\n this.updateCallback(this.color);\n this.applied = false;\n this._hide();\n }\n\n\n /**\n * Bound to apply button. Saves but does not close. Is undone by the cancel button.\n * @private\n */\n _apply() {\n this.applied = true;\n this.updateCallback(this.color);\n this._updatePicker(this.color);\n }\n\n\n /**\n * load the color from the previous session.\n * @private\n */\n _loadLast() {\n if (this.previousColor !== undefined) {\n this.setColor(this.previousColor, false);\n }\n else {\n alert(\"There is no last color to load...\");\n }\n }\n\n\n /**\n * set the color, place the picker\n * @param {Object} rgba\n * @param {boolean} [setInitial=true]\n * @private\n */\n _setColor(rgba, setInitial = true) {\n // store the initial color\n if (setInitial === true) {\n this.initialColor = util.extend({}, rgba);\n }\n\n this.color = rgba;\n let hsv = util.RGBToHSV(rgba.r, rgba.g, rgba.b);\n\n let angleConvert = 2 * Math.PI;\n let radius = this.r * hsv.s;\n let x = this.centerCoordinates.x + radius * Math.sin(angleConvert * hsv.h);\n let y = this.centerCoordinates.y + radius * Math.cos(angleConvert * hsv.h);\n\n this.colorPickerSelector.style.left = x - 0.5 * this.colorPickerSelector.clientWidth + 'px';\n this.colorPickerSelector.style.top = y - 0.5 * this.colorPickerSelector.clientHeight + 'px';\n\n this._updatePicker(rgba);\n }\n\n\n /**\n * bound to opacity control\n * @param {number} value\n * @private\n */\n _setOpacity(value) {\n this.color.a = value / 100;\n this._updatePicker(this.color);\n }\n\n\n /**\n * bound to brightness control\n * @param {number} value\n * @private\n */\n _setBrightness(value) {\n let hsv = util.RGBToHSV(this.color.r, this.color.g, this.color.b);\n hsv.v = value / 100;\n let rgba = util.HSVToRGB(hsv.h, hsv.s, hsv.v);\n rgba['a'] = this.color.a;\n this.color = rgba;\n this._updatePicker();\n }\n\n\n /**\n * update the color picker. A black circle overlays the hue circle to mimic the brightness decreasing.\n * @param {Object} rgba\n * @private\n */\n _updatePicker(rgba = this.color) {\n let hsv = util.RGBToHSV(rgba.r, rgba.g, rgba.b);\n let ctx = this.colorPickerCanvas.getContext('2d');\n if (this.pixelRation === undefined) {\n this.pixelRatio = (window.devicePixelRatio || 1) / (ctx.webkitBackingStorePixelRatio ||\n ctx.mozBackingStorePixelRatio ||\n ctx.msBackingStorePixelRatio ||\n ctx.oBackingStorePixelRatio ||\n ctx.backingStorePixelRatio || 1);\n }\n ctx.setTransform(this.pixelRatio, 0, 0, this.pixelRatio, 0, 0);\n\n // clear the canvas\n let w = this.colorPickerCanvas.clientWidth;\n let h = this.colorPickerCanvas.clientHeight;\n ctx.clearRect(0, 0, w, h);\n\n ctx.putImageData(this.hueCircle, 0,0);\n ctx.fillStyle = 'rgba(0,0,0,' + (1- hsv.v) + ')';\n ctx.circle(this.centerCoordinates.x, this.centerCoordinates.y, this.r);\n ctx.fill();\n\n this.brightnessRange.value = 100 * hsv.v;\n this.opacityRange.value = 100 * rgba.a;\n\n this.initialColorDiv.style.backgroundColor = 'rgba(' + this.initialColor.r + ',' + this.initialColor.g + ',' + this.initialColor.b + ',' + this.initialColor.a + ')';\n this.newColorDiv.style.backgroundColor = 'rgba(' + this.color.r + ',' + this.color.g + ',' + this.color.b + ',' + this.color.a + ')';\n }\n\n\n /**\n * used by create to set the size of the canvas.\n * @private\n */\n _setSize() {\n this.colorPickerCanvas.style.width = '100%';\n this.colorPickerCanvas.style.height = '100%';\n\n this.colorPickerCanvas.width = 289 * this.pixelRatio;\n this.colorPickerCanvas.height = 289 * this.pixelRatio;\n }\n\n\n /**\n * create all dom elements\n * TODO: cleanup, lots of similar dom elements\n * @private\n */\n _create() {\n this.frame = document.createElement('div');\n this.frame.className = 'vis-color-picker';\n\n this.colorPickerDiv = document.createElement('div');\n this.colorPickerSelector = document.createElement('div');\n this.colorPickerSelector.className = 'vis-selector';\n this.colorPickerDiv.appendChild(this.colorPickerSelector);\n\n this.colorPickerCanvas = document.createElement('canvas');\n this.colorPickerDiv.appendChild(this.colorPickerCanvas);\n\n if (!this.colorPickerCanvas.getContext) {\n let noCanvas = document.createElement( 'DIV' );\n noCanvas.style.color = 'red';\n noCanvas.style.fontWeight = 'bold' ;\n noCanvas.style.padding = '10px';\n noCanvas.innerHTML = 'Error: your browser does not support HTML canvas';\n this.colorPickerCanvas.appendChild(noCanvas);\n }\n else {\n let ctx = this.colorPickerCanvas.getContext(\"2d\");\n this.pixelRatio = (window.devicePixelRatio || 1) / (ctx.webkitBackingStorePixelRatio ||\n ctx.mozBackingStorePixelRatio ||\n ctx.msBackingStorePixelRatio ||\n ctx.oBackingStorePixelRatio ||\n ctx.backingStorePixelRatio || 1);\n this.colorPickerCanvas.getContext(\"2d\").setTransform(this.pixelRatio, 0, 0, this.pixelRatio, 0, 0);\n }\n\n this.colorPickerDiv.className = 'vis-color';\n\n this.opacityDiv = document.createElement('div');\n this.opacityDiv.className = 'vis-opacity';\n\n this.brightnessDiv = document.createElement('div');\n this.brightnessDiv.className = 'vis-brightness';\n\n this.arrowDiv = document.createElement('div');\n this.arrowDiv.className = 'vis-arrow';\n\n this.opacityRange = document.createElement('input');\n try {\n this.opacityRange.type = 'range'; // Not supported on IE9\n this.opacityRange.min = '0';\n this.opacityRange.max = '100';\n }\n // TODO: Add some error handling and remove this lint exception\n catch (err) {} // eslint-disable-line no-empty\n this.opacityRange.value = '100';\n this.opacityRange.className = 'vis-range';\n\n this.brightnessRange = document.createElement('input');\n try {\n this.brightnessRange.type = 'range'; // Not supported on IE9\n this.brightnessRange.min = '0';\n this.brightnessRange.max = '100';\n }\n // TODO: Add some error handling and remove this lint exception\n catch (err) {} // eslint-disable-line no-empty\n this.brightnessRange.value = '100';\n this.brightnessRange.className = 'vis-range';\n\n this.opacityDiv.appendChild(this.opacityRange);\n this.brightnessDiv.appendChild(this.brightnessRange);\n\n var me = this;\n this.opacityRange.onchange = function () {me._setOpacity(this.value);};\n this.opacityRange.oninput = function () {me._setOpacity(this.value);};\n this.brightnessRange.onchange = function () {me._setBrightness(this.value);};\n this.brightnessRange.oninput = function () {me._setBrightness(this.value);};\n\n this.brightnessLabel = document.createElement(\"div\");\n this.brightnessLabel.className = \"vis-label vis-brightness\";\n this.brightnessLabel.innerHTML = 'brightness:';\n\n this.opacityLabel = document.createElement(\"div\");\n this.opacityLabel.className = \"vis-label vis-opacity\";\n this.opacityLabel.innerHTML = 'opacity:';\n\n this.newColorDiv = document.createElement(\"div\");\n this.newColorDiv.className = \"vis-new-color\";\n this.newColorDiv.innerHTML = 'new';\n\n this.initialColorDiv = document.createElement(\"div\");\n this.initialColorDiv.className = \"vis-initial-color\";\n this.initialColorDiv.innerHTML = 'initial';\n\n this.cancelButton = document.createElement(\"div\");\n this.cancelButton.className = \"vis-button vis-cancel\";\n this.cancelButton.innerHTML = 'cancel';\n this.cancelButton.onclick = this._hide.bind(this, false);\n\n this.applyButton = document.createElement(\"div\");\n this.applyButton.className = \"vis-button vis-apply\";\n this.applyButton.innerHTML = 'apply';\n this.applyButton.onclick = this._apply.bind(this);\n\n this.saveButton = document.createElement(\"div\");\n this.saveButton.className = \"vis-button vis-save\";\n this.saveButton.innerHTML = 'save';\n this.saveButton.onclick = this._save.bind(this);\n\n this.loadButton = document.createElement(\"div\");\n this.loadButton.className = \"vis-button vis-load\";\n this.loadButton.innerHTML = 'load last';\n this.loadButton.onclick = this._loadLast.bind(this);\n\n this.frame.appendChild(this.colorPickerDiv);\n this.frame.appendChild(this.arrowDiv);\n this.frame.appendChild(this.brightnessLabel);\n this.frame.appendChild(this.brightnessDiv);\n this.frame.appendChild(this.opacityLabel);\n this.frame.appendChild(this.opacityDiv);\n this.frame.appendChild(this.newColorDiv);\n this.frame.appendChild(this.initialColorDiv);\n\n this.frame.appendChild(this.cancelButton);\n this.frame.appendChild(this.applyButton);\n this.frame.appendChild(this.saveButton);\n this.frame.appendChild(this.loadButton);\n }\n\n\n /**\n * bind hammer to the color picker\n * @private\n */\n _bindHammer() {\n this.drag = {};\n this.pinch = {};\n this.hammer = new Hammer(this.colorPickerCanvas);\n this.hammer.get('pinch').set({enable: true});\n\n hammerUtil.onTouch(this.hammer, (event) => {this._moveSelector(event)});\n this.hammer.on('tap', (event) => {this._moveSelector(event)});\n this.hammer.on('panstart', (event) => {this._moveSelector(event)});\n this.hammer.on('panmove', (event) => {this._moveSelector(event)});\n this.hammer.on('panend', (event) => {this._moveSelector(event)});\n }\n\n\n /**\n * generate the hue circle. This is relatively heavy (200ms) and is done only once on the first time it is shown.\n * @private\n */\n _generateHueCircle() {\n if (this.generated === false) {\n let ctx = this.colorPickerCanvas.getContext('2d');\n if (this.pixelRation === undefined) {\n this.pixelRatio = (window.devicePixelRatio || 1) / (ctx.webkitBackingStorePixelRatio ||\n ctx.mozBackingStorePixelRatio ||\n ctx.msBackingStorePixelRatio ||\n ctx.oBackingStorePixelRatio ||\n ctx.backingStorePixelRatio || 1);\n }\n ctx.setTransform(this.pixelRatio, 0, 0, this.pixelRatio, 0, 0);\n\n // clear the canvas\n let w = this.colorPickerCanvas.clientWidth;\n let h = this.colorPickerCanvas.clientHeight;\n ctx.clearRect(0, 0, w, h);\n\n\n // draw hue circle\n let x, y, hue, sat;\n this.centerCoordinates = {x: w * 0.5, y: h * 0.5};\n this.r = 0.49 * w;\n let angleConvert = (2 * Math.PI) / 360;\n let hfac = 1 / 360;\n let sfac = 1 / this.r;\n let rgb;\n for (hue = 0; hue < 360; hue++) {\n for (sat = 0; sat < this.r; sat++) {\n x = this.centerCoordinates.x + sat * Math.sin(angleConvert * hue);\n y = this.centerCoordinates.y + sat * Math.cos(angleConvert * hue);\n rgb = util.HSVToRGB(hue * hfac, sat * sfac, 1);\n ctx.fillStyle = 'rgb(' + rgb.r + ',' + rgb.g + ',' + rgb.b + ')';\n ctx.fillRect(x - 0.5, y - 0.5, 2, 2);\n }\n }\n ctx.strokeStyle = 'rgba(0,0,0,1)';\n ctx.circle(this.centerCoordinates.x, this.centerCoordinates.y, this.r);\n ctx.stroke();\n\n this.hueCircle = ctx.getImageData(0,0,w,h);\n }\n this.generated = true;\n }\n\n\n /**\n * move the selector. This is called by hammer functions.\n *\n * @param {Event} event The event\n * @private\n */\n _moveSelector(event) {\n let rect = this.colorPickerDiv.getBoundingClientRect();\n let left = event.center.x - rect.left;\n let top = event.center.y - rect.top;\n\n let centerY = 0.5 * this.colorPickerDiv.clientHeight;\n let centerX = 0.5 * this.colorPickerDiv.clientWidth;\n\n let x = left - centerX;\n let y = top - centerY;\n\n let angle = Math.atan2(x,y);\n let radius = 0.98 * Math.min(Math.sqrt(x * x + y * y), centerX);\n\n let newTop = Math.cos(angle) * radius + centerY;\n let newLeft = Math.sin(angle) * radius + centerX;\n\n this.colorPickerSelector.style.top = newTop - 0.5 * this.colorPickerSelector.clientHeight + 'px';\n this.colorPickerSelector.style.left = newLeft - 0.5 * this.colorPickerSelector.clientWidth + 'px';\n\n // set color\n let h = angle / (2 * Math.PI);\n h = h < 0 ? h + 1 : h;\n let s = radius / this.r;\n let hsv = util.RGBToHSV(this.color.r, this.color.g, this.color.b);\n hsv.h = h;\n hsv.s = s;\n let rgba = util.HSVToRGB(hsv.h, hsv.s, hsv.v);\n rgba['a'] = this.color.a;\n this.color = rgba;\n\n // update previews\n this.initialColorDiv.style.backgroundColor = 'rgba(' + this.initialColor.r + ',' + this.initialColor.g + ',' + this.initialColor.b + ',' + this.initialColor.a + ')';\n this.newColorDiv.style.backgroundColor = 'rgba(' + this.color.r + ',' + this.color.g + ',' + this.color.b + ',' + this.color.a + ')';\n }\n}\n\nexport default ColorPicker;\n","import './Configurator.css';\n\nimport util from 'vis-util';\n\nimport ColorPicker from './ColorPicker';\n\n/**\n * The way this works is for all properties of this.possible options, you can supply the property name in any form to list the options.\n * Boolean options are recognised as Boolean\n * Number options should be written as array: [default value, min value, max value, stepsize]\n * Colors should be written as array: ['color', '#ffffff']\n * Strings with should be written as array: [option1, option2, option3, ..]\n *\n * The options are matched with their counterparts in each of the modules and the values used in the configuration are\n */\nclass Configurator {\n /**\n * @param {Object} parentModule | the location where parentModule.setOptions() can be called\n * @param {Object} defaultContainer | the default container of the module\n * @param {Object} configureOptions | the fully configured and predefined options set found in allOptions.js\n * @param {number} pixelRatio | canvas pixel ratio\n */\n constructor(parentModule, defaultContainer, configureOptions, pixelRatio = 1) {\n this.parent = parentModule;\n this.changedOptions = [];\n this.container = defaultContainer;\n this.allowCreation = false;\n\n this.options = {};\n this.initialized = false;\n this.popupCounter = 0;\n this.defaultOptions = {\n enabled: false,\n filter: true,\n container: undefined,\n showButton: true\n };\n util.extend(this.options, this.defaultOptions);\n\n this.configureOptions = configureOptions;\n this.moduleOptions = {};\n this.domElements = [];\n this.popupDiv = {};\n this.popupLimit = 5;\n this.popupHistory = {};\n this.colorPicker = new ColorPicker(pixelRatio);\n this.wrapper = undefined;\n }\n\n\n /**\n * refresh all options.\n * Because all modules parse their options by themselves, we just use their options. We copy them here.\n *\n * @param {Object} options\n */\n setOptions(options) {\n if (options !== undefined) {\n // reset the popup history because the indices may have been changed.\n this.popupHistory = {};\n this._removePopup();\n\n let enabled = true;\n if (typeof options === 'string') {\n this.options.filter = options;\n }\n else if (options instanceof Array) {\n this.options.filter = options.join();\n }\n else if (typeof options === 'object') {\n if (options == null) {\n throw new TypeError('options cannot be null');\n }\n if (options.container !== undefined) {\n this.options.container = options.container;\n }\n if (options.filter !== undefined) {\n this.options.filter = options.filter;\n }\n if (options.showButton !== undefined) {\n this.options.showButton = options.showButton;\n }\n if (options.enabled !== undefined) {\n enabled = options.enabled;\n }\n }\n else if (typeof options === 'boolean') {\n this.options.filter = true;\n enabled = options;\n }\n else if (typeof options === 'function') {\n this.options.filter = options;\n enabled = true;\n }\n if (this.options.filter === false) {\n enabled = false;\n }\n\n this.options.enabled = enabled;\n }\n this._clean();\n }\n\n /**\n *\n * @param {Object} moduleOptions\n */\n setModuleOptions(moduleOptions) {\n this.moduleOptions = moduleOptions;\n if (this.options.enabled === true) {\n this._clean();\n if (this.options.container !== undefined) {\n this.container = this.options.container;\n }\n this._create();\n }\n }\n\n /**\n * Create all DOM elements\n * @private\n */\n _create() {\n this._clean();\n this.changedOptions = [];\n\n let filter = this.options.filter;\n let counter = 0;\n let show = false;\n for (let option in this.configureOptions) {\n if (this.configureOptions.hasOwnProperty(option)) {\n this.allowCreation = false;\n show = false;\n if (typeof filter === 'function') {\n show = filter(option,[]);\n show = show || this._handleObject(this.configureOptions[option], [option], true);\n }\n else if (filter === true || filter.indexOf(option) !== -1) {\n show = true;\n }\n\n if (show !== false) {\n this.allowCreation = true;\n\n // linebreak between categories\n if (counter > 0) {\n this._makeItem([]);\n }\n // a header for the category\n this._makeHeader(option);\n\n // get the sub options\n this._handleObject(this.configureOptions[option], [option]);\n }\n counter++;\n }\n }\n this._makeButton();\n this._push();\n //~ this.colorPicker.insertTo(this.container);\n }\n\n\n /**\n * draw all DOM elements on the screen\n * @private\n */\n _push() {\n this.wrapper = document.createElement('div');\n this.wrapper.className = 'vis-configuration-wrapper';\n this.container.appendChild(this.wrapper);\n for (var i = 0; i < this.domElements.length; i++) {\n this.wrapper.appendChild(this.domElements[i]);\n }\n\n this._showPopupIfNeeded()\n }\n\n\n /**\n * delete all DOM elements\n * @private\n */\n _clean() {\n for (var i = 0; i < this.domElements.length; i++) {\n this.wrapper.removeChild(this.domElements[i]);\n }\n\n if (this.wrapper !== undefined) {\n this.container.removeChild(this.wrapper);\n this.wrapper = undefined;\n }\n this.domElements = [];\n\n this._removePopup();\n }\n\n\n /**\n * get the value from the actualOptions if it exists\n * @param {array} path | where to look for the actual option\n * @returns {*}\n * @private\n */\n _getValue(path) {\n let base = this.moduleOptions;\n for (let i = 0; i < path.length; i++) {\n if (base[path[i]] !== undefined) {\n base = base[path[i]];\n }\n else {\n base = undefined;\n break;\n }\n }\n return base;\n }\n\n\n /**\n * all option elements are wrapped in an item\n * @param {Array} path | where to look for the actual option\n * @param {Array.} domElements\n * @returns {number}\n * @private\n */\n _makeItem(path, ...domElements) {\n if (this.allowCreation === true) {\n let item = document.createElement('div');\n item.className = 'vis-configuration vis-config-item vis-config-s' + path.length;\n domElements.forEach((element) => {\n item.appendChild(element);\n });\n this.domElements.push(item);\n return this.domElements.length;\n }\n return 0;\n }\n\n\n /**\n * header for major subjects\n * @param {string} name\n * @private\n */\n _makeHeader(name) {\n let div = document.createElement('div');\n div.className = 'vis-configuration vis-config-header';\n div.innerHTML = name;\n this._makeItem([],div);\n }\n\n\n /**\n * make a label, if it is an object label, it gets different styling.\n * @param {string} name\n * @param {array} path | where to look for the actual option\n * @param {string} objectLabel\n * @returns {HTMLElement}\n * @private\n */\n _makeLabel(name, path, objectLabel = false) {\n let div = document.createElement('div');\n div.className = 'vis-configuration vis-config-label vis-config-s' + path.length;\n if (objectLabel === true) {\n div.innerHTML = '' + name + ':';\n }\n else {\n div.innerHTML = name + ':';\n }\n return div;\n }\n\n\n /**\n * make a dropdown list for multiple possible string optoins\n * @param {Array.} arr\n * @param {number} value\n * @param {array} path | where to look for the actual option\n * @private\n */\n _makeDropdown(arr, value, path) {\n let select = document.createElement('select');\n select.className = 'vis-configuration vis-config-select';\n let selectedValue = 0;\n if (value !== undefined) {\n if (arr.indexOf(value) !== -1) {\n selectedValue = arr.indexOf(value);\n }\n }\n\n for (let i = 0; i < arr.length; i++) {\n let option = document.createElement('option');\n option.value = arr[i];\n if (i === selectedValue) {\n option.selected = 'selected';\n }\n option.innerHTML = arr[i];\n select.appendChild(option);\n }\n\n let me = this;\n select.onchange = function () {me._update(this.value, path);};\n\n let label = this._makeLabel(path[path.length-1], path);\n this._makeItem(path, label, select);\n }\n\n\n /**\n * make a range object for numeric options\n * @param {Array.} arr\n * @param {number} value\n * @param {array} path | where to look for the actual option\n * @private\n */\n _makeRange(arr, value, path) {\n let defaultValue = arr[0];\n let min = arr[1];\n let max = arr[2];\n let step = arr[3];\n let range = document.createElement('input');\n range.className = 'vis-configuration vis-config-range';\n try {\n range.type = 'range'; // not supported on IE9\n range.min = min;\n range.max = max;\n }\n // TODO: Add some error handling and remove this lint exception\n catch (err) {} // eslint-disable-line no-empty\n range.step = step;\n\n // set up the popup settings in case they are needed.\n let popupString = '';\n let popupValue = 0;\n\n if (value !== undefined) {\n let factor = 1.20;\n if (value < 0 && value * factor < min) {\n range.min = Math.ceil(value * factor);\n popupValue = range.min;\n popupString = 'range increased';\n }\n else if (value / factor < min) {\n range.min = Math.ceil(value / factor);\n popupValue = range.min;\n popupString = 'range increased';\n }\n if (value * factor > max && max !== 1) {\n range.max = Math.ceil(value * factor);\n popupValue = range.max;\n popupString = 'range increased';\n }\n range.value = value;\n }\n else {\n range.value = defaultValue;\n }\n\n let input = document.createElement('input');\n input.className = 'vis-configuration vis-config-rangeinput';\n input.value = range.value;\n\n var me = this;\n range.onchange = function () {input.value = this.value; me._update(Number(this.value), path);};\n range.oninput = function () {input.value = this.value; };\n\n let label = this._makeLabel(path[path.length-1], path);\n let itemIndex = this._makeItem(path, label, range, input);\n\n // if a popup is needed AND it has not been shown for this value, show it.\n if (popupString !== '' && this.popupHistory[itemIndex] !== popupValue) {\n this.popupHistory[itemIndex] = popupValue;\n this._setupPopup(popupString, itemIndex);\n }\n }\n\n /**\n * make a button object\n * @private\n */\n _makeButton() {\n if (this.options.showButton === true) {\n let generateButton = document.createElement('div');\n generateButton.className = 'vis-configuration vis-config-button';\n generateButton.innerHTML = 'generate options';\n generateButton.onclick = () => {this._printOptions();};\n generateButton.onmouseover = () => {generateButton.className = 'vis-configuration vis-config-button hover';};\n generateButton.onmouseout = () => {generateButton.className = 'vis-configuration vis-config-button';};\n\n this.optionsContainer = document.createElement('div');\n this.optionsContainer.className = 'vis-configuration vis-config-option-container';\n\n this.domElements.push(this.optionsContainer);\n this.domElements.push(generateButton);\n }\n }\n\n\n /**\n * prepare the popup\n * @param {string} string\n * @param {number} index\n * @private\n */\n _setupPopup(string, index) {\n if (this.initialized === true && this.allowCreation === true && this.popupCounter < this.popupLimit) {\n let div = document.createElement(\"div\");\n div.id = \"vis-configuration-popup\";\n div.className = \"vis-configuration-popup\";\n div.innerHTML = string;\n div.onclick = () => {this._removePopup()};\n this.popupCounter += 1;\n this.popupDiv = {html:div, index:index};\n }\n }\n\n\n /**\n * remove the popup from the dom\n * @private\n */\n _removePopup() {\n if (this.popupDiv.html !== undefined) {\n this.popupDiv.html.parentNode.removeChild(this.popupDiv.html);\n clearTimeout(this.popupDiv.hideTimeout);\n clearTimeout(this.popupDiv.deleteTimeout);\n this.popupDiv = {};\n }\n }\n\n\n /**\n * Show the popup if it is needed.\n * @private\n */\n _showPopupIfNeeded() {\n if (this.popupDiv.html !== undefined) {\n let correspondingElement = this.domElements[this.popupDiv.index];\n let rect = correspondingElement.getBoundingClientRect();\n this.popupDiv.html.style.left = rect.left + \"px\";\n this.popupDiv.html.style.top = rect.top - 30 + \"px\"; // 30 is the height;\n document.body.appendChild(this.popupDiv.html)\n this.popupDiv.hideTimeout = setTimeout(() => {\n this.popupDiv.html.style.opacity = 0;\n },1500);\n this.popupDiv.deleteTimeout = setTimeout(() => {\n this._removePopup();\n },1800)\n }\n }\n\n /**\n * make a checkbox for boolean options.\n * @param {number} defaultValue\n * @param {number} value\n * @param {array} path | where to look for the actual option\n * @private\n */\n _makeCheckbox(defaultValue, value, path) {\n var checkbox = document.createElement('input');\n checkbox.type = 'checkbox';\n checkbox.className = 'vis-configuration vis-config-checkbox';\n checkbox.checked = defaultValue;\n if (value !== undefined) {\n checkbox.checked = value;\n if (value !== defaultValue) {\n if (typeof defaultValue === 'object') {\n if (value !== defaultValue.enabled) {\n this.changedOptions.push({path:path, value:value});\n }\n }\n else {\n this.changedOptions.push({path:path, value:value});\n }\n }\n }\n\n let me = this;\n checkbox.onchange = function() {me._update(this.checked, path)};\n\n let label = this._makeLabel(path[path.length-1], path);\n this._makeItem(path, label, checkbox);\n }\n\n /**\n * make a text input field for string options.\n * @param {number} defaultValue\n * @param {number} value\n * @param {array} path | where to look for the actual option\n * @private\n */\n _makeTextInput(defaultValue, value, path) {\n var checkbox = document.createElement('input');\n checkbox.type = 'text';\n checkbox.className = 'vis-configuration vis-config-text';\n checkbox.value = value;\n if (value !== defaultValue) {\n this.changedOptions.push({path:path, value:value});\n }\n\n let me = this;\n checkbox.onchange = function() {me._update(this.value, path)};\n\n let label = this._makeLabel(path[path.length-1], path);\n this._makeItem(path, label, checkbox);\n }\n\n\n /**\n * make a color field with a color picker for color fields\n * @param {Array.} arr\n * @param {number} value\n * @param {array} path | where to look for the actual option\n * @private\n */\n _makeColorField(arr, value, path) {\n let defaultColor = arr[1];\n let div = document.createElement('div');\n value = value === undefined ? defaultColor : value;\n\n if (value !== 'none') {\n div.className = 'vis-configuration vis-config-colorBlock';\n div.style.backgroundColor = value;\n }\n else {\n div.className = 'vis-configuration vis-config-colorBlock none';\n }\n\n value = value === undefined ? defaultColor : value;\n div.onclick = () => {\n this._showColorPicker(value,div,path);\n };\n\n let label = this._makeLabel(path[path.length-1], path);\n this._makeItem(path,label, div);\n }\n\n\n /**\n * used by the color buttons to call the color picker.\n * @param {number} value\n * @param {HTMLElement} div\n * @param {array} path | where to look for the actual option\n * @private\n */\n _showColorPicker(value, div, path) {\n // clear the callback from this div\n div.onclick = function() {};\n\n this.colorPicker.insertTo(div);\n this.colorPicker.show();\n\n this.colorPicker.setColor(value);\n this.colorPicker.setUpdateCallback((color) => {\n let colorString = 'rgba(' + color.r + ',' + color.g + ',' + color.b + ',' + color.a + ')';\n div.style.backgroundColor = colorString;\n this._update(colorString,path);\n });\n\n // on close of the colorpicker, restore the callback.\n this.colorPicker.setCloseCallback(() => {\n div.onclick = () => {\n this._showColorPicker(value,div,path);\n };\n });\n }\n\n\n /**\n * parse an object and draw the correct items\n * @param {Object} obj\n * @param {array} [path=[]] | where to look for the actual option\n * @param {boolean} [checkOnly=false]\n * @returns {boolean}\n * @private\n */\n _handleObject(obj, path = [], checkOnly = false) {\n let show = false;\n let filter = this.options.filter;\n let visibleInSet = false;\n for (let subObj in obj) {\n if (obj.hasOwnProperty(subObj)) {\n show = true;\n let item = obj[subObj];\n let newPath = util.copyAndExtendArray(path, subObj);\n if (typeof filter === 'function') {\n show = filter(subObj,path);\n\n // if needed we must go deeper into the object.\n if (show === false) {\n if (!(item instanceof Array) && typeof item !== 'string' && typeof item !== 'boolean' && item instanceof Object) {\n this.allowCreation = false;\n show = this._handleObject(item, newPath, true);\n this.allowCreation = checkOnly === false;\n }\n }\n }\n\n if (show !== false) {\n visibleInSet = true;\n let value = this._getValue(newPath);\n\n if (item instanceof Array) {\n this._handleArray(item, value, newPath);\n }\n else if (typeof item === 'string') {\n this._makeTextInput(item, value, newPath);\n }\n else if (typeof item === 'boolean') {\n this._makeCheckbox(item, value, newPath);\n }\n else if (item instanceof Object) {\n // collapse the physics options that are not enabled\n let draw = true;\n if (path.indexOf('physics') !== -1) {\n if (this.moduleOptions.physics.solver !== subObj) {\n draw = false;\n }\n }\n\n if (draw === true) {\n // initially collapse options with an disabled enabled option.\n if (item.enabled !== undefined) {\n let enabledPath = util.copyAndExtendArray(newPath, 'enabled');\n let enabledValue = this._getValue(enabledPath);\n if (enabledValue === true) {\n let label = this._makeLabel(subObj, newPath, true);\n this._makeItem(newPath, label);\n visibleInSet = this._handleObject(item, newPath) || visibleInSet;\n }\n else {\n this._makeCheckbox(item, enabledValue, newPath);\n }\n }\n else {\n let label = this._makeLabel(subObj, newPath, true);\n this._makeItem(newPath, label);\n visibleInSet = this._handleObject(item, newPath) || visibleInSet;\n }\n }\n }\n else {\n console.error('dont know how to handle', item, subObj, newPath);\n }\n }\n }\n }\n return visibleInSet;\n }\n\n\n /**\n * handle the array type of option\n * @param {Array.} arr\n * @param {number} value\n * @param {array} path | where to look for the actual option\n * @private\n */\n _handleArray(arr, value, path) {\n if (typeof arr[0] === 'string' && arr[0] === 'color') {\n this._makeColorField(arr, value, path);\n if (arr[1] !== value) {this.changedOptions.push({path:path, value:value});}\n }\n else if (typeof arr[0] === 'string') {\n this._makeDropdown(arr, value, path);\n if (arr[0] !== value) {this.changedOptions.push({path:path, value:value});}\n }\n else if (typeof arr[0] === 'number') {\n this._makeRange(arr, value, path);\n if (arr[0] !== value) {this.changedOptions.push({path:path, value:Number(value)});}\n }\n }\n\n\n\n /**\n * called to update the network with the new settings.\n * @param {number} value\n * @param {array} path | where to look for the actual option\n * @private\n */\n _update(value, path) {\n let options = this._constructOptions(value,path);\n\n if (this.parent.body && this.parent.body.emitter && this.parent.body.emitter.emit) {\n this.parent.body.emitter.emit(\"configChange\", options);\n }\n this.initialized = true;\n this.parent.setOptions(options);\n }\n\n\n /**\n *\n * @param {string|Boolean} value\n * @param {Array.} path\n * @param {{}} optionsObj\n * @returns {{}}\n * @private\n */\n _constructOptions(value, path, optionsObj = {}) {\n let pointer = optionsObj;\n\n // when dropdown boxes can be string or boolean, we typecast it into correct types\n value = value === 'true' ? true : value;\n value = value === 'false' ? false : value;\n\n for (let i = 0; i < path.length; i++) {\n if (path[i] !== 'global') {\n if (pointer[path[i]] === undefined) {\n pointer[path[i]] = {};\n }\n if (i !== path.length - 1) {\n pointer = pointer[path[i]];\n }\n else {\n pointer[path[i]] = value;\n }\n }\n }\n return optionsObj;\n }\n\n /**\n * @private\n */\n _printOptions() {\n let options = this.getOptions();\n this.optionsContainer.innerHTML = '
var options = ' + JSON.stringify(options, null, 2) + '
';\n }\n\n /**\n *\n * @returns {{}} options\n */\n getOptions() {\n let options = {};\n for (var i = 0; i < this.changedOptions.length; i++) {\n this._constructOptions(this.changedOptions[i].value, this.changedOptions[i].path, options)\n }\n return options;\n }\n}\n\n\nexport default Configurator;\n","/**\n * This object contains all possible options. It will check if the types are correct, if required if the option is one\n * of the allowed values.\n *\n * __any__ means that the name of the property does not matter.\n * __type__ is a required field for all objects and contains the allowed types of all objects\n */\nlet string = 'string';\nlet bool = 'boolean';\nlet number = 'number';\nlet array = 'array';\nlet object = 'object'; // should only be in a __type__ property\nlet dom = 'dom';\nlet any = 'any';\n\n// List of endpoints\nlet endPoints = ['arrow', 'circle', 'bar'];\n\nlet allOptions = {\n configure: {\n enabled: { boolean: bool },\n filter: { boolean: bool, string, array, 'function': 'function' },\n container: { dom },\n showButton: { boolean: bool },\n __type__: { object, boolean: bool, string, array, 'function': 'function' }\n },\n edges: {\n arrows: {\n to: { enabled: { boolean: bool }, scaleFactor: { number }, type: { string: endPoints }, __type__: { object, boolean: bool } },\n middle: { enabled: { boolean: bool }, scaleFactor: { number }, type: { string: endPoints }, __type__: { object, boolean: bool } },\n from: { enabled: { boolean: bool }, scaleFactor: { number }, type: { string: endPoints }, __type__: { object, boolean: bool } },\n __type__: { string: ['from', 'to', 'middle'], object }\n },\n arrowStrikethrough: { boolean: bool },\n background: {\n enabled: { boolean: bool },\n color: { string },\n size: { number },\n dashes: { boolean: bool, array },\n __type__: { object, boolean: bool }\n },\n chosen: {\n label: { boolean: bool, 'function': 'function' },\n edge: { boolean: bool, 'function': 'function' },\n __type__: { object, boolean: bool }\n },\n color: {\n color: { string },\n highlight: { string },\n hover: { string },\n inherit: { string: ['from', 'to', 'both'], boolean: bool },\n opacity: { number },\n __type__: { object, string }\n },\n dashes: { boolean: bool, array },\n font: {\n color: { string },\n size: { number }, // px\n face: { string },\n background: { string },\n strokeWidth: { number }, // px\n strokeColor: { string },\n align: { string: ['horizontal', 'top', 'middle', 'bottom'] },\n vadjust: { number },\n multi: { boolean: bool, string },\n bold: {\n color: { string },\n size: { number }, // px\n face: { string },\n mod: { string },\n vadjust: { number },\n __type__: { object, string }\n },\n boldital: {\n color: { string },\n size: { number }, // px\n face: { string },\n mod: { string },\n vadjust: { number },\n __type__: { object, string }\n },\n ital: {\n color: { string },\n size: { number }, // px\n face: { string },\n mod: { string },\n vadjust: { number },\n __type__: { object, string }\n },\n mono: {\n color: { string },\n size: { number }, // px\n face: { string },\n mod: { string },\n vadjust: { number },\n __type__: { object, string }\n },\n __type__: { object, string }\n },\n hidden: { boolean: bool },\n hoverWidth: { 'function': 'function', number },\n label: { string, 'undefined': 'undefined' },\n labelHighlightBold: { boolean: bool },\n length: { number, 'undefined': 'undefined' },\n physics: { boolean: bool },\n scaling: {\n min: { number },\n max: { number },\n label: {\n enabled: { boolean: bool },\n min: { number },\n max: { number },\n maxVisible: { number },\n drawThreshold: { number },\n __type__: { object, boolean: bool }\n },\n customScalingFunction: { 'function': 'function' },\n __type__: { object }\n },\n selectionWidth: { 'function': 'function', number },\n selfReferenceSize: { number },\n shadow: {\n enabled: { boolean: bool },\n color: { string },\n size: { number },\n x: { number },\n y: { number },\n __type__: { object, boolean: bool }\n },\n smooth: {\n enabled: { boolean: bool },\n type: { string: ['dynamic', 'continuous', 'discrete', 'diagonalCross', 'straightCross', 'horizontal', 'vertical', 'curvedCW', 'curvedCCW', 'cubicBezier'] },\n roundness: { number },\n forceDirection: { string: ['horizontal', 'vertical', 'none'], boolean: bool },\n __type__: { object, boolean: bool }\n },\n title: { string, 'undefined': 'undefined' },\n width: { number },\n widthConstraint: {\n maximum: { number },\n __type__: { object, boolean: bool, number }\n },\n value: { number, 'undefined': 'undefined' },\n __type__: { object }\n },\n groups: {\n useDefaultGroups: { boolean: bool },\n __any__: 'get from nodes, will be overwritten below',\n __type__: { object }\n },\n interaction: {\n dragNodes: { boolean: bool },\n dragView: { boolean: bool },\n hideEdgesOnDrag: { boolean: bool },\n hideEdgesOnZoom: { boolean: bool },\n hideNodesOnDrag: { boolean: bool },\n hover: { boolean: bool },\n keyboard: {\n enabled: { boolean: bool },\n speed: { x: { number }, y: { number }, zoom: { number }, __type__: { object } },\n bindToWindow: { boolean: bool },\n __type__: { object, boolean: bool }\n },\n multiselect: { boolean: bool },\n navigationButtons: { boolean: bool },\n selectable: { boolean: bool },\n selectConnectedEdges: { boolean: bool },\n hoverConnectedEdges: { boolean: bool },\n tooltipDelay: { number },\n zoomView: { boolean: bool },\n zoomSpeed: { number },\n __type__: { object }\n },\n layout: {\n randomSeed: { 'undefined': 'undefined', number },\n improvedLayout: { boolean: bool },\n hierarchical: {\n enabled: { boolean: bool },\n levelSeparation: { number },\n nodeSpacing: { number },\n treeSpacing: { number },\n blockShifting: { boolean: bool },\n edgeMinimization: { boolean: bool },\n parentCentralization: { boolean: bool },\n direction: { string: ['UD', 'DU', 'LR', 'RL'] }, // UD, DU, LR, RL\n sortMethod: { string: ['hubsize', 'directed'] }, // hubsize, directed\n __type__: { object, boolean: bool }\n },\n __type__: { object }\n },\n manipulation: {\n enabled: { boolean: bool },\n initiallyActive: { boolean: bool },\n addNode: { boolean: bool, 'function': 'function' },\n addEdge: { boolean: bool, 'function': 'function' },\n editNode: { 'function': 'function' },\n editEdge: {\n editWithoutDrag: { 'function' : 'function' },\n __type__: {object, boolean: bool, 'function': 'function' }\n },\n deleteNode: { boolean: bool, 'function': 'function' },\n deleteEdge: { boolean: bool, 'function': 'function' },\n controlNodeStyle: 'get from nodes, will be overwritten below',\n __type__: { object, boolean: bool }\n },\n nodes: {\n borderWidth: { number },\n borderWidthSelected: { number, 'undefined': 'undefined' },\n brokenImage: { string, 'undefined': 'undefined' },\n chosen: {\n label: { boolean: bool, 'function': 'function' },\n node: { boolean: bool, 'function': 'function' },\n __type__: { object, boolean: bool }\n },\n color: {\n border: { string },\n background: { string },\n highlight: {\n border: { string },\n background: { string },\n __type__: { object, string }\n },\n hover: {\n border: { string },\n background: { string },\n __type__: { object, string }\n },\n __type__: { object, string }\n },\n fixed: {\n x: { boolean: bool },\n y: { boolean: bool },\n __type__: { object, boolean: bool }\n },\n font: {\n align: { string },\n color: { string },\n size: { number }, // px\n face: { string },\n background: { string },\n strokeWidth: { number }, // px\n strokeColor: { string },\n vadjust: { number },\n multi: { boolean: bool, string },\n bold: {\n color: { string },\n size: { number }, // px\n face: { string },\n mod: { string },\n vadjust: { number },\n __type__: { object, string }\n },\n boldital: {\n color: { string },\n size: { number }, // px\n face: { string },\n mod: { string },\n vadjust: { number },\n __type__: { object, string }\n },\n ital: {\n color: { string },\n size: { number }, // px\n face: { string },\n mod: { string },\n vadjust: { number },\n __type__: { object, string }\n },\n mono: {\n color: { string },\n size: { number }, // px\n face: { string },\n mod: { string },\n vadjust: { number },\n __type__: { object, string }\n },\n __type__: { object, string }\n },\n group: { string, number, 'undefined': 'undefined' },\n heightConstraint: {\n minimum: { number },\n valign: { string },\n __type__: { object, boolean: bool, number }\n },\n hidden: { boolean: bool },\n icon: {\n face: { string },\n code: { string }, //'\\uf007',\n size: { number }, //50,\n color: { string },\n __type__: { object }\n },\n id: { string, number },\n image: {\n selected: { string, 'undefined': 'undefined' }, // --> URL\n unselected: { string, 'undefined': 'undefined' }, // --> URL\n __type__: { object, string }\n },\n label: { string, 'undefined': 'undefined' },\n labelHighlightBold: { boolean: bool },\n level: { number, 'undefined': 'undefined' },\n margin: {\n top: { number },\n right: { number },\n bottom: { number },\n left: { number },\n __type__: { object, number }\n },\n mass: { number },\n physics: { boolean: bool },\n scaling: {\n min: { number },\n max: { number },\n label: {\n enabled: { boolean: bool },\n min: { number },\n max: { number },\n maxVisible: { number },\n drawThreshold: { number },\n __type__: { object, boolean: bool }\n },\n customScalingFunction: { 'function': 'function' },\n __type__: { object }\n },\n shadow: {\n enabled: { boolean: bool },\n color: { string },\n size: { number },\n x: { number },\n y: { number },\n __type__: { object, boolean: bool }\n },\n shape: { string: ['ellipse', 'circle', 'database', 'box', 'text', 'image', 'circularImage', 'diamond', 'dot', 'star', 'triangle', 'triangleDown', 'square', 'icon', 'hexagon'] },\n shapeProperties: {\n borderDashes: { boolean: bool, array },\n borderRadius: { number },\n interpolation: { boolean: bool },\n useImageSize: { boolean: bool },\n useBorderWithImage: { boolean: bool },\n __type__: { object }\n },\n size: { number },\n title: { string, dom, 'undefined': 'undefined' },\n value: { number, 'undefined': 'undefined' },\n widthConstraint: {\n minimum: { number },\n maximum: { number },\n __type__: { object, boolean: bool, number }\n },\n x: { number },\n y: { number },\n __type__: { object }\n },\n physics: {\n enabled: { boolean: bool },\n barnesHut: {\n gravitationalConstant: { number },\n centralGravity: { number },\n springLength: { number },\n springConstant: { number },\n damping: { number },\n avoidOverlap: { number },\n __type__: { object }\n },\n forceAtlas2Based: {\n gravitationalConstant: { number },\n centralGravity: { number },\n springLength: { number },\n springConstant: { number },\n damping: { number },\n avoidOverlap: { number },\n __type__: { object }\n },\n repulsion: {\n centralGravity: { number },\n springLength: { number },\n springConstant: { number },\n nodeDistance: { number },\n damping: { number },\n __type__: { object }\n },\n hierarchicalRepulsion: {\n centralGravity: { number },\n springLength: { number },\n springConstant: { number },\n nodeDistance: { number },\n damping: { number },\n __type__: { object }\n },\n maxVelocity: { number },\n minVelocity: { number }, // px/s\n solver: { string: ['barnesHut', 'repulsion', 'hierarchicalRepulsion', 'forceAtlas2Based'] },\n stabilization: {\n enabled: { boolean: bool },\n iterations: { number }, // maximum number of iteration to stabilize\n updateInterval: { number },\n onlyDynamicEdges: { boolean: bool },\n fit: { boolean: bool },\n __type__: { object, boolean: bool }\n },\n timestep: { number },\n adaptiveTimestep: { boolean: bool },\n __type__: { object, boolean: bool }\n },\n\n //globals :\n autoResize: { boolean: bool },\n clickToUse: { boolean: bool },\n locale: { string },\n locales: {\n __any__: { any },\n __type__: { object }\n },\n height: { string },\n width: { string },\n __type__: { object }\n};\n\nallOptions.groups.__any__ = allOptions.nodes;\nallOptions.manipulation.controlNodeStyle = allOptions.nodes;\n\n\nlet configureOptions = {\n nodes: {\n borderWidth: [1, 0, 10, 1],\n borderWidthSelected: [2, 0, 10, 1],\n color: {\n border: ['color', '#2B7CE9'],\n background: ['color', '#97C2FC'],\n highlight: {\n border: ['color', '#2B7CE9'],\n background: ['color', '#D2E5FF']\n },\n hover: {\n border: ['color', '#2B7CE9'],\n background: ['color', '#D2E5FF']\n }\n },\n fixed: {\n x: false,\n y: false\n },\n font: {\n color: ['color', '#343434'],\n size: [14, 0, 100, 1], // px\n face: ['arial', 'verdana', 'tahoma'],\n background: ['color', 'none'],\n strokeWidth: [0, 0, 50, 1], // px\n strokeColor: ['color', '#ffffff']\n },\n //group: 'string',\n hidden: false,\n labelHighlightBold: true,\n //icon: {\n // face: 'string', //'FontAwesome',\n // code: 'string', //'\\uf007',\n // size: [50, 0, 200, 1], //50,\n // color: ['color','#2B7CE9'] //'#aa00ff'\n //},\n //image: 'string', // --> URL\n physics: true,\n scaling: {\n min: [10, 0, 200, 1],\n max: [30, 0, 200, 1],\n label: {\n enabled: false,\n min: [14, 0, 200, 1],\n max: [30, 0, 200, 1],\n maxVisible: [30, 0, 200, 1],\n drawThreshold: [5, 0, 20, 1]\n }\n },\n shadow: {\n enabled: false,\n color: 'rgba(0,0,0,0.5)',\n size: [10, 0, 20, 1],\n x: [5, -30, 30, 1],\n y: [5, -30, 30, 1]\n },\n shape: ['ellipse', 'box', 'circle', 'database', 'diamond', 'dot', 'square', 'star', 'text', 'triangle', 'triangleDown','hexagon'],\n shapeProperties: {\n borderDashes: false,\n borderRadius: [6, 0, 20, 1],\n interpolation: true,\n useImageSize: false\n },\n size: [25, 0, 200, 1]\n },\n edges: {\n arrows: {\n to: { enabled: false, scaleFactor: [1, 0, 3, 0.05], type: 'arrow' },\n middle: { enabled: false, scaleFactor: [1, 0, 3, 0.05], type: 'arrow' },\n from: { enabled: false, scaleFactor: [1, 0, 3, 0.05], type: 'arrow' }\n },\n arrowStrikethrough: true,\n color: {\n color: ['color', '#848484'],\n highlight: ['color', '#848484'],\n hover: ['color', '#848484'],\n inherit: ['from', 'to', 'both', true, false],\n opacity: [1, 0, 1, 0.05]\n },\n dashes: false,\n font: {\n color: ['color', '#343434'],\n size: [14, 0, 100, 1], // px\n face: ['arial', 'verdana', 'tahoma'],\n background: ['color', 'none'],\n strokeWidth: [2, 0, 50, 1], // px\n strokeColor: ['color', '#ffffff'],\n align: ['horizontal', 'top', 'middle', 'bottom']\n },\n hidden: false,\n hoverWidth: [1.5, 0, 5, 0.1],\n labelHighlightBold: true,\n physics: true,\n scaling: {\n min: [1, 0, 100, 1],\n max: [15, 0, 100, 1],\n label: {\n enabled: true,\n min: [14, 0, 200, 1],\n max: [30, 0, 200, 1],\n maxVisible: [30, 0, 200, 1],\n drawThreshold: [5, 0, 20, 1]\n }\n },\n selectionWidth: [1.5, 0, 5, 0.1],\n selfReferenceSize: [20, 0, 200, 1],\n shadow: {\n enabled: false,\n color: 'rgba(0,0,0,0.5)',\n size: [10, 0, 20, 1],\n x: [5, -30, 30, 1],\n y: [5, -30, 30, 1]\n },\n smooth: {\n enabled: true,\n type: ['dynamic', 'continuous', 'discrete', 'diagonalCross', 'straightCross', 'horizontal', 'vertical', 'curvedCW', 'curvedCCW', 'cubicBezier'],\n forceDirection: ['horizontal', 'vertical', 'none'],\n roundness: [0.5, 0, 1, 0.05]\n },\n width: [1, 0, 30, 1]\n },\n layout: {\n //randomSeed: [0, 0, 500, 1],\n //improvedLayout: true,\n hierarchical: {\n enabled: false,\n levelSeparation: [150, 20, 500, 5],\n nodeSpacing: [100, 20, 500, 5],\n treeSpacing: [200, 20, 500, 5],\n blockShifting: true,\n edgeMinimization: true,\n parentCentralization: true,\n direction: ['UD', 'DU', 'LR', 'RL'], // UD, DU, LR, RL\n sortMethod: ['hubsize', 'directed'] // hubsize, directed\n }\n },\n interaction: {\n dragNodes: true,\n dragView: true,\n hideEdgesOnDrag: false,\n hideEdgesOnZoom: false,\n hideNodesOnDrag: false,\n hover: false,\n keyboard: {\n enabled: false,\n speed: { x: [10, 0, 40, 1], y: [10, 0, 40, 1], zoom: [0.02, 0, 0.1, 0.005] },\n bindToWindow: true\n },\n multiselect: false,\n navigationButtons: false,\n selectable: true,\n selectConnectedEdges: true,\n hoverConnectedEdges: true,\n tooltipDelay: [300, 0, 1000, 25],\n zoomView: true,\n zoomSpeed: [1, 1, 1, 1]\n },\n manipulation: {\n enabled: false,\n initiallyActive: false\n },\n physics: {\n enabled: true,\n barnesHut: {\n //theta: [0.5, 0.1, 1, 0.05],\n gravitationalConstant: [-2000, -30000, 0, 50],\n centralGravity: [0.3, 0, 10, 0.05],\n springLength: [95, 0, 500, 5],\n springConstant: [0.04, 0, 1.2, 0.005],\n damping: [0.09, 0, 1, 0.01],\n avoidOverlap: [0, 0, 1, 0.01]\n },\n forceAtlas2Based: {\n //theta: [0.5, 0.1, 1, 0.05],\n gravitationalConstant: [-50, -500, 0, 1],\n centralGravity: [0.01, 0, 1, 0.005],\n springLength: [95, 0, 500, 5],\n springConstant: [0.08, 0, 1.2, 0.005],\n damping: [0.4, 0, 1, 0.01],\n avoidOverlap: [0, 0, 1, 0.01]\n },\n repulsion: {\n centralGravity: [0.2, 0, 10, 0.05],\n springLength: [200, 0, 500, 5],\n springConstant: [0.05, 0, 1.2, 0.005],\n nodeDistance: [100, 0, 500, 5],\n damping: [0.09, 0, 1, 0.01]\n },\n hierarchicalRepulsion: {\n centralGravity: [0.2, 0, 10, 0.05],\n springLength: [100, 0, 500, 5],\n springConstant: [0.01, 0, 1.2, 0.005],\n nodeDistance: [120, 0, 500, 5],\n damping: [0.09, 0, 1, 0.01]\n },\n maxVelocity: [50, 0, 150, 1],\n minVelocity: [0.1, 0.01, 0.5, 0.01],\n solver: ['barnesHut', 'forceAtlas2Based', 'repulsion', 'hierarchicalRepulsion'],\n timestep: [0.5, 0.01, 1, 0.01],\n //adaptiveTimestep: true\n }\n};\n\nexport {allOptions, configureOptions};\n","/**\n * The Floyd–Warshall algorithm is an algorithm for finding shortest paths in\n * a weighted graph with positive or negative edge weights (but with no negative\n * cycles). - https://en.wikipedia.org/wiki/Floyd–Warshall_algorithm\n */\nclass FloydWarshall {\n /**\n * @ignore\n */\n constructor() {\n }\n\n /**\n *\n * @param {Object} body\n * @param {Array.} nodesArray\n * @param {Array.} edgesArray\n * @returns {{}}\n */\n getDistances(body, nodesArray, edgesArray) {\n let D_matrix = {};\n let edges = body.edges;\n\n // prepare matrix with large numbers\n for (let i = 0; i < nodesArray.length; i++) {\n let node = nodesArray[i];\n let cell = {};\n D_matrix[node] = cell;\n for (let j = 0; j < nodesArray.length; j++) {\n cell[nodesArray[j]] = (i == j ? 0 : 1e9);\n }\n }\n\n // put the weights for the edges in. This assumes unidirectionality.\n for (let i = 0; i < edgesArray.length; i++) {\n let edge = edges[edgesArray[i]];\n // edge has to be connected if it counts to the distances. If it is connected to inner clusters it will crash so we also check if it is in the D_matrix\n if (edge.connected === true && D_matrix[edge.fromId] !== undefined && D_matrix[edge.toId] !== undefined) {\n D_matrix[edge.fromId][edge.toId] = 1;\n D_matrix[edge.toId][edge.fromId] = 1;\n }\n }\n\n let nodeCount = nodesArray.length;\n\n // Adapted FloydWarshall based on unidirectionality to greatly reduce complexity.\n for (let k = 0; k < nodeCount; k++) {\n let knode = nodesArray[k];\n let kcolm = D_matrix[knode];\n for (let i = 0; i < nodeCount - 1; i++) {\n let inode = nodesArray[i];\n let icolm = D_matrix[inode];\n for (let j = i + 1; j < nodeCount; j++) {\n let jnode = nodesArray[j];\n let jcolm = D_matrix[jnode];\n\n let val = Math.min(icolm[jnode], icolm[knode] + kcolm[jnode]);\n icolm[jnode] = val;\n jcolm[inode] = val;\n }\n }\n }\n\n return D_matrix;\n }\n}\n\nexport default FloydWarshall;","// distance finding algorithm\nimport FloydWarshall from \"./components/algorithms/FloydWarshall.js\"\n\n\n/**\n * KamadaKawai positions the nodes initially based on\n *\n * \"AN ALGORITHM FOR DRAWING GENERAL UNDIRECTED GRAPHS\"\n * -- Tomihisa KAMADA and Satoru KAWAI in 1989\n *\n * Possible optimizations in the distance calculation can be implemented.\n */\nclass KamadaKawai {\n /**\n * @param {Object} body\n * @param {number} edgeLength\n * @param {number} edgeStrength\n */\n constructor(body, edgeLength, edgeStrength) {\n this.body = body;\n this.springLength = edgeLength;\n this.springConstant = edgeStrength;\n this.distanceSolver = new FloydWarshall();\n }\n\n /**\n * Not sure if needed but can be used to update the spring length and spring constant\n * @param {Object} options\n */\n setOptions(options) {\n if (options) {\n if (options.springLength) {\n this.springLength = options.springLength;\n }\n if (options.springConstant) {\n this.springConstant = options.springConstant;\n }\n }\n }\n\n\n /**\n * Position the system\n * @param {Array.} nodesArray\n * @param {Array.} edgesArray\n * @param {boolean} [ignoreClusters=false]\n */\n solve(nodesArray, edgesArray, ignoreClusters = false) {\n // get distance matrix\n let D_matrix = this.distanceSolver.getDistances(this.body, nodesArray, edgesArray); // distance matrix\n\n // get the L Matrix\n this._createL_matrix(D_matrix);\n\n // get the K Matrix\n this._createK_matrix(D_matrix);\n\n // initial E Matrix\n this._createE_matrix();\n\n // calculate positions\n let threshold = 0.01;\n let innerThreshold = 1;\n let iterations = 0;\n let maxIterations = Math.max(1000, Math.min(10 * this.body.nodeIndices.length, 6000));\n let maxInnerIterations = 5;\n\n let maxEnergy = 1e9;\n let highE_nodeId = 0, dE_dx = 0, dE_dy = 0, delta_m = 0, subIterations = 0;\n\n while (maxEnergy > threshold && iterations < maxIterations) {\n iterations += 1;\n [highE_nodeId, maxEnergy, dE_dx, dE_dy] = this._getHighestEnergyNode(ignoreClusters);\n delta_m = maxEnergy;\n subIterations = 0;\n while (delta_m > innerThreshold && subIterations < maxInnerIterations) {\n subIterations += 1;\n this._moveNode(highE_nodeId, dE_dx, dE_dy);\n [delta_m, dE_dx, dE_dy] = this._getEnergy(highE_nodeId);\n }\n }\n }\n\n /**\n * get the node with the highest energy\n * @param {boolean} ignoreClusters\n * @returns {number[]}\n * @private\n */\n _getHighestEnergyNode(ignoreClusters) {\n let nodesArray = this.body.nodeIndices;\n let nodes = this.body.nodes;\n let maxEnergy = 0;\n let maxEnergyNodeId = nodesArray[0];\n let dE_dx_max = 0, dE_dy_max = 0;\n\n for (let nodeIdx = 0; nodeIdx < nodesArray.length; nodeIdx++) {\n let m = nodesArray[nodeIdx];\n // by not evaluating nodes with predefined positions we should only move nodes that have no positions.\n if ((nodes[m].predefinedPosition === false || nodes[m].isCluster === true && ignoreClusters === true) || nodes[m].options.fixed.x === true || nodes[m].options.fixed.y === true) {\n let [delta_m,dE_dx,dE_dy] = this._getEnergy(m);\n if (maxEnergy < delta_m) {\n maxEnergy = delta_m;\n maxEnergyNodeId = m;\n dE_dx_max = dE_dx;\n dE_dy_max = dE_dy;\n }\n }\n }\n\n return [maxEnergyNodeId, maxEnergy, dE_dx_max, dE_dy_max];\n }\n\n /**\n * calculate the energy of a single node\n * @param {Node.id} m\n * @returns {number[]}\n * @private\n */\n _getEnergy(m) {\n let [dE_dx,dE_dy] = this.E_sums[m];\n let delta_m = Math.sqrt(Math.pow(dE_dx, 2) + Math.pow(dE_dy, 2));\n return [delta_m, dE_dx, dE_dy];\n }\n\n /**\n * move the node based on it's energy\n * the dx and dy are calculated from the linear system proposed by Kamada and Kawai\n * @param {number} m\n * @param {number} dE_dx\n * @param {number} dE_dy\n * @private\n */\n _moveNode(m, dE_dx, dE_dy) {\n let nodesArray = this.body.nodeIndices;\n let nodes = this.body.nodes;\n let d2E_dx2 = 0;\n let d2E_dxdy = 0;\n let d2E_dy2 = 0;\n\n let x_m = nodes[m].x;\n let y_m = nodes[m].y;\n let km = this.K_matrix[m];\n let lm = this.L_matrix[m];\n\n for (let iIdx = 0; iIdx < nodesArray.length; iIdx++) {\n let i = nodesArray[iIdx];\n if (i !== m) {\n let x_i = nodes[i].x;\n let y_i = nodes[i].y;\n let kmat = km[i];\n let lmat = lm[i];\n let denominator = 1.0 / Math.pow(Math.pow(x_m - x_i, 2) + Math.pow(y_m - y_i, 2), 1.5);\n d2E_dx2 += kmat * (1 - lmat * Math.pow(y_m - y_i, 2) * denominator);\n d2E_dxdy += kmat * (lmat * (x_m - x_i) * (y_m - y_i) * denominator);\n d2E_dy2 += kmat * (1 - lmat * Math.pow(x_m - x_i, 2) * denominator);\n }\n }\n // make the variable names easier to make the solving of the linear system easier to read\n let A = d2E_dx2, B = d2E_dxdy, C = dE_dx, D = d2E_dy2, E = dE_dy;\n\n // solve the linear system for dx and dy\n let dy = (C / A + E / B) / (B / A - D / B);\n let dx = -(B * dy + C) / A;\n\n // move the node\n nodes[m].x += dx;\n nodes[m].y += dy;\n\n // Recalculate E_matrix (should be incremental)\n this._updateE_matrix(m);\n }\n\n\n /**\n * Create the L matrix: edge length times shortest path\n * @param {Object} D_matrix\n * @private\n */\n _createL_matrix(D_matrix) {\n let nodesArray = this.body.nodeIndices;\n let edgeLength = this.springLength;\n\n this.L_matrix = [];\n for (let i = 0; i < nodesArray.length; i++) {\n this.L_matrix[nodesArray[i]] = {};\n for (let j = 0; j < nodesArray.length; j++) {\n this.L_matrix[nodesArray[i]][nodesArray[j]] = edgeLength * D_matrix[nodesArray[i]][nodesArray[j]];\n }\n }\n }\n\n\n /**\n * Create the K matrix: spring constants times shortest path\n * @param {Object} D_matrix\n * @private\n */\n _createK_matrix(D_matrix) {\n let nodesArray = this.body.nodeIndices;\n let edgeStrength = this.springConstant;\n\n this.K_matrix = [];\n for (let i = 0; i < nodesArray.length; i++) {\n this.K_matrix[nodesArray[i]] = {};\n for (let j = 0; j < nodesArray.length; j++) {\n this.K_matrix[nodesArray[i]][nodesArray[j]] = edgeStrength * Math.pow(D_matrix[nodesArray[i]][nodesArray[j]], -2);\n }\n }\n }\n\n /**\n * Create matrix with all energies between nodes\n * @private\n */\n _createE_matrix() {\n let nodesArray = this.body.nodeIndices;\n let nodes = this.body.nodes;\n this.E_matrix = {};\n this.E_sums = {};\n for (let mIdx = 0; mIdx < nodesArray.length; mIdx++) {\n this.E_matrix[nodesArray[mIdx]] = [];\n }\n for (let mIdx = 0; mIdx < nodesArray.length; mIdx++) {\n let m = nodesArray[mIdx];\n let x_m = nodes[m].x;\n let y_m = nodes[m].y;\n let dE_dx = 0;\n let dE_dy = 0;\n for (let iIdx = mIdx; iIdx < nodesArray.length; iIdx++) {\n let i = nodesArray[iIdx];\n if (i !== m) {\n let x_i = nodes[i].x;\n let y_i = nodes[i].y;\n let denominator = 1.0 / Math.sqrt(Math.pow(x_m - x_i, 2) + Math.pow(y_m - y_i, 2));\n this.E_matrix[m][iIdx] = [\n this.K_matrix[m][i] * ((x_m - x_i) - this.L_matrix[m][i] * (x_m - x_i) * denominator),\n this.K_matrix[m][i] * ((y_m - y_i) - this.L_matrix[m][i] * (y_m - y_i) * denominator)\n ];\n this.E_matrix[i][mIdx] = this.E_matrix[m][iIdx];\n dE_dx += this.E_matrix[m][iIdx][0];\n dE_dy += this.E_matrix[m][iIdx][1];\n }\n }\n //Store sum\n this.E_sums[m] = [dE_dx, dE_dy];\n }\n }\n\n /**\n * Update method, just doing single column (rows are auto-updated) (update all sums)\n *\n * @param {number} m\n * @private\n */\n _updateE_matrix(m) {\n let nodesArray = this.body.nodeIndices;\n let nodes = this.body.nodes;\n let colm = this.E_matrix[m];\n let kcolm = this.K_matrix[m];\n let lcolm = this.L_matrix[m];\n let x_m = nodes[m].x;\n let y_m = nodes[m].y;\n let dE_dx = 0;\n let dE_dy = 0;\n for (let iIdx = 0; iIdx < nodesArray.length; iIdx++) {\n let i = nodesArray[iIdx];\n if (i !== m) {\n //Keep old energy value for sum modification below\n let cell = colm[iIdx];\n let oldDx = cell[0];\n let oldDy = cell[1];\n\n //Calc new energy:\n let x_i = nodes[i].x;\n let y_i = nodes[i].y;\n let denominator = 1.0 / Math.sqrt(Math.pow(x_m - x_i, 2) + Math.pow(y_m - y_i, 2));\n let dx = kcolm[i] * ((x_m - x_i) - lcolm[i] * (x_m - x_i) * denominator);\n let dy = kcolm[i] * ((y_m - y_i) - lcolm[i] * (y_m - y_i) * denominator);\n colm[iIdx] = [dx, dy];\n dE_dx += dx;\n dE_dy += dy;\n\n //add new energy to sum of each column\n let sum = this.E_sums[i];\n sum[0] += (dx-oldDx);\n sum[1] += (dy-oldDy);\n }\n }\n //Store sum at -1 index\n this.E_sums[m] = [dE_dx, dE_dy];\n }\n}\n\nexport default KamadaKawai;","// Load custom shapes into CanvasRenderingContext2D\nimport './shapes';\n\nimport Emitter from 'component-emitter';\nimport util from 'vis-util';\nimport dotparser from './dotparser';\nimport * as gephiParser from './gephiParser';\nimport Activator from '../shared/Activator';\nimport locales from './locales';\n\nimport Images from './Images';\nimport Groups from './modules/Groups';\nimport NodesHandler from './modules/NodesHandler';\nimport EdgesHandler from './modules/EdgesHandler';\nimport PhysicsEngine from './modules/PhysicsEngine';\nimport ClusterEngine from './modules/Clustering';\nimport CanvasRenderer from './modules/CanvasRenderer';\nimport Canvas from './modules/Canvas';\nimport View from './modules/View';\nimport InteractionHandler from './modules/InteractionHandler';\nimport SelectionHandler from \"./modules/SelectionHandler\";\nimport LayoutEngine from \"./modules/LayoutEngine\";\nimport ManipulationSystem from \"./modules/ManipulationSystem\";\nimport Configurator from \"./../shared/Configurator\";\nimport { Validator, printStyle } from \"./../shared/Validator\";\nimport {allOptions, configureOptions} from './options.js';\nimport KamadaKawai from \"./modules/KamadaKawai.js\";\n\n\n/**\n * Create a network visualization, displaying nodes and edges.\n *\n * @param {Element} container The DOM element in which the Network will\n * be created. Normally a div element.\n * @param {Object} data An object containing parameters\n * {Array} nodes\n * {Array} edges\n * @param {Object} options Options\n * @constructor Network\n */\nexport function Network(container, data, options) {\n if (!(this instanceof Network)) {\n throw new SyntaxError('Constructor must be called with the new operator');\n }\n\n // set constant values\n this.options = {};\n this.defaultOptions = {\n locale: 'en',\n locales: locales,\n clickToUse: false\n };\n util.extend(this.options, this.defaultOptions);\n\n /**\n * Containers for nodes and edges.\n *\n * 'edges' and 'nodes' contain the full definitions of all the network elements.\n * 'nodeIndices' and 'edgeIndices' contain the id's of the active elements.\n *\n * The distinction is important, because a defined node need not be active, i.e.\n * visible on the canvas. This happens in particular when clusters are defined, in\n * that case there will be nodes and edges not displayed.\n * The bottom line is that all code with actions related to visibility, *must* use\n * 'nodeIndices' and 'edgeIndices', not 'nodes' and 'edges' directly.\n */\n this.body = {\n container: container,\n\n // See comment above for following fields\n nodes: {},\n nodeIndices: [],\n edges: {},\n edgeIndices: [],\n\n emitter: {\n on: this.on.bind(this),\n off: this.off.bind(this),\n emit: this.emit.bind(this),\n once: this.once.bind(this)\n },\n eventListeners: {\n onTap: function() {},\n onTouch: function() {},\n onDoubleTap: function() {},\n onHold: function() {},\n onDragStart: function() {},\n onDrag: function() {},\n onDragEnd: function() {},\n onMouseWheel: function() {},\n onPinch: function() {},\n onMouseMove: function() {},\n onRelease: function() {},\n onContext: function() {}\n },\n data: {\n nodes: null, // A DataSet or DataView\n edges: null // A DataSet or DataView\n },\n functions: {\n createNode: function() {},\n createEdge: function() {},\n getPointer: function() {}\n },\n modules: {},\n view: {\n scale: 1,\n translation: {x: 0, y: 0}\n }\n };\n\n\n\n // bind the event listeners\n this.bindEventListeners();\n\n // setting up all modules\n this.images = new Images(() => this.body.emitter.emit(\"_requestRedraw\")); // object with images\n this.groups = new Groups(); // object with groups\n this.canvas = new Canvas(this.body); // DOM handler\n this.selectionHandler = new SelectionHandler(this.body, this.canvas); // Selection handler\n this.interactionHandler = new InteractionHandler(this.body, this.canvas, this.selectionHandler); // Interaction handler handles all the hammer bindings (that are bound by canvas), key\n this.view = new View(this.body, this.canvas); // camera handler, does animations and zooms\n this.renderer = new CanvasRenderer(this.body, this.canvas); // renderer, starts renderloop, has events that modules can hook into\n this.physics = new PhysicsEngine(this.body); // physics engine, does all the simulations\n this.layoutEngine = new LayoutEngine(this.body); // layout engine for inital layout and hierarchical layout\n this.clustering = new ClusterEngine(this.body); // clustering api\n this.manipulation = new ManipulationSystem(this.body, this.canvas, this.selectionHandler); // data manipulation system\n\n this.nodesHandler = new NodesHandler(this.body, this.images, this.groups, this.layoutEngine); // Handle adding, deleting and updating of nodes as well as global options\n this.edgesHandler = new EdgesHandler(this.body, this.images, this.groups); // Handle adding, deleting and updating of edges as well as global options\n\n this.body.modules[\"kamadaKawai\"] = new KamadaKawai(this.body,150,0.05); // Layouting algorithm.\n this.body.modules[\"clustering\"] = this.clustering;\n\n // create the DOM elements\n this.canvas._create();\n\n // apply options\n this.setOptions(options);\n\n // load data (the disable start variable will be the same as the enabled clustering)\n this.setData(data);\n\n}\n\n// Extend Network with an Emitter mixin\nEmitter(Network.prototype);\n\n\n/**\n * Set options\n * @param {Object} options\n */\nNetwork.prototype.setOptions = function (options) {\n if (options === null) {\n options = undefined; // This ensures that options handling doesn't crash in the handling\n }\n\n if (options !== undefined) {\n let errorFound = Validator.validate(options, allOptions);\n if (errorFound === true) {\n console.log('%cErrors have been found in the supplied options object.', printStyle);\n }\n\n // copy the global fields over\n let fields = ['locale','locales','clickToUse'];\n util.selectiveDeepExtend(fields,this.options, options);\n\n // the hierarchical system can adapt the edges and the physics to it's own options because not all combinations work with the hierarichical system.\n options = this.layoutEngine.setOptions(options.layout, options);\n\n this.canvas.setOptions(options); // options for canvas are in globals\n\n // pass the options to the modules\n this.groups.setOptions(options.groups);\n this.nodesHandler.setOptions(options.nodes);\n this.edgesHandler.setOptions(options.edges);\n this.physics.setOptions(options.physics);\n this.manipulation.setOptions(options.manipulation, options, this.options); // manipulation uses the locales in the globals\n\n this.interactionHandler.setOptions(options.interaction);\n this.renderer.setOptions(options.interaction); // options for rendering are in interaction\n this.selectionHandler.setOptions(options.interaction); // options for selection are in interaction\n\n // reload the settings of the nodes to apply changes in groups that are not referenced by pointer.\n if (options.groups !== undefined) {\n this.body.emitter.emit(\"refreshNodes\");\n }\n // these two do not have options at the moment, here for completeness\n //this.view.setOptions(options.view);\n //this.clustering.setOptions(options.clustering);\n\n if ('configure' in options) {\n if (!this.configurator) {\n this.configurator = new Configurator(this, this.body.container, configureOptions, this.canvas.pixelRatio);\n }\n\n this.configurator.setOptions(options.configure);\n }\n\n // if the configuration system is enabled, copy all options and put them into the config system\n if (this.configurator && this.configurator.options.enabled === true) {\n let networkOptions = {nodes:{},edges:{},layout:{},interaction:{},manipulation:{},physics:{},global:{}};\n util.deepExtend(networkOptions.nodes, this.nodesHandler.options);\n util.deepExtend(networkOptions.edges, this.edgesHandler.options);\n util.deepExtend(networkOptions.layout, this.layoutEngine.options);\n // load the selectionHandler and render default options in to the interaction group\n util.deepExtend(networkOptions.interaction, this.selectionHandler.options);\n util.deepExtend(networkOptions.interaction, this.renderer.options);\n\n util.deepExtend(networkOptions.interaction, this.interactionHandler.options);\n util.deepExtend(networkOptions.manipulation, this.manipulation.options);\n util.deepExtend(networkOptions.physics, this.physics.options);\n\n // load globals into the global object\n util.deepExtend(networkOptions.global, this.canvas.options);\n util.deepExtend(networkOptions.global, this.options);\n\n this.configurator.setModuleOptions(networkOptions);\n }\n\n // handle network global options\n if (options.clickToUse !== undefined) {\n if (options.clickToUse === true) {\n if (this.activator === undefined) {\n this.activator = new Activator(this.canvas.frame);\n this.activator.on('change', () => {this.body.emitter.emit(\"activate\")});\n }\n }\n else {\n if (this.activator !== undefined) {\n this.activator.destroy();\n delete this.activator;\n }\n this.body.emitter.emit(\"activate\");\n }\n }\n else {\n this.body.emitter.emit(\"activate\");\n }\n\n this.canvas.setSize();\n // start the physics simulation. Can be safely called multiple times.\n this.body.emitter.emit(\"startSimulation\");\n }\n};\n\n\n/**\n * Update the visible nodes and edges list with the most recent node state.\n *\n * Visible nodes are stored in this.body.nodeIndices.\n * Visible edges are stored in this.body.edgeIndices.\n * A node or edges is visible if it is not hidden or clustered.\n *\n * @private\n */\nNetwork.prototype._updateVisibleIndices = function () {\n let nodes = this.body.nodes;\n let edges = this.body.edges;\n this.body.nodeIndices = [];\n this.body.edgeIndices = [];\n\n for (let nodeId in nodes) {\n if (nodes.hasOwnProperty(nodeId)) {\n if (!this.clustering._isClusteredNode(nodeId) && nodes[nodeId].options.hidden === false) {\n this.body.nodeIndices.push(nodes[nodeId].id);\n }\n }\n }\n\n for (let edgeId in edges) {\n if (edges.hasOwnProperty(edgeId)) {\n let edge = edges[edgeId];\n\n // It can happen that this is executed *after* a node edge has been removed,\n // but *before* the edge itself has been removed. Taking this into account.\n let fromNode = nodes[edge.fromId];\n let toNode = nodes[edge.toId];\n let edgeNodesPresent = (fromNode !== undefined) && (toNode !== undefined);\n\n let isVisible =\n !this.clustering._isClusteredEdge(edgeId)\n && edge.options.hidden === false\n && edgeNodesPresent\n && fromNode.options.hidden === false // Also hidden if any of its connecting nodes are hidden\n && toNode.options.hidden === false; // idem\n\n if (isVisible) {\n this.body.edgeIndices.push(edge.id);\n }\n }\n }\n};\n\n\n/**\n * Bind all events\n */\nNetwork.prototype.bindEventListeners = function () {\n // This event will trigger a rebuilding of the cache everything.\n // Used when nodes or edges have been added or removed.\n this.body.emitter.on(\"_dataChanged\", () => {\n this.edgesHandler._updateState();\n this.body.emitter.emit(\"_dataUpdated\");\n });\n\n // this is called when options of EXISTING nodes or edges have changed.\n this.body.emitter.on(\"_dataUpdated\", () => {\n // Order important in following block\n this.clustering._updateState();\n this._updateVisibleIndices();\n\n this._updateValueRange(this.body.nodes);\n this._updateValueRange(this.body.edges);\n // start simulation (can be called safely, even if already running)\n this.body.emitter.emit(\"startSimulation\");\n this.body.emitter.emit(\"_requestRedraw\");\n });\n};\n\n\n/**\n * Set nodes and edges, and optionally options as well.\n *\n * @param {Object} data Object containing parameters:\n * {Array | DataSet | DataView} [nodes] Array with nodes\n * {Array | DataSet | DataView} [edges] Array with edges\n * {String} [dot] String containing data in DOT format\n * {String} [gephi] String containing data in gephi JSON format\n * {Options} [options] Object with options\n */\nNetwork.prototype.setData = function (data) {\n // reset the physics engine.\n this.body.emitter.emit(\"resetPhysics\");\n this.body.emitter.emit(\"_resetData\");\n\n // unselect all to ensure no selections from old data are carried over.\n this.selectionHandler.unselectAll();\n\n if (data && data.dot && (data.nodes || data.edges)) {\n throw new SyntaxError('Data must contain either parameter \"dot\" or ' +\n ' parameter pair \"nodes\" and \"edges\", but not both.');\n }\n\n // set options\n this.setOptions(data && data.options);\n // set all data\n if (data && data.dot) {\n console.log('The dot property has been deprecated. Please use the static convertDot method to convert DOT into vis.network format and use the normal data format with nodes and edges. This converter is used like this: var data = vis.network.convertDot(dotString);');\n // parse DOT file\n var dotData = dotparser.DOTToGraph(data.dot);\n this.setData(dotData);\n return;\n }\n else if (data && data.gephi) {\n // parse DOT file\n console.log('The gephi property has been deprecated. Please use the static convertGephi method to convert gephi into vis.network format and use the normal data format with nodes and edges. This converter is used like this: var data = vis.network.convertGephi(gephiJson);');\n var gephiData = gephiParser.parseGephi(data.gephi);\n this.setData(gephiData);\n return;\n }\n else {\n this.nodesHandler.setData(data && data.nodes, true);\n this.edgesHandler.setData(data && data.edges, true);\n }\n\n // emit change in data\n this.body.emitter.emit(\"_dataChanged\");\n\n // emit data loaded\n this.body.emitter.emit(\"_dataLoaded\");\n\n // find a stable position or start animating to a stable position\n this.body.emitter.emit(\"initPhysics\");\n};\n\n\n/**\n * Cleans up all bindings of the network, removing it fully from the memory IF the variable is set to null after calling this function.\n * var network = new vis.Network(..);\n * network.destroy();\n * network = null;\n */\nNetwork.prototype.destroy = function () {\n this.body.emitter.emit(\"destroy\");\n // clear events\n this.body.emitter.off();\n this.off();\n\n // delete modules\n delete this.groups;\n delete this.canvas;\n delete this.selectionHandler;\n delete this.interactionHandler;\n delete this.view;\n delete this.renderer;\n delete this.physics;\n delete this.layoutEngine;\n delete this.clustering;\n delete this.manipulation;\n delete this.nodesHandler;\n delete this.edgesHandler;\n delete this.configurator;\n delete this.images;\n\n for (var nodeId in this.body.nodes) {\n if (!this.body.nodes.hasOwnProperty(nodeId)) continue;\n delete this.body.nodes[nodeId];\n }\n\n for (var edgeId in this.body.edges) {\n if (!this.body.edges.hasOwnProperty(edgeId)) continue;\n delete this.body.edges[edgeId];\n }\n\n // remove the container and everything inside it recursively\n util.recursiveDOMDelete(this.body.container);\n};\n\n\n/**\n * Update the values of all object in the given array according to the current\n * value range of the objects in the array.\n * @param {Object} obj An object containing a set of Edges or Nodes\n * The objects must have a method getValue() and\n * setValueRange(min, max).\n * @private\n */\nNetwork.prototype._updateValueRange = function (obj) {\n var id;\n\n // determine the range of the objects\n var valueMin = undefined;\n var valueMax = undefined;\n var valueTotal = 0;\n for (id in obj) {\n if (obj.hasOwnProperty(id)) {\n var value = obj[id].getValue();\n if (value !== undefined) {\n valueMin = (valueMin === undefined) ? value : Math.min(value, valueMin);\n valueMax = (valueMax === undefined) ? value : Math.max(value, valueMax);\n valueTotal += value;\n }\n }\n }\n\n // adjust the range of all objects\n if (valueMin !== undefined && valueMax !== undefined) {\n for (id in obj) {\n if (obj.hasOwnProperty(id)) {\n obj[id].setValueRange(valueMin, valueMax, valueTotal);\n }\n }\n }\n};\n\n\n/**\n * Returns true when the Network is active.\n * @returns {boolean}\n */\nNetwork.prototype.isActive = function () {\n return !this.activator || this.activator.active;\n};\n\n\nNetwork.prototype.setSize = function() {return this.canvas.setSize.apply(this.canvas,arguments);};\nNetwork.prototype.canvasToDOM = function() {return this.canvas.canvasToDOM.apply(this.canvas,arguments);};\nNetwork.prototype.DOMtoCanvas = function() {return this.canvas.DOMtoCanvas.apply(this.canvas,arguments);};\n\n\n/**\n * Nodes can be in clusters. Clusters can also be in clusters. This function returns and array of\n * nodeIds showing where the node is.\n *\n * If any nodeId in the chain, especially the first passed in as a parameter, is not present in\n * the current nodes list, an empty array is returned.\n *\n * Example:\n * cluster 'A' contains cluster 'B',\n * cluster 'B' contains cluster 'C',\n * cluster 'C' contains node 'fred'.\n * `jsnetwork.clustering.findNode('fred')` will return `['A','B','C','fred']`.\n *\n * @param {string|number} nodeId\n * @returns {Array}\n */\nNetwork.prototype.findNode = function() {return this.clustering.findNode.apply(this.clustering,arguments);};\n\n\nNetwork.prototype.isCluster = function() {return this.clustering.isCluster.apply(this.clustering,arguments);};\nNetwork.prototype.openCluster = function() {return this.clustering.openCluster.apply(this.clustering,arguments);};\nNetwork.prototype.cluster = function() {return this.clustering.cluster.apply(this.clustering,arguments);};\nNetwork.prototype.getNodesInCluster = function() {return this.clustering.getNodesInCluster.apply(this.clustering,arguments);};\nNetwork.prototype.clusterByConnection = function() {return this.clustering.clusterByConnection.apply(this.clustering,arguments);};\nNetwork.prototype.clusterByHubsize = function() {return this.clustering.clusterByHubsize.apply(this.clustering,arguments);};\n\n/**\n * This method will cluster all nodes with 1 edge with their respective connected node.\n * The options object is explained in full
below.\n *\n * @param {object} [options]\n * @returns {undefined}\n */\nNetwork.prototype.clusterOutliers = function() {return this.clustering.clusterOutliers.apply(this.clustering,arguments);};\n\nNetwork.prototype.getSeed = function() {return this.layoutEngine.getSeed.apply(this.layoutEngine,arguments);};\nNetwork.prototype.enableEditMode = function() {return this.manipulation.enableEditMode.apply(this.manipulation,arguments);};\nNetwork.prototype.disableEditMode = function() {return this.manipulation.disableEditMode.apply(this.manipulation,arguments);};\nNetwork.prototype.addNodeMode = function() {return this.manipulation.addNodeMode.apply(this.manipulation,arguments);};\nNetwork.prototype.editNode = function() {return this.manipulation.editNode.apply(this.manipulation,arguments);};\nNetwork.prototype.editNodeMode = function() {console.log(\"Deprecated: Please use editNode instead of editNodeMode.\"); return this.manipulation.editNode.apply(this.manipulation,arguments);};\nNetwork.prototype.addEdgeMode = function() {return this.manipulation.addEdgeMode.apply(this.manipulation,arguments);};\nNetwork.prototype.editEdgeMode = function() {return this.manipulation.editEdgeMode.apply(this.manipulation,arguments);};\nNetwork.prototype.deleteSelected = function() {return this.manipulation.deleteSelected.apply(this.manipulation,arguments);};\nNetwork.prototype.getPositions = function() {return this.nodesHandler.getPositions.apply(this.nodesHandler,arguments);};\nNetwork.prototype.storePositions = function() {return this.nodesHandler.storePositions.apply(this.nodesHandler,arguments);};\nNetwork.prototype.moveNode = function() {return this.nodesHandler.moveNode.apply(this.nodesHandler,arguments);};\nNetwork.prototype.getBoundingBox = function() {return this.nodesHandler.getBoundingBox.apply(this.nodesHandler,arguments);};\nNetwork.prototype.getConnectedNodes = function(objectId) {\n if (this.body.nodes[objectId] !== undefined) {\n return this.nodesHandler.getConnectedNodes.apply(this.nodesHandler,arguments);\n }\n else {\n return this.edgesHandler.getConnectedNodes.apply(this.edgesHandler,arguments);\n }\n};\nNetwork.prototype.getConnectedEdges = function() {return this.nodesHandler.getConnectedEdges.apply(this.nodesHandler,arguments);};\nNetwork.prototype.startSimulation = function() {return this.physics.startSimulation.apply(this.physics,arguments);};\nNetwork.prototype.stopSimulation = function() {return this.physics.stopSimulation.apply(this.physics,arguments);};\nNetwork.prototype.stabilize = function() {return this.physics.stabilize.apply(this.physics,arguments);};\nNetwork.prototype.getSelection = function() {return this.selectionHandler.getSelection.apply(this.selectionHandler,arguments);};\nNetwork.prototype.setSelection = function() {return this.selectionHandler.setSelection.apply(this.selectionHandler,arguments);};\nNetwork.prototype.getSelectedNodes = function() {return this.selectionHandler.getSelectedNodes.apply(this.selectionHandler,arguments);};\nNetwork.prototype.getSelectedEdges = function() {return this.selectionHandler.getSelectedEdges.apply(this.selectionHandler,arguments);};\nNetwork.prototype.getNodeAt = function() {\n var node = this.selectionHandler.getNodeAt.apply(this.selectionHandler,arguments);\n if (node !== undefined && node.id !== undefined) {\n return node.id;\n }\n return node;\n};\nNetwork.prototype.getEdgeAt = function() {\n var edge = this.selectionHandler.getEdgeAt.apply(this.selectionHandler,arguments);\n if (edge !== undefined && edge.id !== undefined) {\n return edge.id;\n }\n return edge;\n };\nNetwork.prototype.selectNodes = function() {return this.selectionHandler.selectNodes.apply(this.selectionHandler,arguments);};\nNetwork.prototype.selectEdges = function() {return this.selectionHandler.selectEdges.apply(this.selectionHandler,arguments);};\nNetwork.prototype.unselectAll = function() {\n this.selectionHandler.unselectAll.apply(this.selectionHandler,arguments);\n this.redraw();\n};\nNetwork.prototype.redraw = function() {return this.renderer.redraw.apply(this.renderer,arguments);};\nNetwork.prototype.getScale = function() {return this.view.getScale.apply(this.view,arguments);};\nNetwork.prototype.getViewPosition = function() {return this.view.getViewPosition.apply(this.view,arguments);};\nNetwork.prototype.fit = function() {return this.view.fit.apply(this.view,arguments);};\nNetwork.prototype.moveTo = function() {return this.view.moveTo.apply(this.view,arguments);};\nNetwork.prototype.focus = function() {return this.view.focus.apply(this.view,arguments);};\nNetwork.prototype.releaseNode = function() {return this.view.releaseNode.apply(this.view,arguments);};\nNetwork.prototype.getOptionsFromConfigurator = function() {\n let options = {};\n if (this.configurator) {\n options = this.configurator.getOptions.apply(this.configurator);\n }\n return options;\n};\n\n\n\nexport default Network;\n","// DOM utility methods\n\n/**\n * this prepares the JSON container for allocating SVG elements\n * @param {Object} JSONcontainer\n * @private\n */\nexports.prepareElements = function(JSONcontainer) {\n // cleanup the redundant svgElements;\n for (var elementType in JSONcontainer) {\n if (JSONcontainer.hasOwnProperty(elementType)) {\n JSONcontainer[elementType].redundant = JSONcontainer[elementType].used;\n JSONcontainer[elementType].used = [];\n }\n }\n};\n\n/**\n * this cleans up all the unused SVG elements. By asking for the parentNode, we only need to supply the JSON container from\n * which to remove the redundant elements.\n *\n * @param {Object} JSONcontainer\n * @private\n */\nexports.cleanupElements = function(JSONcontainer) {\n // cleanup the redundant svgElements;\n for (var elementType in JSONcontainer) {\n if (JSONcontainer.hasOwnProperty(elementType)) {\n if (JSONcontainer[elementType].redundant) {\n for (var i = 0; i < JSONcontainer[elementType].redundant.length; i++) {\n JSONcontainer[elementType].redundant[i].parentNode.removeChild(JSONcontainer[elementType].redundant[i]);\n }\n JSONcontainer[elementType].redundant = [];\n }\n }\n }\n};\n\n/**\n * Ensures that all elements are removed first up so they can be recreated cleanly\n * @param {Object} JSONcontainer\n */\nexports.resetElements = function(JSONcontainer) {\n exports.prepareElements(JSONcontainer);\n exports.cleanupElements(JSONcontainer);\n exports.prepareElements(JSONcontainer);\n};\n\n/**\n * Allocate or generate an SVG element if needed. Store a reference to it in the JSON container and draw it in the svgContainer\n * the JSON container and the SVG container have to be supplied so other svg containers (like the legend) can use this.\n *\n * @param {string} elementType\n * @param {Object} JSONcontainer\n * @param {Object} svgContainer\n * @returns {Element}\n * @private\n */\nexports.getSVGElement = function (elementType, JSONcontainer, svgContainer) {\n var element;\n // allocate SVG element, if it doesnt yet exist, create one.\n if (JSONcontainer.hasOwnProperty(elementType)) { // this element has been created before\n // check if there is an redundant element\n if (JSONcontainer[elementType].redundant.length > 0) {\n element = JSONcontainer[elementType].redundant[0];\n JSONcontainer[elementType].redundant.shift();\n }\n else {\n // create a new element and add it to the SVG\n element = document.createElementNS('http://www.w3.org/2000/svg', elementType);\n svgContainer.appendChild(element);\n }\n }\n else {\n // create a new element and add it to the SVG, also create a new object in the svgElements to keep track of it.\n element = document.createElementNS('http://www.w3.org/2000/svg', elementType);\n JSONcontainer[elementType] = {used: [], redundant: []};\n svgContainer.appendChild(element);\n }\n JSONcontainer[elementType].used.push(element);\n return element;\n};\n\n\n/**\n * Allocate or generate an SVG element if needed. Store a reference to it in the JSON container and draw it in the svgContainer\n * the JSON container and the SVG container have to be supplied so other svg containers (like the legend) can use this.\n *\n * @param {string} elementType\n * @param {Object} JSONcontainer\n * @param {Element} DOMContainer\n * @param {Element} insertBefore\n * @returns {*}\n */\nexports.getDOMElement = function (elementType, JSONcontainer, DOMContainer, insertBefore) {\n var element;\n // allocate DOM element, if it doesnt yet exist, create one.\n if (JSONcontainer.hasOwnProperty(elementType)) { // this element has been created before\n // check if there is an redundant element\n if (JSONcontainer[elementType].redundant.length > 0) {\n element = JSONcontainer[elementType].redundant[0];\n JSONcontainer[elementType].redundant.shift();\n }\n else {\n // create a new element and add it to the SVG\n element = document.createElement(elementType);\n if (insertBefore !== undefined) {\n DOMContainer.insertBefore(element, insertBefore);\n }\n else {\n DOMContainer.appendChild(element);\n }\n }\n }\n else {\n // create a new element and add it to the SVG, also create a new object in the svgElements to keep track of it.\n element = document.createElement(elementType);\n JSONcontainer[elementType] = {used: [], redundant: []};\n if (insertBefore !== undefined) {\n DOMContainer.insertBefore(element, insertBefore);\n }\n else {\n DOMContainer.appendChild(element);\n }\n }\n JSONcontainer[elementType].used.push(element);\n return element;\n};\n\n\n\n\n/**\n * Draw a point object. This is a separate function because it can also be called by the legend.\n * The reason the JSONcontainer and the target SVG svgContainer have to be supplied is so the legend can use these functions\n * as well.\n *\n * @param {number} x\n * @param {number} y\n * @param {Object} groupTemplate: A template containing the necessary information to draw the datapoint e.g., {style: 'circle', size: 5, className: 'className' }\n * @param {Object} JSONcontainer\n * @param {Object} svgContainer\n * @param {Object} labelObj\n * @returns {vis.PointItem}\n */\nexports.drawPoint = function(x, y, groupTemplate, JSONcontainer, svgContainer, labelObj) {\n var point;\n if (groupTemplate.style == 'circle') {\n point = exports.getSVGElement('circle', JSONcontainer, svgContainer);\n point.setAttributeNS(null, \"cx\", x);\n point.setAttributeNS(null, \"cy\", y);\n point.setAttributeNS(null, \"r\", 0.5 * groupTemplate.size);\n }\n else {\n point = exports.getSVGElement('rect', JSONcontainer, svgContainer);\n point.setAttributeNS(null, \"x\", x - 0.5 * groupTemplate.size);\n point.setAttributeNS(null, \"y\", y - 0.5 * groupTemplate.size);\n point.setAttributeNS(null, \"width\", groupTemplate.size);\n point.setAttributeNS(null, \"height\", groupTemplate.size);\n }\n\n if (groupTemplate.styles !== undefined) {\n point.setAttributeNS(null, \"style\", groupTemplate.styles);\n }\n point.setAttributeNS(null, \"class\", groupTemplate.className + \" vis-point\");\n //handle label\n\n\n if (labelObj) {\n var label = exports.getSVGElement('text', JSONcontainer, svgContainer);\n if (labelObj.xOffset) {\n x = x + labelObj.xOffset;\n }\n\n if (labelObj.yOffset) {\n y = y + labelObj.yOffset;\n }\n if (labelObj.content) {\n label.textContent = labelObj.content;\n }\n\n if (labelObj.className) {\n label.setAttributeNS(null, \"class\", labelObj.className + \" vis-label\");\n }\n label.setAttributeNS(null, \"x\", x);\n label.setAttributeNS(null, \"y\", y);\n }\n\n return point;\n};\n\n/**\n * draw a bar SVG element centered on the X coordinate\n *\n * @param {number} x\n * @param {number} y\n * @param {number} width\n * @param {number} height\n * @param {string} className\n * @param {Object} JSONcontainer\n * @param {Object} svgContainer\n * @param {string} style\n */\nexports.drawBar = function (x, y, width, height, className, JSONcontainer, svgContainer, style) {\n if (height != 0) {\n if (height < 0) {\n height *= -1;\n y -= height;\n }\n var rect = exports.getSVGElement('rect',JSONcontainer, svgContainer);\n rect.setAttributeNS(null, \"x\", x - 0.5 * width);\n rect.setAttributeNS(null, \"y\", y);\n rect.setAttributeNS(null, \"width\", width);\n rect.setAttributeNS(null, \"height\", height);\n rect.setAttributeNS(null, \"class\", className);\n if (style) {\n rect.setAttributeNS(null, \"style\", style);\n }\n }\n};","//! moment.js\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n typeof define === 'function' && define.amd ? define(factory) :\n global.moment = factory()\n}(this, (function () { 'use strict';\n\n var hookCallback;\n\n function hooks () {\n return hookCallback.apply(null, arguments);\n }\n\n // This is done to register the method called with moment()\n // without creating circular dependencies.\n function setHookCallback (callback) {\n hookCallback = callback;\n }\n\n function isArray(input) {\n return input instanceof Array || Object.prototype.toString.call(input) === '[object Array]';\n }\n\n function isObject(input) {\n // IE8 will treat undefined and null as object if it wasn't for\n // input != null\n return input != null && Object.prototype.toString.call(input) === '[object Object]';\n }\n\n function isObjectEmpty(obj) {\n if (Object.getOwnPropertyNames) {\n return (Object.getOwnPropertyNames(obj).length === 0);\n } else {\n var k;\n for (k in obj) {\n if (obj.hasOwnProperty(k)) {\n return false;\n }\n }\n return true;\n }\n }\n\n function isUndefined(input) {\n return input === void 0;\n }\n\n function isNumber(input) {\n return typeof input === 'number' || Object.prototype.toString.call(input) === '[object Number]';\n }\n\n function isDate(input) {\n return input instanceof Date || Object.prototype.toString.call(input) === '[object Date]';\n }\n\n function map(arr, fn) {\n var res = [], i;\n for (i = 0; i < arr.length; ++i) {\n res.push(fn(arr[i], i));\n }\n return res;\n }\n\n function hasOwnProp(a, b) {\n return Object.prototype.hasOwnProperty.call(a, b);\n }\n\n function extend(a, b) {\n for (var i in b) {\n if (hasOwnProp(b, i)) {\n a[i] = b[i];\n }\n }\n\n if (hasOwnProp(b, 'toString')) {\n a.toString = b.toString;\n }\n\n if (hasOwnProp(b, 'valueOf')) {\n a.valueOf = b.valueOf;\n }\n\n return a;\n }\n\n function createUTC (input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, true).utc();\n }\n\n function defaultParsingFlags() {\n // We need to deep clone this object.\n return {\n empty : false,\n unusedTokens : [],\n unusedInput : [],\n overflow : -2,\n charsLeftOver : 0,\n nullInput : false,\n invalidMonth : null,\n invalidFormat : false,\n userInvalidated : false,\n iso : false,\n parsedDateParts : [],\n meridiem : null,\n rfc2822 : false,\n weekdayMismatch : false\n };\n }\n\n function getParsingFlags(m) {\n if (m._pf == null) {\n m._pf = defaultParsingFlags();\n }\n return m._pf;\n }\n\n var some;\n if (Array.prototype.some) {\n some = Array.prototype.some;\n } else {\n some = function (fun) {\n var t = Object(this);\n var len = t.length >>> 0;\n\n for (var i = 0; i < len; i++) {\n if (i in t && fun.call(this, t[i], i, t)) {\n return true;\n }\n }\n\n return false;\n };\n }\n\n function isValid(m) {\n if (m._isValid == null) {\n var flags = getParsingFlags(m);\n var parsedParts = some.call(flags.parsedDateParts, function (i) {\n return i != null;\n });\n var isNowValid = !isNaN(m._d.getTime()) &&\n flags.overflow < 0 &&\n !flags.empty &&\n !flags.invalidMonth &&\n !flags.invalidWeekday &&\n !flags.weekdayMismatch &&\n !flags.nullInput &&\n !flags.invalidFormat &&\n !flags.userInvalidated &&\n (!flags.meridiem || (flags.meridiem && parsedParts));\n\n if (m._strict) {\n isNowValid = isNowValid &&\n flags.charsLeftOver === 0 &&\n flags.unusedTokens.length === 0 &&\n flags.bigHour === undefined;\n }\n\n if (Object.isFrozen == null || !Object.isFrozen(m)) {\n m._isValid = isNowValid;\n }\n else {\n return isNowValid;\n }\n }\n return m._isValid;\n }\n\n function createInvalid (flags) {\n var m = createUTC(NaN);\n if (flags != null) {\n extend(getParsingFlags(m), flags);\n }\n else {\n getParsingFlags(m).userInvalidated = true;\n }\n\n return m;\n }\n\n // Plugins that add properties should also add the key here (null value),\n // so we can properly clone ourselves.\n var momentProperties = hooks.momentProperties = [];\n\n function copyConfig(to, from) {\n var i, prop, val;\n\n if (!isUndefined(from._isAMomentObject)) {\n to._isAMomentObject = from._isAMomentObject;\n }\n if (!isUndefined(from._i)) {\n to._i = from._i;\n }\n if (!isUndefined(from._f)) {\n to._f = from._f;\n }\n if (!isUndefined(from._l)) {\n to._l = from._l;\n }\n if (!isUndefined(from._strict)) {\n to._strict = from._strict;\n }\n if (!isUndefined(from._tzm)) {\n to._tzm = from._tzm;\n }\n if (!isUndefined(from._isUTC)) {\n to._isUTC = from._isUTC;\n }\n if (!isUndefined(from._offset)) {\n to._offset = from._offset;\n }\n if (!isUndefined(from._pf)) {\n to._pf = getParsingFlags(from);\n }\n if (!isUndefined(from._locale)) {\n to._locale = from._locale;\n }\n\n if (momentProperties.length > 0) {\n for (i = 0; i < momentProperties.length; i++) {\n prop = momentProperties[i];\n val = from[prop];\n if (!isUndefined(val)) {\n to[prop] = val;\n }\n }\n }\n\n return to;\n }\n\n var updateInProgress = false;\n\n // Moment prototype object\n function Moment(config) {\n copyConfig(this, config);\n this._d = new Date(config._d != null ? config._d.getTime() : NaN);\n if (!this.isValid()) {\n this._d = new Date(NaN);\n }\n // Prevent infinite loop in case updateOffset creates new moment\n // objects.\n if (updateInProgress === false) {\n updateInProgress = true;\n hooks.updateOffset(this);\n updateInProgress = false;\n }\n }\n\n function isMoment (obj) {\n return obj instanceof Moment || (obj != null && obj._isAMomentObject != null);\n }\n\n function absFloor (number) {\n if (number < 0) {\n // -0 -> 0\n return Math.ceil(number) || 0;\n } else {\n return Math.floor(number);\n }\n }\n\n function toInt(argumentForCoercion) {\n var coercedNumber = +argumentForCoercion,\n value = 0;\n\n if (coercedNumber !== 0 && isFinite(coercedNumber)) {\n value = absFloor(coercedNumber);\n }\n\n return value;\n }\n\n // compare two arrays, return the number of differences\n function compareArrays(array1, array2, dontConvert) {\n var len = Math.min(array1.length, array2.length),\n lengthDiff = Math.abs(array1.length - array2.length),\n diffs = 0,\n i;\n for (i = 0; i < len; i++) {\n if ((dontConvert && array1[i] !== array2[i]) ||\n (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {\n diffs++;\n }\n }\n return diffs + lengthDiff;\n }\n\n function warn(msg) {\n if (hooks.suppressDeprecationWarnings === false &&\n (typeof console !== 'undefined') && console.warn) {\n console.warn('Deprecation warning: ' + msg);\n }\n }\n\n function deprecate(msg, fn) {\n var firstTime = true;\n\n return extend(function () {\n if (hooks.deprecationHandler != null) {\n hooks.deprecationHandler(null, msg);\n }\n if (firstTime) {\n var args = [];\n var arg;\n for (var i = 0; i < arguments.length; i++) {\n arg = '';\n if (typeof arguments[i] === 'object') {\n arg += '\\n[' + i + '] ';\n for (var key in arguments[0]) {\n arg += key + ': ' + arguments[0][key] + ', ';\n }\n arg = arg.slice(0, -2); // Remove trailing comma and space\n } else {\n arg = arguments[i];\n }\n args.push(arg);\n }\n warn(msg + '\\nArguments: ' + Array.prototype.slice.call(args).join('') + '\\n' + (new Error()).stack);\n firstTime = false;\n }\n return fn.apply(this, arguments);\n }, fn);\n }\n\n var deprecations = {};\n\n function deprecateSimple(name, msg) {\n if (hooks.deprecationHandler != null) {\n hooks.deprecationHandler(name, msg);\n }\n if (!deprecations[name]) {\n warn(msg);\n deprecations[name] = true;\n }\n }\n\n hooks.suppressDeprecationWarnings = false;\n hooks.deprecationHandler = null;\n\n function isFunction(input) {\n return input instanceof Function || Object.prototype.toString.call(input) === '[object Function]';\n }\n\n function set (config) {\n var prop, i;\n for (i in config) {\n prop = config[i];\n if (isFunction(prop)) {\n this[i] = prop;\n } else {\n this['_' + i] = prop;\n }\n }\n this._config = config;\n // Lenient ordinal parsing accepts just a number in addition to\n // number + (possibly) stuff coming from _dayOfMonthOrdinalParse.\n // TODO: Remove \"ordinalParse\" fallback in next major release.\n this._dayOfMonthOrdinalParseLenient = new RegExp(\n (this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) +\n '|' + (/\\d{1,2}/).source);\n }\n\n function mergeConfigs(parentConfig, childConfig) {\n var res = extend({}, parentConfig), prop;\n for (prop in childConfig) {\n if (hasOwnProp(childConfig, prop)) {\n if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) {\n res[prop] = {};\n extend(res[prop], parentConfig[prop]);\n extend(res[prop], childConfig[prop]);\n } else if (childConfig[prop] != null) {\n res[prop] = childConfig[prop];\n } else {\n delete res[prop];\n }\n }\n }\n for (prop in parentConfig) {\n if (hasOwnProp(parentConfig, prop) &&\n !hasOwnProp(childConfig, prop) &&\n isObject(parentConfig[prop])) {\n // make sure changes to properties don't modify parent config\n res[prop] = extend({}, res[prop]);\n }\n }\n return res;\n }\n\n function Locale(config) {\n if (config != null) {\n this.set(config);\n }\n }\n\n var keys;\n\n if (Object.keys) {\n keys = Object.keys;\n } else {\n keys = function (obj) {\n var i, res = [];\n for (i in obj) {\n if (hasOwnProp(obj, i)) {\n res.push(i);\n }\n }\n return res;\n };\n }\n\n var defaultCalendar = {\n sameDay : '[Today at] LT',\n nextDay : '[Tomorrow at] LT',\n nextWeek : 'dddd [at] LT',\n lastDay : '[Yesterday at] LT',\n lastWeek : '[Last] dddd [at] LT',\n sameElse : 'L'\n };\n\n function calendar (key, mom, now) {\n var output = this._calendar[key] || this._calendar['sameElse'];\n return isFunction(output) ? output.call(mom, now) : output;\n }\n\n var defaultLongDateFormat = {\n LTS : 'h:mm:ss A',\n LT : 'h:mm A',\n L : 'MM/DD/YYYY',\n LL : 'MMMM D, YYYY',\n LLL : 'MMMM D, YYYY h:mm A',\n LLLL : 'dddd, MMMM D, YYYY h:mm A'\n };\n\n function longDateFormat (key) {\n var format = this._longDateFormat[key],\n formatUpper = this._longDateFormat[key.toUpperCase()];\n\n if (format || !formatUpper) {\n return format;\n }\n\n this._longDateFormat[key] = formatUpper.replace(/MMMM|MM|DD|dddd/g, function (val) {\n return val.slice(1);\n });\n\n return this._longDateFormat[key];\n }\n\n var defaultInvalidDate = 'Invalid date';\n\n function invalidDate () {\n return this._invalidDate;\n }\n\n var defaultOrdinal = '%d';\n var defaultDayOfMonthOrdinalParse = /\\d{1,2}/;\n\n function ordinal (number) {\n return this._ordinal.replace('%d', number);\n }\n\n var defaultRelativeTime = {\n future : 'in %s',\n past : '%s ago',\n s : 'a few seconds',\n ss : '%d seconds',\n m : 'a minute',\n mm : '%d minutes',\n h : 'an hour',\n hh : '%d hours',\n d : 'a day',\n dd : '%d days',\n M : 'a month',\n MM : '%d months',\n y : 'a year',\n yy : '%d years'\n };\n\n function relativeTime (number, withoutSuffix, string, isFuture) {\n var output = this._relativeTime[string];\n return (isFunction(output)) ?\n output(number, withoutSuffix, string, isFuture) :\n output.replace(/%d/i, number);\n }\n\n function pastFuture (diff, output) {\n var format = this._relativeTime[diff > 0 ? 'future' : 'past'];\n return isFunction(format) ? format(output) : format.replace(/%s/i, output);\n }\n\n var aliases = {};\n\n function addUnitAlias (unit, shorthand) {\n var lowerCase = unit.toLowerCase();\n aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit;\n }\n\n function normalizeUnits(units) {\n return typeof units === 'string' ? aliases[units] || aliases[units.toLowerCase()] : undefined;\n }\n\n function normalizeObjectUnits(inputObject) {\n var normalizedInput = {},\n normalizedProp,\n prop;\n\n for (prop in inputObject) {\n if (hasOwnProp(inputObject, prop)) {\n normalizedProp = normalizeUnits(prop);\n if (normalizedProp) {\n normalizedInput[normalizedProp] = inputObject[prop];\n }\n }\n }\n\n return normalizedInput;\n }\n\n var priorities = {};\n\n function addUnitPriority(unit, priority) {\n priorities[unit] = priority;\n }\n\n function getPrioritizedUnits(unitsObj) {\n var units = [];\n for (var u in unitsObj) {\n units.push({unit: u, priority: priorities[u]});\n }\n units.sort(function (a, b) {\n return a.priority - b.priority;\n });\n return units;\n }\n\n function zeroFill(number, targetLength, forceSign) {\n var absNumber = '' + Math.abs(number),\n zerosToFill = targetLength - absNumber.length,\n sign = number >= 0;\n return (sign ? (forceSign ? '+' : '') : '-') +\n Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) + absNumber;\n }\n\n var formattingTokens = /(\\[[^\\[]*\\])|(\\\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g;\n\n var localFormattingTokens = /(\\[[^\\[]*\\])|(\\\\)?(LTS|LT|LL?L?L?|l{1,4})/g;\n\n var formatFunctions = {};\n\n var formatTokenFunctions = {};\n\n // token: 'M'\n // padded: ['MM', 2]\n // ordinal: 'Mo'\n // callback: function () { this.month() + 1 }\n function addFormatToken (token, padded, ordinal, callback) {\n var func = callback;\n if (typeof callback === 'string') {\n func = function () {\n return this[callback]();\n };\n }\n if (token) {\n formatTokenFunctions[token] = func;\n }\n if (padded) {\n formatTokenFunctions[padded[0]] = function () {\n return zeroFill(func.apply(this, arguments), padded[1], padded[2]);\n };\n }\n if (ordinal) {\n formatTokenFunctions[ordinal] = function () {\n return this.localeData().ordinal(func.apply(this, arguments), token);\n };\n }\n }\n\n function removeFormattingTokens(input) {\n if (input.match(/\\[[\\s\\S]/)) {\n return input.replace(/^\\[|\\]$/g, '');\n }\n return input.replace(/\\\\/g, '');\n }\n\n function makeFormatFunction(format) {\n var array = format.match(formattingTokens), i, length;\n\n for (i = 0, length = array.length; i < length; i++) {\n if (formatTokenFunctions[array[i]]) {\n array[i] = formatTokenFunctions[array[i]];\n } else {\n array[i] = removeFormattingTokens(array[i]);\n }\n }\n\n return function (mom) {\n var output = '', i;\n for (i = 0; i < length; i++) {\n output += isFunction(array[i]) ? array[i].call(mom, format) : array[i];\n }\n return output;\n };\n }\n\n // format date using native date object\n function formatMoment(m, format) {\n if (!m.isValid()) {\n return m.localeData().invalidDate();\n }\n\n format = expandFormat(format, m.localeData());\n formatFunctions[format] = formatFunctions[format] || makeFormatFunction(format);\n\n return formatFunctions[format](m);\n }\n\n function expandFormat(format, locale) {\n var i = 5;\n\n function replaceLongDateFormatTokens(input) {\n return locale.longDateFormat(input) || input;\n }\n\n localFormattingTokens.lastIndex = 0;\n while (i >= 0 && localFormattingTokens.test(format)) {\n format = format.replace(localFormattingTokens, replaceLongDateFormatTokens);\n localFormattingTokens.lastIndex = 0;\n i -= 1;\n }\n\n return format;\n }\n\n var match1 = /\\d/; // 0 - 9\n var match2 = /\\d\\d/; // 00 - 99\n var match3 = /\\d{3}/; // 000 - 999\n var match4 = /\\d{4}/; // 0000 - 9999\n var match6 = /[+-]?\\d{6}/; // -999999 - 999999\n var match1to2 = /\\d\\d?/; // 0 - 99\n var match3to4 = /\\d\\d\\d\\d?/; // 999 - 9999\n var match5to6 = /\\d\\d\\d\\d\\d\\d?/; // 99999 - 999999\n var match1to3 = /\\d{1,3}/; // 0 - 999\n var match1to4 = /\\d{1,4}/; // 0 - 9999\n var match1to6 = /[+-]?\\d{1,6}/; // -999999 - 999999\n\n var matchUnsigned = /\\d+/; // 0 - inf\n var matchSigned = /[+-]?\\d+/; // -inf - inf\n\n var matchOffset = /Z|[+-]\\d\\d:?\\d\\d/gi; // +00:00 -00:00 +0000 -0000 or Z\n var matchShortOffset = /Z|[+-]\\d\\d(?::?\\d\\d)?/gi; // +00 -00 +00:00 -00:00 +0000 -0000 or Z\n\n var matchTimestamp = /[+-]?\\d+(\\.\\d{1,3})?/; // 123456789 123456789.123\n\n // any word (or two) characters or numbers including two/three word month in arabic.\n // includes scottish gaelic two word and hyphenated months\n var matchWord = /[0-9]{0,256}['a-z\\u00A0-\\u05FF\\u0700-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFF07\\uFF10-\\uFFEF]{1,256}|[\\u0600-\\u06FF\\/]{1,256}(\\s*?[\\u0600-\\u06FF]{1,256}){1,2}/i;\n\n var regexes = {};\n\n function addRegexToken (token, regex, strictRegex) {\n regexes[token] = isFunction(regex) ? regex : function (isStrict, localeData) {\n return (isStrict && strictRegex) ? strictRegex : regex;\n };\n }\n\n function getParseRegexForToken (token, config) {\n if (!hasOwnProp(regexes, token)) {\n return new RegExp(unescapeFormat(token));\n }\n\n return regexes[token](config._strict, config._locale);\n }\n\n // Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript\n function unescapeFormat(s) {\n return regexEscape(s.replace('\\\\', '').replace(/\\\\(\\[)|\\\\(\\])|\\[([^\\]\\[]*)\\]|\\\\(.)/g, function (matched, p1, p2, p3, p4) {\n return p1 || p2 || p3 || p4;\n }));\n }\n\n function regexEscape(s) {\n return s.replace(/[-\\/\\\\^$*+?.()|[\\]{}]/g, '\\\\$&');\n }\n\n var tokens = {};\n\n function addParseToken (token, callback) {\n var i, func = callback;\n if (typeof token === 'string') {\n token = [token];\n }\n if (isNumber(callback)) {\n func = function (input, array) {\n array[callback] = toInt(input);\n };\n }\n for (i = 0; i < token.length; i++) {\n tokens[token[i]] = func;\n }\n }\n\n function addWeekParseToken (token, callback) {\n addParseToken(token, function (input, array, config, token) {\n config._w = config._w || {};\n callback(input, config._w, config, token);\n });\n }\n\n function addTimeToArrayFromToken(token, input, config) {\n if (input != null && hasOwnProp(tokens, token)) {\n tokens[token](input, config._a, config, token);\n }\n }\n\n var YEAR = 0;\n var MONTH = 1;\n var DATE = 2;\n var HOUR = 3;\n var MINUTE = 4;\n var SECOND = 5;\n var MILLISECOND = 6;\n var WEEK = 7;\n var WEEKDAY = 8;\n\n // FORMATTING\n\n addFormatToken('Y', 0, 0, function () {\n var y = this.year();\n return y <= 9999 ? '' + y : '+' + y;\n });\n\n addFormatToken(0, ['YY', 2], 0, function () {\n return this.year() % 100;\n });\n\n addFormatToken(0, ['YYYY', 4], 0, 'year');\n addFormatToken(0, ['YYYYY', 5], 0, 'year');\n addFormatToken(0, ['YYYYYY', 6, true], 0, 'year');\n\n // ALIASES\n\n addUnitAlias('year', 'y');\n\n // PRIORITIES\n\n addUnitPriority('year', 1);\n\n // PARSING\n\n addRegexToken('Y', matchSigned);\n addRegexToken('YY', match1to2, match2);\n addRegexToken('YYYY', match1to4, match4);\n addRegexToken('YYYYY', match1to6, match6);\n addRegexToken('YYYYYY', match1to6, match6);\n\n addParseToken(['YYYYY', 'YYYYYY'], YEAR);\n addParseToken('YYYY', function (input, array) {\n array[YEAR] = input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input);\n });\n addParseToken('YY', function (input, array) {\n array[YEAR] = hooks.parseTwoDigitYear(input);\n });\n addParseToken('Y', function (input, array) {\n array[YEAR] = parseInt(input, 10);\n });\n\n // HELPERS\n\n function daysInYear(year) {\n return isLeapYear(year) ? 366 : 365;\n }\n\n function isLeapYear(year) {\n return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;\n }\n\n // HOOKS\n\n hooks.parseTwoDigitYear = function (input) {\n return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);\n };\n\n // MOMENTS\n\n var getSetYear = makeGetSet('FullYear', true);\n\n function getIsLeapYear () {\n return isLeapYear(this.year());\n }\n\n function makeGetSet (unit, keepTime) {\n return function (value) {\n if (value != null) {\n set$1(this, unit, value);\n hooks.updateOffset(this, keepTime);\n return this;\n } else {\n return get(this, unit);\n }\n };\n }\n\n function get (mom, unit) {\n return mom.isValid() ?\n mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]() : NaN;\n }\n\n function set$1 (mom, unit, value) {\n if (mom.isValid() && !isNaN(value)) {\n if (unit === 'FullYear' && isLeapYear(mom.year()) && mom.month() === 1 && mom.date() === 29) {\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value, mom.month(), daysInMonth(value, mom.month()));\n }\n else {\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value);\n }\n }\n }\n\n // MOMENTS\n\n function stringGet (units) {\n units = normalizeUnits(units);\n if (isFunction(this[units])) {\n return this[units]();\n }\n return this;\n }\n\n\n function stringSet (units, value) {\n if (typeof units === 'object') {\n units = normalizeObjectUnits(units);\n var prioritized = getPrioritizedUnits(units);\n for (var i = 0; i < prioritized.length; i++) {\n this[prioritized[i].unit](units[prioritized[i].unit]);\n }\n } else {\n units = normalizeUnits(units);\n if (isFunction(this[units])) {\n return this[units](value);\n }\n }\n return this;\n }\n\n function mod(n, x) {\n return ((n % x) + x) % x;\n }\n\n var indexOf;\n\n if (Array.prototype.indexOf) {\n indexOf = Array.prototype.indexOf;\n } else {\n indexOf = function (o) {\n // I know\n var i;\n for (i = 0; i < this.length; ++i) {\n if (this[i] === o) {\n return i;\n }\n }\n return -1;\n };\n }\n\n function daysInMonth(year, month) {\n if (isNaN(year) || isNaN(month)) {\n return NaN;\n }\n var modMonth = mod(month, 12);\n year += (month - modMonth) / 12;\n return modMonth === 1 ? (isLeapYear(year) ? 29 : 28) : (31 - modMonth % 7 % 2);\n }\n\n // FORMATTING\n\n addFormatToken('M', ['MM', 2], 'Mo', function () {\n return this.month() + 1;\n });\n\n addFormatToken('MMM', 0, 0, function (format) {\n return this.localeData().monthsShort(this, format);\n });\n\n addFormatToken('MMMM', 0, 0, function (format) {\n return this.localeData().months(this, format);\n });\n\n // ALIASES\n\n addUnitAlias('month', 'M');\n\n // PRIORITY\n\n addUnitPriority('month', 8);\n\n // PARSING\n\n addRegexToken('M', match1to2);\n addRegexToken('MM', match1to2, match2);\n addRegexToken('MMM', function (isStrict, locale) {\n return locale.monthsShortRegex(isStrict);\n });\n addRegexToken('MMMM', function (isStrict, locale) {\n return locale.monthsRegex(isStrict);\n });\n\n addParseToken(['M', 'MM'], function (input, array) {\n array[MONTH] = toInt(input) - 1;\n });\n\n addParseToken(['MMM', 'MMMM'], function (input, array, config, token) {\n var month = config._locale.monthsParse(input, token, config._strict);\n // if we didn't find a month name, mark the date as invalid.\n if (month != null) {\n array[MONTH] = month;\n } else {\n getParsingFlags(config).invalidMonth = input;\n }\n });\n\n // LOCALES\n\n var MONTHS_IN_FORMAT = /D[oD]?(\\[[^\\[\\]]*\\]|\\s)+MMMM?/;\n var defaultLocaleMonths = 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_');\n function localeMonths (m, format) {\n if (!m) {\n return isArray(this._months) ? this._months :\n this._months['standalone'];\n }\n return isArray(this._months) ? this._months[m.month()] :\n this._months[(this._months.isFormat || MONTHS_IN_FORMAT).test(format) ? 'format' : 'standalone'][m.month()];\n }\n\n var defaultLocaleMonthsShort = 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_');\n function localeMonthsShort (m, format) {\n if (!m) {\n return isArray(this._monthsShort) ? this._monthsShort :\n this._monthsShort['standalone'];\n }\n return isArray(this._monthsShort) ? this._monthsShort[m.month()] :\n this._monthsShort[MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'][m.month()];\n }\n\n function handleStrictParse(monthName, format, strict) {\n var i, ii, mom, llc = monthName.toLocaleLowerCase();\n if (!this._monthsParse) {\n // this is not used\n this._monthsParse = [];\n this._longMonthsParse = [];\n this._shortMonthsParse = [];\n for (i = 0; i < 12; ++i) {\n mom = createUTC([2000, i]);\n this._shortMonthsParse[i] = this.monthsShort(mom, '').toLocaleLowerCase();\n this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase();\n }\n }\n\n if (strict) {\n if (format === 'MMM') {\n ii = indexOf.call(this._shortMonthsParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._longMonthsParse, llc);\n return ii !== -1 ? ii : null;\n }\n } else {\n if (format === 'MMM') {\n ii = indexOf.call(this._shortMonthsParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._longMonthsParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._longMonthsParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortMonthsParse, llc);\n return ii !== -1 ? ii : null;\n }\n }\n }\n\n function localeMonthsParse (monthName, format, strict) {\n var i, mom, regex;\n\n if (this._monthsParseExact) {\n return handleStrictParse.call(this, monthName, format, strict);\n }\n\n if (!this._monthsParse) {\n this._monthsParse = [];\n this._longMonthsParse = [];\n this._shortMonthsParse = [];\n }\n\n // TODO: add sorting\n // Sorting makes sure if one month (or abbr) is a prefix of another\n // see sorting in computeMonthsParse\n for (i = 0; i < 12; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, i]);\n if (strict && !this._longMonthsParse[i]) {\n this._longMonthsParse[i] = new RegExp('^' + this.months(mom, '').replace('.', '') + '$', 'i');\n this._shortMonthsParse[i] = new RegExp('^' + this.monthsShort(mom, '').replace('.', '') + '$', 'i');\n }\n if (!strict && !this._monthsParse[i]) {\n regex = '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, '');\n this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i');\n }\n // test the regex\n if (strict && format === 'MMMM' && this._longMonthsParse[i].test(monthName)) {\n return i;\n } else if (strict && format === 'MMM' && this._shortMonthsParse[i].test(monthName)) {\n return i;\n } else if (!strict && this._monthsParse[i].test(monthName)) {\n return i;\n }\n }\n }\n\n // MOMENTS\n\n function setMonth (mom, value) {\n var dayOfMonth;\n\n if (!mom.isValid()) {\n // No op\n return mom;\n }\n\n if (typeof value === 'string') {\n if (/^\\d+$/.test(value)) {\n value = toInt(value);\n } else {\n value = mom.localeData().monthsParse(value);\n // TODO: Another silent failure?\n if (!isNumber(value)) {\n return mom;\n }\n }\n }\n\n dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value));\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth);\n return mom;\n }\n\n function getSetMonth (value) {\n if (value != null) {\n setMonth(this, value);\n hooks.updateOffset(this, true);\n return this;\n } else {\n return get(this, 'Month');\n }\n }\n\n function getDaysInMonth () {\n return daysInMonth(this.year(), this.month());\n }\n\n var defaultMonthsShortRegex = matchWord;\n function monthsShortRegex (isStrict) {\n if (this._monthsParseExact) {\n if (!hasOwnProp(this, '_monthsRegex')) {\n computeMonthsParse.call(this);\n }\n if (isStrict) {\n return this._monthsShortStrictRegex;\n } else {\n return this._monthsShortRegex;\n }\n } else {\n if (!hasOwnProp(this, '_monthsShortRegex')) {\n this._monthsShortRegex = defaultMonthsShortRegex;\n }\n return this._monthsShortStrictRegex && isStrict ?\n this._monthsShortStrictRegex : this._monthsShortRegex;\n }\n }\n\n var defaultMonthsRegex = matchWord;\n function monthsRegex (isStrict) {\n if (this._monthsParseExact) {\n if (!hasOwnProp(this, '_monthsRegex')) {\n computeMonthsParse.call(this);\n }\n if (isStrict) {\n return this._monthsStrictRegex;\n } else {\n return this._monthsRegex;\n }\n } else {\n if (!hasOwnProp(this, '_monthsRegex')) {\n this._monthsRegex = defaultMonthsRegex;\n }\n return this._monthsStrictRegex && isStrict ?\n this._monthsStrictRegex : this._monthsRegex;\n }\n }\n\n function computeMonthsParse () {\n function cmpLenRev(a, b) {\n return b.length - a.length;\n }\n\n var shortPieces = [], longPieces = [], mixedPieces = [],\n i, mom;\n for (i = 0; i < 12; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, i]);\n shortPieces.push(this.monthsShort(mom, ''));\n longPieces.push(this.months(mom, ''));\n mixedPieces.push(this.months(mom, ''));\n mixedPieces.push(this.monthsShort(mom, ''));\n }\n // Sorting makes sure if one month (or abbr) is a prefix of another it\n // will match the longer piece.\n shortPieces.sort(cmpLenRev);\n longPieces.sort(cmpLenRev);\n mixedPieces.sort(cmpLenRev);\n for (i = 0; i < 12; i++) {\n shortPieces[i] = regexEscape(shortPieces[i]);\n longPieces[i] = regexEscape(longPieces[i]);\n }\n for (i = 0; i < 24; i++) {\n mixedPieces[i] = regexEscape(mixedPieces[i]);\n }\n\n this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._monthsShortRegex = this._monthsRegex;\n this._monthsStrictRegex = new RegExp('^(' + longPieces.join('|') + ')', 'i');\n this._monthsShortStrictRegex = new RegExp('^(' + shortPieces.join('|') + ')', 'i');\n }\n\n function createDate (y, m, d, h, M, s, ms) {\n // can't just apply() to create a date:\n // https://stackoverflow.com/q/181348\n var date;\n // the date constructor remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n date = new Date(y + 400, m, d, h, M, s, ms);\n if (isFinite(date.getFullYear())) {\n date.setFullYear(y);\n }\n } else {\n date = new Date(y, m, d, h, M, s, ms);\n }\n\n return date;\n }\n\n function createUTCDate (y) {\n var date;\n // the Date.UTC function remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n var args = Array.prototype.slice.call(arguments);\n // preserve leap years using a full 400 year cycle, then reset\n args[0] = y + 400;\n date = new Date(Date.UTC.apply(null, args));\n if (isFinite(date.getUTCFullYear())) {\n date.setUTCFullYear(y);\n }\n } else {\n date = new Date(Date.UTC.apply(null, arguments));\n }\n\n return date;\n }\n\n // start-of-first-week - start-of-year\n function firstWeekOffset(year, dow, doy) {\n var // first-week day -- which january is always in the first week (4 for iso, 1 for other)\n fwd = 7 + dow - doy,\n // first-week day local weekday -- which local weekday is fwd\n fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7;\n\n return -fwdlw + fwd - 1;\n }\n\n // https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday\n function dayOfYearFromWeeks(year, week, weekday, dow, doy) {\n var localWeekday = (7 + weekday - dow) % 7,\n weekOffset = firstWeekOffset(year, dow, doy),\n dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset,\n resYear, resDayOfYear;\n\n if (dayOfYear <= 0) {\n resYear = year - 1;\n resDayOfYear = daysInYear(resYear) + dayOfYear;\n } else if (dayOfYear > daysInYear(year)) {\n resYear = year + 1;\n resDayOfYear = dayOfYear - daysInYear(year);\n } else {\n resYear = year;\n resDayOfYear = dayOfYear;\n }\n\n return {\n year: resYear,\n dayOfYear: resDayOfYear\n };\n }\n\n function weekOfYear(mom, dow, doy) {\n var weekOffset = firstWeekOffset(mom.year(), dow, doy),\n week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1,\n resWeek, resYear;\n\n if (week < 1) {\n resYear = mom.year() - 1;\n resWeek = week + weeksInYear(resYear, dow, doy);\n } else if (week > weeksInYear(mom.year(), dow, doy)) {\n resWeek = week - weeksInYear(mom.year(), dow, doy);\n resYear = mom.year() + 1;\n } else {\n resYear = mom.year();\n resWeek = week;\n }\n\n return {\n week: resWeek,\n year: resYear\n };\n }\n\n function weeksInYear(year, dow, doy) {\n var weekOffset = firstWeekOffset(year, dow, doy),\n weekOffsetNext = firstWeekOffset(year + 1, dow, doy);\n return (daysInYear(year) - weekOffset + weekOffsetNext) / 7;\n }\n\n // FORMATTING\n\n addFormatToken('w', ['ww', 2], 'wo', 'week');\n addFormatToken('W', ['WW', 2], 'Wo', 'isoWeek');\n\n // ALIASES\n\n addUnitAlias('week', 'w');\n addUnitAlias('isoWeek', 'W');\n\n // PRIORITIES\n\n addUnitPriority('week', 5);\n addUnitPriority('isoWeek', 5);\n\n // PARSING\n\n addRegexToken('w', match1to2);\n addRegexToken('ww', match1to2, match2);\n addRegexToken('W', match1to2);\n addRegexToken('WW', match1to2, match2);\n\n addWeekParseToken(['w', 'ww', 'W', 'WW'], function (input, week, config, token) {\n week[token.substr(0, 1)] = toInt(input);\n });\n\n // HELPERS\n\n // LOCALES\n\n function localeWeek (mom) {\n return weekOfYear(mom, this._week.dow, this._week.doy).week;\n }\n\n var defaultLocaleWeek = {\n dow : 0, // Sunday is the first day of the week.\n doy : 6 // The week that contains Jan 6th is the first week of the year.\n };\n\n function localeFirstDayOfWeek () {\n return this._week.dow;\n }\n\n function localeFirstDayOfYear () {\n return this._week.doy;\n }\n\n // MOMENTS\n\n function getSetWeek (input) {\n var week = this.localeData().week(this);\n return input == null ? week : this.add((input - week) * 7, 'd');\n }\n\n function getSetISOWeek (input) {\n var week = weekOfYear(this, 1, 4).week;\n return input == null ? week : this.add((input - week) * 7, 'd');\n }\n\n // FORMATTING\n\n addFormatToken('d', 0, 'do', 'day');\n\n addFormatToken('dd', 0, 0, function (format) {\n return this.localeData().weekdaysMin(this, format);\n });\n\n addFormatToken('ddd', 0, 0, function (format) {\n return this.localeData().weekdaysShort(this, format);\n });\n\n addFormatToken('dddd', 0, 0, function (format) {\n return this.localeData().weekdays(this, format);\n });\n\n addFormatToken('e', 0, 0, 'weekday');\n addFormatToken('E', 0, 0, 'isoWeekday');\n\n // ALIASES\n\n addUnitAlias('day', 'd');\n addUnitAlias('weekday', 'e');\n addUnitAlias('isoWeekday', 'E');\n\n // PRIORITY\n addUnitPriority('day', 11);\n addUnitPriority('weekday', 11);\n addUnitPriority('isoWeekday', 11);\n\n // PARSING\n\n addRegexToken('d', match1to2);\n addRegexToken('e', match1to2);\n addRegexToken('E', match1to2);\n addRegexToken('dd', function (isStrict, locale) {\n return locale.weekdaysMinRegex(isStrict);\n });\n addRegexToken('ddd', function (isStrict, locale) {\n return locale.weekdaysShortRegex(isStrict);\n });\n addRegexToken('dddd', function (isStrict, locale) {\n return locale.weekdaysRegex(isStrict);\n });\n\n addWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) {\n var weekday = config._locale.weekdaysParse(input, token, config._strict);\n // if we didn't get a weekday name, mark the date as invalid\n if (weekday != null) {\n week.d = weekday;\n } else {\n getParsingFlags(config).invalidWeekday = input;\n }\n });\n\n addWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) {\n week[token] = toInt(input);\n });\n\n // HELPERS\n\n function parseWeekday(input, locale) {\n if (typeof input !== 'string') {\n return input;\n }\n\n if (!isNaN(input)) {\n return parseInt(input, 10);\n }\n\n input = locale.weekdaysParse(input);\n if (typeof input === 'number') {\n return input;\n }\n\n return null;\n }\n\n function parseIsoWeekday(input, locale) {\n if (typeof input === 'string') {\n return locale.weekdaysParse(input) % 7 || 7;\n }\n return isNaN(input) ? null : input;\n }\n\n // LOCALES\n function shiftWeekdays (ws, n) {\n return ws.slice(n, 7).concat(ws.slice(0, n));\n }\n\n var defaultLocaleWeekdays = 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_');\n function localeWeekdays (m, format) {\n var weekdays = isArray(this._weekdays) ? this._weekdays :\n this._weekdays[(m && m !== true && this._weekdays.isFormat.test(format)) ? 'format' : 'standalone'];\n return (m === true) ? shiftWeekdays(weekdays, this._week.dow)\n : (m) ? weekdays[m.day()] : weekdays;\n }\n\n var defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_');\n function localeWeekdaysShort (m) {\n return (m === true) ? shiftWeekdays(this._weekdaysShort, this._week.dow)\n : (m) ? this._weekdaysShort[m.day()] : this._weekdaysShort;\n }\n\n var defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_');\n function localeWeekdaysMin (m) {\n return (m === true) ? shiftWeekdays(this._weekdaysMin, this._week.dow)\n : (m) ? this._weekdaysMin[m.day()] : this._weekdaysMin;\n }\n\n function handleStrictParse$1(weekdayName, format, strict) {\n var i, ii, mom, llc = weekdayName.toLocaleLowerCase();\n if (!this._weekdaysParse) {\n this._weekdaysParse = [];\n this._shortWeekdaysParse = [];\n this._minWeekdaysParse = [];\n\n for (i = 0; i < 7; ++i) {\n mom = createUTC([2000, 1]).day(i);\n this._minWeekdaysParse[i] = this.weekdaysMin(mom, '').toLocaleLowerCase();\n this._shortWeekdaysParse[i] = this.weekdaysShort(mom, '').toLocaleLowerCase();\n this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase();\n }\n }\n\n if (strict) {\n if (format === 'dddd') {\n ii = indexOf.call(this._weekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else if (format === 'ddd') {\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n }\n } else {\n if (format === 'dddd') {\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else if (format === 'ddd') {\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._minWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n }\n }\n }\n\n function localeWeekdaysParse (weekdayName, format, strict) {\n var i, mom, regex;\n\n if (this._weekdaysParseExact) {\n return handleStrictParse$1.call(this, weekdayName, format, strict);\n }\n\n if (!this._weekdaysParse) {\n this._weekdaysParse = [];\n this._minWeekdaysParse = [];\n this._shortWeekdaysParse = [];\n this._fullWeekdaysParse = [];\n }\n\n for (i = 0; i < 7; i++) {\n // make the regex if we don't have it already\n\n mom = createUTC([2000, 1]).day(i);\n if (strict && !this._fullWeekdaysParse[i]) {\n this._fullWeekdaysParse[i] = new RegExp('^' + this.weekdays(mom, '').replace('.', '\\\\.?') + '$', 'i');\n this._shortWeekdaysParse[i] = new RegExp('^' + this.weekdaysShort(mom, '').replace('.', '\\\\.?') + '$', 'i');\n this._minWeekdaysParse[i] = new RegExp('^' + this.weekdaysMin(mom, '').replace('.', '\\\\.?') + '$', 'i');\n }\n if (!this._weekdaysParse[i]) {\n regex = '^' + this.weekdays(mom, '') + '|^' + this.weekdaysShort(mom, '') + '|^' + this.weekdaysMin(mom, '');\n this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i');\n }\n // test the regex\n if (strict && format === 'dddd' && this._fullWeekdaysParse[i].test(weekdayName)) {\n return i;\n } else if (strict && format === 'ddd' && this._shortWeekdaysParse[i].test(weekdayName)) {\n return i;\n } else if (strict && format === 'dd' && this._minWeekdaysParse[i].test(weekdayName)) {\n return i;\n } else if (!strict && this._weekdaysParse[i].test(weekdayName)) {\n return i;\n }\n }\n }\n\n // MOMENTS\n\n function getSetDayOfWeek (input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay();\n if (input != null) {\n input = parseWeekday(input, this.localeData());\n return this.add(input - day, 'd');\n } else {\n return day;\n }\n }\n\n function getSetLocaleDayOfWeek (input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7;\n return input == null ? weekday : this.add(input - weekday, 'd');\n }\n\n function getSetISODayOfWeek (input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n\n // behaves the same as moment#day except\n // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)\n // as a setter, sunday should belong to the previous week.\n\n if (input != null) {\n var weekday = parseIsoWeekday(input, this.localeData());\n return this.day(this.day() % 7 ? weekday : weekday - 7);\n } else {\n return this.day() || 7;\n }\n }\n\n var defaultWeekdaysRegex = matchWord;\n function weekdaysRegex (isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysStrictRegex;\n } else {\n return this._weekdaysRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n this._weekdaysRegex = defaultWeekdaysRegex;\n }\n return this._weekdaysStrictRegex && isStrict ?\n this._weekdaysStrictRegex : this._weekdaysRegex;\n }\n }\n\n var defaultWeekdaysShortRegex = matchWord;\n function weekdaysShortRegex (isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysShortStrictRegex;\n } else {\n return this._weekdaysShortRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysShortRegex')) {\n this._weekdaysShortRegex = defaultWeekdaysShortRegex;\n }\n return this._weekdaysShortStrictRegex && isStrict ?\n this._weekdaysShortStrictRegex : this._weekdaysShortRegex;\n }\n }\n\n var defaultWeekdaysMinRegex = matchWord;\n function weekdaysMinRegex (isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysMinStrictRegex;\n } else {\n return this._weekdaysMinRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysMinRegex')) {\n this._weekdaysMinRegex = defaultWeekdaysMinRegex;\n }\n return this._weekdaysMinStrictRegex && isStrict ?\n this._weekdaysMinStrictRegex : this._weekdaysMinRegex;\n }\n }\n\n\n function computeWeekdaysParse () {\n function cmpLenRev(a, b) {\n return b.length - a.length;\n }\n\n var minPieces = [], shortPieces = [], longPieces = [], mixedPieces = [],\n i, mom, minp, shortp, longp;\n for (i = 0; i < 7; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, 1]).day(i);\n minp = this.weekdaysMin(mom, '');\n shortp = this.weekdaysShort(mom, '');\n longp = this.weekdays(mom, '');\n minPieces.push(minp);\n shortPieces.push(shortp);\n longPieces.push(longp);\n mixedPieces.push(minp);\n mixedPieces.push(shortp);\n mixedPieces.push(longp);\n }\n // Sorting makes sure if one weekday (or abbr) is a prefix of another it\n // will match the longer piece.\n minPieces.sort(cmpLenRev);\n shortPieces.sort(cmpLenRev);\n longPieces.sort(cmpLenRev);\n mixedPieces.sort(cmpLenRev);\n for (i = 0; i < 7; i++) {\n shortPieces[i] = regexEscape(shortPieces[i]);\n longPieces[i] = regexEscape(longPieces[i]);\n mixedPieces[i] = regexEscape(mixedPieces[i]);\n }\n\n this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._weekdaysShortRegex = this._weekdaysRegex;\n this._weekdaysMinRegex = this._weekdaysRegex;\n\n this._weekdaysStrictRegex = new RegExp('^(' + longPieces.join('|') + ')', 'i');\n this._weekdaysShortStrictRegex = new RegExp('^(' + shortPieces.join('|') + ')', 'i');\n this._weekdaysMinStrictRegex = new RegExp('^(' + minPieces.join('|') + ')', 'i');\n }\n\n // FORMATTING\n\n function hFormat() {\n return this.hours() % 12 || 12;\n }\n\n function kFormat() {\n return this.hours() || 24;\n }\n\n addFormatToken('H', ['HH', 2], 0, 'hour');\n addFormatToken('h', ['hh', 2], 0, hFormat);\n addFormatToken('k', ['kk', 2], 0, kFormat);\n\n addFormatToken('hmm', 0, 0, function () {\n return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2);\n });\n\n addFormatToken('hmmss', 0, 0, function () {\n return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2) +\n zeroFill(this.seconds(), 2);\n });\n\n addFormatToken('Hmm', 0, 0, function () {\n return '' + this.hours() + zeroFill(this.minutes(), 2);\n });\n\n addFormatToken('Hmmss', 0, 0, function () {\n return '' + this.hours() + zeroFill(this.minutes(), 2) +\n zeroFill(this.seconds(), 2);\n });\n\n function meridiem (token, lowercase) {\n addFormatToken(token, 0, 0, function () {\n return this.localeData().meridiem(this.hours(), this.minutes(), lowercase);\n });\n }\n\n meridiem('a', true);\n meridiem('A', false);\n\n // ALIASES\n\n addUnitAlias('hour', 'h');\n\n // PRIORITY\n addUnitPriority('hour', 13);\n\n // PARSING\n\n function matchMeridiem (isStrict, locale) {\n return locale._meridiemParse;\n }\n\n addRegexToken('a', matchMeridiem);\n addRegexToken('A', matchMeridiem);\n addRegexToken('H', match1to2);\n addRegexToken('h', match1to2);\n addRegexToken('k', match1to2);\n addRegexToken('HH', match1to2, match2);\n addRegexToken('hh', match1to2, match2);\n addRegexToken('kk', match1to2, match2);\n\n addRegexToken('hmm', match3to4);\n addRegexToken('hmmss', match5to6);\n addRegexToken('Hmm', match3to4);\n addRegexToken('Hmmss', match5to6);\n\n addParseToken(['H', 'HH'], HOUR);\n addParseToken(['k', 'kk'], function (input, array, config) {\n var kInput = toInt(input);\n array[HOUR] = kInput === 24 ? 0 : kInput;\n });\n addParseToken(['a', 'A'], function (input, array, config) {\n config._isPm = config._locale.isPM(input);\n config._meridiem = input;\n });\n addParseToken(['h', 'hh'], function (input, array, config) {\n array[HOUR] = toInt(input);\n getParsingFlags(config).bigHour = true;\n });\n addParseToken('hmm', function (input, array, config) {\n var pos = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos));\n array[MINUTE] = toInt(input.substr(pos));\n getParsingFlags(config).bigHour = true;\n });\n addParseToken('hmmss', function (input, array, config) {\n var pos1 = input.length - 4;\n var pos2 = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos1));\n array[MINUTE] = toInt(input.substr(pos1, 2));\n array[SECOND] = toInt(input.substr(pos2));\n getParsingFlags(config).bigHour = true;\n });\n addParseToken('Hmm', function (input, array, config) {\n var pos = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos));\n array[MINUTE] = toInt(input.substr(pos));\n });\n addParseToken('Hmmss', function (input, array, config) {\n var pos1 = input.length - 4;\n var pos2 = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos1));\n array[MINUTE] = toInt(input.substr(pos1, 2));\n array[SECOND] = toInt(input.substr(pos2));\n });\n\n // LOCALES\n\n function localeIsPM (input) {\n // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays\n // Using charAt should be more compatible.\n return ((input + '').toLowerCase().charAt(0) === 'p');\n }\n\n var defaultLocaleMeridiemParse = /[ap]\\.?m?\\.?/i;\n function localeMeridiem (hours, minutes, isLower) {\n if (hours > 11) {\n return isLower ? 'pm' : 'PM';\n } else {\n return isLower ? 'am' : 'AM';\n }\n }\n\n\n // MOMENTS\n\n // Setting the hour should keep the time, because the user explicitly\n // specified which hour they want. So trying to maintain the same hour (in\n // a new timezone) makes sense. Adding/subtracting hours does not follow\n // this rule.\n var getSetHour = makeGetSet('Hours', true);\n\n var baseConfig = {\n calendar: defaultCalendar,\n longDateFormat: defaultLongDateFormat,\n invalidDate: defaultInvalidDate,\n ordinal: defaultOrdinal,\n dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse,\n relativeTime: defaultRelativeTime,\n\n months: defaultLocaleMonths,\n monthsShort: defaultLocaleMonthsShort,\n\n week: defaultLocaleWeek,\n\n weekdays: defaultLocaleWeekdays,\n weekdaysMin: defaultLocaleWeekdaysMin,\n weekdaysShort: defaultLocaleWeekdaysShort,\n\n meridiemParse: defaultLocaleMeridiemParse\n };\n\n // internal storage for locale config files\n var locales = {};\n var localeFamilies = {};\n var globalLocale;\n\n function normalizeLocale(key) {\n return key ? key.toLowerCase().replace('_', '-') : key;\n }\n\n // pick the locale from the array\n // try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each\n // substring from most specific to least, but move to the next array item if it's a more specific variant than the current root\n function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return globalLocale;\n }\n\n function loadLocale(name) {\n var oldLocale = null;\n // TODO: Find a better way to register and load all the locales in Node\n if (!locales[name] && (typeof module !== 'undefined') &&\n module && module.exports) {\n try {\n oldLocale = globalLocale._abbr;\n var aliasedRequire = require;\n aliasedRequire('./locale/' + name);\n getSetGlobalLocale(oldLocale);\n } catch (e) {}\n }\n return locales[name];\n }\n\n // This function will load locale and then set the global locale. If\n // no arguments are passed in, it will simply return the current global\n // locale key.\n function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n }\n\n function defineLocale (name, config) {\n if (config !== null) {\n var locale, parentConfig = baseConfig;\n config.abbr = name;\n if (locales[name] != null) {\n deprecateSimple('defineLocaleOverride',\n 'use moment.updateLocale(localeName, config) to change ' +\n 'an existing locale. moment.defineLocale(localeName, ' +\n 'config) should only be used for creating a new locale ' +\n 'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.');\n parentConfig = locales[name]._config;\n } else if (config.parentLocale != null) {\n if (locales[config.parentLocale] != null) {\n parentConfig = locales[config.parentLocale]._config;\n } else {\n locale = loadLocale(config.parentLocale);\n if (locale != null) {\n parentConfig = locale._config;\n } else {\n if (!localeFamilies[config.parentLocale]) {\n localeFamilies[config.parentLocale] = [];\n }\n localeFamilies[config.parentLocale].push({\n name: name,\n config: config\n });\n return null;\n }\n }\n }\n locales[name] = new Locale(mergeConfigs(parentConfig, config));\n\n if (localeFamilies[name]) {\n localeFamilies[name].forEach(function (x) {\n defineLocale(x.name, x.config);\n });\n }\n\n // backwards compat for now: also set the locale\n // make sure we set the locale AFTER all child locales have been\n // created, so we won't end up with the child locale set.\n getSetGlobalLocale(name);\n\n\n return locales[name];\n } else {\n // useful for testing\n delete locales[name];\n return null;\n }\n }\n\n function updateLocale(name, config) {\n if (config != null) {\n var locale, tmpLocale, parentConfig = baseConfig;\n // MERGE\n tmpLocale = loadLocale(name);\n if (tmpLocale != null) {\n parentConfig = tmpLocale._config;\n }\n config = mergeConfigs(parentConfig, config);\n locale = new Locale(config);\n locale.parentLocale = locales[name];\n locales[name] = locale;\n\n // backwards compat for now: also set the locale\n getSetGlobalLocale(name);\n } else {\n // pass null for config to unupdate, useful for tests\n if (locales[name] != null) {\n if (locales[name].parentLocale != null) {\n locales[name] = locales[name].parentLocale;\n } else if (locales[name] != null) {\n delete locales[name];\n }\n }\n }\n return locales[name];\n }\n\n // returns locale data\n function getLocale (key) {\n var locale;\n\n if (key && key._locale && key._locale._abbr) {\n key = key._locale._abbr;\n }\n\n if (!key) {\n return globalLocale;\n }\n\n if (!isArray(key)) {\n //short-circuit everything else\n locale = loadLocale(key);\n if (locale) {\n return locale;\n }\n key = [key];\n }\n\n return chooseLocale(key);\n }\n\n function listLocales() {\n return keys(locales);\n }\n\n function checkOverflow (m) {\n var overflow;\n var a = m._a;\n\n if (a && getParsingFlags(m).overflow === -2) {\n overflow =\n a[MONTH] < 0 || a[MONTH] > 11 ? MONTH :\n a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH]) ? DATE :\n a[HOUR] < 0 || a[HOUR] > 24 || (a[HOUR] === 24 && (a[MINUTE] !== 0 || a[SECOND] !== 0 || a[MILLISECOND] !== 0)) ? HOUR :\n a[MINUTE] < 0 || a[MINUTE] > 59 ? MINUTE :\n a[SECOND] < 0 || a[SECOND] > 59 ? SECOND :\n a[MILLISECOND] < 0 || a[MILLISECOND] > 999 ? MILLISECOND :\n -1;\n\n if (getParsingFlags(m)._overflowDayOfYear && (overflow < YEAR || overflow > DATE)) {\n overflow = DATE;\n }\n if (getParsingFlags(m)._overflowWeeks && overflow === -1) {\n overflow = WEEK;\n }\n if (getParsingFlags(m)._overflowWeekday && overflow === -1) {\n overflow = WEEKDAY;\n }\n\n getParsingFlags(m).overflow = overflow;\n }\n\n return m;\n }\n\n // Pick the first defined of two or three arguments.\n function defaults(a, b, c) {\n if (a != null) {\n return a;\n }\n if (b != null) {\n return b;\n }\n return c;\n }\n\n function currentDateArray(config) {\n // hooks is actually the exported moment object\n var nowValue = new Date(hooks.now());\n if (config._useUTC) {\n return [nowValue.getUTCFullYear(), nowValue.getUTCMonth(), nowValue.getUTCDate()];\n }\n return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()];\n }\n\n // convert an array to a date.\n // the array should mirror the parameters below\n // note: all values past the year are optional and will default to the lowest possible value.\n // [year, month, day , hour, minute, second, millisecond]\n function configFromArray (config) {\n var i, date, input = [], currentDate, expectedWeekday, yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear != null) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse) || config._dayOfYear === 0) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n expectedWeekday = config._useUTC ? config._d.getUTCDay() : config._d.getDay();\n\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n\n // check for mismatching day of week\n if (config._w && typeof config._w.d !== 'undefined' && config._w.d !== expectedWeekday) {\n getParsingFlags(config).weekdayMismatch = true;\n }\n }\n\n function dayOfYearFromWeekInfo(config) {\n var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow;\n\n w = config._w;\n if (w.GG != null || w.W != null || w.E != null) {\n dow = 1;\n doy = 4;\n\n // TODO: We need to take the current isoWeekYear, but that depends on\n // how we interpret now (local, utc, fixed offset). So create\n // a now version of current config (take local/utc/offset flags, and\n // create now).\n weekYear = defaults(w.GG, config._a[YEAR], weekOfYear(createLocal(), 1, 4).year);\n week = defaults(w.W, 1);\n weekday = defaults(w.E, 1);\n if (weekday < 1 || weekday > 7) {\n weekdayOverflow = true;\n }\n } else {\n dow = config._locale._week.dow;\n doy = config._locale._week.doy;\n\n var curWeek = weekOfYear(createLocal(), dow, doy);\n\n weekYear = defaults(w.gg, config._a[YEAR], curWeek.year);\n\n // Default to current week.\n week = defaults(w.w, curWeek.week);\n\n if (w.d != null) {\n // weekday -- low day numbers are considered next week\n weekday = w.d;\n if (weekday < 0 || weekday > 6) {\n weekdayOverflow = true;\n }\n } else if (w.e != null) {\n // local weekday -- counting starts from beginning of week\n weekday = w.e + dow;\n if (w.e < 0 || w.e > 6) {\n weekdayOverflow = true;\n }\n } else {\n // default to beginning of week\n weekday = dow;\n }\n }\n if (week < 1 || week > weeksInYear(weekYear, dow, doy)) {\n getParsingFlags(config)._overflowWeeks = true;\n } else if (weekdayOverflow != null) {\n getParsingFlags(config)._overflowWeekday = true;\n } else {\n temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy);\n config._a[YEAR] = temp.year;\n config._dayOfYear = temp.dayOfYear;\n }\n }\n\n // iso 8601 regex\n // 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00)\n var extendedIsoRegex = /^\\s*((?:[+-]\\d{6}|\\d{4})-(?:\\d\\d-\\d\\d|W\\d\\d-\\d|W\\d\\d|\\d\\d\\d|\\d\\d))(?:(T| )(\\d\\d(?::\\d\\d(?::\\d\\d(?:[.,]\\d+)?)?)?)([\\+\\-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/;\n var basicIsoRegex = /^\\s*((?:[+-]\\d{6}|\\d{4})(?:\\d\\d\\d\\d|W\\d\\d\\d|W\\d\\d|\\d\\d\\d|\\d\\d))(?:(T| )(\\d\\d(?:\\d\\d(?:\\d\\d(?:[.,]\\d+)?)?)?)([\\+\\-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/;\n\n var tzRegex = /Z|[+-]\\d\\d(?::?\\d\\d)?/;\n\n var isoDates = [\n ['YYYYYY-MM-DD', /[+-]\\d{6}-\\d\\d-\\d\\d/],\n ['YYYY-MM-DD', /\\d{4}-\\d\\d-\\d\\d/],\n ['GGGG-[W]WW-E', /\\d{4}-W\\d\\d-\\d/],\n ['GGGG-[W]WW', /\\d{4}-W\\d\\d/, false],\n ['YYYY-DDD', /\\d{4}-\\d{3}/],\n ['YYYY-MM', /\\d{4}-\\d\\d/, false],\n ['YYYYYYMMDD', /[+-]\\d{10}/],\n ['YYYYMMDD', /\\d{8}/],\n // YYYYMM is NOT allowed by the standard\n ['GGGG[W]WWE', /\\d{4}W\\d{3}/],\n ['GGGG[W]WW', /\\d{4}W\\d{2}/, false],\n ['YYYYDDD', /\\d{7}/]\n ];\n\n // iso time formats and regexes\n var isoTimes = [\n ['HH:mm:ss.SSSS', /\\d\\d:\\d\\d:\\d\\d\\.\\d+/],\n ['HH:mm:ss,SSSS', /\\d\\d:\\d\\d:\\d\\d,\\d+/],\n ['HH:mm:ss', /\\d\\d:\\d\\d:\\d\\d/],\n ['HH:mm', /\\d\\d:\\d\\d/],\n ['HHmmss.SSSS', /\\d\\d\\d\\d\\d\\d\\.\\d+/],\n ['HHmmss,SSSS', /\\d\\d\\d\\d\\d\\d,\\d+/],\n ['HHmmss', /\\d\\d\\d\\d\\d\\d/],\n ['HHmm', /\\d\\d\\d\\d/],\n ['HH', /\\d\\d/]\n ];\n\n var aspNetJsonRegex = /^\\/?Date\\((\\-?\\d+)/i;\n\n // date from iso format\n function configFromISO(config) {\n var i, l,\n string = config._i,\n match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string),\n allowTime, dateFormat, timeFormat, tzFormat;\n\n if (match) {\n getParsingFlags(config).iso = true;\n\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(match[1])) {\n dateFormat = isoDates[i][0];\n allowTime = isoDates[i][2] !== false;\n break;\n }\n }\n if (dateFormat == null) {\n config._isValid = false;\n return;\n }\n if (match[3]) {\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(match[3])) {\n // match[2] should be 'T' or space\n timeFormat = (match[2] || ' ') + isoTimes[i][0];\n break;\n }\n }\n if (timeFormat == null) {\n config._isValid = false;\n return;\n }\n }\n if (!allowTime && timeFormat != null) {\n config._isValid = false;\n return;\n }\n if (match[4]) {\n if (tzRegex.exec(match[4])) {\n tzFormat = 'Z';\n } else {\n config._isValid = false;\n return;\n }\n }\n config._f = dateFormat + (timeFormat || '') + (tzFormat || '');\n configFromStringAndFormat(config);\n } else {\n config._isValid = false;\n }\n }\n\n // RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3\n var rfc2822 = /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\\s)?(\\d{1,2})\\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\\s(\\d{2,4})\\s(\\d\\d):(\\d\\d)(?::(\\d\\d))?\\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\\d{4}))$/;\n\n function extractFromRFC2822Strings(yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr) {\n var result = [\n untruncateYear(yearStr),\n defaultLocaleMonthsShort.indexOf(monthStr),\n parseInt(dayStr, 10),\n parseInt(hourStr, 10),\n parseInt(minuteStr, 10)\n ];\n\n if (secondStr) {\n result.push(parseInt(secondStr, 10));\n }\n\n return result;\n }\n\n function untruncateYear(yearStr) {\n var year = parseInt(yearStr, 10);\n if (year <= 49) {\n return 2000 + year;\n } else if (year <= 999) {\n return 1900 + year;\n }\n return year;\n }\n\n function preprocessRFC2822(s) {\n // Remove comments and folding whitespace and replace multiple-spaces with a single space\n return s.replace(/\\([^)]*\\)|[\\n\\t]/g, ' ').replace(/(\\s\\s+)/g, ' ').replace(/^\\s\\s*/, '').replace(/\\s\\s*$/, '');\n }\n\n function checkWeekday(weekdayStr, parsedInput, config) {\n if (weekdayStr) {\n // TODO: Replace the vanilla JS Date object with an indepentent day-of-week check.\n var weekdayProvided = defaultLocaleWeekdaysShort.indexOf(weekdayStr),\n weekdayActual = new Date(parsedInput[0], parsedInput[1], parsedInput[2]).getDay();\n if (weekdayProvided !== weekdayActual) {\n getParsingFlags(config).weekdayMismatch = true;\n config._isValid = false;\n return false;\n }\n }\n return true;\n }\n\n var obsOffsets = {\n UT: 0,\n GMT: 0,\n EDT: -4 * 60,\n EST: -5 * 60,\n CDT: -5 * 60,\n CST: -6 * 60,\n MDT: -6 * 60,\n MST: -7 * 60,\n PDT: -7 * 60,\n PST: -8 * 60\n };\n\n function calculateOffset(obsOffset, militaryOffset, numOffset) {\n if (obsOffset) {\n return obsOffsets[obsOffset];\n } else if (militaryOffset) {\n // the only allowed military tz is Z\n return 0;\n } else {\n var hm = parseInt(numOffset, 10);\n var m = hm % 100, h = (hm - m) / 100;\n return h * 60 + m;\n }\n }\n\n // date and time from ref 2822 format\n function configFromRFC2822(config) {\n var match = rfc2822.exec(preprocessRFC2822(config._i));\n if (match) {\n var parsedArray = extractFromRFC2822Strings(match[4], match[3], match[2], match[5], match[6], match[7]);\n if (!checkWeekday(match[1], parsedArray, config)) {\n return;\n }\n\n config._a = parsedArray;\n config._tzm = calculateOffset(match[8], match[9], match[10]);\n\n config._d = createUTCDate.apply(null, config._a);\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n\n getParsingFlags(config).rfc2822 = true;\n } else {\n config._isValid = false;\n }\n }\n\n // date from iso format or fallback\n function configFromString(config) {\n var matched = aspNetJsonRegex.exec(config._i);\n\n if (matched !== null) {\n config._d = new Date(+matched[1]);\n return;\n }\n\n configFromISO(config);\n if (config._isValid === false) {\n delete config._isValid;\n } else {\n return;\n }\n\n configFromRFC2822(config);\n if (config._isValid === false) {\n delete config._isValid;\n } else {\n return;\n }\n\n // Final attempt, use Input Fallback\n hooks.createFromInputFallback(config);\n }\n\n hooks.createFromInputFallback = deprecate(\n 'value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), ' +\n 'which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are ' +\n 'discouraged and will be removed in an upcoming major release. Please refer to ' +\n 'http://momentjs.com/guides/#/warnings/js-date/ for more info.',\n function (config) {\n config._d = new Date(config._i + (config._useUTC ? ' UTC' : ''));\n }\n );\n\n // constant that refers to the ISO standard\n hooks.ISO_8601 = function () {};\n\n // constant that refers to the RFC 2822 form\n hooks.RFC_2822 = function () {};\n\n // date from string and format string\n function configFromStringAndFormat(config) {\n // TODO: Move this to another part of the creation flow to prevent circular deps\n if (config._f === hooks.ISO_8601) {\n configFromISO(config);\n return;\n }\n if (config._f === hooks.RFC_2822) {\n configFromRFC2822(config);\n return;\n }\n config._a = [];\n getParsingFlags(config).empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n // console.log('token', token, 'parsedInput', parsedInput,\n // 'regex', getParseRegexForToken(token, config));\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n getParsingFlags(config).unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n getParsingFlags(config).empty = false;\n }\n else {\n getParsingFlags(config).unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n getParsingFlags(config).unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n getParsingFlags(config).charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n getParsingFlags(config).unusedInput.push(string);\n }\n\n // clear _12h flag if hour is <= 12\n if (config._a[HOUR] <= 12 &&\n getParsingFlags(config).bigHour === true &&\n config._a[HOUR] > 0) {\n getParsingFlags(config).bigHour = undefined;\n }\n\n getParsingFlags(config).parsedDateParts = config._a.slice(0);\n getParsingFlags(config).meridiem = config._meridiem;\n // handle meridiem\n config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR], config._meridiem);\n\n configFromArray(config);\n checkOverflow(config);\n }\n\n\n function meridiemFixWrap (locale, hour, meridiem) {\n var isPm;\n\n if (meridiem == null) {\n // nothing to do\n return hour;\n }\n if (locale.meridiemHour != null) {\n return locale.meridiemHour(hour, meridiem);\n } else if (locale.isPM != null) {\n // Fallback\n isPm = locale.isPM(meridiem);\n if (isPm && hour < 12) {\n hour += 12;\n }\n if (!isPm && hour === 12) {\n hour = 0;\n }\n return hour;\n } else {\n // this is not supposed to happen\n return hour;\n }\n }\n\n // date from string and array of format strings\n function configFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n\n scoreToBeat,\n i,\n currentScore;\n\n if (config._f.length === 0) {\n getParsingFlags(config).invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < config._f.length; i++) {\n currentScore = 0;\n tempConfig = copyConfig({}, config);\n if (config._useUTC != null) {\n tempConfig._useUTC = config._useUTC;\n }\n tempConfig._f = config._f[i];\n configFromStringAndFormat(tempConfig);\n\n if (!isValid(tempConfig)) {\n continue;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += getParsingFlags(tempConfig).charsLeftOver;\n\n //or tokens\n currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10;\n\n getParsingFlags(tempConfig).score = currentScore;\n\n if (scoreToBeat == null || currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n\n extend(config, bestMoment || tempConfig);\n }\n\n function configFromObject(config) {\n if (config._d) {\n return;\n }\n\n var i = normalizeObjectUnits(config._i);\n config._a = map([i.year, i.month, i.day || i.date, i.hour, i.minute, i.second, i.millisecond], function (obj) {\n return obj && parseInt(obj, 10);\n });\n\n configFromArray(config);\n }\n\n function createFromConfig (config) {\n var res = new Moment(checkOverflow(prepareConfig(config)));\n if (res._nextDay) {\n // Adding is smart enough around DST\n res.add(1, 'd');\n res._nextDay = undefined;\n }\n\n return res;\n }\n\n function prepareConfig (config) {\n var input = config._i,\n format = config._f;\n\n config._locale = config._locale || getLocale(config._l);\n\n if (input === null || (format === undefined && input === '')) {\n return createInvalid({nullInput: true});\n }\n\n if (typeof input === 'string') {\n config._i = input = config._locale.preparse(input);\n }\n\n if (isMoment(input)) {\n return new Moment(checkOverflow(input));\n } else if (isDate(input)) {\n config._d = input;\n } else if (isArray(format)) {\n configFromStringAndArray(config);\n } else if (format) {\n configFromStringAndFormat(config);\n } else {\n configFromInput(config);\n }\n\n if (!isValid(config)) {\n config._d = null;\n }\n\n return config;\n }\n\n function configFromInput(config) {\n var input = config._i;\n if (isUndefined(input)) {\n config._d = new Date(hooks.now());\n } else if (isDate(input)) {\n config._d = new Date(input.valueOf());\n } else if (typeof input === 'string') {\n configFromString(config);\n } else if (isArray(input)) {\n config._a = map(input.slice(0), function (obj) {\n return parseInt(obj, 10);\n });\n configFromArray(config);\n } else if (isObject(input)) {\n configFromObject(config);\n } else if (isNumber(input)) {\n // from milliseconds\n config._d = new Date(input);\n } else {\n hooks.createFromInputFallback(config);\n }\n }\n\n function createLocalOrUTC (input, format, locale, strict, isUTC) {\n var c = {};\n\n if (locale === true || locale === false) {\n strict = locale;\n locale = undefined;\n }\n\n if ((isObject(input) && isObjectEmpty(input)) ||\n (isArray(input) && input.length === 0)) {\n input = undefined;\n }\n // object construction must be done this way.\n // https://github.com/moment/moment/issues/1423\n c._isAMomentObject = true;\n c._useUTC = c._isUTC = isUTC;\n c._l = locale;\n c._i = input;\n c._f = format;\n c._strict = strict;\n\n return createFromConfig(c);\n }\n\n function createLocal (input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, false);\n }\n\n var prototypeMin = deprecate(\n 'moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/',\n function () {\n var other = createLocal.apply(null, arguments);\n if (this.isValid() && other.isValid()) {\n return other < this ? this : other;\n } else {\n return createInvalid();\n }\n }\n );\n\n var prototypeMax = deprecate(\n 'moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/',\n function () {\n var other = createLocal.apply(null, arguments);\n if (this.isValid() && other.isValid()) {\n return other > this ? this : other;\n } else {\n return createInvalid();\n }\n }\n );\n\n // Pick a moment m from moments so that m[fn](other) is true for all\n // other. This relies on the function fn to be transitive.\n //\n // moments should either be an array of moment objects or an array, whose\n // first element is an array of moment objects.\n function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return createLocal();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }\n\n // TODO: Use [].sort instead?\n function min () {\n var args = [].slice.call(arguments, 0);\n\n return pickBy('isBefore', args);\n }\n\n function max () {\n var args = [].slice.call(arguments, 0);\n\n return pickBy('isAfter', args);\n }\n\n var now = function () {\n return Date.now ? Date.now() : +(new Date());\n };\n\n var ordering = ['year', 'quarter', 'month', 'week', 'day', 'hour', 'minute', 'second', 'millisecond'];\n\n function isDurationValid(m) {\n for (var key in m) {\n if (!(indexOf.call(ordering, key) !== -1 && (m[key] == null || !isNaN(m[key])))) {\n return false;\n }\n }\n\n var unitHasDecimal = false;\n for (var i = 0; i < ordering.length; ++i) {\n if (m[ordering[i]]) {\n if (unitHasDecimal) {\n return false; // only allow non-integers for smallest unit\n }\n if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) {\n unitHasDecimal = true;\n }\n }\n }\n\n return true;\n }\n\n function isValid$1() {\n return this._isValid;\n }\n\n function createInvalid$1() {\n return createDuration(NaN);\n }\n\n function Duration (duration) {\n var normalizedInput = normalizeObjectUnits(duration),\n years = normalizedInput.year || 0,\n quarters = normalizedInput.quarter || 0,\n months = normalizedInput.month || 0,\n weeks = normalizedInput.week || normalizedInput.isoWeek || 0,\n days = normalizedInput.day || 0,\n hours = normalizedInput.hour || 0,\n minutes = normalizedInput.minute || 0,\n seconds = normalizedInput.second || 0,\n milliseconds = normalizedInput.millisecond || 0;\n\n this._isValid = isDurationValid(normalizedInput);\n\n // representation for dateAddRemove\n this._milliseconds = +milliseconds +\n seconds * 1e3 + // 1000\n minutes * 6e4 + // 1000 * 60\n hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978\n // Because of dateAddRemove treats 24 hours as different from a\n // day when working around DST, we need to store them separately\n this._days = +days +\n weeks * 7;\n // It is impossible to translate months into days without knowing\n // which months you are are talking about, so we have to store\n // it separately.\n this._months = +months +\n quarters * 3 +\n years * 12;\n\n this._data = {};\n\n this._locale = getLocale();\n\n this._bubble();\n }\n\n function isDuration (obj) {\n return obj instanceof Duration;\n }\n\n function absRound (number) {\n if (number < 0) {\n return Math.round(-1 * number) * -1;\n } else {\n return Math.round(number);\n }\n }\n\n // FORMATTING\n\n function offset (token, separator) {\n addFormatToken(token, 0, 0, function () {\n var offset = this.utcOffset();\n var sign = '+';\n if (offset < 0) {\n offset = -offset;\n sign = '-';\n }\n return sign + zeroFill(~~(offset / 60), 2) + separator + zeroFill(~~(offset) % 60, 2);\n });\n }\n\n offset('Z', ':');\n offset('ZZ', '');\n\n // PARSING\n\n addRegexToken('Z', matchShortOffset);\n addRegexToken('ZZ', matchShortOffset);\n addParseToken(['Z', 'ZZ'], function (input, array, config) {\n config._useUTC = true;\n config._tzm = offsetFromString(matchShortOffset, input);\n });\n\n // HELPERS\n\n // timezone chunker\n // '+10:00' > ['10', '00']\n // '-1530' > ['-15', '30']\n var chunkOffset = /([\\+\\-]|\\d\\d)/gi;\n\n function offsetFromString(matcher, string) {\n var matches = (string || '').match(matcher);\n\n if (matches === null) {\n return null;\n }\n\n var chunk = matches[matches.length - 1] || [];\n var parts = (chunk + '').match(chunkOffset) || ['-', 0, 0];\n var minutes = +(parts[1] * 60) + toInt(parts[2]);\n\n return minutes === 0 ?\n 0 :\n parts[0] === '+' ? minutes : -minutes;\n }\n\n // Return a moment from input, that is local/utc/zone equivalent to model.\n function cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? input.valueOf() : createLocal(input).valueOf()) - res.valueOf();\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(res._d.valueOf() + diff);\n hooks.updateOffset(res, false);\n return res;\n } else {\n return createLocal(input).local();\n }\n }\n\n function getDateOffset (m) {\n // On Firefox.24 Date#getTimezoneOffset returns a floating point.\n // https://github.com/moment/moment/pull/1871\n return -Math.round(m._d.getTimezoneOffset() / 15) * 15;\n }\n\n // HOOKS\n\n // This function will be called whenever a moment is mutated.\n // It is intended to keep the offset in sync with the timezone.\n hooks.updateOffset = function () {};\n\n // MOMENTS\n\n // keepLocalTime = true means only change the timezone, without\n // affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]-->\n // 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset\n // +0200, so we adjust the time as needed, to be valid.\n //\n // Keeping the time actually adds/subtracts (one hour)\n // from the actual represented time. That is why we call updateOffset\n // a second time. In case it wants us to change the offset again\n // _changeInProgress == true case, then we have to adjust, because\n // there is no such time in the given timezone.\n function getSetOffset (input, keepLocalTime, keepMinutes) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n if (input === null) {\n return this;\n }\n } else if (Math.abs(input) < 16 && !keepMinutes) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n addSubtract(this, createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }\n\n function getSetZone (input, keepLocalTime) {\n if (input != null) {\n if (typeof input !== 'string') {\n input = -input;\n }\n\n this.utcOffset(input, keepLocalTime);\n\n return this;\n } else {\n return -this.utcOffset();\n }\n }\n\n function setOffsetToUTC (keepLocalTime) {\n return this.utcOffset(0, keepLocalTime);\n }\n\n function setOffsetToLocal (keepLocalTime) {\n if (this._isUTC) {\n this.utcOffset(0, keepLocalTime);\n this._isUTC = false;\n\n if (keepLocalTime) {\n this.subtract(getDateOffset(this), 'm');\n }\n }\n return this;\n }\n\n function setOffsetToParsedOffset () {\n if (this._tzm != null) {\n this.utcOffset(this._tzm, false, true);\n } else if (typeof this._i === 'string') {\n var tZone = offsetFromString(matchOffset, this._i);\n if (tZone != null) {\n this.utcOffset(tZone);\n }\n else {\n this.utcOffset(0, true);\n }\n }\n return this;\n }\n\n function hasAlignedHourOffset (input) {\n if (!this.isValid()) {\n return false;\n }\n input = input ? createLocal(input).utcOffset() : 0;\n\n return (this.utcOffset() - input) % 60 === 0;\n }\n\n function isDaylightSavingTime () {\n return (\n this.utcOffset() > this.clone().month(0).utcOffset() ||\n this.utcOffset() > this.clone().month(5).utcOffset()\n );\n }\n\n function isDaylightSavingTimeShifted () {\n if (!isUndefined(this._isDSTShifted)) {\n return this._isDSTShifted;\n }\n\n var c = {};\n\n copyConfig(c, this);\n c = prepareConfig(c);\n\n if (c._a) {\n var other = c._isUTC ? createUTC(c._a) : createLocal(c._a);\n this._isDSTShifted = this.isValid() &&\n compareArrays(c._a, other.toArray()) > 0;\n } else {\n this._isDSTShifted = false;\n }\n\n return this._isDSTShifted;\n }\n\n function isLocal () {\n return this.isValid() ? !this._isUTC : false;\n }\n\n function isUtcOffset () {\n return this.isValid() ? this._isUTC : false;\n }\n\n function isUtc () {\n return this.isValid() ? this._isUTC && this._offset === 0 : false;\n }\n\n // ASP.NET json date format regex\n var aspNetRegex = /^(\\-|\\+)?(?:(\\d*)[. ])?(\\d+)\\:(\\d+)(?:\\:(\\d+)(\\.\\d*)?)?$/;\n\n // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html\n // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere\n // and further modified to allow for strings containing both week and day\n var isoRegex = /^(-|\\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;\n\n function createDuration (input, key) {\n var duration = input,\n // matching against regexp is expensive, do it on demand\n match = null,\n sign,\n ret,\n diffRes;\n\n if (isDuration(input)) {\n duration = {\n ms : input._milliseconds,\n d : input._days,\n M : input._months\n };\n } else if (isNumber(input)) {\n duration = {};\n if (key) {\n duration[key] = input;\n } else {\n duration.milliseconds = input;\n }\n } else if (!!(match = aspNetRegex.exec(input))) {\n sign = (match[1] === '-') ? -1 : 1;\n duration = {\n y : 0,\n d : toInt(match[DATE]) * sign,\n h : toInt(match[HOUR]) * sign,\n m : toInt(match[MINUTE]) * sign,\n s : toInt(match[SECOND]) * sign,\n ms : toInt(absRound(match[MILLISECOND] * 1000)) * sign // the millisecond decimal point is included in the match\n };\n } else if (!!(match = isoRegex.exec(input))) {\n sign = (match[1] === '-') ? -1 : 1;\n duration = {\n y : parseIso(match[2], sign),\n M : parseIso(match[3], sign),\n w : parseIso(match[4], sign),\n d : parseIso(match[5], sign),\n h : parseIso(match[6], sign),\n m : parseIso(match[7], sign),\n s : parseIso(match[8], sign)\n };\n } else if (duration == null) {// checks for null or undefined\n duration = {};\n } else if (typeof duration === 'object' && ('from' in duration || 'to' in duration)) {\n diffRes = momentsDifference(createLocal(duration.from), createLocal(duration.to));\n\n duration = {};\n duration.ms = diffRes.milliseconds;\n duration.M = diffRes.months;\n }\n\n ret = new Duration(duration);\n\n if (isDuration(input) && hasOwnProp(input, '_locale')) {\n ret._locale = input._locale;\n }\n\n return ret;\n }\n\n createDuration.fn = Duration.prototype;\n createDuration.invalid = createInvalid$1;\n\n function parseIso (inp, sign) {\n // We'd normally use ~~inp for this, but unfortunately it also\n // converts floats to ints.\n // inp may be undefined, so careful calling replace on it.\n var res = inp && parseFloat(inp.replace(',', '.'));\n // apply sign while we're at it\n return (isNaN(res) ? 0 : res) * sign;\n }\n\n function positiveMomentsDifference(base, other) {\n var res = {};\n\n res.months = other.month() - base.month() +\n (other.year() - base.year()) * 12;\n if (base.clone().add(res.months, 'M').isAfter(other)) {\n --res.months;\n }\n\n res.milliseconds = +other - +(base.clone().add(res.months, 'M'));\n\n return res;\n }\n\n function momentsDifference(base, other) {\n var res;\n if (!(base.isValid() && other.isValid())) {\n return {milliseconds: 0, months: 0};\n }\n\n other = cloneWithOffset(other, base);\n if (base.isBefore(other)) {\n res = positiveMomentsDifference(base, other);\n } else {\n res = positiveMomentsDifference(other, base);\n res.milliseconds = -res.milliseconds;\n res.months = -res.months;\n }\n\n return res;\n }\n\n // TODO: remove 'name' arg after deprecation is removed\n function createAdder(direction, name) {\n return function (val, period) {\n var dur, tmp;\n //invert the arguments, but complain about it\n if (period !== null && !isNaN(+period)) {\n deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' +\n 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.');\n tmp = val; val = period; period = tmp;\n }\n\n val = typeof val === 'string' ? +val : val;\n dur = createDuration(val, period);\n addSubtract(this, dur, direction);\n return this;\n };\n }\n\n function addSubtract (mom, duration, isAdding, updateOffset) {\n var milliseconds = duration._milliseconds,\n days = absRound(duration._days),\n months = absRound(duration._months);\n\n if (!mom.isValid()) {\n // No op\n return;\n }\n\n updateOffset = updateOffset == null ? true : updateOffset;\n\n if (months) {\n setMonth(mom, get(mom, 'Month') + months * isAdding);\n }\n if (days) {\n set$1(mom, 'Date', get(mom, 'Date') + days * isAdding);\n }\n if (milliseconds) {\n mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding);\n }\n if (updateOffset) {\n hooks.updateOffset(mom, days || months);\n }\n }\n\n var add = createAdder(1, 'add');\n var subtract = createAdder(-1, 'subtract');\n\n function getCalendarFormat(myMoment, now) {\n var diff = myMoment.diff(now, 'days', true);\n return diff < -6 ? 'sameElse' :\n diff < -1 ? 'lastWeek' :\n diff < 0 ? 'lastDay' :\n diff < 1 ? 'sameDay' :\n diff < 2 ? 'nextDay' :\n diff < 7 ? 'nextWeek' : 'sameElse';\n }\n\n function calendar$1 (time, formats) {\n // We want to compare the start of today, vs this.\n // Getting start-of-today depends on whether we're local/utc/offset or not.\n var now = time || createLocal(),\n sod = cloneWithOffset(now, this).startOf('day'),\n format = hooks.calendarFormat(this, sod) || 'sameElse';\n\n var output = formats && (isFunction(formats[format]) ? formats[format].call(this, now) : formats[format]);\n\n return this.format(output || this.localeData().calendar(format, this, createLocal(now)));\n }\n\n function clone () {\n return new Moment(this);\n }\n\n function isAfter (input, units) {\n var localInput = isMoment(input) ? input : createLocal(input);\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() > localInput.valueOf();\n } else {\n return localInput.valueOf() < this.clone().startOf(units).valueOf();\n }\n }\n\n function isBefore (input, units) {\n var localInput = isMoment(input) ? input : createLocal(input);\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() < localInput.valueOf();\n } else {\n return this.clone().endOf(units).valueOf() < localInput.valueOf();\n }\n }\n\n function isBetween (from, to, units, inclusivity) {\n var localFrom = isMoment(from) ? from : createLocal(from),\n localTo = isMoment(to) ? to : createLocal(to);\n if (!(this.isValid() && localFrom.isValid() && localTo.isValid())) {\n return false;\n }\n inclusivity = inclusivity || '()';\n return (inclusivity[0] === '(' ? this.isAfter(localFrom, units) : !this.isBefore(localFrom, units)) &&\n (inclusivity[1] === ')' ? this.isBefore(localTo, units) : !this.isAfter(localTo, units));\n }\n\n function isSame (input, units) {\n var localInput = isMoment(input) ? input : createLocal(input),\n inputMs;\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() === localInput.valueOf();\n } else {\n inputMs = localInput.valueOf();\n return this.clone().startOf(units).valueOf() <= inputMs && inputMs <= this.clone().endOf(units).valueOf();\n }\n }\n\n function isSameOrAfter (input, units) {\n return this.isSame(input, units) || this.isAfter(input, units);\n }\n\n function isSameOrBefore (input, units) {\n return this.isSame(input, units) || this.isBefore(input, units);\n }\n\n function diff (input, units, asFloat) {\n var that,\n zoneDelta,\n output;\n\n if (!this.isValid()) {\n return NaN;\n }\n\n that = cloneWithOffset(input, this);\n\n if (!that.isValid()) {\n return NaN;\n }\n\n zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4;\n\n units = normalizeUnits(units);\n\n switch (units) {\n case 'year': output = monthDiff(this, that) / 12; break;\n case 'month': output = monthDiff(this, that); break;\n case 'quarter': output = monthDiff(this, that) / 3; break;\n case 'second': output = (this - that) / 1e3; break; // 1000\n case 'minute': output = (this - that) / 6e4; break; // 1000 * 60\n case 'hour': output = (this - that) / 36e5; break; // 1000 * 60 * 60\n case 'day': output = (this - that - zoneDelta) / 864e5; break; // 1000 * 60 * 60 * 24, negate dst\n case 'week': output = (this - that - zoneDelta) / 6048e5; break; // 1000 * 60 * 60 * 24 * 7, negate dst\n default: output = this - that;\n }\n\n return asFloat ? output : absFloor(output);\n }\n\n function monthDiff (a, b) {\n // difference in months\n var wholeMonthDiff = ((b.year() - a.year()) * 12) + (b.month() - a.month()),\n // b is in (anchor - 1 month, anchor + 1 month)\n anchor = a.clone().add(wholeMonthDiff, 'months'),\n anchor2, adjust;\n\n if (b - anchor < 0) {\n anchor2 = a.clone().add(wholeMonthDiff - 1, 'months');\n // linear across the month\n adjust = (b - anchor) / (anchor - anchor2);\n } else {\n anchor2 = a.clone().add(wholeMonthDiff + 1, 'months');\n // linear across the month\n adjust = (b - anchor) / (anchor2 - anchor);\n }\n\n //check for negative zero, return zero if negative zero\n return -(wholeMonthDiff + adjust) || 0;\n }\n\n hooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ';\n hooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]';\n\n function toString () {\n return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ');\n }\n\n function toISOString(keepOffset) {\n if (!this.isValid()) {\n return null;\n }\n var utc = keepOffset !== true;\n var m = utc ? this.clone().utc() : this;\n if (m.year() < 0 || m.year() > 9999) {\n return formatMoment(m, utc ? 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYYYY-MM-DD[T]HH:mm:ss.SSSZ');\n }\n if (isFunction(Date.prototype.toISOString)) {\n // native implementation is ~50x faster, use it when we can\n if (utc) {\n return this.toDate().toISOString();\n } else {\n return new Date(this.valueOf() + this.utcOffset() * 60 * 1000).toISOString().replace('Z', formatMoment(m, 'Z'));\n }\n }\n return formatMoment(m, utc ? 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYY-MM-DD[T]HH:mm:ss.SSSZ');\n }\n\n /**\n * Return a human readable representation of a moment that can\n * also be evaluated to get a new moment which is the same\n *\n * @link https://nodejs.org/dist/latest/docs/api/util.html#util_custom_inspect_function_on_objects\n */\n function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n }\n\n function format (inputString) {\n if (!inputString) {\n inputString = this.isUtc() ? hooks.defaultFormatUtc : hooks.defaultFormat;\n }\n var output = formatMoment(this, inputString);\n return this.localeData().postformat(output);\n }\n\n function from (time, withoutSuffix) {\n if (this.isValid() &&\n ((isMoment(time) && time.isValid()) ||\n createLocal(time).isValid())) {\n return createDuration({to: this, from: time}).locale(this.locale()).humanize(!withoutSuffix);\n } else {\n return this.localeData().invalidDate();\n }\n }\n\n function fromNow (withoutSuffix) {\n return this.from(createLocal(), withoutSuffix);\n }\n\n function to (time, withoutSuffix) {\n if (this.isValid() &&\n ((isMoment(time) && time.isValid()) ||\n createLocal(time).isValid())) {\n return createDuration({from: this, to: time}).locale(this.locale()).humanize(!withoutSuffix);\n } else {\n return this.localeData().invalidDate();\n }\n }\n\n function toNow (withoutSuffix) {\n return this.to(createLocal(), withoutSuffix);\n }\n\n // If passed a locale key, it will set the locale for this\n // instance. Otherwise, it will return the locale configuration\n // variables for this instance.\n function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n }\n\n var lang = deprecate(\n 'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.',\n function (key) {\n if (key === undefined) {\n return this.localeData();\n } else {\n return this.locale(key);\n }\n }\n );\n\n function localeData () {\n return this._locale;\n }\n\n var MS_PER_SECOND = 1000;\n var MS_PER_MINUTE = 60 * MS_PER_SECOND;\n var MS_PER_HOUR = 60 * MS_PER_MINUTE;\n var MS_PER_400_YEARS = (365 * 400 + 97) * 24 * MS_PER_HOUR;\n\n // actual modulo - handles negative numbers (for dates before 1970):\n function mod$1(dividend, divisor) {\n return (dividend % divisor + divisor) % divisor;\n }\n\n function localStartOfDate(y, m, d) {\n // the date constructor remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n return new Date(y + 400, m, d) - MS_PER_400_YEARS;\n } else {\n return new Date(y, m, d).valueOf();\n }\n }\n\n function utcStartOfDate(y, m, d) {\n // Date.UTC remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n return Date.UTC(y + 400, m, d) - MS_PER_400_YEARS;\n } else {\n return Date.UTC(y, m, d);\n }\n }\n\n function startOf (units) {\n var time;\n units = normalizeUnits(units);\n if (units === undefined || units === 'millisecond' || !this.isValid()) {\n return this;\n }\n\n var startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;\n\n switch (units) {\n case 'year':\n time = startOfDate(this.year(), 0, 1);\n break;\n case 'quarter':\n time = startOfDate(this.year(), this.month() - this.month() % 3, 1);\n break;\n case 'month':\n time = startOfDate(this.year(), this.month(), 1);\n break;\n case 'week':\n time = startOfDate(this.year(), this.month(), this.date() - this.weekday());\n break;\n case 'isoWeek':\n time = startOfDate(this.year(), this.month(), this.date() - (this.isoWeekday() - 1));\n break;\n case 'day':\n case 'date':\n time = startOfDate(this.year(), this.month(), this.date());\n break;\n case 'hour':\n time = this._d.valueOf();\n time -= mod$1(time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE), MS_PER_HOUR);\n break;\n case 'minute':\n time = this._d.valueOf();\n time -= mod$1(time, MS_PER_MINUTE);\n break;\n case 'second':\n time = this._d.valueOf();\n time -= mod$1(time, MS_PER_SECOND);\n break;\n }\n\n this._d.setTime(time);\n hooks.updateOffset(this, true);\n return this;\n }\n\n function endOf (units) {\n var time;\n units = normalizeUnits(units);\n if (units === undefined || units === 'millisecond' || !this.isValid()) {\n return this;\n }\n\n var startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;\n\n switch (units) {\n case 'year':\n time = startOfDate(this.year() + 1, 0, 1) - 1;\n break;\n case 'quarter':\n time = startOfDate(this.year(), this.month() - this.month() % 3 + 3, 1) - 1;\n break;\n case 'month':\n time = startOfDate(this.year(), this.month() + 1, 1) - 1;\n break;\n case 'week':\n time = startOfDate(this.year(), this.month(), this.date() - this.weekday() + 7) - 1;\n break;\n case 'isoWeek':\n time = startOfDate(this.year(), this.month(), this.date() - (this.isoWeekday() - 1) + 7) - 1;\n break;\n case 'day':\n case 'date':\n time = startOfDate(this.year(), this.month(), this.date() + 1) - 1;\n break;\n case 'hour':\n time = this._d.valueOf();\n time += MS_PER_HOUR - mod$1(time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE), MS_PER_HOUR) - 1;\n break;\n case 'minute':\n time = this._d.valueOf();\n time += MS_PER_MINUTE - mod$1(time, MS_PER_MINUTE) - 1;\n break;\n case 'second':\n time = this._d.valueOf();\n time += MS_PER_SECOND - mod$1(time, MS_PER_SECOND) - 1;\n break;\n }\n\n this._d.setTime(time);\n hooks.updateOffset(this, true);\n return this;\n }\n\n function valueOf () {\n return this._d.valueOf() - ((this._offset || 0) * 60000);\n }\n\n function unix () {\n return Math.floor(this.valueOf() / 1000);\n }\n\n function toDate () {\n return new Date(this.valueOf());\n }\n\n function toArray () {\n var m = this;\n return [m.year(), m.month(), m.date(), m.hour(), m.minute(), m.second(), m.millisecond()];\n }\n\n function toObject () {\n var m = this;\n return {\n years: m.year(),\n months: m.month(),\n date: m.date(),\n hours: m.hours(),\n minutes: m.minutes(),\n seconds: m.seconds(),\n milliseconds: m.milliseconds()\n };\n }\n\n function toJSON () {\n // new Date(NaN).toJSON() === null\n return this.isValid() ? this.toISOString() : null;\n }\n\n function isValid$2 () {\n return isValid(this);\n }\n\n function parsingFlags () {\n return extend({}, getParsingFlags(this));\n }\n\n function invalidAt () {\n return getParsingFlags(this).overflow;\n }\n\n function creationData() {\n return {\n input: this._i,\n format: this._f,\n locale: this._locale,\n isUTC: this._isUTC,\n strict: this._strict\n };\n }\n\n // FORMATTING\n\n addFormatToken(0, ['gg', 2], 0, function () {\n return this.weekYear() % 100;\n });\n\n addFormatToken(0, ['GG', 2], 0, function () {\n return this.isoWeekYear() % 100;\n });\n\n function addWeekYearFormatToken (token, getter) {\n addFormatToken(0, [token, token.length], 0, getter);\n }\n\n addWeekYearFormatToken('gggg', 'weekYear');\n addWeekYearFormatToken('ggggg', 'weekYear');\n addWeekYearFormatToken('GGGG', 'isoWeekYear');\n addWeekYearFormatToken('GGGGG', 'isoWeekYear');\n\n // ALIASES\n\n addUnitAlias('weekYear', 'gg');\n addUnitAlias('isoWeekYear', 'GG');\n\n // PRIORITY\n\n addUnitPriority('weekYear', 1);\n addUnitPriority('isoWeekYear', 1);\n\n\n // PARSING\n\n addRegexToken('G', matchSigned);\n addRegexToken('g', matchSigned);\n addRegexToken('GG', match1to2, match2);\n addRegexToken('gg', match1to2, match2);\n addRegexToken('GGGG', match1to4, match4);\n addRegexToken('gggg', match1to4, match4);\n addRegexToken('GGGGG', match1to6, match6);\n addRegexToken('ggggg', match1to6, match6);\n\n addWeekParseToken(['gggg', 'ggggg', 'GGGG', 'GGGGG'], function (input, week, config, token) {\n week[token.substr(0, 2)] = toInt(input);\n });\n\n addWeekParseToken(['gg', 'GG'], function (input, week, config, token) {\n week[token] = hooks.parseTwoDigitYear(input);\n });\n\n // MOMENTS\n\n function getSetWeekYear (input) {\n return getSetWeekYearHelper.call(this,\n input,\n this.week(),\n this.weekday(),\n this.localeData()._week.dow,\n this.localeData()._week.doy);\n }\n\n function getSetISOWeekYear (input) {\n return getSetWeekYearHelper.call(this,\n input, this.isoWeek(), this.isoWeekday(), 1, 4);\n }\n\n function getISOWeeksInYear () {\n return weeksInYear(this.year(), 1, 4);\n }\n\n function getWeeksInYear () {\n var weekInfo = this.localeData()._week;\n return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy);\n }\n\n function getSetWeekYearHelper(input, week, weekday, dow, doy) {\n var weeksTarget;\n if (input == null) {\n return weekOfYear(this, dow, doy).year;\n } else {\n weeksTarget = weeksInYear(input, dow, doy);\n if (week > weeksTarget) {\n week = weeksTarget;\n }\n return setWeekAll.call(this, input, week, weekday, dow, doy);\n }\n }\n\n function setWeekAll(weekYear, week, weekday, dow, doy) {\n var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy),\n date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear);\n\n this.year(date.getUTCFullYear());\n this.month(date.getUTCMonth());\n this.date(date.getUTCDate());\n return this;\n }\n\n // FORMATTING\n\n addFormatToken('Q', 0, 'Qo', 'quarter');\n\n // ALIASES\n\n addUnitAlias('quarter', 'Q');\n\n // PRIORITY\n\n addUnitPriority('quarter', 7);\n\n // PARSING\n\n addRegexToken('Q', match1);\n addParseToken('Q', function (input, array) {\n array[MONTH] = (toInt(input) - 1) * 3;\n });\n\n // MOMENTS\n\n function getSetQuarter (input) {\n return input == null ? Math.ceil((this.month() + 1) / 3) : this.month((input - 1) * 3 + this.month() % 3);\n }\n\n // FORMATTING\n\n addFormatToken('D', ['DD', 2], 'Do', 'date');\n\n // ALIASES\n\n addUnitAlias('date', 'D');\n\n // PRIORITY\n addUnitPriority('date', 9);\n\n // PARSING\n\n addRegexToken('D', match1to2);\n addRegexToken('DD', match1to2, match2);\n addRegexToken('Do', function (isStrict, locale) {\n // TODO: Remove \"ordinalParse\" fallback in next major release.\n return isStrict ?\n (locale._dayOfMonthOrdinalParse || locale._ordinalParse) :\n locale._dayOfMonthOrdinalParseLenient;\n });\n\n addParseToken(['D', 'DD'], DATE);\n addParseToken('Do', function (input, array) {\n array[DATE] = toInt(input.match(match1to2)[0]);\n });\n\n // MOMENTS\n\n var getSetDayOfMonth = makeGetSet('Date', true);\n\n // FORMATTING\n\n addFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear');\n\n // ALIASES\n\n addUnitAlias('dayOfYear', 'DDD');\n\n // PRIORITY\n addUnitPriority('dayOfYear', 4);\n\n // PARSING\n\n addRegexToken('DDD', match1to3);\n addRegexToken('DDDD', match3);\n addParseToken(['DDD', 'DDDD'], function (input, array, config) {\n config._dayOfYear = toInt(input);\n });\n\n // HELPERS\n\n // MOMENTS\n\n function getSetDayOfYear (input) {\n var dayOfYear = Math.round((this.clone().startOf('day') - this.clone().startOf('year')) / 864e5) + 1;\n return input == null ? dayOfYear : this.add((input - dayOfYear), 'd');\n }\n\n // FORMATTING\n\n addFormatToken('m', ['mm', 2], 0, 'minute');\n\n // ALIASES\n\n addUnitAlias('minute', 'm');\n\n // PRIORITY\n\n addUnitPriority('minute', 14);\n\n // PARSING\n\n addRegexToken('m', match1to2);\n addRegexToken('mm', match1to2, match2);\n addParseToken(['m', 'mm'], MINUTE);\n\n // MOMENTS\n\n var getSetMinute = makeGetSet('Minutes', false);\n\n // FORMATTING\n\n addFormatToken('s', ['ss', 2], 0, 'second');\n\n // ALIASES\n\n addUnitAlias('second', 's');\n\n // PRIORITY\n\n addUnitPriority('second', 15);\n\n // PARSING\n\n addRegexToken('s', match1to2);\n addRegexToken('ss', match1to2, match2);\n addParseToken(['s', 'ss'], SECOND);\n\n // MOMENTS\n\n var getSetSecond = makeGetSet('Seconds', false);\n\n // FORMATTING\n\n addFormatToken('S', 0, 0, function () {\n return ~~(this.millisecond() / 100);\n });\n\n addFormatToken(0, ['SS', 2], 0, function () {\n return ~~(this.millisecond() / 10);\n });\n\n addFormatToken(0, ['SSS', 3], 0, 'millisecond');\n addFormatToken(0, ['SSSS', 4], 0, function () {\n return this.millisecond() * 10;\n });\n addFormatToken(0, ['SSSSS', 5], 0, function () {\n return this.millisecond() * 100;\n });\n addFormatToken(0, ['SSSSSS', 6], 0, function () {\n return this.millisecond() * 1000;\n });\n addFormatToken(0, ['SSSSSSS', 7], 0, function () {\n return this.millisecond() * 10000;\n });\n addFormatToken(0, ['SSSSSSSS', 8], 0, function () {\n return this.millisecond() * 100000;\n });\n addFormatToken(0, ['SSSSSSSSS', 9], 0, function () {\n return this.millisecond() * 1000000;\n });\n\n\n // ALIASES\n\n addUnitAlias('millisecond', 'ms');\n\n // PRIORITY\n\n addUnitPriority('millisecond', 16);\n\n // PARSING\n\n addRegexToken('S', match1to3, match1);\n addRegexToken('SS', match1to3, match2);\n addRegexToken('SSS', match1to3, match3);\n\n var token;\n for (token = 'SSSS'; token.length <= 9; token += 'S') {\n addRegexToken(token, matchUnsigned);\n }\n\n function parseMs(input, array) {\n array[MILLISECOND] = toInt(('0.' + input) * 1000);\n }\n\n for (token = 'S'; token.length <= 9; token += 'S') {\n addParseToken(token, parseMs);\n }\n // MOMENTS\n\n var getSetMillisecond = makeGetSet('Milliseconds', false);\n\n // FORMATTING\n\n addFormatToken('z', 0, 0, 'zoneAbbr');\n addFormatToken('zz', 0, 0, 'zoneName');\n\n // MOMENTS\n\n function getZoneAbbr () {\n return this._isUTC ? 'UTC' : '';\n }\n\n function getZoneName () {\n return this._isUTC ? 'Coordinated Universal Time' : '';\n }\n\n var proto = Moment.prototype;\n\n proto.add = add;\n proto.calendar = calendar$1;\n proto.clone = clone;\n proto.diff = diff;\n proto.endOf = endOf;\n proto.format = format;\n proto.from = from;\n proto.fromNow = fromNow;\n proto.to = to;\n proto.toNow = toNow;\n proto.get = stringGet;\n proto.invalidAt = invalidAt;\n proto.isAfter = isAfter;\n proto.isBefore = isBefore;\n proto.isBetween = isBetween;\n proto.isSame = isSame;\n proto.isSameOrAfter = isSameOrAfter;\n proto.isSameOrBefore = isSameOrBefore;\n proto.isValid = isValid$2;\n proto.lang = lang;\n proto.locale = locale;\n proto.localeData = localeData;\n proto.max = prototypeMax;\n proto.min = prototypeMin;\n proto.parsingFlags = parsingFlags;\n proto.set = stringSet;\n proto.startOf = startOf;\n proto.subtract = subtract;\n proto.toArray = toArray;\n proto.toObject = toObject;\n proto.toDate = toDate;\n proto.toISOString = toISOString;\n proto.inspect = inspect;\n proto.toJSON = toJSON;\n proto.toString = toString;\n proto.unix = unix;\n proto.valueOf = valueOf;\n proto.creationData = creationData;\n proto.year = getSetYear;\n proto.isLeapYear = getIsLeapYear;\n proto.weekYear = getSetWeekYear;\n proto.isoWeekYear = getSetISOWeekYear;\n proto.quarter = proto.quarters = getSetQuarter;\n proto.month = getSetMonth;\n proto.daysInMonth = getDaysInMonth;\n proto.week = proto.weeks = getSetWeek;\n proto.isoWeek = proto.isoWeeks = getSetISOWeek;\n proto.weeksInYear = getWeeksInYear;\n proto.isoWeeksInYear = getISOWeeksInYear;\n proto.date = getSetDayOfMonth;\n proto.day = proto.days = getSetDayOfWeek;\n proto.weekday = getSetLocaleDayOfWeek;\n proto.isoWeekday = getSetISODayOfWeek;\n proto.dayOfYear = getSetDayOfYear;\n proto.hour = proto.hours = getSetHour;\n proto.minute = proto.minutes = getSetMinute;\n proto.second = proto.seconds = getSetSecond;\n proto.millisecond = proto.milliseconds = getSetMillisecond;\n proto.utcOffset = getSetOffset;\n proto.utc = setOffsetToUTC;\n proto.local = setOffsetToLocal;\n proto.parseZone = setOffsetToParsedOffset;\n proto.hasAlignedHourOffset = hasAlignedHourOffset;\n proto.isDST = isDaylightSavingTime;\n proto.isLocal = isLocal;\n proto.isUtcOffset = isUtcOffset;\n proto.isUtc = isUtc;\n proto.isUTC = isUtc;\n proto.zoneAbbr = getZoneAbbr;\n proto.zoneName = getZoneName;\n proto.dates = deprecate('dates accessor is deprecated. Use date instead.', getSetDayOfMonth);\n proto.months = deprecate('months accessor is deprecated. Use month instead', getSetMonth);\n proto.years = deprecate('years accessor is deprecated. Use year instead', getSetYear);\n proto.zone = deprecate('moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/', getSetZone);\n proto.isDSTShifted = deprecate('isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information', isDaylightSavingTimeShifted);\n\n function createUnix (input) {\n return createLocal(input * 1000);\n }\n\n function createInZone () {\n return createLocal.apply(null, arguments).parseZone();\n }\n\n function preParsePostFormat (string) {\n return string;\n }\n\n var proto$1 = Locale.prototype;\n\n proto$1.calendar = calendar;\n proto$1.longDateFormat = longDateFormat;\n proto$1.invalidDate = invalidDate;\n proto$1.ordinal = ordinal;\n proto$1.preparse = preParsePostFormat;\n proto$1.postformat = preParsePostFormat;\n proto$1.relativeTime = relativeTime;\n proto$1.pastFuture = pastFuture;\n proto$1.set = set;\n\n proto$1.months = localeMonths;\n proto$1.monthsShort = localeMonthsShort;\n proto$1.monthsParse = localeMonthsParse;\n proto$1.monthsRegex = monthsRegex;\n proto$1.monthsShortRegex = monthsShortRegex;\n proto$1.week = localeWeek;\n proto$1.firstDayOfYear = localeFirstDayOfYear;\n proto$1.firstDayOfWeek = localeFirstDayOfWeek;\n\n proto$1.weekdays = localeWeekdays;\n proto$1.weekdaysMin = localeWeekdaysMin;\n proto$1.weekdaysShort = localeWeekdaysShort;\n proto$1.weekdaysParse = localeWeekdaysParse;\n\n proto$1.weekdaysRegex = weekdaysRegex;\n proto$1.weekdaysShortRegex = weekdaysShortRegex;\n proto$1.weekdaysMinRegex = weekdaysMinRegex;\n\n proto$1.isPM = localeIsPM;\n proto$1.meridiem = localeMeridiem;\n\n function get$1 (format, index, field, setter) {\n var locale = getLocale();\n var utc = createUTC().set(setter, index);\n return locale[field](utc, format);\n }\n\n function listMonthsImpl (format, index, field) {\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n\n if (index != null) {\n return get$1(format, index, field, 'month');\n }\n\n var i;\n var out = [];\n for (i = 0; i < 12; i++) {\n out[i] = get$1(format, i, field, 'month');\n }\n return out;\n }\n\n // ()\n // (5)\n // (fmt, 5)\n // (fmt)\n // (true)\n // (true, 5)\n // (true, fmt, 5)\n // (true, fmt)\n function listWeekdaysImpl (localeSorted, format, index, field) {\n if (typeof localeSorted === 'boolean') {\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n } else {\n format = localeSorted;\n index = format;\n localeSorted = false;\n\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n }\n\n var locale = getLocale(),\n shift = localeSorted ? locale._week.dow : 0;\n\n if (index != null) {\n return get$1(format, (index + shift) % 7, field, 'day');\n }\n\n var i;\n var out = [];\n for (i = 0; i < 7; i++) {\n out[i] = get$1(format, (i + shift) % 7, field, 'day');\n }\n return out;\n }\n\n function listMonths (format, index) {\n return listMonthsImpl(format, index, 'months');\n }\n\n function listMonthsShort (format, index) {\n return listMonthsImpl(format, index, 'monthsShort');\n }\n\n function listWeekdays (localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdays');\n }\n\n function listWeekdaysShort (localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort');\n }\n\n function listWeekdaysMin (localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin');\n }\n\n getSetGlobalLocale('en', {\n dayOfMonthOrdinalParse: /\\d{1,2}(th|st|nd|rd)/,\n ordinal : function (number) {\n var b = number % 10,\n output = (toInt(number % 100 / 10) === 1) ? 'th' :\n (b === 1) ? 'st' :\n (b === 2) ? 'nd' :\n (b === 3) ? 'rd' : 'th';\n return number + output;\n }\n });\n\n // Side effect imports\n\n hooks.lang = deprecate('moment.lang is deprecated. Use moment.locale instead.', getSetGlobalLocale);\n hooks.langData = deprecate('moment.langData is deprecated. Use moment.localeData instead.', getLocale);\n\n var mathAbs = Math.abs;\n\n function abs () {\n var data = this._data;\n\n this._milliseconds = mathAbs(this._milliseconds);\n this._days = mathAbs(this._days);\n this._months = mathAbs(this._months);\n\n data.milliseconds = mathAbs(data.milliseconds);\n data.seconds = mathAbs(data.seconds);\n data.minutes = mathAbs(data.minutes);\n data.hours = mathAbs(data.hours);\n data.months = mathAbs(data.months);\n data.years = mathAbs(data.years);\n\n return this;\n }\n\n function addSubtract$1 (duration, input, value, direction) {\n var other = createDuration(input, value);\n\n duration._milliseconds += direction * other._milliseconds;\n duration._days += direction * other._days;\n duration._months += direction * other._months;\n\n return duration._bubble();\n }\n\n // supports only 2.0-style add(1, 's') or add(duration)\n function add$1 (input, value) {\n return addSubtract$1(this, input, value, 1);\n }\n\n // supports only 2.0-style subtract(1, 's') or subtract(duration)\n function subtract$1 (input, value) {\n return addSubtract$1(this, input, value, -1);\n }\n\n function absCeil (number) {\n if (number < 0) {\n return Math.floor(number);\n } else {\n return Math.ceil(number);\n }\n }\n\n function bubble () {\n var milliseconds = this._milliseconds;\n var days = this._days;\n var months = this._months;\n var data = this._data;\n var seconds, minutes, hours, years, monthsFromDays;\n\n // if we have a mix of positive and negative values, bubble down first\n // check: https://github.com/moment/moment/issues/2166\n if (!((milliseconds >= 0 && days >= 0 && months >= 0) ||\n (milliseconds <= 0 && days <= 0 && months <= 0))) {\n milliseconds += absCeil(monthsToDays(months) + days) * 864e5;\n days = 0;\n months = 0;\n }\n\n // The following code bubbles up values, see the tests for\n // examples of what that means.\n data.milliseconds = milliseconds % 1000;\n\n seconds = absFloor(milliseconds / 1000);\n data.seconds = seconds % 60;\n\n minutes = absFloor(seconds / 60);\n data.minutes = minutes % 60;\n\n hours = absFloor(minutes / 60);\n data.hours = hours % 24;\n\n days += absFloor(hours / 24);\n\n // convert days to months\n monthsFromDays = absFloor(daysToMonths(days));\n months += monthsFromDays;\n days -= absCeil(monthsToDays(monthsFromDays));\n\n // 12 months -> 1 year\n years = absFloor(months / 12);\n months %= 12;\n\n data.days = days;\n data.months = months;\n data.years = years;\n\n return this;\n }\n\n function daysToMonths (days) {\n // 400 years have 146097 days (taking into account leap year rules)\n // 400 years have 12 months === 4800\n return days * 4800 / 146097;\n }\n\n function monthsToDays (months) {\n // the reverse of daysToMonths\n return months * 146097 / 4800;\n }\n\n function as (units) {\n if (!this.isValid()) {\n return NaN;\n }\n var days;\n var months;\n var milliseconds = this._milliseconds;\n\n units = normalizeUnits(units);\n\n if (units === 'month' || units === 'quarter' || units === 'year') {\n days = this._days + milliseconds / 864e5;\n months = this._months + daysToMonths(days);\n switch (units) {\n case 'month': return months;\n case 'quarter': return months / 3;\n case 'year': return months / 12;\n }\n } else {\n // handle milliseconds separately because of floating point math errors (issue #1867)\n days = this._days + Math.round(monthsToDays(this._months));\n switch (units) {\n case 'week' : return days / 7 + milliseconds / 6048e5;\n case 'day' : return days + milliseconds / 864e5;\n case 'hour' : return days * 24 + milliseconds / 36e5;\n case 'minute' : return days * 1440 + milliseconds / 6e4;\n case 'second' : return days * 86400 + milliseconds / 1000;\n // Math.floor prevents floating point math errors here\n case 'millisecond': return Math.floor(days * 864e5) + milliseconds;\n default: throw new Error('Unknown unit ' + units);\n }\n }\n }\n\n // TODO: Use this.as('ms')?\n function valueOf$1 () {\n if (!this.isValid()) {\n return NaN;\n }\n return (\n this._milliseconds +\n this._days * 864e5 +\n (this._months % 12) * 2592e6 +\n toInt(this._months / 12) * 31536e6\n );\n }\n\n function makeAs (alias) {\n return function () {\n return this.as(alias);\n };\n }\n\n var asMilliseconds = makeAs('ms');\n var asSeconds = makeAs('s');\n var asMinutes = makeAs('m');\n var asHours = makeAs('h');\n var asDays = makeAs('d');\n var asWeeks = makeAs('w');\n var asMonths = makeAs('M');\n var asQuarters = makeAs('Q');\n var asYears = makeAs('y');\n\n function clone$1 () {\n return createDuration(this);\n }\n\n function get$2 (units) {\n units = normalizeUnits(units);\n return this.isValid() ? this[units + 's']() : NaN;\n }\n\n function makeGetter(name) {\n return function () {\n return this.isValid() ? this._data[name] : NaN;\n };\n }\n\n var milliseconds = makeGetter('milliseconds');\n var seconds = makeGetter('seconds');\n var minutes = makeGetter('minutes');\n var hours = makeGetter('hours');\n var days = makeGetter('days');\n var months = makeGetter('months');\n var years = makeGetter('years');\n\n function weeks () {\n return absFloor(this.days() / 7);\n }\n\n var round = Math.round;\n var thresholds = {\n ss: 44, // a few seconds to seconds\n s : 45, // seconds to minute\n m : 45, // minutes to hour\n h : 22, // hours to day\n d : 26, // days to month\n M : 11 // months to year\n };\n\n // helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize\n function substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) {\n return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture);\n }\n\n function relativeTime$1 (posNegDuration, withoutSuffix, locale) {\n var duration = createDuration(posNegDuration).abs();\n var seconds = round(duration.as('s'));\n var minutes = round(duration.as('m'));\n var hours = round(duration.as('h'));\n var days = round(duration.as('d'));\n var months = round(duration.as('M'));\n var years = round(duration.as('y'));\n\n var a = seconds <= thresholds.ss && ['s', seconds] ||\n seconds < thresholds.s && ['ss', seconds] ||\n minutes <= 1 && ['m'] ||\n minutes < thresholds.m && ['mm', minutes] ||\n hours <= 1 && ['h'] ||\n hours < thresholds.h && ['hh', hours] ||\n days <= 1 && ['d'] ||\n days < thresholds.d && ['dd', days] ||\n months <= 1 && ['M'] ||\n months < thresholds.M && ['MM', months] ||\n years <= 1 && ['y'] || ['yy', years];\n\n a[2] = withoutSuffix;\n a[3] = +posNegDuration > 0;\n a[4] = locale;\n return substituteTimeAgo.apply(null, a);\n }\n\n // This function allows you to set the rounding function for relative time strings\n function getSetRelativeTimeRounding (roundingFunction) {\n if (roundingFunction === undefined) {\n return round;\n }\n if (typeof(roundingFunction) === 'function') {\n round = roundingFunction;\n return true;\n }\n return false;\n }\n\n // This function allows you to set a threshold for relative time strings\n function getSetRelativeTimeThreshold (threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n return true;\n }\n\n function humanize (withSuffix) {\n if (!this.isValid()) {\n return this.localeData().invalidDate();\n }\n\n var locale = this.localeData();\n var output = relativeTime$1(this, !withSuffix, locale);\n\n if (withSuffix) {\n output = locale.pastFuture(+this, output);\n }\n\n return locale.postformat(output);\n }\n\n var abs$1 = Math.abs;\n\n function sign(x) {\n return ((x > 0) - (x < 0)) || +x;\n }\n\n function toISOString$1() {\n // for ISO strings we do not use the normal bubbling rules:\n // * milliseconds bubble up until they become hours\n // * days do not bubble at all\n // * months bubble up until they become years\n // This is because there is no context-free conversion between hours and days\n // (think of clock changes)\n // and also not between days and months (28-31 days per month)\n if (!this.isValid()) {\n return this.localeData().invalidDate();\n }\n\n var seconds = abs$1(this._milliseconds) / 1000;\n var days = abs$1(this._days);\n var months = abs$1(this._months);\n var minutes, hours, years;\n\n // 3600 seconds -> 60 minutes -> 1 hour\n minutes = absFloor(seconds / 60);\n hours = absFloor(minutes / 60);\n seconds %= 60;\n minutes %= 60;\n\n // 12 months -> 1 year\n years = absFloor(months / 12);\n months %= 12;\n\n\n // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js\n var Y = years;\n var M = months;\n var D = days;\n var h = hours;\n var m = minutes;\n var s = seconds ? seconds.toFixed(3).replace(/\\.?0+$/, '') : '';\n var total = this.asSeconds();\n\n if (!total) {\n // this is the same as C#'s (Noda) and python (isodate)...\n // but not other JS (goog.date)\n return 'P0D';\n }\n\n var totalSign = total < 0 ? '-' : '';\n var ymSign = sign(this._months) !== sign(total) ? '-' : '';\n var daysSign = sign(this._days) !== sign(total) ? '-' : '';\n var hmsSign = sign(this._milliseconds) !== sign(total) ? '-' : '';\n\n return totalSign + 'P' +\n (Y ? ymSign + Y + 'Y' : '') +\n (M ? ymSign + M + 'M' : '') +\n (D ? daysSign + D + 'D' : '') +\n ((h || m || s) ? 'T' : '') +\n (h ? hmsSign + h + 'H' : '') +\n (m ? hmsSign + m + 'M' : '') +\n (s ? hmsSign + s + 'S' : '');\n }\n\n var proto$2 = Duration.prototype;\n\n proto$2.isValid = isValid$1;\n proto$2.abs = abs;\n proto$2.add = add$1;\n proto$2.subtract = subtract$1;\n proto$2.as = as;\n proto$2.asMilliseconds = asMilliseconds;\n proto$2.asSeconds = asSeconds;\n proto$2.asMinutes = asMinutes;\n proto$2.asHours = asHours;\n proto$2.asDays = asDays;\n proto$2.asWeeks = asWeeks;\n proto$2.asMonths = asMonths;\n proto$2.asQuarters = asQuarters;\n proto$2.asYears = asYears;\n proto$2.valueOf = valueOf$1;\n proto$2._bubble = bubble;\n proto$2.clone = clone$1;\n proto$2.get = get$2;\n proto$2.milliseconds = milliseconds;\n proto$2.seconds = seconds;\n proto$2.minutes = minutes;\n proto$2.hours = hours;\n proto$2.days = days;\n proto$2.weeks = weeks;\n proto$2.months = months;\n proto$2.years = years;\n proto$2.humanize = humanize;\n proto$2.toISOString = toISOString$1;\n proto$2.toString = toISOString$1;\n proto$2.toJSON = toISOString$1;\n proto$2.locale = locale;\n proto$2.localeData = localeData;\n\n proto$2.toIsoString = deprecate('toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)', toISOString$1);\n proto$2.lang = lang;\n\n // Side effect imports\n\n // FORMATTING\n\n addFormatToken('X', 0, 0, 'unix');\n addFormatToken('x', 0, 0, 'valueOf');\n\n // PARSING\n\n addRegexToken('x', matchSigned);\n addRegexToken('X', matchTimestamp);\n addParseToken('X', function (input, array, config) {\n config._d = new Date(parseFloat(input, 10) * 1000);\n });\n addParseToken('x', function (input, array, config) {\n config._d = new Date(toInt(input));\n });\n\n // Side effect imports\n\n\n hooks.version = '2.24.0';\n\n setHookCallback(createLocal);\n\n hooks.fn = proto;\n hooks.min = min;\n hooks.max = max;\n hooks.now = now;\n hooks.utc = createUTC;\n hooks.unix = createUnix;\n hooks.months = listMonths;\n hooks.isDate = isDate;\n hooks.locale = getSetGlobalLocale;\n hooks.invalid = createInvalid;\n hooks.duration = createDuration;\n hooks.isMoment = isMoment;\n hooks.weekdays = listWeekdays;\n hooks.parseZone = createInZone;\n hooks.localeData = getLocale;\n hooks.isDuration = isDuration;\n hooks.monthsShort = listMonthsShort;\n hooks.weekdaysMin = listWeekdaysMin;\n hooks.defineLocale = defineLocale;\n hooks.updateLocale = updateLocale;\n hooks.locales = listLocales;\n hooks.weekdaysShort = listWeekdaysShort;\n hooks.normalizeUnits = normalizeUnits;\n hooks.relativeTimeRounding = getSetRelativeTimeRounding;\n hooks.relativeTimeThreshold = getSetRelativeTimeThreshold;\n hooks.calendarFormat = getCalendarFormat;\n hooks.prototype = proto;\n\n // currently HTML5 input type only supports 24-hour formats\n hooks.HTML5_FMT = {\n DATETIME_LOCAL: 'YYYY-MM-DDTHH:mm', // \n DATETIME_LOCAL_SECONDS: 'YYYY-MM-DDTHH:mm:ss', // \n DATETIME_LOCAL_MS: 'YYYY-MM-DDTHH:mm:ss.SSS', // \n DATE: 'YYYY-MM-DD', // \n TIME: 'HH:mm', // \n TIME_SECONDS: 'HH:mm:ss', // \n TIME_MS: 'HH:mm:ss.SSS', // \n WEEK: 'GGGG-[W]WW', // \n MONTH: 'YYYY-MM' // \n };\n\n return hooks;\n\n})));\n","// first check if moment.js is already loaded in the browser window, if so,\n// use this instance. Else, load via commonjs.\nmodule.exports = (typeof window !== 'undefined') && window['moment'] || require('moment');\n","// vis-util\nimport * as util from 'vis-util'\nexport { util }\n\n// vis-data\nimport * as data from 'vis-data'\nexport { data }\nexport { DataSet, DataView, Queue } from 'vis-data'\n\n// Network.\nexport * from './network/Network'\n\nimport Images from './network/Images'\nimport * as dotparser from './network/dotparser'\nimport * as gephiParser from './network/gephiParser'\nimport { parseGephi } from './network/gephiParser'\nimport * as allOptions from './network/options'\nexport const network = {\n Images,\n dotparser,\n gephiParser,\n allOptions,\n convertDot: dotparser.DOTToGraph,\n convertGephi: parseGephi,\n}\n\n// utils\nimport * as DOMutil from './DOMutil'\nexport { DOMutil }\n\n// bundled external libraries\nimport * as moment from './module/moment'\nexport { moment }\nimport * as Hammer from './module/hammer'\nexport { Hammer }\nimport * as keycharm from 'keycharm'\nexport { keycharm }\n"],"names":["commonjsGlobal","globalThis","window","global","self","commonjsRequire","Error","createCommonjsModule","fn","module","exports","_global","Math","Function","__g","_core","core","version","__e","_core_1","_library","_shared","SHARED","store","key","value","undefined","push","mode","copyright","id","px","random","_uid","concat","toString","_wks","Symbol","USE_SYMBOL","$exports","name","f","_wksExt","_isObject","it","_anObject","TypeError","_fails","exec","e","_descriptors","Object","defineProperty","get","a","document$1","document","is","createElement","_domCreate","_ie8DomDefine","_toPrimitive","S","val","call","valueOf","dP","f$1","O","P","Attributes","_objectDp","_wksDefine","$Symbol","charAt","hasOwnProperty","_has","_propertyDesc","bitmap","enumerable","configurable","writable","_hide","object","_functionToString","_redefine","SRC","TO_STRING","TPL","split","inspectSource","safe","isFunction","join","String","prototype","_aFunction","_ctx","that","length","b","c","apply","arguments","PROTOTYPE","$export","type","source","IS_FORCED","F","IS_GLOBAL","G","IS_STATIC","IS_PROTO","IS_BIND","B","target","expProto","own","out","exp","U","W","R","_export","_meta","META","setDesc","isExtensible","FREEZE","preventExtensions","setMeta","i","w","fastKey","create","getWeak","onFreeze","meta","NEED","KEY","_meta_1","_meta_2","_meta_3","_meta_4","_meta_5","def","TAG","_setToStringTag","tag","stat","_cof","slice","_iobject","propertyIsEnumerable","_defined","_toIobject","ceil","floor","_toInteger","isNaN","min","_toLength","max","min$1","_toAbsoluteIndex","index","_arrayIncludes","IS_INCLUDES","$this","el","fromIndex","shared","_sharedKey","arrayIndexOf","IE_PROTO","_objectKeysInternal","names","result","_enumBugKeys","_objectKeys","keys","f$2","getOwnPropertySymbols","_objectGops","f$3","_objectPie","_enumKeys","getSymbols","symbols","isEnum","_isArray","Array","isArray","arg","_toObject","_objectDps","defineProperties","Properties","document$2","_html","documentElement","IE_PROTO$1","Empty","PROTOTYPE$1","createDict","iframe","lt","gt","iframeDocument","style","display","appendChild","src","contentWindow","open","write","close","_objectCreate","hiddenKeys","f$4","getOwnPropertyNames","_objectGopn","gOPN","toString$1","windowNames","getWindowNames","f$5","_objectGopnExt","gOPD","getOwnPropertyDescriptor","f$6","_objectGopd","gOPD$1","dP$1","gOPN$1","$JSON","JSON","_stringify","stringify","PROTOTYPE$2","HIDDEN","TO_PRIMITIVE","SymbolRegistry","AllSymbols","OPSymbols","ObjectProto","USE_NATIVE","QObject","setter","findChild","setSymbolDesc","D","protoDesc","wrap","sym","_k","isSymbol","iterator","$defineProperty","$defineProperties","l","$create","$propertyIsEnumerable","E","$getOwnPropertyDescriptor","$getOwnPropertyNames","$getOwnPropertySymbols","IS_OP","$set","set","es6Symbols","j","wellKnownSymbols","k","keyFor","useSetter","useSimple","FAILS_ON_PRIMITIVES","args","replacer","$replacer","_typeof","obj","constructor","_defineProperty","ownKeys","enumerableOnly","filter","_objectSpread2","forEach","getOwnPropertyDescriptors","_toConsumableArray","arr","_arrayWithoutHoles","_iterableToArray","_nonIterableSpread","arr2","iter","from","_objectSap","_flags","ignoreCase","multiline","unicode","sticky","flags","RegExp","$toString","define","_stringAt","pos","s","charCodeAt","at","_advanceStringIndex","TAG$1","ARG","tryGet","_classof","T","callee","builtinExec","_regexpExecAbstract","nativeExec","nativeReplace","replace","patchedExec","LAST_INDEX","UPDATES_LAST_INDEX_WRONG","re1","re2","NPCG_INCLUDED","PATCH","str","re","lastIndex","reCopy","match","_regexpExec","proto","forced","SPECIES","REPLACE_SUPPORTS_NAMED_GROUPS","groups","SPLIT_WORKS_WITH_OVERWRITTEN_EXEC","originalExec","_fixReWks","SYMBOL","DELEGATES_TO_SYMBOL","DELEGATES_TO_EXEC","execCalled","nativeRegExpMethod","fns","maybeCallNative","nativeMethod","regexp","arg2","forceStringMethod","done","strfn","rxfn","string","max$1","min$2","floor$1","SUBSTITUTION_SYMBOLS","SUBSTITUTION_SYMBOLS_NO_NAMED","maybeToString","defined","REPLACE","$replace","searchValue","replaceValue","res","rx","functionalReplace","fullUnicode","results","matchStr","accumulatedResult","nextSourcePosition","matched","position","captures","namedCaptures","replacerArgs","replacement","getSubstitution","tailPos","m","ch","capture","n","UNSCOPABLES","ArrayProto","_addToUnscopables","_iterStep","_iterators","IteratorPrototype","_iterCreate","Constructor","NAME","next","IE_PROTO$2","ObjectProto$1","_objectGpo","getPrototypeOf","ITERATOR","BUGGY","FF_ITERATOR","KEYS","VALUES","returnThis","_iterDefine","Base","DEFAULT","IS_SET","FORCED","getMethod","kind","values","entries","DEF_VALUES","VALUES_BUG","$native","$default","$entries","$anyNative","methods","es6_array_iterator","iterated","_t","_i","Arguments","ITERATOR$1","TO_STRING_TAG","ArrayValues","DOMIterables","CSSRuleList","CSSStyleDeclaration","CSSValueList","ClientRectList","DOMRectList","DOMStringList","DOMTokenList","DataTransferItemList","FileList","HTMLAllCollection","HTMLCollection","HTMLFormElement","HTMLSelectElement","MediaList","MimeTypeArray","NamedNodeMap","NodeList","PaintRequestList","Plugin","PluginArray","SVGLengthList","SVGNumberList","SVGPathSegList","SVGPointList","SVGStringList","SVGTransformList","SourceBufferList","StyleSheetList","TextTrackCueList","TextTrackList","TouchList","collections","explicit","Collection","test","isEnum$1","_objectToArray","isEntries","$values","MATCH","_isRegexp","isRegExp","SPECIES$1","_speciesConstructor","C","$min","$push","$SPLIT","LENGTH","LAST_INDEX$1","MAX_UINT32","SUPPORTS_Y","SPLIT","$split","internalSplit","separator","limit","output","lastLastIndex","splitLimit","separatorCopy","lastLength","splitter","unicodeMatching","lim","p","q","A","z","$assign","assign","_objectAssign","K","aLen","check","_setProto","setPrototypeOf","buggy","__proto__","_inheritIfRequired","_stringWs","space","non","ltrim","rtrim","exporter","ALIAS","FORCE","trim","TYPE","_stringTrim","gOPN$2","gOPD$2","dP$2","$trim","NUMBER","$Number","proto$1","BROKEN_COF","TRIM","toNumber","argument","first","third","radix","maxCode","NaN","digits","code","parseInt","Number","j$1","key$1","moment","factory","hookCallback","hooks","setHookCallback","callback","input","isObject","isObjectEmpty","isUndefined","isNumber","isDate","Date","map","hasOwnProp","extend","createUTC","format","locale","strict","createLocalOrUTC","utc","defaultParsingFlags","empty","unusedTokens","unusedInput","overflow","charsLeftOver","nullInput","invalidMonth","invalidFormat","userInvalidated","iso","parsedDateParts","meridiem","rfc2822","weekdayMismatch","getParsingFlags","_pf","some","fun","t","len","isValid","_isValid","parsedParts","isNowValid","_d","getTime","invalidWeekday","_strict","bigHour","isFrozen","createInvalid","momentProperties","copyConfig","to","prop","_isAMomentObject","_f","_l","_tzm","_isUTC","_offset","_locale","updateInProgress","Moment","config","updateOffset","isMoment","absFloor","number","toInt","argumentForCoercion","coercedNumber","isFinite","compareArrays","array1","array2","dontConvert","lengthDiff","abs","diffs","warn","msg","suppressDeprecationWarnings","console","deprecate","firstTime","deprecationHandler","stack","deprecations","deprecateSimple","_config","_dayOfMonthOrdinalParseLenient","_dayOfMonthOrdinalParse","_ordinalParse","mergeConfigs","parentConfig","childConfig","Locale","defaultCalendar","sameDay","nextDay","nextWeek","lastDay","lastWeek","sameElse","calendar","mom","now","_calendar","defaultLongDateFormat","LTS","LT","L","LL","LLL","LLLL","longDateFormat","_longDateFormat","formatUpper","toUpperCase","defaultInvalidDate","invalidDate","_invalidDate","defaultOrdinal","defaultDayOfMonthOrdinalParse","ordinal","_ordinal","defaultRelativeTime","future","past","ss","mm","h","hh","d","dd","M","MM","y","yy","relativeTime","withoutSuffix","isFuture","_relativeTime","pastFuture","diff","aliases","addUnitAlias","unit","shorthand","lowerCase","toLowerCase","normalizeUnits","units","normalizeObjectUnits","inputObject","normalizedInput","normalizedProp","priorities","addUnitPriority","priority","getPrioritizedUnits","unitsObj","u","sort","zeroFill","targetLength","forceSign","absNumber","zerosToFill","sign","pow","substr","formattingTokens","localFormattingTokens","formatFunctions","formatTokenFunctions","addFormatToken","token","padded","func","localeData","removeFormattingTokens","makeFormatFunction","array","formatMoment","expandFormat","replaceLongDateFormatTokens","match1","match2","match3","match4","match6","match1to2","match3to4","match5to6","match1to3","match1to4","match1to6","matchUnsigned","matchSigned","matchOffset","matchShortOffset","matchTimestamp","matchWord","regexes","addRegexToken","regex","strictRegex","isStrict","getParseRegexForToken","unescapeFormat","regexEscape","p1","p2","p3","p4","tokens","addParseToken","addWeekParseToken","_w","addTimeToArrayFromToken","_a","YEAR","MONTH","DATE","HOUR","MINUTE","SECOND","MILLISECOND","WEEK","WEEKDAY","year","parseTwoDigitYear","daysInYear","isLeapYear","getSetYear","makeGetSet","getIsLeapYear","keepTime","set$1","month","date","daysInMonth","stringGet","stringSet","prioritized","mod","x","indexOf","o","modMonth","monthsShort","months","monthsShortRegex","monthsRegex","monthsParse","MONTHS_IN_FORMAT","defaultLocaleMonths","localeMonths","_months","isFormat","defaultLocaleMonthsShort","localeMonthsShort","_monthsShort","handleStrictParse","monthName","ii","llc","toLocaleLowerCase","_monthsParse","_longMonthsParse","_shortMonthsParse","localeMonthsParse","_monthsParseExact","setMonth","dayOfMonth","getSetMonth","getDaysInMonth","defaultMonthsShortRegex","computeMonthsParse","_monthsShortStrictRegex","_monthsShortRegex","defaultMonthsRegex","_monthsStrictRegex","_monthsRegex","cmpLenRev","shortPieces","longPieces","mixedPieces","createDate","ms","getFullYear","setFullYear","createUTCDate","UTC","getUTCFullYear","setUTCFullYear","firstWeekOffset","dow","doy","fwd","fwdlw","getUTCDay","dayOfYearFromWeeks","week","weekday","localWeekday","weekOffset","dayOfYear","resYear","resDayOfYear","weekOfYear","resWeek","weeksInYear","weekOffsetNext","localeWeek","_week","defaultLocaleWeek","localeFirstDayOfWeek","localeFirstDayOfYear","getSetWeek","add","getSetISOWeek","weekdaysMin","weekdaysShort","weekdays","weekdaysMinRegex","weekdaysShortRegex","weekdaysRegex","weekdaysParse","parseWeekday","parseIsoWeekday","shiftWeekdays","ws","defaultLocaleWeekdays","localeWeekdays","_weekdays","day","defaultLocaleWeekdaysShort","localeWeekdaysShort","_weekdaysShort","defaultLocaleWeekdaysMin","localeWeekdaysMin","_weekdaysMin","handleStrictParse$1","weekdayName","_weekdaysParse","_shortWeekdaysParse","_minWeekdaysParse","localeWeekdaysParse","_weekdaysParseExact","_fullWeekdaysParse","getSetDayOfWeek","getDay","getSetLocaleDayOfWeek","getSetISODayOfWeek","defaultWeekdaysRegex","computeWeekdaysParse","_weekdaysStrictRegex","_weekdaysRegex","defaultWeekdaysShortRegex","_weekdaysShortStrictRegex","_weekdaysShortRegex","defaultWeekdaysMinRegex","_weekdaysMinStrictRegex","_weekdaysMinRegex","minPieces","minp","shortp","longp","hFormat","hours","kFormat","minutes","seconds","lowercase","matchMeridiem","_meridiemParse","kInput","_isPm","isPM","_meridiem","pos1","pos2","localeIsPM","defaultLocaleMeridiemParse","localeMeridiem","isLower","getSetHour","baseConfig","dayOfMonthOrdinalParse","meridiemParse","locales","localeFamilies","globalLocale","normalizeLocale","chooseLocale","loadLocale","oldLocale","_abbr","aliasedRequire","getSetGlobalLocale","data","getLocale","defineLocale","abbr","parentLocale","updateLocale","tmpLocale","listLocales","checkOverflow","_overflowDayOfYear","_overflowWeeks","_overflowWeekday","defaults","currentDateArray","nowValue","_useUTC","getUTCMonth","getUTCDate","getMonth","getDate","configFromArray","currentDate","expectedWeekday","yearToUse","dayOfYearFromWeekInfo","_dayOfYear","_nextDay","setUTCMinutes","getUTCMinutes","weekYear","temp","weekdayOverflow","GG","createLocal","curWeek","gg","extendedIsoRegex","basicIsoRegex","tzRegex","isoDates","isoTimes","aspNetJsonRegex","configFromISO","allowTime","dateFormat","timeFormat","tzFormat","configFromStringAndFormat","extractFromRFC2822Strings","yearStr","monthStr","dayStr","hourStr","minuteStr","secondStr","untruncateYear","preprocessRFC2822","checkWeekday","weekdayStr","parsedInput","weekdayProvided","weekdayActual","obsOffsets","UT","GMT","EDT","EST","CDT","CST","MDT","MST","PDT","PST","calculateOffset","obsOffset","militaryOffset","numOffset","hm","configFromRFC2822","parsedArray","configFromString","createFromInputFallback","ISO_8601","RFC_2822","skipped","stringLength","totalParsedInputLength","meridiemFixWrap","hour","isPm","meridiemHour","configFromStringAndArray","tempConfig","bestMoment","scoreToBeat","currentScore","score","configFromObject","minute","second","millisecond","createFromConfig","prepareConfig","preparse","configFromInput","isUTC","prototypeMin","other","prototypeMax","pickBy","moments","ordering","isDurationValid","unitHasDecimal","parseFloat","isValid$1","createInvalid$1","createDuration","Duration","duration","years","quarters","quarter","weeks","isoWeek","days","milliseconds","_milliseconds","_days","_data","_bubble","isDuration","absRound","round","offset","utcOffset","offsetFromString","chunkOffset","matcher","matches","chunk","parts","cloneWithOffset","model","clone","setTime","local","getDateOffset","getTimezoneOffset","getSetOffset","keepLocalTime","keepMinutes","localAdjust","_changeInProgress","addSubtract","getSetZone","setOffsetToUTC","setOffsetToLocal","subtract","setOffsetToParsedOffset","tZone","hasAlignedHourOffset","isDaylightSavingTime","isDaylightSavingTimeShifted","_isDSTShifted","toArray","isLocal","isUtcOffset","isUtc","aspNetRegex","isoRegex","ret","diffRes","parseIso","momentsDifference","invalid","inp","positiveMomentsDifference","base","isAfter","isBefore","createAdder","direction","period","dur","tmp","isAdding","getCalendarFormat","myMoment","calendar$1","time","formats","sod","startOf","calendarFormat","localInput","endOf","isBetween","inclusivity","localFrom","localTo","isSame","inputMs","isSameOrAfter","isSameOrBefore","asFloat","zoneDelta","monthDiff","wholeMonthDiff","anchor","anchor2","adjust","defaultFormat","defaultFormatUtc","toISOString","keepOffset","toDate","inspect","zone","prefix","datetime","suffix","inputString","postformat","humanize","fromNow","toNow","newLocaleData","lang","MS_PER_SECOND","MS_PER_MINUTE","MS_PER_HOUR","MS_PER_400_YEARS","mod$1","dividend","divisor","localStartOfDate","utcStartOfDate","startOfDate","isoWeekday","unix","toObject","toJSON","isValid$2","parsingFlags","invalidAt","creationData","isoWeekYear","addWeekYearFormatToken","getter","getSetWeekYear","getSetWeekYearHelper","getSetISOWeekYear","getISOWeeksInYear","getWeeksInYear","weekInfo","weeksTarget","setWeekAll","dayOfYearData","getSetQuarter","getSetDayOfMonth","getSetDayOfYear","getSetMinute","getSetSecond","parseMs","getSetMillisecond","getZoneAbbr","getZoneName","isoWeeks","isoWeeksInYear","parseZone","isDST","zoneAbbr","zoneName","dates","isDSTShifted","createUnix","createInZone","preParsePostFormat","firstDayOfYear","firstDayOfWeek","get$1","field","listMonthsImpl","listWeekdaysImpl","localeSorted","shift","listMonths","listMonthsShort","listWeekdays","listWeekdaysShort","listWeekdaysMin","langData","mathAbs","addSubtract$1","add$1","subtract$1","absCeil","bubble","monthsFromDays","monthsToDays","daysToMonths","as","valueOf$1","makeAs","alias","asMilliseconds","asSeconds","asMinutes","asHours","asDays","asWeeks","asMonths","asQuarters","asYears","clone$1","get$2","makeGetter","thresholds","substituteTimeAgo","relativeTime$1","posNegDuration","getSetRelativeTimeRounding","roundingFunction","getSetRelativeTimeThreshold","threshold","withSuffix","abs$1","toISOString$1","Y","toFixed","total","totalSign","ymSign","daysSign","hmsSign","proto$2","toIsoString","relativeTimeRounding","relativeTimeThreshold","HTML5_FMT","DATETIME_LOCAL","DATETIME_LOCAL_SECONDS","DATETIME_LOCAL_MS","TIME","TIME_SECONDS","TIME_MS","byteToHex","i$1","stringifyUUID","buf","bth","crypto","getRandomValues","_rnds8","Uint8Array","whatwgRNG","_rnds","r","byteToHex$1","i$1$1","seedBytes","defaultNodeId","defaultClockseq","uuid4","options","rnds","rng","ASPDateRegex","fullHexRE","shortHexRE","rgbRE","rgbaRE","recursiveDOMDelete","DOMobject","hasChildNodes","child","firstChild","removeChild","isString","parse","copyOrDelete","allowDeletion","doDeletion","fillIfDefined","aProp","bProp","selectiveExtend","props","_len","others","_key","_others","selectiveDeepExtend","deepExtend","selectiveNotDeepExtend","propsToExclude","protoExtend","equalArray","convert","Boolean","getType","_value","never","copyAndExtendArray","newValue","copyArray","getAbsoluteLeft","elem","getBoundingClientRect","left","getAbsoluteRight","right","getAbsoluteTop","top","addClassName","classNames","classes","className","newClasses","removeClassName","oldClasses","_key2","updateProperty","throttle","scheduled","requestAnimationFrame","addEventListener","element","action","listener","useCapture","navigator","userAgent","attachEvent","removeEventListener","detachEvent","preventDefault","event","returnValue","getTarget","srcElement","Element","nodeType","parentNode","hasParent","parent","option","asBoolean","defaultValue","asNumber","asString","asSize","asElement","hexToRGB","hex","g","overrideOpacity","color","opacity","rgb","_rgb","RGBToHex","red","green","blue","parseColor","inputColor","defaultColor","colorStr","isValidRGB","isValidHex","hsv","hexToHSV","lighterColorHSV","v","darkerColorHSV","darkerColorHex","HSVToHex","lighterColorHex","background","border","highlight","hover","_color","RGBToHSV","minRGB","maxRGB","hue","saturation","cssUtil","cssText","styles","_key3","_value2","addCssText","currentStyles","newStyles","removeCssText","removeStyles","_key4","HSVToRGB","isOk","isValidRGBA","rgba","selectiveBridgeObject","fields","referenceObject","objectTo","bridgeObject","insertSort","compare","mergeOptions","mergeTarget","globalOptions","isPresent","isEmpty","doMerge","dst","srcOption","globalPassed","globalOption","globalEnabled","enabled","binarySearchCustom","orderedItems","comparator","field2","maxIterations","iteration","low","high","middle","item","_value3","searchResult","binarySearchValue","sidePreference","prevValue","nextValue","easingFunctions","linear","easeInQuad","easeOutQuad","easeInOutQuad","easeInCubic","easeOutCubic","easeInOutCubic","easeInQuart","easeOutQuart","easeInOutQuart","easeInQuint","easeOutQuint","easeInOutQuint","getScrollBarWidth","inner","width","height","outer","visibility","body","w1","offsetWidth","w2","clientWidth","topMost","pile","accessors","candidate","_iteratorNormalCompletion","_didIteratorError","_iteratorError","_iterator","_step","member","err","return","util","freeze","randomUUID","_typeof_1","_typeof2","_classCallCheck","instance","classCallCheck","_defineProperties","descriptor","_createClass","protoProps","staticProps","createClass","_assertThisInitialized","ReferenceError","assertThisInitialized","_possibleConstructorReturn","possibleConstructorReturn","_getPrototypeOf","_setPrototypeOf","_inherits","subClass","superClass","inherits","createCommonjsModule$1","byteToHex$2","i$2","random$1","byteToHex$1$1","seedBytes$1","defaultNodeId$1","defaultClockseq$1","isId","Queue","_queue","_timeout","_extended","delay","Infinity","setOptions","_flushIfNeeded","destroy","flush","method","original","me","queue","context","entry","_this","clearTimeout","setTimeout","splice","arrayWithoutHoles","iterableToArray","nonIterableSpread","toConsumableArray","DataSetPart","_subscribers","remove","update","subscribe","on","unsubscribe","off","_trigger","payload","senderId","subscribers","subscriber","_objectSpread","DataSet","_DataSetPart","_options","_idProp","fieldId","_type","addedIds","_addItem","items","_this2","updatedIds","oldData","updatedData","idProp","addOrUpdate","origId","fullItem","oldItem","_updateItem","_id","ids","returnType","itemIds","itemId","_getItem","order","_sort","_filterFields","_i2","_len2","_i3","_len3","resultant","_id2","getIds","_i4","_len4","_i5","_len5","_id3","_i6","_len6","_id4","_i7","_len7","_i8","_len8","_id5","getDataSet","_i9","_len9","_id6","_item","mappedItems","reduce","filteredItem","av","bv","removedIds","removedItems","_remove","ident","clear","maxField","itemField","minField","distinct","fieldType","count","exists","_i10","_len10","types","raw","converted","DataView","_ids","_onEvent","bind","setData","refresh","oldIds","newIds","error","viewOptions","thisFilter","optionsFilter","defaultFilter","params","oldItems","updatedItems","CanvasRenderingContext2D","circle","beginPath","arc","PI","closePath","square","rect","triangle","s2","ir","sqrt","moveTo","lineTo","triangleDown","star","radius","sin","cos","diamond","roundRect","r2d","ellipse_vis","kappa","ox","oy","xe","ye","xm","ym","bezierCurveTo","database","wEllipse","hEllipse","ymb","yeb","dashedLine","x2","y2","pattern","patternLength","dx","dy","slope","distRemaining","patternIndex","draw","xStep","dashLength","hexagon","sides","Emitter","mixin","_callbacks","once","removeListener","removeAllListeners","callbacks","cb","emit","listeners","hasListeners","parseDOT","dot","parseGraph","NODE_ATTR_MAPPING","EDGE_ATTR_MAPPING","TOKENTYPE","NULL","DELIMITER","IDENTIFIER","UNKNOWN","DELIMITERS","tokenType","nextPreview","regexAlphaNumeric","isAlphaNumeric","merge","setValue","path","addNode","graph","node","current","graphs","root","nodes","attr","addEdge","edge","edges","createEdge","arrows","getToken","isComment","c2","newSyntaxError","SyntaxError","chop","parseStatements","parseStatement","subgraph","parseSubgraph","parseEdge","parseAttributeStatement","parseNodeStatement","subgraphs","parseAttributeList","edgeStyles","arrowTypes","box","crow","curve","icurve","normal","inv","tee","vee","attr_list","attr_names","arrowType","includes","idx","dir","dir_type","from_type","to_type","idx_arrow","nof_attr_list","tmp_attr_list","message","text","maxLength","forEach2","elem1","elem2","setProp","pop","convertAttr","mapping","visProp","visPropI","DOTToGraph","dotData","graphData","dotNode","graphNode","label","image","shape","convertEdge","dotEdge","graphEdge","subEdge","parseGephi","gephiJSON","optionsObj","inheritColor","fixed","gEdges","vEdges","gEdge","vEdge","attributes","title","vNodes","gNode","vNode","size","this","keycharm","container","_exportFunctions","_bound","keydown","keyup","_keys","fromCharCode","down","handleEvent","up","keyCode","bound","shiftKey","bindAll","getKey","unbind","newBindings","reset","hammerMock","noop","Hammer","require$$0","Activator","active","dom","overlay","hammer","_onTapOverlay","events","stopPropagation","onClick","_hasParent","deactivate","escListener","activate","edit","del","back","editNode","editEdge","addDescription","edgeDescription","editEdgeDescription","createEdgeError","deleteClusterError","editClusterError","CachedImage","NUM_ITERATIONS","Image","canvas","initialized","h2","h4","h8","h16","w4","w8","w16","coordinates","_fillMipMap","ctx","getContext","drawImage","iterations","factor","Images","images","imageBroken","url","brokenUrl","imageToLoadBrokenUrlOn","onerror","imageToRedrawWith","cachedImage","img","onload","_fixImageCoordinates","init","_redrawWithImage","_tryloadBrokenUrl","imageToCache","offsetHeight","Groups","defaultIndex","groupsArray","groupIndex","defaultGroups","defaultOptions","useDefaultGroups","optionFields","groupName","group","groupname","shouldCreate","_arrayWithHoles","_iterableToArrayLimit","_arr","_n","_e","_s","_nonIterableRest","_slicedToArray","arrayWithHoles","iterableToArrayLimit","nonIterableRest","ComponentUtil","subOption","allowed","chosen","chosenEdge","point","rotationPoint","angle","tmp2","bottom","LabelAccumulator","measureText","lines","blocks","tmpText","block","line","_add","tmpLines","tmpLine","firstEmptyBlock","tmpBlocks","determineLineHeights","determineLabelSize","removeEmptyBlocks","tagPattern","MarkupAccumulator","bold","ital","mono","spacing","buffer","modStack","modName","tagName","emitBlock","unshift","setTag","advance","prepareRegExp","regExp","nextTag","checkTag","unsetTag","prepared","LabelSplitter","selected","textWidth","getFormattingValues","measure","isValidLabel","finalize","font","fontOptions","nlLines","lineCount","multi","splitBlocks","newLine","maxWdt","splitStringIntoLines","append","markupSystem","system","parseEntities","parsed","parseWS","parseStartTag","parseEndTag","beginable","parseOverride","decodeMarkupSystem","splitMarkdownBlocks","splitHtmlBlocks","curWidth","words","pre","newText","overMaxWidth","appendLast","getLongestFit","word","getLongestFitWord","newW","multiFontStyle","Label","edgelabel","pointToSelf","baseSize","yLine","isEdgeLabel","elementOptions","initFontOptions","labelDirty","newFontOptions","parseFontString","vadjust","constrainWidth","minWdt","constrainHeight","minHgt","valign","widthConstraint","widthConstraintMaximum","widthConstraintMinimum","heightConstraint","heightConstraintMinimum","heightConstraintValign","propagateFonts","constrain","chooser","choosify","margins","widthBias","heightBias","dstPile","srcPile","addFontToPile","tmpShorthand","opt","multiName","multiFont","optionNames","getFontOption","fontPile","addFontOptionsToPile","getBasicOptions","modOptions","tmpMultiFontOptions","getFontOptions","baseline","viewFontSize","view","scale","scaling","drawThreshold","maxVisible","calculateLabelSize","_drawBackground","_drawText","fillStyle","getSize","fillRect","_setAlignment","textAlign","labelHeight","align","_getColor","strokeColor","fontColor","strokeWidth","lineWidth","strokeStyle","lineJoin","strokeText","fillText","lineMargin","textBaseline","initialStrokeColor","_processLabel","getValue","face","labelHighlightBold","fontString","selectedState","hoverState","inText","process","differentState","state","_processLabelText","outOptions","inOptions","newOptionsArray","NodeBase","labelModule","margin","refreshNeeded","boundingBox","adjustSizes","borderWidth","resize","shadow","shadowColor","shadowBlur","shadowSize","shadowOffsetX","shadowX","shadowOffsetY","shadowY","borderDashes","setLineDash","dashes","shapeProperties","borderColor","save","enableBorderDashes","stroke","disableBorderDashes","restore","enableShadow","fill","disableShadow","performStroke","_updateBoundingBox","textSize","getTextSize","DEFAULT_SIZE","Box","_setMargins","needsRefresh","dimensions","getDimensionsFromLabel","initContextForDraw","borderRadius","performFill","updateBoundingBox","_addBoundingBoxMargin","CircleImageBase","labelOffset","imageObj","imageObjAlt","setImages","selection_changed","imageTmp","useImageSize","ratio_width","ratio_height","globalAlpha","interpolation","drawImageAtPosition","yLabel","labelDimensions","Circle","diameter","_drawRawCircle","CircularImage","imageAbsent","_resizeImage","switchImages","clip","_drawImageAtPosition","_drawImageLabel","Database","_distanceToBorder","ShapeBase","sizeMultiplier","icon","Diamond","_drawShape","Dot","Ellipse","Icon","iconSize","_icon","iconTextSpacing","side","useBorderWithImage","neutralborderWidth","selectionLineWidth","borderWidthSelected","Square","Hexagon","Star","Text","Triangle","TriangleDown","errorFound","allOptions","printStyle","Validator","referenceOptions","subObject","usedOptions","__any__","getSuggestion","referenceOption","is_object","refOptionObj","__type__","checkFields","log","printLocation","optionType","refOptionType","print","localSearch","findInOptions","globalSearch","localSearchThreshold","globalSearchThreshold","indexMatch","distance","closestMatch","recursive","closestMatchPath","lowerCaseOption","op","levenshteinDistance","matrix","Node","imagelist","grouplist","baseFontSize","predefinedPosition","currentShape","checkMass","parseOptions","_load_images","updateLabelModule","updateShape","hidden","physics","load","brokenImage","unselected","updateGroupOptions","currentGroup","distanceToBorder","customScalingFunction","sizeDiff","fontDiff","visible","pointInRect","nodeId","labelId","parentOptions","newOptions","groupList","hasGroup","groupObj","skipProperties","parsedColor","mass","strId","NodesHandler","layoutEngine","functions","createNode","nodesListeners","boldital","level","bindEventListeners","emitter","doNotEmit","oldNodesData","newNodes","properties","positionInitially","changedData","dataChanged","oldValue","constructorClass","clearPositions","dataArray","nodeIndices","dataset","nodeList","nodeObj","toId","fromId","edgeList","EndPoint","points","arrowData","xt","yt","Arrow","transform","drawPath","Crow","Curve","pi","start_angle","end_angle","InvertedCurve","InvertedTriangle","Bar","Vee","EndPoints","EdgeBase","colorDirty","selectionWidth","hoverWidth","fromPoint","toPoint","viaNode","getColor","_drawDashedLine","_drawLine","_line","_getCircleData","_circle","lineCap","lineDashOffset","nearNode","_findBorderPosition","_findBorderPositionCircle","selfReferenceSize","percentage","distanceToPoint","difference","_pointOnCircle","atan2","inheritsColor","grd","createLinearGradient","fromColor","toColor","addColorStop","x1","y1","x3","y3","via","_getDistanceToEdge","py","something","arrowPoint","node1","node2","guideOffset","scaleFactor","fromArrowScale","fromArrowType","toArrowScale","toArrowType","middleArrowScale","middleArrowType","smooth","findBorderPosition","guidePos","getPoint","xi","yi","arrowCore","attrs","origCtxAttr","attrname","backgroundColor","backgroundSize","setStrokeDashed","backgroundDashes","BezierEdgeBase","_getViaCoordinates","minDistance","lastX","lastY","_getDistanceToLine","viaNode1","viaNode2","hasNode1","hasNode2","quadraticCurveTo","drawBackground","CubicBezierEdgeBase","via1","via2","vec","CubicBezierEdge","viaNodes","_bezierCurve","roundness","forceDirection","_findBorderPositionBezier","_getDistanceToBezierEdge","BezierEdgeDynamic","_boundFunction","positionBezierNode","physicsChange","setupSupportNode","connect","parentEdgeId","cx","cy","cr","BezierEdgeStatic","xVia","yVia","stepX","stepY","originalAngle","myAngle","StraightEdge","edgeSegmentLength","toBorderDist","toBorderPoint","borderPos","Edge","baseWidth","edgeType","connected","oldHidden","updateEdgeType","_setInteractionWidths","newHidden","toArrow","fromArrow","middleArrow","inherit","arrowStrikethrough","selectedWidth","changeInType","cleanup","disconnect","attachEdge","detachEdge","widthDiff","getViaNode","getArrowData","drawLine","drawArrows","drawLabel","drawArrowHead","_getRotation","translate","rotate","edgeId","isOverlappingWith","distMax","xFrom","yFrom","xTo","yTo","xObj","yObj","dist","getDistanceToEdge","copyFromGlobals","colorsDefined","EdgesHandler","edgesListeners","edgeData","smoothOptions","reconnectEdges","oldEdgesData","edgesData","oldEdge","_addMissingEdges","_removeInvalidEdges","edgesToDelete","toNode","fromNode","isCluster","addIds","BarnesHutSolver","physicsBody","barnesHutTree","randomSeed","thetaInversed","theta","overlapAvoidanceFactor","avoidOverlap","gravitationalConstant","physicsNodeIndices","nodeCount","_formBarnesHutTree","_getForceContributions","parentBranch","_getForceContribution","children","NW","NE","SW","SE","childrenCount","centerOfMass","calcSize","_calculateForces","gravityForce","fx","fy","forces","minX","minY","maxX","maxY","minimumTreeSize","rootSize","halfRootSize","centerX","centerY","range","maxWidth","_splitBranch","_placeInTree","totalMass","totalMassInv","biggestSize","skipMassUpdate","_updateBranchMass","region","_placeInRegion","seededRandom","containedNode","_insertRegion","childSize","_drawBranch","branch","RepulsionSolver","repulsingForce","nodeDistance","HierarchicalRepulsionSolver","steepness","SpringSolver","edgeLength","edgeIndices","physicsEdgeIndices","node3","springLength","_calculateSpringForce","springForce","springConstant","HierarchicalSpringSolver","springFx","springFy","totalFx","totalFy","correctionFx","correctionFy","CentralGravitySolver","centralGravity","ForceAtlas2BasedRepulsionSolver","degree","ForceAtlas2BasedCentralGravitySolver","PhysicsEngine","velocities","physicsEnabled","simulationInterval","requiresTimeout","previousStates","referenceState","freezeCache","renderTimer","adaptiveTimestep","adaptiveTimestepEnabled","adaptiveCounter","adaptiveInterval","stabilized","startedStabilization","stabilizationIterations","ready","barnesHut","damping","forceAtlas2Based","repulsion","hierarchicalRepulsion","maxVelocity","minVelocity","solver","stabilization","updateInterval","onlyDynamicEdges","fit","timestep","layoutFailed","initPhysics","stopSimulation","startSimulation","updatePhysicsData","nodesSolver","edgesSolver","gravitySolver","Repulsion","HierarchicalRepulsion","modelOptions","stabilize","viewFunction","simulationStep","_emitStabilized","startTime","physicsTick","physicsTime","runDoubleSpeed","amountOfIterations","solve","moveNodes","_evaluateStepQuality","_startStabilizing","doAdaptive","physicsStep","revert","adjustTimeStep","nodeIds","positions","vx","vy","dpos","reference","posThreshold","maxNodeVelocity","averageNodeVelocity","velocityAdaptiveThreshold","nodeVelocity","_performStep","df","maxV","force","velocity","calculateComponentVelocity","totalVelocity","targetIterations","_freezeNodes","_stabilizationBatch","running","sendProgress","_finalizeStabilization","_restoreFrozenNodes","colorFactor","forceSize","arrowSize","NetworkUtil","allNodes","specificNodes","clonedOptions","amountOfConnections","Cluster","containedNodes","containedEdges","childClusterId","childCluster","clusterEdge","parentClusterEdge","clusteringEdgeReplacingIds","srcId","edgeReplacedById","ClusterEngine","clusteredNodes","clusteredEdges","hubsize","_getHubSize","_checkOptions","nodesToCluster","clusterByConnection","refreshData","joinCondition","childNodesObj","childEdgesObj","_cluster","edgeCount","clusters","usedNodes","relevantEdgeCount","checkJoinCondition","cloneOptions","gatheringSuccessful","childNodeId","_getConnectedId","findClusterData","foundCluster","clusterByEdgeCount","clusterNodeProperties","parentNodeId","parentClonedOptions","childClonedOptions","childNodeIDs","childNode","childEdge","clusterEdgeProperties","otherNodeId","childKeys","createEdges","newEdges","getNewEdge","createdEdge","newEdge","matchToDirection","matchFromDirection","_createClusteredEdge","_backupEdgeOptions","tmpNodesToRemove","allowSingleNodeCluster","processProperties","childNodesOptions","childEdgesOptions","clusterId","_getClusterPosition","clusterNode","_clusterEdges","originalOptions","clusterNodeId","findNode","parentIndex","parentClusterNodeId","parentClusterNode","_openChildCluster","releaseFunction","clusterPosition","newPositions","edgesToBeDeleted","otherNode","transferId","transferEdge","otherCluster","_restoreEdge","nodesArray","counter","reverse","clusteredNodeId","startEdgeId","allEdgeIds","getClusteredEdges","clusteredEdgeId","getBaseEdges","IdsToHandle","doneIds","foundIds","nextId","nextEdge","replacingIds","replacingId","average","averageSquared","hubCounter","largestHub","variance","standardDeviation","hubThreshold","baseEdge","extraOptions","childNodes","childEdges","_createClusterEdges","clusteredNode","deletedNodeIds","deletedEdgeIds","eachClusterNode","endPointsValid","replacedIds","numValid","containedEdgeId","containedEdge","deletedEdgeId","_filter","shouldBeClustered","_isClusteredNode","_isClusteredEdge","clusterFrom","_getClusterNodeForNode","clusterTo","changed","continueLoop","clustersToOpen","numNodes","allowSingle","openCluster","_updateState","_initRequestAnimationFrame","mozRequestAnimationFrame","webkitRequestAnimationFrame","msRequestAnimationFrame","CanvasRenderer","redrawRequested","renderingActive","renderRequests","allowRedraw","dragging","zooming","hideEdgesOnDrag","hideEdgesOnZoom","hideNodesOnDrag","_determineBrowserMethod","zoomTimeoutId","_requestRedraw","_resizeNodes","_redraw","_startRendering","cancelAnimationFrame","timer","myWindow","_requestNextFrame","_renderStep","frame","setSize","setTransform","clientHeight","clearRect","translation","_drawEdges","_drawNodes","alwaysShow","topLeft","DOMtoCanvas","bottomRight","viewableArea","isSelected","isBoundingBoxOverlappingWith","browserType","inputHandler","isFirst","isFinal","offTouch","pinchRecognizer","TOUCH_ACTION_PAN_Y","getTouchAction","Canvas","pixelRatio","resizeTimer","resizeFunction","_onResize","cameraState","canvasViewCenter","autoResize","hammerFrame","_cleanUp","setInterval","clearInterval","previousWidth","previousHeight","widthRatio","heightRatio","newScale","currentViewCenter","distanceFromCenter","tabIndex","noCanvas","fontWeight","padding","innerHTML","_setPixelRatio","_bindHammer","drag","pinch","enable","DIRECTION_ALL","hammerUtil","onTouch","eventListeners","onTap","onDoubleTap","onHold","onDragStart","onDrag","onDragEnd","onPinch","onMouseWheel","onMouseMove","onContext","onRelease","_prepareValue","emitEvent","oldWidth","oldHeight","previousRatio","_getCameraState","newWidth","newHeight","_setCameraState","numerator","devicePixelRatio","denominator","webkitBackingStorePixelRatio","mozBackingStorePixelRatio","msBackingStorePixelRatio","oBackingStorePixelRatio","backingStorePixelRatio","_determinePixelRatio","_XconvertCanvasToDOM","_YconvertCanvasToDOM","_XconvertDOMtoCanvas","_YconvertDOMtoCanvas","View","animationSpeed","renderRefreshRate","animationEasingFunction","easingTime","sourceScale","targetScale","sourceTranslation","targetTranslation","lockedOnNodeId","lockedOnNodeOffset","touchTime","releaseNode","initialZoom","zoomLevel","positionDefined","getRange","numberOfNodes","xDistance","yDistance","xZoomLevel","yZoomLevel","center","findCenter","animationOptions","animation","nodePosition","lockedOnNode","getViewPosition","easingFunction","animateView","locked","_transitionRedraw","viewCenter","_lockedRedraw","finished","progress","NavigationHandler","iconsCreated","navigationHammers","boundFunctions","activated","configureKeyboardBindings","navigationButtons","loadNavigationElements","cleanNavigation","navigationDOM","navigationDivs","navigationDivActions","_fit","bindToRedraw","_stopMovement","boundAction","keyboard","speed","scaleOld","zoom","scaleFrac","tx","ty","pointer","bindToWindow","unbindFromRedraw","Popup","overflowMethod","content","doShow","maxHeight","isLeft","isTop","hide","InteractionHandler","selectionHandler","navigationHandler","popup","popupObj","popupTimer","getPointer","dragNodes","dragView","tooltipDelay","zoomView","zoomSpeed","tooltip","touch","pinched","multiselect","changedPointers","ctrlKey","metaKey","checkSelectionChanges","_generateClickEvent","clientX","clientY","previousSelection","getSelection","selectAdditionalOnPoint","selectOnPoint","currentSelection","deselectedItems","_determineDifference","selectedItems","firstSet","secondSet","arrayDiff","firstArr","secondArr","getNodeAt","selection","unselectAll","selectObject","selectionObj","xFixed","yFixed","deltaX","deltaY","diffX","diffY","preScaleDragPointer","postScaleDragPointer","canvasToDOM","delta","wheelDelta","detail","popupVisible","_checkHidePopup","setPosition","show","focus","_checkShowPopup","hoverObject","pointerObj","previousPopupObjId","nodeUnderCursor","popupType","overlappingNodes","getTitle","overlappingEdges","popupTargetType","popupTargetId","setText","_pointerToPositionObject","stillOnObj","overNode","SelectionHandler","hoverObj","selectable","selectConnectedEdges","hoverConnectedEdges","updateSelection","getEdgeAt","selectionChanged","deselectObject","DOM","eventType","oldSelection","emptySelection","_initBaseEvent","getClickedItems","controlEdge","highlightEdges","_selectConnectedEdges","select","_addToSelection","_removeFromSelection","canvasPos","returnNode","positionObject","_getAllNodesOverlappingWith","_getEdgesOverlappingWith","returnEdge","mindist","overlappingEdge","_unselectConnectedEdges","unselect","clusterSize","_addToHover","hoverChanged","emitBlurEvent","hoveredEdgesCount","hoveredNodesCount","newOnlyHoveredEdge","newOnlyHoveredNode","emitHoverEvent","_hoverConnectedEdges","getSelectedNodes","edgeIds","getSelectedEdges","idArray","RangeError","setSelection","getItemsOnPoint","__esModule","DEFAULT_MIN_MERGE","DEFAULT_MIN_GALLOPING","DEFAULT_TMP_STORAGE_LENGTH","POWERS_OF_TEN","log10","alphabeticalCompare","al","bl","aStr","bStr","minRunLength","makeAscendingRun","lo","hi","runHi","reverseRun","binaryInsertionSort","start","pivot","mid","gallopLeft","hint","lastOffset","maxOffset","gallopRight","TimSort","minGallop","tmpStorageLength","stackLength","runStart","runLength","stackSize","pushRun","mergeRuns","mergeAt","forceMergeRuns","start1","length1","start2","length2","mergeLow","mergeHigh","cursor1","cursor2","dest","count1","count2","exit","customCursor","customDest","remaining","ts","minRun","DirectionInterface","abstract","fake_use","nodeArray","VerticalStrategy","layout","hierarchical","addToOrdering","getTreeSize","min_x","max_x","levelSeparation","HorizontalStrategy","min_y","max_y","HierarchicalStatus","childrenReference","parentReference","trees","distributionOrdering","levels","distributionIndex","isTree","treeIndex","treeId","accumulator","_getMaxLevel","nodeA","nodeB","minLevel","parents1","parents2","curLevel","LayoutEngine","initialRandomSeed","setPhysics","optionsBackup","improvedLayout","nodeSpacing","treeSpacing","blockShifting","edgeMinimization","parentCentralization","sortMethod","setupHierarchicalLayout","layoutNetwork","curveType","prevHierarchicalState","setDirectionStrategy","adaptAllOptionsForHierarchicalLayout","backupPhysics","indices","MAX_LEVELS","clusterThreshold","clusterOptions","startLength","before","modules","clustering","clusterBridges","clusterOutliers","after","_declusterAll","info","kamadaKawai","_shiftToCenter","getRangeCore","clustersPresent","definedLevel","undefinedLevel","lastNodeOnLevel","_determineLevelsByHubsize","_determineLevelsDirected","_determineLevelsCustomCallback","ensureLevel","distribution","_getDistribution","_generateMap","_placeNodesByHierarchy","_condenseHierarchy","stillShifting","branches","shiftTrees","treeSizes","getTreeSizes","shiftBy","shiftTree","treeWidths","numTrees","getBranchNodes","getBranchBoundary","branchMap","maxLevel","minSpace","maxSpace","branchNode","getPosition","_getSpaceAroundNode","minSpaceNode","maxSpaceNode","getCollisionLevel","maxLevel1","getMaxLevel","maxLevel2","shiftElementsCloser","centerParents","hier","levelNodes","hasSameParent","inSameSubNetwork","branchShiftCallback","centerParent","diffAbs","branchNodes1","branchNodes2","branchNodeBoundary1","branchNodeBoundary2","max1","min2","minSpace2","diffBranch","_shiftBlock","_centerParent","minimizeEdgeLength","allEdges","nodeLevel","C2","referenceNodes","aboveEdges","getFx","sum","getDFx","getGuess","guess","guessMap","dfx","ratio","moveBranch","branchNodes","branchBoundary","minSpaceBranch","maxSpaceBranch","branchOffset","moveNode","newPosition","minimizeEdgeLengthBottomUp","getLevels","shiftBranchesCloserBottomUp","centerAllParents","centerAllParentsBottomUp","useMap","prevNode","prevPos","nextNode","nextPos","parents","parentId","_getCenterPosition","positionedNodes","_indexArrayToNodes","handledNodeCount","_validatePositionAndContinue","parentLevel","childRef","childNodeLevel","previousPos","sharedParent","_findCommonParent","withChild","_placeBranchNodes","fix","hubSizes","hubSize","_getActiveEdges","levelDownstream","_getHubSizes","_crawlNetwork","customCallback","levelByDirection","levelA","setMinLevelToZero","isBidirectional","otherEdge","levelB","fillInRelations","addRelation","checkIfTree","startingNodeId","crawler","tree","setTreeIndex","shifter","childA","childB","iterateParents","parentRef","findParent","foundParent","isVertical","minPos","maxPos","ManipulationSystem","editMode","manipulationDiv","editModeDiv","closeDiv","manipulationHammers","temporaryUIFunctions","temporaryEventFunctions","temporaryIds","guiEnabled","inMode","selectedControlNode","initiallyActive","deleteNode","deleteEdge","controlNodeStyle","_clean","_restore","enableEditMode","disableEditMode","_setup","showManipulatorToolbar","_createEditButton","manipulationDOM","selectedNodeCount","_getSelectedNodeCount","selectedEdgeCount","_getSelectedEdgeCount","selectedTotalCount","needSeperator","_createAddNodeButton","_createSeperator","_createAddEdgeButton","_createEditNodeButton","_createEditEdgeButton","_createDeleteButton","_bindHammerToDiv","toggleEditMode","_temporaryBindEvent","_createBackButton","_createDescription","_performAddNode","_getSelectedNode","finalizedData","alert","_temporaryBindUI","_handleConnect","_finishConnect","_dragControlNode","_dragStartEdge","editWithoutDrag","edgeBeingEditedId","_performEditEdge","controlNodeFrom","_getNewTargetNode","controlNodeTo","_controlNodeTouch","_controlNodeDragStart","_controlNodeDrag","_controlNodeDragEnd","findBorderPositions","selectedNodes","selectedEdges","deleteFunction","_createWrappers","_removeManipulationDOM","button","_createButton","_cleanManipulatorHammers","_cleanupTemporaryNodesAndEdges","_unbindTemporaryUIs","_unbindTemporaryEvents","addNodeMode","addEdgeMode","editEdgeMode","deleteBtnClass","rtl","deleteSelected","labelClassName","newFunction","boundFunction","UIfunctionName","functionName","eventName","domElement","indexTempEdge","indexTempNode","lastTouch","fromSelect","toSelect","overlappingNodeIds","targetNode","connectionEdge","connectFromId","_performAddEdge","clickData","defaultData","sourceNodeId","targetNodeId","eeFunct","htmlColors","black","navy","darkblue","mediumblue","darkgreen","teal","darkcyan","deepskyblue","darkturquoise","mediumspringgreen","lime","springgreen","aqua","cyan","midnightblue","dodgerblue","lightseagreen","forestgreen","seagreen","darkslategray","limegreen","mediumseagreen","turquoise","royalblue","steelblue","darkslateblue","mediumturquoise","indigo","darkolivegreen","cadetblue","cornflowerblue","mediumaquamarine","dimgray","slateblue","olivedrab","slategray","lightslategray","mediumslateblue","lawngreen","chartreuse","aquamarine","maroon","purple","olive","gray","skyblue","lightskyblue","blueviolet","darkred","darkmagenta","saddlebrown","darkseagreen","lightgreen","mediumpurple","darkviolet","palegreen","darkorchid","yellowgreen","sienna","brown","darkgray","lightblue","greenyellow","paleturquoise","lightsteelblue","powderblue","firebrick","darkgoldenrod","mediumorchid","rosybrown","darkkhaki","silver","mediumvioletred","indianred","peru","chocolate","tan","lightgrey","palevioletred","thistle","orchid","goldenrod","crimson","gainsboro","plum","burlywood","lightcyan","lavender","darksalmon","violet","palegoldenrod","lightcoral","khaki","aliceblue","honeydew","azure","sandybrown","wheat","beige","whitesmoke","mintcream","ghostwhite","salmon","antiquewhite","linen","lightgoldenrodyellow","oldlace","fuchsia","magenta","deeppink","orangered","tomato","hotpink","coral","darkorange","lightsalmon","orange","lightpink","pink","gold","peachpuff","navajowhite","moccasin","bisque","mistyrose","blanchedalmond","papayawhip","lavenderblush","seashell","cornsilk","lemonchiffon","floralwhite","snow","yellow","lightyellow","ivory","white","ColorPicker","generated","centerCoordinates","hueCircle","initialColor","previousColor","applied","updateCallback","closeCallback","_create","_setSize","setInitial","htmlColor","_isColorString","rgbaArray","rgbObj","alpha","_setColor","_generateHueCircle","storePrevious","_updatePicker","setColor","angleConvert","colorPickerSelector","colorPickerCanvas","pixelRation","putImageData","brightnessRange","opacityRange","initialColorDiv","newColorDiv","colorPickerDiv","opacityDiv","brightnessDiv","arrowDiv","onchange","_setOpacity","oninput","_setBrightness","brightnessLabel","opacityLabel","cancelButton","onclick","applyButton","_apply","saveButton","_save","loadButton","_loadLast","_moveSelector","sat","hfac","sfac","getImageData","newTop","newLeft","Configurator","parentModule","defaultContainer","configureOptions","changedOptions","allowCreation","popupCounter","showButton","moduleOptions","domElements","popupDiv","popupLimit","popupHistory","colorPicker","wrapper","_removePopup","_handleObject","_makeItem","_makeHeader","_makeButton","_push","_showPopupIfNeeded","div","objectLabel","selectedValue","_update","_makeLabel","step","popupString","popupValue","itemIndex","_setupPopup","generateButton","_printOptions","onmouseover","onmouseout","optionsContainer","html","hideTimeout","deleteTimeout","correspondingElement","checkbox","checked","_showColorPicker","insertTo","setUpdateCallback","colorString","setCloseCallback","checkOnly","visibleInSet","subObj","newPath","_getValue","_handleArray","_makeTextInput","_makeCheckbox","enabledPath","enabledValue","_makeColorField","_makeDropdown","_makeRange","_constructOptions","getOptions","bool","any","endPoints","configure","boolean","maximum","interaction","manipulation","minimum","clickToUse","FloydWarshall","edgesArray","D_matrix","cell","knode","kcolm","inode","icolm","jnode","jcolm","KamadaKawai","edgeStrength","distanceSolver","ignoreClusters","getDistances","_createL_matrix","_createK_matrix","_createE_matrix","innerThreshold","maxInnerIterations","maxEnergy","highE_nodeId","dE_dx","dE_dy","delta_m","subIterations","_getHighestEnergyNode","_moveNode","_getEnergy","maxEnergyNodeId","dE_dx_max","dE_dy_max","nodeIdx","E_sums","d2E_dx2","d2E_dxdy","d2E_dy2","x_m","y_m","km","K_matrix","lm","L_matrix","iIdx","x_i","y_i","kmat","lmat","_updateE_matrix","E_matrix","mIdx","colm","lcolm","oldDx","oldDy","Network","interactionHandler","renderer","nodesHandler","edgesHandler","validate","configurator","networkOptions","setModuleOptions","activator","_updateVisibleIndices","edgeNodesPresent","isVisible","_updateValueRange","dotparser","gephi","gephiData","gephiParser","valueMin","valueMax","valueTotal","setValueRange","isActive","cluster","getNodesInCluster","clusterByHubsize","getSeed","editNodeMode","getPositions","storePositions","getBoundingBox","getConnectedNodes","objectId","getConnectedEdges","selectNodes","selectEdges","redraw","getScale","getOptionsFromConfigurator","JSONcontainer","elementType","redundant","used","prepareElements","cleanupElements","svgContainer","createElementNS","DOMContainer","insertBefore","groupTemplate","labelObj","getSVGElement","setAttributeNS","xOffset","yOffset","textContent","require","network","convertDot","convertGephi"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAIA,cAAc,GAAG,OAAOC,UAAP,KAAsB,WAAtB,GAAoCA,UAApC,GAAiD,OAAOC,MAAP,KAAkB,WAAlB,GAAgCA,MAAhC,GAAyC,OAAOC,MAAP,KAAkB,WAAlB,GAAgCA,MAAhC,GAAyC,OAAOC,IAAP,KAAgB,WAAhB,GAA8BA,IAA9B,GAAqC,EAA7L;;AAEA,SAASC,eAAT,GAA4B;QACrB,IAAIC,KAAJ,CAAU,wEAAV,CAAN;;;AAGD,SAASC,oBAAT,CAA8BC,EAA9B,EAAkCC,MAAlC,EAA0C;SAClCA,MAAM,GAAG;IAAEC,OAAO,EAAE;GAApB,EAA0BF,EAAE,CAACC,MAAD,EAASA,MAAM,CAACC,OAAhB,CAA5B,EAAsDD,MAAM,CAACC,OAApE;;;AAGD,IAAIC,OAAO,GAAGJ,oBAAoB,CAAC,UAAUE,MAAV,EAAkB;;MAE/CN,MAAM,GAAGM,MAAM,CAACC,OAAP,GAAiB,OAAOR,MAAP,IAAiB,WAAjB,IAAgCA,MAAM,CAACU,IAAP,IAAeA,IAA/C,GAAsDV,MAAtD,GAA+D,OAAOE,IAAP,IAAe,WAAf,IAA8BA,IAAI,CAACQ,IAAL,IAAaA,IAA3C,GAAkDR,IAAlD;IAC3FS,QAAQ,CAAC,aAAD,CAAR,EADF;MAEI,OAAOC,GAAP,IAAc,QAAlB,EAA4BA,GAAG,GAAGX,MAAN,CAJuB;CAAnB,CAAlC;;AAOA,IAA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,UAAU,EAAE5C,YALS;EAMrB6C,YAAY,EAAE39D;CANT;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/node_modules/vis-network/dist/vis-network.esm.min.js b/node_modules/vis-network/dist/vis-network.esm.min.js new file mode 100644 index 0000000000000000000000000000000000000000..b36f8201cc3d6aec69f03ec076788ffdccc585dd --- /dev/null +++ b/node_modules/vis-network/dist/vis-network.esm.min.js @@ -0,0 +1,26 @@ +/** + * vis-network - network + * http://visjs.org/ + * + * A dynamic, browser-based visualization library. + * + * @version 5.2.4 + * @date 2019-08-18T08:11:56Z + * + * @copyright (c) 2011-2017 Almende B.V, http://almende.com + * @copyright (c) 2018-2019 visjs contributors, https://github.com/visjs + * + * @license + * vis.js is dual licensed under both + * + * 1. The Apache 2.0 License + * http://www.apache.org/licenses/LICENSE-2.0 + * + * and + * + * 2. The MIT License + * http://opensource.org/licenses/MIT + * + * vis.js may be distributed under either license. + */var commonjsGlobal="undefined"==typeof globalThis?"undefined"==typeof window?"undefined"==typeof global?"undefined"==typeof self?{}:self:global:window:globalThis;function commonjsRequire(){throw new Error("Dynamic requires are not currently supported by rollup-plugin-commonjs")}function createCommonjsModule(e,t){return t={exports:{}},e(t,t.exports),t.exports}var _global=createCommonjsModule(function(e){var t=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=t)}),_core=createCommonjsModule(function(e){var t=e.exports={version:"2.6.9"};"number"==typeof __e&&(__e=t)}),_core_1=_core.version,_library=!1,_shared=createCommonjsModule(function(e){var t=_global["__core-js_shared__"]||(_global["__core-js_shared__"]={});(e.exports=function(e,o){return t[e]||(t[e]=o===void 0?{}:o)})("versions",[]).push({version:_core.version,mode:"global",copyright:"\xA9 2019 Denis Pushkarev (zloirock.ru)"})}),id=0,px=Math.random(),_uid=function(e){return"Symbol(".concat(e===void 0?"":e,")_",(++id+px).toString(36))},_wks=createCommonjsModule(function(e){var t=_shared("wks"),o=_global.Symbol,n="function"==typeof o,i=e.exports=function(e){return t[e]||(t[e]=n&&o[e]||(n?o:_uid)("Symbol."+e))};i.store=t}),f=_wks,_wksExt={f:f},_isObject=function(e){return"object"==typeof e?null!==e:"function"==typeof e},_anObject=function(e){if(!_isObject(e))throw TypeError(e+" is not an object!");return e},_fails=function(e){try{return!!e()}catch(t){return!0}},_descriptors=!_fails(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}),document$1=_global.document,is=_isObject(document$1)&&_isObject(document$1.createElement),_domCreate=function(e){return is?document$1.createElement(e):{}},_ie8DomDefine=!_descriptors&&!_fails(function(){return 7!=Object.defineProperty(_domCreate("div"),"a",{get:function(){return 7}}).a}),_toPrimitive=function(e,t){if(!_isObject(e))return e;var o,n;if(t&&"function"==typeof(o=e.toString)&&!_isObject(n=o.call(e)))return n;if("function"==typeof(o=e.valueOf)&&!_isObject(n=o.call(e)))return n;if(!t&&"function"==typeof(o=e.toString)&&!_isObject(n=o.call(e)))return n;throw TypeError("Can't convert object to primitive value")},dP=Object.defineProperty,f$1=_descriptors?Object.defineProperty:function(e,t,o){if(_anObject(e),t=_toPrimitive(t,!0),_anObject(o),_ie8DomDefine)try{return dP(e,t,o)}catch(t){}if("get"in o||"set"in o)throw TypeError("Accessors not supported!");return"value"in o&&(e[t]=o.value),e},_objectDp={f:f$1},defineProperty=_objectDp.f,_wksDefine=function(e){var t=_core.Symbol||(_core.Symbol=_global.Symbol||{});"_"==e.charAt(0)||e in t||defineProperty(t,e,{value:_wksExt.f(e)})};_wksDefine("asyncIterator");var hasOwnProperty={}.hasOwnProperty,_has=function(e,t){return hasOwnProperty.call(e,t)},_propertyDesc=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},_hide=_descriptors?function(e,t,o){return _objectDp.f(e,t,_propertyDesc(1,o))}:function(e,t,o){return e[t]=o,e},_functionToString=_shared("native-function-to-string",Function.toString),_redefine=createCommonjsModule(function(e){var t=_uid("src"),o="toString",n=(""+_functionToString).split(o);_core.inspectSource=function(e){return _functionToString.call(e)},(e.exports=function(e,o,i,a){var d="function"==typeof i;d&&(_has(i,"name")||_hide(i,"name",o));e[o]===i||(d&&(_has(i,t)||_hide(i,t,e[o]?""+e[o]:n.join(o+""))),e===_global?e[o]=i:a?e[o]?e[o]=i:_hide(e,o,i):(delete e[o],_hide(e,o,i)))})(Function.prototype,o,function(){return"function"==typeof this&&this[t]||_functionToString.call(this)})}),_aFunction=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e},_ctx=function(e,t,o){return(_aFunction(e),void 0===t)?e:1===o?function(o){return e.call(t,o)}:2===o?function(o,n){return e.call(t,o,n)}:3===o?function(o,n,i){return e.call(t,o,n,i)}:function(){return e.apply(t,arguments)}},PROTOTYPE="prototype",$export=function(e,t,o){var n=e&$export.F,i=e&$export.G,a=e&$export.S,d=e&$export.P,s=e&$export.B,r=i?_global:a?_global[t]||(_global[t]={}):(_global[t]||{})[PROTOTYPE],l=i?_core:_core[t]||(_core[t]={}),c=l[PROTOTYPE]||(l[PROTOTYPE]={}),u,p,h,m;for(u in i&&(o=t),o)p=!n&&r&&void 0!==r[u],h=(p?r:o)[u],m=s&&p?_ctx(h,_global):d&&"function"==typeof h?_ctx(Function.call,h):h,r&&_redefine(r,u,h,e&$export.U),l[u]!=h&&_hide(l,u,m),d&&c[u]!=h&&(c[u]=h)};_global.core=_core,$export.F=1,$export.G=2,$export.S=4,$export.P=8,$export.B=16,$export.W=32,$export.U=64,$export.R=128;var _export=$export,_meta=createCommonjsModule(function(e){var t=_uid("meta"),o=_objectDp.f,n=0,i=Object.isExtensible||function(){return!0},a=!_fails(function(){return i(Object.preventExtensions({}))}),d=function(e){o(e,t,{value:{i:"O"+ ++n,w:{}}})},s=e.exports={KEY:t,NEED:!1,fastKey:function(e,o){if(!_isObject(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!_has(e,t)){if(!i(e))return"F";if(!o)return"E";d(e)}return e[t].i},getWeak:function(e,o){if(!_has(e,t)){if(!i(e))return!0;if(!o)return!1;d(e)}return e[t].w},onFreeze:function(e){return a&&s.NEED&&i(e)&&!_has(e,t)&&d(e),e}}}),_meta_1=_meta.KEY,_meta_2=_meta.NEED,_meta_3=_meta.fastKey,_meta_4=_meta.getWeak,_meta_5=_meta.onFreeze,def=_objectDp.f,TAG=_wks("toStringTag"),_setToStringTag=function(e,t,o){e&&!_has(e=o?e:e.prototype,TAG)&&def(e,TAG,{configurable:!0,value:t})},toString={}.toString,_cof=function(e){return toString.call(e).slice(8,-1)},_iobject=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==_cof(e)?e.split(""):Object(e)},_defined=function(e){if(e==null)throw TypeError("Can't call method on "+e);return e},_toIobject=function(e){return _iobject(_defined(e))},ceil=Math.ceil,floor=Math.floor,_toInteger=function(e){return isNaN(e=+e)?0:(0e?max(e+t,0):min$1(e,t)},_arrayIncludes=function(e){return function(t,o,n){var i=_toIobject(t),a=_toLength(i.length),d=_toAbsoluteIndex(n,a),s;if(e&&o!=o){for(;a>d;)if(s=i[d++],s!=s)return!0;}else for(;a>d;d++)if((e||d in i)&&i[d]===o)return e||d||0;return!e&&-1}},shared=_shared("keys"),_sharedKey=function(e){return shared[e]||(shared[e]=_uid(e))},arrayIndexOf=_arrayIncludes(!1),IE_PROTO=_sharedKey("IE_PROTO"),_objectKeysInternal=function(e,t){var o=_toIobject(e),n=0,a=[],d;for(d in o)d!=IE_PROTO&&_has(o,d)&&a.push(d);for(;t.length>n;)_has(o,d=t[n++])&&(~arrayIndexOf(a,d)||a.push(d));return a},_enumBugKeys=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],_objectKeys=Object.keys||function(e){return _objectKeysInternal(e,_enumBugKeys)},f$2=Object.getOwnPropertySymbols,_objectGops={f:f$2},f$3={}.propertyIsEnumerable,_objectPie={f:f$3},_enumKeys=function(e){var t=_objectKeys(e),o=_objectGops.f;if(o)for(var n=o(e),a=_objectPie.f,d=0,s;n.length>d;)a.call(e,s=n[d++])&&t.push(s);return t},_isArray=Array.isArray||function(e){return"Array"==_cof(e)},_toObject=function(e){return Object(_defined(e))},_objectDps=_descriptors?Object.defineProperties:function(e,t){_anObject(e);for(var o=_objectKeys(t),n=o.length,a=0,d;n>a;)_objectDp.f(e,d=o[a++],t[d]);return e},document$2=_global.document,_html=document$2&&document$2.documentElement,IE_PROTO$1=_sharedKey("IE_PROTO"),Empty=function(){},PROTOTYPE$1="prototype",createDict=function(){var e=_domCreate("iframe"),t=_enumBugKeys.length,o="<",n=">",a;for(e.style.display="none",_html.appendChild(e),e.src="javascript:",a=e.contentWindow.document,a.open(),a.write(o+"script"+n+"document.F=Object"+o+"/script"+n),a.close(),createDict=a.F;t--;)delete createDict[PROTOTYPE$1][_enumBugKeys[t]];return createDict()},_objectCreate=Object.create||function(e,t){var o;return null===e?o=createDict():(Empty[PROTOTYPE$1]=_anObject(e),o=new Empty,Empty[PROTOTYPE$1]=null,o[IE_PROTO$1]=e),void 0===t?o:_objectDps(o,t)},hiddenKeys=_enumBugKeys.concat("length","prototype"),f$4=Object.getOwnPropertyNames||function(e){return _objectKeysInternal(e,hiddenKeys)},_objectGopn={f:f$4},gOPN=_objectGopn.f,toString$1={}.toString,windowNames="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],getWindowNames=function(e){try{return gOPN(e)}catch(t){return windowNames.slice()}},f$5=function(e){return windowNames&&"[object Window]"==toString$1.call(e)?getWindowNames(e):gOPN(_toIobject(e))},_objectGopnExt={f:f$5},gOPD=Object.getOwnPropertyDescriptor,f$6=_descriptors?gOPD:function(e,t){if(e=_toIobject(e),t=_toPrimitive(t,!0),_ie8DomDefine)try{return gOPD(e,t)}catch(t){}return _has(e,t)?_propertyDesc(!_objectPie.f.call(e,t),e[t]):void 0},_objectGopd={f:f$6},META=_meta.KEY,gOPD$1=_objectGopd.f,dP$1=_objectDp.f,gOPN$1=_objectGopnExt.f,$Symbol=_global.Symbol,$JSON=_global.JSON,_stringify=$JSON&&$JSON.stringify,PROTOTYPE$2="prototype",HIDDEN=_wks("_hidden"),TO_PRIMITIVE=_wks("toPrimitive"),isEnum={}.propertyIsEnumerable,SymbolRegistry=_shared("symbol-registry"),AllSymbols=_shared("symbols"),OPSymbols=_shared("op-symbols"),ObjectProto=Object[PROTOTYPE$2],USE_NATIVE="function"==typeof $Symbol&&!!_objectGops.f,QObject=_global.QObject,setter=!QObject||!QObject[PROTOTYPE$2]||!QObject[PROTOTYPE$2].findChild,setSymbolDesc=_descriptors&&_fails(function(){return 7!=_objectCreate(dP$1({},"a",{get:function(){return dP$1(this,"a",{value:7}).a}})).a})?function(e,t,o){var n=gOPD$1(ObjectProto,t);n&&delete ObjectProto[t],dP$1(e,t,o),n&&e!==ObjectProto&&dP$1(ObjectProto,t,n)}:dP$1,wrap=function(e){var t=AllSymbols[e]=_objectCreate($Symbol[PROTOTYPE$2]);return t._k=e,t},isSymbol=USE_NATIVE&&"symbol"==typeof $Symbol.iterator?function(e){return"symbol"==typeof e}:function(e){return e instanceof $Symbol},$defineProperty=function(e,t,o){return e===ObjectProto&&$defineProperty(OPSymbols,t,o),_anObject(e),t=_toPrimitive(t,!0),_anObject(o),_has(AllSymbols,t)?(o.enumerable?(_has(e,HIDDEN)&&e[HIDDEN][t]&&(e[HIDDEN][t]=!1),o=_objectCreate(o,{enumerable:_propertyDesc(0,!1)})):(!_has(e,HIDDEN)&&dP$1(e,HIDDEN,_propertyDesc(1,{})),e[HIDDEN][t]=!0),setSymbolDesc(e,t,o)):dP$1(e,t,o)},$defineProperties=function(e,t){_anObject(e);for(var o=_enumKeys(t=_toIobject(t)),n=0,a=o.length,d;a>n;)$defineProperty(e,d=o[n++],t[d]);return e},$create=function(e,t){return t===void 0?_objectCreate(e):$defineProperties(_objectCreate(e),t)},$propertyIsEnumerable=function(e){var t=isEnum.call(this,e=_toPrimitive(e,!0));return(this!==ObjectProto||!_has(AllSymbols,e)||_has(OPSymbols,e))&&(!(t||!_has(this,e)||!_has(AllSymbols,e)||_has(this,HIDDEN)&&this[HIDDEN][e])||t)},$getOwnPropertyDescriptor=function(e,t){if(e=_toIobject(e),t=_toPrimitive(t,!0),e!==ObjectProto||!_has(AllSymbols,t)||_has(OPSymbols,t)){var o=gOPD$1(e,t);return o&&_has(AllSymbols,t)&&!(_has(e,HIDDEN)&&e[HIDDEN][t])&&(o.enumerable=!0),o}},$getOwnPropertyNames=function(e){for(var t=gOPN$1(_toIobject(e)),o=[],n=0,a;t.length>n;)_has(AllSymbols,a=t[n++])||a==HIDDEN||a==META||o.push(a);return o},$getOwnPropertySymbols=function(e){for(var t=e===ObjectProto,o=gOPN$1(t?OPSymbols:_toIobject(e)),n=[],a=0,d;o.length>a;)_has(AllSymbols,d=o[a++])&&(!t||_has(ObjectProto,d))&&n.push(AllSymbols[d]);return n};USE_NATIVE||($Symbol=function(){if(this instanceof $Symbol)throw TypeError("Symbol is not a constructor!");var e=_uid(0j;)_wks(es6Symbols[j++]);for(var wellKnownSymbols=_objectKeys(_wks.store),k=0;wellKnownSymbols.length>k;)_wksDefine(wellKnownSymbols[k++]);_export(_export.S+_export.F*!USE_NATIVE,"Symbol",{for:function(e){return _has(SymbolRegistry,e+="")?SymbolRegistry[e]:SymbolRegistry[e]=$Symbol(e)},keyFor:function(e){if(!isSymbol(e))throw TypeError(e+" is not a symbol!");for(var t in SymbolRegistry)if(SymbolRegistry[t]===e)return t},useSetter:function(){setter=!0},useSimple:function(){setter=!1}}),_export(_export.S+_export.F*!USE_NATIVE,"Object",{create:$create,defineProperty:$defineProperty,defineProperties:$defineProperties,getOwnPropertyDescriptor:$getOwnPropertyDescriptor,getOwnPropertyNames:$getOwnPropertyNames,getOwnPropertySymbols:$getOwnPropertySymbols});var FAILS_ON_PRIMITIVES=_fails(function(){_objectGops.f(1)});_export(_export.S+_export.F*FAILS_ON_PRIMITIVES,"Object",{getOwnPropertySymbols:function(e){return _objectGops.f(_toObject(e))}}),$JSON&&_export(_export.S+_export.F*(!USE_NATIVE||_fails(function(){var e=$Symbol();return"[null]"!=_stringify([e])||"{}"!=_stringify({a:e})||"{}"!=_stringify(Object(e))})),"JSON",{stringify:function(e){for(var t=[e],o=1,n,a;arguments.length>o;)t.push(arguments[o++]);if(a=n=t[1],(_isObject(n)||void 0!==e)&&!isSymbol(e))return _isArray(n)||(n=function(e,t){if("function"==typeof a&&(t=a.call(this,e,t)),!isSymbol(t))return t}),t[1]=n,_stringify.apply($JSON,t)}}),$Symbol[PROTOTYPE$2][TO_PRIMITIVE]||_hide($Symbol[PROTOTYPE$2],TO_PRIMITIVE,$Symbol[PROTOTYPE$2].valueOf),_setToStringTag($Symbol,"Symbol"),_setToStringTag(Math,"Math",!0),_setToStringTag(_global.JSON,"JSON",!0);function _typeof(e){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_typeof(e)}function _defineProperty(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function ownKeys(e,t){var o=Object.keys(e);return Object.getOwnPropertySymbols&&o.push.apply(o,Object.getOwnPropertySymbols(e)),t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),o}function _objectSpread2(e){for(var t=1,o;td||d>=i?e?"":void 0:(s=n.charCodeAt(d),55296>s||56319(r=n.charCodeAt(d+1))||57343")}),SPLIT_WORKS_WITH_OVERWRITTEN_EXEC=function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var o="ab".split(e);return 2===o.length&&"a"===o[0]&&"b"===o[1]}(),_fixReWks=function(e,t,o){var n=_wks(e),i=!_fails(function(){var t={};return t[n]=function(){return 7},7!=""[e](t)}),a=i?!_fails(function(){var t=!1,o=/a/;return o.exec=function(){return t=!0,null},"split"===e&&(o.constructor={},o.constructor[SPECIES]=function(){return o}),o[n](""),!t}):void 0;if(!i||!a||"replace"===e&&!REPLACE_SUPPORTS_NAMED_GROUPS||"split"===e&&!SPLIT_WORKS_WITH_OVERWRITTEN_EXEC){var d=/./[n],s=o(_defined,n,""[e],function(e,t,o,n,a){return t.exec===_regexpExec?i&&!a?{done:!0,value:d.call(t,o,n)}:{done:!0,value:e.call(o,t,n)}:{done:!1}}),r=s[0],l=s[1];_redefine(String.prototype,e,r),_hide(RegExp.prototype,n,2==t?function(e,t){return l.call(e,this,t)}:function(e){return l.call(e,this)})}},max$1=Math.max,min$2=Math.min,floor$1=Math.floor,SUBSTITUTION_SYMBOLS=/\$([$&`']|\d\d?|<[^>]*>)/g,SUBSTITUTION_SYMBOLS_NO_NAMED=/\$([$&`']|\d\d?)/g,maybeToString=function(e){return e===void 0?e:e+""};_fixReWks("replace",2,function(e,t,o,n){function a(e,t,i,a,d,s){var r=i+e.length,l=a.length,n=SUBSTITUTION_SYMBOLS_NO_NAMED;return void 0!==d&&(d=_toObject(d),n=SUBSTITUTION_SYMBOLS),o.call(s,n,function(o,s){var c;switch(s.charAt(0)){case"$":return"$";case"&":return e;case"`":return t.slice(0,i);case"'":return t.slice(r);case"<":c=d[s.slice(1,-1)];break;default:var u=+s;if(0==u)return o;if(u>l){var n=floor$1(u/10);return 0===n?o:n<=l?void 0===a[n-1]?s.charAt(1):a[n-1]+s.charAt(1):o}c=a[u-1];}return void 0===c?"":c})}return[function(n,i){var a=e(this),d=n==null?void 0:n[t];return d===void 0?o.call(a+"",n,i):d.call(n,a,i)},function(e,t){var d=n(o,e,this,t);if(d.done)return d.value;var s=_anObject(e),r=this+"",l="function"==typeof t;l||(t=t+"");var c=s.global;if(c){var u=s.unicode;s.lastIndex=0}for(var p=[],h;(h=_regexpExecAbstract(s,r),null!==h)&&!(p.push(h),!c);){var m=h[0]+"";""==m&&(s.lastIndex=_advanceStringIndex(r,_toLength(s.lastIndex),u))}for(var g="",y=0,f=0;f=y&&(g+=r.slice(y,_)+S,y=_+b.length)}return g+r.slice(y)}]});var UNSCOPABLES=_wks("unscopables"),ArrayProto=Array.prototype;ArrayProto[UNSCOPABLES]==null&&_hide(ArrayProto,UNSCOPABLES,{});var _addToUnscopables=function(e){ArrayProto[UNSCOPABLES][e]=!0},_iterStep=function(e,t){return{value:t,done:!!e}},_iterators={},IteratorPrototype={};_hide(IteratorPrototype,_wks("iterator"),function(){return this});var _iterCreate=function(e,t,o){e.prototype=_objectCreate(IteratorPrototype,{next:_propertyDesc(1,o)}),_setToStringTag(e,t+" Iterator")},IE_PROTO$2=_sharedKey("IE_PROTO"),ObjectProto$1=Object.prototype,_objectGpo=Object.getPrototypeOf||function(e){return e=_toObject(e),_has(e,IE_PROTO$2)?e[IE_PROTO$2]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?ObjectProto$1:null},ITERATOR=_wks("iterator"),BUGGY=!([].keys&&"next"in[].keys()),FF_ITERATOR="@@iterator",KEYS="keys",VALUES="values",returnThis=function(){return this},_iterDefine=function(e,t,o,n,i,a,d){_iterCreate(o,t,n);var s=function(e){return!BUGGY&&e in u?u[e]:e===KEYS?function(){return new o(this,e)}:e===VALUES?function(){return new o(this,e)}:function(){return new o(this,e)}},r=t+" Iterator",l=i==VALUES,c=!1,u=e.prototype,p=u[ITERATOR]||u[FF_ITERATOR]||i&&u[i],h=p||s(i),m=i?l?s("entries"):h:void 0,g="Array"==t?u.entries||p:p,y,f,b;if(g&&(b=_objectGpo(g.call(new e)),b!==Object.prototype&&b.next&&(_setToStringTag(b,r,!0),"function"!=typeof b[ITERATOR]&&_hide(b,ITERATOR,returnThis))),l&&p&&p.name!==VALUES&&(c=!0,h=function(){return p.call(this)}),(BUGGY||c||!u[ITERATOR])&&_hide(u,ITERATOR,h),_iterators[t]=h,_iterators[r]=returnThis,i)if(y={values:l?h:s(VALUES),keys:a?h:s(KEYS),entries:m},d)for(f in y)f in u||_redefine(u,f,y[f]);else _export(_export.P+_export.F*(BUGGY||c),t,y);return y},es6_array_iterator=_iterDefine(Array,"Array",function(e,t){this._t=_toIobject(e),this._i=0,this._k=t},function(){var e=this._t,t=this._k,o=this._i++;return!e||o>=e.length?(this._t=void 0,_iterStep(1)):"keys"==t?_iterStep(0,o):"values"==t?_iterStep(0,e[o]):_iterStep(0,[o,e[o]])},"values");_iterators.Arguments=_iterators.Array,_addToUnscopables("keys"),_addToUnscopables("values"),_addToUnscopables("entries");for(var ITERATOR$1=_wks("iterator"),TO_STRING_TAG=_wks("toStringTag"),ArrayValues=_iterators.Array,DOMIterables={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},collections=_objectKeys(DOMIterables),i=0;id;)r=n[d++],(!_descriptors||isEnum$1.call(o,r))&&s.push(e?[r,o[r]]:o[r]);return s}},$values=_objectToArray(!1);_export(_export.S,"Object",{values:function(e){return $values(e)}});var MATCH=_wks("match"),_isRegexp=function(e){var t;return _isObject(e)&&((t=e[MATCH])===void 0?"RegExp"==_cof(e):!!t)},SPECIES$1=_wks("species"),_speciesConstructor=function(e,t){var o=_anObject(e).constructor,n;return o===void 0||(n=_anObject(o)[SPECIES$1])==null?t:_aFunction(n)},$min=Math.min,$push=[].push,$SPLIT="split",LENGTH="length",LAST_INDEX$1="lastIndex",MAX_UINT32=4294967295,SUPPORTS_Y=!_fails(function(){RegExp(MAX_UINT32,"y")});_fixReWks("split",2,function(e,t,o,n){var a;return a="c"=="abbc"[$SPLIT](/(b)*/)[1]||4!="test"[$SPLIT](/(?:)/,-1)[LENGTH]||2!="ab"[$SPLIT](/(?:ab)*/)[LENGTH]||4!="."[$SPLIT](/(.?)(.?)/)[LENGTH]||1<"."[$SPLIT](/()()/)[LENGTH]||""[$SPLIT](/.?/)[LENGTH]?function(e,t){var n=this+"";if(void 0===e&&0===t)return[];if(!_isRegexp(e))return o.call(n,e,t);for(var i=[],a=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),d=0,s=void 0===t?MAX_UINT32:t>>>0,r=new RegExp(e.source,a+"g"),l,c,u;(l=_regexpExec.call(r,n))&&(c=r[LAST_INDEX$1],!(c>d&&(i.push(n.slice(d,l.index)),1=s)));)r[LAST_INDEX$1]===l.index&&r[LAST_INDEX$1]++;return d===n[LENGTH]?(u||!r.test(""))&&i.push(""):i.push(n.slice(d)),i[LENGTH]>s?i.slice(0,s):i}:"0"[$SPLIT](void 0,0)[LENGTH]?function(e,t){return void 0===e&&0===t?[]:o.call(this,e,t)}:o,[function(o,n){var i=e(this),d=null==o?void 0:o[t];return void 0===d?a.call(i+"",o,n):d.call(o,i,n)},function(t,d){var s=n(a,t,this,d,a!==o);if(s.done)return s.value;var r=_anObject(t),l=this+"",c=_speciesConstructor(r,RegExp),u=r.unicode,h=(r.ignoreCase?"i":"")+(r.multiline?"m":"")+(r.unicode?"u":"")+(SUPPORTS_Y?"y":"g"),m=new c(SUPPORTS_Y?r:"^(?:"+r.source+")",h),g=void 0===d?MAX_UINT32:d>>>0;if(0===g)return[];if(0===l.length)return null===_regexpExecAbstract(m,l)?[l]:[];for(var y=0,f=0,b=[];fn;)for(var d=_iobject(arguments[n++]),s=i?_objectKeys(d).concat(i(d)):_objectKeys(d),r=s.length,l=0,c;r>l;)c=s[l++],(!_descriptors||a.call(d,c))&&(t[c]=d[c]);return t}:$assign;_export(_export.S+_export.F,"Object",{assign:_objectAssign});var check=function(e,t){if(_anObject(e),!_isObject(t)&&null!==t)throw TypeError(t+": can't set as prototype!")},_setProto={set:Object.setPrototypeOf||("__proto__"in{}?function(e,t,o){try{o=_ctx(Function.call,_objectGopd.f(Object.prototype,"__proto__").set,2),o(e,[]),t=!(e instanceof Array)}catch(o){t=!0}return function(e,n){return check(e,n),t?e.__proto__=n:o(e,n),e}}({},!1):void 0),check:check},setPrototypeOf=_setProto.set,_inheritIfRequired=function(e,t,o){var n=t.constructor,i;return n!==o&&"function"==typeof n&&(i=n.prototype)!==o.prototype&&_isObject(i)&&setPrototypeOf&&setPrototypeOf(e,i),e},_stringWs="\t\n\x0B\f\r \xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF",space="["+_stringWs+"]",non="\u200B\x85",ltrim=RegExp("^"+space+space+"*"),rtrim=RegExp(space+space+"*$"),exporter=function(e,t,o){var n={},i=_fails(function(){return!!_stringWs[e]()||non[e]()!=non}),a=n[e]=i?t(trim):_stringWs[e];o&&(n[o]=a),_export(_export.P+_export.F*i,"String",n)},trim=exporter.trim=function(e,t){return e=_defined(e)+"",1&t&&(e=e.replace(ltrim,"")),2&t&&(e=e.replace(rtrim,"")),e},_stringTrim=exporter,gOPN$2=_objectGopn.f,gOPD$2=_objectGopd.f,dP$2=_objectDp.f,$trim=_stringTrim.trim,NUMBER="Number",$Number=_global[NUMBER],Base=$Number,proto$1=$Number.prototype,BROKEN_COF=_cof(_objectCreate(proto$1))==NUMBER,TRIM="trim"in String.prototype,toNumber=function(e){var t=_toPrimitive(e,!1);if("string"==typeof t&&2l||l>d)return NaN;return parseInt(s,a)}}return+t};if(!$Number(" 0o1")||!$Number("0b1")||$Number("+0x1")){$Number=function(e){var t=1>arguments.length?0:e,o=this;return o instanceof $Number&&(BROKEN_COF?_fails(function(){proto$1.valueOf.call(o)}):_cof(o)!=NUMBER)?_inheritIfRequired(new Base(toNumber(t)),o,$Number):toNumber(t)};for(var keys=_descriptors?gOPN$2(Base):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),j$1=0,key$1;keys.length>j$1;j$1++)_has(Base,key$1=keys[j$1])&&!_has($Number,key$1)&&dP$2($Number,key$1,gOPD$2(Base,key$1));$Number.prototype=proto$1,proto$1.constructor=$Number,_redefine(_global,NUMBER,$Number)}for(var moment=createCommonjsModule(function(e){var t=Math.round,o=Math.pow,n=Math.max,a=Math.abs,d=Math.min,s=Math.floor,r=Math.ceil;(function(t,o){e.exports=o()})(commonjsGlobal,function(){function l(){return $t.apply(null,arguments)}function u(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function p(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function h(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}function m(e){return void 0===e}function g(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function y(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function f(e,t){var o=[],n;for(n=0;nt.overflow&&!t.empty&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&o);if(e._strict&&(n=n&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour),null==Object.isFrozen||!Object.isFrozen(e))e._isValid=n;else return n}return e._isValid}function O(e){var t=k(NaN);return null==e?x(t).userInvalidated=!0:v(x(t),e),t}function D(e,t){var o,n,a;if(m(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),m(t._i)||(e._i=t._i),m(t._f)||(e._f=t._f),m(t._l)||(e._l=t._l),m(t._strict)||(e._strict=t._strict),m(t._tzm)||(e._tzm=t._tzm),m(t._isUTC)||(e._isUTC=t._isUTC),m(t._offset)||(e._offset=t._offset),m(t._pf)||(e._pf=x(t)),m(t._locale)||(e._locale=t._locale),0e?r(e)||0:s(e)}function M(e){var t=+e,o=0;return 0!=t&&isFinite(t)&&(o=C(t)),o}function I(e,t,o){var n=d(e.length,t.length),s=a(e.length-t.length),r=0,l;for(l=0;la;++a)s=k([2e3,a]),this._shortMonthsParse[a]=this.monthsShort(s,"").toLocaleLowerCase(),this._longMonthsParse[a]=this.months(s,"").toLocaleLowerCase();return o?"MMM"===t?(d=Ro.call(this._shortMonthsParse,n),-1===d?null:d):(d=Ro.call(this._longMonthsParse,n),-1===d?null:d):"MMM"===t?(d=Ro.call(this._shortMonthsParse,n),-1!==d)?d:(d=Ro.call(this._longMonthsParse,n),-1===d?null:d):(d=Ro.call(this._longMonthsParse,n),-1!==d)?d:(d=Ro.call(this._shortMonthsParse,n),-1===d?null:d)}function me(e,t,o){var n,a,d;if(this._monthsParseExact)return he.call(this,e,t,o);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),n=0;12>n;n++){if(a=k([2e3,n]),o&&!this._longMonthsParse[n]&&(this._longMonthsParse[n]=new RegExp("^"+this.months(a,"").replace(".","")+"$","i"),this._shortMonthsParse[n]=new RegExp("^"+this.monthsShort(a,"").replace(".","")+"$","i")),o||this._monthsParse[n]||(d="^"+this.months(a,"")+"|^"+this.monthsShort(a,""),this._monthsParse[n]=new RegExp(d.replace(".",""),"i")),o&&"MMMM"===t&&this._longMonthsParse[n].test(e))return n;if(o&&"MMM"===t&&this._shortMonthsParse[n].test(e))return n;if(!o&&this._monthsParse[n].test(e))return n}}function ge(e,t){var o;if(!e.isValid())return e;if("string"==typeof t)if(/^\d+$/.test(t))t=M(t);else if(t=e.localeData().monthsParse(t),!g(t))return e;return o=d(e.date(),pe(e.year(),t)),e._d["set"+(e._isUTC?"UTC":"")+"Month"](t,o),e}function ye(e){return null==e?re(this,"Month"):(ge(this,e),l.updateOffset(this,!0),this)}function fe(){function e(e,t){return t.length-e.length}var t=[],o=[],n=[],a,d;for(a=0;12>a;a++)d=k([2e3,a]),t.push(this.monthsShort(d,"")),o.push(this.months(d,"")),n.push(this.months(d,"")),n.push(this.monthsShort(d,""));for(t.sort(e),o.sort(e),n.sort(e),a=0;12>a;a++)t[a]=te(t[a]),o[a]=te(o[a]);for(a=0;24>a;a++)n[a]=te(n[a]);this._monthsRegex=new RegExp("^("+n.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+o.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+t.join("|")+")","i")}function be(e,t,o,n,i,a,d){var s;return 100>e&&0<=e?(s=new Date(e+400,t,o,n,i,a,d),isFinite(s.getFullYear())&&s.setFullYear(e)):s=new Date(e,t,o,n,i,a,d),s}function _e(e){var t;if(100>e&&0<=e){var o=Array.prototype.slice.call(arguments);o[0]=e+400,t=new Date(Date.UTC.apply(null,o)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)}else t=new Date(Date.UTC.apply(null,arguments));return t}function ve(e,t,o){var n=7+t-o,i=(7+_e(e,0,n).getUTCDay()-t)%7;return-i+n-1}function ke(e,t,o,n,i){var a=ve(e,n,i),d=1+7*(t-1)+(7+o-n)%7+a,s,r;return 0>=d?(s=e-1,r=ae(s)+d):d>ae(e)?(s=e+1,r=d-ae(e)):(s=e,r=d),{year:s,dayOfYear:r}}function we(e,t,o){var n=ve(e.year(),t,o),i=s((e.dayOfYear()-n-1)/7)+1,a,d;return 1>i?(d=e.year()-1,a=i+xe(d,t,o)):i>xe(e.year(),t,o)?(a=i-xe(e.year(),t,o),d=e.year()+1):(d=e.year(),a=i),{week:a,year:d}}function xe(e,t,o){var n=ve(e,t,o),i=ve(e+1,t,o);return(ae(e)-n+i)/7}function Se(e,t){return"string"==typeof e?isNaN(e)?(e=t.weekdaysParse(e),"number"==typeof e?e:null):parseInt(e,10):e}function Oe(e,t){return"string"==typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function De(e,t){return e.slice(t,7).concat(e.slice(0,t))}function Te(e,t,o){var n=e.toLocaleLowerCase(),a,d,s;if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],a=0;7>a;++a)s=k([2e3,1]).day(a),this._minWeekdaysParse[a]=this.weekdaysMin(s,"").toLocaleLowerCase(),this._shortWeekdaysParse[a]=this.weekdaysShort(s,"").toLocaleLowerCase(),this._weekdaysParse[a]=this.weekdays(s,"").toLocaleLowerCase();return o?"dddd"===t?(d=Ro.call(this._weekdaysParse,n),-1===d?null:d):"ddd"===t?(d=Ro.call(this._shortWeekdaysParse,n),-1===d?null:d):(d=Ro.call(this._minWeekdaysParse,n),-1===d?null:d):"dddd"===t?(d=Ro.call(this._weekdaysParse,n),-1!==d)?d:(d=Ro.call(this._shortWeekdaysParse,n),-1!==d)?d:(d=Ro.call(this._minWeekdaysParse,n),-1===d?null:d):"ddd"===t?(d=Ro.call(this._shortWeekdaysParse,n),-1!==d)?d:(d=Ro.call(this._weekdaysParse,n),-1!==d)?d:(d=Ro.call(this._minWeekdaysParse,n),-1===d?null:d):(d=Ro.call(this._minWeekdaysParse,n),-1!==d)?d:(d=Ro.call(this._weekdaysParse,n),-1!==d)?d:(d=Ro.call(this._shortWeekdaysParse,n),-1===d?null:d)}function Ee(e,t,o){var n,a,d;if(this._weekdaysParseExact)return Te.call(this,e,t,o);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),n=0;7>n;n++){if(a=k([2e3,1]).day(n),o&&!this._fullWeekdaysParse[n]&&(this._fullWeekdaysParse[n]=new RegExp("^"+this.weekdays(a,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[n]=new RegExp("^"+this.weekdaysShort(a,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[n]=new RegExp("^"+this.weekdaysMin(a,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[n]||(d="^"+this.weekdays(a,"")+"|^"+this.weekdaysShort(a,"")+"|^"+this.weekdaysMin(a,""),this._weekdaysParse[n]=new RegExp(d.replace(".",""),"i")),o&&"dddd"===t&&this._fullWeekdaysParse[n].test(e))return n;if(o&&"ddd"===t&&this._shortWeekdaysParse[n].test(e))return n;if(o&&"dd"===t&&this._minWeekdaysParse[n].test(e))return n;if(!o&&this._weekdaysParse[n].test(e))return n}}function Ce(){function e(e,t){return t.length-e.length}var t=[],o=[],n=[],a=[],d,s,r,l,c;for(d=0;7>d;d++)s=k([2e3,1]).day(d),r=this.weekdaysMin(s,""),l=this.weekdaysShort(s,""),c=this.weekdays(s,""),t.push(r),o.push(l),n.push(c),a.push(r),a.push(l),a.push(c);for(t.sort(e),o.sort(e),n.sort(e),a.sort(e),d=0;7>d;d++)o[d]=te(o[d]),n[d]=te(n[d]),a[d]=te(a[d]);this._weekdaysRegex=new RegExp("^("+a.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+o.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+t.join("|")+")","i")}function Me(){return this.hours()%12||12}function Ie(e,t){q(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function Pe(e,t){return t._meridiemParse}function Fe(e){return e?e.toLowerCase().replace("_","-"):e}function Ne(e){for(var t=0,o,n,a,d;t=o&&I(d,n,!0)>=o-1)break;o--}t++}return Jo}function Ye(t){var o=null;if(!Wo[t]&&!0&&e&&e.exports)try{o=Jo._abbr;commonjsRequire("./locale/"+t),Re(o)}catch(t){}return Wo[t]}function Re(e,t){var o;return e&&(o=m(t)?Be(e):ze(e,t),o?Jo=o:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),Jo._abbr}function ze(e,t){if(null!==t){var o=jo,n;if(t.abbr=e,null!=Wo[e])N("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),o=Wo[e]._config;else if(null!=t.parentLocale)if(null!=Wo[t.parentLocale])o=Wo[t.parentLocale]._config;else if(n=Ye(t.parentLocale),null!=n)o=n._config;else return Uo[t.parentLocale]||(Uo[t.parentLocale]=[]),Uo[t.parentLocale].push({name:e,config:t}),null;return Wo[e]=new B(z(o,t)),Uo[e]&&Uo[e].forEach(function(e){ze(e.name,e.config)}),Re(e),Wo[e]}return delete Wo[e],null}function Be(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return Jo;if(!u(e)){if(t=Ye(e),t)return t;e=[e]}return Ne(e)}function Le(){return to(Wo)}function Ae(e){var t=e._a,o;return t&&-2===x(e).overflow&&(o=0>t[1]||11t[2]||t[2]>pe(t[0],t[1])?2:0>t[3]||24t[4]||59t[5]||59t[6]||999o||2ae(s)||0===e._dayOfYear)&&(x(e)._overflowDayOfYear=!0),n=_e(s,0,e._dayOfYear),e._a[1]=n.getUTCMonth(),e._a[2]=n.getUTCDate()),o=0;3>o&&null==e._a[o];++o)e._a[o]=t[o]=a[o];for(;7>o;o++)e._a[o]=t[o]=null==e._a[o]?2===o?1:0:e._a[o];24===e._a[3]&&0===e._a[4]&&0===e._a[5]&&0===e._a[6]&&(e._nextDay=!0,e._a[3]=0),e._d=(e._useUTC?_e:be).apply(null,t),d=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[3]=24),e._w&&"undefined"!=typeof e._w.d&&e._w.d!==d&&(x(e).weekdayMismatch=!0)}}function Ue(e){var t,o,n,i,a,d,s,r;if(t=e._w,null!=t.GG||null!=t.W||null!=t.E)a=1,d=4,o=He(t.GG,e._a[0],we(st(),1,4).year),n=He(t.W,1),i=He(t.E,1),(1>i||7t.e||6i||6n||n>xe(o,a,d)?x(e)._overflowWeeks=!0:null==r?(s=ke(o,n,i,a,d),e._a[0]=s.year,e._dayOfYear=s.dayOfYear):x(e)._overflowWeekday=!0}function Ve(e){var t=e._i,o=Vo.exec(t)||Go.exec(t),n,a,d,s,r,c;if(o){for(x(e).iso=!0,n=0,a=Xo.length;n=t?2e3+t:999>=t?1900+t:t}function Xe(e){return e.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function Ze(e,t,o){if(e){var n=Lo.indexOf(e),i=new Date(t[0],t[1],t[2]).getDay();if(n!==i)return x(o).weekdayMismatch=!0,o._isValid=!1,!1}return!0}function $e(e,t,o){if(e)return Qo[e];if(t)return 0;var n=parseInt(o,10),i=n%100;return 60*((n-i)/100)+i}function Ke(e){var t=Ko.exec(Xe(e._i));if(t){var o=Ge(t[4],t[3],t[2],t[5],t[6],t[7]);if(!Ze(t[1],o,e))return;e._a=o,e._tzm=$e(t[8],t[9],t[10]),e._d=_e.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),x(e).rfc2822=!0}else e._isValid=!1}function Qe(e){var t=$o.exec(e._i);if(null!==t)return void(e._d=new Date(+t[1]));if(Ve(e),!1===e._isValid)delete e._isValid;else return;if(Ke(e),!1===e._isValid)delete e._isValid;else return;l.createFromInputFallback(e)}function Je(e){if(e._f===l.ISO_8601)return void Ve(e);if(e._f===l.RFC_2822)return void Ke(e);e._a=[],x(e).empty=!0;var t=""+e._i,o=t.length,n=0,a,d,s,r,c;for(s=K(e._f,e._locale).match(ao)||[],a=0;a=e._a[3]&&!0===x(e).bigHour&&0t&&(t+=12),n||12!==t||(t=0),t):e.meridiemHour(t,o)}function tt(e){var t,o,n,a,d;if(0===e._f.length)return x(e).invalidFormat=!0,void(e._d=new Date(NaN));for(a=0;ae?-1*t(-1*e):t(e)}function ht(e,t){q(e,0,0,function(){var e=this.utcOffset(),o="+";return 0>e&&(e=-e,o="-"),o+G(~~(e/60),2)+t+G(~~e%60,2)})}function mt(e,t){var o=(t||"").match(e);if(null===o)return null;var n=o[o.length-1]||[],i=(n+"").match(nn)||["-",0,0],a=+(60*i[1])+M(i[2]);return 0===a?0:"+"===i[0]?a:-a}function gt(e,t){var o,n;return t._isUTC?(o=t.clone(),n=(E(e)||y(e)?e.valueOf():st(e).valueOf())-o.valueOf(),o._d.setTime(o._d.valueOf()+n),l.updateOffset(o,!1),o):st(e).local()}function yt(e){return 15*-t(e._d.getTimezoneOffset()/15)}function ft(){if(!m(this._isDSTShifted))return this._isDSTShifted;var e={};if(D(e,this),e=it(e),e._a){var t=e._isUTC?k(e._a):st(e._a);this._isDSTShifted=this.isValid()&&0t-n?(i=e.clone().add(o-1,"months"),a=(t-n)/(n-i)):(i=e.clone().add(o+1,"months"),a=(t-n)/(i-n)),-(o+a)||0}function Dt(e){var t;return void 0===e?this._locale._abbr:(t=Be(e),null!=t&&(this._locale=t),this)}function Tt(){return this._locale}function Et(e,t){return(e%t+t)%t}function Ct(e,t,o){return 100>e&&0<=e?new Date(e+400,t,o)-12622780800000:new Date(e,t,o).valueOf()}function Mt(e,t,o){return 100>e&&0<=e?Date.UTC(e+400,t,o)-12622780800000:Date.UTC(e,t,o)}function It(e,t){q(0,[e,e.length],0,t)}function Pt(e,t,o,n,i){var a;return null==e?we(this,n,i).year:(a=xe(e,n,i),t>a&&(t=a),Ft.call(this,e,t,o,n,i))}function Ft(e,t,o,n,i){var a=ke(e,t,o,n,i),d=_e(a.year,0,a.dayOfYear);return this.year(d.getUTCFullYear()),this.month(d.getUTCMonth()),this.date(d.getUTCDate()),this}function Nt(e,t){t[6]=M(1e3*("0."+e))}function Yt(e){return e}function Rt(e,t,o,n){var i=Be(),a=k().set(n,t);return i[o](a,e)}function zt(e,t,o){if(g(e)&&(t=e,e=void 0),e=e||"",null!=t)return Rt(e,t,o,"month");var n=[],a;for(a=0;12>a;a++)n[a]=Rt(e,a,o,"month");return n}function Bt(e,t,o,n){"boolean"==typeof e?(g(t)&&(o=t,t=void 0),t=t||""):(t=e,o=t,e=!1,g(t)&&(o=t,t=void 0),t=t||"");var a=Be(),d=e?a._week.dow:0;if(null!=o)return Rt(t,(o+d)%7,n,"day");var s=[],r;for(r=0;7>r;r++)s[r]=Rt(t,(r+d)%7,n,"day");return s}function Lt(e,t,o,n){var i=_t(t,o);return e._milliseconds+=n*i._milliseconds,e._days+=n*i._days,e._months+=n*i._months,e._bubble()}function At(e){return 0>e?s(e):r(e)}function Ht(e){return 4800*e/146097}function jt(e){return 146097*e/4800}function Wt(e){return function(){return this.as(e)}}function Ut(e){return function(){return this.isValid()?this._data[e]:NaN}}function Vt(e,t,o,n,i){return i.relativeTime(t||1,!!o,e,n)}function Gt(e,t,o){var n=_t(e).abs(),i=Nn(n.as("s")),d=Nn(n.as("m")),s=Nn(n.as("h")),r=Nn(n.as("d")),l=Nn(n.as("M")),c=Nn(n.as("y")),u=i<=Yn.ss&&["s",i]||i=d&&["m"]||d=s&&["h"]||s=r&&["d"]||r=l&&["M"]||l=c&&["y"]||["yy",c];return u[2]=t,u[3]=0<+e,u[4]=o,Vt.apply(null,u)}function qt(e){return void 0===e?Nn:"function"==typeof e&&(Nn=e,!0)}function Xt(e){return(0e)||+e}function Zt(){if(!this.isValid())return this.localeData().invalidDate();var e=Rn(this._milliseconds)/1e3,t=Rn(this._days),o=Rn(this._months),n,i,a;n=C(e/60),i=C(n/60),e%=60,n%=60,a=C(o/12),o%=12;var d=a,r=o,l=t,c=i,u=n,p=e?e.toFixed(3).replace(/\.?0+$/,""):"",s=this.asSeconds();if(!s)return"P0D";var h=0>s?"-":"",m=Xt(this._months)===Xt(s)?"":"-",g=Xt(this._days)===Xt(s)?"":"-",y=Xt(this._milliseconds)===Xt(s)?"":"-";return h+"P"+(d?m+d+"Y":"")+(r?m+r+"M":"")+(l?g+l+"D":"")+(c||u||p?"T":"")+(c?y+c+"H":"")+(u?y+u+"M":"")+(p?y+p+"S":"")}var $t,Kt;Kt=Array.prototype.some?Array.prototype.some:function(e){for(var o=Object(this),t=o.length>>>0,n=0;n=e?""+e:"+"+e}),q(0,["YY",2],0,function(){return this.year()%100}),q(0,["YYYY",4],0,"year"),q(0,["YYYYY",5],0,"year"),q(0,["YYYYYY",6,!0],0,"year"),H("year","y"),U("year",1),Q("Y",wo),Q("YY",go,uo),Q("YYYY",_o,ho),Q("YYYYY",vo,mo),Q("YYYYYY",vo,mo),oe(["YYYYY","YYYYYY"],Co),oe("YYYY",function(e,t){t[Co]=2===e.length?l.parseTwoDigitYear(e):M(e)}),oe("YY",function(e,t){t[Co]=l.parseTwoDigitYear(e)}),oe("Y",function(e,t){t[Co]=parseInt(e,10)}),l.parseTwoDigitYear=function(e){return M(e)+(68this?this:e:O()}),on=["year","quarter","month","week","day","hour","minute","second","millisecond"];ht("Z",":"),ht("ZZ",""),Q("Z",So),Q("ZZ",So),oe(["Z","ZZ"],function(e,t,o){o._useUTC=!0,o._tzm=mt(So,e)});var nn=/([\+\-]|\d\d)/gi;l.updateOffset=function(){};var an=/^(\-|\+)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,dn=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;_t.fn=ct.prototype,_t.invalid=function(){return _t(NaN)};var sn=xt(1,"add"),rn=xt(-1,"subtract");l.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",l.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var ln=F("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return void 0===e?this.localeData():this.locale(e)});q(0,["gg",2],0,function(){return this.weekYear()%100}),q(0,["GG",2],0,function(){return this.isoWeekYear()%100}),It("gggg","weekYear"),It("ggggg","weekYear"),It("GGGG","isoWeekYear"),It("GGGGG","isoWeekYear"),H("weekYear","gg"),H("isoWeekYear","GG"),U("weekYear",1),U("isoWeekYear",1),Q("G",wo),Q("g",wo),Q("GG",go,uo),Q("gg",go,uo),Q("GGGG",_o,ho),Q("gggg",_o,ho),Q("GGGGG",vo,mo),Q("ggggg",vo,mo),ne(["gggg","ggggg","GGGG","GGGGG"],function(e,t,o,n){t[n.substr(0,2)]=M(e)}),ne(["gg","GG"],function(e,t,o,n){t[n]=l.parseTwoDigitYear(e)}),q("Q",0,"Qo","quarter"),H("quarter","Q"),U("quarter",7),Q("Q",co),oe("Q",function(e,t){t[Mo]=3*(M(e)-1)}),q("D",["DD",2],"Do","date"),H("date","D"),U("date",9),Q("D",go),Q("DD",go,uo),Q("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient}),oe(["D","DD"],Io),oe("Do",function(e,t){t[Io]=M(e.match(go)[0])});var cn=se("Date",!0);q("DDD",["DDDD",3],"DDDo","dayOfYear"),H("dayOfYear","DDD"),U("dayOfYear",4),Q("DDD",bo),Q("DDDD",po),oe(["DDD","DDDD"],function(e,t,o){o._dayOfYear=M(e)}),q("m",["mm",2],0,"minute"),H("minute","m"),U("minute",14),Q("m",go),Q("mm",go,uo),oe(["m","mm"],Fo);var un=se("Minutes",!1);q("s",["ss",2],0,"second"),H("second","s"),U("second",15),Q("s",go),Q("ss",go,uo),oe(["s","ss"],No);var pn=se("Seconds",!1);q("S",0,0,function(){return~~(this.millisecond()/100)}),q(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),q(0,["SSS",3],0,"millisecond"),q(0,["SSSS",4],0,function(){return 10*this.millisecond()}),q(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),q(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),q(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),q(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),q(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),H("millisecond","ms"),U("millisecond",16),Q("S",bo,co),Q("SS",bo,uo),Q("SSS",bo,po);var hn;for(hn="SSSS";9>=hn.length;hn+="S")Q(hn,ko);for(hn="S";9>=hn.length;hn+="S")oe(hn,Nt);var mn=se("Milliseconds",!1);q("z",0,0,"zoneAbbr"),q("zz",0,0,"zoneName");var gn=T.prototype;gn.add=sn,gn.calendar=function(e,t){var o=e||st(),n=gt(o,this).startOf("day"),i=l.calendarFormat(this,n)||"sameElse",a=t&&(Y(t[i])?t[i].call(this,o):t[i]);return this.format(a||this.localeData().calendar(i,this,st(o)))},gn.clone=function(){return new T(this)},gn.diff=function(e,t,o){var n,i,a;return this.isValid()?(n=gt(e,this),!n.isValid())?NaN:(i=6e4*(n.utcOffset()-this.utcOffset()),t=j(t),(a="year"===t?Ot(this,n)/12:"month"===t?Ot(this,n):"quarter"===t?Ot(this,n)/3:"second"===t?(this-n)/1e3:"minute"===t?(this-n)/6e4:"hour"===t?(this-n)/36e5:"day"===t?(this-n-i)/864e5:"week"===t?(this-n-i)/6048e5:this-n,o?a:C(a))):NaN},gn.endOf=function(e){var t;if(e=j(e),void 0===e||"millisecond"===e||!this.isValid())return this;var o=this._isUTC?Mt:Ct;return"year"===e?t=o(this.year()+1,0,1)-1:"quarter"===e?t=o(this.year(),this.month()-this.month()%3+3,1)-1:"month"===e?t=o(this.year(),this.month()+1,1)-1:"week"===e?t=o(this.year(),this.month(),this.date()-this.weekday()+7)-1:"isoWeek"===e?t=o(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1:"day"===e||"date"===e?t=o(this.year(),this.month(),this.date()+1)-1:"hour"===e?(t=this._d.valueOf(),t+=3600000-Et(t+(this._isUTC?0:60000*this.utcOffset()),3600000)-1):"minute"===e?(t=this._d.valueOf(),t+=60000-Et(t,60000)-1):"second"===e?(t=this._d.valueOf(),t+=1000-Et(t,1000)-1):void 0,this._d.setTime(t),l.updateOffset(this,!0),this},gn.format=function(e){e||(e=this.isUtc()?l.defaultFormatUtc:l.defaultFormat);var t=$(this,e);return this.localeData().postformat(t)},gn.from=function(e,t){return this.isValid()&&(E(e)&&e.isValid()||st(e).isValid())?_t({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},gn.fromNow=function(e){return this.from(st(),e)},gn.to=function(e,t){return this.isValid()&&(E(e)&&e.isValid()||st(e).isValid())?_t({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},gn.toNow=function(e){return this.to(st(),e)},gn.get=function(e){return e=j(e),Y(this[e])?this[e]():this},gn.invalidAt=function(){return x(this).overflow},gn.isAfter=function(e,t){var o=E(e)?e:st(e);return!!(this.isValid()&&o.isValid())&&(t=j(t)||"millisecond","millisecond"===t?this.valueOf()>o.valueOf():o.valueOf()o.year()||9999=this.year()?"YYYY":"YYYYYY",i=t+"[\")]";return this.format(o+n+"-MM-DD[T]HH:mm:ss.SSS"+i)},gn.toJSON=function(){return this.isValid()?this.toISOString():null},gn.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},gn.unix=function(){return s(this.valueOf()/1e3)},gn.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},gn.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},gn.year=Yo,gn.isLeapYear=function(){return de(this.year())},gn.weekYear=function(e){return Pt.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},gn.isoWeekYear=function(e){return Pt.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)},gn.quarter=gn.quarters=function(e){return null==e?r((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)},gn.month=ye,gn.daysInMonth=function(){return pe(this.year(),this.month())},gn.week=gn.weeks=function(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")},gn.isoWeek=gn.isoWeeks=function(e){var t=we(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")},gn.weeksInYear=function(){var e=this.localeData()._week;return xe(this.year(),e.dow,e.doy)},gn.isoWeeksInYear=function(){return xe(this.year(),1,4)},gn.date=cn,gn.day=gn.days=function(e){if(!this.isValid())return null==e?NaN:this;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return null==e?t:(e=Se(e,this.localeData()),this.add(e-t,"d"))},gn.weekday=function(e){if(!this.isValid())return null==e?NaN:this;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")},gn.isoWeekday=function(e){if(!this.isValid())return null==e?NaN:this;if(null!=e){var t=Oe(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7},gn.dayOfYear=function(e){var o=t((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?o:this.add(e-o,"d")},gn.hour=gn.hours=Ho,gn.minute=gn.minutes=un,gn.second=gn.seconds=pn,gn.millisecond=gn.milliseconds=mn,gn.utcOffset=function(e,t,o){var n=this._offset||0,i;if(!this.isValid())return null==e?NaN:this;if(null!=e){if("string"!=typeof e)16>a(e)&&!o&&(e*=60);else if(e=mt(So,e),null===e)return this;return!this._isUTC&&t&&(i=yt(this)),this._offset=e,this._isUTC=!0,null!=i&&this.add(i,"m"),n!==e&&(!t||this._changeInProgress?St(this,_t(e-n,"m"),1,!1):!this._changeInProgress&&(this._changeInProgress=!0,l.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?n:yt(this)},gn.utc=function(e){return this.utcOffset(0,e)},gn.local=function(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(yt(this),"m")),this},gn.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var e=mt(xo,this._i);null==e?this.utcOffset(0,!0):this.utcOffset(e)}return this},gn.hasAlignedHourOffset=function(e){return!!this.isValid()&&(e=e?st(e).utcOffset():0,0==(this.utcOffset()-e)%60)},gn.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},gn.isLocal=function(){return!!this.isValid()&&!this._isUTC},gn.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},gn.isUtc=bt,gn.isUTC=bt,gn.zoneAbbr=function(){return this._isUTC?"UTC":""},gn.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},gn.dates=F("dates accessor is deprecated. Use date instead.",cn),gn.months=F("months accessor is deprecated. Use month instead",ye),gn.years=F("years accessor is deprecated. Use year instead",Yo),gn.zone=F("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",function(e,t){return null==e?-this.utcOffset():("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this)}),gn.isDSTShifted=F("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",ft);var yn=B.prototype;yn.calendar=L,yn.longDateFormat=A,yn.invalidDate=function(){return this._invalidDate},yn.ordinal=function(e){return this._ordinal.replace("%d",e)},yn.preparse=Yt,yn.postformat=Yt,yn.relativeTime=function(e,t,o,n){var i=this._relativeTime[o];return Y(i)?i(e,t,o,n):i.replace(/%d/i,e)},yn.pastFuture=function(e,t){var o=this._relativeTime[0=e&&0>=t&&0>=o||(e+=864e5*At(jt(o)+t),t=0,o=0),n.milliseconds=e%1e3,i=C(e/1e3),n.seconds=i%60,a=C(i/60),n.minutes=a%60,d=C(a/60),n.hours=d%24,t+=C(d/24),r=C(Ht(t)),o+=r,t-=At(jt(r)),s=C(o/12),o%=12,n.days=t,n.months=o,n.years=s,this},zn.clone=function(){return _t(this)},zn.get=function(e){return e=j(e),this.isValid()?this[e+"s"]():NaN},zn.milliseconds=Tn,zn.seconds=En,zn.minutes=Cn,zn.hours=Mn,zn.days=In,zn.weeks=function(){return C(this.days()/7)},zn.months=Pn,zn.years=Fn,zn.humanize=function(e){if(!this.isValid())return this.localeData().invalidDate();var t=this.localeData(),o=Gt(this,!e,t);return e&&(o=t.pastFuture(+this,o)),t.postformat(o)},zn.toISOString=Zt,zn.toString=Zt,zn.toJSON=Zt,zn.locale=Dt,zn.localeData=Tt,zn.toIsoString=F("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Zt),zn.lang=ln,q("X",0,0,"unix"),q("x",0,0,"valueOf"),Q("x",wo),Q("X",Oo),oe("X",function(e,t,o){o._d=new Date(1e3*parseFloat(e,10))}),oe("x",function(e,t,o){o._d=new Date(M(e))}),l.version="2.24.0",function(e){$t=e}(st),l.fn=gn,l.min=function(){var e=[].slice.call(arguments,0);return rt("isBefore",e)},l.max=function(){var e=[].slice.call(arguments,0);return rt("isAfter",e)},l.now=function(){return Date.now?Date.now():+new Date},l.utc=k,l.unix=function(e){return st(1e3*e)},l.months=function(e,t){return zt(e,t,"months")},l.isDate=y,l.locale=Re,l.invalid=O,l.duration=_t,l.isMoment=E,l.weekdays=function(e,t,o){return Bt(e,t,o,"weekdays")},l.parseZone=function(){return st.apply(null,arguments).parseZone()},l.localeData=Be,l.isDuration=ut,l.monthsShort=function(e,t){return zt(e,t,"monthsShort")},l.weekdaysMin=function(e,t,o){return Bt(e,t,o,"weekdaysMin")},l.defineLocale=ze,l.updateLocale=function(e,t){if(null!=t){var o=jo,n,i;i=Ye(e),null!=i&&(o=i._config),t=z(o,t),n=new B(t),n.parentLocale=Wo[e],Wo[e]=n,Re(e)}else null!=Wo[e]&&(null==Wo[e].parentLocale?null!=Wo[e]&&delete Wo[e]:Wo[e]=Wo[e].parentLocale);return Wo[e]},l.locales=Le,l.weekdaysShort=function(e,t,o){return Bt(e,t,o,"weekdaysShort")},l.normalizeUnits=j,l.relativeTimeRounding=qt,l.relativeTimeThreshold=function(e,t){return void 0!==Yn[e]&&(void 0===t?Yn[e]:(Yn[e]=t,"s"===e&&(Yn.ss=t-1),!0))},l.calendarFormat=function(e,t){var o=e.diff(t,"days",!0);return-6>o?"sameElse":-1>o?"lastWeek":0>o?"lastDay":1>o?"sameDay":2>o?"nextDay":7>o?"nextWeek":"sameElse"},l.prototype=gn,l.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},l})}),byteToHex=[],i$1=0;256>i$1;i$1++)byteToHex[i$1]=(i$1+256).toString(16).substr(1);function stringifyUUID(e,t){var o=t||0,n=byteToHex;return n[e[o++]]+n[e[o++]]+n[e[o++]]+n[e[o++]]+"-"+n[e[o++]]+n[e[o++]]+"-"+n[e[o++]]+n[e[o++]]+"-"+n[e[o++]]+n[e[o++]]+"-"+n[e[o++]]+n[e[o++]]+n[e[o++]]+n[e[o++]]+n[e[o++]]+n[e[o++]]}for(var random=function(){if("undefined"!=typeof crypto&&crypto.getRandomValues){var e=new Uint8Array(16);return function(){return crypto.getRandomValues(e),e}}var t=Array(16);return function(){for(var e=0,o;16>e;e++)0==(3&e)&&(o=4294967296*Math.random()),t[e]=255&o>>>((3&e)<<3);return t}}(),byteToHex$1=[],i$1$1=0;256>i$1$1;i$1$1++)byteToHex$1[i$1$1]=(i$1$1+256).toString(16).substr(1);var seedBytes=random(),defaultNodeId=[1|seedBytes[0],seedBytes[1],seedBytes[2],seedBytes[3],seedBytes[4],seedBytes[5]],defaultClockseq=16383&(seedBytes[6]<<8|seedBytes[7]);function uuid4(){var e=0a;a++)t[n+a]=i[a];return t||stringifyUUID(i)}var ASPDateRegex=/^\/?Date\((-?\d+)/i,fullHexRE=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,shortHexRE=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,rgbRE=/^rgb\( *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *(1?\d{1,2}|2[0-4]\d|25[0-5]) *\)$/i,rgbaRE=/^rgba\( *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *([01]|0?\.\d+) *\)$/i;function isNumber(e){return e instanceof Number||"number"==typeof e}function recursiveDOMDelete(e){if(e)for(;!0===e.hasChildNodes();){var t=e.firstChild;t&&(recursiveDOMDelete(t),e.removeChild(t))}}function isString(e){return e instanceof String||"string"==typeof e}function isObject(e){return"object"===_typeof(e)&&null!==e}function isDate(e){if(e instanceof Date)return!0;if(isString(e)){var t=ASPDateRegex.exec(e);if(t)return!0;if(!isNaN(Date.parse(e)))return!0}return!1}function isMoment(e){return moment.isMoment(e)}function copyOrDelete(e,t,o,n){var i=!1;!0===n&&(i=null===t[o]&&e[o]!==void 0),i?delete e[o]:e[o]=t[o]}function fillIfDefined(e,t){var o=!!(2o.indexOf(e)})),e.className=o.join(" ")}function removeClassName(e,t){var o=e.className.split(" "),n=t.split(" ");o=o.filter(function(e){return 0>n.indexOf(e)}),e.className=o.join(" ")}function forEach(e,t){if(Array.isArray(e))for(var o=e.length,n=0;nt(n,e[a-1]);a--)e[a]=e[a-1];e[a]=n}return e}function mergeOptions(e,t,o){var n=3r;){if(m=s(.5*(c+l)),u=e[a(0,m-1)][o],p=e[m][o],h=e[d(e.length-1,m+1)][o],0==i(p,t))return m;if(0>i(u,t)&&0i(p,t)&&0i(p,t)?l=m+1:c=m-1,r++}return-1}var easingFunctions={linear:function(e){return e},easeInQuad:function(e){return e*e},easeOutQuad:function(e){return e*(2-e)},easeInOutQuad:function(e){return .5>e?2*e*e:-1+(4-2*e)*e},easeInCubic:function(e){return e*e*e},easeOutCubic:function(e){return--e*e*e+1},easeInOutCubic:function(e){return .5>e?4*e*e*e:(e-1)*(2*e-2)*(2*e-2)+1},easeInQuart:function(e){return e*e*e*e},easeOutQuart:function(e){return 1- --e*e*e*e},easeInOutQuart:function(e){return .5>e?8*e*e*e*e:1-8*--e*e*e*e},easeInQuint:function(e){return e*e*e*e*e},easeOutQuint:function(e){return 1+--e*e*e*e*e},easeInOutQuint:function(e){return .5>e?16*e*e*e*e*e:1+16*--e*e*e*e*e}};function getScrollBarWidth(){var e=document.createElement("p");e.style.width="100%",e.style.height="200px";var t=document.createElement("div");t.style.position="absolute",t.style.top="0px",t.style.left="0px",t.style.visibility="hidden",t.style.width="200px",t.style.height="150px",t.style.overflow="hidden",t.appendChild(e),document.body.appendChild(t);var o=e.offsetWidth;t.style.overflow="scroll";var n=e.offsetWidth;return o==n&&(n=t.clientWidth),document.body.removeChild(t),o-n}function topMost(e,t){var o;Array.isArray(t)||(t=[t]);var n=!0,a=!1,d=void 0;try{for(var s=e[Symbol.iterator](),r,l;!(n=(r=s.next()).done);n=!0)if(l=r.value,l){o=l[t[0]];for(var c=1;ci$2;i$2++)byteToHex$2[i$2]=(i$2+256).toString(16).substr(1);function stringifyUUID$1(e,t){var o=t||0,n=byteToHex$2;return n[e[o++]]+n[e[o++]]+n[e[o++]]+n[e[o++]]+"-"+n[e[o++]]+n[e[o++]]+"-"+n[e[o++]]+n[e[o++]]+"-"+n[e[o++]]+n[e[o++]]+"-"+n[e[o++]]+n[e[o++]]+n[e[o++]]+n[e[o++]]+n[e[o++]]+n[e[o++]]}for(var random$1=function(){if("undefined"!=typeof crypto&&crypto.getRandomValues){var e=new Uint8Array(16);return function(){return crypto.getRandomValues(e),e}}var t=Array(16);return function(){for(var e=0,o;16>e;e++)0==(3&e)&&(o=4294967296*Math.random()),t[e]=255&o>>>((3&e)<<3);return t}}(),byteToHex$1$1=[],i$1$2=0;256>i$1$2;i$1$2++)byteToHex$1$1[i$1$2]=(i$1$2+256).toString(16).substr(1);var seedBytes$1=random$1(),defaultNodeId$1=[1|seedBytes$1[0],seedBytes$1[1],seedBytes$1[2],seedBytes$1[3],seedBytes$1[4],seedBytes$1[5]],defaultClockseq$1=16383&(seedBytes$1[6]<<8|seedBytes$1[7]);function uuid4$1(){var e=0a;a++)t[n+a]=i[a];return t||stringifyUUID$1(i)}function _typeof$1(e){return _typeof$1="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_typeof$1(e)}var commonjsGlobal$1="undefined"==typeof globalThis?"undefined"==typeof window?"undefined"==typeof global?"undefined"==typeof self?{}:self:global:window:globalThis;function commonjsRequire$1(){throw new Error("Dynamic requires are not currently supported by rollup-plugin-commonjs")}function createCommonjsModule$1$1(e,t){return t={exports:{}},e(t,t.exports),t.exports}for(var moment$1=createCommonjsModule$1$1(function(e){var t=Math.round,o=Math.pow,n=Math.max,a=Math.abs,d=Math.min,s=Math.floor,r=Math.ceil;(function(t,o){e.exports=o()})(commonjsGlobal$1,function(){function l(){return $t.apply(null,arguments)}function u(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function p(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function h(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}function m(e){return void 0===e}function g(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function y(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function f(e,t){var o=[],n;for(n=0;nt.overflow&&!t.empty&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&o);if(e._strict&&(n=n&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour),null==Object.isFrozen||!Object.isFrozen(e))e._isValid=n;else return n}return e._isValid}function O(e){var t=k(NaN);return null==e?x(t).userInvalidated=!0:v(x(t),e),t}function D(e,t){var o,n,a;if(m(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),m(t._i)||(e._i=t._i),m(t._f)||(e._f=t._f),m(t._l)||(e._l=t._l),m(t._strict)||(e._strict=t._strict),m(t._tzm)||(e._tzm=t._tzm),m(t._isUTC)||(e._isUTC=t._isUTC),m(t._offset)||(e._offset=t._offset),m(t._pf)||(e._pf=x(t)),m(t._locale)||(e._locale=t._locale),0e?r(e)||0:s(e)}function M(e){var t=+e,o=0;return 0!=t&&isFinite(t)&&(o=C(t)),o}function I(e,t,o){var n=d(e.length,t.length),s=a(e.length-t.length),r=0,l;for(l=0;la;++a)s=k([2e3,a]),this._shortMonthsParse[a]=this.monthsShort(s,"").toLocaleLowerCase(),this._longMonthsParse[a]=this.months(s,"").toLocaleLowerCase();return o?"MMM"===t?(d=Ro.call(this._shortMonthsParse,n),-1===d?null:d):(d=Ro.call(this._longMonthsParse,n),-1===d?null:d):"MMM"===t?(d=Ro.call(this._shortMonthsParse,n),-1!==d)?d:(d=Ro.call(this._longMonthsParse,n),-1===d?null:d):(d=Ro.call(this._longMonthsParse,n),-1!==d)?d:(d=Ro.call(this._shortMonthsParse,n),-1===d?null:d)}function me(e,t,o){var n,a,d;if(this._monthsParseExact)return he.call(this,e,t,o);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),n=0;12>n;n++){if(a=k([2e3,n]),o&&!this._longMonthsParse[n]&&(this._longMonthsParse[n]=new RegExp("^"+this.months(a,"").replace(".","")+"$","i"),this._shortMonthsParse[n]=new RegExp("^"+this.monthsShort(a,"").replace(".","")+"$","i")),o||this._monthsParse[n]||(d="^"+this.months(a,"")+"|^"+this.monthsShort(a,""),this._monthsParse[n]=new RegExp(d.replace(".",""),"i")),o&&"MMMM"===t&&this._longMonthsParse[n].test(e))return n;if(o&&"MMM"===t&&this._shortMonthsParse[n].test(e))return n;if(!o&&this._monthsParse[n].test(e))return n}}function ge(e,t){var o;if(!e.isValid())return e;if("string"==typeof t)if(/^\d+$/.test(t))t=M(t);else if(t=e.localeData().monthsParse(t),!g(t))return e;return o=d(e.date(),pe(e.year(),t)),e._d["set"+(e._isUTC?"UTC":"")+"Month"](t,o),e}function ye(e){return null==e?re(this,"Month"):(ge(this,e),l.updateOffset(this,!0),this)}function fe(){function e(e,t){return t.length-e.length}var t=[],o=[],n=[],a,d;for(a=0;12>a;a++)d=k([2e3,a]),t.push(this.monthsShort(d,"")),o.push(this.months(d,"")),n.push(this.months(d,"")),n.push(this.monthsShort(d,""));for(t.sort(e),o.sort(e),n.sort(e),a=0;12>a;a++)t[a]=te(t[a]),o[a]=te(o[a]);for(a=0;24>a;a++)n[a]=te(n[a]);this._monthsRegex=new RegExp("^("+n.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+o.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+t.join("|")+")","i")}function be(e,t,o,n,i,a,d){var s;return 100>e&&0<=e?(s=new Date(e+400,t,o,n,i,a,d),isFinite(s.getFullYear())&&s.setFullYear(e)):s=new Date(e,t,o,n,i,a,d),s}function _e(e){var t;if(100>e&&0<=e){var o=Array.prototype.slice.call(arguments);o[0]=e+400,t=new Date(Date.UTC.apply(null,o)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)}else t=new Date(Date.UTC.apply(null,arguments));return t}function ve(e,t,o){var n=7+t-o,i=(7+_e(e,0,n).getUTCDay()-t)%7;return-i+n-1}function ke(e,t,o,n,i){var a=ve(e,n,i),d=1+7*(t-1)+(7+o-n)%7+a,s,r;return 0>=d?(s=e-1,r=ae(s)+d):d>ae(e)?(s=e+1,r=d-ae(e)):(s=e,r=d),{year:s,dayOfYear:r}}function we(e,t,o){var n=ve(e.year(),t,o),i=s((e.dayOfYear()-n-1)/7)+1,a,d;return 1>i?(d=e.year()-1,a=i+xe(d,t,o)):i>xe(e.year(),t,o)?(a=i-xe(e.year(),t,o),d=e.year()+1):(d=e.year(),a=i),{week:a,year:d}}function xe(e,t,o){var n=ve(e,t,o),i=ve(e+1,t,o);return(ae(e)-n+i)/7}function Se(e,t){return"string"==typeof e?isNaN(e)?(e=t.weekdaysParse(e),"number"==typeof e?e:null):parseInt(e,10):e}function Oe(e,t){return"string"==typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function De(e,t){return e.slice(t,7).concat(e.slice(0,t))}function Te(e,t,o){var n=e.toLocaleLowerCase(),a,d,s;if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],a=0;7>a;++a)s=k([2e3,1]).day(a),this._minWeekdaysParse[a]=this.weekdaysMin(s,"").toLocaleLowerCase(),this._shortWeekdaysParse[a]=this.weekdaysShort(s,"").toLocaleLowerCase(),this._weekdaysParse[a]=this.weekdays(s,"").toLocaleLowerCase();return o?"dddd"===t?(d=Ro.call(this._weekdaysParse,n),-1===d?null:d):"ddd"===t?(d=Ro.call(this._shortWeekdaysParse,n),-1===d?null:d):(d=Ro.call(this._minWeekdaysParse,n),-1===d?null:d):"dddd"===t?(d=Ro.call(this._weekdaysParse,n),-1!==d)?d:(d=Ro.call(this._shortWeekdaysParse,n),-1!==d)?d:(d=Ro.call(this._minWeekdaysParse,n),-1===d?null:d):"ddd"===t?(d=Ro.call(this._shortWeekdaysParse,n),-1!==d)?d:(d=Ro.call(this._weekdaysParse,n),-1!==d)?d:(d=Ro.call(this._minWeekdaysParse,n),-1===d?null:d):(d=Ro.call(this._minWeekdaysParse,n),-1!==d)?d:(d=Ro.call(this._weekdaysParse,n),-1!==d)?d:(d=Ro.call(this._shortWeekdaysParse,n),-1===d?null:d)}function Ee(e,t,o){var n,a,d;if(this._weekdaysParseExact)return Te.call(this,e,t,o);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),n=0;7>n;n++){if(a=k([2e3,1]).day(n),o&&!this._fullWeekdaysParse[n]&&(this._fullWeekdaysParse[n]=new RegExp("^"+this.weekdays(a,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[n]=new RegExp("^"+this.weekdaysShort(a,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[n]=new RegExp("^"+this.weekdaysMin(a,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[n]||(d="^"+this.weekdays(a,"")+"|^"+this.weekdaysShort(a,"")+"|^"+this.weekdaysMin(a,""),this._weekdaysParse[n]=new RegExp(d.replace(".",""),"i")),o&&"dddd"===t&&this._fullWeekdaysParse[n].test(e))return n;if(o&&"ddd"===t&&this._shortWeekdaysParse[n].test(e))return n;if(o&&"dd"===t&&this._minWeekdaysParse[n].test(e))return n;if(!o&&this._weekdaysParse[n].test(e))return n}}function Ce(){function e(e,t){return t.length-e.length}var t=[],o=[],n=[],a=[],d,s,r,l,c;for(d=0;7>d;d++)s=k([2e3,1]).day(d),r=this.weekdaysMin(s,""),l=this.weekdaysShort(s,""),c=this.weekdays(s,""),t.push(r),o.push(l),n.push(c),a.push(r),a.push(l),a.push(c);for(t.sort(e),o.sort(e),n.sort(e),a.sort(e),d=0;7>d;d++)o[d]=te(o[d]),n[d]=te(n[d]),a[d]=te(a[d]);this._weekdaysRegex=new RegExp("^("+a.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+o.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+t.join("|")+")","i")}function Me(){return this.hours()%12||12}function Ie(e,t){q(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function Pe(e,t){return t._meridiemParse}function Fe(e){return e?e.toLowerCase().replace("_","-"):e}function Ne(e){for(var t=0,o,n,a,d;t=o&&I(d,n,!0)>=o-1)break;o--}t++}return Jo}function Ye(t){var o=null;if(!Wo[t]&&!0&&e&&e.exports)try{o=Jo._abbr;commonjsRequire$1("./locale/"+t),Re(o)}catch(t){}return Wo[t]}function Re(e,t){var o;return e&&(o=m(t)?Be(e):ze(e,t),o?Jo=o:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),Jo._abbr}function ze(e,t){if(null!==t){var o=jo,n;if(t.abbr=e,null!=Wo[e])N("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),o=Wo[e]._config;else if(null!=t.parentLocale)if(null!=Wo[t.parentLocale])o=Wo[t.parentLocale]._config;else if(n=Ye(t.parentLocale),null!=n)o=n._config;else return Uo[t.parentLocale]||(Uo[t.parentLocale]=[]),Uo[t.parentLocale].push({name:e,config:t}),null;return Wo[e]=new B(z(o,t)),Uo[e]&&Uo[e].forEach(function(e){ze(e.name,e.config)}),Re(e),Wo[e]}return delete Wo[e],null}function Be(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return Jo;if(!u(e)){if(t=Ye(e),t)return t;e=[e]}return Ne(e)}function Le(){return to(Wo)}function Ae(e){var t=e._a,o;return t&&-2===x(e).overflow&&(o=0>t[1]||11t[2]||t[2]>pe(t[0],t[1])?2:0>t[3]||24t[4]||59t[5]||59t[6]||999o||2ae(s)||0===e._dayOfYear)&&(x(e)._overflowDayOfYear=!0),n=_e(s,0,e._dayOfYear),e._a[1]=n.getUTCMonth(),e._a[2]=n.getUTCDate()),o=0;3>o&&null==e._a[o];++o)e._a[o]=t[o]=a[o];for(;7>o;o++)e._a[o]=t[o]=null==e._a[o]?2===o?1:0:e._a[o];24===e._a[3]&&0===e._a[4]&&0===e._a[5]&&0===e._a[6]&&(e._nextDay=!0,e._a[3]=0),e._d=(e._useUTC?_e:be).apply(null,t),d=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[3]=24),e._w&&"undefined"!=typeof e._w.d&&e._w.d!==d&&(x(e).weekdayMismatch=!0)}}function Ue(e){var t,o,n,i,a,d,s,r;if(t=e._w,null!=t.GG||null!=t.W||null!=t.E)a=1,d=4,o=He(t.GG,e._a[0],we(st(),1,4).year),n=He(t.W,1),i=He(t.E,1),(1>i||7t.e||6i||6n||n>xe(o,a,d)?x(e)._overflowWeeks=!0:null==r?(s=ke(o,n,i,a,d),e._a[0]=s.year,e._dayOfYear=s.dayOfYear):x(e)._overflowWeekday=!0}function Ve(e){var t=e._i,o=Vo.exec(t)||Go.exec(t),n,a,d,s,r,c;if(o){for(x(e).iso=!0,n=0,a=Xo.length;n=t?2e3+t:999>=t?1900+t:t}function Xe(e){return e.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function Ze(e,t,o){if(e){var n=Lo.indexOf(e),i=new Date(t[0],t[1],t[2]).getDay();if(n!==i)return x(o).weekdayMismatch=!0,o._isValid=!1,!1}return!0}function $e(e,t,o){if(e)return Qo[e];if(t)return 0;var n=parseInt(o,10),i=n%100;return 60*((n-i)/100)+i}function Ke(e){var t=Ko.exec(Xe(e._i));if(t){var o=Ge(t[4],t[3],t[2],t[5],t[6],t[7]);if(!Ze(t[1],o,e))return;e._a=o,e._tzm=$e(t[8],t[9],t[10]),e._d=_e.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),x(e).rfc2822=!0}else e._isValid=!1}function Qe(e){var t=$o.exec(e._i);if(null!==t)return void(e._d=new Date(+t[1]));if(Ve(e),!1===e._isValid)delete e._isValid;else return;if(Ke(e),!1===e._isValid)delete e._isValid;else return;l.createFromInputFallback(e)}function Je(e){if(e._f===l.ISO_8601)return void Ve(e);if(e._f===l.RFC_2822)return void Ke(e);e._a=[],x(e).empty=!0;var t=""+e._i,o=t.length,n=0,a,d,s,r,c;for(s=K(e._f,e._locale).match(ao)||[],a=0;a=e._a[3]&&!0===x(e).bigHour&&0t&&(t+=12),n||12!==t||(t=0),t):e.meridiemHour(t,o)}function tt(e){var t,o,n,a,d;if(0===e._f.length)return x(e).invalidFormat=!0,void(e._d=new Date(NaN));for(a=0;ae?-1*t(-1*e):t(e)}function ht(e,t){q(e,0,0,function(){var e=this.utcOffset(),o="+";return 0>e&&(e=-e,o="-"),o+G(~~(e/60),2)+t+G(~~e%60,2)})}function mt(e,t){var o=(t||"").match(e);if(null===o)return null;var n=o[o.length-1]||[],i=(n+"").match(nn)||["-",0,0],a=+(60*i[1])+M(i[2]);return 0===a?0:"+"===i[0]?a:-a}function gt(e,t){var o,n;return t._isUTC?(o=t.clone(),n=(E(e)||y(e)?e.valueOf():st(e).valueOf())-o.valueOf(),o._d.setTime(o._d.valueOf()+n),l.updateOffset(o,!1),o):st(e).local()}function yt(e){return 15*-t(e._d.getTimezoneOffset()/15)}function ft(){if(!m(this._isDSTShifted))return this._isDSTShifted;var e={};if(D(e,this),e=it(e),e._a){var t=e._isUTC?k(e._a):st(e._a);this._isDSTShifted=this.isValid()&&0t-n?(i=e.clone().add(o-1,"months"),a=(t-n)/(n-i)):(i=e.clone().add(o+1,"months"),a=(t-n)/(i-n)),-(o+a)||0}function Dt(e){var t;return void 0===e?this._locale._abbr:(t=Be(e),null!=t&&(this._locale=t),this)}function Tt(){return this._locale}function Et(e,t){return(e%t+t)%t}function Ct(e,t,o){return 100>e&&0<=e?new Date(e+400,t,o)-12622780800000:new Date(e,t,o).valueOf()}function Mt(e,t,o){return 100>e&&0<=e?Date.UTC(e+400,t,o)-12622780800000:Date.UTC(e,t,o)}function It(e,t){q(0,[e,e.length],0,t)}function Pt(e,t,o,n,i){var a;return null==e?we(this,n,i).year:(a=xe(e,n,i),t>a&&(t=a),Ft.call(this,e,t,o,n,i))}function Ft(e,t,o,n,i){var a=ke(e,t,o,n,i),d=_e(a.year,0,a.dayOfYear);return this.year(d.getUTCFullYear()),this.month(d.getUTCMonth()),this.date(d.getUTCDate()),this}function Nt(e,t){t[6]=M(1e3*("0."+e))}function Yt(e){return e}function Rt(e,t,o,n){var i=Be(),a=k().set(n,t);return i[o](a,e)}function zt(e,t,o){if(g(e)&&(t=e,e=void 0),e=e||"",null!=t)return Rt(e,t,o,"month");var n=[],a;for(a=0;12>a;a++)n[a]=Rt(e,a,o,"month");return n}function Bt(e,t,o,n){"boolean"==typeof e?(g(t)&&(o=t,t=void 0),t=t||""):(t=e,o=t,e=!1,g(t)&&(o=t,t=void 0),t=t||"");var a=Be(),d=e?a._week.dow:0;if(null!=o)return Rt(t,(o+d)%7,n,"day");var s=[],r;for(r=0;7>r;r++)s[r]=Rt(t,(r+d)%7,n,"day");return s}function Lt(e,t,o,n){var i=_t(t,o);return e._milliseconds+=n*i._milliseconds,e._days+=n*i._days,e._months+=n*i._months,e._bubble()}function At(e){return 0>e?s(e):r(e)}function Ht(e){return 4800*e/146097}function jt(e){return 146097*e/4800}function Wt(e){return function(){return this.as(e)}}function Ut(e){return function(){return this.isValid()?this._data[e]:NaN}}function Vt(e,t,o,n,i){return i.relativeTime(t||1,!!o,e,n)}function Gt(e,t,o){var n=_t(e).abs(),i=Nn(n.as("s")),d=Nn(n.as("m")),s=Nn(n.as("h")),r=Nn(n.as("d")),l=Nn(n.as("M")),c=Nn(n.as("y")),u=i<=Yn.ss&&["s",i]||i=d&&["m"]||d=s&&["h"]||s=r&&["d"]||r=l&&["M"]||l=c&&["y"]||["yy",c];return u[2]=t,u[3]=0<+e,u[4]=o,Vt.apply(null,u)}function qt(e){return void 0===e?Nn:"function"==typeof e&&(Nn=e,!0)}function Xt(e){return(0e)||+e}function Zt(){if(!this.isValid())return this.localeData().invalidDate();var e=Rn(this._milliseconds)/1e3,t=Rn(this._days),o=Rn(this._months),n,i,a;n=C(e/60),i=C(n/60),e%=60,n%=60,a=C(o/12),o%=12;var d=a,r=o,l=t,c=i,u=n,p=e?e.toFixed(3).replace(/\.?0+$/,""):"",s=this.asSeconds();if(!s)return"P0D";var h=0>s?"-":"",m=Xt(this._months)===Xt(s)?"":"-",g=Xt(this._days)===Xt(s)?"":"-",y=Xt(this._milliseconds)===Xt(s)?"":"-";return h+"P"+(d?m+d+"Y":"")+(r?m+r+"M":"")+(l?g+l+"D":"")+(c||u||p?"T":"")+(c?y+c+"H":"")+(u?y+u+"M":"")+(p?y+p+"S":"")}var $t,Kt;Kt=Array.prototype.some?Array.prototype.some:function(e){for(var o=Object(this),t=o.length>>>0,n=0;n=e?""+e:"+"+e}),q(0,["YY",2],0,function(){return this.year()%100}),q(0,["YYYY",4],0,"year"),q(0,["YYYYY",5],0,"year"),q(0,["YYYYYY",6,!0],0,"year"),H("year","y"),U("year",1),Q("Y",wo),Q("YY",go,uo),Q("YYYY",_o,ho),Q("YYYYY",vo,mo),Q("YYYYYY",vo,mo),oe(["YYYYY","YYYYYY"],Co),oe("YYYY",function(e,t){t[Co]=2===e.length?l.parseTwoDigitYear(e):M(e)}),oe("YY",function(e,t){t[Co]=l.parseTwoDigitYear(e)}),oe("Y",function(e,t){t[Co]=parseInt(e,10)}),l.parseTwoDigitYear=function(e){return M(e)+(68this?this:e:O()}),on=["year","quarter","month","week","day","hour","minute","second","millisecond"];ht("Z",":"),ht("ZZ",""),Q("Z",So),Q("ZZ",So),oe(["Z","ZZ"],function(e,t,o){o._useUTC=!0,o._tzm=mt(So,e)});var nn=/([\+\-]|\d\d)/gi;l.updateOffset=function(){};var an=/^(\-|\+)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,dn=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;_t.fn=ct.prototype,_t.invalid=function(){return _t(NaN)};var sn=xt(1,"add"),rn=xt(-1,"subtract");l.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",l.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var ln=F("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return void 0===e?this.localeData():this.locale(e)});q(0,["gg",2],0,function(){return this.weekYear()%100}),q(0,["GG",2],0,function(){return this.isoWeekYear()%100}),It("gggg","weekYear"),It("ggggg","weekYear"),It("GGGG","isoWeekYear"),It("GGGGG","isoWeekYear"),H("weekYear","gg"),H("isoWeekYear","GG"),U("weekYear",1),U("isoWeekYear",1),Q("G",wo),Q("g",wo),Q("GG",go,uo),Q("gg",go,uo),Q("GGGG",_o,ho),Q("gggg",_o,ho),Q("GGGGG",vo,mo),Q("ggggg",vo,mo),ne(["gggg","ggggg","GGGG","GGGGG"],function(e,t,o,n){t[n.substr(0,2)]=M(e)}),ne(["gg","GG"],function(e,t,o,n){t[n]=l.parseTwoDigitYear(e)}),q("Q",0,"Qo","quarter"),H("quarter","Q"),U("quarter",7),Q("Q",co),oe("Q",function(e,t){t[Mo]=3*(M(e)-1)}),q("D",["DD",2],"Do","date"),H("date","D"),U("date",9),Q("D",go),Q("DD",go,uo),Q("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient}),oe(["D","DD"],Io),oe("Do",function(e,t){t[Io]=M(e.match(go)[0])});var cn=se("Date",!0);q("DDD",["DDDD",3],"DDDo","dayOfYear"),H("dayOfYear","DDD"),U("dayOfYear",4),Q("DDD",bo),Q("DDDD",po),oe(["DDD","DDDD"],function(e,t,o){o._dayOfYear=M(e)}),q("m",["mm",2],0,"minute"),H("minute","m"),U("minute",14),Q("m",go),Q("mm",go,uo),oe(["m","mm"],Fo);var un=se("Minutes",!1);q("s",["ss",2],0,"second"),H("second","s"),U("second",15),Q("s",go),Q("ss",go,uo),oe(["s","ss"],No);var pn=se("Seconds",!1);q("S",0,0,function(){return~~(this.millisecond()/100)}),q(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),q(0,["SSS",3],0,"millisecond"),q(0,["SSSS",4],0,function(){return 10*this.millisecond()}),q(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),q(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),q(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),q(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),q(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),H("millisecond","ms"),U("millisecond",16),Q("S",bo,co),Q("SS",bo,uo),Q("SSS",bo,po);var hn;for(hn="SSSS";9>=hn.length;hn+="S")Q(hn,ko);for(hn="S";9>=hn.length;hn+="S")oe(hn,Nt);var mn=se("Milliseconds",!1);q("z",0,0,"zoneAbbr"),q("zz",0,0,"zoneName");var gn=T.prototype;gn.add=sn,gn.calendar=function(e,t){var o=e||st(),n=gt(o,this).startOf("day"),i=l.calendarFormat(this,n)||"sameElse",a=t&&(Y(t[i])?t[i].call(this,o):t[i]);return this.format(a||this.localeData().calendar(i,this,st(o)))},gn.clone=function(){return new T(this)},gn.diff=function(e,t,o){var n,i,a;return this.isValid()?(n=gt(e,this),!n.isValid())?NaN:(i=6e4*(n.utcOffset()-this.utcOffset()),t=j(t),(a="year"===t?Ot(this,n)/12:"month"===t?Ot(this,n):"quarter"===t?Ot(this,n)/3:"second"===t?(this-n)/1e3:"minute"===t?(this-n)/6e4:"hour"===t?(this-n)/36e5:"day"===t?(this-n-i)/864e5:"week"===t?(this-n-i)/6048e5:this-n,o?a:C(a))):NaN},gn.endOf=function(e){var t;if(e=j(e),void 0===e||"millisecond"===e||!this.isValid())return this;var o=this._isUTC?Mt:Ct;return"year"===e?t=o(this.year()+1,0,1)-1:"quarter"===e?t=o(this.year(),this.month()-this.month()%3+3,1)-1:"month"===e?t=o(this.year(),this.month()+1,1)-1:"week"===e?t=o(this.year(),this.month(),this.date()-this.weekday()+7)-1:"isoWeek"===e?t=o(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1:"day"===e||"date"===e?t=o(this.year(),this.month(),this.date()+1)-1:"hour"===e?(t=this._d.valueOf(),t+=3600000-Et(t+(this._isUTC?0:60000*this.utcOffset()),3600000)-1):"minute"===e?(t=this._d.valueOf(),t+=60000-Et(t,60000)-1):"second"===e?(t=this._d.valueOf(),t+=1000-Et(t,1000)-1):void 0,this._d.setTime(t),l.updateOffset(this,!0),this},gn.format=function(e){e||(e=this.isUtc()?l.defaultFormatUtc:l.defaultFormat);var t=$(this,e);return this.localeData().postformat(t)},gn.from=function(e,t){return this.isValid()&&(E(e)&&e.isValid()||st(e).isValid())?_t({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},gn.fromNow=function(e){return this.from(st(),e)},gn.to=function(e,t){return this.isValid()&&(E(e)&&e.isValid()||st(e).isValid())?_t({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},gn.toNow=function(e){return this.to(st(),e)},gn.get=function(e){return e=j(e),Y(this[e])?this[e]():this},gn.invalidAt=function(){return x(this).overflow},gn.isAfter=function(e,t){var o=E(e)?e:st(e);return!!(this.isValid()&&o.isValid())&&(t=j(t)||"millisecond","millisecond"===t?this.valueOf()>o.valueOf():o.valueOf()o.year()||9999=this.year()?"YYYY":"YYYYYY",i=t+"[\")]";return this.format(o+n+"-MM-DD[T]HH:mm:ss.SSS"+i)},gn.toJSON=function(){return this.isValid()?this.toISOString():null},gn.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},gn.unix=function(){return s(this.valueOf()/1e3)},gn.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},gn.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},gn.year=Yo,gn.isLeapYear=function(){return de(this.year())},gn.weekYear=function(e){return Pt.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},gn.isoWeekYear=function(e){return Pt.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)},gn.quarter=gn.quarters=function(e){return null==e?r((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)},gn.month=ye,gn.daysInMonth=function(){return pe(this.year(),this.month())},gn.week=gn.weeks=function(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")},gn.isoWeek=gn.isoWeeks=function(e){var t=we(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")},gn.weeksInYear=function(){var e=this.localeData()._week;return xe(this.year(),e.dow,e.doy)},gn.isoWeeksInYear=function(){return xe(this.year(),1,4)},gn.date=cn,gn.day=gn.days=function(e){if(!this.isValid())return null==e?NaN:this;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return null==e?t:(e=Se(e,this.localeData()),this.add(e-t,"d"))},gn.weekday=function(e){if(!this.isValid())return null==e?NaN:this;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")},gn.isoWeekday=function(e){if(!this.isValid())return null==e?NaN:this;if(null!=e){var t=Oe(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7},gn.dayOfYear=function(e){var o=t((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?o:this.add(e-o,"d")},gn.hour=gn.hours=Ho,gn.minute=gn.minutes=un,gn.second=gn.seconds=pn,gn.millisecond=gn.milliseconds=mn,gn.utcOffset=function(e,t,o){var n=this._offset||0,i;if(!this.isValid())return null==e?NaN:this;if(null!=e){if("string"!=typeof e)16>a(e)&&!o&&(e*=60);else if(e=mt(So,e),null===e)return this;return!this._isUTC&&t&&(i=yt(this)),this._offset=e,this._isUTC=!0,null!=i&&this.add(i,"m"),n!==e&&(!t||this._changeInProgress?St(this,_t(e-n,"m"),1,!1):!this._changeInProgress&&(this._changeInProgress=!0,l.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?n:yt(this)},gn.utc=function(e){return this.utcOffset(0,e)},gn.local=function(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(yt(this),"m")),this},gn.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var e=mt(xo,this._i);null==e?this.utcOffset(0,!0):this.utcOffset(e)}return this},gn.hasAlignedHourOffset=function(e){return!!this.isValid()&&(e=e?st(e).utcOffset():0,0==(this.utcOffset()-e)%60)},gn.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},gn.isLocal=function(){return!!this.isValid()&&!this._isUTC},gn.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},gn.isUtc=bt,gn.isUTC=bt,gn.zoneAbbr=function(){return this._isUTC?"UTC":""},gn.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},gn.dates=F("dates accessor is deprecated. Use date instead.",cn),gn.months=F("months accessor is deprecated. Use month instead",ye),gn.years=F("years accessor is deprecated. Use year instead",Yo),gn.zone=F("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",function(e,t){return null==e?-this.utcOffset():("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this)}),gn.isDSTShifted=F("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",ft);var yn=B.prototype;yn.calendar=L,yn.longDateFormat=A,yn.invalidDate=function(){return this._invalidDate},yn.ordinal=function(e){return this._ordinal.replace("%d",e)},yn.preparse=Yt,yn.postformat=Yt,yn.relativeTime=function(e,t,o,n){var i=this._relativeTime[o];return Y(i)?i(e,t,o,n):i.replace(/%d/i,e)},yn.pastFuture=function(e,t){var o=this._relativeTime[0=e&&0>=t&&0>=o||(e+=864e5*At(jt(o)+t),t=0,o=0),n.milliseconds=e%1e3,i=C(e/1e3),n.seconds=i%60,a=C(i/60),n.minutes=a%60,d=C(a/60),n.hours=d%24,t+=C(d/24),r=C(Ht(t)),o+=r,t-=At(jt(r)),s=C(o/12),o%=12,n.days=t,n.months=o,n.years=s,this},zn.clone=function(){return _t(this)},zn.get=function(e){return e=j(e),this.isValid()?this[e+"s"]():NaN},zn.milliseconds=Tn,zn.seconds=En,zn.minutes=Cn,zn.hours=Mn,zn.days=In,zn.weeks=function(){return C(this.days()/7)},zn.months=Pn,zn.years=Fn,zn.humanize=function(e){if(!this.isValid())return this.localeData().invalidDate();var t=this.localeData(),o=Gt(this,!e,t);return e&&(o=t.pastFuture(+this,o)),t.postformat(o)},zn.toISOString=Zt,zn.toString=Zt,zn.toJSON=Zt,zn.locale=Dt,zn.localeData=Tt,zn.toIsoString=F("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Zt),zn.lang=ln,q("X",0,0,"unix"),q("x",0,0,"valueOf"),Q("x",wo),Q("X",Oo),oe("X",function(e,t,o){o._d=new Date(1e3*parseFloat(e,10))}),oe("x",function(e,t,o){o._d=new Date(M(e))}),l.version="2.24.0",function(e){$t=e}(st),l.fn=gn,l.min=function(){var e=[].slice.call(arguments,0);return rt("isBefore",e)},l.max=function(){var e=[].slice.call(arguments,0);return rt("isAfter",e)},l.now=function(){return Date.now?Date.now():+new Date},l.utc=k,l.unix=function(e){return st(1e3*e)},l.months=function(e,t){return zt(e,t,"months")},l.isDate=y,l.locale=Re,l.invalid=O,l.duration=_t,l.isMoment=E,l.weekdays=function(e,t,o){return Bt(e,t,o,"weekdays")},l.parseZone=function(){return st.apply(null,arguments).parseZone()},l.localeData=Be,l.isDuration=ut,l.monthsShort=function(e,t){return zt(e,t,"monthsShort")},l.weekdaysMin=function(e,t,o){return Bt(e,t,o,"weekdaysMin")},l.defineLocale=ze,l.updateLocale=function(e,t){if(null!=t){var o=jo,n,i;i=Ye(e),null!=i&&(o=i._config),t=z(o,t),n=new B(t),n.parentLocale=Wo[e],Wo[e]=n,Re(e)}else null!=Wo[e]&&(null==Wo[e].parentLocale?null!=Wo[e]&&delete Wo[e]:Wo[e]=Wo[e].parentLocale);return Wo[e]},l.locales=Le,l.weekdaysShort=function(e,t,o){return Bt(e,t,o,"weekdaysShort")},l.normalizeUnits=j,l.relativeTimeRounding=qt,l.relativeTimeThreshold=function(e,t){return void 0!==Yn[e]&&(void 0===t?Yn[e]:(Yn[e]=t,"s"===e&&(Yn.ss=t-1),!0))},l.calendarFormat=function(e,t){var o=e.diff(t,"days",!0);return-6>o?"sameElse":-1>o?"lastWeek":0>o?"lastDay":1>o?"sameDay":2>o?"nextDay":7>o?"nextWeek":"sameElse"},l.prototype=gn,l.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},l})}),byteToHex$2$1=[],i$2$1=0;256>i$2$1;i$2$1++)byteToHex$2$1[i$2$1]=(i$2$1+256).toString(16).substr(1);for(var random$1$1=function(){if("undefined"!=typeof crypto&&crypto.getRandomValues){var e=new Uint8Array(16);return function(){return crypto.getRandomValues(e),e}}var t=Array(16);return function(){for(var e=0,o;16>e;e++)0==(3&e)&&(o=4294967296*Math.random()),t[e]=255&o>>>((3&e)<<3);return t}}(),byteToHex$1$1$1=[],i$1$1$1=0;256>i$1$1$1;i$1$1$1++)byteToHex$1$1$1[i$1$1$1]=(i$1$1$1+256).toString(16).substr(1);var seedBytes$1$1=random$1$1(),defaultNodeId$1$1=[1|seedBytes$1$1[0],seedBytes$1$1[1],seedBytes$1$1[2],seedBytes$1$1[3],seedBytes$1$1[4],seedBytes$1$1[5]],defaultClockseq$1$1=16383&(seedBytes$1$1[6]<<8|seedBytes$1$1[7]),ASPDateRegex$1=/^\/?Date\((-?\d+)/i;function isNumber$1(e){return e instanceof Number||"number"==typeof e}function isString$1(e){return e instanceof String||"string"==typeof e}function isMoment$1(e){return moment$1.isMoment(e)}function convert$1(e,t){var o;if(void 0!==e){if(null===e)return null;if(!t)return e;if("string"!=typeof t&&!(t instanceof String))throw new Error("Type must be a string");switch(t){case"boolean":case"Boolean":return!!e;case"number":case"Number":return isString$1(e)&&!isNaN(Date.parse(e))?moment$1(e).valueOf():+e.valueOf();case"string":case"String":return e+"";case"Date":if(isNumber$1(e))return new Date(e);if(e instanceof Date)return new Date(e.valueOf());if(isMoment$1(e))return new Date(e.valueOf());if(isString$1(e))return o=ASPDateRegex$1.exec(e),o?new Date(+o[1]):moment$1(new Date(e)).toDate();throw new Error("Cannot convert object of type "+getType$1(e)+" to type Date");case"Moment":if(isNumber$1(e))return moment$1(e);if(e instanceof Date)return moment$1(e.valueOf());if(isMoment$1(e))return moment$1(e);if(isString$1(e))return o=ASPDateRegex$1.exec(e),o?moment$1(+o[1]):moment$1(e);throw new Error("Cannot convert object of type "+getType$1(e)+" to type Date");case"ISODate":if(isNumber$1(e))return new Date(e);if(e instanceof Date)return e.toISOString();if(isMoment$1(e))return e.toDate().toISOString();if(isString$1(e))return o=ASPDateRegex$1.exec(e),o?new Date(+o[1]).toISOString():moment$1(e).format();throw new Error("Cannot convert object of type "+getType$1(e)+" to type ISODate");case"ASPDate":if(isNumber$1(e))return"/Date("+e+")/";if(e instanceof Date)return"/Date("+e.valueOf()+")/";if(isString$1(e)){o=ASPDateRegex$1.exec(e);var n;return n=o?new Date(+o[1]).valueOf():new Date(e).valueOf(),"/Date("+n+")/"}throw new Error("Cannot convert object of type "+getType$1(e)+" to type ASPDate");default:throw new Error("Unknown type ".concat(t));}}}function getType$1(e){var t=_typeof$1(e);return"object"===t?null===e?"null":e instanceof Boolean?"Boolean":e instanceof Number?"Number":e instanceof String?"String":Array.isArray(e)?"Array":e instanceof Date?"Date":"Object":"number"===t?"Number":"boolean"===t?"Boolean":"string"===t?"String":void 0===t?"undefined":t}function isId(e){return"string"==typeof e||"number"==typeof e}var Queue=function(){function e(t){classCallCheck(this,e),this._queue=[],this._timeout=null,this._extended=null,this.delay=null,this.max=1/0,this.setOptions(t)}return createClass(e,[{key:"setOptions",value:function(e){e&&"undefined"!=typeof e.delay&&(this.delay=e.delay),e&&"undefined"!=typeof e.max&&(this.max=e.max),this._flushIfNeeded()}},{key:"destroy",value:function(){if(this.flush(),this._extended){for(var e=this._extended.object,t=this._extended.methods,o=0,n;othis.max&&this.flush(),null!=this._timeout&&(clearTimeout(this._timeout),this._timeout=null),0i?1:na)&&(e=l,a=c)}return e}},{key:"min",value:function e(t){for(var o=this._data,n=Object.keys(o),e=null,a=null,d=0,s=n.length;ds;s++)l=0==s%2?1.3*o:.5*o,this.lineTo(e+l*a(2*s*d/10),t-l*i(2*s*d/10));this.closePath()},CanvasRenderingContext2D.prototype.diamond=function(e,t,o){this.beginPath(),this.lineTo(e,t+o),this.lineTo(e+o,t),this.lineTo(e,t-o),this.lineTo(e-o,t),this.closePath()},CanvasRenderingContext2D.prototype.roundRect=function(e,t,o,n,i){var a=Math.PI/180;0>o-2*i&&(i=o/2),0>n-2*i&&(i=n/2),this.beginPath(),this.moveTo(e+i,t),this.lineTo(e+o-i,t),this.arc(e+o-i,t+i,i,270*a,360*a,!1),this.lineTo(e+o,t+n-i),this.arc(e+o-i,t+n-i,i,0,90*a,!1),this.lineTo(e+i,t+n),this.arc(e+i,t+n-i,i,90*a,180*a,!1),this.lineTo(e,t+i),this.arc(e+i,t+i,i,180*a,270*a,!1),this.closePath()},CanvasRenderingContext2D.prototype.ellipse_vis=function(e,t,o,n){var i=.5522848,a=o/2*i,d=n/2*i,s=e+o,r=t+n,l=e+o/2,c=t+n/2;this.beginPath(),this.moveTo(e,c),this.bezierCurveTo(e,c-d,l-a,t,l,t),this.bezierCurveTo(l+a,t,s,c-d,s,c),this.bezierCurveTo(s,c+d,l+a,r,l,r),this.bezierCurveTo(l-a,r,e,c+d,e,c),this.closePath()},CanvasRenderingContext2D.prototype.database=function(e,t,o,n){var i=o,a=n*(1/3),d=.5522848,s=i/2*d,r=a/2*d,l=e+i,c=t+a,u=e+i/2,p=t+a/2,h=t+(n-a/2),m=t+n;this.beginPath(),this.moveTo(l,p),this.bezierCurveTo(l,p+r,u+s,c,u,c),this.bezierCurveTo(u-s,c,e,p+r,e,p),this.bezierCurveTo(e,p-r,u-s,t,u,t),this.bezierCurveTo(u+s,t,l,p-r,l,p),this.lineTo(l,h),this.bezierCurveTo(l,h+r,u+s,m,u,m),this.bezierCurveTo(u-s,m,e,h+r,e,h),this.lineTo(e,p)},CanvasRenderingContext2D.prototype.dashedLine=function(e,t,o,n,i){var a=Math.sqrt;this.beginPath(),this.moveTo(e,t);for(var d=i.length,s=o-e,r=n-t,l=r/s,c=a(s*s+r*r),u=0,p=!0,h=0,m=i[0];.1<=c;)m=i[u++%d],m>c&&(m=c),h=a(m*m/(1+l*l)),h=0>s?-h:h,e+=h,t+=l*h,!0===p?this.lineTo(e,t):this.moveTo(e,t),c-=m,p=!p},CanvasRenderingContext2D.prototype.hexagon=function(e,t,o){this.beginPath();var n=2*Math.PI/6;this.moveTo(e+o,t);for(var a=1;a<6;a++)this.lineTo(e+o*Math.cos(n*a),t+o*Math.sin(n*a));this.closePath()});var commonjsGlobal$2="undefined"==typeof globalThis?"undefined"==typeof window?"undefined"==typeof global?"undefined"==typeof self?{}:self:global:window:globalThis;function commonjsRequire$2(){throw new Error("Dynamic requires are not currently supported by rollup-plugin-commonjs")}function unwrapExports(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e["default"]:e}function createCommonjsModule$2(e,t){return t={exports:{}},e(t,t.exports),t.exports}function getCjsExportFromNamespace(e){return e&&e["default"]||e}var componentEmitter=createCommonjsModule$2(function(e){function t(e){if(e)return o(e)}function o(e){for(var o in t.prototype)e[o]=t.prototype[o];return e}e.exports=t,t.prototype.on=t.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},t.prototype.once=function(e,t){function o(){this.off(e,o),t.apply(this,arguments)}return o.fn=t,this.on(e,o),this},t.prototype.off=t.prototype.removeListener=t.prototype.removeAllListeners=t.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var o=this._callbacks["$"+e];if(!o)return this;if(1==arguments.length)return delete this._callbacks["$"+e],this;for(var n=0,a;n":!0,"--":!0},dot="",index$1=0,c="",token="",tokenType=TOKENTYPE.NULL;function first(){index$1=0,c=dot.charAt(0)}function next(){index$1++,c=dot.charAt(index$1)}function nextPreview(){return dot.charAt(index$1+1)}var regexAlphaNumeric=/[a-zA-Z_0-9.:#]/;function isAlphaNumeric(e){return regexAlphaNumeric.test(e)}function merge(e,t){if(e||(e={}),t)for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o]);return e}function setValue(e,t,n){for(var i=t.split("."),a=e;i.length;){var d=i.shift();i.length?(!a[d]&&(a[d]={}),a=a[d]):a[d]=n}}function addNode(e,t){for(var o=null,n=[e],a=e,d,s;a.parent;)n.push(a.parent),a=a.parent;if(a.nodes)for(d=0,s=a.nodes.length;d"===token||"--"===token;){var o=token,n;getToken();var i=parseSubgraph(e);if(i)n=i;else{if(tokenType!=TOKENTYPE.IDENTIFIER)throw newSyntaxError("Identifier or subgraph expected");n=token,addNode(e,{id:n}),getToken()}var a=parseAttributeList(),d=createEdge(e,t,n,o,a);addEdge(e,d),t=n}}function parseAttributeList(){for(var e=null,t={dashed:!0,solid:!1,dotted:[1,5]},o={dot:"circle",box:"box",crow:"crow",curve:"curve",icurve:"inv_curve",normal:"triangle",inv:"inv_triangle",diamond:"diamond",tee:"bar",vee:"vee"},n=[],a=[],d;"["===token;){for(getToken(),e={};""!==token&&"]"!=token;){if(tokenType!=TOKENTYPE.IDENTIFIER)throw newSyntaxError("Attribute name expected");var s=token;if(getToken(),"="!=token)throw newSyntaxError("Equal sign = expected");if(getToken(),tokenType!=TOKENTYPE.IDENTIFIER)throw newSyntaxError("Attribute value expected");var r=token;"style"===s&&(r=t[r]);var l;"arrowhead"===s&&(l=o[r],s="arrows",r={to:{enabled:!0,type:l}}),"arrowtail"===s&&(l=o[r],s="arrows",r={from:{enabled:!0,type:l}}),n.push({attr:e,name:s,value:r}),a.push(s),getToken(),","==token&&getToken()}if("]"!=token)throw newSyntaxError("Bracket ] expected");getToken()}if(a.includes("dir")){var c={arrows:{}};for(d=0;d"===e.type&&(t.arrows="to"),t};t.edges.forEach(function(e){var t,i;t=e.from instanceof Object?e.from.nodes:{id:e.from},i=e.to instanceof Object?e.to.nodes:{id:e.to},e.from instanceof Object&&e.from.edges&&e.from.edges.forEach(function(e){var t=n(e);o.edges.push(t)}),forEach2(t,i,function(t,i){var a=createEdge(o,t.id,i.id,e.type,e.attr),d=n(a);o.edges.push(d)}),e.to instanceof Object&&e.to.edges&&e.to.edges.forEach(function(e){var t=n(e);o.edges.push(t)})})}return t.attr&&(o.options=t.attr),o}var parseDOT_1=parseDOT,DOTToGraph_1=DOTToGraph,dotparser={parseDOT:parseDOT_1,DOTToGraph:DOTToGraph_1},dotparser$1=Object.freeze({default:dotparser,__moduleExports:dotparser,parseDOT:parseDOT_1,DOTToGraph:DOTToGraph_1});function parseGephi(e,t){var o={edges:{inheritColor:!1},nodes:{fixed:!1,parseColor:!1}};null!=t&&(null!=t.fixed&&(o.nodes.fixed=t.fixed),null!=t.parseColor&&(o.nodes.parseColor=t.parseColor),null!=t.inheritColor&&(o.edges.inheritColor=t.inheritColor));var n=e.edges,i=n.map(function(e){var t={from:e.source,id:e.id,to:e.target};return null!=e.attributes&&(t.attributes=e.attributes),null!=e.label&&(t.label=e.label),null!=e.attributes&&null!=e.attributes.title&&(t.title=e.attributes.title),"Directed"===e.type&&(t.arrows="to"),e.color&&!1===o.edges.inheritColor&&(t.color=e.color),t}),a=e.nodes.map(function(e){var t={id:e.id,fixed:o.nodes.fixed&&null!=e.x&&null!=e.y};return null!=e.attributes&&(t.attributes=e.attributes),null!=e.label&&(t.label=e.label),null!=e.size&&(t.size=e.size),null!=e.attributes&&null!=e.attributes.title&&(t.title=e.attributes.title),null!=e.title&&(t.title=e.title),null!=e.x&&(t.x=e.x),null!=e.y&&(t.y=e.y),null!=e.color&&(!0===o.nodes.parseColor?t.color=e.color:t.color={background:e.color,border:e.color,highlight:{background:e.color,border:e.color},hover:{background:e.color,border:e.color}}),t});return{nodes:a,edges:i}}var gephiParser=Object.freeze({parseGephi:parseGephi}),Activator=Object.freeze({}),keycharm=createCommonjsModule$2(function(e){(function(t,o){e.exports=o()})(commonjsGlobal$2,function(){function e(e){var t=String.fromCharCode,o=e&&e.preventDefault||!1,n=e&&e.container||window,a={},d={keydown:{},keyup:{}},s={},r;for(r=97;122>=r;r++)s[t(r)]={code:65+(r-97),shift:!1};for(r=65;90>=r;r++)s[t(r)]={code:r,shift:!0};for(r=0;9>=r;r++)s[""+r]={code:48+r,shift:!1};for(r=1;12>=r;r++)s["F"+r]={code:111+r,shift:!1};for(r=0;9>=r;r++)s["num"+r]={code:96+r,shift:!1};s["num*"]={code:106,shift:!1},s["num+"]={code:107,shift:!1},s["num-"]={code:109,shift:!1},s["num/"]={code:111,shift:!1},s["num."]={code:110,shift:!1},s.left={code:37,shift:!1},s.up={code:38,shift:!1},s.right={code:39,shift:!1},s.down={code:40,shift:!1},s.space={code:32,shift:!1},s.enter={code:13,shift:!1},s.shift={code:16,shift:void 0},s.esc={code:27,shift:!1},s.backspace={code:8,shift:!1},s.tab={code:9,shift:!1},s.ctrl={code:17,shift:!1},s.alt={code:18,shift:!1},s["delete"]={code:46,shift:!1},s.pageup={code:33,shift:!1},s.pagedown={code:34,shift:!1},s["="]={code:187,shift:!1},s["-"]={code:189,shift:!1},s["]"]={code:221,shift:!1},s["["]={code:219,shift:!1};var l=function(e){u(e,"keydown")},c=function(e){u(e,"keyup")},u=function(e,t){if(void 0!==d[t][e.keyCode]){for(var n=d[t][e.keyCode],a=0;ae.distance,l=250>e.deltaTime;if(s&&r&&l)return}return d&&a?void 0:i||a&&o&DIRECTION_HORIZONTAL||d&&o&DIRECTION_VERTICAL?this.preventSrc(t):void 0},t.preventSrc=function(e){this.manager.session.prevented=!0,e.preventDefault()},e}();function hasParent$1(e,t){for(;e;){if(e===t)return!0;e=e.parentNode}return!1}function getCenter(e){var t=e.length;if(1===t)return{x:round(e[0].clientX),y:round(e[0].clientY)};for(var o=0,n=0,a=0;a=abs(t)?0>e?DIRECTION_LEFT:DIRECTION_RIGHT:0>t?DIRECTION_UP:DIRECTION_DOWN}function computeDeltaXY(e,t){var o=t.center,n=e.offsetDelta||{},i=e.prevDelta||{},a=e.prevInput||{};(t.eventType===INPUT_START||a.eventType===INPUT_END)&&(i=e.prevDelta={x:a.deltaX||0,y:a.deltaY||0},n=e.offsetDelta={x:o.x,y:o.y}),t.deltaX=i.x+(o.x-n.x),t.deltaY=i.y+(o.y-n.y)}function getVelocity(e,t,o){return{x:t/e||0,y:o/e||0}}function getScale(e,t){return getDistance(t[0],t[1],PROPS_CLIENT_XY)/getDistance(e[0],e[1],PROPS_CLIENT_XY)}function getRotation(e,t){return getAngle(t[1],t[0],PROPS_CLIENT_XY)+getAngle(e[1],e[0],PROPS_CLIENT_XY)}function computeIntervalInputData(e,t){var o=e.lastInterval||t,n=t.timeStamp-o.timeStamp,i,a,d,s;if(t.eventType!==INPUT_CANCEL&&(n>COMPUTE_INTERVAL||o.velocity===void 0)){var r=t.deltaX-o.deltaX,l=t.deltaY-o.deltaY,c=getVelocity(n,r,l);a=c.x,d=c.y,i=abs(c.x)>abs(c.y)?c.x:c.y,s=getDirection(r,l),e.lastInterval=t}else i=o.velocity,a=o.velocityX,d=o.velocityY,s=o.direction;t.velocity=i,t.velocityX=a,t.velocityY=d,t.direction=s}function computeInputData(e,t){var o=e.session,n=t.pointers,i=n.length;o.firstInput||(o.firstInput=simpleCloneInputData(t)),1abs(l.y)?l.x:l.y,t.scale=d?getScale(d.pointers,n):1,t.rotation=d?getRotation(d.pointers,n):0,t.maxPointers=o.prevInput?t.pointers.length>o.prevInput.maxPointers?t.pointers.length:o.prevInput.maxPointers:t.pointers.length,computeIntervalInputData(o,t);var c=e.element;hasParent$1(t.srcEvent.target,c)&&(c=t.srcEvent.target),t.target=c}function inputHandler(e,t,o){var n=o.pointers.length,i=o.changedPointers.length,a=t&INPUT_START&&0==n-i;o.isFirst=!!a,o.isFinal=!!(t&(INPUT_END|INPUT_CANCEL)&&0==n-i),a&&(e.session={}),o.eventType=t,computeInputData(e,o),e.emit("hammer.input",o),e.recognize(o),e.session.prevInput=o}function splitStr(e){return e.trim().split(/\s+/g)}function addEventListeners(e,t,o){each(splitStr(t),function(t){e.addEventListener(t,o,!1)})}function removeEventListeners(e,t,o){each(splitStr(t),function(t){e.removeEventListener(t,o,!1)})}function getWindowForElement(e){var t=e.ownerDocument||e;return t.defaultView||t.parentWindow||window}var Input=function(){function e(e,t){var o=this;this.manager=e,this.callback=t,this.element=e.element,this.target=e.options.inputTarget,this.domHandler=function(t){boolOrFn(e.options.enable,[e])&&o.handler(t)},this.init()}var t=e.prototype;return t.handler=function(){},t.init=function(){this.evEl&&addEventListeners(this.element,this.evEl,this.domHandler),this.evTarget&&addEventListeners(this.target,this.evTarget,this.domHandler),this.evWin&&addEventListeners(getWindowForElement(this.element),this.evWin,this.domHandler)},t.destroy=function(){this.evEl&&removeEventListeners(this.element,this.evEl,this.domHandler),this.evTarget&&removeEventListeners(this.target,this.evTarget,this.domHandler),this.evWin&&removeEventListeners(getWindowForElement(this.element),this.evWin,this.domHandler)},e}();function inArray(e,t,o){if(e.indexOf&&!o)return e.indexOf(t);for(var n=0;nd&&(t.push(e),d=t.length-1):i&(INPUT_END|INPUT_CANCEL)&&(o=!0),0>d||(t[d]=e,this.callback(this.manager,i,{pointers:t,changedPointers:[e],pointerType:a,srcEvent:e}),o&&t.splice(d,1))},t}(Input);function toArray$1(e){return Array.prototype.slice.call(e,0)}function uniqueArray(e,t,o){for(var n=[],a=[],d=0,s;dinArray(a,s)&&n.push(e[d]),a[d]=s,d++;return o&&(t?n=n.sort(function(e,o){return e[t]>o[t]}):n=n.sort()),n}var TOUCH_INPUT_MAP={touchstart:INPUT_START,touchmove:INPUT_MOVE,touchend:INPUT_END,touchcancel:INPUT_CANCEL},TOUCH_TARGET_EVENTS="touchstart touchmove touchend touchcancel",TouchInput=function(e){function t(){var o;return t.prototype.evTarget=TOUCH_TARGET_EVENTS,o=e.apply(this,arguments)||this,o.targetIds={},o}_inheritsLoose(t,e);var o=t.prototype;return o.handler=function(e){var t=TOUCH_INPUT_MAP[e.type],o=getTouches.call(this,e,t);o&&this.callback(this.manager,t,{pointers:o[0],changedPointers:o[1],pointerType:INPUT_TYPE_TOUCH,srcEvent:e})},t}(Input);function getTouches(e,t){var o=toArray$1(e.touches),n=this.targetIds;if(t&(INPUT_START|INPUT_MOVE)&&1===o.length)return n[o[0].identifier]=!0,[o,o];var a=toArray$1(e.changedTouches),d=[],s=this.target,r,l;if(l=o.filter(function(e){return hasParent$1(e.target,s)}),t===INPUT_START)for(r=0;r=STATE_ENDED&&e(o.options.event+stateStr(n))},t.tryEmit=function(e){return this.canEmit()?this.emit(e):void(this.state=STATE_FAILED)},t.canEmit=function(){for(var e=0;ed?DIRECTION_LEFT:DIRECTION_RIGHT,n=d!==this.pX,i=o(e.deltaX)):(a=0===s?DIRECTION_NONE:0>s?DIRECTION_UP:DIRECTION_DOWN,n=s!==this.pY,i=o(e.deltaY))),e.direction=a,n&&i>t.threshold&&a&t.direction},n.attrTest=function(e){return AttrRecognizer.prototype.attrTest.call(this,e)&&(this.state&STATE_BEGAN||!(this.state&STATE_BEGAN)&&this.directionTest(e))},n.emit=function(t){this.pX=t.deltaX,this.pY=t.deltaY;var o=directionStr(t.direction);o&&(t.additionalEvent=this.options.event+o),e.prototype.emit.call(this,t)},t}(AttrRecognizer),SwipeRecognizer=function(e){function t(t){return void 0===t&&(t={}),e.call(this,_extends({event:"swipe",threshold:10,velocity:.3,direction:DIRECTION_HORIZONTAL|DIRECTION_VERTICAL,pointers:1},t))||this}_inheritsLoose(t,e);var o=t.prototype;return o.getTouchAction=function(){return PanRecognizer.prototype.getTouchAction.call(this)},o.attrTest=function(t){var o=this.options.direction,n;return o&(DIRECTION_HORIZONTAL|DIRECTION_VERTICAL)?n=t.overallVelocity:o&DIRECTION_HORIZONTAL?n=t.overallVelocityX:o&DIRECTION_VERTICAL&&(n=t.overallVelocityY),e.prototype.attrTest.call(this,t)&&o&t.offsetDirection&&t.distance>this.options.threshold&&t.maxPointers===this.options.pointers&&abs(n)>this.options.velocity&&t.eventType&INPUT_END},o.emit=function(e){var t=directionStr(e.offsetDirection);t&&this.manager.emit(this.options.event+t,e),this.manager.emit(this.options.event,e)},t}(AttrRecognizer),PinchRecognizer=function(e){var o=Math.abs;function t(t){return void 0===t&&(t={}),e.call(this,_extends({event:"pinch",threshold:0,pointers:2},t))||this}_inheritsLoose(t,e);var n=t.prototype;return n.getTouchAction=function(){return[TOUCH_ACTION_NONE]},n.attrTest=function(t){return e.prototype.attrTest.call(this,t)&&(o(t.scale-1)>this.options.threshold||this.state&STATE_BEGAN)},n.emit=function(t){if(1!==t.scale){var o=1>t.scale?"in":"out";t.additionalEvent=this.options.event+o}e.prototype.emit.call(this,t)},t}(AttrRecognizer),RotateRecognizer=function(e){var o=Math.abs;function t(t){return void 0===t&&(t={}),e.call(this,_extends({event:"rotate",threshold:0,pointers:2},t))||this}_inheritsLoose(t,e);var n=t.prototype;return n.getTouchAction=function(){return[TOUCH_ACTION_NONE]},n.attrTest=function(t){return e.prototype.attrTest.call(this,t)&&(o(t.rotation)>this.options.threshold||this.state&STATE_BEGAN)},t}(AttrRecognizer),PressRecognizer=function(e){function t(t){var o;return void 0===t&&(t={}),o=e.call(this,_extends({event:"press",pointers:1,time:251,threshold:9},t))||this,o._timer=null,o._input=null,o}_inheritsLoose(t,e);var o=t.prototype;return o.getTouchAction=function(){return[TOUCH_ACTION_AUTO]},o.process=function(e){var t=this,o=this.options,n=e.pointers.length===o.pointers,i=e.distanceo.time;if(this._input=e,!i||!n||e.eventType&(INPUT_END|INPUT_CANCEL)&&!a)this.reset();else if(e.eventType&INPUT_START)this.reset(),this._timer=setTimeout(function(){t.state=STATE_RECOGNIZED,t.tryEmit()},o.time);else if(e.eventType&INPUT_END)return STATE_RECOGNIZED;return STATE_FAILED},o.reset=function(){clearTimeout(this._timer)},o.emit=function(e){this.state!==STATE_RECOGNIZED||(e&&e.eventType&INPUT_END?this.manager.emit(this.options.event+"up",e):(this._input.timeStamp=now(),this.manager.emit(this.options.event,this._input)))},t}(Recognizer);function deprecate(t,o,n){return function(){var i=new Error("get-stack-trace"),e=i&&i.stack?i.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",a=window.console&&(window.console.warn||window.console.log);return a&&a.call(window.console,"DEPRECATED METHOD: "+o+"\n"+n+" AT \n",e),t.apply(this,arguments)}}var extend$1=deprecate(function(e,t,o){for(var n=Object.keys(t),a=0;a=this.NUM_ITERATIONS&&(d=this.NUM_ITERATIONS-1);var s=this.coordinates[d];e.drawImage(this.canvas,s[0],s[1],s[2],s[3],o,n,i,a)}else e.drawImage(this.image,o,n,i,a)}}]),e}(),Images=function(){function e(t){classCallCheck$1(this,e),this.images={},this.imageBroken={},this.callback=t}return createClass$1(e,[{key:"_tryloadBrokenUrl",value:function(e,t,o){return void 0===e||void 0===o?void 0:void 0===t?void console.warn("No broken url image defined"):void(o.image.onerror=function(){console.error("Could not load brokenImage:",t)},o.image.src=t)}},{key:"_redrawWithImage",value:function(e){this.callback&&this.callback(e)}},{key:"load",value:function(e,t){var o=this,n=this.images[e];if(n)return n;var i=new CachedImage;return this.images[e]=i,i.image.onload=function(){o._fixImageCoordinates(i.image),i.init(),o._redrawWithImage(i)},i.image.onerror=function(){console.error("Could not load image:",e),o._tryloadBrokenUrl(e,t,i)},i.image.src=e,i}},{key:"_fixImageCoordinates",value:function(e){0===e.width&&(document.body.appendChild(e),e.width=e.offsetWidth,e.height=e.offsetHeight,document.body.removeChild(e))}}]),e}(),Groups=function(){function e(){classCallCheck$1(this,e),this.clear(),this.defaultIndex=0,this.groupsArray=[],this.groupIndex=0,this.defaultGroups=[{border:"#2B7CE9",background:"#97C2FC",highlight:{border:"#2B7CE9",background:"#D2E5FF"},hover:{border:"#2B7CE9",background:"#D2E5FF"}},{border:"#FFA500",background:"#FFFF00",highlight:{border:"#FFA500",background:"#FFFFA3"},hover:{border:"#FFA500",background:"#FFFFA3"}},{border:"#FA0A10",background:"#FB7E81",highlight:{border:"#FA0A10",background:"#FFAFB1"},hover:{border:"#FA0A10",background:"#FFAFB1"}},{border:"#41A906",background:"#7BE141",highlight:{border:"#41A906",background:"#A1EC76"},hover:{border:"#41A906",background:"#A1EC76"}},{border:"#E129F0",background:"#EB7DF4",highlight:{border:"#E129F0",background:"#F0B3F5"},hover:{border:"#E129F0",background:"#F0B3F5"}},{border:"#7C29F0",background:"#AD85E4",highlight:{border:"#7C29F0",background:"#D3BDF0"},hover:{border:"#7C29F0",background:"#D3BDF0"}},{border:"#C37F00",background:"#FFA807",highlight:{border:"#C37F00",background:"#FFCA66"},hover:{border:"#C37F00",background:"#FFCA66"}},{border:"#4220FB",background:"#6E6EFD",highlight:{border:"#4220FB",background:"#9B9BFD"},hover:{border:"#4220FB",background:"#9B9BFD"}},{border:"#FD5A77",background:"#FFC0CB",highlight:{border:"#FD5A77",background:"#FFD1D9"},hover:{border:"#FD5A77",background:"#FFD1D9"}},{border:"#4AD63A",background:"#C2FABC",highlight:{border:"#4AD63A",background:"#E6FFE3"},hover:{border:"#4AD63A",background:"#E6FFE3"}},{border:"#990000",background:"#EE0000",highlight:{border:"#BB0000",background:"#FF3333"},hover:{border:"#BB0000",background:"#FF3333"}},{border:"#FF6000",background:"#FF6000",highlight:{border:"#FF6000",background:"#FF6000"},hover:{border:"#FF6000",background:"#FF6000"}},{border:"#97C2FC",background:"#2B7CE9",highlight:{border:"#D2E5FF",background:"#2B7CE9"},hover:{border:"#D2E5FF",background:"#2B7CE9"}},{border:"#399605",background:"#255C03",highlight:{border:"#399605",background:"#255C03"},hover:{border:"#399605",background:"#255C03"}},{border:"#B70054",background:"#FF007E",highlight:{border:"#B70054",background:"#FF007E"},hover:{border:"#B70054",background:"#FF007E"}},{border:"#AD85E4",background:"#7C29F0",highlight:{border:"#D3BDF0",background:"#7C29F0"},hover:{border:"#D3BDF0",background:"#7C29F0"}},{border:"#4557FA",background:"#000EA1",highlight:{border:"#6E6EFD",background:"#000EA1"},hover:{border:"#6E6EFD",background:"#000EA1"}},{border:"#FFC0CB",background:"#FD5A77",highlight:{border:"#FFD1D9",background:"#FD5A77"},hover:{border:"#FFD1D9",background:"#FD5A77"}},{border:"#C2FABC",background:"#74D66A",highlight:{border:"#E6FFE3",background:"#74D66A"},hover:{border:"#E6FFE3",background:"#74D66A"}},{border:"#EE0000",background:"#990000",highlight:{border:"#FF3333",background:"#BB0000"},hover:{border:"#FF3333",background:"#BB0000"}}],this.options={},this.defaultOptions={useDefaultGroups:!0},util.extend(this.options,this.defaultOptions)}return createClass$1(e,[{key:"setOptions",value:function(e){var t=["useDefaultGroups"];if(void 0!==e)for(var o in e)if(e.hasOwnProperty(o)&&-1===t.indexOf(o)){var n=e[o];this.add(o,n)}}},{key:"clear",value:function(){this.groups={},this.groupsArray=[]}},{key:"get",value:function(e){var t=!(1=e.width||0>=e.height)return!1;if(void 0!==i){var a={x:n.x-i.x,y:n.y-i.y};if(0!==i.angle){var d=-i.angle,s={x:t(d)*a.x-o(d)*a.y,y:o(d)*a.x+t(d)*a.y};n=s}else n=a}var r=e.x+e.width,l=e.y+e.width;return e.leftn.x&&e.topn.y}},{key:"isValidLabel",value:function(e){return"string"==typeof e&&""!==e}}]),e}(),LabelAccumulator=function(){function e(t){classCallCheck$1(this,e),this.measureText=t,this.current=0,this.width=0,this.height=0,this.lines=[]}return createClass$1(e,[{key:"_add",value:function(e,t){var o=2e&&(e=n.width),t+=n.height;this.width=e,this.height=t}},{key:"removeEmptyBlocks",value:function(){for(var e=[],t=0,o;t"://,""://,""://,"":/<\/b>/,"":/<\/i>/,"":/<\/code>/,"*":/\*/,_:/\_/,"`":/`/,afterBold:/[^\*]/,afterItal:/[^_]/,afterMono:/[^`]/},MarkupAccumulator=function(){function e(t){classCallCheck$1(this,e),this.text=t,this.bold=!1,this.ital=!1,this.mono=!1,this.spacing=!1,this.position=0,this.buffer="",this.modStack=[],this.blocks=[]}return createClass$1(e,[{key:"mod",value:function(){return 0===this.modStack.length?"normal":this.modStack[0]}},{key:"modName",value:function(){return 0===this.modStack.length?"normal":"mono"===this.modStack[0]?"mono":this.bold&&this.ital?"boldital":this.bold?"bold":this.ital?"ital":void 0}},{key:"emitBlock",value:function(){this.spacing&&(this.add(" "),this.spacing=!1),0")||t.parseStartTag("ital","")||t.parseStartTag("mono","")||t.parseEndTag("bold","")||t.parseEndTag("ital","")||t.parseEndTag("mono",""))||o(n);i||t.add(n),t.position++}return t.emitBlock(),t.blocks}},{key:"splitMarkdownBlocks",value:function(e){for(var t=this,o=new MarkupAccumulator(e),n=!0,i=function(e){return!!/\\/.test(e)&&(o.positionthis.parent.fontOptions.maxWdt}},{key:"getLongestFit",value:function(e){for(var t="",o=0;o=this.elementOptions.scaling.label.maxVisible&&(d=+this.elementOptions.scaling.label.maxVisible/this.body.view.scale),this.calculateLabelSize(e,n,i,t,o,a),this._drawBackground(e),this._drawText(e,t,this.size.yLine,a,d))}}},{key:"_drawBackground",value:function(e){if(void 0!==this.fontOptions.background&&"none"!==this.fontOptions.background){e.fillStyle=this.fontOptions.background;var t=this.getSize();e.fillRect(t.left,t.top,t.width,t.height)}}},{key:"_drawText",value:function(e,t,o){var n=3this.size.labelHeight&&("top"===this.fontOptions.valign&&(o-=(this.size.height-this.size.labelHeight)/2),"bottom"===this.fontOptions.valign&&(o+=(this.size.height-this.size.labelHeight)/2));for(var r=0,l;rthis.imageObj.height?o=this.imageObj.width/this.imageObj.height:n=this.imageObj.height/this.imageObj.width),e=2*this.options.size*o,t=2*this.options.size*n}else e=this.imageObj.width,t=this.imageObj.height;this.width=e,this.height=t,this.radius=.5*this.width}},{key:"_drawRawCircle",value:function(e,t,o,n){this.initContextForDraw(e,n),e.circle(t,o,n.size),this.performFill(e,n)}},{key:"_drawImageAtPosition",value:function(e,t){if(0!=this.imageObj.width){e.globalAlpha=1,this.enableShadow(e,t);var o=1;!0===this.options.shapeProperties.interpolation&&(o=this.imageObj.width/this.width/this.body.view.scale),this.imageObj.drawImageAtPosition(e,o,this.left,this.top,this.width,this.height),this.disableShadow(e,t)}}},{key:"_drawImageLabel",value:function(e,t,o,n,i){var a=0,d;if(void 0!==this.height){a=.5*this.height;var s=this.labelModule.getTextSize(e,n,i);1<=s.lineCount&&(a+=s.height/2)}d=o+a,this.options.label&&(this.labelOffset=a),this.labelModule.draw(e,t,d,n,i,"hanging")}}]),t}(NodeBase),Circle=function(e){var o=Math.max;function t(e,o,n){var i;return classCallCheck$1(this,t),i=possibleConstructorReturn$1(this,getPrototypeOf$1(t).call(this,e,o,n)),i._setMargins(n),i}return inherits$1(t,e),createClass$1(t,[{key:"resize",value:function(e){var t=1a.distance?" in "+e.printLocation(i.path,t,"")+"Perhaps it was misplaced? Matching option found at: "+e.printLocation(a.path,a.closestMatch,""):i.distance<=8?". Did you mean \""+i.closestMatch+"\"?"+e.printLocation(i.path,t):". Did you mean one of these: "+e.print(Object.keys(o))+e.printLocation(n,t):" in "+e.printLocation(i.path,t,"")+"Perhaps it was incomplete? Did you mean: \""+i.indexMatch+"\"?\n\n",console.log("%cUnknown option detected: \""+t+"\""+d,printStyle),errorFound=!0}},{key:"findInOptions",value:function(t,o,n){var i=!!(3p.distance&&(d=p.closestMatch,s=p.path,a=p.distance,l=p.indexMatch)}else-1!==c.toLowerCase().indexOf(r)&&(l=c),u=e.levenshteinDistance(t,c),a>u&&(d=c,s=util.copyArray(n),a=u)}return{closestMatch:d,path:s,distance:a,indexMatch:l}}},{key:"printLocation",value:function(e,t){for(var o=2e.left&&this.shape.tope.top}},{key:"isBoundingBoxOverlappingWith",value:function(e){return this.shape.boundingBox.lefte.left&&this.shape.boundingBox.tope.top}}],[{key:"updateGroupOptions",value:function(e,t,o){if(void 0!==o){var n=e.group;if(void 0!==t&&void 0!==t.group&&n!==t.group)throw new Error("updateGroupOptions: group values in options don't match.");if("number"==typeof n||"string"==typeof n&&""!=n){var i=o.get(n),a=["font"];void 0!==t&&void 0!==t.color&&null!=t.color&&a.push("color"),util.selectiveNotDeepExtend(a,e,i),e.color=util.parseColor(e.color)}}}},{key:"parseOptions",value:function(t,o){var n=!!(2=e.mass){var o="";void 0!==t&&(o=" in node id: "+t),console.log("%cNegative or zero mass disallowed"+o+", setting mass to 1.",printStyle),e.mass=1}}}]),e}(),NodesHandler=function(){var t=Math.round,o=Math.max;function e(t,n,i,a){var d=this;if(classCallCheck$1(this,e),this.body=t,this.images=n,this.groups=i,this.layoutEngine=a,this.body.functions.createNode=this.create.bind(this),this.nodesListeners={add:function(e,t){d.add(t.items)},update:function(e,t){d.update(t.items,t.data,t.oldData)},remove:function(e,t){d.remove(t.items)}},this.defaultOptions={borderWidth:1,borderWidthSelected:2,brokenImage:void 0,color:{border:"#2B7CE9",background:"#97C2FC",highlight:{border:"#2B7CE9",background:"#D2E5FF"},hover:{border:"#2B7CE9",background:"#D2E5FF"}},fixed:{x:!1,y:!1},font:{color:"#343434",size:14,face:"arial",background:"none",strokeWidth:0,strokeColor:"#ffffff",align:"center",vadjust:0,multi:!1,bold:{mod:"bold"},boldital:{mod:"bold italic"},ital:{mod:"italic"},mono:{mod:"",size:15,face:"monospace",vadjust:2}},group:void 0,hidden:!1,icon:{face:"FontAwesome",code:void 0,size:50,color:"#2B7CE9"},image:void 0,label:void 0,labelHighlightBold:!0,level:void 0,margin:{top:5,right:5,bottom:5,left:5},mass:1,physics:!0,scaling:{min:10,max:30,label:{enabled:!1,min:14,max:30,maxVisible:30,drawThreshold:5},customScalingFunction:function(e,t,n,i){if(t===e)return .5;return o(0,(i-e)*(1/(t-e)))}},shadow:{enabled:!1,color:"rgba(0,0,0,0.5)",size:10,x:5,y:5},shape:"ellipse",shapeProperties:{borderDashes:!1,borderRadius:6,interpolation:!0,useImageSize:!1,useBorderWithImage:!1},size:25,title:void 0,value:void 0,x:void 0,y:void 0},0>=this.defaultOptions.mass)throw"Internal error: mass in defaultOptions of NodesHandler may not be zero or negative";this.options=util.bridgeObject(this.defaultOptions),this.bindEventListeners()}return createClass$1(e,[{key:"bindEventListeners",value:function(){var e=this;this.body.emitter.on("refreshNodes",this.refresh.bind(this)),this.body.emitter.on("refresh",this.refresh.bind(this)),this.body.emitter.on("destroy",function(){util.forEach(e.nodesListeners,function(t,o){e.body.data.nodes&&e.body.data.nodes.off(o,t)}),delete e.body.functions.createNode,delete e.nodesListeners.add,delete e.nodesListeners.update,delete e.nodesListeners.remove,delete e.nodesListeners})}},{key:"setOptions",value:function(e){if(void 0!==e){if(Node.parseOptions(this.options,e),void 0!==e.shape)for(var t in this.body.nodes)this.body.nodes.hasOwnProperty(t)&&this.body.nodes[t].updateShape();if(void 0!==e.font)for(var o in this.body.nodes)this.body.nodes.hasOwnProperty(o)&&(this.body.nodes[o].updateLabelModule(),this.body.nodes[o].needsRefresh());if(void 0!==e.size)for(var n in this.body.nodes)this.body.nodes.hasOwnProperty(n)&&this.body.nodes[n].needsRefresh();(void 0!==e.hidden||void 0!==e.physics)&&this.body.emitter.emit("_dataChanged")}}},{key:"setData",value:function(e){var t=!!(1t.shape.height?(n=t.x+.5*t.shape.width,i=t.y-o):(n=t.x+o,i=t.y-.5*t.shape.height),[n,i,o]}},{key:"_pointOnCircle",value:function(e,t,i,d){var s=2*d*a;return{x:e+i*o(s),y:t-i*n(s)}}},{key:"_findBorderPositionCircle",value:function(e,o,n){for(var a=n.x,s=n.y,l=n.low,c=n.high,u=n.direction,p=0,h=this.options.selfReferenceSize,m=.5*(l+c),g,y,f,b,_;l<=c&&p<10&&(m=.5*(l+c),g=this._pointOnCircle(a,s,h,m),y=t(e.y-g.y,e.x-g.x),f=e.distanceToBorder(o,y),b=i(d(g.x-e.x,2)+d(g.y-e.y,2)),_=f-b,!(r(_)<.05));)0<_?0l&&(l=0);var c=e+l*s,p=t+l*r,h=c-a,m=p-d;return i(h*h+m*m)}},{key:"getArrowData",value:function(e,i,d,r,c,u){var p=u.width,h,m,g,f,b,_,v;if("from"===i?(g=this.from,f=this.to,b=.1,_=u.fromArrowScale,v=u.fromArrowType):"to"===i?(g=this.to,f=this.from,b=-.1,_=u.toArrowScale,v=u.toArrowType):(g=this.to,f=this.from,_=u.middleArrowScale,v=u.middleArrowType),g==f){var k=this._getCircleData(e),w=slicedToArray(k,3),S=w[0],x=w[1],y=w[2];"from"===i?(m=this.findBorderPosition(this.from,e,{x:S,y:x,low:.25,high:.6,direction:-1}),h=-2*m.t*a+1.5*a+.1*a):"to"===i?(m=this.findBorderPosition(this.from,e,{x:S,y:x,low:.6,high:1,direction:1}),h=-2*m.t*a+1.5*a-1.1*a):(m=this._pointOnCircle(S,x,y,.175),h=3.9269908169872414)}else if("middle"===i)h=t(g.y-f.y,g.x-f.x),m=this.getPoint(.5,d);else if(!0===this.options.smooth.enabled){m=this.findBorderPosition(g,e,{via:d});var O=this.getPoint(s(0,l(1,m.t+b)),d);h=t(m.y-O.y,m.x-O.x)}else h=t(g.y-f.y,g.x-f.x),m=this.findBorderPosition(g,e);"middle"===i&&0>_&&(p*=-1);var D=15*_+3*p,T=m.x-.9*D*o(h),E=m.y-.9*D*n(h);return{point:m,core:{x:T,y:E},angle:h,length:D,type:v}}},{key:"drawArrowHead",value:function(e,t,o,n,i){e.strokeStyle=this.getColor(e,t,o,n),e.fillStyle=e.strokeStyle,e.lineWidth=t.width,EndPoints.draw(e,i),this.enableShadow(e,t),e.fill(),this.disableShadow(e,t)}},{key:"enableShadow",value:function(e,t){!0===t.shadow&&(e.shadowColor=t.shadowColor,e.shadowBlur=t.shadowSize,e.shadowOffsetX=t.shadowX,e.shadowOffsetY=t.shadowY)}},{key:"disableShadow",value:function(e,t){!0===t.shadow&&(e.shadowColor="rgba(0,0,0,0)",e.shadowBlur=0,e.shadowOffsetX=0,e.shadowOffsetY=0)}},{key:"drawBackground",value:function(e,t){if(!1!==t.background){var o=["strokeStyle","lineWidth","dashes"],n={};o.forEach(function(t){n[t]=e[t]}),e.strokeStyle=t.backgroundColor,e.lineWidth=t.backgroundSize,this.setStrokeDashed(e,t.backgroundDashes),e.stroke(),o.forEach(function(t){e[t]=n[t]}),this.setStrokeDashed(e,t.dashes)}}},{key:"setStrokeDashed",value:function(e,t){if(!1===t)void 0===e.setLineDash?console.warn("setLineDash is not supported in this browser. The dashed stroke cannot be used."):e.setLineDash([]);else if(void 0!==e.setLineDash){var o=[5,5];!0===Array.isArray(t)&&(o=t),e.setLineDash(o)}else console.warn("setLineDash is not supported in this browser. The dashed stroke cannot be used.")}}]),e}(),BezierEdgeBase=function(e){var o=Math.atan2,n=Math.sqrt,a=Math.pow,d=Math.abs;function t(e,o,n){return classCallCheck$1(this,t),possibleConstructorReturn$1(this,getPrototypeOf$1(t).call(this,e,o,n))}return inherits$1(t,e),createClass$1(t,[{key:"_findBorderPositionBezier",value:function(e,t){var i=2y?!1===u?r=f:l=f:!1===u?l=f:r=f;s++}return p.t=f,p}},{key:"_getDistanceToBezierEdge",value:function(e,o,n,d,s,r,l){var c=1e9,u=e,p=o,h,m,g,f,b;for(m=1;10>m;m++)g=.1*m,f=a(1-g,2)*e+2*g*(1-g)*l.x+a(g,2)*n,b=a(1-g,2)*o+2*g*(1-g)*l.y+a(g,2)*d,0f;f++)b=.1*f,m[0]=o(1-b,3),m[1]=3*b*o(1-b,2),m[2]=3*o(b,2)*(1-b),m[3]=o(b,3),_=m[0]*e+m[1]*l.x+m[2]*c.x+m[3]*a,v=m[0]*n+m[1]*l.y+m[2]*c.y+m[3]*d,0n(t)||!0===this.options.smooth.forceDirection||"horizontal"===this.options.smooth.forceDirection)&&"vertical"!==this.options.smooth.forceDirection?(a=this.from.y,s=this.to.y,i=this.from.x-o*e,d=this.to.x+o*e):(a=this.from.y-o*t,s=this.to.y+o*t,i=this.from.x,d=this.to.x),[{x:i,y:a},{x:d,y:s}]}},{key:"getViaNode",value:function(){return this._getViaCoordinates()}},{key:"_findBorderPosition",value:function(e,t){return this._findBorderPositionBezier(e,t)}},{key:"_getDistanceToEdge",value:function(e,t,o,n,i,a){var d=6this.to.x&&(p=-p),this.from.y>=this.to.y&&(h=-h),e=this.from.x+p,t=this.from.y+h,"discrete"===l&&(c<=u?e=cthis.to.x&&(D=-D),this.from.y>=this.to.y&&(T=-T),e=this.from.x+D,t=this.from.y+T,c<=u?this.from.x<=this.to.x?e=this.to.xe?this.to.x:e:this.from.y>=this.to.y?t=this.to.y>t?this.to.y:t:t=this.to.yo.shape.height?(s=o.x+.5*o.shape.width,r=o.y-d):(s=o.x+d,r=o.y-.5*o.shape.height),i=this._pointOnCircle(s,r,d,.125),this.labelModule.draw(e,i.x,i.y,this.selected,this.hover)}}}},{key:"getItemsOnPoint",value:function(e){var t=[];if(this.labelModule.visible()){var o=this._getRotation();ComponentUtil.pointInRect(this.labelModule.getSize(),e,o)&&t.push({edgeId:this.id,labelId:0})}var n={left:e.x,top:e.y};return this.isOverlappingWith(n)&&t.push({edgeId:this.id}),t}},{key:"isOverlappingWith",value:function(e){if(this.connected){var t=this.from.x,o=this.from.y,n=this.to.x,i=this.to.y,a=e.left,d=e.top,s=this.edgeType.getDistanceToEdge(t,o,n,i,a,d);return 10>s}return!1}},{key:"_getRotation",value:function(e){var o=this.edgeType.getViaNode(),n=this.edgeType.getPoint(.5,o);void 0!==e&&this.labelModule.calculateLabelSize(e,this.selected,this.hover,n.x,n.y);var a={x:n.x,y:this.labelModule.size.yLine,angle:0};if(!this.labelModule.visible())return a;if("horizontal"===this.options.font.align)return a;var d=this.from.y-this.to.y,s=this.from.x-this.to.x,r=t(d,s);return(-1>r&&0>s||0s)&&(r+=i),a.angle=r,a}},{key:"_pointOnCircle",value:function(e,t,a,d){var s=2*d*i;return{x:e+a*o(s),y:t-a*n(s)}}},{key:"select",value:function(){this.selected=!0}},{key:"unselect",value:function(){this.selected=!1}},{key:"cleanup",value:function(){return this.edgeType.cleanup()}},{key:"remove",value:function(){this.cleanup(),this.disconnect(),delete this.body.edges[this.id]}},{key:"endPointsValid",value:function(){return void 0!==this.body.nodes[this.fromId]&&void 0!==this.body.nodes[this.toId]}}],[{key:"parseOptions",value:function(e,t){var o=!!(2this.thetaInversed?this._calculateForces(a,n,i,t,e):4===e.childrenCount?this._getForceContributions(e,t):e.children.data.id!=t.id&&this._calculateForces(a,n,i,t,e)}}},{key:"_calculateForces",value:function(e,t,o,i,d){0===e&&(e=.1,t=e),1>this.overlapAvoidanceFactor&&i.shape.radius&&(e=a(.1+this.overlapAvoidanceFactor*i.shape.radius,e-i.shape.radius));var s=this.options.gravitationalConstant*d.mass*i.options.mass/n(e,3),r=t*s;this.physicsBody.forces[i.id].x+=r,this.physicsBody.forces[i.id].y+=o*s}},{key:"_formBarnesHutTree",value:function(e,t){for(var o=t.length,n=e[t[0]].x,s=e[t[0]].y,r=e[t[0]].x,l=e[t[0]].y,c=1,u;cr&&(r=h),ml&&(l=m))}var g=d(r-n)-d(l-s);0t.x?n.maxY>t.y?"NW":"SW":n.maxY>t.y?"NE":"SE",this._placeInRegion(e,t,i)}},{key:"_placeInRegion",value:function(e,t,o){var n=e.children[o];switch(n.childrenCount){case 0:n.children.data=t,n.childrenCount=1,this._updateBranchMass(n,t);break;case 1:n.children.data.x===t.x&&n.children.data.y===t.y?(t.x+=this.seededRandom(),t.y+=this.seededRandom()):(this._splitBranch(n),this._placeInTree(n,t));break;case 4:this._placeInTree(n,t);}}},{key:"_splitBranch",value:function(e){var t=null;1===e.childrenCount&&(t=e.children.data,e.mass=0,e.centerOfMass.x=0,e.centerOfMass.y=0),e.childrenCount=4,e.children.data=null,this._insertRegion(e,"NW"),this._insertRegion(e,"NE"),this._insertRegion(e,"SW"),this._insertRegion(e,"SE"),null!=t&&this._placeInTree(e,t)}},{key:"_insertRegion",value:function(e,t){var o=.5*e.size,n,i,a,d;"NW"===t?(n=e.range.minX,i=e.range.minX+o,a=e.range.minY,d=e.range.minY+o):"NE"===t?(n=e.range.minX+o,i=e.range.maxX,a=e.range.minY,d=e.range.minY+o):"SW"===t?(n=e.range.minX,i=e.range.minX+o,a=e.range.minY+o,d=e.range.maxY):"SE"===t?(n=e.range.minX+o,i=e.range.maxX,a=e.range.minY+o,d=e.range.maxY):void 0,e.children[t]={centerOfMass:{x:0,y:0},mass:0,range:{minX:n,maxX:i,minY:a,maxY:d},size:.5*e.size,calcSize:2*e.calcSize,children:{data:null},maxWidth:0,level:e.level+1,childrenCount:0}}},{key:"_debug",value:function(e,t){void 0!==this.barnesHutTree&&(e.lineWidth=1,this._drawBranch(this.barnesHutTree.root,e,t))}},{key:"_drawBranch",value:function(e,t,o){void 0===o&&(o="#FF0000"),4===e.childrenCount&&(this._drawBranch(e.children.NW,t),this._drawBranch(e.children.NE,t),this._drawBranch(e.children.SE,t),this._drawBranch(e.children.SW,t)),t.strokeStyle=o,t.beginPath(),t.moveTo(e.range.minX,e.range.minY),t.lineTo(e.range.maxX,e.range.minY),t.stroke(),t.beginPath(),t.moveTo(e.range.maxX,e.range.minY),t.lineTo(e.range.maxX,e.range.maxY),t.stroke(),t.beginPath(),t.moveTo(e.range.maxX,e.range.maxY),t.lineTo(e.range.minX,e.range.maxY),t.stroke(),t.beginPath(),t.moveTo(e.range.minX,e.range.maxY),t.lineTo(e.range.minX,e.range.minY),t.stroke()}}]),e}(),RepulsionSolver=function(){var t=Math.sqrt;function e(t,o,n){classCallCheck$1(this,e),this.body=t,this.physicsBody=o,this.setOptions(n)}return createClass$1(e,[{key:"setOptions",value:function(e){this.options=e}},{key:"solve",value:function(){for(var e=this.body.nodes,o=this.physicsBody.physicsNodeIndices,n=this.physicsBody.forces,a=this.options.nodeDistance,d=0,s,r,l,c,u,p,h,m;dthis.overlapAvoidanceFactor&&a.shape.radius&&(e=n(.1+this.overlapAvoidanceFactor*a.shape.radius,e-a.shape.radius));var s=a.edges.length+1,r=this.options.gravitationalConstant*d.mass*a.options.mass*s/o(e,2),l=t*r;this.physicsBody.forces[a.id].x+=l,this.physicsBody.forces[a.id].y+=i*r}}]),t}(BarnesHutSolver),ForceAtlas2BasedCentralGravitySolver=function(e){function t(e,o,n){return classCallCheck$1(this,t),possibleConstructorReturn$1(this,getPrototypeOf$1(t).call(this,e,o,n))}return inherits$1(t,e),createClass$1(t,[{key:"_calculateForces",value:function(e,t,o,n,i){if(0.3))return!1;return!0}},{key:"moveNodes",value:function(){for(var e=this.physicsBody.physicsNodeIndices,t=0,o=0,n=5,d=0;di&&(e=0s.shape.boundingBox.left&&(a=s.shape.boundingBox.left),ds.shape.boundingBox.top&&(o=s.shape.boundingBox.top),ns.x&&(a=s.x),ds.y&&(o=s.y),n=e&&o.push(a.id);for(var d=0;dn?r.x:n,a=r.yd?r.y:d;return{x:.5*(o+n),y:.5*(a+d)}}},{key:"openCluster",value:function(e,t){var o=!(2s&&(s=l.edges.length),e+=l.edges.length,a+=o(l.edges.length,2),d+=1;e/=d,a/=d;var c=a-o(e,2),u=t(c),p=n(e+2*u);return p>s&&(p=s),p}},{key:"_createClusteredEdge",value:function(e,t,o,n,i){var a=NetworkUtil.cloneOptions(o,"edge");util.deepExtend(a,n),a.from=e,a.to=t,a.id="clusterEdge:"+util.randomUUID(),void 0!==i&&util.deepExtend(a,i);var d=this.body.functions.createEdge(a);return d.clusteringEdgeReplacingIds=[o.id],d.connect(),this.body.edges[d.id]=d,d}},{key:"_clusterEdges",value:function(e,t,o,n){if(t instanceof Edge){var i=t,a={};a[i.id]=i,t=a}if(e instanceof Node){var d=e,s={};s[d.id]=d,e=s}if(void 0===o||null===o)throw new Error("_clusterEdges: parameter clusterNode required");for(var r in void 0===n&&(n=o.clusterEdgeProperties),this._createClusterEdges(e,t,o,n),t)if(t.hasOwnProperty(r)&&void 0!==this.body.edges[r]){var l=this.body.edges[r];this._backupEdgeOptions(l),l.setOptions({physics:!1})}for(var c in e)e.hasOwnProperty(c)&&(this.clusteredNodes[c]={clusterId:o.id,node:this.body.nodes[c]},this.body.nodes[c].setOptions({physics:!1}))}},{key:"_getClusterNodeForNode",value:function(e){if(void 0!==e){var t=this.clusteredNodes[e];if(void 0!==t){var o=t.clusterId;return void 0===o?void 0:this.body.nodes[o]}}}},{key:"_filter",value:function(e,t){var o=[];return util.forEach(e,function(e){t(e)&&o.push(e)}),o}},{key:"_updateState",value:function(){var e=this,t=[],o={},i=function(t){util.forEach(e.body.nodes,function(e){!0===e.isCluster&&t(e)})},a;for(a in this.clusteredNodes)if(this.clusteredNodes.hasOwnProperty(a)){var d=this.body.nodes[a];void 0===d&&t.push(a)}i(function(e){for(var o=0;oo||!n&&2>o)&&t.push(e.id)});for(var o=0;o=e.indexOf("chrome")&&(this.requiresTimeout=!0):this.requiresTimeout=!0}else this.requiresTimeout=!0}}]),e}(),hammerUtil=createCommonjsModule$2(function(e,t){t.onTouch=function(e,t){t.inputHandler=function(e){e.isFirst&&t(e)},e.on("hammer.input",t.inputHandler)},t.onRelease=function(e,t){return t.inputHandler=function(e){e.isFinal&&t(e)},e.on("hammer.input",t.inputHandler)},t.offTouch=function(e,t){e.off("hammer.input",t.inputHandler)},t.offRelease=t.offTouch,t.disablePreventDefaultVertically=function(e){return e.getTouchAction=function(){return["pan-y"]},e}}),hammerUtil_1=hammerUtil.onTouch,hammerUtil_2=hammerUtil.onRelease,hammerUtil_3=hammerUtil.offTouch,hammerUtil_4=hammerUtil.offRelease,hammerUtil_5=hammerUtil.disablePreventDefaultVertically,Canvas=function(){var t=Math.round;function e(t){classCallCheck$1(this,e),this.body=t,this.pixelRatio=1,this.resizeTimer=void 0,this.resizeFunction=this._onResize.bind(this),this.cameraState={},this.initialized=!1,this.canvasViewCenter={},this.options={},this.defaultOptions={autoResize:!0,height:"100%",width:"100%"},util.extend(this.options,this.defaultOptions),this.bindEventListeners()}return createClass$1(e,[{key:"bindEventListeners",value:function(){var e=this;this.body.emitter.once("resize",function(t){0!==t.width&&(e.body.view.translation.x=.5*t.width),0!==t.height&&(e.body.view.translation.y=.5*t.height)}),this.body.emitter.on("setSize",this.setSize.bind(this)),this.body.emitter.on("destroy",function(){e.hammerFrame.destroy(),e.hammer.destroy(),e._cleanUp()})}},{key:"setOptions",value:function(e){var t=this;if(void 0!==e){util.selectiveDeepExtend(["width","height","autoResize"],this.options,e)}!0===this.options.autoResize&&(this._cleanUp(),this.resizeTimer=setInterval(function(){var e=t.setSize();!0===e&&t.body.emitter.emit("_requestRedraw")},1e3),this.resizeFunction=this._onResize.bind(this),util.addEventListener(window,"resize",this.resizeFunction))}},{key:"_cleanUp",value:function(){void 0!==this.resizeTimer&&clearInterval(this.resizeTimer),util.removeEventListener(window,"resize",this.resizeFunction),this.resizeFunction=void 0}},{key:"_onResize",value:function(){this.setSize(),this.body.emitter.emit("_redraw")}},{key:"_getCameraState",value:function(){var e=0.5*this.body.nodeIndices.length)return void this.fit(e,!1);i=NetworkUtil.getRange(this.body.nodes,e.nodes);var l=this.body.nodeIndices.length;a=12.662/(l+7.4147)+.0964822;var c=o(this.canvas.frame.canvas.clientWidth/600,this.canvas.frame.canvas.clientHeight/600);a*=c}else{this.body.emitter.emit("_resizeNodes"),i=NetworkUtil.getRange(this.body.nodes,e.nodes);var u=1.1*t(i.maxX-i.minX),p=1.1*t(i.maxY-i.minY),h=this.canvas.frame.canvas.clientWidth/u,m=this.canvas.frame.canvas.clientHeight/p;a=h<=m?h:m}1i-this.padding&&(s=!0),a=s?this.x-o:this.x,d=r?this.y-t:this.y}else d=this.y-t,d+t+this.padding>n&&(d=n-t-this.padding),di&&(a=i-o-this.padding),ae&&(e=1e-5),10t&&(n/=1-n),o*=1+n;var i=this.getPointer({x:e.clientX,y:e.clientY});this.zoom(o,i)}e.preventDefault()}}},{key:"onMouseMove",value:function(e){var t=this,o=this.getPointer({x:e.clientX,y:e.clientY}),n=!1;void 0!==this.popup&&(!1===this.popup.hidden&&this._checkHidePopup(o),!1===this.popup.hidden&&(n=!0,this.popup.setPosition(o.x+3,o.y-5),this.popup.show())),!1===this.options.keyboard.bindToWindow&&!0===this.options.keyboard.enabled&&this.canvas.frame.focus(),!1===n&&(void 0!==this.popupTimer&&(clearInterval(this.popupTimer),this.popupTimer=void 0),!this.drag.dragging&&(this.popupTimer=setTimeout(function(){return t._checkShowPopup(o)},this.options.tooltipDelay))),!0===this.options.hover&&this.selectionHandler.hoverObject(e,o)}},{key:"_checkShowPopup",value:function(e){var t=this.canvas._XconvertDOMtoCanvas(e.x),o=this.canvas._YconvertDOMtoCanvas(e.y),n={left:t,top:o,right:t,bottom:o},a=void 0===this.popupObj?void 0:this.popupObj.id,d=!1,s="node";if(void 0===this.popupObj){for(var r=this.body.nodeIndices,l=this.body.nodes,c=[],u=0,p;ue?100>e?10>e?0:1:1e4>e?1e3>e?2:3:4:1e7>e?1e6>e?5:6:1e9>e?1e8>e?7:8:9}function n(e,n){if(e===n)return 0;if(~~e===e&&~~n===n){if(0===e||0===n)return ee||0>n){if(0<=n)return-1;if(0<=e)return 1;e=-e,n=-n}var i=o(e),d=o(n),s=0;return id&&(n*=p[i-d-1],e/=10,s=1),e===n?s:e=32;)t|=1&e,e>>=1;return e+t}function a(e,t,o,n){var i=t+1;if(i===o)return 1;if(0>n(e[i++],e[t])){for(;in(e[i],e[i-1]);)i++;d(e,t,i)}else for(;i>>1;0>a(d,e[l])?r=l:s=l+1}var c=i-s;switch(c){case 3:e[s+3]=e[s+2];case 2:e[s+2]=e[s+1];case 1:e[s+1]=e[s];break;default:for(;0=r&&(r=s);r>s&&(r=s),d+=i,r+=i}else{for(s=i+1;r=a(e,t[o+i-r]);)d=r,r=(r<<1)+1,0>=r&&(r=s);r>s&&(r=s);var l=d;d=i-r,r=i-l}for(d++;d>>1);0a(e,t[o+i])){for(s=i+1;ra(e,t[o+i-r]);)d=r,r=(r<<1)+1,0>=r&&(r=s);r>s&&(r=s);var l=d;d=i-r,r=i-l}else{for(s=n-i;r=r&&(r=s);r>s&&(r=s),d+=i,r+=i}for(d++;d>>1);0>a(e,t[o+c])?r=c:d=c+1}return r}e.__esModule=!0,e.sort=function(e,t,o,d){if(!Array.isArray(e))throw new TypeError("Can only sort arrays");t?"function"!=typeof t&&(d=o,o=t,t=n):t=n,o||(o=0),d||(d=e.length);var r=d-o;if(!(2>r)){var l=0;if(32>r)return l=a(e,o,d,t),void s(e,o,d,o+l,t);var c=new h(e,t),u=i(r);do{if(l=a(e,o,d,t),lu&&(p=u),s(e,o,o+p,o+l,t),l=p}c.pushRun(o,l),c.mergeRuns(),r-=l,o+=l}while(0!==r);c.forceMergeRuns()}};var c=7,u=256,p=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9],h=function(){function e(o,n){t(this,e),this.array=null,this.compare=null,this.minGallop=c,this.length=0,this.tmpStorageLength=u,this.stackLength=0,this.runStart=null,this.runLength=null,this.stackSize=0,this.array=o,this.compare=n,this.length=o.length,this.length<2*u&&(this.tmpStorageLength=this.length>>>1),this.tmp=Array(this.tmpStorageLength),this.stackLength=120>this.length?5:1542>this.length?10:119151>this.length?19:40,this.runStart=Array(this.stackLength),this.runLength=Array(this.stackLength)}return e.prototype.pushRun=function(e,t){this.runStart[this.stackSize]=e,this.runLength[this.stackSize]=t,this.stackSize+=1},e.prototype.mergeRuns=function(){for(;1this.runLength[e+1])break;this.mergeAt(e)}},e.prototype.forceMergeRuns=function(){for(;1a(d[h],s[p])){if(d[m++]=d[h++],f++,y=0,0==--n){b=!0;break}}else if(d[m++]=s[p++],y++,f=0,1==--t){b=!0;break}while((y|f)=t){b=!0;break}}if(d[m++]=d[h++],0==--n){b=!0;break}if(f=r(s[p],d,h,n,0,a),0!==f){for(u=0;u=c||f>=c);if(b)break;0>g&&(g=0),g+=2}if(this.minGallop=g,1>g&&(this.minGallop=1),1===t){for(u=0;ua(s[h],d[p])){if(d[m--]=d[p--],b++,_=0,0==--t){v=!0;break}}else if(d[m--]=s[h--],_++,b=0,1==--n){v=!0;break}while((b|_)=n){v=!0;break}}if(d[m--]=d[p--],0==--t){v=!0;break}f--}while(b>=c||_>=c);if(v)break;0>f&&(f=0),f+=2}if(this.minGallop=f,1>f&&(this.minGallop=1),1===n){for(m-=t,p-=t,y=m+1,g=p+1,u=t-1;0<=u;u--)d[y+u]=d[g+u];d[m]=s[h]}else if(0===n)throw new Error("mergeHigh preconditions were not respected");else for(g=m-(n-1),u=0;uo.levelSeparation&&(o.levelSeparation*=-1),this.setDirectionStrategy(),this.body.emitter.emit("_resetHierarchicalLayout"),this.adaptAllOptionsForHierarchicalLayout(t);if(!0===n)return this.body.emitter.emit("refresh"),util.deepExtend(t,this.optionsBackup)}return t}},{key:"adaptAllOptionsForHierarchicalLayout",value:function(e){if(!0===this.options.hierarchical.enabled){var t=this.optionsBackup.physics;void 0===e.physics||!0===e.physics?(e.physics={enabled:void 0===t.enabled||t.enabled,solver:"hierarchicalRepulsion"},t.enabled=void 0===t.enabled||t.enabled,t.solver=t.solver||"barnesHut"):"object"===_typeof_1$1(e.physics)?(t.enabled=void 0===e.physics.enabled||e.physics.enabled,t.solver=e.physics.solver||"barnesHut",e.physics.solver="hierarchicalRepulsion"):!1!==e.physics&&(t.solver="barnesHut",e.physics={solver:"hierarchicalRepulsion"});var o=this.direction.curveType();if(void 0===e.edges)this.optionsBackup.edges={smooth:{enabled:!0,type:"dynamic"}},e.edges={smooth:!1};else if(void 0===e.edges.smooth)this.optionsBackup.edges={smooth:{enabled:!0,type:"dynamic"}},e.edges.smooth=!1;else if("boolean"==typeof e.edges.smooth)this.optionsBackup.edges={smooth:e.edges.smooth},e.edges.smooth={enabled:e.edges.smooth,type:o};else{var n=e.edges.smooth;void 0!==n.type&&"dynamic"!==n.type&&(o=n.type),this.optionsBackup.edges={smooth:void 0===n.enabled||n.enabled,type:void 0===n.type?"dynamic":n.type,roundness:void 0===n.roundness?.5:n.roundness,forceDirection:void 0!==n.forceDirection&&n.forceDirection},e.edges.smooth={enabled:void 0===n.enabled||n.enabled,type:o,roundness:void 0===n.roundness?.5:n.roundness,forceDirection:void 0!==n.forceDirection&&n.forceDirection}}this.body.emitter.emit("_forceDisableDynamicCurves",o)}return e}},{key:"seededRandom",value:function(){var e=1e4*o(this.randomSeed++);return e-u(e)}},{key:"positionInitially",value:function(e){if(!0!==this.options.hierarchical.enabled){this.randomSeed=this.initialRandomSeed;for(var n=e.length+50,d=0;dd){for(var l=e.length;e.length>d&&10>=a;){a+=1;var c=e.length;0==a%3?this.body.modules.clustering.clusterBridges(s):this.body.modules.clustering.clusterOutliers(s);var u=e.length;if(c==u&&0!=a%3)return this._declusterAll(),this.body.emitter.emit("_layoutFailed"),void console.info("This network could not be positioned by this version of the improved layout algorithm. Please disable improvedLayout for better performance.")}this.body.modules.kamadaKawai.setOptions({springLength:r(150,2*l)})}10r){var c={},u={};p(o,c),p(n,u);var g=m(o,n),y=h(c,g),f=h(u,g),b=y[1],_=f[0],v=f[2],k=l(b-_);if(k>r){var w=b-_+r;w<-v+r&&(w=-v+r),0>w&&(e._shiftBlock(n.id,w),t=!0,!0===i&&e._centerParent(n))}}},f=function(a,l){for(var u=l.id,m=l.edges,g=e.hierarchical.levels[l.id],y=e.options.hierarchical.levelSeparation*e.options.hierarchical.levelSeparation,f={},b=[],_=0,v;_u&&(m=-c(-u,s-e.options.hierarchical.nodeSpacing)),0!=m&&(e._shiftBlock(l.id,m),t=!0)},D=function(o){var n=e.direction.getPosition(l),i=e._getSpaceAroundNode(l),a=slicedToArray(i,2),d=a[0],s=a[1],u=o-n,p=n;0u&&(p=r(n-(d-e.options.hierarchical.nodeSpacing),o)),p!==n&&(e.direction.setPosition(l,p),t=!0)},T=S(a,b);O(T),T=S(a,m),D(T)},b=function(o){var n=e.hierarchical.getLevels();n=n.reverse();for(var a=0;am&&l(m)t&&void 0===this.positionedNodes[s.id]){var l=this.options.hierarchical.nodeSpacing,c=void 0;c=0==d?this.direction.getPosition(this.body.nodes[e]):this.direction.getPosition(n[d-1])+l,this.direction.setPosition(s,c,r),this._validatePositionAndContinue(s,r,c)}else return}var u=this._getCenterPosition(n);this.direction.setPosition(this.body.nodes[e],u,t)}}},{key:"_validatePositionAndContinue",value:function(e,t,o){if(this.hierarchical.isTree){if(void 0!==this.lastNodeOnLevel[t]){var n=this.direction.getPosition(this.body.nodes[this.lastNodeOnLevel[t]]);if(o-ne.hierarchical.levels[t.id]&&e.hierarchical.addRelation(t.id,o.id)}),this.hierarchical.checkIfTree()}},{key:"_crawlNetwork",value:function(){var e=this,t=0r;r++)for(l=0;lv?v+1:v;var k=f/this.r,s=util.RGBToHSV(this.color.r,this.color.g,this.color.b);s.h=v,s.s=k;var w=util.HSVToRGB(s.h,s.s,s.v);w.a=this.color.a,this.color=w,this.initialColorDiv.style.backgroundColor="rgba("+this.initialColor.r+","+this.initialColor.g+","+this.initialColor.b+","+this.initialColor.a+")",this.newColorDiv.style.backgroundColor="rgba("+this.color.r+","+this.color.g+","+this.color.b+","+this.color.a+")"}}]),e}(),Configurator=function(){var t=Math.ceil;function e(t,o,n){var i=3"+e+":":e+":",n}},{key:"_makeDropdown",value:function(e,t,o){var n=document.createElement("select");n.className="vis-configuration vis-config-select";var a=0;void 0!==t&&-1!==e.indexOf(t)&&(a=e.indexOf(t));for(var d=0,s;do&&o*ud&&1!==d&&(r.max=t(o*u),c=r.max,l="range increased"),r.value=o}else r.value=i;var p=document.createElement("input");p.className="vis-configuration vis-config-rangeinput",p.value=r.value;var h=this;r.onchange=function(){p.value=this.value,h._update(+this.value,n)},r.oninput=function(){p.value=this.value};var m=this._makeLabel(n[n.length-1],n),g=this._makeItem(n,m,r,p);""!=l&&this.popupHistory[g]!==c&&(this.popupHistory[g]=c,this._setupPopup(l,g))}},{key:"_makeButton",value:function(){var e=this;if(!0===this.options.showButton){var t=document.createElement("div");t.className="vis-configuration vis-config-button",t.innerHTML="generate options",t.onclick=function(){e._printOptions()},t.onmouseover=function(){t.className="vis-configuration vis-config-button hover"},t.onmouseout=function(){t.className="vis-configuration vis-config-button"},this.optionsContainer=document.createElement("div"),this.optionsContainer.className="vis-configuration vis-config-option-container",this.domElements.push(this.optionsContainer),this.domElements.push(t)}}},{key:"_setupPopup",value:function(e,t){var o=this;if(!0===this.initialized&&!0===this.allowCreation&&this.popupCountervar options = "+JSON.stringify(e,null,2)+""}},{key:"getOptions",value:function(){for(var e={},t=0;t.01&&d1&&h<5;){h+=1,this._moveNode(l,c,u);var y=this._getEnergy(l),f=slicedToArray(y,3);p=f[0],c=f[1],u=f[2]}}}},{key:"_getHighestEnergyNode",value:function(e){for(var t=this.body.nodeIndices,o=this.body.nodes,n=0,i=t[0],a=0,d=0,s=0,r;si&&(i*=-1,o-=i);var l=t.getSVGElement("rect",d,s);l.setAttributeNS(null,"x",e-.5*n),l.setAttributeNS(null,"y",o),l.setAttributeNS(null,"width",n),l.setAttributeNS(null,"height",i),l.setAttributeNS(null,"class",a),r&&l.setAttributeNS(null,"style",r)}}}),DOMutil_1=DOMutil.prepareElements,DOMutil_2=DOMutil.cleanupElements,DOMutil_3=DOMutil.resetElements,DOMutil_4=DOMutil.getSVGElement,DOMutil_5=DOMutil.getDOMElement,DOMutil_6=DOMutil.drawPoint,DOMutil_7=DOMutil.drawBar,DOMutil$1=Object.freeze({default:DOMutil,__moduleExports:DOMutil,prepareElements:DOMutil_1,cleanupElements:DOMutil_2,resetElements:DOMutil_3,getSVGElement:DOMutil_4,getDOMElement:DOMutil_5,drawPoint:DOMutil_6,drawBar:DOMutil_7}),moment$2=createCommonjsModule$2(function(e){var t=Math.round,o=Math.pow,n=Math.max,a=Math.abs,d=Math.min,s=Math.floor,r=Math.ceil;(function(t,o){e.exports=o()})(commonjsGlobal$2,function(){function l(){return $t.apply(null,arguments)}function u(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function p(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function h(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}function m(e){return void 0===e}function g(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function y(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function f(e,t){var o=[],n;for(n=0;nt.overflow&&!t.empty&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&o);if(e._strict&&(n=n&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour),null==Object.isFrozen||!Object.isFrozen(e))e._isValid=n;else return n}return e._isValid}function O(e){var t=k(NaN);return null==e?x(t).userInvalidated=!0:v(x(t),e),t}function D(e,t){var o,n,a;if(m(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),m(t._i)||(e._i=t._i),m(t._f)||(e._f=t._f),m(t._l)||(e._l=t._l),m(t._strict)||(e._strict=t._strict),m(t._tzm)||(e._tzm=t._tzm),m(t._isUTC)||(e._isUTC=t._isUTC),m(t._offset)||(e._offset=t._offset),m(t._pf)||(e._pf=x(t)),m(t._locale)||(e._locale=t._locale),0e?r(e)||0:s(e)}function M(e){var t=+e,o=0;return 0!=t&&isFinite(t)&&(o=C(t)),o}function I(e,t,o){var n=d(e.length,t.length),s=a(e.length-t.length),r=0,l;for(l=0;la;++a)s=k([2e3,a]),this._shortMonthsParse[a]=this.monthsShort(s,"").toLocaleLowerCase(),this._longMonthsParse[a]=this.months(s,"").toLocaleLowerCase();return o?"MMM"===t?(d=Ro.call(this._shortMonthsParse,n),-1===d?null:d):(d=Ro.call(this._longMonthsParse,n),-1===d?null:d):"MMM"===t?(d=Ro.call(this._shortMonthsParse,n),-1!==d)?d:(d=Ro.call(this._longMonthsParse,n),-1===d?null:d):(d=Ro.call(this._longMonthsParse,n),-1!==d)?d:(d=Ro.call(this._shortMonthsParse,n),-1===d?null:d)}function me(e,t,o){var n,a,d;if(this._monthsParseExact)return he.call(this,e,t,o);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),n=0;12>n;n++){if(a=k([2e3,n]),o&&!this._longMonthsParse[n]&&(this._longMonthsParse[n]=new RegExp("^"+this.months(a,"").replace(".","")+"$","i"),this._shortMonthsParse[n]=new RegExp("^"+this.monthsShort(a,"").replace(".","")+"$","i")),o||this._monthsParse[n]||(d="^"+this.months(a,"")+"|^"+this.monthsShort(a,""),this._monthsParse[n]=new RegExp(d.replace(".",""),"i")),o&&"MMMM"===t&&this._longMonthsParse[n].test(e))return n;if(o&&"MMM"===t&&this._shortMonthsParse[n].test(e))return n;if(!o&&this._monthsParse[n].test(e))return n}}function ge(e,t){var o;if(!e.isValid())return e;if("string"==typeof t)if(/^\d+$/.test(t))t=M(t);else if(t=e.localeData().monthsParse(t),!g(t))return e;return o=d(e.date(),pe(e.year(),t)),e._d["set"+(e._isUTC?"UTC":"")+"Month"](t,o),e}function ye(e){return null==e?re(this,"Month"):(ge(this,e),l.updateOffset(this,!0),this)}function fe(){function e(e,t){return t.length-e.length}var t=[],o=[],n=[],a,d;for(a=0;12>a;a++)d=k([2e3,a]),t.push(this.monthsShort(d,"")),o.push(this.months(d,"")),n.push(this.months(d,"")),n.push(this.monthsShort(d,""));for(t.sort(e),o.sort(e),n.sort(e),a=0;12>a;a++)t[a]=te(t[a]),o[a]=te(o[a]);for(a=0;24>a;a++)n[a]=te(n[a]);this._monthsRegex=new RegExp("^("+n.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+o.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+t.join("|")+")","i")}function be(e,t,o,n,i,a,d){var s;return 100>e&&0<=e?(s=new Date(e+400,t,o,n,i,a,d),isFinite(s.getFullYear())&&s.setFullYear(e)):s=new Date(e,t,o,n,i,a,d),s}function _e(e){var t;if(100>e&&0<=e){var o=Array.prototype.slice.call(arguments);o[0]=e+400,t=new Date(Date.UTC.apply(null,o)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)}else t=new Date(Date.UTC.apply(null,arguments));return t}function ve(e,t,o){var n=7+t-o,i=(7+_e(e,0,n).getUTCDay()-t)%7;return-i+n-1}function ke(e,t,o,n,i){var a=ve(e,n,i),d=1+7*(t-1)+(7+o-n)%7+a,s,r;return 0>=d?(s=e-1,r=ae(s)+d):d>ae(e)?(s=e+1,r=d-ae(e)):(s=e,r=d),{year:s,dayOfYear:r}}function we(e,t,o){var n=ve(e.year(),t,o),i=s((e.dayOfYear()-n-1)/7)+1,a,d;return 1>i?(d=e.year()-1,a=i+xe(d,t,o)):i>xe(e.year(),t,o)?(a=i-xe(e.year(),t,o),d=e.year()+1):(d=e.year(),a=i),{week:a,year:d}}function xe(e,t,o){var n=ve(e,t,o),i=ve(e+1,t,o);return(ae(e)-n+i)/7}function Se(e,t){return"string"==typeof e?isNaN(e)?(e=t.weekdaysParse(e),"number"==typeof e?e:null):parseInt(e,10):e}function Oe(e,t){return"string"==typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function De(e,t){return e.slice(t,7).concat(e.slice(0,t))}function Te(e,t,o){var n=e.toLocaleLowerCase(),a,d,s;if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],a=0;7>a;++a)s=k([2e3,1]).day(a),this._minWeekdaysParse[a]=this.weekdaysMin(s,"").toLocaleLowerCase(),this._shortWeekdaysParse[a]=this.weekdaysShort(s,"").toLocaleLowerCase(),this._weekdaysParse[a]=this.weekdays(s,"").toLocaleLowerCase();return o?"dddd"===t?(d=Ro.call(this._weekdaysParse,n),-1===d?null:d):"ddd"===t?(d=Ro.call(this._shortWeekdaysParse,n),-1===d?null:d):(d=Ro.call(this._minWeekdaysParse,n),-1===d?null:d):"dddd"===t?(d=Ro.call(this._weekdaysParse,n),-1!==d)?d:(d=Ro.call(this._shortWeekdaysParse,n),-1!==d)?d:(d=Ro.call(this._minWeekdaysParse,n),-1===d?null:d):"ddd"===t?(d=Ro.call(this._shortWeekdaysParse,n),-1!==d)?d:(d=Ro.call(this._weekdaysParse,n),-1!==d)?d:(d=Ro.call(this._minWeekdaysParse,n),-1===d?null:d):(d=Ro.call(this._minWeekdaysParse,n),-1!==d)?d:(d=Ro.call(this._weekdaysParse,n),-1!==d)?d:(d=Ro.call(this._shortWeekdaysParse,n),-1===d?null:d)}function Ee(e,t,o){var n,a,d;if(this._weekdaysParseExact)return Te.call(this,e,t,o);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),n=0;7>n;n++){if(a=k([2e3,1]).day(n),o&&!this._fullWeekdaysParse[n]&&(this._fullWeekdaysParse[n]=new RegExp("^"+this.weekdays(a,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[n]=new RegExp("^"+this.weekdaysShort(a,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[n]=new RegExp("^"+this.weekdaysMin(a,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[n]||(d="^"+this.weekdays(a,"")+"|^"+this.weekdaysShort(a,"")+"|^"+this.weekdaysMin(a,""),this._weekdaysParse[n]=new RegExp(d.replace(".",""),"i")),o&&"dddd"===t&&this._fullWeekdaysParse[n].test(e))return n;if(o&&"ddd"===t&&this._shortWeekdaysParse[n].test(e))return n;if(o&&"dd"===t&&this._minWeekdaysParse[n].test(e))return n;if(!o&&this._weekdaysParse[n].test(e))return n}}function Ce(){function e(e,t){return t.length-e.length}var t=[],o=[],n=[],a=[],d,s,r,l,c;for(d=0;7>d;d++)s=k([2e3,1]).day(d),r=this.weekdaysMin(s,""),l=this.weekdaysShort(s,""),c=this.weekdays(s,""),t.push(r),o.push(l),n.push(c),a.push(r),a.push(l),a.push(c);for(t.sort(e),o.sort(e),n.sort(e),a.sort(e),d=0;7>d;d++)o[d]=te(o[d]),n[d]=te(n[d]),a[d]=te(a[d]);this._weekdaysRegex=new RegExp("^("+a.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+o.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+t.join("|")+")","i")}function Me(){return this.hours()%12||12}function Ie(e,t){q(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function Pe(e,t){return t._meridiemParse}function Fe(e){return e?e.toLowerCase().replace("_","-"):e}function Ne(e){for(var t=0,o,n,a,d;t=o&&I(d,n,!0)>=o-1)break;o--}t++}return Jo}function Ye(t){var o=null;if(!Wo[t]&&!0&&e&&e.exports)try{o=Jo._abbr;commonjsRequire$2("./locale/"+t),Re(o)}catch(t){}return Wo[t]}function Re(e,t){var o;return e&&(o=m(t)?Be(e):ze(e,t),o?Jo=o:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),Jo._abbr}function ze(e,t){if(null!==t){var o=jo,n;if(t.abbr=e,null!=Wo[e])N("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),o=Wo[e]._config;else if(null!=t.parentLocale)if(null!=Wo[t.parentLocale])o=Wo[t.parentLocale]._config;else if(n=Ye(t.parentLocale),null!=n)o=n._config;else return Uo[t.parentLocale]||(Uo[t.parentLocale]=[]),Uo[t.parentLocale].push({name:e,config:t}),null;return Wo[e]=new B(z(o,t)),Uo[e]&&Uo[e].forEach(function(e){ze(e.name,e.config)}),Re(e),Wo[e]}return delete Wo[e],null}function Be(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return Jo;if(!u(e)){if(t=Ye(e),t)return t;e=[e]}return Ne(e)}function Le(){return to(Wo)}function Ae(e){var t=e._a,o;return t&&-2===x(e).overflow&&(o=0>t[1]||11t[2]||t[2]>pe(t[0],t[1])?2:0>t[3]||24t[4]||59t[5]||59t[6]||999o||2ae(s)||0===e._dayOfYear)&&(x(e)._overflowDayOfYear=!0),n=_e(s,0,e._dayOfYear),e._a[1]=n.getUTCMonth(),e._a[2]=n.getUTCDate()),o=0;3>o&&null==e._a[o];++o)e._a[o]=t[o]=a[o];for(;7>o;o++)e._a[o]=t[o]=null==e._a[o]?2===o?1:0:e._a[o];24===e._a[3]&&0===e._a[4]&&0===e._a[5]&&0===e._a[6]&&(e._nextDay=!0,e._a[3]=0),e._d=(e._useUTC?_e:be).apply(null,t),d=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[3]=24),e._w&&"undefined"!=typeof e._w.d&&e._w.d!==d&&(x(e).weekdayMismatch=!0)}}function Ue(e){var t,o,n,i,a,d,s,r;if(t=e._w,null!=t.GG||null!=t.W||null!=t.E)a=1,d=4,o=He(t.GG,e._a[0],we(st(),1,4).year),n=He(t.W,1),i=He(t.E,1),(1>i||7t.e||6i||6n||n>xe(o,a,d)?x(e)._overflowWeeks=!0:null==r?(s=ke(o,n,i,a,d),e._a[0]=s.year,e._dayOfYear=s.dayOfYear):x(e)._overflowWeekday=!0}function Ve(e){var t=e._i,o=Vo.exec(t)||Go.exec(t),n,a,d,s,r,c;if(o){for(x(e).iso=!0,n=0,a=Xo.length;n=t?2e3+t:999>=t?1900+t:t}function Xe(e){return e.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function Ze(e,t,o){if(e){var n=Lo.indexOf(e),i=new Date(t[0],t[1],t[2]).getDay();if(n!==i)return x(o).weekdayMismatch=!0,o._isValid=!1,!1}return!0}function $e(e,t,o){if(e)return Qo[e];if(t)return 0;var n=parseInt(o,10),i=n%100;return 60*((n-i)/100)+i}function Ke(e){var t=Ko.exec(Xe(e._i));if(t){var o=Ge(t[4],t[3],t[2],t[5],t[6],t[7]);if(!Ze(t[1],o,e))return;e._a=o,e._tzm=$e(t[8],t[9],t[10]),e._d=_e.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),x(e).rfc2822=!0}else e._isValid=!1}function Qe(e){var t=$o.exec(e._i);if(null!==t)return void(e._d=new Date(+t[1]));if(Ve(e),!1===e._isValid)delete e._isValid;else return;if(Ke(e),!1===e._isValid)delete e._isValid;else return;l.createFromInputFallback(e)}function Je(e){if(e._f===l.ISO_8601)return void Ve(e);if(e._f===l.RFC_2822)return void Ke(e);e._a=[],x(e).empty=!0;var t=""+e._i,o=t.length,n=0,a,d,s,r,c;for(s=K(e._f,e._locale).match(ao)||[],a=0;a=e._a[3]&&!0===x(e).bigHour&&0t&&(t+=12),n||12!==t||(t=0),t):e.meridiemHour(t,o)}function tt(e){var t,o,n,a,d;if(0===e._f.length)return x(e).invalidFormat=!0,void(e._d=new Date(NaN));for(a=0;ae?-1*t(-1*e):t(e)}function ht(e,t){q(e,0,0,function(){var e=this.utcOffset(),o="+";return 0>e&&(e=-e,o="-"),o+G(~~(e/60),2)+t+G(~~e%60,2)})}function mt(e,t){var o=(t||"").match(e);if(null===o)return null;var n=o[o.length-1]||[],i=(n+"").match(nn)||["-",0,0],a=+(60*i[1])+M(i[2]);return 0===a?0:"+"===i[0]?a:-a}function gt(e,t){var o,n;return t._isUTC?(o=t.clone(),n=(E(e)||y(e)?e.valueOf():st(e).valueOf())-o.valueOf(),o._d.setTime(o._d.valueOf()+n),l.updateOffset(o,!1),o):st(e).local()}function yt(e){return 15*-t(e._d.getTimezoneOffset()/15)}function ft(){if(!m(this._isDSTShifted))return this._isDSTShifted;var e={};if(D(e,this),e=it(e),e._a){var t=e._isUTC?k(e._a):st(e._a);this._isDSTShifted=this.isValid()&&0t-n?(i=e.clone().add(o-1,"months"),a=(t-n)/(n-i)):(i=e.clone().add(o+1,"months"),a=(t-n)/(i-n)),-(o+a)||0}function Dt(e){var t;return void 0===e?this._locale._abbr:(t=Be(e),null!=t&&(this._locale=t),this)}function Tt(){return this._locale}function Et(e,t){return(e%t+t)%t}function Ct(e,t,o){return 100>e&&0<=e?new Date(e+400,t,o)-12622780800000:new Date(e,t,o).valueOf()}function Mt(e,t,o){return 100>e&&0<=e?Date.UTC(e+400,t,o)-12622780800000:Date.UTC(e,t,o)}function It(e,t){q(0,[e,e.length],0,t)}function Pt(e,t,o,n,i){var a;return null==e?we(this,n,i).year:(a=xe(e,n,i),t>a&&(t=a),Ft.call(this,e,t,o,n,i))}function Ft(e,t,o,n,i){var a=ke(e,t,o,n,i),d=_e(a.year,0,a.dayOfYear);return this.year(d.getUTCFullYear()),this.month(d.getUTCMonth()),this.date(d.getUTCDate()),this}function Nt(e,t){t[6]=M(1e3*("0."+e))}function Yt(e){return e}function Rt(e,t,o,n){var i=Be(),a=k().set(n,t);return i[o](a,e)}function zt(e,t,o){if(g(e)&&(t=e,e=void 0),e=e||"",null!=t)return Rt(e,t,o,"month");var n=[],a;for(a=0;12>a;a++)n[a]=Rt(e,a,o,"month");return n}function Bt(e,t,o,n){"boolean"==typeof e?(g(t)&&(o=t,t=void 0),t=t||""):(t=e,o=t,e=!1,g(t)&&(o=t,t=void 0),t=t||"");var a=Be(),d=e?a._week.dow:0;if(null!=o)return Rt(t,(o+d)%7,n,"day");var s=[],r;for(r=0;7>r;r++)s[r]=Rt(t,(r+d)%7,n,"day");return s}function Lt(e,t,o,n){var i=_t(t,o);return e._milliseconds+=n*i._milliseconds,e._days+=n*i._days,e._months+=n*i._months,e._bubble()}function At(e){return 0>e?s(e):r(e)}function Ht(e){return 4800*e/146097}function jt(e){return 146097*e/4800}function Wt(e){return function(){return this.as(e)}}function Ut(e){return function(){return this.isValid()?this._data[e]:NaN}}function Vt(e,t,o,n,i){return i.relativeTime(t||1,!!o,e,n)}function Gt(e,t,o){var n=_t(e).abs(),i=Nn(n.as("s")),d=Nn(n.as("m")),s=Nn(n.as("h")),r=Nn(n.as("d")),l=Nn(n.as("M")),c=Nn(n.as("y")),u=i<=Yn.ss&&["s",i]||i=d&&["m"]||d=s&&["h"]||s=r&&["d"]||r=l&&["M"]||l=c&&["y"]||["yy",c];return u[2]=t,u[3]=0<+e,u[4]=o,Vt.apply(null,u)}function qt(e){return void 0===e?Nn:"function"==typeof e&&(Nn=e,!0)}function Xt(e){return(0e)||+e}function Zt(){if(!this.isValid())return this.localeData().invalidDate();var e=Rn(this._milliseconds)/1e3,t=Rn(this._days),o=Rn(this._months),n,i,a;n=C(e/60),i=C(n/60),e%=60,n%=60,a=C(o/12),o%=12;var d=a,r=o,l=t,c=i,u=n,p=e?e.toFixed(3).replace(/\.?0+$/,""):"",s=this.asSeconds();if(!s)return"P0D";var h=0>s?"-":"",m=Xt(this._months)===Xt(s)?"":"-",g=Xt(this._days)===Xt(s)?"":"-",y=Xt(this._milliseconds)===Xt(s)?"":"-";return h+"P"+(d?m+d+"Y":"")+(r?m+r+"M":"")+(l?g+l+"D":"")+(c||u||p?"T":"")+(c?y+c+"H":"")+(u?y+u+"M":"")+(p?y+p+"S":"")}var $t,Kt;Kt=Array.prototype.some?Array.prototype.some:function(e){for(var o=Object(this),t=o.length>>>0,n=0;n=e?""+e:"+"+e}),q(0,["YY",2],0,function(){return this.year()%100}),q(0,["YYYY",4],0,"year"),q(0,["YYYYY",5],0,"year"),q(0,["YYYYYY",6,!0],0,"year"),H("year","y"),U("year",1),Q("Y",wo),Q("YY",go,uo),Q("YYYY",_o,ho),Q("YYYYY",vo,mo),Q("YYYYYY",vo,mo),oe(["YYYYY","YYYYYY"],Co),oe("YYYY",function(e,t){t[Co]=2===e.length?l.parseTwoDigitYear(e):M(e)}),oe("YY",function(e,t){t[Co]=l.parseTwoDigitYear(e)}),oe("Y",function(e,t){t[Co]=parseInt(e,10)}),l.parseTwoDigitYear=function(e){return M(e)+(68this?this:e:O()}),on=["year","quarter","month","week","day","hour","minute","second","millisecond"];ht("Z",":"),ht("ZZ",""),Q("Z",So),Q("ZZ",So),oe(["Z","ZZ"],function(e,t,o){o._useUTC=!0,o._tzm=mt(So,e)});var nn=/([\+\-]|\d\d)/gi;l.updateOffset=function(){};var an=/^(\-|\+)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,dn=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;_t.fn=ct.prototype,_t.invalid=function(){return _t(NaN)};var sn=xt(1,"add"),rn=xt(-1,"subtract");l.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",l.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var ln=F("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return void 0===e?this.localeData():this.locale(e)});q(0,["gg",2],0,function(){return this.weekYear()%100}),q(0,["GG",2],0,function(){return this.isoWeekYear()%100}),It("gggg","weekYear"),It("ggggg","weekYear"),It("GGGG","isoWeekYear"),It("GGGGG","isoWeekYear"),H("weekYear","gg"),H("isoWeekYear","GG"),U("weekYear",1),U("isoWeekYear",1),Q("G",wo),Q("g",wo),Q("GG",go,uo),Q("gg",go,uo),Q("GGGG",_o,ho),Q("gggg",_o,ho),Q("GGGGG",vo,mo),Q("ggggg",vo,mo),ne(["gggg","ggggg","GGGG","GGGGG"],function(e,t,o,n){t[n.substr(0,2)]=M(e)}),ne(["gg","GG"],function(e,t,o,n){t[n]=l.parseTwoDigitYear(e)}),q("Q",0,"Qo","quarter"),H("quarter","Q"),U("quarter",7),Q("Q",co),oe("Q",function(e,t){t[Mo]=3*(M(e)-1)}),q("D",["DD",2],"Do","date"),H("date","D"),U("date",9),Q("D",go),Q("DD",go,uo),Q("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient}),oe(["D","DD"],Io),oe("Do",function(e,t){t[Io]=M(e.match(go)[0])});var cn=se("Date",!0);q("DDD",["DDDD",3],"DDDo","dayOfYear"),H("dayOfYear","DDD"),U("dayOfYear",4),Q("DDD",bo),Q("DDDD",po),oe(["DDD","DDDD"],function(e,t,o){o._dayOfYear=M(e)}),q("m",["mm",2],0,"minute"),H("minute","m"),U("minute",14),Q("m",go),Q("mm",go,uo),oe(["m","mm"],Fo);var un=se("Minutes",!1);q("s",["ss",2],0,"second"),H("second","s"),U("second",15),Q("s",go),Q("ss",go,uo),oe(["s","ss"],No);var pn=se("Seconds",!1);q("S",0,0,function(){return~~(this.millisecond()/100)}),q(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),q(0,["SSS",3],0,"millisecond"),q(0,["SSSS",4],0,function(){return 10*this.millisecond()}),q(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),q(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),q(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),q(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),q(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),H("millisecond","ms"),U("millisecond",16),Q("S",bo,co),Q("SS",bo,uo),Q("SSS",bo,po);var hn;for(hn="SSSS";9>=hn.length;hn+="S")Q(hn,ko);for(hn="S";9>=hn.length;hn+="S")oe(hn,Nt);var mn=se("Milliseconds",!1);q("z",0,0,"zoneAbbr"),q("zz",0,0,"zoneName");var gn=T.prototype;gn.add=sn,gn.calendar=function(e,t){var o=e||st(),n=gt(o,this).startOf("day"),i=l.calendarFormat(this,n)||"sameElse",a=t&&(Y(t[i])?t[i].call(this,o):t[i]);return this.format(a||this.localeData().calendar(i,this,st(o)))},gn.clone=function(){return new T(this)},gn.diff=function(e,t,o){var n,i,a;return this.isValid()?(n=gt(e,this),!n.isValid())?NaN:(i=6e4*(n.utcOffset()-this.utcOffset()),t=j(t),(a="year"===t?Ot(this,n)/12:"month"===t?Ot(this,n):"quarter"===t?Ot(this,n)/3:"second"===t?(this-n)/1e3:"minute"===t?(this-n)/6e4:"hour"===t?(this-n)/36e5:"day"===t?(this-n-i)/864e5:"week"===t?(this-n-i)/6048e5:this-n,o?a:C(a))):NaN},gn.endOf=function(e){var t;if(e=j(e),void 0===e||"millisecond"===e||!this.isValid())return this;var o=this._isUTC?Mt:Ct;return"year"===e?t=o(this.year()+1,0,1)-1:"quarter"===e?t=o(this.year(),this.month()-this.month()%3+3,1)-1:"month"===e?t=o(this.year(),this.month()+1,1)-1:"week"===e?t=o(this.year(),this.month(),this.date()-this.weekday()+7)-1:"isoWeek"===e?t=o(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1:"day"===e||"date"===e?t=o(this.year(),this.month(),this.date()+1)-1:"hour"===e?(t=this._d.valueOf(),t+=3600000-Et(t+(this._isUTC?0:60000*this.utcOffset()),3600000)-1):"minute"===e?(t=this._d.valueOf(),t+=60000-Et(t,60000)-1):"second"===e?(t=this._d.valueOf(),t+=1000-Et(t,1000)-1):void 0,this._d.setTime(t),l.updateOffset(this,!0),this},gn.format=function(e){e||(e=this.isUtc()?l.defaultFormatUtc:l.defaultFormat);var t=$(this,e);return this.localeData().postformat(t)},gn.from=function(e,t){return this.isValid()&&(E(e)&&e.isValid()||st(e).isValid())?_t({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},gn.fromNow=function(e){return this.from(st(),e)},gn.to=function(e,t){return this.isValid()&&(E(e)&&e.isValid()||st(e).isValid())?_t({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},gn.toNow=function(e){return this.to(st(),e)},gn.get=function(e){return e=j(e),Y(this[e])?this[e]():this},gn.invalidAt=function(){return x(this).overflow},gn.isAfter=function(e,t){var o=E(e)?e:st(e);return!!(this.isValid()&&o.isValid())&&(t=j(t)||"millisecond","millisecond"===t?this.valueOf()>o.valueOf():o.valueOf()o.year()||9999=this.year()?"YYYY":"YYYYYY",i=t+"[\")]";return this.format(o+n+"-MM-DD[T]HH:mm:ss.SSS"+i)},gn.toJSON=function(){return this.isValid()?this.toISOString():null},gn.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},gn.unix=function(){return s(this.valueOf()/1e3)},gn.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},gn.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},gn.year=Yo,gn.isLeapYear=function(){return de(this.year())},gn.weekYear=function(e){return Pt.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},gn.isoWeekYear=function(e){return Pt.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)},gn.quarter=gn.quarters=function(e){return null==e?r((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)},gn.month=ye,gn.daysInMonth=function(){return pe(this.year(),this.month())},gn.week=gn.weeks=function(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")},gn.isoWeek=gn.isoWeeks=function(e){var t=we(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")},gn.weeksInYear=function(){var e=this.localeData()._week;return xe(this.year(),e.dow,e.doy)},gn.isoWeeksInYear=function(){return xe(this.year(),1,4)},gn.date=cn,gn.day=gn.days=function(e){if(!this.isValid())return null==e?NaN:this;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return null==e?t:(e=Se(e,this.localeData()),this.add(e-t,"d"))},gn.weekday=function(e){if(!this.isValid())return null==e?NaN:this;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")},gn.isoWeekday=function(e){if(!this.isValid())return null==e?NaN:this;if(null!=e){var t=Oe(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7},gn.dayOfYear=function(e){var o=t((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?o:this.add(e-o,"d")},gn.hour=gn.hours=Ho,gn.minute=gn.minutes=un,gn.second=gn.seconds=pn,gn.millisecond=gn.milliseconds=mn,gn.utcOffset=function(e,t,o){var n=this._offset||0,i;if(!this.isValid())return null==e?NaN:this;if(null!=e){if("string"!=typeof e)16>a(e)&&!o&&(e*=60);else if(e=mt(So,e),null===e)return this;return!this._isUTC&&t&&(i=yt(this)),this._offset=e,this._isUTC=!0,null!=i&&this.add(i,"m"),n!==e&&(!t||this._changeInProgress?St(this,_t(e-n,"m"),1,!1):!this._changeInProgress&&(this._changeInProgress=!0,l.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?n:yt(this)},gn.utc=function(e){return this.utcOffset(0,e)},gn.local=function(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(yt(this),"m")),this},gn.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var e=mt(xo,this._i);null==e?this.utcOffset(0,!0):this.utcOffset(e)}return this},gn.hasAlignedHourOffset=function(e){return!!this.isValid()&&(e=e?st(e).utcOffset():0,0==(this.utcOffset()-e)%60)},gn.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},gn.isLocal=function(){return!!this.isValid()&&!this._isUTC},gn.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},gn.isUtc=bt,gn.isUTC=bt,gn.zoneAbbr=function(){return this._isUTC?"UTC":""},gn.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},gn.dates=F("dates accessor is deprecated. Use date instead.",cn),gn.months=F("months accessor is deprecated. Use month instead",ye),gn.years=F("years accessor is deprecated. Use year instead",Yo),gn.zone=F("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",function(e,t){return null==e?-this.utcOffset():("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this)}),gn.isDSTShifted=F("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",ft);var yn=B.prototype;yn.calendar=L,yn.longDateFormat=A,yn.invalidDate=function(){return this._invalidDate},yn.ordinal=function(e){return this._ordinal.replace("%d",e)},yn.preparse=Yt,yn.postformat=Yt,yn.relativeTime=function(e,t,o,n){var i=this._relativeTime[o];return Y(i)?i(e,t,o,n):i.replace(/%d/i,e)},yn.pastFuture=function(e,t){var o=this._relativeTime[0=e&&0>=t&&0>=o||(e+=864e5*At(jt(o)+t),t=0,o=0),n.milliseconds=e%1e3,i=C(e/1e3),n.seconds=i%60,a=C(i/60),n.minutes=a%60,d=C(a/60),n.hours=d%24,t+=C(d/24),r=C(Ht(t)),o+=r,t-=At(jt(r)),s=C(o/12),o%=12,n.days=t,n.months=o,n.years=s,this},zn.clone=function(){return _t(this)},zn.get=function(e){return e=j(e),this.isValid()?this[e+"s"]():NaN},zn.milliseconds=Tn,zn.seconds=En,zn.minutes=Cn,zn.hours=Mn,zn.days=In,zn.weeks=function(){return C(this.days()/7)},zn.months=Pn,zn.years=Fn,zn.humanize=function(e){if(!this.isValid())return this.localeData().invalidDate();var t=this.localeData(),o=Gt(this,!e,t);return e&&(o=t.pastFuture(+this,o)),t.postformat(o)},zn.toISOString=Zt,zn.toString=Zt,zn.toJSON=Zt,zn.locale=Dt,zn.localeData=Tt,zn.toIsoString=F("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Zt),zn.lang=ln,q("X",0,0,"unix"),q("x",0,0,"valueOf"),Q("x",wo),Q("X",Oo),oe("X",function(e,t,o){o._d=new Date(1e3*parseFloat(e,10))}),oe("x",function(e,t,o){o._d=new Date(M(e))}),l.version="2.24.0",function(e){$t=e}(st),l.fn=gn,l.min=function(){var e=[].slice.call(arguments,0);return rt("isBefore",e)},l.max=function(){var e=[].slice.call(arguments,0);return rt("isAfter",e)},l.now=function(){return Date.now?Date.now():+new Date},l.utc=k,l.unix=function(e){return st(1e3*e)},l.months=function(e,t){return zt(e,t,"months")},l.isDate=y,l.locale=Re,l.invalid=O,l.duration=_t,l.isMoment=E,l.weekdays=function(e,t,o){return Bt(e,t,o,"weekdays")},l.parseZone=function(){return st.apply(null,arguments).parseZone()},l.localeData=Be,l.isDuration=ut,l.monthsShort=function(e,t){return zt(e,t,"monthsShort")},l.weekdaysMin=function(e,t,o){return Bt(e,t,o,"weekdaysMin")},l.defineLocale=ze,l.updateLocale=function(e,t){if(null!=t){var o=jo,n,i;i=Ye(e),null!=i&&(o=i._config),t=z(o,t),n=new B(t),n.parentLocale=Wo[e],Wo[e]=n,Re(e)}else null!=Wo[e]&&(null==Wo[e].parentLocale?null!=Wo[e]&&delete Wo[e]:Wo[e]=Wo[e].parentLocale);return Wo[e]},l.locales=Le,l.weekdaysShort=function(e,t,o){return Bt(e,t,o,"weekdaysShort")},l.normalizeUnits=j,l.relativeTimeRounding=qt,l.relativeTimeThreshold=function(e,t){return void 0!==Yn[e]&&(void 0===t?Yn[e]:(Yn[e]=t,"s"===e&&(Yn.ss=t-1),!0))},l.calendarFormat=function(e,t){var o=e.diff(t,"days",!0);return-6>o?"sameElse":-1>o?"lastWeek":0>o?"lastDay":1>o?"sameDay":2>o?"nextDay":7>o?"nextWeek":"sameElse"},l.prototype=gn,l.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},l})}),moment$3="undefined"!=typeof window&&window.moment||moment$2,moment$4=Object.freeze({default:moment$3,__moduleExports:moment$3}),network={Images:Images,dotparser:dotparser$1,gephiParser:gephiParser,allOptions:allOptions$2,convertDot:DOTToGraph_1,convertGephi:parseGephi},index$2=Object.freeze({util:esm,data:esm$1,network:network,DOMutil:DOMutil$1,moment:moment$4,Hammer:hammer$1,keycharm:keycharm$1,DataSet:DataSet,DataView:DataView,Queue:Queue,Network:Network});export default index$2;export{DOMutil$1 as DOMutil,DataSet,DataView,hammer$1 as Hammer,Network,Queue,esm$1 as data,keycharm$1 as keycharm,moment$4 as moment,network,esm as util}; +//# sourceMappingURL=vis-network.esm.min.js.map diff --git a/node_modules/vis-network/dist/vis-network.esm.min.js.map b/node_modules/vis-network/dist/vis-network.esm.min.js.map new file mode 100644 index 0000000000000000000000000000000000000000..bcced5f21e6246c57e849491a31d614bc385015a --- /dev/null +++ b/node_modules/vis-network/dist/vis-network.esm.min.js.map @@ -0,0 +1 @@ +{"version":3,"file":"vis-network.esm.min.js","sources":["../node_modules/vis-util/dist/esm.js","../node_modules/vis-data/dist/esm.js","../lib/network/shapes.js","../node_modules/component-emitter/index.js","../lib/network/dotparser.js","../lib/network/gephiParser.ts","../node_modules/keycharm/keycharm.js","../node_modules/@egjs/hammerjs/dist/hammer.esm.js","../lib/module/hammer.js","../lib/shared/Activator.js","../lib/network/locales.js","../node_modules/@babel/runtime/helpers/classCallCheck.js","../node_modules/@babel/runtime/helpers/createClass.js","../lib/network/CachedImage.js","../lib/network/Images.js","../lib/network/modules/Groups.js","../node_modules/@babel/runtime/helpers/arrayWithHoles.js","../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js","../node_modules/@babel/runtime/helpers/nonIterableRest.js","../node_modules/@babel/runtime/helpers/slicedToArray.js","../node_modules/@babel/runtime/helpers/typeof.js","../lib/network/modules/components/shared/ComponentUtil.js","../lib/network/modules/components/shared/LabelAccumulator.js","../lib/network/modules/components/shared/LabelSplitter.js","../lib/network/modules/components/shared/Label.js","../node_modules/@babel/runtime/helpers/assertThisInitialized.js","../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js","../node_modules/@babel/runtime/helpers/getPrototypeOf.js","../node_modules/@babel/runtime/helpers/setPrototypeOf.js","../node_modules/@babel/runtime/helpers/inherits.js","../lib/network/modules/components/nodes/util/NodeBase.js","../lib/network/modules/components/nodes/shapes/Box.js","../lib/network/modules/components/nodes/util/CircleImageBase.js","../lib/network/modules/components/nodes/shapes/Circle.js","../lib/network/modules/components/nodes/shapes/CircularImage.js","../lib/network/modules/components/nodes/shapes/Database.js","../lib/network/modules/components/nodes/util/ShapeBase.js","../lib/network/modules/components/nodes/shapes/Diamond.js","../lib/network/modules/components/nodes/shapes/Dot.js","../lib/network/modules/components/nodes/shapes/Ellipse.js","../lib/network/modules/components/nodes/shapes/Icon.js","../lib/network/modules/components/nodes/shapes/Image.js","../lib/network/modules/components/nodes/shapes/Square.js","../lib/network/modules/components/nodes/shapes/Hexagon.js","../lib/network/modules/components/nodes/shapes/Star.js","../lib/network/modules/components/nodes/shapes/Text.js","../lib/network/modules/components/nodes/shapes/Triangle.js","../lib/network/modules/components/nodes/shapes/TriangleDown.js","../lib/shared/Validator.js","../lib/network/modules/components/Node.js","../lib/network/modules/NodesHandler.js","../lib/network/modules/components/edges/util/EndPoints.js","../lib/network/modules/components/edges/util/EdgeBase.js","../lib/network/modules/components/edges/util/BezierEdgeBase.js","../lib/network/modules/components/edges/util/CubicBezierEdgeBase.js","../lib/network/modules/components/edges/CubicBezierEdge.js","../lib/network/modules/components/edges/BezierEdgeDynamic.js","../lib/network/modules/components/edges/BezierEdgeStatic.js","../lib/network/modules/components/edges/StraightEdge.js","../lib/network/modules/components/Edge.js","../lib/network/modules/EdgesHandler.js","../lib/network/modules/components/physics/BarnesHutSolver.js","../lib/network/modules/components/physics/RepulsionSolver.js","../lib/network/modules/components/physics/HierarchicalRepulsionSolver.js","../lib/network/modules/components/physics/SpringSolver.js","../lib/network/modules/components/physics/HierarchicalSpringSolver.js","../lib/network/modules/components/physics/CentralGravitySolver.js","../lib/network/modules/components/physics/FA2BasedRepulsionSolver.js","../lib/network/modules/components/physics/FA2BasedCentralGravitySolver.js","../lib/network/modules/PhysicsEngine.js","../lib/network/NetworkUtil.js","../lib/network/modules/components/nodes/Cluster.js","../lib/network/modules/Clustering.js","../lib/network/modules/CanvasRenderer.js","../lib/hammerUtil.js","../lib/network/modules/Canvas.js","../lib/network/modules/View.js","../lib/network/modules/components/NavigationHandler.js","../lib/shared/Popup.js","../lib/network/modules/InteractionHandler.js","../lib/network/modules/SelectionHandler.js","../node_modules/timsort/build/timsort.js","../node_modules/timsort/index.js","../lib/network/modules/components/DirectionStrategy.js","../lib/network/modules/LayoutEngine.js","../lib/network/modules/ManipulationSystem.js","../lib/shared/ColorPicker.js","../lib/shared/Configurator.js","../lib/network/options.js","../lib/network/modules/components/algorithms/FloydWarshall.js","../lib/network/modules/KamadaKawai.js","../lib/network/Network.js","../lib/DOMutil.js","../node_modules/moment/moment.js","../lib/module/moment.js","../lib/index.ts"],"sourcesContent":["var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};\n\nfunction commonjsRequire () {\n\tthrow new Error('Dynamic requires are not currently supported by rollup-plugin-commonjs');\n}\n\nfunction createCommonjsModule(fn, module) {\n\treturn module = { exports: {} }, fn(module, module.exports), module.exports;\n}\n\nvar _global = createCommonjsModule(function (module) {\n // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028\n var global = module.exports = typeof window != 'undefined' && window.Math == Math ? window : typeof self != 'undefined' && self.Math == Math ? self // eslint-disable-next-line no-new-func\n : Function('return this')();\n if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef\n});\n\nvar _core = createCommonjsModule(function (module) {\n var core = module.exports = {\n version: '2.6.9'\n };\n if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef\n});\nvar _core_1 = _core.version;\n\nvar _library = false;\n\nvar _shared = createCommonjsModule(function (module) {\n var SHARED = '__core-js_shared__';\n var store = _global[SHARED] || (_global[SHARED] = {});\n (module.exports = function (key, value) {\n return store[key] || (store[key] = value !== undefined ? value : {});\n })('versions', []).push({\n version: _core.version,\n mode: 'global',\n copyright: '© 2019 Denis Pushkarev (zloirock.ru)'\n });\n});\n\nvar id = 0;\nvar px = Math.random();\n\nvar _uid = function (key) {\n return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));\n};\n\nvar _wks = createCommonjsModule(function (module) {\n var store = _shared('wks');\n var Symbol = _global.Symbol;\n var USE_SYMBOL = typeof Symbol == 'function';\n\n var $exports = module.exports = function (name) {\n return store[name] || (store[name] = USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : _uid)('Symbol.' + name));\n };\n\n $exports.store = store;\n});\n\nvar f = _wks;\nvar _wksExt = {\n f: f\n};\n\nvar _isObject = function (it) {\n return typeof it === 'object' ? it !== null : typeof it === 'function';\n};\n\nvar _anObject = function (it) {\n if (!_isObject(it)) throw TypeError(it + ' is not an object!');\n return it;\n};\n\nvar _fails = function (exec) {\n try {\n return !!exec();\n } catch (e) {\n return true;\n }\n};\n\nvar _descriptors = !_fails(function () {\n return Object.defineProperty({}, 'a', {\n get: function () {\n return 7;\n }\n }).a != 7;\n});\n\nvar document$1 = _global.document; // typeof document.createElement is 'object' in old IE\n\nvar is = _isObject(document$1) && _isObject(document$1.createElement);\n\nvar _domCreate = function (it) {\n return is ? document$1.createElement(it) : {};\n};\n\nvar _ie8DomDefine = !_descriptors && !_fails(function () {\n return Object.defineProperty(_domCreate('div'), 'a', {\n get: function () {\n return 7;\n }\n }).a != 7;\n});\n\n// instead of the ES6 spec version, we didn't implement @@toPrimitive case\n// and the second argument - flag - preferred type is a string\n\nvar _toPrimitive = function (it, S) {\n if (!_isObject(it)) return it;\n var fn, val;\n if (S && typeof (fn = it.toString) == 'function' && !_isObject(val = fn.call(it))) return val;\n if (typeof (fn = it.valueOf) == 'function' && !_isObject(val = fn.call(it))) return val;\n if (!S && typeof (fn = it.toString) == 'function' && !_isObject(val = fn.call(it))) return val;\n throw TypeError(\"Can't convert object to primitive value\");\n};\n\nvar dP = Object.defineProperty;\nvar f$1 = _descriptors ? Object.defineProperty : function defineProperty(O, P, Attributes) {\n _anObject(O);\n P = _toPrimitive(P, true);\n _anObject(Attributes);\n if (_ie8DomDefine) try {\n return dP(O, P, Attributes);\n } catch (e) {\n /* empty */\n }\n if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!');\n if ('value' in Attributes) O[P] = Attributes.value;\n return O;\n};\nvar _objectDp = {\n f: f$1\n};\n\nvar defineProperty = _objectDp.f;\n\nvar _wksDefine = function (name) {\n var $Symbol = _core.Symbol || (_core.Symbol = _global.Symbol || {});\n if (name.charAt(0) != '_' && !(name in $Symbol)) defineProperty($Symbol, name, {\n value: _wksExt.f(name)\n });\n};\n\n_wksDefine('asyncIterator');\n\nvar hasOwnProperty = {}.hasOwnProperty;\n\nvar _has = function (it, key) {\n return hasOwnProperty.call(it, key);\n};\n\nvar _propertyDesc = function (bitmap, value) {\n return {\n enumerable: !(bitmap & 1),\n configurable: !(bitmap & 2),\n writable: !(bitmap & 4),\n value: value\n };\n};\n\nvar _hide = _descriptors ? function (object, key, value) {\n return _objectDp.f(object, key, _propertyDesc(1, value));\n} : function (object, key, value) {\n object[key] = value;\n return object;\n};\n\nvar _functionToString = _shared('native-function-to-string', Function.toString);\n\nvar _redefine = createCommonjsModule(function (module) {\n var SRC = _uid('src');\n var TO_STRING = 'toString';\n var TPL = ('' + _functionToString).split(TO_STRING);\n\n _core.inspectSource = function (it) {\n return _functionToString.call(it);\n };\n\n (module.exports = function (O, key, val, safe) {\n var isFunction = typeof val == 'function';\n if (isFunction) _has(val, 'name') || _hide(val, 'name', key);\n if (O[key] === val) return;\n if (isFunction) _has(val, SRC) || _hide(val, SRC, O[key] ? '' + O[key] : TPL.join(String(key)));\n\n if (O === _global) {\n O[key] = val;\n } else if (!safe) {\n delete O[key];\n _hide(O, key, val);\n } else if (O[key]) {\n O[key] = val;\n } else {\n _hide(O, key, val);\n } // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative\n\n })(Function.prototype, TO_STRING, function toString() {\n return typeof this == 'function' && this[SRC] || _functionToString.call(this);\n });\n});\n\nvar _aFunction = function (it) {\n if (typeof it != 'function') throw TypeError(it + ' is not a function!');\n return it;\n};\n\nvar _ctx = function (fn, that, length) {\n _aFunction(fn);\n if (that === undefined) return fn;\n\n switch (length) {\n case 1:\n return function (a) {\n return fn.call(that, a);\n };\n\n case 2:\n return function (a, b) {\n return fn.call(that, a, b);\n };\n\n case 3:\n return function (a, b, c) {\n return fn.call(that, a, b, c);\n };\n }\n\n return function ()\n /* ...args */\n {\n return fn.apply(that, arguments);\n };\n};\n\nvar PROTOTYPE = 'prototype';\n\nvar $export = function (type, name, source) {\n var IS_FORCED = type & $export.F;\n var IS_GLOBAL = type & $export.G;\n var IS_STATIC = type & $export.S;\n var IS_PROTO = type & $export.P;\n var IS_BIND = type & $export.B;\n var target = IS_GLOBAL ? _global : IS_STATIC ? _global[name] || (_global[name] = {}) : (_global[name] || {})[PROTOTYPE];\n var exports = IS_GLOBAL ? _core : _core[name] || (_core[name] = {});\n var expProto = exports[PROTOTYPE] || (exports[PROTOTYPE] = {});\n var key, own, out, exp;\n if (IS_GLOBAL) source = name;\n\n for (key in source) {\n // contains in native\n own = !IS_FORCED && target && target[key] !== undefined; // export native or passed\n\n out = (own ? target : source)[key]; // bind timers to global for call from export context\n\n exp = IS_BIND && own ? _ctx(out, _global) : IS_PROTO && typeof out == 'function' ? _ctx(Function.call, out) : out; // extend global\n\n if (target) _redefine(target, key, out, type & $export.U); // export\n\n if (exports[key] != out) _hide(exports, key, exp);\n if (IS_PROTO && expProto[key] != out) expProto[key] = out;\n }\n};\n\n_global.core = _core; // type bitmap\n\n$export.F = 1; // forced\n\n$export.G = 2; // global\n\n$export.S = 4; // static\n\n$export.P = 8; // proto\n\n$export.B = 16; // bind\n\n$export.W = 32; // wrap\n\n$export.U = 64; // safe\n\n$export.R = 128; // real proto method for `library`\n\nvar _export = $export;\n\nvar _meta = createCommonjsModule(function (module) {\n var META = _uid('meta');\n var setDesc = _objectDp.f;\n var id = 0;\n\n var isExtensible = Object.isExtensible || function () {\n return true;\n };\n\n var FREEZE = !_fails(function () {\n return isExtensible(Object.preventExtensions({}));\n });\n\n var setMeta = function (it) {\n setDesc(it, META, {\n value: {\n i: 'O' + ++id,\n // object ID\n w: {} // weak collections IDs\n\n }\n });\n };\n\n var fastKey = function (it, create) {\n // return primitive with prefix\n if (!_isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it;\n\n if (!_has(it, META)) {\n // can't set metadata to uncaught frozen object\n if (!isExtensible(it)) return 'F'; // not necessary to add metadata\n\n if (!create) return 'E'; // add missing metadata\n\n setMeta(it); // return object ID\n }\n\n return it[META].i;\n };\n\n var getWeak = function (it, create) {\n if (!_has(it, META)) {\n // can't set metadata to uncaught frozen object\n if (!isExtensible(it)) return true; // not necessary to add metadata\n\n if (!create) return false; // add missing metadata\n\n setMeta(it); // return hash weak collections IDs\n }\n\n return it[META].w;\n }; // add metadata on freeze-family methods calling\n\n\n var onFreeze = function (it) {\n if (FREEZE && meta.NEED && isExtensible(it) && !_has(it, META)) setMeta(it);\n return it;\n };\n\n var meta = module.exports = {\n KEY: META,\n NEED: false,\n fastKey: fastKey,\n getWeak: getWeak,\n onFreeze: onFreeze\n };\n});\nvar _meta_1 = _meta.KEY;\nvar _meta_2 = _meta.NEED;\nvar _meta_3 = _meta.fastKey;\nvar _meta_4 = _meta.getWeak;\nvar _meta_5 = _meta.onFreeze;\n\nvar def = _objectDp.f;\nvar TAG = _wks('toStringTag');\n\nvar _setToStringTag = function (it, tag, stat) {\n if (it && !_has(it = stat ? it : it.prototype, TAG)) def(it, TAG, {\n configurable: true,\n value: tag\n });\n};\n\nvar toString = {}.toString;\n\nvar _cof = function (it) {\n return toString.call(it).slice(8, -1);\n};\n\n// eslint-disable-next-line no-prototype-builtins\n\nvar _iobject = Object('z').propertyIsEnumerable(0) ? Object : function (it) {\n return _cof(it) == 'String' ? it.split('') : Object(it);\n};\n\n// 7.2.1 RequireObjectCoercible(argument)\nvar _defined = function (it) {\n if (it == undefined) throw TypeError(\"Can't call method on \" + it);\n return it;\n};\n\nvar _toIobject = function (it) {\n return _iobject(_defined(it));\n};\n\n// 7.1.4 ToInteger\nvar ceil = Math.ceil;\nvar floor = Math.floor;\n\nvar _toInteger = function (it) {\n return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);\n};\n\nvar min = Math.min;\n\nvar _toLength = function (it) {\n return it > 0 ? min(_toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991\n};\n\nvar max = Math.max;\nvar min$1 = Math.min;\n\nvar _toAbsoluteIndex = function (index, length) {\n index = _toInteger(index);\n return index < 0 ? max(index + length, 0) : min$1(index, length);\n};\n\n// true -> Array#includes\n\nvar _arrayIncludes = function (IS_INCLUDES) {\n return function ($this, el, fromIndex) {\n var O = _toIobject($this);\n var length = _toLength(O.length);\n var index = _toAbsoluteIndex(fromIndex, length);\n var value; // Array#includes uses SameValueZero equality algorithm\n // eslint-disable-next-line no-self-compare\n\n if (IS_INCLUDES && el != el) while (length > index) {\n value = O[index++]; // eslint-disable-next-line no-self-compare\n\n if (value != value) return true; // Array#indexOf ignores holes, Array#includes - not\n } else for (; length > index; index++) if (IS_INCLUDES || index in O) {\n if (O[index] === el) return IS_INCLUDES || index || 0;\n }\n return !IS_INCLUDES && -1;\n };\n};\n\nvar shared = _shared('keys');\n\nvar _sharedKey = function (key) {\n return shared[key] || (shared[key] = _uid(key));\n};\n\nvar arrayIndexOf = _arrayIncludes(false);\nvar IE_PROTO = _sharedKey('IE_PROTO');\n\nvar _objectKeysInternal = function (object, names) {\n var O = _toIobject(object);\n var i = 0;\n var result = [];\n var key;\n\n for (key in O) if (key != IE_PROTO) _has(O, key) && result.push(key); // Don't enum bug & hidden keys\n\n\n while (names.length > i) if (_has(O, key = names[i++])) {\n ~arrayIndexOf(result, key) || result.push(key);\n }\n\n return result;\n};\n\n// IE 8- don't enum bug keys\nvar _enumBugKeys = 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'.split(',');\n\nvar _objectKeys = Object.keys || function keys(O) {\n return _objectKeysInternal(O, _enumBugKeys);\n};\n\nvar f$2 = Object.getOwnPropertySymbols;\nvar _objectGops = {\n f: f$2\n};\n\nvar f$3 = {}.propertyIsEnumerable;\nvar _objectPie = {\n f: f$3\n};\n\nvar _enumKeys = function (it) {\n var result = _objectKeys(it);\n var getSymbols = _objectGops.f;\n\n if (getSymbols) {\n var symbols = getSymbols(it);\n var isEnum = _objectPie.f;\n var i = 0;\n var key;\n\n while (symbols.length > i) if (isEnum.call(it, key = symbols[i++])) result.push(key);\n }\n\n return result;\n};\n\nvar _isArray = Array.isArray || function isArray(arg) {\n return _cof(arg) == 'Array';\n};\n\nvar _toObject = function (it) {\n return Object(_defined(it));\n};\n\nvar _objectDps = _descriptors ? Object.defineProperties : function defineProperties(O, Properties) {\n _anObject(O);\n var keys = _objectKeys(Properties);\n var length = keys.length;\n var i = 0;\n var P;\n\n while (length > i) _objectDp.f(O, P = keys[i++], Properties[P]);\n\n return O;\n};\n\nvar document$2 = _global.document;\n\nvar _html = document$2 && document$2.documentElement;\n\nvar IE_PROTO$1 = _sharedKey('IE_PROTO');\n\nvar Empty = function () {\n /* empty */\n};\n\nvar PROTOTYPE$1 = 'prototype'; // Create object with fake `null` prototype: use iframe Object with cleared prototype\n\nvar createDict = function () {\n // Thrash, waste and sodomy: IE GC bug\n var iframe = _domCreate('iframe');\n var i = _enumBugKeys.length;\n var lt = '<';\n var gt = '>';\n var iframeDocument;\n iframe.style.display = 'none';\n _html.appendChild(iframe);\n iframe.src = 'javascript:'; // eslint-disable-line no-script-url\n // createDict = iframe.contentWindow.Object;\n // html.removeChild(iframe);\n\n iframeDocument = iframe.contentWindow.document;\n iframeDocument.open();\n iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt);\n iframeDocument.close();\n createDict = iframeDocument.F;\n\n while (i--) delete createDict[PROTOTYPE$1][_enumBugKeys[i]];\n\n return createDict();\n};\n\nvar _objectCreate = Object.create || function create(O, Properties) {\n var result;\n\n if (O !== null) {\n Empty[PROTOTYPE$1] = _anObject(O);\n result = new Empty();\n Empty[PROTOTYPE$1] = null; // add \"__proto__\" for Object.getPrototypeOf polyfill\n\n result[IE_PROTO$1] = O;\n } else result = createDict();\n\n return Properties === undefined ? result : _objectDps(result, Properties);\n};\n\nvar hiddenKeys = _enumBugKeys.concat('length', 'prototype');\n\nvar f$4 = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {\n return _objectKeysInternal(O, hiddenKeys);\n};\n\nvar _objectGopn = {\n f: f$4\n};\n\nvar gOPN = _objectGopn.f;\nvar toString$1 = {}.toString;\nvar windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames ? Object.getOwnPropertyNames(window) : [];\n\nvar getWindowNames = function (it) {\n try {\n return gOPN(it);\n } catch (e) {\n return windowNames.slice();\n }\n};\n\nvar f$5 = function getOwnPropertyNames(it) {\n return windowNames && toString$1.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(_toIobject(it));\n};\n\nvar _objectGopnExt = {\n f: f$5\n};\n\nvar gOPD = Object.getOwnPropertyDescriptor;\nvar f$6 = _descriptors ? gOPD : function getOwnPropertyDescriptor(O, P) {\n O = _toIobject(O);\n P = _toPrimitive(P, true);\n if (_ie8DomDefine) try {\n return gOPD(O, P);\n } catch (e) {\n /* empty */\n }\n if (_has(O, P)) return _propertyDesc(!_objectPie.f.call(O, P), O[P]);\n};\nvar _objectGopd = {\n f: f$6\n};\n\nvar META = _meta.KEY;\nvar gOPD$1 = _objectGopd.f;\nvar dP$1 = _objectDp.f;\nvar gOPN$1 = _objectGopnExt.f;\nvar $Symbol = _global.Symbol;\nvar $JSON = _global.JSON;\n\nvar _stringify = $JSON && $JSON.stringify;\n\nvar PROTOTYPE$2 = 'prototype';\nvar HIDDEN = _wks('_hidden');\nvar TO_PRIMITIVE = _wks('toPrimitive');\nvar isEnum = {}.propertyIsEnumerable;\nvar SymbolRegistry = _shared('symbol-registry');\nvar AllSymbols = _shared('symbols');\nvar OPSymbols = _shared('op-symbols');\nvar ObjectProto = Object[PROTOTYPE$2];\nvar USE_NATIVE = typeof $Symbol == 'function' && !!_objectGops.f;\nvar QObject = _global.QObject; // Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173\n\nvar setter = !QObject || !QObject[PROTOTYPE$2] || !QObject[PROTOTYPE$2].findChild; // fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687\n\nvar setSymbolDesc = _descriptors && _fails(function () {\n return _objectCreate(dP$1({}, 'a', {\n get: function () {\n return dP$1(this, 'a', {\n value: 7\n }).a;\n }\n })).a != 7;\n}) ? function (it, key, D) {\n var protoDesc = gOPD$1(ObjectProto, key);\n if (protoDesc) delete ObjectProto[key];\n dP$1(it, key, D);\n if (protoDesc && it !== ObjectProto) dP$1(ObjectProto, key, protoDesc);\n} : dP$1;\n\nvar wrap = function (tag) {\n var sym = AllSymbols[tag] = _objectCreate($Symbol[PROTOTYPE$2]);\n\n sym._k = tag;\n return sym;\n};\n\nvar isSymbol = USE_NATIVE && typeof $Symbol.iterator == 'symbol' ? function (it) {\n return typeof it == 'symbol';\n} : function (it) {\n return it instanceof $Symbol;\n};\n\nvar $defineProperty = function defineProperty(it, key, D) {\n if (it === ObjectProto) $defineProperty(OPSymbols, key, D);\n _anObject(it);\n key = _toPrimitive(key, true);\n _anObject(D);\n\n if (_has(AllSymbols, key)) {\n if (!D.enumerable) {\n if (!_has(it, HIDDEN)) dP$1(it, HIDDEN, _propertyDesc(1, {}));\n it[HIDDEN][key] = true;\n } else {\n if (_has(it, HIDDEN) && it[HIDDEN][key]) it[HIDDEN][key] = false;\n D = _objectCreate(D, {\n enumerable: _propertyDesc(0, false)\n });\n }\n\n return setSymbolDesc(it, key, D);\n }\n\n return dP$1(it, key, D);\n};\n\nvar $defineProperties = function defineProperties(it, P) {\n _anObject(it);\n var keys = _enumKeys(P = _toIobject(P));\n var i = 0;\n var l = keys.length;\n var key;\n\n while (l > i) $defineProperty(it, key = keys[i++], P[key]);\n\n return it;\n};\n\nvar $create = function create(it, P) {\n return P === undefined ? _objectCreate(it) : $defineProperties(_objectCreate(it), P);\n};\n\nvar $propertyIsEnumerable = function propertyIsEnumerable(key) {\n var E = isEnum.call(this, key = _toPrimitive(key, true));\n if (this === ObjectProto && _has(AllSymbols, key) && !_has(OPSymbols, key)) return false;\n return E || !_has(this, key) || !_has(AllSymbols, key) || _has(this, HIDDEN) && this[HIDDEN][key] ? E : true;\n};\n\nvar $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key) {\n it = _toIobject(it);\n key = _toPrimitive(key, true);\n if (it === ObjectProto && _has(AllSymbols, key) && !_has(OPSymbols, key)) return;\n var D = gOPD$1(it, key);\n if (D && _has(AllSymbols, key) && !(_has(it, HIDDEN) && it[HIDDEN][key])) D.enumerable = true;\n return D;\n};\n\nvar $getOwnPropertyNames = function getOwnPropertyNames(it) {\n var names = gOPN$1(_toIobject(it));\n var result = [];\n var i = 0;\n var key;\n\n while (names.length > i) {\n if (!_has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META) result.push(key);\n }\n\n return result;\n};\n\nvar $getOwnPropertySymbols = function getOwnPropertySymbols(it) {\n var IS_OP = it === ObjectProto;\n var names = gOPN$1(IS_OP ? OPSymbols : _toIobject(it));\n var result = [];\n var i = 0;\n var key;\n\n while (names.length > i) {\n if (_has(AllSymbols, key = names[i++]) && (IS_OP ? _has(ObjectProto, key) : true)) result.push(AllSymbols[key]);\n }\n\n return result;\n}; // 19.4.1.1 Symbol([description])\n\n\nif (!USE_NATIVE) {\n $Symbol = function Symbol() {\n if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor!');\n var tag = _uid(arguments.length > 0 ? arguments[0] : undefined);\n\n var $set = function (value) {\n if (this === ObjectProto) $set.call(OPSymbols, value);\n if (_has(this, HIDDEN) && _has(this[HIDDEN], tag)) this[HIDDEN][tag] = false;\n setSymbolDesc(this, tag, _propertyDesc(1, value));\n };\n\n if (_descriptors && setter) setSymbolDesc(ObjectProto, tag, {\n configurable: true,\n set: $set\n });\n return wrap(tag);\n };\n\n _redefine($Symbol[PROTOTYPE$2], 'toString', function toString() {\n return this._k;\n });\n _objectGopd.f = $getOwnPropertyDescriptor;\n _objectDp.f = $defineProperty;\n _objectGopn.f = _objectGopnExt.f = $getOwnPropertyNames;\n _objectPie.f = $propertyIsEnumerable;\n _objectGops.f = $getOwnPropertySymbols;\n\n if (_descriptors && !_library) {\n _redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true);\n }\n\n _wksExt.f = function (name) {\n return wrap(_wks(name));\n };\n}\n\n_export(_export.G + _export.W + _export.F * !USE_NATIVE, {\n Symbol: $Symbol\n});\n\nfor (var es6Symbols = // 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14\n'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables'.split(','), j = 0; es6Symbols.length > j;) _wks(es6Symbols[j++]);\n\nfor (var wellKnownSymbols = _objectKeys(_wks.store), k = 0; wellKnownSymbols.length > k;) _wksDefine(wellKnownSymbols[k++]);\n\n_export(_export.S + _export.F * !USE_NATIVE, 'Symbol', {\n // 19.4.2.1 Symbol.for(key)\n 'for': function (key) {\n return _has(SymbolRegistry, key += '') ? SymbolRegistry[key] : SymbolRegistry[key] = $Symbol(key);\n },\n // 19.4.2.5 Symbol.keyFor(sym)\n keyFor: function keyFor(sym) {\n if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol!');\n\n for (var key in SymbolRegistry) if (SymbolRegistry[key] === sym) return key;\n },\n useSetter: function () {\n setter = true;\n },\n useSimple: function () {\n setter = false;\n }\n});\n_export(_export.S + _export.F * !USE_NATIVE, 'Object', {\n // 19.1.2.2 Object.create(O [, Properties])\n create: $create,\n // 19.1.2.4 Object.defineProperty(O, P, Attributes)\n defineProperty: $defineProperty,\n // 19.1.2.3 Object.defineProperties(O, Properties)\n defineProperties: $defineProperties,\n // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P)\n getOwnPropertyDescriptor: $getOwnPropertyDescriptor,\n // 19.1.2.7 Object.getOwnPropertyNames(O)\n getOwnPropertyNames: $getOwnPropertyNames,\n // 19.1.2.8 Object.getOwnPropertySymbols(O)\n getOwnPropertySymbols: $getOwnPropertySymbols\n}); // Chrome 38 and 39 `Object.getOwnPropertySymbols` fails on primitives\n// https://bugs.chromium.org/p/v8/issues/detail?id=3443\n\nvar FAILS_ON_PRIMITIVES = _fails(function () {\n _objectGops.f(1);\n});\n_export(_export.S + _export.F * FAILS_ON_PRIMITIVES, 'Object', {\n getOwnPropertySymbols: function getOwnPropertySymbols(it) {\n return _objectGops.f(_toObject(it));\n }\n}); // 24.3.2 JSON.stringify(value [, replacer [, space]])\n\n$JSON && _export(_export.S + _export.F * (!USE_NATIVE || _fails(function () {\n var S = $Symbol(); // MS Edge converts symbol values to JSON as {}\n // WebKit converts symbol values to JSON as null\n // V8 throws on boxed symbols\n\n return _stringify([S]) != '[null]' || _stringify({\n a: S\n }) != '{}' || _stringify(Object(S)) != '{}';\n})), 'JSON', {\n stringify: function stringify(it) {\n var args = [it];\n var i = 1;\n var replacer, $replacer;\n\n while (arguments.length > i) args.push(arguments[i++]);\n\n $replacer = replacer = args[1];\n if (!_isObject(replacer) && it === undefined || isSymbol(it)) return; // IE8 returns string on undefined\n\n if (!_isArray(replacer)) replacer = function (key, value) {\n if (typeof $replacer == 'function') value = $replacer.call(this, key, value);\n if (!isSymbol(value)) return value;\n };\n args[1] = replacer;\n return _stringify.apply($JSON, args);\n }\n}); // 19.4.3.4 Symbol.prototype[@@toPrimitive](hint)\n\n$Symbol[PROTOTYPE$2][TO_PRIMITIVE] || _hide($Symbol[PROTOTYPE$2], TO_PRIMITIVE, $Symbol[PROTOTYPE$2].valueOf); // 19.4.3.5 Symbol.prototype[@@toStringTag]\n\n_setToStringTag($Symbol, 'Symbol'); // 20.2.1.9 Math[@@toStringTag]\n\n_setToStringTag(Math, 'Math', true); // 24.3.3 JSON[@@toStringTag]\n\n_setToStringTag(_global.JSON, 'JSON', true);\n\nfunction _typeof(obj) {\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function (obj) {\n return typeof obj;\n };\n } else {\n _typeof = function (obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n\n if (Object.getOwnPropertySymbols) {\n keys.push.apply(keys, Object.getOwnPropertySymbols(object));\n }\n\n if (enumerableOnly) keys = keys.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n return keys;\n}\n\nfunction _objectSpread2(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n\n if (i % 2) {\n ownKeys(source, true).forEach(function (key) {\n _defineProperty(target, key, source[key]);\n });\n } else if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(source).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n }\n\n return target;\n}\n\nfunction _toConsumableArray(arr) {\n return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread();\n}\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) {\n for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) arr2[i] = arr[i];\n\n return arr2;\n }\n}\n\nfunction _iterableToArray(iter) {\n if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === \"[object Arguments]\") return Array.from(iter);\n}\n\nfunction _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance\");\n}\n\nvar _objectSap = function (KEY, exec) {\n var fn = (_core.Object || {})[KEY] || Object[KEY];\n var exp = {};\n exp[KEY] = exec(fn);\n _export(_export.S + _export.F * _fails(function () {\n fn(1);\n }), 'Object', exp);\n};\n\n_objectSap('keys', function () {\n return function keys(it) {\n return _objectKeys(_toObject(it));\n };\n});\n\nvar _flags = function () {\n var that = _anObject(this);\n var result = '';\n if (that.global) result += 'g';\n if (that.ignoreCase) result += 'i';\n if (that.multiline) result += 'm';\n if (that.unicode) result += 'u';\n if (that.sticky) result += 'y';\n return result;\n};\n\nif (_descriptors && /./g.flags != 'g') _objectDp.f(RegExp.prototype, 'flags', {\n configurable: true,\n get: _flags\n});\n\nvar TO_STRING = 'toString';\nvar $toString = /./[TO_STRING];\n\nvar define = function (fn) {\n _redefine(RegExp.prototype, TO_STRING, fn, true);\n}; // 21.2.5.14 RegExp.prototype.toString()\n\n\nif (_fails(function () {\n return $toString.call({\n source: 'a',\n flags: 'b'\n }) != '/a/b';\n})) {\n define(function toString() {\n var R = _anObject(this);\n return '/'.concat(R.source, '/', 'flags' in R ? R.flags : !_descriptors && R instanceof RegExp ? _flags.call(R) : undefined);\n }); // FF44- RegExp#toString has a wrong name\n} else if ($toString.name != TO_STRING) {\n define(function toString() {\n return $toString.call(this);\n });\n}\n\n// false -> String#codePointAt\n\nvar _stringAt = function (TO_STRING) {\n return function (that, pos) {\n var s = String(_defined(that));\n var i = _toInteger(pos);\n var l = s.length;\n var a, b;\n if (i < 0 || i >= l) return TO_STRING ? '' : undefined;\n a = s.charCodeAt(i);\n return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff ? TO_STRING ? s.charAt(i) : a : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000;\n };\n};\n\nvar at = _stringAt(true); // `AdvanceStringIndex` abstract operation\n// https://tc39.github.io/ecma262/#sec-advancestringindex\n\nvar _advanceStringIndex = function (S, index, unicode) {\n return index + (unicode ? at(S, index).length : 1);\n};\n\nvar TAG$1 = _wks('toStringTag'); // ES3 wrong here\n\nvar ARG = _cof(function () {\n return arguments;\n}()) == 'Arguments'; // fallback for IE11 Script Access Denied error\n\nvar tryGet = function (it, key) {\n try {\n return it[key];\n } catch (e) {\n /* empty */\n }\n};\n\nvar _classof = function (it) {\n var O, T, B;\n return it === undefined ? 'Undefined' : it === null ? 'Null' // @@toStringTag case\n : typeof (T = tryGet(O = Object(it), TAG$1)) == 'string' ? T // builtinTag case\n : ARG ? _cof(O) // ES3 arguments fallback\n : (B = _cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B;\n};\n\nvar builtinExec = RegExp.prototype.exec; // `RegExpExec` abstract operation\n// https://tc39.github.io/ecma262/#sec-regexpexec\n\nvar _regexpExecAbstract = function (R, S) {\n var exec = R.exec;\n\n if (typeof exec === 'function') {\n var result = exec.call(R, S);\n\n if (typeof result !== 'object') {\n throw new TypeError('RegExp exec method returned something other than an Object or null');\n }\n\n return result;\n }\n\n if (_classof(R) !== 'RegExp') {\n throw new TypeError('RegExp#exec called on incompatible receiver');\n }\n\n return builtinExec.call(R, S);\n};\n\nvar nativeExec = RegExp.prototype.exec; // This always refers to the native implementation, because the\n// String#replace polyfill uses ./fix-regexp-well-known-symbol-logic.js,\n// which loads this file before patching the method.\n\nvar nativeReplace = String.prototype.replace;\nvar patchedExec = nativeExec;\nvar LAST_INDEX = 'lastIndex';\n\nvar UPDATES_LAST_INDEX_WRONG = function () {\n var re1 = /a/,\n re2 = /b*/g;\n nativeExec.call(re1, 'a');\n nativeExec.call(re2, 'a');\n return re1[LAST_INDEX] !== 0 || re2[LAST_INDEX] !== 0;\n}(); // nonparticipating capturing group, copied from es5-shim's String#split patch.\n\n\nvar NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;\nvar PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED;\n\nif (PATCH) {\n patchedExec = function exec(str) {\n var re = this;\n var lastIndex, reCopy, match, i;\n\n if (NPCG_INCLUDED) {\n reCopy = new RegExp('^' + re.source + '$(?!\\\\s)', _flags.call(re));\n }\n\n if (UPDATES_LAST_INDEX_WRONG) lastIndex = re[LAST_INDEX];\n match = nativeExec.call(re, str);\n\n if (UPDATES_LAST_INDEX_WRONG && match) {\n re[LAST_INDEX] = re.global ? match.index + match[0].length : lastIndex;\n }\n\n if (NPCG_INCLUDED && match && match.length > 1) {\n // Fix browsers whose `exec` methods don't consistently return `undefined`\n // for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/\n // eslint-disable-next-line no-loop-func\n nativeReplace.call(match[0], reCopy, function () {\n for (i = 1; i < arguments.length - 2; i++) {\n if (arguments[i] === undefined) match[i] = undefined;\n }\n });\n }\n\n return match;\n };\n}\n\nvar _regexpExec = patchedExec;\n\n_export({\n target: 'RegExp',\n proto: true,\n forced: _regexpExec !== /./.exec\n}, {\n exec: _regexpExec\n});\n\nvar SPECIES = _wks('species');\nvar REPLACE_SUPPORTS_NAMED_GROUPS = !_fails(function () {\n // #replace needs built-in support for named groups.\n // #match works fine because it just return the exec results, even if it has\n // a \"grops\" property.\n var re = /./;\n\n re.exec = function () {\n var result = [];\n result.groups = {\n a: '7'\n };\n return result;\n };\n\n return ''.replace(re, '$') !== '7';\n});\n\nvar SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = function () {\n // Chrome 51 has a buggy \"split\" implementation when RegExp#exec !== nativeExec\n var re = /(?:)/;\n var originalExec = re.exec;\n\n re.exec = function () {\n return originalExec.apply(this, arguments);\n };\n\n var result = 'ab'.split(re);\n return result.length === 2 && result[0] === 'a' && result[1] === 'b';\n}();\n\nvar _fixReWks = function (KEY, length, exec) {\n var SYMBOL = _wks(KEY);\n var DELEGATES_TO_SYMBOL = !_fails(function () {\n // String methods call symbol-named RegEp methods\n var O = {};\n\n O[SYMBOL] = function () {\n return 7;\n };\n\n return ''[KEY](O) != 7;\n });\n var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL ? !_fails(function () {\n // Symbol-named RegExp methods call .exec\n var execCalled = false;\n var re = /a/;\n\n re.exec = function () {\n execCalled = true;\n return null;\n };\n\n if (KEY === 'split') {\n // RegExp[@@split] doesn't call the regex's exec method, but first creates\n // a new one. We need to return the patched regex when creating the new one.\n re.constructor = {};\n\n re.constructor[SPECIES] = function () {\n return re;\n };\n }\n\n re[SYMBOL]('');\n return !execCalled;\n }) : undefined;\n\n if (!DELEGATES_TO_SYMBOL || !DELEGATES_TO_EXEC || KEY === 'replace' && !REPLACE_SUPPORTS_NAMED_GROUPS || KEY === 'split' && !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC) {\n var nativeRegExpMethod = /./[SYMBOL];\n var fns = exec(_defined, SYMBOL, ''[KEY], function maybeCallNative(nativeMethod, regexp, str, arg2, forceStringMethod) {\n if (regexp.exec === _regexpExec) {\n if (DELEGATES_TO_SYMBOL && !forceStringMethod) {\n // The native String method already delegates to @@method (this\n // polyfilled function), leasing to infinite recursion.\n // We avoid it by directly calling the native @@method method.\n return {\n done: true,\n value: nativeRegExpMethod.call(regexp, str, arg2)\n };\n }\n\n return {\n done: true,\n value: nativeMethod.call(str, regexp, arg2)\n };\n }\n\n return {\n done: false\n };\n });\n var strfn = fns[0];\n var rxfn = fns[1];\n _redefine(String.prototype, KEY, strfn);\n _hide(RegExp.prototype, SYMBOL, length == 2 // 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue)\n // 21.2.5.11 RegExp.prototype[@@split](string, limit)\n ? function (string, arg) {\n return rxfn.call(string, this, arg);\n } // 21.2.5.6 RegExp.prototype[@@match](string)\n // 21.2.5.9 RegExp.prototype[@@search](string)\n : function (string) {\n return rxfn.call(string, this);\n });\n }\n};\n\nvar max$1 = Math.max;\nvar min$2 = Math.min;\nvar floor$1 = Math.floor;\nvar SUBSTITUTION_SYMBOLS = /\\$([$&`']|\\d\\d?|<[^>]*>)/g;\nvar SUBSTITUTION_SYMBOLS_NO_NAMED = /\\$([$&`']|\\d\\d?)/g;\n\nvar maybeToString = function (it) {\n return it === undefined ? it : String(it);\n}; // @@replace logic\n\n\n_fixReWks('replace', 2, function (defined, REPLACE, $replace, maybeCallNative) {\n return [// `String.prototype.replace` method\n // https://tc39.github.io/ecma262/#sec-string.prototype.replace\n function replace(searchValue, replaceValue) {\n var O = defined(this);\n var fn = searchValue == undefined ? undefined : searchValue[REPLACE];\n return fn !== undefined ? fn.call(searchValue, O, replaceValue) : $replace.call(String(O), searchValue, replaceValue);\n }, // `RegExp.prototype[@@replace]` method\n // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@replace\n function (regexp, replaceValue) {\n var res = maybeCallNative($replace, regexp, this, replaceValue);\n if (res.done) return res.value;\n var rx = _anObject(regexp);\n var S = String(this);\n var functionalReplace = typeof replaceValue === 'function';\n if (!functionalReplace) replaceValue = String(replaceValue);\n var global = rx.global;\n\n if (global) {\n var fullUnicode = rx.unicode;\n rx.lastIndex = 0;\n }\n\n var results = [];\n\n while (true) {\n var result = _regexpExecAbstract(rx, S);\n if (result === null) break;\n results.push(result);\n if (!global) break;\n var matchStr = String(result[0]);\n if (matchStr === '') rx.lastIndex = _advanceStringIndex(S, _toLength(rx.lastIndex), fullUnicode);\n }\n\n var accumulatedResult = '';\n var nextSourcePosition = 0;\n\n for (var i = 0; i < results.length; i++) {\n result = results[i];\n var matched = String(result[0]);\n var position = max$1(min$2(_toInteger(result.index), S.length), 0);\n var captures = []; // NOTE: This is equivalent to\n // captures = result.slice(1).map(maybeToString)\n // but for some reason `nativeSlice.call(result, 1, result.length)` (called in\n // the slice polyfill when slicing native arrays) \"doesn't work\" in safari 9 and\n // causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it.\n\n for (var j = 1; j < result.length; j++) captures.push(maybeToString(result[j]));\n\n var namedCaptures = result.groups;\n\n if (functionalReplace) {\n var replacerArgs = [matched].concat(captures, position, S);\n if (namedCaptures !== undefined) replacerArgs.push(namedCaptures);\n var replacement = String(replaceValue.apply(undefined, replacerArgs));\n } else {\n replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue);\n }\n\n if (position >= nextSourcePosition) {\n accumulatedResult += S.slice(nextSourcePosition, position) + replacement;\n nextSourcePosition = position + matched.length;\n }\n }\n\n return accumulatedResult + S.slice(nextSourcePosition);\n }]; // https://tc39.github.io/ecma262/#sec-getsubstitution\n\n function getSubstitution(matched, str, position, captures, namedCaptures, replacement) {\n var tailPos = position + matched.length;\n var m = captures.length;\n var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED;\n\n if (namedCaptures !== undefined) {\n namedCaptures = _toObject(namedCaptures);\n symbols = SUBSTITUTION_SYMBOLS;\n }\n\n return $replace.call(replacement, symbols, function (match, ch) {\n var capture;\n\n switch (ch.charAt(0)) {\n case '$':\n return '$';\n\n case '&':\n return matched;\n\n case '`':\n return str.slice(0, position);\n\n case \"'\":\n return str.slice(tailPos);\n\n case '<':\n capture = namedCaptures[ch.slice(1, -1)];\n break;\n\n default:\n // \\d\\d?\n var n = +ch;\n if (n === 0) return match;\n\n if (n > m) {\n var f = floor$1(n / 10);\n if (f === 0) return match;\n if (f <= m) return captures[f - 1] === undefined ? ch.charAt(1) : captures[f - 1] + ch.charAt(1);\n return match;\n }\n\n capture = captures[n - 1];\n }\n\n return capture === undefined ? '' : capture;\n });\n }\n});\n\nvar UNSCOPABLES = _wks('unscopables');\nvar ArrayProto = Array.prototype;\nif (ArrayProto[UNSCOPABLES] == undefined) _hide(ArrayProto, UNSCOPABLES, {});\n\nvar _addToUnscopables = function (key) {\n ArrayProto[UNSCOPABLES][key] = true;\n};\n\nvar _iterStep = function (done, value) {\n return {\n value: value,\n done: !!done\n };\n};\n\nvar _iterators = {};\n\nvar IteratorPrototype = {}; // 25.1.2.1.1 %IteratorPrototype%[@@iterator]()\n\n_hide(IteratorPrototype, _wks('iterator'), function () {\n return this;\n});\n\nvar _iterCreate = function (Constructor, NAME, next) {\n Constructor.prototype = _objectCreate(IteratorPrototype, {\n next: _propertyDesc(1, next)\n });\n _setToStringTag(Constructor, NAME + ' Iterator');\n};\n\nvar IE_PROTO$2 = _sharedKey('IE_PROTO');\nvar ObjectProto$1 = Object.prototype;\n\nvar _objectGpo = Object.getPrototypeOf || function (O) {\n O = _toObject(O);\n if (_has(O, IE_PROTO$2)) return O[IE_PROTO$2];\n\n if (typeof O.constructor == 'function' && O instanceof O.constructor) {\n return O.constructor.prototype;\n }\n\n return O instanceof Object ? ObjectProto$1 : null;\n};\n\nvar ITERATOR = _wks('iterator');\nvar BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next`\n\nvar FF_ITERATOR = '@@iterator';\nvar KEYS = 'keys';\nvar VALUES = 'values';\n\nvar returnThis = function () {\n return this;\n};\n\nvar _iterDefine = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) {\n _iterCreate(Constructor, NAME, next);\n\n var getMethod = function (kind) {\n if (!BUGGY && kind in proto) return proto[kind];\n\n switch (kind) {\n case KEYS:\n return function keys() {\n return new Constructor(this, kind);\n };\n\n case VALUES:\n return function values() {\n return new Constructor(this, kind);\n };\n }\n\n return function entries() {\n return new Constructor(this, kind);\n };\n };\n\n var TAG = NAME + ' Iterator';\n var DEF_VALUES = DEFAULT == VALUES;\n var VALUES_BUG = false;\n var proto = Base.prototype;\n var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT];\n var $default = $native || getMethod(DEFAULT);\n var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined;\n var $anyNative = NAME == 'Array' ? proto.entries || $native : $native;\n var methods, key, IteratorPrototype; // Fix native\n\n if ($anyNative) {\n IteratorPrototype = _objectGpo($anyNative.call(new Base()));\n\n if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) {\n // Set @@toStringTag to native iterators\n _setToStringTag(IteratorPrototype, TAG, true); // fix for some old engines\n\n if ( typeof IteratorPrototype[ITERATOR] != 'function') _hide(IteratorPrototype, ITERATOR, returnThis);\n }\n } // fix Array#{values, @@iterator}.name in V8 / FF\n\n\n if (DEF_VALUES && $native && $native.name !== VALUES) {\n VALUES_BUG = true;\n\n $default = function values() {\n return $native.call(this);\n };\n } // Define iterator\n\n\n if ( (BUGGY || VALUES_BUG || !proto[ITERATOR])) {\n _hide(proto, ITERATOR, $default);\n } // Plug for library\n\n\n _iterators[NAME] = $default;\n _iterators[TAG] = returnThis;\n\n if (DEFAULT) {\n methods = {\n values: DEF_VALUES ? $default : getMethod(VALUES),\n keys: IS_SET ? $default : getMethod(KEYS),\n entries: $entries\n };\n if (FORCED) for (key in methods) {\n if (!(key in proto)) _redefine(proto, key, methods[key]);\n } else _export(_export.P + _export.F * (BUGGY || VALUES_BUG), NAME, methods);\n }\n\n return methods;\n};\n\n// 22.1.3.13 Array.prototype.keys()\n// 22.1.3.29 Array.prototype.values()\n// 22.1.3.30 Array.prototype[@@iterator]()\n\n\nvar es6_array_iterator = _iterDefine(Array, 'Array', function (iterated, kind) {\n this._t = _toIobject(iterated); // target\n\n this._i = 0; // next index\n\n this._k = kind; // kind\n // 22.1.5.2.1 %ArrayIteratorPrototype%.next()\n}, function () {\n var O = this._t;\n var kind = this._k;\n var index = this._i++;\n\n if (!O || index >= O.length) {\n this._t = undefined;\n return _iterStep(1);\n }\n\n if (kind == 'keys') return _iterStep(0, index);\n if (kind == 'values') return _iterStep(0, O[index]);\n return _iterStep(0, [index, O[index]]);\n}, 'values'); // argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7)\n\n_iterators.Arguments = _iterators.Array;\n_addToUnscopables('keys');\n_addToUnscopables('values');\n_addToUnscopables('entries');\n\nvar ITERATOR$1 = _wks('iterator');\nvar TO_STRING_TAG = _wks('toStringTag');\nvar ArrayValues = _iterators.Array;\nvar DOMIterables = {\n CSSRuleList: true,\n // TODO: Not spec compliant, should be false.\n CSSStyleDeclaration: false,\n CSSValueList: false,\n ClientRectList: false,\n DOMRectList: false,\n DOMStringList: false,\n DOMTokenList: true,\n DataTransferItemList: false,\n FileList: false,\n HTMLAllCollection: false,\n HTMLCollection: false,\n HTMLFormElement: false,\n HTMLSelectElement: false,\n MediaList: true,\n // TODO: Not spec compliant, should be false.\n MimeTypeArray: false,\n NamedNodeMap: false,\n NodeList: true,\n PaintRequestList: false,\n Plugin: false,\n PluginArray: false,\n SVGLengthList: false,\n SVGNumberList: false,\n SVGPathSegList: false,\n SVGPointList: false,\n SVGStringList: false,\n SVGTransformList: false,\n SourceBufferList: false,\n StyleSheetList: true,\n // TODO: Not spec compliant, should be false.\n TextTrackCueList: false,\n TextTrackList: false,\n TouchList: false\n};\n\nfor (var collections = _objectKeys(DOMIterables), i = 0; i < collections.length; i++) {\n var NAME = collections[i];\n var explicit = DOMIterables[NAME];\n var Collection = _global[NAME];\n var proto = Collection && Collection.prototype;\n var key;\n\n if (proto) {\n if (!proto[ITERATOR$1]) _hide(proto, ITERATOR$1, ArrayValues);\n if (!proto[TO_STRING_TAG]) _hide(proto, TO_STRING_TAG, NAME);\n _iterators[NAME] = ArrayValues;\n if (explicit) for (key in es6_array_iterator) if (!proto[key]) _redefine(proto, key, es6_array_iterator[key], true);\n }\n}\n\nvar test = {};\ntest[_wks('toStringTag')] = 'z';\n\nif (test + '' != '[object z]') {\n _redefine(Object.prototype, 'toString', function toString() {\n return '[object ' + _classof(this) + ']';\n }, true);\n}\n\nvar isEnum$1 = _objectPie.f;\n\nvar _objectToArray = function (isEntries) {\n return function (it) {\n var O = _toIobject(it);\n var keys = _objectKeys(O);\n var length = keys.length;\n var i = 0;\n var result = [];\n var key;\n\n while (length > i) {\n key = keys[i++];\n\n if (!_descriptors || isEnum$1.call(O, key)) {\n result.push(isEntries ? [key, O[key]] : O[key]);\n }\n }\n\n return result;\n };\n};\n\nvar $values = _objectToArray(false);\n_export(_export.S, 'Object', {\n values: function values(it) {\n return $values(it);\n }\n});\n\nvar MATCH = _wks('match');\n\nvar _isRegexp = function (it) {\n var isRegExp;\n return _isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : _cof(it) == 'RegExp');\n};\n\nvar SPECIES$1 = _wks('species');\n\nvar _speciesConstructor = function (O, D) {\n var C = _anObject(O).constructor;\n var S;\n return C === undefined || (S = _anObject(C)[SPECIES$1]) == undefined ? D : _aFunction(S);\n};\n\nvar $min = Math.min;\nvar $push = [].push;\nvar $SPLIT = 'split';\nvar LENGTH = 'length';\nvar LAST_INDEX$1 = 'lastIndex';\nvar MAX_UINT32 = 0xffffffff; // babel-minify transpiles RegExp('x', 'y') -> /x/y and it causes SyntaxError\n\nvar SUPPORTS_Y = !_fails(function () {\n RegExp(MAX_UINT32, 'y');\n}); // @@split logic\n\n_fixReWks('split', 2, function (defined, SPLIT, $split, maybeCallNative) {\n var internalSplit;\n\n if ('abbc'[$SPLIT](/(b)*/)[1] == 'c' || 'test'[$SPLIT](/(?:)/, -1)[LENGTH] != 4 || 'ab'[$SPLIT](/(?:ab)*/)[LENGTH] != 2 || '.'[$SPLIT](/(.?)(.?)/)[LENGTH] != 4 || '.'[$SPLIT](/()()/)[LENGTH] > 1 || ''[$SPLIT](/.?/)[LENGTH]) {\n // based on es5-shim implementation, need to rework it\n internalSplit = function (separator, limit) {\n var string = String(this);\n if (separator === undefined && limit === 0) return []; // If `separator` is not a regex, use native split\n\n if (!_isRegexp(separator)) return $split.call(string, separator, limit);\n var output = [];\n var flags = (separator.ignoreCase ? 'i' : '') + (separator.multiline ? 'm' : '') + (separator.unicode ? 'u' : '') + (separator.sticky ? 'y' : '');\n var lastLastIndex = 0;\n var splitLimit = limit === undefined ? MAX_UINT32 : limit >>> 0; // Make `global` and avoid `lastIndex` issues by working with a copy\n\n var separatorCopy = new RegExp(separator.source, flags + 'g');\n var match, lastIndex, lastLength;\n\n while (match = _regexpExec.call(separatorCopy, string)) {\n lastIndex = separatorCopy[LAST_INDEX$1];\n\n if (lastIndex > lastLastIndex) {\n output.push(string.slice(lastLastIndex, match.index));\n if (match[LENGTH] > 1 && match.index < string[LENGTH]) $push.apply(output, match.slice(1));\n lastLength = match[0][LENGTH];\n lastLastIndex = lastIndex;\n if (output[LENGTH] >= splitLimit) break;\n }\n\n if (separatorCopy[LAST_INDEX$1] === match.index) separatorCopy[LAST_INDEX$1]++; // Avoid an infinite loop\n }\n\n if (lastLastIndex === string[LENGTH]) {\n if (lastLength || !separatorCopy.test('')) output.push('');\n } else output.push(string.slice(lastLastIndex));\n\n return output[LENGTH] > splitLimit ? output.slice(0, splitLimit) : output;\n }; // Chakra, V8\n\n } else if ('0'[$SPLIT](undefined, 0)[LENGTH]) {\n internalSplit = function (separator, limit) {\n return separator === undefined && limit === 0 ? [] : $split.call(this, separator, limit);\n };\n } else {\n internalSplit = $split;\n }\n\n return [// `String.prototype.split` method\n // https://tc39.github.io/ecma262/#sec-string.prototype.split\n function split(separator, limit) {\n var O = defined(this);\n var splitter = separator == undefined ? undefined : separator[SPLIT];\n return splitter !== undefined ? splitter.call(separator, O, limit) : internalSplit.call(String(O), separator, limit);\n }, // `RegExp.prototype[@@split]` method\n // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@split\n //\n // NOTE: This cannot be properly polyfilled in engines that don't support\n // the 'y' flag.\n function (regexp, limit) {\n var res = maybeCallNative(internalSplit, regexp, this, limit, internalSplit !== $split);\n if (res.done) return res.value;\n var rx = _anObject(regexp);\n var S = String(this);\n var C = _speciesConstructor(rx, RegExp);\n var unicodeMatching = rx.unicode;\n var flags = (rx.ignoreCase ? 'i' : '') + (rx.multiline ? 'm' : '') + (rx.unicode ? 'u' : '') + (SUPPORTS_Y ? 'y' : 'g'); // ^(? + rx + ) is needed, in combination with some S slicing, to\n // simulate the 'y' flag.\n\n var splitter = new C(SUPPORTS_Y ? rx : '^(?:' + rx.source + ')', flags);\n var lim = limit === undefined ? MAX_UINT32 : limit >>> 0;\n if (lim === 0) return [];\n if (S.length === 0) return _regexpExecAbstract(splitter, S) === null ? [S] : [];\n var p = 0;\n var q = 0;\n var A = [];\n\n while (q < S.length) {\n splitter.lastIndex = SUPPORTS_Y ? q : 0;\n var z = _regexpExecAbstract(splitter, SUPPORTS_Y ? S : S.slice(q));\n var e;\n\n if (z === null || (e = $min(_toLength(splitter.lastIndex + (SUPPORTS_Y ? 0 : q)), S.length)) === p) {\n q = _advanceStringIndex(S, q, unicodeMatching);\n } else {\n A.push(S.slice(p, q));\n if (A.length === lim) return A;\n\n for (var i = 1; i <= z.length - 1; i++) {\n A.push(z[i]);\n if (A.length === lim) return A;\n }\n\n q = p = e;\n }\n }\n\n A.push(S.slice(p));\n return A;\n }];\n});\n\nvar $assign = Object.assign; // should work with symbols and should have deterministic property order (V8 bug)\n\nvar _objectAssign = !$assign || _fails(function () {\n var A = {};\n var B = {}; // eslint-disable-next-line no-undef\n\n var S = Symbol();\n var K = 'abcdefghijklmnopqrst';\n A[S] = 7;\n K.split('').forEach(function (k) {\n B[k] = k;\n });\n return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K;\n}) ? function assign(target, source) {\n // eslint-disable-line no-unused-vars\n var T = _toObject(target);\n var aLen = arguments.length;\n var index = 1;\n var getSymbols = _objectGops.f;\n var isEnum = _objectPie.f;\n\n while (aLen > index) {\n var S = _iobject(arguments[index++]);\n var keys = getSymbols ? _objectKeys(S).concat(getSymbols(S)) : _objectKeys(S);\n var length = keys.length;\n var j = 0;\n var key;\n\n while (length > j) {\n key = keys[j++];\n if (!_descriptors || isEnum.call(S, key)) T[key] = S[key];\n }\n }\n\n return T;\n} : $assign;\n\n_export(_export.S + _export.F, 'Object', {\n assign: _objectAssign\n});\n\n/* eslint-disable no-proto */\n\nvar check = function (O, proto) {\n _anObject(O);\n if (!_isObject(proto) && proto !== null) throw TypeError(proto + \": can't set as prototype!\");\n};\n\nvar _setProto = {\n set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line\n function (test, buggy, set) {\n try {\n set = _ctx(Function.call, _objectGopd.f(Object.prototype, '__proto__').set, 2);\n set(test, []);\n buggy = !(test instanceof Array);\n } catch (e) {\n buggy = true;\n }\n\n return function setPrototypeOf(O, proto) {\n check(O, proto);\n if (buggy) O.__proto__ = proto;else set(O, proto);\n return O;\n };\n }({}, false) : undefined),\n check: check\n};\n\nvar setPrototypeOf = _setProto.set;\n\nvar _inheritIfRequired = function (that, target, C) {\n var S = target.constructor;\n var P;\n\n if (S !== C && typeof S == 'function' && (P = S.prototype) !== C.prototype && _isObject(P) && setPrototypeOf) {\n setPrototypeOf(that, P);\n }\n\n return that;\n};\n\nvar _stringWs = '\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003' + '\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF';\n\nvar space = '[' + _stringWs + ']';\nvar non = '\\u200b\\u0085';\nvar ltrim = RegExp('^' + space + space + '*');\nvar rtrim = RegExp(space + space + '*$');\n\nvar exporter = function (KEY, exec, ALIAS) {\n var exp = {};\n var FORCE = _fails(function () {\n return !!_stringWs[KEY]() || non[KEY]() != non;\n });\n var fn = exp[KEY] = FORCE ? exec(trim) : _stringWs[KEY];\n if (ALIAS) exp[ALIAS] = fn;\n _export(_export.P + _export.F * FORCE, 'String', exp);\n}; // 1 -> String#trimLeft\n// 2 -> String#trimRight\n// 3 -> String#trim\n\n\nvar trim = exporter.trim = function (string, TYPE) {\n string = String(_defined(string));\n if (TYPE & 1) string = string.replace(ltrim, '');\n if (TYPE & 2) string = string.replace(rtrim, '');\n return string;\n};\n\nvar _stringTrim = exporter;\n\nvar gOPN$2 = _objectGopn.f;\nvar gOPD$2 = _objectGopd.f;\nvar dP$2 = _objectDp.f;\nvar $trim = _stringTrim.trim;\nvar NUMBER = 'Number';\nvar $Number = _global[NUMBER];\nvar Base = $Number;\nvar proto$1 = $Number.prototype; // Opera ~12 has broken Object#toString\n\nvar BROKEN_COF = _cof(_objectCreate(proto$1)) == NUMBER;\nvar TRIM = 'trim' in String.prototype; // 7.1.3 ToNumber(argument)\n\nvar toNumber = function (argument) {\n var it = _toPrimitive(argument, false);\n\n if (typeof it == 'string' && it.length > 2) {\n it = TRIM ? it.trim() : $trim(it, 3);\n var first = it.charCodeAt(0);\n var third, radix, maxCode;\n\n if (first === 43 || first === 45) {\n third = it.charCodeAt(2);\n if (third === 88 || third === 120) return NaN; // Number('+0x1') should be NaN, old V8 fix\n } else if (first === 48) {\n switch (it.charCodeAt(1)) {\n case 66:\n case 98:\n radix = 2;\n maxCode = 49;\n break;\n // fast equal /^0b[01]+$/i\n\n case 79:\n case 111:\n radix = 8;\n maxCode = 55;\n break;\n // fast equal /^0o[0-7]+$/i\n\n default:\n return +it;\n }\n\n for (var digits = it.slice(2), i = 0, l = digits.length, code; i < l; i++) {\n code = digits.charCodeAt(i); // parseInt parses a string to a first unavailable symbol\n // but ToNumber should return NaN if a string contains unavailable symbols\n\n if (code < 48 || code > maxCode) return NaN;\n }\n\n return parseInt(digits, radix);\n }\n }\n\n return +it;\n};\n\nif (!$Number(' 0o1') || !$Number('0b1') || $Number('+0x1')) {\n $Number = function Number(value) {\n var it = arguments.length < 1 ? 0 : value;\n var that = this;\n return that instanceof $Number // check on 1..constructor(foo) case\n && (BROKEN_COF ? _fails(function () {\n proto$1.valueOf.call(that);\n }) : _cof(that) != NUMBER) ? _inheritIfRequired(new Base(toNumber(it)), that, $Number) : toNumber(it);\n };\n\n for (var keys = _descriptors ? gOPN$2(Base) : ( // ES3:\n 'MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,' + // ES6 (in case, if modules with ES6 Number statics required before):\n 'EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,' + 'MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger').split(','), j$1 = 0, key$1; keys.length > j$1; j$1++) {\n if (_has(Base, key$1 = keys[j$1]) && !_has($Number, key$1)) {\n dP$2($Number, key$1, gOPD$2(Base, key$1));\n }\n }\n\n $Number.prototype = proto$1;\n proto$1.constructor = $Number;\n _redefine(_global, NUMBER, $Number);\n}\n\nvar moment = createCommonjsModule(function (module, exports) {\n\n (function (global, factory) {\n module.exports = factory() ;\n })(commonjsGlobal, function () {\n\n var hookCallback;\n\n function hooks() {\n return hookCallback.apply(null, arguments);\n } // This is done to register the method called with moment()\n // without creating circular dependencies.\n\n\n function setHookCallback(callback) {\n hookCallback = callback;\n }\n\n function isArray(input) {\n return input instanceof Array || Object.prototype.toString.call(input) === '[object Array]';\n }\n\n function isObject(input) {\n // IE8 will treat undefined and null as object if it wasn't for\n // input != null\n return input != null && Object.prototype.toString.call(input) === '[object Object]';\n }\n\n function isObjectEmpty(obj) {\n if (Object.getOwnPropertyNames) {\n return Object.getOwnPropertyNames(obj).length === 0;\n } else {\n var k;\n\n for (k in obj) {\n if (obj.hasOwnProperty(k)) {\n return false;\n }\n }\n\n return true;\n }\n }\n\n function isUndefined(input) {\n return input === void 0;\n }\n\n function isNumber(input) {\n return typeof input === 'number' || Object.prototype.toString.call(input) === '[object Number]';\n }\n\n function isDate(input) {\n return input instanceof Date || Object.prototype.toString.call(input) === '[object Date]';\n }\n\n function map(arr, fn) {\n var res = [],\n i;\n\n for (i = 0; i < arr.length; ++i) {\n res.push(fn(arr[i], i));\n }\n\n return res;\n }\n\n function hasOwnProp(a, b) {\n return Object.prototype.hasOwnProperty.call(a, b);\n }\n\n function extend(a, b) {\n for (var i in b) {\n if (hasOwnProp(b, i)) {\n a[i] = b[i];\n }\n }\n\n if (hasOwnProp(b, 'toString')) {\n a.toString = b.toString;\n }\n\n if (hasOwnProp(b, 'valueOf')) {\n a.valueOf = b.valueOf;\n }\n\n return a;\n }\n\n function createUTC(input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, true).utc();\n }\n\n function defaultParsingFlags() {\n // We need to deep clone this object.\n return {\n empty: false,\n unusedTokens: [],\n unusedInput: [],\n overflow: -2,\n charsLeftOver: 0,\n nullInput: false,\n invalidMonth: null,\n invalidFormat: false,\n userInvalidated: false,\n iso: false,\n parsedDateParts: [],\n meridiem: null,\n rfc2822: false,\n weekdayMismatch: false\n };\n }\n\n function getParsingFlags(m) {\n if (m._pf == null) {\n m._pf = defaultParsingFlags();\n }\n\n return m._pf;\n }\n\n var some;\n\n if (Array.prototype.some) {\n some = Array.prototype.some;\n } else {\n some = function (fun) {\n var t = Object(this);\n var len = t.length >>> 0;\n\n for (var i = 0; i < len; i++) {\n if (i in t && fun.call(this, t[i], i, t)) {\n return true;\n }\n }\n\n return false;\n };\n }\n\n function isValid(m) {\n if (m._isValid == null) {\n var flags = getParsingFlags(m);\n var parsedParts = some.call(flags.parsedDateParts, function (i) {\n return i != null;\n });\n var isNowValid = !isNaN(m._d.getTime()) && flags.overflow < 0 && !flags.empty && !flags.invalidMonth && !flags.invalidWeekday && !flags.weekdayMismatch && !flags.nullInput && !flags.invalidFormat && !flags.userInvalidated && (!flags.meridiem || flags.meridiem && parsedParts);\n\n if (m._strict) {\n isNowValid = isNowValid && flags.charsLeftOver === 0 && flags.unusedTokens.length === 0 && flags.bigHour === undefined;\n }\n\n if (Object.isFrozen == null || !Object.isFrozen(m)) {\n m._isValid = isNowValid;\n } else {\n return isNowValid;\n }\n }\n\n return m._isValid;\n }\n\n function createInvalid(flags) {\n var m = createUTC(NaN);\n\n if (flags != null) {\n extend(getParsingFlags(m), flags);\n } else {\n getParsingFlags(m).userInvalidated = true;\n }\n\n return m;\n } // Plugins that add properties should also add the key here (null value),\n // so we can properly clone ourselves.\n\n\n var momentProperties = hooks.momentProperties = [];\n\n function copyConfig(to, from) {\n var i, prop, val;\n\n if (!isUndefined(from._isAMomentObject)) {\n to._isAMomentObject = from._isAMomentObject;\n }\n\n if (!isUndefined(from._i)) {\n to._i = from._i;\n }\n\n if (!isUndefined(from._f)) {\n to._f = from._f;\n }\n\n if (!isUndefined(from._l)) {\n to._l = from._l;\n }\n\n if (!isUndefined(from._strict)) {\n to._strict = from._strict;\n }\n\n if (!isUndefined(from._tzm)) {\n to._tzm = from._tzm;\n }\n\n if (!isUndefined(from._isUTC)) {\n to._isUTC = from._isUTC;\n }\n\n if (!isUndefined(from._offset)) {\n to._offset = from._offset;\n }\n\n if (!isUndefined(from._pf)) {\n to._pf = getParsingFlags(from);\n }\n\n if (!isUndefined(from._locale)) {\n to._locale = from._locale;\n }\n\n if (momentProperties.length > 0) {\n for (i = 0; i < momentProperties.length; i++) {\n prop = momentProperties[i];\n val = from[prop];\n\n if (!isUndefined(val)) {\n to[prop] = val;\n }\n }\n }\n\n return to;\n }\n\n var updateInProgress = false; // Moment prototype object\n\n function Moment(config) {\n copyConfig(this, config);\n this._d = new Date(config._d != null ? config._d.getTime() : NaN);\n\n if (!this.isValid()) {\n this._d = new Date(NaN);\n } // Prevent infinite loop in case updateOffset creates new moment\n // objects.\n\n\n if (updateInProgress === false) {\n updateInProgress = true;\n hooks.updateOffset(this);\n updateInProgress = false;\n }\n }\n\n function isMoment(obj) {\n return obj instanceof Moment || obj != null && obj._isAMomentObject != null;\n }\n\n function absFloor(number) {\n if (number < 0) {\n // -0 -> 0\n return Math.ceil(number) || 0;\n } else {\n return Math.floor(number);\n }\n }\n\n function toInt(argumentForCoercion) {\n var coercedNumber = +argumentForCoercion,\n value = 0;\n\n if (coercedNumber !== 0 && isFinite(coercedNumber)) {\n value = absFloor(coercedNumber);\n }\n\n return value;\n } // compare two arrays, return the number of differences\n\n\n function compareArrays(array1, array2, dontConvert) {\n var len = Math.min(array1.length, array2.length),\n lengthDiff = Math.abs(array1.length - array2.length),\n diffs = 0,\n i;\n\n for (i = 0; i < len; i++) {\n if (dontConvert && array1[i] !== array2[i] || !dontConvert && toInt(array1[i]) !== toInt(array2[i])) {\n diffs++;\n }\n }\n\n return diffs + lengthDiff;\n }\n\n function warn(msg) {\n if (hooks.suppressDeprecationWarnings === false && typeof console !== 'undefined' && console.warn) {\n console.warn('Deprecation warning: ' + msg);\n }\n }\n\n function deprecate(msg, fn) {\n var firstTime = true;\n return extend(function () {\n if (hooks.deprecationHandler != null) {\n hooks.deprecationHandler(null, msg);\n }\n\n if (firstTime) {\n var args = [];\n var arg;\n\n for (var i = 0; i < arguments.length; i++) {\n arg = '';\n\n if (typeof arguments[i] === 'object') {\n arg += '\\n[' + i + '] ';\n\n for (var key in arguments[0]) {\n arg += key + ': ' + arguments[0][key] + ', ';\n }\n\n arg = arg.slice(0, -2); // Remove trailing comma and space\n } else {\n arg = arguments[i];\n }\n\n args.push(arg);\n }\n\n warn(msg + '\\nArguments: ' + Array.prototype.slice.call(args).join('') + '\\n' + new Error().stack);\n firstTime = false;\n }\n\n return fn.apply(this, arguments);\n }, fn);\n }\n\n var deprecations = {};\n\n function deprecateSimple(name, msg) {\n if (hooks.deprecationHandler != null) {\n hooks.deprecationHandler(name, msg);\n }\n\n if (!deprecations[name]) {\n warn(msg);\n deprecations[name] = true;\n }\n }\n\n hooks.suppressDeprecationWarnings = false;\n hooks.deprecationHandler = null;\n\n function isFunction(input) {\n return input instanceof Function || Object.prototype.toString.call(input) === '[object Function]';\n }\n\n function set(config) {\n var prop, i;\n\n for (i in config) {\n prop = config[i];\n\n if (isFunction(prop)) {\n this[i] = prop;\n } else {\n this['_' + i] = prop;\n }\n }\n\n this._config = config; // Lenient ordinal parsing accepts just a number in addition to\n // number + (possibly) stuff coming from _dayOfMonthOrdinalParse.\n // TODO: Remove \"ordinalParse\" fallback in next major release.\n\n this._dayOfMonthOrdinalParseLenient = new RegExp((this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) + '|' + /\\d{1,2}/.source);\n }\n\n function mergeConfigs(parentConfig, childConfig) {\n var res = extend({}, parentConfig),\n prop;\n\n for (prop in childConfig) {\n if (hasOwnProp(childConfig, prop)) {\n if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) {\n res[prop] = {};\n extend(res[prop], parentConfig[prop]);\n extend(res[prop], childConfig[prop]);\n } else if (childConfig[prop] != null) {\n res[prop] = childConfig[prop];\n } else {\n delete res[prop];\n }\n }\n }\n\n for (prop in parentConfig) {\n if (hasOwnProp(parentConfig, prop) && !hasOwnProp(childConfig, prop) && isObject(parentConfig[prop])) {\n // make sure changes to properties don't modify parent config\n res[prop] = extend({}, res[prop]);\n }\n }\n\n return res;\n }\n\n function Locale(config) {\n if (config != null) {\n this.set(config);\n }\n }\n\n var keys;\n\n if (Object.keys) {\n keys = Object.keys;\n } else {\n keys = function (obj) {\n var i,\n res = [];\n\n for (i in obj) {\n if (hasOwnProp(obj, i)) {\n res.push(i);\n }\n }\n\n return res;\n };\n }\n\n var defaultCalendar = {\n sameDay: '[Today at] LT',\n nextDay: '[Tomorrow at] LT',\n nextWeek: 'dddd [at] LT',\n lastDay: '[Yesterday at] LT',\n lastWeek: '[Last] dddd [at] LT',\n sameElse: 'L'\n };\n\n function calendar(key, mom, now) {\n var output = this._calendar[key] || this._calendar['sameElse'];\n return isFunction(output) ? output.call(mom, now) : output;\n }\n\n var defaultLongDateFormat = {\n LTS: 'h:mm:ss A',\n LT: 'h:mm A',\n L: 'MM/DD/YYYY',\n LL: 'MMMM D, YYYY',\n LLL: 'MMMM D, YYYY h:mm A',\n LLLL: 'dddd, MMMM D, YYYY h:mm A'\n };\n\n function longDateFormat(key) {\n var format = this._longDateFormat[key],\n formatUpper = this._longDateFormat[key.toUpperCase()];\n\n if (format || !formatUpper) {\n return format;\n }\n\n this._longDateFormat[key] = formatUpper.replace(/MMMM|MM|DD|dddd/g, function (val) {\n return val.slice(1);\n });\n return this._longDateFormat[key];\n }\n\n var defaultInvalidDate = 'Invalid date';\n\n function invalidDate() {\n return this._invalidDate;\n }\n\n var defaultOrdinal = '%d';\n var defaultDayOfMonthOrdinalParse = /\\d{1,2}/;\n\n function ordinal(number) {\n return this._ordinal.replace('%d', number);\n }\n\n var defaultRelativeTime = {\n future: 'in %s',\n past: '%s ago',\n s: 'a few seconds',\n ss: '%d seconds',\n m: 'a minute',\n mm: '%d minutes',\n h: 'an hour',\n hh: '%d hours',\n d: 'a day',\n dd: '%d days',\n M: 'a month',\n MM: '%d months',\n y: 'a year',\n yy: '%d years'\n };\n\n function relativeTime(number, withoutSuffix, string, isFuture) {\n var output = this._relativeTime[string];\n return isFunction(output) ? output(number, withoutSuffix, string, isFuture) : output.replace(/%d/i, number);\n }\n\n function pastFuture(diff, output) {\n var format = this._relativeTime[diff > 0 ? 'future' : 'past'];\n return isFunction(format) ? format(output) : format.replace(/%s/i, output);\n }\n\n var aliases = {};\n\n function addUnitAlias(unit, shorthand) {\n var lowerCase = unit.toLowerCase();\n aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit;\n }\n\n function normalizeUnits(units) {\n return typeof units === 'string' ? aliases[units] || aliases[units.toLowerCase()] : undefined;\n }\n\n function normalizeObjectUnits(inputObject) {\n var normalizedInput = {},\n normalizedProp,\n prop;\n\n for (prop in inputObject) {\n if (hasOwnProp(inputObject, prop)) {\n normalizedProp = normalizeUnits(prop);\n\n if (normalizedProp) {\n normalizedInput[normalizedProp] = inputObject[prop];\n }\n }\n }\n\n return normalizedInput;\n }\n\n var priorities = {};\n\n function addUnitPriority(unit, priority) {\n priorities[unit] = priority;\n }\n\n function getPrioritizedUnits(unitsObj) {\n var units = [];\n\n for (var u in unitsObj) {\n units.push({\n unit: u,\n priority: priorities[u]\n });\n }\n\n units.sort(function (a, b) {\n return a.priority - b.priority;\n });\n return units;\n }\n\n function zeroFill(number, targetLength, forceSign) {\n var absNumber = '' + Math.abs(number),\n zerosToFill = targetLength - absNumber.length,\n sign = number >= 0;\n return (sign ? forceSign ? '+' : '' : '-') + Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) + absNumber;\n }\n\n var formattingTokens = /(\\[[^\\[]*\\])|(\\\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g;\n var localFormattingTokens = /(\\[[^\\[]*\\])|(\\\\)?(LTS|LT|LL?L?L?|l{1,4})/g;\n var formatFunctions = {};\n var formatTokenFunctions = {}; // token: 'M'\n // padded: ['MM', 2]\n // ordinal: 'Mo'\n // callback: function () { this.month() + 1 }\n\n function addFormatToken(token, padded, ordinal, callback) {\n var func = callback;\n\n if (typeof callback === 'string') {\n func = function () {\n return this[callback]();\n };\n }\n\n if (token) {\n formatTokenFunctions[token] = func;\n }\n\n if (padded) {\n formatTokenFunctions[padded[0]] = function () {\n return zeroFill(func.apply(this, arguments), padded[1], padded[2]);\n };\n }\n\n if (ordinal) {\n formatTokenFunctions[ordinal] = function () {\n return this.localeData().ordinal(func.apply(this, arguments), token);\n };\n }\n }\n\n function removeFormattingTokens(input) {\n if (input.match(/\\[[\\s\\S]/)) {\n return input.replace(/^\\[|\\]$/g, '');\n }\n\n return input.replace(/\\\\/g, '');\n }\n\n function makeFormatFunction(format) {\n var array = format.match(formattingTokens),\n i,\n length;\n\n for (i = 0, length = array.length; i < length; i++) {\n if (formatTokenFunctions[array[i]]) {\n array[i] = formatTokenFunctions[array[i]];\n } else {\n array[i] = removeFormattingTokens(array[i]);\n }\n }\n\n return function (mom) {\n var output = '',\n i;\n\n for (i = 0; i < length; i++) {\n output += isFunction(array[i]) ? array[i].call(mom, format) : array[i];\n }\n\n return output;\n };\n } // format date using native date object\n\n\n function formatMoment(m, format) {\n if (!m.isValid()) {\n return m.localeData().invalidDate();\n }\n\n format = expandFormat(format, m.localeData());\n formatFunctions[format] = formatFunctions[format] || makeFormatFunction(format);\n return formatFunctions[format](m);\n }\n\n function expandFormat(format, locale) {\n var i = 5;\n\n function replaceLongDateFormatTokens(input) {\n return locale.longDateFormat(input) || input;\n }\n\n localFormattingTokens.lastIndex = 0;\n\n while (i >= 0 && localFormattingTokens.test(format)) {\n format = format.replace(localFormattingTokens, replaceLongDateFormatTokens);\n localFormattingTokens.lastIndex = 0;\n i -= 1;\n }\n\n return format;\n }\n\n var match1 = /\\d/; // 0 - 9\n\n var match2 = /\\d\\d/; // 00 - 99\n\n var match3 = /\\d{3}/; // 000 - 999\n\n var match4 = /\\d{4}/; // 0000 - 9999\n\n var match6 = /[+-]?\\d{6}/; // -999999 - 999999\n\n var match1to2 = /\\d\\d?/; // 0 - 99\n\n var match3to4 = /\\d\\d\\d\\d?/; // 999 - 9999\n\n var match5to6 = /\\d\\d\\d\\d\\d\\d?/; // 99999 - 999999\n\n var match1to3 = /\\d{1,3}/; // 0 - 999\n\n var match1to4 = /\\d{1,4}/; // 0 - 9999\n\n var match1to6 = /[+-]?\\d{1,6}/; // -999999 - 999999\n\n var matchUnsigned = /\\d+/; // 0 - inf\n\n var matchSigned = /[+-]?\\d+/; // -inf - inf\n\n var matchOffset = /Z|[+-]\\d\\d:?\\d\\d/gi; // +00:00 -00:00 +0000 -0000 or Z\n\n var matchShortOffset = /Z|[+-]\\d\\d(?::?\\d\\d)?/gi; // +00 -00 +00:00 -00:00 +0000 -0000 or Z\n\n var matchTimestamp = /[+-]?\\d+(\\.\\d{1,3})?/; // 123456789 123456789.123\n // any word (or two) characters or numbers including two/three word month in arabic.\n // includes scottish gaelic two word and hyphenated months\n\n var matchWord = /[0-9]{0,256}['a-z\\u00A0-\\u05FF\\u0700-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFF07\\uFF10-\\uFFEF]{1,256}|[\\u0600-\\u06FF\\/]{1,256}(\\s*?[\\u0600-\\u06FF]{1,256}){1,2}/i;\n var regexes = {};\n\n function addRegexToken(token, regex, strictRegex) {\n regexes[token] = isFunction(regex) ? regex : function (isStrict, localeData) {\n return isStrict && strictRegex ? strictRegex : regex;\n };\n }\n\n function getParseRegexForToken(token, config) {\n if (!hasOwnProp(regexes, token)) {\n return new RegExp(unescapeFormat(token));\n }\n\n return regexes[token](config._strict, config._locale);\n } // Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript\n\n\n function unescapeFormat(s) {\n return regexEscape(s.replace('\\\\', '').replace(/\\\\(\\[)|\\\\(\\])|\\[([^\\]\\[]*)\\]|\\\\(.)/g, function (matched, p1, p2, p3, p4) {\n return p1 || p2 || p3 || p4;\n }));\n }\n\n function regexEscape(s) {\n return s.replace(/[-\\/\\\\^$*+?.()|[\\]{}]/g, '\\\\$&');\n }\n\n var tokens = {};\n\n function addParseToken(token, callback) {\n var i,\n func = callback;\n\n if (typeof token === 'string') {\n token = [token];\n }\n\n if (isNumber(callback)) {\n func = function (input, array) {\n array[callback] = toInt(input);\n };\n }\n\n for (i = 0; i < token.length; i++) {\n tokens[token[i]] = func;\n }\n }\n\n function addWeekParseToken(token, callback) {\n addParseToken(token, function (input, array, config, token) {\n config._w = config._w || {};\n callback(input, config._w, config, token);\n });\n }\n\n function addTimeToArrayFromToken(token, input, config) {\n if (input != null && hasOwnProp(tokens, token)) {\n tokens[token](input, config._a, config, token);\n }\n }\n\n var YEAR = 0;\n var MONTH = 1;\n var DATE = 2;\n var HOUR = 3;\n var MINUTE = 4;\n var SECOND = 5;\n var MILLISECOND = 6;\n var WEEK = 7;\n var WEEKDAY = 8; // FORMATTING\n\n addFormatToken('Y', 0, 0, function () {\n var y = this.year();\n return y <= 9999 ? '' + y : '+' + y;\n });\n addFormatToken(0, ['YY', 2], 0, function () {\n return this.year() % 100;\n });\n addFormatToken(0, ['YYYY', 4], 0, 'year');\n addFormatToken(0, ['YYYYY', 5], 0, 'year');\n addFormatToken(0, ['YYYYYY', 6, true], 0, 'year'); // ALIASES\n\n addUnitAlias('year', 'y'); // PRIORITIES\n\n addUnitPriority('year', 1); // PARSING\n\n addRegexToken('Y', matchSigned);\n addRegexToken('YY', match1to2, match2);\n addRegexToken('YYYY', match1to4, match4);\n addRegexToken('YYYYY', match1to6, match6);\n addRegexToken('YYYYYY', match1to6, match6);\n addParseToken(['YYYYY', 'YYYYYY'], YEAR);\n addParseToken('YYYY', function (input, array) {\n array[YEAR] = input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input);\n });\n addParseToken('YY', function (input, array) {\n array[YEAR] = hooks.parseTwoDigitYear(input);\n });\n addParseToken('Y', function (input, array) {\n array[YEAR] = parseInt(input, 10);\n }); // HELPERS\n\n function daysInYear(year) {\n return isLeapYear(year) ? 366 : 365;\n }\n\n function isLeapYear(year) {\n return year % 4 === 0 && year % 100 !== 0 || year % 400 === 0;\n } // HOOKS\n\n\n hooks.parseTwoDigitYear = function (input) {\n return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);\n }; // MOMENTS\n\n\n var getSetYear = makeGetSet('FullYear', true);\n\n function getIsLeapYear() {\n return isLeapYear(this.year());\n }\n\n function makeGetSet(unit, keepTime) {\n return function (value) {\n if (value != null) {\n set$1(this, unit, value);\n hooks.updateOffset(this, keepTime);\n return this;\n } else {\n return get(this, unit);\n }\n };\n }\n\n function get(mom, unit) {\n return mom.isValid() ? mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]() : NaN;\n }\n\n function set$1(mom, unit, value) {\n if (mom.isValid() && !isNaN(value)) {\n if (unit === 'FullYear' && isLeapYear(mom.year()) && mom.month() === 1 && mom.date() === 29) {\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value, mom.month(), daysInMonth(value, mom.month()));\n } else {\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value);\n }\n }\n } // MOMENTS\n\n\n function stringGet(units) {\n units = normalizeUnits(units);\n\n if (isFunction(this[units])) {\n return this[units]();\n }\n\n return this;\n }\n\n function stringSet(units, value) {\n if (typeof units === 'object') {\n units = normalizeObjectUnits(units);\n var prioritized = getPrioritizedUnits(units);\n\n for (var i = 0; i < prioritized.length; i++) {\n this[prioritized[i].unit](units[prioritized[i].unit]);\n }\n } else {\n units = normalizeUnits(units);\n\n if (isFunction(this[units])) {\n return this[units](value);\n }\n }\n\n return this;\n }\n\n function mod(n, x) {\n return (n % x + x) % x;\n }\n\n var indexOf;\n\n if (Array.prototype.indexOf) {\n indexOf = Array.prototype.indexOf;\n } else {\n indexOf = function (o) {\n // I know\n var i;\n\n for (i = 0; i < this.length; ++i) {\n if (this[i] === o) {\n return i;\n }\n }\n\n return -1;\n };\n }\n\n function daysInMonth(year, month) {\n if (isNaN(year) || isNaN(month)) {\n return NaN;\n }\n\n var modMonth = mod(month, 12);\n year += (month - modMonth) / 12;\n return modMonth === 1 ? isLeapYear(year) ? 29 : 28 : 31 - modMonth % 7 % 2;\n } // FORMATTING\n\n\n addFormatToken('M', ['MM', 2], 'Mo', function () {\n return this.month() + 1;\n });\n addFormatToken('MMM', 0, 0, function (format) {\n return this.localeData().monthsShort(this, format);\n });\n addFormatToken('MMMM', 0, 0, function (format) {\n return this.localeData().months(this, format);\n }); // ALIASES\n\n addUnitAlias('month', 'M'); // PRIORITY\n\n addUnitPriority('month', 8); // PARSING\n\n addRegexToken('M', match1to2);\n addRegexToken('MM', match1to2, match2);\n addRegexToken('MMM', function (isStrict, locale) {\n return locale.monthsShortRegex(isStrict);\n });\n addRegexToken('MMMM', function (isStrict, locale) {\n return locale.monthsRegex(isStrict);\n });\n addParseToken(['M', 'MM'], function (input, array) {\n array[MONTH] = toInt(input) - 1;\n });\n addParseToken(['MMM', 'MMMM'], function (input, array, config, token) {\n var month = config._locale.monthsParse(input, token, config._strict); // if we didn't find a month name, mark the date as invalid.\n\n\n if (month != null) {\n array[MONTH] = month;\n } else {\n getParsingFlags(config).invalidMonth = input;\n }\n }); // LOCALES\n\n var MONTHS_IN_FORMAT = /D[oD]?(\\[[^\\[\\]]*\\]|\\s)+MMMM?/;\n var defaultLocaleMonths = 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_');\n\n function localeMonths(m, format) {\n if (!m) {\n return isArray(this._months) ? this._months : this._months['standalone'];\n }\n\n return isArray(this._months) ? this._months[m.month()] : this._months[(this._months.isFormat || MONTHS_IN_FORMAT).test(format) ? 'format' : 'standalone'][m.month()];\n }\n\n var defaultLocaleMonthsShort = 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_');\n\n function localeMonthsShort(m, format) {\n if (!m) {\n return isArray(this._monthsShort) ? this._monthsShort : this._monthsShort['standalone'];\n }\n\n return isArray(this._monthsShort) ? this._monthsShort[m.month()] : this._monthsShort[MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'][m.month()];\n }\n\n function handleStrictParse(monthName, format, strict) {\n var i,\n ii,\n mom,\n llc = monthName.toLocaleLowerCase();\n\n if (!this._monthsParse) {\n // this is not used\n this._monthsParse = [];\n this._longMonthsParse = [];\n this._shortMonthsParse = [];\n\n for (i = 0; i < 12; ++i) {\n mom = createUTC([2000, i]);\n this._shortMonthsParse[i] = this.monthsShort(mom, '').toLocaleLowerCase();\n this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase();\n }\n }\n\n if (strict) {\n if (format === 'MMM') {\n ii = indexOf.call(this._shortMonthsParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._longMonthsParse, llc);\n return ii !== -1 ? ii : null;\n }\n } else {\n if (format === 'MMM') {\n ii = indexOf.call(this._shortMonthsParse, llc);\n\n if (ii !== -1) {\n return ii;\n }\n\n ii = indexOf.call(this._longMonthsParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._longMonthsParse, llc);\n\n if (ii !== -1) {\n return ii;\n }\n\n ii = indexOf.call(this._shortMonthsParse, llc);\n return ii !== -1 ? ii : null;\n }\n }\n }\n\n function localeMonthsParse(monthName, format, strict) {\n var i, mom, regex;\n\n if (this._monthsParseExact) {\n return handleStrictParse.call(this, monthName, format, strict);\n }\n\n if (!this._monthsParse) {\n this._monthsParse = [];\n this._longMonthsParse = [];\n this._shortMonthsParse = [];\n } // TODO: add sorting\n // Sorting makes sure if one month (or abbr) is a prefix of another\n // see sorting in computeMonthsParse\n\n\n for (i = 0; i < 12; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, i]);\n\n if (strict && !this._longMonthsParse[i]) {\n this._longMonthsParse[i] = new RegExp('^' + this.months(mom, '').replace('.', '') + '$', 'i');\n this._shortMonthsParse[i] = new RegExp('^' + this.monthsShort(mom, '').replace('.', '') + '$', 'i');\n }\n\n if (!strict && !this._monthsParse[i]) {\n regex = '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, '');\n this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i');\n } // test the regex\n\n\n if (strict && format === 'MMMM' && this._longMonthsParse[i].test(monthName)) {\n return i;\n } else if (strict && format === 'MMM' && this._shortMonthsParse[i].test(monthName)) {\n return i;\n } else if (!strict && this._monthsParse[i].test(monthName)) {\n return i;\n }\n }\n } // MOMENTS\n\n\n function setMonth(mom, value) {\n var dayOfMonth;\n\n if (!mom.isValid()) {\n // No op\n return mom;\n }\n\n if (typeof value === 'string') {\n if (/^\\d+$/.test(value)) {\n value = toInt(value);\n } else {\n value = mom.localeData().monthsParse(value); // TODO: Another silent failure?\n\n if (!isNumber(value)) {\n return mom;\n }\n }\n }\n\n dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value));\n\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth);\n\n return mom;\n }\n\n function getSetMonth(value) {\n if (value != null) {\n setMonth(this, value);\n hooks.updateOffset(this, true);\n return this;\n } else {\n return get(this, 'Month');\n }\n }\n\n function getDaysInMonth() {\n return daysInMonth(this.year(), this.month());\n }\n\n var defaultMonthsShortRegex = matchWord;\n\n function monthsShortRegex(isStrict) {\n if (this._monthsParseExact) {\n if (!hasOwnProp(this, '_monthsRegex')) {\n computeMonthsParse.call(this);\n }\n\n if (isStrict) {\n return this._monthsShortStrictRegex;\n } else {\n return this._monthsShortRegex;\n }\n } else {\n if (!hasOwnProp(this, '_monthsShortRegex')) {\n this._monthsShortRegex = defaultMonthsShortRegex;\n }\n\n return this._monthsShortStrictRegex && isStrict ? this._monthsShortStrictRegex : this._monthsShortRegex;\n }\n }\n\n var defaultMonthsRegex = matchWord;\n\n function monthsRegex(isStrict) {\n if (this._monthsParseExact) {\n if (!hasOwnProp(this, '_monthsRegex')) {\n computeMonthsParse.call(this);\n }\n\n if (isStrict) {\n return this._monthsStrictRegex;\n } else {\n return this._monthsRegex;\n }\n } else {\n if (!hasOwnProp(this, '_monthsRegex')) {\n this._monthsRegex = defaultMonthsRegex;\n }\n\n return this._monthsStrictRegex && isStrict ? this._monthsStrictRegex : this._monthsRegex;\n }\n }\n\n function computeMonthsParse() {\n function cmpLenRev(a, b) {\n return b.length - a.length;\n }\n\n var shortPieces = [],\n longPieces = [],\n mixedPieces = [],\n i,\n mom;\n\n for (i = 0; i < 12; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, i]);\n shortPieces.push(this.monthsShort(mom, ''));\n longPieces.push(this.months(mom, ''));\n mixedPieces.push(this.months(mom, ''));\n mixedPieces.push(this.monthsShort(mom, ''));\n } // Sorting makes sure if one month (or abbr) is a prefix of another it\n // will match the longer piece.\n\n\n shortPieces.sort(cmpLenRev);\n longPieces.sort(cmpLenRev);\n mixedPieces.sort(cmpLenRev);\n\n for (i = 0; i < 12; i++) {\n shortPieces[i] = regexEscape(shortPieces[i]);\n longPieces[i] = regexEscape(longPieces[i]);\n }\n\n for (i = 0; i < 24; i++) {\n mixedPieces[i] = regexEscape(mixedPieces[i]);\n }\n\n this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._monthsShortRegex = this._monthsRegex;\n this._monthsStrictRegex = new RegExp('^(' + longPieces.join('|') + ')', 'i');\n this._monthsShortStrictRegex = new RegExp('^(' + shortPieces.join('|') + ')', 'i');\n }\n\n function createDate(y, m, d, h, M, s, ms) {\n // can't just apply() to create a date:\n // https://stackoverflow.com/q/181348\n var date; // the date constructor remaps years 0-99 to 1900-1999\n\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n date = new Date(y + 400, m, d, h, M, s, ms);\n\n if (isFinite(date.getFullYear())) {\n date.setFullYear(y);\n }\n } else {\n date = new Date(y, m, d, h, M, s, ms);\n }\n\n return date;\n }\n\n function createUTCDate(y) {\n var date; // the Date.UTC function remaps years 0-99 to 1900-1999\n\n if (y < 100 && y >= 0) {\n var args = Array.prototype.slice.call(arguments); // preserve leap years using a full 400 year cycle, then reset\n\n args[0] = y + 400;\n date = new Date(Date.UTC.apply(null, args));\n\n if (isFinite(date.getUTCFullYear())) {\n date.setUTCFullYear(y);\n }\n } else {\n date = new Date(Date.UTC.apply(null, arguments));\n }\n\n return date;\n } // start-of-first-week - start-of-year\n\n\n function firstWeekOffset(year, dow, doy) {\n var // first-week day -- which january is always in the first week (4 for iso, 1 for other)\n fwd = 7 + dow - doy,\n // first-week day local weekday -- which local weekday is fwd\n fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7;\n return -fwdlw + fwd - 1;\n } // https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday\n\n\n function dayOfYearFromWeeks(year, week, weekday, dow, doy) {\n var localWeekday = (7 + weekday - dow) % 7,\n weekOffset = firstWeekOffset(year, dow, doy),\n dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset,\n resYear,\n resDayOfYear;\n\n if (dayOfYear <= 0) {\n resYear = year - 1;\n resDayOfYear = daysInYear(resYear) + dayOfYear;\n } else if (dayOfYear > daysInYear(year)) {\n resYear = year + 1;\n resDayOfYear = dayOfYear - daysInYear(year);\n } else {\n resYear = year;\n resDayOfYear = dayOfYear;\n }\n\n return {\n year: resYear,\n dayOfYear: resDayOfYear\n };\n }\n\n function weekOfYear(mom, dow, doy) {\n var weekOffset = firstWeekOffset(mom.year(), dow, doy),\n week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1,\n resWeek,\n resYear;\n\n if (week < 1) {\n resYear = mom.year() - 1;\n resWeek = week + weeksInYear(resYear, dow, doy);\n } else if (week > weeksInYear(mom.year(), dow, doy)) {\n resWeek = week - weeksInYear(mom.year(), dow, doy);\n resYear = mom.year() + 1;\n } else {\n resYear = mom.year();\n resWeek = week;\n }\n\n return {\n week: resWeek,\n year: resYear\n };\n }\n\n function weeksInYear(year, dow, doy) {\n var weekOffset = firstWeekOffset(year, dow, doy),\n weekOffsetNext = firstWeekOffset(year + 1, dow, doy);\n return (daysInYear(year) - weekOffset + weekOffsetNext) / 7;\n } // FORMATTING\n\n\n addFormatToken('w', ['ww', 2], 'wo', 'week');\n addFormatToken('W', ['WW', 2], 'Wo', 'isoWeek'); // ALIASES\n\n addUnitAlias('week', 'w');\n addUnitAlias('isoWeek', 'W'); // PRIORITIES\n\n addUnitPriority('week', 5);\n addUnitPriority('isoWeek', 5); // PARSING\n\n addRegexToken('w', match1to2);\n addRegexToken('ww', match1to2, match2);\n addRegexToken('W', match1to2);\n addRegexToken('WW', match1to2, match2);\n addWeekParseToken(['w', 'ww', 'W', 'WW'], function (input, week, config, token) {\n week[token.substr(0, 1)] = toInt(input);\n }); // HELPERS\n // LOCALES\n\n function localeWeek(mom) {\n return weekOfYear(mom, this._week.dow, this._week.doy).week;\n }\n\n var defaultLocaleWeek = {\n dow: 0,\n // Sunday is the first day of the week.\n doy: 6 // The week that contains Jan 6th is the first week of the year.\n\n };\n\n function localeFirstDayOfWeek() {\n return this._week.dow;\n }\n\n function localeFirstDayOfYear() {\n return this._week.doy;\n } // MOMENTS\n\n\n function getSetWeek(input) {\n var week = this.localeData().week(this);\n return input == null ? week : this.add((input - week) * 7, 'd');\n }\n\n function getSetISOWeek(input) {\n var week = weekOfYear(this, 1, 4).week;\n return input == null ? week : this.add((input - week) * 7, 'd');\n } // FORMATTING\n\n\n addFormatToken('d', 0, 'do', 'day');\n addFormatToken('dd', 0, 0, function (format) {\n return this.localeData().weekdaysMin(this, format);\n });\n addFormatToken('ddd', 0, 0, function (format) {\n return this.localeData().weekdaysShort(this, format);\n });\n addFormatToken('dddd', 0, 0, function (format) {\n return this.localeData().weekdays(this, format);\n });\n addFormatToken('e', 0, 0, 'weekday');\n addFormatToken('E', 0, 0, 'isoWeekday'); // ALIASES\n\n addUnitAlias('day', 'd');\n addUnitAlias('weekday', 'e');\n addUnitAlias('isoWeekday', 'E'); // PRIORITY\n\n addUnitPriority('day', 11);\n addUnitPriority('weekday', 11);\n addUnitPriority('isoWeekday', 11); // PARSING\n\n addRegexToken('d', match1to2);\n addRegexToken('e', match1to2);\n addRegexToken('E', match1to2);\n addRegexToken('dd', function (isStrict, locale) {\n return locale.weekdaysMinRegex(isStrict);\n });\n addRegexToken('ddd', function (isStrict, locale) {\n return locale.weekdaysShortRegex(isStrict);\n });\n addRegexToken('dddd', function (isStrict, locale) {\n return locale.weekdaysRegex(isStrict);\n });\n addWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) {\n var weekday = config._locale.weekdaysParse(input, token, config._strict); // if we didn't get a weekday name, mark the date as invalid\n\n\n if (weekday != null) {\n week.d = weekday;\n } else {\n getParsingFlags(config).invalidWeekday = input;\n }\n });\n addWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) {\n week[token] = toInt(input);\n }); // HELPERS\n\n function parseWeekday(input, locale) {\n if (typeof input !== 'string') {\n return input;\n }\n\n if (!isNaN(input)) {\n return parseInt(input, 10);\n }\n\n input = locale.weekdaysParse(input);\n\n if (typeof input === 'number') {\n return input;\n }\n\n return null;\n }\n\n function parseIsoWeekday(input, locale) {\n if (typeof input === 'string') {\n return locale.weekdaysParse(input) % 7 || 7;\n }\n\n return isNaN(input) ? null : input;\n } // LOCALES\n\n\n function shiftWeekdays(ws, n) {\n return ws.slice(n, 7).concat(ws.slice(0, n));\n }\n\n var defaultLocaleWeekdays = 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_');\n\n function localeWeekdays(m, format) {\n var weekdays = isArray(this._weekdays) ? this._weekdays : this._weekdays[m && m !== true && this._weekdays.isFormat.test(format) ? 'format' : 'standalone'];\n return m === true ? shiftWeekdays(weekdays, this._week.dow) : m ? weekdays[m.day()] : weekdays;\n }\n\n var defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_');\n\n function localeWeekdaysShort(m) {\n return m === true ? shiftWeekdays(this._weekdaysShort, this._week.dow) : m ? this._weekdaysShort[m.day()] : this._weekdaysShort;\n }\n\n var defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_');\n\n function localeWeekdaysMin(m) {\n return m === true ? shiftWeekdays(this._weekdaysMin, this._week.dow) : m ? this._weekdaysMin[m.day()] : this._weekdaysMin;\n }\n\n function handleStrictParse$1(weekdayName, format, strict) {\n var i,\n ii,\n mom,\n llc = weekdayName.toLocaleLowerCase();\n\n if (!this._weekdaysParse) {\n this._weekdaysParse = [];\n this._shortWeekdaysParse = [];\n this._minWeekdaysParse = [];\n\n for (i = 0; i < 7; ++i) {\n mom = createUTC([2000, 1]).day(i);\n this._minWeekdaysParse[i] = this.weekdaysMin(mom, '').toLocaleLowerCase();\n this._shortWeekdaysParse[i] = this.weekdaysShort(mom, '').toLocaleLowerCase();\n this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase();\n }\n }\n\n if (strict) {\n if (format === 'dddd') {\n ii = indexOf.call(this._weekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else if (format === 'ddd') {\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n }\n } else {\n if (format === 'dddd') {\n ii = indexOf.call(this._weekdaysParse, llc);\n\n if (ii !== -1) {\n return ii;\n }\n\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n\n if (ii !== -1) {\n return ii;\n }\n\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else if (format === 'ddd') {\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n\n if (ii !== -1) {\n return ii;\n }\n\n ii = indexOf.call(this._weekdaysParse, llc);\n\n if (ii !== -1) {\n return ii;\n }\n\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._minWeekdaysParse, llc);\n\n if (ii !== -1) {\n return ii;\n }\n\n ii = indexOf.call(this._weekdaysParse, llc);\n\n if (ii !== -1) {\n return ii;\n }\n\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n }\n }\n }\n\n function localeWeekdaysParse(weekdayName, format, strict) {\n var i, mom, regex;\n\n if (this._weekdaysParseExact) {\n return handleStrictParse$1.call(this, weekdayName, format, strict);\n }\n\n if (!this._weekdaysParse) {\n this._weekdaysParse = [];\n this._minWeekdaysParse = [];\n this._shortWeekdaysParse = [];\n this._fullWeekdaysParse = [];\n }\n\n for (i = 0; i < 7; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, 1]).day(i);\n\n if (strict && !this._fullWeekdaysParse[i]) {\n this._fullWeekdaysParse[i] = new RegExp('^' + this.weekdays(mom, '').replace('.', '\\\\.?') + '$', 'i');\n this._shortWeekdaysParse[i] = new RegExp('^' + this.weekdaysShort(mom, '').replace('.', '\\\\.?') + '$', 'i');\n this._minWeekdaysParse[i] = new RegExp('^' + this.weekdaysMin(mom, '').replace('.', '\\\\.?') + '$', 'i');\n }\n\n if (!this._weekdaysParse[i]) {\n regex = '^' + this.weekdays(mom, '') + '|^' + this.weekdaysShort(mom, '') + '|^' + this.weekdaysMin(mom, '');\n this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i');\n } // test the regex\n\n\n if (strict && format === 'dddd' && this._fullWeekdaysParse[i].test(weekdayName)) {\n return i;\n } else if (strict && format === 'ddd' && this._shortWeekdaysParse[i].test(weekdayName)) {\n return i;\n } else if (strict && format === 'dd' && this._minWeekdaysParse[i].test(weekdayName)) {\n return i;\n } else if (!strict && this._weekdaysParse[i].test(weekdayName)) {\n return i;\n }\n }\n } // MOMENTS\n\n\n function getSetDayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n\n var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay();\n\n if (input != null) {\n input = parseWeekday(input, this.localeData());\n return this.add(input - day, 'd');\n } else {\n return day;\n }\n }\n\n function getSetLocaleDayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n\n var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7;\n return input == null ? weekday : this.add(input - weekday, 'd');\n }\n\n function getSetISODayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n } // behaves the same as moment#day except\n // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)\n // as a setter, sunday should belong to the previous week.\n\n\n if (input != null) {\n var weekday = parseIsoWeekday(input, this.localeData());\n return this.day(this.day() % 7 ? weekday : weekday - 7);\n } else {\n return this.day() || 7;\n }\n }\n\n var defaultWeekdaysRegex = matchWord;\n\n function weekdaysRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n\n if (isStrict) {\n return this._weekdaysStrictRegex;\n } else {\n return this._weekdaysRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n this._weekdaysRegex = defaultWeekdaysRegex;\n }\n\n return this._weekdaysStrictRegex && isStrict ? this._weekdaysStrictRegex : this._weekdaysRegex;\n }\n }\n\n var defaultWeekdaysShortRegex = matchWord;\n\n function weekdaysShortRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n\n if (isStrict) {\n return this._weekdaysShortStrictRegex;\n } else {\n return this._weekdaysShortRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysShortRegex')) {\n this._weekdaysShortRegex = defaultWeekdaysShortRegex;\n }\n\n return this._weekdaysShortStrictRegex && isStrict ? this._weekdaysShortStrictRegex : this._weekdaysShortRegex;\n }\n }\n\n var defaultWeekdaysMinRegex = matchWord;\n\n function weekdaysMinRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n\n if (isStrict) {\n return this._weekdaysMinStrictRegex;\n } else {\n return this._weekdaysMinRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysMinRegex')) {\n this._weekdaysMinRegex = defaultWeekdaysMinRegex;\n }\n\n return this._weekdaysMinStrictRegex && isStrict ? this._weekdaysMinStrictRegex : this._weekdaysMinRegex;\n }\n }\n\n function computeWeekdaysParse() {\n function cmpLenRev(a, b) {\n return b.length - a.length;\n }\n\n var minPieces = [],\n shortPieces = [],\n longPieces = [],\n mixedPieces = [],\n i,\n mom,\n minp,\n shortp,\n longp;\n\n for (i = 0; i < 7; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, 1]).day(i);\n minp = this.weekdaysMin(mom, '');\n shortp = this.weekdaysShort(mom, '');\n longp = this.weekdays(mom, '');\n minPieces.push(minp);\n shortPieces.push(shortp);\n longPieces.push(longp);\n mixedPieces.push(minp);\n mixedPieces.push(shortp);\n mixedPieces.push(longp);\n } // Sorting makes sure if one weekday (or abbr) is a prefix of another it\n // will match the longer piece.\n\n\n minPieces.sort(cmpLenRev);\n shortPieces.sort(cmpLenRev);\n longPieces.sort(cmpLenRev);\n mixedPieces.sort(cmpLenRev);\n\n for (i = 0; i < 7; i++) {\n shortPieces[i] = regexEscape(shortPieces[i]);\n longPieces[i] = regexEscape(longPieces[i]);\n mixedPieces[i] = regexEscape(mixedPieces[i]);\n }\n\n this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._weekdaysShortRegex = this._weekdaysRegex;\n this._weekdaysMinRegex = this._weekdaysRegex;\n this._weekdaysStrictRegex = new RegExp('^(' + longPieces.join('|') + ')', 'i');\n this._weekdaysShortStrictRegex = new RegExp('^(' + shortPieces.join('|') + ')', 'i');\n this._weekdaysMinStrictRegex = new RegExp('^(' + minPieces.join('|') + ')', 'i');\n } // FORMATTING\n\n\n function hFormat() {\n return this.hours() % 12 || 12;\n }\n\n function kFormat() {\n return this.hours() || 24;\n }\n\n addFormatToken('H', ['HH', 2], 0, 'hour');\n addFormatToken('h', ['hh', 2], 0, hFormat);\n addFormatToken('k', ['kk', 2], 0, kFormat);\n addFormatToken('hmm', 0, 0, function () {\n return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2);\n });\n addFormatToken('hmmss', 0, 0, function () {\n return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2) + zeroFill(this.seconds(), 2);\n });\n addFormatToken('Hmm', 0, 0, function () {\n return '' + this.hours() + zeroFill(this.minutes(), 2);\n });\n addFormatToken('Hmmss', 0, 0, function () {\n return '' + this.hours() + zeroFill(this.minutes(), 2) + zeroFill(this.seconds(), 2);\n });\n\n function meridiem(token, lowercase) {\n addFormatToken(token, 0, 0, function () {\n return this.localeData().meridiem(this.hours(), this.minutes(), lowercase);\n });\n }\n\n meridiem('a', true);\n meridiem('A', false); // ALIASES\n\n addUnitAlias('hour', 'h'); // PRIORITY\n\n addUnitPriority('hour', 13); // PARSING\n\n function matchMeridiem(isStrict, locale) {\n return locale._meridiemParse;\n }\n\n addRegexToken('a', matchMeridiem);\n addRegexToken('A', matchMeridiem);\n addRegexToken('H', match1to2);\n addRegexToken('h', match1to2);\n addRegexToken('k', match1to2);\n addRegexToken('HH', match1to2, match2);\n addRegexToken('hh', match1to2, match2);\n addRegexToken('kk', match1to2, match2);\n addRegexToken('hmm', match3to4);\n addRegexToken('hmmss', match5to6);\n addRegexToken('Hmm', match3to4);\n addRegexToken('Hmmss', match5to6);\n addParseToken(['H', 'HH'], HOUR);\n addParseToken(['k', 'kk'], function (input, array, config) {\n var kInput = toInt(input);\n array[HOUR] = kInput === 24 ? 0 : kInput;\n });\n addParseToken(['a', 'A'], function (input, array, config) {\n config._isPm = config._locale.isPM(input);\n config._meridiem = input;\n });\n addParseToken(['h', 'hh'], function (input, array, config) {\n array[HOUR] = toInt(input);\n getParsingFlags(config).bigHour = true;\n });\n addParseToken('hmm', function (input, array, config) {\n var pos = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos));\n array[MINUTE] = toInt(input.substr(pos));\n getParsingFlags(config).bigHour = true;\n });\n addParseToken('hmmss', function (input, array, config) {\n var pos1 = input.length - 4;\n var pos2 = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos1));\n array[MINUTE] = toInt(input.substr(pos1, 2));\n array[SECOND] = toInt(input.substr(pos2));\n getParsingFlags(config).bigHour = true;\n });\n addParseToken('Hmm', function (input, array, config) {\n var pos = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos));\n array[MINUTE] = toInt(input.substr(pos));\n });\n addParseToken('Hmmss', function (input, array, config) {\n var pos1 = input.length - 4;\n var pos2 = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos1));\n array[MINUTE] = toInt(input.substr(pos1, 2));\n array[SECOND] = toInt(input.substr(pos2));\n }); // LOCALES\n\n function localeIsPM(input) {\n // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays\n // Using charAt should be more compatible.\n return (input + '').toLowerCase().charAt(0) === 'p';\n }\n\n var defaultLocaleMeridiemParse = /[ap]\\.?m?\\.?/i;\n\n function localeMeridiem(hours, minutes, isLower) {\n if (hours > 11) {\n return isLower ? 'pm' : 'PM';\n } else {\n return isLower ? 'am' : 'AM';\n }\n } // MOMENTS\n // Setting the hour should keep the time, because the user explicitly\n // specified which hour they want. So trying to maintain the same hour (in\n // a new timezone) makes sense. Adding/subtracting hours does not follow\n // this rule.\n\n\n var getSetHour = makeGetSet('Hours', true);\n var baseConfig = {\n calendar: defaultCalendar,\n longDateFormat: defaultLongDateFormat,\n invalidDate: defaultInvalidDate,\n ordinal: defaultOrdinal,\n dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse,\n relativeTime: defaultRelativeTime,\n months: defaultLocaleMonths,\n monthsShort: defaultLocaleMonthsShort,\n week: defaultLocaleWeek,\n weekdays: defaultLocaleWeekdays,\n weekdaysMin: defaultLocaleWeekdaysMin,\n weekdaysShort: defaultLocaleWeekdaysShort,\n meridiemParse: defaultLocaleMeridiemParse\n }; // internal storage for locale config files\n\n var locales = {};\n var localeFamilies = {};\n var globalLocale;\n\n function normalizeLocale(key) {\n return key ? key.toLowerCase().replace('_', '-') : key;\n } // pick the locale from the array\n // try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each\n // substring from most specific to least, but move to the next array item if it's a more specific variant than the current root\n\n\n function chooseLocale(names) {\n var i = 0,\n j,\n next,\n locale,\n split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n\n if (locale) {\n return locale;\n }\n\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n\n j--;\n }\n\n i++;\n }\n\n return globalLocale;\n }\n\n function loadLocale(name) {\n var oldLocale = null; // TODO: Find a better way to register and load all the locales in Node\n\n if (!locales[name] && 'object' !== 'undefined' && module && module.exports) {\n try {\n oldLocale = globalLocale._abbr;\n var aliasedRequire = commonjsRequire;\n aliasedRequire('./locale/' + name);\n getSetGlobalLocale(oldLocale);\n } catch (e) {}\n }\n\n return locales[name];\n } // This function will load locale and then set the global locale. If\n // no arguments are passed in, it will simply return the current global\n // locale key.\n\n\n function getSetGlobalLocale(key, values) {\n var data;\n\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n } else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n } else {\n if (typeof console !== 'undefined' && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n }\n\n function defineLocale(name, config) {\n if (config !== null) {\n var locale,\n parentConfig = baseConfig;\n config.abbr = name;\n\n if (locales[name] != null) {\n deprecateSimple('defineLocaleOverride', 'use moment.updateLocale(localeName, config) to change ' + 'an existing locale. moment.defineLocale(localeName, ' + 'config) should only be used for creating a new locale ' + 'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.');\n parentConfig = locales[name]._config;\n } else if (config.parentLocale != null) {\n if (locales[config.parentLocale] != null) {\n parentConfig = locales[config.parentLocale]._config;\n } else {\n locale = loadLocale(config.parentLocale);\n\n if (locale != null) {\n parentConfig = locale._config;\n } else {\n if (!localeFamilies[config.parentLocale]) {\n localeFamilies[config.parentLocale] = [];\n }\n\n localeFamilies[config.parentLocale].push({\n name: name,\n config: config\n });\n return null;\n }\n }\n }\n\n locales[name] = new Locale(mergeConfigs(parentConfig, config));\n\n if (localeFamilies[name]) {\n localeFamilies[name].forEach(function (x) {\n defineLocale(x.name, x.config);\n });\n } // backwards compat for now: also set the locale\n // make sure we set the locale AFTER all child locales have been\n // created, so we won't end up with the child locale set.\n\n\n getSetGlobalLocale(name);\n return locales[name];\n } else {\n // useful for testing\n delete locales[name];\n return null;\n }\n }\n\n function updateLocale(name, config) {\n if (config != null) {\n var locale,\n tmpLocale,\n parentConfig = baseConfig; // MERGE\n\n tmpLocale = loadLocale(name);\n\n if (tmpLocale != null) {\n parentConfig = tmpLocale._config;\n }\n\n config = mergeConfigs(parentConfig, config);\n locale = new Locale(config);\n locale.parentLocale = locales[name];\n locales[name] = locale; // backwards compat for now: also set the locale\n\n getSetGlobalLocale(name);\n } else {\n // pass null for config to unupdate, useful for tests\n if (locales[name] != null) {\n if (locales[name].parentLocale != null) {\n locales[name] = locales[name].parentLocale;\n } else if (locales[name] != null) {\n delete locales[name];\n }\n }\n }\n\n return locales[name];\n } // returns locale data\n\n\n function getLocale(key) {\n var locale;\n\n if (key && key._locale && key._locale._abbr) {\n key = key._locale._abbr;\n }\n\n if (!key) {\n return globalLocale;\n }\n\n if (!isArray(key)) {\n //short-circuit everything else\n locale = loadLocale(key);\n\n if (locale) {\n return locale;\n }\n\n key = [key];\n }\n\n return chooseLocale(key);\n }\n\n function listLocales() {\n return keys(locales);\n }\n\n function checkOverflow(m) {\n var overflow;\n var a = m._a;\n\n if (a && getParsingFlags(m).overflow === -2) {\n overflow = a[MONTH] < 0 || a[MONTH] > 11 ? MONTH : a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH]) ? DATE : a[HOUR] < 0 || a[HOUR] > 24 || a[HOUR] === 24 && (a[MINUTE] !== 0 || a[SECOND] !== 0 || a[MILLISECOND] !== 0) ? HOUR : a[MINUTE] < 0 || a[MINUTE] > 59 ? MINUTE : a[SECOND] < 0 || a[SECOND] > 59 ? SECOND : a[MILLISECOND] < 0 || a[MILLISECOND] > 999 ? MILLISECOND : -1;\n\n if (getParsingFlags(m)._overflowDayOfYear && (overflow < YEAR || overflow > DATE)) {\n overflow = DATE;\n }\n\n if (getParsingFlags(m)._overflowWeeks && overflow === -1) {\n overflow = WEEK;\n }\n\n if (getParsingFlags(m)._overflowWeekday && overflow === -1) {\n overflow = WEEKDAY;\n }\n\n getParsingFlags(m).overflow = overflow;\n }\n\n return m;\n } // Pick the first defined of two or three arguments.\n\n\n function defaults(a, b, c) {\n if (a != null) {\n return a;\n }\n\n if (b != null) {\n return b;\n }\n\n return c;\n }\n\n function currentDateArray(config) {\n // hooks is actually the exported moment object\n var nowValue = new Date(hooks.now());\n\n if (config._useUTC) {\n return [nowValue.getUTCFullYear(), nowValue.getUTCMonth(), nowValue.getUTCDate()];\n }\n\n return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()];\n } // convert an array to a date.\n // the array should mirror the parameters below\n // note: all values past the year are optional and will default to the lowest possible value.\n // [year, month, day , hour, minute, second, millisecond]\n\n\n function configFromArray(config) {\n var i,\n date,\n input = [],\n currentDate,\n expectedWeekday,\n yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config); //compute day of the year from weeks and weekdays\n\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n } //if the day of the year is set, figure out what it is\n\n\n if (config._dayOfYear != null) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse) || config._dayOfYear === 0) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n } // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n\n\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n } // Zero out whatever was not defaulted, including time\n\n\n for (; i < 7; i++) {\n config._a[i] = input[i] = config._a[i] == null ? i === 2 ? 1 : 0 : config._a[i];\n } // Check for 24:00:00.000\n\n\n if (config._a[HOUR] === 24 && config._a[MINUTE] === 0 && config._a[SECOND] === 0 && config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n expectedWeekday = config._useUTC ? config._d.getUTCDay() : config._d.getDay(); // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n } // check for mismatching day of week\n\n\n if (config._w && typeof config._w.d !== 'undefined' && config._w.d !== expectedWeekday) {\n getParsingFlags(config).weekdayMismatch = true;\n }\n }\n\n function dayOfYearFromWeekInfo(config) {\n var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow;\n w = config._w;\n\n if (w.GG != null || w.W != null || w.E != null) {\n dow = 1;\n doy = 4; // TODO: We need to take the current isoWeekYear, but that depends on\n // how we interpret now (local, utc, fixed offset). So create\n // a now version of current config (take local/utc/offset flags, and\n // create now).\n\n weekYear = defaults(w.GG, config._a[YEAR], weekOfYear(createLocal(), 1, 4).year);\n week = defaults(w.W, 1);\n weekday = defaults(w.E, 1);\n\n if (weekday < 1 || weekday > 7) {\n weekdayOverflow = true;\n }\n } else {\n dow = config._locale._week.dow;\n doy = config._locale._week.doy;\n var curWeek = weekOfYear(createLocal(), dow, doy);\n weekYear = defaults(w.gg, config._a[YEAR], curWeek.year); // Default to current week.\n\n week = defaults(w.w, curWeek.week);\n\n if (w.d != null) {\n // weekday -- low day numbers are considered next week\n weekday = w.d;\n\n if (weekday < 0 || weekday > 6) {\n weekdayOverflow = true;\n }\n } else if (w.e != null) {\n // local weekday -- counting starts from beginning of week\n weekday = w.e + dow;\n\n if (w.e < 0 || w.e > 6) {\n weekdayOverflow = true;\n }\n } else {\n // default to beginning of week\n weekday = dow;\n }\n }\n\n if (week < 1 || week > weeksInYear(weekYear, dow, doy)) {\n getParsingFlags(config)._overflowWeeks = true;\n } else if (weekdayOverflow != null) {\n getParsingFlags(config)._overflowWeekday = true;\n } else {\n temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy);\n config._a[YEAR] = temp.year;\n config._dayOfYear = temp.dayOfYear;\n }\n } // iso 8601 regex\n // 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00)\n\n\n var extendedIsoRegex = /^\\s*((?:[+-]\\d{6}|\\d{4})-(?:\\d\\d-\\d\\d|W\\d\\d-\\d|W\\d\\d|\\d\\d\\d|\\d\\d))(?:(T| )(\\d\\d(?::\\d\\d(?::\\d\\d(?:[.,]\\d+)?)?)?)([\\+\\-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/;\n var basicIsoRegex = /^\\s*((?:[+-]\\d{6}|\\d{4})(?:\\d\\d\\d\\d|W\\d\\d\\d|W\\d\\d|\\d\\d\\d|\\d\\d))(?:(T| )(\\d\\d(?:\\d\\d(?:\\d\\d(?:[.,]\\d+)?)?)?)([\\+\\-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/;\n var tzRegex = /Z|[+-]\\d\\d(?::?\\d\\d)?/;\n var isoDates = [['YYYYYY-MM-DD', /[+-]\\d{6}-\\d\\d-\\d\\d/], ['YYYY-MM-DD', /\\d{4}-\\d\\d-\\d\\d/], ['GGGG-[W]WW-E', /\\d{4}-W\\d\\d-\\d/], ['GGGG-[W]WW', /\\d{4}-W\\d\\d/, false], ['YYYY-DDD', /\\d{4}-\\d{3}/], ['YYYY-MM', /\\d{4}-\\d\\d/, false], ['YYYYYYMMDD', /[+-]\\d{10}/], ['YYYYMMDD', /\\d{8}/], // YYYYMM is NOT allowed by the standard\n ['GGGG[W]WWE', /\\d{4}W\\d{3}/], ['GGGG[W]WW', /\\d{4}W\\d{2}/, false], ['YYYYDDD', /\\d{7}/]]; // iso time formats and regexes\n\n var isoTimes = [['HH:mm:ss.SSSS', /\\d\\d:\\d\\d:\\d\\d\\.\\d+/], ['HH:mm:ss,SSSS', /\\d\\d:\\d\\d:\\d\\d,\\d+/], ['HH:mm:ss', /\\d\\d:\\d\\d:\\d\\d/], ['HH:mm', /\\d\\d:\\d\\d/], ['HHmmss.SSSS', /\\d\\d\\d\\d\\d\\d\\.\\d+/], ['HHmmss,SSSS', /\\d\\d\\d\\d\\d\\d,\\d+/], ['HHmmss', /\\d\\d\\d\\d\\d\\d/], ['HHmm', /\\d\\d\\d\\d/], ['HH', /\\d\\d/]];\n var aspNetJsonRegex = /^\\/?Date\\((\\-?\\d+)/i; // date from iso format\n\n function configFromISO(config) {\n var i,\n l,\n string = config._i,\n match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string),\n allowTime,\n dateFormat,\n timeFormat,\n tzFormat;\n\n if (match) {\n getParsingFlags(config).iso = true;\n\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(match[1])) {\n dateFormat = isoDates[i][0];\n allowTime = isoDates[i][2] !== false;\n break;\n }\n }\n\n if (dateFormat == null) {\n config._isValid = false;\n return;\n }\n\n if (match[3]) {\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(match[3])) {\n // match[2] should be 'T' or space\n timeFormat = (match[2] || ' ') + isoTimes[i][0];\n break;\n }\n }\n\n if (timeFormat == null) {\n config._isValid = false;\n return;\n }\n }\n\n if (!allowTime && timeFormat != null) {\n config._isValid = false;\n return;\n }\n\n if (match[4]) {\n if (tzRegex.exec(match[4])) {\n tzFormat = 'Z';\n } else {\n config._isValid = false;\n return;\n }\n }\n\n config._f = dateFormat + (timeFormat || '') + (tzFormat || '');\n configFromStringAndFormat(config);\n } else {\n config._isValid = false;\n }\n } // RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3\n\n\n var rfc2822 = /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\\s)?(\\d{1,2})\\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\\s(\\d{2,4})\\s(\\d\\d):(\\d\\d)(?::(\\d\\d))?\\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\\d{4}))$/;\n\n function extractFromRFC2822Strings(yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr) {\n var result = [untruncateYear(yearStr), defaultLocaleMonthsShort.indexOf(monthStr), parseInt(dayStr, 10), parseInt(hourStr, 10), parseInt(minuteStr, 10)];\n\n if (secondStr) {\n result.push(parseInt(secondStr, 10));\n }\n\n return result;\n }\n\n function untruncateYear(yearStr) {\n var year = parseInt(yearStr, 10);\n\n if (year <= 49) {\n return 2000 + year;\n } else if (year <= 999) {\n return 1900 + year;\n }\n\n return year;\n }\n\n function preprocessRFC2822(s) {\n // Remove comments and folding whitespace and replace multiple-spaces with a single space\n return s.replace(/\\([^)]*\\)|[\\n\\t]/g, ' ').replace(/(\\s\\s+)/g, ' ').replace(/^\\s\\s*/, '').replace(/\\s\\s*$/, '');\n }\n\n function checkWeekday(weekdayStr, parsedInput, config) {\n if (weekdayStr) {\n // TODO: Replace the vanilla JS Date object with an indepentent day-of-week check.\n var weekdayProvided = defaultLocaleWeekdaysShort.indexOf(weekdayStr),\n weekdayActual = new Date(parsedInput[0], parsedInput[1], parsedInput[2]).getDay();\n\n if (weekdayProvided !== weekdayActual) {\n getParsingFlags(config).weekdayMismatch = true;\n config._isValid = false;\n return false;\n }\n }\n\n return true;\n }\n\n var obsOffsets = {\n UT: 0,\n GMT: 0,\n EDT: -4 * 60,\n EST: -5 * 60,\n CDT: -5 * 60,\n CST: -6 * 60,\n MDT: -6 * 60,\n MST: -7 * 60,\n PDT: -7 * 60,\n PST: -8 * 60\n };\n\n function calculateOffset(obsOffset, militaryOffset, numOffset) {\n if (obsOffset) {\n return obsOffsets[obsOffset];\n } else if (militaryOffset) {\n // the only allowed military tz is Z\n return 0;\n } else {\n var hm = parseInt(numOffset, 10);\n var m = hm % 100,\n h = (hm - m) / 100;\n return h * 60 + m;\n }\n } // date and time from ref 2822 format\n\n\n function configFromRFC2822(config) {\n var match = rfc2822.exec(preprocessRFC2822(config._i));\n\n if (match) {\n var parsedArray = extractFromRFC2822Strings(match[4], match[3], match[2], match[5], match[6], match[7]);\n\n if (!checkWeekday(match[1], parsedArray, config)) {\n return;\n }\n\n config._a = parsedArray;\n config._tzm = calculateOffset(match[8], match[9], match[10]);\n config._d = createUTCDate.apply(null, config._a);\n\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n\n getParsingFlags(config).rfc2822 = true;\n } else {\n config._isValid = false;\n }\n } // date from iso format or fallback\n\n\n function configFromString(config) {\n var matched = aspNetJsonRegex.exec(config._i);\n\n if (matched !== null) {\n config._d = new Date(+matched[1]);\n return;\n }\n\n configFromISO(config);\n\n if (config._isValid === false) {\n delete config._isValid;\n } else {\n return;\n }\n\n configFromRFC2822(config);\n\n if (config._isValid === false) {\n delete config._isValid;\n } else {\n return;\n } // Final attempt, use Input Fallback\n\n\n hooks.createFromInputFallback(config);\n }\n\n hooks.createFromInputFallback = deprecate('value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), ' + 'which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are ' + 'discouraged and will be removed in an upcoming major release. Please refer to ' + 'http://momentjs.com/guides/#/warnings/js-date/ for more info.', function (config) {\n config._d = new Date(config._i + (config._useUTC ? ' UTC' : ''));\n }); // constant that refers to the ISO standard\n\n hooks.ISO_8601 = function () {}; // constant that refers to the RFC 2822 form\n\n\n hooks.RFC_2822 = function () {}; // date from string and format string\n\n\n function configFromStringAndFormat(config) {\n // TODO: Move this to another part of the creation flow to prevent circular deps\n if (config._f === hooks.ISO_8601) {\n configFromISO(config);\n return;\n }\n\n if (config._f === hooks.RFC_2822) {\n configFromRFC2822(config);\n return;\n }\n\n config._a = [];\n getParsingFlags(config).empty = true; // This array is used to make a Date, either with `new Date` or `Date.UTC`\n\n var string = '' + config._i,\n i,\n parsedInput,\n tokens,\n token,\n skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0]; // console.log('token', token, 'parsedInput', parsedInput,\n // 'regex', getParseRegexForToken(token, config));\n\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n\n if (skipped.length > 0) {\n getParsingFlags(config).unusedInput.push(skipped);\n }\n\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n } // don't parse if it's not a known token\n\n\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n getParsingFlags(config).empty = false;\n } else {\n getParsingFlags(config).unusedTokens.push(token);\n }\n\n addTimeToArrayFromToken(token, parsedInput, config);\n } else if (config._strict && !parsedInput) {\n getParsingFlags(config).unusedTokens.push(token);\n }\n } // add remaining unparsed input length to the string\n\n\n getParsingFlags(config).charsLeftOver = stringLength - totalParsedInputLength;\n\n if (string.length > 0) {\n getParsingFlags(config).unusedInput.push(string);\n } // clear _12h flag if hour is <= 12\n\n\n if (config._a[HOUR] <= 12 && getParsingFlags(config).bigHour === true && config._a[HOUR] > 0) {\n getParsingFlags(config).bigHour = undefined;\n }\n\n getParsingFlags(config).parsedDateParts = config._a.slice(0);\n getParsingFlags(config).meridiem = config._meridiem; // handle meridiem\n\n config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR], config._meridiem);\n configFromArray(config);\n checkOverflow(config);\n }\n\n function meridiemFixWrap(locale, hour, meridiem) {\n var isPm;\n\n if (meridiem == null) {\n // nothing to do\n return hour;\n }\n\n if (locale.meridiemHour != null) {\n return locale.meridiemHour(hour, meridiem);\n } else if (locale.isPM != null) {\n // Fallback\n isPm = locale.isPM(meridiem);\n\n if (isPm && hour < 12) {\n hour += 12;\n }\n\n if (!isPm && hour === 12) {\n hour = 0;\n }\n\n return hour;\n } else {\n // this is not supposed to happen\n return hour;\n }\n } // date from string and array of format strings\n\n\n function configFromStringAndArray(config) {\n var tempConfig, bestMoment, scoreToBeat, i, currentScore;\n\n if (config._f.length === 0) {\n getParsingFlags(config).invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < config._f.length; i++) {\n currentScore = 0;\n tempConfig = copyConfig({}, config);\n\n if (config._useUTC != null) {\n tempConfig._useUTC = config._useUTC;\n }\n\n tempConfig._f = config._f[i];\n configFromStringAndFormat(tempConfig);\n\n if (!isValid(tempConfig)) {\n continue;\n } // if there is any input that was not parsed add a penalty for that format\n\n\n currentScore += getParsingFlags(tempConfig).charsLeftOver; //or tokens\n\n currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10;\n getParsingFlags(tempConfig).score = currentScore;\n\n if (scoreToBeat == null || currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n\n extend(config, bestMoment || tempConfig);\n }\n\n function configFromObject(config) {\n if (config._d) {\n return;\n }\n\n var i = normalizeObjectUnits(config._i);\n config._a = map([i.year, i.month, i.day || i.date, i.hour, i.minute, i.second, i.millisecond], function (obj) {\n return obj && parseInt(obj, 10);\n });\n configFromArray(config);\n }\n\n function createFromConfig(config) {\n var res = new Moment(checkOverflow(prepareConfig(config)));\n\n if (res._nextDay) {\n // Adding is smart enough around DST\n res.add(1, 'd');\n res._nextDay = undefined;\n }\n\n return res;\n }\n\n function prepareConfig(config) {\n var input = config._i,\n format = config._f;\n config._locale = config._locale || getLocale(config._l);\n\n if (input === null || format === undefined && input === '') {\n return createInvalid({\n nullInput: true\n });\n }\n\n if (typeof input === 'string') {\n config._i = input = config._locale.preparse(input);\n }\n\n if (isMoment(input)) {\n return new Moment(checkOverflow(input));\n } else if (isDate(input)) {\n config._d = input;\n } else if (isArray(format)) {\n configFromStringAndArray(config);\n } else if (format) {\n configFromStringAndFormat(config);\n } else {\n configFromInput(config);\n }\n\n if (!isValid(config)) {\n config._d = null;\n }\n\n return config;\n }\n\n function configFromInput(config) {\n var input = config._i;\n\n if (isUndefined(input)) {\n config._d = new Date(hooks.now());\n } else if (isDate(input)) {\n config._d = new Date(input.valueOf());\n } else if (typeof input === 'string') {\n configFromString(config);\n } else if (isArray(input)) {\n config._a = map(input.slice(0), function (obj) {\n return parseInt(obj, 10);\n });\n configFromArray(config);\n } else if (isObject(input)) {\n configFromObject(config);\n } else if (isNumber(input)) {\n // from milliseconds\n config._d = new Date(input);\n } else {\n hooks.createFromInputFallback(config);\n }\n }\n\n function createLocalOrUTC(input, format, locale, strict, isUTC) {\n var c = {};\n\n if (locale === true || locale === false) {\n strict = locale;\n locale = undefined;\n }\n\n if (isObject(input) && isObjectEmpty(input) || isArray(input) && input.length === 0) {\n input = undefined;\n } // object construction must be done this way.\n // https://github.com/moment/moment/issues/1423\n\n\n c._isAMomentObject = true;\n c._useUTC = c._isUTC = isUTC;\n c._l = locale;\n c._i = input;\n c._f = format;\n c._strict = strict;\n return createFromConfig(c);\n }\n\n function createLocal(input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, false);\n }\n\n var prototypeMin = deprecate('moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/', function () {\n var other = createLocal.apply(null, arguments);\n\n if (this.isValid() && other.isValid()) {\n return other < this ? this : other;\n } else {\n return createInvalid();\n }\n });\n var prototypeMax = deprecate('moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/', function () {\n var other = createLocal.apply(null, arguments);\n\n if (this.isValid() && other.isValid()) {\n return other > this ? this : other;\n } else {\n return createInvalid();\n }\n }); // Pick a moment m from moments so that m[fn](other) is true for all\n // other. This relies on the function fn to be transitive.\n //\n // moments should either be an array of moment objects or an array, whose\n // first element is an array of moment objects.\n\n function pickBy(fn, moments) {\n var res, i;\n\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n\n if (!moments.length) {\n return createLocal();\n }\n\n res = moments[0];\n\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n\n return res;\n } // TODO: Use [].sort instead?\n\n\n function min() {\n var args = [].slice.call(arguments, 0);\n return pickBy('isBefore', args);\n }\n\n function max() {\n var args = [].slice.call(arguments, 0);\n return pickBy('isAfter', args);\n }\n\n var now = function () {\n return Date.now ? Date.now() : +new Date();\n };\n\n var ordering = ['year', 'quarter', 'month', 'week', 'day', 'hour', 'minute', 'second', 'millisecond'];\n\n function isDurationValid(m) {\n for (var key in m) {\n if (!(indexOf.call(ordering, key) !== -1 && (m[key] == null || !isNaN(m[key])))) {\n return false;\n }\n }\n\n var unitHasDecimal = false;\n\n for (var i = 0; i < ordering.length; ++i) {\n if (m[ordering[i]]) {\n if (unitHasDecimal) {\n return false; // only allow non-integers for smallest unit\n }\n\n if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) {\n unitHasDecimal = true;\n }\n }\n }\n\n return true;\n }\n\n function isValid$1() {\n return this._isValid;\n }\n\n function createInvalid$1() {\n return createDuration(NaN);\n }\n\n function Duration(duration) {\n var normalizedInput = normalizeObjectUnits(duration),\n years = normalizedInput.year || 0,\n quarters = normalizedInput.quarter || 0,\n months = normalizedInput.month || 0,\n weeks = normalizedInput.week || normalizedInput.isoWeek || 0,\n days = normalizedInput.day || 0,\n hours = normalizedInput.hour || 0,\n minutes = normalizedInput.minute || 0,\n seconds = normalizedInput.second || 0,\n milliseconds = normalizedInput.millisecond || 0;\n this._isValid = isDurationValid(normalizedInput); // representation for dateAddRemove\n\n this._milliseconds = +milliseconds + seconds * 1e3 + // 1000\n minutes * 6e4 + // 1000 * 60\n hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978\n // Because of dateAddRemove treats 24 hours as different from a\n // day when working around DST, we need to store them separately\n\n this._days = +days + weeks * 7; // It is impossible to translate months into days without knowing\n // which months you are are talking about, so we have to store\n // it separately.\n\n this._months = +months + quarters * 3 + years * 12;\n this._data = {};\n this._locale = getLocale();\n\n this._bubble();\n }\n\n function isDuration(obj) {\n return obj instanceof Duration;\n }\n\n function absRound(number) {\n if (number < 0) {\n return Math.round(-1 * number) * -1;\n } else {\n return Math.round(number);\n }\n } // FORMATTING\n\n\n function offset(token, separator) {\n addFormatToken(token, 0, 0, function () {\n var offset = this.utcOffset();\n var sign = '+';\n\n if (offset < 0) {\n offset = -offset;\n sign = '-';\n }\n\n return sign + zeroFill(~~(offset / 60), 2) + separator + zeroFill(~~offset % 60, 2);\n });\n }\n\n offset('Z', ':');\n offset('ZZ', ''); // PARSING\n\n addRegexToken('Z', matchShortOffset);\n addRegexToken('ZZ', matchShortOffset);\n addParseToken(['Z', 'ZZ'], function (input, array, config) {\n config._useUTC = true;\n config._tzm = offsetFromString(matchShortOffset, input);\n }); // HELPERS\n // timezone chunker\n // '+10:00' > ['10', '00']\n // '-1530' > ['-15', '30']\n\n var chunkOffset = /([\\+\\-]|\\d\\d)/gi;\n\n function offsetFromString(matcher, string) {\n var matches = (string || '').match(matcher);\n\n if (matches === null) {\n return null;\n }\n\n var chunk = matches[matches.length - 1] || [];\n var parts = (chunk + '').match(chunkOffset) || ['-', 0, 0];\n var minutes = +(parts[1] * 60) + toInt(parts[2]);\n return minutes === 0 ? 0 : parts[0] === '+' ? minutes : -minutes;\n } // Return a moment from input, that is local/utc/zone equivalent to model.\n\n\n function cloneWithOffset(input, model) {\n var res, diff;\n\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? input.valueOf() : createLocal(input).valueOf()) - res.valueOf(); // Use low-level api, because this fn is low-level api.\n\n res._d.setTime(res._d.valueOf() + diff);\n\n hooks.updateOffset(res, false);\n return res;\n } else {\n return createLocal(input).local();\n }\n }\n\n function getDateOffset(m) {\n // On Firefox.24 Date#getTimezoneOffset returns a floating point.\n // https://github.com/moment/moment/pull/1871\n return -Math.round(m._d.getTimezoneOffset() / 15) * 15;\n } // HOOKS\n // This function will be called whenever a moment is mutated.\n // It is intended to keep the offset in sync with the timezone.\n\n\n hooks.updateOffset = function () {}; // MOMENTS\n // keepLocalTime = true means only change the timezone, without\n // affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]-->\n // 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset\n // +0200, so we adjust the time as needed, to be valid.\n //\n // Keeping the time actually adds/subtracts (one hour)\n // from the actual represented time. That is why we call updateOffset\n // a second time. In case it wants us to change the offset again\n // _changeInProgress == true case, then we have to adjust, because\n // there is no such time in the given timezone.\n\n\n function getSetOffset(input, keepLocalTime, keepMinutes) {\n var offset = this._offset || 0,\n localAdjust;\n\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n\n if (input === null) {\n return this;\n }\n } else if (Math.abs(input) < 16 && !keepMinutes) {\n input = input * 60;\n }\n\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n\n this._offset = input;\n this._isUTC = true;\n\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n addSubtract(this, createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }\n\n function getSetZone(input, keepLocalTime) {\n if (input != null) {\n if (typeof input !== 'string') {\n input = -input;\n }\n\n this.utcOffset(input, keepLocalTime);\n return this;\n } else {\n return -this.utcOffset();\n }\n }\n\n function setOffsetToUTC(keepLocalTime) {\n return this.utcOffset(0, keepLocalTime);\n }\n\n function setOffsetToLocal(keepLocalTime) {\n if (this._isUTC) {\n this.utcOffset(0, keepLocalTime);\n this._isUTC = false;\n\n if (keepLocalTime) {\n this.subtract(getDateOffset(this), 'm');\n }\n }\n\n return this;\n }\n\n function setOffsetToParsedOffset() {\n if (this._tzm != null) {\n this.utcOffset(this._tzm, false, true);\n } else if (typeof this._i === 'string') {\n var tZone = offsetFromString(matchOffset, this._i);\n\n if (tZone != null) {\n this.utcOffset(tZone);\n } else {\n this.utcOffset(0, true);\n }\n }\n\n return this;\n }\n\n function hasAlignedHourOffset(input) {\n if (!this.isValid()) {\n return false;\n }\n\n input = input ? createLocal(input).utcOffset() : 0;\n return (this.utcOffset() - input) % 60 === 0;\n }\n\n function isDaylightSavingTime() {\n return this.utcOffset() > this.clone().month(0).utcOffset() || this.utcOffset() > this.clone().month(5).utcOffset();\n }\n\n function isDaylightSavingTimeShifted() {\n if (!isUndefined(this._isDSTShifted)) {\n return this._isDSTShifted;\n }\n\n var c = {};\n copyConfig(c, this);\n c = prepareConfig(c);\n\n if (c._a) {\n var other = c._isUTC ? createUTC(c._a) : createLocal(c._a);\n this._isDSTShifted = this.isValid() && compareArrays(c._a, other.toArray()) > 0;\n } else {\n this._isDSTShifted = false;\n }\n\n return this._isDSTShifted;\n }\n\n function isLocal() {\n return this.isValid() ? !this._isUTC : false;\n }\n\n function isUtcOffset() {\n return this.isValid() ? this._isUTC : false;\n }\n\n function isUtc() {\n return this.isValid() ? this._isUTC && this._offset === 0 : false;\n } // ASP.NET json date format regex\n\n\n var aspNetRegex = /^(\\-|\\+)?(?:(\\d*)[. ])?(\\d+)\\:(\\d+)(?:\\:(\\d+)(\\.\\d*)?)?$/; // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html\n // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere\n // and further modified to allow for strings containing both week and day\n\n var isoRegex = /^(-|\\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;\n\n function createDuration(input, key) {\n var duration = input,\n // matching against regexp is expensive, do it on demand\n match = null,\n sign,\n ret,\n diffRes;\n\n if (isDuration(input)) {\n duration = {\n ms: input._milliseconds,\n d: input._days,\n M: input._months\n };\n } else if (isNumber(input)) {\n duration = {};\n\n if (key) {\n duration[key] = input;\n } else {\n duration.milliseconds = input;\n }\n } else if (!!(match = aspNetRegex.exec(input))) {\n sign = match[1] === '-' ? -1 : 1;\n duration = {\n y: 0,\n d: toInt(match[DATE]) * sign,\n h: toInt(match[HOUR]) * sign,\n m: toInt(match[MINUTE]) * sign,\n s: toInt(match[SECOND]) * sign,\n ms: toInt(absRound(match[MILLISECOND] * 1000)) * sign // the millisecond decimal point is included in the match\n\n };\n } else if (!!(match = isoRegex.exec(input))) {\n sign = match[1] === '-' ? -1 : 1;\n duration = {\n y: parseIso(match[2], sign),\n M: parseIso(match[3], sign),\n w: parseIso(match[4], sign),\n d: parseIso(match[5], sign),\n h: parseIso(match[6], sign),\n m: parseIso(match[7], sign),\n s: parseIso(match[8], sign)\n };\n } else if (duration == null) {\n // checks for null or undefined\n duration = {};\n } else if (typeof duration === 'object' && ('from' in duration || 'to' in duration)) {\n diffRes = momentsDifference(createLocal(duration.from), createLocal(duration.to));\n duration = {};\n duration.ms = diffRes.milliseconds;\n duration.M = diffRes.months;\n }\n\n ret = new Duration(duration);\n\n if (isDuration(input) && hasOwnProp(input, '_locale')) {\n ret._locale = input._locale;\n }\n\n return ret;\n }\n\n createDuration.fn = Duration.prototype;\n createDuration.invalid = createInvalid$1;\n\n function parseIso(inp, sign) {\n // We'd normally use ~~inp for this, but unfortunately it also\n // converts floats to ints.\n // inp may be undefined, so careful calling replace on it.\n var res = inp && parseFloat(inp.replace(',', '.')); // apply sign while we're at it\n\n return (isNaN(res) ? 0 : res) * sign;\n }\n\n function positiveMomentsDifference(base, other) {\n var res = {};\n res.months = other.month() - base.month() + (other.year() - base.year()) * 12;\n\n if (base.clone().add(res.months, 'M').isAfter(other)) {\n --res.months;\n }\n\n res.milliseconds = +other - +base.clone().add(res.months, 'M');\n return res;\n }\n\n function momentsDifference(base, other) {\n var res;\n\n if (!(base.isValid() && other.isValid())) {\n return {\n milliseconds: 0,\n months: 0\n };\n }\n\n other = cloneWithOffset(other, base);\n\n if (base.isBefore(other)) {\n res = positiveMomentsDifference(base, other);\n } else {\n res = positiveMomentsDifference(other, base);\n res.milliseconds = -res.milliseconds;\n res.months = -res.months;\n }\n\n return res;\n } // TODO: remove 'name' arg after deprecation is removed\n\n\n function createAdder(direction, name) {\n return function (val, period) {\n var dur, tmp; //invert the arguments, but complain about it\n\n if (period !== null && !isNaN(+period)) {\n deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' + 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.');\n tmp = val;\n val = period;\n period = tmp;\n }\n\n val = typeof val === 'string' ? +val : val;\n dur = createDuration(val, period);\n addSubtract(this, dur, direction);\n return this;\n };\n }\n\n function addSubtract(mom, duration, isAdding, updateOffset) {\n var milliseconds = duration._milliseconds,\n days = absRound(duration._days),\n months = absRound(duration._months);\n\n if (!mom.isValid()) {\n // No op\n return;\n }\n\n updateOffset = updateOffset == null ? true : updateOffset;\n\n if (months) {\n setMonth(mom, get(mom, 'Month') + months * isAdding);\n }\n\n if (days) {\n set$1(mom, 'Date', get(mom, 'Date') + days * isAdding);\n }\n\n if (milliseconds) {\n mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding);\n }\n\n if (updateOffset) {\n hooks.updateOffset(mom, days || months);\n }\n }\n\n var add = createAdder(1, 'add');\n var subtract = createAdder(-1, 'subtract');\n\n function getCalendarFormat(myMoment, now) {\n var diff = myMoment.diff(now, 'days', true);\n return diff < -6 ? 'sameElse' : diff < -1 ? 'lastWeek' : diff < 0 ? 'lastDay' : diff < 1 ? 'sameDay' : diff < 2 ? 'nextDay' : diff < 7 ? 'nextWeek' : 'sameElse';\n }\n\n function calendar$1(time, formats) {\n // We want to compare the start of today, vs this.\n // Getting start-of-today depends on whether we're local/utc/offset or not.\n var now = time || createLocal(),\n sod = cloneWithOffset(now, this).startOf('day'),\n format = hooks.calendarFormat(this, sod) || 'sameElse';\n var output = formats && (isFunction(formats[format]) ? formats[format].call(this, now) : formats[format]);\n return this.format(output || this.localeData().calendar(format, this, createLocal(now)));\n }\n\n function clone() {\n return new Moment(this);\n }\n\n function isAfter(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input);\n\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n\n units = normalizeUnits(units) || 'millisecond';\n\n if (units === 'millisecond') {\n return this.valueOf() > localInput.valueOf();\n } else {\n return localInput.valueOf() < this.clone().startOf(units).valueOf();\n }\n }\n\n function isBefore(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input);\n\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n\n units = normalizeUnits(units) || 'millisecond';\n\n if (units === 'millisecond') {\n return this.valueOf() < localInput.valueOf();\n } else {\n return this.clone().endOf(units).valueOf() < localInput.valueOf();\n }\n }\n\n function isBetween(from, to, units, inclusivity) {\n var localFrom = isMoment(from) ? from : createLocal(from),\n localTo = isMoment(to) ? to : createLocal(to);\n\n if (!(this.isValid() && localFrom.isValid() && localTo.isValid())) {\n return false;\n }\n\n inclusivity = inclusivity || '()';\n return (inclusivity[0] === '(' ? this.isAfter(localFrom, units) : !this.isBefore(localFrom, units)) && (inclusivity[1] === ')' ? this.isBefore(localTo, units) : !this.isAfter(localTo, units));\n }\n\n function isSame(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input),\n inputMs;\n\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n\n units = normalizeUnits(units) || 'millisecond';\n\n if (units === 'millisecond') {\n return this.valueOf() === localInput.valueOf();\n } else {\n inputMs = localInput.valueOf();\n return this.clone().startOf(units).valueOf() <= inputMs && inputMs <= this.clone().endOf(units).valueOf();\n }\n }\n\n function isSameOrAfter(input, units) {\n return this.isSame(input, units) || this.isAfter(input, units);\n }\n\n function isSameOrBefore(input, units) {\n return this.isSame(input, units) || this.isBefore(input, units);\n }\n\n function diff(input, units, asFloat) {\n var that, zoneDelta, output;\n\n if (!this.isValid()) {\n return NaN;\n }\n\n that = cloneWithOffset(input, this);\n\n if (!that.isValid()) {\n return NaN;\n }\n\n zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4;\n units = normalizeUnits(units);\n\n switch (units) {\n case 'year':\n output = monthDiff(this, that) / 12;\n break;\n\n case 'month':\n output = monthDiff(this, that);\n break;\n\n case 'quarter':\n output = monthDiff(this, that) / 3;\n break;\n\n case 'second':\n output = (this - that) / 1e3;\n break;\n // 1000\n\n case 'minute':\n output = (this - that) / 6e4;\n break;\n // 1000 * 60\n\n case 'hour':\n output = (this - that) / 36e5;\n break;\n // 1000 * 60 * 60\n\n case 'day':\n output = (this - that - zoneDelta) / 864e5;\n break;\n // 1000 * 60 * 60 * 24, negate dst\n\n case 'week':\n output = (this - that - zoneDelta) / 6048e5;\n break;\n // 1000 * 60 * 60 * 24 * 7, negate dst\n\n default:\n output = this - that;\n }\n\n return asFloat ? output : absFloor(output);\n }\n\n function monthDiff(a, b) {\n // difference in months\n var wholeMonthDiff = (b.year() - a.year()) * 12 + (b.month() - a.month()),\n // b is in (anchor - 1 month, anchor + 1 month)\n anchor = a.clone().add(wholeMonthDiff, 'months'),\n anchor2,\n adjust;\n\n if (b - anchor < 0) {\n anchor2 = a.clone().add(wholeMonthDiff - 1, 'months'); // linear across the month\n\n adjust = (b - anchor) / (anchor - anchor2);\n } else {\n anchor2 = a.clone().add(wholeMonthDiff + 1, 'months'); // linear across the month\n\n adjust = (b - anchor) / (anchor2 - anchor);\n } //check for negative zero, return zero if negative zero\n\n\n return -(wholeMonthDiff + adjust) || 0;\n }\n\n hooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ';\n hooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]';\n\n function toString() {\n return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ');\n }\n\n function toISOString(keepOffset) {\n if (!this.isValid()) {\n return null;\n }\n\n var utc = keepOffset !== true;\n var m = utc ? this.clone().utc() : this;\n\n if (m.year() < 0 || m.year() > 9999) {\n return formatMoment(m, utc ? 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYYYY-MM-DD[T]HH:mm:ss.SSSZ');\n }\n\n if (isFunction(Date.prototype.toISOString)) {\n // native implementation is ~50x faster, use it when we can\n if (utc) {\n return this.toDate().toISOString();\n } else {\n return new Date(this.valueOf() + this.utcOffset() * 60 * 1000).toISOString().replace('Z', formatMoment(m, 'Z'));\n }\n }\n\n return formatMoment(m, utc ? 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYY-MM-DD[T]HH:mm:ss.SSSZ');\n }\n /**\n * Return a human readable representation of a moment that can\n * also be evaluated to get a new moment which is the same\n *\n * @link https://nodejs.org/dist/latest/docs/api/util.html#util_custom_inspect_function_on_objects\n */\n\n\n function inspect() {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n\n var func = 'moment';\n var zone = '';\n\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n\n var prefix = '[' + func + '(\"]';\n var year = 0 <= this.year() && this.year() <= 9999 ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n return this.format(prefix + year + datetime + suffix);\n }\n\n function format(inputString) {\n if (!inputString) {\n inputString = this.isUtc() ? hooks.defaultFormatUtc : hooks.defaultFormat;\n }\n\n var output = formatMoment(this, inputString);\n return this.localeData().postformat(output);\n }\n\n function from(time, withoutSuffix) {\n if (this.isValid() && (isMoment(time) && time.isValid() || createLocal(time).isValid())) {\n return createDuration({\n to: this,\n from: time\n }).locale(this.locale()).humanize(!withoutSuffix);\n } else {\n return this.localeData().invalidDate();\n }\n }\n\n function fromNow(withoutSuffix) {\n return this.from(createLocal(), withoutSuffix);\n }\n\n function to(time, withoutSuffix) {\n if (this.isValid() && (isMoment(time) && time.isValid() || createLocal(time).isValid())) {\n return createDuration({\n from: this,\n to: time\n }).locale(this.locale()).humanize(!withoutSuffix);\n } else {\n return this.localeData().invalidDate();\n }\n }\n\n function toNow(withoutSuffix) {\n return this.to(createLocal(), withoutSuffix);\n } // If passed a locale key, it will set the locale for this\n // instance. Otherwise, it will return the locale configuration\n // variables for this instance.\n\n\n function locale(key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n\n return this;\n }\n }\n\n var lang = deprecate('moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.', function (key) {\n if (key === undefined) {\n return this.localeData();\n } else {\n return this.locale(key);\n }\n });\n\n function localeData() {\n return this._locale;\n }\n\n var MS_PER_SECOND = 1000;\n var MS_PER_MINUTE = 60 * MS_PER_SECOND;\n var MS_PER_HOUR = 60 * MS_PER_MINUTE;\n var MS_PER_400_YEARS = (365 * 400 + 97) * 24 * MS_PER_HOUR; // actual modulo - handles negative numbers (for dates before 1970):\n\n function mod$1(dividend, divisor) {\n return (dividend % divisor + divisor) % divisor;\n }\n\n function localStartOfDate(y, m, d) {\n // the date constructor remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n return new Date(y + 400, m, d) - MS_PER_400_YEARS;\n } else {\n return new Date(y, m, d).valueOf();\n }\n }\n\n function utcStartOfDate(y, m, d) {\n // Date.UTC remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n return Date.UTC(y + 400, m, d) - MS_PER_400_YEARS;\n } else {\n return Date.UTC(y, m, d);\n }\n }\n\n function startOf(units) {\n var time;\n units = normalizeUnits(units);\n\n if (units === undefined || units === 'millisecond' || !this.isValid()) {\n return this;\n }\n\n var startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;\n\n switch (units) {\n case 'year':\n time = startOfDate(this.year(), 0, 1);\n break;\n\n case 'quarter':\n time = startOfDate(this.year(), this.month() - this.month() % 3, 1);\n break;\n\n case 'month':\n time = startOfDate(this.year(), this.month(), 1);\n break;\n\n case 'week':\n time = startOfDate(this.year(), this.month(), this.date() - this.weekday());\n break;\n\n case 'isoWeek':\n time = startOfDate(this.year(), this.month(), this.date() - (this.isoWeekday() - 1));\n break;\n\n case 'day':\n case 'date':\n time = startOfDate(this.year(), this.month(), this.date());\n break;\n\n case 'hour':\n time = this._d.valueOf();\n time -= mod$1(time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE), MS_PER_HOUR);\n break;\n\n case 'minute':\n time = this._d.valueOf();\n time -= mod$1(time, MS_PER_MINUTE);\n break;\n\n case 'second':\n time = this._d.valueOf();\n time -= mod$1(time, MS_PER_SECOND);\n break;\n }\n\n this._d.setTime(time);\n\n hooks.updateOffset(this, true);\n return this;\n }\n\n function endOf(units) {\n var time;\n units = normalizeUnits(units);\n\n if (units === undefined || units === 'millisecond' || !this.isValid()) {\n return this;\n }\n\n var startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;\n\n switch (units) {\n case 'year':\n time = startOfDate(this.year() + 1, 0, 1) - 1;\n break;\n\n case 'quarter':\n time = startOfDate(this.year(), this.month() - this.month() % 3 + 3, 1) - 1;\n break;\n\n case 'month':\n time = startOfDate(this.year(), this.month() + 1, 1) - 1;\n break;\n\n case 'week':\n time = startOfDate(this.year(), this.month(), this.date() - this.weekday() + 7) - 1;\n break;\n\n case 'isoWeek':\n time = startOfDate(this.year(), this.month(), this.date() - (this.isoWeekday() - 1) + 7) - 1;\n break;\n\n case 'day':\n case 'date':\n time = startOfDate(this.year(), this.month(), this.date() + 1) - 1;\n break;\n\n case 'hour':\n time = this._d.valueOf();\n time += MS_PER_HOUR - mod$1(time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE), MS_PER_HOUR) - 1;\n break;\n\n case 'minute':\n time = this._d.valueOf();\n time += MS_PER_MINUTE - mod$1(time, MS_PER_MINUTE) - 1;\n break;\n\n case 'second':\n time = this._d.valueOf();\n time += MS_PER_SECOND - mod$1(time, MS_PER_SECOND) - 1;\n break;\n }\n\n this._d.setTime(time);\n\n hooks.updateOffset(this, true);\n return this;\n }\n\n function valueOf() {\n return this._d.valueOf() - (this._offset || 0) * 60000;\n }\n\n function unix() {\n return Math.floor(this.valueOf() / 1000);\n }\n\n function toDate() {\n return new Date(this.valueOf());\n }\n\n function toArray() {\n var m = this;\n return [m.year(), m.month(), m.date(), m.hour(), m.minute(), m.second(), m.millisecond()];\n }\n\n function toObject() {\n var m = this;\n return {\n years: m.year(),\n months: m.month(),\n date: m.date(),\n hours: m.hours(),\n minutes: m.minutes(),\n seconds: m.seconds(),\n milliseconds: m.milliseconds()\n };\n }\n\n function toJSON() {\n // new Date(NaN).toJSON() === null\n return this.isValid() ? this.toISOString() : null;\n }\n\n function isValid$2() {\n return isValid(this);\n }\n\n function parsingFlags() {\n return extend({}, getParsingFlags(this));\n }\n\n function invalidAt() {\n return getParsingFlags(this).overflow;\n }\n\n function creationData() {\n return {\n input: this._i,\n format: this._f,\n locale: this._locale,\n isUTC: this._isUTC,\n strict: this._strict\n };\n } // FORMATTING\n\n\n addFormatToken(0, ['gg', 2], 0, function () {\n return this.weekYear() % 100;\n });\n addFormatToken(0, ['GG', 2], 0, function () {\n return this.isoWeekYear() % 100;\n });\n\n function addWeekYearFormatToken(token, getter) {\n addFormatToken(0, [token, token.length], 0, getter);\n }\n\n addWeekYearFormatToken('gggg', 'weekYear');\n addWeekYearFormatToken('ggggg', 'weekYear');\n addWeekYearFormatToken('GGGG', 'isoWeekYear');\n addWeekYearFormatToken('GGGGG', 'isoWeekYear'); // ALIASES\n\n addUnitAlias('weekYear', 'gg');\n addUnitAlias('isoWeekYear', 'GG'); // PRIORITY\n\n addUnitPriority('weekYear', 1);\n addUnitPriority('isoWeekYear', 1); // PARSING\n\n addRegexToken('G', matchSigned);\n addRegexToken('g', matchSigned);\n addRegexToken('GG', match1to2, match2);\n addRegexToken('gg', match1to2, match2);\n addRegexToken('GGGG', match1to4, match4);\n addRegexToken('gggg', match1to4, match4);\n addRegexToken('GGGGG', match1to6, match6);\n addRegexToken('ggggg', match1to6, match6);\n addWeekParseToken(['gggg', 'ggggg', 'GGGG', 'GGGGG'], function (input, week, config, token) {\n week[token.substr(0, 2)] = toInt(input);\n });\n addWeekParseToken(['gg', 'GG'], function (input, week, config, token) {\n week[token] = hooks.parseTwoDigitYear(input);\n }); // MOMENTS\n\n function getSetWeekYear(input) {\n return getSetWeekYearHelper.call(this, input, this.week(), this.weekday(), this.localeData()._week.dow, this.localeData()._week.doy);\n }\n\n function getSetISOWeekYear(input) {\n return getSetWeekYearHelper.call(this, input, this.isoWeek(), this.isoWeekday(), 1, 4);\n }\n\n function getISOWeeksInYear() {\n return weeksInYear(this.year(), 1, 4);\n }\n\n function getWeeksInYear() {\n var weekInfo = this.localeData()._week;\n\n return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy);\n }\n\n function getSetWeekYearHelper(input, week, weekday, dow, doy) {\n var weeksTarget;\n\n if (input == null) {\n return weekOfYear(this, dow, doy).year;\n } else {\n weeksTarget = weeksInYear(input, dow, doy);\n\n if (week > weeksTarget) {\n week = weeksTarget;\n }\n\n return setWeekAll.call(this, input, week, weekday, dow, doy);\n }\n }\n\n function setWeekAll(weekYear, week, weekday, dow, doy) {\n var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy),\n date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear);\n this.year(date.getUTCFullYear());\n this.month(date.getUTCMonth());\n this.date(date.getUTCDate());\n return this;\n } // FORMATTING\n\n\n addFormatToken('Q', 0, 'Qo', 'quarter'); // ALIASES\n\n addUnitAlias('quarter', 'Q'); // PRIORITY\n\n addUnitPriority('quarter', 7); // PARSING\n\n addRegexToken('Q', match1);\n addParseToken('Q', function (input, array) {\n array[MONTH] = (toInt(input) - 1) * 3;\n }); // MOMENTS\n\n function getSetQuarter(input) {\n return input == null ? Math.ceil((this.month() + 1) / 3) : this.month((input - 1) * 3 + this.month() % 3);\n } // FORMATTING\n\n\n addFormatToken('D', ['DD', 2], 'Do', 'date'); // ALIASES\n\n addUnitAlias('date', 'D'); // PRIORITY\n\n addUnitPriority('date', 9); // PARSING\n\n addRegexToken('D', match1to2);\n addRegexToken('DD', match1to2, match2);\n addRegexToken('Do', function (isStrict, locale) {\n // TODO: Remove \"ordinalParse\" fallback in next major release.\n return isStrict ? locale._dayOfMonthOrdinalParse || locale._ordinalParse : locale._dayOfMonthOrdinalParseLenient;\n });\n addParseToken(['D', 'DD'], DATE);\n addParseToken('Do', function (input, array) {\n array[DATE] = toInt(input.match(match1to2)[0]);\n }); // MOMENTS\n\n var getSetDayOfMonth = makeGetSet('Date', true); // FORMATTING\n\n addFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear'); // ALIASES\n\n addUnitAlias('dayOfYear', 'DDD'); // PRIORITY\n\n addUnitPriority('dayOfYear', 4); // PARSING\n\n addRegexToken('DDD', match1to3);\n addRegexToken('DDDD', match3);\n addParseToken(['DDD', 'DDDD'], function (input, array, config) {\n config._dayOfYear = toInt(input);\n }); // HELPERS\n // MOMENTS\n\n function getSetDayOfYear(input) {\n var dayOfYear = Math.round((this.clone().startOf('day') - this.clone().startOf('year')) / 864e5) + 1;\n return input == null ? dayOfYear : this.add(input - dayOfYear, 'd');\n } // FORMATTING\n\n\n addFormatToken('m', ['mm', 2], 0, 'minute'); // ALIASES\n\n addUnitAlias('minute', 'm'); // PRIORITY\n\n addUnitPriority('minute', 14); // PARSING\n\n addRegexToken('m', match1to2);\n addRegexToken('mm', match1to2, match2);\n addParseToken(['m', 'mm'], MINUTE); // MOMENTS\n\n var getSetMinute = makeGetSet('Minutes', false); // FORMATTING\n\n addFormatToken('s', ['ss', 2], 0, 'second'); // ALIASES\n\n addUnitAlias('second', 's'); // PRIORITY\n\n addUnitPriority('second', 15); // PARSING\n\n addRegexToken('s', match1to2);\n addRegexToken('ss', match1to2, match2);\n addParseToken(['s', 'ss'], SECOND); // MOMENTS\n\n var getSetSecond = makeGetSet('Seconds', false); // FORMATTING\n\n addFormatToken('S', 0, 0, function () {\n return ~~(this.millisecond() / 100);\n });\n addFormatToken(0, ['SS', 2], 0, function () {\n return ~~(this.millisecond() / 10);\n });\n addFormatToken(0, ['SSS', 3], 0, 'millisecond');\n addFormatToken(0, ['SSSS', 4], 0, function () {\n return this.millisecond() * 10;\n });\n addFormatToken(0, ['SSSSS', 5], 0, function () {\n return this.millisecond() * 100;\n });\n addFormatToken(0, ['SSSSSS', 6], 0, function () {\n return this.millisecond() * 1000;\n });\n addFormatToken(0, ['SSSSSSS', 7], 0, function () {\n return this.millisecond() * 10000;\n });\n addFormatToken(0, ['SSSSSSSS', 8], 0, function () {\n return this.millisecond() * 100000;\n });\n addFormatToken(0, ['SSSSSSSSS', 9], 0, function () {\n return this.millisecond() * 1000000;\n }); // ALIASES\n\n addUnitAlias('millisecond', 'ms'); // PRIORITY\n\n addUnitPriority('millisecond', 16); // PARSING\n\n addRegexToken('S', match1to3, match1);\n addRegexToken('SS', match1to3, match2);\n addRegexToken('SSS', match1to3, match3);\n var token;\n\n for (token = 'SSSS'; token.length <= 9; token += 'S') {\n addRegexToken(token, matchUnsigned);\n }\n\n function parseMs(input, array) {\n array[MILLISECOND] = toInt(('0.' + input) * 1000);\n }\n\n for (token = 'S'; token.length <= 9; token += 'S') {\n addParseToken(token, parseMs);\n } // MOMENTS\n\n\n var getSetMillisecond = makeGetSet('Milliseconds', false); // FORMATTING\n\n addFormatToken('z', 0, 0, 'zoneAbbr');\n addFormatToken('zz', 0, 0, 'zoneName'); // MOMENTS\n\n function getZoneAbbr() {\n return this._isUTC ? 'UTC' : '';\n }\n\n function getZoneName() {\n return this._isUTC ? 'Coordinated Universal Time' : '';\n }\n\n var proto = Moment.prototype;\n proto.add = add;\n proto.calendar = calendar$1;\n proto.clone = clone;\n proto.diff = diff;\n proto.endOf = endOf;\n proto.format = format;\n proto.from = from;\n proto.fromNow = fromNow;\n proto.to = to;\n proto.toNow = toNow;\n proto.get = stringGet;\n proto.invalidAt = invalidAt;\n proto.isAfter = isAfter;\n proto.isBefore = isBefore;\n proto.isBetween = isBetween;\n proto.isSame = isSame;\n proto.isSameOrAfter = isSameOrAfter;\n proto.isSameOrBefore = isSameOrBefore;\n proto.isValid = isValid$2;\n proto.lang = lang;\n proto.locale = locale;\n proto.localeData = localeData;\n proto.max = prototypeMax;\n proto.min = prototypeMin;\n proto.parsingFlags = parsingFlags;\n proto.set = stringSet;\n proto.startOf = startOf;\n proto.subtract = subtract;\n proto.toArray = toArray;\n proto.toObject = toObject;\n proto.toDate = toDate;\n proto.toISOString = toISOString;\n proto.inspect = inspect;\n proto.toJSON = toJSON;\n proto.toString = toString;\n proto.unix = unix;\n proto.valueOf = valueOf;\n proto.creationData = creationData;\n proto.year = getSetYear;\n proto.isLeapYear = getIsLeapYear;\n proto.weekYear = getSetWeekYear;\n proto.isoWeekYear = getSetISOWeekYear;\n proto.quarter = proto.quarters = getSetQuarter;\n proto.month = getSetMonth;\n proto.daysInMonth = getDaysInMonth;\n proto.week = proto.weeks = getSetWeek;\n proto.isoWeek = proto.isoWeeks = getSetISOWeek;\n proto.weeksInYear = getWeeksInYear;\n proto.isoWeeksInYear = getISOWeeksInYear;\n proto.date = getSetDayOfMonth;\n proto.day = proto.days = getSetDayOfWeek;\n proto.weekday = getSetLocaleDayOfWeek;\n proto.isoWeekday = getSetISODayOfWeek;\n proto.dayOfYear = getSetDayOfYear;\n proto.hour = proto.hours = getSetHour;\n proto.minute = proto.minutes = getSetMinute;\n proto.second = proto.seconds = getSetSecond;\n proto.millisecond = proto.milliseconds = getSetMillisecond;\n proto.utcOffset = getSetOffset;\n proto.utc = setOffsetToUTC;\n proto.local = setOffsetToLocal;\n proto.parseZone = setOffsetToParsedOffset;\n proto.hasAlignedHourOffset = hasAlignedHourOffset;\n proto.isDST = isDaylightSavingTime;\n proto.isLocal = isLocal;\n proto.isUtcOffset = isUtcOffset;\n proto.isUtc = isUtc;\n proto.isUTC = isUtc;\n proto.zoneAbbr = getZoneAbbr;\n proto.zoneName = getZoneName;\n proto.dates = deprecate('dates accessor is deprecated. Use date instead.', getSetDayOfMonth);\n proto.months = deprecate('months accessor is deprecated. Use month instead', getSetMonth);\n proto.years = deprecate('years accessor is deprecated. Use year instead', getSetYear);\n proto.zone = deprecate('moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/', getSetZone);\n proto.isDSTShifted = deprecate('isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information', isDaylightSavingTimeShifted);\n\n function createUnix(input) {\n return createLocal(input * 1000);\n }\n\n function createInZone() {\n return createLocal.apply(null, arguments).parseZone();\n }\n\n function preParsePostFormat(string) {\n return string;\n }\n\n var proto$1 = Locale.prototype;\n proto$1.calendar = calendar;\n proto$1.longDateFormat = longDateFormat;\n proto$1.invalidDate = invalidDate;\n proto$1.ordinal = ordinal;\n proto$1.preparse = preParsePostFormat;\n proto$1.postformat = preParsePostFormat;\n proto$1.relativeTime = relativeTime;\n proto$1.pastFuture = pastFuture;\n proto$1.set = set;\n proto$1.months = localeMonths;\n proto$1.monthsShort = localeMonthsShort;\n proto$1.monthsParse = localeMonthsParse;\n proto$1.monthsRegex = monthsRegex;\n proto$1.monthsShortRegex = monthsShortRegex;\n proto$1.week = localeWeek;\n proto$1.firstDayOfYear = localeFirstDayOfYear;\n proto$1.firstDayOfWeek = localeFirstDayOfWeek;\n proto$1.weekdays = localeWeekdays;\n proto$1.weekdaysMin = localeWeekdaysMin;\n proto$1.weekdaysShort = localeWeekdaysShort;\n proto$1.weekdaysParse = localeWeekdaysParse;\n proto$1.weekdaysRegex = weekdaysRegex;\n proto$1.weekdaysShortRegex = weekdaysShortRegex;\n proto$1.weekdaysMinRegex = weekdaysMinRegex;\n proto$1.isPM = localeIsPM;\n proto$1.meridiem = localeMeridiem;\n\n function get$1(format, index, field, setter) {\n var locale = getLocale();\n var utc = createUTC().set(setter, index);\n return locale[field](utc, format);\n }\n\n function listMonthsImpl(format, index, field) {\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n\n if (index != null) {\n return get$1(format, index, field, 'month');\n }\n\n var i;\n var out = [];\n\n for (i = 0; i < 12; i++) {\n out[i] = get$1(format, i, field, 'month');\n }\n\n return out;\n } // ()\n // (5)\n // (fmt, 5)\n // (fmt)\n // (true)\n // (true, 5)\n // (true, fmt, 5)\n // (true, fmt)\n\n\n function listWeekdaysImpl(localeSorted, format, index, field) {\n if (typeof localeSorted === 'boolean') {\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n } else {\n format = localeSorted;\n index = format;\n localeSorted = false;\n\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n }\n\n var locale = getLocale(),\n shift = localeSorted ? locale._week.dow : 0;\n\n if (index != null) {\n return get$1(format, (index + shift) % 7, field, 'day');\n }\n\n var i;\n var out = [];\n\n for (i = 0; i < 7; i++) {\n out[i] = get$1(format, (i + shift) % 7, field, 'day');\n }\n\n return out;\n }\n\n function listMonths(format, index) {\n return listMonthsImpl(format, index, 'months');\n }\n\n function listMonthsShort(format, index) {\n return listMonthsImpl(format, index, 'monthsShort');\n }\n\n function listWeekdays(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdays');\n }\n\n function listWeekdaysShort(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort');\n }\n\n function listWeekdaysMin(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin');\n }\n\n getSetGlobalLocale('en', {\n dayOfMonthOrdinalParse: /\\d{1,2}(th|st|nd|rd)/,\n ordinal: function (number) {\n var b = number % 10,\n output = toInt(number % 100 / 10) === 1 ? 'th' : b === 1 ? 'st' : b === 2 ? 'nd' : b === 3 ? 'rd' : 'th';\n return number + output;\n }\n }); // Side effect imports\n\n hooks.lang = deprecate('moment.lang is deprecated. Use moment.locale instead.', getSetGlobalLocale);\n hooks.langData = deprecate('moment.langData is deprecated. Use moment.localeData instead.', getLocale);\n var mathAbs = Math.abs;\n\n function abs() {\n var data = this._data;\n this._milliseconds = mathAbs(this._milliseconds);\n this._days = mathAbs(this._days);\n this._months = mathAbs(this._months);\n data.milliseconds = mathAbs(data.milliseconds);\n data.seconds = mathAbs(data.seconds);\n data.minutes = mathAbs(data.minutes);\n data.hours = mathAbs(data.hours);\n data.months = mathAbs(data.months);\n data.years = mathAbs(data.years);\n return this;\n }\n\n function addSubtract$1(duration, input, value, direction) {\n var other = createDuration(input, value);\n duration._milliseconds += direction * other._milliseconds;\n duration._days += direction * other._days;\n duration._months += direction * other._months;\n return duration._bubble();\n } // supports only 2.0-style add(1, 's') or add(duration)\n\n\n function add$1(input, value) {\n return addSubtract$1(this, input, value, 1);\n } // supports only 2.0-style subtract(1, 's') or subtract(duration)\n\n\n function subtract$1(input, value) {\n return addSubtract$1(this, input, value, -1);\n }\n\n function absCeil(number) {\n if (number < 0) {\n return Math.floor(number);\n } else {\n return Math.ceil(number);\n }\n }\n\n function bubble() {\n var milliseconds = this._milliseconds;\n var days = this._days;\n var months = this._months;\n var data = this._data;\n var seconds, minutes, hours, years, monthsFromDays; // if we have a mix of positive and negative values, bubble down first\n // check: https://github.com/moment/moment/issues/2166\n\n if (!(milliseconds >= 0 && days >= 0 && months >= 0 || milliseconds <= 0 && days <= 0 && months <= 0)) {\n milliseconds += absCeil(monthsToDays(months) + days) * 864e5;\n days = 0;\n months = 0;\n } // The following code bubbles up values, see the tests for\n // examples of what that means.\n\n\n data.milliseconds = milliseconds % 1000;\n seconds = absFloor(milliseconds / 1000);\n data.seconds = seconds % 60;\n minutes = absFloor(seconds / 60);\n data.minutes = minutes % 60;\n hours = absFloor(minutes / 60);\n data.hours = hours % 24;\n days += absFloor(hours / 24); // convert days to months\n\n monthsFromDays = absFloor(daysToMonths(days));\n months += monthsFromDays;\n days -= absCeil(monthsToDays(monthsFromDays)); // 12 months -> 1 year\n\n years = absFloor(months / 12);\n months %= 12;\n data.days = days;\n data.months = months;\n data.years = years;\n return this;\n }\n\n function daysToMonths(days) {\n // 400 years have 146097 days (taking into account leap year rules)\n // 400 years have 12 months === 4800\n return days * 4800 / 146097;\n }\n\n function monthsToDays(months) {\n // the reverse of daysToMonths\n return months * 146097 / 4800;\n }\n\n function as(units) {\n if (!this.isValid()) {\n return NaN;\n }\n\n var days;\n var months;\n var milliseconds = this._milliseconds;\n units = normalizeUnits(units);\n\n if (units === 'month' || units === 'quarter' || units === 'year') {\n days = this._days + milliseconds / 864e5;\n months = this._months + daysToMonths(days);\n\n switch (units) {\n case 'month':\n return months;\n\n case 'quarter':\n return months / 3;\n\n case 'year':\n return months / 12;\n }\n } else {\n // handle milliseconds separately because of floating point math errors (issue #1867)\n days = this._days + Math.round(monthsToDays(this._months));\n\n switch (units) {\n case 'week':\n return days / 7 + milliseconds / 6048e5;\n\n case 'day':\n return days + milliseconds / 864e5;\n\n case 'hour':\n return days * 24 + milliseconds / 36e5;\n\n case 'minute':\n return days * 1440 + milliseconds / 6e4;\n\n case 'second':\n return days * 86400 + milliseconds / 1000;\n // Math.floor prevents floating point math errors here\n\n case 'millisecond':\n return Math.floor(days * 864e5) + milliseconds;\n\n default:\n throw new Error('Unknown unit ' + units);\n }\n }\n } // TODO: Use this.as('ms')?\n\n\n function valueOf$1() {\n if (!this.isValid()) {\n return NaN;\n }\n\n return this._milliseconds + this._days * 864e5 + this._months % 12 * 2592e6 + toInt(this._months / 12) * 31536e6;\n }\n\n function makeAs(alias) {\n return function () {\n return this.as(alias);\n };\n }\n\n var asMilliseconds = makeAs('ms');\n var asSeconds = makeAs('s');\n var asMinutes = makeAs('m');\n var asHours = makeAs('h');\n var asDays = makeAs('d');\n var asWeeks = makeAs('w');\n var asMonths = makeAs('M');\n var asQuarters = makeAs('Q');\n var asYears = makeAs('y');\n\n function clone$1() {\n return createDuration(this);\n }\n\n function get$2(units) {\n units = normalizeUnits(units);\n return this.isValid() ? this[units + 's']() : NaN;\n }\n\n function makeGetter(name) {\n return function () {\n return this.isValid() ? this._data[name] : NaN;\n };\n }\n\n var milliseconds = makeGetter('milliseconds');\n var seconds = makeGetter('seconds');\n var minutes = makeGetter('minutes');\n var hours = makeGetter('hours');\n var days = makeGetter('days');\n var months = makeGetter('months');\n var years = makeGetter('years');\n\n function weeks() {\n return absFloor(this.days() / 7);\n }\n\n var round = Math.round;\n var thresholds = {\n ss: 44,\n // a few seconds to seconds\n s: 45,\n // seconds to minute\n m: 45,\n // minutes to hour\n h: 22,\n // hours to day\n d: 26,\n // days to month\n M: 11 // months to year\n\n }; // helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize\n\n function substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) {\n return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture);\n }\n\n function relativeTime$1(posNegDuration, withoutSuffix, locale) {\n var duration = createDuration(posNegDuration).abs();\n var seconds = round(duration.as('s'));\n var minutes = round(duration.as('m'));\n var hours = round(duration.as('h'));\n var days = round(duration.as('d'));\n var months = round(duration.as('M'));\n var years = round(duration.as('y'));\n var a = seconds <= thresholds.ss && ['s', seconds] || seconds < thresholds.s && ['ss', seconds] || minutes <= 1 && ['m'] || minutes < thresholds.m && ['mm', minutes] || hours <= 1 && ['h'] || hours < thresholds.h && ['hh', hours] || days <= 1 && ['d'] || days < thresholds.d && ['dd', days] || months <= 1 && ['M'] || months < thresholds.M && ['MM', months] || years <= 1 && ['y'] || ['yy', years];\n a[2] = withoutSuffix;\n a[3] = +posNegDuration > 0;\n a[4] = locale;\n return substituteTimeAgo.apply(null, a);\n } // This function allows you to set the rounding function for relative time strings\n\n\n function getSetRelativeTimeRounding(roundingFunction) {\n if (roundingFunction === undefined) {\n return round;\n }\n\n if (typeof roundingFunction === 'function') {\n round = roundingFunction;\n return true;\n }\n\n return false;\n } // This function allows you to set a threshold for relative time strings\n\n\n function getSetRelativeTimeThreshold(threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n\n if (limit === undefined) {\n return thresholds[threshold];\n }\n\n thresholds[threshold] = limit;\n\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n\n return true;\n }\n\n function humanize(withSuffix) {\n if (!this.isValid()) {\n return this.localeData().invalidDate();\n }\n\n var locale = this.localeData();\n var output = relativeTime$1(this, !withSuffix, locale);\n\n if (withSuffix) {\n output = locale.pastFuture(+this, output);\n }\n\n return locale.postformat(output);\n }\n\n var abs$1 = Math.abs;\n\n function sign(x) {\n return (x > 0) - (x < 0) || +x;\n }\n\n function toISOString$1() {\n // for ISO strings we do not use the normal bubbling rules:\n // * milliseconds bubble up until they become hours\n // * days do not bubble at all\n // * months bubble up until they become years\n // This is because there is no context-free conversion between hours and days\n // (think of clock changes)\n // and also not between days and months (28-31 days per month)\n if (!this.isValid()) {\n return this.localeData().invalidDate();\n }\n\n var seconds = abs$1(this._milliseconds) / 1000;\n var days = abs$1(this._days);\n var months = abs$1(this._months);\n var minutes, hours, years; // 3600 seconds -> 60 minutes -> 1 hour\n\n minutes = absFloor(seconds / 60);\n hours = absFloor(minutes / 60);\n seconds %= 60;\n minutes %= 60; // 12 months -> 1 year\n\n years = absFloor(months / 12);\n months %= 12; // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js\n\n var Y = years;\n var M = months;\n var D = days;\n var h = hours;\n var m = minutes;\n var s = seconds ? seconds.toFixed(3).replace(/\\.?0+$/, '') : '';\n var total = this.asSeconds();\n\n if (!total) {\n // this is the same as C#'s (Noda) and python (isodate)...\n // but not other JS (goog.date)\n return 'P0D';\n }\n\n var totalSign = total < 0 ? '-' : '';\n var ymSign = sign(this._months) !== sign(total) ? '-' : '';\n var daysSign = sign(this._days) !== sign(total) ? '-' : '';\n var hmsSign = sign(this._milliseconds) !== sign(total) ? '-' : '';\n return totalSign + 'P' + (Y ? ymSign + Y + 'Y' : '') + (M ? ymSign + M + 'M' : '') + (D ? daysSign + D + 'D' : '') + (h || m || s ? 'T' : '') + (h ? hmsSign + h + 'H' : '') + (m ? hmsSign + m + 'M' : '') + (s ? hmsSign + s + 'S' : '');\n }\n\n var proto$2 = Duration.prototype;\n proto$2.isValid = isValid$1;\n proto$2.abs = abs;\n proto$2.add = add$1;\n proto$2.subtract = subtract$1;\n proto$2.as = as;\n proto$2.asMilliseconds = asMilliseconds;\n proto$2.asSeconds = asSeconds;\n proto$2.asMinutes = asMinutes;\n proto$2.asHours = asHours;\n proto$2.asDays = asDays;\n proto$2.asWeeks = asWeeks;\n proto$2.asMonths = asMonths;\n proto$2.asQuarters = asQuarters;\n proto$2.asYears = asYears;\n proto$2.valueOf = valueOf$1;\n proto$2._bubble = bubble;\n proto$2.clone = clone$1;\n proto$2.get = get$2;\n proto$2.milliseconds = milliseconds;\n proto$2.seconds = seconds;\n proto$2.minutes = minutes;\n proto$2.hours = hours;\n proto$2.days = days;\n proto$2.weeks = weeks;\n proto$2.months = months;\n proto$2.years = years;\n proto$2.humanize = humanize;\n proto$2.toISOString = toISOString$1;\n proto$2.toString = toISOString$1;\n proto$2.toJSON = toISOString$1;\n proto$2.locale = locale;\n proto$2.localeData = localeData;\n proto$2.toIsoString = deprecate('toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)', toISOString$1);\n proto$2.lang = lang; // Side effect imports\n // FORMATTING\n\n addFormatToken('X', 0, 0, 'unix');\n addFormatToken('x', 0, 0, 'valueOf'); // PARSING\n\n addRegexToken('x', matchSigned);\n addRegexToken('X', matchTimestamp);\n addParseToken('X', function (input, array, config) {\n config._d = new Date(parseFloat(input, 10) * 1000);\n });\n addParseToken('x', function (input, array, config) {\n config._d = new Date(toInt(input));\n }); // Side effect imports\n\n hooks.version = '2.24.0';\n setHookCallback(createLocal);\n hooks.fn = proto;\n hooks.min = min;\n hooks.max = max;\n hooks.now = now;\n hooks.utc = createUTC;\n hooks.unix = createUnix;\n hooks.months = listMonths;\n hooks.isDate = isDate;\n hooks.locale = getSetGlobalLocale;\n hooks.invalid = createInvalid;\n hooks.duration = createDuration;\n hooks.isMoment = isMoment;\n hooks.weekdays = listWeekdays;\n hooks.parseZone = createInZone;\n hooks.localeData = getLocale;\n hooks.isDuration = isDuration;\n hooks.monthsShort = listMonthsShort;\n hooks.weekdaysMin = listWeekdaysMin;\n hooks.defineLocale = defineLocale;\n hooks.updateLocale = updateLocale;\n hooks.locales = listLocales;\n hooks.weekdaysShort = listWeekdaysShort;\n hooks.normalizeUnits = normalizeUnits;\n hooks.relativeTimeRounding = getSetRelativeTimeRounding;\n hooks.relativeTimeThreshold = getSetRelativeTimeThreshold;\n hooks.calendarFormat = getCalendarFormat;\n hooks.prototype = proto; // currently HTML5 input type only supports 24-hour formats\n\n hooks.HTML5_FMT = {\n DATETIME_LOCAL: 'YYYY-MM-DDTHH:mm',\n // \n DATETIME_LOCAL_SECONDS: 'YYYY-MM-DDTHH:mm:ss',\n // \n DATETIME_LOCAL_MS: 'YYYY-MM-DDTHH:mm:ss.SSS',\n // \n DATE: 'YYYY-MM-DD',\n // \n TIME: 'HH:mm',\n // \n TIME_SECONDS: 'HH:mm:ss',\n // \n TIME_MS: 'HH:mm:ss.SSS',\n // \n WEEK: 'GGGG-[W]WW',\n // \n MONTH: 'YYYY-MM' // \n\n };\n return hooks;\n });\n});\n\n// Maps for number <-> hex string conversion\nvar byteToHex = [];\n\nfor (var i$1 = 0; i$1 < 256; i$1++) {\n byteToHex[i$1] = (i$1 + 0x100).toString(16).substr(1);\n}\n/**\n * Represent binary UUID into it's string representation.\n *\n * @param buf - Buffer containing UUID bytes.\n * @param offset - Offset from the start of the buffer where the UUID is saved (not needed if the buffer starts with the UUID).\n *\n * @returns String representation of the UUID.\n */\n\n\nfunction stringifyUUID(buf, offset) {\n var i = offset || 0;\n var bth = byteToHex;\n return bth[buf[i++]] + bth[buf[i++]] + bth[buf[i++]] + bth[buf[i++]] + '-' + bth[buf[i++]] + bth[buf[i++]] + '-' + bth[buf[i++]] + bth[buf[i++]] + '-' + bth[buf[i++]] + bth[buf[i++]] + '-' + bth[buf[i++]] + bth[buf[i++]] + bth[buf[i++]] + bth[buf[i++]] + bth[buf[i++]] + bth[buf[i++]];\n}\n/**\n * Generate 16 random bytes to be used as a base for UUID.\n *\n * @ignore\n */\n\n\nvar random = function () {\n if (typeof crypto !== 'undefined' && crypto.getRandomValues) {\n // WHATWG crypto-based RNG - http://wiki.whatwg.org/wiki/Crypto\n // Moderately fast, high quality\n var _rnds8 = new Uint8Array(16);\n\n return function whatwgRNG() {\n crypto.getRandomValues(_rnds8);\n return _rnds8;\n };\n } // Math.random()-based (RNG)\n //\n // If all else fails, use Math.random().\n // It's fast, but is of unspecified quality.\n\n\n var _rnds = new Array(16);\n\n return function () {\n for (var i = 0, r; i < 16; i++) {\n if ((i & 0x03) === 0) {\n r = Math.random() * 0x100000000;\n }\n\n _rnds[i] = r >>> ((i & 0x03) << 3) & 0xff;\n }\n\n return _rnds;\n }; // uuid.js\n //\n // Copyright (c) 2010-2012 Robert Kieffer\n // MIT License - http://opensource.org/licenses/mit-license.php\n // Unique ID creation requires a high quality random # generator. We feature\n // detect to determine the best RNG source, normalizing to a function that\n // returns 128-bits of randomness, since that's what's usually required\n // return require('./rng');\n}();\n\nvar byteToHex$1 = [];\n\nfor (var i$1$1 = 0; i$1$1 < 256; i$1$1++) {\n byteToHex$1[i$1$1] = (i$1$1 + 0x100).toString(16).substr(1);\n} // **`v1()` - Generate time-based UUID**\n//\n// Inspired by https://github.com/LiosK/UUID.js\n// and http://docs.python.org/library/uuid.html\n// random #'s we need to init node and clockseq\n\n\nvar seedBytes = random(); // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)\n\nvar defaultNodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]]; // Per 4.2.2, randomize (14 bit) clockseq\n\nvar defaultClockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff; // Previous uuid creation time\n/**\n * UUIDv4 options.\n */\n\n/**\n * Generate UUIDv4\n *\n * @param options - Options to be used instead of default generated values.\n * String 'binary' is a shorthand for uuid4({}, new Array(16)).\n * @param buf - If present the buffer will be filled with the generated UUID.\n * @param offset - Offset of the UUID from the start of the buffer.\n *\n * @returns UUIDv4\n */\n\n\nfunction uuid4() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var buf = arguments.length > 1 ? arguments[1] : undefined;\n var offset = arguments.length > 2 ? arguments[2] : undefined; // Deprecated - 'format' argument, as supported in v1.2\n\n var i = buf && offset || 0;\n\n if (typeof options === 'string') {\n buf = options === 'binary' ? new Array(16) : undefined;\n options = {};\n }\n\n var rnds = options.random || (options.rng || random)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n for (var ii = 0; ii < 16; ii++) {\n buf[i + ii] = rnds[ii];\n }\n }\n\n return buf || stringifyUUID(rnds);\n} // Rollup will complain about mixing default and named exports in UMD build,\n\n// for example '/Date(1198908717056)/' or '/Date(1198908717056-0700)/'\n// code from http://momentjs.com/\n\nvar ASPDateRegex = /^\\/?Date\\((-?\\d+)/i; // Color REs\n\nvar fullHexRE = /^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i;\nvar shortHexRE = /^#?([a-f\\d])([a-f\\d])([a-f\\d])$/i;\nvar rgbRE = /^rgb\\( *(1?\\d{1,2}|2[0-4]\\d|25[0-5]) *, *(1?\\d{1,2}|2[0-4]\\d|25[0-5]) *, *(1?\\d{1,2}|2[0-4]\\d|25[0-5]) *\\)$/i;\nvar rgbaRE = /^rgba\\( *(1?\\d{1,2}|2[0-4]\\d|25[0-5]) *, *(1?\\d{1,2}|2[0-4]\\d|25[0-5]) *, *(1?\\d{1,2}|2[0-4]\\d|25[0-5]) *, *([01]|0?\\.\\d+) *\\)$/i;\n/**\n * Hue, Saturation, Value.\n */\n\n/**\n * Test whether given object is a number\n *\n * @param value - Input value of unknown type.\n *\n * @returns True if number, false otherwise.\n */\nfunction isNumber(value) {\n return value instanceof Number || typeof value === \"number\";\n}\n/**\n * Remove everything in the DOM object\n *\n * @param DOMobject - Node whose child nodes will be recursively deleted.\n */\n\nfunction recursiveDOMDelete(DOMobject) {\n if (DOMobject) {\n while (DOMobject.hasChildNodes() === true) {\n var child = DOMobject.firstChild;\n\n if (child) {\n recursiveDOMDelete(child);\n DOMobject.removeChild(child);\n }\n }\n }\n}\n/**\n * Test whether given object is a string\n *\n * @param value - Input value of unknown type.\n *\n * @returns True if string, false otherwise.\n */\n\nfunction isString(value) {\n return value instanceof String || typeof value === \"string\";\n}\n/**\n * Test whether given object is a object (not primitive or null).\n *\n * @param value - Input value of unknown type.\n *\n * @returns True if not null object, false otherwise.\n */\n\nfunction isObject(value) {\n return _typeof(value) === \"object\" && value !== null;\n}\n/**\n * Test whether given object is a Date, or a String containing a Date\n *\n * @param value - Input value of unknown type.\n *\n * @returns True if Date instance or string date representation, false otherwise.\n */\n\nfunction isDate(value) {\n if (value instanceof Date) {\n return true;\n } else if (isString(value)) {\n // test whether this string contains a date\n var match = ASPDateRegex.exec(value);\n\n if (match) {\n return true;\n } else if (!isNaN(Date.parse(value))) {\n return true;\n }\n }\n\n return false;\n}\n/**\n * Test whether given object is a Moment date.\n * @TODO: This is basically a workaround, if Moment was imported property it wouldn't necessary as moment.isMoment is a TS type guard.\n *\n * @param value - Input value of unknown type.\n *\n * @returns True if Moment instance, false otherwise.\n */\n\nfunction isMoment(value) {\n return moment.isMoment(value);\n}\n/**\n * Copy property from b to a if property present in a.\n * If property in b explicitly set to null, delete it if `allowDeletion` set.\n *\n * Internal helper routine, should not be exported. Not added to `exports` for that reason.\n *\n * @param a - Target object.\n * @param b - Source object.\n * @param prop - Name of property to copy from b to a.\n * @param allowDeletion if true, delete property in a if explicitly set to null in b\n */\n\nfunction copyOrDelete(a, b, prop, allowDeletion) {\n var doDeletion = false;\n\n if (allowDeletion === true) {\n doDeletion = b[prop] === null && a[prop] !== undefined;\n }\n\n if (doDeletion) {\n delete a[prop];\n } else {\n a[prop] = b[prop]; // Remember, this is a reference copy!\n }\n}\n/**\n * Fill an object with a possibly partially defined other object.\n *\n * Only copies values for the properties already present in a.\n * That means an object is not created on a property if only the b object has it.\n *\n * @param a - The object that will have it's properties updated.\n * @param b - The object with property updates.\n * @param allowDeletion - if true, delete properties in a that are explicitly set to null in b\n */\n\n\nfunction fillIfDefined(a, b) {\n var allowDeletion = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n\n // NOTE: iteration of properties of a\n // NOTE: prototype properties iterated over as well\n for (var prop in a) {\n if (b[prop] !== undefined) {\n if (b[prop] === null || _typeof(b[prop]) !== \"object\") {\n // Note: typeof null === 'object'\n copyOrDelete(a, b, prop, allowDeletion);\n } else {\n var aProp = a[prop];\n var bProp = b[prop];\n\n if (isObject(aProp) && isObject(bProp)) {\n fillIfDefined(aProp, bProp, allowDeletion);\n }\n }\n }\n }\n}\n/**\n * Copy the values of all of the enumerable own properties from one or more source objects to a\n * target object. Returns the target object.\n *\n * @param target - The target object to copy to.\n * @param source - The source object from which to copy properties.\n *\n * @return The target object.\n */\n\nvar extend = Object.assign;\n/**\n * Extend object a with selected properties of object b or a series of objects\n * Only properties with defined values are copied\n *\n * @param props - Properties to be copied to a.\n * @param a - The target.\n * @param others - The sources.\n *\n * @returns Argument a.\n */\n\nfunction selectiveExtend(props, a) {\n if (!Array.isArray(props)) {\n throw new Error(\"Array with property names expected as first argument\");\n }\n\n for (var _len = arguments.length, others = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {\n others[_key - 2] = arguments[_key];\n }\n\n for (var _i = 0, _others = others; _i < _others.length; _i++) {\n var other = _others[_i];\n\n for (var p = 0; p < props.length; p++) {\n var prop = props[p];\n\n if (other && Object.prototype.hasOwnProperty.call(other, prop)) {\n a[prop] = other[prop];\n }\n }\n }\n\n return a;\n}\n/**\n * Extend object a with selected properties of object b.\n * Only properties with defined values are copied.\n *\n * **Note:** Previous version of this routine implied that multiple source objects\n * could be used; however, the implementation was **wrong**.\n * Since multiple (>1) sources weren't used anywhere in the `vis.js` code,\n * this has been removed\n *\n * @param props - Names of first-level properties to copy over.\n * @param a - Target object.\n * @param b - Source object.\n * @param allowDeletion - If true, delete property in a if explicitly set to null in b.\n *\n * @returns Argument a.\n */\n\nfunction selectiveDeepExtend(props, a, b) {\n var allowDeletion = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;\n\n // TODO: add support for Arrays to deepExtend\n if (Array.isArray(b)) {\n throw new TypeError(\"Arrays are not supported by deepExtend\");\n }\n\n for (var p = 0; p < props.length; p++) {\n var prop = props[p];\n\n if (Object.prototype.hasOwnProperty.call(b, prop)) {\n if (b[prop] && b[prop].constructor === Object) {\n if (a[prop] === undefined) {\n a[prop] = {};\n }\n\n if (a[prop].constructor === Object) {\n deepExtend(a[prop], b[prop], false, allowDeletion);\n } else {\n copyOrDelete(a, b, prop, allowDeletion);\n }\n } else if (Array.isArray(b[prop])) {\n throw new TypeError(\"Arrays are not supported by deepExtend\");\n } else {\n copyOrDelete(a, b, prop, allowDeletion);\n }\n }\n }\n\n return a;\n}\n/**\n * Extend object `a` with properties of object `b`, ignoring properties which are explicitly\n * specified to be excluded.\n *\n * The properties of `b` are considered for copying.\n * Properties which are themselves objects are are also extended.\n * Only properties with defined values are copied\n *\n * @param propsToExclude - Names of properties which should *not* be copied.\n * @param a - Object to extend.\n * @param b - Object to take properties from for extension.\n * @param allowDeletion - If true, delete properties in a that are explicitly set to null in b.\n *\n * @returns Argument a.\n */\n\nfunction selectiveNotDeepExtend(propsToExclude, a, b) {\n var allowDeletion = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;\n\n // TODO: add support for Arrays to deepExtend\n // NOTE: array properties have an else-below; apparently, there is a problem here.\n if (Array.isArray(b)) {\n throw new TypeError(\"Arrays are not supported by deepExtend\");\n }\n\n for (var prop in b) {\n if (!Object.prototype.hasOwnProperty.call(b, prop)) {\n continue;\n } // Handle local properties only\n\n\n if (propsToExclude.indexOf(prop) !== -1) {\n continue;\n } // In exclusion list, skip\n\n\n if (b[prop] && b[prop].constructor === Object) {\n if (a[prop] === undefined) {\n a[prop] = {};\n }\n\n if (a[prop].constructor === Object) {\n deepExtend(a[prop], b[prop]); // NOTE: allowDeletion not propagated!\n } else {\n copyOrDelete(a, b, prop, allowDeletion);\n }\n } else if (Array.isArray(b[prop])) {\n a[prop] = [];\n\n for (var i = 0; i < b[prop].length; i++) {\n a[prop].push(b[prop][i]);\n }\n } else {\n copyOrDelete(a, b, prop, allowDeletion);\n }\n }\n\n return a;\n}\n/**\n * Deep extend an object a with the properties of object b\n *\n * @param a - Target object.\n * @param b - Source object.\n * @param protoExtend - If true, the prototype values will also be extended\n * (ie. the options objects that inherit from others will also get the inherited options).\n * @param allowDeletion - If true, the values of fields that are null will be deleted.\n *\n * @returns Argument a.\n */\n\nfunction deepExtend(a, b) {\n var protoExtend = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n var allowDeletion = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;\n\n for (var prop in b) {\n if (Object.prototype.hasOwnProperty.call(b, prop) || protoExtend === true) {\n if (b[prop] && Object.getPrototypeOf(b[prop]) === Object.prototype) {\n if (a[prop] === undefined) {\n a[prop] = deepExtend({}, b[prop], protoExtend); // NOTE: allowDeletion not propagated!\n } else if (a[prop] && Object.getPrototypeOf(a[prop]) === Object.prototype) {\n deepExtend(a[prop], b[prop], protoExtend); // NOTE: allowDeletion not propagated!\n } else {\n copyOrDelete(a, b, prop, allowDeletion);\n }\n } else if (Array.isArray(b[prop])) {\n a[prop] = b[prop].slice();\n } else {\n copyOrDelete(a, b, prop, allowDeletion);\n }\n }\n }\n\n return a;\n}\n/**\n * Test whether all elements in two arrays are equal.\n *\n * @param a - First array.\n * @param b - Second array.\n *\n * @returns True if both arrays have the same length and same elements (1 = '1').\n */\n\nfunction equalArray(a, b) {\n if (a.length !== b.length) {\n return false;\n }\n\n for (var i = 0, len = a.length; i < len; i++) {\n if (a[i] != b[i]) {\n return false;\n }\n }\n\n return true;\n}\n\n/**\n * Convert an object into another type\n *\n * @param object - Value of unknown type.\n * @param type - Name of the desired type.\n *\n * @returns Object in the desired type.\n * @throws Error\n */\nfunction convert(object, type) {\n var match;\n\n if (object === undefined) {\n return undefined;\n }\n\n if (object === null) {\n return null;\n }\n\n if (!type) {\n return object;\n }\n\n if (!(typeof type === \"string\") && !(type instanceof String)) {\n throw new Error(\"Type must be a string\");\n } //noinspection FallthroughInSwitchStatementJS\n\n\n switch (type) {\n case \"boolean\":\n case \"Boolean\":\n return Boolean(object);\n\n case \"number\":\n case \"Number\":\n if (isString(object) && !isNaN(Date.parse(object))) {\n return moment(object).valueOf();\n } else {\n // @TODO: I don't think that Number and String constructors are a good idea.\n // This could also fail if the object doesn't have valueOf method or if it's redefined.\n // For example: Object.create(null) or { valueOf: 7 }.\n return Number(object.valueOf());\n }\n\n case \"string\":\n case \"String\":\n return String(object);\n\n case \"Date\":\n if (isNumber(object)) {\n return new Date(object);\n }\n\n if (object instanceof Date) {\n return new Date(object.valueOf());\n } else if (isMoment(object)) {\n return new Date(object.valueOf());\n }\n\n if (isString(object)) {\n match = ASPDateRegex.exec(object);\n\n if (match) {\n // object is an ASP date\n return new Date(Number(match[1])); // parse number\n } else {\n return moment(new Date(object)).toDate(); // parse string\n }\n } else {\n throw new Error(\"Cannot convert object of type \" + getType(object) + \" to type Date\");\n }\n\n case \"Moment\":\n if (isNumber(object)) {\n return moment(object);\n }\n\n if (object instanceof Date) {\n return moment(object.valueOf());\n } else if (isMoment(object)) {\n return moment(object);\n }\n\n if (isString(object)) {\n match = ASPDateRegex.exec(object);\n\n if (match) {\n // object is an ASP date\n return moment(Number(match[1])); // parse number\n } else {\n return moment(object); // parse string\n }\n } else {\n throw new Error(\"Cannot convert object of type \" + getType(object) + \" to type Date\");\n }\n\n case \"ISODate\":\n if (isNumber(object)) {\n return new Date(object);\n } else if (object instanceof Date) {\n return object.toISOString();\n } else if (isMoment(object)) {\n return object.toDate().toISOString();\n } else if (isString(object)) {\n match = ASPDateRegex.exec(object);\n\n if (match) {\n // object is an ASP date\n return new Date(Number(match[1])).toISOString(); // parse number\n } else {\n return moment(object).format(); // ISO 8601\n }\n } else {\n throw new Error(\"Cannot convert object of type \" + getType(object) + \" to type ISODate\");\n }\n\n case \"ASPDate\":\n if (isNumber(object)) {\n return \"/Date(\" + object + \")/\";\n } else if (object instanceof Date || isMoment(object)) {\n return \"/Date(\" + object.valueOf() + \")/\";\n } else if (isString(object)) {\n match = ASPDateRegex.exec(object);\n\n var _value;\n\n if (match) {\n // object is an ASP date\n _value = new Date(Number(match[1])).valueOf(); // parse number\n } else {\n _value = new Date(object).valueOf(); // parse string\n }\n\n return \"/Date(\" + _value + \")/\";\n } else {\n throw new Error(\"Cannot convert object of type \" + getType(object) + \" to type ASPDate\");\n }\n\n default:\n var never = type;\n throw new Error(\"Unknown type \".concat(never));\n }\n}\n/**\n * Get the type of an object, for example exports.getType([]) returns 'Array'\n *\n * @param object - Input value of unknown type.\n *\n * @returns Detected type.\n */\n\nfunction getType(object) {\n var type = _typeof(object);\n\n if (type === \"object\") {\n if (object === null) {\n return \"null\";\n }\n\n if (object instanceof Boolean) {\n return \"Boolean\";\n }\n\n if (object instanceof Number) {\n return \"Number\";\n }\n\n if (object instanceof String) {\n return \"String\";\n }\n\n if (Array.isArray(object)) {\n return \"Array\";\n }\n\n if (object instanceof Date) {\n return \"Date\";\n }\n\n return \"Object\";\n }\n\n if (type === \"number\") {\n return \"Number\";\n }\n\n if (type === \"boolean\") {\n return \"Boolean\";\n }\n\n if (type === \"string\") {\n return \"String\";\n }\n\n if (type === undefined) {\n return \"undefined\";\n }\n\n return type;\n}\n\n/**\n * Used to extend an array and copy it. This is used to propagate paths recursively.\n *\n * @param arr - First part.\n * @param newValue - The value to be aadded into the array.\n *\n * @returns A new array with all items from arr and newValue (which is last).\n */\nfunction copyAndExtendArray(arr, newValue) {\n return [].concat(_toConsumableArray(arr), [newValue]);\n}\n/**\n * Used to extend an array and copy it. This is used to propagate paths recursively.\n *\n * @param arr - The array to be copied.\n *\n * @returns Shallow copy of arr.\n */\n\nfunction copyArray(arr) {\n return arr.slice();\n}\n/**\n * Retrieve the absolute left value of a DOM element\n *\n * @param elem - A dom element, for example a div.\n *\n * @returns The absolute left position of this element in the browser page.\n */\n\nfunction getAbsoluteLeft(elem) {\n return elem.getBoundingClientRect().left;\n}\n/**\n * Retrieve the absolute right value of a DOM element\n *\n * @param elem - A dom element, for example a div.\n *\n * @returns The absolute right position of this element in the browser page.\n */\n\nfunction getAbsoluteRight(elem) {\n return elem.getBoundingClientRect().right;\n}\n/**\n * Retrieve the absolute top value of a DOM element\n *\n * @param elem - A dom element, for example a div.\n *\n * @returns The absolute top position of this element in the browser page.\n */\n\nfunction getAbsoluteTop(elem) {\n return elem.getBoundingClientRect().top;\n}\n/**\n * Add a className to the given elements style.\n *\n * @param elem - The element to which the classes will be added.\n * @param classNames - Space separated list of classes.\n */\n\nfunction addClassName(elem, classNames) {\n var classes = elem.className.split(\" \");\n var newClasses = classNames.split(\" \");\n classes = classes.concat(newClasses.filter(function (className) {\n return classes.indexOf(className) < 0;\n }));\n elem.className = classes.join(\" \");\n}\n/**\n * Remove a className from the given elements style.\n *\n * @param elem - The element from which the classes will be removed.\n * @param classNames - Space separated list of classes.\n */\n\nfunction removeClassName(elem, classNames) {\n var classes = elem.className.split(\" \");\n var oldClasses = classNames.split(\" \");\n classes = classes.filter(function (className) {\n return oldClasses.indexOf(className) < 0;\n });\n elem.className = classes.join(\" \");\n}\n\n/**\n * For each method for both arrays and objects.\n * In case of an array, the built-in Array.forEach() is applied (**No, it's not!**).\n * In case of an Object, the method loops over all properties of the object.\n *\n * @param object - An Object or Array to be iterated over.\n * @param callback - Array.forEach-like callback.\n */\nfunction forEach(object, callback) {\n if (Array.isArray(object)) {\n // array\n var len = object.length;\n\n for (var i = 0; i < len; i++) {\n callback(object[i], i, object);\n }\n } else {\n // object\n for (var _key2 in object) {\n if (Object.prototype.hasOwnProperty.call(object, _key2)) {\n callback(object[_key2], _key2, object);\n }\n }\n }\n}\n/**\n * Convert an object into an array: all objects properties are put into the array. The resulting array is unordered.\n *\n * @param o - Object that contains the properties and methods.\n *\n * @returns An array of unordered values.\n */\n\nvar toArray = Object.values;\n/**\n * Update a property in an object\n *\n * @param object - The object whose property will be updated.\n * @param key - Name of the property to be updated.\n * @param value - The new value to be assigned.\n *\n * @returns Whether the value was updated (true) or already strictly the same in the original object (false).\n */\n\nfunction updateProperty(object, key, value) {\n if (object[key] !== value) {\n object[key] = value;\n return true;\n } else {\n return false;\n }\n}\n/**\n * Throttle the given function to be only executed once per animation frame.\n *\n * @param fn - The original function.\n *\n * @returns The throttled function.\n */\n\nfunction throttle(fn) {\n var scheduled = false;\n return function () {\n if (!scheduled) {\n scheduled = true;\n requestAnimationFrame(function () {\n scheduled = false;\n fn();\n });\n }\n };\n}\n/**\n * Add and event listener. Works for all browsers.\n *\n * @param element - The element to bind the event listener to.\n * @param action - Same as Element.addEventListener(action, —, —).\n * @param listener - Same as Element.addEventListener(—, listener, —).\n * @param useCapture - Same as Element.addEventListener(—, —, useCapture).\n */\n\nfunction addEventListener(element, action, listener, useCapture) {\n if (element.addEventListener) {\n if (useCapture === undefined) {\n useCapture = false;\n }\n\n if (action === \"mousewheel\" && navigator.userAgent.indexOf(\"Firefox\") >= 0) {\n action = \"DOMMouseScroll\"; // For Firefox\n }\n\n element.addEventListener(action, listener, useCapture);\n } else {\n // @TODO: IE types? Does anyone care?\n element.attachEvent(\"on\" + action, listener); // IE browsers\n }\n}\n/**\n * Remove an event listener from an element\n *\n * @param element - The element to bind the event listener to.\n * @param action - Same as Element.removeEventListener(action, —, —).\n * @param listener - Same as Element.removeEventListener(—, listener, —).\n * @param useCapture - Same as Element.removeEventListener(—, —, useCapture).\n */\n\nfunction removeEventListener(element, action, listener, useCapture) {\n if (element.removeEventListener) {\n // non-IE browsers\n if (useCapture === undefined) {\n useCapture = false;\n }\n\n if (action === \"mousewheel\" && navigator.userAgent.indexOf(\"Firefox\") >= 0) {\n action = \"DOMMouseScroll\"; // For Firefox\n }\n\n element.removeEventListener(action, listener, useCapture);\n } else {\n // @TODO: IE types? Does anyone care?\n element.detachEvent(\"on\" + action, listener); // IE browsers\n }\n}\n/**\n * Cancels the event's default action if it is cancelable, without stopping further propagation of the event.\n *\n * @param event - The event whose default action should be prevented.\n */\n\nfunction preventDefault(event) {\n if (!event) {\n event = window.event;\n }\n\n if (!event) ; else if (event.preventDefault) {\n event.preventDefault(); // non-IE browsers\n } else {\n // @TODO: IE types? Does anyone care?\n event.returnValue = false; // IE browsers\n }\n}\n/**\n * Get HTML element which is the target of the event.\n *\n * @param event - The event.\n *\n * @returns The element or null if not obtainable.\n */\n\nfunction getTarget() {\n var event = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : window.event;\n // code from http://www.quirksmode.org/js/events_properties.html\n // @TODO: EventTarget can be almost anything, is it okay to return only Elements?\n var target = null;\n\n if (!event) ; else if (event.target) {\n target = event.target;\n } else if (event.srcElement) {\n target = event.srcElement;\n }\n\n if (!(target instanceof Element)) {\n return null;\n }\n\n if (target.nodeType != null && target.nodeType == 3) {\n // defeat Safari bug\n target = target.parentNode;\n\n if (!(target instanceof Element)) {\n return null;\n }\n }\n\n return target;\n}\n/**\n * Check if given element contains given parent somewhere in the DOM tree\n *\n * @param element - The element to be tested.\n * @param parent - The ancestor (not necessarily parent) of the element.\n *\n * @returns True if parent is an ancestor of the element, false otherwise.\n */\n\nfunction hasParent(element, parent) {\n var elem = element;\n\n while (elem) {\n if (elem === parent) {\n return true;\n } else if (elem.parentNode) {\n elem = elem.parentNode;\n } else {\n return false;\n }\n }\n\n return false;\n}\nvar option = {\n /**\n * Convert a value into a boolean.\n *\n * @param value - Value to be converted intoboolean, a function will be executed as (() => unknown).\n * @param defaultValue - If the value or the return value of the function == null then this will be returned.\n *\n * @returns Corresponding boolean value, if none then the default value, if none then null.\n */\n asBoolean: function asBoolean(value, defaultValue) {\n if (typeof value == \"function\") {\n value = value();\n }\n\n if (value != null) {\n return value != false;\n }\n\n return defaultValue || null;\n },\n\n /**\n * Convert a value into a number.\n *\n * @param value - Value to be converted intonumber, a function will be executed as (() => unknown).\n * @param defaultValue - If the value or the return value of the function == null then this will be returned.\n *\n * @returns Corresponding **boxed** number value, if none then the default value, if none then null.\n */\n asNumber: function asNumber(value, defaultValue) {\n if (typeof value == \"function\") {\n value = value();\n }\n\n if (value != null) {\n return Number(value) || defaultValue || null;\n }\n\n return defaultValue || null;\n },\n\n /**\n * Convert a value into a string.\n *\n * @param value - Value to be converted intostring, a function will be executed as (() => unknown).\n * @param defaultValue - If the value or the return value of the function == null then this will be returned.\n *\n * @returns Corresponding **boxed** string value, if none then the default value, if none then null.\n */\n asString: function asString(value, defaultValue) {\n if (typeof value == \"function\") {\n value = value();\n }\n\n if (value != null) {\n return String(value);\n }\n\n return defaultValue || null;\n },\n\n /**\n * Convert a value into a size.\n *\n * @param value - Value to be converted intosize, a function will be executed as (() => unknown).\n * @param defaultValue - If the value or the return value of the function == null then this will be returned.\n *\n * @returns Corresponding string value (number + 'px'), if none then the default value, if none then null.\n */\n asSize: function asSize(value, defaultValue) {\n if (typeof value == \"function\") {\n value = value();\n }\n\n if (isString(value)) {\n return value;\n } else if (isNumber(value)) {\n return value + \"px\";\n } else {\n return defaultValue || null;\n }\n },\n\n /**\n * Convert a value into a DOM Element.\n *\n * @param value - Value to be converted into DOM Element, a function will be executed as (() => unknown).\n * @param defaultValue - If the value or the return value of the function == null then this will be returned.\n *\n * @returns The DOM Element, if none then the default value, if none then null.\n */\n asElement: function asElement(value, defaultValue) {\n if (typeof value == \"function\") {\n value = value();\n }\n\n return value || defaultValue || null;\n }\n};\n/**\n * Convert hex color string into RGB color object.\n * http://stackoverflow.com/questions/5623838/rgb-to-hex-and-hex-to-rgb\n *\n * @param hex - Hex color string (3 or 6 digits, with or without #).\n *\n * @returns RGB color object.\n */\n\nfunction hexToRGB(hex) {\n var result;\n\n switch (hex.length) {\n case 3:\n case 4:\n result = shortHexRE.exec(hex);\n return result ? {\n r: parseInt(result[1] + result[1], 16),\n g: parseInt(result[2] + result[2], 16),\n b: parseInt(result[3] + result[3], 16)\n } : null;\n\n case 6:\n case 7:\n result = fullHexRE.exec(hex);\n return result ? {\n r: parseInt(result[1], 16),\n g: parseInt(result[2], 16),\n b: parseInt(result[3], 16)\n } : null;\n\n default:\n return null;\n }\n}\n/**\n * This function takes string color in hex or RGB format and adds the opacity, RGBA is passed through unchanged.\n *\n * @param color - The color string (hex, RGB, RGBA).\n * @param opacity - The new opacity.\n *\n * @returns RGBA string, for example 'rgba(255, 0, 127, 0.3)'.\n */\n\nfunction overrideOpacity(color, opacity) {\n if (color.indexOf(\"rgba\") !== -1) {\n return color;\n } else if (color.indexOf(\"rgb\") !== -1) {\n var rgb = color.substr(color.indexOf(\"(\") + 1).replace(\")\", \"\").split(\",\");\n return \"rgba(\" + rgb[0] + \",\" + rgb[1] + \",\" + rgb[2] + \",\" + opacity + \")\";\n } else {\n var _rgb = hexToRGB(color);\n\n if (_rgb == null) {\n return color;\n } else {\n return \"rgba(\" + _rgb.r + \",\" + _rgb.g + \",\" + _rgb.b + \",\" + opacity + \")\";\n }\n }\n}\n/**\n * Convert RGB <0, 255> into hex color string.\n *\n * @param red - Red channel.\n * @param green - Green channel.\n * @param blue - Blue channel.\n *\n * @returns Hex color string (for example: '#0acdc0').\n */\n\nfunction RGBToHex(red, green, blue) {\n return \"#\" + ((1 << 24) + (red << 16) + (green << 8) + blue).toString(16).slice(1);\n}\n\n/**\n * Parse a color property into an object with border, background, and highlight colors\n *\n * @param inputColor - Shorthand color string or input color object.\n * @param defaultColor - Full color object to fill in missing values in inputColor.\n *\n * @returns Color object.\n */\nfunction parseColor(inputColor, defaultColor) {\n if (isString(inputColor)) {\n var colorStr = inputColor;\n\n if (isValidRGB(colorStr)) {\n var rgb = colorStr.substr(4).substr(0, colorStr.length - 5).split(\",\").map(function (value) {\n return parseInt(value);\n });\n colorStr = RGBToHex(rgb[0], rgb[1], rgb[2]);\n }\n\n if (isValidHex(colorStr) === true) {\n var hsv = hexToHSV(colorStr);\n var lighterColorHSV = {\n h: hsv.h,\n s: hsv.s * 0.8,\n v: Math.min(1, hsv.v * 1.02)\n };\n var darkerColorHSV = {\n h: hsv.h,\n s: Math.min(1, hsv.s * 1.25),\n v: hsv.v * 0.8\n };\n var darkerColorHex = HSVToHex(darkerColorHSV.h, darkerColorHSV.s, darkerColorHSV.v);\n var lighterColorHex = HSVToHex(lighterColorHSV.h, lighterColorHSV.s, lighterColorHSV.v);\n return {\n background: colorStr,\n border: darkerColorHex,\n highlight: {\n background: lighterColorHex,\n border: darkerColorHex\n },\n hover: {\n background: lighterColorHex,\n border: darkerColorHex\n }\n };\n } else {\n return {\n background: colorStr,\n border: colorStr,\n highlight: {\n background: colorStr,\n border: colorStr\n },\n hover: {\n background: colorStr,\n border: colorStr\n }\n };\n }\n } else {\n if (defaultColor) {\n var color = {\n background: inputColor.background || defaultColor.background,\n border: inputColor.border || defaultColor.border,\n highlight: isString(inputColor.highlight) ? {\n border: inputColor.highlight,\n background: inputColor.highlight\n } : {\n background: inputColor.highlight && inputColor.highlight.background || defaultColor.highlight.background,\n border: inputColor.highlight && inputColor.highlight.border || defaultColor.highlight.border\n },\n hover: isString(inputColor.hover) ? {\n border: inputColor.hover,\n background: inputColor.hover\n } : {\n border: inputColor.hover && inputColor.hover.border || defaultColor.hover.border,\n background: inputColor.hover && inputColor.hover.background || defaultColor.hover.background\n }\n };\n return color;\n } else {\n var _color = {\n background: inputColor.background || undefined,\n border: inputColor.border || undefined,\n highlight: isString(inputColor.highlight) ? {\n border: inputColor.highlight,\n background: inputColor.highlight\n } : {\n background: inputColor.highlight && inputColor.highlight.background || undefined,\n border: inputColor.highlight && inputColor.highlight.border || undefined\n },\n hover: isString(inputColor.hover) ? {\n border: inputColor.hover,\n background: inputColor.hover\n } : {\n border: inputColor.hover && inputColor.hover.border || undefined,\n background: inputColor.hover && inputColor.hover.background || undefined\n }\n };\n return _color;\n }\n }\n}\n/**\n * Convert RGB <0, 255> into HSV object.\n * http://www.javascripter.net/faq/rgb2hsv.htm\n *\n * @param red - Red channel.\n * @param green - Green channel.\n * @param blue - Blue channel.\n *\n * @returns HSV color object.\n */\n\nfunction RGBToHSV(red, green, blue) {\n red = red / 255;\n green = green / 255;\n blue = blue / 255;\n var minRGB = Math.min(red, Math.min(green, blue));\n var maxRGB = Math.max(red, Math.max(green, blue)); // Black-gray-white\n\n if (minRGB === maxRGB) {\n return {\n h: 0,\n s: 0,\n v: minRGB\n };\n } // Colors other than black-gray-white:\n\n\n var d = red === minRGB ? green - blue : blue === minRGB ? red - green : blue - red;\n var h = red === minRGB ? 3 : blue === minRGB ? 1 : 5;\n var hue = 60 * (h - d / (maxRGB - minRGB)) / 360;\n var saturation = (maxRGB - minRGB) / maxRGB;\n var value = maxRGB;\n return {\n h: hue,\n s: saturation,\n v: value\n };\n}\nvar cssUtil = {\n // split a string with css styles into an object with key/values\n split: function split(cssText) {\n var styles = {};\n cssText.split(\";\").forEach(function (style) {\n if (style.trim() != \"\") {\n var parts = style.split(\":\");\n\n var _key3 = parts[0].trim();\n\n var _value2 = parts[1].trim();\n\n styles[_key3] = _value2;\n }\n });\n return styles;\n },\n // build a css text string from an object with key/values\n join: function join(styles) {\n return Object.keys(styles).map(function (key) {\n return key + \": \" + styles[key];\n }).join(\"; \");\n }\n};\n/**\n * Append a string with css styles to an element\n *\n * @param element - The element that will receive new styles.\n * @param cssText - The styles to be appended.\n */\n\nfunction addCssText(element, cssText) {\n var currentStyles = cssUtil.split(element.style.cssText);\n var newStyles = cssUtil.split(cssText);\n\n var styles = _objectSpread2({}, currentStyles, {}, newStyles);\n\n element.style.cssText = cssUtil.join(styles);\n}\n/**\n * Remove a string with css styles from an element\n *\n * @param element - The element from which styles should be removed.\n * @param cssText - The styles to be removed.\n */\n\nfunction removeCssText(element, cssText) {\n var styles = cssUtil.split(element.style.cssText);\n var removeStyles = cssUtil.split(cssText);\n\n for (var _key4 in removeStyles) {\n if (Object.prototype.hasOwnProperty.call(removeStyles, _key4)) {\n delete styles[_key4];\n }\n }\n\n element.style.cssText = cssUtil.join(styles);\n}\n/**\n * Convert HSV <0, 1> into RGB color object.\n * https://gist.github.com/mjijackson/5311256\n *\n * @param h - Hue\n * @param s - Saturation\n * @param v - Value\n *\n * @returns RGB color object.\n */\n\nfunction HSVToRGB(h, s, v) {\n var r;\n var g;\n var b;\n var i = Math.floor(h * 6);\n var f = h * 6 - i;\n var p = v * (1 - s);\n var q = v * (1 - f * s);\n var t = v * (1 - (1 - f) * s);\n\n switch (i % 6) {\n case 0:\n r = v, g = t, b = p;\n break;\n\n case 1:\n r = q, g = v, b = p;\n break;\n\n case 2:\n r = p, g = v, b = t;\n break;\n\n case 3:\n r = p, g = q, b = v;\n break;\n\n case 4:\n r = t, g = p, b = v;\n break;\n\n case 5:\n r = v, g = p, b = q;\n break;\n }\n\n return {\n r: Math.floor(r * 255),\n g: Math.floor(g * 255),\n b: Math.floor(b * 255)\n };\n}\n/**\n * Convert HSV <0, 1> into hex color string.\n *\n * @param h - Hue\n * @param s - Saturation\n * @param v - Value\n *\n * @returns Hex color string.\n */\n\nfunction HSVToHex(h, s, v) {\n var rgb = HSVToRGB(h, s, v);\n return RGBToHex(rgb.r, rgb.g, rgb.b);\n}\n/**\n * Convert hex color string into HSV <0, 1>.\n *\n * @param hex - Hex color string.\n *\n * @returns HSV color object.\n */\n\nfunction hexToHSV(hex) {\n var rgb = hexToRGB(hex);\n\n if (!rgb) {\n throw new TypeError(\"'\".concat(hex, \"' is not a valid color.\"));\n }\n\n return RGBToHSV(rgb.r, rgb.g, rgb.b);\n}\n/**\n * Validate hex color string.\n *\n * @param hex - Unknown string that may contain a color.\n *\n * @returns True if the string is valid, false otherwise.\n */\n\nfunction isValidHex(hex) {\n var isOk = /(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(hex);\n return isOk;\n}\n/**\n * Validate RGB color string.\n *\n * @param rgb - Unknown string that may contain a color.\n *\n * @returns True if the string is valid, false otherwise.\n */\n\nfunction isValidRGB(rgb) {\n return rgbRE.test(rgb);\n}\n/**\n * Validate RGBA color string.\n *\n * @param rgba - Unknown string that may contain a color.\n *\n * @returns True if the string is valid, false otherwise.\n */\n\nfunction isValidRGBA(rgba) {\n return rgbaRE.test(rgba);\n}\n/**\n * This recursively redirects the prototype of JSON objects to the referenceObject.\n * This is used for default options.\n *\n * @param fields - Names of properties to be bridged.\n * @param referenceObject - The original object.\n *\n * @returns A new object inheriting from the referenceObject.\n */\n\nfunction selectiveBridgeObject(fields, referenceObject) {\n if (referenceObject !== null && _typeof(referenceObject) === \"object\") {\n // !!! typeof null === 'object'\n var objectTo = Object.create(referenceObject);\n\n for (var i = 0; i < fields.length; i++) {\n if (Object.prototype.hasOwnProperty.call(referenceObject, fields[i])) {\n if (_typeof(referenceObject[fields[i]]) == \"object\") {\n objectTo[fields[i]] = bridgeObject(referenceObject[fields[i]]);\n }\n }\n }\n\n return objectTo;\n } else {\n return null;\n }\n}\n\n/**\n * This recursively redirects the prototype of JSON objects to the referenceObject.\n * This is used for default options.\n *\n * @param referenceObject - The original object.\n *\n * @returns The Element if the referenceObject is an Element, or a new object inheriting from the referenceObject.\n */\nfunction bridgeObject(referenceObject) {\n if (referenceObject === null || _typeof(referenceObject) !== \"object\") {\n return null;\n }\n\n if (referenceObject instanceof Element) {\n // Avoid bridging DOM objects\n return referenceObject;\n }\n\n var objectTo = Object.create(referenceObject);\n\n for (var i in referenceObject) {\n if (Object.prototype.hasOwnProperty.call(referenceObject, i)) {\n if (_typeof(referenceObject[i]) == \"object\") {\n objectTo[i] = bridgeObject(referenceObject[i]);\n }\n }\n }\n\n return objectTo;\n}\n/**\n * This method provides a stable sort implementation, very fast for presorted data.\n *\n * @param a - The array to be sorted (in-place).\n * @param compare - An order comparator.\n *\n * @returns The argument a.\n */\n\nfunction insertSort(a, compare) {\n for (var i = 0; i < a.length; i++) {\n var k = a[i];\n var j = void 0;\n\n for (j = i; j > 0 && compare(k, a[j - 1]) < 0; j--) {\n a[j] = a[j - 1];\n }\n\n a[j] = k;\n }\n\n return a;\n}\n/**\n * This is used to set the options of subobjects in the options object.\n *\n * A requirement of these subobjects is that they have an 'enabled' element\n * which is optional for the user but mandatory for the program.\n *\n * The added value here of the merge is that option 'enabled' is set as required.\n *\n * @param mergeTarget - Either this.options or the options used for the groups.\n * @param options - Options.\n * @param option - Option key in the options argument.\n * @param globalOptions - Global options, passed in to determine value of option 'enabled'.\n */\n\nfunction mergeOptions(mergeTarget, options, option) {\n var globalOptions = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};\n\n // Local helpers\n var isPresent = function isPresent(obj) {\n return obj !== null && obj !== undefined;\n };\n\n var isObject = function isObject(obj) {\n return obj !== null && _typeof(obj) === \"object\";\n }; // https://stackoverflow.com/a/34491287/1223531\n\n\n var isEmpty = function isEmpty(obj) {\n for (var x in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, x)) {\n return false;\n }\n }\n\n return true;\n }; // Guards\n\n\n if (!isObject(mergeTarget)) {\n throw new Error(\"Parameter mergeTarget must be an object\");\n }\n\n if (!isObject(options)) {\n throw new Error(\"Parameter options must be an object\");\n }\n\n if (!isPresent(option)) {\n throw new Error(\"Parameter option must have a value\");\n }\n\n if (!isObject(globalOptions)) {\n throw new Error(\"Parameter globalOptions must be an object\");\n } //\n // Actual merge routine, separated from main logic\n // Only a single level of options is merged. Deeper levels are ref'd. This may actually be an issue.\n //\n\n\n var doMerge = function doMerge(target, options, option) {\n if (!isObject(target[option])) {\n target[option] = {};\n }\n\n var src = options[option];\n var dst = target[option];\n\n for (var prop in src) {\n if (Object.prototype.hasOwnProperty.call(src, prop)) {\n dst[prop] = src[prop];\n }\n }\n }; // Local initialization\n\n\n var srcOption = options[option];\n var globalPassed = isObject(globalOptions) && !isEmpty(globalOptions);\n var globalOption = globalPassed ? globalOptions[option] : undefined;\n var globalEnabled = globalOption ? globalOption.enabled : undefined; /////////////////////////////////////////\n // Main routine\n /////////////////////////////////////////\n\n if (srcOption === undefined) {\n return; // Nothing to do\n }\n\n if (typeof srcOption === \"boolean\") {\n if (!isObject(mergeTarget[option])) {\n mergeTarget[option] = {};\n }\n\n mergeTarget[option].enabled = srcOption;\n return;\n }\n\n if (srcOption === null && !isObject(mergeTarget[option])) {\n // If possible, explicit copy from globals\n if (isPresent(globalOption)) {\n mergeTarget[option] = Object.create(globalOption);\n } else {\n return; // Nothing to do\n }\n }\n\n if (!isObject(srcOption)) {\n return;\n } //\n // Ensure that 'enabled' is properly set. It is required internally\n // Note that the value from options will always overwrite the existing value\n //\n\n\n var enabled = true; // default value\n\n if (srcOption.enabled !== undefined) {\n enabled = srcOption.enabled;\n } else {\n // Take from globals, if present\n if (globalEnabled !== undefined) {\n enabled = globalOption.enabled;\n }\n }\n\n doMerge(mergeTarget, options, option);\n mergeTarget[option].enabled = enabled;\n}\n\n/**\n * This function does a binary search for a visible item in a sorted list. If we find a visible item, the code that uses\n * this function will then iterate in both directions over this sorted list to find all visible items.\n *\n * @param orderedItems - Items ordered by start\n * @param comparator - -1 is lower, 0 is equal, 1 is higher\n * @param field - Property name on an item (i.e. item[field]).\n * @param field2 - Second property name on an item (i.e. item[field][field2]).\n *\n * @returns Index of the found item or -1 if nothing was found.\n */\nfunction binarySearchCustom(orderedItems, comparator, field, field2) {\n var maxIterations = 10000;\n var iteration = 0;\n var low = 0;\n var high = orderedItems.length - 1;\n\n while (low <= high && iteration < maxIterations) {\n var middle = Math.floor((low + high) / 2);\n var item = orderedItems[middle];\n\n var _value3 = field2 === undefined ? item[field] : item[field][field2];\n\n var searchResult = comparator(_value3);\n\n if (searchResult == 0) {\n // jihaa, found a visible item!\n return middle;\n } else if (searchResult == -1) {\n // it is too small --> increase low\n low = middle + 1;\n } else {\n // it is too big --> decrease high\n high = middle - 1;\n }\n\n iteration++;\n }\n\n return -1;\n}\n/**\n * This function does a binary search for a specific value in a sorted array. If it does not exist but is in between of\n * two values, we return either the one before or the one after, depending on user input\n * If it is found, we return the index, else -1.\n *\n * @param orderedItems - Sorted array.\n * @param target - The searched value.\n * @param field - Name of the property in items to be searched.\n * @param sidePreference - If the target is between two values, should the index of the before or the after be returned?\n * @param comparator - An optional comparator, returning -1, 0, 1 for <, ===, >.\n *\n * @returns The index of found value or -1 if nothing was found.\n */\n\nfunction binarySearchValue(orderedItems, target, field, sidePreference, comparator) {\n var maxIterations = 10000;\n var iteration = 0;\n var low = 0;\n var high = orderedItems.length - 1;\n var prevValue;\n var value;\n var nextValue;\n var middle;\n comparator = comparator != undefined ? comparator : function (a, b) {\n return a == b ? 0 : a < b ? -1 : 1;\n };\n\n while (low <= high && iteration < maxIterations) {\n // get a new guess\n middle = Math.floor(0.5 * (high + low));\n prevValue = orderedItems[Math.max(0, middle - 1)][field];\n value = orderedItems[middle][field];\n nextValue = orderedItems[Math.min(orderedItems.length - 1, middle + 1)][field];\n\n if (comparator(value, target) == 0) {\n // we found the target\n return middle;\n } else if (comparator(prevValue, target) < 0 && comparator(value, target) > 0) {\n // target is in between of the previous and the current\n return sidePreference == \"before\" ? Math.max(0, middle - 1) : middle;\n } else if (comparator(value, target) < 0 && comparator(nextValue, target) > 0) {\n // target is in between of the current and the next\n return sidePreference == \"before\" ? middle : Math.min(orderedItems.length - 1, middle + 1);\n } else {\n // didnt find the target, we need to change our boundaries.\n if (comparator(value, target) < 0) {\n // it is too small --> increase low\n low = middle + 1;\n } else {\n // it is too big --> decrease high\n high = middle - 1;\n }\n }\n\n iteration++;\n } // didnt find anything. Return -1.\n\n\n return -1;\n}\n/*\n * Easing Functions.\n * Only considering the t value for the range [0, 1] => [0, 1].\n *\n * Inspiration: from http://gizma.com/easing/\n * https://gist.github.com/gre/1650294\n */\n\nvar easingFunctions = {\n /**\n * no easing, no acceleration\n *\n * @param t - Time.\n *\n * @returns Value at time t.\n */\n linear: function linear(t) {\n return t;\n },\n\n /**\n * accelerating from zero velocity\n *\n * @param t - Time.\n *\n * @returns Value at time t.\n */\n easeInQuad: function easeInQuad(t) {\n return t * t;\n },\n\n /**\n * decelerating to zero velocity\n *\n * @param t - Time.\n *\n * @returns Value at time t.\n */\n easeOutQuad: function easeOutQuad(t) {\n return t * (2 - t);\n },\n\n /**\n * acceleration until halfway, then deceleration\n *\n * @param t - Time.\n *\n * @returns Value at time t.\n */\n easeInOutQuad: function easeInOutQuad(t) {\n return t < 0.5 ? 2 * t * t : -1 + (4 - 2 * t) * t;\n },\n\n /**\n * accelerating from zero velocity\n *\n * @param t - Time.\n *\n * @returns Value at time t.\n */\n easeInCubic: function easeInCubic(t) {\n return t * t * t;\n },\n\n /**\n * decelerating to zero velocity\n *\n * @param t - Time.\n *\n * @returns Value at time t.\n */\n easeOutCubic: function easeOutCubic(t) {\n return --t * t * t + 1;\n },\n\n /**\n * acceleration until halfway, then deceleration\n *\n * @param t - Time.\n *\n * @returns Value at time t.\n */\n easeInOutCubic: function easeInOutCubic(t) {\n return t < 0.5 ? 4 * t * t * t : (t - 1) * (2 * t - 2) * (2 * t - 2) + 1;\n },\n\n /**\n * accelerating from zero velocity\n *\n * @param t - Time.\n *\n * @returns Value at time t.\n */\n easeInQuart: function easeInQuart(t) {\n return t * t * t * t;\n },\n\n /**\n * decelerating to zero velocity\n *\n * @param t - Time.\n *\n * @returns Value at time t.\n */\n easeOutQuart: function easeOutQuart(t) {\n return 1 - --t * t * t * t;\n },\n\n /**\n * acceleration until halfway, then deceleration\n *\n * @param t - Time.\n *\n * @returns Value at time t.\n */\n easeInOutQuart: function easeInOutQuart(t) {\n return t < 0.5 ? 8 * t * t * t * t : 1 - 8 * --t * t * t * t;\n },\n\n /**\n * accelerating from zero velocity\n *\n * @param t - Time.\n *\n * @returns Value at time t.\n */\n easeInQuint: function easeInQuint(t) {\n return t * t * t * t * t;\n },\n\n /**\n * decelerating to zero velocity\n *\n * @param t - Time.\n *\n * @returns Value at time t.\n */\n easeOutQuint: function easeOutQuint(t) {\n return 1 + --t * t * t * t * t;\n },\n\n /**\n * acceleration until halfway, then deceleration\n *\n * @param t - Time.\n *\n * @returns Value at time t.\n */\n easeInOutQuint: function easeInOutQuint(t) {\n return t < 0.5 ? 16 * t * t * t * t * t : 1 + 16 * --t * t * t * t * t;\n }\n};\n/**\n * Experimentaly compute the width of the scrollbar for this browser.\n *\n * @returns The width in pixels.\n */\n\nfunction getScrollBarWidth() {\n var inner = document.createElement(\"p\");\n inner.style.width = \"100%\";\n inner.style.height = \"200px\";\n var outer = document.createElement(\"div\");\n outer.style.position = \"absolute\";\n outer.style.top = \"0px\";\n outer.style.left = \"0px\";\n outer.style.visibility = \"hidden\";\n outer.style.width = \"200px\";\n outer.style.height = \"150px\";\n outer.style.overflow = \"hidden\";\n outer.appendChild(inner);\n document.body.appendChild(outer);\n var w1 = inner.offsetWidth;\n outer.style.overflow = \"scroll\";\n var w2 = inner.offsetWidth;\n\n if (w1 == w2) {\n w2 = outer.clientWidth;\n }\n\n document.body.removeChild(outer);\n return w1 - w2;\n} // @TODO: This doesn't work properly.\n// It works only for single property objects,\n// otherwise it combines all of the types in a union.\n// export function topMost (\n// pile: Record[],\n// accessors: K1 | [K1]\n// ): undefined | V1\n// export function topMost (\n// pile: Record>[],\n// accessors: [K1, K2]\n// ): undefined | V1 | V2\n// export function topMost (\n// pile: Record>>[],\n// accessors: [K1, K2, K3]\n// ): undefined | V1 | V2 | V3\n\n/**\n * Get the top most property value from a pile of objects.\n *\n * @param pile - Array of objects, no required format.\n * @param accessors - Array of property names (e.g. object['foo']['bar'] → ['foo', 'bar']).\n *\n * @returns Value of the property with given accessors path from the first pile item where it's not undefined.\n */\n\nfunction topMost(pile, accessors) {\n var candidate;\n\n if (!Array.isArray(accessors)) {\n accessors = [accessors];\n }\n\n var _iteratorNormalCompletion = true;\n var _didIteratorError = false;\n var _iteratorError = undefined;\n\n try {\n for (var _iterator = pile[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var member = _step.value;\n\n if (member) {\n candidate = member[accessors[0]];\n\n for (var i = 1; i < accessors.length; i++) {\n if (candidate) {\n candidate = candidate[accessors[i]];\n }\n }\n\n if (typeof candidate !== \"undefined\") {\n break;\n }\n }\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return != null) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n\n return candidate;\n}\n\nvar util = /*#__PURE__*/Object.freeze({\n\tisNumber: isNumber,\n\trecursiveDOMDelete: recursiveDOMDelete,\n\tisString: isString,\n\tisObject: isObject,\n\tisDate: isDate,\n\tisMoment: isMoment,\n\tfillIfDefined: fillIfDefined,\n\textend: extend,\n\tselectiveExtend: selectiveExtend,\n\tselectiveDeepExtend: selectiveDeepExtend,\n\tselectiveNotDeepExtend: selectiveNotDeepExtend,\n\tdeepExtend: deepExtend,\n\tequalArray: equalArray,\n\tconvert: convert,\n\tgetType: getType,\n\tcopyAndExtendArray: copyAndExtendArray,\n\tcopyArray: copyArray,\n\tgetAbsoluteLeft: getAbsoluteLeft,\n\tgetAbsoluteRight: getAbsoluteRight,\n\tgetAbsoluteTop: getAbsoluteTop,\n\taddClassName: addClassName,\n\tremoveClassName: removeClassName,\n\tforEach: forEach,\n\ttoArray: toArray,\n\tupdateProperty: updateProperty,\n\tthrottle: throttle,\n\taddEventListener: addEventListener,\n\tremoveEventListener: removeEventListener,\n\tpreventDefault: preventDefault,\n\tgetTarget: getTarget,\n\thasParent: hasParent,\n\toption: option,\n\thexToRGB: hexToRGB,\n\toverrideOpacity: overrideOpacity,\n\tRGBToHex: RGBToHex,\n\tparseColor: parseColor,\n\tRGBToHSV: RGBToHSV,\n\taddCssText: addCssText,\n\tremoveCssText: removeCssText,\n\tHSVToRGB: HSVToRGB,\n\tHSVToHex: HSVToHex,\n\thexToHSV: hexToHSV,\n\tisValidHex: isValidHex,\n\tisValidRGB: isValidRGB,\n\tisValidRGBA: isValidRGBA,\n\tselectiveBridgeObject: selectiveBridgeObject,\n\tbridgeObject: bridgeObject,\n\tinsertSort: insertSort,\n\tmergeOptions: mergeOptions,\n\tbinarySearchCustom: binarySearchCustom,\n\tbinarySearchValue: binarySearchValue,\n\teasingFunctions: easingFunctions,\n\tgetScrollBarWidth: getScrollBarWidth,\n\ttopMost: topMost,\n\trandomUUID: uuid4\n});\n\n// New API (tree shakeable).\n\nexport default util;\nexport { HSVToHex, HSVToRGB, RGBToHSV, RGBToHex, addClassName, addCssText, addEventListener, binarySearchCustom, binarySearchValue, bridgeObject, convert, copyAndExtendArray, copyArray, deepExtend, easingFunctions, equalArray, extend, fillIfDefined, forEach, getAbsoluteLeft, getAbsoluteRight, getAbsoluteTop, getScrollBarWidth, getTarget, getType, hasParent, hexToHSV, hexToRGB, insertSort, isDate, isMoment, isNumber, isObject, isString, isValidHex, isValidRGB, isValidRGBA, mergeOptions, option, overrideOpacity, parseColor, preventDefault, uuid4 as randomUUID, recursiveDOMDelete, removeClassName, removeCssText, removeEventListener, selectiveBridgeObject, selectiveDeepExtend, selectiveExtend, selectiveNotDeepExtend, throttle, toArray, topMost, updateProperty };\n","/** \n * vis-data - data\n * http://visjs.org/\n * \n * Manage unstructured data using DataSet. Add, update, and remove data, and listen for changes in the data.\n * \n * @version 6.1.0\n * @date 2019-07-16T13:37:00Z\n * \n * @copyright (c) 2011-2017 Almende B.V, http://almende.com\n * @copyright (c) 2018-2019 visjs contributors, https://github.com/visjs\n * \n * @license \n * vis.js is dual licensed under both\n * \n * 1. The Apache 2.0 License\n * http://www.apache.org/licenses/LICENSE-2.0\n * \n * and\n * \n * 2. The MIT License\n * http://opensource.org/licenses/MIT\n * \n * vis.js may be distributed under either license.\n */\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nvar defineProperty = _defineProperty;\n\nfunction createCommonjsModule(fn, module) {\n\treturn module = { exports: {} }, fn(module, module.exports), module.exports;\n}\n\nvar _typeof_1 = createCommonjsModule(function (module) {\n function _typeof2(obj) {\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof2 = function _typeof2(obj) {\n return typeof obj;\n };\n } else {\n _typeof2 = function _typeof2(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof2(obj);\n }\n\n function _typeof(obj) {\n if (typeof Symbol === \"function\" && _typeof2(Symbol.iterator) === \"symbol\") {\n module.exports = _typeof = function _typeof(obj) {\n return _typeof2(obj);\n };\n } else {\n module.exports = _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : _typeof2(obj);\n };\n }\n\n return _typeof(obj);\n }\n\n module.exports = _typeof;\n});\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nvar classCallCheck = _classCallCheck;\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nvar createClass = _createClass;\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nvar assertThisInitialized = _assertThisInitialized;\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof_1(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return assertThisInitialized(self);\n}\n\nvar possibleConstructorReturn = _possibleConstructorReturn;\n\nvar getPrototypeOf = createCommonjsModule(function (module) {\n function _getPrototypeOf(o) {\n module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n }\n\n module.exports = _getPrototypeOf;\n});\n\nvar setPrototypeOf = createCommonjsModule(function (module) {\n function _setPrototypeOf(o, p) {\n module.exports = _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n }\n\n module.exports = _setPrototypeOf;\n});\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) setPrototypeOf(subClass, superClass);\n}\n\nvar inherits = _inherits;\n\n// Maps for number <-> hex string conversion\nvar byteToHex = [];\n\nfor (var i = 0; i < 256; i++) {\n byteToHex[i] = (i + 0x100).toString(16).substr(1);\n}\n/**\n * Represent binary UUID into it's string representation.\n *\n * @param buf - Buffer containing UUID bytes.\n * @param offset - Offset from the start of the buffer where the UUID is saved (not needed if the buffer starts with the UUID).\n *\n * @returns String representation of the UUID.\n */\n\n\nfunction stringifyUUID(buf, offset) {\n var i = offset || 0;\n var bth = byteToHex;\n return bth[buf[i++]] + bth[buf[i++]] + bth[buf[i++]] + bth[buf[i++]] + '-' + bth[buf[i++]] + bth[buf[i++]] + '-' + bth[buf[i++]] + bth[buf[i++]] + '-' + bth[buf[i++]] + bth[buf[i++]] + '-' + bth[buf[i++]] + bth[buf[i++]] + bth[buf[i++]] + bth[buf[i++]] + bth[buf[i++]] + bth[buf[i++]];\n}\n/**\n * Generate 16 random bytes to be used as a base for UUID.\n *\n * @ignore\n */\n\n\nvar random = function () {\n if (typeof crypto !== 'undefined' && crypto.getRandomValues) {\n // WHATWG crypto-based RNG - http://wiki.whatwg.org/wiki/Crypto\n // Moderately fast, high quality\n var _rnds8 = new Uint8Array(16);\n\n return function whatwgRNG() {\n crypto.getRandomValues(_rnds8);\n return _rnds8;\n };\n } // Math.random()-based (RNG)\n //\n // If all else fails, use Math.random().\n // It's fast, but is of unspecified quality.\n\n\n var _rnds = new Array(16);\n\n return function () {\n for (var i = 0, r; i < 16; i++) {\n if ((i & 0x03) === 0) {\n r = Math.random() * 0x100000000;\n }\n\n _rnds[i] = r >>> ((i & 0x03) << 3) & 0xff;\n }\n\n return _rnds;\n }; // uuid.js\n //\n // Copyright (c) 2010-2012 Robert Kieffer\n // MIT License - http://opensource.org/licenses/mit-license.php\n // Unique ID creation requires a high quality random # generator. We feature\n // detect to determine the best RNG source, normalizing to a function that\n // returns 128-bits of randomness, since that's what's usually required\n // return require('./rng');\n}();\n\nvar byteToHex$1 = [];\n\nfor (var i$1 = 0; i$1 < 256; i$1++) {\n byteToHex$1[i$1] = (i$1 + 0x100).toString(16).substr(1);\n} // **`v1()` - Generate time-based UUID**\n//\n// Inspired by https://github.com/LiosK/UUID.js\n// and http://docs.python.org/library/uuid.html\n// random #'s we need to init node and clockseq\n\n\nvar seedBytes = random(); // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)\n\nvar defaultNodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]]; // Per 4.2.2, randomize (14 bit) clockseq\n\nvar defaultClockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff; // Previous uuid creation time\n/**\n * UUIDv4 options.\n */\n\n/**\n * Generate UUIDv4\n *\n * @param options - Options to be used instead of default generated values.\n * String 'binary' is a shorthand for uuid4({}, new Array(16)).\n * @param buf - If present the buffer will be filled with the generated UUID.\n * @param offset - Offset of the UUID from the start of the buffer.\n *\n * @returns UUIDv4\n */\n\n\nfunction uuid4() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var buf = arguments.length > 1 ? arguments[1] : undefined;\n var offset = arguments.length > 2 ? arguments[2] : undefined; // Deprecated - 'format' argument, as supported in v1.2\n\n var i = buf && offset || 0;\n\n if (typeof options === 'string') {\n buf = options === 'binary' ? new Array(16) : undefined;\n options = {};\n }\n\n var rnds = options.random || (options.rng || random)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n for (var ii = 0; ii < 16; ii++) {\n buf[i + ii] = rnds[ii];\n }\n }\n\n return buf || stringifyUUID(rnds);\n} // Rollup will complain about mixing default and named exports in UMD build,\n\nfunction _typeof(obj) {\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function (obj) {\n return typeof obj;\n };\n } else {\n _typeof = function (obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nvar commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};\n\nfunction commonjsRequire() {\n throw new Error('Dynamic requires are not currently supported by rollup-plugin-commonjs');\n}\n\nfunction createCommonjsModule$1(fn, module) {\n return module = {\n exports: {}\n }, fn(module, module.exports), module.exports;\n}\n\nvar moment = createCommonjsModule$1(function (module, exports) {\n (function (global, factory) {\n module.exports = factory();\n })(commonjsGlobal, function () {\n var hookCallback;\n\n function hooks() {\n return hookCallback.apply(null, arguments);\n } // This is done to register the method called with moment()\n // without creating circular dependencies.\n\n\n function setHookCallback(callback) {\n hookCallback = callback;\n }\n\n function isArray(input) {\n return input instanceof Array || Object.prototype.toString.call(input) === '[object Array]';\n }\n\n function isObject(input) {\n // IE8 will treat undefined and null as object if it wasn't for\n // input != null\n return input != null && Object.prototype.toString.call(input) === '[object Object]';\n }\n\n function isObjectEmpty(obj) {\n if (Object.getOwnPropertyNames) {\n return Object.getOwnPropertyNames(obj).length === 0;\n } else {\n var k;\n\n for (k in obj) {\n if (obj.hasOwnProperty(k)) {\n return false;\n }\n }\n\n return true;\n }\n }\n\n function isUndefined(input) {\n return input === void 0;\n }\n\n function isNumber(input) {\n return typeof input === 'number' || Object.prototype.toString.call(input) === '[object Number]';\n }\n\n function isDate(input) {\n return input instanceof Date || Object.prototype.toString.call(input) === '[object Date]';\n }\n\n function map(arr, fn) {\n var res = [],\n i;\n\n for (i = 0; i < arr.length; ++i) {\n res.push(fn(arr[i], i));\n }\n\n return res;\n }\n\n function hasOwnProp(a, b) {\n return Object.prototype.hasOwnProperty.call(a, b);\n }\n\n function extend(a, b) {\n for (var i in b) {\n if (hasOwnProp(b, i)) {\n a[i] = b[i];\n }\n }\n\n if (hasOwnProp(b, 'toString')) {\n a.toString = b.toString;\n }\n\n if (hasOwnProp(b, 'valueOf')) {\n a.valueOf = b.valueOf;\n }\n\n return a;\n }\n\n function createUTC(input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, true).utc();\n }\n\n function defaultParsingFlags() {\n // We need to deep clone this object.\n return {\n empty: false,\n unusedTokens: [],\n unusedInput: [],\n overflow: -2,\n charsLeftOver: 0,\n nullInput: false,\n invalidMonth: null,\n invalidFormat: false,\n userInvalidated: false,\n iso: false,\n parsedDateParts: [],\n meridiem: null,\n rfc2822: false,\n weekdayMismatch: false\n };\n }\n\n function getParsingFlags(m) {\n if (m._pf == null) {\n m._pf = defaultParsingFlags();\n }\n\n return m._pf;\n }\n\n var some;\n\n if (Array.prototype.some) {\n some = Array.prototype.some;\n } else {\n some = function (fun) {\n var t = Object(this);\n var len = t.length >>> 0;\n\n for (var i = 0; i < len; i++) {\n if (i in t && fun.call(this, t[i], i, t)) {\n return true;\n }\n }\n\n return false;\n };\n }\n\n function isValid(m) {\n if (m._isValid == null) {\n var flags = getParsingFlags(m);\n var parsedParts = some.call(flags.parsedDateParts, function (i) {\n return i != null;\n });\n var isNowValid = !isNaN(m._d.getTime()) && flags.overflow < 0 && !flags.empty && !flags.invalidMonth && !flags.invalidWeekday && !flags.weekdayMismatch && !flags.nullInput && !flags.invalidFormat && !flags.userInvalidated && (!flags.meridiem || flags.meridiem && parsedParts);\n\n if (m._strict) {\n isNowValid = isNowValid && flags.charsLeftOver === 0 && flags.unusedTokens.length === 0 && flags.bigHour === undefined;\n }\n\n if (Object.isFrozen == null || !Object.isFrozen(m)) {\n m._isValid = isNowValid;\n } else {\n return isNowValid;\n }\n }\n\n return m._isValid;\n }\n\n function createInvalid(flags) {\n var m = createUTC(NaN);\n\n if (flags != null) {\n extend(getParsingFlags(m), flags);\n } else {\n getParsingFlags(m).userInvalidated = true;\n }\n\n return m;\n } // Plugins that add properties should also add the key here (null value),\n // so we can properly clone ourselves.\n\n\n var momentProperties = hooks.momentProperties = [];\n\n function copyConfig(to, from) {\n var i, prop, val;\n\n if (!isUndefined(from._isAMomentObject)) {\n to._isAMomentObject = from._isAMomentObject;\n }\n\n if (!isUndefined(from._i)) {\n to._i = from._i;\n }\n\n if (!isUndefined(from._f)) {\n to._f = from._f;\n }\n\n if (!isUndefined(from._l)) {\n to._l = from._l;\n }\n\n if (!isUndefined(from._strict)) {\n to._strict = from._strict;\n }\n\n if (!isUndefined(from._tzm)) {\n to._tzm = from._tzm;\n }\n\n if (!isUndefined(from._isUTC)) {\n to._isUTC = from._isUTC;\n }\n\n if (!isUndefined(from._offset)) {\n to._offset = from._offset;\n }\n\n if (!isUndefined(from._pf)) {\n to._pf = getParsingFlags(from);\n }\n\n if (!isUndefined(from._locale)) {\n to._locale = from._locale;\n }\n\n if (momentProperties.length > 0) {\n for (i = 0; i < momentProperties.length; i++) {\n prop = momentProperties[i];\n val = from[prop];\n\n if (!isUndefined(val)) {\n to[prop] = val;\n }\n }\n }\n\n return to;\n }\n\n var updateInProgress = false; // Moment prototype object\n\n function Moment(config) {\n copyConfig(this, config);\n this._d = new Date(config._d != null ? config._d.getTime() : NaN);\n\n if (!this.isValid()) {\n this._d = new Date(NaN);\n } // Prevent infinite loop in case updateOffset creates new moment\n // objects.\n\n\n if (updateInProgress === false) {\n updateInProgress = true;\n hooks.updateOffset(this);\n updateInProgress = false;\n }\n }\n\n function isMoment(obj) {\n return obj instanceof Moment || obj != null && obj._isAMomentObject != null;\n }\n\n function absFloor(number) {\n if (number < 0) {\n // -0 -> 0\n return Math.ceil(number) || 0;\n } else {\n return Math.floor(number);\n }\n }\n\n function toInt(argumentForCoercion) {\n var coercedNumber = +argumentForCoercion,\n value = 0;\n\n if (coercedNumber !== 0 && isFinite(coercedNumber)) {\n value = absFloor(coercedNumber);\n }\n\n return value;\n } // compare two arrays, return the number of differences\n\n\n function compareArrays(array1, array2, dontConvert) {\n var len = Math.min(array1.length, array2.length),\n lengthDiff = Math.abs(array1.length - array2.length),\n diffs = 0,\n i;\n\n for (i = 0; i < len; i++) {\n if (dontConvert && array1[i] !== array2[i] || !dontConvert && toInt(array1[i]) !== toInt(array2[i])) {\n diffs++;\n }\n }\n\n return diffs + lengthDiff;\n }\n\n function warn(msg) {\n if (hooks.suppressDeprecationWarnings === false && typeof console !== 'undefined' && console.warn) {\n console.warn('Deprecation warning: ' + msg);\n }\n }\n\n function deprecate(msg, fn) {\n var firstTime = true;\n return extend(function () {\n if (hooks.deprecationHandler != null) {\n hooks.deprecationHandler(null, msg);\n }\n\n if (firstTime) {\n var args = [];\n var arg;\n\n for (var i = 0; i < arguments.length; i++) {\n arg = '';\n\n if (typeof arguments[i] === 'object') {\n arg += '\\n[' + i + '] ';\n\n for (var key in arguments[0]) {\n arg += key + ': ' + arguments[0][key] + ', ';\n }\n\n arg = arg.slice(0, -2); // Remove trailing comma and space\n } else {\n arg = arguments[i];\n }\n\n args.push(arg);\n }\n\n warn(msg + '\\nArguments: ' + Array.prototype.slice.call(args).join('') + '\\n' + new Error().stack);\n firstTime = false;\n }\n\n return fn.apply(this, arguments);\n }, fn);\n }\n\n var deprecations = {};\n\n function deprecateSimple(name, msg) {\n if (hooks.deprecationHandler != null) {\n hooks.deprecationHandler(name, msg);\n }\n\n if (!deprecations[name]) {\n warn(msg);\n deprecations[name] = true;\n }\n }\n\n hooks.suppressDeprecationWarnings = false;\n hooks.deprecationHandler = null;\n\n function isFunction(input) {\n return input instanceof Function || Object.prototype.toString.call(input) === '[object Function]';\n }\n\n function set(config) {\n var prop, i;\n\n for (i in config) {\n prop = config[i];\n\n if (isFunction(prop)) {\n this[i] = prop;\n } else {\n this['_' + i] = prop;\n }\n }\n\n this._config = config; // Lenient ordinal parsing accepts just a number in addition to\n // number + (possibly) stuff coming from _dayOfMonthOrdinalParse.\n // TODO: Remove \"ordinalParse\" fallback in next major release.\n\n this._dayOfMonthOrdinalParseLenient = new RegExp((this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) + '|' + /\\d{1,2}/.source);\n }\n\n function mergeConfigs(parentConfig, childConfig) {\n var res = extend({}, parentConfig),\n prop;\n\n for (prop in childConfig) {\n if (hasOwnProp(childConfig, prop)) {\n if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) {\n res[prop] = {};\n extend(res[prop], parentConfig[prop]);\n extend(res[prop], childConfig[prop]);\n } else if (childConfig[prop] != null) {\n res[prop] = childConfig[prop];\n } else {\n delete res[prop];\n }\n }\n }\n\n for (prop in parentConfig) {\n if (hasOwnProp(parentConfig, prop) && !hasOwnProp(childConfig, prop) && isObject(parentConfig[prop])) {\n // make sure changes to properties don't modify parent config\n res[prop] = extend({}, res[prop]);\n }\n }\n\n return res;\n }\n\n function Locale(config) {\n if (config != null) {\n this.set(config);\n }\n }\n\n var keys;\n\n if (Object.keys) {\n keys = Object.keys;\n } else {\n keys = function (obj) {\n var i,\n res = [];\n\n for (i in obj) {\n if (hasOwnProp(obj, i)) {\n res.push(i);\n }\n }\n\n return res;\n };\n }\n\n var defaultCalendar = {\n sameDay: '[Today at] LT',\n nextDay: '[Tomorrow at] LT',\n nextWeek: 'dddd [at] LT',\n lastDay: '[Yesterday at] LT',\n lastWeek: '[Last] dddd [at] LT',\n sameElse: 'L'\n };\n\n function calendar(key, mom, now) {\n var output = this._calendar[key] || this._calendar['sameElse'];\n return isFunction(output) ? output.call(mom, now) : output;\n }\n\n var defaultLongDateFormat = {\n LTS: 'h:mm:ss A',\n LT: 'h:mm A',\n L: 'MM/DD/YYYY',\n LL: 'MMMM D, YYYY',\n LLL: 'MMMM D, YYYY h:mm A',\n LLLL: 'dddd, MMMM D, YYYY h:mm A'\n };\n\n function longDateFormat(key) {\n var format = this._longDateFormat[key],\n formatUpper = this._longDateFormat[key.toUpperCase()];\n\n if (format || !formatUpper) {\n return format;\n }\n\n this._longDateFormat[key] = formatUpper.replace(/MMMM|MM|DD|dddd/g, function (val) {\n return val.slice(1);\n });\n return this._longDateFormat[key];\n }\n\n var defaultInvalidDate = 'Invalid date';\n\n function invalidDate() {\n return this._invalidDate;\n }\n\n var defaultOrdinal = '%d';\n var defaultDayOfMonthOrdinalParse = /\\d{1,2}/;\n\n function ordinal(number) {\n return this._ordinal.replace('%d', number);\n }\n\n var defaultRelativeTime = {\n future: 'in %s',\n past: '%s ago',\n s: 'a few seconds',\n ss: '%d seconds',\n m: 'a minute',\n mm: '%d minutes',\n h: 'an hour',\n hh: '%d hours',\n d: 'a day',\n dd: '%d days',\n M: 'a month',\n MM: '%d months',\n y: 'a year',\n yy: '%d years'\n };\n\n function relativeTime(number, withoutSuffix, string, isFuture) {\n var output = this._relativeTime[string];\n return isFunction(output) ? output(number, withoutSuffix, string, isFuture) : output.replace(/%d/i, number);\n }\n\n function pastFuture(diff, output) {\n var format = this._relativeTime[diff > 0 ? 'future' : 'past'];\n return isFunction(format) ? format(output) : format.replace(/%s/i, output);\n }\n\n var aliases = {};\n\n function addUnitAlias(unit, shorthand) {\n var lowerCase = unit.toLowerCase();\n aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit;\n }\n\n function normalizeUnits(units) {\n return typeof units === 'string' ? aliases[units] || aliases[units.toLowerCase()] : undefined;\n }\n\n function normalizeObjectUnits(inputObject) {\n var normalizedInput = {},\n normalizedProp,\n prop;\n\n for (prop in inputObject) {\n if (hasOwnProp(inputObject, prop)) {\n normalizedProp = normalizeUnits(prop);\n\n if (normalizedProp) {\n normalizedInput[normalizedProp] = inputObject[prop];\n }\n }\n }\n\n return normalizedInput;\n }\n\n var priorities = {};\n\n function addUnitPriority(unit, priority) {\n priorities[unit] = priority;\n }\n\n function getPrioritizedUnits(unitsObj) {\n var units = [];\n\n for (var u in unitsObj) {\n units.push({\n unit: u,\n priority: priorities[u]\n });\n }\n\n units.sort(function (a, b) {\n return a.priority - b.priority;\n });\n return units;\n }\n\n function zeroFill(number, targetLength, forceSign) {\n var absNumber = '' + Math.abs(number),\n zerosToFill = targetLength - absNumber.length,\n sign = number >= 0;\n return (sign ? forceSign ? '+' : '' : '-') + Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) + absNumber;\n }\n\n var formattingTokens = /(\\[[^\\[]*\\])|(\\\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g;\n var localFormattingTokens = /(\\[[^\\[]*\\])|(\\\\)?(LTS|LT|LL?L?L?|l{1,4})/g;\n var formatFunctions = {};\n var formatTokenFunctions = {}; // token: 'M'\n // padded: ['MM', 2]\n // ordinal: 'Mo'\n // callback: function () { this.month() + 1 }\n\n function addFormatToken(token, padded, ordinal, callback) {\n var func = callback;\n\n if (typeof callback === 'string') {\n func = function () {\n return this[callback]();\n };\n }\n\n if (token) {\n formatTokenFunctions[token] = func;\n }\n\n if (padded) {\n formatTokenFunctions[padded[0]] = function () {\n return zeroFill(func.apply(this, arguments), padded[1], padded[2]);\n };\n }\n\n if (ordinal) {\n formatTokenFunctions[ordinal] = function () {\n return this.localeData().ordinal(func.apply(this, arguments), token);\n };\n }\n }\n\n function removeFormattingTokens(input) {\n if (input.match(/\\[[\\s\\S]/)) {\n return input.replace(/^\\[|\\]$/g, '');\n }\n\n return input.replace(/\\\\/g, '');\n }\n\n function makeFormatFunction(format) {\n var array = format.match(formattingTokens),\n i,\n length;\n\n for (i = 0, length = array.length; i < length; i++) {\n if (formatTokenFunctions[array[i]]) {\n array[i] = formatTokenFunctions[array[i]];\n } else {\n array[i] = removeFormattingTokens(array[i]);\n }\n }\n\n return function (mom) {\n var output = '',\n i;\n\n for (i = 0; i < length; i++) {\n output += isFunction(array[i]) ? array[i].call(mom, format) : array[i];\n }\n\n return output;\n };\n } // format date using native date object\n\n\n function formatMoment(m, format) {\n if (!m.isValid()) {\n return m.localeData().invalidDate();\n }\n\n format = expandFormat(format, m.localeData());\n formatFunctions[format] = formatFunctions[format] || makeFormatFunction(format);\n return formatFunctions[format](m);\n }\n\n function expandFormat(format, locale) {\n var i = 5;\n\n function replaceLongDateFormatTokens(input) {\n return locale.longDateFormat(input) || input;\n }\n\n localFormattingTokens.lastIndex = 0;\n\n while (i >= 0 && localFormattingTokens.test(format)) {\n format = format.replace(localFormattingTokens, replaceLongDateFormatTokens);\n localFormattingTokens.lastIndex = 0;\n i -= 1;\n }\n\n return format;\n }\n\n var match1 = /\\d/; // 0 - 9\n\n var match2 = /\\d\\d/; // 00 - 99\n\n var match3 = /\\d{3}/; // 000 - 999\n\n var match4 = /\\d{4}/; // 0000 - 9999\n\n var match6 = /[+-]?\\d{6}/; // -999999 - 999999\n\n var match1to2 = /\\d\\d?/; // 0 - 99\n\n var match3to4 = /\\d\\d\\d\\d?/; // 999 - 9999\n\n var match5to6 = /\\d\\d\\d\\d\\d\\d?/; // 99999 - 999999\n\n var match1to3 = /\\d{1,3}/; // 0 - 999\n\n var match1to4 = /\\d{1,4}/; // 0 - 9999\n\n var match1to6 = /[+-]?\\d{1,6}/; // -999999 - 999999\n\n var matchUnsigned = /\\d+/; // 0 - inf\n\n var matchSigned = /[+-]?\\d+/; // -inf - inf\n\n var matchOffset = /Z|[+-]\\d\\d:?\\d\\d/gi; // +00:00 -00:00 +0000 -0000 or Z\n\n var matchShortOffset = /Z|[+-]\\d\\d(?::?\\d\\d)?/gi; // +00 -00 +00:00 -00:00 +0000 -0000 or Z\n\n var matchTimestamp = /[+-]?\\d+(\\.\\d{1,3})?/; // 123456789 123456789.123\n // any word (or two) characters or numbers including two/three word month in arabic.\n // includes scottish gaelic two word and hyphenated months\n\n var matchWord = /[0-9]{0,256}['a-z\\u00A0-\\u05FF\\u0700-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFF07\\uFF10-\\uFFEF]{1,256}|[\\u0600-\\u06FF\\/]{1,256}(\\s*?[\\u0600-\\u06FF]{1,256}){1,2}/i;\n var regexes = {};\n\n function addRegexToken(token, regex, strictRegex) {\n regexes[token] = isFunction(regex) ? regex : function (isStrict, localeData) {\n return isStrict && strictRegex ? strictRegex : regex;\n };\n }\n\n function getParseRegexForToken(token, config) {\n if (!hasOwnProp(regexes, token)) {\n return new RegExp(unescapeFormat(token));\n }\n\n return regexes[token](config._strict, config._locale);\n } // Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript\n\n\n function unescapeFormat(s) {\n return regexEscape(s.replace('\\\\', '').replace(/\\\\(\\[)|\\\\(\\])|\\[([^\\]\\[]*)\\]|\\\\(.)/g, function (matched, p1, p2, p3, p4) {\n return p1 || p2 || p3 || p4;\n }));\n }\n\n function regexEscape(s) {\n return s.replace(/[-\\/\\\\^$*+?.()|[\\]{}]/g, '\\\\$&');\n }\n\n var tokens = {};\n\n function addParseToken(token, callback) {\n var i,\n func = callback;\n\n if (typeof token === 'string') {\n token = [token];\n }\n\n if (isNumber(callback)) {\n func = function (input, array) {\n array[callback] = toInt(input);\n };\n }\n\n for (i = 0; i < token.length; i++) {\n tokens[token[i]] = func;\n }\n }\n\n function addWeekParseToken(token, callback) {\n addParseToken(token, function (input, array, config, token) {\n config._w = config._w || {};\n callback(input, config._w, config, token);\n });\n }\n\n function addTimeToArrayFromToken(token, input, config) {\n if (input != null && hasOwnProp(tokens, token)) {\n tokens[token](input, config._a, config, token);\n }\n }\n\n var YEAR = 0;\n var MONTH = 1;\n var DATE = 2;\n var HOUR = 3;\n var MINUTE = 4;\n var SECOND = 5;\n var MILLISECOND = 6;\n var WEEK = 7;\n var WEEKDAY = 8; // FORMATTING\n\n addFormatToken('Y', 0, 0, function () {\n var y = this.year();\n return y <= 9999 ? '' + y : '+' + y;\n });\n addFormatToken(0, ['YY', 2], 0, function () {\n return this.year() % 100;\n });\n addFormatToken(0, ['YYYY', 4], 0, 'year');\n addFormatToken(0, ['YYYYY', 5], 0, 'year');\n addFormatToken(0, ['YYYYYY', 6, true], 0, 'year'); // ALIASES\n\n addUnitAlias('year', 'y'); // PRIORITIES\n\n addUnitPriority('year', 1); // PARSING\n\n addRegexToken('Y', matchSigned);\n addRegexToken('YY', match1to2, match2);\n addRegexToken('YYYY', match1to4, match4);\n addRegexToken('YYYYY', match1to6, match6);\n addRegexToken('YYYYYY', match1to6, match6);\n addParseToken(['YYYYY', 'YYYYYY'], YEAR);\n addParseToken('YYYY', function (input, array) {\n array[YEAR] = input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input);\n });\n addParseToken('YY', function (input, array) {\n array[YEAR] = hooks.parseTwoDigitYear(input);\n });\n addParseToken('Y', function (input, array) {\n array[YEAR] = parseInt(input, 10);\n }); // HELPERS\n\n function daysInYear(year) {\n return isLeapYear(year) ? 366 : 365;\n }\n\n function isLeapYear(year) {\n return year % 4 === 0 && year % 100 !== 0 || year % 400 === 0;\n } // HOOKS\n\n\n hooks.parseTwoDigitYear = function (input) {\n return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);\n }; // MOMENTS\n\n\n var getSetYear = makeGetSet('FullYear', true);\n\n function getIsLeapYear() {\n return isLeapYear(this.year());\n }\n\n function makeGetSet(unit, keepTime) {\n return function (value) {\n if (value != null) {\n set$1(this, unit, value);\n hooks.updateOffset(this, keepTime);\n return this;\n } else {\n return get(this, unit);\n }\n };\n }\n\n function get(mom, unit) {\n return mom.isValid() ? mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]() : NaN;\n }\n\n function set$1(mom, unit, value) {\n if (mom.isValid() && !isNaN(value)) {\n if (unit === 'FullYear' && isLeapYear(mom.year()) && mom.month() === 1 && mom.date() === 29) {\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value, mom.month(), daysInMonth(value, mom.month()));\n } else {\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value);\n }\n }\n } // MOMENTS\n\n\n function stringGet(units) {\n units = normalizeUnits(units);\n\n if (isFunction(this[units])) {\n return this[units]();\n }\n\n return this;\n }\n\n function stringSet(units, value) {\n if (typeof units === 'object') {\n units = normalizeObjectUnits(units);\n var prioritized = getPrioritizedUnits(units);\n\n for (var i = 0; i < prioritized.length; i++) {\n this[prioritized[i].unit](units[prioritized[i].unit]);\n }\n } else {\n units = normalizeUnits(units);\n\n if (isFunction(this[units])) {\n return this[units](value);\n }\n }\n\n return this;\n }\n\n function mod(n, x) {\n return (n % x + x) % x;\n }\n\n var indexOf;\n\n if (Array.prototype.indexOf) {\n indexOf = Array.prototype.indexOf;\n } else {\n indexOf = function (o) {\n // I know\n var i;\n\n for (i = 0; i < this.length; ++i) {\n if (this[i] === o) {\n return i;\n }\n }\n\n return -1;\n };\n }\n\n function daysInMonth(year, month) {\n if (isNaN(year) || isNaN(month)) {\n return NaN;\n }\n\n var modMonth = mod(month, 12);\n year += (month - modMonth) / 12;\n return modMonth === 1 ? isLeapYear(year) ? 29 : 28 : 31 - modMonth % 7 % 2;\n } // FORMATTING\n\n\n addFormatToken('M', ['MM', 2], 'Mo', function () {\n return this.month() + 1;\n });\n addFormatToken('MMM', 0, 0, function (format) {\n return this.localeData().monthsShort(this, format);\n });\n addFormatToken('MMMM', 0, 0, function (format) {\n return this.localeData().months(this, format);\n }); // ALIASES\n\n addUnitAlias('month', 'M'); // PRIORITY\n\n addUnitPriority('month', 8); // PARSING\n\n addRegexToken('M', match1to2);\n addRegexToken('MM', match1to2, match2);\n addRegexToken('MMM', function (isStrict, locale) {\n return locale.monthsShortRegex(isStrict);\n });\n addRegexToken('MMMM', function (isStrict, locale) {\n return locale.monthsRegex(isStrict);\n });\n addParseToken(['M', 'MM'], function (input, array) {\n array[MONTH] = toInt(input) - 1;\n });\n addParseToken(['MMM', 'MMMM'], function (input, array, config, token) {\n var month = config._locale.monthsParse(input, token, config._strict); // if we didn't find a month name, mark the date as invalid.\n\n\n if (month != null) {\n array[MONTH] = month;\n } else {\n getParsingFlags(config).invalidMonth = input;\n }\n }); // LOCALES\n\n var MONTHS_IN_FORMAT = /D[oD]?(\\[[^\\[\\]]*\\]|\\s)+MMMM?/;\n var defaultLocaleMonths = 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_');\n\n function localeMonths(m, format) {\n if (!m) {\n return isArray(this._months) ? this._months : this._months['standalone'];\n }\n\n return isArray(this._months) ? this._months[m.month()] : this._months[(this._months.isFormat || MONTHS_IN_FORMAT).test(format) ? 'format' : 'standalone'][m.month()];\n }\n\n var defaultLocaleMonthsShort = 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_');\n\n function localeMonthsShort(m, format) {\n if (!m) {\n return isArray(this._monthsShort) ? this._monthsShort : this._monthsShort['standalone'];\n }\n\n return isArray(this._monthsShort) ? this._monthsShort[m.month()] : this._monthsShort[MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'][m.month()];\n }\n\n function handleStrictParse(monthName, format, strict) {\n var i,\n ii,\n mom,\n llc = monthName.toLocaleLowerCase();\n\n if (!this._monthsParse) {\n // this is not used\n this._monthsParse = [];\n this._longMonthsParse = [];\n this._shortMonthsParse = [];\n\n for (i = 0; i < 12; ++i) {\n mom = createUTC([2000, i]);\n this._shortMonthsParse[i] = this.monthsShort(mom, '').toLocaleLowerCase();\n this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase();\n }\n }\n\n if (strict) {\n if (format === 'MMM') {\n ii = indexOf.call(this._shortMonthsParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._longMonthsParse, llc);\n return ii !== -1 ? ii : null;\n }\n } else {\n if (format === 'MMM') {\n ii = indexOf.call(this._shortMonthsParse, llc);\n\n if (ii !== -1) {\n return ii;\n }\n\n ii = indexOf.call(this._longMonthsParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._longMonthsParse, llc);\n\n if (ii !== -1) {\n return ii;\n }\n\n ii = indexOf.call(this._shortMonthsParse, llc);\n return ii !== -1 ? ii : null;\n }\n }\n }\n\n function localeMonthsParse(monthName, format, strict) {\n var i, mom, regex;\n\n if (this._monthsParseExact) {\n return handleStrictParse.call(this, monthName, format, strict);\n }\n\n if (!this._monthsParse) {\n this._monthsParse = [];\n this._longMonthsParse = [];\n this._shortMonthsParse = [];\n } // TODO: add sorting\n // Sorting makes sure if one month (or abbr) is a prefix of another\n // see sorting in computeMonthsParse\n\n\n for (i = 0; i < 12; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, i]);\n\n if (strict && !this._longMonthsParse[i]) {\n this._longMonthsParse[i] = new RegExp('^' + this.months(mom, '').replace('.', '') + '$', 'i');\n this._shortMonthsParse[i] = new RegExp('^' + this.monthsShort(mom, '').replace('.', '') + '$', 'i');\n }\n\n if (!strict && !this._monthsParse[i]) {\n regex = '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, '');\n this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i');\n } // test the regex\n\n\n if (strict && format === 'MMMM' && this._longMonthsParse[i].test(monthName)) {\n return i;\n } else if (strict && format === 'MMM' && this._shortMonthsParse[i].test(monthName)) {\n return i;\n } else if (!strict && this._monthsParse[i].test(monthName)) {\n return i;\n }\n }\n } // MOMENTS\n\n\n function setMonth(mom, value) {\n var dayOfMonth;\n\n if (!mom.isValid()) {\n // No op\n return mom;\n }\n\n if (typeof value === 'string') {\n if (/^\\d+$/.test(value)) {\n value = toInt(value);\n } else {\n value = mom.localeData().monthsParse(value); // TODO: Another silent failure?\n\n if (!isNumber(value)) {\n return mom;\n }\n }\n }\n\n dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value));\n\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth);\n\n return mom;\n }\n\n function getSetMonth(value) {\n if (value != null) {\n setMonth(this, value);\n hooks.updateOffset(this, true);\n return this;\n } else {\n return get(this, 'Month');\n }\n }\n\n function getDaysInMonth() {\n return daysInMonth(this.year(), this.month());\n }\n\n var defaultMonthsShortRegex = matchWord;\n\n function monthsShortRegex(isStrict) {\n if (this._monthsParseExact) {\n if (!hasOwnProp(this, '_monthsRegex')) {\n computeMonthsParse.call(this);\n }\n\n if (isStrict) {\n return this._monthsShortStrictRegex;\n } else {\n return this._monthsShortRegex;\n }\n } else {\n if (!hasOwnProp(this, '_monthsShortRegex')) {\n this._monthsShortRegex = defaultMonthsShortRegex;\n }\n\n return this._monthsShortStrictRegex && isStrict ? this._monthsShortStrictRegex : this._monthsShortRegex;\n }\n }\n\n var defaultMonthsRegex = matchWord;\n\n function monthsRegex(isStrict) {\n if (this._monthsParseExact) {\n if (!hasOwnProp(this, '_monthsRegex')) {\n computeMonthsParse.call(this);\n }\n\n if (isStrict) {\n return this._monthsStrictRegex;\n } else {\n return this._monthsRegex;\n }\n } else {\n if (!hasOwnProp(this, '_monthsRegex')) {\n this._monthsRegex = defaultMonthsRegex;\n }\n\n return this._monthsStrictRegex && isStrict ? this._monthsStrictRegex : this._monthsRegex;\n }\n }\n\n function computeMonthsParse() {\n function cmpLenRev(a, b) {\n return b.length - a.length;\n }\n\n var shortPieces = [],\n longPieces = [],\n mixedPieces = [],\n i,\n mom;\n\n for (i = 0; i < 12; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, i]);\n shortPieces.push(this.monthsShort(mom, ''));\n longPieces.push(this.months(mom, ''));\n mixedPieces.push(this.months(mom, ''));\n mixedPieces.push(this.monthsShort(mom, ''));\n } // Sorting makes sure if one month (or abbr) is a prefix of another it\n // will match the longer piece.\n\n\n shortPieces.sort(cmpLenRev);\n longPieces.sort(cmpLenRev);\n mixedPieces.sort(cmpLenRev);\n\n for (i = 0; i < 12; i++) {\n shortPieces[i] = regexEscape(shortPieces[i]);\n longPieces[i] = regexEscape(longPieces[i]);\n }\n\n for (i = 0; i < 24; i++) {\n mixedPieces[i] = regexEscape(mixedPieces[i]);\n }\n\n this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._monthsShortRegex = this._monthsRegex;\n this._monthsStrictRegex = new RegExp('^(' + longPieces.join('|') + ')', 'i');\n this._monthsShortStrictRegex = new RegExp('^(' + shortPieces.join('|') + ')', 'i');\n }\n\n function createDate(y, m, d, h, M, s, ms) {\n // can't just apply() to create a date:\n // https://stackoverflow.com/q/181348\n var date; // the date constructor remaps years 0-99 to 1900-1999\n\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n date = new Date(y + 400, m, d, h, M, s, ms);\n\n if (isFinite(date.getFullYear())) {\n date.setFullYear(y);\n }\n } else {\n date = new Date(y, m, d, h, M, s, ms);\n }\n\n return date;\n }\n\n function createUTCDate(y) {\n var date; // the Date.UTC function remaps years 0-99 to 1900-1999\n\n if (y < 100 && y >= 0) {\n var args = Array.prototype.slice.call(arguments); // preserve leap years using a full 400 year cycle, then reset\n\n args[0] = y + 400;\n date = new Date(Date.UTC.apply(null, args));\n\n if (isFinite(date.getUTCFullYear())) {\n date.setUTCFullYear(y);\n }\n } else {\n date = new Date(Date.UTC.apply(null, arguments));\n }\n\n return date;\n } // start-of-first-week - start-of-year\n\n\n function firstWeekOffset(year, dow, doy) {\n var // first-week day -- which january is always in the first week (4 for iso, 1 for other)\n fwd = 7 + dow - doy,\n // first-week day local weekday -- which local weekday is fwd\n fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7;\n return -fwdlw + fwd - 1;\n } // https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday\n\n\n function dayOfYearFromWeeks(year, week, weekday, dow, doy) {\n var localWeekday = (7 + weekday - dow) % 7,\n weekOffset = firstWeekOffset(year, dow, doy),\n dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset,\n resYear,\n resDayOfYear;\n\n if (dayOfYear <= 0) {\n resYear = year - 1;\n resDayOfYear = daysInYear(resYear) + dayOfYear;\n } else if (dayOfYear > daysInYear(year)) {\n resYear = year + 1;\n resDayOfYear = dayOfYear - daysInYear(year);\n } else {\n resYear = year;\n resDayOfYear = dayOfYear;\n }\n\n return {\n year: resYear,\n dayOfYear: resDayOfYear\n };\n }\n\n function weekOfYear(mom, dow, doy) {\n var weekOffset = firstWeekOffset(mom.year(), dow, doy),\n week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1,\n resWeek,\n resYear;\n\n if (week < 1) {\n resYear = mom.year() - 1;\n resWeek = week + weeksInYear(resYear, dow, doy);\n } else if (week > weeksInYear(mom.year(), dow, doy)) {\n resWeek = week - weeksInYear(mom.year(), dow, doy);\n resYear = mom.year() + 1;\n } else {\n resYear = mom.year();\n resWeek = week;\n }\n\n return {\n week: resWeek,\n year: resYear\n };\n }\n\n function weeksInYear(year, dow, doy) {\n var weekOffset = firstWeekOffset(year, dow, doy),\n weekOffsetNext = firstWeekOffset(year + 1, dow, doy);\n return (daysInYear(year) - weekOffset + weekOffsetNext) / 7;\n } // FORMATTING\n\n\n addFormatToken('w', ['ww', 2], 'wo', 'week');\n addFormatToken('W', ['WW', 2], 'Wo', 'isoWeek'); // ALIASES\n\n addUnitAlias('week', 'w');\n addUnitAlias('isoWeek', 'W'); // PRIORITIES\n\n addUnitPriority('week', 5);\n addUnitPriority('isoWeek', 5); // PARSING\n\n addRegexToken('w', match1to2);\n addRegexToken('ww', match1to2, match2);\n addRegexToken('W', match1to2);\n addRegexToken('WW', match1to2, match2);\n addWeekParseToken(['w', 'ww', 'W', 'WW'], function (input, week, config, token) {\n week[token.substr(0, 1)] = toInt(input);\n }); // HELPERS\n // LOCALES\n\n function localeWeek(mom) {\n return weekOfYear(mom, this._week.dow, this._week.doy).week;\n }\n\n var defaultLocaleWeek = {\n dow: 0,\n // Sunday is the first day of the week.\n doy: 6 // The week that contains Jan 6th is the first week of the year.\n\n };\n\n function localeFirstDayOfWeek() {\n return this._week.dow;\n }\n\n function localeFirstDayOfYear() {\n return this._week.doy;\n } // MOMENTS\n\n\n function getSetWeek(input) {\n var week = this.localeData().week(this);\n return input == null ? week : this.add((input - week) * 7, 'd');\n }\n\n function getSetISOWeek(input) {\n var week = weekOfYear(this, 1, 4).week;\n return input == null ? week : this.add((input - week) * 7, 'd');\n } // FORMATTING\n\n\n addFormatToken('d', 0, 'do', 'day');\n addFormatToken('dd', 0, 0, function (format) {\n return this.localeData().weekdaysMin(this, format);\n });\n addFormatToken('ddd', 0, 0, function (format) {\n return this.localeData().weekdaysShort(this, format);\n });\n addFormatToken('dddd', 0, 0, function (format) {\n return this.localeData().weekdays(this, format);\n });\n addFormatToken('e', 0, 0, 'weekday');\n addFormatToken('E', 0, 0, 'isoWeekday'); // ALIASES\n\n addUnitAlias('day', 'd');\n addUnitAlias('weekday', 'e');\n addUnitAlias('isoWeekday', 'E'); // PRIORITY\n\n addUnitPriority('day', 11);\n addUnitPriority('weekday', 11);\n addUnitPriority('isoWeekday', 11); // PARSING\n\n addRegexToken('d', match1to2);\n addRegexToken('e', match1to2);\n addRegexToken('E', match1to2);\n addRegexToken('dd', function (isStrict, locale) {\n return locale.weekdaysMinRegex(isStrict);\n });\n addRegexToken('ddd', function (isStrict, locale) {\n return locale.weekdaysShortRegex(isStrict);\n });\n addRegexToken('dddd', function (isStrict, locale) {\n return locale.weekdaysRegex(isStrict);\n });\n addWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) {\n var weekday = config._locale.weekdaysParse(input, token, config._strict); // if we didn't get a weekday name, mark the date as invalid\n\n\n if (weekday != null) {\n week.d = weekday;\n } else {\n getParsingFlags(config).invalidWeekday = input;\n }\n });\n addWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) {\n week[token] = toInt(input);\n }); // HELPERS\n\n function parseWeekday(input, locale) {\n if (typeof input !== 'string') {\n return input;\n }\n\n if (!isNaN(input)) {\n return parseInt(input, 10);\n }\n\n input = locale.weekdaysParse(input);\n\n if (typeof input === 'number') {\n return input;\n }\n\n return null;\n }\n\n function parseIsoWeekday(input, locale) {\n if (typeof input === 'string') {\n return locale.weekdaysParse(input) % 7 || 7;\n }\n\n return isNaN(input) ? null : input;\n } // LOCALES\n\n\n function shiftWeekdays(ws, n) {\n return ws.slice(n, 7).concat(ws.slice(0, n));\n }\n\n var defaultLocaleWeekdays = 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_');\n\n function localeWeekdays(m, format) {\n var weekdays = isArray(this._weekdays) ? this._weekdays : this._weekdays[m && m !== true && this._weekdays.isFormat.test(format) ? 'format' : 'standalone'];\n return m === true ? shiftWeekdays(weekdays, this._week.dow) : m ? weekdays[m.day()] : weekdays;\n }\n\n var defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_');\n\n function localeWeekdaysShort(m) {\n return m === true ? shiftWeekdays(this._weekdaysShort, this._week.dow) : m ? this._weekdaysShort[m.day()] : this._weekdaysShort;\n }\n\n var defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_');\n\n function localeWeekdaysMin(m) {\n return m === true ? shiftWeekdays(this._weekdaysMin, this._week.dow) : m ? this._weekdaysMin[m.day()] : this._weekdaysMin;\n }\n\n function handleStrictParse$1(weekdayName, format, strict) {\n var i,\n ii,\n mom,\n llc = weekdayName.toLocaleLowerCase();\n\n if (!this._weekdaysParse) {\n this._weekdaysParse = [];\n this._shortWeekdaysParse = [];\n this._minWeekdaysParse = [];\n\n for (i = 0; i < 7; ++i) {\n mom = createUTC([2000, 1]).day(i);\n this._minWeekdaysParse[i] = this.weekdaysMin(mom, '').toLocaleLowerCase();\n this._shortWeekdaysParse[i] = this.weekdaysShort(mom, '').toLocaleLowerCase();\n this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase();\n }\n }\n\n if (strict) {\n if (format === 'dddd') {\n ii = indexOf.call(this._weekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else if (format === 'ddd') {\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n }\n } else {\n if (format === 'dddd') {\n ii = indexOf.call(this._weekdaysParse, llc);\n\n if (ii !== -1) {\n return ii;\n }\n\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n\n if (ii !== -1) {\n return ii;\n }\n\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else if (format === 'ddd') {\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n\n if (ii !== -1) {\n return ii;\n }\n\n ii = indexOf.call(this._weekdaysParse, llc);\n\n if (ii !== -1) {\n return ii;\n }\n\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._minWeekdaysParse, llc);\n\n if (ii !== -1) {\n return ii;\n }\n\n ii = indexOf.call(this._weekdaysParse, llc);\n\n if (ii !== -1) {\n return ii;\n }\n\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n }\n }\n }\n\n function localeWeekdaysParse(weekdayName, format, strict) {\n var i, mom, regex;\n\n if (this._weekdaysParseExact) {\n return handleStrictParse$1.call(this, weekdayName, format, strict);\n }\n\n if (!this._weekdaysParse) {\n this._weekdaysParse = [];\n this._minWeekdaysParse = [];\n this._shortWeekdaysParse = [];\n this._fullWeekdaysParse = [];\n }\n\n for (i = 0; i < 7; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, 1]).day(i);\n\n if (strict && !this._fullWeekdaysParse[i]) {\n this._fullWeekdaysParse[i] = new RegExp('^' + this.weekdays(mom, '').replace('.', '\\\\.?') + '$', 'i');\n this._shortWeekdaysParse[i] = new RegExp('^' + this.weekdaysShort(mom, '').replace('.', '\\\\.?') + '$', 'i');\n this._minWeekdaysParse[i] = new RegExp('^' + this.weekdaysMin(mom, '').replace('.', '\\\\.?') + '$', 'i');\n }\n\n if (!this._weekdaysParse[i]) {\n regex = '^' + this.weekdays(mom, '') + '|^' + this.weekdaysShort(mom, '') + '|^' + this.weekdaysMin(mom, '');\n this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i');\n } // test the regex\n\n\n if (strict && format === 'dddd' && this._fullWeekdaysParse[i].test(weekdayName)) {\n return i;\n } else if (strict && format === 'ddd' && this._shortWeekdaysParse[i].test(weekdayName)) {\n return i;\n } else if (strict && format === 'dd' && this._minWeekdaysParse[i].test(weekdayName)) {\n return i;\n } else if (!strict && this._weekdaysParse[i].test(weekdayName)) {\n return i;\n }\n }\n } // MOMENTS\n\n\n function getSetDayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n\n var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay();\n\n if (input != null) {\n input = parseWeekday(input, this.localeData());\n return this.add(input - day, 'd');\n } else {\n return day;\n }\n }\n\n function getSetLocaleDayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n\n var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7;\n return input == null ? weekday : this.add(input - weekday, 'd');\n }\n\n function getSetISODayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n } // behaves the same as moment#day except\n // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)\n // as a setter, sunday should belong to the previous week.\n\n\n if (input != null) {\n var weekday = parseIsoWeekday(input, this.localeData());\n return this.day(this.day() % 7 ? weekday : weekday - 7);\n } else {\n return this.day() || 7;\n }\n }\n\n var defaultWeekdaysRegex = matchWord;\n\n function weekdaysRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n\n if (isStrict) {\n return this._weekdaysStrictRegex;\n } else {\n return this._weekdaysRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n this._weekdaysRegex = defaultWeekdaysRegex;\n }\n\n return this._weekdaysStrictRegex && isStrict ? this._weekdaysStrictRegex : this._weekdaysRegex;\n }\n }\n\n var defaultWeekdaysShortRegex = matchWord;\n\n function weekdaysShortRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n\n if (isStrict) {\n return this._weekdaysShortStrictRegex;\n } else {\n return this._weekdaysShortRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysShortRegex')) {\n this._weekdaysShortRegex = defaultWeekdaysShortRegex;\n }\n\n return this._weekdaysShortStrictRegex && isStrict ? this._weekdaysShortStrictRegex : this._weekdaysShortRegex;\n }\n }\n\n var defaultWeekdaysMinRegex = matchWord;\n\n function weekdaysMinRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n\n if (isStrict) {\n return this._weekdaysMinStrictRegex;\n } else {\n return this._weekdaysMinRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysMinRegex')) {\n this._weekdaysMinRegex = defaultWeekdaysMinRegex;\n }\n\n return this._weekdaysMinStrictRegex && isStrict ? this._weekdaysMinStrictRegex : this._weekdaysMinRegex;\n }\n }\n\n function computeWeekdaysParse() {\n function cmpLenRev(a, b) {\n return b.length - a.length;\n }\n\n var minPieces = [],\n shortPieces = [],\n longPieces = [],\n mixedPieces = [],\n i,\n mom,\n minp,\n shortp,\n longp;\n\n for (i = 0; i < 7; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, 1]).day(i);\n minp = this.weekdaysMin(mom, '');\n shortp = this.weekdaysShort(mom, '');\n longp = this.weekdays(mom, '');\n minPieces.push(minp);\n shortPieces.push(shortp);\n longPieces.push(longp);\n mixedPieces.push(minp);\n mixedPieces.push(shortp);\n mixedPieces.push(longp);\n } // Sorting makes sure if one weekday (or abbr) is a prefix of another it\n // will match the longer piece.\n\n\n minPieces.sort(cmpLenRev);\n shortPieces.sort(cmpLenRev);\n longPieces.sort(cmpLenRev);\n mixedPieces.sort(cmpLenRev);\n\n for (i = 0; i < 7; i++) {\n shortPieces[i] = regexEscape(shortPieces[i]);\n longPieces[i] = regexEscape(longPieces[i]);\n mixedPieces[i] = regexEscape(mixedPieces[i]);\n }\n\n this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._weekdaysShortRegex = this._weekdaysRegex;\n this._weekdaysMinRegex = this._weekdaysRegex;\n this._weekdaysStrictRegex = new RegExp('^(' + longPieces.join('|') + ')', 'i');\n this._weekdaysShortStrictRegex = new RegExp('^(' + shortPieces.join('|') + ')', 'i');\n this._weekdaysMinStrictRegex = new RegExp('^(' + minPieces.join('|') + ')', 'i');\n } // FORMATTING\n\n\n function hFormat() {\n return this.hours() % 12 || 12;\n }\n\n function kFormat() {\n return this.hours() || 24;\n }\n\n addFormatToken('H', ['HH', 2], 0, 'hour');\n addFormatToken('h', ['hh', 2], 0, hFormat);\n addFormatToken('k', ['kk', 2], 0, kFormat);\n addFormatToken('hmm', 0, 0, function () {\n return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2);\n });\n addFormatToken('hmmss', 0, 0, function () {\n return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2) + zeroFill(this.seconds(), 2);\n });\n addFormatToken('Hmm', 0, 0, function () {\n return '' + this.hours() + zeroFill(this.minutes(), 2);\n });\n addFormatToken('Hmmss', 0, 0, function () {\n return '' + this.hours() + zeroFill(this.minutes(), 2) + zeroFill(this.seconds(), 2);\n });\n\n function meridiem(token, lowercase) {\n addFormatToken(token, 0, 0, function () {\n return this.localeData().meridiem(this.hours(), this.minutes(), lowercase);\n });\n }\n\n meridiem('a', true);\n meridiem('A', false); // ALIASES\n\n addUnitAlias('hour', 'h'); // PRIORITY\n\n addUnitPriority('hour', 13); // PARSING\n\n function matchMeridiem(isStrict, locale) {\n return locale._meridiemParse;\n }\n\n addRegexToken('a', matchMeridiem);\n addRegexToken('A', matchMeridiem);\n addRegexToken('H', match1to2);\n addRegexToken('h', match1to2);\n addRegexToken('k', match1to2);\n addRegexToken('HH', match1to2, match2);\n addRegexToken('hh', match1to2, match2);\n addRegexToken('kk', match1to2, match2);\n addRegexToken('hmm', match3to4);\n addRegexToken('hmmss', match5to6);\n addRegexToken('Hmm', match3to4);\n addRegexToken('Hmmss', match5to6);\n addParseToken(['H', 'HH'], HOUR);\n addParseToken(['k', 'kk'], function (input, array, config) {\n var kInput = toInt(input);\n array[HOUR] = kInput === 24 ? 0 : kInput;\n });\n addParseToken(['a', 'A'], function (input, array, config) {\n config._isPm = config._locale.isPM(input);\n config._meridiem = input;\n });\n addParseToken(['h', 'hh'], function (input, array, config) {\n array[HOUR] = toInt(input);\n getParsingFlags(config).bigHour = true;\n });\n addParseToken('hmm', function (input, array, config) {\n var pos = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos));\n array[MINUTE] = toInt(input.substr(pos));\n getParsingFlags(config).bigHour = true;\n });\n addParseToken('hmmss', function (input, array, config) {\n var pos1 = input.length - 4;\n var pos2 = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos1));\n array[MINUTE] = toInt(input.substr(pos1, 2));\n array[SECOND] = toInt(input.substr(pos2));\n getParsingFlags(config).bigHour = true;\n });\n addParseToken('Hmm', function (input, array, config) {\n var pos = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos));\n array[MINUTE] = toInt(input.substr(pos));\n });\n addParseToken('Hmmss', function (input, array, config) {\n var pos1 = input.length - 4;\n var pos2 = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos1));\n array[MINUTE] = toInt(input.substr(pos1, 2));\n array[SECOND] = toInt(input.substr(pos2));\n }); // LOCALES\n\n function localeIsPM(input) {\n // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays\n // Using charAt should be more compatible.\n return (input + '').toLowerCase().charAt(0) === 'p';\n }\n\n var defaultLocaleMeridiemParse = /[ap]\\.?m?\\.?/i;\n\n function localeMeridiem(hours, minutes, isLower) {\n if (hours > 11) {\n return isLower ? 'pm' : 'PM';\n } else {\n return isLower ? 'am' : 'AM';\n }\n } // MOMENTS\n // Setting the hour should keep the time, because the user explicitly\n // specified which hour they want. So trying to maintain the same hour (in\n // a new timezone) makes sense. Adding/subtracting hours does not follow\n // this rule.\n\n\n var getSetHour = makeGetSet('Hours', true);\n var baseConfig = {\n calendar: defaultCalendar,\n longDateFormat: defaultLongDateFormat,\n invalidDate: defaultInvalidDate,\n ordinal: defaultOrdinal,\n dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse,\n relativeTime: defaultRelativeTime,\n months: defaultLocaleMonths,\n monthsShort: defaultLocaleMonthsShort,\n week: defaultLocaleWeek,\n weekdays: defaultLocaleWeekdays,\n weekdaysMin: defaultLocaleWeekdaysMin,\n weekdaysShort: defaultLocaleWeekdaysShort,\n meridiemParse: defaultLocaleMeridiemParse\n }; // internal storage for locale config files\n\n var locales = {};\n var localeFamilies = {};\n var globalLocale;\n\n function normalizeLocale(key) {\n return key ? key.toLowerCase().replace('_', '-') : key;\n } // pick the locale from the array\n // try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each\n // substring from most specific to least, but move to the next array item if it's a more specific variant than the current root\n\n\n function chooseLocale(names) {\n var i = 0,\n j,\n next,\n locale,\n split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n\n if (locale) {\n return locale;\n }\n\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n\n j--;\n }\n\n i++;\n }\n\n return globalLocale;\n }\n\n function loadLocale(name) {\n var oldLocale = null; // TODO: Find a better way to register and load all the locales in Node\n\n if (!locales[name] && 'object' !== 'undefined' && module && module.exports) {\n try {\n oldLocale = globalLocale._abbr;\n var aliasedRequire = commonjsRequire;\n aliasedRequire('./locale/' + name);\n getSetGlobalLocale(oldLocale);\n } catch (e) {}\n }\n\n return locales[name];\n } // This function will load locale and then set the global locale. If\n // no arguments are passed in, it will simply return the current global\n // locale key.\n\n\n function getSetGlobalLocale(key, values) {\n var data;\n\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n } else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n } else {\n if (typeof console !== 'undefined' && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n }\n\n function defineLocale(name, config) {\n if (config !== null) {\n var locale,\n parentConfig = baseConfig;\n config.abbr = name;\n\n if (locales[name] != null) {\n deprecateSimple('defineLocaleOverride', 'use moment.updateLocale(localeName, config) to change ' + 'an existing locale. moment.defineLocale(localeName, ' + 'config) should only be used for creating a new locale ' + 'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.');\n parentConfig = locales[name]._config;\n } else if (config.parentLocale != null) {\n if (locales[config.parentLocale] != null) {\n parentConfig = locales[config.parentLocale]._config;\n } else {\n locale = loadLocale(config.parentLocale);\n\n if (locale != null) {\n parentConfig = locale._config;\n } else {\n if (!localeFamilies[config.parentLocale]) {\n localeFamilies[config.parentLocale] = [];\n }\n\n localeFamilies[config.parentLocale].push({\n name: name,\n config: config\n });\n return null;\n }\n }\n }\n\n locales[name] = new Locale(mergeConfigs(parentConfig, config));\n\n if (localeFamilies[name]) {\n localeFamilies[name].forEach(function (x) {\n defineLocale(x.name, x.config);\n });\n } // backwards compat for now: also set the locale\n // make sure we set the locale AFTER all child locales have been\n // created, so we won't end up with the child locale set.\n\n\n getSetGlobalLocale(name);\n return locales[name];\n } else {\n // useful for testing\n delete locales[name];\n return null;\n }\n }\n\n function updateLocale(name, config) {\n if (config != null) {\n var locale,\n tmpLocale,\n parentConfig = baseConfig; // MERGE\n\n tmpLocale = loadLocale(name);\n\n if (tmpLocale != null) {\n parentConfig = tmpLocale._config;\n }\n\n config = mergeConfigs(parentConfig, config);\n locale = new Locale(config);\n locale.parentLocale = locales[name];\n locales[name] = locale; // backwards compat for now: also set the locale\n\n getSetGlobalLocale(name);\n } else {\n // pass null for config to unupdate, useful for tests\n if (locales[name] != null) {\n if (locales[name].parentLocale != null) {\n locales[name] = locales[name].parentLocale;\n } else if (locales[name] != null) {\n delete locales[name];\n }\n }\n }\n\n return locales[name];\n } // returns locale data\n\n\n function getLocale(key) {\n var locale;\n\n if (key && key._locale && key._locale._abbr) {\n key = key._locale._abbr;\n }\n\n if (!key) {\n return globalLocale;\n }\n\n if (!isArray(key)) {\n //short-circuit everything else\n locale = loadLocale(key);\n\n if (locale) {\n return locale;\n }\n\n key = [key];\n }\n\n return chooseLocale(key);\n }\n\n function listLocales() {\n return keys(locales);\n }\n\n function checkOverflow(m) {\n var overflow;\n var a = m._a;\n\n if (a && getParsingFlags(m).overflow === -2) {\n overflow = a[MONTH] < 0 || a[MONTH] > 11 ? MONTH : a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH]) ? DATE : a[HOUR] < 0 || a[HOUR] > 24 || a[HOUR] === 24 && (a[MINUTE] !== 0 || a[SECOND] !== 0 || a[MILLISECOND] !== 0) ? HOUR : a[MINUTE] < 0 || a[MINUTE] > 59 ? MINUTE : a[SECOND] < 0 || a[SECOND] > 59 ? SECOND : a[MILLISECOND] < 0 || a[MILLISECOND] > 999 ? MILLISECOND : -1;\n\n if (getParsingFlags(m)._overflowDayOfYear && (overflow < YEAR || overflow > DATE)) {\n overflow = DATE;\n }\n\n if (getParsingFlags(m)._overflowWeeks && overflow === -1) {\n overflow = WEEK;\n }\n\n if (getParsingFlags(m)._overflowWeekday && overflow === -1) {\n overflow = WEEKDAY;\n }\n\n getParsingFlags(m).overflow = overflow;\n }\n\n return m;\n } // Pick the first defined of two or three arguments.\n\n\n function defaults(a, b, c) {\n if (a != null) {\n return a;\n }\n\n if (b != null) {\n return b;\n }\n\n return c;\n }\n\n function currentDateArray(config) {\n // hooks is actually the exported moment object\n var nowValue = new Date(hooks.now());\n\n if (config._useUTC) {\n return [nowValue.getUTCFullYear(), nowValue.getUTCMonth(), nowValue.getUTCDate()];\n }\n\n return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()];\n } // convert an array to a date.\n // the array should mirror the parameters below\n // note: all values past the year are optional and will default to the lowest possible value.\n // [year, month, day , hour, minute, second, millisecond]\n\n\n function configFromArray(config) {\n var i,\n date,\n input = [],\n currentDate,\n expectedWeekday,\n yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config); //compute day of the year from weeks and weekdays\n\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n } //if the day of the year is set, figure out what it is\n\n\n if (config._dayOfYear != null) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse) || config._dayOfYear === 0) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n } // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n\n\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n } // Zero out whatever was not defaulted, including time\n\n\n for (; i < 7; i++) {\n config._a[i] = input[i] = config._a[i] == null ? i === 2 ? 1 : 0 : config._a[i];\n } // Check for 24:00:00.000\n\n\n if (config._a[HOUR] === 24 && config._a[MINUTE] === 0 && config._a[SECOND] === 0 && config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n expectedWeekday = config._useUTC ? config._d.getUTCDay() : config._d.getDay(); // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n } // check for mismatching day of week\n\n\n if (config._w && typeof config._w.d !== 'undefined' && config._w.d !== expectedWeekday) {\n getParsingFlags(config).weekdayMismatch = true;\n }\n }\n\n function dayOfYearFromWeekInfo(config) {\n var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow;\n w = config._w;\n\n if (w.GG != null || w.W != null || w.E != null) {\n dow = 1;\n doy = 4; // TODO: We need to take the current isoWeekYear, but that depends on\n // how we interpret now (local, utc, fixed offset). So create\n // a now version of current config (take local/utc/offset flags, and\n // create now).\n\n weekYear = defaults(w.GG, config._a[YEAR], weekOfYear(createLocal(), 1, 4).year);\n week = defaults(w.W, 1);\n weekday = defaults(w.E, 1);\n\n if (weekday < 1 || weekday > 7) {\n weekdayOverflow = true;\n }\n } else {\n dow = config._locale._week.dow;\n doy = config._locale._week.doy;\n var curWeek = weekOfYear(createLocal(), dow, doy);\n weekYear = defaults(w.gg, config._a[YEAR], curWeek.year); // Default to current week.\n\n week = defaults(w.w, curWeek.week);\n\n if (w.d != null) {\n // weekday -- low day numbers are considered next week\n weekday = w.d;\n\n if (weekday < 0 || weekday > 6) {\n weekdayOverflow = true;\n }\n } else if (w.e != null) {\n // local weekday -- counting starts from beginning of week\n weekday = w.e + dow;\n\n if (w.e < 0 || w.e > 6) {\n weekdayOverflow = true;\n }\n } else {\n // default to beginning of week\n weekday = dow;\n }\n }\n\n if (week < 1 || week > weeksInYear(weekYear, dow, doy)) {\n getParsingFlags(config)._overflowWeeks = true;\n } else if (weekdayOverflow != null) {\n getParsingFlags(config)._overflowWeekday = true;\n } else {\n temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy);\n config._a[YEAR] = temp.year;\n config._dayOfYear = temp.dayOfYear;\n }\n } // iso 8601 regex\n // 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00)\n\n\n var extendedIsoRegex = /^\\s*((?:[+-]\\d{6}|\\d{4})-(?:\\d\\d-\\d\\d|W\\d\\d-\\d|W\\d\\d|\\d\\d\\d|\\d\\d))(?:(T| )(\\d\\d(?::\\d\\d(?::\\d\\d(?:[.,]\\d+)?)?)?)([\\+\\-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/;\n var basicIsoRegex = /^\\s*((?:[+-]\\d{6}|\\d{4})(?:\\d\\d\\d\\d|W\\d\\d\\d|W\\d\\d|\\d\\d\\d|\\d\\d))(?:(T| )(\\d\\d(?:\\d\\d(?:\\d\\d(?:[.,]\\d+)?)?)?)([\\+\\-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/;\n var tzRegex = /Z|[+-]\\d\\d(?::?\\d\\d)?/;\n var isoDates = [['YYYYYY-MM-DD', /[+-]\\d{6}-\\d\\d-\\d\\d/], ['YYYY-MM-DD', /\\d{4}-\\d\\d-\\d\\d/], ['GGGG-[W]WW-E', /\\d{4}-W\\d\\d-\\d/], ['GGGG-[W]WW', /\\d{4}-W\\d\\d/, false], ['YYYY-DDD', /\\d{4}-\\d{3}/], ['YYYY-MM', /\\d{4}-\\d\\d/, false], ['YYYYYYMMDD', /[+-]\\d{10}/], ['YYYYMMDD', /\\d{8}/], // YYYYMM is NOT allowed by the standard\n ['GGGG[W]WWE', /\\d{4}W\\d{3}/], ['GGGG[W]WW', /\\d{4}W\\d{2}/, false], ['YYYYDDD', /\\d{7}/]]; // iso time formats and regexes\n\n var isoTimes = [['HH:mm:ss.SSSS', /\\d\\d:\\d\\d:\\d\\d\\.\\d+/], ['HH:mm:ss,SSSS', /\\d\\d:\\d\\d:\\d\\d,\\d+/], ['HH:mm:ss', /\\d\\d:\\d\\d:\\d\\d/], ['HH:mm', /\\d\\d:\\d\\d/], ['HHmmss.SSSS', /\\d\\d\\d\\d\\d\\d\\.\\d+/], ['HHmmss,SSSS', /\\d\\d\\d\\d\\d\\d,\\d+/], ['HHmmss', /\\d\\d\\d\\d\\d\\d/], ['HHmm', /\\d\\d\\d\\d/], ['HH', /\\d\\d/]];\n var aspNetJsonRegex = /^\\/?Date\\((\\-?\\d+)/i; // date from iso format\n\n function configFromISO(config) {\n var i,\n l,\n string = config._i,\n match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string),\n allowTime,\n dateFormat,\n timeFormat,\n tzFormat;\n\n if (match) {\n getParsingFlags(config).iso = true;\n\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(match[1])) {\n dateFormat = isoDates[i][0];\n allowTime = isoDates[i][2] !== false;\n break;\n }\n }\n\n if (dateFormat == null) {\n config._isValid = false;\n return;\n }\n\n if (match[3]) {\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(match[3])) {\n // match[2] should be 'T' or space\n timeFormat = (match[2] || ' ') + isoTimes[i][0];\n break;\n }\n }\n\n if (timeFormat == null) {\n config._isValid = false;\n return;\n }\n }\n\n if (!allowTime && timeFormat != null) {\n config._isValid = false;\n return;\n }\n\n if (match[4]) {\n if (tzRegex.exec(match[4])) {\n tzFormat = 'Z';\n } else {\n config._isValid = false;\n return;\n }\n }\n\n config._f = dateFormat + (timeFormat || '') + (tzFormat || '');\n configFromStringAndFormat(config);\n } else {\n config._isValid = false;\n }\n } // RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3\n\n\n var rfc2822 = /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\\s)?(\\d{1,2})\\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\\s(\\d{2,4})\\s(\\d\\d):(\\d\\d)(?::(\\d\\d))?\\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\\d{4}))$/;\n\n function extractFromRFC2822Strings(yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr) {\n var result = [untruncateYear(yearStr), defaultLocaleMonthsShort.indexOf(monthStr), parseInt(dayStr, 10), parseInt(hourStr, 10), parseInt(minuteStr, 10)];\n\n if (secondStr) {\n result.push(parseInt(secondStr, 10));\n }\n\n return result;\n }\n\n function untruncateYear(yearStr) {\n var year = parseInt(yearStr, 10);\n\n if (year <= 49) {\n return 2000 + year;\n } else if (year <= 999) {\n return 1900 + year;\n }\n\n return year;\n }\n\n function preprocessRFC2822(s) {\n // Remove comments and folding whitespace and replace multiple-spaces with a single space\n return s.replace(/\\([^)]*\\)|[\\n\\t]/g, ' ').replace(/(\\s\\s+)/g, ' ').replace(/^\\s\\s*/, '').replace(/\\s\\s*$/, '');\n }\n\n function checkWeekday(weekdayStr, parsedInput, config) {\n if (weekdayStr) {\n // TODO: Replace the vanilla JS Date object with an indepentent day-of-week check.\n var weekdayProvided = defaultLocaleWeekdaysShort.indexOf(weekdayStr),\n weekdayActual = new Date(parsedInput[0], parsedInput[1], parsedInput[2]).getDay();\n\n if (weekdayProvided !== weekdayActual) {\n getParsingFlags(config).weekdayMismatch = true;\n config._isValid = false;\n return false;\n }\n }\n\n return true;\n }\n\n var obsOffsets = {\n UT: 0,\n GMT: 0,\n EDT: -4 * 60,\n EST: -5 * 60,\n CDT: -5 * 60,\n CST: -6 * 60,\n MDT: -6 * 60,\n MST: -7 * 60,\n PDT: -7 * 60,\n PST: -8 * 60\n };\n\n function calculateOffset(obsOffset, militaryOffset, numOffset) {\n if (obsOffset) {\n return obsOffsets[obsOffset];\n } else if (militaryOffset) {\n // the only allowed military tz is Z\n return 0;\n } else {\n var hm = parseInt(numOffset, 10);\n var m = hm % 100,\n h = (hm - m) / 100;\n return h * 60 + m;\n }\n } // date and time from ref 2822 format\n\n\n function configFromRFC2822(config) {\n var match = rfc2822.exec(preprocessRFC2822(config._i));\n\n if (match) {\n var parsedArray = extractFromRFC2822Strings(match[4], match[3], match[2], match[5], match[6], match[7]);\n\n if (!checkWeekday(match[1], parsedArray, config)) {\n return;\n }\n\n config._a = parsedArray;\n config._tzm = calculateOffset(match[8], match[9], match[10]);\n config._d = createUTCDate.apply(null, config._a);\n\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n\n getParsingFlags(config).rfc2822 = true;\n } else {\n config._isValid = false;\n }\n } // date from iso format or fallback\n\n\n function configFromString(config) {\n var matched = aspNetJsonRegex.exec(config._i);\n\n if (matched !== null) {\n config._d = new Date(+matched[1]);\n return;\n }\n\n configFromISO(config);\n\n if (config._isValid === false) {\n delete config._isValid;\n } else {\n return;\n }\n\n configFromRFC2822(config);\n\n if (config._isValid === false) {\n delete config._isValid;\n } else {\n return;\n } // Final attempt, use Input Fallback\n\n\n hooks.createFromInputFallback(config);\n }\n\n hooks.createFromInputFallback = deprecate('value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), ' + 'which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are ' + 'discouraged and will be removed in an upcoming major release. Please refer to ' + 'http://momentjs.com/guides/#/warnings/js-date/ for more info.', function (config) {\n config._d = new Date(config._i + (config._useUTC ? ' UTC' : ''));\n }); // constant that refers to the ISO standard\n\n hooks.ISO_8601 = function () {}; // constant that refers to the RFC 2822 form\n\n\n hooks.RFC_2822 = function () {}; // date from string and format string\n\n\n function configFromStringAndFormat(config) {\n // TODO: Move this to another part of the creation flow to prevent circular deps\n if (config._f === hooks.ISO_8601) {\n configFromISO(config);\n return;\n }\n\n if (config._f === hooks.RFC_2822) {\n configFromRFC2822(config);\n return;\n }\n\n config._a = [];\n getParsingFlags(config).empty = true; // This array is used to make a Date, either with `new Date` or `Date.UTC`\n\n var string = '' + config._i,\n i,\n parsedInput,\n tokens,\n token,\n skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0]; // console.log('token', token, 'parsedInput', parsedInput,\n // 'regex', getParseRegexForToken(token, config));\n\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n\n if (skipped.length > 0) {\n getParsingFlags(config).unusedInput.push(skipped);\n }\n\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n } // don't parse if it's not a known token\n\n\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n getParsingFlags(config).empty = false;\n } else {\n getParsingFlags(config).unusedTokens.push(token);\n }\n\n addTimeToArrayFromToken(token, parsedInput, config);\n } else if (config._strict && !parsedInput) {\n getParsingFlags(config).unusedTokens.push(token);\n }\n } // add remaining unparsed input length to the string\n\n\n getParsingFlags(config).charsLeftOver = stringLength - totalParsedInputLength;\n\n if (string.length > 0) {\n getParsingFlags(config).unusedInput.push(string);\n } // clear _12h flag if hour is <= 12\n\n\n if (config._a[HOUR] <= 12 && getParsingFlags(config).bigHour === true && config._a[HOUR] > 0) {\n getParsingFlags(config).bigHour = undefined;\n }\n\n getParsingFlags(config).parsedDateParts = config._a.slice(0);\n getParsingFlags(config).meridiem = config._meridiem; // handle meridiem\n\n config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR], config._meridiem);\n configFromArray(config);\n checkOverflow(config);\n }\n\n function meridiemFixWrap(locale, hour, meridiem) {\n var isPm;\n\n if (meridiem == null) {\n // nothing to do\n return hour;\n }\n\n if (locale.meridiemHour != null) {\n return locale.meridiemHour(hour, meridiem);\n } else if (locale.isPM != null) {\n // Fallback\n isPm = locale.isPM(meridiem);\n\n if (isPm && hour < 12) {\n hour += 12;\n }\n\n if (!isPm && hour === 12) {\n hour = 0;\n }\n\n return hour;\n } else {\n // this is not supposed to happen\n return hour;\n }\n } // date from string and array of format strings\n\n\n function configFromStringAndArray(config) {\n var tempConfig, bestMoment, scoreToBeat, i, currentScore;\n\n if (config._f.length === 0) {\n getParsingFlags(config).invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < config._f.length; i++) {\n currentScore = 0;\n tempConfig = copyConfig({}, config);\n\n if (config._useUTC != null) {\n tempConfig._useUTC = config._useUTC;\n }\n\n tempConfig._f = config._f[i];\n configFromStringAndFormat(tempConfig);\n\n if (!isValid(tempConfig)) {\n continue;\n } // if there is any input that was not parsed add a penalty for that format\n\n\n currentScore += getParsingFlags(tempConfig).charsLeftOver; //or tokens\n\n currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10;\n getParsingFlags(tempConfig).score = currentScore;\n\n if (scoreToBeat == null || currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n\n extend(config, bestMoment || tempConfig);\n }\n\n function configFromObject(config) {\n if (config._d) {\n return;\n }\n\n var i = normalizeObjectUnits(config._i);\n config._a = map([i.year, i.month, i.day || i.date, i.hour, i.minute, i.second, i.millisecond], function (obj) {\n return obj && parseInt(obj, 10);\n });\n configFromArray(config);\n }\n\n function createFromConfig(config) {\n var res = new Moment(checkOverflow(prepareConfig(config)));\n\n if (res._nextDay) {\n // Adding is smart enough around DST\n res.add(1, 'd');\n res._nextDay = undefined;\n }\n\n return res;\n }\n\n function prepareConfig(config) {\n var input = config._i,\n format = config._f;\n config._locale = config._locale || getLocale(config._l);\n\n if (input === null || format === undefined && input === '') {\n return createInvalid({\n nullInput: true\n });\n }\n\n if (typeof input === 'string') {\n config._i = input = config._locale.preparse(input);\n }\n\n if (isMoment(input)) {\n return new Moment(checkOverflow(input));\n } else if (isDate(input)) {\n config._d = input;\n } else if (isArray(format)) {\n configFromStringAndArray(config);\n } else if (format) {\n configFromStringAndFormat(config);\n } else {\n configFromInput(config);\n }\n\n if (!isValid(config)) {\n config._d = null;\n }\n\n return config;\n }\n\n function configFromInput(config) {\n var input = config._i;\n\n if (isUndefined(input)) {\n config._d = new Date(hooks.now());\n } else if (isDate(input)) {\n config._d = new Date(input.valueOf());\n } else if (typeof input === 'string') {\n configFromString(config);\n } else if (isArray(input)) {\n config._a = map(input.slice(0), function (obj) {\n return parseInt(obj, 10);\n });\n configFromArray(config);\n } else if (isObject(input)) {\n configFromObject(config);\n } else if (isNumber(input)) {\n // from milliseconds\n config._d = new Date(input);\n } else {\n hooks.createFromInputFallback(config);\n }\n }\n\n function createLocalOrUTC(input, format, locale, strict, isUTC) {\n var c = {};\n\n if (locale === true || locale === false) {\n strict = locale;\n locale = undefined;\n }\n\n if (isObject(input) && isObjectEmpty(input) || isArray(input) && input.length === 0) {\n input = undefined;\n } // object construction must be done this way.\n // https://github.com/moment/moment/issues/1423\n\n\n c._isAMomentObject = true;\n c._useUTC = c._isUTC = isUTC;\n c._l = locale;\n c._i = input;\n c._f = format;\n c._strict = strict;\n return createFromConfig(c);\n }\n\n function createLocal(input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, false);\n }\n\n var prototypeMin = deprecate('moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/', function () {\n var other = createLocal.apply(null, arguments);\n\n if (this.isValid() && other.isValid()) {\n return other < this ? this : other;\n } else {\n return createInvalid();\n }\n });\n var prototypeMax = deprecate('moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/', function () {\n var other = createLocal.apply(null, arguments);\n\n if (this.isValid() && other.isValid()) {\n return other > this ? this : other;\n } else {\n return createInvalid();\n }\n }); // Pick a moment m from moments so that m[fn](other) is true for all\n // other. This relies on the function fn to be transitive.\n //\n // moments should either be an array of moment objects or an array, whose\n // first element is an array of moment objects.\n\n function pickBy(fn, moments) {\n var res, i;\n\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n\n if (!moments.length) {\n return createLocal();\n }\n\n res = moments[0];\n\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n\n return res;\n } // TODO: Use [].sort instead?\n\n\n function min() {\n var args = [].slice.call(arguments, 0);\n return pickBy('isBefore', args);\n }\n\n function max() {\n var args = [].slice.call(arguments, 0);\n return pickBy('isAfter', args);\n }\n\n var now = function () {\n return Date.now ? Date.now() : +new Date();\n };\n\n var ordering = ['year', 'quarter', 'month', 'week', 'day', 'hour', 'minute', 'second', 'millisecond'];\n\n function isDurationValid(m) {\n for (var key in m) {\n if (!(indexOf.call(ordering, key) !== -1 && (m[key] == null || !isNaN(m[key])))) {\n return false;\n }\n }\n\n var unitHasDecimal = false;\n\n for (var i = 0; i < ordering.length; ++i) {\n if (m[ordering[i]]) {\n if (unitHasDecimal) {\n return false; // only allow non-integers for smallest unit\n }\n\n if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) {\n unitHasDecimal = true;\n }\n }\n }\n\n return true;\n }\n\n function isValid$1() {\n return this._isValid;\n }\n\n function createInvalid$1() {\n return createDuration(NaN);\n }\n\n function Duration(duration) {\n var normalizedInput = normalizeObjectUnits(duration),\n years = normalizedInput.year || 0,\n quarters = normalizedInput.quarter || 0,\n months = normalizedInput.month || 0,\n weeks = normalizedInput.week || normalizedInput.isoWeek || 0,\n days = normalizedInput.day || 0,\n hours = normalizedInput.hour || 0,\n minutes = normalizedInput.minute || 0,\n seconds = normalizedInput.second || 0,\n milliseconds = normalizedInput.millisecond || 0;\n this._isValid = isDurationValid(normalizedInput); // representation for dateAddRemove\n\n this._milliseconds = +milliseconds + seconds * 1e3 + // 1000\n minutes * 6e4 + // 1000 * 60\n hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978\n // Because of dateAddRemove treats 24 hours as different from a\n // day when working around DST, we need to store them separately\n\n this._days = +days + weeks * 7; // It is impossible to translate months into days without knowing\n // which months you are are talking about, so we have to store\n // it separately.\n\n this._months = +months + quarters * 3 + years * 12;\n this._data = {};\n this._locale = getLocale();\n\n this._bubble();\n }\n\n function isDuration(obj) {\n return obj instanceof Duration;\n }\n\n function absRound(number) {\n if (number < 0) {\n return Math.round(-1 * number) * -1;\n } else {\n return Math.round(number);\n }\n } // FORMATTING\n\n\n function offset(token, separator) {\n addFormatToken(token, 0, 0, function () {\n var offset = this.utcOffset();\n var sign = '+';\n\n if (offset < 0) {\n offset = -offset;\n sign = '-';\n }\n\n return sign + zeroFill(~~(offset / 60), 2) + separator + zeroFill(~~offset % 60, 2);\n });\n }\n\n offset('Z', ':');\n offset('ZZ', ''); // PARSING\n\n addRegexToken('Z', matchShortOffset);\n addRegexToken('ZZ', matchShortOffset);\n addParseToken(['Z', 'ZZ'], function (input, array, config) {\n config._useUTC = true;\n config._tzm = offsetFromString(matchShortOffset, input);\n }); // HELPERS\n // timezone chunker\n // '+10:00' > ['10', '00']\n // '-1530' > ['-15', '30']\n\n var chunkOffset = /([\\+\\-]|\\d\\d)/gi;\n\n function offsetFromString(matcher, string) {\n var matches = (string || '').match(matcher);\n\n if (matches === null) {\n return null;\n }\n\n var chunk = matches[matches.length - 1] || [];\n var parts = (chunk + '').match(chunkOffset) || ['-', 0, 0];\n var minutes = +(parts[1] * 60) + toInt(parts[2]);\n return minutes === 0 ? 0 : parts[0] === '+' ? minutes : -minutes;\n } // Return a moment from input, that is local/utc/zone equivalent to model.\n\n\n function cloneWithOffset(input, model) {\n var res, diff;\n\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? input.valueOf() : createLocal(input).valueOf()) - res.valueOf(); // Use low-level api, because this fn is low-level api.\n\n res._d.setTime(res._d.valueOf() + diff);\n\n hooks.updateOffset(res, false);\n return res;\n } else {\n return createLocal(input).local();\n }\n }\n\n function getDateOffset(m) {\n // On Firefox.24 Date#getTimezoneOffset returns a floating point.\n // https://github.com/moment/moment/pull/1871\n return -Math.round(m._d.getTimezoneOffset() / 15) * 15;\n } // HOOKS\n // This function will be called whenever a moment is mutated.\n // It is intended to keep the offset in sync with the timezone.\n\n\n hooks.updateOffset = function () {}; // MOMENTS\n // keepLocalTime = true means only change the timezone, without\n // affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]-->\n // 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset\n // +0200, so we adjust the time as needed, to be valid.\n //\n // Keeping the time actually adds/subtracts (one hour)\n // from the actual represented time. That is why we call updateOffset\n // a second time. In case it wants us to change the offset again\n // _changeInProgress == true case, then we have to adjust, because\n // there is no such time in the given timezone.\n\n\n function getSetOffset(input, keepLocalTime, keepMinutes) {\n var offset = this._offset || 0,\n localAdjust;\n\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n\n if (input === null) {\n return this;\n }\n } else if (Math.abs(input) < 16 && !keepMinutes) {\n input = input * 60;\n }\n\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n\n this._offset = input;\n this._isUTC = true;\n\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n addSubtract(this, createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }\n\n function getSetZone(input, keepLocalTime) {\n if (input != null) {\n if (typeof input !== 'string') {\n input = -input;\n }\n\n this.utcOffset(input, keepLocalTime);\n return this;\n } else {\n return -this.utcOffset();\n }\n }\n\n function setOffsetToUTC(keepLocalTime) {\n return this.utcOffset(0, keepLocalTime);\n }\n\n function setOffsetToLocal(keepLocalTime) {\n if (this._isUTC) {\n this.utcOffset(0, keepLocalTime);\n this._isUTC = false;\n\n if (keepLocalTime) {\n this.subtract(getDateOffset(this), 'm');\n }\n }\n\n return this;\n }\n\n function setOffsetToParsedOffset() {\n if (this._tzm != null) {\n this.utcOffset(this._tzm, false, true);\n } else if (typeof this._i === 'string') {\n var tZone = offsetFromString(matchOffset, this._i);\n\n if (tZone != null) {\n this.utcOffset(tZone);\n } else {\n this.utcOffset(0, true);\n }\n }\n\n return this;\n }\n\n function hasAlignedHourOffset(input) {\n if (!this.isValid()) {\n return false;\n }\n\n input = input ? createLocal(input).utcOffset() : 0;\n return (this.utcOffset() - input) % 60 === 0;\n }\n\n function isDaylightSavingTime() {\n return this.utcOffset() > this.clone().month(0).utcOffset() || this.utcOffset() > this.clone().month(5).utcOffset();\n }\n\n function isDaylightSavingTimeShifted() {\n if (!isUndefined(this._isDSTShifted)) {\n return this._isDSTShifted;\n }\n\n var c = {};\n copyConfig(c, this);\n c = prepareConfig(c);\n\n if (c._a) {\n var other = c._isUTC ? createUTC(c._a) : createLocal(c._a);\n this._isDSTShifted = this.isValid() && compareArrays(c._a, other.toArray()) > 0;\n } else {\n this._isDSTShifted = false;\n }\n\n return this._isDSTShifted;\n }\n\n function isLocal() {\n return this.isValid() ? !this._isUTC : false;\n }\n\n function isUtcOffset() {\n return this.isValid() ? this._isUTC : false;\n }\n\n function isUtc() {\n return this.isValid() ? this._isUTC && this._offset === 0 : false;\n } // ASP.NET json date format regex\n\n\n var aspNetRegex = /^(\\-|\\+)?(?:(\\d*)[. ])?(\\d+)\\:(\\d+)(?:\\:(\\d+)(\\.\\d*)?)?$/; // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html\n // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere\n // and further modified to allow for strings containing both week and day\n\n var isoRegex = /^(-|\\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;\n\n function createDuration(input, key) {\n var duration = input,\n // matching against regexp is expensive, do it on demand\n match = null,\n sign,\n ret,\n diffRes;\n\n if (isDuration(input)) {\n duration = {\n ms: input._milliseconds,\n d: input._days,\n M: input._months\n };\n } else if (isNumber(input)) {\n duration = {};\n\n if (key) {\n duration[key] = input;\n } else {\n duration.milliseconds = input;\n }\n } else if (!!(match = aspNetRegex.exec(input))) {\n sign = match[1] === '-' ? -1 : 1;\n duration = {\n y: 0,\n d: toInt(match[DATE]) * sign,\n h: toInt(match[HOUR]) * sign,\n m: toInt(match[MINUTE]) * sign,\n s: toInt(match[SECOND]) * sign,\n ms: toInt(absRound(match[MILLISECOND] * 1000)) * sign // the millisecond decimal point is included in the match\n\n };\n } else if (!!(match = isoRegex.exec(input))) {\n sign = match[1] === '-' ? -1 : 1;\n duration = {\n y: parseIso(match[2], sign),\n M: parseIso(match[3], sign),\n w: parseIso(match[4], sign),\n d: parseIso(match[5], sign),\n h: parseIso(match[6], sign),\n m: parseIso(match[7], sign),\n s: parseIso(match[8], sign)\n };\n } else if (duration == null) {\n // checks for null or undefined\n duration = {};\n } else if (typeof duration === 'object' && ('from' in duration || 'to' in duration)) {\n diffRes = momentsDifference(createLocal(duration.from), createLocal(duration.to));\n duration = {};\n duration.ms = diffRes.milliseconds;\n duration.M = diffRes.months;\n }\n\n ret = new Duration(duration);\n\n if (isDuration(input) && hasOwnProp(input, '_locale')) {\n ret._locale = input._locale;\n }\n\n return ret;\n }\n\n createDuration.fn = Duration.prototype;\n createDuration.invalid = createInvalid$1;\n\n function parseIso(inp, sign) {\n // We'd normally use ~~inp for this, but unfortunately it also\n // converts floats to ints.\n // inp may be undefined, so careful calling replace on it.\n var res = inp && parseFloat(inp.replace(',', '.')); // apply sign while we're at it\n\n return (isNaN(res) ? 0 : res) * sign;\n }\n\n function positiveMomentsDifference(base, other) {\n var res = {};\n res.months = other.month() - base.month() + (other.year() - base.year()) * 12;\n\n if (base.clone().add(res.months, 'M').isAfter(other)) {\n --res.months;\n }\n\n res.milliseconds = +other - +base.clone().add(res.months, 'M');\n return res;\n }\n\n function momentsDifference(base, other) {\n var res;\n\n if (!(base.isValid() && other.isValid())) {\n return {\n milliseconds: 0,\n months: 0\n };\n }\n\n other = cloneWithOffset(other, base);\n\n if (base.isBefore(other)) {\n res = positiveMomentsDifference(base, other);\n } else {\n res = positiveMomentsDifference(other, base);\n res.milliseconds = -res.milliseconds;\n res.months = -res.months;\n }\n\n return res;\n } // TODO: remove 'name' arg after deprecation is removed\n\n\n function createAdder(direction, name) {\n return function (val, period) {\n var dur, tmp; //invert the arguments, but complain about it\n\n if (period !== null && !isNaN(+period)) {\n deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' + 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.');\n tmp = val;\n val = period;\n period = tmp;\n }\n\n val = typeof val === 'string' ? +val : val;\n dur = createDuration(val, period);\n addSubtract(this, dur, direction);\n return this;\n };\n }\n\n function addSubtract(mom, duration, isAdding, updateOffset) {\n var milliseconds = duration._milliseconds,\n days = absRound(duration._days),\n months = absRound(duration._months);\n\n if (!mom.isValid()) {\n // No op\n return;\n }\n\n updateOffset = updateOffset == null ? true : updateOffset;\n\n if (months) {\n setMonth(mom, get(mom, 'Month') + months * isAdding);\n }\n\n if (days) {\n set$1(mom, 'Date', get(mom, 'Date') + days * isAdding);\n }\n\n if (milliseconds) {\n mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding);\n }\n\n if (updateOffset) {\n hooks.updateOffset(mom, days || months);\n }\n }\n\n var add = createAdder(1, 'add');\n var subtract = createAdder(-1, 'subtract');\n\n function getCalendarFormat(myMoment, now) {\n var diff = myMoment.diff(now, 'days', true);\n return diff < -6 ? 'sameElse' : diff < -1 ? 'lastWeek' : diff < 0 ? 'lastDay' : diff < 1 ? 'sameDay' : diff < 2 ? 'nextDay' : diff < 7 ? 'nextWeek' : 'sameElse';\n }\n\n function calendar$1(time, formats) {\n // We want to compare the start of today, vs this.\n // Getting start-of-today depends on whether we're local/utc/offset or not.\n var now = time || createLocal(),\n sod = cloneWithOffset(now, this).startOf('day'),\n format = hooks.calendarFormat(this, sod) || 'sameElse';\n var output = formats && (isFunction(formats[format]) ? formats[format].call(this, now) : formats[format]);\n return this.format(output || this.localeData().calendar(format, this, createLocal(now)));\n }\n\n function clone() {\n return new Moment(this);\n }\n\n function isAfter(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input);\n\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n\n units = normalizeUnits(units) || 'millisecond';\n\n if (units === 'millisecond') {\n return this.valueOf() > localInput.valueOf();\n } else {\n return localInput.valueOf() < this.clone().startOf(units).valueOf();\n }\n }\n\n function isBefore(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input);\n\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n\n units = normalizeUnits(units) || 'millisecond';\n\n if (units === 'millisecond') {\n return this.valueOf() < localInput.valueOf();\n } else {\n return this.clone().endOf(units).valueOf() < localInput.valueOf();\n }\n }\n\n function isBetween(from, to, units, inclusivity) {\n var localFrom = isMoment(from) ? from : createLocal(from),\n localTo = isMoment(to) ? to : createLocal(to);\n\n if (!(this.isValid() && localFrom.isValid() && localTo.isValid())) {\n return false;\n }\n\n inclusivity = inclusivity || '()';\n return (inclusivity[0] === '(' ? this.isAfter(localFrom, units) : !this.isBefore(localFrom, units)) && (inclusivity[1] === ')' ? this.isBefore(localTo, units) : !this.isAfter(localTo, units));\n }\n\n function isSame(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input),\n inputMs;\n\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n\n units = normalizeUnits(units) || 'millisecond';\n\n if (units === 'millisecond') {\n return this.valueOf() === localInput.valueOf();\n } else {\n inputMs = localInput.valueOf();\n return this.clone().startOf(units).valueOf() <= inputMs && inputMs <= this.clone().endOf(units).valueOf();\n }\n }\n\n function isSameOrAfter(input, units) {\n return this.isSame(input, units) || this.isAfter(input, units);\n }\n\n function isSameOrBefore(input, units) {\n return this.isSame(input, units) || this.isBefore(input, units);\n }\n\n function diff(input, units, asFloat) {\n var that, zoneDelta, output;\n\n if (!this.isValid()) {\n return NaN;\n }\n\n that = cloneWithOffset(input, this);\n\n if (!that.isValid()) {\n return NaN;\n }\n\n zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4;\n units = normalizeUnits(units);\n\n switch (units) {\n case 'year':\n output = monthDiff(this, that) / 12;\n break;\n\n case 'month':\n output = monthDiff(this, that);\n break;\n\n case 'quarter':\n output = monthDiff(this, that) / 3;\n break;\n\n case 'second':\n output = (this - that) / 1e3;\n break;\n // 1000\n\n case 'minute':\n output = (this - that) / 6e4;\n break;\n // 1000 * 60\n\n case 'hour':\n output = (this - that) / 36e5;\n break;\n // 1000 * 60 * 60\n\n case 'day':\n output = (this - that - zoneDelta) / 864e5;\n break;\n // 1000 * 60 * 60 * 24, negate dst\n\n case 'week':\n output = (this - that - zoneDelta) / 6048e5;\n break;\n // 1000 * 60 * 60 * 24 * 7, negate dst\n\n default:\n output = this - that;\n }\n\n return asFloat ? output : absFloor(output);\n }\n\n function monthDiff(a, b) {\n // difference in months\n var wholeMonthDiff = (b.year() - a.year()) * 12 + (b.month() - a.month()),\n // b is in (anchor - 1 month, anchor + 1 month)\n anchor = a.clone().add(wholeMonthDiff, 'months'),\n anchor2,\n adjust;\n\n if (b - anchor < 0) {\n anchor2 = a.clone().add(wholeMonthDiff - 1, 'months'); // linear across the month\n\n adjust = (b - anchor) / (anchor - anchor2);\n } else {\n anchor2 = a.clone().add(wholeMonthDiff + 1, 'months'); // linear across the month\n\n adjust = (b - anchor) / (anchor2 - anchor);\n } //check for negative zero, return zero if negative zero\n\n\n return -(wholeMonthDiff + adjust) || 0;\n }\n\n hooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ';\n hooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]';\n\n function toString() {\n return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ');\n }\n\n function toISOString(keepOffset) {\n if (!this.isValid()) {\n return null;\n }\n\n var utc = keepOffset !== true;\n var m = utc ? this.clone().utc() : this;\n\n if (m.year() < 0 || m.year() > 9999) {\n return formatMoment(m, utc ? 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYYYY-MM-DD[T]HH:mm:ss.SSSZ');\n }\n\n if (isFunction(Date.prototype.toISOString)) {\n // native implementation is ~50x faster, use it when we can\n if (utc) {\n return this.toDate().toISOString();\n } else {\n return new Date(this.valueOf() + this.utcOffset() * 60 * 1000).toISOString().replace('Z', formatMoment(m, 'Z'));\n }\n }\n\n return formatMoment(m, utc ? 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYY-MM-DD[T]HH:mm:ss.SSSZ');\n }\n /**\n * Return a human readable representation of a moment that can\n * also be evaluated to get a new moment which is the same\n *\n * @link https://nodejs.org/dist/latest/docs/api/util.html#util_custom_inspect_function_on_objects\n */\n\n\n function inspect() {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n\n var func = 'moment';\n var zone = '';\n\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n\n var prefix = '[' + func + '(\"]';\n var year = 0 <= this.year() && this.year() <= 9999 ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n return this.format(prefix + year + datetime + suffix);\n }\n\n function format(inputString) {\n if (!inputString) {\n inputString = this.isUtc() ? hooks.defaultFormatUtc : hooks.defaultFormat;\n }\n\n var output = formatMoment(this, inputString);\n return this.localeData().postformat(output);\n }\n\n function from(time, withoutSuffix) {\n if (this.isValid() && (isMoment(time) && time.isValid() || createLocal(time).isValid())) {\n return createDuration({\n to: this,\n from: time\n }).locale(this.locale()).humanize(!withoutSuffix);\n } else {\n return this.localeData().invalidDate();\n }\n }\n\n function fromNow(withoutSuffix) {\n return this.from(createLocal(), withoutSuffix);\n }\n\n function to(time, withoutSuffix) {\n if (this.isValid() && (isMoment(time) && time.isValid() || createLocal(time).isValid())) {\n return createDuration({\n from: this,\n to: time\n }).locale(this.locale()).humanize(!withoutSuffix);\n } else {\n return this.localeData().invalidDate();\n }\n }\n\n function toNow(withoutSuffix) {\n return this.to(createLocal(), withoutSuffix);\n } // If passed a locale key, it will set the locale for this\n // instance. Otherwise, it will return the locale configuration\n // variables for this instance.\n\n\n function locale(key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n\n return this;\n }\n }\n\n var lang = deprecate('moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.', function (key) {\n if (key === undefined) {\n return this.localeData();\n } else {\n return this.locale(key);\n }\n });\n\n function localeData() {\n return this._locale;\n }\n\n var MS_PER_SECOND = 1000;\n var MS_PER_MINUTE = 60 * MS_PER_SECOND;\n var MS_PER_HOUR = 60 * MS_PER_MINUTE;\n var MS_PER_400_YEARS = (365 * 400 + 97) * 24 * MS_PER_HOUR; // actual modulo - handles negative numbers (for dates before 1970):\n\n function mod$1(dividend, divisor) {\n return (dividend % divisor + divisor) % divisor;\n }\n\n function localStartOfDate(y, m, d) {\n // the date constructor remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n return new Date(y + 400, m, d) - MS_PER_400_YEARS;\n } else {\n return new Date(y, m, d).valueOf();\n }\n }\n\n function utcStartOfDate(y, m, d) {\n // Date.UTC remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n return Date.UTC(y + 400, m, d) - MS_PER_400_YEARS;\n } else {\n return Date.UTC(y, m, d);\n }\n }\n\n function startOf(units) {\n var time;\n units = normalizeUnits(units);\n\n if (units === undefined || units === 'millisecond' || !this.isValid()) {\n return this;\n }\n\n var startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;\n\n switch (units) {\n case 'year':\n time = startOfDate(this.year(), 0, 1);\n break;\n\n case 'quarter':\n time = startOfDate(this.year(), this.month() - this.month() % 3, 1);\n break;\n\n case 'month':\n time = startOfDate(this.year(), this.month(), 1);\n break;\n\n case 'week':\n time = startOfDate(this.year(), this.month(), this.date() - this.weekday());\n break;\n\n case 'isoWeek':\n time = startOfDate(this.year(), this.month(), this.date() - (this.isoWeekday() - 1));\n break;\n\n case 'day':\n case 'date':\n time = startOfDate(this.year(), this.month(), this.date());\n break;\n\n case 'hour':\n time = this._d.valueOf();\n time -= mod$1(time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE), MS_PER_HOUR);\n break;\n\n case 'minute':\n time = this._d.valueOf();\n time -= mod$1(time, MS_PER_MINUTE);\n break;\n\n case 'second':\n time = this._d.valueOf();\n time -= mod$1(time, MS_PER_SECOND);\n break;\n }\n\n this._d.setTime(time);\n\n hooks.updateOffset(this, true);\n return this;\n }\n\n function endOf(units) {\n var time;\n units = normalizeUnits(units);\n\n if (units === undefined || units === 'millisecond' || !this.isValid()) {\n return this;\n }\n\n var startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;\n\n switch (units) {\n case 'year':\n time = startOfDate(this.year() + 1, 0, 1) - 1;\n break;\n\n case 'quarter':\n time = startOfDate(this.year(), this.month() - this.month() % 3 + 3, 1) - 1;\n break;\n\n case 'month':\n time = startOfDate(this.year(), this.month() + 1, 1) - 1;\n break;\n\n case 'week':\n time = startOfDate(this.year(), this.month(), this.date() - this.weekday() + 7) - 1;\n break;\n\n case 'isoWeek':\n time = startOfDate(this.year(), this.month(), this.date() - (this.isoWeekday() - 1) + 7) - 1;\n break;\n\n case 'day':\n case 'date':\n time = startOfDate(this.year(), this.month(), this.date() + 1) - 1;\n break;\n\n case 'hour':\n time = this._d.valueOf();\n time += MS_PER_HOUR - mod$1(time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE), MS_PER_HOUR) - 1;\n break;\n\n case 'minute':\n time = this._d.valueOf();\n time += MS_PER_MINUTE - mod$1(time, MS_PER_MINUTE) - 1;\n break;\n\n case 'second':\n time = this._d.valueOf();\n time += MS_PER_SECOND - mod$1(time, MS_PER_SECOND) - 1;\n break;\n }\n\n this._d.setTime(time);\n\n hooks.updateOffset(this, true);\n return this;\n }\n\n function valueOf() {\n return this._d.valueOf() - (this._offset || 0) * 60000;\n }\n\n function unix() {\n return Math.floor(this.valueOf() / 1000);\n }\n\n function toDate() {\n return new Date(this.valueOf());\n }\n\n function toArray() {\n var m = this;\n return [m.year(), m.month(), m.date(), m.hour(), m.minute(), m.second(), m.millisecond()];\n }\n\n function toObject() {\n var m = this;\n return {\n years: m.year(),\n months: m.month(),\n date: m.date(),\n hours: m.hours(),\n minutes: m.minutes(),\n seconds: m.seconds(),\n milliseconds: m.milliseconds()\n };\n }\n\n function toJSON() {\n // new Date(NaN).toJSON() === null\n return this.isValid() ? this.toISOString() : null;\n }\n\n function isValid$2() {\n return isValid(this);\n }\n\n function parsingFlags() {\n return extend({}, getParsingFlags(this));\n }\n\n function invalidAt() {\n return getParsingFlags(this).overflow;\n }\n\n function creationData() {\n return {\n input: this._i,\n format: this._f,\n locale: this._locale,\n isUTC: this._isUTC,\n strict: this._strict\n };\n } // FORMATTING\n\n\n addFormatToken(0, ['gg', 2], 0, function () {\n return this.weekYear() % 100;\n });\n addFormatToken(0, ['GG', 2], 0, function () {\n return this.isoWeekYear() % 100;\n });\n\n function addWeekYearFormatToken(token, getter) {\n addFormatToken(0, [token, token.length], 0, getter);\n }\n\n addWeekYearFormatToken('gggg', 'weekYear');\n addWeekYearFormatToken('ggggg', 'weekYear');\n addWeekYearFormatToken('GGGG', 'isoWeekYear');\n addWeekYearFormatToken('GGGGG', 'isoWeekYear'); // ALIASES\n\n addUnitAlias('weekYear', 'gg');\n addUnitAlias('isoWeekYear', 'GG'); // PRIORITY\n\n addUnitPriority('weekYear', 1);\n addUnitPriority('isoWeekYear', 1); // PARSING\n\n addRegexToken('G', matchSigned);\n addRegexToken('g', matchSigned);\n addRegexToken('GG', match1to2, match2);\n addRegexToken('gg', match1to2, match2);\n addRegexToken('GGGG', match1to4, match4);\n addRegexToken('gggg', match1to4, match4);\n addRegexToken('GGGGG', match1to6, match6);\n addRegexToken('ggggg', match1to6, match6);\n addWeekParseToken(['gggg', 'ggggg', 'GGGG', 'GGGGG'], function (input, week, config, token) {\n week[token.substr(0, 2)] = toInt(input);\n });\n addWeekParseToken(['gg', 'GG'], function (input, week, config, token) {\n week[token] = hooks.parseTwoDigitYear(input);\n }); // MOMENTS\n\n function getSetWeekYear(input) {\n return getSetWeekYearHelper.call(this, input, this.week(), this.weekday(), this.localeData()._week.dow, this.localeData()._week.doy);\n }\n\n function getSetISOWeekYear(input) {\n return getSetWeekYearHelper.call(this, input, this.isoWeek(), this.isoWeekday(), 1, 4);\n }\n\n function getISOWeeksInYear() {\n return weeksInYear(this.year(), 1, 4);\n }\n\n function getWeeksInYear() {\n var weekInfo = this.localeData()._week;\n\n return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy);\n }\n\n function getSetWeekYearHelper(input, week, weekday, dow, doy) {\n var weeksTarget;\n\n if (input == null) {\n return weekOfYear(this, dow, doy).year;\n } else {\n weeksTarget = weeksInYear(input, dow, doy);\n\n if (week > weeksTarget) {\n week = weeksTarget;\n }\n\n return setWeekAll.call(this, input, week, weekday, dow, doy);\n }\n }\n\n function setWeekAll(weekYear, week, weekday, dow, doy) {\n var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy),\n date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear);\n this.year(date.getUTCFullYear());\n this.month(date.getUTCMonth());\n this.date(date.getUTCDate());\n return this;\n } // FORMATTING\n\n\n addFormatToken('Q', 0, 'Qo', 'quarter'); // ALIASES\n\n addUnitAlias('quarter', 'Q'); // PRIORITY\n\n addUnitPriority('quarter', 7); // PARSING\n\n addRegexToken('Q', match1);\n addParseToken('Q', function (input, array) {\n array[MONTH] = (toInt(input) - 1) * 3;\n }); // MOMENTS\n\n function getSetQuarter(input) {\n return input == null ? Math.ceil((this.month() + 1) / 3) : this.month((input - 1) * 3 + this.month() % 3);\n } // FORMATTING\n\n\n addFormatToken('D', ['DD', 2], 'Do', 'date'); // ALIASES\n\n addUnitAlias('date', 'D'); // PRIORITY\n\n addUnitPriority('date', 9); // PARSING\n\n addRegexToken('D', match1to2);\n addRegexToken('DD', match1to2, match2);\n addRegexToken('Do', function (isStrict, locale) {\n // TODO: Remove \"ordinalParse\" fallback in next major release.\n return isStrict ? locale._dayOfMonthOrdinalParse || locale._ordinalParse : locale._dayOfMonthOrdinalParseLenient;\n });\n addParseToken(['D', 'DD'], DATE);\n addParseToken('Do', function (input, array) {\n array[DATE] = toInt(input.match(match1to2)[0]);\n }); // MOMENTS\n\n var getSetDayOfMonth = makeGetSet('Date', true); // FORMATTING\n\n addFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear'); // ALIASES\n\n addUnitAlias('dayOfYear', 'DDD'); // PRIORITY\n\n addUnitPriority('dayOfYear', 4); // PARSING\n\n addRegexToken('DDD', match1to3);\n addRegexToken('DDDD', match3);\n addParseToken(['DDD', 'DDDD'], function (input, array, config) {\n config._dayOfYear = toInt(input);\n }); // HELPERS\n // MOMENTS\n\n function getSetDayOfYear(input) {\n var dayOfYear = Math.round((this.clone().startOf('day') - this.clone().startOf('year')) / 864e5) + 1;\n return input == null ? dayOfYear : this.add(input - dayOfYear, 'd');\n } // FORMATTING\n\n\n addFormatToken('m', ['mm', 2], 0, 'minute'); // ALIASES\n\n addUnitAlias('minute', 'm'); // PRIORITY\n\n addUnitPriority('minute', 14); // PARSING\n\n addRegexToken('m', match1to2);\n addRegexToken('mm', match1to2, match2);\n addParseToken(['m', 'mm'], MINUTE); // MOMENTS\n\n var getSetMinute = makeGetSet('Minutes', false); // FORMATTING\n\n addFormatToken('s', ['ss', 2], 0, 'second'); // ALIASES\n\n addUnitAlias('second', 's'); // PRIORITY\n\n addUnitPriority('second', 15); // PARSING\n\n addRegexToken('s', match1to2);\n addRegexToken('ss', match1to2, match2);\n addParseToken(['s', 'ss'], SECOND); // MOMENTS\n\n var getSetSecond = makeGetSet('Seconds', false); // FORMATTING\n\n addFormatToken('S', 0, 0, function () {\n return ~~(this.millisecond() / 100);\n });\n addFormatToken(0, ['SS', 2], 0, function () {\n return ~~(this.millisecond() / 10);\n });\n addFormatToken(0, ['SSS', 3], 0, 'millisecond');\n addFormatToken(0, ['SSSS', 4], 0, function () {\n return this.millisecond() * 10;\n });\n addFormatToken(0, ['SSSSS', 5], 0, function () {\n return this.millisecond() * 100;\n });\n addFormatToken(0, ['SSSSSS', 6], 0, function () {\n return this.millisecond() * 1000;\n });\n addFormatToken(0, ['SSSSSSS', 7], 0, function () {\n return this.millisecond() * 10000;\n });\n addFormatToken(0, ['SSSSSSSS', 8], 0, function () {\n return this.millisecond() * 100000;\n });\n addFormatToken(0, ['SSSSSSSSS', 9], 0, function () {\n return this.millisecond() * 1000000;\n }); // ALIASES\n\n addUnitAlias('millisecond', 'ms'); // PRIORITY\n\n addUnitPriority('millisecond', 16); // PARSING\n\n addRegexToken('S', match1to3, match1);\n addRegexToken('SS', match1to3, match2);\n addRegexToken('SSS', match1to3, match3);\n var token;\n\n for (token = 'SSSS'; token.length <= 9; token += 'S') {\n addRegexToken(token, matchUnsigned);\n }\n\n function parseMs(input, array) {\n array[MILLISECOND] = toInt(('0.' + input) * 1000);\n }\n\n for (token = 'S'; token.length <= 9; token += 'S') {\n addParseToken(token, parseMs);\n } // MOMENTS\n\n\n var getSetMillisecond = makeGetSet('Milliseconds', false); // FORMATTING\n\n addFormatToken('z', 0, 0, 'zoneAbbr');\n addFormatToken('zz', 0, 0, 'zoneName'); // MOMENTS\n\n function getZoneAbbr() {\n return this._isUTC ? 'UTC' : '';\n }\n\n function getZoneName() {\n return this._isUTC ? 'Coordinated Universal Time' : '';\n }\n\n var proto = Moment.prototype;\n proto.add = add;\n proto.calendar = calendar$1;\n proto.clone = clone;\n proto.diff = diff;\n proto.endOf = endOf;\n proto.format = format;\n proto.from = from;\n proto.fromNow = fromNow;\n proto.to = to;\n proto.toNow = toNow;\n proto.get = stringGet;\n proto.invalidAt = invalidAt;\n proto.isAfter = isAfter;\n proto.isBefore = isBefore;\n proto.isBetween = isBetween;\n proto.isSame = isSame;\n proto.isSameOrAfter = isSameOrAfter;\n proto.isSameOrBefore = isSameOrBefore;\n proto.isValid = isValid$2;\n proto.lang = lang;\n proto.locale = locale;\n proto.localeData = localeData;\n proto.max = prototypeMax;\n proto.min = prototypeMin;\n proto.parsingFlags = parsingFlags;\n proto.set = stringSet;\n proto.startOf = startOf;\n proto.subtract = subtract;\n proto.toArray = toArray;\n proto.toObject = toObject;\n proto.toDate = toDate;\n proto.toISOString = toISOString;\n proto.inspect = inspect;\n proto.toJSON = toJSON;\n proto.toString = toString;\n proto.unix = unix;\n proto.valueOf = valueOf;\n proto.creationData = creationData;\n proto.year = getSetYear;\n proto.isLeapYear = getIsLeapYear;\n proto.weekYear = getSetWeekYear;\n proto.isoWeekYear = getSetISOWeekYear;\n proto.quarter = proto.quarters = getSetQuarter;\n proto.month = getSetMonth;\n proto.daysInMonth = getDaysInMonth;\n proto.week = proto.weeks = getSetWeek;\n proto.isoWeek = proto.isoWeeks = getSetISOWeek;\n proto.weeksInYear = getWeeksInYear;\n proto.isoWeeksInYear = getISOWeeksInYear;\n proto.date = getSetDayOfMonth;\n proto.day = proto.days = getSetDayOfWeek;\n proto.weekday = getSetLocaleDayOfWeek;\n proto.isoWeekday = getSetISODayOfWeek;\n proto.dayOfYear = getSetDayOfYear;\n proto.hour = proto.hours = getSetHour;\n proto.minute = proto.minutes = getSetMinute;\n proto.second = proto.seconds = getSetSecond;\n proto.millisecond = proto.milliseconds = getSetMillisecond;\n proto.utcOffset = getSetOffset;\n proto.utc = setOffsetToUTC;\n proto.local = setOffsetToLocal;\n proto.parseZone = setOffsetToParsedOffset;\n proto.hasAlignedHourOffset = hasAlignedHourOffset;\n proto.isDST = isDaylightSavingTime;\n proto.isLocal = isLocal;\n proto.isUtcOffset = isUtcOffset;\n proto.isUtc = isUtc;\n proto.isUTC = isUtc;\n proto.zoneAbbr = getZoneAbbr;\n proto.zoneName = getZoneName;\n proto.dates = deprecate('dates accessor is deprecated. Use date instead.', getSetDayOfMonth);\n proto.months = deprecate('months accessor is deprecated. Use month instead', getSetMonth);\n proto.years = deprecate('years accessor is deprecated. Use year instead', getSetYear);\n proto.zone = deprecate('moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/', getSetZone);\n proto.isDSTShifted = deprecate('isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information', isDaylightSavingTimeShifted);\n\n function createUnix(input) {\n return createLocal(input * 1000);\n }\n\n function createInZone() {\n return createLocal.apply(null, arguments).parseZone();\n }\n\n function preParsePostFormat(string) {\n return string;\n }\n\n var proto$1 = Locale.prototype;\n proto$1.calendar = calendar;\n proto$1.longDateFormat = longDateFormat;\n proto$1.invalidDate = invalidDate;\n proto$1.ordinal = ordinal;\n proto$1.preparse = preParsePostFormat;\n proto$1.postformat = preParsePostFormat;\n proto$1.relativeTime = relativeTime;\n proto$1.pastFuture = pastFuture;\n proto$1.set = set;\n proto$1.months = localeMonths;\n proto$1.monthsShort = localeMonthsShort;\n proto$1.monthsParse = localeMonthsParse;\n proto$1.monthsRegex = monthsRegex;\n proto$1.monthsShortRegex = monthsShortRegex;\n proto$1.week = localeWeek;\n proto$1.firstDayOfYear = localeFirstDayOfYear;\n proto$1.firstDayOfWeek = localeFirstDayOfWeek;\n proto$1.weekdays = localeWeekdays;\n proto$1.weekdaysMin = localeWeekdaysMin;\n proto$1.weekdaysShort = localeWeekdaysShort;\n proto$1.weekdaysParse = localeWeekdaysParse;\n proto$1.weekdaysRegex = weekdaysRegex;\n proto$1.weekdaysShortRegex = weekdaysShortRegex;\n proto$1.weekdaysMinRegex = weekdaysMinRegex;\n proto$1.isPM = localeIsPM;\n proto$1.meridiem = localeMeridiem;\n\n function get$1(format, index, field, setter) {\n var locale = getLocale();\n var utc = createUTC().set(setter, index);\n return locale[field](utc, format);\n }\n\n function listMonthsImpl(format, index, field) {\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n\n if (index != null) {\n return get$1(format, index, field, 'month');\n }\n\n var i;\n var out = [];\n\n for (i = 0; i < 12; i++) {\n out[i] = get$1(format, i, field, 'month');\n }\n\n return out;\n } // ()\n // (5)\n // (fmt, 5)\n // (fmt)\n // (true)\n // (true, 5)\n // (true, fmt, 5)\n // (true, fmt)\n\n\n function listWeekdaysImpl(localeSorted, format, index, field) {\n if (typeof localeSorted === 'boolean') {\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n } else {\n format = localeSorted;\n index = format;\n localeSorted = false;\n\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n }\n\n var locale = getLocale(),\n shift = localeSorted ? locale._week.dow : 0;\n\n if (index != null) {\n return get$1(format, (index + shift) % 7, field, 'day');\n }\n\n var i;\n var out = [];\n\n for (i = 0; i < 7; i++) {\n out[i] = get$1(format, (i + shift) % 7, field, 'day');\n }\n\n return out;\n }\n\n function listMonths(format, index) {\n return listMonthsImpl(format, index, 'months');\n }\n\n function listMonthsShort(format, index) {\n return listMonthsImpl(format, index, 'monthsShort');\n }\n\n function listWeekdays(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdays');\n }\n\n function listWeekdaysShort(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort');\n }\n\n function listWeekdaysMin(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin');\n }\n\n getSetGlobalLocale('en', {\n dayOfMonthOrdinalParse: /\\d{1,2}(th|st|nd|rd)/,\n ordinal: function (number) {\n var b = number % 10,\n output = toInt(number % 100 / 10) === 1 ? 'th' : b === 1 ? 'st' : b === 2 ? 'nd' : b === 3 ? 'rd' : 'th';\n return number + output;\n }\n }); // Side effect imports\n\n hooks.lang = deprecate('moment.lang is deprecated. Use moment.locale instead.', getSetGlobalLocale);\n hooks.langData = deprecate('moment.langData is deprecated. Use moment.localeData instead.', getLocale);\n var mathAbs = Math.abs;\n\n function abs() {\n var data = this._data;\n this._milliseconds = mathAbs(this._milliseconds);\n this._days = mathAbs(this._days);\n this._months = mathAbs(this._months);\n data.milliseconds = mathAbs(data.milliseconds);\n data.seconds = mathAbs(data.seconds);\n data.minutes = mathAbs(data.minutes);\n data.hours = mathAbs(data.hours);\n data.months = mathAbs(data.months);\n data.years = mathAbs(data.years);\n return this;\n }\n\n function addSubtract$1(duration, input, value, direction) {\n var other = createDuration(input, value);\n duration._milliseconds += direction * other._milliseconds;\n duration._days += direction * other._days;\n duration._months += direction * other._months;\n return duration._bubble();\n } // supports only 2.0-style add(1, 's') or add(duration)\n\n\n function add$1(input, value) {\n return addSubtract$1(this, input, value, 1);\n } // supports only 2.0-style subtract(1, 's') or subtract(duration)\n\n\n function subtract$1(input, value) {\n return addSubtract$1(this, input, value, -1);\n }\n\n function absCeil(number) {\n if (number < 0) {\n return Math.floor(number);\n } else {\n return Math.ceil(number);\n }\n }\n\n function bubble() {\n var milliseconds = this._milliseconds;\n var days = this._days;\n var months = this._months;\n var data = this._data;\n var seconds, minutes, hours, years, monthsFromDays; // if we have a mix of positive and negative values, bubble down first\n // check: https://github.com/moment/moment/issues/2166\n\n if (!(milliseconds >= 0 && days >= 0 && months >= 0 || milliseconds <= 0 && days <= 0 && months <= 0)) {\n milliseconds += absCeil(monthsToDays(months) + days) * 864e5;\n days = 0;\n months = 0;\n } // The following code bubbles up values, see the tests for\n // examples of what that means.\n\n\n data.milliseconds = milliseconds % 1000;\n seconds = absFloor(milliseconds / 1000);\n data.seconds = seconds % 60;\n minutes = absFloor(seconds / 60);\n data.minutes = minutes % 60;\n hours = absFloor(minutes / 60);\n data.hours = hours % 24;\n days += absFloor(hours / 24); // convert days to months\n\n monthsFromDays = absFloor(daysToMonths(days));\n months += monthsFromDays;\n days -= absCeil(monthsToDays(monthsFromDays)); // 12 months -> 1 year\n\n years = absFloor(months / 12);\n months %= 12;\n data.days = days;\n data.months = months;\n data.years = years;\n return this;\n }\n\n function daysToMonths(days) {\n // 400 years have 146097 days (taking into account leap year rules)\n // 400 years have 12 months === 4800\n return days * 4800 / 146097;\n }\n\n function monthsToDays(months) {\n // the reverse of daysToMonths\n return months * 146097 / 4800;\n }\n\n function as(units) {\n if (!this.isValid()) {\n return NaN;\n }\n\n var days;\n var months;\n var milliseconds = this._milliseconds;\n units = normalizeUnits(units);\n\n if (units === 'month' || units === 'quarter' || units === 'year') {\n days = this._days + milliseconds / 864e5;\n months = this._months + daysToMonths(days);\n\n switch (units) {\n case 'month':\n return months;\n\n case 'quarter':\n return months / 3;\n\n case 'year':\n return months / 12;\n }\n } else {\n // handle milliseconds separately because of floating point math errors (issue #1867)\n days = this._days + Math.round(monthsToDays(this._months));\n\n switch (units) {\n case 'week':\n return days / 7 + milliseconds / 6048e5;\n\n case 'day':\n return days + milliseconds / 864e5;\n\n case 'hour':\n return days * 24 + milliseconds / 36e5;\n\n case 'minute':\n return days * 1440 + milliseconds / 6e4;\n\n case 'second':\n return days * 86400 + milliseconds / 1000;\n // Math.floor prevents floating point math errors here\n\n case 'millisecond':\n return Math.floor(days * 864e5) + milliseconds;\n\n default:\n throw new Error('Unknown unit ' + units);\n }\n }\n } // TODO: Use this.as('ms')?\n\n\n function valueOf$1() {\n if (!this.isValid()) {\n return NaN;\n }\n\n return this._milliseconds + this._days * 864e5 + this._months % 12 * 2592e6 + toInt(this._months / 12) * 31536e6;\n }\n\n function makeAs(alias) {\n return function () {\n return this.as(alias);\n };\n }\n\n var asMilliseconds = makeAs('ms');\n var asSeconds = makeAs('s');\n var asMinutes = makeAs('m');\n var asHours = makeAs('h');\n var asDays = makeAs('d');\n var asWeeks = makeAs('w');\n var asMonths = makeAs('M');\n var asQuarters = makeAs('Q');\n var asYears = makeAs('y');\n\n function clone$1() {\n return createDuration(this);\n }\n\n function get$2(units) {\n units = normalizeUnits(units);\n return this.isValid() ? this[units + 's']() : NaN;\n }\n\n function makeGetter(name) {\n return function () {\n return this.isValid() ? this._data[name] : NaN;\n };\n }\n\n var milliseconds = makeGetter('milliseconds');\n var seconds = makeGetter('seconds');\n var minutes = makeGetter('minutes');\n var hours = makeGetter('hours');\n var days = makeGetter('days');\n var months = makeGetter('months');\n var years = makeGetter('years');\n\n function weeks() {\n return absFloor(this.days() / 7);\n }\n\n var round = Math.round;\n var thresholds = {\n ss: 44,\n // a few seconds to seconds\n s: 45,\n // seconds to minute\n m: 45,\n // minutes to hour\n h: 22,\n // hours to day\n d: 26,\n // days to month\n M: 11 // months to year\n\n }; // helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize\n\n function substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) {\n return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture);\n }\n\n function relativeTime$1(posNegDuration, withoutSuffix, locale) {\n var duration = createDuration(posNegDuration).abs();\n var seconds = round(duration.as('s'));\n var minutes = round(duration.as('m'));\n var hours = round(duration.as('h'));\n var days = round(duration.as('d'));\n var months = round(duration.as('M'));\n var years = round(duration.as('y'));\n var a = seconds <= thresholds.ss && ['s', seconds] || seconds < thresholds.s && ['ss', seconds] || minutes <= 1 && ['m'] || minutes < thresholds.m && ['mm', minutes] || hours <= 1 && ['h'] || hours < thresholds.h && ['hh', hours] || days <= 1 && ['d'] || days < thresholds.d && ['dd', days] || months <= 1 && ['M'] || months < thresholds.M && ['MM', months] || years <= 1 && ['y'] || ['yy', years];\n a[2] = withoutSuffix;\n a[3] = +posNegDuration > 0;\n a[4] = locale;\n return substituteTimeAgo.apply(null, a);\n } // This function allows you to set the rounding function for relative time strings\n\n\n function getSetRelativeTimeRounding(roundingFunction) {\n if (roundingFunction === undefined) {\n return round;\n }\n\n if (typeof roundingFunction === 'function') {\n round = roundingFunction;\n return true;\n }\n\n return false;\n } // This function allows you to set a threshold for relative time strings\n\n\n function getSetRelativeTimeThreshold(threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n\n if (limit === undefined) {\n return thresholds[threshold];\n }\n\n thresholds[threshold] = limit;\n\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n\n return true;\n }\n\n function humanize(withSuffix) {\n if (!this.isValid()) {\n return this.localeData().invalidDate();\n }\n\n var locale = this.localeData();\n var output = relativeTime$1(this, !withSuffix, locale);\n\n if (withSuffix) {\n output = locale.pastFuture(+this, output);\n }\n\n return locale.postformat(output);\n }\n\n var abs$1 = Math.abs;\n\n function sign(x) {\n return (x > 0) - (x < 0) || +x;\n }\n\n function toISOString$1() {\n // for ISO strings we do not use the normal bubbling rules:\n // * milliseconds bubble up until they become hours\n // * days do not bubble at all\n // * months bubble up until they become years\n // This is because there is no context-free conversion between hours and days\n // (think of clock changes)\n // and also not between days and months (28-31 days per month)\n if (!this.isValid()) {\n return this.localeData().invalidDate();\n }\n\n var seconds = abs$1(this._milliseconds) / 1000;\n var days = abs$1(this._days);\n var months = abs$1(this._months);\n var minutes, hours, years; // 3600 seconds -> 60 minutes -> 1 hour\n\n minutes = absFloor(seconds / 60);\n hours = absFloor(minutes / 60);\n seconds %= 60;\n minutes %= 60; // 12 months -> 1 year\n\n years = absFloor(months / 12);\n months %= 12; // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js\n\n var Y = years;\n var M = months;\n var D = days;\n var h = hours;\n var m = minutes;\n var s = seconds ? seconds.toFixed(3).replace(/\\.?0+$/, '') : '';\n var total = this.asSeconds();\n\n if (!total) {\n // this is the same as C#'s (Noda) and python (isodate)...\n // but not other JS (goog.date)\n return 'P0D';\n }\n\n var totalSign = total < 0 ? '-' : '';\n var ymSign = sign(this._months) !== sign(total) ? '-' : '';\n var daysSign = sign(this._days) !== sign(total) ? '-' : '';\n var hmsSign = sign(this._milliseconds) !== sign(total) ? '-' : '';\n return totalSign + 'P' + (Y ? ymSign + Y + 'Y' : '') + (M ? ymSign + M + 'M' : '') + (D ? daysSign + D + 'D' : '') + (h || m || s ? 'T' : '') + (h ? hmsSign + h + 'H' : '') + (m ? hmsSign + m + 'M' : '') + (s ? hmsSign + s + 'S' : '');\n }\n\n var proto$2 = Duration.prototype;\n proto$2.isValid = isValid$1;\n proto$2.abs = abs;\n proto$2.add = add$1;\n proto$2.subtract = subtract$1;\n proto$2.as = as;\n proto$2.asMilliseconds = asMilliseconds;\n proto$2.asSeconds = asSeconds;\n proto$2.asMinutes = asMinutes;\n proto$2.asHours = asHours;\n proto$2.asDays = asDays;\n proto$2.asWeeks = asWeeks;\n proto$2.asMonths = asMonths;\n proto$2.asQuarters = asQuarters;\n proto$2.asYears = asYears;\n proto$2.valueOf = valueOf$1;\n proto$2._bubble = bubble;\n proto$2.clone = clone$1;\n proto$2.get = get$2;\n proto$2.milliseconds = milliseconds;\n proto$2.seconds = seconds;\n proto$2.minutes = minutes;\n proto$2.hours = hours;\n proto$2.days = days;\n proto$2.weeks = weeks;\n proto$2.months = months;\n proto$2.years = years;\n proto$2.humanize = humanize;\n proto$2.toISOString = toISOString$1;\n proto$2.toString = toISOString$1;\n proto$2.toJSON = toISOString$1;\n proto$2.locale = locale;\n proto$2.localeData = localeData;\n proto$2.toIsoString = deprecate('toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)', toISOString$1);\n proto$2.lang = lang; // Side effect imports\n // FORMATTING\n\n addFormatToken('X', 0, 0, 'unix');\n addFormatToken('x', 0, 0, 'valueOf'); // PARSING\n\n addRegexToken('x', matchSigned);\n addRegexToken('X', matchTimestamp);\n addParseToken('X', function (input, array, config) {\n config._d = new Date(parseFloat(input, 10) * 1000);\n });\n addParseToken('x', function (input, array, config) {\n config._d = new Date(toInt(input));\n }); // Side effect imports\n\n hooks.version = '2.24.0';\n setHookCallback(createLocal);\n hooks.fn = proto;\n hooks.min = min;\n hooks.max = max;\n hooks.now = now;\n hooks.utc = createUTC;\n hooks.unix = createUnix;\n hooks.months = listMonths;\n hooks.isDate = isDate;\n hooks.locale = getSetGlobalLocale;\n hooks.invalid = createInvalid;\n hooks.duration = createDuration;\n hooks.isMoment = isMoment;\n hooks.weekdays = listWeekdays;\n hooks.parseZone = createInZone;\n hooks.localeData = getLocale;\n hooks.isDuration = isDuration;\n hooks.monthsShort = listMonthsShort;\n hooks.weekdaysMin = listWeekdaysMin;\n hooks.defineLocale = defineLocale;\n hooks.updateLocale = updateLocale;\n hooks.locales = listLocales;\n hooks.weekdaysShort = listWeekdaysShort;\n hooks.normalizeUnits = normalizeUnits;\n hooks.relativeTimeRounding = getSetRelativeTimeRounding;\n hooks.relativeTimeThreshold = getSetRelativeTimeThreshold;\n hooks.calendarFormat = getCalendarFormat;\n hooks.prototype = proto; // currently HTML5 input type only supports 24-hour formats\n\n hooks.HTML5_FMT = {\n DATETIME_LOCAL: 'YYYY-MM-DDTHH:mm',\n // \n DATETIME_LOCAL_SECONDS: 'YYYY-MM-DDTHH:mm:ss',\n // \n DATETIME_LOCAL_MS: 'YYYY-MM-DDTHH:mm:ss.SSS',\n // \n DATE: 'YYYY-MM-DD',\n // \n TIME: 'HH:mm',\n // \n TIME_SECONDS: 'HH:mm:ss',\n // \n TIME_MS: 'HH:mm:ss.SSS',\n // \n WEEK: 'GGGG-[W]WW',\n // \n MONTH: 'YYYY-MM' // \n\n };\n return hooks;\n });\n}); // Maps for number <-> hex string conversion\n\nvar byteToHex$2 = [];\n\nfor (var i$2 = 0; i$2 < 256; i$2++) {\n byteToHex$2[i$2] = (i$2 + 0x100).toString(16).substr(1);\n}\n/**\n * Generate 16 random bytes to be used as a base for UUID.\n *\n * @ignore\n */\n\n\nvar random$1 = function () {\n if (typeof crypto !== 'undefined' && crypto.getRandomValues) {\n // WHATWG crypto-based RNG - http://wiki.whatwg.org/wiki/Crypto\n // Moderately fast, high quality\n var _rnds8 = new Uint8Array(16);\n\n return function whatwgRNG() {\n crypto.getRandomValues(_rnds8);\n return _rnds8;\n };\n } // Math.random()-based (RNG)\n //\n // If all else fails, use Math.random().\n // It's fast, but is of unspecified quality.\n\n\n var _rnds = new Array(16);\n\n return function () {\n for (var i = 0, r; i < 16; i++) {\n if ((i & 0x03) === 0) {\n r = Math.random() * 0x100000000;\n }\n\n _rnds[i] = r >>> ((i & 0x03) << 3) & 0xff;\n }\n\n return _rnds;\n }; // uuid.js\n //\n // Copyright (c) 2010-2012 Robert Kieffer\n // MIT License - http://opensource.org/licenses/mit-license.php\n // Unique ID creation requires a high quality random # generator. We feature\n // detect to determine the best RNG source, normalizing to a function that\n // returns 128-bits of randomness, since that's what's usually required\n // return require('./rng');\n}();\n\nvar byteToHex$1$1 = [];\n\nfor (var i$1$1 = 0; i$1$1 < 256; i$1$1++) {\n byteToHex$1$1[i$1$1] = (i$1$1 + 0x100).toString(16).substr(1);\n} // **`v1()` - Generate time-based UUID**\n//\n// Inspired by https://github.com/LiosK/UUID.js\n// and http://docs.python.org/library/uuid.html\n// random #'s we need to init node and clockseq\n\n\nvar seedBytes$1 = random$1(); // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)\n\nvar defaultNodeId$1 = [seedBytes$1[0] | 0x01, seedBytes$1[1], seedBytes$1[2], seedBytes$1[3], seedBytes$1[4], seedBytes$1[5]]; // Per 4.2.2, randomize (14 bit) clockseq\n\nvar defaultClockseq$1 = (seedBytes$1[6] << 8 | seedBytes$1[7]) & 0x3fff; // Previous uuid creation time\n// for example '/Date(1198908717056)/' or '/Date(1198908717056-0700)/'\n// code from http://momentjs.com/\n\n\nvar ASPDateRegex = /^\\/?Date\\((-?\\d+)/i; // Hex color\n/**\n * Hue, Saturation, Value.\n */\n\n/**\n * Test whether given object is a number\n *\n * @param value - Input value of unknown type.\n *\n * @returns True if number, false otherwise.\n */\n\nfunction isNumber(value) {\n return value instanceof Number || typeof value === 'number';\n}\n/**\n * Test whether given object is a string\n *\n * @param value - Input value of unknown type.\n *\n * @returns True if string, false otherwise.\n */\n\n\nfunction isString(value) {\n return value instanceof String || typeof value === 'string';\n}\n/**\n * Test whether given object is a Moment date.\n * @TODO: This is basically a workaround, if Moment was imported property it wouldn't necessary as moment.isMoment is a TS type guard.\n *\n * @param value - Input value of unknown type.\n *\n * @returns True if Moment instance, false otherwise.\n */\n\n\nfunction isMoment(value) {\n return moment.isMoment(value);\n}\n/**\n * Convert an object into another type\n *\n * @param object - Value of unknown type.\n * @param type - Name of the desired type.\n *\n * @returns Object in the desired type.\n * @throws Error\n */\n\n\nfunction convert(object, type) {\n var match;\n\n if (object === undefined) {\n return undefined;\n }\n\n if (object === null) {\n return null;\n }\n\n if (!type) {\n return object;\n }\n\n if (!(typeof type === 'string') && !(type instanceof String)) {\n throw new Error('Type must be a string');\n } //noinspection FallthroughInSwitchStatementJS\n\n\n switch (type) {\n case 'boolean':\n case 'Boolean':\n return Boolean(object);\n\n case 'number':\n case 'Number':\n if (isString(object) && !isNaN(Date.parse(object))) {\n return moment(object).valueOf();\n } else {\n // @TODO: I don't think that Number and String constructors are a good idea.\n // This could also fail if the object doesn't have valueOf method or if it's redefined.\n // For example: Object.create(null) or { valueOf: 7 }.\n return Number(object.valueOf());\n }\n\n case 'string':\n case 'String':\n return String(object);\n\n case 'Date':\n if (isNumber(object)) {\n return new Date(object);\n }\n\n if (object instanceof Date) {\n return new Date(object.valueOf());\n } else if (isMoment(object)) {\n return new Date(object.valueOf());\n }\n\n if (isString(object)) {\n match = ASPDateRegex.exec(object);\n\n if (match) {\n // object is an ASP date\n return new Date(Number(match[1])); // parse number\n } else {\n return moment(new Date(object)).toDate(); // parse string\n }\n } else {\n throw new Error('Cannot convert object of type ' + getType(object) + ' to type Date');\n }\n\n case 'Moment':\n if (isNumber(object)) {\n return moment(object);\n }\n\n if (object instanceof Date) {\n return moment(object.valueOf());\n } else if (isMoment(object)) {\n return moment(object);\n }\n\n if (isString(object)) {\n match = ASPDateRegex.exec(object);\n\n if (match) {\n // object is an ASP date\n return moment(Number(match[1])); // parse number\n } else {\n return moment(object); // parse string\n }\n } else {\n throw new Error('Cannot convert object of type ' + getType(object) + ' to type Date');\n }\n\n case 'ISODate':\n if (isNumber(object)) {\n return new Date(object);\n } else if (object instanceof Date) {\n return object.toISOString();\n } else if (isMoment(object)) {\n return object.toDate().toISOString();\n } else if (isString(object)) {\n match = ASPDateRegex.exec(object);\n\n if (match) {\n // object is an ASP date\n return new Date(Number(match[1])).toISOString(); // parse number\n } else {\n return moment(object).format(); // ISO 8601\n }\n } else {\n throw new Error('Cannot convert object of type ' + getType(object) + ' to type ISODate');\n }\n\n case 'ASPDate':\n if (isNumber(object)) {\n return '/Date(' + object + ')/';\n } else if (object instanceof Date) {\n return '/Date(' + object.valueOf() + ')/';\n } else if (isString(object)) {\n match = ASPDateRegex.exec(object);\n\n var _value;\n\n if (match) {\n // object is an ASP date\n _value = new Date(Number(match[1])).valueOf(); // parse number\n } else {\n _value = new Date(object).valueOf(); // parse string\n }\n\n return '/Date(' + _value + ')/';\n } else {\n throw new Error('Cannot convert object of type ' + getType(object) + ' to type ASPDate');\n }\n\n default:\n var never = type;\n throw new Error(\"Unknown type \".concat(never));\n }\n}\n/**\n * Get the type of an object, for example exports.getType([]) returns 'Array'\n *\n * @param object - Input value of unknown type.\n *\n * @returns Detected type.\n */\n\n\nfunction getType(object) {\n var type = _typeof(object);\n\n if (type === 'object') {\n if (object === null) {\n return 'null';\n }\n\n if (object instanceof Boolean) {\n return 'Boolean';\n }\n\n if (object instanceof Number) {\n return 'Number';\n }\n\n if (object instanceof String) {\n return 'String';\n }\n\n if (Array.isArray(object)) {\n return 'Array';\n }\n\n if (object instanceof Date) {\n return 'Date';\n }\n\n return 'Object';\n }\n\n if (type === 'number') {\n return 'Number';\n }\n\n if (type === 'boolean') {\n return 'Boolean';\n }\n\n if (type === 'string') {\n return 'String';\n }\n\n if (type === undefined) {\n return 'undefined';\n }\n\n return type;\n}\n\n/**\r\n * Determine whether a value can be used as an id.\r\n *\r\n * @param value - Input value of unknown type.\r\n *\r\n * @returns True if the value is valid id, false otherwise.\r\n */\nfunction isId(value) {\n return typeof value === 'string' || typeof value === 'number';\n}\n\n/**\r\n * A queue.\r\n *\r\n * @typeParam T - The type of method names to be replaced by queued versions.\r\n */\nvar Queue =\n/*#__PURE__*/\nfunction () {\n /**\r\n * Construct a new Queue.\r\n *\r\n * @param options - Queue configuration.\r\n */\n function Queue(options) {\n classCallCheck(this, Queue);\n\n this._queue = [];\n this._timeout = null;\n this._extended = null; // options\n\n this.delay = null;\n this.max = Infinity;\n this.setOptions(options);\n }\n /**\r\n * Update the configuration of the queue.\r\n *\r\n * @param options - Queue configuration.\r\n */\n\n\n createClass(Queue, [{\n key: \"setOptions\",\n value: function setOptions(options) {\n if (options && typeof options.delay !== 'undefined') {\n this.delay = options.delay;\n }\n\n if (options && typeof options.max !== 'undefined') {\n this.max = options.max;\n }\n\n this._flushIfNeeded();\n }\n /**\r\n * Extend an object with queuing functionality.\r\n * The object will be extended with a function flush, and the methods provided in options.replace will be replaced with queued ones.\r\n *\r\n * @param object - The object to be extended.\r\n * @param options - Additional options.\r\n *\r\n * @returns The created queue.\r\n */\n\n }, {\n key: \"destroy\",\n\n /**\r\n * Destroy the queue. The queue will first flush all queued actions, and in case it has extended an object, will restore the original object.\r\n */\n value: function destroy() {\n this.flush();\n\n if (this._extended) {\n var object = this._extended.object;\n var methods = this._extended.methods;\n\n for (var i = 0; i < methods.length; i++) {\n var method = methods[i];\n\n if (method.original) {\n object[method.name] = method.original;\n } else {\n // @TODO: better solution?\n delete object[method.name];\n }\n }\n\n this._extended = null;\n }\n }\n /**\r\n * Replace a method on an object with a queued version.\r\n *\r\n * @param object - Object having the method.\r\n * @param method - The method name.\r\n */\n\n }, {\n key: \"replace\",\n value: function replace(object, method) {\n var me = this;\n var original = object[method];\n\n if (!original) {\n throw new Error('Method ' + method + ' undefined');\n }\n\n object[method] = function () {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n // add this call to the queue\n me.queue({\n args: args,\n fn: original,\n context: this\n });\n };\n }\n /**\r\n * Queue a call.\r\n *\r\n * @param entry - The function or entry to be queued.\r\n */\n\n }, {\n key: \"queue\",\n value: function queue(entry) {\n if (typeof entry === 'function') {\n this._queue.push({\n fn: entry\n });\n } else {\n this._queue.push(entry);\n }\n\n this._flushIfNeeded();\n }\n /**\r\n * Check whether the queue needs to be flushed.\r\n */\n\n }, {\n key: \"_flushIfNeeded\",\n value: function _flushIfNeeded() {\n var _this = this;\n\n // flush when the maximum is exceeded.\n if (this._queue.length > this.max) {\n this.flush();\n } // flush after a period of inactivity when a delay is configured\n\n\n if (this._timeout != null) {\n clearTimeout(this._timeout);\n this._timeout = null;\n }\n\n if (this.queue.length > 0 && typeof this.delay === 'number') {\n this._timeout = setTimeout(function () {\n _this.flush();\n }, this.delay);\n }\n }\n /**\r\n * Flush all queued calls\r\n */\n\n }, {\n key: \"flush\",\n value: function flush() {\n this._queue.splice(0).forEach(function (entry) {\n entry.fn.apply(entry.context || entry.fn, entry.args || []);\n });\n }\n }], [{\n key: \"extend\",\n value: function extend(object, options) {\n var queue = new Queue(options);\n\n if (object.flush !== undefined) {\n throw new Error('Target object already has a property flush');\n }\n\n object.flush = function () {\n queue.flush();\n };\n\n var methods = [{\n name: 'flush',\n original: undefined\n }];\n\n if (options && options.replace) {\n for (var i = 0; i < options.replace.length; i++) {\n var name = options.replace[i];\n methods.push({\n name: name,\n // @TODO: better solution?\n original: object[name]\n }); // @TODO: better solution?\n\n queue.replace(object, name);\n }\n }\n\n queue._extended = {\n object: object,\n methods: methods\n };\n return queue;\n }\n }]);\n\n return Queue;\n}();\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) {\n for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n }\n}\n\nvar arrayWithoutHoles = _arrayWithoutHoles;\n\nfunction _iterableToArray(iter) {\n if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === \"[object Arguments]\") return Array.from(iter);\n}\n\nvar iterableToArray = _iterableToArray;\n\nfunction _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance\");\n}\n\nvar nonIterableSpread = _nonIterableSpread;\n\nfunction _toConsumableArray(arr) {\n return arrayWithoutHoles(arr) || iterableToArray(arr) || nonIterableSpread();\n}\n\nvar toConsumableArray = _toConsumableArray;\n\n/**\r\n * [[DataSet]] code that can be reused in [[DataView]] or other similar implementations of [[DataInterface]].\r\n *\r\n * @typeParam Item - Item type that may or may not have an id.\r\n * @typeParam IdProp - Name of the property that contains the id.\r\n */\nvar DataSetPart =\n/*#__PURE__*/\nfunction () {\n function DataSetPart() {\n classCallCheck(this, DataSetPart);\n\n this._subscribers = {\n '*': [],\n add: [],\n remove: [],\n update: []\n };\n /**\r\n * @deprecated Use on instead (PS: DataView.subscribe === DataView.on).\r\n */\n\n this.subscribe = DataSetPart.prototype.on;\n /**\r\n * @deprecated Use off instead (PS: DataView.unsubscribe === DataView.off).\r\n */\n\n this.unsubscribe = DataSetPart.prototype.off;\n }\n /**\r\n * Trigger an event\r\n *\r\n * @param event - Event name.\r\n * @param payload - Event payload.\r\n * @param senderId - Id of the sender.\r\n */\n\n\n createClass(DataSetPart, [{\n key: \"_trigger\",\n value: function _trigger(event, payload, senderId) {\n if (event === '*') {\n throw new Error('Cannot trigger event *');\n }\n\n var subscribers = [].concat(toConsumableArray(this._subscribers[event]), toConsumableArray(this._subscribers['*']));\n\n for (var i = 0, len = subscribers.length; i < len; i++) {\n var subscriber = subscribers[i];\n\n if (subscriber.callback) {\n subscriber.callback(event, payload, senderId != null ? senderId : null);\n }\n }\n }\n /**\r\n * Subscribe to an event, add an event listener.\r\n *\r\n * @param event - Event name.\r\n * @param callback - Callback method.\r\n */\n\n }, {\n key: \"on\",\n value: function on(event, callback) {\n this._subscribers[event].push({\n callback: callback\n });\n }\n /**\r\n * Unsubscribe from an event, remove an event listener.\r\n *\r\n * @remarks If the same callback was subscribed more than once **all** occurences will be removed.\r\n *\r\n * @param event - Event name.\r\n * @param callback - Callback method.\r\n */\n\n }, {\n key: \"off\",\n value: function off(event, callback) {\n this._subscribers[event] = this._subscribers[event].filter(function (listener) {\n return listener.callback !== callback;\n });\n }\n }]);\n\n return DataSetPart;\n}();\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { keys.push.apply(keys, Object.getOwnPropertySymbols(object)); } if (enumerableOnly) keys = keys.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n/**\r\n * # DataSet\r\n *\r\n * Vis.js comes with a flexible DataSet, which can be used to hold and manipulate unstructured data and listen for changes in the data. The DataSet is key/value based. Data items can be added, updated and removed from the DataSet, and one can subscribe to changes in the DataSet. The data in the DataSet can be filtered and ordered, and fields (like dates) can be converted to a specific type. Data can be normalized when appending it to the DataSet as well.\r\n *\r\n * ## Example\r\n *\r\n * The following example shows how to use a DataSet.\r\n *\r\n * ```javascript\r\n * // create a DataSet\r\n * var options = {};\r\n * var data = new vis.DataSet(options);\r\n *\r\n * // add items\r\n * // note that the data items can contain different properties and data formats\r\n * data.add([\r\n * {id: 1, text: 'item 1', date: new Date(2013, 6, 20), group: 1, first: true},\r\n * {id: 2, text: 'item 2', date: '2013-06-23', group: 2},\r\n * {id: 3, text: 'item 3', date: '2013-06-25', group: 2},\r\n * {id: 4, text: 'item 4'}\r\n * ]);\r\n *\r\n * // subscribe to any change in the DataSet\r\n * data.on('*', function (event, properties, senderId) {\r\n * console.log('event', event, properties);\r\n * });\r\n *\r\n * // update an existing item\r\n * data.update({id: 2, group: 1});\r\n *\r\n * // remove an item\r\n * data.remove(4);\r\n *\r\n * // get all ids\r\n * var ids = data.getIds();\r\n * console.log('ids', ids);\r\n *\r\n * // get a specific item\r\n * var item1 = data.get(1);\r\n * console.log('item1', item1);\r\n *\r\n * // retrieve a filtered subset of the data\r\n * var items = data.get({\r\n * filter: function (item) {\r\n * return item.group == 1;\r\n * }\r\n * });\r\n * console.log('filtered items', items);\r\n *\r\n * // retrieve formatted items\r\n * var items = data.get({\r\n * fields: ['id', 'date'],\r\n * type: {\r\n * date: 'ISODate'\r\n * }\r\n * });\r\n * console.log('formatted items', items);\r\n * ```\r\n *\r\n * @typeParam Item - Item type that may or may not have an id.\r\n * @typeParam IdProp - Name of the property that contains the id.\r\n */\n\nvar DataSet =\n/*#__PURE__*/\nfunction (_DataSetPart) {\n inherits(DataSet, _DataSetPart);\n\n /**\r\n * Construct a new DataSet.\r\n *\r\n * @param data - Initial data or options.\r\n * @param options - Options (type error if data is also options).\r\n */\n function DataSet(data, options) {\n var _this;\n\n classCallCheck(this, DataSet);\n\n _this = possibleConstructorReturn(this, getPrototypeOf(DataSet).call(this)); // correctly read optional arguments\n\n if (data && !Array.isArray(data)) {\n options = data;\n data = [];\n }\n\n _this._options = options || {};\n _this._data = Object.create({}); // map with data indexed by id\n\n _this.length = 0; // number of items in the DataSet\n\n _this._idProp = _this._options.fieldId || 'id'; // name of the field containing id\n\n _this._type = {}; // internal field types (NOTE: this can differ from this._options.type)\n // all variants of a Date are internally stored as Date, so we can convert\n // from everything to everything (also from ISODate to Number for example)\n\n if (_this._options.type) {\n var fields = Object.keys(_this._options.type);\n\n for (var i = 0, len = fields.length; i < len; i++) {\n var field = fields[i];\n var value = _this._options.type[field];\n\n if (value == 'Date' || value == 'ISODate' || value == 'ASPDate') {\n _this._type[field] = 'Date';\n } else {\n _this._type[field] = value;\n }\n }\n } // add initial data when provided\n\n\n if (data && data.length) {\n _this.add(data);\n }\n\n _this.setOptions(options);\n\n return _this;\n }\n /**\r\n * Set new options.\r\n *\r\n * @param options - The new options.\r\n */\n\n\n createClass(DataSet, [{\n key: \"setOptions\",\n value: function setOptions(options) {\n if (options && options.queue !== undefined) {\n if (options.queue === false) {\n // delete queue if loaded\n if (this._queue) {\n this._queue.destroy();\n\n delete this._queue;\n }\n } else {\n // create queue and update its options\n if (!this._queue) {\n this._queue = Queue.extend(this, {\n replace: ['add', 'update', 'remove']\n });\n }\n\n if (options.queue && _typeof_1(options.queue) === 'object') {\n this._queue.setOptions(options.queue);\n }\n }\n }\n }\n /**\r\n * Add a data item or an array with items.\r\n *\r\n * After the items are added to the DataSet, the DataSet will trigger an event `add`. When a `senderId` is provided, this id will be passed with the triggered event to all subscribers.\r\n *\r\n * ## Example\r\n *\r\n * ```javascript\r\n * // create a DataSet\r\n * const data = new vis.DataSet()\r\n *\r\n * // add items\r\n * const ids = data.add([\r\n * { id: 1, text: 'item 1' },\r\n * { id: 2, text: 'item 2' },\r\n * { text: 'item without an id' }\r\n * ])\r\n *\r\n * console.log(ids) // [1, 2, '']\r\n * ```\r\n *\r\n * @param data - Items to be added (ids will be generated if missing).\r\n * @param senderId - Sender id.\r\n *\r\n * @returns addedIds - Array with the ids (generated if not present) of the added items.\r\n *\r\n * @throws When an item with the same id as any of the added items already exists.\r\n */\n\n }, {\n key: \"add\",\n value: function add(data, senderId) {\n var addedIds = [];\n var id;\n\n if (Array.isArray(data)) {\n // Array\n for (var i = 0, len = data.length; i < len; i++) {\n id = this._addItem(data[i]);\n addedIds.push(id);\n }\n } else if (data && _typeof_1(data) === 'object') {\n // Single item\n id = this._addItem(data);\n addedIds.push(id);\n } else {\n throw new Error('Unknown dataType');\n }\n\n if (addedIds.length) {\n this._trigger('add', {\n items: addedIds\n }, senderId);\n }\n\n return addedIds;\n }\n /**\r\n * Update existing items. When an item does not exist, it will be created\r\n *\r\n * The provided properties will be merged in the existing item. When an item does not exist, it will be created.\r\n *\r\n * After the items are updated, the DataSet will trigger an event `add` for the added items, and an event `update`. When a `senderId` is provided, this id will be passed with the triggered event to all subscribers.\r\n *\r\n * ## Example\r\n *\r\n * ```javascript\r\n * // create a DataSet\r\n * const data = new vis.DataSet([\r\n * { id: 1, text: 'item 1' },\r\n * { id: 2, text: 'item 2' },\r\n * { id: 3, text: 'item 3' }\r\n * ])\r\n *\r\n * // update items\r\n * const ids = data.update([\r\n * { id: 2, text: 'item 2 (updated)' },\r\n * { id: 4, text: 'item 4 (new)' }\r\n * ])\r\n *\r\n * console.log(ids) // [2, 4]\r\n * ```\r\n *\r\n * @param data - Items to be updated (if the id is already present) or added (if the id is missing).\r\n * @param senderId - Sender id.\r\n *\r\n * @returns updatedIds - The ids of the added (these may be newly generated if there was no id in the item from the data) or updated items.\r\n *\r\n * @throws When the supplied data is neither an item nor an array of items.\r\n */\n\n }, {\n key: \"update\",\n value: function update(data, senderId) {\n var _this2 = this;\n\n var addedIds = [];\n var updatedIds = [];\n var oldData = [];\n var updatedData = [];\n var idProp = this._idProp;\n\n var addOrUpdate = function addOrUpdate(item) {\n var origId = item[idProp];\n\n if (origId != null && _this2._data[origId]) {\n var fullItem = item; // it has an id, therefore it is a fullitem\n\n var oldItem = Object.assign({}, _this2._data[origId]); // update item\n\n var id = _this2._updateItem(fullItem);\n\n updatedIds.push(id);\n updatedData.push(fullItem);\n oldData.push(oldItem);\n } else {\n // add new item\n var _id = _this2._addItem(item);\n\n addedIds.push(_id);\n }\n };\n\n if (Array.isArray(data)) {\n // Array\n for (var i = 0, len = data.length; i < len; i++) {\n if (data[i] && _typeof_1(data[i]) === 'object') {\n addOrUpdate(data[i]);\n } else {\n console.warn('Ignoring input item, which is not an object at index ' + i);\n }\n }\n } else if (data && _typeof_1(data) === 'object') {\n // Single item\n addOrUpdate(data);\n } else {\n throw new Error('Unknown dataType');\n }\n\n if (addedIds.length) {\n this._trigger('add', {\n items: addedIds\n }, senderId);\n }\n\n if (updatedIds.length) {\n var props = {\n items: updatedIds,\n oldData: oldData,\n data: updatedData\n }; // TODO: remove deprecated property 'data' some day\n //Object.defineProperty(props, 'data', {\n // 'get': (function() {\n // console.warn('Property data is deprecated. Use DataSet.get(ids) to retrieve the new data, use the oldData property on this object to get the old data');\n // return updatedData;\n // }).bind(this)\n //});\n\n this._trigger('update', props, senderId);\n }\n\n return addedIds.concat(updatedIds);\n }\n /** @inheritdoc */\n\n }, {\n key: \"get\",\n value: function get(first, second) {\n // @TODO: Woudn't it be better to split this into multiple methods?\n // parse the arguments\n var id = undefined;\n var ids = undefined;\n var options = undefined;\n\n if (isId(first)) {\n // get(id [, options])\n id = first;\n options = second;\n } else if (Array.isArray(first)) {\n // get(ids [, options])\n ids = first;\n options = second;\n } else {\n // get([, options])\n options = first;\n } // determine the return type\n\n\n var returnType = options && options.returnType === 'Object' ? 'Object' : 'Array'; // @TODO: WTF is this? Or am I missing something?\n // var returnType\n // if (options && options.returnType) {\n // var allowedValues = ['Array', 'Object']\n // returnType =\n // allowedValues.indexOf(options.returnType) == -1\n // ? 'Array'\n // : options.returnType\n // } else {\n // returnType = 'Array'\n // }\n // build options\n\n var type = options && options.type || this._options.type;\n var filter = options && options.filter;\n var items = [];\n var item = null;\n var itemIds = null;\n var itemId = null; // convert items\n\n if (id != null) {\n // return a single item\n item = this._getItem(id, type);\n\n if (item && filter && !filter(item)) {\n item = null;\n }\n } else if (ids != null) {\n // return a subset of items\n for (var i = 0, len = ids.length; i < len; i++) {\n item = this._getItem(ids[i], type);\n\n if (item != null && (!filter || filter(item))) {\n items.push(item);\n }\n }\n } else {\n // return all items\n itemIds = Object.keys(this._data);\n\n for (var _i = 0, _len = itemIds.length; _i < _len; _i++) {\n itemId = itemIds[_i];\n item = this._getItem(itemId, type);\n\n if (item != null && (!filter || filter(item))) {\n items.push(item);\n }\n }\n } // order the results\n\n\n if (options && options.order && id == undefined) {\n this._sort(items, options.order);\n } // filter fields of the items\n\n\n if (options && options.fields) {\n var fields = options.fields;\n\n if (id != undefined && item != null) {\n item = this._filterFields(item, fields);\n } else {\n for (var _i2 = 0, _len2 = items.length; _i2 < _len2; _i2++) {\n items[_i2] = this._filterFields(items[_i2], fields);\n }\n }\n } // return the results\n\n\n if (returnType == 'Object') {\n var result = {};\n\n for (var _i3 = 0, _len3 = items.length; _i3 < _len3; _i3++) {\n var resultant = items[_i3]; // @TODO: Shoudn't this be this._fieldId?\n // result[resultant.id] = resultant\n\n var _id2 = resultant[this._idProp];\n result[_id2] = resultant;\n }\n\n return result;\n } else {\n if (id != null) {\n // a single item\n return item;\n } else {\n // just return our array\n return items;\n }\n }\n }\n /** @inheritdoc */\n\n }, {\n key: \"getIds\",\n value: function getIds(options) {\n var data = this._data;\n var filter = options && options.filter;\n var order = options && options.order;\n var type = options && options.type || this._options.type;\n var itemIds = Object.keys(data);\n var ids = [];\n var item;\n var items;\n\n if (filter) {\n // get filtered items\n if (order) {\n // create ordered list\n items = [];\n\n for (var i = 0, len = itemIds.length; i < len; i++) {\n var id = itemIds[i];\n item = this._getItem(id, type);\n\n if (filter(item)) {\n items.push(item);\n }\n }\n\n this._sort(items, order);\n\n for (var _i4 = 0, _len4 = items.length; _i4 < _len4; _i4++) {\n ids.push(items[_i4][this._idProp]);\n }\n } else {\n // create unordered list\n for (var _i5 = 0, _len5 = itemIds.length; _i5 < _len5; _i5++) {\n var _id3 = itemIds[_i5];\n item = this._getItem(_id3, type);\n\n if (filter(item)) {\n ids.push(item[this._idProp]);\n }\n }\n }\n } else {\n // get all items\n if (order) {\n // create an ordered list\n items = [];\n\n for (var _i6 = 0, _len6 = itemIds.length; _i6 < _len6; _i6++) {\n var _id4 = itemIds[_i6];\n items.push(data[_id4]);\n }\n\n this._sort(items, order);\n\n for (var _i7 = 0, _len7 = items.length; _i7 < _len7; _i7++) {\n ids.push(items[_i7][this._idProp]);\n }\n } else {\n // create unordered list\n for (var _i8 = 0, _len8 = itemIds.length; _i8 < _len8; _i8++) {\n var _id5 = itemIds[_i8];\n item = data[_id5];\n ids.push(item[this._idProp]);\n }\n }\n }\n\n return ids;\n }\n /** @inheritdoc */\n\n }, {\n key: \"getDataSet\",\n value: function getDataSet() {\n return this;\n }\n /** @inheritdoc */\n\n }, {\n key: \"forEach\",\n value: function forEach(callback, options) {\n var filter = options && options.filter;\n var type = options && options.type || this._options.type;\n var data = this._data;\n var itemIds = Object.keys(data);\n\n if (options && options.order) {\n // execute forEach on ordered list\n var items = this.get(options);\n\n for (var i = 0, len = items.length; i < len; i++) {\n var item = items[i];\n var id = item[this._idProp];\n callback(item, id);\n }\n } else {\n // unordered\n for (var _i9 = 0, _len9 = itemIds.length; _i9 < _len9; _i9++) {\n var _id6 = itemIds[_i9];\n\n var _item = this._getItem(_id6, type);\n\n if (!filter || filter(_item)) {\n callback(_item, _id6);\n }\n }\n }\n }\n /** @inheritdoc */\n\n }, {\n key: \"map\",\n value: function map(callback, options) {\n var filter = options && options.filter;\n var type = options && options.type || this._options.type;\n var mappedItems = [];\n var data = this._data;\n var itemIds = Object.keys(data); // convert and filter items\n\n for (var i = 0, len = itemIds.length; i < len; i++) {\n var id = itemIds[i];\n\n var item = this._getItem(id, type);\n\n if (!filter || filter(item)) {\n mappedItems.push(callback(item, id));\n }\n } // order items\n\n\n if (options && options.order) {\n this._sort(mappedItems, options.order);\n }\n\n return mappedItems;\n }\n /**\r\n * Filter the fields of an item.\r\n *\r\n * @param item - The item whose fields should be filtered.\r\n * @param fields - The names of the fields that will be kept.\r\n *\r\n * @typeParam K - Field name type.\r\n *\r\n * @returns The item without any additional fields.\r\n */\n\n }, {\n key: \"_filterFields\",\n value: function _filterFields(item, fields) {\n if (!item) {\n // item is null\n return item;\n }\n\n return (Array.isArray(fields) ? // Use the supplied array\n fields : // Use the keys of the supplied object\n Object.keys(fields)).reduce(function (filteredItem, field) {\n filteredItem[field] = item[field];\n return filteredItem;\n }, {});\n }\n /**\r\n * Sort the provided array with items.\r\n *\r\n * @param items - Items to be sorted in place.\r\n * @param order - A field name or custom sort function.\r\n *\r\n * @typeParam T - The type of the items in the items array.\r\n */\n\n }, {\n key: \"_sort\",\n value: function _sort(items, order) {\n if (typeof order === 'string') {\n // order by provided field name\n var name = order; // field name\n\n items.sort(function (a, b) {\n // @TODO: How to treat missing properties?\n var av = a[name];\n var bv = b[name];\n return av > bv ? 1 : av < bv ? -1 : 0;\n });\n } else if (typeof order === 'function') {\n // order by sort function\n items.sort(order);\n } else {\n // TODO: extend order by an Object {field:string, direction:string}\n // where direction can be 'asc' or 'desc'\n throw new TypeError('Order must be a function or a string');\n }\n }\n /**\r\n * Remove an item or multiple items by “reference” (only the id is used) or by id.\r\n *\r\n * The method ignores removal of non-existing items, and returns an array containing the ids of the items which are actually removed from the DataSet.\r\n *\r\n * After the items are removed, the DataSet will trigger an event `remove` for the removed items. When a `senderId` is provided, this id will be passed with the triggered event to all subscribers.\r\n *\r\n * ## Example\r\n * ```javascript\r\n * // create a DataSet\r\n * const data = new vis.DataSet([\r\n * { id: 1, text: 'item 1' },\r\n * { id: 2, text: 'item 2' },\r\n * { id: 3, text: 'item 3' }\r\n * ])\r\n *\r\n * // remove items\r\n * const ids = data.remove([2, { id: 3 }, 4])\r\n *\r\n * console.log(ids) // [2, 3]\r\n * ```\r\n *\r\n * @param id - One or more items or ids of items to be removed.\r\n * @param senderId - Sender id.\r\n *\r\n * @returns The ids of the removed items.\r\n */\n\n }, {\n key: \"remove\",\n value: function remove(id, senderId) {\n var removedIds = [];\n var removedItems = []; // force everything to be an array for simplicity\n\n var ids = Array.isArray(id) ? id : [id];\n\n for (var i = 0, len = ids.length; i < len; i++) {\n var item = this._remove(ids[i]);\n\n if (item) {\n var itemId = item[this._idProp];\n\n if (itemId != null) {\n removedIds.push(itemId);\n removedItems.push(item);\n }\n }\n }\n\n if (removedIds.length) {\n this._trigger('remove', {\n items: removedIds,\n oldData: removedItems\n }, senderId);\n }\n\n return removedIds;\n }\n /**\r\n * Remove an item by its id or reference.\r\n *\r\n * @param id - Id of an item or the item itself.\r\n *\r\n * @returns The removed item if removed, null otherwise.\r\n */\n\n }, {\n key: \"_remove\",\n value: function _remove(id) {\n // @TODO: It origianlly returned the item although the docs say id.\n // The code expects the item, so probably an error in the docs.\n var ident; // confirm the id to use based on the args type\n\n if (isId(id)) {\n ident = id;\n } else if (id && _typeof_1(id) === 'object') {\n ident = id[this._idProp]; // look for the identifier field using ._idProp\n } // do the removing if the item is found\n\n\n if (ident != null && this._data[ident]) {\n var item = this._data[ident];\n delete this._data[ident];\n --this.length;\n return item;\n }\n\n return null;\n }\n /**\r\n * Clear the entire data set.\r\n *\r\n * After the items are removed, the [[DataSet]] will trigger an event `remove` for all removed items. When a `senderId` is provided, this id will be passed with the triggered event to all subscribers.\r\n *\r\n * @param senderId - Sender id.\r\n *\r\n * @returns removedIds - The ids of all removed items.\r\n */\n\n }, {\n key: \"clear\",\n value: function clear(senderId) {\n var ids = Object.keys(this._data);\n var items = [];\n\n for (var i = 0, len = ids.length; i < len; i++) {\n items.push(this._data[ids[i]]);\n }\n\n this._data = {};\n this.length = 0;\n\n this._trigger('remove', {\n items: ids,\n oldData: items\n }, senderId);\n\n return ids;\n }\n /**\r\n * Find the item with maximum value of a specified field.\r\n *\r\n * @param field - Name of the property that should be searched for max value.\r\n *\r\n * @returns Item containing max value, or null if no items.\r\n */\n\n }, {\n key: \"max\",\n value: function max(field) {\n var data = this._data;\n var itemIds = Object.keys(data);\n var max = null;\n var maxField = null;\n\n for (var i = 0, len = itemIds.length; i < len; i++) {\n var id = itemIds[i];\n var item = data[id];\n var itemField = item[field];\n\n if (itemField != null && (maxField == null || itemField > maxField)) {\n max = item;\n maxField = itemField;\n }\n }\n\n return max;\n }\n /**\r\n * Find the item with minimum value of a specified field.\r\n *\r\n * @param field - Name of the property that should be searched for min value.\r\n *\r\n * @returns Item containing min value, or null if no items.\r\n */\n\n }, {\n key: \"min\",\n value: function min(field) {\n var data = this._data;\n var itemIds = Object.keys(data);\n var min = null;\n var minField = null;\n\n for (var i = 0, len = itemIds.length; i < len; i++) {\n var id = itemIds[i];\n var item = data[id];\n var itemField = item[field];\n\n if (itemField != null && (minField == null || itemField < minField)) {\n min = item;\n minField = itemField;\n }\n }\n\n return min;\n }\n /**\r\n * Find all distinct values of a specified field\r\n *\r\n * @param prop - The property name whose distinct values should be returned.\r\n *\r\n * @returns Unordered array containing all distinct values. Items without specified property are ignored.\r\n */\n\n }, {\n key: \"distinct\",\n value: function distinct(prop) {\n var data = this._data;\n var itemIds = Object.keys(data);\n var values = [];\n var fieldType = this._options.type && this._options.type[prop] || null;\n var count = 0;\n\n for (var i = 0, len = itemIds.length; i < len; i++) {\n var id = itemIds[i];\n var item = data[id];\n var value = item[prop];\n var exists = false;\n\n for (var j = 0; j < count; j++) {\n if (values[j] == value) {\n exists = true;\n break;\n }\n }\n\n if (!exists && value !== undefined) {\n values[count] = value;\n count++;\n }\n }\n\n if (fieldType) {\n for (var _i10 = 0, _len10 = values.length; _i10 < _len10; _i10++) {\n values[_i10] = convert(values[_i10], fieldType);\n }\n }\n\n return values;\n }\n /**\r\n * Add a single item. Will fail when an item with the same id already exists.\r\n *\r\n * @param item - A new item to be added.\r\n *\r\n * @returns Added item's id. An id is generated when it is not present in the item.\r\n */\n\n }, {\n key: \"_addItem\",\n value: function _addItem(item) {\n var id = item[this._idProp];\n\n if (id != null) {\n // check whether this id is already taken\n if (this._data[id]) {\n // item already exists\n throw new Error('Cannot add item: item with id ' + id + ' already exists');\n }\n } else {\n // generate an id\n id = uuid4();\n item[this._idProp] = id;\n }\n\n var d = {};\n var fields = Object.keys(item);\n\n for (var i = 0, len = fields.length; i < len; i++) {\n var field = fields[i];\n var fieldType = this._type[field]; // type may be undefined\n\n d[field] = convert(item[field], fieldType);\n }\n\n this._data[id] = d;\n this.length++;\n return id;\n }\n /**\r\n * Get an item. Fields can be converted to a specific type\r\n *\r\n * @param id - Id of the requested item.\r\n * @param types - Property name to type name object map of type converstions.\r\n *\r\n * @returns The item, optionally after type conversion.\r\n */\n\n }, {\n key: \"_getItem\",\n value: function _getItem(id, types) {\n // @TODO: I have no idea how to type this.\n // get the item from the dataset\n var raw = this._data[id];\n\n if (!raw) {\n return null;\n } // convert the items field types\n\n\n var converted;\n var fields = Object.keys(raw);\n\n if (types) {\n converted = {};\n\n for (var i = 0, len = fields.length; i < len; i++) {\n var field = fields[i];\n var value = raw[field];\n converted[field] = convert(value, types[field]);\n }\n } else {\n // no field types specified, no converting needed\n converted = _objectSpread({}, raw);\n }\n\n if (converted[this._idProp] == null) {\n converted[this._idProp] = raw.id;\n }\n\n return converted;\n }\n /**\r\n * Update a single item: merge with existing item.\r\n * Will fail when the item has no id, or when there does not exist an item with the same id.\r\n *\r\n * @param item - The new item\r\n *\r\n * @returns The id of the updated item.\r\n */\n\n }, {\n key: \"_updateItem\",\n value: function _updateItem(item) {\n var id = item[this._idProp];\n\n if (id == null) {\n throw new Error('Cannot update item: item has no id (item: ' + JSON.stringify(item) + ')');\n }\n\n var d = this._data[id];\n\n if (!d) {\n // item doesn't exist\n throw new Error('Cannot update item: no item with id ' + id + ' found');\n } // merge with current item\n\n\n var fields = Object.keys(item);\n\n for (var i = 0, len = fields.length; i < len; i++) {\n var field = fields[i];\n var fieldType = this._type[field] // type may be undefined\n ;\n d[field] = convert(item[field], fieldType);\n }\n\n return id;\n }\n }]);\n\n return DataSet;\n}(DataSetPart);\n\n/**\r\n * DataView\r\n *\r\n * A DataView offers a filtered and/or formatted view on a DataSet. One can subscribe to changes in a DataView, and easily get filtered or formatted data without having to specify filters and field types all the time.\r\n *\r\n * ## Example\r\n * ```javascript\r\n * // create a DataSet\r\n * var data = new vis.DataSet();\r\n * data.add([\r\n * {id: 1, text: 'item 1', date: new Date(2013, 6, 20), group: 1, first: true},\r\n * {id: 2, text: 'item 2', date: '2013-06-23', group: 2},\r\n * {id: 3, text: 'item 3', date: '2013-06-25', group: 2},\r\n * {id: 4, text: 'item 4'}\r\n * ]);\r\n *\r\n * // create a DataView\r\n * // the view will only contain items having a property group with value 1,\r\n * // and will only output fields id, text, and date.\r\n * var view = new vis.DataView(data, {\r\n * filter: function (item) {\r\n * return (item.group == 1);\r\n * },\r\n * fields: ['id', 'text', 'date']\r\n * });\r\n *\r\n * // subscribe to any change in the DataView\r\n * view.on('*', function (event, properties, senderId) {\r\n * console.log('event', event, properties);\r\n * });\r\n *\r\n * // update an item in the data set\r\n * data.update({id: 2, group: 1});\r\n *\r\n * // get all ids in the view\r\n * var ids = view.getIds();\r\n * console.log('ids', ids); // will output [1, 2]\r\n *\r\n * // get all items in the view\r\n * var items = view.get();\r\n * ```\r\n *\r\n * @typeParam Item - Item type that may or may not have an id.\r\n * @typeParam IdProp - Name of the property that contains the id.\r\n */\n\nvar DataView =\n/*#__PURE__*/\nfunction (_DataSetPart) {\n inherits(DataView, _DataSetPart);\n\n /**\r\n * Create a DataView.\r\n *\r\n * @param data - The instance containing data (directly or indirectly).\r\n * @param options - Options to configure this data view.\r\n */\n function DataView(data, options) {\n var _this;\n\n classCallCheck(this, DataView);\n\n _this = possibleConstructorReturn(this, getPrototypeOf(DataView).call(this));\n /** @inheritdoc */\n\n _this.length = 0;\n _this._ids = {}; // ids of the items currently in memory (just contains a boolean true)\n\n _this._options = options || {};\n _this.listener = _this._onEvent.bind(assertThisInitialized(_this));\n\n _this.setData(data);\n\n return _this;\n } // TODO: implement a function .config() to dynamically update things like configured filter\n // and trigger changes accordingly\n\n /**\r\n * Set a data source for the view.\r\n *\r\n * @param data - The instance containing data (directly or indirectly).\r\n */\n\n\n createClass(DataView, [{\n key: \"setData\",\n value: function setData(data) {\n if (this._data) {\n // unsubscribe from current dataset\n if (this._data.off) {\n this._data.off('*', this.listener);\n } // trigger a remove of all items in memory\n\n\n var ids = this._data.getIds({\n filter: this._options.filter\n });\n\n var items = this._data.get(ids);\n\n this._ids = {};\n this.length = 0;\n\n this._trigger('remove', {\n items: ids,\n oldData: items\n });\n }\n\n if (data != null) {\n this._data = data; // trigger an add of all added items\n\n var _ids = this._data.getIds({\n filter: this._options.filter\n });\n\n for (var i = 0, len = _ids.length; i < len; i++) {\n var id = _ids[i];\n this._ids[id] = true;\n }\n\n this.length = _ids.length;\n\n this._trigger('add', {\n items: _ids\n });\n } else {\n this._data = new DataSet();\n } // subscribe to new dataset\n\n\n if (this._data.on) {\n this._data.on('*', this.listener);\n }\n }\n /**\r\n * Refresh the DataView.\r\n * Useful when the DataView has a filter function containing a variable parameter.\r\n */\n\n }, {\n key: \"refresh\",\n value: function refresh() {\n var ids = this._data.getIds({\n filter: this._options.filter\n });\n\n var oldIds = Object.keys(this._ids);\n var newIds = {};\n var addedIds = [];\n var removedIds = [];\n var removedItems = []; // check for additions\n\n for (var i = 0, len = ids.length; i < len; i++) {\n var id = ids[i];\n newIds[id] = true;\n\n if (!this._ids[id]) {\n addedIds.push(id);\n this._ids[id] = true;\n }\n } // check for removals\n\n\n for (var _i = 0, _len = oldIds.length; _i < _len; _i++) {\n var _id = oldIds[_i];\n\n var item = this._data.get(_id);\n\n if (item == null) {\n // @TODO: Investigate.\n // Doesn't happen during tests or examples.\n // Is it really impossible or could it eventually happen?\n // How to handle it if it does? The types guarantee non-nullable items.\n console.error('If you see this, report it please.');\n } else if (!newIds[_id]) {\n removedIds.push(_id);\n removedItems.push(item);\n delete this._ids[_id];\n }\n }\n\n this.length += addedIds.length - removedIds.length; // trigger events\n\n if (addedIds.length) {\n this._trigger('add', {\n items: addedIds\n });\n }\n\n if (removedIds.length) {\n this._trigger('remove', {\n items: removedIds,\n oldData: removedItems\n });\n }\n }\n /** @inheritdoc */\n\n }, {\n key: \"get\",\n value: function get(first, second) {\n if (this._data == null) {\n return null;\n } // parse the arguments\n\n\n var ids = null;\n var options;\n\n if (isId(first) || Array.isArray(first)) {\n ids = first;\n options = second;\n } else {\n options = first;\n } // extend the options with the default options and provided options\n\n\n var viewOptions = Object.assign({}, this._options, options); // create a combined filter method when needed\n\n var thisFilter = this._options.filter;\n var optionsFilter = options && options.filter;\n\n if (thisFilter && optionsFilter) {\n viewOptions.filter = function (item) {\n return thisFilter(item) && optionsFilter(item);\n };\n }\n\n if (ids == null) {\n return this._data.get(viewOptions);\n } else {\n return this._data.get(ids, viewOptions);\n }\n }\n /** @inheritdoc */\n\n }, {\n key: \"getIds\",\n value: function getIds(options) {\n if (this._data.length) {\n var defaultFilter = this._options.filter;\n var optionsFilter = options != null ? options.filter : null;\n var filter;\n\n if (optionsFilter) {\n if (defaultFilter) {\n filter = function filter(item) {\n return defaultFilter(item) && optionsFilter(item);\n };\n } else {\n filter = optionsFilter;\n }\n } else {\n filter = defaultFilter;\n }\n\n return this._data.getIds({\n filter: filter,\n order: options && options.order\n });\n } else {\n return [];\n }\n }\n /** @inheritdoc */\n\n }, {\n key: \"forEach\",\n value: function forEach(callback, options) {\n if (this._data) {\n var defaultFilter = this._options.filter;\n var optionsFilter = options && options.filter;\n var filter;\n\n if (optionsFilter) {\n if (defaultFilter) {\n filter = function filter(item) {\n return defaultFilter(item) && optionsFilter(item);\n };\n } else {\n filter = optionsFilter;\n }\n } else {\n filter = defaultFilter;\n }\n\n this._data.forEach(callback, {\n filter: filter,\n order: options && options.order\n });\n }\n }\n /** @inheritdoc */\n\n }, {\n key: \"map\",\n value: function map(callback, options) {\n if (this._data) {\n var defaultFilter = this._options.filter;\n var optionsFilter = options && options.filter;\n var filter;\n\n if (optionsFilter) {\n if (defaultFilter) {\n filter = function filter(item) {\n return defaultFilter(item) && optionsFilter(item);\n };\n } else {\n filter = optionsFilter;\n }\n } else {\n filter = defaultFilter;\n }\n\n return this._data.map(callback, {\n filter: filter,\n order: options && options.order\n });\n } else {\n return [];\n }\n }\n /** @inheritdoc */\n\n }, {\n key: \"getDataSet\",\n value: function getDataSet() {\n return this._data.getDataSet();\n }\n /**\r\n * Event listener. Will propagate all events from the connected data set to the subscribers of the DataView, but will filter the items and only trigger when there are changes in the filtered data set.\r\n *\r\n * @param event - The name of the event.\r\n * @param params - Parameters of the event.\r\n * @param senderId - Id supplied by the sender.\r\n */\n\n }, {\n key: \"_onEvent\",\n value: function _onEvent(event, params, senderId) {\n if (!params || !params.items || !this._data) {\n return;\n }\n\n var ids = params.items;\n var addedIds = [];\n var updatedIds = [];\n var removedIds = [];\n var oldItems = [];\n var updatedItems = [];\n var removedItems = [];\n\n switch (event) {\n case 'add':\n // filter the ids of the added items\n for (var i = 0, len = ids.length; i < len; i++) {\n var id = ids[i];\n var item = this.get(id);\n\n if (item) {\n this._ids[id] = true;\n addedIds.push(id);\n }\n }\n\n break;\n\n case 'update':\n // determine the event from the views viewpoint: an updated\n // item can be added, updated, or removed from this view.\n for (var _i2 = 0, _len2 = ids.length; _i2 < _len2; _i2++) {\n var _id2 = ids[_i2];\n\n var _item = this.get(_id2);\n\n if (_item) {\n if (this._ids[_id2]) {\n updatedIds.push(_id2);\n updatedItems.push(params.data[_i2]);\n oldItems.push(params.oldData[_i2]);\n } else {\n this._ids[_id2] = true;\n addedIds.push(_id2);\n }\n } else {\n if (this._ids[_id2]) {\n delete this._ids[_id2];\n removedIds.push(_id2);\n removedItems.push(params.oldData[_i2]);\n }\n }\n }\n\n break;\n\n case 'remove':\n // filter the ids of the removed items\n for (var _i3 = 0, _len3 = ids.length; _i3 < _len3; _i3++) {\n var _id3 = ids[_i3];\n\n if (this._ids[_id3]) {\n delete this._ids[_id3];\n removedIds.push(_id3);\n removedItems.push(params.oldData[_i3]);\n }\n }\n\n break;\n }\n\n this.length += addedIds.length - removedIds.length;\n\n if (addedIds.length) {\n this._trigger('add', {\n items: addedIds\n }, senderId);\n }\n\n if (updatedIds.length) {\n this._trigger('update', {\n items: updatedIds,\n oldData: oldItems,\n data: updatedItems\n }, senderId);\n }\n\n if (removedIds.length) {\n this._trigger('remove', {\n items: removedIds,\n oldData: removedItems\n }, senderId);\n }\n }\n }]);\n\n return DataView;\n}(DataSetPart);\n\nvar index = {\n DataSet: DataSet,\n DataView: DataView,\n Queue: Queue\n};\n\nexport default index;\nexport { DataSet, DataView, Queue };\n","/**\n * Canvas shapes used by Network\n */\nif (typeof CanvasRenderingContext2D !== 'undefined') {\n\n /**\n * Draw a circle shape\n *\n * @param {number} x\n * @param {number} y\n * @param {number} r\n */\n CanvasRenderingContext2D.prototype.circle = function (x, y, r) {\n this.beginPath();\n this.arc(x, y, r, 0, 2 * Math.PI, false);\n this.closePath();\n };\n\n /**\n * Draw a square shape\n * @param {number} x horizontal center\n * @param {number} y vertical center\n * @param {number} r size, width and height of the square\n */\n CanvasRenderingContext2D.prototype.square = function (x, y, r) {\n this.beginPath();\n this.rect(x - r, y - r, r * 2, r * 2);\n this.closePath();\n };\n\n /**\n * Draw a triangle shape\n * @param {number} x horizontal center\n * @param {number} y vertical center\n * @param {number} r radius, half the length of the sides of the triangle\n */\n CanvasRenderingContext2D.prototype.triangle = function (x, y, r) {\n // http://en.wikipedia.org/wiki/Equilateral_triangle\n this.beginPath();\n\n // the change in radius and the offset is here to center the shape\n r *= 1.15;\n y += 0.275 * r;\n\n var s = r * 2;\n var s2 = s / 2;\n var ir = Math.sqrt(3) / 6 * s; // radius of inner circle\n var h = Math.sqrt(s * s - s2 * s2); // height\n\n\n this.moveTo(x, y - (h - ir));\n this.lineTo(x + s2, y + ir);\n this.lineTo(x - s2, y + ir);\n this.lineTo(x, y - (h - ir));\n this.closePath();\n\n\n };\n\n /**\n * Draw a triangle shape in downward orientation\n * @param {number} x horizontal center\n * @param {number} y vertical center\n * @param {number} r radius\n */\n CanvasRenderingContext2D.prototype.triangleDown = function (x, y, r) {\n // http://en.wikipedia.org/wiki/Equilateral_triangle\n this.beginPath();\n\n // the change in radius and the offset is here to center the shape\n r *= 1.15;\n y -= 0.275 * r;\n\n var s = r * 2;\n var s2 = s / 2;\n var ir = Math.sqrt(3) / 6 * s; // radius of inner circle\n var h = Math.sqrt(s * s - s2 * s2); // height\n\n this.moveTo(x, y + (h - ir));\n this.lineTo(x + s2, y - ir);\n this.lineTo(x - s2, y - ir);\n this.lineTo(x, y + (h - ir));\n this.closePath();\n };\n\n /**\n * Draw a star shape, a star with 5 points\n * @param {number} x horizontal center\n * @param {number} y vertical center\n * @param {number} r radius, half the length of the sides of the triangle\n */\n CanvasRenderingContext2D.prototype.star = function (x, y, r) {\n // http://www.html5canvastutorials.com/labs/html5-canvas-star-spinner/\n this.beginPath();\n\n // the change in radius and the offset is here to center the shape\n r *= 0.82;\n y += 0.1 * r;\n\n for (var n = 0; n < 10; n++) {\n var radius = (n % 2 === 0) ? r * 1.3 : r * 0.5;\n this.lineTo(\n x + radius * Math.sin(n * 2 * Math.PI / 10),\n y - radius * Math.cos(n * 2 * Math.PI / 10)\n );\n }\n\n this.closePath();\n };\n\n /**\n * Draw a Diamond shape\n * @param {number} x horizontal center\n * @param {number} y vertical center\n * @param {number} r radius, half the length of the sides of the triangle\n */\n CanvasRenderingContext2D.prototype.diamond = function (x, y, r) {\n // http://www.html5canvastutorials.com/labs/html5-canvas-star-spinner/\n this.beginPath();\n\n this.lineTo(x, y + r);\n this.lineTo(x + r, y);\n this.lineTo(x, y - r);\n this.lineTo(x - r, y);\n\n\n this.closePath();\n };\n\n /**\n * http://stackoverflow.com/questions/1255512/how-to-draw-a-rounded-rectangle-on-html-canvas\n *\n * @param {number} x\n * @param {number} y\n * @param {number} w\n * @param {number} h\n * @param {number} r\n */\n CanvasRenderingContext2D.prototype.roundRect = function (x, y, w, h, r) {\n var r2d = Math.PI / 180;\n if (w - ( 2 * r ) < 0) {\n r = ( w / 2 );\n } //ensure that the radius isn't too large for x\n if (h - ( 2 * r ) < 0) {\n r = ( h / 2 );\n } //ensure that the radius isn't too large for y\n this.beginPath();\n this.moveTo(x + r, y);\n this.lineTo(x + w - r, y);\n this.arc(x + w - r, y + r, r, r2d * 270, r2d * 360, false);\n this.lineTo(x + w, y + h - r);\n this.arc(x + w - r, y + h - r, r, 0, r2d * 90, false);\n this.lineTo(x + r, y + h);\n this.arc(x + r, y + h - r, r, r2d * 90, r2d * 180, false);\n this.lineTo(x, y + r);\n this.arc(x + r, y + r, r, r2d * 180, r2d * 270, false);\n this.closePath();\n };\n\n /**\n * http://stackoverflow.com/questions/2172798/how-to-draw-an-oval-in-html5-canvas\n *\n * Postfix '_vis' added to discern it from standard method ellipse().\n *\n * @param {number} x\n * @param {number} y\n * @param {number} w\n * @param {number} h\n */\n CanvasRenderingContext2D.prototype.ellipse_vis = function (x, y, w, h) {\n var kappa = .5522848,\n ox = (w / 2) * kappa, // control point offset horizontal\n oy = (h / 2) * kappa, // control point offset vertical\n xe = x + w, // x-end\n ye = y + h, // y-end\n xm = x + w / 2, // x-middle\n ym = y + h / 2; // y-middle\n\n this.beginPath();\n this.moveTo(x, ym);\n this.bezierCurveTo(x, ym - oy, xm - ox, y, xm, y);\n this.bezierCurveTo(xm + ox, y, xe, ym - oy, xe, ym);\n this.bezierCurveTo(xe, ym + oy, xm + ox, ye, xm, ye);\n this.bezierCurveTo(xm - ox, ye, x, ym + oy, x, ym);\n this.closePath();\n };\n\n\n /**\n * http://stackoverflow.com/questions/2172798/how-to-draw-an-oval-in-html5-canvas\n *\n * @param {number} x\n * @param {number} y\n * @param {number} w\n * @param {number} h\n */\n CanvasRenderingContext2D.prototype.database = function (x, y, w, h) {\n var f = 1 / 3;\n var wEllipse = w;\n var hEllipse = h * f;\n\n var kappa = .5522848,\n ox = (wEllipse / 2) * kappa, // control point offset horizontal\n oy = (hEllipse / 2) * kappa, // control point offset vertical\n xe = x + wEllipse, // x-end\n ye = y + hEllipse, // y-end\n xm = x + wEllipse / 2, // x-middle\n ym = y + hEllipse / 2, // y-middle\n ymb = y + (h - hEllipse / 2), // y-midlle, bottom ellipse\n yeb = y + h; // y-end, bottom ellipse\n\n this.beginPath();\n this.moveTo(xe, ym);\n\n this.bezierCurveTo(xe, ym + oy, xm + ox, ye, xm, ye);\n this.bezierCurveTo(xm - ox, ye, x, ym + oy, x, ym);\n\n this.bezierCurveTo(x, ym - oy, xm - ox, y, xm, y);\n this.bezierCurveTo(xm + ox, y, xe, ym - oy, xe, ym);\n\n this.lineTo(xe, ymb);\n\n this.bezierCurveTo(xe, ymb + oy, xm + ox, yeb, xm, yeb);\n this.bezierCurveTo(xm - ox, yeb, x, ymb + oy, x, ymb);\n\n this.lineTo(x, ym);\n };\n\n\n /**\n * Sets up the dashedLine functionality for drawing\n * Original code came from http://stackoverflow.com/questions/4576724/dotted-stroke-in-canvas\n * @author David Jordan\n * @date 2012-08-08\n *\n * @param {number} x\n * @param {number} y\n * @param {number} x2\n * @param {number} y2\n * @param {string} pattern\n */\n CanvasRenderingContext2D.prototype.dashedLine = function (x, y, x2, y2, pattern) {\n this.beginPath();\n this.moveTo(x, y);\n\n var patternLength = pattern.length;\n var dx = (x2 - x);\n var dy = (y2 - y);\n var slope = dy / dx;\n var distRemaining = Math.sqrt(dx * dx + dy * dy);\n var patternIndex = 0;\n var draw = true;\n var xStep = 0;\n var dashLength = pattern[0];\n\n while (distRemaining >= 0.1) {\n dashLength = pattern[patternIndex++ % patternLength];\n if (dashLength > distRemaining) {\n dashLength = distRemaining;\n }\n\n xStep = Math.sqrt(dashLength * dashLength / (1 + slope * slope));\n xStep = dx < 0 ? -xStep : xStep;\n x += xStep;\n y += slope * xStep;\n\n if (draw === true) {this.lineTo(x,y);}\n else {this.moveTo(x,y);}\n\n distRemaining -= dashLength;\n draw = !draw;\n }\n };\n\n /**\n * Draw a Hexagon shape with 6 sides\n * @param {Number} x horizontal center\n * @param {Number} y vertical center\n * @param {Number} r radius\n */\n CanvasRenderingContext2D.prototype.hexagon = function (x, y, r) {\n this.beginPath();\n var sides = 6;\n var a = (Math.PI*2)/sides;\n this.moveTo(x+r,y);\n for (var i = 1; i < sides; i++) {\n this.lineTo(x+r*Math.cos(a*i),y+r*Math.sin(a*i));\n }\n this.closePath();\n };\n}\n","\r\n/**\r\n * Expose `Emitter`.\r\n */\r\n\r\nif (typeof module !== 'undefined') {\r\n module.exports = Emitter;\r\n}\r\n\r\n/**\r\n * Initialize a new `Emitter`.\r\n *\r\n * @api public\r\n */\r\n\r\nfunction Emitter(obj) {\r\n if (obj) return mixin(obj);\r\n};\r\n\r\n/**\r\n * Mixin the emitter properties.\r\n *\r\n * @param {Object} obj\r\n * @return {Object}\r\n * @api private\r\n */\r\n\r\nfunction mixin(obj) {\r\n for (var key in Emitter.prototype) {\r\n obj[key] = Emitter.prototype[key];\r\n }\r\n return obj;\r\n}\r\n\r\n/**\r\n * Listen on the given `event` with `fn`.\r\n *\r\n * @param {String} event\r\n * @param {Function} fn\r\n * @return {Emitter}\r\n * @api public\r\n */\r\n\r\nEmitter.prototype.on =\r\nEmitter.prototype.addEventListener = function(event, fn){\r\n this._callbacks = this._callbacks || {};\r\n (this._callbacks['$' + event] = this._callbacks['$' + event] || [])\r\n .push(fn);\r\n return this;\r\n};\r\n\r\n/**\r\n * Adds an `event` listener that will be invoked a single\r\n * time then automatically removed.\r\n *\r\n * @param {String} event\r\n * @param {Function} fn\r\n * @return {Emitter}\r\n * @api public\r\n */\r\n\r\nEmitter.prototype.once = function(event, fn){\r\n function on() {\r\n this.off(event, on);\r\n fn.apply(this, arguments);\r\n }\r\n\r\n on.fn = fn;\r\n this.on(event, on);\r\n return this;\r\n};\r\n\r\n/**\r\n * Remove the given callback for `event` or all\r\n * registered callbacks.\r\n *\r\n * @param {String} event\r\n * @param {Function} fn\r\n * @return {Emitter}\r\n * @api public\r\n */\r\n\r\nEmitter.prototype.off =\r\nEmitter.prototype.removeListener =\r\nEmitter.prototype.removeAllListeners =\r\nEmitter.prototype.removeEventListener = function(event, fn){\r\n this._callbacks = this._callbacks || {};\r\n\r\n // all\r\n if (0 == arguments.length) {\r\n this._callbacks = {};\r\n return this;\r\n }\r\n\r\n // specific event\r\n var callbacks = this._callbacks['$' + event];\r\n if (!callbacks) return this;\r\n\r\n // remove all handlers\r\n if (1 == arguments.length) {\r\n delete this._callbacks['$' + event];\r\n return this;\r\n }\r\n\r\n // remove specific handler\r\n var cb;\r\n for (var i = 0; i < callbacks.length; i++) {\r\n cb = callbacks[i];\r\n if (cb === fn || cb.fn === fn) {\r\n callbacks.splice(i, 1);\r\n break;\r\n }\r\n }\r\n\r\n // Remove event specific arrays for event types that no\r\n // one is subscribed for to avoid memory leak.\r\n if (callbacks.length === 0) {\r\n delete this._callbacks['$' + event];\r\n }\r\n\r\n return this;\r\n};\r\n\r\n/**\r\n * Emit `event` with the given args.\r\n *\r\n * @param {String} event\r\n * @param {Mixed} ...\r\n * @return {Emitter}\r\n */\r\n\r\nEmitter.prototype.emit = function(event){\r\n this._callbacks = this._callbacks || {};\r\n\r\n var args = new Array(arguments.length - 1)\r\n , callbacks = this._callbacks['$' + event];\r\n\r\n for (var i = 1; i < arguments.length; i++) {\r\n args[i - 1] = arguments[i];\r\n }\r\n\r\n if (callbacks) {\r\n callbacks = callbacks.slice(0);\r\n for (var i = 0, len = callbacks.length; i < len; ++i) {\r\n callbacks[i].apply(this, args);\r\n }\r\n }\r\n\r\n return this;\r\n};\r\n\r\n/**\r\n * Return array of callbacks for `event`.\r\n *\r\n * @param {String} event\r\n * @return {Array}\r\n * @api public\r\n */\r\n\r\nEmitter.prototype.listeners = function(event){\r\n this._callbacks = this._callbacks || {};\r\n return this._callbacks['$' + event] || [];\r\n};\r\n\r\n/**\r\n * Check if this emitter has `event` handlers.\r\n *\r\n * @param {String} event\r\n * @return {Boolean}\r\n * @api public\r\n */\r\n\r\nEmitter.prototype.hasListeners = function(event){\r\n return !! this.listeners(event).length;\r\n};\r\n","/**\n * Parse a text source containing data in DOT language into a JSON object.\n * The object contains two lists: one with nodes and one with edges.\n *\n * DOT language reference: http://www.graphviz.org/doc/info/lang.html\n *\n * DOT language attributes: http://graphviz.org/content/attrs\n *\n * @param {string} data Text containing a graph in DOT-notation\n * @return {Object} graph An object containing two parameters:\n * {Object[]} nodes\n * {Object[]} edges\n *\n * -------------------------------------------\n * TODO\n * ====\n *\n * For label handling, this is an incomplete implementation. From docs (quote #3015):\n * \n * > the escape sequences \"\\n\", \"\\l\" and \"\\r\" divide the label into lines, centered, \n * > left-justified, and right-justified, respectively.\n *\n * Source: http://www.graphviz.org/content/attrs#kescString\n *\n * > As another aid for readability, dot allows double-quoted strings to span multiple physical\n * > lines using the standard C convention of a backslash immediately preceding a newline\n * > character\n * > In addition, double-quoted strings can be concatenated using a '+' operator.\n * > As HTML strings can contain newline characters, which are used solely for formatting,\n * > the language does not allow escaped newlines or concatenation operators to be used\n * > within them.\n *\n * - Currently, only '\\\\n' is handled\n * - Note that text explicitly says 'labels'; the dot parser currently handles escape\n * sequences in **all** strings.\n */\nfunction parseDOT (data) {\n dot = data;\n return parseGraph();\n}\n\n// mapping of attributes from DOT (the keys) to vis.js (the values)\nvar NODE_ATTR_MAPPING = {\n 'fontsize': 'font.size',\n 'fontcolor': 'font.color',\n 'labelfontcolor': 'font.color',\n 'fontname': 'font.face',\n 'color': ['color.border', 'color.background'],\n 'fillcolor': 'color.background',\n 'tooltip': 'title',\n 'labeltooltip': 'title'\n};\nvar EDGE_ATTR_MAPPING = Object.create(NODE_ATTR_MAPPING);\nEDGE_ATTR_MAPPING.color = 'color.color';\nEDGE_ATTR_MAPPING.style = 'dashes';\n\n// token types enumeration\nvar TOKENTYPE = {\n NULL : 0,\n DELIMITER : 1,\n IDENTIFIER: 2,\n UNKNOWN : 3\n};\n\n// map with all delimiters\nvar DELIMITERS = {\n '{': true,\n '}': true,\n '[': true,\n ']': true,\n ';': true,\n '=': true,\n ',': true,\n\n '->': true,\n '--': true\n};\n\nvar dot = ''; // current dot file\nvar index = 0; // current index in dot file\nvar c = ''; // current token character in expr\nvar token = ''; // current token\nvar tokenType = TOKENTYPE.NULL; // type of the token\n\n/**\n * Get the first character from the dot file.\n * The character is stored into the char c. If the end of the dot file is\n * reached, the function puts an empty string in c.\n */\nfunction first() {\n index = 0;\n c = dot.charAt(0);\n}\n\n/**\n * Get the next character from the dot file.\n * The character is stored into the char c. If the end of the dot file is\n * reached, the function puts an empty string in c.\n */\nfunction next() {\n index++;\n c = dot.charAt(index);\n}\n\n/**\n * Preview the next character from the dot file.\n * @return {string} cNext\n */\nfunction nextPreview() {\n return dot.charAt(index + 1);\n}\n\nvar regexAlphaNumeric = /[a-zA-Z_0-9.:#]/;\n/**\n * Test whether given character is alphabetic or numeric\n * @param {string} c\n * @return {Boolean} isAlphaNumeric\n */\nfunction isAlphaNumeric(c) {\n return regexAlphaNumeric.test(c);\n}\n\n/**\n * Merge all options of object b into object b\n * @param {Object} a\n * @param {Object} b\n * @return {Object} a\n */\nfunction merge (a, b) {\n if (!a) {\n a = {};\n }\n\n if (b) {\n for (var name in b) {\n if (b.hasOwnProperty(name)) {\n a[name] = b[name];\n }\n }\n }\n return a;\n}\n\n/**\n * Set a value in an object, where the provided parameter name can be a\n * path with nested parameters. For example:\n *\n * var obj = {a: 2};\n * setValue(obj, 'b.c', 3); // obj = {a: 2, b: {c: 3}}\n *\n * @param {Object} obj\n * @param {string} path A parameter name or dot-separated parameter path,\n * like \"color.highlight.border\".\n * @param {*} value\n */\nfunction setValue(obj, path, value) {\n var keys = path.split('.');\n var o = obj;\n while (keys.length) {\n var key = keys.shift();\n if (keys.length) {\n // this isn't the end point\n if (!o[key]) {\n o[key] = {};\n }\n o = o[key];\n }\n else {\n // this is the end point\n o[key] = value;\n }\n }\n}\n\n/**\n * Add a node to a graph object. If there is already a node with\n * the same id, their attributes will be merged.\n * @param {Object} graph\n * @param {Object} node\n */\nfunction addNode(graph, node) {\n var i, len;\n var current = null;\n\n // find root graph (in case of subgraph)\n var graphs = [graph]; // list with all graphs from current graph to root graph\n var root = graph;\n while (root.parent) {\n graphs.push(root.parent);\n root = root.parent;\n }\n\n // find existing node (at root level) by its id\n if (root.nodes) {\n for (i = 0, len = root.nodes.length; i < len; i++) {\n if (node.id === root.nodes[i].id) {\n current = root.nodes[i];\n break;\n }\n }\n }\n\n if (!current) {\n // this is a new node\n current = {\n id: node.id\n };\n if (graph.node) {\n // clone default attributes\n current.attr = merge(current.attr, graph.node);\n }\n }\n\n // add node to this (sub)graph and all its parent graphs\n for (i = graphs.length - 1; i >= 0; i--) {\n var g = graphs[i];\n\n if (!g.nodes) {\n g.nodes = [];\n }\n if (g.nodes.indexOf(current) === -1) {\n g.nodes.push(current);\n }\n }\n\n // merge attributes\n if (node.attr) {\n current.attr = merge(current.attr, node.attr);\n }\n}\n\n/**\n * Add an edge to a graph object\n * @param {Object} graph\n * @param {Object} edge\n */\nfunction addEdge(graph, edge) {\n if (!graph.edges) {\n graph.edges = [];\n }\n graph.edges.push(edge);\n if (graph.edge) {\n var attr = merge({}, graph.edge); // clone default attributes\n edge.attr = merge(attr, edge.attr); // merge attributes\n }\n}\n\n/**\n * Create an edge to a graph object\n * @param {Object} graph\n * @param {string | number | Object} from\n * @param {string | number | Object} to\n * @param {string} type\n * @param {Object | null} attr\n * @return {Object} edge\n */\nfunction createEdge(graph, from, to, type, attr) {\n var edge = {\n from: from,\n to: to,\n type: type\n };\n\n if (graph.edge) {\n edge.attr = merge({}, graph.edge); // clone default attributes\n }\n edge.attr = merge(edge.attr || {}, attr); // merge attributes\n\n // Move arrows attribute from attr to edge temporally created in\n // parseAttributeList().\n if (attr != null) {\n if (attr.hasOwnProperty('arrows') && attr['arrows'] != null) {\n edge['arrows'] = {to: {enabled: true, type: attr.arrows.type}};\n attr['arrows'] = null;\n }\n }\n return edge;\n}\n\n/**\n * Get next token in the current dot file.\n * The token and token type are available as token and tokenType\n */\nfunction getToken() {\n tokenType = TOKENTYPE.NULL;\n token = '';\n\n // skip over whitespaces\n while (c === ' ' || c === '\\t' || c === '\\n' || c === '\\r') { // space, tab, enter\n next();\n }\n\n do {\n var isComment = false;\n\n // skip comment\n if (c === '#') {\n // find the previous non-space character\n var i = index - 1;\n while (dot.charAt(i) === ' ' || dot.charAt(i) === '\\t') {\n i--;\n }\n if (dot.charAt(i) === '\\n' || dot.charAt(i) === '') {\n // the # is at the start of a line, this is indeed a line comment\n while (c != '' && c != '\\n') {\n next();\n }\n isComment = true;\n }\n }\n if (c === '/' && nextPreview() === '/') {\n // skip line comment\n while (c != '' && c != '\\n') {\n next();\n }\n isComment = true;\n }\n if (c === '/' && nextPreview() === '*') {\n // skip block comment\n while (c != '') {\n if (c === '*' && nextPreview() === '/') {\n // end of block comment found. skip these last two characters\n next();\n next();\n break;\n }\n else {\n next();\n }\n }\n isComment = true;\n }\n\n // skip over whitespaces\n while (c === ' ' || c === '\\t' || c === '\\n' || c === '\\r') { // space, tab, enter\n next();\n }\n }\n while (isComment);\n\n // check for end of dot file\n if (c === '') {\n // token is still empty\n tokenType = TOKENTYPE.DELIMITER;\n return;\n }\n\n // check for delimiters consisting of 2 characters\n var c2 = c + nextPreview();\n if (DELIMITERS[c2]) {\n tokenType = TOKENTYPE.DELIMITER;\n token = c2;\n next();\n next();\n return;\n }\n\n // check for delimiters consisting of 1 character\n if (DELIMITERS[c]) {\n tokenType = TOKENTYPE.DELIMITER;\n token = c;\n next();\n return;\n }\n\n // check for an identifier (number or string)\n // TODO: more precise parsing of numbers/strings (and the port separator ':')\n if (isAlphaNumeric(c) || c === '-') {\n token += c;\n next();\n\n while (isAlphaNumeric(c)) {\n token += c;\n next();\n }\n if (token === 'false') {\n token = false; // convert to boolean\n }\n else if (token === 'true') {\n token = true; // convert to boolean\n }\n else if (!isNaN(Number(token))) {\n token = Number(token); // convert to number\n }\n tokenType = TOKENTYPE.IDENTIFIER;\n return;\n }\n\n // check for a string enclosed by double quotes\n if (c === '\"') {\n next();\n while (c != '' && (c != '\"' || (c === '\"' && nextPreview() === '\"'))) {\n if (c === '\"') { // skip the escape character\n token += c;\n next();\n } else if (c === '\\\\' && nextPreview() === 'n') { // Honor a newline escape sequence\n token += '\\n';\n next();\n } else {\n token += c;\n }\n next();\n }\n if (c != '\"') {\n throw newSyntaxError('End of string \" expected');\n }\n next();\n tokenType = TOKENTYPE.IDENTIFIER;\n return;\n }\n\n // something unknown is found, wrong characters, a syntax error\n tokenType = TOKENTYPE.UNKNOWN;\n while (c != '') {\n token += c;\n next();\n }\n throw new SyntaxError('Syntax error in part \"' + chop(token, 30) + '\"');\n}\n\n/**\n * Parse a graph.\n * @returns {Object} graph\n */\nfunction parseGraph() {\n var graph = {};\n\n first();\n getToken();\n\n // optional strict keyword\n if (token === 'strict') {\n graph.strict = true;\n getToken();\n }\n\n // graph or digraph keyword\n if (token === 'graph' || token === 'digraph') {\n graph.type = token;\n getToken();\n }\n\n // optional graph id\n if (tokenType === TOKENTYPE.IDENTIFIER) {\n graph.id = token;\n getToken();\n }\n\n // open angle bracket\n if (token != '{') {\n throw newSyntaxError('Angle bracket { expected');\n }\n getToken();\n\n // statements\n parseStatements(graph);\n\n // close angle bracket\n if (token != '}') {\n throw newSyntaxError('Angle bracket } expected');\n }\n getToken();\n\n // end of file\n if (token !== '') {\n throw newSyntaxError('End of file expected');\n }\n getToken();\n\n // remove temporary default options\n delete graph.node;\n delete graph.edge;\n delete graph.graph;\n\n return graph;\n}\n\n/**\n * Parse a list with statements.\n * @param {Object} graph\n */\nfunction parseStatements (graph) {\n while (token !== '' && token != '}') {\n parseStatement(graph);\n if (token === ';') {\n getToken();\n }\n }\n}\n\n/**\n * Parse a single statement. Can be a an attribute statement, node\n * statement, a series of node statements and edge statements, or a\n * parameter.\n * @param {Object} graph\n */\nfunction parseStatement(graph) {\n // parse subgraph\n var subgraph = parseSubgraph(graph);\n if (subgraph) {\n // edge statements\n parseEdge(graph, subgraph);\n\n return;\n }\n\n // parse an attribute statement\n var attr = parseAttributeStatement(graph);\n if (attr) {\n return;\n }\n\n // parse node\n if (tokenType != TOKENTYPE.IDENTIFIER) {\n throw newSyntaxError('Identifier expected');\n }\n var id = token; // id can be a string or a number\n getToken();\n\n if (token === '=') {\n // id statement\n getToken();\n if (tokenType != TOKENTYPE.IDENTIFIER) {\n throw newSyntaxError('Identifier expected');\n }\n graph[id] = token;\n getToken();\n // TODO: implement comma separated list with \"a_list: ID=ID [','] [a_list] \"\n }\n else {\n parseNodeStatement(graph, id);\n }\n}\n\n/**\n * Parse a subgraph\n * @param {Object} graph parent graph object\n * @return {Object | null} subgraph\n */\nfunction parseSubgraph (graph) {\n var subgraph = null;\n\n // optional subgraph keyword\n if (token === 'subgraph') {\n subgraph = {};\n subgraph.type = 'subgraph';\n getToken();\n\n // optional graph id\n if (tokenType === TOKENTYPE.IDENTIFIER) {\n subgraph.id = token;\n getToken();\n }\n }\n\n // open angle bracket\n if (token === '{') {\n getToken();\n\n if (!subgraph) {\n subgraph = {};\n }\n subgraph.parent = graph;\n subgraph.node = graph.node;\n subgraph.edge = graph.edge;\n subgraph.graph = graph.graph;\n\n // statements\n parseStatements(subgraph);\n\n // close angle bracket\n if (token != '}') {\n throw newSyntaxError('Angle bracket } expected');\n }\n getToken();\n\n // remove temporary default options\n delete subgraph.node;\n delete subgraph.edge;\n delete subgraph.graph;\n delete subgraph.parent;\n\n // register at the parent graph\n if (!graph.subgraphs) {\n graph.subgraphs = [];\n }\n graph.subgraphs.push(subgraph);\n }\n\n return subgraph;\n}\n\n/**\n * parse an attribute statement like \"node [shape=circle fontSize=16]\".\n * Available keywords are 'node', 'edge', 'graph'.\n * The previous list with default attributes will be replaced\n * @param {Object} graph\n * @returns {String | null} keyword Returns the name of the parsed attribute\n * (node, edge, graph), or null if nothing\n * is parsed.\n */\nfunction parseAttributeStatement (graph) {\n // attribute statements\n if (token === 'node') {\n getToken();\n\n // node attributes\n graph.node = parseAttributeList();\n return 'node';\n }\n else if (token === 'edge') {\n getToken();\n\n // edge attributes\n graph.edge = parseAttributeList();\n return 'edge';\n }\n else if (token === 'graph') {\n getToken();\n\n // graph attributes\n graph.graph = parseAttributeList();\n return 'graph';\n }\n\n return null;\n}\n\n/**\n * parse a node statement\n * @param {Object} graph\n * @param {string | number} id\n */\nfunction parseNodeStatement(graph, id) {\n // node statement\n var node = {\n id: id\n };\n var attr = parseAttributeList();\n if (attr) {\n node.attr = attr;\n }\n addNode(graph, node);\n\n // edge statements\n parseEdge(graph, id);\n}\n\n/**\n * Parse an edge or a series of edges\n * @param {Object} graph\n * @param {string | number} from Id of the from node\n */\nfunction parseEdge(graph, from) {\n while (token === '->' || token === '--') {\n var to;\n var type = token;\n getToken();\n\n var subgraph = parseSubgraph(graph);\n if (subgraph) {\n to = subgraph;\n }\n else {\n if (tokenType != TOKENTYPE.IDENTIFIER) {\n throw newSyntaxError('Identifier or subgraph expected');\n }\n to = token;\n addNode(graph, {\n id: to\n });\n getToken();\n }\n\n // parse edge attributes\n var attr = parseAttributeList();\n\n // create edge\n var edge = createEdge(graph, from, to, type, attr);\n addEdge(graph, edge);\n\n from = to;\n }\n}\n\n/**\n * As explained in [1], graphviz has limitations for combination of\n * arrow[head|tail] and dir. If attribute list includes 'dir',\n * following cases just be supported.\n * 1. both or none + arrowhead, arrowtail\n * 2. forward + arrowhead (arrowtail is not affedted)\n * 3. back + arrowtail (arrowhead is not affected)\n * [1] https://www.graphviz.org/doc/info/attrs.html#h:undir_note\n *\n * This function is called from parseAttributeList() to parse 'dir'\n * attribute with given 'attr_names' and 'attr_list'.\n * @param {Object} attr_names Array of attribute names\n * @param {Object} attr_list Array of objects of attribute set\n * @return {Object} attr_list Updated attr_list\n */\nfunction parseDirAttribute(attr_names, attr_list) {\n var i;\n if (attr_names.includes('dir')) {\n var idx = {}; // get index of 'arrows' and 'dir'\n idx.arrows = {};\n for (i = 0; i < attr_list.length; i++) {\n if (attr_list[i].name === 'arrows') {\n if (attr_list[i].value.to != null) {\n idx.arrows.to = i;\n } else if (attr_list[i].value.from != null) {\n idx.arrows.from = i;\n } else {\n throw newSyntaxError('Invalid value of arrows');\n }\n } else if (attr_list[i].name === 'dir') {\n idx.dir = i;\n }\n }\n\n // first, add default arrow shape if it is not assigned to avoid error\n var dir_type = attr_list[idx.dir].value;\n if (!attr_names.includes('arrows')) {\n if (dir_type === 'both') {\n attr_list.push(\n {'attr': attr_list[idx.dir].attr, 'name': 'arrows',\n 'value': {'to': {'enabled': true}}\n }\n );\n idx.arrows.to = attr_list.length - 1;\n attr_list.push(\n {'attr': attr_list[idx.dir].attr, 'name': 'arrows',\n 'value': {'from': {'enabled': true}}\n }\n );\n idx.arrows.from = attr_list.length - 1;\n } else if (dir_type === 'forward') {\n attr_list.push(\n {'attr': attr_list[idx.dir].attr, 'name': 'arrows',\n 'value': {'to': {'enabled': true}}\n }\n );\n idx.arrows.to = attr_list.length - 1;\n } else if (dir_type === 'back') {\n attr_list.push(\n {'attr': attr_list[idx.dir].attr, 'name': 'arrows',\n 'value': {'from': {'enabled': true}}\n }\n );\n idx.arrows.from = attr_list.length - 1;\n } else if (dir_type === 'none') {\n attr_list.push(\n {'attr': attr_list[idx.dir].attr, 'name': 'arrows', 'value': ''}\n );\n idx.arrows.to = attr_list.length - 1;\n } else {\n throw newSyntaxError('Invalid dir type \"' + dir_type + '\"');\n }\n }\n\n var from_type;\n var to_type;\n // update 'arrows' attribute from 'dir'.\n if (dir_type === 'both') {\n // both of shapes of 'from' and 'to' are given\n if (idx.arrows.to && idx.arrows.from) {\n to_type = attr_list[idx.arrows.to].value.to.type;\n from_type = attr_list[idx.arrows.from].value.from.type;\n attr_list[idx.arrows.to] = {\n 'attr': attr_list[idx.arrows.to].attr,\n 'name': attr_list[idx.arrows.to].name,\n 'value': {\n 'to': {'enabled': true, 'type': to_type},\n 'from': {'enabled': true, 'type': from_type}\n }\n };\n attr_list.splice(idx.arrows.from, 1);\n\n // shape of 'to' is assigned and use default to 'from'\n } else if (idx.arrows.to) {\n to_type = attr_list[idx.arrows.to].value.to.type;\n from_type = 'arrow';\n attr_list[idx.arrows.to] = {\n 'attr': attr_list[idx.arrows.to].attr,\n 'name': attr_list[idx.arrows.to].name,\n 'value': {\n 'to': {'enabled': true, 'type': to_type},\n 'from': {'enabled': true, 'type': from_type}\n }\n };\n\n // only shape of 'from' is assigned and use default for 'to'\n } else if (idx.arrows.from) {\n to_type = 'arrow';\n from_type = attr_list[idx.arrows.from].value.from.type;\n attr_list[idx.arrows.from] = {\n 'attr': attr_list[idx.arrows.from].attr,\n 'name': attr_list[idx.arrows.from].name,\n 'value': {\n 'to': {'enabled': true, 'type': to_type},\n 'from': {'enabled': true, 'type': from_type}\n }\n };\n }\n\n } else if (dir_type === 'back') {\n // given both of shapes, but use only 'from'\n if (idx.arrows.to && idx.arrows.from) {\n to_type = '';\n from_type = attr_list[idx.arrows.from].value.from.type;\n attr_list[idx.arrows.from] = {\n 'attr': attr_list[idx.arrows.from].attr,\n 'name': attr_list[idx.arrows.from].name,\n 'value': {\n 'to': {'enabled': true, 'type': to_type},\n 'from': {'enabled': true, 'type': from_type}\n }\n };\n\n // given shape of 'to', but does not use it\n } else if (idx.arrows.to) {\n to_type = '';\n from_type = 'arrow';\n idx.arrows.from = idx.arrows.to;\n attr_list[idx.arrows.from] = {\n 'attr': attr_list[idx.arrows.from].attr,\n 'name': attr_list[idx.arrows.from].name,\n 'value': {\n 'to': {'enabled': true, 'type': to_type},\n 'from': {'enabled': true, 'type': from_type}\n }\n };\n\n // assign given 'from' shape\n } else if (idx.arrows.from) {\n to_type = '';\n from_type = attr_list[idx.arrows.from].value.from.type;\n attr_list[idx.arrows.to] = {\n 'attr': attr_list[idx.arrows.from].attr,\n 'name': attr_list[idx.arrows.from].name,\n 'value': {\n 'to': {'enabled': true, 'type': to_type},\n 'from': {'enabled': true, 'type': from_type}\n }\n };\n }\n\n attr_list[idx.arrows.from] = {\n 'attr': attr_list[idx.arrows.from].attr,\n 'name': attr_list[idx.arrows.from].name,\n 'value': {\n 'from': {\n 'enabled': true,\n 'type': attr_list[idx.arrows.from].value.from.type}\n }\n };\n\n } else if (dir_type === 'none') {\n var idx_arrow;\n if (idx.arrows.to) {\n idx_arrow = idx.arrows.to;\n } else {\n idx_arrow = idx.arrows.from;\n }\n\n attr_list[idx_arrow] = {\n 'attr': attr_list[idx_arrow].attr,\n 'name': attr_list[idx_arrow].name,\n 'value': ''\n };\n\n } else if (dir_type === 'forward'){\n // given both of shapes, but use only 'to'\n if (idx.arrows.to && idx.arrows.from) {\n to_type = attr_list[idx.arrows.to].value.to.type;\n from_type = '';\n attr_list[idx.arrows.to] = {\n 'attr': attr_list[idx.arrows.to].attr,\n 'name': attr_list[idx.arrows.to].name,\n 'value': {\n 'to': {'enabled': true, 'type': to_type},\n 'from': {'enabled': true, 'type': from_type}\n }\n };\n\n // assign given 'to' shape\n } else if (idx.arrows.to) {\n to_type = attr_list[idx.arrows.to].value.to.type;\n from_type = '';\n attr_list[idx.arrows.to] = {\n 'attr': attr_list[idx.arrows.to].attr,\n 'name': attr_list[idx.arrows.to].name,\n 'value': {\n 'to': {'enabled': true, 'type': to_type},\n 'from': {'enabled': true, 'type': from_type}\n }\n };\n\n // given shape of 'from', but does not use it\n } else if (idx.arrows.from) {\n to_type = 'arrow';\n from_type = '';\n idx.arrows.to = idx.arrows.from;\n attr_list[idx.arrows.to] = {\n 'attr': attr_list[idx.arrows.to].attr,\n 'name': attr_list[idx.arrows.to].name,\n 'value': {\n 'to': {'enabled': true, 'type': to_type},\n 'from': {'enabled': true, 'type': from_type}\n }\n };\n }\n\n attr_list[idx.arrows.to] = {\n 'attr': attr_list[idx.arrows.to].attr,\n 'name': attr_list[idx.arrows.to].name,\n 'value': {\n 'to': {\n 'enabled': true,\n 'type': attr_list[idx.arrows.to].value.to.type\n }\n }\n };\n } else {\n throw newSyntaxError('Invalid dir type \"' + dir_type + '\"');\n }\n\n // remove 'dir' attribute no need anymore\n attr_list.splice(idx.dir, 1);\n }\n return attr_list;\n}\n\n/**\n * Parse a set with attributes,\n * for example [label=\"1.000\", shape=solid]\n * @return {Object | null} attr\n */\nfunction parseAttributeList() {\n var i;\n var attr = null;\n\n // edge styles of dot and vis\n var edgeStyles = {\n 'dashed': true,\n 'solid': false,\n 'dotted': [1, 5]\n };\n\n /**\n * Define arrow types.\n * vis currently supports types defined in 'arrowTypes'.\n * Details of arrow shapes are described in\n * http://www.graphviz.org/content/arrow-shapes\n */\n var arrowTypes = {\n dot: 'circle',\n box: 'box',\n crow: 'crow',\n curve: 'curve',\n icurve: 'inv_curve',\n normal: 'triangle',\n inv: 'inv_triangle',\n diamond: 'diamond',\n tee: 'bar',\n vee: 'vee'\n };\n\n /**\n * 'attr_list' contains attributes for checking if some of them are affected\n * later. For instance, both of 'arrowhead' and 'dir' (edge style defined\n * in DOT) make changes to 'arrows' attribute in vis.\n */\n var attr_list = new Array();\n var attr_names = new Array(); // used for checking the case.\n\n // parse attributes\n while (token === '[') {\n getToken();\n attr = {};\n while (token !== '' && token != ']') {\n if (tokenType != TOKENTYPE.IDENTIFIER) {\n throw newSyntaxError('Attribute name expected');\n }\n var name = token;\n\n getToken();\n if (token != '=') {\n throw newSyntaxError('Equal sign = expected');\n }\n getToken();\n\n if (tokenType != TOKENTYPE.IDENTIFIER) {\n throw newSyntaxError('Attribute value expected');\n }\n var value = token;\n\n // convert from dot style to vis\n if (name === 'style') {\n value = edgeStyles[value];\n }\n\n var arrowType;\n if (name === 'arrowhead') {\n arrowType = arrowTypes[value];\n name = 'arrows';\n value = {'to': {'enabled': true, 'type': arrowType}};\n }\n\n if (name === 'arrowtail') {\n arrowType = arrowTypes[value];\n name = 'arrows';\n value = {'from': {'enabled': true, 'type': arrowType}};\n }\n\n attr_list.push(\n {'attr': attr, 'name': name, 'value': value}\n );\n attr_names.push(name);\n\n getToken();\n if (token == ',') {\n getToken();\n }\n }\n\n if (token != ']') {\n throw newSyntaxError('Bracket ] expected');\n }\n getToken();\n }\n\n /**\n * As explained in [1], graphviz has limitations for combination of\n * arrow[head|tail] and dir. If attribute list includes 'dir',\n * following cases just be supported.\n * 1. both or none + arrowhead, arrowtail\n * 2. forward + arrowhead (arrowtail is not affedted)\n * 3. back + arrowtail (arrowhead is not affected)\n * [1] https://www.graphviz.org/doc/info/attrs.html#h:undir_note\n */\n if (attr_names.includes('dir')) {\n var idx = {}; // get index of 'arrows' and 'dir'\n idx.arrows = {};\n for (i = 0; i < attr_list.length; i++) {\n if (attr_list[i].name === 'arrows') {\n if (attr_list[i].value.to != null) {\n idx.arrows.to = i;\n } else if (attr_list[i].value.from != null) {\n idx.arrows.from = i;\n } else {\n throw newSyntaxError('Invalid value of arrows');\n }\n } else if (attr_list[i].name === 'dir') {\n idx.dir = i;\n }\n }\n\n // first, add default arrow shape if it is not assigned to avoid error\n var dir_type = attr_list[idx.dir].value;\n if (!attr_names.includes('arrows')) {\n if (dir_type === 'both') {\n attr_list.push(\n {'attr': attr_list[idx.dir].attr, 'name': 'arrows',\n 'value': {to: {enabled:true}}\n }\n );\n idx.arrows.to = attr_list.length - 1;\n attr_list.push(\n {'attr': attr_list[idx.dir].attr, 'name': 'arrows',\n 'value': {from: {enabled:true}}\n }\n );\n idx.arrows.from = attr_list.length - 1;\n } else if (dir_type === 'forward') {\n attr_list.push(\n {'attr': attr_list[idx.dir].attr, 'name': 'arrows',\n 'value': {to: {enabled:true}}\n }\n );\n idx.arrows.to = attr_list.length - 1;\n } else if (dir_type === 'back') {\n attr_list.push(\n {'attr': attr_list[idx.dir].attr, 'name': 'arrows',\n 'value': {from: {enabled:true}}\n }\n );\n idx.arrows.from = attr_list.length - 1;\n } else if (dir_type === 'none') {\n attr_list.push(\n {'attr': attr_list[idx.dir].attr, 'name': 'arrows', 'value': ''}\n );\n idx.arrows.to = attr_list.length - 1;\n } else {\n throw newSyntaxError('Invalid dir type \"' + dir_type + '\"');\n }\n }\n\n var from_type;\n var to_type;\n // update 'arrows' attribute from 'dir'.\n if (dir_type === 'both') {\n // both of shapes of 'from' and 'to' are given\n if (idx.arrows.to && idx.arrows.from) {\n to_type = attr_list[idx.arrows.to].value.to.type;\n from_type = attr_list[idx.arrows.from].value.from.type;\n attr_list[idx.arrows.to] = {\n 'attr': attr_list[idx.arrows.to].attr,\n 'name': attr_list[idx.arrows.to].name,\n 'value': {\n to:{enabled:true, type: to_type},\n from:{enabled:true, type: from_type}\n }\n };\n attr_list.splice(idx.arrows.from, 1);\n\n // shape of 'to' is assigned and use default to 'from'\n } else if (idx.arrows.to) {\n to_type = attr_list[idx.arrows.to].value.to.type;\n from_type = 'arrow';\n attr_list[idx.arrows.to] = {\n 'attr': attr_list[idx.arrows.to].attr,\n 'name': attr_list[idx.arrows.to].name,\n 'value': {\n to:{enabled:true, type: to_type},\n from:{enabled:true, type: from_type}\n }\n };\n\n // only shape of 'from' is assigned and use default for 'to'\n } else if (idx.arrows.from) {\n to_type = 'arrow';\n from_type = attr_list[idx.arrows.from].value.from.type;\n attr_list[idx.arrows.from] = {\n 'attr': attr_list[idx.arrows.from].attr,\n 'name': attr_list[idx.arrows.from].name,\n 'value': {\n to:{enabled:true, type: to_type},\n from:{enabled:true, type: from_type}\n }\n };\n }\n\n } else if (dir_type === 'back') {\n // given both of shapes, but use only 'from'\n if (idx.arrows.to && idx.arrows.from) {\n to_type = '';\n from_type = attr_list[idx.arrows.from].value.from.type;\n attr_list[idx.arrows.from] = {\n 'attr': attr_list[idx.arrows.from].attr,\n 'name': attr_list[idx.arrows.from].name,\n 'value': {\n to:{enabled:true, type: to_type},\n from:{enabled:true, type: from_type}\n }\n };\n\n // given shape of 'to', but does not use it\n } else if (idx.arrows.to) {\n to_type = '';\n from_type = 'arrow';\n idx.arrows.from = idx.arrows.to;\n attr_list[idx.arrows.from] = {\n 'attr': attr_list[idx.arrows.from].attr,\n 'name': attr_list[idx.arrows.from].name,\n 'value': {\n to:{enabled:true, type: to_type},\n from:{enabled:true, type: from_type}\n }\n };\n\n // assign given 'from' shape\n } else if (idx.arrows.from) {\n to_type = '';\n from_type = attr_list[idx.arrows.from].value.from.type;\n attr_list[idx.arrows.to] = {\n 'attr': attr_list[idx.arrows.from].attr,\n 'name': attr_list[idx.arrows.from].name,\n 'value': {\n to:{enabled:true, type: to_type},\n from:{enabled:true, type: from_type}\n }\n };\n }\n\n attr_list[idx.arrows.from] = {\n 'attr': attr_list[idx.arrows.from].attr,\n 'name': attr_list[idx.arrows.from].name,\n 'value': {from: {enabled:true, type: attr_list[idx.arrows.from].value.from.type}}\n };\n\n } else if (dir_type === 'none') {\n var idx_arrow;\n if (idx.arrows.to) {\n idx_arrow = idx.arrows.to;\n } else {\n idx_arrow = idx.arrows.from;\n }\n\n attr_list[idx_arrow] = {\n 'attr': attr_list[idx_arrow].attr,\n 'name': attr_list[idx_arrow].name,\n 'value': ''\n };\n\n } else if (dir_type === 'forward'){\n // given both of shapes, but use only 'to'\n if (idx.arrows.to && idx.arrows.from) {\n to_type = attr_list[idx.arrows.to].value.to.type;\n from_type = '';\n attr_list[idx.arrows.to] = {\n 'attr': attr_list[idx.arrows.to].attr,\n 'name': attr_list[idx.arrows.to].name,\n 'value': {\n to:{enabled:true, type: to_type},\n from:{enabled:true, type: from_type}\n }\n };\n\n // assign given 'to' shape\n } else if (idx.arrows.to) {\n to_type = attr_list[idx.arrows.to].value.to.type;\n from_type = '';\n attr_list[idx.arrows.to] = {\n 'attr': attr_list[idx.arrows.to].attr,\n 'name': attr_list[idx.arrows.to].name,\n 'value': {\n to:{enabled:true, type: to_type},\n from:{enabled:true, type: from_type}\n }\n };\n\n // given shape of 'from', but does not use it\n } else if (idx.arrows.from) {\n to_type = 'arrow';\n from_type = '';\n idx.arrows.to = idx.arrows.from;\n attr_list[idx.arrows.to] = {\n 'attr': attr_list[idx.arrows.to].attr,\n 'name': attr_list[idx.arrows.to].name,\n 'value': {\n to:{enabled:true, type: to_type},\n from:{enabled:true, type: from_type}\n }\n };\n }\n\n attr_list[idx.arrows.to] = {\n 'attr': attr_list[idx.arrows.to].attr,\n 'name': attr_list[idx.arrows.to].name,\n 'value': {\n to: {enabled:true, type: attr_list[idx.arrows.to].value.to.type}\n }\n };\n } else {\n throw newSyntaxError('Invalid dir type \"' + dir_type + '\"');\n }\n\n // remove 'dir' attribute no need anymore\n attr_list.splice(idx.dir, 1);\n }\n\n // parse 'penwidth'\n var nof_attr_list;\n if (attr_names.includes('penwidth')) {\n var tmp_attr_list = [];\n\n nof_attr_list = attr_list.length;\n for (i = 0; i < nof_attr_list; i++) {\n // exclude 'width' from attr_list if 'penwidth' exists\n if (attr_list[i].name !== 'width') {\n if (attr_list[i].name === 'penwidth') {\n attr_list[i].name = 'width';\n }\n tmp_attr_list.push(attr_list[i]);\n }\n }\n attr_list = tmp_attr_list;\n }\n\n nof_attr_list = attr_list.length;\n for (i = 0; i < nof_attr_list; i++) {\n setValue(attr_list[i].attr, attr_list[i].name, attr_list[i].value);\n }\n\n return attr;\n}\n\n/**\n * Create a syntax error with extra information on current token and index.\n * @param {string} message\n * @returns {SyntaxError} err\n */\nfunction newSyntaxError(message) {\n return new SyntaxError(message + ', got \"' + chop(token, 30) + '\" (char ' + index + ')');\n}\n\n/**\n * Chop off text after a maximum length\n * @param {string} text\n * @param {number} maxLength\n * @returns {String}\n */\nfunction chop (text, maxLength) {\n return (text.length <= maxLength) ? text : (text.substr(0, 27) + '...');\n}\n\n/**\n * Execute a function fn for each pair of elements in two arrays\n * @param {Array | *} array1\n * @param {Array | *} array2\n * @param {function} fn\n */\nfunction forEach2(array1, array2, fn) {\n if (Array.isArray(array1)) {\n array1.forEach(function (elem1) {\n if (Array.isArray(array2)) {\n array2.forEach(function (elem2) {\n fn(elem1, elem2);\n });\n }\n else {\n fn(elem1, array2);\n }\n });\n }\n else {\n if (Array.isArray(array2)) {\n array2.forEach(function (elem2) {\n fn(array1, elem2);\n });\n }\n else {\n fn(array1, array2);\n }\n }\n}\n\n/**\n * Set a nested property on an object\n * When nested objects are missing, they will be created.\n * For example setProp({}, 'font.color', 'red') will return {font: {color: 'red'}}\n * @param {Object} object\n * @param {string} path A dot separated string like 'font.color'\n * @param {*} value Value for the property\n * @return {Object} Returns the original object, allows for chaining.\n */\nfunction setProp(object, path, value) {\n var names = path.split('.');\n var prop = names.pop();\n\n // traverse over the nested objects\n var obj = object;\n for (var i = 0; i < names.length; i++) {\n var name = names[i];\n if (!(name in obj)) {\n obj[name] = {};\n }\n obj = obj[name];\n }\n\n // set the property value\n obj[prop] = value;\n\n return object;\n}\n\n/**\n * Convert an object with DOT attributes to their vis.js equivalents.\n * @param {Object} attr Object with DOT attributes\n * @param {Object} mapping\n * @return {Object} Returns an object with vis.js attributes\n */\nfunction convertAttr (attr, mapping) {\n var converted = {};\n\n for (var prop in attr) {\n if (attr.hasOwnProperty(prop)) {\n var visProp = mapping[prop];\n if (Array.isArray(visProp)) {\n visProp.forEach(function (visPropI) {\n setProp(converted, visPropI, attr[prop]);\n })\n }\n else if (typeof visProp === 'string') {\n setProp(converted, visProp, attr[prop]);\n }\n else {\n setProp(converted, prop, attr[prop]);\n }\n }\n }\n\n return converted;\n}\n\n/**\n * Convert a string containing a graph in DOT language into a map containing\n * with nodes and edges in the format of graph.\n * @param {string} data Text containing a graph in DOT-notation\n * @return {Object} graphData\n */\nfunction DOTToGraph (data) {\n // parse the DOT file\n var dotData = parseDOT(data);\n var graphData = {\n nodes: [],\n edges: [],\n options: {}\n };\n\n // copy the nodes\n if (dotData.nodes) {\n dotData.nodes.forEach(function (dotNode) {\n var graphNode = {\n id: dotNode.id,\n label: String(dotNode.label || dotNode.id)\n };\n merge(graphNode, convertAttr(dotNode.attr, NODE_ATTR_MAPPING));\n if (graphNode.image) {\n graphNode.shape = 'image';\n }\n graphData.nodes.push(graphNode);\n });\n }\n\n // copy the edges\n if (dotData.edges) {\n /**\n * Convert an edge in DOT format to an edge with VisGraph format\n * @param {Object} dotEdge\n * @returns {Object} graphEdge\n */\n var convertEdge = function (dotEdge) {\n var graphEdge = {\n from: dotEdge.from,\n to: dotEdge.to\n };\n merge(graphEdge, convertAttr(dotEdge.attr, EDGE_ATTR_MAPPING));\n\n // Add arrows attribute to default styled arrow.\n // The reason why default style is not added in parseAttributeList() is\n // because only default is cleared before here.\n if (graphEdge.arrows == null && dotEdge.type === '->') {\n graphEdge.arrows = 'to';\n }\n\n return graphEdge;\n };\n\n dotData.edges.forEach(function (dotEdge) {\n var from, to;\n if (dotEdge.from instanceof Object) {\n from = dotEdge.from.nodes;\n }\n else {\n from = {\n id: dotEdge.from\n }\n }\n\n if (dotEdge.to instanceof Object) {\n to = dotEdge.to.nodes;\n }\n else {\n to = {\n id: dotEdge.to\n }\n }\n\n if (dotEdge.from instanceof Object && dotEdge.from.edges) {\n dotEdge.from.edges.forEach(function (subEdge) {\n var graphEdge = convertEdge(subEdge);\n graphData.edges.push(graphEdge);\n });\n }\n\n forEach2(from, to, function (from, to) {\n var subEdge = createEdge(graphData, from.id, to.id, dotEdge.type, dotEdge.attr);\n var graphEdge = convertEdge(subEdge);\n graphData.edges.push(graphEdge);\n });\n\n if (dotEdge.to instanceof Object && dotEdge.to.edges) {\n dotEdge.to.edges.forEach(function (subEdge) {\n var graphEdge = convertEdge(subEdge);\n graphData.edges.push(graphEdge);\n });\n }\n });\n }\n\n // copy the options\n if (dotData.attr) {\n graphData.options = dotData.attr;\n }\n\n return graphData;\n}\n\n// exports\nexports.parseDOT = parseDOT;\nexports.DOTToGraph = DOTToGraph;\n","export type Id = number | string\n\nexport interface ColorObject {\n background: string\n border: string\n highlight: {\n background: string\n border: string\n }\n hover: {\n background: string\n border: string\n }\n}\n\nexport interface GephiData {\n nodes: GephiNode[]\n edges: GephiEdge[]\n}\nexport interface GephiParseOptions {\n fixed?: boolean\n inheritColor?: boolean\n parseColor?: boolean\n}\n\nexport interface GephiNode {\n id: Id\n\n attributes?: { title?: string }\n color?: string\n label?: string\n size?: number\n title?: string\n x?: number\n y?: number\n}\nexport interface GephiEdge {\n id: Id\n source: Id\n target: Id\n\n attributes?: { title?: string }\n color?: string\n label?: string\n type?: string\n}\n\nexport interface VisData {\n nodes: VisNode[]\n edges: VisEdge[]\n}\n\nexport interface VisNode {\n id: Id\n fixed: boolean\n\n color?: string | ColorObject\n label?: string\n size?: number\n title?: string\n x?: number\n y?: number\n\n attributes?: unknown\n}\nexport interface VisEdge {\n id: Id\n from: Id\n to: Id\n\n arrows?: 'to'\n color?: string\n label?: string\n title?: string\n\n attributes?: unknown\n}\n\n/**\n * Convert Gephi to Vis.\n *\n * @param gephiJSON - The parsed JSON data in Gephi format.\n * @param optionsObj - Additional options.\n *\n * @returns The converted data ready to be used in Vis.\n */\nexport function parseGephi(\n gephiJSON: GephiData,\n optionsObj?: GephiParseOptions\n): VisData {\n const options = {\n edges: {\n inheritColor: false,\n },\n nodes: {\n fixed: false,\n parseColor: false,\n },\n }\n\n if (optionsObj != null) {\n if (optionsObj.fixed != null) {\n options.nodes.fixed = optionsObj.fixed\n }\n if (optionsObj.parseColor != null) {\n options.nodes.parseColor = optionsObj.parseColor\n }\n if (optionsObj.inheritColor != null) {\n options.edges.inheritColor = optionsObj.inheritColor\n }\n }\n\n const gEdges = gephiJSON.edges\n const vEdges = gEdges.map(\n (gEdge): VisEdge => {\n const vEdge: VisEdge = {\n from: gEdge.source,\n id: gEdge.id,\n to: gEdge.target,\n }\n\n if (gEdge.attributes != null) {\n vEdge.attributes = gEdge.attributes\n }\n if (gEdge.label != null) {\n vEdge.label = gEdge.label\n }\n if (gEdge.attributes != null && gEdge.attributes.title != null) {\n vEdge.title = gEdge.attributes.title\n }\n if (gEdge.type === 'Directed') {\n vEdge.arrows = 'to'\n }\n // edge['value'] = gEdge.attributes != null ? gEdge.attributes.Weight : undefined;\n // edge['width'] = edge['value'] != null ? undefined : edgegEdge.size;\n if (gEdge.color && options.edges.inheritColor === false) {\n vEdge.color = gEdge.color\n }\n\n return vEdge\n }\n )\n\n const vNodes = gephiJSON.nodes.map(\n (gNode): VisNode => {\n const vNode: VisNode = {\n id: gNode.id,\n fixed: options.nodes.fixed && gNode.x != null && gNode.y != null,\n }\n\n if (gNode.attributes != null) {\n vNode.attributes = gNode.attributes\n }\n if (gNode.label != null) {\n vNode.label = gNode.label\n }\n if (gNode.size != null) {\n vNode.size = gNode.size\n }\n if (gNode.attributes != null && gNode.attributes.title != null) {\n vNode.title = gNode.attributes.title\n }\n if (gNode.title != null) {\n vNode.title = gNode.title\n }\n if (gNode.x != null) {\n vNode.x = gNode.x\n }\n if (gNode.y != null) {\n vNode.y = gNode.y\n }\n if (gNode.color != null) {\n if (options.nodes.parseColor === true) {\n vNode.color = gNode.color\n } else {\n vNode.color = {\n background: gNode.color,\n border: gNode.color,\n highlight: {\n background: gNode.color,\n border: gNode.color,\n },\n hover: {\n background: gNode.color,\n border: gNode.color,\n },\n }\n }\n }\n\n return vNode\n }\n )\n\n return { nodes: vNodes, edges: vEdges }\n}\n","\"use strict\";\r\n/**\r\n * Created by Alex on 11/6/2014.\r\n */\r\n\r\n// https://github.com/umdjs/umd/blob/master/returnExports.js#L40-L60\r\n// if the module has no dependencies, the above pattern can be simplified to\r\n(function (root, factory) {\r\n if (typeof define === 'function' && define.amd) {\r\n // AMD. Register as an anonymous module.\r\n define([], factory);\r\n } else if (typeof exports === 'object') {\r\n // Node. Does not work with strict CommonJS, but\r\n // only CommonJS-like environments that support module.exports,\r\n // like Node.\r\n module.exports = factory();\r\n } else {\r\n // Browser globals (root is window)\r\n root.keycharm = factory();\r\n }\r\n}(this, function () {\r\n\r\n function keycharm(options) {\r\n var preventDefault = options && options.preventDefault || false;\r\n\r\n var container = options && options.container || window;\r\n\r\n var _exportFunctions = {};\r\n var _bound = {keydown:{}, keyup:{}};\r\n var _keys = {};\r\n var i;\r\n\r\n // a - z\r\n for (i = 97; i <= 122; i++) {_keys[String.fromCharCode(i)] = {code:65 + (i - 97), shift: false};}\r\n // A - Z\r\n for (i = 65; i <= 90; i++) {_keys[String.fromCharCode(i)] = {code:i, shift: true};}\r\n // 0 - 9\r\n for (i = 0; i <= 9; i++) {_keys['' + i] = {code:48 + i, shift: false};}\r\n // F1 - F12\r\n for (i = 1; i <= 12; i++) {_keys['F' + i] = {code:111 + i, shift: false};}\r\n // num0 - num9\r\n for (i = 0; i <= 9; i++) {_keys['num' + i] = {code:96 + i, shift: false};}\r\n\r\n // numpad misc\r\n _keys['num*'] = {code:106, shift: false};\r\n _keys['num+'] = {code:107, shift: false};\r\n _keys['num-'] = {code:109, shift: false};\r\n _keys['num/'] = {code:111, shift: false};\r\n _keys['num.'] = {code:110, shift: false};\r\n // arrows\r\n _keys['left'] = {code:37, shift: false};\r\n _keys['up'] = {code:38, shift: false};\r\n _keys['right'] = {code:39, shift: false};\r\n _keys['down'] = {code:40, shift: false};\r\n // extra keys\r\n _keys['space'] = {code:32, shift: false};\r\n _keys['enter'] = {code:13, shift: false};\r\n _keys['shift'] = {code:16, shift: undefined};\r\n _keys['esc'] = {code:27, shift: false};\r\n _keys['backspace'] = {code:8, shift: false};\r\n _keys['tab'] = {code:9, shift: false};\r\n _keys['ctrl'] = {code:17, shift: false};\r\n _keys['alt'] = {code:18, shift: false};\r\n _keys['delete'] = {code:46, shift: false};\r\n _keys['pageup'] = {code:33, shift: false};\r\n _keys['pagedown'] = {code:34, shift: false};\r\n // symbols\r\n _keys['='] = {code:187, shift: false};\r\n _keys['-'] = {code:189, shift: false};\r\n _keys[']'] = {code:221, shift: false};\r\n _keys['['] = {code:219, shift: false};\r\n\r\n\r\n\r\n var down = function(event) {handleEvent(event,'keydown');};\r\n var up = function(event) {handleEvent(event,'keyup');};\r\n\r\n // handle the actualy bound key with the event\r\n var handleEvent = function(event,type) {\r\n if (_bound[type][event.keyCode] !== undefined) {\r\n var bound = _bound[type][event.keyCode];\r\n for (var i = 0; i < bound.length; i++) {\r\n if (bound[i].shift === undefined) {\r\n bound[i].fn(event);\r\n }\r\n else if (bound[i].shift == true && event.shiftKey == true) {\r\n bound[i].fn(event);\r\n }\r\n else if (bound[i].shift == false && event.shiftKey == false) {\r\n bound[i].fn(event);\r\n }\r\n }\r\n\r\n if (preventDefault == true) {\r\n event.preventDefault();\r\n }\r\n }\r\n };\r\n\r\n // bind a key to a callback\r\n _exportFunctions.bind = function(key, callback, type) {\r\n if (type === undefined) {\r\n type = 'keydown';\r\n }\r\n if (_keys[key] === undefined) {\r\n throw new Error(\"unsupported key: \" + key);\r\n }\r\n if (_bound[type][_keys[key].code] === undefined) {\r\n _bound[type][_keys[key].code] = [];\r\n }\r\n _bound[type][_keys[key].code].push({fn:callback, shift:_keys[key].shift});\r\n };\r\n\r\n\r\n // bind all keys to a call back (demo purposes)\r\n _exportFunctions.bindAll = function(callback, type) {\r\n if (type === undefined) {\r\n type = 'keydown';\r\n }\r\n for (var key in _keys) {\r\n if (_keys.hasOwnProperty(key)) {\r\n _exportFunctions.bind(key,callback,type);\r\n }\r\n }\r\n };\r\n\r\n // get the key label from an event\r\n _exportFunctions.getKey = function(event) {\r\n for (var key in _keys) {\r\n if (_keys.hasOwnProperty(key)) {\r\n if (event.shiftKey == true && _keys[key].shift == true && event.keyCode == _keys[key].code) {\r\n return key;\r\n }\r\n else if (event.shiftKey == false && _keys[key].shift == false && event.keyCode == _keys[key].code) {\r\n return key;\r\n }\r\n else if (event.keyCode == _keys[key].code && key == 'shift') {\r\n return key;\r\n }\r\n }\r\n }\r\n return \"unknown key, currently not supported\";\r\n };\r\n\r\n // unbind either a specific callback from a key or all of them (by leaving callback undefined)\r\n _exportFunctions.unbind = function(key, callback, type) {\r\n if (type === undefined) {\r\n type = 'keydown';\r\n }\r\n if (_keys[key] === undefined) {\r\n throw new Error(\"unsupported key: \" + key);\r\n }\r\n if (callback !== undefined) {\r\n var newBindings = [];\r\n var bound = _bound[type][_keys[key].code];\r\n if (bound !== undefined) {\r\n for (var i = 0; i < bound.length; i++) {\r\n if (!(bound[i].fn == callback && bound[i].shift == _keys[key].shift)) {\r\n newBindings.push(_bound[type][_keys[key].code][i]);\r\n }\r\n }\r\n }\r\n _bound[type][_keys[key].code] = newBindings;\r\n }\r\n else {\r\n _bound[type][_keys[key].code] = [];\r\n }\r\n };\r\n\r\n // reset all bound variables.\r\n _exportFunctions.reset = function() {\r\n _bound = {keydown:{}, keyup:{}};\r\n };\r\n\r\n // unbind all listeners and reset all variables.\r\n _exportFunctions.destroy = function() {\r\n _bound = {keydown:{}, keyup:{}};\r\n container.removeEventListener('keydown', down, true);\r\n container.removeEventListener('keyup', up, true);\r\n };\r\n\r\n // create listeners.\r\n container.addEventListener('keydown',down,true);\r\n container.addEventListener('keyup',up,true);\r\n\r\n // return the public functions.\r\n return _exportFunctions;\r\n }\r\n\r\n return keycharm;\r\n}));\r\n\r\n\r\n","/*! Hammer.JS - v2.0.15 - 2019-04-04\n * http://naver.github.io/egjs\n *\n * Forked By Naver egjs\n * Copyright (c) hammerjs\n * Licensed under the MIT license */\nfunction _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}\n\nfunction _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n subClass.__proto__ = superClass;\n}\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\n/**\n * @private\n * extend object.\n * means that properties in dest will be overwritten by the ones in src.\n * @param {Object} target\n * @param {...Object} objects_to_assign\n * @returns {Object} target\n */\nvar assign;\n\nif (typeof Object.assign !== 'function') {\n assign = function assign(target) {\n if (target === undefined || target === null) {\n throw new TypeError('Cannot convert undefined or null to object');\n }\n\n var output = Object(target);\n\n for (var index = 1; index < arguments.length; index++) {\n var source = arguments[index];\n\n if (source !== undefined && source !== null) {\n for (var nextKey in source) {\n if (source.hasOwnProperty(nextKey)) {\n output[nextKey] = source[nextKey];\n }\n }\n }\n }\n\n return output;\n };\n} else {\n assign = Object.assign;\n}\n\nvar assign$1 = assign;\n\nvar VENDOR_PREFIXES = ['', 'webkit', 'Moz', 'MS', 'ms', 'o'];\nvar TEST_ELEMENT = typeof document === \"undefined\" ? {\n style: {}\n} : document.createElement('div');\nvar TYPE_FUNCTION = 'function';\nvar round = Math.round,\n abs = Math.abs;\nvar now = Date.now;\n\n/**\n * @private\n * get the prefixed property\n * @param {Object} obj\n * @param {String} property\n * @returns {String|Undefined} prefixed\n */\n\nfunction prefixed(obj, property) {\n var prefix;\n var prop;\n var camelProp = property[0].toUpperCase() + property.slice(1);\n var i = 0;\n\n while (i < VENDOR_PREFIXES.length) {\n prefix = VENDOR_PREFIXES[i];\n prop = prefix ? prefix + camelProp : property;\n\n if (prop in obj) {\n return prop;\n }\n\n i++;\n }\n\n return undefined;\n}\n\n/* eslint-disable no-new-func, no-nested-ternary */\nvar win;\n\nif (typeof window === \"undefined\") {\n // window is undefined in node.js\n win = {};\n} else {\n win = window;\n}\n\nvar PREFIXED_TOUCH_ACTION = prefixed(TEST_ELEMENT.style, 'touchAction');\nvar NATIVE_TOUCH_ACTION = PREFIXED_TOUCH_ACTION !== undefined;\nfunction getTouchActionProps() {\n if (!NATIVE_TOUCH_ACTION) {\n return false;\n }\n\n var touchMap = {};\n var cssSupports = win.CSS && win.CSS.supports;\n ['auto', 'manipulation', 'pan-y', 'pan-x', 'pan-x pan-y', 'none'].forEach(function (val) {\n // If css.supports is not supported but there is native touch-action assume it supports\n // all values. This is the case for IE 10 and 11.\n return touchMap[val] = cssSupports ? win.CSS.supports('touch-action', val) : true;\n });\n return touchMap;\n}\n\nvar TOUCH_ACTION_COMPUTE = 'compute';\nvar TOUCH_ACTION_AUTO = 'auto';\nvar TOUCH_ACTION_MANIPULATION = 'manipulation'; // not implemented\n\nvar TOUCH_ACTION_NONE = 'none';\nvar TOUCH_ACTION_PAN_X = 'pan-x';\nvar TOUCH_ACTION_PAN_Y = 'pan-y';\nvar TOUCH_ACTION_MAP = getTouchActionProps();\n\nvar MOBILE_REGEX = /mobile|tablet|ip(ad|hone|od)|android/i;\nvar SUPPORT_TOUCH = 'ontouchstart' in win;\nvar SUPPORT_POINTER_EVENTS = prefixed(win, 'PointerEvent') !== undefined;\nvar SUPPORT_ONLY_TOUCH = SUPPORT_TOUCH && MOBILE_REGEX.test(navigator.userAgent);\nvar INPUT_TYPE_TOUCH = 'touch';\nvar INPUT_TYPE_PEN = 'pen';\nvar INPUT_TYPE_MOUSE = 'mouse';\nvar INPUT_TYPE_KINECT = 'kinect';\nvar COMPUTE_INTERVAL = 25;\nvar INPUT_START = 1;\nvar INPUT_MOVE = 2;\nvar INPUT_END = 4;\nvar INPUT_CANCEL = 8;\nvar DIRECTION_NONE = 1;\nvar DIRECTION_LEFT = 2;\nvar DIRECTION_RIGHT = 4;\nvar DIRECTION_UP = 8;\nvar DIRECTION_DOWN = 16;\nvar DIRECTION_HORIZONTAL = DIRECTION_LEFT | DIRECTION_RIGHT;\nvar DIRECTION_VERTICAL = DIRECTION_UP | DIRECTION_DOWN;\nvar DIRECTION_ALL = DIRECTION_HORIZONTAL | DIRECTION_VERTICAL;\nvar PROPS_XY = ['x', 'y'];\nvar PROPS_CLIENT_XY = ['clientX', 'clientY'];\n\n/**\n * @private\n * walk objects and arrays\n * @param {Object} obj\n * @param {Function} iterator\n * @param {Object} context\n */\nfunction each(obj, iterator, context) {\n var i;\n\n if (!obj) {\n return;\n }\n\n if (obj.forEach) {\n obj.forEach(iterator, context);\n } else if (obj.length !== undefined) {\n i = 0;\n\n while (i < obj.length) {\n iterator.call(context, obj[i], i, obj);\n i++;\n }\n } else {\n for (i in obj) {\n obj.hasOwnProperty(i) && iterator.call(context, obj[i], i, obj);\n }\n }\n}\n\n/**\n * @private\n * let a boolean value also be a function that must return a boolean\n * this first item in args will be used as the context\n * @param {Boolean|Function} val\n * @param {Array} [args]\n * @returns {Boolean}\n */\n\nfunction boolOrFn(val, args) {\n if (typeof val === TYPE_FUNCTION) {\n return val.apply(args ? args[0] || undefined : undefined, args);\n }\n\n return val;\n}\n\n/**\n * @private\n * small indexOf wrapper\n * @param {String} str\n * @param {String} find\n * @returns {Boolean} found\n */\nfunction inStr(str, find) {\n return str.indexOf(find) > -1;\n}\n\n/**\n * @private\n * when the touchActions are collected they are not a valid value, so we need to clean things up. *\n * @param {String} actions\n * @returns {*}\n */\n\nfunction cleanTouchActions(actions) {\n // none\n if (inStr(actions, TOUCH_ACTION_NONE)) {\n return TOUCH_ACTION_NONE;\n }\n\n var hasPanX = inStr(actions, TOUCH_ACTION_PAN_X);\n var hasPanY = inStr(actions, TOUCH_ACTION_PAN_Y); // if both pan-x and pan-y are set (different recognizers\n // for different directions, e.g. horizontal pan but vertical swipe?)\n // we need none (as otherwise with pan-x pan-y combined none of these\n // recognizers will work, since the browser would handle all panning\n\n if (hasPanX && hasPanY) {\n return TOUCH_ACTION_NONE;\n } // pan-x OR pan-y\n\n\n if (hasPanX || hasPanY) {\n return hasPanX ? TOUCH_ACTION_PAN_X : TOUCH_ACTION_PAN_Y;\n } // manipulation\n\n\n if (inStr(actions, TOUCH_ACTION_MANIPULATION)) {\n return TOUCH_ACTION_MANIPULATION;\n }\n\n return TOUCH_ACTION_AUTO;\n}\n\n/**\n * @private\n * Touch Action\n * sets the touchAction property or uses the js alternative\n * @param {Manager} manager\n * @param {String} value\n * @constructor\n */\n\nvar TouchAction =\n/*#__PURE__*/\nfunction () {\n function TouchAction(manager, value) {\n this.manager = manager;\n this.set(value);\n }\n /**\n * @private\n * set the touchAction value on the element or enable the polyfill\n * @param {String} value\n */\n\n\n var _proto = TouchAction.prototype;\n\n _proto.set = function set(value) {\n // find out the touch-action by the event handlers\n if (value === TOUCH_ACTION_COMPUTE) {\n value = this.compute();\n }\n\n if (NATIVE_TOUCH_ACTION && this.manager.element.style && TOUCH_ACTION_MAP[value]) {\n this.manager.element.style[PREFIXED_TOUCH_ACTION] = value;\n }\n\n this.actions = value.toLowerCase().trim();\n };\n /**\n * @private\n * just re-set the touchAction value\n */\n\n\n _proto.update = function update() {\n this.set(this.manager.options.touchAction);\n };\n /**\n * @private\n * compute the value for the touchAction property based on the recognizer's settings\n * @returns {String} value\n */\n\n\n _proto.compute = function compute() {\n var actions = [];\n each(this.manager.recognizers, function (recognizer) {\n if (boolOrFn(recognizer.options.enable, [recognizer])) {\n actions = actions.concat(recognizer.getTouchAction());\n }\n });\n return cleanTouchActions(actions.join(' '));\n };\n /**\n * @private\n * this method is called on each input cycle and provides the preventing of the browser behavior\n * @param {Object} input\n */\n\n\n _proto.preventDefaults = function preventDefaults(input) {\n var srcEvent = input.srcEvent;\n var direction = input.offsetDirection; // if the touch action did prevented once this session\n\n if (this.manager.session.prevented) {\n srcEvent.preventDefault();\n return;\n }\n\n var actions = this.actions;\n var hasNone = inStr(actions, TOUCH_ACTION_NONE) && !TOUCH_ACTION_MAP[TOUCH_ACTION_NONE];\n var hasPanY = inStr(actions, TOUCH_ACTION_PAN_Y) && !TOUCH_ACTION_MAP[TOUCH_ACTION_PAN_Y];\n var hasPanX = inStr(actions, TOUCH_ACTION_PAN_X) && !TOUCH_ACTION_MAP[TOUCH_ACTION_PAN_X];\n\n if (hasNone) {\n // do not prevent defaults if this is a tap gesture\n var isTapPointer = input.pointers.length === 1;\n var isTapMovement = input.distance < 2;\n var isTapTouchTime = input.deltaTime < 250;\n\n if (isTapPointer && isTapMovement && isTapTouchTime) {\n return;\n }\n }\n\n if (hasPanX && hasPanY) {\n // `pan-x pan-y` means browser handles all scrolling/panning, do not prevent\n return;\n }\n\n if (hasNone || hasPanY && direction & DIRECTION_HORIZONTAL || hasPanX && direction & DIRECTION_VERTICAL) {\n return this.preventSrc(srcEvent);\n }\n };\n /**\n * @private\n * call preventDefault to prevent the browser's default behavior (scrolling in most cases)\n * @param {Object} srcEvent\n */\n\n\n _proto.preventSrc = function preventSrc(srcEvent) {\n this.manager.session.prevented = true;\n srcEvent.preventDefault();\n };\n\n return TouchAction;\n}();\n\n/**\n * @private\n * find if a node is in the given parent\n * @method hasParent\n * @param {HTMLElement} node\n * @param {HTMLElement} parent\n * @return {Boolean} found\n */\nfunction hasParent(node, parent) {\n while (node) {\n if (node === parent) {\n return true;\n }\n\n node = node.parentNode;\n }\n\n return false;\n}\n\n/**\n * @private\n * get the center of all the pointers\n * @param {Array} pointers\n * @return {Object} center contains `x` and `y` properties\n */\n\nfunction getCenter(pointers) {\n var pointersLength = pointers.length; // no need to loop when only one touch\n\n if (pointersLength === 1) {\n return {\n x: round(pointers[0].clientX),\n y: round(pointers[0].clientY)\n };\n }\n\n var x = 0;\n var y = 0;\n var i = 0;\n\n while (i < pointersLength) {\n x += pointers[i].clientX;\n y += pointers[i].clientY;\n i++;\n }\n\n return {\n x: round(x / pointersLength),\n y: round(y / pointersLength)\n };\n}\n\n/**\n * @private\n * create a simple clone from the input used for storage of firstInput and firstMultiple\n * @param {Object} input\n * @returns {Object} clonedInputData\n */\n\nfunction simpleCloneInputData(input) {\n // make a simple copy of the pointers because we will get a reference if we don't\n // we only need clientXY for the calculations\n var pointers = [];\n var i = 0;\n\n while (i < input.pointers.length) {\n pointers[i] = {\n clientX: round(input.pointers[i].clientX),\n clientY: round(input.pointers[i].clientY)\n };\n i++;\n }\n\n return {\n timeStamp: now(),\n pointers: pointers,\n center: getCenter(pointers),\n deltaX: input.deltaX,\n deltaY: input.deltaY\n };\n}\n\n/**\n * @private\n * calculate the absolute distance between two points\n * @param {Object} p1 {x, y}\n * @param {Object} p2 {x, y}\n * @param {Array} [props] containing x and y keys\n * @return {Number} distance\n */\n\nfunction getDistance(p1, p2, props) {\n if (!props) {\n props = PROPS_XY;\n }\n\n var x = p2[props[0]] - p1[props[0]];\n var y = p2[props[1]] - p1[props[1]];\n return Math.sqrt(x * x + y * y);\n}\n\n/**\n * @private\n * calculate the angle between two coordinates\n * @param {Object} p1\n * @param {Object} p2\n * @param {Array} [props] containing x and y keys\n * @return {Number} angle\n */\n\nfunction getAngle(p1, p2, props) {\n if (!props) {\n props = PROPS_XY;\n }\n\n var x = p2[props[0]] - p1[props[0]];\n var y = p2[props[1]] - p1[props[1]];\n return Math.atan2(y, x) * 180 / Math.PI;\n}\n\n/**\n * @private\n * get the direction between two points\n * @param {Number} x\n * @param {Number} y\n * @return {Number} direction\n */\n\nfunction getDirection(x, y) {\n if (x === y) {\n return DIRECTION_NONE;\n }\n\n if (abs(x) >= abs(y)) {\n return x < 0 ? DIRECTION_LEFT : DIRECTION_RIGHT;\n }\n\n return y < 0 ? DIRECTION_UP : DIRECTION_DOWN;\n}\n\nfunction computeDeltaXY(session, input) {\n var center = input.center; // let { offsetDelta:offset = {}, prevDelta = {}, prevInput = {} } = session;\n // jscs throwing error on defalut destructured values and without defaults tests fail\n\n var offset = session.offsetDelta || {};\n var prevDelta = session.prevDelta || {};\n var prevInput = session.prevInput || {};\n\n if (input.eventType === INPUT_START || prevInput.eventType === INPUT_END) {\n prevDelta = session.prevDelta = {\n x: prevInput.deltaX || 0,\n y: prevInput.deltaY || 0\n };\n offset = session.offsetDelta = {\n x: center.x,\n y: center.y\n };\n }\n\n input.deltaX = prevDelta.x + (center.x - offset.x);\n input.deltaY = prevDelta.y + (center.y - offset.y);\n}\n\n/**\n * @private\n * calculate the velocity between two points. unit is in px per ms.\n * @param {Number} deltaTime\n * @param {Number} x\n * @param {Number} y\n * @return {Object} velocity `x` and `y`\n */\nfunction getVelocity(deltaTime, x, y) {\n return {\n x: x / deltaTime || 0,\n y: y / deltaTime || 0\n };\n}\n\n/**\n * @private\n * calculate the scale factor between two pointersets\n * no scale is 1, and goes down to 0 when pinched together, and bigger when pinched out\n * @param {Array} start array of pointers\n * @param {Array} end array of pointers\n * @return {Number} scale\n */\n\nfunction getScale(start, end) {\n return getDistance(end[0], end[1], PROPS_CLIENT_XY) / getDistance(start[0], start[1], PROPS_CLIENT_XY);\n}\n\n/**\n * @private\n * calculate the rotation degrees between two pointersets\n * @param {Array} start array of pointers\n * @param {Array} end array of pointers\n * @return {Number} rotation\n */\n\nfunction getRotation(start, end) {\n return getAngle(end[1], end[0], PROPS_CLIENT_XY) + getAngle(start[1], start[0], PROPS_CLIENT_XY);\n}\n\n/**\n * @private\n * velocity is calculated every x ms\n * @param {Object} session\n * @param {Object} input\n */\n\nfunction computeIntervalInputData(session, input) {\n var last = session.lastInterval || input;\n var deltaTime = input.timeStamp - last.timeStamp;\n var velocity;\n var velocityX;\n var velocityY;\n var direction;\n\n if (input.eventType !== INPUT_CANCEL && (deltaTime > COMPUTE_INTERVAL || last.velocity === undefined)) {\n var deltaX = input.deltaX - last.deltaX;\n var deltaY = input.deltaY - last.deltaY;\n var v = getVelocity(deltaTime, deltaX, deltaY);\n velocityX = v.x;\n velocityY = v.y;\n velocity = abs(v.x) > abs(v.y) ? v.x : v.y;\n direction = getDirection(deltaX, deltaY);\n session.lastInterval = input;\n } else {\n // use latest velocity info if it doesn't overtake a minimum period\n velocity = last.velocity;\n velocityX = last.velocityX;\n velocityY = last.velocityY;\n direction = last.direction;\n }\n\n input.velocity = velocity;\n input.velocityX = velocityX;\n input.velocityY = velocityY;\n input.direction = direction;\n}\n\n/**\n* @private\n * extend the data with some usable properties like scale, rotate, velocity etc\n * @param {Object} manager\n * @param {Object} input\n */\n\nfunction computeInputData(manager, input) {\n var session = manager.session;\n var pointers = input.pointers;\n var pointersLength = pointers.length; // store the first input to calculate the distance and direction\n\n if (!session.firstInput) {\n session.firstInput = simpleCloneInputData(input);\n } // to compute scale and rotation we need to store the multiple touches\n\n\n if (pointersLength > 1 && !session.firstMultiple) {\n session.firstMultiple = simpleCloneInputData(input);\n } else if (pointersLength === 1) {\n session.firstMultiple = false;\n }\n\n var firstInput = session.firstInput,\n firstMultiple = session.firstMultiple;\n var offsetCenter = firstMultiple ? firstMultiple.center : firstInput.center;\n var center = input.center = getCenter(pointers);\n input.timeStamp = now();\n input.deltaTime = input.timeStamp - firstInput.timeStamp;\n input.angle = getAngle(offsetCenter, center);\n input.distance = getDistance(offsetCenter, center);\n computeDeltaXY(session, input);\n input.offsetDirection = getDirection(input.deltaX, input.deltaY);\n var overallVelocity = getVelocity(input.deltaTime, input.deltaX, input.deltaY);\n input.overallVelocityX = overallVelocity.x;\n input.overallVelocityY = overallVelocity.y;\n input.overallVelocity = abs(overallVelocity.x) > abs(overallVelocity.y) ? overallVelocity.x : overallVelocity.y;\n input.scale = firstMultiple ? getScale(firstMultiple.pointers, pointers) : 1;\n input.rotation = firstMultiple ? getRotation(firstMultiple.pointers, pointers) : 0;\n input.maxPointers = !session.prevInput ? input.pointers.length : input.pointers.length > session.prevInput.maxPointers ? input.pointers.length : session.prevInput.maxPointers;\n computeIntervalInputData(session, input); // find the correct target\n\n var target = manager.element;\n\n if (hasParent(input.srcEvent.target, target)) {\n target = input.srcEvent.target;\n }\n\n input.target = target;\n}\n\n/**\n * @private\n * handle input events\n * @param {Manager} manager\n * @param {String} eventType\n * @param {Object} input\n */\n\nfunction inputHandler(manager, eventType, input) {\n var pointersLen = input.pointers.length;\n var changedPointersLen = input.changedPointers.length;\n var isFirst = eventType & INPUT_START && pointersLen - changedPointersLen === 0;\n var isFinal = eventType & (INPUT_END | INPUT_CANCEL) && pointersLen - changedPointersLen === 0;\n input.isFirst = !!isFirst;\n input.isFinal = !!isFinal;\n\n if (isFirst) {\n manager.session = {};\n } // source event is the normalized value of the domEvents\n // like 'touchstart, mouseup, pointerdown'\n\n\n input.eventType = eventType; // compute scale, rotation etc\n\n computeInputData(manager, input); // emit secret event\n\n manager.emit('hammer.input', input);\n manager.recognize(input);\n manager.session.prevInput = input;\n}\n\n/**\n * @private\n * split string on whitespace\n * @param {String} str\n * @returns {Array} words\n */\nfunction splitStr(str) {\n return str.trim().split(/\\s+/g);\n}\n\n/**\n * @private\n * addEventListener with multiple events at once\n * @param {EventTarget} target\n * @param {String} types\n * @param {Function} handler\n */\n\nfunction addEventListeners(target, types, handler) {\n each(splitStr(types), function (type) {\n target.addEventListener(type, handler, false);\n });\n}\n\n/**\n * @private\n * removeEventListener with multiple events at once\n * @param {EventTarget} target\n * @param {String} types\n * @param {Function} handler\n */\n\nfunction removeEventListeners(target, types, handler) {\n each(splitStr(types), function (type) {\n target.removeEventListener(type, handler, false);\n });\n}\n\n/**\n * @private\n * get the window object of an element\n * @param {HTMLElement} element\n * @returns {DocumentView|Window}\n */\nfunction getWindowForElement(element) {\n var doc = element.ownerDocument || element;\n return doc.defaultView || doc.parentWindow || window;\n}\n\n/**\n * @private\n * create new input type manager\n * @param {Manager} manager\n * @param {Function} callback\n * @returns {Input}\n * @constructor\n */\n\nvar Input =\n/*#__PURE__*/\nfunction () {\n function Input(manager, callback) {\n var self = this;\n this.manager = manager;\n this.callback = callback;\n this.element = manager.element;\n this.target = manager.options.inputTarget; // smaller wrapper around the handler, for the scope and the enabled state of the manager,\n // so when disabled the input events are completely bypassed.\n\n this.domHandler = function (ev) {\n if (boolOrFn(manager.options.enable, [manager])) {\n self.handler(ev);\n }\n };\n\n this.init();\n }\n /**\n * @private\n * should handle the inputEvent data and trigger the callback\n * @virtual\n */\n\n\n var _proto = Input.prototype;\n\n _proto.handler = function handler() {};\n /**\n * @private\n * bind the events\n */\n\n\n _proto.init = function init() {\n this.evEl && addEventListeners(this.element, this.evEl, this.domHandler);\n this.evTarget && addEventListeners(this.target, this.evTarget, this.domHandler);\n this.evWin && addEventListeners(getWindowForElement(this.element), this.evWin, this.domHandler);\n };\n /**\n * @private\n * unbind the events\n */\n\n\n _proto.destroy = function destroy() {\n this.evEl && removeEventListeners(this.element, this.evEl, this.domHandler);\n this.evTarget && removeEventListeners(this.target, this.evTarget, this.domHandler);\n this.evWin && removeEventListeners(getWindowForElement(this.element), this.evWin, this.domHandler);\n };\n\n return Input;\n}();\n\n/**\n * @private\n * find if a array contains the object using indexOf or a simple polyFill\n * @param {Array} src\n * @param {String} find\n * @param {String} [findByKey]\n * @return {Boolean|Number} false when not found, or the index\n */\nfunction inArray(src, find, findByKey) {\n if (src.indexOf && !findByKey) {\n return src.indexOf(find);\n } else {\n var i = 0;\n\n while (i < src.length) {\n if (findByKey && src[i][findByKey] == find || !findByKey && src[i] === find) {\n // do not use === here, test fails\n return i;\n }\n\n i++;\n }\n\n return -1;\n }\n}\n\nvar POINTER_INPUT_MAP = {\n pointerdown: INPUT_START,\n pointermove: INPUT_MOVE,\n pointerup: INPUT_END,\n pointercancel: INPUT_CANCEL,\n pointerout: INPUT_CANCEL\n}; // in IE10 the pointer types is defined as an enum\n\nvar IE10_POINTER_TYPE_ENUM = {\n 2: INPUT_TYPE_TOUCH,\n 3: INPUT_TYPE_PEN,\n 4: INPUT_TYPE_MOUSE,\n 5: INPUT_TYPE_KINECT // see https://twitter.com/jacobrossi/status/480596438489890816\n\n};\nvar POINTER_ELEMENT_EVENTS = 'pointerdown';\nvar POINTER_WINDOW_EVENTS = 'pointermove pointerup pointercancel'; // IE10 has prefixed support, and case-sensitive\n\nif (win.MSPointerEvent && !win.PointerEvent) {\n POINTER_ELEMENT_EVENTS = 'MSPointerDown';\n POINTER_WINDOW_EVENTS = 'MSPointerMove MSPointerUp MSPointerCancel';\n}\n/**\n * @private\n * Pointer events input\n * @constructor\n * @extends Input\n */\n\n\nvar PointerEventInput =\n/*#__PURE__*/\nfunction (_Input) {\n _inheritsLoose(PointerEventInput, _Input);\n\n function PointerEventInput() {\n var _this;\n\n var proto = PointerEventInput.prototype;\n proto.evEl = POINTER_ELEMENT_EVENTS;\n proto.evWin = POINTER_WINDOW_EVENTS;\n _this = _Input.apply(this, arguments) || this;\n _this.store = _this.manager.session.pointerEvents = [];\n return _this;\n }\n /**\n * @private\n * handle mouse events\n * @param {Object} ev\n */\n\n\n var _proto = PointerEventInput.prototype;\n\n _proto.handler = function handler(ev) {\n var store = this.store;\n var removePointer = false;\n var eventTypeNormalized = ev.type.toLowerCase().replace('ms', '');\n var eventType = POINTER_INPUT_MAP[eventTypeNormalized];\n var pointerType = IE10_POINTER_TYPE_ENUM[ev.pointerType] || ev.pointerType;\n var isTouch = pointerType === INPUT_TYPE_TOUCH; // get index of the event in the store\n\n var storeIndex = inArray(store, ev.pointerId, 'pointerId'); // start and mouse must be down\n\n if (eventType & INPUT_START && (ev.button === 0 || isTouch)) {\n if (storeIndex < 0) {\n store.push(ev);\n storeIndex = store.length - 1;\n }\n } else if (eventType & (INPUT_END | INPUT_CANCEL)) {\n removePointer = true;\n } // it not found, so the pointer hasn't been down (so it's probably a hover)\n\n\n if (storeIndex < 0) {\n return;\n } // update the event in the store\n\n\n store[storeIndex] = ev;\n this.callback(this.manager, eventType, {\n pointers: store,\n changedPointers: [ev],\n pointerType: pointerType,\n srcEvent: ev\n });\n\n if (removePointer) {\n // remove from the store\n store.splice(storeIndex, 1);\n }\n };\n\n return PointerEventInput;\n}(Input);\n\n/**\n * @private\n * convert array-like objects to real arrays\n * @param {Object} obj\n * @returns {Array}\n */\nfunction toArray(obj) {\n return Array.prototype.slice.call(obj, 0);\n}\n\n/**\n * @private\n * unique array with objects based on a key (like 'id') or just by the array's value\n * @param {Array} src [{id:1},{id:2},{id:1}]\n * @param {String} [key]\n * @param {Boolean} [sort=False]\n * @returns {Array} [{id:1},{id:2}]\n */\n\nfunction uniqueArray(src, key, sort) {\n var results = [];\n var values = [];\n var i = 0;\n\n while (i < src.length) {\n var val = key ? src[i][key] : src[i];\n\n if (inArray(values, val) < 0) {\n results.push(src[i]);\n }\n\n values[i] = val;\n i++;\n }\n\n if (sort) {\n if (!key) {\n results = results.sort();\n } else {\n results = results.sort(function (a, b) {\n return a[key] > b[key];\n });\n }\n }\n\n return results;\n}\n\nvar TOUCH_INPUT_MAP = {\n touchstart: INPUT_START,\n touchmove: INPUT_MOVE,\n touchend: INPUT_END,\n touchcancel: INPUT_CANCEL\n};\nvar TOUCH_TARGET_EVENTS = 'touchstart touchmove touchend touchcancel';\n/**\n * @private\n * Multi-user touch events input\n * @constructor\n * @extends Input\n */\n\nvar TouchInput =\n/*#__PURE__*/\nfunction (_Input) {\n _inheritsLoose(TouchInput, _Input);\n\n function TouchInput() {\n var _this;\n\n TouchInput.prototype.evTarget = TOUCH_TARGET_EVENTS;\n _this = _Input.apply(this, arguments) || this;\n _this.targetIds = {}; // this.evTarget = TOUCH_TARGET_EVENTS;\n\n return _this;\n }\n\n var _proto = TouchInput.prototype;\n\n _proto.handler = function handler(ev) {\n var type = TOUCH_INPUT_MAP[ev.type];\n var touches = getTouches.call(this, ev, type);\n\n if (!touches) {\n return;\n }\n\n this.callback(this.manager, type, {\n pointers: touches[0],\n changedPointers: touches[1],\n pointerType: INPUT_TYPE_TOUCH,\n srcEvent: ev\n });\n };\n\n return TouchInput;\n}(Input);\n\nfunction getTouches(ev, type) {\n var allTouches = toArray(ev.touches);\n var targetIds = this.targetIds; // when there is only one touch, the process can be simplified\n\n if (type & (INPUT_START | INPUT_MOVE) && allTouches.length === 1) {\n targetIds[allTouches[0].identifier] = true;\n return [allTouches, allTouches];\n }\n\n var i;\n var targetTouches;\n var changedTouches = toArray(ev.changedTouches);\n var changedTargetTouches = [];\n var target = this.target; // get target touches from touches\n\n targetTouches = allTouches.filter(function (touch) {\n return hasParent(touch.target, target);\n }); // collect touches\n\n if (type === INPUT_START) {\n i = 0;\n\n while (i < targetTouches.length) {\n targetIds[targetTouches[i].identifier] = true;\n i++;\n }\n } // filter changed touches to only contain touches that exist in the collected target ids\n\n\n i = 0;\n\n while (i < changedTouches.length) {\n if (targetIds[changedTouches[i].identifier]) {\n changedTargetTouches.push(changedTouches[i]);\n } // cleanup removed touches\n\n\n if (type & (INPUT_END | INPUT_CANCEL)) {\n delete targetIds[changedTouches[i].identifier];\n }\n\n i++;\n }\n\n if (!changedTargetTouches.length) {\n return;\n }\n\n return [// merge targetTouches with changedTargetTouches so it contains ALL touches, including 'end' and 'cancel'\n uniqueArray(targetTouches.concat(changedTargetTouches), 'identifier', true), changedTargetTouches];\n}\n\nvar MOUSE_INPUT_MAP = {\n mousedown: INPUT_START,\n mousemove: INPUT_MOVE,\n mouseup: INPUT_END\n};\nvar MOUSE_ELEMENT_EVENTS = 'mousedown';\nvar MOUSE_WINDOW_EVENTS = 'mousemove mouseup';\n/**\n * @private\n * Mouse events input\n * @constructor\n * @extends Input\n */\n\nvar MouseInput =\n/*#__PURE__*/\nfunction (_Input) {\n _inheritsLoose(MouseInput, _Input);\n\n function MouseInput() {\n var _this;\n\n var proto = MouseInput.prototype;\n proto.evEl = MOUSE_ELEMENT_EVENTS;\n proto.evWin = MOUSE_WINDOW_EVENTS;\n _this = _Input.apply(this, arguments) || this;\n _this.pressed = false; // mousedown state\n\n return _this;\n }\n /**\n * @private\n * handle mouse events\n * @param {Object} ev\n */\n\n\n var _proto = MouseInput.prototype;\n\n _proto.handler = function handler(ev) {\n var eventType = MOUSE_INPUT_MAP[ev.type]; // on start we want to have the left mouse button down\n\n if (eventType & INPUT_START && ev.button === 0) {\n this.pressed = true;\n }\n\n if (eventType & INPUT_MOVE && ev.which !== 1) {\n eventType = INPUT_END;\n } // mouse must be down\n\n\n if (!this.pressed) {\n return;\n }\n\n if (eventType & INPUT_END) {\n this.pressed = false;\n }\n\n this.callback(this.manager, eventType, {\n pointers: [ev],\n changedPointers: [ev],\n pointerType: INPUT_TYPE_MOUSE,\n srcEvent: ev\n });\n };\n\n return MouseInput;\n}(Input);\n\n/**\n * @private\n * Combined touch and mouse input\n *\n * Touch has a higher priority then mouse, and while touching no mouse events are allowed.\n * This because touch devices also emit mouse events while doing a touch.\n *\n * @constructor\n * @extends Input\n */\n\nvar DEDUP_TIMEOUT = 2500;\nvar DEDUP_DISTANCE = 25;\n\nfunction setLastTouch(eventData) {\n var _eventData$changedPoi = eventData.changedPointers,\n touch = _eventData$changedPoi[0];\n\n if (touch.identifier === this.primaryTouch) {\n var lastTouch = {\n x: touch.clientX,\n y: touch.clientY\n };\n var lts = this.lastTouches;\n this.lastTouches.push(lastTouch);\n\n var removeLastTouch = function removeLastTouch() {\n var i = lts.indexOf(lastTouch);\n\n if (i > -1) {\n lts.splice(i, 1);\n }\n };\n\n setTimeout(removeLastTouch, DEDUP_TIMEOUT);\n }\n}\n\nfunction recordTouches(eventType, eventData) {\n if (eventType & INPUT_START) {\n this.primaryTouch = eventData.changedPointers[0].identifier;\n setLastTouch.call(this, eventData);\n } else if (eventType & (INPUT_END | INPUT_CANCEL)) {\n setLastTouch.call(this, eventData);\n }\n}\n\nfunction isSyntheticEvent(eventData) {\n var x = eventData.srcEvent.clientX;\n var y = eventData.srcEvent.clientY;\n\n for (var i = 0; i < this.lastTouches.length; i++) {\n var t = this.lastTouches[i];\n var dx = Math.abs(x - t.x);\n var dy = Math.abs(y - t.y);\n\n if (dx <= DEDUP_DISTANCE && dy <= DEDUP_DISTANCE) {\n return true;\n }\n }\n\n return false;\n}\n\nvar TouchMouseInput =\n/*#__PURE__*/\nfunction () {\n var TouchMouseInput =\n /*#__PURE__*/\n function (_Input) {\n _inheritsLoose(TouchMouseInput, _Input);\n\n function TouchMouseInput(_manager, callback) {\n var _this;\n\n _this = _Input.call(this, _manager, callback) || this;\n\n _this.handler = function (manager, inputEvent, inputData) {\n var isTouch = inputData.pointerType === INPUT_TYPE_TOUCH;\n var isMouse = inputData.pointerType === INPUT_TYPE_MOUSE;\n\n if (isMouse && inputData.sourceCapabilities && inputData.sourceCapabilities.firesTouchEvents) {\n return;\n } // when we're in a touch event, record touches to de-dupe synthetic mouse event\n\n\n if (isTouch) {\n recordTouches.call(_assertThisInitialized(_assertThisInitialized(_this)), inputEvent, inputData);\n } else if (isMouse && isSyntheticEvent.call(_assertThisInitialized(_assertThisInitialized(_this)), inputData)) {\n return;\n }\n\n _this.callback(manager, inputEvent, inputData);\n };\n\n _this.touch = new TouchInput(_this.manager, _this.handler);\n _this.mouse = new MouseInput(_this.manager, _this.handler);\n _this.primaryTouch = null;\n _this.lastTouches = [];\n return _this;\n }\n /**\n * @private\n * handle mouse and touch events\n * @param {Hammer} manager\n * @param {String} inputEvent\n * @param {Object} inputData\n */\n\n\n var _proto = TouchMouseInput.prototype;\n\n /**\n * @private\n * remove the event listeners\n */\n _proto.destroy = function destroy() {\n this.touch.destroy();\n this.mouse.destroy();\n };\n\n return TouchMouseInput;\n }(Input);\n\n return TouchMouseInput;\n}();\n\n/**\n * @private\n * create new input type manager\n * called by the Manager constructor\n * @param {Hammer} manager\n * @returns {Input}\n */\n\nfunction createInputInstance(manager) {\n var Type; // let inputClass = manager.options.inputClass;\n\n var inputClass = manager.options.inputClass;\n\n if (inputClass) {\n Type = inputClass;\n } else if (SUPPORT_POINTER_EVENTS) {\n Type = PointerEventInput;\n } else if (SUPPORT_ONLY_TOUCH) {\n Type = TouchInput;\n } else if (!SUPPORT_TOUCH) {\n Type = MouseInput;\n } else {\n Type = TouchMouseInput;\n }\n\n return new Type(manager, inputHandler);\n}\n\n/**\n * @private\n * if the argument is an array, we want to execute the fn on each entry\n * if it aint an array we don't want to do a thing.\n * this is used by all the methods that accept a single and array argument.\n * @param {*|Array} arg\n * @param {String} fn\n * @param {Object} [context]\n * @returns {Boolean}\n */\n\nfunction invokeArrayArg(arg, fn, context) {\n if (Array.isArray(arg)) {\n each(arg, context[fn], context);\n return true;\n }\n\n return false;\n}\n\nvar STATE_POSSIBLE = 1;\nvar STATE_BEGAN = 2;\nvar STATE_CHANGED = 4;\nvar STATE_ENDED = 8;\nvar STATE_RECOGNIZED = STATE_ENDED;\nvar STATE_CANCELLED = 16;\nvar STATE_FAILED = 32;\n\n/**\n * @private\n * get a unique id\n * @returns {number} uniqueId\n */\nvar _uniqueId = 1;\nfunction uniqueId() {\n return _uniqueId++;\n}\n\n/**\n * @private\n * get a recognizer by name if it is bound to a manager\n * @param {Recognizer|String} otherRecognizer\n * @param {Recognizer} recognizer\n * @returns {Recognizer}\n */\nfunction getRecognizerByNameIfManager(otherRecognizer, recognizer) {\n var manager = recognizer.manager;\n\n if (manager) {\n return manager.get(otherRecognizer);\n }\n\n return otherRecognizer;\n}\n\n/**\n * @private\n * get a usable string, used as event postfix\n * @param {constant} state\n * @returns {String} state\n */\n\nfunction stateStr(state) {\n if (state & STATE_CANCELLED) {\n return 'cancel';\n } else if (state & STATE_ENDED) {\n return 'end';\n } else if (state & STATE_CHANGED) {\n return 'move';\n } else if (state & STATE_BEGAN) {\n return 'start';\n }\n\n return '';\n}\n\n/**\n * @private\n * Recognizer flow explained; *\n * All recognizers have the initial state of POSSIBLE when a input session starts.\n * The definition of a input session is from the first input until the last input, with all it's movement in it. *\n * Example session for mouse-input: mousedown -> mousemove -> mouseup\n *\n * On each recognizing cycle (see Manager.recognize) the .recognize() method is executed\n * which determines with state it should be.\n *\n * If the recognizer has the state FAILED, CANCELLED or RECOGNIZED (equals ENDED), it is reset to\n * POSSIBLE to give it another change on the next cycle.\n *\n * Possible\n * |\n * +-----+---------------+\n * | |\n * +-----+-----+ |\n * | | |\n * Failed Cancelled |\n * +-------+------+\n * | |\n * Recognized Began\n * |\n * Changed\n * |\n * Ended/Recognized\n */\n\n/**\n * @private\n * Recognizer\n * Every recognizer needs to extend from this class.\n * @constructor\n * @param {Object} options\n */\n\nvar Recognizer =\n/*#__PURE__*/\nfunction () {\n function Recognizer(options) {\n if (options === void 0) {\n options = {};\n }\n\n this.options = _extends({\n enable: true\n }, options);\n this.id = uniqueId();\n this.manager = null; // default is enable true\n\n this.state = STATE_POSSIBLE;\n this.simultaneous = {};\n this.requireFail = [];\n }\n /**\n * @private\n * set options\n * @param {Object} options\n * @return {Recognizer}\n */\n\n\n var _proto = Recognizer.prototype;\n\n _proto.set = function set(options) {\n assign$1(this.options, options); // also update the touchAction, in case something changed about the directions/enabled state\n\n this.manager && this.manager.touchAction.update();\n return this;\n };\n /**\n * @private\n * recognize simultaneous with an other recognizer.\n * @param {Recognizer} otherRecognizer\n * @returns {Recognizer} this\n */\n\n\n _proto.recognizeWith = function recognizeWith(otherRecognizer) {\n if (invokeArrayArg(otherRecognizer, 'recognizeWith', this)) {\n return this;\n }\n\n var simultaneous = this.simultaneous;\n otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this);\n\n if (!simultaneous[otherRecognizer.id]) {\n simultaneous[otherRecognizer.id] = otherRecognizer;\n otherRecognizer.recognizeWith(this);\n }\n\n return this;\n };\n /**\n * @private\n * drop the simultaneous link. it doesnt remove the link on the other recognizer.\n * @param {Recognizer} otherRecognizer\n * @returns {Recognizer} this\n */\n\n\n _proto.dropRecognizeWith = function dropRecognizeWith(otherRecognizer) {\n if (invokeArrayArg(otherRecognizer, 'dropRecognizeWith', this)) {\n return this;\n }\n\n otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this);\n delete this.simultaneous[otherRecognizer.id];\n return this;\n };\n /**\n * @private\n * recognizer can only run when an other is failing\n * @param {Recognizer} otherRecognizer\n * @returns {Recognizer} this\n */\n\n\n _proto.requireFailure = function requireFailure(otherRecognizer) {\n if (invokeArrayArg(otherRecognizer, 'requireFailure', this)) {\n return this;\n }\n\n var requireFail = this.requireFail;\n otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this);\n\n if (inArray(requireFail, otherRecognizer) === -1) {\n requireFail.push(otherRecognizer);\n otherRecognizer.requireFailure(this);\n }\n\n return this;\n };\n /**\n * @private\n * drop the requireFailure link. it does not remove the link on the other recognizer.\n * @param {Recognizer} otherRecognizer\n * @returns {Recognizer} this\n */\n\n\n _proto.dropRequireFailure = function dropRequireFailure(otherRecognizer) {\n if (invokeArrayArg(otherRecognizer, 'dropRequireFailure', this)) {\n return this;\n }\n\n otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this);\n var index = inArray(this.requireFail, otherRecognizer);\n\n if (index > -1) {\n this.requireFail.splice(index, 1);\n }\n\n return this;\n };\n /**\n * @private\n * has require failures boolean\n * @returns {boolean}\n */\n\n\n _proto.hasRequireFailures = function hasRequireFailures() {\n return this.requireFail.length > 0;\n };\n /**\n * @private\n * if the recognizer can recognize simultaneous with an other recognizer\n * @param {Recognizer} otherRecognizer\n * @returns {Boolean}\n */\n\n\n _proto.canRecognizeWith = function canRecognizeWith(otherRecognizer) {\n return !!this.simultaneous[otherRecognizer.id];\n };\n /**\n * @private\n * You should use `tryEmit` instead of `emit` directly to check\n * that all the needed recognizers has failed before emitting.\n * @param {Object} input\n */\n\n\n _proto.emit = function emit(input) {\n var self = this;\n var state = this.state;\n\n function emit(event) {\n self.manager.emit(event, input);\n } // 'panstart' and 'panmove'\n\n\n if (state < STATE_ENDED) {\n emit(self.options.event + stateStr(state));\n }\n\n emit(self.options.event); // simple 'eventName' events\n\n if (input.additionalEvent) {\n // additional event(panleft, panright, pinchin, pinchout...)\n emit(input.additionalEvent);\n } // panend and pancancel\n\n\n if (state >= STATE_ENDED) {\n emit(self.options.event + stateStr(state));\n }\n };\n /**\n * @private\n * Check that all the require failure recognizers has failed,\n * if true, it emits a gesture event,\n * otherwise, setup the state to FAILED.\n * @param {Object} input\n */\n\n\n _proto.tryEmit = function tryEmit(input) {\n if (this.canEmit()) {\n return this.emit(input);\n } // it's failing anyway\n\n\n this.state = STATE_FAILED;\n };\n /**\n * @private\n * can we emit?\n * @returns {boolean}\n */\n\n\n _proto.canEmit = function canEmit() {\n var i = 0;\n\n while (i < this.requireFail.length) {\n if (!(this.requireFail[i].state & (STATE_FAILED | STATE_POSSIBLE))) {\n return false;\n }\n\n i++;\n }\n\n return true;\n };\n /**\n * @private\n * update the recognizer\n * @param {Object} inputData\n */\n\n\n _proto.recognize = function recognize(inputData) {\n // make a new copy of the inputData\n // so we can change the inputData without messing up the other recognizers\n var inputDataClone = assign$1({}, inputData); // is is enabled and allow recognizing?\n\n if (!boolOrFn(this.options.enable, [this, inputDataClone])) {\n this.reset();\n this.state = STATE_FAILED;\n return;\n } // reset when we've reached the end\n\n\n if (this.state & (STATE_RECOGNIZED | STATE_CANCELLED | STATE_FAILED)) {\n this.state = STATE_POSSIBLE;\n }\n\n this.state = this.process(inputDataClone); // the recognizer has recognized a gesture\n // so trigger an event\n\n if (this.state & (STATE_BEGAN | STATE_CHANGED | STATE_ENDED | STATE_CANCELLED)) {\n this.tryEmit(inputDataClone);\n }\n };\n /**\n * @private\n * return the state of the recognizer\n * the actual recognizing happens in this method\n * @virtual\n * @param {Object} inputData\n * @returns {constant} STATE\n */\n\n /* jshint ignore:start */\n\n\n _proto.process = function process(inputData) {};\n /* jshint ignore:end */\n\n /**\n * @private\n * return the preferred touch-action\n * @virtual\n * @returns {Array}\n */\n\n\n _proto.getTouchAction = function getTouchAction() {};\n /**\n * @private\n * called when the gesture isn't allowed to recognize\n * like when another is being recognized or it is disabled\n * @virtual\n */\n\n\n _proto.reset = function reset() {};\n\n return Recognizer;\n}();\n\nvar defaults = {\n /**\n * @private\n * set if DOM events are being triggered.\n * But this is slower and unused by simple implementations, so disabled by default.\n * @type {Boolean}\n * @default false\n */\n domEvents: false,\n\n /**\n * @private\n * The value for the touchAction property/fallback.\n * When set to `compute` it will magically set the correct value based on the added recognizers.\n * @type {String}\n * @default compute\n */\n touchAction: TOUCH_ACTION_COMPUTE,\n\n /**\n * @private\n * @type {Boolean}\n * @default true\n */\n enable: true,\n\n /**\n * @private\n * EXPERIMENTAL FEATURE -- can be removed/changed\n * Change the parent input target element.\n * If Null, then it is being set the to main element.\n * @type {Null|EventTarget}\n * @default null\n */\n inputTarget: null,\n\n /**\n * @private\n * force an input class\n * @type {Null|Function}\n * @default null\n */\n inputClass: null,\n\n /**\n * @private\n * Default recognizer setup when calling `Hammer()`\n * When creating a new Manager these will be skipped.\n * @type {Array}\n */\n preset: [],\n\n /**\n * @private\n * Some CSS properties can be used to improve the working of Hammer.\n * Add them to this method and they will be set when creating a new Manager.\n * @namespace\n */\n cssProps: {\n /**\n * @private\n * Disables text selection to improve the dragging gesture. Mainly for desktop browsers.\n * @type {String}\n * @default 'none'\n */\n userSelect: \"none\",\n\n /**\n * @private\n * Disable the Windows Phone grippers when pressing an element.\n * @type {String}\n * @default 'none'\n */\n touchSelect: \"none\",\n\n /**\n * @private\n * Disables the default callout shown when you touch and hold a touch target.\n * On iOS, when you touch and hold a touch target such as a link, Safari displays\n * a callout containing information about the link. This property allows you to disable that callout.\n * @type {String}\n * @default 'none'\n */\n touchCallout: \"none\",\n\n /**\n * @private\n * Specifies whether zooming is enabled. Used by IE10>\n * @type {String}\n * @default 'none'\n */\n contentZooming: \"none\",\n\n /**\n * @private\n * Specifies that an entire element should be draggable instead of its contents. Mainly for desktop browsers.\n * @type {String}\n * @default 'none'\n */\n userDrag: \"none\",\n\n /**\n * @private\n * Overrides the highlight color shown when the user taps a link or a JavaScript\n * clickable element in iOS. This property obeys the alpha value, if specified.\n * @type {String}\n * @default 'rgba(0,0,0,0)'\n */\n tapHighlightColor: \"rgba(0,0,0,0)\"\n }\n};\n\nvar STOP = 1;\nvar FORCED_STOP = 2;\n/**\n * @private\n * add/remove the css properties as defined in manager.options.cssProps\n * @param {Manager} manager\n * @param {Boolean} add\n */\n\nfunction toggleCssProps(manager, add) {\n var element = manager.element;\n\n if (!element.style) {\n return;\n }\n\n var prop;\n each(manager.options.cssProps, function (value, name) {\n prop = prefixed(element.style, name);\n\n if (add) {\n manager.oldCssProps[prop] = element.style[prop];\n element.style[prop] = value;\n } else {\n element.style[prop] = manager.oldCssProps[prop] || \"\";\n }\n });\n\n if (!add) {\n manager.oldCssProps = {};\n }\n}\n/**\n * @private\n * trigger dom event\n * @param {String} event\n * @param {Object} data\n */\n\n\nfunction triggerDomEvent(event, data) {\n var gestureEvent = document.createEvent(\"Event\");\n gestureEvent.initEvent(event, true, true);\n gestureEvent.gesture = data;\n data.target.dispatchEvent(gestureEvent);\n}\n/**\n* @private\n * Manager\n * @param {HTMLElement} element\n * @param {Object} [options]\n * @constructor\n */\n\n\nvar Manager =\n/*#__PURE__*/\nfunction () {\n function Manager(element, options) {\n var _this = this;\n\n this.options = assign$1({}, defaults, options || {});\n this.options.inputTarget = this.options.inputTarget || element;\n this.handlers = {};\n this.session = {};\n this.recognizers = [];\n this.oldCssProps = {};\n this.element = element;\n this.input = createInputInstance(this);\n this.touchAction = new TouchAction(this, this.options.touchAction);\n toggleCssProps(this, true);\n each(this.options.recognizers, function (item) {\n var recognizer = _this.add(new item[0](item[1]));\n\n item[2] && recognizer.recognizeWith(item[2]);\n item[3] && recognizer.requireFailure(item[3]);\n }, this);\n }\n /**\n * @private\n * set options\n * @param {Object} options\n * @returns {Manager}\n */\n\n\n var _proto = Manager.prototype;\n\n _proto.set = function set(options) {\n assign$1(this.options, options); // Options that need a little more setup\n\n if (options.touchAction) {\n this.touchAction.update();\n }\n\n if (options.inputTarget) {\n // Clean up existing event listeners and reinitialize\n this.input.destroy();\n this.input.target = options.inputTarget;\n this.input.init();\n }\n\n return this;\n };\n /**\n * @private\n * stop recognizing for this session.\n * This session will be discarded, when a new [input]start event is fired.\n * When forced, the recognizer cycle is stopped immediately.\n * @param {Boolean} [force]\n */\n\n\n _proto.stop = function stop(force) {\n this.session.stopped = force ? FORCED_STOP : STOP;\n };\n /**\n * @private\n * run the recognizers!\n * called by the inputHandler function on every movement of the pointers (touches)\n * it walks through all the recognizers and tries to detect the gesture that is being made\n * @param {Object} inputData\n */\n\n\n _proto.recognize = function recognize(inputData) {\n var session = this.session;\n\n if (session.stopped) {\n return;\n } // run the touch-action polyfill\n\n\n this.touchAction.preventDefaults(inputData);\n var recognizer;\n var recognizers = this.recognizers; // this holds the recognizer that is being recognized.\n // so the recognizer's state needs to be BEGAN, CHANGED, ENDED or RECOGNIZED\n // if no recognizer is detecting a thing, it is set to `null`\n\n var curRecognizer = session.curRecognizer; // reset when the last recognizer is recognized\n // or when we're in a new session\n\n if (!curRecognizer || curRecognizer && curRecognizer.state & STATE_RECOGNIZED) {\n session.curRecognizer = null;\n curRecognizer = null;\n }\n\n var i = 0;\n\n while (i < recognizers.length) {\n recognizer = recognizers[i]; // find out if we are allowed try to recognize the input for this one.\n // 1. allow if the session is NOT forced stopped (see the .stop() method)\n // 2. allow if we still haven't recognized a gesture in this session, or the this recognizer is the one\n // that is being recognized.\n // 3. allow if the recognizer is allowed to run simultaneous with the current recognized recognizer.\n // this can be setup with the `recognizeWith()` method on the recognizer.\n\n if (session.stopped !== FORCED_STOP && ( // 1\n !curRecognizer || recognizer === curRecognizer || // 2\n recognizer.canRecognizeWith(curRecognizer))) {\n // 3\n recognizer.recognize(inputData);\n } else {\n recognizer.reset();\n } // if the recognizer has been recognizing the input as a valid gesture, we want to store this one as the\n // current active recognizer. but only if we don't already have an active recognizer\n\n\n if (!curRecognizer && recognizer.state & (STATE_BEGAN | STATE_CHANGED | STATE_ENDED)) {\n session.curRecognizer = recognizer;\n curRecognizer = recognizer;\n }\n\n i++;\n }\n };\n /**\n * @private\n * get a recognizer by its event name.\n * @param {Recognizer|String} recognizer\n * @returns {Recognizer|Null}\n */\n\n\n _proto.get = function get(recognizer) {\n if (recognizer instanceof Recognizer) {\n return recognizer;\n }\n\n var recognizers = this.recognizers;\n\n for (var i = 0; i < recognizers.length; i++) {\n if (recognizers[i].options.event === recognizer) {\n return recognizers[i];\n }\n }\n\n return null;\n };\n /**\n * @private add a recognizer to the manager\n * existing recognizers with the same event name will be removed\n * @param {Recognizer} recognizer\n * @returns {Recognizer|Manager}\n */\n\n\n _proto.add = function add(recognizer) {\n if (invokeArrayArg(recognizer, \"add\", this)) {\n return this;\n } // remove existing\n\n\n var existing = this.get(recognizer.options.event);\n\n if (existing) {\n this.remove(existing);\n }\n\n this.recognizers.push(recognizer);\n recognizer.manager = this;\n this.touchAction.update();\n return recognizer;\n };\n /**\n * @private\n * remove a recognizer by name or instance\n * @param {Recognizer|String} recognizer\n * @returns {Manager}\n */\n\n\n _proto.remove = function remove(recognizer) {\n if (invokeArrayArg(recognizer, \"remove\", this)) {\n return this;\n }\n\n var targetRecognizer = this.get(recognizer); // let's make sure this recognizer exists\n\n if (recognizer) {\n var recognizers = this.recognizers;\n var index = inArray(recognizers, targetRecognizer);\n\n if (index !== -1) {\n recognizers.splice(index, 1);\n this.touchAction.update();\n }\n }\n\n return this;\n };\n /**\n * @private\n * bind event\n * @param {String} events\n * @param {Function} handler\n * @returns {EventEmitter} this\n */\n\n\n _proto.on = function on(events, handler) {\n if (events === undefined || handler === undefined) {\n return this;\n }\n\n var handlers = this.handlers;\n each(splitStr(events), function (event) {\n handlers[event] = handlers[event] || [];\n handlers[event].push(handler);\n });\n return this;\n };\n /**\n * @private unbind event, leave emit blank to remove all handlers\n * @param {String} events\n * @param {Function} [handler]\n * @returns {EventEmitter} this\n */\n\n\n _proto.off = function off(events, handler) {\n if (events === undefined) {\n return this;\n }\n\n var handlers = this.handlers;\n each(splitStr(events), function (event) {\n if (!handler) {\n delete handlers[event];\n } else {\n handlers[event] && handlers[event].splice(inArray(handlers[event], handler), 1);\n }\n });\n return this;\n };\n /**\n * @private emit event to the listeners\n * @param {String} event\n * @param {Object} data\n */\n\n\n _proto.emit = function emit(event, data) {\n // we also want to trigger dom events\n if (this.options.domEvents) {\n triggerDomEvent(event, data);\n } // no handlers, so skip it all\n\n\n var handlers = this.handlers[event] && this.handlers[event].slice();\n\n if (!handlers || !handlers.length) {\n return;\n }\n\n data.type = event;\n\n data.preventDefault = function () {\n data.srcEvent.preventDefault();\n };\n\n var i = 0;\n\n while (i < handlers.length) {\n handlers[i](data);\n i++;\n }\n };\n /**\n * @private\n * destroy the manager and unbinds all events\n * it doesn't unbind dom events, that is the user own responsibility\n */\n\n\n _proto.destroy = function destroy() {\n this.element && toggleCssProps(this, false);\n this.handlers = {};\n this.session = {};\n this.input.destroy();\n this.element = null;\n };\n\n return Manager;\n}();\n\nvar SINGLE_TOUCH_INPUT_MAP = {\n touchstart: INPUT_START,\n touchmove: INPUT_MOVE,\n touchend: INPUT_END,\n touchcancel: INPUT_CANCEL\n};\nvar SINGLE_TOUCH_TARGET_EVENTS = 'touchstart';\nvar SINGLE_TOUCH_WINDOW_EVENTS = 'touchstart touchmove touchend touchcancel';\n/**\n * @private\n * Touch events input\n * @constructor\n * @extends Input\n */\n\nvar SingleTouchInput =\n/*#__PURE__*/\nfunction (_Input) {\n _inheritsLoose(SingleTouchInput, _Input);\n\n function SingleTouchInput() {\n var _this;\n\n var proto = SingleTouchInput.prototype;\n proto.evTarget = SINGLE_TOUCH_TARGET_EVENTS;\n proto.evWin = SINGLE_TOUCH_WINDOW_EVENTS;\n _this = _Input.apply(this, arguments) || this;\n _this.started = false;\n return _this;\n }\n\n var _proto = SingleTouchInput.prototype;\n\n _proto.handler = function handler(ev) {\n var type = SINGLE_TOUCH_INPUT_MAP[ev.type]; // should we handle the touch events?\n\n if (type === INPUT_START) {\n this.started = true;\n }\n\n if (!this.started) {\n return;\n }\n\n var touches = normalizeSingleTouches.call(this, ev, type); // when done, reset the started state\n\n if (type & (INPUT_END | INPUT_CANCEL) && touches[0].length - touches[1].length === 0) {\n this.started = false;\n }\n\n this.callback(this.manager, type, {\n pointers: touches[0],\n changedPointers: touches[1],\n pointerType: INPUT_TYPE_TOUCH,\n srcEvent: ev\n });\n };\n\n return SingleTouchInput;\n}(Input);\n\nfunction normalizeSingleTouches(ev, type) {\n var all = toArray(ev.touches);\n var changed = toArray(ev.changedTouches);\n\n if (type & (INPUT_END | INPUT_CANCEL)) {\n all = uniqueArray(all.concat(changed), 'identifier', true);\n }\n\n return [all, changed];\n}\n\n/**\n * @private\n * This recognizer is just used as a base for the simple attribute recognizers.\n * @constructor\n * @extends Recognizer\n */\n\nvar AttrRecognizer =\n/*#__PURE__*/\nfunction (_Recognizer) {\n _inheritsLoose(AttrRecognizer, _Recognizer);\n\n function AttrRecognizer(options) {\n if (options === void 0) {\n options = {};\n }\n\n return _Recognizer.call(this, _extends({\n pointers: 1\n }, options)) || this;\n }\n /**\n * @private\n * Used to check if it the recognizer receives valid input, like input.distance > 10.\n * @memberof AttrRecognizer\n * @param {Object} input\n * @returns {Boolean} recognized\n */\n\n\n var _proto = AttrRecognizer.prototype;\n\n _proto.attrTest = function attrTest(input) {\n var optionPointers = this.options.pointers;\n return optionPointers === 0 || input.pointers.length === optionPointers;\n };\n /**\n * @private\n * Process the input and return the state for the recognizer\n * @memberof AttrRecognizer\n * @param {Object} input\n * @returns {*} State\n */\n\n\n _proto.process = function process(input) {\n var state = this.state;\n var eventType = input.eventType;\n var isRecognized = state & (STATE_BEGAN | STATE_CHANGED);\n var isValid = this.attrTest(input); // on cancel input and we've recognized before, return STATE_CANCELLED\n\n if (isRecognized && (eventType & INPUT_CANCEL || !isValid)) {\n return state | STATE_CANCELLED;\n } else if (isRecognized || isValid) {\n if (eventType & INPUT_END) {\n return state | STATE_ENDED;\n } else if (!(state & STATE_BEGAN)) {\n return STATE_BEGAN;\n }\n\n return state | STATE_CHANGED;\n }\n\n return STATE_FAILED;\n };\n\n return AttrRecognizer;\n}(Recognizer);\n\n/**\n * @private\n * A tap is recognized when the pointer is doing a small tap/click. Multiple taps are recognized if they occur\n * between the given interval and position. The delay option can be used to recognize multi-taps without firing\n * a single tap.\n *\n * The eventData from the emitted event contains the property `tapCount`, which contains the amount of\n * multi-taps being recognized.\n * @constructor\n * @extends Recognizer\n */\n\nvar TapRecognizer =\n/*#__PURE__*/\nfunction (_Recognizer) {\n _inheritsLoose(TapRecognizer, _Recognizer);\n\n function TapRecognizer(options) {\n var _this;\n\n if (options === void 0) {\n options = {};\n }\n\n _this = _Recognizer.call(this, _extends({\n event: 'tap',\n pointers: 1,\n taps: 1,\n interval: 300,\n // max time between the multi-tap taps\n time: 250,\n // max time of the pointer to be down (like finger on the screen)\n threshold: 9,\n // a minimal movement is ok, but keep it low\n posThreshold: 10\n }, options)) || this; // previous time and center,\n // used for tap counting\n\n _this.pTime = false;\n _this.pCenter = false;\n _this._timer = null;\n _this._input = null;\n _this.count = 0;\n return _this;\n }\n\n var _proto = TapRecognizer.prototype;\n\n _proto.getTouchAction = function getTouchAction() {\n return [TOUCH_ACTION_MANIPULATION];\n };\n\n _proto.process = function process(input) {\n var _this2 = this;\n\n var options = this.options;\n var validPointers = input.pointers.length === options.pointers;\n var validMovement = input.distance < options.threshold;\n var validTouchTime = input.deltaTime < options.time;\n this.reset();\n\n if (input.eventType & INPUT_START && this.count === 0) {\n return this.failTimeout();\n } // we only allow little movement\n // and we've reached an end event, so a tap is possible\n\n\n if (validMovement && validTouchTime && validPointers) {\n if (input.eventType !== INPUT_END) {\n return this.failTimeout();\n }\n\n var validInterval = this.pTime ? input.timeStamp - this.pTime < options.interval : true;\n var validMultiTap = !this.pCenter || getDistance(this.pCenter, input.center) < options.posThreshold;\n this.pTime = input.timeStamp;\n this.pCenter = input.center;\n\n if (!validMultiTap || !validInterval) {\n this.count = 1;\n } else {\n this.count += 1;\n }\n\n this._input = input; // if tap count matches we have recognized it,\n // else it has began recognizing...\n\n var tapCount = this.count % options.taps;\n\n if (tapCount === 0) {\n // no failing requirements, immediately trigger the tap event\n // or wait as long as the multitap interval to trigger\n if (!this.hasRequireFailures()) {\n return STATE_RECOGNIZED;\n } else {\n this._timer = setTimeout(function () {\n _this2.state = STATE_RECOGNIZED;\n\n _this2.tryEmit();\n }, options.interval);\n return STATE_BEGAN;\n }\n }\n }\n\n return STATE_FAILED;\n };\n\n _proto.failTimeout = function failTimeout() {\n var _this3 = this;\n\n this._timer = setTimeout(function () {\n _this3.state = STATE_FAILED;\n }, this.options.interval);\n return STATE_FAILED;\n };\n\n _proto.reset = function reset() {\n clearTimeout(this._timer);\n };\n\n _proto.emit = function emit() {\n if (this.state === STATE_RECOGNIZED) {\n this._input.tapCount = this.count;\n this.manager.emit(this.options.event, this._input);\n }\n };\n\n return TapRecognizer;\n}(Recognizer);\n\n/**\n * @private\n * direction cons to string\n * @param {constant} direction\n * @returns {String}\n */\n\nfunction directionStr(direction) {\n if (direction === DIRECTION_DOWN) {\n return 'down';\n } else if (direction === DIRECTION_UP) {\n return 'up';\n } else if (direction === DIRECTION_LEFT) {\n return 'left';\n } else if (direction === DIRECTION_RIGHT) {\n return 'right';\n }\n\n return '';\n}\n\n/**\n * @private\n * Pan\n * Recognized when the pointer is down and moved in the allowed direction.\n * @constructor\n * @extends AttrRecognizer\n */\n\nvar PanRecognizer =\n/*#__PURE__*/\nfunction (_AttrRecognizer) {\n _inheritsLoose(PanRecognizer, _AttrRecognizer);\n\n function PanRecognizer(options) {\n var _this;\n\n if (options === void 0) {\n options = {};\n }\n\n _this = _AttrRecognizer.call(this, _extends({\n event: 'pan',\n threshold: 10,\n pointers: 1,\n direction: DIRECTION_ALL\n }, options)) || this;\n _this.pX = null;\n _this.pY = null;\n return _this;\n }\n\n var _proto = PanRecognizer.prototype;\n\n _proto.getTouchAction = function getTouchAction() {\n var direction = this.options.direction;\n var actions = [];\n\n if (direction & DIRECTION_HORIZONTAL) {\n actions.push(TOUCH_ACTION_PAN_Y);\n }\n\n if (direction & DIRECTION_VERTICAL) {\n actions.push(TOUCH_ACTION_PAN_X);\n }\n\n return actions;\n };\n\n _proto.directionTest = function directionTest(input) {\n var options = this.options;\n var hasMoved = true;\n var distance = input.distance;\n var direction = input.direction;\n var x = input.deltaX;\n var y = input.deltaY; // lock to axis?\n\n if (!(direction & options.direction)) {\n if (options.direction & DIRECTION_HORIZONTAL) {\n direction = x === 0 ? DIRECTION_NONE : x < 0 ? DIRECTION_LEFT : DIRECTION_RIGHT;\n hasMoved = x !== this.pX;\n distance = Math.abs(input.deltaX);\n } else {\n direction = y === 0 ? DIRECTION_NONE : y < 0 ? DIRECTION_UP : DIRECTION_DOWN;\n hasMoved = y !== this.pY;\n distance = Math.abs(input.deltaY);\n }\n }\n\n input.direction = direction;\n return hasMoved && distance > options.threshold && direction & options.direction;\n };\n\n _proto.attrTest = function attrTest(input) {\n return AttrRecognizer.prototype.attrTest.call(this, input) && ( // replace with a super call\n this.state & STATE_BEGAN || !(this.state & STATE_BEGAN) && this.directionTest(input));\n };\n\n _proto.emit = function emit(input) {\n this.pX = input.deltaX;\n this.pY = input.deltaY;\n var direction = directionStr(input.direction);\n\n if (direction) {\n input.additionalEvent = this.options.event + direction;\n }\n\n _AttrRecognizer.prototype.emit.call(this, input);\n };\n\n return PanRecognizer;\n}(AttrRecognizer);\n\n/**\n * @private\n * Swipe\n * Recognized when the pointer is moving fast (velocity), with enough distance in the allowed direction.\n * @constructor\n * @extends AttrRecognizer\n */\n\nvar SwipeRecognizer =\n/*#__PURE__*/\nfunction (_AttrRecognizer) {\n _inheritsLoose(SwipeRecognizer, _AttrRecognizer);\n\n function SwipeRecognizer(options) {\n if (options === void 0) {\n options = {};\n }\n\n return _AttrRecognizer.call(this, _extends({\n event: 'swipe',\n threshold: 10,\n velocity: 0.3,\n direction: DIRECTION_HORIZONTAL | DIRECTION_VERTICAL,\n pointers: 1\n }, options)) || this;\n }\n\n var _proto = SwipeRecognizer.prototype;\n\n _proto.getTouchAction = function getTouchAction() {\n return PanRecognizer.prototype.getTouchAction.call(this);\n };\n\n _proto.attrTest = function attrTest(input) {\n var direction = this.options.direction;\n var velocity;\n\n if (direction & (DIRECTION_HORIZONTAL | DIRECTION_VERTICAL)) {\n velocity = input.overallVelocity;\n } else if (direction & DIRECTION_HORIZONTAL) {\n velocity = input.overallVelocityX;\n } else if (direction & DIRECTION_VERTICAL) {\n velocity = input.overallVelocityY;\n }\n\n return _AttrRecognizer.prototype.attrTest.call(this, input) && direction & input.offsetDirection && input.distance > this.options.threshold && input.maxPointers === this.options.pointers && abs(velocity) > this.options.velocity && input.eventType & INPUT_END;\n };\n\n _proto.emit = function emit(input) {\n var direction = directionStr(input.offsetDirection);\n\n if (direction) {\n this.manager.emit(this.options.event + direction, input);\n }\n\n this.manager.emit(this.options.event, input);\n };\n\n return SwipeRecognizer;\n}(AttrRecognizer);\n\n/**\n * @private\n * Pinch\n * Recognized when two or more pointers are moving toward (zoom-in) or away from each other (zoom-out).\n * @constructor\n * @extends AttrRecognizer\n */\n\nvar PinchRecognizer =\n/*#__PURE__*/\nfunction (_AttrRecognizer) {\n _inheritsLoose(PinchRecognizer, _AttrRecognizer);\n\n function PinchRecognizer(options) {\n if (options === void 0) {\n options = {};\n }\n\n return _AttrRecognizer.call(this, _extends({\n event: 'pinch',\n threshold: 0,\n pointers: 2\n }, options)) || this;\n }\n\n var _proto = PinchRecognizer.prototype;\n\n _proto.getTouchAction = function getTouchAction() {\n return [TOUCH_ACTION_NONE];\n };\n\n _proto.attrTest = function attrTest(input) {\n return _AttrRecognizer.prototype.attrTest.call(this, input) && (Math.abs(input.scale - 1) > this.options.threshold || this.state & STATE_BEGAN);\n };\n\n _proto.emit = function emit(input) {\n if (input.scale !== 1) {\n var inOut = input.scale < 1 ? 'in' : 'out';\n input.additionalEvent = this.options.event + inOut;\n }\n\n _AttrRecognizer.prototype.emit.call(this, input);\n };\n\n return PinchRecognizer;\n}(AttrRecognizer);\n\n/**\n * @private\n * Rotate\n * Recognized when two or more pointer are moving in a circular motion.\n * @constructor\n * @extends AttrRecognizer\n */\n\nvar RotateRecognizer =\n/*#__PURE__*/\nfunction (_AttrRecognizer) {\n _inheritsLoose(RotateRecognizer, _AttrRecognizer);\n\n function RotateRecognizer(options) {\n if (options === void 0) {\n options = {};\n }\n\n return _AttrRecognizer.call(this, _extends({\n event: 'rotate',\n threshold: 0,\n pointers: 2\n }, options)) || this;\n }\n\n var _proto = RotateRecognizer.prototype;\n\n _proto.getTouchAction = function getTouchAction() {\n return [TOUCH_ACTION_NONE];\n };\n\n _proto.attrTest = function attrTest(input) {\n return _AttrRecognizer.prototype.attrTest.call(this, input) && (Math.abs(input.rotation) > this.options.threshold || this.state & STATE_BEGAN);\n };\n\n return RotateRecognizer;\n}(AttrRecognizer);\n\n/**\n * @private\n * Press\n * Recognized when the pointer is down for x ms without any movement.\n * @constructor\n * @extends Recognizer\n */\n\nvar PressRecognizer =\n/*#__PURE__*/\nfunction (_Recognizer) {\n _inheritsLoose(PressRecognizer, _Recognizer);\n\n function PressRecognizer(options) {\n var _this;\n\n if (options === void 0) {\n options = {};\n }\n\n _this = _Recognizer.call(this, _extends({\n event: 'press',\n pointers: 1,\n time: 251,\n // minimal time of the pointer to be pressed\n threshold: 9\n }, options)) || this;\n _this._timer = null;\n _this._input = null;\n return _this;\n }\n\n var _proto = PressRecognizer.prototype;\n\n _proto.getTouchAction = function getTouchAction() {\n return [TOUCH_ACTION_AUTO];\n };\n\n _proto.process = function process(input) {\n var _this2 = this;\n\n var options = this.options;\n var validPointers = input.pointers.length === options.pointers;\n var validMovement = input.distance < options.threshold;\n var validTime = input.deltaTime > options.time;\n this._input = input; // we only allow little movement\n // and we've reached an end event, so a tap is possible\n\n if (!validMovement || !validPointers || input.eventType & (INPUT_END | INPUT_CANCEL) && !validTime) {\n this.reset();\n } else if (input.eventType & INPUT_START) {\n this.reset();\n this._timer = setTimeout(function () {\n _this2.state = STATE_RECOGNIZED;\n\n _this2.tryEmit();\n }, options.time);\n } else if (input.eventType & INPUT_END) {\n return STATE_RECOGNIZED;\n }\n\n return STATE_FAILED;\n };\n\n _proto.reset = function reset() {\n clearTimeout(this._timer);\n };\n\n _proto.emit = function emit(input) {\n if (this.state !== STATE_RECOGNIZED) {\n return;\n }\n\n if (input && input.eventType & INPUT_END) {\n this.manager.emit(this.options.event + \"up\", input);\n } else {\n this._input.timeStamp = now();\n this.manager.emit(this.options.event, this._input);\n }\n };\n\n return PressRecognizer;\n}(Recognizer);\n\n/**\n * @private\n * wrap a method with a deprecation warning and stack trace\n * @param {Function} method\n * @param {String} name\n * @param {String} message\n * @returns {Function} A new function wrapping the supplied method.\n */\nfunction deprecate(method, name, message) {\n var deprecationMessage = \"DEPRECATED METHOD: \" + name + \"\\n\" + message + \" AT \\n\";\n return function () {\n var e = new Error('get-stack-trace');\n var stack = e && e.stack ? e.stack.replace(/^[^\\(]+?[\\n$]/gm, '').replace(/^\\s+at\\s+/gm, '').replace(/^Object.\\s*\\(/gm, '{anonymous}()@') : 'Unknown Stack Trace';\n var log = window.console && (window.console.warn || window.console.log);\n\n if (log) {\n log.call(window.console, deprecationMessage, stack);\n }\n\n return method.apply(this, arguments);\n };\n}\n\n/**\n * @private\n * extend object.\n * means that properties in dest will be overwritten by the ones in src.\n * @param {Object} dest\n * @param {Object} src\n * @param {Boolean} [merge=false]\n * @returns {Object} dest\n */\n\nvar extend = deprecate(function (dest, src, merge) {\n var keys = Object.keys(src);\n var i = 0;\n\n while (i < keys.length) {\n if (!merge || merge && dest[keys[i]] === undefined) {\n dest[keys[i]] = src[keys[i]];\n }\n\n i++;\n }\n\n return dest;\n}, 'extend', 'Use `assign`.');\n\n/**\n * @private\n * merge the values from src in the dest.\n * means that properties that exist in dest will not be overwritten by src\n * @param {Object} dest\n * @param {Object} src\n * @returns {Object} dest\n */\n\nvar merge = deprecate(function (dest, src) {\n return extend(dest, src, true);\n}, 'merge', 'Use `assign`.');\n\n/**\n * @private\n * simple class inheritance\n * @param {Function} child\n * @param {Function} base\n * @param {Object} [properties]\n */\n\nfunction inherit(child, base, properties) {\n var baseP = base.prototype;\n var childP;\n childP = child.prototype = Object.create(baseP);\n childP.constructor = child;\n childP._super = baseP;\n\n if (properties) {\n assign$1(childP, properties);\n }\n}\n\n/**\n * @private\n * simple function bind\n * @param {Function} fn\n * @param {Object} context\n * @returns {Function}\n */\nfunction bindFn(fn, context) {\n return function boundFn() {\n return fn.apply(context, arguments);\n };\n}\n\n/**\n * @private\n * Simple way to create a manager with a default set of recognizers.\n * @param {HTMLElement} element\n * @param {Object} [options]\n * @constructor\n */\n\nvar Hammer =\n/*#__PURE__*/\nfunction () {\n var Hammer =\n /**\n * @private\n * @const {string}\n */\n function Hammer(element, options) {\n if (options === void 0) {\n options = {};\n }\n\n return new Manager(element, _extends({\n recognizers: [// RecognizerClass, options, [recognizeWith, ...], [requireFailure, ...]\n [RotateRecognizer, {\n enable: false\n }], [PinchRecognizer, {\n enable: false\n }, ['rotate']], [SwipeRecognizer, {\n direction: DIRECTION_HORIZONTAL\n }], [PanRecognizer, {\n direction: DIRECTION_HORIZONTAL\n }, ['swipe']], [TapRecognizer], [TapRecognizer, {\n event: 'doubletap',\n taps: 2\n }, ['tap']], [PressRecognizer]]\n }, options));\n };\n\n Hammer.VERSION = \"2.0.15\";\n Hammer.DIRECTION_ALL = DIRECTION_ALL;\n Hammer.DIRECTION_DOWN = DIRECTION_DOWN;\n Hammer.DIRECTION_LEFT = DIRECTION_LEFT;\n Hammer.DIRECTION_RIGHT = DIRECTION_RIGHT;\n Hammer.DIRECTION_UP = DIRECTION_UP;\n Hammer.DIRECTION_HORIZONTAL = DIRECTION_HORIZONTAL;\n Hammer.DIRECTION_VERTICAL = DIRECTION_VERTICAL;\n Hammer.DIRECTION_NONE = DIRECTION_NONE;\n Hammer.DIRECTION_DOWN = DIRECTION_DOWN;\n Hammer.INPUT_START = INPUT_START;\n Hammer.INPUT_MOVE = INPUT_MOVE;\n Hammer.INPUT_END = INPUT_END;\n Hammer.INPUT_CANCEL = INPUT_CANCEL;\n Hammer.STATE_POSSIBLE = STATE_POSSIBLE;\n Hammer.STATE_BEGAN = STATE_BEGAN;\n Hammer.STATE_CHANGED = STATE_CHANGED;\n Hammer.STATE_ENDED = STATE_ENDED;\n Hammer.STATE_RECOGNIZED = STATE_RECOGNIZED;\n Hammer.STATE_CANCELLED = STATE_CANCELLED;\n Hammer.STATE_FAILED = STATE_FAILED;\n Hammer.Manager = Manager;\n Hammer.Input = Input;\n Hammer.TouchAction = TouchAction;\n Hammer.TouchInput = TouchInput;\n Hammer.MouseInput = MouseInput;\n Hammer.PointerEventInput = PointerEventInput;\n Hammer.TouchMouseInput = TouchMouseInput;\n Hammer.SingleTouchInput = SingleTouchInput;\n Hammer.Recognizer = Recognizer;\n Hammer.AttrRecognizer = AttrRecognizer;\n Hammer.Tap = TapRecognizer;\n Hammer.Pan = PanRecognizer;\n Hammer.Swipe = SwipeRecognizer;\n Hammer.Pinch = PinchRecognizer;\n Hammer.Rotate = RotateRecognizer;\n Hammer.Press = PressRecognizer;\n Hammer.on = addEventListeners;\n Hammer.off = removeEventListeners;\n Hammer.each = each;\n Hammer.merge = merge;\n Hammer.extend = extend;\n Hammer.bindFn = bindFn;\n Hammer.assign = assign$1;\n Hammer.inherit = inherit;\n Hammer.bindFn = bindFn;\n Hammer.prefixed = prefixed;\n Hammer.toArray = toArray;\n Hammer.inArray = inArray;\n Hammer.uniqueArray = uniqueArray;\n Hammer.splitStr = splitStr;\n Hammer.boolOrFn = boolOrFn;\n Hammer.hasParent = hasParent;\n Hammer.addEventListeners = addEventListeners;\n Hammer.removeEventListeners = removeEventListeners;\n Hammer.defaults = defaults;\n return Hammer;\n}();\n\nexport default Hammer;\nexport { INPUT_START, INPUT_MOVE, INPUT_END, INPUT_CANCEL, STATE_POSSIBLE, STATE_BEGAN, STATE_CHANGED, STATE_ENDED, STATE_RECOGNIZED, STATE_CANCELLED, STATE_FAILED, DIRECTION_NONE, DIRECTION_LEFT, DIRECTION_RIGHT, DIRECTION_UP, DIRECTION_DOWN, DIRECTION_HORIZONTAL, DIRECTION_VERTICAL, DIRECTION_ALL, Manager, Input, TouchAction, TouchInput, MouseInput, PointerEventInput, TouchMouseInput, SingleTouchInput, Recognizer, AttrRecognizer, TapRecognizer as Tap, PanRecognizer as Pan, SwipeRecognizer as Swipe, PinchRecognizer as Pinch, RotateRecognizer as Rotate, PressRecognizer as Press, addEventListeners as on, removeEventListeners as off, each, merge, extend, assign$1 as assign, inherit, bindFn, prefixed, toArray, inArray, uniqueArray, splitStr, boolOrFn, hasParent, addEventListeners, removeEventListeners, defaults };\n//# sourceMappingURL=hammer.esm.js.map\n","/**\n * Setup a mock hammer.js object, for unit testing.\n *\n * Inspiration: https://github.com/uber/deck.gl/pull/658\n *\n * @returns {{on: noop, off: noop, destroy: noop, emit: noop, get: get}}\n */\nfunction hammerMock() {\n const noop = () => {};\n\n return {\n on: noop,\n off: noop,\n destroy: noop,\n emit: noop,\n\n get: function(m) {\t//eslint-disable-line no-unused-vars\n return {\n set: noop\n };\n }\n };\n}\n\n\nif (typeof window !== 'undefined') {\n var Hammer = window['Hammer'] || require('@egjs/hammerjs');\n module.exports = Hammer;\n}\nelse {\n module.exports = function () {\n // hammer.js is only available in a browser, not in node.js. Replacing it with a mock object.\n return hammerMock();\n }\n}\n","require('./Activator.css');\n\nvar keycharm = require('keycharm');\nvar Emitter = require('component-emitter');\nvar Hammer = require('../module/hammer');\nvar util = require('vis-util');\n\n/**\n * Turn an element into an clickToUse element.\n * When not active, the element has a transparent overlay. When the overlay is\n * clicked, the mode is changed to active.\n * When active, the element is displayed with a blue border around it, and\n * the interactive contents of the element can be used. When clicked outside\n * the element, the elements mode is changed to inactive.\n * @param {Element} container\n * @constructor Activator\n */\nfunction Activator(container) {\n this.active = false;\n\n this.dom = {\n container: container\n };\n\n this.dom.overlay = document.createElement('div');\n this.dom.overlay.className = 'vis-overlay';\n\n this.dom.container.appendChild(this.dom.overlay);\n\n this.hammer = Hammer(this.dom.overlay);\n this.hammer.on('tap', this._onTapOverlay.bind(this));\n\n // block all touch events (except tap)\n var me = this;\n var events = [\n 'tap', 'doubletap', 'press',\n 'pinch',\n 'pan', 'panstart', 'panmove', 'panend'\n ];\n events.forEach(function (event) {\n me.hammer.on(event, function (event) {\n event.stopPropagation();\n });\n });\n\n // attach a click event to the window, in order to deactivate when clicking outside the timeline\n if (document && document.body) {\n this.onClick = function (event) {\n if (!_hasParent(event.target, container)) {\n me.deactivate();\n }\n };\n document.body.addEventListener('click', this.onClick);\n }\n\n if (this.keycharm !== undefined) {\n this.keycharm.destroy();\n }\n this.keycharm = keycharm();\n\n // keycharm listener only bounded when active)\n this.escListener = this.deactivate.bind(this);\n}\n\n// turn into an event emitter\nEmitter(Activator.prototype);\n\n// The currently active activator\nActivator.current = null;\n\n/**\n * Destroy the activator. Cleans up all created DOM and event listeners\n */\nActivator.prototype.destroy = function () {\n this.deactivate();\n\n // remove dom\n this.dom.overlay.parentNode.removeChild(this.dom.overlay);\n\n // remove global event listener\n if (this.onClick) {\n document.body.removeEventListener('click', this.onClick);\n }\n // remove keycharm\n if (this.keycharm !== undefined) {\n this.keycharm.destroy();\n }\n this.keycharm = null;\n // cleanup hammer instances\n this.hammer.destroy();\n this.hammer = null;\n // FIXME: cleaning up hammer instances doesn't work (Timeline not removed from memory)\n};\n\n/**\n * Activate the element\n * Overlay is hidden, element is decorated with a blue shadow border\n */\nActivator.prototype.activate = function () {\n // we allow only one active activator at a time\n if (Activator.current) {\n Activator.current.deactivate();\n }\n Activator.current = this;\n\n this.active = true;\n this.dom.overlay.style.display = 'none';\n util.addClassName(this.dom.container, 'vis-active');\n\n this.emit('change');\n this.emit('activate');\n\n // ugly hack: bind ESC after emitting the events, as the Network rebinds all\n // keyboard events on a 'change' event\n this.keycharm.bind('esc', this.escListener);\n};\n\n/**\n * Deactivate the element\n * Overlay is displayed on top of the element\n */\nActivator.prototype.deactivate = function () {\n this.active = false;\n this.dom.overlay.style.display = '';\n util.removeClassName(this.dom.container, 'vis-active');\n this.keycharm.unbind('esc', this.escListener);\n\n this.emit('change');\n this.emit('deactivate');\n};\n\n/**\n * Handle a tap event: activate the container\n * @param {Event} event The event\n * @private\n */\nActivator.prototype._onTapOverlay = function (event) {\n // activate the container\n this.activate();\n event.stopPropagation();\n};\n\n/**\n * Test whether the element has the requested parent element somewhere in\n * its chain of parent nodes.\n * @param {HTMLElement} element\n * @param {HTMLElement} parent\n * @returns {boolean} Returns true when the parent is found somewhere in the\n * chain of parent nodes.\n * @private\n */\nfunction _hasParent(element, parent) {\n while (element) {\n if (element === parent) {\n return true\n }\n element = element.parentNode;\n }\n return false;\n}\n\nmodule.exports = Activator;\n","// English\nexports['en'] = {\n edit: 'Edit',\n del: 'Delete selected',\n back: 'Back',\n addNode: 'Add Node',\n addEdge: 'Add Edge',\n editNode: 'Edit Node',\n editEdge: 'Edit Edge',\n addDescription: 'Click in an empty space to place a new node.',\n edgeDescription: 'Click on a node and drag the edge to another node to connect them.',\n editEdgeDescription: 'Click on the control points and drag them to a node to connect to it.',\n createEdgeError: 'Cannot link edges to a cluster.',\n deleteClusterError: 'Clusters cannot be deleted.',\n editClusterError: 'Clusters cannot be edited.'\n};\nexports['en_EN'] = exports['en'];\nexports['en_US'] = exports['en'];\n\n// German\nexports['de'] = {\n edit: 'Editieren',\n del: 'L\\u00f6sche Auswahl',\n back: 'Zur\\u00fcck',\n addNode: 'Knoten hinzuf\\u00fcgen',\n addEdge: 'Kante hinzuf\\u00fcgen',\n editNode: 'Knoten editieren',\n editEdge: 'Kante editieren',\n addDescription: 'Klicke auf eine freie Stelle, um einen neuen Knoten zu plazieren.',\n edgeDescription: 'Klicke auf einen Knoten und ziehe die Kante zu einem anderen Knoten, um diese zu verbinden.',\n editEdgeDescription: 'Klicke auf die Verbindungspunkte und ziehe diese auf einen Knoten, um sie zu verbinden.',\n createEdgeError: 'Es ist nicht m\\u00f6glich, Kanten mit Clustern zu verbinden.',\n deleteClusterError: 'Cluster k\\u00f6nnen nicht gel\\u00f6scht werden.',\n editClusterError: 'Cluster k\\u00f6nnen nicht editiert werden.'\n};\nexports['de_DE'] = exports['de'];\n\n// Spanish\nexports['es'] = {\n edit: 'Editar',\n del: 'Eliminar selecci\\u00f3n',\n back: 'Atr\\u00e1s',\n addNode: 'A\\u00f1adir nodo',\n addEdge: 'A\\u00f1adir arista',\n editNode: 'Editar nodo',\n editEdge: 'Editar arista',\n addDescription: 'Haga clic en un lugar vac\\u00edo para colocar un nuevo nodo.',\n edgeDescription: 'Haga clic en un nodo y arrastre la arista hacia otro nodo para conectarlos.',\n editEdgeDescription: 'Haga clic en un punto de control y arrastrelo a un nodo para conectarlo.',\n createEdgeError: 'No se puede conectar una arista a un grupo.',\n deleteClusterError: 'No es posible eliminar grupos.',\n editClusterError: 'No es posible editar grupos.'\n};\nexports['es_ES'] = exports['es'];\n\n//Italiano\nexports['it'] = {\n edit: 'Modifica',\n del: 'Cancella la selezione',\n back: 'Indietro',\n addNode: 'Aggiungi un nodo',\n addEdge: 'Aggiungi un vertice',\n editNode: 'Modifica il nodo',\n editEdge: 'Modifica il vertice',\n addDescription: 'Clicca per aggiungere un nuovo nodo',\n edgeDescription: 'Clicca su un nodo e trascinalo ad un altro nodo per connetterli.',\n editEdgeDescription: 'Clicca sui Punti di controllo e trascinali ad un nodo per connetterli.',\n createEdgeError: 'Non si possono collegare vertici ad un cluster',\n deleteClusterError: 'I cluster non possono essere cancellati',\n editClusterError: 'I clusters non possono essere modificati.'\n};\nexports['it_IT'] = exports['it'];\n\n// Dutch\nexports['nl'] = {\n edit: 'Wijzigen',\n del: 'Selectie verwijderen',\n back: 'Terug',\n addNode: 'Node toevoegen',\n addEdge: 'Link toevoegen',\n editNode: 'Node wijzigen',\n editEdge: 'Link wijzigen',\n addDescription: 'Klik op een leeg gebied om een nieuwe node te maken.',\n edgeDescription: 'Klik op een node en sleep de link naar een andere node om ze te verbinden.',\n editEdgeDescription: 'Klik op de verbindingspunten en sleep ze naar een node om daarmee te verbinden.',\n createEdgeError: 'Kan geen link maken naar een cluster.',\n deleteClusterError: 'Clusters kunnen niet worden verwijderd.',\n editClusterError: 'Clusters kunnen niet worden aangepast.'\n};\nexports['nl_NL'] = exports['nl'];\nexports['nl_BE'] = exports['nl'];\n\n// Portuguese Brazil\nexports['pt-br'] = {\n edit: 'Editar',\n del: 'Remover selecionado',\n back: 'Voltar',\n addNode: 'Adicionar nó',\n addEdge: 'Adicionar aresta',\n editNode: 'Editar nó',\n editEdge: 'Editar aresta',\n addDescription: 'Clique em um espaço em branco para adicionar um novo nó',\n edgeDescription: 'Clique em um nó e arraste a aresta até outro nó para conectá-los',\n editEdgeDescription: 'Clique nos pontos de controle e os arraste para um nó para conectá-los',\n createEdgeError: 'Não foi possível linkar arestas a um cluster.',\n deleteClusterError: 'Clusters não puderam ser removidos.',\n editClusterError: 'Clusters não puderam ser editados.'\n};\nexports['pt-BR'] = exports['pt-br'];\nexports['pt_BR'] = exports['pt-br'];\nexports['pt_br'] = exports['pt-br'];\n\n// Russian\nexports['ru'] = {\n edit: 'Редактировать',\n del: 'Удалить выбранное',\n back: 'Назад',\n addNode: 'Добавить узел',\n addEdge: 'Добавить ребро',\n editNode: 'Редактировать узел',\n editEdge: 'Редактировать ребро',\n addDescription: 'Кликните в свободное место, чтобы добавить новый узел.',\n edgeDescription: 'Кликните на узел и протяните ребро к другому узлу, чтобы соединить их.',\n editEdgeDescription: 'Кликните на контрольные точки и перетащите их в узел, чтобы подключиться к нему.',\n createEdgeError: 'Невозможно соединить ребра в кластер.',\n deleteClusterError: 'Кластеры не могут быть удалены',\n editClusterError: 'Кластеры недоступны для редактирования.'\n};\nexports['ru_RU'] = exports['ru'];\n\n// Chinese\nexports['cn'] = {\n edit: '编辑',\n del: '删除选定',\n back: '返回',\n addNode: '添加节点',\n addEdge: '添加连接线',\n editNode: '编辑节点',\n editEdge: '编辑连接线',\n addDescription: '单击空白处放置新节点。',\n edgeDescription: '单击某个节点并将该连接线拖动到另一个节点以连接它们。',\n editEdgeDescription: '单击控制节点并将它们拖到节点上连接。',\n createEdgeError: '无法将连接线连接到群集。',\n deleteClusterError: '无法删除群集。',\n editClusterError: '无法编辑群集。'\n};\nexports['zh_CN'] = exports['cn'];\n\n// Ukrainian\nexports['uk'] = {\n edit: 'Редагувати',\n del: 'Видалити обране',\n back: 'Назад',\n addNode: 'Додати вузол',\n addEdge: 'Додати край',\n editNode: 'Редагувати вузол',\n editEdge: 'Редагувати край',\n addDescription: 'Kлікніть на вільне місце, щоб додати новий вузол.',\n edgeDescription: 'Клікніть на вузол і перетягніть край до іншого вузла, щоб їх з\\'єднати.',\n editEdgeDescription: 'Клікніть на контрольні точки і перетягніть їх у вузол, щоб підключитися до нього.',\n createEdgeError: 'Не можливо об\\'єднати краї в групу.',\n deleteClusterError: 'Групи не можуть бути видалені.',\n editClusterError: 'Групи недоступні для редагування.'\n};\nexports['uk_UA'] = exports['uk'];\n\n// French\nexports['fr'] = {\n edit: 'Editer',\n del: 'Effacer la selection',\n back: 'Retour',\n addNode: 'Ajouter un noeud',\n addEdge: 'Ajouter un lien',\n editNode: 'Editer le noeud',\n editEdge: 'Editer le lien',\n addDescription: 'Cliquez dans un endroit vide pour placer un noeud.',\n edgeDescription: 'Cliquez sur un noeud et glissez le lien vers un autre noeud pour les connecter.',\n editEdgeDescription: 'Cliquez sur les points de contrôle et glissez-les pour connecter un noeud.',\n createEdgeError: 'Impossible de créer un lien vers un cluster.',\n deleteClusterError: 'Les clusters ne peuvent pas être éffacés.',\n editClusterError: 'Les clusters ne peuvent pas être édites.'\n};\nexports['fr_FR'] = exports['fr'];\n\n// Czech\nexports['cs'] = {\n edit: 'Upravit',\n del: 'Smazat výběr',\n back: 'Zpět',\n addNode: 'Přidat vrchol',\n addEdge: 'Přidat hranu',\n editNode: 'Upravit vrchol',\n editEdge: 'Upravit hranu',\n addDescription: 'Kluknutím do prázdného prostoru můžete přidat nový vrchol.',\n edgeDescription: 'Přetažením z jednoho vrcholu do druhého můžete spojit tyto vrcholy novou hranou.',\n editEdgeDescription: 'Přetažením kontrolního vrcholu hrany ji můžete připojit k jinému vrcholu.',\n createEdgeError: 'Nelze připojit hranu ke shluku.',\n deleteClusterError: 'Nelze mazat shluky.',\n editClusterError: 'Nelze upravovat shluky.'\n};\nexports['cs_CZ'] = exports['cs'];\n","function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nmodule.exports = _classCallCheck;","function _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nmodule.exports = _createClass;","\n/**\n * Associates a canvas to a given image, containing a number of renderings\n * of the image at various sizes.\n *\n * This technique is known as 'mipmapping'.\n *\n * NOTE: Images can also be of type 'data:svg+xml`. This code also works\n * for svg, but the mipmapping may not be necessary.\n *\n * @param {Image} image\n */\nclass CachedImage {\n /**\n * @ignore\n */ \n constructor() { // eslint-disable-line no-unused-vars\n this.NUM_ITERATIONS = 4; // Number of items in the coordinates array\n\n this.image = new Image();\n this.canvas = document.createElement('canvas');\n }\n\n\n /**\n * Called when the image has been successfully loaded.\n */\n init() {\n if (this.initialized()) return;\n\n this.src = this.image.src; // For same interface with Image\n var w = this.image.width;\n var h = this.image.height;\n\n // Ease external access\n this.width = w;\n this.height = h;\n\n var h2 = Math.floor(h/2);\n var h4 = Math.floor(h/4);\n var h8 = Math.floor(h/8);\n var h16 = Math.floor(h/16);\n\n var w2 = Math.floor(w/2);\n var w4 = Math.floor(w/4);\n var w8 = Math.floor(w/8);\n var w16 = Math.floor(w/16);\n\n // Make canvas as small as possible\n this.canvas.width = 3*w4;\n this.canvas.height = h2;\n\n // Coordinates and sizes of images contained in the canvas\n // Values per row: [top x, left y, width, height]\n\n this.coordinates = [\n [ 0 , 0 , w2 , h2],\n [ w2 , 0 , w4 , h4],\n [ w2 , h4, w8 , h8],\n [ 5*w8, h4, w16, h16]\n ];\n\n this._fillMipMap();\n }\n\n\n /**\n * @return {Boolean} true if init() has been called, false otherwise.\n */\n initialized() {\n return (this.coordinates !== undefined);\n }\n\n\n /**\n * Redraw main image in various sizes to the context.\n *\n * The rationale behind this is to reduce artefacts due to interpolation\n * at differing zoom levels.\n *\n * Source: http://stackoverflow.com/q/18761404/1223531\n *\n * This methods takes the resizing out of the drawing loop, in order to\n * reduce performance overhead.\n *\n * TODO: The code assumes that a 2D context can always be gotten. This is\n * not necessarily true! OTOH, if not true then usage of this class\n * is senseless.\n *\n * @private\n */\n _fillMipMap() {\n var ctx = this.canvas.getContext('2d');\n\n // First zoom-level comes from the image\n var to = this.coordinates[0];\n ctx.drawImage(this.image, to[0], to[1], to[2], to[3]);\n\n // The rest are copy actions internal to the canvas/context\n for (let iterations = 1; iterations < this.NUM_ITERATIONS; iterations++) {\n let from = this.coordinates[iterations - 1];\n let to = this.coordinates[iterations];\n\n ctx.drawImage(this.canvas,\n from[0], from[1], from[2], from[3],\n to[0], to[1], to[2], to[3]\n );\n }\n }\n\n\n /**\n * Draw the image, using the mipmap if necessary.\n *\n * MipMap is only used if param factor > 2; otherwise, original bitmap\n * is resized. This is also used to skip mipmap usage, e.g. by setting factor = 1\n *\n * Credits to 'Alex de Mulder' for original implementation.\n *\n * @param {CanvasRenderingContext2D} ctx context on which to draw zoomed image\n * @param {Float} factor scale factor at which to draw\n * @param {number} left\n * @param {number} top\n * @param {number} width\n * @param {number} height\n */\n drawImageAtPosition(ctx, factor, left, top, width, height) {\n\n if(!this.initialized())\n return; //can't draw image yet not intialized\n\n if (factor > 2) {\n // Determine which zoomed image to use\n factor *= 0.5;\n let iterations = 0;\n while (factor > 2 && iterations < this.NUM_ITERATIONS) {\n factor *= 0.5;\n iterations += 1;\n }\n\n if (iterations >= this.NUM_ITERATIONS) {\n iterations = this.NUM_ITERATIONS - 1;\n }\n //console.log(\"iterations: \" + iterations);\n\n let from = this.coordinates[iterations];\n ctx.drawImage(this.canvas,\n from[0], from[1], from[2], from[3],\n left, top, width, height\n );\n } else {\n // Draw image directly\n ctx.drawImage(this.image, left, top, width, height);\n }\n }\n\n}\n\n\nexport default CachedImage;\n","import CachedImage from './CachedImage';\n\n/**\n * This callback is a callback that accepts an Image.\n * @callback ImageCallback\n * @param {Image} image\n */\n\n/**\n * This class loads images and keeps them stored.\n *\n * @param {ImageCallback} callback\n */\nclass Images {\n /**\n * @param {ImageCallback} callback\n */\n constructor(callback){\n this.images = {};\n this.imageBroken = {};\n this.callback = callback;\n }\n \n /**\n * @param {string} url The original Url that failed to load, if the broken image is successfully loaded it will be added to the cache using this Url as the key so that subsequent requests for this Url will return the broken image\n * @param {string} brokenUrl Url the broken image to try and load\n * @param {Image} imageToLoadBrokenUrlOn The image object\n */ \n _tryloadBrokenUrl (url, brokenUrl, imageToLoadBrokenUrlOn) {\n //If these parameters aren't specified then exit the function because nothing constructive can be done\n if (url === undefined || imageToLoadBrokenUrlOn === undefined) return;\n if (brokenUrl === undefined) {\n console.warn(\"No broken url image defined\");\n return;\n }\n \n //Clear the old subscription to the error event and put a new in place that only handle errors in loading the brokenImageUrl\n imageToLoadBrokenUrlOn.image.onerror = () => {\n console.error(\"Could not load brokenImage:\", brokenUrl);\n // cache item will contain empty image, this should be OK for default\n };\n \n //Set the source of the image to the brokenUrl, this is actually what kicks off the loading of the broken image\n imageToLoadBrokenUrlOn.image.src = brokenUrl;\n }\n \n /**\n *\n * @param {vis.Image} imageToRedrawWith\n * @private\n */\n _redrawWithImage (imageToRedrawWith) {\n if (this.callback) {\n this.callback(imageToRedrawWith);\n }\n }\n \n /**\n * @param {string} url Url of the image\n * @param {string} brokenUrl Url of an image to use if the url image is not found\n * @return {Image} img The image object\n */ \n load (url, brokenUrl) {\n //Try and get the image from the cache, if successful then return the cached image \n var cachedImage = this.images[url]; \n if (cachedImage) return cachedImage;\n \n //Create a new image\n var img = new CachedImage();\n\n // Need to add to cache here, otherwise final return will spawn different copies of the same image,\n // Also, there will be multiple loads of the same image.\n this.images[url] = img; \n \n //Subscribe to the event that is raised if the image loads successfully \n img.image.onload = () => {\n // Properly init the cached item and then request a redraw\n this._fixImageCoordinates(img.image);\n img.init();\n this._redrawWithImage(img);\n };\n \n //Subscribe to the event that is raised if the image fails to load\n img.image.onerror = () => {\n console.error(\"Could not load image:\", url);\n //Try and load the image specified by the brokenUrl using\n this._tryloadBrokenUrl(url, brokenUrl, img);\n };\n \n //Set the source of the image to the url, this is what actually kicks off the loading of the image\n img.image.src = url;\n \n //Return the new image\n return img;\n }\n\n\n /**\n * IE11 fix -- thanks dponch!\n *\n * Local helper function\n * @param {vis.Image} imageToCache\n * @private\n */\n _fixImageCoordinates(imageToCache) {\n if (imageToCache.width === 0) {\n document.body.appendChild(imageToCache);\n imageToCache.width = imageToCache.offsetWidth;\n imageToCache.height = imageToCache.offsetHeight;\n document.body.removeChild(imageToCache);\n }\n }\n}\n\nexport default Images;\n","import util from 'vis-util';\n\n/**\n * This class can store groups and options specific for groups.\n */\nclass Groups {\n /**\n * @ignore\n */\n constructor() {\n this.clear();\n this.defaultIndex = 0;\n this.groupsArray = [];\n this.groupIndex = 0;\n\n this.defaultGroups = [\n {border: \"#2B7CE9\", background: \"#97C2FC\", highlight: {border: \"#2B7CE9\", background: \"#D2E5FF\"}, hover: {border: \"#2B7CE9\", background: \"#D2E5FF\"}}, // 0: blue\n {border: \"#FFA500\", background: \"#FFFF00\", highlight: {border: \"#FFA500\", background: \"#FFFFA3\"}, hover: {border: \"#FFA500\", background: \"#FFFFA3\"}}, // 1: yellow\n {border: \"#FA0A10\", background: \"#FB7E81\", highlight: {border: \"#FA0A10\", background: \"#FFAFB1\"}, hover: {border: \"#FA0A10\", background: \"#FFAFB1\"}}, // 2: red\n {border: \"#41A906\", background: \"#7BE141\", highlight: {border: \"#41A906\", background: \"#A1EC76\"}, hover: {border: \"#41A906\", background: \"#A1EC76\"}}, // 3: green\n {border: \"#E129F0\", background: \"#EB7DF4\", highlight: {border: \"#E129F0\", background: \"#F0B3F5\"}, hover: {border: \"#E129F0\", background: \"#F0B3F5\"}}, // 4: magenta\n {border: \"#7C29F0\", background: \"#AD85E4\", highlight: {border: \"#7C29F0\", background: \"#D3BDF0\"}, hover: {border: \"#7C29F0\", background: \"#D3BDF0\"}}, // 5: purple\n {border: \"#C37F00\", background: \"#FFA807\", highlight: {border: \"#C37F00\", background: \"#FFCA66\"}, hover: {border: \"#C37F00\", background: \"#FFCA66\"}}, // 6: orange\n {border: \"#4220FB\", background: \"#6E6EFD\", highlight: {border: \"#4220FB\", background: \"#9B9BFD\"}, hover: {border: \"#4220FB\", background: \"#9B9BFD\"}}, // 7: darkblue\n {border: \"#FD5A77\", background: \"#FFC0CB\", highlight: {border: \"#FD5A77\", background: \"#FFD1D9\"}, hover: {border: \"#FD5A77\", background: \"#FFD1D9\"}}, // 8: pink\n {border: \"#4AD63A\", background: \"#C2FABC\", highlight: {border: \"#4AD63A\", background: \"#E6FFE3\"}, hover: {border: \"#4AD63A\", background: \"#E6FFE3\"}}, // 9: mint\n\n {border: \"#990000\", background: \"#EE0000\", highlight: {border: \"#BB0000\", background: \"#FF3333\"}, hover: {border: \"#BB0000\", background: \"#FF3333\"}}, // 10:bright red\n\n {border: \"#FF6000\", background: \"#FF6000\", highlight: {border: \"#FF6000\", background: \"#FF6000\"}, hover: {border: \"#FF6000\", background: \"#FF6000\"}}, // 12: real orange\n {border: \"#97C2FC\", background: \"#2B7CE9\", highlight: {border: \"#D2E5FF\", background: \"#2B7CE9\"}, hover: {border: \"#D2E5FF\", background: \"#2B7CE9\"}}, // 13: blue\n {border: \"#399605\", background: \"#255C03\", highlight: {border: \"#399605\", background: \"#255C03\"}, hover: {border: \"#399605\", background: \"#255C03\"}}, // 14: green\n {border: \"#B70054\", background: \"#FF007E\", highlight: {border: \"#B70054\", background: \"#FF007E\"}, hover: {border: \"#B70054\", background: \"#FF007E\"}}, // 15: magenta\n {border: \"#AD85E4\", background: \"#7C29F0\", highlight: {border: \"#D3BDF0\", background: \"#7C29F0\"}, hover: {border: \"#D3BDF0\", background: \"#7C29F0\"}}, // 16: purple\n {border: \"#4557FA\", background: \"#000EA1\", highlight: {border: \"#6E6EFD\", background: \"#000EA1\"}, hover: {border: \"#6E6EFD\", background: \"#000EA1\"}}, // 17: darkblue\n {border: \"#FFC0CB\", background: \"#FD5A77\", highlight: {border: \"#FFD1D9\", background: \"#FD5A77\"}, hover: {border: \"#FFD1D9\", background: \"#FD5A77\"}}, // 18: pink\n {border: \"#C2FABC\", background: \"#74D66A\", highlight: {border: \"#E6FFE3\", background: \"#74D66A\"}, hover: {border: \"#E6FFE3\", background: \"#74D66A\"}}, // 19: mint\n\n {border: \"#EE0000\", background: \"#990000\", highlight: {border: \"#FF3333\", background: \"#BB0000\"}, hover: {border: \"#FF3333\", background: \"#BB0000\"}} // 20:bright red\n ];\n\n this.options = {};\n this.defaultOptions = {\n useDefaultGroups: true\n };\n util.extend(this.options, this.defaultOptions);\n }\n\n /**\n *\n * @param {Object} options\n */\n setOptions(options) {\n let optionFields = ['useDefaultGroups'];\n\n if (options !== undefined) {\n for (let groupName in options) {\n if (options.hasOwnProperty(groupName)) {\n if (optionFields.indexOf(groupName) === -1) {\n let group = options[groupName];\n this.add(groupName, group);\n }\n }\n }\n }\n }\n\n \n /**\n * Clear all groups\n */\n clear() {\n this.groups = {};\n this.groupsArray = [];\n }\n \n /**\n * Get group options of a groupname.\n * If groupname is not found, a new group may be created.\n *\n * @param {*} groupname Can be a number, string, Date, etc.\n * @param {boolean} [shouldCreate=true] If true, create a new group\n * @return {Object} The found or created group\n */\n get(groupname, shouldCreate = true) {\n let group = this.groups[groupname];\n\n if (group === undefined && shouldCreate) {\n if (this.options.useDefaultGroups === false && this.groupsArray.length > 0) {\n // create new group\n let index = this.groupIndex % this.groupsArray.length;\n this.groupIndex++;\n group = {};\n group.color = this.groups[this.groupsArray[index]];\n this.groups[groupname] = group;\n }\n else {\n // create new group\n let index = this.defaultIndex % this.defaultGroups.length;\n this.defaultIndex++;\n group = {};\n group.color = this.defaultGroups[index];\n this.groups[groupname] = group;\n }\n }\n \n return group;\n }\n \n /**\n * Add a custom group style\n * @param {string} groupName\n * @param {Object} style An object containing borderColor,\n * backgroundColor, etc.\n * @return {Object} group The created group object\n */\n add(groupName, style) {\n this.groups[groupName] = style;\n this.groupsArray.push(groupName);\n return style;\n }\n}\n\nexport default Groups;\n","function _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n\nmodule.exports = _arrayWithHoles;","function _iterableToArrayLimit(arr, i) {\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}\n\nmodule.exports = _iterableToArrayLimit;","function _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance\");\n}\n\nmodule.exports = _nonIterableRest;","var arrayWithHoles = require(\"./arrayWithHoles\");\n\nvar iterableToArrayLimit = require(\"./iterableToArrayLimit\");\n\nvar nonIterableRest = require(\"./nonIterableRest\");\n\nfunction _slicedToArray(arr, i) {\n return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || nonIterableRest();\n}\n\nmodule.exports = _slicedToArray;","function _typeof2(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof2 = function _typeof2(obj) { return typeof obj; }; } else { _typeof2 = function _typeof2(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof2(obj); }\n\nfunction _typeof(obj) {\n if (typeof Symbol === \"function\" && _typeof2(Symbol.iterator) === \"symbol\") {\n module.exports = _typeof = function _typeof(obj) {\n return _typeof2(obj);\n };\n } else {\n module.exports = _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : _typeof2(obj);\n };\n }\n\n return _typeof(obj);\n}\n\nmodule.exports = _typeof;","import util from 'vis-util';\n\n/**\n * Helper functions for components\n * @class\n */\nclass ComponentUtil {\n /**\n * Determine values to use for (sub)options of 'chosen'.\n *\n * This option is either a boolean or an object whose values should be examined further.\n * The relevant structures are:\n *\n * - chosen: \n * - chosen: { subOption: }\n *\n * Where subOption is 'node', 'edge' or 'label'.\n *\n * The intention of this method appears to be to set a specific priority to the options;\n * Since most properties are either bridged or merged into the local options objects, there\n * is not much point in handling them separately.\n * TODO: examine if 'most' in previous sentence can be replaced with 'all'. In that case, we\n * should be able to get rid of this method.\n *\n * @param {string} subOption option within object 'chosen' to consider; either 'node', 'edge' or 'label'\n * @param {Object} pile array of options objects to consider\n * \n * @return {boolean|function} value for passed subOption of 'chosen' to use\n */\n static choosify(subOption, pile) {\n // allowed values for subOption\n let allowed = [ 'node', 'edge', 'label'];\n let value = true;\n\n let chosen = util.topMost(pile, 'chosen');\n if (typeof chosen === 'boolean') {\n value = chosen;\n } else if (typeof chosen === 'object') {\n if (allowed.indexOf(subOption) === -1 ) {\n throw new Error('choosify: subOption \\'' + subOption + '\\' should be one of '\n + \"'\" + allowed.join(\"', '\") + \"'\");\n }\n\n let chosenEdge = util.topMost(pile, ['chosen', subOption]);\n if ((typeof chosenEdge === 'boolean') || (typeof chosenEdge === 'function')) {\n value = chosenEdge;\n }\n }\n\n return value;\n }\n\n\n /**\n * Check if the point falls within the given rectangle.\n *\n * @param {rect} rect\n * @param {point} point\n * @param {rotationPoint} [rotationPoint] if specified, the rotation that applies to the rectangle.\n * @returns {boolean} true if point within rectangle, false otherwise\n * @static\n */\n static pointInRect(rect, point, rotationPoint) {\n if (rect.width <= 0 || rect.height <= 0) {\n return false; // early out\n }\n\n if (rotationPoint !== undefined) {\n // Rotate the point the same amount as the rectangle\n var tmp = {\n x: point.x - rotationPoint.x,\n y: point.y - rotationPoint.y\n };\n\n if (rotationPoint.angle !== 0) {\n // In order to get the coordinates the same, you need to \n // rotate in the reverse direction\n var angle = -rotationPoint.angle;\n\n var tmp2 = {\n x: Math.cos(angle)*tmp.x - Math.sin(angle)*tmp.y,\n y: Math.sin(angle)*tmp.x + Math.cos(angle)*tmp.y\n };\n point = tmp2;\n } else {\n point = tmp;\n }\n\n // Note that if a rotation is specified, the rectangle coordinates\n // are **not* the full canvas coordinates. They are relative to the\n // rotationPoint. Hence, the point coordinates need not be translated\n // back in this case.\n }\n\n var right = rect.x + rect.width;\n var bottom = rect.y + rect.width;\n\n return (\n rect.left < point.x &&\n right > point.x &&\n rect.top < point.y &&\n bottom > point.y\n );\n }\n\n\n /**\n * Check if given value is acceptable as a label text.\n *\n * @param {*} text value to check; can be anything at this point\n * @returns {boolean} true if valid label value, false otherwise\n */\n static isValidLabel(text) {\n // Note that this is quite strict: types that *might* be converted to string are disallowed\n return (typeof text === 'string' && text !== '');\n }\n}\n\nexport default ComponentUtil;\n","/**\n * Callback to determine text dimensions, using the parent label settings.\n * @callback MeasureText\n * @param {text} text\n * @param {text} mod\n * @return {Object} { width, values} width in pixels and font attributes\n */\n\n\n/**\n * Helper class for Label which collects results of splitting labels into lines and blocks.\n *\n * @private\n */\nclass LabelAccumulator {\n\n /**\n * @param {MeasureText} measureText\n */\n constructor(measureText) {\n this.measureText = measureText;\n this.current = 0;\n this.width = 0;\n this.height = 0;\n this.lines = [];\n }\n\n\n /**\n * Append given text to the given line.\n *\n * @param {number} l index of line to add to\n * @param {string} text string to append to line\n * @param {'bold'|'ital'|'boldital'|'mono'|'normal'} [mod='normal']\n * @private\n */\n _add(l, text, mod = 'normal') { \n\n if (this.lines[l] === undefined) {\n this.lines[l] = {\n width : 0,\n height: 0,\n blocks: []\n };\n }\n\n // We still need to set a block for undefined and empty texts, hence return at this point\n // This is necessary because we don't know at this point if we're at the\n // start of an empty line or not.\n // To compensate, empty blocks are removed in `finalize()`.\n //\n // Empty strings should still have a height\n let tmpText = text;\n if (text === undefined || text === \"\") tmpText = \" \";\n\n // Determine width and get the font properties\n let result = this.measureText(tmpText, mod);\n let block = Object.assign({}, result.values);\n block.text = text;\n block.width = result.width;\n block.mod = mod;\n\n if (text === undefined || text === \"\") {\n block.width = 0;\n }\n\n this.lines[l].blocks.push(block);\n\n // Update the line width. We need this for determining if a string goes over max width\n this.lines[l].width += block.width;\n }\n\n\n /**\n * Returns the width in pixels of the current line.\n *\n * @returns {number}\n */\n curWidth() {\n let line = this.lines[this.current];\n if (line === undefined) return 0;\n\n return line.width;\n }\n\n\n /**\n * Add text in block to current line\n *\n * @param {string} text\n * @param {'bold'|'ital'|'boldital'|'mono'|'normal'} [mod='normal']\n */\n append(text, mod = 'normal') { \n this._add(this.current, text, mod);\n }\n\n\n /**\n * Add text in block to current line and start a new line\n *\n * @param {string} text\n * @param {'bold'|'ital'|'boldital'|'mono'|'normal'} [mod='normal']\n */\n newLine(text, mod = 'normal') {\n this._add(this.current, text, mod);\n this.current++;\n }\n\n\n /**\n * Determine and set the heights of all the lines currently contained in this instance\n *\n * Note that width has already been set.\n * \n * @private\n */\n determineLineHeights() {\n for (let k = 0; k < this.lines.length; k++) {\n let line = this.lines[k];\n\n // Looking for max height of blocks in line\n let height = 0;\n\n if (line.blocks !== undefined) { // Can happen if text contains e.g. '\\n '\n for (let l = 0; l < line.blocks.length; l++) {\n let block = line.blocks[l];\n\n if (height < block.height) {\n height = block.height;\n }\n }\n }\n \n line.height = height;\n }\n }\n\n\n /**\n * Determine the full size of the label text, as determined by current lines and blocks\n * \n * @private\n */\n determineLabelSize() {\n let width = 0;\n let height = 0;\n for (let k = 0; k < this.lines.length; k++) {\n let line = this.lines[k];\n\n if (line.width > width) {\n width = line.width;\n }\n height += line.height;\n }\n\n this.width = width;\n this.height = height;\n }\n\n\n /**\n * Remove all empty blocks and empty lines we don't need\n * \n * This must be done after the width/height determination,\n * so that these are set properly for processing here.\n *\n * @returns {Array} Lines with empty blocks (and some empty lines) removed\n * @private\n */\n removeEmptyBlocks() {\n let tmpLines = [];\n for (let k = 0; k < this.lines.length; k++) {\n let line = this.lines[k];\n\n // Note: an empty line in between text has width zero but is still relevant to layout.\n // So we can't use width for testing empty line here\n if (line.blocks.length === 0) continue;\n\n // Discard final empty line always\n if(k === this.lines.length - 1) {\n if (line.width === 0) continue;\n }\n\n let tmpLine = {};\n Object.assign(tmpLine, line);\n tmpLine.blocks = [];\n\n let firstEmptyBlock;\n let tmpBlocks = []\n for (let l = 0; l < line.blocks.length; l++) {\n let block = line.blocks[l];\n if (block.width !== 0) {\n tmpBlocks.push(block);\n } else {\n if (firstEmptyBlock === undefined) {\n firstEmptyBlock = block;\n }\n }\n }\n\n // Ensure that there is *some* text present\n if (tmpBlocks.length === 0 && firstEmptyBlock !== undefined) {\n tmpBlocks.push(firstEmptyBlock);\n }\n\n tmpLine.blocks = tmpBlocks;\n\n tmpLines.push(tmpLine);\n }\n\n return tmpLines;\n }\n\n\n /**\n * Set the sizes for all lines and the whole thing.\n *\n * @returns {{width: (number|*), height: (number|*), lines: Array}}\n */\n finalize() {\n //console.log(JSON.stringify(this.lines, null, 2));\n\n this.determineLineHeights();\n this.determineLabelSize();\n let tmpLines = this.removeEmptyBlocks();\n\n\n // Return a simple hash object for further processing.\n return {\n width : this.width,\n height: this.height,\n lines : tmpLines\n }\n }\n} \n\n\nexport default LabelAccumulator;\n","import LabelAccumulator from './LabelAccumulator';\nimport ComponentUtil from './ComponentUtil';\n\n// Hash of prepared regexp's for tags\nvar tagPattern = {\n // HTML\n '': //,\n '': //,\n '': //,\n '': /<\\/b>/,\n '': /<\\/i>/,\n '': /<\\/code>/,\n // Markdown\n '*': /\\*/, // bold\n '_': /\\_/, // ital\n '`': /`/, // mono\n 'afterBold': /[^\\*]/,\n 'afterItal': /[^_]/,\n 'afterMono': /[^`]/,\n};\n\n\n/**\n * Internal helper class for parsing the markup tags for HTML and Markdown.\n *\n * NOTE: Sequences of tabs and spaces are reduced to single space.\n * Scan usage of `this.spacing` within method\n */\nclass MarkupAccumulator {\n\n /**\n * Create an instance\n *\n * @param {string} text text to parse for markup\n */\n constructor(text) {\n this.text = text;\n this.bold = false;\n this.ital = false;\n this.mono = false;\n this.spacing = false;\n this.position = 0;\n this.buffer = \"\";\n this.modStack = [];\n\n this.blocks = [];\n }\n\n\n /**\n * Return the mod label currently on the top of the stack\n *\n * @returns {string} label of topmost mod \n * @private\n */\n mod() {\n return (this.modStack.length === 0) ? 'normal' : this.modStack[0];\n }\n\n\n /**\n * Return the mod label currently active\n * \n * @returns {string} label of active mod \n * @private\n */\n modName() {\n if (this.modStack.length === 0)\n return 'normal';\n else if (this.modStack[0] === 'mono')\n return 'mono';\n else {\n if (this.bold && this.ital) {\n return 'boldital';\n } else if (this.bold) {\n return 'bold';\n } else if (this.ital) {\n return 'ital';\n }\n }\n }\n\n\n /**\n * @private\n */\n emitBlock() {\n if (this.spacing) {\n this.add(\" \");\n this.spacing = false;\n }\n if (this.buffer.length > 0) {\n this.blocks.push({ text: this.buffer, mod: this.modName() });\n this.buffer = \"\";\n }\n }\n\n\n /**\n * Output text to buffer\n *\n * @param {string} text text to add\n * @private\n */\n add(text) {\n if (text === \" \") {\n this.spacing = true;\n }\n if (this.spacing) {\n this.buffer += \" \";\n this.spacing = false;\n }\n if (text != \" \") {\n this.buffer += text;\n }\n }\n\n\n /**\n * Handle parsing of whitespace\n *\n * @param {string} ch the character to check\n * @returns {boolean} true if the character was processed as whitespace, false otherwise\n */\n parseWS(ch) {\n if (/[ \\t]/.test(ch)) {\n if (!this.mono) {\n this.spacing = true;\n } else {\n this.add(ch);\n }\n return true;\n }\n\n return false;\n }\n\n\n /**\n * @param {string} tagName label for block type to set\n * @private\n */\n setTag(tagName) {\n this.emitBlock();\n this[tagName] = true;\n this.modStack.unshift(tagName);\n }\n\n\n /**\n * @param {string} tagName label for block type to unset\n * @private\n */\n unsetTag(tagName) {\n this.emitBlock();\n this[tagName] = false;\n this.modStack.shift();\n }\n\n\n /**\n * @param {string} tagName label for block type we are currently processing\n * @param {string|RegExp} tag string to match in text\n * @returns {boolean} true if the tag was processed, false otherwise\n */\n parseStartTag(tagName, tag) {\n // Note: if 'mono' passed as tagName, there is a double check here. This is OK\n if (!this.mono && !this[tagName] && this.match(tag)) {\n this.setTag(tagName);\n return true;\n }\n\n return false;\n }\n\n\n /**\n * @param {string|RegExp} tag\n * @param {number} [advance=true] if set, advance current position in text\n * @returns {boolean} true if match at given position, false otherwise\n * @private\n */\n match(tag, advance = true) {\n let [regExp, length] = this.prepareRegExp(tag);\n let matched = regExp.test(this.text.substr(this.position, length));\n\n if (matched && advance) {\n this.position += length - 1;\n }\n\n return matched;\n }\n\n\n /**\n * @param {string} tagName label for block type we are currently processing\n * @param {string|RegExp} tag string to match in text\n * @param {RegExp} [nextTag] regular expression to match for characters *following* the current tag \n * @returns {boolean} true if the tag was processed, false otherwise\n */\n parseEndTag(tagName, tag, nextTag) {\n let checkTag = (this.mod() === tagName);\n if (tagName === 'mono') { // special handling for 'mono'\n checkTag = checkTag && this.mono;\n } else {\n checkTag = checkTag && !this.mono;\n }\n\n if (checkTag && this.match(tag)) {\n if (nextTag !== undefined) {\n // Purpose of the following match is to prevent a direct unset/set of a given tag\n // E.g. '*bold **still bold*' => '*bold still bold*'\n if ((this.position === this.text.length-1) || this.match(nextTag, false)) {\n this.unsetTag(tagName);\n }\n } else {\n this.unsetTag(tagName);\n }\n\n return true;\n }\n\n return false;\n }\n\n\n /**\n * @param {string|RegExp} tag string to match in text\n * @param {value} value string to replace tag with, if found at current position\n * @returns {boolean} true if the tag was processed, false otherwise\n */\n replace(tag, value) {\n if (this.match(tag)) {\n this.add(value);\n this.position += length - 1;\n return true;\n }\n\n return false;\n }\n\n\n /**\n * Create a regular expression for the tag if it isn't already one.\n *\n * The return value is an array `[RegExp, number]`, with exactly two value, where:\n * - RegExp is the regular expression to use\n * - number is the lenth of the input string to match\n *\n * @param {string|RegExp} tag string to match in text\n * @returns {Array} regular expression to use and length of input string to match\n * @private\n */\n prepareRegExp(tag) {\n let length;\n let regExp;\n if (tag instanceof RegExp) {\n regExp = tag;\n length = 1; // ASSUMPTION: regexp only tests one character\n } else {\n // use prepared regexp if present\n var prepared = tagPattern[tag];\n if (prepared !== undefined) {\n regExp = prepared;\n } else {\n regExp = new RegExp(tag);\n }\n\n length = tag.length;\n }\n\n return [regExp, length];\n }\n}\n\n\n/**\n * Helper class for Label which explodes the label text into lines and blocks within lines\n *\n * @private\n */\nclass LabelSplitter {\n\n /**\n * @param {CanvasRenderingContext2D} ctx Canvas rendering context\n * @param {Label} parent reference to the Label instance using current instance\n * @param {boolean} selected \n * @param {boolean} hover\n */\n constructor(ctx, parent, selected, hover) {\n this.ctx = ctx;\n this.parent = parent;\n this.selected = selected;\n this.hover = hover;\n\n /**\n * Callback to determine text width; passed to LabelAccumulator instance\n *\n * @param {String} text string to determine width of\n * @param {String} mod font type to use for this text\n * @return {Object} { width, values} width in pixels and font attributes\n */\n let textWidth = (text, mod) => {\n if (text === undefined) return 0;\n\n // TODO: This can be done more efficiently with caching\n // This will set the ctx.font correctly, depending on selected/hover and mod - so that ctx.measureText() will be accurate.\n let values = this.parent.getFormattingValues(ctx, selected, hover, mod);\n\n let width = 0;\n if (text !== '') {\n let measure = this.ctx.measureText(text);\n width = measure.width;\n }\n\n return {width, values: values};\n };\n\n\n this.lines = new LabelAccumulator(textWidth);\n }\n\n\n /**\n * Split passed text of a label into lines and blocks.\n *\n * # NOTE\n *\n * The handling of spacing is option dependent:\n *\n * - if `font.multi : false`, all spaces are retained\n * - if `font.multi : true`, every sequence of spaces is compressed to a single space\n *\n * This might not be the best way to do it, but this is as it has been working till now.\n * In order not to break existing functionality, for the time being this behaviour will\n * be retained in any code changes. \n *\n * @param {string} text text to split\n * @returns {Array}\n */\n process(text) {\n if (!ComponentUtil.isValidLabel(text)) {\n return this.lines.finalize();\n }\n\n var font = this.parent.fontOptions;\n\n // Normalize the end-of-line's to a single representation - order important\n text = text.replace(/\\r\\n/g, '\\n'); // Dos EOL's\n text = text.replace(/\\r/g, '\\n'); // Mac EOL's\n\n // Note that at this point, there can be no \\r's in the text.\n // This is used later on splitStringIntoLines() to split multifont texts.\n\n let nlLines = String(text).split('\\n');\n let lineCount = nlLines.length;\n\n if (font.multi) {\n // Multi-font case: styling tags active\n for (let i = 0; i < lineCount; i++) {\n let blocks = this.splitBlocks(nlLines[i], font.multi);\n // Post: Sequences of tabs and spaces are reduced to single space\n\n if (blocks === undefined) continue;\n\n if (blocks.length === 0) {\n this.lines.newLine(\"\");\n continue;\n }\n\n if (font.maxWdt > 0) {\n // widthConstraint.maximum defined\n //console.log('Running widthConstraint multi, max: ' + this.fontOptions.maxWdt);\n for (let j = 0; j < blocks.length; j++) {\n let mod = blocks[j].mod;\n let text = blocks[j].text;\n this.splitStringIntoLines(text, mod, true);\n }\n } else {\n // widthConstraint.maximum NOT defined\n for (let j = 0; j < blocks.length; j++) {\n let mod = blocks[j].mod;\n let text = blocks[j].text;\n this.lines.append(text, mod); \n }\n }\n\n this.lines.newLine();\n }\n } else {\n // Single-font case\n if (font.maxWdt > 0) {\n // widthConstraint.maximum defined\n // console.log('Running widthConstraint normal, max: ' + this.fontOptions.maxWdt);\n for (let i = 0; i < lineCount; i++) {\n this.splitStringIntoLines(nlLines[i]);\n }\n } else {\n // widthConstraint.maximum NOT defined\n for (let i = 0; i < lineCount; i++) {\n this.lines.newLine(nlLines[i]); \n }\n }\n }\n \n return this.lines.finalize();\n }\n\n\n /**\n * normalize the markup system\n *\n * @param {boolean|'md'|'markdown'|'html'} markupSystem\n * @returns {string}\n */\n decodeMarkupSystem(markupSystem) {\n let system = 'none';\n if (markupSystem === 'markdown' || markupSystem === 'md') {\n system = 'markdown';\n } else if (markupSystem === true || markupSystem === 'html') {\n system = 'html'\n }\n return system;\n }\n\n\n /**\n *\n * @param {string} text\n * @returns {Array}\n */\n splitHtmlBlocks(text) {\n let s = new MarkupAccumulator(text);\n\n let parseEntities = (ch) => {\n if (/&/.test(ch)) {\n let parsed = s.replace(s.text, '<', '<')\n || s.replace(s.text, '&', '&');\n\n if (!parsed) {\n s.add(\"&\");\n }\n\n return true;\n }\n\n return false;\n };\n\n while (s.position < s.text.length) {\n let ch = s.text.charAt(s.position);\n\n let parsed = s.parseWS(ch)\n || (/')\n || s.parseStartTag('ital', '')\n || s.parseStartTag('mono', '')\n || s.parseEndTag('bold', '')\n || s.parseEndTag('ital', '')\n || s.parseEndTag('mono', '')))\n || parseEntities(ch);\n\n if (!parsed) {\n s.add(ch);\n }\n s.position++\n }\n s.emitBlock();\n return s.blocks;\n }\n\n\n /**\n *\n * @param {string} text\n * @returns {Array}\n */\n splitMarkdownBlocks(text) {\n let s = new MarkupAccumulator(text); \n let beginable = true;\n\n let parseOverride = (ch) => {\n if (/\\\\/.test(ch)) {\n if (s.position < this.text.length + 1) {\n s.position++;\n ch = this.text.charAt(s.position);\n if (/ \\t/.test(ch)) {\n s.spacing = true;\n } else {\n s.add(ch);\n beginable = false;\n }\n }\n\n return true\n }\n\n return false;\n }\n\n while (s.position < s.text.length) {\n let ch = s.text.charAt(s.position);\n\n let parsed = s.parseWS(ch)\n || parseOverride(ch)\n || ((beginable || s.spacing) && (\n s.parseStartTag('bold', '*')\n || s.parseStartTag('ital', '_')\n || s.parseStartTag('mono', '`')))\n || s.parseEndTag('bold', '*', 'afterBold')\n || s.parseEndTag('ital', '_', 'afterItal')\n || s.parseEndTag('mono', '`', 'afterMono');\n\n if (!parsed) {\n s.add(ch);\n beginable = false;\n }\n s.position++\n }\n s.emitBlock();\n return s.blocks;\n }\n\n\n /**\n * Explodes a piece of text into single-font blocks using a given markup\n *\n * @param {string} text\n * @param {boolean|'md'|'markdown'|'html'} markupSystem\n * @returns {Array.<{text: string, mod: string}>}\n * @private\n */\n splitBlocks(text, markupSystem) {\n let system = this.decodeMarkupSystem(markupSystem);\n if (system === 'none') {\n return [{\n text: text,\n mod: 'normal'\n }]\n } else if (system === 'markdown') {\n return this.splitMarkdownBlocks(text);\n } else if (system === 'html') {\n return this.splitHtmlBlocks(text);\n }\n }\n\n\n /**\n * @param {string} text\n * @returns {boolean} true if text length over the current max with\n * @private\n */\n overMaxWidth(text) {\n let width = this.ctx.measureText(text).width;\n return (this.lines.curWidth() + width > this.parent.fontOptions.maxWdt);\n }\n\n\n /**\n * Determine the longest part of the sentence which still fits in the \n * current max width.\n * \n * @param {Array} words Array of strings signifying a text lines\n * @return {number} index of first item in string making string go over max\n * @private\n */\n getLongestFit(words) {\n let text = '';\n let w = 0;\n\n while (w < words.length) {\n let pre = (text === '') ? '' : ' ';\n let newText = text + pre + words[w];\n\n if (this.overMaxWidth(newText)) break;\n text = newText;\n w++;\n }\n\n return w;\n }\n\n\n /**\n * Determine the longest part of the string which still fits in the\n * current max width.\n * \n * @param {Array} words Array of strings signifying a text lines\n * @return {number} index of first item in string making string go over max\n */\n getLongestFitWord(words) {\n let w = 0;\n\n while (w < words.length) {\n if (this.overMaxWidth(words.slice(0,w))) break;\n w++;\n }\n\n return w;\n }\n\n\n /**\n * Split the passed text into lines, according to width constraint (if any).\n * \n * The method assumes that the input string is a single line, i.e. without lines break.\n *\n * This method retains spaces, if still present (case `font.multi: false`).\n * A space which falls on an internal line break, will be replaced by a newline.\n * There is no special handling of tabs; these go along with the flow.\n * \n * @param {string} str\n * @param {string} [mod='normal']\n * @param {boolean} [appendLast=false]\n * @private\n */\n splitStringIntoLines(str, mod = 'normal', appendLast = false) {\n // Set the canvas context font, based upon the current selected/hover state\n // and the provided mod, so the text measurement performed by getLongestFit\n // will be accurate - and not just use the font of whoever last used the canvas.\n this.parent.getFormattingValues(this.ctx, this.selected, this.hover, mod)\n\n // Still-present spaces are relevant, retain them\n str = str.replace(/^( +)/g, '$1\\r');\n str = str.replace(/([^\\r][^ ]*)( +)/g, '$1\\r$2\\r');\n let words = str.split('\\r');\n\n while (words.length > 0) {\n let w = this.getLongestFit(words);\n\n if (w === 0) {\n // Special case: the first word is already larger than the max width.\n let word = words[0];\n\n // Break the word to the largest part that fits the line\n let x = this.getLongestFitWord(word);\n this.lines.newLine(word.slice(0, x), mod);\n\n // Adjust the word, so that the rest will be done next iteration\n words[0] = word.slice(x);\n } else {\n // skip any space that is replaced by a newline\n let newW = w;\n if (words[w - 1] === ' ') {\n w--;\n } else if (words[newW] === ' ') {\n newW++;\n }\n\n let text = words.slice(0, w).join(\"\");\n\n if (w == words.length && appendLast) {\n this.lines.append(text, mod); \n } else {\n this.lines.newLine(text, mod); \n }\n\n // Adjust the word, so that the rest will be done next iteration\n words = words.slice(newW);\n }\n }\n }\n} \n\nexport default LabelSplitter;\n","import util from 'vis-util';\nimport ComponentUtil from './ComponentUtil';\nimport LabelSplitter from './LabelSplitter';\n\n\n/**\n * List of special styles for multi-fonts\n * @private\n */\nconst multiFontStyle = ['bold', 'ital', 'boldital', 'mono'];\n\n\n/**\n * A Label to be used for Nodes or Edges.\n */\nclass Label {\n\n /**\n * @param {Object} body\n * @param {Object} options\n * @param {boolean} [edgelabel=false]\n */\n constructor(body, options, edgelabel = false) {\n this.body = body;\n this.pointToSelf = false;\n this.baseSize = undefined;\n this.fontOptions = {}; // instance variable containing the *instance-local* font options\n this.setOptions(options);\n this.size = {top: 0, left: 0, width: 0, height: 0, yLine: 0};\n this.isEdgeLabel = edgelabel;\n }\n\n\n /**\n * @param {Object} options the options of the parent Node-instance\n */\n setOptions(options) {\n this.elementOptions = options; // Reference to the options of the parent Node-instance \n\n this.initFontOptions(options.font);\n\n if (ComponentUtil.isValidLabel(options.label)) {\n this.labelDirty = true;\n } else {\n // Bad label! Change the option value to prevent bad stuff happening\n options.label = undefined\n }\n\n if (options.font !== undefined && options.font !== null) { // font options can be deleted at various levels\n if (typeof options.font === 'string') {\n this.baseSize = this.fontOptions.size;\n }\n else if (typeof options.font === 'object') {\n let size = options.font.size;\n \n if (size !== undefined) {\n this.baseSize = size;\n }\n }\n }\n }\n\n\n /**\n * Init the font Options structure.\n *\n * Member fontOptions serves as an accumulator for the current font options.\n * As such, it needs to be completely separated from the node options.\n *\n * @param {Object} newFontOptions the new font options to process\n * @private\n */\n initFontOptions(newFontOptions) {\n // Prepare the multi-font option objects.\n // These will be filled in propagateFonts(), if required\n util.forEach(multiFontStyle, (style) => {\n this.fontOptions[style] = {};\n });\n\n // Handle shorthand option, if present\n if (Label.parseFontString(this.fontOptions, newFontOptions)) {\n this.fontOptions.vadjust = 0;\n return;\n }\n\n // Copy over the non-multifont options, if specified\n util.forEach(newFontOptions, (prop, n) => {\n if (prop !== undefined && prop !== null && typeof prop !== 'object') {\n this.fontOptions[n] = prop;\n }\n });\n }\n\n\n /**\n * If in-variable is a string, parse it as a font specifier.\n *\n * Note that following is not done here and have to be done after the call:\n * - Not all font options are set (vadjust, mod)\n *\n * @param {Object} outOptions out-parameter, object in which to store the parse results (if any)\n * @param {Object} inOptions font options to parse\n * @return {boolean} true if font parsed as string, false otherwise\n * @static\n */\n static parseFontString(outOptions, inOptions) {\n if (!inOptions || typeof inOptions !== 'string') return false;\n\n let newOptionsArray = inOptions.split(\" \");\n\n outOptions.size = +newOptionsArray[0].replace(\"px\",'');\n outOptions.face = newOptionsArray[1];\n outOptions.color = newOptionsArray[2];\n\n return true;\n }\n\n\n /**\n * Set the width and height constraints based on 'nearest' value\n *\n * @param {Array} pile array of option objects to consider\n * @returns {object} the actual constraint values to use\n * @private\n */\n constrain(pile) {\n // NOTE: constrainWidth and constrainHeight never set!\n // NOTE: for edge labels, only 'maxWdt' set\n // Node labels can set all the fields\n let fontOptions = {\n constrainWidth: false,\n maxWdt: -1,\n minWdt: -1,\n constrainHeight: false,\n minHgt: -1,\n valign: 'middle',\n }\n\n let widthConstraint = util.topMost(pile, 'widthConstraint');\n if (typeof widthConstraint === 'number') {\n fontOptions.maxWdt = Number(widthConstraint);\n fontOptions.minWdt = Number(widthConstraint);\n } else if (typeof widthConstraint === 'object') {\n let widthConstraintMaximum = util.topMost(pile, ['widthConstraint', 'maximum']);\n if (typeof widthConstraintMaximum === 'number') {\n fontOptions.maxWdt = Number(widthConstraintMaximum);\n }\n let widthConstraintMinimum = util.topMost(pile, ['widthConstraint', 'minimum'])\n if (typeof widthConstraintMinimum === 'number') {\n fontOptions.minWdt = Number(widthConstraintMinimum);\n }\n }\n\n\n let heightConstraint = util.topMost(pile, 'heightConstraint');\n if (typeof heightConstraint === 'number') {\n fontOptions.minHgt = Number(heightConstraint);\n } else if (typeof heightConstraint === 'object') {\n let heightConstraintMinimum = util.topMost(pile, ['heightConstraint', 'minimum']);\n if (typeof heightConstraintMinimum === 'number') {\n fontOptions.minHgt = Number(heightConstraintMinimum);\n }\n let heightConstraintValign = util.topMost(pile, ['heightConstraint', 'valign']);\n if (typeof heightConstraintValign === 'string') {\n if ((heightConstraintValign === 'top')|| (heightConstraintValign === 'bottom')) {\n fontOptions.valign = heightConstraintValign;\n }\n }\n }\n\n return fontOptions;\n }\n\n\n /**\n * Set options and update internal state\n *\n * @param {Object} options options to set\n * @param {Array} pile array of option objects to consider for option 'chosen'\n */\n update(options, pile) {\n this.setOptions(options, true);\n this.propagateFonts(pile);\n util.deepExtend(this.fontOptions, this.constrain(pile));\n this.fontOptions.chooser = ComponentUtil.choosify('label', pile);\n }\n\n\n /**\n * When margins are set in an element, adjust sizes is called to remove them\n * from the width/height constraints. This must be done prior to label sizing.\n *\n * @param {{top: number, right: number, bottom: number, left: number}} margins\n */\n adjustSizes(margins) {\n let widthBias = (margins) ? (margins.right + margins.left) : 0;\n if (this.fontOptions.constrainWidth) {\n this.fontOptions.maxWdt -= widthBias;\n this.fontOptions.minWdt -= widthBias;\n }\n let heightBias = (margins) ? (margins.top + margins.bottom) : 0;\n if (this.fontOptions.constrainHeight) {\n this.fontOptions.minHgt -= heightBias;\n }\n }\n\n\n/////////////////////////////////////////////////////////\n// Methods for handling options piles\n// Eventually, these will be moved to a separate class\n/////////////////////////////////////////////////////////\n\n /**\n * Add the font members of the passed list of option objects to the pile.\n *\n * @param {Pile} dstPile pile of option objects add to \n * @param {Pile} srcPile pile of option objects to take font options from\n * @private\n */\n addFontOptionsToPile(dstPile, srcPile) {\n for (let i = 0; i < srcPile.length; ++i) {\n this.addFontToPile(dstPile, srcPile[i]);\n }\n }\n\n\n /**\n * Add given font option object to the list of objects (the 'pile') to consider for determining\n * multi-font option values.\n *\n * @param {Pile} pile pile of option objects to use\n * @param {object} options instance to add to pile\n * @private\n */\n addFontToPile(pile, options) {\n if (options === undefined) return;\n if (options.font === undefined || options.font === null) return;\n\n let item = options.font;\n pile.push(item);\n }\n\n\n /**\n * Collect all own-property values from the font pile that aren't multi-font option objectss.\n *\n * @param {Pile} pile pile of option objects to use\n * @returns {object} object with all current own basic font properties\n * @private\n */\n getBasicOptions(pile) {\n let ret = {};\n\n // Scans the whole pile to get all options present\n for (let n = 0; n < pile.length; ++n) {\n let fontOptions = pile[n];\n\n // Convert shorthand if necessary\n let tmpShorthand = {};\n if (Label.parseFontString(tmpShorthand, fontOptions)) {\n fontOptions = tmpShorthand;\n }\n\n util.forEach(fontOptions, (opt, name) => {\n if (opt === undefined) return; // multi-font option need not be present \n if (ret.hasOwnProperty(name)) return; // Keep first value we encounter\n\n if (multiFontStyle.indexOf(name) !== -1) {\n // Skip multi-font properties but we do need the structure\n ret[name] = {};\n } else {\n ret[name] = opt;\n }\n });\n }\n\n return ret;\n }\n\n\n /**\n * Return the value for given option for the given multi-font.\n *\n * All available option objects are trawled in the set order to construct the option values.\n *\n * ---------------------------------------------------------------------\n * ## Traversal of pile for multi-fonts\n *\n * The determination of multi-font option values is a special case, because any values not\n * present in the multi-font options should by definition be taken from the main font options,\n * i.e. from the current 'parent' object of the multi-font option.\n *\n * ### Search order for multi-fonts\n *\n * 'bold' used as example:\n *\n * - search in option group 'bold' in local properties\n * - search in main font option group in local properties\n *\n * ---------------------------------------------------------------------\n *\n * @param {Pile} pile pile of option objects to use\n * @param {MultiFontStyle} multiName sub path for the multi-font\n * @param {string} option the option to search for, for the given multi-font\n * @returns {string|number} the value for the given option\n * @private\n */\n getFontOption(pile, multiName, option) {\n let multiFont;\n\n // Search multi font in local properties\n for (let n = 0; n < pile.length; ++n) {\n let fontOptions = pile[n];\n\n if (fontOptions.hasOwnProperty(multiName)) {\n multiFont = fontOptions[multiName];\n if (multiFont === undefined || multiFont === null) continue;\n\n // Convert shorthand if necessary\n // TODO: inefficient to do this conversion every time; find a better way.\n let tmpShorthand = {};\n if (Label.parseFontString(tmpShorthand, multiFont)) {\n multiFont = tmpShorthand;\n }\n\n if (multiFont.hasOwnProperty(option)) {\n return multiFont[option];\n }\n }\n }\n\n // Option is not mentioned in the multi font options; take it from the parent font options.\n // These have already been converted with getBasicOptions(), so use the converted values.\n if (this.fontOptions.hasOwnProperty(option)) {\n return this.fontOptions[option];\n }\n\n // A value **must** be found; you should never get here.\n throw new Error(\"Did not find value for multi-font for property: '\" + option + \"'\");\n }\n\n\n /**\n * Return all options values for the given multi-font.\n *\n * All available option objects are trawled in the set order to construct the option values.\n *\n * @param {Pile} pile pile of option objects to use\n * @param {MultiFontStyle} multiName sub path for the mod-font\n * @returns {MultiFontOptions}\n * @private\n */\n getFontOptions(pile, multiName) {\n let result = {};\n let optionNames = ['color', 'size', 'face', 'mod', 'vadjust']; // List of allowed options per multi-font\n\n for (let i = 0; i < optionNames.length; ++i) {\n let mod = optionNames[i];\n result[mod] = this.getFontOption(pile, multiName, mod);\n }\n\n return result;\n }\n\n/////////////////////////////////////////////////////////\n// End methods for handling options piles\n/////////////////////////////////////////////////////////\n\n\n /**\n * Collapse the font options for the multi-font to single objects, from\n * the chain of option objects passed (the 'pile').\n *\n * @param {Pile} pile sequence of option objects to consider.\n * First item in list assumed to be the newly set options.\n */\n propagateFonts(pile) {\n let fontPile = []; // sequence of font objects to consider, order important\n\n // Note that this.elementOptions is not used here.\n this.addFontOptionsToPile(fontPile, pile);\n this.fontOptions = this.getBasicOptions(fontPile);\n\n // We set multifont values even if multi === false, for consistency (things break otherwise)\n for (let i = 0; i < multiFontStyle.length; ++i) {\n let mod = multiFontStyle[i];\n let modOptions = this.fontOptions[mod];\n let tmpMultiFontOptions = this.getFontOptions(fontPile, mod);\n\n // Copy over found values\n util.forEach(tmpMultiFontOptions, (option, n) => {\n modOptions[n] = option;\n });\n\n modOptions.size = Number(modOptions.size);\n modOptions.vadjust = Number(modOptions.vadjust);\n }\n }\n\n\n /**\n * Main function. This is called from anything that wants to draw a label.\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} x\n * @param {number} y\n * @param {boolean} selected\n * @param {boolean} hover\n * @param {string} [baseline='middle']\n */\n draw(ctx, x, y, selected, hover, baseline = 'middle') {\n // if no label, return\n if (this.elementOptions.label === undefined)\n return;\n\n // check if we have to render the label\n let viewFontSize = this.fontOptions.size * this.body.view.scale;\n if (this.elementOptions.label && viewFontSize < this.elementOptions.scaling.label.drawThreshold - 1)\n return;\n\n // This ensures that there will not be HUGE letters on screen\n // by setting an upper limit on the visible text size (regardless of zoomLevel)\n if (viewFontSize >= this.elementOptions.scaling.label.maxVisible) {\n viewFontSize = Number(this.elementOptions.scaling.label.maxVisible) / this.body.view.scale;\n }\n\n // update the size cache if required\n this.calculateLabelSize(ctx, selected, hover, x, y, baseline);\n this._drawBackground(ctx);\n this._drawText(ctx, x, this.size.yLine, baseline, viewFontSize);\n }\n\n\n /**\n * Draws the label background\n * @param {CanvasRenderingContext2D} ctx\n * @private\n */\n _drawBackground(ctx) {\n if (this.fontOptions.background !== undefined && this.fontOptions.background !== \"none\") {\n ctx.fillStyle = this.fontOptions.background;\n let size = this.getSize();\n ctx.fillRect(size.left, size.top, size.width, size.height);\n }\n }\n\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} x\n * @param {number} y\n * @param {string} [baseline='middle']\n * @param {number} viewFontSize \n * @private\n */\n _drawText(ctx, x, y, baseline = 'middle', viewFontSize) {\n [x, y] = this._setAlignment(ctx, x, y, baseline);\n\n ctx.textAlign = 'left';\n x = x - this.size.width / 2; // Shift label 1/2-distance to the left\n if ((this.fontOptions.valign) && (this.size.height > this.size.labelHeight)) {\n if (this.fontOptions.valign === 'top') {\n y -= (this.size.height - this.size.labelHeight) / 2;\n }\n if (this.fontOptions.valign === 'bottom') {\n y += (this.size.height - this.size.labelHeight) / 2;\n }\n }\n\n // draw the text\n for (let i = 0; i < this.lineCount; i++) {\n let line = this.lines[i];\n if (line && line.blocks) {\n let width = 0;\n if (this.isEdgeLabel || this.fontOptions.align === 'center') {\n width += (this.size.width - line.width) / 2\n } else if (this.fontOptions.align === 'right') {\n width += (this.size.width - line.width)\n }\n for (let j = 0; j < line.blocks.length; j++) {\n let block = line.blocks[j];\n ctx.font = block.font;\n let [fontColor, strokeColor] = this._getColor(block.color, viewFontSize, block.strokeColor);\n if (block.strokeWidth > 0) {\n ctx.lineWidth = block.strokeWidth;\n ctx.strokeStyle = strokeColor;\n ctx.lineJoin = 'round';\n }\n ctx.fillStyle = fontColor;\n\n if (block.strokeWidth > 0) {\n ctx.strokeText(block.text, x + width, y + block.vadjust);\n }\n ctx.fillText(block.text, x + width, y + block.vadjust);\n width += block.width;\n }\n y += line.height;\n }\n }\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} x\n * @param {number} y\n * @param {string} baseline\n * @returns {Array.}\n * @private\n */\n _setAlignment(ctx, x, y, baseline) {\n // check for label alignment (for edges)\n // TODO: make alignment for nodes\n if (this.isEdgeLabel && this.fontOptions.align !== 'horizontal' && this.pointToSelf === false) {\n x = 0;\n y = 0;\n\n let lineMargin = 2;\n if (this.fontOptions.align === 'top') {\n ctx.textBaseline = 'alphabetic';\n y -= 2 * lineMargin; // distance from edge, required because we use alphabetic. Alphabetic has less difference between browsers\n }\n else if (this.fontOptions.align === 'bottom') {\n ctx.textBaseline = 'hanging';\n y += 2 * lineMargin;// distance from edge, required because we use hanging. Hanging has less difference between browsers\n }\n else {\n ctx.textBaseline = 'middle';\n }\n }\n else {\n ctx.textBaseline = baseline;\n }\n return [x,y];\n }\n\n /**\n * fade in when relative scale is between threshold and threshold - 1.\n * If the relative scale would be smaller than threshold -1 the draw function would have returned before coming here.\n *\n * @param {string} color The font color to use\n * @param {number} viewFontSize\n * @param {string} initialStrokeColor\n * @returns {Array.} An array containing the font color and stroke color\n * @private\n */\n _getColor(color, viewFontSize, initialStrokeColor) {\n let fontColor = color || '#000000';\n let strokeColor = initialStrokeColor || '#ffffff';\n if (viewFontSize <= this.elementOptions.scaling.label.drawThreshold) {\n let opacity = Math.max(0, Math.min(1, 1 - (this.elementOptions.scaling.label.drawThreshold - viewFontSize)));\n fontColor = util.overrideOpacity(fontColor, opacity);\n strokeColor = util.overrideOpacity(strokeColor, opacity);\n }\n return [fontColor, strokeColor];\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {boolean} selected\n * @param {boolean} hover\n * @returns {{width: number, height: number}}\n */\n getTextSize(ctx, selected = false, hover = false) {\n this._processLabel(ctx, selected, hover);\n return {\n width: this.size.width,\n height: this.size.height,\n lineCount: this.lineCount\n };\n }\n\n\n /**\n * Get the current dimensions of the label\n *\n * @return {rect}\n */\n getSize() {\n let lineMargin = 2;\n let x = this.size.left; // default values which might be overridden below\n let y = this.size.top - 0.5*lineMargin; // idem\n\n if (this.isEdgeLabel) {\n const x2 = -this.size.width * 0.5;\n\n switch (this.fontOptions.align) {\n case 'middle':\n x = x2;\n y = -this.size.height * 0.5\n break;\n case 'top':\n x = x2;\n y = -(this.size.height + lineMargin);\n break;\n case 'bottom':\n x = x2;\n y = lineMargin;\n break;\n }\n }\n\n var ret = {\n left : x,\n top : y,\n width : this.size.width,\n height: this.size.height,\n };\n\n return ret;\n }\n\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {boolean} selected\n * @param {boolean} hover\n * @param {number} [x=0]\n * @param {number} [y=0]\n * @param {'middle'|'hanging'} [baseline='middle']\n */\n calculateLabelSize(ctx, selected, hover, x = 0, y = 0, baseline = 'middle') {\n this._processLabel(ctx, selected, hover);\n this.size.left = x - this.size.width * 0.5;\n this.size.top = y - this.size.height * 0.5;\n this.size.yLine = y + (1 - this.lineCount) * 0.5 * this.fontOptions.size;\n if (baseline === \"hanging\") {\n this.size.top += 0.5 * this.fontOptions.size;\n this.size.top += 4; // distance from node, required because we use hanging. Hanging has less difference between browsers\n this.size.yLine += 4; // distance from node\n }\n }\n\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {boolean} selected\n * @param {boolean} hover\n * @param {string} mod\n * @returns {{color, size, face, mod, vadjust, strokeWidth: *, strokeColor: (*|string|allOptions.edges.font.strokeColor|{string}|allOptions.nodes.font.strokeColor|Array)}}\n */\n getFormattingValues(ctx, selected, hover, mod) {\n let getValue = function(fontOptions, mod, option) {\n if (mod === \"normal\") {\n if (option === 'mod' ) return \"\";\n return fontOptions[option];\n }\n\n if (fontOptions[mod][option] !== undefined) { // Grumbl leaving out test on undefined equals false for \"\" \n return fontOptions[mod][option];\n } else {\n // Take from parent font option\n return fontOptions[option];\n }\n };\n\n let values = {\n color : getValue(this.fontOptions, mod, 'color' ),\n size : getValue(this.fontOptions, mod, 'size' ),\n face : getValue(this.fontOptions, mod, 'face' ),\n mod : getValue(this.fontOptions, mod, 'mod' ),\n vadjust: getValue(this.fontOptions, mod, 'vadjust'),\n strokeWidth: this.fontOptions.strokeWidth,\n strokeColor: this.fontOptions.strokeColor\n };\n if (selected || hover) {\n if (mod === \"normal\" && (this.fontOptions.chooser === true) && (this.elementOptions.labelHighlightBold)) {\n values.mod = 'bold';\n } else {\n if (typeof this.fontOptions.chooser === 'function') {\n this.fontOptions.chooser(values, this.elementOptions.id, selected, hover);\n }\n }\n }\n\n let fontString = \"\";\n if (values.mod !== undefined && values.mod !== \"\") { // safeguard for undefined - this happened\n fontString += values.mod + \" \";\n }\n fontString += values.size + \"px \" + values.face;\n\n ctx.font = fontString.replace(/\"/g, \"\");\n values.font = ctx.font;\n values.height = values.size;\n return values;\n }\n\n\n /**\n *\n * @param {boolean} selected\n * @param {boolean} hover\n * @returns {boolean}\n */\n differentState(selected, hover) {\n return ((selected !== this.selectedState) || (hover !== this.hoverState));\n }\n \n\n /**\n * This explodes the passed text into lines and determines the width, height and number of lines.\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {boolean} selected\n * @param {boolean} hover\n * @param {string} inText the text to explode\n * @returns {{width, height, lines}|*}\n * @private\n */\n _processLabelText(ctx, selected, hover, inText) {\n let splitter = new LabelSplitter(ctx, this, selected, hover);\n return splitter.process(inText);\n }\n\n\n /**\n * This explodes the label string into lines and sets the width, height and number of lines.\n * @param {CanvasRenderingContext2D} ctx\n * @param {boolean} selected\n * @param {boolean} hover\n * @private\n */\n _processLabel(ctx, selected, hover) {\n\n if(this.labelDirty === false && !this.differentState(selected,hover))\n return;\n \n let state = this._processLabelText(ctx, selected, hover, this.elementOptions.label);\n\n if ((this.fontOptions.minWdt > 0) && (state.width < this.fontOptions.minWdt)) {\n state.width = this.fontOptions.minWdt;\n }\n\n this.size.labelHeight =state.height;\n if ((this.fontOptions.minHgt > 0) && (state.height < this.fontOptions.minHgt)) {\n state.height = this.fontOptions.minHgt;\n }\n\n this.lines = state.lines;\n this.lineCount = state.lines.length;\n this.size.width = state.width;\n this.size.height = state.height;\n this.selectedState = selected;\n this.hoverState = hover;\n\n this.labelDirty = false;\n }\n\n\n /**\n * Check if this label is visible\n *\n * @return {boolean} true if this label will be show, false otherwise\n */\n visible() {\n if ((this.size.width === 0 || this.size.height === 0)\n || this.elementOptions.label === undefined) {\n return false; // nothing to display\n }\n\n let viewFontSize = this.fontOptions.size * this.body.view.scale;\n if (viewFontSize < this.elementOptions.scaling.label.drawThreshold - 1) {\n return false; // Too small or too far away to show\n }\n\n return true;\n }\n}\n\nexport default Label;\n","function _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nmodule.exports = _assertThisInitialized;","var _typeof = require(\"../helpers/typeof\");\n\nvar assertThisInitialized = require(\"./assertThisInitialized\");\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return assertThisInitialized(self);\n}\n\nmodule.exports = _possibleConstructorReturn;","function _getPrototypeOf(o) {\n module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nmodule.exports = _getPrototypeOf;","function _setPrototypeOf(o, p) {\n module.exports = _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nmodule.exports = _setPrototypeOf;","var setPrototypeOf = require(\"./setPrototypeOf\");\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) setPrototypeOf(subClass, superClass);\n}\n\nmodule.exports = _inherits;","/**\n * The Base class for all Nodes.\n */\nclass NodeBase {\n /**\n * @param {Object} options\n * @param {Object} body\n * @param {Label} labelModule\n */\n constructor(options, body, labelModule) {\n this.body = body;\n this.labelModule = labelModule;\n this.setOptions(options);\n this.top = undefined;\n this.left = undefined;\n this.height = undefined;\n this.width = undefined;\n this.radius = undefined;\n this.margin = undefined;\n this.refreshNeeded = true;\n this.boundingBox = {top: 0, left: 0, right: 0, bottom: 0};\n }\n\n /**\n *\n * @param {Object} options\n */\n setOptions(options) {\n this.options = options;\n }\n\n /**\n *\n * @param {Label} labelModule\n * @private\n */\n _setMargins(labelModule) {\n this.margin = {};\n if (this.options.margin) {\n if (typeof this.options.margin == 'object') {\n this.margin.top = this.options.margin.top;\n this.margin.right = this.options.margin.right;\n this.margin.bottom = this.options.margin.bottom;\n this.margin.left = this.options.margin.left;\n } else {\n this.margin.top = this.options.margin;\n this.margin.right = this.options.margin;\n this.margin.bottom = this.options.margin;\n this.margin.left = this.options.margin;\n }\n }\n labelModule.adjustSizes(this.margin)\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} angle\n * @returns {number}\n * @private\n */\n _distanceToBorder(ctx,angle) {\n var borderWidth = this.options.borderWidth;\n this.resize(ctx);\n return Math.min(\n Math.abs(this.width / 2 / Math.cos(angle)),\n Math.abs(this.height / 2 / Math.sin(angle))) + borderWidth;\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {ArrowOptions} values\n */\n enableShadow(ctx, values) {\n if (values.shadow) {\n ctx.shadowColor = values.shadowColor;\n ctx.shadowBlur = values.shadowSize;\n ctx.shadowOffsetX = values.shadowX;\n ctx.shadowOffsetY = values.shadowY;\n }\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {ArrowOptions} values\n */\n disableShadow(ctx, values) {\n if (values.shadow) {\n ctx.shadowColor = 'rgba(0,0,0,0)';\n ctx.shadowBlur = 0;\n ctx.shadowOffsetX = 0;\n ctx.shadowOffsetY = 0;\n }\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {ArrowOptions} values\n */\n enableBorderDashes(ctx, values) {\n if (values.borderDashes !== false) {\n if (ctx.setLineDash !== undefined) {\n let dashes = values.borderDashes;\n if (dashes === true) {\n dashes = [5,15]\n }\n ctx.setLineDash(dashes);\n }\n else {\n console.warn(\"setLineDash is not supported in this browser. The dashed borders cannot be used.\");\n this.options.shapeProperties.borderDashes = false;\n values.borderDashes = false;\n }\n }\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {ArrowOptions} values\n */\n disableBorderDashes(ctx, values) {\n if (values.borderDashes !== false) {\n if (ctx.setLineDash !== undefined) {\n ctx.setLineDash([0]);\n }\n else {\n console.warn(\"setLineDash is not supported in this browser. The dashed borders cannot be used.\");\n this.options.shapeProperties.borderDashes = false;\n values.borderDashes = false;\n }\n }\n }\n\n /**\n * Determine if the shape of a node needs to be recalculated.\n *\n * @param {boolean} selected\n * @param {boolean} hover\n * @returns {boolean}\n * @protected\n */\n needsRefresh(selected, hover) {\n if (this.refreshNeeded === true) {\n // This is probably not the best location to reset this member.\n // However, in the current logic, it is the most convenient one.\n this.refreshNeeded = false;\n return true;\n }\n\n return (this.width === undefined) || (this.labelModule.differentState(selected, hover));\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {ArrowOptions} values\n */\n initContextForDraw(ctx, values) {\n var borderWidth = values.borderWidth / this.body.view.scale;\n\n ctx.lineWidth = Math.min(this.width, borderWidth);\n ctx.strokeStyle = values.borderColor;\n ctx.fillStyle = values.color;\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {ArrowOptions} values\n */\n performStroke(ctx, values) {\n var borderWidth = values.borderWidth / this.body.view.scale;\n\n //draw dashed border if enabled, save and restore is required for firefox not to crash on unix.\n ctx.save();\n // if borders are zero width, they will be drawn with width 1 by default. This prevents that\n if (borderWidth > 0) {\n this.enableBorderDashes(ctx, values);\n //draw the border\n ctx.stroke();\n //disable dashed border for other elements\n this.disableBorderDashes(ctx, values);\n }\n ctx.restore();\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {ArrowOptions} values\n */\n performFill(ctx, values) {\n // draw shadow if enabled\n this.enableShadow(ctx, values);\n // draw the background\n ctx.fill();\n // disable shadows for other elements.\n this.disableShadow(ctx, values);\n\n this.performStroke(ctx, values);\n }\n\n\n /**\n *\n * @param {number} margin\n * @private\n */\n _addBoundingBoxMargin(margin) {\n this.boundingBox.left -= margin;\n this.boundingBox.top -= margin;\n this.boundingBox.bottom += margin;\n this.boundingBox.right += margin;\n }\n\n\n /**\n * Actual implementation of this method call.\n *\n * Doing it like this makes it easier to override\n * in the child classes.\n *\n * @param {number} x width\n * @param {number} y height\n * @param {CanvasRenderingContext2D} ctx\n * @param {boolean} selected\n * @param {boolean} hover\n * @private\n */\n _updateBoundingBox(x, y, ctx, selected, hover) {\n if (ctx !== undefined) {\n this.resize(ctx, selected, hover);\n }\n\n this.left = x - this.width / 2;\n this.top = y - this.height/ 2;\n\n this.boundingBox.left = this.left;\n this.boundingBox.top = this.top;\n this.boundingBox.bottom = this.top + this.height;\n this.boundingBox.right = this.left + this.width;\n }\n\n\n /**\n * Default implementation of this method call.\n * This acts as a stub which can be overridden.\n *\n * @param {number} x width\n * @param {number} y height\n * @param {CanvasRenderingContext2D} ctx\n * @param {boolean} selected\n * @param {boolean} hover\n */\n updateBoundingBox(x, y, ctx, selected, hover) {\n this._updateBoundingBox(x, y, ctx, selected, hover);\n }\n\n\n /**\n * Determine the dimensions to use for nodes with an internal label\n *\n * Currently, these are: Circle, Ellipse, Database, Box\n * The other nodes have external labels, and will not call this method\n *\n * If there is no label, decent default values are supplied.\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {boolean} [selected]\n * @param {boolean} [hover]\n * @returns {{width:number, height:number}}\n */\n getDimensionsFromLabel(ctx, selected, hover) {\n // NOTE: previously 'textSize' was not put in 'this' for Ellipse\n // TODO: examine the consequences.\n this.textSize = this.labelModule.getTextSize(ctx, selected, hover);\n var width = this.textSize.width;\n var height = this.textSize.height;\n\n const DEFAULT_SIZE = 14;\n if (width === 0) {\n // This happens when there is no label text set\n width = DEFAULT_SIZE; // use a decent default\n height = DEFAULT_SIZE; // if width zero, then height also always zero\n }\n\n return {width:width, height:height};\n }\n}\n\nexport default NodeBase;\n","'use strict';\n\nimport NodeBase from '../util/NodeBase'\n\n/**\n * A Box Node/Cluster shape.\n *\n * @extends NodeBase\n */\nclass Box extends NodeBase {\n /**\n * @param {Object} options\n * @param {Object} body\n * @param {Label} labelModule\n */\n constructor (options, body, labelModule) {\n super(options,body,labelModule);\n this._setMargins(labelModule);\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {boolean} [selected]\n * @param {boolean} [hover]\n */\n resize(ctx, selected = this.selected, hover = this.hover) {\n if (this.needsRefresh(selected, hover)) {\n var dimensions = this.getDimensionsFromLabel(ctx, selected, hover);\n\n this.width = dimensions.width + this.margin.right + this.margin.left;\n this.height = dimensions.height + this.margin.top + this.margin.bottom;\n this.radius = this.width / 2;\n }\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} x width\n * @param {number} y height\n * @param {boolean} selected\n * @param {boolean} hover\n * @param {ArrowOptions} values\n */\n draw(ctx, x, y, selected, hover, values) {\n this.resize(ctx, selected, hover);\n this.left = x - this.width / 2;\n this.top = y - this.height / 2;\n\n this.initContextForDraw(ctx, values);\n ctx.roundRect(this.left, this.top, this.width, this.height, values.borderRadius);\n this.performFill(ctx, values);\n\n this.updateBoundingBox(x, y, ctx, selected, hover);\n this.labelModule.draw(ctx, this.left + this.textSize.width / 2 + this.margin.left,\n this.top + this.textSize.height / 2 + this.margin.top, selected, hover);\n }\n\n /**\n *\n * @param {number} x width\n * @param {number} y height\n * @param {CanvasRenderingContext2D} ctx\n * @param {boolean} selected\n * @param {boolean} hover\n */\n updateBoundingBox(x, y, ctx, selected, hover) {\n this._updateBoundingBox(x, y, ctx, selected, hover);\n\n let borderRadius = this.options.shapeProperties.borderRadius; // only effective for box\n this._addBoundingBoxMargin(borderRadius);\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} angle\n * @returns {number}\n */\n distanceToBorder(ctx, angle) {\n this.resize(ctx);\n let borderWidth = this.options.borderWidth;\n\n return Math.min(\n Math.abs((this.width) / 2 / Math.cos(angle)),\n Math.abs((this.height) / 2 / Math.sin(angle))) + borderWidth;\n }\n}\n\nexport default Box;\n","import NodeBase from './NodeBase';\n\n/**\n * NOTE: This is a bad base class\n *\n * Child classes are:\n *\n * Image - uses *only* image methods\n * Circle - uses *only* _drawRawCircle\n * CircleImage - uses all\n *\n * TODO: Refactor, move _drawRawCircle to different module, derive Circle from NodeBase\n * Rename this to ImageBase\n * Consolidate common code in Image and CircleImage to base class\n *\n * @extends NodeBase\n */\nclass CircleImageBase extends NodeBase {\n /**\n * @param {Object} options\n * @param {Object} body\n * @param {Label} labelModule\n */\n constructor(options, body, labelModule) {\n super(options, body, labelModule);\n this.labelOffset = 0;\n this.selected = false;\n }\n\n /**\n *\n * @param {Object} options\n * @param {Object} [imageObj]\n * @param {Object} [imageObjAlt]\n */\n setOptions(options, imageObj, imageObjAlt) {\n this.options = options;\n\n if (!(imageObj === undefined && imageObjAlt === undefined)) {\n this.setImages(imageObj, imageObjAlt);\n }\n }\n\n\n /**\n * Set the images for this node.\n *\n * The images can be updated after the initial setting of options;\n * therefore, this method needs to be reentrant. \n *\n * For correct working in error cases, it is necessary to properly set\n * field 'nodes.brokenImage' in the options.\n *\n * @param {Image} imageObj required; main image to show for this node\n * @param {Image|undefined} imageObjAlt optional; image to show when node is selected\n */\n setImages(imageObj, imageObjAlt) {\n if (imageObjAlt && this.selected) {\n this.imageObj = imageObjAlt;\n this.imageObjAlt = imageObj;\n } else {\n this.imageObj = imageObj;\n this.imageObjAlt = imageObjAlt;\n }\n }\n\n /**\n * Set selection and switch between the base and the selected image.\n *\n * Do the switch only if imageObjAlt exists.\n *\n * @param {boolean} selected value of new selected state for current node\n */\n switchImages(selected) {\n var selection_changed = ((selected && !this.selected) || (!selected && this.selected));\n this.selected = selected; // Remember new selection\n\n if (this.imageObjAlt !== undefined && selection_changed) {\n let imageTmp = this.imageObj;\n this.imageObj = this.imageObjAlt;\n this.imageObjAlt = imageTmp;\n }\n }\n\n /**\n * Adjust the node dimensions for a loaded image.\n *\n * Pre: this.imageObj is valid\n */\n _resizeImage() {\n var width, height;\n\n if (this.options.shapeProperties.useImageSize === false) {\n // Use the size property\n var ratio_width = 1;\n var ratio_height = 1;\n\n // Only calculate the proper ratio if both width and height not zero\n if (this.imageObj.width && this.imageObj.height) {\n if (this.imageObj.width > this.imageObj.height) {\n ratio_width = this.imageObj.width / this.imageObj.height;\n }\n else {\n ratio_height = this.imageObj.height / this.imageObj.width;\n }\n }\n\n width = this.options.size * 2 * ratio_width;\n height = this.options.size * 2 * ratio_height;\n }\n else {\n // Use the image size\n width = this.imageObj.width;\n height = this.imageObj.height;\n }\n\n this.width = width;\n this.height = height;\n this.radius = 0.5 * this.width;\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} x width\n * @param {number} y height\n * @param {ArrowOptions} values\n * @private\n */\n _drawRawCircle(ctx, x, y, values) {\n this.initContextForDraw(ctx, values);\n ctx.circle(x, y, values.size);\n this.performFill(ctx, values);\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {ArrowOptions} values\n * @private\n */\n _drawImageAtPosition(ctx, values) {\n if (this.imageObj.width != 0) {\n // draw the image\n ctx.globalAlpha = 1.0;\n\n // draw shadow if enabled\n this.enableShadow(ctx, values);\n\n let factor = 1;\n if (this.options.shapeProperties.interpolation === true) {\n factor = (this.imageObj.width / this.width) / this.body.view.scale;\n }\n\n this.imageObj.drawImageAtPosition(ctx, factor, this.left, this.top, this.width, this.height);\n\n // disable shadows for other elements.\n this.disableShadow(ctx, values);\n }\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} x width\n * @param {number} y height\n * @param {boolean} selected\n * @param {boolean} hover\n * @private\n */\n _drawImageLabel(ctx, x, y, selected, hover) {\n var yLabel;\n var offset = 0;\n\n if (this.height !== undefined) {\n offset = this.height * 0.5;\n var labelDimensions = this.labelModule.getTextSize(ctx, selected, hover);\n if (labelDimensions.lineCount >= 1) {\n offset += labelDimensions.height / 2;\n }\n }\n\n yLabel = y + offset;\n\n if (this.options.label) {\n this.labelOffset = offset;\n }\n this.labelModule.draw(ctx, x, yLabel, selected, hover, 'hanging');\n }\n}\n\nexport default CircleImageBase;\n","'use strict';\n\nimport CircleImageBase from '../util/CircleImageBase'\n\n/**\n * A Circle Node/Cluster shape.\n *\n * @extends CircleImageBase\n */\nclass Circle extends CircleImageBase {\n /**\n * @param {Object} options\n * @param {Object} body\n * @param {Label} labelModule\n */\n constructor(options, body, labelModule) {\n super(options, body, labelModule);\n this._setMargins(labelModule);\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {boolean} [selected]\n * @param {boolean} [hover]\n */\n resize(ctx, selected = this.selected, hover = this.hover) {\n if (this.needsRefresh(selected, hover)) {\n var dimensions = this.getDimensionsFromLabel(ctx, selected, hover);\n\n var diameter = Math.max(dimensions.width + this.margin.right + this.margin.left,\n dimensions.height + this.margin.top + this.margin.bottom);\n\n this.options.size = diameter / 2; // NOTE: this size field only set here, not in Ellipse, Database, Box\n this.width = diameter;\n this.height = diameter;\n this.radius = this.width / 2;\n }\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} x width\n * @param {number} y height\n * @param {boolean} selected\n * @param {boolean} hover\n * @param {ArrowOptions} values\n */\n draw(ctx, x, y, selected, hover, values) {\n this.resize(ctx, selected, hover);\n this.left = x - this.width / 2;\n this.top = y - this.height / 2;\n\n this._drawRawCircle(ctx, x, y, values);\n\n this.updateBoundingBox(x,y);\n this.labelModule.draw(ctx, this.left + this.textSize.width / 2 + this.margin.left,\n y, selected, hover);\n }\n\n /**\n *\n * @param {number} x width\n * @param {number} y height\n */\n updateBoundingBox(x, y) {\n this.boundingBox.top = y - this.options.size;\n this.boundingBox.left = x - this.options.size;\n this.boundingBox.right = x + this.options.size;\n this.boundingBox.bottom = y + this.options.size;\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} angle - Unused\n * @returns {number}\n */\n distanceToBorder(ctx, angle) { // eslint-disable-line no-unused-vars\n this.resize(ctx);\n return this.width * 0.5;\n }\n}\n\nexport default Circle;\n","'use strict';\n\nimport CircleImageBase from '../util/CircleImageBase'\n\n/**\n * A CircularImage Node/Cluster shape.\n *\n * @extends CircleImageBase\n */\nclass CircularImage extends CircleImageBase {\n /**\n * @param {Object} options\n * @param {Object} body\n * @param {Label} labelModule\n * @param {Image} imageObj\n * @param {Image} imageObjAlt\n */\n constructor (options, body, labelModule, imageObj, imageObjAlt) {\n super(options, body, labelModule);\n\n this.setImages(imageObj, imageObjAlt);\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {boolean} [selected]\n * @param {boolean} [hover]\n */\n resize(ctx, selected = this.selected, hover = this.hover) {\n var imageAbsent = (this.imageObj.src === undefined) ||\n (this.imageObj.width === undefined) ||\n (this.imageObj.height === undefined);\n\n if (imageAbsent) {\n var diameter = this.options.size * 2;\n this.width = diameter;\n this.height = diameter;\n this.radius = 0.5*this.width;\n\t\t\treturn;\n }\n\n // At this point, an image is present, i.e. this.imageObj is valid.\n if (this.needsRefresh(selected, hover)) {\n this._resizeImage();\n }\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} x width\n * @param {number} y height\n * @param {boolean} selected\n * @param {boolean} hover\n * @param {ArrowOptions} values\n */\n draw(ctx, x, y, selected, hover, values) {\n this.switchImages(selected);\n this.resize();\n this.left = x - this.width / 2;\n this.top = y - this.height / 2;\n\n // draw the background circle. IMPORTANT: the stroke in this method is used by the clip method below.\n this._drawRawCircle(ctx, x, y, values);\n\n // now we draw in the circle, we save so we can revert the clip operation after drawing.\n ctx.save();\n // clip is used to use the stroke in drawRawCircle as an area that we can draw in.\n ctx.clip();\n // draw the image\n this._drawImageAtPosition(ctx, values);\n // restore so we can again draw on the full canvas\n ctx.restore();\n\n this._drawImageLabel(ctx, x, y, selected, hover);\n\n this.updateBoundingBox(x,y);\n }\n\n // TODO: compare with Circle.updateBoundingBox(), consolidate? More stuff is happening here\n /**\n *\n * @param {number} x width\n * @param {number} y height\n */\n updateBoundingBox(x,y) {\n this.boundingBox.top = y - this.options.size;\n this.boundingBox.left = x - this.options.size;\n this.boundingBox.right = x + this.options.size;\n this.boundingBox.bottom = y + this.options.size;\n\n // TODO: compare with Image.updateBoundingBox(), consolidate?\n this.boundingBox.left = Math.min(this.boundingBox.left, this.labelModule.size.left);\n this.boundingBox.right = Math.max(this.boundingBox.right, this.labelModule.size.left + this.labelModule.size.width);\n this.boundingBox.bottom = Math.max(this.boundingBox.bottom, this.boundingBox.bottom + this.labelOffset);\n }\n\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} angle - Unused\n * @returns {number}\n */\n distanceToBorder(ctx, angle) { // eslint-disable-line no-unused-vars\n this.resize(ctx);\n return this.width * 0.5;\n }\n}\n\nexport default CircularImage;\n","'use strict';\n\nimport NodeBase from '../util/NodeBase'\n\n/**\n * A Database Node/Cluster shape.\n *\n * @extends NodeBase\n */\nclass Database extends NodeBase {\n /**\n * @param {Object} options\n * @param {Object} body\n * @param {Label} labelModule\n */\n constructor (options, body, labelModule) {\n super(options, body, labelModule);\n this._setMargins(labelModule);\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {boolean} selected\n * @param {boolean} hover\n */\n resize(ctx, selected, hover) {\n if (this.needsRefresh(selected, hover)) {\n var dimensions = this.getDimensionsFromLabel(ctx, selected, hover);\n var size = dimensions.width + this.margin.right + this.margin.left;\n\n this.width = size;\n this.height = size;\n this.radius = this.width / 2;\n }\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} x width\n * @param {number} y height\n * @param {boolean} selected\n * @param {boolean} hover\n * @param {ArrowOptions} values\n */\n draw(ctx, x, y, selected, hover, values) {\n this.resize(ctx, selected, hover);\n this.left = x - this.width / 2;\n this.top = y - this.height / 2;\n\n this.initContextForDraw(ctx, values);\n ctx.database(x - this.width / 2, y - this.height / 2, this.width, this.height);\n this.performFill(ctx, values);\n\n this.updateBoundingBox(x, y, ctx, selected, hover);\n this.labelModule.draw(ctx, this.left + this.textSize.width / 2 + this.margin.left,\n this.top + this.textSize.height / 2 + this.margin.top, selected, hover);\n }\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} angle\n * @returns {number}\n */\n distanceToBorder(ctx, angle) {\n return this._distanceToBorder(ctx, angle);\n }\n}\n\nexport default Database;\n","import NodeBase from '../util/NodeBase'\n\n/**\n * Base class for constructing Node/Cluster Shapes.\n *\n * @extends NodeBase\n */\nclass ShapeBase extends NodeBase {\n /**\n * @param {Object} options\n * @param {Object} body\n * @param {Label} labelModule\n */\n constructor(options, body, labelModule) {\n super(options, body, labelModule)\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {boolean} [selected]\n * @param {boolean} [hover]\n * @param {Object} [values={size: this.options.size}]\n */\n resize(ctx, selected = this.selected, hover = this.hover, values = { size: this.options.size }) {\n if (this.needsRefresh(selected, hover)) {\n this.labelModule.getTextSize(ctx, selected, hover);\n var size = 2 * values.size;\n this.width = size;\n this.height = size;\n this.radius = 0.5*this.width;\n }\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {string} shape\n * @param {number} sizeMultiplier - Unused! TODO: Remove next major release\n * @param {number} x\n * @param {number} y\n * @param {boolean} selected\n * @param {boolean} hover\n * @param {ArrowOptions} values\n * @private\n */\n _drawShape(ctx, shape, sizeMultiplier, x, y, selected, hover, values) {\n this.resize(ctx, selected, hover, values);\n this.left = x - this.width / 2;\n this.top = y - this.height / 2;\n\n this.initContextForDraw(ctx, values);\n ctx[shape](x, y, values.size);\n this.performFill(ctx, values);\n \n if (this.options.icon !== undefined) {\n if (this.options.icon.code !== undefined) {\n ctx.font = (selected ? \"bold \" : \"\")\n + (this.height / 2) + \"px \"\n + (this.options.icon.face || 'FontAwesome');\n ctx.fillStyle = this.options.icon.color || \"black\";\n ctx.textAlign = \"center\";\n ctx.textBaseline = \"middle\";\n ctx.fillText(this.options.icon.code, x, y);\n }\n }\n\n if (this.options.label !== undefined) {\n // Need to call following here in order to ensure value for `this.labelModule.size.height`\n this.labelModule.calculateLabelSize(ctx, selected, hover, x, y, 'hanging')\n let yLabel = y + 0.5 * this.height + 0.5 * this.labelModule.size.height;\n this.labelModule.draw(ctx, x, yLabel, selected, hover, 'hanging');\n }\n\n this.updateBoundingBox(x,y);\n }\n\n /**\n *\n * @param {number} x\n * @param {number} y\n */\n updateBoundingBox(x, y) {\n this.boundingBox.top = y - this.options.size;\n this.boundingBox.left = x - this.options.size;\n this.boundingBox.right = x + this.options.size;\n this.boundingBox.bottom = y + this.options.size;\n\n if (this.options.label !== undefined && this.labelModule.size.width > 0) {\n this.boundingBox.left = Math.min(this.boundingBox.left, this.labelModule.size.left);\n this.boundingBox.right = Math.max(this.boundingBox.right, this.labelModule.size.left + this.labelModule.size.width);\n this.boundingBox.bottom = Math.max(this.boundingBox.bottom, this.boundingBox.bottom + this.labelModule.size.height);\n }\n }\n}\n\nexport default ShapeBase;\n","'use strict';\n\nimport ShapeBase from '../util/ShapeBase'\n\n/**\n * A Diamond Node/Cluster shape.\n *\n * @extends ShapeBase\n */\nclass Diamond extends ShapeBase {\n /**\n * @param {Object} options\n * @param {Object} body\n * @param {Label} labelModule\n */\n constructor(options, body, labelModule) {\n super(options, body, labelModule)\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} x width\n * @param {number} y height\n * @param {boolean} selected\n * @param {boolean} hover\n * @param {ArrowOptions} values\n */\n draw(ctx, x, y, selected, hover, values) {\n this._drawShape(ctx, 'diamond', 4, x, y, selected, hover, values);\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} angle\n * @returns {number}\n */\n distanceToBorder(ctx, angle) {\n return this._distanceToBorder(ctx,angle);\n }\n}\n\nexport default Diamond;\n","'use strict';\n\nimport ShapeBase from '../util/ShapeBase'\n\n/**\n * A Dot Node/Cluster shape.\n *\n * @extends ShapeBase\n */\nclass Dot extends ShapeBase {\n /**\n * @param {Object} options\n * @param {Object} body\n * @param {Label} labelModule\n */\n constructor(options, body, labelModule) {\n super(options, body, labelModule)\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} x width\n * @param {number} y height\n * @param {boolean} selected\n * @param {boolean} hover\n * @param {ArrowOptions} values\n */\n draw(ctx, x, y, selected, hover, values) {\n this._drawShape(ctx, 'circle', 2, x, y, selected, hover, values);\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} angle\n * @returns {number}\n */\n distanceToBorder(ctx, angle) { // eslint-disable-line no-unused-vars\n this.resize(ctx);\n return this.options.size;\n }\n}\n\nexport default Dot;\n","'use strict';\n\nimport NodeBase from '../util/NodeBase'\n\n/**\n * Am Ellipse Node/Cluster shape.\n *\n * @extends NodeBase\n */\nclass Ellipse extends NodeBase {\n /**\n * @param {Object} options\n * @param {Object} body\n * @param {Label} labelModule\n */\n constructor(options, body, labelModule) {\n super(options, body, labelModule);\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {boolean} [selected]\n * @param {boolean} [hover]\n */\n resize(ctx, selected = this.selected, hover = this.hover) {\n if (this.needsRefresh(selected, hover)) {\n var dimensions = this.getDimensionsFromLabel(ctx, selected, hover);\n\n this.height = dimensions.height * 2;\n this.width = dimensions.width + dimensions.height;\n this.radius = 0.5*this.width;\n }\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} x width\n * @param {number} y height\n * @param {boolean} selected\n * @param {boolean} hover\n * @param {ArrowOptions} values\n */\n draw(ctx, x, y, selected, hover, values) {\n this.resize(ctx, selected, hover);\n this.left = x - this.width * 0.5;\n this.top = y - this.height * 0.5;\n\n this.initContextForDraw(ctx, values);\n ctx.ellipse_vis(this.left, this.top, this.width, this.height);\n this.performFill(ctx, values);\n\n this.updateBoundingBox(x, y, ctx, selected, hover);\n this.labelModule.draw(ctx, x, y, selected, hover);\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} angle\n * @returns {number}\n */\n distanceToBorder(ctx, angle) {\n this.resize(ctx);\n var a = this.width * 0.5;\n var b = this.height * 0.5;\n var w = (Math.sin(angle) * a);\n var h = (Math.cos(angle) * b);\n return a * b / Math.sqrt(w * w + h * h);\n }\n}\n\nexport default Ellipse;\n","'use strict';\n\nimport NodeBase from '../util/NodeBase'\n\n/**\n * An icon replacement for the default Node shape.\n *\n * @extends NodeBase\n */\nclass Icon extends NodeBase {\n /**\n * @param {Object} options\n * @param {Object} body\n * @param {Label} labelModule\n */\n constructor(options, body, labelModule) {\n super(options, body, labelModule);\n this._setMargins(labelModule);\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx - Unused.\n * @param {boolean} [selected]\n * @param {boolean} [hover]\n */\n resize(ctx, selected, hover) {\n if (this.needsRefresh(selected, hover)) {\n this.iconSize = {\n width: Number(this.options.icon.size),\n height: Number(this.options.icon.size)\n };\n this.width = this.iconSize.width + this.margin.right + this.margin.left;\n this.height = this.iconSize.height + this.margin.top + this.margin.bottom;\n this.radius = 0.5*this.width;\n }\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} x width\n * @param {number} y height\n * @param {boolean} selected\n * @param {boolean} hover\n * @param {ArrowOptions} values\n */\n draw(ctx, x, y, selected, hover, values) {\n this.resize(ctx, selected, hover);\n this.options.icon.size = this.options.icon.size || 50;\n\n this.left = x - this.width / 2;\n this.top = y - this.height / 2;\n this._icon(ctx, x, y, selected, hover, values);\n\n if (this.options.label !== undefined) {\n var iconTextSpacing = 5;\n this.labelModule.draw(ctx, this.left + this.iconSize.width / 2 + this.margin.left,\n y + this.height / 2 + iconTextSpacing, selected);\n }\n\n this.updateBoundingBox(x, y)\n }\n\n /**\n *\n * @param {number} x\n * @param {number} y\n */\n updateBoundingBox(x, y) {\n this.boundingBox.top = y - this.options.icon.size * 0.5;\n this.boundingBox.left = x - this.options.icon.size * 0.5;\n this.boundingBox.right = x + this.options.icon.size * 0.5;\n this.boundingBox.bottom = y + this.options.icon.size * 0.5;\n\n if (this.options.label !== undefined && this.labelModule.size.width > 0) {\n var iconTextSpacing = 5;\n this.boundingBox.left = Math.min(this.boundingBox.left, this.labelModule.size.left);\n this.boundingBox.right = Math.max(this.boundingBox.right, this.labelModule.size.left + this.labelModule.size.width);\n this.boundingBox.bottom = Math.max(this.boundingBox.bottom, this.boundingBox.bottom + this.labelModule.size.height + iconTextSpacing);\n }\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} x width\n * @param {number} y height\n * @param {boolean} selected\n * @param {boolean} hover - Unused\n * @param {ArrowOptions} values\n */\n _icon(ctx, x, y, selected, hover, values) {\n let iconSize = Number(this.options.icon.size);\n\n if (this.options.icon.code !== undefined) {\n ctx.font = (selected ? \"bold \" : \"\") + iconSize + \"px \" + this.options.icon.face;\n\n // draw icon\n ctx.fillStyle = this.options.icon.color || \"black\";\n ctx.textAlign = \"center\";\n ctx.textBaseline = \"middle\";\n\n // draw shadow if enabled\n this.enableShadow(ctx, values);\n ctx.fillText(this.options.icon.code, x, y);\n\n // disable shadows for other elements.\n this.disableShadow(ctx, values);\n } else {\n console.error('When using the icon shape, you need to define the code in the icon options object. This can be done per node or globally.')\n }\n\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} angle\n * @returns {number}\n */\n distanceToBorder(ctx, angle) {\n return this._distanceToBorder(ctx,angle);\n }\n}\n\nexport default Icon;\n","'use strict';\n\nimport CircleImageBase from '../util/CircleImageBase'\n\n\n/**\n * An image-based replacement for the default Node shape.\n *\n * @extends CircleImageBase\n */\nclass Image extends CircleImageBase {\n /**\n * @param {Object} options\n * @param {Object} body\n * @param {Label} labelModule\n * @param {Image} imageObj\n * @param {Image} imageObjAlt\n */\n constructor (options, body, labelModule, imageObj, imageObjAlt) {\n super(options, body, labelModule);\n\n this.setImages(imageObj, imageObjAlt);\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx - Unused.\n * @param {boolean} [selected]\n * @param {boolean} [hover]\n */\n resize(ctx, selected = this.selected, hover = this.hover) {\n var imageAbsent = (this.imageObj.src === undefined) ||\n (this.imageObj.width === undefined) ||\n (this.imageObj.height === undefined);\n\n if (imageAbsent) {\n var side = this.options.size * 2;\n this.width = side;\n this.height = side;\n return;\n }\n\n if (this.needsRefresh(selected, hover)) {\n this._resizeImage();\n }\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} x width\n * @param {number} y height\n * @param {boolean} selected\n * @param {boolean} hover\n * @param {ArrowOptions} values\n */\n draw(ctx, x, y, selected, hover, values) {\n this.switchImages(selected);\n this.resize();\n this.left = x - this.width / 2;\n this.top = y - this.height / 2;\n\n if (this.options.shapeProperties.useBorderWithImage === true) {\n var neutralborderWidth = this.options.borderWidth;\n var selectionLineWidth = this.options.borderWidthSelected || 2 * this.options.borderWidth;\n var borderWidth = (selected ? selectionLineWidth : neutralborderWidth) / this.body.view.scale;\n ctx.lineWidth = Math.min(this.width, borderWidth);\n\n ctx.beginPath();\n\n // setup the line properties.\n ctx.strokeStyle = selected ? this.options.color.highlight.border : hover ? this.options.color.hover.border : this.options.color.border;\n\n // set a fillstyle\n ctx.fillStyle = selected ? this.options.color.highlight.background : hover ? this.options.color.hover.background : this.options.color.background;\n\n // draw a rectangle to form the border around. This rectangle is filled so the opacity of a picture (in future vis releases?) can be used to tint the image\n ctx.rect(this.left - 0.5 * ctx.lineWidth,\n this.top - 0.5 * ctx.lineWidth,\n this.width + ctx.lineWidth,\n this.height + ctx.lineWidth);\n ctx.fill();\n\n this.performStroke(ctx, values);\n \n ctx.closePath();\n }\n\n this._drawImageAtPosition(ctx, values);\n\n this._drawImageLabel(ctx, x, y, selected, hover);\n\n this.updateBoundingBox(x,y);\n }\n\n /**\n *\n * @param {number} x\n * @param {number} y\n */\n updateBoundingBox(x, y) {\n this.resize();\n this._updateBoundingBox(x, y);\n\n if (this.options.label !== undefined && this.labelModule.size.width > 0) {\n this.boundingBox.left = Math.min(this.boundingBox.left, this.labelModule.size.left);\n this.boundingBox.right = Math.max(this.boundingBox.right, this.labelModule.size.left + this.labelModule.size.width);\n this.boundingBox.bottom = Math.max(this.boundingBox.bottom, this.boundingBox.bottom + this.labelOffset);\n }\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} angle\n * @returns {number}\n */\n distanceToBorder(ctx, angle) {\n return this._distanceToBorder(ctx,angle);\n }\n}\n\nexport default Image;\n","'use strict';\n\nimport ShapeBase from '../util/ShapeBase'\n\n/**\n * A Square Node/Cluster shape.\n *\n * @extends ShapeBase\n */\nclass Square extends ShapeBase {\n /**\n * @param {Object} options\n * @param {Object} body\n * @param {Label} labelModule\n */\n constructor(options, body, labelModule) {\n super(options, body, labelModule)\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} x width\n * @param {number} y height\n * @param {boolean} selected\n * @param {boolean} hover\n * @param {ArrowOptions} values\n */\n draw(ctx, x, y, selected, hover, values) {\n this._drawShape(ctx, 'square', 2, x, y, selected, hover, values);\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} angle\n * @returns {number}\n */\n distanceToBorder(ctx, angle) {\n return this._distanceToBorder(ctx,angle);\n }\n}\n\nexport default Square;\n","'use strict';\n\nimport ShapeBase from '../util/ShapeBase'\n\n/**\n * A Hexagon Node/Cluster shape.\n *\n * @extends ShapeBase\n */\nclass Hexagon extends ShapeBase {\n /**\n * @param {Object} options\n * @param {Object} body\n * @param {Label} labelModule\n */\n constructor(options, body, labelModule) {\n super(options, body, labelModule)\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} x width\n * @param {number} y height\n * @param {boolean} selected\n * @param {boolean} hover\n * @param {ArrowOptions} values\n */\n draw(ctx, x, y, selected, hover, values) {\n this._drawShape(ctx, 'hexagon', 4, x, y, selected, hover, values);\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} angle\n * @returns {number}\n */\n distanceToBorder(ctx, angle) {\n return this._distanceToBorder(ctx,angle);\n }\n}\n\nexport default Hexagon;\n","'use strict';\n\nimport ShapeBase from '../util/ShapeBase'\n\n/**\n * A Star Node/Cluster shape.\n *\n * @extends ShapeBase\n */\nclass Star extends ShapeBase {\n /**\n * @param {Object} options\n * @param {Object} body\n * @param {Label} labelModule\n */\n constructor(options, body, labelModule) {\n super(options, body, labelModule)\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} x width\n * @param {number} y height\n * @param {boolean} selected\n * @param {boolean} hover\n * @param {ArrowOptions} values\n */\n draw(ctx, x, y, selected, hover, values) {\n this._drawShape(ctx, 'star', 4, x, y, selected, hover, values);\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} angle\n * @returns {number}\n */\n distanceToBorder(ctx, angle) {\n return this._distanceToBorder(ctx,angle);\n }\n}\n\nexport default Star;\n","'use strict';\n\nimport NodeBase from '../util/NodeBase'\n\n/**\n * A text-based replacement for the default Node shape.\n *\n * @extends NodeBase\n */\nclass Text extends NodeBase {\n /**\n * @param {Object} options\n * @param {Object} body\n * @param {Label} labelModule\n */\n constructor(options, body, labelModule) {\n super(options, body, labelModule);\n this._setMargins(labelModule);\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {boolean} selected\n * @param {boolean} hover\n */\n resize(ctx, selected, hover) {\n if (this.needsRefresh(selected, hover)) {\n this.textSize = this.labelModule.getTextSize(ctx, selected, hover);\n this.width = this.textSize.width + this.margin.right + this.margin.left;\n this.height = this.textSize.height + this.margin.top + this.margin.bottom;\n this.radius = 0.5*this.width;\n }\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} x width\n * @param {number} y height\n * @param {boolean} selected\n * @param {boolean} hover\n * @param {ArrowOptions} values\n */\n draw(ctx, x, y, selected, hover, values) {\n this.resize(ctx, selected, hover);\n this.left = x - this.width / 2;\n this.top = y - this.height / 2;\n\n // draw shadow if enabled\n this.enableShadow(ctx, values);\n this.labelModule.draw(ctx, this.left + this.textSize.width / 2 + this.margin.left,\n this.top + this.textSize.height / 2 + this.margin.top, selected, hover);\n\n // disable shadows for other elements.\n this.disableShadow(ctx, values);\n\n this.updateBoundingBox(x, y, ctx, selected, hover);\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} angle\n * @returns {number}\n */\n distanceToBorder(ctx, angle) {\n return this._distanceToBorder(ctx,angle);\n }\n}\n\nexport default Text;\n","'use strict';\n\nimport ShapeBase from '../util/ShapeBase'\n\n/**\n * A Triangle Node/Cluster shape.\n *\n * @extends ShapeBase\n */\nclass Triangle extends ShapeBase {\n /**\n * @param {Object} options\n * @param {Object} body\n * @param {Label} labelModule\n */\n constructor(options, body, labelModule) {\n super(options, body, labelModule)\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} x\n * @param {number} y\n * @param {boolean} selected\n * @param {boolean} hover\n * @param {ArrowOptions} values\n */\n draw(ctx, x, y, selected, hover, values) {\n this._drawShape(ctx, 'triangle', 3, x, y, selected, hover, values);\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} angle\n * @returns {number}\n */\n distanceToBorder(ctx, angle) {\n return this._distanceToBorder(ctx,angle);\n }\n}\n\nexport default Triangle;\n","'use strict';\n\nimport ShapeBase from '../util/ShapeBase'\n\n/**\n * A downward facing Triangle Node/Cluster shape.\n *\n * @extends ShapeBase\n */\nclass TriangleDown extends ShapeBase {\n /**\n * @param {Object} options\n * @param {Object} body\n * @param {Label} labelModule\n */\n constructor(options, body, labelModule) {\n super(options, body, labelModule)\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} x\n * @param {number} y\n * @param {boolean} selected\n * @param {boolean} hover\n * @param {ArrowOptions} values\n */\n draw(ctx, x, y, selected, hover, values) {\n this._drawShape(ctx, 'triangleDown', 3, x, y, selected, hover, values);\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} angle\n * @returns {number}\n */\n distanceToBorder(ctx, angle) {\n return this._distanceToBorder(ctx,angle);\n }\n}\n\nexport default TriangleDown;\n","import util from 'vis-util';\n\nlet errorFound = false;\nlet allOptions;\nlet printStyle = 'background: #FFeeee; color: #dd0000';\n/**\n * Used to validate options.\n */\nclass Validator {\n /**\n * @ignore\n */\n constructor() {\n }\n\n /**\n * Main function to be called\n * @param {Object} options\n * @param {Object} referenceOptions\n * @param {Object} subObject\n * @returns {boolean}\n * @static\n */\n static validate(options, referenceOptions, subObject) {\n errorFound = false;\n allOptions = referenceOptions;\n let usedOptions = referenceOptions;\n if (subObject !== undefined) {\n usedOptions = referenceOptions[subObject];\n }\n Validator.parse(options, usedOptions, []);\n return errorFound;\n }\n\n\n /**\n * Will traverse an object recursively and check every value\n * @param {Object} options\n * @param {Object} referenceOptions\n * @param {array} path | where to look for the actual option\n * @static\n */\n static parse(options, referenceOptions, path) {\n for (let option in options) {\n if (options.hasOwnProperty(option)) {\n Validator.check(option, options, referenceOptions, path);\n }\n }\n }\n\n\n /**\n * Check every value. If the value is an object, call the parse function on that object.\n * @param {string} option\n * @param {Object} options\n * @param {Object} referenceOptions\n * @param {array} path | where to look for the actual option\n * @static\n */\n static check(option, options, referenceOptions, path) {\n if (referenceOptions[option] === undefined && referenceOptions.__any__ === undefined) {\n Validator.getSuggestion(option, referenceOptions, path);\n return;\n }\n\n let referenceOption = option;\n let is_object = true;\n\n if (referenceOptions[option] === undefined && referenceOptions.__any__ !== undefined) {\n // NOTE: This only triggers if the __any__ is in the top level of the options object.\n // THAT'S A REALLY BAD PLACE TO ALLOW IT!!!!\n // TODO: Examine if needed, remove if possible\n\n // __any__ is a wildcard. Any value is accepted and will be further analysed by reference.\n referenceOption = '__any__';\n\n // if the any-subgroup is not a predefined object in the configurator,\n // we do not look deeper into the object.\n is_object = (Validator.getType(options[option]) === 'object');\n }\n else {\n // Since all options in the reference are objects, we can check whether \n // they are supposed to be the object to look for the __type__ field.\n // if this is an object, we check if the correct type has been supplied to account for shorthand options.\n }\n\n let refOptionObj = referenceOptions[referenceOption];\n if (is_object && refOptionObj.__type__ !== undefined) {\n refOptionObj = refOptionObj.__type__;\n }\n\n Validator.checkFields(option, options, referenceOptions, referenceOption, refOptionObj, path);\n }\n\n /**\n *\n * @param {string} option | the option property\n * @param {Object} options | The supplied options object\n * @param {Object} referenceOptions | The reference options containing all options and their allowed formats\n * @param {string} referenceOption | Usually this is the same as option, except when handling an __any__ tag.\n * @param {string} refOptionObj | This is the type object from the reference options\n * @param {Array} path | where in the object is the option\n * @static\n */\n static checkFields(option, options, referenceOptions, referenceOption, refOptionObj, path) {\n let log = function(message) {\n console.log('%c' + message + Validator.printLocation(path, option), printStyle);\n };\n\n let optionType = Validator.getType(options[option]);\n let refOptionType = refOptionObj[optionType];\n\n if (refOptionType !== undefined) {\n // if the type is correct, we check if it is supposed to be one of a few select values\n if (Validator.getType(refOptionType) === 'array' && refOptionType.indexOf(options[option]) === -1) {\n log('Invalid option detected in \"' + option + '\".' +\n ' Allowed values are:' + Validator.print(refOptionType) +\n ' not \"' + options[option] + '\". ');\n errorFound = true;\n }\n else if (optionType === 'object' && referenceOption !== \"__any__\") {\n path = util.copyAndExtendArray(path, option);\n Validator.parse(options[option], referenceOptions[referenceOption], path);\n }\n }\n else if (refOptionObj['any'] === undefined) {\n // type of the field is incorrect and the field cannot be any\n log('Invalid type received for \"' + option +\n '\". Expected: ' + Validator.print(Object.keys(refOptionObj)) +\n '. Received [' + optionType + '] \"' + options[option] + '\"');\n errorFound = true;\n }\n }\n\n /**\n *\n * @param {Object|boolean|number|string|Array.|Date|Node|Moment|undefined|null} object\n * @returns {string}\n * @static\n */\n static getType(object) {\n var type = typeof object;\n\n if (type === 'object') {\n if (object === null) {\n return 'null';\n }\n if (object instanceof Boolean) {\n return 'boolean';\n }\n if (object instanceof Number) {\n return 'number';\n }\n if (object instanceof String) {\n return 'string';\n }\n if (Array.isArray(object)) {\n return 'array';\n }\n if (object instanceof Date) {\n return 'date';\n }\n if (object.nodeType !== undefined) {\n return 'dom';\n }\n if (object._isAMomentObject === true) {\n return 'moment';\n }\n return 'object';\n }\n else if (type === 'number') {\n return 'number';\n }\n else if (type === 'boolean') {\n return 'boolean';\n }\n else if (type === 'string') {\n return 'string';\n }\n else if (type === undefined) {\n return 'undefined';\n }\n return type;\n }\n\n /**\n * @param {string} option\n * @param {Object} options\n * @param {Array.} path\n * @static\n */\n static getSuggestion(option, options, path) {\n let localSearch = Validator.findInOptions(option,options,path,false);\n let globalSearch = Validator.findInOptions(option,allOptions,[],true);\n\n let localSearchThreshold = 8;\n let globalSearchThreshold = 4;\n\n let msg;\n if (localSearch.indexMatch !== undefined) {\n msg = ' in ' + Validator.printLocation(localSearch.path, option,'') +\n 'Perhaps it was incomplete? Did you mean: \"' + localSearch.indexMatch + '\"?\\n\\n';\n }\n else if (globalSearch.distance <= globalSearchThreshold && localSearch.distance > globalSearch.distance) {\n msg = ' in ' + Validator.printLocation(localSearch.path, option,'') +\n 'Perhaps it was misplaced? Matching option found at: ' +\n Validator.printLocation(globalSearch.path, globalSearch.closestMatch,'');\n }\n else if (localSearch.distance <= localSearchThreshold) {\n msg = '. Did you mean \"' + localSearch.closestMatch + '\"?' +\n Validator.printLocation(localSearch.path, option);\n }\n else {\n msg = '. Did you mean one of these: ' + Validator.print(Object.keys(options)) +\n Validator.printLocation(path, option);\n }\n\n console.log('%cUnknown option detected: \"' + option + '\"' + msg, printStyle);\n errorFound = true;\n }\n\n /**\n * traverse the options in search for a match.\n * @param {string} option\n * @param {Object} options\n * @param {Array} path | where to look for the actual option\n * @param {boolean} [recursive=false]\n * @returns {{closestMatch: string, path: Array, distance: number}}\n * @static\n */\n static findInOptions(option, options, path, recursive = false) {\n let min = 1e9;\n let closestMatch = '';\n let closestMatchPath = [];\n let lowerCaseOption = option.toLowerCase();\n let indexMatch = undefined;\n for (let op in options) { // eslint-disable-line guard-for-in\n let distance;\n if (options[op].__type__ !== undefined && recursive === true) {\n let result = Validator.findInOptions(option, options[op], util.copyAndExtendArray(path,op));\n if (min > result.distance) {\n closestMatch = result.closestMatch;\n closestMatchPath = result.path;\n min = result.distance;\n indexMatch = result.indexMatch;\n }\n }\n else {\n if (op.toLowerCase().indexOf(lowerCaseOption) !== -1) {\n indexMatch = op;\n }\n distance = Validator.levenshteinDistance(option, op);\n if (min > distance) {\n closestMatch = op;\n closestMatchPath = util.copyArray(path);\n min = distance;\n }\n }\n }\n return {closestMatch:closestMatch, path:closestMatchPath, distance:min, indexMatch: indexMatch};\n }\n\n /**\n * @param {Array.} path\n * @param {Object} option\n * @param {string} prefix\n * @returns {String}\n * @static\n */\n static printLocation(path, option, prefix = 'Problem value found at: \\n') {\n let str = '\\n\\n' + prefix + 'options = {\\n';\n for (let i = 0; i < path.length; i++) {\n for (let j = 0; j < i + 1; j++) {\n str += ' ';\n }\n str += path[i] + ': {\\n'\n }\n for (let j = 0; j < path.length + 1; j++) {\n str += ' ';\n }\n str += option + '\\n';\n for (let i = 0; i < path.length + 1; i++) {\n for (let j = 0; j < path.length - i; j++) {\n str += ' ';\n }\n str += '}\\n'\n }\n return str + '\\n\\n';\n }\n\n /**\n * @param {Object} options\n * @returns {String}\n * @static\n */\n static print(options) {\n return JSON.stringify(options).replace(/(\\\")|(\\[)|(\\])|(,\"__type__\")/g, \"\").replace(/(\\,)/g, ', ')\n }\n\n\n /**\n * Compute the edit distance between the two given strings\n * http://en.wikibooks.org/wiki/Algorithm_Implementation/Strings/Levenshtein_distance#JavaScript\n *\n * Copyright (c) 2011 Andrei Mackenzie\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n *\n * @param {string} a\n * @param {string} b\n * @returns {Array.>}}\n * @static\n */\n static levenshteinDistance(a, b) {\n if (a.length === 0) return b.length;\n if (b.length === 0) return a.length;\n\n var matrix = [];\n\n // increment along the first column of each row\n var i;\n for (i = 0; i <= b.length; i++) {\n matrix[i] = [i];\n }\n\n // increment each column in the first row\n var j;\n for (j = 0; j <= a.length; j++) {\n matrix[0][j] = j;\n }\n\n // Fill in the rest of the matrix\n for (i = 1; i <= b.length; i++) {\n for (j = 1; j <= a.length; j++) {\n if (b.charAt(i - 1) == a.charAt(j - 1)) {\n matrix[i][j] = matrix[i - 1][j - 1];\n } else {\n matrix[i][j] = Math.min(matrix[i - 1][j - 1] + 1, // substitution\n Math.min(matrix[i][j - 1] + 1, // insertion\n matrix[i - 1][j] + 1)); // deletion\n }\n }\n }\n\n return matrix[b.length][a.length];\n }\n}\n\n\nexport {\n Validator,\n printStyle\n};\n","import util from 'vis-util';\n\nimport Label from './shared/Label';\nimport ComponentUtil from './shared/ComponentUtil';\nimport Box from './nodes/shapes/Box';\nimport Circle from './nodes/shapes/Circle';\nimport CircularImage from './nodes/shapes/CircularImage';\nimport Database from './nodes/shapes/Database';\nimport Diamond from './nodes/shapes/Diamond';\nimport Dot from './nodes/shapes/Dot';\nimport Ellipse from './nodes/shapes/Ellipse';\nimport Icon from './nodes/shapes/Icon';\nimport Image from './nodes/shapes/Image';\nimport Square from './nodes/shapes/Square';\nimport Hexagon from './nodes/shapes/Hexagon';\nimport Star from './nodes/shapes/Star';\nimport Text from './nodes/shapes/Text';\nimport Triangle from './nodes/shapes/Triangle';\nimport TriangleDown from './nodes/shapes/TriangleDown';\nimport { printStyle } from \"../../../shared/Validator\";\n\n\n/**\n * A node. A node can be connected to other nodes via one or multiple edges.\n */\nclass Node {\n /**\n *\n * @param {object} options An object containing options for the node. All\n * options are optional, except for the id.\n * {number} id Id of the node. Required\n * {string} label Text label for the node\n * {number} x Horizontal position of the node\n * {number} y Vertical position of the node\n * {string} shape Node shape\n * {string} image An image url\n * {string} title A title text, can be HTML\n * {anytype} group A group name or number\n *\n * @param {Object} body Shared state of current network instance\n * @param {Network.Images} imagelist A list with images. Only needed when the node has an image\n * @param {Groups} grouplist A list with groups. Needed for retrieving group options\n * @param {Object} globalOptions Current global node options; these serve as defaults for the node instance\n * @param {Object} defaultOptions Global default options for nodes; note that this is also the prototype\n * for parameter `globalOptions`.\n */\n constructor(options, body, imagelist, grouplist, globalOptions, defaultOptions) {\n this.options = util.bridgeObject(globalOptions);\n this.globalOptions = globalOptions;\n this.defaultOptions = defaultOptions;\n this.body = body;\n\n this.edges = []; // all edges connected to this node\n\n // set defaults for the options\n this.id = undefined;\n this.imagelist = imagelist;\n this.grouplist = grouplist;\n\n // state options\n this.x = undefined;\n this.y = undefined;\n this.baseSize = this.options.size;\n this.baseFontSize = this.options.font.size;\n this.predefinedPosition = false; // used to check if initial fit should just take the range or approximate\n this.selected = false;\n this.hover = false;\n\n this.labelModule = new Label(this.body, this.options, false /* Not edge label */);\n this.setOptions(options);\n }\n\n\n /**\n * Attach a edge to the node\n * @param {Edge} edge\n */\n attachEdge(edge) {\n if (this.edges.indexOf(edge) === -1) {\n this.edges.push(edge);\n }\n }\n\n\n /**\n * Detach a edge from the node\n *\n * @param {Edge} edge\n */\n detachEdge(edge) {\n var index = this.edges.indexOf(edge);\n if (index != -1) {\n this.edges.splice(index, 1);\n }\n }\n\n\n /**\n * Set or overwrite options for the node\n *\n * @param {Object} options an object with options\n * @returns {null|boolean}\n */\n setOptions(options) {\n let currentShape = this.options.shape;\n if (!options) {\n return; // Note that the return value will be 'undefined'! This is OK.\n }\n\n // basic options\n if (options.id !== undefined) {this.id = options.id;}\n\n if (this.id === undefined) {\n throw new Error(\"Node must have an id\");\n }\n\n Node.checkMass(options, this.id);\n\n // set these options locally\n // clear x and y positions\n if (options.x !== undefined) {\n if (options.x === null) {this.x = undefined; this.predefinedPosition = false;}\n else {this.x = parseInt(options.x); this.predefinedPosition = true;}\n }\n if (options.y !== undefined) {\n if (options.y === null) {this.y = undefined; this.predefinedPosition = false;}\n else {this.y = parseInt(options.y); this.predefinedPosition = true;}\n }\n if (options.size !== undefined) {this.baseSize = options.size;}\n if (options.value !== undefined) {options.value = parseFloat(options.value);}\n\n // this transforms all shorthands into fully defined options\n Node.parseOptions(this.options, options, true, this.globalOptions, this.grouplist);\n\n let pile = [options, this.options, this.defaultOptions];\n this.chooser = ComponentUtil.choosify('node', pile);\n\n this._load_images();\n this.updateLabelModule(options);\n this.updateShape(currentShape);\n\n return (options.hidden !== undefined || options.physics !== undefined);\n }\n\n\n /**\n * Load the images from the options, for the nodes that need them.\n *\n * Images are always loaded, even if they are not used in the current shape.\n * The user may switch to an image shape later on.\n *\n * @private\n */\n _load_images() {\n if (this.options.shape === 'circularImage' || this.options.shape === 'image') {\n if (this.options.image === undefined) {\n throw new Error(\"Option image must be defined for node type '\" + this.options.shape + \"'\");\n }\n }\n\n if (this.options.image === undefined) {\n return;\n }\n\n if (this.imagelist === undefined) {\n throw new Error(\"Internal Error: No images provided\");\n }\n\n if (typeof this.options.image === 'string') {\n this.imageObj = this.imagelist.load(this.options.image, this.options.brokenImage, this.id);\n } else {\n if (this.options.image.unselected === undefined) {\n throw new Error(\"No unselected image provided\");\n }\n\n this.imageObj = this.imagelist.load(this.options.image.unselected, this.options.brokenImage, this.id);\n\n if (this.options.image.selected !== undefined) {\n this.imageObjAlt = this.imagelist.load(this.options.image.selected, this.options.brokenImage, this.id);\n } else {\n this.imageObjAlt = undefined;\n }\n }\n }\n\n\n /**\n * Copy group option values into the node options.\n *\n * The group options override the global node options, so the copy of group options\n * must happen *after* the global node options have been set.\n *\n * This method must also be called also if the global node options have changed and the group options did not.\n *\n * @param {Object} parentOptions\n * @param {Object} newOptions new values for the options, currently only passed in for check\n * @param {Object} groupList\n */\n static updateGroupOptions(parentOptions, newOptions, groupList) {\n if (groupList === undefined) return; // No groups, nothing to do\n\n var group = parentOptions.group;\n\n // paranoia: the selected group is already merged into node options, check.\n if (newOptions !== undefined && newOptions.group !== undefined && group !== newOptions.group) {\n throw new Error(\"updateGroupOptions: group values in options don't match.\");\n }\n\n var hasGroup = (typeof group === 'number' || (typeof group === 'string' && group != ''));\n if (!hasGroup) return; // current node has no group, no need to merge\n\n var groupObj = groupList.get(group);\n\n // Skip merging of group font options into parent; these are required to be distinct for labels\n // Also skip mergin of color IF it is already defined in the node itself. This is to avoid the color of the\n // group overriding the color set at the node level\n // TODO: It might not be a good idea either to merge the rest of the options, investigate this.\n var skipProperties = ['font'];\n if (newOptions !== undefined && newOptions.color !== undefined && newOptions.color != null) skipProperties.push('color');\n util.selectiveNotDeepExtend(skipProperties, parentOptions, groupObj);\n\n // the color object needs to be completely defined.\n // Since groups can partially overwrite the colors, we parse it again, just in case.\n parentOptions.color = util.parseColor(parentOptions.color);\n }\n\n\n /**\n * This process all possible shorthands in the new options and makes sure that the parentOptions are fully defined.\n * Static so it can also be used by the handler.\n *\n * @param {Object} parentOptions\n * @param {Object} newOptions\n * @param {boolean} [allowDeletion=false]\n * @param {Object} [globalOptions={}]\n * @param {Object} [groupList]\n * @static\n */\n static parseOptions(parentOptions, newOptions, allowDeletion = false, globalOptions = {}, groupList) {\n\n var fields = [\n 'color',\n 'fixed',\n 'shadow'\n ];\n util.selectiveNotDeepExtend(fields, parentOptions, newOptions, allowDeletion);\n\n Node.checkMass(newOptions);\n\n // merge the shadow options into the parent.\n util.mergeOptions(parentOptions, newOptions, 'shadow', globalOptions);\n\n // individual shape newOptions\n if (newOptions.color !== undefined && newOptions.color !== null) {\n let parsedColor = util.parseColor(newOptions.color);\n util.fillIfDefined(parentOptions.color, parsedColor);\n }\n else if (allowDeletion === true && newOptions.color === null) {\n parentOptions.color = util.bridgeObject(globalOptions.color); // set the object back to the global options\n }\n\n // handle the fixed options\n if (newOptions.fixed !== undefined && newOptions.fixed !== null) {\n if (typeof newOptions.fixed === 'boolean') {\n parentOptions.fixed.x = newOptions.fixed;\n parentOptions.fixed.y = newOptions.fixed;\n }\n else {\n if (newOptions.fixed.x !== undefined && typeof newOptions.fixed.x === 'boolean') {\n parentOptions.fixed.x = newOptions.fixed.x;\n }\n if (newOptions.fixed.y !== undefined && typeof newOptions.fixed.y === 'boolean') {\n parentOptions.fixed.y = newOptions.fixed.y;\n }\n }\n }\n\n if (allowDeletion === true && newOptions.font === null) {\n parentOptions.font = util.bridgeObject(globalOptions.font); // set the object back to the global options\n }\n\n Node.updateGroupOptions(parentOptions, newOptions, groupList);\n\n // handle the scaling options, specifically the label part\n if (newOptions.scaling !== undefined) {\n util.mergeOptions(parentOptions.scaling, newOptions.scaling, 'label', globalOptions.scaling);\n }\n }\n\n\n /**\n *\n * @returns {{color: *, borderWidth: *, borderColor: *, size: *, borderDashes: (boolean|Array|allOptions.nodes.shapeProperties.borderDashes|{boolean, array}), borderRadius: (number|allOptions.nodes.shapeProperties.borderRadius|{number}|Array), shadow: *, shadowColor: *, shadowSize: *, shadowX: *, shadowY: *}}\n */\n getFormattingValues() {\n let values = {\n color: this.options.color.background,\n borderWidth: this.options.borderWidth,\n borderColor: this.options.color.border,\n size: this.options.size,\n borderDashes: this.options.shapeProperties.borderDashes,\n borderRadius: this.options.shapeProperties.borderRadius,\n shadow: this.options.shadow.enabled,\n shadowColor: this.options.shadow.color,\n shadowSize: this.options.shadow.size,\n shadowX: this.options.shadow.x,\n shadowY: this.options.shadow.y\n };\n if (this.selected || this.hover) {\n if (this.chooser === true) {\n if (this.selected) {\n values.borderWidth *= 2;\n values.color = this.options.color.highlight.background;\n values.borderColor = this.options.color.highlight.border;\n values.shadow = this.options.shadow.enabled;\n } else if (this.hover) {\n values.color = this.options.color.hover.background;\n values.borderColor = this.options.color.hover.border;\n values.shadow = this.options.shadow.enabled;\n }\n } else if (typeof this.chooser === 'function') {\n this.chooser(values, this.options.id, this.selected, this.hover);\n if (values.shadow === false) {\n if ((values.shadowColor !== this.options.shadow.color) ||\n (values.shadowSize !== this.options.shadow.size) ||\n (values.shadowX !== this.options.shadow.x) ||\n (values.shadowY !== this.options.shadow.y)) {\n values.shadow = true;\n }\n }\n }\n } else {\n values.shadow = this.options.shadow.enabled;\n }\n return values;\n }\n\n\n /**\n *\n * @param {Object} options\n */\n updateLabelModule(options) {\n if (this.options.label === undefined || this.options.label === null) {\n this.options.label = '';\n }\n\n Node.updateGroupOptions(this.options, options, this.grouplist);\n\n //\n // Note:The prototype chain for this.options is:\n //\n // this.options -> NodesHandler.options -> NodesHandler.defaultOptions\n // (also: this.globalOptions)\n //\n // Note that the prototypes are mentioned explicitly in the pile list below;\n // WE DON'T WANT THE ORDER OF THE PROTOTYPES!!!! At least, not for font handling of labels.\n // This is a good indication that the prototype usage of options is deficient.\n //\n var currentGroup = this.grouplist.get(this.options.group, false);\n let pile = [\n options, // new options\n this.options, // current node options, see comment above for prototype\n currentGroup, // group options, if any\n this.globalOptions, // Currently set global node options\n this.defaultOptions // Default global node options\n ];\n this.labelModule.update(this.options, pile);\n\n if (this.labelModule.baseSize !== undefined) {\n this.baseFontSize = this.labelModule.baseSize;\n }\n }\n\n\n /**\n *\n * @param {string} currentShape\n */\n updateShape(currentShape) {\n if (currentShape === this.options.shape && this.shape) {\n this.shape.setOptions(this.options, this.imageObj, this.imageObjAlt);\n }\n else {\n // choose draw method depending on the shape\n switch (this.options.shape) {\n case 'box':\n this.shape = new Box(this.options, this.body, this.labelModule);\n break;\n case 'circle':\n this.shape = new Circle(this.options, this.body, this.labelModule);\n break;\n case 'circularImage':\n this.shape = new CircularImage(this.options, this.body, this.labelModule, this.imageObj, this.imageObjAlt);\n break;\n case 'database':\n this.shape = new Database(this.options, this.body, this.labelModule);\n break;\n case 'diamond':\n this.shape = new Diamond(this.options, this.body, this.labelModule);\n break;\n case 'dot':\n this.shape = new Dot(this.options, this.body, this.labelModule);\n break;\n case 'ellipse':\n this.shape = new Ellipse(this.options, this.body, this.labelModule);\n break;\n case 'icon':\n this.shape = new Icon(this.options, this.body, this.labelModule);\n break;\n case 'image':\n this.shape = new Image(this.options, this.body, this.labelModule, this.imageObj, this.imageObjAlt);\n break;\n case 'square':\n this.shape = new Square(this.options, this.body, this.labelModule);\n break;\n case 'hexagon':\n this.shape = new Hexagon(this.options, this.body, this.labelModule);\n break;\n case 'star':\n this.shape = new Star(this.options, this.body, this.labelModule);\n break;\n case 'text':\n this.shape = new Text(this.options, this.body, this.labelModule);\n break;\n case 'triangle':\n this.shape = new Triangle(this.options, this.body, this.labelModule);\n break;\n case 'triangleDown':\n this.shape = new TriangleDown(this.options, this.body, this.labelModule);\n break;\n default:\n this.shape = new Ellipse(this.options, this.body, this.labelModule);\n break;\n }\n }\n this.needsRefresh();\n }\n\n\n /**\n * select this node\n */\n select() {\n this.selected = true;\n this.needsRefresh();\n }\n\n\n /**\n * unselect this node\n */\n unselect() {\n this.selected = false;\n this.needsRefresh();\n }\n\n\n\n /**\n * Reset the calculated size of the node, forces it to recalculate its size\n */\n needsRefresh() {\n this.shape.refreshNeeded = true;\n }\n\n\n /**\n * get the title of this node.\n * @return {string} title The title of the node, or undefined when no title\n * has been set.\n */\n getTitle() {\n return this.options.title;\n }\n\n\n /**\n * Calculate the distance to the border of the Node\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} angle Angle in radians\n * @returns {number} distance Distance to the border in pixels\n */\n distanceToBorder(ctx, angle) {\n return this.shape.distanceToBorder(ctx,angle);\n }\n\n\n /**\n * Check if this node has a fixed x and y position\n * @return {boolean} true if fixed, false if not\n */\n isFixed() {\n return (this.options.fixed.x && this.options.fixed.y);\n }\n\n\n /**\n * check if this node is selecte\n * @return {boolean} selected True if node is selected, else false\n */\n isSelected() {\n return this.selected;\n }\n\n\n /**\n * Retrieve the value of the node. Can be undefined\n * @return {number} value\n */\n getValue() {\n return this.options.value;\n }\n\n\n /**\n * Get the current dimensions of the label\n *\n * @return {rect}\n */\n getLabelSize() {\n return this.labelModule.size();\n }\n\n\n /**\n * Adjust the value range of the node. The node will adjust it's size\n * based on its value.\n * @param {number} min\n * @param {number} max\n * @param {number} total\n */\n setValueRange(min, max, total) {\n if (this.options.value !== undefined) {\n var scale = this.options.scaling.customScalingFunction(min, max, total, this.options.value);\n var sizeDiff = this.options.scaling.max - this.options.scaling.min;\n if (this.options.scaling.label.enabled === true) {\n var fontDiff = this.options.scaling.label.max - this.options.scaling.label.min;\n this.options.font.size = this.options.scaling.label.min + scale * fontDiff;\n }\n this.options.size = this.options.scaling.min + scale * sizeDiff;\n }\n else {\n this.options.size = this.baseSize;\n this.options.font.size = this.baseFontSize;\n }\n\n this.updateLabelModule();\n }\n\n\n /**\n * Draw this node in the given canvas\n * The 2d context of a HTML canvas can be retrieved by canvas.getContext(\"2d\");\n * @param {CanvasRenderingContext2D} ctx\n */\n draw(ctx) {\n let values = this.getFormattingValues();\n this.shape.draw(ctx, this.x, this.y, this.selected, this.hover, values);\n }\n\n\n /**\n * Update the bounding box of the shape\n * @param {CanvasRenderingContext2D} ctx\n */\n updateBoundingBox(ctx) {\n this.shape.updateBoundingBox(this.x,this.y,ctx);\n }\n\n\n /**\n * Recalculate the size of this node in the given canvas\n * The 2d context of a HTML canvas can be retrieved by canvas.getContext(\"2d\");\n * @param {CanvasRenderingContext2D} ctx\n */\n resize(ctx) {\n let values = this.getFormattingValues();\n this.shape.resize(ctx, this.selected, this.hover, values);\n }\n\n\n /**\n * Determine all visual elements of this node instance, in which the given\n * point falls within the bounding shape.\n *\n * @param {point} point\n * @returns {Array.} list with the items which are on the point\n */\n getItemsOnPoint(point) {\n var ret = [];\n\n if (this.labelModule.visible()) {\n if (ComponentUtil.pointInRect(this.labelModule.getSize(), point)) {\n ret.push({nodeId:this.id, labelId:0});\n }\n }\n\n if (ComponentUtil.pointInRect(this.shape.boundingBox, point)) {\n ret.push({nodeId:this.id});\n }\n\n return ret;\n }\n\n\n /**\n * Check if this object is overlapping with the provided object\n * @param {Object} obj an object with parameters left, top, right, bottom\n * @return {boolean} True if location is located on node\n */\n isOverlappingWith(obj) {\n return (\n this.shape.left < obj.right &&\n this.shape.left + this.shape.width > obj.left &&\n this.shape.top < obj.bottom &&\n this.shape.top + this.shape.height > obj.top\n );\n }\n\n\n /**\n * Check if this object is overlapping with the provided object\n * @param {Object} obj an object with parameters left, top, right, bottom\n * @return {boolean} True if location is located on node\n */\n isBoundingBoxOverlappingWith(obj) {\n return (\n this.shape.boundingBox.left < obj.right &&\n this.shape.boundingBox.right > obj.left &&\n this.shape.boundingBox.top < obj.bottom &&\n this.shape.boundingBox.bottom > obj.top\n );\n }\n\n\n /**\n * Check valid values for mass\n *\n * The mass may not be negative or zero. If it is, reset to 1\n *\n * @param {object} options\n * @param {Node.id} id\n * @static\n */\n static checkMass(options, id) {\n if (options.mass !== undefined && options.mass <= 0) {\n let strId = '';\n if (id !== undefined) {\n strId = ' in node id: ' + id;\n }\n console.log('%cNegative or zero mass disallowed' + strId +\n ', setting mass to 1.' , printStyle);\n options.mass = 1;\n }\n }\n}\n\nexport default Node;\n","import util from 'vis-util';\nimport { DataSet, DataView } from 'vis-data';\nimport Node from \"./components/Node\";\n\n/**\n * Handler for Nodes\n */\nclass NodesHandler {\n /**\n * @param {Object} body\n * @param {Images} images\n * @param {Array.} groups\n * @param {LayoutEngine} layoutEngine\n */\n constructor(body, images, groups, layoutEngine) {\n this.body = body;\n this.images = images;\n this.groups = groups;\n this.layoutEngine = layoutEngine;\n\n // create the node API in the body container\n this.body.functions.createNode = this.create.bind(this);\n\n this.nodesListeners = {\n add: (event, params) => { this.add(params.items); },\n update: (event, params) => { this.update(params.items, params.data, params.oldData); },\n remove: (event, params) => { this.remove(params.items); }\n };\n\n this.defaultOptions = {\n borderWidth: 1,\n borderWidthSelected: 2,\n brokenImage: undefined,\n color: {\n border: '#2B7CE9',\n background: '#97C2FC',\n highlight: {\n border: '#2B7CE9',\n background: '#D2E5FF'\n },\n hover: {\n border: '#2B7CE9',\n background: '#D2E5FF'\n }\n },\n fixed: {\n x: false,\n y: false\n },\n font: {\n color: '#343434',\n size: 14, // px\n face: 'arial',\n background: 'none',\n strokeWidth: 0, // px\n strokeColor: '#ffffff',\n align: 'center',\n vadjust: 0,\n multi: false,\n bold: {\n mod: 'bold'\n },\n boldital: {\n mod: 'bold italic'\n },\n ital: {\n mod: 'italic'\n },\n mono: {\n mod: '',\n size: 15, // px\n face: 'monospace',\n vadjust: 2\n }\n },\n group: undefined,\n hidden: false,\n icon: {\n face: 'FontAwesome', //'FontAwesome',\n code: undefined, //'\\uf007',\n size: 50, //50,\n color: '#2B7CE9' //'#aa00ff'\n },\n image: undefined, // --> URL\n label: undefined,\n labelHighlightBold: true,\n level: undefined,\n margin: {\n top: 5,\n right: 5,\n bottom: 5,\n left: 5\n },\n mass: 1,\n physics: true,\n scaling: {\n min: 10,\n max: 30,\n label: {\n enabled: false,\n min: 14,\n max: 30,\n maxVisible: 30,\n drawThreshold: 5\n },\n customScalingFunction: function (min, max, total, value) {\n if (max === min) {\n return 0.5;\n }\n else {\n let scale = 1 / (max - min);\n return Math.max(0, (value - min) * scale);\n }\n }\n },\n shadow: {\n enabled: false,\n color: 'rgba(0,0,0,0.5)',\n size: 10,\n x: 5,\n y: 5\n },\n shape: 'ellipse',\n shapeProperties: {\n borderDashes: false, // only for borders\n borderRadius: 6, // only for box shape\n interpolation: true, // only for image and circularImage shapes\n useImageSize: false, // only for image and circularImage shapes\n useBorderWithImage: false // only for image shape\n },\n size: 25,\n title: undefined,\n value: undefined,\n x: undefined,\n y: undefined\n };\n\n // Protect from idiocy\n if (this.defaultOptions.mass <= 0) {\n throw 'Internal error: mass in defaultOptions of NodesHandler may not be zero or negative';\n }\n\n this.options = util.bridgeObject(this.defaultOptions);\n\n this.bindEventListeners();\n }\n\n /**\n * Binds event listeners\n */\n bindEventListeners() {\n // refresh the nodes. Used when reverting from hierarchical layout\n this.body.emitter.on('refreshNodes', this.refresh.bind(this));\n this.body.emitter.on('refresh', this.refresh.bind(this));\n this.body.emitter.on('destroy', () => {\n util.forEach(this.nodesListeners, (callback, event) => {\n if (this.body.data.nodes)\n this.body.data.nodes.off(event, callback);\n });\n delete this.body.functions.createNode;\n delete this.nodesListeners.add;\n delete this.nodesListeners.update;\n delete this.nodesListeners.remove;\n delete this.nodesListeners;\n });\n }\n\n /**\n *\n * @param {Object} options\n */\n setOptions(options) {\n if (options !== undefined) {\n Node.parseOptions(this.options, options);\n\n // update the shape in all nodes\n if (options.shape !== undefined) {\n for (let nodeId in this.body.nodes) {\n if (this.body.nodes.hasOwnProperty(nodeId)) {\n this.body.nodes[nodeId].updateShape();\n }\n }\n }\n\n // update the font in all nodes\n if (options.font !== undefined) {\n for (let nodeId in this.body.nodes) {\n if (this.body.nodes.hasOwnProperty(nodeId)) {\n this.body.nodes[nodeId].updateLabelModule();\n this.body.nodes[nodeId].needsRefresh();\n }\n }\n }\n\n // update the shape size in all nodes\n if (options.size !== undefined) {\n for (let nodeId in this.body.nodes) {\n if (this.body.nodes.hasOwnProperty(nodeId)) {\n this.body.nodes[nodeId].needsRefresh();\n }\n }\n }\n\n // update the state of the variables if needed\n if (options.hidden !== undefined || options.physics !== undefined) {\n this.body.emitter.emit('_dataChanged');\n }\n }\n }\n\n /**\n * Set a data set with nodes for the network\n * @param {Array | DataSet | DataView} nodes The data containing the nodes.\n * @param {boolean} [doNotEmit=false]\n * @private\n */\n setData(nodes, doNotEmit = false) {\n let oldNodesData = this.body.data.nodes;\n\n if (nodes instanceof DataSet || nodes instanceof DataView) {\n this.body.data.nodes = nodes;\n }\n else if (Array.isArray(nodes)) {\n this.body.data.nodes = new DataSet();\n this.body.data.nodes.add(nodes);\n }\n else if (!nodes) {\n this.body.data.nodes = new DataSet();\n }\n else {\n throw new TypeError('Array or DataSet expected');\n }\n\n if (oldNodesData) {\n // unsubscribe from old dataset\n util.forEach(this.nodesListeners, function (callback, event) {\n oldNodesData.off(event, callback);\n });\n }\n\n // remove drawn nodes\n this.body.nodes = {};\n\n if (this.body.data.nodes) {\n // subscribe to new dataset\n let me = this;\n util.forEach(this.nodesListeners, function (callback, event) {\n me.body.data.nodes.on(event, callback);\n });\n\n // draw all new nodes\n let ids = this.body.data.nodes.getIds();\n this.add(ids, true);\n }\n\n if (doNotEmit === false) {\n this.body.emitter.emit(\"_dataChanged\");\n }\n }\n\n\n /**\n * Add nodes\n * @param {number[] | string[]} ids\n * @param {boolean} [doNotEmit=false]\n * @private\n */\n add(ids, doNotEmit = false) {\n let id;\n let newNodes = [];\n for (let i = 0; i < ids.length; i++) {\n id = ids[i];\n let properties = this.body.data.nodes.get(id);\n let node = this.create(properties);\n newNodes.push(node);\n this.body.nodes[id] = node; // note: this may replace an existing node\n }\n\n this.layoutEngine.positionInitially(newNodes);\n\n if (doNotEmit === false) {\n this.body.emitter.emit(\"_dataChanged\");\n }\n }\n\n /**\n * Update existing nodes, or create them when not yet existing\n * @param {number[] | string[]} ids id's of changed nodes\n * @param {Array} changedData array with changed data\n * @param {Array|undefined} oldData optional; array with previous data\n * @private\n */\n update(ids, changedData, oldData) {\n let nodes = this.body.nodes;\n let dataChanged = false;\n for (let i = 0; i < ids.length; i++) {\n let id = ids[i];\n let node = nodes[id];\n let data = changedData[i];\n if (node !== undefined) {\n // update node\n if (node.setOptions(data)) {\n dataChanged = true;\n }\n }\n else {\n dataChanged = true;\n // create node\n node = this.create(data);\n nodes[id] = node;\n }\n }\n\n if (!dataChanged && oldData !== undefined) {\n // Check for any changes which should trigger a layout recalculation\n // For now, this is just 'level' for hierarchical layout\n // Assumption: old and new data arranged in same order; at time of writing, this holds.\n dataChanged = changedData.some(function(newValue, index) {\n let oldValue = oldData[index];\n return (oldValue && oldValue.level !== newValue.level);\n });\n }\n\n if (dataChanged === true) {\n this.body.emitter.emit(\"_dataChanged\");\n }\n else {\n this.body.emitter.emit(\"_dataUpdated\");\n }\n }\n\n /**\n * Remove existing nodes. If nodes do not exist, the method will just ignore it.\n * @param {number[] | string[]} ids\n * @private\n */\n remove(ids) {\n let nodes = this.body.nodes;\n\n for (let i = 0; i < ids.length; i++) {\n let id = ids[i];\n delete nodes[id];\n }\n\n this.body.emitter.emit(\"_dataChanged\");\n }\n\n\n /**\n * create a node\n * @param {Object} properties\n * @param {class} [constructorClass=Node.default]\n * @returns {*}\n */\n create(properties, constructorClass = Node) {\n return new constructorClass(properties, this.body, this.images, this.groups, this.options, this.defaultOptions)\n }\n\n\n /**\n *\n * @param {boolean} [clearPositions=false]\n */\n refresh(clearPositions = false) {\n util.forEach(this.body.nodes, (node, nodeId) => {\n let data = this.body.data.nodes.get(nodeId);\n if (data !== undefined) {\n if (clearPositions === true) {\n node.setOptions({x:null, y:null});\n }\n node.setOptions({ fixed: false });\n node.setOptions(data);\n }\n });\n }\n\n\n /**\n * Returns the positions of the nodes.\n * @param {Array.|String} [ids] --> optional, can be array of nodeIds, can be string\n * @returns {{}}\n */\n getPositions(ids) {\n let dataArray = {};\n if (ids !== undefined) {\n if (Array.isArray(ids) === true) {\n for (let i = 0; i < ids.length; i++) {\n if (this.body.nodes[ids[i]] !== undefined) {\n let node = this.body.nodes[ids[i]];\n dataArray[ids[i]] = { x: Math.round(node.x), y: Math.round(node.y) };\n }\n }\n }\n else {\n if (this.body.nodes[ids] !== undefined) {\n let node = this.body.nodes[ids];\n dataArray[ids] = { x: Math.round(node.x), y: Math.round(node.y) };\n }\n }\n }\n else {\n for (let i = 0; i < this.body.nodeIndices.length; i++) {\n let node = this.body.nodes[this.body.nodeIndices[i]];\n dataArray[this.body.nodeIndices[i]] = { x: Math.round(node.x), y: Math.round(node.y) };\n }\n }\n return dataArray;\n }\n\n\n /**\n * Load the XY positions of the nodes into the dataset.\n */\n storePositions() {\n // todo: add support for clusters and hierarchical.\n let dataArray = [];\n var dataset = this.body.data.nodes.getDataSet();\n\n for (let nodeId in dataset._data) {\n if (dataset._data.hasOwnProperty(nodeId)) {\n let node = this.body.nodes[nodeId];\n if (dataset._data[nodeId].x != Math.round(node.x) || dataset._data[nodeId].y != Math.round(node.y)) {\n dataArray.push({ id: node.id, x: Math.round(node.x), y: Math.round(node.y) });\n }\n }\n }\n dataset.update(dataArray);\n }\n\n /**\n * get the bounding box of a node.\n * @param {Node.id} nodeId\n * @returns {j|*}\n */\n getBoundingBox(nodeId) {\n if (this.body.nodes[nodeId] !== undefined) {\n return this.body.nodes[nodeId].shape.boundingBox;\n }\n }\n\n\n /**\n * Get the Ids of nodes connected to this node.\n * @param {Node.id} nodeId\n * @param {'to'|'from'|undefined} direction values 'from' and 'to' select respectively parent and child nodes only.\n * Any other value returns both parent and child nodes.\n * @returns {Array}\n */\n getConnectedNodes(nodeId, direction) {\n let nodeList = [];\n if (this.body.nodes[nodeId] !== undefined) {\n let node = this.body.nodes[nodeId];\n let nodeObj = {}; // used to quickly check if node already exists\n for (let i = 0; i < node.edges.length; i++) {\n let edge = node.edges[i];\n if (direction !== 'to' && edge.toId == node.id) { // these are double equals since ids can be numeric or string\n if (nodeObj[edge.fromId] === undefined) {\n nodeList.push(edge.fromId);\n nodeObj[edge.fromId] = true;\n }\n }\n else if (direction !== 'from' && edge.fromId == node.id) { // these are double equals since ids can be numeric or string\n if (nodeObj[edge.toId] === undefined) {\n nodeList.push(edge.toId);\n nodeObj[edge.toId] = true;\n }\n }\n }\n }\n return nodeList;\n }\n\n /**\n * Get the ids of the edges connected to this node.\n * @param {Node.id} nodeId\n * @returns {*}\n */\n getConnectedEdges(nodeId) {\n let edgeList = [];\n if (this.body.nodes[nodeId] !== undefined) {\n let node = this.body.nodes[nodeId];\n for (let i = 0; i < node.edges.length; i++) {\n edgeList.push(node.edges[i].id)\n }\n }\n else {\n console.log(\"NodeId provided for getConnectedEdges does not exist. Provided: \", nodeId);\n }\n return edgeList;\n }\n\n\n /**\n * Move a node.\n *\n * @param {Node.id} nodeId\n * @param {number} x\n * @param {number} y\n */\n moveNode(nodeId, x, y) {\n if (this.body.nodes[nodeId] !== undefined) {\n this.body.nodes[nodeId].x = Number(x);\n this.body.nodes[nodeId].y = Number(y);\n setTimeout(() => {this.body.emitter.emit(\"startSimulation\")},0);\n }\n else {\n console.log(\"Node id supplied to moveNode does not exist. Provided: \", nodeId);\n }\n }\n}\n\nexport default NodesHandler;\n","/** ============================================================================\n * Location of all the endpoint drawing routines.\n *\n * Every endpoint has its own drawing routine, which contains an endpoint definition.\n *\n * The endpoint definitions must have the following properies:\n *\n * - (0,0) is the connection point to the node it attaches to\n * - The endpoints are orientated to the positive x-direction\n * - The length of the endpoint is at most 1\n *\n * As long as the endpoint classes remain simple and not too numerous, they will\n * be contained within this module.\n * All classes here except `EndPoints` should be considered as private to this module.\n *\n * -----------------------------------------------------------------------------\n * ### Further Actions\n *\n * After adding a new endpoint here, you also need to do the following things:\n *\n * - Add the new endpoint name to `network/options.js` in array `endPoints`.\n * - Add the new endpoint name to the documentation.\n * Scan for 'arrows.to.type` and add it to the description.\n * - Add the endpoint to the examples. At the very least, add it to example\n * `edgeStyles/arrowTypes`.\n * ============================================================================= */\n\n/**\n * Common methods for endpoints\n *\n * @class\n */\nclass EndPoint {\n\n /**\n * Apply transformation on points for display.\n *\n * The following is done:\n * - rotate by the specified angle\n * - multiply the (normalized) coordinates by the passed length\n * - offset by the target coordinates\n *\n * @param {Array} points\n * @param {ArrowData} arrowData\n * @static\n */\n static transform(points, arrowData) {\n if (!(points instanceof Array)) {\n points = [points];\n }\n\n var x = arrowData.point.x;\n var y = arrowData.point.y;\n var angle = arrowData.angle\n var length = arrowData.length;\n\n for(var i = 0; i < points.length; ++i) {\n var p = points[i];\n var xt = p.x * Math.cos(angle) - p.y * Math.sin(angle);\n var yt = p.x * Math.sin(angle) + p.y * Math.cos(angle);\n\n p.x = x + length*xt;\n p.y = y + length*yt;\n }\n }\n\n\n /**\n * Draw a closed path using the given real coordinates.\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {Array.} points\n * @static\n */\n static drawPath(ctx, points) {\n ctx.beginPath();\n ctx.moveTo(points[0].x, points[0].y);\n for(var i = 1; i < points.length; ++i) {\n ctx.lineTo(points[i].x, points[i].y);\n }\n ctx.closePath();\n }\n}\n\n\n\n\n/**\n * Drawing methods for the arrow endpoint.\n * @extends EndPoint\n */\nclass Arrow extends EndPoint {\n\n /**\n * Draw this shape at the end of a line.\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {ArrowData} arrowData\n * @static\n */\n static draw(ctx, arrowData) {\n // Normalized points of closed path, in the order that they should be drawn.\n // (0, 0) is the attachment point, and the point around which should be rotated\n var points = [\n { x: 0 , y: 0 },\n { x:-1 , y: 0.3},\n { x:-0.9, y: 0 },\n { x:-1 , y:-0.3},\n ];\n\n EndPoint.transform(points, arrowData);\n EndPoint.drawPath(ctx, points);\n }\n}\n\n/**\n * Drawing methods for the crow endpoint.\n * @extends EndPoint\n */\nclass Crow {\n\n /**\n * Draw this shape at the end of a line.\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {ArrowData} arrowData\n * @static\n */\n static draw(ctx, arrowData) {\n // Normalized points of closed path, in the order that they should be drawn.\n // (0, 0) is the attachment point, and the point around which should be rotated\n var points = [\n { x:-1, y: 0},\n { x:0, y: 0.3},\n { x:-0.4, y: 0},\n { x:0, y:-0.3},\n ];\n\n EndPoint.transform(points, arrowData);\n EndPoint.drawPath(ctx, points);\n }\n}\n\n/**\n * Drawing methods for the curve endpoint.\n * @extends EndPoint\n */\nclass Curve {\n\n /**\n * Draw this shape at the end of a line.\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {ArrowData} arrowData\n * @static\n */\n static draw(ctx, arrowData) {\n // Normalized points of closed path, in the order that they should be drawn.\n // (0, 0) is the attachment point, and the point around which should be rotated\n var point = {x:-0.4, y:0};\n EndPoint.transform(point, arrowData);\n\n // Update endpoint style for drawing transparent arc.\n ctx.strokeStyle = ctx.fillStyle;\n ctx.fillStyle = 'rgba(0, 0, 0, 0)';\n\n // Define curve endpoint as semicircle.\n var pi = Math.PI\n var start_angle = arrowData.angle - pi/2;\n var end_angle = arrowData.angle + pi/2;\n ctx.beginPath();\n ctx.arc(point.x, point.y, arrowData.length*0.4, start_angle, end_angle, false);\n ctx.stroke()\n }\n}\n\n/**\n * Drawing methods for the inverted curve endpoint.\n * @extends EndPoint\n */\nclass InvertedCurve {\n\n /**\n * Draw this shape at the end of a line.\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {ArrowData} arrowData\n * @static\n */\n static draw(ctx, arrowData) {\n // Normalized points of closed path, in the order that they should be drawn.\n // (0, 0) is the attachment point, and the point around which should be rotated\n var point = {x:-0.3, y:0};\n EndPoint.transform(point, arrowData);\n\n // Update endpoint style for drawing transparent arc.\n ctx.strokeStyle = ctx.fillStyle;\n ctx.fillStyle = 'rgba(0, 0, 0, 0)';\n\n // Define inverted curve endpoint as semicircle.\n var pi = Math.PI\n var start_angle = arrowData.angle + pi/2;\n var end_angle = arrowData.angle + 3*pi/2;\n ctx.beginPath();\n ctx.arc(point.x, point.y, arrowData.length*0.4, start_angle, end_angle, false);\n ctx.stroke()\n }\n}\n\n/**\n * Drawing methods for the trinagle endpoint.\n * @extends EndPoint\n */\nclass Triangle {\n\n /**\n * Draw this shape at the end of a line.\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {ArrowData} arrowData\n * @static\n */\n static draw(ctx, arrowData) {\n // Normalized points of closed path, in the order that they should be drawn.\n // (0, 0) is the attachment point, and the point around which should be rotated\n var points = [\n { x:0.02, y:0},\n { x:-1, y: 0.3},\n { x:-1, y:-0.3},\n ];\n\n EndPoint.transform(points, arrowData);\n EndPoint.drawPath(ctx, points);\n }\n}\n\n/**\n * Drawing methods for the inverted trinagle endpoint.\n * @extends EndPoint\n */\nclass InvertedTriangle {\n\n /**\n * Draw this shape at the end of a line.\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {ArrowData} arrowData\n * @static\n */\n static draw(ctx, arrowData) {\n // Normalized points of closed path, in the order that they should be drawn.\n // (0, 0) is the attachment point, and the point around which should be rotated\n var points = [\n { x:0, y:0.3},\n { x:0, y: -0.3},\n { x:-1, y:0},\n ];\n\n EndPoint.transform(points, arrowData);\n EndPoint.drawPath(ctx, points);\n }\n}\n\n/**\n * Drawing methods for the circle endpoint.\n */\nclass Circle {\n\n /**\n * Draw this shape at the end of a line.\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {ArrowData} arrowData\n * @static\n */\n static draw(ctx, arrowData) {\n var point = {x:-0.4, y:0};\n\n EndPoint.transform(point, arrowData);\n ctx.circle(point.x, point.y, arrowData.length*0.4);\n }\n}\n\n\n/**\n * Drawing methods for the bar endpoint.\n */\nclass Bar {\n\n /**\n * Draw this shape at the end of a line.\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {ArrowData} arrowData\n * @static\n */\n static draw(ctx, arrowData) {\n/*\n var points = [\n {x:0, y:0.5},\n {x:0, y:-0.5}\n ];\n\n EndPoint.transform(points, arrowData);\n ctx.beginPath();\n ctx.moveTo(points[0].x, points[0].y);\n ctx.lineTo(points[1].x, points[1].y);\n ctx.stroke();\n*/\n\n var points = [\n {x:0, y:0.5},\n {x:0, y:-0.5},\n {x:-0.15, y:-0.5},\n {x:-0.15, y:0.5},\n ];\n\n EndPoint.transform(points, arrowData);\n EndPoint.drawPath(ctx, points);\n }\n}\n\n/**\n * Drawing methods for the box endpoint.\n */\nclass Box {\n\n /**\n * Draw this shape at the end of a line.\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {ArrowData} arrowData\n * @static\n */\n static draw(ctx, arrowData) {\n var points = [\n {x:0, y:0.3},\n {x:0, y:-0.3},\n {x:-0.6, y:-0.3},\n {x:-0.6, y:0.3},\n ];\n\n EndPoint.transform(points, arrowData);\n EndPoint.drawPath(ctx, points);\n }\n}\n\n/**\n * Drawing methods for the diamond endpoint.\n */\nclass Diamond {\n\n /**\n * Draw this shape at the end of a line.\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {ArrowData} arrowData\n * @static\n */\n static draw(ctx, arrowData) {\n var points = [\n {x:0, y:0},\n {x:-0.5, y:-0.3},\n {x:-1, y:0},\n {x:-0.5, y:0.3},\n ];\n\n EndPoint.transform(points, arrowData);\n EndPoint.drawPath(ctx, points);\n }\n}\n\n/**\n * Drawing methods for the vee endpoint.\n * @extends EndPoint\n */\nclass Vee {\n\n /**\n * Draw this shape at the end of a line.\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {ArrowData} arrowData\n * @static\n */\n static draw(ctx, arrowData) {\n // Normalized points of closed path, in the order that they should be drawn.\n // (0, 0) is the attachment point, and the point around which should be rotated\n var points = [\n { x:-1, y: 0.3},\n { x:-0.5, y: 0},\n { x:-1, y:-0.3},\n { x:0, y: 0},\n ];\n\n EndPoint.transform(points, arrowData);\n EndPoint.drawPath(ctx, points);\n }\n}\n\n/**\n * Drawing methods for the endpoints.\n */\nclass EndPoints {\n\n /**\n * Draw an endpoint\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {ArrowData} arrowData\n * @static\n */\n static draw(ctx, arrowData) {\n var type;\n if (arrowData.type) {\n type = arrowData.type.toLowerCase();\n }\n\n switch (type) {\n case 'circle':\n Circle.draw(ctx, arrowData);\n break;\n case 'box':\n Box.draw(ctx, arrowData);\n break;\n case 'crow':\n Crow.draw(ctx, arrowData);\n break;\n case 'curve':\n Curve.draw(ctx, arrowData);\n break;\n case 'diamond':\n Diamond.draw(ctx, arrowData);\n break;\n case 'inv_curve':\n InvertedCurve.draw(ctx, arrowData);\n break;\n case 'triangle':\n Triangle.draw(ctx, arrowData);\n break;\n case 'inv_triangle':\n InvertedTriangle.draw(ctx, arrowData);\n break;\n case 'bar':\n Bar.draw(ctx, arrowData);\n break;\n case 'vee':\n Vee.draw(ctx, arrowData);\n break;\n case 'arrow': // fall-through\n default:\n Arrow.draw(ctx, arrowData);\n }\n }\n}\n\nexport default EndPoints;\n","import util from 'vis-util';\nimport EndPoints from './EndPoints';\n\n\n/**\n * The Base Class for all edges.\n *\n */\nclass EdgeBase {\n /**\n * @param {Object} options\n * @param {Object} body\n * @param {Label} labelModule\n */\n constructor(options, body, labelModule) {\n this.body = body;\n this.labelModule = labelModule;\n this.options = {};\n this.setOptions(options);\n this.colorDirty = true;\n this.color = {};\n this.selectionWidth = 2;\n this.hoverWidth = 1.5;\n this.fromPoint = this.from;\n this.toPoint = this.to;\n }\n\n /**\n * Connects a node to itself\n */\n connect() {\n this.from = this.body.nodes[this.options.from];\n this.to = this.body.nodes[this.options.to];\n }\n\n /**\n *\n * @returns {boolean} always false\n */\n cleanup() {\n return false;\n }\n\n /**\n *\n * @param {Object} options\n */\n setOptions(options) {\n this.options = options;\n this.from = this.body.nodes[this.options.from];\n this.to = this.body.nodes[this.options.to];\n this.id = this.options.id;\n }\n\n /**\n * Redraw a edge as a line\n * Draw this edge in the given canvas\n * The 2d context of a HTML canvas can be retrieved by canvas.getContext(\"2d\");\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {Array} values\n * @param {boolean} selected\n * @param {boolean} hover\n * @param {Node} viaNode\n * @private\n */\n drawLine(ctx, values, selected, hover, viaNode) {\n // set style\n ctx.strokeStyle = this.getColor(ctx, values, selected, hover);\n ctx.lineWidth = values.width;\n\n if (values.dashes !== false) {\n this._drawDashedLine(ctx, values, viaNode);\n }\n else {\n this._drawLine(ctx, values, viaNode);\n }\n }\n\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {Array} values\n * @param {Node} viaNode\n * @param {{x: number, y: number}} [fromPoint]\n * @param {{x: number, y: number}} [toPoint]\n * @private\n */\n _drawLine(ctx, values, viaNode, fromPoint, toPoint) {\n if (this.from != this.to) {\n // draw line\n this._line(ctx, values, viaNode, fromPoint, toPoint);\n }\n else {\n let [x,y,radius] = this._getCircleData(ctx);\n this._circle(ctx, values, x, y, radius);\n }\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {Array} values\n * @param {Node} viaNode\n * @param {{x: number, y: number}} [fromPoint] TODO: Remove in next major release\n * @param {{x: number, y: number}} [toPoint] TODO: Remove in next major release\n * @private\n */\n _drawDashedLine(ctx, values, viaNode, fromPoint, toPoint) { // eslint-disable-line no-unused-vars\n ctx.lineCap = 'round';\n let pattern = [5,5];\n if (Array.isArray(values.dashes) === true) {\n pattern = values.dashes;\n }\n\n // only firefox and chrome support this method, else we use the legacy one.\n if (ctx.setLineDash !== undefined) {\n ctx.save();\n\n // set dash settings for chrome or firefox\n ctx.setLineDash(pattern);\n ctx.lineDashOffset = 0;\n\n // draw the line\n if (this.from != this.to) {\n // draw line\n this._line(ctx, values, viaNode);\n }\n else {\n let [x,y,radius] = this._getCircleData(ctx);\n this._circle(ctx, values, x, y, radius);\n }\n\n // restore the dash settings.\n ctx.setLineDash([0]);\n ctx.lineDashOffset = 0;\n ctx.restore();\n }\n else { // unsupporting smooth lines\n if (this.from != this.to) {\n // draw line\n ctx.dashedLine(this.from.x, this.from.y, this.to.x, this.to.y, pattern);\n }\n else {\n let [x,y,radius] = this._getCircleData(ctx);\n this._circle(ctx, values, x, y, radius);\n }\n // draw shadow if enabled\n this.enableShadow(ctx, values);\n\n ctx.stroke();\n\n // disable shadows for other elements.\n this.disableShadow(ctx, values);\n }\n }\n\n\n /**\n *\n * @param {Node} nearNode\n * @param {CanvasRenderingContext2D} ctx\n * @param {Object} options\n * @returns {{x: number, y: number}}\n */\n findBorderPosition(nearNode, ctx, options) {\n if (this.from != this.to) {\n return this._findBorderPosition(nearNode, ctx, options);\n }\n else {\n return this._findBorderPositionCircle(nearNode, ctx, options);\n }\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @returns {{from: ({x: number, y: number, t: number}|*), to: ({x: number, y: number, t: number}|*)}}\n */\n findBorderPositions(ctx) {\n let from = {};\n let to = {};\n if (this.from != this.to) {\n from = this._findBorderPosition(this.from, ctx);\n to = this._findBorderPosition(this.to, ctx);\n }\n else {\n let [x,y] = this._getCircleData(ctx).slice(0, 2);\n\n from = this._findBorderPositionCircle(this.from, ctx, {x, y, low:0.25, high:0.6, direction:-1});\n to = this._findBorderPositionCircle(this.from, ctx, {x, y, low:0.6, high:0.8, direction:1});\n }\n return {from, to};\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @returns {Array.} x, y, radius\n * @private\n */\n _getCircleData(ctx) {\n let x, y;\n let node = this.from;\n let radius = this.options.selfReferenceSize;\n\n if (ctx !== undefined) {\n if (node.shape.width === undefined) {\n node.shape.resize(ctx);\n }\n }\n\n // get circle coordinates\n if (node.shape.width > node.shape.height) {\n x = node.x + node.shape.width * 0.5;\n y = node.y - radius;\n }\n else {\n x = node.x + radius;\n y = node.y - node.shape.height * 0.5;\n }\n return [x,y,radius];\n }\n\n /**\n * Get a point on a circle\n * @param {number} x\n * @param {number} y\n * @param {number} radius\n * @param {number} percentage - Value between 0 (line start) and 1 (line end)\n * @return {Object} point\n * @private\n */\n _pointOnCircle(x, y, radius, percentage) {\n let angle = percentage * 2 * Math.PI;\n return {\n x: x + radius * Math.cos(angle),\n y: y - radius * Math.sin(angle)\n }\n }\n\n /**\n * This function uses binary search to look for the point where the circle crosses the border of the node.\n * @param {Node} node\n * @param {CanvasRenderingContext2D} ctx\n * @param {Object} options\n * @returns {*}\n * @private\n */\n _findBorderPositionCircle(node, ctx, options) {\n let x = options.x;\n let y = options.y;\n let low = options.low;\n let high = options.high;\n let direction = options.direction;\n\n let maxIterations = 10;\n let iteration = 0;\n let radius = this.options.selfReferenceSize;\n let pos, angle, distanceToBorder, distanceToPoint, difference;\n let threshold = 0.05;\n let middle = (low + high) * 0.5;\n\n while (low <= high && iteration < maxIterations) {\n middle = (low + high) * 0.5;\n\n pos = this._pointOnCircle(x, y, radius, middle);\n angle = Math.atan2((node.y - pos.y), (node.x - pos.x));\n distanceToBorder = node.distanceToBorder(ctx, angle);\n distanceToPoint = Math.sqrt(Math.pow(pos.x - node.x, 2) + Math.pow(pos.y - node.y, 2));\n difference = distanceToBorder - distanceToPoint;\n if (Math.abs(difference) < threshold) {\n break; // found\n }\n else if (difference > 0) { // distance to nodes is larger than distance to border --> t needs to be bigger if we're looking at the to node.\n if (direction > 0) {\n low = middle;\n }\n else {\n high = middle;\n }\n }\n else {\n if (direction > 0) {\n high = middle;\n }\n else {\n low = middle;\n }\n }\n iteration++;\n\n }\n pos.t = middle;\n\n return pos;\n }\n\n /**\n * Get the line width of the edge. Depends on width and whether one of the\n * connected nodes is selected.\n * @param {boolean} selected\n * @param {boolean} hover\n * @returns {number} width\n * @private\n */\n getLineWidth(selected, hover) {\n if (selected === true) {\n return Math.max(this.selectionWidth, 0.3 / this.body.view.scale);\n }\n else {\n if (hover === true) {\n return Math.max(this.hoverWidth, 0.3 / this.body.view.scale);\n }\n else {\n return Math.max(this.options.width, 0.3 / this.body.view.scale);\n }\n }\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {ArrowOptions} values\n * @param {boolean} selected - Unused\n * @param {boolean} hover - Unused\n * @returns {string}\n */\n getColor(ctx, values, selected, hover) { // eslint-disable-line no-unused-vars\n if (values.inheritsColor !== false) {\n // when this is a loop edge, just use the 'from' method\n if ((values.inheritsColor === 'both') && (this.from.id !== this.to.id)) {\n let grd = ctx.createLinearGradient(this.from.x, this.from.y, this.to.x, this.to.y);\n let fromColor, toColor;\n fromColor = this.from.options.color.highlight.border;\n toColor = this.to.options.color.highlight.border;\n\n if ((this.from.selected === false) && (this.to.selected === false)) {\n fromColor = util.overrideOpacity(this.from.options.color.border, values.opacity);\n toColor = util.overrideOpacity(this.to.options.color.border, values.opacity);\n }\n else if ((this.from.selected === true) && (this.to.selected === false)) {\n toColor = this.to.options.color.border;\n }\n else if ((this.from.selected === false) && (this.to.selected === true)) {\n fromColor = this.from.options.color.border;\n }\n grd.addColorStop(0, fromColor);\n grd.addColorStop(1, toColor);\n\n // -------------------- this returns -------------------- //\n return grd;\n }\n\n if (values.inheritsColor === \"to\") {\n return util.overrideOpacity(this.to.options.color.border, values.opacity);\n } else { // \"from\"\n return util.overrideOpacity(this.from.options.color.border, values.opacity);\n }\n } else {\n return util.overrideOpacity(values.color, values.opacity);\n }\n }\n\n /**\n * Draw a line from a node to itself, a circle\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {Array} values\n * @param {number} x\n * @param {number} y\n * @param {number} radius\n * @private\n */\n _circle(ctx, values, x, y, radius) {\n // draw shadow if enabled\n this.enableShadow(ctx, values);\n\n // draw a circle\n ctx.beginPath();\n ctx.arc(x, y, radius, 0, 2 * Math.PI, false);\n ctx.stroke();\n\n // disable shadows for other elements.\n this.disableShadow(ctx, values);\n }\n\n\n /**\n * Calculate the distance between a point (x3,y3) and a line segment from (x1,y1) to (x2,y2).\n * (x3,y3) is the point.\n *\n * http://stackoverflow.com/questions/849211/shortest-distancae-between-a-point-and-a-line-segment\n *\n * @param {number} x1\n * @param {number} y1\n * @param {number} x2\n * @param {number} y2\n * @param {number} x3\n * @param {number} y3\n * @param {Node} via\n * @param {Array} values\n * @returns {number}\n */\n getDistanceToEdge(x1, y1, x2, y2, x3, y3, via, values) { // eslint-disable-line no-unused-vars\n let returnValue = 0;\n if (this.from != this.to) {\n returnValue = this._getDistanceToEdge(x1, y1, x2, y2, x3, y3, via)\n }\n else {\n let [x,y,radius] = this._getCircleData(undefined);\n let dx = x - x3;\n let dy = y - y3;\n returnValue = Math.abs(Math.sqrt(dx * dx + dy * dy) - radius);\n }\n\n return returnValue;\n }\n\n\n /**\n *\n * @param {number} x1\n * @param {number} y1\n * @param {number} x2\n * @param {number} y2\n * @param {number} x3\n * @param {number} y3\n * @returns {number}\n * @private\n */\n _getDistanceToLine(x1, y1, x2, y2, x3, y3) {\n let px = x2 - x1;\n let py = y2 - y1;\n let something = px * px + py * py;\n let u = ((x3 - x1) * px + (y3 - y1) * py) / something;\n\n if (u > 1) {\n u = 1;\n }\n else if (u < 0) {\n u = 0;\n }\n\n let x = x1 + u * px;\n let y = y1 + u * py;\n let dx = x - x3;\n let dy = y - y3;\n\n //# Note: If the actual distance does not matter,\n //# if you only want to compare what this function\n //# returns to other results of this function, you\n //# can just return the squared distance instead\n //# (i.e. remove the sqrt) to gain a little performance\n\n return Math.sqrt(dx * dx + dy * dy);\n }\n\n\n /**\n * @param {CanvasRenderingContext2D} ctx\n * @param {string} position\n * @param {Node} viaNode\n * @param {boolean} selected\n * @param {boolean} hover\n * @param {Array} values\n * @returns {{point: *, core: {x: number, y: number}, angle: *, length: number, type: *}}\n */\n getArrowData(ctx, position, viaNode, selected, hover, values) {\n // set lets\n let angle;\n let arrowPoint;\n let node1;\n let node2;\n let guideOffset;\n let scaleFactor;\n let type;\n let lineWidth = values.width;\n\n if (position === 'from') {\n node1 = this.from;\n node2 = this.to;\n guideOffset = 0.1;\n scaleFactor = values.fromArrowScale;\n type = values.fromArrowType;\n }\n else if (position === 'to') {\n node1 = this.to;\n node2 = this.from;\n guideOffset = -0.1;\n scaleFactor = values.toArrowScale;\n type = values.toArrowType;\n }\n else {\n node1 = this.to;\n node2 = this.from;\n scaleFactor = values.middleArrowScale;\n type = values.middleArrowType;\n }\n\n // if not connected to itself\n if (node1 != node2) {\n if (position !== 'middle') {\n // draw arrow head\n if (this.options.smooth.enabled === true) {\n arrowPoint = this.findBorderPosition(node1, ctx, { via: viaNode });\n let guidePos = this.getPoint(Math.max(0.0, Math.min(1.0, arrowPoint.t + guideOffset)), viaNode);\n angle = Math.atan2((arrowPoint.y - guidePos.y), (arrowPoint.x - guidePos.x));\n } else {\n angle = Math.atan2((node1.y - node2.y), (node1.x - node2.x));\n arrowPoint = this.findBorderPosition(node1, ctx);\n }\n } else {\n angle = Math.atan2((node1.y - node2.y), (node1.x - node2.x));\n arrowPoint = this.getPoint(0.5, viaNode); // this is 0.6 to account for the size of the arrow.\n }\n } else {\n // draw circle\n let [x,y,radius] = this._getCircleData(ctx);\n\n if (position === 'from') {\n arrowPoint = this.findBorderPosition(this.from, ctx, { x, y, low: 0.25, high: 0.6, direction: -1 });\n angle = arrowPoint.t * -2 * Math.PI + 1.5 * Math.PI + 0.1 * Math.PI;\n } else if (position === 'to') {\n arrowPoint = this.findBorderPosition(this.from, ctx, { x, y, low: 0.6, high: 1.0, direction: 1 });\n angle = arrowPoint.t * -2 * Math.PI + 1.5 * Math.PI - 1.1 * Math.PI;\n } else {\n arrowPoint = this._pointOnCircle(x, y, radius, 0.175);\n angle = 3.9269908169872414; // === 0.175 * -2 * Math.PI + 1.5 * Math.PI + 0.1 * Math.PI;\n }\n }\n\n if (position === 'middle' && scaleFactor < 0) lineWidth *= -1; // reversed middle arrow\n let length = 15 * scaleFactor + 3 * lineWidth; // 3* lineWidth is the width of the edge.\n\n var xi = arrowPoint.x - length * 0.9 * Math.cos(angle);\n var yi = arrowPoint.y - length * 0.9 * Math.sin(angle);\n let arrowCore = { x: xi, y: yi };\n\n return { point: arrowPoint, core: arrowCore, angle: angle, length: length, type: type };\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {ArrowOptions} values\n * @param {boolean} selected\n * @param {boolean} hover\n * @param {Object} arrowData\n */\n drawArrowHead(ctx, values, selected, hover, arrowData) {\n // set style\n ctx.strokeStyle = this.getColor(ctx, values, selected, hover);\n ctx.fillStyle = ctx.strokeStyle;\n ctx.lineWidth = values.width;\n\n EndPoints.draw(ctx, arrowData);\n\n // draw shadow if enabled\n this.enableShadow(ctx, values);\n ctx.fill();\n // disable shadows for other elements.\n this.disableShadow(ctx, values);\n }\n\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {ArrowOptions} values\n */\n enableShadow(ctx, values) {\n if (values.shadow === true) {\n ctx.shadowColor = values.shadowColor;\n ctx.shadowBlur = values.shadowSize;\n ctx.shadowOffsetX = values.shadowX;\n ctx.shadowOffsetY = values.shadowY;\n }\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {ArrowOptions} values\n */\n disableShadow(ctx, values) {\n if (values.shadow === true) {\n ctx.shadowColor = 'rgba(0,0,0,0)';\n ctx.shadowBlur = 0;\n ctx.shadowOffsetX = 0;\n ctx.shadowOffsetY = 0;\n }\n }\n \n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {{toArrow: boolean, toArrowScale: (allOptions.edges.arrows.to.scaleFactor|{number}|allOptions.edges.arrows.middle.scaleFactor|allOptions.edges.arrows.from.scaleFactor|Array|number), toArrowType: *, middleArrow: boolean, middleArrowScale: (number|allOptions.edges.arrows.middle.scaleFactor|{number}|Array), middleArrowType: (allOptions.edges.arrows.middle.type|{string}|string|*), fromArrow: boolean, fromArrowScale: (allOptions.edges.arrows.to.scaleFactor|{number}|allOptions.edges.arrows.middle.scaleFactor|allOptions.edges.arrows.from.scaleFactor|Array|number), fromArrowType: *, arrowStrikethrough: (*|boolean|allOptions.edges.arrowStrikethrough|{boolean}), color: undefined, inheritsColor: (string|string|string|allOptions.edges.color.inherit|{string, boolean}|Array|*), opacity: *, hidden: *, length: *, shadow: *, shadowColor: *, shadowSize: *, shadowX: *, shadowY: *, dashes: (*|boolean|Array|allOptions.edges.dashes|{boolean, array}), width: *}} values\n */\n drawBackground(ctx, values) {\n if (values.background !== false) {\n let attrs = ['strokeStyle', 'lineWidth', 'dashes'];\n let origCtxAttr = {};\n // save original line attrs\n attrs.forEach(function(attrname) {\n origCtxAttr[attrname] = ctx[attrname];\n });\n\n ctx.strokeStyle = values.backgroundColor;\n ctx.lineWidth = values.backgroundSize;\n this.setStrokeDashed(ctx, values.backgroundDashes);\n\n ctx.stroke();\n\n // restore original line attrs\n attrs.forEach(function(attrname) {\n ctx[attrname] = origCtxAttr[attrname];\n });\n this.setStrokeDashed(ctx, values.dashes);\n }\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {boolean|Array} dashes\n */\n setStrokeDashed(ctx, dashes) {\n if (dashes !== false) {\n if (ctx.setLineDash !== undefined) {\n let pattern = [5, 5];\n if (Array.isArray(dashes) === true) {\n pattern = dashes;\n }\n ctx.setLineDash(pattern);\n }\n else {\n console.warn(\"setLineDash is not supported in this browser. The dashed stroke cannot be used.\");\n }\n }\n else {\n if (ctx.setLineDash !== undefined) {\n ctx.setLineDash([]);\n }\n else {\n console.warn(\"setLineDash is not supported in this browser. The dashed stroke cannot be used.\");\n }\n }\n }\n}\n\nexport default EdgeBase;\n","import EdgeBase from './EdgeBase'\n\n/**\n * The Base Class for all Bezier edges. Bezier curves are used to model smooth\n * gradual curves in paths between nodes.\n *\n * @extends EdgeBase\n */\nclass BezierEdgeBase extends EdgeBase {\n /**\n * @param {Object} options\n * @param {Object} body\n * @param {Label} labelModule\n */\n constructor(options, body, labelModule) {\n super(options, body, labelModule);\n }\n\n /**\n * This function uses binary search to look for the point where the bezier curve crosses the border of the node.\n *\n * @param {Node} nearNode\n * @param {CanvasRenderingContext2D} ctx\n * @param {Node} viaNode\n * @returns {*}\n * @private\n */\n _findBorderPositionBezier(nearNode, ctx, viaNode = this._getViaCoordinates()) {\n var maxIterations = 10;\n var iteration = 0;\n var low = 0;\n var high = 1;\n var pos, angle, distanceToBorder, distanceToPoint, difference;\n var threshold = 0.2;\n var node = this.to;\n var from = false;\n if (nearNode.id === this.from.id) {\n node = this.from;\n from = true;\n }\n\n while (low <= high && iteration < maxIterations) {\n var middle = (low + high) * 0.5;\n\n pos = this.getPoint(middle, viaNode);\n angle = Math.atan2((node.y - pos.y), (node.x - pos.x));\n distanceToBorder = node.distanceToBorder(ctx, angle);\n distanceToPoint = Math.sqrt(Math.pow(pos.x - node.x, 2) + Math.pow(pos.y - node.y, 2));\n difference = distanceToBorder - distanceToPoint;\n if (Math.abs(difference) < threshold) {\n break; // found\n }\n else if (difference < 0) { // distance to nodes is larger than distance to border --> t needs to be bigger if we're looking at the to node.\n if (from === false) {\n low = middle;\n }\n else {\n high = middle;\n }\n }\n else {\n if (from === false) {\n high = middle;\n }\n else {\n low = middle;\n }\n }\n\n iteration++;\n }\n pos.t = middle;\n\n return pos;\n }\n\n\n\n /**\n * Calculate the distance between a point (x3,y3) and a line segment from\n * (x1,y1) to (x2,y2).\n * http://stackoverflow.com/questions/849211/shortest-distancae-between-a-point-and-a-line-segment\n * @param {number} x1 from x\n * @param {number} y1 from y\n * @param {number} x2 to x\n * @param {number} y2 to y\n * @param {number} x3 point to check x\n * @param {number} y3 point to check y\n * @param {Node} via\n * @returns {number}\n * @private\n */\n _getDistanceToBezierEdge(x1, y1, x2, y2, x3, y3, via) { // x3,y3 is the point\n let minDistance = 1e9;\n let distance;\n let i, t, x, y;\n let lastX = x1;\n let lastY = y1;\n for (i = 1; i < 10; i++) {\n t = 0.1 * i;\n x = Math.pow(1 - t, 2) * x1 + (2 * t * (1 - t)) * via.x + Math.pow(t, 2) * x2;\n y = Math.pow(1 - t, 2) * y1 + (2 * t * (1 - t)) * via.y + Math.pow(t, 2) * y2;\n if (i > 0) {\n distance = this._getDistanceToLine(lastX, lastY, x, y, x3, y3);\n minDistance = distance < minDistance ? distance : minDistance;\n }\n lastX = x;\n lastY = y;\n }\n\n return minDistance;\n }\n\n\n /**\n * Draw a bezier curve between two nodes\n *\n * The method accepts zero, one or two control points.\n * Passing zero control points just draws a straight line\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {Object} values | options for shadow drawing\n * @param {Object|undefined} viaNode1 | first control point for curve drawing\n * @param {Object|undefined} viaNode2 | second control point for curve drawing\n *\n * @protected\n */\n _bezierCurve(ctx, values, viaNode1, viaNode2) {\n var hasNode1 = (viaNode1 !== undefined && viaNode1.x !== undefined);\n var hasNode2 = (viaNode2 !== undefined && viaNode2.x !== undefined);\n\n ctx.beginPath();\n ctx.moveTo(this.fromPoint.x, this.fromPoint.y);\n\n if (hasNode1 && hasNode2) {\n ctx.bezierCurveTo(viaNode1.x, viaNode1.y, viaNode2.x, viaNode2.y, this.toPoint.x, this.toPoint.y);\n } else if (hasNode1) {\n ctx.quadraticCurveTo(viaNode1.x, viaNode1.y, this.toPoint.x, this.toPoint.y);\n } else {\n // fallback to normal straight edge\n ctx.lineTo(this.toPoint.x, this.toPoint.y);\n }\n // draw a background\n this.drawBackground(ctx, values);\n\n // draw shadow if enabled\n this.enableShadow(ctx, values);\n ctx.stroke();\n this.disableShadow(ctx, values);\n }\n\n /**\n *\n * @returns {*|{x, y}|{x: undefined, y: undefined}}\n */\n getViaNode() {\n return this._getViaCoordinates();\n }\n}\n\nexport default BezierEdgeBase;\n","import BezierEdgeBase from './BezierEdgeBase'\n\n/**\n * A Base Class for all Cubic Bezier Edges. Bezier curves are used to model\n * smooth gradual curves in paths between nodes.\n *\n * @extends BezierEdgeBase\n */\nclass CubicBezierEdgeBase extends BezierEdgeBase {\n /**\n * @param {Object} options\n * @param {Object} body\n * @param {Label} labelModule\n */\n constructor(options, body, labelModule) {\n super(options, body, labelModule);\n }\n\n /**\n * Calculate the distance between a point (x3,y3) and a line segment from\n * (x1,y1) to (x2,y2).\n * http://stackoverflow.com/questions/849211/shortest-distancae-between-a-point-and-a-line-segment\n * https://en.wikipedia.org/wiki/B%C3%A9zier_curve\n * @param {number} x1 from x\n * @param {number} y1 from y\n * @param {number} x2 to x\n * @param {number} y2 to y\n * @param {number} x3 point to check x\n * @param {number} y3 point to check y\n * @param {Node} via1\n * @param {Node} via2\n * @returns {number}\n * @private\n */\n _getDistanceToBezierEdge(x1, y1, x2, y2, x3, y3, via1, via2) { // x3,y3 is the point\n let minDistance = 1e9;\n let distance;\n let i, t, x, y;\n let lastX = x1;\n let lastY = y1;\n let vec = [0,0,0,0]\n for (i = 1; i < 10; i++) {\n t = 0.1 * i;\n vec[0] = Math.pow(1 - t, 3);\n vec[1] = 3 * t * Math.pow(1 - t, 2);\n vec[2] = 3 * Math.pow(t,2) * (1 - t);\n vec[3] = Math.pow(t, 3);\n x = vec[0] * x1 + vec[1] * via1.x + vec[2] * via2.x + vec[3] * x2;\n y = vec[0] * y1 + vec[1] * via1.y + vec[2] * via2.y + vec[3] * y2;\n if (i > 0) {\n distance = this._getDistanceToLine(lastX, lastY, x, y, x3, y3);\n minDistance = distance < minDistance ? distance : minDistance;\n }\n lastX = x;\n lastY = y;\n }\n\n return minDistance;\n }\n}\n\nexport default CubicBezierEdgeBase;","import CubicBezierEdgeBase from './util/CubicBezierEdgeBase'\n\n/**\n * A Cubic Bezier Edge. Bezier curves are used to model smooth gradual\n * curves in paths between nodes.\n *\n * @extends CubicBezierEdgeBase\n */\nclass CubicBezierEdge extends CubicBezierEdgeBase {\n /**\n * @param {Object} options\n * @param {Object} body\n * @param {Label} labelModule\n */\n constructor(options, body, labelModule) {\n super(options, body, labelModule);\n }\n\n /**\n * Draw a line between two nodes\n * @param {CanvasRenderingContext2D} ctx\n * @param {ArrowOptions} values\n * @param {Array.} viaNodes\n * @private\n */\n _line(ctx, values, viaNodes) {\n // get the coordinates of the support points.\n let via1 = viaNodes[0];\n let via2 = viaNodes[1];\n this._bezierCurve(ctx, values, via1, via2);\n }\n\n /**\n *\n * @returns {Array.<{x: number, y: number}>}\n * @private\n */\n _getViaCoordinates() {\n let dx = this.from.x - this.to.x;\n let dy = this.from.y - this.to.y;\n\n let x1, y1, x2, y2;\n let roundness = this.options.smooth.roundness;\n\n // horizontal if x > y or if direction is forced or if direction is horizontal\n if ((Math.abs(dx) > Math.abs(dy) || this.options.smooth.forceDirection === true || this.options.smooth.forceDirection === 'horizontal') && this.options.smooth.forceDirection !== 'vertical') {\n y1 = this.from.y;\n y2 = this.to.y;\n x1 = this.from.x - roundness * dx;\n x2 = this.to.x + roundness * dx;\n }\n else {\n y1 = this.from.y - roundness * dy;\n y2 = this.to.y + roundness * dy;\n x1 = this.from.x;\n x2 = this.to.x;\n }\n\n return [{x: x1, y: y1},{x: x2, y: y2}];\n }\n\n /**\n *\n * @returns {Array.<{x: number, y: number}>}\n */\n getViaNode() {\n return this._getViaCoordinates();\n }\n\n /**\n *\n * @param {Node} nearNode\n * @param {CanvasRenderingContext2D} ctx\n * @returns {{x: number, y: number, t: number}}\n * @private\n */\n _findBorderPosition(nearNode, ctx) {\n return this._findBorderPositionBezier(nearNode, ctx);\n }\n\n /**\n *\n * @param {number} x1\n * @param {number} y1\n * @param {number} x2\n * @param {number} y2\n * @param {number} x3\n * @param {number} y3\n * @param {Node} via1\n * @param {Node} via2\n * @returns {number}\n * @private\n */\n _getDistanceToEdge(x1, y1, x2, y2, x3, y3, [via1, via2] = this._getViaCoordinates()) { // x3,y3 is the point\n return this._getDistanceToBezierEdge(x1, y1, x2, y2, x3, y3, via1, via2);\n }\n\n /**\n * Combined function of pointOnLine and pointOnBezier. This gives the coordinates of a point on the line at a certain percentage of the way\n * @param {number} percentage\n * @param {{x: number, y: number}} [via1=this._getViaCoordinates()[0]]\n * @param {{x: number, y: number}} [via2=this._getViaCoordinates()[1]]\n * @returns {{x: number, y: number}}\n * @private\n */\n getPoint(percentage, [via1, via2] = this._getViaCoordinates()) {\n let t = percentage;\n let vec = [];\n vec[0] = Math.pow(1 - t, 3);\n vec[1] = 3 * t * Math.pow(1 - t, 2);\n vec[2] = 3 * Math.pow(t,2) * (1 - t);\n vec[3] = Math.pow(t, 3);\n let x = vec[0] * this.fromPoint.x + vec[1] * via1.x + vec[2] * via2.x + vec[3] * this.toPoint.x;\n let y = vec[0] * this.fromPoint.y + vec[1] * via1.y + vec[2] * via2.y + vec[3] * this.toPoint.y;\n\n return {x: x, y: y};\n }\n}\n\n\nexport default CubicBezierEdge;\n","import BezierEdgeBase from './util/BezierEdgeBase'\n\n/**\n * A Dynamic Bezier Edge. Bezier curves are used to model smooth gradual\n * curves in paths between nodes. The Dynamic piece refers to how the curve\n * reacts to physics changes.\n *\n * @extends BezierEdgeBase\n */\nclass BezierEdgeDynamic extends BezierEdgeBase {\n /**\n * @param {Object} options\n * @param {Object} body\n * @param {Label} labelModule\n */\n constructor(options, body, labelModule) {\n //this.via = undefined; // Here for completeness but not allowed to defined before super() is invoked.\n super(options, body, labelModule); // --> this calls the setOptions below\n this._boundFunction = () => {this.positionBezierNode();};\n this.body.emitter.on(\"_repositionBezierNodes\", this._boundFunction);\n }\n\n /**\n *\n * @param {Object} options\n */\n setOptions(options) {\n // check if the physics has changed.\n let physicsChange = false;\n if (this.options.physics !== options.physics) {\n physicsChange = true;\n }\n\n // set the options and the to and from nodes\n this.options = options;\n this.id = this.options.id;\n this.from = this.body.nodes[this.options.from];\n this.to = this.body.nodes[this.options.to];\n\n // setup the support node and connect\n this.setupSupportNode();\n this.connect();\n\n // when we change the physics state of the edge, we reposition the support node.\n if (physicsChange === true) {\n this.via.setOptions({physics: this.options.physics});\n this.positionBezierNode();\n }\n }\n\n /**\n * Connects an edge to node(s)\n */\n connect() {\n this.from = this.body.nodes[this.options.from];\n this.to = this.body.nodes[this.options.to];\n if (this.from === undefined || this.to === undefined || this.options.physics === false) {\n this.via.setOptions({physics:false})\n }\n else {\n // fix weird behaviour where a self referencing node has physics enabled\n if (this.from.id === this.to.id) {\n this.via.setOptions({physics: false})\n }\n else {\n this.via.setOptions({physics: true})\n }\n }\n }\n\n /**\n * remove the support nodes\n * @returns {boolean}\n */\n cleanup() {\n this.body.emitter.off(\"_repositionBezierNodes\", this._boundFunction);\n if (this.via !== undefined) {\n delete this.body.nodes[this.via.id];\n this.via = undefined;\n return true;\n }\n return false;\n }\n\n /**\n * Bezier curves require an anchor point to calculate the smooth flow. These points are nodes. These nodes are invisible but\n * are used for the force calculation.\n *\n * The changed data is not called, if needed, it is returned by the main edge constructor.\n * @private\n */\n setupSupportNode() {\n if (this.via === undefined) {\n var nodeId = \"edgeId:\" + this.id;\n var node = this.body.functions.createNode({\n id: nodeId,\n shape: 'circle',\n physics:true,\n hidden:true\n });\n this.body.nodes[nodeId] = node;\n this.via = node;\n this.via.parentEdgeId = this.id;\n this.positionBezierNode();\n }\n }\n\n /**\n * Positions bezier node\n */\n positionBezierNode() {\n if (this.via !== undefined && this.from !== undefined && this.to !== undefined) {\n this.via.x = 0.5 * (this.from.x + this.to.x);\n this.via.y = 0.5 * (this.from.y + this.to.y);\n }\n else if (this.via !== undefined) {\n this.via.x = 0;\n this.via.y = 0;\n }\n }\n\n /**\n * Draw a line between two nodes\n * @param {CanvasRenderingContext2D} ctx\n * @param {ArrowOptions} values\n * @param {Node} viaNode\n * @private\n */\n _line(ctx, values, viaNode) {\n this._bezierCurve(ctx, values, viaNode);\n }\n\n /**\n *\n * @returns {Node|undefined|*|{index, line, column}}\n */\n getViaNode() {\n return this.via;\n }\n\n\n /**\n * Combined function of pointOnLine and pointOnBezier. This gives the coordinates of a point on the line at a certain percentage of the way\n *\n * @param {number} percentage\n * @param {Node} viaNode\n * @returns {{x: number, y: number}}\n * @private\n */\n getPoint(percentage, viaNode = this.via) {\n let t = percentage;\n let x, y;\n if (this.from === this.to){\n let [cx,cy,cr] = this._getCircleData(this.from);\n let a = 2 * Math.PI * (1 - t);\n x = cx + cr * Math.sin(a);\n y = cy + cr - cr * (1 - Math.cos(a));\n } else {\n x = Math.pow(1 - t, 2) * this.fromPoint.x + 2 * t * (1 - t) * viaNode.x + Math.pow(t, 2) * this.toPoint.x;\n y = Math.pow(1 - t, 2) * this.fromPoint.y + 2 * t * (1 - t) * viaNode.y + Math.pow(t, 2) * this.toPoint.y;\n }\n\n return {x: x, y: y};\n }\n\n /**\n *\n * @param {Node} nearNode\n * @param {CanvasRenderingContext2D} ctx\n * @returns {*}\n * @private\n */\n _findBorderPosition(nearNode, ctx) {\n return this._findBorderPositionBezier(nearNode, ctx, this.via);\n }\n\n /**\n *\n * @param {number} x1\n * @param {number} y1\n * @param {number} x2\n * @param {number} y2\n * @param {number} x3\n * @param {number} y3\n * @returns {number}\n * @private\n */\n _getDistanceToEdge(x1, y1, x2, y2, x3, y3) { // x3,y3 is the point\n return this._getDistanceToBezierEdge(x1, y1, x2, y2, x3, y3, this.via);\n }\n}\n\n\nexport default BezierEdgeDynamic;\n","import BezierEdgeBase from './util/BezierEdgeBase'\n\n/**\n * A Static Bezier Edge. Bezier curves are used to model smooth gradual\n * curves in paths between nodes.\n *\n * @extends BezierEdgeBase\n */\nclass BezierEdgeStatic extends BezierEdgeBase {\n /**\n * @param {Object} options\n * @param {Object} body\n * @param {Label} labelModule\n */\n constructor(options, body, labelModule) {\n super(options, body, labelModule);\n }\n\n /**\n * Draw a line between two nodes\n * @param {CanvasRenderingContext2D} ctx\n * @param {ArrowOptions} values\n * @param {Node} viaNode\n * @private\n */\n _line(ctx, values, viaNode) {\n this._bezierCurve(ctx, values, viaNode);\n }\n\n /**\n *\n * @returns {Array.<{x: number, y: number}>}\n */\n getViaNode() {\n return this._getViaCoordinates();\n }\n\n\n /**\n * We do not use the to and fromPoints here to make the via nodes the same as edges without arrows.\n * @returns {{x: undefined, y: undefined}}\n * @private\n */\n _getViaCoordinates() {\n // Assumption: x/y coordinates in from/to always defined\n let xVia = undefined;\n let yVia = undefined;\n let factor = this.options.smooth.roundness;\n let type = this.options.smooth.type;\n let dx = Math.abs(this.from.x - this.to.x);\n let dy = Math.abs(this.from.y - this.to.y);\n if (type === 'discrete' || type === 'diagonalCross') {\n let stepX;\n let stepY;\n\n if (dx <= dy) {\n stepX = stepY = factor * dy;\n } else {\n stepX = stepY = factor * dx;\n }\n\n if (this.from.x > this.to.x) stepX = -stepX;\n if (this.from.y >= this.to.y) stepY = -stepY;\n\n xVia = this.from.x + stepX;\n yVia = this.from.y + stepY;\n\n if (type === \"discrete\") {\n if (dx <= dy) {\n xVia = dx < factor * dy ? this.from.x : xVia;\n } else {\n yVia = dy < factor * dx ? this.from.y : yVia;\n }\n }\n }\n else if (type === \"straightCross\") {\n let stepX = (1 - factor) * dx;\n let stepY = (1 - factor) * dy;\n\n if (dx <= dy) { // up - down\n stepX = 0;\n if (this.from.y < this.to.y) stepY = -stepY;\n }\n else { // left - right\n if (this.from.x < this.to.x) stepX = -stepX;\n stepY = 0;\n }\n xVia = this.to.x + stepX;\n yVia = this.to.y + stepY;\n }\n else if (type === 'horizontal') {\n let stepX = (1 - factor) * dx;\n if (this.from.x < this.to.x) stepX = -stepX;\n xVia = this.to.x + stepX;\n yVia = this.from.y;\n }\n else if (type === 'vertical') {\n let stepY = (1 - factor) * dy;\n if (this.from.y < this.to.y) stepY = -stepY;\n xVia = this.from.x;\n yVia = this.to.y + stepY;\n }\n else if (type === 'curvedCW') {\n dx = this.to.x - this.from.x;\n dy = this.from.y - this.to.y;\n let radius = Math.sqrt(dx * dx + dy * dy);\n let pi = Math.PI;\n\n let originalAngle = Math.atan2(dy, dx);\n let myAngle = (originalAngle + ((factor * 0.5) + 0.5) * pi) % (2 * pi);\n\n xVia = this.from.x + (factor * 0.5 + 0.5) * radius * Math.sin(myAngle);\n yVia = this.from.y + (factor * 0.5 + 0.5) * radius * Math.cos(myAngle);\n }\n else if (type === 'curvedCCW') {\n dx = this.to.x - this.from.x;\n dy = this.from.y - this.to.y;\n let radius = Math.sqrt(dx * dx + dy * dy);\n let pi = Math.PI;\n\n let originalAngle = Math.atan2(dy, dx);\n let myAngle = (originalAngle + ((-factor * 0.5) + 0.5) * pi) % (2 * pi);\n\n xVia = this.from.x + (factor * 0.5 + 0.5) * radius * Math.sin(myAngle);\n yVia = this.from.y + (factor * 0.5 + 0.5) * radius * Math.cos(myAngle);\n }\n else { // continuous\n let stepX;\n let stepY;\n\n if (dx <= dy) {\n stepX = stepY = factor * dy;\n } else {\n stepX = stepY = factor * dx;\n }\n\n if (this.from.x > this.to.x) stepX = -stepX;\n if (this.from.y >= this.to.y) stepY = -stepY;\n\n xVia = this.from.x + stepX;\n yVia = this.from.y + stepY;\n\n if (dx <= dy) {\n if (this.from.x <= this.to.x) {\n xVia = this.to.x < xVia ? this.to.x : xVia;\n }\n else {\n xVia = this.to.x > xVia ? this.to.x : xVia;\n }\n }\n else {\n if (this.from.y >= this.to.y) {\n yVia = this.to.y > yVia ? this.to.y : yVia;\n } else {\n yVia = this.to.y < yVia ? this.to.y : yVia;\n }\n }\n }\n return {x: xVia, y: yVia};\n }\n\n /**\n *\n * @param {Node} nearNode\n * @param {CanvasRenderingContext2D} ctx\n * @param {Object} options\n * @returns {*}\n * @private\n */\n _findBorderPosition(nearNode, ctx, options = {}) {\n return this._findBorderPositionBezier(nearNode, ctx, options.via);\n }\n\n /**\n *\n * @param {number} x1\n * @param {number} y1\n * @param {number} x2\n * @param {number} y2\n * @param {number} x3\n * @param {number} y3\n * @param {Node} viaNode\n * @returns {number}\n * @private\n */\n _getDistanceToEdge(x1, y1, x2, y2, x3, y3, viaNode = this._getViaCoordinates()) { // x3,y3 is the point\n return this._getDistanceToBezierEdge(x1, y1, x2, y2, x3, y3, viaNode);\n }\n\n /**\n * Combined function of pointOnLine and pointOnBezier. This gives the coordinates of a point on the line at a certain percentage of the way\n * @param {number} percentage\n * @param {Node} viaNode\n * @returns {{x: number, y: number}}\n * @private\n */\n getPoint(percentage, viaNode = this._getViaCoordinates()) {\n var t = percentage;\n var x = Math.pow(1 - t, 2) * this.fromPoint.x + (2 * t * (1 - t)) * viaNode.x + Math.pow(t, 2) * this.toPoint.x;\n var y = Math.pow(1 - t, 2) * this.fromPoint.y + (2 * t * (1 - t)) * viaNode.y + Math.pow(t, 2) * this.toPoint.y;\n\n return {x: x, y: y};\n }\n}\n\n\nexport default BezierEdgeStatic;\n","import EdgeBase from './util/EdgeBase'\n\n/**\n * A Straight Edge.\n *\n * @extends EdgeBase\n */\nclass StraightEdge extends EdgeBase {\n /**\n * @param {Object} options\n * @param {Object} body\n * @param {Label} labelModule\n */\n constructor(options, body, labelModule) {\n super(options, body, labelModule);\n }\n\n /**\n * Draw a line between two nodes\n * @param {CanvasRenderingContext2D} ctx\n * @param {ArrowOptions} values\n * @private\n */\n _line(ctx, values) {\n // draw a straight line\n ctx.beginPath();\n ctx.moveTo(this.fromPoint.x, this.fromPoint.y);\n ctx.lineTo(this.toPoint.x, this.toPoint.y);\n // draw shadow if enabled\n this.enableShadow(ctx, values);\n ctx.stroke();\n this.disableShadow(ctx, values);\n }\n\n /**\n *\n * @returns {undefined}\n */\n getViaNode() {\n return undefined;\n }\n\n /**\n * Combined function of pointOnLine and pointOnBezier. This gives the coordinates of a point on the line at a certain percentage of the way\n *\n * @param {number} percentage\n * @returns {{x: number, y: number}}\n * @private\n */\n getPoint(percentage) {\n return {\n x: (1 - percentage) * this.fromPoint.x + percentage * this.toPoint.x,\n y: (1 - percentage) * this.fromPoint.y + percentage * this.toPoint.y\n }\n }\n\n /**\n *\n * @param {Node} nearNode\n * @param {CanvasRenderingContext2D} ctx\n * @returns {{x: number, y: number}}\n * @private\n */\n _findBorderPosition(nearNode, ctx) {\n let node1 = this.to;\n let node2 = this.from;\n if (nearNode.id === this.from.id) {\n node1 = this.from;\n node2 = this.to;\n }\n\n let angle = Math.atan2((node1.y - node2.y), (node1.x - node2.x));\n let dx = (node1.x - node2.x);\n let dy = (node1.y - node2.y);\n let edgeSegmentLength = Math.sqrt(dx * dx + dy * dy);\n let toBorderDist = nearNode.distanceToBorder(ctx, angle);\n let toBorderPoint = (edgeSegmentLength - toBorderDist) / edgeSegmentLength;\n\n let borderPos = {};\n borderPos.x = (1 - toBorderPoint) * node2.x + toBorderPoint * node1.x;\n borderPos.y = (1 - toBorderPoint) * node2.y + toBorderPoint * node1.y;\n\n return borderPos;\n }\n\n /**\n *\n * @param {number} x1\n * @param {number} y1\n * @param {number} x2\n * @param {number} y2\n * @param {number} x3\n * @param {number} y3\n * @returns {number}\n * @private\n */\n _getDistanceToEdge(x1, y1, x2, y2, x3, y3) { // x3,y3 is the point\n return this._getDistanceToLine(x1, y1, x2, y2, x3, y3);\n }\n\n}\n\nexport default StraightEdge;\n","import util from 'vis-util';\nimport Label from './shared/Label';\nimport ComponentUtil from './shared/ComponentUtil';\nimport CubicBezierEdge from './edges/CubicBezierEdge';\nimport BezierEdgeDynamic from './edges/BezierEdgeDynamic';\nimport BezierEdgeStatic from './edges/BezierEdgeStatic';\nimport StraightEdge from './edges/StraightEdge';\n\n\n/**\n * An edge connects two nodes and has a specific direction.\n */\nclass Edge {\n /**\n * @param {Object} options values specific to this edge, must contain at least 'from' and 'to'\n * @param {Object} body shared state from Network instance\n * @param {Object} globalOptions options from the EdgesHandler instance\n * @param {Object} defaultOptions default options from the EdgeHandler instance. Value and reference are constant\n */\n constructor(options, body, globalOptions, defaultOptions) {\n if (body === undefined) {\n throw new Error(\"No body provided\");\n }\n\n // Since globalOptions is constant in values as well as reference,\n // Following needs to be done only once.\n\n this.options = util.bridgeObject(globalOptions);\n this.globalOptions = globalOptions;\n this.defaultOptions = defaultOptions;\n this.body = body;\n\n // initialize variables\n this.id = undefined;\n this.fromId = undefined;\n this.toId = undefined;\n this.selected = false;\n this.hover = false;\n this.labelDirty = true;\n\n this.baseWidth = this.options.width;\n this.baseFontSize = this.options.font.size;\n\n this.from = undefined; // a node\n this.to = undefined; // a node\n\n this.edgeType = undefined;\n\n this.connected = false;\n\n this.labelModule = new Label(this.body, this.options, true /* It's an edge label */);\n this.setOptions(options);\n }\n\n\n /**\n * Set or overwrite options for the edge\n * @param {Object} options an object with options\n * @returns {null|boolean} null if no options, boolean if date changed\n */\n setOptions(options) {\n if (!options) {\n return;\n }\n\n // record old value of this.options.hidden\n let oldHidden = this.options.hidden\n\n if (oldHidden === undefined || oldHidden === null) {\n oldHidden = false\n }\n\n Edge.parseOptions(this.options, options, true, this.globalOptions);\n\n if (options.id !== undefined) {\n this.id = options.id;\n }\n if (options.from !== undefined) {\n this.fromId = options.from;\n }\n if (options.to !== undefined) {\n this.toId = options.to;\n }\n if (options.title !== undefined) {\n this.title = options.title;\n }\n if (options.value !== undefined) {\n options.value = parseFloat(options.value);\n }\n\n let pile = [options, this.options, this.defaultOptions];\n this.chooser = ComponentUtil.choosify('edge', pile);\n\n // update label Module\n this.updateLabelModule(options);\n\n let dataChanged = this.updateEdgeType();\n\n // if anything has been updates, reset the selection width and the hover width\n this._setInteractionWidths();\n\n // A node is connected when it has a from and to node that both exist in the network.body.nodes.\n this.connect();\n\n let newHidden = this.options.hidden\n\n if (newHidden === undefined || newHidden === null) {\n newHidden = false\n }\n if (newHidden != oldHidden || options.physics !== undefined) {\n dataChanged = true\n }\n\n // there might be a similar problem with physics, but a bug has not been reported\t\n if (options.physics !== undefined) {\n dataChanged = true;\n }\n\n return dataChanged;\n }\n\n\n /**\n *\n * @param {Object} parentOptions\n * @param {Object} newOptions\n * @param {boolean} [allowDeletion=false]\n * @param {Object} [globalOptions={}]\n * @param {boolean} [copyFromGlobals=false]\n */\n static parseOptions(parentOptions, newOptions, allowDeletion = false, globalOptions = {}, copyFromGlobals = false) {\n var fields = [\n 'arrowStrikethrough',\n 'id',\n 'from',\n 'hidden',\n 'hoverWidth',\n 'labelHighlightBold',\n 'length',\n 'line',\n 'opacity',\n 'physics',\n 'scaling',\n 'selectionWidth',\n 'selfReferenceSize',\n 'to',\n 'title',\n 'value',\n 'width',\n 'font',\n 'chosen',\n 'widthConstraint'\n ];\n\n // only deep extend the items in the field array. These do not have shorthand.\n util.selectiveDeepExtend(fields, parentOptions, newOptions, allowDeletion);\n\n // Only copy label if it's a legal value.\n if (ComponentUtil.isValidLabel(newOptions.label)) {\n parentOptions.label = newOptions.label;\n } else if (!ComponentUtil.isValidLabel(parentOptions.label)) {\n parentOptions.label = undefined;\n }\n\n util.mergeOptions(parentOptions, newOptions, 'smooth', globalOptions);\n util.mergeOptions(parentOptions, newOptions, 'shadow', globalOptions);\n util.mergeOptions(parentOptions, newOptions, 'background', globalOptions);\n\n if (newOptions.dashes !== undefined && newOptions.dashes !== null) {\n parentOptions.dashes = newOptions.dashes;\n }\n else if (allowDeletion === true && newOptions.dashes === null) {\n parentOptions.dashes = Object.create(globalOptions.dashes); // this sets the pointer of the option back to the global option.\n }\n\n // set the scaling newOptions\n if (newOptions.scaling !== undefined && newOptions.scaling !== null) {\n if (newOptions.scaling.min !== undefined) {parentOptions.scaling.min = newOptions.scaling.min;}\n if (newOptions.scaling.max !== undefined) {parentOptions.scaling.max = newOptions.scaling.max;}\n util.mergeOptions(parentOptions.scaling, newOptions.scaling, 'label', globalOptions.scaling);\n }\n else if (allowDeletion === true && newOptions.scaling === null) {\n parentOptions.scaling = Object.create(globalOptions.scaling); // this sets the pointer of the option back to the global option.\n }\n\n // handle multiple input cases for arrows\n if (newOptions.arrows !== undefined && newOptions.arrows !== null) {\n if (typeof newOptions.arrows === 'string') {\n let arrows = newOptions.arrows.toLowerCase();\n parentOptions.arrows.to.enabled = arrows.indexOf(\"to\") != -1;\n parentOptions.arrows.middle.enabled = arrows.indexOf(\"middle\") != -1;\n parentOptions.arrows.from.enabled = arrows.indexOf(\"from\") != -1;\n }\n else if (typeof newOptions.arrows === 'object') {\n util.mergeOptions(parentOptions.arrows, newOptions.arrows, 'to', globalOptions.arrows);\n util.mergeOptions(parentOptions.arrows, newOptions.arrows, 'middle', globalOptions.arrows);\n util.mergeOptions(parentOptions.arrows, newOptions.arrows, 'from', globalOptions.arrows);\n }\n else {\n throw new Error(\"The arrow newOptions can only be an object or a string. Refer to the documentation. You used:\" + JSON.stringify(newOptions.arrows));\n }\n }\n else if (allowDeletion === true && newOptions.arrows === null) {\n parentOptions.arrows = Object.create(globalOptions.arrows); // this sets the pointer of the option back to the global option.\n }\n\n // handle multiple input cases for color\n if (newOptions.color !== undefined && newOptions.color !== null) {\n let fromColor = newOptions.color;\n let toColor = parentOptions.color;\n\n // If passed, fill in values from default options - required in the case of no prototype bridging\n if (copyFromGlobals) {\n util.deepExtend(toColor, globalOptions.color, false, allowDeletion);\n } else {\n // Clear local properties - need to do it like this in order to retain prototype bridges\n for (var i in toColor) {\n if (toColor.hasOwnProperty(i)) {\n delete toColor[i];\n }\n }\n }\n\n if (util.isString(toColor)) {\n toColor.color = toColor;\n toColor.highlight = toColor;\n toColor.hover = toColor;\n toColor.inherit = false;\n if (fromColor.opacity === undefined) {\n toColor.opacity = 1.0; // set default\n }\n }\n else {\n let colorsDefined = false;\n if (fromColor.color !== undefined) {toColor.color = fromColor.color; colorsDefined = true;}\n if (fromColor.highlight !== undefined) {toColor.highlight = fromColor.highlight; colorsDefined = true;}\n if (fromColor.hover !== undefined) {toColor.hover = fromColor.hover; colorsDefined = true;}\n if (fromColor.inherit !== undefined) {toColor.inherit = fromColor.inherit;}\n if (fromColor.opacity !== undefined) {toColor.opacity = Math.min(1,Math.max(0,fromColor.opacity));}\n\n if (colorsDefined === true) {\n toColor.inherit = false;\n } else {\n if (toColor.inherit === undefined) {\n toColor.inherit = 'from'; // Set default\n }\n }\n }\n }\n else if (allowDeletion === true && newOptions.color === null) {\n parentOptions.color = util.bridgeObject(globalOptions.color); // set the object back to the global options\n }\n\n if (allowDeletion === true && newOptions.font === null) {\n parentOptions.font = util.bridgeObject(globalOptions.font); // set the object back to the global options\n }\n }\n\n\n /**\n *\n * @returns {ArrowOptions}\n */\n getFormattingValues() {\n let toArrow = (this.options.arrows.to === true) || (this.options.arrows.to.enabled === true)\n let fromArrow = (this.options.arrows.from === true) || (this.options.arrows.from.enabled === true)\n let middleArrow = (this.options.arrows.middle === true) || (this.options.arrows.middle.enabled === true)\n let inheritsColor = this.options.color.inherit;\n let values = {\n toArrow: toArrow,\n toArrowScale: this.options.arrows.to.scaleFactor,\n toArrowType: this.options.arrows.to.type,\n middleArrow: middleArrow,\n middleArrowScale: this.options.arrows.middle.scaleFactor,\n middleArrowType: this.options.arrows.middle.type,\n fromArrow: fromArrow,\n fromArrowScale: this.options.arrows.from.scaleFactor,\n fromArrowType: this.options.arrows.from.type,\n arrowStrikethrough: this.options.arrowStrikethrough,\n color: (inheritsColor? undefined : this.options.color.color),\n inheritsColor: inheritsColor,\n opacity: this.options.color.opacity,\n hidden: this.options.hidden,\n length: this.options.length,\n shadow: this.options.shadow.enabled,\n shadowColor: this.options.shadow.color,\n shadowSize: this.options.shadow.size,\n shadowX: this.options.shadow.x,\n shadowY: this.options.shadow.y,\n dashes: this.options.dashes,\n width: this.options.width,\n background: this.options.background.enabled,\n backgroundColor: this.options.background.color,\n backgroundSize: this.options.background.size,\n backgroundDashes: this.options.background.dashes\n };\n if (this.selected || this.hover) {\n if (this.chooser === true) {\n if (this.selected) {\n let selectedWidth = this.options.selectionWidth;\n if (typeof selectedWidth === 'function') {\n values.width = selectedWidth(values.width);\n } else if (typeof selectedWidth === 'number') {\n values.width += selectedWidth;\n }\n values.width = Math.max(values.width, 0.3 / this.body.view.scale);\n values.color = this.options.color.highlight;\n values.shadow = this.options.shadow.enabled;\n } else if (this.hover) {\n let hoverWidth = this.options.hoverWidth;\n if (typeof hoverWidth === 'function') {\n values.width = hoverWidth(values.width);\n } else if (typeof hoverWidth === 'number') {\n values.width += hoverWidth;\n }\n values.width = Math.max(values.width, 0.3 / this.body.view.scale);\n values.color = this.options.color.hover;\n values.shadow = this.options.shadow.enabled;\n }\n } else if (typeof this.chooser === 'function') {\n this.chooser(values, this.options.id, this.selected, this.hover);\n if (values.color !== undefined) {\n values.inheritsColor = false;\n }\n if (values.shadow === false) {\n if ((values.shadowColor !== this.options.shadow.color) ||\n (values.shadowSize !== this.options.shadow.size) ||\n (values.shadowX !== this.options.shadow.x) ||\n (values.shadowY !== this.options.shadow.y)) {\n values.shadow = true;\n }\n }\n }\n } else {\n values.shadow = this.options.shadow.enabled;\n values.width = Math.max(values.width, 0.3 / this.body.view.scale);\n }\n return values;\n }\n\n /**\n * update the options in the label module\n *\n * @param {Object} options\n */\n updateLabelModule(options) {\n let pile = [\n options,\n this.options,\n this.globalOptions, // Currently set global edge options\n this.defaultOptions\n ];\n\n this.labelModule.update(this.options, pile);\n\n if (this.labelModule.baseSize !== undefined) {\n this.baseFontSize = this.labelModule.baseSize;\n }\n }\n\n /**\n * update the edge type, set the options\n * @returns {boolean}\n */\n updateEdgeType() {\n let smooth = this.options.smooth;\n let dataChanged = false;\n let changeInType = true;\n if (this.edgeType !== undefined) {\n if ((((this.edgeType instanceof BezierEdgeDynamic) &&\n (smooth.enabled === true) &&\n (smooth.type === 'dynamic'))) ||\n (((this.edgeType instanceof CubicBezierEdge) &&\n (smooth.enabled === true) &&\n (smooth.type === 'cubicBezier'))) ||\n (((this.edgeType instanceof BezierEdgeStatic) &&\n (smooth.enabled === true) &&\n (smooth.type !== 'dynamic') &&\n (smooth.type !== 'cubicBezier'))) ||\n (((this.edgeType instanceof StraightEdge) &&\n (smooth.type.enabled === false)))) {\n changeInType = false;\n }\n if (changeInType === true) {\n dataChanged = this.cleanup();\n }\n }\n if (changeInType === true) {\n if (smooth.enabled === true) {\n if (smooth.type === 'dynamic') {\n dataChanged = true;\n this.edgeType = new BezierEdgeDynamic(this.options, this.body, this.labelModule);\n } else if (smooth.type === 'cubicBezier') {\n this.edgeType = new CubicBezierEdge(this.options, this.body, this.labelModule);\n } else {\n this.edgeType = new BezierEdgeStatic(this.options, this.body, this.labelModule);\n }\n } else {\n this.edgeType = new StraightEdge(this.options, this.body, this.labelModule);\n }\n } else { // if nothing changes, we just set the options.\n this.edgeType.setOptions(this.options);\n }\n return dataChanged;\n }\n\n /**\n * Connect an edge to its nodes\n */\n connect() {\n this.disconnect();\n\n this.from = this.body.nodes[this.fromId] || undefined;\n this.to = this.body.nodes[this.toId] || undefined;\n this.connected = (this.from !== undefined && this.to !== undefined);\n\n if (this.connected === true) {\n this.from.attachEdge(this);\n this.to.attachEdge(this);\n }\n else {\n if (this.from) {\n this.from.detachEdge(this);\n }\n if (this.to) {\n this.to.detachEdge(this);\n }\n }\n\n this.edgeType.connect();\n }\n\n\n /**\n * Disconnect an edge from its nodes\n */\n disconnect() {\n if (this.from) {\n this.from.detachEdge(this);\n this.from = undefined;\n }\n if (this.to) {\n this.to.detachEdge(this);\n this.to = undefined;\n }\n\n this.connected = false;\n }\n\n\n /**\n * get the title of this edge.\n * @return {string} title The title of the edge, or undefined when no title\n * has been set.\n */\n getTitle() {\n return this.title;\n }\n\n\n /**\n * check if this node is selecte\n * @return {boolean} selected True if node is selected, else false\n */\n isSelected() {\n return this.selected;\n }\n\n\n /**\n * Retrieve the value of the edge. Can be undefined\n * @return {number} value\n */\n getValue() {\n return this.options.value;\n }\n\n\n /**\n * Adjust the value range of the edge. The edge will adjust it's width\n * based on its value.\n * @param {number} min\n * @param {number} max\n * @param {number} total\n */\n setValueRange(min, max, total) {\n if (this.options.value !== undefined) {\n var scale = this.options.scaling.customScalingFunction(min, max, total, this.options.value);\n var widthDiff = this.options.scaling.max - this.options.scaling.min;\n if (this.options.scaling.label.enabled === true) {\n var fontDiff = this.options.scaling.label.max - this.options.scaling.label.min;\n this.options.font.size = this.options.scaling.label.min + scale * fontDiff;\n }\n this.options.width = this.options.scaling.min + scale * widthDiff;\n }\n else {\n this.options.width = this.baseWidth;\n this.options.font.size = this.baseFontSize;\n }\n\n this._setInteractionWidths();\n this.updateLabelModule();\n }\n\n /**\n *\n * @private\n */\n _setInteractionWidths() {\n if (typeof this.options.hoverWidth === 'function') {\n this.edgeType.hoverWidth = this.options.hoverWidth(this.options.width);\n } else {\n this.edgeType.hoverWidth = this.options.hoverWidth + this.options.width;\n }\n if (typeof this.options.selectionWidth === 'function') {\n this.edgeType.selectionWidth = this.options.selectionWidth(this.options.width);\n } else {\n this.edgeType.selectionWidth = this.options.selectionWidth + this.options.width;\n }\n }\n\n\n /**\n * Redraw a edge\n * Draw this edge in the given canvas\n * The 2d context of a HTML canvas can be retrieved by canvas.getContext(\"2d\");\n * @param {CanvasRenderingContext2D} ctx\n */\n draw(ctx) {\n let values = this.getFormattingValues();\n if (values.hidden) {\n return;\n }\n\n // get the via node from the edge type\n let viaNode = this.edgeType.getViaNode();\n let arrowData = {};\n\n // restore edge targets to defaults\n this.edgeType.fromPoint = this.edgeType.from;\n this.edgeType.toPoint = this.edgeType.to;\n\n // from and to arrows give a different end point for edges. we set them here\n if (values.fromArrow) {\n arrowData.from = this.edgeType.getArrowData(ctx, 'from', viaNode, this.selected, this.hover, values);\n if (values.arrowStrikethrough === false)\n this.edgeType.fromPoint = arrowData.from.core;\n }\n if (values.toArrow) {\n arrowData.to = this.edgeType.getArrowData(ctx, 'to', viaNode, this.selected, this.hover, values);\n if (values.arrowStrikethrough === false)\n this.edgeType.toPoint = arrowData.to.core;\n }\n\n // the middle arrow depends on the line, which can depend on the to and from arrows so we do this one lastly.\n if (values.middleArrow) {\n arrowData.middle = this.edgeType.getArrowData(ctx,'middle', viaNode, this.selected, this.hover, values);\n }\n\n // draw everything\n this.edgeType.drawLine(ctx, values, this.selected, this.hover, viaNode);\n this.drawArrows(ctx, arrowData, values);\n this.drawLabel(ctx, viaNode);\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {Object} arrowData\n * @param {ArrowOptions} values\n */\n drawArrows(ctx, arrowData, values) {\n if (values.fromArrow) {\n this.edgeType.drawArrowHead(ctx, values, this.selected, this.hover, arrowData.from);\n }\n if (values.middleArrow) {\n this.edgeType.drawArrowHead(ctx, values, this.selected, this.hover, arrowData.middle);\n }\n if (values.toArrow) {\n this.edgeType.drawArrowHead(ctx, values, this.selected, this.hover, arrowData.to);\n }\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {Node} viaNode\n */\n drawLabel(ctx, viaNode) {\n if (this.options.label !== undefined) {\n // set style\n var node1 = this.from;\n var node2 = this.to;\n\n if (this.labelModule.differentState(this.selected, this.hover)) {\n this.labelModule.getTextSize(ctx, this.selected, this.hover);\n }\n\n if (node1.id != node2.id) {\n this.labelModule.pointToSelf = false;\n var point = this.edgeType.getPoint(0.5, viaNode);\n ctx.save();\n\n let rotationPoint = this._getRotation(ctx);\n if (rotationPoint.angle != 0) {\n ctx.translate(rotationPoint.x, rotationPoint.y);\n ctx.rotate(rotationPoint.angle);\n }\n\n // draw the label\n this.labelModule.draw(ctx, point.x, point.y, this.selected, this.hover);\n\n/*\n // Useful debug code: draw a border around the label\n // This should **not** be enabled in production!\n var size = this.labelModule.getSize();; // ;; intentional so lint catches it\n ctx.strokeStyle = \"#ff0000\";\n ctx.strokeRect(size.left, size.top, size.width, size.height);\n // End debug code\n*/\n\n ctx.restore();\n }\n else {\n // Ignore the orientations.\n this.labelModule.pointToSelf = true;\n var x, y;\n var radius = this.options.selfReferenceSize;\n if (node1.shape.width > node1.shape.height) {\n x = node1.x + node1.shape.width * 0.5;\n y = node1.y - radius;\n }\n else {\n x = node1.x + radius;\n y = node1.y - node1.shape.height * 0.5;\n }\n point = this._pointOnCircle(x, y, radius, 0.125);\n this.labelModule.draw(ctx, point.x, point.y, this.selected, this.hover);\n }\n }\n }\n\n\n /**\n * Determine all visual elements of this edge instance, in which the given\n * point falls within the bounding shape.\n *\n * @param {point} point\n * @returns {Array.} list with the items which are on the point\n */\n getItemsOnPoint(point) {\n var ret = [];\n\n if (this.labelModule.visible()) {\n let rotationPoint = this._getRotation();\n if (ComponentUtil.pointInRect(this.labelModule.getSize(), point, rotationPoint)) {\n ret.push({edgeId:this.id, labelId:0});\n }\n }\n\n let obj = {\n left: point.x,\n top: point.y\n };\n\n if (this.isOverlappingWith(obj)) {\n ret.push({edgeId:this.id});\n }\n\n return ret;\n }\n\n\n /**\n * Check if this object is overlapping with the provided object\n * @param {Object} obj an object with parameters left, top\n * @return {boolean} True if location is located on the edge\n */\n isOverlappingWith(obj) {\n if (this.connected) {\n var distMax = 10;\n var xFrom = this.from.x;\n var yFrom = this.from.y;\n var xTo = this.to.x;\n var yTo = this.to.y;\n var xObj = obj.left;\n var yObj = obj.top;\n\n var dist = this.edgeType.getDistanceToEdge(xFrom, yFrom, xTo, yTo, xObj, yObj);\n\n return (dist < distMax);\n }\n else {\n return false\n }\n }\n\n\n /** \n * Determine the rotation point, if any.\n *\n * @param {CanvasRenderingContext2D} [ctx] if passed, do a recalculation of the label size\n * @returns {rotationPoint} the point to rotate around and the angle in radians to rotate\n * @private\n */\n _getRotation(ctx) {\n let viaNode = this.edgeType.getViaNode();\n let point = this.edgeType.getPoint(0.5, viaNode);\n\n if (ctx !== undefined) {\n this.labelModule.calculateLabelSize(ctx, this.selected, this.hover, point.x, point.y);\n }\n\n let ret = {\n x: point.x,\n y: this.labelModule.size.yLine,\n angle: 0\n };\n\n if (!this.labelModule.visible()) {\n return ret; // Don't even bother doing the atan2, there's nothing to draw\n }\n\n if (this.options.font.align === \"horizontal\") {\n return ret; // No need to calculate angle\n }\n\n var dy = this.from.y - this.to.y;\n var dx = this.from.x - this.to.x;\n var angle = Math.atan2(dy, dx); // radians\n\n // rotate so that label is readable\n if ((angle < -1 && dx < 0) || (angle > 0 && dx < 0)) {\n angle += Math.PI;\n }\n ret.angle = angle;\n\n return ret;\n }\n\n\n /**\n * Get a point on a circle\n * @param {number} x\n * @param {number} y\n * @param {number} radius\n * @param {number} percentage Value between 0 (line start) and 1 (line end)\n * @return {Object} point\n * @private\n */\n _pointOnCircle(x, y, radius, percentage) {\n var angle = percentage * 2 * Math.PI;\n return {\n x: x + radius * Math.cos(angle),\n y: y - radius * Math.sin(angle)\n }\n }\n\n /**\n * Sets selected state to true\n */\n select() {\n this.selected = true;\n }\n\n /**\n * Sets selected state to false\n */\n unselect() {\n this.selected = false;\n }\n\n\n /**\n * cleans all required things on delete\n * @returns {*}\n */\n cleanup() {\n return this.edgeType.cleanup();\n }\n\n\n /**\n * Remove edge from the list and perform necessary cleanup.\n */\n remove() {\n this.cleanup();\n this.disconnect();\n delete this.body.edges[this.id];\n }\n\n\n /**\n * Check if both connecting nodes exist\n * @returns {boolean}\n */\n endPointsValid() {\n return this.body.nodes[this.fromId] !== undefined\n && this.body.nodes[this.toId] !== undefined;\n }\n}\n\nexport default Edge;\n","import util from 'vis-util';\nimport { DataSet, DataView } from 'vis-data';\nimport Edge from './components/Edge';\n\n/**\n * Handler for Edges\n */\nclass EdgesHandler {\n /**\n * @param {Object} body\n * @param {Array.} images\n * @param {Array.} groups\n */\n constructor(body, images, groups) {\n this.body = body;\n this.images = images;\n this.groups = groups;\n\n // create the edge API in the body container\n this.body.functions.createEdge = this.create.bind(this);\n\n this.edgesListeners = {\n add: (event, params) => {this.add(params.items);},\n update: (event, params) => {this.update(params.items);},\n remove: (event, params) => {this.remove(params.items);}\n };\n\n this.options = {};\n this.defaultOptions = {\n arrows: {\n to: {enabled: false, scaleFactor:1, type: 'arrow'},// boolean / {arrowScaleFactor:1} / {enabled: false, arrowScaleFactor:1}\n middle: {enabled: false, scaleFactor:1, type: 'arrow'},\n from: {enabled: false, scaleFactor:1, type: 'arrow'}\n },\n arrowStrikethrough: true,\n color: {\n color:'#848484',\n highlight:'#848484',\n hover: '#848484',\n inherit: 'from',\n opacity:1.0\n },\n dashes: false,\n font: {\n color: '#343434',\n size: 14, // px\n face: 'arial',\n background: 'none',\n strokeWidth: 2, // px\n strokeColor: '#ffffff',\n align:'horizontal',\n multi: false,\n vadjust: 0,\n bold: {\n mod: 'bold'\n },\n boldital: {\n mod: 'bold italic'\n },\n ital: {\n mod: 'italic'\n },\n mono: {\n mod: '',\n size: 15, // px\n face: 'courier new',\n vadjust: 2\n }\n },\n hidden: false,\n hoverWidth: 1.5,\n label: undefined,\n labelHighlightBold: true,\n length: undefined,\n physics: true,\n scaling:{\n min: 1,\n max: 15,\n label: {\n enabled: true,\n min: 14,\n max: 30,\n maxVisible: 30,\n drawThreshold: 5\n },\n customScalingFunction: function (min,max,total,value) {\n if (max === min) {\n return 0.5;\n }\n else {\n var scale = 1 / (max - min);\n return Math.max(0,(value - min)*scale);\n }\n }\n },\n selectionWidth: 1.5,\n selfReferenceSize:20,\n shadow:{\n enabled: false,\n color: 'rgba(0,0,0,0.5)',\n size:10,\n x:5,\n y:5\n },\n background:{\n enabled: false,\n color: 'rgba(111,111,111,1)',\n size:10,\n dashes: false\n },\n smooth: {\n enabled: true,\n type: \"dynamic\",\n forceDirection:'none',\n roundness: 0.5\n },\n title:undefined,\n width: 1,\n value: undefined\n };\n\n util.deepExtend(this.options, this.defaultOptions);\n\n this.bindEventListeners();\n }\n\n /**\n * Binds event listeners\n */\n bindEventListeners() {\n // this allows external modules to force all dynamic curves to turn static.\n this.body.emitter.on(\"_forceDisableDynamicCurves\", (type, emit = true) => {\n if (type === 'dynamic') {\n type = 'continuous';\n }\n let dataChanged = false;\n for (let edgeId in this.body.edges) {\n if (this.body.edges.hasOwnProperty(edgeId)) {\n let edge = this.body.edges[edgeId];\n let edgeData = this.body.data.edges._data[edgeId];\n\n // only forcibly remove the smooth curve if the data has been set of the edge has the smooth curves defined.\n // this is because a change in the global would not affect these curves.\n if (edgeData !== undefined) {\n let smoothOptions = edgeData.smooth;\n if (smoothOptions !== undefined) {\n if (smoothOptions.enabled === true && smoothOptions.type === 'dynamic') {\n if (type === undefined) {\n edge.setOptions({smooth: false});\n }\n else {\n edge.setOptions({smooth: {type: type}});\n }\n dataChanged = true;\n }\n }\n }\n }\n }\n if (emit === true && dataChanged === true) {\n this.body.emitter.emit(\"_dataChanged\");\n }\n });\n\n // this is called when options of EXISTING nodes or edges have changed.\n //\n // NOTE: Not true, called when options have NOT changed, for both existing as well as new nodes.\n // See update() for logic.\n // TODO: Verify and examine the consequences of this. It might still trigger when\n // non-option fields have changed, but then reconnecting edges is still useless.\n // Alternatively, it might also be called when edges are removed.\n //\n this.body.emitter.on(\"_dataUpdated\", () => {\n this.reconnectEdges();\n });\n\n // refresh the edges. Used when reverting from hierarchical layout\n this.body.emitter.on(\"refreshEdges\", this.refresh.bind(this));\n this.body.emitter.on(\"refresh\", this.refresh.bind(this));\n this.body.emitter.on(\"destroy\", () => {\n util.forEach(this.edgesListeners, (callback, event) => {\n if (this.body.data.edges)\n this.body.data.edges.off(event, callback);\n });\n delete this.body.functions.createEdge;\n delete this.edgesListeners.add;\n delete this.edgesListeners.update;\n delete this.edgesListeners.remove;\n delete this.edgesListeners;\n });\n\n }\n\n /**\n *\n * @param {Object} options\n */\n setOptions(options) {\n if (options !== undefined) {\n // use the parser from the Edge class to fill in all shorthand notations\n Edge.parseOptions(this.options, options, true, this.defaultOptions, true);\n\n // update smooth settings in all edges\n let dataChanged = false;\n if (options.smooth !== undefined) {\n for (let edgeId in this.body.edges) {\n if (this.body.edges.hasOwnProperty(edgeId)) {\n dataChanged = this.body.edges[edgeId].updateEdgeType() || dataChanged;\n }\n }\n }\n\n // update fonts in all edges\n if (options.font !== undefined) {\n for (let edgeId in this.body.edges) {\n if (this.body.edges.hasOwnProperty(edgeId)) {\n this.body.edges[edgeId].updateLabelModule();\n }\n }\n }\n\n // update the state of the variables if needed\n if (options.hidden !== undefined || options.physics !== undefined || dataChanged === true) {\n this.body.emitter.emit('_dataChanged');\n }\n }\n }\n\n\n /**\n * Load edges by reading the data table\n * @param {Array | DataSet | DataView} edges The data containing the edges.\n * @param {boolean} [doNotEmit=false]\n * @private\n */\n setData(edges, doNotEmit = false) {\n var oldEdgesData = this.body.data.edges;\n\n if (edges instanceof DataSet || edges instanceof DataView) {\n this.body.data.edges = edges;\n }\n else if (Array.isArray(edges)) {\n this.body.data.edges = new DataSet();\n this.body.data.edges.add(edges);\n }\n else if (!edges) {\n this.body.data.edges = new DataSet();\n }\n else {\n throw new TypeError('Array or DataSet expected');\n }\n\n // TODO: is this null or undefined or false?\n if (oldEdgesData) {\n // unsubscribe from old dataset\n util.forEach(this.edgesListeners, (callback, event) => {oldEdgesData.off(event, callback);});\n }\n\n // remove drawn edges\n this.body.edges = {};\n\n // TODO: is this null or undefined or false?\n if (this.body.data.edges) {\n // subscribe to new dataset\n util.forEach(this.edgesListeners, (callback, event) => {this.body.data.edges.on(event, callback);});\n\n // draw all new nodes\n var ids = this.body.data.edges.getIds();\n this.add(ids, true);\n }\n\n this.body.emitter.emit('_adjustEdgesForHierarchicalLayout');\n if (doNotEmit === false) {\n this.body.emitter.emit(\"_dataChanged\");\n }\n }\n\n\n /**\n * Add edges\n * @param {number[] | string[]} ids\n * @param {boolean} [doNotEmit=false]\n * @private\n */\n add(ids, doNotEmit = false) {\n var edges = this.body.edges;\n var edgesData = this.body.data.edges;\n\n for (let i = 0; i < ids.length; i++) {\n var id = ids[i];\n\n var oldEdge = edges[id];\n if (oldEdge) {\n oldEdge.disconnect();\n }\n\n var data = edgesData.get(id, {\"showInternalIds\" : true});\n edges[id] = this.create(data);\n }\n\n this.body.emitter.emit('_adjustEdgesForHierarchicalLayout');\n\n if (doNotEmit === false) {\n this.body.emitter.emit(\"_dataChanged\");\n }\n }\n\n\n\n /**\n * Update existing edges, or create them when not yet existing\n * @param {number[] | string[]} ids\n * @private\n */\n update(ids) {\n var edges = this.body.edges;\n var edgesData = this.body.data.edges;\n var dataChanged = false;\n for (var i = 0; i < ids.length; i++) {\n var id = ids[i];\n var data = edgesData.get(id);\n var edge = edges[id];\n if (edge !== undefined) {\n // update edge\n edge.disconnect();\n dataChanged = edge.setOptions(data) || dataChanged; // if a support node is added, data can be changed.\n edge.connect();\n }\n else {\n // create edge\n this.body.edges[id] = this.create(data);\n dataChanged = true;\n }\n }\n\n if (dataChanged === true) {\n this.body.emitter.emit('_adjustEdgesForHierarchicalLayout');\n this.body.emitter.emit(\"_dataChanged\");\n }\n else {\n this.body.emitter.emit(\"_dataUpdated\");\n }\n }\n\n\n /**\n * Remove existing edges. Non existing ids will be ignored\n * @param {number[] | string[]} ids\n * @param {boolean} [emit=true]\n * @private\n */\n remove(ids, emit = true) {\n if (ids.length === 0) return; // early out\n\n var edges = this.body.edges;\n util.forEach(ids, (id) => {\n var edge = edges[id];\n if (edge !== undefined) {\n edge.remove();\n }\n });\n\n if (emit) {\n this.body.emitter.emit(\"_dataChanged\");\n }\n }\n\n /**\n * Refreshes Edge Handler\n */\n refresh() {\n util.forEach(this.body.edges, (edge, edgeId) => {\n let data = this.body.data.edges._data[edgeId];\n if (data !== undefined) {\n edge.setOptions(data);\n }\n });\n }\n\n /**\n *\n * @param {Object} properties\n * @returns {Edge}\n */\n create(properties) {\n return new Edge(properties, this.body, this.options, this.defaultOptions)\n }\n\n /**\n * Reconnect all edges\n * @private\n */\n reconnectEdges() {\n var id;\n var nodes = this.body.nodes;\n var edges = this.body.edges;\n\n for (id in nodes) {\n if (nodes.hasOwnProperty(id)) {\n nodes[id].edges = [];\n }\n }\n\n for (id in edges) {\n if (edges.hasOwnProperty(id)) {\n var edge = edges[id];\n edge.from = null;\n edge.to = null;\n edge.connect();\n }\n }\n }\n\n /**\n *\n * @param {Edge.id} edgeId\n * @returns {Array}\n */\n getConnectedNodes(edgeId) {\n let nodeList = [];\n if (this.body.edges[edgeId] !== undefined) {\n let edge = this.body.edges[edgeId];\n if (edge.fromId !== undefined) {nodeList.push(edge.fromId);}\n if (edge.toId !== undefined) {nodeList.push(edge.toId);}\n }\n return nodeList;\n }\n\n /**\n * There is no direct relation between the nodes and the edges DataSet,\n * so the right place to do call this is in the handler for event `_dataUpdated`.\n */\n _updateState() {\n this._addMissingEdges();\n this._removeInvalidEdges();\n }\n\n /**\n * Scan for missing nodes and remove corresponding edges, if any.\n * @private\n */\n _removeInvalidEdges() {\n \n let edgesToDelete = [];\n\n util.forEach(this.body.edges, (edge, id) => {\n let toNode = this.body.nodes[edge.toId];\n let fromNode = this.body.nodes[edge.fromId];\n\n // Skip clustering edges here, let the Clustering module handle those\n if ((toNode !== undefined && toNode.isCluster === true)\n || (fromNode !== undefined && fromNode.isCluster === true)) {\n return;\n }\n\n if (toNode === undefined || fromNode === undefined) {\n edgesToDelete.push(id);\n }\n });\n\n this.remove(edgesToDelete, false);\n }\n\n /**\n * add all edges from dataset that are not in the cached state\n * @private\n */ \n _addMissingEdges() {\n let edgesData = this.body.data.edges;\n if (edgesData === undefined || edgesData === null) {\n return; // No edges DataSet yet; can happen on startup \n }\n\n let edges = this.body.edges;\n let addIds = [];\n\n edgesData.forEach((edgeData, edgeId) => {\n let edge = edges[edgeId];\n if(edge===undefined) {\n addIds.push(edgeId);\n }\n });\n \n this.add(addIds,true);\n } \n}\n\nexport default EdgesHandler;\n","/**\n * Barnes Hut Solver\n */\nclass BarnesHutSolver {\n /**\n * @param {Object} body\n * @param {{physicsNodeIndices: Array, physicsEdgeIndices: Array, forces: {}, velocities: {}}} physicsBody\n * @param {Object} options\n */\n constructor(body, physicsBody, options) {\n this.body = body;\n this.physicsBody = physicsBody;\n this.barnesHutTree;\n this.setOptions(options);\n this.randomSeed = 5;\n\n // debug: show grid\n // this.body.emitter.on(\"afterDrawing\", (ctx) => {this._debug(ctx,'#ff0000')})\n }\n\n /**\n *\n * @param {Object} options\n */\n setOptions(options) {\n this.options = options;\n this.thetaInversed = 1 / this.options.theta;\n\n // if 1 then min distance = 0.5, if 0.5 then min distance = 0.5 + 0.5*node.shape.radius\n this.overlapAvoidanceFactor = 1 - Math.max(0, Math.min(1, this.options.avoidOverlap));\n }\n\n /**\n *\n * @returns {number} random integer\n */\n seededRandom() {\n var x = Math.sin(this.randomSeed++) * 10000;\n return x - Math.floor(x);\n }\n\n\n /**\n * This function calculates the forces the nodes apply on each other based on a gravitational model.\n * The Barnes Hut method is used to speed up this N-body simulation.\n *\n * @private\n */\n solve() {\n if (this.options.gravitationalConstant !== 0 && this.physicsBody.physicsNodeIndices.length > 0) {\n let node;\n let nodes = this.body.nodes;\n let nodeIndices = this.physicsBody.physicsNodeIndices;\n let nodeCount = nodeIndices.length;\n\n // create the tree\n let barnesHutTree = this._formBarnesHutTree(nodes, nodeIndices);\n\n // for debugging\n this.barnesHutTree = barnesHutTree;\n\n // place the nodes one by one recursively\n for (let i = 0; i < nodeCount; i++) {\n node = nodes[nodeIndices[i]];\n if (node.options.mass > 0) {\n // starting with root is irrelevant, it never passes the BarnesHutSolver condition\n this._getForceContributions(barnesHutTree.root, node);\n }\n }\n }\n }\n\n\n /**\n * @param {Object} parentBranch\n * @param {Node} node\n * @private\n */\n _getForceContributions(parentBranch, node) {\n this._getForceContribution(parentBranch.children.NW, node);\n this._getForceContribution(parentBranch.children.NE, node);\n this._getForceContribution(parentBranch.children.SW, node);\n this._getForceContribution(parentBranch.children.SE, node);\n }\n\n\n /**\n * This function traverses the barnesHutTree. It checks when it can approximate distant nodes with their center of mass.\n * If a region contains a single node, we check if it is not itself, then we apply the force.\n *\n * @param {Object} parentBranch\n * @param {Node} node\n * @private\n */\n _getForceContribution(parentBranch, node) {\n // we get no force contribution from an empty region\n if (parentBranch.childrenCount > 0) {\n let dx, dy, distance;\n\n // get the distance from the center of mass to the node.\n dx = parentBranch.centerOfMass.x - node.x;\n dy = parentBranch.centerOfMass.y - node.y;\n distance = Math.sqrt(dx * dx + dy * dy);\n\n // BarnesHutSolver condition\n // original condition : s/d < theta = passed === d/s > 1/theta = passed\n // calcSize = 1/s --> d * 1/s > 1/theta = passed\n if (distance * parentBranch.calcSize > this.thetaInversed) {\n this._calculateForces(distance, dx, dy, node, parentBranch);\n }\n else {\n // Did not pass the condition, go into children if available\n if (parentBranch.childrenCount === 4) {\n this._getForceContributions(parentBranch, node);\n }\n else { // parentBranch must have only one node, if it was empty we wouldnt be here\n if (parentBranch.children.data.id != node.id) { // if it is not self\n this._calculateForces(distance, dx, dy, node, parentBranch);\n }\n }\n }\n }\n }\n\n\n /**\n * Calculate the forces based on the distance.\n *\n * @param {number} distance\n * @param {number} dx\n * @param {number} dy\n * @param {Node} node\n * @param {Object} parentBranch\n * @private\n */\n _calculateForces(distance, dx, dy, node, parentBranch) {\n if (distance === 0) {\n distance = 0.1;\n dx = distance;\n }\n\n if (this.overlapAvoidanceFactor < 1 && node.shape.radius) {\n distance = Math.max(0.1 + (this.overlapAvoidanceFactor * node.shape.radius), distance - node.shape.radius);\n }\n\n // the dividing by the distance cubed instead of squared allows us to get the fx and fy components without sines and cosines\n // it is shorthand for gravityforce with distance squared and fx = dx/distance * gravityForce\n let gravityForce = this.options.gravitationalConstant * parentBranch.mass * node.options.mass / Math.pow(distance,3);\n let fx = dx * gravityForce;\n let fy = dy * gravityForce;\n\n this.physicsBody.forces[node.id].x += fx;\n this.physicsBody.forces[node.id].y += fy;\n }\n\n\n /**\n * This function constructs the barnesHut tree recursively. It creates the root, splits it and starts placing the nodes.\n *\n * @param {Array.} nodes\n * @param {Array.} nodeIndices\n * @returns {{root: {centerOfMass: {x: number, y: number}, mass: number, range: {minX: number, maxX: number, minY: number, maxY: number}, size: number, calcSize: number, children: {data: null}, maxWidth: number, level: number, childrenCount: number}}} BarnesHutTree\n * @private\n */\n _formBarnesHutTree(nodes, nodeIndices) {\n let node;\n let nodeCount = nodeIndices.length;\n\n let minX = nodes[nodeIndices[0]].x;\n let minY = nodes[nodeIndices[0]].y;\n let maxX = nodes[nodeIndices[0]].x;\n let maxY = nodes[nodeIndices[0]].y;\n\n // get the range of the nodes\n for (let i = 1; i < nodeCount; i++) {\n let node = nodes[nodeIndices[i]];\n let x = node.x;\n let y = node.y;\n if (node.options.mass > 0) {\n if (x < minX) {\n minX = x;\n }\n if (x > maxX) {\n maxX = x;\n }\n if (y < minY) {\n minY = y;\n }\n if (y > maxY) {\n maxY = y;\n }\n }\n }\n // make the range a square\n let sizeDiff = Math.abs(maxX - minX) - Math.abs(maxY - minY); // difference between X and Y\n if (sizeDiff > 0) {\n minY -= 0.5 * sizeDiff;\n maxY += 0.5 * sizeDiff;\n } // xSize > ySize\n else {\n minX += 0.5 * sizeDiff;\n maxX -= 0.5 * sizeDiff;\n } // xSize < ySize\n\n\n let minimumTreeSize = 1e-5;\n let rootSize = Math.max(minimumTreeSize, Math.abs(maxX - minX));\n let halfRootSize = 0.5 * rootSize;\n let centerX = 0.5 * (minX + maxX), centerY = 0.5 * (minY + maxY);\n\n // construct the barnesHutTree\n let barnesHutTree = {\n root: {\n centerOfMass: {x: 0, y: 0},\n mass: 0,\n range: {\n minX: centerX - halfRootSize, maxX: centerX + halfRootSize,\n minY: centerY - halfRootSize, maxY: centerY + halfRootSize\n },\n size: rootSize,\n calcSize: 1 / rootSize,\n children: {data: null},\n maxWidth: 0,\n level: 0,\n childrenCount: 4\n }\n };\n this._splitBranch(barnesHutTree.root);\n\n // place the nodes one by one recursively\n for (let i = 0; i < nodeCount; i++) {\n node = nodes[nodeIndices[i]];\n if (node.options.mass > 0) {\n this._placeInTree(barnesHutTree.root, node);\n }\n }\n\n // make global\n return barnesHutTree\n }\n\n\n /**\n * this updates the mass of a branch. this is increased by adding a node.\n *\n * @param {Object} parentBranch\n * @param {Node} node\n * @private\n */\n _updateBranchMass(parentBranch, node) {\n let centerOfMass = parentBranch.centerOfMass;\n let totalMass = parentBranch.mass + node.options.mass;\n let totalMassInv = 1 / totalMass;\n\n centerOfMass.x = centerOfMass.x * parentBranch.mass + node.x * node.options.mass;\n centerOfMass.x *= totalMassInv;\n\n centerOfMass.y = centerOfMass.y * parentBranch.mass + node.y * node.options.mass;\n centerOfMass.y *= totalMassInv;\n\n parentBranch.mass = totalMass;\n let biggestSize = Math.max(Math.max(node.height, node.radius), node.width);\n parentBranch.maxWidth = (parentBranch.maxWidth < biggestSize) ? biggestSize : parentBranch.maxWidth;\n\n }\n\n\n /**\n * determine in which branch the node will be placed.\n *\n * @param {Object} parentBranch\n * @param {Node} node\n * @param {boolean} skipMassUpdate\n * @private\n */\n _placeInTree(parentBranch, node, skipMassUpdate) {\n if (skipMassUpdate != true || skipMassUpdate === undefined) {\n // update the mass of the branch.\n this._updateBranchMass(parentBranch, node);\n }\n\n let range = parentBranch.children.NW.range;\n let region;\n if (range.maxX > node.x) { // in NW or SW\n if (range.maxY > node.y) {\n region = \"NW\";\n }\n else {\n region = \"SW\";\n }\n }\n else { // in NE or SE\n if (range.maxY > node.y) {\n region = \"NE\";\n }\n else {\n region = \"SE\";\n }\n }\n\n this._placeInRegion(parentBranch, node, region);\n }\n\n\n /**\n * actually place the node in a region (or branch)\n *\n * @param {Object} parentBranch\n * @param {Node} node\n * @param {'NW'| 'NE' | 'SW' | 'SE'} region\n * @private\n */\n _placeInRegion(parentBranch, node, region) {\n let children = parentBranch.children[region];\n\n switch (children.childrenCount) {\n case 0: // place node here\n children.children.data = node;\n children.childrenCount = 1;\n this._updateBranchMass(children, node);\n break;\n case 1: // convert into children\n // if there are two nodes exactly overlapping (on init, on opening of cluster etc.)\n // we move one node a little bit and we do not put it in the tree.\n if (children.children.data.x === node.x && children.children.data.y === node.y) {\n node.x += this.seededRandom();\n node.y += this.seededRandom();\n }\n else {\n this._splitBranch(children);\n this._placeInTree(children, node);\n }\n break;\n case 4: // place in branch\n this._placeInTree(children, node);\n break;\n }\n }\n\n\n /**\n * this function splits a branch into 4 sub branches. If the branch contained a node, we place it in the subbranch\n * after the split is complete.\n *\n * @param {Object} parentBranch\n * @private\n */\n _splitBranch(parentBranch) {\n // if the branch is shaded with a node, replace the node in the new subset.\n let containedNode = null;\n if (parentBranch.childrenCount === 1) {\n containedNode = parentBranch.children.data;\n parentBranch.mass = 0;\n parentBranch.centerOfMass.x = 0;\n parentBranch.centerOfMass.y = 0;\n }\n parentBranch.childrenCount = 4;\n parentBranch.children.data = null;\n this._insertRegion(parentBranch, \"NW\");\n this._insertRegion(parentBranch, \"NE\");\n this._insertRegion(parentBranch, \"SW\");\n this._insertRegion(parentBranch, \"SE\");\n\n if (containedNode != null) {\n this._placeInTree(parentBranch, containedNode);\n }\n }\n\n\n /**\n * This function subdivides the region into four new segments.\n * Specifically, this inserts a single new segment.\n * It fills the children section of the parentBranch\n *\n * @param {Object} parentBranch\n * @param {'NW'| 'NE' | 'SW' | 'SE'} region\n * @private\n */\n _insertRegion(parentBranch, region) {\n let minX, maxX, minY, maxY;\n let childSize = 0.5 * parentBranch.size;\n switch (region) {\n case \"NW\":\n minX = parentBranch.range.minX;\n maxX = parentBranch.range.minX + childSize;\n minY = parentBranch.range.minY;\n maxY = parentBranch.range.minY + childSize;\n break;\n case \"NE\":\n minX = parentBranch.range.minX + childSize;\n maxX = parentBranch.range.maxX;\n minY = parentBranch.range.minY;\n maxY = parentBranch.range.minY + childSize;\n break;\n case \"SW\":\n minX = parentBranch.range.minX;\n maxX = parentBranch.range.minX + childSize;\n minY = parentBranch.range.minY + childSize;\n maxY = parentBranch.range.maxY;\n break;\n case \"SE\":\n minX = parentBranch.range.minX + childSize;\n maxX = parentBranch.range.maxX;\n minY = parentBranch.range.minY + childSize;\n maxY = parentBranch.range.maxY;\n break;\n }\n\n\n parentBranch.children[region] = {\n centerOfMass: {x: 0, y: 0},\n mass: 0,\n range: {minX: minX, maxX: maxX, minY: minY, maxY: maxY},\n size: 0.5 * parentBranch.size,\n calcSize: 2 * parentBranch.calcSize,\n children: {data: null},\n maxWidth: 0,\n level: parentBranch.level + 1,\n childrenCount: 0\n };\n }\n\n\n //--------------------------- DEBUGGING BELOW ---------------------------//\n\n\n /**\n * This function is for debugging purposed, it draws the tree.\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {string} color\n * @private\n */\n _debug(ctx, color) {\n if (this.barnesHutTree !== undefined) {\n\n ctx.lineWidth = 1;\n\n this._drawBranch(this.barnesHutTree.root, ctx, color);\n }\n }\n\n\n /**\n * This function is for debugging purposes. It draws the branches recursively.\n *\n * @param {Object} branch\n * @param {CanvasRenderingContext2D} ctx\n * @param {string} color\n * @private\n */\n _drawBranch(branch, ctx, color) {\n if (color === undefined) {\n color = \"#FF0000\";\n }\n\n if (branch.childrenCount === 4) {\n this._drawBranch(branch.children.NW, ctx);\n this._drawBranch(branch.children.NE, ctx);\n this._drawBranch(branch.children.SE, ctx);\n this._drawBranch(branch.children.SW, ctx);\n }\n ctx.strokeStyle = color;\n ctx.beginPath();\n ctx.moveTo(branch.range.minX, branch.range.minY);\n ctx.lineTo(branch.range.maxX, branch.range.minY);\n ctx.stroke();\n\n ctx.beginPath();\n ctx.moveTo(branch.range.maxX, branch.range.minY);\n ctx.lineTo(branch.range.maxX, branch.range.maxY);\n ctx.stroke();\n\n ctx.beginPath();\n ctx.moveTo(branch.range.maxX, branch.range.maxY);\n ctx.lineTo(branch.range.minX, branch.range.maxY);\n ctx.stroke();\n\n ctx.beginPath();\n ctx.moveTo(branch.range.minX, branch.range.maxY);\n ctx.lineTo(branch.range.minX, branch.range.minY);\n ctx.stroke();\n\n /*\n if (branch.mass > 0) {\n ctx.circle(branch.centerOfMass.x, branch.centerOfMass.y, 3*branch.mass);\n ctx.stroke();\n }\n */\n }\n}\n\n\nexport default BarnesHutSolver;\n","/**\n * Repulsion Solver\n */\nclass RepulsionSolver {\n /**\n * @param {Object} body\n * @param {{physicsNodeIndices: Array, physicsEdgeIndices: Array, forces: {}, velocities: {}}} physicsBody\n * @param {Object} options\n */\n constructor(body, physicsBody, options) {\n this.body = body;\n this.physicsBody = physicsBody;\n this.setOptions(options);\n }\n\n /**\n *\n * @param {Object} options\n */\n setOptions(options) {\n this.options = options;\n }\n\n /**\n * Calculate the forces the nodes apply on each other based on a repulsion field.\n * This field is linearly approximated.\n *\n * @private\n */\n solve() {\n var dx, dy, distance, fx, fy, repulsingForce, node1, node2;\n\n var nodes = this.body.nodes;\n var nodeIndices = this.physicsBody.physicsNodeIndices;\n var forces = this.physicsBody.forces;\n\n // repulsing forces between nodes\n var nodeDistance = this.options.nodeDistance;\n\n // approximation constants\n var a = (-2 / 3) / nodeDistance;\n var b = 4 / 3;\n\n // we loop from i over all but the last entree in the array\n // j loops from i+1 to the last. This way we do not double count any of the indices, nor i === j\n for (let i = 0; i < nodeIndices.length - 1; i++) {\n node1 = nodes[nodeIndices[i]];\n for (let j = i + 1; j < nodeIndices.length; j++) {\n node2 = nodes[nodeIndices[j]];\n\n dx = node2.x - node1.x;\n dy = node2.y - node1.y;\n distance = Math.sqrt(dx * dx + dy * dy);\n\n // same condition as BarnesHutSolver, making sure nodes are never 100% overlapping.\n if (distance === 0) {\n distance = 0.1*Math.random();\n dx = distance;\n }\n\n if (distance < 2 * nodeDistance) {\n if (distance < 0.5 * nodeDistance) {\n repulsingForce = 1.0;\n }\n else {\n repulsingForce = a * distance + b; // linear approx of 1 / (1 + Math.exp((distance / nodeDistance - 1) * steepness))\n }\n repulsingForce = repulsingForce / distance;\n\n fx = dx * repulsingForce;\n fy = dy * repulsingForce;\n\n forces[node1.id].x -= fx;\n forces[node1.id].y -= fy;\n forces[node2.id].x += fx;\n forces[node2.id].y += fy;\n }\n }\n }\n }\n}\n\n\nexport default RepulsionSolver;","/**\n * Hierarchical Repulsion Solver\n */\nclass HierarchicalRepulsionSolver {\n /**\n * @param {Object} body\n * @param {{physicsNodeIndices: Array, physicsEdgeIndices: Array, forces: {}, velocities: {}}} physicsBody\n * @param {Object} options\n */\n constructor(body, physicsBody, options) {\n this.body = body;\n this.physicsBody = physicsBody;\n this.setOptions(options);\n }\n\n /**\n *\n * @param {Object} options\n */\n setOptions(options) {\n this.options = options;\n }\n\n /**\n * Calculate the forces the nodes apply on each other based on a repulsion field.\n * This field is linearly approximated.\n *\n * @private\n */\n solve() {\n var dx, dy, distance, fx, fy, repulsingForce, node1, node2, i, j;\n\n var nodes = this.body.nodes;\n var nodeIndices = this.physicsBody.physicsNodeIndices;\n var forces = this.physicsBody.forces;\n\n // repulsing forces between nodes\n var nodeDistance = this.options.nodeDistance;\n\n // we loop from i over all but the last entree in the array\n // j loops from i+1 to the last. This way we do not double count any of the indices, nor i === j\n for (i = 0; i < nodeIndices.length - 1; i++) {\n node1 = nodes[nodeIndices[i]];\n for (j = i + 1; j < nodeIndices.length; j++) {\n node2 = nodes[nodeIndices[j]];\n\n // nodes only affect nodes on their level\n if (node1.level === node2.level) {\n dx = node2.x - node1.x;\n dy = node2.y - node1.y;\n distance = Math.sqrt(dx * dx + dy * dy);\n\n var steepness = 0.05;\n if (distance < nodeDistance) {\n repulsingForce = -Math.pow(steepness * distance, 2) + Math.pow(steepness * nodeDistance, 2);\n }\n else {\n repulsingForce = 0;\n }\n // normalize force with\n if (distance === 0) {\n distance = 0.01;\n }\n else {\n repulsingForce = repulsingForce / distance;\n }\n fx = dx * repulsingForce;\n fy = dy * repulsingForce;\n\n forces[node1.id].x -= fx;\n forces[node1.id].y -= fy;\n forces[node2.id].x += fx;\n forces[node2.id].y += fy;\n }\n }\n }\n }\n}\n\n\nexport default HierarchicalRepulsionSolver;","/**\n * Spring Solver\n */\nclass SpringSolver {\n /**\n * @param {Object} body\n * @param {{physicsNodeIndices: Array, physicsEdgeIndices: Array, forces: {}, velocities: {}}} physicsBody\n * @param {Object} options\n */\n constructor(body, physicsBody, options) {\n this.body = body;\n this.physicsBody = physicsBody;\n this.setOptions(options);\n }\n\n /**\n *\n * @param {Object} options\n */\n setOptions(options) {\n this.options = options;\n }\n\n /**\n * This function calculates the springforces on the nodes, accounting for the support nodes.\n *\n * @private\n */\n solve() {\n let edgeLength, edge;\n let edgeIndices = this.physicsBody.physicsEdgeIndices;\n let edges = this.body.edges;\n let node1, node2, node3;\n\n // forces caused by the edges, modelled as springs\n for (let i = 0; i < edgeIndices.length; i++) {\n edge = edges[edgeIndices[i]];\n if (edge.connected === true && edge.toId !== edge.fromId) {\n // only calculate forces if nodes are in the same sector\n if (this.body.nodes[edge.toId] !== undefined && this.body.nodes[edge.fromId] !== undefined) {\n if (edge.edgeType.via !== undefined) {\n edgeLength = edge.options.length === undefined ? this.options.springLength : edge.options.length;\n node1 = edge.to;\n node2 = edge.edgeType.via;\n node3 = edge.from;\n\n this._calculateSpringForce(node1, node2, 0.5 * edgeLength);\n this._calculateSpringForce(node2, node3, 0.5 * edgeLength);\n }\n else {\n // the * 1.5 is here so the edge looks as large as a smooth edge. It does not initially because the smooth edges use\n // the support nodes which exert a repulsive force on the to and from nodes, making the edge appear larger.\n edgeLength = edge.options.length === undefined ? this.options.springLength * 1.5: edge.options.length;\n this._calculateSpringForce(edge.from, edge.to, edgeLength);\n }\n }\n }\n }\n }\n\n\n /**\n * This is the code actually performing the calculation for the function above.\n *\n * @param {Node} node1\n * @param {Node} node2\n * @param {number} edgeLength\n * @private\n */\n _calculateSpringForce(node1, node2, edgeLength) {\n let dx = (node1.x - node2.x);\n let dy = (node1.y - node2.y);\n let distance = Math.max(Math.sqrt(dx * dx + dy * dy),0.01);\n\n // the 1/distance is so the fx and fy can be calculated without sine or cosine.\n let springForce = this.options.springConstant * (edgeLength - distance) / distance;\n\n let fx = dx * springForce;\n let fy = dy * springForce;\n\n // handle the case where one node is not part of the physcis\n if (this.physicsBody.forces[node1.id] !== undefined) {\n this.physicsBody.forces[node1.id].x += fx;\n this.physicsBody.forces[node1.id].y += fy;\n }\n\n if (this.physicsBody.forces[node2.id] !== undefined) {\n this.physicsBody.forces[node2.id].x -= fx;\n this.physicsBody.forces[node2.id].y -= fy;\n }\n }\n}\n\nexport default SpringSolver;","/**\n * Hierarchical Spring Solver\n */\nclass HierarchicalSpringSolver {\n /**\n * @param {Object} body\n * @param {{physicsNodeIndices: Array, physicsEdgeIndices: Array, forces: {}, velocities: {}}} physicsBody\n * @param {Object} options\n */\n constructor(body, physicsBody, options) {\n this.body = body;\n this.physicsBody = physicsBody;\n this.setOptions(options);\n }\n\n /**\n *\n * @param {Object} options\n */\n setOptions(options) {\n this.options = options;\n }\n\n /**\n * This function calculates the springforces on the nodes, accounting for the support nodes.\n *\n * @private\n */\n solve() {\n var edgeLength, edge;\n var dx, dy, fx, fy, springForce, distance;\n var edges = this.body.edges;\n var factor = 0.5;\n\n var edgeIndices = this.physicsBody.physicsEdgeIndices;\n var nodeIndices = this.physicsBody.physicsNodeIndices;\n var forces = this.physicsBody.forces;\n\n // initialize the spring force counters\n for (let i = 0; i < nodeIndices.length; i++) {\n let nodeId = nodeIndices[i];\n forces[nodeId].springFx = 0;\n forces[nodeId].springFy = 0;\n }\n\n\n // forces caused by the edges, modelled as springs\n for (let i = 0; i < edgeIndices.length; i++) {\n edge = edges[edgeIndices[i]];\n if (edge.connected === true) {\n edgeLength = edge.options.length === undefined ? this.options.springLength : edge.options.length;\n\n dx = (edge.from.x - edge.to.x);\n dy = (edge.from.y - edge.to.y);\n distance = Math.sqrt(dx * dx + dy * dy);\n distance = distance === 0 ? 0.01 : distance;\n\n // the 1/distance is so the fx and fy can be calculated without sine or cosine.\n springForce = this.options.springConstant * (edgeLength - distance) / distance;\n\n fx = dx * springForce;\n fy = dy * springForce;\n\n if (edge.to.level != edge.from.level) {\n if (forces[edge.toId] !== undefined) {\n forces[edge.toId].springFx -= fx;\n forces[edge.toId].springFy -= fy;\n }\n if (forces[edge.fromId] !== undefined) {\n forces[edge.fromId].springFx += fx;\n forces[edge.fromId].springFy += fy;\n }\n }\n else {\n if (forces[edge.toId] !== undefined) {\n forces[edge.toId].x -= factor * fx;\n forces[edge.toId].y -= factor * fy;\n }\n if (forces[edge.fromId] !== undefined) {\n forces[edge.fromId].x += factor * fx;\n forces[edge.fromId].y += factor * fy;\n }\n }\n }\n }\n\n // normalize spring forces\n springForce = 1;\n var springFx, springFy;\n for (let i = 0; i < nodeIndices.length; i++) {\n let nodeId = nodeIndices[i];\n springFx = Math.min(springForce,Math.max(-springForce,forces[nodeId].springFx));\n springFy = Math.min(springForce,Math.max(-springForce,forces[nodeId].springFy));\n\n forces[nodeId].x += springFx;\n forces[nodeId].y += springFy;\n }\n\n // retain energy balance\n var totalFx = 0;\n var totalFy = 0;\n for (let i = 0; i < nodeIndices.length; i++) {\n let nodeId = nodeIndices[i];\n totalFx += forces[nodeId].x;\n totalFy += forces[nodeId].y;\n }\n var correctionFx = totalFx / nodeIndices.length;\n var correctionFy = totalFy / nodeIndices.length;\n\n for (let i = 0; i < nodeIndices.length; i++) {\n let nodeId = nodeIndices[i];\n forces[nodeId].x -= correctionFx;\n forces[nodeId].y -= correctionFy;\n }\n }\n}\n\nexport default HierarchicalSpringSolver;\n","/**\n * Central Gravity Solver\n */\nclass CentralGravitySolver {\n /**\n * @param {Object} body\n * @param {{physicsNodeIndices: Array, physicsEdgeIndices: Array, forces: {}, velocities: {}}} physicsBody\n * @param {Object} options\n */\n constructor(body, physicsBody, options) {\n this.body = body;\n this.physicsBody = physicsBody;\n this.setOptions(options);\n }\n\n /**\n *\n * @param {Object} options\n */\n setOptions(options) {\n this.options = options;\n }\n\n /**\n * Calculates forces for each node\n */\n solve() {\n let dx, dy, distance, node;\n let nodes = this.body.nodes;\n let nodeIndices = this.physicsBody.physicsNodeIndices;\n let forces = this.physicsBody.forces;\n\n for (let i = 0; i < nodeIndices.length; i++) {\n let nodeId = nodeIndices[i];\n node = nodes[nodeId];\n dx = -node.x;\n dy = -node.y;\n distance = Math.sqrt(dx * dx + dy * dy);\n\n this._calculateForces(distance, dx, dy, forces, node);\n }\n }\n\n /**\n * Calculate the forces based on the distance.\n * @param {number} distance\n * @param {number} dx\n * @param {number} dy\n * @param {Object} forces\n * @param {Node} node\n * @private\n */\n _calculateForces(distance, dx, dy, forces, node) {\n let gravityForce = (distance === 0) ? 0 : (this.options.centralGravity / distance);\n forces[node.id].x = dx * gravityForce;\n forces[node.id].y = dy * gravityForce;\n }\n}\n\n\nexport default CentralGravitySolver;","import BarnesHutSolver from \"./BarnesHutSolver\"\n\n/**\n * @extends BarnesHutSolver\n */\nclass ForceAtlas2BasedRepulsionSolver extends BarnesHutSolver {\n /**\n * @param {Object} body\n * @param {{physicsNodeIndices: Array, physicsEdgeIndices: Array, forces: {}, velocities: {}}} physicsBody\n * @param {Object} options\n */\n constructor(body, physicsBody, options) {\n super(body, physicsBody, options);\n }\n\n /**\n * Calculate the forces based on the distance.\n *\n * @param {number} distance\n * @param {number} dx\n * @param {number} dy\n * @param {Node} node\n * @param {Object} parentBranch\n * @private\n */\n _calculateForces(distance, dx, dy, node, parentBranch) {\n if (distance === 0) {\n distance = 0.1 * Math.random();\n dx = distance;\n }\n\n if (this.overlapAvoidanceFactor < 1 && node.shape.radius) {\n distance = Math.max(0.1 + (this.overlapAvoidanceFactor * node.shape.radius), distance - node.shape.radius);\n }\n\n let degree = (node.edges.length + 1);\n // the dividing by the distance cubed instead of squared allows us to get the fx and fy components without sines and cosines\n // it is shorthand for gravityforce with distance squared and fx = dx/distance * gravityForce\n let gravityForce = this.options.gravitationalConstant * parentBranch.mass * node.options.mass * degree / Math.pow(distance,2);\n let fx = dx * gravityForce;\n let fy = dy * gravityForce;\n\n this.physicsBody.forces[node.id].x += fx;\n this.physicsBody.forces[node.id].y += fy;\n }\n}\n\nexport default ForceAtlas2BasedRepulsionSolver;\n","import CentralGravitySolver from \"./CentralGravitySolver\"\n\n/**\n * @extends CentralGravitySolver\n */\nclass ForceAtlas2BasedCentralGravitySolver extends CentralGravitySolver {\n /**\n * @param {Object} body\n * @param {{physicsNodeIndices: Array, physicsEdgeIndices: Array, forces: {}, velocities: {}}} physicsBody\n * @param {Object} options\n */\n constructor(body, physicsBody, options) {\n super(body, physicsBody, options);\n }\n\n\n /**\n * Calculate the forces based on the distance.\n *\n * @param {number} distance\n * @param {number} dx\n * @param {number} dy\n * @param {Object} forces\n * @param {Node} node\n * @private\n */\n _calculateForces(distance, dx, dy, forces, node) {\n if (distance > 0) {\n let degree = (node.edges.length + 1);\n let gravityForce = this.options.centralGravity * degree * node.options.mass;\n forces[node.id].x = dx * gravityForce;\n forces[node.id].y = dy * gravityForce;\n }\n }\n}\n\nexport default ForceAtlas2BasedCentralGravitySolver;","import BarnesHutSolver from './components/physics/BarnesHutSolver';\nimport Repulsion from './components/physics/RepulsionSolver';\nimport HierarchicalRepulsion from './components/physics/HierarchicalRepulsionSolver';\nimport SpringSolver from './components/physics/SpringSolver';\nimport HierarchicalSpringSolver from './components/physics/HierarchicalSpringSolver';\nimport CentralGravitySolver from './components/physics/CentralGravitySolver';\nimport ForceAtlas2BasedRepulsionSolver from './components/physics/FA2BasedRepulsionSolver';\nimport ForceAtlas2BasedCentralGravitySolver from './components/physics/FA2BasedCentralGravitySolver';\nimport util from 'vis-util';\nimport EndPoints from './components/edges/util/EndPoints'; // for debugging with _drawForces()\n\n\n/**\n * The physics engine\n */\nclass PhysicsEngine {\n /**\n * @param {Object} body\n */\n constructor(body) {\n this.body = body;\n this.physicsBody = {physicsNodeIndices:[], physicsEdgeIndices:[], forces: {}, velocities: {}};\n\n this.physicsEnabled = true;\n this.simulationInterval = 1000 / 60;\n this.requiresTimeout = true;\n this.previousStates = {};\n this.referenceState = {};\n this.freezeCache = {};\n this.renderTimer = undefined;\n\n // parameters for the adaptive timestep\n this.adaptiveTimestep = false;\n this.adaptiveTimestepEnabled = false;\n this.adaptiveCounter = 0;\n this.adaptiveInterval = 3;\n\n this.stabilized = false;\n this.startedStabilization = false;\n this.stabilizationIterations = 0;\n this.ready = false; // will be set to true if the stabilize\n\n // default options\n this.options = {};\n this.defaultOptions = {\n enabled: true,\n barnesHut: {\n theta: 0.5,\n gravitationalConstant: -2000,\n centralGravity: 0.3,\n springLength: 95,\n springConstant: 0.04,\n damping: 0.09,\n avoidOverlap: 0\n },\n forceAtlas2Based: {\n theta: 0.5,\n gravitationalConstant: -50,\n centralGravity: 0.01,\n springConstant: 0.08,\n springLength: 100,\n damping: 0.4,\n avoidOverlap: 0\n },\n repulsion: {\n centralGravity: 0.2,\n springLength: 200,\n springConstant: 0.05,\n nodeDistance: 100,\n damping: 0.09,\n avoidOverlap: 0\n },\n hierarchicalRepulsion: {\n centralGravity: 0.0,\n springLength: 100,\n springConstant: 0.01,\n nodeDistance: 120,\n damping: 0.09\n },\n maxVelocity: 50,\n minVelocity: 0.75, // px/s\n solver: 'barnesHut',\n stabilization: {\n enabled: true,\n iterations: 1000, // maximum number of iteration to stabilize\n updateInterval: 50,\n onlyDynamicEdges: false,\n fit: true\n },\n timestep: 0.5,\n adaptiveTimestep: true\n };\n util.extend(this.options, this.defaultOptions);\n this.timestep = 0.5;\n this.layoutFailed = false;\n\n this.bindEventListeners();\n }\n\n /**\n * Binds event listeners\n */\n bindEventListeners() {\n this.body.emitter.on('initPhysics', () => {this.initPhysics();});\n this.body.emitter.on('_layoutFailed', () => {this.layoutFailed = true;});\n this.body.emitter.on('resetPhysics', () => {this.stopSimulation(); this.ready = false;});\n this.body.emitter.on('disablePhysics', () => {this.physicsEnabled = false; this.stopSimulation();});\n this.body.emitter.on('restorePhysics', () => {\n this.setOptions(this.options);\n if (this.ready === true) {\n this.startSimulation();\n }\n });\n this.body.emitter.on('startSimulation', () => {\n if (this.ready === true) {\n this.startSimulation();\n }\n });\n this.body.emitter.on('stopSimulation', () => {this.stopSimulation();});\n this.body.emitter.on('destroy', () => {\n this.stopSimulation(false);\n this.body.emitter.off();\n });\n this.body.emitter.on(\"_dataChanged\", () => {\n // Nodes and/or edges have been added or removed, update shortcut lists.\n this.updatePhysicsData();\n });\n\n // debug: show forces\n // this.body.emitter.on(\"afterDrawing\", (ctx) => {this._drawForces(ctx);});\n }\n\n\n /**\n * set the physics options\n * @param {Object} options\n */\n setOptions(options) {\n if (options !== undefined) {\n if (options === false) {\n this.options.enabled = false;\n this.physicsEnabled = false;\n this.stopSimulation();\n }\n else if (options === true) {\n this.options.enabled = true;\n this.physicsEnabled = true;\n this.startSimulation();\n }\n else {\n this.physicsEnabled = true;\n util.selectiveNotDeepExtend(['stabilization'], this.options, options);\n util.mergeOptions(this.options, options, 'stabilization');\n\n if (options.enabled === undefined) {\n this.options.enabled = true;\n }\n\n if (this.options.enabled === false) {\n this.physicsEnabled = false;\n this.stopSimulation();\n }\n\n // set the timestep\n this.timestep = this.options.timestep;\n }\n }\n this.init();\n }\n\n\n /**\n * configure the engine.\n */\n init() {\n var options;\n if (this.options.solver === 'forceAtlas2Based') {\n options = this.options.forceAtlas2Based;\n this.nodesSolver = new ForceAtlas2BasedRepulsionSolver(this.body, this.physicsBody, options);\n this.edgesSolver = new SpringSolver(this.body, this.physicsBody, options);\n this.gravitySolver = new ForceAtlas2BasedCentralGravitySolver(this.body, this.physicsBody, options);\n }\n else if (this.options.solver === 'repulsion') {\n options = this.options.repulsion;\n this.nodesSolver = new Repulsion(this.body, this.physicsBody, options);\n this.edgesSolver = new SpringSolver(this.body, this.physicsBody, options);\n this.gravitySolver = new CentralGravitySolver(this.body, this.physicsBody, options);\n }\n else if (this.options.solver === 'hierarchicalRepulsion') {\n options = this.options.hierarchicalRepulsion;\n this.nodesSolver = new HierarchicalRepulsion(this.body, this.physicsBody, options);\n this.edgesSolver = new HierarchicalSpringSolver(this.body, this.physicsBody, options);\n this.gravitySolver = new CentralGravitySolver(this.body, this.physicsBody, options);\n }\n else { // barnesHut\n options = this.options.barnesHut;\n this.nodesSolver = new BarnesHutSolver(this.body, this.physicsBody, options);\n this.edgesSolver = new SpringSolver(this.body, this.physicsBody, options);\n this.gravitySolver = new CentralGravitySolver(this.body, this.physicsBody, options);\n }\n\n this.modelOptions = options;\n }\n\n\n /**\n * initialize the engine\n */\n initPhysics() {\n if (this.physicsEnabled === true && this.options.enabled === true) {\n if (this.options.stabilization.enabled === true) {\n this.stabilize();\n }\n else {\n this.stabilized = false;\n this.ready = true;\n this.body.emitter.emit('fit', {}, this.layoutFailed); // if the layout failed, we use the approximation for the zoom\n this.startSimulation();\n }\n }\n else {\n this.ready = true;\n this.body.emitter.emit('fit');\n }\n }\n\n /**\n * Start the simulation\n */\n startSimulation() {\n if (this.physicsEnabled === true && this.options.enabled === true) {\n this.stabilized = false;\n\n // when visible, adaptivity is disabled.\n this.adaptiveTimestep = false;\n\n // this sets the width of all nodes initially which could be required for the avoidOverlap\n this.body.emitter.emit(\"_resizeNodes\");\n if (this.viewFunction === undefined) {\n this.viewFunction = this.simulationStep.bind(this);\n this.body.emitter.on('initRedraw', this.viewFunction);\n this.body.emitter.emit('_startRendering');\n }\n }\n else {\n this.body.emitter.emit('_redraw');\n }\n }\n\n\n /**\n * Stop the simulation, force stabilization.\n * @param {boolean} [emit=true]\n */\n stopSimulation(emit = true) {\n this.stabilized = true;\n if (emit === true) {\n this._emitStabilized();\n }\n if (this.viewFunction !== undefined) {\n this.body.emitter.off('initRedraw', this.viewFunction);\n this.viewFunction = undefined;\n if (emit === true) {\n this.body.emitter.emit('_stopRendering');\n }\n }\n }\n\n\n /**\n * The viewFunction inserts this step into each render loop. It calls the physics tick and handles the cleanup at stabilized.\n *\n */\n simulationStep() {\n // check if the physics have settled\n var startTime = Date.now();\n this.physicsTick();\n var physicsTime = Date.now() - startTime;\n\n // run double speed if it is a little graph\n if ((physicsTime < 0.4 * this.simulationInterval || this.runDoubleSpeed === true) && this.stabilized === false) {\n this.physicsTick();\n\n // this makes sure there is no jitter. The decision is taken once to run it at double speed.\n this.runDoubleSpeed = true;\n }\n\n if (this.stabilized === true) {\n this.stopSimulation();\n }\n }\n\n\n /**\n * trigger the stabilized event.\n *\n * @param {number} [amountOfIterations=this.stabilizationIterations]\n * @private\n */\n _emitStabilized(amountOfIterations = this.stabilizationIterations) {\n if (this.stabilizationIterations > 1 || this.startedStabilization === true) {\n setTimeout(() => {\n this.body.emitter.emit('stabilized', {iterations: amountOfIterations});\n this.startedStabilization = false;\n this.stabilizationIterations = 0;\n }, 0);\n }\n }\n\n\n /**\n * Calculate the forces for one physics iteration and move the nodes.\n * @private\n */\n physicsStep() {\n this.gravitySolver.solve();\n this.nodesSolver.solve();\n this.edgesSolver.solve();\n this.moveNodes();\n }\n\n\n /**\n * Make dynamic adjustments to the timestep, based on current state.\n *\n * Helper function for physicsTick().\n * @private\n */\n adjustTimeStep() {\n const factor = 1.2; // Factor for increasing the timestep on success.\n\n // we compare the two steps. if it is acceptable we double the step.\n if (this._evaluateStepQuality() === true) {\n this.timestep = factor * this.timestep;\n }\n else {\n // if not, we decrease the step to a minimum of the options timestep.\n // if the decreased timestep is smaller than the options step, we do not reset the counter\n // we assume that the options timestep is stable enough.\n if (this.timestep/factor < this.options.timestep) {\n this.timestep = this.options.timestep;\n }\n else {\n // if the timestep was larger than 2 times the option one we check the adaptivity again to ensure\n // that large instabilities do not form.\n this.adaptiveCounter = -1; // check again next iteration\n this.timestep = Math.max(this.options.timestep, this.timestep/factor);\n }\n }\n }\n\n\n /**\n * A single simulation step (or 'tick') in the physics simulation\n *\n * @private\n */\n physicsTick() {\n this._startStabilizing(); // this ensures that there is no start event when the network is already stable.\n if (this.stabilized === true) return;\n\n // adaptivity means the timestep adapts to the situation, only applicable for stabilization\n if (this.adaptiveTimestep === true && this.adaptiveTimestepEnabled === true) {\n // timestep remains stable for \"interval\" iterations.\n let doAdaptive = (this.adaptiveCounter % this.adaptiveInterval === 0);\n\n if (doAdaptive) {\n // first the big step and revert.\n this.timestep = 2 * this.timestep;\n this.physicsStep();\n this.revert(); // saves the reference state\n\n // now the normal step. Since this is the last step, it is the more stable one and we will take this.\n this.timestep = 0.5 * this.timestep;\n\n // since it's half the step, we do it twice.\n this.physicsStep();\n this.physicsStep();\n\n this.adjustTimeStep();\n }\n else {\n this.physicsStep(); // normal step, keeping timestep constant\n }\n\n this.adaptiveCounter += 1;\n }\n else {\n // case for the static timestep, we reset it to the one in options and take a normal step.\n this.timestep = this.options.timestep;\n this.physicsStep();\n }\n\n if (this.stabilized === true) this.revert();\n this.stabilizationIterations++;\n }\n\n\n /**\n * Nodes and edges can have the physics toggles on or off. A collection of indices is created here so we can skip the check all the time.\n *\n * @private\n */\n updatePhysicsData() {\n this.physicsBody.forces = {};\n this.physicsBody.physicsNodeIndices = [];\n this.physicsBody.physicsEdgeIndices = [];\n let nodes = this.body.nodes;\n let edges = this.body.edges;\n\n // get node indices for physics\n for (let nodeId in nodes) {\n if (nodes.hasOwnProperty(nodeId)) {\n if (nodes[nodeId].options.physics === true) {\n this.physicsBody.physicsNodeIndices.push(nodes[nodeId].id);\n }\n }\n }\n\n // get edge indices for physics\n for (let edgeId in edges) {\n if (edges.hasOwnProperty(edgeId)) {\n if (edges[edgeId].options.physics === true) {\n this.physicsBody.physicsEdgeIndices.push(edges[edgeId].id);\n }\n }\n }\n\n // get the velocity and the forces vector\n for (let i = 0; i < this.physicsBody.physicsNodeIndices.length; i++) {\n let nodeId = this.physicsBody.physicsNodeIndices[i];\n this.physicsBody.forces[nodeId] = {x:0,y:0};\n\n // forces can be reset because they are recalculated. Velocities have to persist.\n if (this.physicsBody.velocities[nodeId] === undefined) {\n this.physicsBody.velocities[nodeId] = {x:0,y:0};\n }\n }\n\n // clean deleted nodes from the velocity vector\n for (let nodeId in this.physicsBody.velocities) {\n if (nodes[nodeId] === undefined) {\n delete this.physicsBody.velocities[nodeId];\n }\n }\n }\n\n\n /**\n * Revert the simulation one step. This is done so after stabilization, every new start of the simulation will also say stabilized.\n */\n revert() {\n var nodeIds = Object.keys(this.previousStates);\n var nodes = this.body.nodes;\n var velocities = this.physicsBody.velocities;\n this.referenceState = {};\n\n for (let i = 0; i < nodeIds.length; i++) {\n let nodeId = nodeIds[i];\n if (nodes[nodeId] !== undefined) {\n if (nodes[nodeId].options.physics === true) {\n this.referenceState[nodeId] = {\n positions: {x:nodes[nodeId].x, y:nodes[nodeId].y}\n };\n velocities[nodeId].x = this.previousStates[nodeId].vx;\n velocities[nodeId].y = this.previousStates[nodeId].vy;\n nodes[nodeId].x = this.previousStates[nodeId].x;\n nodes[nodeId].y = this.previousStates[nodeId].y;\n }\n }\n else {\n delete this.previousStates[nodeId];\n }\n }\n }\n\n /**\n * This compares the reference state to the current state\n *\n * @returns {boolean}\n * @private\n */\n _evaluateStepQuality() {\n let dx, dy, dpos;\n let nodes = this.body.nodes;\n let reference = this.referenceState;\n let posThreshold = 0.3;\n\n for (let nodeId in this.referenceState) {\n if (this.referenceState.hasOwnProperty(nodeId) && nodes[nodeId] !== undefined) {\n dx = nodes[nodeId].x - reference[nodeId].positions.x;\n dy = nodes[nodeId].y - reference[nodeId].positions.y;\n\n dpos = Math.sqrt(Math.pow(dx,2) + Math.pow(dy,2))\n\n if (dpos > posThreshold) {\n return false;\n }\n }\n }\n return true;\n }\n\n /**\n * move the nodes one timestep and check if they are stabilized\n */\n moveNodes() {\n var nodeIndices = this.physicsBody.physicsNodeIndices;\n var maxNodeVelocity = 0;\n var averageNodeVelocity = 0;\n\n // the velocity threshold (energy in the system) for the adaptivity toggle\n var velocityAdaptiveThreshold = 5;\n\n for (let i = 0; i < nodeIndices.length; i++) {\n let nodeId = nodeIndices[i];\n let nodeVelocity = this._performStep(nodeId);\n // stabilized is true if stabilized is true and velocity is smaller than vmin --> all nodes must be stabilized\n maxNodeVelocity = Math.max(maxNodeVelocity, nodeVelocity);\n averageNodeVelocity += nodeVelocity;\n }\n\n // evaluating the stabilized and adaptiveTimestepEnabled conditions\n this.adaptiveTimestepEnabled = (averageNodeVelocity/nodeIndices.length) < velocityAdaptiveThreshold;\n this.stabilized = maxNodeVelocity < this.options.minVelocity;\n }\n\n\n /**\n * Calculate new velocity for a coordinate direction\n *\n * @param {number} v velocity for current coordinate\n * @param {number} f regular force for current coordinate\n * @param {number} m mass of current node\n * @returns {number} new velocity for current coordinate\n * @private\n */\n calculateComponentVelocity(v,f, m) {\n let df = this.modelOptions.damping * v; // damping force\n let a = (f - df) / m; // acceleration\n\n v += a * this.timestep;\n\n // Put a limit on the velocities if it is really high\n let maxV = this.options.maxVelocity || 1e9;\n if (Math.abs(v) > maxV) {\n v = ((v > 0) ? maxV: -maxV);\n }\n\n return v;\n }\n\n\n /**\n * Perform the actual step\n *\n * @param {Node.id} nodeId\n * @returns {number} the new velocity of given node\n * @private\n */\n _performStep(nodeId) {\n let node = this.body.nodes[nodeId];\n let force = this.physicsBody.forces[nodeId];\n let velocity = this.physicsBody.velocities[nodeId];\n\n // store the state so we can revert\n this.previousStates[nodeId] = {x:node.x, y:node.y, vx:velocity.x, vy:velocity.y};\n\n if (node.options.fixed.x === false) {\n velocity.x = this.calculateComponentVelocity(velocity.x, force.x, node.options.mass);\n node.x += velocity.x * this.timestep;\n }\n else {\n force.x = 0;\n velocity.x = 0;\n }\n\n if (node.options.fixed.y === false) {\n velocity.y = this.calculateComponentVelocity(velocity.y, force.y, node.options.mass);\n node.y += velocity.y * this.timestep;\n }\n else {\n force.y = 0;\n velocity.y = 0;\n }\n\n let totalVelocity = Math.sqrt(Math.pow(velocity.x,2) + Math.pow(velocity.y,2));\n return totalVelocity;\n }\n\n\n /**\n * When initializing and stabilizing, we can freeze nodes with a predefined position.\n * This greatly speeds up stabilization because only the supportnodes for the smoothCurves have to settle.\n *\n * @private\n */\n _freezeNodes() {\n var nodes = this.body.nodes;\n for (var id in nodes) {\n if (nodes.hasOwnProperty(id)) {\n if (nodes[id].x && nodes[id].y) {\n let fixed = nodes[id].options.fixed;\n this.freezeCache[id] = {x:fixed.x, y:fixed.y};\n fixed.x = true;\n fixed.y = true;\n }\n }\n }\n }\n\n\n /**\n * Unfreezes the nodes that have been frozen by _freezeDefinedNodes.\n *\n * @private\n */\n _restoreFrozenNodes() {\n var nodes = this.body.nodes;\n for (var id in nodes) {\n if (nodes.hasOwnProperty(id)) {\n if (this.freezeCache[id] !== undefined) {\n nodes[id].options.fixed.x = this.freezeCache[id].x;\n nodes[id].options.fixed.y = this.freezeCache[id].y;\n }\n }\n }\n this.freezeCache = {};\n }\n\n /**\n * Find a stable position for all nodes\n *\n * @param {number} [iterations=this.options.stabilization.iterations]\n */\n stabilize(iterations = this.options.stabilization.iterations) {\n if (typeof iterations !== 'number') {\n iterations = this.options.stabilization.iterations;\n console.log('The stabilize method needs a numeric amount of iterations. Switching to default: ', iterations);\n }\n\n if (this.physicsBody.physicsNodeIndices.length === 0) {\n this.ready = true;\n return;\n }\n\n // enable adaptive timesteps\n this.adaptiveTimestep = true && this.options.adaptiveTimestep;\n\n // this sets the width of all nodes initially which could be required for the avoidOverlap\n this.body.emitter.emit(\"_resizeNodes\");\n\n this.stopSimulation(); // stop the render loop\n this.stabilized = false;\n\n // block redraw requests\n this.body.emitter.emit('_blockRedraw');\n this.targetIterations = iterations;\n\n // start the stabilization\n if (this.options.stabilization.onlyDynamicEdges === true) {\n this._freezeNodes();\n }\n this.stabilizationIterations = 0;\n\n setTimeout(() => this._stabilizationBatch(),0);\n }\n\n\n /**\n * If not already stabilizing, start it and emit a start event.\n *\n * @returns {boolean} true if stabilization started with this call\n * @private\n */\n _startStabilizing() {\n if (this.startedStabilization === true) return false;\n\n this.body.emitter.emit('startStabilizing');\n this.startedStabilization = true;\n return true;\n }\n\n\n /**\n * One batch of stabilization\n * @private\n */\n _stabilizationBatch() {\n var running = () => (this.stabilized === false && this.stabilizationIterations < this.targetIterations);\n\n var sendProgress = () => {\n this.body.emitter.emit('stabilizationProgress', {\n iterations: this.stabilizationIterations,\n total: this.targetIterations\n });\n };\n\n if (this._startStabilizing()) {\n sendProgress(); // Ensure that there is at least one start event.\n }\n\n var count = 0;\n while (running() && count < this.options.stabilization.updateInterval) {\n this.physicsTick();\n count++;\n }\n\n sendProgress();\n\n if (running()) {\n setTimeout(this._stabilizationBatch.bind(this),0);\n }\n else {\n this._finalizeStabilization();\n }\n }\n\n\n /**\n * Wrap up the stabilization, fit and emit the events.\n * @private\n */\n _finalizeStabilization() {\n this.body.emitter.emit('_allowRedraw');\n if (this.options.stabilization.fit === true) {\n this.body.emitter.emit('fit');\n }\n\n if (this.options.stabilization.onlyDynamicEdges === true) {\n this._restoreFrozenNodes();\n }\n\n this.body.emitter.emit('stabilizationIterationsDone');\n this.body.emitter.emit('_requestRedraw');\n\n if (this.stabilized === true) {\n this._emitStabilized();\n }\n else {\n this.startSimulation();\n }\n\n this.ready = true;\n }\n\n\n //--------------------------- DEBUGGING BELOW ---------------------------//\n\n\n /**\n * Debug function that display arrows for the forces currently active in the network.\n *\n * Use this when debugging only.\n *\n * @param {CanvasRenderingContext2D} ctx\n * @private\n */\n _drawForces(ctx) {\n for (var i = 0; i < this.physicsBody.physicsNodeIndices.length; i++) {\n let index = this.physicsBody.physicsNodeIndices[i];\n let node = this.body.nodes[index];\n let force = this.physicsBody.forces[index];\n let factor = 20;\n let colorFactor = 0.03;\n let forceSize = Math.sqrt(Math.pow(force.x,2) + Math.pow(force.x,2));\n\n let size = Math.min(Math.max(5,forceSize),15);\n let arrowSize = 3*size;\n\n let color = util.HSVToHex((180 - Math.min(1,Math.max(0,colorFactor*forceSize))*180) / 360,1,1);\n\n let point = {\n x: node.x + factor*force.x,\n y: node.y + factor*force.y\n };\n\n ctx.lineWidth = size;\n ctx.strokeStyle = color;\n ctx.beginPath();\n ctx.moveTo(node.x,node.y);\n ctx.lineTo(point.x, point.y);\n ctx.stroke();\n\n let angle = Math.atan2(force.y, force.x);\n ctx.fillStyle = color;\n EndPoints.draw(ctx, {type: 'arrow', point: point, angle: angle, length: arrowSize});\n ctx.fill();\n\n }\n }\n}\n\nexport default PhysicsEngine;\n","import util from 'vis-util';\n\n/**\n * Utility Class\n */\nclass NetworkUtil {\n /**\n * @ignore\n */\n constructor() {}\n\n /**\n * Find the center position of the network considering the bounding boxes\n *\n * @param {Array.} allNodes\n * @param {Array.} [specificNodes=[]]\n * @returns {{minX: number, maxX: number, minY: number, maxY: number}}\n * @static\n */\n static getRange(allNodes, specificNodes = []) {\n var minY = 1e9, maxY = -1e9, minX = 1e9, maxX = -1e9, node;\n if (specificNodes.length > 0) {\n for (var i = 0; i < specificNodes.length; i++) {\n node = allNodes[specificNodes[i]];\n if (minX > node.shape.boundingBox.left) {\n minX = node.shape.boundingBox.left;\n }\n if (maxX < node.shape.boundingBox.right) {\n maxX = node.shape.boundingBox.right;\n }\n if (minY > node.shape.boundingBox.top) {\n minY = node.shape.boundingBox.top;\n } // top is negative, bottom is positive\n if (maxY < node.shape.boundingBox.bottom) {\n maxY = node.shape.boundingBox.bottom;\n } // top is negative, bottom is positive\n }\n }\n\n if (minX === 1e9 && maxX === -1e9 && minY === 1e9 && maxY === -1e9) {\n minY = 0, maxY = 0, minX = 0, maxX = 0;\n }\n return {minX: minX, maxX: maxX, minY: minY, maxY: maxY};\n }\n\n /**\n * Find the center position of the network\n *\n * @param {Array.} allNodes\n * @param {Array.} [specificNodes=[]]\n * @returns {{minX: number, maxX: number, minY: number, maxY: number}}\n * @static\n */\n static getRangeCore(allNodes, specificNodes = []) {\n var minY = 1e9, maxY = -1e9, minX = 1e9, maxX = -1e9, node;\n if (specificNodes.length > 0) {\n for (var i = 0; i < specificNodes.length; i++) {\n node = allNodes[specificNodes[i]];\n if (minX > node.x) {\n minX = node.x;\n }\n if (maxX < node.x) {\n maxX = node.x;\n }\n if (minY > node.y) {\n minY = node.y;\n } // top is negative, bottom is positive\n if (maxY < node.y) {\n maxY = node.y;\n } // top is negative, bottom is positive\n }\n }\n\n if (minX === 1e9 && maxX === -1e9 && minY === 1e9 && maxY === -1e9) {\n minY = 0, maxY = 0, minX = 0, maxX = 0;\n }\n return {minX: minX, maxX: maxX, minY: minY, maxY: maxY};\n }\n\n\n /**\n * @param {object} range = {minX: minX, maxX: maxX, minY: minY, maxY: maxY};\n * @returns {{x: number, y: number}}\n * @static\n */\n static findCenter(range) {\n return {x: (0.5 * (range.maxX + range.minX)),\n y: (0.5 * (range.maxY + range.minY))};\n }\n\n\n /**\n * This returns a clone of the options or options of the edge or node to be used for construction of new edges or check functions for new nodes.\n * @param {vis.Item} item\n * @param {'node'|undefined} type\n * @returns {{}}\n * @static\n */\n static cloneOptions(item, type) {\n let clonedOptions = {};\n if (type === undefined || type === 'node') {\n util.deepExtend(clonedOptions, item.options, true);\n clonedOptions.x = item.x;\n clonedOptions.y = item.y;\n clonedOptions.amountOfConnections = item.edges.length;\n }\n else {\n util.deepExtend(clonedOptions, item.options, true);\n }\n return clonedOptions;\n }\n\n}\n\nexport default NetworkUtil;","import util from 'vis-util';\nimport Node from \"../Node\";\n\n/**\n * A Cluster is a special Node that allows a group of Nodes positioned closely together\n * to be represented by a single Cluster Node.\n *\n * @extends Node\n */\nclass Cluster extends Node {\n /**\n * @param {Object} options\n * @param {Object} body\n * @param {Array.}imagelist\n * @param {Array} grouplist\n * @param {Object} globalOptions\n * @param {Object} defaultOptions Global default options for nodes\n */\n constructor(options, body, imagelist, grouplist, globalOptions, defaultOptions) {\n super(options, body, imagelist, grouplist, globalOptions, defaultOptions);\n\n this.isCluster = true;\n this.containedNodes = {};\n this.containedEdges = {};\n }\n\n\n /**\n * Transfer child cluster data to current and disconnect the child cluster.\n *\n * Please consult the header comment in 'Clustering.js' for the fields set here.\n *\n * @param {string|number} childClusterId id of child cluster to open\n */\n _openChildCluster(childClusterId) {\n let childCluster = this.body.nodes[childClusterId];\n if (this.containedNodes[childClusterId] === undefined) {\n throw new Error('node with id: ' + childClusterId + ' not in current cluster');\n }\n if (!childCluster.isCluster) {\n throw new Error('node with id: ' + childClusterId + ' is not a cluster');\n }\n\n // Disconnect child cluster from current cluster\n delete this.containedNodes[childClusterId];\n util.forEach(childCluster.edges, (edge) => {\n delete this.containedEdges[edge.id];\n });\n\n // Transfer nodes and edges\n util.forEach(childCluster.containedNodes, (node, nodeId) => {\n this.containedNodes[nodeId] = node;\n });\n childCluster.containedNodes = {};\n\n util.forEach(childCluster.containedEdges, (edge, edgeId) => {\n this.containedEdges[edgeId] = edge;\n });\n childCluster.containedEdges = {};\n\n // Transfer edges within cluster edges which are clustered\n util.forEach(childCluster.edges, (clusterEdge) => {\n util.forEach(this.edges, (parentClusterEdge) => {\n // Assumption: a clustered edge can only be present in a single clustering edge\n // Not tested here\n let index = parentClusterEdge.clusteringEdgeReplacingIds.indexOf(clusterEdge.id);\n if (index === -1) return;\n\n util.forEach(clusterEdge.clusteringEdgeReplacingIds, (srcId) => {\n parentClusterEdge.clusteringEdgeReplacingIds.push(srcId);\n\n // Maintain correct bookkeeping for transferred edge\n this.body.edges[srcId].edgeReplacedById = parentClusterEdge.id;\n });\n\n // Remove cluster edge from parent cluster edge\n parentClusterEdge.clusteringEdgeReplacingIds.splice(index, 1);\n });\n });\n childCluster.edges = [];\n }\n}\n\n\nexport default Cluster;\n","/* ===========================================================================\n\n# TODO\n\n- `edgeReplacedById` not cleaned up yet on cluster edge removal\n- allowSingleNodeCluster could be a global option as well; currently needs to always\n be passed to clustering methods\n\n----------------------------------------------\n\n# State Model for Clustering\n\nThe total state for clustering is non-trivial. It is useful to have a model\navailable as to how it works. The following documents the relevant state items.\n\n\n## Network State\n\nThe following `network`-members are relevant to clustering:\n\n- `body.nodes` - all nodes actively participating in the network\n- `body.edges` - same for edges\n- `body.nodeIndices` - id's of nodes that are visible at a given moment\n- `body.edgeIndices` - same for edges\n\nThis includes:\n\n- helper nodes for dragging in `manipulation`\n- helper nodes for edge type `dynamic`\n- cluster nodes and edges\n- there may be more than this.\n\nA node/edge may be missing in the `Indices` member if:\n\n- it is a helper node\n- the node or edge state has option `hidden` set\n- It is not visible due to clustering\n\n\n## Clustering State\n\nFor the hashes, the id's of the nodes/edges are used as key.\n\nMember `network.clustering` contains the following items:\n\n- `clusteredNodes` - hash with values: { clusterId: , node: }\n- `clusteredEdges` - hash with values: restore information for given edge\n\n\nDue to nesting of clusters, these members can contain cluster nodes and edges as well.\n\nThe important thing to note here, is that the clustered nodes and edges also\nappear in the members of the cluster nodes. For data update, it is therefore \nimportant to scan these lists as well as the cluster nodes.\n\n\n### Cluster Node\n\nA cluster node has the following extra fields:\n\n- `isCluster : true` - indication that this is a cluster node\n- `containedNodes` - hash of nodes contained in this cluster\n- `containedEdges` - same for edges\n- `edges` - array of cluster edges for this node \n\n\n**NOTE:**\n\n- `containedEdges` can also contain edges which are not clustered; e.g. an edge\n connecting two nodes in the same cluster.\n\n\n### Cluster Edge\n\nThese are the items in the `edges` member of a clustered node. They have the\nfollowing relevant members:\n\n- 'clusteringEdgeReplacingIds` - array of id's of edges replaced by this edge\n\nNote that it's possible to nest clusters, so that `clusteringEdgeReplacingIds`\ncan contain edge id's of other clusters.\n\n\n### Clustered Edge\n\nThis is any edge contained by a cluster edge. It gets the following additional\nmember:\n\n- `edgeReplacedById` - id of the cluster edge in which current edge is clustered\n\n\n =========================================================================== */\nimport util from 'vis-util';\nimport NetworkUtil from'../NetworkUtil';\nimport Cluster from'./components/nodes/Cluster';\nimport Edge from './components/Edge'; // Only needed for check on type!\nimport Node from './components/Node'; // Only needed for check on type!\n\n/**\n * The clustering engine\n */\nclass ClusterEngine {\n /**\n * @param {Object} body\n */\n constructor(body) {\n this.body = body;\n this.clusteredNodes = {}; // key: node id, value: { clusterId: , node: }\n this.clusteredEdges = {}; // key: edge id, value: restore information for given edge\n\n this.options = {};\n this.defaultOptions = {};\n util.extend(this.options, this.defaultOptions);\n\n this.body.emitter.on('_resetData', () => {this.clusteredNodes = {}; this.clusteredEdges = {};})\n }\n\n /**\n *\n * @param {number} hubsize\n * @param {Object} options\n */\n clusterByHubsize(hubsize, options) {\n if (hubsize === undefined) {\n hubsize = this._getHubSize();\n }\n else if (typeof(hubsize) === \"object\") {\n options = this._checkOptions(hubsize);\n hubsize = this._getHubSize();\n }\n\n let nodesToCluster = [];\n for (let i = 0; i < this.body.nodeIndices.length; i++) {\n let node = this.body.nodes[this.body.nodeIndices[i]];\n if (node.edges.length >= hubsize) {\n nodesToCluster.push(node.id);\n }\n }\n\n for (let i = 0; i < nodesToCluster.length; i++) {\n this.clusterByConnection(nodesToCluster[i],options,true);\n }\n\n this.body.emitter.emit('_dataChanged');\n }\n\n\n /**\n * loop over all nodes, check if they adhere to the condition and cluster if needed.\n * @param {Object} options\n * @param {boolean} [refreshData=true]\n */\n cluster(options = {}, refreshData = true) {\n if (options.joinCondition === undefined) {throw new Error(\"Cannot call clusterByNodeData without a joinCondition function in the options.\");}\n\n // check if the options object is fine, append if needed\n options = this._checkOptions(options);\n\n let childNodesObj = {};\n let childEdgesObj = {};\n\n // collect the nodes that will be in the cluster\n util.forEach(this.body.nodes, (node, nodeId) => {\n if (node.options && options.joinCondition(node.options) === true) {\n childNodesObj[nodeId] = node;\n\n // collect the edges that will be in the cluster\n util.forEach(node.edges, (edge) => {\n if (this.clusteredEdges[edge.id] === undefined) {\n childEdgesObj[edge.id] = edge;\n }\n });\n }\n });\n\n this._cluster(childNodesObj, childEdgesObj, options, refreshData);\n }\n\n\n /**\n * Cluster all nodes in the network that have only X edges\n * @param {number} edgeCount\n * @param {Object} options\n * @param {boolean} [refreshData=true]\n */\n clusterByEdgeCount(edgeCount, options, refreshData = true) {\n options = this._checkOptions(options);\n let clusters = [];\n let usedNodes = {};\n let edge, edges, relevantEdgeCount;\n // collect the nodes that will be in the cluster\n for (let i = 0; i < this.body.nodeIndices.length; i++) {\n let childNodesObj = {};\n let childEdgesObj = {};\n let nodeId = this.body.nodeIndices[i];\n let node = this.body.nodes[nodeId];\n\n // if this node is already used in another cluster this session, we do not have to re-evaluate it.\n if (usedNodes[nodeId] === undefined) {\n relevantEdgeCount = 0;\n edges = [];\n for (let j = 0; j < node.edges.length; j++) {\n edge = node.edges[j];\n if (this.clusteredEdges[edge.id] === undefined) {\n if (edge.toId !== edge.fromId) {\n relevantEdgeCount++;\n }\n edges.push(edge);\n }\n }\n\n // this node qualifies, we collect its neighbours to start the clustering process.\n if (relevantEdgeCount === edgeCount) {\n var checkJoinCondition = function(node) {\n if (options.joinCondition === undefined || options.joinCondition === null) {\n return true;\n }\n\n let clonedOptions = NetworkUtil.cloneOptions(node);\n return options.joinCondition(clonedOptions);\n }\n\n let gatheringSuccessful = true;\n for (let j = 0; j < edges.length; j++) {\n edge = edges[j];\n let childNodeId = this._getConnectedId(edge, nodeId);\n // add the nodes to the list by the join condition.\n if (checkJoinCondition(node)) {\n childEdgesObj[edge.id] = edge;\n childNodesObj[nodeId] = node;\n childNodesObj[childNodeId] = this.body.nodes[childNodeId];\n usedNodes[nodeId] = true;\n } else {\n // this node does not qualify after all.\n gatheringSuccessful = false;\n break;\n }\n }\n\n // add to the cluster queue\n if (Object.keys(childNodesObj).length > 0 && Object.keys(childEdgesObj).length > 0 && gatheringSuccessful === true) {\n /**\n * Search for cluster data that contains any of the node id's\n * @returns {Boolean} true if no joinCondition, otherwise return value of joinCondition\n */\n var findClusterData = function() {\n for (let n = 0; n < clusters.length; ++n) {\n // Search for a cluster containing any of the node id's\n for (var m in childNodesObj) {\n if (clusters[n].nodes[m] !== undefined) {\n return clusters[n];\n }\n }\n }\n\n return undefined;\n };\n\n\n // If any of the found nodes is part of a cluster found in this method,\n // add the current values to that cluster\n var foundCluster = findClusterData();\n if (foundCluster !== undefined) {\n // Add nodes to found cluster if not present\n for (let m in childNodesObj) {\n if (foundCluster.nodes[m] === undefined) {\n foundCluster.nodes[m] = childNodesObj[m];\n }\n }\n\n // Add edges to found cluster, if not present\n for (let m in childEdgesObj) {\n if (foundCluster.edges[m] === undefined) {\n foundCluster.edges[m] = childEdgesObj[m];\n }\n }\n } else {\n // Create a new cluster group\n clusters.push({nodes: childNodesObj, edges: childEdgesObj})\n }\n }\n }\n }\n }\n\n for (let i = 0; i < clusters.length; i++) {\n this._cluster(clusters[i].nodes, clusters[i].edges, options, false)\n }\n\n if (refreshData === true) {\n this.body.emitter.emit('_dataChanged');\n }\n }\n\n /**\n * Cluster all nodes in the network that have only 1 edge\n * @param {Object} options\n * @param {boolean} [refreshData=true]\n */\n clusterOutliers(options, refreshData = true) {\n this.clusterByEdgeCount(1,options,refreshData);\n }\n\n /**\n * Cluster all nodes in the network that have only 2 edge\n * @param {Object} options\n * @param {boolean} [refreshData=true]\n */\n clusterBridges(options, refreshData = true) {\n this.clusterByEdgeCount(2,options,refreshData);\n }\n\n\n\n /**\n * suck all connected nodes of a node into the node.\n * @param {Node.id} nodeId\n * @param {Object} options\n * @param {boolean} [refreshData=true]\n */\n clusterByConnection(nodeId, options, refreshData = true) {\n // kill conditions\n if (nodeId === undefined) {throw new Error(\"No nodeId supplied to clusterByConnection!\");}\n if (this.body.nodes[nodeId] === undefined) {throw new Error(\"The nodeId given to clusterByConnection does not exist!\");}\n\n let node = this.body.nodes[nodeId];\n options = this._checkOptions(options, node);\n if (options.clusterNodeProperties.x === undefined) {options.clusterNodeProperties.x = node.x;}\n if (options.clusterNodeProperties.y === undefined) {options.clusterNodeProperties.y = node.y;}\n if (options.clusterNodeProperties.fixed === undefined) {\n options.clusterNodeProperties.fixed = {};\n options.clusterNodeProperties.fixed.x = node.options.fixed.x;\n options.clusterNodeProperties.fixed.y = node.options.fixed.y;\n }\n\n\n let childNodesObj = {};\n let childEdgesObj = {};\n let parentNodeId = node.id;\n let parentClonedOptions = NetworkUtil.cloneOptions(node);\n childNodesObj[parentNodeId] = node;\n\n // collect the nodes that will be in the cluster\n for (let i = 0; i < node.edges.length; i++) {\n let edge = node.edges[i];\n if (this.clusteredEdges[edge.id] === undefined) {\n let childNodeId = this._getConnectedId(edge, parentNodeId);\n\n // if the child node is not in a cluster\n if (this.clusteredNodes[childNodeId] === undefined) {\n if (childNodeId !== parentNodeId) {\n if (options.joinCondition === undefined) {\n childEdgesObj[edge.id] = edge;\n childNodesObj[childNodeId] = this.body.nodes[childNodeId];\n }\n else {\n // clone the options and insert some additional parameters that could be interesting.\n let childClonedOptions = NetworkUtil.cloneOptions(this.body.nodes[childNodeId]);\n if (options.joinCondition(parentClonedOptions, childClonedOptions) === true) {\n childEdgesObj[edge.id] = edge;\n childNodesObj[childNodeId] = this.body.nodes[childNodeId];\n }\n }\n }\n else {\n // swallow the edge if it is self-referencing.\n childEdgesObj[edge.id] = edge;\n }\n }\n }\n }\n var childNodeIDs = Object.keys(childNodesObj).map(function(childNode){\n return childNodesObj[childNode].id;\n })\n\n for (childNode in childNodesObj) {\n if (!childNodesObj.hasOwnProperty(childNode)) continue;\n\n var childNode = childNodesObj[childNode];\n for (var y=0; y < childNode.edges.length; y++){\n var childEdge = childNode.edges[y];\n if (childNodeIDs.indexOf(this._getConnectedId(childEdge,childNode.id)) > -1){\n childEdgesObj[childEdge.id] = childEdge;\n }\n }\n }\n this._cluster(childNodesObj, childEdgesObj, options, refreshData);\n }\n\n\n /**\n * This function creates the edges that will be attached to the cluster\n * It looks for edges that are connected to the nodes from the \"outside' of the cluster.\n *\n * @param {{Node.id: vis.Node}} childNodesObj\n * @param {{vis.Edge.id: vis.Edge}} childEdgesObj\n * @param {Object} clusterNodeProperties\n * @param {Object} clusterEdgeProperties\n * @private\n */\n _createClusterEdges (childNodesObj, childEdgesObj, clusterNodeProperties, clusterEdgeProperties) {\n let edge, childNodeId, childNode, toId, fromId, otherNodeId;\n\n // loop over all child nodes and their edges to find edges going out of the cluster\n // these edges will be replaced by clusterEdges.\n let childKeys = Object.keys(childNodesObj);\n let createEdges = [];\n for (let i = 0; i < childKeys.length; i++) {\n childNodeId = childKeys[i];\n childNode = childNodesObj[childNodeId];\n\n // construct new edges from the cluster to others\n for (let j = 0; j < childNode.edges.length; j++) {\n edge = childNode.edges[j];\n // we only handle edges that are visible to the system, not the disabled ones from the clustering process.\n if (this.clusteredEdges[edge.id] === undefined) {\n // self-referencing edges will be added to the \"hidden\" list\n if (edge.toId == edge.fromId) {\n childEdgesObj[edge.id] = edge;\n }\n else {\n // set up the from and to.\n if (edge.toId == childNodeId) { // this is a double equals because ints and strings can be interchanged here.\n toId = clusterNodeProperties.id;\n fromId = edge.fromId;\n otherNodeId = fromId;\n }\n else {\n toId = edge.toId;\n fromId = clusterNodeProperties.id;\n otherNodeId = toId;\n }\n }\n\n // Only edges from the cluster outwards are being replaced.\n if (childNodesObj[otherNodeId] === undefined) {\n createEdges.push({edge: edge, fromId: fromId, toId: toId});\n }\n }\n }\n }\n\n\n //\n // Here we actually create the replacement edges.\n //\n // We could not do this in the loop above as the creation process\n // would add an edge to the edges array we are iterating over.\n //\n // NOTE: a clustered edge can have multiple base edges!\n //\n var newEdges = [];\n\n /**\n * Find a cluster edge which matches the given created edge.\n * @param {vis.Edge} createdEdge\n * @returns {vis.Edge}\n */\n var getNewEdge = function(createdEdge) {\n for (let j = 0; j < newEdges.length; j++) {\n let newEdge = newEdges[j];\n\n // We replace both to and from edges with a single cluster edge\n let matchToDirection = (createdEdge.fromId === newEdge.fromId && createdEdge.toId === newEdge.toId);\n let matchFromDirection = (createdEdge.fromId === newEdge.toId && createdEdge.toId === newEdge.fromId);\n\n if (matchToDirection || matchFromDirection ) {\n return newEdge;\n }\n }\n\n return null;\n };\n\n\n for (let j = 0; j < createEdges.length; j++) {\n let createdEdge = createEdges[j];\n let edge = createdEdge.edge;\n let newEdge = getNewEdge(createdEdge);\n\n if (newEdge === null) {\n // Create a clustered edge for this connection\n newEdge = this._createClusteredEdge(\n createdEdge.fromId,\n createdEdge.toId,\n edge,\n clusterEdgeProperties);\n\n newEdges.push(newEdge);\n } else {\n newEdge.clusteringEdgeReplacingIds.push(edge.id);\n }\n\n // also reference the new edge in the old edge\n this.body.edges[edge.id].edgeReplacedById = newEdge.id;\n\n // hide the replaced edge\n this._backupEdgeOptions(edge);\n edge.setOptions({physics:false});\n }\n }\n\n /**\n * This function checks the options that can be supplied to the different cluster functions\n * for certain fields and inserts defaults if needed\n * @param {Object} options\n * @returns {*}\n * @private\n */\n _checkOptions(options = {}) {\n if (options.clusterEdgeProperties === undefined) {options.clusterEdgeProperties = {};}\n if (options.clusterNodeProperties === undefined) {options.clusterNodeProperties = {};}\n\n return options;\n }\n\n /**\n *\n * @param {Object} childNodesObj | object with node objects, id as keys, same as childNodes except it also contains a source node\n * @param {Object} childEdgesObj | object with edge objects, id as keys\n * @param {Array} options | object with {clusterNodeProperties, clusterEdgeProperties, processProperties}\n * @param {boolean} refreshData | when true, do not wrap up\n * @private\n */\n _cluster(childNodesObj, childEdgesObj, options, refreshData = true) {\n // Remove nodes which are already clustered\n var tmpNodesToRemove = []\n for (let nodeId in childNodesObj) {\n if (childNodesObj.hasOwnProperty(nodeId)) {\n if (this.clusteredNodes[nodeId] !== undefined) {\n tmpNodesToRemove.push(nodeId);\n }\n }\n }\n\n for (var n = 0; n < tmpNodesToRemove.length; ++n) {\n delete childNodesObj[tmpNodesToRemove[n]];\n }\n\n // kill condition: no nodes don't bother\n if (Object.keys(childNodesObj).length == 0) {return;}\n\n // allow clusters of 1 if options allow\n if (Object.keys(childNodesObj).length == 1 && options.clusterNodeProperties.allowSingleNodeCluster != true) {return;}\n\n let clusterNodeProperties = util.deepExtend({},options.clusterNodeProperties);\n\n // construct the clusterNodeProperties\n if (options.processProperties !== undefined) {\n // get the childNode options\n let childNodesOptions = [];\n for (let nodeId in childNodesObj) {\n if (childNodesObj.hasOwnProperty(nodeId)) {\n let clonedOptions = NetworkUtil.cloneOptions(childNodesObj[nodeId]);\n childNodesOptions.push(clonedOptions);\n }\n }\n\n // get cluster properties based on childNodes\n let childEdgesOptions = [];\n for (let edgeId in childEdgesObj) {\n if (childEdgesObj.hasOwnProperty(edgeId)) {\n // these cluster edges will be removed on creation of the cluster.\n if (edgeId.substr(0, 12) !== \"clusterEdge:\") {\n let clonedOptions = NetworkUtil.cloneOptions(childEdgesObj[edgeId], 'edge');\n childEdgesOptions.push(clonedOptions);\n }\n }\n }\n\n clusterNodeProperties = options.processProperties(clusterNodeProperties, childNodesOptions, childEdgesOptions);\n if (!clusterNodeProperties) {\n throw new Error(\"The processProperties function does not return properties!\");\n }\n }\n\n // check if we have an unique id;\n if (clusterNodeProperties.id === undefined) {clusterNodeProperties.id = 'cluster:' + util.randomUUID();}\n let clusterId = clusterNodeProperties.id;\n\n if (clusterNodeProperties.label === undefined) {\n clusterNodeProperties.label = 'cluster';\n }\n\n\n // give the clusterNode a position if it does not have one.\n let pos = undefined;\n if (clusterNodeProperties.x === undefined) {\n pos = this._getClusterPosition(childNodesObj);\n clusterNodeProperties.x = pos.x;\n }\n if (clusterNodeProperties.y === undefined) {\n if (pos === undefined) {pos = this._getClusterPosition(childNodesObj);}\n clusterNodeProperties.y = pos.y;\n }\n\n // force the ID to remain the same\n clusterNodeProperties.id = clusterId;\n\n // create the cluster Node\n // Note that allowSingleNodeCluster, if present, is stored in the options as well\n let clusterNode = this.body.functions.createNode(clusterNodeProperties, Cluster);\n clusterNode.containedNodes = childNodesObj;\n clusterNode.containedEdges = childEdgesObj;\n // cache a copy from the cluster edge properties if we have to reconnect others later on\n clusterNode.clusterEdgeProperties = options.clusterEdgeProperties;\n\n // finally put the cluster node into global\n this.body.nodes[clusterNodeProperties.id] = clusterNode;\n\n this._clusterEdges(childNodesObj, childEdgesObj, clusterNodeProperties, options.clusterEdgeProperties);\n\n // set ID to undefined so no duplicates arise\n clusterNodeProperties.id = undefined;\n\n // wrap up\n if (refreshData === true) {\n this.body.emitter.emit('_dataChanged');\n }\n }\n\n /**\n *\n * @param {Edge} edge\n * @private\n */\n _backupEdgeOptions(edge) {\n if (this.clusteredEdges[edge.id] === undefined) {\n this.clusteredEdges[edge.id] = {physics: edge.options.physics};\n }\n }\n\n /**\n *\n * @param {Edge} edge\n * @private\n */\n _restoreEdge(edge) {\n let originalOptions = this.clusteredEdges[edge.id];\n if (originalOptions !== undefined) {\n edge.setOptions({physics: originalOptions.physics});\n delete this.clusteredEdges[edge.id];\n }\n }\n\n\n /**\n * Check if a node is a cluster.\n * @param {Node.id} nodeId\n * @returns {*}\n */\n isCluster(nodeId) {\n if (this.body.nodes[nodeId] !== undefined) {\n return this.body.nodes[nodeId].isCluster === true;\n }\n else {\n console.log(\"Node does not exist.\");\n return false;\n }\n }\n\n /**\n * get the position of the cluster node based on what's inside\n * @param {object} childNodesObj | object with node objects, id as keys\n * @returns {{x: number, y: number}}\n * @private\n */\n _getClusterPosition(childNodesObj) {\n let childKeys = Object.keys(childNodesObj);\n let minX = childNodesObj[childKeys[0]].x;\n let maxX = childNodesObj[childKeys[0]].x;\n let minY = childNodesObj[childKeys[0]].y;\n let maxY = childNodesObj[childKeys[0]].y;\n let node;\n for (let i = 1; i < childKeys.length; i++) {\n node = childNodesObj[childKeys[i]];\n minX = node.x < minX ? node.x : minX;\n maxX = node.x > maxX ? node.x : maxX;\n minY = node.y < minY ? node.y : minY;\n maxY = node.y > maxY ? node.y : maxY;\n }\n\n return {x: 0.5*(minX + maxX), y: 0.5*(minY + maxY)};\n }\n\n\n\n /**\n * Open a cluster by calling this function.\n * @param {vis.Edge.id} clusterNodeId | the ID of the cluster node\n * @param {Object} options\n * @param {boolean} refreshData | wrap up afterwards if not true\n */\n openCluster(clusterNodeId, options, refreshData = true) {\n // kill conditions\n if (clusterNodeId === undefined) {\n throw new Error(\"No clusterNodeId supplied to openCluster.\");\n }\n\n let clusterNode = this.body.nodes[clusterNodeId];\n\n if (clusterNode === undefined) {\n throw new Error(\"The clusterNodeId supplied to openCluster does not exist.\");\n }\n if (clusterNode.isCluster !== true\n || clusterNode.containedNodes === undefined\n || clusterNode.containedEdges === undefined) {\n throw new Error(\"The node:\" + clusterNodeId + \" is not a valid cluster.\");\n }\n\n // Check if current cluster is clustered itself\n let stack = this.findNode(clusterNodeId);\n let parentIndex = stack.indexOf(clusterNodeId) - 1;\n if (parentIndex >= 0) {\n // Current cluster is clustered; transfer contained nodes and edges to parent\n let parentClusterNodeId = stack[parentIndex];\n let parentClusterNode = this.body.nodes[parentClusterNodeId];\n\n // clustering.clusteredNodes and clustering.clusteredEdges remain unchanged\n parentClusterNode._openChildCluster(clusterNodeId);\n\n // All components of child cluster node have been transferred. It can die now.\n delete this.body.nodes[clusterNodeId];\n if (refreshData === true) {\n this.body.emitter.emit('_dataChanged');\n }\n\n return;\n }\n\n // main body \n let containedNodes = clusterNode.containedNodes;\n let containedEdges = clusterNode.containedEdges;\n\n // allow the user to position the nodes after release.\n if (options !== undefined && options.releaseFunction !== undefined && typeof options.releaseFunction === 'function') {\n let positions = {};\n let clusterPosition = {x:clusterNode.x, y:clusterNode.y};\n for (let nodeId in containedNodes) {\n if (containedNodes.hasOwnProperty(nodeId)) {\n let containedNode = this.body.nodes[nodeId];\n positions[nodeId] = {x: containedNode.x, y: containedNode.y};\n }\n }\n let newPositions = options.releaseFunction(clusterPosition, positions);\n\n for (let nodeId in containedNodes) {\n if (containedNodes.hasOwnProperty(nodeId)) {\n let containedNode = this.body.nodes[nodeId];\n if (newPositions[nodeId] !== undefined) {\n containedNode.x = (newPositions[nodeId].x === undefined ? clusterNode.x : newPositions[nodeId].x);\n containedNode.y = (newPositions[nodeId].y === undefined ? clusterNode.y : newPositions[nodeId].y);\n }\n }\n }\n }\n else {\n // copy the position from the cluster\n util.forEach(containedNodes, function(containedNode) {\n // inherit position\n if (containedNode.options.fixed.x === false) {containedNode.x = clusterNode.x;}\n if (containedNode.options.fixed.y === false) {containedNode.y = clusterNode.y;}\n });\n }\n\n // release nodes\n for (let nodeId in containedNodes) {\n if (containedNodes.hasOwnProperty(nodeId)) {\n let containedNode = this.body.nodes[nodeId];\n\n // inherit speed\n containedNode.vx = clusterNode.vx;\n containedNode.vy = clusterNode.vy;\n\n containedNode.setOptions({physics:true});\n\n delete this.clusteredNodes[nodeId];\n }\n }\n\n // copy the clusterNode edges because we cannot iterate over an object that we add or remove from.\n let edgesToBeDeleted = [];\n for (let i = 0; i < clusterNode.edges.length; i++) {\n edgesToBeDeleted.push(clusterNode.edges[i]);\n }\n\n // actually handling the deleting.\n for (let i = 0; i < edgesToBeDeleted.length; i++) {\n let edge = edgesToBeDeleted[i];\n let otherNodeId = this._getConnectedId(edge, clusterNodeId);\n let otherNode = this.clusteredNodes[otherNodeId];\n\n for (let j = 0; j < edge.clusteringEdgeReplacingIds.length; j++) {\n let transferId = edge.clusteringEdgeReplacingIds[j];\n let transferEdge = this.body.edges[transferId];\n if (transferEdge === undefined) continue; \n\n // if the other node is in another cluster, we transfer ownership of this edge to the other cluster\n if (otherNode !== undefined) {\n // transfer ownership:\n let otherCluster = this.body.nodes[otherNode.clusterId];\n otherCluster.containedEdges[transferEdge.id] = transferEdge;\n\n // delete local reference\n delete containedEdges[transferEdge.id];\n\n // get to and from\n let fromId = transferEdge.fromId;\n let toId = transferEdge.toId;\n if (transferEdge.toId == otherNodeId) {\n toId = otherNode.clusterId;\n }\n else {\n fromId = otherNode.clusterId;\n }\n\n // create new cluster edge from the otherCluster\n this._createClusteredEdge(\n fromId,\n toId,\n transferEdge,\n otherCluster.clusterEdgeProperties,\n {hidden: false, physics: true});\n\n } else {\n this._restoreEdge(transferEdge);\n }\n }\n\n edge.remove();\n }\n\n // handle the releasing of the edges\n for (let edgeId in containedEdges) {\n if (containedEdges.hasOwnProperty(edgeId)) {\n this._restoreEdge(containedEdges[edgeId]);\n }\n }\n\n // remove clusterNode\n delete this.body.nodes[clusterNodeId];\n\n if (refreshData === true) {\n this.body.emitter.emit('_dataChanged');\n }\n }\n\n /**\n *\n * @param {Cluster.id} clusterId\n * @returns {Array.}\n */\n getNodesInCluster(clusterId) {\n let nodesArray = [];\n if (this.isCluster(clusterId) === true) {\n let containedNodes = this.body.nodes[clusterId].containedNodes;\n for (let nodeId in containedNodes) {\n if (containedNodes.hasOwnProperty(nodeId)) {\n nodesArray.push(this.body.nodes[nodeId].id)\n }\n }\n }\n\n return nodesArray;\n }\n\n /**\n * Get the stack clusterId's that a certain node resides in. cluster A -> cluster B -> cluster C -> node\n *\n * If a node can't be found in the chain, return an empty array.\n *\n * @param {string|number} nodeId\n * @returns {Array}\n */\n findNode(nodeId) {\n let stack = [];\n let max = 100;\n let counter = 0;\n let node;\n\n while (this.clusteredNodes[nodeId] !== undefined && counter < max) {\n node = this.body.nodes[nodeId]\n if (node === undefined) return [];\n stack.push(node.id);\n\n nodeId = this.clusteredNodes[nodeId].clusterId;\n counter++;\n }\n\n node = this.body.nodes[nodeId]\n if (node === undefined) return [];\n stack.push(node.id);\n\n stack.reverse();\n return stack;\n }\n\n /**\n * Using a clustered nodeId, update with the new options\n * @param {vis.Edge.id} clusteredNodeId\n * @param {object} newOptions\n */\n updateClusteredNode(clusteredNodeId, newOptions) {\n if (clusteredNodeId === undefined) {throw new Error(\"No clusteredNodeId supplied to updateClusteredNode.\");}\n if (newOptions === undefined) {throw new Error(\"No newOptions supplied to updateClusteredNode.\");}\n if (this.body.nodes[clusteredNodeId] === undefined) {throw new Error(\"The clusteredNodeId supplied to updateClusteredNode does not exist.\");}\n\n this.body.nodes[clusteredNodeId].setOptions(newOptions);\n this.body.emitter.emit('_dataChanged');\n }\n\n /**\n * Using a base edgeId, update all related clustered edges with the new options\n * @param {vis.Edge.id} startEdgeId\n * @param {object} newOptions\n */\n updateEdge(startEdgeId, newOptions) {\n if (startEdgeId === undefined) {throw new Error(\"No startEdgeId supplied to updateEdge.\");}\n if (newOptions === undefined) {throw new Error(\"No newOptions supplied to updateEdge.\");}\n if (this.body.edges[startEdgeId] === undefined) {throw new Error(\"The startEdgeId supplied to updateEdge does not exist.\");}\n\n let allEdgeIds = this.getClusteredEdges(startEdgeId);\n for (let i = 0; i < allEdgeIds.length; i++) {\n var edge = this.body.edges[allEdgeIds[i]];\n edge.setOptions(newOptions);\n }\n this.body.emitter.emit('_dataChanged');\n }\n\n /**\n * Get a stack of clusterEdgeId's (+base edgeid) that a base edge is the same as. cluster edge C -> cluster edge B -> cluster edge A -> base edge(edgeId)\n * @param {vis.Edge.id} edgeId\n * @returns {Array.}\n */\n getClusteredEdges(edgeId) {\n let stack = [];\n let max = 100;\n let counter = 0;\n\n while (edgeId !== undefined && this.body.edges[edgeId] !== undefined && counter < max) {\n stack.push(this.body.edges[edgeId].id);\n edgeId = this.body.edges[edgeId].edgeReplacedById;\n counter++;\n }\n stack.reverse();\n return stack;\n }\n\n /**\n * Get the base edge id of clusterEdgeId. cluster edge (clusteredEdgeId) -> cluster edge B -> cluster edge C -> base edge\n * @param {vis.Edge.id} clusteredEdgeId\n * @returns {vis.Edge.id} baseEdgeId\n *\n * TODO: deprecate in 5.0.0. Method getBaseEdges() is the correct one to use.\n */\n getBaseEdge(clusteredEdgeId) {\n // Just kludge this by returning the first base edge id found\n return this.getBaseEdges(clusteredEdgeId)[0];\n }\n\n\n /**\n * Get all regular edges for this clustered edge id.\n *\n * @param {vis.Edge.id} clusteredEdgeId\n * @returns {Array.} all baseEdgeId's under this clustered edge\n */\n getBaseEdges(clusteredEdgeId) {\n let IdsToHandle = [clusteredEdgeId];\n let doneIds = [];\n let foundIds = [];\n let max = 100;\n let counter = 0;\n\n while (IdsToHandle.length > 0 && counter < max) {\n let nextId = IdsToHandle.pop();\n if (nextId === undefined) continue; // Paranoia here and onwards\n let nextEdge = this.body.edges[nextId];\n if (nextEdge === undefined) continue;\n counter++;\n\n let replacingIds = nextEdge.clusteringEdgeReplacingIds;\n if (replacingIds === undefined) {\n // nextId is a base id\n foundIds.push(nextId);\n } else {\n // Another cluster edge, unravel this one as well\n for (let i = 0; i < replacingIds.length; ++i) {\n let replacingId = replacingIds[i];\n\n // Don't add if already handled\n // TODO: never triggers; find a test-case which does\n if (IdsToHandle.indexOf(replacingIds) !== -1 || doneIds.indexOf(replacingIds) !== -1) {\n continue;\n }\n\n IdsToHandle.push(replacingId);\n }\n }\n\n doneIds.push(nextId);\n }\n\n return foundIds;\n }\n\n\n /**\n * Get the Id the node is connected to\n * @param {vis.Edge} edge\n * @param {Node.id} nodeId\n * @returns {*}\n * @private\n */\n _getConnectedId(edge, nodeId) {\n if (edge.toId != nodeId) {\n return edge.toId;\n }\n else if (edge.fromId != nodeId) {\n return edge.fromId;\n }\n else {\n return edge.fromId;\n }\n }\n\n /**\n * We determine how many connections denote an important hub.\n * We take the mean + 2*std as the important hub size. (Assuming a normal distribution of data, ~2.2%)\n *\n * @returns {number}\n * @private\n */\n _getHubSize() {\n let average = 0;\n let averageSquared = 0;\n let hubCounter = 0;\n let largestHub = 0;\n\n for (let i = 0; i < this.body.nodeIndices.length; i++) {\n let node = this.body.nodes[this.body.nodeIndices[i]];\n if (node.edges.length > largestHub) {\n largestHub = node.edges.length;\n }\n average += node.edges.length;\n averageSquared += Math.pow(node.edges.length,2);\n hubCounter += 1;\n }\n average = average / hubCounter;\n averageSquared = averageSquared / hubCounter;\n\n let variance = averageSquared - Math.pow(average,2);\n let standardDeviation = Math.sqrt(variance);\n\n let hubThreshold = Math.floor(average + 2*standardDeviation);\n\n // always have at least one to cluster\n if (hubThreshold > largestHub) {\n hubThreshold = largestHub;\n }\n\n return hubThreshold;\n }\n\n\n /**\n * Create an edge for the cluster representation.\n *\n * @param {Node.id} fromId\n * @param {Node.id} toId\n * @param {vis.Edge} baseEdge\n * @param {Object} clusterEdgeProperties\n * @param {Object} extraOptions\n * @returns {Edge} newly created clustered edge\n * @private\n */\n _createClusteredEdge(fromId, toId, baseEdge, clusterEdgeProperties, extraOptions) {\n // copy the options of the edge we will replace\n let clonedOptions = NetworkUtil.cloneOptions(baseEdge, 'edge');\n // make sure the properties of clusterEdges are superimposed on it\n util.deepExtend(clonedOptions, clusterEdgeProperties);\n\n // set up the edge\n clonedOptions.from = fromId;\n clonedOptions.to = toId;\n clonedOptions.id = 'clusterEdge:' + util.randomUUID();\n\n // apply the edge specific options to it if specified\n if (extraOptions !== undefined) {\n util.deepExtend(clonedOptions, extraOptions);\n }\n\n let newEdge = this.body.functions.createEdge(clonedOptions);\n newEdge.clusteringEdgeReplacingIds = [baseEdge.id];\n newEdge.connect();\n\n // Register the new edge\n this.body.edges[newEdge.id] = newEdge;\n\n return newEdge;\n }\n\n\n /**\n * Add the passed child nodes and edges to the given cluster node.\n *\n * @param {Object|Node} childNodes hash of nodes or single node to add in cluster\n * @param {Object|Edge} childEdges hash of edges or single edge to take into account when clustering\n * @param {Node} clusterNode cluster node to add nodes and edges to\n * @param {Object} [clusterEdgeProperties]\n * @private\n */\n _clusterEdges(childNodes, childEdges, clusterNode, clusterEdgeProperties) {\n if (childEdges instanceof Edge) {\n let edge = childEdges;\n let obj = {};\n obj[edge.id] = edge;\n childEdges = obj;\n }\n\n if (childNodes instanceof Node) {\n let node = childNodes;\n let obj = {};\n obj[node.id] = node;\n childNodes = obj;\n }\n\n if (clusterNode === undefined || clusterNode === null) {\n throw new Error(\"_clusterEdges: parameter clusterNode required\");\n }\n\n if (clusterEdgeProperties === undefined) {\n // Take the required properties from the cluster node\n clusterEdgeProperties = clusterNode.clusterEdgeProperties;\n }\n\n // create the new edges that will connect to the cluster.\n // All self-referencing edges will be added to childEdges here.\n this._createClusterEdges(childNodes, childEdges, clusterNode, clusterEdgeProperties);\n\n // disable the childEdges\n for (let edgeId in childEdges) {\n if (childEdges.hasOwnProperty(edgeId)) {\n if (this.body.edges[edgeId] !== undefined) {\n let edge = this.body.edges[edgeId];\n // cache the options before changing\n this._backupEdgeOptions(edge);\n // disable physics and hide the edge\n edge.setOptions({physics:false});\n }\n }\n }\n\n // disable the childNodes\n for (let nodeId in childNodes) {\n if (childNodes.hasOwnProperty(nodeId)) {\n this.clusteredNodes[nodeId] = {clusterId:clusterNode.id, node: this.body.nodes[nodeId]};\n this.body.nodes[nodeId].setOptions({physics:false});\n }\n }\n }\n\n\n /**\n * Determine in which cluster given nodeId resides.\n *\n * If not in cluster, return undefined.\n *\n * NOTE: If you know a cleaner way to do this, please enlighten me (wimrijnders).\n *\n * @param {Node.id} nodeId\n * @returns {Node|undefined} Node instance for cluster, if present\n * @private\n */\n _getClusterNodeForNode(nodeId) {\n if (nodeId === undefined) return undefined;\n let clusteredNode = this.clusteredNodes[nodeId];\n\n // NOTE: If no cluster info found, it should actually be an error\n if (clusteredNode === undefined) return undefined;\n let clusterId = clusteredNode.clusterId;\n if (clusterId === undefined) return undefined;\n\n return this.body.nodes[clusterId];\n }\n\n\n /**\n * Internal helper function for conditionally removing items in array\n *\n * Done like this because Array.filter() is not fully supported by all IE's.\n *\n * @param {Array} arr\n * @param {function} callback\n * @returns {Array}\n * @private\n */\n _filter(arr, callback) {\n let ret = [];\n\n util.forEach(arr, (item) => {\n if (callback(item)) {\n ret.push(item);\n }\n });\n\n return ret;\n }\n\n\n /**\n * Scan all edges for changes in clustering and adjust this if necessary.\n *\n * Call this (internally) after there has been a change in node or edge data.\n *\n * Pre: States of this.body.nodes and this.body.edges consistent\n * Pre: this.clusteredNodes and this.clusteredEdge consistent with containedNodes and containedEdges\n * of cluster nodes.\n */\n _updateState() {\n let nodeId;\n let deletedNodeIds = [];\n let deletedEdgeIds = {};\n\n /**\n * Utility function to iterate over clustering nodes only\n *\n * @param {Function} callback function to call for each cluster node\n */\n let eachClusterNode = (callback) => {\n util.forEach(this.body.nodes, (node) => {\n if (node.isCluster === true) {\n callback(node);\n }\n });\n };\n\n\n //\n // Remove deleted regular nodes from clustering\n //\n\n // Determine the deleted nodes\n for (nodeId in this.clusteredNodes) {\n if (!this.clusteredNodes.hasOwnProperty(nodeId)) continue;\n let node = this.body.nodes[nodeId];\n\n if (node === undefined) {\n deletedNodeIds.push(nodeId);\n }\n }\n\n // Remove nodes from cluster nodes\n eachClusterNode(function(clusterNode) {\n for (let n = 0; n < deletedNodeIds.length; n++) {\n delete clusterNode.containedNodes[deletedNodeIds[n]];\n }\n });\n\n // Remove nodes from cluster list\n for (let n = 0; n < deletedNodeIds.length; n++) {\n delete this.clusteredNodes[deletedNodeIds[n]];\n }\n\n\n //\n // Remove deleted edges from clustering\n //\n\n // Add the deleted clustered edges to the list\n util.forEach(this.clusteredEdges, (edgeId) => {\n let edge = this.body.edges[edgeId];\n if (edge === undefined || !edge.endPointsValid()) {\n deletedEdgeIds[edgeId] = edgeId;\n }\n });\n\n // Cluster nodes can also contain edges which are not clustered, \n // i.e. nodes 1-2 within cluster with an edge in between.\n // So the cluster nodes also need to be scanned for invalid edges\n eachClusterNode(function(clusterNode) {\n util.forEach(clusterNode.containedEdges, (edge, edgeId) => {\n if (!edge.endPointsValid() && !deletedEdgeIds[edgeId]) {\n deletedEdgeIds[edgeId] = edgeId;\n }\n });\n });\n\n // Also scan for cluster edges which need to be removed in the active list.\n // Regular edges have been removed beforehand, so this only picks up the cluster edges.\n util.forEach(this.body.edges, (edge, edgeId) => {\n // Explicitly scan the contained edges for validity\n let isValid = true;\n let replacedIds = edge.clusteringEdgeReplacingIds;\n if (replacedIds !== undefined) {\n let numValid = 0;\n\n util.forEach(replacedIds, (containedEdgeId) => {\n let containedEdge = this.body.edges[containedEdgeId];\n\n if (containedEdge !== undefined && containedEdge.endPointsValid()) {\n numValid += 1;\n }\n });\n\n isValid = (numValid > 0);\n }\n\n if (!edge.endPointsValid() || !isValid) {\n deletedEdgeIds[edgeId] = edgeId;\n }\n });\n\n // Remove edges from cluster nodes\n eachClusterNode((clusterNode) => {\n util.forEach(deletedEdgeIds, (deletedEdgeId) => {\n delete clusterNode.containedEdges[deletedEdgeId];\n\n util.forEach(clusterNode.edges, (edge, m) => {\n if (edge.id === deletedEdgeId) {\n clusterNode.edges[m] = null; // Don't want to directly delete here, because in the loop\n return;\n }\n\n edge.clusteringEdgeReplacingIds = this._filter(edge.clusteringEdgeReplacingIds, function(id) {\n return !deletedEdgeIds[id];\n });\n });\n\n // Clean up the nulls\n clusterNode.edges = this._filter(clusterNode.edges, function(item) {return item !== null});\n });\n });\n\n\n // Remove from cluster list\n util.forEach(deletedEdgeIds, (edgeId) => {\n delete this.clusteredEdges[edgeId];\n });\n\n // Remove cluster edges from active list (this.body.edges).\n // deletedEdgeIds still contains id of regular edges, but these should all\n // be gone when you reach here.\n util.forEach(deletedEdgeIds, (edgeId) => {\n delete this.body.edges[edgeId];\n });\n\n\n //\n // Check changed cluster state of edges\n //\n\n // Iterating over keys here, because edges may be removed in the loop\n let ids = Object.keys(this.body.edges);\n util.forEach(ids, (edgeId) => {\n let edge = this.body.edges[edgeId];\n\n let shouldBeClustered = this._isClusteredNode(edge.fromId) || this._isClusteredNode(edge.toId);\n if (shouldBeClustered === this._isClusteredEdge(edge.id)) {\n return; // all is well\n }\n\n if (shouldBeClustered) {\n // add edge to clustering\n let clusterFrom = this._getClusterNodeForNode(edge.fromId);\n if (clusterFrom !== undefined) {\n this._clusterEdges(this.body.nodes[edge.fromId], edge, clusterFrom);\n }\n\n let clusterTo = this._getClusterNodeForNode(edge.toId);\n if (clusterTo !== undefined) {\n this._clusterEdges(this.body.nodes[edge.toId], edge, clusterTo);\n }\n\n\t\t\t\t// TODO: check that it works for both edges clustered\n // (This might be paranoia)\n } else {\n delete this._clusterEdges[edgeId];\n this._restoreEdge(edge);\n // This should not be happening, the state should\n // be properly updated at this point.\n // \n // If it *is* reached during normal operation, then we have to implement\n // undo clustering for this edge here.\n // throw new Error('remove edge from clustering not implemented!')\n }\n });\n\n\n // Clusters may be nested to any level. Keep on opening until nothing to open\n var changed = false;\n var continueLoop = true;\n while (continueLoop) {\n let clustersToOpen = [];\n\n // Determine the id's of clusters that need opening\n eachClusterNode(function(clusterNode) {\n let numNodes = Object.keys(clusterNode.containedNodes).length;\n let allowSingle = (clusterNode.options.allowSingleNodeCluster === true);\n if ((allowSingle && numNodes < 1) || (!allowSingle && numNodes < 2)) {\n clustersToOpen.push(clusterNode.id);\n }\n });\n\n // Open them\n for (let n = 0; n < clustersToOpen.length; ++n) {\n this.openCluster(clustersToOpen[n], {}, false /* Don't refresh, we're in an refresh/update already */);\n }\n\n continueLoop = (clustersToOpen.length > 0);\n changed = changed || continueLoop;\n }\n\n if (changed) {\n this._updateState() // Redo this method (recursion possible! should be safe)\n }\n }\n\n\n /**\n * Determine if node with given id is part of a cluster.\n *\n * @param {Node.id} nodeId\n * @return {boolean} true if part of a cluster.\n */\n _isClusteredNode(nodeId) {\n return this.clusteredNodes[nodeId] !== undefined;\n }\n\n\n /**\n * Determine if edge with given id is not visible due to clustering.\n *\n * An edge is considered clustered if:\n * - it is directly replaced by a clustering edge\n * - any of its connecting nodes is in a cluster\n *\n * @param {vis.Edge.id} edgeId\n * @return {boolean} true if part of a cluster.\n */\n _isClusteredEdge(edgeId) {\n return this.clusteredEdges[edgeId] !== undefined;\n }\n}\n\n\nexport default ClusterEngine;\n","/**\n * Initializes window.requestAnimationFrame() to a usable form.\n *\n * Specifically, set up this method for the case of running on node.js with jsdom enabled.\n *\n * NOTES:\n *\n * * On node.js, when calling this directly outside of this class, `window` is not defined.\n * This happens even if jsdom is used.\n * * For node.js + jsdom, `window` is available at the moment the constructor is called.\n * For this reason, the called is placed within the constructor.\n * * Even then, `window.requestAnimationFrame()` is not defined, so it still needs to be added.\n * * During unit testing, it happens that the window object is reset during execution, causing\n * a runtime error due to missing `requestAnimationFrame()`. This needs to be compensated for,\n * see `_requestNextFrame()`.\n * * Since this is a global object, it may affect other modules besides `Network`. With normal\n * usage, this does not cause any problems. During unit testing, errors may occur. These have\n * been compensated for, see comment block in _requestNextFrame().\n *\n * @private\n */\nfunction _initRequestAnimationFrame() {\n var func;\n\n if (window !== undefined) {\n func = window.requestAnimationFrame\n || window.mozRequestAnimationFrame\n || window.webkitRequestAnimationFrame\n || window.msRequestAnimationFrame;\n }\n\n if (func === undefined) {\n // window or method not present, setting mock requestAnimationFrame\n window.requestAnimationFrame =\n function(callback) {\n //console.log(\"Called mock requestAnimationFrame\");\n callback();\n }\n } else {\n window.requestAnimationFrame = func;\n }\n}\n\nimport util from 'vis-util';\n\n/**\n * The canvas renderer\n */\nclass CanvasRenderer {\n /**\n * @param {Object} body\n * @param {Canvas} canvas\n */\n constructor(body, canvas) {\n _initRequestAnimationFrame();\n this.body = body;\n this.canvas = canvas;\n\n this.redrawRequested = false;\n this.renderTimer = undefined;\n this.requiresTimeout = true;\n this.renderingActive = false;\n this.renderRequests = 0;\n this.allowRedraw = true;\n\n this.dragging = false;\n this.zooming = false;\n this.options = {};\n this.defaultOptions = {\n hideEdgesOnDrag: false,\n hideEdgesOnZoom: false,\n hideNodesOnDrag: false,\n };\n util.extend(this.options, this.defaultOptions);\n\n this._determineBrowserMethod();\n this.bindEventListeners();\n }\n\n /**\n * Binds event listeners\n */\n bindEventListeners() {\n this.body.emitter.on(\"dragStart\", () => { this.dragging = true; });\n this.body.emitter.on(\"dragEnd\", () => { this.dragging = false; });\n this.body.emitter.on(\"zoom\", () => {\n this.zooming = true;\n window.clearTimeout(this.zoomTimeoutId)\n this.zoomTimeoutId = window.setTimeout(() => { \n this.zooming = false;\n this._requestRedraw.bind(this)()\n }, 250) \n });\n this.body.emitter.on(\"_resizeNodes\", () => { this._resizeNodes(); });\n this.body.emitter.on(\"_redraw\", () => {\n if (this.renderingActive === false) {\n this._redraw();\n }\n });\n this.body.emitter.on(\"_blockRedraw\", () => {this.allowRedraw = false;});\n this.body.emitter.on(\"_allowRedraw\", () => {this.allowRedraw = true; this.redrawRequested = false;});\n this.body.emitter.on(\"_requestRedraw\", this._requestRedraw.bind(this));\n this.body.emitter.on(\"_startRendering\", () => {\n this.renderRequests += 1;\n this.renderingActive = true;\n this._startRendering();\n });\n this.body.emitter.on(\"_stopRendering\", () => {\n this.renderRequests -= 1;\n this.renderingActive = this.renderRequests > 0;\n this.renderTimer = undefined;\n });\n this.body.emitter.on('destroy', () => {\n this.renderRequests = 0;\n this.allowRedraw = false;\n this.renderingActive = false;\n if (this.requiresTimeout === true) {\n clearTimeout(this.renderTimer);\n }\n else {\n window.cancelAnimationFrame(this.renderTimer);\n }\n this.body.emitter.off();\n });\n\n\n }\n\n /**\n *\n * @param {Object} options\n */\n setOptions(options) {\n if (options !== undefined) {\n let fields = ['hideEdgesOnDrag', 'hideEdgesOnZoom', 'hideNodesOnDrag'];\n util.selectiveDeepExtend(fields,this.options, options);\n }\n }\n\n\n /**\n * Prepare the drawing of the next frame.\n *\n * Calls the callback when the next frame can or will be drawn.\n *\n * @param {function} callback\n * @param {number} delay - timeout case only, wait this number of milliseconds\n * @returns {function|undefined}\n * @private\n */\n _requestNextFrame(callback, delay) { \n // During unit testing, it happens that the mock window object is reset while\n // the next frame is still pending. Then, either 'window' is not present, or\n // 'requestAnimationFrame()' is not present because it is not defined on the\n // mock window object.\n //\n // As a consequence, unrelated unit tests may appear to fail, even if the problem\n // described happens in the current unit test.\n //\n // This is not something that will happen in normal operation, but we still need\n // to take it into account.\n //\n if (typeof window === 'undefined') return; // Doing `if (window === undefined)` does not work here!\n\n let timer;\n\n var myWindow = window; // Grab a reference to reduce the possibility that 'window' is reset\n // while running this method.\n\n if (this.requiresTimeout === true) {\n // wait given number of milliseconds and perform the animation step function\n timer = myWindow.setTimeout(callback, delay);\n } else {\n if (myWindow.requestAnimationFrame) {\n timer = myWindow.requestAnimationFrame(callback);\n }\n }\n\n return timer;\n }\n\n /**\n *\n * @private\n */\n _startRendering() {\n if (this.renderingActive === true) {\n if (this.renderTimer === undefined) {\n this.renderTimer = this._requestNextFrame(this._renderStep.bind(this), this.simulationInterval);\n }\n }\n }\n\n /**\n *\n * @private\n */\n _renderStep() {\n if (this.renderingActive === true) {\n // reset the renderTimer so a new scheduled animation step can be set\n this.renderTimer = undefined;\n\n if (this.requiresTimeout === true) {\n // this schedules a new simulation step\n this._startRendering();\n }\n\n this._redraw();\n\n if (this.requiresTimeout === false) {\n // this schedules a new simulation step\n this._startRendering();\n }\n }\n }\n\n /**\n * Redraw the network with the current data\n * chart will be resized too.\n */\n redraw() {\n this.body.emitter.emit('setSize');\n this._redraw();\n }\n\n /**\n * Redraw the network with the current data\n * @private\n */\n _requestRedraw() {\n if (this.redrawRequested !== true && this.renderingActive === false && this.allowRedraw === true) {\n this.redrawRequested = true;\n this._requestNextFrame(() => {this._redraw(false);}, 0);\n }\n }\n\n /**\n * Redraw the network with the current data\n * @param {boolean} [hidden=false] | Used to get the first estimate of the node sizes.\n * Only the nodes are drawn after which they are quickly drawn over.\n * @private\n */\n _redraw(hidden = false) {\n if (this.allowRedraw === true) {\n this.body.emitter.emit(\"initRedraw\");\n\n this.redrawRequested = false;\n\n // when the container div was hidden, this fixes it back up!\n if (this.canvas.frame.canvas.width === 0 || this.canvas.frame.canvas.height === 0) {\n this.canvas.setSize();\n }\n\n this.canvas.setTransform();\n\n let ctx = this.canvas.getContext();\n\n // clear the canvas\n let w = this.canvas.frame.canvas.clientWidth;\n let h = this.canvas.frame.canvas.clientHeight;\n ctx.clearRect(0, 0, w, h);\n\n // if the div is hidden, we stop the redraw here for performance.\n if (this.canvas.frame.clientWidth === 0) {\n return;\n }\n\n // set scaling and translation\n ctx.save();\n ctx.translate(this.body.view.translation.x, this.body.view.translation.y);\n ctx.scale(this.body.view.scale, this.body.view.scale);\n\n ctx.beginPath();\n this.body.emitter.emit(\"beforeDrawing\", ctx);\n ctx.closePath();\n\n if (hidden === false) {\n if (\n (this.dragging === false || (this.dragging === true && this.options.hideEdgesOnDrag === false)) && \n (this.zooming === false || (this.zooming === true && this.options.hideEdgesOnZoom === false))\n ) {\n this._drawEdges(ctx);\n }\n }\n\n if (this.dragging === false || (this.dragging === true && this.options.hideNodesOnDrag === false)) {\n this._drawNodes(ctx, hidden);\n }\n\n ctx.beginPath();\n this.body.emitter.emit(\"afterDrawing\", ctx);\n ctx.closePath();\n\n\n // restore original scaling and translation\n ctx.restore();\n if (hidden === true) {\n ctx.clearRect(0, 0, w, h);\n }\n }\n }\n\n\n /**\n * Redraw all nodes\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {boolean} [alwaysShow]\n * @private\n */\n _resizeNodes() {\n this.canvas.setTransform();\n let ctx = this.canvas.getContext();\n ctx.save();\n ctx.translate(this.body.view.translation.x, this.body.view.translation.y);\n ctx.scale(this.body.view.scale, this.body.view.scale);\n\n let nodes = this.body.nodes;\n let node;\n\n // resize all nodes\n for (let nodeId in nodes) {\n if (nodes.hasOwnProperty(nodeId)) {\n node = nodes[nodeId];\n node.resize(ctx);\n node.updateBoundingBox(ctx, node.selected);\n }\n }\n\n // restore original scaling and translation\n ctx.restore();\n }\n\n /**\n * Redraw all nodes\n *\n * @param {CanvasRenderingContext2D} ctx 2D context of a HTML canvas\n * @param {boolean} [alwaysShow]\n * @private\n */\n _drawNodes(ctx, alwaysShow = false) {\n let nodes = this.body.nodes;\n let nodeIndices = this.body.nodeIndices;\n let node;\n let selected = [];\n let margin = 20;\n let topLeft = this.canvas.DOMtoCanvas({x:-margin,y:-margin});\n let bottomRight = this.canvas.DOMtoCanvas({\n x: this.canvas.frame.canvas.clientWidth+margin,\n y: this.canvas.frame.canvas.clientHeight+margin\n });\n let viewableArea = {top:topLeft.y,left:topLeft.x,bottom:bottomRight.y,right:bottomRight.x};\n\n // draw unselected nodes;\n for (let i = 0; i < nodeIndices.length; i++) {\n node = nodes[nodeIndices[i]];\n // set selected nodes aside\n if (node.isSelected()) {\n selected.push(nodeIndices[i]);\n }\n else {\n if (alwaysShow === true) {\n node.draw(ctx);\n }\n else if (node.isBoundingBoxOverlappingWith(viewableArea) === true) {\n node.draw(ctx);\n }\n else {\n node.updateBoundingBox(ctx, node.selected);\n }\n }\n }\n\n // draw the selected nodes on top\n for (let i = 0; i < selected.length; i++) {\n node = nodes[selected[i]];\n node.draw(ctx);\n }\n }\n\n\n /**\n * Redraw all edges\n * @param {CanvasRenderingContext2D} ctx 2D context of a HTML canvas\n * @private\n */\n _drawEdges(ctx) {\n let edges = this.body.edges;\n let edgeIndices = this.body.edgeIndices;\n let edge;\n\n for (let i = 0; i < edgeIndices.length; i++) {\n edge = edges[edgeIndices[i]];\n if (edge.connected === true) {\n edge.draw(ctx);\n }\n }\n }\n\n /**\n * Determine if the browser requires a setTimeout or a requestAnimationFrame. This was required because\n * some implementations (safari and IE9) did not support requestAnimationFrame\n * @private\n */\n _determineBrowserMethod() {\n if (typeof window !== 'undefined') {\n let browserType = navigator.userAgent.toLowerCase();\n this.requiresTimeout = false;\n if (browserType.indexOf('msie 9.0') != -1) { // IE 9\n this.requiresTimeout = true;\n }\n else if (browserType.indexOf('safari') != -1) { // safari\n if (browserType.indexOf('chrome') <= -1) {\n this.requiresTimeout = true;\n }\n }\n }\n else {\n this.requiresTimeout = true;\n }\n }\n}\n\nexport default CanvasRenderer;\n","/**\n * Register a touch event, taking place before a gesture\n * @param {Hammer} hammer A hammer instance\n * @param {function} callback Callback, called as callback(event)\n */\nexports.onTouch = function (hammer, callback) {\n callback.inputHandler = function (event) {\n if (event.isFirst) {\n callback(event);\n }\n };\n\n hammer.on('hammer.input', callback.inputHandler);\n};\n\n/**\n * Register a release event, taking place after a gesture\n * @param {Hammer} hammer A hammer instance\n * @param {function} callback Callback, called as callback(event)\n * @returns {*}\n */\nexports.onRelease = function (hammer, callback) {\n callback.inputHandler = function (event) {\n if (event.isFinal) {\n callback(event);\n }\n };\n\n return hammer.on('hammer.input', callback.inputHandler);\n};\n\n\n/**\n * Unregister a touch event, taking place before a gesture\n * @param {Hammer} hammer A hammer instance\n * @param {function} callback Callback, called as callback(event)\n */\nexports.offTouch = function (hammer, callback) {\n hammer.off('hammer.input', callback.inputHandler);\n};\n\n/**\n * Unregister a release event, taking place before a gesture\n * @param {Hammer} hammer A hammer instance\n * @param {function} callback Callback, called as callback(event)\n */\nexports.offRelease = exports.offTouch;\n\n/**\n * Hack the PinchRecognizer such that it doesn't prevent default behavior\n * for vertical panning.\n *\n * Yeah ... this is quite a hack ... see https://github.com/hammerjs/hammer.js/issues/932\n *\n * @param {Hammer.Pinch} pinchRecognizer\n * @return {Hammer.Pinch} returns the pinchRecognizer\n */\nexports.disablePreventDefaultVertically = function (pinchRecognizer) {\n var TOUCH_ACTION_PAN_Y = 'pan-y';\n\n pinchRecognizer.getTouchAction = function() {\n // default method returns [TOUCH_ACTION_NONE]\n return [TOUCH_ACTION_PAN_Y];\n };\n\n return pinchRecognizer;\n};\n","import Hammer from '../../module/hammer';\nimport hammerUtil from '../../hammerUtil';\n\nimport util from 'vis-util';\n\n/**\n * Create the main frame for the Network.\n * This function is executed once when a Network object is created. The frame\n * contains a canvas, and this canvas contains all objects like the axis and\n * nodes.\n */\nclass Canvas {\n /**\n * @param {Object} body\n */\n constructor(body) {\n this.body = body;\n this.pixelRatio = 1;\n this.resizeTimer = undefined;\n this.resizeFunction = this._onResize.bind(this);\n this.cameraState = {};\n this.initialized = false;\n this.canvasViewCenter = {};\n\n this.options = {};\n this.defaultOptions = {\n autoResize: true,\n height: '100%',\n width: '100%'\n };\n util.extend(this.options, this.defaultOptions);\n\n this.bindEventListeners();\n }\n\n /**\n * Binds event listeners\n */\n bindEventListeners() {\n // bind the events\n this.body.emitter.once(\"resize\", (obj) => {\n if (obj.width !== 0) {\n this.body.view.translation.x = obj.width * 0.5;\n }\n if (obj.height !== 0) {\n this.body.view.translation.y = obj.height * 0.5;\n }\n });\n this.body.emitter.on(\"setSize\", this.setSize.bind(this));\n this.body.emitter.on(\"destroy\", () => {\n this.hammerFrame.destroy();\n this.hammer.destroy();\n this._cleanUp();\n });\n }\n\n /**\n * @param {Object} options\n */\n setOptions(options) {\n if (options !== undefined) {\n let fields = ['width','height','autoResize'];\n util.selectiveDeepExtend(fields,this.options, options);\n }\n\n if (this.options.autoResize === true) {\n // automatically adapt to a changing size of the browser.\n this._cleanUp();\n this.resizeTimer = setInterval(() => {\n let changed = this.setSize();\n if (changed === true) {\n this.body.emitter.emit(\"_requestRedraw\");\n }\n }, 1000);\n this.resizeFunction = this._onResize.bind(this);\n util.addEventListener(window,'resize',this.resizeFunction);\n }\n }\n\n /**\n * @private\n */\n _cleanUp() {\n // automatically adapt to a changing size of the browser.\n if (this.resizeTimer !== undefined) {\n clearInterval(this.resizeTimer);\n }\n util.removeEventListener(window,'resize',this.resizeFunction);\n this.resizeFunction = undefined;\n }\n\n /**\n * @private\n */\n _onResize() {\n this.setSize();\n this.body.emitter.emit(\"_redraw\");\n }\n\n /**\n * Get and store the cameraState\n *\n * @param {number} [pixelRatio=this.pixelRatio]\n * @private\n */\n _getCameraState(pixelRatio = this.pixelRatio) {\n if (this.initialized === true) {\n this.cameraState.previousWidth = this.frame.canvas.width / pixelRatio;\n this.cameraState.previousHeight = this.frame.canvas.height / pixelRatio;\n this.cameraState.scale = this.body.view.scale;\n this.cameraState.position = this.DOMtoCanvas({\n x: 0.5 * this.frame.canvas.width / pixelRatio,\n y: 0.5 * this.frame.canvas.height / pixelRatio\n });\n }\n }\n\n /**\n * Set the cameraState\n * @private\n */\n _setCameraState() {\n if (this.cameraState.scale !== undefined &&\n this.frame.canvas.clientWidth !== 0 &&\n this.frame.canvas.clientHeight !== 0 &&\n this.pixelRatio !== 0 &&\n this.cameraState.previousWidth > 0) {\n\n let widthRatio = (this.frame.canvas.width / this.pixelRatio) / this.cameraState.previousWidth;\n let heightRatio = (this.frame.canvas.height / this.pixelRatio) / this.cameraState.previousHeight;\n let newScale = this.cameraState.scale;\n\n if (widthRatio != 1 && heightRatio != 1) {\n newScale = this.cameraState.scale * 0.5 * (widthRatio + heightRatio);\n }\n else if (widthRatio != 1) {\n newScale = this.cameraState.scale * widthRatio;\n }\n else if (heightRatio != 1) {\n newScale = this.cameraState.scale * heightRatio;\n }\n\n this.body.view.scale = newScale;\n // this comes from the view module.\n var currentViewCenter = this.DOMtoCanvas({\n x: 0.5 * this.frame.canvas.clientWidth,\n y: 0.5 * this.frame.canvas.clientHeight\n });\n\n var distanceFromCenter = { // offset from view, distance view has to change by these x and y to center the node\n x: currentViewCenter.x - this.cameraState.position.x,\n y: currentViewCenter.y - this.cameraState.position.y\n };\n this.body.view.translation.x += distanceFromCenter.x * this.body.view.scale;\n this.body.view.translation.y += distanceFromCenter.y * this.body.view.scale;\n }\n }\n\n /**\n *\n * @param {number|string} value\n * @returns {string}\n * @private\n */\n _prepareValue(value) {\n if (typeof value === 'number') {\n return value + 'px';\n }\n else if (typeof value === 'string') {\n if (value.indexOf('%') !== -1 || value.indexOf('px') !== -1) {\n return value;\n }\n else if (value.indexOf('%') === -1) {\n return value + 'px';\n }\n }\n throw new Error('Could not use the value supplied for width or height:' + value);\n }\n\n\n /**\n * Create the HTML\n */\n _create() {\n // remove all elements from the container element.\n while (this.body.container.hasChildNodes()) {\n this.body.container.removeChild(this.body.container.firstChild);\n }\n\n this.frame = document.createElement('div');\n this.frame.className = 'vis-network';\n this.frame.style.position = 'relative';\n this.frame.style.overflow = 'hidden';\n this.frame.tabIndex = 900; // tab index is required for keycharm to bind keystrokes to the div instead of the window\n\n //////////////////////////////////////////////////////////////////\n\n this.frame.canvas = document.createElement(\"canvas\");\n this.frame.canvas.style.position = 'relative';\n this.frame.appendChild(this.frame.canvas);\n\n if (!this.frame.canvas.getContext) {\n let noCanvas = document.createElement( 'DIV' );\n noCanvas.style.color = 'red';\n noCanvas.style.fontWeight = 'bold' ;\n noCanvas.style.padding = '10px';\n noCanvas.innerHTML = 'Error: your browser does not support HTML canvas';\n this.frame.canvas.appendChild(noCanvas);\n }\n else {\n this._setPixelRatio();\n this.setTransform();\n }\n\n // add the frame to the container element\n this.body.container.appendChild(this.frame);\n\n this.body.view.scale = 1;\n this.body.view.translation = {x: 0.5 * this.frame.canvas.clientWidth,y: 0.5 * this.frame.canvas.clientHeight};\n\n this._bindHammer();\n }\n\n\n /**\n * This function binds hammer, it can be repeated over and over due to the uniqueness check.\n * @private\n */\n _bindHammer() {\n if (this.hammer !== undefined) {\n this.hammer.destroy();\n }\n this.drag = {};\n this.pinch = {};\n\n // init hammer\n this.hammer = new Hammer(this.frame.canvas);\n this.hammer.get('pinch').set({enable: true});\n // enable to get better response, todo: test on mobile.\n this.hammer.get('pan').set({threshold:5, direction: Hammer.DIRECTION_ALL});\n\n hammerUtil.onTouch(this.hammer, (event) => {this.body.eventListeners.onTouch(event)});\n this.hammer.on('tap', (event) => {this.body.eventListeners.onTap(event)});\n this.hammer.on('doubletap', (event) => {this.body.eventListeners.onDoubleTap(event)});\n this.hammer.on('press', (event) => {this.body.eventListeners.onHold(event)});\n this.hammer.on('panstart', (event) => {this.body.eventListeners.onDragStart(event)});\n this.hammer.on('panmove', (event) => {this.body.eventListeners.onDrag(event)});\n this.hammer.on('panend', (event) => {this.body.eventListeners.onDragEnd(event)});\n this.hammer.on('pinch', (event) => {this.body.eventListeners.onPinch(event)});\n\n // TODO: neatly cleanup these handlers when re-creating the Canvas, IF these are done with hammer, event.stopPropagation will not work?\n this.frame.canvas.addEventListener('mousewheel', (event) => {this.body.eventListeners.onMouseWheel(event)});\n this.frame.canvas.addEventListener('DOMMouseScroll', (event) => {this.body.eventListeners.onMouseWheel(event)});\n\n this.frame.canvas.addEventListener('mousemove', (event) => {this.body.eventListeners.onMouseMove(event)});\n this.frame.canvas.addEventListener('contextmenu', (event) => {this.body.eventListeners.onContext(event)});\n\n this.hammerFrame = new Hammer(this.frame);\n hammerUtil.onRelease(this.hammerFrame, (event) => {this.body.eventListeners.onRelease(event)});\n }\n\n\n /**\n * Set a new size for the network\n * @param {string} width Width in pixels or percentage (for example '800px'\n * or '50%')\n * @param {string} height Height in pixels or percentage (for example '400px'\n * or '30%')\n * @returns {boolean}\n */\n setSize(width = this.options.width, height = this.options.height) {\n width = this._prepareValue(width);\n height= this._prepareValue(height);\n\n let emitEvent = false;\n let oldWidth = this.frame.canvas.width;\n let oldHeight = this.frame.canvas.height;\n\n // update the pixel ratio\n //\n // NOTE: Comment in following is rather inconsistent; this is the ONLY place in the code\n // where it is assumed that the pixel ratio could change at runtime.\n // The only way I can think of this happening is a rotating screen or tablet; but then\n // there should be a mechanism for reloading the data (TODO: check if this is present).\n //\n // If the assumption is true (i.e. pixel ratio can change at runtime), then *all* usage\n // of pixel ratio must be overhauled for this.\n //\n // For the time being, I will humor the assumption here, and in the rest of the code assume it is\n // constant.\n let previousRatio = this.pixelRatio; // we cache this because the camera state storage needs the old value\n this._setPixelRatio();\n\n if (width != this.options.width || height != this.options.height || this.frame.style.width != width || this.frame.style.height != height) {\n this._getCameraState(previousRatio);\n\n this.frame.style.width = width;\n this.frame.style.height = height;\n\n this.frame.canvas.style.width = '100%';\n this.frame.canvas.style.height = '100%';\n\n this.frame.canvas.width = Math.round(this.frame.canvas.clientWidth * this.pixelRatio);\n this.frame.canvas.height = Math.round(this.frame.canvas.clientHeight * this.pixelRatio);\n\n this.options.width = width;\n this.options.height = height;\n\n this.canvasViewCenter = {\n x: 0.5 * this.frame.clientWidth,\n y: 0.5 * this.frame.clientHeight\n };\n\n emitEvent = true;\n }\n else {\n // this would adapt the width of the canvas to the width from 100% if and only if\n // there is a change.\n\n let newWidth = Math.round(this.frame.canvas.clientWidth * this.pixelRatio);\n let newHeight = Math.round(this.frame.canvas.clientHeight * this.pixelRatio);\n\n // store the camera if there is a change in size.\n if (this.frame.canvas.width !== newWidth || this.frame.canvas.height !== newHeight) {\n this._getCameraState(previousRatio);\n }\n\n if (this.frame.canvas.width !== newWidth) {\n this.frame.canvas.width = newWidth;\n emitEvent = true;\n }\n if (this.frame.canvas.height !== newHeight) {\n this.frame.canvas.height = newHeight;\n emitEvent = true;\n }\n }\n\n if (emitEvent === true) {\n this.body.emitter.emit('resize', {\n width : Math.round(this.frame.canvas.width / this.pixelRatio),\n height : Math.round(this.frame.canvas.height / this.pixelRatio),\n oldWidth : Math.round(oldWidth / this.pixelRatio),\n oldHeight: Math.round(oldHeight / this.pixelRatio)\n });\n\n // restore the camera on change.\n this._setCameraState();\n }\n\n\n // set initialized so the get and set camera will work from now on.\n this.initialized = true;\n return emitEvent;\n }\n\n /**\n *\n * @returns {CanvasRenderingContext2D}\n */\n getContext() {\n return this.frame.canvas.getContext(\"2d\");\n }\n\n /**\n * Determine the pixel ratio for various browsers.\n *\n * @returns {number}\n * @private\n */\n _determinePixelRatio() {\n let ctx = this.getContext();\n if (ctx === undefined) {\n throw new Error(\"Could not get canvax context\");\n }\n\n var numerator = 1;\n if(typeof window !== 'undefined') { // (window !== undefined) doesn't work here!\n // Protection during unit tests, where 'window' can be missing\n numerator = (window.devicePixelRatio || 1);\n }\n\n var denominator = (ctx.webkitBackingStorePixelRatio ||\n ctx.mozBackingStorePixelRatio ||\n ctx.msBackingStorePixelRatio ||\n ctx.oBackingStorePixelRatio ||\n ctx.backingStorePixelRatio || 1);\n\n return numerator / denominator;\n }\n\n /**\n * Lazy determination of pixel ratio.\n *\n * @private\n */\n _setPixelRatio() {\n this.pixelRatio = this._determinePixelRatio();\n }\n\n /**\n * Set the transform in the contained context, based on its pixelRatio\n */\n setTransform() {\n let ctx = this.getContext();\n if (ctx === undefined) {\n throw new Error(\"Could not get canvax context\");\n }\n\n ctx.setTransform(this.pixelRatio, 0, 0, this.pixelRatio, 0, 0);\n }\n\n\n /**\n * Convert the X coordinate in DOM-space (coordinate point in browser relative to the container div) to\n * the X coordinate in canvas-space (the simulation sandbox, which the camera looks upon)\n * @param {number} x\n * @returns {number}\n * @private\n */\n _XconvertDOMtoCanvas(x) {\n return (x - this.body.view.translation.x) / this.body.view.scale;\n }\n\n /**\n * Convert the X coordinate in canvas-space (the simulation sandbox, which the camera looks upon) to\n * the X coordinate in DOM-space (coordinate point in browser relative to the container div)\n * @param {number} x\n * @returns {number}\n * @private\n */\n _XconvertCanvasToDOM(x) {\n return x * this.body.view.scale + this.body.view.translation.x;\n }\n\n /**\n * Convert the Y coordinate in DOM-space (coordinate point in browser relative to the container div) to\n * the Y coordinate in canvas-space (the simulation sandbox, which the camera looks upon)\n * @param {number} y\n * @returns {number}\n * @private\n */\n _YconvertDOMtoCanvas(y) {\n return (y - this.body.view.translation.y) / this.body.view.scale;\n }\n\n /**\n * Convert the Y coordinate in canvas-space (the simulation sandbox, which the camera looks upon) to\n * the Y coordinate in DOM-space (coordinate point in browser relative to the container div)\n * @param {number} y\n * @returns {number}\n * @private\n */\n _YconvertCanvasToDOM(y) {\n return y * this.body.view.scale + this.body.view.translation.y;\n }\n\n\n /**\n * @param {point} pos\n * @returns {point}\n */\n canvasToDOM (pos) {\n return {x: this._XconvertCanvasToDOM(pos.x), y: this._YconvertCanvasToDOM(pos.y)};\n }\n\n /**\n *\n * @param {point} pos\n * @returns {point}\n */\n DOMtoCanvas (pos) {\n return {x: this._XconvertDOMtoCanvas(pos.x), y: this._YconvertDOMtoCanvas(pos.y)};\n }\n\n}\n\nexport default Canvas;\n","import util from 'vis-util';\n\nimport NetworkUtil from '../NetworkUtil';\n\n/**\n * The view\n */\nclass View {\n /**\n * @param {Object} body\n * @param {Canvas} canvas\n */\n constructor(body, canvas) {\n this.body = body;\n this.canvas = canvas;\n\n this.animationSpeed = 1/this.renderRefreshRate;\n this.animationEasingFunction = \"easeInOutQuint\";\n this.easingTime = 0;\n this.sourceScale = 0;\n this.targetScale = 0;\n this.sourceTranslation = 0;\n this.targetTranslation = 0;\n this.lockedOnNodeId = undefined;\n this.lockedOnNodeOffset = undefined;\n this.touchTime = 0;\n\n this.viewFunction = undefined;\n\n this.body.emitter.on(\"fit\", this.fit.bind(this));\n this.body.emitter.on(\"animationFinished\", () => {this.body.emitter.emit(\"_stopRendering\");});\n this.body.emitter.on(\"unlockNode\", this.releaseNode.bind(this));\n }\n\n /**\n *\n * @param {Object} [options={}]\n */\n setOptions(options = {}) {\n this.options = options;\n }\n\n\n /**\n * This function zooms out to fit all data on screen based on amount of nodes\n * @param {Object} [options={{nodes=Array}}]\n * @param {boolean} [initialZoom=false] | zoom based on fitted formula or range, true = fitted, default = false;\n */\n fit(options = {nodes:[]}, initialZoom = false) {\n let range;\n let zoomLevel;\n options = Object.assign({}, options);\n if (options.nodes === undefined || options.nodes.length === 0) {\n options.nodes = this.body.nodeIndices;\n }\n\n\n if (initialZoom === true) {\n // check if more than half of the nodes have a predefined position. If so, we use the range, not the approximation.\n let positionDefined = 0;\n for (let nodeId in this.body.nodes) {\n if (this.body.nodes.hasOwnProperty(nodeId)) {\n let node = this.body.nodes[nodeId];\n if (node.predefinedPosition === true) {\n positionDefined += 1;\n }\n }\n }\n if (positionDefined > 0.5 * this.body.nodeIndices.length) {\n this.fit(options,false);\n return;\n }\n\n range = NetworkUtil.getRange(this.body.nodes, options.nodes);\n\n let numberOfNodes = this.body.nodeIndices.length;\n zoomLevel = 12.662 / (numberOfNodes + 7.4147) + 0.0964822; // this is obtained from fitting a dataset from 5 points with scale levels that looked good.\n\n // correct for larger canvasses.\n let factor = Math.min(this.canvas.frame.canvas.clientWidth / 600, this.canvas.frame.canvas.clientHeight / 600);\n zoomLevel *= factor;\n }\n else {\n this.body.emitter.emit(\"_resizeNodes\");\n range = NetworkUtil.getRange(this.body.nodes, options.nodes);\n\n let xDistance = Math.abs(range.maxX - range.minX) * 1.1;\n let yDistance = Math.abs(range.maxY - range.minY) * 1.1;\n\n let xZoomLevel = this.canvas.frame.canvas.clientWidth / xDistance;\n let yZoomLevel = this.canvas.frame.canvas.clientHeight / yDistance;\n\n zoomLevel = (xZoomLevel <= yZoomLevel) ? xZoomLevel : yZoomLevel;\n }\n\n if (zoomLevel > 1.0) {\n zoomLevel = 1.0;\n }\n else if (zoomLevel === 0) {\n zoomLevel = 1.0;\n }\n\n let center = NetworkUtil.findCenter(range);\n let animationOptions = {position: center, scale: zoomLevel, animation: options.animation};\n this.moveTo(animationOptions);\n }\n \n // animation\n\n /**\n * Center a node in view.\n *\n * @param {number} nodeId\n * @param {number} [options]\n */\n focus(nodeId, options = {}) {\n if (this.body.nodes[nodeId] !== undefined) {\n let nodePosition = {x: this.body.nodes[nodeId].x, y: this.body.nodes[nodeId].y};\n options.position = nodePosition;\n options.lockedOnNode = nodeId;\n\n this.moveTo(options)\n }\n else {\n console.log(\"Node: \" + nodeId + \" cannot be found.\");\n }\n }\n\n /**\n *\n * @param {Object} options | options.offset = {x:number, y:number} // offset from the center in DOM pixels\n * | options.scale = number // scale to move to\n * | options.position = {x:number, y:number} // position to move to\n * | options.animation = {duration:number, easingFunction:String} || Boolean // position to move to\n */\n moveTo(options) {\n if (options === undefined) {\n options = {};\n return;\n }\n\n if (options.offset != null) {\n if (options.offset.x != null) {\n // Coerce and verify that x is valid.\n options.offset.x = +options.offset.x\n if (!Number.isFinite(options.offset.x)) {\n throw new TypeError('The option \"offset.x\" has to be a finite number.')\n }\n } else {\n options.offset.x = 0\n }\n\n if (options.offset.y != null) {\n // Coerce and verify that y is valid.\n options.offset.y = +options.offset.y\n if (!Number.isFinite(options.offset.y)) {\n throw new TypeError('The option \"offset.y\" has to be a finite number.')\n }\n } else {\n options.offset.x = 0\n }\n } else {\n options.offset = {\n x: 0,\n y: 0\n }\n }\n\n if (options.position != null) {\n if (options.position.x != null) {\n // Coerce and verify that x is valid.\n options.position.x = +options.position.x\n if (!Number.isFinite(options.position.x)) {\n throw new TypeError('The option \"position.x\" has to be a finite number.')\n }\n } else {\n options.position.x = 0\n }\n\n if (options.position.y != null) {\n // Coerce and verify that y is valid.\n options.position.y = +options.position.y\n if (!Number.isFinite(options.position.y)) {\n throw new TypeError('The option \"position.y\" has to be a finite number.')\n }\n } else {\n options.position.x = 0\n }\n } else {\n options.position = this.getViewPosition()\n }\n\n if (options.scale != null) {\n // Coerce and verify that the scale is valid.\n options.scale = +options.scale\n if (!(options.scale > 0)) {\n throw new TypeError('The option \"scale\" has to be a number greater than zero.')\n }\n } else {\n options.scale = this.body.view.scale\n }\n\n if (options.animation === undefined) {options.animation = {duration:0}; }\n if (options.animation === false ) {options.animation = {duration:0}; }\n if (options.animation === true ) {options.animation = {}; }\n if (options.animation.duration === undefined) {options.animation.duration = 1000; } // default duration\n if (options.animation.easingFunction === undefined) {options.animation.easingFunction = \"easeInOutQuad\"; } // default easing function\n\n this.animateView(options);\n }\n\n /**\n *\n * @param {Object} options | options.offset = {x:number, y:number} // offset from the center in DOM pixels\n * | options.time = number // animation time in milliseconds\n * | options.scale = number // scale to animate to\n * | options.position = {x:number, y:number} // position to animate to\n * | options.easingFunction = String // linear, easeInQuad, easeOutQuad, easeInOutQuad,\n * // easeInCubic, easeOutCubic, easeInOutCubic,\n * // easeInQuart, easeOutQuart, easeInOutQuart,\n * // easeInQuint, easeOutQuint, easeInOutQuint\n */\n animateView(options) {\n if (options === undefined) {\n return;\n }\n this.animationEasingFunction = options.animation.easingFunction;\n // release if something focussed on the node\n this.releaseNode();\n if (options.locked === true) {\n this.lockedOnNodeId = options.lockedOnNode;\n this.lockedOnNodeOffset = options.offset;\n }\n\n // forcefully complete the old animation if it was still running\n if (this.easingTime != 0) {\n this._transitionRedraw(true); // by setting easingtime to 1, we finish the animation.\n }\n\n this.sourceScale = this.body.view.scale;\n this.sourceTranslation = this.body.view.translation;\n this.targetScale = options.scale;\n\n // set the scale so the viewCenter is based on the correct zoom level. This is overridden in the transitionRedraw\n // but at least then we'll have the target transition\n this.body.view.scale = this.targetScale;\n let viewCenter = this.canvas.DOMtoCanvas({x: 0.5 * this.canvas.frame.canvas.clientWidth, y: 0.5 * this.canvas.frame.canvas.clientHeight});\n\n let distanceFromCenter = { // offset from view, distance view has to change by these x and y to center the node\n x: viewCenter.x - options.position.x,\n y: viewCenter.y - options.position.y\n };\n this.targetTranslation = {\n x: this.sourceTranslation.x + distanceFromCenter.x * this.targetScale + options.offset.x,\n y: this.sourceTranslation.y + distanceFromCenter.y * this.targetScale + options.offset.y\n };\n\n // if the time is set to 0, don't do an animation\n if (options.animation.duration === 0) {\n if (this.lockedOnNodeId != undefined) {\n this.viewFunction = this._lockedRedraw.bind(this);\n this.body.emitter.on(\"initRedraw\", this.viewFunction);\n }\n else {\n this.body.view.scale = this.targetScale;\n this.body.view.translation = this.targetTranslation;\n this.body.emitter.emit(\"_requestRedraw\");\n }\n }\n else {\n this.animationSpeed = 1 / (60 * options.animation.duration * 0.001) || 1 / 60; // 60 for 60 seconds, 0.001 for milli's\n this.animationEasingFunction = options.animation.easingFunction;\n\n\n this.viewFunction = this._transitionRedraw.bind(this);\n this.body.emitter.on(\"initRedraw\", this.viewFunction);\n this.body.emitter.emit(\"_startRendering\");\n }\n }\n\n /**\n * used to animate smoothly by hijacking the redraw function.\n * @private\n */\n _lockedRedraw() {\n let nodePosition = {x: this.body.nodes[this.lockedOnNodeId].x, y: this.body.nodes[this.lockedOnNodeId].y};\n let viewCenter = this.canvas.DOMtoCanvas({x: 0.5 * this.canvas.frame.canvas.clientWidth, y: 0.5 * this.canvas.frame.canvas.clientHeight});\n let distanceFromCenter = { // offset from view, distance view has to change by these x and y to center the node\n x: viewCenter.x - nodePosition.x,\n y: viewCenter.y - nodePosition.y\n };\n let sourceTranslation = this.body.view.translation;\n let targetTranslation = {\n x: sourceTranslation.x + distanceFromCenter.x * this.body.view.scale + this.lockedOnNodeOffset.x,\n y: sourceTranslation.y + distanceFromCenter.y * this.body.view.scale + this.lockedOnNodeOffset.y\n };\n\n this.body.view.translation = targetTranslation;\n }\n\n /**\n * Resets state of a locked on Node\n */\n releaseNode() {\n if (this.lockedOnNodeId !== undefined && this.viewFunction !== undefined) {\n this.body.emitter.off(\"initRedraw\", this.viewFunction);\n this.lockedOnNodeId = undefined;\n this.lockedOnNodeOffset = undefined;\n }\n }\n\n /**\n * @param {boolean} [finished=false]\n * @private\n */\n _transitionRedraw(finished = false) {\n this.easingTime += this.animationSpeed;\n this.easingTime = finished === true ? 1.0 : this.easingTime;\n\n let progress = util.easingFunctions[this.animationEasingFunction](this.easingTime);\n\n this.body.view.scale = this.sourceScale + (this.targetScale - this.sourceScale) * progress;\n this.body.view.translation = {\n x: this.sourceTranslation.x + (this.targetTranslation.x - this.sourceTranslation.x) * progress,\n y: this.sourceTranslation.y + (this.targetTranslation.y - this.sourceTranslation.y) * progress\n };\n\n // cleanup\n if (this.easingTime >= 1.0) {\n this.body.emitter.off(\"initRedraw\", this.viewFunction);\n this.easingTime = 0;\n if (this.lockedOnNodeId != undefined) {\n this.viewFunction = this._lockedRedraw.bind(this);\n this.body.emitter.on(\"initRedraw\", this.viewFunction);\n }\n this.body.emitter.emit(\"animationFinished\");\n }\n }\n\n\n /**\n *\n * @returns {number}\n */\n getScale() {\n return this.body.view.scale;\n }\n\n /**\n *\n * @returns {{x: number, y: number}}\n */\n getViewPosition() {\n return this.canvas.DOMtoCanvas({x: 0.5 * this.canvas.frame.canvas.clientWidth, y: 0.5 * this.canvas.frame.canvas.clientHeight});\n }\n\n\n}\n\nexport default View;\n","import './NavigationHandler.css';\n\nimport Hammer from '../../../module/hammer';\nimport hammerUtil from '../../../hammerUtil';\nimport keycharm from 'keycharm';\n\n/**\n * Navigation Handler\n */\nclass NavigationHandler {\n /**\n * @param {Object} body\n * @param {Canvas} canvas\n */\n constructor(body, canvas) {\n this.body = body;\n this.canvas = canvas;\n\n this.iconsCreated = false;\n this.navigationHammers = [];\n this.boundFunctions = {};\n this.touchTime = 0;\n this.activated = false;\n\n\n this.body.emitter.on(\"activate\", () => {this.activated = true; this.configureKeyboardBindings();});\n this.body.emitter.on(\"deactivate\", () => {this.activated = false; this.configureKeyboardBindings();});\n this.body.emitter.on(\"destroy\", () => {if (this.keycharm !== undefined) {this.keycharm.destroy();}});\n\n this.options = {}\n }\n\n /**\n *\n * @param {Object} options\n */\n setOptions(options) {\n if (options !== undefined) {\n this.options = options;\n this.create();\n }\n }\n\n /**\n * Creates or refreshes navigation and sets key bindings\n */\n create() {\n if (this.options.navigationButtons === true) {\n if (this.iconsCreated === false) {\n this.loadNavigationElements();\n }\n }\n else if (this.iconsCreated === true) {\n this.cleanNavigation();\n }\n\n this.configureKeyboardBindings();\n }\n\n /**\n * Cleans up previous navigation items\n */\n cleanNavigation() {\n // clean hammer bindings\n if (this.navigationHammers.length != 0) {\n for (var i = 0; i < this.navigationHammers.length; i++) {\n this.navigationHammers[i].destroy();\n }\n this.navigationHammers = [];\n }\n\n // clean up previous navigation items\n if (this.navigationDOM && this.navigationDOM['wrapper'] && this.navigationDOM['wrapper'].parentNode) {\n this.navigationDOM['wrapper'].parentNode.removeChild(this.navigationDOM['wrapper']);\n }\n\n this.iconsCreated = false;\n }\n\n /**\n * Creation of the navigation controls nodes. They are drawn over the rest of the nodes and are not affected by scale and translation\n * they have a triggerFunction which is called on click. If the position of the navigation controls is dependent\n * on this.frame.canvas.clientWidth or this.frame.canvas.clientHeight, we flag horizontalAlignLeft and verticalAlignTop false.\n * This means that the location will be corrected by the _relocateNavigation function on a size change of the canvas.\n *\n * @private\n */\n loadNavigationElements() {\n this.cleanNavigation();\n\n this.navigationDOM = {};\n var navigationDivs = ['up','down','left','right','zoomIn','zoomOut','zoomExtends'];\n var navigationDivActions = ['_moveUp','_moveDown','_moveLeft','_moveRight','_zoomIn','_zoomOut','_fit'];\n\n this.navigationDOM['wrapper'] = document.createElement('div');\n this.navigationDOM['wrapper'].className = 'vis-navigation';\n this.canvas.frame.appendChild(this.navigationDOM['wrapper']);\n\n for (var i = 0; i < navigationDivs.length; i++) {\n this.navigationDOM[navigationDivs[i]] = document.createElement('div');\n this.navigationDOM[navigationDivs[i]].className = 'vis-button vis-' + navigationDivs[i];\n this.navigationDOM['wrapper'].appendChild(this.navigationDOM[navigationDivs[i]]);\n\n var hammer = new Hammer(this.navigationDOM[navigationDivs[i]]);\n if (navigationDivActions[i] === \"_fit\") {\n hammerUtil.onTouch(hammer, this._fit.bind(this));\n }\n else {\n hammerUtil.onTouch(hammer, this.bindToRedraw.bind(this,navigationDivActions[i]));\n }\n\n this.navigationHammers.push(hammer);\n }\n\n // use a hammer for the release so we do not require the one used in the rest of the network\n // the one the rest uses can be overloaded by the manipulation system.\n var hammerFrame = new Hammer(this.canvas.frame);\n hammerUtil.onRelease(hammerFrame, () => {this._stopMovement();});\n this.navigationHammers.push(hammerFrame);\n\n this.iconsCreated = true;\n }\n\n /**\n *\n * @param {string} action\n */\n bindToRedraw(action) {\n if (this.boundFunctions[action] === undefined) {\n this.boundFunctions[action] = this[action].bind(this);\n this.body.emitter.on(\"initRedraw\", this.boundFunctions[action]);\n this.body.emitter.emit(\"_startRendering\");\n }\n }\n\n /**\n *\n * @param {string} action\n */\n unbindFromRedraw(action) {\n if (this.boundFunctions[action] !== undefined) {\n this.body.emitter.off(\"initRedraw\", this.boundFunctions[action]);\n this.body.emitter.emit(\"_stopRendering\");\n delete this.boundFunctions[action];\n }\n }\n\n /**\n * this stops all movement induced by the navigation buttons\n *\n * @private\n */\n _fit() {\n if (new Date().valueOf() - this.touchTime > 700) { // TODO: fix ugly hack to avoid hammer's double fireing of event (because we use release?)\n this.body.emitter.emit(\"fit\", {duration: 700});\n this.touchTime = new Date().valueOf();\n }\n }\n\n /**\n * this stops all movement induced by the navigation buttons\n *\n * @private\n */\n _stopMovement() {\n for (let boundAction in this.boundFunctions) {\n if (this.boundFunctions.hasOwnProperty(boundAction)) {\n this.body.emitter.off(\"initRedraw\", this.boundFunctions[boundAction]);\n this.body.emitter.emit(\"_stopRendering\");\n }\n }\n this.boundFunctions = {};\n }\n /**\n *\n * @private\n */\n _moveUp() {this.body.view.translation.y += this.options.keyboard.speed.y;}\n /**\n *\n * @private\n */\n _moveDown() {this.body.view.translation.y -= this.options.keyboard.speed.y;}\n /**\n *\n * @private\n */\n _moveLeft() {this.body.view.translation.x += this.options.keyboard.speed.x;}\n /**\n *\n * @private\n */\n _moveRight(){this.body.view.translation.x -= this.options.keyboard.speed.x;}\n /**\n *\n * @private\n */\n _zoomIn() {\n var scaleOld = this.body.view.scale;\n var scale = this.body.view.scale * (1 + this.options.keyboard.speed.zoom);\n var translation = this.body.view.translation;\n var scaleFrac = scale / scaleOld;\n var tx = (1 - scaleFrac) * this.canvas.canvasViewCenter.x + translation.x * scaleFrac;\n var ty = (1 - scaleFrac) * this.canvas.canvasViewCenter.y + translation.y * scaleFrac;\n\n this.body.view.scale = scale;\n this.body.view.translation = { x: tx, y: ty };\n this.body.emitter.emit('zoom', { direction: '+', scale: this.body.view.scale, pointer: null });\n\n }\n\n /**\n *\n * @private\n */\n _zoomOut() {\n var scaleOld = this.body.view.scale;\n var scale = this.body.view.scale / (1 + this.options.keyboard.speed.zoom);\n var translation = this.body.view.translation;\n var scaleFrac = scale / scaleOld;\n var tx = (1 - scaleFrac) * this.canvas.canvasViewCenter.x + translation.x * scaleFrac;\n var ty = (1 - scaleFrac) * this.canvas.canvasViewCenter.y + translation.y * scaleFrac;\n\n this.body.view.scale = scale;\n this.body.view.translation = { x: tx, y: ty };\n this.body.emitter.emit('zoom', { direction: '-', scale: this.body.view.scale, pointer: null });\n }\n\n\n /**\n * bind all keys using keycharm.\n */\n configureKeyboardBindings() {\n if (this.keycharm !== undefined) {\n this.keycharm.destroy();\n }\n\n if (this.options.keyboard.enabled === true) {\n if (this.options.keyboard.bindToWindow === true) {\n this.keycharm = keycharm({container: window, preventDefault: true});\n }\n else {\n this.keycharm = keycharm({container: this.canvas.frame, preventDefault: true});\n }\n\n this.keycharm.reset();\n\n if (this.activated === true) {\n this.keycharm.bind(\"up\", () => {this.bindToRedraw(\"_moveUp\") ;}, \"keydown\");\n this.keycharm.bind(\"down\", () => {this.bindToRedraw(\"_moveDown\") ;}, \"keydown\");\n this.keycharm.bind(\"left\", () => {this.bindToRedraw(\"_moveLeft\") ;}, \"keydown\");\n this.keycharm.bind(\"right\", () => {this.bindToRedraw(\"_moveRight\");}, \"keydown\");\n this.keycharm.bind(\"=\", () => {this.bindToRedraw(\"_zoomIn\") ;}, \"keydown\");\n this.keycharm.bind(\"num+\", () => {this.bindToRedraw(\"_zoomIn\") ;}, \"keydown\");\n this.keycharm.bind(\"num-\", () => {this.bindToRedraw(\"_zoomOut\") ;}, \"keydown\");\n this.keycharm.bind(\"-\", () => {this.bindToRedraw(\"_zoomOut\") ;}, \"keydown\");\n this.keycharm.bind(\"[\", () => {this.bindToRedraw(\"_zoomOut\") ;}, \"keydown\");\n this.keycharm.bind(\"]\", () => {this.bindToRedraw(\"_zoomIn\") ;}, \"keydown\");\n this.keycharm.bind(\"pageup\", () => {this.bindToRedraw(\"_zoomIn\") ;}, \"keydown\");\n this.keycharm.bind(\"pagedown\", () => {this.bindToRedraw(\"_zoomOut\") ;}, \"keydown\");\n\n this.keycharm.bind(\"up\", () => {this.unbindFromRedraw(\"_moveUp\") ;}, \"keyup\");\n this.keycharm.bind(\"down\", () => {this.unbindFromRedraw(\"_moveDown\") ;}, \"keyup\");\n this.keycharm.bind(\"left\", () => {this.unbindFromRedraw(\"_moveLeft\") ;}, \"keyup\");\n this.keycharm.bind(\"right\", () => {this.unbindFromRedraw(\"_moveRight\");}, \"keyup\");\n this.keycharm.bind(\"=\", () => {this.unbindFromRedraw(\"_zoomIn\") ;}, \"keyup\");\n this.keycharm.bind(\"num+\", () => {this.unbindFromRedraw(\"_zoomIn\") ;}, \"keyup\");\n this.keycharm.bind(\"num-\", () => {this.unbindFromRedraw(\"_zoomOut\") ;}, \"keyup\");\n this.keycharm.bind(\"-\", () => {this.unbindFromRedraw(\"_zoomOut\") ;}, \"keyup\");\n this.keycharm.bind(\"[\", () => {this.unbindFromRedraw(\"_zoomOut\") ;}, \"keyup\");\n this.keycharm.bind(\"]\", () => {this.unbindFromRedraw(\"_zoomIn\") ;}, \"keyup\");\n this.keycharm.bind(\"pageup\", () => {this.unbindFromRedraw(\"_zoomIn\") ;}, \"keyup\");\n this.keycharm.bind(\"pagedown\", () => {this.unbindFromRedraw(\"_zoomOut\") ;}, \"keyup\");\n }\n }\n }\n}\n\n\nexport default NavigationHandler;\n","import './Popup.css';\n\n/**\n * Popup is a class to create a popup window with some text\n */\nclass Popup {\n /**\n * @param {Element} container The container object.\n * @param {string} overflowMethod How the popup should act to overflowing ('flip' or 'cap')\n */\n constructor(container, overflowMethod) {\n this.container = container;\n this.overflowMethod = overflowMethod || 'cap';\n\n this.x = 0;\n this.y = 0;\n this.padding = 5;\n this.hidden = false;\n\n // create the frame\n this.frame = document.createElement('div');\n this.frame.className = 'vis-tooltip';\n this.container.appendChild(this.frame);\n }\n\n /**\n * @param {number} x Horizontal position of the popup window\n * @param {number} y Vertical position of the popup window\n */\n setPosition(x, y) {\n this.x = parseInt(x);\n this.y = parseInt(y);\n }\n\n /**\n * Set the content for the popup window. This can be HTML code or text.\n * @param {string | Element} content\n */\n setText(content) {\n if (content instanceof Element) {\n this.frame.innerHTML = '';\n this.frame.appendChild(content);\n }\n else {\n this.frame.innerHTML = content; // string containing text or HTML\n }\n }\n\n /**\n * Show the popup window\n * @param {boolean} [doShow] Show or hide the window\n */\n show(doShow) {\n if (doShow === undefined) {\n doShow = true;\n }\n\n if (doShow === true) {\n var height = this.frame.clientHeight;\n var width = this.frame.clientWidth;\n var maxHeight = this.frame.parentNode.clientHeight;\n var maxWidth = this.frame.parentNode.clientWidth;\n\n var left = 0, top = 0;\n\n if (this.overflowMethod == 'flip') {\n var isLeft = false, isTop = true; // Where around the position it's located\n\n if (this.y - height < this.padding) {\n isTop = false;\n }\n\n if (this.x + width > maxWidth - this.padding) {\n isLeft = true;\n }\n\n if (isLeft) {\n left = this.x - width;\n } else {\n left = this.x;\n }\n\n if (isTop) {\n top = this.y - height;\n } else {\n top = this.y;\n }\n } else {\n top = (this.y - height);\n if (top + height + this.padding > maxHeight) {\n top = maxHeight - height - this.padding;\n }\n if (top < this.padding) {\n top = this.padding;\n }\n\n left = this.x;\n if (left + width + this.padding > maxWidth) {\n left = maxWidth - width - this.padding;\n }\n if (left < this.padding) {\n left = this.padding;\n }\n }\n\n this.frame.style.left = left + \"px\";\n this.frame.style.top = top + \"px\";\n this.frame.style.visibility = \"visible\";\n this.hidden = false;\n }\n else {\n this.hide();\n }\n }\n\n /**\n * Hide the popup window\n */\n hide() {\n this.hidden = true;\n this.frame.style.left = \"0\";\n this.frame.style.top = \"0\";\n this.frame.style.visibility = \"hidden\";\n }\n\n /**\n * Remove the popup window\n */\n destroy() {\n this.frame.parentNode.removeChild(this.frame); // Remove element from DOM\n }\n}\n\nexport default Popup;\n","import util from 'vis-util';\nimport NavigationHandler from './components/NavigationHandler';\nimport Popup from './../../shared/Popup';\n\n\n/**\n * Handler for interactions\n */\nclass InteractionHandler {\n /**\n * @param {Object} body\n * @param {Canvas} canvas\n * @param {SelectionHandler} selectionHandler\n */\n constructor(body, canvas, selectionHandler) {\n this.body = body;\n this.canvas = canvas;\n this.selectionHandler = selectionHandler;\n this.navigationHandler = new NavigationHandler(body,canvas);\n\n // bind the events from hammer to functions in this object\n this.body.eventListeners.onTap = this.onTap.bind(this);\n this.body.eventListeners.onTouch = this.onTouch.bind(this);\n this.body.eventListeners.onDoubleTap = this.onDoubleTap.bind(this);\n this.body.eventListeners.onHold = this.onHold.bind(this);\n this.body.eventListeners.onDragStart = this.onDragStart.bind(this);\n this.body.eventListeners.onDrag = this.onDrag.bind(this);\n this.body.eventListeners.onDragEnd = this.onDragEnd.bind(this);\n this.body.eventListeners.onMouseWheel = this.onMouseWheel.bind(this);\n this.body.eventListeners.onPinch = this.onPinch.bind(this);\n this.body.eventListeners.onMouseMove = this.onMouseMove.bind(this);\n this.body.eventListeners.onRelease = this.onRelease.bind(this);\n this.body.eventListeners.onContext = this.onContext.bind(this);\n\n this.touchTime = 0;\n this.drag = {};\n this.pinch = {};\n this.popup = undefined;\n this.popupObj = undefined;\n this.popupTimer = undefined;\n\n this.body.functions.getPointer = this.getPointer.bind(this);\n\n this.options = {};\n this.defaultOptions = {\n dragNodes:true,\n dragView: true,\n hover: false,\n keyboard: {\n enabled: false,\n speed: {x: 10, y: 10, zoom: 0.02},\n bindToWindow: true\n },\n navigationButtons: false,\n tooltipDelay: 300,\n zoomView: true,\n zoomSpeed: 1\n };\n util.extend(this.options,this.defaultOptions);\n\n this.bindEventListeners()\n }\n\n /**\n * Binds event listeners\n */\n bindEventListeners() {\n this.body.emitter.on('destroy', () => {\n clearTimeout(this.popupTimer);\n delete this.body.functions.getPointer;\n })\n }\n\n /**\n *\n * @param {Object} options\n */\n setOptions(options) {\n if (options !== undefined) {\n // extend all but the values in fields\n let fields = ['hideEdgesOnDrag', 'hideEdgesOnZoom', 'hideNodesOnDrag','keyboard','multiselect','selectable','selectConnectedEdges'];\n util.selectiveNotDeepExtend(fields, this.options, options);\n\n // merge the keyboard options in.\n util.mergeOptions(this.options, options, 'keyboard');\n\n if (options.tooltip) {\n util.extend(this.options.tooltip, options.tooltip);\n if (options.tooltip.color) {\n this.options.tooltip.color = util.parseColor(options.tooltip.color);\n }\n }\n }\n\n this.navigationHandler.setOptions(this.options);\n }\n\n\n /**\n * Get the pointer location from a touch location\n * @param {{x: number, y: number}} touch\n * @return {{x: number, y: number}} pointer\n * @private\n */\n getPointer(touch) {\n return {\n x: touch.x - util.getAbsoluteLeft(this.canvas.frame.canvas),\n y: touch.y - util.getAbsoluteTop(this.canvas.frame.canvas)\n };\n }\n\n\n /**\n * On start of a touch gesture, store the pointer\n * @param {Event} event The event\n * @private\n */\n onTouch(event) {\n if (new Date().valueOf() - this.touchTime > 50) {\n this.drag.pointer = this.getPointer(event.center);\n this.drag.pinched = false;\n this.pinch.scale = this.body.view.scale;\n // to avoid double fireing of this event because we have two hammer instances. (on canvas and on frame)\n this.touchTime = new Date().valueOf();\n }\n }\n\n\n /**\n * handle tap/click event: select/unselect a node\n * @param {Event} event\n * @private\n */\n onTap(event) {\n let pointer = this.getPointer(event.center);\n let multiselect = this.selectionHandler.options.multiselect &&\n (event.changedPointers[0].ctrlKey || event.changedPointers[0].metaKey);\n\n this.checkSelectionChanges(pointer, event, multiselect);\n this.selectionHandler._generateClickEvent('click', event, pointer);\n }\n\n\n /**\n * handle doubletap event\n * @param {Event} event\n * @private\n */\n onDoubleTap(event) {\n let pointer = this.getPointer(event.center);\n this.selectionHandler._generateClickEvent('doubleClick', event, pointer);\n }\n\n\n /**\n * handle long tap event: multi select nodes\n * @param {Event} event\n * @private\n */\n onHold(event) {\n let pointer = this.getPointer(event.center);\n let multiselect = this.selectionHandler.options.multiselect;\n\n this.checkSelectionChanges(pointer, event, multiselect);\n\n this.selectionHandler._generateClickEvent('click', event, pointer);\n this.selectionHandler._generateClickEvent('hold', event, pointer);\n }\n\n\n /**\n * handle the release of the screen\n *\n * @param {Event} event\n * @private\n */\n onRelease(event) {\n if (new Date().valueOf() - this.touchTime > 10) {\n let pointer = this.getPointer(event.center);\n this.selectionHandler._generateClickEvent('release', event, pointer);\n // to avoid double fireing of this event because we have two hammer instances. (on canvas and on frame)\n this.touchTime = new Date().valueOf();\n }\n }\n\n /**\n *\n * @param {Event} event\n */\n onContext(event) {\n let pointer = this.getPointer({x:event.clientX, y:event.clientY});\n this.selectionHandler._generateClickEvent('oncontext', event, pointer);\n }\n\n\n /**\n * Select and deselect nodes depending current selection change.\n *\n * For changing nodes, select/deselect events are fired.\n *\n * NOTE: For a given edge, if one connecting node is deselected and with the same\n * click the other node is selected, no events for the edge will fire.\n * It was selected and it will remain selected.\n *\n * TODO: This is all SelectionHandler calls; the method should be moved to there.\n *\n * @param {{x: number, y: number}} pointer\n * @param {Event} event\n * @param {boolean} [add=false]\n */\n checkSelectionChanges(pointer, event, add = false) {\n let previousSelection = this.selectionHandler.getSelection();\n let selected = false;\n if (add === true) {\n selected = this.selectionHandler.selectAdditionalOnPoint(pointer);\n }\n else {\n selected = this.selectionHandler.selectOnPoint(pointer);\n }\n let currentSelection = this.selectionHandler.getSelection();\n\n // See NOTE in method comment for the reason to do it like this\n let deselectedItems = this._determineDifference(previousSelection, currentSelection);\n let selectedItems = this._determineDifference(currentSelection , previousSelection);\n\n if (deselectedItems.edges.length > 0) {\n this.selectionHandler._generateClickEvent('deselectEdge', event, pointer, previousSelection);\n selected = true;\n }\n\n if (deselectedItems.nodes.length > 0) {\n this.selectionHandler._generateClickEvent('deselectNode', event, pointer, previousSelection);\n selected = true;\n }\n\n if (selectedItems.nodes.length > 0) {\n this.selectionHandler._generateClickEvent('selectNode', event, pointer);\n selected = true;\n }\n\n if (selectedItems.edges.length > 0) {\n this.selectionHandler._generateClickEvent('selectEdge', event, pointer);\n selected = true;\n }\n\n // fire the select event if anything has been selected or deselected\n if (selected === true) { // select or unselect\n this.selectionHandler._generateClickEvent('select', event, pointer);\n }\n }\n\n\n /**\n * Remove all node and edge id's from the first set that are present in the second one.\n *\n * @param {{nodes: Array., edges: Array.}} firstSet\n * @param {{nodes: Array., edges: Array.}} secondSet\n * @returns {{nodes: Array., edges: Array.}}\n * @private\n */\n _determineDifference(firstSet, secondSet) {\n let arrayDiff = function(firstArr, secondArr) {\n let result = [];\n\n for (let i = 0; i < firstArr.length; i++) {\n let value = firstArr[i];\n if (secondArr.indexOf(value) === -1) {\n result.push(value);\n }\n }\n\n return result;\n };\n\n return {\n nodes: arrayDiff(firstSet.nodes, secondSet.nodes),\n edges: arrayDiff(firstSet.edges, secondSet.edges)\n };\n }\n\n\n /**\n * This function is called by onDragStart.\n * It is separated out because we can then overload it for the datamanipulation system.\n *\n * @param {Event} event\n * @private\n */\n onDragStart(event) {\n //in case the touch event was triggered on an external div, do the initial touch now.\n if (this.drag.pointer === undefined) {\n this.onTouch(event);\n }\n\n // note: drag.pointer is set in onTouch to get the initial touch location\n let node = this.selectionHandler.getNodeAt(this.drag.pointer);\n\n this.drag.dragging = true;\n this.drag.selection = [];\n this.drag.translation = util.extend({},this.body.view.translation); // copy the object\n this.drag.nodeId = undefined;\n\n if (node !== undefined && this.options.dragNodes === true) {\n this.drag.nodeId = node.id;\n // select the clicked node if not yet selected\n if (node.isSelected() === false) {\n this.selectionHandler.unselectAll();\n this.selectionHandler.selectObject(node);\n }\n\n // after select to contain the node\n this.selectionHandler._generateClickEvent('dragStart', event, this.drag.pointer);\n\n let selection = this.selectionHandler.selectionObj.nodes;\n // create an array with the selected nodes and their original location and status\n for (let nodeId in selection) {\n if (selection.hasOwnProperty(nodeId)) {\n let object = selection[nodeId];\n let s = {\n id: object.id,\n node: object,\n\n // store original x, y, xFixed and yFixed, make the node temporarily Fixed\n x: object.x,\n y: object.y,\n xFixed: object.options.fixed.x,\n yFixed: object.options.fixed.y\n };\n\n object.options.fixed.x = true;\n object.options.fixed.y = true;\n\n this.drag.selection.push(s);\n }\n }\n }\n else {\n // fallback if no node is selected and thus the view is dragged.\n this.selectionHandler._generateClickEvent('dragStart', event, this.drag.pointer, undefined, true);\n }\n }\n\n\n /**\n * handle drag event\n * @param {Event} event\n * @private\n */\n onDrag(event) {\n if (this.drag.pinched === true) {\n return;\n }\n\n // remove the focus on node if it is focussed on by the focusOnNode\n this.body.emitter.emit('unlockNode');\n\n let pointer = this.getPointer(event.center);\n\n let selection = this.drag.selection;\n if (selection && selection.length && this.options.dragNodes === true) {\n this.selectionHandler._generateClickEvent('dragging', event, pointer);\n\n // calculate delta's and new location\n let deltaX = pointer.x - this.drag.pointer.x;\n let deltaY = pointer.y - this.drag.pointer.y;\n\n // update position of all selected nodes\n selection.forEach((selection) => {\n let node = selection.node;\n // only move the node if it was not fixed initially\n if (selection.xFixed === false) {\n node.x = this.canvas._XconvertDOMtoCanvas(this.canvas._XconvertCanvasToDOM(selection.x) + deltaX);\n }\n // only move the node if it was not fixed initially\n if (selection.yFixed === false) {\n node.y = this.canvas._YconvertDOMtoCanvas(this.canvas._YconvertCanvasToDOM(selection.y) + deltaY);\n }\n });\n\n // start the simulation of the physics\n this.body.emitter.emit('startSimulation');\n }\n else {\n // move the network\n if (this.options.dragView === true) {\n this.selectionHandler._generateClickEvent('dragging', event, pointer, undefined, true);\n\n // if the drag was not started properly because the click started outside the network div, start it now.\n if (this.drag.pointer === undefined) {\n this.onDragStart(event);\n return;\n }\n let diffX = pointer.x - this.drag.pointer.x;\n let diffY = pointer.y - this.drag.pointer.y;\n\n this.body.view.translation = {x:this.drag.translation.x + diffX, y:this.drag.translation.y + diffY};\n this.body.emitter.emit('_requestRedraw');\n }\n }\n }\n\n\n /**\n * handle drag start event\n * @param {Event} event\n * @private\n */\n onDragEnd(event) {\n this.drag.dragging = false;\n let selection = this.drag.selection;\n if (selection && selection.length) {\n selection.forEach(function (s) {\n // restore original xFixed and yFixed\n s.node.options.fixed.x = s.xFixed;\n s.node.options.fixed.y = s.yFixed;\n });\n this.selectionHandler._generateClickEvent('dragEnd', event, this.getPointer(event.center));\n this.body.emitter.emit('startSimulation');\n }\n else {\n this.selectionHandler._generateClickEvent('dragEnd', event, this.getPointer(event.center), undefined, true);\n this.body.emitter.emit('_requestRedraw');\n }\n }\n\n\n\n /**\n * Handle pinch event\n * @param {Event} event The event\n * @private\n */\n onPinch(event) {\n let pointer = this.getPointer(event.center);\n\n this.drag.pinched = true;\n if (this.pinch['scale'] === undefined) {\n this.pinch.scale = 1;\n }\n\n // TODO: enabled moving while pinching?\n let scale = this.pinch.scale * event.scale;\n this.zoom(scale, pointer)\n }\n\n\n /**\n * Zoom the network in or out\n * @param {number} scale a number around 1, and between 0.01 and 10\n * @param {{x: number, y: number}} pointer Position on screen\n * @private\n */\n zoom(scale, pointer) {\n if (this.options.zoomView === true) {\n let scaleOld = this.body.view.scale;\n if (scale < 0.00001) {\n scale = 0.00001;\n }\n if (scale > 10) {\n scale = 10;\n }\n\n let preScaleDragPointer = undefined;\n if (this.drag !== undefined) {\n if (this.drag.dragging === true) {\n preScaleDragPointer = this.canvas.DOMtoCanvas(this.drag.pointer);\n }\n }\n // + this.canvas.frame.canvas.clientHeight / 2\n let translation = this.body.view.translation;\n\n let scaleFrac = scale / scaleOld;\n let tx = (1 - scaleFrac) * pointer.x + translation.x * scaleFrac;\n let ty = (1 - scaleFrac) * pointer.y + translation.y * scaleFrac;\n\n this.body.view.scale = scale;\n this.body.view.translation = {x:tx, y:ty};\n\n if (preScaleDragPointer != undefined) {\n let postScaleDragPointer = this.canvas.canvasToDOM(preScaleDragPointer);\n this.drag.pointer.x = postScaleDragPointer.x;\n this.drag.pointer.y = postScaleDragPointer.y;\n }\n\n this.body.emitter.emit('_requestRedraw');\n\n if (scaleOld < scale) {\n this.body.emitter.emit('zoom', {direction: '+', scale: this.body.view.scale, pointer: pointer});\n }\n else {\n this.body.emitter.emit('zoom', {direction: '-', scale: this.body.view.scale, pointer: pointer});\n }\n }\n }\n\n\n /**\n * Event handler for mouse wheel event, used to zoom the timeline\n * See http://adomas.org/javascript-mouse-wheel/\n * https://github.com/EightMedia/hammer.js/issues/256\n * @param {MouseEvent} event\n * @private\n */\n onMouseWheel(event) {\n if (this.options.zoomView === true) {\n // retrieve delta\n let delta = 0;\n if (event.wheelDelta) { /* IE/Opera. */\n delta = event.wheelDelta / 120;\n }\n else if (event.detail) { /* Mozilla case. */\n // In Mozilla, sign of delta is different than in IE.\n // Also, delta is multiple of 3.\n delta = -event.detail / 3;\n }\n\n // If delta is nonzero, handle it.\n // Basically, delta is now positive if wheel was scrolled up,\n // and negative, if wheel was scrolled down.\n if (delta !== 0) {\n\n // calculate the new scale\n let scale = this.body.view.scale;\n let zoom = delta * (this.options.zoomSpeed / 10);\n if (delta < 0) {\n zoom = zoom / (1 - zoom);\n }\n scale *= (1 + zoom);\n\n // calculate the pointer location\n let pointer = this.getPointer({x: event.clientX, y: event.clientY});\n\n // apply the new scale\n this.zoom(scale, pointer);\n }\n\n // Prevent default actions caused by mouse wheel.\n event.preventDefault();\n }\n }\n\n\n /**\n * Mouse move handler for checking whether the title moves over a node with a title.\n * @param {Event} event\n * @private\n */\n onMouseMove(event) {\n let pointer = this.getPointer({x:event.clientX, y:event.clientY});\n let popupVisible = false;\n\n // check if the previously selected node is still selected\n if (this.popup !== undefined) {\n if (this.popup.hidden === false) {\n this._checkHidePopup(pointer);\n }\n\n // if the popup was not hidden above\n if (this.popup.hidden === false) {\n popupVisible = true;\n this.popup.setPosition(pointer.x + 3, pointer.y - 5);\n this.popup.show();\n }\n }\n\n // if we bind the keyboard to the div, we have to highlight it to use it. This highlights it on mouse over.\n if (this.options.keyboard.bindToWindow === false && this.options.keyboard.enabled === true) {\n this.canvas.frame.focus();\n }\n\n // start a timeout that will check if the mouse is positioned above an element\n if (popupVisible === false) {\n if (this.popupTimer !== undefined) {\n clearInterval(this.popupTimer); // stop any running calculationTimer\n this.popupTimer = undefined;\n }\n if (!this.drag.dragging) {\n this.popupTimer = setTimeout(() => this._checkShowPopup(pointer), this.options.tooltipDelay);\n }\n }\n\n // adding hover highlights\n if (this.options.hover === true) {\n this.selectionHandler.hoverObject(event, pointer);\n }\n }\n\n\n\n /**\n * Check if there is an element on the given position in the network\n * (a node or edge). If so, and if this element has a title,\n * show a popup window with its title.\n *\n * @param {{x:number, y:number}} pointer\n * @private\n */\n _checkShowPopup(pointer) {\n let x = this.canvas._XconvertDOMtoCanvas(pointer.x);\n let y = this.canvas._YconvertDOMtoCanvas(pointer.y);\n let pointerObj = {\n left: x,\n top: y,\n right: x,\n bottom: y\n };\n\n let previousPopupObjId = this.popupObj === undefined ? undefined : this.popupObj.id;\n let nodeUnderCursor = false;\n let popupType = 'node';\n\n // check if a node is under the cursor.\n if (this.popupObj === undefined) {\n // search the nodes for overlap, select the top one in case of multiple nodes\n let nodeIndices = this.body.nodeIndices;\n let nodes = this.body.nodes;\n let node;\n let overlappingNodes = [];\n for (let i = 0; i < nodeIndices.length; i++) {\n node = nodes[nodeIndices[i]];\n if (node.isOverlappingWith(pointerObj) === true) {\n nodeUnderCursor = true;\n if (node.getTitle() !== undefined) {\n overlappingNodes.push(nodeIndices[i]);\n }\n }\n }\n\n if (overlappingNodes.length > 0) {\n // if there are overlapping nodes, select the last one, this is the one which is drawn on top of the others\n this.popupObj = nodes[overlappingNodes[overlappingNodes.length - 1]];\n // if you hover over a node, the title of the edge is not supposed to be shown.\n nodeUnderCursor = true;\n }\n }\n\n if (this.popupObj === undefined && nodeUnderCursor === false) {\n // search the edges for overlap\n let edgeIndices = this.body.edgeIndices;\n let edges = this.body.edges;\n let edge;\n let overlappingEdges = [];\n for (let i = 0; i < edgeIndices.length; i++) {\n edge = edges[edgeIndices[i]];\n if (edge.isOverlappingWith(pointerObj) === true) {\n if (edge.connected === true && edge.getTitle() !== undefined) {\n overlappingEdges.push(edgeIndices[i]);\n }\n }\n }\n\n if (overlappingEdges.length > 0) {\n this.popupObj = edges[overlappingEdges[overlappingEdges.length - 1]];\n popupType = 'edge';\n }\n }\n\n if (this.popupObj !== undefined) {\n // show popup message window\n if (this.popupObj.id !== previousPopupObjId) {\n if (this.popup === undefined) {\n this.popup = new Popup(this.canvas.frame);\n }\n\n this.popup.popupTargetType = popupType;\n this.popup.popupTargetId = this.popupObj.id;\n\n // adjust a small offset such that the mouse cursor is located in the\n // bottom left location of the popup, and you can easily move over the\n // popup area\n this.popup.setPosition(pointer.x + 3, pointer.y - 5);\n this.popup.setText(this.popupObj.getTitle());\n this.popup.show();\n this.body.emitter.emit('showPopup',this.popupObj.id);\n }\n }\n else {\n if (this.popup !== undefined) {\n this.popup.hide();\n this.body.emitter.emit('hidePopup');\n }\n }\n }\n\n\n /**\n * Check if the popup must be hidden, which is the case when the mouse is no\n * longer hovering on the object\n * @param {{x:number, y:number}} pointer\n * @private\n */\n _checkHidePopup(pointer) {\n let pointerObj = this.selectionHandler._pointerToPositionObject(pointer);\n\n let stillOnObj = false;\n if (this.popup.popupTargetType === 'node') {\n if (this.body.nodes[this.popup.popupTargetId] !== undefined) {\n stillOnObj = this.body.nodes[this.popup.popupTargetId].isOverlappingWith(pointerObj);\n\n // if the mouse is still one the node, we have to check if it is not also on one that is drawn on top of it.\n // we initially only check stillOnObj because this is much faster.\n if (stillOnObj === true) {\n let overNode = this.selectionHandler.getNodeAt(pointer);\n stillOnObj = overNode === undefined ? false : overNode.id === this.popup.popupTargetId;\n }\n }\n }\n else {\n if (this.selectionHandler.getNodeAt(pointer) === undefined) {\n if (this.body.edges[this.popup.popupTargetId] !== undefined) {\n stillOnObj = this.body.edges[this.popup.popupTargetId].isOverlappingWith(pointerObj);\n }\n }\n }\n\n\n if (stillOnObj === false) {\n this.popupObj = undefined;\n this.popup.hide();\n this.body.emitter.emit('hidePopup');\n }\n }\n}\n\nexport default InteractionHandler;\n","import Node from './components/Node';\nimport Edge from './components/Edge';\n\nimport util from 'vis-util';\n\n/**\n * The handler for selections\n */\nclass SelectionHandler {\n /**\n * @param {Object} body\n * @param {Canvas} canvas\n */\n constructor(body, canvas) {\n this.body = body;\n this.canvas = canvas;\n this.selectionObj = { nodes: [], edges: [] };\n this.hoverObj = { nodes: {}, edges: {} };\n\n this.options = {};\n this.defaultOptions = {\n multiselect: false,\n selectable: true,\n selectConnectedEdges: true,\n hoverConnectedEdges: true\n };\n util.extend(this.options, this.defaultOptions);\n\n this.body.emitter.on(\"_dataChanged\", () => {\n this.updateSelection()\n });\n }\n\n\n /**\n *\n * @param {Object} [options]\n */\n setOptions(options) {\n if (options !== undefined) {\n let fields = ['multiselect', 'hoverConnectedEdges', 'selectable', 'selectConnectedEdges'];\n util.selectiveDeepExtend(fields, this.options, options);\n }\n }\n\n\n /**\n * handles the selection part of the tap;\n *\n * @param {{x: number, y: number}} pointer\n * @returns {boolean}\n */\n selectOnPoint(pointer) {\n let selected = false;\n if (this.options.selectable === true) {\n let obj = this.getNodeAt(pointer) || this.getEdgeAt(pointer);\n\n // unselect after getting the objects in order to restore width and height.\n this.unselectAll();\n\n if (obj !== undefined) {\n selected = this.selectObject(obj);\n }\n this.body.emitter.emit(\"_requestRedraw\");\n }\n return selected;\n }\n\n /**\n *\n * @param {{x: number, y: number}} pointer\n * @returns {boolean}\n */\n selectAdditionalOnPoint(pointer) {\n let selectionChanged = false;\n if (this.options.selectable === true) {\n let obj = this.getNodeAt(pointer) || this.getEdgeAt(pointer);\n\n if (obj !== undefined) {\n selectionChanged = true;\n if (obj.isSelected() === true) {\n this.deselectObject(obj);\n }\n else {\n this.selectObject(obj);\n }\n\n this.body.emitter.emit(\"_requestRedraw\");\n }\n }\n return selectionChanged;\n }\n\n\n /**\n * Create an object containing the standard fields for an event.\n *\n * @param {Event} event\n * @param {{x: number, y: number}} pointer Object with the x and y screen coordinates of the mouse\n * @returns {{}}\n * @private\n */\n _initBaseEvent(event, pointer) {\n let properties = {};\n\n properties['pointer'] = {\n DOM: { x: pointer.x, y: pointer.y },\n canvas: this.canvas.DOMtoCanvas(pointer)\n };\n properties['event'] = event;\n\n return properties;\n }\n\n\n /**\n * Generate an event which the user can catch.\n *\n * This adds some extra data to the event with respect to cursor position and\n * selected nodes and edges.\n *\n * @param {string} eventType Name of event to send\n * @param {Event} event\n * @param {{x: number, y: number}} pointer Object with the x and y screen coordinates of the mouse\n * @param {Object|undefined} oldSelection If present, selection state before event occured\n * @param {boolean|undefined} [emptySelection=false] Indicate if selection data should be passed\n */\n _generateClickEvent(eventType, event, pointer, oldSelection, emptySelection = false) {\n let properties = this._initBaseEvent(event, pointer);\n\n if (emptySelection === true) {\n properties.nodes = [];\n properties.edges = [];\n }\n else {\n let tmp = this.getSelection();\n properties.nodes = tmp.nodes;\n properties.edges = tmp.edges;\n }\n\n if (oldSelection !== undefined) {\n properties['previousSelection'] = oldSelection;\n }\n\n if (eventType == 'click') {\n // For the time being, restrict this functionality to\n // just the click event.\n properties.items = this.getClickedItems(pointer);\n }\n\n if (event.controlEdge !== undefined) {\n properties.controlEdge = event.controlEdge;\n }\n\n this.body.emitter.emit(eventType, properties);\n }\n\n /**\n *\n * @param {Object} obj\n * @param {boolean} [highlightEdges=this.options.selectConnectedEdges]\n * @returns {boolean}\n */\n selectObject(obj, highlightEdges = this.options.selectConnectedEdges) {\n if (obj !== undefined) {\n if (obj instanceof Node) {\n if (highlightEdges === true) {\n this._selectConnectedEdges(obj);\n }\n }\n obj.select();\n this._addToSelection(obj);\n return true;\n }\n return false;\n }\n\n /**\n *\n * @param {Object} obj\n */\n deselectObject(obj) {\n if (obj.isSelected() === true) {\n obj.selected = false;\n this._removeFromSelection(obj);\n }\n }\n\n\n\n /**\n * retrieve all nodes overlapping with given object\n * @param {Object} object An object with parameters left, top, right, bottom\n * @return {number[]} An array with id's of the overlapping nodes\n * @private\n */\n _getAllNodesOverlappingWith(object) {\n let overlappingNodes = [];\n let nodes = this.body.nodes;\n for (let i = 0; i < this.body.nodeIndices.length; i++) {\n let nodeId = this.body.nodeIndices[i];\n if (nodes[nodeId].isOverlappingWith(object)) {\n overlappingNodes.push(nodeId);\n }\n }\n return overlappingNodes;\n }\n\n\n /**\n * Return a position object in canvasspace from a single point in screenspace\n *\n * @param {{x: number, y: number}} pointer\n * @returns {{left: number, top: number, right: number, bottom: number}}\n * @private\n */\n _pointerToPositionObject(pointer) {\n let canvasPos = this.canvas.DOMtoCanvas(pointer);\n return {\n left: canvasPos.x - 1,\n top: canvasPos.y + 1,\n right: canvasPos.x + 1,\n bottom: canvasPos.y - 1\n };\n }\n\n\n /**\n * Get the top node at the passed point (like a click)\n *\n * @param {{x: number, y: number}} pointer\n * @param {boolean} [returnNode=true]\n * @return {Node | undefined} node\n */\n getNodeAt(pointer, returnNode = true) {\n // we first check if this is an navigation controls element\n let positionObject = this._pointerToPositionObject(pointer);\n let overlappingNodes = this._getAllNodesOverlappingWith(positionObject);\n // if there are overlapping nodes, select the last one, this is the\n // one which is drawn on top of the others\n if (overlappingNodes.length > 0) {\n if (returnNode === true) {\n return this.body.nodes[overlappingNodes[overlappingNodes.length - 1]];\n }\n else {\n return overlappingNodes[overlappingNodes.length - 1];\n }\n }\n else {\n return undefined;\n }\n }\n\n\n /**\n * retrieve all edges overlapping with given object, selector is around center\n * @param {Object} object An object with parameters left, top, right, bottom\n * @param {number[]} overlappingEdges An array with id's of the overlapping nodes\n * @private\n */\n _getEdgesOverlappingWith(object, overlappingEdges) {\n let edges = this.body.edges;\n for (let i = 0; i < this.body.edgeIndices.length; i++) {\n let edgeId = this.body.edgeIndices[i];\n if (edges[edgeId].isOverlappingWith(object)) {\n overlappingEdges.push(edgeId);\n }\n }\n }\n\n\n /**\n * retrieve all nodes overlapping with given object\n * @param {Object} object An object with parameters left, top, right, bottom\n * @return {number[]} An array with id's of the overlapping nodes\n * @private\n */\n _getAllEdgesOverlappingWith(object) {\n let overlappingEdges = [];\n this._getEdgesOverlappingWith(object, overlappingEdges);\n return overlappingEdges;\n }\n\n\n /**\n * Get the edges nearest to the passed point (like a click)\n *\n * @param {{x: number, y: number}} pointer\n * @param {boolean} [returnEdge=true]\n * @return {Edge | undefined} node\n */\n getEdgeAt(pointer, returnEdge = true) {\n // Iterate over edges, pick closest within 10\n var canvasPos = this.canvas.DOMtoCanvas(pointer);\n var mindist = 10;\n var overlappingEdge = null;\n var edges = this.body.edges;\n for (var i = 0; i < this.body.edgeIndices.length; i++) {\n var edgeId = this.body.edgeIndices[i];\n var edge = edges[edgeId];\n if (edge.connected) {\n var xFrom = edge.from.x;\n var yFrom = edge.from.y;\n var xTo = edge.to.x;\n var yTo = edge.to.y;\n var dist = edge.edgeType.getDistanceToEdge(xFrom, yFrom, xTo, yTo, canvasPos.x, canvasPos.y);\n if (dist < mindist) {\n overlappingEdge = edgeId;\n mindist = dist;\n }\n }\n }\n if (overlappingEdge !== null) {\n if (returnEdge === true) {\n return this.body.edges[overlappingEdge];\n }\n else {\n return overlappingEdge;\n }\n }\n else {\n return undefined;\n }\n }\n\n\n /**\n * Add object to the selection array.\n *\n * @param {Object} obj\n * @private\n */\n _addToSelection(obj) {\n if (obj instanceof Node) {\n this.selectionObj.nodes[obj.id] = obj;\n }\n else {\n this.selectionObj.edges[obj.id] = obj;\n }\n }\n\n /**\n * Add object to the selection array.\n *\n * @param {Object} obj\n * @private\n */\n _addToHover(obj) {\n if (obj instanceof Node) {\n this.hoverObj.nodes[obj.id] = obj;\n }\n else {\n this.hoverObj.edges[obj.id] = obj;\n }\n }\n\n\n /**\n * Remove a single option from selection.\n *\n * @param {Object} obj\n * @private\n */\n _removeFromSelection(obj) {\n if (obj instanceof Node) {\n delete this.selectionObj.nodes[obj.id];\n this._unselectConnectedEdges(obj);\n }\n else {\n delete this.selectionObj.edges[obj.id];\n }\n }\n\n /**\n * Unselect all. The selectionObj is useful for this.\n */\n unselectAll() {\n for (let nodeId in this.selectionObj.nodes) {\n if (this.selectionObj.nodes.hasOwnProperty(nodeId)) {\n this.selectionObj.nodes[nodeId].unselect();\n }\n }\n for (let edgeId in this.selectionObj.edges) {\n if (this.selectionObj.edges.hasOwnProperty(edgeId)) {\n this.selectionObj.edges[edgeId].unselect();\n }\n }\n\n this.selectionObj = { nodes: {}, edges: {} };\n }\n\n\n /**\n * return the number of selected nodes\n *\n * @returns {number}\n * @private\n */\n _getSelectedNodeCount() {\n let count = 0;\n for (let nodeId in this.selectionObj.nodes) {\n if (this.selectionObj.nodes.hasOwnProperty(nodeId)) {\n count += 1;\n }\n }\n return count;\n }\n\n /**\n * return the selected node\n *\n * @returns {number}\n * @private\n */\n _getSelectedNode() {\n for (let nodeId in this.selectionObj.nodes) {\n if (this.selectionObj.nodes.hasOwnProperty(nodeId)) {\n return this.selectionObj.nodes[nodeId];\n }\n }\n return undefined;\n }\n\n /**\n * return the selected edge\n *\n * @returns {number}\n * @private\n */\n _getSelectedEdge() {\n for (let edgeId in this.selectionObj.edges) {\n if (this.selectionObj.edges.hasOwnProperty(edgeId)) {\n return this.selectionObj.edges[edgeId];\n }\n }\n return undefined;\n }\n\n\n /**\n * return the number of selected edges\n *\n * @returns {number}\n * @private\n */\n _getSelectedEdgeCount() {\n let count = 0;\n for (let edgeId in this.selectionObj.edges) {\n if (this.selectionObj.edges.hasOwnProperty(edgeId)) {\n count += 1;\n }\n }\n return count;\n }\n\n\n /**\n * return the number of selected objects.\n *\n * @returns {number}\n * @private\n */\n _getSelectedObjectCount() {\n let count = 0;\n for (let nodeId in this.selectionObj.nodes) {\n if (this.selectionObj.nodes.hasOwnProperty(nodeId)) {\n count += 1;\n }\n }\n for (let edgeId in this.selectionObj.edges) {\n if (this.selectionObj.edges.hasOwnProperty(edgeId)) {\n count += 1;\n }\n }\n return count;\n }\n\n /**\n * Check if anything is selected\n *\n * @returns {boolean}\n * @private\n */\n _selectionIsEmpty() {\n for (let nodeId in this.selectionObj.nodes) {\n if (this.selectionObj.nodes.hasOwnProperty(nodeId)) {\n return false;\n }\n }\n for (let edgeId in this.selectionObj.edges) {\n if (this.selectionObj.edges.hasOwnProperty(edgeId)) {\n return false;\n }\n }\n return true;\n }\n\n\n /**\n * check if one of the selected nodes is a cluster.\n *\n * @returns {boolean}\n * @private\n */\n _clusterInSelection() {\n for (let nodeId in this.selectionObj.nodes) {\n if (this.selectionObj.nodes.hasOwnProperty(nodeId)) {\n if (this.selectionObj.nodes[nodeId].clusterSize > 1) {\n return true;\n }\n }\n }\n return false;\n }\n\n /**\n * select the edges connected to the node that is being selected\n *\n * @param {Node} node\n * @private\n */\n _selectConnectedEdges(node) {\n for (let i = 0; i < node.edges.length; i++) {\n let edge = node.edges[i];\n edge.select();\n this._addToSelection(edge);\n }\n }\n\n /**\n * select the edges connected to the node that is being selected\n *\n * @param {Node} node\n * @private\n */\n _hoverConnectedEdges(node) {\n for (let i = 0; i < node.edges.length; i++) {\n let edge = node.edges[i];\n edge.hover = true;\n this._addToHover(edge);\n }\n }\n\n\n /**\n * unselect the edges connected to the node that is being selected\n *\n * @param {Node} node\n * @private\n */\n _unselectConnectedEdges(node) {\n for (let i = 0; i < node.edges.length; i++) {\n let edge = node.edges[i];\n edge.unselect();\n this._removeFromSelection(edge);\n }\n }\n\n\n /**\n * Remove the highlight from a node or edge, in response to mouse movement\n *\n * @param {Event} event\n * @param {{x: number, y: number}} pointer object with the x and y screen coordinates of the mouse\n * @param {Node|vis.Edge} object\n * @private\n */\n emitBlurEvent(event, pointer, object) {\n let properties = this._initBaseEvent(event, pointer);\n\n if (object.hover === true) {\n object.hover = false;\n if (object instanceof Node) {\n properties.node = object.id;\n this.body.emitter.emit(\"blurNode\", properties);\n }\n else {\n properties.edge = object.id;\n this.body.emitter.emit(\"blurEdge\", properties);\n }\n }\n }\n\n\n /**\n * Create the highlight for a node or edge, in response to mouse movement\n *\n * @param {Event} event\n * @param {{x: number, y: number}} pointer object with the x and y screen coordinates of the mouse\n * @param {Node|vis.Edge} object\n * @returns {boolean} hoverChanged\n * @private\n */\n emitHoverEvent(event, pointer, object) {\n let properties = this._initBaseEvent(event, pointer);\n let hoverChanged = false;\n\n if (object.hover === false) {\n object.hover = true;\n this._addToHover(object);\n hoverChanged = true;\n if (object instanceof Node) {\n properties.node = object.id;\n this.body.emitter.emit(\"hoverNode\", properties);\n }\n else {\n properties.edge = object.id;\n this.body.emitter.emit(\"hoverEdge\", properties);\n }\n }\n\n return hoverChanged;\n }\n\n\n /**\n * Perform actions in response to a mouse movement.\n *\n * @param {Event} event\n * @param {{x: number, y: number}} pointer | object with the x and y screen coordinates of the mouse\n */\n hoverObject(event, pointer) {\n let object = this.getNodeAt(pointer);\n if (object === undefined) {\n object = this.getEdgeAt(pointer);\n }\n\n let hoverChanged = false;\n // remove all node hover highlights\n for (let nodeId in this.hoverObj.nodes) {\n if (this.hoverObj.nodes.hasOwnProperty(nodeId)) {\n if (object === undefined || (object instanceof Node && object.id != nodeId) || object instanceof Edge) {\n this.emitBlurEvent(event, pointer, this.hoverObj.nodes[nodeId]);\n delete this.hoverObj.nodes[nodeId];\n hoverChanged = true;\n }\n }\n }\n\n // removing all edge hover highlights\n for (let edgeId in this.hoverObj.edges) {\n if (this.hoverObj.edges.hasOwnProperty(edgeId)) {\n // if the hover has been changed here it means that the node has been hovered over or off\n // we then do not use the emitBlurEvent method here.\n if (hoverChanged === true) {\n this.hoverObj.edges[edgeId].hover = false;\n delete this.hoverObj.edges[edgeId];\n }\n // if the blur remains the same and the object is undefined (mouse off) or another\n // edge has been hovered, or another node has been hovered we blur the edge.\n else if (object === undefined || (object instanceof Edge && object.id != edgeId) || (object instanceof Node && !object.hover)) {\n this.emitBlurEvent(event, pointer, this.hoverObj.edges[edgeId]);\n delete this.hoverObj.edges[edgeId];\n hoverChanged = true;\n }\n }\n }\n\n if (object !== undefined) {\n const hoveredEdgesCount = Object.keys(this.hoverObj.edges).length;\n const hoveredNodesCount = Object.keys(this.hoverObj.nodes).length;\n const newOnlyHoveredEdge = object instanceof Edge && hoveredEdgesCount === 0 && hoveredNodesCount === 0;\n const newOnlyHoveredNode = object instanceof Node && hoveredEdgesCount === 0 && hoveredNodesCount === 0;\n\n if (hoverChanged || newOnlyHoveredEdge || newOnlyHoveredNode) {\n hoverChanged = this.emitHoverEvent(event, pointer, object);\n }\n\n if (object instanceof Node && this.options.hoverConnectedEdges === true) {\n this._hoverConnectedEdges(object);\n }\n }\n\n if (hoverChanged === true) {\n this.body.emitter.emit('_requestRedraw');\n }\n }\n\n\n\n\n /**\n *\n * retrieve the currently selected objects\n * @return {{nodes: Array., edges: Array.}} selection\n */\n getSelection() {\n let nodeIds = this.getSelectedNodes();\n let edgeIds = this.getSelectedEdges();\n return { nodes: nodeIds, edges: edgeIds };\n }\n\n /**\n *\n * retrieve the currently selected nodes\n * @return {string[]} selection An array with the ids of the\n * selected nodes.\n */\n getSelectedNodes() {\n let idArray = [];\n if (this.options.selectable === true) {\n for (let nodeId in this.selectionObj.nodes) {\n if (this.selectionObj.nodes.hasOwnProperty(nodeId)) {\n idArray.push(this.selectionObj.nodes[nodeId].id);\n }\n }\n }\n return idArray;\n }\n\n /**\n *\n * retrieve the currently selected edges\n * @return {Array} selection An array with the ids of the\n * selected nodes.\n */\n getSelectedEdges() {\n let idArray = [];\n if (this.options.selectable === true) {\n for (let edgeId in this.selectionObj.edges) {\n if (this.selectionObj.edges.hasOwnProperty(edgeId)) {\n idArray.push(this.selectionObj.edges[edgeId].id);\n }\n }\n }\n return idArray;\n }\n\n /**\n * Updates the current selection\n * @param {{nodes: Array., edges: Array.}} selection\n * @param {Object} options Options\n */\n setSelection(selection, options = {}) {\n let i, id;\n\n if (!selection || (!selection.nodes && !selection.edges))\n throw 'Selection must be an object with nodes and/or edges properties';\n // first unselect any selected node, if option is true or undefined\n if (options.unselectAll || options.unselectAll === undefined) {\n this.unselectAll();\n }\n if (selection.nodes) {\n for (i = 0; i < selection.nodes.length; i++) {\n id = selection.nodes[i];\n\n let node = this.body.nodes[id];\n if (!node) {\n throw new RangeError('Node with id \"' + id + '\" not found');\n }\n // don't select edges with it\n this.selectObject(node, options.highlightEdges);\n }\n }\n\n if (selection.edges) {\n for (i = 0; i < selection.edges.length; i++) {\n id = selection.edges[i];\n\n let edge = this.body.edges[id];\n if (!edge) {\n throw new RangeError('Edge with id \"' + id + '\" not found');\n }\n this.selectObject(edge);\n }\n }\n this.body.emitter.emit('_requestRedraw');\n }\n\n\n /**\n * select zero or more nodes with the option to highlight edges\n * @param {number[] | string[]} selection An array with the ids of the\n * selected nodes.\n * @param {boolean} [highlightEdges]\n */\n selectNodes(selection, highlightEdges = true) {\n if (!selection || (selection.length === undefined))\n throw 'Selection must be an array with ids';\n\n this.setSelection({ nodes: selection }, { highlightEdges: highlightEdges });\n }\n\n\n /**\n * select zero or more edges\n * @param {number[] | string[]} selection An array with the ids of the\n * selected nodes.\n */\n selectEdges(selection) {\n if (!selection || (selection.length === undefined))\n throw 'Selection must be an array with ids';\n\n this.setSelection({ edges: selection });\n }\n\n /**\n * Validate the selection: remove ids of nodes which no longer exist\n * @private\n */\n updateSelection() {\n for (let nodeId in this.selectionObj.nodes) {\n if (this.selectionObj.nodes.hasOwnProperty(nodeId)) {\n if (!this.body.nodes.hasOwnProperty(nodeId)) {\n delete this.selectionObj.nodes[nodeId];\n }\n }\n }\n for (let edgeId in this.selectionObj.edges) {\n if (this.selectionObj.edges.hasOwnProperty(edgeId)) {\n if (!this.body.edges.hasOwnProperty(edgeId)) {\n delete this.selectionObj.edges[edgeId];\n }\n }\n }\n }\n\n\n /**\n * Determine all the visual elements clicked which are on the given point.\n *\n * All elements are returned; this includes nodes, edges and their labels.\n * The order returned is from highest to lowest, i.e. element 0 of the return\n * value is the topmost item clicked on.\n *\n * The return value consists of an array of the following possible elements:\n *\n * - `{nodeId:number}` - node with given id clicked on\n * - `{nodeId:number, labelId:0}` - label of node with given id clicked on\n * - `{edgeId:number}` - edge with given id clicked on\n * - `{edge:number, labelId:0}` - label of edge with given id clicked on\n *\n * ## NOTES\n *\n * - Currently, there is only one label associated with a node or an edge,\n * but this is expected to change somewhere in the future.\n * - Since there is no z-indexing yet, it is not really possible to set the nodes and\n * edges in the correct order. For the time being, nodes come first.\n *\n * @param {point} pointer mouse position in screen coordinates\n * @returns {Array.}\n * @private\n */\n getClickedItems(pointer) {\n let point = this.canvas.DOMtoCanvas(pointer);\n var items = [];\n\n // Note reverse order; we want the topmost clicked items to be first in the array\n // Also note that selected nodes are disregarded here; these normally display on top\n let nodeIndices = this.body.nodeIndices;\n let nodes = this.body.nodes;\n for (let i = nodeIndices.length - 1; i >= 0; i--) {\n let node = nodes[nodeIndices[i]];\n let ret = node.getItemsOnPoint(point);\n items.push.apply(items, ret); // Append the return value to the running list.\n }\n\n let edgeIndices = this.body.edgeIndices;\n let edges = this.body.edges;\n for (let i = edgeIndices.length - 1; i >= 0; i--) {\n let edge = edges[edgeIndices[i]];\n let ret = edge.getItemsOnPoint(point);\n items.push.apply(items, ret); // Append the return value to the running list.\n }\n\n return items;\n }\n}\n\nexport default SelectionHandler;\n","/****\n * The MIT License\n *\n * Copyright (c) 2015 Marco Ziccardi\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n *\n ****/\n(function (global, factory) {\n if (typeof define === 'function' && define.amd) {\n define('timsort', ['exports'], factory);\n } else if (typeof exports !== 'undefined') {\n factory(exports);\n } else {\n var mod = {\n exports: {}\n };\n factory(mod.exports);\n global.timsort = mod.exports;\n }\n})(this, function (exports) {\n 'use strict';\n\n exports.__esModule = true;\n exports.sort = sort;\n\n function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError('Cannot call a class as a function');\n }\n }\n\n var DEFAULT_MIN_MERGE = 32;\n\n var DEFAULT_MIN_GALLOPING = 7;\n\n var DEFAULT_TMP_STORAGE_LENGTH = 256;\n\n var POWERS_OF_TEN = [1e0, 1e1, 1e2, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9];\n\n function log10(x) {\n if (x < 1e5) {\n if (x < 1e2) {\n return x < 1e1 ? 0 : 1;\n }\n\n if (x < 1e4) {\n return x < 1e3 ? 2 : 3;\n }\n\n return 4;\n }\n\n if (x < 1e7) {\n return x < 1e6 ? 5 : 6;\n }\n\n if (x < 1e9) {\n return x < 1e8 ? 7 : 8;\n }\n\n return 9;\n }\n\n function alphabeticalCompare(a, b) {\n if (a === b) {\n return 0;\n }\n\n if (~ ~a === a && ~ ~b === b) {\n if (a === 0 || b === 0) {\n return a < b ? -1 : 1;\n }\n\n if (a < 0 || b < 0) {\n if (b >= 0) {\n return -1;\n }\n\n if (a >= 0) {\n return 1;\n }\n\n a = -a;\n b = -b;\n }\n\n var al = log10(a);\n var bl = log10(b);\n\n var t = 0;\n\n if (al < bl) {\n a *= POWERS_OF_TEN[bl - al - 1];\n b /= 10;\n t = -1;\n } else if (al > bl) {\n b *= POWERS_OF_TEN[al - bl - 1];\n a /= 10;\n t = 1;\n }\n\n if (a === b) {\n return t;\n }\n\n return a < b ? -1 : 1;\n }\n\n var aStr = String(a);\n var bStr = String(b);\n\n if (aStr === bStr) {\n return 0;\n }\n\n return aStr < bStr ? -1 : 1;\n }\n\n function minRunLength(n) {\n var r = 0;\n\n while (n >= DEFAULT_MIN_MERGE) {\n r |= n & 1;\n n >>= 1;\n }\n\n return n + r;\n }\n\n function makeAscendingRun(array, lo, hi, compare) {\n var runHi = lo + 1;\n\n if (runHi === hi) {\n return 1;\n }\n\n if (compare(array[runHi++], array[lo]) < 0) {\n while (runHi < hi && compare(array[runHi], array[runHi - 1]) < 0) {\n runHi++;\n }\n\n reverseRun(array, lo, runHi);\n } else {\n while (runHi < hi && compare(array[runHi], array[runHi - 1]) >= 0) {\n runHi++;\n }\n }\n\n return runHi - lo;\n }\n\n function reverseRun(array, lo, hi) {\n hi--;\n\n while (lo < hi) {\n var t = array[lo];\n array[lo++] = array[hi];\n array[hi--] = t;\n }\n }\n\n function binaryInsertionSort(array, lo, hi, start, compare) {\n if (start === lo) {\n start++;\n }\n\n for (; start < hi; start++) {\n var pivot = array[start];\n\n var left = lo;\n var right = start;\n\n while (left < right) {\n var mid = left + right >>> 1;\n\n if (compare(pivot, array[mid]) < 0) {\n right = mid;\n } else {\n left = mid + 1;\n }\n }\n\n var n = start - left;\n\n switch (n) {\n case 3:\n array[left + 3] = array[left + 2];\n\n case 2:\n array[left + 2] = array[left + 1];\n\n case 1:\n array[left + 1] = array[left];\n break;\n default:\n while (n > 0) {\n array[left + n] = array[left + n - 1];\n n--;\n }\n }\n\n array[left] = pivot;\n }\n }\n\n function gallopLeft(value, array, start, length, hint, compare) {\n var lastOffset = 0;\n var maxOffset = 0;\n var offset = 1;\n\n if (compare(value, array[start + hint]) > 0) {\n maxOffset = length - hint;\n\n while (offset < maxOffset && compare(value, array[start + hint + offset]) > 0) {\n lastOffset = offset;\n offset = (offset << 1) + 1;\n\n if (offset <= 0) {\n offset = maxOffset;\n }\n }\n\n if (offset > maxOffset) {\n offset = maxOffset;\n }\n\n lastOffset += hint;\n offset += hint;\n } else {\n maxOffset = hint + 1;\n while (offset < maxOffset && compare(value, array[start + hint - offset]) <= 0) {\n lastOffset = offset;\n offset = (offset << 1) + 1;\n\n if (offset <= 0) {\n offset = maxOffset;\n }\n }\n if (offset > maxOffset) {\n offset = maxOffset;\n }\n\n var tmp = lastOffset;\n lastOffset = hint - offset;\n offset = hint - tmp;\n }\n\n lastOffset++;\n while (lastOffset < offset) {\n var m = lastOffset + (offset - lastOffset >>> 1);\n\n if (compare(value, array[start + m]) > 0) {\n lastOffset = m + 1;\n } else {\n offset = m;\n }\n }\n return offset;\n }\n\n function gallopRight(value, array, start, length, hint, compare) {\n var lastOffset = 0;\n var maxOffset = 0;\n var offset = 1;\n\n if (compare(value, array[start + hint]) < 0) {\n maxOffset = hint + 1;\n\n while (offset < maxOffset && compare(value, array[start + hint - offset]) < 0) {\n lastOffset = offset;\n offset = (offset << 1) + 1;\n\n if (offset <= 0) {\n offset = maxOffset;\n }\n }\n\n if (offset > maxOffset) {\n offset = maxOffset;\n }\n\n var tmp = lastOffset;\n lastOffset = hint - offset;\n offset = hint - tmp;\n } else {\n maxOffset = length - hint;\n\n while (offset < maxOffset && compare(value, array[start + hint + offset]) >= 0) {\n lastOffset = offset;\n offset = (offset << 1) + 1;\n\n if (offset <= 0) {\n offset = maxOffset;\n }\n }\n\n if (offset > maxOffset) {\n offset = maxOffset;\n }\n\n lastOffset += hint;\n offset += hint;\n }\n\n lastOffset++;\n\n while (lastOffset < offset) {\n var m = lastOffset + (offset - lastOffset >>> 1);\n\n if (compare(value, array[start + m]) < 0) {\n offset = m;\n } else {\n lastOffset = m + 1;\n }\n }\n\n return offset;\n }\n\n var TimSort = (function () {\n function TimSort(array, compare) {\n _classCallCheck(this, TimSort);\n\n this.array = null;\n this.compare = null;\n this.minGallop = DEFAULT_MIN_GALLOPING;\n this.length = 0;\n this.tmpStorageLength = DEFAULT_TMP_STORAGE_LENGTH;\n this.stackLength = 0;\n this.runStart = null;\n this.runLength = null;\n this.stackSize = 0;\n\n this.array = array;\n this.compare = compare;\n\n this.length = array.length;\n\n if (this.length < 2 * DEFAULT_TMP_STORAGE_LENGTH) {\n this.tmpStorageLength = this.length >>> 1;\n }\n\n this.tmp = new Array(this.tmpStorageLength);\n\n this.stackLength = this.length < 120 ? 5 : this.length < 1542 ? 10 : this.length < 119151 ? 19 : 40;\n\n this.runStart = new Array(this.stackLength);\n this.runLength = new Array(this.stackLength);\n }\n\n TimSort.prototype.pushRun = function pushRun(runStart, runLength) {\n this.runStart[this.stackSize] = runStart;\n this.runLength[this.stackSize] = runLength;\n this.stackSize += 1;\n };\n\n TimSort.prototype.mergeRuns = function mergeRuns() {\n while (this.stackSize > 1) {\n var n = this.stackSize - 2;\n\n if (n >= 1 && this.runLength[n - 1] <= this.runLength[n] + this.runLength[n + 1] || n >= 2 && this.runLength[n - 2] <= this.runLength[n] + this.runLength[n - 1]) {\n\n if (this.runLength[n - 1] < this.runLength[n + 1]) {\n n--;\n }\n } else if (this.runLength[n] > this.runLength[n + 1]) {\n break;\n }\n this.mergeAt(n);\n }\n };\n\n TimSort.prototype.forceMergeRuns = function forceMergeRuns() {\n while (this.stackSize > 1) {\n var n = this.stackSize - 2;\n\n if (n > 0 && this.runLength[n - 1] < this.runLength[n + 1]) {\n n--;\n }\n\n this.mergeAt(n);\n }\n };\n\n TimSort.prototype.mergeAt = function mergeAt(i) {\n var compare = this.compare;\n var array = this.array;\n\n var start1 = this.runStart[i];\n var length1 = this.runLength[i];\n var start2 = this.runStart[i + 1];\n var length2 = this.runLength[i + 1];\n\n this.runLength[i] = length1 + length2;\n\n if (i === this.stackSize - 3) {\n this.runStart[i + 1] = this.runStart[i + 2];\n this.runLength[i + 1] = this.runLength[i + 2];\n }\n\n this.stackSize--;\n\n var k = gallopRight(array[start2], array, start1, length1, 0, compare);\n start1 += k;\n length1 -= k;\n\n if (length1 === 0) {\n return;\n }\n\n length2 = gallopLeft(array[start1 + length1 - 1], array, start2, length2, length2 - 1, compare);\n\n if (length2 === 0) {\n return;\n }\n\n if (length1 <= length2) {\n this.mergeLow(start1, length1, start2, length2);\n } else {\n this.mergeHigh(start1, length1, start2, length2);\n }\n };\n\n TimSort.prototype.mergeLow = function mergeLow(start1, length1, start2, length2) {\n\n var compare = this.compare;\n var array = this.array;\n var tmp = this.tmp;\n var i = 0;\n\n for (i = 0; i < length1; i++) {\n tmp[i] = array[start1 + i];\n }\n\n var cursor1 = 0;\n var cursor2 = start2;\n var dest = start1;\n\n array[dest++] = array[cursor2++];\n\n if (--length2 === 0) {\n for (i = 0; i < length1; i++) {\n array[dest + i] = tmp[cursor1 + i];\n }\n return;\n }\n\n if (length1 === 1) {\n for (i = 0; i < length2; i++) {\n array[dest + i] = array[cursor2 + i];\n }\n array[dest + length2] = tmp[cursor1];\n return;\n }\n\n var minGallop = this.minGallop;\n\n while (true) {\n var count1 = 0;\n var count2 = 0;\n var exit = false;\n\n do {\n if (compare(array[cursor2], tmp[cursor1]) < 0) {\n array[dest++] = array[cursor2++];\n count2++;\n count1 = 0;\n\n if (--length2 === 0) {\n exit = true;\n break;\n }\n } else {\n array[dest++] = tmp[cursor1++];\n count1++;\n count2 = 0;\n if (--length1 === 1) {\n exit = true;\n break;\n }\n }\n } while ((count1 | count2) < minGallop);\n\n if (exit) {\n break;\n }\n\n do {\n count1 = gallopRight(array[cursor2], tmp, cursor1, length1, 0, compare);\n\n if (count1 !== 0) {\n for (i = 0; i < count1; i++) {\n array[dest + i] = tmp[cursor1 + i];\n }\n\n dest += count1;\n cursor1 += count1;\n length1 -= count1;\n if (length1 <= 1) {\n exit = true;\n break;\n }\n }\n\n array[dest++] = array[cursor2++];\n\n if (--length2 === 0) {\n exit = true;\n break;\n }\n\n count2 = gallopLeft(tmp[cursor1], array, cursor2, length2, 0, compare);\n\n if (count2 !== 0) {\n for (i = 0; i < count2; i++) {\n array[dest + i] = array[cursor2 + i];\n }\n\n dest += count2;\n cursor2 += count2;\n length2 -= count2;\n\n if (length2 === 0) {\n exit = true;\n break;\n }\n }\n array[dest++] = tmp[cursor1++];\n\n if (--length1 === 1) {\n exit = true;\n break;\n }\n\n minGallop--;\n } while (count1 >= DEFAULT_MIN_GALLOPING || count2 >= DEFAULT_MIN_GALLOPING);\n\n if (exit) {\n break;\n }\n\n if (minGallop < 0) {\n minGallop = 0;\n }\n\n minGallop += 2;\n }\n\n this.minGallop = minGallop;\n\n if (minGallop < 1) {\n this.minGallop = 1;\n }\n\n if (length1 === 1) {\n for (i = 0; i < length2; i++) {\n array[dest + i] = array[cursor2 + i];\n }\n array[dest + length2] = tmp[cursor1];\n } else if (length1 === 0) {\n throw new Error('mergeLow preconditions were not respected');\n } else {\n for (i = 0; i < length1; i++) {\n array[dest + i] = tmp[cursor1 + i];\n }\n }\n };\n\n TimSort.prototype.mergeHigh = function mergeHigh(start1, length1, start2, length2) {\n var compare = this.compare;\n var array = this.array;\n var tmp = this.tmp;\n var i = 0;\n\n for (i = 0; i < length2; i++) {\n tmp[i] = array[start2 + i];\n }\n\n var cursor1 = start1 + length1 - 1;\n var cursor2 = length2 - 1;\n var dest = start2 + length2 - 1;\n var customCursor = 0;\n var customDest = 0;\n\n array[dest--] = array[cursor1--];\n\n if (--length1 === 0) {\n customCursor = dest - (length2 - 1);\n\n for (i = 0; i < length2; i++) {\n array[customCursor + i] = tmp[i];\n }\n\n return;\n }\n\n if (length2 === 1) {\n dest -= length1;\n cursor1 -= length1;\n customDest = dest + 1;\n customCursor = cursor1 + 1;\n\n for (i = length1 - 1; i >= 0; i--) {\n array[customDest + i] = array[customCursor + i];\n }\n\n array[dest] = tmp[cursor2];\n return;\n }\n\n var minGallop = this.minGallop;\n\n while (true) {\n var count1 = 0;\n var count2 = 0;\n var exit = false;\n\n do {\n if (compare(tmp[cursor2], array[cursor1]) < 0) {\n array[dest--] = array[cursor1--];\n count1++;\n count2 = 0;\n if (--length1 === 0) {\n exit = true;\n break;\n }\n } else {\n array[dest--] = tmp[cursor2--];\n count2++;\n count1 = 0;\n if (--length2 === 1) {\n exit = true;\n break;\n }\n }\n } while ((count1 | count2) < minGallop);\n\n if (exit) {\n break;\n }\n\n do {\n count1 = length1 - gallopRight(tmp[cursor2], array, start1, length1, length1 - 1, compare);\n\n if (count1 !== 0) {\n dest -= count1;\n cursor1 -= count1;\n length1 -= count1;\n customDest = dest + 1;\n customCursor = cursor1 + 1;\n\n for (i = count1 - 1; i >= 0; i--) {\n array[customDest + i] = array[customCursor + i];\n }\n\n if (length1 === 0) {\n exit = true;\n break;\n }\n }\n\n array[dest--] = tmp[cursor2--];\n\n if (--length2 === 1) {\n exit = true;\n break;\n }\n\n count2 = length2 - gallopLeft(array[cursor1], tmp, 0, length2, length2 - 1, compare);\n\n if (count2 !== 0) {\n dest -= count2;\n cursor2 -= count2;\n length2 -= count2;\n customDest = dest + 1;\n customCursor = cursor2 + 1;\n\n for (i = 0; i < count2; i++) {\n array[customDest + i] = tmp[customCursor + i];\n }\n\n if (length2 <= 1) {\n exit = true;\n break;\n }\n }\n\n array[dest--] = array[cursor1--];\n\n if (--length1 === 0) {\n exit = true;\n break;\n }\n\n minGallop--;\n } while (count1 >= DEFAULT_MIN_GALLOPING || count2 >= DEFAULT_MIN_GALLOPING);\n\n if (exit) {\n break;\n }\n\n if (minGallop < 0) {\n minGallop = 0;\n }\n\n minGallop += 2;\n }\n\n this.minGallop = minGallop;\n\n if (minGallop < 1) {\n this.minGallop = 1;\n }\n\n if (length2 === 1) {\n dest -= length1;\n cursor1 -= length1;\n customDest = dest + 1;\n customCursor = cursor1 + 1;\n\n for (i = length1 - 1; i >= 0; i--) {\n array[customDest + i] = array[customCursor + i];\n }\n\n array[dest] = tmp[cursor2];\n } else if (length2 === 0) {\n throw new Error('mergeHigh preconditions were not respected');\n } else {\n customCursor = dest - (length2 - 1);\n for (i = 0; i < length2; i++) {\n array[customCursor + i] = tmp[i];\n }\n }\n };\n\n return TimSort;\n })();\n\n function sort(array, compare, lo, hi) {\n if (!Array.isArray(array)) {\n throw new TypeError('Can only sort arrays');\n }\n\n if (!compare) {\n compare = alphabeticalCompare;\n } else if (typeof compare !== 'function') {\n hi = lo;\n lo = compare;\n compare = alphabeticalCompare;\n }\n\n if (!lo) {\n lo = 0;\n }\n if (!hi) {\n hi = array.length;\n }\n\n var remaining = hi - lo;\n\n if (remaining < 2) {\n return;\n }\n\n var runLength = 0;\n\n if (remaining < DEFAULT_MIN_MERGE) {\n runLength = makeAscendingRun(array, lo, hi, compare);\n binaryInsertionSort(array, lo, hi, lo + runLength, compare);\n return;\n }\n\n var ts = new TimSort(array, compare);\n\n var minRun = minRunLength(remaining);\n\n do {\n runLength = makeAscendingRun(array, lo, hi, compare);\n if (runLength < minRun) {\n var force = remaining;\n if (force > minRun) {\n force = minRun;\n }\n\n binaryInsertionSort(array, lo, lo + force, lo + runLength, compare);\n runLength = force;\n }\n\n ts.pushRun(lo, runLength);\n ts.mergeRuns();\n\n remaining -= runLength;\n lo += runLength;\n } while (remaining !== 0);\n\n ts.forceMergeRuns();\n }\n});\n","module.exports = require('./build/timsort.js');","/**\n * Helper classes for LayoutEngine.\n *\n * Strategy pattern for usage of direction methods for hierarchical layouts.\n */\nimport TimSort from 'timsort';\n\n\n/**\n * Interface definition for direction strategy classes.\n *\n * This class describes the interface for the Strategy\n * pattern classes used to differentiate horizontal and vertical\n * direction of hierarchical results.\n *\n * For a given direction, one coordinate will be 'fixed', meaning that it is\n * determined by level.\n * The other coordinate is 'unfixed', meaning that the nodes on a given level\n * can still move along that coordinate. So:\n *\n * - `vertical` layout: `x` unfixed, `y` fixed per level\n * - `horizontal` layout: `x` fixed per level, `y` unfixed\n *\n * The local methods are stubs and should be regarded as abstract.\n * Derived classes **must** implement all the methods themselves.\n *\n * @private\n */\nclass DirectionInterface {\n /** @ignore **/\n abstract() {\n throw new Error(\"Can't instantiate abstract class!\");\n }\n\n /**\n * This is a dummy call which is used to suppress the jsdoc errors of type:\n *\n * \"'param' is assigned a value but never used\"\n *\n * @ignore\n **/\n fake_use() {\n // Do nothing special\n }\n\n /**\n * Type to use to translate dynamic curves to, in the case of hierarchical layout.\n * Dynamic curves do not work for these.\n *\n * The value should be perpendicular to the actual direction of the layout.\n *\n * @return {string} Direction, either 'vertical' or 'horizontal'\n */\n curveType() { return this.abstract(); }\n\n\n /**\n * Return the value of the coordinate that is not fixed for this direction.\n *\n * @param {Node} node The node to read\n * @return {number} Value of the unfixed coordinate\n */\n getPosition(node) { this.fake_use(node); return this.abstract(); }\n\n\n /**\n * Set the value of the coordinate that is not fixed for this direction.\n *\n * @param {Node} node The node to adjust\n * @param {number} position\n * @param {number} [level] if specified, the hierarchy level that this node should be fixed to\n */\n setPosition(node, position, level = undefined) { this.fake_use(node, position, level); this.abstract(); }\n\n\n /**\n * Get the width of a tree.\n *\n * A `tree` here is a subset of nodes within the network which are not connected to other nodes,\n * only among themselves. In essence, it is a sub-network.\n *\n * @param {number} index The index number of a tree\n * @return {number} the width of a tree in the view coordinates\n */\n getTreeSize(index) { this.fake_use(index); return this.abstract(); }\n\n\n /**\n * Sort array of nodes on the unfixed coordinates.\n *\n * **Note:** chrome has non-stable sorting implementation, which\n * has a tendency to change the order of the array items,\n * even if the custom sort function returns 0.\n *\n * For this reason, an external sort implementation is used,\n * which has the added benefit of being faster than the standard\n * platforms implementation. This has been verified on `node.js`,\n * `firefox` and `chrome` (all linux).\n *\n * @param {Array.} nodeArray array of nodes to sort\n */\n sort(nodeArray) { this.fake_use(nodeArray); this.abstract(); }\n\n\n /**\n * Assign the fixed coordinate of the node to the given level\n *\n * @param {Node} node The node to adjust\n * @param {number} level The level to fix to\n */\n fix(node, level) { this.fake_use(node, level); this.abstract(); }\n\n\n /**\n * Add an offset to the unfixed coordinate of the given node. \n *\n * @param {NodeId} nodeId Id of the node to adjust\n * @param {number} diff Offset to add to the unfixed coordinate\n */\n shift(nodeId, diff) { this.fake_use(nodeId, diff); this.abstract(); }\n}\n\n\n/**\n * Vertical Strategy\n *\n * Coordinate `y` is fixed on levels, coordinate `x` is unfixed.\n *\n * @extends DirectionInterface\n * @private\n */\nclass VerticalStrategy extends DirectionInterface {\n /**\n * Constructor\n *\n * @param {Object} layout reference to the parent LayoutEngine instance.\n */\n constructor(layout) {\n super();\n this.layout = layout;\n }\n\n /** @inheritdoc */\n curveType() {\n return 'horizontal';\n }\n\n /** @inheritdoc */\n getPosition(node) {\n return node.x;\n }\n\n /** @inheritdoc */\n setPosition(node, position, level = undefined) {\n if (level !== undefined) {\n this.layout.hierarchical.addToOrdering(node, level);\n }\n node.x = position;\n }\n\n /** @inheritdoc */\n getTreeSize(index) {\n let res = this.layout.hierarchical.getTreeSize(this.layout.body.nodes, index);\n return {min: res.min_x, max: res.max_x};\n }\n\n /** @inheritdoc */\n sort(nodeArray) {\n TimSort.sort(nodeArray, function(a, b) {\n return a.x - b.x;\n });\n }\n\n /** @inheritdoc */\n fix(node, level) {\n node.y = this.layout.options.hierarchical.levelSeparation * level;\n node.options.fixed.y = true;\n }\n\n /** @inheritdoc */\n shift(nodeId, diff) {\n this.layout.body.nodes[nodeId].x += diff;\n }\n}\n\n\n/**\n * Horizontal Strategy\n *\n * Coordinate `x` is fixed on levels, coordinate `y` is unfixed.\n *\n * @extends DirectionInterface\n * @private\n */\nclass HorizontalStrategy extends DirectionInterface {\n /**\n * Constructor\n *\n * @param {Object} layout reference to the parent LayoutEngine instance.\n */\n constructor(layout) {\n super();\n this.layout = layout;\n }\n\n /** @inheritdoc */\n curveType() {\n return 'vertical';\n }\n\n /** @inheritdoc */\n getPosition(node) {\n return node.y;\n }\n\n /** @inheritdoc */\n setPosition(node, position, level = undefined) {\n if (level !== undefined) {\n this.layout.hierarchical.addToOrdering(node, level);\n }\n node.y = position;\n }\n\n /** @inheritdoc */\n getTreeSize(index) {\n let res = this.layout.hierarchical.getTreeSize(this.layout.body.nodes, index);\n return {min: res.min_y, max: res.max_y};\n }\n\n /** @inheritdoc */\n sort(nodeArray) {\n TimSort.sort(nodeArray, function(a, b) {\n return a.y - b.y;\n });\n }\n\n /** @inheritdoc */\n fix(node, level) {\n node.x = this.layout.options.hierarchical.levelSeparation * level;\n node.options.fixed.x = true;\n }\n\n /** @inheritdoc */\n shift(nodeId, diff) {\n this.layout.body.nodes[nodeId].y += diff;\n }\n}\n\n\nexport {HorizontalStrategy, VerticalStrategy};\n","/**\n * There's a mix-up with terms in the code. Following are the formal definitions:\n *\n * tree - a strict hierarchical network, i.e. every node has at most one parent\n * forest - a collection of trees. These distinct trees are thus not connected.\n *\n * So:\n * - in a network that is not a tree, there exist nodes with multiple parents.\n * - a network consisting of unconnected sub-networks, of which at least one\n * is not a tree, is not a forest.\n *\n * In the code, the definitions are:\n *\n * tree - any disconnected sub-network, strict hierarchical or not.\n * forest - a bunch of these sub-networks\n *\n * The difference between tree and not-tree is important in the code, notably within\n * to the block-shifting algorithm. The algorithm assumes formal trees and fails\n * for not-trees, often in a spectacular manner (search for 'exploding network' in the issues).\n *\n * In order to distinguish the definitions in the following code, the adjective 'formal' is\n * used. If 'formal' is absent, you must assume the non-formal definition.\n *\n * ----------------------------------------------------------------------------------\n * NOTES\n * =====\n *\n * A hierarchical layout is a different thing from a hierarchical network.\n * The layout is a way to arrange the nodes in the view; this can be done\n * on non-hierarchical networks as well. The converse is also possible.\n */\n'use strict';\nimport TimSort from 'timsort';\nimport util from 'vis-util';\nimport NetworkUtil from '../NetworkUtil';\nimport { HorizontalStrategy, VerticalStrategy } from './components/DirectionStrategy.js';\n\n\n/**\n * Container for derived data on current network, relating to hierarchy.\n *\n * @private\n */\nclass HierarchicalStatus {\n /**\n * @ignore\n */\n constructor() {\n this.childrenReference = {}; // child id's per node id\n this.parentReference = {}; // parent id's per node id\n this.trees = {}; // tree id per node id; i.e. to which tree does given node id belong\n\n this.distributionOrdering = {}; // The nodes per level, in the display order\n this.levels = {}; // hierarchy level per node id\n this.distributionIndex = {}; // The position of the node in the level sorting order, per node id.\n\n this.isTree = false; // True if current network is a formal tree \n this.treeIndex = -1; // Highest tree id in current network.\n }\n\n /**\n * Add the relation between given nodes to the current state.\n *\n * @param {Node.id} parentNodeId\n * @param {Node.id} childNodeId\n */\n addRelation(parentNodeId, childNodeId) {\n if (this.childrenReference[parentNodeId] === undefined) {\n this.childrenReference[parentNodeId] = [];\n }\n this.childrenReference[parentNodeId].push(childNodeId);\n\n if (this.parentReference[childNodeId] === undefined) {\n this.parentReference[childNodeId] = [];\n }\n this.parentReference[childNodeId].push(parentNodeId);\n }\n\n\n /**\n * Check if the current state is for a formal tree or formal forest.\n *\n * This is the case if every node has at most one parent.\n *\n * Pre: parentReference init'ed properly for current network\n */\n checkIfTree() {\n for (let i in this.parentReference) {\n if (this.parentReference[i].length > 1) {\n this.isTree = false;\n return;\n }\n }\n\n this.isTree = true;\n }\n\n\n /**\n * Return the number of separate trees in the current network.\n * @returns {number}\n */\n numTrees() {\n return (this.treeIndex + 1); // This assumes the indexes are assigned consecitively\n }\n\n\n /**\n * Assign a tree id to a node\n * @param {Node} node\n * @param {string|number} treeId\n */\n setTreeIndex(node, treeId) {\n if (treeId === undefined) return; // Don't bother\n\n if (this.trees[node.id] === undefined) {\n this.trees[node.id] = treeId;\n this.treeIndex = Math.max(treeId, this.treeIndex);\n }\n }\n\n\n /**\n * Ensure level for given id is defined.\n *\n * Sets level to zero for given node id if not already present\n *\n * @param {Node.id} nodeId\n */\n ensureLevel(nodeId) {\n if (this.levels[nodeId] === undefined) {\n this.levels[nodeId] = 0;\n }\n }\n\n\n /**\n * get the maximum level of a branch.\n *\n * TODO: Never entered; find a test case to test this!\n * @param {Node.id} nodeId\n * @returns {number}\n */\n getMaxLevel(nodeId) {\n let accumulator = {};\n\n let _getMaxLevel = (nodeId) => {\n if (accumulator[nodeId] !== undefined) {\n return accumulator[nodeId];\n }\n let level = this.levels[nodeId];\n if (this.childrenReference[nodeId]) {\n let children = this.childrenReference[nodeId];\n if (children.length > 0) {\n for (let i = 0; i < children.length; i++) {\n level = Math.max(level,_getMaxLevel(children[i]));\n }\n }\n }\n accumulator[nodeId] = level;\n return level;\n };\n\n return _getMaxLevel(nodeId);\n }\n\n\n /**\n *\n * @param {Node} nodeA\n * @param {Node} nodeB\n */\n levelDownstream(nodeA, nodeB) {\n if (this.levels[nodeB.id] === undefined) {\n // set initial level\n if (this.levels[nodeA.id] === undefined) {\n this.levels[nodeA.id] = 0;\n }\n // set level\n this.levels[nodeB.id] = this.levels[nodeA.id] + 1;\n }\n }\n\n\n /**\n * Small util method to set the minimum levels of the nodes to zero.\n *\n * @param {Array.} nodes\n */\n setMinLevelToZero(nodes) {\n let minLevel = 1e9;\n // get the minimum level\n for (let nodeId in nodes) {\n if (nodes.hasOwnProperty(nodeId)) {\n if (this.levels[nodeId] !== undefined) {\n minLevel = Math.min(this.levels[nodeId], minLevel);\n }\n }\n }\n\n // subtract the minimum from the set so we have a range starting from 0\n for (let nodeId in nodes) {\n if (nodes.hasOwnProperty(nodeId)) {\n if (this.levels[nodeId] !== undefined) {\n this.levels[nodeId] -= minLevel;\n }\n }\n }\n }\n\n\n /**\n * Get the min and max xy-coordinates of a given tree\n *\n * @param {Array.} nodes\n * @param {number} index\n * @returns {{min_x: number, max_x: number, min_y: number, max_y: number}}\n */\n getTreeSize(nodes, index) {\n let min_x = 1e9;\n let max_x = -1e9;\n let min_y = 1e9;\n let max_y = -1e9;\n\n for (let nodeId in this.trees) {\n if (this.trees.hasOwnProperty(nodeId)) {\n if (this.trees[nodeId] === index) {\n let node = nodes[nodeId];\n min_x = Math.min(node.x, min_x);\n max_x = Math.max(node.x, max_x);\n min_y = Math.min(node.y, min_y);\n max_y = Math.max(node.y, max_y);\n }\n }\n }\n\n return {\n min_x: min_x,\n max_x: max_x,\n min_y: min_y,\n max_y: max_y\n };\n }\n\n\n /**\n * Check if two nodes have the same parent(s)\n *\n * @param {Node} node1\n * @param {Node} node2\n * @return {boolean} true if the two nodes have a same ancestor node, false otherwise\n */\n hasSameParent(node1, node2) {\n let parents1 = this.parentReference[node1.id];\n let parents2 = this.parentReference[node2.id];\n if (parents1 === undefined || parents2 === undefined) {\n return false;\n }\n\n for (let i = 0; i < parents1.length; i++) {\n for (let j = 0; j < parents2.length; j++) {\n if (parents1[i] == parents2[j]) {\n return true;\n }\n }\n }\n return false;\n }\n\n\n /**\n * Check if two nodes are in the same tree.\n *\n * @param {Node} node1\n * @param {Node} node2\n * @return {Boolean} true if this is so, false otherwise\n */\n inSameSubNetwork(node1, node2) {\n return (this.trees[node1.id] === this.trees[node2.id]);\n }\n\n\n /**\n * Get a list of the distinct levels in the current network\n *\n * @returns {Array}\n */\n getLevels() {\n return Object.keys(this.distributionOrdering);\n }\n\n\n /**\n * Add a node to the ordering per level\n *\n * @param {Node} node\n * @param {number} level\n */\n addToOrdering(node, level) {\n if (this.distributionOrdering[level] === undefined) {\n this.distributionOrdering[level] = [];\n }\n\n var isPresent = false;\n var curLevel = this.distributionOrdering[level];\n for (var n in curLevel) {\n //if (curLevel[n].id === node.id) {\n if (curLevel[n] === node) {\n isPresent = true;\n break;\n }\n }\n\n if (!isPresent) {\n this.distributionOrdering[level].push(node);\n this.distributionIndex[node.id] = this.distributionOrdering[level].length - 1;\n }\n }\n}\n\n/**\n * The Layout Engine\n */\nclass LayoutEngine {\n /**\n * @param {Object} body\n */\n constructor(body) {\n this.body = body;\n\n this.initialRandomSeed = Math.round(Math.random() * 1000000);\n this.randomSeed = this.initialRandomSeed;\n this.setPhysics = false;\n this.options = {};\n this.optionsBackup = {physics:{}};\n\n this.defaultOptions = {\n randomSeed: undefined,\n improvedLayout: true,\n hierarchical: {\n enabled:false,\n levelSeparation: 150,\n nodeSpacing: 100,\n treeSpacing: 200,\n blockShifting: true,\n edgeMinimization: true,\n parentCentralization: true,\n direction: 'UD', // UD, DU, LR, RL\n sortMethod: 'hubsize' // hubsize, directed\n }\n };\n util.extend(this.options, this.defaultOptions);\n this.bindEventListeners();\n }\n\n /**\n * Binds event listeners\n */\n bindEventListeners() {\n this.body.emitter.on('_dataChanged', () => {\n this.setupHierarchicalLayout();\n });\n this.body.emitter.on('_dataLoaded', () => {\n this.layoutNetwork();\n });\n this.body.emitter.on('_resetHierarchicalLayout', () => {\n this.setupHierarchicalLayout();\n });\n this.body.emitter.on('_adjustEdgesForHierarchicalLayout', () => {\n if (this.options.hierarchical.enabled !== true) {\n return;\n }\n // get the type of static smooth curve in case it is required\n let type = this.direction.curveType();\n\n // force all edges into static smooth curves.\n this.body.emitter.emit('_forceDisableDynamicCurves', type, false);\n });\n }\n\n /**\n *\n * @param {Object} options\n * @param {Object} allOptions\n * @returns {Object}\n */\n setOptions(options, allOptions) {\n if (options !== undefined) {\n let hierarchical = this.options.hierarchical;\n let prevHierarchicalState = hierarchical.enabled;\n util.selectiveDeepExtend([\"randomSeed\", \"improvedLayout\"],this.options, options);\n util.mergeOptions(this.options, options, 'hierarchical');\n if (options.randomSeed !== undefined) {this.initialRandomSeed = options.randomSeed;}\n\n if (hierarchical.enabled === true) {\n if (prevHierarchicalState === true) {\n // refresh the overridden options for nodes and edges.\n this.body.emitter.emit('refresh', true);\n }\n\n // make sure the level separation is the right way up\n if (hierarchical.direction === 'RL' || hierarchical.direction === 'DU') {\n if (hierarchical.levelSeparation > 0) {\n hierarchical.levelSeparation *= -1;\n }\n }\n else {\n if (hierarchical.levelSeparation < 0) {\n hierarchical.levelSeparation *= -1;\n }\n }\n\n this.setDirectionStrategy();\n\n this.body.emitter.emit('_resetHierarchicalLayout');\n // because the hierarchical system needs it's own physics and smooth curve settings,\n // we adapt the other options if needed.\n return this.adaptAllOptionsForHierarchicalLayout(allOptions);\n }\n else {\n if (prevHierarchicalState === true) {\n // refresh the overridden options for nodes and edges.\n this.body.emitter.emit('refresh');\n return util.deepExtend(allOptions,this.optionsBackup);\n }\n }\n }\n return allOptions;\n }\n\n /**\n *\n * @param {Object} allOptions\n * @returns {Object}\n */\n adaptAllOptionsForHierarchicalLayout(allOptions) {\n if (this.options.hierarchical.enabled === true) {\n let backupPhysics = this.optionsBackup.physics;\n\n // set the physics\n if (allOptions.physics === undefined || allOptions.physics === true) {\n allOptions.physics = {\n enabled: backupPhysics.enabled === undefined ? true : backupPhysics.enabled,\n solver :'hierarchicalRepulsion'\n };\n backupPhysics.enabled = backupPhysics.enabled === undefined ? true : backupPhysics.enabled;\n backupPhysics.solver = backupPhysics.solver || 'barnesHut';\n }\n else if (typeof allOptions.physics === 'object') {\n backupPhysics.enabled = allOptions.physics.enabled === undefined ? true : allOptions.physics.enabled;\n backupPhysics.solver = allOptions.physics.solver || 'barnesHut';\n allOptions.physics.solver = 'hierarchicalRepulsion';\n }\n else if (allOptions.physics !== false) {\n backupPhysics.solver ='barnesHut';\n allOptions.physics = {solver:'hierarchicalRepulsion'};\n }\n\n // get the type of static smooth curve in case it is required\n let type = this.direction.curveType();\n\n // disable smooth curves if nothing is defined. If smooth curves have been turned on,\n // turn them into static smooth curves.\n if (allOptions.edges === undefined) {\n this.optionsBackup.edges = {smooth:{enabled:true, type:'dynamic'}};\n allOptions.edges = {smooth: false};\n }\n else if (allOptions.edges.smooth === undefined) {\n this.optionsBackup.edges = {smooth:{enabled:true, type:'dynamic'}};\n allOptions.edges.smooth = false;\n }\n else {\n if (typeof allOptions.edges.smooth === 'boolean') {\n this.optionsBackup.edges = {smooth:allOptions.edges.smooth};\n allOptions.edges.smooth = {enabled: allOptions.edges.smooth, type:type}\n }\n else {\n let smooth = allOptions.edges.smooth;\n\n // allow custom types except for dynamic\n if (smooth.type !== undefined && smooth.type !== 'dynamic') {\n type = smooth.type;\n }\n\n // TODO: this is options merging; see if the standard routines can be used here.\n this.optionsBackup.edges = {\n smooth : smooth.enabled === undefined ? true : smooth.enabled,\n type : smooth.type === undefined ? 'dynamic': smooth.type,\n roundness : smooth.roundness === undefined ? 0.5 : smooth.roundness,\n forceDirection: smooth.forceDirection === undefined ? false : smooth.forceDirection\n };\n\n\n // NOTE: Copying an object to self; this is basically setting defaults for undefined variables\n allOptions.edges.smooth = {\n enabled : smooth.enabled === undefined ? true : smooth.enabled,\n type : type,\n roundness : smooth.roundness === undefined ? 0.5 : smooth.roundness,\n forceDirection: smooth.forceDirection === undefined ? false: smooth.forceDirection\n }\n }\n }\n\n // Force all edges into static smooth curves.\n // Only applies to edges that do not use the global options for smooth.\n this.body.emitter.emit('_forceDisableDynamicCurves', type);\n }\n\n return allOptions;\n }\n\n /**\n *\n * @returns {number}\n */\n seededRandom() {\n let x = Math.sin(this.randomSeed++) * 10000;\n return x - Math.floor(x);\n }\n\n /**\n *\n * @param {Array.} nodesArray\n */\n positionInitially(nodesArray) {\n if (this.options.hierarchical.enabled !== true) {\n this.randomSeed = this.initialRandomSeed;\n let radius = nodesArray.length + 50;\n for (let i = 0; i < nodesArray.length; i++) {\n let node = nodesArray[i];\n let angle = 2 * Math.PI * this.seededRandom();\n if (node.x === undefined) {\n node.x = radius * Math.cos(angle);\n }\n if (node.y === undefined) {\n node.y = radius * Math.sin(angle);\n }\n }\n }\n }\n\n\n /**\n * Use Kamada Kawai to position nodes. This is quite a heavy algorithm so if there are a lot of nodes we\n * cluster them first to reduce the amount.\n */\n layoutNetwork() {\n if (this.options.hierarchical.enabled !== true && this.options.improvedLayout === true) {\n let indices = this.body.nodeIndices;\n\n // first check if we should Kamada Kawai to layout. The threshold is if less than half of the visible\n // nodes have predefined positions we use this.\n let positionDefined = 0;\n for (let i = 0; i < indices.length; i++) {\n let node = this.body.nodes[indices[i]];\n if (node.predefinedPosition === true) {\n positionDefined += 1;\n }\n }\n\n // if less than half of the nodes have a predefined position we continue\n if (positionDefined < 0.5 * indices.length) {\n let MAX_LEVELS = 10;\n let level = 0;\n let clusterThreshold = 150; // TODO add this to options\n\n //\n // Define the options for the hidden cluster nodes\n // These options don't propagate outside the clustering phase.\n //\n // Some options are explicitly disabled, because they may be set in group or default node options.\n // The clusters are never displayed, so most explicit settings here serve as performance optimizations.\n //\n // The explicit setting of 'shape' is to avoid `shape: 'image'`; images are not passed to the hidden\n // cluster nodes, leading to an exception on creation.\n //\n // All settings here are performance related, except when noted otherwise.\n //\n let clusterOptions = {\n clusterNodeProperties:{\n shape: 'ellipse', // Bugfix: avoid type 'image', no images supplied\n label: '', // avoid label handling\n group: '', // avoid group handling\n font: {multi: false}, // avoid font propagation\n },\n clusterEdgeProperties:{\n label: '', // avoid label handling\n font: {multi: false}, // avoid font propagation\n smooth: {\n enabled: false // avoid drawing penalty for complex edges\n }\n }\n };\n\n // if there are a lot of nodes, we cluster before we run the algorithm.\n // NOTE: this part fails to find clusters for large scale-free networks, which should\n // be easily clusterable.\n // TODO: examine why this is so\n if (indices.length > clusterThreshold) {\n let startLength = indices.length;\n while (indices.length > clusterThreshold && level <= MAX_LEVELS) {\n //console.time(\"clustering\")\n level += 1;\n let before = indices.length;\n // if there are many nodes we do a hubsize cluster\n if (level % 3 === 0) {\n this.body.modules.clustering.clusterBridges(clusterOptions);\n }\n else {\n this.body.modules.clustering.clusterOutliers(clusterOptions);\n }\n let after = indices.length;\n if (before == after && level % 3 !== 0) {\n this._declusterAll();\n this.body.emitter.emit(\"_layoutFailed\");\n console.info(\"This network could not be positioned by this version of the improved layout algorithm.\"\n + \" Please disable improvedLayout for better performance.\");\n return;\n }\n //console.timeEnd(\"clustering\")\n //console.log(before,level,after);\n }\n // increase the size of the edges\n this.body.modules.kamadaKawai.setOptions({springLength: Math.max(150, 2 * startLength)})\n }\n if (level > MAX_LEVELS){\n console.info(\"The clustering didn't succeed within the amount of interations allowed,\"\n + \" progressing with partial result.\");\n }\n\n // position the system for these nodes and edges\n this.body.modules.kamadaKawai.solve(indices, this.body.edgeIndices, true);\n\n // shift to center point\n this._shiftToCenter();\n\n // perturb the nodes a little bit to force the physics to kick in\n let offset = 70;\n for (let i = 0; i < indices.length; i++) {\n // Only perturb the nodes that aren't fixed\n let node = this.body.nodes[indices[i]];\n if (node.predefinedPosition === false) {\n node.x += (0.5 - this.seededRandom())*offset;\n node.y += (0.5 - this.seededRandom())*offset;\n }\n }\n\n // uncluster all clusters\n this._declusterAll();\n\n // reposition all bezier nodes.\n this.body.emitter.emit(\"_repositionBezierNodes\");\n }\n }\n }\n\n /**\n * Move all the nodes towards to the center so gravitational pull wil not move the nodes away from view\n * @private\n */\n _shiftToCenter() {\n let range = NetworkUtil.getRangeCore(this.body.nodes, this.body.nodeIndices);\n let center = NetworkUtil.findCenter(range);\n for (let i = 0; i < this.body.nodeIndices.length; i++) {\n let node = this.body.nodes[this.body.nodeIndices[i]];\n node.x -= center.x;\n node.y -= center.y;\n }\n }\n\n /**\n * Expands all clusters\n * @private\n */\n _declusterAll() {\n let clustersPresent = true;\n while (clustersPresent === true) {\n clustersPresent = false;\n for (let i = 0; i < this.body.nodeIndices.length; i++) {\n if (this.body.nodes[this.body.nodeIndices[i]].isCluster === true) {\n clustersPresent = true;\n this.body.modules.clustering.openCluster(this.body.nodeIndices[i], {}, false);\n }\n }\n if (clustersPresent === true) {\n this.body.emitter.emit('_dataChanged');\n }\n }\n }\n\n /**\n *\n * @returns {number|*}\n */\n getSeed() {\n return this.initialRandomSeed;\n }\n\n /**\n * This is the main function to layout the nodes in a hierarchical way.\n * It checks if the node details are supplied correctly\n *\n * @private\n */\n setupHierarchicalLayout() {\n if (this.options.hierarchical.enabled === true && this.body.nodeIndices.length > 0) {\n // get the size of the largest hubs and check if the user has defined a level for a node.\n let node, nodeId;\n let definedLevel = false;\n let undefinedLevel = false;\n this.lastNodeOnLevel = {};\n this.hierarchical = new HierarchicalStatus();\n\n for (nodeId in this.body.nodes) {\n if (this.body.nodes.hasOwnProperty(nodeId)) {\n node = this.body.nodes[nodeId];\n if (node.options.level !== undefined) {\n definedLevel = true;\n this.hierarchical.levels[nodeId] = node.options.level;\n }\n else {\n undefinedLevel = true;\n }\n }\n }\n\n // if the user defined some levels but not all, alert and run without hierarchical layout\n if (undefinedLevel === true && definedLevel === true) {\n throw new Error('To use the hierarchical layout, nodes require either no predefined levels'\n + ' or levels have to be defined for all nodes.');\n }\n else {\n // define levels if undefined by the users. Based on hubsize.\n if (undefinedLevel === true) {\n let sortMethod = this.options.hierarchical.sortMethod;\n if (sortMethod === 'hubsize') {\n this._determineLevelsByHubsize();\n }\n else if (sortMethod === 'directed') {\n this._determineLevelsDirected();\n }\n else if (sortMethod === 'custom') {\n this._determineLevelsCustomCallback();\n }\n }\n\n\n // fallback for cases where there are nodes but no edges\n for (let nodeId in this.body.nodes) {\n if (this.body.nodes.hasOwnProperty(nodeId)) {\n this.hierarchical.ensureLevel(nodeId);\n }\n }\n // check the distribution of the nodes per level.\n let distribution = this._getDistribution();\n\n // get the parent children relations.\n this._generateMap();\n\n // place the nodes on the canvas.\n this._placeNodesByHierarchy(distribution);\n\n // condense the whitespace.\n this._condenseHierarchy();\n\n // shift to center so gravity does not have to do much\n this._shiftToCenter();\n }\n }\n }\n\n /**\n * @private\n */\n _condenseHierarchy() {\n // Global var in this scope to define when the movement has stopped.\n let stillShifting = false;\n let branches = {};\n // first we have some methods to help shifting trees around.\n // the main method to shift the trees\n let shiftTrees = () => {\n let treeSizes = getTreeSizes();\n let shiftBy = 0;\n for (let i = 0; i < treeSizes.length - 1; i++) {\n let diff = treeSizes[i].max - treeSizes[i+1].min;\n shiftBy += diff + this.options.hierarchical.treeSpacing;\n shiftTree(i + 1, shiftBy);\n }\n };\n\n // shift a single tree by an offset\n let shiftTree = (index, offset) => {\n let trees = this.hierarchical.trees;\n\n for (let nodeId in trees) {\n if (trees.hasOwnProperty(nodeId)) {\n if (trees[nodeId] === index) {\n this.direction.shift(nodeId, offset);\n }\n }\n }\n };\n\n // get the width of all trees\n let getTreeSizes = () => {\n let treeWidths = [];\n for (let i = 0; i < this.hierarchical.numTrees(); i++) {\n treeWidths.push(this.direction.getTreeSize(i));\n }\n return treeWidths;\n };\n\n\n // get a map of all nodes in this branch\n let getBranchNodes = (source, map) => {\n if (map[source.id]) {\n return;\n }\n map[source.id] = true;\n if (this.hierarchical.childrenReference[source.id]) {\n let children = this.hierarchical.childrenReference[source.id];\n if (children.length > 0) {\n for (let i = 0; i < children.length; i++) {\n getBranchNodes(this.body.nodes[children[i]], map);\n }\n }\n }\n };\n\n // get a min max width as well as the maximum movement space it has on either sides\n // we use min max terminology because width and height can interchange depending on the direction of the layout\n let getBranchBoundary = (branchMap, maxLevel = 1e9) => {\n let minSpace = 1e9;\n let maxSpace = 1e9;\n let min = 1e9;\n let max = -1e9;\n for (let branchNode in branchMap) {\n if (branchMap.hasOwnProperty(branchNode)) {\n let node = this.body.nodes[branchNode];\n let level = this.hierarchical.levels[node.id];\n let position = this.direction.getPosition(node);\n\n // get the space around the node.\n let [minSpaceNode, maxSpaceNode] = this._getSpaceAroundNode(node,branchMap);\n minSpace = Math.min(minSpaceNode, minSpace);\n maxSpace = Math.min(maxSpaceNode, maxSpace);\n\n // the width is only relevant for the levels two nodes have in common. This is why we filter on this.\n if (level <= maxLevel) {\n min = Math.min(position, min);\n max = Math.max(position, max);\n }\n }\n }\n\n return [min, max, minSpace, maxSpace];\n }\n\n\n // check what the maximum level is these nodes have in common.\n let getCollisionLevel = (node1, node2) => {\n let maxLevel1 = this.hierarchical.getMaxLevel(node1.id);\n let maxLevel2 = this.hierarchical.getMaxLevel(node2.id);\n return Math.min(maxLevel1, maxLevel2);\n };\n\n\n /**\n * Condense elements. These can be nodes or branches depending on the callback.\n *\n * @param {function} callback\n * @param {Array.} levels\n * @param {*} centerParents\n */\n let shiftElementsCloser = (callback, levels, centerParents) => {\n let hier = this.hierarchical;\n\n for (let i = 0; i < levels.length; i++) {\n let level = levels[i];\n let levelNodes = hier.distributionOrdering[level];\n if (levelNodes.length > 1) {\n for (let j = 0; j < levelNodes.length - 1; j++) {\n let node1 = levelNodes[j];\n let node2 = levelNodes[j+1];\n\n // NOTE: logic maintained as it was; if nodes have same ancestor,\n // then of course they are in the same sub-network.\n if (hier.hasSameParent(node1, node2) && hier.inSameSubNetwork(node1, node2) ) {\n callback(node1, node2, centerParents);\n }\n }\n }\n }\n };\n\n\n // callback for shifting branches\n let branchShiftCallback = (node1, node2, centerParent = false) => {\n //window.CALLBACKS.push(() => {\n let pos1 = this.direction.getPosition(node1);\n let pos2 = this.direction.getPosition(node2);\n let diffAbs = Math.abs(pos2 - pos1);\n let nodeSpacing = this.options.hierarchical.nodeSpacing;\n //console.log(\"NOW CHECKING:\", node1.id, node2.id, diffAbs);\n if (diffAbs > nodeSpacing) {\n let branchNodes1 = {};\n let branchNodes2 = {};\n\n getBranchNodes(node1, branchNodes1);\n getBranchNodes(node2, branchNodes2);\n\n // check the largest distance between the branches\n let maxLevel = getCollisionLevel(node1, node2);\n let branchNodeBoundary1 = getBranchBoundary(branchNodes1, maxLevel);\n let branchNodeBoundary2 = getBranchBoundary(branchNodes2, maxLevel);\n let max1 = branchNodeBoundary1[1];\n let min2 = branchNodeBoundary2[0];\n let minSpace2 = branchNodeBoundary2[2];\n\n //console.log(node1.id, getBranchBoundary(branchNodes1, maxLevel), node2.id,\n // getBranchBoundary(branchNodes2, maxLevel), maxLevel);\n let diffBranch = Math.abs(max1 - min2);\n if (diffBranch > nodeSpacing) {\n let offset = max1 - min2 + nodeSpacing;\n if (offset < -minSpace2 + nodeSpacing) {\n offset = -minSpace2 + nodeSpacing;\n //console.log(\"RESETTING OFFSET\", max1 - min2 + this.options.hierarchical.nodeSpacing, -minSpace2, offset);\n }\n if (offset < 0) {\n //console.log(\"SHIFTING\", node2.id, offset);\n this._shiftBlock(node2.id, offset);\n stillShifting = true;\n\n if (centerParent === true)\n this._centerParent(node2);\n }\n }\n\n }\n //this.body.emitter.emit(\"_redraw\");})\n };\n\n let minimizeEdgeLength = (iterations, node) => {\n //window.CALLBACKS.push(() => {\n // console.log(\"ts\",node.id);\n let nodeId = node.id;\n let allEdges = node.edges;\n let nodeLevel = this.hierarchical.levels[node.id];\n\n // gather constants\n let C2 = this.options.hierarchical.levelSeparation * this.options.hierarchical.levelSeparation;\n let referenceNodes = {};\n let aboveEdges = [];\n for (let i = 0; i < allEdges.length; i++) {\n let edge = allEdges[i];\n if (edge.toId != edge.fromId) {\n let otherNode = edge.toId == nodeId ? edge.from : edge.to;\n referenceNodes[allEdges[i].id] = otherNode;\n if (this.hierarchical.levels[otherNode.id] < nodeLevel) {\n aboveEdges.push(edge);\n }\n }\n }\n\n // differentiated sum of lengths based on only moving one node over one axis\n let getFx = (point, edges) => {\n let sum = 0;\n for (let i = 0; i < edges.length; i++) {\n if (referenceNodes[edges[i].id] !== undefined) {\n let a = this.direction.getPosition(referenceNodes[edges[i].id]) - point;\n sum += a / Math.sqrt(a * a + C2);\n }\n }\n return sum;\n };\n\n // doubly differentiated sum of lengths based on only moving one node over one axis\n let getDFx = (point, edges) => {\n let sum = 0;\n for (let i = 0; i < edges.length; i++) {\n if (referenceNodes[edges[i].id] !== undefined) {\n let a = this.direction.getPosition(referenceNodes[edges[i].id]) - point;\n sum -= (C2 * Math.pow(a * a + C2, -1.5));\n }\n }\n return sum;\n };\n\n let getGuess = (iterations, edges) => {\n let guess = this.direction.getPosition(node);\n // Newton's method for optimization\n let guessMap = {};\n for (let i = 0; i < iterations; i++) {\n let fx = getFx(guess, edges);\n let dfx = getDFx(guess, edges);\n\n // we limit the movement to avoid instability.\n let limit = 40;\n let ratio = Math.max(-limit, Math.min(limit, Math.round(fx/dfx)));\n guess = guess - ratio;\n // reduce duplicates\n if (guessMap[guess] !== undefined) {\n break;\n }\n guessMap[guess] = i;\n }\n return guess;\n };\n\n let moveBranch = (guess) => {\n // position node if there is space\n let nodePosition = this.direction.getPosition(node);\n\n // check movable area of the branch\n if (branches[node.id] === undefined) {\n let branchNodes = {};\n getBranchNodes(node, branchNodes);\n branches[node.id] = branchNodes;\n }\n let branchBoundary = getBranchBoundary(branches[node.id]);\n let minSpaceBranch = branchBoundary[2];\n let maxSpaceBranch = branchBoundary[3];\n\n let diff = guess - nodePosition;\n\n // check if we are allowed to move the node:\n let branchOffset = 0;\n if (diff > 0) {\n branchOffset = Math.min(diff, maxSpaceBranch - this.options.hierarchical.nodeSpacing);\n }\n else if (diff < 0) {\n branchOffset = -Math.min(-diff, minSpaceBranch - this.options.hierarchical.nodeSpacing);\n }\n\n if (branchOffset != 0) {\n //console.log(\"moving branch:\",branchOffset, maxSpaceBranch, minSpaceBranch)\n this._shiftBlock(node.id, branchOffset);\n //this.body.emitter.emit(\"_redraw\");\n stillShifting = true;\n }\n };\n\n let moveNode = (guess) => {\n let nodePosition = this.direction.getPosition(node);\n\n // position node if there is space\n let [minSpace, maxSpace] = this._getSpaceAroundNode(node);\n let diff = guess - nodePosition;\n // check if we are allowed to move the node:\n let newPosition = nodePosition;\n if (diff > 0) {\n newPosition = Math.min(nodePosition + (maxSpace - this.options.hierarchical.nodeSpacing), guess);\n }\n else if (diff < 0) {\n newPosition = Math.max(nodePosition - (minSpace - this.options.hierarchical.nodeSpacing), guess);\n }\n\n if (newPosition !== nodePosition) {\n //console.log(\"moving Node:\",diff, minSpace, maxSpace);\n this.direction.setPosition(node, newPosition);\n //this.body.emitter.emit(\"_redraw\");\n stillShifting = true;\n }\n };\n\n let guess = getGuess(iterations, aboveEdges);\n moveBranch(guess);\n guess = getGuess(iterations, allEdges);\n moveNode(guess);\n //})\n };\n\n // method to remove whitespace between branches. Because we do bottom up, we can center the parents.\n let minimizeEdgeLengthBottomUp = (iterations) => {\n let levels = this.hierarchical.getLevels();\n levels = levels.reverse();\n for (let i = 0; i < iterations; i++) {\n stillShifting = false;\n for (let j = 0; j < levels.length; j++) {\n let level = levels[j];\n let levelNodes = this.hierarchical.distributionOrdering[level];\n for (let k = 0; k < levelNodes.length; k++) {\n minimizeEdgeLength(1000, levelNodes[k]);\n }\n }\n if (stillShifting !== true) {\n //console.log(\"FINISHED minimizeEdgeLengthBottomUp IN \" + i);\n break;\n }\n }\n };\n\n // method to remove whitespace between branches. Because we do bottom up, we can center the parents.\n let shiftBranchesCloserBottomUp = (iterations) => {\n let levels = this.hierarchical.getLevels();\n levels = levels.reverse();\n for (let i = 0; i < iterations; i++) {\n stillShifting = false;\n shiftElementsCloser(branchShiftCallback, levels, true);\n if (stillShifting !== true) {\n //console.log(\"FINISHED shiftBranchesCloserBottomUp IN \" + (i+1));\n break;\n }\n }\n };\n\n // center all parents\n let centerAllParents = () => {\n for (let nodeId in this.body.nodes) {\n if (this.body.nodes.hasOwnProperty(nodeId))\n this._centerParent(this.body.nodes[nodeId]);\n }\n };\n\n // center all parents\n let centerAllParentsBottomUp = () => {\n let levels = this.hierarchical.getLevels();\n levels = levels.reverse();\n for (let i = 0; i < levels.length; i++) {\n let level = levels[i];\n let levelNodes = this.hierarchical.distributionOrdering[level];\n for (let j = 0; j < levelNodes.length; j++) {\n this._centerParent(levelNodes[j]);\n }\n }\n };\n\n // the actual work is done here.\n if (this.options.hierarchical.blockShifting === true) {\n shiftBranchesCloserBottomUp(5);\n centerAllParents();\n }\n\n // minimize edge length\n if (this.options.hierarchical.edgeMinimization === true) {\n minimizeEdgeLengthBottomUp(20);\n }\n\n if (this.options.hierarchical.parentCentralization === true) {\n centerAllParentsBottomUp()\n }\n\n shiftTrees();\n }\n\n /**\n * This gives the space around the node. IF a map is supplied, it will only check against nodes NOT in the map.\n * This is used to only get the distances to nodes outside of a branch.\n * @param {Node} node\n * @param {{Node.id: vis.Node}} map\n * @returns {number[]}\n * @private\n */\n _getSpaceAroundNode(node, map) {\n let useMap = true;\n if (map === undefined) {\n useMap = false;\n }\n let level = this.hierarchical.levels[node.id];\n if (level !== undefined) {\n let index = this.hierarchical.distributionIndex[node.id];\n let position = this.direction.getPosition(node);\n let ordering = this.hierarchical.distributionOrdering[level];\n let minSpace = 1e9;\n let maxSpace = 1e9;\n if (index !== 0) {\n let prevNode = ordering[index - 1];\n if ((useMap === true && map[prevNode.id] === undefined) || useMap === false) {\n let prevPos = this.direction.getPosition(prevNode);\n minSpace = position - prevPos;\n }\n }\n\n if (index != ordering.length - 1) {\n let nextNode = ordering[index + 1];\n if ((useMap === true && map[nextNode.id] === undefined) || useMap === false) {\n let nextPos = this.direction.getPosition(nextNode);\n maxSpace = Math.min(maxSpace, nextPos - position);\n }\n }\n\n return [minSpace, maxSpace];\n }\n else {\n return [0, 0];\n }\n }\n\n\n /**\n * We use this method to center a parent node and check if it does not cross other nodes when it does.\n * @param {Node} node\n * @private\n */\n _centerParent(node) {\n if (this.hierarchical.parentReference[node.id]) {\n let parents = this.hierarchical.parentReference[node.id];\n for (var i = 0; i < parents.length; i++) {\n let parentId = parents[i];\n let parentNode = this.body.nodes[parentId];\n let children = this.hierarchical.childrenReference[parentId];\n\n if (children !== undefined) {\n // get the range of the children\n let newPosition = this._getCenterPosition(children);\n\n let position = this.direction.getPosition(parentNode);\n let [minSpace, maxSpace] = this._getSpaceAroundNode(parentNode);\n let diff = position - newPosition;\n if ((diff < 0 && Math.abs(diff) < maxSpace - this.options.hierarchical.nodeSpacing) ||\n (diff > 0 && Math.abs(diff) < minSpace - this.options.hierarchical.nodeSpacing)) {\n this.direction.setPosition(parentNode, newPosition);\n }\n }\n }\n }\n }\n\n\n /**\n * This function places the nodes on the canvas based on the hierarchial distribution.\n *\n * @param {Object} distribution | obtained by the function this._getDistribution()\n * @private\n */\n _placeNodesByHierarchy(distribution) {\n this.positionedNodes = {};\n // start placing all the level 0 nodes first. Then recursively position their branches.\n for (let level in distribution) {\n if (distribution.hasOwnProperty(level)) {\n // sort nodes in level by position:\n let nodeArray = Object.keys(distribution[level]);\n nodeArray = this._indexArrayToNodes(nodeArray);\n this.direction.sort(nodeArray);\n let handledNodeCount = 0;\n\n for (let i = 0; i < nodeArray.length; i++) {\n let node = nodeArray[i];\n if (this.positionedNodes[node.id] === undefined) {\n let spacing = this.options.hierarchical.nodeSpacing;\n let pos = spacing * handledNodeCount;\n // We get the X or Y values we need and store them in pos and previousPos.\n // The get and set make sure we get X or Y\n if (handledNodeCount > 0) {\n pos = this.direction.getPosition(nodeArray[i-1]) + spacing;\n }\n this.direction.setPosition(node, pos, level);\n this._validatePositionAndContinue(node, level, pos);\n\n handledNodeCount++;\n }\n }\n }\n }\n }\n\n\n /**\n * This is a recursively called function to enumerate the branches from the largest hubs and place the nodes\n * on a X position that ensures there will be no overlap.\n *\n * @param {Node.id} parentId\n * @param {number} parentLevel\n * @private\n */\n _placeBranchNodes(parentId, parentLevel) {\n let childRef = this.hierarchical.childrenReference[parentId];\n\n // if this is not a parent, cancel the placing. This can happen with multiple parents to one child.\n if (childRef === undefined) {\n return;\n }\n\n // get a list of childNodes\n let childNodes = [];\n for (let i = 0; i < childRef.length; i++) {\n childNodes.push(this.body.nodes[childRef[i]]);\n }\n\n // use the positions to order the nodes.\n this.direction.sort(childNodes);\n\n // position the childNodes\n for (let i = 0; i < childNodes.length; i++) {\n let childNode = childNodes[i];\n let childNodeLevel = this.hierarchical.levels[childNode.id];\n // check if the child node is below the parent node and if it has already been positioned.\n if (childNodeLevel > parentLevel && this.positionedNodes[childNode.id] === undefined) {\n // get the amount of space required for this node. If parent the width is based on the amount of children.\n let spacing = this.options.hierarchical.nodeSpacing;\n let pos;\n\n // we get the X or Y values we need and store them in pos and previousPos.\n // The get and set make sure we get X or Y\n if (i === 0) {\n pos = this.direction.getPosition(this.body.nodes[parentId]);\n } else {\n pos = this.direction.getPosition(childNodes[i-1]) + spacing;\n }\n this.direction.setPosition(childNode, pos, childNodeLevel);\n this._validatePositionAndContinue(childNode, childNodeLevel, pos);\n }\n else {\n return;\n }\n }\n\n // center the parent nodes.\n let center = this._getCenterPosition(childNodes);\n this.direction.setPosition(this.body.nodes[parentId], center, parentLevel);\n }\n\n\n /**\n * This method checks for overlap and if required shifts the branch. It also keeps records of positioned nodes.\n * Finally it will call _placeBranchNodes to place the branch nodes.\n * @param {Node} node\n * @param {number} level\n * @param {number} pos\n * @private\n */\n _validatePositionAndContinue(node, level, pos) {\n // This method only works for formal trees and formal forests\n // Early exit if this is not the case\n if (!this.hierarchical.isTree) return;\n\n // if overlap has been detected, we shift the branch\n if (this.lastNodeOnLevel[level] !== undefined) {\n let previousPos = this.direction.getPosition(this.body.nodes[this.lastNodeOnLevel[level]]);\n if (pos - previousPos < this.options.hierarchical.nodeSpacing) {\n let diff = (previousPos + this.options.hierarchical.nodeSpacing) - pos;\n let sharedParent = this._findCommonParent(this.lastNodeOnLevel[level], node.id);\n this._shiftBlock(sharedParent.withChild, diff);\n }\n }\n\n this.lastNodeOnLevel[level] = node.id; // store change in position.\n this.positionedNodes[node.id] = true;\n this._placeBranchNodes(node.id, level);\n }\n\n /**\n * Receives an array with node indices and returns an array with the actual node references.\n * Used for sorting based on node properties.\n * @param {Array.} idArray\n * @returns {Array.}\n */\n _indexArrayToNodes(idArray) {\n let array = [];\n for (let i = 0; i < idArray.length; i++) {\n array.push(this.body.nodes[idArray[i]])\n }\n return array;\n }\n\n /**\n * This function get the distribution of levels based on hubsize\n *\n * @returns {Object}\n * @private\n */\n _getDistribution() {\n let distribution = {};\n let nodeId, node;\n\n // we fix Y because the hierarchy is vertical,\n // we fix X so we do not give a node an x position for a second time.\n // the fix of X is removed after the x value has been set.\n for (nodeId in this.body.nodes) {\n if (this.body.nodes.hasOwnProperty(nodeId)) {\n node = this.body.nodes[nodeId];\n let level = this.hierarchical.levels[nodeId] === undefined ? 0 : this.hierarchical.levels[nodeId];\n this.direction.fix(node, level);\n if (distribution[level] === undefined) {\n distribution[level] = {};\n }\n distribution[level][nodeId] = node;\n }\n }\n return distribution;\n }\n\n\n /**\n * Return the active (i.e. visible) edges for this node\n *\n * @param {Node} node\n * @returns {Array.} Array of edge instances\n * @private\n */\n _getActiveEdges(node) {\n let result = [];\n\n util.forEach(node.edges, (edge) => { \n if (this.body.edgeIndices.indexOf(edge.id) !== -1) {\n result.push(edge);\n }\n });\n\n return result;\n }\n\n\n /**\n * Get the hubsizes for all active nodes.\n *\n * @returns {number}\n * @private\n */\n _getHubSizes() {\n let hubSizes = {};\n let nodeIds = this.body.nodeIndices;\n\n util.forEach(nodeIds, (nodeId) => { \n let node = this.body.nodes[nodeId];\n let hubSize = this._getActiveEdges(node).length;\n hubSizes[hubSize] = true;\n });\n\n // Make an array of the size sorted descending\n let result = [];\n util.forEach(hubSizes, (size) => { \n result.push(Number(size));\n });\n\n TimSort.sort(result, function(a, b) {\n return b - a;\n });\n\n return result;\n }\n\n\n /**\n * this function allocates nodes in levels based on the recursive branching from the largest hubs.\n *\n * @private\n */\n _determineLevelsByHubsize() {\n let levelDownstream = (nodeA, nodeB) => {\n this.hierarchical.levelDownstream(nodeA, nodeB);\n }\n\n let hubSizes = this._getHubSizes();\n\n for (let i = 0; i < hubSizes.length; ++i ) {\n let hubSize = hubSizes[i];\n if (hubSize === 0) break;\n\n util.forEach(this.body.nodeIndices, (nodeId) => { \n let node = this.body.nodes[nodeId];\n\n if (hubSize === this._getActiveEdges(node).length) {\n this._crawlNetwork(levelDownstream, nodeId);\n }\n });\n }\n }\n\n\n /**\n * TODO: release feature\n * TODO: Determine if this feature is needed at all\n *\n * @private\n */\n _determineLevelsCustomCallback() {\n let minLevel = 100000;\n\n // TODO: this should come from options.\n let customCallback = function(nodeA, nodeB, edge) { // eslint-disable-line no-unused-vars\n\n };\n\n // TODO: perhaps move to HierarchicalStatus.\n // But I currently don't see the point, this method is not used.\n let levelByDirection = (nodeA, nodeB, edge) => {\n let levelA = this.hierarchical.levels[nodeA.id];\n // set initial level\n if (levelA === undefined) { levelA = this.hierarchical.levels[nodeA.id] = minLevel;}\n\n let diff = customCallback(\n NetworkUtil.cloneOptions(nodeA,'node'),\n NetworkUtil.cloneOptions(nodeB,'node'),\n NetworkUtil.cloneOptions(edge,'edge')\n );\n\n this.hierarchical.levels[nodeB.id] = levelA + diff;\n };\n\n this._crawlNetwork(levelByDirection);\n this.hierarchical.setMinLevelToZero(this.body.nodes);\n }\n\n /**\n * Allocate nodes in levels based on the direction of the edges.\n *\n * @private\n */\n _determineLevelsDirected() {\n let minLevel = 10000;\n\n /**\n * Check if there is an edge going the opposite direction for given edge\n *\n * @param {Edge} edge edge to check\n * @returns {boolean} true if there's another edge going into the opposite direction\n */\n let isBidirectional = (edge) => {\n util.forEach(this.body.edges, (otherEdge) => {\n if (otherEdge.toId === edge.fromId && otherEdge.fromId === edge.toId) {\n return true;\n }\n });\n\n return false;\n };\n\n\n let levelByDirection = (nodeA, nodeB, edge) => {\n let levelA = this.hierarchical.levels[nodeA.id];\n let levelB = this.hierarchical.levels[nodeB.id];\n\n if (isBidirectional(edge) && levelA !== undefined && levelB !== undefined) {\n // Don't redo the level determination if already done in this case.\n return;\n }\n\n // set initial level\n if (levelA === undefined) { levelA = this.hierarchical.levels[nodeA.id] = minLevel;}\n if (edge.toId == nodeB.id) {\n this.hierarchical.levels[nodeB.id] = levelA + 1;\n }\n else {\n this.hierarchical.levels[nodeB.id] = levelA - 1;\n }\n };\n\n this._crawlNetwork(levelByDirection);\n this.hierarchical.setMinLevelToZero(this.body.nodes);\n }\n\n\n /**\n * Update the bookkeeping of parent and child.\n * @private\n */\n _generateMap() {\n let fillInRelations = (parentNode, childNode) => {\n if (this.hierarchical.levels[childNode.id] > this.hierarchical.levels[parentNode.id]) {\n this.hierarchical.addRelation(parentNode.id, childNode.id);\n }\n };\n\n this._crawlNetwork(fillInRelations);\n this.hierarchical.checkIfTree();\n }\n\n\n /**\n * Crawl over the entire network and use a callback on each node couple that is connected to each other.\n * @param {function} [callback=function(){}] | will receive nodeA, nodeB and the connecting edge. A and B are distinct.\n * @param {Node.id} startingNodeId\n * @private\n */\n _crawlNetwork(callback = function() {}, startingNodeId) {\n let progress = {};\n\n let crawler = (node, tree) => {\n if (progress[node.id] === undefined) {\n this.hierarchical.setTreeIndex(node, tree);\n\n progress[node.id] = true;\n let childNode;\n let edges = this._getActiveEdges(node);\n for (let i = 0; i < edges.length; i++) {\n let edge = edges[i];\n if (edge.connected === true) {\n if (edge.toId == node.id) { // Not '===' because id's can be string and numeric\n childNode = edge.from;\n }\n else {\n childNode = edge.to;\n }\n\n if (node.id != childNode.id) { // Not '!==' because id's can be string and numeric\n callback(node, childNode, edge);\n crawler(childNode, tree);\n }\n }\n }\n }\n };\n\n\n if (startingNodeId === undefined) {\n // Crawl over all nodes\n let treeIndex = 0; // Serves to pass a unique id for the current distinct tree\n\n for (let i = 0; i < this.body.nodeIndices.length; i++) {\n let nodeId = this.body.nodeIndices[i];\n\n if (progress[nodeId] === undefined) {\n let node = this.body.nodes[nodeId];\n crawler(node, treeIndex);\n treeIndex += 1;\n }\n }\n }\n else {\n // Crawl from the given starting node\n let node = this.body.nodes[startingNodeId];\n if (node === undefined) {\n console.error(\"Node not found:\", startingNodeId);\n return;\n }\n crawler(node);\n }\n }\n\n\n /**\n * Shift a branch a certain distance\n * @param {Node.id} parentId\n * @param {number} diff\n * @private\n */\n _shiftBlock(parentId, diff) {\n let progress = {};\n let shifter = (parentId) => {\n if (progress[parentId]) {\n return;\n }\n progress[parentId] = true;\n this.direction.shift(parentId, diff);\n\n let childRef = this.hierarchical.childrenReference[parentId];\n if (childRef !== undefined) {\n for (let i = 0; i < childRef.length; i++) {\n shifter(childRef[i]);\n }\n }\n };\n shifter(parentId);\n }\n\n\n /**\n * Find a common parent between branches.\n * @param {Node.id} childA\n * @param {Node.id} childB\n * @returns {{foundParent, withChild}}\n * @private\n */\n _findCommonParent(childA,childB) {\n let parents = {};\n let iterateParents = (parents,child) => {\n let parentRef = this.hierarchical.parentReference[child];\n if (parentRef !== undefined) {\n for (let i = 0; i < parentRef.length; i++) {\n let parent = parentRef[i];\n parents[parent] = true;\n iterateParents(parents, parent)\n }\n }\n };\n let findParent = (parents, child) => {\n let parentRef = this.hierarchical.parentReference[child];\n if (parentRef !== undefined) {\n for (let i = 0; i < parentRef.length; i++) {\n let parent = parentRef[i];\n if (parents[parent] !== undefined) {\n return {foundParent:parent, withChild:child};\n }\n let branch = findParent(parents, parent);\n if (branch.foundParent !== null) {\n return branch;\n }\n }\n }\n return {foundParent:null, withChild:child};\n };\n\n iterateParents(parents, childA);\n return findParent(parents, childB);\n }\n\n\n /**\n * Set the strategy pattern for handling the coordinates given the current direction.\n *\n * The individual instances contain all the operations and data specific to a layout direction.\n *\n * @param {Node} node\n * @param {{x: number, y: number}} position\n * @param {number} level\n * @param {boolean} [doNotUpdate=false]\n * @private\n */\n setDirectionStrategy() {\n var isVertical = (this.options.hierarchical.direction === 'UD'\n || this.options.hierarchical.direction === 'DU');\n\n if(isVertical) {\n this.direction = new VerticalStrategy(this); \n } else {\n this.direction = new HorizontalStrategy(this); \n }\n }\n\n\n /**\n * Determine the center position of a branch from the passed list of child nodes\n *\n * This takes into account the positions of all the child nodes.\n * @param {Array.} childNodes Array of either child nodes or node id's\n * @return {number}\n * @private\n */\n _getCenterPosition(childNodes) {\n let minPos = 1e9;\n let maxPos = -1e9;\n\n for (let i = 0; i < childNodes.length; i++) {\n let childNode;\n if (childNodes[i].id !== undefined) {\n childNode = childNodes[i];\n } else {\n let childNodeId = childNodes[i];\n childNode = this.body.nodes[childNodeId];\n }\n\n let position = this.direction.getPosition(childNode);\n minPos = Math.min(minPos, position);\n maxPos = Math.max(maxPos, position);\n }\n\n return 0.5 * (minPos + maxPos);\n }\n}\n\nexport default LayoutEngine;\n","import './ManipulationSystem.css';\n\nimport util from 'vis-util';\nimport Hammer from '../../module/hammer';\nimport hammerUtil from '../../hammerUtil';\n\n/**\n * Clears the toolbar div element of children\n *\n * @private\n */\nclass ManipulationSystem {\n /**\n * @param {Object} body\n * @param {Canvas} canvas\n * @param {SelectionHandler} selectionHandler\n */\n constructor(body, canvas, selectionHandler) {\n this.body = body;\n this.canvas = canvas;\n this.selectionHandler = selectionHandler;\n\n this.editMode = false;\n this.manipulationDiv = undefined;\n this.editModeDiv = undefined;\n this.closeDiv = undefined;\n\n this.manipulationHammers = [];\n this.temporaryUIFunctions = {};\n this.temporaryEventFunctions = [];\n\n this.touchTime = 0;\n this.temporaryIds = {nodes: [], edges:[]};\n this.guiEnabled = false;\n this.inMode = false;\n this.selectedControlNode = undefined;\n\n this.options = {};\n this.defaultOptions = {\n enabled: false,\n initiallyActive: false,\n addNode: true,\n addEdge: true,\n editNode: undefined,\n editEdge: true,\n deleteNode: true,\n deleteEdge: true,\n controlNodeStyle:{\n shape:'dot',\n size:6,\n color: {background: '#ff0000', border: '#3c3c3c', highlight: {background: '#07f968', border: '#3c3c3c'}},\n borderWidth: 2,\n borderWidthSelected: 2\n }\n };\n util.extend(this.options, this.defaultOptions);\n\n this.body.emitter.on('destroy', () => {this._clean();});\n this.body.emitter.on('_dataChanged',this._restore.bind(this));\n this.body.emitter.on('_resetData', this._restore.bind(this));\n }\n\n\n /**\n * If something changes in the data during editing, switch back to the initial datamanipulation state and close all edit modes.\n * @private\n */\n _restore() {\n if (this.inMode !== false) {\n if (this.options.initiallyActive === true) {\n this.enableEditMode();\n }\n else {\n this.disableEditMode();\n }\n }\n }\n\n /**\n * Set the Options\n *\n * @param {Object} options\n * @param {Object} allOptions\n * @param {Object} globalOptions\n */\n setOptions(options, allOptions, globalOptions) {\n if (allOptions !== undefined) {\n if (allOptions.locale !== undefined) {this.options.locale = allOptions.locale} else {this.options.locale = globalOptions.locale;}\n if (allOptions.locales !== undefined) {this.options.locales = allOptions.locales} else {this.options.locales = globalOptions.locales;}\n }\n\n if (options !== undefined) {\n if (typeof options === 'boolean') {\n this.options.enabled = options;\n }\n else {\n this.options.enabled = true;\n util.deepExtend(this.options, options);\n }\n if (this.options.initiallyActive === true) {\n this.editMode = true;\n }\n this._setup();\n }\n }\n\n\n /**\n * Enable or disable edit-mode. Draws the DOM required and cleans up after itself.\n *\n * @private\n */\n toggleEditMode() {\n if (this.editMode === true) {\n this.disableEditMode();\n }\n else {\n this.enableEditMode();\n }\n }\n\n\n /**\n * Enables Edit Mode\n */\n enableEditMode() {\n this.editMode = true;\n\n this._clean();\n if (this.guiEnabled === true) {\n this.manipulationDiv.style.display = 'block';\n this.closeDiv.style.display = 'block';\n this.editModeDiv.style.display = 'none';\n this.showManipulatorToolbar();\n }\n }\n\n /**\n * Disables Edit Mode\n */\n disableEditMode() {\n this.editMode = false;\n\n this._clean();\n if (this.guiEnabled === true) {\n this.manipulationDiv.style.display = 'none';\n this.closeDiv.style.display = 'none';\n this.editModeDiv.style.display = 'block';\n this._createEditButton();\n }\n }\n\n /**\n * Creates the main toolbar. Removes functions bound to the select event. Binds all the buttons of the toolbar.\n *\n * @private\n */\n showManipulatorToolbar() {\n // restore the state of any bound functions or events, remove control nodes, restore physics\n this._clean();\n\n // reset global variables\n this.manipulationDOM = {};\n\n // if the gui is enabled, draw all elements.\n if (this.guiEnabled === true) {\n // a _restore will hide these menus\n this.editMode = true;\n this.manipulationDiv.style.display = 'block';\n this.closeDiv.style.display = 'block';\n\n let selectedNodeCount = this.selectionHandler._getSelectedNodeCount();\n let selectedEdgeCount = this.selectionHandler._getSelectedEdgeCount();\n let selectedTotalCount = selectedNodeCount + selectedEdgeCount;\n let locale = this.options.locales[this.options.locale];\n let needSeperator = false;\n\n\n if (this.options.addNode !== false) {\n this._createAddNodeButton(locale);\n needSeperator = true;\n }\n if (this.options.addEdge !== false) {\n if (needSeperator === true) {\n this._createSeperator(1);\n } else {\n needSeperator = true;\n }\n this._createAddEdgeButton(locale);\n }\n\n if (selectedNodeCount === 1 && typeof this.options.editNode === 'function') {\n if (needSeperator === true) {\n this._createSeperator(2);\n } else {\n needSeperator = true;\n }\n this._createEditNodeButton(locale);\n }\n else if (selectedEdgeCount === 1 && selectedNodeCount === 0 && this.options.editEdge !== false) {\n if (needSeperator === true) {\n this._createSeperator(3);\n } else {\n needSeperator = true;\n }\n this._createEditEdgeButton(locale);\n }\n\n // remove buttons\n if (selectedTotalCount !== 0) {\n if (selectedNodeCount > 0 && this.options.deleteNode !== false) {\n if (needSeperator === true) {\n this._createSeperator(4);\n }\n this._createDeleteButton(locale);\n }\n else if (selectedNodeCount === 0 && this.options.deleteEdge !== false) {\n if (needSeperator === true) {\n this._createSeperator(4);\n }\n this._createDeleteButton(locale);\n }\n }\n\n // bind the close button\n this._bindHammerToDiv(this.closeDiv, this.toggleEditMode.bind(this));\n\n // refresh this bar based on what has been selected\n this._temporaryBindEvent('select', this.showManipulatorToolbar.bind(this));\n }\n\n // redraw to show any possible changes\n this.body.emitter.emit('_redraw');\n\n }\n\n\n /**\n * Create the toolbar for adding Nodes\n */\n addNodeMode() {\n // when using the gui, enable edit mode if it wasnt already.\n if (this.editMode !== true) {\n this.enableEditMode();\n }\n\n // restore the state of any bound functions or events, remove control nodes, restore physics\n this._clean();\n\n this.inMode = 'addNode';\n if (this.guiEnabled === true) {\n let locale = this.options.locales[this.options.locale];\n this.manipulationDOM = {};\n this._createBackButton(locale);\n this._createSeperator();\n this._createDescription(locale['addDescription'] || this.options.locales['en']['addDescription']);\n\n // bind the close button\n this._bindHammerToDiv(this.closeDiv, this.toggleEditMode.bind(this));\n }\n\n this._temporaryBindEvent('click', this._performAddNode.bind(this));\n }\n\n /**\n * call the bound function to handle the editing of the node. The node has to be selected.\n */\n editNode() {\n // when using the gui, enable edit mode if it wasnt already.\n if (this.editMode !== true) {\n this.enableEditMode();\n }\n\n // restore the state of any bound functions or events, remove control nodes, restore physics\n this._clean();\n let node = this.selectionHandler._getSelectedNode();\n if (node !== undefined) {\n this.inMode = 'editNode';\n if (typeof this.options.editNode === 'function') {\n if (node.isCluster !== true) {\n let data = util.deepExtend({}, node.options, false);\n data.x = node.x;\n data.y = node.y;\n\n if (this.options.editNode.length === 2) {\n this.options.editNode(data, (finalizedData) => {\n if (finalizedData !== null && finalizedData !== undefined && this.inMode === 'editNode') { // if for whatever reason the mode has changes (due to dataset change) disregard the callback) {\n this.body.data.nodes.getDataSet().update(finalizedData);\n }\n this.showManipulatorToolbar();\n });\n }\n else {\n throw new Error('The function for edit does not support two arguments (data, callback)');\n }\n }\n else {\n alert(this.options.locales[this.options.locale]['editClusterError'] || this.options.locales['en']['editClusterError']);\n }\n }\n else {\n throw new Error('No function has been configured to handle the editing of nodes.');\n }\n }\n else {\n this.showManipulatorToolbar();\n }\n }\n\n\n /**\n * create the toolbar to connect nodes\n */\n addEdgeMode() {\n // when using the gui, enable edit mode if it wasnt already.\n if (this.editMode !== true) {\n this.enableEditMode();\n }\n\n // restore the state of any bound functions or events, remove control nodes, restore physics\n this._clean();\n\n this.inMode = 'addEdge';\n if (this.guiEnabled === true) {\n let locale = this.options.locales[this.options.locale];\n this.manipulationDOM = {};\n this._createBackButton(locale);\n this._createSeperator();\n this._createDescription(locale['edgeDescription'] || this.options.locales['en']['edgeDescription']);\n\n // bind the close button\n this._bindHammerToDiv(this.closeDiv, this.toggleEditMode.bind(this));\n }\n\n // temporarily overload functions\n this._temporaryBindUI('onTouch', this._handleConnect.bind(this));\n this._temporaryBindUI('onDragEnd', this._finishConnect.bind(this));\n this._temporaryBindUI('onDrag', this._dragControlNode.bind(this));\n this._temporaryBindUI('onRelease', this._finishConnect.bind(this));\n this._temporaryBindUI('onDragStart',this._dragStartEdge.bind(this));\n this._temporaryBindUI('onHold', () => {});\n }\n\n /**\n * create the toolbar to edit edges\n */\n editEdgeMode() {\n // when using the gui, enable edit mode if it wasn't already.\n if (this.editMode !== true) {\n this.enableEditMode();\n }\n\n // restore the state of any bound functions or events, remove control nodes, restore physics\n this._clean();\n\n this.inMode = 'editEdge';\n if (typeof this.options.editEdge === 'object' && typeof this.options.editEdge.editWithoutDrag === \"function\") {\n this.edgeBeingEditedId = this.selectionHandler.getSelectedEdges()[0];\n if (this.edgeBeingEditedId !== undefined) {\n var edge = this.body.edges[this.edgeBeingEditedId];\n this._performEditEdge(edge.from, edge.to);\n return;\n }\n }\n if (this.guiEnabled === true) {\n let locale = this.options.locales[this.options.locale];\n this.manipulationDOM = {};\n this._createBackButton(locale);\n this._createSeperator();\n this._createDescription(locale['editEdgeDescription'] || this.options.locales['en']['editEdgeDescription']);\n\n // bind the close button\n this._bindHammerToDiv(this.closeDiv, this.toggleEditMode.bind(this));\n }\n\n this.edgeBeingEditedId = this.selectionHandler.getSelectedEdges()[0];\n if (this.edgeBeingEditedId !== undefined) {\n let edge = this.body.edges[this.edgeBeingEditedId];\n\n // create control nodes\n let controlNodeFrom = this._getNewTargetNode(edge.from.x, edge.from.y);\n let controlNodeTo = this._getNewTargetNode(edge.to.x, edge.to.y);\n\n this.temporaryIds.nodes.push(controlNodeFrom.id);\n this.temporaryIds.nodes.push(controlNodeTo.id);\n\n this.body.nodes[controlNodeFrom.id] = controlNodeFrom;\n this.body.nodeIndices.push(controlNodeFrom.id);\n this.body.nodes[controlNodeTo.id] = controlNodeTo;\n this.body.nodeIndices.push(controlNodeTo.id);\n\n // temporarily overload UI functions, cleaned up automatically because of _temporaryBindUI\n this._temporaryBindUI('onTouch', this._controlNodeTouch.bind(this)); // used to get the position\n this._temporaryBindUI('onTap', () => {}); // disabled\n this._temporaryBindUI('onHold', () => {}); // disabled\n this._temporaryBindUI('onDragStart', this._controlNodeDragStart.bind(this));// used to select control node\n this._temporaryBindUI('onDrag', this._controlNodeDrag.bind(this)); // used to drag control node\n this._temporaryBindUI('onDragEnd', this._controlNodeDragEnd.bind(this)); // used to connect or revert control nodes\n this._temporaryBindUI('onMouseMove', () => {}); // disabled\n\n // create function to position control nodes correctly on movement\n // automatically cleaned up because we use the temporary bind\n this._temporaryBindEvent('beforeDrawing', (ctx) => {\n let positions = edge.edgeType.findBorderPositions(ctx);\n if (controlNodeFrom.selected === false) {\n controlNodeFrom.x = positions.from.x;\n controlNodeFrom.y = positions.from.y;\n }\n if (controlNodeTo.selected === false) {\n controlNodeTo.x = positions.to.x;\n controlNodeTo.y = positions.to.y;\n }\n });\n\n this.body.emitter.emit('_redraw');\n }\n else {\n this.showManipulatorToolbar();\n }\n }\n\n /**\n * delete everything in the selection\n */\n deleteSelected() {\n // when using the gui, enable edit mode if it wasnt already.\n if (this.editMode !== true) {\n this.enableEditMode();\n }\n\n // restore the state of any bound functions or events, remove control nodes, restore physics\n this._clean();\n\n this.inMode = 'delete';\n let selectedNodes = this.selectionHandler.getSelectedNodes();\n let selectedEdges = this.selectionHandler.getSelectedEdges();\n let deleteFunction = undefined;\n if (selectedNodes.length > 0) {\n for (let i = 0; i < selectedNodes.length; i++) {\n if (this.body.nodes[selectedNodes[i]].isCluster === true) {\n alert(this.options.locales[this.options.locale]['deleteClusterError'] || this.options.locales['en']['deleteClusterError']);\n return;\n }\n }\n\n if (typeof this.options.deleteNode === 'function') {\n deleteFunction = this.options.deleteNode;\n }\n }\n else if (selectedEdges.length > 0) {\n if (typeof this.options.deleteEdge === 'function') {\n deleteFunction = this.options.deleteEdge;\n }\n }\n\n if (typeof deleteFunction === 'function') {\n let data = {nodes: selectedNodes, edges: selectedEdges};\n if (deleteFunction.length === 2) {\n deleteFunction(data, (finalizedData) => {\n if (finalizedData !== null && finalizedData !== undefined && this.inMode === 'delete') { // if for whatever reason the mode has changes (due to dataset change) disregard the callback) {\n this.body.data.edges.getDataSet().remove(finalizedData.edges);\n this.body.data.nodes.getDataSet().remove(finalizedData.nodes);\n this.body.emitter.emit('startSimulation');\n this.showManipulatorToolbar();\n }\n else {\n this.body.emitter.emit('startSimulation');\n this.showManipulatorToolbar();\n }\n });\n }\n else {\n throw new Error('The function for delete does not support two arguments (data, callback)')\n }\n }\n else {\n this.body.data.edges.getDataSet().remove(selectedEdges);\n this.body.data.nodes.getDataSet().remove(selectedNodes);\n this.body.emitter.emit('startSimulation');\n this.showManipulatorToolbar();\n }\n }\n\n\n\n\n //********************************************** PRIVATE ***************************************//\n\n /**\n * draw or remove the DOM\n * @private\n */\n _setup() {\n if (this.options.enabled === true) {\n // Enable the GUI\n this.guiEnabled = true;\n\n this._createWrappers();\n if (this.editMode === false) {\n this._createEditButton();\n }\n else {\n this.showManipulatorToolbar();\n }\n }\n else {\n this._removeManipulationDOM();\n\n // disable the gui\n this.guiEnabled = false;\n }\n }\n\n\n /**\n * create the div overlays that contain the DOM\n * @private\n */\n _createWrappers() {\n // load the manipulator HTML elements. All styling done in css.\n if (this.manipulationDiv === undefined) {\n this.manipulationDiv = document.createElement('div');\n this.manipulationDiv.className = 'vis-manipulation';\n if (this.editMode === true) {\n this.manipulationDiv.style.display = 'block';\n }\n else {\n this.manipulationDiv.style.display = 'none';\n }\n this.canvas.frame.appendChild(this.manipulationDiv);\n }\n\n // container for the edit button.\n if (this.editModeDiv === undefined) {\n this.editModeDiv = document.createElement('div');\n this.editModeDiv.className = 'vis-edit-mode';\n if (this.editMode === true) {\n this.editModeDiv.style.display = 'none';\n }\n else {\n this.editModeDiv.style.display = 'block';\n }\n this.canvas.frame.appendChild(this.editModeDiv);\n }\n\n\n // container for the close div button\n if (this.closeDiv === undefined) {\n this.closeDiv = document.createElement('div');\n this.closeDiv.className = 'vis-close';\n this.closeDiv.style.display = this.manipulationDiv.style.display;\n this.canvas.frame.appendChild(this.closeDiv);\n }\n }\n\n\n /**\n * generate a new target node. Used for creating new edges and editing edges\n *\n * @param {number} x\n * @param {number} y\n * @returns {Node}\n * @private\n */\n _getNewTargetNode(x,y) {\n let controlNodeStyle = util.deepExtend({}, this.options.controlNodeStyle);\n\n controlNodeStyle.id = 'targetNode' + util.randomUUID();\n controlNodeStyle.hidden = false;\n controlNodeStyle.physics = false;\n controlNodeStyle.x = x;\n controlNodeStyle.y = y;\n\n // we have to define the bounding box in order for the nodes to be drawn immediately\n let node = this.body.functions.createNode(controlNodeStyle);\n node.shape.boundingBox = {left: x, right:x, top:y, bottom:y};\n\n return node;\n }\n\n\n /**\n * Create the edit button\n */\n _createEditButton() {\n // restore everything to it's original state (if applicable)\n this._clean();\n\n // reset the manipulationDOM\n this.manipulationDOM = {};\n\n // empty the editModeDiv\n util.recursiveDOMDelete(this.editModeDiv);\n\n\n // create the contents for the editMode button\n let locale = this.options.locales[this.options.locale];\n let button = this._createButton('editMode', 'vis-button vis-edit vis-edit-mode', locale['edit'] || this.options.locales['en']['edit']);\n this.editModeDiv.appendChild(button);\n\n // bind a hammer listener to the button, calling the function toggleEditMode.\n this._bindHammerToDiv(button, this.toggleEditMode.bind(this));\n }\n\n\n /**\n * this function cleans up after everything this module does. Temporary elements, functions and events are removed, physics restored, hammers removed.\n * @private\n */\n _clean() {\n // not in mode\n this.inMode = false;\n\n // _clean the divs\n if (this.guiEnabled === true) {\n util.recursiveDOMDelete(this.editModeDiv);\n util.recursiveDOMDelete(this.manipulationDiv);\n\n // removes all the bindings and overloads\n this._cleanManipulatorHammers();\n }\n\n // remove temporary nodes and edges\n this._cleanupTemporaryNodesAndEdges();\n\n // restore overloaded UI functions\n this._unbindTemporaryUIs();\n\n // remove the temporaryEventFunctions\n this._unbindTemporaryEvents();\n\n // restore the physics if required\n this.body.emitter.emit('restorePhysics');\n }\n\n\n /**\n * Each dom element has it's own hammer. They are stored in this.manipulationHammers. This cleans them up.\n * @private\n */\n _cleanManipulatorHammers() {\n // _clean hammer bindings\n if (this.manipulationHammers.length != 0) {\n for (let i = 0; i < this.manipulationHammers.length; i++) {\n this.manipulationHammers[i].destroy();\n }\n this.manipulationHammers = [];\n }\n }\n\n\n /**\n * Remove all DOM elements created by this module.\n * @private\n */\n _removeManipulationDOM() {\n // removes all the bindings and overloads\n this._clean();\n\n // empty the manipulation divs\n util.recursiveDOMDelete(this.manipulationDiv);\n util.recursiveDOMDelete(this.editModeDiv);\n util.recursiveDOMDelete(this.closeDiv);\n\n // remove the manipulation divs\n if (this.manipulationDiv) {this.canvas.frame.removeChild(this.manipulationDiv);}\n if (this.editModeDiv) {this.canvas.frame.removeChild(this.editModeDiv);}\n if (this.closeDiv) {this.canvas.frame.removeChild(this.closeDiv);}\n\n // set the references to undefined\n this.manipulationDiv = undefined;\n this.editModeDiv = undefined;\n this.closeDiv = undefined;\n }\n\n\n /**\n * create a seperator line. the index is to differentiate in the manipulation dom\n * @param {number} [index=1]\n * @private\n */\n _createSeperator(index = 1) {\n this.manipulationDOM['seperatorLineDiv' + index] = document.createElement('div');\n this.manipulationDOM['seperatorLineDiv' + index].className = 'vis-separator-line';\n this.manipulationDiv.appendChild(this.manipulationDOM['seperatorLineDiv' + index]);\n }\n\n // ---------------------- DOM functions for buttons --------------------------//\n\n /**\n *\n * @param {Locale} locale\n * @private\n */\n _createAddNodeButton(locale) {\n let button = this._createButton('addNode', 'vis-button vis-add', locale['addNode'] || this.options.locales['en']['addNode']);\n this.manipulationDiv.appendChild(button);\n this._bindHammerToDiv(button, this.addNodeMode.bind(this));\n }\n\n /**\n *\n * @param {Locale} locale\n * @private\n */\n _createAddEdgeButton(locale) {\n let button = this._createButton('addEdge', 'vis-button vis-connect', locale['addEdge'] || this.options.locales['en']['addEdge']);\n this.manipulationDiv.appendChild(button);\n this._bindHammerToDiv(button, this.addEdgeMode.bind(this));\n }\n\n /**\n *\n * @param {Locale} locale\n * @private\n */\n _createEditNodeButton(locale) {\n let button = this._createButton('editNode', 'vis-button vis-edit', locale['editNode'] || this.options.locales['en']['editNode']);\n this.manipulationDiv.appendChild(button);\n this._bindHammerToDiv(button, this.editNode.bind(this));\n }\n\n /**\n *\n * @param {Locale} locale\n * @private\n */\n _createEditEdgeButton(locale) {\n let button = this._createButton('editEdge', 'vis-button vis-edit', locale['editEdge'] || this.options.locales['en']['editEdge']);\n this.manipulationDiv.appendChild(button);\n this._bindHammerToDiv(button, this.editEdgeMode.bind(this));\n }\n\n /**\n *\n * @param {Locale} locale\n * @private\n */\n _createDeleteButton(locale) {\n var deleteBtnClass;\n if (this.options.rtl) {\n deleteBtnClass = 'vis-button vis-delete-rtl';\n } else {\n deleteBtnClass = 'vis-button vis-delete';\n }\n let button = this._createButton('delete', deleteBtnClass, locale['del'] || this.options.locales['en']['del']);\n this.manipulationDiv.appendChild(button);\n this._bindHammerToDiv(button, this.deleteSelected.bind(this));\n }\n\n /**\n *\n * @param {Locale} locale\n * @private\n */\n _createBackButton(locale) {\n let button = this._createButton('back', 'vis-button vis-back', locale['back'] || this.options.locales['en']['back']);\n this.manipulationDiv.appendChild(button);\n this._bindHammerToDiv(button, this.showManipulatorToolbar.bind(this));\n }\n\n /**\n *\n * @param {number|string} id\n * @param {string} className\n * @param {label} label\n * @param {string} labelClassName\n * @returns {HTMLElement}\n * @private\n */\n _createButton(id, className, label, labelClassName = 'vis-label') {\n\n this.manipulationDOM[id+'Div'] = document.createElement('div');\n this.manipulationDOM[id+'Div'].className = className;\n this.manipulationDOM[id+'Label'] = document.createElement('div');\n this.manipulationDOM[id+'Label'].className = labelClassName;\n this.manipulationDOM[id+'Label'].innerHTML = label;\n this.manipulationDOM[id+'Div'].appendChild(this.manipulationDOM[id+'Label']);\n return this.manipulationDOM[id+'Div'];\n }\n\n /**\n *\n * @param {Label} label\n * @private\n */\n _createDescription(label) {\n this.manipulationDiv.appendChild(\n this._createButton('description', 'vis-button vis-none', label)\n );\n }\n\n // -------------------------- End of DOM functions for buttons ------------------------------//\n\n /**\n * this binds an event until cleanup by the clean functions.\n * @param {Event} event The event\n * @param {function} newFunction\n * @private\n */\n _temporaryBindEvent(event, newFunction) {\n this.temporaryEventFunctions.push({event:event, boundFunction:newFunction});\n this.body.emitter.on(event, newFunction);\n }\n\n /**\n * this overrides an UI function until cleanup by the clean function\n * @param {string} UIfunctionName\n * @param {function} newFunction\n * @private\n */\n _temporaryBindUI(UIfunctionName, newFunction) {\n if (this.body.eventListeners[UIfunctionName] !== undefined) {\n this.temporaryUIFunctions[UIfunctionName] = this.body.eventListeners[UIfunctionName];\n this.body.eventListeners[UIfunctionName] = newFunction;\n }\n else {\n throw new Error('This UI function does not exist. Typo? You tried: ' + UIfunctionName + ' possible are: ' + JSON.stringify(Object.keys(this.body.eventListeners)));\n }\n }\n\n /**\n * Restore the overridden UI functions to their original state.\n *\n * @private\n */\n _unbindTemporaryUIs() {\n for (let functionName in this.temporaryUIFunctions) {\n if (this.temporaryUIFunctions.hasOwnProperty(functionName)) {\n this.body.eventListeners[functionName] = this.temporaryUIFunctions[functionName];\n delete this.temporaryUIFunctions[functionName];\n }\n }\n this.temporaryUIFunctions = {};\n }\n\n /**\n * Unbind the events created by _temporaryBindEvent\n * @private\n */\n _unbindTemporaryEvents() {\n for (let i = 0; i < this.temporaryEventFunctions.length; i++) {\n let eventName = this.temporaryEventFunctions[i].event;\n let boundFunction = this.temporaryEventFunctions[i].boundFunction;\n this.body.emitter.off(eventName, boundFunction);\n }\n this.temporaryEventFunctions = [];\n }\n\n /**\n * Bind an hammer instance to a DOM element.\n *\n * @param {Element} domElement\n * @param {function} boundFunction\n */\n _bindHammerToDiv(domElement, boundFunction) {\n let hammer = new Hammer(domElement, {});\n hammerUtil.onTouch(hammer, boundFunction);\n this.manipulationHammers.push(hammer);\n }\n\n\n /**\n * Neatly clean up temporary edges and nodes\n * @private\n */\n _cleanupTemporaryNodesAndEdges() {\n // _clean temporary edges\n for (let i = 0; i < this.temporaryIds.edges.length; i++) {\n this.body.edges[this.temporaryIds.edges[i]].disconnect();\n delete this.body.edges[this.temporaryIds.edges[i]];\n let indexTempEdge = this.body.edgeIndices.indexOf(this.temporaryIds.edges[i]);\n if (indexTempEdge !== -1) {this.body.edgeIndices.splice(indexTempEdge,1);}\n }\n\n // _clean temporary nodes\n for (let i = 0; i < this.temporaryIds.nodes.length; i++) {\n delete this.body.nodes[this.temporaryIds.nodes[i]];\n let indexTempNode = this.body.nodeIndices.indexOf(this.temporaryIds.nodes[i]);\n if (indexTempNode !== -1) {this.body.nodeIndices.splice(indexTempNode,1);}\n }\n\n this.temporaryIds = {nodes: [], edges: []};\n }\n\n // ------------------------------------------ EDIT EDGE FUNCTIONS -----------------------------------------//\n\n /**\n * the touch is used to get the position of the initial click\n * @param {Event} event The event\n * @private\n */\n _controlNodeTouch(event) {\n this.selectionHandler.unselectAll();\n this.lastTouch = this.body.functions.getPointer(event.center);\n this.lastTouch.translation = util.extend({},this.body.view.translation); // copy the object\n }\n\n\n /**\n * the drag start is used to mark one of the control nodes as selected.\n * @param {Event} event The event\n * @private\n */\n _controlNodeDragStart(event) { // eslint-disable-line no-unused-vars\n let pointer = this.lastTouch;\n let pointerObj = this.selectionHandler._pointerToPositionObject(pointer);\n let from = this.body.nodes[this.temporaryIds.nodes[0]];\n let to = this.body.nodes[this.temporaryIds.nodes[1]];\n let edge = this.body.edges[this.edgeBeingEditedId];\n this.selectedControlNode = undefined;\n\n let fromSelect = from.isOverlappingWith(pointerObj);\n let toSelect = to.isOverlappingWith(pointerObj);\n\n if (fromSelect === true) {\n this.selectedControlNode = from;\n edge.edgeType.from = from;\n }\n else if (toSelect === true) {\n this.selectedControlNode = to;\n edge.edgeType.to = to;\n }\n\n // we use the selection to find the node that is being dragged. We explicitly select it here.\n if (this.selectedControlNode !== undefined) {\n this.selectionHandler.selectObject(this.selectedControlNode)\n }\n\n this.body.emitter.emit('_redraw');\n }\n\n /**\n * dragging the control nodes or the canvas\n * @param {Event} event The event\n * @private\n */\n _controlNodeDrag(event) {\n this.body.emitter.emit('disablePhysics');\n let pointer = this.body.functions.getPointer(event.center);\n let pos = this.canvas.DOMtoCanvas(pointer);\n if (this.selectedControlNode !== undefined) {\n this.selectedControlNode.x = pos.x;\n this.selectedControlNode.y = pos.y;\n }\n else {\n // if the drag was not started properly because the click started outside the network div, start it now.\n let diffX = pointer.x - this.lastTouch.x;\n let diffY = pointer.y - this.lastTouch.y;\n this.body.view.translation = {x:this.lastTouch.translation.x + diffX, y:this.lastTouch.translation.y + diffY};\n }\n this.body.emitter.emit('_redraw');\n }\n\n\n /**\n * connecting or restoring the control nodes.\n * @param {Event} event The event\n * @private\n */\n _controlNodeDragEnd(event) {\n let pointer = this.body.functions.getPointer(event.center);\n let pointerObj = this.selectionHandler._pointerToPositionObject(pointer);\n let edge = this.body.edges[this.edgeBeingEditedId];\n // if the node that was dragged is not a control node, return\n if (this.selectedControlNode === undefined) {\n return;\n }\n\n // we use the selection to find the node that is being dragged. We explicitly DEselect the control node here.\n this.selectionHandler.unselectAll();\n let overlappingNodeIds = this.selectionHandler._getAllNodesOverlappingWith(pointerObj);\n let node = undefined;\n for (let i = overlappingNodeIds.length-1; i >= 0; i--) {\n if (overlappingNodeIds[i] !== this.selectedControlNode.id) {\n node = this.body.nodes[overlappingNodeIds[i]];\n break;\n }\n }\n // perform the connection\n if (node !== undefined && this.selectedControlNode !== undefined) {\n if (node.isCluster === true) {\n alert(this.options.locales[this.options.locale]['createEdgeError'] || this.options.locales['en']['createEdgeError'])\n }\n else {\n let from = this.body.nodes[this.temporaryIds.nodes[0]];\n if (this.selectedControlNode.id === from.id) {\n this._performEditEdge(node.id, edge.to.id);\n }\n else {\n this._performEditEdge(edge.from.id, node.id);\n }\n }\n }\n else {\n edge.updateEdgeType();\n this.body.emitter.emit('restorePhysics');\n }\n\n this.body.emitter.emit('_redraw');\n }\n\n // ------------------------------------ END OF EDIT EDGE FUNCTIONS -----------------------------------------//\n\n\n\n // ------------------------------------------- ADD EDGE FUNCTIONS -----------------------------------------//\n /**\n * the function bound to the selection event. It checks if you want to connect a cluster and changes the description\n * to walk the user through the process.\n *\n * @param {Event} event\n * @private\n */\n _handleConnect(event) {\n // check to avoid double fireing of this function.\n if (new Date().valueOf() - this.touchTime > 100) {\n this.lastTouch = this.body.functions.getPointer(event.center);\n this.lastTouch.translation = util.extend({},this.body.view.translation); // copy the object\n\n let pointer = this.lastTouch;\n let node = this.selectionHandler.getNodeAt(pointer);\n\n if (node !== undefined) {\n if (node.isCluster === true) {\n alert(this.options.locales[this.options.locale]['createEdgeError'] || this.options.locales['en']['createEdgeError'])\n }\n else {\n // create a node the temporary line can look at\n let targetNode = this._getNewTargetNode(node.x,node.y);\n this.body.nodes[targetNode.id] = targetNode;\n this.body.nodeIndices.push(targetNode.id);\n\n // create a temporary edge\n let connectionEdge = this.body.functions.createEdge({\n id: 'connectionEdge' + util.randomUUID(),\n from: node.id,\n to: targetNode.id,\n physics: false,\n smooth: {\n enabled: true,\n type: 'continuous',\n roundness: 0.5\n }\n });\n this.body.edges[connectionEdge.id] = connectionEdge;\n this.body.edgeIndices.push(connectionEdge.id);\n\n this.temporaryIds.nodes.push(targetNode.id);\n this.temporaryIds.edges.push(connectionEdge.id);\n }\n }\n this.touchTime = new Date().valueOf();\n }\n }\n\n /**\n *\n * @param {Event} event\n * @private\n */\n _dragControlNode(event) {\n let pointer = this.body.functions.getPointer(event.center);\n\n var pointerObj = this.selectionHandler._pointerToPositionObject(pointer);\n // remember the edge id\n var connectFromId = undefined;\n if (this.temporaryIds.edges[0] !== undefined) {\n connectFromId = this.body.edges[this.temporaryIds.edges[0]].fromId;\n }\n\n // get the overlapping node but NOT the temporary node;\n var overlappingNodeIds = this.selectionHandler._getAllNodesOverlappingWith(pointerObj);\n var node = undefined;\n for (var i = overlappingNodeIds.length - 1; i >= 0; i--) {\n // if the node id is NOT a temporary node, accept the node.\n if (this.temporaryIds.nodes.indexOf(overlappingNodeIds[i]) === -1) {\n node = this.body.nodes[overlappingNodeIds[i]];\n break;\n }\n }\n \n event.controlEdge = { from: connectFromId, to: node ? node.id : undefined };\n this.selectionHandler._generateClickEvent('controlNodeDragging', event, pointer);\n\n if (this.temporaryIds.nodes[0] !== undefined) {\n let targetNode = this.body.nodes[this.temporaryIds.nodes[0]]; // there is only one temp node in the add edge mode.\n targetNode.x = this.canvas._XconvertDOMtoCanvas(pointer.x);\n targetNode.y = this.canvas._YconvertDOMtoCanvas(pointer.y);\n this.body.emitter.emit('_redraw');\n }\n else {\n let diffX = pointer.x - this.lastTouch.x;\n let diffY = pointer.y - this.lastTouch.y;\n this.body.view.translation = {x:this.lastTouch.translation.x + diffX, y:this.lastTouch.translation.y + diffY};\n }\n\n }\n\n\n /**\n * Connect the new edge to the target if one exists, otherwise remove temp line\n * @param {Event} event The event\n * @private\n */\n _finishConnect(event) {\n let pointer = this.body.functions.getPointer(event.center);\n let pointerObj = this.selectionHandler._pointerToPositionObject(pointer);\n\n // remember the edge id\n let connectFromId = undefined;\n if (this.temporaryIds.edges[0] !== undefined) {\n connectFromId = this.body.edges[this.temporaryIds.edges[0]].fromId;\n }\n\n // get the overlapping node but NOT the temporary node;\n let overlappingNodeIds = this.selectionHandler._getAllNodesOverlappingWith(pointerObj);\n let node = undefined;\n for (let i = overlappingNodeIds.length-1; i >= 0; i--) {\n // if the node id is NOT a temporary node, accept the node.\n if (this.temporaryIds.nodes.indexOf(overlappingNodeIds[i]) === -1) {\n node = this.body.nodes[overlappingNodeIds[i]];\n break;\n }\n }\n\n // clean temporary nodes and edges.\n this._cleanupTemporaryNodesAndEdges();\n\n // perform the connection\n if (node !== undefined) {\n if (node.isCluster === true) {\n alert(this.options.locales[this.options.locale]['createEdgeError'] || this.options.locales['en']['createEdgeError']);\n }\n else {\n if (this.body.nodes[connectFromId] !== undefined && this.body.nodes[node.id] !== undefined) {\n this._performAddEdge(connectFromId, node.id);\n }\n }\n }\n\n event.controlEdge = { from: connectFromId, to: node ? node.id : undefined };\n this.selectionHandler._generateClickEvent('controlNodeDragEnd', event, pointer);\n\n // No need to do _generateclickevent('dragEnd') here, the regular dragEnd event fires.\n this.body.emitter.emit('_redraw');\n }\n\n\n /**\n *\n * @param {Event} event\n * @private\n */\n _dragStartEdge(event) {\n let pointer = this.lastTouch;\n this.selectionHandler._generateClickEvent('dragStart', event, pointer, undefined, true);\n }\n\n // --------------------------------------- END OF ADD EDGE FUNCTIONS -------------------------------------//\n\n\n // ------------------------------ Performing all the actual data manipulation ------------------------//\n\n /**\n * Adds a node on the specified location\n *\n * @param {Object} clickData\n * @private\n */\n _performAddNode(clickData) {\n let defaultData = {\n id: util.randomUUID(),\n x: clickData.pointer.canvas.x,\n y: clickData.pointer.canvas.y,\n label: 'new'\n };\n\n if (typeof this.options.addNode === 'function') {\n if (this.options.addNode.length === 2) {\n this.options.addNode(defaultData, (finalizedData) => {\n if (finalizedData !== null && finalizedData !== undefined && this.inMode === 'addNode') { // if for whatever reason the mode has changes (due to dataset change) disregard the callback\n this.body.data.nodes.getDataSet().add(finalizedData);\n }\n this.showManipulatorToolbar();\n });\n }\n else {\n this.showManipulatorToolbar();\n throw new Error('The function for add does not support two arguments (data,callback)');\n }\n }\n else {\n this.body.data.nodes.getDataSet().add(defaultData);\n this.showManipulatorToolbar();\n }\n }\n\n\n /**\n * connect two nodes with a new edge.\n *\n * @param {Node.id} sourceNodeId\n * @param {Node.id} targetNodeId\n * @private\n */\n _performAddEdge(sourceNodeId, targetNodeId) {\n let defaultData = {from: sourceNodeId, to: targetNodeId};\n if (typeof this.options.addEdge === 'function') {\n if (this.options.addEdge.length === 2) {\n this.options.addEdge(defaultData, (finalizedData) => {\n if (finalizedData !== null && finalizedData !== undefined && this.inMode === 'addEdge') { // if for whatever reason the mode has changes (due to dataset change) disregard the callback\n this.body.data.edges.getDataSet().add(finalizedData);\n this.selectionHandler.unselectAll();\n this.showManipulatorToolbar();\n }\n });\n }\n else {\n throw new Error('The function for connect does not support two arguments (data,callback)');\n }\n }\n else {\n this.body.data.edges.getDataSet().add(defaultData);\n this.selectionHandler.unselectAll();\n this.showManipulatorToolbar();\n }\n }\n\n /**\n * connect two nodes with a new edge.\n *\n * @param {Node.id} sourceNodeId\n * @param {Node.id} targetNodeId\n * @private\n */\n _performEditEdge(sourceNodeId, targetNodeId) {\n let defaultData = {id: this.edgeBeingEditedId, from: sourceNodeId, to: targetNodeId, label: this.body.data.edges._data[this.edgeBeingEditedId].label };\n let eeFunct = this.options.editEdge;\n if (typeof eeFunct === 'object') {\n eeFunct = eeFunct.editWithoutDrag;\n }\n if (typeof eeFunct === 'function') {\n if (eeFunct.length === 2) {\n eeFunct(defaultData, (finalizedData) => {\n if (finalizedData === null || finalizedData === undefined || this.inMode !== 'editEdge') { // if for whatever reason the mode has changes (due to dataset change) disregard the callback) {\n this.body.edges[defaultData.id].updateEdgeType();\n this.body.emitter.emit('_redraw');\n this.showManipulatorToolbar();\n }\n else {\n this.body.data.edges.getDataSet().update(finalizedData);\n this.selectionHandler.unselectAll();\n this.showManipulatorToolbar();\n }\n });\n }\n else {\n throw new Error('The function for edit does not support two arguments (data, callback)');\n }\n }\n else {\n this.body.data.edges.getDataSet().update(defaultData);\n this.selectionHandler.unselectAll();\n this.showManipulatorToolbar();\n }\n }\n\n\n}\n\nexport default ManipulationSystem;\n","import './ColorPicker.css';\n\nimport Hammer from '../module/hammer';\nimport hammerUtil from '../hammerUtil';\nimport util from 'vis-util';\n\n\nvar htmlColors = {black: '#000000', navy: '#000080', darkblue: '#00008B', mediumblue: '#0000CD', blue: '#0000FF', darkgreen: '#006400', green: '#008000', teal: '#008080', darkcyan: '#008B8B', deepskyblue: '#00BFFF', darkturquoise: '#00CED1', mediumspringgreen: '#00FA9A', lime: '#00FF00', springgreen: '#00FF7F', aqua: '#00FFFF', cyan: '#00FFFF', midnightblue: '#191970', dodgerblue: '#1E90FF', lightseagreen: '#20B2AA', forestgreen: '#228B22', seagreen: '#2E8B57', darkslategray: '#2F4F4F', limegreen: '#32CD32', mediumseagreen: '#3CB371', turquoise: '#40E0D0', royalblue: '#4169E1', steelblue: '#4682B4', darkslateblue: '#483D8B', mediumturquoise: '#48D1CC', indigo: '#4B0082', darkolivegreen: '#556B2F', cadetblue: '#5F9EA0', cornflowerblue: '#6495ED', mediumaquamarine: '#66CDAA', dimgray: '#696969', slateblue: '#6A5ACD', olivedrab: '#6B8E23', slategray: '#708090', lightslategray: '#778899', mediumslateblue: '#7B68EE', lawngreen: '#7CFC00', chartreuse: '#7FFF00', aquamarine: '#7FFFD4', maroon: '#800000', purple: '#800080', olive: '#808000', gray: '#808080', skyblue: '#87CEEB', lightskyblue: '#87CEFA', blueviolet: '#8A2BE2', darkred: '#8B0000', darkmagenta: '#8B008B', saddlebrown: '#8B4513', darkseagreen: '#8FBC8F', lightgreen: '#90EE90', mediumpurple: '#9370D8', darkviolet: '#9400D3', palegreen: '#98FB98', darkorchid: '#9932CC', yellowgreen: '#9ACD32', sienna: '#A0522D', brown: '#A52A2A', darkgray: '#A9A9A9', lightblue: '#ADD8E6', greenyellow: '#ADFF2F', paleturquoise: '#AFEEEE', lightsteelblue: '#B0C4DE', powderblue: '#B0E0E6', firebrick: '#B22222', darkgoldenrod: '#B8860B', mediumorchid: '#BA55D3', rosybrown: '#BC8F8F', darkkhaki: '#BDB76B', silver: '#C0C0C0', mediumvioletred: '#C71585', indianred: '#CD5C5C', peru: '#CD853F', chocolate: '#D2691E', tan: '#D2B48C', lightgrey: '#D3D3D3', palevioletred: '#D87093', thistle: '#D8BFD8', orchid: '#DA70D6', goldenrod: '#DAA520', crimson: '#DC143C', gainsboro: '#DCDCDC', plum: '#DDA0DD', burlywood: '#DEB887', lightcyan: '#E0FFFF', lavender: '#E6E6FA', darksalmon: '#E9967A', violet: '#EE82EE', palegoldenrod: '#EEE8AA', lightcoral: '#F08080', khaki: '#F0E68C', aliceblue: '#F0F8FF', honeydew: '#F0FFF0', azure: '#F0FFFF', sandybrown: '#F4A460', wheat: '#F5DEB3', beige: '#F5F5DC', whitesmoke: '#F5F5F5', mintcream: '#F5FFFA', ghostwhite: '#F8F8FF', salmon: '#FA8072', antiquewhite: '#FAEBD7', linen: '#FAF0E6', lightgoldenrodyellow: '#FAFAD2', oldlace: '#FDF5E6', red: '#FF0000', fuchsia: '#FF00FF', magenta: '#FF00FF', deeppink: '#FF1493', orangered: '#FF4500', tomato: '#FF6347', hotpink: '#FF69B4', coral: '#FF7F50', darkorange: '#FF8C00', lightsalmon: '#FFA07A', orange: '#FFA500', lightpink: '#FFB6C1', pink: '#FFC0CB', gold: '#FFD700', peachpuff: '#FFDAB9', navajowhite: '#FFDEAD', moccasin: '#FFE4B5', bisque: '#FFE4C4', mistyrose: '#FFE4E1', blanchedalmond: '#FFEBCD', papayawhip: '#FFEFD5', lavenderblush: '#FFF0F5', seashell: '#FFF5EE', cornsilk: '#FFF8DC', lemonchiffon: '#FFFACD', floralwhite: '#FFFAF0', snow: '#FFFAFA', yellow: '#FFFF00', lightyellow: '#FFFFE0', ivory: '#FFFFF0', white: '#FFFFFF'};\n\n/**\n * @param {number} [pixelRatio=1]\n */\nclass ColorPicker {\n /**\n * @param {number} [pixelRatio=1]\n */\n constructor(pixelRatio = 1) {\n this.pixelRatio = pixelRatio;\n this.generated = false;\n this.centerCoordinates = {x:289/2, y:289/2};\n this.r = 289 * 0.49;\n this.color = {r:255,g:255,b:255,a:1.0};\n this.hueCircle = undefined;\n this.initialColor = {r:255,g:255,b:255,a:1.0};\n this.previousColor= undefined;\n this.applied = false;\n\n // bound by\n this.updateCallback = () => {};\n this.closeCallback = () => {};\n\n // create all DOM elements\n this._create();\n }\n\n\n /**\n * this inserts the colorPicker into a div from the DOM\n * @param {Element} container\n */\n insertTo(container) {\n if (this.hammer !== undefined) {\n this.hammer.destroy();\n this.hammer = undefined;\n }\n this.container = container;\n this.container.appendChild(this.frame);\n this._bindHammer();\n\n this._setSize();\n }\n\n /**\n * the callback is executed on apply and save. Bind it to the application\n * @param {function} callback\n */\n setUpdateCallback(callback) {\n if (typeof callback === 'function') {\n this.updateCallback = callback;\n }\n else {\n throw new Error(\"Function attempted to set as colorPicker update callback is not a function.\");\n }\n }\n\n /**\n * the callback is executed on apply and save. Bind it to the application\n * @param {function} callback\n */\n setCloseCallback(callback) {\n if (typeof callback === 'function') {\n this.closeCallback = callback;\n }\n else {\n throw new Error(\"Function attempted to set as colorPicker closing callback is not a function.\");\n }\n }\n\n /**\n *\n * @param {string} color\n * @returns {String}\n * @private\n */\n _isColorString(color) {\n if (typeof color === 'string') {\n return htmlColors[color];\n }\n }\n\n\n /**\n * Set the color of the colorPicker\n * Supported formats:\n * 'red' --> HTML color string\n * '#ffffff' --> hex string\n * 'rgb(255,255,255)' --> rgb string\n * 'rgba(255,255,255,1.0)' --> rgba string\n * {r:255,g:255,b:255} --> rgb object\n * {r:255,g:255,b:255,a:1.0} --> rgba object\n * @param {string|Object} color\n * @param {boolean} [setInitial=true]\n */\n setColor(color, setInitial = true) {\n if (color === 'none') {\n return;\n }\n\n let rgba;\n\n // if a html color shorthand is used, convert to hex\n var htmlColor = this._isColorString(color);\n if (htmlColor !== undefined) {\n color = htmlColor;\n }\n\n // check format\n if (util.isString(color) === true) {\n if (util.isValidRGB(color) === true) {\n let rgbaArray = color.substr(4).substr(0, color.length - 5).split(',');\n rgba = {r:rgbaArray[0], g:rgbaArray[1], b:rgbaArray[2], a:1.0};\n }\n else if (util.isValidRGBA(color) === true) {\n let rgbaArray = color.substr(5).substr(0, color.length - 6).split(',');\n rgba = {r:rgbaArray[0], g:rgbaArray[1], b:rgbaArray[2], a:rgbaArray[3]};\n }\n else if (util.isValidHex(color) === true) {\n let rgbObj = util.hexToRGB(color);\n rgba = {r:rgbObj.r, g:rgbObj.g, b:rgbObj.b, a:1.0};\n }\n }\n else {\n if (color instanceof Object) {\n if (color.r !== undefined && color.g !== undefined && color.b !== undefined) {\n let alpha = color.a !== undefined ? color.a : '1.0';\n rgba = {r:color.r, g:color.g, b:color.b, a:alpha};\n }\n }\n }\n\n // set color\n if (rgba === undefined) {\n throw new Error(\"Unknown color passed to the colorPicker. Supported are strings: rgb, hex, rgba. Object: rgb ({r:r,g:g,b:b,[a:a]}). Supplied: \" + JSON.stringify(color));\n }\n else {\n this._setColor(rgba, setInitial);\n }\n }\n\n\n /**\n * this shows the color picker.\n * The hue circle is constructed once and stored.\n */\n show() {\n if (this.closeCallback !== undefined) {\n this.closeCallback();\n this.closeCallback = undefined;\n }\n\n this.applied = false;\n this.frame.style.display = 'block';\n this._generateHueCircle();\n }\n\n // ------------------------------------------ PRIVATE ----------------------------- //\n\n /**\n * Hide the picker. Is called by the cancel button.\n * Optional boolean to store the previous color for easy access later on.\n * @param {boolean} [storePrevious=true]\n * @private\n */\n _hide(storePrevious = true) {\n // store the previous color for next time;\n if (storePrevious === true) {\n this.previousColor = util.extend({}, this.color);\n }\n\n if (this.applied === true) {\n this.updateCallback(this.initialColor);\n }\n\n this.frame.style.display = 'none';\n\n // call the closing callback, restoring the onclick method.\n // this is in a setTimeout because it will trigger the show again before the click is done.\n setTimeout(() => {\n if (this.closeCallback !== undefined) {\n this.closeCallback();\n this.closeCallback = undefined;\n }\n },0);\n }\n\n\n /**\n * bound to the save button. Saves and hides.\n * @private\n */\n _save() {\n this.updateCallback(this.color);\n this.applied = false;\n this._hide();\n }\n\n\n /**\n * Bound to apply button. Saves but does not close. Is undone by the cancel button.\n * @private\n */\n _apply() {\n this.applied = true;\n this.updateCallback(this.color);\n this._updatePicker(this.color);\n }\n\n\n /**\n * load the color from the previous session.\n * @private\n */\n _loadLast() {\n if (this.previousColor !== undefined) {\n this.setColor(this.previousColor, false);\n }\n else {\n alert(\"There is no last color to load...\");\n }\n }\n\n\n /**\n * set the color, place the picker\n * @param {Object} rgba\n * @param {boolean} [setInitial=true]\n * @private\n */\n _setColor(rgba, setInitial = true) {\n // store the initial color\n if (setInitial === true) {\n this.initialColor = util.extend({}, rgba);\n }\n\n this.color = rgba;\n let hsv = util.RGBToHSV(rgba.r, rgba.g, rgba.b);\n\n let angleConvert = 2 * Math.PI;\n let radius = this.r * hsv.s;\n let x = this.centerCoordinates.x + radius * Math.sin(angleConvert * hsv.h);\n let y = this.centerCoordinates.y + radius * Math.cos(angleConvert * hsv.h);\n\n this.colorPickerSelector.style.left = x - 0.5 * this.colorPickerSelector.clientWidth + 'px';\n this.colorPickerSelector.style.top = y - 0.5 * this.colorPickerSelector.clientHeight + 'px';\n\n this._updatePicker(rgba);\n }\n\n\n /**\n * bound to opacity control\n * @param {number} value\n * @private\n */\n _setOpacity(value) {\n this.color.a = value / 100;\n this._updatePicker(this.color);\n }\n\n\n /**\n * bound to brightness control\n * @param {number} value\n * @private\n */\n _setBrightness(value) {\n let hsv = util.RGBToHSV(this.color.r, this.color.g, this.color.b);\n hsv.v = value / 100;\n let rgba = util.HSVToRGB(hsv.h, hsv.s, hsv.v);\n rgba['a'] = this.color.a;\n this.color = rgba;\n this._updatePicker();\n }\n\n\n /**\n * update the color picker. A black circle overlays the hue circle to mimic the brightness decreasing.\n * @param {Object} rgba\n * @private\n */\n _updatePicker(rgba = this.color) {\n let hsv = util.RGBToHSV(rgba.r, rgba.g, rgba.b);\n let ctx = this.colorPickerCanvas.getContext('2d');\n if (this.pixelRation === undefined) {\n this.pixelRatio = (window.devicePixelRatio || 1) / (ctx.webkitBackingStorePixelRatio ||\n ctx.mozBackingStorePixelRatio ||\n ctx.msBackingStorePixelRatio ||\n ctx.oBackingStorePixelRatio ||\n ctx.backingStorePixelRatio || 1);\n }\n ctx.setTransform(this.pixelRatio, 0, 0, this.pixelRatio, 0, 0);\n\n // clear the canvas\n let w = this.colorPickerCanvas.clientWidth;\n let h = this.colorPickerCanvas.clientHeight;\n ctx.clearRect(0, 0, w, h);\n\n ctx.putImageData(this.hueCircle, 0,0);\n ctx.fillStyle = 'rgba(0,0,0,' + (1- hsv.v) + ')';\n ctx.circle(this.centerCoordinates.x, this.centerCoordinates.y, this.r);\n ctx.fill();\n\n this.brightnessRange.value = 100 * hsv.v;\n this.opacityRange.value = 100 * rgba.a;\n\n this.initialColorDiv.style.backgroundColor = 'rgba(' + this.initialColor.r + ',' + this.initialColor.g + ',' + this.initialColor.b + ',' + this.initialColor.a + ')';\n this.newColorDiv.style.backgroundColor = 'rgba(' + this.color.r + ',' + this.color.g + ',' + this.color.b + ',' + this.color.a + ')';\n }\n\n\n /**\n * used by create to set the size of the canvas.\n * @private\n */\n _setSize() {\n this.colorPickerCanvas.style.width = '100%';\n this.colorPickerCanvas.style.height = '100%';\n\n this.colorPickerCanvas.width = 289 * this.pixelRatio;\n this.colorPickerCanvas.height = 289 * this.pixelRatio;\n }\n\n\n /**\n * create all dom elements\n * TODO: cleanup, lots of similar dom elements\n * @private\n */\n _create() {\n this.frame = document.createElement('div');\n this.frame.className = 'vis-color-picker';\n\n this.colorPickerDiv = document.createElement('div');\n this.colorPickerSelector = document.createElement('div');\n this.colorPickerSelector.className = 'vis-selector';\n this.colorPickerDiv.appendChild(this.colorPickerSelector);\n\n this.colorPickerCanvas = document.createElement('canvas');\n this.colorPickerDiv.appendChild(this.colorPickerCanvas);\n\n if (!this.colorPickerCanvas.getContext) {\n let noCanvas = document.createElement( 'DIV' );\n noCanvas.style.color = 'red';\n noCanvas.style.fontWeight = 'bold' ;\n noCanvas.style.padding = '10px';\n noCanvas.innerHTML = 'Error: your browser does not support HTML canvas';\n this.colorPickerCanvas.appendChild(noCanvas);\n }\n else {\n let ctx = this.colorPickerCanvas.getContext(\"2d\");\n this.pixelRatio = (window.devicePixelRatio || 1) / (ctx.webkitBackingStorePixelRatio ||\n ctx.mozBackingStorePixelRatio ||\n ctx.msBackingStorePixelRatio ||\n ctx.oBackingStorePixelRatio ||\n ctx.backingStorePixelRatio || 1);\n this.colorPickerCanvas.getContext(\"2d\").setTransform(this.pixelRatio, 0, 0, this.pixelRatio, 0, 0);\n }\n\n this.colorPickerDiv.className = 'vis-color';\n\n this.opacityDiv = document.createElement('div');\n this.opacityDiv.className = 'vis-opacity';\n\n this.brightnessDiv = document.createElement('div');\n this.brightnessDiv.className = 'vis-brightness';\n\n this.arrowDiv = document.createElement('div');\n this.arrowDiv.className = 'vis-arrow';\n\n this.opacityRange = document.createElement('input');\n try {\n this.opacityRange.type = 'range'; // Not supported on IE9\n this.opacityRange.min = '0';\n this.opacityRange.max = '100';\n }\n // TODO: Add some error handling and remove this lint exception\n catch (err) {} // eslint-disable-line no-empty\n this.opacityRange.value = '100';\n this.opacityRange.className = 'vis-range';\n\n this.brightnessRange = document.createElement('input');\n try {\n this.brightnessRange.type = 'range'; // Not supported on IE9\n this.brightnessRange.min = '0';\n this.brightnessRange.max = '100';\n }\n // TODO: Add some error handling and remove this lint exception\n catch (err) {} // eslint-disable-line no-empty\n this.brightnessRange.value = '100';\n this.brightnessRange.className = 'vis-range';\n\n this.opacityDiv.appendChild(this.opacityRange);\n this.brightnessDiv.appendChild(this.brightnessRange);\n\n var me = this;\n this.opacityRange.onchange = function () {me._setOpacity(this.value);};\n this.opacityRange.oninput = function () {me._setOpacity(this.value);};\n this.brightnessRange.onchange = function () {me._setBrightness(this.value);};\n this.brightnessRange.oninput = function () {me._setBrightness(this.value);};\n\n this.brightnessLabel = document.createElement(\"div\");\n this.brightnessLabel.className = \"vis-label vis-brightness\";\n this.brightnessLabel.innerHTML = 'brightness:';\n\n this.opacityLabel = document.createElement(\"div\");\n this.opacityLabel.className = \"vis-label vis-opacity\";\n this.opacityLabel.innerHTML = 'opacity:';\n\n this.newColorDiv = document.createElement(\"div\");\n this.newColorDiv.className = \"vis-new-color\";\n this.newColorDiv.innerHTML = 'new';\n\n this.initialColorDiv = document.createElement(\"div\");\n this.initialColorDiv.className = \"vis-initial-color\";\n this.initialColorDiv.innerHTML = 'initial';\n\n this.cancelButton = document.createElement(\"div\");\n this.cancelButton.className = \"vis-button vis-cancel\";\n this.cancelButton.innerHTML = 'cancel';\n this.cancelButton.onclick = this._hide.bind(this, false);\n\n this.applyButton = document.createElement(\"div\");\n this.applyButton.className = \"vis-button vis-apply\";\n this.applyButton.innerHTML = 'apply';\n this.applyButton.onclick = this._apply.bind(this);\n\n this.saveButton = document.createElement(\"div\");\n this.saveButton.className = \"vis-button vis-save\";\n this.saveButton.innerHTML = 'save';\n this.saveButton.onclick = this._save.bind(this);\n\n this.loadButton = document.createElement(\"div\");\n this.loadButton.className = \"vis-button vis-load\";\n this.loadButton.innerHTML = 'load last';\n this.loadButton.onclick = this._loadLast.bind(this);\n\n this.frame.appendChild(this.colorPickerDiv);\n this.frame.appendChild(this.arrowDiv);\n this.frame.appendChild(this.brightnessLabel);\n this.frame.appendChild(this.brightnessDiv);\n this.frame.appendChild(this.opacityLabel);\n this.frame.appendChild(this.opacityDiv);\n this.frame.appendChild(this.newColorDiv);\n this.frame.appendChild(this.initialColorDiv);\n\n this.frame.appendChild(this.cancelButton);\n this.frame.appendChild(this.applyButton);\n this.frame.appendChild(this.saveButton);\n this.frame.appendChild(this.loadButton);\n }\n\n\n /**\n * bind hammer to the color picker\n * @private\n */\n _bindHammer() {\n this.drag = {};\n this.pinch = {};\n this.hammer = new Hammer(this.colorPickerCanvas);\n this.hammer.get('pinch').set({enable: true});\n\n hammerUtil.onTouch(this.hammer, (event) => {this._moveSelector(event)});\n this.hammer.on('tap', (event) => {this._moveSelector(event)});\n this.hammer.on('panstart', (event) => {this._moveSelector(event)});\n this.hammer.on('panmove', (event) => {this._moveSelector(event)});\n this.hammer.on('panend', (event) => {this._moveSelector(event)});\n }\n\n\n /**\n * generate the hue circle. This is relatively heavy (200ms) and is done only once on the first time it is shown.\n * @private\n */\n _generateHueCircle() {\n if (this.generated === false) {\n let ctx = this.colorPickerCanvas.getContext('2d');\n if (this.pixelRation === undefined) {\n this.pixelRatio = (window.devicePixelRatio || 1) / (ctx.webkitBackingStorePixelRatio ||\n ctx.mozBackingStorePixelRatio ||\n ctx.msBackingStorePixelRatio ||\n ctx.oBackingStorePixelRatio ||\n ctx.backingStorePixelRatio || 1);\n }\n ctx.setTransform(this.pixelRatio, 0, 0, this.pixelRatio, 0, 0);\n\n // clear the canvas\n let w = this.colorPickerCanvas.clientWidth;\n let h = this.colorPickerCanvas.clientHeight;\n ctx.clearRect(0, 0, w, h);\n\n\n // draw hue circle\n let x, y, hue, sat;\n this.centerCoordinates = {x: w * 0.5, y: h * 0.5};\n this.r = 0.49 * w;\n let angleConvert = (2 * Math.PI) / 360;\n let hfac = 1 / 360;\n let sfac = 1 / this.r;\n let rgb;\n for (hue = 0; hue < 360; hue++) {\n for (sat = 0; sat < this.r; sat++) {\n x = this.centerCoordinates.x + sat * Math.sin(angleConvert * hue);\n y = this.centerCoordinates.y + sat * Math.cos(angleConvert * hue);\n rgb = util.HSVToRGB(hue * hfac, sat * sfac, 1);\n ctx.fillStyle = 'rgb(' + rgb.r + ',' + rgb.g + ',' + rgb.b + ')';\n ctx.fillRect(x - 0.5, y - 0.5, 2, 2);\n }\n }\n ctx.strokeStyle = 'rgba(0,0,0,1)';\n ctx.circle(this.centerCoordinates.x, this.centerCoordinates.y, this.r);\n ctx.stroke();\n\n this.hueCircle = ctx.getImageData(0,0,w,h);\n }\n this.generated = true;\n }\n\n\n /**\n * move the selector. This is called by hammer functions.\n *\n * @param {Event} event The event\n * @private\n */\n _moveSelector(event) {\n let rect = this.colorPickerDiv.getBoundingClientRect();\n let left = event.center.x - rect.left;\n let top = event.center.y - rect.top;\n\n let centerY = 0.5 * this.colorPickerDiv.clientHeight;\n let centerX = 0.5 * this.colorPickerDiv.clientWidth;\n\n let x = left - centerX;\n let y = top - centerY;\n\n let angle = Math.atan2(x,y);\n let radius = 0.98 * Math.min(Math.sqrt(x * x + y * y), centerX);\n\n let newTop = Math.cos(angle) * radius + centerY;\n let newLeft = Math.sin(angle) * radius + centerX;\n\n this.colorPickerSelector.style.top = newTop - 0.5 * this.colorPickerSelector.clientHeight + 'px';\n this.colorPickerSelector.style.left = newLeft - 0.5 * this.colorPickerSelector.clientWidth + 'px';\n\n // set color\n let h = angle / (2 * Math.PI);\n h = h < 0 ? h + 1 : h;\n let s = radius / this.r;\n let hsv = util.RGBToHSV(this.color.r, this.color.g, this.color.b);\n hsv.h = h;\n hsv.s = s;\n let rgba = util.HSVToRGB(hsv.h, hsv.s, hsv.v);\n rgba['a'] = this.color.a;\n this.color = rgba;\n\n // update previews\n this.initialColorDiv.style.backgroundColor = 'rgba(' + this.initialColor.r + ',' + this.initialColor.g + ',' + this.initialColor.b + ',' + this.initialColor.a + ')';\n this.newColorDiv.style.backgroundColor = 'rgba(' + this.color.r + ',' + this.color.g + ',' + this.color.b + ',' + this.color.a + ')';\n }\n}\n\nexport default ColorPicker;\n","import './Configurator.css';\n\nimport util from 'vis-util';\n\nimport ColorPicker from './ColorPicker';\n\n/**\n * The way this works is for all properties of this.possible options, you can supply the property name in any form to list the options.\n * Boolean options are recognised as Boolean\n * Number options should be written as array: [default value, min value, max value, stepsize]\n * Colors should be written as array: ['color', '#ffffff']\n * Strings with should be written as array: [option1, option2, option3, ..]\n *\n * The options are matched with their counterparts in each of the modules and the values used in the configuration are\n */\nclass Configurator {\n /**\n * @param {Object} parentModule | the location where parentModule.setOptions() can be called\n * @param {Object} defaultContainer | the default container of the module\n * @param {Object} configureOptions | the fully configured and predefined options set found in allOptions.js\n * @param {number} pixelRatio | canvas pixel ratio\n */\n constructor(parentModule, defaultContainer, configureOptions, pixelRatio = 1) {\n this.parent = parentModule;\n this.changedOptions = [];\n this.container = defaultContainer;\n this.allowCreation = false;\n\n this.options = {};\n this.initialized = false;\n this.popupCounter = 0;\n this.defaultOptions = {\n enabled: false,\n filter: true,\n container: undefined,\n showButton: true\n };\n util.extend(this.options, this.defaultOptions);\n\n this.configureOptions = configureOptions;\n this.moduleOptions = {};\n this.domElements = [];\n this.popupDiv = {};\n this.popupLimit = 5;\n this.popupHistory = {};\n this.colorPicker = new ColorPicker(pixelRatio);\n this.wrapper = undefined;\n }\n\n\n /**\n * refresh all options.\n * Because all modules parse their options by themselves, we just use their options. We copy them here.\n *\n * @param {Object} options\n */\n setOptions(options) {\n if (options !== undefined) {\n // reset the popup history because the indices may have been changed.\n this.popupHistory = {};\n this._removePopup();\n\n let enabled = true;\n if (typeof options === 'string') {\n this.options.filter = options;\n }\n else if (options instanceof Array) {\n this.options.filter = options.join();\n }\n else if (typeof options === 'object') {\n if (options == null) {\n throw new TypeError('options cannot be null');\n }\n if (options.container !== undefined) {\n this.options.container = options.container;\n }\n if (options.filter !== undefined) {\n this.options.filter = options.filter;\n }\n if (options.showButton !== undefined) {\n this.options.showButton = options.showButton;\n }\n if (options.enabled !== undefined) {\n enabled = options.enabled;\n }\n }\n else if (typeof options === 'boolean') {\n this.options.filter = true;\n enabled = options;\n }\n else if (typeof options === 'function') {\n this.options.filter = options;\n enabled = true;\n }\n if (this.options.filter === false) {\n enabled = false;\n }\n\n this.options.enabled = enabled;\n }\n this._clean();\n }\n\n /**\n *\n * @param {Object} moduleOptions\n */\n setModuleOptions(moduleOptions) {\n this.moduleOptions = moduleOptions;\n if (this.options.enabled === true) {\n this._clean();\n if (this.options.container !== undefined) {\n this.container = this.options.container;\n }\n this._create();\n }\n }\n\n /**\n * Create all DOM elements\n * @private\n */\n _create() {\n this._clean();\n this.changedOptions = [];\n\n let filter = this.options.filter;\n let counter = 0;\n let show = false;\n for (let option in this.configureOptions) {\n if (this.configureOptions.hasOwnProperty(option)) {\n this.allowCreation = false;\n show = false;\n if (typeof filter === 'function') {\n show = filter(option,[]);\n show = show || this._handleObject(this.configureOptions[option], [option], true);\n }\n else if (filter === true || filter.indexOf(option) !== -1) {\n show = true;\n }\n\n if (show !== false) {\n this.allowCreation = true;\n\n // linebreak between categories\n if (counter > 0) {\n this._makeItem([]);\n }\n // a header for the category\n this._makeHeader(option);\n\n // get the sub options\n this._handleObject(this.configureOptions[option], [option]);\n }\n counter++;\n }\n }\n this._makeButton();\n this._push();\n //~ this.colorPicker.insertTo(this.container);\n }\n\n\n /**\n * draw all DOM elements on the screen\n * @private\n */\n _push() {\n this.wrapper = document.createElement('div');\n this.wrapper.className = 'vis-configuration-wrapper';\n this.container.appendChild(this.wrapper);\n for (var i = 0; i < this.domElements.length; i++) {\n this.wrapper.appendChild(this.domElements[i]);\n }\n\n this._showPopupIfNeeded()\n }\n\n\n /**\n * delete all DOM elements\n * @private\n */\n _clean() {\n for (var i = 0; i < this.domElements.length; i++) {\n this.wrapper.removeChild(this.domElements[i]);\n }\n\n if (this.wrapper !== undefined) {\n this.container.removeChild(this.wrapper);\n this.wrapper = undefined;\n }\n this.domElements = [];\n\n this._removePopup();\n }\n\n\n /**\n * get the value from the actualOptions if it exists\n * @param {array} path | where to look for the actual option\n * @returns {*}\n * @private\n */\n _getValue(path) {\n let base = this.moduleOptions;\n for (let i = 0; i < path.length; i++) {\n if (base[path[i]] !== undefined) {\n base = base[path[i]];\n }\n else {\n base = undefined;\n break;\n }\n }\n return base;\n }\n\n\n /**\n * all option elements are wrapped in an item\n * @param {Array} path | where to look for the actual option\n * @param {Array.} domElements\n * @returns {number}\n * @private\n */\n _makeItem(path, ...domElements) {\n if (this.allowCreation === true) {\n let item = document.createElement('div');\n item.className = 'vis-configuration vis-config-item vis-config-s' + path.length;\n domElements.forEach((element) => {\n item.appendChild(element);\n });\n this.domElements.push(item);\n return this.domElements.length;\n }\n return 0;\n }\n\n\n /**\n * header for major subjects\n * @param {string} name\n * @private\n */\n _makeHeader(name) {\n let div = document.createElement('div');\n div.className = 'vis-configuration vis-config-header';\n div.innerHTML = name;\n this._makeItem([],div);\n }\n\n\n /**\n * make a label, if it is an object label, it gets different styling.\n * @param {string} name\n * @param {array} path | where to look for the actual option\n * @param {string} objectLabel\n * @returns {HTMLElement}\n * @private\n */\n _makeLabel(name, path, objectLabel = false) {\n let div = document.createElement('div');\n div.className = 'vis-configuration vis-config-label vis-config-s' + path.length;\n if (objectLabel === true) {\n div.innerHTML = '' + name + ':';\n }\n else {\n div.innerHTML = name + ':';\n }\n return div;\n }\n\n\n /**\n * make a dropdown list for multiple possible string optoins\n * @param {Array.} arr\n * @param {number} value\n * @param {array} path | where to look for the actual option\n * @private\n */\n _makeDropdown(arr, value, path) {\n let select = document.createElement('select');\n select.className = 'vis-configuration vis-config-select';\n let selectedValue = 0;\n if (value !== undefined) {\n if (arr.indexOf(value) !== -1) {\n selectedValue = arr.indexOf(value);\n }\n }\n\n for (let i = 0; i < arr.length; i++) {\n let option = document.createElement('option');\n option.value = arr[i];\n if (i === selectedValue) {\n option.selected = 'selected';\n }\n option.innerHTML = arr[i];\n select.appendChild(option);\n }\n\n let me = this;\n select.onchange = function () {me._update(this.value, path);};\n\n let label = this._makeLabel(path[path.length-1], path);\n this._makeItem(path, label, select);\n }\n\n\n /**\n * make a range object for numeric options\n * @param {Array.} arr\n * @param {number} value\n * @param {array} path | where to look for the actual option\n * @private\n */\n _makeRange(arr, value, path) {\n let defaultValue = arr[0];\n let min = arr[1];\n let max = arr[2];\n let step = arr[3];\n let range = document.createElement('input');\n range.className = 'vis-configuration vis-config-range';\n try {\n range.type = 'range'; // not supported on IE9\n range.min = min;\n range.max = max;\n }\n // TODO: Add some error handling and remove this lint exception\n catch (err) {} // eslint-disable-line no-empty\n range.step = step;\n\n // set up the popup settings in case they are needed.\n let popupString = '';\n let popupValue = 0;\n\n if (value !== undefined) {\n let factor = 1.20;\n if (value < 0 && value * factor < min) {\n range.min = Math.ceil(value * factor);\n popupValue = range.min;\n popupString = 'range increased';\n }\n else if (value / factor < min) {\n range.min = Math.ceil(value / factor);\n popupValue = range.min;\n popupString = 'range increased';\n }\n if (value * factor > max && max !== 1) {\n range.max = Math.ceil(value * factor);\n popupValue = range.max;\n popupString = 'range increased';\n }\n range.value = value;\n }\n else {\n range.value = defaultValue;\n }\n\n let input = document.createElement('input');\n input.className = 'vis-configuration vis-config-rangeinput';\n input.value = range.value;\n\n var me = this;\n range.onchange = function () {input.value = this.value; me._update(Number(this.value), path);};\n range.oninput = function () {input.value = this.value; };\n\n let label = this._makeLabel(path[path.length-1], path);\n let itemIndex = this._makeItem(path, label, range, input);\n\n // if a popup is needed AND it has not been shown for this value, show it.\n if (popupString !== '' && this.popupHistory[itemIndex] !== popupValue) {\n this.popupHistory[itemIndex] = popupValue;\n this._setupPopup(popupString, itemIndex);\n }\n }\n\n /**\n * make a button object\n * @private\n */\n _makeButton() {\n if (this.options.showButton === true) {\n let generateButton = document.createElement('div');\n generateButton.className = 'vis-configuration vis-config-button';\n generateButton.innerHTML = 'generate options';\n generateButton.onclick = () => {this._printOptions();};\n generateButton.onmouseover = () => {generateButton.className = 'vis-configuration vis-config-button hover';};\n generateButton.onmouseout = () => {generateButton.className = 'vis-configuration vis-config-button';};\n\n this.optionsContainer = document.createElement('div');\n this.optionsContainer.className = 'vis-configuration vis-config-option-container';\n\n this.domElements.push(this.optionsContainer);\n this.domElements.push(generateButton);\n }\n }\n\n\n /**\n * prepare the popup\n * @param {string} string\n * @param {number} index\n * @private\n */\n _setupPopup(string, index) {\n if (this.initialized === true && this.allowCreation === true && this.popupCounter < this.popupLimit) {\n let div = document.createElement(\"div\");\n div.id = \"vis-configuration-popup\";\n div.className = \"vis-configuration-popup\";\n div.innerHTML = string;\n div.onclick = () => {this._removePopup()};\n this.popupCounter += 1;\n this.popupDiv = {html:div, index:index};\n }\n }\n\n\n /**\n * remove the popup from the dom\n * @private\n */\n _removePopup() {\n if (this.popupDiv.html !== undefined) {\n this.popupDiv.html.parentNode.removeChild(this.popupDiv.html);\n clearTimeout(this.popupDiv.hideTimeout);\n clearTimeout(this.popupDiv.deleteTimeout);\n this.popupDiv = {};\n }\n }\n\n\n /**\n * Show the popup if it is needed.\n * @private\n */\n _showPopupIfNeeded() {\n if (this.popupDiv.html !== undefined) {\n let correspondingElement = this.domElements[this.popupDiv.index];\n let rect = correspondingElement.getBoundingClientRect();\n this.popupDiv.html.style.left = rect.left + \"px\";\n this.popupDiv.html.style.top = rect.top - 30 + \"px\"; // 30 is the height;\n document.body.appendChild(this.popupDiv.html)\n this.popupDiv.hideTimeout = setTimeout(() => {\n this.popupDiv.html.style.opacity = 0;\n },1500);\n this.popupDiv.deleteTimeout = setTimeout(() => {\n this._removePopup();\n },1800)\n }\n }\n\n /**\n * make a checkbox for boolean options.\n * @param {number} defaultValue\n * @param {number} value\n * @param {array} path | where to look for the actual option\n * @private\n */\n _makeCheckbox(defaultValue, value, path) {\n var checkbox = document.createElement('input');\n checkbox.type = 'checkbox';\n checkbox.className = 'vis-configuration vis-config-checkbox';\n checkbox.checked = defaultValue;\n if (value !== undefined) {\n checkbox.checked = value;\n if (value !== defaultValue) {\n if (typeof defaultValue === 'object') {\n if (value !== defaultValue.enabled) {\n this.changedOptions.push({path:path, value:value});\n }\n }\n else {\n this.changedOptions.push({path:path, value:value});\n }\n }\n }\n\n let me = this;\n checkbox.onchange = function() {me._update(this.checked, path)};\n\n let label = this._makeLabel(path[path.length-1], path);\n this._makeItem(path, label, checkbox);\n }\n\n /**\n * make a text input field for string options.\n * @param {number} defaultValue\n * @param {number} value\n * @param {array} path | where to look for the actual option\n * @private\n */\n _makeTextInput(defaultValue, value, path) {\n var checkbox = document.createElement('input');\n checkbox.type = 'text';\n checkbox.className = 'vis-configuration vis-config-text';\n checkbox.value = value;\n if (value !== defaultValue) {\n this.changedOptions.push({path:path, value:value});\n }\n\n let me = this;\n checkbox.onchange = function() {me._update(this.value, path)};\n\n let label = this._makeLabel(path[path.length-1], path);\n this._makeItem(path, label, checkbox);\n }\n\n\n /**\n * make a color field with a color picker for color fields\n * @param {Array.} arr\n * @param {number} value\n * @param {array} path | where to look for the actual option\n * @private\n */\n _makeColorField(arr, value, path) {\n let defaultColor = arr[1];\n let div = document.createElement('div');\n value = value === undefined ? defaultColor : value;\n\n if (value !== 'none') {\n div.className = 'vis-configuration vis-config-colorBlock';\n div.style.backgroundColor = value;\n }\n else {\n div.className = 'vis-configuration vis-config-colorBlock none';\n }\n\n value = value === undefined ? defaultColor : value;\n div.onclick = () => {\n this._showColorPicker(value,div,path);\n };\n\n let label = this._makeLabel(path[path.length-1], path);\n this._makeItem(path,label, div);\n }\n\n\n /**\n * used by the color buttons to call the color picker.\n * @param {number} value\n * @param {HTMLElement} div\n * @param {array} path | where to look for the actual option\n * @private\n */\n _showColorPicker(value, div, path) {\n // clear the callback from this div\n div.onclick = function() {};\n\n this.colorPicker.insertTo(div);\n this.colorPicker.show();\n\n this.colorPicker.setColor(value);\n this.colorPicker.setUpdateCallback((color) => {\n let colorString = 'rgba(' + color.r + ',' + color.g + ',' + color.b + ',' + color.a + ')';\n div.style.backgroundColor = colorString;\n this._update(colorString,path);\n });\n\n // on close of the colorpicker, restore the callback.\n this.colorPicker.setCloseCallback(() => {\n div.onclick = () => {\n this._showColorPicker(value,div,path);\n };\n });\n }\n\n\n /**\n * parse an object and draw the correct items\n * @param {Object} obj\n * @param {array} [path=[]] | where to look for the actual option\n * @param {boolean} [checkOnly=false]\n * @returns {boolean}\n * @private\n */\n _handleObject(obj, path = [], checkOnly = false) {\n let show = false;\n let filter = this.options.filter;\n let visibleInSet = false;\n for (let subObj in obj) {\n if (obj.hasOwnProperty(subObj)) {\n show = true;\n let item = obj[subObj];\n let newPath = util.copyAndExtendArray(path, subObj);\n if (typeof filter === 'function') {\n show = filter(subObj,path);\n\n // if needed we must go deeper into the object.\n if (show === false) {\n if (!(item instanceof Array) && typeof item !== 'string' && typeof item !== 'boolean' && item instanceof Object) {\n this.allowCreation = false;\n show = this._handleObject(item, newPath, true);\n this.allowCreation = checkOnly === false;\n }\n }\n }\n\n if (show !== false) {\n visibleInSet = true;\n let value = this._getValue(newPath);\n\n if (item instanceof Array) {\n this._handleArray(item, value, newPath);\n }\n else if (typeof item === 'string') {\n this._makeTextInput(item, value, newPath);\n }\n else if (typeof item === 'boolean') {\n this._makeCheckbox(item, value, newPath);\n }\n else if (item instanceof Object) {\n // collapse the physics options that are not enabled\n let draw = true;\n if (path.indexOf('physics') !== -1) {\n if (this.moduleOptions.physics.solver !== subObj) {\n draw = false;\n }\n }\n\n if (draw === true) {\n // initially collapse options with an disabled enabled option.\n if (item.enabled !== undefined) {\n let enabledPath = util.copyAndExtendArray(newPath, 'enabled');\n let enabledValue = this._getValue(enabledPath);\n if (enabledValue === true) {\n let label = this._makeLabel(subObj, newPath, true);\n this._makeItem(newPath, label);\n visibleInSet = this._handleObject(item, newPath) || visibleInSet;\n }\n else {\n this._makeCheckbox(item, enabledValue, newPath);\n }\n }\n else {\n let label = this._makeLabel(subObj, newPath, true);\n this._makeItem(newPath, label);\n visibleInSet = this._handleObject(item, newPath) || visibleInSet;\n }\n }\n }\n else {\n console.error('dont know how to handle', item, subObj, newPath);\n }\n }\n }\n }\n return visibleInSet;\n }\n\n\n /**\n * handle the array type of option\n * @param {Array.} arr\n * @param {number} value\n * @param {array} path | where to look for the actual option\n * @private\n */\n _handleArray(arr, value, path) {\n if (typeof arr[0] === 'string' && arr[0] === 'color') {\n this._makeColorField(arr, value, path);\n if (arr[1] !== value) {this.changedOptions.push({path:path, value:value});}\n }\n else if (typeof arr[0] === 'string') {\n this._makeDropdown(arr, value, path);\n if (arr[0] !== value) {this.changedOptions.push({path:path, value:value});}\n }\n else if (typeof arr[0] === 'number') {\n this._makeRange(arr, value, path);\n if (arr[0] !== value) {this.changedOptions.push({path:path, value:Number(value)});}\n }\n }\n\n\n\n /**\n * called to update the network with the new settings.\n * @param {number} value\n * @param {array} path | where to look for the actual option\n * @private\n */\n _update(value, path) {\n let options = this._constructOptions(value,path);\n\n if (this.parent.body && this.parent.body.emitter && this.parent.body.emitter.emit) {\n this.parent.body.emitter.emit(\"configChange\", options);\n }\n this.initialized = true;\n this.parent.setOptions(options);\n }\n\n\n /**\n *\n * @param {string|Boolean} value\n * @param {Array.} path\n * @param {{}} optionsObj\n * @returns {{}}\n * @private\n */\n _constructOptions(value, path, optionsObj = {}) {\n let pointer = optionsObj;\n\n // when dropdown boxes can be string or boolean, we typecast it into correct types\n value = value === 'true' ? true : value;\n value = value === 'false' ? false : value;\n\n for (let i = 0; i < path.length; i++) {\n if (path[i] !== 'global') {\n if (pointer[path[i]] === undefined) {\n pointer[path[i]] = {};\n }\n if (i !== path.length - 1) {\n pointer = pointer[path[i]];\n }\n else {\n pointer[path[i]] = value;\n }\n }\n }\n return optionsObj;\n }\n\n /**\n * @private\n */\n _printOptions() {\n let options = this.getOptions();\n this.optionsContainer.innerHTML = '
var options = ' + JSON.stringify(options, null, 2) + '
';\n }\n\n /**\n *\n * @returns {{}} options\n */\n getOptions() {\n let options = {};\n for (var i = 0; i < this.changedOptions.length; i++) {\n this._constructOptions(this.changedOptions[i].value, this.changedOptions[i].path, options)\n }\n return options;\n }\n}\n\n\nexport default Configurator;\n","/**\n * This object contains all possible options. It will check if the types are correct, if required if the option is one\n * of the allowed values.\n *\n * __any__ means that the name of the property does not matter.\n * __type__ is a required field for all objects and contains the allowed types of all objects\n */\nlet string = 'string';\nlet bool = 'boolean';\nlet number = 'number';\nlet array = 'array';\nlet object = 'object'; // should only be in a __type__ property\nlet dom = 'dom';\nlet any = 'any';\n\n// List of endpoints\nlet endPoints = ['arrow', 'circle', 'bar'];\n\nlet allOptions = {\n configure: {\n enabled: { boolean: bool },\n filter: { boolean: bool, string, array, 'function': 'function' },\n container: { dom },\n showButton: { boolean: bool },\n __type__: { object, boolean: bool, string, array, 'function': 'function' }\n },\n edges: {\n arrows: {\n to: { enabled: { boolean: bool }, scaleFactor: { number }, type: { string: endPoints }, __type__: { object, boolean: bool } },\n middle: { enabled: { boolean: bool }, scaleFactor: { number }, type: { string: endPoints }, __type__: { object, boolean: bool } },\n from: { enabled: { boolean: bool }, scaleFactor: { number }, type: { string: endPoints }, __type__: { object, boolean: bool } },\n __type__: { string: ['from', 'to', 'middle'], object }\n },\n arrowStrikethrough: { boolean: bool },\n background: {\n enabled: { boolean: bool },\n color: { string },\n size: { number },\n dashes: { boolean: bool, array },\n __type__: { object, boolean: bool }\n },\n chosen: {\n label: { boolean: bool, 'function': 'function' },\n edge: { boolean: bool, 'function': 'function' },\n __type__: { object, boolean: bool }\n },\n color: {\n color: { string },\n highlight: { string },\n hover: { string },\n inherit: { string: ['from', 'to', 'both'], boolean: bool },\n opacity: { number },\n __type__: { object, string }\n },\n dashes: { boolean: bool, array },\n font: {\n color: { string },\n size: { number }, // px\n face: { string },\n background: { string },\n strokeWidth: { number }, // px\n strokeColor: { string },\n align: { string: ['horizontal', 'top', 'middle', 'bottom'] },\n vadjust: { number },\n multi: { boolean: bool, string },\n bold: {\n color: { string },\n size: { number }, // px\n face: { string },\n mod: { string },\n vadjust: { number },\n __type__: { object, string }\n },\n boldital: {\n color: { string },\n size: { number }, // px\n face: { string },\n mod: { string },\n vadjust: { number },\n __type__: { object, string }\n },\n ital: {\n color: { string },\n size: { number }, // px\n face: { string },\n mod: { string },\n vadjust: { number },\n __type__: { object, string }\n },\n mono: {\n color: { string },\n size: { number }, // px\n face: { string },\n mod: { string },\n vadjust: { number },\n __type__: { object, string }\n },\n __type__: { object, string }\n },\n hidden: { boolean: bool },\n hoverWidth: { 'function': 'function', number },\n label: { string, 'undefined': 'undefined' },\n labelHighlightBold: { boolean: bool },\n length: { number, 'undefined': 'undefined' },\n physics: { boolean: bool },\n scaling: {\n min: { number },\n max: { number },\n label: {\n enabled: { boolean: bool },\n min: { number },\n max: { number },\n maxVisible: { number },\n drawThreshold: { number },\n __type__: { object, boolean: bool }\n },\n customScalingFunction: { 'function': 'function' },\n __type__: { object }\n },\n selectionWidth: { 'function': 'function', number },\n selfReferenceSize: { number },\n shadow: {\n enabled: { boolean: bool },\n color: { string },\n size: { number },\n x: { number },\n y: { number },\n __type__: { object, boolean: bool }\n },\n smooth: {\n enabled: { boolean: bool },\n type: { string: ['dynamic', 'continuous', 'discrete', 'diagonalCross', 'straightCross', 'horizontal', 'vertical', 'curvedCW', 'curvedCCW', 'cubicBezier'] },\n roundness: { number },\n forceDirection: { string: ['horizontal', 'vertical', 'none'], boolean: bool },\n __type__: { object, boolean: bool }\n },\n title: { string, 'undefined': 'undefined' },\n width: { number },\n widthConstraint: {\n maximum: { number },\n __type__: { object, boolean: bool, number }\n },\n value: { number, 'undefined': 'undefined' },\n __type__: { object }\n },\n groups: {\n useDefaultGroups: { boolean: bool },\n __any__: 'get from nodes, will be overwritten below',\n __type__: { object }\n },\n interaction: {\n dragNodes: { boolean: bool },\n dragView: { boolean: bool },\n hideEdgesOnDrag: { boolean: bool },\n hideEdgesOnZoom: { boolean: bool },\n hideNodesOnDrag: { boolean: bool },\n hover: { boolean: bool },\n keyboard: {\n enabled: { boolean: bool },\n speed: { x: { number }, y: { number }, zoom: { number }, __type__: { object } },\n bindToWindow: { boolean: bool },\n __type__: { object, boolean: bool }\n },\n multiselect: { boolean: bool },\n navigationButtons: { boolean: bool },\n selectable: { boolean: bool },\n selectConnectedEdges: { boolean: bool },\n hoverConnectedEdges: { boolean: bool },\n tooltipDelay: { number },\n zoomView: { boolean: bool },\n zoomSpeed: { number },\n __type__: { object }\n },\n layout: {\n randomSeed: { 'undefined': 'undefined', number },\n improvedLayout: { boolean: bool },\n hierarchical: {\n enabled: { boolean: bool },\n levelSeparation: { number },\n nodeSpacing: { number },\n treeSpacing: { number },\n blockShifting: { boolean: bool },\n edgeMinimization: { boolean: bool },\n parentCentralization: { boolean: bool },\n direction: { string: ['UD', 'DU', 'LR', 'RL'] }, // UD, DU, LR, RL\n sortMethod: { string: ['hubsize', 'directed'] }, // hubsize, directed\n __type__: { object, boolean: bool }\n },\n __type__: { object }\n },\n manipulation: {\n enabled: { boolean: bool },\n initiallyActive: { boolean: bool },\n addNode: { boolean: bool, 'function': 'function' },\n addEdge: { boolean: bool, 'function': 'function' },\n editNode: { 'function': 'function' },\n editEdge: {\n editWithoutDrag: { 'function' : 'function' },\n __type__: {object, boolean: bool, 'function': 'function' }\n },\n deleteNode: { boolean: bool, 'function': 'function' },\n deleteEdge: { boolean: bool, 'function': 'function' },\n controlNodeStyle: 'get from nodes, will be overwritten below',\n __type__: { object, boolean: bool }\n },\n nodes: {\n borderWidth: { number },\n borderWidthSelected: { number, 'undefined': 'undefined' },\n brokenImage: { string, 'undefined': 'undefined' },\n chosen: {\n label: { boolean: bool, 'function': 'function' },\n node: { boolean: bool, 'function': 'function' },\n __type__: { object, boolean: bool }\n },\n color: {\n border: { string },\n background: { string },\n highlight: {\n border: { string },\n background: { string },\n __type__: { object, string }\n },\n hover: {\n border: { string },\n background: { string },\n __type__: { object, string }\n },\n __type__: { object, string }\n },\n fixed: {\n x: { boolean: bool },\n y: { boolean: bool },\n __type__: { object, boolean: bool }\n },\n font: {\n align: { string },\n color: { string },\n size: { number }, // px\n face: { string },\n background: { string },\n strokeWidth: { number }, // px\n strokeColor: { string },\n vadjust: { number },\n multi: { boolean: bool, string },\n bold: {\n color: { string },\n size: { number }, // px\n face: { string },\n mod: { string },\n vadjust: { number },\n __type__: { object, string }\n },\n boldital: {\n color: { string },\n size: { number }, // px\n face: { string },\n mod: { string },\n vadjust: { number },\n __type__: { object, string }\n },\n ital: {\n color: { string },\n size: { number }, // px\n face: { string },\n mod: { string },\n vadjust: { number },\n __type__: { object, string }\n },\n mono: {\n color: { string },\n size: { number }, // px\n face: { string },\n mod: { string },\n vadjust: { number },\n __type__: { object, string }\n },\n __type__: { object, string }\n },\n group: { string, number, 'undefined': 'undefined' },\n heightConstraint: {\n minimum: { number },\n valign: { string },\n __type__: { object, boolean: bool, number }\n },\n hidden: { boolean: bool },\n icon: {\n face: { string },\n code: { string }, //'\\uf007',\n size: { number }, //50,\n color: { string },\n __type__: { object }\n },\n id: { string, number },\n image: {\n selected: { string, 'undefined': 'undefined' }, // --> URL\n unselected: { string, 'undefined': 'undefined' }, // --> URL\n __type__: { object, string }\n },\n label: { string, 'undefined': 'undefined' },\n labelHighlightBold: { boolean: bool },\n level: { number, 'undefined': 'undefined' },\n margin: {\n top: { number },\n right: { number },\n bottom: { number },\n left: { number },\n __type__: { object, number }\n },\n mass: { number },\n physics: { boolean: bool },\n scaling: {\n min: { number },\n max: { number },\n label: {\n enabled: { boolean: bool },\n min: { number },\n max: { number },\n maxVisible: { number },\n drawThreshold: { number },\n __type__: { object, boolean: bool }\n },\n customScalingFunction: { 'function': 'function' },\n __type__: { object }\n },\n shadow: {\n enabled: { boolean: bool },\n color: { string },\n size: { number },\n x: { number },\n y: { number },\n __type__: { object, boolean: bool }\n },\n shape: { string: ['ellipse', 'circle', 'database', 'box', 'text', 'image', 'circularImage', 'diamond', 'dot', 'star', 'triangle', 'triangleDown', 'square', 'icon', 'hexagon'] },\n shapeProperties: {\n borderDashes: { boolean: bool, array },\n borderRadius: { number },\n interpolation: { boolean: bool },\n useImageSize: { boolean: bool },\n useBorderWithImage: { boolean: bool },\n __type__: { object }\n },\n size: { number },\n title: { string, dom, 'undefined': 'undefined' },\n value: { number, 'undefined': 'undefined' },\n widthConstraint: {\n minimum: { number },\n maximum: { number },\n __type__: { object, boolean: bool, number }\n },\n x: { number },\n y: { number },\n __type__: { object }\n },\n physics: {\n enabled: { boolean: bool },\n barnesHut: {\n gravitationalConstant: { number },\n centralGravity: { number },\n springLength: { number },\n springConstant: { number },\n damping: { number },\n avoidOverlap: { number },\n __type__: { object }\n },\n forceAtlas2Based: {\n gravitationalConstant: { number },\n centralGravity: { number },\n springLength: { number },\n springConstant: { number },\n damping: { number },\n avoidOverlap: { number },\n __type__: { object }\n },\n repulsion: {\n centralGravity: { number },\n springLength: { number },\n springConstant: { number },\n nodeDistance: { number },\n damping: { number },\n __type__: { object }\n },\n hierarchicalRepulsion: {\n centralGravity: { number },\n springLength: { number },\n springConstant: { number },\n nodeDistance: { number },\n damping: { number },\n __type__: { object }\n },\n maxVelocity: { number },\n minVelocity: { number }, // px/s\n solver: { string: ['barnesHut', 'repulsion', 'hierarchicalRepulsion', 'forceAtlas2Based'] },\n stabilization: {\n enabled: { boolean: bool },\n iterations: { number }, // maximum number of iteration to stabilize\n updateInterval: { number },\n onlyDynamicEdges: { boolean: bool },\n fit: { boolean: bool },\n __type__: { object, boolean: bool }\n },\n timestep: { number },\n adaptiveTimestep: { boolean: bool },\n __type__: { object, boolean: bool }\n },\n\n //globals :\n autoResize: { boolean: bool },\n clickToUse: { boolean: bool },\n locale: { string },\n locales: {\n __any__: { any },\n __type__: { object }\n },\n height: { string },\n width: { string },\n __type__: { object }\n};\n\nallOptions.groups.__any__ = allOptions.nodes;\nallOptions.manipulation.controlNodeStyle = allOptions.nodes;\n\n\nlet configureOptions = {\n nodes: {\n borderWidth: [1, 0, 10, 1],\n borderWidthSelected: [2, 0, 10, 1],\n color: {\n border: ['color', '#2B7CE9'],\n background: ['color', '#97C2FC'],\n highlight: {\n border: ['color', '#2B7CE9'],\n background: ['color', '#D2E5FF']\n },\n hover: {\n border: ['color', '#2B7CE9'],\n background: ['color', '#D2E5FF']\n }\n },\n fixed: {\n x: false,\n y: false\n },\n font: {\n color: ['color', '#343434'],\n size: [14, 0, 100, 1], // px\n face: ['arial', 'verdana', 'tahoma'],\n background: ['color', 'none'],\n strokeWidth: [0, 0, 50, 1], // px\n strokeColor: ['color', '#ffffff']\n },\n //group: 'string',\n hidden: false,\n labelHighlightBold: true,\n //icon: {\n // face: 'string', //'FontAwesome',\n // code: 'string', //'\\uf007',\n // size: [50, 0, 200, 1], //50,\n // color: ['color','#2B7CE9'] //'#aa00ff'\n //},\n //image: 'string', // --> URL\n physics: true,\n scaling: {\n min: [10, 0, 200, 1],\n max: [30, 0, 200, 1],\n label: {\n enabled: false,\n min: [14, 0, 200, 1],\n max: [30, 0, 200, 1],\n maxVisible: [30, 0, 200, 1],\n drawThreshold: [5, 0, 20, 1]\n }\n },\n shadow: {\n enabled: false,\n color: 'rgba(0,0,0,0.5)',\n size: [10, 0, 20, 1],\n x: [5, -30, 30, 1],\n y: [5, -30, 30, 1]\n },\n shape: ['ellipse', 'box', 'circle', 'database', 'diamond', 'dot', 'square', 'star', 'text', 'triangle', 'triangleDown','hexagon'],\n shapeProperties: {\n borderDashes: false,\n borderRadius: [6, 0, 20, 1],\n interpolation: true,\n useImageSize: false\n },\n size: [25, 0, 200, 1]\n },\n edges: {\n arrows: {\n to: { enabled: false, scaleFactor: [1, 0, 3, 0.05], type: 'arrow' },\n middle: { enabled: false, scaleFactor: [1, 0, 3, 0.05], type: 'arrow' },\n from: { enabled: false, scaleFactor: [1, 0, 3, 0.05], type: 'arrow' }\n },\n arrowStrikethrough: true,\n color: {\n color: ['color', '#848484'],\n highlight: ['color', '#848484'],\n hover: ['color', '#848484'],\n inherit: ['from', 'to', 'both', true, false],\n opacity: [1, 0, 1, 0.05]\n },\n dashes: false,\n font: {\n color: ['color', '#343434'],\n size: [14, 0, 100, 1], // px\n face: ['arial', 'verdana', 'tahoma'],\n background: ['color', 'none'],\n strokeWidth: [2, 0, 50, 1], // px\n strokeColor: ['color', '#ffffff'],\n align: ['horizontal', 'top', 'middle', 'bottom']\n },\n hidden: false,\n hoverWidth: [1.5, 0, 5, 0.1],\n labelHighlightBold: true,\n physics: true,\n scaling: {\n min: [1, 0, 100, 1],\n max: [15, 0, 100, 1],\n label: {\n enabled: true,\n min: [14, 0, 200, 1],\n max: [30, 0, 200, 1],\n maxVisible: [30, 0, 200, 1],\n drawThreshold: [5, 0, 20, 1]\n }\n },\n selectionWidth: [1.5, 0, 5, 0.1],\n selfReferenceSize: [20, 0, 200, 1],\n shadow: {\n enabled: false,\n color: 'rgba(0,0,0,0.5)',\n size: [10, 0, 20, 1],\n x: [5, -30, 30, 1],\n y: [5, -30, 30, 1]\n },\n smooth: {\n enabled: true,\n type: ['dynamic', 'continuous', 'discrete', 'diagonalCross', 'straightCross', 'horizontal', 'vertical', 'curvedCW', 'curvedCCW', 'cubicBezier'],\n forceDirection: ['horizontal', 'vertical', 'none'],\n roundness: [0.5, 0, 1, 0.05]\n },\n width: [1, 0, 30, 1]\n },\n layout: {\n //randomSeed: [0, 0, 500, 1],\n //improvedLayout: true,\n hierarchical: {\n enabled: false,\n levelSeparation: [150, 20, 500, 5],\n nodeSpacing: [100, 20, 500, 5],\n treeSpacing: [200, 20, 500, 5],\n blockShifting: true,\n edgeMinimization: true,\n parentCentralization: true,\n direction: ['UD', 'DU', 'LR', 'RL'], // UD, DU, LR, RL\n sortMethod: ['hubsize', 'directed'] // hubsize, directed\n }\n },\n interaction: {\n dragNodes: true,\n dragView: true,\n hideEdgesOnDrag: false,\n hideEdgesOnZoom: false,\n hideNodesOnDrag: false,\n hover: false,\n keyboard: {\n enabled: false,\n speed: { x: [10, 0, 40, 1], y: [10, 0, 40, 1], zoom: [0.02, 0, 0.1, 0.005] },\n bindToWindow: true\n },\n multiselect: false,\n navigationButtons: false,\n selectable: true,\n selectConnectedEdges: true,\n hoverConnectedEdges: true,\n tooltipDelay: [300, 0, 1000, 25],\n zoomView: true,\n zoomSpeed: [1, 1, 1, 1]\n },\n manipulation: {\n enabled: false,\n initiallyActive: false\n },\n physics: {\n enabled: true,\n barnesHut: {\n //theta: [0.5, 0.1, 1, 0.05],\n gravitationalConstant: [-2000, -30000, 0, 50],\n centralGravity: [0.3, 0, 10, 0.05],\n springLength: [95, 0, 500, 5],\n springConstant: [0.04, 0, 1.2, 0.005],\n damping: [0.09, 0, 1, 0.01],\n avoidOverlap: [0, 0, 1, 0.01]\n },\n forceAtlas2Based: {\n //theta: [0.5, 0.1, 1, 0.05],\n gravitationalConstant: [-50, -500, 0, 1],\n centralGravity: [0.01, 0, 1, 0.005],\n springLength: [95, 0, 500, 5],\n springConstant: [0.08, 0, 1.2, 0.005],\n damping: [0.4, 0, 1, 0.01],\n avoidOverlap: [0, 0, 1, 0.01]\n },\n repulsion: {\n centralGravity: [0.2, 0, 10, 0.05],\n springLength: [200, 0, 500, 5],\n springConstant: [0.05, 0, 1.2, 0.005],\n nodeDistance: [100, 0, 500, 5],\n damping: [0.09, 0, 1, 0.01]\n },\n hierarchicalRepulsion: {\n centralGravity: [0.2, 0, 10, 0.05],\n springLength: [100, 0, 500, 5],\n springConstant: [0.01, 0, 1.2, 0.005],\n nodeDistance: [120, 0, 500, 5],\n damping: [0.09, 0, 1, 0.01]\n },\n maxVelocity: [50, 0, 150, 1],\n minVelocity: [0.1, 0.01, 0.5, 0.01],\n solver: ['barnesHut', 'forceAtlas2Based', 'repulsion', 'hierarchicalRepulsion'],\n timestep: [0.5, 0.01, 1, 0.01],\n //adaptiveTimestep: true\n }\n};\n\nexport {allOptions, configureOptions};\n","/**\n * The Floyd–Warshall algorithm is an algorithm for finding shortest paths in\n * a weighted graph with positive or negative edge weights (but with no negative\n * cycles). - https://en.wikipedia.org/wiki/Floyd–Warshall_algorithm\n */\nclass FloydWarshall {\n /**\n * @ignore\n */\n constructor() {\n }\n\n /**\n *\n * @param {Object} body\n * @param {Array.} nodesArray\n * @param {Array.} edgesArray\n * @returns {{}}\n */\n getDistances(body, nodesArray, edgesArray) {\n let D_matrix = {};\n let edges = body.edges;\n\n // prepare matrix with large numbers\n for (let i = 0; i < nodesArray.length; i++) {\n let node = nodesArray[i];\n let cell = {};\n D_matrix[node] = cell;\n for (let j = 0; j < nodesArray.length; j++) {\n cell[nodesArray[j]] = (i == j ? 0 : 1e9);\n }\n }\n\n // put the weights for the edges in. This assumes unidirectionality.\n for (let i = 0; i < edgesArray.length; i++) {\n let edge = edges[edgesArray[i]];\n // edge has to be connected if it counts to the distances. If it is connected to inner clusters it will crash so we also check if it is in the D_matrix\n if (edge.connected === true && D_matrix[edge.fromId] !== undefined && D_matrix[edge.toId] !== undefined) {\n D_matrix[edge.fromId][edge.toId] = 1;\n D_matrix[edge.toId][edge.fromId] = 1;\n }\n }\n\n let nodeCount = nodesArray.length;\n\n // Adapted FloydWarshall based on unidirectionality to greatly reduce complexity.\n for (let k = 0; k < nodeCount; k++) {\n let knode = nodesArray[k];\n let kcolm = D_matrix[knode];\n for (let i = 0; i < nodeCount - 1; i++) {\n let inode = nodesArray[i];\n let icolm = D_matrix[inode];\n for (let j = i + 1; j < nodeCount; j++) {\n let jnode = nodesArray[j];\n let jcolm = D_matrix[jnode];\n\n let val = Math.min(icolm[jnode], icolm[knode] + kcolm[jnode]);\n icolm[jnode] = val;\n jcolm[inode] = val;\n }\n }\n }\n\n return D_matrix;\n }\n}\n\nexport default FloydWarshall;","// distance finding algorithm\nimport FloydWarshall from \"./components/algorithms/FloydWarshall.js\"\n\n\n/**\n * KamadaKawai positions the nodes initially based on\n *\n * \"AN ALGORITHM FOR DRAWING GENERAL UNDIRECTED GRAPHS\"\n * -- Tomihisa KAMADA and Satoru KAWAI in 1989\n *\n * Possible optimizations in the distance calculation can be implemented.\n */\nclass KamadaKawai {\n /**\n * @param {Object} body\n * @param {number} edgeLength\n * @param {number} edgeStrength\n */\n constructor(body, edgeLength, edgeStrength) {\n this.body = body;\n this.springLength = edgeLength;\n this.springConstant = edgeStrength;\n this.distanceSolver = new FloydWarshall();\n }\n\n /**\n * Not sure if needed but can be used to update the spring length and spring constant\n * @param {Object} options\n */\n setOptions(options) {\n if (options) {\n if (options.springLength) {\n this.springLength = options.springLength;\n }\n if (options.springConstant) {\n this.springConstant = options.springConstant;\n }\n }\n }\n\n\n /**\n * Position the system\n * @param {Array.} nodesArray\n * @param {Array.} edgesArray\n * @param {boolean} [ignoreClusters=false]\n */\n solve(nodesArray, edgesArray, ignoreClusters = false) {\n // get distance matrix\n let D_matrix = this.distanceSolver.getDistances(this.body, nodesArray, edgesArray); // distance matrix\n\n // get the L Matrix\n this._createL_matrix(D_matrix);\n\n // get the K Matrix\n this._createK_matrix(D_matrix);\n\n // initial E Matrix\n this._createE_matrix();\n\n // calculate positions\n let threshold = 0.01;\n let innerThreshold = 1;\n let iterations = 0;\n let maxIterations = Math.max(1000, Math.min(10 * this.body.nodeIndices.length, 6000));\n let maxInnerIterations = 5;\n\n let maxEnergy = 1e9;\n let highE_nodeId = 0, dE_dx = 0, dE_dy = 0, delta_m = 0, subIterations = 0;\n\n while (maxEnergy > threshold && iterations < maxIterations) {\n iterations += 1;\n [highE_nodeId, maxEnergy, dE_dx, dE_dy] = this._getHighestEnergyNode(ignoreClusters);\n delta_m = maxEnergy;\n subIterations = 0;\n while (delta_m > innerThreshold && subIterations < maxInnerIterations) {\n subIterations += 1;\n this._moveNode(highE_nodeId, dE_dx, dE_dy);\n [delta_m, dE_dx, dE_dy] = this._getEnergy(highE_nodeId);\n }\n }\n }\n\n /**\n * get the node with the highest energy\n * @param {boolean} ignoreClusters\n * @returns {number[]}\n * @private\n */\n _getHighestEnergyNode(ignoreClusters) {\n let nodesArray = this.body.nodeIndices;\n let nodes = this.body.nodes;\n let maxEnergy = 0;\n let maxEnergyNodeId = nodesArray[0];\n let dE_dx_max = 0, dE_dy_max = 0;\n\n for (let nodeIdx = 0; nodeIdx < nodesArray.length; nodeIdx++) {\n let m = nodesArray[nodeIdx];\n // by not evaluating nodes with predefined positions we should only move nodes that have no positions.\n if ((nodes[m].predefinedPosition === false || nodes[m].isCluster === true && ignoreClusters === true) || nodes[m].options.fixed.x === true || nodes[m].options.fixed.y === true) {\n let [delta_m,dE_dx,dE_dy] = this._getEnergy(m);\n if (maxEnergy < delta_m) {\n maxEnergy = delta_m;\n maxEnergyNodeId = m;\n dE_dx_max = dE_dx;\n dE_dy_max = dE_dy;\n }\n }\n }\n\n return [maxEnergyNodeId, maxEnergy, dE_dx_max, dE_dy_max];\n }\n\n /**\n * calculate the energy of a single node\n * @param {Node.id} m\n * @returns {number[]}\n * @private\n */\n _getEnergy(m) {\n let [dE_dx,dE_dy] = this.E_sums[m];\n let delta_m = Math.sqrt(Math.pow(dE_dx, 2) + Math.pow(dE_dy, 2));\n return [delta_m, dE_dx, dE_dy];\n }\n\n /**\n * move the node based on it's energy\n * the dx and dy are calculated from the linear system proposed by Kamada and Kawai\n * @param {number} m\n * @param {number} dE_dx\n * @param {number} dE_dy\n * @private\n */\n _moveNode(m, dE_dx, dE_dy) {\n let nodesArray = this.body.nodeIndices;\n let nodes = this.body.nodes;\n let d2E_dx2 = 0;\n let d2E_dxdy = 0;\n let d2E_dy2 = 0;\n\n let x_m = nodes[m].x;\n let y_m = nodes[m].y;\n let km = this.K_matrix[m];\n let lm = this.L_matrix[m];\n\n for (let iIdx = 0; iIdx < nodesArray.length; iIdx++) {\n let i = nodesArray[iIdx];\n if (i !== m) {\n let x_i = nodes[i].x;\n let y_i = nodes[i].y;\n let kmat = km[i];\n let lmat = lm[i];\n let denominator = 1.0 / Math.pow(Math.pow(x_m - x_i, 2) + Math.pow(y_m - y_i, 2), 1.5);\n d2E_dx2 += kmat * (1 - lmat * Math.pow(y_m - y_i, 2) * denominator);\n d2E_dxdy += kmat * (lmat * (x_m - x_i) * (y_m - y_i) * denominator);\n d2E_dy2 += kmat * (1 - lmat * Math.pow(x_m - x_i, 2) * denominator);\n }\n }\n // make the variable names easier to make the solving of the linear system easier to read\n let A = d2E_dx2, B = d2E_dxdy, C = dE_dx, D = d2E_dy2, E = dE_dy;\n\n // solve the linear system for dx and dy\n let dy = (C / A + E / B) / (B / A - D / B);\n let dx = -(B * dy + C) / A;\n\n // move the node\n nodes[m].x += dx;\n nodes[m].y += dy;\n\n // Recalculate E_matrix (should be incremental)\n this._updateE_matrix(m);\n }\n\n\n /**\n * Create the L matrix: edge length times shortest path\n * @param {Object} D_matrix\n * @private\n */\n _createL_matrix(D_matrix) {\n let nodesArray = this.body.nodeIndices;\n let edgeLength = this.springLength;\n\n this.L_matrix = [];\n for (let i = 0; i < nodesArray.length; i++) {\n this.L_matrix[nodesArray[i]] = {};\n for (let j = 0; j < nodesArray.length; j++) {\n this.L_matrix[nodesArray[i]][nodesArray[j]] = edgeLength * D_matrix[nodesArray[i]][nodesArray[j]];\n }\n }\n }\n\n\n /**\n * Create the K matrix: spring constants times shortest path\n * @param {Object} D_matrix\n * @private\n */\n _createK_matrix(D_matrix) {\n let nodesArray = this.body.nodeIndices;\n let edgeStrength = this.springConstant;\n\n this.K_matrix = [];\n for (let i = 0; i < nodesArray.length; i++) {\n this.K_matrix[nodesArray[i]] = {};\n for (let j = 0; j < nodesArray.length; j++) {\n this.K_matrix[nodesArray[i]][nodesArray[j]] = edgeStrength * Math.pow(D_matrix[nodesArray[i]][nodesArray[j]], -2);\n }\n }\n }\n\n /**\n * Create matrix with all energies between nodes\n * @private\n */\n _createE_matrix() {\n let nodesArray = this.body.nodeIndices;\n let nodes = this.body.nodes;\n this.E_matrix = {};\n this.E_sums = {};\n for (let mIdx = 0; mIdx < nodesArray.length; mIdx++) {\n this.E_matrix[nodesArray[mIdx]] = [];\n }\n for (let mIdx = 0; mIdx < nodesArray.length; mIdx++) {\n let m = nodesArray[mIdx];\n let x_m = nodes[m].x;\n let y_m = nodes[m].y;\n let dE_dx = 0;\n let dE_dy = 0;\n for (let iIdx = mIdx; iIdx < nodesArray.length; iIdx++) {\n let i = nodesArray[iIdx];\n if (i !== m) {\n let x_i = nodes[i].x;\n let y_i = nodes[i].y;\n let denominator = 1.0 / Math.sqrt(Math.pow(x_m - x_i, 2) + Math.pow(y_m - y_i, 2));\n this.E_matrix[m][iIdx] = [\n this.K_matrix[m][i] * ((x_m - x_i) - this.L_matrix[m][i] * (x_m - x_i) * denominator),\n this.K_matrix[m][i] * ((y_m - y_i) - this.L_matrix[m][i] * (y_m - y_i) * denominator)\n ];\n this.E_matrix[i][mIdx] = this.E_matrix[m][iIdx];\n dE_dx += this.E_matrix[m][iIdx][0];\n dE_dy += this.E_matrix[m][iIdx][1];\n }\n }\n //Store sum\n this.E_sums[m] = [dE_dx, dE_dy];\n }\n }\n\n /**\n * Update method, just doing single column (rows are auto-updated) (update all sums)\n *\n * @param {number} m\n * @private\n */\n _updateE_matrix(m) {\n let nodesArray = this.body.nodeIndices;\n let nodes = this.body.nodes;\n let colm = this.E_matrix[m];\n let kcolm = this.K_matrix[m];\n let lcolm = this.L_matrix[m];\n let x_m = nodes[m].x;\n let y_m = nodes[m].y;\n let dE_dx = 0;\n let dE_dy = 0;\n for (let iIdx = 0; iIdx < nodesArray.length; iIdx++) {\n let i = nodesArray[iIdx];\n if (i !== m) {\n //Keep old energy value for sum modification below\n let cell = colm[iIdx];\n let oldDx = cell[0];\n let oldDy = cell[1];\n\n //Calc new energy:\n let x_i = nodes[i].x;\n let y_i = nodes[i].y;\n let denominator = 1.0 / Math.sqrt(Math.pow(x_m - x_i, 2) + Math.pow(y_m - y_i, 2));\n let dx = kcolm[i] * ((x_m - x_i) - lcolm[i] * (x_m - x_i) * denominator);\n let dy = kcolm[i] * ((y_m - y_i) - lcolm[i] * (y_m - y_i) * denominator);\n colm[iIdx] = [dx, dy];\n dE_dx += dx;\n dE_dy += dy;\n\n //add new energy to sum of each column\n let sum = this.E_sums[i];\n sum[0] += (dx-oldDx);\n sum[1] += (dy-oldDy);\n }\n }\n //Store sum at -1 index\n this.E_sums[m] = [dE_dx, dE_dy];\n }\n}\n\nexport default KamadaKawai;","// Load custom shapes into CanvasRenderingContext2D\nimport './shapes';\n\nimport Emitter from 'component-emitter';\nimport util from 'vis-util';\nimport dotparser from './dotparser';\nimport * as gephiParser from './gephiParser';\nimport Activator from '../shared/Activator';\nimport locales from './locales';\n\nimport Images from './Images';\nimport Groups from './modules/Groups';\nimport NodesHandler from './modules/NodesHandler';\nimport EdgesHandler from './modules/EdgesHandler';\nimport PhysicsEngine from './modules/PhysicsEngine';\nimport ClusterEngine from './modules/Clustering';\nimport CanvasRenderer from './modules/CanvasRenderer';\nimport Canvas from './modules/Canvas';\nimport View from './modules/View';\nimport InteractionHandler from './modules/InteractionHandler';\nimport SelectionHandler from \"./modules/SelectionHandler\";\nimport LayoutEngine from \"./modules/LayoutEngine\";\nimport ManipulationSystem from \"./modules/ManipulationSystem\";\nimport Configurator from \"./../shared/Configurator\";\nimport { Validator, printStyle } from \"./../shared/Validator\";\nimport {allOptions, configureOptions} from './options.js';\nimport KamadaKawai from \"./modules/KamadaKawai.js\";\n\n\n/**\n * Create a network visualization, displaying nodes and edges.\n *\n * @param {Element} container The DOM element in which the Network will\n * be created. Normally a div element.\n * @param {Object} data An object containing parameters\n * {Array} nodes\n * {Array} edges\n * @param {Object} options Options\n * @constructor Network\n */\nexport function Network(container, data, options) {\n if (!(this instanceof Network)) {\n throw new SyntaxError('Constructor must be called with the new operator');\n }\n\n // set constant values\n this.options = {};\n this.defaultOptions = {\n locale: 'en',\n locales: locales,\n clickToUse: false\n };\n util.extend(this.options, this.defaultOptions);\n\n /**\n * Containers for nodes and edges.\n *\n * 'edges' and 'nodes' contain the full definitions of all the network elements.\n * 'nodeIndices' and 'edgeIndices' contain the id's of the active elements.\n *\n * The distinction is important, because a defined node need not be active, i.e.\n * visible on the canvas. This happens in particular when clusters are defined, in\n * that case there will be nodes and edges not displayed.\n * The bottom line is that all code with actions related to visibility, *must* use\n * 'nodeIndices' and 'edgeIndices', not 'nodes' and 'edges' directly.\n */\n this.body = {\n container: container,\n\n // See comment above for following fields\n nodes: {},\n nodeIndices: [],\n edges: {},\n edgeIndices: [],\n\n emitter: {\n on: this.on.bind(this),\n off: this.off.bind(this),\n emit: this.emit.bind(this),\n once: this.once.bind(this)\n },\n eventListeners: {\n onTap: function() {},\n onTouch: function() {},\n onDoubleTap: function() {},\n onHold: function() {},\n onDragStart: function() {},\n onDrag: function() {},\n onDragEnd: function() {},\n onMouseWheel: function() {},\n onPinch: function() {},\n onMouseMove: function() {},\n onRelease: function() {},\n onContext: function() {}\n },\n data: {\n nodes: null, // A DataSet or DataView\n edges: null // A DataSet or DataView\n },\n functions: {\n createNode: function() {},\n createEdge: function() {},\n getPointer: function() {}\n },\n modules: {},\n view: {\n scale: 1,\n translation: {x: 0, y: 0}\n }\n };\n\n\n\n // bind the event listeners\n this.bindEventListeners();\n\n // setting up all modules\n this.images = new Images(() => this.body.emitter.emit(\"_requestRedraw\")); // object with images\n this.groups = new Groups(); // object with groups\n this.canvas = new Canvas(this.body); // DOM handler\n this.selectionHandler = new SelectionHandler(this.body, this.canvas); // Selection handler\n this.interactionHandler = new InteractionHandler(this.body, this.canvas, this.selectionHandler); // Interaction handler handles all the hammer bindings (that are bound by canvas), key\n this.view = new View(this.body, this.canvas); // camera handler, does animations and zooms\n this.renderer = new CanvasRenderer(this.body, this.canvas); // renderer, starts renderloop, has events that modules can hook into\n this.physics = new PhysicsEngine(this.body); // physics engine, does all the simulations\n this.layoutEngine = new LayoutEngine(this.body); // layout engine for inital layout and hierarchical layout\n this.clustering = new ClusterEngine(this.body); // clustering api\n this.manipulation = new ManipulationSystem(this.body, this.canvas, this.selectionHandler); // data manipulation system\n\n this.nodesHandler = new NodesHandler(this.body, this.images, this.groups, this.layoutEngine); // Handle adding, deleting and updating of nodes as well as global options\n this.edgesHandler = new EdgesHandler(this.body, this.images, this.groups); // Handle adding, deleting and updating of edges as well as global options\n\n this.body.modules[\"kamadaKawai\"] = new KamadaKawai(this.body,150,0.05); // Layouting algorithm.\n this.body.modules[\"clustering\"] = this.clustering;\n\n // create the DOM elements\n this.canvas._create();\n\n // apply options\n this.setOptions(options);\n\n // load data (the disable start variable will be the same as the enabled clustering)\n this.setData(data);\n\n}\n\n// Extend Network with an Emitter mixin\nEmitter(Network.prototype);\n\n\n/**\n * Set options\n * @param {Object} options\n */\nNetwork.prototype.setOptions = function (options) {\n if (options === null) {\n options = undefined; // This ensures that options handling doesn't crash in the handling\n }\n\n if (options !== undefined) {\n let errorFound = Validator.validate(options, allOptions);\n if (errorFound === true) {\n console.log('%cErrors have been found in the supplied options object.', printStyle);\n }\n\n // copy the global fields over\n let fields = ['locale','locales','clickToUse'];\n util.selectiveDeepExtend(fields,this.options, options);\n\n // the hierarchical system can adapt the edges and the physics to it's own options because not all combinations work with the hierarichical system.\n options = this.layoutEngine.setOptions(options.layout, options);\n\n this.canvas.setOptions(options); // options for canvas are in globals\n\n // pass the options to the modules\n this.groups.setOptions(options.groups);\n this.nodesHandler.setOptions(options.nodes);\n this.edgesHandler.setOptions(options.edges);\n this.physics.setOptions(options.physics);\n this.manipulation.setOptions(options.manipulation, options, this.options); // manipulation uses the locales in the globals\n\n this.interactionHandler.setOptions(options.interaction);\n this.renderer.setOptions(options.interaction); // options for rendering are in interaction\n this.selectionHandler.setOptions(options.interaction); // options for selection are in interaction\n\n // reload the settings of the nodes to apply changes in groups that are not referenced by pointer.\n if (options.groups !== undefined) {\n this.body.emitter.emit(\"refreshNodes\");\n }\n // these two do not have options at the moment, here for completeness\n //this.view.setOptions(options.view);\n //this.clustering.setOptions(options.clustering);\n\n if ('configure' in options) {\n if (!this.configurator) {\n this.configurator = new Configurator(this, this.body.container, configureOptions, this.canvas.pixelRatio);\n }\n\n this.configurator.setOptions(options.configure);\n }\n\n // if the configuration system is enabled, copy all options and put them into the config system\n if (this.configurator && this.configurator.options.enabled === true) {\n let networkOptions = {nodes:{},edges:{},layout:{},interaction:{},manipulation:{},physics:{},global:{}};\n util.deepExtend(networkOptions.nodes, this.nodesHandler.options);\n util.deepExtend(networkOptions.edges, this.edgesHandler.options);\n util.deepExtend(networkOptions.layout, this.layoutEngine.options);\n // load the selectionHandler and render default options in to the interaction group\n util.deepExtend(networkOptions.interaction, this.selectionHandler.options);\n util.deepExtend(networkOptions.interaction, this.renderer.options);\n\n util.deepExtend(networkOptions.interaction, this.interactionHandler.options);\n util.deepExtend(networkOptions.manipulation, this.manipulation.options);\n util.deepExtend(networkOptions.physics, this.physics.options);\n\n // load globals into the global object\n util.deepExtend(networkOptions.global, this.canvas.options);\n util.deepExtend(networkOptions.global, this.options);\n\n this.configurator.setModuleOptions(networkOptions);\n }\n\n // handle network global options\n if (options.clickToUse !== undefined) {\n if (options.clickToUse === true) {\n if (this.activator === undefined) {\n this.activator = new Activator(this.canvas.frame);\n this.activator.on('change', () => {this.body.emitter.emit(\"activate\")});\n }\n }\n else {\n if (this.activator !== undefined) {\n this.activator.destroy();\n delete this.activator;\n }\n this.body.emitter.emit(\"activate\");\n }\n }\n else {\n this.body.emitter.emit(\"activate\");\n }\n\n this.canvas.setSize();\n // start the physics simulation. Can be safely called multiple times.\n this.body.emitter.emit(\"startSimulation\");\n }\n};\n\n\n/**\n * Update the visible nodes and edges list with the most recent node state.\n *\n * Visible nodes are stored in this.body.nodeIndices.\n * Visible edges are stored in this.body.edgeIndices.\n * A node or edges is visible if it is not hidden or clustered.\n *\n * @private\n */\nNetwork.prototype._updateVisibleIndices = function () {\n let nodes = this.body.nodes;\n let edges = this.body.edges;\n this.body.nodeIndices = [];\n this.body.edgeIndices = [];\n\n for (let nodeId in nodes) {\n if (nodes.hasOwnProperty(nodeId)) {\n if (!this.clustering._isClusteredNode(nodeId) && nodes[nodeId].options.hidden === false) {\n this.body.nodeIndices.push(nodes[nodeId].id);\n }\n }\n }\n\n for (let edgeId in edges) {\n if (edges.hasOwnProperty(edgeId)) {\n let edge = edges[edgeId];\n\n // It can happen that this is executed *after* a node edge has been removed,\n // but *before* the edge itself has been removed. Taking this into account.\n let fromNode = nodes[edge.fromId];\n let toNode = nodes[edge.toId];\n let edgeNodesPresent = (fromNode !== undefined) && (toNode !== undefined);\n\n let isVisible =\n !this.clustering._isClusteredEdge(edgeId)\n && edge.options.hidden === false\n && edgeNodesPresent\n && fromNode.options.hidden === false // Also hidden if any of its connecting nodes are hidden\n && toNode.options.hidden === false; // idem\n\n if (isVisible) {\n this.body.edgeIndices.push(edge.id);\n }\n }\n }\n};\n\n\n/**\n * Bind all events\n */\nNetwork.prototype.bindEventListeners = function () {\n // This event will trigger a rebuilding of the cache everything.\n // Used when nodes or edges have been added or removed.\n this.body.emitter.on(\"_dataChanged\", () => {\n this.edgesHandler._updateState();\n this.body.emitter.emit(\"_dataUpdated\");\n });\n\n // this is called when options of EXISTING nodes or edges have changed.\n this.body.emitter.on(\"_dataUpdated\", () => {\n // Order important in following block\n this.clustering._updateState();\n this._updateVisibleIndices();\n\n this._updateValueRange(this.body.nodes);\n this._updateValueRange(this.body.edges);\n // start simulation (can be called safely, even if already running)\n this.body.emitter.emit(\"startSimulation\");\n this.body.emitter.emit(\"_requestRedraw\");\n });\n};\n\n\n/**\n * Set nodes and edges, and optionally options as well.\n *\n * @param {Object} data Object containing parameters:\n * {Array | DataSet | DataView} [nodes] Array with nodes\n * {Array | DataSet | DataView} [edges] Array with edges\n * {String} [dot] String containing data in DOT format\n * {String} [gephi] String containing data in gephi JSON format\n * {Options} [options] Object with options\n */\nNetwork.prototype.setData = function (data) {\n // reset the physics engine.\n this.body.emitter.emit(\"resetPhysics\");\n this.body.emitter.emit(\"_resetData\");\n\n // unselect all to ensure no selections from old data are carried over.\n this.selectionHandler.unselectAll();\n\n if (data && data.dot && (data.nodes || data.edges)) {\n throw new SyntaxError('Data must contain either parameter \"dot\" or ' +\n ' parameter pair \"nodes\" and \"edges\", but not both.');\n }\n\n // set options\n this.setOptions(data && data.options);\n // set all data\n if (data && data.dot) {\n console.log('The dot property has been deprecated. Please use the static convertDot method to convert DOT into vis.network format and use the normal data format with nodes and edges. This converter is used like this: var data = vis.network.convertDot(dotString);');\n // parse DOT file\n var dotData = dotparser.DOTToGraph(data.dot);\n this.setData(dotData);\n return;\n }\n else if (data && data.gephi) {\n // parse DOT file\n console.log('The gephi property has been deprecated. Please use the static convertGephi method to convert gephi into vis.network format and use the normal data format with nodes and edges. This converter is used like this: var data = vis.network.convertGephi(gephiJson);');\n var gephiData = gephiParser.parseGephi(data.gephi);\n this.setData(gephiData);\n return;\n }\n else {\n this.nodesHandler.setData(data && data.nodes, true);\n this.edgesHandler.setData(data && data.edges, true);\n }\n\n // emit change in data\n this.body.emitter.emit(\"_dataChanged\");\n\n // emit data loaded\n this.body.emitter.emit(\"_dataLoaded\");\n\n // find a stable position or start animating to a stable position\n this.body.emitter.emit(\"initPhysics\");\n};\n\n\n/**\n * Cleans up all bindings of the network, removing it fully from the memory IF the variable is set to null after calling this function.\n * var network = new vis.Network(..);\n * network.destroy();\n * network = null;\n */\nNetwork.prototype.destroy = function () {\n this.body.emitter.emit(\"destroy\");\n // clear events\n this.body.emitter.off();\n this.off();\n\n // delete modules\n delete this.groups;\n delete this.canvas;\n delete this.selectionHandler;\n delete this.interactionHandler;\n delete this.view;\n delete this.renderer;\n delete this.physics;\n delete this.layoutEngine;\n delete this.clustering;\n delete this.manipulation;\n delete this.nodesHandler;\n delete this.edgesHandler;\n delete this.configurator;\n delete this.images;\n\n for (var nodeId in this.body.nodes) {\n if (!this.body.nodes.hasOwnProperty(nodeId)) continue;\n delete this.body.nodes[nodeId];\n }\n\n for (var edgeId in this.body.edges) {\n if (!this.body.edges.hasOwnProperty(edgeId)) continue;\n delete this.body.edges[edgeId];\n }\n\n // remove the container and everything inside it recursively\n util.recursiveDOMDelete(this.body.container);\n};\n\n\n/**\n * Update the values of all object in the given array according to the current\n * value range of the objects in the array.\n * @param {Object} obj An object containing a set of Edges or Nodes\n * The objects must have a method getValue() and\n * setValueRange(min, max).\n * @private\n */\nNetwork.prototype._updateValueRange = function (obj) {\n var id;\n\n // determine the range of the objects\n var valueMin = undefined;\n var valueMax = undefined;\n var valueTotal = 0;\n for (id in obj) {\n if (obj.hasOwnProperty(id)) {\n var value = obj[id].getValue();\n if (value !== undefined) {\n valueMin = (valueMin === undefined) ? value : Math.min(value, valueMin);\n valueMax = (valueMax === undefined) ? value : Math.max(value, valueMax);\n valueTotal += value;\n }\n }\n }\n\n // adjust the range of all objects\n if (valueMin !== undefined && valueMax !== undefined) {\n for (id in obj) {\n if (obj.hasOwnProperty(id)) {\n obj[id].setValueRange(valueMin, valueMax, valueTotal);\n }\n }\n }\n};\n\n\n/**\n * Returns true when the Network is active.\n * @returns {boolean}\n */\nNetwork.prototype.isActive = function () {\n return !this.activator || this.activator.active;\n};\n\n\nNetwork.prototype.setSize = function() {return this.canvas.setSize.apply(this.canvas,arguments);};\nNetwork.prototype.canvasToDOM = function() {return this.canvas.canvasToDOM.apply(this.canvas,arguments);};\nNetwork.prototype.DOMtoCanvas = function() {return this.canvas.DOMtoCanvas.apply(this.canvas,arguments);};\n\n\n/**\n * Nodes can be in clusters. Clusters can also be in clusters. This function returns and array of\n * nodeIds showing where the node is.\n *\n * If any nodeId in the chain, especially the first passed in as a parameter, is not present in\n * the current nodes list, an empty array is returned.\n *\n * Example:\n * cluster 'A' contains cluster 'B',\n * cluster 'B' contains cluster 'C',\n * cluster 'C' contains node 'fred'.\n * `jsnetwork.clustering.findNode('fred')` will return `['A','B','C','fred']`.\n *\n * @param {string|number} nodeId\n * @returns {Array}\n */\nNetwork.prototype.findNode = function() {return this.clustering.findNode.apply(this.clustering,arguments);};\n\n\nNetwork.prototype.isCluster = function() {return this.clustering.isCluster.apply(this.clustering,arguments);};\nNetwork.prototype.openCluster = function() {return this.clustering.openCluster.apply(this.clustering,arguments);};\nNetwork.prototype.cluster = function() {return this.clustering.cluster.apply(this.clustering,arguments);};\nNetwork.prototype.getNodesInCluster = function() {return this.clustering.getNodesInCluster.apply(this.clustering,arguments);};\nNetwork.prototype.clusterByConnection = function() {return this.clustering.clusterByConnection.apply(this.clustering,arguments);};\nNetwork.prototype.clusterByHubsize = function() {return this.clustering.clusterByHubsize.apply(this.clustering,arguments);};\n\n/**\n * This method will cluster all nodes with 1 edge with their respective connected node.\n * The options object is explained in full
below.\n *\n * @param {object} [options]\n * @returns {undefined}\n */\nNetwork.prototype.clusterOutliers = function() {return this.clustering.clusterOutliers.apply(this.clustering,arguments);};\n\nNetwork.prototype.getSeed = function() {return this.layoutEngine.getSeed.apply(this.layoutEngine,arguments);};\nNetwork.prototype.enableEditMode = function() {return this.manipulation.enableEditMode.apply(this.manipulation,arguments);};\nNetwork.prototype.disableEditMode = function() {return this.manipulation.disableEditMode.apply(this.manipulation,arguments);};\nNetwork.prototype.addNodeMode = function() {return this.manipulation.addNodeMode.apply(this.manipulation,arguments);};\nNetwork.prototype.editNode = function() {return this.manipulation.editNode.apply(this.manipulation,arguments);};\nNetwork.prototype.editNodeMode = function() {console.log(\"Deprecated: Please use editNode instead of editNodeMode.\"); return this.manipulation.editNode.apply(this.manipulation,arguments);};\nNetwork.prototype.addEdgeMode = function() {return this.manipulation.addEdgeMode.apply(this.manipulation,arguments);};\nNetwork.prototype.editEdgeMode = function() {return this.manipulation.editEdgeMode.apply(this.manipulation,arguments);};\nNetwork.prototype.deleteSelected = function() {return this.manipulation.deleteSelected.apply(this.manipulation,arguments);};\nNetwork.prototype.getPositions = function() {return this.nodesHandler.getPositions.apply(this.nodesHandler,arguments);};\nNetwork.prototype.storePositions = function() {return this.nodesHandler.storePositions.apply(this.nodesHandler,arguments);};\nNetwork.prototype.moveNode = function() {return this.nodesHandler.moveNode.apply(this.nodesHandler,arguments);};\nNetwork.prototype.getBoundingBox = function() {return this.nodesHandler.getBoundingBox.apply(this.nodesHandler,arguments);};\nNetwork.prototype.getConnectedNodes = function(objectId) {\n if (this.body.nodes[objectId] !== undefined) {\n return this.nodesHandler.getConnectedNodes.apply(this.nodesHandler,arguments);\n }\n else {\n return this.edgesHandler.getConnectedNodes.apply(this.edgesHandler,arguments);\n }\n};\nNetwork.prototype.getConnectedEdges = function() {return this.nodesHandler.getConnectedEdges.apply(this.nodesHandler,arguments);};\nNetwork.prototype.startSimulation = function() {return this.physics.startSimulation.apply(this.physics,arguments);};\nNetwork.prototype.stopSimulation = function() {return this.physics.stopSimulation.apply(this.physics,arguments);};\nNetwork.prototype.stabilize = function() {return this.physics.stabilize.apply(this.physics,arguments);};\nNetwork.prototype.getSelection = function() {return this.selectionHandler.getSelection.apply(this.selectionHandler,arguments);};\nNetwork.prototype.setSelection = function() {return this.selectionHandler.setSelection.apply(this.selectionHandler,arguments);};\nNetwork.prototype.getSelectedNodes = function() {return this.selectionHandler.getSelectedNodes.apply(this.selectionHandler,arguments);};\nNetwork.prototype.getSelectedEdges = function() {return this.selectionHandler.getSelectedEdges.apply(this.selectionHandler,arguments);};\nNetwork.prototype.getNodeAt = function() {\n var node = this.selectionHandler.getNodeAt.apply(this.selectionHandler,arguments);\n if (node !== undefined && node.id !== undefined) {\n return node.id;\n }\n return node;\n};\nNetwork.prototype.getEdgeAt = function() {\n var edge = this.selectionHandler.getEdgeAt.apply(this.selectionHandler,arguments);\n if (edge !== undefined && edge.id !== undefined) {\n return edge.id;\n }\n return edge;\n };\nNetwork.prototype.selectNodes = function() {return this.selectionHandler.selectNodes.apply(this.selectionHandler,arguments);};\nNetwork.prototype.selectEdges = function() {return this.selectionHandler.selectEdges.apply(this.selectionHandler,arguments);};\nNetwork.prototype.unselectAll = function() {\n this.selectionHandler.unselectAll.apply(this.selectionHandler,arguments);\n this.redraw();\n};\nNetwork.prototype.redraw = function() {return this.renderer.redraw.apply(this.renderer,arguments);};\nNetwork.prototype.getScale = function() {return this.view.getScale.apply(this.view,arguments);};\nNetwork.prototype.getViewPosition = function() {return this.view.getViewPosition.apply(this.view,arguments);};\nNetwork.prototype.fit = function() {return this.view.fit.apply(this.view,arguments);};\nNetwork.prototype.moveTo = function() {return this.view.moveTo.apply(this.view,arguments);};\nNetwork.prototype.focus = function() {return this.view.focus.apply(this.view,arguments);};\nNetwork.prototype.releaseNode = function() {return this.view.releaseNode.apply(this.view,arguments);};\nNetwork.prototype.getOptionsFromConfigurator = function() {\n let options = {};\n if (this.configurator) {\n options = this.configurator.getOptions.apply(this.configurator);\n }\n return options;\n};\n\n\n\nexport default Network;\n","// DOM utility methods\n\n/**\n * this prepares the JSON container for allocating SVG elements\n * @param {Object} JSONcontainer\n * @private\n */\nexports.prepareElements = function(JSONcontainer) {\n // cleanup the redundant svgElements;\n for (var elementType in JSONcontainer) {\n if (JSONcontainer.hasOwnProperty(elementType)) {\n JSONcontainer[elementType].redundant = JSONcontainer[elementType].used;\n JSONcontainer[elementType].used = [];\n }\n }\n};\n\n/**\n * this cleans up all the unused SVG elements. By asking for the parentNode, we only need to supply the JSON container from\n * which to remove the redundant elements.\n *\n * @param {Object} JSONcontainer\n * @private\n */\nexports.cleanupElements = function(JSONcontainer) {\n // cleanup the redundant svgElements;\n for (var elementType in JSONcontainer) {\n if (JSONcontainer.hasOwnProperty(elementType)) {\n if (JSONcontainer[elementType].redundant) {\n for (var i = 0; i < JSONcontainer[elementType].redundant.length; i++) {\n JSONcontainer[elementType].redundant[i].parentNode.removeChild(JSONcontainer[elementType].redundant[i]);\n }\n JSONcontainer[elementType].redundant = [];\n }\n }\n }\n};\n\n/**\n * Ensures that all elements are removed first up so they can be recreated cleanly\n * @param {Object} JSONcontainer\n */\nexports.resetElements = function(JSONcontainer) {\n exports.prepareElements(JSONcontainer);\n exports.cleanupElements(JSONcontainer);\n exports.prepareElements(JSONcontainer);\n};\n\n/**\n * Allocate or generate an SVG element if needed. Store a reference to it in the JSON container and draw it in the svgContainer\n * the JSON container and the SVG container have to be supplied so other svg containers (like the legend) can use this.\n *\n * @param {string} elementType\n * @param {Object} JSONcontainer\n * @param {Object} svgContainer\n * @returns {Element}\n * @private\n */\nexports.getSVGElement = function (elementType, JSONcontainer, svgContainer) {\n var element;\n // allocate SVG element, if it doesnt yet exist, create one.\n if (JSONcontainer.hasOwnProperty(elementType)) { // this element has been created before\n // check if there is an redundant element\n if (JSONcontainer[elementType].redundant.length > 0) {\n element = JSONcontainer[elementType].redundant[0];\n JSONcontainer[elementType].redundant.shift();\n }\n else {\n // create a new element and add it to the SVG\n element = document.createElementNS('http://www.w3.org/2000/svg', elementType);\n svgContainer.appendChild(element);\n }\n }\n else {\n // create a new element and add it to the SVG, also create a new object in the svgElements to keep track of it.\n element = document.createElementNS('http://www.w3.org/2000/svg', elementType);\n JSONcontainer[elementType] = {used: [], redundant: []};\n svgContainer.appendChild(element);\n }\n JSONcontainer[elementType].used.push(element);\n return element;\n};\n\n\n/**\n * Allocate or generate an SVG element if needed. Store a reference to it in the JSON container and draw it in the svgContainer\n * the JSON container and the SVG container have to be supplied so other svg containers (like the legend) can use this.\n *\n * @param {string} elementType\n * @param {Object} JSONcontainer\n * @param {Element} DOMContainer\n * @param {Element} insertBefore\n * @returns {*}\n */\nexports.getDOMElement = function (elementType, JSONcontainer, DOMContainer, insertBefore) {\n var element;\n // allocate DOM element, if it doesnt yet exist, create one.\n if (JSONcontainer.hasOwnProperty(elementType)) { // this element has been created before\n // check if there is an redundant element\n if (JSONcontainer[elementType].redundant.length > 0) {\n element = JSONcontainer[elementType].redundant[0];\n JSONcontainer[elementType].redundant.shift();\n }\n else {\n // create a new element and add it to the SVG\n element = document.createElement(elementType);\n if (insertBefore !== undefined) {\n DOMContainer.insertBefore(element, insertBefore);\n }\n else {\n DOMContainer.appendChild(element);\n }\n }\n }\n else {\n // create a new element and add it to the SVG, also create a new object in the svgElements to keep track of it.\n element = document.createElement(elementType);\n JSONcontainer[elementType] = {used: [], redundant: []};\n if (insertBefore !== undefined) {\n DOMContainer.insertBefore(element, insertBefore);\n }\n else {\n DOMContainer.appendChild(element);\n }\n }\n JSONcontainer[elementType].used.push(element);\n return element;\n};\n\n\n\n\n/**\n * Draw a point object. This is a separate function because it can also be called by the legend.\n * The reason the JSONcontainer and the target SVG svgContainer have to be supplied is so the legend can use these functions\n * as well.\n *\n * @param {number} x\n * @param {number} y\n * @param {Object} groupTemplate: A template containing the necessary information to draw the datapoint e.g., {style: 'circle', size: 5, className: 'className' }\n * @param {Object} JSONcontainer\n * @param {Object} svgContainer\n * @param {Object} labelObj\n * @returns {vis.PointItem}\n */\nexports.drawPoint = function(x, y, groupTemplate, JSONcontainer, svgContainer, labelObj) {\n var point;\n if (groupTemplate.style == 'circle') {\n point = exports.getSVGElement('circle', JSONcontainer, svgContainer);\n point.setAttributeNS(null, \"cx\", x);\n point.setAttributeNS(null, \"cy\", y);\n point.setAttributeNS(null, \"r\", 0.5 * groupTemplate.size);\n }\n else {\n point = exports.getSVGElement('rect', JSONcontainer, svgContainer);\n point.setAttributeNS(null, \"x\", x - 0.5 * groupTemplate.size);\n point.setAttributeNS(null, \"y\", y - 0.5 * groupTemplate.size);\n point.setAttributeNS(null, \"width\", groupTemplate.size);\n point.setAttributeNS(null, \"height\", groupTemplate.size);\n }\n\n if (groupTemplate.styles !== undefined) {\n point.setAttributeNS(null, \"style\", groupTemplate.styles);\n }\n point.setAttributeNS(null, \"class\", groupTemplate.className + \" vis-point\");\n //handle label\n\n\n if (labelObj) {\n var label = exports.getSVGElement('text', JSONcontainer, svgContainer);\n if (labelObj.xOffset) {\n x = x + labelObj.xOffset;\n }\n\n if (labelObj.yOffset) {\n y = y + labelObj.yOffset;\n }\n if (labelObj.content) {\n label.textContent = labelObj.content;\n }\n\n if (labelObj.className) {\n label.setAttributeNS(null, \"class\", labelObj.className + \" vis-label\");\n }\n label.setAttributeNS(null, \"x\", x);\n label.setAttributeNS(null, \"y\", y);\n }\n\n return point;\n};\n\n/**\n * draw a bar SVG element centered on the X coordinate\n *\n * @param {number} x\n * @param {number} y\n * @param {number} width\n * @param {number} height\n * @param {string} className\n * @param {Object} JSONcontainer\n * @param {Object} svgContainer\n * @param {string} style\n */\nexports.drawBar = function (x, y, width, height, className, JSONcontainer, svgContainer, style) {\n if (height != 0) {\n if (height < 0) {\n height *= -1;\n y -= height;\n }\n var rect = exports.getSVGElement('rect',JSONcontainer, svgContainer);\n rect.setAttributeNS(null, \"x\", x - 0.5 * width);\n rect.setAttributeNS(null, \"y\", y);\n rect.setAttributeNS(null, \"width\", width);\n rect.setAttributeNS(null, \"height\", height);\n rect.setAttributeNS(null, \"class\", className);\n if (style) {\n rect.setAttributeNS(null, \"style\", style);\n }\n }\n};","//! moment.js\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n typeof define === 'function' && define.amd ? define(factory) :\n global.moment = factory()\n}(this, (function () { 'use strict';\n\n var hookCallback;\n\n function hooks () {\n return hookCallback.apply(null, arguments);\n }\n\n // This is done to register the method called with moment()\n // without creating circular dependencies.\n function setHookCallback (callback) {\n hookCallback = callback;\n }\n\n function isArray(input) {\n return input instanceof Array || Object.prototype.toString.call(input) === '[object Array]';\n }\n\n function isObject(input) {\n // IE8 will treat undefined and null as object if it wasn't for\n // input != null\n return input != null && Object.prototype.toString.call(input) === '[object Object]';\n }\n\n function isObjectEmpty(obj) {\n if (Object.getOwnPropertyNames) {\n return (Object.getOwnPropertyNames(obj).length === 0);\n } else {\n var k;\n for (k in obj) {\n if (obj.hasOwnProperty(k)) {\n return false;\n }\n }\n return true;\n }\n }\n\n function isUndefined(input) {\n return input === void 0;\n }\n\n function isNumber(input) {\n return typeof input === 'number' || Object.prototype.toString.call(input) === '[object Number]';\n }\n\n function isDate(input) {\n return input instanceof Date || Object.prototype.toString.call(input) === '[object Date]';\n }\n\n function map(arr, fn) {\n var res = [], i;\n for (i = 0; i < arr.length; ++i) {\n res.push(fn(arr[i], i));\n }\n return res;\n }\n\n function hasOwnProp(a, b) {\n return Object.prototype.hasOwnProperty.call(a, b);\n }\n\n function extend(a, b) {\n for (var i in b) {\n if (hasOwnProp(b, i)) {\n a[i] = b[i];\n }\n }\n\n if (hasOwnProp(b, 'toString')) {\n a.toString = b.toString;\n }\n\n if (hasOwnProp(b, 'valueOf')) {\n a.valueOf = b.valueOf;\n }\n\n return a;\n }\n\n function createUTC (input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, true).utc();\n }\n\n function defaultParsingFlags() {\n // We need to deep clone this object.\n return {\n empty : false,\n unusedTokens : [],\n unusedInput : [],\n overflow : -2,\n charsLeftOver : 0,\n nullInput : false,\n invalidMonth : null,\n invalidFormat : false,\n userInvalidated : false,\n iso : false,\n parsedDateParts : [],\n meridiem : null,\n rfc2822 : false,\n weekdayMismatch : false\n };\n }\n\n function getParsingFlags(m) {\n if (m._pf == null) {\n m._pf = defaultParsingFlags();\n }\n return m._pf;\n }\n\n var some;\n if (Array.prototype.some) {\n some = Array.prototype.some;\n } else {\n some = function (fun) {\n var t = Object(this);\n var len = t.length >>> 0;\n\n for (var i = 0; i < len; i++) {\n if (i in t && fun.call(this, t[i], i, t)) {\n return true;\n }\n }\n\n return false;\n };\n }\n\n function isValid(m) {\n if (m._isValid == null) {\n var flags = getParsingFlags(m);\n var parsedParts = some.call(flags.parsedDateParts, function (i) {\n return i != null;\n });\n var isNowValid = !isNaN(m._d.getTime()) &&\n flags.overflow < 0 &&\n !flags.empty &&\n !flags.invalidMonth &&\n !flags.invalidWeekday &&\n !flags.weekdayMismatch &&\n !flags.nullInput &&\n !flags.invalidFormat &&\n !flags.userInvalidated &&\n (!flags.meridiem || (flags.meridiem && parsedParts));\n\n if (m._strict) {\n isNowValid = isNowValid &&\n flags.charsLeftOver === 0 &&\n flags.unusedTokens.length === 0 &&\n flags.bigHour === undefined;\n }\n\n if (Object.isFrozen == null || !Object.isFrozen(m)) {\n m._isValid = isNowValid;\n }\n else {\n return isNowValid;\n }\n }\n return m._isValid;\n }\n\n function createInvalid (flags) {\n var m = createUTC(NaN);\n if (flags != null) {\n extend(getParsingFlags(m), flags);\n }\n else {\n getParsingFlags(m).userInvalidated = true;\n }\n\n return m;\n }\n\n // Plugins that add properties should also add the key here (null value),\n // so we can properly clone ourselves.\n var momentProperties = hooks.momentProperties = [];\n\n function copyConfig(to, from) {\n var i, prop, val;\n\n if (!isUndefined(from._isAMomentObject)) {\n to._isAMomentObject = from._isAMomentObject;\n }\n if (!isUndefined(from._i)) {\n to._i = from._i;\n }\n if (!isUndefined(from._f)) {\n to._f = from._f;\n }\n if (!isUndefined(from._l)) {\n to._l = from._l;\n }\n if (!isUndefined(from._strict)) {\n to._strict = from._strict;\n }\n if (!isUndefined(from._tzm)) {\n to._tzm = from._tzm;\n }\n if (!isUndefined(from._isUTC)) {\n to._isUTC = from._isUTC;\n }\n if (!isUndefined(from._offset)) {\n to._offset = from._offset;\n }\n if (!isUndefined(from._pf)) {\n to._pf = getParsingFlags(from);\n }\n if (!isUndefined(from._locale)) {\n to._locale = from._locale;\n }\n\n if (momentProperties.length > 0) {\n for (i = 0; i < momentProperties.length; i++) {\n prop = momentProperties[i];\n val = from[prop];\n if (!isUndefined(val)) {\n to[prop] = val;\n }\n }\n }\n\n return to;\n }\n\n var updateInProgress = false;\n\n // Moment prototype object\n function Moment(config) {\n copyConfig(this, config);\n this._d = new Date(config._d != null ? config._d.getTime() : NaN);\n if (!this.isValid()) {\n this._d = new Date(NaN);\n }\n // Prevent infinite loop in case updateOffset creates new moment\n // objects.\n if (updateInProgress === false) {\n updateInProgress = true;\n hooks.updateOffset(this);\n updateInProgress = false;\n }\n }\n\n function isMoment (obj) {\n return obj instanceof Moment || (obj != null && obj._isAMomentObject != null);\n }\n\n function absFloor (number) {\n if (number < 0) {\n // -0 -> 0\n return Math.ceil(number) || 0;\n } else {\n return Math.floor(number);\n }\n }\n\n function toInt(argumentForCoercion) {\n var coercedNumber = +argumentForCoercion,\n value = 0;\n\n if (coercedNumber !== 0 && isFinite(coercedNumber)) {\n value = absFloor(coercedNumber);\n }\n\n return value;\n }\n\n // compare two arrays, return the number of differences\n function compareArrays(array1, array2, dontConvert) {\n var len = Math.min(array1.length, array2.length),\n lengthDiff = Math.abs(array1.length - array2.length),\n diffs = 0,\n i;\n for (i = 0; i < len; i++) {\n if ((dontConvert && array1[i] !== array2[i]) ||\n (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {\n diffs++;\n }\n }\n return diffs + lengthDiff;\n }\n\n function warn(msg) {\n if (hooks.suppressDeprecationWarnings === false &&\n (typeof console !== 'undefined') && console.warn) {\n console.warn('Deprecation warning: ' + msg);\n }\n }\n\n function deprecate(msg, fn) {\n var firstTime = true;\n\n return extend(function () {\n if (hooks.deprecationHandler != null) {\n hooks.deprecationHandler(null, msg);\n }\n if (firstTime) {\n var args = [];\n var arg;\n for (var i = 0; i < arguments.length; i++) {\n arg = '';\n if (typeof arguments[i] === 'object') {\n arg += '\\n[' + i + '] ';\n for (var key in arguments[0]) {\n arg += key + ': ' + arguments[0][key] + ', ';\n }\n arg = arg.slice(0, -2); // Remove trailing comma and space\n } else {\n arg = arguments[i];\n }\n args.push(arg);\n }\n warn(msg + '\\nArguments: ' + Array.prototype.slice.call(args).join('') + '\\n' + (new Error()).stack);\n firstTime = false;\n }\n return fn.apply(this, arguments);\n }, fn);\n }\n\n var deprecations = {};\n\n function deprecateSimple(name, msg) {\n if (hooks.deprecationHandler != null) {\n hooks.deprecationHandler(name, msg);\n }\n if (!deprecations[name]) {\n warn(msg);\n deprecations[name] = true;\n }\n }\n\n hooks.suppressDeprecationWarnings = false;\n hooks.deprecationHandler = null;\n\n function isFunction(input) {\n return input instanceof Function || Object.prototype.toString.call(input) === '[object Function]';\n }\n\n function set (config) {\n var prop, i;\n for (i in config) {\n prop = config[i];\n if (isFunction(prop)) {\n this[i] = prop;\n } else {\n this['_' + i] = prop;\n }\n }\n this._config = config;\n // Lenient ordinal parsing accepts just a number in addition to\n // number + (possibly) stuff coming from _dayOfMonthOrdinalParse.\n // TODO: Remove \"ordinalParse\" fallback in next major release.\n this._dayOfMonthOrdinalParseLenient = new RegExp(\n (this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) +\n '|' + (/\\d{1,2}/).source);\n }\n\n function mergeConfigs(parentConfig, childConfig) {\n var res = extend({}, parentConfig), prop;\n for (prop in childConfig) {\n if (hasOwnProp(childConfig, prop)) {\n if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) {\n res[prop] = {};\n extend(res[prop], parentConfig[prop]);\n extend(res[prop], childConfig[prop]);\n } else if (childConfig[prop] != null) {\n res[prop] = childConfig[prop];\n } else {\n delete res[prop];\n }\n }\n }\n for (prop in parentConfig) {\n if (hasOwnProp(parentConfig, prop) &&\n !hasOwnProp(childConfig, prop) &&\n isObject(parentConfig[prop])) {\n // make sure changes to properties don't modify parent config\n res[prop] = extend({}, res[prop]);\n }\n }\n return res;\n }\n\n function Locale(config) {\n if (config != null) {\n this.set(config);\n }\n }\n\n var keys;\n\n if (Object.keys) {\n keys = Object.keys;\n } else {\n keys = function (obj) {\n var i, res = [];\n for (i in obj) {\n if (hasOwnProp(obj, i)) {\n res.push(i);\n }\n }\n return res;\n };\n }\n\n var defaultCalendar = {\n sameDay : '[Today at] LT',\n nextDay : '[Tomorrow at] LT',\n nextWeek : 'dddd [at] LT',\n lastDay : '[Yesterday at] LT',\n lastWeek : '[Last] dddd [at] LT',\n sameElse : 'L'\n };\n\n function calendar (key, mom, now) {\n var output = this._calendar[key] || this._calendar['sameElse'];\n return isFunction(output) ? output.call(mom, now) : output;\n }\n\n var defaultLongDateFormat = {\n LTS : 'h:mm:ss A',\n LT : 'h:mm A',\n L : 'MM/DD/YYYY',\n LL : 'MMMM D, YYYY',\n LLL : 'MMMM D, YYYY h:mm A',\n LLLL : 'dddd, MMMM D, YYYY h:mm A'\n };\n\n function longDateFormat (key) {\n var format = this._longDateFormat[key],\n formatUpper = this._longDateFormat[key.toUpperCase()];\n\n if (format || !formatUpper) {\n return format;\n }\n\n this._longDateFormat[key] = formatUpper.replace(/MMMM|MM|DD|dddd/g, function (val) {\n return val.slice(1);\n });\n\n return this._longDateFormat[key];\n }\n\n var defaultInvalidDate = 'Invalid date';\n\n function invalidDate () {\n return this._invalidDate;\n }\n\n var defaultOrdinal = '%d';\n var defaultDayOfMonthOrdinalParse = /\\d{1,2}/;\n\n function ordinal (number) {\n return this._ordinal.replace('%d', number);\n }\n\n var defaultRelativeTime = {\n future : 'in %s',\n past : '%s ago',\n s : 'a few seconds',\n ss : '%d seconds',\n m : 'a minute',\n mm : '%d minutes',\n h : 'an hour',\n hh : '%d hours',\n d : 'a day',\n dd : '%d days',\n M : 'a month',\n MM : '%d months',\n y : 'a year',\n yy : '%d years'\n };\n\n function relativeTime (number, withoutSuffix, string, isFuture) {\n var output = this._relativeTime[string];\n return (isFunction(output)) ?\n output(number, withoutSuffix, string, isFuture) :\n output.replace(/%d/i, number);\n }\n\n function pastFuture (diff, output) {\n var format = this._relativeTime[diff > 0 ? 'future' : 'past'];\n return isFunction(format) ? format(output) : format.replace(/%s/i, output);\n }\n\n var aliases = {};\n\n function addUnitAlias (unit, shorthand) {\n var lowerCase = unit.toLowerCase();\n aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit;\n }\n\n function normalizeUnits(units) {\n return typeof units === 'string' ? aliases[units] || aliases[units.toLowerCase()] : undefined;\n }\n\n function normalizeObjectUnits(inputObject) {\n var normalizedInput = {},\n normalizedProp,\n prop;\n\n for (prop in inputObject) {\n if (hasOwnProp(inputObject, prop)) {\n normalizedProp = normalizeUnits(prop);\n if (normalizedProp) {\n normalizedInput[normalizedProp] = inputObject[prop];\n }\n }\n }\n\n return normalizedInput;\n }\n\n var priorities = {};\n\n function addUnitPriority(unit, priority) {\n priorities[unit] = priority;\n }\n\n function getPrioritizedUnits(unitsObj) {\n var units = [];\n for (var u in unitsObj) {\n units.push({unit: u, priority: priorities[u]});\n }\n units.sort(function (a, b) {\n return a.priority - b.priority;\n });\n return units;\n }\n\n function zeroFill(number, targetLength, forceSign) {\n var absNumber = '' + Math.abs(number),\n zerosToFill = targetLength - absNumber.length,\n sign = number >= 0;\n return (sign ? (forceSign ? '+' : '') : '-') +\n Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) + absNumber;\n }\n\n var formattingTokens = /(\\[[^\\[]*\\])|(\\\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g;\n\n var localFormattingTokens = /(\\[[^\\[]*\\])|(\\\\)?(LTS|LT|LL?L?L?|l{1,4})/g;\n\n var formatFunctions = {};\n\n var formatTokenFunctions = {};\n\n // token: 'M'\n // padded: ['MM', 2]\n // ordinal: 'Mo'\n // callback: function () { this.month() + 1 }\n function addFormatToken (token, padded, ordinal, callback) {\n var func = callback;\n if (typeof callback === 'string') {\n func = function () {\n return this[callback]();\n };\n }\n if (token) {\n formatTokenFunctions[token] = func;\n }\n if (padded) {\n formatTokenFunctions[padded[0]] = function () {\n return zeroFill(func.apply(this, arguments), padded[1], padded[2]);\n };\n }\n if (ordinal) {\n formatTokenFunctions[ordinal] = function () {\n return this.localeData().ordinal(func.apply(this, arguments), token);\n };\n }\n }\n\n function removeFormattingTokens(input) {\n if (input.match(/\\[[\\s\\S]/)) {\n return input.replace(/^\\[|\\]$/g, '');\n }\n return input.replace(/\\\\/g, '');\n }\n\n function makeFormatFunction(format) {\n var array = format.match(formattingTokens), i, length;\n\n for (i = 0, length = array.length; i < length; i++) {\n if (formatTokenFunctions[array[i]]) {\n array[i] = formatTokenFunctions[array[i]];\n } else {\n array[i] = removeFormattingTokens(array[i]);\n }\n }\n\n return function (mom) {\n var output = '', i;\n for (i = 0; i < length; i++) {\n output += isFunction(array[i]) ? array[i].call(mom, format) : array[i];\n }\n return output;\n };\n }\n\n // format date using native date object\n function formatMoment(m, format) {\n if (!m.isValid()) {\n return m.localeData().invalidDate();\n }\n\n format = expandFormat(format, m.localeData());\n formatFunctions[format] = formatFunctions[format] || makeFormatFunction(format);\n\n return formatFunctions[format](m);\n }\n\n function expandFormat(format, locale) {\n var i = 5;\n\n function replaceLongDateFormatTokens(input) {\n return locale.longDateFormat(input) || input;\n }\n\n localFormattingTokens.lastIndex = 0;\n while (i >= 0 && localFormattingTokens.test(format)) {\n format = format.replace(localFormattingTokens, replaceLongDateFormatTokens);\n localFormattingTokens.lastIndex = 0;\n i -= 1;\n }\n\n return format;\n }\n\n var match1 = /\\d/; // 0 - 9\n var match2 = /\\d\\d/; // 00 - 99\n var match3 = /\\d{3}/; // 000 - 999\n var match4 = /\\d{4}/; // 0000 - 9999\n var match6 = /[+-]?\\d{6}/; // -999999 - 999999\n var match1to2 = /\\d\\d?/; // 0 - 99\n var match3to4 = /\\d\\d\\d\\d?/; // 999 - 9999\n var match5to6 = /\\d\\d\\d\\d\\d\\d?/; // 99999 - 999999\n var match1to3 = /\\d{1,3}/; // 0 - 999\n var match1to4 = /\\d{1,4}/; // 0 - 9999\n var match1to6 = /[+-]?\\d{1,6}/; // -999999 - 999999\n\n var matchUnsigned = /\\d+/; // 0 - inf\n var matchSigned = /[+-]?\\d+/; // -inf - inf\n\n var matchOffset = /Z|[+-]\\d\\d:?\\d\\d/gi; // +00:00 -00:00 +0000 -0000 or Z\n var matchShortOffset = /Z|[+-]\\d\\d(?::?\\d\\d)?/gi; // +00 -00 +00:00 -00:00 +0000 -0000 or Z\n\n var matchTimestamp = /[+-]?\\d+(\\.\\d{1,3})?/; // 123456789 123456789.123\n\n // any word (or two) characters or numbers including two/three word month in arabic.\n // includes scottish gaelic two word and hyphenated months\n var matchWord = /[0-9]{0,256}['a-z\\u00A0-\\u05FF\\u0700-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFF07\\uFF10-\\uFFEF]{1,256}|[\\u0600-\\u06FF\\/]{1,256}(\\s*?[\\u0600-\\u06FF]{1,256}){1,2}/i;\n\n var regexes = {};\n\n function addRegexToken (token, regex, strictRegex) {\n regexes[token] = isFunction(regex) ? regex : function (isStrict, localeData) {\n return (isStrict && strictRegex) ? strictRegex : regex;\n };\n }\n\n function getParseRegexForToken (token, config) {\n if (!hasOwnProp(regexes, token)) {\n return new RegExp(unescapeFormat(token));\n }\n\n return regexes[token](config._strict, config._locale);\n }\n\n // Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript\n function unescapeFormat(s) {\n return regexEscape(s.replace('\\\\', '').replace(/\\\\(\\[)|\\\\(\\])|\\[([^\\]\\[]*)\\]|\\\\(.)/g, function (matched, p1, p2, p3, p4) {\n return p1 || p2 || p3 || p4;\n }));\n }\n\n function regexEscape(s) {\n return s.replace(/[-\\/\\\\^$*+?.()|[\\]{}]/g, '\\\\$&');\n }\n\n var tokens = {};\n\n function addParseToken (token, callback) {\n var i, func = callback;\n if (typeof token === 'string') {\n token = [token];\n }\n if (isNumber(callback)) {\n func = function (input, array) {\n array[callback] = toInt(input);\n };\n }\n for (i = 0; i < token.length; i++) {\n tokens[token[i]] = func;\n }\n }\n\n function addWeekParseToken (token, callback) {\n addParseToken(token, function (input, array, config, token) {\n config._w = config._w || {};\n callback(input, config._w, config, token);\n });\n }\n\n function addTimeToArrayFromToken(token, input, config) {\n if (input != null && hasOwnProp(tokens, token)) {\n tokens[token](input, config._a, config, token);\n }\n }\n\n var YEAR = 0;\n var MONTH = 1;\n var DATE = 2;\n var HOUR = 3;\n var MINUTE = 4;\n var SECOND = 5;\n var MILLISECOND = 6;\n var WEEK = 7;\n var WEEKDAY = 8;\n\n // FORMATTING\n\n addFormatToken('Y', 0, 0, function () {\n var y = this.year();\n return y <= 9999 ? '' + y : '+' + y;\n });\n\n addFormatToken(0, ['YY', 2], 0, function () {\n return this.year() % 100;\n });\n\n addFormatToken(0, ['YYYY', 4], 0, 'year');\n addFormatToken(0, ['YYYYY', 5], 0, 'year');\n addFormatToken(0, ['YYYYYY', 6, true], 0, 'year');\n\n // ALIASES\n\n addUnitAlias('year', 'y');\n\n // PRIORITIES\n\n addUnitPriority('year', 1);\n\n // PARSING\n\n addRegexToken('Y', matchSigned);\n addRegexToken('YY', match1to2, match2);\n addRegexToken('YYYY', match1to4, match4);\n addRegexToken('YYYYY', match1to6, match6);\n addRegexToken('YYYYYY', match1to6, match6);\n\n addParseToken(['YYYYY', 'YYYYYY'], YEAR);\n addParseToken('YYYY', function (input, array) {\n array[YEAR] = input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input);\n });\n addParseToken('YY', function (input, array) {\n array[YEAR] = hooks.parseTwoDigitYear(input);\n });\n addParseToken('Y', function (input, array) {\n array[YEAR] = parseInt(input, 10);\n });\n\n // HELPERS\n\n function daysInYear(year) {\n return isLeapYear(year) ? 366 : 365;\n }\n\n function isLeapYear(year) {\n return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;\n }\n\n // HOOKS\n\n hooks.parseTwoDigitYear = function (input) {\n return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);\n };\n\n // MOMENTS\n\n var getSetYear = makeGetSet('FullYear', true);\n\n function getIsLeapYear () {\n return isLeapYear(this.year());\n }\n\n function makeGetSet (unit, keepTime) {\n return function (value) {\n if (value != null) {\n set$1(this, unit, value);\n hooks.updateOffset(this, keepTime);\n return this;\n } else {\n return get(this, unit);\n }\n };\n }\n\n function get (mom, unit) {\n return mom.isValid() ?\n mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]() : NaN;\n }\n\n function set$1 (mom, unit, value) {\n if (mom.isValid() && !isNaN(value)) {\n if (unit === 'FullYear' && isLeapYear(mom.year()) && mom.month() === 1 && mom.date() === 29) {\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value, mom.month(), daysInMonth(value, mom.month()));\n }\n else {\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value);\n }\n }\n }\n\n // MOMENTS\n\n function stringGet (units) {\n units = normalizeUnits(units);\n if (isFunction(this[units])) {\n return this[units]();\n }\n return this;\n }\n\n\n function stringSet (units, value) {\n if (typeof units === 'object') {\n units = normalizeObjectUnits(units);\n var prioritized = getPrioritizedUnits(units);\n for (var i = 0; i < prioritized.length; i++) {\n this[prioritized[i].unit](units[prioritized[i].unit]);\n }\n } else {\n units = normalizeUnits(units);\n if (isFunction(this[units])) {\n return this[units](value);\n }\n }\n return this;\n }\n\n function mod(n, x) {\n return ((n % x) + x) % x;\n }\n\n var indexOf;\n\n if (Array.prototype.indexOf) {\n indexOf = Array.prototype.indexOf;\n } else {\n indexOf = function (o) {\n // I know\n var i;\n for (i = 0; i < this.length; ++i) {\n if (this[i] === o) {\n return i;\n }\n }\n return -1;\n };\n }\n\n function daysInMonth(year, month) {\n if (isNaN(year) || isNaN(month)) {\n return NaN;\n }\n var modMonth = mod(month, 12);\n year += (month - modMonth) / 12;\n return modMonth === 1 ? (isLeapYear(year) ? 29 : 28) : (31 - modMonth % 7 % 2);\n }\n\n // FORMATTING\n\n addFormatToken('M', ['MM', 2], 'Mo', function () {\n return this.month() + 1;\n });\n\n addFormatToken('MMM', 0, 0, function (format) {\n return this.localeData().monthsShort(this, format);\n });\n\n addFormatToken('MMMM', 0, 0, function (format) {\n return this.localeData().months(this, format);\n });\n\n // ALIASES\n\n addUnitAlias('month', 'M');\n\n // PRIORITY\n\n addUnitPriority('month', 8);\n\n // PARSING\n\n addRegexToken('M', match1to2);\n addRegexToken('MM', match1to2, match2);\n addRegexToken('MMM', function (isStrict, locale) {\n return locale.monthsShortRegex(isStrict);\n });\n addRegexToken('MMMM', function (isStrict, locale) {\n return locale.monthsRegex(isStrict);\n });\n\n addParseToken(['M', 'MM'], function (input, array) {\n array[MONTH] = toInt(input) - 1;\n });\n\n addParseToken(['MMM', 'MMMM'], function (input, array, config, token) {\n var month = config._locale.monthsParse(input, token, config._strict);\n // if we didn't find a month name, mark the date as invalid.\n if (month != null) {\n array[MONTH] = month;\n } else {\n getParsingFlags(config).invalidMonth = input;\n }\n });\n\n // LOCALES\n\n var MONTHS_IN_FORMAT = /D[oD]?(\\[[^\\[\\]]*\\]|\\s)+MMMM?/;\n var defaultLocaleMonths = 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_');\n function localeMonths (m, format) {\n if (!m) {\n return isArray(this._months) ? this._months :\n this._months['standalone'];\n }\n return isArray(this._months) ? this._months[m.month()] :\n this._months[(this._months.isFormat || MONTHS_IN_FORMAT).test(format) ? 'format' : 'standalone'][m.month()];\n }\n\n var defaultLocaleMonthsShort = 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_');\n function localeMonthsShort (m, format) {\n if (!m) {\n return isArray(this._monthsShort) ? this._monthsShort :\n this._monthsShort['standalone'];\n }\n return isArray(this._monthsShort) ? this._monthsShort[m.month()] :\n this._monthsShort[MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'][m.month()];\n }\n\n function handleStrictParse(monthName, format, strict) {\n var i, ii, mom, llc = monthName.toLocaleLowerCase();\n if (!this._monthsParse) {\n // this is not used\n this._monthsParse = [];\n this._longMonthsParse = [];\n this._shortMonthsParse = [];\n for (i = 0; i < 12; ++i) {\n mom = createUTC([2000, i]);\n this._shortMonthsParse[i] = this.monthsShort(mom, '').toLocaleLowerCase();\n this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase();\n }\n }\n\n if (strict) {\n if (format === 'MMM') {\n ii = indexOf.call(this._shortMonthsParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._longMonthsParse, llc);\n return ii !== -1 ? ii : null;\n }\n } else {\n if (format === 'MMM') {\n ii = indexOf.call(this._shortMonthsParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._longMonthsParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._longMonthsParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortMonthsParse, llc);\n return ii !== -1 ? ii : null;\n }\n }\n }\n\n function localeMonthsParse (monthName, format, strict) {\n var i, mom, regex;\n\n if (this._monthsParseExact) {\n return handleStrictParse.call(this, monthName, format, strict);\n }\n\n if (!this._monthsParse) {\n this._monthsParse = [];\n this._longMonthsParse = [];\n this._shortMonthsParse = [];\n }\n\n // TODO: add sorting\n // Sorting makes sure if one month (or abbr) is a prefix of another\n // see sorting in computeMonthsParse\n for (i = 0; i < 12; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, i]);\n if (strict && !this._longMonthsParse[i]) {\n this._longMonthsParse[i] = new RegExp('^' + this.months(mom, '').replace('.', '') + '$', 'i');\n this._shortMonthsParse[i] = new RegExp('^' + this.monthsShort(mom, '').replace('.', '') + '$', 'i');\n }\n if (!strict && !this._monthsParse[i]) {\n regex = '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, '');\n this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i');\n }\n // test the regex\n if (strict && format === 'MMMM' && this._longMonthsParse[i].test(monthName)) {\n return i;\n } else if (strict && format === 'MMM' && this._shortMonthsParse[i].test(monthName)) {\n return i;\n } else if (!strict && this._monthsParse[i].test(monthName)) {\n return i;\n }\n }\n }\n\n // MOMENTS\n\n function setMonth (mom, value) {\n var dayOfMonth;\n\n if (!mom.isValid()) {\n // No op\n return mom;\n }\n\n if (typeof value === 'string') {\n if (/^\\d+$/.test(value)) {\n value = toInt(value);\n } else {\n value = mom.localeData().monthsParse(value);\n // TODO: Another silent failure?\n if (!isNumber(value)) {\n return mom;\n }\n }\n }\n\n dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value));\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth);\n return mom;\n }\n\n function getSetMonth (value) {\n if (value != null) {\n setMonth(this, value);\n hooks.updateOffset(this, true);\n return this;\n } else {\n return get(this, 'Month');\n }\n }\n\n function getDaysInMonth () {\n return daysInMonth(this.year(), this.month());\n }\n\n var defaultMonthsShortRegex = matchWord;\n function monthsShortRegex (isStrict) {\n if (this._monthsParseExact) {\n if (!hasOwnProp(this, '_monthsRegex')) {\n computeMonthsParse.call(this);\n }\n if (isStrict) {\n return this._monthsShortStrictRegex;\n } else {\n return this._monthsShortRegex;\n }\n } else {\n if (!hasOwnProp(this, '_monthsShortRegex')) {\n this._monthsShortRegex = defaultMonthsShortRegex;\n }\n return this._monthsShortStrictRegex && isStrict ?\n this._monthsShortStrictRegex : this._monthsShortRegex;\n }\n }\n\n var defaultMonthsRegex = matchWord;\n function monthsRegex (isStrict) {\n if (this._monthsParseExact) {\n if (!hasOwnProp(this, '_monthsRegex')) {\n computeMonthsParse.call(this);\n }\n if (isStrict) {\n return this._monthsStrictRegex;\n } else {\n return this._monthsRegex;\n }\n } else {\n if (!hasOwnProp(this, '_monthsRegex')) {\n this._monthsRegex = defaultMonthsRegex;\n }\n return this._monthsStrictRegex && isStrict ?\n this._monthsStrictRegex : this._monthsRegex;\n }\n }\n\n function computeMonthsParse () {\n function cmpLenRev(a, b) {\n return b.length - a.length;\n }\n\n var shortPieces = [], longPieces = [], mixedPieces = [],\n i, mom;\n for (i = 0; i < 12; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, i]);\n shortPieces.push(this.monthsShort(mom, ''));\n longPieces.push(this.months(mom, ''));\n mixedPieces.push(this.months(mom, ''));\n mixedPieces.push(this.monthsShort(mom, ''));\n }\n // Sorting makes sure if one month (or abbr) is a prefix of another it\n // will match the longer piece.\n shortPieces.sort(cmpLenRev);\n longPieces.sort(cmpLenRev);\n mixedPieces.sort(cmpLenRev);\n for (i = 0; i < 12; i++) {\n shortPieces[i] = regexEscape(shortPieces[i]);\n longPieces[i] = regexEscape(longPieces[i]);\n }\n for (i = 0; i < 24; i++) {\n mixedPieces[i] = regexEscape(mixedPieces[i]);\n }\n\n this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._monthsShortRegex = this._monthsRegex;\n this._monthsStrictRegex = new RegExp('^(' + longPieces.join('|') + ')', 'i');\n this._monthsShortStrictRegex = new RegExp('^(' + shortPieces.join('|') + ')', 'i');\n }\n\n function createDate (y, m, d, h, M, s, ms) {\n // can't just apply() to create a date:\n // https://stackoverflow.com/q/181348\n var date;\n // the date constructor remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n date = new Date(y + 400, m, d, h, M, s, ms);\n if (isFinite(date.getFullYear())) {\n date.setFullYear(y);\n }\n } else {\n date = new Date(y, m, d, h, M, s, ms);\n }\n\n return date;\n }\n\n function createUTCDate (y) {\n var date;\n // the Date.UTC function remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n var args = Array.prototype.slice.call(arguments);\n // preserve leap years using a full 400 year cycle, then reset\n args[0] = y + 400;\n date = new Date(Date.UTC.apply(null, args));\n if (isFinite(date.getUTCFullYear())) {\n date.setUTCFullYear(y);\n }\n } else {\n date = new Date(Date.UTC.apply(null, arguments));\n }\n\n return date;\n }\n\n // start-of-first-week - start-of-year\n function firstWeekOffset(year, dow, doy) {\n var // first-week day -- which january is always in the first week (4 for iso, 1 for other)\n fwd = 7 + dow - doy,\n // first-week day local weekday -- which local weekday is fwd\n fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7;\n\n return -fwdlw + fwd - 1;\n }\n\n // https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday\n function dayOfYearFromWeeks(year, week, weekday, dow, doy) {\n var localWeekday = (7 + weekday - dow) % 7,\n weekOffset = firstWeekOffset(year, dow, doy),\n dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset,\n resYear, resDayOfYear;\n\n if (dayOfYear <= 0) {\n resYear = year - 1;\n resDayOfYear = daysInYear(resYear) + dayOfYear;\n } else if (dayOfYear > daysInYear(year)) {\n resYear = year + 1;\n resDayOfYear = dayOfYear - daysInYear(year);\n } else {\n resYear = year;\n resDayOfYear = dayOfYear;\n }\n\n return {\n year: resYear,\n dayOfYear: resDayOfYear\n };\n }\n\n function weekOfYear(mom, dow, doy) {\n var weekOffset = firstWeekOffset(mom.year(), dow, doy),\n week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1,\n resWeek, resYear;\n\n if (week < 1) {\n resYear = mom.year() - 1;\n resWeek = week + weeksInYear(resYear, dow, doy);\n } else if (week > weeksInYear(mom.year(), dow, doy)) {\n resWeek = week - weeksInYear(mom.year(), dow, doy);\n resYear = mom.year() + 1;\n } else {\n resYear = mom.year();\n resWeek = week;\n }\n\n return {\n week: resWeek,\n year: resYear\n };\n }\n\n function weeksInYear(year, dow, doy) {\n var weekOffset = firstWeekOffset(year, dow, doy),\n weekOffsetNext = firstWeekOffset(year + 1, dow, doy);\n return (daysInYear(year) - weekOffset + weekOffsetNext) / 7;\n }\n\n // FORMATTING\n\n addFormatToken('w', ['ww', 2], 'wo', 'week');\n addFormatToken('W', ['WW', 2], 'Wo', 'isoWeek');\n\n // ALIASES\n\n addUnitAlias('week', 'w');\n addUnitAlias('isoWeek', 'W');\n\n // PRIORITIES\n\n addUnitPriority('week', 5);\n addUnitPriority('isoWeek', 5);\n\n // PARSING\n\n addRegexToken('w', match1to2);\n addRegexToken('ww', match1to2, match2);\n addRegexToken('W', match1to2);\n addRegexToken('WW', match1to2, match2);\n\n addWeekParseToken(['w', 'ww', 'W', 'WW'], function (input, week, config, token) {\n week[token.substr(0, 1)] = toInt(input);\n });\n\n // HELPERS\n\n // LOCALES\n\n function localeWeek (mom) {\n return weekOfYear(mom, this._week.dow, this._week.doy).week;\n }\n\n var defaultLocaleWeek = {\n dow : 0, // Sunday is the first day of the week.\n doy : 6 // The week that contains Jan 6th is the first week of the year.\n };\n\n function localeFirstDayOfWeek () {\n return this._week.dow;\n }\n\n function localeFirstDayOfYear () {\n return this._week.doy;\n }\n\n // MOMENTS\n\n function getSetWeek (input) {\n var week = this.localeData().week(this);\n return input == null ? week : this.add((input - week) * 7, 'd');\n }\n\n function getSetISOWeek (input) {\n var week = weekOfYear(this, 1, 4).week;\n return input == null ? week : this.add((input - week) * 7, 'd');\n }\n\n // FORMATTING\n\n addFormatToken('d', 0, 'do', 'day');\n\n addFormatToken('dd', 0, 0, function (format) {\n return this.localeData().weekdaysMin(this, format);\n });\n\n addFormatToken('ddd', 0, 0, function (format) {\n return this.localeData().weekdaysShort(this, format);\n });\n\n addFormatToken('dddd', 0, 0, function (format) {\n return this.localeData().weekdays(this, format);\n });\n\n addFormatToken('e', 0, 0, 'weekday');\n addFormatToken('E', 0, 0, 'isoWeekday');\n\n // ALIASES\n\n addUnitAlias('day', 'd');\n addUnitAlias('weekday', 'e');\n addUnitAlias('isoWeekday', 'E');\n\n // PRIORITY\n addUnitPriority('day', 11);\n addUnitPriority('weekday', 11);\n addUnitPriority('isoWeekday', 11);\n\n // PARSING\n\n addRegexToken('d', match1to2);\n addRegexToken('e', match1to2);\n addRegexToken('E', match1to2);\n addRegexToken('dd', function (isStrict, locale) {\n return locale.weekdaysMinRegex(isStrict);\n });\n addRegexToken('ddd', function (isStrict, locale) {\n return locale.weekdaysShortRegex(isStrict);\n });\n addRegexToken('dddd', function (isStrict, locale) {\n return locale.weekdaysRegex(isStrict);\n });\n\n addWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) {\n var weekday = config._locale.weekdaysParse(input, token, config._strict);\n // if we didn't get a weekday name, mark the date as invalid\n if (weekday != null) {\n week.d = weekday;\n } else {\n getParsingFlags(config).invalidWeekday = input;\n }\n });\n\n addWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) {\n week[token] = toInt(input);\n });\n\n // HELPERS\n\n function parseWeekday(input, locale) {\n if (typeof input !== 'string') {\n return input;\n }\n\n if (!isNaN(input)) {\n return parseInt(input, 10);\n }\n\n input = locale.weekdaysParse(input);\n if (typeof input === 'number') {\n return input;\n }\n\n return null;\n }\n\n function parseIsoWeekday(input, locale) {\n if (typeof input === 'string') {\n return locale.weekdaysParse(input) % 7 || 7;\n }\n return isNaN(input) ? null : input;\n }\n\n // LOCALES\n function shiftWeekdays (ws, n) {\n return ws.slice(n, 7).concat(ws.slice(0, n));\n }\n\n var defaultLocaleWeekdays = 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_');\n function localeWeekdays (m, format) {\n var weekdays = isArray(this._weekdays) ? this._weekdays :\n this._weekdays[(m && m !== true && this._weekdays.isFormat.test(format)) ? 'format' : 'standalone'];\n return (m === true) ? shiftWeekdays(weekdays, this._week.dow)\n : (m) ? weekdays[m.day()] : weekdays;\n }\n\n var defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_');\n function localeWeekdaysShort (m) {\n return (m === true) ? shiftWeekdays(this._weekdaysShort, this._week.dow)\n : (m) ? this._weekdaysShort[m.day()] : this._weekdaysShort;\n }\n\n var defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_');\n function localeWeekdaysMin (m) {\n return (m === true) ? shiftWeekdays(this._weekdaysMin, this._week.dow)\n : (m) ? this._weekdaysMin[m.day()] : this._weekdaysMin;\n }\n\n function handleStrictParse$1(weekdayName, format, strict) {\n var i, ii, mom, llc = weekdayName.toLocaleLowerCase();\n if (!this._weekdaysParse) {\n this._weekdaysParse = [];\n this._shortWeekdaysParse = [];\n this._minWeekdaysParse = [];\n\n for (i = 0; i < 7; ++i) {\n mom = createUTC([2000, 1]).day(i);\n this._minWeekdaysParse[i] = this.weekdaysMin(mom, '').toLocaleLowerCase();\n this._shortWeekdaysParse[i] = this.weekdaysShort(mom, '').toLocaleLowerCase();\n this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase();\n }\n }\n\n if (strict) {\n if (format === 'dddd') {\n ii = indexOf.call(this._weekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else if (format === 'ddd') {\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n }\n } else {\n if (format === 'dddd') {\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else if (format === 'ddd') {\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._minWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n }\n }\n }\n\n function localeWeekdaysParse (weekdayName, format, strict) {\n var i, mom, regex;\n\n if (this._weekdaysParseExact) {\n return handleStrictParse$1.call(this, weekdayName, format, strict);\n }\n\n if (!this._weekdaysParse) {\n this._weekdaysParse = [];\n this._minWeekdaysParse = [];\n this._shortWeekdaysParse = [];\n this._fullWeekdaysParse = [];\n }\n\n for (i = 0; i < 7; i++) {\n // make the regex if we don't have it already\n\n mom = createUTC([2000, 1]).day(i);\n if (strict && !this._fullWeekdaysParse[i]) {\n this._fullWeekdaysParse[i] = new RegExp('^' + this.weekdays(mom, '').replace('.', '\\\\.?') + '$', 'i');\n this._shortWeekdaysParse[i] = new RegExp('^' + this.weekdaysShort(mom, '').replace('.', '\\\\.?') + '$', 'i');\n this._minWeekdaysParse[i] = new RegExp('^' + this.weekdaysMin(mom, '').replace('.', '\\\\.?') + '$', 'i');\n }\n if (!this._weekdaysParse[i]) {\n regex = '^' + this.weekdays(mom, '') + '|^' + this.weekdaysShort(mom, '') + '|^' + this.weekdaysMin(mom, '');\n this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i');\n }\n // test the regex\n if (strict && format === 'dddd' && this._fullWeekdaysParse[i].test(weekdayName)) {\n return i;\n } else if (strict && format === 'ddd' && this._shortWeekdaysParse[i].test(weekdayName)) {\n return i;\n } else if (strict && format === 'dd' && this._minWeekdaysParse[i].test(weekdayName)) {\n return i;\n } else if (!strict && this._weekdaysParse[i].test(weekdayName)) {\n return i;\n }\n }\n }\n\n // MOMENTS\n\n function getSetDayOfWeek (input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay();\n if (input != null) {\n input = parseWeekday(input, this.localeData());\n return this.add(input - day, 'd');\n } else {\n return day;\n }\n }\n\n function getSetLocaleDayOfWeek (input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7;\n return input == null ? weekday : this.add(input - weekday, 'd');\n }\n\n function getSetISODayOfWeek (input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n\n // behaves the same as moment#day except\n // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)\n // as a setter, sunday should belong to the previous week.\n\n if (input != null) {\n var weekday = parseIsoWeekday(input, this.localeData());\n return this.day(this.day() % 7 ? weekday : weekday - 7);\n } else {\n return this.day() || 7;\n }\n }\n\n var defaultWeekdaysRegex = matchWord;\n function weekdaysRegex (isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysStrictRegex;\n } else {\n return this._weekdaysRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n this._weekdaysRegex = defaultWeekdaysRegex;\n }\n return this._weekdaysStrictRegex && isStrict ?\n this._weekdaysStrictRegex : this._weekdaysRegex;\n }\n }\n\n var defaultWeekdaysShortRegex = matchWord;\n function weekdaysShortRegex (isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysShortStrictRegex;\n } else {\n return this._weekdaysShortRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysShortRegex')) {\n this._weekdaysShortRegex = defaultWeekdaysShortRegex;\n }\n return this._weekdaysShortStrictRegex && isStrict ?\n this._weekdaysShortStrictRegex : this._weekdaysShortRegex;\n }\n }\n\n var defaultWeekdaysMinRegex = matchWord;\n function weekdaysMinRegex (isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysMinStrictRegex;\n } else {\n return this._weekdaysMinRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysMinRegex')) {\n this._weekdaysMinRegex = defaultWeekdaysMinRegex;\n }\n return this._weekdaysMinStrictRegex && isStrict ?\n this._weekdaysMinStrictRegex : this._weekdaysMinRegex;\n }\n }\n\n\n function computeWeekdaysParse () {\n function cmpLenRev(a, b) {\n return b.length - a.length;\n }\n\n var minPieces = [], shortPieces = [], longPieces = [], mixedPieces = [],\n i, mom, minp, shortp, longp;\n for (i = 0; i < 7; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, 1]).day(i);\n minp = this.weekdaysMin(mom, '');\n shortp = this.weekdaysShort(mom, '');\n longp = this.weekdays(mom, '');\n minPieces.push(minp);\n shortPieces.push(shortp);\n longPieces.push(longp);\n mixedPieces.push(minp);\n mixedPieces.push(shortp);\n mixedPieces.push(longp);\n }\n // Sorting makes sure if one weekday (or abbr) is a prefix of another it\n // will match the longer piece.\n minPieces.sort(cmpLenRev);\n shortPieces.sort(cmpLenRev);\n longPieces.sort(cmpLenRev);\n mixedPieces.sort(cmpLenRev);\n for (i = 0; i < 7; i++) {\n shortPieces[i] = regexEscape(shortPieces[i]);\n longPieces[i] = regexEscape(longPieces[i]);\n mixedPieces[i] = regexEscape(mixedPieces[i]);\n }\n\n this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._weekdaysShortRegex = this._weekdaysRegex;\n this._weekdaysMinRegex = this._weekdaysRegex;\n\n this._weekdaysStrictRegex = new RegExp('^(' + longPieces.join('|') + ')', 'i');\n this._weekdaysShortStrictRegex = new RegExp('^(' + shortPieces.join('|') + ')', 'i');\n this._weekdaysMinStrictRegex = new RegExp('^(' + minPieces.join('|') + ')', 'i');\n }\n\n // FORMATTING\n\n function hFormat() {\n return this.hours() % 12 || 12;\n }\n\n function kFormat() {\n return this.hours() || 24;\n }\n\n addFormatToken('H', ['HH', 2], 0, 'hour');\n addFormatToken('h', ['hh', 2], 0, hFormat);\n addFormatToken('k', ['kk', 2], 0, kFormat);\n\n addFormatToken('hmm', 0, 0, function () {\n return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2);\n });\n\n addFormatToken('hmmss', 0, 0, function () {\n return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2) +\n zeroFill(this.seconds(), 2);\n });\n\n addFormatToken('Hmm', 0, 0, function () {\n return '' + this.hours() + zeroFill(this.minutes(), 2);\n });\n\n addFormatToken('Hmmss', 0, 0, function () {\n return '' + this.hours() + zeroFill(this.minutes(), 2) +\n zeroFill(this.seconds(), 2);\n });\n\n function meridiem (token, lowercase) {\n addFormatToken(token, 0, 0, function () {\n return this.localeData().meridiem(this.hours(), this.minutes(), lowercase);\n });\n }\n\n meridiem('a', true);\n meridiem('A', false);\n\n // ALIASES\n\n addUnitAlias('hour', 'h');\n\n // PRIORITY\n addUnitPriority('hour', 13);\n\n // PARSING\n\n function matchMeridiem (isStrict, locale) {\n return locale._meridiemParse;\n }\n\n addRegexToken('a', matchMeridiem);\n addRegexToken('A', matchMeridiem);\n addRegexToken('H', match1to2);\n addRegexToken('h', match1to2);\n addRegexToken('k', match1to2);\n addRegexToken('HH', match1to2, match2);\n addRegexToken('hh', match1to2, match2);\n addRegexToken('kk', match1to2, match2);\n\n addRegexToken('hmm', match3to4);\n addRegexToken('hmmss', match5to6);\n addRegexToken('Hmm', match3to4);\n addRegexToken('Hmmss', match5to6);\n\n addParseToken(['H', 'HH'], HOUR);\n addParseToken(['k', 'kk'], function (input, array, config) {\n var kInput = toInt(input);\n array[HOUR] = kInput === 24 ? 0 : kInput;\n });\n addParseToken(['a', 'A'], function (input, array, config) {\n config._isPm = config._locale.isPM(input);\n config._meridiem = input;\n });\n addParseToken(['h', 'hh'], function (input, array, config) {\n array[HOUR] = toInt(input);\n getParsingFlags(config).bigHour = true;\n });\n addParseToken('hmm', function (input, array, config) {\n var pos = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos));\n array[MINUTE] = toInt(input.substr(pos));\n getParsingFlags(config).bigHour = true;\n });\n addParseToken('hmmss', function (input, array, config) {\n var pos1 = input.length - 4;\n var pos2 = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos1));\n array[MINUTE] = toInt(input.substr(pos1, 2));\n array[SECOND] = toInt(input.substr(pos2));\n getParsingFlags(config).bigHour = true;\n });\n addParseToken('Hmm', function (input, array, config) {\n var pos = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos));\n array[MINUTE] = toInt(input.substr(pos));\n });\n addParseToken('Hmmss', function (input, array, config) {\n var pos1 = input.length - 4;\n var pos2 = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos1));\n array[MINUTE] = toInt(input.substr(pos1, 2));\n array[SECOND] = toInt(input.substr(pos2));\n });\n\n // LOCALES\n\n function localeIsPM (input) {\n // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays\n // Using charAt should be more compatible.\n return ((input + '').toLowerCase().charAt(0) === 'p');\n }\n\n var defaultLocaleMeridiemParse = /[ap]\\.?m?\\.?/i;\n function localeMeridiem (hours, minutes, isLower) {\n if (hours > 11) {\n return isLower ? 'pm' : 'PM';\n } else {\n return isLower ? 'am' : 'AM';\n }\n }\n\n\n // MOMENTS\n\n // Setting the hour should keep the time, because the user explicitly\n // specified which hour they want. So trying to maintain the same hour (in\n // a new timezone) makes sense. Adding/subtracting hours does not follow\n // this rule.\n var getSetHour = makeGetSet('Hours', true);\n\n var baseConfig = {\n calendar: defaultCalendar,\n longDateFormat: defaultLongDateFormat,\n invalidDate: defaultInvalidDate,\n ordinal: defaultOrdinal,\n dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse,\n relativeTime: defaultRelativeTime,\n\n months: defaultLocaleMonths,\n monthsShort: defaultLocaleMonthsShort,\n\n week: defaultLocaleWeek,\n\n weekdays: defaultLocaleWeekdays,\n weekdaysMin: defaultLocaleWeekdaysMin,\n weekdaysShort: defaultLocaleWeekdaysShort,\n\n meridiemParse: defaultLocaleMeridiemParse\n };\n\n // internal storage for locale config files\n var locales = {};\n var localeFamilies = {};\n var globalLocale;\n\n function normalizeLocale(key) {\n return key ? key.toLowerCase().replace('_', '-') : key;\n }\n\n // pick the locale from the array\n // try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each\n // substring from most specific to least, but move to the next array item if it's a more specific variant than the current root\n function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return globalLocale;\n }\n\n function loadLocale(name) {\n var oldLocale = null;\n // TODO: Find a better way to register and load all the locales in Node\n if (!locales[name] && (typeof module !== 'undefined') &&\n module && module.exports) {\n try {\n oldLocale = globalLocale._abbr;\n var aliasedRequire = require;\n aliasedRequire('./locale/' + name);\n getSetGlobalLocale(oldLocale);\n } catch (e) {}\n }\n return locales[name];\n }\n\n // This function will load locale and then set the global locale. If\n // no arguments are passed in, it will simply return the current global\n // locale key.\n function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n }\n\n function defineLocale (name, config) {\n if (config !== null) {\n var locale, parentConfig = baseConfig;\n config.abbr = name;\n if (locales[name] != null) {\n deprecateSimple('defineLocaleOverride',\n 'use moment.updateLocale(localeName, config) to change ' +\n 'an existing locale. moment.defineLocale(localeName, ' +\n 'config) should only be used for creating a new locale ' +\n 'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.');\n parentConfig = locales[name]._config;\n } else if (config.parentLocale != null) {\n if (locales[config.parentLocale] != null) {\n parentConfig = locales[config.parentLocale]._config;\n } else {\n locale = loadLocale(config.parentLocale);\n if (locale != null) {\n parentConfig = locale._config;\n } else {\n if (!localeFamilies[config.parentLocale]) {\n localeFamilies[config.parentLocale] = [];\n }\n localeFamilies[config.parentLocale].push({\n name: name,\n config: config\n });\n return null;\n }\n }\n }\n locales[name] = new Locale(mergeConfigs(parentConfig, config));\n\n if (localeFamilies[name]) {\n localeFamilies[name].forEach(function (x) {\n defineLocale(x.name, x.config);\n });\n }\n\n // backwards compat for now: also set the locale\n // make sure we set the locale AFTER all child locales have been\n // created, so we won't end up with the child locale set.\n getSetGlobalLocale(name);\n\n\n return locales[name];\n } else {\n // useful for testing\n delete locales[name];\n return null;\n }\n }\n\n function updateLocale(name, config) {\n if (config != null) {\n var locale, tmpLocale, parentConfig = baseConfig;\n // MERGE\n tmpLocale = loadLocale(name);\n if (tmpLocale != null) {\n parentConfig = tmpLocale._config;\n }\n config = mergeConfigs(parentConfig, config);\n locale = new Locale(config);\n locale.parentLocale = locales[name];\n locales[name] = locale;\n\n // backwards compat for now: also set the locale\n getSetGlobalLocale(name);\n } else {\n // pass null for config to unupdate, useful for tests\n if (locales[name] != null) {\n if (locales[name].parentLocale != null) {\n locales[name] = locales[name].parentLocale;\n } else if (locales[name] != null) {\n delete locales[name];\n }\n }\n }\n return locales[name];\n }\n\n // returns locale data\n function getLocale (key) {\n var locale;\n\n if (key && key._locale && key._locale._abbr) {\n key = key._locale._abbr;\n }\n\n if (!key) {\n return globalLocale;\n }\n\n if (!isArray(key)) {\n //short-circuit everything else\n locale = loadLocale(key);\n if (locale) {\n return locale;\n }\n key = [key];\n }\n\n return chooseLocale(key);\n }\n\n function listLocales() {\n return keys(locales);\n }\n\n function checkOverflow (m) {\n var overflow;\n var a = m._a;\n\n if (a && getParsingFlags(m).overflow === -2) {\n overflow =\n a[MONTH] < 0 || a[MONTH] > 11 ? MONTH :\n a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH]) ? DATE :\n a[HOUR] < 0 || a[HOUR] > 24 || (a[HOUR] === 24 && (a[MINUTE] !== 0 || a[SECOND] !== 0 || a[MILLISECOND] !== 0)) ? HOUR :\n a[MINUTE] < 0 || a[MINUTE] > 59 ? MINUTE :\n a[SECOND] < 0 || a[SECOND] > 59 ? SECOND :\n a[MILLISECOND] < 0 || a[MILLISECOND] > 999 ? MILLISECOND :\n -1;\n\n if (getParsingFlags(m)._overflowDayOfYear && (overflow < YEAR || overflow > DATE)) {\n overflow = DATE;\n }\n if (getParsingFlags(m)._overflowWeeks && overflow === -1) {\n overflow = WEEK;\n }\n if (getParsingFlags(m)._overflowWeekday && overflow === -1) {\n overflow = WEEKDAY;\n }\n\n getParsingFlags(m).overflow = overflow;\n }\n\n return m;\n }\n\n // Pick the first defined of two or three arguments.\n function defaults(a, b, c) {\n if (a != null) {\n return a;\n }\n if (b != null) {\n return b;\n }\n return c;\n }\n\n function currentDateArray(config) {\n // hooks is actually the exported moment object\n var nowValue = new Date(hooks.now());\n if (config._useUTC) {\n return [nowValue.getUTCFullYear(), nowValue.getUTCMonth(), nowValue.getUTCDate()];\n }\n return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()];\n }\n\n // convert an array to a date.\n // the array should mirror the parameters below\n // note: all values past the year are optional and will default to the lowest possible value.\n // [year, month, day , hour, minute, second, millisecond]\n function configFromArray (config) {\n var i, date, input = [], currentDate, expectedWeekday, yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear != null) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse) || config._dayOfYear === 0) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n expectedWeekday = config._useUTC ? config._d.getUTCDay() : config._d.getDay();\n\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n\n // check for mismatching day of week\n if (config._w && typeof config._w.d !== 'undefined' && config._w.d !== expectedWeekday) {\n getParsingFlags(config).weekdayMismatch = true;\n }\n }\n\n function dayOfYearFromWeekInfo(config) {\n var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow;\n\n w = config._w;\n if (w.GG != null || w.W != null || w.E != null) {\n dow = 1;\n doy = 4;\n\n // TODO: We need to take the current isoWeekYear, but that depends on\n // how we interpret now (local, utc, fixed offset). So create\n // a now version of current config (take local/utc/offset flags, and\n // create now).\n weekYear = defaults(w.GG, config._a[YEAR], weekOfYear(createLocal(), 1, 4).year);\n week = defaults(w.W, 1);\n weekday = defaults(w.E, 1);\n if (weekday < 1 || weekday > 7) {\n weekdayOverflow = true;\n }\n } else {\n dow = config._locale._week.dow;\n doy = config._locale._week.doy;\n\n var curWeek = weekOfYear(createLocal(), dow, doy);\n\n weekYear = defaults(w.gg, config._a[YEAR], curWeek.year);\n\n // Default to current week.\n week = defaults(w.w, curWeek.week);\n\n if (w.d != null) {\n // weekday -- low day numbers are considered next week\n weekday = w.d;\n if (weekday < 0 || weekday > 6) {\n weekdayOverflow = true;\n }\n } else if (w.e != null) {\n // local weekday -- counting starts from beginning of week\n weekday = w.e + dow;\n if (w.e < 0 || w.e > 6) {\n weekdayOverflow = true;\n }\n } else {\n // default to beginning of week\n weekday = dow;\n }\n }\n if (week < 1 || week > weeksInYear(weekYear, dow, doy)) {\n getParsingFlags(config)._overflowWeeks = true;\n } else if (weekdayOverflow != null) {\n getParsingFlags(config)._overflowWeekday = true;\n } else {\n temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy);\n config._a[YEAR] = temp.year;\n config._dayOfYear = temp.dayOfYear;\n }\n }\n\n // iso 8601 regex\n // 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00)\n var extendedIsoRegex = /^\\s*((?:[+-]\\d{6}|\\d{4})-(?:\\d\\d-\\d\\d|W\\d\\d-\\d|W\\d\\d|\\d\\d\\d|\\d\\d))(?:(T| )(\\d\\d(?::\\d\\d(?::\\d\\d(?:[.,]\\d+)?)?)?)([\\+\\-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/;\n var basicIsoRegex = /^\\s*((?:[+-]\\d{6}|\\d{4})(?:\\d\\d\\d\\d|W\\d\\d\\d|W\\d\\d|\\d\\d\\d|\\d\\d))(?:(T| )(\\d\\d(?:\\d\\d(?:\\d\\d(?:[.,]\\d+)?)?)?)([\\+\\-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/;\n\n var tzRegex = /Z|[+-]\\d\\d(?::?\\d\\d)?/;\n\n var isoDates = [\n ['YYYYYY-MM-DD', /[+-]\\d{6}-\\d\\d-\\d\\d/],\n ['YYYY-MM-DD', /\\d{4}-\\d\\d-\\d\\d/],\n ['GGGG-[W]WW-E', /\\d{4}-W\\d\\d-\\d/],\n ['GGGG-[W]WW', /\\d{4}-W\\d\\d/, false],\n ['YYYY-DDD', /\\d{4}-\\d{3}/],\n ['YYYY-MM', /\\d{4}-\\d\\d/, false],\n ['YYYYYYMMDD', /[+-]\\d{10}/],\n ['YYYYMMDD', /\\d{8}/],\n // YYYYMM is NOT allowed by the standard\n ['GGGG[W]WWE', /\\d{4}W\\d{3}/],\n ['GGGG[W]WW', /\\d{4}W\\d{2}/, false],\n ['YYYYDDD', /\\d{7}/]\n ];\n\n // iso time formats and regexes\n var isoTimes = [\n ['HH:mm:ss.SSSS', /\\d\\d:\\d\\d:\\d\\d\\.\\d+/],\n ['HH:mm:ss,SSSS', /\\d\\d:\\d\\d:\\d\\d,\\d+/],\n ['HH:mm:ss', /\\d\\d:\\d\\d:\\d\\d/],\n ['HH:mm', /\\d\\d:\\d\\d/],\n ['HHmmss.SSSS', /\\d\\d\\d\\d\\d\\d\\.\\d+/],\n ['HHmmss,SSSS', /\\d\\d\\d\\d\\d\\d,\\d+/],\n ['HHmmss', /\\d\\d\\d\\d\\d\\d/],\n ['HHmm', /\\d\\d\\d\\d/],\n ['HH', /\\d\\d/]\n ];\n\n var aspNetJsonRegex = /^\\/?Date\\((\\-?\\d+)/i;\n\n // date from iso format\n function configFromISO(config) {\n var i, l,\n string = config._i,\n match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string),\n allowTime, dateFormat, timeFormat, tzFormat;\n\n if (match) {\n getParsingFlags(config).iso = true;\n\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(match[1])) {\n dateFormat = isoDates[i][0];\n allowTime = isoDates[i][2] !== false;\n break;\n }\n }\n if (dateFormat == null) {\n config._isValid = false;\n return;\n }\n if (match[3]) {\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(match[3])) {\n // match[2] should be 'T' or space\n timeFormat = (match[2] || ' ') + isoTimes[i][0];\n break;\n }\n }\n if (timeFormat == null) {\n config._isValid = false;\n return;\n }\n }\n if (!allowTime && timeFormat != null) {\n config._isValid = false;\n return;\n }\n if (match[4]) {\n if (tzRegex.exec(match[4])) {\n tzFormat = 'Z';\n } else {\n config._isValid = false;\n return;\n }\n }\n config._f = dateFormat + (timeFormat || '') + (tzFormat || '');\n configFromStringAndFormat(config);\n } else {\n config._isValid = false;\n }\n }\n\n // RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3\n var rfc2822 = /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\\s)?(\\d{1,2})\\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\\s(\\d{2,4})\\s(\\d\\d):(\\d\\d)(?::(\\d\\d))?\\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\\d{4}))$/;\n\n function extractFromRFC2822Strings(yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr) {\n var result = [\n untruncateYear(yearStr),\n defaultLocaleMonthsShort.indexOf(monthStr),\n parseInt(dayStr, 10),\n parseInt(hourStr, 10),\n parseInt(minuteStr, 10)\n ];\n\n if (secondStr) {\n result.push(parseInt(secondStr, 10));\n }\n\n return result;\n }\n\n function untruncateYear(yearStr) {\n var year = parseInt(yearStr, 10);\n if (year <= 49) {\n return 2000 + year;\n } else if (year <= 999) {\n return 1900 + year;\n }\n return year;\n }\n\n function preprocessRFC2822(s) {\n // Remove comments and folding whitespace and replace multiple-spaces with a single space\n return s.replace(/\\([^)]*\\)|[\\n\\t]/g, ' ').replace(/(\\s\\s+)/g, ' ').replace(/^\\s\\s*/, '').replace(/\\s\\s*$/, '');\n }\n\n function checkWeekday(weekdayStr, parsedInput, config) {\n if (weekdayStr) {\n // TODO: Replace the vanilla JS Date object with an indepentent day-of-week check.\n var weekdayProvided = defaultLocaleWeekdaysShort.indexOf(weekdayStr),\n weekdayActual = new Date(parsedInput[0], parsedInput[1], parsedInput[2]).getDay();\n if (weekdayProvided !== weekdayActual) {\n getParsingFlags(config).weekdayMismatch = true;\n config._isValid = false;\n return false;\n }\n }\n return true;\n }\n\n var obsOffsets = {\n UT: 0,\n GMT: 0,\n EDT: -4 * 60,\n EST: -5 * 60,\n CDT: -5 * 60,\n CST: -6 * 60,\n MDT: -6 * 60,\n MST: -7 * 60,\n PDT: -7 * 60,\n PST: -8 * 60\n };\n\n function calculateOffset(obsOffset, militaryOffset, numOffset) {\n if (obsOffset) {\n return obsOffsets[obsOffset];\n } else if (militaryOffset) {\n // the only allowed military tz is Z\n return 0;\n } else {\n var hm = parseInt(numOffset, 10);\n var m = hm % 100, h = (hm - m) / 100;\n return h * 60 + m;\n }\n }\n\n // date and time from ref 2822 format\n function configFromRFC2822(config) {\n var match = rfc2822.exec(preprocessRFC2822(config._i));\n if (match) {\n var parsedArray = extractFromRFC2822Strings(match[4], match[3], match[2], match[5], match[6], match[7]);\n if (!checkWeekday(match[1], parsedArray, config)) {\n return;\n }\n\n config._a = parsedArray;\n config._tzm = calculateOffset(match[8], match[9], match[10]);\n\n config._d = createUTCDate.apply(null, config._a);\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n\n getParsingFlags(config).rfc2822 = true;\n } else {\n config._isValid = false;\n }\n }\n\n // date from iso format or fallback\n function configFromString(config) {\n var matched = aspNetJsonRegex.exec(config._i);\n\n if (matched !== null) {\n config._d = new Date(+matched[1]);\n return;\n }\n\n configFromISO(config);\n if (config._isValid === false) {\n delete config._isValid;\n } else {\n return;\n }\n\n configFromRFC2822(config);\n if (config._isValid === false) {\n delete config._isValid;\n } else {\n return;\n }\n\n // Final attempt, use Input Fallback\n hooks.createFromInputFallback(config);\n }\n\n hooks.createFromInputFallback = deprecate(\n 'value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), ' +\n 'which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are ' +\n 'discouraged and will be removed in an upcoming major release. Please refer to ' +\n 'http://momentjs.com/guides/#/warnings/js-date/ for more info.',\n function (config) {\n config._d = new Date(config._i + (config._useUTC ? ' UTC' : ''));\n }\n );\n\n // constant that refers to the ISO standard\n hooks.ISO_8601 = function () {};\n\n // constant that refers to the RFC 2822 form\n hooks.RFC_2822 = function () {};\n\n // date from string and format string\n function configFromStringAndFormat(config) {\n // TODO: Move this to another part of the creation flow to prevent circular deps\n if (config._f === hooks.ISO_8601) {\n configFromISO(config);\n return;\n }\n if (config._f === hooks.RFC_2822) {\n configFromRFC2822(config);\n return;\n }\n config._a = [];\n getParsingFlags(config).empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n // console.log('token', token, 'parsedInput', parsedInput,\n // 'regex', getParseRegexForToken(token, config));\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n getParsingFlags(config).unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n getParsingFlags(config).empty = false;\n }\n else {\n getParsingFlags(config).unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n getParsingFlags(config).unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n getParsingFlags(config).charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n getParsingFlags(config).unusedInput.push(string);\n }\n\n // clear _12h flag if hour is <= 12\n if (config._a[HOUR] <= 12 &&\n getParsingFlags(config).bigHour === true &&\n config._a[HOUR] > 0) {\n getParsingFlags(config).bigHour = undefined;\n }\n\n getParsingFlags(config).parsedDateParts = config._a.slice(0);\n getParsingFlags(config).meridiem = config._meridiem;\n // handle meridiem\n config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR], config._meridiem);\n\n configFromArray(config);\n checkOverflow(config);\n }\n\n\n function meridiemFixWrap (locale, hour, meridiem) {\n var isPm;\n\n if (meridiem == null) {\n // nothing to do\n return hour;\n }\n if (locale.meridiemHour != null) {\n return locale.meridiemHour(hour, meridiem);\n } else if (locale.isPM != null) {\n // Fallback\n isPm = locale.isPM(meridiem);\n if (isPm && hour < 12) {\n hour += 12;\n }\n if (!isPm && hour === 12) {\n hour = 0;\n }\n return hour;\n } else {\n // this is not supposed to happen\n return hour;\n }\n }\n\n // date from string and array of format strings\n function configFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n\n scoreToBeat,\n i,\n currentScore;\n\n if (config._f.length === 0) {\n getParsingFlags(config).invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < config._f.length; i++) {\n currentScore = 0;\n tempConfig = copyConfig({}, config);\n if (config._useUTC != null) {\n tempConfig._useUTC = config._useUTC;\n }\n tempConfig._f = config._f[i];\n configFromStringAndFormat(tempConfig);\n\n if (!isValid(tempConfig)) {\n continue;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += getParsingFlags(tempConfig).charsLeftOver;\n\n //or tokens\n currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10;\n\n getParsingFlags(tempConfig).score = currentScore;\n\n if (scoreToBeat == null || currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n\n extend(config, bestMoment || tempConfig);\n }\n\n function configFromObject(config) {\n if (config._d) {\n return;\n }\n\n var i = normalizeObjectUnits(config._i);\n config._a = map([i.year, i.month, i.day || i.date, i.hour, i.minute, i.second, i.millisecond], function (obj) {\n return obj && parseInt(obj, 10);\n });\n\n configFromArray(config);\n }\n\n function createFromConfig (config) {\n var res = new Moment(checkOverflow(prepareConfig(config)));\n if (res._nextDay) {\n // Adding is smart enough around DST\n res.add(1, 'd');\n res._nextDay = undefined;\n }\n\n return res;\n }\n\n function prepareConfig (config) {\n var input = config._i,\n format = config._f;\n\n config._locale = config._locale || getLocale(config._l);\n\n if (input === null || (format === undefined && input === '')) {\n return createInvalid({nullInput: true});\n }\n\n if (typeof input === 'string') {\n config._i = input = config._locale.preparse(input);\n }\n\n if (isMoment(input)) {\n return new Moment(checkOverflow(input));\n } else if (isDate(input)) {\n config._d = input;\n } else if (isArray(format)) {\n configFromStringAndArray(config);\n } else if (format) {\n configFromStringAndFormat(config);\n } else {\n configFromInput(config);\n }\n\n if (!isValid(config)) {\n config._d = null;\n }\n\n return config;\n }\n\n function configFromInput(config) {\n var input = config._i;\n if (isUndefined(input)) {\n config._d = new Date(hooks.now());\n } else if (isDate(input)) {\n config._d = new Date(input.valueOf());\n } else if (typeof input === 'string') {\n configFromString(config);\n } else if (isArray(input)) {\n config._a = map(input.slice(0), function (obj) {\n return parseInt(obj, 10);\n });\n configFromArray(config);\n } else if (isObject(input)) {\n configFromObject(config);\n } else if (isNumber(input)) {\n // from milliseconds\n config._d = new Date(input);\n } else {\n hooks.createFromInputFallback(config);\n }\n }\n\n function createLocalOrUTC (input, format, locale, strict, isUTC) {\n var c = {};\n\n if (locale === true || locale === false) {\n strict = locale;\n locale = undefined;\n }\n\n if ((isObject(input) && isObjectEmpty(input)) ||\n (isArray(input) && input.length === 0)) {\n input = undefined;\n }\n // object construction must be done this way.\n // https://github.com/moment/moment/issues/1423\n c._isAMomentObject = true;\n c._useUTC = c._isUTC = isUTC;\n c._l = locale;\n c._i = input;\n c._f = format;\n c._strict = strict;\n\n return createFromConfig(c);\n }\n\n function createLocal (input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, false);\n }\n\n var prototypeMin = deprecate(\n 'moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/',\n function () {\n var other = createLocal.apply(null, arguments);\n if (this.isValid() && other.isValid()) {\n return other < this ? this : other;\n } else {\n return createInvalid();\n }\n }\n );\n\n var prototypeMax = deprecate(\n 'moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/',\n function () {\n var other = createLocal.apply(null, arguments);\n if (this.isValid() && other.isValid()) {\n return other > this ? this : other;\n } else {\n return createInvalid();\n }\n }\n );\n\n // Pick a moment m from moments so that m[fn](other) is true for all\n // other. This relies on the function fn to be transitive.\n //\n // moments should either be an array of moment objects or an array, whose\n // first element is an array of moment objects.\n function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return createLocal();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }\n\n // TODO: Use [].sort instead?\n function min () {\n var args = [].slice.call(arguments, 0);\n\n return pickBy('isBefore', args);\n }\n\n function max () {\n var args = [].slice.call(arguments, 0);\n\n return pickBy('isAfter', args);\n }\n\n var now = function () {\n return Date.now ? Date.now() : +(new Date());\n };\n\n var ordering = ['year', 'quarter', 'month', 'week', 'day', 'hour', 'minute', 'second', 'millisecond'];\n\n function isDurationValid(m) {\n for (var key in m) {\n if (!(indexOf.call(ordering, key) !== -1 && (m[key] == null || !isNaN(m[key])))) {\n return false;\n }\n }\n\n var unitHasDecimal = false;\n for (var i = 0; i < ordering.length; ++i) {\n if (m[ordering[i]]) {\n if (unitHasDecimal) {\n return false; // only allow non-integers for smallest unit\n }\n if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) {\n unitHasDecimal = true;\n }\n }\n }\n\n return true;\n }\n\n function isValid$1() {\n return this._isValid;\n }\n\n function createInvalid$1() {\n return createDuration(NaN);\n }\n\n function Duration (duration) {\n var normalizedInput = normalizeObjectUnits(duration),\n years = normalizedInput.year || 0,\n quarters = normalizedInput.quarter || 0,\n months = normalizedInput.month || 0,\n weeks = normalizedInput.week || normalizedInput.isoWeek || 0,\n days = normalizedInput.day || 0,\n hours = normalizedInput.hour || 0,\n minutes = normalizedInput.minute || 0,\n seconds = normalizedInput.second || 0,\n milliseconds = normalizedInput.millisecond || 0;\n\n this._isValid = isDurationValid(normalizedInput);\n\n // representation for dateAddRemove\n this._milliseconds = +milliseconds +\n seconds * 1e3 + // 1000\n minutes * 6e4 + // 1000 * 60\n hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978\n // Because of dateAddRemove treats 24 hours as different from a\n // day when working around DST, we need to store them separately\n this._days = +days +\n weeks * 7;\n // It is impossible to translate months into days without knowing\n // which months you are are talking about, so we have to store\n // it separately.\n this._months = +months +\n quarters * 3 +\n years * 12;\n\n this._data = {};\n\n this._locale = getLocale();\n\n this._bubble();\n }\n\n function isDuration (obj) {\n return obj instanceof Duration;\n }\n\n function absRound (number) {\n if (number < 0) {\n return Math.round(-1 * number) * -1;\n } else {\n return Math.round(number);\n }\n }\n\n // FORMATTING\n\n function offset (token, separator) {\n addFormatToken(token, 0, 0, function () {\n var offset = this.utcOffset();\n var sign = '+';\n if (offset < 0) {\n offset = -offset;\n sign = '-';\n }\n return sign + zeroFill(~~(offset / 60), 2) + separator + zeroFill(~~(offset) % 60, 2);\n });\n }\n\n offset('Z', ':');\n offset('ZZ', '');\n\n // PARSING\n\n addRegexToken('Z', matchShortOffset);\n addRegexToken('ZZ', matchShortOffset);\n addParseToken(['Z', 'ZZ'], function (input, array, config) {\n config._useUTC = true;\n config._tzm = offsetFromString(matchShortOffset, input);\n });\n\n // HELPERS\n\n // timezone chunker\n // '+10:00' > ['10', '00']\n // '-1530' > ['-15', '30']\n var chunkOffset = /([\\+\\-]|\\d\\d)/gi;\n\n function offsetFromString(matcher, string) {\n var matches = (string || '').match(matcher);\n\n if (matches === null) {\n return null;\n }\n\n var chunk = matches[matches.length - 1] || [];\n var parts = (chunk + '').match(chunkOffset) || ['-', 0, 0];\n var minutes = +(parts[1] * 60) + toInt(parts[2]);\n\n return minutes === 0 ?\n 0 :\n parts[0] === '+' ? minutes : -minutes;\n }\n\n // Return a moment from input, that is local/utc/zone equivalent to model.\n function cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? input.valueOf() : createLocal(input).valueOf()) - res.valueOf();\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(res._d.valueOf() + diff);\n hooks.updateOffset(res, false);\n return res;\n } else {\n return createLocal(input).local();\n }\n }\n\n function getDateOffset (m) {\n // On Firefox.24 Date#getTimezoneOffset returns a floating point.\n // https://github.com/moment/moment/pull/1871\n return -Math.round(m._d.getTimezoneOffset() / 15) * 15;\n }\n\n // HOOKS\n\n // This function will be called whenever a moment is mutated.\n // It is intended to keep the offset in sync with the timezone.\n hooks.updateOffset = function () {};\n\n // MOMENTS\n\n // keepLocalTime = true means only change the timezone, without\n // affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]-->\n // 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset\n // +0200, so we adjust the time as needed, to be valid.\n //\n // Keeping the time actually adds/subtracts (one hour)\n // from the actual represented time. That is why we call updateOffset\n // a second time. In case it wants us to change the offset again\n // _changeInProgress == true case, then we have to adjust, because\n // there is no such time in the given timezone.\n function getSetOffset (input, keepLocalTime, keepMinutes) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n if (input === null) {\n return this;\n }\n } else if (Math.abs(input) < 16 && !keepMinutes) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n addSubtract(this, createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }\n\n function getSetZone (input, keepLocalTime) {\n if (input != null) {\n if (typeof input !== 'string') {\n input = -input;\n }\n\n this.utcOffset(input, keepLocalTime);\n\n return this;\n } else {\n return -this.utcOffset();\n }\n }\n\n function setOffsetToUTC (keepLocalTime) {\n return this.utcOffset(0, keepLocalTime);\n }\n\n function setOffsetToLocal (keepLocalTime) {\n if (this._isUTC) {\n this.utcOffset(0, keepLocalTime);\n this._isUTC = false;\n\n if (keepLocalTime) {\n this.subtract(getDateOffset(this), 'm');\n }\n }\n return this;\n }\n\n function setOffsetToParsedOffset () {\n if (this._tzm != null) {\n this.utcOffset(this._tzm, false, true);\n } else if (typeof this._i === 'string') {\n var tZone = offsetFromString(matchOffset, this._i);\n if (tZone != null) {\n this.utcOffset(tZone);\n }\n else {\n this.utcOffset(0, true);\n }\n }\n return this;\n }\n\n function hasAlignedHourOffset (input) {\n if (!this.isValid()) {\n return false;\n }\n input = input ? createLocal(input).utcOffset() : 0;\n\n return (this.utcOffset() - input) % 60 === 0;\n }\n\n function isDaylightSavingTime () {\n return (\n this.utcOffset() > this.clone().month(0).utcOffset() ||\n this.utcOffset() > this.clone().month(5).utcOffset()\n );\n }\n\n function isDaylightSavingTimeShifted () {\n if (!isUndefined(this._isDSTShifted)) {\n return this._isDSTShifted;\n }\n\n var c = {};\n\n copyConfig(c, this);\n c = prepareConfig(c);\n\n if (c._a) {\n var other = c._isUTC ? createUTC(c._a) : createLocal(c._a);\n this._isDSTShifted = this.isValid() &&\n compareArrays(c._a, other.toArray()) > 0;\n } else {\n this._isDSTShifted = false;\n }\n\n return this._isDSTShifted;\n }\n\n function isLocal () {\n return this.isValid() ? !this._isUTC : false;\n }\n\n function isUtcOffset () {\n return this.isValid() ? this._isUTC : false;\n }\n\n function isUtc () {\n return this.isValid() ? this._isUTC && this._offset === 0 : false;\n }\n\n // ASP.NET json date format regex\n var aspNetRegex = /^(\\-|\\+)?(?:(\\d*)[. ])?(\\d+)\\:(\\d+)(?:\\:(\\d+)(\\.\\d*)?)?$/;\n\n // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html\n // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere\n // and further modified to allow for strings containing both week and day\n var isoRegex = /^(-|\\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;\n\n function createDuration (input, key) {\n var duration = input,\n // matching against regexp is expensive, do it on demand\n match = null,\n sign,\n ret,\n diffRes;\n\n if (isDuration(input)) {\n duration = {\n ms : input._milliseconds,\n d : input._days,\n M : input._months\n };\n } else if (isNumber(input)) {\n duration = {};\n if (key) {\n duration[key] = input;\n } else {\n duration.milliseconds = input;\n }\n } else if (!!(match = aspNetRegex.exec(input))) {\n sign = (match[1] === '-') ? -1 : 1;\n duration = {\n y : 0,\n d : toInt(match[DATE]) * sign,\n h : toInt(match[HOUR]) * sign,\n m : toInt(match[MINUTE]) * sign,\n s : toInt(match[SECOND]) * sign,\n ms : toInt(absRound(match[MILLISECOND] * 1000)) * sign // the millisecond decimal point is included in the match\n };\n } else if (!!(match = isoRegex.exec(input))) {\n sign = (match[1] === '-') ? -1 : 1;\n duration = {\n y : parseIso(match[2], sign),\n M : parseIso(match[3], sign),\n w : parseIso(match[4], sign),\n d : parseIso(match[5], sign),\n h : parseIso(match[6], sign),\n m : parseIso(match[7], sign),\n s : parseIso(match[8], sign)\n };\n } else if (duration == null) {// checks for null or undefined\n duration = {};\n } else if (typeof duration === 'object' && ('from' in duration || 'to' in duration)) {\n diffRes = momentsDifference(createLocal(duration.from), createLocal(duration.to));\n\n duration = {};\n duration.ms = diffRes.milliseconds;\n duration.M = diffRes.months;\n }\n\n ret = new Duration(duration);\n\n if (isDuration(input) && hasOwnProp(input, '_locale')) {\n ret._locale = input._locale;\n }\n\n return ret;\n }\n\n createDuration.fn = Duration.prototype;\n createDuration.invalid = createInvalid$1;\n\n function parseIso (inp, sign) {\n // We'd normally use ~~inp for this, but unfortunately it also\n // converts floats to ints.\n // inp may be undefined, so careful calling replace on it.\n var res = inp && parseFloat(inp.replace(',', '.'));\n // apply sign while we're at it\n return (isNaN(res) ? 0 : res) * sign;\n }\n\n function positiveMomentsDifference(base, other) {\n var res = {};\n\n res.months = other.month() - base.month() +\n (other.year() - base.year()) * 12;\n if (base.clone().add(res.months, 'M').isAfter(other)) {\n --res.months;\n }\n\n res.milliseconds = +other - +(base.clone().add(res.months, 'M'));\n\n return res;\n }\n\n function momentsDifference(base, other) {\n var res;\n if (!(base.isValid() && other.isValid())) {\n return {milliseconds: 0, months: 0};\n }\n\n other = cloneWithOffset(other, base);\n if (base.isBefore(other)) {\n res = positiveMomentsDifference(base, other);\n } else {\n res = positiveMomentsDifference(other, base);\n res.milliseconds = -res.milliseconds;\n res.months = -res.months;\n }\n\n return res;\n }\n\n // TODO: remove 'name' arg after deprecation is removed\n function createAdder(direction, name) {\n return function (val, period) {\n var dur, tmp;\n //invert the arguments, but complain about it\n if (period !== null && !isNaN(+period)) {\n deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' +\n 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.');\n tmp = val; val = period; period = tmp;\n }\n\n val = typeof val === 'string' ? +val : val;\n dur = createDuration(val, period);\n addSubtract(this, dur, direction);\n return this;\n };\n }\n\n function addSubtract (mom, duration, isAdding, updateOffset) {\n var milliseconds = duration._milliseconds,\n days = absRound(duration._days),\n months = absRound(duration._months);\n\n if (!mom.isValid()) {\n // No op\n return;\n }\n\n updateOffset = updateOffset == null ? true : updateOffset;\n\n if (months) {\n setMonth(mom, get(mom, 'Month') + months * isAdding);\n }\n if (days) {\n set$1(mom, 'Date', get(mom, 'Date') + days * isAdding);\n }\n if (milliseconds) {\n mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding);\n }\n if (updateOffset) {\n hooks.updateOffset(mom, days || months);\n }\n }\n\n var add = createAdder(1, 'add');\n var subtract = createAdder(-1, 'subtract');\n\n function getCalendarFormat(myMoment, now) {\n var diff = myMoment.diff(now, 'days', true);\n return diff < -6 ? 'sameElse' :\n diff < -1 ? 'lastWeek' :\n diff < 0 ? 'lastDay' :\n diff < 1 ? 'sameDay' :\n diff < 2 ? 'nextDay' :\n diff < 7 ? 'nextWeek' : 'sameElse';\n }\n\n function calendar$1 (time, formats) {\n // We want to compare the start of today, vs this.\n // Getting start-of-today depends on whether we're local/utc/offset or not.\n var now = time || createLocal(),\n sod = cloneWithOffset(now, this).startOf('day'),\n format = hooks.calendarFormat(this, sod) || 'sameElse';\n\n var output = formats && (isFunction(formats[format]) ? formats[format].call(this, now) : formats[format]);\n\n return this.format(output || this.localeData().calendar(format, this, createLocal(now)));\n }\n\n function clone () {\n return new Moment(this);\n }\n\n function isAfter (input, units) {\n var localInput = isMoment(input) ? input : createLocal(input);\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() > localInput.valueOf();\n } else {\n return localInput.valueOf() < this.clone().startOf(units).valueOf();\n }\n }\n\n function isBefore (input, units) {\n var localInput = isMoment(input) ? input : createLocal(input);\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() < localInput.valueOf();\n } else {\n return this.clone().endOf(units).valueOf() < localInput.valueOf();\n }\n }\n\n function isBetween (from, to, units, inclusivity) {\n var localFrom = isMoment(from) ? from : createLocal(from),\n localTo = isMoment(to) ? to : createLocal(to);\n if (!(this.isValid() && localFrom.isValid() && localTo.isValid())) {\n return false;\n }\n inclusivity = inclusivity || '()';\n return (inclusivity[0] === '(' ? this.isAfter(localFrom, units) : !this.isBefore(localFrom, units)) &&\n (inclusivity[1] === ')' ? this.isBefore(localTo, units) : !this.isAfter(localTo, units));\n }\n\n function isSame (input, units) {\n var localInput = isMoment(input) ? input : createLocal(input),\n inputMs;\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() === localInput.valueOf();\n } else {\n inputMs = localInput.valueOf();\n return this.clone().startOf(units).valueOf() <= inputMs && inputMs <= this.clone().endOf(units).valueOf();\n }\n }\n\n function isSameOrAfter (input, units) {\n return this.isSame(input, units) || this.isAfter(input, units);\n }\n\n function isSameOrBefore (input, units) {\n return this.isSame(input, units) || this.isBefore(input, units);\n }\n\n function diff (input, units, asFloat) {\n var that,\n zoneDelta,\n output;\n\n if (!this.isValid()) {\n return NaN;\n }\n\n that = cloneWithOffset(input, this);\n\n if (!that.isValid()) {\n return NaN;\n }\n\n zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4;\n\n units = normalizeUnits(units);\n\n switch (units) {\n case 'year': output = monthDiff(this, that) / 12; break;\n case 'month': output = monthDiff(this, that); break;\n case 'quarter': output = monthDiff(this, that) / 3; break;\n case 'second': output = (this - that) / 1e3; break; // 1000\n case 'minute': output = (this - that) / 6e4; break; // 1000 * 60\n case 'hour': output = (this - that) / 36e5; break; // 1000 * 60 * 60\n case 'day': output = (this - that - zoneDelta) / 864e5; break; // 1000 * 60 * 60 * 24, negate dst\n case 'week': output = (this - that - zoneDelta) / 6048e5; break; // 1000 * 60 * 60 * 24 * 7, negate dst\n default: output = this - that;\n }\n\n return asFloat ? output : absFloor(output);\n }\n\n function monthDiff (a, b) {\n // difference in months\n var wholeMonthDiff = ((b.year() - a.year()) * 12) + (b.month() - a.month()),\n // b is in (anchor - 1 month, anchor + 1 month)\n anchor = a.clone().add(wholeMonthDiff, 'months'),\n anchor2, adjust;\n\n if (b - anchor < 0) {\n anchor2 = a.clone().add(wholeMonthDiff - 1, 'months');\n // linear across the month\n adjust = (b - anchor) / (anchor - anchor2);\n } else {\n anchor2 = a.clone().add(wholeMonthDiff + 1, 'months');\n // linear across the month\n adjust = (b - anchor) / (anchor2 - anchor);\n }\n\n //check for negative zero, return zero if negative zero\n return -(wholeMonthDiff + adjust) || 0;\n }\n\n hooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ';\n hooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]';\n\n function toString () {\n return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ');\n }\n\n function toISOString(keepOffset) {\n if (!this.isValid()) {\n return null;\n }\n var utc = keepOffset !== true;\n var m = utc ? this.clone().utc() : this;\n if (m.year() < 0 || m.year() > 9999) {\n return formatMoment(m, utc ? 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYYYY-MM-DD[T]HH:mm:ss.SSSZ');\n }\n if (isFunction(Date.prototype.toISOString)) {\n // native implementation is ~50x faster, use it when we can\n if (utc) {\n return this.toDate().toISOString();\n } else {\n return new Date(this.valueOf() + this.utcOffset() * 60 * 1000).toISOString().replace('Z', formatMoment(m, 'Z'));\n }\n }\n return formatMoment(m, utc ? 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYY-MM-DD[T]HH:mm:ss.SSSZ');\n }\n\n /**\n * Return a human readable representation of a moment that can\n * also be evaluated to get a new moment which is the same\n *\n * @link https://nodejs.org/dist/latest/docs/api/util.html#util_custom_inspect_function_on_objects\n */\n function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n }\n\n function format (inputString) {\n if (!inputString) {\n inputString = this.isUtc() ? hooks.defaultFormatUtc : hooks.defaultFormat;\n }\n var output = formatMoment(this, inputString);\n return this.localeData().postformat(output);\n }\n\n function from (time, withoutSuffix) {\n if (this.isValid() &&\n ((isMoment(time) && time.isValid()) ||\n createLocal(time).isValid())) {\n return createDuration({to: this, from: time}).locale(this.locale()).humanize(!withoutSuffix);\n } else {\n return this.localeData().invalidDate();\n }\n }\n\n function fromNow (withoutSuffix) {\n return this.from(createLocal(), withoutSuffix);\n }\n\n function to (time, withoutSuffix) {\n if (this.isValid() &&\n ((isMoment(time) && time.isValid()) ||\n createLocal(time).isValid())) {\n return createDuration({from: this, to: time}).locale(this.locale()).humanize(!withoutSuffix);\n } else {\n return this.localeData().invalidDate();\n }\n }\n\n function toNow (withoutSuffix) {\n return this.to(createLocal(), withoutSuffix);\n }\n\n // If passed a locale key, it will set the locale for this\n // instance. Otherwise, it will return the locale configuration\n // variables for this instance.\n function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n }\n\n var lang = deprecate(\n 'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.',\n function (key) {\n if (key === undefined) {\n return this.localeData();\n } else {\n return this.locale(key);\n }\n }\n );\n\n function localeData () {\n return this._locale;\n }\n\n var MS_PER_SECOND = 1000;\n var MS_PER_MINUTE = 60 * MS_PER_SECOND;\n var MS_PER_HOUR = 60 * MS_PER_MINUTE;\n var MS_PER_400_YEARS = (365 * 400 + 97) * 24 * MS_PER_HOUR;\n\n // actual modulo - handles negative numbers (for dates before 1970):\n function mod$1(dividend, divisor) {\n return (dividend % divisor + divisor) % divisor;\n }\n\n function localStartOfDate(y, m, d) {\n // the date constructor remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n return new Date(y + 400, m, d) - MS_PER_400_YEARS;\n } else {\n return new Date(y, m, d).valueOf();\n }\n }\n\n function utcStartOfDate(y, m, d) {\n // Date.UTC remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n return Date.UTC(y + 400, m, d) - MS_PER_400_YEARS;\n } else {\n return Date.UTC(y, m, d);\n }\n }\n\n function startOf (units) {\n var time;\n units = normalizeUnits(units);\n if (units === undefined || units === 'millisecond' || !this.isValid()) {\n return this;\n }\n\n var startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;\n\n switch (units) {\n case 'year':\n time = startOfDate(this.year(), 0, 1);\n break;\n case 'quarter':\n time = startOfDate(this.year(), this.month() - this.month() % 3, 1);\n break;\n case 'month':\n time = startOfDate(this.year(), this.month(), 1);\n break;\n case 'week':\n time = startOfDate(this.year(), this.month(), this.date() - this.weekday());\n break;\n case 'isoWeek':\n time = startOfDate(this.year(), this.month(), this.date() - (this.isoWeekday() - 1));\n break;\n case 'day':\n case 'date':\n time = startOfDate(this.year(), this.month(), this.date());\n break;\n case 'hour':\n time = this._d.valueOf();\n time -= mod$1(time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE), MS_PER_HOUR);\n break;\n case 'minute':\n time = this._d.valueOf();\n time -= mod$1(time, MS_PER_MINUTE);\n break;\n case 'second':\n time = this._d.valueOf();\n time -= mod$1(time, MS_PER_SECOND);\n break;\n }\n\n this._d.setTime(time);\n hooks.updateOffset(this, true);\n return this;\n }\n\n function endOf (units) {\n var time;\n units = normalizeUnits(units);\n if (units === undefined || units === 'millisecond' || !this.isValid()) {\n return this;\n }\n\n var startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;\n\n switch (units) {\n case 'year':\n time = startOfDate(this.year() + 1, 0, 1) - 1;\n break;\n case 'quarter':\n time = startOfDate(this.year(), this.month() - this.month() % 3 + 3, 1) - 1;\n break;\n case 'month':\n time = startOfDate(this.year(), this.month() + 1, 1) - 1;\n break;\n case 'week':\n time = startOfDate(this.year(), this.month(), this.date() - this.weekday() + 7) - 1;\n break;\n case 'isoWeek':\n time = startOfDate(this.year(), this.month(), this.date() - (this.isoWeekday() - 1) + 7) - 1;\n break;\n case 'day':\n case 'date':\n time = startOfDate(this.year(), this.month(), this.date() + 1) - 1;\n break;\n case 'hour':\n time = this._d.valueOf();\n time += MS_PER_HOUR - mod$1(time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE), MS_PER_HOUR) - 1;\n break;\n case 'minute':\n time = this._d.valueOf();\n time += MS_PER_MINUTE - mod$1(time, MS_PER_MINUTE) - 1;\n break;\n case 'second':\n time = this._d.valueOf();\n time += MS_PER_SECOND - mod$1(time, MS_PER_SECOND) - 1;\n break;\n }\n\n this._d.setTime(time);\n hooks.updateOffset(this, true);\n return this;\n }\n\n function valueOf () {\n return this._d.valueOf() - ((this._offset || 0) * 60000);\n }\n\n function unix () {\n return Math.floor(this.valueOf() / 1000);\n }\n\n function toDate () {\n return new Date(this.valueOf());\n }\n\n function toArray () {\n var m = this;\n return [m.year(), m.month(), m.date(), m.hour(), m.minute(), m.second(), m.millisecond()];\n }\n\n function toObject () {\n var m = this;\n return {\n years: m.year(),\n months: m.month(),\n date: m.date(),\n hours: m.hours(),\n minutes: m.minutes(),\n seconds: m.seconds(),\n milliseconds: m.milliseconds()\n };\n }\n\n function toJSON () {\n // new Date(NaN).toJSON() === null\n return this.isValid() ? this.toISOString() : null;\n }\n\n function isValid$2 () {\n return isValid(this);\n }\n\n function parsingFlags () {\n return extend({}, getParsingFlags(this));\n }\n\n function invalidAt () {\n return getParsingFlags(this).overflow;\n }\n\n function creationData() {\n return {\n input: this._i,\n format: this._f,\n locale: this._locale,\n isUTC: this._isUTC,\n strict: this._strict\n };\n }\n\n // FORMATTING\n\n addFormatToken(0, ['gg', 2], 0, function () {\n return this.weekYear() % 100;\n });\n\n addFormatToken(0, ['GG', 2], 0, function () {\n return this.isoWeekYear() % 100;\n });\n\n function addWeekYearFormatToken (token, getter) {\n addFormatToken(0, [token, token.length], 0, getter);\n }\n\n addWeekYearFormatToken('gggg', 'weekYear');\n addWeekYearFormatToken('ggggg', 'weekYear');\n addWeekYearFormatToken('GGGG', 'isoWeekYear');\n addWeekYearFormatToken('GGGGG', 'isoWeekYear');\n\n // ALIASES\n\n addUnitAlias('weekYear', 'gg');\n addUnitAlias('isoWeekYear', 'GG');\n\n // PRIORITY\n\n addUnitPriority('weekYear', 1);\n addUnitPriority('isoWeekYear', 1);\n\n\n // PARSING\n\n addRegexToken('G', matchSigned);\n addRegexToken('g', matchSigned);\n addRegexToken('GG', match1to2, match2);\n addRegexToken('gg', match1to2, match2);\n addRegexToken('GGGG', match1to4, match4);\n addRegexToken('gggg', match1to4, match4);\n addRegexToken('GGGGG', match1to6, match6);\n addRegexToken('ggggg', match1to6, match6);\n\n addWeekParseToken(['gggg', 'ggggg', 'GGGG', 'GGGGG'], function (input, week, config, token) {\n week[token.substr(0, 2)] = toInt(input);\n });\n\n addWeekParseToken(['gg', 'GG'], function (input, week, config, token) {\n week[token] = hooks.parseTwoDigitYear(input);\n });\n\n // MOMENTS\n\n function getSetWeekYear (input) {\n return getSetWeekYearHelper.call(this,\n input,\n this.week(),\n this.weekday(),\n this.localeData()._week.dow,\n this.localeData()._week.doy);\n }\n\n function getSetISOWeekYear (input) {\n return getSetWeekYearHelper.call(this,\n input, this.isoWeek(), this.isoWeekday(), 1, 4);\n }\n\n function getISOWeeksInYear () {\n return weeksInYear(this.year(), 1, 4);\n }\n\n function getWeeksInYear () {\n var weekInfo = this.localeData()._week;\n return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy);\n }\n\n function getSetWeekYearHelper(input, week, weekday, dow, doy) {\n var weeksTarget;\n if (input == null) {\n return weekOfYear(this, dow, doy).year;\n } else {\n weeksTarget = weeksInYear(input, dow, doy);\n if (week > weeksTarget) {\n week = weeksTarget;\n }\n return setWeekAll.call(this, input, week, weekday, dow, doy);\n }\n }\n\n function setWeekAll(weekYear, week, weekday, dow, doy) {\n var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy),\n date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear);\n\n this.year(date.getUTCFullYear());\n this.month(date.getUTCMonth());\n this.date(date.getUTCDate());\n return this;\n }\n\n // FORMATTING\n\n addFormatToken('Q', 0, 'Qo', 'quarter');\n\n // ALIASES\n\n addUnitAlias('quarter', 'Q');\n\n // PRIORITY\n\n addUnitPriority('quarter', 7);\n\n // PARSING\n\n addRegexToken('Q', match1);\n addParseToken('Q', function (input, array) {\n array[MONTH] = (toInt(input) - 1) * 3;\n });\n\n // MOMENTS\n\n function getSetQuarter (input) {\n return input == null ? Math.ceil((this.month() + 1) / 3) : this.month((input - 1) * 3 + this.month() % 3);\n }\n\n // FORMATTING\n\n addFormatToken('D', ['DD', 2], 'Do', 'date');\n\n // ALIASES\n\n addUnitAlias('date', 'D');\n\n // PRIORITY\n addUnitPriority('date', 9);\n\n // PARSING\n\n addRegexToken('D', match1to2);\n addRegexToken('DD', match1to2, match2);\n addRegexToken('Do', function (isStrict, locale) {\n // TODO: Remove \"ordinalParse\" fallback in next major release.\n return isStrict ?\n (locale._dayOfMonthOrdinalParse || locale._ordinalParse) :\n locale._dayOfMonthOrdinalParseLenient;\n });\n\n addParseToken(['D', 'DD'], DATE);\n addParseToken('Do', function (input, array) {\n array[DATE] = toInt(input.match(match1to2)[0]);\n });\n\n // MOMENTS\n\n var getSetDayOfMonth = makeGetSet('Date', true);\n\n // FORMATTING\n\n addFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear');\n\n // ALIASES\n\n addUnitAlias('dayOfYear', 'DDD');\n\n // PRIORITY\n addUnitPriority('dayOfYear', 4);\n\n // PARSING\n\n addRegexToken('DDD', match1to3);\n addRegexToken('DDDD', match3);\n addParseToken(['DDD', 'DDDD'], function (input, array, config) {\n config._dayOfYear = toInt(input);\n });\n\n // HELPERS\n\n // MOMENTS\n\n function getSetDayOfYear (input) {\n var dayOfYear = Math.round((this.clone().startOf('day') - this.clone().startOf('year')) / 864e5) + 1;\n return input == null ? dayOfYear : this.add((input - dayOfYear), 'd');\n }\n\n // FORMATTING\n\n addFormatToken('m', ['mm', 2], 0, 'minute');\n\n // ALIASES\n\n addUnitAlias('minute', 'm');\n\n // PRIORITY\n\n addUnitPriority('minute', 14);\n\n // PARSING\n\n addRegexToken('m', match1to2);\n addRegexToken('mm', match1to2, match2);\n addParseToken(['m', 'mm'], MINUTE);\n\n // MOMENTS\n\n var getSetMinute = makeGetSet('Minutes', false);\n\n // FORMATTING\n\n addFormatToken('s', ['ss', 2], 0, 'second');\n\n // ALIASES\n\n addUnitAlias('second', 's');\n\n // PRIORITY\n\n addUnitPriority('second', 15);\n\n // PARSING\n\n addRegexToken('s', match1to2);\n addRegexToken('ss', match1to2, match2);\n addParseToken(['s', 'ss'], SECOND);\n\n // MOMENTS\n\n var getSetSecond = makeGetSet('Seconds', false);\n\n // FORMATTING\n\n addFormatToken('S', 0, 0, function () {\n return ~~(this.millisecond() / 100);\n });\n\n addFormatToken(0, ['SS', 2], 0, function () {\n return ~~(this.millisecond() / 10);\n });\n\n addFormatToken(0, ['SSS', 3], 0, 'millisecond');\n addFormatToken(0, ['SSSS', 4], 0, function () {\n return this.millisecond() * 10;\n });\n addFormatToken(0, ['SSSSS', 5], 0, function () {\n return this.millisecond() * 100;\n });\n addFormatToken(0, ['SSSSSS', 6], 0, function () {\n return this.millisecond() * 1000;\n });\n addFormatToken(0, ['SSSSSSS', 7], 0, function () {\n return this.millisecond() * 10000;\n });\n addFormatToken(0, ['SSSSSSSS', 8], 0, function () {\n return this.millisecond() * 100000;\n });\n addFormatToken(0, ['SSSSSSSSS', 9], 0, function () {\n return this.millisecond() * 1000000;\n });\n\n\n // ALIASES\n\n addUnitAlias('millisecond', 'ms');\n\n // PRIORITY\n\n addUnitPriority('millisecond', 16);\n\n // PARSING\n\n addRegexToken('S', match1to3, match1);\n addRegexToken('SS', match1to3, match2);\n addRegexToken('SSS', match1to3, match3);\n\n var token;\n for (token = 'SSSS'; token.length <= 9; token += 'S') {\n addRegexToken(token, matchUnsigned);\n }\n\n function parseMs(input, array) {\n array[MILLISECOND] = toInt(('0.' + input) * 1000);\n }\n\n for (token = 'S'; token.length <= 9; token += 'S') {\n addParseToken(token, parseMs);\n }\n // MOMENTS\n\n var getSetMillisecond = makeGetSet('Milliseconds', false);\n\n // FORMATTING\n\n addFormatToken('z', 0, 0, 'zoneAbbr');\n addFormatToken('zz', 0, 0, 'zoneName');\n\n // MOMENTS\n\n function getZoneAbbr () {\n return this._isUTC ? 'UTC' : '';\n }\n\n function getZoneName () {\n return this._isUTC ? 'Coordinated Universal Time' : '';\n }\n\n var proto = Moment.prototype;\n\n proto.add = add;\n proto.calendar = calendar$1;\n proto.clone = clone;\n proto.diff = diff;\n proto.endOf = endOf;\n proto.format = format;\n proto.from = from;\n proto.fromNow = fromNow;\n proto.to = to;\n proto.toNow = toNow;\n proto.get = stringGet;\n proto.invalidAt = invalidAt;\n proto.isAfter = isAfter;\n proto.isBefore = isBefore;\n proto.isBetween = isBetween;\n proto.isSame = isSame;\n proto.isSameOrAfter = isSameOrAfter;\n proto.isSameOrBefore = isSameOrBefore;\n proto.isValid = isValid$2;\n proto.lang = lang;\n proto.locale = locale;\n proto.localeData = localeData;\n proto.max = prototypeMax;\n proto.min = prototypeMin;\n proto.parsingFlags = parsingFlags;\n proto.set = stringSet;\n proto.startOf = startOf;\n proto.subtract = subtract;\n proto.toArray = toArray;\n proto.toObject = toObject;\n proto.toDate = toDate;\n proto.toISOString = toISOString;\n proto.inspect = inspect;\n proto.toJSON = toJSON;\n proto.toString = toString;\n proto.unix = unix;\n proto.valueOf = valueOf;\n proto.creationData = creationData;\n proto.year = getSetYear;\n proto.isLeapYear = getIsLeapYear;\n proto.weekYear = getSetWeekYear;\n proto.isoWeekYear = getSetISOWeekYear;\n proto.quarter = proto.quarters = getSetQuarter;\n proto.month = getSetMonth;\n proto.daysInMonth = getDaysInMonth;\n proto.week = proto.weeks = getSetWeek;\n proto.isoWeek = proto.isoWeeks = getSetISOWeek;\n proto.weeksInYear = getWeeksInYear;\n proto.isoWeeksInYear = getISOWeeksInYear;\n proto.date = getSetDayOfMonth;\n proto.day = proto.days = getSetDayOfWeek;\n proto.weekday = getSetLocaleDayOfWeek;\n proto.isoWeekday = getSetISODayOfWeek;\n proto.dayOfYear = getSetDayOfYear;\n proto.hour = proto.hours = getSetHour;\n proto.minute = proto.minutes = getSetMinute;\n proto.second = proto.seconds = getSetSecond;\n proto.millisecond = proto.milliseconds = getSetMillisecond;\n proto.utcOffset = getSetOffset;\n proto.utc = setOffsetToUTC;\n proto.local = setOffsetToLocal;\n proto.parseZone = setOffsetToParsedOffset;\n proto.hasAlignedHourOffset = hasAlignedHourOffset;\n proto.isDST = isDaylightSavingTime;\n proto.isLocal = isLocal;\n proto.isUtcOffset = isUtcOffset;\n proto.isUtc = isUtc;\n proto.isUTC = isUtc;\n proto.zoneAbbr = getZoneAbbr;\n proto.zoneName = getZoneName;\n proto.dates = deprecate('dates accessor is deprecated. Use date instead.', getSetDayOfMonth);\n proto.months = deprecate('months accessor is deprecated. Use month instead', getSetMonth);\n proto.years = deprecate('years accessor is deprecated. Use year instead', getSetYear);\n proto.zone = deprecate('moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/', getSetZone);\n proto.isDSTShifted = deprecate('isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information', isDaylightSavingTimeShifted);\n\n function createUnix (input) {\n return createLocal(input * 1000);\n }\n\n function createInZone () {\n return createLocal.apply(null, arguments).parseZone();\n }\n\n function preParsePostFormat (string) {\n return string;\n }\n\n var proto$1 = Locale.prototype;\n\n proto$1.calendar = calendar;\n proto$1.longDateFormat = longDateFormat;\n proto$1.invalidDate = invalidDate;\n proto$1.ordinal = ordinal;\n proto$1.preparse = preParsePostFormat;\n proto$1.postformat = preParsePostFormat;\n proto$1.relativeTime = relativeTime;\n proto$1.pastFuture = pastFuture;\n proto$1.set = set;\n\n proto$1.months = localeMonths;\n proto$1.monthsShort = localeMonthsShort;\n proto$1.monthsParse = localeMonthsParse;\n proto$1.monthsRegex = monthsRegex;\n proto$1.monthsShortRegex = monthsShortRegex;\n proto$1.week = localeWeek;\n proto$1.firstDayOfYear = localeFirstDayOfYear;\n proto$1.firstDayOfWeek = localeFirstDayOfWeek;\n\n proto$1.weekdays = localeWeekdays;\n proto$1.weekdaysMin = localeWeekdaysMin;\n proto$1.weekdaysShort = localeWeekdaysShort;\n proto$1.weekdaysParse = localeWeekdaysParse;\n\n proto$1.weekdaysRegex = weekdaysRegex;\n proto$1.weekdaysShortRegex = weekdaysShortRegex;\n proto$1.weekdaysMinRegex = weekdaysMinRegex;\n\n proto$1.isPM = localeIsPM;\n proto$1.meridiem = localeMeridiem;\n\n function get$1 (format, index, field, setter) {\n var locale = getLocale();\n var utc = createUTC().set(setter, index);\n return locale[field](utc, format);\n }\n\n function listMonthsImpl (format, index, field) {\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n\n if (index != null) {\n return get$1(format, index, field, 'month');\n }\n\n var i;\n var out = [];\n for (i = 0; i < 12; i++) {\n out[i] = get$1(format, i, field, 'month');\n }\n return out;\n }\n\n // ()\n // (5)\n // (fmt, 5)\n // (fmt)\n // (true)\n // (true, 5)\n // (true, fmt, 5)\n // (true, fmt)\n function listWeekdaysImpl (localeSorted, format, index, field) {\n if (typeof localeSorted === 'boolean') {\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n } else {\n format = localeSorted;\n index = format;\n localeSorted = false;\n\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n }\n\n var locale = getLocale(),\n shift = localeSorted ? locale._week.dow : 0;\n\n if (index != null) {\n return get$1(format, (index + shift) % 7, field, 'day');\n }\n\n var i;\n var out = [];\n for (i = 0; i < 7; i++) {\n out[i] = get$1(format, (i + shift) % 7, field, 'day');\n }\n return out;\n }\n\n function listMonths (format, index) {\n return listMonthsImpl(format, index, 'months');\n }\n\n function listMonthsShort (format, index) {\n return listMonthsImpl(format, index, 'monthsShort');\n }\n\n function listWeekdays (localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdays');\n }\n\n function listWeekdaysShort (localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort');\n }\n\n function listWeekdaysMin (localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin');\n }\n\n getSetGlobalLocale('en', {\n dayOfMonthOrdinalParse: /\\d{1,2}(th|st|nd|rd)/,\n ordinal : function (number) {\n var b = number % 10,\n output = (toInt(number % 100 / 10) === 1) ? 'th' :\n (b === 1) ? 'st' :\n (b === 2) ? 'nd' :\n (b === 3) ? 'rd' : 'th';\n return number + output;\n }\n });\n\n // Side effect imports\n\n hooks.lang = deprecate('moment.lang is deprecated. Use moment.locale instead.', getSetGlobalLocale);\n hooks.langData = deprecate('moment.langData is deprecated. Use moment.localeData instead.', getLocale);\n\n var mathAbs = Math.abs;\n\n function abs () {\n var data = this._data;\n\n this._milliseconds = mathAbs(this._milliseconds);\n this._days = mathAbs(this._days);\n this._months = mathAbs(this._months);\n\n data.milliseconds = mathAbs(data.milliseconds);\n data.seconds = mathAbs(data.seconds);\n data.minutes = mathAbs(data.minutes);\n data.hours = mathAbs(data.hours);\n data.months = mathAbs(data.months);\n data.years = mathAbs(data.years);\n\n return this;\n }\n\n function addSubtract$1 (duration, input, value, direction) {\n var other = createDuration(input, value);\n\n duration._milliseconds += direction * other._milliseconds;\n duration._days += direction * other._days;\n duration._months += direction * other._months;\n\n return duration._bubble();\n }\n\n // supports only 2.0-style add(1, 's') or add(duration)\n function add$1 (input, value) {\n return addSubtract$1(this, input, value, 1);\n }\n\n // supports only 2.0-style subtract(1, 's') or subtract(duration)\n function subtract$1 (input, value) {\n return addSubtract$1(this, input, value, -1);\n }\n\n function absCeil (number) {\n if (number < 0) {\n return Math.floor(number);\n } else {\n return Math.ceil(number);\n }\n }\n\n function bubble () {\n var milliseconds = this._milliseconds;\n var days = this._days;\n var months = this._months;\n var data = this._data;\n var seconds, minutes, hours, years, monthsFromDays;\n\n // if we have a mix of positive and negative values, bubble down first\n // check: https://github.com/moment/moment/issues/2166\n if (!((milliseconds >= 0 && days >= 0 && months >= 0) ||\n (milliseconds <= 0 && days <= 0 && months <= 0))) {\n milliseconds += absCeil(monthsToDays(months) + days) * 864e5;\n days = 0;\n months = 0;\n }\n\n // The following code bubbles up values, see the tests for\n // examples of what that means.\n data.milliseconds = milliseconds % 1000;\n\n seconds = absFloor(milliseconds / 1000);\n data.seconds = seconds % 60;\n\n minutes = absFloor(seconds / 60);\n data.minutes = minutes % 60;\n\n hours = absFloor(minutes / 60);\n data.hours = hours % 24;\n\n days += absFloor(hours / 24);\n\n // convert days to months\n monthsFromDays = absFloor(daysToMonths(days));\n months += monthsFromDays;\n days -= absCeil(monthsToDays(monthsFromDays));\n\n // 12 months -> 1 year\n years = absFloor(months / 12);\n months %= 12;\n\n data.days = days;\n data.months = months;\n data.years = years;\n\n return this;\n }\n\n function daysToMonths (days) {\n // 400 years have 146097 days (taking into account leap year rules)\n // 400 years have 12 months === 4800\n return days * 4800 / 146097;\n }\n\n function monthsToDays (months) {\n // the reverse of daysToMonths\n return months * 146097 / 4800;\n }\n\n function as (units) {\n if (!this.isValid()) {\n return NaN;\n }\n var days;\n var months;\n var milliseconds = this._milliseconds;\n\n units = normalizeUnits(units);\n\n if (units === 'month' || units === 'quarter' || units === 'year') {\n days = this._days + milliseconds / 864e5;\n months = this._months + daysToMonths(days);\n switch (units) {\n case 'month': return months;\n case 'quarter': return months / 3;\n case 'year': return months / 12;\n }\n } else {\n // handle milliseconds separately because of floating point math errors (issue #1867)\n days = this._days + Math.round(monthsToDays(this._months));\n switch (units) {\n case 'week' : return days / 7 + milliseconds / 6048e5;\n case 'day' : return days + milliseconds / 864e5;\n case 'hour' : return days * 24 + milliseconds / 36e5;\n case 'minute' : return days * 1440 + milliseconds / 6e4;\n case 'second' : return days * 86400 + milliseconds / 1000;\n // Math.floor prevents floating point math errors here\n case 'millisecond': return Math.floor(days * 864e5) + milliseconds;\n default: throw new Error('Unknown unit ' + units);\n }\n }\n }\n\n // TODO: Use this.as('ms')?\n function valueOf$1 () {\n if (!this.isValid()) {\n return NaN;\n }\n return (\n this._milliseconds +\n this._days * 864e5 +\n (this._months % 12) * 2592e6 +\n toInt(this._months / 12) * 31536e6\n );\n }\n\n function makeAs (alias) {\n return function () {\n return this.as(alias);\n };\n }\n\n var asMilliseconds = makeAs('ms');\n var asSeconds = makeAs('s');\n var asMinutes = makeAs('m');\n var asHours = makeAs('h');\n var asDays = makeAs('d');\n var asWeeks = makeAs('w');\n var asMonths = makeAs('M');\n var asQuarters = makeAs('Q');\n var asYears = makeAs('y');\n\n function clone$1 () {\n return createDuration(this);\n }\n\n function get$2 (units) {\n units = normalizeUnits(units);\n return this.isValid() ? this[units + 's']() : NaN;\n }\n\n function makeGetter(name) {\n return function () {\n return this.isValid() ? this._data[name] : NaN;\n };\n }\n\n var milliseconds = makeGetter('milliseconds');\n var seconds = makeGetter('seconds');\n var minutes = makeGetter('minutes');\n var hours = makeGetter('hours');\n var days = makeGetter('days');\n var months = makeGetter('months');\n var years = makeGetter('years');\n\n function weeks () {\n return absFloor(this.days() / 7);\n }\n\n var round = Math.round;\n var thresholds = {\n ss: 44, // a few seconds to seconds\n s : 45, // seconds to minute\n m : 45, // minutes to hour\n h : 22, // hours to day\n d : 26, // days to month\n M : 11 // months to year\n };\n\n // helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize\n function substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) {\n return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture);\n }\n\n function relativeTime$1 (posNegDuration, withoutSuffix, locale) {\n var duration = createDuration(posNegDuration).abs();\n var seconds = round(duration.as('s'));\n var minutes = round(duration.as('m'));\n var hours = round(duration.as('h'));\n var days = round(duration.as('d'));\n var months = round(duration.as('M'));\n var years = round(duration.as('y'));\n\n var a = seconds <= thresholds.ss && ['s', seconds] ||\n seconds < thresholds.s && ['ss', seconds] ||\n minutes <= 1 && ['m'] ||\n minutes < thresholds.m && ['mm', minutes] ||\n hours <= 1 && ['h'] ||\n hours < thresholds.h && ['hh', hours] ||\n days <= 1 && ['d'] ||\n days < thresholds.d && ['dd', days] ||\n months <= 1 && ['M'] ||\n months < thresholds.M && ['MM', months] ||\n years <= 1 && ['y'] || ['yy', years];\n\n a[2] = withoutSuffix;\n a[3] = +posNegDuration > 0;\n a[4] = locale;\n return substituteTimeAgo.apply(null, a);\n }\n\n // This function allows you to set the rounding function for relative time strings\n function getSetRelativeTimeRounding (roundingFunction) {\n if (roundingFunction === undefined) {\n return round;\n }\n if (typeof(roundingFunction) === 'function') {\n round = roundingFunction;\n return true;\n }\n return false;\n }\n\n // This function allows you to set a threshold for relative time strings\n function getSetRelativeTimeThreshold (threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n return true;\n }\n\n function humanize (withSuffix) {\n if (!this.isValid()) {\n return this.localeData().invalidDate();\n }\n\n var locale = this.localeData();\n var output = relativeTime$1(this, !withSuffix, locale);\n\n if (withSuffix) {\n output = locale.pastFuture(+this, output);\n }\n\n return locale.postformat(output);\n }\n\n var abs$1 = Math.abs;\n\n function sign(x) {\n return ((x > 0) - (x < 0)) || +x;\n }\n\n function toISOString$1() {\n // for ISO strings we do not use the normal bubbling rules:\n // * milliseconds bubble up until they become hours\n // * days do not bubble at all\n // * months bubble up until they become years\n // This is because there is no context-free conversion between hours and days\n // (think of clock changes)\n // and also not between days and months (28-31 days per month)\n if (!this.isValid()) {\n return this.localeData().invalidDate();\n }\n\n var seconds = abs$1(this._milliseconds) / 1000;\n var days = abs$1(this._days);\n var months = abs$1(this._months);\n var minutes, hours, years;\n\n // 3600 seconds -> 60 minutes -> 1 hour\n minutes = absFloor(seconds / 60);\n hours = absFloor(minutes / 60);\n seconds %= 60;\n minutes %= 60;\n\n // 12 months -> 1 year\n years = absFloor(months / 12);\n months %= 12;\n\n\n // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js\n var Y = years;\n var M = months;\n var D = days;\n var h = hours;\n var m = minutes;\n var s = seconds ? seconds.toFixed(3).replace(/\\.?0+$/, '') : '';\n var total = this.asSeconds();\n\n if (!total) {\n // this is the same as C#'s (Noda) and python (isodate)...\n // but not other JS (goog.date)\n return 'P0D';\n }\n\n var totalSign = total < 0 ? '-' : '';\n var ymSign = sign(this._months) !== sign(total) ? '-' : '';\n var daysSign = sign(this._days) !== sign(total) ? '-' : '';\n var hmsSign = sign(this._milliseconds) !== sign(total) ? '-' : '';\n\n return totalSign + 'P' +\n (Y ? ymSign + Y + 'Y' : '') +\n (M ? ymSign + M + 'M' : '') +\n (D ? daysSign + D + 'D' : '') +\n ((h || m || s) ? 'T' : '') +\n (h ? hmsSign + h + 'H' : '') +\n (m ? hmsSign + m + 'M' : '') +\n (s ? hmsSign + s + 'S' : '');\n }\n\n var proto$2 = Duration.prototype;\n\n proto$2.isValid = isValid$1;\n proto$2.abs = abs;\n proto$2.add = add$1;\n proto$2.subtract = subtract$1;\n proto$2.as = as;\n proto$2.asMilliseconds = asMilliseconds;\n proto$2.asSeconds = asSeconds;\n proto$2.asMinutes = asMinutes;\n proto$2.asHours = asHours;\n proto$2.asDays = asDays;\n proto$2.asWeeks = asWeeks;\n proto$2.asMonths = asMonths;\n proto$2.asQuarters = asQuarters;\n proto$2.asYears = asYears;\n proto$2.valueOf = valueOf$1;\n proto$2._bubble = bubble;\n proto$2.clone = clone$1;\n proto$2.get = get$2;\n proto$2.milliseconds = milliseconds;\n proto$2.seconds = seconds;\n proto$2.minutes = minutes;\n proto$2.hours = hours;\n proto$2.days = days;\n proto$2.weeks = weeks;\n proto$2.months = months;\n proto$2.years = years;\n proto$2.humanize = humanize;\n proto$2.toISOString = toISOString$1;\n proto$2.toString = toISOString$1;\n proto$2.toJSON = toISOString$1;\n proto$2.locale = locale;\n proto$2.localeData = localeData;\n\n proto$2.toIsoString = deprecate('toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)', toISOString$1);\n proto$2.lang = lang;\n\n // Side effect imports\n\n // FORMATTING\n\n addFormatToken('X', 0, 0, 'unix');\n addFormatToken('x', 0, 0, 'valueOf');\n\n // PARSING\n\n addRegexToken('x', matchSigned);\n addRegexToken('X', matchTimestamp);\n addParseToken('X', function (input, array, config) {\n config._d = new Date(parseFloat(input, 10) * 1000);\n });\n addParseToken('x', function (input, array, config) {\n config._d = new Date(toInt(input));\n });\n\n // Side effect imports\n\n\n hooks.version = '2.24.0';\n\n setHookCallback(createLocal);\n\n hooks.fn = proto;\n hooks.min = min;\n hooks.max = max;\n hooks.now = now;\n hooks.utc = createUTC;\n hooks.unix = createUnix;\n hooks.months = listMonths;\n hooks.isDate = isDate;\n hooks.locale = getSetGlobalLocale;\n hooks.invalid = createInvalid;\n hooks.duration = createDuration;\n hooks.isMoment = isMoment;\n hooks.weekdays = listWeekdays;\n hooks.parseZone = createInZone;\n hooks.localeData = getLocale;\n hooks.isDuration = isDuration;\n hooks.monthsShort = listMonthsShort;\n hooks.weekdaysMin = listWeekdaysMin;\n hooks.defineLocale = defineLocale;\n hooks.updateLocale = updateLocale;\n hooks.locales = listLocales;\n hooks.weekdaysShort = listWeekdaysShort;\n hooks.normalizeUnits = normalizeUnits;\n hooks.relativeTimeRounding = getSetRelativeTimeRounding;\n hooks.relativeTimeThreshold = getSetRelativeTimeThreshold;\n hooks.calendarFormat = getCalendarFormat;\n hooks.prototype = proto;\n\n // currently HTML5 input type only supports 24-hour formats\n hooks.HTML5_FMT = {\n DATETIME_LOCAL: 'YYYY-MM-DDTHH:mm', // \n DATETIME_LOCAL_SECONDS: 'YYYY-MM-DDTHH:mm:ss', // \n DATETIME_LOCAL_MS: 'YYYY-MM-DDTHH:mm:ss.SSS', // \n DATE: 'YYYY-MM-DD', // \n TIME: 'HH:mm', // \n TIME_SECONDS: 'HH:mm:ss', // \n TIME_MS: 'HH:mm:ss.SSS', // \n WEEK: 'GGGG-[W]WW', // \n MONTH: 'YYYY-MM' // \n };\n\n return hooks;\n\n})));\n","// first check if moment.js is already loaded in the browser window, if so,\n// use this instance. Else, load via commonjs.\nmodule.exports = (typeof window !== 'undefined') && window['moment'] || require('moment');\n","// vis-util\nimport * as util from 'vis-util'\nexport { util }\n\n// vis-data\nimport * as data from 'vis-data'\nexport { data }\nexport { DataSet, DataView, Queue } from 'vis-data'\n\n// Network.\nexport * from './network/Network'\n\nimport Images from './network/Images'\nimport * as dotparser from './network/dotparser'\nimport * as gephiParser from './network/gephiParser'\nimport { parseGephi } from './network/gephiParser'\nimport * as allOptions from './network/options'\nexport const network = {\n Images,\n dotparser,\n gephiParser,\n allOptions,\n convertDot: dotparser.DOTToGraph,\n convertGephi: parseGephi,\n}\n\n// utils\nimport * as DOMutil from './DOMutil'\nexport { DOMutil }\n\n// bundled external libraries\nimport * as moment from './module/moment'\nexport { moment }\nimport * as Hammer from './module/hammer'\nexport { Hammer }\nimport * as keycharm from 'keycharm'\nexport { keycharm }\n"],"names":["commonjsGlobal","globalThis","window","global","self","commonjsRequire","Error","createCommonjsModule","fn","module","exports","_global","Math","Function","__g","_core","core","version","__e","_core_1","_library","_shared","store","key","value","push","mode","copyright","id","px","random","_uid","concat","toString","_wks","Symbol","USE_SYMBOL","$exports","name","f","_wksExt","_isObject","it","_anObject","TypeError","_fails","exec","e","_descriptors","Object","defineProperty","get","a","document$1","document","is","createElement","_domCreate","_ie8DomDefine","_toPrimitive","S","val","call","valueOf","dP","f$1","O","P","Attributes","_objectDp","_wksDefine","$Symbol","charAt","hasOwnProperty","_has","_propertyDesc","bitmap","enumerable","configurable","writable","_hide","object","_functionToString","_redefine","SRC","TO_STRING","TPL","split","inspectSource","safe","isFunction","join","prototype","_aFunction","_ctx","that","length","b","c","apply","arguments","PROTOTYPE","$export","type","source","IS_FORCED","F","IS_GLOBAL","G","IS_STATIC","IS_PROTO","IS_BIND","B","target","expProto","own","out","exp","U","W","R","_export","_meta","META","setDesc","isExtensible","FREEZE","preventExtensions","setMeta","i","w","meta","KEY","NEED","fastKey","create","getWeak","onFreeze","_meta_1","_meta_2","_meta_3","_meta_4","_meta_5","def","TAG","_setToStringTag","tag","stat","_cof","slice","_iobject","propertyIsEnumerable","_defined","_toIobject","ceil","floor","_toInteger","isNaN","min","_toLength","max","min$1","_toAbsoluteIndex","index","_arrayIncludes","IS_INCLUDES","$this","el","fromIndex","shared","_sharedKey","arrayIndexOf","IE_PROTO","_objectKeysInternal","names","result","_enumBugKeys","_objectKeys","keys","f$2","getOwnPropertySymbols","_objectGops","f$3","_objectPie","_enumKeys","getSymbols","symbols","isEnum","_isArray","Array","isArray","arg","_toObject","_objectDps","defineProperties","Properties","document$2","_html","documentElement","IE_PROTO$1","Empty","PROTOTYPE$1","createDict","iframe","lt","gt","iframeDocument","style","display","appendChild","src","contentWindow","open","write","close","_objectCreate","hiddenKeys","f$4","getOwnPropertyNames","_objectGopn","gOPN","toString$1","windowNames","getWindowNames","f$5","_objectGopnExt","gOPD","getOwnPropertyDescriptor","f$6","_objectGopd","gOPD$1","dP$1","gOPN$1","$JSON","JSON","_stringify","stringify","PROTOTYPE$2","HIDDEN","TO_PRIMITIVE","SymbolRegistry","AllSymbols","OPSymbols","ObjectProto","USE_NATIVE","QObject","setter","findChild","setSymbolDesc","D","protoDesc","wrap","sym","_k","isSymbol","iterator","$defineProperty","$defineProperties","l","$create","$propertyIsEnumerable","E","$getOwnPropertyDescriptor","$getOwnPropertyNames","$getOwnPropertySymbols","IS_OP","$set","set","es6Symbols","j","wellKnownSymbols","k","keyFor","useSetter","useSimple","FAILS_ON_PRIMITIVES","args","replacer","$replacer","_typeof","obj","constructor","_defineProperty","ownKeys","enumerableOnly","filter","_objectSpread2","forEach","getOwnPropertyDescriptors","_toConsumableArray","arr","_arrayWithoutHoles","_iterableToArray","_nonIterableSpread","arr2","iter","from","_objectSap","_flags","ignoreCase","multiline","unicode","sticky","flags","RegExp","$toString","define","_stringAt","pos","s","charCodeAt","at","_advanceStringIndex","TAG$1","ARG","tryGet","_classof","T","callee","builtinExec","_regexpExecAbstract","nativeExec","nativeReplace","String","replace","patchedExec","LAST_INDEX","UPDATES_LAST_INDEX_WRONG","re1","re2","NPCG_INCLUDED","PATCH","str","re","lastIndex","reCopy","match","_regexpExec","proto","forced","SPECIES","REPLACE_SUPPORTS_NAMED_GROUPS","groups","SPLIT_WORKS_WITH_OVERWRITTEN_EXEC","originalExec","_fixReWks","SYMBOL","DELEGATES_TO_SYMBOL","DELEGATES_TO_EXEC","execCalled","nativeRegExpMethod","fns","nativeMethod","regexp","arg2","forceStringMethod","done","strfn","rxfn","string","max$1","min$2","floor$1","SUBSTITUTION_SYMBOLS","SUBSTITUTION_SYMBOLS_NO_NAMED","maybeToString","defined","REPLACE","$replace","maybeCallNative","getSubstitution","matched","position","captures","namedCaptures","replacement","tailPos","m","ch","capture","n","searchValue","replaceValue","res","rx","functionalReplace","fullUnicode","results","matchStr","accumulatedResult","nextSourcePosition","replacerArgs","UNSCOPABLES","ArrayProto","_addToUnscopables","_iterStep","_iterators","IteratorPrototype","_iterCreate","Constructor","NAME","next","IE_PROTO$2","ObjectProto$1","_objectGpo","getPrototypeOf","ITERATOR","BUGGY","FF_ITERATOR","KEYS","VALUES","returnThis","_iterDefine","Base","DEFAULT","IS_SET","FORCED","getMethod","kind","DEF_VALUES","VALUES_BUG","$native","$default","$entries","$anyNative","entries","methods","values","es6_array_iterator","iterated","_t","_i","Arguments","ITERATOR$1","TO_STRING_TAG","ArrayValues","DOMIterables","CSSRuleList","CSSStyleDeclaration","CSSValueList","ClientRectList","DOMRectList","DOMStringList","DOMTokenList","DataTransferItemList","FileList","HTMLAllCollection","HTMLCollection","HTMLFormElement","HTMLSelectElement","MediaList","MimeTypeArray","NamedNodeMap","NodeList","PaintRequestList","Plugin","PluginArray","SVGLengthList","SVGNumberList","SVGPathSegList","SVGPointList","SVGStringList","SVGTransformList","SourceBufferList","StyleSheetList","TextTrackCueList","TextTrackList","TouchList","collections","explicit","Collection","test","isEnum$1","_objectToArray","isEntries","$values","MATCH","_isRegexp","isRegExp","SPECIES$1","_speciesConstructor","C","$min","$push","$SPLIT","LENGTH","LAST_INDEX$1","MAX_UINT32","SUPPORTS_Y","SPLIT","$split","internalSplit","separator","limit","output","lastLastIndex","splitLimit","separatorCopy","lastLength","splitter","unicodeMatching","lim","p","q","A","z","$assign","assign","_objectAssign","K","aLen","check","_setProto","setPrototypeOf","buggy","__proto__","_inheritIfRequired","_stringWs","space","non","ltrim","rtrim","exporter","ALIAS","FORCE","trim","TYPE","_stringTrim","gOPN$2","gOPD$2","dP$2","$trim","NUMBER","$Number","proto$1","BROKEN_COF","TRIM","toNumber","argument","first","third","radix","maxCode","NaN","digits","code","parseInt","j$1","key$1","moment","round","pow","abs","factory","hooks","hookCallback","input","isObject","isObjectEmpty","isUndefined","isNumber","isDate","Date","map","hasOwnProp","extend","createUTC","format","locale","strict","createLocalOrUTC","utc","defaultParsingFlags","empty","unusedTokens","unusedInput","overflow","charsLeftOver","nullInput","invalidMonth","invalidFormat","userInvalidated","iso","parsedDateParts","meridiem","rfc2822","weekdayMismatch","getParsingFlags","_pf","isValid","_isValid","parsedParts","some","isNowValid","_d","getTime","invalidWeekday","_strict","bigHour","isFrozen","createInvalid","copyConfig","to","prop","_isAMomentObject","_f","_l","_tzm","_isUTC","_offset","_locale","momentProperties","Moment","config","updateInProgress","updateOffset","isMoment","absFloor","number","toInt","argumentForCoercion","coercedNumber","isFinite","compareArrays","array1","array2","dontConvert","len","lengthDiff","diffs","warn","msg","suppressDeprecationWarnings","console","deprecate","firstTime","deprecationHandler","stack","deprecateSimple","deprecations","_config","_dayOfMonthOrdinalParseLenient","_dayOfMonthOrdinalParse","_ordinalParse","mergeConfigs","parentConfig","childConfig","Locale","calendar","mom","now","_calendar","longDateFormat","_longDateFormat","formatUpper","toUpperCase","addUnitAlias","unit","shorthand","lowerCase","toLowerCase","aliases","normalizeUnits","units","normalizeObjectUnits","inputObject","normalizedInput","normalizedProp","addUnitPriority","priority","priorities","getPrioritizedUnits","unitsObj","u","sort","zeroFill","targetLength","forceSign","absNumber","zerosToFill","sign","substr","addFormatToken","token","padded","ordinal","callback","func","formatTokenFunctions","localeData","removeFormattingTokens","makeFormatFunction","array","formattingTokens","formatMoment","expandFormat","formatFunctions","invalidDate","replaceLongDateFormatTokens","localFormattingTokens","addRegexToken","regex","strictRegex","regexes","isStrict","getParseRegexForToken","unescapeFormat","regexEscape","p1","p2","p3","p4","addParseToken","tokens","addWeekParseToken","_w","addTimeToArrayFromToken","_a","daysInYear","year","isLeapYear","makeGetSet","keepTime","set$1","month","date","daysInMonth","stringSet","prioritized","mod","x","modMonth","handleStrictParse","monthName","llc","toLocaleLowerCase","ii","_monthsParse","_longMonthsParse","_shortMonthsParse","monthsShort","months","indexOf","localeMonthsParse","_monthsParseExact","setMonth","dayOfMonth","monthsParse","getSetMonth","computeMonthsParse","cmpLenRev","shortPieces","longPieces","mixedPieces","_monthsRegex","_monthsShortRegex","_monthsStrictRegex","_monthsShortStrictRegex","createDate","y","d","h","M","ms","getFullYear","setFullYear","createUTCDate","UTC","getUTCFullYear","setUTCFullYear","firstWeekOffset","dow","doy","fwd","fwdlw","getUTCDay","dayOfYearFromWeeks","week","weekday","weekOffset","dayOfYear","resYear","resDayOfYear","weekOfYear","resWeek","weeksInYear","weekOffsetNext","parseWeekday","weekdaysParse","parseIsoWeekday","shiftWeekdays","ws","handleStrictParse$1","weekdayName","_weekdaysParse","_shortWeekdaysParse","_minWeekdaysParse","day","weekdaysMin","weekdaysShort","weekdays","localeWeekdaysParse","_weekdaysParseExact","_fullWeekdaysParse","computeWeekdaysParse","minPieces","minp","shortp","longp","_weekdaysRegex","_weekdaysShortRegex","_weekdaysMinRegex","_weekdaysStrictRegex","_weekdaysShortStrictRegex","_weekdaysMinStrictRegex","hFormat","hours","lowercase","minutes","matchMeridiem","_meridiemParse","normalizeLocale","chooseLocale","loadLocale","globalLocale","oldLocale","locales","_abbr","aliasedRequire","getSetGlobalLocale","data","getLocale","defineLocale","baseConfig","abbr","parentLocale","localeFamilies","listLocales","checkOverflow","_overflowDayOfYear","_overflowWeeks","_overflowWeekday","defaults","currentDateArray","nowValue","_useUTC","getUTCMonth","getUTCDate","getMonth","getDate","configFromArray","currentDate","expectedWeekday","yearToUse","dayOfYearFromWeekInfo","_dayOfYear","_nextDay","getDay","setUTCMinutes","getUTCMinutes","weekYear","temp","weekdayOverflow","GG","createLocal","_week","curWeek","gg","configFromISO","extendedIsoRegex","basicIsoRegex","allowTime","dateFormat","timeFormat","tzFormat","isoDates","isoTimes","tzRegex","configFromStringAndFormat","extractFromRFC2822Strings","yearStr","monthStr","dayStr","hourStr","minuteStr","secondStr","untruncateYear","defaultLocaleMonthsShort","preprocessRFC2822","checkWeekday","weekdayStr","parsedInput","weekdayProvided","defaultLocaleWeekdaysShort","weekdayActual","calculateOffset","obsOffset","militaryOffset","numOffset","obsOffsets","hm","configFromRFC2822","parsedArray","configFromString","aspNetJsonRegex","createFromInputFallback","ISO_8601","RFC_2822","stringLength","totalParsedInputLength","skipped","_meridiem","meridiemFixWrap","hour","isPm","meridiemHour","isPM","configFromStringAndArray","tempConfig","bestMoment","scoreToBeat","currentScore","score","configFromObject","minute","second","millisecond","createFromConfig","prepareConfig","add","preparse","configFromInput","isUTC","pickBy","moments","isDurationValid","ordering","unitHasDecimal","parseFloat","Duration","duration","years","quarters","quarter","weeks","isoWeek","days","seconds","milliseconds","_milliseconds","_days","_months","_data","_bubble","isDuration","absRound","offset","utcOffset","offsetFromString","matcher","matches","chunk","parts","chunkOffset","cloneWithOffset","model","diff","clone","setTime","local","getDateOffset","getTimezoneOffset","isDaylightSavingTimeShifted","_isDSTShifted","other","toArray","isUtc","createDuration","ret","diffRes","aspNetRegex","isoRegex","parseIso","momentsDifference","inp","positiveMomentsDifference","base","isAfter","isBefore","createAdder","direction","period","dur","tmp","addSubtract","isAdding","monthDiff","wholeMonthDiff","anchor","anchor2","adjust","newLocaleData","mod$1","dividend","divisor","localStartOfDate","utcStartOfDate","addWeekYearFormatToken","getter","getSetWeekYearHelper","weeksTarget","setWeekAll","dayOfYearData","parseMs","preParsePostFormat","get$1","field","listMonthsImpl","listWeekdaysImpl","localeSorted","shift","addSubtract$1","absCeil","daysToMonths","monthsToDays","makeAs","alias","as","makeGetter","substituteTimeAgo","withoutSuffix","isFuture","relativeTime","relativeTime$1","posNegDuration","thresholds","ss","getSetRelativeTimeRounding","roundingFunction","toISOString$1","abs$1","Y","toFixed","total","asSeconds","totalSign","ymSign","daysSign","hmsSign","fun","t","defaultDayOfMonthOrdinalParse","match1","match2","match3","match4","match6","match1to2","match3to4","match5to6","match1to3","match1to4","match1to6","matchUnsigned","matchSigned","matchOffset","matchShortOffset","matchTimestamp","matchWord","YEAR","MONTH","DATE","HOUR","MINUTE","SECOND","parseTwoDigitYear","getSetYear","o","monthsShortRegex","monthsRegex","MONTHS_IN_FORMAT","weekdaysMinRegex","weekdaysShortRegex","weekdaysRegex","kInput","_isPm","pos1","pos2","defaultLocaleMeridiemParse","getSetHour","sameDay","nextDay","nextWeek","lastDay","lastWeek","sameElse","LTS","LT","L","LL","LLL","LLLL","dayOfMonthOrdinalParse","future","past","mm","hh","dd","MM","yy","meridiemParse","UT","GMT","EDT","EST","CDT","CST","MDT","MST","PDT","PST","prototypeMin","prototypeMax","invalid","subtract","defaultFormat","defaultFormatUtc","lang","isoWeekYear","getSetDayOfMonth","getSetMinute","getSetSecond","getSetMillisecond","time","formats","sod","startOf","calendarFormat","asFloat","zoneDelta","endOf","startOfDate","isoWeekday","MS_PER_HOUR","MS_PER_MINUTE","MS_PER_SECOND","inputString","postformat","humanize","fromNow","toNow","invalidAt","localInput","isBetween","inclusivity","localFrom","localTo","isSame","inputMs","isSameOrAfter","isSameOrBefore","parsingFlags","toObject","toDate","toISOString","keepOffset","inspect","zone","isLocal","prefix","suffix","toJSON","unix","creationData","isoWeeks","weekInfo","isoWeeksInYear","keepLocalTime","keepMinutes","localAdjust","_changeInProgress","parseZone","tZone","hasAlignedHourOffset","isDST","isUtcOffset","zoneAbbr","zoneName","dates","isDSTShifted","_invalidDate","_ordinal","_relativeTime","pastFuture","isFormat","_monthsShort","firstDayOfYear","firstDayOfWeek","_weekdays","_weekdaysMin","_weekdaysShort","isLower","langData","mathAbs","asMilliseconds","asMinutes","asHours","asDays","asWeeks","asMonths","asQuarters","asYears","proto$2","monthsFromDays","withSuffix","toIsoString","setHookCallback","updateLocale","tmpLocale","relativeTimeRounding","relativeTimeThreshold","threshold","myMoment","HTML5_FMT","DATETIME_LOCAL","DATETIME_LOCAL_SECONDS","DATETIME_LOCAL_MS","TIME","TIME_SECONDS","TIME_MS","WEEK","byteToHex","i$1","stringifyUUID","buf","bth","crypto","getRandomValues","_rnds8","Uint8Array","_rnds","r","byteToHex$1","i$1$1","seedBytes","defaultNodeId","defaultClockseq","uuid4","options","rnds","rng","ASPDateRegex","fullHexRE","shortHexRE","rgbRE","rgbaRE","Number","recursiveDOMDelete","DOMobject","hasChildNodes","child","firstChild","removeChild","isString","parse","copyOrDelete","allowDeletion","doDeletion","fillIfDefined","aProp","bProp","selectiveExtend","props","_len","others","_key","_others","selectiveDeepExtend","deepExtend","selectiveNotDeepExtend","propsToExclude","protoExtend","equalArray","convert","getType","_value","Boolean","copyAndExtendArray","newValue","copyArray","getAbsoluteLeft","elem","getBoundingClientRect","left","getAbsoluteRight","right","getAbsoluteTop","top","addClassName","classNames","classes","className","newClasses","removeClassName","oldClasses","_key2","updateProperty","throttle","scheduled","requestAnimationFrame","addEventListener","element","action","listener","useCapture","navigator","userAgent","attachEvent","removeEventListener","detachEvent","preventDefault","event","returnValue","getTarget","srcElement","Element","nodeType","parentNode","hasParent","parent","option","asBoolean","defaultValue","asNumber","asString","asSize","asElement","hexToRGB","hex","g","overrideOpacity","color","opacity","rgb","_rgb","RGBToHex","red","green","blue","parseColor","inputColor","defaultColor","colorStr","isValidRGB","isValidHex","hsv","hexToHSV","lighterColorHSV","v","darkerColorHSV","darkerColorHex","HSVToHex","lighterColorHex","background","border","highlight","hover","_color","RGBToHSV","minRGB","maxRGB","cssUtil","cssText","styles","_key3","_value2","addCssText","currentStyles","newStyles","removeCssText","removeStyles","_key4","HSVToRGB","isOk","isValidRGBA","rgba","selectiveBridgeObject","fields","referenceObject","objectTo","bridgeObject","insertSort","compare","mergeOptions","mergeTarget","globalOptions","isPresent","doMerge","dst","srcOption","globalPassed","isEmpty","globalOption","globalEnabled","enabled","binarySearchCustom","orderedItems","comparator","field2","iteration","low","high","middle","item","_value3","searchResult","binarySearchValue","sidePreference","prevValue","nextValue","easingFunctions","linear","easeInQuad","easeOutQuad","easeInOutQuad","easeInCubic","easeOutCubic","easeInOutCubic","easeInQuart","easeOutQuart","easeInOutQuart","easeInQuint","easeOutQuint","easeInOutQuint","getScrollBarWidth","inner","width","height","outer","visibility","body","w1","offsetWidth","w2","clientWidth","topMost","pile","accessors","candidate","_iteratorNormalCompletion","_didIteratorError","_iteratorError","_iterator","_step","member","err","return","util","freeze","randomUUID","_typeof_1","_typeof2","_classCallCheck","instance","classCallCheck","_defineProperties","descriptor","_createClass","protoProps","staticProps","createClass","_assertThisInitialized","ReferenceError","assertThisInitialized","_possibleConstructorReturn","possibleConstructorReturn","_getPrototypeOf","_setPrototypeOf","_inherits","subClass","superClass","inherits","createCommonjsModule$1","byteToHex$2","i$2","random$1","byteToHex$1$1","seedBytes$1","defaultNodeId$1","defaultClockseq$1","isId","Queue","_queue","_timeout","_extended","delay","setOptions","_flushIfNeeded","flush","method","original","me","queue","context","entry","_this","clearTimeout","setTimeout","splice","arrayWithoutHoles","iterableToArray","nonIterableSpread","toConsumableArray","DataSetPart","_subscribers","remove","update","subscribe","on","unsubscribe","off","payload","senderId","subscribers","subscriber","_objectSpread","DataSet","_DataSetPart","_options","_idProp","fieldId","_type","destroy","addedIds","_addItem","_trigger","items","_this2","updatedIds","oldData","updatedData","idProp","addOrUpdate","origId","fullItem","oldItem","_updateItem","_id","ids","returnType","itemIds","itemId","_getItem","order","_sort","_filterFields","_i2","_len2","_i3","_len3","resultant","_id2","_i4","_len4","_i5","_len5","_id3","_i6","_len6","_id4","_i7","_len7","_i8","_len8","_id5","_i9","_len9","_id6","_item","mappedItems","reduce","filteredItem","av","bv","removedIds","removedItems","_remove","ident","maxField","itemField","minField","fieldType","count","exists","_i10","_len10","types","raw","converted","DataView","_ids","_onEvent","bind","setData","getIds","oldIds","newIds","error","viewOptions","thisFilter","optionsFilter","defaultFilter","getDataSet","params","oldItems","updatedItems","CanvasRenderingContext2D","circle","beginPath","arc","PI","closePath","square","rect","triangle","sqrt","s2","ir","moveTo","lineTo","triangleDown","star","cos","sin","radius","diamond","roundRect","r2d","ellipse_vis","kappa","ox","oy","xe","ye","xm","ym","bezierCurveTo","database","wEllipse","hEllipse","ymb","yeb","dashedLine","x2","y2","pattern","patternLength","dx","dy","slope","distRemaining","patternIndex","draw","xStep","dashLength","hexagon","Emitter","mixin","_callbacks","once","removeListener","removeAllListeners","callbacks","cb","emit","listeners","hasListeners","parseDOT","dot","parseGraph","NODE_ATTR_MAPPING","EDGE_ATTR_MAPPING","TOKENTYPE","NULL","DELIMITER","IDENTIFIER","UNKNOWN","DELIMITERS","tokenType","nextPreview","regexAlphaNumeric","isAlphaNumeric","merge","setValue","path","addNode","graph","node","current","graphs","root","nodes","attr","addEdge","edge","edges","createEdge","arrows","getToken","isComment","c2","newSyntaxError","SyntaxError","chop","parseStatements","parseStatement","subgraph","parseSubgraph","parseEdge","parseAttributeStatement","parseNodeStatement","subgraphs","parseAttributeList","edgeStyles","arrowTypes","box","crow","curve","icurve","normal","inv","tee","vee","attr_list","attr_names","arrowType","includes","idx","dir","dir_type","from_type","to_type","idx_arrow","nof_attr_list","tmp_attr_list","message","text","maxLength","forEach2","elem1","elem2","setProp","pop","convertAttr","mapping","visProp","visPropI","DOTToGraph","dotData","graphData","dotNode","graphNode","label","image","shape","convertEdge","dotEdge","graphEdge","subEdge","parseGephi","gephiJSON","optionsObj","inheritColor","fixed","gEdges","vEdges","gEdge","vEdge","attributes","title","vNodes","gNode","vNode","size","this","keycharm","fromCharCode","container","_exportFunctions","_bound","keydown","keyup","_keys","down","handleEvent","up","keyCode","bound","shiftKey","bindAll","getKey","unbind","newBindings","reset","nextKey","assign$1","hammerMock","noop","Hammer","require$$0","Activator","active","dom","overlay","hammer","_onTapOverlay","events","stopPropagation","onClick","_hasParent","deactivate","escListener","activate","edit","del","back","editNode","editEdge","addDescription","edgeDescription","editEdgeDescription","createEdgeError","deleteClusterError","editClusterError","CachedImage","NUM_ITERATIONS","Image","canvas","initialized","h2","h4","h8","h16","w4","w8","w16","coordinates","_fillMipMap","ctx","getContext","drawImage","iterations","factor","Images","images","imageBroken","url","brokenUrl","imageToLoadBrokenUrlOn","onerror","imageToRedrawWith","cachedImage","img","onload","_fixImageCoordinates","init","_redrawWithImage","_tryloadBrokenUrl","imageToCache","offsetHeight","Groups","clear","defaultIndex","groupsArray","groupIndex","defaultGroups","defaultOptions","useDefaultGroups","optionFields","groupName","group","groupname","shouldCreate","_arrayWithHoles","_iterableToArrayLimit","_arr","_n","_e","_s","_nonIterableRest","_slicedToArray","arrayWithHoles","iterableToArrayLimit","nonIterableRest","ComponentUtil","subOption","allowed","chosen","chosenEdge","point","rotationPoint","angle","tmp2","bottom","LabelAccumulator","measureText","lines","blocks","tmpText","block","line","_add","tmpLines","tmpLine","firstEmptyBlock","tmpBlocks","determineLineHeights","determineLabelSize","removeEmptyBlocks","tagPattern","MarkupAccumulator","bold","ital","mono","spacing","buffer","modStack","modName","tagName","emitBlock","unshift","setTag","advance","prepareRegExp","regExp","nextTag","checkTag","unsetTag","prepared","LabelSplitter","selected","getFormattingValues","measure","isValidLabel","finalize","font","fontOptions","nlLines","lineCount","multi","splitBlocks","newLine","maxWdt","splitStringIntoLines","append","markupSystem","system","parseEntities","parsed","parseWS","parseStartTag","parseEndTag","beginable","parseOverride","decodeMarkupSystem","splitMarkdownBlocks","splitHtmlBlocks","curWidth","words","pre","newText","overMaxWidth","appendLast","getLongestFit","word","getLongestFitWord","newW","multiFontStyle","Label","edgelabel","pointToSelf","baseSize","yLine","isEdgeLabel","elementOptions","initFontOptions","labelDirty","newFontOptions","parseFontString","vadjust","constrainWidth","minWdt","constrainHeight","minHgt","valign","widthConstraint","widthConstraintMaximum","widthConstraintMinimum","heightConstraint","heightConstraintMinimum","heightConstraintValign","propagateFonts","constrain","chooser","choosify","margins","widthBias","heightBias","dstPile","srcPile","addFontToPile","tmpShorthand","opt","multiName","multiFont","optionNames","getFontOption","fontPile","addFontOptionsToPile","getBasicOptions","modOptions","tmpMultiFontOptions","getFontOptions","baseline","viewFontSize","view","scale","scaling","drawThreshold","maxVisible","calculateLabelSize","_drawBackground","_drawText","fillStyle","getSize","fillRect","_setAlignment","textAlign","labelHeight","align","_getColor","strokeColor","fontColor","strokeWidth","lineWidth","strokeStyle","lineJoin","strokeText","fillText","textBaseline","initialStrokeColor","_processLabel","getValue","face","labelHighlightBold","fontString","selectedState","hoverState","inText","process","differentState","state","_processLabelText","outOptions","inOptions","newOptionsArray","NodeBase","labelModule","margin","refreshNeeded","boundingBox","adjustSizes","borderWidth","resize","shadow","shadowColor","shadowBlur","shadowSize","shadowOffsetX","shadowX","shadowOffsetY","shadowY","borderDashes","setLineDash","dashes","shapeProperties","borderColor","save","enableBorderDashes","stroke","disableBorderDashes","restore","enableShadow","fill","disableShadow","performStroke","_updateBoundingBox","textSize","getTextSize","DEFAULT_SIZE","Box","_setMargins","needsRefresh","dimensions","getDimensionsFromLabel","initContextForDraw","borderRadius","performFill","updateBoundingBox","_addBoundingBoxMargin","CircleImageBase","labelOffset","imageObj","imageObjAlt","setImages","selection_changed","imageTmp","useImageSize","ratio_width","ratio_height","globalAlpha","interpolation","drawImageAtPosition","yLabel","labelDimensions","Circle","diameter","_drawRawCircle","CircularImage","imageAbsent","_resizeImage","switchImages","clip","_drawImageAtPosition","_drawImageLabel","Database","_distanceToBorder","ShapeBase","sizeMultiplier","icon","Diamond","_drawShape","Dot","Ellipse","Icon","iconSize","_icon","side","useBorderWithImage","neutralborderWidth","selectionLineWidth","borderWidthSelected","Square","Hexagon","Star","Text","Triangle","TriangleDown","errorFound","printStyle","Validator","referenceOptions","subObject","allOptions","usedOptions","__any__","getSuggestion","referenceOption","is_object","refOptionObj","__type__","checkFields","log","printLocation","optionType","refOptionType","print","localSearch","findInOptions","globalSearch","indexMatch","distance","closestMatch","recursive","closestMatchPath","lowerCaseOption","op","levenshteinDistance","matrix","Node","imagelist","grouplist","baseFontSize","predefinedPosition","currentShape","checkMass","parseOptions","_load_images","updateLabelModule","updateShape","hidden","physics","load","brokenImage","unselected","updateGroupOptions","currentGroup","distanceToBorder","customScalingFunction","sizeDiff","fontDiff","visible","pointInRect","nodeId","labelId","parentOptions","newOptions","groupList","groupObj","skipProperties","parsedColor","mass","strId","NodesHandler","layoutEngine","functions","createNode","nodesListeners","boldital","level","bindEventListeners","emitter","refresh","doNotEmit","oldNodesData","newNodes","properties","positionInitially","changedData","dataChanged","oldValue","constructorClass","clearPositions","_this3","dataArray","nodeIndices","dataset","nodeList","nodeObj","toId","fromId","edgeList","_this4","EndPoint","points","arrowData","xt","yt","Arrow","transform","drawPath","Crow","Curve","pi","start_angle","end_angle","InvertedCurve","InvertedTriangle","Bar","Vee","EndPoints","EdgeBase","atan2","colorDirty","selectionWidth","hoverWidth","fromPoint","toPoint","viaNode","getColor","_drawLine","_drawDashedLine","_line","_getCircleData","_circle","lineCap","lineDashOffset","nearNode","_findBorderPositionCircle","_findBorderPosition","selfReferenceSize","percentage","distanceToPoint","difference","_pointOnCircle","inheritsColor","grd","createLinearGradient","fromColor","toColor","addColorStop","x1","y1","x3","y3","via","_getDistanceToEdge","py","arrowPoint","node1","node2","guideOffset","scaleFactor","fromArrowScale","fromArrowType","toArrowScale","toArrowType","middleArrowScale","middleArrowType","findBorderPosition","getPoint","smooth","guidePos","xi","yi","attrs","origCtxAttr","attrname","backgroundColor","backgroundSize","setStrokeDashed","backgroundDashes","BezierEdgeBase","_getViaCoordinates","minDistance","lastX","lastY","_getDistanceToLine","viaNode1","viaNode2","hasNode1","hasNode2","quadraticCurveTo","drawBackground","CubicBezierEdgeBase","via1","via2","vec","CubicBezierEdge","viaNodes","_bezierCurve","roundness","forceDirection","_findBorderPositionBezier","_getDistanceToBezierEdge","BezierEdgeDynamic","_boundFunction","positionBezierNode","physicsChange","setupSupportNode","connect","parentEdgeId","cx","cy","cr","BezierEdgeStatic","xVia","yVia","stepX","stepY","originalAngle","myAngle","StraightEdge","edgeSegmentLength","toBorderDist","toBorderPoint","borderPos","Edge","baseWidth","edgeType","connected","oldHidden","updateEdgeType","_setInteractionWidths","newHidden","toArrow","fromArrow","middleArrow","inherit","arrowStrikethrough","selectedWidth","changeInType","cleanup","disconnect","attachEdge","detachEdge","widthDiff","getViaNode","getArrowData","drawLine","drawArrows","drawLabel","drawArrowHead","_getRotation","translate","rotate","edgeId","isOverlappingWith","xFrom","yFrom","xTo","yTo","xObj","yObj","dist","getDistanceToEdge","copyFromGlobals","colorsDefined","EdgesHandler","edgesListeners","edgeData","smoothOptions","reconnectEdges","oldEdgesData","edgesData","oldEdge","_addMissingEdges","_removeInvalidEdges","edgesToDelete","toNode","_this5","fromNode","isCluster","addIds","BarnesHutSolver","physicsBody","barnesHutTree","randomSeed","thetaInversed","theta","overlapAvoidanceFactor","avoidOverlap","gravitationalConstant","physicsNodeIndices","nodeCount","_formBarnesHutTree","_getForceContributions","parentBranch","_getForceContribution","children","NW","NE","SW","SE","childrenCount","centerOfMass","calcSize","_calculateForces","gravityForce","fx","forces","minX","minY","maxX","maxY","rootSize","halfRootSize","centerX","centerY","range","maxWidth","_splitBranch","_placeInTree","totalMass","totalMassInv","biggestSize","skipMassUpdate","_updateBranchMass","region","_placeInRegion","seededRandom","containedNode","_insertRegion","childSize","_drawBranch","branch","RepulsionSolver","nodeDistance","fy","repulsingForce","HierarchicalRepulsionSolver","steepness","SpringSolver","edgeIndices","physicsEdgeIndices","edgeLength","node3","springLength","_calculateSpringForce","springForce","springConstant","HierarchicalSpringSolver","springFx","springFy","totalFx","totalFy","correctionFx","correctionFy","CentralGravitySolver","centralGravity","ForceAtlas2BasedRepulsionSolver","degree","ForceAtlas2BasedCentralGravitySolver","PhysicsEngine","velocities","physicsEnabled","simulationInterval","requiresTimeout","previousStates","referenceState","freezeCache","renderTimer","adaptiveTimestep","adaptiveTimestepEnabled","adaptiveCounter","adaptiveInterval","stabilized","startedStabilization","stabilizationIterations","ready","barnesHut","damping","forceAtlas2Based","repulsion","hierarchicalRepulsion","maxVelocity","minVelocity","solver","stabilization","updateInterval","onlyDynamicEdges","fit","timestep","layoutFailed","initPhysics","stopSimulation","startSimulation","updatePhysicsData","nodesSolver","edgesSolver","gravitySolver","Repulsion","HierarchicalRepulsion","modelOptions","stabilize","viewFunction","simulationStep","_emitStabilized","startTime","physicsTick","physicsTime","runDoubleSpeed","amountOfIterations","solve","moveNodes","_evaluateStepQuality","_startStabilizing","doAdaptive","physicsStep","revert","adjustTimeStep","nodeIds","positions","vx","vy","reference","dpos","maxNodeVelocity","averageNodeVelocity","velocityAdaptiveThreshold","nodeVelocity","_performStep","df","maxV","force","velocity","calculateComponentVelocity","totalVelocity","targetIterations","_freezeNodes","_stabilizationBatch","running","sendProgress","_finalizeStabilization","_restoreFrozenNodes","forceSize","colorFactor","NetworkUtil","allNodes","specificNodes","clonedOptions","amountOfConnections","Cluster","containedNodes","containedEdges","childClusterId","childCluster","clusterEdge","parentClusterEdge","clusteringEdgeReplacingIds","srcId","edgeReplacedById","ClusterEngine","clusteredNodes","clusteredEdges","hubsize","_getHubSize","_checkOptions","nodesToCluster","clusterByConnection","refreshData","joinCondition","childNodesObj","childEdgesObj","_cluster","edgeCount","clusters","usedNodes","relevantEdgeCount","checkJoinCondition","cloneOptions","gatheringSuccessful","childNodeId","_getConnectedId","findClusterData","foundCluster","clusterByEdgeCount","clusterNodeProperties","parentNodeId","parentClonedOptions","childClonedOptions","childNodeIDs","childNode","childEdge","clusterEdgeProperties","childKeys","createEdges","otherNodeId","newEdges","getNewEdge","createdEdge","newEdge","matchToDirection","matchFromDirection","_createClusteredEdge","_backupEdgeOptions","tmpNodesToRemove","allowSingleNodeCluster","processProperties","childNodesOptions","childEdgesOptions","clusterId","_getClusterPosition","clusterNode","_clusterEdges","originalOptions","clusterNodeId","findNode","parentIndex","parentClusterNodeId","parentClusterNode","_openChildCluster","releaseFunction","clusterPosition","newPositions","edgesToBeDeleted","otherNode","transferId","transferEdge","otherCluster","_restoreEdge","nodesArray","counter","reverse","clusteredNodeId","startEdgeId","allEdgeIds","getClusteredEdges","clusteredEdgeId","getBaseEdges","IdsToHandle","doneIds","foundIds","nextId","nextEdge","replacingIds","replacingId","average","averageSquared","hubCounter","largestHub","variance","standardDeviation","hubThreshold","baseEdge","extraOptions","childNodes","childEdges","_createClusterEdges","clusteredNode","deletedNodeIds","deletedEdgeIds","eachClusterNode","endPointsValid","replacedIds","numValid","containedEdgeId","containedEdge","deletedEdgeId","_filter","shouldBeClustered","_isClusteredNode","_isClusteredEdge","clusterFrom","_getClusterNodeForNode","clusterTo","changed","continueLoop","clustersToOpen","numNodes","allowSingle","openCluster","_updateState","_initRequestAnimationFrame","mozRequestAnimationFrame","webkitRequestAnimationFrame","msRequestAnimationFrame","CanvasRenderer","redrawRequested","renderingActive","renderRequests","allowRedraw","dragging","zooming","hideEdgesOnDrag","hideEdgesOnZoom","hideNodesOnDrag","_determineBrowserMethod","zoomTimeoutId","_requestRedraw","_resizeNodes","_redraw","_startRendering","cancelAnimationFrame","myWindow","timer","_requestNextFrame","_renderStep","frame","setSize","setTransform","clientHeight","clearRect","translation","_drawEdges","_drawNodes","alwaysShow","topLeft","DOMtoCanvas","bottomRight","viewableArea","isSelected","isBoundingBoxOverlappingWith","browserType","inputHandler","isFirst","isFinal","offTouch","pinchRecognizer","getTouchAction","Canvas","pixelRatio","resizeTimer","resizeFunction","_onResize","cameraState","canvasViewCenter","autoResize","hammerFrame","_cleanUp","setInterval","clearInterval","previousWidth","previousHeight","widthRatio","heightRatio","newScale","currentViewCenter","distanceFromCenter","tabIndex","noCanvas","fontWeight","padding","innerHTML","_setPixelRatio","_bindHammer","drag","pinch","enable","DIRECTION_ALL","hammerUtil","onTouch","eventListeners","onTap","onDoubleTap","onHold","onDragStart","onDrag","onDragEnd","onPinch","onMouseWheel","onMouseMove","onContext","onRelease","_prepareValue","emitEvent","oldWidth","oldHeight","previousRatio","_getCameraState","newWidth","newHeight","_setCameraState","numerator","devicePixelRatio","denominator","webkitBackingStorePixelRatio","mozBackingStorePixelRatio","msBackingStorePixelRatio","oBackingStorePixelRatio","backingStorePixelRatio","_determinePixelRatio","_XconvertCanvasToDOM","_YconvertCanvasToDOM","_XconvertDOMtoCanvas","_YconvertDOMtoCanvas","View","animationSpeed","renderRefreshRate","animationEasingFunction","easingTime","sourceScale","targetScale","sourceTranslation","targetTranslation","lockedOnNodeId","lockedOnNodeOffset","touchTime","releaseNode","initialZoom","zoomLevel","positionDefined","getRange","numberOfNodes","xDistance","yDistance","xZoomLevel","yZoomLevel","center","findCenter","animationOptions","animation","nodePosition","lockedOnNode","getViewPosition","easingFunction","animateView","locked","_transitionRedraw","viewCenter","_lockedRedraw","finished","progress","NavigationHandler","iconsCreated","navigationHammers","boundFunctions","activated","configureKeyboardBindings","navigationButtons","loadNavigationElements","cleanNavigation","navigationDOM","navigationDivs","navigationDivActions","_fit","bindToRedraw","_stopMovement","boundAction","keyboard","speed","scaleOld","zoom","scaleFrac","tx","ty","pointer","bindToWindow","unbindFromRedraw","Popup","overflowMethod","content","doShow","maxHeight","isLeft","isTop","hide","InteractionHandler","selectionHandler","navigationHandler","popup","popupObj","popupTimer","getPointer","dragNodes","dragView","tooltipDelay","zoomView","zoomSpeed","tooltip","touch","pinched","multiselect","changedPointers","ctrlKey","metaKey","checkSelectionChanges","_generateClickEvent","clientX","clientY","previousSelection","getSelection","selectAdditionalOnPoint","selectOnPoint","currentSelection","deselectedItems","_determineDifference","selectedItems","firstSet","secondSet","arrayDiff","firstArr","secondArr","getNodeAt","selection","unselectAll","selectObject","selectionObj","xFixed","yFixed","deltaX","deltaY","diffX","diffY","preScaleDragPointer","postScaleDragPointer","canvasToDOM","delta","wheelDelta","detail","popupVisible","_checkHidePopup","setPosition","show","focus","_checkShowPopup","hoverObject","pointerObj","previousPopupObjId","nodeUnderCursor","popupType","overlappingNodes","getTitle","overlappingEdges","popupTargetType","popupTargetId","setText","_pointerToPositionObject","stillOnObj","overNode","SelectionHandler","hoverObj","selectable","selectConnectedEdges","hoverConnectedEdges","updateSelection","getEdgeAt","selectionChanged","deselectObject","DOM","eventType","oldSelection","emptySelection","_initBaseEvent","getClickedItems","controlEdge","highlightEdges","_selectConnectedEdges","select","_addToSelection","_removeFromSelection","canvasPos","returnNode","positionObject","_getAllNodesOverlappingWith","_getEdgesOverlappingWith","returnEdge","mindist","overlappingEdge","_unselectConnectedEdges","unselect","clusterSize","_addToHover","hoverChanged","emitBlurEvent","hoveredEdgesCount","hoveredNodesCount","newOnlyHoveredEdge","newOnlyHoveredNode","emitHoverEvent","_hoverConnectedEdges","getSelectedNodes","edgeIds","getSelectedEdges","idArray","RangeError","setSelection","getItemsOnPoint","log10","alphabeticalCompare","al","bl","POWERS_OF_TEN","aStr","bStr","minRunLength","makeAscendingRun","lo","hi","runHi","reverseRun","binaryInsertionSort","start","pivot","mid","gallopLeft","hint","lastOffset","maxOffset","gallopRight","__esModule","remaining","runLength","ts","TimSort","minRun","pushRun","mergeRuns","forceMergeRuns","DEFAULT_MIN_GALLOPING","DEFAULT_TMP_STORAGE_LENGTH","minGallop","tmpStorageLength","stackLength","runStart","stackSize","mergeAt","start1","length1","start2","length2","mergeLow","mergeHigh","cursor1","cursor2","dest","count1","count2","exit","customCursor","customDest","DirectionInterface","abstract","fake_use","nodeArray","VerticalStrategy","layout","hierarchical","addToOrdering","getTreeSize","min_x","max_x","levelSeparation","HorizontalStrategy","min_y","max_y","HierarchicalStatus","childrenReference","parentReference","trees","distributionOrdering","levels","distributionIndex","isTree","treeIndex","treeId","accumulator","_getMaxLevel","nodeA","nodeB","minLevel","parents1","parents2","curLevel","LayoutEngine","initialRandomSeed","setPhysics","optionsBackup","improvedLayout","nodeSpacing","treeSpacing","blockShifting","edgeMinimization","parentCentralization","sortMethod","setupHierarchicalLayout","layoutNetwork","curveType","prevHierarchicalState","setDirectionStrategy","adaptAllOptionsForHierarchicalLayout","backupPhysics","indices","clusterThreshold","clusterOptions","startLength","before","modules","clustering","clusterBridges","clusterOutliers","after","_declusterAll","info","kamadaKawai","_shiftToCenter","getRangeCore","clustersPresent","definedLevel","undefinedLevel","lastNodeOnLevel","_determineLevelsByHubsize","_determineLevelsDirected","_determineLevelsCustomCallback","ensureLevel","distribution","_getDistribution","_generateMap","_placeNodesByHierarchy","_condenseHierarchy","stillShifting","branches","shiftTrees","treeSizes","getTreeSizes","shiftBy","shiftTree","treeWidths","numTrees","getBranchNodes","getBranchBoundary","branchMap","maxLevel","minSpace","maxSpace","branchNode","getPosition","_getSpaceAroundNode","minSpaceNode","maxSpaceNode","getCollisionLevel","maxLevel1","getMaxLevel","maxLevel2","shiftElementsCloser","centerParents","hier","levelNodes","hasSameParent","inSameSubNetwork","branchShiftCallback","centerParent","diffAbs","branchNodes1","branchNodes2","branchNodeBoundary1","branchNodeBoundary2","max1","min2","minSpace2","diffBranch","_shiftBlock","_centerParent","minimizeEdgeLength","allEdges","nodeLevel","C2","referenceNodes","aboveEdges","getFx","sum","getDFx","getGuess","guess","guessMap","dfx","ratio","moveBranch","branchNodes","branchBoundary","minSpaceBranch","maxSpaceBranch","branchOffset","moveNode","newPosition","minimizeEdgeLengthBottomUp","getLevels","shiftBranchesCloserBottomUp","centerAllParentsBottomUp","centerAllParents","useMap","prevNode","prevPos","nextNode","nextPos","parents","parentId","_getCenterPosition","positionedNodes","_indexArrayToNodes","handledNodeCount","_validatePositionAndContinue","parentLevel","childRef","childNodeLevel","previousPos","sharedParent","_findCommonParent","withChild","_placeBranchNodes","fix","hubSizes","hubSize","_getActiveEdges","levelDownstream","_this6","_getHubSizes","_crawlNetwork","customCallback","levelA","_this7","setMinLevelToZero","isBidirectional","_this8","otherEdge","levelB","_this9","addRelation","checkIfTree","startingNodeId","crawler","tree","_this10","setTreeIndex","shifter","_this11","childA","childB","iterateParents","parentRef","_this12","findParent","foundParent","isVertical","minPos","maxPos","ManipulationSystem","editMode","manipulationDiv","editModeDiv","closeDiv","manipulationHammers","temporaryUIFunctions","temporaryEventFunctions","temporaryIds","guiEnabled","inMode","selectedControlNode","initiallyActive","deleteNode","deleteEdge","controlNodeStyle","_clean","_restore","enableEditMode","disableEditMode","_setup","showManipulatorToolbar","_createEditButton","manipulationDOM","selectedNodeCount","_getSelectedNodeCount","selectedEdgeCount","_getSelectedEdgeCount","needSeperator","_createAddNodeButton","_createSeperator","_createAddEdgeButton","_createEditNodeButton","_createEditEdgeButton","selectedTotalCount","_createDeleteButton","_bindHammerToDiv","toggleEditMode","_temporaryBindEvent","_createBackButton","_createDescription","_performAddNode","_getSelectedNode","finalizedData","alert","_temporaryBindUI","_handleConnect","_finishConnect","_dragControlNode","_dragStartEdge","editWithoutDrag","edgeBeingEditedId","_performEditEdge","controlNodeFrom","_getNewTargetNode","controlNodeTo","_controlNodeTouch","_controlNodeDragStart","_controlNodeDrag","_controlNodeDragEnd","findBorderPositions","selectedNodes","selectedEdges","deleteFunction","_createWrappers","_removeManipulationDOM","button","_createButton","_cleanManipulatorHammers","_cleanupTemporaryNodesAndEdges","_unbindTemporaryUIs","_unbindTemporaryEvents","addNodeMode","addEdgeMode","editEdgeMode","deleteBtnClass","rtl","deleteSelected","labelClassName","newFunction","boundFunction","UIfunctionName","functionName","eventName","domElement","indexTempEdge","indexTempNode","lastTouch","fromSelect","toSelect","overlappingNodeIds","targetNode","connectionEdge","connectFromId","_performAddEdge","clickData","defaultData","sourceNodeId","targetNodeId","eeFunct","htmlColors","black","navy","darkblue","mediumblue","darkgreen","teal","darkcyan","deepskyblue","darkturquoise","mediumspringgreen","lime","springgreen","aqua","cyan","midnightblue","dodgerblue","lightseagreen","forestgreen","seagreen","darkslategray","limegreen","mediumseagreen","turquoise","royalblue","steelblue","darkslateblue","mediumturquoise","indigo","darkolivegreen","cadetblue","cornflowerblue","mediumaquamarine","dimgray","slateblue","olivedrab","slategray","lightslategray","mediumslateblue","lawngreen","chartreuse","aquamarine","maroon","purple","olive","gray","skyblue","lightskyblue","blueviolet","darkred","darkmagenta","saddlebrown","darkseagreen","lightgreen","mediumpurple","darkviolet","palegreen","darkorchid","yellowgreen","sienna","brown","darkgray","lightblue","greenyellow","paleturquoise","lightsteelblue","powderblue","firebrick","darkgoldenrod","mediumorchid","rosybrown","darkkhaki","silver","mediumvioletred","indianred","peru","chocolate","tan","lightgrey","palevioletred","thistle","orchid","goldenrod","crimson","gainsboro","plum","burlywood","lightcyan","lavender","darksalmon","violet","palegoldenrod","lightcoral","khaki","aliceblue","honeydew","azure","sandybrown","wheat","beige","whitesmoke","mintcream","ghostwhite","salmon","antiquewhite","linen","lightgoldenrodyellow","oldlace","fuchsia","magenta","deeppink","orangered","tomato","hotpink","coral","darkorange","lightsalmon","orange","lightpink","pink","gold","peachpuff","navajowhite","moccasin","bisque","mistyrose","blanchedalmond","papayawhip","lavenderblush","seashell","cornsilk","lemonchiffon","floralwhite","snow","yellow","lightyellow","ivory","white","ColorPicker","generated","centerCoordinates","hueCircle","initialColor","previousColor","applied","updateCallback","closeCallback","_create","_setSize","setInitial","htmlColor","_isColorString","rgbaArray","rgbObj","alpha","_setColor","_generateHueCircle","storePrevious","_updatePicker","setColor","angleConvert","colorPickerSelector","colorPickerCanvas","pixelRation","putImageData","brightnessRange","opacityRange","initialColorDiv","newColorDiv","colorPickerDiv","opacityDiv","brightnessDiv","arrowDiv","onchange","_setOpacity","oninput","_setBrightness","brightnessLabel","opacityLabel","cancelButton","onclick","applyButton","_apply","saveButton","_save","loadButton","_loadLast","_moveSelector","hue","sat","sfac","getImageData","newTop","newLeft","Configurator","parentModule","defaultContainer","configureOptions","changedOptions","allowCreation","popupCounter","showButton","moduleOptions","domElements","popupDiv","popupLimit","popupHistory","colorPicker","wrapper","_removePopup","_handleObject","_makeItem","_makeHeader","_makeButton","_push","_showPopupIfNeeded","div","objectLabel","selectedValue","_update","_makeLabel","step","popupString","popupValue","itemIndex","_setupPopup","generateButton","_printOptions","onmouseover","onmouseout","optionsContainer","html","hideTimeout","deleteTimeout","correspondingElement","checkbox","checked","_showColorPicker","insertTo","setUpdateCallback","colorString","setCloseCallback","checkOnly","visibleInSet","subObj","newPath","_getValue","_handleArray","_makeTextInput","_makeCheckbox","enabledPath","enabledValue","_makeColorField","_makeDropdown","_makeRange","_constructOptions","getOptions","bool","any","endPoints","configure","boolean","maximum","interaction","manipulation","minimum","clickToUse","FloydWarshall","edgesArray","D_matrix","cell","knode","kcolm","inode","icolm","jnode","jcolm","KamadaKawai","edgeStrength","distanceSolver","ignoreClusters","getDistances","_createL_matrix","_createK_matrix","_createE_matrix","maxIterations","maxEnergy","highE_nodeId","dE_dx","dE_dy","delta_m","subIterations","_getHighestEnergyNode","_moveNode","_getEnergy","maxEnergyNodeId","dE_dx_max","dE_dy_max","nodeIdx","E_sums","d2E_dx2","d2E_dxdy","d2E_dy2","x_m","y_m","km","K_matrix","lm","L_matrix","iIdx","x_i","y_i","kmat","lmat","_updateE_matrix","E_matrix","mIdx","colm","lcolm","oldDx","oldDy","Network","interactionHandler","renderer","nodesHandler","edgesHandler","validate","configurator","networkOptions","setModuleOptions","activator","_updateVisibleIndices","isVisible","_updateValueRange","dotparser","gephi","gephiData","gephiParser","valueMin","valueMax","valueTotal","setValueRange","isActive","cluster","getNodesInCluster","clusterByHubsize","getSeed","editNodeMode","getPositions","storePositions","getBoundingBox","getConnectedNodes","objectId","getConnectedEdges","selectNodes","selectEdges","redraw","getScale","getOptionsFromConfigurator","JSONcontainer","elementType","redundant","used","prepareElements","cleanupElements","svgContainer","createElementNS","DOMContainer","insertBefore","groupTemplate","labelObj","getSVGElement","setAttributeNS","xOffset","yOffset","textContent","require","network","convertDot","convertGephi"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;GAAA,GAAIA,CAAAA,cAAc,CAAyB,WAAtB,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AAA,CAAI,CAAGgQ,CAAQ,CAAChQ,IAATgQ,CAAc5jB,CAAd4jB,CAAmB,MAAnBA,WACG,CAAC,CAARhQ,CAAAA,CAAI,CAAQ,UAAR,CACI,CAAC,CAARA,CAAAA,CAAI,CAAQ,UAAR,CACG,CAAPA,CAAAA,CAAI,CAAO,SAAP,CACG,CAAPA,CAAAA,CAAI,CAAO,SAAP,CACG,CAAPA,CAAAA,CAAI,CAAO,SAAP,CACG,CAAPA,CAAAA,CAAI,CAAO,UAAP,CAAoB,YAu3CpC5Z,CAAK,CAAC9c,SAAN8c,CAA8BxN,GAG9BwN,CAAK,CAAC6pB,SAAN7pB,CAAkB,CACd8pB,cAAc,CAAE,kBADF,CAEdC,sBAAsB,CAAE,qBAFV,CAGdC,iBAAiB,CAAE,yBAHL,CAId3J,IAAI,CAAE,YAJQ,CAKd4J,IAAI,CAAE,OALQ,CAMdC,YAAY,CAAE,UANA,CAOdC,OAAO,CAAE,cAPK,CAQdC,IAAI,CAAE,YARQ,CASdhK,KAAK,CAAE,SATO,EAYXpgB,CAr/IT,aCAY,CAAsB,WAAlB,QAAOxiB,CAAAA,MAAP,EAAkCA,MAAM,OAAxC,EAAsD+wD,6ECe3D46D,OAAO,CAAG,CACrBh4D,MAAM,CAANA,MADqB,CAErBq1D,SAAS,CAATA,WAFqB,CAGrBG,WAAW,CAAXA,WAHqB,CAIrBliD,UAAU,CAAVA,YAJqB,CAKrB2kD,UAAU,CAAE5C,YALS,CAMrB6C,YAAY,CAAEt9D,UANO"} \ No newline at end of file diff --git a/node_modules/vis-network/dist/vis-network.js b/node_modules/vis-network/dist/vis-network.js new file mode 100644 index 0000000000000000000000000000000000000000..12986a691f26ae4f57f8771e1b6aba5786b15a29 --- /dev/null +++ b/node_modules/vis-network/dist/vis-network.js @@ -0,0 +1,52836 @@ +/** + * vis-network - network + * http://visjs.org/ + * + * A dynamic, browser-based visualization library. + * + * @version 5.2.4 + * @date 2019-08-18T08:11:56Z + * + * @copyright (c) 2011-2017 Almende B.V, http://almende.com + * @copyright (c) 2018-2019 visjs contributors, https://github.com/visjs + * + * @license + * vis.js is dual licensed under both + * + * 1. The Apache 2.0 License + * http://www.apache.org/licenses/LICENSE-2.0 + * + * and + * + * 2. The MIT License + * http://opensource.org/licenses/MIT + * + * vis.js may be distributed under either license. + */ +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : + typeof define === 'function' && define.amd ? define(['exports'], factory) : + (global = global || self, factory(global.vis = global.vis || {})); +}(this, function (exports) { 'use strict'; + + var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; + + function commonjsRequire() { + throw new Error('Dynamic requires are not currently supported by rollup-plugin-commonjs'); + } + + function createCommonjsModule(fn, module) { + return module = { + exports: {} + }, fn(module, module.exports), module.exports; + } + + var _global = createCommonjsModule(function (module) { + // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 + var global = module.exports = typeof window != 'undefined' && window.Math == Math ? window : typeof self != 'undefined' && self.Math == Math ? self // eslint-disable-next-line no-new-func + : Function('return this')(); + if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef + }); + + var _core = createCommonjsModule(function (module) { + var core = module.exports = { + version: '2.6.9' + }; + if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef + }); + + var _core_1 = _core.version; + var _library = false; + + var _shared = createCommonjsModule(function (module) { + var SHARED = '__core-js_shared__'; + var store = _global[SHARED] || (_global[SHARED] = {}); + (module.exports = function (key, value) { + return store[key] || (store[key] = value !== undefined ? value : {}); + })('versions', []).push({ + version: _core.version, + mode: 'global', + copyright: '© 2019 Denis Pushkarev (zloirock.ru)' + }); + }); + + var id = 0; + var px = Math.random(); + + var _uid = function (key) { + return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36)); + }; + + var _wks = createCommonjsModule(function (module) { + var store = _shared('wks'); + + var Symbol = _global.Symbol; + var USE_SYMBOL = typeof Symbol == 'function'; + + var $exports = module.exports = function (name) { + return store[name] || (store[name] = USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : _uid)('Symbol.' + name)); + }; + + $exports.store = store; + }); + + var f = _wks; + var _wksExt = { + f: f + }; + + var _isObject = function (it) { + return typeof it === 'object' ? it !== null : typeof it === 'function'; + }; + + var _anObject = function (it) { + if (!_isObject(it)) throw TypeError(it + ' is not an object!'); + return it; + }; + + var _fails = function (exec) { + try { + return !!exec(); + } catch (e) { + return true; + } + }; + + var _descriptors = !_fails(function () { + return Object.defineProperty({}, 'a', { + get: function () { + return 7; + } + }).a != 7; + }); + + var document$1 = _global.document; // typeof document.createElement is 'object' in old IE + + var is = _isObject(document$1) && _isObject(document$1.createElement); + + var _domCreate = function (it) { + return is ? document$1.createElement(it) : {}; + }; + + var _ie8DomDefine = !_descriptors && !_fails(function () { + return Object.defineProperty(_domCreate('div'), 'a', { + get: function () { + return 7; + } + }).a != 7; + }); // instead of the ES6 spec version, we didn't implement @@toPrimitive case + // and the second argument - flag - preferred type is a string + + + var _toPrimitive = function (it, S) { + if (!_isObject(it)) return it; + var fn, val; + if (S && typeof (fn = it.toString) == 'function' && !_isObject(val = fn.call(it))) return val; + if (typeof (fn = it.valueOf) == 'function' && !_isObject(val = fn.call(it))) return val; + if (!S && typeof (fn = it.toString) == 'function' && !_isObject(val = fn.call(it))) return val; + throw TypeError("Can't convert object to primitive value"); + }; + + var dP = Object.defineProperty; + var f$1 = _descriptors ? Object.defineProperty : function defineProperty(O, P, Attributes) { + _anObject(O); + + P = _toPrimitive(P, true); + + _anObject(Attributes); + + if (_ie8DomDefine) try { + return dP(O, P, Attributes); + } catch (e) { + /* empty */ + } + if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!'); + if ('value' in Attributes) O[P] = Attributes.value; + return O; + }; + var _objectDp = { + f: f$1 + }; + var defineProperty = _objectDp.f; + + var _wksDefine = function (name) { + var $Symbol = _core.Symbol || (_core.Symbol = _global.Symbol || {}); + if (name.charAt(0) != '_' && !(name in $Symbol)) defineProperty($Symbol, name, { + value: _wksExt.f(name) + }); + }; + + _wksDefine('asyncIterator'); + + var hasOwnProperty = {}.hasOwnProperty; + + var _has = function (it, key) { + return hasOwnProperty.call(it, key); + }; + + var _propertyDesc = function (bitmap, value) { + return { + enumerable: !(bitmap & 1), + configurable: !(bitmap & 2), + writable: !(bitmap & 4), + value: value + }; + }; + + var _hide = _descriptors ? function (object, key, value) { + return _objectDp.f(object, key, _propertyDesc(1, value)); + } : function (object, key, value) { + object[key] = value; + return object; + }; + + var _functionToString = _shared('native-function-to-string', Function.toString); + + var _redefine = createCommonjsModule(function (module) { + var SRC = _uid('src'); + + var TO_STRING = 'toString'; + + var TPL = ('' + _functionToString).split(TO_STRING); + + _core.inspectSource = function (it) { + return _functionToString.call(it); + }; + + (module.exports = function (O, key, val, safe) { + var isFunction = typeof val == 'function'; + if (isFunction) _has(val, 'name') || _hide(val, 'name', key); + if (O[key] === val) return; + if (isFunction) _has(val, SRC) || _hide(val, SRC, O[key] ? '' + O[key] : TPL.join(String(key))); + + if (O === _global) { + O[key] = val; + } else if (!safe) { + delete O[key]; + + _hide(O, key, val); + } else if (O[key]) { + O[key] = val; + } else { + _hide(O, key, val); + } // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative + + })(Function.prototype, TO_STRING, function toString() { + return typeof this == 'function' && this[SRC] || _functionToString.call(this); + }); + }); + + var _aFunction = function (it) { + if (typeof it != 'function') throw TypeError(it + ' is not a function!'); + return it; + }; + + var _ctx = function (fn, that, length) { + _aFunction(fn); + + if (that === undefined) return fn; + + switch (length) { + case 1: + return function (a) { + return fn.call(that, a); + }; + + case 2: + return function (a, b) { + return fn.call(that, a, b); + }; + + case 3: + return function (a, b, c) { + return fn.call(that, a, b, c); + }; + } + + return function () + /* ...args */ + { + return fn.apply(that, arguments); + }; + }; + + var PROTOTYPE = 'prototype'; + + var $export = function (type, name, source) { + var IS_FORCED = type & $export.F; + var IS_GLOBAL = type & $export.G; + var IS_STATIC = type & $export.S; + var IS_PROTO = type & $export.P; + var IS_BIND = type & $export.B; + var target = IS_GLOBAL ? _global : IS_STATIC ? _global[name] || (_global[name] = {}) : (_global[name] || {})[PROTOTYPE]; + var exports = IS_GLOBAL ? _core : _core[name] || (_core[name] = {}); + var expProto = exports[PROTOTYPE] || (exports[PROTOTYPE] = {}); + var key, own, out, exp; + if (IS_GLOBAL) source = name; + + for (key in source) { + // contains in native + own = !IS_FORCED && target && target[key] !== undefined; // export native or passed + + out = (own ? target : source)[key]; // bind timers to global for call from export context + + exp = IS_BIND && own ? _ctx(out, _global) : IS_PROTO && typeof out == 'function' ? _ctx(Function.call, out) : out; // extend global + + if (target) _redefine(target, key, out, type & $export.U); // export + + if (exports[key] != out) _hide(exports, key, exp); + if (IS_PROTO && expProto[key] != out) expProto[key] = out; + } + }; + + _global.core = _core; // type bitmap + + $export.F = 1; // forced + + $export.G = 2; // global + + $export.S = 4; // static + + $export.P = 8; // proto + + $export.B = 16; // bind + + $export.W = 32; // wrap + + $export.U = 64; // safe + + $export.R = 128; // real proto method for `library` + + var _export = $export; + + var _meta = createCommonjsModule(function (module) { + var META = _uid('meta'); + + var setDesc = _objectDp.f; + var id = 0; + + var isExtensible = Object.isExtensible || function () { + return true; + }; + + var FREEZE = !_fails(function () { + return isExtensible(Object.preventExtensions({})); + }); + + var setMeta = function (it) { + setDesc(it, META, { + value: { + i: 'O' + ++id, + // object ID + w: {} // weak collections IDs + + } + }); + }; + + var fastKey = function (it, create) { + // return primitive with prefix + if (!_isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it; + + if (!_has(it, META)) { + // can't set metadata to uncaught frozen object + if (!isExtensible(it)) return 'F'; // not necessary to add metadata + + if (!create) return 'E'; // add missing metadata + + setMeta(it); // return object ID + } + + return it[META].i; + }; + + var getWeak = function (it, create) { + if (!_has(it, META)) { + // can't set metadata to uncaught frozen object + if (!isExtensible(it)) return true; // not necessary to add metadata + + if (!create) return false; // add missing metadata + + setMeta(it); // return hash weak collections IDs + } + + return it[META].w; + }; // add metadata on freeze-family methods calling + + + var onFreeze = function (it) { + if (FREEZE && meta.NEED && isExtensible(it) && !_has(it, META)) setMeta(it); + return it; + }; + + var meta = module.exports = { + KEY: META, + NEED: false, + fastKey: fastKey, + getWeak: getWeak, + onFreeze: onFreeze + }; + }); + + var _meta_1 = _meta.KEY; + var _meta_2 = _meta.NEED; + var _meta_3 = _meta.fastKey; + var _meta_4 = _meta.getWeak; + var _meta_5 = _meta.onFreeze; + var def = _objectDp.f; + + var TAG = _wks('toStringTag'); + + var _setToStringTag = function (it, tag, stat) { + if (it && !_has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { + configurable: true, + value: tag + }); + }; + + var toString = {}.toString; + + var _cof = function (it) { + return toString.call(it).slice(8, -1); + }; // eslint-disable-next-line no-prototype-builtins + + + var _iobject = Object('z').propertyIsEnumerable(0) ? Object : function (it) { + return _cof(it) == 'String' ? it.split('') : Object(it); + }; // 7.2.1 RequireObjectCoercible(argument) + + + var _defined = function (it) { + if (it == undefined) throw TypeError("Can't call method on " + it); + return it; + }; + + var _toIobject = function (it) { + return _iobject(_defined(it)); + }; // 7.1.4 ToInteger + + + var ceil = Math.ceil; + var floor = Math.floor; + + var _toInteger = function (it) { + return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it); + }; + + var min = Math.min; + + var _toLength = function (it) { + return it > 0 ? min(_toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991 + }; + + var max = Math.max; + var min$1 = Math.min; + + var _toAbsoluteIndex = function (index, length) { + index = _toInteger(index); + return index < 0 ? max(index + length, 0) : min$1(index, length); + }; // true -> Array#includes + + + var _arrayIncludes = function (IS_INCLUDES) { + return function ($this, el, fromIndex) { + var O = _toIobject($this); + + var length = _toLength(O.length); + + var index = _toAbsoluteIndex(fromIndex, length); + + var value; // Array#includes uses SameValueZero equality algorithm + // eslint-disable-next-line no-self-compare + + if (IS_INCLUDES && el != el) while (length > index) { + value = O[index++]; // eslint-disable-next-line no-self-compare + + if (value != value) return true; // Array#indexOf ignores holes, Array#includes - not + } else for (; length > index; index++) if (IS_INCLUDES || index in O) { + if (O[index] === el) return IS_INCLUDES || index || 0; + } + return !IS_INCLUDES && -1; + }; + }; + + var shared = _shared('keys'); + + var _sharedKey = function (key) { + return shared[key] || (shared[key] = _uid(key)); + }; + + var arrayIndexOf = _arrayIncludes(false); + + var IE_PROTO = _sharedKey('IE_PROTO'); + + var _objectKeysInternal = function (object, names) { + var O = _toIobject(object); + + var i = 0; + var result = []; + var key; + + for (key in O) if (key != IE_PROTO) _has(O, key) && result.push(key); // Don't enum bug & hidden keys + + + while (names.length > i) if (_has(O, key = names[i++])) { + ~arrayIndexOf(result, key) || result.push(key); + } + + return result; + }; // IE 8- don't enum bug keys + + + var _enumBugKeys = 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'.split(','); + + var _objectKeys = Object.keys || function keys(O) { + return _objectKeysInternal(O, _enumBugKeys); + }; + + var f$2 = Object.getOwnPropertySymbols; + var _objectGops = { + f: f$2 + }; + var f$3 = {}.propertyIsEnumerable; + var _objectPie = { + f: f$3 + }; + + var _enumKeys = function (it) { + var result = _objectKeys(it); + + var getSymbols = _objectGops.f; + + if (getSymbols) { + var symbols = getSymbols(it); + var isEnum = _objectPie.f; + var i = 0; + var key; + + while (symbols.length > i) if (isEnum.call(it, key = symbols[i++])) result.push(key); + } + + return result; + }; + + var _isArray = Array.isArray || function isArray(arg) { + return _cof(arg) == 'Array'; + }; + + var _toObject = function (it) { + return Object(_defined(it)); + }; + + var _objectDps = _descriptors ? Object.defineProperties : function defineProperties(O, Properties) { + _anObject(O); + + var keys = _objectKeys(Properties); + + var length = keys.length; + var i = 0; + var P; + + while (length > i) _objectDp.f(O, P = keys[i++], Properties[P]); + + return O; + }; + + var document$2 = _global.document; + + var _html = document$2 && document$2.documentElement; + + var IE_PROTO$1 = _sharedKey('IE_PROTO'); + + var Empty = function () { + /* empty */ + }; + + var PROTOTYPE$1 = 'prototype'; // Create object with fake `null` prototype: use iframe Object with cleared prototype + + var createDict = function () { + // Thrash, waste and sodomy: IE GC bug + var iframe = _domCreate('iframe'); + + var i = _enumBugKeys.length; + var lt = '<'; + var gt = '>'; + var iframeDocument; + iframe.style.display = 'none'; + + _html.appendChild(iframe); + + iframe.src = 'javascript:'; // eslint-disable-line no-script-url + // createDict = iframe.contentWindow.Object; + // html.removeChild(iframe); + + iframeDocument = iframe.contentWindow.document; + iframeDocument.open(); + iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt); + iframeDocument.close(); + createDict = iframeDocument.F; + + while (i--) delete createDict[PROTOTYPE$1][_enumBugKeys[i]]; + + return createDict(); + }; + + var _objectCreate = Object.create || function create(O, Properties) { + var result; + + if (O !== null) { + Empty[PROTOTYPE$1] = _anObject(O); + result = new Empty(); + Empty[PROTOTYPE$1] = null; // add "__proto__" for Object.getPrototypeOf polyfill + + result[IE_PROTO$1] = O; + } else result = createDict(); + + return Properties === undefined ? result : _objectDps(result, Properties); + }; + + var hiddenKeys = _enumBugKeys.concat('length', 'prototype'); + + var f$4 = Object.getOwnPropertyNames || function getOwnPropertyNames(O) { + return _objectKeysInternal(O, hiddenKeys); + }; + + var _objectGopn = { + f: f$4 + }; + var gOPN = _objectGopn.f; + var toString$1 = {}.toString; + var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames ? Object.getOwnPropertyNames(window) : []; + + var getWindowNames = function (it) { + try { + return gOPN(it); + } catch (e) { + return windowNames.slice(); + } + }; + + var f$5 = function getOwnPropertyNames(it) { + return windowNames && toString$1.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(_toIobject(it)); + }; + + var _objectGopnExt = { + f: f$5 + }; + var gOPD = Object.getOwnPropertyDescriptor; + var f$6 = _descriptors ? gOPD : function getOwnPropertyDescriptor(O, P) { + O = _toIobject(O); + P = _toPrimitive(P, true); + if (_ie8DomDefine) try { + return gOPD(O, P); + } catch (e) { + /* empty */ + } + if (_has(O, P)) return _propertyDesc(!_objectPie.f.call(O, P), O[P]); + }; + var _objectGopd = { + f: f$6 + }; + var META = _meta.KEY; + var gOPD$1 = _objectGopd.f; + var dP$1 = _objectDp.f; + var gOPN$1 = _objectGopnExt.f; + var $Symbol = _global.Symbol; + var $JSON = _global.JSON; + + var _stringify = $JSON && $JSON.stringify; + + var PROTOTYPE$2 = 'prototype'; + + var HIDDEN = _wks('_hidden'); + + var TO_PRIMITIVE = _wks('toPrimitive'); + + var isEnum = {}.propertyIsEnumerable; + + var SymbolRegistry = _shared('symbol-registry'); + + var AllSymbols = _shared('symbols'); + + var OPSymbols = _shared('op-symbols'); + + var ObjectProto = Object[PROTOTYPE$2]; + var USE_NATIVE = typeof $Symbol == 'function' && !!_objectGops.f; + var QObject = _global.QObject; // Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173 + + var setter = !QObject || !QObject[PROTOTYPE$2] || !QObject[PROTOTYPE$2].findChild; // fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687 + + var setSymbolDesc = _descriptors && _fails(function () { + return _objectCreate(dP$1({}, 'a', { + get: function () { + return dP$1(this, 'a', { + value: 7 + }).a; + } + })).a != 7; + }) ? function (it, key, D) { + var protoDesc = gOPD$1(ObjectProto, key); + if (protoDesc) delete ObjectProto[key]; + dP$1(it, key, D); + if (protoDesc && it !== ObjectProto) dP$1(ObjectProto, key, protoDesc); + } : dP$1; + + var wrap = function (tag) { + var sym = AllSymbols[tag] = _objectCreate($Symbol[PROTOTYPE$2]); + + sym._k = tag; + return sym; + }; + + var isSymbol = USE_NATIVE && typeof $Symbol.iterator == 'symbol' ? function (it) { + return typeof it == 'symbol'; + } : function (it) { + return it instanceof $Symbol; + }; + + var $defineProperty = function defineProperty(it, key, D) { + if (it === ObjectProto) $defineProperty(OPSymbols, key, D); + + _anObject(it); + + key = _toPrimitive(key, true); + + _anObject(D); + + if (_has(AllSymbols, key)) { + if (!D.enumerable) { + if (!_has(it, HIDDEN)) dP$1(it, HIDDEN, _propertyDesc(1, {})); + it[HIDDEN][key] = true; + } else { + if (_has(it, HIDDEN) && it[HIDDEN][key]) it[HIDDEN][key] = false; + D = _objectCreate(D, { + enumerable: _propertyDesc(0, false) + }); + } + + return setSymbolDesc(it, key, D); + } + + return dP$1(it, key, D); + }; + + var $defineProperties = function defineProperties(it, P) { + _anObject(it); + + var keys = _enumKeys(P = _toIobject(P)); + + var i = 0; + var l = keys.length; + var key; + + while (l > i) $defineProperty(it, key = keys[i++], P[key]); + + return it; + }; + + var $create = function create(it, P) { + return P === undefined ? _objectCreate(it) : $defineProperties(_objectCreate(it), P); + }; + + var $propertyIsEnumerable = function propertyIsEnumerable(key) { + var E = isEnum.call(this, key = _toPrimitive(key, true)); + if (this === ObjectProto && _has(AllSymbols, key) && !_has(OPSymbols, key)) return false; + return E || !_has(this, key) || !_has(AllSymbols, key) || _has(this, HIDDEN) && this[HIDDEN][key] ? E : true; + }; + + var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key) { + it = _toIobject(it); + key = _toPrimitive(key, true); + if (it === ObjectProto && _has(AllSymbols, key) && !_has(OPSymbols, key)) return; + var D = gOPD$1(it, key); + if (D && _has(AllSymbols, key) && !(_has(it, HIDDEN) && it[HIDDEN][key])) D.enumerable = true; + return D; + }; + + var $getOwnPropertyNames = function getOwnPropertyNames(it) { + var names = gOPN$1(_toIobject(it)); + var result = []; + var i = 0; + var key; + + while (names.length > i) { + if (!_has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META) result.push(key); + } + + return result; + }; + + var $getOwnPropertySymbols = function getOwnPropertySymbols(it) { + var IS_OP = it === ObjectProto; + var names = gOPN$1(IS_OP ? OPSymbols : _toIobject(it)); + var result = []; + var i = 0; + var key; + + while (names.length > i) { + if (_has(AllSymbols, key = names[i++]) && (IS_OP ? _has(ObjectProto, key) : true)) result.push(AllSymbols[key]); + } + + return result; + }; // 19.4.1.1 Symbol([description]) + + + if (!USE_NATIVE) { + $Symbol = function Symbol() { + if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor!'); + + var tag = _uid(arguments.length > 0 ? arguments[0] : undefined); + + var $set = function (value) { + if (this === ObjectProto) $set.call(OPSymbols, value); + if (_has(this, HIDDEN) && _has(this[HIDDEN], tag)) this[HIDDEN][tag] = false; + setSymbolDesc(this, tag, _propertyDesc(1, value)); + }; + + if (_descriptors && setter) setSymbolDesc(ObjectProto, tag, { + configurable: true, + set: $set + }); + return wrap(tag); + }; + + _redefine($Symbol[PROTOTYPE$2], 'toString', function toString() { + return this._k; + }); + + _objectGopd.f = $getOwnPropertyDescriptor; + _objectDp.f = $defineProperty; + _objectGopn.f = _objectGopnExt.f = $getOwnPropertyNames; + _objectPie.f = $propertyIsEnumerable; + _objectGops.f = $getOwnPropertySymbols; + + if (_descriptors && !_library) { + _redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true); + } + + _wksExt.f = function (name) { + return wrap(_wks(name)); + }; + } + + _export(_export.G + _export.W + _export.F * !USE_NATIVE, { + Symbol: $Symbol + }); + + for (var es6Symbols = // 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14 + 'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables'.split(','), j = 0; es6Symbols.length > j;) _wks(es6Symbols[j++]); + + for (var wellKnownSymbols = _objectKeys(_wks.store), k = 0; wellKnownSymbols.length > k;) _wksDefine(wellKnownSymbols[k++]); + + _export(_export.S + _export.F * !USE_NATIVE, 'Symbol', { + // 19.4.2.1 Symbol.for(key) + 'for': function (key) { + return _has(SymbolRegistry, key += '') ? SymbolRegistry[key] : SymbolRegistry[key] = $Symbol(key); + }, + // 19.4.2.5 Symbol.keyFor(sym) + keyFor: function keyFor(sym) { + if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol!'); + + for (var key in SymbolRegistry) if (SymbolRegistry[key] === sym) return key; + }, + useSetter: function () { + setter = true; + }, + useSimple: function () { + setter = false; + } + }); + + _export(_export.S + _export.F * !USE_NATIVE, 'Object', { + // 19.1.2.2 Object.create(O [, Properties]) + create: $create, + // 19.1.2.4 Object.defineProperty(O, P, Attributes) + defineProperty: $defineProperty, + // 19.1.2.3 Object.defineProperties(O, Properties) + defineProperties: $defineProperties, + // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P) + getOwnPropertyDescriptor: $getOwnPropertyDescriptor, + // 19.1.2.7 Object.getOwnPropertyNames(O) + getOwnPropertyNames: $getOwnPropertyNames, + // 19.1.2.8 Object.getOwnPropertySymbols(O) + getOwnPropertySymbols: $getOwnPropertySymbols + }); // Chrome 38 and 39 `Object.getOwnPropertySymbols` fails on primitives + // https://bugs.chromium.org/p/v8/issues/detail?id=3443 + + + var FAILS_ON_PRIMITIVES = _fails(function () { + _objectGops.f(1); + }); + + _export(_export.S + _export.F * FAILS_ON_PRIMITIVES, 'Object', { + getOwnPropertySymbols: function getOwnPropertySymbols(it) { + return _objectGops.f(_toObject(it)); + } + }); // 24.3.2 JSON.stringify(value [, replacer [, space]]) + + + $JSON && _export(_export.S + _export.F * (!USE_NATIVE || _fails(function () { + var S = $Symbol(); // MS Edge converts symbol values to JSON as {} + // WebKit converts symbol values to JSON as null + // V8 throws on boxed symbols + + return _stringify([S]) != '[null]' || _stringify({ + a: S + }) != '{}' || _stringify(Object(S)) != '{}'; + })), 'JSON', { + stringify: function stringify(it) { + var args = [it]; + var i = 1; + var replacer, $replacer; + + while (arguments.length > i) args.push(arguments[i++]); + + $replacer = replacer = args[1]; + if (!_isObject(replacer) && it === undefined || isSymbol(it)) return; // IE8 returns string on undefined + + if (!_isArray(replacer)) replacer = function (key, value) { + if (typeof $replacer == 'function') value = $replacer.call(this, key, value); + if (!isSymbol(value)) return value; + }; + args[1] = replacer; + return _stringify.apply($JSON, args); + } + }); // 19.4.3.4 Symbol.prototype[@@toPrimitive](hint) + + $Symbol[PROTOTYPE$2][TO_PRIMITIVE] || _hide($Symbol[PROTOTYPE$2], TO_PRIMITIVE, $Symbol[PROTOTYPE$2].valueOf); // 19.4.3.5 Symbol.prototype[@@toStringTag] + + _setToStringTag($Symbol, 'Symbol'); // 20.2.1.9 Math[@@toStringTag] + + + _setToStringTag(Math, 'Math', true); // 24.3.3 JSON[@@toStringTag] + + + _setToStringTag(_global.JSON, 'JSON', true); + + function _typeof(obj) { + if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { + _typeof = function (obj) { + return typeof obj; + }; + } else { + _typeof = function (obj) { + return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; + }; + } + + return _typeof(obj); + } + + function _defineProperty(obj, key, value) { + if (key in obj) { + Object.defineProperty(obj, key, { + value: value, + enumerable: true, + configurable: true, + writable: true + }); + } else { + obj[key] = value; + } + + return obj; + } + + function ownKeys(object, enumerableOnly) { + var keys = Object.keys(object); + + if (Object.getOwnPropertySymbols) { + keys.push.apply(keys, Object.getOwnPropertySymbols(object)); + } + + if (enumerableOnly) keys = keys.filter(function (sym) { + return Object.getOwnPropertyDescriptor(object, sym).enumerable; + }); + return keys; + } + + function _objectSpread2(target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i] != null ? arguments[i] : {}; + + if (i % 2) { + ownKeys(source, true).forEach(function (key) { + _defineProperty(target, key, source[key]); + }); + } else if (Object.getOwnPropertyDescriptors) { + Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); + } else { + ownKeys(source).forEach(function (key) { + Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); + }); + } + } + + return target; + } + + function _toConsumableArray(arr) { + return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); + } + + function _arrayWithoutHoles(arr) { + if (Array.isArray(arr)) { + for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) arr2[i] = arr[i]; + + return arr2; + } + } + + function _iterableToArray(iter) { + if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); + } + + function _nonIterableSpread() { + throw new TypeError("Invalid attempt to spread non-iterable instance"); + } + + var _objectSap = function (KEY, exec) { + var fn = (_core.Object || {})[KEY] || Object[KEY]; + var exp = {}; + exp[KEY] = exec(fn); + + _export(_export.S + _export.F * _fails(function () { + fn(1); + }), 'Object', exp); + }; + + _objectSap('keys', function () { + return function keys(it) { + return _objectKeys(_toObject(it)); + }; + }); + + var _flags = function () { + var that = _anObject(this); + + var result = ''; + if (that.global) result += 'g'; + if (that.ignoreCase) result += 'i'; + if (that.multiline) result += 'm'; + if (that.unicode) result += 'u'; + if (that.sticky) result += 'y'; + return result; + }; + + if (_descriptors && /./g.flags != 'g') _objectDp.f(RegExp.prototype, 'flags', { + configurable: true, + get: _flags + }); + var TO_STRING = 'toString'; + var $toString = /./[TO_STRING]; + + var define = function (fn) { + _redefine(RegExp.prototype, TO_STRING, fn, true); + }; // 21.2.5.14 RegExp.prototype.toString() + + + if (_fails(function () { + return $toString.call({ + source: 'a', + flags: 'b' + }) != '/a/b'; + })) { + define(function toString() { + var R = _anObject(this); + + return '/'.concat(R.source, '/', 'flags' in R ? R.flags : !_descriptors && R instanceof RegExp ? _flags.call(R) : undefined); + }); // FF44- RegExp#toString has a wrong name + } else if ($toString.name != TO_STRING) { + define(function toString() { + return $toString.call(this); + }); + } // false -> String#codePointAt + + + var _stringAt = function (TO_STRING) { + return function (that, pos) { + var s = String(_defined(that)); + + var i = _toInteger(pos); + + var l = s.length; + var a, b; + if (i < 0 || i >= l) return TO_STRING ? '' : undefined; + a = s.charCodeAt(i); + return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff ? TO_STRING ? s.charAt(i) : a : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000; + }; + }; + + var at = _stringAt(true); // `AdvanceStringIndex` abstract operation + // https://tc39.github.io/ecma262/#sec-advancestringindex + + + var _advanceStringIndex = function (S, index, unicode) { + return index + (unicode ? at(S, index).length : 1); + }; + + var TAG$1 = _wks('toStringTag'); // ES3 wrong here + + + var ARG = _cof(function () { + return arguments; + }()) == 'Arguments'; // fallback for IE11 Script Access Denied error + + var tryGet = function (it, key) { + try { + return it[key]; + } catch (e) { + /* empty */ + } + }; + + var _classof = function (it) { + var O, T, B; + return it === undefined ? 'Undefined' : it === null ? 'Null' // @@toStringTag case + : typeof (T = tryGet(O = Object(it), TAG$1)) == 'string' ? T // builtinTag case + : ARG ? _cof(O) // ES3 arguments fallback + : (B = _cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B; + }; + + var builtinExec = RegExp.prototype.exec; // `RegExpExec` abstract operation + // https://tc39.github.io/ecma262/#sec-regexpexec + + var _regexpExecAbstract = function (R, S) { + var exec = R.exec; + + if (typeof exec === 'function') { + var result = exec.call(R, S); + + if (typeof result !== 'object') { + throw new TypeError('RegExp exec method returned something other than an Object or null'); + } + + return result; + } + + if (_classof(R) !== 'RegExp') { + throw new TypeError('RegExp#exec called on incompatible receiver'); + } + + return builtinExec.call(R, S); + }; + + var nativeExec = RegExp.prototype.exec; // This always refers to the native implementation, because the + // String#replace polyfill uses ./fix-regexp-well-known-symbol-logic.js, + // which loads this file before patching the method. + + var nativeReplace = String.prototype.replace; + var patchedExec = nativeExec; + var LAST_INDEX = 'lastIndex'; + + var UPDATES_LAST_INDEX_WRONG = function () { + var re1 = /a/, + re2 = /b*/g; + nativeExec.call(re1, 'a'); + nativeExec.call(re2, 'a'); + return re1[LAST_INDEX] !== 0 || re2[LAST_INDEX] !== 0; + }(); // nonparticipating capturing group, copied from es5-shim's String#split patch. + + + var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined; + var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED; + + if (PATCH) { + patchedExec = function exec(str) { + var re = this; + var lastIndex, reCopy, match, i; + + if (NPCG_INCLUDED) { + reCopy = new RegExp('^' + re.source + '$(?!\\s)', _flags.call(re)); + } + + if (UPDATES_LAST_INDEX_WRONG) lastIndex = re[LAST_INDEX]; + match = nativeExec.call(re, str); + + if (UPDATES_LAST_INDEX_WRONG && match) { + re[LAST_INDEX] = re.global ? match.index + match[0].length : lastIndex; + } + + if (NPCG_INCLUDED && match && match.length > 1) { + // Fix browsers whose `exec` methods don't consistently return `undefined` + // for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/ + // eslint-disable-next-line no-loop-func + nativeReplace.call(match[0], reCopy, function () { + for (i = 1; i < arguments.length - 2; i++) { + if (arguments[i] === undefined) match[i] = undefined; + } + }); + } + + return match; + }; + } + + var _regexpExec = patchedExec; + + _export({ + target: 'RegExp', + proto: true, + forced: _regexpExec !== /./.exec + }, { + exec: _regexpExec + }); + + var SPECIES = _wks('species'); + + var REPLACE_SUPPORTS_NAMED_GROUPS = !_fails(function () { + // #replace needs built-in support for named groups. + // #match works fine because it just return the exec results, even if it has + // a "grops" property. + var re = /./; + + re.exec = function () { + var result = []; + result.groups = { + a: '7' + }; + return result; + }; + + return ''.replace(re, '$') !== '7'; + }); + + var SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = function () { + // Chrome 51 has a buggy "split" implementation when RegExp#exec !== nativeExec + var re = /(?:)/; + var originalExec = re.exec; + + re.exec = function () { + return originalExec.apply(this, arguments); + }; + + var result = 'ab'.split(re); + return result.length === 2 && result[0] === 'a' && result[1] === 'b'; + }(); + + var _fixReWks = function (KEY, length, exec) { + var SYMBOL = _wks(KEY); + + var DELEGATES_TO_SYMBOL = !_fails(function () { + // String methods call symbol-named RegEp methods + var O = {}; + + O[SYMBOL] = function () { + return 7; + }; + + return ''[KEY](O) != 7; + }); + var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL ? !_fails(function () { + // Symbol-named RegExp methods call .exec + var execCalled = false; + var re = /a/; + + re.exec = function () { + execCalled = true; + return null; + }; + + if (KEY === 'split') { + // RegExp[@@split] doesn't call the regex's exec method, but first creates + // a new one. We need to return the patched regex when creating the new one. + re.constructor = {}; + + re.constructor[SPECIES] = function () { + return re; + }; + } + + re[SYMBOL](''); + return !execCalled; + }) : undefined; + + if (!DELEGATES_TO_SYMBOL || !DELEGATES_TO_EXEC || KEY === 'replace' && !REPLACE_SUPPORTS_NAMED_GROUPS || KEY === 'split' && !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC) { + var nativeRegExpMethod = /./[SYMBOL]; + var fns = exec(_defined, SYMBOL, ''[KEY], function maybeCallNative(nativeMethod, regexp, str, arg2, forceStringMethod) { + if (regexp.exec === _regexpExec) { + if (DELEGATES_TO_SYMBOL && !forceStringMethod) { + // The native String method already delegates to @@method (this + // polyfilled function), leasing to infinite recursion. + // We avoid it by directly calling the native @@method method. + return { + done: true, + value: nativeRegExpMethod.call(regexp, str, arg2) + }; + } + + return { + done: true, + value: nativeMethod.call(str, regexp, arg2) + }; + } + + return { + done: false + }; + }); + var strfn = fns[0]; + var rxfn = fns[1]; + + _redefine(String.prototype, KEY, strfn); + + _hide(RegExp.prototype, SYMBOL, length == 2 // 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue) + // 21.2.5.11 RegExp.prototype[@@split](string, limit) + ? function (string, arg) { + return rxfn.call(string, this, arg); + } // 21.2.5.6 RegExp.prototype[@@match](string) + // 21.2.5.9 RegExp.prototype[@@search](string) + : function (string) { + return rxfn.call(string, this); + }); + } + }; + + var max$1 = Math.max; + var min$2 = Math.min; + var floor$1 = Math.floor; + var SUBSTITUTION_SYMBOLS = /\$([$&`']|\d\d?|<[^>]*>)/g; + var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&`']|\d\d?)/g; + + var maybeToString = function (it) { + return it === undefined ? it : String(it); + }; // @@replace logic + + + _fixReWks('replace', 2, function (defined, REPLACE, $replace, maybeCallNative) { + return [// `String.prototype.replace` method + // https://tc39.github.io/ecma262/#sec-string.prototype.replace + function replace(searchValue, replaceValue) { + var O = defined(this); + var fn = searchValue == undefined ? undefined : searchValue[REPLACE]; + return fn !== undefined ? fn.call(searchValue, O, replaceValue) : $replace.call(String(O), searchValue, replaceValue); + }, // `RegExp.prototype[@@replace]` method + // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@replace + function (regexp, replaceValue) { + var res = maybeCallNative($replace, regexp, this, replaceValue); + if (res.done) return res.value; + + var rx = _anObject(regexp); + + var S = String(this); + var functionalReplace = typeof replaceValue === 'function'; + if (!functionalReplace) replaceValue = String(replaceValue); + var global = rx.global; + + if (global) { + var fullUnicode = rx.unicode; + rx.lastIndex = 0; + } + + var results = []; + + while (true) { + var result = _regexpExecAbstract(rx, S); + + if (result === null) break; + results.push(result); + if (!global) break; + var matchStr = String(result[0]); + if (matchStr === '') rx.lastIndex = _advanceStringIndex(S, _toLength(rx.lastIndex), fullUnicode); + } + + var accumulatedResult = ''; + var nextSourcePosition = 0; + + for (var i = 0; i < results.length; i++) { + result = results[i]; + var matched = String(result[0]); + var position = max$1(min$2(_toInteger(result.index), S.length), 0); + var captures = []; // NOTE: This is equivalent to + // captures = result.slice(1).map(maybeToString) + // but for some reason `nativeSlice.call(result, 1, result.length)` (called in + // the slice polyfill when slicing native arrays) "doesn't work" in safari 9 and + // causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it. + + for (var j = 1; j < result.length; j++) captures.push(maybeToString(result[j])); + + var namedCaptures = result.groups; + + if (functionalReplace) { + var replacerArgs = [matched].concat(captures, position, S); + if (namedCaptures !== undefined) replacerArgs.push(namedCaptures); + var replacement = String(replaceValue.apply(undefined, replacerArgs)); + } else { + replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue); + } + + if (position >= nextSourcePosition) { + accumulatedResult += S.slice(nextSourcePosition, position) + replacement; + nextSourcePosition = position + matched.length; + } + } + + return accumulatedResult + S.slice(nextSourcePosition); + }]; // https://tc39.github.io/ecma262/#sec-getsubstitution + + function getSubstitution(matched, str, position, captures, namedCaptures, replacement) { + var tailPos = position + matched.length; + var m = captures.length; + var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED; + + if (namedCaptures !== undefined) { + namedCaptures = _toObject(namedCaptures); + symbols = SUBSTITUTION_SYMBOLS; + } + + return $replace.call(replacement, symbols, function (match, ch) { + var capture; + + switch (ch.charAt(0)) { + case '$': + return '$'; + + case '&': + return matched; + + case '`': + return str.slice(0, position); + + case "'": + return str.slice(tailPos); + + case '<': + capture = namedCaptures[ch.slice(1, -1)]; + break; + + default: + // \d\d? + var n = +ch; + if (n === 0) return match; + + if (n > m) { + var f = floor$1(n / 10); + if (f === 0) return match; + if (f <= m) return captures[f - 1] === undefined ? ch.charAt(1) : captures[f - 1] + ch.charAt(1); + return match; + } + + capture = captures[n - 1]; + } + + return capture === undefined ? '' : capture; + }); + } + }); + + var UNSCOPABLES = _wks('unscopables'); + + var ArrayProto = Array.prototype; + if (ArrayProto[UNSCOPABLES] == undefined) _hide(ArrayProto, UNSCOPABLES, {}); + + var _addToUnscopables = function (key) { + ArrayProto[UNSCOPABLES][key] = true; + }; + + var _iterStep = function (done, value) { + return { + value: value, + done: !!done + }; + }; + + var _iterators = {}; + var IteratorPrototype = {}; // 25.1.2.1.1 %IteratorPrototype%[@@iterator]() + + _hide(IteratorPrototype, _wks('iterator'), function () { + return this; + }); + + var _iterCreate = function (Constructor, NAME, next) { + Constructor.prototype = _objectCreate(IteratorPrototype, { + next: _propertyDesc(1, next) + }); + + _setToStringTag(Constructor, NAME + ' Iterator'); + }; + + var IE_PROTO$2 = _sharedKey('IE_PROTO'); + + var ObjectProto$1 = Object.prototype; + + var _objectGpo = Object.getPrototypeOf || function (O) { + O = _toObject(O); + if (_has(O, IE_PROTO$2)) return O[IE_PROTO$2]; + + if (typeof O.constructor == 'function' && O instanceof O.constructor) { + return O.constructor.prototype; + } + + return O instanceof Object ? ObjectProto$1 : null; + }; + + var ITERATOR = _wks('iterator'); + + var BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next` + + var FF_ITERATOR = '@@iterator'; + var KEYS = 'keys'; + var VALUES = 'values'; + + var returnThis = function () { + return this; + }; + + var _iterDefine = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) { + _iterCreate(Constructor, NAME, next); + + var getMethod = function (kind) { + if (!BUGGY && kind in proto) return proto[kind]; + + switch (kind) { + case KEYS: + return function keys() { + return new Constructor(this, kind); + }; + + case VALUES: + return function values() { + return new Constructor(this, kind); + }; + } + + return function entries() { + return new Constructor(this, kind); + }; + }; + + var TAG = NAME + ' Iterator'; + var DEF_VALUES = DEFAULT == VALUES; + var VALUES_BUG = false; + var proto = Base.prototype; + var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT]; + var $default = $native || getMethod(DEFAULT); + var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined; + var $anyNative = NAME == 'Array' ? proto.entries || $native : $native; + var methods, key, IteratorPrototype; // Fix native + + if ($anyNative) { + IteratorPrototype = _objectGpo($anyNative.call(new Base())); + + if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) { + // Set @@toStringTag to native iterators + _setToStringTag(IteratorPrototype, TAG, true); // fix for some old engines + + + if (typeof IteratorPrototype[ITERATOR] != 'function') _hide(IteratorPrototype, ITERATOR, returnThis); + } + } // fix Array#{values, @@iterator}.name in V8 / FF + + + if (DEF_VALUES && $native && $native.name !== VALUES) { + VALUES_BUG = true; + + $default = function values() { + return $native.call(this); + }; + } // Define iterator + + + if (BUGGY || VALUES_BUG || !proto[ITERATOR]) { + _hide(proto, ITERATOR, $default); + } // Plug for library + + + _iterators[NAME] = $default; + _iterators[TAG] = returnThis; + + if (DEFAULT) { + methods = { + values: DEF_VALUES ? $default : getMethod(VALUES), + keys: IS_SET ? $default : getMethod(KEYS), + entries: $entries + }; + if (FORCED) for (key in methods) { + if (!(key in proto)) _redefine(proto, key, methods[key]); + } else _export(_export.P + _export.F * (BUGGY || VALUES_BUG), NAME, methods); + } + + return methods; + }; // 22.1.3.13 Array.prototype.keys() + // 22.1.3.29 Array.prototype.values() + // 22.1.3.30 Array.prototype[@@iterator]() + + + var es6_array_iterator = _iterDefine(Array, 'Array', function (iterated, kind) { + this._t = _toIobject(iterated); // target + + this._i = 0; // next index + + this._k = kind; // kind + // 22.1.5.2.1 %ArrayIteratorPrototype%.next() + }, function () { + var O = this._t; + var kind = this._k; + var index = this._i++; + + if (!O || index >= O.length) { + this._t = undefined; + return _iterStep(1); + } + + if (kind == 'keys') return _iterStep(0, index); + if (kind == 'values') return _iterStep(0, O[index]); + return _iterStep(0, [index, O[index]]); + }, 'values'); // argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7) + + + _iterators.Arguments = _iterators.Array; + + _addToUnscopables('keys'); + + _addToUnscopables('values'); + + _addToUnscopables('entries'); + + var ITERATOR$1 = _wks('iterator'); + + var TO_STRING_TAG = _wks('toStringTag'); + + var ArrayValues = _iterators.Array; + var DOMIterables = { + CSSRuleList: true, + // TODO: Not spec compliant, should be false. + CSSStyleDeclaration: false, + CSSValueList: false, + ClientRectList: false, + DOMRectList: false, + DOMStringList: false, + DOMTokenList: true, + DataTransferItemList: false, + FileList: false, + HTMLAllCollection: false, + HTMLCollection: false, + HTMLFormElement: false, + HTMLSelectElement: false, + MediaList: true, + // TODO: Not spec compliant, should be false. + MimeTypeArray: false, + NamedNodeMap: false, + NodeList: true, + PaintRequestList: false, + Plugin: false, + PluginArray: false, + SVGLengthList: false, + SVGNumberList: false, + SVGPathSegList: false, + SVGPointList: false, + SVGStringList: false, + SVGTransformList: false, + SourceBufferList: false, + StyleSheetList: true, + // TODO: Not spec compliant, should be false. + TextTrackCueList: false, + TextTrackList: false, + TouchList: false + }; + + for (var collections = _objectKeys(DOMIterables), i = 0; i < collections.length; i++) { + var NAME = collections[i]; + var explicit = DOMIterables[NAME]; + var Collection = _global[NAME]; + var proto = Collection && Collection.prototype; + var key; + + if (proto) { + if (!proto[ITERATOR$1]) _hide(proto, ITERATOR$1, ArrayValues); + if (!proto[TO_STRING_TAG]) _hide(proto, TO_STRING_TAG, NAME); + _iterators[NAME] = ArrayValues; + if (explicit) for (key in es6_array_iterator) if (!proto[key]) _redefine(proto, key, es6_array_iterator[key], true); + } + } + + var test = {}; + test[_wks('toStringTag')] = 'z'; + + if (test + '' != '[object z]') { + _redefine(Object.prototype, 'toString', function toString() { + return '[object ' + _classof(this) + ']'; + }, true); + } + + var isEnum$1 = _objectPie.f; + + var _objectToArray = function (isEntries) { + return function (it) { + var O = _toIobject(it); + + var keys = _objectKeys(O); + + var length = keys.length; + var i = 0; + var result = []; + var key; + + while (length > i) { + key = keys[i++]; + + if (!_descriptors || isEnum$1.call(O, key)) { + result.push(isEntries ? [key, O[key]] : O[key]); + } + } + + return result; + }; + }; + + var $values = _objectToArray(false); + + _export(_export.S, 'Object', { + values: function values(it) { + return $values(it); + } + }); + + var MATCH = _wks('match'); + + var _isRegexp = function (it) { + var isRegExp; + return _isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : _cof(it) == 'RegExp'); + }; + + var SPECIES$1 = _wks('species'); + + var _speciesConstructor = function (O, D) { + var C = _anObject(O).constructor; + + var S; + return C === undefined || (S = _anObject(C)[SPECIES$1]) == undefined ? D : _aFunction(S); + }; + + var $min = Math.min; + var $push = [].push; + var $SPLIT = 'split'; + var LENGTH = 'length'; + var LAST_INDEX$1 = 'lastIndex'; + var MAX_UINT32 = 0xffffffff; // babel-minify transpiles RegExp('x', 'y') -> /x/y and it causes SyntaxError + + var SUPPORTS_Y = !_fails(function () { + RegExp(MAX_UINT32, 'y'); + }); // @@split logic + + _fixReWks('split', 2, function (defined, SPLIT, $split, maybeCallNative) { + var internalSplit; + + if ('abbc'[$SPLIT](/(b)*/)[1] == 'c' || 'test'[$SPLIT](/(?:)/, -1)[LENGTH] != 4 || 'ab'[$SPLIT](/(?:ab)*/)[LENGTH] != 2 || '.'[$SPLIT](/(.?)(.?)/)[LENGTH] != 4 || '.'[$SPLIT](/()()/)[LENGTH] > 1 || ''[$SPLIT](/.?/)[LENGTH]) { + // based on es5-shim implementation, need to rework it + internalSplit = function (separator, limit) { + var string = String(this); + if (separator === undefined && limit === 0) return []; // If `separator` is not a regex, use native split + + if (!_isRegexp(separator)) return $split.call(string, separator, limit); + var output = []; + var flags = (separator.ignoreCase ? 'i' : '') + (separator.multiline ? 'm' : '') + (separator.unicode ? 'u' : '') + (separator.sticky ? 'y' : ''); + var lastLastIndex = 0; + var splitLimit = limit === undefined ? MAX_UINT32 : limit >>> 0; // Make `global` and avoid `lastIndex` issues by working with a copy + + var separatorCopy = new RegExp(separator.source, flags + 'g'); + var match, lastIndex, lastLength; + + while (match = _regexpExec.call(separatorCopy, string)) { + lastIndex = separatorCopy[LAST_INDEX$1]; + + if (lastIndex > lastLastIndex) { + output.push(string.slice(lastLastIndex, match.index)); + if (match[LENGTH] > 1 && match.index < string[LENGTH]) $push.apply(output, match.slice(1)); + lastLength = match[0][LENGTH]; + lastLastIndex = lastIndex; + if (output[LENGTH] >= splitLimit) break; + } + + if (separatorCopy[LAST_INDEX$1] === match.index) separatorCopy[LAST_INDEX$1]++; // Avoid an infinite loop + } + + if (lastLastIndex === string[LENGTH]) { + if (lastLength || !separatorCopy.test('')) output.push(''); + } else output.push(string.slice(lastLastIndex)); + + return output[LENGTH] > splitLimit ? output.slice(0, splitLimit) : output; + }; // Chakra, V8 + + } else if ('0'[$SPLIT](undefined, 0)[LENGTH]) { + internalSplit = function (separator, limit) { + return separator === undefined && limit === 0 ? [] : $split.call(this, separator, limit); + }; + } else { + internalSplit = $split; + } + + return [// `String.prototype.split` method + // https://tc39.github.io/ecma262/#sec-string.prototype.split + function split(separator, limit) { + var O = defined(this); + var splitter = separator == undefined ? undefined : separator[SPLIT]; + return splitter !== undefined ? splitter.call(separator, O, limit) : internalSplit.call(String(O), separator, limit); + }, // `RegExp.prototype[@@split]` method + // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@split + // + // NOTE: This cannot be properly polyfilled in engines that don't support + // the 'y' flag. + function (regexp, limit) { + var res = maybeCallNative(internalSplit, regexp, this, limit, internalSplit !== $split); + if (res.done) return res.value; + + var rx = _anObject(regexp); + + var S = String(this); + + var C = _speciesConstructor(rx, RegExp); + + var unicodeMatching = rx.unicode; + var flags = (rx.ignoreCase ? 'i' : '') + (rx.multiline ? 'm' : '') + (rx.unicode ? 'u' : '') + (SUPPORTS_Y ? 'y' : 'g'); // ^(? + rx + ) is needed, in combination with some S slicing, to + // simulate the 'y' flag. + + var splitter = new C(SUPPORTS_Y ? rx : '^(?:' + rx.source + ')', flags); + var lim = limit === undefined ? MAX_UINT32 : limit >>> 0; + if (lim === 0) return []; + if (S.length === 0) return _regexpExecAbstract(splitter, S) === null ? [S] : []; + var p = 0; + var q = 0; + var A = []; + + while (q < S.length) { + splitter.lastIndex = SUPPORTS_Y ? q : 0; + + var z = _regexpExecAbstract(splitter, SUPPORTS_Y ? S : S.slice(q)); + + var e; + + if (z === null || (e = $min(_toLength(splitter.lastIndex + (SUPPORTS_Y ? 0 : q)), S.length)) === p) { + q = _advanceStringIndex(S, q, unicodeMatching); + } else { + A.push(S.slice(p, q)); + if (A.length === lim) return A; + + for (var i = 1; i <= z.length - 1; i++) { + A.push(z[i]); + if (A.length === lim) return A; + } + + q = p = e; + } + } + + A.push(S.slice(p)); + return A; + }]; + }); + + var $assign = Object.assign; // should work with symbols and should have deterministic property order (V8 bug) + + var _objectAssign = !$assign || _fails(function () { + var A = {}; + var B = {}; // eslint-disable-next-line no-undef + + var S = Symbol(); + var K = 'abcdefghijklmnopqrst'; + A[S] = 7; + K.split('').forEach(function (k) { + B[k] = k; + }); + return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K; + }) ? function assign(target, source) { + // eslint-disable-line no-unused-vars + var T = _toObject(target); + + var aLen = arguments.length; + var index = 1; + var getSymbols = _objectGops.f; + var isEnum = _objectPie.f; + + while (aLen > index) { + var S = _iobject(arguments[index++]); + + var keys = getSymbols ? _objectKeys(S).concat(getSymbols(S)) : _objectKeys(S); + var length = keys.length; + var j = 0; + var key; + + while (length > j) { + key = keys[j++]; + if (!_descriptors || isEnum.call(S, key)) T[key] = S[key]; + } + } + + return T; + } : $assign; + + _export(_export.S + _export.F, 'Object', { + assign: _objectAssign + }); + /* eslint-disable no-proto */ + + + var check = function (O, proto) { + _anObject(O); + + if (!_isObject(proto) && proto !== null) throw TypeError(proto + ": can't set as prototype!"); + }; + + var _setProto = { + set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line + function (test, buggy, set) { + try { + set = _ctx(Function.call, _objectGopd.f(Object.prototype, '__proto__').set, 2); + set(test, []); + buggy = !(test instanceof Array); + } catch (e) { + buggy = true; + } + + return function setPrototypeOf(O, proto) { + check(O, proto); + if (buggy) O.__proto__ = proto;else set(O, proto); + return O; + }; + }({}, false) : undefined), + check: check + }; + var setPrototypeOf = _setProto.set; + + var _inheritIfRequired = function (that, target, C) { + var S = target.constructor; + var P; + + if (S !== C && typeof S == 'function' && (P = S.prototype) !== C.prototype && _isObject(P) && setPrototypeOf) { + setPrototypeOf(that, P); + } + + return that; + }; + + var _stringWs = '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003' + '\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF'; + + var space = '[' + _stringWs + ']'; + var non = '\u200b\u0085'; + var ltrim = RegExp('^' + space + space + '*'); + var rtrim = RegExp(space + space + '*$'); + + var exporter = function (KEY, exec, ALIAS) { + var exp = {}; + + var FORCE = _fails(function () { + return !!_stringWs[KEY]() || non[KEY]() != non; + }); + + var fn = exp[KEY] = FORCE ? exec(trim) : _stringWs[KEY]; + if (ALIAS) exp[ALIAS] = fn; + + _export(_export.P + _export.F * FORCE, 'String', exp); + }; // 1 -> String#trimLeft + // 2 -> String#trimRight + // 3 -> String#trim + + + var trim = exporter.trim = function (string, TYPE) { + string = String(_defined(string)); + if (TYPE & 1) string = string.replace(ltrim, ''); + if (TYPE & 2) string = string.replace(rtrim, ''); + return string; + }; + + var _stringTrim = exporter; + var gOPN$2 = _objectGopn.f; + var gOPD$2 = _objectGopd.f; + var dP$2 = _objectDp.f; + var $trim = _stringTrim.trim; + var NUMBER = 'Number'; + var $Number = _global[NUMBER]; + var Base = $Number; + var proto$1 = $Number.prototype; // Opera ~12 has broken Object#toString + + var BROKEN_COF = _cof(_objectCreate(proto$1)) == NUMBER; + var TRIM = 'trim' in String.prototype; // 7.1.3 ToNumber(argument) + + var toNumber = function (argument) { + var it = _toPrimitive(argument, false); + + if (typeof it == 'string' && it.length > 2) { + it = TRIM ? it.trim() : $trim(it, 3); + var first = it.charCodeAt(0); + var third, radix, maxCode; + + if (first === 43 || first === 45) { + third = it.charCodeAt(2); + if (third === 88 || third === 120) return NaN; // Number('+0x1') should be NaN, old V8 fix + } else if (first === 48) { + switch (it.charCodeAt(1)) { + case 66: + case 98: + radix = 2; + maxCode = 49; + break; + // fast equal /^0b[01]+$/i + + case 79: + case 111: + radix = 8; + maxCode = 55; + break; + // fast equal /^0o[0-7]+$/i + + default: + return +it; + } + + for (var digits = it.slice(2), i = 0, l = digits.length, code; i < l; i++) { + code = digits.charCodeAt(i); // parseInt parses a string to a first unavailable symbol + // but ToNumber should return NaN if a string contains unavailable symbols + + if (code < 48 || code > maxCode) return NaN; + } + + return parseInt(digits, radix); + } + } + + return +it; + }; + + if (!$Number(' 0o1') || !$Number('0b1') || $Number('+0x1')) { + $Number = function Number(value) { + var it = arguments.length < 1 ? 0 : value; + var that = this; + return that instanceof $Number // check on 1..constructor(foo) case + && (BROKEN_COF ? _fails(function () { + proto$1.valueOf.call(that); + }) : _cof(that) != NUMBER) ? _inheritIfRequired(new Base(toNumber(it)), that, $Number) : toNumber(it); + }; + + for (var keys = _descriptors ? gOPN$2(Base) : ( // ES3: + 'MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,' + // ES6 (in case, if modules with ES6 Number statics required before): + 'EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,' + 'MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger').split(','), j$1 = 0, key$1; keys.length > j$1; j$1++) { + if (_has(Base, key$1 = keys[j$1]) && !_has($Number, key$1)) { + dP$2($Number, key$1, gOPD$2(Base, key$1)); + } + } + + $Number.prototype = proto$1; + proto$1.constructor = $Number; + + _redefine(_global, NUMBER, $Number); + } + + var moment = createCommonjsModule(function (module, exports) { + (function (global, factory) { + module.exports = factory(); + })(commonjsGlobal, function () { + var hookCallback; + + function hooks() { + return hookCallback.apply(null, arguments); + } // This is done to register the method called with moment() + // without creating circular dependencies. + + + function setHookCallback(callback) { + hookCallback = callback; + } + + function isArray(input) { + return input instanceof Array || Object.prototype.toString.call(input) === '[object Array]'; + } + + function isObject(input) { + // IE8 will treat undefined and null as object if it wasn't for + // input != null + return input != null && Object.prototype.toString.call(input) === '[object Object]'; + } + + function isObjectEmpty(obj) { + if (Object.getOwnPropertyNames) { + return Object.getOwnPropertyNames(obj).length === 0; + } else { + var k; + + for (k in obj) { + if (obj.hasOwnProperty(k)) { + return false; + } + } + + return true; + } + } + + function isUndefined(input) { + return input === void 0; + } + + function isNumber(input) { + return typeof input === 'number' || Object.prototype.toString.call(input) === '[object Number]'; + } + + function isDate(input) { + return input instanceof Date || Object.prototype.toString.call(input) === '[object Date]'; + } + + function map(arr, fn) { + var res = [], + i; + + for (i = 0; i < arr.length; ++i) { + res.push(fn(arr[i], i)); + } + + return res; + } + + function hasOwnProp(a, b) { + return Object.prototype.hasOwnProperty.call(a, b); + } + + function extend(a, b) { + for (var i in b) { + if (hasOwnProp(b, i)) { + a[i] = b[i]; + } + } + + if (hasOwnProp(b, 'toString')) { + a.toString = b.toString; + } + + if (hasOwnProp(b, 'valueOf')) { + a.valueOf = b.valueOf; + } + + return a; + } + + function createUTC(input, format, locale, strict) { + return createLocalOrUTC(input, format, locale, strict, true).utc(); + } + + function defaultParsingFlags() { + // We need to deep clone this object. + return { + empty: false, + unusedTokens: [], + unusedInput: [], + overflow: -2, + charsLeftOver: 0, + nullInput: false, + invalidMonth: null, + invalidFormat: false, + userInvalidated: false, + iso: false, + parsedDateParts: [], + meridiem: null, + rfc2822: false, + weekdayMismatch: false + }; + } + + function getParsingFlags(m) { + if (m._pf == null) { + m._pf = defaultParsingFlags(); + } + + return m._pf; + } + + var some; + + if (Array.prototype.some) { + some = Array.prototype.some; + } else { + some = function (fun) { + var t = Object(this); + var len = t.length >>> 0; + + for (var i = 0; i < len; i++) { + if (i in t && fun.call(this, t[i], i, t)) { + return true; + } + } + + return false; + }; + } + + function isValid(m) { + if (m._isValid == null) { + var flags = getParsingFlags(m); + var parsedParts = some.call(flags.parsedDateParts, function (i) { + return i != null; + }); + var isNowValid = !isNaN(m._d.getTime()) && flags.overflow < 0 && !flags.empty && !flags.invalidMonth && !flags.invalidWeekday && !flags.weekdayMismatch && !flags.nullInput && !flags.invalidFormat && !flags.userInvalidated && (!flags.meridiem || flags.meridiem && parsedParts); + + if (m._strict) { + isNowValid = isNowValid && flags.charsLeftOver === 0 && flags.unusedTokens.length === 0 && flags.bigHour === undefined; + } + + if (Object.isFrozen == null || !Object.isFrozen(m)) { + m._isValid = isNowValid; + } else { + return isNowValid; + } + } + + return m._isValid; + } + + function createInvalid(flags) { + var m = createUTC(NaN); + + if (flags != null) { + extend(getParsingFlags(m), flags); + } else { + getParsingFlags(m).userInvalidated = true; + } + + return m; + } // Plugins that add properties should also add the key here (null value), + // so we can properly clone ourselves. + + + var momentProperties = hooks.momentProperties = []; + + function copyConfig(to, from) { + var i, prop, val; + + if (!isUndefined(from._isAMomentObject)) { + to._isAMomentObject = from._isAMomentObject; + } + + if (!isUndefined(from._i)) { + to._i = from._i; + } + + if (!isUndefined(from._f)) { + to._f = from._f; + } + + if (!isUndefined(from._l)) { + to._l = from._l; + } + + if (!isUndefined(from._strict)) { + to._strict = from._strict; + } + + if (!isUndefined(from._tzm)) { + to._tzm = from._tzm; + } + + if (!isUndefined(from._isUTC)) { + to._isUTC = from._isUTC; + } + + if (!isUndefined(from._offset)) { + to._offset = from._offset; + } + + if (!isUndefined(from._pf)) { + to._pf = getParsingFlags(from); + } + + if (!isUndefined(from._locale)) { + to._locale = from._locale; + } + + if (momentProperties.length > 0) { + for (i = 0; i < momentProperties.length; i++) { + prop = momentProperties[i]; + val = from[prop]; + + if (!isUndefined(val)) { + to[prop] = val; + } + } + } + + return to; + } + + var updateInProgress = false; // Moment prototype object + + function Moment(config) { + copyConfig(this, config); + this._d = new Date(config._d != null ? config._d.getTime() : NaN); + + if (!this.isValid()) { + this._d = new Date(NaN); + } // Prevent infinite loop in case updateOffset creates new moment + // objects. + + + if (updateInProgress === false) { + updateInProgress = true; + hooks.updateOffset(this); + updateInProgress = false; + } + } + + function isMoment(obj) { + return obj instanceof Moment || obj != null && obj._isAMomentObject != null; + } + + function absFloor(number) { + if (number < 0) { + // -0 -> 0 + return Math.ceil(number) || 0; + } else { + return Math.floor(number); + } + } + + function toInt(argumentForCoercion) { + var coercedNumber = +argumentForCoercion, + value = 0; + + if (coercedNumber !== 0 && isFinite(coercedNumber)) { + value = absFloor(coercedNumber); + } + + return value; + } // compare two arrays, return the number of differences + + + function compareArrays(array1, array2, dontConvert) { + var len = Math.min(array1.length, array2.length), + lengthDiff = Math.abs(array1.length - array2.length), + diffs = 0, + i; + + for (i = 0; i < len; i++) { + if (dontConvert && array1[i] !== array2[i] || !dontConvert && toInt(array1[i]) !== toInt(array2[i])) { + diffs++; + } + } + + return diffs + lengthDiff; + } + + function warn(msg) { + if (hooks.suppressDeprecationWarnings === false && typeof console !== 'undefined' && console.warn) { + console.warn('Deprecation warning: ' + msg); + } + } + + function deprecate(msg, fn) { + var firstTime = true; + return extend(function () { + if (hooks.deprecationHandler != null) { + hooks.deprecationHandler(null, msg); + } + + if (firstTime) { + var args = []; + var arg; + + for (var i = 0; i < arguments.length; i++) { + arg = ''; + + if (typeof arguments[i] === 'object') { + arg += '\n[' + i + '] '; + + for (var key in arguments[0]) { + arg += key + ': ' + arguments[0][key] + ', '; + } + + arg = arg.slice(0, -2); // Remove trailing comma and space + } else { + arg = arguments[i]; + } + + args.push(arg); + } + + warn(msg + '\nArguments: ' + Array.prototype.slice.call(args).join('') + '\n' + new Error().stack); + firstTime = false; + } + + return fn.apply(this, arguments); + }, fn); + } + + var deprecations = {}; + + function deprecateSimple(name, msg) { + if (hooks.deprecationHandler != null) { + hooks.deprecationHandler(name, msg); + } + + if (!deprecations[name]) { + warn(msg); + deprecations[name] = true; + } + } + + hooks.suppressDeprecationWarnings = false; + hooks.deprecationHandler = null; + + function isFunction(input) { + return input instanceof Function || Object.prototype.toString.call(input) === '[object Function]'; + } + + function set(config) { + var prop, i; + + for (i in config) { + prop = config[i]; + + if (isFunction(prop)) { + this[i] = prop; + } else { + this['_' + i] = prop; + } + } + + this._config = config; // Lenient ordinal parsing accepts just a number in addition to + // number + (possibly) stuff coming from _dayOfMonthOrdinalParse. + // TODO: Remove "ordinalParse" fallback in next major release. + + this._dayOfMonthOrdinalParseLenient = new RegExp((this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) + '|' + /\d{1,2}/.source); + } + + function mergeConfigs(parentConfig, childConfig) { + var res = extend({}, parentConfig), + prop; + + for (prop in childConfig) { + if (hasOwnProp(childConfig, prop)) { + if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) { + res[prop] = {}; + extend(res[prop], parentConfig[prop]); + extend(res[prop], childConfig[prop]); + } else if (childConfig[prop] != null) { + res[prop] = childConfig[prop]; + } else { + delete res[prop]; + } + } + } + + for (prop in parentConfig) { + if (hasOwnProp(parentConfig, prop) && !hasOwnProp(childConfig, prop) && isObject(parentConfig[prop])) { + // make sure changes to properties don't modify parent config + res[prop] = extend({}, res[prop]); + } + } + + return res; + } + + function Locale(config) { + if (config != null) { + this.set(config); + } + } + + var keys; + + if (Object.keys) { + keys = Object.keys; + } else { + keys = function (obj) { + var i, + res = []; + + for (i in obj) { + if (hasOwnProp(obj, i)) { + res.push(i); + } + } + + return res; + }; + } + + var defaultCalendar = { + sameDay: '[Today at] LT', + nextDay: '[Tomorrow at] LT', + nextWeek: 'dddd [at] LT', + lastDay: '[Yesterday at] LT', + lastWeek: '[Last] dddd [at] LT', + sameElse: 'L' + }; + + function calendar(key, mom, now) { + var output = this._calendar[key] || this._calendar['sameElse']; + return isFunction(output) ? output.call(mom, now) : output; + } + + var defaultLongDateFormat = { + LTS: 'h:mm:ss A', + LT: 'h:mm A', + L: 'MM/DD/YYYY', + LL: 'MMMM D, YYYY', + LLL: 'MMMM D, YYYY h:mm A', + LLLL: 'dddd, MMMM D, YYYY h:mm A' + }; + + function longDateFormat(key) { + var format = this._longDateFormat[key], + formatUpper = this._longDateFormat[key.toUpperCase()]; + + if (format || !formatUpper) { + return format; + } + + this._longDateFormat[key] = formatUpper.replace(/MMMM|MM|DD|dddd/g, function (val) { + return val.slice(1); + }); + return this._longDateFormat[key]; + } + + var defaultInvalidDate = 'Invalid date'; + + function invalidDate() { + return this._invalidDate; + } + + var defaultOrdinal = '%d'; + var defaultDayOfMonthOrdinalParse = /\d{1,2}/; + + function ordinal(number) { + return this._ordinal.replace('%d', number); + } + + var defaultRelativeTime = { + future: 'in %s', + past: '%s ago', + s: 'a few seconds', + ss: '%d seconds', + m: 'a minute', + mm: '%d minutes', + h: 'an hour', + hh: '%d hours', + d: 'a day', + dd: '%d days', + M: 'a month', + MM: '%d months', + y: 'a year', + yy: '%d years' + }; + + function relativeTime(number, withoutSuffix, string, isFuture) { + var output = this._relativeTime[string]; + return isFunction(output) ? output(number, withoutSuffix, string, isFuture) : output.replace(/%d/i, number); + } + + function pastFuture(diff, output) { + var format = this._relativeTime[diff > 0 ? 'future' : 'past']; + return isFunction(format) ? format(output) : format.replace(/%s/i, output); + } + + var aliases = {}; + + function addUnitAlias(unit, shorthand) { + var lowerCase = unit.toLowerCase(); + aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit; + } + + function normalizeUnits(units) { + return typeof units === 'string' ? aliases[units] || aliases[units.toLowerCase()] : undefined; + } + + function normalizeObjectUnits(inputObject) { + var normalizedInput = {}, + normalizedProp, + prop; + + for (prop in inputObject) { + if (hasOwnProp(inputObject, prop)) { + normalizedProp = normalizeUnits(prop); + + if (normalizedProp) { + normalizedInput[normalizedProp] = inputObject[prop]; + } + } + } + + return normalizedInput; + } + + var priorities = {}; + + function addUnitPriority(unit, priority) { + priorities[unit] = priority; + } + + function getPrioritizedUnits(unitsObj) { + var units = []; + + for (var u in unitsObj) { + units.push({ + unit: u, + priority: priorities[u] + }); + } + + units.sort(function (a, b) { + return a.priority - b.priority; + }); + return units; + } + + function zeroFill(number, targetLength, forceSign) { + var absNumber = '' + Math.abs(number), + zerosToFill = targetLength - absNumber.length, + sign = number >= 0; + return (sign ? forceSign ? '+' : '' : '-') + Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) + absNumber; + } + + var formattingTokens = /(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g; + var localFormattingTokens = /(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g; + var formatFunctions = {}; + var formatTokenFunctions = {}; // token: 'M' + // padded: ['MM', 2] + // ordinal: 'Mo' + // callback: function () { this.month() + 1 } + + function addFormatToken(token, padded, ordinal, callback) { + var func = callback; + + if (typeof callback === 'string') { + func = function () { + return this[callback](); + }; + } + + if (token) { + formatTokenFunctions[token] = func; + } + + if (padded) { + formatTokenFunctions[padded[0]] = function () { + return zeroFill(func.apply(this, arguments), padded[1], padded[2]); + }; + } + + if (ordinal) { + formatTokenFunctions[ordinal] = function () { + return this.localeData().ordinal(func.apply(this, arguments), token); + }; + } + } + + function removeFormattingTokens(input) { + if (input.match(/\[[\s\S]/)) { + return input.replace(/^\[|\]$/g, ''); + } + + return input.replace(/\\/g, ''); + } + + function makeFormatFunction(format) { + var array = format.match(formattingTokens), + i, + length; + + for (i = 0, length = array.length; i < length; i++) { + if (formatTokenFunctions[array[i]]) { + array[i] = formatTokenFunctions[array[i]]; + } else { + array[i] = removeFormattingTokens(array[i]); + } + } + + return function (mom) { + var output = '', + i; + + for (i = 0; i < length; i++) { + output += isFunction(array[i]) ? array[i].call(mom, format) : array[i]; + } + + return output; + }; + } // format date using native date object + + + function formatMoment(m, format) { + if (!m.isValid()) { + return m.localeData().invalidDate(); + } + + format = expandFormat(format, m.localeData()); + formatFunctions[format] = formatFunctions[format] || makeFormatFunction(format); + return formatFunctions[format](m); + } + + function expandFormat(format, locale) { + var i = 5; + + function replaceLongDateFormatTokens(input) { + return locale.longDateFormat(input) || input; + } + + localFormattingTokens.lastIndex = 0; + + while (i >= 0 && localFormattingTokens.test(format)) { + format = format.replace(localFormattingTokens, replaceLongDateFormatTokens); + localFormattingTokens.lastIndex = 0; + i -= 1; + } + + return format; + } + + var match1 = /\d/; // 0 - 9 + + var match2 = /\d\d/; // 00 - 99 + + var match3 = /\d{3}/; // 000 - 999 + + var match4 = /\d{4}/; // 0000 - 9999 + + var match6 = /[+-]?\d{6}/; // -999999 - 999999 + + var match1to2 = /\d\d?/; // 0 - 99 + + var match3to4 = /\d\d\d\d?/; // 999 - 9999 + + var match5to6 = /\d\d\d\d\d\d?/; // 99999 - 999999 + + var match1to3 = /\d{1,3}/; // 0 - 999 + + var match1to4 = /\d{1,4}/; // 0 - 9999 + + var match1to6 = /[+-]?\d{1,6}/; // -999999 - 999999 + + var matchUnsigned = /\d+/; // 0 - inf + + var matchSigned = /[+-]?\d+/; // -inf - inf + + var matchOffset = /Z|[+-]\d\d:?\d\d/gi; // +00:00 -00:00 +0000 -0000 or Z + + var matchShortOffset = /Z|[+-]\d\d(?::?\d\d)?/gi; // +00 -00 +00:00 -00:00 +0000 -0000 or Z + + var matchTimestamp = /[+-]?\d+(\.\d{1,3})?/; // 123456789 123456789.123 + // any word (or two) characters or numbers including two/three word month in arabic. + // includes scottish gaelic two word and hyphenated months + + var matchWord = /[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i; + var regexes = {}; + + function addRegexToken(token, regex, strictRegex) { + regexes[token] = isFunction(regex) ? regex : function (isStrict, localeData) { + return isStrict && strictRegex ? strictRegex : regex; + }; + } + + function getParseRegexForToken(token, config) { + if (!hasOwnProp(regexes, token)) { + return new RegExp(unescapeFormat(token)); + } + + return regexes[token](config._strict, config._locale); + } // Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript + + + function unescapeFormat(s) { + return regexEscape(s.replace('\\', '').replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g, function (matched, p1, p2, p3, p4) { + return p1 || p2 || p3 || p4; + })); + } + + function regexEscape(s) { + return s.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&'); + } + + var tokens = {}; + + function addParseToken(token, callback) { + var i, + func = callback; + + if (typeof token === 'string') { + token = [token]; + } + + if (isNumber(callback)) { + func = function (input, array) { + array[callback] = toInt(input); + }; + } + + for (i = 0; i < token.length; i++) { + tokens[token[i]] = func; + } + } + + function addWeekParseToken(token, callback) { + addParseToken(token, function (input, array, config, token) { + config._w = config._w || {}; + callback(input, config._w, config, token); + }); + } + + function addTimeToArrayFromToken(token, input, config) { + if (input != null && hasOwnProp(tokens, token)) { + tokens[token](input, config._a, config, token); + } + } + + var YEAR = 0; + var MONTH = 1; + var DATE = 2; + var HOUR = 3; + var MINUTE = 4; + var SECOND = 5; + var MILLISECOND = 6; + var WEEK = 7; + var WEEKDAY = 8; // FORMATTING + + addFormatToken('Y', 0, 0, function () { + var y = this.year(); + return y <= 9999 ? '' + y : '+' + y; + }); + addFormatToken(0, ['YY', 2], 0, function () { + return this.year() % 100; + }); + addFormatToken(0, ['YYYY', 4], 0, 'year'); + addFormatToken(0, ['YYYYY', 5], 0, 'year'); + addFormatToken(0, ['YYYYYY', 6, true], 0, 'year'); // ALIASES + + addUnitAlias('year', 'y'); // PRIORITIES + + addUnitPriority('year', 1); // PARSING + + addRegexToken('Y', matchSigned); + addRegexToken('YY', match1to2, match2); + addRegexToken('YYYY', match1to4, match4); + addRegexToken('YYYYY', match1to6, match6); + addRegexToken('YYYYYY', match1to6, match6); + addParseToken(['YYYYY', 'YYYYYY'], YEAR); + addParseToken('YYYY', function (input, array) { + array[YEAR] = input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input); + }); + addParseToken('YY', function (input, array) { + array[YEAR] = hooks.parseTwoDigitYear(input); + }); + addParseToken('Y', function (input, array) { + array[YEAR] = parseInt(input, 10); + }); // HELPERS + + function daysInYear(year) { + return isLeapYear(year) ? 366 : 365; + } + + function isLeapYear(year) { + return year % 4 === 0 && year % 100 !== 0 || year % 400 === 0; + } // HOOKS + + + hooks.parseTwoDigitYear = function (input) { + return toInt(input) + (toInt(input) > 68 ? 1900 : 2000); + }; // MOMENTS + + + var getSetYear = makeGetSet('FullYear', true); + + function getIsLeapYear() { + return isLeapYear(this.year()); + } + + function makeGetSet(unit, keepTime) { + return function (value) { + if (value != null) { + set$1(this, unit, value); + hooks.updateOffset(this, keepTime); + return this; + } else { + return get(this, unit); + } + }; + } + + function get(mom, unit) { + return mom.isValid() ? mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]() : NaN; + } + + function set$1(mom, unit, value) { + if (mom.isValid() && !isNaN(value)) { + if (unit === 'FullYear' && isLeapYear(mom.year()) && mom.month() === 1 && mom.date() === 29) { + mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value, mom.month(), daysInMonth(value, mom.month())); + } else { + mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value); + } + } + } // MOMENTS + + + function stringGet(units) { + units = normalizeUnits(units); + + if (isFunction(this[units])) { + return this[units](); + } + + return this; + } + + function stringSet(units, value) { + if (typeof units === 'object') { + units = normalizeObjectUnits(units); + var prioritized = getPrioritizedUnits(units); + + for (var i = 0; i < prioritized.length; i++) { + this[prioritized[i].unit](units[prioritized[i].unit]); + } + } else { + units = normalizeUnits(units); + + if (isFunction(this[units])) { + return this[units](value); + } + } + + return this; + } + + function mod(n, x) { + return (n % x + x) % x; + } + + var indexOf; + + if (Array.prototype.indexOf) { + indexOf = Array.prototype.indexOf; + } else { + indexOf = function (o) { + // I know + var i; + + for (i = 0; i < this.length; ++i) { + if (this[i] === o) { + return i; + } + } + + return -1; + }; + } + + function daysInMonth(year, month) { + if (isNaN(year) || isNaN(month)) { + return NaN; + } + + var modMonth = mod(month, 12); + year += (month - modMonth) / 12; + return modMonth === 1 ? isLeapYear(year) ? 29 : 28 : 31 - modMonth % 7 % 2; + } // FORMATTING + + + addFormatToken('M', ['MM', 2], 'Mo', function () { + return this.month() + 1; + }); + addFormatToken('MMM', 0, 0, function (format) { + return this.localeData().monthsShort(this, format); + }); + addFormatToken('MMMM', 0, 0, function (format) { + return this.localeData().months(this, format); + }); // ALIASES + + addUnitAlias('month', 'M'); // PRIORITY + + addUnitPriority('month', 8); // PARSING + + addRegexToken('M', match1to2); + addRegexToken('MM', match1to2, match2); + addRegexToken('MMM', function (isStrict, locale) { + return locale.monthsShortRegex(isStrict); + }); + addRegexToken('MMMM', function (isStrict, locale) { + return locale.monthsRegex(isStrict); + }); + addParseToken(['M', 'MM'], function (input, array) { + array[MONTH] = toInt(input) - 1; + }); + addParseToken(['MMM', 'MMMM'], function (input, array, config, token) { + var month = config._locale.monthsParse(input, token, config._strict); // if we didn't find a month name, mark the date as invalid. + + + if (month != null) { + array[MONTH] = month; + } else { + getParsingFlags(config).invalidMonth = input; + } + }); // LOCALES + + var MONTHS_IN_FORMAT = /D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/; + var defaultLocaleMonths = 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'); + + function localeMonths(m, format) { + if (!m) { + return isArray(this._months) ? this._months : this._months['standalone']; + } + + return isArray(this._months) ? this._months[m.month()] : this._months[(this._months.isFormat || MONTHS_IN_FORMAT).test(format) ? 'format' : 'standalone'][m.month()]; + } + + var defaultLocaleMonthsShort = 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'); + + function localeMonthsShort(m, format) { + if (!m) { + return isArray(this._monthsShort) ? this._monthsShort : this._monthsShort['standalone']; + } + + return isArray(this._monthsShort) ? this._monthsShort[m.month()] : this._monthsShort[MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'][m.month()]; + } + + function handleStrictParse(monthName, format, strict) { + var i, + ii, + mom, + llc = monthName.toLocaleLowerCase(); + + if (!this._monthsParse) { + // this is not used + this._monthsParse = []; + this._longMonthsParse = []; + this._shortMonthsParse = []; + + for (i = 0; i < 12; ++i) { + mom = createUTC([2000, i]); + this._shortMonthsParse[i] = this.monthsShort(mom, '').toLocaleLowerCase(); + this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase(); + } + } + + if (strict) { + if (format === 'MMM') { + ii = indexOf.call(this._shortMonthsParse, llc); + return ii !== -1 ? ii : null; + } else { + ii = indexOf.call(this._longMonthsParse, llc); + return ii !== -1 ? ii : null; + } + } else { + if (format === 'MMM') { + ii = indexOf.call(this._shortMonthsParse, llc); + + if (ii !== -1) { + return ii; + } + + ii = indexOf.call(this._longMonthsParse, llc); + return ii !== -1 ? ii : null; + } else { + ii = indexOf.call(this._longMonthsParse, llc); + + if (ii !== -1) { + return ii; + } + + ii = indexOf.call(this._shortMonthsParse, llc); + return ii !== -1 ? ii : null; + } + } + } + + function localeMonthsParse(monthName, format, strict) { + var i, mom, regex; + + if (this._monthsParseExact) { + return handleStrictParse.call(this, monthName, format, strict); + } + + if (!this._monthsParse) { + this._monthsParse = []; + this._longMonthsParse = []; + this._shortMonthsParse = []; + } // TODO: add sorting + // Sorting makes sure if one month (or abbr) is a prefix of another + // see sorting in computeMonthsParse + + + for (i = 0; i < 12; i++) { + // make the regex if we don't have it already + mom = createUTC([2000, i]); + + if (strict && !this._longMonthsParse[i]) { + this._longMonthsParse[i] = new RegExp('^' + this.months(mom, '').replace('.', '') + '$', 'i'); + this._shortMonthsParse[i] = new RegExp('^' + this.monthsShort(mom, '').replace('.', '') + '$', 'i'); + } + + if (!strict && !this._monthsParse[i]) { + regex = '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, ''); + this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i'); + } // test the regex + + + if (strict && format === 'MMMM' && this._longMonthsParse[i].test(monthName)) { + return i; + } else if (strict && format === 'MMM' && this._shortMonthsParse[i].test(monthName)) { + return i; + } else if (!strict && this._monthsParse[i].test(monthName)) { + return i; + } + } + } // MOMENTS + + + function setMonth(mom, value) { + var dayOfMonth; + + if (!mom.isValid()) { + // No op + return mom; + } + + if (typeof value === 'string') { + if (/^\d+$/.test(value)) { + value = toInt(value); + } else { + value = mom.localeData().monthsParse(value); // TODO: Another silent failure? + + if (!isNumber(value)) { + return mom; + } + } + } + + dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value)); + + mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth); + + return mom; + } + + function getSetMonth(value) { + if (value != null) { + setMonth(this, value); + hooks.updateOffset(this, true); + return this; + } else { + return get(this, 'Month'); + } + } + + function getDaysInMonth() { + return daysInMonth(this.year(), this.month()); + } + + var defaultMonthsShortRegex = matchWord; + + function monthsShortRegex(isStrict) { + if (this._monthsParseExact) { + if (!hasOwnProp(this, '_monthsRegex')) { + computeMonthsParse.call(this); + } + + if (isStrict) { + return this._monthsShortStrictRegex; + } else { + return this._monthsShortRegex; + } + } else { + if (!hasOwnProp(this, '_monthsShortRegex')) { + this._monthsShortRegex = defaultMonthsShortRegex; + } + + return this._monthsShortStrictRegex && isStrict ? this._monthsShortStrictRegex : this._monthsShortRegex; + } + } + + var defaultMonthsRegex = matchWord; + + function monthsRegex(isStrict) { + if (this._monthsParseExact) { + if (!hasOwnProp(this, '_monthsRegex')) { + computeMonthsParse.call(this); + } + + if (isStrict) { + return this._monthsStrictRegex; + } else { + return this._monthsRegex; + } + } else { + if (!hasOwnProp(this, '_monthsRegex')) { + this._monthsRegex = defaultMonthsRegex; + } + + return this._monthsStrictRegex && isStrict ? this._monthsStrictRegex : this._monthsRegex; + } + } + + function computeMonthsParse() { + function cmpLenRev(a, b) { + return b.length - a.length; + } + + var shortPieces = [], + longPieces = [], + mixedPieces = [], + i, + mom; + + for (i = 0; i < 12; i++) { + // make the regex if we don't have it already + mom = createUTC([2000, i]); + shortPieces.push(this.monthsShort(mom, '')); + longPieces.push(this.months(mom, '')); + mixedPieces.push(this.months(mom, '')); + mixedPieces.push(this.monthsShort(mom, '')); + } // Sorting makes sure if one month (or abbr) is a prefix of another it + // will match the longer piece. + + + shortPieces.sort(cmpLenRev); + longPieces.sort(cmpLenRev); + mixedPieces.sort(cmpLenRev); + + for (i = 0; i < 12; i++) { + shortPieces[i] = regexEscape(shortPieces[i]); + longPieces[i] = regexEscape(longPieces[i]); + } + + for (i = 0; i < 24; i++) { + mixedPieces[i] = regexEscape(mixedPieces[i]); + } + + this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i'); + this._monthsShortRegex = this._monthsRegex; + this._monthsStrictRegex = new RegExp('^(' + longPieces.join('|') + ')', 'i'); + this._monthsShortStrictRegex = new RegExp('^(' + shortPieces.join('|') + ')', 'i'); + } + + function createDate(y, m, d, h, M, s, ms) { + // can't just apply() to create a date: + // https://stackoverflow.com/q/181348 + var date; // the date constructor remaps years 0-99 to 1900-1999 + + if (y < 100 && y >= 0) { + // preserve leap years using a full 400 year cycle, then reset + date = new Date(y + 400, m, d, h, M, s, ms); + + if (isFinite(date.getFullYear())) { + date.setFullYear(y); + } + } else { + date = new Date(y, m, d, h, M, s, ms); + } + + return date; + } + + function createUTCDate(y) { + var date; // the Date.UTC function remaps years 0-99 to 1900-1999 + + if (y < 100 && y >= 0) { + var args = Array.prototype.slice.call(arguments); // preserve leap years using a full 400 year cycle, then reset + + args[0] = y + 400; + date = new Date(Date.UTC.apply(null, args)); + + if (isFinite(date.getUTCFullYear())) { + date.setUTCFullYear(y); + } + } else { + date = new Date(Date.UTC.apply(null, arguments)); + } + + return date; + } // start-of-first-week - start-of-year + + + function firstWeekOffset(year, dow, doy) { + var // first-week day -- which january is always in the first week (4 for iso, 1 for other) + fwd = 7 + dow - doy, + // first-week day local weekday -- which local weekday is fwd + fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7; + return -fwdlw + fwd - 1; + } // https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday + + + function dayOfYearFromWeeks(year, week, weekday, dow, doy) { + var localWeekday = (7 + weekday - dow) % 7, + weekOffset = firstWeekOffset(year, dow, doy), + dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset, + resYear, + resDayOfYear; + + if (dayOfYear <= 0) { + resYear = year - 1; + resDayOfYear = daysInYear(resYear) + dayOfYear; + } else if (dayOfYear > daysInYear(year)) { + resYear = year + 1; + resDayOfYear = dayOfYear - daysInYear(year); + } else { + resYear = year; + resDayOfYear = dayOfYear; + } + + return { + year: resYear, + dayOfYear: resDayOfYear + }; + } + + function weekOfYear(mom, dow, doy) { + var weekOffset = firstWeekOffset(mom.year(), dow, doy), + week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1, + resWeek, + resYear; + + if (week < 1) { + resYear = mom.year() - 1; + resWeek = week + weeksInYear(resYear, dow, doy); + } else if (week > weeksInYear(mom.year(), dow, doy)) { + resWeek = week - weeksInYear(mom.year(), dow, doy); + resYear = mom.year() + 1; + } else { + resYear = mom.year(); + resWeek = week; + } + + return { + week: resWeek, + year: resYear + }; + } + + function weeksInYear(year, dow, doy) { + var weekOffset = firstWeekOffset(year, dow, doy), + weekOffsetNext = firstWeekOffset(year + 1, dow, doy); + return (daysInYear(year) - weekOffset + weekOffsetNext) / 7; + } // FORMATTING + + + addFormatToken('w', ['ww', 2], 'wo', 'week'); + addFormatToken('W', ['WW', 2], 'Wo', 'isoWeek'); // ALIASES + + addUnitAlias('week', 'w'); + addUnitAlias('isoWeek', 'W'); // PRIORITIES + + addUnitPriority('week', 5); + addUnitPriority('isoWeek', 5); // PARSING + + addRegexToken('w', match1to2); + addRegexToken('ww', match1to2, match2); + addRegexToken('W', match1to2); + addRegexToken('WW', match1to2, match2); + addWeekParseToken(['w', 'ww', 'W', 'WW'], function (input, week, config, token) { + week[token.substr(0, 1)] = toInt(input); + }); // HELPERS + // LOCALES + + function localeWeek(mom) { + return weekOfYear(mom, this._week.dow, this._week.doy).week; + } + + var defaultLocaleWeek = { + dow: 0, + // Sunday is the first day of the week. + doy: 6 // The week that contains Jan 6th is the first week of the year. + + }; + + function localeFirstDayOfWeek() { + return this._week.dow; + } + + function localeFirstDayOfYear() { + return this._week.doy; + } // MOMENTS + + + function getSetWeek(input) { + var week = this.localeData().week(this); + return input == null ? week : this.add((input - week) * 7, 'd'); + } + + function getSetISOWeek(input) { + var week = weekOfYear(this, 1, 4).week; + return input == null ? week : this.add((input - week) * 7, 'd'); + } // FORMATTING + + + addFormatToken('d', 0, 'do', 'day'); + addFormatToken('dd', 0, 0, function (format) { + return this.localeData().weekdaysMin(this, format); + }); + addFormatToken('ddd', 0, 0, function (format) { + return this.localeData().weekdaysShort(this, format); + }); + addFormatToken('dddd', 0, 0, function (format) { + return this.localeData().weekdays(this, format); + }); + addFormatToken('e', 0, 0, 'weekday'); + addFormatToken('E', 0, 0, 'isoWeekday'); // ALIASES + + addUnitAlias('day', 'd'); + addUnitAlias('weekday', 'e'); + addUnitAlias('isoWeekday', 'E'); // PRIORITY + + addUnitPriority('day', 11); + addUnitPriority('weekday', 11); + addUnitPriority('isoWeekday', 11); // PARSING + + addRegexToken('d', match1to2); + addRegexToken('e', match1to2); + addRegexToken('E', match1to2); + addRegexToken('dd', function (isStrict, locale) { + return locale.weekdaysMinRegex(isStrict); + }); + addRegexToken('ddd', function (isStrict, locale) { + return locale.weekdaysShortRegex(isStrict); + }); + addRegexToken('dddd', function (isStrict, locale) { + return locale.weekdaysRegex(isStrict); + }); + addWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) { + var weekday = config._locale.weekdaysParse(input, token, config._strict); // if we didn't get a weekday name, mark the date as invalid + + + if (weekday != null) { + week.d = weekday; + } else { + getParsingFlags(config).invalidWeekday = input; + } + }); + addWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) { + week[token] = toInt(input); + }); // HELPERS + + function parseWeekday(input, locale) { + if (typeof input !== 'string') { + return input; + } + + if (!isNaN(input)) { + return parseInt(input, 10); + } + + input = locale.weekdaysParse(input); + + if (typeof input === 'number') { + return input; + } + + return null; + } + + function parseIsoWeekday(input, locale) { + if (typeof input === 'string') { + return locale.weekdaysParse(input) % 7 || 7; + } + + return isNaN(input) ? null : input; + } // LOCALES + + + function shiftWeekdays(ws, n) { + return ws.slice(n, 7).concat(ws.slice(0, n)); + } + + var defaultLocaleWeekdays = 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'); + + function localeWeekdays(m, format) { + var weekdays = isArray(this._weekdays) ? this._weekdays : this._weekdays[m && m !== true && this._weekdays.isFormat.test(format) ? 'format' : 'standalone']; + return m === true ? shiftWeekdays(weekdays, this._week.dow) : m ? weekdays[m.day()] : weekdays; + } + + var defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'); + + function localeWeekdaysShort(m) { + return m === true ? shiftWeekdays(this._weekdaysShort, this._week.dow) : m ? this._weekdaysShort[m.day()] : this._weekdaysShort; + } + + var defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'); + + function localeWeekdaysMin(m) { + return m === true ? shiftWeekdays(this._weekdaysMin, this._week.dow) : m ? this._weekdaysMin[m.day()] : this._weekdaysMin; + } + + function handleStrictParse$1(weekdayName, format, strict) { + var i, + ii, + mom, + llc = weekdayName.toLocaleLowerCase(); + + if (!this._weekdaysParse) { + this._weekdaysParse = []; + this._shortWeekdaysParse = []; + this._minWeekdaysParse = []; + + for (i = 0; i < 7; ++i) { + mom = createUTC([2000, 1]).day(i); + this._minWeekdaysParse[i] = this.weekdaysMin(mom, '').toLocaleLowerCase(); + this._shortWeekdaysParse[i] = this.weekdaysShort(mom, '').toLocaleLowerCase(); + this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase(); + } + } + + if (strict) { + if (format === 'dddd') { + ii = indexOf.call(this._weekdaysParse, llc); + return ii !== -1 ? ii : null; + } else if (format === 'ddd') { + ii = indexOf.call(this._shortWeekdaysParse, llc); + return ii !== -1 ? ii : null; + } else { + ii = indexOf.call(this._minWeekdaysParse, llc); + return ii !== -1 ? ii : null; + } + } else { + if (format === 'dddd') { + ii = indexOf.call(this._weekdaysParse, llc); + + if (ii !== -1) { + return ii; + } + + ii = indexOf.call(this._shortWeekdaysParse, llc); + + if (ii !== -1) { + return ii; + } + + ii = indexOf.call(this._minWeekdaysParse, llc); + return ii !== -1 ? ii : null; + } else if (format === 'ddd') { + ii = indexOf.call(this._shortWeekdaysParse, llc); + + if (ii !== -1) { + return ii; + } + + ii = indexOf.call(this._weekdaysParse, llc); + + if (ii !== -1) { + return ii; + } + + ii = indexOf.call(this._minWeekdaysParse, llc); + return ii !== -1 ? ii : null; + } else { + ii = indexOf.call(this._minWeekdaysParse, llc); + + if (ii !== -1) { + return ii; + } + + ii = indexOf.call(this._weekdaysParse, llc); + + if (ii !== -1) { + return ii; + } + + ii = indexOf.call(this._shortWeekdaysParse, llc); + return ii !== -1 ? ii : null; + } + } + } + + function localeWeekdaysParse(weekdayName, format, strict) { + var i, mom, regex; + + if (this._weekdaysParseExact) { + return handleStrictParse$1.call(this, weekdayName, format, strict); + } + + if (!this._weekdaysParse) { + this._weekdaysParse = []; + this._minWeekdaysParse = []; + this._shortWeekdaysParse = []; + this._fullWeekdaysParse = []; + } + + for (i = 0; i < 7; i++) { + // make the regex if we don't have it already + mom = createUTC([2000, 1]).day(i); + + if (strict && !this._fullWeekdaysParse[i]) { + this._fullWeekdaysParse[i] = new RegExp('^' + this.weekdays(mom, '').replace('.', '\\.?') + '$', 'i'); + this._shortWeekdaysParse[i] = new RegExp('^' + this.weekdaysShort(mom, '').replace('.', '\\.?') + '$', 'i'); + this._minWeekdaysParse[i] = new RegExp('^' + this.weekdaysMin(mom, '').replace('.', '\\.?') + '$', 'i'); + } + + if (!this._weekdaysParse[i]) { + regex = '^' + this.weekdays(mom, '') + '|^' + this.weekdaysShort(mom, '') + '|^' + this.weekdaysMin(mom, ''); + this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i'); + } // test the regex + + + if (strict && format === 'dddd' && this._fullWeekdaysParse[i].test(weekdayName)) { + return i; + } else if (strict && format === 'ddd' && this._shortWeekdaysParse[i].test(weekdayName)) { + return i; + } else if (strict && format === 'dd' && this._minWeekdaysParse[i].test(weekdayName)) { + return i; + } else if (!strict && this._weekdaysParse[i].test(weekdayName)) { + return i; + } + } + } // MOMENTS + + + function getSetDayOfWeek(input) { + if (!this.isValid()) { + return input != null ? this : NaN; + } + + var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay(); + + if (input != null) { + input = parseWeekday(input, this.localeData()); + return this.add(input - day, 'd'); + } else { + return day; + } + } + + function getSetLocaleDayOfWeek(input) { + if (!this.isValid()) { + return input != null ? this : NaN; + } + + var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7; + return input == null ? weekday : this.add(input - weekday, 'd'); + } + + function getSetISODayOfWeek(input) { + if (!this.isValid()) { + return input != null ? this : NaN; + } // behaves the same as moment#day except + // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6) + // as a setter, sunday should belong to the previous week. + + + if (input != null) { + var weekday = parseIsoWeekday(input, this.localeData()); + return this.day(this.day() % 7 ? weekday : weekday - 7); + } else { + return this.day() || 7; + } + } + + var defaultWeekdaysRegex = matchWord; + + function weekdaysRegex(isStrict) { + if (this._weekdaysParseExact) { + if (!hasOwnProp(this, '_weekdaysRegex')) { + computeWeekdaysParse.call(this); + } + + if (isStrict) { + return this._weekdaysStrictRegex; + } else { + return this._weekdaysRegex; + } + } else { + if (!hasOwnProp(this, '_weekdaysRegex')) { + this._weekdaysRegex = defaultWeekdaysRegex; + } + + return this._weekdaysStrictRegex && isStrict ? this._weekdaysStrictRegex : this._weekdaysRegex; + } + } + + var defaultWeekdaysShortRegex = matchWord; + + function weekdaysShortRegex(isStrict) { + if (this._weekdaysParseExact) { + if (!hasOwnProp(this, '_weekdaysRegex')) { + computeWeekdaysParse.call(this); + } + + if (isStrict) { + return this._weekdaysShortStrictRegex; + } else { + return this._weekdaysShortRegex; + } + } else { + if (!hasOwnProp(this, '_weekdaysShortRegex')) { + this._weekdaysShortRegex = defaultWeekdaysShortRegex; + } + + return this._weekdaysShortStrictRegex && isStrict ? this._weekdaysShortStrictRegex : this._weekdaysShortRegex; + } + } + + var defaultWeekdaysMinRegex = matchWord; + + function weekdaysMinRegex(isStrict) { + if (this._weekdaysParseExact) { + if (!hasOwnProp(this, '_weekdaysRegex')) { + computeWeekdaysParse.call(this); + } + + if (isStrict) { + return this._weekdaysMinStrictRegex; + } else { + return this._weekdaysMinRegex; + } + } else { + if (!hasOwnProp(this, '_weekdaysMinRegex')) { + this._weekdaysMinRegex = defaultWeekdaysMinRegex; + } + + return this._weekdaysMinStrictRegex && isStrict ? this._weekdaysMinStrictRegex : this._weekdaysMinRegex; + } + } + + function computeWeekdaysParse() { + function cmpLenRev(a, b) { + return b.length - a.length; + } + + var minPieces = [], + shortPieces = [], + longPieces = [], + mixedPieces = [], + i, + mom, + minp, + shortp, + longp; + + for (i = 0; i < 7; i++) { + // make the regex if we don't have it already + mom = createUTC([2000, 1]).day(i); + minp = this.weekdaysMin(mom, ''); + shortp = this.weekdaysShort(mom, ''); + longp = this.weekdays(mom, ''); + minPieces.push(minp); + shortPieces.push(shortp); + longPieces.push(longp); + mixedPieces.push(minp); + mixedPieces.push(shortp); + mixedPieces.push(longp); + } // Sorting makes sure if one weekday (or abbr) is a prefix of another it + // will match the longer piece. + + + minPieces.sort(cmpLenRev); + shortPieces.sort(cmpLenRev); + longPieces.sort(cmpLenRev); + mixedPieces.sort(cmpLenRev); + + for (i = 0; i < 7; i++) { + shortPieces[i] = regexEscape(shortPieces[i]); + longPieces[i] = regexEscape(longPieces[i]); + mixedPieces[i] = regexEscape(mixedPieces[i]); + } + + this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i'); + this._weekdaysShortRegex = this._weekdaysRegex; + this._weekdaysMinRegex = this._weekdaysRegex; + this._weekdaysStrictRegex = new RegExp('^(' + longPieces.join('|') + ')', 'i'); + this._weekdaysShortStrictRegex = new RegExp('^(' + shortPieces.join('|') + ')', 'i'); + this._weekdaysMinStrictRegex = new RegExp('^(' + minPieces.join('|') + ')', 'i'); + } // FORMATTING + + + function hFormat() { + return this.hours() % 12 || 12; + } + + function kFormat() { + return this.hours() || 24; + } + + addFormatToken('H', ['HH', 2], 0, 'hour'); + addFormatToken('h', ['hh', 2], 0, hFormat); + addFormatToken('k', ['kk', 2], 0, kFormat); + addFormatToken('hmm', 0, 0, function () { + return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2); + }); + addFormatToken('hmmss', 0, 0, function () { + return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2) + zeroFill(this.seconds(), 2); + }); + addFormatToken('Hmm', 0, 0, function () { + return '' + this.hours() + zeroFill(this.minutes(), 2); + }); + addFormatToken('Hmmss', 0, 0, function () { + return '' + this.hours() + zeroFill(this.minutes(), 2) + zeroFill(this.seconds(), 2); + }); + + function meridiem(token, lowercase) { + addFormatToken(token, 0, 0, function () { + return this.localeData().meridiem(this.hours(), this.minutes(), lowercase); + }); + } + + meridiem('a', true); + meridiem('A', false); // ALIASES + + addUnitAlias('hour', 'h'); // PRIORITY + + addUnitPriority('hour', 13); // PARSING + + function matchMeridiem(isStrict, locale) { + return locale._meridiemParse; + } + + addRegexToken('a', matchMeridiem); + addRegexToken('A', matchMeridiem); + addRegexToken('H', match1to2); + addRegexToken('h', match1to2); + addRegexToken('k', match1to2); + addRegexToken('HH', match1to2, match2); + addRegexToken('hh', match1to2, match2); + addRegexToken('kk', match1to2, match2); + addRegexToken('hmm', match3to4); + addRegexToken('hmmss', match5to6); + addRegexToken('Hmm', match3to4); + addRegexToken('Hmmss', match5to6); + addParseToken(['H', 'HH'], HOUR); + addParseToken(['k', 'kk'], function (input, array, config) { + var kInput = toInt(input); + array[HOUR] = kInput === 24 ? 0 : kInput; + }); + addParseToken(['a', 'A'], function (input, array, config) { + config._isPm = config._locale.isPM(input); + config._meridiem = input; + }); + addParseToken(['h', 'hh'], function (input, array, config) { + array[HOUR] = toInt(input); + getParsingFlags(config).bigHour = true; + }); + addParseToken('hmm', function (input, array, config) { + var pos = input.length - 2; + array[HOUR] = toInt(input.substr(0, pos)); + array[MINUTE] = toInt(input.substr(pos)); + getParsingFlags(config).bigHour = true; + }); + addParseToken('hmmss', function (input, array, config) { + var pos1 = input.length - 4; + var pos2 = input.length - 2; + array[HOUR] = toInt(input.substr(0, pos1)); + array[MINUTE] = toInt(input.substr(pos1, 2)); + array[SECOND] = toInt(input.substr(pos2)); + getParsingFlags(config).bigHour = true; + }); + addParseToken('Hmm', function (input, array, config) { + var pos = input.length - 2; + array[HOUR] = toInt(input.substr(0, pos)); + array[MINUTE] = toInt(input.substr(pos)); + }); + addParseToken('Hmmss', function (input, array, config) { + var pos1 = input.length - 4; + var pos2 = input.length - 2; + array[HOUR] = toInt(input.substr(0, pos1)); + array[MINUTE] = toInt(input.substr(pos1, 2)); + array[SECOND] = toInt(input.substr(pos2)); + }); // LOCALES + + function localeIsPM(input) { + // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays + // Using charAt should be more compatible. + return (input + '').toLowerCase().charAt(0) === 'p'; + } + + var defaultLocaleMeridiemParse = /[ap]\.?m?\.?/i; + + function localeMeridiem(hours, minutes, isLower) { + if (hours > 11) { + return isLower ? 'pm' : 'PM'; + } else { + return isLower ? 'am' : 'AM'; + } + } // MOMENTS + // Setting the hour should keep the time, because the user explicitly + // specified which hour they want. So trying to maintain the same hour (in + // a new timezone) makes sense. Adding/subtracting hours does not follow + // this rule. + + + var getSetHour = makeGetSet('Hours', true); + var baseConfig = { + calendar: defaultCalendar, + longDateFormat: defaultLongDateFormat, + invalidDate: defaultInvalidDate, + ordinal: defaultOrdinal, + dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse, + relativeTime: defaultRelativeTime, + months: defaultLocaleMonths, + monthsShort: defaultLocaleMonthsShort, + week: defaultLocaleWeek, + weekdays: defaultLocaleWeekdays, + weekdaysMin: defaultLocaleWeekdaysMin, + weekdaysShort: defaultLocaleWeekdaysShort, + meridiemParse: defaultLocaleMeridiemParse + }; // internal storage for locale config files + + var locales = {}; + var localeFamilies = {}; + var globalLocale; + + function normalizeLocale(key) { + return key ? key.toLowerCase().replace('_', '-') : key; + } // pick the locale from the array + // try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each + // substring from most specific to least, but move to the next array item if it's a more specific variant than the current root + + + function chooseLocale(names) { + var i = 0, + j, + next, + locale, + split; + + while (i < names.length) { + split = normalizeLocale(names[i]).split('-'); + j = split.length; + next = normalizeLocale(names[i + 1]); + next = next ? next.split('-') : null; + + while (j > 0) { + locale = loadLocale(split.slice(0, j).join('-')); + + if (locale) { + return locale; + } + + if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) { + //the next array item is better than a shallower substring of this one + break; + } + + j--; + } + + i++; + } + + return globalLocale; + } + + function loadLocale(name) { + var oldLocale = null; // TODO: Find a better way to register and load all the locales in Node + + if (!locales[name] && 'object' !== 'undefined' && module && module.exports) { + try { + oldLocale = globalLocale._abbr; + var aliasedRequire = commonjsRequire; + aliasedRequire('./locale/' + name); + getSetGlobalLocale(oldLocale); + } catch (e) {} + } + + return locales[name]; + } // This function will load locale and then set the global locale. If + // no arguments are passed in, it will simply return the current global + // locale key. + + + function getSetGlobalLocale(key, values) { + var data; + + if (key) { + if (isUndefined(values)) { + data = getLocale(key); + } else { + data = defineLocale(key, values); + } + + if (data) { + // moment.duration._locale = moment._locale = data; + globalLocale = data; + } else { + if (typeof console !== 'undefined' && console.warn) { + //warn user if arguments are passed but the locale could not be set + console.warn('Locale ' + key + ' not found. Did you forget to load it?'); + } + } + } + + return globalLocale._abbr; + } + + function defineLocale(name, config) { + if (config !== null) { + var locale, + parentConfig = baseConfig; + config.abbr = name; + + if (locales[name] != null) { + deprecateSimple('defineLocaleOverride', 'use moment.updateLocale(localeName, config) to change ' + 'an existing locale. moment.defineLocale(localeName, ' + 'config) should only be used for creating a new locale ' + 'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.'); + parentConfig = locales[name]._config; + } else if (config.parentLocale != null) { + if (locales[config.parentLocale] != null) { + parentConfig = locales[config.parentLocale]._config; + } else { + locale = loadLocale(config.parentLocale); + + if (locale != null) { + parentConfig = locale._config; + } else { + if (!localeFamilies[config.parentLocale]) { + localeFamilies[config.parentLocale] = []; + } + + localeFamilies[config.parentLocale].push({ + name: name, + config: config + }); + return null; + } + } + } + + locales[name] = new Locale(mergeConfigs(parentConfig, config)); + + if (localeFamilies[name]) { + localeFamilies[name].forEach(function (x) { + defineLocale(x.name, x.config); + }); + } // backwards compat for now: also set the locale + // make sure we set the locale AFTER all child locales have been + // created, so we won't end up with the child locale set. + + + getSetGlobalLocale(name); + return locales[name]; + } else { + // useful for testing + delete locales[name]; + return null; + } + } + + function updateLocale(name, config) { + if (config != null) { + var locale, + tmpLocale, + parentConfig = baseConfig; // MERGE + + tmpLocale = loadLocale(name); + + if (tmpLocale != null) { + parentConfig = tmpLocale._config; + } + + config = mergeConfigs(parentConfig, config); + locale = new Locale(config); + locale.parentLocale = locales[name]; + locales[name] = locale; // backwards compat for now: also set the locale + + getSetGlobalLocale(name); + } else { + // pass null for config to unupdate, useful for tests + if (locales[name] != null) { + if (locales[name].parentLocale != null) { + locales[name] = locales[name].parentLocale; + } else if (locales[name] != null) { + delete locales[name]; + } + } + } + + return locales[name]; + } // returns locale data + + + function getLocale(key) { + var locale; + + if (key && key._locale && key._locale._abbr) { + key = key._locale._abbr; + } + + if (!key) { + return globalLocale; + } + + if (!isArray(key)) { + //short-circuit everything else + locale = loadLocale(key); + + if (locale) { + return locale; + } + + key = [key]; + } + + return chooseLocale(key); + } + + function listLocales() { + return keys(locales); + } + + function checkOverflow(m) { + var overflow; + var a = m._a; + + if (a && getParsingFlags(m).overflow === -2) { + overflow = a[MONTH] < 0 || a[MONTH] > 11 ? MONTH : a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH]) ? DATE : a[HOUR] < 0 || a[HOUR] > 24 || a[HOUR] === 24 && (a[MINUTE] !== 0 || a[SECOND] !== 0 || a[MILLISECOND] !== 0) ? HOUR : a[MINUTE] < 0 || a[MINUTE] > 59 ? MINUTE : a[SECOND] < 0 || a[SECOND] > 59 ? SECOND : a[MILLISECOND] < 0 || a[MILLISECOND] > 999 ? MILLISECOND : -1; + + if (getParsingFlags(m)._overflowDayOfYear && (overflow < YEAR || overflow > DATE)) { + overflow = DATE; + } + + if (getParsingFlags(m)._overflowWeeks && overflow === -1) { + overflow = WEEK; + } + + if (getParsingFlags(m)._overflowWeekday && overflow === -1) { + overflow = WEEKDAY; + } + + getParsingFlags(m).overflow = overflow; + } + + return m; + } // Pick the first defined of two or three arguments. + + + function defaults(a, b, c) { + if (a != null) { + return a; + } + + if (b != null) { + return b; + } + + return c; + } + + function currentDateArray(config) { + // hooks is actually the exported moment object + var nowValue = new Date(hooks.now()); + + if (config._useUTC) { + return [nowValue.getUTCFullYear(), nowValue.getUTCMonth(), nowValue.getUTCDate()]; + } + + return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()]; + } // convert an array to a date. + // the array should mirror the parameters below + // note: all values past the year are optional and will default to the lowest possible value. + // [year, month, day , hour, minute, second, millisecond] + + + function configFromArray(config) { + var i, + date, + input = [], + currentDate, + expectedWeekday, + yearToUse; + + if (config._d) { + return; + } + + currentDate = currentDateArray(config); //compute day of the year from weeks and weekdays + + if (config._w && config._a[DATE] == null && config._a[MONTH] == null) { + dayOfYearFromWeekInfo(config); + } //if the day of the year is set, figure out what it is + + + if (config._dayOfYear != null) { + yearToUse = defaults(config._a[YEAR], currentDate[YEAR]); + + if (config._dayOfYear > daysInYear(yearToUse) || config._dayOfYear === 0) { + getParsingFlags(config)._overflowDayOfYear = true; + } + + date = createUTCDate(yearToUse, 0, config._dayOfYear); + config._a[MONTH] = date.getUTCMonth(); + config._a[DATE] = date.getUTCDate(); + } // Default to current date. + // * if no year, month, day of month are given, default to today + // * if day of month is given, default month and year + // * if month is given, default only year + // * if year is given, don't default anything + + + for (i = 0; i < 3 && config._a[i] == null; ++i) { + config._a[i] = input[i] = currentDate[i]; + } // Zero out whatever was not defaulted, including time + + + for (; i < 7; i++) { + config._a[i] = input[i] = config._a[i] == null ? i === 2 ? 1 : 0 : config._a[i]; + } // Check for 24:00:00.000 + + + if (config._a[HOUR] === 24 && config._a[MINUTE] === 0 && config._a[SECOND] === 0 && config._a[MILLISECOND] === 0) { + config._nextDay = true; + config._a[HOUR] = 0; + } + + config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input); + expectedWeekday = config._useUTC ? config._d.getUTCDay() : config._d.getDay(); // Apply timezone offset from input. The actual utcOffset can be changed + // with parseZone. + + if (config._tzm != null) { + config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm); + } + + if (config._nextDay) { + config._a[HOUR] = 24; + } // check for mismatching day of week + + + if (config._w && typeof config._w.d !== 'undefined' && config._w.d !== expectedWeekday) { + getParsingFlags(config).weekdayMismatch = true; + } + } + + function dayOfYearFromWeekInfo(config) { + var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow; + w = config._w; + + if (w.GG != null || w.W != null || w.E != null) { + dow = 1; + doy = 4; // TODO: We need to take the current isoWeekYear, but that depends on + // how we interpret now (local, utc, fixed offset). So create + // a now version of current config (take local/utc/offset flags, and + // create now). + + weekYear = defaults(w.GG, config._a[YEAR], weekOfYear(createLocal(), 1, 4).year); + week = defaults(w.W, 1); + weekday = defaults(w.E, 1); + + if (weekday < 1 || weekday > 7) { + weekdayOverflow = true; + } + } else { + dow = config._locale._week.dow; + doy = config._locale._week.doy; + var curWeek = weekOfYear(createLocal(), dow, doy); + weekYear = defaults(w.gg, config._a[YEAR], curWeek.year); // Default to current week. + + week = defaults(w.w, curWeek.week); + + if (w.d != null) { + // weekday -- low day numbers are considered next week + weekday = w.d; + + if (weekday < 0 || weekday > 6) { + weekdayOverflow = true; + } + } else if (w.e != null) { + // local weekday -- counting starts from beginning of week + weekday = w.e + dow; + + if (w.e < 0 || w.e > 6) { + weekdayOverflow = true; + } + } else { + // default to beginning of week + weekday = dow; + } + } + + if (week < 1 || week > weeksInYear(weekYear, dow, doy)) { + getParsingFlags(config)._overflowWeeks = true; + } else if (weekdayOverflow != null) { + getParsingFlags(config)._overflowWeekday = true; + } else { + temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy); + config._a[YEAR] = temp.year; + config._dayOfYear = temp.dayOfYear; + } + } // iso 8601 regex + // 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00) + + + var extendedIsoRegex = /^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/; + var basicIsoRegex = /^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/; + var tzRegex = /Z|[+-]\d\d(?::?\d\d)?/; + var isoDates = [['YYYYYY-MM-DD', /[+-]\d{6}-\d\d-\d\d/], ['YYYY-MM-DD', /\d{4}-\d\d-\d\d/], ['GGGG-[W]WW-E', /\d{4}-W\d\d-\d/], ['GGGG-[W]WW', /\d{4}-W\d\d/, false], ['YYYY-DDD', /\d{4}-\d{3}/], ['YYYY-MM', /\d{4}-\d\d/, false], ['YYYYYYMMDD', /[+-]\d{10}/], ['YYYYMMDD', /\d{8}/], // YYYYMM is NOT allowed by the standard + ['GGGG[W]WWE', /\d{4}W\d{3}/], ['GGGG[W]WW', /\d{4}W\d{2}/, false], ['YYYYDDD', /\d{7}/]]; // iso time formats and regexes + + var isoTimes = [['HH:mm:ss.SSSS', /\d\d:\d\d:\d\d\.\d+/], ['HH:mm:ss,SSSS', /\d\d:\d\d:\d\d,\d+/], ['HH:mm:ss', /\d\d:\d\d:\d\d/], ['HH:mm', /\d\d:\d\d/], ['HHmmss.SSSS', /\d\d\d\d\d\d\.\d+/], ['HHmmss,SSSS', /\d\d\d\d\d\d,\d+/], ['HHmmss', /\d\d\d\d\d\d/], ['HHmm', /\d\d\d\d/], ['HH', /\d\d/]]; + var aspNetJsonRegex = /^\/?Date\((\-?\d+)/i; // date from iso format + + function configFromISO(config) { + var i, + l, + string = config._i, + match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string), + allowTime, + dateFormat, + timeFormat, + tzFormat; + + if (match) { + getParsingFlags(config).iso = true; + + for (i = 0, l = isoDates.length; i < l; i++) { + if (isoDates[i][1].exec(match[1])) { + dateFormat = isoDates[i][0]; + allowTime = isoDates[i][2] !== false; + break; + } + } + + if (dateFormat == null) { + config._isValid = false; + return; + } + + if (match[3]) { + for (i = 0, l = isoTimes.length; i < l; i++) { + if (isoTimes[i][1].exec(match[3])) { + // match[2] should be 'T' or space + timeFormat = (match[2] || ' ') + isoTimes[i][0]; + break; + } + } + + if (timeFormat == null) { + config._isValid = false; + return; + } + } + + if (!allowTime && timeFormat != null) { + config._isValid = false; + return; + } + + if (match[4]) { + if (tzRegex.exec(match[4])) { + tzFormat = 'Z'; + } else { + config._isValid = false; + return; + } + } + + config._f = dateFormat + (timeFormat || '') + (tzFormat || ''); + configFromStringAndFormat(config); + } else { + config._isValid = false; + } + } // RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3 + + + var rfc2822 = /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/; + + function extractFromRFC2822Strings(yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr) { + var result = [untruncateYear(yearStr), defaultLocaleMonthsShort.indexOf(monthStr), parseInt(dayStr, 10), parseInt(hourStr, 10), parseInt(minuteStr, 10)]; + + if (secondStr) { + result.push(parseInt(secondStr, 10)); + } + + return result; + } + + function untruncateYear(yearStr) { + var year = parseInt(yearStr, 10); + + if (year <= 49) { + return 2000 + year; + } else if (year <= 999) { + return 1900 + year; + } + + return year; + } + + function preprocessRFC2822(s) { + // Remove comments and folding whitespace and replace multiple-spaces with a single space + return s.replace(/\([^)]*\)|[\n\t]/g, ' ').replace(/(\s\s+)/g, ' ').replace(/^\s\s*/, '').replace(/\s\s*$/, ''); + } + + function checkWeekday(weekdayStr, parsedInput, config) { + if (weekdayStr) { + // TODO: Replace the vanilla JS Date object with an indepentent day-of-week check. + var weekdayProvided = defaultLocaleWeekdaysShort.indexOf(weekdayStr), + weekdayActual = new Date(parsedInput[0], parsedInput[1], parsedInput[2]).getDay(); + + if (weekdayProvided !== weekdayActual) { + getParsingFlags(config).weekdayMismatch = true; + config._isValid = false; + return false; + } + } + + return true; + } + + var obsOffsets = { + UT: 0, + GMT: 0, + EDT: -4 * 60, + EST: -5 * 60, + CDT: -5 * 60, + CST: -6 * 60, + MDT: -6 * 60, + MST: -7 * 60, + PDT: -7 * 60, + PST: -8 * 60 + }; + + function calculateOffset(obsOffset, militaryOffset, numOffset) { + if (obsOffset) { + return obsOffsets[obsOffset]; + } else if (militaryOffset) { + // the only allowed military tz is Z + return 0; + } else { + var hm = parseInt(numOffset, 10); + var m = hm % 100, + h = (hm - m) / 100; + return h * 60 + m; + } + } // date and time from ref 2822 format + + + function configFromRFC2822(config) { + var match = rfc2822.exec(preprocessRFC2822(config._i)); + + if (match) { + var parsedArray = extractFromRFC2822Strings(match[4], match[3], match[2], match[5], match[6], match[7]); + + if (!checkWeekday(match[1], parsedArray, config)) { + return; + } + + config._a = parsedArray; + config._tzm = calculateOffset(match[8], match[9], match[10]); + config._d = createUTCDate.apply(null, config._a); + + config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm); + + getParsingFlags(config).rfc2822 = true; + } else { + config._isValid = false; + } + } // date from iso format or fallback + + + function configFromString(config) { + var matched = aspNetJsonRegex.exec(config._i); + + if (matched !== null) { + config._d = new Date(+matched[1]); + return; + } + + configFromISO(config); + + if (config._isValid === false) { + delete config._isValid; + } else { + return; + } + + configFromRFC2822(config); + + if (config._isValid === false) { + delete config._isValid; + } else { + return; + } // Final attempt, use Input Fallback + + + hooks.createFromInputFallback(config); + } + + hooks.createFromInputFallback = deprecate('value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), ' + 'which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are ' + 'discouraged and will be removed in an upcoming major release. Please refer to ' + 'http://momentjs.com/guides/#/warnings/js-date/ for more info.', function (config) { + config._d = new Date(config._i + (config._useUTC ? ' UTC' : '')); + }); // constant that refers to the ISO standard + + hooks.ISO_8601 = function () {}; // constant that refers to the RFC 2822 form + + + hooks.RFC_2822 = function () {}; // date from string and format string + + + function configFromStringAndFormat(config) { + // TODO: Move this to another part of the creation flow to prevent circular deps + if (config._f === hooks.ISO_8601) { + configFromISO(config); + return; + } + + if (config._f === hooks.RFC_2822) { + configFromRFC2822(config); + return; + } + + config._a = []; + getParsingFlags(config).empty = true; // This array is used to make a Date, either with `new Date` or `Date.UTC` + + var string = '' + config._i, + i, + parsedInput, + tokens, + token, + skipped, + stringLength = string.length, + totalParsedInputLength = 0; + tokens = expandFormat(config._f, config._locale).match(formattingTokens) || []; + + for (i = 0; i < tokens.length; i++) { + token = tokens[i]; + parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0]; // console.log('token', token, 'parsedInput', parsedInput, + // 'regex', getParseRegexForToken(token, config)); + + if (parsedInput) { + skipped = string.substr(0, string.indexOf(parsedInput)); + + if (skipped.length > 0) { + getParsingFlags(config).unusedInput.push(skipped); + } + + string = string.slice(string.indexOf(parsedInput) + parsedInput.length); + totalParsedInputLength += parsedInput.length; + } // don't parse if it's not a known token + + + if (formatTokenFunctions[token]) { + if (parsedInput) { + getParsingFlags(config).empty = false; + } else { + getParsingFlags(config).unusedTokens.push(token); + } + + addTimeToArrayFromToken(token, parsedInput, config); + } else if (config._strict && !parsedInput) { + getParsingFlags(config).unusedTokens.push(token); + } + } // add remaining unparsed input length to the string + + + getParsingFlags(config).charsLeftOver = stringLength - totalParsedInputLength; + + if (string.length > 0) { + getParsingFlags(config).unusedInput.push(string); + } // clear _12h flag if hour is <= 12 + + + if (config._a[HOUR] <= 12 && getParsingFlags(config).bigHour === true && config._a[HOUR] > 0) { + getParsingFlags(config).bigHour = undefined; + } + + getParsingFlags(config).parsedDateParts = config._a.slice(0); + getParsingFlags(config).meridiem = config._meridiem; // handle meridiem + + config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR], config._meridiem); + configFromArray(config); + checkOverflow(config); + } + + function meridiemFixWrap(locale, hour, meridiem) { + var isPm; + + if (meridiem == null) { + // nothing to do + return hour; + } + + if (locale.meridiemHour != null) { + return locale.meridiemHour(hour, meridiem); + } else if (locale.isPM != null) { + // Fallback + isPm = locale.isPM(meridiem); + + if (isPm && hour < 12) { + hour += 12; + } + + if (!isPm && hour === 12) { + hour = 0; + } + + return hour; + } else { + // this is not supposed to happen + return hour; + } + } // date from string and array of format strings + + + function configFromStringAndArray(config) { + var tempConfig, bestMoment, scoreToBeat, i, currentScore; + + if (config._f.length === 0) { + getParsingFlags(config).invalidFormat = true; + config._d = new Date(NaN); + return; + } + + for (i = 0; i < config._f.length; i++) { + currentScore = 0; + tempConfig = copyConfig({}, config); + + if (config._useUTC != null) { + tempConfig._useUTC = config._useUTC; + } + + tempConfig._f = config._f[i]; + configFromStringAndFormat(tempConfig); + + if (!isValid(tempConfig)) { + continue; + } // if there is any input that was not parsed add a penalty for that format + + + currentScore += getParsingFlags(tempConfig).charsLeftOver; //or tokens + + currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10; + getParsingFlags(tempConfig).score = currentScore; + + if (scoreToBeat == null || currentScore < scoreToBeat) { + scoreToBeat = currentScore; + bestMoment = tempConfig; + } + } + + extend(config, bestMoment || tempConfig); + } + + function configFromObject(config) { + if (config._d) { + return; + } + + var i = normalizeObjectUnits(config._i); + config._a = map([i.year, i.month, i.day || i.date, i.hour, i.minute, i.second, i.millisecond], function (obj) { + return obj && parseInt(obj, 10); + }); + configFromArray(config); + } + + function createFromConfig(config) { + var res = new Moment(checkOverflow(prepareConfig(config))); + + if (res._nextDay) { + // Adding is smart enough around DST + res.add(1, 'd'); + res._nextDay = undefined; + } + + return res; + } + + function prepareConfig(config) { + var input = config._i, + format = config._f; + config._locale = config._locale || getLocale(config._l); + + if (input === null || format === undefined && input === '') { + return createInvalid({ + nullInput: true + }); + } + + if (typeof input === 'string') { + config._i = input = config._locale.preparse(input); + } + + if (isMoment(input)) { + return new Moment(checkOverflow(input)); + } else if (isDate(input)) { + config._d = input; + } else if (isArray(format)) { + configFromStringAndArray(config); + } else if (format) { + configFromStringAndFormat(config); + } else { + configFromInput(config); + } + + if (!isValid(config)) { + config._d = null; + } + + return config; + } + + function configFromInput(config) { + var input = config._i; + + if (isUndefined(input)) { + config._d = new Date(hooks.now()); + } else if (isDate(input)) { + config._d = new Date(input.valueOf()); + } else if (typeof input === 'string') { + configFromString(config); + } else if (isArray(input)) { + config._a = map(input.slice(0), function (obj) { + return parseInt(obj, 10); + }); + configFromArray(config); + } else if (isObject(input)) { + configFromObject(config); + } else if (isNumber(input)) { + // from milliseconds + config._d = new Date(input); + } else { + hooks.createFromInputFallback(config); + } + } + + function createLocalOrUTC(input, format, locale, strict, isUTC) { + var c = {}; + + if (locale === true || locale === false) { + strict = locale; + locale = undefined; + } + + if (isObject(input) && isObjectEmpty(input) || isArray(input) && input.length === 0) { + input = undefined; + } // object construction must be done this way. + // https://github.com/moment/moment/issues/1423 + + + c._isAMomentObject = true; + c._useUTC = c._isUTC = isUTC; + c._l = locale; + c._i = input; + c._f = format; + c._strict = strict; + return createFromConfig(c); + } + + function createLocal(input, format, locale, strict) { + return createLocalOrUTC(input, format, locale, strict, false); + } + + var prototypeMin = deprecate('moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/', function () { + var other = createLocal.apply(null, arguments); + + if (this.isValid() && other.isValid()) { + return other < this ? this : other; + } else { + return createInvalid(); + } + }); + var prototypeMax = deprecate('moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/', function () { + var other = createLocal.apply(null, arguments); + + if (this.isValid() && other.isValid()) { + return other > this ? this : other; + } else { + return createInvalid(); + } + }); // Pick a moment m from moments so that m[fn](other) is true for all + // other. This relies on the function fn to be transitive. + // + // moments should either be an array of moment objects or an array, whose + // first element is an array of moment objects. + + function pickBy(fn, moments) { + var res, i; + + if (moments.length === 1 && isArray(moments[0])) { + moments = moments[0]; + } + + if (!moments.length) { + return createLocal(); + } + + res = moments[0]; + + for (i = 1; i < moments.length; ++i) { + if (!moments[i].isValid() || moments[i][fn](res)) { + res = moments[i]; + } + } + + return res; + } // TODO: Use [].sort instead? + + + function min() { + var args = [].slice.call(arguments, 0); + return pickBy('isBefore', args); + } + + function max() { + var args = [].slice.call(arguments, 0); + return pickBy('isAfter', args); + } + + var now = function () { + return Date.now ? Date.now() : +new Date(); + }; + + var ordering = ['year', 'quarter', 'month', 'week', 'day', 'hour', 'minute', 'second', 'millisecond']; + + function isDurationValid(m) { + for (var key in m) { + if (!(indexOf.call(ordering, key) !== -1 && (m[key] == null || !isNaN(m[key])))) { + return false; + } + } + + var unitHasDecimal = false; + + for (var i = 0; i < ordering.length; ++i) { + if (m[ordering[i]]) { + if (unitHasDecimal) { + return false; // only allow non-integers for smallest unit + } + + if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) { + unitHasDecimal = true; + } + } + } + + return true; + } + + function isValid$1() { + return this._isValid; + } + + function createInvalid$1() { + return createDuration(NaN); + } + + function Duration(duration) { + var normalizedInput = normalizeObjectUnits(duration), + years = normalizedInput.year || 0, + quarters = normalizedInput.quarter || 0, + months = normalizedInput.month || 0, + weeks = normalizedInput.week || normalizedInput.isoWeek || 0, + days = normalizedInput.day || 0, + hours = normalizedInput.hour || 0, + minutes = normalizedInput.minute || 0, + seconds = normalizedInput.second || 0, + milliseconds = normalizedInput.millisecond || 0; + this._isValid = isDurationValid(normalizedInput); // representation for dateAddRemove + + this._milliseconds = +milliseconds + seconds * 1e3 + // 1000 + minutes * 6e4 + // 1000 * 60 + hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978 + // Because of dateAddRemove treats 24 hours as different from a + // day when working around DST, we need to store them separately + + this._days = +days + weeks * 7; // It is impossible to translate months into days without knowing + // which months you are are talking about, so we have to store + // it separately. + + this._months = +months + quarters * 3 + years * 12; + this._data = {}; + this._locale = getLocale(); + + this._bubble(); + } + + function isDuration(obj) { + return obj instanceof Duration; + } + + function absRound(number) { + if (number < 0) { + return Math.round(-1 * number) * -1; + } else { + return Math.round(number); + } + } // FORMATTING + + + function offset(token, separator) { + addFormatToken(token, 0, 0, function () { + var offset = this.utcOffset(); + var sign = '+'; + + if (offset < 0) { + offset = -offset; + sign = '-'; + } + + return sign + zeroFill(~~(offset / 60), 2) + separator + zeroFill(~~offset % 60, 2); + }); + } + + offset('Z', ':'); + offset('ZZ', ''); // PARSING + + addRegexToken('Z', matchShortOffset); + addRegexToken('ZZ', matchShortOffset); + addParseToken(['Z', 'ZZ'], function (input, array, config) { + config._useUTC = true; + config._tzm = offsetFromString(matchShortOffset, input); + }); // HELPERS + // timezone chunker + // '+10:00' > ['10', '00'] + // '-1530' > ['-15', '30'] + + var chunkOffset = /([\+\-]|\d\d)/gi; + + function offsetFromString(matcher, string) { + var matches = (string || '').match(matcher); + + if (matches === null) { + return null; + } + + var chunk = matches[matches.length - 1] || []; + var parts = (chunk + '').match(chunkOffset) || ['-', 0, 0]; + var minutes = +(parts[1] * 60) + toInt(parts[2]); + return minutes === 0 ? 0 : parts[0] === '+' ? minutes : -minutes; + } // Return a moment from input, that is local/utc/zone equivalent to model. + + + function cloneWithOffset(input, model) { + var res, diff; + + if (model._isUTC) { + res = model.clone(); + diff = (isMoment(input) || isDate(input) ? input.valueOf() : createLocal(input).valueOf()) - res.valueOf(); // Use low-level api, because this fn is low-level api. + + res._d.setTime(res._d.valueOf() + diff); + + hooks.updateOffset(res, false); + return res; + } else { + return createLocal(input).local(); + } + } + + function getDateOffset(m) { + // On Firefox.24 Date#getTimezoneOffset returns a floating point. + // https://github.com/moment/moment/pull/1871 + return -Math.round(m._d.getTimezoneOffset() / 15) * 15; + } // HOOKS + // This function will be called whenever a moment is mutated. + // It is intended to keep the offset in sync with the timezone. + + + hooks.updateOffset = function () {}; // MOMENTS + // keepLocalTime = true means only change the timezone, without + // affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]--> + // 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset + // +0200, so we adjust the time as needed, to be valid. + // + // Keeping the time actually adds/subtracts (one hour) + // from the actual represented time. That is why we call updateOffset + // a second time. In case it wants us to change the offset again + // _changeInProgress == true case, then we have to adjust, because + // there is no such time in the given timezone. + + + function getSetOffset(input, keepLocalTime, keepMinutes) { + var offset = this._offset || 0, + localAdjust; + + if (!this.isValid()) { + return input != null ? this : NaN; + } + + if (input != null) { + if (typeof input === 'string') { + input = offsetFromString(matchShortOffset, input); + + if (input === null) { + return this; + } + } else if (Math.abs(input) < 16 && !keepMinutes) { + input = input * 60; + } + + if (!this._isUTC && keepLocalTime) { + localAdjust = getDateOffset(this); + } + + this._offset = input; + this._isUTC = true; + + if (localAdjust != null) { + this.add(localAdjust, 'm'); + } + + if (offset !== input) { + if (!keepLocalTime || this._changeInProgress) { + addSubtract(this, createDuration(input - offset, 'm'), 1, false); + } else if (!this._changeInProgress) { + this._changeInProgress = true; + hooks.updateOffset(this, true); + this._changeInProgress = null; + } + } + + return this; + } else { + return this._isUTC ? offset : getDateOffset(this); + } + } + + function getSetZone(input, keepLocalTime) { + if (input != null) { + if (typeof input !== 'string') { + input = -input; + } + + this.utcOffset(input, keepLocalTime); + return this; + } else { + return -this.utcOffset(); + } + } + + function setOffsetToUTC(keepLocalTime) { + return this.utcOffset(0, keepLocalTime); + } + + function setOffsetToLocal(keepLocalTime) { + if (this._isUTC) { + this.utcOffset(0, keepLocalTime); + this._isUTC = false; + + if (keepLocalTime) { + this.subtract(getDateOffset(this), 'm'); + } + } + + return this; + } + + function setOffsetToParsedOffset() { + if (this._tzm != null) { + this.utcOffset(this._tzm, false, true); + } else if (typeof this._i === 'string') { + var tZone = offsetFromString(matchOffset, this._i); + + if (tZone != null) { + this.utcOffset(tZone); + } else { + this.utcOffset(0, true); + } + } + + return this; + } + + function hasAlignedHourOffset(input) { + if (!this.isValid()) { + return false; + } + + input = input ? createLocal(input).utcOffset() : 0; + return (this.utcOffset() - input) % 60 === 0; + } + + function isDaylightSavingTime() { + return this.utcOffset() > this.clone().month(0).utcOffset() || this.utcOffset() > this.clone().month(5).utcOffset(); + } + + function isDaylightSavingTimeShifted() { + if (!isUndefined(this._isDSTShifted)) { + return this._isDSTShifted; + } + + var c = {}; + copyConfig(c, this); + c = prepareConfig(c); + + if (c._a) { + var other = c._isUTC ? createUTC(c._a) : createLocal(c._a); + this._isDSTShifted = this.isValid() && compareArrays(c._a, other.toArray()) > 0; + } else { + this._isDSTShifted = false; + } + + return this._isDSTShifted; + } + + function isLocal() { + return this.isValid() ? !this._isUTC : false; + } + + function isUtcOffset() { + return this.isValid() ? this._isUTC : false; + } + + function isUtc() { + return this.isValid() ? this._isUTC && this._offset === 0 : false; + } // ASP.NET json date format regex + + + var aspNetRegex = /^(\-|\+)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/; // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html + // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere + // and further modified to allow for strings containing both week and day + + var isoRegex = /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/; + + function createDuration(input, key) { + var duration = input, + // matching against regexp is expensive, do it on demand + match = null, + sign, + ret, + diffRes; + + if (isDuration(input)) { + duration = { + ms: input._milliseconds, + d: input._days, + M: input._months + }; + } else if (isNumber(input)) { + duration = {}; + + if (key) { + duration[key] = input; + } else { + duration.milliseconds = input; + } + } else if (!!(match = aspNetRegex.exec(input))) { + sign = match[1] === '-' ? -1 : 1; + duration = { + y: 0, + d: toInt(match[DATE]) * sign, + h: toInt(match[HOUR]) * sign, + m: toInt(match[MINUTE]) * sign, + s: toInt(match[SECOND]) * sign, + ms: toInt(absRound(match[MILLISECOND] * 1000)) * sign // the millisecond decimal point is included in the match + + }; + } else if (!!(match = isoRegex.exec(input))) { + sign = match[1] === '-' ? -1 : 1; + duration = { + y: parseIso(match[2], sign), + M: parseIso(match[3], sign), + w: parseIso(match[4], sign), + d: parseIso(match[5], sign), + h: parseIso(match[6], sign), + m: parseIso(match[7], sign), + s: parseIso(match[8], sign) + }; + } else if (duration == null) { + // checks for null or undefined + duration = {}; + } else if (typeof duration === 'object' && ('from' in duration || 'to' in duration)) { + diffRes = momentsDifference(createLocal(duration.from), createLocal(duration.to)); + duration = {}; + duration.ms = diffRes.milliseconds; + duration.M = diffRes.months; + } + + ret = new Duration(duration); + + if (isDuration(input) && hasOwnProp(input, '_locale')) { + ret._locale = input._locale; + } + + return ret; + } + + createDuration.fn = Duration.prototype; + createDuration.invalid = createInvalid$1; + + function parseIso(inp, sign) { + // We'd normally use ~~inp for this, but unfortunately it also + // converts floats to ints. + // inp may be undefined, so careful calling replace on it. + var res = inp && parseFloat(inp.replace(',', '.')); // apply sign while we're at it + + return (isNaN(res) ? 0 : res) * sign; + } + + function positiveMomentsDifference(base, other) { + var res = {}; + res.months = other.month() - base.month() + (other.year() - base.year()) * 12; + + if (base.clone().add(res.months, 'M').isAfter(other)) { + --res.months; + } + + res.milliseconds = +other - +base.clone().add(res.months, 'M'); + return res; + } + + function momentsDifference(base, other) { + var res; + + if (!(base.isValid() && other.isValid())) { + return { + milliseconds: 0, + months: 0 + }; + } + + other = cloneWithOffset(other, base); + + if (base.isBefore(other)) { + res = positiveMomentsDifference(base, other); + } else { + res = positiveMomentsDifference(other, base); + res.milliseconds = -res.milliseconds; + res.months = -res.months; + } + + return res; + } // TODO: remove 'name' arg after deprecation is removed + + + function createAdder(direction, name) { + return function (val, period) { + var dur, tmp; //invert the arguments, but complain about it + + if (period !== null && !isNaN(+period)) { + deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' + 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.'); + tmp = val; + val = period; + period = tmp; + } + + val = typeof val === 'string' ? +val : val; + dur = createDuration(val, period); + addSubtract(this, dur, direction); + return this; + }; + } + + function addSubtract(mom, duration, isAdding, updateOffset) { + var milliseconds = duration._milliseconds, + days = absRound(duration._days), + months = absRound(duration._months); + + if (!mom.isValid()) { + // No op + return; + } + + updateOffset = updateOffset == null ? true : updateOffset; + + if (months) { + setMonth(mom, get(mom, 'Month') + months * isAdding); + } + + if (days) { + set$1(mom, 'Date', get(mom, 'Date') + days * isAdding); + } + + if (milliseconds) { + mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding); + } + + if (updateOffset) { + hooks.updateOffset(mom, days || months); + } + } + + var add = createAdder(1, 'add'); + var subtract = createAdder(-1, 'subtract'); + + function getCalendarFormat(myMoment, now) { + var diff = myMoment.diff(now, 'days', true); + return diff < -6 ? 'sameElse' : diff < -1 ? 'lastWeek' : diff < 0 ? 'lastDay' : diff < 1 ? 'sameDay' : diff < 2 ? 'nextDay' : diff < 7 ? 'nextWeek' : 'sameElse'; + } + + function calendar$1(time, formats) { + // We want to compare the start of today, vs this. + // Getting start-of-today depends on whether we're local/utc/offset or not. + var now = time || createLocal(), + sod = cloneWithOffset(now, this).startOf('day'), + format = hooks.calendarFormat(this, sod) || 'sameElse'; + var output = formats && (isFunction(formats[format]) ? formats[format].call(this, now) : formats[format]); + return this.format(output || this.localeData().calendar(format, this, createLocal(now))); + } + + function clone() { + return new Moment(this); + } + + function isAfter(input, units) { + var localInput = isMoment(input) ? input : createLocal(input); + + if (!(this.isValid() && localInput.isValid())) { + return false; + } + + units = normalizeUnits(units) || 'millisecond'; + + if (units === 'millisecond') { + return this.valueOf() > localInput.valueOf(); + } else { + return localInput.valueOf() < this.clone().startOf(units).valueOf(); + } + } + + function isBefore(input, units) { + var localInput = isMoment(input) ? input : createLocal(input); + + if (!(this.isValid() && localInput.isValid())) { + return false; + } + + units = normalizeUnits(units) || 'millisecond'; + + if (units === 'millisecond') { + return this.valueOf() < localInput.valueOf(); + } else { + return this.clone().endOf(units).valueOf() < localInput.valueOf(); + } + } + + function isBetween(from, to, units, inclusivity) { + var localFrom = isMoment(from) ? from : createLocal(from), + localTo = isMoment(to) ? to : createLocal(to); + + if (!(this.isValid() && localFrom.isValid() && localTo.isValid())) { + return false; + } + + inclusivity = inclusivity || '()'; + return (inclusivity[0] === '(' ? this.isAfter(localFrom, units) : !this.isBefore(localFrom, units)) && (inclusivity[1] === ')' ? this.isBefore(localTo, units) : !this.isAfter(localTo, units)); + } + + function isSame(input, units) { + var localInput = isMoment(input) ? input : createLocal(input), + inputMs; + + if (!(this.isValid() && localInput.isValid())) { + return false; + } + + units = normalizeUnits(units) || 'millisecond'; + + if (units === 'millisecond') { + return this.valueOf() === localInput.valueOf(); + } else { + inputMs = localInput.valueOf(); + return this.clone().startOf(units).valueOf() <= inputMs && inputMs <= this.clone().endOf(units).valueOf(); + } + } + + function isSameOrAfter(input, units) { + return this.isSame(input, units) || this.isAfter(input, units); + } + + function isSameOrBefore(input, units) { + return this.isSame(input, units) || this.isBefore(input, units); + } + + function diff(input, units, asFloat) { + var that, zoneDelta, output; + + if (!this.isValid()) { + return NaN; + } + + that = cloneWithOffset(input, this); + + if (!that.isValid()) { + return NaN; + } + + zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4; + units = normalizeUnits(units); + + switch (units) { + case 'year': + output = monthDiff(this, that) / 12; + break; + + case 'month': + output = monthDiff(this, that); + break; + + case 'quarter': + output = monthDiff(this, that) / 3; + break; + + case 'second': + output = (this - that) / 1e3; + break; + // 1000 + + case 'minute': + output = (this - that) / 6e4; + break; + // 1000 * 60 + + case 'hour': + output = (this - that) / 36e5; + break; + // 1000 * 60 * 60 + + case 'day': + output = (this - that - zoneDelta) / 864e5; + break; + // 1000 * 60 * 60 * 24, negate dst + + case 'week': + output = (this - that - zoneDelta) / 6048e5; + break; + // 1000 * 60 * 60 * 24 * 7, negate dst + + default: + output = this - that; + } + + return asFloat ? output : absFloor(output); + } + + function monthDiff(a, b) { + // difference in months + var wholeMonthDiff = (b.year() - a.year()) * 12 + (b.month() - a.month()), + // b is in (anchor - 1 month, anchor + 1 month) + anchor = a.clone().add(wholeMonthDiff, 'months'), + anchor2, + adjust; + + if (b - anchor < 0) { + anchor2 = a.clone().add(wholeMonthDiff - 1, 'months'); // linear across the month + + adjust = (b - anchor) / (anchor - anchor2); + } else { + anchor2 = a.clone().add(wholeMonthDiff + 1, 'months'); // linear across the month + + adjust = (b - anchor) / (anchor2 - anchor); + } //check for negative zero, return zero if negative zero + + + return -(wholeMonthDiff + adjust) || 0; + } + + hooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ'; + hooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]'; + + function toString() { + return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ'); + } + + function toISOString(keepOffset) { + if (!this.isValid()) { + return null; + } + + var utc = keepOffset !== true; + var m = utc ? this.clone().utc() : this; + + if (m.year() < 0 || m.year() > 9999) { + return formatMoment(m, utc ? 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYYYY-MM-DD[T]HH:mm:ss.SSSZ'); + } + + if (isFunction(Date.prototype.toISOString)) { + // native implementation is ~50x faster, use it when we can + if (utc) { + return this.toDate().toISOString(); + } else { + return new Date(this.valueOf() + this.utcOffset() * 60 * 1000).toISOString().replace('Z', formatMoment(m, 'Z')); + } + } + + return formatMoment(m, utc ? 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYY-MM-DD[T]HH:mm:ss.SSSZ'); + } + /** + * Return a human readable representation of a moment that can + * also be evaluated to get a new moment which is the same + * + * @link https://nodejs.org/dist/latest/docs/api/util.html#util_custom_inspect_function_on_objects + */ + + + function inspect() { + if (!this.isValid()) { + return 'moment.invalid(/* ' + this._i + ' */)'; + } + + var func = 'moment'; + var zone = ''; + + if (!this.isLocal()) { + func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone'; + zone = 'Z'; + } + + var prefix = '[' + func + '("]'; + var year = 0 <= this.year() && this.year() <= 9999 ? 'YYYY' : 'YYYYYY'; + var datetime = '-MM-DD[T]HH:mm:ss.SSS'; + var suffix = zone + '[")]'; + return this.format(prefix + year + datetime + suffix); + } + + function format(inputString) { + if (!inputString) { + inputString = this.isUtc() ? hooks.defaultFormatUtc : hooks.defaultFormat; + } + + var output = formatMoment(this, inputString); + return this.localeData().postformat(output); + } + + function from(time, withoutSuffix) { + if (this.isValid() && (isMoment(time) && time.isValid() || createLocal(time).isValid())) { + return createDuration({ + to: this, + from: time + }).locale(this.locale()).humanize(!withoutSuffix); + } else { + return this.localeData().invalidDate(); + } + } + + function fromNow(withoutSuffix) { + return this.from(createLocal(), withoutSuffix); + } + + function to(time, withoutSuffix) { + if (this.isValid() && (isMoment(time) && time.isValid() || createLocal(time).isValid())) { + return createDuration({ + from: this, + to: time + }).locale(this.locale()).humanize(!withoutSuffix); + } else { + return this.localeData().invalidDate(); + } + } + + function toNow(withoutSuffix) { + return this.to(createLocal(), withoutSuffix); + } // If passed a locale key, it will set the locale for this + // instance. Otherwise, it will return the locale configuration + // variables for this instance. + + + function locale(key) { + var newLocaleData; + + if (key === undefined) { + return this._locale._abbr; + } else { + newLocaleData = getLocale(key); + + if (newLocaleData != null) { + this._locale = newLocaleData; + } + + return this; + } + } + + var lang = deprecate('moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.', function (key) { + if (key === undefined) { + return this.localeData(); + } else { + return this.locale(key); + } + }); + + function localeData() { + return this._locale; + } + + var MS_PER_SECOND = 1000; + var MS_PER_MINUTE = 60 * MS_PER_SECOND; + var MS_PER_HOUR = 60 * MS_PER_MINUTE; + var MS_PER_400_YEARS = (365 * 400 + 97) * 24 * MS_PER_HOUR; // actual modulo - handles negative numbers (for dates before 1970): + + function mod$1(dividend, divisor) { + return (dividend % divisor + divisor) % divisor; + } + + function localStartOfDate(y, m, d) { + // the date constructor remaps years 0-99 to 1900-1999 + if (y < 100 && y >= 0) { + // preserve leap years using a full 400 year cycle, then reset + return new Date(y + 400, m, d) - MS_PER_400_YEARS; + } else { + return new Date(y, m, d).valueOf(); + } + } + + function utcStartOfDate(y, m, d) { + // Date.UTC remaps years 0-99 to 1900-1999 + if (y < 100 && y >= 0) { + // preserve leap years using a full 400 year cycle, then reset + return Date.UTC(y + 400, m, d) - MS_PER_400_YEARS; + } else { + return Date.UTC(y, m, d); + } + } + + function startOf(units) { + var time; + units = normalizeUnits(units); + + if (units === undefined || units === 'millisecond' || !this.isValid()) { + return this; + } + + var startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate; + + switch (units) { + case 'year': + time = startOfDate(this.year(), 0, 1); + break; + + case 'quarter': + time = startOfDate(this.year(), this.month() - this.month() % 3, 1); + break; + + case 'month': + time = startOfDate(this.year(), this.month(), 1); + break; + + case 'week': + time = startOfDate(this.year(), this.month(), this.date() - this.weekday()); + break; + + case 'isoWeek': + time = startOfDate(this.year(), this.month(), this.date() - (this.isoWeekday() - 1)); + break; + + case 'day': + case 'date': + time = startOfDate(this.year(), this.month(), this.date()); + break; + + case 'hour': + time = this._d.valueOf(); + time -= mod$1(time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE), MS_PER_HOUR); + break; + + case 'minute': + time = this._d.valueOf(); + time -= mod$1(time, MS_PER_MINUTE); + break; + + case 'second': + time = this._d.valueOf(); + time -= mod$1(time, MS_PER_SECOND); + break; + } + + this._d.setTime(time); + + hooks.updateOffset(this, true); + return this; + } + + function endOf(units) { + var time; + units = normalizeUnits(units); + + if (units === undefined || units === 'millisecond' || !this.isValid()) { + return this; + } + + var startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate; + + switch (units) { + case 'year': + time = startOfDate(this.year() + 1, 0, 1) - 1; + break; + + case 'quarter': + time = startOfDate(this.year(), this.month() - this.month() % 3 + 3, 1) - 1; + break; + + case 'month': + time = startOfDate(this.year(), this.month() + 1, 1) - 1; + break; + + case 'week': + time = startOfDate(this.year(), this.month(), this.date() - this.weekday() + 7) - 1; + break; + + case 'isoWeek': + time = startOfDate(this.year(), this.month(), this.date() - (this.isoWeekday() - 1) + 7) - 1; + break; + + case 'day': + case 'date': + time = startOfDate(this.year(), this.month(), this.date() + 1) - 1; + break; + + case 'hour': + time = this._d.valueOf(); + time += MS_PER_HOUR - mod$1(time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE), MS_PER_HOUR) - 1; + break; + + case 'minute': + time = this._d.valueOf(); + time += MS_PER_MINUTE - mod$1(time, MS_PER_MINUTE) - 1; + break; + + case 'second': + time = this._d.valueOf(); + time += MS_PER_SECOND - mod$1(time, MS_PER_SECOND) - 1; + break; + } + + this._d.setTime(time); + + hooks.updateOffset(this, true); + return this; + } + + function valueOf() { + return this._d.valueOf() - (this._offset || 0) * 60000; + } + + function unix() { + return Math.floor(this.valueOf() / 1000); + } + + function toDate() { + return new Date(this.valueOf()); + } + + function toArray() { + var m = this; + return [m.year(), m.month(), m.date(), m.hour(), m.minute(), m.second(), m.millisecond()]; + } + + function toObject() { + var m = this; + return { + years: m.year(), + months: m.month(), + date: m.date(), + hours: m.hours(), + minutes: m.minutes(), + seconds: m.seconds(), + milliseconds: m.milliseconds() + }; + } + + function toJSON() { + // new Date(NaN).toJSON() === null + return this.isValid() ? this.toISOString() : null; + } + + function isValid$2() { + return isValid(this); + } + + function parsingFlags() { + return extend({}, getParsingFlags(this)); + } + + function invalidAt() { + return getParsingFlags(this).overflow; + } + + function creationData() { + return { + input: this._i, + format: this._f, + locale: this._locale, + isUTC: this._isUTC, + strict: this._strict + }; + } // FORMATTING + + + addFormatToken(0, ['gg', 2], 0, function () { + return this.weekYear() % 100; + }); + addFormatToken(0, ['GG', 2], 0, function () { + return this.isoWeekYear() % 100; + }); + + function addWeekYearFormatToken(token, getter) { + addFormatToken(0, [token, token.length], 0, getter); + } + + addWeekYearFormatToken('gggg', 'weekYear'); + addWeekYearFormatToken('ggggg', 'weekYear'); + addWeekYearFormatToken('GGGG', 'isoWeekYear'); + addWeekYearFormatToken('GGGGG', 'isoWeekYear'); // ALIASES + + addUnitAlias('weekYear', 'gg'); + addUnitAlias('isoWeekYear', 'GG'); // PRIORITY + + addUnitPriority('weekYear', 1); + addUnitPriority('isoWeekYear', 1); // PARSING + + addRegexToken('G', matchSigned); + addRegexToken('g', matchSigned); + addRegexToken('GG', match1to2, match2); + addRegexToken('gg', match1to2, match2); + addRegexToken('GGGG', match1to4, match4); + addRegexToken('gggg', match1to4, match4); + addRegexToken('GGGGG', match1to6, match6); + addRegexToken('ggggg', match1to6, match6); + addWeekParseToken(['gggg', 'ggggg', 'GGGG', 'GGGGG'], function (input, week, config, token) { + week[token.substr(0, 2)] = toInt(input); + }); + addWeekParseToken(['gg', 'GG'], function (input, week, config, token) { + week[token] = hooks.parseTwoDigitYear(input); + }); // MOMENTS + + function getSetWeekYear(input) { + return getSetWeekYearHelper.call(this, input, this.week(), this.weekday(), this.localeData()._week.dow, this.localeData()._week.doy); + } + + function getSetISOWeekYear(input) { + return getSetWeekYearHelper.call(this, input, this.isoWeek(), this.isoWeekday(), 1, 4); + } + + function getISOWeeksInYear() { + return weeksInYear(this.year(), 1, 4); + } + + function getWeeksInYear() { + var weekInfo = this.localeData()._week; + + return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy); + } + + function getSetWeekYearHelper(input, week, weekday, dow, doy) { + var weeksTarget; + + if (input == null) { + return weekOfYear(this, dow, doy).year; + } else { + weeksTarget = weeksInYear(input, dow, doy); + + if (week > weeksTarget) { + week = weeksTarget; + } + + return setWeekAll.call(this, input, week, weekday, dow, doy); + } + } + + function setWeekAll(weekYear, week, weekday, dow, doy) { + var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy), + date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear); + this.year(date.getUTCFullYear()); + this.month(date.getUTCMonth()); + this.date(date.getUTCDate()); + return this; + } // FORMATTING + + + addFormatToken('Q', 0, 'Qo', 'quarter'); // ALIASES + + addUnitAlias('quarter', 'Q'); // PRIORITY + + addUnitPriority('quarter', 7); // PARSING + + addRegexToken('Q', match1); + addParseToken('Q', function (input, array) { + array[MONTH] = (toInt(input) - 1) * 3; + }); // MOMENTS + + function getSetQuarter(input) { + return input == null ? Math.ceil((this.month() + 1) / 3) : this.month((input - 1) * 3 + this.month() % 3); + } // FORMATTING + + + addFormatToken('D', ['DD', 2], 'Do', 'date'); // ALIASES + + addUnitAlias('date', 'D'); // PRIORITY + + addUnitPriority('date', 9); // PARSING + + addRegexToken('D', match1to2); + addRegexToken('DD', match1to2, match2); + addRegexToken('Do', function (isStrict, locale) { + // TODO: Remove "ordinalParse" fallback in next major release. + return isStrict ? locale._dayOfMonthOrdinalParse || locale._ordinalParse : locale._dayOfMonthOrdinalParseLenient; + }); + addParseToken(['D', 'DD'], DATE); + addParseToken('Do', function (input, array) { + array[DATE] = toInt(input.match(match1to2)[0]); + }); // MOMENTS + + var getSetDayOfMonth = makeGetSet('Date', true); // FORMATTING + + addFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear'); // ALIASES + + addUnitAlias('dayOfYear', 'DDD'); // PRIORITY + + addUnitPriority('dayOfYear', 4); // PARSING + + addRegexToken('DDD', match1to3); + addRegexToken('DDDD', match3); + addParseToken(['DDD', 'DDDD'], function (input, array, config) { + config._dayOfYear = toInt(input); + }); // HELPERS + // MOMENTS + + function getSetDayOfYear(input) { + var dayOfYear = Math.round((this.clone().startOf('day') - this.clone().startOf('year')) / 864e5) + 1; + return input == null ? dayOfYear : this.add(input - dayOfYear, 'd'); + } // FORMATTING + + + addFormatToken('m', ['mm', 2], 0, 'minute'); // ALIASES + + addUnitAlias('minute', 'm'); // PRIORITY + + addUnitPriority('minute', 14); // PARSING + + addRegexToken('m', match1to2); + addRegexToken('mm', match1to2, match2); + addParseToken(['m', 'mm'], MINUTE); // MOMENTS + + var getSetMinute = makeGetSet('Minutes', false); // FORMATTING + + addFormatToken('s', ['ss', 2], 0, 'second'); // ALIASES + + addUnitAlias('second', 's'); // PRIORITY + + addUnitPriority('second', 15); // PARSING + + addRegexToken('s', match1to2); + addRegexToken('ss', match1to2, match2); + addParseToken(['s', 'ss'], SECOND); // MOMENTS + + var getSetSecond = makeGetSet('Seconds', false); // FORMATTING + + addFormatToken('S', 0, 0, function () { + return ~~(this.millisecond() / 100); + }); + addFormatToken(0, ['SS', 2], 0, function () { + return ~~(this.millisecond() / 10); + }); + addFormatToken(0, ['SSS', 3], 0, 'millisecond'); + addFormatToken(0, ['SSSS', 4], 0, function () { + return this.millisecond() * 10; + }); + addFormatToken(0, ['SSSSS', 5], 0, function () { + return this.millisecond() * 100; + }); + addFormatToken(0, ['SSSSSS', 6], 0, function () { + return this.millisecond() * 1000; + }); + addFormatToken(0, ['SSSSSSS', 7], 0, function () { + return this.millisecond() * 10000; + }); + addFormatToken(0, ['SSSSSSSS', 8], 0, function () { + return this.millisecond() * 100000; + }); + addFormatToken(0, ['SSSSSSSSS', 9], 0, function () { + return this.millisecond() * 1000000; + }); // ALIASES + + addUnitAlias('millisecond', 'ms'); // PRIORITY + + addUnitPriority('millisecond', 16); // PARSING + + addRegexToken('S', match1to3, match1); + addRegexToken('SS', match1to3, match2); + addRegexToken('SSS', match1to3, match3); + var token; + + for (token = 'SSSS'; token.length <= 9; token += 'S') { + addRegexToken(token, matchUnsigned); + } + + function parseMs(input, array) { + array[MILLISECOND] = toInt(('0.' + input) * 1000); + } + + for (token = 'S'; token.length <= 9; token += 'S') { + addParseToken(token, parseMs); + } // MOMENTS + + + var getSetMillisecond = makeGetSet('Milliseconds', false); // FORMATTING + + addFormatToken('z', 0, 0, 'zoneAbbr'); + addFormatToken('zz', 0, 0, 'zoneName'); // MOMENTS + + function getZoneAbbr() { + return this._isUTC ? 'UTC' : ''; + } + + function getZoneName() { + return this._isUTC ? 'Coordinated Universal Time' : ''; + } + + var proto = Moment.prototype; + proto.add = add; + proto.calendar = calendar$1; + proto.clone = clone; + proto.diff = diff; + proto.endOf = endOf; + proto.format = format; + proto.from = from; + proto.fromNow = fromNow; + proto.to = to; + proto.toNow = toNow; + proto.get = stringGet; + proto.invalidAt = invalidAt; + proto.isAfter = isAfter; + proto.isBefore = isBefore; + proto.isBetween = isBetween; + proto.isSame = isSame; + proto.isSameOrAfter = isSameOrAfter; + proto.isSameOrBefore = isSameOrBefore; + proto.isValid = isValid$2; + proto.lang = lang; + proto.locale = locale; + proto.localeData = localeData; + proto.max = prototypeMax; + proto.min = prototypeMin; + proto.parsingFlags = parsingFlags; + proto.set = stringSet; + proto.startOf = startOf; + proto.subtract = subtract; + proto.toArray = toArray; + proto.toObject = toObject; + proto.toDate = toDate; + proto.toISOString = toISOString; + proto.inspect = inspect; + proto.toJSON = toJSON; + proto.toString = toString; + proto.unix = unix; + proto.valueOf = valueOf; + proto.creationData = creationData; + proto.year = getSetYear; + proto.isLeapYear = getIsLeapYear; + proto.weekYear = getSetWeekYear; + proto.isoWeekYear = getSetISOWeekYear; + proto.quarter = proto.quarters = getSetQuarter; + proto.month = getSetMonth; + proto.daysInMonth = getDaysInMonth; + proto.week = proto.weeks = getSetWeek; + proto.isoWeek = proto.isoWeeks = getSetISOWeek; + proto.weeksInYear = getWeeksInYear; + proto.isoWeeksInYear = getISOWeeksInYear; + proto.date = getSetDayOfMonth; + proto.day = proto.days = getSetDayOfWeek; + proto.weekday = getSetLocaleDayOfWeek; + proto.isoWeekday = getSetISODayOfWeek; + proto.dayOfYear = getSetDayOfYear; + proto.hour = proto.hours = getSetHour; + proto.minute = proto.minutes = getSetMinute; + proto.second = proto.seconds = getSetSecond; + proto.millisecond = proto.milliseconds = getSetMillisecond; + proto.utcOffset = getSetOffset; + proto.utc = setOffsetToUTC; + proto.local = setOffsetToLocal; + proto.parseZone = setOffsetToParsedOffset; + proto.hasAlignedHourOffset = hasAlignedHourOffset; + proto.isDST = isDaylightSavingTime; + proto.isLocal = isLocal; + proto.isUtcOffset = isUtcOffset; + proto.isUtc = isUtc; + proto.isUTC = isUtc; + proto.zoneAbbr = getZoneAbbr; + proto.zoneName = getZoneName; + proto.dates = deprecate('dates accessor is deprecated. Use date instead.', getSetDayOfMonth); + proto.months = deprecate('months accessor is deprecated. Use month instead', getSetMonth); + proto.years = deprecate('years accessor is deprecated. Use year instead', getSetYear); + proto.zone = deprecate('moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/', getSetZone); + proto.isDSTShifted = deprecate('isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information', isDaylightSavingTimeShifted); + + function createUnix(input) { + return createLocal(input * 1000); + } + + function createInZone() { + return createLocal.apply(null, arguments).parseZone(); + } + + function preParsePostFormat(string) { + return string; + } + + var proto$1 = Locale.prototype; + proto$1.calendar = calendar; + proto$1.longDateFormat = longDateFormat; + proto$1.invalidDate = invalidDate; + proto$1.ordinal = ordinal; + proto$1.preparse = preParsePostFormat; + proto$1.postformat = preParsePostFormat; + proto$1.relativeTime = relativeTime; + proto$1.pastFuture = pastFuture; + proto$1.set = set; + proto$1.months = localeMonths; + proto$1.monthsShort = localeMonthsShort; + proto$1.monthsParse = localeMonthsParse; + proto$1.monthsRegex = monthsRegex; + proto$1.monthsShortRegex = monthsShortRegex; + proto$1.week = localeWeek; + proto$1.firstDayOfYear = localeFirstDayOfYear; + proto$1.firstDayOfWeek = localeFirstDayOfWeek; + proto$1.weekdays = localeWeekdays; + proto$1.weekdaysMin = localeWeekdaysMin; + proto$1.weekdaysShort = localeWeekdaysShort; + proto$1.weekdaysParse = localeWeekdaysParse; + proto$1.weekdaysRegex = weekdaysRegex; + proto$1.weekdaysShortRegex = weekdaysShortRegex; + proto$1.weekdaysMinRegex = weekdaysMinRegex; + proto$1.isPM = localeIsPM; + proto$1.meridiem = localeMeridiem; + + function get$1(format, index, field, setter) { + var locale = getLocale(); + var utc = createUTC().set(setter, index); + return locale[field](utc, format); + } + + function listMonthsImpl(format, index, field) { + if (isNumber(format)) { + index = format; + format = undefined; + } + + format = format || ''; + + if (index != null) { + return get$1(format, index, field, 'month'); + } + + var i; + var out = []; + + for (i = 0; i < 12; i++) { + out[i] = get$1(format, i, field, 'month'); + } + + return out; + } // () + // (5) + // (fmt, 5) + // (fmt) + // (true) + // (true, 5) + // (true, fmt, 5) + // (true, fmt) + + + function listWeekdaysImpl(localeSorted, format, index, field) { + if (typeof localeSorted === 'boolean') { + if (isNumber(format)) { + index = format; + format = undefined; + } + + format = format || ''; + } else { + format = localeSorted; + index = format; + localeSorted = false; + + if (isNumber(format)) { + index = format; + format = undefined; + } + + format = format || ''; + } + + var locale = getLocale(), + shift = localeSorted ? locale._week.dow : 0; + + if (index != null) { + return get$1(format, (index + shift) % 7, field, 'day'); + } + + var i; + var out = []; + + for (i = 0; i < 7; i++) { + out[i] = get$1(format, (i + shift) % 7, field, 'day'); + } + + return out; + } + + function listMonths(format, index) { + return listMonthsImpl(format, index, 'months'); + } + + function listMonthsShort(format, index) { + return listMonthsImpl(format, index, 'monthsShort'); + } + + function listWeekdays(localeSorted, format, index) { + return listWeekdaysImpl(localeSorted, format, index, 'weekdays'); + } + + function listWeekdaysShort(localeSorted, format, index) { + return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort'); + } + + function listWeekdaysMin(localeSorted, format, index) { + return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin'); + } + + getSetGlobalLocale('en', { + dayOfMonthOrdinalParse: /\d{1,2}(th|st|nd|rd)/, + ordinal: function (number) { + var b = number % 10, + output = toInt(number % 100 / 10) === 1 ? 'th' : b === 1 ? 'st' : b === 2 ? 'nd' : b === 3 ? 'rd' : 'th'; + return number + output; + } + }); // Side effect imports + + hooks.lang = deprecate('moment.lang is deprecated. Use moment.locale instead.', getSetGlobalLocale); + hooks.langData = deprecate('moment.langData is deprecated. Use moment.localeData instead.', getLocale); + var mathAbs = Math.abs; + + function abs() { + var data = this._data; + this._milliseconds = mathAbs(this._milliseconds); + this._days = mathAbs(this._days); + this._months = mathAbs(this._months); + data.milliseconds = mathAbs(data.milliseconds); + data.seconds = mathAbs(data.seconds); + data.minutes = mathAbs(data.minutes); + data.hours = mathAbs(data.hours); + data.months = mathAbs(data.months); + data.years = mathAbs(data.years); + return this; + } + + function addSubtract$1(duration, input, value, direction) { + var other = createDuration(input, value); + duration._milliseconds += direction * other._milliseconds; + duration._days += direction * other._days; + duration._months += direction * other._months; + return duration._bubble(); + } // supports only 2.0-style add(1, 's') or add(duration) + + + function add$1(input, value) { + return addSubtract$1(this, input, value, 1); + } // supports only 2.0-style subtract(1, 's') or subtract(duration) + + + function subtract$1(input, value) { + return addSubtract$1(this, input, value, -1); + } + + function absCeil(number) { + if (number < 0) { + return Math.floor(number); + } else { + return Math.ceil(number); + } + } + + function bubble() { + var milliseconds = this._milliseconds; + var days = this._days; + var months = this._months; + var data = this._data; + var seconds, minutes, hours, years, monthsFromDays; // if we have a mix of positive and negative values, bubble down first + // check: https://github.com/moment/moment/issues/2166 + + if (!(milliseconds >= 0 && days >= 0 && months >= 0 || milliseconds <= 0 && days <= 0 && months <= 0)) { + milliseconds += absCeil(monthsToDays(months) + days) * 864e5; + days = 0; + months = 0; + } // The following code bubbles up values, see the tests for + // examples of what that means. + + + data.milliseconds = milliseconds % 1000; + seconds = absFloor(milliseconds / 1000); + data.seconds = seconds % 60; + minutes = absFloor(seconds / 60); + data.minutes = minutes % 60; + hours = absFloor(minutes / 60); + data.hours = hours % 24; + days += absFloor(hours / 24); // convert days to months + + monthsFromDays = absFloor(daysToMonths(days)); + months += monthsFromDays; + days -= absCeil(monthsToDays(monthsFromDays)); // 12 months -> 1 year + + years = absFloor(months / 12); + months %= 12; + data.days = days; + data.months = months; + data.years = years; + return this; + } + + function daysToMonths(days) { + // 400 years have 146097 days (taking into account leap year rules) + // 400 years have 12 months === 4800 + return days * 4800 / 146097; + } + + function monthsToDays(months) { + // the reverse of daysToMonths + return months * 146097 / 4800; + } + + function as(units) { + if (!this.isValid()) { + return NaN; + } + + var days; + var months; + var milliseconds = this._milliseconds; + units = normalizeUnits(units); + + if (units === 'month' || units === 'quarter' || units === 'year') { + days = this._days + milliseconds / 864e5; + months = this._months + daysToMonths(days); + + switch (units) { + case 'month': + return months; + + case 'quarter': + return months / 3; + + case 'year': + return months / 12; + } + } else { + // handle milliseconds separately because of floating point math errors (issue #1867) + days = this._days + Math.round(monthsToDays(this._months)); + + switch (units) { + case 'week': + return days / 7 + milliseconds / 6048e5; + + case 'day': + return days + milliseconds / 864e5; + + case 'hour': + return days * 24 + milliseconds / 36e5; + + case 'minute': + return days * 1440 + milliseconds / 6e4; + + case 'second': + return days * 86400 + milliseconds / 1000; + // Math.floor prevents floating point math errors here + + case 'millisecond': + return Math.floor(days * 864e5) + milliseconds; + + default: + throw new Error('Unknown unit ' + units); + } + } + } // TODO: Use this.as('ms')? + + + function valueOf$1() { + if (!this.isValid()) { + return NaN; + } + + return this._milliseconds + this._days * 864e5 + this._months % 12 * 2592e6 + toInt(this._months / 12) * 31536e6; + } + + function makeAs(alias) { + return function () { + return this.as(alias); + }; + } + + var asMilliseconds = makeAs('ms'); + var asSeconds = makeAs('s'); + var asMinutes = makeAs('m'); + var asHours = makeAs('h'); + var asDays = makeAs('d'); + var asWeeks = makeAs('w'); + var asMonths = makeAs('M'); + var asQuarters = makeAs('Q'); + var asYears = makeAs('y'); + + function clone$1() { + return createDuration(this); + } + + function get$2(units) { + units = normalizeUnits(units); + return this.isValid() ? this[units + 's']() : NaN; + } + + function makeGetter(name) { + return function () { + return this.isValid() ? this._data[name] : NaN; + }; + } + + var milliseconds = makeGetter('milliseconds'); + var seconds = makeGetter('seconds'); + var minutes = makeGetter('minutes'); + var hours = makeGetter('hours'); + var days = makeGetter('days'); + var months = makeGetter('months'); + var years = makeGetter('years'); + + function weeks() { + return absFloor(this.days() / 7); + } + + var round = Math.round; + var thresholds = { + ss: 44, + // a few seconds to seconds + s: 45, + // seconds to minute + m: 45, + // minutes to hour + h: 22, + // hours to day + d: 26, + // days to month + M: 11 // months to year + + }; // helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize + + function substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) { + return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture); + } + + function relativeTime$1(posNegDuration, withoutSuffix, locale) { + var duration = createDuration(posNegDuration).abs(); + var seconds = round(duration.as('s')); + var minutes = round(duration.as('m')); + var hours = round(duration.as('h')); + var days = round(duration.as('d')); + var months = round(duration.as('M')); + var years = round(duration.as('y')); + var a = seconds <= thresholds.ss && ['s', seconds] || seconds < thresholds.s && ['ss', seconds] || minutes <= 1 && ['m'] || minutes < thresholds.m && ['mm', minutes] || hours <= 1 && ['h'] || hours < thresholds.h && ['hh', hours] || days <= 1 && ['d'] || days < thresholds.d && ['dd', days] || months <= 1 && ['M'] || months < thresholds.M && ['MM', months] || years <= 1 && ['y'] || ['yy', years]; + a[2] = withoutSuffix; + a[3] = +posNegDuration > 0; + a[4] = locale; + return substituteTimeAgo.apply(null, a); + } // This function allows you to set the rounding function for relative time strings + + + function getSetRelativeTimeRounding(roundingFunction) { + if (roundingFunction === undefined) { + return round; + } + + if (typeof roundingFunction === 'function') { + round = roundingFunction; + return true; + } + + return false; + } // This function allows you to set a threshold for relative time strings + + + function getSetRelativeTimeThreshold(threshold, limit) { + if (thresholds[threshold] === undefined) { + return false; + } + + if (limit === undefined) { + return thresholds[threshold]; + } + + thresholds[threshold] = limit; + + if (threshold === 's') { + thresholds.ss = limit - 1; + } + + return true; + } + + function humanize(withSuffix) { + if (!this.isValid()) { + return this.localeData().invalidDate(); + } + + var locale = this.localeData(); + var output = relativeTime$1(this, !withSuffix, locale); + + if (withSuffix) { + output = locale.pastFuture(+this, output); + } + + return locale.postformat(output); + } + + var abs$1 = Math.abs; + + function sign(x) { + return (x > 0) - (x < 0) || +x; + } + + function toISOString$1() { + // for ISO strings we do not use the normal bubbling rules: + // * milliseconds bubble up until they become hours + // * days do not bubble at all + // * months bubble up until they become years + // This is because there is no context-free conversion between hours and days + // (think of clock changes) + // and also not between days and months (28-31 days per month) + if (!this.isValid()) { + return this.localeData().invalidDate(); + } + + var seconds = abs$1(this._milliseconds) / 1000; + var days = abs$1(this._days); + var months = abs$1(this._months); + var minutes, hours, years; // 3600 seconds -> 60 minutes -> 1 hour + + minutes = absFloor(seconds / 60); + hours = absFloor(minutes / 60); + seconds %= 60; + minutes %= 60; // 12 months -> 1 year + + years = absFloor(months / 12); + months %= 12; // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js + + var Y = years; + var M = months; + var D = days; + var h = hours; + var m = minutes; + var s = seconds ? seconds.toFixed(3).replace(/\.?0+$/, '') : ''; + var total = this.asSeconds(); + + if (!total) { + // this is the same as C#'s (Noda) and python (isodate)... + // but not other JS (goog.date) + return 'P0D'; + } + + var totalSign = total < 0 ? '-' : ''; + var ymSign = sign(this._months) !== sign(total) ? '-' : ''; + var daysSign = sign(this._days) !== sign(total) ? '-' : ''; + var hmsSign = sign(this._milliseconds) !== sign(total) ? '-' : ''; + return totalSign + 'P' + (Y ? ymSign + Y + 'Y' : '') + (M ? ymSign + M + 'M' : '') + (D ? daysSign + D + 'D' : '') + (h || m || s ? 'T' : '') + (h ? hmsSign + h + 'H' : '') + (m ? hmsSign + m + 'M' : '') + (s ? hmsSign + s + 'S' : ''); + } + + var proto$2 = Duration.prototype; + proto$2.isValid = isValid$1; + proto$2.abs = abs; + proto$2.add = add$1; + proto$2.subtract = subtract$1; + proto$2.as = as; + proto$2.asMilliseconds = asMilliseconds; + proto$2.asSeconds = asSeconds; + proto$2.asMinutes = asMinutes; + proto$2.asHours = asHours; + proto$2.asDays = asDays; + proto$2.asWeeks = asWeeks; + proto$2.asMonths = asMonths; + proto$2.asQuarters = asQuarters; + proto$2.asYears = asYears; + proto$2.valueOf = valueOf$1; + proto$2._bubble = bubble; + proto$2.clone = clone$1; + proto$2.get = get$2; + proto$2.milliseconds = milliseconds; + proto$2.seconds = seconds; + proto$2.minutes = minutes; + proto$2.hours = hours; + proto$2.days = days; + proto$2.weeks = weeks; + proto$2.months = months; + proto$2.years = years; + proto$2.humanize = humanize; + proto$2.toISOString = toISOString$1; + proto$2.toString = toISOString$1; + proto$2.toJSON = toISOString$1; + proto$2.locale = locale; + proto$2.localeData = localeData; + proto$2.toIsoString = deprecate('toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)', toISOString$1); + proto$2.lang = lang; // Side effect imports + // FORMATTING + + addFormatToken('X', 0, 0, 'unix'); + addFormatToken('x', 0, 0, 'valueOf'); // PARSING + + addRegexToken('x', matchSigned); + addRegexToken('X', matchTimestamp); + addParseToken('X', function (input, array, config) { + config._d = new Date(parseFloat(input, 10) * 1000); + }); + addParseToken('x', function (input, array, config) { + config._d = new Date(toInt(input)); + }); // Side effect imports + + hooks.version = '2.24.0'; + setHookCallback(createLocal); + hooks.fn = proto; + hooks.min = min; + hooks.max = max; + hooks.now = now; + hooks.utc = createUTC; + hooks.unix = createUnix; + hooks.months = listMonths; + hooks.isDate = isDate; + hooks.locale = getSetGlobalLocale; + hooks.invalid = createInvalid; + hooks.duration = createDuration; + hooks.isMoment = isMoment; + hooks.weekdays = listWeekdays; + hooks.parseZone = createInZone; + hooks.localeData = getLocale; + hooks.isDuration = isDuration; + hooks.monthsShort = listMonthsShort; + hooks.weekdaysMin = listWeekdaysMin; + hooks.defineLocale = defineLocale; + hooks.updateLocale = updateLocale; + hooks.locales = listLocales; + hooks.weekdaysShort = listWeekdaysShort; + hooks.normalizeUnits = normalizeUnits; + hooks.relativeTimeRounding = getSetRelativeTimeRounding; + hooks.relativeTimeThreshold = getSetRelativeTimeThreshold; + hooks.calendarFormat = getCalendarFormat; + hooks.prototype = proto; // currently HTML5 input type only supports 24-hour formats + + hooks.HTML5_FMT = { + DATETIME_LOCAL: 'YYYY-MM-DDTHH:mm', + // + DATETIME_LOCAL_SECONDS: 'YYYY-MM-DDTHH:mm:ss', + // + DATETIME_LOCAL_MS: 'YYYY-MM-DDTHH:mm:ss.SSS', + // + DATE: 'YYYY-MM-DD', + // + TIME: 'HH:mm', + // + TIME_SECONDS: 'HH:mm:ss', + // + TIME_MS: 'HH:mm:ss.SSS', + // + WEEK: 'GGGG-[W]WW', + // + MONTH: 'YYYY-MM' // + + }; + return hooks; + }); + }); // Maps for number <-> hex string conversion + + var byteToHex = []; + + for (var i$1 = 0; i$1 < 256; i$1++) { + byteToHex[i$1] = (i$1 + 0x100).toString(16).substr(1); + } + /** + * Represent binary UUID into it's string representation. + * + * @param buf - Buffer containing UUID bytes. + * @param offset - Offset from the start of the buffer where the UUID is saved (not needed if the buffer starts with the UUID). + * + * @returns String representation of the UUID. + */ + + + function stringifyUUID(buf, offset) { + var i = offset || 0; + var bth = byteToHex; + return bth[buf[i++]] + bth[buf[i++]] + bth[buf[i++]] + bth[buf[i++]] + '-' + bth[buf[i++]] + bth[buf[i++]] + '-' + bth[buf[i++]] + bth[buf[i++]] + '-' + bth[buf[i++]] + bth[buf[i++]] + '-' + bth[buf[i++]] + bth[buf[i++]] + bth[buf[i++]] + bth[buf[i++]] + bth[buf[i++]] + bth[buf[i++]]; + } + /** + * Generate 16 random bytes to be used as a base for UUID. + * + * @ignore + */ + + + var random = function () { + if (typeof crypto !== 'undefined' && crypto.getRandomValues) { + // WHATWG crypto-based RNG - http://wiki.whatwg.org/wiki/Crypto + // Moderately fast, high quality + var _rnds8 = new Uint8Array(16); + + return function whatwgRNG() { + crypto.getRandomValues(_rnds8); + return _rnds8; + }; + } // Math.random()-based (RNG) + // + // If all else fails, use Math.random(). + // It's fast, but is of unspecified quality. + + + var _rnds = new Array(16); + + return function () { + for (var i = 0, r; i < 16; i++) { + if ((i & 0x03) === 0) { + r = Math.random() * 0x100000000; + } + + _rnds[i] = r >>> ((i & 0x03) << 3) & 0xff; + } + + return _rnds; + }; // uuid.js + // + // Copyright (c) 2010-2012 Robert Kieffer + // MIT License - http://opensource.org/licenses/mit-license.php + // Unique ID creation requires a high quality random # generator. We feature + // detect to determine the best RNG source, normalizing to a function that + // returns 128-bits of randomness, since that's what's usually required + // return require('./rng'); + }(); + + var byteToHex$1 = []; + + for (var i$1$1 = 0; i$1$1 < 256; i$1$1++) { + byteToHex$1[i$1$1] = (i$1$1 + 0x100).toString(16).substr(1); + } // **`v1()` - Generate time-based UUID** + // + // Inspired by https://github.com/LiosK/UUID.js + // and http://docs.python.org/library/uuid.html + // random #'s we need to init node and clockseq + + + var seedBytes = random(); // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1) + + var defaultNodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]]; // Per 4.2.2, randomize (14 bit) clockseq + + var defaultClockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff; // Previous uuid creation time + + /** + * UUIDv4 options. + */ + + /** + * Generate UUIDv4 + * + * @param options - Options to be used instead of default generated values. + * String 'binary' is a shorthand for uuid4({}, new Array(16)). + * @param buf - If present the buffer will be filled with the generated UUID. + * @param offset - Offset of the UUID from the start of the buffer. + * + * @returns UUIDv4 + */ + + function uuid4() { + var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + var buf = arguments.length > 1 ? arguments[1] : undefined; + var offset = arguments.length > 2 ? arguments[2] : undefined; // Deprecated - 'format' argument, as supported in v1.2 + + var i = buf && offset || 0; + + if (typeof options === 'string') { + buf = options === 'binary' ? new Array(16) : undefined; + options = {}; + } + + var rnds = options.random || (options.rng || random)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved` + + rnds[6] = rnds[6] & 0x0f | 0x40; + rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided + + if (buf) { + for (var ii = 0; ii < 16; ii++) { + buf[i + ii] = rnds[ii]; + } + } + + return buf || stringifyUUID(rnds); + } // Rollup will complain about mixing default and named exports in UMD build, + // for example '/Date(1198908717056)/' or '/Date(1198908717056-0700)/' + // code from http://momentjs.com/ + + + var ASPDateRegex = /^\/?Date\((-?\d+)/i; // Color REs + + var fullHexRE = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i; + var shortHexRE = /^#?([a-f\d])([a-f\d])([a-f\d])$/i; + var rgbRE = /^rgb\( *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *(1?\d{1,2}|2[0-4]\d|25[0-5]) *\)$/i; + var rgbaRE = /^rgba\( *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *([01]|0?\.\d+) *\)$/i; + /** + * Hue, Saturation, Value. + */ + + /** + * Test whether given object is a number + * + * @param value - Input value of unknown type. + * + * @returns True if number, false otherwise. + */ + + function isNumber(value) { + return value instanceof Number || typeof value === "number"; + } + /** + * Remove everything in the DOM object + * + * @param DOMobject - Node whose child nodes will be recursively deleted. + */ + + + function recursiveDOMDelete(DOMobject) { + if (DOMobject) { + while (DOMobject.hasChildNodes() === true) { + var child = DOMobject.firstChild; + + if (child) { + recursiveDOMDelete(child); + DOMobject.removeChild(child); + } + } + } + } + /** + * Test whether given object is a string + * + * @param value - Input value of unknown type. + * + * @returns True if string, false otherwise. + */ + + + function isString(value) { + return value instanceof String || typeof value === "string"; + } + /** + * Test whether given object is a object (not primitive or null). + * + * @param value - Input value of unknown type. + * + * @returns True if not null object, false otherwise. + */ + + + function isObject(value) { + return _typeof(value) === "object" && value !== null; + } + /** + * Test whether given object is a Date, or a String containing a Date + * + * @param value - Input value of unknown type. + * + * @returns True if Date instance or string date representation, false otherwise. + */ + + + function isDate(value) { + if (value instanceof Date) { + return true; + } else if (isString(value)) { + // test whether this string contains a date + var match = ASPDateRegex.exec(value); + + if (match) { + return true; + } else if (!isNaN(Date.parse(value))) { + return true; + } + } + + return false; + } + /** + * Test whether given object is a Moment date. + * @TODO: This is basically a workaround, if Moment was imported property it wouldn't necessary as moment.isMoment is a TS type guard. + * + * @param value - Input value of unknown type. + * + * @returns True if Moment instance, false otherwise. + */ + + + function isMoment(value) { + return moment.isMoment(value); + } + /** + * Copy property from b to a if property present in a. + * If property in b explicitly set to null, delete it if `allowDeletion` set. + * + * Internal helper routine, should not be exported. Not added to `exports` for that reason. + * + * @param a - Target object. + * @param b - Source object. + * @param prop - Name of property to copy from b to a. + * @param allowDeletion if true, delete property in a if explicitly set to null in b + */ + + + function copyOrDelete(a, b, prop, allowDeletion) { + var doDeletion = false; + + if (allowDeletion === true) { + doDeletion = b[prop] === null && a[prop] !== undefined; + } + + if (doDeletion) { + delete a[prop]; + } else { + a[prop] = b[prop]; // Remember, this is a reference copy! + } + } + /** + * Fill an object with a possibly partially defined other object. + * + * Only copies values for the properties already present in a. + * That means an object is not created on a property if only the b object has it. + * + * @param a - The object that will have it's properties updated. + * @param b - The object with property updates. + * @param allowDeletion - if true, delete properties in a that are explicitly set to null in b + */ + + + function fillIfDefined(a, b) { + var allowDeletion = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; // NOTE: iteration of properties of a + // NOTE: prototype properties iterated over as well + + for (var prop in a) { + if (b[prop] !== undefined) { + if (b[prop] === null || _typeof(b[prop]) !== "object") { + // Note: typeof null === 'object' + copyOrDelete(a, b, prop, allowDeletion); + } else { + var aProp = a[prop]; + var bProp = b[prop]; + + if (isObject(aProp) && isObject(bProp)) { + fillIfDefined(aProp, bProp, allowDeletion); + } + } + } + } + } + /** + * Copy the values of all of the enumerable own properties from one or more source objects to a + * target object. Returns the target object. + * + * @param target - The target object to copy to. + * @param source - The source object from which to copy properties. + * + * @return The target object. + */ + + + var extend = Object.assign; + /** + * Extend object a with selected properties of object b or a series of objects + * Only properties with defined values are copied + * + * @param props - Properties to be copied to a. + * @param a - The target. + * @param others - The sources. + * + * @returns Argument a. + */ + + function selectiveExtend(props, a) { + if (!Array.isArray(props)) { + throw new Error("Array with property names expected as first argument"); + } + + for (var _len = arguments.length, others = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) { + others[_key - 2] = arguments[_key]; + } + + for (var _i = 0, _others = others; _i < _others.length; _i++) { + var other = _others[_i]; + + for (var p = 0; p < props.length; p++) { + var prop = props[p]; + + if (other && Object.prototype.hasOwnProperty.call(other, prop)) { + a[prop] = other[prop]; + } + } + } + + return a; + } + /** + * Extend object a with selected properties of object b. + * Only properties with defined values are copied. + * + * **Note:** Previous version of this routine implied that multiple source objects + * could be used; however, the implementation was **wrong**. + * Since multiple (>1) sources weren't used anywhere in the `vis.js` code, + * this has been removed + * + * @param props - Names of first-level properties to copy over. + * @param a - Target object. + * @param b - Source object. + * @param allowDeletion - If true, delete property in a if explicitly set to null in b. + * + * @returns Argument a. + */ + + + function selectiveDeepExtend(props, a, b) { + var allowDeletion = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false; // TODO: add support for Arrays to deepExtend + + if (Array.isArray(b)) { + throw new TypeError("Arrays are not supported by deepExtend"); + } + + for (var p = 0; p < props.length; p++) { + var prop = props[p]; + + if (Object.prototype.hasOwnProperty.call(b, prop)) { + if (b[prop] && b[prop].constructor === Object) { + if (a[prop] === undefined) { + a[prop] = {}; + } + + if (a[prop].constructor === Object) { + deepExtend(a[prop], b[prop], false, allowDeletion); + } else { + copyOrDelete(a, b, prop, allowDeletion); + } + } else if (Array.isArray(b[prop])) { + throw new TypeError("Arrays are not supported by deepExtend"); + } else { + copyOrDelete(a, b, prop, allowDeletion); + } + } + } + + return a; + } + /** + * Extend object `a` with properties of object `b`, ignoring properties which are explicitly + * specified to be excluded. + * + * The properties of `b` are considered for copying. + * Properties which are themselves objects are are also extended. + * Only properties with defined values are copied + * + * @param propsToExclude - Names of properties which should *not* be copied. + * @param a - Object to extend. + * @param b - Object to take properties from for extension. + * @param allowDeletion - If true, delete properties in a that are explicitly set to null in b. + * + * @returns Argument a. + */ + + + function selectiveNotDeepExtend(propsToExclude, a, b) { + var allowDeletion = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false; // TODO: add support for Arrays to deepExtend + // NOTE: array properties have an else-below; apparently, there is a problem here. + + if (Array.isArray(b)) { + throw new TypeError("Arrays are not supported by deepExtend"); + } + + for (var prop in b) { + if (!Object.prototype.hasOwnProperty.call(b, prop)) { + continue; + } // Handle local properties only + + + if (propsToExclude.indexOf(prop) !== -1) { + continue; + } // In exclusion list, skip + + + if (b[prop] && b[prop].constructor === Object) { + if (a[prop] === undefined) { + a[prop] = {}; + } + + if (a[prop].constructor === Object) { + deepExtend(a[prop], b[prop]); // NOTE: allowDeletion not propagated! + } else { + copyOrDelete(a, b, prop, allowDeletion); + } + } else if (Array.isArray(b[prop])) { + a[prop] = []; + + for (var i = 0; i < b[prop].length; i++) { + a[prop].push(b[prop][i]); + } + } else { + copyOrDelete(a, b, prop, allowDeletion); + } + } + + return a; + } + /** + * Deep extend an object a with the properties of object b + * + * @param a - Target object. + * @param b - Source object. + * @param protoExtend - If true, the prototype values will also be extended + * (ie. the options objects that inherit from others will also get the inherited options). + * @param allowDeletion - If true, the values of fields that are null will be deleted. + * + * @returns Argument a. + */ + + + function deepExtend(a, b) { + var protoExtend = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; + var allowDeletion = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false; + + for (var prop in b) { + if (Object.prototype.hasOwnProperty.call(b, prop) || protoExtend === true) { + if (b[prop] && Object.getPrototypeOf(b[prop]) === Object.prototype) { + if (a[prop] === undefined) { + a[prop] = deepExtend({}, b[prop], protoExtend); // NOTE: allowDeletion not propagated! + } else if (a[prop] && Object.getPrototypeOf(a[prop]) === Object.prototype) { + deepExtend(a[prop], b[prop], protoExtend); // NOTE: allowDeletion not propagated! + } else { + copyOrDelete(a, b, prop, allowDeletion); + } + } else if (Array.isArray(b[prop])) { + a[prop] = b[prop].slice(); + } else { + copyOrDelete(a, b, prop, allowDeletion); + } + } + } + + return a; + } + /** + * Test whether all elements in two arrays are equal. + * + * @param a - First array. + * @param b - Second array. + * + * @returns True if both arrays have the same length and same elements (1 = '1'). + */ + + + function equalArray(a, b) { + if (a.length !== b.length) { + return false; + } + + for (var i = 0, len = a.length; i < len; i++) { + if (a[i] != b[i]) { + return false; + } + } + + return true; + } + /** + * Convert an object into another type + * + * @param object - Value of unknown type. + * @param type - Name of the desired type. + * + * @returns Object in the desired type. + * @throws Error + */ + + + function convert(object, type) { + var match; + + if (object === undefined) { + return undefined; + } + + if (object === null) { + return null; + } + + if (!type) { + return object; + } + + if (!(typeof type === "string") && !(type instanceof String)) { + throw new Error("Type must be a string"); + } //noinspection FallthroughInSwitchStatementJS + + + switch (type) { + case "boolean": + case "Boolean": + return Boolean(object); + + case "number": + case "Number": + if (isString(object) && !isNaN(Date.parse(object))) { + return moment(object).valueOf(); + } else { + // @TODO: I don't think that Number and String constructors are a good idea. + // This could also fail if the object doesn't have valueOf method or if it's redefined. + // For example: Object.create(null) or { valueOf: 7 }. + return Number(object.valueOf()); + } + + case "string": + case "String": + return String(object); + + case "Date": + if (isNumber(object)) { + return new Date(object); + } + + if (object instanceof Date) { + return new Date(object.valueOf()); + } else if (isMoment(object)) { + return new Date(object.valueOf()); + } + + if (isString(object)) { + match = ASPDateRegex.exec(object); + + if (match) { + // object is an ASP date + return new Date(Number(match[1])); // parse number + } else { + return moment(new Date(object)).toDate(); // parse string + } + } else { + throw new Error("Cannot convert object of type " + getType(object) + " to type Date"); + } + + case "Moment": + if (isNumber(object)) { + return moment(object); + } + + if (object instanceof Date) { + return moment(object.valueOf()); + } else if (isMoment(object)) { + return moment(object); + } + + if (isString(object)) { + match = ASPDateRegex.exec(object); + + if (match) { + // object is an ASP date + return moment(Number(match[1])); // parse number + } else { + return moment(object); // parse string + } + } else { + throw new Error("Cannot convert object of type " + getType(object) + " to type Date"); + } + + case "ISODate": + if (isNumber(object)) { + return new Date(object); + } else if (object instanceof Date) { + return object.toISOString(); + } else if (isMoment(object)) { + return object.toDate().toISOString(); + } else if (isString(object)) { + match = ASPDateRegex.exec(object); + + if (match) { + // object is an ASP date + return new Date(Number(match[1])).toISOString(); // parse number + } else { + return moment(object).format(); // ISO 8601 + } + } else { + throw new Error("Cannot convert object of type " + getType(object) + " to type ISODate"); + } + + case "ASPDate": + if (isNumber(object)) { + return "/Date(" + object + ")/"; + } else if (object instanceof Date || isMoment(object)) { + return "/Date(" + object.valueOf() + ")/"; + } else if (isString(object)) { + match = ASPDateRegex.exec(object); + + var _value; + + if (match) { + // object is an ASP date + _value = new Date(Number(match[1])).valueOf(); // parse number + } else { + _value = new Date(object).valueOf(); // parse string + } + + return "/Date(" + _value + ")/"; + } else { + throw new Error("Cannot convert object of type " + getType(object) + " to type ASPDate"); + } + + default: + var never = type; + throw new Error("Unknown type ".concat(never)); + } + } + /** + * Get the type of an object, for example exports.getType([]) returns 'Array' + * + * @param object - Input value of unknown type. + * + * @returns Detected type. + */ + + + function getType(object) { + var type = _typeof(object); + + if (type === "object") { + if (object === null) { + return "null"; + } + + if (object instanceof Boolean) { + return "Boolean"; + } + + if (object instanceof Number) { + return "Number"; + } + + if (object instanceof String) { + return "String"; + } + + if (Array.isArray(object)) { + return "Array"; + } + + if (object instanceof Date) { + return "Date"; + } + + return "Object"; + } + + if (type === "number") { + return "Number"; + } + + if (type === "boolean") { + return "Boolean"; + } + + if (type === "string") { + return "String"; + } + + if (type === undefined) { + return "undefined"; + } + + return type; + } + /** + * Used to extend an array and copy it. This is used to propagate paths recursively. + * + * @param arr - First part. + * @param newValue - The value to be aadded into the array. + * + * @returns A new array with all items from arr and newValue (which is last). + */ + + + function copyAndExtendArray(arr, newValue) { + return [].concat(_toConsumableArray(arr), [newValue]); + } + /** + * Used to extend an array and copy it. This is used to propagate paths recursively. + * + * @param arr - The array to be copied. + * + * @returns Shallow copy of arr. + */ + + + function copyArray(arr) { + return arr.slice(); + } + /** + * Retrieve the absolute left value of a DOM element + * + * @param elem - A dom element, for example a div. + * + * @returns The absolute left position of this element in the browser page. + */ + + + function getAbsoluteLeft(elem) { + return elem.getBoundingClientRect().left; + } + /** + * Retrieve the absolute right value of a DOM element + * + * @param elem - A dom element, for example a div. + * + * @returns The absolute right position of this element in the browser page. + */ + + + function getAbsoluteRight(elem) { + return elem.getBoundingClientRect().right; + } + /** + * Retrieve the absolute top value of a DOM element + * + * @param elem - A dom element, for example a div. + * + * @returns The absolute top position of this element in the browser page. + */ + + + function getAbsoluteTop(elem) { + return elem.getBoundingClientRect().top; + } + /** + * Add a className to the given elements style. + * + * @param elem - The element to which the classes will be added. + * @param classNames - Space separated list of classes. + */ + + + function addClassName(elem, classNames) { + var classes = elem.className.split(" "); + var newClasses = classNames.split(" "); + classes = classes.concat(newClasses.filter(function (className) { + return classes.indexOf(className) < 0; + })); + elem.className = classes.join(" "); + } + /** + * Remove a className from the given elements style. + * + * @param elem - The element from which the classes will be removed. + * @param classNames - Space separated list of classes. + */ + + + function removeClassName(elem, classNames) { + var classes = elem.className.split(" "); + var oldClasses = classNames.split(" "); + classes = classes.filter(function (className) { + return oldClasses.indexOf(className) < 0; + }); + elem.className = classes.join(" "); + } + /** + * For each method for both arrays and objects. + * In case of an array, the built-in Array.forEach() is applied (**No, it's not!**). + * In case of an Object, the method loops over all properties of the object. + * + * @param object - An Object or Array to be iterated over. + * @param callback - Array.forEach-like callback. + */ + + + function forEach(object, callback) { + if (Array.isArray(object)) { + // array + var len = object.length; + + for (var i = 0; i < len; i++) { + callback(object[i], i, object); + } + } else { + // object + for (var _key2 in object) { + if (Object.prototype.hasOwnProperty.call(object, _key2)) { + callback(object[_key2], _key2, object); + } + } + } + } + /** + * Convert an object into an array: all objects properties are put into the array. The resulting array is unordered. + * + * @param o - Object that contains the properties and methods. + * + * @returns An array of unordered values. + */ + + + var toArray = Object.values; + /** + * Update a property in an object + * + * @param object - The object whose property will be updated. + * @param key - Name of the property to be updated. + * @param value - The new value to be assigned. + * + * @returns Whether the value was updated (true) or already strictly the same in the original object (false). + */ + + function updateProperty(object, key, value) { + if (object[key] !== value) { + object[key] = value; + return true; + } else { + return false; + } + } + /** + * Throttle the given function to be only executed once per animation frame. + * + * @param fn - The original function. + * + * @returns The throttled function. + */ + + + function throttle(fn) { + var scheduled = false; + return function () { + if (!scheduled) { + scheduled = true; + requestAnimationFrame(function () { + scheduled = false; + fn(); + }); + } + }; + } + /** + * Add and event listener. Works for all browsers. + * + * @param element - The element to bind the event listener to. + * @param action - Same as Element.addEventListener(action, —, —). + * @param listener - Same as Element.addEventListener(—, listener, —). + * @param useCapture - Same as Element.addEventListener(—, —, useCapture). + */ + + + function addEventListener(element, action, listener, useCapture) { + if (element.addEventListener) { + if (useCapture === undefined) { + useCapture = false; + } + + if (action === "mousewheel" && navigator.userAgent.indexOf("Firefox") >= 0) { + action = "DOMMouseScroll"; // For Firefox + } + + element.addEventListener(action, listener, useCapture); + } else { + // @TODO: IE types? Does anyone care? + element.attachEvent("on" + action, listener); // IE browsers + } + } + /** + * Remove an event listener from an element + * + * @param element - The element to bind the event listener to. + * @param action - Same as Element.removeEventListener(action, —, —). + * @param listener - Same as Element.removeEventListener(—, listener, —). + * @param useCapture - Same as Element.removeEventListener(—, —, useCapture). + */ + + + function removeEventListener(element, action, listener, useCapture) { + if (element.removeEventListener) { + // non-IE browsers + if (useCapture === undefined) { + useCapture = false; + } + + if (action === "mousewheel" && navigator.userAgent.indexOf("Firefox") >= 0) { + action = "DOMMouseScroll"; // For Firefox + } + + element.removeEventListener(action, listener, useCapture); + } else { + // @TODO: IE types? Does anyone care? + element.detachEvent("on" + action, listener); // IE browsers + } + } + /** + * Cancels the event's default action if it is cancelable, without stopping further propagation of the event. + * + * @param event - The event whose default action should be prevented. + */ + + + function preventDefault(event) { + if (!event) { + event = window.event; + } + + if (!event) ;else if (event.preventDefault) { + event.preventDefault(); // non-IE browsers + } else { + // @TODO: IE types? Does anyone care? + event.returnValue = false; // IE browsers + } + } + /** + * Get HTML element which is the target of the event. + * + * @param event - The event. + * + * @returns The element or null if not obtainable. + */ + + + function getTarget() { + var event = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : window.event; // code from http://www.quirksmode.org/js/events_properties.html + // @TODO: EventTarget can be almost anything, is it okay to return only Elements? + + var target = null; + if (!event) ;else if (event.target) { + target = event.target; + } else if (event.srcElement) { + target = event.srcElement; + } + + if (!(target instanceof Element)) { + return null; + } + + if (target.nodeType != null && target.nodeType == 3) { + // defeat Safari bug + target = target.parentNode; + + if (!(target instanceof Element)) { + return null; + } + } + + return target; + } + /** + * Check if given element contains given parent somewhere in the DOM tree + * + * @param element - The element to be tested. + * @param parent - The ancestor (not necessarily parent) of the element. + * + * @returns True if parent is an ancestor of the element, false otherwise. + */ + + + function hasParent(element, parent) { + var elem = element; + + while (elem) { + if (elem === parent) { + return true; + } else if (elem.parentNode) { + elem = elem.parentNode; + } else { + return false; + } + } + + return false; + } + + var option = { + /** + * Convert a value into a boolean. + * + * @param value - Value to be converted intoboolean, a function will be executed as (() => unknown). + * @param defaultValue - If the value or the return value of the function == null then this will be returned. + * + * @returns Corresponding boolean value, if none then the default value, if none then null. + */ + asBoolean: function asBoolean(value, defaultValue) { + if (typeof value == "function") { + value = value(); + } + + if (value != null) { + return value != false; + } + + return defaultValue || null; + }, + + /** + * Convert a value into a number. + * + * @param value - Value to be converted intonumber, a function will be executed as (() => unknown). + * @param defaultValue - If the value or the return value of the function == null then this will be returned. + * + * @returns Corresponding **boxed** number value, if none then the default value, if none then null. + */ + asNumber: function asNumber(value, defaultValue) { + if (typeof value == "function") { + value = value(); + } + + if (value != null) { + return Number(value) || defaultValue || null; + } + + return defaultValue || null; + }, + + /** + * Convert a value into a string. + * + * @param value - Value to be converted intostring, a function will be executed as (() => unknown). + * @param defaultValue - If the value or the return value of the function == null then this will be returned. + * + * @returns Corresponding **boxed** string value, if none then the default value, if none then null. + */ + asString: function asString(value, defaultValue) { + if (typeof value == "function") { + value = value(); + } + + if (value != null) { + return String(value); + } + + return defaultValue || null; + }, + + /** + * Convert a value into a size. + * + * @param value - Value to be converted intosize, a function will be executed as (() => unknown). + * @param defaultValue - If the value or the return value of the function == null then this will be returned. + * + * @returns Corresponding string value (number + 'px'), if none then the default value, if none then null. + */ + asSize: function asSize(value, defaultValue) { + if (typeof value == "function") { + value = value(); + } + + if (isString(value)) { + return value; + } else if (isNumber(value)) { + return value + "px"; + } else { + return defaultValue || null; + } + }, + + /** + * Convert a value into a DOM Element. + * + * @param value - Value to be converted into DOM Element, a function will be executed as (() => unknown). + * @param defaultValue - If the value or the return value of the function == null then this will be returned. + * + * @returns The DOM Element, if none then the default value, if none then null. + */ + asElement: function asElement(value, defaultValue) { + if (typeof value == "function") { + value = value(); + } + + return value || defaultValue || null; + } + }; + /** + * Convert hex color string into RGB color object. + * http://stackoverflow.com/questions/5623838/rgb-to-hex-and-hex-to-rgb + * + * @param hex - Hex color string (3 or 6 digits, with or without #). + * + * @returns RGB color object. + */ + + function hexToRGB(hex) { + var result; + + switch (hex.length) { + case 3: + case 4: + result = shortHexRE.exec(hex); + return result ? { + r: parseInt(result[1] + result[1], 16), + g: parseInt(result[2] + result[2], 16), + b: parseInt(result[3] + result[3], 16) + } : null; + + case 6: + case 7: + result = fullHexRE.exec(hex); + return result ? { + r: parseInt(result[1], 16), + g: parseInt(result[2], 16), + b: parseInt(result[3], 16) + } : null; + + default: + return null; + } + } + /** + * This function takes string color in hex or RGB format and adds the opacity, RGBA is passed through unchanged. + * + * @param color - The color string (hex, RGB, RGBA). + * @param opacity - The new opacity. + * + * @returns RGBA string, for example 'rgba(255, 0, 127, 0.3)'. + */ + + + function overrideOpacity(color, opacity) { + if (color.indexOf("rgba") !== -1) { + return color; + } else if (color.indexOf("rgb") !== -1) { + var rgb = color.substr(color.indexOf("(") + 1).replace(")", "").split(","); + return "rgba(" + rgb[0] + "," + rgb[1] + "," + rgb[2] + "," + opacity + ")"; + } else { + var _rgb = hexToRGB(color); + + if (_rgb == null) { + return color; + } else { + return "rgba(" + _rgb.r + "," + _rgb.g + "," + _rgb.b + "," + opacity + ")"; + } + } + } + /** + * Convert RGB <0, 255> into hex color string. + * + * @param red - Red channel. + * @param green - Green channel. + * @param blue - Blue channel. + * + * @returns Hex color string (for example: '#0acdc0'). + */ + + + function RGBToHex(red, green, blue) { + return "#" + ((1 << 24) + (red << 16) + (green << 8) + blue).toString(16).slice(1); + } + /** + * Parse a color property into an object with border, background, and highlight colors + * + * @param inputColor - Shorthand color string or input color object. + * @param defaultColor - Full color object to fill in missing values in inputColor. + * + * @returns Color object. + */ + + + function parseColor(inputColor, defaultColor) { + if (isString(inputColor)) { + var colorStr = inputColor; + + if (isValidRGB(colorStr)) { + var rgb = colorStr.substr(4).substr(0, colorStr.length - 5).split(",").map(function (value) { + return parseInt(value); + }); + colorStr = RGBToHex(rgb[0], rgb[1], rgb[2]); + } + + if (isValidHex(colorStr) === true) { + var hsv = hexToHSV(colorStr); + var lighterColorHSV = { + h: hsv.h, + s: hsv.s * 0.8, + v: Math.min(1, hsv.v * 1.02) + }; + var darkerColorHSV = { + h: hsv.h, + s: Math.min(1, hsv.s * 1.25), + v: hsv.v * 0.8 + }; + var darkerColorHex = HSVToHex(darkerColorHSV.h, darkerColorHSV.s, darkerColorHSV.v); + var lighterColorHex = HSVToHex(lighterColorHSV.h, lighterColorHSV.s, lighterColorHSV.v); + return { + background: colorStr, + border: darkerColorHex, + highlight: { + background: lighterColorHex, + border: darkerColorHex + }, + hover: { + background: lighterColorHex, + border: darkerColorHex + } + }; + } else { + return { + background: colorStr, + border: colorStr, + highlight: { + background: colorStr, + border: colorStr + }, + hover: { + background: colorStr, + border: colorStr + } + }; + } + } else { + if (defaultColor) { + var color = { + background: inputColor.background || defaultColor.background, + border: inputColor.border || defaultColor.border, + highlight: isString(inputColor.highlight) ? { + border: inputColor.highlight, + background: inputColor.highlight + } : { + background: inputColor.highlight && inputColor.highlight.background || defaultColor.highlight.background, + border: inputColor.highlight && inputColor.highlight.border || defaultColor.highlight.border + }, + hover: isString(inputColor.hover) ? { + border: inputColor.hover, + background: inputColor.hover + } : { + border: inputColor.hover && inputColor.hover.border || defaultColor.hover.border, + background: inputColor.hover && inputColor.hover.background || defaultColor.hover.background + } + }; + return color; + } else { + var _color = { + background: inputColor.background || undefined, + border: inputColor.border || undefined, + highlight: isString(inputColor.highlight) ? { + border: inputColor.highlight, + background: inputColor.highlight + } : { + background: inputColor.highlight && inputColor.highlight.background || undefined, + border: inputColor.highlight && inputColor.highlight.border || undefined + }, + hover: isString(inputColor.hover) ? { + border: inputColor.hover, + background: inputColor.hover + } : { + border: inputColor.hover && inputColor.hover.border || undefined, + background: inputColor.hover && inputColor.hover.background || undefined + } + }; + return _color; + } + } + } + /** + * Convert RGB <0, 255> into HSV object. + * http://www.javascripter.net/faq/rgb2hsv.htm + * + * @param red - Red channel. + * @param green - Green channel. + * @param blue - Blue channel. + * + * @returns HSV color object. + */ + + + function RGBToHSV(red, green, blue) { + red = red / 255; + green = green / 255; + blue = blue / 255; + var minRGB = Math.min(red, Math.min(green, blue)); + var maxRGB = Math.max(red, Math.max(green, blue)); // Black-gray-white + + if (minRGB === maxRGB) { + return { + h: 0, + s: 0, + v: minRGB + }; + } // Colors other than black-gray-white: + + + var d = red === minRGB ? green - blue : blue === minRGB ? red - green : blue - red; + var h = red === minRGB ? 3 : blue === minRGB ? 1 : 5; + var hue = 60 * (h - d / (maxRGB - minRGB)) / 360; + var saturation = (maxRGB - minRGB) / maxRGB; + var value = maxRGB; + return { + h: hue, + s: saturation, + v: value + }; + } + + var cssUtil = { + // split a string with css styles into an object with key/values + split: function split(cssText) { + var styles = {}; + cssText.split(";").forEach(function (style) { + if (style.trim() != "") { + var parts = style.split(":"); + + var _key3 = parts[0].trim(); + + var _value2 = parts[1].trim(); + + styles[_key3] = _value2; + } + }); + return styles; + }, + // build a css text string from an object with key/values + join: function join(styles) { + return Object.keys(styles).map(function (key) { + return key + ": " + styles[key]; + }).join("; "); + } + }; + /** + * Append a string with css styles to an element + * + * @param element - The element that will receive new styles. + * @param cssText - The styles to be appended. + */ + + function addCssText(element, cssText) { + var currentStyles = cssUtil.split(element.style.cssText); + var newStyles = cssUtil.split(cssText); + + var styles = _objectSpread2({}, currentStyles, {}, newStyles); + + element.style.cssText = cssUtil.join(styles); + } + /** + * Remove a string with css styles from an element + * + * @param element - The element from which styles should be removed. + * @param cssText - The styles to be removed. + */ + + + function removeCssText(element, cssText) { + var styles = cssUtil.split(element.style.cssText); + var removeStyles = cssUtil.split(cssText); + + for (var _key4 in removeStyles) { + if (Object.prototype.hasOwnProperty.call(removeStyles, _key4)) { + delete styles[_key4]; + } + } + + element.style.cssText = cssUtil.join(styles); + } + /** + * Convert HSV <0, 1> into RGB color object. + * https://gist.github.com/mjijackson/5311256 + * + * @param h - Hue + * @param s - Saturation + * @param v - Value + * + * @returns RGB color object. + */ + + + function HSVToRGB(h, s, v) { + var r; + var g; + var b; + var i = Math.floor(h * 6); + var f = h * 6 - i; + var p = v * (1 - s); + var q = v * (1 - f * s); + var t = v * (1 - (1 - f) * s); + + switch (i % 6) { + case 0: + r = v, g = t, b = p; + break; + + case 1: + r = q, g = v, b = p; + break; + + case 2: + r = p, g = v, b = t; + break; + + case 3: + r = p, g = q, b = v; + break; + + case 4: + r = t, g = p, b = v; + break; + + case 5: + r = v, g = p, b = q; + break; + } + + return { + r: Math.floor(r * 255), + g: Math.floor(g * 255), + b: Math.floor(b * 255) + }; + } + /** + * Convert HSV <0, 1> into hex color string. + * + * @param h - Hue + * @param s - Saturation + * @param v - Value + * + * @returns Hex color string. + */ + + + function HSVToHex(h, s, v) { + var rgb = HSVToRGB(h, s, v); + return RGBToHex(rgb.r, rgb.g, rgb.b); + } + /** + * Convert hex color string into HSV <0, 1>. + * + * @param hex - Hex color string. + * + * @returns HSV color object. + */ + + + function hexToHSV(hex) { + var rgb = hexToRGB(hex); + + if (!rgb) { + throw new TypeError("'".concat(hex, "' is not a valid color.")); + } + + return RGBToHSV(rgb.r, rgb.g, rgb.b); + } + /** + * Validate hex color string. + * + * @param hex - Unknown string that may contain a color. + * + * @returns True if the string is valid, false otherwise. + */ + + + function isValidHex(hex) { + var isOk = /(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(hex); + return isOk; + } + /** + * Validate RGB color string. + * + * @param rgb - Unknown string that may contain a color. + * + * @returns True if the string is valid, false otherwise. + */ + + + function isValidRGB(rgb) { + return rgbRE.test(rgb); + } + /** + * Validate RGBA color string. + * + * @param rgba - Unknown string that may contain a color. + * + * @returns True if the string is valid, false otherwise. + */ + + + function isValidRGBA(rgba) { + return rgbaRE.test(rgba); + } + /** + * This recursively redirects the prototype of JSON objects to the referenceObject. + * This is used for default options. + * + * @param fields - Names of properties to be bridged. + * @param referenceObject - The original object. + * + * @returns A new object inheriting from the referenceObject. + */ + + + function selectiveBridgeObject(fields, referenceObject) { + if (referenceObject !== null && _typeof(referenceObject) === "object") { + // !!! typeof null === 'object' + var objectTo = Object.create(referenceObject); + + for (var i = 0; i < fields.length; i++) { + if (Object.prototype.hasOwnProperty.call(referenceObject, fields[i])) { + if (_typeof(referenceObject[fields[i]]) == "object") { + objectTo[fields[i]] = bridgeObject(referenceObject[fields[i]]); + } + } + } + + return objectTo; + } else { + return null; + } + } + /** + * This recursively redirects the prototype of JSON objects to the referenceObject. + * This is used for default options. + * + * @param referenceObject - The original object. + * + * @returns The Element if the referenceObject is an Element, or a new object inheriting from the referenceObject. + */ + + + function bridgeObject(referenceObject) { + if (referenceObject === null || _typeof(referenceObject) !== "object") { + return null; + } + + if (referenceObject instanceof Element) { + // Avoid bridging DOM objects + return referenceObject; + } + + var objectTo = Object.create(referenceObject); + + for (var i in referenceObject) { + if (Object.prototype.hasOwnProperty.call(referenceObject, i)) { + if (_typeof(referenceObject[i]) == "object") { + objectTo[i] = bridgeObject(referenceObject[i]); + } + } + } + + return objectTo; + } + /** + * This method provides a stable sort implementation, very fast for presorted data. + * + * @param a - The array to be sorted (in-place). + * @param compare - An order comparator. + * + * @returns The argument a. + */ + + + function insertSort(a, compare) { + for (var i = 0; i < a.length; i++) { + var k = a[i]; + var j = void 0; + + for (j = i; j > 0 && compare(k, a[j - 1]) < 0; j--) { + a[j] = a[j - 1]; + } + + a[j] = k; + } + + return a; + } + /** + * This is used to set the options of subobjects in the options object. + * + * A requirement of these subobjects is that they have an 'enabled' element + * which is optional for the user but mandatory for the program. + * + * The added value here of the merge is that option 'enabled' is set as required. + * + * @param mergeTarget - Either this.options or the options used for the groups. + * @param options - Options. + * @param option - Option key in the options argument. + * @param globalOptions - Global options, passed in to determine value of option 'enabled'. + */ + + + function mergeOptions(mergeTarget, options, option) { + var globalOptions = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {}; // Local helpers + + var isPresent = function isPresent(obj) { + return obj !== null && obj !== undefined; + }; + + var isObject = function isObject(obj) { + return obj !== null && _typeof(obj) === "object"; + }; // https://stackoverflow.com/a/34491287/1223531 + + + var isEmpty = function isEmpty(obj) { + for (var x in obj) { + if (Object.prototype.hasOwnProperty.call(obj, x)) { + return false; + } + } + + return true; + }; // Guards + + + if (!isObject(mergeTarget)) { + throw new Error("Parameter mergeTarget must be an object"); + } + + if (!isObject(options)) { + throw new Error("Parameter options must be an object"); + } + + if (!isPresent(option)) { + throw new Error("Parameter option must have a value"); + } + + if (!isObject(globalOptions)) { + throw new Error("Parameter globalOptions must be an object"); + } // + // Actual merge routine, separated from main logic + // Only a single level of options is merged. Deeper levels are ref'd. This may actually be an issue. + // + + + var doMerge = function doMerge(target, options, option) { + if (!isObject(target[option])) { + target[option] = {}; + } + + var src = options[option]; + var dst = target[option]; + + for (var prop in src) { + if (Object.prototype.hasOwnProperty.call(src, prop)) { + dst[prop] = src[prop]; + } + } + }; // Local initialization + + + var srcOption = options[option]; + var globalPassed = isObject(globalOptions) && !isEmpty(globalOptions); + var globalOption = globalPassed ? globalOptions[option] : undefined; + var globalEnabled = globalOption ? globalOption.enabled : undefined; ///////////////////////////////////////// + // Main routine + ///////////////////////////////////////// + + if (srcOption === undefined) { + return; // Nothing to do + } + + if (typeof srcOption === "boolean") { + if (!isObject(mergeTarget[option])) { + mergeTarget[option] = {}; + } + + mergeTarget[option].enabled = srcOption; + return; + } + + if (srcOption === null && !isObject(mergeTarget[option])) { + // If possible, explicit copy from globals + if (isPresent(globalOption)) { + mergeTarget[option] = Object.create(globalOption); + } else { + return; // Nothing to do + } + } + + if (!isObject(srcOption)) { + return; + } // + // Ensure that 'enabled' is properly set. It is required internally + // Note that the value from options will always overwrite the existing value + // + + + var enabled = true; // default value + + if (srcOption.enabled !== undefined) { + enabled = srcOption.enabled; + } else { + // Take from globals, if present + if (globalEnabled !== undefined) { + enabled = globalOption.enabled; + } + } + + doMerge(mergeTarget, options, option); + mergeTarget[option].enabled = enabled; + } + /** + * This function does a binary search for a visible item in a sorted list. If we find a visible item, the code that uses + * this function will then iterate in both directions over this sorted list to find all visible items. + * + * @param orderedItems - Items ordered by start + * @param comparator - -1 is lower, 0 is equal, 1 is higher + * @param field - Property name on an item (i.e. item[field]). + * @param field2 - Second property name on an item (i.e. item[field][field2]). + * + * @returns Index of the found item or -1 if nothing was found. + */ + + + function binarySearchCustom(orderedItems, comparator, field, field2) { + var maxIterations = 10000; + var iteration = 0; + var low = 0; + var high = orderedItems.length - 1; + + while (low <= high && iteration < maxIterations) { + var middle = Math.floor((low + high) / 2); + var item = orderedItems[middle]; + + var _value3 = field2 === undefined ? item[field] : item[field][field2]; + + var searchResult = comparator(_value3); + + if (searchResult == 0) { + // jihaa, found a visible item! + return middle; + } else if (searchResult == -1) { + // it is too small --> increase low + low = middle + 1; + } else { + // it is too big --> decrease high + high = middle - 1; + } + + iteration++; + } + + return -1; + } + /** + * This function does a binary search for a specific value in a sorted array. If it does not exist but is in between of + * two values, we return either the one before or the one after, depending on user input + * If it is found, we return the index, else -1. + * + * @param orderedItems - Sorted array. + * @param target - The searched value. + * @param field - Name of the property in items to be searched. + * @param sidePreference - If the target is between two values, should the index of the before or the after be returned? + * @param comparator - An optional comparator, returning -1, 0, 1 for <, ===, >. + * + * @returns The index of found value or -1 if nothing was found. + */ + + + function binarySearchValue(orderedItems, target, field, sidePreference, comparator) { + var maxIterations = 10000; + var iteration = 0; + var low = 0; + var high = orderedItems.length - 1; + var prevValue; + var value; + var nextValue; + var middle; + comparator = comparator != undefined ? comparator : function (a, b) { + return a == b ? 0 : a < b ? -1 : 1; + }; + + while (low <= high && iteration < maxIterations) { + // get a new guess + middle = Math.floor(0.5 * (high + low)); + prevValue = orderedItems[Math.max(0, middle - 1)][field]; + value = orderedItems[middle][field]; + nextValue = orderedItems[Math.min(orderedItems.length - 1, middle + 1)][field]; + + if (comparator(value, target) == 0) { + // we found the target + return middle; + } else if (comparator(prevValue, target) < 0 && comparator(value, target) > 0) { + // target is in between of the previous and the current + return sidePreference == "before" ? Math.max(0, middle - 1) : middle; + } else if (comparator(value, target) < 0 && comparator(nextValue, target) > 0) { + // target is in between of the current and the next + return sidePreference == "before" ? middle : Math.min(orderedItems.length - 1, middle + 1); + } else { + // didnt find the target, we need to change our boundaries. + if (comparator(value, target) < 0) { + // it is too small --> increase low + low = middle + 1; + } else { + // it is too big --> decrease high + high = middle - 1; + } + } + + iteration++; + } // didnt find anything. Return -1. + + + return -1; + } + /* + * Easing Functions. + * Only considering the t value for the range [0, 1] => [0, 1]. + * + * Inspiration: from http://gizma.com/easing/ + * https://gist.github.com/gre/1650294 + */ + + + var easingFunctions = { + /** + * no easing, no acceleration + * + * @param t - Time. + * + * @returns Value at time t. + */ + linear: function linear(t) { + return t; + }, + + /** + * accelerating from zero velocity + * + * @param t - Time. + * + * @returns Value at time t. + */ + easeInQuad: function easeInQuad(t) { + return t * t; + }, + + /** + * decelerating to zero velocity + * + * @param t - Time. + * + * @returns Value at time t. + */ + easeOutQuad: function easeOutQuad(t) { + return t * (2 - t); + }, + + /** + * acceleration until halfway, then deceleration + * + * @param t - Time. + * + * @returns Value at time t. + */ + easeInOutQuad: function easeInOutQuad(t) { + return t < 0.5 ? 2 * t * t : -1 + (4 - 2 * t) * t; + }, + + /** + * accelerating from zero velocity + * + * @param t - Time. + * + * @returns Value at time t. + */ + easeInCubic: function easeInCubic(t) { + return t * t * t; + }, + + /** + * decelerating to zero velocity + * + * @param t - Time. + * + * @returns Value at time t. + */ + easeOutCubic: function easeOutCubic(t) { + return --t * t * t + 1; + }, + + /** + * acceleration until halfway, then deceleration + * + * @param t - Time. + * + * @returns Value at time t. + */ + easeInOutCubic: function easeInOutCubic(t) { + return t < 0.5 ? 4 * t * t * t : (t - 1) * (2 * t - 2) * (2 * t - 2) + 1; + }, + + /** + * accelerating from zero velocity + * + * @param t - Time. + * + * @returns Value at time t. + */ + easeInQuart: function easeInQuart(t) { + return t * t * t * t; + }, + + /** + * decelerating to zero velocity + * + * @param t - Time. + * + * @returns Value at time t. + */ + easeOutQuart: function easeOutQuart(t) { + return 1 - --t * t * t * t; + }, + + /** + * acceleration until halfway, then deceleration + * + * @param t - Time. + * + * @returns Value at time t. + */ + easeInOutQuart: function easeInOutQuart(t) { + return t < 0.5 ? 8 * t * t * t * t : 1 - 8 * --t * t * t * t; + }, + + /** + * accelerating from zero velocity + * + * @param t - Time. + * + * @returns Value at time t. + */ + easeInQuint: function easeInQuint(t) { + return t * t * t * t * t; + }, + + /** + * decelerating to zero velocity + * + * @param t - Time. + * + * @returns Value at time t. + */ + easeOutQuint: function easeOutQuint(t) { + return 1 + --t * t * t * t * t; + }, + + /** + * acceleration until halfway, then deceleration + * + * @param t - Time. + * + * @returns Value at time t. + */ + easeInOutQuint: function easeInOutQuint(t) { + return t < 0.5 ? 16 * t * t * t * t * t : 1 + 16 * --t * t * t * t * t; + } + }; + /** + * Experimentaly compute the width of the scrollbar for this browser. + * + * @returns The width in pixels. + */ + + function getScrollBarWidth() { + var inner = document.createElement("p"); + inner.style.width = "100%"; + inner.style.height = "200px"; + var outer = document.createElement("div"); + outer.style.position = "absolute"; + outer.style.top = "0px"; + outer.style.left = "0px"; + outer.style.visibility = "hidden"; + outer.style.width = "200px"; + outer.style.height = "150px"; + outer.style.overflow = "hidden"; + outer.appendChild(inner); + document.body.appendChild(outer); + var w1 = inner.offsetWidth; + outer.style.overflow = "scroll"; + var w2 = inner.offsetWidth; + + if (w1 == w2) { + w2 = outer.clientWidth; + } + + document.body.removeChild(outer); + return w1 - w2; + } // @TODO: This doesn't work properly. + // It works only for single property objects, + // otherwise it combines all of the types in a union. + // export function topMost ( + // pile: Record[], + // accessors: K1 | [K1] + // ): undefined | V1 + // export function topMost ( + // pile: Record>[], + // accessors: [K1, K2] + // ): undefined | V1 | V2 + // export function topMost ( + // pile: Record>>[], + // accessors: [K1, K2, K3] + // ): undefined | V1 | V2 | V3 + + /** + * Get the top most property value from a pile of objects. + * + * @param pile - Array of objects, no required format. + * @param accessors - Array of property names (e.g. object['foo']['bar'] → ['foo', 'bar']). + * + * @returns Value of the property with given accessors path from the first pile item where it's not undefined. + */ + + + function topMost(pile, accessors) { + var candidate; + + if (!Array.isArray(accessors)) { + accessors = [accessors]; + } + + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = undefined; + + try { + for (var _iterator = pile[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var member = _step.value; + + if (member) { + candidate = member[accessors[0]]; + + for (var i = 1; i < accessors.length; i++) { + if (candidate) { + candidate = candidate[accessors[i]]; + } + } + + if (typeof candidate !== "undefined") { + break; + } + } + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator.return != null) { + _iterator.return(); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } + } + + return candidate; + } + + var util = + /*#__PURE__*/ + Object.freeze({ + isNumber: isNumber, + recursiveDOMDelete: recursiveDOMDelete, + isString: isString, + isObject: isObject, + isDate: isDate, + isMoment: isMoment, + fillIfDefined: fillIfDefined, + extend: extend, + selectiveExtend: selectiveExtend, + selectiveDeepExtend: selectiveDeepExtend, + selectiveNotDeepExtend: selectiveNotDeepExtend, + deepExtend: deepExtend, + equalArray: equalArray, + convert: convert, + getType: getType, + copyAndExtendArray: copyAndExtendArray, + copyArray: copyArray, + getAbsoluteLeft: getAbsoluteLeft, + getAbsoluteRight: getAbsoluteRight, + getAbsoluteTop: getAbsoluteTop, + addClassName: addClassName, + removeClassName: removeClassName, + forEach: forEach, + toArray: toArray, + updateProperty: updateProperty, + throttle: throttle, + addEventListener: addEventListener, + removeEventListener: removeEventListener, + preventDefault: preventDefault, + getTarget: getTarget, + hasParent: hasParent, + option: option, + hexToRGB: hexToRGB, + overrideOpacity: overrideOpacity, + RGBToHex: RGBToHex, + parseColor: parseColor, + RGBToHSV: RGBToHSV, + addCssText: addCssText, + removeCssText: removeCssText, + HSVToRGB: HSVToRGB, + HSVToHex: HSVToHex, + hexToHSV: hexToHSV, + isValidHex: isValidHex, + isValidRGB: isValidRGB, + isValidRGBA: isValidRGBA, + selectiveBridgeObject: selectiveBridgeObject, + bridgeObject: bridgeObject, + insertSort: insertSort, + mergeOptions: mergeOptions, + binarySearchCustom: binarySearchCustom, + binarySearchValue: binarySearchValue, + easingFunctions: easingFunctions, + getScrollBarWidth: getScrollBarWidth, + topMost: topMost, + randomUUID: uuid4 + }); // New API (tree shakeable). + + var esm = /*#__PURE__*/Object.freeze({ + 'default': util, + HSVToHex: HSVToHex, + HSVToRGB: HSVToRGB, + RGBToHSV: RGBToHSV, + RGBToHex: RGBToHex, + addClassName: addClassName, + addCssText: addCssText, + addEventListener: addEventListener, + binarySearchCustom: binarySearchCustom, + binarySearchValue: binarySearchValue, + bridgeObject: bridgeObject, + convert: convert, + copyAndExtendArray: copyAndExtendArray, + copyArray: copyArray, + deepExtend: deepExtend, + easingFunctions: easingFunctions, + equalArray: equalArray, + extend: extend, + fillIfDefined: fillIfDefined, + forEach: forEach, + getAbsoluteLeft: getAbsoluteLeft, + getAbsoluteRight: getAbsoluteRight, + getAbsoluteTop: getAbsoluteTop, + getScrollBarWidth: getScrollBarWidth, + getTarget: getTarget, + getType: getType, + hasParent: hasParent, + hexToHSV: hexToHSV, + hexToRGB: hexToRGB, + insertSort: insertSort, + isDate: isDate, + isMoment: isMoment, + isNumber: isNumber, + isObject: isObject, + isString: isString, + isValidHex: isValidHex, + isValidRGB: isValidRGB, + isValidRGBA: isValidRGBA, + mergeOptions: mergeOptions, + option: option, + overrideOpacity: overrideOpacity, + parseColor: parseColor, + preventDefault: preventDefault, + randomUUID: uuid4, + recursiveDOMDelete: recursiveDOMDelete, + removeClassName: removeClassName, + removeCssText: removeCssText, + removeEventListener: removeEventListener, + selectiveBridgeObject: selectiveBridgeObject, + selectiveDeepExtend: selectiveDeepExtend, + selectiveExtend: selectiveExtend, + selectiveNotDeepExtend: selectiveNotDeepExtend, + throttle: throttle, + toArray: toArray, + topMost: topMost, + updateProperty: updateProperty + }); + + /** + * vis-data - data + * http://visjs.org/ + * + * Manage unstructured data using DataSet. Add, update, and remove data, and listen for changes in the data. + * + * @version 6.1.0 + * @date 2019-07-16T13:37:00Z + * + * @copyright (c) 2011-2017 Almende B.V, http://almende.com + * @copyright (c) 2018-2019 visjs contributors, https://github.com/visjs + * + * @license + * vis.js is dual licensed under both + * + * 1. The Apache 2.0 License + * http://www.apache.org/licenses/LICENSE-2.0 + * + * and + * + * 2. The MIT License + * http://opensource.org/licenses/MIT + * + * vis.js may be distributed under either license. + */ + function _defineProperty$1(obj, key, value) { + if (key in obj) { + Object.defineProperty(obj, key, { + value: value, + enumerable: true, + configurable: true, + writable: true + }); + } else { + obj[key] = value; + } + + return obj; + } + + var defineProperty$1 = _defineProperty$1; + + function createCommonjsModule$1(fn, module) { + return module = { + exports: {} + }, fn(module, module.exports), module.exports; + } + + var _typeof_1 = createCommonjsModule$1(function (module) { + function _typeof2(obj) { + if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { + _typeof2 = function _typeof2(obj) { + return typeof obj; + }; + } else { + _typeof2 = function _typeof2(obj) { + return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; + }; + } + + return _typeof2(obj); + } + + function _typeof(obj) { + if (typeof Symbol === "function" && _typeof2(Symbol.iterator) === "symbol") { + module.exports = _typeof = function _typeof(obj) { + return _typeof2(obj); + }; + } else { + module.exports = _typeof = function _typeof(obj) { + return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : _typeof2(obj); + }; + } + + return _typeof(obj); + } + + module.exports = _typeof; + }); + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } + } + + var classCallCheck = _classCallCheck; + + function _defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + + function _createClass(Constructor, protoProps, staticProps) { + if (protoProps) _defineProperties(Constructor.prototype, protoProps); + if (staticProps) _defineProperties(Constructor, staticProps); + return Constructor; + } + + var createClass = _createClass; + + function _assertThisInitialized(self) { + if (self === void 0) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + + return self; + } + + var assertThisInitialized = _assertThisInitialized; + + function _possibleConstructorReturn(self, call) { + if (call && (_typeof_1(call) === "object" || typeof call === "function")) { + return call; + } + + return assertThisInitialized(self); + } + + var possibleConstructorReturn = _possibleConstructorReturn; + var getPrototypeOf = createCommonjsModule$1(function (module) { + function _getPrototypeOf(o) { + module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { + return o.__proto__ || Object.getPrototypeOf(o); + }; + return _getPrototypeOf(o); + } + + module.exports = _getPrototypeOf; + }); + var setPrototypeOf$1 = createCommonjsModule$1(function (module) { + function _setPrototypeOf(o, p) { + module.exports = _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { + o.__proto__ = p; + return o; + }; + + return _setPrototypeOf(o, p); + } + + module.exports = _setPrototypeOf; + }); + + function _inherits(subClass, superClass) { + if (typeof superClass !== "function" && superClass !== null) { + throw new TypeError("Super expression must either be null or a function"); + } + + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + writable: true, + configurable: true + } + }); + if (superClass) setPrototypeOf$1(subClass, superClass); + } + + var inherits = _inherits; // Maps for number <-> hex string conversion + + var byteToHex$2 = []; + + for (var i$2 = 0; i$2 < 256; i$2++) { + byteToHex$2[i$2] = (i$2 + 0x100).toString(16).substr(1); + } + /** + * Represent binary UUID into it's string representation. + * + * @param buf - Buffer containing UUID bytes. + * @param offset - Offset from the start of the buffer where the UUID is saved (not needed if the buffer starts with the UUID). + * + * @returns String representation of the UUID. + */ + + + function stringifyUUID$1(buf, offset) { + var i = offset || 0; + var bth = byteToHex$2; + return bth[buf[i++]] + bth[buf[i++]] + bth[buf[i++]] + bth[buf[i++]] + '-' + bth[buf[i++]] + bth[buf[i++]] + '-' + bth[buf[i++]] + bth[buf[i++]] + '-' + bth[buf[i++]] + bth[buf[i++]] + '-' + bth[buf[i++]] + bth[buf[i++]] + bth[buf[i++]] + bth[buf[i++]] + bth[buf[i++]] + bth[buf[i++]]; + } + /** + * Generate 16 random bytes to be used as a base for UUID. + * + * @ignore + */ + + + var random$1 = function () { + if (typeof crypto !== 'undefined' && crypto.getRandomValues) { + // WHATWG crypto-based RNG - http://wiki.whatwg.org/wiki/Crypto + // Moderately fast, high quality + var _rnds8 = new Uint8Array(16); + + return function whatwgRNG() { + crypto.getRandomValues(_rnds8); + return _rnds8; + }; + } // Math.random()-based (RNG) + // + // If all else fails, use Math.random(). + // It's fast, but is of unspecified quality. + + + var _rnds = new Array(16); + + return function () { + for (var i = 0, r; i < 16; i++) { + if ((i & 0x03) === 0) { + r = Math.random() * 0x100000000; + } + + _rnds[i] = r >>> ((i & 0x03) << 3) & 0xff; + } + + return _rnds; + }; // uuid.js + // + // Copyright (c) 2010-2012 Robert Kieffer + // MIT License - http://opensource.org/licenses/mit-license.php + // Unique ID creation requires a high quality random # generator. We feature + // detect to determine the best RNG source, normalizing to a function that + // returns 128-bits of randomness, since that's what's usually required + // return require('./rng'); + }(); + + var byteToHex$1$1 = []; + + for (var i$1$2 = 0; i$1$2 < 256; i$1$2++) { + byteToHex$1$1[i$1$2] = (i$1$2 + 0x100).toString(16).substr(1); + } // **`v1()` - Generate time-based UUID** + // + // Inspired by https://github.com/LiosK/UUID.js + // and http://docs.python.org/library/uuid.html + // random #'s we need to init node and clockseq + + + var seedBytes$1 = random$1(); // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1) + + var defaultNodeId$1 = [seedBytes$1[0] | 0x01, seedBytes$1[1], seedBytes$1[2], seedBytes$1[3], seedBytes$1[4], seedBytes$1[5]]; // Per 4.2.2, randomize (14 bit) clockseq + + var defaultClockseq$1 = (seedBytes$1[6] << 8 | seedBytes$1[7]) & 0x3fff; // Previous uuid creation time + + /** + * UUIDv4 options. + */ + + /** + * Generate UUIDv4 + * + * @param options - Options to be used instead of default generated values. + * String 'binary' is a shorthand for uuid4({}, new Array(16)). + * @param buf - If present the buffer will be filled with the generated UUID. + * @param offset - Offset of the UUID from the start of the buffer. + * + * @returns UUIDv4 + */ + + function uuid4$1() { + var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + var buf = arguments.length > 1 ? arguments[1] : undefined; + var offset = arguments.length > 2 ? arguments[2] : undefined; // Deprecated - 'format' argument, as supported in v1.2 + + var i = buf && offset || 0; + + if (typeof options === 'string') { + buf = options === 'binary' ? new Array(16) : undefined; + options = {}; + } + + var rnds = options.random || (options.rng || random$1)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved` + + rnds[6] = rnds[6] & 0x0f | 0x40; + rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided + + if (buf) { + for (var ii = 0; ii < 16; ii++) { + buf[i + ii] = rnds[ii]; + } + } + + return buf || stringifyUUID$1(rnds); + } // Rollup will complain about mixing default and named exports in UMD build, + + + function _typeof$1(obj) { + if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { + _typeof$1 = function (obj) { + return typeof obj; + }; + } else { + _typeof$1 = function (obj) { + return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; + }; + } + + return _typeof$1(obj); + } + + var commonjsGlobal$1 = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; + + function commonjsRequire$1() { + throw new Error('Dynamic requires are not currently supported by rollup-plugin-commonjs'); + } + + function createCommonjsModule$1$1(fn, module) { + return module = { + exports: {} + }, fn(module, module.exports), module.exports; + } + + var moment$1 = createCommonjsModule$1$1(function (module, exports) { + (function (global, factory) { + module.exports = factory(); + })(commonjsGlobal$1, function () { + var hookCallback; + + function hooks() { + return hookCallback.apply(null, arguments); + } // This is done to register the method called with moment() + // without creating circular dependencies. + + + function setHookCallback(callback) { + hookCallback = callback; + } + + function isArray(input) { + return input instanceof Array || Object.prototype.toString.call(input) === '[object Array]'; + } + + function isObject(input) { + // IE8 will treat undefined and null as object if it wasn't for + // input != null + return input != null && Object.prototype.toString.call(input) === '[object Object]'; + } + + function isObjectEmpty(obj) { + if (Object.getOwnPropertyNames) { + return Object.getOwnPropertyNames(obj).length === 0; + } else { + var k; + + for (k in obj) { + if (obj.hasOwnProperty(k)) { + return false; + } + } + + return true; + } + } + + function isUndefined(input) { + return input === void 0; + } + + function isNumber(input) { + return typeof input === 'number' || Object.prototype.toString.call(input) === '[object Number]'; + } + + function isDate(input) { + return input instanceof Date || Object.prototype.toString.call(input) === '[object Date]'; + } + + function map(arr, fn) { + var res = [], + i; + + for (i = 0; i < arr.length; ++i) { + res.push(fn(arr[i], i)); + } + + return res; + } + + function hasOwnProp(a, b) { + return Object.prototype.hasOwnProperty.call(a, b); + } + + function extend(a, b) { + for (var i in b) { + if (hasOwnProp(b, i)) { + a[i] = b[i]; + } + } + + if (hasOwnProp(b, 'toString')) { + a.toString = b.toString; + } + + if (hasOwnProp(b, 'valueOf')) { + a.valueOf = b.valueOf; + } + + return a; + } + + function createUTC(input, format, locale, strict) { + return createLocalOrUTC(input, format, locale, strict, true).utc(); + } + + function defaultParsingFlags() { + // We need to deep clone this object. + return { + empty: false, + unusedTokens: [], + unusedInput: [], + overflow: -2, + charsLeftOver: 0, + nullInput: false, + invalidMonth: null, + invalidFormat: false, + userInvalidated: false, + iso: false, + parsedDateParts: [], + meridiem: null, + rfc2822: false, + weekdayMismatch: false + }; + } + + function getParsingFlags(m) { + if (m._pf == null) { + m._pf = defaultParsingFlags(); + } + + return m._pf; + } + + var some; + + if (Array.prototype.some) { + some = Array.prototype.some; + } else { + some = function (fun) { + var t = Object(this); + var len = t.length >>> 0; + + for (var i = 0; i < len; i++) { + if (i in t && fun.call(this, t[i], i, t)) { + return true; + } + } + + return false; + }; + } + + function isValid(m) { + if (m._isValid == null) { + var flags = getParsingFlags(m); + var parsedParts = some.call(flags.parsedDateParts, function (i) { + return i != null; + }); + var isNowValid = !isNaN(m._d.getTime()) && flags.overflow < 0 && !flags.empty && !flags.invalidMonth && !flags.invalidWeekday && !flags.weekdayMismatch && !flags.nullInput && !flags.invalidFormat && !flags.userInvalidated && (!flags.meridiem || flags.meridiem && parsedParts); + + if (m._strict) { + isNowValid = isNowValid && flags.charsLeftOver === 0 && flags.unusedTokens.length === 0 && flags.bigHour === undefined; + } + + if (Object.isFrozen == null || !Object.isFrozen(m)) { + m._isValid = isNowValid; + } else { + return isNowValid; + } + } + + return m._isValid; + } + + function createInvalid(flags) { + var m = createUTC(NaN); + + if (flags != null) { + extend(getParsingFlags(m), flags); + } else { + getParsingFlags(m).userInvalidated = true; + } + + return m; + } // Plugins that add properties should also add the key here (null value), + // so we can properly clone ourselves. + + + var momentProperties = hooks.momentProperties = []; + + function copyConfig(to, from) { + var i, prop, val; + + if (!isUndefined(from._isAMomentObject)) { + to._isAMomentObject = from._isAMomentObject; + } + + if (!isUndefined(from._i)) { + to._i = from._i; + } + + if (!isUndefined(from._f)) { + to._f = from._f; + } + + if (!isUndefined(from._l)) { + to._l = from._l; + } + + if (!isUndefined(from._strict)) { + to._strict = from._strict; + } + + if (!isUndefined(from._tzm)) { + to._tzm = from._tzm; + } + + if (!isUndefined(from._isUTC)) { + to._isUTC = from._isUTC; + } + + if (!isUndefined(from._offset)) { + to._offset = from._offset; + } + + if (!isUndefined(from._pf)) { + to._pf = getParsingFlags(from); + } + + if (!isUndefined(from._locale)) { + to._locale = from._locale; + } + + if (momentProperties.length > 0) { + for (i = 0; i < momentProperties.length; i++) { + prop = momentProperties[i]; + val = from[prop]; + + if (!isUndefined(val)) { + to[prop] = val; + } + } + } + + return to; + } + + var updateInProgress = false; // Moment prototype object + + function Moment(config) { + copyConfig(this, config); + this._d = new Date(config._d != null ? config._d.getTime() : NaN); + + if (!this.isValid()) { + this._d = new Date(NaN); + } // Prevent infinite loop in case updateOffset creates new moment + // objects. + + + if (updateInProgress === false) { + updateInProgress = true; + hooks.updateOffset(this); + updateInProgress = false; + } + } + + function isMoment(obj) { + return obj instanceof Moment || obj != null && obj._isAMomentObject != null; + } + + function absFloor(number) { + if (number < 0) { + // -0 -> 0 + return Math.ceil(number) || 0; + } else { + return Math.floor(number); + } + } + + function toInt(argumentForCoercion) { + var coercedNumber = +argumentForCoercion, + value = 0; + + if (coercedNumber !== 0 && isFinite(coercedNumber)) { + value = absFloor(coercedNumber); + } + + return value; + } // compare two arrays, return the number of differences + + + function compareArrays(array1, array2, dontConvert) { + var len = Math.min(array1.length, array2.length), + lengthDiff = Math.abs(array1.length - array2.length), + diffs = 0, + i; + + for (i = 0; i < len; i++) { + if (dontConvert && array1[i] !== array2[i] || !dontConvert && toInt(array1[i]) !== toInt(array2[i])) { + diffs++; + } + } + + return diffs + lengthDiff; + } + + function warn(msg) { + if (hooks.suppressDeprecationWarnings === false && typeof console !== 'undefined' && console.warn) { + console.warn('Deprecation warning: ' + msg); + } + } + + function deprecate(msg, fn) { + var firstTime = true; + return extend(function () { + if (hooks.deprecationHandler != null) { + hooks.deprecationHandler(null, msg); + } + + if (firstTime) { + var args = []; + var arg; + + for (var i = 0; i < arguments.length; i++) { + arg = ''; + + if (typeof arguments[i] === 'object') { + arg += '\n[' + i + '] '; + + for (var key in arguments[0]) { + arg += key + ': ' + arguments[0][key] + ', '; + } + + arg = arg.slice(0, -2); // Remove trailing comma and space + } else { + arg = arguments[i]; + } + + args.push(arg); + } + + warn(msg + '\nArguments: ' + Array.prototype.slice.call(args).join('') + '\n' + new Error().stack); + firstTime = false; + } + + return fn.apply(this, arguments); + }, fn); + } + + var deprecations = {}; + + function deprecateSimple(name, msg) { + if (hooks.deprecationHandler != null) { + hooks.deprecationHandler(name, msg); + } + + if (!deprecations[name]) { + warn(msg); + deprecations[name] = true; + } + } + + hooks.suppressDeprecationWarnings = false; + hooks.deprecationHandler = null; + + function isFunction(input) { + return input instanceof Function || Object.prototype.toString.call(input) === '[object Function]'; + } + + function set(config) { + var prop, i; + + for (i in config) { + prop = config[i]; + + if (isFunction(prop)) { + this[i] = prop; + } else { + this['_' + i] = prop; + } + } + + this._config = config; // Lenient ordinal parsing accepts just a number in addition to + // number + (possibly) stuff coming from _dayOfMonthOrdinalParse. + // TODO: Remove "ordinalParse" fallback in next major release. + + this._dayOfMonthOrdinalParseLenient = new RegExp((this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) + '|' + /\d{1,2}/.source); + } + + function mergeConfigs(parentConfig, childConfig) { + var res = extend({}, parentConfig), + prop; + + for (prop in childConfig) { + if (hasOwnProp(childConfig, prop)) { + if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) { + res[prop] = {}; + extend(res[prop], parentConfig[prop]); + extend(res[prop], childConfig[prop]); + } else if (childConfig[prop] != null) { + res[prop] = childConfig[prop]; + } else { + delete res[prop]; + } + } + } + + for (prop in parentConfig) { + if (hasOwnProp(parentConfig, prop) && !hasOwnProp(childConfig, prop) && isObject(parentConfig[prop])) { + // make sure changes to properties don't modify parent config + res[prop] = extend({}, res[prop]); + } + } + + return res; + } + + function Locale(config) { + if (config != null) { + this.set(config); + } + } + + var keys; + + if (Object.keys) { + keys = Object.keys; + } else { + keys = function (obj) { + var i, + res = []; + + for (i in obj) { + if (hasOwnProp(obj, i)) { + res.push(i); + } + } + + return res; + }; + } + + var defaultCalendar = { + sameDay: '[Today at] LT', + nextDay: '[Tomorrow at] LT', + nextWeek: 'dddd [at] LT', + lastDay: '[Yesterday at] LT', + lastWeek: '[Last] dddd [at] LT', + sameElse: 'L' + }; + + function calendar(key, mom, now) { + var output = this._calendar[key] || this._calendar['sameElse']; + return isFunction(output) ? output.call(mom, now) : output; + } + + var defaultLongDateFormat = { + LTS: 'h:mm:ss A', + LT: 'h:mm A', + L: 'MM/DD/YYYY', + LL: 'MMMM D, YYYY', + LLL: 'MMMM D, YYYY h:mm A', + LLLL: 'dddd, MMMM D, YYYY h:mm A' + }; + + function longDateFormat(key) { + var format = this._longDateFormat[key], + formatUpper = this._longDateFormat[key.toUpperCase()]; + + if (format || !formatUpper) { + return format; + } + + this._longDateFormat[key] = formatUpper.replace(/MMMM|MM|DD|dddd/g, function (val) { + return val.slice(1); + }); + return this._longDateFormat[key]; + } + + var defaultInvalidDate = 'Invalid date'; + + function invalidDate() { + return this._invalidDate; + } + + var defaultOrdinal = '%d'; + var defaultDayOfMonthOrdinalParse = /\d{1,2}/; + + function ordinal(number) { + return this._ordinal.replace('%d', number); + } + + var defaultRelativeTime = { + future: 'in %s', + past: '%s ago', + s: 'a few seconds', + ss: '%d seconds', + m: 'a minute', + mm: '%d minutes', + h: 'an hour', + hh: '%d hours', + d: 'a day', + dd: '%d days', + M: 'a month', + MM: '%d months', + y: 'a year', + yy: '%d years' + }; + + function relativeTime(number, withoutSuffix, string, isFuture) { + var output = this._relativeTime[string]; + return isFunction(output) ? output(number, withoutSuffix, string, isFuture) : output.replace(/%d/i, number); + } + + function pastFuture(diff, output) { + var format = this._relativeTime[diff > 0 ? 'future' : 'past']; + return isFunction(format) ? format(output) : format.replace(/%s/i, output); + } + + var aliases = {}; + + function addUnitAlias(unit, shorthand) { + var lowerCase = unit.toLowerCase(); + aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit; + } + + function normalizeUnits(units) { + return typeof units === 'string' ? aliases[units] || aliases[units.toLowerCase()] : undefined; + } + + function normalizeObjectUnits(inputObject) { + var normalizedInput = {}, + normalizedProp, + prop; + + for (prop in inputObject) { + if (hasOwnProp(inputObject, prop)) { + normalizedProp = normalizeUnits(prop); + + if (normalizedProp) { + normalizedInput[normalizedProp] = inputObject[prop]; + } + } + } + + return normalizedInput; + } + + var priorities = {}; + + function addUnitPriority(unit, priority) { + priorities[unit] = priority; + } + + function getPrioritizedUnits(unitsObj) { + var units = []; + + for (var u in unitsObj) { + units.push({ + unit: u, + priority: priorities[u] + }); + } + + units.sort(function (a, b) { + return a.priority - b.priority; + }); + return units; + } + + function zeroFill(number, targetLength, forceSign) { + var absNumber = '' + Math.abs(number), + zerosToFill = targetLength - absNumber.length, + sign = number >= 0; + return (sign ? forceSign ? '+' : '' : '-') + Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) + absNumber; + } + + var formattingTokens = /(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g; + var localFormattingTokens = /(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g; + var formatFunctions = {}; + var formatTokenFunctions = {}; // token: 'M' + // padded: ['MM', 2] + // ordinal: 'Mo' + // callback: function () { this.month() + 1 } + + function addFormatToken(token, padded, ordinal, callback) { + var func = callback; + + if (typeof callback === 'string') { + func = function () { + return this[callback](); + }; + } + + if (token) { + formatTokenFunctions[token] = func; + } + + if (padded) { + formatTokenFunctions[padded[0]] = function () { + return zeroFill(func.apply(this, arguments), padded[1], padded[2]); + }; + } + + if (ordinal) { + formatTokenFunctions[ordinal] = function () { + return this.localeData().ordinal(func.apply(this, arguments), token); + }; + } + } + + function removeFormattingTokens(input) { + if (input.match(/\[[\s\S]/)) { + return input.replace(/^\[|\]$/g, ''); + } + + return input.replace(/\\/g, ''); + } + + function makeFormatFunction(format) { + var array = format.match(formattingTokens), + i, + length; + + for (i = 0, length = array.length; i < length; i++) { + if (formatTokenFunctions[array[i]]) { + array[i] = formatTokenFunctions[array[i]]; + } else { + array[i] = removeFormattingTokens(array[i]); + } + } + + return function (mom) { + var output = '', + i; + + for (i = 0; i < length; i++) { + output += isFunction(array[i]) ? array[i].call(mom, format) : array[i]; + } + + return output; + }; + } // format date using native date object + + + function formatMoment(m, format) { + if (!m.isValid()) { + return m.localeData().invalidDate(); + } + + format = expandFormat(format, m.localeData()); + formatFunctions[format] = formatFunctions[format] || makeFormatFunction(format); + return formatFunctions[format](m); + } + + function expandFormat(format, locale) { + var i = 5; + + function replaceLongDateFormatTokens(input) { + return locale.longDateFormat(input) || input; + } + + localFormattingTokens.lastIndex = 0; + + while (i >= 0 && localFormattingTokens.test(format)) { + format = format.replace(localFormattingTokens, replaceLongDateFormatTokens); + localFormattingTokens.lastIndex = 0; + i -= 1; + } + + return format; + } + + var match1 = /\d/; // 0 - 9 + + var match2 = /\d\d/; // 00 - 99 + + var match3 = /\d{3}/; // 000 - 999 + + var match4 = /\d{4}/; // 0000 - 9999 + + var match6 = /[+-]?\d{6}/; // -999999 - 999999 + + var match1to2 = /\d\d?/; // 0 - 99 + + var match3to4 = /\d\d\d\d?/; // 999 - 9999 + + var match5to6 = /\d\d\d\d\d\d?/; // 99999 - 999999 + + var match1to3 = /\d{1,3}/; // 0 - 999 + + var match1to4 = /\d{1,4}/; // 0 - 9999 + + var match1to6 = /[+-]?\d{1,6}/; // -999999 - 999999 + + var matchUnsigned = /\d+/; // 0 - inf + + var matchSigned = /[+-]?\d+/; // -inf - inf + + var matchOffset = /Z|[+-]\d\d:?\d\d/gi; // +00:00 -00:00 +0000 -0000 or Z + + var matchShortOffset = /Z|[+-]\d\d(?::?\d\d)?/gi; // +00 -00 +00:00 -00:00 +0000 -0000 or Z + + var matchTimestamp = /[+-]?\d+(\.\d{1,3})?/; // 123456789 123456789.123 + // any word (or two) characters or numbers including two/three word month in arabic. + // includes scottish gaelic two word and hyphenated months + + var matchWord = /[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i; + var regexes = {}; + + function addRegexToken(token, regex, strictRegex) { + regexes[token] = isFunction(regex) ? regex : function (isStrict, localeData) { + return isStrict && strictRegex ? strictRegex : regex; + }; + } + + function getParseRegexForToken(token, config) { + if (!hasOwnProp(regexes, token)) { + return new RegExp(unescapeFormat(token)); + } + + return regexes[token](config._strict, config._locale); + } // Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript + + + function unescapeFormat(s) { + return regexEscape(s.replace('\\', '').replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g, function (matched, p1, p2, p3, p4) { + return p1 || p2 || p3 || p4; + })); + } + + function regexEscape(s) { + return s.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&'); + } + + var tokens = {}; + + function addParseToken(token, callback) { + var i, + func = callback; + + if (typeof token === 'string') { + token = [token]; + } + + if (isNumber(callback)) { + func = function (input, array) { + array[callback] = toInt(input); + }; + } + + for (i = 0; i < token.length; i++) { + tokens[token[i]] = func; + } + } + + function addWeekParseToken(token, callback) { + addParseToken(token, function (input, array, config, token) { + config._w = config._w || {}; + callback(input, config._w, config, token); + }); + } + + function addTimeToArrayFromToken(token, input, config) { + if (input != null && hasOwnProp(tokens, token)) { + tokens[token](input, config._a, config, token); + } + } + + var YEAR = 0; + var MONTH = 1; + var DATE = 2; + var HOUR = 3; + var MINUTE = 4; + var SECOND = 5; + var MILLISECOND = 6; + var WEEK = 7; + var WEEKDAY = 8; // FORMATTING + + addFormatToken('Y', 0, 0, function () { + var y = this.year(); + return y <= 9999 ? '' + y : '+' + y; + }); + addFormatToken(0, ['YY', 2], 0, function () { + return this.year() % 100; + }); + addFormatToken(0, ['YYYY', 4], 0, 'year'); + addFormatToken(0, ['YYYYY', 5], 0, 'year'); + addFormatToken(0, ['YYYYYY', 6, true], 0, 'year'); // ALIASES + + addUnitAlias('year', 'y'); // PRIORITIES + + addUnitPriority('year', 1); // PARSING + + addRegexToken('Y', matchSigned); + addRegexToken('YY', match1to2, match2); + addRegexToken('YYYY', match1to4, match4); + addRegexToken('YYYYY', match1to6, match6); + addRegexToken('YYYYYY', match1to6, match6); + addParseToken(['YYYYY', 'YYYYYY'], YEAR); + addParseToken('YYYY', function (input, array) { + array[YEAR] = input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input); + }); + addParseToken('YY', function (input, array) { + array[YEAR] = hooks.parseTwoDigitYear(input); + }); + addParseToken('Y', function (input, array) { + array[YEAR] = parseInt(input, 10); + }); // HELPERS + + function daysInYear(year) { + return isLeapYear(year) ? 366 : 365; + } + + function isLeapYear(year) { + return year % 4 === 0 && year % 100 !== 0 || year % 400 === 0; + } // HOOKS + + + hooks.parseTwoDigitYear = function (input) { + return toInt(input) + (toInt(input) > 68 ? 1900 : 2000); + }; // MOMENTS + + + var getSetYear = makeGetSet('FullYear', true); + + function getIsLeapYear() { + return isLeapYear(this.year()); + } + + function makeGetSet(unit, keepTime) { + return function (value) { + if (value != null) { + set$1(this, unit, value); + hooks.updateOffset(this, keepTime); + return this; + } else { + return get(this, unit); + } + }; + } + + function get(mom, unit) { + return mom.isValid() ? mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]() : NaN; + } + + function set$1(mom, unit, value) { + if (mom.isValid() && !isNaN(value)) { + if (unit === 'FullYear' && isLeapYear(mom.year()) && mom.month() === 1 && mom.date() === 29) { + mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value, mom.month(), daysInMonth(value, mom.month())); + } else { + mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value); + } + } + } // MOMENTS + + + function stringGet(units) { + units = normalizeUnits(units); + + if (isFunction(this[units])) { + return this[units](); + } + + return this; + } + + function stringSet(units, value) { + if (typeof units === 'object') { + units = normalizeObjectUnits(units); + var prioritized = getPrioritizedUnits(units); + + for (var i = 0; i < prioritized.length; i++) { + this[prioritized[i].unit](units[prioritized[i].unit]); + } + } else { + units = normalizeUnits(units); + + if (isFunction(this[units])) { + return this[units](value); + } + } + + return this; + } + + function mod(n, x) { + return (n % x + x) % x; + } + + var indexOf; + + if (Array.prototype.indexOf) { + indexOf = Array.prototype.indexOf; + } else { + indexOf = function (o) { + // I know + var i; + + for (i = 0; i < this.length; ++i) { + if (this[i] === o) { + return i; + } + } + + return -1; + }; + } + + function daysInMonth(year, month) { + if (isNaN(year) || isNaN(month)) { + return NaN; + } + + var modMonth = mod(month, 12); + year += (month - modMonth) / 12; + return modMonth === 1 ? isLeapYear(year) ? 29 : 28 : 31 - modMonth % 7 % 2; + } // FORMATTING + + + addFormatToken('M', ['MM', 2], 'Mo', function () { + return this.month() + 1; + }); + addFormatToken('MMM', 0, 0, function (format) { + return this.localeData().monthsShort(this, format); + }); + addFormatToken('MMMM', 0, 0, function (format) { + return this.localeData().months(this, format); + }); // ALIASES + + addUnitAlias('month', 'M'); // PRIORITY + + addUnitPriority('month', 8); // PARSING + + addRegexToken('M', match1to2); + addRegexToken('MM', match1to2, match2); + addRegexToken('MMM', function (isStrict, locale) { + return locale.monthsShortRegex(isStrict); + }); + addRegexToken('MMMM', function (isStrict, locale) { + return locale.monthsRegex(isStrict); + }); + addParseToken(['M', 'MM'], function (input, array) { + array[MONTH] = toInt(input) - 1; + }); + addParseToken(['MMM', 'MMMM'], function (input, array, config, token) { + var month = config._locale.monthsParse(input, token, config._strict); // if we didn't find a month name, mark the date as invalid. + + + if (month != null) { + array[MONTH] = month; + } else { + getParsingFlags(config).invalidMonth = input; + } + }); // LOCALES + + var MONTHS_IN_FORMAT = /D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/; + var defaultLocaleMonths = 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'); + + function localeMonths(m, format) { + if (!m) { + return isArray(this._months) ? this._months : this._months['standalone']; + } + + return isArray(this._months) ? this._months[m.month()] : this._months[(this._months.isFormat || MONTHS_IN_FORMAT).test(format) ? 'format' : 'standalone'][m.month()]; + } + + var defaultLocaleMonthsShort = 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'); + + function localeMonthsShort(m, format) { + if (!m) { + return isArray(this._monthsShort) ? this._monthsShort : this._monthsShort['standalone']; + } + + return isArray(this._monthsShort) ? this._monthsShort[m.month()] : this._monthsShort[MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'][m.month()]; + } + + function handleStrictParse(monthName, format, strict) { + var i, + ii, + mom, + llc = monthName.toLocaleLowerCase(); + + if (!this._monthsParse) { + // this is not used + this._monthsParse = []; + this._longMonthsParse = []; + this._shortMonthsParse = []; + + for (i = 0; i < 12; ++i) { + mom = createUTC([2000, i]); + this._shortMonthsParse[i] = this.monthsShort(mom, '').toLocaleLowerCase(); + this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase(); + } + } + + if (strict) { + if (format === 'MMM') { + ii = indexOf.call(this._shortMonthsParse, llc); + return ii !== -1 ? ii : null; + } else { + ii = indexOf.call(this._longMonthsParse, llc); + return ii !== -1 ? ii : null; + } + } else { + if (format === 'MMM') { + ii = indexOf.call(this._shortMonthsParse, llc); + + if (ii !== -1) { + return ii; + } + + ii = indexOf.call(this._longMonthsParse, llc); + return ii !== -1 ? ii : null; + } else { + ii = indexOf.call(this._longMonthsParse, llc); + + if (ii !== -1) { + return ii; + } + + ii = indexOf.call(this._shortMonthsParse, llc); + return ii !== -1 ? ii : null; + } + } + } + + function localeMonthsParse(monthName, format, strict) { + var i, mom, regex; + + if (this._monthsParseExact) { + return handleStrictParse.call(this, monthName, format, strict); + } + + if (!this._monthsParse) { + this._monthsParse = []; + this._longMonthsParse = []; + this._shortMonthsParse = []; + } // TODO: add sorting + // Sorting makes sure if one month (or abbr) is a prefix of another + // see sorting in computeMonthsParse + + + for (i = 0; i < 12; i++) { + // make the regex if we don't have it already + mom = createUTC([2000, i]); + + if (strict && !this._longMonthsParse[i]) { + this._longMonthsParse[i] = new RegExp('^' + this.months(mom, '').replace('.', '') + '$', 'i'); + this._shortMonthsParse[i] = new RegExp('^' + this.monthsShort(mom, '').replace('.', '') + '$', 'i'); + } + + if (!strict && !this._monthsParse[i]) { + regex = '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, ''); + this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i'); + } // test the regex + + + if (strict && format === 'MMMM' && this._longMonthsParse[i].test(monthName)) { + return i; + } else if (strict && format === 'MMM' && this._shortMonthsParse[i].test(monthName)) { + return i; + } else if (!strict && this._monthsParse[i].test(monthName)) { + return i; + } + } + } // MOMENTS + + + function setMonth(mom, value) { + var dayOfMonth; + + if (!mom.isValid()) { + // No op + return mom; + } + + if (typeof value === 'string') { + if (/^\d+$/.test(value)) { + value = toInt(value); + } else { + value = mom.localeData().monthsParse(value); // TODO: Another silent failure? + + if (!isNumber(value)) { + return mom; + } + } + } + + dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value)); + + mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth); + + return mom; + } + + function getSetMonth(value) { + if (value != null) { + setMonth(this, value); + hooks.updateOffset(this, true); + return this; + } else { + return get(this, 'Month'); + } + } + + function getDaysInMonth() { + return daysInMonth(this.year(), this.month()); + } + + var defaultMonthsShortRegex = matchWord; + + function monthsShortRegex(isStrict) { + if (this._monthsParseExact) { + if (!hasOwnProp(this, '_monthsRegex')) { + computeMonthsParse.call(this); + } + + if (isStrict) { + return this._monthsShortStrictRegex; + } else { + return this._monthsShortRegex; + } + } else { + if (!hasOwnProp(this, '_monthsShortRegex')) { + this._monthsShortRegex = defaultMonthsShortRegex; + } + + return this._monthsShortStrictRegex && isStrict ? this._monthsShortStrictRegex : this._monthsShortRegex; + } + } + + var defaultMonthsRegex = matchWord; + + function monthsRegex(isStrict) { + if (this._monthsParseExact) { + if (!hasOwnProp(this, '_monthsRegex')) { + computeMonthsParse.call(this); + } + + if (isStrict) { + return this._monthsStrictRegex; + } else { + return this._monthsRegex; + } + } else { + if (!hasOwnProp(this, '_monthsRegex')) { + this._monthsRegex = defaultMonthsRegex; + } + + return this._monthsStrictRegex && isStrict ? this._monthsStrictRegex : this._monthsRegex; + } + } + + function computeMonthsParse() { + function cmpLenRev(a, b) { + return b.length - a.length; + } + + var shortPieces = [], + longPieces = [], + mixedPieces = [], + i, + mom; + + for (i = 0; i < 12; i++) { + // make the regex if we don't have it already + mom = createUTC([2000, i]); + shortPieces.push(this.monthsShort(mom, '')); + longPieces.push(this.months(mom, '')); + mixedPieces.push(this.months(mom, '')); + mixedPieces.push(this.monthsShort(mom, '')); + } // Sorting makes sure if one month (or abbr) is a prefix of another it + // will match the longer piece. + + + shortPieces.sort(cmpLenRev); + longPieces.sort(cmpLenRev); + mixedPieces.sort(cmpLenRev); + + for (i = 0; i < 12; i++) { + shortPieces[i] = regexEscape(shortPieces[i]); + longPieces[i] = regexEscape(longPieces[i]); + } + + for (i = 0; i < 24; i++) { + mixedPieces[i] = regexEscape(mixedPieces[i]); + } + + this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i'); + this._monthsShortRegex = this._monthsRegex; + this._monthsStrictRegex = new RegExp('^(' + longPieces.join('|') + ')', 'i'); + this._monthsShortStrictRegex = new RegExp('^(' + shortPieces.join('|') + ')', 'i'); + } + + function createDate(y, m, d, h, M, s, ms) { + // can't just apply() to create a date: + // https://stackoverflow.com/q/181348 + var date; // the date constructor remaps years 0-99 to 1900-1999 + + if (y < 100 && y >= 0) { + // preserve leap years using a full 400 year cycle, then reset + date = new Date(y + 400, m, d, h, M, s, ms); + + if (isFinite(date.getFullYear())) { + date.setFullYear(y); + } + } else { + date = new Date(y, m, d, h, M, s, ms); + } + + return date; + } + + function createUTCDate(y) { + var date; // the Date.UTC function remaps years 0-99 to 1900-1999 + + if (y < 100 && y >= 0) { + var args = Array.prototype.slice.call(arguments); // preserve leap years using a full 400 year cycle, then reset + + args[0] = y + 400; + date = new Date(Date.UTC.apply(null, args)); + + if (isFinite(date.getUTCFullYear())) { + date.setUTCFullYear(y); + } + } else { + date = new Date(Date.UTC.apply(null, arguments)); + } + + return date; + } // start-of-first-week - start-of-year + + + function firstWeekOffset(year, dow, doy) { + var // first-week day -- which january is always in the first week (4 for iso, 1 for other) + fwd = 7 + dow - doy, + // first-week day local weekday -- which local weekday is fwd + fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7; + return -fwdlw + fwd - 1; + } // https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday + + + function dayOfYearFromWeeks(year, week, weekday, dow, doy) { + var localWeekday = (7 + weekday - dow) % 7, + weekOffset = firstWeekOffset(year, dow, doy), + dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset, + resYear, + resDayOfYear; + + if (dayOfYear <= 0) { + resYear = year - 1; + resDayOfYear = daysInYear(resYear) + dayOfYear; + } else if (dayOfYear > daysInYear(year)) { + resYear = year + 1; + resDayOfYear = dayOfYear - daysInYear(year); + } else { + resYear = year; + resDayOfYear = dayOfYear; + } + + return { + year: resYear, + dayOfYear: resDayOfYear + }; + } + + function weekOfYear(mom, dow, doy) { + var weekOffset = firstWeekOffset(mom.year(), dow, doy), + week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1, + resWeek, + resYear; + + if (week < 1) { + resYear = mom.year() - 1; + resWeek = week + weeksInYear(resYear, dow, doy); + } else if (week > weeksInYear(mom.year(), dow, doy)) { + resWeek = week - weeksInYear(mom.year(), dow, doy); + resYear = mom.year() + 1; + } else { + resYear = mom.year(); + resWeek = week; + } + + return { + week: resWeek, + year: resYear + }; + } + + function weeksInYear(year, dow, doy) { + var weekOffset = firstWeekOffset(year, dow, doy), + weekOffsetNext = firstWeekOffset(year + 1, dow, doy); + return (daysInYear(year) - weekOffset + weekOffsetNext) / 7; + } // FORMATTING + + + addFormatToken('w', ['ww', 2], 'wo', 'week'); + addFormatToken('W', ['WW', 2], 'Wo', 'isoWeek'); // ALIASES + + addUnitAlias('week', 'w'); + addUnitAlias('isoWeek', 'W'); // PRIORITIES + + addUnitPriority('week', 5); + addUnitPriority('isoWeek', 5); // PARSING + + addRegexToken('w', match1to2); + addRegexToken('ww', match1to2, match2); + addRegexToken('W', match1to2); + addRegexToken('WW', match1to2, match2); + addWeekParseToken(['w', 'ww', 'W', 'WW'], function (input, week, config, token) { + week[token.substr(0, 1)] = toInt(input); + }); // HELPERS + // LOCALES + + function localeWeek(mom) { + return weekOfYear(mom, this._week.dow, this._week.doy).week; + } + + var defaultLocaleWeek = { + dow: 0, + // Sunday is the first day of the week. + doy: 6 // The week that contains Jan 6th is the first week of the year. + + }; + + function localeFirstDayOfWeek() { + return this._week.dow; + } + + function localeFirstDayOfYear() { + return this._week.doy; + } // MOMENTS + + + function getSetWeek(input) { + var week = this.localeData().week(this); + return input == null ? week : this.add((input - week) * 7, 'd'); + } + + function getSetISOWeek(input) { + var week = weekOfYear(this, 1, 4).week; + return input == null ? week : this.add((input - week) * 7, 'd'); + } // FORMATTING + + + addFormatToken('d', 0, 'do', 'day'); + addFormatToken('dd', 0, 0, function (format) { + return this.localeData().weekdaysMin(this, format); + }); + addFormatToken('ddd', 0, 0, function (format) { + return this.localeData().weekdaysShort(this, format); + }); + addFormatToken('dddd', 0, 0, function (format) { + return this.localeData().weekdays(this, format); + }); + addFormatToken('e', 0, 0, 'weekday'); + addFormatToken('E', 0, 0, 'isoWeekday'); // ALIASES + + addUnitAlias('day', 'd'); + addUnitAlias('weekday', 'e'); + addUnitAlias('isoWeekday', 'E'); // PRIORITY + + addUnitPriority('day', 11); + addUnitPriority('weekday', 11); + addUnitPriority('isoWeekday', 11); // PARSING + + addRegexToken('d', match1to2); + addRegexToken('e', match1to2); + addRegexToken('E', match1to2); + addRegexToken('dd', function (isStrict, locale) { + return locale.weekdaysMinRegex(isStrict); + }); + addRegexToken('ddd', function (isStrict, locale) { + return locale.weekdaysShortRegex(isStrict); + }); + addRegexToken('dddd', function (isStrict, locale) { + return locale.weekdaysRegex(isStrict); + }); + addWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) { + var weekday = config._locale.weekdaysParse(input, token, config._strict); // if we didn't get a weekday name, mark the date as invalid + + + if (weekday != null) { + week.d = weekday; + } else { + getParsingFlags(config).invalidWeekday = input; + } + }); + addWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) { + week[token] = toInt(input); + }); // HELPERS + + function parseWeekday(input, locale) { + if (typeof input !== 'string') { + return input; + } + + if (!isNaN(input)) { + return parseInt(input, 10); + } + + input = locale.weekdaysParse(input); + + if (typeof input === 'number') { + return input; + } + + return null; + } + + function parseIsoWeekday(input, locale) { + if (typeof input === 'string') { + return locale.weekdaysParse(input) % 7 || 7; + } + + return isNaN(input) ? null : input; + } // LOCALES + + + function shiftWeekdays(ws, n) { + return ws.slice(n, 7).concat(ws.slice(0, n)); + } + + var defaultLocaleWeekdays = 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'); + + function localeWeekdays(m, format) { + var weekdays = isArray(this._weekdays) ? this._weekdays : this._weekdays[m && m !== true && this._weekdays.isFormat.test(format) ? 'format' : 'standalone']; + return m === true ? shiftWeekdays(weekdays, this._week.dow) : m ? weekdays[m.day()] : weekdays; + } + + var defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'); + + function localeWeekdaysShort(m) { + return m === true ? shiftWeekdays(this._weekdaysShort, this._week.dow) : m ? this._weekdaysShort[m.day()] : this._weekdaysShort; + } + + var defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'); + + function localeWeekdaysMin(m) { + return m === true ? shiftWeekdays(this._weekdaysMin, this._week.dow) : m ? this._weekdaysMin[m.day()] : this._weekdaysMin; + } + + function handleStrictParse$1(weekdayName, format, strict) { + var i, + ii, + mom, + llc = weekdayName.toLocaleLowerCase(); + + if (!this._weekdaysParse) { + this._weekdaysParse = []; + this._shortWeekdaysParse = []; + this._minWeekdaysParse = []; + + for (i = 0; i < 7; ++i) { + mom = createUTC([2000, 1]).day(i); + this._minWeekdaysParse[i] = this.weekdaysMin(mom, '').toLocaleLowerCase(); + this._shortWeekdaysParse[i] = this.weekdaysShort(mom, '').toLocaleLowerCase(); + this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase(); + } + } + + if (strict) { + if (format === 'dddd') { + ii = indexOf.call(this._weekdaysParse, llc); + return ii !== -1 ? ii : null; + } else if (format === 'ddd') { + ii = indexOf.call(this._shortWeekdaysParse, llc); + return ii !== -1 ? ii : null; + } else { + ii = indexOf.call(this._minWeekdaysParse, llc); + return ii !== -1 ? ii : null; + } + } else { + if (format === 'dddd') { + ii = indexOf.call(this._weekdaysParse, llc); + + if (ii !== -1) { + return ii; + } + + ii = indexOf.call(this._shortWeekdaysParse, llc); + + if (ii !== -1) { + return ii; + } + + ii = indexOf.call(this._minWeekdaysParse, llc); + return ii !== -1 ? ii : null; + } else if (format === 'ddd') { + ii = indexOf.call(this._shortWeekdaysParse, llc); + + if (ii !== -1) { + return ii; + } + + ii = indexOf.call(this._weekdaysParse, llc); + + if (ii !== -1) { + return ii; + } + + ii = indexOf.call(this._minWeekdaysParse, llc); + return ii !== -1 ? ii : null; + } else { + ii = indexOf.call(this._minWeekdaysParse, llc); + + if (ii !== -1) { + return ii; + } + + ii = indexOf.call(this._weekdaysParse, llc); + + if (ii !== -1) { + return ii; + } + + ii = indexOf.call(this._shortWeekdaysParse, llc); + return ii !== -1 ? ii : null; + } + } + } + + function localeWeekdaysParse(weekdayName, format, strict) { + var i, mom, regex; + + if (this._weekdaysParseExact) { + return handleStrictParse$1.call(this, weekdayName, format, strict); + } + + if (!this._weekdaysParse) { + this._weekdaysParse = []; + this._minWeekdaysParse = []; + this._shortWeekdaysParse = []; + this._fullWeekdaysParse = []; + } + + for (i = 0; i < 7; i++) { + // make the regex if we don't have it already + mom = createUTC([2000, 1]).day(i); + + if (strict && !this._fullWeekdaysParse[i]) { + this._fullWeekdaysParse[i] = new RegExp('^' + this.weekdays(mom, '').replace('.', '\\.?') + '$', 'i'); + this._shortWeekdaysParse[i] = new RegExp('^' + this.weekdaysShort(mom, '').replace('.', '\\.?') + '$', 'i'); + this._minWeekdaysParse[i] = new RegExp('^' + this.weekdaysMin(mom, '').replace('.', '\\.?') + '$', 'i'); + } + + if (!this._weekdaysParse[i]) { + regex = '^' + this.weekdays(mom, '') + '|^' + this.weekdaysShort(mom, '') + '|^' + this.weekdaysMin(mom, ''); + this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i'); + } // test the regex + + + if (strict && format === 'dddd' && this._fullWeekdaysParse[i].test(weekdayName)) { + return i; + } else if (strict && format === 'ddd' && this._shortWeekdaysParse[i].test(weekdayName)) { + return i; + } else if (strict && format === 'dd' && this._minWeekdaysParse[i].test(weekdayName)) { + return i; + } else if (!strict && this._weekdaysParse[i].test(weekdayName)) { + return i; + } + } + } // MOMENTS + + + function getSetDayOfWeek(input) { + if (!this.isValid()) { + return input != null ? this : NaN; + } + + var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay(); + + if (input != null) { + input = parseWeekday(input, this.localeData()); + return this.add(input - day, 'd'); + } else { + return day; + } + } + + function getSetLocaleDayOfWeek(input) { + if (!this.isValid()) { + return input != null ? this : NaN; + } + + var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7; + return input == null ? weekday : this.add(input - weekday, 'd'); + } + + function getSetISODayOfWeek(input) { + if (!this.isValid()) { + return input != null ? this : NaN; + } // behaves the same as moment#day except + // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6) + // as a setter, sunday should belong to the previous week. + + + if (input != null) { + var weekday = parseIsoWeekday(input, this.localeData()); + return this.day(this.day() % 7 ? weekday : weekday - 7); + } else { + return this.day() || 7; + } + } + + var defaultWeekdaysRegex = matchWord; + + function weekdaysRegex(isStrict) { + if (this._weekdaysParseExact) { + if (!hasOwnProp(this, '_weekdaysRegex')) { + computeWeekdaysParse.call(this); + } + + if (isStrict) { + return this._weekdaysStrictRegex; + } else { + return this._weekdaysRegex; + } + } else { + if (!hasOwnProp(this, '_weekdaysRegex')) { + this._weekdaysRegex = defaultWeekdaysRegex; + } + + return this._weekdaysStrictRegex && isStrict ? this._weekdaysStrictRegex : this._weekdaysRegex; + } + } + + var defaultWeekdaysShortRegex = matchWord; + + function weekdaysShortRegex(isStrict) { + if (this._weekdaysParseExact) { + if (!hasOwnProp(this, '_weekdaysRegex')) { + computeWeekdaysParse.call(this); + } + + if (isStrict) { + return this._weekdaysShortStrictRegex; + } else { + return this._weekdaysShortRegex; + } + } else { + if (!hasOwnProp(this, '_weekdaysShortRegex')) { + this._weekdaysShortRegex = defaultWeekdaysShortRegex; + } + + return this._weekdaysShortStrictRegex && isStrict ? this._weekdaysShortStrictRegex : this._weekdaysShortRegex; + } + } + + var defaultWeekdaysMinRegex = matchWord; + + function weekdaysMinRegex(isStrict) { + if (this._weekdaysParseExact) { + if (!hasOwnProp(this, '_weekdaysRegex')) { + computeWeekdaysParse.call(this); + } + + if (isStrict) { + return this._weekdaysMinStrictRegex; + } else { + return this._weekdaysMinRegex; + } + } else { + if (!hasOwnProp(this, '_weekdaysMinRegex')) { + this._weekdaysMinRegex = defaultWeekdaysMinRegex; + } + + return this._weekdaysMinStrictRegex && isStrict ? this._weekdaysMinStrictRegex : this._weekdaysMinRegex; + } + } + + function computeWeekdaysParse() { + function cmpLenRev(a, b) { + return b.length - a.length; + } + + var minPieces = [], + shortPieces = [], + longPieces = [], + mixedPieces = [], + i, + mom, + minp, + shortp, + longp; + + for (i = 0; i < 7; i++) { + // make the regex if we don't have it already + mom = createUTC([2000, 1]).day(i); + minp = this.weekdaysMin(mom, ''); + shortp = this.weekdaysShort(mom, ''); + longp = this.weekdays(mom, ''); + minPieces.push(minp); + shortPieces.push(shortp); + longPieces.push(longp); + mixedPieces.push(minp); + mixedPieces.push(shortp); + mixedPieces.push(longp); + } // Sorting makes sure if one weekday (or abbr) is a prefix of another it + // will match the longer piece. + + + minPieces.sort(cmpLenRev); + shortPieces.sort(cmpLenRev); + longPieces.sort(cmpLenRev); + mixedPieces.sort(cmpLenRev); + + for (i = 0; i < 7; i++) { + shortPieces[i] = regexEscape(shortPieces[i]); + longPieces[i] = regexEscape(longPieces[i]); + mixedPieces[i] = regexEscape(mixedPieces[i]); + } + + this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i'); + this._weekdaysShortRegex = this._weekdaysRegex; + this._weekdaysMinRegex = this._weekdaysRegex; + this._weekdaysStrictRegex = new RegExp('^(' + longPieces.join('|') + ')', 'i'); + this._weekdaysShortStrictRegex = new RegExp('^(' + shortPieces.join('|') + ')', 'i'); + this._weekdaysMinStrictRegex = new RegExp('^(' + minPieces.join('|') + ')', 'i'); + } // FORMATTING + + + function hFormat() { + return this.hours() % 12 || 12; + } + + function kFormat() { + return this.hours() || 24; + } + + addFormatToken('H', ['HH', 2], 0, 'hour'); + addFormatToken('h', ['hh', 2], 0, hFormat); + addFormatToken('k', ['kk', 2], 0, kFormat); + addFormatToken('hmm', 0, 0, function () { + return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2); + }); + addFormatToken('hmmss', 0, 0, function () { + return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2) + zeroFill(this.seconds(), 2); + }); + addFormatToken('Hmm', 0, 0, function () { + return '' + this.hours() + zeroFill(this.minutes(), 2); + }); + addFormatToken('Hmmss', 0, 0, function () { + return '' + this.hours() + zeroFill(this.minutes(), 2) + zeroFill(this.seconds(), 2); + }); + + function meridiem(token, lowercase) { + addFormatToken(token, 0, 0, function () { + return this.localeData().meridiem(this.hours(), this.minutes(), lowercase); + }); + } + + meridiem('a', true); + meridiem('A', false); // ALIASES + + addUnitAlias('hour', 'h'); // PRIORITY + + addUnitPriority('hour', 13); // PARSING + + function matchMeridiem(isStrict, locale) { + return locale._meridiemParse; + } + + addRegexToken('a', matchMeridiem); + addRegexToken('A', matchMeridiem); + addRegexToken('H', match1to2); + addRegexToken('h', match1to2); + addRegexToken('k', match1to2); + addRegexToken('HH', match1to2, match2); + addRegexToken('hh', match1to2, match2); + addRegexToken('kk', match1to2, match2); + addRegexToken('hmm', match3to4); + addRegexToken('hmmss', match5to6); + addRegexToken('Hmm', match3to4); + addRegexToken('Hmmss', match5to6); + addParseToken(['H', 'HH'], HOUR); + addParseToken(['k', 'kk'], function (input, array, config) { + var kInput = toInt(input); + array[HOUR] = kInput === 24 ? 0 : kInput; + }); + addParseToken(['a', 'A'], function (input, array, config) { + config._isPm = config._locale.isPM(input); + config._meridiem = input; + }); + addParseToken(['h', 'hh'], function (input, array, config) { + array[HOUR] = toInt(input); + getParsingFlags(config).bigHour = true; + }); + addParseToken('hmm', function (input, array, config) { + var pos = input.length - 2; + array[HOUR] = toInt(input.substr(0, pos)); + array[MINUTE] = toInt(input.substr(pos)); + getParsingFlags(config).bigHour = true; + }); + addParseToken('hmmss', function (input, array, config) { + var pos1 = input.length - 4; + var pos2 = input.length - 2; + array[HOUR] = toInt(input.substr(0, pos1)); + array[MINUTE] = toInt(input.substr(pos1, 2)); + array[SECOND] = toInt(input.substr(pos2)); + getParsingFlags(config).bigHour = true; + }); + addParseToken('Hmm', function (input, array, config) { + var pos = input.length - 2; + array[HOUR] = toInt(input.substr(0, pos)); + array[MINUTE] = toInt(input.substr(pos)); + }); + addParseToken('Hmmss', function (input, array, config) { + var pos1 = input.length - 4; + var pos2 = input.length - 2; + array[HOUR] = toInt(input.substr(0, pos1)); + array[MINUTE] = toInt(input.substr(pos1, 2)); + array[SECOND] = toInt(input.substr(pos2)); + }); // LOCALES + + function localeIsPM(input) { + // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays + // Using charAt should be more compatible. + return (input + '').toLowerCase().charAt(0) === 'p'; + } + + var defaultLocaleMeridiemParse = /[ap]\.?m?\.?/i; + + function localeMeridiem(hours, minutes, isLower) { + if (hours > 11) { + return isLower ? 'pm' : 'PM'; + } else { + return isLower ? 'am' : 'AM'; + } + } // MOMENTS + // Setting the hour should keep the time, because the user explicitly + // specified which hour they want. So trying to maintain the same hour (in + // a new timezone) makes sense. Adding/subtracting hours does not follow + // this rule. + + + var getSetHour = makeGetSet('Hours', true); + var baseConfig = { + calendar: defaultCalendar, + longDateFormat: defaultLongDateFormat, + invalidDate: defaultInvalidDate, + ordinal: defaultOrdinal, + dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse, + relativeTime: defaultRelativeTime, + months: defaultLocaleMonths, + monthsShort: defaultLocaleMonthsShort, + week: defaultLocaleWeek, + weekdays: defaultLocaleWeekdays, + weekdaysMin: defaultLocaleWeekdaysMin, + weekdaysShort: defaultLocaleWeekdaysShort, + meridiemParse: defaultLocaleMeridiemParse + }; // internal storage for locale config files + + var locales = {}; + var localeFamilies = {}; + var globalLocale; + + function normalizeLocale(key) { + return key ? key.toLowerCase().replace('_', '-') : key; + } // pick the locale from the array + // try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each + // substring from most specific to least, but move to the next array item if it's a more specific variant than the current root + + + function chooseLocale(names) { + var i = 0, + j, + next, + locale, + split; + + while (i < names.length) { + split = normalizeLocale(names[i]).split('-'); + j = split.length; + next = normalizeLocale(names[i + 1]); + next = next ? next.split('-') : null; + + while (j > 0) { + locale = loadLocale(split.slice(0, j).join('-')); + + if (locale) { + return locale; + } + + if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) { + //the next array item is better than a shallower substring of this one + break; + } + + j--; + } + + i++; + } + + return globalLocale; + } + + function loadLocale(name) { + var oldLocale = null; // TODO: Find a better way to register and load all the locales in Node + + if (!locales[name] && 'object' !== 'undefined' && module && module.exports) { + try { + oldLocale = globalLocale._abbr; + var aliasedRequire = commonjsRequire$1; + aliasedRequire('./locale/' + name); + getSetGlobalLocale(oldLocale); + } catch (e) {} + } + + return locales[name]; + } // This function will load locale and then set the global locale. If + // no arguments are passed in, it will simply return the current global + // locale key. + + + function getSetGlobalLocale(key, values) { + var data; + + if (key) { + if (isUndefined(values)) { + data = getLocale(key); + } else { + data = defineLocale(key, values); + } + + if (data) { + // moment.duration._locale = moment._locale = data; + globalLocale = data; + } else { + if (typeof console !== 'undefined' && console.warn) { + //warn user if arguments are passed but the locale could not be set + console.warn('Locale ' + key + ' not found. Did you forget to load it?'); + } + } + } + + return globalLocale._abbr; + } + + function defineLocale(name, config) { + if (config !== null) { + var locale, + parentConfig = baseConfig; + config.abbr = name; + + if (locales[name] != null) { + deprecateSimple('defineLocaleOverride', 'use moment.updateLocale(localeName, config) to change ' + 'an existing locale. moment.defineLocale(localeName, ' + 'config) should only be used for creating a new locale ' + 'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.'); + parentConfig = locales[name]._config; + } else if (config.parentLocale != null) { + if (locales[config.parentLocale] != null) { + parentConfig = locales[config.parentLocale]._config; + } else { + locale = loadLocale(config.parentLocale); + + if (locale != null) { + parentConfig = locale._config; + } else { + if (!localeFamilies[config.parentLocale]) { + localeFamilies[config.parentLocale] = []; + } + + localeFamilies[config.parentLocale].push({ + name: name, + config: config + }); + return null; + } + } + } + + locales[name] = new Locale(mergeConfigs(parentConfig, config)); + + if (localeFamilies[name]) { + localeFamilies[name].forEach(function (x) { + defineLocale(x.name, x.config); + }); + } // backwards compat for now: also set the locale + // make sure we set the locale AFTER all child locales have been + // created, so we won't end up with the child locale set. + + + getSetGlobalLocale(name); + return locales[name]; + } else { + // useful for testing + delete locales[name]; + return null; + } + } + + function updateLocale(name, config) { + if (config != null) { + var locale, + tmpLocale, + parentConfig = baseConfig; // MERGE + + tmpLocale = loadLocale(name); + + if (tmpLocale != null) { + parentConfig = tmpLocale._config; + } + + config = mergeConfigs(parentConfig, config); + locale = new Locale(config); + locale.parentLocale = locales[name]; + locales[name] = locale; // backwards compat for now: also set the locale + + getSetGlobalLocale(name); + } else { + // pass null for config to unupdate, useful for tests + if (locales[name] != null) { + if (locales[name].parentLocale != null) { + locales[name] = locales[name].parentLocale; + } else if (locales[name] != null) { + delete locales[name]; + } + } + } + + return locales[name]; + } // returns locale data + + + function getLocale(key) { + var locale; + + if (key && key._locale && key._locale._abbr) { + key = key._locale._abbr; + } + + if (!key) { + return globalLocale; + } + + if (!isArray(key)) { + //short-circuit everything else + locale = loadLocale(key); + + if (locale) { + return locale; + } + + key = [key]; + } + + return chooseLocale(key); + } + + function listLocales() { + return keys(locales); + } + + function checkOverflow(m) { + var overflow; + var a = m._a; + + if (a && getParsingFlags(m).overflow === -2) { + overflow = a[MONTH] < 0 || a[MONTH] > 11 ? MONTH : a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH]) ? DATE : a[HOUR] < 0 || a[HOUR] > 24 || a[HOUR] === 24 && (a[MINUTE] !== 0 || a[SECOND] !== 0 || a[MILLISECOND] !== 0) ? HOUR : a[MINUTE] < 0 || a[MINUTE] > 59 ? MINUTE : a[SECOND] < 0 || a[SECOND] > 59 ? SECOND : a[MILLISECOND] < 0 || a[MILLISECOND] > 999 ? MILLISECOND : -1; + + if (getParsingFlags(m)._overflowDayOfYear && (overflow < YEAR || overflow > DATE)) { + overflow = DATE; + } + + if (getParsingFlags(m)._overflowWeeks && overflow === -1) { + overflow = WEEK; + } + + if (getParsingFlags(m)._overflowWeekday && overflow === -1) { + overflow = WEEKDAY; + } + + getParsingFlags(m).overflow = overflow; + } + + return m; + } // Pick the first defined of two or three arguments. + + + function defaults(a, b, c) { + if (a != null) { + return a; + } + + if (b != null) { + return b; + } + + return c; + } + + function currentDateArray(config) { + // hooks is actually the exported moment object + var nowValue = new Date(hooks.now()); + + if (config._useUTC) { + return [nowValue.getUTCFullYear(), nowValue.getUTCMonth(), nowValue.getUTCDate()]; + } + + return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()]; + } // convert an array to a date. + // the array should mirror the parameters below + // note: all values past the year are optional and will default to the lowest possible value. + // [year, month, day , hour, minute, second, millisecond] + + + function configFromArray(config) { + var i, + date, + input = [], + currentDate, + expectedWeekday, + yearToUse; + + if (config._d) { + return; + } + + currentDate = currentDateArray(config); //compute day of the year from weeks and weekdays + + if (config._w && config._a[DATE] == null && config._a[MONTH] == null) { + dayOfYearFromWeekInfo(config); + } //if the day of the year is set, figure out what it is + + + if (config._dayOfYear != null) { + yearToUse = defaults(config._a[YEAR], currentDate[YEAR]); + + if (config._dayOfYear > daysInYear(yearToUse) || config._dayOfYear === 0) { + getParsingFlags(config)._overflowDayOfYear = true; + } + + date = createUTCDate(yearToUse, 0, config._dayOfYear); + config._a[MONTH] = date.getUTCMonth(); + config._a[DATE] = date.getUTCDate(); + } // Default to current date. + // * if no year, month, day of month are given, default to today + // * if day of month is given, default month and year + // * if month is given, default only year + // * if year is given, don't default anything + + + for (i = 0; i < 3 && config._a[i] == null; ++i) { + config._a[i] = input[i] = currentDate[i]; + } // Zero out whatever was not defaulted, including time + + + for (; i < 7; i++) { + config._a[i] = input[i] = config._a[i] == null ? i === 2 ? 1 : 0 : config._a[i]; + } // Check for 24:00:00.000 + + + if (config._a[HOUR] === 24 && config._a[MINUTE] === 0 && config._a[SECOND] === 0 && config._a[MILLISECOND] === 0) { + config._nextDay = true; + config._a[HOUR] = 0; + } + + config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input); + expectedWeekday = config._useUTC ? config._d.getUTCDay() : config._d.getDay(); // Apply timezone offset from input. The actual utcOffset can be changed + // with parseZone. + + if (config._tzm != null) { + config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm); + } + + if (config._nextDay) { + config._a[HOUR] = 24; + } // check for mismatching day of week + + + if (config._w && typeof config._w.d !== 'undefined' && config._w.d !== expectedWeekday) { + getParsingFlags(config).weekdayMismatch = true; + } + } + + function dayOfYearFromWeekInfo(config) { + var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow; + w = config._w; + + if (w.GG != null || w.W != null || w.E != null) { + dow = 1; + doy = 4; // TODO: We need to take the current isoWeekYear, but that depends on + // how we interpret now (local, utc, fixed offset). So create + // a now version of current config (take local/utc/offset flags, and + // create now). + + weekYear = defaults(w.GG, config._a[YEAR], weekOfYear(createLocal(), 1, 4).year); + week = defaults(w.W, 1); + weekday = defaults(w.E, 1); + + if (weekday < 1 || weekday > 7) { + weekdayOverflow = true; + } + } else { + dow = config._locale._week.dow; + doy = config._locale._week.doy; + var curWeek = weekOfYear(createLocal(), dow, doy); + weekYear = defaults(w.gg, config._a[YEAR], curWeek.year); // Default to current week. + + week = defaults(w.w, curWeek.week); + + if (w.d != null) { + // weekday -- low day numbers are considered next week + weekday = w.d; + + if (weekday < 0 || weekday > 6) { + weekdayOverflow = true; + } + } else if (w.e != null) { + // local weekday -- counting starts from beginning of week + weekday = w.e + dow; + + if (w.e < 0 || w.e > 6) { + weekdayOverflow = true; + } + } else { + // default to beginning of week + weekday = dow; + } + } + + if (week < 1 || week > weeksInYear(weekYear, dow, doy)) { + getParsingFlags(config)._overflowWeeks = true; + } else if (weekdayOverflow != null) { + getParsingFlags(config)._overflowWeekday = true; + } else { + temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy); + config._a[YEAR] = temp.year; + config._dayOfYear = temp.dayOfYear; + } + } // iso 8601 regex + // 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00) + + + var extendedIsoRegex = /^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/; + var basicIsoRegex = /^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/; + var tzRegex = /Z|[+-]\d\d(?::?\d\d)?/; + var isoDates = [['YYYYYY-MM-DD', /[+-]\d{6}-\d\d-\d\d/], ['YYYY-MM-DD', /\d{4}-\d\d-\d\d/], ['GGGG-[W]WW-E', /\d{4}-W\d\d-\d/], ['GGGG-[W]WW', /\d{4}-W\d\d/, false], ['YYYY-DDD', /\d{4}-\d{3}/], ['YYYY-MM', /\d{4}-\d\d/, false], ['YYYYYYMMDD', /[+-]\d{10}/], ['YYYYMMDD', /\d{8}/], // YYYYMM is NOT allowed by the standard + ['GGGG[W]WWE', /\d{4}W\d{3}/], ['GGGG[W]WW', /\d{4}W\d{2}/, false], ['YYYYDDD', /\d{7}/]]; // iso time formats and regexes + + var isoTimes = [['HH:mm:ss.SSSS', /\d\d:\d\d:\d\d\.\d+/], ['HH:mm:ss,SSSS', /\d\d:\d\d:\d\d,\d+/], ['HH:mm:ss', /\d\d:\d\d:\d\d/], ['HH:mm', /\d\d:\d\d/], ['HHmmss.SSSS', /\d\d\d\d\d\d\.\d+/], ['HHmmss,SSSS', /\d\d\d\d\d\d,\d+/], ['HHmmss', /\d\d\d\d\d\d/], ['HHmm', /\d\d\d\d/], ['HH', /\d\d/]]; + var aspNetJsonRegex = /^\/?Date\((\-?\d+)/i; // date from iso format + + function configFromISO(config) { + var i, + l, + string = config._i, + match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string), + allowTime, + dateFormat, + timeFormat, + tzFormat; + + if (match) { + getParsingFlags(config).iso = true; + + for (i = 0, l = isoDates.length; i < l; i++) { + if (isoDates[i][1].exec(match[1])) { + dateFormat = isoDates[i][0]; + allowTime = isoDates[i][2] !== false; + break; + } + } + + if (dateFormat == null) { + config._isValid = false; + return; + } + + if (match[3]) { + for (i = 0, l = isoTimes.length; i < l; i++) { + if (isoTimes[i][1].exec(match[3])) { + // match[2] should be 'T' or space + timeFormat = (match[2] || ' ') + isoTimes[i][0]; + break; + } + } + + if (timeFormat == null) { + config._isValid = false; + return; + } + } + + if (!allowTime && timeFormat != null) { + config._isValid = false; + return; + } + + if (match[4]) { + if (tzRegex.exec(match[4])) { + tzFormat = 'Z'; + } else { + config._isValid = false; + return; + } + } + + config._f = dateFormat + (timeFormat || '') + (tzFormat || ''); + configFromStringAndFormat(config); + } else { + config._isValid = false; + } + } // RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3 + + + var rfc2822 = /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/; + + function extractFromRFC2822Strings(yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr) { + var result = [untruncateYear(yearStr), defaultLocaleMonthsShort.indexOf(monthStr), parseInt(dayStr, 10), parseInt(hourStr, 10), parseInt(minuteStr, 10)]; + + if (secondStr) { + result.push(parseInt(secondStr, 10)); + } + + return result; + } + + function untruncateYear(yearStr) { + var year = parseInt(yearStr, 10); + + if (year <= 49) { + return 2000 + year; + } else if (year <= 999) { + return 1900 + year; + } + + return year; + } + + function preprocessRFC2822(s) { + // Remove comments and folding whitespace and replace multiple-spaces with a single space + return s.replace(/\([^)]*\)|[\n\t]/g, ' ').replace(/(\s\s+)/g, ' ').replace(/^\s\s*/, '').replace(/\s\s*$/, ''); + } + + function checkWeekday(weekdayStr, parsedInput, config) { + if (weekdayStr) { + // TODO: Replace the vanilla JS Date object with an indepentent day-of-week check. + var weekdayProvided = defaultLocaleWeekdaysShort.indexOf(weekdayStr), + weekdayActual = new Date(parsedInput[0], parsedInput[1], parsedInput[2]).getDay(); + + if (weekdayProvided !== weekdayActual) { + getParsingFlags(config).weekdayMismatch = true; + config._isValid = false; + return false; + } + } + + return true; + } + + var obsOffsets = { + UT: 0, + GMT: 0, + EDT: -4 * 60, + EST: -5 * 60, + CDT: -5 * 60, + CST: -6 * 60, + MDT: -6 * 60, + MST: -7 * 60, + PDT: -7 * 60, + PST: -8 * 60 + }; + + function calculateOffset(obsOffset, militaryOffset, numOffset) { + if (obsOffset) { + return obsOffsets[obsOffset]; + } else if (militaryOffset) { + // the only allowed military tz is Z + return 0; + } else { + var hm = parseInt(numOffset, 10); + var m = hm % 100, + h = (hm - m) / 100; + return h * 60 + m; + } + } // date and time from ref 2822 format + + + function configFromRFC2822(config) { + var match = rfc2822.exec(preprocessRFC2822(config._i)); + + if (match) { + var parsedArray = extractFromRFC2822Strings(match[4], match[3], match[2], match[5], match[6], match[7]); + + if (!checkWeekday(match[1], parsedArray, config)) { + return; + } + + config._a = parsedArray; + config._tzm = calculateOffset(match[8], match[9], match[10]); + config._d = createUTCDate.apply(null, config._a); + + config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm); + + getParsingFlags(config).rfc2822 = true; + } else { + config._isValid = false; + } + } // date from iso format or fallback + + + function configFromString(config) { + var matched = aspNetJsonRegex.exec(config._i); + + if (matched !== null) { + config._d = new Date(+matched[1]); + return; + } + + configFromISO(config); + + if (config._isValid === false) { + delete config._isValid; + } else { + return; + } + + configFromRFC2822(config); + + if (config._isValid === false) { + delete config._isValid; + } else { + return; + } // Final attempt, use Input Fallback + + + hooks.createFromInputFallback(config); + } + + hooks.createFromInputFallback = deprecate('value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), ' + 'which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are ' + 'discouraged and will be removed in an upcoming major release. Please refer to ' + 'http://momentjs.com/guides/#/warnings/js-date/ for more info.', function (config) { + config._d = new Date(config._i + (config._useUTC ? ' UTC' : '')); + }); // constant that refers to the ISO standard + + hooks.ISO_8601 = function () {}; // constant that refers to the RFC 2822 form + + + hooks.RFC_2822 = function () {}; // date from string and format string + + + function configFromStringAndFormat(config) { + // TODO: Move this to another part of the creation flow to prevent circular deps + if (config._f === hooks.ISO_8601) { + configFromISO(config); + return; + } + + if (config._f === hooks.RFC_2822) { + configFromRFC2822(config); + return; + } + + config._a = []; + getParsingFlags(config).empty = true; // This array is used to make a Date, either with `new Date` or `Date.UTC` + + var string = '' + config._i, + i, + parsedInput, + tokens, + token, + skipped, + stringLength = string.length, + totalParsedInputLength = 0; + tokens = expandFormat(config._f, config._locale).match(formattingTokens) || []; + + for (i = 0; i < tokens.length; i++) { + token = tokens[i]; + parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0]; // console.log('token', token, 'parsedInput', parsedInput, + // 'regex', getParseRegexForToken(token, config)); + + if (parsedInput) { + skipped = string.substr(0, string.indexOf(parsedInput)); + + if (skipped.length > 0) { + getParsingFlags(config).unusedInput.push(skipped); + } + + string = string.slice(string.indexOf(parsedInput) + parsedInput.length); + totalParsedInputLength += parsedInput.length; + } // don't parse if it's not a known token + + + if (formatTokenFunctions[token]) { + if (parsedInput) { + getParsingFlags(config).empty = false; + } else { + getParsingFlags(config).unusedTokens.push(token); + } + + addTimeToArrayFromToken(token, parsedInput, config); + } else if (config._strict && !parsedInput) { + getParsingFlags(config).unusedTokens.push(token); + } + } // add remaining unparsed input length to the string + + + getParsingFlags(config).charsLeftOver = stringLength - totalParsedInputLength; + + if (string.length > 0) { + getParsingFlags(config).unusedInput.push(string); + } // clear _12h flag if hour is <= 12 + + + if (config._a[HOUR] <= 12 && getParsingFlags(config).bigHour === true && config._a[HOUR] > 0) { + getParsingFlags(config).bigHour = undefined; + } + + getParsingFlags(config).parsedDateParts = config._a.slice(0); + getParsingFlags(config).meridiem = config._meridiem; // handle meridiem + + config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR], config._meridiem); + configFromArray(config); + checkOverflow(config); + } + + function meridiemFixWrap(locale, hour, meridiem) { + var isPm; + + if (meridiem == null) { + // nothing to do + return hour; + } + + if (locale.meridiemHour != null) { + return locale.meridiemHour(hour, meridiem); + } else if (locale.isPM != null) { + // Fallback + isPm = locale.isPM(meridiem); + + if (isPm && hour < 12) { + hour += 12; + } + + if (!isPm && hour === 12) { + hour = 0; + } + + return hour; + } else { + // this is not supposed to happen + return hour; + } + } // date from string and array of format strings + + + function configFromStringAndArray(config) { + var tempConfig, bestMoment, scoreToBeat, i, currentScore; + + if (config._f.length === 0) { + getParsingFlags(config).invalidFormat = true; + config._d = new Date(NaN); + return; + } + + for (i = 0; i < config._f.length; i++) { + currentScore = 0; + tempConfig = copyConfig({}, config); + + if (config._useUTC != null) { + tempConfig._useUTC = config._useUTC; + } + + tempConfig._f = config._f[i]; + configFromStringAndFormat(tempConfig); + + if (!isValid(tempConfig)) { + continue; + } // if there is any input that was not parsed add a penalty for that format + + + currentScore += getParsingFlags(tempConfig).charsLeftOver; //or tokens + + currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10; + getParsingFlags(tempConfig).score = currentScore; + + if (scoreToBeat == null || currentScore < scoreToBeat) { + scoreToBeat = currentScore; + bestMoment = tempConfig; + } + } + + extend(config, bestMoment || tempConfig); + } + + function configFromObject(config) { + if (config._d) { + return; + } + + var i = normalizeObjectUnits(config._i); + config._a = map([i.year, i.month, i.day || i.date, i.hour, i.minute, i.second, i.millisecond], function (obj) { + return obj && parseInt(obj, 10); + }); + configFromArray(config); + } + + function createFromConfig(config) { + var res = new Moment(checkOverflow(prepareConfig(config))); + + if (res._nextDay) { + // Adding is smart enough around DST + res.add(1, 'd'); + res._nextDay = undefined; + } + + return res; + } + + function prepareConfig(config) { + var input = config._i, + format = config._f; + config._locale = config._locale || getLocale(config._l); + + if (input === null || format === undefined && input === '') { + return createInvalid({ + nullInput: true + }); + } + + if (typeof input === 'string') { + config._i = input = config._locale.preparse(input); + } + + if (isMoment(input)) { + return new Moment(checkOverflow(input)); + } else if (isDate(input)) { + config._d = input; + } else if (isArray(format)) { + configFromStringAndArray(config); + } else if (format) { + configFromStringAndFormat(config); + } else { + configFromInput(config); + } + + if (!isValid(config)) { + config._d = null; + } + + return config; + } + + function configFromInput(config) { + var input = config._i; + + if (isUndefined(input)) { + config._d = new Date(hooks.now()); + } else if (isDate(input)) { + config._d = new Date(input.valueOf()); + } else if (typeof input === 'string') { + configFromString(config); + } else if (isArray(input)) { + config._a = map(input.slice(0), function (obj) { + return parseInt(obj, 10); + }); + configFromArray(config); + } else if (isObject(input)) { + configFromObject(config); + } else if (isNumber(input)) { + // from milliseconds + config._d = new Date(input); + } else { + hooks.createFromInputFallback(config); + } + } + + function createLocalOrUTC(input, format, locale, strict, isUTC) { + var c = {}; + + if (locale === true || locale === false) { + strict = locale; + locale = undefined; + } + + if (isObject(input) && isObjectEmpty(input) || isArray(input) && input.length === 0) { + input = undefined; + } // object construction must be done this way. + // https://github.com/moment/moment/issues/1423 + + + c._isAMomentObject = true; + c._useUTC = c._isUTC = isUTC; + c._l = locale; + c._i = input; + c._f = format; + c._strict = strict; + return createFromConfig(c); + } + + function createLocal(input, format, locale, strict) { + return createLocalOrUTC(input, format, locale, strict, false); + } + + var prototypeMin = deprecate('moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/', function () { + var other = createLocal.apply(null, arguments); + + if (this.isValid() && other.isValid()) { + return other < this ? this : other; + } else { + return createInvalid(); + } + }); + var prototypeMax = deprecate('moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/', function () { + var other = createLocal.apply(null, arguments); + + if (this.isValid() && other.isValid()) { + return other > this ? this : other; + } else { + return createInvalid(); + } + }); // Pick a moment m from moments so that m[fn](other) is true for all + // other. This relies on the function fn to be transitive. + // + // moments should either be an array of moment objects or an array, whose + // first element is an array of moment objects. + + function pickBy(fn, moments) { + var res, i; + + if (moments.length === 1 && isArray(moments[0])) { + moments = moments[0]; + } + + if (!moments.length) { + return createLocal(); + } + + res = moments[0]; + + for (i = 1; i < moments.length; ++i) { + if (!moments[i].isValid() || moments[i][fn](res)) { + res = moments[i]; + } + } + + return res; + } // TODO: Use [].sort instead? + + + function min() { + var args = [].slice.call(arguments, 0); + return pickBy('isBefore', args); + } + + function max() { + var args = [].slice.call(arguments, 0); + return pickBy('isAfter', args); + } + + var now = function () { + return Date.now ? Date.now() : +new Date(); + }; + + var ordering = ['year', 'quarter', 'month', 'week', 'day', 'hour', 'minute', 'second', 'millisecond']; + + function isDurationValid(m) { + for (var key in m) { + if (!(indexOf.call(ordering, key) !== -1 && (m[key] == null || !isNaN(m[key])))) { + return false; + } + } + + var unitHasDecimal = false; + + for (var i = 0; i < ordering.length; ++i) { + if (m[ordering[i]]) { + if (unitHasDecimal) { + return false; // only allow non-integers for smallest unit + } + + if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) { + unitHasDecimal = true; + } + } + } + + return true; + } + + function isValid$1() { + return this._isValid; + } + + function createInvalid$1() { + return createDuration(NaN); + } + + function Duration(duration) { + var normalizedInput = normalizeObjectUnits(duration), + years = normalizedInput.year || 0, + quarters = normalizedInput.quarter || 0, + months = normalizedInput.month || 0, + weeks = normalizedInput.week || normalizedInput.isoWeek || 0, + days = normalizedInput.day || 0, + hours = normalizedInput.hour || 0, + minutes = normalizedInput.minute || 0, + seconds = normalizedInput.second || 0, + milliseconds = normalizedInput.millisecond || 0; + this._isValid = isDurationValid(normalizedInput); // representation for dateAddRemove + + this._milliseconds = +milliseconds + seconds * 1e3 + // 1000 + minutes * 6e4 + // 1000 * 60 + hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978 + // Because of dateAddRemove treats 24 hours as different from a + // day when working around DST, we need to store them separately + + this._days = +days + weeks * 7; // It is impossible to translate months into days without knowing + // which months you are are talking about, so we have to store + // it separately. + + this._months = +months + quarters * 3 + years * 12; + this._data = {}; + this._locale = getLocale(); + + this._bubble(); + } + + function isDuration(obj) { + return obj instanceof Duration; + } + + function absRound(number) { + if (number < 0) { + return Math.round(-1 * number) * -1; + } else { + return Math.round(number); + } + } // FORMATTING + + + function offset(token, separator) { + addFormatToken(token, 0, 0, function () { + var offset = this.utcOffset(); + var sign = '+'; + + if (offset < 0) { + offset = -offset; + sign = '-'; + } + + return sign + zeroFill(~~(offset / 60), 2) + separator + zeroFill(~~offset % 60, 2); + }); + } + + offset('Z', ':'); + offset('ZZ', ''); // PARSING + + addRegexToken('Z', matchShortOffset); + addRegexToken('ZZ', matchShortOffset); + addParseToken(['Z', 'ZZ'], function (input, array, config) { + config._useUTC = true; + config._tzm = offsetFromString(matchShortOffset, input); + }); // HELPERS + // timezone chunker + // '+10:00' > ['10', '00'] + // '-1530' > ['-15', '30'] + + var chunkOffset = /([\+\-]|\d\d)/gi; + + function offsetFromString(matcher, string) { + var matches = (string || '').match(matcher); + + if (matches === null) { + return null; + } + + var chunk = matches[matches.length - 1] || []; + var parts = (chunk + '').match(chunkOffset) || ['-', 0, 0]; + var minutes = +(parts[1] * 60) + toInt(parts[2]); + return minutes === 0 ? 0 : parts[0] === '+' ? minutes : -minutes; + } // Return a moment from input, that is local/utc/zone equivalent to model. + + + function cloneWithOffset(input, model) { + var res, diff; + + if (model._isUTC) { + res = model.clone(); + diff = (isMoment(input) || isDate(input) ? input.valueOf() : createLocal(input).valueOf()) - res.valueOf(); // Use low-level api, because this fn is low-level api. + + res._d.setTime(res._d.valueOf() + diff); + + hooks.updateOffset(res, false); + return res; + } else { + return createLocal(input).local(); + } + } + + function getDateOffset(m) { + // On Firefox.24 Date#getTimezoneOffset returns a floating point. + // https://github.com/moment/moment/pull/1871 + return -Math.round(m._d.getTimezoneOffset() / 15) * 15; + } // HOOKS + // This function will be called whenever a moment is mutated. + // It is intended to keep the offset in sync with the timezone. + + + hooks.updateOffset = function () {}; // MOMENTS + // keepLocalTime = true means only change the timezone, without + // affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]--> + // 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset + // +0200, so we adjust the time as needed, to be valid. + // + // Keeping the time actually adds/subtracts (one hour) + // from the actual represented time. That is why we call updateOffset + // a second time. In case it wants us to change the offset again + // _changeInProgress == true case, then we have to adjust, because + // there is no such time in the given timezone. + + + function getSetOffset(input, keepLocalTime, keepMinutes) { + var offset = this._offset || 0, + localAdjust; + + if (!this.isValid()) { + return input != null ? this : NaN; + } + + if (input != null) { + if (typeof input === 'string') { + input = offsetFromString(matchShortOffset, input); + + if (input === null) { + return this; + } + } else if (Math.abs(input) < 16 && !keepMinutes) { + input = input * 60; + } + + if (!this._isUTC && keepLocalTime) { + localAdjust = getDateOffset(this); + } + + this._offset = input; + this._isUTC = true; + + if (localAdjust != null) { + this.add(localAdjust, 'm'); + } + + if (offset !== input) { + if (!keepLocalTime || this._changeInProgress) { + addSubtract(this, createDuration(input - offset, 'm'), 1, false); + } else if (!this._changeInProgress) { + this._changeInProgress = true; + hooks.updateOffset(this, true); + this._changeInProgress = null; + } + } + + return this; + } else { + return this._isUTC ? offset : getDateOffset(this); + } + } + + function getSetZone(input, keepLocalTime) { + if (input != null) { + if (typeof input !== 'string') { + input = -input; + } + + this.utcOffset(input, keepLocalTime); + return this; + } else { + return -this.utcOffset(); + } + } + + function setOffsetToUTC(keepLocalTime) { + return this.utcOffset(0, keepLocalTime); + } + + function setOffsetToLocal(keepLocalTime) { + if (this._isUTC) { + this.utcOffset(0, keepLocalTime); + this._isUTC = false; + + if (keepLocalTime) { + this.subtract(getDateOffset(this), 'm'); + } + } + + return this; + } + + function setOffsetToParsedOffset() { + if (this._tzm != null) { + this.utcOffset(this._tzm, false, true); + } else if (typeof this._i === 'string') { + var tZone = offsetFromString(matchOffset, this._i); + + if (tZone != null) { + this.utcOffset(tZone); + } else { + this.utcOffset(0, true); + } + } + + return this; + } + + function hasAlignedHourOffset(input) { + if (!this.isValid()) { + return false; + } + + input = input ? createLocal(input).utcOffset() : 0; + return (this.utcOffset() - input) % 60 === 0; + } + + function isDaylightSavingTime() { + return this.utcOffset() > this.clone().month(0).utcOffset() || this.utcOffset() > this.clone().month(5).utcOffset(); + } + + function isDaylightSavingTimeShifted() { + if (!isUndefined(this._isDSTShifted)) { + return this._isDSTShifted; + } + + var c = {}; + copyConfig(c, this); + c = prepareConfig(c); + + if (c._a) { + var other = c._isUTC ? createUTC(c._a) : createLocal(c._a); + this._isDSTShifted = this.isValid() && compareArrays(c._a, other.toArray()) > 0; + } else { + this._isDSTShifted = false; + } + + return this._isDSTShifted; + } + + function isLocal() { + return this.isValid() ? !this._isUTC : false; + } + + function isUtcOffset() { + return this.isValid() ? this._isUTC : false; + } + + function isUtc() { + return this.isValid() ? this._isUTC && this._offset === 0 : false; + } // ASP.NET json date format regex + + + var aspNetRegex = /^(\-|\+)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/; // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html + // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere + // and further modified to allow for strings containing both week and day + + var isoRegex = /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/; + + function createDuration(input, key) { + var duration = input, + // matching against regexp is expensive, do it on demand + match = null, + sign, + ret, + diffRes; + + if (isDuration(input)) { + duration = { + ms: input._milliseconds, + d: input._days, + M: input._months + }; + } else if (isNumber(input)) { + duration = {}; + + if (key) { + duration[key] = input; + } else { + duration.milliseconds = input; + } + } else if (!!(match = aspNetRegex.exec(input))) { + sign = match[1] === '-' ? -1 : 1; + duration = { + y: 0, + d: toInt(match[DATE]) * sign, + h: toInt(match[HOUR]) * sign, + m: toInt(match[MINUTE]) * sign, + s: toInt(match[SECOND]) * sign, + ms: toInt(absRound(match[MILLISECOND] * 1000)) * sign // the millisecond decimal point is included in the match + + }; + } else if (!!(match = isoRegex.exec(input))) { + sign = match[1] === '-' ? -1 : 1; + duration = { + y: parseIso(match[2], sign), + M: parseIso(match[3], sign), + w: parseIso(match[4], sign), + d: parseIso(match[5], sign), + h: parseIso(match[6], sign), + m: parseIso(match[7], sign), + s: parseIso(match[8], sign) + }; + } else if (duration == null) { + // checks for null or undefined + duration = {}; + } else if (typeof duration === 'object' && ('from' in duration || 'to' in duration)) { + diffRes = momentsDifference(createLocal(duration.from), createLocal(duration.to)); + duration = {}; + duration.ms = diffRes.milliseconds; + duration.M = diffRes.months; + } + + ret = new Duration(duration); + + if (isDuration(input) && hasOwnProp(input, '_locale')) { + ret._locale = input._locale; + } + + return ret; + } + + createDuration.fn = Duration.prototype; + createDuration.invalid = createInvalid$1; + + function parseIso(inp, sign) { + // We'd normally use ~~inp for this, but unfortunately it also + // converts floats to ints. + // inp may be undefined, so careful calling replace on it. + var res = inp && parseFloat(inp.replace(',', '.')); // apply sign while we're at it + + return (isNaN(res) ? 0 : res) * sign; + } + + function positiveMomentsDifference(base, other) { + var res = {}; + res.months = other.month() - base.month() + (other.year() - base.year()) * 12; + + if (base.clone().add(res.months, 'M').isAfter(other)) { + --res.months; + } + + res.milliseconds = +other - +base.clone().add(res.months, 'M'); + return res; + } + + function momentsDifference(base, other) { + var res; + + if (!(base.isValid() && other.isValid())) { + return { + milliseconds: 0, + months: 0 + }; + } + + other = cloneWithOffset(other, base); + + if (base.isBefore(other)) { + res = positiveMomentsDifference(base, other); + } else { + res = positiveMomentsDifference(other, base); + res.milliseconds = -res.milliseconds; + res.months = -res.months; + } + + return res; + } // TODO: remove 'name' arg after deprecation is removed + + + function createAdder(direction, name) { + return function (val, period) { + var dur, tmp; //invert the arguments, but complain about it + + if (period !== null && !isNaN(+period)) { + deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' + 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.'); + tmp = val; + val = period; + period = tmp; + } + + val = typeof val === 'string' ? +val : val; + dur = createDuration(val, period); + addSubtract(this, dur, direction); + return this; + }; + } + + function addSubtract(mom, duration, isAdding, updateOffset) { + var milliseconds = duration._milliseconds, + days = absRound(duration._days), + months = absRound(duration._months); + + if (!mom.isValid()) { + // No op + return; + } + + updateOffset = updateOffset == null ? true : updateOffset; + + if (months) { + setMonth(mom, get(mom, 'Month') + months * isAdding); + } + + if (days) { + set$1(mom, 'Date', get(mom, 'Date') + days * isAdding); + } + + if (milliseconds) { + mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding); + } + + if (updateOffset) { + hooks.updateOffset(mom, days || months); + } + } + + var add = createAdder(1, 'add'); + var subtract = createAdder(-1, 'subtract'); + + function getCalendarFormat(myMoment, now) { + var diff = myMoment.diff(now, 'days', true); + return diff < -6 ? 'sameElse' : diff < -1 ? 'lastWeek' : diff < 0 ? 'lastDay' : diff < 1 ? 'sameDay' : diff < 2 ? 'nextDay' : diff < 7 ? 'nextWeek' : 'sameElse'; + } + + function calendar$1(time, formats) { + // We want to compare the start of today, vs this. + // Getting start-of-today depends on whether we're local/utc/offset or not. + var now = time || createLocal(), + sod = cloneWithOffset(now, this).startOf('day'), + format = hooks.calendarFormat(this, sod) || 'sameElse'; + var output = formats && (isFunction(formats[format]) ? formats[format].call(this, now) : formats[format]); + return this.format(output || this.localeData().calendar(format, this, createLocal(now))); + } + + function clone() { + return new Moment(this); + } + + function isAfter(input, units) { + var localInput = isMoment(input) ? input : createLocal(input); + + if (!(this.isValid() && localInput.isValid())) { + return false; + } + + units = normalizeUnits(units) || 'millisecond'; + + if (units === 'millisecond') { + return this.valueOf() > localInput.valueOf(); + } else { + return localInput.valueOf() < this.clone().startOf(units).valueOf(); + } + } + + function isBefore(input, units) { + var localInput = isMoment(input) ? input : createLocal(input); + + if (!(this.isValid() && localInput.isValid())) { + return false; + } + + units = normalizeUnits(units) || 'millisecond'; + + if (units === 'millisecond') { + return this.valueOf() < localInput.valueOf(); + } else { + return this.clone().endOf(units).valueOf() < localInput.valueOf(); + } + } + + function isBetween(from, to, units, inclusivity) { + var localFrom = isMoment(from) ? from : createLocal(from), + localTo = isMoment(to) ? to : createLocal(to); + + if (!(this.isValid() && localFrom.isValid() && localTo.isValid())) { + return false; + } + + inclusivity = inclusivity || '()'; + return (inclusivity[0] === '(' ? this.isAfter(localFrom, units) : !this.isBefore(localFrom, units)) && (inclusivity[1] === ')' ? this.isBefore(localTo, units) : !this.isAfter(localTo, units)); + } + + function isSame(input, units) { + var localInput = isMoment(input) ? input : createLocal(input), + inputMs; + + if (!(this.isValid() && localInput.isValid())) { + return false; + } + + units = normalizeUnits(units) || 'millisecond'; + + if (units === 'millisecond') { + return this.valueOf() === localInput.valueOf(); + } else { + inputMs = localInput.valueOf(); + return this.clone().startOf(units).valueOf() <= inputMs && inputMs <= this.clone().endOf(units).valueOf(); + } + } + + function isSameOrAfter(input, units) { + return this.isSame(input, units) || this.isAfter(input, units); + } + + function isSameOrBefore(input, units) { + return this.isSame(input, units) || this.isBefore(input, units); + } + + function diff(input, units, asFloat) { + var that, zoneDelta, output; + + if (!this.isValid()) { + return NaN; + } + + that = cloneWithOffset(input, this); + + if (!that.isValid()) { + return NaN; + } + + zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4; + units = normalizeUnits(units); + + switch (units) { + case 'year': + output = monthDiff(this, that) / 12; + break; + + case 'month': + output = monthDiff(this, that); + break; + + case 'quarter': + output = monthDiff(this, that) / 3; + break; + + case 'second': + output = (this - that) / 1e3; + break; + // 1000 + + case 'minute': + output = (this - that) / 6e4; + break; + // 1000 * 60 + + case 'hour': + output = (this - that) / 36e5; + break; + // 1000 * 60 * 60 + + case 'day': + output = (this - that - zoneDelta) / 864e5; + break; + // 1000 * 60 * 60 * 24, negate dst + + case 'week': + output = (this - that - zoneDelta) / 6048e5; + break; + // 1000 * 60 * 60 * 24 * 7, negate dst + + default: + output = this - that; + } + + return asFloat ? output : absFloor(output); + } + + function monthDiff(a, b) { + // difference in months + var wholeMonthDiff = (b.year() - a.year()) * 12 + (b.month() - a.month()), + // b is in (anchor - 1 month, anchor + 1 month) + anchor = a.clone().add(wholeMonthDiff, 'months'), + anchor2, + adjust; + + if (b - anchor < 0) { + anchor2 = a.clone().add(wholeMonthDiff - 1, 'months'); // linear across the month + + adjust = (b - anchor) / (anchor - anchor2); + } else { + anchor2 = a.clone().add(wholeMonthDiff + 1, 'months'); // linear across the month + + adjust = (b - anchor) / (anchor2 - anchor); + } //check for negative zero, return zero if negative zero + + + return -(wholeMonthDiff + adjust) || 0; + } + + hooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ'; + hooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]'; + + function toString() { + return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ'); + } + + function toISOString(keepOffset) { + if (!this.isValid()) { + return null; + } + + var utc = keepOffset !== true; + var m = utc ? this.clone().utc() : this; + + if (m.year() < 0 || m.year() > 9999) { + return formatMoment(m, utc ? 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYYYY-MM-DD[T]HH:mm:ss.SSSZ'); + } + + if (isFunction(Date.prototype.toISOString)) { + // native implementation is ~50x faster, use it when we can + if (utc) { + return this.toDate().toISOString(); + } else { + return new Date(this.valueOf() + this.utcOffset() * 60 * 1000).toISOString().replace('Z', formatMoment(m, 'Z')); + } + } + + return formatMoment(m, utc ? 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYY-MM-DD[T]HH:mm:ss.SSSZ'); + } + /** + * Return a human readable representation of a moment that can + * also be evaluated to get a new moment which is the same + * + * @link https://nodejs.org/dist/latest/docs/api/util.html#util_custom_inspect_function_on_objects + */ + + + function inspect() { + if (!this.isValid()) { + return 'moment.invalid(/* ' + this._i + ' */)'; + } + + var func = 'moment'; + var zone = ''; + + if (!this.isLocal()) { + func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone'; + zone = 'Z'; + } + + var prefix = '[' + func + '("]'; + var year = 0 <= this.year() && this.year() <= 9999 ? 'YYYY' : 'YYYYYY'; + var datetime = '-MM-DD[T]HH:mm:ss.SSS'; + var suffix = zone + '[")]'; + return this.format(prefix + year + datetime + suffix); + } + + function format(inputString) { + if (!inputString) { + inputString = this.isUtc() ? hooks.defaultFormatUtc : hooks.defaultFormat; + } + + var output = formatMoment(this, inputString); + return this.localeData().postformat(output); + } + + function from(time, withoutSuffix) { + if (this.isValid() && (isMoment(time) && time.isValid() || createLocal(time).isValid())) { + return createDuration({ + to: this, + from: time + }).locale(this.locale()).humanize(!withoutSuffix); + } else { + return this.localeData().invalidDate(); + } + } + + function fromNow(withoutSuffix) { + return this.from(createLocal(), withoutSuffix); + } + + function to(time, withoutSuffix) { + if (this.isValid() && (isMoment(time) && time.isValid() || createLocal(time).isValid())) { + return createDuration({ + from: this, + to: time + }).locale(this.locale()).humanize(!withoutSuffix); + } else { + return this.localeData().invalidDate(); + } + } + + function toNow(withoutSuffix) { + return this.to(createLocal(), withoutSuffix); + } // If passed a locale key, it will set the locale for this + // instance. Otherwise, it will return the locale configuration + // variables for this instance. + + + function locale(key) { + var newLocaleData; + + if (key === undefined) { + return this._locale._abbr; + } else { + newLocaleData = getLocale(key); + + if (newLocaleData != null) { + this._locale = newLocaleData; + } + + return this; + } + } + + var lang = deprecate('moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.', function (key) { + if (key === undefined) { + return this.localeData(); + } else { + return this.locale(key); + } + }); + + function localeData() { + return this._locale; + } + + var MS_PER_SECOND = 1000; + var MS_PER_MINUTE = 60 * MS_PER_SECOND; + var MS_PER_HOUR = 60 * MS_PER_MINUTE; + var MS_PER_400_YEARS = (365 * 400 + 97) * 24 * MS_PER_HOUR; // actual modulo - handles negative numbers (for dates before 1970): + + function mod$1(dividend, divisor) { + return (dividend % divisor + divisor) % divisor; + } + + function localStartOfDate(y, m, d) { + // the date constructor remaps years 0-99 to 1900-1999 + if (y < 100 && y >= 0) { + // preserve leap years using a full 400 year cycle, then reset + return new Date(y + 400, m, d) - MS_PER_400_YEARS; + } else { + return new Date(y, m, d).valueOf(); + } + } + + function utcStartOfDate(y, m, d) { + // Date.UTC remaps years 0-99 to 1900-1999 + if (y < 100 && y >= 0) { + // preserve leap years using a full 400 year cycle, then reset + return Date.UTC(y + 400, m, d) - MS_PER_400_YEARS; + } else { + return Date.UTC(y, m, d); + } + } + + function startOf(units) { + var time; + units = normalizeUnits(units); + + if (units === undefined || units === 'millisecond' || !this.isValid()) { + return this; + } + + var startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate; + + switch (units) { + case 'year': + time = startOfDate(this.year(), 0, 1); + break; + + case 'quarter': + time = startOfDate(this.year(), this.month() - this.month() % 3, 1); + break; + + case 'month': + time = startOfDate(this.year(), this.month(), 1); + break; + + case 'week': + time = startOfDate(this.year(), this.month(), this.date() - this.weekday()); + break; + + case 'isoWeek': + time = startOfDate(this.year(), this.month(), this.date() - (this.isoWeekday() - 1)); + break; + + case 'day': + case 'date': + time = startOfDate(this.year(), this.month(), this.date()); + break; + + case 'hour': + time = this._d.valueOf(); + time -= mod$1(time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE), MS_PER_HOUR); + break; + + case 'minute': + time = this._d.valueOf(); + time -= mod$1(time, MS_PER_MINUTE); + break; + + case 'second': + time = this._d.valueOf(); + time -= mod$1(time, MS_PER_SECOND); + break; + } + + this._d.setTime(time); + + hooks.updateOffset(this, true); + return this; + } + + function endOf(units) { + var time; + units = normalizeUnits(units); + + if (units === undefined || units === 'millisecond' || !this.isValid()) { + return this; + } + + var startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate; + + switch (units) { + case 'year': + time = startOfDate(this.year() + 1, 0, 1) - 1; + break; + + case 'quarter': + time = startOfDate(this.year(), this.month() - this.month() % 3 + 3, 1) - 1; + break; + + case 'month': + time = startOfDate(this.year(), this.month() + 1, 1) - 1; + break; + + case 'week': + time = startOfDate(this.year(), this.month(), this.date() - this.weekday() + 7) - 1; + break; + + case 'isoWeek': + time = startOfDate(this.year(), this.month(), this.date() - (this.isoWeekday() - 1) + 7) - 1; + break; + + case 'day': + case 'date': + time = startOfDate(this.year(), this.month(), this.date() + 1) - 1; + break; + + case 'hour': + time = this._d.valueOf(); + time += MS_PER_HOUR - mod$1(time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE), MS_PER_HOUR) - 1; + break; + + case 'minute': + time = this._d.valueOf(); + time += MS_PER_MINUTE - mod$1(time, MS_PER_MINUTE) - 1; + break; + + case 'second': + time = this._d.valueOf(); + time += MS_PER_SECOND - mod$1(time, MS_PER_SECOND) - 1; + break; + } + + this._d.setTime(time); + + hooks.updateOffset(this, true); + return this; + } + + function valueOf() { + return this._d.valueOf() - (this._offset || 0) * 60000; + } + + function unix() { + return Math.floor(this.valueOf() / 1000); + } + + function toDate() { + return new Date(this.valueOf()); + } + + function toArray() { + var m = this; + return [m.year(), m.month(), m.date(), m.hour(), m.minute(), m.second(), m.millisecond()]; + } + + function toObject() { + var m = this; + return { + years: m.year(), + months: m.month(), + date: m.date(), + hours: m.hours(), + minutes: m.minutes(), + seconds: m.seconds(), + milliseconds: m.milliseconds() + }; + } + + function toJSON() { + // new Date(NaN).toJSON() === null + return this.isValid() ? this.toISOString() : null; + } + + function isValid$2() { + return isValid(this); + } + + function parsingFlags() { + return extend({}, getParsingFlags(this)); + } + + function invalidAt() { + return getParsingFlags(this).overflow; + } + + function creationData() { + return { + input: this._i, + format: this._f, + locale: this._locale, + isUTC: this._isUTC, + strict: this._strict + }; + } // FORMATTING + + + addFormatToken(0, ['gg', 2], 0, function () { + return this.weekYear() % 100; + }); + addFormatToken(0, ['GG', 2], 0, function () { + return this.isoWeekYear() % 100; + }); + + function addWeekYearFormatToken(token, getter) { + addFormatToken(0, [token, token.length], 0, getter); + } + + addWeekYearFormatToken('gggg', 'weekYear'); + addWeekYearFormatToken('ggggg', 'weekYear'); + addWeekYearFormatToken('GGGG', 'isoWeekYear'); + addWeekYearFormatToken('GGGGG', 'isoWeekYear'); // ALIASES + + addUnitAlias('weekYear', 'gg'); + addUnitAlias('isoWeekYear', 'GG'); // PRIORITY + + addUnitPriority('weekYear', 1); + addUnitPriority('isoWeekYear', 1); // PARSING + + addRegexToken('G', matchSigned); + addRegexToken('g', matchSigned); + addRegexToken('GG', match1to2, match2); + addRegexToken('gg', match1to2, match2); + addRegexToken('GGGG', match1to4, match4); + addRegexToken('gggg', match1to4, match4); + addRegexToken('GGGGG', match1to6, match6); + addRegexToken('ggggg', match1to6, match6); + addWeekParseToken(['gggg', 'ggggg', 'GGGG', 'GGGGG'], function (input, week, config, token) { + week[token.substr(0, 2)] = toInt(input); + }); + addWeekParseToken(['gg', 'GG'], function (input, week, config, token) { + week[token] = hooks.parseTwoDigitYear(input); + }); // MOMENTS + + function getSetWeekYear(input) { + return getSetWeekYearHelper.call(this, input, this.week(), this.weekday(), this.localeData()._week.dow, this.localeData()._week.doy); + } + + function getSetISOWeekYear(input) { + return getSetWeekYearHelper.call(this, input, this.isoWeek(), this.isoWeekday(), 1, 4); + } + + function getISOWeeksInYear() { + return weeksInYear(this.year(), 1, 4); + } + + function getWeeksInYear() { + var weekInfo = this.localeData()._week; + + return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy); + } + + function getSetWeekYearHelper(input, week, weekday, dow, doy) { + var weeksTarget; + + if (input == null) { + return weekOfYear(this, dow, doy).year; + } else { + weeksTarget = weeksInYear(input, dow, doy); + + if (week > weeksTarget) { + week = weeksTarget; + } + + return setWeekAll.call(this, input, week, weekday, dow, doy); + } + } + + function setWeekAll(weekYear, week, weekday, dow, doy) { + var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy), + date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear); + this.year(date.getUTCFullYear()); + this.month(date.getUTCMonth()); + this.date(date.getUTCDate()); + return this; + } // FORMATTING + + + addFormatToken('Q', 0, 'Qo', 'quarter'); // ALIASES + + addUnitAlias('quarter', 'Q'); // PRIORITY + + addUnitPriority('quarter', 7); // PARSING + + addRegexToken('Q', match1); + addParseToken('Q', function (input, array) { + array[MONTH] = (toInt(input) - 1) * 3; + }); // MOMENTS + + function getSetQuarter(input) { + return input == null ? Math.ceil((this.month() + 1) / 3) : this.month((input - 1) * 3 + this.month() % 3); + } // FORMATTING + + + addFormatToken('D', ['DD', 2], 'Do', 'date'); // ALIASES + + addUnitAlias('date', 'D'); // PRIORITY + + addUnitPriority('date', 9); // PARSING + + addRegexToken('D', match1to2); + addRegexToken('DD', match1to2, match2); + addRegexToken('Do', function (isStrict, locale) { + // TODO: Remove "ordinalParse" fallback in next major release. + return isStrict ? locale._dayOfMonthOrdinalParse || locale._ordinalParse : locale._dayOfMonthOrdinalParseLenient; + }); + addParseToken(['D', 'DD'], DATE); + addParseToken('Do', function (input, array) { + array[DATE] = toInt(input.match(match1to2)[0]); + }); // MOMENTS + + var getSetDayOfMonth = makeGetSet('Date', true); // FORMATTING + + addFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear'); // ALIASES + + addUnitAlias('dayOfYear', 'DDD'); // PRIORITY + + addUnitPriority('dayOfYear', 4); // PARSING + + addRegexToken('DDD', match1to3); + addRegexToken('DDDD', match3); + addParseToken(['DDD', 'DDDD'], function (input, array, config) { + config._dayOfYear = toInt(input); + }); // HELPERS + // MOMENTS + + function getSetDayOfYear(input) { + var dayOfYear = Math.round((this.clone().startOf('day') - this.clone().startOf('year')) / 864e5) + 1; + return input == null ? dayOfYear : this.add(input - dayOfYear, 'd'); + } // FORMATTING + + + addFormatToken('m', ['mm', 2], 0, 'minute'); // ALIASES + + addUnitAlias('minute', 'm'); // PRIORITY + + addUnitPriority('minute', 14); // PARSING + + addRegexToken('m', match1to2); + addRegexToken('mm', match1to2, match2); + addParseToken(['m', 'mm'], MINUTE); // MOMENTS + + var getSetMinute = makeGetSet('Minutes', false); // FORMATTING + + addFormatToken('s', ['ss', 2], 0, 'second'); // ALIASES + + addUnitAlias('second', 's'); // PRIORITY + + addUnitPriority('second', 15); // PARSING + + addRegexToken('s', match1to2); + addRegexToken('ss', match1to2, match2); + addParseToken(['s', 'ss'], SECOND); // MOMENTS + + var getSetSecond = makeGetSet('Seconds', false); // FORMATTING + + addFormatToken('S', 0, 0, function () { + return ~~(this.millisecond() / 100); + }); + addFormatToken(0, ['SS', 2], 0, function () { + return ~~(this.millisecond() / 10); + }); + addFormatToken(0, ['SSS', 3], 0, 'millisecond'); + addFormatToken(0, ['SSSS', 4], 0, function () { + return this.millisecond() * 10; + }); + addFormatToken(0, ['SSSSS', 5], 0, function () { + return this.millisecond() * 100; + }); + addFormatToken(0, ['SSSSSS', 6], 0, function () { + return this.millisecond() * 1000; + }); + addFormatToken(0, ['SSSSSSS', 7], 0, function () { + return this.millisecond() * 10000; + }); + addFormatToken(0, ['SSSSSSSS', 8], 0, function () { + return this.millisecond() * 100000; + }); + addFormatToken(0, ['SSSSSSSSS', 9], 0, function () { + return this.millisecond() * 1000000; + }); // ALIASES + + addUnitAlias('millisecond', 'ms'); // PRIORITY + + addUnitPriority('millisecond', 16); // PARSING + + addRegexToken('S', match1to3, match1); + addRegexToken('SS', match1to3, match2); + addRegexToken('SSS', match1to3, match3); + var token; + + for (token = 'SSSS'; token.length <= 9; token += 'S') { + addRegexToken(token, matchUnsigned); + } + + function parseMs(input, array) { + array[MILLISECOND] = toInt(('0.' + input) * 1000); + } + + for (token = 'S'; token.length <= 9; token += 'S') { + addParseToken(token, parseMs); + } // MOMENTS + + + var getSetMillisecond = makeGetSet('Milliseconds', false); // FORMATTING + + addFormatToken('z', 0, 0, 'zoneAbbr'); + addFormatToken('zz', 0, 0, 'zoneName'); // MOMENTS + + function getZoneAbbr() { + return this._isUTC ? 'UTC' : ''; + } + + function getZoneName() { + return this._isUTC ? 'Coordinated Universal Time' : ''; + } + + var proto = Moment.prototype; + proto.add = add; + proto.calendar = calendar$1; + proto.clone = clone; + proto.diff = diff; + proto.endOf = endOf; + proto.format = format; + proto.from = from; + proto.fromNow = fromNow; + proto.to = to; + proto.toNow = toNow; + proto.get = stringGet; + proto.invalidAt = invalidAt; + proto.isAfter = isAfter; + proto.isBefore = isBefore; + proto.isBetween = isBetween; + proto.isSame = isSame; + proto.isSameOrAfter = isSameOrAfter; + proto.isSameOrBefore = isSameOrBefore; + proto.isValid = isValid$2; + proto.lang = lang; + proto.locale = locale; + proto.localeData = localeData; + proto.max = prototypeMax; + proto.min = prototypeMin; + proto.parsingFlags = parsingFlags; + proto.set = stringSet; + proto.startOf = startOf; + proto.subtract = subtract; + proto.toArray = toArray; + proto.toObject = toObject; + proto.toDate = toDate; + proto.toISOString = toISOString; + proto.inspect = inspect; + proto.toJSON = toJSON; + proto.toString = toString; + proto.unix = unix; + proto.valueOf = valueOf; + proto.creationData = creationData; + proto.year = getSetYear; + proto.isLeapYear = getIsLeapYear; + proto.weekYear = getSetWeekYear; + proto.isoWeekYear = getSetISOWeekYear; + proto.quarter = proto.quarters = getSetQuarter; + proto.month = getSetMonth; + proto.daysInMonth = getDaysInMonth; + proto.week = proto.weeks = getSetWeek; + proto.isoWeek = proto.isoWeeks = getSetISOWeek; + proto.weeksInYear = getWeeksInYear; + proto.isoWeeksInYear = getISOWeeksInYear; + proto.date = getSetDayOfMonth; + proto.day = proto.days = getSetDayOfWeek; + proto.weekday = getSetLocaleDayOfWeek; + proto.isoWeekday = getSetISODayOfWeek; + proto.dayOfYear = getSetDayOfYear; + proto.hour = proto.hours = getSetHour; + proto.minute = proto.minutes = getSetMinute; + proto.second = proto.seconds = getSetSecond; + proto.millisecond = proto.milliseconds = getSetMillisecond; + proto.utcOffset = getSetOffset; + proto.utc = setOffsetToUTC; + proto.local = setOffsetToLocal; + proto.parseZone = setOffsetToParsedOffset; + proto.hasAlignedHourOffset = hasAlignedHourOffset; + proto.isDST = isDaylightSavingTime; + proto.isLocal = isLocal; + proto.isUtcOffset = isUtcOffset; + proto.isUtc = isUtc; + proto.isUTC = isUtc; + proto.zoneAbbr = getZoneAbbr; + proto.zoneName = getZoneName; + proto.dates = deprecate('dates accessor is deprecated. Use date instead.', getSetDayOfMonth); + proto.months = deprecate('months accessor is deprecated. Use month instead', getSetMonth); + proto.years = deprecate('years accessor is deprecated. Use year instead', getSetYear); + proto.zone = deprecate('moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/', getSetZone); + proto.isDSTShifted = deprecate('isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information', isDaylightSavingTimeShifted); + + function createUnix(input) { + return createLocal(input * 1000); + } + + function createInZone() { + return createLocal.apply(null, arguments).parseZone(); + } + + function preParsePostFormat(string) { + return string; + } + + var proto$1 = Locale.prototype; + proto$1.calendar = calendar; + proto$1.longDateFormat = longDateFormat; + proto$1.invalidDate = invalidDate; + proto$1.ordinal = ordinal; + proto$1.preparse = preParsePostFormat; + proto$1.postformat = preParsePostFormat; + proto$1.relativeTime = relativeTime; + proto$1.pastFuture = pastFuture; + proto$1.set = set; + proto$1.months = localeMonths; + proto$1.monthsShort = localeMonthsShort; + proto$1.monthsParse = localeMonthsParse; + proto$1.monthsRegex = monthsRegex; + proto$1.monthsShortRegex = monthsShortRegex; + proto$1.week = localeWeek; + proto$1.firstDayOfYear = localeFirstDayOfYear; + proto$1.firstDayOfWeek = localeFirstDayOfWeek; + proto$1.weekdays = localeWeekdays; + proto$1.weekdaysMin = localeWeekdaysMin; + proto$1.weekdaysShort = localeWeekdaysShort; + proto$1.weekdaysParse = localeWeekdaysParse; + proto$1.weekdaysRegex = weekdaysRegex; + proto$1.weekdaysShortRegex = weekdaysShortRegex; + proto$1.weekdaysMinRegex = weekdaysMinRegex; + proto$1.isPM = localeIsPM; + proto$1.meridiem = localeMeridiem; + + function get$1(format, index, field, setter) { + var locale = getLocale(); + var utc = createUTC().set(setter, index); + return locale[field](utc, format); + } + + function listMonthsImpl(format, index, field) { + if (isNumber(format)) { + index = format; + format = undefined; + } + + format = format || ''; + + if (index != null) { + return get$1(format, index, field, 'month'); + } + + var i; + var out = []; + + for (i = 0; i < 12; i++) { + out[i] = get$1(format, i, field, 'month'); + } + + return out; + } // () + // (5) + // (fmt, 5) + // (fmt) + // (true) + // (true, 5) + // (true, fmt, 5) + // (true, fmt) + + + function listWeekdaysImpl(localeSorted, format, index, field) { + if (typeof localeSorted === 'boolean') { + if (isNumber(format)) { + index = format; + format = undefined; + } + + format = format || ''; + } else { + format = localeSorted; + index = format; + localeSorted = false; + + if (isNumber(format)) { + index = format; + format = undefined; + } + + format = format || ''; + } + + var locale = getLocale(), + shift = localeSorted ? locale._week.dow : 0; + + if (index != null) { + return get$1(format, (index + shift) % 7, field, 'day'); + } + + var i; + var out = []; + + for (i = 0; i < 7; i++) { + out[i] = get$1(format, (i + shift) % 7, field, 'day'); + } + + return out; + } + + function listMonths(format, index) { + return listMonthsImpl(format, index, 'months'); + } + + function listMonthsShort(format, index) { + return listMonthsImpl(format, index, 'monthsShort'); + } + + function listWeekdays(localeSorted, format, index) { + return listWeekdaysImpl(localeSorted, format, index, 'weekdays'); + } + + function listWeekdaysShort(localeSorted, format, index) { + return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort'); + } + + function listWeekdaysMin(localeSorted, format, index) { + return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin'); + } + + getSetGlobalLocale('en', { + dayOfMonthOrdinalParse: /\d{1,2}(th|st|nd|rd)/, + ordinal: function (number) { + var b = number % 10, + output = toInt(number % 100 / 10) === 1 ? 'th' : b === 1 ? 'st' : b === 2 ? 'nd' : b === 3 ? 'rd' : 'th'; + return number + output; + } + }); // Side effect imports + + hooks.lang = deprecate('moment.lang is deprecated. Use moment.locale instead.', getSetGlobalLocale); + hooks.langData = deprecate('moment.langData is deprecated. Use moment.localeData instead.', getLocale); + var mathAbs = Math.abs; + + function abs() { + var data = this._data; + this._milliseconds = mathAbs(this._milliseconds); + this._days = mathAbs(this._days); + this._months = mathAbs(this._months); + data.milliseconds = mathAbs(data.milliseconds); + data.seconds = mathAbs(data.seconds); + data.minutes = mathAbs(data.minutes); + data.hours = mathAbs(data.hours); + data.months = mathAbs(data.months); + data.years = mathAbs(data.years); + return this; + } + + function addSubtract$1(duration, input, value, direction) { + var other = createDuration(input, value); + duration._milliseconds += direction * other._milliseconds; + duration._days += direction * other._days; + duration._months += direction * other._months; + return duration._bubble(); + } // supports only 2.0-style add(1, 's') or add(duration) + + + function add$1(input, value) { + return addSubtract$1(this, input, value, 1); + } // supports only 2.0-style subtract(1, 's') or subtract(duration) + + + function subtract$1(input, value) { + return addSubtract$1(this, input, value, -1); + } + + function absCeil(number) { + if (number < 0) { + return Math.floor(number); + } else { + return Math.ceil(number); + } + } + + function bubble() { + var milliseconds = this._milliseconds; + var days = this._days; + var months = this._months; + var data = this._data; + var seconds, minutes, hours, years, monthsFromDays; // if we have a mix of positive and negative values, bubble down first + // check: https://github.com/moment/moment/issues/2166 + + if (!(milliseconds >= 0 && days >= 0 && months >= 0 || milliseconds <= 0 && days <= 0 && months <= 0)) { + milliseconds += absCeil(monthsToDays(months) + days) * 864e5; + days = 0; + months = 0; + } // The following code bubbles up values, see the tests for + // examples of what that means. + + + data.milliseconds = milliseconds % 1000; + seconds = absFloor(milliseconds / 1000); + data.seconds = seconds % 60; + minutes = absFloor(seconds / 60); + data.minutes = minutes % 60; + hours = absFloor(minutes / 60); + data.hours = hours % 24; + days += absFloor(hours / 24); // convert days to months + + monthsFromDays = absFloor(daysToMonths(days)); + months += monthsFromDays; + days -= absCeil(monthsToDays(monthsFromDays)); // 12 months -> 1 year + + years = absFloor(months / 12); + months %= 12; + data.days = days; + data.months = months; + data.years = years; + return this; + } + + function daysToMonths(days) { + // 400 years have 146097 days (taking into account leap year rules) + // 400 years have 12 months === 4800 + return days * 4800 / 146097; + } + + function monthsToDays(months) { + // the reverse of daysToMonths + return months * 146097 / 4800; + } + + function as(units) { + if (!this.isValid()) { + return NaN; + } + + var days; + var months; + var milliseconds = this._milliseconds; + units = normalizeUnits(units); + + if (units === 'month' || units === 'quarter' || units === 'year') { + days = this._days + milliseconds / 864e5; + months = this._months + daysToMonths(days); + + switch (units) { + case 'month': + return months; + + case 'quarter': + return months / 3; + + case 'year': + return months / 12; + } + } else { + // handle milliseconds separately because of floating point math errors (issue #1867) + days = this._days + Math.round(monthsToDays(this._months)); + + switch (units) { + case 'week': + return days / 7 + milliseconds / 6048e5; + + case 'day': + return days + milliseconds / 864e5; + + case 'hour': + return days * 24 + milliseconds / 36e5; + + case 'minute': + return days * 1440 + milliseconds / 6e4; + + case 'second': + return days * 86400 + milliseconds / 1000; + // Math.floor prevents floating point math errors here + + case 'millisecond': + return Math.floor(days * 864e5) + milliseconds; + + default: + throw new Error('Unknown unit ' + units); + } + } + } // TODO: Use this.as('ms')? + + + function valueOf$1() { + if (!this.isValid()) { + return NaN; + } + + return this._milliseconds + this._days * 864e5 + this._months % 12 * 2592e6 + toInt(this._months / 12) * 31536e6; + } + + function makeAs(alias) { + return function () { + return this.as(alias); + }; + } + + var asMilliseconds = makeAs('ms'); + var asSeconds = makeAs('s'); + var asMinutes = makeAs('m'); + var asHours = makeAs('h'); + var asDays = makeAs('d'); + var asWeeks = makeAs('w'); + var asMonths = makeAs('M'); + var asQuarters = makeAs('Q'); + var asYears = makeAs('y'); + + function clone$1() { + return createDuration(this); + } + + function get$2(units) { + units = normalizeUnits(units); + return this.isValid() ? this[units + 's']() : NaN; + } + + function makeGetter(name) { + return function () { + return this.isValid() ? this._data[name] : NaN; + }; + } + + var milliseconds = makeGetter('milliseconds'); + var seconds = makeGetter('seconds'); + var minutes = makeGetter('minutes'); + var hours = makeGetter('hours'); + var days = makeGetter('days'); + var months = makeGetter('months'); + var years = makeGetter('years'); + + function weeks() { + return absFloor(this.days() / 7); + } + + var round = Math.round; + var thresholds = { + ss: 44, + // a few seconds to seconds + s: 45, + // seconds to minute + m: 45, + // minutes to hour + h: 22, + // hours to day + d: 26, + // days to month + M: 11 // months to year + + }; // helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize + + function substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) { + return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture); + } + + function relativeTime$1(posNegDuration, withoutSuffix, locale) { + var duration = createDuration(posNegDuration).abs(); + var seconds = round(duration.as('s')); + var minutes = round(duration.as('m')); + var hours = round(duration.as('h')); + var days = round(duration.as('d')); + var months = round(duration.as('M')); + var years = round(duration.as('y')); + var a = seconds <= thresholds.ss && ['s', seconds] || seconds < thresholds.s && ['ss', seconds] || minutes <= 1 && ['m'] || minutes < thresholds.m && ['mm', minutes] || hours <= 1 && ['h'] || hours < thresholds.h && ['hh', hours] || days <= 1 && ['d'] || days < thresholds.d && ['dd', days] || months <= 1 && ['M'] || months < thresholds.M && ['MM', months] || years <= 1 && ['y'] || ['yy', years]; + a[2] = withoutSuffix; + a[3] = +posNegDuration > 0; + a[4] = locale; + return substituteTimeAgo.apply(null, a); + } // This function allows you to set the rounding function for relative time strings + + + function getSetRelativeTimeRounding(roundingFunction) { + if (roundingFunction === undefined) { + return round; + } + + if (typeof roundingFunction === 'function') { + round = roundingFunction; + return true; + } + + return false; + } // This function allows you to set a threshold for relative time strings + + + function getSetRelativeTimeThreshold(threshold, limit) { + if (thresholds[threshold] === undefined) { + return false; + } + + if (limit === undefined) { + return thresholds[threshold]; + } + + thresholds[threshold] = limit; + + if (threshold === 's') { + thresholds.ss = limit - 1; + } + + return true; + } + + function humanize(withSuffix) { + if (!this.isValid()) { + return this.localeData().invalidDate(); + } + + var locale = this.localeData(); + var output = relativeTime$1(this, !withSuffix, locale); + + if (withSuffix) { + output = locale.pastFuture(+this, output); + } + + return locale.postformat(output); + } + + var abs$1 = Math.abs; + + function sign(x) { + return (x > 0) - (x < 0) || +x; + } + + function toISOString$1() { + // for ISO strings we do not use the normal bubbling rules: + // * milliseconds bubble up until they become hours + // * days do not bubble at all + // * months bubble up until they become years + // This is because there is no context-free conversion between hours and days + // (think of clock changes) + // and also not between days and months (28-31 days per month) + if (!this.isValid()) { + return this.localeData().invalidDate(); + } + + var seconds = abs$1(this._milliseconds) / 1000; + var days = abs$1(this._days); + var months = abs$1(this._months); + var minutes, hours, years; // 3600 seconds -> 60 minutes -> 1 hour + + minutes = absFloor(seconds / 60); + hours = absFloor(minutes / 60); + seconds %= 60; + minutes %= 60; // 12 months -> 1 year + + years = absFloor(months / 12); + months %= 12; // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js + + var Y = years; + var M = months; + var D = days; + var h = hours; + var m = minutes; + var s = seconds ? seconds.toFixed(3).replace(/\.?0+$/, '') : ''; + var total = this.asSeconds(); + + if (!total) { + // this is the same as C#'s (Noda) and python (isodate)... + // but not other JS (goog.date) + return 'P0D'; + } + + var totalSign = total < 0 ? '-' : ''; + var ymSign = sign(this._months) !== sign(total) ? '-' : ''; + var daysSign = sign(this._days) !== sign(total) ? '-' : ''; + var hmsSign = sign(this._milliseconds) !== sign(total) ? '-' : ''; + return totalSign + 'P' + (Y ? ymSign + Y + 'Y' : '') + (M ? ymSign + M + 'M' : '') + (D ? daysSign + D + 'D' : '') + (h || m || s ? 'T' : '') + (h ? hmsSign + h + 'H' : '') + (m ? hmsSign + m + 'M' : '') + (s ? hmsSign + s + 'S' : ''); + } + + var proto$2 = Duration.prototype; + proto$2.isValid = isValid$1; + proto$2.abs = abs; + proto$2.add = add$1; + proto$2.subtract = subtract$1; + proto$2.as = as; + proto$2.asMilliseconds = asMilliseconds; + proto$2.asSeconds = asSeconds; + proto$2.asMinutes = asMinutes; + proto$2.asHours = asHours; + proto$2.asDays = asDays; + proto$2.asWeeks = asWeeks; + proto$2.asMonths = asMonths; + proto$2.asQuarters = asQuarters; + proto$2.asYears = asYears; + proto$2.valueOf = valueOf$1; + proto$2._bubble = bubble; + proto$2.clone = clone$1; + proto$2.get = get$2; + proto$2.milliseconds = milliseconds; + proto$2.seconds = seconds; + proto$2.minutes = minutes; + proto$2.hours = hours; + proto$2.days = days; + proto$2.weeks = weeks; + proto$2.months = months; + proto$2.years = years; + proto$2.humanize = humanize; + proto$2.toISOString = toISOString$1; + proto$2.toString = toISOString$1; + proto$2.toJSON = toISOString$1; + proto$2.locale = locale; + proto$2.localeData = localeData; + proto$2.toIsoString = deprecate('toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)', toISOString$1); + proto$2.lang = lang; // Side effect imports + // FORMATTING + + addFormatToken('X', 0, 0, 'unix'); + addFormatToken('x', 0, 0, 'valueOf'); // PARSING + + addRegexToken('x', matchSigned); + addRegexToken('X', matchTimestamp); + addParseToken('X', function (input, array, config) { + config._d = new Date(parseFloat(input, 10) * 1000); + }); + addParseToken('x', function (input, array, config) { + config._d = new Date(toInt(input)); + }); // Side effect imports + + hooks.version = '2.24.0'; + setHookCallback(createLocal); + hooks.fn = proto; + hooks.min = min; + hooks.max = max; + hooks.now = now; + hooks.utc = createUTC; + hooks.unix = createUnix; + hooks.months = listMonths; + hooks.isDate = isDate; + hooks.locale = getSetGlobalLocale; + hooks.invalid = createInvalid; + hooks.duration = createDuration; + hooks.isMoment = isMoment; + hooks.weekdays = listWeekdays; + hooks.parseZone = createInZone; + hooks.localeData = getLocale; + hooks.isDuration = isDuration; + hooks.monthsShort = listMonthsShort; + hooks.weekdaysMin = listWeekdaysMin; + hooks.defineLocale = defineLocale; + hooks.updateLocale = updateLocale; + hooks.locales = listLocales; + hooks.weekdaysShort = listWeekdaysShort; + hooks.normalizeUnits = normalizeUnits; + hooks.relativeTimeRounding = getSetRelativeTimeRounding; + hooks.relativeTimeThreshold = getSetRelativeTimeThreshold; + hooks.calendarFormat = getCalendarFormat; + hooks.prototype = proto; // currently HTML5 input type only supports 24-hour formats + + hooks.HTML5_FMT = { + DATETIME_LOCAL: 'YYYY-MM-DDTHH:mm', + // + DATETIME_LOCAL_SECONDS: 'YYYY-MM-DDTHH:mm:ss', + // + DATETIME_LOCAL_MS: 'YYYY-MM-DDTHH:mm:ss.SSS', + // + DATE: 'YYYY-MM-DD', + // + TIME: 'HH:mm', + // + TIME_SECONDS: 'HH:mm:ss', + // + TIME_MS: 'HH:mm:ss.SSS', + // + WEEK: 'GGGG-[W]WW', + // + MONTH: 'YYYY-MM' // + + }; + return hooks; + }); + }); // Maps for number <-> hex string conversion + + var byteToHex$2$1 = []; + + for (var i$2$1 = 0; i$2$1 < 256; i$2$1++) { + byteToHex$2$1[i$2$1] = (i$2$1 + 0x100).toString(16).substr(1); + } + /** + * Generate 16 random bytes to be used as a base for UUID. + * + * @ignore + */ + + + var random$1$1 = function () { + if (typeof crypto !== 'undefined' && crypto.getRandomValues) { + // WHATWG crypto-based RNG - http://wiki.whatwg.org/wiki/Crypto + // Moderately fast, high quality + var _rnds8 = new Uint8Array(16); + + return function whatwgRNG() { + crypto.getRandomValues(_rnds8); + return _rnds8; + }; + } // Math.random()-based (RNG) + // + // If all else fails, use Math.random(). + // It's fast, but is of unspecified quality. + + + var _rnds = new Array(16); + + return function () { + for (var i = 0, r; i < 16; i++) { + if ((i & 0x03) === 0) { + r = Math.random() * 0x100000000; + } + + _rnds[i] = r >>> ((i & 0x03) << 3) & 0xff; + } + + return _rnds; + }; // uuid.js + // + // Copyright (c) 2010-2012 Robert Kieffer + // MIT License - http://opensource.org/licenses/mit-license.php + // Unique ID creation requires a high quality random # generator. We feature + // detect to determine the best RNG source, normalizing to a function that + // returns 128-bits of randomness, since that's what's usually required + // return require('./rng'); + }(); + + var byteToHex$1$1$1 = []; + + for (var i$1$1$1 = 0; i$1$1$1 < 256; i$1$1$1++) { + byteToHex$1$1$1[i$1$1$1] = (i$1$1$1 + 0x100).toString(16).substr(1); + } // **`v1()` - Generate time-based UUID** + // + // Inspired by https://github.com/LiosK/UUID.js + // and http://docs.python.org/library/uuid.html + // random #'s we need to init node and clockseq + + + var seedBytes$1$1 = random$1$1(); // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1) + + var defaultNodeId$1$1 = [seedBytes$1$1[0] | 0x01, seedBytes$1$1[1], seedBytes$1$1[2], seedBytes$1$1[3], seedBytes$1$1[4], seedBytes$1$1[5]]; // Per 4.2.2, randomize (14 bit) clockseq + + var defaultClockseq$1$1 = (seedBytes$1$1[6] << 8 | seedBytes$1$1[7]) & 0x3fff; // Previous uuid creation time + // for example '/Date(1198908717056)/' or '/Date(1198908717056-0700)/' + // code from http://momentjs.com/ + + var ASPDateRegex$1 = /^\/?Date\((-?\d+)/i; // Hex color + + /** + * Hue, Saturation, Value. + */ + + /** + * Test whether given object is a number + * + * @param value - Input value of unknown type. + * + * @returns True if number, false otherwise. + */ + + function isNumber$1(value) { + return value instanceof Number || typeof value === 'number'; + } + /** + * Test whether given object is a string + * + * @param value - Input value of unknown type. + * + * @returns True if string, false otherwise. + */ + + + function isString$1(value) { + return value instanceof String || typeof value === 'string'; + } + /** + * Test whether given object is a Moment date. + * @TODO: This is basically a workaround, if Moment was imported property it wouldn't necessary as moment.isMoment is a TS type guard. + * + * @param value - Input value of unknown type. + * + * @returns True if Moment instance, false otherwise. + */ + + + function isMoment$1(value) { + return moment$1.isMoment(value); + } + /** + * Convert an object into another type + * + * @param object - Value of unknown type. + * @param type - Name of the desired type. + * + * @returns Object in the desired type. + * @throws Error + */ + + + function convert$1(object, type) { + var match; + + if (object === undefined) { + return undefined; + } + + if (object === null) { + return null; + } + + if (!type) { + return object; + } + + if (!(typeof type === 'string') && !(type instanceof String)) { + throw new Error('Type must be a string'); + } //noinspection FallthroughInSwitchStatementJS + + + switch (type) { + case 'boolean': + case 'Boolean': + return Boolean(object); + + case 'number': + case 'Number': + if (isString$1(object) && !isNaN(Date.parse(object))) { + return moment$1(object).valueOf(); + } else { + // @TODO: I don't think that Number and String constructors are a good idea. + // This could also fail if the object doesn't have valueOf method or if it's redefined. + // For example: Object.create(null) or { valueOf: 7 }. + return Number(object.valueOf()); + } + + case 'string': + case 'String': + return String(object); + + case 'Date': + if (isNumber$1(object)) { + return new Date(object); + } + + if (object instanceof Date) { + return new Date(object.valueOf()); + } else if (isMoment$1(object)) { + return new Date(object.valueOf()); + } + + if (isString$1(object)) { + match = ASPDateRegex$1.exec(object); + + if (match) { + // object is an ASP date + return new Date(Number(match[1])); // parse number + } else { + return moment$1(new Date(object)).toDate(); // parse string + } + } else { + throw new Error('Cannot convert object of type ' + getType$1(object) + ' to type Date'); + } + + case 'Moment': + if (isNumber$1(object)) { + return moment$1(object); + } + + if (object instanceof Date) { + return moment$1(object.valueOf()); + } else if (isMoment$1(object)) { + return moment$1(object); + } + + if (isString$1(object)) { + match = ASPDateRegex$1.exec(object); + + if (match) { + // object is an ASP date + return moment$1(Number(match[1])); // parse number + } else { + return moment$1(object); // parse string + } + } else { + throw new Error('Cannot convert object of type ' + getType$1(object) + ' to type Date'); + } + + case 'ISODate': + if (isNumber$1(object)) { + return new Date(object); + } else if (object instanceof Date) { + return object.toISOString(); + } else if (isMoment$1(object)) { + return object.toDate().toISOString(); + } else if (isString$1(object)) { + match = ASPDateRegex$1.exec(object); + + if (match) { + // object is an ASP date + return new Date(Number(match[1])).toISOString(); // parse number + } else { + return moment$1(object).format(); // ISO 8601 + } + } else { + throw new Error('Cannot convert object of type ' + getType$1(object) + ' to type ISODate'); + } + + case 'ASPDate': + if (isNumber$1(object)) { + return '/Date(' + object + ')/'; + } else if (object instanceof Date) { + return '/Date(' + object.valueOf() + ')/'; + } else if (isString$1(object)) { + match = ASPDateRegex$1.exec(object); + + var _value; + + if (match) { + // object is an ASP date + _value = new Date(Number(match[1])).valueOf(); // parse number + } else { + _value = new Date(object).valueOf(); // parse string + } + + return '/Date(' + _value + ')/'; + } else { + throw new Error('Cannot convert object of type ' + getType$1(object) + ' to type ASPDate'); + } + + default: + var never = type; + throw new Error("Unknown type ".concat(never)); + } + } + /** + * Get the type of an object, for example exports.getType([]) returns 'Array' + * + * @param object - Input value of unknown type. + * + * @returns Detected type. + */ + + + function getType$1(object) { + var type = _typeof$1(object); + + if (type === 'object') { + if (object === null) { + return 'null'; + } + + if (object instanceof Boolean) { + return 'Boolean'; + } + + if (object instanceof Number) { + return 'Number'; + } + + if (object instanceof String) { + return 'String'; + } + + if (Array.isArray(object)) { + return 'Array'; + } + + if (object instanceof Date) { + return 'Date'; + } + + return 'Object'; + } + + if (type === 'number') { + return 'Number'; + } + + if (type === 'boolean') { + return 'Boolean'; + } + + if (type === 'string') { + return 'String'; + } + + if (type === undefined) { + return 'undefined'; + } + + return type; + } + /** + * Determine whether a value can be used as an id. + * + * @param value - Input value of unknown type. + * + * @returns True if the value is valid id, false otherwise. + */ + + + function isId(value) { + return typeof value === 'string' || typeof value === 'number'; + } + /** + * A queue. + * + * @typeParam T - The type of method names to be replaced by queued versions. + */ + + + var Queue = + /*#__PURE__*/ + function () { + /** + * Construct a new Queue. + * + * @param options - Queue configuration. + */ + function Queue(options) { + classCallCheck(this, Queue); + this._queue = []; + this._timeout = null; + this._extended = null; // options + + this.delay = null; + this.max = Infinity; + this.setOptions(options); + } + /** + * Update the configuration of the queue. + * + * @param options - Queue configuration. + */ + + + createClass(Queue, [{ + key: "setOptions", + value: function setOptions(options) { + if (options && typeof options.delay !== 'undefined') { + this.delay = options.delay; + } + + if (options && typeof options.max !== 'undefined') { + this.max = options.max; + } + + this._flushIfNeeded(); + } + /** + * Extend an object with queuing functionality. + * The object will be extended with a function flush, and the methods provided in options.replace will be replaced with queued ones. + * + * @param object - The object to be extended. + * @param options - Additional options. + * + * @returns The created queue. + */ + + }, { + key: "destroy", + + /** + * Destroy the queue. The queue will first flush all queued actions, and in case it has extended an object, will restore the original object. + */ + value: function destroy() { + this.flush(); + + if (this._extended) { + var object = this._extended.object; + var methods = this._extended.methods; + + for (var i = 0; i < methods.length; i++) { + var method = methods[i]; + + if (method.original) { + object[method.name] = method.original; + } else { + // @TODO: better solution? + delete object[method.name]; + } + } + + this._extended = null; + } + } + /** + * Replace a method on an object with a queued version. + * + * @param object - Object having the method. + * @param method - The method name. + */ + + }, { + key: "replace", + value: function replace(object, method) { + var me = this; + var original = object[method]; + + if (!original) { + throw new Error('Method ' + method + ' undefined'); + } + + object[method] = function () { + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } // add this call to the queue + + + me.queue({ + args: args, + fn: original, + context: this + }); + }; + } + /** + * Queue a call. + * + * @param entry - The function or entry to be queued. + */ + + }, { + key: "queue", + value: function queue(entry) { + if (typeof entry === 'function') { + this._queue.push({ + fn: entry + }); + } else { + this._queue.push(entry); + } + + this._flushIfNeeded(); + } + /** + * Check whether the queue needs to be flushed. + */ + + }, { + key: "_flushIfNeeded", + value: function _flushIfNeeded() { + var _this = this; // flush when the maximum is exceeded. + + + if (this._queue.length > this.max) { + this.flush(); + } // flush after a period of inactivity when a delay is configured + + + if (this._timeout != null) { + clearTimeout(this._timeout); + this._timeout = null; + } + + if (this.queue.length > 0 && typeof this.delay === 'number') { + this._timeout = setTimeout(function () { + _this.flush(); + }, this.delay); + } + } + /** + * Flush all queued calls + */ + + }, { + key: "flush", + value: function flush() { + this._queue.splice(0).forEach(function (entry) { + entry.fn.apply(entry.context || entry.fn, entry.args || []); + }); + } + }], [{ + key: "extend", + value: function extend(object, options) { + var queue = new Queue(options); + + if (object.flush !== undefined) { + throw new Error('Target object already has a property flush'); + } + + object.flush = function () { + queue.flush(); + }; + + var methods = [{ + name: 'flush', + original: undefined + }]; + + if (options && options.replace) { + for (var i = 0; i < options.replace.length; i++) { + var name = options.replace[i]; + methods.push({ + name: name, + // @TODO: better solution? + original: object[name] + }); // @TODO: better solution? + + queue.replace(object, name); + } + } + + queue._extended = { + object: object, + methods: methods + }; + return queue; + } + }]); + return Queue; + }(); + + function _arrayWithoutHoles$1(arr) { + if (Array.isArray(arr)) { + for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { + arr2[i] = arr[i]; + } + + return arr2; + } + } + + var arrayWithoutHoles = _arrayWithoutHoles$1; + + function _iterableToArray$1(iter) { + if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); + } + + var iterableToArray = _iterableToArray$1; + + function _nonIterableSpread$1() { + throw new TypeError("Invalid attempt to spread non-iterable instance"); + } + + var nonIterableSpread = _nonIterableSpread$1; + + function _toConsumableArray$1(arr) { + return arrayWithoutHoles(arr) || iterableToArray(arr) || nonIterableSpread(); + } + + var toConsumableArray = _toConsumableArray$1; + /** + * [[DataSet]] code that can be reused in [[DataView]] or other similar implementations of [[DataInterface]]. + * + * @typeParam Item - Item type that may or may not have an id. + * @typeParam IdProp - Name of the property that contains the id. + */ + + var DataSetPart = + /*#__PURE__*/ + function () { + function DataSetPart() { + classCallCheck(this, DataSetPart); + this._subscribers = { + '*': [], + add: [], + remove: [], + update: [] + }; + /** + * @deprecated Use on instead (PS: DataView.subscribe === DataView.on). + */ + + this.subscribe = DataSetPart.prototype.on; + /** + * @deprecated Use off instead (PS: DataView.unsubscribe === DataView.off). + */ + + this.unsubscribe = DataSetPart.prototype.off; + } + /** + * Trigger an event + * + * @param event - Event name. + * @param payload - Event payload. + * @param senderId - Id of the sender. + */ + + + createClass(DataSetPart, [{ + key: "_trigger", + value: function _trigger(event, payload, senderId) { + if (event === '*') { + throw new Error('Cannot trigger event *'); + } + + var subscribers = [].concat(toConsumableArray(this._subscribers[event]), toConsumableArray(this._subscribers['*'])); + + for (var i = 0, len = subscribers.length; i < len; i++) { + var subscriber = subscribers[i]; + + if (subscriber.callback) { + subscriber.callback(event, payload, senderId != null ? senderId : null); + } + } + } + /** + * Subscribe to an event, add an event listener. + * + * @param event - Event name. + * @param callback - Callback method. + */ + + }, { + key: "on", + value: function on(event, callback) { + this._subscribers[event].push({ + callback: callback + }); + } + /** + * Unsubscribe from an event, remove an event listener. + * + * @remarks If the same callback was subscribed more than once **all** occurences will be removed. + * + * @param event - Event name. + * @param callback - Callback method. + */ + + }, { + key: "off", + value: function off(event, callback) { + this._subscribers[event] = this._subscribers[event].filter(function (listener) { + return listener.callback !== callback; + }); + } + }]); + return DataSetPart; + }(); + + function ownKeys$1(object, enumerableOnly) { + var keys = Object.keys(object); + + if (Object.getOwnPropertySymbols) { + keys.push.apply(keys, Object.getOwnPropertySymbols(object)); + } + + if (enumerableOnly) keys = keys.filter(function (sym) { + return Object.getOwnPropertyDescriptor(object, sym).enumerable; + }); + return keys; + } + + function _objectSpread(target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i] != null ? arguments[i] : {}; + + if (i % 2) { + ownKeys$1(source, true).forEach(function (key) { + defineProperty$1(target, key, source[key]); + }); + } else if (Object.getOwnPropertyDescriptors) { + Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); + } else { + ownKeys$1(source).forEach(function (key) { + Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); + }); + } + } + + return target; + } + /** + * # DataSet + * + * Vis.js comes with a flexible DataSet, which can be used to hold and manipulate unstructured data and listen for changes in the data. The DataSet is key/value based. Data items can be added, updated and removed from the DataSet, and one can subscribe to changes in the DataSet. The data in the DataSet can be filtered and ordered, and fields (like dates) can be converted to a specific type. Data can be normalized when appending it to the DataSet as well. + * + * ## Example + * + * The following example shows how to use a DataSet. + * + * ```javascript + * // create a DataSet + * var options = {}; + * var data = new vis.DataSet(options); + * + * // add items + * // note that the data items can contain different properties and data formats + * data.add([ + * {id: 1, text: 'item 1', date: new Date(2013, 6, 20), group: 1, first: true}, + * {id: 2, text: 'item 2', date: '2013-06-23', group: 2}, + * {id: 3, text: 'item 3', date: '2013-06-25', group: 2}, + * {id: 4, text: 'item 4'} + * ]); + * + * // subscribe to any change in the DataSet + * data.on('*', function (event, properties, senderId) { + * console.log('event', event, properties); + * }); + * + * // update an existing item + * data.update({id: 2, group: 1}); + * + * // remove an item + * data.remove(4); + * + * // get all ids + * var ids = data.getIds(); + * console.log('ids', ids); + * + * // get a specific item + * var item1 = data.get(1); + * console.log('item1', item1); + * + * // retrieve a filtered subset of the data + * var items = data.get({ + * filter: function (item) { + * return item.group == 1; + * } + * }); + * console.log('filtered items', items); + * + * // retrieve formatted items + * var items = data.get({ + * fields: ['id', 'date'], + * type: { + * date: 'ISODate' + * } + * }); + * console.log('formatted items', items); + * ``` + * + * @typeParam Item - Item type that may or may not have an id. + * @typeParam IdProp - Name of the property that contains the id. + */ + + + var DataSet = + /*#__PURE__*/ + function (_DataSetPart) { + inherits(DataSet, _DataSetPart); + /** + * Construct a new DataSet. + * + * @param data - Initial data or options. + * @param options - Options (type error if data is also options). + */ + + function DataSet(data, options) { + var _this; + + classCallCheck(this, DataSet); + _this = possibleConstructorReturn(this, getPrototypeOf(DataSet).call(this)); // correctly read optional arguments + + if (data && !Array.isArray(data)) { + options = data; + data = []; + } + + _this._options = options || {}; + _this._data = Object.create({}); // map with data indexed by id + + _this.length = 0; // number of items in the DataSet + + _this._idProp = _this._options.fieldId || 'id'; // name of the field containing id + + _this._type = {}; // internal field types (NOTE: this can differ from this._options.type) + // all variants of a Date are internally stored as Date, so we can convert + // from everything to everything (also from ISODate to Number for example) + + if (_this._options.type) { + var fields = Object.keys(_this._options.type); + + for (var i = 0, len = fields.length; i < len; i++) { + var field = fields[i]; + var value = _this._options.type[field]; + + if (value == 'Date' || value == 'ISODate' || value == 'ASPDate') { + _this._type[field] = 'Date'; + } else { + _this._type[field] = value; + } + } + } // add initial data when provided + + + if (data && data.length) { + _this.add(data); + } + + _this.setOptions(options); + + return _this; + } + /** + * Set new options. + * + * @param options - The new options. + */ + + + createClass(DataSet, [{ + key: "setOptions", + value: function setOptions(options) { + if (options && options.queue !== undefined) { + if (options.queue === false) { + // delete queue if loaded + if (this._queue) { + this._queue.destroy(); + + delete this._queue; + } + } else { + // create queue and update its options + if (!this._queue) { + this._queue = Queue.extend(this, { + replace: ['add', 'update', 'remove'] + }); + } + + if (options.queue && _typeof_1(options.queue) === 'object') { + this._queue.setOptions(options.queue); + } + } + } + } + /** + * Add a data item or an array with items. + * + * After the items are added to the DataSet, the DataSet will trigger an event `add`. When a `senderId` is provided, this id will be passed with the triggered event to all subscribers. + * + * ## Example + * + * ```javascript + * // create a DataSet + * const data = new vis.DataSet() + * + * // add items + * const ids = data.add([ + * { id: 1, text: 'item 1' }, + * { id: 2, text: 'item 2' }, + * { text: 'item without an id' } + * ]) + * + * console.log(ids) // [1, 2, ''] + * ``` + * + * @param data - Items to be added (ids will be generated if missing). + * @param senderId - Sender id. + * + * @returns addedIds - Array with the ids (generated if not present) of the added items. + * + * @throws When an item with the same id as any of the added items already exists. + */ + + }, { + key: "add", + value: function add(data, senderId) { + var addedIds = []; + var id; + + if (Array.isArray(data)) { + // Array + for (var i = 0, len = data.length; i < len; i++) { + id = this._addItem(data[i]); + addedIds.push(id); + } + } else if (data && _typeof_1(data) === 'object') { + // Single item + id = this._addItem(data); + addedIds.push(id); + } else { + throw new Error('Unknown dataType'); + } + + if (addedIds.length) { + this._trigger('add', { + items: addedIds + }, senderId); + } + + return addedIds; + } + /** + * Update existing items. When an item does not exist, it will be created + * + * The provided properties will be merged in the existing item. When an item does not exist, it will be created. + * + * After the items are updated, the DataSet will trigger an event `add` for the added items, and an event `update`. When a `senderId` is provided, this id will be passed with the triggered event to all subscribers. + * + * ## Example + * + * ```javascript + * // create a DataSet + * const data = new vis.DataSet([ + * { id: 1, text: 'item 1' }, + * { id: 2, text: 'item 2' }, + * { id: 3, text: 'item 3' } + * ]) + * + * // update items + * const ids = data.update([ + * { id: 2, text: 'item 2 (updated)' }, + * { id: 4, text: 'item 4 (new)' } + * ]) + * + * console.log(ids) // [2, 4] + * ``` + * + * @param data - Items to be updated (if the id is already present) or added (if the id is missing). + * @param senderId - Sender id. + * + * @returns updatedIds - The ids of the added (these may be newly generated if there was no id in the item from the data) or updated items. + * + * @throws When the supplied data is neither an item nor an array of items. + */ + + }, { + key: "update", + value: function update(data, senderId) { + var _this2 = this; + + var addedIds = []; + var updatedIds = []; + var oldData = []; + var updatedData = []; + var idProp = this._idProp; + + var addOrUpdate = function addOrUpdate(item) { + var origId = item[idProp]; + + if (origId != null && _this2._data[origId]) { + var fullItem = item; // it has an id, therefore it is a fullitem + + var oldItem = Object.assign({}, _this2._data[origId]); // update item + + var id = _this2._updateItem(fullItem); + + updatedIds.push(id); + updatedData.push(fullItem); + oldData.push(oldItem); + } else { + // add new item + var _id = _this2._addItem(item); + + addedIds.push(_id); + } + }; + + if (Array.isArray(data)) { + // Array + for (var i = 0, len = data.length; i < len; i++) { + if (data[i] && _typeof_1(data[i]) === 'object') { + addOrUpdate(data[i]); + } else { + console.warn('Ignoring input item, which is not an object at index ' + i); + } + } + } else if (data && _typeof_1(data) === 'object') { + // Single item + addOrUpdate(data); + } else { + throw new Error('Unknown dataType'); + } + + if (addedIds.length) { + this._trigger('add', { + items: addedIds + }, senderId); + } + + if (updatedIds.length) { + var props = { + items: updatedIds, + oldData: oldData, + data: updatedData + }; // TODO: remove deprecated property 'data' some day + //Object.defineProperty(props, 'data', { + // 'get': (function() { + // console.warn('Property data is deprecated. Use DataSet.get(ids) to retrieve the new data, use the oldData property on this object to get the old data'); + // return updatedData; + // }).bind(this) + //}); + + this._trigger('update', props, senderId); + } + + return addedIds.concat(updatedIds); + } + /** @inheritdoc */ + + }, { + key: "get", + value: function get(first, second) { + // @TODO: Woudn't it be better to split this into multiple methods? + // parse the arguments + var id = undefined; + var ids = undefined; + var options = undefined; + + if (isId(first)) { + // get(id [, options]) + id = first; + options = second; + } else if (Array.isArray(first)) { + // get(ids [, options]) + ids = first; + options = second; + } else { + // get([, options]) + options = first; + } // determine the return type + + + var returnType = options && options.returnType === 'Object' ? 'Object' : 'Array'; // @TODO: WTF is this? Or am I missing something? + // var returnType + // if (options && options.returnType) { + // var allowedValues = ['Array', 'Object'] + // returnType = + // allowedValues.indexOf(options.returnType) == -1 + // ? 'Array' + // : options.returnType + // } else { + // returnType = 'Array' + // } + // build options + + var type = options && options.type || this._options.type; + var filter = options && options.filter; + var items = []; + var item = null; + var itemIds = null; + var itemId = null; // convert items + + if (id != null) { + // return a single item + item = this._getItem(id, type); + + if (item && filter && !filter(item)) { + item = null; + } + } else if (ids != null) { + // return a subset of items + for (var i = 0, len = ids.length; i < len; i++) { + item = this._getItem(ids[i], type); + + if (item != null && (!filter || filter(item))) { + items.push(item); + } + } + } else { + // return all items + itemIds = Object.keys(this._data); + + for (var _i = 0, _len = itemIds.length; _i < _len; _i++) { + itemId = itemIds[_i]; + item = this._getItem(itemId, type); + + if (item != null && (!filter || filter(item))) { + items.push(item); + } + } + } // order the results + + + if (options && options.order && id == undefined) { + this._sort(items, options.order); + } // filter fields of the items + + + if (options && options.fields) { + var fields = options.fields; + + if (id != undefined && item != null) { + item = this._filterFields(item, fields); + } else { + for (var _i2 = 0, _len2 = items.length; _i2 < _len2; _i2++) { + items[_i2] = this._filterFields(items[_i2], fields); + } + } + } // return the results + + + if (returnType == 'Object') { + var result = {}; + + for (var _i3 = 0, _len3 = items.length; _i3 < _len3; _i3++) { + var resultant = items[_i3]; // @TODO: Shoudn't this be this._fieldId? + // result[resultant.id] = resultant + + var _id2 = resultant[this._idProp]; + result[_id2] = resultant; + } + + return result; + } else { + if (id != null) { + // a single item + return item; + } else { + // just return our array + return items; + } + } + } + /** @inheritdoc */ + + }, { + key: "getIds", + value: function getIds(options) { + var data = this._data; + var filter = options && options.filter; + var order = options && options.order; + var type = options && options.type || this._options.type; + var itemIds = Object.keys(data); + var ids = []; + var item; + var items; + + if (filter) { + // get filtered items + if (order) { + // create ordered list + items = []; + + for (var i = 0, len = itemIds.length; i < len; i++) { + var id = itemIds[i]; + item = this._getItem(id, type); + + if (filter(item)) { + items.push(item); + } + } + + this._sort(items, order); + + for (var _i4 = 0, _len4 = items.length; _i4 < _len4; _i4++) { + ids.push(items[_i4][this._idProp]); + } + } else { + // create unordered list + for (var _i5 = 0, _len5 = itemIds.length; _i5 < _len5; _i5++) { + var _id3 = itemIds[_i5]; + item = this._getItem(_id3, type); + + if (filter(item)) { + ids.push(item[this._idProp]); + } + } + } + } else { + // get all items + if (order) { + // create an ordered list + items = []; + + for (var _i6 = 0, _len6 = itemIds.length; _i6 < _len6; _i6++) { + var _id4 = itemIds[_i6]; + items.push(data[_id4]); + } + + this._sort(items, order); + + for (var _i7 = 0, _len7 = items.length; _i7 < _len7; _i7++) { + ids.push(items[_i7][this._idProp]); + } + } else { + // create unordered list + for (var _i8 = 0, _len8 = itemIds.length; _i8 < _len8; _i8++) { + var _id5 = itemIds[_i8]; + item = data[_id5]; + ids.push(item[this._idProp]); + } + } + } + + return ids; + } + /** @inheritdoc */ + + }, { + key: "getDataSet", + value: function getDataSet() { + return this; + } + /** @inheritdoc */ + + }, { + key: "forEach", + value: function forEach(callback, options) { + var filter = options && options.filter; + var type = options && options.type || this._options.type; + var data = this._data; + var itemIds = Object.keys(data); + + if (options && options.order) { + // execute forEach on ordered list + var items = this.get(options); + + for (var i = 0, len = items.length; i < len; i++) { + var item = items[i]; + var id = item[this._idProp]; + callback(item, id); + } + } else { + // unordered + for (var _i9 = 0, _len9 = itemIds.length; _i9 < _len9; _i9++) { + var _id6 = itemIds[_i9]; + + var _item = this._getItem(_id6, type); + + if (!filter || filter(_item)) { + callback(_item, _id6); + } + } + } + } + /** @inheritdoc */ + + }, { + key: "map", + value: function map(callback, options) { + var filter = options && options.filter; + var type = options && options.type || this._options.type; + var mappedItems = []; + var data = this._data; + var itemIds = Object.keys(data); // convert and filter items + + for (var i = 0, len = itemIds.length; i < len; i++) { + var id = itemIds[i]; + + var item = this._getItem(id, type); + + if (!filter || filter(item)) { + mappedItems.push(callback(item, id)); + } + } // order items + + + if (options && options.order) { + this._sort(mappedItems, options.order); + } + + return mappedItems; + } + /** + * Filter the fields of an item. + * + * @param item - The item whose fields should be filtered. + * @param fields - The names of the fields that will be kept. + * + * @typeParam K - Field name type. + * + * @returns The item without any additional fields. + */ + + }, { + key: "_filterFields", + value: function _filterFields(item, fields) { + if (!item) { + // item is null + return item; + } + + return (Array.isArray(fields) ? // Use the supplied array + fields : // Use the keys of the supplied object + Object.keys(fields)).reduce(function (filteredItem, field) { + filteredItem[field] = item[field]; + return filteredItem; + }, {}); + } + /** + * Sort the provided array with items. + * + * @param items - Items to be sorted in place. + * @param order - A field name or custom sort function. + * + * @typeParam T - The type of the items in the items array. + */ + + }, { + key: "_sort", + value: function _sort(items, order) { + if (typeof order === 'string') { + // order by provided field name + var name = order; // field name + + items.sort(function (a, b) { + // @TODO: How to treat missing properties? + var av = a[name]; + var bv = b[name]; + return av > bv ? 1 : av < bv ? -1 : 0; + }); + } else if (typeof order === 'function') { + // order by sort function + items.sort(order); + } else { + // TODO: extend order by an Object {field:string, direction:string} + // where direction can be 'asc' or 'desc' + throw new TypeError('Order must be a function or a string'); + } + } + /** + * Remove an item or multiple items by “reference” (only the id is used) or by id. + * + * The method ignores removal of non-existing items, and returns an array containing the ids of the items which are actually removed from the DataSet. + * + * After the items are removed, the DataSet will trigger an event `remove` for the removed items. When a `senderId` is provided, this id will be passed with the triggered event to all subscribers. + * + * ## Example + * ```javascript + * // create a DataSet + * const data = new vis.DataSet([ + * { id: 1, text: 'item 1' }, + * { id: 2, text: 'item 2' }, + * { id: 3, text: 'item 3' } + * ]) + * + * // remove items + * const ids = data.remove([2, { id: 3 }, 4]) + * + * console.log(ids) // [2, 3] + * ``` + * + * @param id - One or more items or ids of items to be removed. + * @param senderId - Sender id. + * + * @returns The ids of the removed items. + */ + + }, { + key: "remove", + value: function remove(id, senderId) { + var removedIds = []; + var removedItems = []; // force everything to be an array for simplicity + + var ids = Array.isArray(id) ? id : [id]; + + for (var i = 0, len = ids.length; i < len; i++) { + var item = this._remove(ids[i]); + + if (item) { + var itemId = item[this._idProp]; + + if (itemId != null) { + removedIds.push(itemId); + removedItems.push(item); + } + } + } + + if (removedIds.length) { + this._trigger('remove', { + items: removedIds, + oldData: removedItems + }, senderId); + } + + return removedIds; + } + /** + * Remove an item by its id or reference. + * + * @param id - Id of an item or the item itself. + * + * @returns The removed item if removed, null otherwise. + */ + + }, { + key: "_remove", + value: function _remove(id) { + // @TODO: It origianlly returned the item although the docs say id. + // The code expects the item, so probably an error in the docs. + var ident; // confirm the id to use based on the args type + + if (isId(id)) { + ident = id; + } else if (id && _typeof_1(id) === 'object') { + ident = id[this._idProp]; // look for the identifier field using ._idProp + } // do the removing if the item is found + + + if (ident != null && this._data[ident]) { + var item = this._data[ident]; + delete this._data[ident]; + --this.length; + return item; + } + + return null; + } + /** + * Clear the entire data set. + * + * After the items are removed, the [[DataSet]] will trigger an event `remove` for all removed items. When a `senderId` is provided, this id will be passed with the triggered event to all subscribers. + * + * @param senderId - Sender id. + * + * @returns removedIds - The ids of all removed items. + */ + + }, { + key: "clear", + value: function clear(senderId) { + var ids = Object.keys(this._data); + var items = []; + + for (var i = 0, len = ids.length; i < len; i++) { + items.push(this._data[ids[i]]); + } + + this._data = {}; + this.length = 0; + + this._trigger('remove', { + items: ids, + oldData: items + }, senderId); + + return ids; + } + /** + * Find the item with maximum value of a specified field. + * + * @param field - Name of the property that should be searched for max value. + * + * @returns Item containing max value, or null if no items. + */ + + }, { + key: "max", + value: function max(field) { + var data = this._data; + var itemIds = Object.keys(data); + var max = null; + var maxField = null; + + for (var i = 0, len = itemIds.length; i < len; i++) { + var id = itemIds[i]; + var item = data[id]; + var itemField = item[field]; + + if (itemField != null && (maxField == null || itemField > maxField)) { + max = item; + maxField = itemField; + } + } + + return max; + } + /** + * Find the item with minimum value of a specified field. + * + * @param field - Name of the property that should be searched for min value. + * + * @returns Item containing min value, or null if no items. + */ + + }, { + key: "min", + value: function min(field) { + var data = this._data; + var itemIds = Object.keys(data); + var min = null; + var minField = null; + + for (var i = 0, len = itemIds.length; i < len; i++) { + var id = itemIds[i]; + var item = data[id]; + var itemField = item[field]; + + if (itemField != null && (minField == null || itemField < minField)) { + min = item; + minField = itemField; + } + } + + return min; + } + /** + * Find all distinct values of a specified field + * + * @param prop - The property name whose distinct values should be returned. + * + * @returns Unordered array containing all distinct values. Items without specified property are ignored. + */ + + }, { + key: "distinct", + value: function distinct(prop) { + var data = this._data; + var itemIds = Object.keys(data); + var values = []; + var fieldType = this._options.type && this._options.type[prop] || null; + var count = 0; + + for (var i = 0, len = itemIds.length; i < len; i++) { + var id = itemIds[i]; + var item = data[id]; + var value = item[prop]; + var exists = false; + + for (var j = 0; j < count; j++) { + if (values[j] == value) { + exists = true; + break; + } + } + + if (!exists && value !== undefined) { + values[count] = value; + count++; + } + } + + if (fieldType) { + for (var _i10 = 0, _len10 = values.length; _i10 < _len10; _i10++) { + values[_i10] = convert$1(values[_i10], fieldType); + } + } + + return values; + } + /** + * Add a single item. Will fail when an item with the same id already exists. + * + * @param item - A new item to be added. + * + * @returns Added item's id. An id is generated when it is not present in the item. + */ + + }, { + key: "_addItem", + value: function _addItem(item) { + var id = item[this._idProp]; + + if (id != null) { + // check whether this id is already taken + if (this._data[id]) { + // item already exists + throw new Error('Cannot add item: item with id ' + id + ' already exists'); + } + } else { + // generate an id + id = uuid4$1(); + item[this._idProp] = id; + } + + var d = {}; + var fields = Object.keys(item); + + for (var i = 0, len = fields.length; i < len; i++) { + var field = fields[i]; + var fieldType = this._type[field]; // type may be undefined + + d[field] = convert$1(item[field], fieldType); + } + + this._data[id] = d; + this.length++; + return id; + } + /** + * Get an item. Fields can be converted to a specific type + * + * @param id - Id of the requested item. + * @param types - Property name to type name object map of type converstions. + * + * @returns The item, optionally after type conversion. + */ + + }, { + key: "_getItem", + value: function _getItem(id, types) { + // @TODO: I have no idea how to type this. + // get the item from the dataset + var raw = this._data[id]; + + if (!raw) { + return null; + } // convert the items field types + + + var converted; + var fields = Object.keys(raw); + + if (types) { + converted = {}; + + for (var i = 0, len = fields.length; i < len; i++) { + var field = fields[i]; + var value = raw[field]; + converted[field] = convert$1(value, types[field]); + } + } else { + // no field types specified, no converting needed + converted = _objectSpread({}, raw); + } + + if (converted[this._idProp] == null) { + converted[this._idProp] = raw.id; + } + + return converted; + } + /** + * Update a single item: merge with existing item. + * Will fail when the item has no id, or when there does not exist an item with the same id. + * + * @param item - The new item + * + * @returns The id of the updated item. + */ + + }, { + key: "_updateItem", + value: function _updateItem(item) { + var id = item[this._idProp]; + + if (id == null) { + throw new Error('Cannot update item: item has no id (item: ' + JSON.stringify(item) + ')'); + } + + var d = this._data[id]; + + if (!d) { + // item doesn't exist + throw new Error('Cannot update item: no item with id ' + id + ' found'); + } // merge with current item + + + var fields = Object.keys(item); + + for (var i = 0, len = fields.length; i < len; i++) { + var field = fields[i]; + var fieldType = this._type[field] // type may be undefined + ; + d[field] = convert$1(item[field], fieldType); + } + + return id; + } + }]); + return DataSet; + }(DataSetPart); + /** + * DataView + * + * A DataView offers a filtered and/or formatted view on a DataSet. One can subscribe to changes in a DataView, and easily get filtered or formatted data without having to specify filters and field types all the time. + * + * ## Example + * ```javascript + * // create a DataSet + * var data = new vis.DataSet(); + * data.add([ + * {id: 1, text: 'item 1', date: new Date(2013, 6, 20), group: 1, first: true}, + * {id: 2, text: 'item 2', date: '2013-06-23', group: 2}, + * {id: 3, text: 'item 3', date: '2013-06-25', group: 2}, + * {id: 4, text: 'item 4'} + * ]); + * + * // create a DataView + * // the view will only contain items having a property group with value 1, + * // and will only output fields id, text, and date. + * var view = new vis.DataView(data, { + * filter: function (item) { + * return (item.group == 1); + * }, + * fields: ['id', 'text', 'date'] + * }); + * + * // subscribe to any change in the DataView + * view.on('*', function (event, properties, senderId) { + * console.log('event', event, properties); + * }); + * + * // update an item in the data set + * data.update({id: 2, group: 1}); + * + * // get all ids in the view + * var ids = view.getIds(); + * console.log('ids', ids); // will output [1, 2] + * + * // get all items in the view + * var items = view.get(); + * ``` + * + * @typeParam Item - Item type that may or may not have an id. + * @typeParam IdProp - Name of the property that contains the id. + */ + + + var DataView = + /*#__PURE__*/ + function (_DataSetPart) { + inherits(DataView, _DataSetPart); + /** + * Create a DataView. + * + * @param data - The instance containing data (directly or indirectly). + * @param options - Options to configure this data view. + */ + + function DataView(data, options) { + var _this; + + classCallCheck(this, DataView); + _this = possibleConstructorReturn(this, getPrototypeOf(DataView).call(this)); + /** @inheritdoc */ + + _this.length = 0; + _this._ids = {}; // ids of the items currently in memory (just contains a boolean true) + + _this._options = options || {}; + _this.listener = _this._onEvent.bind(assertThisInitialized(_this)); + + _this.setData(data); + + return _this; + } // TODO: implement a function .config() to dynamically update things like configured filter + // and trigger changes accordingly + + /** + * Set a data source for the view. + * + * @param data - The instance containing data (directly or indirectly). + */ + + + createClass(DataView, [{ + key: "setData", + value: function setData(data) { + if (this._data) { + // unsubscribe from current dataset + if (this._data.off) { + this._data.off('*', this.listener); + } // trigger a remove of all items in memory + + + var ids = this._data.getIds({ + filter: this._options.filter + }); + + var items = this._data.get(ids); + + this._ids = {}; + this.length = 0; + + this._trigger('remove', { + items: ids, + oldData: items + }); + } + + if (data != null) { + this._data = data; // trigger an add of all added items + + var _ids = this._data.getIds({ + filter: this._options.filter + }); + + for (var i = 0, len = _ids.length; i < len; i++) { + var id = _ids[i]; + this._ids[id] = true; + } + + this.length = _ids.length; + + this._trigger('add', { + items: _ids + }); + } else { + this._data = new DataSet(); + } // subscribe to new dataset + + + if (this._data.on) { + this._data.on('*', this.listener); + } + } + /** + * Refresh the DataView. + * Useful when the DataView has a filter function containing a variable parameter. + */ + + }, { + key: "refresh", + value: function refresh() { + var ids = this._data.getIds({ + filter: this._options.filter + }); + + var oldIds = Object.keys(this._ids); + var newIds = {}; + var addedIds = []; + var removedIds = []; + var removedItems = []; // check for additions + + for (var i = 0, len = ids.length; i < len; i++) { + var id = ids[i]; + newIds[id] = true; + + if (!this._ids[id]) { + addedIds.push(id); + this._ids[id] = true; + } + } // check for removals + + + for (var _i = 0, _len = oldIds.length; _i < _len; _i++) { + var _id = oldIds[_i]; + + var item = this._data.get(_id); + + if (item == null) { + // @TODO: Investigate. + // Doesn't happen during tests or examples. + // Is it really impossible or could it eventually happen? + // How to handle it if it does? The types guarantee non-nullable items. + console.error('If you see this, report it please.'); + } else if (!newIds[_id]) { + removedIds.push(_id); + removedItems.push(item); + delete this._ids[_id]; + } + } + + this.length += addedIds.length - removedIds.length; // trigger events + + if (addedIds.length) { + this._trigger('add', { + items: addedIds + }); + } + + if (removedIds.length) { + this._trigger('remove', { + items: removedIds, + oldData: removedItems + }); + } + } + /** @inheritdoc */ + + }, { + key: "get", + value: function get(first, second) { + if (this._data == null) { + return null; + } // parse the arguments + + + var ids = null; + var options; + + if (isId(first) || Array.isArray(first)) { + ids = first; + options = second; + } else { + options = first; + } // extend the options with the default options and provided options + + + var viewOptions = Object.assign({}, this._options, options); // create a combined filter method when needed + + var thisFilter = this._options.filter; + var optionsFilter = options && options.filter; + + if (thisFilter && optionsFilter) { + viewOptions.filter = function (item) { + return thisFilter(item) && optionsFilter(item); + }; + } + + if (ids == null) { + return this._data.get(viewOptions); + } else { + return this._data.get(ids, viewOptions); + } + } + /** @inheritdoc */ + + }, { + key: "getIds", + value: function getIds(options) { + if (this._data.length) { + var defaultFilter = this._options.filter; + var optionsFilter = options != null ? options.filter : null; + var filter; + + if (optionsFilter) { + if (defaultFilter) { + filter = function filter(item) { + return defaultFilter(item) && optionsFilter(item); + }; + } else { + filter = optionsFilter; + } + } else { + filter = defaultFilter; + } + + return this._data.getIds({ + filter: filter, + order: options && options.order + }); + } else { + return []; + } + } + /** @inheritdoc */ + + }, { + key: "forEach", + value: function forEach(callback, options) { + if (this._data) { + var defaultFilter = this._options.filter; + var optionsFilter = options && options.filter; + var filter; + + if (optionsFilter) { + if (defaultFilter) { + filter = function filter(item) { + return defaultFilter(item) && optionsFilter(item); + }; + } else { + filter = optionsFilter; + } + } else { + filter = defaultFilter; + } + + this._data.forEach(callback, { + filter: filter, + order: options && options.order + }); + } + } + /** @inheritdoc */ + + }, { + key: "map", + value: function map(callback, options) { + if (this._data) { + var defaultFilter = this._options.filter; + var optionsFilter = options && options.filter; + var filter; + + if (optionsFilter) { + if (defaultFilter) { + filter = function filter(item) { + return defaultFilter(item) && optionsFilter(item); + }; + } else { + filter = optionsFilter; + } + } else { + filter = defaultFilter; + } + + return this._data.map(callback, { + filter: filter, + order: options && options.order + }); + } else { + return []; + } + } + /** @inheritdoc */ + + }, { + key: "getDataSet", + value: function getDataSet() { + return this._data.getDataSet(); + } + /** + * Event listener. Will propagate all events from the connected data set to the subscribers of the DataView, but will filter the items and only trigger when there are changes in the filtered data set. + * + * @param event - The name of the event. + * @param params - Parameters of the event. + * @param senderId - Id supplied by the sender. + */ + + }, { + key: "_onEvent", + value: function _onEvent(event, params, senderId) { + if (!params || !params.items || !this._data) { + return; + } + + var ids = params.items; + var addedIds = []; + var updatedIds = []; + var removedIds = []; + var oldItems = []; + var updatedItems = []; + var removedItems = []; + + switch (event) { + case 'add': + // filter the ids of the added items + for (var i = 0, len = ids.length; i < len; i++) { + var id = ids[i]; + var item = this.get(id); + + if (item) { + this._ids[id] = true; + addedIds.push(id); + } + } + + break; + + case 'update': + // determine the event from the views viewpoint: an updated + // item can be added, updated, or removed from this view. + for (var _i2 = 0, _len2 = ids.length; _i2 < _len2; _i2++) { + var _id2 = ids[_i2]; + + var _item = this.get(_id2); + + if (_item) { + if (this._ids[_id2]) { + updatedIds.push(_id2); + updatedItems.push(params.data[_i2]); + oldItems.push(params.oldData[_i2]); + } else { + this._ids[_id2] = true; + addedIds.push(_id2); + } + } else { + if (this._ids[_id2]) { + delete this._ids[_id2]; + removedIds.push(_id2); + removedItems.push(params.oldData[_i2]); + } + } + } + + break; + + case 'remove': + // filter the ids of the removed items + for (var _i3 = 0, _len3 = ids.length; _i3 < _len3; _i3++) { + var _id3 = ids[_i3]; + + if (this._ids[_id3]) { + delete this._ids[_id3]; + removedIds.push(_id3); + removedItems.push(params.oldData[_i3]); + } + } + + break; + } + + this.length += addedIds.length - removedIds.length; + + if (addedIds.length) { + this._trigger('add', { + items: addedIds + }, senderId); + } + + if (updatedIds.length) { + this._trigger('update', { + items: updatedIds, + oldData: oldItems, + data: updatedItems + }, senderId); + } + + if (removedIds.length) { + this._trigger('remove', { + items: removedIds, + oldData: removedItems + }, senderId); + } + } + }]); + return DataView; + }(DataSetPart); + + var index = { + DataSet: DataSet, + DataView: DataView, + Queue: Queue + }; + + var esm$1 = /*#__PURE__*/Object.freeze({ + 'default': index, + DataSet: DataSet, + DataView: DataView, + Queue: Queue + }); + + /** + * Canvas shapes used by Network + */ + if (typeof CanvasRenderingContext2D !== 'undefined') { + /** + * Draw a circle shape + * + * @param {number} x + * @param {number} y + * @param {number} r + */ + CanvasRenderingContext2D.prototype.circle = function (x, y, r) { + this.beginPath(); + this.arc(x, y, r, 0, 2 * Math.PI, false); + this.closePath(); + }; + /** + * Draw a square shape + * @param {number} x horizontal center + * @param {number} y vertical center + * @param {number} r size, width and height of the square + */ + + + CanvasRenderingContext2D.prototype.square = function (x, y, r) { + this.beginPath(); + this.rect(x - r, y - r, r * 2, r * 2); + this.closePath(); + }; + /** + * Draw a triangle shape + * @param {number} x horizontal center + * @param {number} y vertical center + * @param {number} r radius, half the length of the sides of the triangle + */ + + + CanvasRenderingContext2D.prototype.triangle = function (x, y, r) { + // http://en.wikipedia.org/wiki/Equilateral_triangle + this.beginPath(); // the change in radius and the offset is here to center the shape + + r *= 1.15; + y += 0.275 * r; + var s = r * 2; + var s2 = s / 2; + var ir = Math.sqrt(3) / 6 * s; // radius of inner circle + + var h = Math.sqrt(s * s - s2 * s2); // height + + this.moveTo(x, y - (h - ir)); + this.lineTo(x + s2, y + ir); + this.lineTo(x - s2, y + ir); + this.lineTo(x, y - (h - ir)); + this.closePath(); + }; + /** + * Draw a triangle shape in downward orientation + * @param {number} x horizontal center + * @param {number} y vertical center + * @param {number} r radius + */ + + + CanvasRenderingContext2D.prototype.triangleDown = function (x, y, r) { + // http://en.wikipedia.org/wiki/Equilateral_triangle + this.beginPath(); // the change in radius and the offset is here to center the shape + + r *= 1.15; + y -= 0.275 * r; + var s = r * 2; + var s2 = s / 2; + var ir = Math.sqrt(3) / 6 * s; // radius of inner circle + + var h = Math.sqrt(s * s - s2 * s2); // height + + this.moveTo(x, y + (h - ir)); + this.lineTo(x + s2, y - ir); + this.lineTo(x - s2, y - ir); + this.lineTo(x, y + (h - ir)); + this.closePath(); + }; + /** + * Draw a star shape, a star with 5 points + * @param {number} x horizontal center + * @param {number} y vertical center + * @param {number} r radius, half the length of the sides of the triangle + */ + + + CanvasRenderingContext2D.prototype.star = function (x, y, r) { + // http://www.html5canvastutorials.com/labs/html5-canvas-star-spinner/ + this.beginPath(); // the change in radius and the offset is here to center the shape + + r *= 0.82; + y += 0.1 * r; + + for (var n = 0; n < 10; n++) { + var radius = n % 2 === 0 ? r * 1.3 : r * 0.5; + this.lineTo(x + radius * Math.sin(n * 2 * Math.PI / 10), y - radius * Math.cos(n * 2 * Math.PI / 10)); + } + + this.closePath(); + }; + /** + * Draw a Diamond shape + * @param {number} x horizontal center + * @param {number} y vertical center + * @param {number} r radius, half the length of the sides of the triangle + */ + + + CanvasRenderingContext2D.prototype.diamond = function (x, y, r) { + // http://www.html5canvastutorials.com/labs/html5-canvas-star-spinner/ + this.beginPath(); + this.lineTo(x, y + r); + this.lineTo(x + r, y); + this.lineTo(x, y - r); + this.lineTo(x - r, y); + this.closePath(); + }; + /** + * http://stackoverflow.com/questions/1255512/how-to-draw-a-rounded-rectangle-on-html-canvas + * + * @param {number} x + * @param {number} y + * @param {number} w + * @param {number} h + * @param {number} r + */ + + + CanvasRenderingContext2D.prototype.roundRect = function (x, y, w, h, r) { + var r2d = Math.PI / 180; + + if (w - 2 * r < 0) { + r = w / 2; + } //ensure that the radius isn't too large for x + + + if (h - 2 * r < 0) { + r = h / 2; + } //ensure that the radius isn't too large for y + + + this.beginPath(); + this.moveTo(x + r, y); + this.lineTo(x + w - r, y); + this.arc(x + w - r, y + r, r, r2d * 270, r2d * 360, false); + this.lineTo(x + w, y + h - r); + this.arc(x + w - r, y + h - r, r, 0, r2d * 90, false); + this.lineTo(x + r, y + h); + this.arc(x + r, y + h - r, r, r2d * 90, r2d * 180, false); + this.lineTo(x, y + r); + this.arc(x + r, y + r, r, r2d * 180, r2d * 270, false); + this.closePath(); + }; + /** + * http://stackoverflow.com/questions/2172798/how-to-draw-an-oval-in-html5-canvas + * + * Postfix '_vis' added to discern it from standard method ellipse(). + * + * @param {number} x + * @param {number} y + * @param {number} w + * @param {number} h + */ + + + CanvasRenderingContext2D.prototype.ellipse_vis = function (x, y, w, h) { + var kappa = .5522848, + ox = w / 2 * kappa, + // control point offset horizontal + oy = h / 2 * kappa, + // control point offset vertical + xe = x + w, + // x-end + ye = y + h, + // y-end + xm = x + w / 2, + // x-middle + ym = y + h / 2; // y-middle + + this.beginPath(); + this.moveTo(x, ym); + this.bezierCurveTo(x, ym - oy, xm - ox, y, xm, y); + this.bezierCurveTo(xm + ox, y, xe, ym - oy, xe, ym); + this.bezierCurveTo(xe, ym + oy, xm + ox, ye, xm, ye); + this.bezierCurveTo(xm - ox, ye, x, ym + oy, x, ym); + this.closePath(); + }; + /** + * http://stackoverflow.com/questions/2172798/how-to-draw-an-oval-in-html5-canvas + * + * @param {number} x + * @param {number} y + * @param {number} w + * @param {number} h + */ + + + CanvasRenderingContext2D.prototype.database = function (x, y, w, h) { + var f = 1 / 3; + var wEllipse = w; + var hEllipse = h * f; + var kappa = .5522848, + ox = wEllipse / 2 * kappa, + // control point offset horizontal + oy = hEllipse / 2 * kappa, + // control point offset vertical + xe = x + wEllipse, + // x-end + ye = y + hEllipse, + // y-end + xm = x + wEllipse / 2, + // x-middle + ym = y + hEllipse / 2, + // y-middle + ymb = y + (h - hEllipse / 2), + // y-midlle, bottom ellipse + yeb = y + h; // y-end, bottom ellipse + + this.beginPath(); + this.moveTo(xe, ym); + this.bezierCurveTo(xe, ym + oy, xm + ox, ye, xm, ye); + this.bezierCurveTo(xm - ox, ye, x, ym + oy, x, ym); + this.bezierCurveTo(x, ym - oy, xm - ox, y, xm, y); + this.bezierCurveTo(xm + ox, y, xe, ym - oy, xe, ym); + this.lineTo(xe, ymb); + this.bezierCurveTo(xe, ymb + oy, xm + ox, yeb, xm, yeb); + this.bezierCurveTo(xm - ox, yeb, x, ymb + oy, x, ymb); + this.lineTo(x, ym); + }; + /** + * Sets up the dashedLine functionality for drawing + * Original code came from http://stackoverflow.com/questions/4576724/dotted-stroke-in-canvas + * @author David Jordan + * @date 2012-08-08 + * + * @param {number} x + * @param {number} y + * @param {number} x2 + * @param {number} y2 + * @param {string} pattern + */ + + + CanvasRenderingContext2D.prototype.dashedLine = function (x, y, x2, y2, pattern) { + this.beginPath(); + this.moveTo(x, y); + var patternLength = pattern.length; + var dx = x2 - x; + var dy = y2 - y; + var slope = dy / dx; + var distRemaining = Math.sqrt(dx * dx + dy * dy); + var patternIndex = 0; + var draw = true; + var xStep = 0; + var dashLength = pattern[0]; + + while (distRemaining >= 0.1) { + dashLength = pattern[patternIndex++ % patternLength]; + + if (dashLength > distRemaining) { + dashLength = distRemaining; + } + + xStep = Math.sqrt(dashLength * dashLength / (1 + slope * slope)); + xStep = dx < 0 ? -xStep : xStep; + x += xStep; + y += slope * xStep; + + if (draw === true) { + this.lineTo(x, y); + } else { + this.moveTo(x, y); + } + + distRemaining -= dashLength; + draw = !draw; + } + }; + /** + * Draw a Hexagon shape with 6 sides + * @param {Number} x horizontal center + * @param {Number} y vertical center + * @param {Number} r radius + */ + + + CanvasRenderingContext2D.prototype.hexagon = function (x, y, r) { + this.beginPath(); + var sides = 6; + var a = Math.PI * 2 / sides; + this.moveTo(x + r, y); + + for (var i = 1; i < sides; i++) { + this.lineTo(x + r * Math.cos(a * i), y + r * Math.sin(a * i)); + } + + this.closePath(); + }; + } + + var commonjsGlobal$2 = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; + + function commonjsRequire$2 () { + throw new Error('Dynamic requires are not currently supported by rollup-plugin-commonjs'); + } + + function unwrapExports (x) { + return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x; + } + + function createCommonjsModule$2(fn, module) { + return module = { exports: {} }, fn(module, module.exports), module.exports; + } + + function getCjsExportFromNamespace (n) { + return n && n['default'] || n; + } + + var componentEmitter = createCommonjsModule$2(function (module) { + /** + * Expose `Emitter`. + */ + { + module.exports = Emitter; + } + /** + * Initialize a new `Emitter`. + * + * @api public + */ + + + function Emitter(obj) { + if (obj) return mixin(obj); + } + /** + * Mixin the emitter properties. + * + * @param {Object} obj + * @return {Object} + * @api private + */ + + function mixin(obj) { + for (var key in Emitter.prototype) { + obj[key] = Emitter.prototype[key]; + } + + return obj; + } + /** + * Listen on the given `event` with `fn`. + * + * @param {String} event + * @param {Function} fn + * @return {Emitter} + * @api public + */ + + + Emitter.prototype.on = Emitter.prototype.addEventListener = function (event, fn) { + this._callbacks = this._callbacks || {}; + (this._callbacks['$' + event] = this._callbacks['$' + event] || []).push(fn); + return this; + }; + /** + * Adds an `event` listener that will be invoked a single + * time then automatically removed. + * + * @param {String} event + * @param {Function} fn + * @return {Emitter} + * @api public + */ + + + Emitter.prototype.once = function (event, fn) { + function on() { + this.off(event, on); + fn.apply(this, arguments); + } + + on.fn = fn; + this.on(event, on); + return this; + }; + /** + * Remove the given callback for `event` or all + * registered callbacks. + * + * @param {String} event + * @param {Function} fn + * @return {Emitter} + * @api public + */ + + + Emitter.prototype.off = Emitter.prototype.removeListener = Emitter.prototype.removeAllListeners = Emitter.prototype.removeEventListener = function (event, fn) { + this._callbacks = this._callbacks || {}; // all + + if (0 == arguments.length) { + this._callbacks = {}; + return this; + } // specific event + + + var callbacks = this._callbacks['$' + event]; + if (!callbacks) return this; // remove all handlers + + if (1 == arguments.length) { + delete this._callbacks['$' + event]; + return this; + } // remove specific handler + + + var cb; + + for (var i = 0; i < callbacks.length; i++) { + cb = callbacks[i]; + + if (cb === fn || cb.fn === fn) { + callbacks.splice(i, 1); + break; + } + } // Remove event specific arrays for event types that no + // one is subscribed for to avoid memory leak. + + + if (callbacks.length === 0) { + delete this._callbacks['$' + event]; + } + + return this; + }; + /** + * Emit `event` with the given args. + * + * @param {String} event + * @param {Mixed} ... + * @return {Emitter} + */ + + + Emitter.prototype.emit = function (event) { + this._callbacks = this._callbacks || {}; + var args = new Array(arguments.length - 1), + callbacks = this._callbacks['$' + event]; + + for (var i = 1; i < arguments.length; i++) { + args[i - 1] = arguments[i]; + } + + if (callbacks) { + callbacks = callbacks.slice(0); + + for (var i = 0, len = callbacks.length; i < len; ++i) { + callbacks[i].apply(this, args); + } + } + + return this; + }; + /** + * Return array of callbacks for `event`. + * + * @param {String} event + * @return {Array} + * @api public + */ + + + Emitter.prototype.listeners = function (event) { + this._callbacks = this._callbacks || {}; + return this._callbacks['$' + event] || []; + }; + /** + * Check if this emitter has `event` handlers. + * + * @param {String} event + * @return {Boolean} + * @api public + */ + + + Emitter.prototype.hasListeners = function (event) { + return !!this.listeners(event).length; + }; + }); + + /** + * Parse a text source containing data in DOT language into a JSON object. + * The object contains two lists: one with nodes and one with edges. + * + * DOT language reference: http://www.graphviz.org/doc/info/lang.html + * + * DOT language attributes: http://graphviz.org/content/attrs + * + * @param {string} data Text containing a graph in DOT-notation + * @return {Object} graph An object containing two parameters: + * {Object[]} nodes + * {Object[]} edges + * + * ------------------------------------------- + * TODO + * ==== + * + * For label handling, this is an incomplete implementation. From docs (quote #3015): + * + * > the escape sequences "\n", "\l" and "\r" divide the label into lines, centered, + * > left-justified, and right-justified, respectively. + * + * Source: http://www.graphviz.org/content/attrs#kescString + * + * > As another aid for readability, dot allows double-quoted strings to span multiple physical + * > lines using the standard C convention of a backslash immediately preceding a newline + * > character + * > In addition, double-quoted strings can be concatenated using a '+' operator. + * > As HTML strings can contain newline characters, which are used solely for formatting, + * > the language does not allow escaped newlines or concatenation operators to be used + * > within them. + * + * - Currently, only '\\n' is handled + * - Note that text explicitly says 'labels'; the dot parser currently handles escape + * sequences in **all** strings. + */ + function parseDOT(data) { + dot = data; + return parseGraph(); + } // mapping of attributes from DOT (the keys) to vis.js (the values) + + + var NODE_ATTR_MAPPING = { + 'fontsize': 'font.size', + 'fontcolor': 'font.color', + 'labelfontcolor': 'font.color', + 'fontname': 'font.face', + 'color': ['color.border', 'color.background'], + 'fillcolor': 'color.background', + 'tooltip': 'title', + 'labeltooltip': 'title' + }; + var EDGE_ATTR_MAPPING = Object.create(NODE_ATTR_MAPPING); + EDGE_ATTR_MAPPING.color = 'color.color'; + EDGE_ATTR_MAPPING.style = 'dashes'; // token types enumeration + + var TOKENTYPE = { + NULL: 0, + DELIMITER: 1, + IDENTIFIER: 2, + UNKNOWN: 3 + }; // map with all delimiters + + var DELIMITERS = { + '{': true, + '}': true, + '[': true, + ']': true, + ';': true, + '=': true, + ',': true, + '->': true, + '--': true + }; + var dot = ''; // current dot file + + var index$1 = 0; // current index in dot file + + var c = ''; // current token character in expr + + var token = ''; // current token + + var tokenType = TOKENTYPE.NULL; // type of the token + + /** + * Get the first character from the dot file. + * The character is stored into the char c. If the end of the dot file is + * reached, the function puts an empty string in c. + */ + + function first() { + index$1 = 0; + c = dot.charAt(0); + } + /** + * Get the next character from the dot file. + * The character is stored into the char c. If the end of the dot file is + * reached, the function puts an empty string in c. + */ + + + function next() { + index$1++; + c = dot.charAt(index$1); + } + /** + * Preview the next character from the dot file. + * @return {string} cNext + */ + + + function nextPreview() { + return dot.charAt(index$1 + 1); + } + + var regexAlphaNumeric = /[a-zA-Z_0-9.:#]/; + /** + * Test whether given character is alphabetic or numeric + * @param {string} c + * @return {Boolean} isAlphaNumeric + */ + + function isAlphaNumeric(c) { + return regexAlphaNumeric.test(c); + } + /** + * Merge all options of object b into object b + * @param {Object} a + * @param {Object} b + * @return {Object} a + */ + + + function merge(a, b) { + if (!a) { + a = {}; + } + + if (b) { + for (var name in b) { + if (b.hasOwnProperty(name)) { + a[name] = b[name]; + } + } + } + + return a; + } + /** + * Set a value in an object, where the provided parameter name can be a + * path with nested parameters. For example: + * + * var obj = {a: 2}; + * setValue(obj, 'b.c', 3); // obj = {a: 2, b: {c: 3}} + * + * @param {Object} obj + * @param {string} path A parameter name or dot-separated parameter path, + * like "color.highlight.border". + * @param {*} value + */ + + + function setValue(obj, path, value) { + var keys = path.split('.'); + var o = obj; + + while (keys.length) { + var key = keys.shift(); + + if (keys.length) { + // this isn't the end point + if (!o[key]) { + o[key] = {}; + } + + o = o[key]; + } else { + // this is the end point + o[key] = value; + } + } + } + /** + * Add a node to a graph object. If there is already a node with + * the same id, their attributes will be merged. + * @param {Object} graph + * @param {Object} node + */ + + + function addNode(graph, node) { + var i, len; + var current = null; // find root graph (in case of subgraph) + + var graphs = [graph]; // list with all graphs from current graph to root graph + + var root = graph; + + while (root.parent) { + graphs.push(root.parent); + root = root.parent; + } // find existing node (at root level) by its id + + + if (root.nodes) { + for (i = 0, len = root.nodes.length; i < len; i++) { + if (node.id === root.nodes[i].id) { + current = root.nodes[i]; + break; + } + } + } + + if (!current) { + // this is a new node + current = { + id: node.id + }; + + if (graph.node) { + // clone default attributes + current.attr = merge(current.attr, graph.node); + } + } // add node to this (sub)graph and all its parent graphs + + + for (i = graphs.length - 1; i >= 0; i--) { + var g = graphs[i]; + + if (!g.nodes) { + g.nodes = []; + } + + if (g.nodes.indexOf(current) === -1) { + g.nodes.push(current); + } + } // merge attributes + + + if (node.attr) { + current.attr = merge(current.attr, node.attr); + } + } + /** + * Add an edge to a graph object + * @param {Object} graph + * @param {Object} edge + */ + + + function addEdge(graph, edge) { + if (!graph.edges) { + graph.edges = []; + } + + graph.edges.push(edge); + + if (graph.edge) { + var attr = merge({}, graph.edge); // clone default attributes + + edge.attr = merge(attr, edge.attr); // merge attributes + } + } + /** + * Create an edge to a graph object + * @param {Object} graph + * @param {string | number | Object} from + * @param {string | number | Object} to + * @param {string} type + * @param {Object | null} attr + * @return {Object} edge + */ + + + function createEdge(graph, from, to, type, attr) { + var edge = { + from: from, + to: to, + type: type + }; + + if (graph.edge) { + edge.attr = merge({}, graph.edge); // clone default attributes + } + + edge.attr = merge(edge.attr || {}, attr); // merge attributes + // Move arrows attribute from attr to edge temporally created in + // parseAttributeList(). + + if (attr != null) { + if (attr.hasOwnProperty('arrows') && attr['arrows'] != null) { + edge['arrows'] = { + to: { + enabled: true, + type: attr.arrows.type + } + }; + attr['arrows'] = null; + } + } + + return edge; + } + /** + * Get next token in the current dot file. + * The token and token type are available as token and tokenType + */ + + + function getToken() { + tokenType = TOKENTYPE.NULL; + token = ''; // skip over whitespaces + + while (c === ' ' || c === '\t' || c === '\n' || c === '\r') { + // space, tab, enter + next(); + } + + do { + var isComment = false; // skip comment + + if (c === '#') { + // find the previous non-space character + var i = index$1 - 1; + + while (dot.charAt(i) === ' ' || dot.charAt(i) === '\t') { + i--; + } + + if (dot.charAt(i) === '\n' || dot.charAt(i) === '') { + // the # is at the start of a line, this is indeed a line comment + while (c != '' && c != '\n') { + next(); + } + + isComment = true; + } + } + + if (c === '/' && nextPreview() === '/') { + // skip line comment + while (c != '' && c != '\n') { + next(); + } + + isComment = true; + } + + if (c === '/' && nextPreview() === '*') { + // skip block comment + while (c != '') { + if (c === '*' && nextPreview() === '/') { + // end of block comment found. skip these last two characters + next(); + next(); + break; + } else { + next(); + } + } + + isComment = true; + } // skip over whitespaces + + + while (c === ' ' || c === '\t' || c === '\n' || c === '\r') { + // space, tab, enter + next(); + } + } while (isComment); // check for end of dot file + + + if (c === '') { + // token is still empty + tokenType = TOKENTYPE.DELIMITER; + return; + } // check for delimiters consisting of 2 characters + + + var c2 = c + nextPreview(); + + if (DELIMITERS[c2]) { + tokenType = TOKENTYPE.DELIMITER; + token = c2; + next(); + next(); + return; + } // check for delimiters consisting of 1 character + + + if (DELIMITERS[c]) { + tokenType = TOKENTYPE.DELIMITER; + token = c; + next(); + return; + } // check for an identifier (number or string) + // TODO: more precise parsing of numbers/strings (and the port separator ':') + + + if (isAlphaNumeric(c) || c === '-') { + token += c; + next(); + + while (isAlphaNumeric(c)) { + token += c; + next(); + } + + if (token === 'false') { + token = false; // convert to boolean + } else if (token === 'true') { + token = true; // convert to boolean + } else if (!isNaN(Number(token))) { + token = Number(token); // convert to number + } + + tokenType = TOKENTYPE.IDENTIFIER; + return; + } // check for a string enclosed by double quotes + + + if (c === '"') { + next(); + + while (c != '' && (c != '"' || c === '"' && nextPreview() === '"')) { + if (c === '"') { + // skip the escape character + token += c; + next(); + } else if (c === '\\' && nextPreview() === 'n') { + // Honor a newline escape sequence + token += '\n'; + next(); + } else { + token += c; + } + + next(); + } + + if (c != '"') { + throw newSyntaxError('End of string " expected'); + } + + next(); + tokenType = TOKENTYPE.IDENTIFIER; + return; + } // something unknown is found, wrong characters, a syntax error + + + tokenType = TOKENTYPE.UNKNOWN; + + while (c != '') { + token += c; + next(); + } + + throw new SyntaxError('Syntax error in part "' + chop(token, 30) + '"'); + } + /** + * Parse a graph. + * @returns {Object} graph + */ + + + function parseGraph() { + var graph = {}; + first(); + getToken(); // optional strict keyword + + if (token === 'strict') { + graph.strict = true; + getToken(); + } // graph or digraph keyword + + + if (token === 'graph' || token === 'digraph') { + graph.type = token; + getToken(); + } // optional graph id + + + if (tokenType === TOKENTYPE.IDENTIFIER) { + graph.id = token; + getToken(); + } // open angle bracket + + + if (token != '{') { + throw newSyntaxError('Angle bracket { expected'); + } + + getToken(); // statements + + parseStatements(graph); // close angle bracket + + if (token != '}') { + throw newSyntaxError('Angle bracket } expected'); + } + + getToken(); // end of file + + if (token !== '') { + throw newSyntaxError('End of file expected'); + } + + getToken(); // remove temporary default options + + delete graph.node; + delete graph.edge; + delete graph.graph; + return graph; + } + /** + * Parse a list with statements. + * @param {Object} graph + */ + + + function parseStatements(graph) { + while (token !== '' && token != '}') { + parseStatement(graph); + + if (token === ';') { + getToken(); + } + } + } + /** + * Parse a single statement. Can be a an attribute statement, node + * statement, a series of node statements and edge statements, or a + * parameter. + * @param {Object} graph + */ + + + function parseStatement(graph) { + // parse subgraph + var subgraph = parseSubgraph(graph); + + if (subgraph) { + // edge statements + parseEdge(graph, subgraph); + return; + } // parse an attribute statement + + + var attr = parseAttributeStatement(graph); + + if (attr) { + return; + } // parse node + + + if (tokenType != TOKENTYPE.IDENTIFIER) { + throw newSyntaxError('Identifier expected'); + } + + var id = token; // id can be a string or a number + + getToken(); + + if (token === '=') { + // id statement + getToken(); + + if (tokenType != TOKENTYPE.IDENTIFIER) { + throw newSyntaxError('Identifier expected'); + } + + graph[id] = token; + getToken(); // TODO: implement comma separated list with "a_list: ID=ID [','] [a_list] " + } else { + parseNodeStatement(graph, id); + } + } + /** + * Parse a subgraph + * @param {Object} graph parent graph object + * @return {Object | null} subgraph + */ + + + function parseSubgraph(graph) { + var subgraph = null; // optional subgraph keyword + + if (token === 'subgraph') { + subgraph = {}; + subgraph.type = 'subgraph'; + getToken(); // optional graph id + + if (tokenType === TOKENTYPE.IDENTIFIER) { + subgraph.id = token; + getToken(); + } + } // open angle bracket + + + if (token === '{') { + getToken(); + + if (!subgraph) { + subgraph = {}; + } + + subgraph.parent = graph; + subgraph.node = graph.node; + subgraph.edge = graph.edge; + subgraph.graph = graph.graph; // statements + + parseStatements(subgraph); // close angle bracket + + if (token != '}') { + throw newSyntaxError('Angle bracket } expected'); + } + + getToken(); // remove temporary default options + + delete subgraph.node; + delete subgraph.edge; + delete subgraph.graph; + delete subgraph.parent; // register at the parent graph + + if (!graph.subgraphs) { + graph.subgraphs = []; + } + + graph.subgraphs.push(subgraph); + } + + return subgraph; + } + /** + * parse an attribute statement like "node [shape=circle fontSize=16]". + * Available keywords are 'node', 'edge', 'graph'. + * The previous list with default attributes will be replaced + * @param {Object} graph + * @returns {String | null} keyword Returns the name of the parsed attribute + * (node, edge, graph), or null if nothing + * is parsed. + */ + + + function parseAttributeStatement(graph) { + // attribute statements + if (token === 'node') { + getToken(); // node attributes + + graph.node = parseAttributeList(); + return 'node'; + } else if (token === 'edge') { + getToken(); // edge attributes + + graph.edge = parseAttributeList(); + return 'edge'; + } else if (token === 'graph') { + getToken(); // graph attributes + + graph.graph = parseAttributeList(); + return 'graph'; + } + + return null; + } + /** + * parse a node statement + * @param {Object} graph + * @param {string | number} id + */ + + + function parseNodeStatement(graph, id) { + // node statement + var node = { + id: id + }; + var attr = parseAttributeList(); + + if (attr) { + node.attr = attr; + } + + addNode(graph, node); // edge statements + + parseEdge(graph, id); + } + /** + * Parse an edge or a series of edges + * @param {Object} graph + * @param {string | number} from Id of the from node + */ + + + function parseEdge(graph, from) { + while (token === '->' || token === '--') { + var to; + var type = token; + getToken(); + var subgraph = parseSubgraph(graph); + + if (subgraph) { + to = subgraph; + } else { + if (tokenType != TOKENTYPE.IDENTIFIER) { + throw newSyntaxError('Identifier or subgraph expected'); + } + + to = token; + addNode(graph, { + id: to + }); + getToken(); + } // parse edge attributes + + + var attr = parseAttributeList(); // create edge + + var edge = createEdge(graph, from, to, type, attr); + addEdge(graph, edge); + from = to; + } + } + /** + * Parse a set with attributes, + * for example [label="1.000", shape=solid] + * @return {Object | null} attr + */ + + + function parseAttributeList() { + var i; + var attr = null; // edge styles of dot and vis + + var edgeStyles = { + 'dashed': true, + 'solid': false, + 'dotted': [1, 5] + }; + /** + * Define arrow types. + * vis currently supports types defined in 'arrowTypes'. + * Details of arrow shapes are described in + * http://www.graphviz.org/content/arrow-shapes + */ + + var arrowTypes = { + dot: 'circle', + box: 'box', + crow: 'crow', + curve: 'curve', + icurve: 'inv_curve', + normal: 'triangle', + inv: 'inv_triangle', + diamond: 'diamond', + tee: 'bar', + vee: 'vee' + }; + /** + * 'attr_list' contains attributes for checking if some of them are affected + * later. For instance, both of 'arrowhead' and 'dir' (edge style defined + * in DOT) make changes to 'arrows' attribute in vis. + */ + + var attr_list = new Array(); + var attr_names = new Array(); // used for checking the case. + // parse attributes + + while (token === '[') { + getToken(); + attr = {}; + + while (token !== '' && token != ']') { + if (tokenType != TOKENTYPE.IDENTIFIER) { + throw newSyntaxError('Attribute name expected'); + } + + var name = token; + getToken(); + + if (token != '=') { + throw newSyntaxError('Equal sign = expected'); + } + + getToken(); + + if (tokenType != TOKENTYPE.IDENTIFIER) { + throw newSyntaxError('Attribute value expected'); + } + + var value = token; // convert from dot style to vis + + if (name === 'style') { + value = edgeStyles[value]; + } + + var arrowType; + + if (name === 'arrowhead') { + arrowType = arrowTypes[value]; + name = 'arrows'; + value = { + 'to': { + 'enabled': true, + 'type': arrowType + } + }; + } + + if (name === 'arrowtail') { + arrowType = arrowTypes[value]; + name = 'arrows'; + value = { + 'from': { + 'enabled': true, + 'type': arrowType + } + }; + } + + attr_list.push({ + 'attr': attr, + 'name': name, + 'value': value + }); + attr_names.push(name); + getToken(); + + if (token == ',') { + getToken(); + } + } + + if (token != ']') { + throw newSyntaxError('Bracket ] expected'); + } + + getToken(); + } + /** + * As explained in [1], graphviz has limitations for combination of + * arrow[head|tail] and dir. If attribute list includes 'dir', + * following cases just be supported. + * 1. both or none + arrowhead, arrowtail + * 2. forward + arrowhead (arrowtail is not affedted) + * 3. back + arrowtail (arrowhead is not affected) + * [1] https://www.graphviz.org/doc/info/attrs.html#h:undir_note + */ + + + if (attr_names.includes('dir')) { + var idx = {}; // get index of 'arrows' and 'dir' + + idx.arrows = {}; + + for (i = 0; i < attr_list.length; i++) { + if (attr_list[i].name === 'arrows') { + if (attr_list[i].value.to != null) { + idx.arrows.to = i; + } else if (attr_list[i].value.from != null) { + idx.arrows.from = i; + } else { + throw newSyntaxError('Invalid value of arrows'); + } + } else if (attr_list[i].name === 'dir') { + idx.dir = i; + } + } // first, add default arrow shape if it is not assigned to avoid error + + + var dir_type = attr_list[idx.dir].value; + + if (!attr_names.includes('arrows')) { + if (dir_type === 'both') { + attr_list.push({ + 'attr': attr_list[idx.dir].attr, + 'name': 'arrows', + 'value': { + to: { + enabled: true + } + } + }); + idx.arrows.to = attr_list.length - 1; + attr_list.push({ + 'attr': attr_list[idx.dir].attr, + 'name': 'arrows', + 'value': { + from: { + enabled: true + } + } + }); + idx.arrows.from = attr_list.length - 1; + } else if (dir_type === 'forward') { + attr_list.push({ + 'attr': attr_list[idx.dir].attr, + 'name': 'arrows', + 'value': { + to: { + enabled: true + } + } + }); + idx.arrows.to = attr_list.length - 1; + } else if (dir_type === 'back') { + attr_list.push({ + 'attr': attr_list[idx.dir].attr, + 'name': 'arrows', + 'value': { + from: { + enabled: true + } + } + }); + idx.arrows.from = attr_list.length - 1; + } else if (dir_type === 'none') { + attr_list.push({ + 'attr': attr_list[idx.dir].attr, + 'name': 'arrows', + 'value': '' + }); + idx.arrows.to = attr_list.length - 1; + } else { + throw newSyntaxError('Invalid dir type "' + dir_type + '"'); + } + } + + var from_type; + var to_type; // update 'arrows' attribute from 'dir'. + + if (dir_type === 'both') { + // both of shapes of 'from' and 'to' are given + if (idx.arrows.to && idx.arrows.from) { + to_type = attr_list[idx.arrows.to].value.to.type; + from_type = attr_list[idx.arrows.from].value.from.type; + attr_list[idx.arrows.to] = { + 'attr': attr_list[idx.arrows.to].attr, + 'name': attr_list[idx.arrows.to].name, + 'value': { + to: { + enabled: true, + type: to_type + }, + from: { + enabled: true, + type: from_type + } + } + }; + attr_list.splice(idx.arrows.from, 1); // shape of 'to' is assigned and use default to 'from' + } else if (idx.arrows.to) { + to_type = attr_list[idx.arrows.to].value.to.type; + from_type = 'arrow'; + attr_list[idx.arrows.to] = { + 'attr': attr_list[idx.arrows.to].attr, + 'name': attr_list[idx.arrows.to].name, + 'value': { + to: { + enabled: true, + type: to_type + }, + from: { + enabled: true, + type: from_type + } + } + }; // only shape of 'from' is assigned and use default for 'to' + } else if (idx.arrows.from) { + to_type = 'arrow'; + from_type = attr_list[idx.arrows.from].value.from.type; + attr_list[idx.arrows.from] = { + 'attr': attr_list[idx.arrows.from].attr, + 'name': attr_list[idx.arrows.from].name, + 'value': { + to: { + enabled: true, + type: to_type + }, + from: { + enabled: true, + type: from_type + } + } + }; + } + } else if (dir_type === 'back') { + // given both of shapes, but use only 'from' + if (idx.arrows.to && idx.arrows.from) { + to_type = ''; + from_type = attr_list[idx.arrows.from].value.from.type; + attr_list[idx.arrows.from] = { + 'attr': attr_list[idx.arrows.from].attr, + 'name': attr_list[idx.arrows.from].name, + 'value': { + to: { + enabled: true, + type: to_type + }, + from: { + enabled: true, + type: from_type + } + } + }; // given shape of 'to', but does not use it + } else if (idx.arrows.to) { + to_type = ''; + from_type = 'arrow'; + idx.arrows.from = idx.arrows.to; + attr_list[idx.arrows.from] = { + 'attr': attr_list[idx.arrows.from].attr, + 'name': attr_list[idx.arrows.from].name, + 'value': { + to: { + enabled: true, + type: to_type + }, + from: { + enabled: true, + type: from_type + } + } + }; // assign given 'from' shape + } else if (idx.arrows.from) { + to_type = ''; + from_type = attr_list[idx.arrows.from].value.from.type; + attr_list[idx.arrows.to] = { + 'attr': attr_list[idx.arrows.from].attr, + 'name': attr_list[idx.arrows.from].name, + 'value': { + to: { + enabled: true, + type: to_type + }, + from: { + enabled: true, + type: from_type + } + } + }; + } + + attr_list[idx.arrows.from] = { + 'attr': attr_list[idx.arrows.from].attr, + 'name': attr_list[idx.arrows.from].name, + 'value': { + from: { + enabled: true, + type: attr_list[idx.arrows.from].value.from.type + } + } + }; + } else if (dir_type === 'none') { + var idx_arrow; + + if (idx.arrows.to) { + idx_arrow = idx.arrows.to; + } else { + idx_arrow = idx.arrows.from; + } + + attr_list[idx_arrow] = { + 'attr': attr_list[idx_arrow].attr, + 'name': attr_list[idx_arrow].name, + 'value': '' + }; + } else if (dir_type === 'forward') { + // given both of shapes, but use only 'to' + if (idx.arrows.to && idx.arrows.from) { + to_type = attr_list[idx.arrows.to].value.to.type; + from_type = ''; + attr_list[idx.arrows.to] = { + 'attr': attr_list[idx.arrows.to].attr, + 'name': attr_list[idx.arrows.to].name, + 'value': { + to: { + enabled: true, + type: to_type + }, + from: { + enabled: true, + type: from_type + } + } + }; // assign given 'to' shape + } else if (idx.arrows.to) { + to_type = attr_list[idx.arrows.to].value.to.type; + from_type = ''; + attr_list[idx.arrows.to] = { + 'attr': attr_list[idx.arrows.to].attr, + 'name': attr_list[idx.arrows.to].name, + 'value': { + to: { + enabled: true, + type: to_type + }, + from: { + enabled: true, + type: from_type + } + } + }; // given shape of 'from', but does not use it + } else if (idx.arrows.from) { + to_type = 'arrow'; + from_type = ''; + idx.arrows.to = idx.arrows.from; + attr_list[idx.arrows.to] = { + 'attr': attr_list[idx.arrows.to].attr, + 'name': attr_list[idx.arrows.to].name, + 'value': { + to: { + enabled: true, + type: to_type + }, + from: { + enabled: true, + type: from_type + } + } + }; + } + + attr_list[idx.arrows.to] = { + 'attr': attr_list[idx.arrows.to].attr, + 'name': attr_list[idx.arrows.to].name, + 'value': { + to: { + enabled: true, + type: attr_list[idx.arrows.to].value.to.type + } + } + }; + } else { + throw newSyntaxError('Invalid dir type "' + dir_type + '"'); + } // remove 'dir' attribute no need anymore + + + attr_list.splice(idx.dir, 1); + } // parse 'penwidth' + + + var nof_attr_list; + + if (attr_names.includes('penwidth')) { + var tmp_attr_list = []; + nof_attr_list = attr_list.length; + + for (i = 0; i < nof_attr_list; i++) { + // exclude 'width' from attr_list if 'penwidth' exists + if (attr_list[i].name !== 'width') { + if (attr_list[i].name === 'penwidth') { + attr_list[i].name = 'width'; + } + + tmp_attr_list.push(attr_list[i]); + } + } + + attr_list = tmp_attr_list; + } + + nof_attr_list = attr_list.length; + + for (i = 0; i < nof_attr_list; i++) { + setValue(attr_list[i].attr, attr_list[i].name, attr_list[i].value); + } + + return attr; + } + /** + * Create a syntax error with extra information on current token and index. + * @param {string} message + * @returns {SyntaxError} err + */ + + + function newSyntaxError(message) { + return new SyntaxError(message + ', got "' + chop(token, 30) + '" (char ' + index$1 + ')'); + } + /** + * Chop off text after a maximum length + * @param {string} text + * @param {number} maxLength + * @returns {String} + */ + + + function chop(text, maxLength) { + return text.length <= maxLength ? text : text.substr(0, 27) + '...'; + } + /** + * Execute a function fn for each pair of elements in two arrays + * @param {Array | *} array1 + * @param {Array | *} array2 + * @param {function} fn + */ + + + function forEach2(array1, array2, fn) { + if (Array.isArray(array1)) { + array1.forEach(function (elem1) { + if (Array.isArray(array2)) { + array2.forEach(function (elem2) { + fn(elem1, elem2); + }); + } else { + fn(elem1, array2); + } + }); + } else { + if (Array.isArray(array2)) { + array2.forEach(function (elem2) { + fn(array1, elem2); + }); + } else { + fn(array1, array2); + } + } + } + /** + * Set a nested property on an object + * When nested objects are missing, they will be created. + * For example setProp({}, 'font.color', 'red') will return {font: {color: 'red'}} + * @param {Object} object + * @param {string} path A dot separated string like 'font.color' + * @param {*} value Value for the property + * @return {Object} Returns the original object, allows for chaining. + */ + + + function setProp(object, path, value) { + var names = path.split('.'); + var prop = names.pop(); // traverse over the nested objects + + var obj = object; + + for (var i = 0; i < names.length; i++) { + var name = names[i]; + + if (!(name in obj)) { + obj[name] = {}; + } + + obj = obj[name]; + } // set the property value + + + obj[prop] = value; + return object; + } + /** + * Convert an object with DOT attributes to their vis.js equivalents. + * @param {Object} attr Object with DOT attributes + * @param {Object} mapping + * @return {Object} Returns an object with vis.js attributes + */ + + + function convertAttr(attr, mapping) { + var converted = {}; + + for (var prop in attr) { + if (attr.hasOwnProperty(prop)) { + var visProp = mapping[prop]; + + if (Array.isArray(visProp)) { + visProp.forEach(function (visPropI) { + setProp(converted, visPropI, attr[prop]); + }); + } else if (typeof visProp === 'string') { + setProp(converted, visProp, attr[prop]); + } else { + setProp(converted, prop, attr[prop]); + } + } + } + + return converted; + } + /** + * Convert a string containing a graph in DOT language into a map containing + * with nodes and edges in the format of graph. + * @param {string} data Text containing a graph in DOT-notation + * @return {Object} graphData + */ + + + function DOTToGraph(data) { + // parse the DOT file + var dotData = parseDOT(data); + var graphData = { + nodes: [], + edges: [], + options: {} + }; // copy the nodes + + if (dotData.nodes) { + dotData.nodes.forEach(function (dotNode) { + var graphNode = { + id: dotNode.id, + label: String(dotNode.label || dotNode.id) + }; + merge(graphNode, convertAttr(dotNode.attr, NODE_ATTR_MAPPING)); + + if (graphNode.image) { + graphNode.shape = 'image'; + } + + graphData.nodes.push(graphNode); + }); + } // copy the edges + + + if (dotData.edges) { + /** + * Convert an edge in DOT format to an edge with VisGraph format + * @param {Object} dotEdge + * @returns {Object} graphEdge + */ + var convertEdge = function convertEdge(dotEdge) { + var graphEdge = { + from: dotEdge.from, + to: dotEdge.to + }; + merge(graphEdge, convertAttr(dotEdge.attr, EDGE_ATTR_MAPPING)); // Add arrows attribute to default styled arrow. + // The reason why default style is not added in parseAttributeList() is + // because only default is cleared before here. + + if (graphEdge.arrows == null && dotEdge.type === '->') { + graphEdge.arrows = 'to'; + } + + return graphEdge; + }; + + dotData.edges.forEach(function (dotEdge) { + var from, to; + + if (dotEdge.from instanceof Object) { + from = dotEdge.from.nodes; + } else { + from = { + id: dotEdge.from + }; + } + + if (dotEdge.to instanceof Object) { + to = dotEdge.to.nodes; + } else { + to = { + id: dotEdge.to + }; + } + + if (dotEdge.from instanceof Object && dotEdge.from.edges) { + dotEdge.from.edges.forEach(function (subEdge) { + var graphEdge = convertEdge(subEdge); + graphData.edges.push(graphEdge); + }); + } + + forEach2(from, to, function (from, to) { + var subEdge = createEdge(graphData, from.id, to.id, dotEdge.type, dotEdge.attr); + var graphEdge = convertEdge(subEdge); + graphData.edges.push(graphEdge); + }); + + if (dotEdge.to instanceof Object && dotEdge.to.edges) { + dotEdge.to.edges.forEach(function (subEdge) { + var graphEdge = convertEdge(subEdge); + graphData.edges.push(graphEdge); + }); + } + }); + } // copy the options + + + if (dotData.attr) { + graphData.options = dotData.attr; + } + + return graphData; + } // exports + + + var parseDOT_1 = parseDOT; + var DOTToGraph_1 = DOTToGraph; + var dotparser = { + parseDOT: parseDOT_1, + DOTToGraph: DOTToGraph_1 + }; + + var dotparser$1 = /*#__PURE__*/Object.freeze({ + 'default': dotparser, + __moduleExports: dotparser, + parseDOT: parseDOT_1, + DOTToGraph: DOTToGraph_1 + }); + + /** + * Convert Gephi to Vis. + * + * @param gephiJSON - The parsed JSON data in Gephi format. + * @param optionsObj - Additional options. + * + * @returns The converted data ready to be used in Vis. + */ + function parseGephi(gephiJSON, optionsObj) { + var options = { + edges: { + inheritColor: false + }, + nodes: { + fixed: false, + parseColor: false + } + }; + + if (optionsObj != null) { + if (optionsObj.fixed != null) { + options.nodes.fixed = optionsObj.fixed; + } + + if (optionsObj.parseColor != null) { + options.nodes.parseColor = optionsObj.parseColor; + } + + if (optionsObj.inheritColor != null) { + options.edges.inheritColor = optionsObj.inheritColor; + } + } + + var gEdges = gephiJSON.edges; + var vEdges = gEdges.map(function (gEdge) { + var vEdge = { + from: gEdge.source, + id: gEdge.id, + to: gEdge.target + }; + + if (gEdge.attributes != null) { + vEdge.attributes = gEdge.attributes; + } + + if (gEdge.label != null) { + vEdge.label = gEdge.label; + } + + if (gEdge.attributes != null && gEdge.attributes.title != null) { + vEdge.title = gEdge.attributes.title; + } + + if (gEdge.type === 'Directed') { + vEdge.arrows = 'to'; + } // edge['value'] = gEdge.attributes != null ? gEdge.attributes.Weight : undefined; + // edge['width'] = edge['value'] != null ? undefined : edgegEdge.size; + + + if (gEdge.color && options.edges.inheritColor === false) { + vEdge.color = gEdge.color; + } + + return vEdge; + }); + var vNodes = gephiJSON.nodes.map(function (gNode) { + var vNode = { + id: gNode.id, + fixed: options.nodes.fixed && gNode.x != null && gNode.y != null + }; + + if (gNode.attributes != null) { + vNode.attributes = gNode.attributes; + } + + if (gNode.label != null) { + vNode.label = gNode.label; + } + + if (gNode.size != null) { + vNode.size = gNode.size; + } + + if (gNode.attributes != null && gNode.attributes.title != null) { + vNode.title = gNode.attributes.title; + } + + if (gNode.title != null) { + vNode.title = gNode.title; + } + + if (gNode.x != null) { + vNode.x = gNode.x; + } + + if (gNode.y != null) { + vNode.y = gNode.y; + } + + if (gNode.color != null) { + if (options.nodes.parseColor === true) { + vNode.color = gNode.color; + } else { + vNode.color = { + background: gNode.color, + border: gNode.color, + highlight: { + background: gNode.color, + border: gNode.color + }, + hover: { + background: gNode.color, + border: gNode.color + } + }; + } + } + + return vNode; + }); + return { + nodes: vNodes, + edges: vEdges + }; + } + + var gephiParser = /*#__PURE__*/Object.freeze({ + parseGephi: parseGephi + }); + + + + var Activator = /*#__PURE__*/Object.freeze({ + + }); + + var keycharm = createCommonjsModule$2(function (module, exports) { + /** + * Created by Alex on 11/6/2014. + */ + // https://github.com/umdjs/umd/blob/master/returnExports.js#L40-L60 + // if the module has no dependencies, the above pattern can be simplified to + + (function (root, factory) { + { + // Node. Does not work with strict CommonJS, but + // only CommonJS-like environments that support module.exports, + // like Node. + module.exports = factory(); + } + })(commonjsGlobal$2, function () { + function keycharm(options) { + var preventDefault = options && options.preventDefault || false; + var container = options && options.container || window; + var _exportFunctions = {}; + var _bound = { + keydown: {}, + keyup: {} + }; + var _keys = {}; + var i; // a - z + + for (i = 97; i <= 122; i++) { + _keys[String.fromCharCode(i)] = { + code: 65 + (i - 97), + shift: false + }; + } // A - Z + + + for (i = 65; i <= 90; i++) { + _keys[String.fromCharCode(i)] = { + code: i, + shift: true + }; + } // 0 - 9 + + + for (i = 0; i <= 9; i++) { + _keys['' + i] = { + code: 48 + i, + shift: false + }; + } // F1 - F12 + + + for (i = 1; i <= 12; i++) { + _keys['F' + i] = { + code: 111 + i, + shift: false + }; + } // num0 - num9 + + + for (i = 0; i <= 9; i++) { + _keys['num' + i] = { + code: 96 + i, + shift: false + }; + } // numpad misc + + + _keys['num*'] = { + code: 106, + shift: false + }; + _keys['num+'] = { + code: 107, + shift: false + }; + _keys['num-'] = { + code: 109, + shift: false + }; + _keys['num/'] = { + code: 111, + shift: false + }; + _keys['num.'] = { + code: 110, + shift: false + }; // arrows + + _keys['left'] = { + code: 37, + shift: false + }; + _keys['up'] = { + code: 38, + shift: false + }; + _keys['right'] = { + code: 39, + shift: false + }; + _keys['down'] = { + code: 40, + shift: false + }; // extra keys + + _keys['space'] = { + code: 32, + shift: false + }; + _keys['enter'] = { + code: 13, + shift: false + }; + _keys['shift'] = { + code: 16, + shift: undefined + }; + _keys['esc'] = { + code: 27, + shift: false + }; + _keys['backspace'] = { + code: 8, + shift: false + }; + _keys['tab'] = { + code: 9, + shift: false + }; + _keys['ctrl'] = { + code: 17, + shift: false + }; + _keys['alt'] = { + code: 18, + shift: false + }; + _keys['delete'] = { + code: 46, + shift: false + }; + _keys['pageup'] = { + code: 33, + shift: false + }; + _keys['pagedown'] = { + code: 34, + shift: false + }; // symbols + + _keys['='] = { + code: 187, + shift: false + }; + _keys['-'] = { + code: 189, + shift: false + }; + _keys[']'] = { + code: 221, + shift: false + }; + _keys['['] = { + code: 219, + shift: false + }; + + var down = function (event) { + handleEvent(event, 'keydown'); + }; + + var up = function (event) { + handleEvent(event, 'keyup'); + }; // handle the actualy bound key with the event + + + var handleEvent = function (event, type) { + if (_bound[type][event.keyCode] !== undefined) { + var bound = _bound[type][event.keyCode]; + + for (var i = 0; i < bound.length; i++) { + if (bound[i].shift === undefined) { + bound[i].fn(event); + } else if (bound[i].shift == true && event.shiftKey == true) { + bound[i].fn(event); + } else if (bound[i].shift == false && event.shiftKey == false) { + bound[i].fn(event); + } + } + + if (preventDefault == true) { + event.preventDefault(); + } + } + }; // bind a key to a callback + + + _exportFunctions.bind = function (key, callback, type) { + if (type === undefined) { + type = 'keydown'; + } + + if (_keys[key] === undefined) { + throw new Error("unsupported key: " + key); + } + + if (_bound[type][_keys[key].code] === undefined) { + _bound[type][_keys[key].code] = []; + } + + _bound[type][_keys[key].code].push({ + fn: callback, + shift: _keys[key].shift + }); + }; // bind all keys to a call back (demo purposes) + + + _exportFunctions.bindAll = function (callback, type) { + if (type === undefined) { + type = 'keydown'; + } + + for (var key in _keys) { + if (_keys.hasOwnProperty(key)) { + _exportFunctions.bind(key, callback, type); + } + } + }; // get the key label from an event + + + _exportFunctions.getKey = function (event) { + for (var key in _keys) { + if (_keys.hasOwnProperty(key)) { + if (event.shiftKey == true && _keys[key].shift == true && event.keyCode == _keys[key].code) { + return key; + } else if (event.shiftKey == false && _keys[key].shift == false && event.keyCode == _keys[key].code) { + return key; + } else if (event.keyCode == _keys[key].code && key == 'shift') { + return key; + } + } + } + + return "unknown key, currently not supported"; + }; // unbind either a specific callback from a key or all of them (by leaving callback undefined) + + + _exportFunctions.unbind = function (key, callback, type) { + if (type === undefined) { + type = 'keydown'; + } + + if (_keys[key] === undefined) { + throw new Error("unsupported key: " + key); + } + + if (callback !== undefined) { + var newBindings = []; + var bound = _bound[type][_keys[key].code]; + + if (bound !== undefined) { + for (var i = 0; i < bound.length; i++) { + if (!(bound[i].fn == callback && bound[i].shift == _keys[key].shift)) { + newBindings.push(_bound[type][_keys[key].code][i]); + } + } + } + + _bound[type][_keys[key].code] = newBindings; + } else { + _bound[type][_keys[key].code] = []; + } + }; // reset all bound variables. + + + _exportFunctions.reset = function () { + _bound = { + keydown: {}, + keyup: {} + }; + }; // unbind all listeners and reset all variables. + + + _exportFunctions.destroy = function () { + _bound = { + keydown: {}, + keyup: {} + }; + container.removeEventListener('keydown', down, true); + container.removeEventListener('keyup', up, true); + }; // create listeners. + + + container.addEventListener('keydown', down, true); + container.addEventListener('keyup', up, true); // return the public functions. + + return _exportFunctions; + } + + return keycharm; + }); + }); + + var keycharm$1 = /*#__PURE__*/Object.freeze({ + 'default': keycharm, + __moduleExports: keycharm + }); + + /*! Hammer.JS - v2.0.15 - 2019-04-04 + * http://naver.github.io/egjs + * + * Forked By Naver egjs + * Copyright (c) hammerjs + * Licensed under the MIT license */ + function _extends() { + _extends = Object.assign || function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + + return target; + }; + + return _extends.apply(this, arguments); + } + + function _inheritsLoose(subClass, superClass) { + subClass.prototype = Object.create(superClass.prototype); + subClass.prototype.constructor = subClass; + subClass.__proto__ = superClass; + } + + function _assertThisInitialized$1(self) { + if (self === void 0) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + + return self; + } + /** + * @private + * extend object. + * means that properties in dest will be overwritten by the ones in src. + * @param {Object} target + * @param {...Object} objects_to_assign + * @returns {Object} target + */ + + + var assign; + + if (typeof Object.assign !== 'function') { + assign = function assign(target) { + if (target === undefined || target === null) { + throw new TypeError('Cannot convert undefined or null to object'); + } + + var output = Object(target); + + for (var index = 1; index < arguments.length; index++) { + var source = arguments[index]; + + if (source !== undefined && source !== null) { + for (var nextKey in source) { + if (source.hasOwnProperty(nextKey)) { + output[nextKey] = source[nextKey]; + } + } + } + } + + return output; + }; + } else { + assign = Object.assign; + } + + var assign$1 = assign; + var VENDOR_PREFIXES = ['', 'webkit', 'Moz', 'MS', 'ms', 'o']; + var TEST_ELEMENT = typeof document === "undefined" ? { + style: {} + } : document.createElement('div'); + var TYPE_FUNCTION = 'function'; + var round = Math.round, + abs = Math.abs; + var now = Date.now; + /** + * @private + * get the prefixed property + * @param {Object} obj + * @param {String} property + * @returns {String|Undefined} prefixed + */ + + function prefixed(obj, property) { + var prefix; + var prop; + var camelProp = property[0].toUpperCase() + property.slice(1); + var i = 0; + + while (i < VENDOR_PREFIXES.length) { + prefix = VENDOR_PREFIXES[i]; + prop = prefix ? prefix + camelProp : property; + + if (prop in obj) { + return prop; + } + + i++; + } + + return undefined; + } + /* eslint-disable no-new-func, no-nested-ternary */ + + + var win; + + if (typeof window === "undefined") { + // window is undefined in node.js + win = {}; + } else { + win = window; + } + + var PREFIXED_TOUCH_ACTION = prefixed(TEST_ELEMENT.style, 'touchAction'); + var NATIVE_TOUCH_ACTION = PREFIXED_TOUCH_ACTION !== undefined; + + function getTouchActionProps() { + if (!NATIVE_TOUCH_ACTION) { + return false; + } + + var touchMap = {}; + var cssSupports = win.CSS && win.CSS.supports; + ['auto', 'manipulation', 'pan-y', 'pan-x', 'pan-x pan-y', 'none'].forEach(function (val) { + // If css.supports is not supported but there is native touch-action assume it supports + // all values. This is the case for IE 10 and 11. + return touchMap[val] = cssSupports ? win.CSS.supports('touch-action', val) : true; + }); + return touchMap; + } + + var TOUCH_ACTION_COMPUTE = 'compute'; + var TOUCH_ACTION_AUTO = 'auto'; + var TOUCH_ACTION_MANIPULATION = 'manipulation'; // not implemented + + var TOUCH_ACTION_NONE = 'none'; + var TOUCH_ACTION_PAN_X = 'pan-x'; + var TOUCH_ACTION_PAN_Y = 'pan-y'; + var TOUCH_ACTION_MAP = getTouchActionProps(); + var MOBILE_REGEX = /mobile|tablet|ip(ad|hone|od)|android/i; + var SUPPORT_TOUCH = 'ontouchstart' in win; + var SUPPORT_POINTER_EVENTS = prefixed(win, 'PointerEvent') !== undefined; + var SUPPORT_ONLY_TOUCH = SUPPORT_TOUCH && MOBILE_REGEX.test(navigator.userAgent); + var INPUT_TYPE_TOUCH = 'touch'; + var INPUT_TYPE_PEN = 'pen'; + var INPUT_TYPE_MOUSE = 'mouse'; + var INPUT_TYPE_KINECT = 'kinect'; + var COMPUTE_INTERVAL = 25; + var INPUT_START = 1; + var INPUT_MOVE = 2; + var INPUT_END = 4; + var INPUT_CANCEL = 8; + var DIRECTION_NONE = 1; + var DIRECTION_LEFT = 2; + var DIRECTION_RIGHT = 4; + var DIRECTION_UP = 8; + var DIRECTION_DOWN = 16; + var DIRECTION_HORIZONTAL = DIRECTION_LEFT | DIRECTION_RIGHT; + var DIRECTION_VERTICAL = DIRECTION_UP | DIRECTION_DOWN; + var DIRECTION_ALL = DIRECTION_HORIZONTAL | DIRECTION_VERTICAL; + var PROPS_XY = ['x', 'y']; + var PROPS_CLIENT_XY = ['clientX', 'clientY']; + /** + * @private + * walk objects and arrays + * @param {Object} obj + * @param {Function} iterator + * @param {Object} context + */ + + function each(obj, iterator, context) { + var i; + + if (!obj) { + return; + } + + if (obj.forEach) { + obj.forEach(iterator, context); + } else if (obj.length !== undefined) { + i = 0; + + while (i < obj.length) { + iterator.call(context, obj[i], i, obj); + i++; + } + } else { + for (i in obj) { + obj.hasOwnProperty(i) && iterator.call(context, obj[i], i, obj); + } + } + } + /** + * @private + * let a boolean value also be a function that must return a boolean + * this first item in args will be used as the context + * @param {Boolean|Function} val + * @param {Array} [args] + * @returns {Boolean} + */ + + + function boolOrFn(val, args) { + if (typeof val === TYPE_FUNCTION) { + return val.apply(args ? args[0] || undefined : undefined, args); + } + + return val; + } + /** + * @private + * small indexOf wrapper + * @param {String} str + * @param {String} find + * @returns {Boolean} found + */ + + + function inStr(str, find) { + return str.indexOf(find) > -1; + } + /** + * @private + * when the touchActions are collected they are not a valid value, so we need to clean things up. * + * @param {String} actions + * @returns {*} + */ + + + function cleanTouchActions(actions) { + // none + if (inStr(actions, TOUCH_ACTION_NONE)) { + return TOUCH_ACTION_NONE; + } + + var hasPanX = inStr(actions, TOUCH_ACTION_PAN_X); + var hasPanY = inStr(actions, TOUCH_ACTION_PAN_Y); // if both pan-x and pan-y are set (different recognizers + // for different directions, e.g. horizontal pan but vertical swipe?) + // we need none (as otherwise with pan-x pan-y combined none of these + // recognizers will work, since the browser would handle all panning + + if (hasPanX && hasPanY) { + return TOUCH_ACTION_NONE; + } // pan-x OR pan-y + + + if (hasPanX || hasPanY) { + return hasPanX ? TOUCH_ACTION_PAN_X : TOUCH_ACTION_PAN_Y; + } // manipulation + + + if (inStr(actions, TOUCH_ACTION_MANIPULATION)) { + return TOUCH_ACTION_MANIPULATION; + } + + return TOUCH_ACTION_AUTO; + } + /** + * @private + * Touch Action + * sets the touchAction property or uses the js alternative + * @param {Manager} manager + * @param {String} value + * @constructor + */ + + + var TouchAction = + /*#__PURE__*/ + function () { + function TouchAction(manager, value) { + this.manager = manager; + this.set(value); + } + /** + * @private + * set the touchAction value on the element or enable the polyfill + * @param {String} value + */ + + + var _proto = TouchAction.prototype; + + _proto.set = function set(value) { + // find out the touch-action by the event handlers + if (value === TOUCH_ACTION_COMPUTE) { + value = this.compute(); + } + + if (NATIVE_TOUCH_ACTION && this.manager.element.style && TOUCH_ACTION_MAP[value]) { + this.manager.element.style[PREFIXED_TOUCH_ACTION] = value; + } + + this.actions = value.toLowerCase().trim(); + }; + /** + * @private + * just re-set the touchAction value + */ + + + _proto.update = function update() { + this.set(this.manager.options.touchAction); + }; + /** + * @private + * compute the value for the touchAction property based on the recognizer's settings + * @returns {String} value + */ + + + _proto.compute = function compute() { + var actions = []; + each(this.manager.recognizers, function (recognizer) { + if (boolOrFn(recognizer.options.enable, [recognizer])) { + actions = actions.concat(recognizer.getTouchAction()); + } + }); + return cleanTouchActions(actions.join(' ')); + }; + /** + * @private + * this method is called on each input cycle and provides the preventing of the browser behavior + * @param {Object} input + */ + + + _proto.preventDefaults = function preventDefaults(input) { + var srcEvent = input.srcEvent; + var direction = input.offsetDirection; // if the touch action did prevented once this session + + if (this.manager.session.prevented) { + srcEvent.preventDefault(); + return; + } + + var actions = this.actions; + var hasNone = inStr(actions, TOUCH_ACTION_NONE) && !TOUCH_ACTION_MAP[TOUCH_ACTION_NONE]; + var hasPanY = inStr(actions, TOUCH_ACTION_PAN_Y) && !TOUCH_ACTION_MAP[TOUCH_ACTION_PAN_Y]; + var hasPanX = inStr(actions, TOUCH_ACTION_PAN_X) && !TOUCH_ACTION_MAP[TOUCH_ACTION_PAN_X]; + + if (hasNone) { + // do not prevent defaults if this is a tap gesture + var isTapPointer = input.pointers.length === 1; + var isTapMovement = input.distance < 2; + var isTapTouchTime = input.deltaTime < 250; + + if (isTapPointer && isTapMovement && isTapTouchTime) { + return; + } + } + + if (hasPanX && hasPanY) { + // `pan-x pan-y` means browser handles all scrolling/panning, do not prevent + return; + } + + if (hasNone || hasPanY && direction & DIRECTION_HORIZONTAL || hasPanX && direction & DIRECTION_VERTICAL) { + return this.preventSrc(srcEvent); + } + }; + /** + * @private + * call preventDefault to prevent the browser's default behavior (scrolling in most cases) + * @param {Object} srcEvent + */ + + + _proto.preventSrc = function preventSrc(srcEvent) { + this.manager.session.prevented = true; + srcEvent.preventDefault(); + }; + + return TouchAction; + }(); + /** + * @private + * find if a node is in the given parent + * @method hasParent + * @param {HTMLElement} node + * @param {HTMLElement} parent + * @return {Boolean} found + */ + + + function hasParent$1(node, parent) { + while (node) { + if (node === parent) { + return true; + } + + node = node.parentNode; + } + + return false; + } + /** + * @private + * get the center of all the pointers + * @param {Array} pointers + * @return {Object} center contains `x` and `y` properties + */ + + + function getCenter(pointers) { + var pointersLength = pointers.length; // no need to loop when only one touch + + if (pointersLength === 1) { + return { + x: round(pointers[0].clientX), + y: round(pointers[0].clientY) + }; + } + + var x = 0; + var y = 0; + var i = 0; + + while (i < pointersLength) { + x += pointers[i].clientX; + y += pointers[i].clientY; + i++; + } + + return { + x: round(x / pointersLength), + y: round(y / pointersLength) + }; + } + /** + * @private + * create a simple clone from the input used for storage of firstInput and firstMultiple + * @param {Object} input + * @returns {Object} clonedInputData + */ + + + function simpleCloneInputData(input) { + // make a simple copy of the pointers because we will get a reference if we don't + // we only need clientXY for the calculations + var pointers = []; + var i = 0; + + while (i < input.pointers.length) { + pointers[i] = { + clientX: round(input.pointers[i].clientX), + clientY: round(input.pointers[i].clientY) + }; + i++; + } + + return { + timeStamp: now(), + pointers: pointers, + center: getCenter(pointers), + deltaX: input.deltaX, + deltaY: input.deltaY + }; + } + /** + * @private + * calculate the absolute distance between two points + * @param {Object} p1 {x, y} + * @param {Object} p2 {x, y} + * @param {Array} [props] containing x and y keys + * @return {Number} distance + */ + + + function getDistance(p1, p2, props) { + if (!props) { + props = PROPS_XY; + } + + var x = p2[props[0]] - p1[props[0]]; + var y = p2[props[1]] - p1[props[1]]; + return Math.sqrt(x * x + y * y); + } + /** + * @private + * calculate the angle between two coordinates + * @param {Object} p1 + * @param {Object} p2 + * @param {Array} [props] containing x and y keys + * @return {Number} angle + */ + + + function getAngle(p1, p2, props) { + if (!props) { + props = PROPS_XY; + } + + var x = p2[props[0]] - p1[props[0]]; + var y = p2[props[1]] - p1[props[1]]; + return Math.atan2(y, x) * 180 / Math.PI; + } + /** + * @private + * get the direction between two points + * @param {Number} x + * @param {Number} y + * @return {Number} direction + */ + + + function getDirection(x, y) { + if (x === y) { + return DIRECTION_NONE; + } + + if (abs(x) >= abs(y)) { + return x < 0 ? DIRECTION_LEFT : DIRECTION_RIGHT; + } + + return y < 0 ? DIRECTION_UP : DIRECTION_DOWN; + } + + function computeDeltaXY(session, input) { + var center = input.center; // let { offsetDelta:offset = {}, prevDelta = {}, prevInput = {} } = session; + // jscs throwing error on defalut destructured values and without defaults tests fail + + var offset = session.offsetDelta || {}; + var prevDelta = session.prevDelta || {}; + var prevInput = session.prevInput || {}; + + if (input.eventType === INPUT_START || prevInput.eventType === INPUT_END) { + prevDelta = session.prevDelta = { + x: prevInput.deltaX || 0, + y: prevInput.deltaY || 0 + }; + offset = session.offsetDelta = { + x: center.x, + y: center.y + }; + } + + input.deltaX = prevDelta.x + (center.x - offset.x); + input.deltaY = prevDelta.y + (center.y - offset.y); + } + /** + * @private + * calculate the velocity between two points. unit is in px per ms. + * @param {Number} deltaTime + * @param {Number} x + * @param {Number} y + * @return {Object} velocity `x` and `y` + */ + + + function getVelocity(deltaTime, x, y) { + return { + x: x / deltaTime || 0, + y: y / deltaTime || 0 + }; + } + /** + * @private + * calculate the scale factor between two pointersets + * no scale is 1, and goes down to 0 when pinched together, and bigger when pinched out + * @param {Array} start array of pointers + * @param {Array} end array of pointers + * @return {Number} scale + */ + + + function getScale(start, end) { + return getDistance(end[0], end[1], PROPS_CLIENT_XY) / getDistance(start[0], start[1], PROPS_CLIENT_XY); + } + /** + * @private + * calculate the rotation degrees between two pointersets + * @param {Array} start array of pointers + * @param {Array} end array of pointers + * @return {Number} rotation + */ + + + function getRotation(start, end) { + return getAngle(end[1], end[0], PROPS_CLIENT_XY) + getAngle(start[1], start[0], PROPS_CLIENT_XY); + } + /** + * @private + * velocity is calculated every x ms + * @param {Object} session + * @param {Object} input + */ + + + function computeIntervalInputData(session, input) { + var last = session.lastInterval || input; + var deltaTime = input.timeStamp - last.timeStamp; + var velocity; + var velocityX; + var velocityY; + var direction; + + if (input.eventType !== INPUT_CANCEL && (deltaTime > COMPUTE_INTERVAL || last.velocity === undefined)) { + var deltaX = input.deltaX - last.deltaX; + var deltaY = input.deltaY - last.deltaY; + var v = getVelocity(deltaTime, deltaX, deltaY); + velocityX = v.x; + velocityY = v.y; + velocity = abs(v.x) > abs(v.y) ? v.x : v.y; + direction = getDirection(deltaX, deltaY); + session.lastInterval = input; + } else { + // use latest velocity info if it doesn't overtake a minimum period + velocity = last.velocity; + velocityX = last.velocityX; + velocityY = last.velocityY; + direction = last.direction; + } + + input.velocity = velocity; + input.velocityX = velocityX; + input.velocityY = velocityY; + input.direction = direction; + } + /** + * @private + * extend the data with some usable properties like scale, rotate, velocity etc + * @param {Object} manager + * @param {Object} input + */ + + + function computeInputData(manager, input) { + var session = manager.session; + var pointers = input.pointers; + var pointersLength = pointers.length; // store the first input to calculate the distance and direction + + if (!session.firstInput) { + session.firstInput = simpleCloneInputData(input); + } // to compute scale and rotation we need to store the multiple touches + + + if (pointersLength > 1 && !session.firstMultiple) { + session.firstMultiple = simpleCloneInputData(input); + } else if (pointersLength === 1) { + session.firstMultiple = false; + } + + var firstInput = session.firstInput, + firstMultiple = session.firstMultiple; + var offsetCenter = firstMultiple ? firstMultiple.center : firstInput.center; + var center = input.center = getCenter(pointers); + input.timeStamp = now(); + input.deltaTime = input.timeStamp - firstInput.timeStamp; + input.angle = getAngle(offsetCenter, center); + input.distance = getDistance(offsetCenter, center); + computeDeltaXY(session, input); + input.offsetDirection = getDirection(input.deltaX, input.deltaY); + var overallVelocity = getVelocity(input.deltaTime, input.deltaX, input.deltaY); + input.overallVelocityX = overallVelocity.x; + input.overallVelocityY = overallVelocity.y; + input.overallVelocity = abs(overallVelocity.x) > abs(overallVelocity.y) ? overallVelocity.x : overallVelocity.y; + input.scale = firstMultiple ? getScale(firstMultiple.pointers, pointers) : 1; + input.rotation = firstMultiple ? getRotation(firstMultiple.pointers, pointers) : 0; + input.maxPointers = !session.prevInput ? input.pointers.length : input.pointers.length > session.prevInput.maxPointers ? input.pointers.length : session.prevInput.maxPointers; + computeIntervalInputData(session, input); // find the correct target + + var target = manager.element; + + if (hasParent$1(input.srcEvent.target, target)) { + target = input.srcEvent.target; + } + + input.target = target; + } + /** + * @private + * handle input events + * @param {Manager} manager + * @param {String} eventType + * @param {Object} input + */ + + + function inputHandler(manager, eventType, input) { + var pointersLen = input.pointers.length; + var changedPointersLen = input.changedPointers.length; + var isFirst = eventType & INPUT_START && pointersLen - changedPointersLen === 0; + var isFinal = eventType & (INPUT_END | INPUT_CANCEL) && pointersLen - changedPointersLen === 0; + input.isFirst = !!isFirst; + input.isFinal = !!isFinal; + + if (isFirst) { + manager.session = {}; + } // source event is the normalized value of the domEvents + // like 'touchstart, mouseup, pointerdown' + + + input.eventType = eventType; // compute scale, rotation etc + + computeInputData(manager, input); // emit secret event + + manager.emit('hammer.input', input); + manager.recognize(input); + manager.session.prevInput = input; + } + /** + * @private + * split string on whitespace + * @param {String} str + * @returns {Array} words + */ + + + function splitStr(str) { + return str.trim().split(/\s+/g); + } + /** + * @private + * addEventListener with multiple events at once + * @param {EventTarget} target + * @param {String} types + * @param {Function} handler + */ + + + function addEventListeners(target, types, handler) { + each(splitStr(types), function (type) { + target.addEventListener(type, handler, false); + }); + } + /** + * @private + * removeEventListener with multiple events at once + * @param {EventTarget} target + * @param {String} types + * @param {Function} handler + */ + + + function removeEventListeners(target, types, handler) { + each(splitStr(types), function (type) { + target.removeEventListener(type, handler, false); + }); + } + /** + * @private + * get the window object of an element + * @param {HTMLElement} element + * @returns {DocumentView|Window} + */ + + + function getWindowForElement(element) { + var doc = element.ownerDocument || element; + return doc.defaultView || doc.parentWindow || window; + } + /** + * @private + * create new input type manager + * @param {Manager} manager + * @param {Function} callback + * @returns {Input} + * @constructor + */ + + + var Input = + /*#__PURE__*/ + function () { + function Input(manager, callback) { + var self = this; + this.manager = manager; + this.callback = callback; + this.element = manager.element; + this.target = manager.options.inputTarget; // smaller wrapper around the handler, for the scope and the enabled state of the manager, + // so when disabled the input events are completely bypassed. + + this.domHandler = function (ev) { + if (boolOrFn(manager.options.enable, [manager])) { + self.handler(ev); + } + }; + + this.init(); + } + /** + * @private + * should handle the inputEvent data and trigger the callback + * @virtual + */ + + + var _proto = Input.prototype; + + _proto.handler = function handler() {}; + /** + * @private + * bind the events + */ + + + _proto.init = function init() { + this.evEl && addEventListeners(this.element, this.evEl, this.domHandler); + this.evTarget && addEventListeners(this.target, this.evTarget, this.domHandler); + this.evWin && addEventListeners(getWindowForElement(this.element), this.evWin, this.domHandler); + }; + /** + * @private + * unbind the events + */ + + + _proto.destroy = function destroy() { + this.evEl && removeEventListeners(this.element, this.evEl, this.domHandler); + this.evTarget && removeEventListeners(this.target, this.evTarget, this.domHandler); + this.evWin && removeEventListeners(getWindowForElement(this.element), this.evWin, this.domHandler); + }; + + return Input; + }(); + /** + * @private + * find if a array contains the object using indexOf or a simple polyFill + * @param {Array} src + * @param {String} find + * @param {String} [findByKey] + * @return {Boolean|Number} false when not found, or the index + */ + + + function inArray(src, find, findByKey) { + if (src.indexOf && !findByKey) { + return src.indexOf(find); + } else { + var i = 0; + + while (i < src.length) { + if (findByKey && src[i][findByKey] == find || !findByKey && src[i] === find) { + // do not use === here, test fails + return i; + } + + i++; + } + + return -1; + } + } + + var POINTER_INPUT_MAP = { + pointerdown: INPUT_START, + pointermove: INPUT_MOVE, + pointerup: INPUT_END, + pointercancel: INPUT_CANCEL, + pointerout: INPUT_CANCEL + }; // in IE10 the pointer types is defined as an enum + + var IE10_POINTER_TYPE_ENUM = { + 2: INPUT_TYPE_TOUCH, + 3: INPUT_TYPE_PEN, + 4: INPUT_TYPE_MOUSE, + 5: INPUT_TYPE_KINECT // see https://twitter.com/jacobrossi/status/480596438489890816 + + }; + var POINTER_ELEMENT_EVENTS = 'pointerdown'; + var POINTER_WINDOW_EVENTS = 'pointermove pointerup pointercancel'; // IE10 has prefixed support, and case-sensitive + + if (win.MSPointerEvent && !win.PointerEvent) { + POINTER_ELEMENT_EVENTS = 'MSPointerDown'; + POINTER_WINDOW_EVENTS = 'MSPointerMove MSPointerUp MSPointerCancel'; + } + /** + * @private + * Pointer events input + * @constructor + * @extends Input + */ + + + var PointerEventInput = + /*#__PURE__*/ + function (_Input) { + _inheritsLoose(PointerEventInput, _Input); + + function PointerEventInput() { + var _this; + + var proto = PointerEventInput.prototype; + proto.evEl = POINTER_ELEMENT_EVENTS; + proto.evWin = POINTER_WINDOW_EVENTS; + _this = _Input.apply(this, arguments) || this; + _this.store = _this.manager.session.pointerEvents = []; + return _this; + } + /** + * @private + * handle mouse events + * @param {Object} ev + */ + + + var _proto = PointerEventInput.prototype; + + _proto.handler = function handler(ev) { + var store = this.store; + var removePointer = false; + var eventTypeNormalized = ev.type.toLowerCase().replace('ms', ''); + var eventType = POINTER_INPUT_MAP[eventTypeNormalized]; + var pointerType = IE10_POINTER_TYPE_ENUM[ev.pointerType] || ev.pointerType; + var isTouch = pointerType === INPUT_TYPE_TOUCH; // get index of the event in the store + + var storeIndex = inArray(store, ev.pointerId, 'pointerId'); // start and mouse must be down + + if (eventType & INPUT_START && (ev.button === 0 || isTouch)) { + if (storeIndex < 0) { + store.push(ev); + storeIndex = store.length - 1; + } + } else if (eventType & (INPUT_END | INPUT_CANCEL)) { + removePointer = true; + } // it not found, so the pointer hasn't been down (so it's probably a hover) + + + if (storeIndex < 0) { + return; + } // update the event in the store + + + store[storeIndex] = ev; + this.callback(this.manager, eventType, { + pointers: store, + changedPointers: [ev], + pointerType: pointerType, + srcEvent: ev + }); + + if (removePointer) { + // remove from the store + store.splice(storeIndex, 1); + } + }; + + return PointerEventInput; + }(Input); + /** + * @private + * convert array-like objects to real arrays + * @param {Object} obj + * @returns {Array} + */ + + + function toArray$1(obj) { + return Array.prototype.slice.call(obj, 0); + } + /** + * @private + * unique array with objects based on a key (like 'id') or just by the array's value + * @param {Array} src [{id:1},{id:2},{id:1}] + * @param {String} [key] + * @param {Boolean} [sort=False] + * @returns {Array} [{id:1},{id:2}] + */ + + + function uniqueArray(src, key, sort) { + var results = []; + var values = []; + var i = 0; + + while (i < src.length) { + var val = key ? src[i][key] : src[i]; + + if (inArray(values, val) < 0) { + results.push(src[i]); + } + + values[i] = val; + i++; + } + + if (sort) { + if (!key) { + results = results.sort(); + } else { + results = results.sort(function (a, b) { + return a[key] > b[key]; + }); + } + } + + return results; + } + + var TOUCH_INPUT_MAP = { + touchstart: INPUT_START, + touchmove: INPUT_MOVE, + touchend: INPUT_END, + touchcancel: INPUT_CANCEL + }; + var TOUCH_TARGET_EVENTS = 'touchstart touchmove touchend touchcancel'; + /** + * @private + * Multi-user touch events input + * @constructor + * @extends Input + */ + + var TouchInput = + /*#__PURE__*/ + function (_Input) { + _inheritsLoose(TouchInput, _Input); + + function TouchInput() { + var _this; + + TouchInput.prototype.evTarget = TOUCH_TARGET_EVENTS; + _this = _Input.apply(this, arguments) || this; + _this.targetIds = {}; // this.evTarget = TOUCH_TARGET_EVENTS; + + return _this; + } + + var _proto = TouchInput.prototype; + + _proto.handler = function handler(ev) { + var type = TOUCH_INPUT_MAP[ev.type]; + var touches = getTouches.call(this, ev, type); + + if (!touches) { + return; + } + + this.callback(this.manager, type, { + pointers: touches[0], + changedPointers: touches[1], + pointerType: INPUT_TYPE_TOUCH, + srcEvent: ev + }); + }; + + return TouchInput; + }(Input); + + function getTouches(ev, type) { + var allTouches = toArray$1(ev.touches); + var targetIds = this.targetIds; // when there is only one touch, the process can be simplified + + if (type & (INPUT_START | INPUT_MOVE) && allTouches.length === 1) { + targetIds[allTouches[0].identifier] = true; + return [allTouches, allTouches]; + } + + var i; + var targetTouches; + var changedTouches = toArray$1(ev.changedTouches); + var changedTargetTouches = []; + var target = this.target; // get target touches from touches + + targetTouches = allTouches.filter(function (touch) { + return hasParent$1(touch.target, target); + }); // collect touches + + if (type === INPUT_START) { + i = 0; + + while (i < targetTouches.length) { + targetIds[targetTouches[i].identifier] = true; + i++; + } + } // filter changed touches to only contain touches that exist in the collected target ids + + + i = 0; + + while (i < changedTouches.length) { + if (targetIds[changedTouches[i].identifier]) { + changedTargetTouches.push(changedTouches[i]); + } // cleanup removed touches + + + if (type & (INPUT_END | INPUT_CANCEL)) { + delete targetIds[changedTouches[i].identifier]; + } + + i++; + } + + if (!changedTargetTouches.length) { + return; + } + + return [// merge targetTouches with changedTargetTouches so it contains ALL touches, including 'end' and 'cancel' + uniqueArray(targetTouches.concat(changedTargetTouches), 'identifier', true), changedTargetTouches]; + } + + var MOUSE_INPUT_MAP = { + mousedown: INPUT_START, + mousemove: INPUT_MOVE, + mouseup: INPUT_END + }; + var MOUSE_ELEMENT_EVENTS = 'mousedown'; + var MOUSE_WINDOW_EVENTS = 'mousemove mouseup'; + /** + * @private + * Mouse events input + * @constructor + * @extends Input + */ + + var MouseInput = + /*#__PURE__*/ + function (_Input) { + _inheritsLoose(MouseInput, _Input); + + function MouseInput() { + var _this; + + var proto = MouseInput.prototype; + proto.evEl = MOUSE_ELEMENT_EVENTS; + proto.evWin = MOUSE_WINDOW_EVENTS; + _this = _Input.apply(this, arguments) || this; + _this.pressed = false; // mousedown state + + return _this; + } + /** + * @private + * handle mouse events + * @param {Object} ev + */ + + + var _proto = MouseInput.prototype; + + _proto.handler = function handler(ev) { + var eventType = MOUSE_INPUT_MAP[ev.type]; // on start we want to have the left mouse button down + + if (eventType & INPUT_START && ev.button === 0) { + this.pressed = true; + } + + if (eventType & INPUT_MOVE && ev.which !== 1) { + eventType = INPUT_END; + } // mouse must be down + + + if (!this.pressed) { + return; + } + + if (eventType & INPUT_END) { + this.pressed = false; + } + + this.callback(this.manager, eventType, { + pointers: [ev], + changedPointers: [ev], + pointerType: INPUT_TYPE_MOUSE, + srcEvent: ev + }); + }; + + return MouseInput; + }(Input); + /** + * @private + * Combined touch and mouse input + * + * Touch has a higher priority then mouse, and while touching no mouse events are allowed. + * This because touch devices also emit mouse events while doing a touch. + * + * @constructor + * @extends Input + */ + + + var DEDUP_TIMEOUT = 2500; + var DEDUP_DISTANCE = 25; + + function setLastTouch(eventData) { + var _eventData$changedPoi = eventData.changedPointers, + touch = _eventData$changedPoi[0]; + + if (touch.identifier === this.primaryTouch) { + var lastTouch = { + x: touch.clientX, + y: touch.clientY + }; + var lts = this.lastTouches; + this.lastTouches.push(lastTouch); + + var removeLastTouch = function removeLastTouch() { + var i = lts.indexOf(lastTouch); + + if (i > -1) { + lts.splice(i, 1); + } + }; + + setTimeout(removeLastTouch, DEDUP_TIMEOUT); + } + } + + function recordTouches(eventType, eventData) { + if (eventType & INPUT_START) { + this.primaryTouch = eventData.changedPointers[0].identifier; + setLastTouch.call(this, eventData); + } else if (eventType & (INPUT_END | INPUT_CANCEL)) { + setLastTouch.call(this, eventData); + } + } + + function isSyntheticEvent(eventData) { + var x = eventData.srcEvent.clientX; + var y = eventData.srcEvent.clientY; + + for (var i = 0; i < this.lastTouches.length; i++) { + var t = this.lastTouches[i]; + var dx = Math.abs(x - t.x); + var dy = Math.abs(y - t.y); + + if (dx <= DEDUP_DISTANCE && dy <= DEDUP_DISTANCE) { + return true; + } + } + + return false; + } + + var TouchMouseInput = + /*#__PURE__*/ + function () { + var TouchMouseInput = + /*#__PURE__*/ + function (_Input) { + _inheritsLoose(TouchMouseInput, _Input); + + function TouchMouseInput(_manager, callback) { + var _this; + + _this = _Input.call(this, _manager, callback) || this; + + _this.handler = function (manager, inputEvent, inputData) { + var isTouch = inputData.pointerType === INPUT_TYPE_TOUCH; + var isMouse = inputData.pointerType === INPUT_TYPE_MOUSE; + + if (isMouse && inputData.sourceCapabilities && inputData.sourceCapabilities.firesTouchEvents) { + return; + } // when we're in a touch event, record touches to de-dupe synthetic mouse event + + + if (isTouch) { + recordTouches.call(_assertThisInitialized$1(_assertThisInitialized$1(_this)), inputEvent, inputData); + } else if (isMouse && isSyntheticEvent.call(_assertThisInitialized$1(_assertThisInitialized$1(_this)), inputData)) { + return; + } + + _this.callback(manager, inputEvent, inputData); + }; + + _this.touch = new TouchInput(_this.manager, _this.handler); + _this.mouse = new MouseInput(_this.manager, _this.handler); + _this.primaryTouch = null; + _this.lastTouches = []; + return _this; + } + /** + * @private + * handle mouse and touch events + * @param {Hammer} manager + * @param {String} inputEvent + * @param {Object} inputData + */ + + + var _proto = TouchMouseInput.prototype; + /** + * @private + * remove the event listeners + */ + + _proto.destroy = function destroy() { + this.touch.destroy(); + this.mouse.destroy(); + }; + + return TouchMouseInput; + }(Input); + + return TouchMouseInput; + }(); + /** + * @private + * create new input type manager + * called by the Manager constructor + * @param {Hammer} manager + * @returns {Input} + */ + + + function createInputInstance(manager) { + var Type; // let inputClass = manager.options.inputClass; + + var inputClass = manager.options.inputClass; + + if (inputClass) { + Type = inputClass; + } else if (SUPPORT_POINTER_EVENTS) { + Type = PointerEventInput; + } else if (SUPPORT_ONLY_TOUCH) { + Type = TouchInput; + } else if (!SUPPORT_TOUCH) { + Type = MouseInput; + } else { + Type = TouchMouseInput; + } + + return new Type(manager, inputHandler); + } + /** + * @private + * if the argument is an array, we want to execute the fn on each entry + * if it aint an array we don't want to do a thing. + * this is used by all the methods that accept a single and array argument. + * @param {*|Array} arg + * @param {String} fn + * @param {Object} [context] + * @returns {Boolean} + */ + + + function invokeArrayArg(arg, fn, context) { + if (Array.isArray(arg)) { + each(arg, context[fn], context); + return true; + } + + return false; + } + + var STATE_POSSIBLE = 1; + var STATE_BEGAN = 2; + var STATE_CHANGED = 4; + var STATE_ENDED = 8; + var STATE_RECOGNIZED = STATE_ENDED; + var STATE_CANCELLED = 16; + var STATE_FAILED = 32; + /** + * @private + * get a unique id + * @returns {number} uniqueId + */ + + var _uniqueId = 1; + + function uniqueId() { + return _uniqueId++; + } + /** + * @private + * get a recognizer by name if it is bound to a manager + * @param {Recognizer|String} otherRecognizer + * @param {Recognizer} recognizer + * @returns {Recognizer} + */ + + + function getRecognizerByNameIfManager(otherRecognizer, recognizer) { + var manager = recognizer.manager; + + if (manager) { + return manager.get(otherRecognizer); + } + + return otherRecognizer; + } + /** + * @private + * get a usable string, used as event postfix + * @param {constant} state + * @returns {String} state + */ + + + function stateStr(state) { + if (state & STATE_CANCELLED) { + return 'cancel'; + } else if (state & STATE_ENDED) { + return 'end'; + } else if (state & STATE_CHANGED) { + return 'move'; + } else if (state & STATE_BEGAN) { + return 'start'; + } + + return ''; + } + /** + * @private + * Recognizer flow explained; * + * All recognizers have the initial state of POSSIBLE when a input session starts. + * The definition of a input session is from the first input until the last input, with all it's movement in it. * + * Example session for mouse-input: mousedown -> mousemove -> mouseup + * + * On each recognizing cycle (see Manager.recognize) the .recognize() method is executed + * which determines with state it should be. + * + * If the recognizer has the state FAILED, CANCELLED or RECOGNIZED (equals ENDED), it is reset to + * POSSIBLE to give it another change on the next cycle. + * + * Possible + * | + * +-----+---------------+ + * | | + * +-----+-----+ | + * | | | + * Failed Cancelled | + * +-------+------+ + * | | + * Recognized Began + * | + * Changed + * | + * Ended/Recognized + */ + + /** + * @private + * Recognizer + * Every recognizer needs to extend from this class. + * @constructor + * @param {Object} options + */ + + + var Recognizer = + /*#__PURE__*/ + function () { + function Recognizer(options) { + if (options === void 0) { + options = {}; + } + + this.options = _extends({ + enable: true + }, options); + this.id = uniqueId(); + this.manager = null; // default is enable true + + this.state = STATE_POSSIBLE; + this.simultaneous = {}; + this.requireFail = []; + } + /** + * @private + * set options + * @param {Object} options + * @return {Recognizer} + */ + + + var _proto = Recognizer.prototype; + + _proto.set = function set(options) { + assign$1(this.options, options); // also update the touchAction, in case something changed about the directions/enabled state + + this.manager && this.manager.touchAction.update(); + return this; + }; + /** + * @private + * recognize simultaneous with an other recognizer. + * @param {Recognizer} otherRecognizer + * @returns {Recognizer} this + */ + + + _proto.recognizeWith = function recognizeWith(otherRecognizer) { + if (invokeArrayArg(otherRecognizer, 'recognizeWith', this)) { + return this; + } + + var simultaneous = this.simultaneous; + otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this); + + if (!simultaneous[otherRecognizer.id]) { + simultaneous[otherRecognizer.id] = otherRecognizer; + otherRecognizer.recognizeWith(this); + } + + return this; + }; + /** + * @private + * drop the simultaneous link. it doesnt remove the link on the other recognizer. + * @param {Recognizer} otherRecognizer + * @returns {Recognizer} this + */ + + + _proto.dropRecognizeWith = function dropRecognizeWith(otherRecognizer) { + if (invokeArrayArg(otherRecognizer, 'dropRecognizeWith', this)) { + return this; + } + + otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this); + delete this.simultaneous[otherRecognizer.id]; + return this; + }; + /** + * @private + * recognizer can only run when an other is failing + * @param {Recognizer} otherRecognizer + * @returns {Recognizer} this + */ + + + _proto.requireFailure = function requireFailure(otherRecognizer) { + if (invokeArrayArg(otherRecognizer, 'requireFailure', this)) { + return this; + } + + var requireFail = this.requireFail; + otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this); + + if (inArray(requireFail, otherRecognizer) === -1) { + requireFail.push(otherRecognizer); + otherRecognizer.requireFailure(this); + } + + return this; + }; + /** + * @private + * drop the requireFailure link. it does not remove the link on the other recognizer. + * @param {Recognizer} otherRecognizer + * @returns {Recognizer} this + */ + + + _proto.dropRequireFailure = function dropRequireFailure(otherRecognizer) { + if (invokeArrayArg(otherRecognizer, 'dropRequireFailure', this)) { + return this; + } + + otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this); + var index = inArray(this.requireFail, otherRecognizer); + + if (index > -1) { + this.requireFail.splice(index, 1); + } + + return this; + }; + /** + * @private + * has require failures boolean + * @returns {boolean} + */ + + + _proto.hasRequireFailures = function hasRequireFailures() { + return this.requireFail.length > 0; + }; + /** + * @private + * if the recognizer can recognize simultaneous with an other recognizer + * @param {Recognizer} otherRecognizer + * @returns {Boolean} + */ + + + _proto.canRecognizeWith = function canRecognizeWith(otherRecognizer) { + return !!this.simultaneous[otherRecognizer.id]; + }; + /** + * @private + * You should use `tryEmit` instead of `emit` directly to check + * that all the needed recognizers has failed before emitting. + * @param {Object} input + */ + + + _proto.emit = function emit(input) { + var self = this; + var state = this.state; + + function emit(event) { + self.manager.emit(event, input); + } // 'panstart' and 'panmove' + + + if (state < STATE_ENDED) { + emit(self.options.event + stateStr(state)); + } + + emit(self.options.event); // simple 'eventName' events + + if (input.additionalEvent) { + // additional event(panleft, panright, pinchin, pinchout...) + emit(input.additionalEvent); + } // panend and pancancel + + + if (state >= STATE_ENDED) { + emit(self.options.event + stateStr(state)); + } + }; + /** + * @private + * Check that all the require failure recognizers has failed, + * if true, it emits a gesture event, + * otherwise, setup the state to FAILED. + * @param {Object} input + */ + + + _proto.tryEmit = function tryEmit(input) { + if (this.canEmit()) { + return this.emit(input); + } // it's failing anyway + + + this.state = STATE_FAILED; + }; + /** + * @private + * can we emit? + * @returns {boolean} + */ + + + _proto.canEmit = function canEmit() { + var i = 0; + + while (i < this.requireFail.length) { + if (!(this.requireFail[i].state & (STATE_FAILED | STATE_POSSIBLE))) { + return false; + } + + i++; + } + + return true; + }; + /** + * @private + * update the recognizer + * @param {Object} inputData + */ + + + _proto.recognize = function recognize(inputData) { + // make a new copy of the inputData + // so we can change the inputData without messing up the other recognizers + var inputDataClone = assign$1({}, inputData); // is is enabled and allow recognizing? + + if (!boolOrFn(this.options.enable, [this, inputDataClone])) { + this.reset(); + this.state = STATE_FAILED; + return; + } // reset when we've reached the end + + + if (this.state & (STATE_RECOGNIZED | STATE_CANCELLED | STATE_FAILED)) { + this.state = STATE_POSSIBLE; + } + + this.state = this.process(inputDataClone); // the recognizer has recognized a gesture + // so trigger an event + + if (this.state & (STATE_BEGAN | STATE_CHANGED | STATE_ENDED | STATE_CANCELLED)) { + this.tryEmit(inputDataClone); + } + }; + /** + * @private + * return the state of the recognizer + * the actual recognizing happens in this method + * @virtual + * @param {Object} inputData + * @returns {constant} STATE + */ + + /* jshint ignore:start */ + + + _proto.process = function process(inputData) {}; + /* jshint ignore:end */ + + /** + * @private + * return the preferred touch-action + * @virtual + * @returns {Array} + */ + + + _proto.getTouchAction = function getTouchAction() {}; + /** + * @private + * called when the gesture isn't allowed to recognize + * like when another is being recognized or it is disabled + * @virtual + */ + + + _proto.reset = function reset() {}; + + return Recognizer; + }(); + + var defaults = { + /** + * @private + * set if DOM events are being triggered. + * But this is slower and unused by simple implementations, so disabled by default. + * @type {Boolean} + * @default false + */ + domEvents: false, + + /** + * @private + * The value for the touchAction property/fallback. + * When set to `compute` it will magically set the correct value based on the added recognizers. + * @type {String} + * @default compute + */ + touchAction: TOUCH_ACTION_COMPUTE, + + /** + * @private + * @type {Boolean} + * @default true + */ + enable: true, + + /** + * @private + * EXPERIMENTAL FEATURE -- can be removed/changed + * Change the parent input target element. + * If Null, then it is being set the to main element. + * @type {Null|EventTarget} + * @default null + */ + inputTarget: null, + + /** + * @private + * force an input class + * @type {Null|Function} + * @default null + */ + inputClass: null, + + /** + * @private + * Default recognizer setup when calling `Hammer()` + * When creating a new Manager these will be skipped. + * @type {Array} + */ + preset: [], + + /** + * @private + * Some CSS properties can be used to improve the working of Hammer. + * Add them to this method and they will be set when creating a new Manager. + * @namespace + */ + cssProps: { + /** + * @private + * Disables text selection to improve the dragging gesture. Mainly for desktop browsers. + * @type {String} + * @default 'none' + */ + userSelect: "none", + + /** + * @private + * Disable the Windows Phone grippers when pressing an element. + * @type {String} + * @default 'none' + */ + touchSelect: "none", + + /** + * @private + * Disables the default callout shown when you touch and hold a touch target. + * On iOS, when you touch and hold a touch target such as a link, Safari displays + * a callout containing information about the link. This property allows you to disable that callout. + * @type {String} + * @default 'none' + */ + touchCallout: "none", + + /** + * @private + * Specifies whether zooming is enabled. Used by IE10> + * @type {String} + * @default 'none' + */ + contentZooming: "none", + + /** + * @private + * Specifies that an entire element should be draggable instead of its contents. Mainly for desktop browsers. + * @type {String} + * @default 'none' + */ + userDrag: "none", + + /** + * @private + * Overrides the highlight color shown when the user taps a link or a JavaScript + * clickable element in iOS. This property obeys the alpha value, if specified. + * @type {String} + * @default 'rgba(0,0,0,0)' + */ + tapHighlightColor: "rgba(0,0,0,0)" + } + }; + var STOP = 1; + var FORCED_STOP = 2; + /** + * @private + * add/remove the css properties as defined in manager.options.cssProps + * @param {Manager} manager + * @param {Boolean} add + */ + + function toggleCssProps(manager, add) { + var element = manager.element; + + if (!element.style) { + return; + } + + var prop; + each(manager.options.cssProps, function (value, name) { + prop = prefixed(element.style, name); + + if (add) { + manager.oldCssProps[prop] = element.style[prop]; + element.style[prop] = value; + } else { + element.style[prop] = manager.oldCssProps[prop] || ""; + } + }); + + if (!add) { + manager.oldCssProps = {}; + } + } + /** + * @private + * trigger dom event + * @param {String} event + * @param {Object} data + */ + + + function triggerDomEvent(event, data) { + var gestureEvent = document.createEvent("Event"); + gestureEvent.initEvent(event, true, true); + gestureEvent.gesture = data; + data.target.dispatchEvent(gestureEvent); + } + /** + * @private + * Manager + * @param {HTMLElement} element + * @param {Object} [options] + * @constructor + */ + + + var Manager = + /*#__PURE__*/ + function () { + function Manager(element, options) { + var _this = this; + + this.options = assign$1({}, defaults, options || {}); + this.options.inputTarget = this.options.inputTarget || element; + this.handlers = {}; + this.session = {}; + this.recognizers = []; + this.oldCssProps = {}; + this.element = element; + this.input = createInputInstance(this); + this.touchAction = new TouchAction(this, this.options.touchAction); + toggleCssProps(this, true); + each(this.options.recognizers, function (item) { + var recognizer = _this.add(new item[0](item[1])); + + item[2] && recognizer.recognizeWith(item[2]); + item[3] && recognizer.requireFailure(item[3]); + }, this); + } + /** + * @private + * set options + * @param {Object} options + * @returns {Manager} + */ + + + var _proto = Manager.prototype; + + _proto.set = function set(options) { + assign$1(this.options, options); // Options that need a little more setup + + if (options.touchAction) { + this.touchAction.update(); + } + + if (options.inputTarget) { + // Clean up existing event listeners and reinitialize + this.input.destroy(); + this.input.target = options.inputTarget; + this.input.init(); + } + + return this; + }; + /** + * @private + * stop recognizing for this session. + * This session will be discarded, when a new [input]start event is fired. + * When forced, the recognizer cycle is stopped immediately. + * @param {Boolean} [force] + */ + + + _proto.stop = function stop(force) { + this.session.stopped = force ? FORCED_STOP : STOP; + }; + /** + * @private + * run the recognizers! + * called by the inputHandler function on every movement of the pointers (touches) + * it walks through all the recognizers and tries to detect the gesture that is being made + * @param {Object} inputData + */ + + + _proto.recognize = function recognize(inputData) { + var session = this.session; + + if (session.stopped) { + return; + } // run the touch-action polyfill + + + this.touchAction.preventDefaults(inputData); + var recognizer; + var recognizers = this.recognizers; // this holds the recognizer that is being recognized. + // so the recognizer's state needs to be BEGAN, CHANGED, ENDED or RECOGNIZED + // if no recognizer is detecting a thing, it is set to `null` + + var curRecognizer = session.curRecognizer; // reset when the last recognizer is recognized + // or when we're in a new session + + if (!curRecognizer || curRecognizer && curRecognizer.state & STATE_RECOGNIZED) { + session.curRecognizer = null; + curRecognizer = null; + } + + var i = 0; + + while (i < recognizers.length) { + recognizer = recognizers[i]; // find out if we are allowed try to recognize the input for this one. + // 1. allow if the session is NOT forced stopped (see the .stop() method) + // 2. allow if we still haven't recognized a gesture in this session, or the this recognizer is the one + // that is being recognized. + // 3. allow if the recognizer is allowed to run simultaneous with the current recognized recognizer. + // this can be setup with the `recognizeWith()` method on the recognizer. + + if (session.stopped !== FORCED_STOP && ( // 1 + !curRecognizer || recognizer === curRecognizer || // 2 + recognizer.canRecognizeWith(curRecognizer))) { + // 3 + recognizer.recognize(inputData); + } else { + recognizer.reset(); + } // if the recognizer has been recognizing the input as a valid gesture, we want to store this one as the + // current active recognizer. but only if we don't already have an active recognizer + + + if (!curRecognizer && recognizer.state & (STATE_BEGAN | STATE_CHANGED | STATE_ENDED)) { + session.curRecognizer = recognizer; + curRecognizer = recognizer; + } + + i++; + } + }; + /** + * @private + * get a recognizer by its event name. + * @param {Recognizer|String} recognizer + * @returns {Recognizer|Null} + */ + + + _proto.get = function get(recognizer) { + if (recognizer instanceof Recognizer) { + return recognizer; + } + + var recognizers = this.recognizers; + + for (var i = 0; i < recognizers.length; i++) { + if (recognizers[i].options.event === recognizer) { + return recognizers[i]; + } + } + + return null; + }; + /** + * @private add a recognizer to the manager + * existing recognizers with the same event name will be removed + * @param {Recognizer} recognizer + * @returns {Recognizer|Manager} + */ + + + _proto.add = function add(recognizer) { + if (invokeArrayArg(recognizer, "add", this)) { + return this; + } // remove existing + + + var existing = this.get(recognizer.options.event); + + if (existing) { + this.remove(existing); + } + + this.recognizers.push(recognizer); + recognizer.manager = this; + this.touchAction.update(); + return recognizer; + }; + /** + * @private + * remove a recognizer by name or instance + * @param {Recognizer|String} recognizer + * @returns {Manager} + */ + + + _proto.remove = function remove(recognizer) { + if (invokeArrayArg(recognizer, "remove", this)) { + return this; + } + + var targetRecognizer = this.get(recognizer); // let's make sure this recognizer exists + + if (recognizer) { + var recognizers = this.recognizers; + var index = inArray(recognizers, targetRecognizer); + + if (index !== -1) { + recognizers.splice(index, 1); + this.touchAction.update(); + } + } + + return this; + }; + /** + * @private + * bind event + * @param {String} events + * @param {Function} handler + * @returns {EventEmitter} this + */ + + + _proto.on = function on(events, handler) { + if (events === undefined || handler === undefined) { + return this; + } + + var handlers = this.handlers; + each(splitStr(events), function (event) { + handlers[event] = handlers[event] || []; + handlers[event].push(handler); + }); + return this; + }; + /** + * @private unbind event, leave emit blank to remove all handlers + * @param {String} events + * @param {Function} [handler] + * @returns {EventEmitter} this + */ + + + _proto.off = function off(events, handler) { + if (events === undefined) { + return this; + } + + var handlers = this.handlers; + each(splitStr(events), function (event) { + if (!handler) { + delete handlers[event]; + } else { + handlers[event] && handlers[event].splice(inArray(handlers[event], handler), 1); + } + }); + return this; + }; + /** + * @private emit event to the listeners + * @param {String} event + * @param {Object} data + */ + + + _proto.emit = function emit(event, data) { + // we also want to trigger dom events + if (this.options.domEvents) { + triggerDomEvent(event, data); + } // no handlers, so skip it all + + + var handlers = this.handlers[event] && this.handlers[event].slice(); + + if (!handlers || !handlers.length) { + return; + } + + data.type = event; + + data.preventDefault = function () { + data.srcEvent.preventDefault(); + }; + + var i = 0; + + while (i < handlers.length) { + handlers[i](data); + i++; + } + }; + /** + * @private + * destroy the manager and unbinds all events + * it doesn't unbind dom events, that is the user own responsibility + */ + + + _proto.destroy = function destroy() { + this.element && toggleCssProps(this, false); + this.handlers = {}; + this.session = {}; + this.input.destroy(); + this.element = null; + }; + + return Manager; + }(); + + var SINGLE_TOUCH_INPUT_MAP = { + touchstart: INPUT_START, + touchmove: INPUT_MOVE, + touchend: INPUT_END, + touchcancel: INPUT_CANCEL + }; + var SINGLE_TOUCH_TARGET_EVENTS = 'touchstart'; + var SINGLE_TOUCH_WINDOW_EVENTS = 'touchstart touchmove touchend touchcancel'; + /** + * @private + * Touch events input + * @constructor + * @extends Input + */ + + var SingleTouchInput = + /*#__PURE__*/ + function (_Input) { + _inheritsLoose(SingleTouchInput, _Input); + + function SingleTouchInput() { + var _this; + + var proto = SingleTouchInput.prototype; + proto.evTarget = SINGLE_TOUCH_TARGET_EVENTS; + proto.evWin = SINGLE_TOUCH_WINDOW_EVENTS; + _this = _Input.apply(this, arguments) || this; + _this.started = false; + return _this; + } + + var _proto = SingleTouchInput.prototype; + + _proto.handler = function handler(ev) { + var type = SINGLE_TOUCH_INPUT_MAP[ev.type]; // should we handle the touch events? + + if (type === INPUT_START) { + this.started = true; + } + + if (!this.started) { + return; + } + + var touches = normalizeSingleTouches.call(this, ev, type); // when done, reset the started state + + if (type & (INPUT_END | INPUT_CANCEL) && touches[0].length - touches[1].length === 0) { + this.started = false; + } + + this.callback(this.manager, type, { + pointers: touches[0], + changedPointers: touches[1], + pointerType: INPUT_TYPE_TOUCH, + srcEvent: ev + }); + }; + + return SingleTouchInput; + }(Input); + + function normalizeSingleTouches(ev, type) { + var all = toArray$1(ev.touches); + var changed = toArray$1(ev.changedTouches); + + if (type & (INPUT_END | INPUT_CANCEL)) { + all = uniqueArray(all.concat(changed), 'identifier', true); + } + + return [all, changed]; + } + /** + * @private + * This recognizer is just used as a base for the simple attribute recognizers. + * @constructor + * @extends Recognizer + */ + + + var AttrRecognizer = + /*#__PURE__*/ + function (_Recognizer) { + _inheritsLoose(AttrRecognizer, _Recognizer); + + function AttrRecognizer(options) { + if (options === void 0) { + options = {}; + } + + return _Recognizer.call(this, _extends({ + pointers: 1 + }, options)) || this; + } + /** + * @private + * Used to check if it the recognizer receives valid input, like input.distance > 10. + * @memberof AttrRecognizer + * @param {Object} input + * @returns {Boolean} recognized + */ + + + var _proto = AttrRecognizer.prototype; + + _proto.attrTest = function attrTest(input) { + var optionPointers = this.options.pointers; + return optionPointers === 0 || input.pointers.length === optionPointers; + }; + /** + * @private + * Process the input and return the state for the recognizer + * @memberof AttrRecognizer + * @param {Object} input + * @returns {*} State + */ + + + _proto.process = function process(input) { + var state = this.state; + var eventType = input.eventType; + var isRecognized = state & (STATE_BEGAN | STATE_CHANGED); + var isValid = this.attrTest(input); // on cancel input and we've recognized before, return STATE_CANCELLED + + if (isRecognized && (eventType & INPUT_CANCEL || !isValid)) { + return state | STATE_CANCELLED; + } else if (isRecognized || isValid) { + if (eventType & INPUT_END) { + return state | STATE_ENDED; + } else if (!(state & STATE_BEGAN)) { + return STATE_BEGAN; + } + + return state | STATE_CHANGED; + } + + return STATE_FAILED; + }; + + return AttrRecognizer; + }(Recognizer); + /** + * @private + * A tap is recognized when the pointer is doing a small tap/click. Multiple taps are recognized if they occur + * between the given interval and position. The delay option can be used to recognize multi-taps without firing + * a single tap. + * + * The eventData from the emitted event contains the property `tapCount`, which contains the amount of + * multi-taps being recognized. + * @constructor + * @extends Recognizer + */ + + + var TapRecognizer = + /*#__PURE__*/ + function (_Recognizer) { + _inheritsLoose(TapRecognizer, _Recognizer); + + function TapRecognizer(options) { + var _this; + + if (options === void 0) { + options = {}; + } + + _this = _Recognizer.call(this, _extends({ + event: 'tap', + pointers: 1, + taps: 1, + interval: 300, + // max time between the multi-tap taps + time: 250, + // max time of the pointer to be down (like finger on the screen) + threshold: 9, + // a minimal movement is ok, but keep it low + posThreshold: 10 + }, options)) || this; // previous time and center, + // used for tap counting + + _this.pTime = false; + _this.pCenter = false; + _this._timer = null; + _this._input = null; + _this.count = 0; + return _this; + } + + var _proto = TapRecognizer.prototype; + + _proto.getTouchAction = function getTouchAction() { + return [TOUCH_ACTION_MANIPULATION]; + }; + + _proto.process = function process(input) { + var _this2 = this; + + var options = this.options; + var validPointers = input.pointers.length === options.pointers; + var validMovement = input.distance < options.threshold; + var validTouchTime = input.deltaTime < options.time; + this.reset(); + + if (input.eventType & INPUT_START && this.count === 0) { + return this.failTimeout(); + } // we only allow little movement + // and we've reached an end event, so a tap is possible + + + if (validMovement && validTouchTime && validPointers) { + if (input.eventType !== INPUT_END) { + return this.failTimeout(); + } + + var validInterval = this.pTime ? input.timeStamp - this.pTime < options.interval : true; + var validMultiTap = !this.pCenter || getDistance(this.pCenter, input.center) < options.posThreshold; + this.pTime = input.timeStamp; + this.pCenter = input.center; + + if (!validMultiTap || !validInterval) { + this.count = 1; + } else { + this.count += 1; + } + + this._input = input; // if tap count matches we have recognized it, + // else it has began recognizing... + + var tapCount = this.count % options.taps; + + if (tapCount === 0) { + // no failing requirements, immediately trigger the tap event + // or wait as long as the multitap interval to trigger + if (!this.hasRequireFailures()) { + return STATE_RECOGNIZED; + } else { + this._timer = setTimeout(function () { + _this2.state = STATE_RECOGNIZED; + + _this2.tryEmit(); + }, options.interval); + return STATE_BEGAN; + } + } + } + + return STATE_FAILED; + }; + + _proto.failTimeout = function failTimeout() { + var _this3 = this; + + this._timer = setTimeout(function () { + _this3.state = STATE_FAILED; + }, this.options.interval); + return STATE_FAILED; + }; + + _proto.reset = function reset() { + clearTimeout(this._timer); + }; + + _proto.emit = function emit() { + if (this.state === STATE_RECOGNIZED) { + this._input.tapCount = this.count; + this.manager.emit(this.options.event, this._input); + } + }; + + return TapRecognizer; + }(Recognizer); + /** + * @private + * direction cons to string + * @param {constant} direction + * @returns {String} + */ + + + function directionStr(direction) { + if (direction === DIRECTION_DOWN) { + return 'down'; + } else if (direction === DIRECTION_UP) { + return 'up'; + } else if (direction === DIRECTION_LEFT) { + return 'left'; + } else if (direction === DIRECTION_RIGHT) { + return 'right'; + } + + return ''; + } + /** + * @private + * Pan + * Recognized when the pointer is down and moved in the allowed direction. + * @constructor + * @extends AttrRecognizer + */ + + + var PanRecognizer = + /*#__PURE__*/ + function (_AttrRecognizer) { + _inheritsLoose(PanRecognizer, _AttrRecognizer); + + function PanRecognizer(options) { + var _this; + + if (options === void 0) { + options = {}; + } + + _this = _AttrRecognizer.call(this, _extends({ + event: 'pan', + threshold: 10, + pointers: 1, + direction: DIRECTION_ALL + }, options)) || this; + _this.pX = null; + _this.pY = null; + return _this; + } + + var _proto = PanRecognizer.prototype; + + _proto.getTouchAction = function getTouchAction() { + var direction = this.options.direction; + var actions = []; + + if (direction & DIRECTION_HORIZONTAL) { + actions.push(TOUCH_ACTION_PAN_Y); + } + + if (direction & DIRECTION_VERTICAL) { + actions.push(TOUCH_ACTION_PAN_X); + } + + return actions; + }; + + _proto.directionTest = function directionTest(input) { + var options = this.options; + var hasMoved = true; + var distance = input.distance; + var direction = input.direction; + var x = input.deltaX; + var y = input.deltaY; // lock to axis? + + if (!(direction & options.direction)) { + if (options.direction & DIRECTION_HORIZONTAL) { + direction = x === 0 ? DIRECTION_NONE : x < 0 ? DIRECTION_LEFT : DIRECTION_RIGHT; + hasMoved = x !== this.pX; + distance = Math.abs(input.deltaX); + } else { + direction = y === 0 ? DIRECTION_NONE : y < 0 ? DIRECTION_UP : DIRECTION_DOWN; + hasMoved = y !== this.pY; + distance = Math.abs(input.deltaY); + } + } + + input.direction = direction; + return hasMoved && distance > options.threshold && direction & options.direction; + }; + + _proto.attrTest = function attrTest(input) { + return AttrRecognizer.prototype.attrTest.call(this, input) && ( // replace with a super call + this.state & STATE_BEGAN || !(this.state & STATE_BEGAN) && this.directionTest(input)); + }; + + _proto.emit = function emit(input) { + this.pX = input.deltaX; + this.pY = input.deltaY; + var direction = directionStr(input.direction); + + if (direction) { + input.additionalEvent = this.options.event + direction; + } + + _AttrRecognizer.prototype.emit.call(this, input); + }; + + return PanRecognizer; + }(AttrRecognizer); + /** + * @private + * Swipe + * Recognized when the pointer is moving fast (velocity), with enough distance in the allowed direction. + * @constructor + * @extends AttrRecognizer + */ + + + var SwipeRecognizer = + /*#__PURE__*/ + function (_AttrRecognizer) { + _inheritsLoose(SwipeRecognizer, _AttrRecognizer); + + function SwipeRecognizer(options) { + if (options === void 0) { + options = {}; + } + + return _AttrRecognizer.call(this, _extends({ + event: 'swipe', + threshold: 10, + velocity: 0.3, + direction: DIRECTION_HORIZONTAL | DIRECTION_VERTICAL, + pointers: 1 + }, options)) || this; + } + + var _proto = SwipeRecognizer.prototype; + + _proto.getTouchAction = function getTouchAction() { + return PanRecognizer.prototype.getTouchAction.call(this); + }; + + _proto.attrTest = function attrTest(input) { + var direction = this.options.direction; + var velocity; + + if (direction & (DIRECTION_HORIZONTAL | DIRECTION_VERTICAL)) { + velocity = input.overallVelocity; + } else if (direction & DIRECTION_HORIZONTAL) { + velocity = input.overallVelocityX; + } else if (direction & DIRECTION_VERTICAL) { + velocity = input.overallVelocityY; + } + + return _AttrRecognizer.prototype.attrTest.call(this, input) && direction & input.offsetDirection && input.distance > this.options.threshold && input.maxPointers === this.options.pointers && abs(velocity) > this.options.velocity && input.eventType & INPUT_END; + }; + + _proto.emit = function emit(input) { + var direction = directionStr(input.offsetDirection); + + if (direction) { + this.manager.emit(this.options.event + direction, input); + } + + this.manager.emit(this.options.event, input); + }; + + return SwipeRecognizer; + }(AttrRecognizer); + /** + * @private + * Pinch + * Recognized when two or more pointers are moving toward (zoom-in) or away from each other (zoom-out). + * @constructor + * @extends AttrRecognizer + */ + + + var PinchRecognizer = + /*#__PURE__*/ + function (_AttrRecognizer) { + _inheritsLoose(PinchRecognizer, _AttrRecognizer); + + function PinchRecognizer(options) { + if (options === void 0) { + options = {}; + } + + return _AttrRecognizer.call(this, _extends({ + event: 'pinch', + threshold: 0, + pointers: 2 + }, options)) || this; + } + + var _proto = PinchRecognizer.prototype; + + _proto.getTouchAction = function getTouchAction() { + return [TOUCH_ACTION_NONE]; + }; + + _proto.attrTest = function attrTest(input) { + return _AttrRecognizer.prototype.attrTest.call(this, input) && (Math.abs(input.scale - 1) > this.options.threshold || this.state & STATE_BEGAN); + }; + + _proto.emit = function emit(input) { + if (input.scale !== 1) { + var inOut = input.scale < 1 ? 'in' : 'out'; + input.additionalEvent = this.options.event + inOut; + } + + _AttrRecognizer.prototype.emit.call(this, input); + }; + + return PinchRecognizer; + }(AttrRecognizer); + /** + * @private + * Rotate + * Recognized when two or more pointer are moving in a circular motion. + * @constructor + * @extends AttrRecognizer + */ + + + var RotateRecognizer = + /*#__PURE__*/ + function (_AttrRecognizer) { + _inheritsLoose(RotateRecognizer, _AttrRecognizer); + + function RotateRecognizer(options) { + if (options === void 0) { + options = {}; + } + + return _AttrRecognizer.call(this, _extends({ + event: 'rotate', + threshold: 0, + pointers: 2 + }, options)) || this; + } + + var _proto = RotateRecognizer.prototype; + + _proto.getTouchAction = function getTouchAction() { + return [TOUCH_ACTION_NONE]; + }; + + _proto.attrTest = function attrTest(input) { + return _AttrRecognizer.prototype.attrTest.call(this, input) && (Math.abs(input.rotation) > this.options.threshold || this.state & STATE_BEGAN); + }; + + return RotateRecognizer; + }(AttrRecognizer); + /** + * @private + * Press + * Recognized when the pointer is down for x ms without any movement. + * @constructor + * @extends Recognizer + */ + + + var PressRecognizer = + /*#__PURE__*/ + function (_Recognizer) { + _inheritsLoose(PressRecognizer, _Recognizer); + + function PressRecognizer(options) { + var _this; + + if (options === void 0) { + options = {}; + } + + _this = _Recognizer.call(this, _extends({ + event: 'press', + pointers: 1, + time: 251, + // minimal time of the pointer to be pressed + threshold: 9 + }, options)) || this; + _this._timer = null; + _this._input = null; + return _this; + } + + var _proto = PressRecognizer.prototype; + + _proto.getTouchAction = function getTouchAction() { + return [TOUCH_ACTION_AUTO]; + }; + + _proto.process = function process(input) { + var _this2 = this; + + var options = this.options; + var validPointers = input.pointers.length === options.pointers; + var validMovement = input.distance < options.threshold; + var validTime = input.deltaTime > options.time; + this._input = input; // we only allow little movement + // and we've reached an end event, so a tap is possible + + if (!validMovement || !validPointers || input.eventType & (INPUT_END | INPUT_CANCEL) && !validTime) { + this.reset(); + } else if (input.eventType & INPUT_START) { + this.reset(); + this._timer = setTimeout(function () { + _this2.state = STATE_RECOGNIZED; + + _this2.tryEmit(); + }, options.time); + } else if (input.eventType & INPUT_END) { + return STATE_RECOGNIZED; + } + + return STATE_FAILED; + }; + + _proto.reset = function reset() { + clearTimeout(this._timer); + }; + + _proto.emit = function emit(input) { + if (this.state !== STATE_RECOGNIZED) { + return; + } + + if (input && input.eventType & INPUT_END) { + this.manager.emit(this.options.event + "up", input); + } else { + this._input.timeStamp = now(); + this.manager.emit(this.options.event, this._input); + } + }; + + return PressRecognizer; + }(Recognizer); + /** + * @private + * wrap a method with a deprecation warning and stack trace + * @param {Function} method + * @param {String} name + * @param {String} message + * @returns {Function} A new function wrapping the supplied method. + */ + + + function deprecate(method, name, message) { + var deprecationMessage = "DEPRECATED METHOD: " + name + "\n" + message + " AT \n"; + return function () { + var e = new Error('get-stack-trace'); + var stack = e && e.stack ? e.stack.replace(/^[^\(]+?[\n$]/gm, '').replace(/^\s+at\s+/gm, '').replace(/^Object.\s*\(/gm, '{anonymous}()@') : 'Unknown Stack Trace'; + var log = window.console && (window.console.warn || window.console.log); + + if (log) { + log.call(window.console, deprecationMessage, stack); + } + + return method.apply(this, arguments); + }; + } + /** + * @private + * extend object. + * means that properties in dest will be overwritten by the ones in src. + * @param {Object} dest + * @param {Object} src + * @param {Boolean} [merge=false] + * @returns {Object} dest + */ + + + var extend$1 = deprecate(function (dest, src, merge) { + var keys = Object.keys(src); + var i = 0; + + while (i < keys.length) { + if (!merge || merge && dest[keys[i]] === undefined) { + dest[keys[i]] = src[keys[i]]; + } + + i++; + } + + return dest; + }, 'extend', 'Use `assign`.'); + /** + * @private + * merge the values from src in the dest. + * means that properties that exist in dest will not be overwritten by src + * @param {Object} dest + * @param {Object} src + * @returns {Object} dest + */ + + var merge$1 = deprecate(function (dest, src) { + return extend$1(dest, src, true); + }, 'merge', 'Use `assign`.'); + /** + * @private + * simple class inheritance + * @param {Function} child + * @param {Function} base + * @param {Object} [properties] + */ + + function inherit(child, base, properties) { + var baseP = base.prototype; + var childP; + childP = child.prototype = Object.create(baseP); + childP.constructor = child; + childP._super = baseP; + + if (properties) { + assign$1(childP, properties); + } + } + /** + * @private + * simple function bind + * @param {Function} fn + * @param {Object} context + * @returns {Function} + */ + + + function bindFn(fn, context) { + return function boundFn() { + return fn.apply(context, arguments); + }; + } + /** + * @private + * Simple way to create a manager with a default set of recognizers. + * @param {HTMLElement} element + * @param {Object} [options] + * @constructor + */ + + + var Hammer = + /*#__PURE__*/ + function () { + var Hammer = + /** + * @private + * @const {string} + */ + function Hammer(element, options) { + if (options === void 0) { + options = {}; + } + + return new Manager(element, _extends({ + recognizers: [// RecognizerClass, options, [recognizeWith, ...], [requireFailure, ...] + [RotateRecognizer, { + enable: false + }], [PinchRecognizer, { + enable: false + }, ['rotate']], [SwipeRecognizer, { + direction: DIRECTION_HORIZONTAL + }], [PanRecognizer, { + direction: DIRECTION_HORIZONTAL + }, ['swipe']], [TapRecognizer], [TapRecognizer, { + event: 'doubletap', + taps: 2 + }, ['tap']], [PressRecognizer]] + }, options)); + }; + + Hammer.VERSION = "2.0.15"; + Hammer.DIRECTION_ALL = DIRECTION_ALL; + Hammer.DIRECTION_DOWN = DIRECTION_DOWN; + Hammer.DIRECTION_LEFT = DIRECTION_LEFT; + Hammer.DIRECTION_RIGHT = DIRECTION_RIGHT; + Hammer.DIRECTION_UP = DIRECTION_UP; + Hammer.DIRECTION_HORIZONTAL = DIRECTION_HORIZONTAL; + Hammer.DIRECTION_VERTICAL = DIRECTION_VERTICAL; + Hammer.DIRECTION_NONE = DIRECTION_NONE; + Hammer.DIRECTION_DOWN = DIRECTION_DOWN; + Hammer.INPUT_START = INPUT_START; + Hammer.INPUT_MOVE = INPUT_MOVE; + Hammer.INPUT_END = INPUT_END; + Hammer.INPUT_CANCEL = INPUT_CANCEL; + Hammer.STATE_POSSIBLE = STATE_POSSIBLE; + Hammer.STATE_BEGAN = STATE_BEGAN; + Hammer.STATE_CHANGED = STATE_CHANGED; + Hammer.STATE_ENDED = STATE_ENDED; + Hammer.STATE_RECOGNIZED = STATE_RECOGNIZED; + Hammer.STATE_CANCELLED = STATE_CANCELLED; + Hammer.STATE_FAILED = STATE_FAILED; + Hammer.Manager = Manager; + Hammer.Input = Input; + Hammer.TouchAction = TouchAction; + Hammer.TouchInput = TouchInput; + Hammer.MouseInput = MouseInput; + Hammer.PointerEventInput = PointerEventInput; + Hammer.TouchMouseInput = TouchMouseInput; + Hammer.SingleTouchInput = SingleTouchInput; + Hammer.Recognizer = Recognizer; + Hammer.AttrRecognizer = AttrRecognizer; + Hammer.Tap = TapRecognizer; + Hammer.Pan = PanRecognizer; + Hammer.Swipe = SwipeRecognizer; + Hammer.Pinch = PinchRecognizer; + Hammer.Rotate = RotateRecognizer; + Hammer.Press = PressRecognizer; + Hammer.on = addEventListeners; + Hammer.off = removeEventListeners; + Hammer.each = each; + Hammer.merge = merge$1; + Hammer.extend = extend$1; + Hammer.bindFn = bindFn; + Hammer.assign = assign$1; + Hammer.inherit = inherit; + Hammer.bindFn = bindFn; + Hammer.prefixed = prefixed; + Hammer.toArray = toArray$1; + Hammer.inArray = inArray; + Hammer.uniqueArray = uniqueArray; + Hammer.splitStr = splitStr; + Hammer.boolOrFn = boolOrFn; + Hammer.hasParent = hasParent$1; + Hammer.addEventListeners = addEventListeners; + Hammer.removeEventListeners = removeEventListeners; + Hammer.defaults = defaults; + return Hammer; + }(); + + var hammer = createCommonjsModule$2(function (module) { + /** + * Setup a mock hammer.js object, for unit testing. + * + * Inspiration: https://github.com/uber/deck.gl/pull/658 + * + * @returns {{on: noop, off: noop, destroy: noop, emit: noop, get: get}} + */ + function hammerMock() { + var noop = function noop() {}; + + return { + on: noop, + off: noop, + destroy: noop, + emit: noop, + get: function get(m) { + //eslint-disable-line no-unused-vars + return { + set: noop + }; + } + }; + } + + if (typeof window !== 'undefined') { + var Hammer$1 = window['Hammer'] || Hammer; + module.exports = Hammer$1; + } else { + module.exports = function () { + // hammer.js is only available in a browser, not in node.js. Replacing it with a mock object. + return hammerMock(); + }; + } + }); + + var hammer$1 = /*#__PURE__*/Object.freeze({ + 'default': hammer, + __moduleExports: hammer + }); + + getCjsExportFromNamespace(Activator); + + /** + * Turn an element into an clickToUse element. + * When not active, the element has a transparent overlay. When the overlay is + * clicked, the mode is changed to active. + * When active, the element is displayed with a blue border around it, and + * the interactive contents of the element can be used. When clicked outside + * the element, the elements mode is changed to inactive. + * @param {Element} container + * @constructor Activator + */ + + function Activator$1(container) { + this.active = false; + this.dom = { + container: container + }; + this.dom.overlay = document.createElement('div'); + this.dom.overlay.className = 'vis-overlay'; + this.dom.container.appendChild(this.dom.overlay); + this.hammer = hammer(this.dom.overlay); + this.hammer.on('tap', this._onTapOverlay.bind(this)); // block all touch events (except tap) + + var me = this; + var events = ['tap', 'doubletap', 'press', 'pinch', 'pan', 'panstart', 'panmove', 'panend']; + events.forEach(function (event) { + me.hammer.on(event, function (event) { + event.stopPropagation(); + }); + }); // attach a click event to the window, in order to deactivate when clicking outside the timeline + + if (document && document.body) { + this.onClick = function (event) { + if (!_hasParent(event.target, container)) { + me.deactivate(); + } + }; + + document.body.addEventListener('click', this.onClick); + } + + if (this.keycharm !== undefined) { + this.keycharm.destroy(); + } + + this.keycharm = keycharm(); // keycharm listener only bounded when active) + + this.escListener = this.deactivate.bind(this); + } // turn into an event emitter + + + componentEmitter(Activator$1.prototype); // The currently active activator + + Activator$1.current = null; + /** + * Destroy the activator. Cleans up all created DOM and event listeners + */ + + Activator$1.prototype.destroy = function () { + this.deactivate(); // remove dom + + this.dom.overlay.parentNode.removeChild(this.dom.overlay); // remove global event listener + + if (this.onClick) { + document.body.removeEventListener('click', this.onClick); + } // remove keycharm + + + if (this.keycharm !== undefined) { + this.keycharm.destroy(); + } + + this.keycharm = null; // cleanup hammer instances + + this.hammer.destroy(); + this.hammer = null; // FIXME: cleaning up hammer instances doesn't work (Timeline not removed from memory) + }; + /** + * Activate the element + * Overlay is hidden, element is decorated with a blue shadow border + */ + + + Activator$1.prototype.activate = function () { + // we allow only one active activator at a time + if (Activator$1.current) { + Activator$1.current.deactivate(); + } + + Activator$1.current = this; + this.active = true; + this.dom.overlay.style.display = 'none'; + util.addClassName(this.dom.container, 'vis-active'); + this.emit('change'); + this.emit('activate'); // ugly hack: bind ESC after emitting the events, as the Network rebinds all + // keyboard events on a 'change' event + + this.keycharm.bind('esc', this.escListener); + }; + /** + * Deactivate the element + * Overlay is displayed on top of the element + */ + + + Activator$1.prototype.deactivate = function () { + this.active = false; + this.dom.overlay.style.display = ''; + util.removeClassName(this.dom.container, 'vis-active'); + this.keycharm.unbind('esc', this.escListener); + this.emit('change'); + this.emit('deactivate'); + }; + /** + * Handle a tap event: activate the container + * @param {Event} event The event + * @private + */ + + + Activator$1.prototype._onTapOverlay = function (event) { + // activate the container + this.activate(); + event.stopPropagation(); + }; + /** + * Test whether the element has the requested parent element somewhere in + * its chain of parent nodes. + * @param {HTMLElement} element + * @param {HTMLElement} parent + * @returns {boolean} Returns true when the parent is found somewhere in the + * chain of parent nodes. + * @private + */ + + + function _hasParent(element, parent) { + while (element) { + if (element === parent) { + return true; + } + + element = element.parentNode; + } + + return false; + } + + var Activator_1 = Activator$1; + + var locales = createCommonjsModule$2(function (module, exports) { + // English + exports['en'] = { + edit: 'Edit', + del: 'Delete selected', + back: 'Back', + addNode: 'Add Node', + addEdge: 'Add Edge', + editNode: 'Edit Node', + editEdge: 'Edit Edge', + addDescription: 'Click in an empty space to place a new node.', + edgeDescription: 'Click on a node and drag the edge to another node to connect them.', + editEdgeDescription: 'Click on the control points and drag them to a node to connect to it.', + createEdgeError: 'Cannot link edges to a cluster.', + deleteClusterError: 'Clusters cannot be deleted.', + editClusterError: 'Clusters cannot be edited.' + }; + exports['en_EN'] = exports['en']; + exports['en_US'] = exports['en']; // German + + exports['de'] = { + edit: 'Editieren', + del: "L\xF6sche Auswahl", + back: "Zur\xFCck", + addNode: "Knoten hinzuf\xFCgen", + addEdge: "Kante hinzuf\xFCgen", + editNode: 'Knoten editieren', + editEdge: 'Kante editieren', + addDescription: 'Klicke auf eine freie Stelle, um einen neuen Knoten zu plazieren.', + edgeDescription: 'Klicke auf einen Knoten und ziehe die Kante zu einem anderen Knoten, um diese zu verbinden.', + editEdgeDescription: 'Klicke auf die Verbindungspunkte und ziehe diese auf einen Knoten, um sie zu verbinden.', + createEdgeError: "Es ist nicht m\xF6glich, Kanten mit Clustern zu verbinden.", + deleteClusterError: "Cluster k\xF6nnen nicht gel\xF6scht werden.", + editClusterError: "Cluster k\xF6nnen nicht editiert werden." + }; + exports['de_DE'] = exports['de']; // Spanish + + exports['es'] = { + edit: 'Editar', + del: "Eliminar selecci\xF3n", + back: "Atr\xE1s", + addNode: "A\xF1adir nodo", + addEdge: "A\xF1adir arista", + editNode: 'Editar nodo', + editEdge: 'Editar arista', + addDescription: "Haga clic en un lugar vac\xEDo para colocar un nuevo nodo.", + edgeDescription: 'Haga clic en un nodo y arrastre la arista hacia otro nodo para conectarlos.', + editEdgeDescription: 'Haga clic en un punto de control y arrastrelo a un nodo para conectarlo.', + createEdgeError: 'No se puede conectar una arista a un grupo.', + deleteClusterError: 'No es posible eliminar grupos.', + editClusterError: 'No es posible editar grupos.' + }; + exports['es_ES'] = exports['es']; //Italiano + + exports['it'] = { + edit: 'Modifica', + del: 'Cancella la selezione', + back: 'Indietro', + addNode: 'Aggiungi un nodo', + addEdge: 'Aggiungi un vertice', + editNode: 'Modifica il nodo', + editEdge: 'Modifica il vertice', + addDescription: 'Clicca per aggiungere un nuovo nodo', + edgeDescription: 'Clicca su un nodo e trascinalo ad un altro nodo per connetterli.', + editEdgeDescription: 'Clicca sui Punti di controllo e trascinali ad un nodo per connetterli.', + createEdgeError: 'Non si possono collegare vertici ad un cluster', + deleteClusterError: 'I cluster non possono essere cancellati', + editClusterError: 'I clusters non possono essere modificati.' + }; + exports['it_IT'] = exports['it']; // Dutch + + exports['nl'] = { + edit: 'Wijzigen', + del: 'Selectie verwijderen', + back: 'Terug', + addNode: 'Node toevoegen', + addEdge: 'Link toevoegen', + editNode: 'Node wijzigen', + editEdge: 'Link wijzigen', + addDescription: 'Klik op een leeg gebied om een nieuwe node te maken.', + edgeDescription: 'Klik op een node en sleep de link naar een andere node om ze te verbinden.', + editEdgeDescription: 'Klik op de verbindingspunten en sleep ze naar een node om daarmee te verbinden.', + createEdgeError: 'Kan geen link maken naar een cluster.', + deleteClusterError: 'Clusters kunnen niet worden verwijderd.', + editClusterError: 'Clusters kunnen niet worden aangepast.' + }; + exports['nl_NL'] = exports['nl']; + exports['nl_BE'] = exports['nl']; // Portuguese Brazil + + exports['pt-br'] = { + edit: 'Editar', + del: 'Remover selecionado', + back: 'Voltar', + addNode: 'Adicionar nó', + addEdge: 'Adicionar aresta', + editNode: 'Editar nó', + editEdge: 'Editar aresta', + addDescription: 'Clique em um espaço em branco para adicionar um novo nó', + edgeDescription: 'Clique em um nó e arraste a aresta até outro nó para conectá-los', + editEdgeDescription: 'Clique nos pontos de controle e os arraste para um nó para conectá-los', + createEdgeError: 'Não foi possível linkar arestas a um cluster.', + deleteClusterError: 'Clusters não puderam ser removidos.', + editClusterError: 'Clusters não puderam ser editados.' + }; + exports['pt-BR'] = exports['pt-br']; + exports['pt_BR'] = exports['pt-br']; + exports['pt_br'] = exports['pt-br']; // Russian + + exports['ru'] = { + edit: 'Редактировать', + del: 'Удалить выбранное', + back: 'Назад', + addNode: 'Добавить узел', + addEdge: 'Добавить ребро', + editNode: 'Редактировать узел', + editEdge: 'Редактировать ребро', + addDescription: 'Кликните в свободное место, чтобы добавить новый узел.', + edgeDescription: 'Кликните на узел и протяните ребро к другому узлу, чтобы соединить их.', + editEdgeDescription: 'Кликните на контрольные точки и перетащите их в узел, чтобы подключиться к нему.', + createEdgeError: 'Невозможно соединить ребра в кластер.', + deleteClusterError: 'Кластеры не могут быть удалены', + editClusterError: 'Кластеры недоступны для редактирования.' + }; + exports['ru_RU'] = exports['ru']; // Chinese + + exports['cn'] = { + edit: '编辑', + del: '删除选定', + back: '返回', + addNode: '添加节点', + addEdge: '添加连接线', + editNode: '编辑节点', + editEdge: '编辑连接线', + addDescription: '单击空白处放置新节点。', + edgeDescription: '单击某个节点并将该连接线拖动到另一个节点以连接它们。', + editEdgeDescription: '单击控制节点并将它们拖到节点上连接。', + createEdgeError: '无法将连接线连接到群集。', + deleteClusterError: '无法删除群集。', + editClusterError: '无法编辑群集。' + }; + exports['zh_CN'] = exports['cn']; // Ukrainian + + exports['uk'] = { + edit: 'Редагувати', + del: 'Видалити обране', + back: 'Назад', + addNode: 'Додати вузол', + addEdge: 'Додати край', + editNode: 'Редагувати вузол', + editEdge: 'Редагувати край', + addDescription: 'Kлікніть на вільне місце, щоб додати новий вузол.', + edgeDescription: 'Клікніть на вузол і перетягніть край до іншого вузла, щоб їх з\'єднати.', + editEdgeDescription: 'Клікніть на контрольні точки і перетягніть їх у вузол, щоб підключитися до нього.', + createEdgeError: 'Не можливо об\'єднати краї в групу.', + deleteClusterError: 'Групи не можуть бути видалені.', + editClusterError: 'Групи недоступні для редагування.' + }; + exports['uk_UA'] = exports['uk']; // French + + exports['fr'] = { + edit: 'Editer', + del: 'Effacer la selection', + back: 'Retour', + addNode: 'Ajouter un noeud', + addEdge: 'Ajouter un lien', + editNode: 'Editer le noeud', + editEdge: 'Editer le lien', + addDescription: 'Cliquez dans un endroit vide pour placer un noeud.', + edgeDescription: 'Cliquez sur un noeud et glissez le lien vers un autre noeud pour les connecter.', + editEdgeDescription: 'Cliquez sur les points de contrôle et glissez-les pour connecter un noeud.', + createEdgeError: 'Impossible de créer un lien vers un cluster.', + deleteClusterError: 'Les clusters ne peuvent pas être éffacés.', + editClusterError: 'Les clusters ne peuvent pas être édites.' + }; + exports['fr_FR'] = exports['fr']; // Czech + + exports['cs'] = { + edit: 'Upravit', + del: 'Smazat výběr', + back: 'Zpět', + addNode: 'Přidat vrchol', + addEdge: 'Přidat hranu', + editNode: 'Upravit vrchol', + editEdge: 'Upravit hranu', + addDescription: 'Kluknutím do prázdného prostoru můžete přidat nový vrchol.', + edgeDescription: 'Přetažením z jednoho vrcholu do druhého můžete spojit tyto vrcholy novou hranou.', + editEdgeDescription: 'Přetažením kontrolního vrcholu hrany ji můžete připojit k jinému vrcholu.', + createEdgeError: 'Nelze připojit hranu ke shluku.', + deleteClusterError: 'Nelze mazat shluky.', + editClusterError: 'Nelze upravovat shluky.' + }; + exports['cs_CZ'] = exports['cs']; + }); + + function _classCallCheck$1(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } + } + + var classCallCheck$1 = _classCallCheck$1; + + function _defineProperties$1(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + + function _createClass$1(Constructor, protoProps, staticProps) { + if (protoProps) _defineProperties$1(Constructor.prototype, protoProps); + if (staticProps) _defineProperties$1(Constructor, staticProps); + return Constructor; + } + + var createClass$1 = _createClass$1; + + /** + * Associates a canvas to a given image, containing a number of renderings + * of the image at various sizes. + * + * This technique is known as 'mipmapping'. + * + * NOTE: Images can also be of type 'data:svg+xml`. This code also works + * for svg, but the mipmapping may not be necessary. + * + * @param {Image} image + */ + var CachedImage = + /*#__PURE__*/ + function () { + /** + * @ignore + */ + function CachedImage() { + classCallCheck$1(this, CachedImage); + + // eslint-disable-line no-unused-vars + this.NUM_ITERATIONS = 4; // Number of items in the coordinates array + + this.image = new Image(); + this.canvas = document.createElement('canvas'); + } + /** + * Called when the image has been successfully loaded. + */ + + + createClass$1(CachedImage, [{ + key: "init", + value: function init() { + if (this.initialized()) return; + this.src = this.image.src; // For same interface with Image + + var w = this.image.width; + var h = this.image.height; // Ease external access + + this.width = w; + this.height = h; + var h2 = Math.floor(h / 2); + var h4 = Math.floor(h / 4); + var h8 = Math.floor(h / 8); + var h16 = Math.floor(h / 16); + var w2 = Math.floor(w / 2); + var w4 = Math.floor(w / 4); + var w8 = Math.floor(w / 8); + var w16 = Math.floor(w / 16); // Make canvas as small as possible + + this.canvas.width = 3 * w4; + this.canvas.height = h2; // Coordinates and sizes of images contained in the canvas + // Values per row: [top x, left y, width, height] + + this.coordinates = [[0, 0, w2, h2], [w2, 0, w4, h4], [w2, h4, w8, h8], [5 * w8, h4, w16, h16]]; + + this._fillMipMap(); + } + /** + * @return {Boolean} true if init() has been called, false otherwise. + */ + + }, { + key: "initialized", + value: function initialized() { + return this.coordinates !== undefined; + } + /** + * Redraw main image in various sizes to the context. + * + * The rationale behind this is to reduce artefacts due to interpolation + * at differing zoom levels. + * + * Source: http://stackoverflow.com/q/18761404/1223531 + * + * This methods takes the resizing out of the drawing loop, in order to + * reduce performance overhead. + * + * TODO: The code assumes that a 2D context can always be gotten. This is + * not necessarily true! OTOH, if not true then usage of this class + * is senseless. + * + * @private + */ + + }, { + key: "_fillMipMap", + value: function _fillMipMap() { + var ctx = this.canvas.getContext('2d'); // First zoom-level comes from the image + + var to = this.coordinates[0]; + ctx.drawImage(this.image, to[0], to[1], to[2], to[3]); // The rest are copy actions internal to the canvas/context + + for (var iterations = 1; iterations < this.NUM_ITERATIONS; iterations++) { + var from = this.coordinates[iterations - 1]; + var _to = this.coordinates[iterations]; + ctx.drawImage(this.canvas, from[0], from[1], from[2], from[3], _to[0], _to[1], _to[2], _to[3]); + } + } + /** + * Draw the image, using the mipmap if necessary. + * + * MipMap is only used if param factor > 2; otherwise, original bitmap + * is resized. This is also used to skip mipmap usage, e.g. by setting factor = 1 + * + * Credits to 'Alex de Mulder' for original implementation. + * + * @param {CanvasRenderingContext2D} ctx context on which to draw zoomed image + * @param {Float} factor scale factor at which to draw + * @param {number} left + * @param {number} top + * @param {number} width + * @param {number} height + */ + + }, { + key: "drawImageAtPosition", + value: function drawImageAtPosition(ctx, factor, left, top, width, height) { + if (!this.initialized()) return; //can't draw image yet not intialized + + if (factor > 2) { + // Determine which zoomed image to use + factor *= 0.5; + var iterations = 0; + + while (factor > 2 && iterations < this.NUM_ITERATIONS) { + factor *= 0.5; + iterations += 1; + } + + if (iterations >= this.NUM_ITERATIONS) { + iterations = this.NUM_ITERATIONS - 1; + } //console.log("iterations: " + iterations); + + + var from = this.coordinates[iterations]; + ctx.drawImage(this.canvas, from[0], from[1], from[2], from[3], left, top, width, height); + } else { + // Draw image directly + ctx.drawImage(this.image, left, top, width, height); + } + } + }]); + + return CachedImage; + }(); + + /** + * This callback is a callback that accepts an Image. + * @callback ImageCallback + * @param {Image} image + */ + + /** + * This class loads images and keeps them stored. + * + * @param {ImageCallback} callback + */ + + var Images = + /*#__PURE__*/ + function () { + /** + * @param {ImageCallback} callback + */ + function Images(callback) { + classCallCheck$1(this, Images); + + this.images = {}; + this.imageBroken = {}; + this.callback = callback; + } + /** + * @param {string} url The original Url that failed to load, if the broken image is successfully loaded it will be added to the cache using this Url as the key so that subsequent requests for this Url will return the broken image + * @param {string} brokenUrl Url the broken image to try and load + * @param {Image} imageToLoadBrokenUrlOn The image object + */ + + + createClass$1(Images, [{ + key: "_tryloadBrokenUrl", + value: function _tryloadBrokenUrl(url, brokenUrl, imageToLoadBrokenUrlOn) { + //If these parameters aren't specified then exit the function because nothing constructive can be done + if (url === undefined || imageToLoadBrokenUrlOn === undefined) return; + + if (brokenUrl === undefined) { + console.warn("No broken url image defined"); + return; + } //Clear the old subscription to the error event and put a new in place that only handle errors in loading the brokenImageUrl + + + imageToLoadBrokenUrlOn.image.onerror = function () { + console.error("Could not load brokenImage:", brokenUrl); // cache item will contain empty image, this should be OK for default + }; //Set the source of the image to the brokenUrl, this is actually what kicks off the loading of the broken image + + + imageToLoadBrokenUrlOn.image.src = brokenUrl; + } + /** + * + * @param {vis.Image} imageToRedrawWith + * @private + */ + + }, { + key: "_redrawWithImage", + value: function _redrawWithImage(imageToRedrawWith) { + if (this.callback) { + this.callback(imageToRedrawWith); + } + } + /** + * @param {string} url Url of the image + * @param {string} brokenUrl Url of an image to use if the url image is not found + * @return {Image} img The image object + */ + + }, { + key: "load", + value: function load(url, brokenUrl) { + var _this = this; + + //Try and get the image from the cache, if successful then return the cached image + var cachedImage = this.images[url]; + if (cachedImage) return cachedImage; //Create a new image + + var img = new CachedImage(); // Need to add to cache here, otherwise final return will spawn different copies of the same image, + // Also, there will be multiple loads of the same image. + + this.images[url] = img; //Subscribe to the event that is raised if the image loads successfully + + img.image.onload = function () { + // Properly init the cached item and then request a redraw + _this._fixImageCoordinates(img.image); + + img.init(); + + _this._redrawWithImage(img); + }; //Subscribe to the event that is raised if the image fails to load + + + img.image.onerror = function () { + console.error("Could not load image:", url); //Try and load the image specified by the brokenUrl using + + _this._tryloadBrokenUrl(url, brokenUrl, img); + }; //Set the source of the image to the url, this is what actually kicks off the loading of the image + + + img.image.src = url; //Return the new image + + return img; + } + /** + * IE11 fix -- thanks dponch! + * + * Local helper function + * @param {vis.Image} imageToCache + * @private + */ + + }, { + key: "_fixImageCoordinates", + value: function _fixImageCoordinates(imageToCache) { + if (imageToCache.width === 0) { + document.body.appendChild(imageToCache); + imageToCache.width = imageToCache.offsetWidth; + imageToCache.height = imageToCache.offsetHeight; + document.body.removeChild(imageToCache); + } + } + }]); + + return Images; + }(); + + /** + * This class can store groups and options specific for groups. + */ + + var Groups = + /*#__PURE__*/ + function () { + /** + * @ignore + */ + function Groups() { + classCallCheck$1(this, Groups); + + this.clear(); + this.defaultIndex = 0; + this.groupsArray = []; + this.groupIndex = 0; + this.defaultGroups = [{ + border: "#2B7CE9", + background: "#97C2FC", + highlight: { + border: "#2B7CE9", + background: "#D2E5FF" + }, + hover: { + border: "#2B7CE9", + background: "#D2E5FF" + } + }, // 0: blue + { + border: "#FFA500", + background: "#FFFF00", + highlight: { + border: "#FFA500", + background: "#FFFFA3" + }, + hover: { + border: "#FFA500", + background: "#FFFFA3" + } + }, // 1: yellow + { + border: "#FA0A10", + background: "#FB7E81", + highlight: { + border: "#FA0A10", + background: "#FFAFB1" + }, + hover: { + border: "#FA0A10", + background: "#FFAFB1" + } + }, // 2: red + { + border: "#41A906", + background: "#7BE141", + highlight: { + border: "#41A906", + background: "#A1EC76" + }, + hover: { + border: "#41A906", + background: "#A1EC76" + } + }, // 3: green + { + border: "#E129F0", + background: "#EB7DF4", + highlight: { + border: "#E129F0", + background: "#F0B3F5" + }, + hover: { + border: "#E129F0", + background: "#F0B3F5" + } + }, // 4: magenta + { + border: "#7C29F0", + background: "#AD85E4", + highlight: { + border: "#7C29F0", + background: "#D3BDF0" + }, + hover: { + border: "#7C29F0", + background: "#D3BDF0" + } + }, // 5: purple + { + border: "#C37F00", + background: "#FFA807", + highlight: { + border: "#C37F00", + background: "#FFCA66" + }, + hover: { + border: "#C37F00", + background: "#FFCA66" + } + }, // 6: orange + { + border: "#4220FB", + background: "#6E6EFD", + highlight: { + border: "#4220FB", + background: "#9B9BFD" + }, + hover: { + border: "#4220FB", + background: "#9B9BFD" + } + }, // 7: darkblue + { + border: "#FD5A77", + background: "#FFC0CB", + highlight: { + border: "#FD5A77", + background: "#FFD1D9" + }, + hover: { + border: "#FD5A77", + background: "#FFD1D9" + } + }, // 8: pink + { + border: "#4AD63A", + background: "#C2FABC", + highlight: { + border: "#4AD63A", + background: "#E6FFE3" + }, + hover: { + border: "#4AD63A", + background: "#E6FFE3" + } + }, // 9: mint + { + border: "#990000", + background: "#EE0000", + highlight: { + border: "#BB0000", + background: "#FF3333" + }, + hover: { + border: "#BB0000", + background: "#FF3333" + } + }, // 10:bright red + { + border: "#FF6000", + background: "#FF6000", + highlight: { + border: "#FF6000", + background: "#FF6000" + }, + hover: { + border: "#FF6000", + background: "#FF6000" + } + }, // 12: real orange + { + border: "#97C2FC", + background: "#2B7CE9", + highlight: { + border: "#D2E5FF", + background: "#2B7CE9" + }, + hover: { + border: "#D2E5FF", + background: "#2B7CE9" + } + }, // 13: blue + { + border: "#399605", + background: "#255C03", + highlight: { + border: "#399605", + background: "#255C03" + }, + hover: { + border: "#399605", + background: "#255C03" + } + }, // 14: green + { + border: "#B70054", + background: "#FF007E", + highlight: { + border: "#B70054", + background: "#FF007E" + }, + hover: { + border: "#B70054", + background: "#FF007E" + } + }, // 15: magenta + { + border: "#AD85E4", + background: "#7C29F0", + highlight: { + border: "#D3BDF0", + background: "#7C29F0" + }, + hover: { + border: "#D3BDF0", + background: "#7C29F0" + } + }, // 16: purple + { + border: "#4557FA", + background: "#000EA1", + highlight: { + border: "#6E6EFD", + background: "#000EA1" + }, + hover: { + border: "#6E6EFD", + background: "#000EA1" + } + }, // 17: darkblue + { + border: "#FFC0CB", + background: "#FD5A77", + highlight: { + border: "#FFD1D9", + background: "#FD5A77" + }, + hover: { + border: "#FFD1D9", + background: "#FD5A77" + } + }, // 18: pink + { + border: "#C2FABC", + background: "#74D66A", + highlight: { + border: "#E6FFE3", + background: "#74D66A" + }, + hover: { + border: "#E6FFE3", + background: "#74D66A" + } + }, // 19: mint + { + border: "#EE0000", + background: "#990000", + highlight: { + border: "#FF3333", + background: "#BB0000" + }, + hover: { + border: "#FF3333", + background: "#BB0000" + } // 20:bright red + + }]; + this.options = {}; + this.defaultOptions = { + useDefaultGroups: true + }; + util.extend(this.options, this.defaultOptions); + } + /** + * + * @param {Object} options + */ + + + createClass$1(Groups, [{ + key: "setOptions", + value: function setOptions(options) { + var optionFields = ['useDefaultGroups']; + + if (options !== undefined) { + for (var groupName in options) { + if (options.hasOwnProperty(groupName)) { + if (optionFields.indexOf(groupName) === -1) { + var group = options[groupName]; + this.add(groupName, group); + } + } + } + } + } + /** + * Clear all groups + */ + + }, { + key: "clear", + value: function clear() { + this.groups = {}; + this.groupsArray = []; + } + /** + * Get group options of a groupname. + * If groupname is not found, a new group may be created. + * + * @param {*} groupname Can be a number, string, Date, etc. + * @param {boolean} [shouldCreate=true] If true, create a new group + * @return {Object} The found or created group + */ + + }, { + key: "get", + value: function get(groupname) { + var shouldCreate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; + var group = this.groups[groupname]; + + if (group === undefined && shouldCreate) { + if (this.options.useDefaultGroups === false && this.groupsArray.length > 0) { + // create new group + var index = this.groupIndex % this.groupsArray.length; + this.groupIndex++; + group = {}; + group.color = this.groups[this.groupsArray[index]]; + this.groups[groupname] = group; + } else { + // create new group + var _index = this.defaultIndex % this.defaultGroups.length; + + this.defaultIndex++; + group = {}; + group.color = this.defaultGroups[_index]; + this.groups[groupname] = group; + } + } + + return group; + } + /** + * Add a custom group style + * @param {string} groupName + * @param {Object} style An object containing borderColor, + * backgroundColor, etc. + * @return {Object} group The created group object + */ + + }, { + key: "add", + value: function add(groupName, style) { + this.groups[groupName] = style; + this.groupsArray.push(groupName); + return style; + } + }]); + + return Groups; + }(); + + function _arrayWithHoles(arr) { + if (Array.isArray(arr)) return arr; + } + + var arrayWithHoles = _arrayWithHoles; + + function _iterableToArrayLimit(arr, i) { + var _arr = []; + var _n = true; + var _d = false; + var _e = undefined; + + try { + for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { + _arr.push(_s.value); + + if (i && _arr.length === i) break; + } + } catch (err) { + _d = true; + _e = err; + } finally { + try { + if (!_n && _i["return"] != null) _i["return"](); + } finally { + if (_d) throw _e; + } + } + + return _arr; + } + + var iterableToArrayLimit = _iterableToArrayLimit; + + function _nonIterableRest() { + throw new TypeError("Invalid attempt to destructure non-iterable instance"); + } + + var nonIterableRest = _nonIterableRest; + + function _slicedToArray(arr, i) { + return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || nonIterableRest(); + } + + var slicedToArray = _slicedToArray; + + var _typeof_1$1 = createCommonjsModule$2(function (module) { + function _typeof2(obj) { + if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { + _typeof2 = function _typeof2(obj) { + return typeof obj; + }; + } else { + _typeof2 = function _typeof2(obj) { + return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; + }; + } + + return _typeof2(obj); + } + + function _typeof(obj) { + if (typeof Symbol === "function" && _typeof2(Symbol.iterator) === "symbol") { + module.exports = _typeof = function _typeof(obj) { + return _typeof2(obj); + }; + } else { + module.exports = _typeof = function _typeof(obj) { + return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : _typeof2(obj); + }; + } + + return _typeof(obj); + } + + module.exports = _typeof; + }); + + /** + * Helper functions for components + * @class + */ + + var ComponentUtil = + /*#__PURE__*/ + function () { + function ComponentUtil() { + classCallCheck$1(this, ComponentUtil); + } + + createClass$1(ComponentUtil, null, [{ + key: "choosify", + + /** + * Determine values to use for (sub)options of 'chosen'. + * + * This option is either a boolean or an object whose values should be examined further. + * The relevant structures are: + * + * - chosen: + * - chosen: { subOption: } + * + * Where subOption is 'node', 'edge' or 'label'. + * + * The intention of this method appears to be to set a specific priority to the options; + * Since most properties are either bridged or merged into the local options objects, there + * is not much point in handling them separately. + * TODO: examine if 'most' in previous sentence can be replaced with 'all'. In that case, we + * should be able to get rid of this method. + * + * @param {string} subOption option within object 'chosen' to consider; either 'node', 'edge' or 'label' + * @param {Object} pile array of options objects to consider + * + * @return {boolean|function} value for passed subOption of 'chosen' to use + */ + value: function choosify(subOption, pile) { + // allowed values for subOption + var allowed = ['node', 'edge', 'label']; + var value = true; + var chosen = util.topMost(pile, 'chosen'); + + if (typeof chosen === 'boolean') { + value = chosen; + } else if (_typeof_1$1(chosen) === 'object') { + if (allowed.indexOf(subOption) === -1) { + throw new Error('choosify: subOption \'' + subOption + '\' should be one of ' + "'" + allowed.join("', '") + "'"); + } + + var chosenEdge = util.topMost(pile, ['chosen', subOption]); + + if (typeof chosenEdge === 'boolean' || typeof chosenEdge === 'function') { + value = chosenEdge; + } + } + + return value; + } + /** + * Check if the point falls within the given rectangle. + * + * @param {rect} rect + * @param {point} point + * @param {rotationPoint} [rotationPoint] if specified, the rotation that applies to the rectangle. + * @returns {boolean} true if point within rectangle, false otherwise + * @static + */ + + }, { + key: "pointInRect", + value: function pointInRect(rect, point, rotationPoint) { + if (rect.width <= 0 || rect.height <= 0) { + return false; // early out + } + + if (rotationPoint !== undefined) { + // Rotate the point the same amount as the rectangle + var tmp = { + x: point.x - rotationPoint.x, + y: point.y - rotationPoint.y + }; + + if (rotationPoint.angle !== 0) { + // In order to get the coordinates the same, you need to + // rotate in the reverse direction + var angle = -rotationPoint.angle; + var tmp2 = { + x: Math.cos(angle) * tmp.x - Math.sin(angle) * tmp.y, + y: Math.sin(angle) * tmp.x + Math.cos(angle) * tmp.y + }; + point = tmp2; + } else { + point = tmp; + } // Note that if a rotation is specified, the rectangle coordinates + // are **not* the full canvas coordinates. They are relative to the + // rotationPoint. Hence, the point coordinates need not be translated + // back in this case. + + } + + var right = rect.x + rect.width; + var bottom = rect.y + rect.width; + return rect.left < point.x && right > point.x && rect.top < point.y && bottom > point.y; + } + /** + * Check if given value is acceptable as a label text. + * + * @param {*} text value to check; can be anything at this point + * @returns {boolean} true if valid label value, false otherwise + */ + + }, { + key: "isValidLabel", + value: function isValidLabel(text) { + // Note that this is quite strict: types that *might* be converted to string are disallowed + return typeof text === 'string' && text !== ''; + } + }]); + + return ComponentUtil; + }(); + + /** + * Callback to determine text dimensions, using the parent label settings. + * @callback MeasureText + * @param {text} text + * @param {text} mod + * @return {Object} { width, values} width in pixels and font attributes + */ + + /** + * Helper class for Label which collects results of splitting labels into lines and blocks. + * + * @private + */ + var LabelAccumulator = + /*#__PURE__*/ + function () { + /** + * @param {MeasureText} measureText + */ + function LabelAccumulator(measureText) { + classCallCheck$1(this, LabelAccumulator); + + this.measureText = measureText; + this.current = 0; + this.width = 0; + this.height = 0; + this.lines = []; + } + /** + * Append given text to the given line. + * + * @param {number} l index of line to add to + * @param {string} text string to append to line + * @param {'bold'|'ital'|'boldital'|'mono'|'normal'} [mod='normal'] + * @private + */ + + + createClass$1(LabelAccumulator, [{ + key: "_add", + value: function _add(l, text) { + var mod = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'normal'; + + if (this.lines[l] === undefined) { + this.lines[l] = { + width: 0, + height: 0, + blocks: [] + }; + } // We still need to set a block for undefined and empty texts, hence return at this point + // This is necessary because we don't know at this point if we're at the + // start of an empty line or not. + // To compensate, empty blocks are removed in `finalize()`. + // + // Empty strings should still have a height + + + var tmpText = text; + if (text === undefined || text === "") tmpText = " "; // Determine width and get the font properties + + var result = this.measureText(tmpText, mod); + var block = Object.assign({}, result.values); + block.text = text; + block.width = result.width; + block.mod = mod; + + if (text === undefined || text === "") { + block.width = 0; + } + + this.lines[l].blocks.push(block); // Update the line width. We need this for determining if a string goes over max width + + this.lines[l].width += block.width; + } + /** + * Returns the width in pixels of the current line. + * + * @returns {number} + */ + + }, { + key: "curWidth", + value: function curWidth() { + var line = this.lines[this.current]; + if (line === undefined) return 0; + return line.width; + } + /** + * Add text in block to current line + * + * @param {string} text + * @param {'bold'|'ital'|'boldital'|'mono'|'normal'} [mod='normal'] + */ + + }, { + key: "append", + value: function append(text) { + var mod = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'normal'; + + this._add(this.current, text, mod); + } + /** + * Add text in block to current line and start a new line + * + * @param {string} text + * @param {'bold'|'ital'|'boldital'|'mono'|'normal'} [mod='normal'] + */ + + }, { + key: "newLine", + value: function newLine(text) { + var mod = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'normal'; + + this._add(this.current, text, mod); + + this.current++; + } + /** + * Determine and set the heights of all the lines currently contained in this instance + * + * Note that width has already been set. + * + * @private + */ + + }, { + key: "determineLineHeights", + value: function determineLineHeights() { + for (var k = 0; k < this.lines.length; k++) { + var line = this.lines[k]; // Looking for max height of blocks in line + + var height = 0; + + if (line.blocks !== undefined) { + // Can happen if text contains e.g. '\n ' + for (var l = 0; l < line.blocks.length; l++) { + var block = line.blocks[l]; + + if (height < block.height) { + height = block.height; + } + } + } + + line.height = height; + } + } + /** + * Determine the full size of the label text, as determined by current lines and blocks + * + * @private + */ + + }, { + key: "determineLabelSize", + value: function determineLabelSize() { + var width = 0; + var height = 0; + + for (var k = 0; k < this.lines.length; k++) { + var line = this.lines[k]; + + if (line.width > width) { + width = line.width; + } + + height += line.height; + } + + this.width = width; + this.height = height; + } + /** + * Remove all empty blocks and empty lines we don't need + * + * This must be done after the width/height determination, + * so that these are set properly for processing here. + * + * @returns {Array} Lines with empty blocks (and some empty lines) removed + * @private + */ + + }, { + key: "removeEmptyBlocks", + value: function removeEmptyBlocks() { + var tmpLines = []; + + for (var k = 0; k < this.lines.length; k++) { + var line = this.lines[k]; // Note: an empty line in between text has width zero but is still relevant to layout. + // So we can't use width for testing empty line here + + if (line.blocks.length === 0) continue; // Discard final empty line always + + if (k === this.lines.length - 1) { + if (line.width === 0) continue; + } + + var tmpLine = {}; + Object.assign(tmpLine, line); + tmpLine.blocks = []; + var firstEmptyBlock = void 0; + var tmpBlocks = []; + + for (var l = 0; l < line.blocks.length; l++) { + var block = line.blocks[l]; + + if (block.width !== 0) { + tmpBlocks.push(block); + } else { + if (firstEmptyBlock === undefined) { + firstEmptyBlock = block; + } + } + } // Ensure that there is *some* text present + + + if (tmpBlocks.length === 0 && firstEmptyBlock !== undefined) { + tmpBlocks.push(firstEmptyBlock); + } + + tmpLine.blocks = tmpBlocks; + tmpLines.push(tmpLine); + } + + return tmpLines; + } + /** + * Set the sizes for all lines and the whole thing. + * + * @returns {{width: (number|*), height: (number|*), lines: Array}} + */ + + }, { + key: "finalize", + value: function finalize() { + //console.log(JSON.stringify(this.lines, null, 2)); + this.determineLineHeights(); + this.determineLabelSize(); + var tmpLines = this.removeEmptyBlocks(); // Return a simple hash object for further processing. + + return { + width: this.width, + height: this.height, + lines: tmpLines + }; + } + }]); + + return LabelAccumulator; + }(); + + var tagPattern = { + // HTML + '': //, + '': //, + '': //, + '': /<\/b>/, + '': /<\/i>/, + '': /<\/code>/, + // Markdown + '*': /\*/, + // bold + '_': /\_/, + // ital + '`': /`/, + // mono + 'afterBold': /[^\*]/, + 'afterItal': /[^_]/, + 'afterMono': /[^`]/ + }; + /** + * Internal helper class for parsing the markup tags for HTML and Markdown. + * + * NOTE: Sequences of tabs and spaces are reduced to single space. + * Scan usage of `this.spacing` within method + */ + + var MarkupAccumulator = + /*#__PURE__*/ + function () { + /** + * Create an instance + * + * @param {string} text text to parse for markup + */ + function MarkupAccumulator(text) { + classCallCheck$1(this, MarkupAccumulator); + + this.text = text; + this.bold = false; + this.ital = false; + this.mono = false; + this.spacing = false; + this.position = 0; + this.buffer = ""; + this.modStack = []; + this.blocks = []; + } + /** + * Return the mod label currently on the top of the stack + * + * @returns {string} label of topmost mod + * @private + */ + + + createClass$1(MarkupAccumulator, [{ + key: "mod", + value: function mod() { + return this.modStack.length === 0 ? 'normal' : this.modStack[0]; + } + /** + * Return the mod label currently active + * + * @returns {string} label of active mod + * @private + */ + + }, { + key: "modName", + value: function modName() { + if (this.modStack.length === 0) return 'normal';else if (this.modStack[0] === 'mono') return 'mono';else { + if (this.bold && this.ital) { + return 'boldital'; + } else if (this.bold) { + return 'bold'; + } else if (this.ital) { + return 'ital'; + } + } + } + /** + * @private + */ + + }, { + key: "emitBlock", + value: function emitBlock() { + if (this.spacing) { + this.add(" "); + this.spacing = false; + } + + if (this.buffer.length > 0) { + this.blocks.push({ + text: this.buffer, + mod: this.modName() + }); + this.buffer = ""; + } + } + /** + * Output text to buffer + * + * @param {string} text text to add + * @private + */ + + }, { + key: "add", + value: function add(text) { + if (text === " ") { + this.spacing = true; + } + + if (this.spacing) { + this.buffer += " "; + this.spacing = false; + } + + if (text != " ") { + this.buffer += text; + } + } + /** + * Handle parsing of whitespace + * + * @param {string} ch the character to check + * @returns {boolean} true if the character was processed as whitespace, false otherwise + */ + + }, { + key: "parseWS", + value: function parseWS(ch) { + if (/[ \t]/.test(ch)) { + if (!this.mono) { + this.spacing = true; + } else { + this.add(ch); + } + + return true; + } + + return false; + } + /** + * @param {string} tagName label for block type to set + * @private + */ + + }, { + key: "setTag", + value: function setTag(tagName) { + this.emitBlock(); + this[tagName] = true; + this.modStack.unshift(tagName); + } + /** + * @param {string} tagName label for block type to unset + * @private + */ + + }, { + key: "unsetTag", + value: function unsetTag(tagName) { + this.emitBlock(); + this[tagName] = false; + this.modStack.shift(); + } + /** + * @param {string} tagName label for block type we are currently processing + * @param {string|RegExp} tag string to match in text + * @returns {boolean} true if the tag was processed, false otherwise + */ + + }, { + key: "parseStartTag", + value: function parseStartTag(tagName, tag) { + // Note: if 'mono' passed as tagName, there is a double check here. This is OK + if (!this.mono && !this[tagName] && this.match(tag)) { + this.setTag(tagName); + return true; + } + + return false; + } + /** + * @param {string|RegExp} tag + * @param {number} [advance=true] if set, advance current position in text + * @returns {boolean} true if match at given position, false otherwise + * @private + */ + + }, { + key: "match", + value: function match(tag) { + var advance = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; + + var _this$prepareRegExp = this.prepareRegExp(tag), + _this$prepareRegExp2 = slicedToArray(_this$prepareRegExp, 2), + regExp = _this$prepareRegExp2[0], + length = _this$prepareRegExp2[1]; + + var matched = regExp.test(this.text.substr(this.position, length)); + + if (matched && advance) { + this.position += length - 1; + } + + return matched; + } + /** + * @param {string} tagName label for block type we are currently processing + * @param {string|RegExp} tag string to match in text + * @param {RegExp} [nextTag] regular expression to match for characters *following* the current tag + * @returns {boolean} true if the tag was processed, false otherwise + */ + + }, { + key: "parseEndTag", + value: function parseEndTag(tagName, tag, nextTag) { + var checkTag = this.mod() === tagName; + + if (tagName === 'mono') { + // special handling for 'mono' + checkTag = checkTag && this.mono; + } else { + checkTag = checkTag && !this.mono; + } + + if (checkTag && this.match(tag)) { + if (nextTag !== undefined) { + // Purpose of the following match is to prevent a direct unset/set of a given tag + // E.g. '*bold **still bold*' => '*bold still bold*' + if (this.position === this.text.length - 1 || this.match(nextTag, false)) { + this.unsetTag(tagName); + } + } else { + this.unsetTag(tagName); + } + + return true; + } + + return false; + } + /** + * @param {string|RegExp} tag string to match in text + * @param {value} value string to replace tag with, if found at current position + * @returns {boolean} true if the tag was processed, false otherwise + */ + + }, { + key: "replace", + value: function replace(tag, value) { + if (this.match(tag)) { + this.add(value); + this.position += length - 1; + return true; + } + + return false; + } + /** + * Create a regular expression for the tag if it isn't already one. + * + * The return value is an array `[RegExp, number]`, with exactly two value, where: + * - RegExp is the regular expression to use + * - number is the lenth of the input string to match + * + * @param {string|RegExp} tag string to match in text + * @returns {Array} regular expression to use and length of input string to match + * @private + */ + + }, { + key: "prepareRegExp", + value: function prepareRegExp(tag) { + var length; + var regExp; + + if (tag instanceof RegExp) { + regExp = tag; + length = 1; // ASSUMPTION: regexp only tests one character + } else { + // use prepared regexp if present + var prepared = tagPattern[tag]; + + if (prepared !== undefined) { + regExp = prepared; + } else { + regExp = new RegExp(tag); + } + + length = tag.length; + } + + return [regExp, length]; + } + }]); + + return MarkupAccumulator; + }(); + /** + * Helper class for Label which explodes the label text into lines and blocks within lines + * + * @private + */ + + + var LabelSplitter = + /*#__PURE__*/ + function () { + /** + * @param {CanvasRenderingContext2D} ctx Canvas rendering context + * @param {Label} parent reference to the Label instance using current instance + * @param {boolean} selected + * @param {boolean} hover + */ + function LabelSplitter(ctx, parent, selected, hover) { + var _this = this; + + classCallCheck$1(this, LabelSplitter); + + this.ctx = ctx; + this.parent = parent; + this.selected = selected; + this.hover = hover; + /** + * Callback to determine text width; passed to LabelAccumulator instance + * + * @param {String} text string to determine width of + * @param {String} mod font type to use for this text + * @return {Object} { width, values} width in pixels and font attributes + */ + + var textWidth = function textWidth(text, mod) { + if (text === undefined) return 0; // TODO: This can be done more efficiently with caching + // This will set the ctx.font correctly, depending on selected/hover and mod - so that ctx.measureText() will be accurate. + + var values = _this.parent.getFormattingValues(ctx, selected, hover, mod); + + var width = 0; + + if (text !== '') { + var measure = _this.ctx.measureText(text); + + width = measure.width; + } + + return { + width: width, + values: values + }; + }; + + this.lines = new LabelAccumulator(textWidth); + } + /** + * Split passed text of a label into lines and blocks. + * + * # NOTE + * + * The handling of spacing is option dependent: + * + * - if `font.multi : false`, all spaces are retained + * - if `font.multi : true`, every sequence of spaces is compressed to a single space + * + * This might not be the best way to do it, but this is as it has been working till now. + * In order not to break existing functionality, for the time being this behaviour will + * be retained in any code changes. + * + * @param {string} text text to split + * @returns {Array} + */ + + + createClass$1(LabelSplitter, [{ + key: "process", + value: function process(text) { + if (!ComponentUtil.isValidLabel(text)) { + return this.lines.finalize(); + } + + var font = this.parent.fontOptions; // Normalize the end-of-line's to a single representation - order important + + text = text.replace(/\r\n/g, '\n'); // Dos EOL's + + text = text.replace(/\r/g, '\n'); // Mac EOL's + // Note that at this point, there can be no \r's in the text. + // This is used later on splitStringIntoLines() to split multifont texts. + + var nlLines = String(text).split('\n'); + var lineCount = nlLines.length; + + if (font.multi) { + // Multi-font case: styling tags active + for (var i = 0; i < lineCount; i++) { + var blocks = this.splitBlocks(nlLines[i], font.multi); // Post: Sequences of tabs and spaces are reduced to single space + + if (blocks === undefined) continue; + + if (blocks.length === 0) { + this.lines.newLine(""); + continue; + } + + if (font.maxWdt > 0) { + // widthConstraint.maximum defined + //console.log('Running widthConstraint multi, max: ' + this.fontOptions.maxWdt); + for (var j = 0; j < blocks.length; j++) { + var mod = blocks[j].mod; + var _text = blocks[j].text; + this.splitStringIntoLines(_text, mod, true); + } + } else { + // widthConstraint.maximum NOT defined + for (var _j = 0; _j < blocks.length; _j++) { + var _mod = blocks[_j].mod; + var _text2 = blocks[_j].text; + this.lines.append(_text2, _mod); + } + } + + this.lines.newLine(); + } + } else { + // Single-font case + if (font.maxWdt > 0) { + // widthConstraint.maximum defined + // console.log('Running widthConstraint normal, max: ' + this.fontOptions.maxWdt); + for (var _i = 0; _i < lineCount; _i++) { + this.splitStringIntoLines(nlLines[_i]); + } + } else { + // widthConstraint.maximum NOT defined + for (var _i2 = 0; _i2 < lineCount; _i2++) { + this.lines.newLine(nlLines[_i2]); + } + } + } + + return this.lines.finalize(); + } + /** + * normalize the markup system + * + * @param {boolean|'md'|'markdown'|'html'} markupSystem + * @returns {string} + */ + + }, { + key: "decodeMarkupSystem", + value: function decodeMarkupSystem(markupSystem) { + var system = 'none'; + + if (markupSystem === 'markdown' || markupSystem === 'md') { + system = 'markdown'; + } else if (markupSystem === true || markupSystem === 'html') { + system = 'html'; + } + + return system; + } + /** + * + * @param {string} text + * @returns {Array} + */ + + }, { + key: "splitHtmlBlocks", + value: function splitHtmlBlocks(text) { + var s = new MarkupAccumulator(text); + + var parseEntities = function parseEntities(ch) { + if (/&/.test(ch)) { + var parsed = s.replace(s.text, '<', '<') || s.replace(s.text, '&', '&'); + + if (!parsed) { + s.add("&"); + } + + return true; + } + + return false; + }; + + while (s.position < s.text.length) { + var ch = s.text.charAt(s.position); + var parsed = s.parseWS(ch) || /') || s.parseStartTag('ital', '') || s.parseStartTag('mono', '') || s.parseEndTag('bold', '') || s.parseEndTag('ital', '') || s.parseEndTag('mono', '')) || parseEntities(ch); + + if (!parsed) { + s.add(ch); + } + + s.position++; + } + + s.emitBlock(); + return s.blocks; + } + /** + * + * @param {string} text + * @returns {Array} + */ + + }, { + key: "splitMarkdownBlocks", + value: function splitMarkdownBlocks(text) { + var _this2 = this; + + var s = new MarkupAccumulator(text); + var beginable = true; + + var parseOverride = function parseOverride(ch) { + if (/\\/.test(ch)) { + if (s.position < _this2.text.length + 1) { + s.position++; + ch = _this2.text.charAt(s.position); + + if (/ \t/.test(ch)) { + s.spacing = true; + } else { + s.add(ch); + beginable = false; + } + } + + return true; + } + + return false; + }; + + while (s.position < s.text.length) { + var ch = s.text.charAt(s.position); + var parsed = s.parseWS(ch) || parseOverride(ch) || (beginable || s.spacing) && (s.parseStartTag('bold', '*') || s.parseStartTag('ital', '_') || s.parseStartTag('mono', '`')) || s.parseEndTag('bold', '*', 'afterBold') || s.parseEndTag('ital', '_', 'afterItal') || s.parseEndTag('mono', '`', 'afterMono'); + + if (!parsed) { + s.add(ch); + beginable = false; + } + + s.position++; + } + + s.emitBlock(); + return s.blocks; + } + /** + * Explodes a piece of text into single-font blocks using a given markup + * + * @param {string} text + * @param {boolean|'md'|'markdown'|'html'} markupSystem + * @returns {Array.<{text: string, mod: string}>} + * @private + */ + + }, { + key: "splitBlocks", + value: function splitBlocks(text, markupSystem) { + var system = this.decodeMarkupSystem(markupSystem); + + if (system === 'none') { + return [{ + text: text, + mod: 'normal' + }]; + } else if (system === 'markdown') { + return this.splitMarkdownBlocks(text); + } else if (system === 'html') { + return this.splitHtmlBlocks(text); + } + } + /** + * @param {string} text + * @returns {boolean} true if text length over the current max with + * @private + */ + + }, { + key: "overMaxWidth", + value: function overMaxWidth(text) { + var width = this.ctx.measureText(text).width; + return this.lines.curWidth() + width > this.parent.fontOptions.maxWdt; + } + /** + * Determine the longest part of the sentence which still fits in the + * current max width. + * + * @param {Array} words Array of strings signifying a text lines + * @return {number} index of first item in string making string go over max + * @private + */ + + }, { + key: "getLongestFit", + value: function getLongestFit(words) { + var text = ''; + var w = 0; + + while (w < words.length) { + var pre = text === '' ? '' : ' '; + var newText = text + pre + words[w]; + if (this.overMaxWidth(newText)) break; + text = newText; + w++; + } + + return w; + } + /** + * Determine the longest part of the string which still fits in the + * current max width. + * + * @param {Array} words Array of strings signifying a text lines + * @return {number} index of first item in string making string go over max + */ + + }, { + key: "getLongestFitWord", + value: function getLongestFitWord(words) { + var w = 0; + + while (w < words.length) { + if (this.overMaxWidth(words.slice(0, w))) break; + w++; + } + + return w; + } + /** + * Split the passed text into lines, according to width constraint (if any). + * + * The method assumes that the input string is a single line, i.e. without lines break. + * + * This method retains spaces, if still present (case `font.multi: false`). + * A space which falls on an internal line break, will be replaced by a newline. + * There is no special handling of tabs; these go along with the flow. + * + * @param {string} str + * @param {string} [mod='normal'] + * @param {boolean} [appendLast=false] + * @private + */ + + }, { + key: "splitStringIntoLines", + value: function splitStringIntoLines(str) { + var mod = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'normal'; + var appendLast = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; + // Set the canvas context font, based upon the current selected/hover state + // and the provided mod, so the text measurement performed by getLongestFit + // will be accurate - and not just use the font of whoever last used the canvas. + this.parent.getFormattingValues(this.ctx, this.selected, this.hover, mod); // Still-present spaces are relevant, retain them + + str = str.replace(/^( +)/g, '$1\r'); + str = str.replace(/([^\r][^ ]*)( +)/g, '$1\r$2\r'); + var words = str.split('\r'); + + while (words.length > 0) { + var w = this.getLongestFit(words); + + if (w === 0) { + // Special case: the first word is already larger than the max width. + var word = words[0]; // Break the word to the largest part that fits the line + + var x = this.getLongestFitWord(word); + this.lines.newLine(word.slice(0, x), mod); // Adjust the word, so that the rest will be done next iteration + + words[0] = word.slice(x); + } else { + // skip any space that is replaced by a newline + var newW = w; + + if (words[w - 1] === ' ') { + w--; + } else if (words[newW] === ' ') { + newW++; + } + + var text = words.slice(0, w).join(""); + + if (w == words.length && appendLast) { + this.lines.append(text, mod); + } else { + this.lines.newLine(text, mod); + } // Adjust the word, so that the rest will be done next iteration + + + words = words.slice(newW); + } + } + } + }]); + + return LabelSplitter; + }(); + + /** + * List of special styles for multi-fonts + * @private + */ + + var multiFontStyle = ['bold', 'ital', 'boldital', 'mono']; + /** + * A Label to be used for Nodes or Edges. + */ + + var Label = + /*#__PURE__*/ + function () { + /** + * @param {Object} body + * @param {Object} options + * @param {boolean} [edgelabel=false] + */ + function Label(body, options) { + var edgelabel = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; + + classCallCheck$1(this, Label); + + this.body = body; + this.pointToSelf = false; + this.baseSize = undefined; + this.fontOptions = {}; // instance variable containing the *instance-local* font options + + this.setOptions(options); + this.size = { + top: 0, + left: 0, + width: 0, + height: 0, + yLine: 0 + }; + this.isEdgeLabel = edgelabel; + } + /** + * @param {Object} options the options of the parent Node-instance + */ + + + createClass$1(Label, [{ + key: "setOptions", + value: function setOptions(options) { + this.elementOptions = options; // Reference to the options of the parent Node-instance + + this.initFontOptions(options.font); + + if (ComponentUtil.isValidLabel(options.label)) { + this.labelDirty = true; + } else { + // Bad label! Change the option value to prevent bad stuff happening + options.label = undefined; + } + + if (options.font !== undefined && options.font !== null) { + // font options can be deleted at various levels + if (typeof options.font === 'string') { + this.baseSize = this.fontOptions.size; + } else if (_typeof_1$1(options.font) === 'object') { + var size = options.font.size; + + if (size !== undefined) { + this.baseSize = size; + } + } + } + } + /** + * Init the font Options structure. + * + * Member fontOptions serves as an accumulator for the current font options. + * As such, it needs to be completely separated from the node options. + * + * @param {Object} newFontOptions the new font options to process + * @private + */ + + }, { + key: "initFontOptions", + value: function initFontOptions(newFontOptions) { + var _this = this; + + // Prepare the multi-font option objects. + // These will be filled in propagateFonts(), if required + util.forEach(multiFontStyle, function (style) { + _this.fontOptions[style] = {}; + }); // Handle shorthand option, if present + + if (Label.parseFontString(this.fontOptions, newFontOptions)) { + this.fontOptions.vadjust = 0; + return; + } // Copy over the non-multifont options, if specified + + + util.forEach(newFontOptions, function (prop, n) { + if (prop !== undefined && prop !== null && _typeof_1$1(prop) !== 'object') { + _this.fontOptions[n] = prop; + } + }); + } + /** + * If in-variable is a string, parse it as a font specifier. + * + * Note that following is not done here and have to be done after the call: + * - Not all font options are set (vadjust, mod) + * + * @param {Object} outOptions out-parameter, object in which to store the parse results (if any) + * @param {Object} inOptions font options to parse + * @return {boolean} true if font parsed as string, false otherwise + * @static + */ + + }, { + key: "constrain", + + /** + * Set the width and height constraints based on 'nearest' value + * + * @param {Array} pile array of option objects to consider + * @returns {object} the actual constraint values to use + * @private + */ + value: function constrain(pile) { + // NOTE: constrainWidth and constrainHeight never set! + // NOTE: for edge labels, only 'maxWdt' set + // Node labels can set all the fields + var fontOptions = { + constrainWidth: false, + maxWdt: -1, + minWdt: -1, + constrainHeight: false, + minHgt: -1, + valign: 'middle' + }; + var widthConstraint = util.topMost(pile, 'widthConstraint'); + + if (typeof widthConstraint === 'number') { + fontOptions.maxWdt = Number(widthConstraint); + fontOptions.minWdt = Number(widthConstraint); + } else if (_typeof_1$1(widthConstraint) === 'object') { + var widthConstraintMaximum = util.topMost(pile, ['widthConstraint', 'maximum']); + + if (typeof widthConstraintMaximum === 'number') { + fontOptions.maxWdt = Number(widthConstraintMaximum); + } + + var widthConstraintMinimum = util.topMost(pile, ['widthConstraint', 'minimum']); + + if (typeof widthConstraintMinimum === 'number') { + fontOptions.minWdt = Number(widthConstraintMinimum); + } + } + + var heightConstraint = util.topMost(pile, 'heightConstraint'); + + if (typeof heightConstraint === 'number') { + fontOptions.minHgt = Number(heightConstraint); + } else if (_typeof_1$1(heightConstraint) === 'object') { + var heightConstraintMinimum = util.topMost(pile, ['heightConstraint', 'minimum']); + + if (typeof heightConstraintMinimum === 'number') { + fontOptions.minHgt = Number(heightConstraintMinimum); + } + + var heightConstraintValign = util.topMost(pile, ['heightConstraint', 'valign']); + + if (typeof heightConstraintValign === 'string') { + if (heightConstraintValign === 'top' || heightConstraintValign === 'bottom') { + fontOptions.valign = heightConstraintValign; + } + } + } + + return fontOptions; + } + /** + * Set options and update internal state + * + * @param {Object} options options to set + * @param {Array} pile array of option objects to consider for option 'chosen' + */ + + }, { + key: "update", + value: function update(options, pile) { + this.setOptions(options, true); + this.propagateFonts(pile); + util.deepExtend(this.fontOptions, this.constrain(pile)); + this.fontOptions.chooser = ComponentUtil.choosify('label', pile); + } + /** + * When margins are set in an element, adjust sizes is called to remove them + * from the width/height constraints. This must be done prior to label sizing. + * + * @param {{top: number, right: number, bottom: number, left: number}} margins + */ + + }, { + key: "adjustSizes", + value: function adjustSizes(margins) { + var widthBias = margins ? margins.right + margins.left : 0; + + if (this.fontOptions.constrainWidth) { + this.fontOptions.maxWdt -= widthBias; + this.fontOptions.minWdt -= widthBias; + } + + var heightBias = margins ? margins.top + margins.bottom : 0; + + if (this.fontOptions.constrainHeight) { + this.fontOptions.minHgt -= heightBias; + } + } ///////////////////////////////////////////////////////// + // Methods for handling options piles + // Eventually, these will be moved to a separate class + ///////////////////////////////////////////////////////// + + /** + * Add the font members of the passed list of option objects to the pile. + * + * @param {Pile} dstPile pile of option objects add to + * @param {Pile} srcPile pile of option objects to take font options from + * @private + */ + + }, { + key: "addFontOptionsToPile", + value: function addFontOptionsToPile(dstPile, srcPile) { + for (var i = 0; i < srcPile.length; ++i) { + this.addFontToPile(dstPile, srcPile[i]); + } + } + /** + * Add given font option object to the list of objects (the 'pile') to consider for determining + * multi-font option values. + * + * @param {Pile} pile pile of option objects to use + * @param {object} options instance to add to pile + * @private + */ + + }, { + key: "addFontToPile", + value: function addFontToPile(pile, options) { + if (options === undefined) return; + if (options.font === undefined || options.font === null) return; + var item = options.font; + pile.push(item); + } + /** + * Collect all own-property values from the font pile that aren't multi-font option objectss. + * + * @param {Pile} pile pile of option objects to use + * @returns {object} object with all current own basic font properties + * @private + */ + + }, { + key: "getBasicOptions", + value: function getBasicOptions(pile) { + var ret = {}; // Scans the whole pile to get all options present + + for (var n = 0; n < pile.length; ++n) { + var fontOptions = pile[n]; // Convert shorthand if necessary + + var tmpShorthand = {}; + + if (Label.parseFontString(tmpShorthand, fontOptions)) { + fontOptions = tmpShorthand; + } + + util.forEach(fontOptions, function (opt, name) { + if (opt === undefined) return; // multi-font option need not be present + + if (ret.hasOwnProperty(name)) return; // Keep first value we encounter + + if (multiFontStyle.indexOf(name) !== -1) { + // Skip multi-font properties but we do need the structure + ret[name] = {}; + } else { + ret[name] = opt; + } + }); + } + + return ret; + } + /** + * Return the value for given option for the given multi-font. + * + * All available option objects are trawled in the set order to construct the option values. + * + * --------------------------------------------------------------------- + * ## Traversal of pile for multi-fonts + * + * The determination of multi-font option values is a special case, because any values not + * present in the multi-font options should by definition be taken from the main font options, + * i.e. from the current 'parent' object of the multi-font option. + * + * ### Search order for multi-fonts + * + * 'bold' used as example: + * + * - search in option group 'bold' in local properties + * - search in main font option group in local properties + * + * --------------------------------------------------------------------- + * + * @param {Pile} pile pile of option objects to use + * @param {MultiFontStyle} multiName sub path for the multi-font + * @param {string} option the option to search for, for the given multi-font + * @returns {string|number} the value for the given option + * @private + */ + + }, { + key: "getFontOption", + value: function getFontOption(pile, multiName, option) { + var multiFont; // Search multi font in local properties + + for (var n = 0; n < pile.length; ++n) { + var fontOptions = pile[n]; + + if (fontOptions.hasOwnProperty(multiName)) { + multiFont = fontOptions[multiName]; + if (multiFont === undefined || multiFont === null) continue; // Convert shorthand if necessary + // TODO: inefficient to do this conversion every time; find a better way. + + var tmpShorthand = {}; + + if (Label.parseFontString(tmpShorthand, multiFont)) { + multiFont = tmpShorthand; + } + + if (multiFont.hasOwnProperty(option)) { + return multiFont[option]; + } + } + } // Option is not mentioned in the multi font options; take it from the parent font options. + // These have already been converted with getBasicOptions(), so use the converted values. + + + if (this.fontOptions.hasOwnProperty(option)) { + return this.fontOptions[option]; + } // A value **must** be found; you should never get here. + + + throw new Error("Did not find value for multi-font for property: '" + option + "'"); + } + /** + * Return all options values for the given multi-font. + * + * All available option objects are trawled in the set order to construct the option values. + * + * @param {Pile} pile pile of option objects to use + * @param {MultiFontStyle} multiName sub path for the mod-font + * @returns {MultiFontOptions} + * @private + */ + + }, { + key: "getFontOptions", + value: function getFontOptions(pile, multiName) { + var result = {}; + var optionNames = ['color', 'size', 'face', 'mod', 'vadjust']; // List of allowed options per multi-font + + for (var i = 0; i < optionNames.length; ++i) { + var mod = optionNames[i]; + result[mod] = this.getFontOption(pile, multiName, mod); + } + + return result; + } ///////////////////////////////////////////////////////// + // End methods for handling options piles + ///////////////////////////////////////////////////////// + + /** + * Collapse the font options for the multi-font to single objects, from + * the chain of option objects passed (the 'pile'). + * + * @param {Pile} pile sequence of option objects to consider. + * First item in list assumed to be the newly set options. + */ + + }, { + key: "propagateFonts", + value: function propagateFonts(pile) { + var _this2 = this; + + var fontPile = []; // sequence of font objects to consider, order important + // Note that this.elementOptions is not used here. + + this.addFontOptionsToPile(fontPile, pile); + this.fontOptions = this.getBasicOptions(fontPile); // We set multifont values even if multi === false, for consistency (things break otherwise) + + var _loop = function _loop(i) { + var mod = multiFontStyle[i]; + var modOptions = _this2.fontOptions[mod]; + + var tmpMultiFontOptions = _this2.getFontOptions(fontPile, mod); // Copy over found values + + + util.forEach(tmpMultiFontOptions, function (option, n) { + modOptions[n] = option; + }); + modOptions.size = Number(modOptions.size); + modOptions.vadjust = Number(modOptions.vadjust); + }; + + for (var i = 0; i < multiFontStyle.length; ++i) { + _loop(i); + } + } + /** + * Main function. This is called from anything that wants to draw a label. + * @param {CanvasRenderingContext2D} ctx + * @param {number} x + * @param {number} y + * @param {boolean} selected + * @param {boolean} hover + * @param {string} [baseline='middle'] + */ + + }, { + key: "draw", + value: function draw(ctx, x, y, selected, hover) { + var baseline = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 'middle'; + // if no label, return + if (this.elementOptions.label === undefined) return; // check if we have to render the label + + var viewFontSize = this.fontOptions.size * this.body.view.scale; + if (this.elementOptions.label && viewFontSize < this.elementOptions.scaling.label.drawThreshold - 1) return; // This ensures that there will not be HUGE letters on screen + // by setting an upper limit on the visible text size (regardless of zoomLevel) + + if (viewFontSize >= this.elementOptions.scaling.label.maxVisible) { + viewFontSize = Number(this.elementOptions.scaling.label.maxVisible) / this.body.view.scale; + } // update the size cache if required + + + this.calculateLabelSize(ctx, selected, hover, x, y, baseline); + + this._drawBackground(ctx); + + this._drawText(ctx, x, this.size.yLine, baseline, viewFontSize); + } + /** + * Draws the label background + * @param {CanvasRenderingContext2D} ctx + * @private + */ + + }, { + key: "_drawBackground", + value: function _drawBackground(ctx) { + if (this.fontOptions.background !== undefined && this.fontOptions.background !== "none") { + ctx.fillStyle = this.fontOptions.background; + var size = this.getSize(); + ctx.fillRect(size.left, size.top, size.width, size.height); + } + } + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {number} x + * @param {number} y + * @param {string} [baseline='middle'] + * @param {number} viewFontSize + * @private + */ + + }, { + key: "_drawText", + value: function _drawText(ctx, x, y) { + var baseline = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 'middle'; + var viewFontSize = arguments.length > 4 ? arguments[4] : undefined; + + var _this$_setAlignment = this._setAlignment(ctx, x, y, baseline); + + var _this$_setAlignment2 = slicedToArray(_this$_setAlignment, 2); + + x = _this$_setAlignment2[0]; + y = _this$_setAlignment2[1]; + ctx.textAlign = 'left'; + x = x - this.size.width / 2; // Shift label 1/2-distance to the left + + if (this.fontOptions.valign && this.size.height > this.size.labelHeight) { + if (this.fontOptions.valign === 'top') { + y -= (this.size.height - this.size.labelHeight) / 2; + } + + if (this.fontOptions.valign === 'bottom') { + y += (this.size.height - this.size.labelHeight) / 2; + } + } // draw the text + + + for (var i = 0; i < this.lineCount; i++) { + var line = this.lines[i]; + + if (line && line.blocks) { + var width = 0; + + if (this.isEdgeLabel || this.fontOptions.align === 'center') { + width += (this.size.width - line.width) / 2; + } else if (this.fontOptions.align === 'right') { + width += this.size.width - line.width; + } + + for (var j = 0; j < line.blocks.length; j++) { + var block = line.blocks[j]; + ctx.font = block.font; + + var _this$_getColor = this._getColor(block.color, viewFontSize, block.strokeColor), + _this$_getColor2 = slicedToArray(_this$_getColor, 2), + fontColor = _this$_getColor2[0], + strokeColor = _this$_getColor2[1]; + + if (block.strokeWidth > 0) { + ctx.lineWidth = block.strokeWidth; + ctx.strokeStyle = strokeColor; + ctx.lineJoin = 'round'; + } + + ctx.fillStyle = fontColor; + + if (block.strokeWidth > 0) { + ctx.strokeText(block.text, x + width, y + block.vadjust); + } + + ctx.fillText(block.text, x + width, y + block.vadjust); + width += block.width; + } + + y += line.height; + } + } + } + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {number} x + * @param {number} y + * @param {string} baseline + * @returns {Array.} + * @private + */ + + }, { + key: "_setAlignment", + value: function _setAlignment(ctx, x, y, baseline) { + // check for label alignment (for edges) + // TODO: make alignment for nodes + if (this.isEdgeLabel && this.fontOptions.align !== 'horizontal' && this.pointToSelf === false) { + x = 0; + y = 0; + var lineMargin = 2; + + if (this.fontOptions.align === 'top') { + ctx.textBaseline = 'alphabetic'; + y -= 2 * lineMargin; // distance from edge, required because we use alphabetic. Alphabetic has less difference between browsers + } else if (this.fontOptions.align === 'bottom') { + ctx.textBaseline = 'hanging'; + y += 2 * lineMargin; // distance from edge, required because we use hanging. Hanging has less difference between browsers + } else { + ctx.textBaseline = 'middle'; + } + } else { + ctx.textBaseline = baseline; + } + + return [x, y]; + } + /** + * fade in when relative scale is between threshold and threshold - 1. + * If the relative scale would be smaller than threshold -1 the draw function would have returned before coming here. + * + * @param {string} color The font color to use + * @param {number} viewFontSize + * @param {string} initialStrokeColor + * @returns {Array.} An array containing the font color and stroke color + * @private + */ + + }, { + key: "_getColor", + value: function _getColor(color, viewFontSize, initialStrokeColor) { + var fontColor = color || '#000000'; + var strokeColor = initialStrokeColor || '#ffffff'; + + if (viewFontSize <= this.elementOptions.scaling.label.drawThreshold) { + var opacity = Math.max(0, Math.min(1, 1 - (this.elementOptions.scaling.label.drawThreshold - viewFontSize))); + fontColor = util.overrideOpacity(fontColor, opacity); + strokeColor = util.overrideOpacity(strokeColor, opacity); + } + + return [fontColor, strokeColor]; + } + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {boolean} selected + * @param {boolean} hover + * @returns {{width: number, height: number}} + */ + + }, { + key: "getTextSize", + value: function getTextSize(ctx) { + var selected = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; + var hover = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; + + this._processLabel(ctx, selected, hover); + + return { + width: this.size.width, + height: this.size.height, + lineCount: this.lineCount + }; + } + /** + * Get the current dimensions of the label + * + * @return {rect} + */ + + }, { + key: "getSize", + value: function getSize() { + var lineMargin = 2; + var x = this.size.left; // default values which might be overridden below + + var y = this.size.top - 0.5 * lineMargin; // idem + + if (this.isEdgeLabel) { + var x2 = -this.size.width * 0.5; + + switch (this.fontOptions.align) { + case 'middle': + x = x2; + y = -this.size.height * 0.5; + break; + + case 'top': + x = x2; + y = -(this.size.height + lineMargin); + break; + + case 'bottom': + x = x2; + y = lineMargin; + break; + } + } + + var ret = { + left: x, + top: y, + width: this.size.width, + height: this.size.height + }; + return ret; + } + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {boolean} selected + * @param {boolean} hover + * @param {number} [x=0] + * @param {number} [y=0] + * @param {'middle'|'hanging'} [baseline='middle'] + */ + + }, { + key: "calculateLabelSize", + value: function calculateLabelSize(ctx, selected, hover) { + var x = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0; + var y = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0; + var baseline = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 'middle'; + + this._processLabel(ctx, selected, hover); + + this.size.left = x - this.size.width * 0.5; + this.size.top = y - this.size.height * 0.5; + this.size.yLine = y + (1 - this.lineCount) * 0.5 * this.fontOptions.size; + + if (baseline === "hanging") { + this.size.top += 0.5 * this.fontOptions.size; + this.size.top += 4; // distance from node, required because we use hanging. Hanging has less difference between browsers + + this.size.yLine += 4; // distance from node + } + } + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {boolean} selected + * @param {boolean} hover + * @param {string} mod + * @returns {{color, size, face, mod, vadjust, strokeWidth: *, strokeColor: (*|string|allOptions.edges.font.strokeColor|{string}|allOptions.nodes.font.strokeColor|Array)}} + */ + + }, { + key: "getFormattingValues", + value: function getFormattingValues(ctx, selected, hover, mod) { + var getValue = function getValue(fontOptions, mod, option) { + if (mod === "normal") { + if (option === 'mod') return ""; + return fontOptions[option]; + } + + if (fontOptions[mod][option] !== undefined) { + // Grumbl leaving out test on undefined equals false for "" + return fontOptions[mod][option]; + } else { + // Take from parent font option + return fontOptions[option]; + } + }; + + var values = { + color: getValue(this.fontOptions, mod, 'color'), + size: getValue(this.fontOptions, mod, 'size'), + face: getValue(this.fontOptions, mod, 'face'), + mod: getValue(this.fontOptions, mod, 'mod'), + vadjust: getValue(this.fontOptions, mod, 'vadjust'), + strokeWidth: this.fontOptions.strokeWidth, + strokeColor: this.fontOptions.strokeColor + }; + + if (selected || hover) { + if (mod === "normal" && this.fontOptions.chooser === true && this.elementOptions.labelHighlightBold) { + values.mod = 'bold'; + } else { + if (typeof this.fontOptions.chooser === 'function') { + this.fontOptions.chooser(values, this.elementOptions.id, selected, hover); + } + } + } + + var fontString = ""; + + if (values.mod !== undefined && values.mod !== "") { + // safeguard for undefined - this happened + fontString += values.mod + " "; + } + + fontString += values.size + "px " + values.face; + ctx.font = fontString.replace(/"/g, ""); + values.font = ctx.font; + values.height = values.size; + return values; + } + /** + * + * @param {boolean} selected + * @param {boolean} hover + * @returns {boolean} + */ + + }, { + key: "differentState", + value: function differentState(selected, hover) { + return selected !== this.selectedState || hover !== this.hoverState; + } + /** + * This explodes the passed text into lines and determines the width, height and number of lines. + * + * @param {CanvasRenderingContext2D} ctx + * @param {boolean} selected + * @param {boolean} hover + * @param {string} inText the text to explode + * @returns {{width, height, lines}|*} + * @private + */ + + }, { + key: "_processLabelText", + value: function _processLabelText(ctx, selected, hover, inText) { + var splitter = new LabelSplitter(ctx, this, selected, hover); + return splitter.process(inText); + } + /** + * This explodes the label string into lines and sets the width, height and number of lines. + * @param {CanvasRenderingContext2D} ctx + * @param {boolean} selected + * @param {boolean} hover + * @private + */ + + }, { + key: "_processLabel", + value: function _processLabel(ctx, selected, hover) { + if (this.labelDirty === false && !this.differentState(selected, hover)) return; + + var state = this._processLabelText(ctx, selected, hover, this.elementOptions.label); + + if (this.fontOptions.minWdt > 0 && state.width < this.fontOptions.minWdt) { + state.width = this.fontOptions.minWdt; + } + + this.size.labelHeight = state.height; + + if (this.fontOptions.minHgt > 0 && state.height < this.fontOptions.minHgt) { + state.height = this.fontOptions.minHgt; + } + + this.lines = state.lines; + this.lineCount = state.lines.length; + this.size.width = state.width; + this.size.height = state.height; + this.selectedState = selected; + this.hoverState = hover; + this.labelDirty = false; + } + /** + * Check if this label is visible + * + * @return {boolean} true if this label will be show, false otherwise + */ + + }, { + key: "visible", + value: function visible() { + if (this.size.width === 0 || this.size.height === 0 || this.elementOptions.label === undefined) { + return false; // nothing to display + } + + var viewFontSize = this.fontOptions.size * this.body.view.scale; + + if (viewFontSize < this.elementOptions.scaling.label.drawThreshold - 1) { + return false; // Too small or too far away to show + } + + return true; + } + }], [{ + key: "parseFontString", + value: function parseFontString(outOptions, inOptions) { + if (!inOptions || typeof inOptions !== 'string') return false; + var newOptionsArray = inOptions.split(" "); + outOptions.size = +newOptionsArray[0].replace("px", ''); + outOptions.face = newOptionsArray[1]; + outOptions.color = newOptionsArray[2]; + return true; + } + }]); + + return Label; + }(); + + function _assertThisInitialized$2(self) { + if (self === void 0) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + + return self; + } + + var assertThisInitialized$1 = _assertThisInitialized$2; + + function _possibleConstructorReturn$1(self, call) { + if (call && (_typeof_1$1(call) === "object" || typeof call === "function")) { + return call; + } + + return assertThisInitialized$1(self); + } + + var possibleConstructorReturn$1 = _possibleConstructorReturn$1; + + var getPrototypeOf$1 = createCommonjsModule$2(function (module) { + function _getPrototypeOf(o) { + module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { + return o.__proto__ || Object.getPrototypeOf(o); + }; + return _getPrototypeOf(o); + } + + module.exports = _getPrototypeOf; + }); + + var setPrototypeOf$2 = createCommonjsModule$2(function (module) { + function _setPrototypeOf(o, p) { + module.exports = _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { + o.__proto__ = p; + return o; + }; + + return _setPrototypeOf(o, p); + } + + module.exports = _setPrototypeOf; + }); + + function _inherits$1(subClass, superClass) { + if (typeof superClass !== "function" && superClass !== null) { + throw new TypeError("Super expression must either be null or a function"); + } + + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + writable: true, + configurable: true + } + }); + if (superClass) setPrototypeOf$2(subClass, superClass); + } + + var inherits$1 = _inherits$1; + + /** + * The Base class for all Nodes. + */ + var NodeBase = + /*#__PURE__*/ + function () { + /** + * @param {Object} options + * @param {Object} body + * @param {Label} labelModule + */ + function NodeBase(options, body, labelModule) { + classCallCheck$1(this, NodeBase); + + this.body = body; + this.labelModule = labelModule; + this.setOptions(options); + this.top = undefined; + this.left = undefined; + this.height = undefined; + this.width = undefined; + this.radius = undefined; + this.margin = undefined; + this.refreshNeeded = true; + this.boundingBox = { + top: 0, + left: 0, + right: 0, + bottom: 0 + }; + } + /** + * + * @param {Object} options + */ + + + createClass$1(NodeBase, [{ + key: "setOptions", + value: function setOptions(options) { + this.options = options; + } + /** + * + * @param {Label} labelModule + * @private + */ + + }, { + key: "_setMargins", + value: function _setMargins(labelModule) { + this.margin = {}; + + if (this.options.margin) { + if (_typeof_1$1(this.options.margin) == 'object') { + this.margin.top = this.options.margin.top; + this.margin.right = this.options.margin.right; + this.margin.bottom = this.options.margin.bottom; + this.margin.left = this.options.margin.left; + } else { + this.margin.top = this.options.margin; + this.margin.right = this.options.margin; + this.margin.bottom = this.options.margin; + this.margin.left = this.options.margin; + } + } + + labelModule.adjustSizes(this.margin); + } + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {number} angle + * @returns {number} + * @private + */ + + }, { + key: "_distanceToBorder", + value: function _distanceToBorder(ctx, angle) { + var borderWidth = this.options.borderWidth; + this.resize(ctx); + return Math.min(Math.abs(this.width / 2 / Math.cos(angle)), Math.abs(this.height / 2 / Math.sin(angle))) + borderWidth; + } + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {ArrowOptions} values + */ + + }, { + key: "enableShadow", + value: function enableShadow(ctx, values) { + if (values.shadow) { + ctx.shadowColor = values.shadowColor; + ctx.shadowBlur = values.shadowSize; + ctx.shadowOffsetX = values.shadowX; + ctx.shadowOffsetY = values.shadowY; + } + } + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {ArrowOptions} values + */ + + }, { + key: "disableShadow", + value: function disableShadow(ctx, values) { + if (values.shadow) { + ctx.shadowColor = 'rgba(0,0,0,0)'; + ctx.shadowBlur = 0; + ctx.shadowOffsetX = 0; + ctx.shadowOffsetY = 0; + } + } + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {ArrowOptions} values + */ + + }, { + key: "enableBorderDashes", + value: function enableBorderDashes(ctx, values) { + if (values.borderDashes !== false) { + if (ctx.setLineDash !== undefined) { + var dashes = values.borderDashes; + + if (dashes === true) { + dashes = [5, 15]; + } + + ctx.setLineDash(dashes); + } else { + console.warn("setLineDash is not supported in this browser. The dashed borders cannot be used."); + this.options.shapeProperties.borderDashes = false; + values.borderDashes = false; + } + } + } + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {ArrowOptions} values + */ + + }, { + key: "disableBorderDashes", + value: function disableBorderDashes(ctx, values) { + if (values.borderDashes !== false) { + if (ctx.setLineDash !== undefined) { + ctx.setLineDash([0]); + } else { + console.warn("setLineDash is not supported in this browser. The dashed borders cannot be used."); + this.options.shapeProperties.borderDashes = false; + values.borderDashes = false; + } + } + } + /** + * Determine if the shape of a node needs to be recalculated. + * + * @param {boolean} selected + * @param {boolean} hover + * @returns {boolean} + * @protected + */ + + }, { + key: "needsRefresh", + value: function needsRefresh(selected, hover) { + if (this.refreshNeeded === true) { + // This is probably not the best location to reset this member. + // However, in the current logic, it is the most convenient one. + this.refreshNeeded = false; + return true; + } + + return this.width === undefined || this.labelModule.differentState(selected, hover); + } + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {ArrowOptions} values + */ + + }, { + key: "initContextForDraw", + value: function initContextForDraw(ctx, values) { + var borderWidth = values.borderWidth / this.body.view.scale; + ctx.lineWidth = Math.min(this.width, borderWidth); + ctx.strokeStyle = values.borderColor; + ctx.fillStyle = values.color; + } + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {ArrowOptions} values + */ + + }, { + key: "performStroke", + value: function performStroke(ctx, values) { + var borderWidth = values.borderWidth / this.body.view.scale; //draw dashed border if enabled, save and restore is required for firefox not to crash on unix. + + ctx.save(); // if borders are zero width, they will be drawn with width 1 by default. This prevents that + + if (borderWidth > 0) { + this.enableBorderDashes(ctx, values); //draw the border + + ctx.stroke(); //disable dashed border for other elements + + this.disableBorderDashes(ctx, values); + } + + ctx.restore(); + } + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {ArrowOptions} values + */ + + }, { + key: "performFill", + value: function performFill(ctx, values) { + // draw shadow if enabled + this.enableShadow(ctx, values); // draw the background + + ctx.fill(); // disable shadows for other elements. + + this.disableShadow(ctx, values); + this.performStroke(ctx, values); + } + /** + * + * @param {number} margin + * @private + */ + + }, { + key: "_addBoundingBoxMargin", + value: function _addBoundingBoxMargin(margin) { + this.boundingBox.left -= margin; + this.boundingBox.top -= margin; + this.boundingBox.bottom += margin; + this.boundingBox.right += margin; + } + /** + * Actual implementation of this method call. + * + * Doing it like this makes it easier to override + * in the child classes. + * + * @param {number} x width + * @param {number} y height + * @param {CanvasRenderingContext2D} ctx + * @param {boolean} selected + * @param {boolean} hover + * @private + */ + + }, { + key: "_updateBoundingBox", + value: function _updateBoundingBox(x, y, ctx, selected, hover) { + if (ctx !== undefined) { + this.resize(ctx, selected, hover); + } + + this.left = x - this.width / 2; + this.top = y - this.height / 2; + this.boundingBox.left = this.left; + this.boundingBox.top = this.top; + this.boundingBox.bottom = this.top + this.height; + this.boundingBox.right = this.left + this.width; + } + /** + * Default implementation of this method call. + * This acts as a stub which can be overridden. + * + * @param {number} x width + * @param {number} y height + * @param {CanvasRenderingContext2D} ctx + * @param {boolean} selected + * @param {boolean} hover + */ + + }, { + key: "updateBoundingBox", + value: function updateBoundingBox(x, y, ctx, selected, hover) { + this._updateBoundingBox(x, y, ctx, selected, hover); + } + /** + * Determine the dimensions to use for nodes with an internal label + * + * Currently, these are: Circle, Ellipse, Database, Box + * The other nodes have external labels, and will not call this method + * + * If there is no label, decent default values are supplied. + * + * @param {CanvasRenderingContext2D} ctx + * @param {boolean} [selected] + * @param {boolean} [hover] + * @returns {{width:number, height:number}} + */ + + }, { + key: "getDimensionsFromLabel", + value: function getDimensionsFromLabel(ctx, selected, hover) { + // NOTE: previously 'textSize' was not put in 'this' for Ellipse + // TODO: examine the consequences. + this.textSize = this.labelModule.getTextSize(ctx, selected, hover); + var width = this.textSize.width; + var height = this.textSize.height; + var DEFAULT_SIZE = 14; + + if (width === 0) { + // This happens when there is no label text set + width = DEFAULT_SIZE; // use a decent default + + height = DEFAULT_SIZE; // if width zero, then height also always zero + } + + return { + width: width, + height: height + }; + } + }]); + + return NodeBase; + }(); + + /** + * A Box Node/Cluster shape. + * + * @extends NodeBase + */ + + var Box = + /*#__PURE__*/ + function (_NodeBase) { + inherits$1(Box, _NodeBase); + + /** + * @param {Object} options + * @param {Object} body + * @param {Label} labelModule + */ + function Box(options, body, labelModule) { + var _this; + + classCallCheck$1(this, Box); + + _this = possibleConstructorReturn$1(this, getPrototypeOf$1(Box).call(this, options, body, labelModule)); + + _this._setMargins(labelModule); + + return _this; + } + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {boolean} [selected] + * @param {boolean} [hover] + */ + + + createClass$1(Box, [{ + key: "resize", + value: function resize(ctx) { + var selected = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.selected; + var hover = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.hover; + + if (this.needsRefresh(selected, hover)) { + var dimensions = this.getDimensionsFromLabel(ctx, selected, hover); + this.width = dimensions.width + this.margin.right + this.margin.left; + this.height = dimensions.height + this.margin.top + this.margin.bottom; + this.radius = this.width / 2; + } + } + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {number} x width + * @param {number} y height + * @param {boolean} selected + * @param {boolean} hover + * @param {ArrowOptions} values + */ + + }, { + key: "draw", + value: function draw(ctx, x, y, selected, hover, values) { + this.resize(ctx, selected, hover); + this.left = x - this.width / 2; + this.top = y - this.height / 2; + this.initContextForDraw(ctx, values); + ctx.roundRect(this.left, this.top, this.width, this.height, values.borderRadius); + this.performFill(ctx, values); + this.updateBoundingBox(x, y, ctx, selected, hover); + this.labelModule.draw(ctx, this.left + this.textSize.width / 2 + this.margin.left, this.top + this.textSize.height / 2 + this.margin.top, selected, hover); + } + /** + * + * @param {number} x width + * @param {number} y height + * @param {CanvasRenderingContext2D} ctx + * @param {boolean} selected + * @param {boolean} hover + */ + + }, { + key: "updateBoundingBox", + value: function updateBoundingBox(x, y, ctx, selected, hover) { + this._updateBoundingBox(x, y, ctx, selected, hover); + + var borderRadius = this.options.shapeProperties.borderRadius; // only effective for box + + this._addBoundingBoxMargin(borderRadius); + } + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {number} angle + * @returns {number} + */ + + }, { + key: "distanceToBorder", + value: function distanceToBorder(ctx, angle) { + this.resize(ctx); + var borderWidth = this.options.borderWidth; + return Math.min(Math.abs(this.width / 2 / Math.cos(angle)), Math.abs(this.height / 2 / Math.sin(angle))) + borderWidth; + } + }]); + + return Box; + }(NodeBase); + + /** + * NOTE: This is a bad base class + * + * Child classes are: + * + * Image - uses *only* image methods + * Circle - uses *only* _drawRawCircle + * CircleImage - uses all + * + * TODO: Refactor, move _drawRawCircle to different module, derive Circle from NodeBase + * Rename this to ImageBase + * Consolidate common code in Image and CircleImage to base class + * + * @extends NodeBase + */ + + var CircleImageBase = + /*#__PURE__*/ + function (_NodeBase) { + inherits$1(CircleImageBase, _NodeBase); + + /** + * @param {Object} options + * @param {Object} body + * @param {Label} labelModule + */ + function CircleImageBase(options, body, labelModule) { + var _this; + + classCallCheck$1(this, CircleImageBase); + + _this = possibleConstructorReturn$1(this, getPrototypeOf$1(CircleImageBase).call(this, options, body, labelModule)); + _this.labelOffset = 0; + _this.selected = false; + return _this; + } + /** + * + * @param {Object} options + * @param {Object} [imageObj] + * @param {Object} [imageObjAlt] + */ + + + createClass$1(CircleImageBase, [{ + key: "setOptions", + value: function setOptions(options, imageObj, imageObjAlt) { + this.options = options; + + if (!(imageObj === undefined && imageObjAlt === undefined)) { + this.setImages(imageObj, imageObjAlt); + } + } + /** + * Set the images for this node. + * + * The images can be updated after the initial setting of options; + * therefore, this method needs to be reentrant. + * + * For correct working in error cases, it is necessary to properly set + * field 'nodes.brokenImage' in the options. + * + * @param {Image} imageObj required; main image to show for this node + * @param {Image|undefined} imageObjAlt optional; image to show when node is selected + */ + + }, { + key: "setImages", + value: function setImages(imageObj, imageObjAlt) { + if (imageObjAlt && this.selected) { + this.imageObj = imageObjAlt; + this.imageObjAlt = imageObj; + } else { + this.imageObj = imageObj; + this.imageObjAlt = imageObjAlt; + } + } + /** + * Set selection and switch between the base and the selected image. + * + * Do the switch only if imageObjAlt exists. + * + * @param {boolean} selected value of new selected state for current node + */ + + }, { + key: "switchImages", + value: function switchImages(selected) { + var selection_changed = selected && !this.selected || !selected && this.selected; + this.selected = selected; // Remember new selection + + if (this.imageObjAlt !== undefined && selection_changed) { + var imageTmp = this.imageObj; + this.imageObj = this.imageObjAlt; + this.imageObjAlt = imageTmp; + } + } + /** + * Adjust the node dimensions for a loaded image. + * + * Pre: this.imageObj is valid + */ + + }, { + key: "_resizeImage", + value: function _resizeImage() { + var width, height; + + if (this.options.shapeProperties.useImageSize === false) { + // Use the size property + var ratio_width = 1; + var ratio_height = 1; // Only calculate the proper ratio if both width and height not zero + + if (this.imageObj.width && this.imageObj.height) { + if (this.imageObj.width > this.imageObj.height) { + ratio_width = this.imageObj.width / this.imageObj.height; + } else { + ratio_height = this.imageObj.height / this.imageObj.width; + } + } + + width = this.options.size * 2 * ratio_width; + height = this.options.size * 2 * ratio_height; + } else { + // Use the image size + width = this.imageObj.width; + height = this.imageObj.height; + } + + this.width = width; + this.height = height; + this.radius = 0.5 * this.width; + } + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {number} x width + * @param {number} y height + * @param {ArrowOptions} values + * @private + */ + + }, { + key: "_drawRawCircle", + value: function _drawRawCircle(ctx, x, y, values) { + this.initContextForDraw(ctx, values); + ctx.circle(x, y, values.size); + this.performFill(ctx, values); + } + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {ArrowOptions} values + * @private + */ + + }, { + key: "_drawImageAtPosition", + value: function _drawImageAtPosition(ctx, values) { + if (this.imageObj.width != 0) { + // draw the image + ctx.globalAlpha = 1.0; // draw shadow if enabled + + this.enableShadow(ctx, values); + var factor = 1; + + if (this.options.shapeProperties.interpolation === true) { + factor = this.imageObj.width / this.width / this.body.view.scale; + } + + this.imageObj.drawImageAtPosition(ctx, factor, this.left, this.top, this.width, this.height); // disable shadows for other elements. + + this.disableShadow(ctx, values); + } + } + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {number} x width + * @param {number} y height + * @param {boolean} selected + * @param {boolean} hover + * @private + */ + + }, { + key: "_drawImageLabel", + value: function _drawImageLabel(ctx, x, y, selected, hover) { + var yLabel; + var offset = 0; + + if (this.height !== undefined) { + offset = this.height * 0.5; + var labelDimensions = this.labelModule.getTextSize(ctx, selected, hover); + + if (labelDimensions.lineCount >= 1) { + offset += labelDimensions.height / 2; + } + } + + yLabel = y + offset; + + if (this.options.label) { + this.labelOffset = offset; + } + + this.labelModule.draw(ctx, x, yLabel, selected, hover, 'hanging'); + } + }]); + + return CircleImageBase; + }(NodeBase); + + /** + * A Circle Node/Cluster shape. + * + * @extends CircleImageBase + */ + + var Circle = + /*#__PURE__*/ + function (_CircleImageBase) { + inherits$1(Circle, _CircleImageBase); + + /** + * @param {Object} options + * @param {Object} body + * @param {Label} labelModule + */ + function Circle(options, body, labelModule) { + var _this; + + classCallCheck$1(this, Circle); + + _this = possibleConstructorReturn$1(this, getPrototypeOf$1(Circle).call(this, options, body, labelModule)); + + _this._setMargins(labelModule); + + return _this; + } + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {boolean} [selected] + * @param {boolean} [hover] + */ + + + createClass$1(Circle, [{ + key: "resize", + value: function resize(ctx) { + var selected = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.selected; + var hover = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.hover; + + if (this.needsRefresh(selected, hover)) { + var dimensions = this.getDimensionsFromLabel(ctx, selected, hover); + var diameter = Math.max(dimensions.width + this.margin.right + this.margin.left, dimensions.height + this.margin.top + this.margin.bottom); + this.options.size = diameter / 2; // NOTE: this size field only set here, not in Ellipse, Database, Box + + this.width = diameter; + this.height = diameter; + this.radius = this.width / 2; + } + } + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {number} x width + * @param {number} y height + * @param {boolean} selected + * @param {boolean} hover + * @param {ArrowOptions} values + */ + + }, { + key: "draw", + value: function draw(ctx, x, y, selected, hover, values) { + this.resize(ctx, selected, hover); + this.left = x - this.width / 2; + this.top = y - this.height / 2; + + this._drawRawCircle(ctx, x, y, values); + + this.updateBoundingBox(x, y); + this.labelModule.draw(ctx, this.left + this.textSize.width / 2 + this.margin.left, y, selected, hover); + } + /** + * + * @param {number} x width + * @param {number} y height + */ + + }, { + key: "updateBoundingBox", + value: function updateBoundingBox(x, y) { + this.boundingBox.top = y - this.options.size; + this.boundingBox.left = x - this.options.size; + this.boundingBox.right = x + this.options.size; + this.boundingBox.bottom = y + this.options.size; + } + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {number} angle - Unused + * @returns {number} + */ + + }, { + key: "distanceToBorder", + value: function distanceToBorder(ctx, angle) { + // eslint-disable-line no-unused-vars + this.resize(ctx); + return this.width * 0.5; + } + }]); + + return Circle; + }(CircleImageBase); + + /** + * A CircularImage Node/Cluster shape. + * + * @extends CircleImageBase + */ + + var CircularImage = + /*#__PURE__*/ + function (_CircleImageBase) { + inherits$1(CircularImage, _CircleImageBase); + + /** + * @param {Object} options + * @param {Object} body + * @param {Label} labelModule + * @param {Image} imageObj + * @param {Image} imageObjAlt + */ + function CircularImage(options, body, labelModule, imageObj, imageObjAlt) { + var _this; + + classCallCheck$1(this, CircularImage); + + _this = possibleConstructorReturn$1(this, getPrototypeOf$1(CircularImage).call(this, options, body, labelModule)); + + _this.setImages(imageObj, imageObjAlt); + + return _this; + } + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {boolean} [selected] + * @param {boolean} [hover] + */ + + + createClass$1(CircularImage, [{ + key: "resize", + value: function resize(ctx) { + var selected = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.selected; + var hover = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.hover; + var imageAbsent = this.imageObj.src === undefined || this.imageObj.width === undefined || this.imageObj.height === undefined; + + if (imageAbsent) { + var diameter = this.options.size * 2; + this.width = diameter; + this.height = diameter; + this.radius = 0.5 * this.width; + return; + } // At this point, an image is present, i.e. this.imageObj is valid. + + + if (this.needsRefresh(selected, hover)) { + this._resizeImage(); + } + } + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {number} x width + * @param {number} y height + * @param {boolean} selected + * @param {boolean} hover + * @param {ArrowOptions} values + */ + + }, { + key: "draw", + value: function draw(ctx, x, y, selected, hover, values) { + this.switchImages(selected); + this.resize(); + this.left = x - this.width / 2; + this.top = y - this.height / 2; // draw the background circle. IMPORTANT: the stroke in this method is used by the clip method below. + + this._drawRawCircle(ctx, x, y, values); // now we draw in the circle, we save so we can revert the clip operation after drawing. + + + ctx.save(); // clip is used to use the stroke in drawRawCircle as an area that we can draw in. + + ctx.clip(); // draw the image + + this._drawImageAtPosition(ctx, values); // restore so we can again draw on the full canvas + + + ctx.restore(); + + this._drawImageLabel(ctx, x, y, selected, hover); + + this.updateBoundingBox(x, y); + } // TODO: compare with Circle.updateBoundingBox(), consolidate? More stuff is happening here + + /** + * + * @param {number} x width + * @param {number} y height + */ + + }, { + key: "updateBoundingBox", + value: function updateBoundingBox(x, y) { + this.boundingBox.top = y - this.options.size; + this.boundingBox.left = x - this.options.size; + this.boundingBox.right = x + this.options.size; + this.boundingBox.bottom = y + this.options.size; // TODO: compare with Image.updateBoundingBox(), consolidate? + + this.boundingBox.left = Math.min(this.boundingBox.left, this.labelModule.size.left); + this.boundingBox.right = Math.max(this.boundingBox.right, this.labelModule.size.left + this.labelModule.size.width); + this.boundingBox.bottom = Math.max(this.boundingBox.bottom, this.boundingBox.bottom + this.labelOffset); + } + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {number} angle - Unused + * @returns {number} + */ + + }, { + key: "distanceToBorder", + value: function distanceToBorder(ctx, angle) { + // eslint-disable-line no-unused-vars + this.resize(ctx); + return this.width * 0.5; + } + }]); + + return CircularImage; + }(CircleImageBase); + + /** + * A Database Node/Cluster shape. + * + * @extends NodeBase + */ + + var Database = + /*#__PURE__*/ + function (_NodeBase) { + inherits$1(Database, _NodeBase); + + /** + * @param {Object} options + * @param {Object} body + * @param {Label} labelModule + */ + function Database(options, body, labelModule) { + var _this; + + classCallCheck$1(this, Database); + + _this = possibleConstructorReturn$1(this, getPrototypeOf$1(Database).call(this, options, body, labelModule)); + + _this._setMargins(labelModule); + + return _this; + } + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {boolean} selected + * @param {boolean} hover + */ + + + createClass$1(Database, [{ + key: "resize", + value: function resize(ctx, selected, hover) { + if (this.needsRefresh(selected, hover)) { + var dimensions = this.getDimensionsFromLabel(ctx, selected, hover); + var size = dimensions.width + this.margin.right + this.margin.left; + this.width = size; + this.height = size; + this.radius = this.width / 2; + } + } + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {number} x width + * @param {number} y height + * @param {boolean} selected + * @param {boolean} hover + * @param {ArrowOptions} values + */ + + }, { + key: "draw", + value: function draw(ctx, x, y, selected, hover, values) { + this.resize(ctx, selected, hover); + this.left = x - this.width / 2; + this.top = y - this.height / 2; + this.initContextForDraw(ctx, values); + ctx.database(x - this.width / 2, y - this.height / 2, this.width, this.height); + this.performFill(ctx, values); + this.updateBoundingBox(x, y, ctx, selected, hover); + this.labelModule.draw(ctx, this.left + this.textSize.width / 2 + this.margin.left, this.top + this.textSize.height / 2 + this.margin.top, selected, hover); + } + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {number} angle + * @returns {number} + */ + + }, { + key: "distanceToBorder", + value: function distanceToBorder(ctx, angle) { + return this._distanceToBorder(ctx, angle); + } + }]); + + return Database; + }(NodeBase); + + /** + * Base class for constructing Node/Cluster Shapes. + * + * @extends NodeBase + */ + + var ShapeBase = + /*#__PURE__*/ + function (_NodeBase) { + inherits$1(ShapeBase, _NodeBase); + + /** + * @param {Object} options + * @param {Object} body + * @param {Label} labelModule + */ + function ShapeBase(options, body, labelModule) { + classCallCheck$1(this, ShapeBase); + + return possibleConstructorReturn$1(this, getPrototypeOf$1(ShapeBase).call(this, options, body, labelModule)); + } + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {boolean} [selected] + * @param {boolean} [hover] + * @param {Object} [values={size: this.options.size}] + */ + + + createClass$1(ShapeBase, [{ + key: "resize", + value: function resize(ctx) { + var selected = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.selected; + var hover = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.hover; + var values = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : { + size: this.options.size + }; + + if (this.needsRefresh(selected, hover)) { + this.labelModule.getTextSize(ctx, selected, hover); + var size = 2 * values.size; + this.width = size; + this.height = size; + this.radius = 0.5 * this.width; + } + } + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {string} shape + * @param {number} sizeMultiplier - Unused! TODO: Remove next major release + * @param {number} x + * @param {number} y + * @param {boolean} selected + * @param {boolean} hover + * @param {ArrowOptions} values + * @private + */ + + }, { + key: "_drawShape", + value: function _drawShape(ctx, shape, sizeMultiplier, x, y, selected, hover, values) { + this.resize(ctx, selected, hover, values); + this.left = x - this.width / 2; + this.top = y - this.height / 2; + this.initContextForDraw(ctx, values); + ctx[shape](x, y, values.size); + this.performFill(ctx, values); + + if (this.options.icon !== undefined) { + if (this.options.icon.code !== undefined) { + ctx.font = (selected ? "bold " : "") + this.height / 2 + "px " + (this.options.icon.face || 'FontAwesome'); + ctx.fillStyle = this.options.icon.color || "black"; + ctx.textAlign = "center"; + ctx.textBaseline = "middle"; + ctx.fillText(this.options.icon.code, x, y); + } + } + + if (this.options.label !== undefined) { + // Need to call following here in order to ensure value for `this.labelModule.size.height` + this.labelModule.calculateLabelSize(ctx, selected, hover, x, y, 'hanging'); + var yLabel = y + 0.5 * this.height + 0.5 * this.labelModule.size.height; + this.labelModule.draw(ctx, x, yLabel, selected, hover, 'hanging'); + } + + this.updateBoundingBox(x, y); + } + /** + * + * @param {number} x + * @param {number} y + */ + + }, { + key: "updateBoundingBox", + value: function updateBoundingBox(x, y) { + this.boundingBox.top = y - this.options.size; + this.boundingBox.left = x - this.options.size; + this.boundingBox.right = x + this.options.size; + this.boundingBox.bottom = y + this.options.size; + + if (this.options.label !== undefined && this.labelModule.size.width > 0) { + this.boundingBox.left = Math.min(this.boundingBox.left, this.labelModule.size.left); + this.boundingBox.right = Math.max(this.boundingBox.right, this.labelModule.size.left + this.labelModule.size.width); + this.boundingBox.bottom = Math.max(this.boundingBox.bottom, this.boundingBox.bottom + this.labelModule.size.height); + } + } + }]); + + return ShapeBase; + }(NodeBase); + + /** + * A Diamond Node/Cluster shape. + * + * @extends ShapeBase + */ + + var Diamond = + /*#__PURE__*/ + function (_ShapeBase) { + inherits$1(Diamond, _ShapeBase); + + /** + * @param {Object} options + * @param {Object} body + * @param {Label} labelModule + */ + function Diamond(options, body, labelModule) { + classCallCheck$1(this, Diamond); + + return possibleConstructorReturn$1(this, getPrototypeOf$1(Diamond).call(this, options, body, labelModule)); + } + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {number} x width + * @param {number} y height + * @param {boolean} selected + * @param {boolean} hover + * @param {ArrowOptions} values + */ + + + createClass$1(Diamond, [{ + key: "draw", + value: function draw(ctx, x, y, selected, hover, values) { + this._drawShape(ctx, 'diamond', 4, x, y, selected, hover, values); + } + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {number} angle + * @returns {number} + */ + + }, { + key: "distanceToBorder", + value: function distanceToBorder(ctx, angle) { + return this._distanceToBorder(ctx, angle); + } + }]); + + return Diamond; + }(ShapeBase); + + /** + * A Dot Node/Cluster shape. + * + * @extends ShapeBase + */ + + var Dot = + /*#__PURE__*/ + function (_ShapeBase) { + inherits$1(Dot, _ShapeBase); + + /** + * @param {Object} options + * @param {Object} body + * @param {Label} labelModule + */ + function Dot(options, body, labelModule) { + classCallCheck$1(this, Dot); + + return possibleConstructorReturn$1(this, getPrototypeOf$1(Dot).call(this, options, body, labelModule)); + } + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {number} x width + * @param {number} y height + * @param {boolean} selected + * @param {boolean} hover + * @param {ArrowOptions} values + */ + + + createClass$1(Dot, [{ + key: "draw", + value: function draw(ctx, x, y, selected, hover, values) { + this._drawShape(ctx, 'circle', 2, x, y, selected, hover, values); + } + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {number} angle + * @returns {number} + */ + + }, { + key: "distanceToBorder", + value: function distanceToBorder(ctx, angle) { + // eslint-disable-line no-unused-vars + this.resize(ctx); + return this.options.size; + } + }]); + + return Dot; + }(ShapeBase); + + /** + * Am Ellipse Node/Cluster shape. + * + * @extends NodeBase + */ + + var Ellipse = + /*#__PURE__*/ + function (_NodeBase) { + inherits$1(Ellipse, _NodeBase); + + /** + * @param {Object} options + * @param {Object} body + * @param {Label} labelModule + */ + function Ellipse(options, body, labelModule) { + classCallCheck$1(this, Ellipse); + + return possibleConstructorReturn$1(this, getPrototypeOf$1(Ellipse).call(this, options, body, labelModule)); + } + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {boolean} [selected] + * @param {boolean} [hover] + */ + + + createClass$1(Ellipse, [{ + key: "resize", + value: function resize(ctx) { + var selected = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.selected; + var hover = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.hover; + + if (this.needsRefresh(selected, hover)) { + var dimensions = this.getDimensionsFromLabel(ctx, selected, hover); + this.height = dimensions.height * 2; + this.width = dimensions.width + dimensions.height; + this.radius = 0.5 * this.width; + } + } + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {number} x width + * @param {number} y height + * @param {boolean} selected + * @param {boolean} hover + * @param {ArrowOptions} values + */ + + }, { + key: "draw", + value: function draw(ctx, x, y, selected, hover, values) { + this.resize(ctx, selected, hover); + this.left = x - this.width * 0.5; + this.top = y - this.height * 0.5; + this.initContextForDraw(ctx, values); + ctx.ellipse_vis(this.left, this.top, this.width, this.height); + this.performFill(ctx, values); + this.updateBoundingBox(x, y, ctx, selected, hover); + this.labelModule.draw(ctx, x, y, selected, hover); + } + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {number} angle + * @returns {number} + */ + + }, { + key: "distanceToBorder", + value: function distanceToBorder(ctx, angle) { + this.resize(ctx); + var a = this.width * 0.5; + var b = this.height * 0.5; + var w = Math.sin(angle) * a; + var h = Math.cos(angle) * b; + return a * b / Math.sqrt(w * w + h * h); + } + }]); + + return Ellipse; + }(NodeBase); + + /** + * An icon replacement for the default Node shape. + * + * @extends NodeBase + */ + + var Icon = + /*#__PURE__*/ + function (_NodeBase) { + inherits$1(Icon, _NodeBase); + + /** + * @param {Object} options + * @param {Object} body + * @param {Label} labelModule + */ + function Icon(options, body, labelModule) { + var _this; + + classCallCheck$1(this, Icon); + + _this = possibleConstructorReturn$1(this, getPrototypeOf$1(Icon).call(this, options, body, labelModule)); + + _this._setMargins(labelModule); + + return _this; + } + /** + * + * @param {CanvasRenderingContext2D} ctx - Unused. + * @param {boolean} [selected] + * @param {boolean} [hover] + */ + + + createClass$1(Icon, [{ + key: "resize", + value: function resize(ctx, selected, hover) { + if (this.needsRefresh(selected, hover)) { + this.iconSize = { + width: Number(this.options.icon.size), + height: Number(this.options.icon.size) + }; + this.width = this.iconSize.width + this.margin.right + this.margin.left; + this.height = this.iconSize.height + this.margin.top + this.margin.bottom; + this.radius = 0.5 * this.width; + } + } + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {number} x width + * @param {number} y height + * @param {boolean} selected + * @param {boolean} hover + * @param {ArrowOptions} values + */ + + }, { + key: "draw", + value: function draw(ctx, x, y, selected, hover, values) { + this.resize(ctx, selected, hover); + this.options.icon.size = this.options.icon.size || 50; + this.left = x - this.width / 2; + this.top = y - this.height / 2; + + this._icon(ctx, x, y, selected, hover, values); + + if (this.options.label !== undefined) { + var iconTextSpacing = 5; + this.labelModule.draw(ctx, this.left + this.iconSize.width / 2 + this.margin.left, y + this.height / 2 + iconTextSpacing, selected); + } + + this.updateBoundingBox(x, y); + } + /** + * + * @param {number} x + * @param {number} y + */ + + }, { + key: "updateBoundingBox", + value: function updateBoundingBox(x, y) { + this.boundingBox.top = y - this.options.icon.size * 0.5; + this.boundingBox.left = x - this.options.icon.size * 0.5; + this.boundingBox.right = x + this.options.icon.size * 0.5; + this.boundingBox.bottom = y + this.options.icon.size * 0.5; + + if (this.options.label !== undefined && this.labelModule.size.width > 0) { + var iconTextSpacing = 5; + this.boundingBox.left = Math.min(this.boundingBox.left, this.labelModule.size.left); + this.boundingBox.right = Math.max(this.boundingBox.right, this.labelModule.size.left + this.labelModule.size.width); + this.boundingBox.bottom = Math.max(this.boundingBox.bottom, this.boundingBox.bottom + this.labelModule.size.height + iconTextSpacing); + } + } + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {number} x width + * @param {number} y height + * @param {boolean} selected + * @param {boolean} hover - Unused + * @param {ArrowOptions} values + */ + + }, { + key: "_icon", + value: function _icon(ctx, x, y, selected, hover, values) { + var iconSize = Number(this.options.icon.size); + + if (this.options.icon.code !== undefined) { + ctx.font = (selected ? "bold " : "") + iconSize + "px " + this.options.icon.face; // draw icon + + ctx.fillStyle = this.options.icon.color || "black"; + ctx.textAlign = "center"; + ctx.textBaseline = "middle"; // draw shadow if enabled + + this.enableShadow(ctx, values); + ctx.fillText(this.options.icon.code, x, y); // disable shadows for other elements. + + this.disableShadow(ctx, values); + } else { + console.error('When using the icon shape, you need to define the code in the icon options object. This can be done per node or globally.'); + } + } + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {number} angle + * @returns {number} + */ + + }, { + key: "distanceToBorder", + value: function distanceToBorder(ctx, angle) { + return this._distanceToBorder(ctx, angle); + } + }]); + + return Icon; + }(NodeBase); + + /** + * An image-based replacement for the default Node shape. + * + * @extends CircleImageBase + */ + + var Image$1 = + /*#__PURE__*/ + function (_CircleImageBase) { + inherits$1(Image, _CircleImageBase); + + /** + * @param {Object} options + * @param {Object} body + * @param {Label} labelModule + * @param {Image} imageObj + * @param {Image} imageObjAlt + */ + function Image(options, body, labelModule, imageObj, imageObjAlt) { + var _this; + + classCallCheck$1(this, Image); + + _this = possibleConstructorReturn$1(this, getPrototypeOf$1(Image).call(this, options, body, labelModule)); + + _this.setImages(imageObj, imageObjAlt); + + return _this; + } + /** + * + * @param {CanvasRenderingContext2D} ctx - Unused. + * @param {boolean} [selected] + * @param {boolean} [hover] + */ + + + createClass$1(Image, [{ + key: "resize", + value: function resize(ctx) { + var selected = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.selected; + var hover = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.hover; + var imageAbsent = this.imageObj.src === undefined || this.imageObj.width === undefined || this.imageObj.height === undefined; + + if (imageAbsent) { + var side = this.options.size * 2; + this.width = side; + this.height = side; + return; + } + + if (this.needsRefresh(selected, hover)) { + this._resizeImage(); + } + } + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {number} x width + * @param {number} y height + * @param {boolean} selected + * @param {boolean} hover + * @param {ArrowOptions} values + */ + + }, { + key: "draw", + value: function draw(ctx, x, y, selected, hover, values) { + this.switchImages(selected); + this.resize(); + this.left = x - this.width / 2; + this.top = y - this.height / 2; + + if (this.options.shapeProperties.useBorderWithImage === true) { + var neutralborderWidth = this.options.borderWidth; + var selectionLineWidth = this.options.borderWidthSelected || 2 * this.options.borderWidth; + var borderWidth = (selected ? selectionLineWidth : neutralborderWidth) / this.body.view.scale; + ctx.lineWidth = Math.min(this.width, borderWidth); + ctx.beginPath(); // setup the line properties. + + ctx.strokeStyle = selected ? this.options.color.highlight.border : hover ? this.options.color.hover.border : this.options.color.border; // set a fillstyle + + ctx.fillStyle = selected ? this.options.color.highlight.background : hover ? this.options.color.hover.background : this.options.color.background; // draw a rectangle to form the border around. This rectangle is filled so the opacity of a picture (in future vis releases?) can be used to tint the image + + ctx.rect(this.left - 0.5 * ctx.lineWidth, this.top - 0.5 * ctx.lineWidth, this.width + ctx.lineWidth, this.height + ctx.lineWidth); + ctx.fill(); + this.performStroke(ctx, values); + ctx.closePath(); + } + + this._drawImageAtPosition(ctx, values); + + this._drawImageLabel(ctx, x, y, selected, hover); + + this.updateBoundingBox(x, y); + } + /** + * + * @param {number} x + * @param {number} y + */ + + }, { + key: "updateBoundingBox", + value: function updateBoundingBox(x, y) { + this.resize(); + + this._updateBoundingBox(x, y); + + if (this.options.label !== undefined && this.labelModule.size.width > 0) { + this.boundingBox.left = Math.min(this.boundingBox.left, this.labelModule.size.left); + this.boundingBox.right = Math.max(this.boundingBox.right, this.labelModule.size.left + this.labelModule.size.width); + this.boundingBox.bottom = Math.max(this.boundingBox.bottom, this.boundingBox.bottom + this.labelOffset); + } + } + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {number} angle + * @returns {number} + */ + + }, { + key: "distanceToBorder", + value: function distanceToBorder(ctx, angle) { + return this._distanceToBorder(ctx, angle); + } + }]); + + return Image; + }(CircleImageBase); + + /** + * A Square Node/Cluster shape. + * + * @extends ShapeBase + */ + + var Square = + /*#__PURE__*/ + function (_ShapeBase) { + inherits$1(Square, _ShapeBase); + + /** + * @param {Object} options + * @param {Object} body + * @param {Label} labelModule + */ + function Square(options, body, labelModule) { + classCallCheck$1(this, Square); + + return possibleConstructorReturn$1(this, getPrototypeOf$1(Square).call(this, options, body, labelModule)); + } + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {number} x width + * @param {number} y height + * @param {boolean} selected + * @param {boolean} hover + * @param {ArrowOptions} values + */ + + + createClass$1(Square, [{ + key: "draw", + value: function draw(ctx, x, y, selected, hover, values) { + this._drawShape(ctx, 'square', 2, x, y, selected, hover, values); + } + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {number} angle + * @returns {number} + */ + + }, { + key: "distanceToBorder", + value: function distanceToBorder(ctx, angle) { + return this._distanceToBorder(ctx, angle); + } + }]); + + return Square; + }(ShapeBase); + + /** + * A Hexagon Node/Cluster shape. + * + * @extends ShapeBase + */ + + var Hexagon = + /*#__PURE__*/ + function (_ShapeBase) { + inherits$1(Hexagon, _ShapeBase); + + /** + * @param {Object} options + * @param {Object} body + * @param {Label} labelModule + */ + function Hexagon(options, body, labelModule) { + classCallCheck$1(this, Hexagon); + + return possibleConstructorReturn$1(this, getPrototypeOf$1(Hexagon).call(this, options, body, labelModule)); + } + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {number} x width + * @param {number} y height + * @param {boolean} selected + * @param {boolean} hover + * @param {ArrowOptions} values + */ + + + createClass$1(Hexagon, [{ + key: "draw", + value: function draw(ctx, x, y, selected, hover, values) { + this._drawShape(ctx, 'hexagon', 4, x, y, selected, hover, values); + } + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {number} angle + * @returns {number} + */ + + }, { + key: "distanceToBorder", + value: function distanceToBorder(ctx, angle) { + return this._distanceToBorder(ctx, angle); + } + }]); + + return Hexagon; + }(ShapeBase); + + /** + * A Star Node/Cluster shape. + * + * @extends ShapeBase + */ + + var Star = + /*#__PURE__*/ + function (_ShapeBase) { + inherits$1(Star, _ShapeBase); + + /** + * @param {Object} options + * @param {Object} body + * @param {Label} labelModule + */ + function Star(options, body, labelModule) { + classCallCheck$1(this, Star); + + return possibleConstructorReturn$1(this, getPrototypeOf$1(Star).call(this, options, body, labelModule)); + } + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {number} x width + * @param {number} y height + * @param {boolean} selected + * @param {boolean} hover + * @param {ArrowOptions} values + */ + + + createClass$1(Star, [{ + key: "draw", + value: function draw(ctx, x, y, selected, hover, values) { + this._drawShape(ctx, 'star', 4, x, y, selected, hover, values); + } + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {number} angle + * @returns {number} + */ + + }, { + key: "distanceToBorder", + value: function distanceToBorder(ctx, angle) { + return this._distanceToBorder(ctx, angle); + } + }]); + + return Star; + }(ShapeBase); + + /** + * A text-based replacement for the default Node shape. + * + * @extends NodeBase + */ + + var Text = + /*#__PURE__*/ + function (_NodeBase) { + inherits$1(Text, _NodeBase); + + /** + * @param {Object} options + * @param {Object} body + * @param {Label} labelModule + */ + function Text(options, body, labelModule) { + var _this; + + classCallCheck$1(this, Text); + + _this = possibleConstructorReturn$1(this, getPrototypeOf$1(Text).call(this, options, body, labelModule)); + + _this._setMargins(labelModule); + + return _this; + } + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {boolean} selected + * @param {boolean} hover + */ + + + createClass$1(Text, [{ + key: "resize", + value: function resize(ctx, selected, hover) { + if (this.needsRefresh(selected, hover)) { + this.textSize = this.labelModule.getTextSize(ctx, selected, hover); + this.width = this.textSize.width + this.margin.right + this.margin.left; + this.height = this.textSize.height + this.margin.top + this.margin.bottom; + this.radius = 0.5 * this.width; + } + } + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {number} x width + * @param {number} y height + * @param {boolean} selected + * @param {boolean} hover + * @param {ArrowOptions} values + */ + + }, { + key: "draw", + value: function draw(ctx, x, y, selected, hover, values) { + this.resize(ctx, selected, hover); + this.left = x - this.width / 2; + this.top = y - this.height / 2; // draw shadow if enabled + + this.enableShadow(ctx, values); + this.labelModule.draw(ctx, this.left + this.textSize.width / 2 + this.margin.left, this.top + this.textSize.height / 2 + this.margin.top, selected, hover); // disable shadows for other elements. + + this.disableShadow(ctx, values); + this.updateBoundingBox(x, y, ctx, selected, hover); + } + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {number} angle + * @returns {number} + */ + + }, { + key: "distanceToBorder", + value: function distanceToBorder(ctx, angle) { + return this._distanceToBorder(ctx, angle); + } + }]); + + return Text; + }(NodeBase); + + /** + * A Triangle Node/Cluster shape. + * + * @extends ShapeBase + */ + + var Triangle = + /*#__PURE__*/ + function (_ShapeBase) { + inherits$1(Triangle, _ShapeBase); + + /** + * @param {Object} options + * @param {Object} body + * @param {Label} labelModule + */ + function Triangle(options, body, labelModule) { + classCallCheck$1(this, Triangle); + + return possibleConstructorReturn$1(this, getPrototypeOf$1(Triangle).call(this, options, body, labelModule)); + } + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {number} x + * @param {number} y + * @param {boolean} selected + * @param {boolean} hover + * @param {ArrowOptions} values + */ + + + createClass$1(Triangle, [{ + key: "draw", + value: function draw(ctx, x, y, selected, hover, values) { + this._drawShape(ctx, 'triangle', 3, x, y, selected, hover, values); + } + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {number} angle + * @returns {number} + */ + + }, { + key: "distanceToBorder", + value: function distanceToBorder(ctx, angle) { + return this._distanceToBorder(ctx, angle); + } + }]); + + return Triangle; + }(ShapeBase); + + /** + * A downward facing Triangle Node/Cluster shape. + * + * @extends ShapeBase + */ + + var TriangleDown = + /*#__PURE__*/ + function (_ShapeBase) { + inherits$1(TriangleDown, _ShapeBase); + + /** + * @param {Object} options + * @param {Object} body + * @param {Label} labelModule + */ + function TriangleDown(options, body, labelModule) { + classCallCheck$1(this, TriangleDown); + + return possibleConstructorReturn$1(this, getPrototypeOf$1(TriangleDown).call(this, options, body, labelModule)); + } + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {number} x + * @param {number} y + * @param {boolean} selected + * @param {boolean} hover + * @param {ArrowOptions} values + */ + + + createClass$1(TriangleDown, [{ + key: "draw", + value: function draw(ctx, x, y, selected, hover, values) { + this._drawShape(ctx, 'triangleDown', 3, x, y, selected, hover, values); + } + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {number} angle + * @returns {number} + */ + + }, { + key: "distanceToBorder", + value: function distanceToBorder(ctx, angle) { + return this._distanceToBorder(ctx, angle); + } + }]); + + return TriangleDown; + }(ShapeBase); + + var errorFound = false; + var allOptions; + var printStyle = 'background: #FFeeee; color: #dd0000'; + /** + * Used to validate options. + */ + + var Validator = + /*#__PURE__*/ + function () { + /** + * @ignore + */ + function Validator() { + classCallCheck$1(this, Validator); + } + /** + * Main function to be called + * @param {Object} options + * @param {Object} referenceOptions + * @param {Object} subObject + * @returns {boolean} + * @static + */ + + + createClass$1(Validator, null, [{ + key: "validate", + value: function validate(options, referenceOptions, subObject) { + errorFound = false; + allOptions = referenceOptions; + var usedOptions = referenceOptions; + + if (subObject !== undefined) { + usedOptions = referenceOptions[subObject]; + } + + Validator.parse(options, usedOptions, []); + return errorFound; + } + /** + * Will traverse an object recursively and check every value + * @param {Object} options + * @param {Object} referenceOptions + * @param {array} path | where to look for the actual option + * @static + */ + + }, { + key: "parse", + value: function parse(options, referenceOptions, path) { + for (var option in options) { + if (options.hasOwnProperty(option)) { + Validator.check(option, options, referenceOptions, path); + } + } + } + /** + * Check every value. If the value is an object, call the parse function on that object. + * @param {string} option + * @param {Object} options + * @param {Object} referenceOptions + * @param {array} path | where to look for the actual option + * @static + */ + + }, { + key: "check", + value: function check(option, options, referenceOptions, path) { + if (referenceOptions[option] === undefined && referenceOptions.__any__ === undefined) { + Validator.getSuggestion(option, referenceOptions, path); + return; + } + + var referenceOption = option; + var is_object = true; + + if (referenceOptions[option] === undefined && referenceOptions.__any__ !== undefined) { + // NOTE: This only triggers if the __any__ is in the top level of the options object. + // THAT'S A REALLY BAD PLACE TO ALLOW IT!!!! + // TODO: Examine if needed, remove if possible + // __any__ is a wildcard. Any value is accepted and will be further analysed by reference. + referenceOption = '__any__'; // if the any-subgroup is not a predefined object in the configurator, + // we do not look deeper into the object. + + is_object = Validator.getType(options[option]) === 'object'; + } + + var refOptionObj = referenceOptions[referenceOption]; + + if (is_object && refOptionObj.__type__ !== undefined) { + refOptionObj = refOptionObj.__type__; + } + + Validator.checkFields(option, options, referenceOptions, referenceOption, refOptionObj, path); + } + /** + * + * @param {string} option | the option property + * @param {Object} options | The supplied options object + * @param {Object} referenceOptions | The reference options containing all options and their allowed formats + * @param {string} referenceOption | Usually this is the same as option, except when handling an __any__ tag. + * @param {string} refOptionObj | This is the type object from the reference options + * @param {Array} path | where in the object is the option + * @static + */ + + }, { + key: "checkFields", + value: function checkFields(option, options, referenceOptions, referenceOption, refOptionObj, path) { + var log = function log(message) { + console.log('%c' + message + Validator.printLocation(path, option), printStyle); + }; + + var optionType = Validator.getType(options[option]); + var refOptionType = refOptionObj[optionType]; + + if (refOptionType !== undefined) { + // if the type is correct, we check if it is supposed to be one of a few select values + if (Validator.getType(refOptionType) === 'array' && refOptionType.indexOf(options[option]) === -1) { + log('Invalid option detected in "' + option + '".' + ' Allowed values are:' + Validator.print(refOptionType) + ' not "' + options[option] + '". '); + errorFound = true; + } else if (optionType === 'object' && referenceOption !== "__any__") { + path = util.copyAndExtendArray(path, option); + Validator.parse(options[option], referenceOptions[referenceOption], path); + } + } else if (refOptionObj['any'] === undefined) { + // type of the field is incorrect and the field cannot be any + log('Invalid type received for "' + option + '". Expected: ' + Validator.print(Object.keys(refOptionObj)) + '. Received [' + optionType + '] "' + options[option] + '"'); + errorFound = true; + } + } + /** + * + * @param {Object|boolean|number|string|Array.|Date|Node|Moment|undefined|null} object + * @returns {string} + * @static + */ + + }, { + key: "getType", + value: function getType(object) { + var type = _typeof_1$1(object); + + if (type === 'object') { + if (object === null) { + return 'null'; + } + + if (object instanceof Boolean) { + return 'boolean'; + } + + if (object instanceof Number) { + return 'number'; + } + + if (object instanceof String) { + return 'string'; + } + + if (Array.isArray(object)) { + return 'array'; + } + + if (object instanceof Date) { + return 'date'; + } + + if (object.nodeType !== undefined) { + return 'dom'; + } + + if (object._isAMomentObject === true) { + return 'moment'; + } + + return 'object'; + } else if (type === 'number') { + return 'number'; + } else if (type === 'boolean') { + return 'boolean'; + } else if (type === 'string') { + return 'string'; + } else if (type === undefined) { + return 'undefined'; + } + + return type; + } + /** + * @param {string} option + * @param {Object} options + * @param {Array.} path + * @static + */ + + }, { + key: "getSuggestion", + value: function getSuggestion(option, options, path) { + var localSearch = Validator.findInOptions(option, options, path, false); + var globalSearch = Validator.findInOptions(option, allOptions, [], true); + var localSearchThreshold = 8; + var globalSearchThreshold = 4; + var msg; + + if (localSearch.indexMatch !== undefined) { + msg = ' in ' + Validator.printLocation(localSearch.path, option, '') + 'Perhaps it was incomplete? Did you mean: "' + localSearch.indexMatch + '"?\n\n'; + } else if (globalSearch.distance <= globalSearchThreshold && localSearch.distance > globalSearch.distance) { + msg = ' in ' + Validator.printLocation(localSearch.path, option, '') + 'Perhaps it was misplaced? Matching option found at: ' + Validator.printLocation(globalSearch.path, globalSearch.closestMatch, ''); + } else if (localSearch.distance <= localSearchThreshold) { + msg = '. Did you mean "' + localSearch.closestMatch + '"?' + Validator.printLocation(localSearch.path, option); + } else { + msg = '. Did you mean one of these: ' + Validator.print(Object.keys(options)) + Validator.printLocation(path, option); + } + + console.log('%cUnknown option detected: "' + option + '"' + msg, printStyle); + errorFound = true; + } + /** + * traverse the options in search for a match. + * @param {string} option + * @param {Object} options + * @param {Array} path | where to look for the actual option + * @param {boolean} [recursive=false] + * @returns {{closestMatch: string, path: Array, distance: number}} + * @static + */ + + }, { + key: "findInOptions", + value: function findInOptions(option, options, path) { + var recursive = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false; + var min = 1e9; + var closestMatch = ''; + var closestMatchPath = []; + var lowerCaseOption = option.toLowerCase(); + var indexMatch = undefined; + + for (var op in options) { + // eslint-disable-line guard-for-in + var distance = void 0; + + if (options[op].__type__ !== undefined && recursive === true) { + var result = Validator.findInOptions(option, options[op], util.copyAndExtendArray(path, op)); + + if (min > result.distance) { + closestMatch = result.closestMatch; + closestMatchPath = result.path; + min = result.distance; + indexMatch = result.indexMatch; + } + } else { + if (op.toLowerCase().indexOf(lowerCaseOption) !== -1) { + indexMatch = op; + } + + distance = Validator.levenshteinDistance(option, op); + + if (min > distance) { + closestMatch = op; + closestMatchPath = util.copyArray(path); + min = distance; + } + } + } + + return { + closestMatch: closestMatch, + path: closestMatchPath, + distance: min, + indexMatch: indexMatch + }; + } + /** + * @param {Array.} path + * @param {Object} option + * @param {string} prefix + * @returns {String} + * @static + */ + + }, { + key: "printLocation", + value: function printLocation(path, option) { + var prefix = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'Problem value found at: \n'; + var str = '\n\n' + prefix + 'options = {\n'; + + for (var i = 0; i < path.length; i++) { + for (var j = 0; j < i + 1; j++) { + str += ' '; + } + + str += path[i] + ': {\n'; + } + + for (var _j = 0; _j < path.length + 1; _j++) { + str += ' '; + } + + str += option + '\n'; + + for (var _i = 0; _i < path.length + 1; _i++) { + for (var _j2 = 0; _j2 < path.length - _i; _j2++) { + str += ' '; + } + + str += '}\n'; + } + + return str + '\n\n'; + } + /** + * @param {Object} options + * @returns {String} + * @static + */ + + }, { + key: "print", + value: function print(options) { + return JSON.stringify(options).replace(/(\")|(\[)|(\])|(,"__type__")/g, "").replace(/(\,)/g, ', '); + } + /** + * Compute the edit distance between the two given strings + * http://en.wikibooks.org/wiki/Algorithm_Implementation/Strings/Levenshtein_distance#JavaScript + * + * Copyright (c) 2011 Andrei Mackenzie + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + * @param {string} a + * @param {string} b + * @returns {Array.>}} + * @static + */ + + }, { + key: "levenshteinDistance", + value: function levenshteinDistance(a, b) { + if (a.length === 0) return b.length; + if (b.length === 0) return a.length; + var matrix = []; // increment along the first column of each row + + var i; + + for (i = 0; i <= b.length; i++) { + matrix[i] = [i]; + } // increment each column in the first row + + + var j; + + for (j = 0; j <= a.length; j++) { + matrix[0][j] = j; + } // Fill in the rest of the matrix + + + for (i = 1; i <= b.length; i++) { + for (j = 1; j <= a.length; j++) { + if (b.charAt(i - 1) == a.charAt(j - 1)) { + matrix[i][j] = matrix[i - 1][j - 1]; + } else { + matrix[i][j] = Math.min(matrix[i - 1][j - 1] + 1, // substitution + Math.min(matrix[i][j - 1] + 1, // insertion + matrix[i - 1][j] + 1)); // deletion + } + } + } + + return matrix[b.length][a.length]; + } + }]); + + return Validator; + }(); + + /** + * A node. A node can be connected to other nodes via one or multiple edges. + */ + + var Node = + /*#__PURE__*/ + function () { + /** + * + * @param {object} options An object containing options for the node. All + * options are optional, except for the id. + * {number} id Id of the node. Required + * {string} label Text label for the node + * {number} x Horizontal position of the node + * {number} y Vertical position of the node + * {string} shape Node shape + * {string} image An image url + * {string} title A title text, can be HTML + * {anytype} group A group name or number + * + * @param {Object} body Shared state of current network instance + * @param {Network.Images} imagelist A list with images. Only needed when the node has an image + * @param {Groups} grouplist A list with groups. Needed for retrieving group options + * @param {Object} globalOptions Current global node options; these serve as defaults for the node instance + * @param {Object} defaultOptions Global default options for nodes; note that this is also the prototype + * for parameter `globalOptions`. + */ + function Node(options, body, imagelist, grouplist, globalOptions, defaultOptions) { + classCallCheck$1(this, Node); + + this.options = util.bridgeObject(globalOptions); + this.globalOptions = globalOptions; + this.defaultOptions = defaultOptions; + this.body = body; + this.edges = []; // all edges connected to this node + // set defaults for the options + + this.id = undefined; + this.imagelist = imagelist; + this.grouplist = grouplist; // state options + + this.x = undefined; + this.y = undefined; + this.baseSize = this.options.size; + this.baseFontSize = this.options.font.size; + this.predefinedPosition = false; // used to check if initial fit should just take the range or approximate + + this.selected = false; + this.hover = false; + this.labelModule = new Label(this.body, this.options, false + /* Not edge label */ + ); + this.setOptions(options); + } + /** + * Attach a edge to the node + * @param {Edge} edge + */ + + + createClass$1(Node, [{ + key: "attachEdge", + value: function attachEdge(edge) { + if (this.edges.indexOf(edge) === -1) { + this.edges.push(edge); + } + } + /** + * Detach a edge from the node + * + * @param {Edge} edge + */ + + }, { + key: "detachEdge", + value: function detachEdge(edge) { + var index = this.edges.indexOf(edge); + + if (index != -1) { + this.edges.splice(index, 1); + } + } + /** + * Set or overwrite options for the node + * + * @param {Object} options an object with options + * @returns {null|boolean} + */ + + }, { + key: "setOptions", + value: function setOptions(options) { + var currentShape = this.options.shape; + + if (!options) { + return; // Note that the return value will be 'undefined'! This is OK. + } // basic options + + + if (options.id !== undefined) { + this.id = options.id; + } + + if (this.id === undefined) { + throw new Error("Node must have an id"); + } + + Node.checkMass(options, this.id); // set these options locally + // clear x and y positions + + if (options.x !== undefined) { + if (options.x === null) { + this.x = undefined; + this.predefinedPosition = false; + } else { + this.x = parseInt(options.x); + this.predefinedPosition = true; + } + } + + if (options.y !== undefined) { + if (options.y === null) { + this.y = undefined; + this.predefinedPosition = false; + } else { + this.y = parseInt(options.y); + this.predefinedPosition = true; + } + } + + if (options.size !== undefined) { + this.baseSize = options.size; + } + + if (options.value !== undefined) { + options.value = parseFloat(options.value); + } // this transforms all shorthands into fully defined options + + + Node.parseOptions(this.options, options, true, this.globalOptions, this.grouplist); + var pile = [options, this.options, this.defaultOptions]; + this.chooser = ComponentUtil.choosify('node', pile); + + this._load_images(); + + this.updateLabelModule(options); + this.updateShape(currentShape); + return options.hidden !== undefined || options.physics !== undefined; + } + /** + * Load the images from the options, for the nodes that need them. + * + * Images are always loaded, even if they are not used in the current shape. + * The user may switch to an image shape later on. + * + * @private + */ + + }, { + key: "_load_images", + value: function _load_images() { + if (this.options.shape === 'circularImage' || this.options.shape === 'image') { + if (this.options.image === undefined) { + throw new Error("Option image must be defined for node type '" + this.options.shape + "'"); + } + } + + if (this.options.image === undefined) { + return; + } + + if (this.imagelist === undefined) { + throw new Error("Internal Error: No images provided"); + } + + if (typeof this.options.image === 'string') { + this.imageObj = this.imagelist.load(this.options.image, this.options.brokenImage, this.id); + } else { + if (this.options.image.unselected === undefined) { + throw new Error("No unselected image provided"); + } + + this.imageObj = this.imagelist.load(this.options.image.unselected, this.options.brokenImage, this.id); + + if (this.options.image.selected !== undefined) { + this.imageObjAlt = this.imagelist.load(this.options.image.selected, this.options.brokenImage, this.id); + } else { + this.imageObjAlt = undefined; + } + } + } + /** + * Copy group option values into the node options. + * + * The group options override the global node options, so the copy of group options + * must happen *after* the global node options have been set. + * + * This method must also be called also if the global node options have changed and the group options did not. + * + * @param {Object} parentOptions + * @param {Object} newOptions new values for the options, currently only passed in for check + * @param {Object} groupList + */ + + }, { + key: "getFormattingValues", + + /** + * + * @returns {{color: *, borderWidth: *, borderColor: *, size: *, borderDashes: (boolean|Array|allOptions.nodes.shapeProperties.borderDashes|{boolean, array}), borderRadius: (number|allOptions.nodes.shapeProperties.borderRadius|{number}|Array), shadow: *, shadowColor: *, shadowSize: *, shadowX: *, shadowY: *}} + */ + value: function getFormattingValues() { + var values = { + color: this.options.color.background, + borderWidth: this.options.borderWidth, + borderColor: this.options.color.border, + size: this.options.size, + borderDashes: this.options.shapeProperties.borderDashes, + borderRadius: this.options.shapeProperties.borderRadius, + shadow: this.options.shadow.enabled, + shadowColor: this.options.shadow.color, + shadowSize: this.options.shadow.size, + shadowX: this.options.shadow.x, + shadowY: this.options.shadow.y + }; + + if (this.selected || this.hover) { + if (this.chooser === true) { + if (this.selected) { + values.borderWidth *= 2; + values.color = this.options.color.highlight.background; + values.borderColor = this.options.color.highlight.border; + values.shadow = this.options.shadow.enabled; + } else if (this.hover) { + values.color = this.options.color.hover.background; + values.borderColor = this.options.color.hover.border; + values.shadow = this.options.shadow.enabled; + } + } else if (typeof this.chooser === 'function') { + this.chooser(values, this.options.id, this.selected, this.hover); + + if (values.shadow === false) { + if (values.shadowColor !== this.options.shadow.color || values.shadowSize !== this.options.shadow.size || values.shadowX !== this.options.shadow.x || values.shadowY !== this.options.shadow.y) { + values.shadow = true; + } + } + } + } else { + values.shadow = this.options.shadow.enabled; + } + + return values; + } + /** + * + * @param {Object} options + */ + + }, { + key: "updateLabelModule", + value: function updateLabelModule(options) { + if (this.options.label === undefined || this.options.label === null) { + this.options.label = ''; + } + + Node.updateGroupOptions(this.options, options, this.grouplist); // + // Note:The prototype chain for this.options is: + // + // this.options -> NodesHandler.options -> NodesHandler.defaultOptions + // (also: this.globalOptions) + // + // Note that the prototypes are mentioned explicitly in the pile list below; + // WE DON'T WANT THE ORDER OF THE PROTOTYPES!!!! At least, not for font handling of labels. + // This is a good indication that the prototype usage of options is deficient. + // + + var currentGroup = this.grouplist.get(this.options.group, false); + var pile = [options, // new options + this.options, // current node options, see comment above for prototype + currentGroup, // group options, if any + this.globalOptions, // Currently set global node options + this.defaultOptions // Default global node options + ]; + this.labelModule.update(this.options, pile); + + if (this.labelModule.baseSize !== undefined) { + this.baseFontSize = this.labelModule.baseSize; + } + } + /** + * + * @param {string} currentShape + */ + + }, { + key: "updateShape", + value: function updateShape(currentShape) { + if (currentShape === this.options.shape && this.shape) { + this.shape.setOptions(this.options, this.imageObj, this.imageObjAlt); + } else { + // choose draw method depending on the shape + switch (this.options.shape) { + case 'box': + this.shape = new Box(this.options, this.body, this.labelModule); + break; + + case 'circle': + this.shape = new Circle(this.options, this.body, this.labelModule); + break; + + case 'circularImage': + this.shape = new CircularImage(this.options, this.body, this.labelModule, this.imageObj, this.imageObjAlt); + break; + + case 'database': + this.shape = new Database(this.options, this.body, this.labelModule); + break; + + case 'diamond': + this.shape = new Diamond(this.options, this.body, this.labelModule); + break; + + case 'dot': + this.shape = new Dot(this.options, this.body, this.labelModule); + break; + + case 'ellipse': + this.shape = new Ellipse(this.options, this.body, this.labelModule); + break; + + case 'icon': + this.shape = new Icon(this.options, this.body, this.labelModule); + break; + + case 'image': + this.shape = new Image$1(this.options, this.body, this.labelModule, this.imageObj, this.imageObjAlt); + break; + + case 'square': + this.shape = new Square(this.options, this.body, this.labelModule); + break; + + case 'hexagon': + this.shape = new Hexagon(this.options, this.body, this.labelModule); + break; + + case 'star': + this.shape = new Star(this.options, this.body, this.labelModule); + break; + + case 'text': + this.shape = new Text(this.options, this.body, this.labelModule); + break; + + case 'triangle': + this.shape = new Triangle(this.options, this.body, this.labelModule); + break; + + case 'triangleDown': + this.shape = new TriangleDown(this.options, this.body, this.labelModule); + break; + + default: + this.shape = new Ellipse(this.options, this.body, this.labelModule); + break; + } + } + + this.needsRefresh(); + } + /** + * select this node + */ + + }, { + key: "select", + value: function select() { + this.selected = true; + this.needsRefresh(); + } + /** + * unselect this node + */ + + }, { + key: "unselect", + value: function unselect() { + this.selected = false; + this.needsRefresh(); + } + /** + * Reset the calculated size of the node, forces it to recalculate its size + */ + + }, { + key: "needsRefresh", + value: function needsRefresh() { + this.shape.refreshNeeded = true; + } + /** + * get the title of this node. + * @return {string} title The title of the node, or undefined when no title + * has been set. + */ + + }, { + key: "getTitle", + value: function getTitle() { + return this.options.title; + } + /** + * Calculate the distance to the border of the Node + * @param {CanvasRenderingContext2D} ctx + * @param {number} angle Angle in radians + * @returns {number} distance Distance to the border in pixels + */ + + }, { + key: "distanceToBorder", + value: function distanceToBorder(ctx, angle) { + return this.shape.distanceToBorder(ctx, angle); + } + /** + * Check if this node has a fixed x and y position + * @return {boolean} true if fixed, false if not + */ + + }, { + key: "isFixed", + value: function isFixed() { + return this.options.fixed.x && this.options.fixed.y; + } + /** + * check if this node is selecte + * @return {boolean} selected True if node is selected, else false + */ + + }, { + key: "isSelected", + value: function isSelected() { + return this.selected; + } + /** + * Retrieve the value of the node. Can be undefined + * @return {number} value + */ + + }, { + key: "getValue", + value: function getValue() { + return this.options.value; + } + /** + * Get the current dimensions of the label + * + * @return {rect} + */ + + }, { + key: "getLabelSize", + value: function getLabelSize() { + return this.labelModule.size(); + } + /** + * Adjust the value range of the node. The node will adjust it's size + * based on its value. + * @param {number} min + * @param {number} max + * @param {number} total + */ + + }, { + key: "setValueRange", + value: function setValueRange(min, max, total) { + if (this.options.value !== undefined) { + var scale = this.options.scaling.customScalingFunction(min, max, total, this.options.value); + var sizeDiff = this.options.scaling.max - this.options.scaling.min; + + if (this.options.scaling.label.enabled === true) { + var fontDiff = this.options.scaling.label.max - this.options.scaling.label.min; + this.options.font.size = this.options.scaling.label.min + scale * fontDiff; + } + + this.options.size = this.options.scaling.min + scale * sizeDiff; + } else { + this.options.size = this.baseSize; + this.options.font.size = this.baseFontSize; + } + + this.updateLabelModule(); + } + /** + * Draw this node in the given canvas + * The 2d context of a HTML canvas can be retrieved by canvas.getContext("2d"); + * @param {CanvasRenderingContext2D} ctx + */ + + }, { + key: "draw", + value: function draw(ctx) { + var values = this.getFormattingValues(); + this.shape.draw(ctx, this.x, this.y, this.selected, this.hover, values); + } + /** + * Update the bounding box of the shape + * @param {CanvasRenderingContext2D} ctx + */ + + }, { + key: "updateBoundingBox", + value: function updateBoundingBox(ctx) { + this.shape.updateBoundingBox(this.x, this.y, ctx); + } + /** + * Recalculate the size of this node in the given canvas + * The 2d context of a HTML canvas can be retrieved by canvas.getContext("2d"); + * @param {CanvasRenderingContext2D} ctx + */ + + }, { + key: "resize", + value: function resize(ctx) { + var values = this.getFormattingValues(); + this.shape.resize(ctx, this.selected, this.hover, values); + } + /** + * Determine all visual elements of this node instance, in which the given + * point falls within the bounding shape. + * + * @param {point} point + * @returns {Array.} list with the items which are on the point + */ + + }, { + key: "getItemsOnPoint", + value: function getItemsOnPoint(point) { + var ret = []; + + if (this.labelModule.visible()) { + if (ComponentUtil.pointInRect(this.labelModule.getSize(), point)) { + ret.push({ + nodeId: this.id, + labelId: 0 + }); + } + } + + if (ComponentUtil.pointInRect(this.shape.boundingBox, point)) { + ret.push({ + nodeId: this.id + }); + } + + return ret; + } + /** + * Check if this object is overlapping with the provided object + * @param {Object} obj an object with parameters left, top, right, bottom + * @return {boolean} True if location is located on node + */ + + }, { + key: "isOverlappingWith", + value: function isOverlappingWith(obj) { + return this.shape.left < obj.right && this.shape.left + this.shape.width > obj.left && this.shape.top < obj.bottom && this.shape.top + this.shape.height > obj.top; + } + /** + * Check if this object is overlapping with the provided object + * @param {Object} obj an object with parameters left, top, right, bottom + * @return {boolean} True if location is located on node + */ + + }, { + key: "isBoundingBoxOverlappingWith", + value: function isBoundingBoxOverlappingWith(obj) { + return this.shape.boundingBox.left < obj.right && this.shape.boundingBox.right > obj.left && this.shape.boundingBox.top < obj.bottom && this.shape.boundingBox.bottom > obj.top; + } + /** + * Check valid values for mass + * + * The mass may not be negative or zero. If it is, reset to 1 + * + * @param {object} options + * @param {Node.id} id + * @static + */ + + }], [{ + key: "updateGroupOptions", + value: function updateGroupOptions(parentOptions, newOptions, groupList) { + if (groupList === undefined) return; // No groups, nothing to do + + var group = parentOptions.group; // paranoia: the selected group is already merged into node options, check. + + if (newOptions !== undefined && newOptions.group !== undefined && group !== newOptions.group) { + throw new Error("updateGroupOptions: group values in options don't match."); + } + + var hasGroup = typeof group === 'number' || typeof group === 'string' && group != ''; + if (!hasGroup) return; // current node has no group, no need to merge + + var groupObj = groupList.get(group); // Skip merging of group font options into parent; these are required to be distinct for labels + // Also skip mergin of color IF it is already defined in the node itself. This is to avoid the color of the + // group overriding the color set at the node level + // TODO: It might not be a good idea either to merge the rest of the options, investigate this. + + var skipProperties = ['font']; + if (newOptions !== undefined && newOptions.color !== undefined && newOptions.color != null) skipProperties.push('color'); + util.selectiveNotDeepExtend(skipProperties, parentOptions, groupObj); // the color object needs to be completely defined. + // Since groups can partially overwrite the colors, we parse it again, just in case. + + parentOptions.color = util.parseColor(parentOptions.color); + } + /** + * This process all possible shorthands in the new options and makes sure that the parentOptions are fully defined. + * Static so it can also be used by the handler. + * + * @param {Object} parentOptions + * @param {Object} newOptions + * @param {boolean} [allowDeletion=false] + * @param {Object} [globalOptions={}] + * @param {Object} [groupList] + * @static + */ + + }, { + key: "parseOptions", + value: function parseOptions(parentOptions, newOptions) { + var allowDeletion = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; + var globalOptions = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {}; + var groupList = arguments.length > 4 ? arguments[4] : undefined; + var fields = ['color', 'fixed', 'shadow']; + util.selectiveNotDeepExtend(fields, parentOptions, newOptions, allowDeletion); + Node.checkMass(newOptions); // merge the shadow options into the parent. + + util.mergeOptions(parentOptions, newOptions, 'shadow', globalOptions); // individual shape newOptions + + if (newOptions.color !== undefined && newOptions.color !== null) { + var parsedColor = util.parseColor(newOptions.color); + util.fillIfDefined(parentOptions.color, parsedColor); + } else if (allowDeletion === true && newOptions.color === null) { + parentOptions.color = util.bridgeObject(globalOptions.color); // set the object back to the global options + } // handle the fixed options + + + if (newOptions.fixed !== undefined && newOptions.fixed !== null) { + if (typeof newOptions.fixed === 'boolean') { + parentOptions.fixed.x = newOptions.fixed; + parentOptions.fixed.y = newOptions.fixed; + } else { + if (newOptions.fixed.x !== undefined && typeof newOptions.fixed.x === 'boolean') { + parentOptions.fixed.x = newOptions.fixed.x; + } + + if (newOptions.fixed.y !== undefined && typeof newOptions.fixed.y === 'boolean') { + parentOptions.fixed.y = newOptions.fixed.y; + } + } + } + + if (allowDeletion === true && newOptions.font === null) { + parentOptions.font = util.bridgeObject(globalOptions.font); // set the object back to the global options + } + + Node.updateGroupOptions(parentOptions, newOptions, groupList); // handle the scaling options, specifically the label part + + if (newOptions.scaling !== undefined) { + util.mergeOptions(parentOptions.scaling, newOptions.scaling, 'label', globalOptions.scaling); + } + } + }, { + key: "checkMass", + value: function checkMass(options, id) { + if (options.mass !== undefined && options.mass <= 0) { + var strId = ''; + + if (id !== undefined) { + strId = ' in node id: ' + id; + } + + console.log('%cNegative or zero mass disallowed' + strId + ', setting mass to 1.', printStyle); + options.mass = 1; + } + } + }]); + + return Node; + }(); + + /** + * Handler for Nodes + */ + + var NodesHandler = + /*#__PURE__*/ + function () { + /** + * @param {Object} body + * @param {Images} images + * @param {Array.} groups + * @param {LayoutEngine} layoutEngine + */ + function NodesHandler(body, images, groups, layoutEngine) { + var _this = this; + + classCallCheck$1(this, NodesHandler); + + this.body = body; + this.images = images; + this.groups = groups; + this.layoutEngine = layoutEngine; // create the node API in the body container + + this.body.functions.createNode = this.create.bind(this); + this.nodesListeners = { + add: function add(event, params) { + _this.add(params.items); + }, + update: function update(event, params) { + _this.update(params.items, params.data, params.oldData); + }, + remove: function remove(event, params) { + _this.remove(params.items); + } + }; + this.defaultOptions = { + borderWidth: 1, + borderWidthSelected: 2, + brokenImage: undefined, + color: { + border: '#2B7CE9', + background: '#97C2FC', + highlight: { + border: '#2B7CE9', + background: '#D2E5FF' + }, + hover: { + border: '#2B7CE9', + background: '#D2E5FF' + } + }, + fixed: { + x: false, + y: false + }, + font: { + color: '#343434', + size: 14, + // px + face: 'arial', + background: 'none', + strokeWidth: 0, + // px + strokeColor: '#ffffff', + align: 'center', + vadjust: 0, + multi: false, + bold: { + mod: 'bold' + }, + boldital: { + mod: 'bold italic' + }, + ital: { + mod: 'italic' + }, + mono: { + mod: '', + size: 15, + // px + face: 'monospace', + vadjust: 2 + } + }, + group: undefined, + hidden: false, + icon: { + face: 'FontAwesome', + //'FontAwesome', + code: undefined, + //'\uf007', + size: 50, + //50, + color: '#2B7CE9' //'#aa00ff' + + }, + image: undefined, + // --> URL + label: undefined, + labelHighlightBold: true, + level: undefined, + margin: { + top: 5, + right: 5, + bottom: 5, + left: 5 + }, + mass: 1, + physics: true, + scaling: { + min: 10, + max: 30, + label: { + enabled: false, + min: 14, + max: 30, + maxVisible: 30, + drawThreshold: 5 + }, + customScalingFunction: function customScalingFunction(min, max, total, value) { + if (max === min) { + return 0.5; + } else { + var scale = 1 / (max - min); + return Math.max(0, (value - min) * scale); + } + } + }, + shadow: { + enabled: false, + color: 'rgba(0,0,0,0.5)', + size: 10, + x: 5, + y: 5 + }, + shape: 'ellipse', + shapeProperties: { + borderDashes: false, + // only for borders + borderRadius: 6, + // only for box shape + interpolation: true, + // only for image and circularImage shapes + useImageSize: false, + // only for image and circularImage shapes + useBorderWithImage: false // only for image shape + + }, + size: 25, + title: undefined, + value: undefined, + x: undefined, + y: undefined + }; // Protect from idiocy + + if (this.defaultOptions.mass <= 0) { + throw 'Internal error: mass in defaultOptions of NodesHandler may not be zero or negative'; + } + + this.options = util.bridgeObject(this.defaultOptions); + this.bindEventListeners(); + } + /** + * Binds event listeners + */ + + + createClass$1(NodesHandler, [{ + key: "bindEventListeners", + value: function bindEventListeners() { + var _this2 = this; + + // refresh the nodes. Used when reverting from hierarchical layout + this.body.emitter.on('refreshNodes', this.refresh.bind(this)); + this.body.emitter.on('refresh', this.refresh.bind(this)); + this.body.emitter.on('destroy', function () { + util.forEach(_this2.nodesListeners, function (callback, event) { + if (_this2.body.data.nodes) _this2.body.data.nodes.off(event, callback); + }); + delete _this2.body.functions.createNode; + delete _this2.nodesListeners.add; + delete _this2.nodesListeners.update; + delete _this2.nodesListeners.remove; + delete _this2.nodesListeners; + }); + } + /** + * + * @param {Object} options + */ + + }, { + key: "setOptions", + value: function setOptions(options) { + if (options !== undefined) { + Node.parseOptions(this.options, options); // update the shape in all nodes + + if (options.shape !== undefined) { + for (var nodeId in this.body.nodes) { + if (this.body.nodes.hasOwnProperty(nodeId)) { + this.body.nodes[nodeId].updateShape(); + } + } + } // update the font in all nodes + + + if (options.font !== undefined) { + for (var _nodeId in this.body.nodes) { + if (this.body.nodes.hasOwnProperty(_nodeId)) { + this.body.nodes[_nodeId].updateLabelModule(); + + this.body.nodes[_nodeId].needsRefresh(); + } + } + } // update the shape size in all nodes + + + if (options.size !== undefined) { + for (var _nodeId2 in this.body.nodes) { + if (this.body.nodes.hasOwnProperty(_nodeId2)) { + this.body.nodes[_nodeId2].needsRefresh(); + } + } + } // update the state of the variables if needed + + + if (options.hidden !== undefined || options.physics !== undefined) { + this.body.emitter.emit('_dataChanged'); + } + } + } + /** + * Set a data set with nodes for the network + * @param {Array | DataSet | DataView} nodes The data containing the nodes. + * @param {boolean} [doNotEmit=false] + * @private + */ + + }, { + key: "setData", + value: function setData(nodes) { + var doNotEmit = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; + var oldNodesData = this.body.data.nodes; + + if (nodes instanceof DataSet || nodes instanceof DataView) { + this.body.data.nodes = nodes; + } else if (Array.isArray(nodes)) { + this.body.data.nodes = new DataSet(); + this.body.data.nodes.add(nodes); + } else if (!nodes) { + this.body.data.nodes = new DataSet(); + } else { + throw new TypeError('Array or DataSet expected'); + } + + if (oldNodesData) { + // unsubscribe from old dataset + util.forEach(this.nodesListeners, function (callback, event) { + oldNodesData.off(event, callback); + }); + } // remove drawn nodes + + + this.body.nodes = {}; + + if (this.body.data.nodes) { + // subscribe to new dataset + var me = this; + util.forEach(this.nodesListeners, function (callback, event) { + me.body.data.nodes.on(event, callback); + }); // draw all new nodes + + var ids = this.body.data.nodes.getIds(); + this.add(ids, true); + } + + if (doNotEmit === false) { + this.body.emitter.emit("_dataChanged"); + } + } + /** + * Add nodes + * @param {number[] | string[]} ids + * @param {boolean} [doNotEmit=false] + * @private + */ + + }, { + key: "add", + value: function add(ids) { + var doNotEmit = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; + var id; + var newNodes = []; + + for (var i = 0; i < ids.length; i++) { + id = ids[i]; + var properties = this.body.data.nodes.get(id); + var node = this.create(properties); + newNodes.push(node); + this.body.nodes[id] = node; // note: this may replace an existing node + } + + this.layoutEngine.positionInitially(newNodes); + + if (doNotEmit === false) { + this.body.emitter.emit("_dataChanged"); + } + } + /** + * Update existing nodes, or create them when not yet existing + * @param {number[] | string[]} ids id's of changed nodes + * @param {Array} changedData array with changed data + * @param {Array|undefined} oldData optional; array with previous data + * @private + */ + + }, { + key: "update", + value: function update(ids, changedData, oldData) { + var nodes = this.body.nodes; + var dataChanged = false; + + for (var i = 0; i < ids.length; i++) { + var id = ids[i]; + var node = nodes[id]; + var data = changedData[i]; + + if (node !== undefined) { + // update node + if (node.setOptions(data)) { + dataChanged = true; + } + } else { + dataChanged = true; // create node + + node = this.create(data); + nodes[id] = node; + } + } + + if (!dataChanged && oldData !== undefined) { + // Check for any changes which should trigger a layout recalculation + // For now, this is just 'level' for hierarchical layout + // Assumption: old and new data arranged in same order; at time of writing, this holds. + dataChanged = changedData.some(function (newValue, index) { + var oldValue = oldData[index]; + return oldValue && oldValue.level !== newValue.level; + }); + } + + if (dataChanged === true) { + this.body.emitter.emit("_dataChanged"); + } else { + this.body.emitter.emit("_dataUpdated"); + } + } + /** + * Remove existing nodes. If nodes do not exist, the method will just ignore it. + * @param {number[] | string[]} ids + * @private + */ + + }, { + key: "remove", + value: function remove(ids) { + var nodes = this.body.nodes; + + for (var i = 0; i < ids.length; i++) { + var id = ids[i]; + delete nodes[id]; + } + + this.body.emitter.emit("_dataChanged"); + } + /** + * create a node + * @param {Object} properties + * @param {class} [constructorClass=Node.default] + * @returns {*} + */ + + }, { + key: "create", + value: function create(properties) { + var constructorClass = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Node; + return new constructorClass(properties, this.body, this.images, this.groups, this.options, this.defaultOptions); + } + /** + * + * @param {boolean} [clearPositions=false] + */ + + }, { + key: "refresh", + value: function refresh() { + var _this3 = this; + + var clearPositions = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; + util.forEach(this.body.nodes, function (node, nodeId) { + var data = _this3.body.data.nodes.get(nodeId); + + if (data !== undefined) { + if (clearPositions === true) { + node.setOptions({ + x: null, + y: null + }); + } + + node.setOptions({ + fixed: false + }); + node.setOptions(data); + } + }); + } + /** + * Returns the positions of the nodes. + * @param {Array.|String} [ids] --> optional, can be array of nodeIds, can be string + * @returns {{}} + */ + + }, { + key: "getPositions", + value: function getPositions(ids) { + var dataArray = {}; + + if (ids !== undefined) { + if (Array.isArray(ids) === true) { + for (var i = 0; i < ids.length; i++) { + if (this.body.nodes[ids[i]] !== undefined) { + var node = this.body.nodes[ids[i]]; + dataArray[ids[i]] = { + x: Math.round(node.x), + y: Math.round(node.y) + }; + } + } + } else { + if (this.body.nodes[ids] !== undefined) { + var _node = this.body.nodes[ids]; + dataArray[ids] = { + x: Math.round(_node.x), + y: Math.round(_node.y) + }; + } + } + } else { + for (var _i = 0; _i < this.body.nodeIndices.length; _i++) { + var _node2 = this.body.nodes[this.body.nodeIndices[_i]]; + dataArray[this.body.nodeIndices[_i]] = { + x: Math.round(_node2.x), + y: Math.round(_node2.y) + }; + } + } + + return dataArray; + } + /** + * Load the XY positions of the nodes into the dataset. + */ + + }, { + key: "storePositions", + value: function storePositions() { + // todo: add support for clusters and hierarchical. + var dataArray = []; + var dataset = this.body.data.nodes.getDataSet(); + + for (var nodeId in dataset._data) { + if (dataset._data.hasOwnProperty(nodeId)) { + var node = this.body.nodes[nodeId]; + + if (dataset._data[nodeId].x != Math.round(node.x) || dataset._data[nodeId].y != Math.round(node.y)) { + dataArray.push({ + id: node.id, + x: Math.round(node.x), + y: Math.round(node.y) + }); + } + } + } + + dataset.update(dataArray); + } + /** + * get the bounding box of a node. + * @param {Node.id} nodeId + * @returns {j|*} + */ + + }, { + key: "getBoundingBox", + value: function getBoundingBox(nodeId) { + if (this.body.nodes[nodeId] !== undefined) { + return this.body.nodes[nodeId].shape.boundingBox; + } + } + /** + * Get the Ids of nodes connected to this node. + * @param {Node.id} nodeId + * @param {'to'|'from'|undefined} direction values 'from' and 'to' select respectively parent and child nodes only. + * Any other value returns both parent and child nodes. + * @returns {Array} + */ + + }, { + key: "getConnectedNodes", + value: function getConnectedNodes(nodeId, direction) { + var nodeList = []; + + if (this.body.nodes[nodeId] !== undefined) { + var node = this.body.nodes[nodeId]; + var nodeObj = {}; // used to quickly check if node already exists + + for (var i = 0; i < node.edges.length; i++) { + var edge = node.edges[i]; + + if (direction !== 'to' && edge.toId == node.id) { + // these are double equals since ids can be numeric or string + if (nodeObj[edge.fromId] === undefined) { + nodeList.push(edge.fromId); + nodeObj[edge.fromId] = true; + } + } else if (direction !== 'from' && edge.fromId == node.id) { + // these are double equals since ids can be numeric or string + if (nodeObj[edge.toId] === undefined) { + nodeList.push(edge.toId); + nodeObj[edge.toId] = true; + } + } + } + } + + return nodeList; + } + /** + * Get the ids of the edges connected to this node. + * @param {Node.id} nodeId + * @returns {*} + */ + + }, { + key: "getConnectedEdges", + value: function getConnectedEdges(nodeId) { + var edgeList = []; + + if (this.body.nodes[nodeId] !== undefined) { + var node = this.body.nodes[nodeId]; + + for (var i = 0; i < node.edges.length; i++) { + edgeList.push(node.edges[i].id); + } + } else { + console.log("NodeId provided for getConnectedEdges does not exist. Provided: ", nodeId); + } + + return edgeList; + } + /** + * Move a node. + * + * @param {Node.id} nodeId + * @param {number} x + * @param {number} y + */ + + }, { + key: "moveNode", + value: function moveNode(nodeId, x, y) { + var _this4 = this; + + if (this.body.nodes[nodeId] !== undefined) { + this.body.nodes[nodeId].x = Number(x); + this.body.nodes[nodeId].y = Number(y); + setTimeout(function () { + _this4.body.emitter.emit("startSimulation"); + }, 0); + } else { + console.log("Node id supplied to moveNode does not exist. Provided: ", nodeId); + } + } + }]); + + return NodesHandler; + }(); + + /** ============================================================================ + * Location of all the endpoint drawing routines. + * + * Every endpoint has its own drawing routine, which contains an endpoint definition. + * + * The endpoint definitions must have the following properies: + * + * - (0,0) is the connection point to the node it attaches to + * - The endpoints are orientated to the positive x-direction + * - The length of the endpoint is at most 1 + * + * As long as the endpoint classes remain simple and not too numerous, they will + * be contained within this module. + * All classes here except `EndPoints` should be considered as private to this module. + * + * ----------------------------------------------------------------------------- + * ### Further Actions + * + * After adding a new endpoint here, you also need to do the following things: + * + * - Add the new endpoint name to `network/options.js` in array `endPoints`. + * - Add the new endpoint name to the documentation. + * Scan for 'arrows.to.type` and add it to the description. + * - Add the endpoint to the examples. At the very least, add it to example + * `edgeStyles/arrowTypes`. + * ============================================================================= */ + + /** + * Common methods for endpoints + * + * @class + */ + var EndPoint = + /*#__PURE__*/ + function () { + function EndPoint() { + classCallCheck$1(this, EndPoint); + } + + createClass$1(EndPoint, null, [{ + key: "transform", + + /** + * Apply transformation on points for display. + * + * The following is done: + * - rotate by the specified angle + * - multiply the (normalized) coordinates by the passed length + * - offset by the target coordinates + * + * @param {Array} points + * @param {ArrowData} arrowData + * @static + */ + value: function transform(points, arrowData) { + if (!(points instanceof Array)) { + points = [points]; + } + + var x = arrowData.point.x; + var y = arrowData.point.y; + var angle = arrowData.angle; + var length = arrowData.length; + + for (var i = 0; i < points.length; ++i) { + var p = points[i]; + var xt = p.x * Math.cos(angle) - p.y * Math.sin(angle); + var yt = p.x * Math.sin(angle) + p.y * Math.cos(angle); + p.x = x + length * xt; + p.y = y + length * yt; + } + } + /** + * Draw a closed path using the given real coordinates. + * + * @param {CanvasRenderingContext2D} ctx + * @param {Array.} points + * @static + */ + + }, { + key: "drawPath", + value: function drawPath(ctx, points) { + ctx.beginPath(); + ctx.moveTo(points[0].x, points[0].y); + + for (var i = 1; i < points.length; ++i) { + ctx.lineTo(points[i].x, points[i].y); + } + + ctx.closePath(); + } + }]); + + return EndPoint; + }(); + /** + * Drawing methods for the arrow endpoint. + * @extends EndPoint + */ + + + var Arrow = + /*#__PURE__*/ + function (_EndPoint) { + inherits$1(Arrow, _EndPoint); + + function Arrow() { + classCallCheck$1(this, Arrow); + + return possibleConstructorReturn$1(this, getPrototypeOf$1(Arrow).apply(this, arguments)); + } + + createClass$1(Arrow, null, [{ + key: "draw", + + /** + * Draw this shape at the end of a line. + * + * @param {CanvasRenderingContext2D} ctx + * @param {ArrowData} arrowData + * @static + */ + value: function draw(ctx, arrowData) { + // Normalized points of closed path, in the order that they should be drawn. + // (0, 0) is the attachment point, and the point around which should be rotated + var points = [{ + x: 0, + y: 0 + }, { + x: -1, + y: 0.3 + }, { + x: -0.9, + y: 0 + }, { + x: -1, + y: -0.3 + }]; + EndPoint.transform(points, arrowData); + EndPoint.drawPath(ctx, points); + } + }]); + + return Arrow; + }(EndPoint); + /** + * Drawing methods for the crow endpoint. + * @extends EndPoint + */ + + + var Crow = + /*#__PURE__*/ + function () { + function Crow() { + classCallCheck$1(this, Crow); + } + + createClass$1(Crow, null, [{ + key: "draw", + + /** + * Draw this shape at the end of a line. + * + * @param {CanvasRenderingContext2D} ctx + * @param {ArrowData} arrowData + * @static + */ + value: function draw(ctx, arrowData) { + // Normalized points of closed path, in the order that they should be drawn. + // (0, 0) is the attachment point, and the point around which should be rotated + var points = [{ + x: -1, + y: 0 + }, { + x: 0, + y: 0.3 + }, { + x: -0.4, + y: 0 + }, { + x: 0, + y: -0.3 + }]; + EndPoint.transform(points, arrowData); + EndPoint.drawPath(ctx, points); + } + }]); + + return Crow; + }(); + /** + * Drawing methods for the curve endpoint. + * @extends EndPoint + */ + + + var Curve = + /*#__PURE__*/ + function () { + function Curve() { + classCallCheck$1(this, Curve); + } + + createClass$1(Curve, null, [{ + key: "draw", + + /** + * Draw this shape at the end of a line. + * + * @param {CanvasRenderingContext2D} ctx + * @param {ArrowData} arrowData + * @static + */ + value: function draw(ctx, arrowData) { + // Normalized points of closed path, in the order that they should be drawn. + // (0, 0) is the attachment point, and the point around which should be rotated + var point = { + x: -0.4, + y: 0 + }; + EndPoint.transform(point, arrowData); // Update endpoint style for drawing transparent arc. + + ctx.strokeStyle = ctx.fillStyle; + ctx.fillStyle = 'rgba(0, 0, 0, 0)'; // Define curve endpoint as semicircle. + + var pi = Math.PI; + var start_angle = arrowData.angle - pi / 2; + var end_angle = arrowData.angle + pi / 2; + ctx.beginPath(); + ctx.arc(point.x, point.y, arrowData.length * 0.4, start_angle, end_angle, false); + ctx.stroke(); + } + }]); + + return Curve; + }(); + /** + * Drawing methods for the inverted curve endpoint. + * @extends EndPoint + */ + + + var InvertedCurve = + /*#__PURE__*/ + function () { + function InvertedCurve() { + classCallCheck$1(this, InvertedCurve); + } + + createClass$1(InvertedCurve, null, [{ + key: "draw", + + /** + * Draw this shape at the end of a line. + * + * @param {CanvasRenderingContext2D} ctx + * @param {ArrowData} arrowData + * @static + */ + value: function draw(ctx, arrowData) { + // Normalized points of closed path, in the order that they should be drawn. + // (0, 0) is the attachment point, and the point around which should be rotated + var point = { + x: -0.3, + y: 0 + }; + EndPoint.transform(point, arrowData); // Update endpoint style for drawing transparent arc. + + ctx.strokeStyle = ctx.fillStyle; + ctx.fillStyle = 'rgba(0, 0, 0, 0)'; // Define inverted curve endpoint as semicircle. + + var pi = Math.PI; + var start_angle = arrowData.angle + pi / 2; + var end_angle = arrowData.angle + 3 * pi / 2; + ctx.beginPath(); + ctx.arc(point.x, point.y, arrowData.length * 0.4, start_angle, end_angle, false); + ctx.stroke(); + } + }]); + + return InvertedCurve; + }(); + /** + * Drawing methods for the trinagle endpoint. + * @extends EndPoint + */ + + + var Triangle$1 = + /*#__PURE__*/ + function () { + function Triangle() { + classCallCheck$1(this, Triangle); + } + + createClass$1(Triangle, null, [{ + key: "draw", + + /** + * Draw this shape at the end of a line. + * + * @param {CanvasRenderingContext2D} ctx + * @param {ArrowData} arrowData + * @static + */ + value: function draw(ctx, arrowData) { + // Normalized points of closed path, in the order that they should be drawn. + // (0, 0) is the attachment point, and the point around which should be rotated + var points = [{ + x: 0.02, + y: 0 + }, { + x: -1, + y: 0.3 + }, { + x: -1, + y: -0.3 + }]; + EndPoint.transform(points, arrowData); + EndPoint.drawPath(ctx, points); + } + }]); + + return Triangle; + }(); + /** + * Drawing methods for the inverted trinagle endpoint. + * @extends EndPoint + */ + + + var InvertedTriangle = + /*#__PURE__*/ + function () { + function InvertedTriangle() { + classCallCheck$1(this, InvertedTriangle); + } + + createClass$1(InvertedTriangle, null, [{ + key: "draw", + + /** + * Draw this shape at the end of a line. + * + * @param {CanvasRenderingContext2D} ctx + * @param {ArrowData} arrowData + * @static + */ + value: function draw(ctx, arrowData) { + // Normalized points of closed path, in the order that they should be drawn. + // (0, 0) is the attachment point, and the point around which should be rotated + var points = [{ + x: 0, + y: 0.3 + }, { + x: 0, + y: -0.3 + }, { + x: -1, + y: 0 + }]; + EndPoint.transform(points, arrowData); + EndPoint.drawPath(ctx, points); + } + }]); + + return InvertedTriangle; + }(); + /** + * Drawing methods for the circle endpoint. + */ + + + var Circle$1 = + /*#__PURE__*/ + function () { + function Circle() { + classCallCheck$1(this, Circle); + } + + createClass$1(Circle, null, [{ + key: "draw", + + /** + * Draw this shape at the end of a line. + * + * @param {CanvasRenderingContext2D} ctx + * @param {ArrowData} arrowData + * @static + */ + value: function draw(ctx, arrowData) { + var point = { + x: -0.4, + y: 0 + }; + EndPoint.transform(point, arrowData); + ctx.circle(point.x, point.y, arrowData.length * 0.4); + } + }]); + + return Circle; + }(); + /** + * Drawing methods for the bar endpoint. + */ + + + var Bar = + /*#__PURE__*/ + function () { + function Bar() { + classCallCheck$1(this, Bar); + } + + createClass$1(Bar, null, [{ + key: "draw", + + /** + * Draw this shape at the end of a line. + * + * @param {CanvasRenderingContext2D} ctx + * @param {ArrowData} arrowData + * @static + */ + value: function draw(ctx, arrowData) { + /* + var points = [ + {x:0, y:0.5}, + {x:0, y:-0.5} + ]; + + EndPoint.transform(points, arrowData); + ctx.beginPath(); + ctx.moveTo(points[0].x, points[0].y); + ctx.lineTo(points[1].x, points[1].y); + ctx.stroke(); + */ + var points = [{ + x: 0, + y: 0.5 + }, { + x: 0, + y: -0.5 + }, { + x: -0.15, + y: -0.5 + }, { + x: -0.15, + y: 0.5 + }]; + EndPoint.transform(points, arrowData); + EndPoint.drawPath(ctx, points); + } + }]); + + return Bar; + }(); + /** + * Drawing methods for the box endpoint. + */ + + + var Box$1 = + /*#__PURE__*/ + function () { + function Box() { + classCallCheck$1(this, Box); + } + + createClass$1(Box, null, [{ + key: "draw", + + /** + * Draw this shape at the end of a line. + * + * @param {CanvasRenderingContext2D} ctx + * @param {ArrowData} arrowData + * @static + */ + value: function draw(ctx, arrowData) { + var points = [{ + x: 0, + y: 0.3 + }, { + x: 0, + y: -0.3 + }, { + x: -0.6, + y: -0.3 + }, { + x: -0.6, + y: 0.3 + }]; + EndPoint.transform(points, arrowData); + EndPoint.drawPath(ctx, points); + } + }]); + + return Box; + }(); + /** + * Drawing methods for the diamond endpoint. + */ + + + var Diamond$1 = + /*#__PURE__*/ + function () { + function Diamond() { + classCallCheck$1(this, Diamond); + } + + createClass$1(Diamond, null, [{ + key: "draw", + + /** + * Draw this shape at the end of a line. + * + * @param {CanvasRenderingContext2D} ctx + * @param {ArrowData} arrowData + * @static + */ + value: function draw(ctx, arrowData) { + var points = [{ + x: 0, + y: 0 + }, { + x: -0.5, + y: -0.3 + }, { + x: -1, + y: 0 + }, { + x: -0.5, + y: 0.3 + }]; + EndPoint.transform(points, arrowData); + EndPoint.drawPath(ctx, points); + } + }]); + + return Diamond; + }(); + /** + * Drawing methods for the vee endpoint. + * @extends EndPoint + */ + + + var Vee = + /*#__PURE__*/ + function () { + function Vee() { + classCallCheck$1(this, Vee); + } + + createClass$1(Vee, null, [{ + key: "draw", + + /** + * Draw this shape at the end of a line. + * + * @param {CanvasRenderingContext2D} ctx + * @param {ArrowData} arrowData + * @static + */ + value: function draw(ctx, arrowData) { + // Normalized points of closed path, in the order that they should be drawn. + // (0, 0) is the attachment point, and the point around which should be rotated + var points = [{ + x: -1, + y: 0.3 + }, { + x: -0.5, + y: 0 + }, { + x: -1, + y: -0.3 + }, { + x: 0, + y: 0 + }]; + EndPoint.transform(points, arrowData); + EndPoint.drawPath(ctx, points); + } + }]); + + return Vee; + }(); + /** + * Drawing methods for the endpoints. + */ + + + var EndPoints = + /*#__PURE__*/ + function () { + function EndPoints() { + classCallCheck$1(this, EndPoints); + } + + createClass$1(EndPoints, null, [{ + key: "draw", + + /** + * Draw an endpoint + * + * @param {CanvasRenderingContext2D} ctx + * @param {ArrowData} arrowData + * @static + */ + value: function draw(ctx, arrowData) { + var type; + + if (arrowData.type) { + type = arrowData.type.toLowerCase(); + } + + switch (type) { + case 'circle': + Circle$1.draw(ctx, arrowData); + break; + + case 'box': + Box$1.draw(ctx, arrowData); + break; + + case 'crow': + Crow.draw(ctx, arrowData); + break; + + case 'curve': + Curve.draw(ctx, arrowData); + break; + + case 'diamond': + Diamond$1.draw(ctx, arrowData); + break; + + case 'inv_curve': + InvertedCurve.draw(ctx, arrowData); + break; + + case 'triangle': + Triangle$1.draw(ctx, arrowData); + break; + + case 'inv_triangle': + InvertedTriangle.draw(ctx, arrowData); + break; + + case 'bar': + Bar.draw(ctx, arrowData); + break; + + case 'vee': + Vee.draw(ctx, arrowData); + break; + + case 'arrow': // fall-through + + default: + Arrow.draw(ctx, arrowData); + } + } + }]); + + return EndPoints; + }(); + + /** + * The Base Class for all edges. + * + */ + + var EdgeBase = + /*#__PURE__*/ + function () { + /** + * @param {Object} options + * @param {Object} body + * @param {Label} labelModule + */ + function EdgeBase(options, body, labelModule) { + classCallCheck$1(this, EdgeBase); + + this.body = body; + this.labelModule = labelModule; + this.options = {}; + this.setOptions(options); + this.colorDirty = true; + this.color = {}; + this.selectionWidth = 2; + this.hoverWidth = 1.5; + this.fromPoint = this.from; + this.toPoint = this.to; + } + /** + * Connects a node to itself + */ + + + createClass$1(EdgeBase, [{ + key: "connect", + value: function connect() { + this.from = this.body.nodes[this.options.from]; + this.to = this.body.nodes[this.options.to]; + } + /** + * + * @returns {boolean} always false + */ + + }, { + key: "cleanup", + value: function cleanup() { + return false; + } + /** + * + * @param {Object} options + */ + + }, { + key: "setOptions", + value: function setOptions(options) { + this.options = options; + this.from = this.body.nodes[this.options.from]; + this.to = this.body.nodes[this.options.to]; + this.id = this.options.id; + } + /** + * Redraw a edge as a line + * Draw this edge in the given canvas + * The 2d context of a HTML canvas can be retrieved by canvas.getContext("2d"); + * + * @param {CanvasRenderingContext2D} ctx + * @param {Array} values + * @param {boolean} selected + * @param {boolean} hover + * @param {Node} viaNode + * @private + */ + + }, { + key: "drawLine", + value: function drawLine(ctx, values, selected, hover, viaNode) { + // set style + ctx.strokeStyle = this.getColor(ctx, values, selected, hover); + ctx.lineWidth = values.width; + + if (values.dashes !== false) { + this._drawDashedLine(ctx, values, viaNode); + } else { + this._drawLine(ctx, values, viaNode); + } + } + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {Array} values + * @param {Node} viaNode + * @param {{x: number, y: number}} [fromPoint] + * @param {{x: number, y: number}} [toPoint] + * @private + */ + + }, { + key: "_drawLine", + value: function _drawLine(ctx, values, viaNode, fromPoint, toPoint) { + if (this.from != this.to) { + // draw line + this._line(ctx, values, viaNode, fromPoint, toPoint); + } else { + var _this$_getCircleData = this._getCircleData(ctx), + _this$_getCircleData2 = slicedToArray(_this$_getCircleData, 3), + x = _this$_getCircleData2[0], + y = _this$_getCircleData2[1], + radius = _this$_getCircleData2[2]; + + this._circle(ctx, values, x, y, radius); + } + } + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {Array} values + * @param {Node} viaNode + * @param {{x: number, y: number}} [fromPoint] TODO: Remove in next major release + * @param {{x: number, y: number}} [toPoint] TODO: Remove in next major release + * @private + */ + + }, { + key: "_drawDashedLine", + value: function _drawDashedLine(ctx, values, viaNode, fromPoint, toPoint) { + // eslint-disable-line no-unused-vars + ctx.lineCap = 'round'; + var pattern = [5, 5]; + + if (Array.isArray(values.dashes) === true) { + pattern = values.dashes; + } // only firefox and chrome support this method, else we use the legacy one. + + + if (ctx.setLineDash !== undefined) { + ctx.save(); // set dash settings for chrome or firefox + + ctx.setLineDash(pattern); + ctx.lineDashOffset = 0; // draw the line + + if (this.from != this.to) { + // draw line + this._line(ctx, values, viaNode); + } else { + var _this$_getCircleData3 = this._getCircleData(ctx), + _this$_getCircleData4 = slicedToArray(_this$_getCircleData3, 3), + x = _this$_getCircleData4[0], + y = _this$_getCircleData4[1], + radius = _this$_getCircleData4[2]; + + this._circle(ctx, values, x, y, radius); + } // restore the dash settings. + + + ctx.setLineDash([0]); + ctx.lineDashOffset = 0; + ctx.restore(); + } else { + // unsupporting smooth lines + if (this.from != this.to) { + // draw line + ctx.dashedLine(this.from.x, this.from.y, this.to.x, this.to.y, pattern); + } else { + var _this$_getCircleData5 = this._getCircleData(ctx), + _this$_getCircleData6 = slicedToArray(_this$_getCircleData5, 3), + _x = _this$_getCircleData6[0], + _y = _this$_getCircleData6[1], + _radius = _this$_getCircleData6[2]; + + this._circle(ctx, values, _x, _y, _radius); + } // draw shadow if enabled + + + this.enableShadow(ctx, values); + ctx.stroke(); // disable shadows for other elements. + + this.disableShadow(ctx, values); + } + } + /** + * + * @param {Node} nearNode + * @param {CanvasRenderingContext2D} ctx + * @param {Object} options + * @returns {{x: number, y: number}} + */ + + }, { + key: "findBorderPosition", + value: function findBorderPosition(nearNode, ctx, options) { + if (this.from != this.to) { + return this._findBorderPosition(nearNode, ctx, options); + } else { + return this._findBorderPositionCircle(nearNode, ctx, options); + } + } + /** + * + * @param {CanvasRenderingContext2D} ctx + * @returns {{from: ({x: number, y: number, t: number}|*), to: ({x: number, y: number, t: number}|*)}} + */ + + }, { + key: "findBorderPositions", + value: function findBorderPositions(ctx) { + var from = {}; + var to = {}; + + if (this.from != this.to) { + from = this._findBorderPosition(this.from, ctx); + to = this._findBorderPosition(this.to, ctx); + } else { + var _this$_getCircleData$ = this._getCircleData(ctx).slice(0, 2), + _this$_getCircleData$2 = slicedToArray(_this$_getCircleData$, 2), + x = _this$_getCircleData$2[0], + y = _this$_getCircleData$2[1]; + + from = this._findBorderPositionCircle(this.from, ctx, { + x: x, + y: y, + low: 0.25, + high: 0.6, + direction: -1 + }); + to = this._findBorderPositionCircle(this.from, ctx, { + x: x, + y: y, + low: 0.6, + high: 0.8, + direction: 1 + }); + } + + return { + from: from, + to: to + }; + } + /** + * + * @param {CanvasRenderingContext2D} ctx + * @returns {Array.} x, y, radius + * @private + */ + + }, { + key: "_getCircleData", + value: function _getCircleData(ctx) { + var x, y; + var node = this.from; + var radius = this.options.selfReferenceSize; + + if (ctx !== undefined) { + if (node.shape.width === undefined) { + node.shape.resize(ctx); + } + } // get circle coordinates + + + if (node.shape.width > node.shape.height) { + x = node.x + node.shape.width * 0.5; + y = node.y - radius; + } else { + x = node.x + radius; + y = node.y - node.shape.height * 0.5; + } + + return [x, y, radius]; + } + /** + * Get a point on a circle + * @param {number} x + * @param {number} y + * @param {number} radius + * @param {number} percentage - Value between 0 (line start) and 1 (line end) + * @return {Object} point + * @private + */ + + }, { + key: "_pointOnCircle", + value: function _pointOnCircle(x, y, radius, percentage) { + var angle = percentage * 2 * Math.PI; + return { + x: x + radius * Math.cos(angle), + y: y - radius * Math.sin(angle) + }; + } + /** + * This function uses binary search to look for the point where the circle crosses the border of the node. + * @param {Node} node + * @param {CanvasRenderingContext2D} ctx + * @param {Object} options + * @returns {*} + * @private + */ + + }, { + key: "_findBorderPositionCircle", + value: function _findBorderPositionCircle(node, ctx, options) { + var x = options.x; + var y = options.y; + var low = options.low; + var high = options.high; + var direction = options.direction; + var maxIterations = 10; + var iteration = 0; + var radius = this.options.selfReferenceSize; + var pos, angle, distanceToBorder, distanceToPoint, difference; + var threshold = 0.05; + var middle = (low + high) * 0.5; + + while (low <= high && iteration < maxIterations) { + middle = (low + high) * 0.5; + pos = this._pointOnCircle(x, y, radius, middle); + angle = Math.atan2(node.y - pos.y, node.x - pos.x); + distanceToBorder = node.distanceToBorder(ctx, angle); + distanceToPoint = Math.sqrt(Math.pow(pos.x - node.x, 2) + Math.pow(pos.y - node.y, 2)); + difference = distanceToBorder - distanceToPoint; + + if (Math.abs(difference) < threshold) { + break; // found + } else if (difference > 0) { + // distance to nodes is larger than distance to border --> t needs to be bigger if we're looking at the to node. + if (direction > 0) { + low = middle; + } else { + high = middle; + } + } else { + if (direction > 0) { + high = middle; + } else { + low = middle; + } + } + + iteration++; + } + + pos.t = middle; + return pos; + } + /** + * Get the line width of the edge. Depends on width and whether one of the + * connected nodes is selected. + * @param {boolean} selected + * @param {boolean} hover + * @returns {number} width + * @private + */ + + }, { + key: "getLineWidth", + value: function getLineWidth(selected, hover) { + if (selected === true) { + return Math.max(this.selectionWidth, 0.3 / this.body.view.scale); + } else { + if (hover === true) { + return Math.max(this.hoverWidth, 0.3 / this.body.view.scale); + } else { + return Math.max(this.options.width, 0.3 / this.body.view.scale); + } + } + } + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {ArrowOptions} values + * @param {boolean} selected - Unused + * @param {boolean} hover - Unused + * @returns {string} + */ + + }, { + key: "getColor", + value: function getColor(ctx, values, selected, hover) { + // eslint-disable-line no-unused-vars + if (values.inheritsColor !== false) { + // when this is a loop edge, just use the 'from' method + if (values.inheritsColor === 'both' && this.from.id !== this.to.id) { + var grd = ctx.createLinearGradient(this.from.x, this.from.y, this.to.x, this.to.y); + var fromColor, toColor; + fromColor = this.from.options.color.highlight.border; + toColor = this.to.options.color.highlight.border; + + if (this.from.selected === false && this.to.selected === false) { + fromColor = util.overrideOpacity(this.from.options.color.border, values.opacity); + toColor = util.overrideOpacity(this.to.options.color.border, values.opacity); + } else if (this.from.selected === true && this.to.selected === false) { + toColor = this.to.options.color.border; + } else if (this.from.selected === false && this.to.selected === true) { + fromColor = this.from.options.color.border; + } + + grd.addColorStop(0, fromColor); + grd.addColorStop(1, toColor); // -------------------- this returns -------------------- // + + return grd; + } + + if (values.inheritsColor === "to") { + return util.overrideOpacity(this.to.options.color.border, values.opacity); + } else { + // "from" + return util.overrideOpacity(this.from.options.color.border, values.opacity); + } + } else { + return util.overrideOpacity(values.color, values.opacity); + } + } + /** + * Draw a line from a node to itself, a circle + * + * @param {CanvasRenderingContext2D} ctx + * @param {Array} values + * @param {number} x + * @param {number} y + * @param {number} radius + * @private + */ + + }, { + key: "_circle", + value: function _circle(ctx, values, x, y, radius) { + // draw shadow if enabled + this.enableShadow(ctx, values); // draw a circle + + ctx.beginPath(); + ctx.arc(x, y, radius, 0, 2 * Math.PI, false); + ctx.stroke(); // disable shadows for other elements. + + this.disableShadow(ctx, values); + } + /** + * Calculate the distance between a point (x3,y3) and a line segment from (x1,y1) to (x2,y2). + * (x3,y3) is the point. + * + * http://stackoverflow.com/questions/849211/shortest-distancae-between-a-point-and-a-line-segment + * + * @param {number} x1 + * @param {number} y1 + * @param {number} x2 + * @param {number} y2 + * @param {number} x3 + * @param {number} y3 + * @param {Node} via + * @param {Array} values + * @returns {number} + */ + + }, { + key: "getDistanceToEdge", + value: function getDistanceToEdge(x1, y1, x2, y2, x3, y3, via, values) { + // eslint-disable-line no-unused-vars + var returnValue = 0; + + if (this.from != this.to) { + returnValue = this._getDistanceToEdge(x1, y1, x2, y2, x3, y3, via); + } else { + var _this$_getCircleData7 = this._getCircleData(undefined), + _this$_getCircleData8 = slicedToArray(_this$_getCircleData7, 3), + x = _this$_getCircleData8[0], + y = _this$_getCircleData8[1], + radius = _this$_getCircleData8[2]; + + var dx = x - x3; + var dy = y - y3; + returnValue = Math.abs(Math.sqrt(dx * dx + dy * dy) - radius); + } + + return returnValue; + } + /** + * + * @param {number} x1 + * @param {number} y1 + * @param {number} x2 + * @param {number} y2 + * @param {number} x3 + * @param {number} y3 + * @returns {number} + * @private + */ + + }, { + key: "_getDistanceToLine", + value: function _getDistanceToLine(x1, y1, x2, y2, x3, y3) { + var px = x2 - x1; + var py = y2 - y1; + var something = px * px + py * py; + var u = ((x3 - x1) * px + (y3 - y1) * py) / something; + + if (u > 1) { + u = 1; + } else if (u < 0) { + u = 0; + } + + var x = x1 + u * px; + var y = y1 + u * py; + var dx = x - x3; + var dy = y - y3; //# Note: If the actual distance does not matter, + //# if you only want to compare what this function + //# returns to other results of this function, you + //# can just return the squared distance instead + //# (i.e. remove the sqrt) to gain a little performance + + return Math.sqrt(dx * dx + dy * dy); + } + /** + * @param {CanvasRenderingContext2D} ctx + * @param {string} position + * @param {Node} viaNode + * @param {boolean} selected + * @param {boolean} hover + * @param {Array} values + * @returns {{point: *, core: {x: number, y: number}, angle: *, length: number, type: *}} + */ + + }, { + key: "getArrowData", + value: function getArrowData(ctx, position, viaNode, selected, hover, values) { + // set lets + var angle; + var arrowPoint; + var node1; + var node2; + var guideOffset; + var scaleFactor; + var type; + var lineWidth = values.width; + + if (position === 'from') { + node1 = this.from; + node2 = this.to; + guideOffset = 0.1; + scaleFactor = values.fromArrowScale; + type = values.fromArrowType; + } else if (position === 'to') { + node1 = this.to; + node2 = this.from; + guideOffset = -0.1; + scaleFactor = values.toArrowScale; + type = values.toArrowType; + } else { + node1 = this.to; + node2 = this.from; + scaleFactor = values.middleArrowScale; + type = values.middleArrowType; + } // if not connected to itself + + + if (node1 != node2) { + if (position !== 'middle') { + // draw arrow head + if (this.options.smooth.enabled === true) { + arrowPoint = this.findBorderPosition(node1, ctx, { + via: viaNode + }); + var guidePos = this.getPoint(Math.max(0.0, Math.min(1.0, arrowPoint.t + guideOffset)), viaNode); + angle = Math.atan2(arrowPoint.y - guidePos.y, arrowPoint.x - guidePos.x); + } else { + angle = Math.atan2(node1.y - node2.y, node1.x - node2.x); + arrowPoint = this.findBorderPosition(node1, ctx); + } + } else { + angle = Math.atan2(node1.y - node2.y, node1.x - node2.x); + arrowPoint = this.getPoint(0.5, viaNode); // this is 0.6 to account for the size of the arrow. + } + } else { + // draw circle + var _this$_getCircleData9 = this._getCircleData(ctx), + _this$_getCircleData10 = slicedToArray(_this$_getCircleData9, 3), + x = _this$_getCircleData10[0], + y = _this$_getCircleData10[1], + radius = _this$_getCircleData10[2]; + + if (position === 'from') { + arrowPoint = this.findBorderPosition(this.from, ctx, { + x: x, + y: y, + low: 0.25, + high: 0.6, + direction: -1 + }); + angle = arrowPoint.t * -2 * Math.PI + 1.5 * Math.PI + 0.1 * Math.PI; + } else if (position === 'to') { + arrowPoint = this.findBorderPosition(this.from, ctx, { + x: x, + y: y, + low: 0.6, + high: 1.0, + direction: 1 + }); + angle = arrowPoint.t * -2 * Math.PI + 1.5 * Math.PI - 1.1 * Math.PI; + } else { + arrowPoint = this._pointOnCircle(x, y, radius, 0.175); + angle = 3.9269908169872414; // === 0.175 * -2 * Math.PI + 1.5 * Math.PI + 0.1 * Math.PI; + } + } + + if (position === 'middle' && scaleFactor < 0) lineWidth *= -1; // reversed middle arrow + + var length = 15 * scaleFactor + 3 * lineWidth; // 3* lineWidth is the width of the edge. + + var xi = arrowPoint.x - length * 0.9 * Math.cos(angle); + var yi = arrowPoint.y - length * 0.9 * Math.sin(angle); + var arrowCore = { + x: xi, + y: yi + }; + return { + point: arrowPoint, + core: arrowCore, + angle: angle, + length: length, + type: type + }; + } + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {ArrowOptions} values + * @param {boolean} selected + * @param {boolean} hover + * @param {Object} arrowData + */ + + }, { + key: "drawArrowHead", + value: function drawArrowHead(ctx, values, selected, hover, arrowData) { + // set style + ctx.strokeStyle = this.getColor(ctx, values, selected, hover); + ctx.fillStyle = ctx.strokeStyle; + ctx.lineWidth = values.width; + EndPoints.draw(ctx, arrowData); // draw shadow if enabled + + this.enableShadow(ctx, values); + ctx.fill(); // disable shadows for other elements. + + this.disableShadow(ctx, values); + } + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {ArrowOptions} values + */ + + }, { + key: "enableShadow", + value: function enableShadow(ctx, values) { + if (values.shadow === true) { + ctx.shadowColor = values.shadowColor; + ctx.shadowBlur = values.shadowSize; + ctx.shadowOffsetX = values.shadowX; + ctx.shadowOffsetY = values.shadowY; + } + } + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {ArrowOptions} values + */ + + }, { + key: "disableShadow", + value: function disableShadow(ctx, values) { + if (values.shadow === true) { + ctx.shadowColor = 'rgba(0,0,0,0)'; + ctx.shadowBlur = 0; + ctx.shadowOffsetX = 0; + ctx.shadowOffsetY = 0; + } + } + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {{toArrow: boolean, toArrowScale: (allOptions.edges.arrows.to.scaleFactor|{number}|allOptions.edges.arrows.middle.scaleFactor|allOptions.edges.arrows.from.scaleFactor|Array|number), toArrowType: *, middleArrow: boolean, middleArrowScale: (number|allOptions.edges.arrows.middle.scaleFactor|{number}|Array), middleArrowType: (allOptions.edges.arrows.middle.type|{string}|string|*), fromArrow: boolean, fromArrowScale: (allOptions.edges.arrows.to.scaleFactor|{number}|allOptions.edges.arrows.middle.scaleFactor|allOptions.edges.arrows.from.scaleFactor|Array|number), fromArrowType: *, arrowStrikethrough: (*|boolean|allOptions.edges.arrowStrikethrough|{boolean}), color: undefined, inheritsColor: (string|string|string|allOptions.edges.color.inherit|{string, boolean}|Array|*), opacity: *, hidden: *, length: *, shadow: *, shadowColor: *, shadowSize: *, shadowX: *, shadowY: *, dashes: (*|boolean|Array|allOptions.edges.dashes|{boolean, array}), width: *}} values + */ + + }, { + key: "drawBackground", + value: function drawBackground(ctx, values) { + if (values.background !== false) { + var attrs = ['strokeStyle', 'lineWidth', 'dashes']; + var origCtxAttr = {}; // save original line attrs + + attrs.forEach(function (attrname) { + origCtxAttr[attrname] = ctx[attrname]; + }); + ctx.strokeStyle = values.backgroundColor; + ctx.lineWidth = values.backgroundSize; + this.setStrokeDashed(ctx, values.backgroundDashes); + ctx.stroke(); // restore original line attrs + + attrs.forEach(function (attrname) { + ctx[attrname] = origCtxAttr[attrname]; + }); + this.setStrokeDashed(ctx, values.dashes); + } + } + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {boolean|Array} dashes + */ + + }, { + key: "setStrokeDashed", + value: function setStrokeDashed(ctx, dashes) { + if (dashes !== false) { + if (ctx.setLineDash !== undefined) { + var pattern = [5, 5]; + + if (Array.isArray(dashes) === true) { + pattern = dashes; + } + + ctx.setLineDash(pattern); + } else { + console.warn("setLineDash is not supported in this browser. The dashed stroke cannot be used."); + } + } else { + if (ctx.setLineDash !== undefined) { + ctx.setLineDash([]); + } else { + console.warn("setLineDash is not supported in this browser. The dashed stroke cannot be used."); + } + } + } + }]); + + return EdgeBase; + }(); + + /** + * The Base Class for all Bezier edges. Bezier curves are used to model smooth + * gradual curves in paths between nodes. + * + * @extends EdgeBase + */ + + var BezierEdgeBase = + /*#__PURE__*/ + function (_EdgeBase) { + inherits$1(BezierEdgeBase, _EdgeBase); + + /** + * @param {Object} options + * @param {Object} body + * @param {Label} labelModule + */ + function BezierEdgeBase(options, body, labelModule) { + classCallCheck$1(this, BezierEdgeBase); + + return possibleConstructorReturn$1(this, getPrototypeOf$1(BezierEdgeBase).call(this, options, body, labelModule)); + } + /** + * This function uses binary search to look for the point where the bezier curve crosses the border of the node. + * + * @param {Node} nearNode + * @param {CanvasRenderingContext2D} ctx + * @param {Node} viaNode + * @returns {*} + * @private + */ + + + createClass$1(BezierEdgeBase, [{ + key: "_findBorderPositionBezier", + value: function _findBorderPositionBezier(nearNode, ctx) { + var viaNode = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this._getViaCoordinates(); + var maxIterations = 10; + var iteration = 0; + var low = 0; + var high = 1; + var pos, angle, distanceToBorder, distanceToPoint, difference; + var threshold = 0.2; + var node = this.to; + var from = false; + + if (nearNode.id === this.from.id) { + node = this.from; + from = true; + } + + while (low <= high && iteration < maxIterations) { + var middle = (low + high) * 0.5; + pos = this.getPoint(middle, viaNode); + angle = Math.atan2(node.y - pos.y, node.x - pos.x); + distanceToBorder = node.distanceToBorder(ctx, angle); + distanceToPoint = Math.sqrt(Math.pow(pos.x - node.x, 2) + Math.pow(pos.y - node.y, 2)); + difference = distanceToBorder - distanceToPoint; + + if (Math.abs(difference) < threshold) { + break; // found + } else if (difference < 0) { + // distance to nodes is larger than distance to border --> t needs to be bigger if we're looking at the to node. + if (from === false) { + low = middle; + } else { + high = middle; + } + } else { + if (from === false) { + high = middle; + } else { + low = middle; + } + } + + iteration++; + } + + pos.t = middle; + return pos; + } + /** + * Calculate the distance between a point (x3,y3) and a line segment from + * (x1,y1) to (x2,y2). + * http://stackoverflow.com/questions/849211/shortest-distancae-between-a-point-and-a-line-segment + * @param {number} x1 from x + * @param {number} y1 from y + * @param {number} x2 to x + * @param {number} y2 to y + * @param {number} x3 point to check x + * @param {number} y3 point to check y + * @param {Node} via + * @returns {number} + * @private + */ + + }, { + key: "_getDistanceToBezierEdge", + value: function _getDistanceToBezierEdge(x1, y1, x2, y2, x3, y3, via) { + // x3,y3 is the point + var minDistance = 1e9; + var distance; + var i, t, x, y; + var lastX = x1; + var lastY = y1; + + for (i = 1; i < 10; i++) { + t = 0.1 * i; + x = Math.pow(1 - t, 2) * x1 + 2 * t * (1 - t) * via.x + Math.pow(t, 2) * x2; + y = Math.pow(1 - t, 2) * y1 + 2 * t * (1 - t) * via.y + Math.pow(t, 2) * y2; + + if (i > 0) { + distance = this._getDistanceToLine(lastX, lastY, x, y, x3, y3); + minDistance = distance < minDistance ? distance : minDistance; + } + + lastX = x; + lastY = y; + } + + return minDistance; + } + /** + * Draw a bezier curve between two nodes + * + * The method accepts zero, one or two control points. + * Passing zero control points just draws a straight line + * + * @param {CanvasRenderingContext2D} ctx + * @param {Object} values | options for shadow drawing + * @param {Object|undefined} viaNode1 | first control point for curve drawing + * @param {Object|undefined} viaNode2 | second control point for curve drawing + * + * @protected + */ + + }, { + key: "_bezierCurve", + value: function _bezierCurve(ctx, values, viaNode1, viaNode2) { + var hasNode1 = viaNode1 !== undefined && viaNode1.x !== undefined; + var hasNode2 = viaNode2 !== undefined && viaNode2.x !== undefined; + ctx.beginPath(); + ctx.moveTo(this.fromPoint.x, this.fromPoint.y); + + if (hasNode1 && hasNode2) { + ctx.bezierCurveTo(viaNode1.x, viaNode1.y, viaNode2.x, viaNode2.y, this.toPoint.x, this.toPoint.y); + } else if (hasNode1) { + ctx.quadraticCurveTo(viaNode1.x, viaNode1.y, this.toPoint.x, this.toPoint.y); + } else { + // fallback to normal straight edge + ctx.lineTo(this.toPoint.x, this.toPoint.y); + } // draw a background + + + this.drawBackground(ctx, values); // draw shadow if enabled + + this.enableShadow(ctx, values); + ctx.stroke(); + this.disableShadow(ctx, values); + } + /** + * + * @returns {*|{x, y}|{x: undefined, y: undefined}} + */ + + }, { + key: "getViaNode", + value: function getViaNode() { + return this._getViaCoordinates(); + } + }]); + + return BezierEdgeBase; + }(EdgeBase); + + /** + * A Base Class for all Cubic Bezier Edges. Bezier curves are used to model + * smooth gradual curves in paths between nodes. + * + * @extends BezierEdgeBase + */ + + var CubicBezierEdgeBase = + /*#__PURE__*/ + function (_BezierEdgeBase) { + inherits$1(CubicBezierEdgeBase, _BezierEdgeBase); + + /** + * @param {Object} options + * @param {Object} body + * @param {Label} labelModule + */ + function CubicBezierEdgeBase(options, body, labelModule) { + classCallCheck$1(this, CubicBezierEdgeBase); + + return possibleConstructorReturn$1(this, getPrototypeOf$1(CubicBezierEdgeBase).call(this, options, body, labelModule)); + } + /** + * Calculate the distance between a point (x3,y3) and a line segment from + * (x1,y1) to (x2,y2). + * http://stackoverflow.com/questions/849211/shortest-distancae-between-a-point-and-a-line-segment + * https://en.wikipedia.org/wiki/B%C3%A9zier_curve + * @param {number} x1 from x + * @param {number} y1 from y + * @param {number} x2 to x + * @param {number} y2 to y + * @param {number} x3 point to check x + * @param {number} y3 point to check y + * @param {Node} via1 + * @param {Node} via2 + * @returns {number} + * @private + */ + + + createClass$1(CubicBezierEdgeBase, [{ + key: "_getDistanceToBezierEdge", + value: function _getDistanceToBezierEdge(x1, y1, x2, y2, x3, y3, via1, via2) { + // x3,y3 is the point + var minDistance = 1e9; + var distance; + var i, t, x, y; + var lastX = x1; + var lastY = y1; + var vec = [0, 0, 0, 0]; + + for (i = 1; i < 10; i++) { + t = 0.1 * i; + vec[0] = Math.pow(1 - t, 3); + vec[1] = 3 * t * Math.pow(1 - t, 2); + vec[2] = 3 * Math.pow(t, 2) * (1 - t); + vec[3] = Math.pow(t, 3); + x = vec[0] * x1 + vec[1] * via1.x + vec[2] * via2.x + vec[3] * x2; + y = vec[0] * y1 + vec[1] * via1.y + vec[2] * via2.y + vec[3] * y2; + + if (i > 0) { + distance = this._getDistanceToLine(lastX, lastY, x, y, x3, y3); + minDistance = distance < minDistance ? distance : minDistance; + } + + lastX = x; + lastY = y; + } + + return minDistance; + } + }]); + + return CubicBezierEdgeBase; + }(BezierEdgeBase); + + /** + * A Cubic Bezier Edge. Bezier curves are used to model smooth gradual + * curves in paths between nodes. + * + * @extends CubicBezierEdgeBase + */ + + var CubicBezierEdge = + /*#__PURE__*/ + function (_CubicBezierEdgeBase) { + inherits$1(CubicBezierEdge, _CubicBezierEdgeBase); + + /** + * @param {Object} options + * @param {Object} body + * @param {Label} labelModule + */ + function CubicBezierEdge(options, body, labelModule) { + classCallCheck$1(this, CubicBezierEdge); + + return possibleConstructorReturn$1(this, getPrototypeOf$1(CubicBezierEdge).call(this, options, body, labelModule)); + } + /** + * Draw a line between two nodes + * @param {CanvasRenderingContext2D} ctx + * @param {ArrowOptions} values + * @param {Array.} viaNodes + * @private + */ + + + createClass$1(CubicBezierEdge, [{ + key: "_line", + value: function _line(ctx, values, viaNodes) { + // get the coordinates of the support points. + var via1 = viaNodes[0]; + var via2 = viaNodes[1]; + + this._bezierCurve(ctx, values, via1, via2); + } + /** + * + * @returns {Array.<{x: number, y: number}>} + * @private + */ + + }, { + key: "_getViaCoordinates", + value: function _getViaCoordinates() { + var dx = this.from.x - this.to.x; + var dy = this.from.y - this.to.y; + var x1, y1, x2, y2; + var roundness = this.options.smooth.roundness; // horizontal if x > y or if direction is forced or if direction is horizontal + + if ((Math.abs(dx) > Math.abs(dy) || this.options.smooth.forceDirection === true || this.options.smooth.forceDirection === 'horizontal') && this.options.smooth.forceDirection !== 'vertical') { + y1 = this.from.y; + y2 = this.to.y; + x1 = this.from.x - roundness * dx; + x2 = this.to.x + roundness * dx; + } else { + y1 = this.from.y - roundness * dy; + y2 = this.to.y + roundness * dy; + x1 = this.from.x; + x2 = this.to.x; + } + + return [{ + x: x1, + y: y1 + }, { + x: x2, + y: y2 + }]; + } + /** + * + * @returns {Array.<{x: number, y: number}>} + */ + + }, { + key: "getViaNode", + value: function getViaNode() { + return this._getViaCoordinates(); + } + /** + * + * @param {Node} nearNode + * @param {CanvasRenderingContext2D} ctx + * @returns {{x: number, y: number, t: number}} + * @private + */ + + }, { + key: "_findBorderPosition", + value: function _findBorderPosition(nearNode, ctx) { + return this._findBorderPositionBezier(nearNode, ctx); + } + /** + * + * @param {number} x1 + * @param {number} y1 + * @param {number} x2 + * @param {number} y2 + * @param {number} x3 + * @param {number} y3 + * @param {Node} via1 + * @param {Node} via2 + * @returns {number} + * @private + */ + + }, { + key: "_getDistanceToEdge", + value: function _getDistanceToEdge(x1, y1, x2, y2, x3, y3) { + var _ref = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : this._getViaCoordinates(), + _ref2 = slicedToArray(_ref, 2), + via1 = _ref2[0], + via2 = _ref2[1]; + + // x3,y3 is the point + return this._getDistanceToBezierEdge(x1, y1, x2, y2, x3, y3, via1, via2); + } + /** + * Combined function of pointOnLine and pointOnBezier. This gives the coordinates of a point on the line at a certain percentage of the way + * @param {number} percentage + * @param {{x: number, y: number}} [via1=this._getViaCoordinates()[0]] + * @param {{x: number, y: number}} [via2=this._getViaCoordinates()[1]] + * @returns {{x: number, y: number}} + * @private + */ + + }, { + key: "getPoint", + value: function getPoint(percentage) { + var _ref3 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this._getViaCoordinates(), + _ref4 = slicedToArray(_ref3, 2), + via1 = _ref4[0], + via2 = _ref4[1]; + + var t = percentage; + var vec = []; + vec[0] = Math.pow(1 - t, 3); + vec[1] = 3 * t * Math.pow(1 - t, 2); + vec[2] = 3 * Math.pow(t, 2) * (1 - t); + vec[3] = Math.pow(t, 3); + var x = vec[0] * this.fromPoint.x + vec[1] * via1.x + vec[2] * via2.x + vec[3] * this.toPoint.x; + var y = vec[0] * this.fromPoint.y + vec[1] * via1.y + vec[2] * via2.y + vec[3] * this.toPoint.y; + return { + x: x, + y: y + }; + } + }]); + + return CubicBezierEdge; + }(CubicBezierEdgeBase); + + /** + * A Dynamic Bezier Edge. Bezier curves are used to model smooth gradual + * curves in paths between nodes. The Dynamic piece refers to how the curve + * reacts to physics changes. + * + * @extends BezierEdgeBase + */ + + var BezierEdgeDynamic = + /*#__PURE__*/ + function (_BezierEdgeBase) { + inherits$1(BezierEdgeDynamic, _BezierEdgeBase); + + /** + * @param {Object} options + * @param {Object} body + * @param {Label} labelModule + */ + function BezierEdgeDynamic(options, body, labelModule) { + var _this; + + classCallCheck$1(this, BezierEdgeDynamic); + + //this.via = undefined; // Here for completeness but not allowed to defined before super() is invoked. + _this = possibleConstructorReturn$1(this, getPrototypeOf$1(BezierEdgeDynamic).call(this, options, body, labelModule)); // --> this calls the setOptions below + + _this._boundFunction = function () { + _this.positionBezierNode(); + }; + + _this.body.emitter.on("_repositionBezierNodes", _this._boundFunction); + + return _this; + } + /** + * + * @param {Object} options + */ + + + createClass$1(BezierEdgeDynamic, [{ + key: "setOptions", + value: function setOptions(options) { + // check if the physics has changed. + var physicsChange = false; + + if (this.options.physics !== options.physics) { + physicsChange = true; + } // set the options and the to and from nodes + + + this.options = options; + this.id = this.options.id; + this.from = this.body.nodes[this.options.from]; + this.to = this.body.nodes[this.options.to]; // setup the support node and connect + + this.setupSupportNode(); + this.connect(); // when we change the physics state of the edge, we reposition the support node. + + if (physicsChange === true) { + this.via.setOptions({ + physics: this.options.physics + }); + this.positionBezierNode(); + } + } + /** + * Connects an edge to node(s) + */ + + }, { + key: "connect", + value: function connect() { + this.from = this.body.nodes[this.options.from]; + this.to = this.body.nodes[this.options.to]; + + if (this.from === undefined || this.to === undefined || this.options.physics === false) { + this.via.setOptions({ + physics: false + }); + } else { + // fix weird behaviour where a self referencing node has physics enabled + if (this.from.id === this.to.id) { + this.via.setOptions({ + physics: false + }); + } else { + this.via.setOptions({ + physics: true + }); + } + } + } + /** + * remove the support nodes + * @returns {boolean} + */ + + }, { + key: "cleanup", + value: function cleanup() { + this.body.emitter.off("_repositionBezierNodes", this._boundFunction); + + if (this.via !== undefined) { + delete this.body.nodes[this.via.id]; + this.via = undefined; + return true; + } + + return false; + } + /** + * Bezier curves require an anchor point to calculate the smooth flow. These points are nodes. These nodes are invisible but + * are used for the force calculation. + * + * The changed data is not called, if needed, it is returned by the main edge constructor. + * @private + */ + + }, { + key: "setupSupportNode", + value: function setupSupportNode() { + if (this.via === undefined) { + var nodeId = "edgeId:" + this.id; + var node = this.body.functions.createNode({ + id: nodeId, + shape: 'circle', + physics: true, + hidden: true + }); + this.body.nodes[nodeId] = node; + this.via = node; + this.via.parentEdgeId = this.id; + this.positionBezierNode(); + } + } + /** + * Positions bezier node + */ + + }, { + key: "positionBezierNode", + value: function positionBezierNode() { + if (this.via !== undefined && this.from !== undefined && this.to !== undefined) { + this.via.x = 0.5 * (this.from.x + this.to.x); + this.via.y = 0.5 * (this.from.y + this.to.y); + } else if (this.via !== undefined) { + this.via.x = 0; + this.via.y = 0; + } + } + /** + * Draw a line between two nodes + * @param {CanvasRenderingContext2D} ctx + * @param {ArrowOptions} values + * @param {Node} viaNode + * @private + */ + + }, { + key: "_line", + value: function _line(ctx, values, viaNode) { + this._bezierCurve(ctx, values, viaNode); + } + /** + * + * @returns {Node|undefined|*|{index, line, column}} + */ + + }, { + key: "getViaNode", + value: function getViaNode() { + return this.via; + } + /** + * Combined function of pointOnLine and pointOnBezier. This gives the coordinates of a point on the line at a certain percentage of the way + * + * @param {number} percentage + * @param {Node} viaNode + * @returns {{x: number, y: number}} + * @private + */ + + }, { + key: "getPoint", + value: function getPoint(percentage) { + var viaNode = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.via; + var t = percentage; + var x, y; + + if (this.from === this.to) { + var _this$_getCircleData = this._getCircleData(this.from), + _this$_getCircleData2 = slicedToArray(_this$_getCircleData, 3), + cx = _this$_getCircleData2[0], + cy = _this$_getCircleData2[1], + cr = _this$_getCircleData2[2]; + + var a = 2 * Math.PI * (1 - t); + x = cx + cr * Math.sin(a); + y = cy + cr - cr * (1 - Math.cos(a)); + } else { + x = Math.pow(1 - t, 2) * this.fromPoint.x + 2 * t * (1 - t) * viaNode.x + Math.pow(t, 2) * this.toPoint.x; + y = Math.pow(1 - t, 2) * this.fromPoint.y + 2 * t * (1 - t) * viaNode.y + Math.pow(t, 2) * this.toPoint.y; + } + + return { + x: x, + y: y + }; + } + /** + * + * @param {Node} nearNode + * @param {CanvasRenderingContext2D} ctx + * @returns {*} + * @private + */ + + }, { + key: "_findBorderPosition", + value: function _findBorderPosition(nearNode, ctx) { + return this._findBorderPositionBezier(nearNode, ctx, this.via); + } + /** + * + * @param {number} x1 + * @param {number} y1 + * @param {number} x2 + * @param {number} y2 + * @param {number} x3 + * @param {number} y3 + * @returns {number} + * @private + */ + + }, { + key: "_getDistanceToEdge", + value: function _getDistanceToEdge(x1, y1, x2, y2, x3, y3) { + // x3,y3 is the point + return this._getDistanceToBezierEdge(x1, y1, x2, y2, x3, y3, this.via); + } + }]); + + return BezierEdgeDynamic; + }(BezierEdgeBase); + + /** + * A Static Bezier Edge. Bezier curves are used to model smooth gradual + * curves in paths between nodes. + * + * @extends BezierEdgeBase + */ + + var BezierEdgeStatic = + /*#__PURE__*/ + function (_BezierEdgeBase) { + inherits$1(BezierEdgeStatic, _BezierEdgeBase); + + /** + * @param {Object} options + * @param {Object} body + * @param {Label} labelModule + */ + function BezierEdgeStatic(options, body, labelModule) { + classCallCheck$1(this, BezierEdgeStatic); + + return possibleConstructorReturn$1(this, getPrototypeOf$1(BezierEdgeStatic).call(this, options, body, labelModule)); + } + /** + * Draw a line between two nodes + * @param {CanvasRenderingContext2D} ctx + * @param {ArrowOptions} values + * @param {Node} viaNode + * @private + */ + + + createClass$1(BezierEdgeStatic, [{ + key: "_line", + value: function _line(ctx, values, viaNode) { + this._bezierCurve(ctx, values, viaNode); + } + /** + * + * @returns {Array.<{x: number, y: number}>} + */ + + }, { + key: "getViaNode", + value: function getViaNode() { + return this._getViaCoordinates(); + } + /** + * We do not use the to and fromPoints here to make the via nodes the same as edges without arrows. + * @returns {{x: undefined, y: undefined}} + * @private + */ + + }, { + key: "_getViaCoordinates", + value: function _getViaCoordinates() { + // Assumption: x/y coordinates in from/to always defined + var xVia = undefined; + var yVia = undefined; + var factor = this.options.smooth.roundness; + var type = this.options.smooth.type; + var dx = Math.abs(this.from.x - this.to.x); + var dy = Math.abs(this.from.y - this.to.y); + + if (type === 'discrete' || type === 'diagonalCross') { + var stepX; + var stepY; + + if (dx <= dy) { + stepX = stepY = factor * dy; + } else { + stepX = stepY = factor * dx; + } + + if (this.from.x > this.to.x) stepX = -stepX; + if (this.from.y >= this.to.y) stepY = -stepY; + xVia = this.from.x + stepX; + yVia = this.from.y + stepY; + + if (type === "discrete") { + if (dx <= dy) { + xVia = dx < factor * dy ? this.from.x : xVia; + } else { + yVia = dy < factor * dx ? this.from.y : yVia; + } + } + } else if (type === "straightCross") { + var _stepX = (1 - factor) * dx; + + var _stepY = (1 - factor) * dy; + + if (dx <= dy) { + // up - down + _stepX = 0; + if (this.from.y < this.to.y) _stepY = -_stepY; + } else { + // left - right + if (this.from.x < this.to.x) _stepX = -_stepX; + _stepY = 0; + } + + xVia = this.to.x + _stepX; + yVia = this.to.y + _stepY; + } else if (type === 'horizontal') { + var _stepX2 = (1 - factor) * dx; + + if (this.from.x < this.to.x) _stepX2 = -_stepX2; + xVia = this.to.x + _stepX2; + yVia = this.from.y; + } else if (type === 'vertical') { + var _stepY2 = (1 - factor) * dy; + + if (this.from.y < this.to.y) _stepY2 = -_stepY2; + xVia = this.from.x; + yVia = this.to.y + _stepY2; + } else if (type === 'curvedCW') { + dx = this.to.x - this.from.x; + dy = this.from.y - this.to.y; + var radius = Math.sqrt(dx * dx + dy * dy); + var pi = Math.PI; + var originalAngle = Math.atan2(dy, dx); + var myAngle = (originalAngle + (factor * 0.5 + 0.5) * pi) % (2 * pi); + xVia = this.from.x + (factor * 0.5 + 0.5) * radius * Math.sin(myAngle); + yVia = this.from.y + (factor * 0.5 + 0.5) * radius * Math.cos(myAngle); + } else if (type === 'curvedCCW') { + dx = this.to.x - this.from.x; + dy = this.from.y - this.to.y; + + var _radius = Math.sqrt(dx * dx + dy * dy); + + var _pi = Math.PI; + + var _originalAngle = Math.atan2(dy, dx); + + var _myAngle = (_originalAngle + (-factor * 0.5 + 0.5) * _pi) % (2 * _pi); + + xVia = this.from.x + (factor * 0.5 + 0.5) * _radius * Math.sin(_myAngle); + yVia = this.from.y + (factor * 0.5 + 0.5) * _radius * Math.cos(_myAngle); + } else { + // continuous + var _stepX3; + + var _stepY3; + + if (dx <= dy) { + _stepX3 = _stepY3 = factor * dy; + } else { + _stepX3 = _stepY3 = factor * dx; + } + + if (this.from.x > this.to.x) _stepX3 = -_stepX3; + if (this.from.y >= this.to.y) _stepY3 = -_stepY3; + xVia = this.from.x + _stepX3; + yVia = this.from.y + _stepY3; + + if (dx <= dy) { + if (this.from.x <= this.to.x) { + xVia = this.to.x < xVia ? this.to.x : xVia; + } else { + xVia = this.to.x > xVia ? this.to.x : xVia; + } + } else { + if (this.from.y >= this.to.y) { + yVia = this.to.y > yVia ? this.to.y : yVia; + } else { + yVia = this.to.y < yVia ? this.to.y : yVia; + } + } + } + + return { + x: xVia, + y: yVia + }; + } + /** + * + * @param {Node} nearNode + * @param {CanvasRenderingContext2D} ctx + * @param {Object} options + * @returns {*} + * @private + */ + + }, { + key: "_findBorderPosition", + value: function _findBorderPosition(nearNode, ctx) { + var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; + return this._findBorderPositionBezier(nearNode, ctx, options.via); + } + /** + * + * @param {number} x1 + * @param {number} y1 + * @param {number} x2 + * @param {number} y2 + * @param {number} x3 + * @param {number} y3 + * @param {Node} viaNode + * @returns {number} + * @private + */ + + }, { + key: "_getDistanceToEdge", + value: function _getDistanceToEdge(x1, y1, x2, y2, x3, y3) { + var viaNode = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : this._getViaCoordinates(); + // x3,y3 is the point + return this._getDistanceToBezierEdge(x1, y1, x2, y2, x3, y3, viaNode); + } + /** + * Combined function of pointOnLine and pointOnBezier. This gives the coordinates of a point on the line at a certain percentage of the way + * @param {number} percentage + * @param {Node} viaNode + * @returns {{x: number, y: number}} + * @private + */ + + }, { + key: "getPoint", + value: function getPoint(percentage) { + var viaNode = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this._getViaCoordinates(); + var t = percentage; + var x = Math.pow(1 - t, 2) * this.fromPoint.x + 2 * t * (1 - t) * viaNode.x + Math.pow(t, 2) * this.toPoint.x; + var y = Math.pow(1 - t, 2) * this.fromPoint.y + 2 * t * (1 - t) * viaNode.y + Math.pow(t, 2) * this.toPoint.y; + return { + x: x, + y: y + }; + } + }]); + + return BezierEdgeStatic; + }(BezierEdgeBase); + + /** + * A Straight Edge. + * + * @extends EdgeBase + */ + + var StraightEdge = + /*#__PURE__*/ + function (_EdgeBase) { + inherits$1(StraightEdge, _EdgeBase); + + /** + * @param {Object} options + * @param {Object} body + * @param {Label} labelModule + */ + function StraightEdge(options, body, labelModule) { + classCallCheck$1(this, StraightEdge); + + return possibleConstructorReturn$1(this, getPrototypeOf$1(StraightEdge).call(this, options, body, labelModule)); + } + /** + * Draw a line between two nodes + * @param {CanvasRenderingContext2D} ctx + * @param {ArrowOptions} values + * @private + */ + + + createClass$1(StraightEdge, [{ + key: "_line", + value: function _line(ctx, values) { + // draw a straight line + ctx.beginPath(); + ctx.moveTo(this.fromPoint.x, this.fromPoint.y); + ctx.lineTo(this.toPoint.x, this.toPoint.y); // draw shadow if enabled + + this.enableShadow(ctx, values); + ctx.stroke(); + this.disableShadow(ctx, values); + } + /** + * + * @returns {undefined} + */ + + }, { + key: "getViaNode", + value: function getViaNode() { + return undefined; + } + /** + * Combined function of pointOnLine and pointOnBezier. This gives the coordinates of a point on the line at a certain percentage of the way + * + * @param {number} percentage + * @returns {{x: number, y: number}} + * @private + */ + + }, { + key: "getPoint", + value: function getPoint(percentage) { + return { + x: (1 - percentage) * this.fromPoint.x + percentage * this.toPoint.x, + y: (1 - percentage) * this.fromPoint.y + percentage * this.toPoint.y + }; + } + /** + * + * @param {Node} nearNode + * @param {CanvasRenderingContext2D} ctx + * @returns {{x: number, y: number}} + * @private + */ + + }, { + key: "_findBorderPosition", + value: function _findBorderPosition(nearNode, ctx) { + var node1 = this.to; + var node2 = this.from; + + if (nearNode.id === this.from.id) { + node1 = this.from; + node2 = this.to; + } + + var angle = Math.atan2(node1.y - node2.y, node1.x - node2.x); + var dx = node1.x - node2.x; + var dy = node1.y - node2.y; + var edgeSegmentLength = Math.sqrt(dx * dx + dy * dy); + var toBorderDist = nearNode.distanceToBorder(ctx, angle); + var toBorderPoint = (edgeSegmentLength - toBorderDist) / edgeSegmentLength; + var borderPos = {}; + borderPos.x = (1 - toBorderPoint) * node2.x + toBorderPoint * node1.x; + borderPos.y = (1 - toBorderPoint) * node2.y + toBorderPoint * node1.y; + return borderPos; + } + /** + * + * @param {number} x1 + * @param {number} y1 + * @param {number} x2 + * @param {number} y2 + * @param {number} x3 + * @param {number} y3 + * @returns {number} + * @private + */ + + }, { + key: "_getDistanceToEdge", + value: function _getDistanceToEdge(x1, y1, x2, y2, x3, y3) { + // x3,y3 is the point + return this._getDistanceToLine(x1, y1, x2, y2, x3, y3); + } + }]); + + return StraightEdge; + }(EdgeBase); + + /** + * An edge connects two nodes and has a specific direction. + */ + + var Edge = + /*#__PURE__*/ + function () { + /** + * @param {Object} options values specific to this edge, must contain at least 'from' and 'to' + * @param {Object} body shared state from Network instance + * @param {Object} globalOptions options from the EdgesHandler instance + * @param {Object} defaultOptions default options from the EdgeHandler instance. Value and reference are constant + */ + function Edge(options, body, globalOptions, defaultOptions) { + classCallCheck$1(this, Edge); + + if (body === undefined) { + throw new Error("No body provided"); + } // Since globalOptions is constant in values as well as reference, + // Following needs to be done only once. + + + this.options = util.bridgeObject(globalOptions); + this.globalOptions = globalOptions; + this.defaultOptions = defaultOptions; + this.body = body; // initialize variables + + this.id = undefined; + this.fromId = undefined; + this.toId = undefined; + this.selected = false; + this.hover = false; + this.labelDirty = true; + this.baseWidth = this.options.width; + this.baseFontSize = this.options.font.size; + this.from = undefined; // a node + + this.to = undefined; // a node + + this.edgeType = undefined; + this.connected = false; + this.labelModule = new Label(this.body, this.options, true + /* It's an edge label */ + ); + this.setOptions(options); + } + /** + * Set or overwrite options for the edge + * @param {Object} options an object with options + * @returns {null|boolean} null if no options, boolean if date changed + */ + + + createClass$1(Edge, [{ + key: "setOptions", + value: function setOptions(options) { + if (!options) { + return; + } // record old value of this.options.hidden + + + var oldHidden = this.options.hidden; + + if (oldHidden === undefined || oldHidden === null) { + oldHidden = false; + } + + Edge.parseOptions(this.options, options, true, this.globalOptions); + + if (options.id !== undefined) { + this.id = options.id; + } + + if (options.from !== undefined) { + this.fromId = options.from; + } + + if (options.to !== undefined) { + this.toId = options.to; + } + + if (options.title !== undefined) { + this.title = options.title; + } + + if (options.value !== undefined) { + options.value = parseFloat(options.value); + } + + var pile = [options, this.options, this.defaultOptions]; + this.chooser = ComponentUtil.choosify('edge', pile); // update label Module + + this.updateLabelModule(options); + var dataChanged = this.updateEdgeType(); // if anything has been updates, reset the selection width and the hover width + + this._setInteractionWidths(); // A node is connected when it has a from and to node that both exist in the network.body.nodes. + + + this.connect(); + var newHidden = this.options.hidden; + + if (newHidden === undefined || newHidden === null) { + newHidden = false; + } + + if (newHidden != oldHidden || options.physics !== undefined) { + dataChanged = true; + } // there might be a similar problem with physics, but a bug has not been reported + + + if (options.physics !== undefined) { + dataChanged = true; + } + + return dataChanged; + } + /** + * + * @param {Object} parentOptions + * @param {Object} newOptions + * @param {boolean} [allowDeletion=false] + * @param {Object} [globalOptions={}] + * @param {boolean} [copyFromGlobals=false] + */ + + }, { + key: "getFormattingValues", + + /** + * + * @returns {ArrowOptions} + */ + value: function getFormattingValues() { + var toArrow = this.options.arrows.to === true || this.options.arrows.to.enabled === true; + var fromArrow = this.options.arrows.from === true || this.options.arrows.from.enabled === true; + var middleArrow = this.options.arrows.middle === true || this.options.arrows.middle.enabled === true; + var inheritsColor = this.options.color.inherit; + var values = { + toArrow: toArrow, + toArrowScale: this.options.arrows.to.scaleFactor, + toArrowType: this.options.arrows.to.type, + middleArrow: middleArrow, + middleArrowScale: this.options.arrows.middle.scaleFactor, + middleArrowType: this.options.arrows.middle.type, + fromArrow: fromArrow, + fromArrowScale: this.options.arrows.from.scaleFactor, + fromArrowType: this.options.arrows.from.type, + arrowStrikethrough: this.options.arrowStrikethrough, + color: inheritsColor ? undefined : this.options.color.color, + inheritsColor: inheritsColor, + opacity: this.options.color.opacity, + hidden: this.options.hidden, + length: this.options.length, + shadow: this.options.shadow.enabled, + shadowColor: this.options.shadow.color, + shadowSize: this.options.shadow.size, + shadowX: this.options.shadow.x, + shadowY: this.options.shadow.y, + dashes: this.options.dashes, + width: this.options.width, + background: this.options.background.enabled, + backgroundColor: this.options.background.color, + backgroundSize: this.options.background.size, + backgroundDashes: this.options.background.dashes + }; + + if (this.selected || this.hover) { + if (this.chooser === true) { + if (this.selected) { + var selectedWidth = this.options.selectionWidth; + + if (typeof selectedWidth === 'function') { + values.width = selectedWidth(values.width); + } else if (typeof selectedWidth === 'number') { + values.width += selectedWidth; + } + + values.width = Math.max(values.width, 0.3 / this.body.view.scale); + values.color = this.options.color.highlight; + values.shadow = this.options.shadow.enabled; + } else if (this.hover) { + var hoverWidth = this.options.hoverWidth; + + if (typeof hoverWidth === 'function') { + values.width = hoverWidth(values.width); + } else if (typeof hoverWidth === 'number') { + values.width += hoverWidth; + } + + values.width = Math.max(values.width, 0.3 / this.body.view.scale); + values.color = this.options.color.hover; + values.shadow = this.options.shadow.enabled; + } + } else if (typeof this.chooser === 'function') { + this.chooser(values, this.options.id, this.selected, this.hover); + + if (values.color !== undefined) { + values.inheritsColor = false; + } + + if (values.shadow === false) { + if (values.shadowColor !== this.options.shadow.color || values.shadowSize !== this.options.shadow.size || values.shadowX !== this.options.shadow.x || values.shadowY !== this.options.shadow.y) { + values.shadow = true; + } + } + } + } else { + values.shadow = this.options.shadow.enabled; + values.width = Math.max(values.width, 0.3 / this.body.view.scale); + } + + return values; + } + /** + * update the options in the label module + * + * @param {Object} options + */ + + }, { + key: "updateLabelModule", + value: function updateLabelModule(options) { + var pile = [options, this.options, this.globalOptions, // Currently set global edge options + this.defaultOptions]; + this.labelModule.update(this.options, pile); + + if (this.labelModule.baseSize !== undefined) { + this.baseFontSize = this.labelModule.baseSize; + } + } + /** + * update the edge type, set the options + * @returns {boolean} + */ + + }, { + key: "updateEdgeType", + value: function updateEdgeType() { + var smooth = this.options.smooth; + var dataChanged = false; + var changeInType = true; + + if (this.edgeType !== undefined) { + if (this.edgeType instanceof BezierEdgeDynamic && smooth.enabled === true && smooth.type === 'dynamic' || this.edgeType instanceof CubicBezierEdge && smooth.enabled === true && smooth.type === 'cubicBezier' || this.edgeType instanceof BezierEdgeStatic && smooth.enabled === true && smooth.type !== 'dynamic' && smooth.type !== 'cubicBezier' || this.edgeType instanceof StraightEdge && smooth.type.enabled === false) { + changeInType = false; + } + + if (changeInType === true) { + dataChanged = this.cleanup(); + } + } + + if (changeInType === true) { + if (smooth.enabled === true) { + if (smooth.type === 'dynamic') { + dataChanged = true; + this.edgeType = new BezierEdgeDynamic(this.options, this.body, this.labelModule); + } else if (smooth.type === 'cubicBezier') { + this.edgeType = new CubicBezierEdge(this.options, this.body, this.labelModule); + } else { + this.edgeType = new BezierEdgeStatic(this.options, this.body, this.labelModule); + } + } else { + this.edgeType = new StraightEdge(this.options, this.body, this.labelModule); + } + } else { + // if nothing changes, we just set the options. + this.edgeType.setOptions(this.options); + } + + return dataChanged; + } + /** + * Connect an edge to its nodes + */ + + }, { + key: "connect", + value: function connect() { + this.disconnect(); + this.from = this.body.nodes[this.fromId] || undefined; + this.to = this.body.nodes[this.toId] || undefined; + this.connected = this.from !== undefined && this.to !== undefined; + + if (this.connected === true) { + this.from.attachEdge(this); + this.to.attachEdge(this); + } else { + if (this.from) { + this.from.detachEdge(this); + } + + if (this.to) { + this.to.detachEdge(this); + } + } + + this.edgeType.connect(); + } + /** + * Disconnect an edge from its nodes + */ + + }, { + key: "disconnect", + value: function disconnect() { + if (this.from) { + this.from.detachEdge(this); + this.from = undefined; + } + + if (this.to) { + this.to.detachEdge(this); + this.to = undefined; + } + + this.connected = false; + } + /** + * get the title of this edge. + * @return {string} title The title of the edge, or undefined when no title + * has been set. + */ + + }, { + key: "getTitle", + value: function getTitle() { + return this.title; + } + /** + * check if this node is selecte + * @return {boolean} selected True if node is selected, else false + */ + + }, { + key: "isSelected", + value: function isSelected() { + return this.selected; + } + /** + * Retrieve the value of the edge. Can be undefined + * @return {number} value + */ + + }, { + key: "getValue", + value: function getValue() { + return this.options.value; + } + /** + * Adjust the value range of the edge. The edge will adjust it's width + * based on its value. + * @param {number} min + * @param {number} max + * @param {number} total + */ + + }, { + key: "setValueRange", + value: function setValueRange(min, max, total) { + if (this.options.value !== undefined) { + var scale = this.options.scaling.customScalingFunction(min, max, total, this.options.value); + var widthDiff = this.options.scaling.max - this.options.scaling.min; + + if (this.options.scaling.label.enabled === true) { + var fontDiff = this.options.scaling.label.max - this.options.scaling.label.min; + this.options.font.size = this.options.scaling.label.min + scale * fontDiff; + } + + this.options.width = this.options.scaling.min + scale * widthDiff; + } else { + this.options.width = this.baseWidth; + this.options.font.size = this.baseFontSize; + } + + this._setInteractionWidths(); + + this.updateLabelModule(); + } + /** + * + * @private + */ + + }, { + key: "_setInteractionWidths", + value: function _setInteractionWidths() { + if (typeof this.options.hoverWidth === 'function') { + this.edgeType.hoverWidth = this.options.hoverWidth(this.options.width); + } else { + this.edgeType.hoverWidth = this.options.hoverWidth + this.options.width; + } + + if (typeof this.options.selectionWidth === 'function') { + this.edgeType.selectionWidth = this.options.selectionWidth(this.options.width); + } else { + this.edgeType.selectionWidth = this.options.selectionWidth + this.options.width; + } + } + /** + * Redraw a edge + * Draw this edge in the given canvas + * The 2d context of a HTML canvas can be retrieved by canvas.getContext("2d"); + * @param {CanvasRenderingContext2D} ctx + */ + + }, { + key: "draw", + value: function draw(ctx) { + var values = this.getFormattingValues(); + + if (values.hidden) { + return; + } // get the via node from the edge type + + + var viaNode = this.edgeType.getViaNode(); + var arrowData = {}; // restore edge targets to defaults + + this.edgeType.fromPoint = this.edgeType.from; + this.edgeType.toPoint = this.edgeType.to; // from and to arrows give a different end point for edges. we set them here + + if (values.fromArrow) { + arrowData.from = this.edgeType.getArrowData(ctx, 'from', viaNode, this.selected, this.hover, values); + if (values.arrowStrikethrough === false) this.edgeType.fromPoint = arrowData.from.core; + } + + if (values.toArrow) { + arrowData.to = this.edgeType.getArrowData(ctx, 'to', viaNode, this.selected, this.hover, values); + if (values.arrowStrikethrough === false) this.edgeType.toPoint = arrowData.to.core; + } // the middle arrow depends on the line, which can depend on the to and from arrows so we do this one lastly. + + + if (values.middleArrow) { + arrowData.middle = this.edgeType.getArrowData(ctx, 'middle', viaNode, this.selected, this.hover, values); + } // draw everything + + + this.edgeType.drawLine(ctx, values, this.selected, this.hover, viaNode); + this.drawArrows(ctx, arrowData, values); + this.drawLabel(ctx, viaNode); + } + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {Object} arrowData + * @param {ArrowOptions} values + */ + + }, { + key: "drawArrows", + value: function drawArrows(ctx, arrowData, values) { + if (values.fromArrow) { + this.edgeType.drawArrowHead(ctx, values, this.selected, this.hover, arrowData.from); + } + + if (values.middleArrow) { + this.edgeType.drawArrowHead(ctx, values, this.selected, this.hover, arrowData.middle); + } + + if (values.toArrow) { + this.edgeType.drawArrowHead(ctx, values, this.selected, this.hover, arrowData.to); + } + } + /** + * + * @param {CanvasRenderingContext2D} ctx + * @param {Node} viaNode + */ + + }, { + key: "drawLabel", + value: function drawLabel(ctx, viaNode) { + if (this.options.label !== undefined) { + // set style + var node1 = this.from; + var node2 = this.to; + + if (this.labelModule.differentState(this.selected, this.hover)) { + this.labelModule.getTextSize(ctx, this.selected, this.hover); + } + + if (node1.id != node2.id) { + this.labelModule.pointToSelf = false; + var point = this.edgeType.getPoint(0.5, viaNode); + ctx.save(); + + var rotationPoint = this._getRotation(ctx); + + if (rotationPoint.angle != 0) { + ctx.translate(rotationPoint.x, rotationPoint.y); + ctx.rotate(rotationPoint.angle); + } // draw the label + + + this.labelModule.draw(ctx, point.x, point.y, this.selected, this.hover); + /* + // Useful debug code: draw a border around the label + // This should **not** be enabled in production! + var size = this.labelModule.getSize();; // ;; intentional so lint catches it + ctx.strokeStyle = "#ff0000"; + ctx.strokeRect(size.left, size.top, size.width, size.height); + // End debug code + */ + + ctx.restore(); + } else { + // Ignore the orientations. + this.labelModule.pointToSelf = true; + var x, y; + var radius = this.options.selfReferenceSize; + + if (node1.shape.width > node1.shape.height) { + x = node1.x + node1.shape.width * 0.5; + y = node1.y - radius; + } else { + x = node1.x + radius; + y = node1.y - node1.shape.height * 0.5; + } + + point = this._pointOnCircle(x, y, radius, 0.125); + this.labelModule.draw(ctx, point.x, point.y, this.selected, this.hover); + } + } + } + /** + * Determine all visual elements of this edge instance, in which the given + * point falls within the bounding shape. + * + * @param {point} point + * @returns {Array.} list with the items which are on the point + */ + + }, { + key: "getItemsOnPoint", + value: function getItemsOnPoint(point) { + var ret = []; + + if (this.labelModule.visible()) { + var rotationPoint = this._getRotation(); + + if (ComponentUtil.pointInRect(this.labelModule.getSize(), point, rotationPoint)) { + ret.push({ + edgeId: this.id, + labelId: 0 + }); + } + } + + var obj = { + left: point.x, + top: point.y + }; + + if (this.isOverlappingWith(obj)) { + ret.push({ + edgeId: this.id + }); + } + + return ret; + } + /** + * Check if this object is overlapping with the provided object + * @param {Object} obj an object with parameters left, top + * @return {boolean} True if location is located on the edge + */ + + }, { + key: "isOverlappingWith", + value: function isOverlappingWith(obj) { + if (this.connected) { + var distMax = 10; + var xFrom = this.from.x; + var yFrom = this.from.y; + var xTo = this.to.x; + var yTo = this.to.y; + var xObj = obj.left; + var yObj = obj.top; + var dist = this.edgeType.getDistanceToEdge(xFrom, yFrom, xTo, yTo, xObj, yObj); + return dist < distMax; + } else { + return false; + } + } + /** + * Determine the rotation point, if any. + * + * @param {CanvasRenderingContext2D} [ctx] if passed, do a recalculation of the label size + * @returns {rotationPoint} the point to rotate around and the angle in radians to rotate + * @private + */ + + }, { + key: "_getRotation", + value: function _getRotation(ctx) { + var viaNode = this.edgeType.getViaNode(); + var point = this.edgeType.getPoint(0.5, viaNode); + + if (ctx !== undefined) { + this.labelModule.calculateLabelSize(ctx, this.selected, this.hover, point.x, point.y); + } + + var ret = { + x: point.x, + y: this.labelModule.size.yLine, + angle: 0 + }; + + if (!this.labelModule.visible()) { + return ret; // Don't even bother doing the atan2, there's nothing to draw + } + + if (this.options.font.align === "horizontal") { + return ret; // No need to calculate angle + } + + var dy = this.from.y - this.to.y; + var dx = this.from.x - this.to.x; + var angle = Math.atan2(dy, dx); // radians + // rotate so that label is readable + + if (angle < -1 && dx < 0 || angle > 0 && dx < 0) { + angle += Math.PI; + } + + ret.angle = angle; + return ret; + } + /** + * Get a point on a circle + * @param {number} x + * @param {number} y + * @param {number} radius + * @param {number} percentage Value between 0 (line start) and 1 (line end) + * @return {Object} point + * @private + */ + + }, { + key: "_pointOnCircle", + value: function _pointOnCircle(x, y, radius, percentage) { + var angle = percentage * 2 * Math.PI; + return { + x: x + radius * Math.cos(angle), + y: y - radius * Math.sin(angle) + }; + } + /** + * Sets selected state to true + */ + + }, { + key: "select", + value: function select() { + this.selected = true; + } + /** + * Sets selected state to false + */ + + }, { + key: "unselect", + value: function unselect() { + this.selected = false; + } + /** + * cleans all required things on delete + * @returns {*} + */ + + }, { + key: "cleanup", + value: function cleanup() { + return this.edgeType.cleanup(); + } + /** + * Remove edge from the list and perform necessary cleanup. + */ + + }, { + key: "remove", + value: function remove() { + this.cleanup(); + this.disconnect(); + delete this.body.edges[this.id]; + } + /** + * Check if both connecting nodes exist + * @returns {boolean} + */ + + }, { + key: "endPointsValid", + value: function endPointsValid() { + return this.body.nodes[this.fromId] !== undefined && this.body.nodes[this.toId] !== undefined; + } + }], [{ + key: "parseOptions", + value: function parseOptions(parentOptions, newOptions) { + var allowDeletion = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; + var globalOptions = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {}; + var copyFromGlobals = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false; + var fields = ['arrowStrikethrough', 'id', 'from', 'hidden', 'hoverWidth', 'labelHighlightBold', 'length', 'line', 'opacity', 'physics', 'scaling', 'selectionWidth', 'selfReferenceSize', 'to', 'title', 'value', 'width', 'font', 'chosen', 'widthConstraint']; // only deep extend the items in the field array. These do not have shorthand. + + util.selectiveDeepExtend(fields, parentOptions, newOptions, allowDeletion); // Only copy label if it's a legal value. + + if (ComponentUtil.isValidLabel(newOptions.label)) { + parentOptions.label = newOptions.label; + } else if (!ComponentUtil.isValidLabel(parentOptions.label)) { + parentOptions.label = undefined; + } + + util.mergeOptions(parentOptions, newOptions, 'smooth', globalOptions); + util.mergeOptions(parentOptions, newOptions, 'shadow', globalOptions); + util.mergeOptions(parentOptions, newOptions, 'background', globalOptions); + + if (newOptions.dashes !== undefined && newOptions.dashes !== null) { + parentOptions.dashes = newOptions.dashes; + } else if (allowDeletion === true && newOptions.dashes === null) { + parentOptions.dashes = Object.create(globalOptions.dashes); // this sets the pointer of the option back to the global option. + } // set the scaling newOptions + + + if (newOptions.scaling !== undefined && newOptions.scaling !== null) { + if (newOptions.scaling.min !== undefined) { + parentOptions.scaling.min = newOptions.scaling.min; + } + + if (newOptions.scaling.max !== undefined) { + parentOptions.scaling.max = newOptions.scaling.max; + } + + util.mergeOptions(parentOptions.scaling, newOptions.scaling, 'label', globalOptions.scaling); + } else if (allowDeletion === true && newOptions.scaling === null) { + parentOptions.scaling = Object.create(globalOptions.scaling); // this sets the pointer of the option back to the global option. + } // handle multiple input cases for arrows + + + if (newOptions.arrows !== undefined && newOptions.arrows !== null) { + if (typeof newOptions.arrows === 'string') { + var arrows = newOptions.arrows.toLowerCase(); + parentOptions.arrows.to.enabled = arrows.indexOf("to") != -1; + parentOptions.arrows.middle.enabled = arrows.indexOf("middle") != -1; + parentOptions.arrows.from.enabled = arrows.indexOf("from") != -1; + } else if (_typeof_1$1(newOptions.arrows) === 'object') { + util.mergeOptions(parentOptions.arrows, newOptions.arrows, 'to', globalOptions.arrows); + util.mergeOptions(parentOptions.arrows, newOptions.arrows, 'middle', globalOptions.arrows); + util.mergeOptions(parentOptions.arrows, newOptions.arrows, 'from', globalOptions.arrows); + } else { + throw new Error("The arrow newOptions can only be an object or a string. Refer to the documentation. You used:" + JSON.stringify(newOptions.arrows)); + } + } else if (allowDeletion === true && newOptions.arrows === null) { + parentOptions.arrows = Object.create(globalOptions.arrows); // this sets the pointer of the option back to the global option. + } // handle multiple input cases for color + + + if (newOptions.color !== undefined && newOptions.color !== null) { + var fromColor = newOptions.color; + var toColor = parentOptions.color; // If passed, fill in values from default options - required in the case of no prototype bridging + + if (copyFromGlobals) { + util.deepExtend(toColor, globalOptions.color, false, allowDeletion); + } else { + // Clear local properties - need to do it like this in order to retain prototype bridges + for (var i in toColor) { + if (toColor.hasOwnProperty(i)) { + delete toColor[i]; + } + } + } + + if (util.isString(toColor)) { + toColor.color = toColor; + toColor.highlight = toColor; + toColor.hover = toColor; + toColor.inherit = false; + + if (fromColor.opacity === undefined) { + toColor.opacity = 1.0; // set default + } + } else { + var colorsDefined = false; + + if (fromColor.color !== undefined) { + toColor.color = fromColor.color; + colorsDefined = true; + } + + if (fromColor.highlight !== undefined) { + toColor.highlight = fromColor.highlight; + colorsDefined = true; + } + + if (fromColor.hover !== undefined) { + toColor.hover = fromColor.hover; + colorsDefined = true; + } + + if (fromColor.inherit !== undefined) { + toColor.inherit = fromColor.inherit; + } + + if (fromColor.opacity !== undefined) { + toColor.opacity = Math.min(1, Math.max(0, fromColor.opacity)); + } + + if (colorsDefined === true) { + toColor.inherit = false; + } else { + if (toColor.inherit === undefined) { + toColor.inherit = 'from'; // Set default + } + } + } + } else if (allowDeletion === true && newOptions.color === null) { + parentOptions.color = util.bridgeObject(globalOptions.color); // set the object back to the global options + } + + if (allowDeletion === true && newOptions.font === null) { + parentOptions.font = util.bridgeObject(globalOptions.font); // set the object back to the global options + } + } + }]); + + return Edge; + }(); + + /** + * Handler for Edges + */ + + var EdgesHandler = + /*#__PURE__*/ + function () { + /** + * @param {Object} body + * @param {Array.} images + * @param {Array.} groups + */ + function EdgesHandler(body, images, groups) { + var _this = this; + + classCallCheck$1(this, EdgesHandler); + + this.body = body; + this.images = images; + this.groups = groups; // create the edge API in the body container + + this.body.functions.createEdge = this.create.bind(this); + this.edgesListeners = { + add: function add(event, params) { + _this.add(params.items); + }, + update: function update(event, params) { + _this.update(params.items); + }, + remove: function remove(event, params) { + _this.remove(params.items); + } + }; + this.options = {}; + this.defaultOptions = { + arrows: { + to: { + enabled: false, + scaleFactor: 1, + type: 'arrow' + }, + // boolean / {arrowScaleFactor:1} / {enabled: false, arrowScaleFactor:1} + middle: { + enabled: false, + scaleFactor: 1, + type: 'arrow' + }, + from: { + enabled: false, + scaleFactor: 1, + type: 'arrow' + } + }, + arrowStrikethrough: true, + color: { + color: '#848484', + highlight: '#848484', + hover: '#848484', + inherit: 'from', + opacity: 1.0 + }, + dashes: false, + font: { + color: '#343434', + size: 14, + // px + face: 'arial', + background: 'none', + strokeWidth: 2, + // px + strokeColor: '#ffffff', + align: 'horizontal', + multi: false, + vadjust: 0, + bold: { + mod: 'bold' + }, + boldital: { + mod: 'bold italic' + }, + ital: { + mod: 'italic' + }, + mono: { + mod: '', + size: 15, + // px + face: 'courier new', + vadjust: 2 + } + }, + hidden: false, + hoverWidth: 1.5, + label: undefined, + labelHighlightBold: true, + length: undefined, + physics: true, + scaling: { + min: 1, + max: 15, + label: { + enabled: true, + min: 14, + max: 30, + maxVisible: 30, + drawThreshold: 5 + }, + customScalingFunction: function customScalingFunction(min, max, total, value) { + if (max === min) { + return 0.5; + } else { + var scale = 1 / (max - min); + return Math.max(0, (value - min) * scale); + } + } + }, + selectionWidth: 1.5, + selfReferenceSize: 20, + shadow: { + enabled: false, + color: 'rgba(0,0,0,0.5)', + size: 10, + x: 5, + y: 5 + }, + background: { + enabled: false, + color: 'rgba(111,111,111,1)', + size: 10, + dashes: false + }, + smooth: { + enabled: true, + type: "dynamic", + forceDirection: 'none', + roundness: 0.5 + }, + title: undefined, + width: 1, + value: undefined + }; + util.deepExtend(this.options, this.defaultOptions); + this.bindEventListeners(); + } + /** + * Binds event listeners + */ + + + createClass$1(EdgesHandler, [{ + key: "bindEventListeners", + value: function bindEventListeners() { + var _this2 = this; + + // this allows external modules to force all dynamic curves to turn static. + this.body.emitter.on("_forceDisableDynamicCurves", function (type) { + var emit = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; + + if (type === 'dynamic') { + type = 'continuous'; + } + + var dataChanged = false; + + for (var edgeId in _this2.body.edges) { + if (_this2.body.edges.hasOwnProperty(edgeId)) { + var edge = _this2.body.edges[edgeId]; + var edgeData = _this2.body.data.edges._data[edgeId]; // only forcibly remove the smooth curve if the data has been set of the edge has the smooth curves defined. + // this is because a change in the global would not affect these curves. + + if (edgeData !== undefined) { + var smoothOptions = edgeData.smooth; + + if (smoothOptions !== undefined) { + if (smoothOptions.enabled === true && smoothOptions.type === 'dynamic') { + if (type === undefined) { + edge.setOptions({ + smooth: false + }); + } else { + edge.setOptions({ + smooth: { + type: type + } + }); + } + + dataChanged = true; + } + } + } + } + } + + if (emit === true && dataChanged === true) { + _this2.body.emitter.emit("_dataChanged"); + } + }); // this is called when options of EXISTING nodes or edges have changed. + // + // NOTE: Not true, called when options have NOT changed, for both existing as well as new nodes. + // See update() for logic. + // TODO: Verify and examine the consequences of this. It might still trigger when + // non-option fields have changed, but then reconnecting edges is still useless. + // Alternatively, it might also be called when edges are removed. + // + + this.body.emitter.on("_dataUpdated", function () { + _this2.reconnectEdges(); + }); // refresh the edges. Used when reverting from hierarchical layout + + this.body.emitter.on("refreshEdges", this.refresh.bind(this)); + this.body.emitter.on("refresh", this.refresh.bind(this)); + this.body.emitter.on("destroy", function () { + util.forEach(_this2.edgesListeners, function (callback, event) { + if (_this2.body.data.edges) _this2.body.data.edges.off(event, callback); + }); + delete _this2.body.functions.createEdge; + delete _this2.edgesListeners.add; + delete _this2.edgesListeners.update; + delete _this2.edgesListeners.remove; + delete _this2.edgesListeners; + }); + } + /** + * + * @param {Object} options + */ + + }, { + key: "setOptions", + value: function setOptions(options) { + if (options !== undefined) { + // use the parser from the Edge class to fill in all shorthand notations + Edge.parseOptions(this.options, options, true, this.defaultOptions, true); // update smooth settings in all edges + + var dataChanged = false; + + if (options.smooth !== undefined) { + for (var edgeId in this.body.edges) { + if (this.body.edges.hasOwnProperty(edgeId)) { + dataChanged = this.body.edges[edgeId].updateEdgeType() || dataChanged; + } + } + } // update fonts in all edges + + + if (options.font !== undefined) { + for (var _edgeId in this.body.edges) { + if (this.body.edges.hasOwnProperty(_edgeId)) { + this.body.edges[_edgeId].updateLabelModule(); + } + } + } // update the state of the variables if needed + + + if (options.hidden !== undefined || options.physics !== undefined || dataChanged === true) { + this.body.emitter.emit('_dataChanged'); + } + } + } + /** + * Load edges by reading the data table + * @param {Array | DataSet | DataView} edges The data containing the edges. + * @param {boolean} [doNotEmit=false] + * @private + */ + + }, { + key: "setData", + value: function setData(edges) { + var _this3 = this; + + var doNotEmit = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; + var oldEdgesData = this.body.data.edges; + + if (edges instanceof DataSet || edges instanceof DataView) { + this.body.data.edges = edges; + } else if (Array.isArray(edges)) { + this.body.data.edges = new DataSet(); + this.body.data.edges.add(edges); + } else if (!edges) { + this.body.data.edges = new DataSet(); + } else { + throw new TypeError('Array or DataSet expected'); + } // TODO: is this null or undefined or false? + + + if (oldEdgesData) { + // unsubscribe from old dataset + util.forEach(this.edgesListeners, function (callback, event) { + oldEdgesData.off(event, callback); + }); + } // remove drawn edges + + + this.body.edges = {}; // TODO: is this null or undefined or false? + + if (this.body.data.edges) { + // subscribe to new dataset + util.forEach(this.edgesListeners, function (callback, event) { + _this3.body.data.edges.on(event, callback); + }); // draw all new nodes + + var ids = this.body.data.edges.getIds(); + this.add(ids, true); + } + + this.body.emitter.emit('_adjustEdgesForHierarchicalLayout'); + + if (doNotEmit === false) { + this.body.emitter.emit("_dataChanged"); + } + } + /** + * Add edges + * @param {number[] | string[]} ids + * @param {boolean} [doNotEmit=false] + * @private + */ + + }, { + key: "add", + value: function add(ids) { + var doNotEmit = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; + var edges = this.body.edges; + var edgesData = this.body.data.edges; + + for (var i = 0; i < ids.length; i++) { + var id = ids[i]; + var oldEdge = edges[id]; + + if (oldEdge) { + oldEdge.disconnect(); + } + + var data = edgesData.get(id, { + "showInternalIds": true + }); + edges[id] = this.create(data); + } + + this.body.emitter.emit('_adjustEdgesForHierarchicalLayout'); + + if (doNotEmit === false) { + this.body.emitter.emit("_dataChanged"); + } + } + /** + * Update existing edges, or create them when not yet existing + * @param {number[] | string[]} ids + * @private + */ + + }, { + key: "update", + value: function update(ids) { + var edges = this.body.edges; + var edgesData = this.body.data.edges; + var dataChanged = false; + + for (var i = 0; i < ids.length; i++) { + var id = ids[i]; + var data = edgesData.get(id); + var edge = edges[id]; + + if (edge !== undefined) { + // update edge + edge.disconnect(); + dataChanged = edge.setOptions(data) || dataChanged; // if a support node is added, data can be changed. + + edge.connect(); + } else { + // create edge + this.body.edges[id] = this.create(data); + dataChanged = true; + } + } + + if (dataChanged === true) { + this.body.emitter.emit('_adjustEdgesForHierarchicalLayout'); + this.body.emitter.emit("_dataChanged"); + } else { + this.body.emitter.emit("_dataUpdated"); + } + } + /** + * Remove existing edges. Non existing ids will be ignored + * @param {number[] | string[]} ids + * @param {boolean} [emit=true] + * @private + */ + + }, { + key: "remove", + value: function remove(ids) { + var emit = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; + if (ids.length === 0) return; // early out + + var edges = this.body.edges; + util.forEach(ids, function (id) { + var edge = edges[id]; + + if (edge !== undefined) { + edge.remove(); + } + }); + + if (emit) { + this.body.emitter.emit("_dataChanged"); + } + } + /** + * Refreshes Edge Handler + */ + + }, { + key: "refresh", + value: function refresh() { + var _this4 = this; + + util.forEach(this.body.edges, function (edge, edgeId) { + var data = _this4.body.data.edges._data[edgeId]; + + if (data !== undefined) { + edge.setOptions(data); + } + }); + } + /** + * + * @param {Object} properties + * @returns {Edge} + */ + + }, { + key: "create", + value: function create(properties) { + return new Edge(properties, this.body, this.options, this.defaultOptions); + } + /** + * Reconnect all edges + * @private + */ + + }, { + key: "reconnectEdges", + value: function reconnectEdges() { + var id; + var nodes = this.body.nodes; + var edges = this.body.edges; + + for (id in nodes) { + if (nodes.hasOwnProperty(id)) { + nodes[id].edges = []; + } + } + + for (id in edges) { + if (edges.hasOwnProperty(id)) { + var edge = edges[id]; + edge.from = null; + edge.to = null; + edge.connect(); + } + } + } + /** + * + * @param {Edge.id} edgeId + * @returns {Array} + */ + + }, { + key: "getConnectedNodes", + value: function getConnectedNodes(edgeId) { + var nodeList = []; + + if (this.body.edges[edgeId] !== undefined) { + var edge = this.body.edges[edgeId]; + + if (edge.fromId !== undefined) { + nodeList.push(edge.fromId); + } + + if (edge.toId !== undefined) { + nodeList.push(edge.toId); + } + } + + return nodeList; + } + /** + * There is no direct relation between the nodes and the edges DataSet, + * so the right place to do call this is in the handler for event `_dataUpdated`. + */ + + }, { + key: "_updateState", + value: function _updateState() { + this._addMissingEdges(); + + this._removeInvalidEdges(); + } + /** + * Scan for missing nodes and remove corresponding edges, if any. + * @private + */ + + }, { + key: "_removeInvalidEdges", + value: function _removeInvalidEdges() { + var _this5 = this; + + var edgesToDelete = []; + util.forEach(this.body.edges, function (edge, id) { + var toNode = _this5.body.nodes[edge.toId]; + var fromNode = _this5.body.nodes[edge.fromId]; // Skip clustering edges here, let the Clustering module handle those + + if (toNode !== undefined && toNode.isCluster === true || fromNode !== undefined && fromNode.isCluster === true) { + return; + } + + if (toNode === undefined || fromNode === undefined) { + edgesToDelete.push(id); + } + }); + this.remove(edgesToDelete, false); + } + /** + * add all edges from dataset that are not in the cached state + * @private + */ + + }, { + key: "_addMissingEdges", + value: function _addMissingEdges() { + var edgesData = this.body.data.edges; + + if (edgesData === undefined || edgesData === null) { + return; // No edges DataSet yet; can happen on startup + } + + var edges = this.body.edges; + var addIds = []; + edgesData.forEach(function (edgeData, edgeId) { + var edge = edges[edgeId]; + + if (edge === undefined) { + addIds.push(edgeId); + } + }); + this.add(addIds, true); + } + }]); + + return EdgesHandler; + }(); + + /** + * Barnes Hut Solver + */ + var BarnesHutSolver = + /*#__PURE__*/ + function () { + /** + * @param {Object} body + * @param {{physicsNodeIndices: Array, physicsEdgeIndices: Array, forces: {}, velocities: {}}} physicsBody + * @param {Object} options + */ + function BarnesHutSolver(body, physicsBody, options) { + classCallCheck$1(this, BarnesHutSolver); + + this.body = body; + this.physicsBody = physicsBody; + this.barnesHutTree; + this.setOptions(options); + this.randomSeed = 5; // debug: show grid + // this.body.emitter.on("afterDrawing", (ctx) => {this._debug(ctx,'#ff0000')}) + } + /** + * + * @param {Object} options + */ + + + createClass$1(BarnesHutSolver, [{ + key: "setOptions", + value: function setOptions(options) { + this.options = options; + this.thetaInversed = 1 / this.options.theta; // if 1 then min distance = 0.5, if 0.5 then min distance = 0.5 + 0.5*node.shape.radius + + this.overlapAvoidanceFactor = 1 - Math.max(0, Math.min(1, this.options.avoidOverlap)); + } + /** + * + * @returns {number} random integer + */ + + }, { + key: "seededRandom", + value: function seededRandom() { + var x = Math.sin(this.randomSeed++) * 10000; + return x - Math.floor(x); + } + /** + * This function calculates the forces the nodes apply on each other based on a gravitational model. + * The Barnes Hut method is used to speed up this N-body simulation. + * + * @private + */ + + }, { + key: "solve", + value: function solve() { + if (this.options.gravitationalConstant !== 0 && this.physicsBody.physicsNodeIndices.length > 0) { + var node; + var nodes = this.body.nodes; + var nodeIndices = this.physicsBody.physicsNodeIndices; + var nodeCount = nodeIndices.length; // create the tree + + var barnesHutTree = this._formBarnesHutTree(nodes, nodeIndices); // for debugging + + + this.barnesHutTree = barnesHutTree; // place the nodes one by one recursively + + for (var i = 0; i < nodeCount; i++) { + node = nodes[nodeIndices[i]]; + + if (node.options.mass > 0) { + // starting with root is irrelevant, it never passes the BarnesHutSolver condition + this._getForceContributions(barnesHutTree.root, node); + } + } + } + } + /** + * @param {Object} parentBranch + * @param {Node} node + * @private + */ + + }, { + key: "_getForceContributions", + value: function _getForceContributions(parentBranch, node) { + this._getForceContribution(parentBranch.children.NW, node); + + this._getForceContribution(parentBranch.children.NE, node); + + this._getForceContribution(parentBranch.children.SW, node); + + this._getForceContribution(parentBranch.children.SE, node); + } + /** + * This function traverses the barnesHutTree. It checks when it can approximate distant nodes with their center of mass. + * If a region contains a single node, we check if it is not itself, then we apply the force. + * + * @param {Object} parentBranch + * @param {Node} node + * @private + */ + + }, { + key: "_getForceContribution", + value: function _getForceContribution(parentBranch, node) { + // we get no force contribution from an empty region + if (parentBranch.childrenCount > 0) { + var dx, dy, distance; // get the distance from the center of mass to the node. + + dx = parentBranch.centerOfMass.x - node.x; + dy = parentBranch.centerOfMass.y - node.y; + distance = Math.sqrt(dx * dx + dy * dy); // BarnesHutSolver condition + // original condition : s/d < theta = passed === d/s > 1/theta = passed + // calcSize = 1/s --> d * 1/s > 1/theta = passed + + if (distance * parentBranch.calcSize > this.thetaInversed) { + this._calculateForces(distance, dx, dy, node, parentBranch); + } else { + // Did not pass the condition, go into children if available + if (parentBranch.childrenCount === 4) { + this._getForceContributions(parentBranch, node); + } else { + // parentBranch must have only one node, if it was empty we wouldnt be here + if (parentBranch.children.data.id != node.id) { + // if it is not self + this._calculateForces(distance, dx, dy, node, parentBranch); + } + } + } + } + } + /** + * Calculate the forces based on the distance. + * + * @param {number} distance + * @param {number} dx + * @param {number} dy + * @param {Node} node + * @param {Object} parentBranch + * @private + */ + + }, { + key: "_calculateForces", + value: function _calculateForces(distance, dx, dy, node, parentBranch) { + if (distance === 0) { + distance = 0.1; + dx = distance; + } + + if (this.overlapAvoidanceFactor < 1 && node.shape.radius) { + distance = Math.max(0.1 + this.overlapAvoidanceFactor * node.shape.radius, distance - node.shape.radius); + } // the dividing by the distance cubed instead of squared allows us to get the fx and fy components without sines and cosines + // it is shorthand for gravityforce with distance squared and fx = dx/distance * gravityForce + + + var gravityForce = this.options.gravitationalConstant * parentBranch.mass * node.options.mass / Math.pow(distance, 3); + var fx = dx * gravityForce; + var fy = dy * gravityForce; + this.physicsBody.forces[node.id].x += fx; + this.physicsBody.forces[node.id].y += fy; + } + /** + * This function constructs the barnesHut tree recursively. It creates the root, splits it and starts placing the nodes. + * + * @param {Array.} nodes + * @param {Array.} nodeIndices + * @returns {{root: {centerOfMass: {x: number, y: number}, mass: number, range: {minX: number, maxX: number, minY: number, maxY: number}, size: number, calcSize: number, children: {data: null}, maxWidth: number, level: number, childrenCount: number}}} BarnesHutTree + * @private + */ + + }, { + key: "_formBarnesHutTree", + value: function _formBarnesHutTree(nodes, nodeIndices) { + var node; + var nodeCount = nodeIndices.length; + var minX = nodes[nodeIndices[0]].x; + var minY = nodes[nodeIndices[0]].y; + var maxX = nodes[nodeIndices[0]].x; + var maxY = nodes[nodeIndices[0]].y; // get the range of the nodes + + for (var i = 1; i < nodeCount; i++) { + var _node = nodes[nodeIndices[i]]; + var x = _node.x; + var y = _node.y; + + if (_node.options.mass > 0) { + if (x < minX) { + minX = x; + } + + if (x > maxX) { + maxX = x; + } + + if (y < minY) { + minY = y; + } + + if (y > maxY) { + maxY = y; + } + } + } // make the range a square + + + var sizeDiff = Math.abs(maxX - minX) - Math.abs(maxY - minY); // difference between X and Y + + if (sizeDiff > 0) { + minY -= 0.5 * sizeDiff; + maxY += 0.5 * sizeDiff; + } // xSize > ySize + else { + minX += 0.5 * sizeDiff; + maxX -= 0.5 * sizeDiff; + } // xSize < ySize + + + var minimumTreeSize = 1e-5; + var rootSize = Math.max(minimumTreeSize, Math.abs(maxX - minX)); + var halfRootSize = 0.5 * rootSize; + var centerX = 0.5 * (minX + maxX), + centerY = 0.5 * (minY + maxY); // construct the barnesHutTree + + var barnesHutTree = { + root: { + centerOfMass: { + x: 0, + y: 0 + }, + mass: 0, + range: { + minX: centerX - halfRootSize, + maxX: centerX + halfRootSize, + minY: centerY - halfRootSize, + maxY: centerY + halfRootSize + }, + size: rootSize, + calcSize: 1 / rootSize, + children: { + data: null + }, + maxWidth: 0, + level: 0, + childrenCount: 4 + } + }; + + this._splitBranch(barnesHutTree.root); // place the nodes one by one recursively + + + for (var _i = 0; _i < nodeCount; _i++) { + node = nodes[nodeIndices[_i]]; + + if (node.options.mass > 0) { + this._placeInTree(barnesHutTree.root, node); + } + } // make global + + + return barnesHutTree; + } + /** + * this updates the mass of a branch. this is increased by adding a node. + * + * @param {Object} parentBranch + * @param {Node} node + * @private + */ + + }, { + key: "_updateBranchMass", + value: function _updateBranchMass(parentBranch, node) { + var centerOfMass = parentBranch.centerOfMass; + var totalMass = parentBranch.mass + node.options.mass; + var totalMassInv = 1 / totalMass; + centerOfMass.x = centerOfMass.x * parentBranch.mass + node.x * node.options.mass; + centerOfMass.x *= totalMassInv; + centerOfMass.y = centerOfMass.y * parentBranch.mass + node.y * node.options.mass; + centerOfMass.y *= totalMassInv; + parentBranch.mass = totalMass; + var biggestSize = Math.max(Math.max(node.height, node.radius), node.width); + parentBranch.maxWidth = parentBranch.maxWidth < biggestSize ? biggestSize : parentBranch.maxWidth; + } + /** + * determine in which branch the node will be placed. + * + * @param {Object} parentBranch + * @param {Node} node + * @param {boolean} skipMassUpdate + * @private + */ + + }, { + key: "_placeInTree", + value: function _placeInTree(parentBranch, node, skipMassUpdate) { + if (skipMassUpdate != true || skipMassUpdate === undefined) { + // update the mass of the branch. + this._updateBranchMass(parentBranch, node); + } + + var range = parentBranch.children.NW.range; + var region; + + if (range.maxX > node.x) { + // in NW or SW + if (range.maxY > node.y) { + region = "NW"; + } else { + region = "SW"; + } + } else { + // in NE or SE + if (range.maxY > node.y) { + region = "NE"; + } else { + region = "SE"; + } + } + + this._placeInRegion(parentBranch, node, region); + } + /** + * actually place the node in a region (or branch) + * + * @param {Object} parentBranch + * @param {Node} node + * @param {'NW'| 'NE' | 'SW' | 'SE'} region + * @private + */ + + }, { + key: "_placeInRegion", + value: function _placeInRegion(parentBranch, node, region) { + var children = parentBranch.children[region]; + + switch (children.childrenCount) { + case 0: + // place node here + children.children.data = node; + children.childrenCount = 1; + + this._updateBranchMass(children, node); + + break; + + case 1: + // convert into children + // if there are two nodes exactly overlapping (on init, on opening of cluster etc.) + // we move one node a little bit and we do not put it in the tree. + if (children.children.data.x === node.x && children.children.data.y === node.y) { + node.x += this.seededRandom(); + node.y += this.seededRandom(); + } else { + this._splitBranch(children); + + this._placeInTree(children, node); + } + + break; + + case 4: + // place in branch + this._placeInTree(children, node); + + break; + } + } + /** + * this function splits a branch into 4 sub branches. If the branch contained a node, we place it in the subbranch + * after the split is complete. + * + * @param {Object} parentBranch + * @private + */ + + }, { + key: "_splitBranch", + value: function _splitBranch(parentBranch) { + // if the branch is shaded with a node, replace the node in the new subset. + var containedNode = null; + + if (parentBranch.childrenCount === 1) { + containedNode = parentBranch.children.data; + parentBranch.mass = 0; + parentBranch.centerOfMass.x = 0; + parentBranch.centerOfMass.y = 0; + } + + parentBranch.childrenCount = 4; + parentBranch.children.data = null; + + this._insertRegion(parentBranch, "NW"); + + this._insertRegion(parentBranch, "NE"); + + this._insertRegion(parentBranch, "SW"); + + this._insertRegion(parentBranch, "SE"); + + if (containedNode != null) { + this._placeInTree(parentBranch, containedNode); + } + } + /** + * This function subdivides the region into four new segments. + * Specifically, this inserts a single new segment. + * It fills the children section of the parentBranch + * + * @param {Object} parentBranch + * @param {'NW'| 'NE' | 'SW' | 'SE'} region + * @private + */ + + }, { + key: "_insertRegion", + value: function _insertRegion(parentBranch, region) { + var minX, maxX, minY, maxY; + var childSize = 0.5 * parentBranch.size; + + switch (region) { + case "NW": + minX = parentBranch.range.minX; + maxX = parentBranch.range.minX + childSize; + minY = parentBranch.range.minY; + maxY = parentBranch.range.minY + childSize; + break; + + case "NE": + minX = parentBranch.range.minX + childSize; + maxX = parentBranch.range.maxX; + minY = parentBranch.range.minY; + maxY = parentBranch.range.minY + childSize; + break; + + case "SW": + minX = parentBranch.range.minX; + maxX = parentBranch.range.minX + childSize; + minY = parentBranch.range.minY + childSize; + maxY = parentBranch.range.maxY; + break; + + case "SE": + minX = parentBranch.range.minX + childSize; + maxX = parentBranch.range.maxX; + minY = parentBranch.range.minY + childSize; + maxY = parentBranch.range.maxY; + break; + } + + parentBranch.children[region] = { + centerOfMass: { + x: 0, + y: 0 + }, + mass: 0, + range: { + minX: minX, + maxX: maxX, + minY: minY, + maxY: maxY + }, + size: 0.5 * parentBranch.size, + calcSize: 2 * parentBranch.calcSize, + children: { + data: null + }, + maxWidth: 0, + level: parentBranch.level + 1, + childrenCount: 0 + }; + } //--------------------------- DEBUGGING BELOW ---------------------------// + + /** + * This function is for debugging purposed, it draws the tree. + * + * @param {CanvasRenderingContext2D} ctx + * @param {string} color + * @private + */ + + }, { + key: "_debug", + value: function _debug(ctx, color) { + if (this.barnesHutTree !== undefined) { + ctx.lineWidth = 1; + + this._drawBranch(this.barnesHutTree.root, ctx, color); + } + } + /** + * This function is for debugging purposes. It draws the branches recursively. + * + * @param {Object} branch + * @param {CanvasRenderingContext2D} ctx + * @param {string} color + * @private + */ + + }, { + key: "_drawBranch", + value: function _drawBranch(branch, ctx, color) { + if (color === undefined) { + color = "#FF0000"; + } + + if (branch.childrenCount === 4) { + this._drawBranch(branch.children.NW, ctx); + + this._drawBranch(branch.children.NE, ctx); + + this._drawBranch(branch.children.SE, ctx); + + this._drawBranch(branch.children.SW, ctx); + } + + ctx.strokeStyle = color; + ctx.beginPath(); + ctx.moveTo(branch.range.minX, branch.range.minY); + ctx.lineTo(branch.range.maxX, branch.range.minY); + ctx.stroke(); + ctx.beginPath(); + ctx.moveTo(branch.range.maxX, branch.range.minY); + ctx.lineTo(branch.range.maxX, branch.range.maxY); + ctx.stroke(); + ctx.beginPath(); + ctx.moveTo(branch.range.maxX, branch.range.maxY); + ctx.lineTo(branch.range.minX, branch.range.maxY); + ctx.stroke(); + ctx.beginPath(); + ctx.moveTo(branch.range.minX, branch.range.maxY); + ctx.lineTo(branch.range.minX, branch.range.minY); + ctx.stroke(); + /* + if (branch.mass > 0) { + ctx.circle(branch.centerOfMass.x, branch.centerOfMass.y, 3*branch.mass); + ctx.stroke(); + } + */ + } + }]); + + return BarnesHutSolver; + }(); + + /** + * Repulsion Solver + */ + var RepulsionSolver = + /*#__PURE__*/ + function () { + /** + * @param {Object} body + * @param {{physicsNodeIndices: Array, physicsEdgeIndices: Array, forces: {}, velocities: {}}} physicsBody + * @param {Object} options + */ + function RepulsionSolver(body, physicsBody, options) { + classCallCheck$1(this, RepulsionSolver); + + this.body = body; + this.physicsBody = physicsBody; + this.setOptions(options); + } + /** + * + * @param {Object} options + */ + + + createClass$1(RepulsionSolver, [{ + key: "setOptions", + value: function setOptions(options) { + this.options = options; + } + /** + * Calculate the forces the nodes apply on each other based on a repulsion field. + * This field is linearly approximated. + * + * @private + */ + + }, { + key: "solve", + value: function solve() { + var dx, dy, distance, fx, fy, repulsingForce, node1, node2; + var nodes = this.body.nodes; + var nodeIndices = this.physicsBody.physicsNodeIndices; + var forces = this.physicsBody.forces; // repulsing forces between nodes + + var nodeDistance = this.options.nodeDistance; // approximation constants + + var a = -2 / 3 / nodeDistance; + var b = 4 / 3; // we loop from i over all but the last entree in the array + // j loops from i+1 to the last. This way we do not double count any of the indices, nor i === j + + for (var i = 0; i < nodeIndices.length - 1; i++) { + node1 = nodes[nodeIndices[i]]; + + for (var j = i + 1; j < nodeIndices.length; j++) { + node2 = nodes[nodeIndices[j]]; + dx = node2.x - node1.x; + dy = node2.y - node1.y; + distance = Math.sqrt(dx * dx + dy * dy); // same condition as BarnesHutSolver, making sure nodes are never 100% overlapping. + + if (distance === 0) { + distance = 0.1 * Math.random(); + dx = distance; + } + + if (distance < 2 * nodeDistance) { + if (distance < 0.5 * nodeDistance) { + repulsingForce = 1.0; + } else { + repulsingForce = a * distance + b; // linear approx of 1 / (1 + Math.exp((distance / nodeDistance - 1) * steepness)) + } + + repulsingForce = repulsingForce / distance; + fx = dx * repulsingForce; + fy = dy * repulsingForce; + forces[node1.id].x -= fx; + forces[node1.id].y -= fy; + forces[node2.id].x += fx; + forces[node2.id].y += fy; + } + } + } + } + }]); + + return RepulsionSolver; + }(); + + /** + * Hierarchical Repulsion Solver + */ + var HierarchicalRepulsionSolver = + /*#__PURE__*/ + function () { + /** + * @param {Object} body + * @param {{physicsNodeIndices: Array, physicsEdgeIndices: Array, forces: {}, velocities: {}}} physicsBody + * @param {Object} options + */ + function HierarchicalRepulsionSolver(body, physicsBody, options) { + classCallCheck$1(this, HierarchicalRepulsionSolver); + + this.body = body; + this.physicsBody = physicsBody; + this.setOptions(options); + } + /** + * + * @param {Object} options + */ + + + createClass$1(HierarchicalRepulsionSolver, [{ + key: "setOptions", + value: function setOptions(options) { + this.options = options; + } + /** + * Calculate the forces the nodes apply on each other based on a repulsion field. + * This field is linearly approximated. + * + * @private + */ + + }, { + key: "solve", + value: function solve() { + var dx, dy, distance, fx, fy, repulsingForce, node1, node2, i, j; + var nodes = this.body.nodes; + var nodeIndices = this.physicsBody.physicsNodeIndices; + var forces = this.physicsBody.forces; // repulsing forces between nodes + + var nodeDistance = this.options.nodeDistance; // we loop from i over all but the last entree in the array + // j loops from i+1 to the last. This way we do not double count any of the indices, nor i === j + + for (i = 0; i < nodeIndices.length - 1; i++) { + node1 = nodes[nodeIndices[i]]; + + for (j = i + 1; j < nodeIndices.length; j++) { + node2 = nodes[nodeIndices[j]]; // nodes only affect nodes on their level + + if (node1.level === node2.level) { + dx = node2.x - node1.x; + dy = node2.y - node1.y; + distance = Math.sqrt(dx * dx + dy * dy); + var steepness = 0.05; + + if (distance < nodeDistance) { + repulsingForce = -Math.pow(steepness * distance, 2) + Math.pow(steepness * nodeDistance, 2); + } else { + repulsingForce = 0; + } // normalize force with + + + if (distance === 0) { + distance = 0.01; + } else { + repulsingForce = repulsingForce / distance; + } + + fx = dx * repulsingForce; + fy = dy * repulsingForce; + forces[node1.id].x -= fx; + forces[node1.id].y -= fy; + forces[node2.id].x += fx; + forces[node2.id].y += fy; + } + } + } + } + }]); + + return HierarchicalRepulsionSolver; + }(); + + /** + * Spring Solver + */ + var SpringSolver = + /*#__PURE__*/ + function () { + /** + * @param {Object} body + * @param {{physicsNodeIndices: Array, physicsEdgeIndices: Array, forces: {}, velocities: {}}} physicsBody + * @param {Object} options + */ + function SpringSolver(body, physicsBody, options) { + classCallCheck$1(this, SpringSolver); + + this.body = body; + this.physicsBody = physicsBody; + this.setOptions(options); + } + /** + * + * @param {Object} options + */ + + + createClass$1(SpringSolver, [{ + key: "setOptions", + value: function setOptions(options) { + this.options = options; + } + /** + * This function calculates the springforces on the nodes, accounting for the support nodes. + * + * @private + */ + + }, { + key: "solve", + value: function solve() { + var edgeLength, edge; + var edgeIndices = this.physicsBody.physicsEdgeIndices; + var edges = this.body.edges; + var node1, node2, node3; // forces caused by the edges, modelled as springs + + for (var i = 0; i < edgeIndices.length; i++) { + edge = edges[edgeIndices[i]]; + + if (edge.connected === true && edge.toId !== edge.fromId) { + // only calculate forces if nodes are in the same sector + if (this.body.nodes[edge.toId] !== undefined && this.body.nodes[edge.fromId] !== undefined) { + if (edge.edgeType.via !== undefined) { + edgeLength = edge.options.length === undefined ? this.options.springLength : edge.options.length; + node1 = edge.to; + node2 = edge.edgeType.via; + node3 = edge.from; + + this._calculateSpringForce(node1, node2, 0.5 * edgeLength); + + this._calculateSpringForce(node2, node3, 0.5 * edgeLength); + } else { + // the * 1.5 is here so the edge looks as large as a smooth edge. It does not initially because the smooth edges use + // the support nodes which exert a repulsive force on the to and from nodes, making the edge appear larger. + edgeLength = edge.options.length === undefined ? this.options.springLength * 1.5 : edge.options.length; + + this._calculateSpringForce(edge.from, edge.to, edgeLength); + } + } + } + } + } + /** + * This is the code actually performing the calculation for the function above. + * + * @param {Node} node1 + * @param {Node} node2 + * @param {number} edgeLength + * @private + */ + + }, { + key: "_calculateSpringForce", + value: function _calculateSpringForce(node1, node2, edgeLength) { + var dx = node1.x - node2.x; + var dy = node1.y - node2.y; + var distance = Math.max(Math.sqrt(dx * dx + dy * dy), 0.01); // the 1/distance is so the fx and fy can be calculated without sine or cosine. + + var springForce = this.options.springConstant * (edgeLength - distance) / distance; + var fx = dx * springForce; + var fy = dy * springForce; // handle the case where one node is not part of the physcis + + if (this.physicsBody.forces[node1.id] !== undefined) { + this.physicsBody.forces[node1.id].x += fx; + this.physicsBody.forces[node1.id].y += fy; + } + + if (this.physicsBody.forces[node2.id] !== undefined) { + this.physicsBody.forces[node2.id].x -= fx; + this.physicsBody.forces[node2.id].y -= fy; + } + } + }]); + + return SpringSolver; + }(); + + /** + * Hierarchical Spring Solver + */ + var HierarchicalSpringSolver = + /*#__PURE__*/ + function () { + /** + * @param {Object} body + * @param {{physicsNodeIndices: Array, physicsEdgeIndices: Array, forces: {}, velocities: {}}} physicsBody + * @param {Object} options + */ + function HierarchicalSpringSolver(body, physicsBody, options) { + classCallCheck$1(this, HierarchicalSpringSolver); + + this.body = body; + this.physicsBody = physicsBody; + this.setOptions(options); + } + /** + * + * @param {Object} options + */ + + + createClass$1(HierarchicalSpringSolver, [{ + key: "setOptions", + value: function setOptions(options) { + this.options = options; + } + /** + * This function calculates the springforces on the nodes, accounting for the support nodes. + * + * @private + */ + + }, { + key: "solve", + value: function solve() { + var edgeLength, edge; + var dx, dy, fx, fy, springForce, distance; + var edges = this.body.edges; + var factor = 0.5; + var edgeIndices = this.physicsBody.physicsEdgeIndices; + var nodeIndices = this.physicsBody.physicsNodeIndices; + var forces = this.physicsBody.forces; // initialize the spring force counters + + for (var i = 0; i < nodeIndices.length; i++) { + var nodeId = nodeIndices[i]; + forces[nodeId].springFx = 0; + forces[nodeId].springFy = 0; + } // forces caused by the edges, modelled as springs + + + for (var _i = 0; _i < edgeIndices.length; _i++) { + edge = edges[edgeIndices[_i]]; + + if (edge.connected === true) { + edgeLength = edge.options.length === undefined ? this.options.springLength : edge.options.length; + dx = edge.from.x - edge.to.x; + dy = edge.from.y - edge.to.y; + distance = Math.sqrt(dx * dx + dy * dy); + distance = distance === 0 ? 0.01 : distance; // the 1/distance is so the fx and fy can be calculated without sine or cosine. + + springForce = this.options.springConstant * (edgeLength - distance) / distance; + fx = dx * springForce; + fy = dy * springForce; + + if (edge.to.level != edge.from.level) { + if (forces[edge.toId] !== undefined) { + forces[edge.toId].springFx -= fx; + forces[edge.toId].springFy -= fy; + } + + if (forces[edge.fromId] !== undefined) { + forces[edge.fromId].springFx += fx; + forces[edge.fromId].springFy += fy; + } + } else { + if (forces[edge.toId] !== undefined) { + forces[edge.toId].x -= factor * fx; + forces[edge.toId].y -= factor * fy; + } + + if (forces[edge.fromId] !== undefined) { + forces[edge.fromId].x += factor * fx; + forces[edge.fromId].y += factor * fy; + } + } + } + } // normalize spring forces + + + springForce = 1; + var springFx, springFy; + + for (var _i2 = 0; _i2 < nodeIndices.length; _i2++) { + var _nodeId = nodeIndices[_i2]; + springFx = Math.min(springForce, Math.max(-springForce, forces[_nodeId].springFx)); + springFy = Math.min(springForce, Math.max(-springForce, forces[_nodeId].springFy)); + forces[_nodeId].x += springFx; + forces[_nodeId].y += springFy; + } // retain energy balance + + + var totalFx = 0; + var totalFy = 0; + + for (var _i3 = 0; _i3 < nodeIndices.length; _i3++) { + var _nodeId2 = nodeIndices[_i3]; + totalFx += forces[_nodeId2].x; + totalFy += forces[_nodeId2].y; + } + + var correctionFx = totalFx / nodeIndices.length; + var correctionFy = totalFy / nodeIndices.length; + + for (var _i4 = 0; _i4 < nodeIndices.length; _i4++) { + var _nodeId3 = nodeIndices[_i4]; + forces[_nodeId3].x -= correctionFx; + forces[_nodeId3].y -= correctionFy; + } + } + }]); + + return HierarchicalSpringSolver; + }(); + + /** + * Central Gravity Solver + */ + var CentralGravitySolver = + /*#__PURE__*/ + function () { + /** + * @param {Object} body + * @param {{physicsNodeIndices: Array, physicsEdgeIndices: Array, forces: {}, velocities: {}}} physicsBody + * @param {Object} options + */ + function CentralGravitySolver(body, physicsBody, options) { + classCallCheck$1(this, CentralGravitySolver); + + this.body = body; + this.physicsBody = physicsBody; + this.setOptions(options); + } + /** + * + * @param {Object} options + */ + + + createClass$1(CentralGravitySolver, [{ + key: "setOptions", + value: function setOptions(options) { + this.options = options; + } + /** + * Calculates forces for each node + */ + + }, { + key: "solve", + value: function solve() { + var dx, dy, distance, node; + var nodes = this.body.nodes; + var nodeIndices = this.physicsBody.physicsNodeIndices; + var forces = this.physicsBody.forces; + + for (var i = 0; i < nodeIndices.length; i++) { + var nodeId = nodeIndices[i]; + node = nodes[nodeId]; + dx = -node.x; + dy = -node.y; + distance = Math.sqrt(dx * dx + dy * dy); + + this._calculateForces(distance, dx, dy, forces, node); + } + } + /** + * Calculate the forces based on the distance. + * @param {number} distance + * @param {number} dx + * @param {number} dy + * @param {Object} forces + * @param {Node} node + * @private + */ + + }, { + key: "_calculateForces", + value: function _calculateForces(distance, dx, dy, forces, node) { + var gravityForce = distance === 0 ? 0 : this.options.centralGravity / distance; + forces[node.id].x = dx * gravityForce; + forces[node.id].y = dy * gravityForce; + } + }]); + + return CentralGravitySolver; + }(); + + /** + * @extends BarnesHutSolver + */ + + var ForceAtlas2BasedRepulsionSolver = + /*#__PURE__*/ + function (_BarnesHutSolver) { + inherits$1(ForceAtlas2BasedRepulsionSolver, _BarnesHutSolver); + + /** + * @param {Object} body + * @param {{physicsNodeIndices: Array, physicsEdgeIndices: Array, forces: {}, velocities: {}}} physicsBody + * @param {Object} options + */ + function ForceAtlas2BasedRepulsionSolver(body, physicsBody, options) { + classCallCheck$1(this, ForceAtlas2BasedRepulsionSolver); + + return possibleConstructorReturn$1(this, getPrototypeOf$1(ForceAtlas2BasedRepulsionSolver).call(this, body, physicsBody, options)); + } + /** + * Calculate the forces based on the distance. + * + * @param {number} distance + * @param {number} dx + * @param {number} dy + * @param {Node} node + * @param {Object} parentBranch + * @private + */ + + + createClass$1(ForceAtlas2BasedRepulsionSolver, [{ + key: "_calculateForces", + value: function _calculateForces(distance, dx, dy, node, parentBranch) { + if (distance === 0) { + distance = 0.1 * Math.random(); + dx = distance; + } + + if (this.overlapAvoidanceFactor < 1 && node.shape.radius) { + distance = Math.max(0.1 + this.overlapAvoidanceFactor * node.shape.radius, distance - node.shape.radius); + } + + var degree = node.edges.length + 1; // the dividing by the distance cubed instead of squared allows us to get the fx and fy components without sines and cosines + // it is shorthand for gravityforce with distance squared and fx = dx/distance * gravityForce + + var gravityForce = this.options.gravitationalConstant * parentBranch.mass * node.options.mass * degree / Math.pow(distance, 2); + var fx = dx * gravityForce; + var fy = dy * gravityForce; + this.physicsBody.forces[node.id].x += fx; + this.physicsBody.forces[node.id].y += fy; + } + }]); + + return ForceAtlas2BasedRepulsionSolver; + }(BarnesHutSolver); + + /** + * @extends CentralGravitySolver + */ + + var ForceAtlas2BasedCentralGravitySolver = + /*#__PURE__*/ + function (_CentralGravitySolver) { + inherits$1(ForceAtlas2BasedCentralGravitySolver, _CentralGravitySolver); + + /** + * @param {Object} body + * @param {{physicsNodeIndices: Array, physicsEdgeIndices: Array, forces: {}, velocities: {}}} physicsBody + * @param {Object} options + */ + function ForceAtlas2BasedCentralGravitySolver(body, physicsBody, options) { + classCallCheck$1(this, ForceAtlas2BasedCentralGravitySolver); + + return possibleConstructorReturn$1(this, getPrototypeOf$1(ForceAtlas2BasedCentralGravitySolver).call(this, body, physicsBody, options)); + } + /** + * Calculate the forces based on the distance. + * + * @param {number} distance + * @param {number} dx + * @param {number} dy + * @param {Object} forces + * @param {Node} node + * @private + */ + + + createClass$1(ForceAtlas2BasedCentralGravitySolver, [{ + key: "_calculateForces", + value: function _calculateForces(distance, dx, dy, forces, node) { + if (distance > 0) { + var degree = node.edges.length + 1; + var gravityForce = this.options.centralGravity * degree * node.options.mass; + forces[node.id].x = dx * gravityForce; + forces[node.id].y = dy * gravityForce; + } + } + }]); + + return ForceAtlas2BasedCentralGravitySolver; + }(CentralGravitySolver); + + /** + * The physics engine + */ + + var PhysicsEngine = + /*#__PURE__*/ + function () { + /** + * @param {Object} body + */ + function PhysicsEngine(body) { + classCallCheck$1(this, PhysicsEngine); + + this.body = body; + this.physicsBody = { + physicsNodeIndices: [], + physicsEdgeIndices: [], + forces: {}, + velocities: {} + }; + this.physicsEnabled = true; + this.simulationInterval = 1000 / 60; + this.requiresTimeout = true; + this.previousStates = {}; + this.referenceState = {}; + this.freezeCache = {}; + this.renderTimer = undefined; // parameters for the adaptive timestep + + this.adaptiveTimestep = false; + this.adaptiveTimestepEnabled = false; + this.adaptiveCounter = 0; + this.adaptiveInterval = 3; + this.stabilized = false; + this.startedStabilization = false; + this.stabilizationIterations = 0; + this.ready = false; // will be set to true if the stabilize + // default options + + this.options = {}; + this.defaultOptions = { + enabled: true, + barnesHut: { + theta: 0.5, + gravitationalConstant: -2000, + centralGravity: 0.3, + springLength: 95, + springConstant: 0.04, + damping: 0.09, + avoidOverlap: 0 + }, + forceAtlas2Based: { + theta: 0.5, + gravitationalConstant: -50, + centralGravity: 0.01, + springConstant: 0.08, + springLength: 100, + damping: 0.4, + avoidOverlap: 0 + }, + repulsion: { + centralGravity: 0.2, + springLength: 200, + springConstant: 0.05, + nodeDistance: 100, + damping: 0.09, + avoidOverlap: 0 + }, + hierarchicalRepulsion: { + centralGravity: 0.0, + springLength: 100, + springConstant: 0.01, + nodeDistance: 120, + damping: 0.09 + }, + maxVelocity: 50, + minVelocity: 0.75, + // px/s + solver: 'barnesHut', + stabilization: { + enabled: true, + iterations: 1000, + // maximum number of iteration to stabilize + updateInterval: 50, + onlyDynamicEdges: false, + fit: true + }, + timestep: 0.5, + adaptiveTimestep: true + }; + util.extend(this.options, this.defaultOptions); + this.timestep = 0.5; + this.layoutFailed = false; + this.bindEventListeners(); + } + /** + * Binds event listeners + */ + + + createClass$1(PhysicsEngine, [{ + key: "bindEventListeners", + value: function bindEventListeners() { + var _this = this; + + this.body.emitter.on('initPhysics', function () { + _this.initPhysics(); + }); + this.body.emitter.on('_layoutFailed', function () { + _this.layoutFailed = true; + }); + this.body.emitter.on('resetPhysics', function () { + _this.stopSimulation(); + + _this.ready = false; + }); + this.body.emitter.on('disablePhysics', function () { + _this.physicsEnabled = false; + + _this.stopSimulation(); + }); + this.body.emitter.on('restorePhysics', function () { + _this.setOptions(_this.options); + + if (_this.ready === true) { + _this.startSimulation(); + } + }); + this.body.emitter.on('startSimulation', function () { + if (_this.ready === true) { + _this.startSimulation(); + } + }); + this.body.emitter.on('stopSimulation', function () { + _this.stopSimulation(); + }); + this.body.emitter.on('destroy', function () { + _this.stopSimulation(false); + + _this.body.emitter.off(); + }); + this.body.emitter.on("_dataChanged", function () { + // Nodes and/or edges have been added or removed, update shortcut lists. + _this.updatePhysicsData(); + }); // debug: show forces + // this.body.emitter.on("afterDrawing", (ctx) => {this._drawForces(ctx);}); + } + /** + * set the physics options + * @param {Object} options + */ + + }, { + key: "setOptions", + value: function setOptions(options) { + if (options !== undefined) { + if (options === false) { + this.options.enabled = false; + this.physicsEnabled = false; + this.stopSimulation(); + } else if (options === true) { + this.options.enabled = true; + this.physicsEnabled = true; + this.startSimulation(); + } else { + this.physicsEnabled = true; + util.selectiveNotDeepExtend(['stabilization'], this.options, options); + util.mergeOptions(this.options, options, 'stabilization'); + + if (options.enabled === undefined) { + this.options.enabled = true; + } + + if (this.options.enabled === false) { + this.physicsEnabled = false; + this.stopSimulation(); + } // set the timestep + + + this.timestep = this.options.timestep; + } + } + + this.init(); + } + /** + * configure the engine. + */ + + }, { + key: "init", + value: function init() { + var options; + + if (this.options.solver === 'forceAtlas2Based') { + options = this.options.forceAtlas2Based; + this.nodesSolver = new ForceAtlas2BasedRepulsionSolver(this.body, this.physicsBody, options); + this.edgesSolver = new SpringSolver(this.body, this.physicsBody, options); + this.gravitySolver = new ForceAtlas2BasedCentralGravitySolver(this.body, this.physicsBody, options); + } else if (this.options.solver === 'repulsion') { + options = this.options.repulsion; + this.nodesSolver = new RepulsionSolver(this.body, this.physicsBody, options); + this.edgesSolver = new SpringSolver(this.body, this.physicsBody, options); + this.gravitySolver = new CentralGravitySolver(this.body, this.physicsBody, options); + } else if (this.options.solver === 'hierarchicalRepulsion') { + options = this.options.hierarchicalRepulsion; + this.nodesSolver = new HierarchicalRepulsionSolver(this.body, this.physicsBody, options); + this.edgesSolver = new HierarchicalSpringSolver(this.body, this.physicsBody, options); + this.gravitySolver = new CentralGravitySolver(this.body, this.physicsBody, options); + } else { + // barnesHut + options = this.options.barnesHut; + this.nodesSolver = new BarnesHutSolver(this.body, this.physicsBody, options); + this.edgesSolver = new SpringSolver(this.body, this.physicsBody, options); + this.gravitySolver = new CentralGravitySolver(this.body, this.physicsBody, options); + } + + this.modelOptions = options; + } + /** + * initialize the engine + */ + + }, { + key: "initPhysics", + value: function initPhysics() { + if (this.physicsEnabled === true && this.options.enabled === true) { + if (this.options.stabilization.enabled === true) { + this.stabilize(); + } else { + this.stabilized = false; + this.ready = true; + this.body.emitter.emit('fit', {}, this.layoutFailed); // if the layout failed, we use the approximation for the zoom + + this.startSimulation(); + } + } else { + this.ready = true; + this.body.emitter.emit('fit'); + } + } + /** + * Start the simulation + */ + + }, { + key: "startSimulation", + value: function startSimulation() { + if (this.physicsEnabled === true && this.options.enabled === true) { + this.stabilized = false; // when visible, adaptivity is disabled. + + this.adaptiveTimestep = false; // this sets the width of all nodes initially which could be required for the avoidOverlap + + this.body.emitter.emit("_resizeNodes"); + + if (this.viewFunction === undefined) { + this.viewFunction = this.simulationStep.bind(this); + this.body.emitter.on('initRedraw', this.viewFunction); + this.body.emitter.emit('_startRendering'); + } + } else { + this.body.emitter.emit('_redraw'); + } + } + /** + * Stop the simulation, force stabilization. + * @param {boolean} [emit=true] + */ + + }, { + key: "stopSimulation", + value: function stopSimulation() { + var emit = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; + this.stabilized = true; + + if (emit === true) { + this._emitStabilized(); + } + + if (this.viewFunction !== undefined) { + this.body.emitter.off('initRedraw', this.viewFunction); + this.viewFunction = undefined; + + if (emit === true) { + this.body.emitter.emit('_stopRendering'); + } + } + } + /** + * The viewFunction inserts this step into each render loop. It calls the physics tick and handles the cleanup at stabilized. + * + */ + + }, { + key: "simulationStep", + value: function simulationStep() { + // check if the physics have settled + var startTime = Date.now(); + this.physicsTick(); + var physicsTime = Date.now() - startTime; // run double speed if it is a little graph + + if ((physicsTime < 0.4 * this.simulationInterval || this.runDoubleSpeed === true) && this.stabilized === false) { + this.physicsTick(); // this makes sure there is no jitter. The decision is taken once to run it at double speed. + + this.runDoubleSpeed = true; + } + + if (this.stabilized === true) { + this.stopSimulation(); + } + } + /** + * trigger the stabilized event. + * + * @param {number} [amountOfIterations=this.stabilizationIterations] + * @private + */ + + }, { + key: "_emitStabilized", + value: function _emitStabilized() { + var _this2 = this; + + var amountOfIterations = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.stabilizationIterations; + + if (this.stabilizationIterations > 1 || this.startedStabilization === true) { + setTimeout(function () { + _this2.body.emitter.emit('stabilized', { + iterations: amountOfIterations + }); + + _this2.startedStabilization = false; + _this2.stabilizationIterations = 0; + }, 0); + } + } + /** + * Calculate the forces for one physics iteration and move the nodes. + * @private + */ + + }, { + key: "physicsStep", + value: function physicsStep() { + this.gravitySolver.solve(); + this.nodesSolver.solve(); + this.edgesSolver.solve(); + this.moveNodes(); + } + /** + * Make dynamic adjustments to the timestep, based on current state. + * + * Helper function for physicsTick(). + * @private + */ + + }, { + key: "adjustTimeStep", + value: function adjustTimeStep() { + var factor = 1.2; // Factor for increasing the timestep on success. + // we compare the two steps. if it is acceptable we double the step. + + if (this._evaluateStepQuality() === true) { + this.timestep = factor * this.timestep; + } else { + // if not, we decrease the step to a minimum of the options timestep. + // if the decreased timestep is smaller than the options step, we do not reset the counter + // we assume that the options timestep is stable enough. + if (this.timestep / factor < this.options.timestep) { + this.timestep = this.options.timestep; + } else { + // if the timestep was larger than 2 times the option one we check the adaptivity again to ensure + // that large instabilities do not form. + this.adaptiveCounter = -1; // check again next iteration + + this.timestep = Math.max(this.options.timestep, this.timestep / factor); + } + } + } + /** + * A single simulation step (or 'tick') in the physics simulation + * + * @private + */ + + }, { + key: "physicsTick", + value: function physicsTick() { + this._startStabilizing(); // this ensures that there is no start event when the network is already stable. + + + if (this.stabilized === true) return; // adaptivity means the timestep adapts to the situation, only applicable for stabilization + + if (this.adaptiveTimestep === true && this.adaptiveTimestepEnabled === true) { + // timestep remains stable for "interval" iterations. + var doAdaptive = this.adaptiveCounter % this.adaptiveInterval === 0; + + if (doAdaptive) { + // first the big step and revert. + this.timestep = 2 * this.timestep; + this.physicsStep(); + this.revert(); // saves the reference state + // now the normal step. Since this is the last step, it is the more stable one and we will take this. + + this.timestep = 0.5 * this.timestep; // since it's half the step, we do it twice. + + this.physicsStep(); + this.physicsStep(); + this.adjustTimeStep(); + } else { + this.physicsStep(); // normal step, keeping timestep constant + } + + this.adaptiveCounter += 1; + } else { + // case for the static timestep, we reset it to the one in options and take a normal step. + this.timestep = this.options.timestep; + this.physicsStep(); + } + + if (this.stabilized === true) this.revert(); + this.stabilizationIterations++; + } + /** + * Nodes and edges can have the physics toggles on or off. A collection of indices is created here so we can skip the check all the time. + * + * @private + */ + + }, { + key: "updatePhysicsData", + value: function updatePhysicsData() { + this.physicsBody.forces = {}; + this.physicsBody.physicsNodeIndices = []; + this.physicsBody.physicsEdgeIndices = []; + var nodes = this.body.nodes; + var edges = this.body.edges; // get node indices for physics + + for (var nodeId in nodes) { + if (nodes.hasOwnProperty(nodeId)) { + if (nodes[nodeId].options.physics === true) { + this.physicsBody.physicsNodeIndices.push(nodes[nodeId].id); + } + } + } // get edge indices for physics + + + for (var edgeId in edges) { + if (edges.hasOwnProperty(edgeId)) { + if (edges[edgeId].options.physics === true) { + this.physicsBody.physicsEdgeIndices.push(edges[edgeId].id); + } + } + } // get the velocity and the forces vector + + + for (var i = 0; i < this.physicsBody.physicsNodeIndices.length; i++) { + var _nodeId = this.physicsBody.physicsNodeIndices[i]; + this.physicsBody.forces[_nodeId] = { + x: 0, + y: 0 + }; // forces can be reset because they are recalculated. Velocities have to persist. + + if (this.physicsBody.velocities[_nodeId] === undefined) { + this.physicsBody.velocities[_nodeId] = { + x: 0, + y: 0 + }; + } + } // clean deleted nodes from the velocity vector + + + for (var _nodeId2 in this.physicsBody.velocities) { + if (nodes[_nodeId2] === undefined) { + delete this.physicsBody.velocities[_nodeId2]; + } + } + } + /** + * Revert the simulation one step. This is done so after stabilization, every new start of the simulation will also say stabilized. + */ + + }, { + key: "revert", + value: function revert() { + var nodeIds = Object.keys(this.previousStates); + var nodes = this.body.nodes; + var velocities = this.physicsBody.velocities; + this.referenceState = {}; + + for (var i = 0; i < nodeIds.length; i++) { + var nodeId = nodeIds[i]; + + if (nodes[nodeId] !== undefined) { + if (nodes[nodeId].options.physics === true) { + this.referenceState[nodeId] = { + positions: { + x: nodes[nodeId].x, + y: nodes[nodeId].y + } + }; + velocities[nodeId].x = this.previousStates[nodeId].vx; + velocities[nodeId].y = this.previousStates[nodeId].vy; + nodes[nodeId].x = this.previousStates[nodeId].x; + nodes[nodeId].y = this.previousStates[nodeId].y; + } + } else { + delete this.previousStates[nodeId]; + } + } + } + /** + * This compares the reference state to the current state + * + * @returns {boolean} + * @private + */ + + }, { + key: "_evaluateStepQuality", + value: function _evaluateStepQuality() { + var dx, dy, dpos; + var nodes = this.body.nodes; + var reference = this.referenceState; + var posThreshold = 0.3; + + for (var nodeId in this.referenceState) { + if (this.referenceState.hasOwnProperty(nodeId) && nodes[nodeId] !== undefined) { + dx = nodes[nodeId].x - reference[nodeId].positions.x; + dy = nodes[nodeId].y - reference[nodeId].positions.y; + dpos = Math.sqrt(Math.pow(dx, 2) + Math.pow(dy, 2)); + + if (dpos > posThreshold) { + return false; + } + } + } + + return true; + } + /** + * move the nodes one timestep and check if they are stabilized + */ + + }, { + key: "moveNodes", + value: function moveNodes() { + var nodeIndices = this.physicsBody.physicsNodeIndices; + var maxNodeVelocity = 0; + var averageNodeVelocity = 0; // the velocity threshold (energy in the system) for the adaptivity toggle + + var velocityAdaptiveThreshold = 5; + + for (var i = 0; i < nodeIndices.length; i++) { + var nodeId = nodeIndices[i]; + + var nodeVelocity = this._performStep(nodeId); // stabilized is true if stabilized is true and velocity is smaller than vmin --> all nodes must be stabilized + + + maxNodeVelocity = Math.max(maxNodeVelocity, nodeVelocity); + averageNodeVelocity += nodeVelocity; + } // evaluating the stabilized and adaptiveTimestepEnabled conditions + + + this.adaptiveTimestepEnabled = averageNodeVelocity / nodeIndices.length < velocityAdaptiveThreshold; + this.stabilized = maxNodeVelocity < this.options.minVelocity; + } + /** + * Calculate new velocity for a coordinate direction + * + * @param {number} v velocity for current coordinate + * @param {number} f regular force for current coordinate + * @param {number} m mass of current node + * @returns {number} new velocity for current coordinate + * @private + */ + + }, { + key: "calculateComponentVelocity", + value: function calculateComponentVelocity(v, f, m) { + var df = this.modelOptions.damping * v; // damping force + + var a = (f - df) / m; // acceleration + + v += a * this.timestep; // Put a limit on the velocities if it is really high + + var maxV = this.options.maxVelocity || 1e9; + + if (Math.abs(v) > maxV) { + v = v > 0 ? maxV : -maxV; + } + + return v; + } + /** + * Perform the actual step + * + * @param {Node.id} nodeId + * @returns {number} the new velocity of given node + * @private + */ + + }, { + key: "_performStep", + value: function _performStep(nodeId) { + var node = this.body.nodes[nodeId]; + var force = this.physicsBody.forces[nodeId]; + var velocity = this.physicsBody.velocities[nodeId]; // store the state so we can revert + + this.previousStates[nodeId] = { + x: node.x, + y: node.y, + vx: velocity.x, + vy: velocity.y + }; + + if (node.options.fixed.x === false) { + velocity.x = this.calculateComponentVelocity(velocity.x, force.x, node.options.mass); + node.x += velocity.x * this.timestep; + } else { + force.x = 0; + velocity.x = 0; + } + + if (node.options.fixed.y === false) { + velocity.y = this.calculateComponentVelocity(velocity.y, force.y, node.options.mass); + node.y += velocity.y * this.timestep; + } else { + force.y = 0; + velocity.y = 0; + } + + var totalVelocity = Math.sqrt(Math.pow(velocity.x, 2) + Math.pow(velocity.y, 2)); + return totalVelocity; + } + /** + * When initializing and stabilizing, we can freeze nodes with a predefined position. + * This greatly speeds up stabilization because only the supportnodes for the smoothCurves have to settle. + * + * @private + */ + + }, { + key: "_freezeNodes", + value: function _freezeNodes() { + var nodes = this.body.nodes; + + for (var id in nodes) { + if (nodes.hasOwnProperty(id)) { + if (nodes[id].x && nodes[id].y) { + var fixed = nodes[id].options.fixed; + this.freezeCache[id] = { + x: fixed.x, + y: fixed.y + }; + fixed.x = true; + fixed.y = true; + } + } + } + } + /** + * Unfreezes the nodes that have been frozen by _freezeDefinedNodes. + * + * @private + */ + + }, { + key: "_restoreFrozenNodes", + value: function _restoreFrozenNodes() { + var nodes = this.body.nodes; + + for (var id in nodes) { + if (nodes.hasOwnProperty(id)) { + if (this.freezeCache[id] !== undefined) { + nodes[id].options.fixed.x = this.freezeCache[id].x; + nodes[id].options.fixed.y = this.freezeCache[id].y; + } + } + } + + this.freezeCache = {}; + } + /** + * Find a stable position for all nodes + * + * @param {number} [iterations=this.options.stabilization.iterations] + */ + + }, { + key: "stabilize", + value: function stabilize() { + var _this3 = this; + + var iterations = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.options.stabilization.iterations; + + if (typeof iterations !== 'number') { + iterations = this.options.stabilization.iterations; + console.log('The stabilize method needs a numeric amount of iterations. Switching to default: ', iterations); + } + + if (this.physicsBody.physicsNodeIndices.length === 0) { + this.ready = true; + return; + } // enable adaptive timesteps + + + this.adaptiveTimestep = this.options.adaptiveTimestep; // this sets the width of all nodes initially which could be required for the avoidOverlap + + this.body.emitter.emit("_resizeNodes"); + this.stopSimulation(); // stop the render loop + + this.stabilized = false; // block redraw requests + + this.body.emitter.emit('_blockRedraw'); + this.targetIterations = iterations; // start the stabilization + + if (this.options.stabilization.onlyDynamicEdges === true) { + this._freezeNodes(); + } + + this.stabilizationIterations = 0; + setTimeout(function () { + return _this3._stabilizationBatch(); + }, 0); + } + /** + * If not already stabilizing, start it and emit a start event. + * + * @returns {boolean} true if stabilization started with this call + * @private + */ + + }, { + key: "_startStabilizing", + value: function _startStabilizing() { + if (this.startedStabilization === true) return false; + this.body.emitter.emit('startStabilizing'); + this.startedStabilization = true; + return true; + } + /** + * One batch of stabilization + * @private + */ + + }, { + key: "_stabilizationBatch", + value: function _stabilizationBatch() { + var _this4 = this; + + var running = function running() { + return _this4.stabilized === false && _this4.stabilizationIterations < _this4.targetIterations; + }; + + var sendProgress = function sendProgress() { + _this4.body.emitter.emit('stabilizationProgress', { + iterations: _this4.stabilizationIterations, + total: _this4.targetIterations + }); + }; + + if (this._startStabilizing()) { + sendProgress(); // Ensure that there is at least one start event. + } + + var count = 0; + + while (running() && count < this.options.stabilization.updateInterval) { + this.physicsTick(); + count++; + } + + sendProgress(); + + if (running()) { + setTimeout(this._stabilizationBatch.bind(this), 0); + } else { + this._finalizeStabilization(); + } + } + /** + * Wrap up the stabilization, fit and emit the events. + * @private + */ + + }, { + key: "_finalizeStabilization", + value: function _finalizeStabilization() { + this.body.emitter.emit('_allowRedraw'); + + if (this.options.stabilization.fit === true) { + this.body.emitter.emit('fit'); + } + + if (this.options.stabilization.onlyDynamicEdges === true) { + this._restoreFrozenNodes(); + } + + this.body.emitter.emit('stabilizationIterationsDone'); + this.body.emitter.emit('_requestRedraw'); + + if (this.stabilized === true) { + this._emitStabilized(); + } else { + this.startSimulation(); + } + + this.ready = true; + } //--------------------------- DEBUGGING BELOW ---------------------------// + + /** + * Debug function that display arrows for the forces currently active in the network. + * + * Use this when debugging only. + * + * @param {CanvasRenderingContext2D} ctx + * @private + */ + + }, { + key: "_drawForces", + value: function _drawForces(ctx) { + for (var i = 0; i < this.physicsBody.physicsNodeIndices.length; i++) { + var index = this.physicsBody.physicsNodeIndices[i]; + var node = this.body.nodes[index]; + var force = this.physicsBody.forces[index]; + var factor = 20; + var colorFactor = 0.03; + var forceSize = Math.sqrt(Math.pow(force.x, 2) + Math.pow(force.x, 2)); + var size = Math.min(Math.max(5, forceSize), 15); + var arrowSize = 3 * size; + var color = util.HSVToHex((180 - Math.min(1, Math.max(0, colorFactor * forceSize)) * 180) / 360, 1, 1); + var point = { + x: node.x + factor * force.x, + y: node.y + factor * force.y + }; + ctx.lineWidth = size; + ctx.strokeStyle = color; + ctx.beginPath(); + ctx.moveTo(node.x, node.y); + ctx.lineTo(point.x, point.y); + ctx.stroke(); + var angle = Math.atan2(force.y, force.x); + ctx.fillStyle = color; + EndPoints.draw(ctx, { + type: 'arrow', + point: point, + angle: angle, + length: arrowSize + }); + ctx.fill(); + } + } + }]); + + return PhysicsEngine; + }(); + + /** + * Utility Class + */ + + var NetworkUtil = + /*#__PURE__*/ + function () { + /** + * @ignore + */ + function NetworkUtil() { + classCallCheck$1(this, NetworkUtil); + } + /** + * Find the center position of the network considering the bounding boxes + * + * @param {Array.} allNodes + * @param {Array.} [specificNodes=[]] + * @returns {{minX: number, maxX: number, minY: number, maxY: number}} + * @static + */ + + + createClass$1(NetworkUtil, null, [{ + key: "getRange", + value: function getRange(allNodes) { + var specificNodes = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : []; + var minY = 1e9, + maxY = -1e9, + minX = 1e9, + maxX = -1e9, + node; + + if (specificNodes.length > 0) { + for (var i = 0; i < specificNodes.length; i++) { + node = allNodes[specificNodes[i]]; + + if (minX > node.shape.boundingBox.left) { + minX = node.shape.boundingBox.left; + } + + if (maxX < node.shape.boundingBox.right) { + maxX = node.shape.boundingBox.right; + } + + if (minY > node.shape.boundingBox.top) { + minY = node.shape.boundingBox.top; + } // top is negative, bottom is positive + + + if (maxY < node.shape.boundingBox.bottom) { + maxY = node.shape.boundingBox.bottom; + } // top is negative, bottom is positive + + } + } + + if (minX === 1e9 && maxX === -1e9 && minY === 1e9 && maxY === -1e9) { + minY = 0, maxY = 0, minX = 0, maxX = 0; + } + + return { + minX: minX, + maxX: maxX, + minY: minY, + maxY: maxY + }; + } + /** + * Find the center position of the network + * + * @param {Array.} allNodes + * @param {Array.} [specificNodes=[]] + * @returns {{minX: number, maxX: number, minY: number, maxY: number}} + * @static + */ + + }, { + key: "getRangeCore", + value: function getRangeCore(allNodes) { + var specificNodes = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : []; + var minY = 1e9, + maxY = -1e9, + minX = 1e9, + maxX = -1e9, + node; + + if (specificNodes.length > 0) { + for (var i = 0; i < specificNodes.length; i++) { + node = allNodes[specificNodes[i]]; + + if (minX > node.x) { + minX = node.x; + } + + if (maxX < node.x) { + maxX = node.x; + } + + if (minY > node.y) { + minY = node.y; + } // top is negative, bottom is positive + + + if (maxY < node.y) { + maxY = node.y; + } // top is negative, bottom is positive + + } + } + + if (minX === 1e9 && maxX === -1e9 && minY === 1e9 && maxY === -1e9) { + minY = 0, maxY = 0, minX = 0, maxX = 0; + } + + return { + minX: minX, + maxX: maxX, + minY: minY, + maxY: maxY + }; + } + /** + * @param {object} range = {minX: minX, maxX: maxX, minY: minY, maxY: maxY}; + * @returns {{x: number, y: number}} + * @static + */ + + }, { + key: "findCenter", + value: function findCenter(range) { + return { + x: 0.5 * (range.maxX + range.minX), + y: 0.5 * (range.maxY + range.minY) + }; + } + /** + * This returns a clone of the options or options of the edge or node to be used for construction of new edges or check functions for new nodes. + * @param {vis.Item} item + * @param {'node'|undefined} type + * @returns {{}} + * @static + */ + + }, { + key: "cloneOptions", + value: function cloneOptions(item, type) { + var clonedOptions = {}; + + if (type === undefined || type === 'node') { + util.deepExtend(clonedOptions, item.options, true); + clonedOptions.x = item.x; + clonedOptions.y = item.y; + clonedOptions.amountOfConnections = item.edges.length; + } else { + util.deepExtend(clonedOptions, item.options, true); + } + + return clonedOptions; + } + }]); + + return NetworkUtil; + }(); + + /** + * A Cluster is a special Node that allows a group of Nodes positioned closely together + * to be represented by a single Cluster Node. + * + * @extends Node + */ + + var Cluster = + /*#__PURE__*/ + function (_Node) { + inherits$1(Cluster, _Node); + + /** + * @param {Object} options + * @param {Object} body + * @param {Array.}imagelist + * @param {Array} grouplist + * @param {Object} globalOptions + * @param {Object} defaultOptions Global default options for nodes + */ + function Cluster(options, body, imagelist, grouplist, globalOptions, defaultOptions) { + var _this; + + classCallCheck$1(this, Cluster); + + _this = possibleConstructorReturn$1(this, getPrototypeOf$1(Cluster).call(this, options, body, imagelist, grouplist, globalOptions, defaultOptions)); + _this.isCluster = true; + _this.containedNodes = {}; + _this.containedEdges = {}; + return _this; + } + /** + * Transfer child cluster data to current and disconnect the child cluster. + * + * Please consult the header comment in 'Clustering.js' for the fields set here. + * + * @param {string|number} childClusterId id of child cluster to open + */ + + + createClass$1(Cluster, [{ + key: "_openChildCluster", + value: function _openChildCluster(childClusterId) { + var _this2 = this; + + var childCluster = this.body.nodes[childClusterId]; + + if (this.containedNodes[childClusterId] === undefined) { + throw new Error('node with id: ' + childClusterId + ' not in current cluster'); + } + + if (!childCluster.isCluster) { + throw new Error('node with id: ' + childClusterId + ' is not a cluster'); + } // Disconnect child cluster from current cluster + + + delete this.containedNodes[childClusterId]; + util.forEach(childCluster.edges, function (edge) { + delete _this2.containedEdges[edge.id]; + }); // Transfer nodes and edges + + util.forEach(childCluster.containedNodes, function (node, nodeId) { + _this2.containedNodes[nodeId] = node; + }); + childCluster.containedNodes = {}; + util.forEach(childCluster.containedEdges, function (edge, edgeId) { + _this2.containedEdges[edgeId] = edge; + }); + childCluster.containedEdges = {}; // Transfer edges within cluster edges which are clustered + + util.forEach(childCluster.edges, function (clusterEdge) { + util.forEach(_this2.edges, function (parentClusterEdge) { + // Assumption: a clustered edge can only be present in a single clustering edge + // Not tested here + var index = parentClusterEdge.clusteringEdgeReplacingIds.indexOf(clusterEdge.id); + if (index === -1) return; + util.forEach(clusterEdge.clusteringEdgeReplacingIds, function (srcId) { + parentClusterEdge.clusteringEdgeReplacingIds.push(srcId); // Maintain correct bookkeeping for transferred edge + + _this2.body.edges[srcId].edgeReplacedById = parentClusterEdge.id; + }); // Remove cluster edge from parent cluster edge + + parentClusterEdge.clusteringEdgeReplacingIds.splice(index, 1); + }); + }); + childCluster.edges = []; + } + }]); + + return Cluster; + }(Node); + + /** + * The clustering engine + */ + + var ClusterEngine = + /*#__PURE__*/ + function () { + /** + * @param {Object} body + */ + function ClusterEngine(body) { + var _this = this; + + classCallCheck$1(this, ClusterEngine); + + this.body = body; + this.clusteredNodes = {}; // key: node id, value: { clusterId: , node: } + + this.clusteredEdges = {}; // key: edge id, value: restore information for given edge + + this.options = {}; + this.defaultOptions = {}; + util.extend(this.options, this.defaultOptions); + this.body.emitter.on('_resetData', function () { + _this.clusteredNodes = {}; + _this.clusteredEdges = {}; + }); + } + /** + * + * @param {number} hubsize + * @param {Object} options + */ + + + createClass$1(ClusterEngine, [{ + key: "clusterByHubsize", + value: function clusterByHubsize(hubsize, options) { + if (hubsize === undefined) { + hubsize = this._getHubSize(); + } else if (_typeof_1$1(hubsize) === "object") { + options = this._checkOptions(hubsize); + hubsize = this._getHubSize(); + } + + var nodesToCluster = []; + + for (var i = 0; i < this.body.nodeIndices.length; i++) { + var node = this.body.nodes[this.body.nodeIndices[i]]; + + if (node.edges.length >= hubsize) { + nodesToCluster.push(node.id); + } + } + + for (var _i = 0; _i < nodesToCluster.length; _i++) { + this.clusterByConnection(nodesToCluster[_i], options, true); + } + + this.body.emitter.emit('_dataChanged'); + } + /** + * loop over all nodes, check if they adhere to the condition and cluster if needed. + * @param {Object} options + * @param {boolean} [refreshData=true] + */ + + }, { + key: "cluster", + value: function cluster() { + var _this2 = this; + + var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + var refreshData = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; + + if (options.joinCondition === undefined) { + throw new Error("Cannot call clusterByNodeData without a joinCondition function in the options."); + } // check if the options object is fine, append if needed + + + options = this._checkOptions(options); + var childNodesObj = {}; + var childEdgesObj = {}; // collect the nodes that will be in the cluster + + util.forEach(this.body.nodes, function (node, nodeId) { + if (node.options && options.joinCondition(node.options) === true) { + childNodesObj[nodeId] = node; // collect the edges that will be in the cluster + + util.forEach(node.edges, function (edge) { + if (_this2.clusteredEdges[edge.id] === undefined) { + childEdgesObj[edge.id] = edge; + } + }); + } + }); + + this._cluster(childNodesObj, childEdgesObj, options, refreshData); + } + /** + * Cluster all nodes in the network that have only X edges + * @param {number} edgeCount + * @param {Object} options + * @param {boolean} [refreshData=true] + */ + + }, { + key: "clusterByEdgeCount", + value: function clusterByEdgeCount(edgeCount, options) { + var _this3 = this; + + var refreshData = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true; + options = this._checkOptions(options); + var clusters = []; + var usedNodes = {}; + var edge, edges, relevantEdgeCount; // collect the nodes that will be in the cluster + + var _loop = function _loop(i) { + var childNodesObj = {}; + var childEdgesObj = {}; + var nodeId = _this3.body.nodeIndices[i]; + var node = _this3.body.nodes[nodeId]; // if this node is already used in another cluster this session, we do not have to re-evaluate it. + + if (usedNodes[nodeId] === undefined) { + relevantEdgeCount = 0; + edges = []; + + for (var j = 0; j < node.edges.length; j++) { + edge = node.edges[j]; + + if (_this3.clusteredEdges[edge.id] === undefined) { + if (edge.toId !== edge.fromId) { + relevantEdgeCount++; + } + + edges.push(edge); + } + } // this node qualifies, we collect its neighbours to start the clustering process. + + + if (relevantEdgeCount === edgeCount) { + checkJoinCondition = function checkJoinCondition(node) { + if (options.joinCondition === undefined || options.joinCondition === null) { + return true; + } + + var clonedOptions = NetworkUtil.cloneOptions(node); + return options.joinCondition(clonedOptions); + }; + + var gatheringSuccessful = true; + + for (var _j = 0; _j < edges.length; _j++) { + edge = edges[_j]; + + var childNodeId = _this3._getConnectedId(edge, nodeId); // add the nodes to the list by the join condition. + + + if (checkJoinCondition(node)) { + childEdgesObj[edge.id] = edge; + childNodesObj[nodeId] = node; + childNodesObj[childNodeId] = _this3.body.nodes[childNodeId]; + usedNodes[nodeId] = true; + } else { + // this node does not qualify after all. + gatheringSuccessful = false; + break; + } + } // add to the cluster queue + + + if (Object.keys(childNodesObj).length > 0 && Object.keys(childEdgesObj).length > 0 && gatheringSuccessful === true) { + /** + * Search for cluster data that contains any of the node id's + * @returns {Boolean} true if no joinCondition, otherwise return value of joinCondition + */ + findClusterData = function findClusterData() { + for (var n = 0; n < clusters.length; ++n) { + // Search for a cluster containing any of the node id's + for (var m in childNodesObj) { + if (clusters[n].nodes[m] !== undefined) { + return clusters[n]; + } + } + } + + return undefined; + }; // If any of the found nodes is part of a cluster found in this method, + // add the current values to that cluster + + + foundCluster = findClusterData(); + + if (foundCluster !== undefined) { + // Add nodes to found cluster if not present + for (var m in childNodesObj) { + if (foundCluster.nodes[m] === undefined) { + foundCluster.nodes[m] = childNodesObj[m]; + } + } // Add edges to found cluster, if not present + + + for (var _m in childEdgesObj) { + if (foundCluster.edges[_m] === undefined) { + foundCluster.edges[_m] = childEdgesObj[_m]; + } + } + } else { + // Create a new cluster group + clusters.push({ + nodes: childNodesObj, + edges: childEdgesObj + }); + } + } + } + } + }; + + for (var i = 0; i < this.body.nodeIndices.length; i++) { + var checkJoinCondition; + var findClusterData; + var foundCluster; + + _loop(i); + } + + for (var i = 0; i < clusters.length; i++) { + this._cluster(clusters[i].nodes, clusters[i].edges, options, false); + } + + if (refreshData === true) { + this.body.emitter.emit('_dataChanged'); + } + } + /** + * Cluster all nodes in the network that have only 1 edge + * @param {Object} options + * @param {boolean} [refreshData=true] + */ + + }, { + key: "clusterOutliers", + value: function clusterOutliers(options) { + var refreshData = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; + this.clusterByEdgeCount(1, options, refreshData); + } + /** + * Cluster all nodes in the network that have only 2 edge + * @param {Object} options + * @param {boolean} [refreshData=true] + */ + + }, { + key: "clusterBridges", + value: function clusterBridges(options) { + var refreshData = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; + this.clusterByEdgeCount(2, options, refreshData); + } + /** + * suck all connected nodes of a node into the node. + * @param {Node.id} nodeId + * @param {Object} options + * @param {boolean} [refreshData=true] + */ + + }, { + key: "clusterByConnection", + value: function clusterByConnection(nodeId, options) { + var refreshData = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true; + + // kill conditions + if (nodeId === undefined) { + throw new Error("No nodeId supplied to clusterByConnection!"); + } + + if (this.body.nodes[nodeId] === undefined) { + throw new Error("The nodeId given to clusterByConnection does not exist!"); + } + + var node = this.body.nodes[nodeId]; + options = this._checkOptions(options, node); + + if (options.clusterNodeProperties.x === undefined) { + options.clusterNodeProperties.x = node.x; + } + + if (options.clusterNodeProperties.y === undefined) { + options.clusterNodeProperties.y = node.y; + } + + if (options.clusterNodeProperties.fixed === undefined) { + options.clusterNodeProperties.fixed = {}; + options.clusterNodeProperties.fixed.x = node.options.fixed.x; + options.clusterNodeProperties.fixed.y = node.options.fixed.y; + } + + var childNodesObj = {}; + var childEdgesObj = {}; + var parentNodeId = node.id; + var parentClonedOptions = NetworkUtil.cloneOptions(node); + childNodesObj[parentNodeId] = node; // collect the nodes that will be in the cluster + + for (var i = 0; i < node.edges.length; i++) { + var edge = node.edges[i]; + + if (this.clusteredEdges[edge.id] === undefined) { + var childNodeId = this._getConnectedId(edge, parentNodeId); // if the child node is not in a cluster + + + if (this.clusteredNodes[childNodeId] === undefined) { + if (childNodeId !== parentNodeId) { + if (options.joinCondition === undefined) { + childEdgesObj[edge.id] = edge; + childNodesObj[childNodeId] = this.body.nodes[childNodeId]; + } else { + // clone the options and insert some additional parameters that could be interesting. + var childClonedOptions = NetworkUtil.cloneOptions(this.body.nodes[childNodeId]); + + if (options.joinCondition(parentClonedOptions, childClonedOptions) === true) { + childEdgesObj[edge.id] = edge; + childNodesObj[childNodeId] = this.body.nodes[childNodeId]; + } + } + } else { + // swallow the edge if it is self-referencing. + childEdgesObj[edge.id] = edge; + } + } + } + } + + var childNodeIDs = Object.keys(childNodesObj).map(function (childNode) { + return childNodesObj[childNode].id; + }); + + for (childNode in childNodesObj) { + if (!childNodesObj.hasOwnProperty(childNode)) continue; + var childNode = childNodesObj[childNode]; + + for (var y = 0; y < childNode.edges.length; y++) { + var childEdge = childNode.edges[y]; + + if (childNodeIDs.indexOf(this._getConnectedId(childEdge, childNode.id)) > -1) { + childEdgesObj[childEdge.id] = childEdge; + } + } + } + + this._cluster(childNodesObj, childEdgesObj, options, refreshData); + } + /** + * This function creates the edges that will be attached to the cluster + * It looks for edges that are connected to the nodes from the "outside' of the cluster. + * + * @param {{Node.id: vis.Node}} childNodesObj + * @param {{vis.Edge.id: vis.Edge}} childEdgesObj + * @param {Object} clusterNodeProperties + * @param {Object} clusterEdgeProperties + * @private + */ + + }, { + key: "_createClusterEdges", + value: function _createClusterEdges(childNodesObj, childEdgesObj, clusterNodeProperties, clusterEdgeProperties) { + var edge, childNodeId, childNode, toId, fromId, otherNodeId; // loop over all child nodes and their edges to find edges going out of the cluster + // these edges will be replaced by clusterEdges. + + var childKeys = Object.keys(childNodesObj); + var createEdges = []; + + for (var i = 0; i < childKeys.length; i++) { + childNodeId = childKeys[i]; + childNode = childNodesObj[childNodeId]; // construct new edges from the cluster to others + + for (var j = 0; j < childNode.edges.length; j++) { + edge = childNode.edges[j]; // we only handle edges that are visible to the system, not the disabled ones from the clustering process. + + if (this.clusteredEdges[edge.id] === undefined) { + // self-referencing edges will be added to the "hidden" list + if (edge.toId == edge.fromId) { + childEdgesObj[edge.id] = edge; + } else { + // set up the from and to. + if (edge.toId == childNodeId) { + // this is a double equals because ints and strings can be interchanged here. + toId = clusterNodeProperties.id; + fromId = edge.fromId; + otherNodeId = fromId; + } else { + toId = edge.toId; + fromId = clusterNodeProperties.id; + otherNodeId = toId; + } + } // Only edges from the cluster outwards are being replaced. + + + if (childNodesObj[otherNodeId] === undefined) { + createEdges.push({ + edge: edge, + fromId: fromId, + toId: toId + }); + } + } + } + } // + // Here we actually create the replacement edges. + // + // We could not do this in the loop above as the creation process + // would add an edge to the edges array we are iterating over. + // + // NOTE: a clustered edge can have multiple base edges! + // + + + var newEdges = []; + /** + * Find a cluster edge which matches the given created edge. + * @param {vis.Edge} createdEdge + * @returns {vis.Edge} + */ + + var getNewEdge = function getNewEdge(createdEdge) { + for (var _j2 = 0; _j2 < newEdges.length; _j2++) { + var newEdge = newEdges[_j2]; // We replace both to and from edges with a single cluster edge + + var matchToDirection = createdEdge.fromId === newEdge.fromId && createdEdge.toId === newEdge.toId; + var matchFromDirection = createdEdge.fromId === newEdge.toId && createdEdge.toId === newEdge.fromId; + + if (matchToDirection || matchFromDirection) { + return newEdge; + } + } + + return null; + }; + + for (var _j3 = 0; _j3 < createEdges.length; _j3++) { + var createdEdge = createEdges[_j3]; + var _edge = createdEdge.edge; + var newEdge = getNewEdge(createdEdge); + + if (newEdge === null) { + // Create a clustered edge for this connection + newEdge = this._createClusteredEdge(createdEdge.fromId, createdEdge.toId, _edge, clusterEdgeProperties); + newEdges.push(newEdge); + } else { + newEdge.clusteringEdgeReplacingIds.push(_edge.id); + } // also reference the new edge in the old edge + + + this.body.edges[_edge.id].edgeReplacedById = newEdge.id; // hide the replaced edge + + this._backupEdgeOptions(_edge); + + _edge.setOptions({ + physics: false + }); + } + } + /** + * This function checks the options that can be supplied to the different cluster functions + * for certain fields and inserts defaults if needed + * @param {Object} options + * @returns {*} + * @private + */ + + }, { + key: "_checkOptions", + value: function _checkOptions() { + var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + + if (options.clusterEdgeProperties === undefined) { + options.clusterEdgeProperties = {}; + } + + if (options.clusterNodeProperties === undefined) { + options.clusterNodeProperties = {}; + } + + return options; + } + /** + * + * @param {Object} childNodesObj | object with node objects, id as keys, same as childNodes except it also contains a source node + * @param {Object} childEdgesObj | object with edge objects, id as keys + * @param {Array} options | object with {clusterNodeProperties, clusterEdgeProperties, processProperties} + * @param {boolean} refreshData | when true, do not wrap up + * @private + */ + + }, { + key: "_cluster", + value: function _cluster(childNodesObj, childEdgesObj, options) { + var refreshData = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true; + // Remove nodes which are already clustered + var tmpNodesToRemove = []; + + for (var nodeId in childNodesObj) { + if (childNodesObj.hasOwnProperty(nodeId)) { + if (this.clusteredNodes[nodeId] !== undefined) { + tmpNodesToRemove.push(nodeId); + } + } + } + + for (var n = 0; n < tmpNodesToRemove.length; ++n) { + delete childNodesObj[tmpNodesToRemove[n]]; + } // kill condition: no nodes don't bother + + + if (Object.keys(childNodesObj).length == 0) { + return; + } // allow clusters of 1 if options allow + + + if (Object.keys(childNodesObj).length == 1 && options.clusterNodeProperties.allowSingleNodeCluster != true) { + return; + } + + var clusterNodeProperties = util.deepExtend({}, options.clusterNodeProperties); // construct the clusterNodeProperties + + if (options.processProperties !== undefined) { + // get the childNode options + var childNodesOptions = []; + + for (var _nodeId in childNodesObj) { + if (childNodesObj.hasOwnProperty(_nodeId)) { + var clonedOptions = NetworkUtil.cloneOptions(childNodesObj[_nodeId]); + childNodesOptions.push(clonedOptions); + } + } // get cluster properties based on childNodes + + + var childEdgesOptions = []; + + for (var edgeId in childEdgesObj) { + if (childEdgesObj.hasOwnProperty(edgeId)) { + // these cluster edges will be removed on creation of the cluster. + if (edgeId.substr(0, 12) !== "clusterEdge:") { + var _clonedOptions = NetworkUtil.cloneOptions(childEdgesObj[edgeId], 'edge'); + + childEdgesOptions.push(_clonedOptions); + } + } + } + + clusterNodeProperties = options.processProperties(clusterNodeProperties, childNodesOptions, childEdgesOptions); + + if (!clusterNodeProperties) { + throw new Error("The processProperties function does not return properties!"); + } + } // check if we have an unique id; + + + if (clusterNodeProperties.id === undefined) { + clusterNodeProperties.id = 'cluster:' + util.randomUUID(); + } + + var clusterId = clusterNodeProperties.id; + + if (clusterNodeProperties.label === undefined) { + clusterNodeProperties.label = 'cluster'; + } // give the clusterNode a position if it does not have one. + + + var pos = undefined; + + if (clusterNodeProperties.x === undefined) { + pos = this._getClusterPosition(childNodesObj); + clusterNodeProperties.x = pos.x; + } + + if (clusterNodeProperties.y === undefined) { + if (pos === undefined) { + pos = this._getClusterPosition(childNodesObj); + } + + clusterNodeProperties.y = pos.y; + } // force the ID to remain the same + + + clusterNodeProperties.id = clusterId; // create the cluster Node + // Note that allowSingleNodeCluster, if present, is stored in the options as well + + var clusterNode = this.body.functions.createNode(clusterNodeProperties, Cluster); + clusterNode.containedNodes = childNodesObj; + clusterNode.containedEdges = childEdgesObj; // cache a copy from the cluster edge properties if we have to reconnect others later on + + clusterNode.clusterEdgeProperties = options.clusterEdgeProperties; // finally put the cluster node into global + + this.body.nodes[clusterNodeProperties.id] = clusterNode; + + this._clusterEdges(childNodesObj, childEdgesObj, clusterNodeProperties, options.clusterEdgeProperties); // set ID to undefined so no duplicates arise + + + clusterNodeProperties.id = undefined; // wrap up + + if (refreshData === true) { + this.body.emitter.emit('_dataChanged'); + } + } + /** + * + * @param {Edge} edge + * @private + */ + + }, { + key: "_backupEdgeOptions", + value: function _backupEdgeOptions(edge) { + if (this.clusteredEdges[edge.id] === undefined) { + this.clusteredEdges[edge.id] = { + physics: edge.options.physics + }; + } + } + /** + * + * @param {Edge} edge + * @private + */ + + }, { + key: "_restoreEdge", + value: function _restoreEdge(edge) { + var originalOptions = this.clusteredEdges[edge.id]; + + if (originalOptions !== undefined) { + edge.setOptions({ + physics: originalOptions.physics + }); + delete this.clusteredEdges[edge.id]; + } + } + /** + * Check if a node is a cluster. + * @param {Node.id} nodeId + * @returns {*} + */ + + }, { + key: "isCluster", + value: function isCluster(nodeId) { + if (this.body.nodes[nodeId] !== undefined) { + return this.body.nodes[nodeId].isCluster === true; + } else { + console.log("Node does not exist."); + return false; + } + } + /** + * get the position of the cluster node based on what's inside + * @param {object} childNodesObj | object with node objects, id as keys + * @returns {{x: number, y: number}} + * @private + */ + + }, { + key: "_getClusterPosition", + value: function _getClusterPosition(childNodesObj) { + var childKeys = Object.keys(childNodesObj); + var minX = childNodesObj[childKeys[0]].x; + var maxX = childNodesObj[childKeys[0]].x; + var minY = childNodesObj[childKeys[0]].y; + var maxY = childNodesObj[childKeys[0]].y; + var node; + + for (var i = 1; i < childKeys.length; i++) { + node = childNodesObj[childKeys[i]]; + minX = node.x < minX ? node.x : minX; + maxX = node.x > maxX ? node.x : maxX; + minY = node.y < minY ? node.y : minY; + maxY = node.y > maxY ? node.y : maxY; + } + + return { + x: 0.5 * (minX + maxX), + y: 0.5 * (minY + maxY) + }; + } + /** + * Open a cluster by calling this function. + * @param {vis.Edge.id} clusterNodeId | the ID of the cluster node + * @param {Object} options + * @param {boolean} refreshData | wrap up afterwards if not true + */ + + }, { + key: "openCluster", + value: function openCluster(clusterNodeId, options) { + var refreshData = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true; + + // kill conditions + if (clusterNodeId === undefined) { + throw new Error("No clusterNodeId supplied to openCluster."); + } + + var clusterNode = this.body.nodes[clusterNodeId]; + + if (clusterNode === undefined) { + throw new Error("The clusterNodeId supplied to openCluster does not exist."); + } + + if (clusterNode.isCluster !== true || clusterNode.containedNodes === undefined || clusterNode.containedEdges === undefined) { + throw new Error("The node:" + clusterNodeId + " is not a valid cluster."); + } // Check if current cluster is clustered itself + + + var stack = this.findNode(clusterNodeId); + var parentIndex = stack.indexOf(clusterNodeId) - 1; + + if (parentIndex >= 0) { + // Current cluster is clustered; transfer contained nodes and edges to parent + var parentClusterNodeId = stack[parentIndex]; + var parentClusterNode = this.body.nodes[parentClusterNodeId]; // clustering.clusteredNodes and clustering.clusteredEdges remain unchanged + + parentClusterNode._openChildCluster(clusterNodeId); // All components of child cluster node have been transferred. It can die now. + + + delete this.body.nodes[clusterNodeId]; + + if (refreshData === true) { + this.body.emitter.emit('_dataChanged'); + } + + return; + } // main body + + + var containedNodes = clusterNode.containedNodes; + var containedEdges = clusterNode.containedEdges; // allow the user to position the nodes after release. + + if (options !== undefined && options.releaseFunction !== undefined && typeof options.releaseFunction === 'function') { + var positions = {}; + var clusterPosition = { + x: clusterNode.x, + y: clusterNode.y + }; + + for (var nodeId in containedNodes) { + if (containedNodes.hasOwnProperty(nodeId)) { + var containedNode = this.body.nodes[nodeId]; + positions[nodeId] = { + x: containedNode.x, + y: containedNode.y + }; + } + } + + var newPositions = options.releaseFunction(clusterPosition, positions); + + for (var _nodeId2 in containedNodes) { + if (containedNodes.hasOwnProperty(_nodeId2)) { + var _containedNode = this.body.nodes[_nodeId2]; + + if (newPositions[_nodeId2] !== undefined) { + _containedNode.x = newPositions[_nodeId2].x === undefined ? clusterNode.x : newPositions[_nodeId2].x; + _containedNode.y = newPositions[_nodeId2].y === undefined ? clusterNode.y : newPositions[_nodeId2].y; + } + } + } + } else { + // copy the position from the cluster + util.forEach(containedNodes, function (containedNode) { + // inherit position + if (containedNode.options.fixed.x === false) { + containedNode.x = clusterNode.x; + } + + if (containedNode.options.fixed.y === false) { + containedNode.y = clusterNode.y; + } + }); + } // release nodes + + + for (var _nodeId3 in containedNodes) { + if (containedNodes.hasOwnProperty(_nodeId3)) { + var _containedNode2 = this.body.nodes[_nodeId3]; // inherit speed + + _containedNode2.vx = clusterNode.vx; + _containedNode2.vy = clusterNode.vy; + + _containedNode2.setOptions({ + physics: true + }); + + delete this.clusteredNodes[_nodeId3]; + } + } // copy the clusterNode edges because we cannot iterate over an object that we add or remove from. + + + var edgesToBeDeleted = []; + + for (var i = 0; i < clusterNode.edges.length; i++) { + edgesToBeDeleted.push(clusterNode.edges[i]); + } // actually handling the deleting. + + + for (var _i2 = 0; _i2 < edgesToBeDeleted.length; _i2++) { + var edge = edgesToBeDeleted[_i2]; + + var otherNodeId = this._getConnectedId(edge, clusterNodeId); + + var otherNode = this.clusteredNodes[otherNodeId]; + + for (var j = 0; j < edge.clusteringEdgeReplacingIds.length; j++) { + var transferId = edge.clusteringEdgeReplacingIds[j]; + var transferEdge = this.body.edges[transferId]; + if (transferEdge === undefined) continue; // if the other node is in another cluster, we transfer ownership of this edge to the other cluster + + if (otherNode !== undefined) { + // transfer ownership: + var otherCluster = this.body.nodes[otherNode.clusterId]; + otherCluster.containedEdges[transferEdge.id] = transferEdge; // delete local reference + + delete containedEdges[transferEdge.id]; // get to and from + + var fromId = transferEdge.fromId; + var toId = transferEdge.toId; + + if (transferEdge.toId == otherNodeId) { + toId = otherNode.clusterId; + } else { + fromId = otherNode.clusterId; + } // create new cluster edge from the otherCluster + + + this._createClusteredEdge(fromId, toId, transferEdge, otherCluster.clusterEdgeProperties, { + hidden: false, + physics: true + }); + } else { + this._restoreEdge(transferEdge); + } + } + + edge.remove(); + } // handle the releasing of the edges + + + for (var edgeId in containedEdges) { + if (containedEdges.hasOwnProperty(edgeId)) { + this._restoreEdge(containedEdges[edgeId]); + } + } // remove clusterNode + + + delete this.body.nodes[clusterNodeId]; + + if (refreshData === true) { + this.body.emitter.emit('_dataChanged'); + } + } + /** + * + * @param {Cluster.id} clusterId + * @returns {Array.} + */ + + }, { + key: "getNodesInCluster", + value: function getNodesInCluster(clusterId) { + var nodesArray = []; + + if (this.isCluster(clusterId) === true) { + var containedNodes = this.body.nodes[clusterId].containedNodes; + + for (var nodeId in containedNodes) { + if (containedNodes.hasOwnProperty(nodeId)) { + nodesArray.push(this.body.nodes[nodeId].id); + } + } + } + + return nodesArray; + } + /** + * Get the stack clusterId's that a certain node resides in. cluster A -> cluster B -> cluster C -> node + * + * If a node can't be found in the chain, return an empty array. + * + * @param {string|number} nodeId + * @returns {Array} + */ + + }, { + key: "findNode", + value: function findNode(nodeId) { + var stack = []; + var max = 100; + var counter = 0; + var node; + + while (this.clusteredNodes[nodeId] !== undefined && counter < max) { + node = this.body.nodes[nodeId]; + if (node === undefined) return []; + stack.push(node.id); + nodeId = this.clusteredNodes[nodeId].clusterId; + counter++; + } + + node = this.body.nodes[nodeId]; + if (node === undefined) return []; + stack.push(node.id); + stack.reverse(); + return stack; + } + /** + * Using a clustered nodeId, update with the new options + * @param {vis.Edge.id} clusteredNodeId + * @param {object} newOptions + */ + + }, { + key: "updateClusteredNode", + value: function updateClusteredNode(clusteredNodeId, newOptions) { + if (clusteredNodeId === undefined) { + throw new Error("No clusteredNodeId supplied to updateClusteredNode."); + } + + if (newOptions === undefined) { + throw new Error("No newOptions supplied to updateClusteredNode."); + } + + if (this.body.nodes[clusteredNodeId] === undefined) { + throw new Error("The clusteredNodeId supplied to updateClusteredNode does not exist."); + } + + this.body.nodes[clusteredNodeId].setOptions(newOptions); + this.body.emitter.emit('_dataChanged'); + } + /** + * Using a base edgeId, update all related clustered edges with the new options + * @param {vis.Edge.id} startEdgeId + * @param {object} newOptions + */ + + }, { + key: "updateEdge", + value: function updateEdge(startEdgeId, newOptions) { + if (startEdgeId === undefined) { + throw new Error("No startEdgeId supplied to updateEdge."); + } + + if (newOptions === undefined) { + throw new Error("No newOptions supplied to updateEdge."); + } + + if (this.body.edges[startEdgeId] === undefined) { + throw new Error("The startEdgeId supplied to updateEdge does not exist."); + } + + var allEdgeIds = this.getClusteredEdges(startEdgeId); + + for (var i = 0; i < allEdgeIds.length; i++) { + var edge = this.body.edges[allEdgeIds[i]]; + edge.setOptions(newOptions); + } + + this.body.emitter.emit('_dataChanged'); + } + /** + * Get a stack of clusterEdgeId's (+base edgeid) that a base edge is the same as. cluster edge C -> cluster edge B -> cluster edge A -> base edge(edgeId) + * @param {vis.Edge.id} edgeId + * @returns {Array.} + */ + + }, { + key: "getClusteredEdges", + value: function getClusteredEdges(edgeId) { + var stack = []; + var max = 100; + var counter = 0; + + while (edgeId !== undefined && this.body.edges[edgeId] !== undefined && counter < max) { + stack.push(this.body.edges[edgeId].id); + edgeId = this.body.edges[edgeId].edgeReplacedById; + counter++; + } + + stack.reverse(); + return stack; + } + /** + * Get the base edge id of clusterEdgeId. cluster edge (clusteredEdgeId) -> cluster edge B -> cluster edge C -> base edge + * @param {vis.Edge.id} clusteredEdgeId + * @returns {vis.Edge.id} baseEdgeId + * + * TODO: deprecate in 5.0.0. Method getBaseEdges() is the correct one to use. + */ + + }, { + key: "getBaseEdge", + value: function getBaseEdge(clusteredEdgeId) { + // Just kludge this by returning the first base edge id found + return this.getBaseEdges(clusteredEdgeId)[0]; + } + /** + * Get all regular edges for this clustered edge id. + * + * @param {vis.Edge.id} clusteredEdgeId + * @returns {Array.} all baseEdgeId's under this clustered edge + */ + + }, { + key: "getBaseEdges", + value: function getBaseEdges(clusteredEdgeId) { + var IdsToHandle = [clusteredEdgeId]; + var doneIds = []; + var foundIds = []; + var max = 100; + var counter = 0; + + while (IdsToHandle.length > 0 && counter < max) { + var nextId = IdsToHandle.pop(); + if (nextId === undefined) continue; // Paranoia here and onwards + + var nextEdge = this.body.edges[nextId]; + if (nextEdge === undefined) continue; + counter++; + var replacingIds = nextEdge.clusteringEdgeReplacingIds; + + if (replacingIds === undefined) { + // nextId is a base id + foundIds.push(nextId); + } else { + // Another cluster edge, unravel this one as well + for (var i = 0; i < replacingIds.length; ++i) { + var replacingId = replacingIds[i]; // Don't add if already handled + // TODO: never triggers; find a test-case which does + + if (IdsToHandle.indexOf(replacingIds) !== -1 || doneIds.indexOf(replacingIds) !== -1) { + continue; + } + + IdsToHandle.push(replacingId); + } + } + + doneIds.push(nextId); + } + + return foundIds; + } + /** + * Get the Id the node is connected to + * @param {vis.Edge} edge + * @param {Node.id} nodeId + * @returns {*} + * @private + */ + + }, { + key: "_getConnectedId", + value: function _getConnectedId(edge, nodeId) { + if (edge.toId != nodeId) { + return edge.toId; + } else if (edge.fromId != nodeId) { + return edge.fromId; + } else { + return edge.fromId; + } + } + /** + * We determine how many connections denote an important hub. + * We take the mean + 2*std as the important hub size. (Assuming a normal distribution of data, ~2.2%) + * + * @returns {number} + * @private + */ + + }, { + key: "_getHubSize", + value: function _getHubSize() { + var average = 0; + var averageSquared = 0; + var hubCounter = 0; + var largestHub = 0; + + for (var i = 0; i < this.body.nodeIndices.length; i++) { + var node = this.body.nodes[this.body.nodeIndices[i]]; + + if (node.edges.length > largestHub) { + largestHub = node.edges.length; + } + + average += node.edges.length; + averageSquared += Math.pow(node.edges.length, 2); + hubCounter += 1; + } + + average = average / hubCounter; + averageSquared = averageSquared / hubCounter; + var variance = averageSquared - Math.pow(average, 2); + var standardDeviation = Math.sqrt(variance); + var hubThreshold = Math.floor(average + 2 * standardDeviation); // always have at least one to cluster + + if (hubThreshold > largestHub) { + hubThreshold = largestHub; + } + + return hubThreshold; + } + /** + * Create an edge for the cluster representation. + * + * @param {Node.id} fromId + * @param {Node.id} toId + * @param {vis.Edge} baseEdge + * @param {Object} clusterEdgeProperties + * @param {Object} extraOptions + * @returns {Edge} newly created clustered edge + * @private + */ + + }, { + key: "_createClusteredEdge", + value: function _createClusteredEdge(fromId, toId, baseEdge, clusterEdgeProperties, extraOptions) { + // copy the options of the edge we will replace + var clonedOptions = NetworkUtil.cloneOptions(baseEdge, 'edge'); // make sure the properties of clusterEdges are superimposed on it + + util.deepExtend(clonedOptions, clusterEdgeProperties); // set up the edge + + clonedOptions.from = fromId; + clonedOptions.to = toId; + clonedOptions.id = 'clusterEdge:' + util.randomUUID(); // apply the edge specific options to it if specified + + if (extraOptions !== undefined) { + util.deepExtend(clonedOptions, extraOptions); + } + + var newEdge = this.body.functions.createEdge(clonedOptions); + newEdge.clusteringEdgeReplacingIds = [baseEdge.id]; + newEdge.connect(); // Register the new edge + + this.body.edges[newEdge.id] = newEdge; + return newEdge; + } + /** + * Add the passed child nodes and edges to the given cluster node. + * + * @param {Object|Node} childNodes hash of nodes or single node to add in cluster + * @param {Object|Edge} childEdges hash of edges or single edge to take into account when clustering + * @param {Node} clusterNode cluster node to add nodes and edges to + * @param {Object} [clusterEdgeProperties] + * @private + */ + + }, { + key: "_clusterEdges", + value: function _clusterEdges(childNodes, childEdges, clusterNode, clusterEdgeProperties) { + if (childEdges instanceof Edge) { + var edge = childEdges; + var obj = {}; + obj[edge.id] = edge; + childEdges = obj; + } + + if (childNodes instanceof Node) { + var node = childNodes; + var _obj = {}; + _obj[node.id] = node; + childNodes = _obj; + } + + if (clusterNode === undefined || clusterNode === null) { + throw new Error("_clusterEdges: parameter clusterNode required"); + } + + if (clusterEdgeProperties === undefined) { + // Take the required properties from the cluster node + clusterEdgeProperties = clusterNode.clusterEdgeProperties; + } // create the new edges that will connect to the cluster. + // All self-referencing edges will be added to childEdges here. + + + this._createClusterEdges(childNodes, childEdges, clusterNode, clusterEdgeProperties); // disable the childEdges + + + for (var edgeId in childEdges) { + if (childEdges.hasOwnProperty(edgeId)) { + if (this.body.edges[edgeId] !== undefined) { + var _edge2 = this.body.edges[edgeId]; // cache the options before changing + + this._backupEdgeOptions(_edge2); // disable physics and hide the edge + + + _edge2.setOptions({ + physics: false + }); + } + } + } // disable the childNodes + + + for (var nodeId in childNodes) { + if (childNodes.hasOwnProperty(nodeId)) { + this.clusteredNodes[nodeId] = { + clusterId: clusterNode.id, + node: this.body.nodes[nodeId] + }; + this.body.nodes[nodeId].setOptions({ + physics: false + }); + } + } + } + /** + * Determine in which cluster given nodeId resides. + * + * If not in cluster, return undefined. + * + * NOTE: If you know a cleaner way to do this, please enlighten me (wimrijnders). + * + * @param {Node.id} nodeId + * @returns {Node|undefined} Node instance for cluster, if present + * @private + */ + + }, { + key: "_getClusterNodeForNode", + value: function _getClusterNodeForNode(nodeId) { + if (nodeId === undefined) return undefined; + var clusteredNode = this.clusteredNodes[nodeId]; // NOTE: If no cluster info found, it should actually be an error + + if (clusteredNode === undefined) return undefined; + var clusterId = clusteredNode.clusterId; + if (clusterId === undefined) return undefined; + return this.body.nodes[clusterId]; + } + /** + * Internal helper function for conditionally removing items in array + * + * Done like this because Array.filter() is not fully supported by all IE's. + * + * @param {Array} arr + * @param {function} callback + * @returns {Array} + * @private + */ + + }, { + key: "_filter", + value: function _filter(arr, callback) { + var ret = []; + util.forEach(arr, function (item) { + if (callback(item)) { + ret.push(item); + } + }); + return ret; + } + /** + * Scan all edges for changes in clustering and adjust this if necessary. + * + * Call this (internally) after there has been a change in node or edge data. + * + * Pre: States of this.body.nodes and this.body.edges consistent + * Pre: this.clusteredNodes and this.clusteredEdge consistent with containedNodes and containedEdges + * of cluster nodes. + */ + + }, { + key: "_updateState", + value: function _updateState() { + var _this4 = this; + + var nodeId; + var deletedNodeIds = []; + var deletedEdgeIds = {}; + /** + * Utility function to iterate over clustering nodes only + * + * @param {Function} callback function to call for each cluster node + */ + + var eachClusterNode = function eachClusterNode(callback) { + util.forEach(_this4.body.nodes, function (node) { + if (node.isCluster === true) { + callback(node); + } + }); + }; // + // Remove deleted regular nodes from clustering + // + // Determine the deleted nodes + + + for (nodeId in this.clusteredNodes) { + if (!this.clusteredNodes.hasOwnProperty(nodeId)) continue; + var node = this.body.nodes[nodeId]; + + if (node === undefined) { + deletedNodeIds.push(nodeId); + } + } // Remove nodes from cluster nodes + + + eachClusterNode(function (clusterNode) { + for (var n = 0; n < deletedNodeIds.length; n++) { + delete clusterNode.containedNodes[deletedNodeIds[n]]; + } + }); // Remove nodes from cluster list + + for (var n = 0; n < deletedNodeIds.length; n++) { + delete this.clusteredNodes[deletedNodeIds[n]]; + } // + // Remove deleted edges from clustering + // + // Add the deleted clustered edges to the list + + + util.forEach(this.clusteredEdges, function (edgeId) { + var edge = _this4.body.edges[edgeId]; + + if (edge === undefined || !edge.endPointsValid()) { + deletedEdgeIds[edgeId] = edgeId; + } + }); // Cluster nodes can also contain edges which are not clustered, + // i.e. nodes 1-2 within cluster with an edge in between. + // So the cluster nodes also need to be scanned for invalid edges + + eachClusterNode(function (clusterNode) { + util.forEach(clusterNode.containedEdges, function (edge, edgeId) { + if (!edge.endPointsValid() && !deletedEdgeIds[edgeId]) { + deletedEdgeIds[edgeId] = edgeId; + } + }); + }); // Also scan for cluster edges which need to be removed in the active list. + // Regular edges have been removed beforehand, so this only picks up the cluster edges. + + util.forEach(this.body.edges, function (edge, edgeId) { + // Explicitly scan the contained edges for validity + var isValid = true; + var replacedIds = edge.clusteringEdgeReplacingIds; + + if (replacedIds !== undefined) { + var numValid = 0; + util.forEach(replacedIds, function (containedEdgeId) { + var containedEdge = _this4.body.edges[containedEdgeId]; + + if (containedEdge !== undefined && containedEdge.endPointsValid()) { + numValid += 1; + } + }); + isValid = numValid > 0; + } + + if (!edge.endPointsValid() || !isValid) { + deletedEdgeIds[edgeId] = edgeId; + } + }); // Remove edges from cluster nodes + + eachClusterNode(function (clusterNode) { + util.forEach(deletedEdgeIds, function (deletedEdgeId) { + delete clusterNode.containedEdges[deletedEdgeId]; + util.forEach(clusterNode.edges, function (edge, m) { + if (edge.id === deletedEdgeId) { + clusterNode.edges[m] = null; // Don't want to directly delete here, because in the loop + + return; + } + + edge.clusteringEdgeReplacingIds = _this4._filter(edge.clusteringEdgeReplacingIds, function (id) { + return !deletedEdgeIds[id]; + }); + }); // Clean up the nulls + + clusterNode.edges = _this4._filter(clusterNode.edges, function (item) { + return item !== null; + }); + }); + }); // Remove from cluster list + + util.forEach(deletedEdgeIds, function (edgeId) { + delete _this4.clusteredEdges[edgeId]; + }); // Remove cluster edges from active list (this.body.edges). + // deletedEdgeIds still contains id of regular edges, but these should all + // be gone when you reach here. + + util.forEach(deletedEdgeIds, function (edgeId) { + delete _this4.body.edges[edgeId]; + }); // + // Check changed cluster state of edges + // + // Iterating over keys here, because edges may be removed in the loop + + var ids = Object.keys(this.body.edges); + util.forEach(ids, function (edgeId) { + var edge = _this4.body.edges[edgeId]; + + var shouldBeClustered = _this4._isClusteredNode(edge.fromId) || _this4._isClusteredNode(edge.toId); + + if (shouldBeClustered === _this4._isClusteredEdge(edge.id)) { + return; // all is well + } + + if (shouldBeClustered) { + // add edge to clustering + var clusterFrom = _this4._getClusterNodeForNode(edge.fromId); + + if (clusterFrom !== undefined) { + _this4._clusterEdges(_this4.body.nodes[edge.fromId], edge, clusterFrom); + } + + var clusterTo = _this4._getClusterNodeForNode(edge.toId); + + if (clusterTo !== undefined) { + _this4._clusterEdges(_this4.body.nodes[edge.toId], edge, clusterTo); + } // TODO: check that it works for both edges clustered + // (This might be paranoia) + + } else { + delete _this4._clusterEdges[edgeId]; + + _this4._restoreEdge(edge); // This should not be happening, the state should + // be properly updated at this point. + // + // If it *is* reached during normal operation, then we have to implement + // undo clustering for this edge here. + // throw new Error('remove edge from clustering not implemented!') + + } + }); // Clusters may be nested to any level. Keep on opening until nothing to open + + var changed = false; + var continueLoop = true; + + var _loop2 = function _loop2() { + var clustersToOpen = []; // Determine the id's of clusters that need opening + + eachClusterNode(function (clusterNode) { + var numNodes = Object.keys(clusterNode.containedNodes).length; + var allowSingle = clusterNode.options.allowSingleNodeCluster === true; + + if (allowSingle && numNodes < 1 || !allowSingle && numNodes < 2) { + clustersToOpen.push(clusterNode.id); + } + }); // Open them + + for (var _n = 0; _n < clustersToOpen.length; ++_n) { + _this4.openCluster(clustersToOpen[_n], {}, false + /* Don't refresh, we're in an refresh/update already */ + ); + } + + continueLoop = clustersToOpen.length > 0; + changed = changed || continueLoop; + }; + + while (continueLoop) { + _loop2(); + } + + if (changed) { + this._updateState(); // Redo this method (recursion possible! should be safe) + + } + } + /** + * Determine if node with given id is part of a cluster. + * + * @param {Node.id} nodeId + * @return {boolean} true if part of a cluster. + */ + + }, { + key: "_isClusteredNode", + value: function _isClusteredNode(nodeId) { + return this.clusteredNodes[nodeId] !== undefined; + } + /** + * Determine if edge with given id is not visible due to clustering. + * + * An edge is considered clustered if: + * - it is directly replaced by a clustering edge + * - any of its connecting nodes is in a cluster + * + * @param {vis.Edge.id} edgeId + * @return {boolean} true if part of a cluster. + */ + + }, { + key: "_isClusteredEdge", + value: function _isClusteredEdge(edgeId) { + return this.clusteredEdges[edgeId] !== undefined; + } + }]); + + return ClusterEngine; + }(); + + /** + * Initializes window.requestAnimationFrame() to a usable form. + * + * Specifically, set up this method for the case of running on node.js with jsdom enabled. + * + * NOTES: + * + * * On node.js, when calling this directly outside of this class, `window` is not defined. + * This happens even if jsdom is used. + * * For node.js + jsdom, `window` is available at the moment the constructor is called. + * For this reason, the called is placed within the constructor. + * * Even then, `window.requestAnimationFrame()` is not defined, so it still needs to be added. + * * During unit testing, it happens that the window object is reset during execution, causing + * a runtime error due to missing `requestAnimationFrame()`. This needs to be compensated for, + * see `_requestNextFrame()`. + * * Since this is a global object, it may affect other modules besides `Network`. With normal + * usage, this does not cause any problems. During unit testing, errors may occur. These have + * been compensated for, see comment block in _requestNextFrame(). + * + * @private + */ + function _initRequestAnimationFrame() { + var func; + + if (window !== undefined) { + func = window.requestAnimationFrame || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame || window.msRequestAnimationFrame; + } + + if (func === undefined) { + // window or method not present, setting mock requestAnimationFrame + window.requestAnimationFrame = function (callback) { + //console.log("Called mock requestAnimationFrame"); + callback(); + }; + } else { + window.requestAnimationFrame = func; + } + } + /** + * The canvas renderer + */ + + var CanvasRenderer = + /*#__PURE__*/ + function () { + /** + * @param {Object} body + * @param {Canvas} canvas + */ + function CanvasRenderer(body, canvas) { + classCallCheck$1(this, CanvasRenderer); + + _initRequestAnimationFrame(); + + this.body = body; + this.canvas = canvas; + this.redrawRequested = false; + this.renderTimer = undefined; + this.requiresTimeout = true; + this.renderingActive = false; + this.renderRequests = 0; + this.allowRedraw = true; + this.dragging = false; + this.zooming = false; + this.options = {}; + this.defaultOptions = { + hideEdgesOnDrag: false, + hideEdgesOnZoom: false, + hideNodesOnDrag: false + }; + util.extend(this.options, this.defaultOptions); + + this._determineBrowserMethod(); + + this.bindEventListeners(); + } + /** + * Binds event listeners + */ + + + createClass$1(CanvasRenderer, [{ + key: "bindEventListeners", + value: function bindEventListeners() { + var _this = this; + + this.body.emitter.on("dragStart", function () { + _this.dragging = true; + }); + this.body.emitter.on("dragEnd", function () { + _this.dragging = false; + }); + this.body.emitter.on("zoom", function () { + _this.zooming = true; + window.clearTimeout(_this.zoomTimeoutId); + _this.zoomTimeoutId = window.setTimeout(function () { + _this.zooming = false; + + _this._requestRedraw.bind(_this)(); + }, 250); + }); + this.body.emitter.on("_resizeNodes", function () { + _this._resizeNodes(); + }); + this.body.emitter.on("_redraw", function () { + if (_this.renderingActive === false) { + _this._redraw(); + } + }); + this.body.emitter.on("_blockRedraw", function () { + _this.allowRedraw = false; + }); + this.body.emitter.on("_allowRedraw", function () { + _this.allowRedraw = true; + _this.redrawRequested = false; + }); + this.body.emitter.on("_requestRedraw", this._requestRedraw.bind(this)); + this.body.emitter.on("_startRendering", function () { + _this.renderRequests += 1; + _this.renderingActive = true; + + _this._startRendering(); + }); + this.body.emitter.on("_stopRendering", function () { + _this.renderRequests -= 1; + _this.renderingActive = _this.renderRequests > 0; + _this.renderTimer = undefined; + }); + this.body.emitter.on('destroy', function () { + _this.renderRequests = 0; + _this.allowRedraw = false; + _this.renderingActive = false; + + if (_this.requiresTimeout === true) { + clearTimeout(_this.renderTimer); + } else { + window.cancelAnimationFrame(_this.renderTimer); + } + + _this.body.emitter.off(); + }); + } + /** + * + * @param {Object} options + */ + + }, { + key: "setOptions", + value: function setOptions(options) { + if (options !== undefined) { + var fields = ['hideEdgesOnDrag', 'hideEdgesOnZoom', 'hideNodesOnDrag']; + util.selectiveDeepExtend(fields, this.options, options); + } + } + /** + * Prepare the drawing of the next frame. + * + * Calls the callback when the next frame can or will be drawn. + * + * @param {function} callback + * @param {number} delay - timeout case only, wait this number of milliseconds + * @returns {function|undefined} + * @private + */ + + }, { + key: "_requestNextFrame", + value: function _requestNextFrame(callback, delay) { + // During unit testing, it happens that the mock window object is reset while + // the next frame is still pending. Then, either 'window' is not present, or + // 'requestAnimationFrame()' is not present because it is not defined on the + // mock window object. + // + // As a consequence, unrelated unit tests may appear to fail, even if the problem + // described happens in the current unit test. + // + // This is not something that will happen in normal operation, but we still need + // to take it into account. + // + if (typeof window === 'undefined') return; // Doing `if (window === undefined)` does not work here! + + var timer; + var myWindow = window; // Grab a reference to reduce the possibility that 'window' is reset + // while running this method. + + if (this.requiresTimeout === true) { + // wait given number of milliseconds and perform the animation step function + timer = myWindow.setTimeout(callback, delay); + } else { + if (myWindow.requestAnimationFrame) { + timer = myWindow.requestAnimationFrame(callback); + } + } + + return timer; + } + /** + * + * @private + */ + + }, { + key: "_startRendering", + value: function _startRendering() { + if (this.renderingActive === true) { + if (this.renderTimer === undefined) { + this.renderTimer = this._requestNextFrame(this._renderStep.bind(this), this.simulationInterval); + } + } + } + /** + * + * @private + */ + + }, { + key: "_renderStep", + value: function _renderStep() { + if (this.renderingActive === true) { + // reset the renderTimer so a new scheduled animation step can be set + this.renderTimer = undefined; + + if (this.requiresTimeout === true) { + // this schedules a new simulation step + this._startRendering(); + } + + this._redraw(); + + if (this.requiresTimeout === false) { + // this schedules a new simulation step + this._startRendering(); + } + } + } + /** + * Redraw the network with the current data + * chart will be resized too. + */ + + }, { + key: "redraw", + value: function redraw() { + this.body.emitter.emit('setSize'); + + this._redraw(); + } + /** + * Redraw the network with the current data + * @private + */ + + }, { + key: "_requestRedraw", + value: function _requestRedraw() { + var _this2 = this; + + if (this.redrawRequested !== true && this.renderingActive === false && this.allowRedraw === true) { + this.redrawRequested = true; + + this._requestNextFrame(function () { + _this2._redraw(false); + }, 0); + } + } + /** + * Redraw the network with the current data + * @param {boolean} [hidden=false] | Used to get the first estimate of the node sizes. + * Only the nodes are drawn after which they are quickly drawn over. + * @private + */ + + }, { + key: "_redraw", + value: function _redraw() { + var hidden = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; + + if (this.allowRedraw === true) { + this.body.emitter.emit("initRedraw"); + this.redrawRequested = false; // when the container div was hidden, this fixes it back up! + + if (this.canvas.frame.canvas.width === 0 || this.canvas.frame.canvas.height === 0) { + this.canvas.setSize(); + } + + this.canvas.setTransform(); + var ctx = this.canvas.getContext(); // clear the canvas + + var w = this.canvas.frame.canvas.clientWidth; + var h = this.canvas.frame.canvas.clientHeight; + ctx.clearRect(0, 0, w, h); // if the div is hidden, we stop the redraw here for performance. + + if (this.canvas.frame.clientWidth === 0) { + return; + } // set scaling and translation + + + ctx.save(); + ctx.translate(this.body.view.translation.x, this.body.view.translation.y); + ctx.scale(this.body.view.scale, this.body.view.scale); + ctx.beginPath(); + this.body.emitter.emit("beforeDrawing", ctx); + ctx.closePath(); + + if (hidden === false) { + if ((this.dragging === false || this.dragging === true && this.options.hideEdgesOnDrag === false) && (this.zooming === false || this.zooming === true && this.options.hideEdgesOnZoom === false)) { + this._drawEdges(ctx); + } + } + + if (this.dragging === false || this.dragging === true && this.options.hideNodesOnDrag === false) { + this._drawNodes(ctx, hidden); + } + + ctx.beginPath(); + this.body.emitter.emit("afterDrawing", ctx); + ctx.closePath(); // restore original scaling and translation + + ctx.restore(); + + if (hidden === true) { + ctx.clearRect(0, 0, w, h); + } + } + } + /** + * Redraw all nodes + * + * @param {CanvasRenderingContext2D} ctx + * @param {boolean} [alwaysShow] + * @private + */ + + }, { + key: "_resizeNodes", + value: function _resizeNodes() { + this.canvas.setTransform(); + var ctx = this.canvas.getContext(); + ctx.save(); + ctx.translate(this.body.view.translation.x, this.body.view.translation.y); + ctx.scale(this.body.view.scale, this.body.view.scale); + var nodes = this.body.nodes; + var node; // resize all nodes + + for (var nodeId in nodes) { + if (nodes.hasOwnProperty(nodeId)) { + node = nodes[nodeId]; + node.resize(ctx); + node.updateBoundingBox(ctx, node.selected); + } + } // restore original scaling and translation + + + ctx.restore(); + } + /** + * Redraw all nodes + * + * @param {CanvasRenderingContext2D} ctx 2D context of a HTML canvas + * @param {boolean} [alwaysShow] + * @private + */ + + }, { + key: "_drawNodes", + value: function _drawNodes(ctx) { + var alwaysShow = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; + var nodes = this.body.nodes; + var nodeIndices = this.body.nodeIndices; + var node; + var selected = []; + var margin = 20; + var topLeft = this.canvas.DOMtoCanvas({ + x: -margin, + y: -margin + }); + var bottomRight = this.canvas.DOMtoCanvas({ + x: this.canvas.frame.canvas.clientWidth + margin, + y: this.canvas.frame.canvas.clientHeight + margin + }); + var viewableArea = { + top: topLeft.y, + left: topLeft.x, + bottom: bottomRight.y, + right: bottomRight.x + }; // draw unselected nodes; + + for (var i = 0; i < nodeIndices.length; i++) { + node = nodes[nodeIndices[i]]; // set selected nodes aside + + if (node.isSelected()) { + selected.push(nodeIndices[i]); + } else { + if (alwaysShow === true) { + node.draw(ctx); + } else if (node.isBoundingBoxOverlappingWith(viewableArea) === true) { + node.draw(ctx); + } else { + node.updateBoundingBox(ctx, node.selected); + } + } + } // draw the selected nodes on top + + + for (var _i = 0; _i < selected.length; _i++) { + node = nodes[selected[_i]]; + node.draw(ctx); + } + } + /** + * Redraw all edges + * @param {CanvasRenderingContext2D} ctx 2D context of a HTML canvas + * @private + */ + + }, { + key: "_drawEdges", + value: function _drawEdges(ctx) { + var edges = this.body.edges; + var edgeIndices = this.body.edgeIndices; + var edge; + + for (var i = 0; i < edgeIndices.length; i++) { + edge = edges[edgeIndices[i]]; + + if (edge.connected === true) { + edge.draw(ctx); + } + } + } + /** + * Determine if the browser requires a setTimeout or a requestAnimationFrame. This was required because + * some implementations (safari and IE9) did not support requestAnimationFrame + * @private + */ + + }, { + key: "_determineBrowserMethod", + value: function _determineBrowserMethod() { + if (typeof window !== 'undefined') { + var browserType = navigator.userAgent.toLowerCase(); + this.requiresTimeout = false; + + if (browserType.indexOf('msie 9.0') != -1) { + // IE 9 + this.requiresTimeout = true; + } else if (browserType.indexOf('safari') != -1) { + // safari + if (browserType.indexOf('chrome') <= -1) { + this.requiresTimeout = true; + } + } + } else { + this.requiresTimeout = true; + } + } + }]); + + return CanvasRenderer; + }(); + + var hammerUtil = createCommonjsModule$2(function (module, exports) { + /** + * Register a touch event, taking place before a gesture + * @param {Hammer} hammer A hammer instance + * @param {function} callback Callback, called as callback(event) + */ + exports.onTouch = function (hammer, callback) { + callback.inputHandler = function (event) { + if (event.isFirst) { + callback(event); + } + }; + + hammer.on('hammer.input', callback.inputHandler); + }; + /** + * Register a release event, taking place after a gesture + * @param {Hammer} hammer A hammer instance + * @param {function} callback Callback, called as callback(event) + * @returns {*} + */ + + + exports.onRelease = function (hammer, callback) { + callback.inputHandler = function (event) { + if (event.isFinal) { + callback(event); + } + }; + + return hammer.on('hammer.input', callback.inputHandler); + }; + /** + * Unregister a touch event, taking place before a gesture + * @param {Hammer} hammer A hammer instance + * @param {function} callback Callback, called as callback(event) + */ + + + exports.offTouch = function (hammer, callback) { + hammer.off('hammer.input', callback.inputHandler); + }; + /** + * Unregister a release event, taking place before a gesture + * @param {Hammer} hammer A hammer instance + * @param {function} callback Callback, called as callback(event) + */ + + + exports.offRelease = exports.offTouch; + /** + * Hack the PinchRecognizer such that it doesn't prevent default behavior + * for vertical panning. + * + * Yeah ... this is quite a hack ... see https://github.com/hammerjs/hammer.js/issues/932 + * + * @param {Hammer.Pinch} pinchRecognizer + * @return {Hammer.Pinch} returns the pinchRecognizer + */ + + exports.disablePreventDefaultVertically = function (pinchRecognizer) { + var TOUCH_ACTION_PAN_Y = 'pan-y'; + + pinchRecognizer.getTouchAction = function () { + // default method returns [TOUCH_ACTION_NONE] + return [TOUCH_ACTION_PAN_Y]; + }; + + return pinchRecognizer; + }; + }); + var hammerUtil_1 = hammerUtil.onTouch; + var hammerUtil_2 = hammerUtil.onRelease; + var hammerUtil_3 = hammerUtil.offTouch; + var hammerUtil_4 = hammerUtil.offRelease; + var hammerUtil_5 = hammerUtil.disablePreventDefaultVertically; + + /** + * Create the main frame for the Network. + * This function is executed once when a Network object is created. The frame + * contains a canvas, and this canvas contains all objects like the axis and + * nodes. + */ + + var Canvas = + /*#__PURE__*/ + function () { + /** + * @param {Object} body + */ + function Canvas(body) { + classCallCheck$1(this, Canvas); + + this.body = body; + this.pixelRatio = 1; + this.resizeTimer = undefined; + this.resizeFunction = this._onResize.bind(this); + this.cameraState = {}; + this.initialized = false; + this.canvasViewCenter = {}; + this.options = {}; + this.defaultOptions = { + autoResize: true, + height: '100%', + width: '100%' + }; + util.extend(this.options, this.defaultOptions); + this.bindEventListeners(); + } + /** + * Binds event listeners + */ + + + createClass$1(Canvas, [{ + key: "bindEventListeners", + value: function bindEventListeners() { + var _this = this; + + // bind the events + this.body.emitter.once("resize", function (obj) { + if (obj.width !== 0) { + _this.body.view.translation.x = obj.width * 0.5; + } + + if (obj.height !== 0) { + _this.body.view.translation.y = obj.height * 0.5; + } + }); + this.body.emitter.on("setSize", this.setSize.bind(this)); + this.body.emitter.on("destroy", function () { + _this.hammerFrame.destroy(); + + _this.hammer.destroy(); + + _this._cleanUp(); + }); + } + /** + * @param {Object} options + */ + + }, { + key: "setOptions", + value: function setOptions(options) { + var _this2 = this; + + if (options !== undefined) { + var fields = ['width', 'height', 'autoResize']; + util.selectiveDeepExtend(fields, this.options, options); + } + + if (this.options.autoResize === true) { + // automatically adapt to a changing size of the browser. + this._cleanUp(); + + this.resizeTimer = setInterval(function () { + var changed = _this2.setSize(); + + if (changed === true) { + _this2.body.emitter.emit("_requestRedraw"); + } + }, 1000); + this.resizeFunction = this._onResize.bind(this); + util.addEventListener(window, 'resize', this.resizeFunction); + } + } + /** + * @private + */ + + }, { + key: "_cleanUp", + value: function _cleanUp() { + // automatically adapt to a changing size of the browser. + if (this.resizeTimer !== undefined) { + clearInterval(this.resizeTimer); + } + + util.removeEventListener(window, 'resize', this.resizeFunction); + this.resizeFunction = undefined; + } + /** + * @private + */ + + }, { + key: "_onResize", + value: function _onResize() { + this.setSize(); + this.body.emitter.emit("_redraw"); + } + /** + * Get and store the cameraState + * + * @param {number} [pixelRatio=this.pixelRatio] + * @private + */ + + }, { + key: "_getCameraState", + value: function _getCameraState() { + var pixelRatio = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.pixelRatio; + + if (this.initialized === true) { + this.cameraState.previousWidth = this.frame.canvas.width / pixelRatio; + this.cameraState.previousHeight = this.frame.canvas.height / pixelRatio; + this.cameraState.scale = this.body.view.scale; + this.cameraState.position = this.DOMtoCanvas({ + x: 0.5 * this.frame.canvas.width / pixelRatio, + y: 0.5 * this.frame.canvas.height / pixelRatio + }); + } + } + /** + * Set the cameraState + * @private + */ + + }, { + key: "_setCameraState", + value: function _setCameraState() { + if (this.cameraState.scale !== undefined && this.frame.canvas.clientWidth !== 0 && this.frame.canvas.clientHeight !== 0 && this.pixelRatio !== 0 && this.cameraState.previousWidth > 0) { + var widthRatio = this.frame.canvas.width / this.pixelRatio / this.cameraState.previousWidth; + var heightRatio = this.frame.canvas.height / this.pixelRatio / this.cameraState.previousHeight; + var newScale = this.cameraState.scale; + + if (widthRatio != 1 && heightRatio != 1) { + newScale = this.cameraState.scale * 0.5 * (widthRatio + heightRatio); + } else if (widthRatio != 1) { + newScale = this.cameraState.scale * widthRatio; + } else if (heightRatio != 1) { + newScale = this.cameraState.scale * heightRatio; + } + + this.body.view.scale = newScale; // this comes from the view module. + + var currentViewCenter = this.DOMtoCanvas({ + x: 0.5 * this.frame.canvas.clientWidth, + y: 0.5 * this.frame.canvas.clientHeight + }); + var distanceFromCenter = { + // offset from view, distance view has to change by these x and y to center the node + x: currentViewCenter.x - this.cameraState.position.x, + y: currentViewCenter.y - this.cameraState.position.y + }; + this.body.view.translation.x += distanceFromCenter.x * this.body.view.scale; + this.body.view.translation.y += distanceFromCenter.y * this.body.view.scale; + } + } + /** + * + * @param {number|string} value + * @returns {string} + * @private + */ + + }, { + key: "_prepareValue", + value: function _prepareValue(value) { + if (typeof value === 'number') { + return value + 'px'; + } else if (typeof value === 'string') { + if (value.indexOf('%') !== -1 || value.indexOf('px') !== -1) { + return value; + } else if (value.indexOf('%') === -1) { + return value + 'px'; + } + } + + throw new Error('Could not use the value supplied for width or height:' + value); + } + /** + * Create the HTML + */ + + }, { + key: "_create", + value: function _create() { + // remove all elements from the container element. + while (this.body.container.hasChildNodes()) { + this.body.container.removeChild(this.body.container.firstChild); + } + + this.frame = document.createElement('div'); + this.frame.className = 'vis-network'; + this.frame.style.position = 'relative'; + this.frame.style.overflow = 'hidden'; + this.frame.tabIndex = 900; // tab index is required for keycharm to bind keystrokes to the div instead of the window + ////////////////////////////////////////////////////////////////// + + this.frame.canvas = document.createElement("canvas"); + this.frame.canvas.style.position = 'relative'; + this.frame.appendChild(this.frame.canvas); + + if (!this.frame.canvas.getContext) { + var noCanvas = document.createElement('DIV'); + noCanvas.style.color = 'red'; + noCanvas.style.fontWeight = 'bold'; + noCanvas.style.padding = '10px'; + noCanvas.innerHTML = 'Error: your browser does not support HTML canvas'; + this.frame.canvas.appendChild(noCanvas); + } else { + this._setPixelRatio(); + + this.setTransform(); + } // add the frame to the container element + + + this.body.container.appendChild(this.frame); + this.body.view.scale = 1; + this.body.view.translation = { + x: 0.5 * this.frame.canvas.clientWidth, + y: 0.5 * this.frame.canvas.clientHeight + }; + + this._bindHammer(); + } + /** + * This function binds hammer, it can be repeated over and over due to the uniqueness check. + * @private + */ + + }, { + key: "_bindHammer", + value: function _bindHammer() { + var _this3 = this; + + if (this.hammer !== undefined) { + this.hammer.destroy(); + } + + this.drag = {}; + this.pinch = {}; // init hammer + + this.hammer = new hammer(this.frame.canvas); + this.hammer.get('pinch').set({ + enable: true + }); // enable to get better response, todo: test on mobile. + + this.hammer.get('pan').set({ + threshold: 5, + direction: hammer.DIRECTION_ALL + }); + hammerUtil.onTouch(this.hammer, function (event) { + _this3.body.eventListeners.onTouch(event); + }); + this.hammer.on('tap', function (event) { + _this3.body.eventListeners.onTap(event); + }); + this.hammer.on('doubletap', function (event) { + _this3.body.eventListeners.onDoubleTap(event); + }); + this.hammer.on('press', function (event) { + _this3.body.eventListeners.onHold(event); + }); + this.hammer.on('panstart', function (event) { + _this3.body.eventListeners.onDragStart(event); + }); + this.hammer.on('panmove', function (event) { + _this3.body.eventListeners.onDrag(event); + }); + this.hammer.on('panend', function (event) { + _this3.body.eventListeners.onDragEnd(event); + }); + this.hammer.on('pinch', function (event) { + _this3.body.eventListeners.onPinch(event); + }); // TODO: neatly cleanup these handlers when re-creating the Canvas, IF these are done with hammer, event.stopPropagation will not work? + + this.frame.canvas.addEventListener('mousewheel', function (event) { + _this3.body.eventListeners.onMouseWheel(event); + }); + this.frame.canvas.addEventListener('DOMMouseScroll', function (event) { + _this3.body.eventListeners.onMouseWheel(event); + }); + this.frame.canvas.addEventListener('mousemove', function (event) { + _this3.body.eventListeners.onMouseMove(event); + }); + this.frame.canvas.addEventListener('contextmenu', function (event) { + _this3.body.eventListeners.onContext(event); + }); + this.hammerFrame = new hammer(this.frame); + hammerUtil.onRelease(this.hammerFrame, function (event) { + _this3.body.eventListeners.onRelease(event); + }); + } + /** + * Set a new size for the network + * @param {string} width Width in pixels or percentage (for example '800px' + * or '50%') + * @param {string} height Height in pixels or percentage (for example '400px' + * or '30%') + * @returns {boolean} + */ + + }, { + key: "setSize", + value: function setSize() { + var width = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.options.width; + var height = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.options.height; + width = this._prepareValue(width); + height = this._prepareValue(height); + var emitEvent = false; + var oldWidth = this.frame.canvas.width; + var oldHeight = this.frame.canvas.height; // update the pixel ratio + // + // NOTE: Comment in following is rather inconsistent; this is the ONLY place in the code + // where it is assumed that the pixel ratio could change at runtime. + // The only way I can think of this happening is a rotating screen or tablet; but then + // there should be a mechanism for reloading the data (TODO: check if this is present). + // + // If the assumption is true (i.e. pixel ratio can change at runtime), then *all* usage + // of pixel ratio must be overhauled for this. + // + // For the time being, I will humor the assumption here, and in the rest of the code assume it is + // constant. + + var previousRatio = this.pixelRatio; // we cache this because the camera state storage needs the old value + + this._setPixelRatio(); + + if (width != this.options.width || height != this.options.height || this.frame.style.width != width || this.frame.style.height != height) { + this._getCameraState(previousRatio); + + this.frame.style.width = width; + this.frame.style.height = height; + this.frame.canvas.style.width = '100%'; + this.frame.canvas.style.height = '100%'; + this.frame.canvas.width = Math.round(this.frame.canvas.clientWidth * this.pixelRatio); + this.frame.canvas.height = Math.round(this.frame.canvas.clientHeight * this.pixelRatio); + this.options.width = width; + this.options.height = height; + this.canvasViewCenter = { + x: 0.5 * this.frame.clientWidth, + y: 0.5 * this.frame.clientHeight + }; + emitEvent = true; + } else { + // this would adapt the width of the canvas to the width from 100% if and only if + // there is a change. + var newWidth = Math.round(this.frame.canvas.clientWidth * this.pixelRatio); + var newHeight = Math.round(this.frame.canvas.clientHeight * this.pixelRatio); // store the camera if there is a change in size. + + if (this.frame.canvas.width !== newWidth || this.frame.canvas.height !== newHeight) { + this._getCameraState(previousRatio); + } + + if (this.frame.canvas.width !== newWidth) { + this.frame.canvas.width = newWidth; + emitEvent = true; + } + + if (this.frame.canvas.height !== newHeight) { + this.frame.canvas.height = newHeight; + emitEvent = true; + } + } + + if (emitEvent === true) { + this.body.emitter.emit('resize', { + width: Math.round(this.frame.canvas.width / this.pixelRatio), + height: Math.round(this.frame.canvas.height / this.pixelRatio), + oldWidth: Math.round(oldWidth / this.pixelRatio), + oldHeight: Math.round(oldHeight / this.pixelRatio) + }); // restore the camera on change. + + this._setCameraState(); + } // set initialized so the get and set camera will work from now on. + + + this.initialized = true; + return emitEvent; + } + /** + * + * @returns {CanvasRenderingContext2D} + */ + + }, { + key: "getContext", + value: function getContext() { + return this.frame.canvas.getContext("2d"); + } + /** + * Determine the pixel ratio for various browsers. + * + * @returns {number} + * @private + */ + + }, { + key: "_determinePixelRatio", + value: function _determinePixelRatio() { + var ctx = this.getContext(); + + if (ctx === undefined) { + throw new Error("Could not get canvax context"); + } + + var numerator = 1; + + if (typeof window !== 'undefined') { + // (window !== undefined) doesn't work here! + // Protection during unit tests, where 'window' can be missing + numerator = window.devicePixelRatio || 1; + } + + var denominator = ctx.webkitBackingStorePixelRatio || ctx.mozBackingStorePixelRatio || ctx.msBackingStorePixelRatio || ctx.oBackingStorePixelRatio || ctx.backingStorePixelRatio || 1; + return numerator / denominator; + } + /** + * Lazy determination of pixel ratio. + * + * @private + */ + + }, { + key: "_setPixelRatio", + value: function _setPixelRatio() { + this.pixelRatio = this._determinePixelRatio(); + } + /** + * Set the transform in the contained context, based on its pixelRatio + */ + + }, { + key: "setTransform", + value: function setTransform() { + var ctx = this.getContext(); + + if (ctx === undefined) { + throw new Error("Could not get canvax context"); + } + + ctx.setTransform(this.pixelRatio, 0, 0, this.pixelRatio, 0, 0); + } + /** + * Convert the X coordinate in DOM-space (coordinate point in browser relative to the container div) to + * the X coordinate in canvas-space (the simulation sandbox, which the camera looks upon) + * @param {number} x + * @returns {number} + * @private + */ + + }, { + key: "_XconvertDOMtoCanvas", + value: function _XconvertDOMtoCanvas(x) { + return (x - this.body.view.translation.x) / this.body.view.scale; + } + /** + * Convert the X coordinate in canvas-space (the simulation sandbox, which the camera looks upon) to + * the X coordinate in DOM-space (coordinate point in browser relative to the container div) + * @param {number} x + * @returns {number} + * @private + */ + + }, { + key: "_XconvertCanvasToDOM", + value: function _XconvertCanvasToDOM(x) { + return x * this.body.view.scale + this.body.view.translation.x; + } + /** + * Convert the Y coordinate in DOM-space (coordinate point in browser relative to the container div) to + * the Y coordinate in canvas-space (the simulation sandbox, which the camera looks upon) + * @param {number} y + * @returns {number} + * @private + */ + + }, { + key: "_YconvertDOMtoCanvas", + value: function _YconvertDOMtoCanvas(y) { + return (y - this.body.view.translation.y) / this.body.view.scale; + } + /** + * Convert the Y coordinate in canvas-space (the simulation sandbox, which the camera looks upon) to + * the Y coordinate in DOM-space (coordinate point in browser relative to the container div) + * @param {number} y + * @returns {number} + * @private + */ + + }, { + key: "_YconvertCanvasToDOM", + value: function _YconvertCanvasToDOM(y) { + return y * this.body.view.scale + this.body.view.translation.y; + } + /** + * @param {point} pos + * @returns {point} + */ + + }, { + key: "canvasToDOM", + value: function canvasToDOM(pos) { + return { + x: this._XconvertCanvasToDOM(pos.x), + y: this._YconvertCanvasToDOM(pos.y) + }; + } + /** + * + * @param {point} pos + * @returns {point} + */ + + }, { + key: "DOMtoCanvas", + value: function DOMtoCanvas(pos) { + return { + x: this._XconvertDOMtoCanvas(pos.x), + y: this._YconvertDOMtoCanvas(pos.y) + }; + } + }]); + + return Canvas; + }(); + + /** + * The view + */ + + var View = + /*#__PURE__*/ + function () { + /** + * @param {Object} body + * @param {Canvas} canvas + */ + function View(body, canvas) { + var _this = this; + + classCallCheck$1(this, View); + + this.body = body; + this.canvas = canvas; + this.animationSpeed = 1 / this.renderRefreshRate; + this.animationEasingFunction = "easeInOutQuint"; + this.easingTime = 0; + this.sourceScale = 0; + this.targetScale = 0; + this.sourceTranslation = 0; + this.targetTranslation = 0; + this.lockedOnNodeId = undefined; + this.lockedOnNodeOffset = undefined; + this.touchTime = 0; + this.viewFunction = undefined; + this.body.emitter.on("fit", this.fit.bind(this)); + this.body.emitter.on("animationFinished", function () { + _this.body.emitter.emit("_stopRendering"); + }); + this.body.emitter.on("unlockNode", this.releaseNode.bind(this)); + } + /** + * + * @param {Object} [options={}] + */ + + + createClass$1(View, [{ + key: "setOptions", + value: function setOptions() { + var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + this.options = options; + } + /** + * This function zooms out to fit all data on screen based on amount of nodes + * @param {Object} [options={{nodes=Array}}] + * @param {boolean} [initialZoom=false] | zoom based on fitted formula or range, true = fitted, default = false; + */ + + }, { + key: "fit", + value: function fit() { + var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : { + nodes: [] + }; + var initialZoom = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; + var range; + var zoomLevel; + options = Object.assign({}, options); + + if (options.nodes === undefined || options.nodes.length === 0) { + options.nodes = this.body.nodeIndices; + } + + if (initialZoom === true) { + // check if more than half of the nodes have a predefined position. If so, we use the range, not the approximation. + var positionDefined = 0; + + for (var nodeId in this.body.nodes) { + if (this.body.nodes.hasOwnProperty(nodeId)) { + var node = this.body.nodes[nodeId]; + + if (node.predefinedPosition === true) { + positionDefined += 1; + } + } + } + + if (positionDefined > 0.5 * this.body.nodeIndices.length) { + this.fit(options, false); + return; + } + + range = NetworkUtil.getRange(this.body.nodes, options.nodes); + var numberOfNodes = this.body.nodeIndices.length; + zoomLevel = 12.662 / (numberOfNodes + 7.4147) + 0.0964822; // this is obtained from fitting a dataset from 5 points with scale levels that looked good. + // correct for larger canvasses. + + var factor = Math.min(this.canvas.frame.canvas.clientWidth / 600, this.canvas.frame.canvas.clientHeight / 600); + zoomLevel *= factor; + } else { + this.body.emitter.emit("_resizeNodes"); + range = NetworkUtil.getRange(this.body.nodes, options.nodes); + var xDistance = Math.abs(range.maxX - range.minX) * 1.1; + var yDistance = Math.abs(range.maxY - range.minY) * 1.1; + var xZoomLevel = this.canvas.frame.canvas.clientWidth / xDistance; + var yZoomLevel = this.canvas.frame.canvas.clientHeight / yDistance; + zoomLevel = xZoomLevel <= yZoomLevel ? xZoomLevel : yZoomLevel; + } + + if (zoomLevel > 1.0) { + zoomLevel = 1.0; + } else if (zoomLevel === 0) { + zoomLevel = 1.0; + } + + var center = NetworkUtil.findCenter(range); + var animationOptions = { + position: center, + scale: zoomLevel, + animation: options.animation + }; + this.moveTo(animationOptions); + } // animation + + /** + * Center a node in view. + * + * @param {number} nodeId + * @param {number} [options] + */ + + }, { + key: "focus", + value: function focus(nodeId) { + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + + if (this.body.nodes[nodeId] !== undefined) { + var nodePosition = { + x: this.body.nodes[nodeId].x, + y: this.body.nodes[nodeId].y + }; + options.position = nodePosition; + options.lockedOnNode = nodeId; + this.moveTo(options); + } else { + console.log("Node: " + nodeId + " cannot be found."); + } + } + /** + * + * @param {Object} options | options.offset = {x:number, y:number} // offset from the center in DOM pixels + * | options.scale = number // scale to move to + * | options.position = {x:number, y:number} // position to move to + * | options.animation = {duration:number, easingFunction:String} || Boolean // position to move to + */ + + }, { + key: "moveTo", + value: function moveTo(options) { + if (options === undefined) { + options = {}; + return; + } + + if (options.offset != null) { + if (options.offset.x != null) { + // Coerce and verify that x is valid. + options.offset.x = +options.offset.x; + + if (!Number.isFinite(options.offset.x)) { + throw new TypeError('The option "offset.x" has to be a finite number.'); + } + } else { + options.offset.x = 0; + } + + if (options.offset.y != null) { + // Coerce and verify that y is valid. + options.offset.y = +options.offset.y; + + if (!Number.isFinite(options.offset.y)) { + throw new TypeError('The option "offset.y" has to be a finite number.'); + } + } else { + options.offset.x = 0; + } + } else { + options.offset = { + x: 0, + y: 0 + }; + } + + if (options.position != null) { + if (options.position.x != null) { + // Coerce and verify that x is valid. + options.position.x = +options.position.x; + + if (!Number.isFinite(options.position.x)) { + throw new TypeError('The option "position.x" has to be a finite number.'); + } + } else { + options.position.x = 0; + } + + if (options.position.y != null) { + // Coerce and verify that y is valid. + options.position.y = +options.position.y; + + if (!Number.isFinite(options.position.y)) { + throw new TypeError('The option "position.y" has to be a finite number.'); + } + } else { + options.position.x = 0; + } + } else { + options.position = this.getViewPosition(); + } + + if (options.scale != null) { + // Coerce and verify that the scale is valid. + options.scale = +options.scale; + + if (!(options.scale > 0)) { + throw new TypeError('The option "scale" has to be a number greater than zero.'); + } + } else { + options.scale = this.body.view.scale; + } + + if (options.animation === undefined) { + options.animation = { + duration: 0 + }; + } + + if (options.animation === false) { + options.animation = { + duration: 0 + }; + } + + if (options.animation === true) { + options.animation = {}; + } + + if (options.animation.duration === undefined) { + options.animation.duration = 1000; + } // default duration + + + if (options.animation.easingFunction === undefined) { + options.animation.easingFunction = "easeInOutQuad"; + } // default easing function + + + this.animateView(options); + } + /** + * + * @param {Object} options | options.offset = {x:number, y:number} // offset from the center in DOM pixels + * | options.time = number // animation time in milliseconds + * | options.scale = number // scale to animate to + * | options.position = {x:number, y:number} // position to animate to + * | options.easingFunction = String // linear, easeInQuad, easeOutQuad, easeInOutQuad, + * // easeInCubic, easeOutCubic, easeInOutCubic, + * // easeInQuart, easeOutQuart, easeInOutQuart, + * // easeInQuint, easeOutQuint, easeInOutQuint + */ + + }, { + key: "animateView", + value: function animateView(options) { + if (options === undefined) { + return; + } + + this.animationEasingFunction = options.animation.easingFunction; // release if something focussed on the node + + this.releaseNode(); + + if (options.locked === true) { + this.lockedOnNodeId = options.lockedOnNode; + this.lockedOnNodeOffset = options.offset; + } // forcefully complete the old animation if it was still running + + + if (this.easingTime != 0) { + this._transitionRedraw(true); // by setting easingtime to 1, we finish the animation. + + } + + this.sourceScale = this.body.view.scale; + this.sourceTranslation = this.body.view.translation; + this.targetScale = options.scale; // set the scale so the viewCenter is based on the correct zoom level. This is overridden in the transitionRedraw + // but at least then we'll have the target transition + + this.body.view.scale = this.targetScale; + var viewCenter = this.canvas.DOMtoCanvas({ + x: 0.5 * this.canvas.frame.canvas.clientWidth, + y: 0.5 * this.canvas.frame.canvas.clientHeight + }); + var distanceFromCenter = { + // offset from view, distance view has to change by these x and y to center the node + x: viewCenter.x - options.position.x, + y: viewCenter.y - options.position.y + }; + this.targetTranslation = { + x: this.sourceTranslation.x + distanceFromCenter.x * this.targetScale + options.offset.x, + y: this.sourceTranslation.y + distanceFromCenter.y * this.targetScale + options.offset.y + }; // if the time is set to 0, don't do an animation + + if (options.animation.duration === 0) { + if (this.lockedOnNodeId != undefined) { + this.viewFunction = this._lockedRedraw.bind(this); + this.body.emitter.on("initRedraw", this.viewFunction); + } else { + this.body.view.scale = this.targetScale; + this.body.view.translation = this.targetTranslation; + this.body.emitter.emit("_requestRedraw"); + } + } else { + this.animationSpeed = 1 / (60 * options.animation.duration * 0.001) || 1 / 60; // 60 for 60 seconds, 0.001 for milli's + + this.animationEasingFunction = options.animation.easingFunction; + this.viewFunction = this._transitionRedraw.bind(this); + this.body.emitter.on("initRedraw", this.viewFunction); + this.body.emitter.emit("_startRendering"); + } + } + /** + * used to animate smoothly by hijacking the redraw function. + * @private + */ + + }, { + key: "_lockedRedraw", + value: function _lockedRedraw() { + var nodePosition = { + x: this.body.nodes[this.lockedOnNodeId].x, + y: this.body.nodes[this.lockedOnNodeId].y + }; + var viewCenter = this.canvas.DOMtoCanvas({ + x: 0.5 * this.canvas.frame.canvas.clientWidth, + y: 0.5 * this.canvas.frame.canvas.clientHeight + }); + var distanceFromCenter = { + // offset from view, distance view has to change by these x and y to center the node + x: viewCenter.x - nodePosition.x, + y: viewCenter.y - nodePosition.y + }; + var sourceTranslation = this.body.view.translation; + var targetTranslation = { + x: sourceTranslation.x + distanceFromCenter.x * this.body.view.scale + this.lockedOnNodeOffset.x, + y: sourceTranslation.y + distanceFromCenter.y * this.body.view.scale + this.lockedOnNodeOffset.y + }; + this.body.view.translation = targetTranslation; + } + /** + * Resets state of a locked on Node + */ + + }, { + key: "releaseNode", + value: function releaseNode() { + if (this.lockedOnNodeId !== undefined && this.viewFunction !== undefined) { + this.body.emitter.off("initRedraw", this.viewFunction); + this.lockedOnNodeId = undefined; + this.lockedOnNodeOffset = undefined; + } + } + /** + * @param {boolean} [finished=false] + * @private + */ + + }, { + key: "_transitionRedraw", + value: function _transitionRedraw() { + var finished = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; + this.easingTime += this.animationSpeed; + this.easingTime = finished === true ? 1.0 : this.easingTime; + var progress = util.easingFunctions[this.animationEasingFunction](this.easingTime); + this.body.view.scale = this.sourceScale + (this.targetScale - this.sourceScale) * progress; + this.body.view.translation = { + x: this.sourceTranslation.x + (this.targetTranslation.x - this.sourceTranslation.x) * progress, + y: this.sourceTranslation.y + (this.targetTranslation.y - this.sourceTranslation.y) * progress + }; // cleanup + + if (this.easingTime >= 1.0) { + this.body.emitter.off("initRedraw", this.viewFunction); + this.easingTime = 0; + + if (this.lockedOnNodeId != undefined) { + this.viewFunction = this._lockedRedraw.bind(this); + this.body.emitter.on("initRedraw", this.viewFunction); + } + + this.body.emitter.emit("animationFinished"); + } + } + /** + * + * @returns {number} + */ + + }, { + key: "getScale", + value: function getScale() { + return this.body.view.scale; + } + /** + * + * @returns {{x: number, y: number}} + */ + + }, { + key: "getViewPosition", + value: function getViewPosition() { + return this.canvas.DOMtoCanvas({ + x: 0.5 * this.canvas.frame.canvas.clientWidth, + y: 0.5 * this.canvas.frame.canvas.clientHeight + }); + } + }]); + + return View; + }(); + + /** + * Navigation Handler + */ + + var NavigationHandler = + /*#__PURE__*/ + function () { + /** + * @param {Object} body + * @param {Canvas} canvas + */ + function NavigationHandler(body, canvas) { + var _this = this; + + classCallCheck$1(this, NavigationHandler); + + this.body = body; + this.canvas = canvas; + this.iconsCreated = false; + this.navigationHammers = []; + this.boundFunctions = {}; + this.touchTime = 0; + this.activated = false; + this.body.emitter.on("activate", function () { + _this.activated = true; + + _this.configureKeyboardBindings(); + }); + this.body.emitter.on("deactivate", function () { + _this.activated = false; + + _this.configureKeyboardBindings(); + }); + this.body.emitter.on("destroy", function () { + if (_this.keycharm !== undefined) { + _this.keycharm.destroy(); + } + }); + this.options = {}; + } + /** + * + * @param {Object} options + */ + + + createClass$1(NavigationHandler, [{ + key: "setOptions", + value: function setOptions(options) { + if (options !== undefined) { + this.options = options; + this.create(); + } + } + /** + * Creates or refreshes navigation and sets key bindings + */ + + }, { + key: "create", + value: function create() { + if (this.options.navigationButtons === true) { + if (this.iconsCreated === false) { + this.loadNavigationElements(); + } + } else if (this.iconsCreated === true) { + this.cleanNavigation(); + } + + this.configureKeyboardBindings(); + } + /** + * Cleans up previous navigation items + */ + + }, { + key: "cleanNavigation", + value: function cleanNavigation() { + // clean hammer bindings + if (this.navigationHammers.length != 0) { + for (var i = 0; i < this.navigationHammers.length; i++) { + this.navigationHammers[i].destroy(); + } + + this.navigationHammers = []; + } // clean up previous navigation items + + + if (this.navigationDOM && this.navigationDOM['wrapper'] && this.navigationDOM['wrapper'].parentNode) { + this.navigationDOM['wrapper'].parentNode.removeChild(this.navigationDOM['wrapper']); + } + + this.iconsCreated = false; + } + /** + * Creation of the navigation controls nodes. They are drawn over the rest of the nodes and are not affected by scale and translation + * they have a triggerFunction which is called on click. If the position of the navigation controls is dependent + * on this.frame.canvas.clientWidth or this.frame.canvas.clientHeight, we flag horizontalAlignLeft and verticalAlignTop false. + * This means that the location will be corrected by the _relocateNavigation function on a size change of the canvas. + * + * @private + */ + + }, { + key: "loadNavigationElements", + value: function loadNavigationElements() { + var _this2 = this; + + this.cleanNavigation(); + this.navigationDOM = {}; + var navigationDivs = ['up', 'down', 'left', 'right', 'zoomIn', 'zoomOut', 'zoomExtends']; + var navigationDivActions = ['_moveUp', '_moveDown', '_moveLeft', '_moveRight', '_zoomIn', '_zoomOut', '_fit']; + this.navigationDOM['wrapper'] = document.createElement('div'); + this.navigationDOM['wrapper'].className = 'vis-navigation'; + this.canvas.frame.appendChild(this.navigationDOM['wrapper']); + + for (var i = 0; i < navigationDivs.length; i++) { + this.navigationDOM[navigationDivs[i]] = document.createElement('div'); + this.navigationDOM[navigationDivs[i]].className = 'vis-button vis-' + navigationDivs[i]; + this.navigationDOM['wrapper'].appendChild(this.navigationDOM[navigationDivs[i]]); + var hammer$1 = new hammer(this.navigationDOM[navigationDivs[i]]); + + if (navigationDivActions[i] === "_fit") { + hammerUtil.onTouch(hammer$1, this._fit.bind(this)); + } else { + hammerUtil.onTouch(hammer$1, this.bindToRedraw.bind(this, navigationDivActions[i])); + } + + this.navigationHammers.push(hammer$1); + } // use a hammer for the release so we do not require the one used in the rest of the network + // the one the rest uses can be overloaded by the manipulation system. + + + var hammerFrame = new hammer(this.canvas.frame); + hammerUtil.onRelease(hammerFrame, function () { + _this2._stopMovement(); + }); + this.navigationHammers.push(hammerFrame); + this.iconsCreated = true; + } + /** + * + * @param {string} action + */ + + }, { + key: "bindToRedraw", + value: function bindToRedraw(action) { + if (this.boundFunctions[action] === undefined) { + this.boundFunctions[action] = this[action].bind(this); + this.body.emitter.on("initRedraw", this.boundFunctions[action]); + this.body.emitter.emit("_startRendering"); + } + } + /** + * + * @param {string} action + */ + + }, { + key: "unbindFromRedraw", + value: function unbindFromRedraw(action) { + if (this.boundFunctions[action] !== undefined) { + this.body.emitter.off("initRedraw", this.boundFunctions[action]); + this.body.emitter.emit("_stopRendering"); + delete this.boundFunctions[action]; + } + } + /** + * this stops all movement induced by the navigation buttons + * + * @private + */ + + }, { + key: "_fit", + value: function _fit() { + if (new Date().valueOf() - this.touchTime > 700) { + // TODO: fix ugly hack to avoid hammer's double fireing of event (because we use release?) + this.body.emitter.emit("fit", { + duration: 700 + }); + this.touchTime = new Date().valueOf(); + } + } + /** + * this stops all movement induced by the navigation buttons + * + * @private + */ + + }, { + key: "_stopMovement", + value: function _stopMovement() { + for (var boundAction in this.boundFunctions) { + if (this.boundFunctions.hasOwnProperty(boundAction)) { + this.body.emitter.off("initRedraw", this.boundFunctions[boundAction]); + this.body.emitter.emit("_stopRendering"); + } + } + + this.boundFunctions = {}; + } + /** + * + * @private + */ + + }, { + key: "_moveUp", + value: function _moveUp() { + this.body.view.translation.y += this.options.keyboard.speed.y; + } + /** + * + * @private + */ + + }, { + key: "_moveDown", + value: function _moveDown() { + this.body.view.translation.y -= this.options.keyboard.speed.y; + } + /** + * + * @private + */ + + }, { + key: "_moveLeft", + value: function _moveLeft() { + this.body.view.translation.x += this.options.keyboard.speed.x; + } + /** + * + * @private + */ + + }, { + key: "_moveRight", + value: function _moveRight() { + this.body.view.translation.x -= this.options.keyboard.speed.x; + } + /** + * + * @private + */ + + }, { + key: "_zoomIn", + value: function _zoomIn() { + var scaleOld = this.body.view.scale; + var scale = this.body.view.scale * (1 + this.options.keyboard.speed.zoom); + var translation = this.body.view.translation; + var scaleFrac = scale / scaleOld; + var tx = (1 - scaleFrac) * this.canvas.canvasViewCenter.x + translation.x * scaleFrac; + var ty = (1 - scaleFrac) * this.canvas.canvasViewCenter.y + translation.y * scaleFrac; + this.body.view.scale = scale; + this.body.view.translation = { + x: tx, + y: ty + }; + this.body.emitter.emit('zoom', { + direction: '+', + scale: this.body.view.scale, + pointer: null + }); + } + /** + * + * @private + */ + + }, { + key: "_zoomOut", + value: function _zoomOut() { + var scaleOld = this.body.view.scale; + var scale = this.body.view.scale / (1 + this.options.keyboard.speed.zoom); + var translation = this.body.view.translation; + var scaleFrac = scale / scaleOld; + var tx = (1 - scaleFrac) * this.canvas.canvasViewCenter.x + translation.x * scaleFrac; + var ty = (1 - scaleFrac) * this.canvas.canvasViewCenter.y + translation.y * scaleFrac; + this.body.view.scale = scale; + this.body.view.translation = { + x: tx, + y: ty + }; + this.body.emitter.emit('zoom', { + direction: '-', + scale: this.body.view.scale, + pointer: null + }); + } + /** + * bind all keys using keycharm. + */ + + }, { + key: "configureKeyboardBindings", + value: function configureKeyboardBindings() { + var _this3 = this; + + if (this.keycharm !== undefined) { + this.keycharm.destroy(); + } + + if (this.options.keyboard.enabled === true) { + if (this.options.keyboard.bindToWindow === true) { + this.keycharm = keycharm({ + container: window, + preventDefault: true + }); + } else { + this.keycharm = keycharm({ + container: this.canvas.frame, + preventDefault: true + }); + } + + this.keycharm.reset(); + + if (this.activated === true) { + this.keycharm.bind("up", function () { + _this3.bindToRedraw("_moveUp"); + }, "keydown"); + this.keycharm.bind("down", function () { + _this3.bindToRedraw("_moveDown"); + }, "keydown"); + this.keycharm.bind("left", function () { + _this3.bindToRedraw("_moveLeft"); + }, "keydown"); + this.keycharm.bind("right", function () { + _this3.bindToRedraw("_moveRight"); + }, "keydown"); + this.keycharm.bind("=", function () { + _this3.bindToRedraw("_zoomIn"); + }, "keydown"); + this.keycharm.bind("num+", function () { + _this3.bindToRedraw("_zoomIn"); + }, "keydown"); + this.keycharm.bind("num-", function () { + _this3.bindToRedraw("_zoomOut"); + }, "keydown"); + this.keycharm.bind("-", function () { + _this3.bindToRedraw("_zoomOut"); + }, "keydown"); + this.keycharm.bind("[", function () { + _this3.bindToRedraw("_zoomOut"); + }, "keydown"); + this.keycharm.bind("]", function () { + _this3.bindToRedraw("_zoomIn"); + }, "keydown"); + this.keycharm.bind("pageup", function () { + _this3.bindToRedraw("_zoomIn"); + }, "keydown"); + this.keycharm.bind("pagedown", function () { + _this3.bindToRedraw("_zoomOut"); + }, "keydown"); + this.keycharm.bind("up", function () { + _this3.unbindFromRedraw("_moveUp"); + }, "keyup"); + this.keycharm.bind("down", function () { + _this3.unbindFromRedraw("_moveDown"); + }, "keyup"); + this.keycharm.bind("left", function () { + _this3.unbindFromRedraw("_moveLeft"); + }, "keyup"); + this.keycharm.bind("right", function () { + _this3.unbindFromRedraw("_moveRight"); + }, "keyup"); + this.keycharm.bind("=", function () { + _this3.unbindFromRedraw("_zoomIn"); + }, "keyup"); + this.keycharm.bind("num+", function () { + _this3.unbindFromRedraw("_zoomIn"); + }, "keyup"); + this.keycharm.bind("num-", function () { + _this3.unbindFromRedraw("_zoomOut"); + }, "keyup"); + this.keycharm.bind("-", function () { + _this3.unbindFromRedraw("_zoomOut"); + }, "keyup"); + this.keycharm.bind("[", function () { + _this3.unbindFromRedraw("_zoomOut"); + }, "keyup"); + this.keycharm.bind("]", function () { + _this3.unbindFromRedraw("_zoomIn"); + }, "keyup"); + this.keycharm.bind("pageup", function () { + _this3.unbindFromRedraw("_zoomIn"); + }, "keyup"); + this.keycharm.bind("pagedown", function () { + _this3.unbindFromRedraw("_zoomOut"); + }, "keyup"); + } + } + } + }]); + + return NavigationHandler; + }(); + + /** + * Popup is a class to create a popup window with some text + */ + + var Popup = + /*#__PURE__*/ + function () { + /** + * @param {Element} container The container object. + * @param {string} overflowMethod How the popup should act to overflowing ('flip' or 'cap') + */ + function Popup(container, overflowMethod) { + classCallCheck$1(this, Popup); + + this.container = container; + this.overflowMethod = overflowMethod || 'cap'; + this.x = 0; + this.y = 0; + this.padding = 5; + this.hidden = false; // create the frame + + this.frame = document.createElement('div'); + this.frame.className = 'vis-tooltip'; + this.container.appendChild(this.frame); + } + /** + * @param {number} x Horizontal position of the popup window + * @param {number} y Vertical position of the popup window + */ + + + createClass$1(Popup, [{ + key: "setPosition", + value: function setPosition(x, y) { + this.x = parseInt(x); + this.y = parseInt(y); + } + /** + * Set the content for the popup window. This can be HTML code or text. + * @param {string | Element} content + */ + + }, { + key: "setText", + value: function setText(content) { + if (content instanceof Element) { + this.frame.innerHTML = ''; + this.frame.appendChild(content); + } else { + this.frame.innerHTML = content; // string containing text or HTML + } + } + /** + * Show the popup window + * @param {boolean} [doShow] Show or hide the window + */ + + }, { + key: "show", + value: function show(doShow) { + if (doShow === undefined) { + doShow = true; + } + + if (doShow === true) { + var height = this.frame.clientHeight; + var width = this.frame.clientWidth; + var maxHeight = this.frame.parentNode.clientHeight; + var maxWidth = this.frame.parentNode.clientWidth; + var left = 0, + top = 0; + + if (this.overflowMethod == 'flip') { + var isLeft = false, + isTop = true; // Where around the position it's located + + if (this.y - height < this.padding) { + isTop = false; + } + + if (this.x + width > maxWidth - this.padding) { + isLeft = true; + } + + if (isLeft) { + left = this.x - width; + } else { + left = this.x; + } + + if (isTop) { + top = this.y - height; + } else { + top = this.y; + } + } else { + top = this.y - height; + + if (top + height + this.padding > maxHeight) { + top = maxHeight - height - this.padding; + } + + if (top < this.padding) { + top = this.padding; + } + + left = this.x; + + if (left + width + this.padding > maxWidth) { + left = maxWidth - width - this.padding; + } + + if (left < this.padding) { + left = this.padding; + } + } + + this.frame.style.left = left + "px"; + this.frame.style.top = top + "px"; + this.frame.style.visibility = "visible"; + this.hidden = false; + } else { + this.hide(); + } + } + /** + * Hide the popup window + */ + + }, { + key: "hide", + value: function hide() { + this.hidden = true; + this.frame.style.left = "0"; + this.frame.style.top = "0"; + this.frame.style.visibility = "hidden"; + } + /** + * Remove the popup window + */ + + }, { + key: "destroy", + value: function destroy() { + this.frame.parentNode.removeChild(this.frame); // Remove element from DOM + } + }]); + + return Popup; + }(); + + /** + * Handler for interactions + */ + + var InteractionHandler = + /*#__PURE__*/ + function () { + /** + * @param {Object} body + * @param {Canvas} canvas + * @param {SelectionHandler} selectionHandler + */ + function InteractionHandler(body, canvas, selectionHandler) { + classCallCheck$1(this, InteractionHandler); + + this.body = body; + this.canvas = canvas; + this.selectionHandler = selectionHandler; + this.navigationHandler = new NavigationHandler(body, canvas); // bind the events from hammer to functions in this object + + this.body.eventListeners.onTap = this.onTap.bind(this); + this.body.eventListeners.onTouch = this.onTouch.bind(this); + this.body.eventListeners.onDoubleTap = this.onDoubleTap.bind(this); + this.body.eventListeners.onHold = this.onHold.bind(this); + this.body.eventListeners.onDragStart = this.onDragStart.bind(this); + this.body.eventListeners.onDrag = this.onDrag.bind(this); + this.body.eventListeners.onDragEnd = this.onDragEnd.bind(this); + this.body.eventListeners.onMouseWheel = this.onMouseWheel.bind(this); + this.body.eventListeners.onPinch = this.onPinch.bind(this); + this.body.eventListeners.onMouseMove = this.onMouseMove.bind(this); + this.body.eventListeners.onRelease = this.onRelease.bind(this); + this.body.eventListeners.onContext = this.onContext.bind(this); + this.touchTime = 0; + this.drag = {}; + this.pinch = {}; + this.popup = undefined; + this.popupObj = undefined; + this.popupTimer = undefined; + this.body.functions.getPointer = this.getPointer.bind(this); + this.options = {}; + this.defaultOptions = { + dragNodes: true, + dragView: true, + hover: false, + keyboard: { + enabled: false, + speed: { + x: 10, + y: 10, + zoom: 0.02 + }, + bindToWindow: true + }, + navigationButtons: false, + tooltipDelay: 300, + zoomView: true, + zoomSpeed: 1 + }; + util.extend(this.options, this.defaultOptions); + this.bindEventListeners(); + } + /** + * Binds event listeners + */ + + + createClass$1(InteractionHandler, [{ + key: "bindEventListeners", + value: function bindEventListeners() { + var _this = this; + + this.body.emitter.on('destroy', function () { + clearTimeout(_this.popupTimer); + delete _this.body.functions.getPointer; + }); + } + /** + * + * @param {Object} options + */ + + }, { + key: "setOptions", + value: function setOptions(options) { + if (options !== undefined) { + // extend all but the values in fields + var fields = ['hideEdgesOnDrag', 'hideEdgesOnZoom', 'hideNodesOnDrag', 'keyboard', 'multiselect', 'selectable', 'selectConnectedEdges']; + util.selectiveNotDeepExtend(fields, this.options, options); // merge the keyboard options in. + + util.mergeOptions(this.options, options, 'keyboard'); + + if (options.tooltip) { + util.extend(this.options.tooltip, options.tooltip); + + if (options.tooltip.color) { + this.options.tooltip.color = util.parseColor(options.tooltip.color); + } + } + } + + this.navigationHandler.setOptions(this.options); + } + /** + * Get the pointer location from a touch location + * @param {{x: number, y: number}} touch + * @return {{x: number, y: number}} pointer + * @private + */ + + }, { + key: "getPointer", + value: function getPointer(touch) { + return { + x: touch.x - util.getAbsoluteLeft(this.canvas.frame.canvas), + y: touch.y - util.getAbsoluteTop(this.canvas.frame.canvas) + }; + } + /** + * On start of a touch gesture, store the pointer + * @param {Event} event The event + * @private + */ + + }, { + key: "onTouch", + value: function onTouch(event) { + if (new Date().valueOf() - this.touchTime > 50) { + this.drag.pointer = this.getPointer(event.center); + this.drag.pinched = false; + this.pinch.scale = this.body.view.scale; // to avoid double fireing of this event because we have two hammer instances. (on canvas and on frame) + + this.touchTime = new Date().valueOf(); + } + } + /** + * handle tap/click event: select/unselect a node + * @param {Event} event + * @private + */ + + }, { + key: "onTap", + value: function onTap(event) { + var pointer = this.getPointer(event.center); + var multiselect = this.selectionHandler.options.multiselect && (event.changedPointers[0].ctrlKey || event.changedPointers[0].metaKey); + this.checkSelectionChanges(pointer, event, multiselect); + + this.selectionHandler._generateClickEvent('click', event, pointer); + } + /** + * handle doubletap event + * @param {Event} event + * @private + */ + + }, { + key: "onDoubleTap", + value: function onDoubleTap(event) { + var pointer = this.getPointer(event.center); + + this.selectionHandler._generateClickEvent('doubleClick', event, pointer); + } + /** + * handle long tap event: multi select nodes + * @param {Event} event + * @private + */ + + }, { + key: "onHold", + value: function onHold(event) { + var pointer = this.getPointer(event.center); + var multiselect = this.selectionHandler.options.multiselect; + this.checkSelectionChanges(pointer, event, multiselect); + + this.selectionHandler._generateClickEvent('click', event, pointer); + + this.selectionHandler._generateClickEvent('hold', event, pointer); + } + /** + * handle the release of the screen + * + * @param {Event} event + * @private + */ + + }, { + key: "onRelease", + value: function onRelease(event) { + if (new Date().valueOf() - this.touchTime > 10) { + var pointer = this.getPointer(event.center); + + this.selectionHandler._generateClickEvent('release', event, pointer); // to avoid double fireing of this event because we have two hammer instances. (on canvas and on frame) + + + this.touchTime = new Date().valueOf(); + } + } + /** + * + * @param {Event} event + */ + + }, { + key: "onContext", + value: function onContext(event) { + var pointer = this.getPointer({ + x: event.clientX, + y: event.clientY + }); + + this.selectionHandler._generateClickEvent('oncontext', event, pointer); + } + /** + * Select and deselect nodes depending current selection change. + * + * For changing nodes, select/deselect events are fired. + * + * NOTE: For a given edge, if one connecting node is deselected and with the same + * click the other node is selected, no events for the edge will fire. + * It was selected and it will remain selected. + * + * TODO: This is all SelectionHandler calls; the method should be moved to there. + * + * @param {{x: number, y: number}} pointer + * @param {Event} event + * @param {boolean} [add=false] + */ + + }, { + key: "checkSelectionChanges", + value: function checkSelectionChanges(pointer, event) { + var add = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; + var previousSelection = this.selectionHandler.getSelection(); + var selected = false; + + if (add === true) { + selected = this.selectionHandler.selectAdditionalOnPoint(pointer); + } else { + selected = this.selectionHandler.selectOnPoint(pointer); + } + + var currentSelection = this.selectionHandler.getSelection(); // See NOTE in method comment for the reason to do it like this + + var deselectedItems = this._determineDifference(previousSelection, currentSelection); + + var selectedItems = this._determineDifference(currentSelection, previousSelection); + + if (deselectedItems.edges.length > 0) { + this.selectionHandler._generateClickEvent('deselectEdge', event, pointer, previousSelection); + + selected = true; + } + + if (deselectedItems.nodes.length > 0) { + this.selectionHandler._generateClickEvent('deselectNode', event, pointer, previousSelection); + + selected = true; + } + + if (selectedItems.nodes.length > 0) { + this.selectionHandler._generateClickEvent('selectNode', event, pointer); + + selected = true; + } + + if (selectedItems.edges.length > 0) { + this.selectionHandler._generateClickEvent('selectEdge', event, pointer); + + selected = true; + } // fire the select event if anything has been selected or deselected + + + if (selected === true) { + // select or unselect + this.selectionHandler._generateClickEvent('select', event, pointer); + } + } + /** + * Remove all node and edge id's from the first set that are present in the second one. + * + * @param {{nodes: Array., edges: Array.}} firstSet + * @param {{nodes: Array., edges: Array.}} secondSet + * @returns {{nodes: Array., edges: Array.}} + * @private + */ + + }, { + key: "_determineDifference", + value: function _determineDifference(firstSet, secondSet) { + var arrayDiff = function arrayDiff(firstArr, secondArr) { + var result = []; + + for (var i = 0; i < firstArr.length; i++) { + var value = firstArr[i]; + + if (secondArr.indexOf(value) === -1) { + result.push(value); + } + } + + return result; + }; + + return { + nodes: arrayDiff(firstSet.nodes, secondSet.nodes), + edges: arrayDiff(firstSet.edges, secondSet.edges) + }; + } + /** + * This function is called by onDragStart. + * It is separated out because we can then overload it for the datamanipulation system. + * + * @param {Event} event + * @private + */ + + }, { + key: "onDragStart", + value: function onDragStart(event) { + //in case the touch event was triggered on an external div, do the initial touch now. + if (this.drag.pointer === undefined) { + this.onTouch(event); + } // note: drag.pointer is set in onTouch to get the initial touch location + + + var node = this.selectionHandler.getNodeAt(this.drag.pointer); + this.drag.dragging = true; + this.drag.selection = []; + this.drag.translation = util.extend({}, this.body.view.translation); // copy the object + + this.drag.nodeId = undefined; + + if (node !== undefined && this.options.dragNodes === true) { + this.drag.nodeId = node.id; // select the clicked node if not yet selected + + if (node.isSelected() === false) { + this.selectionHandler.unselectAll(); + this.selectionHandler.selectObject(node); + } // after select to contain the node + + + this.selectionHandler._generateClickEvent('dragStart', event, this.drag.pointer); + + var selection = this.selectionHandler.selectionObj.nodes; // create an array with the selected nodes and their original location and status + + for (var nodeId in selection) { + if (selection.hasOwnProperty(nodeId)) { + var object = selection[nodeId]; + var s = { + id: object.id, + node: object, + // store original x, y, xFixed and yFixed, make the node temporarily Fixed + x: object.x, + y: object.y, + xFixed: object.options.fixed.x, + yFixed: object.options.fixed.y + }; + object.options.fixed.x = true; + object.options.fixed.y = true; + this.drag.selection.push(s); + } + } + } else { + // fallback if no node is selected and thus the view is dragged. + this.selectionHandler._generateClickEvent('dragStart', event, this.drag.pointer, undefined, true); + } + } + /** + * handle drag event + * @param {Event} event + * @private + */ + + }, { + key: "onDrag", + value: function onDrag(event) { + var _this2 = this; + + if (this.drag.pinched === true) { + return; + } // remove the focus on node if it is focussed on by the focusOnNode + + + this.body.emitter.emit('unlockNode'); + var pointer = this.getPointer(event.center); + var selection = this.drag.selection; + + if (selection && selection.length && this.options.dragNodes === true) { + this.selectionHandler._generateClickEvent('dragging', event, pointer); // calculate delta's and new location + + + var deltaX = pointer.x - this.drag.pointer.x; + var deltaY = pointer.y - this.drag.pointer.y; // update position of all selected nodes + + selection.forEach(function (selection) { + var node = selection.node; // only move the node if it was not fixed initially + + if (selection.xFixed === false) { + node.x = _this2.canvas._XconvertDOMtoCanvas(_this2.canvas._XconvertCanvasToDOM(selection.x) + deltaX); + } // only move the node if it was not fixed initially + + + if (selection.yFixed === false) { + node.y = _this2.canvas._YconvertDOMtoCanvas(_this2.canvas._YconvertCanvasToDOM(selection.y) + deltaY); + } + }); // start the simulation of the physics + + this.body.emitter.emit('startSimulation'); + } else { + // move the network + if (this.options.dragView === true) { + this.selectionHandler._generateClickEvent('dragging', event, pointer, undefined, true); // if the drag was not started properly because the click started outside the network div, start it now. + + + if (this.drag.pointer === undefined) { + this.onDragStart(event); + return; + } + + var diffX = pointer.x - this.drag.pointer.x; + var diffY = pointer.y - this.drag.pointer.y; + this.body.view.translation = { + x: this.drag.translation.x + diffX, + y: this.drag.translation.y + diffY + }; + this.body.emitter.emit('_requestRedraw'); + } + } + } + /** + * handle drag start event + * @param {Event} event + * @private + */ + + }, { + key: "onDragEnd", + value: function onDragEnd(event) { + this.drag.dragging = false; + var selection = this.drag.selection; + + if (selection && selection.length) { + selection.forEach(function (s) { + // restore original xFixed and yFixed + s.node.options.fixed.x = s.xFixed; + s.node.options.fixed.y = s.yFixed; + }); + + this.selectionHandler._generateClickEvent('dragEnd', event, this.getPointer(event.center)); + + this.body.emitter.emit('startSimulation'); + } else { + this.selectionHandler._generateClickEvent('dragEnd', event, this.getPointer(event.center), undefined, true); + + this.body.emitter.emit('_requestRedraw'); + } + } + /** + * Handle pinch event + * @param {Event} event The event + * @private + */ + + }, { + key: "onPinch", + value: function onPinch(event) { + var pointer = this.getPointer(event.center); + this.drag.pinched = true; + + if (this.pinch['scale'] === undefined) { + this.pinch.scale = 1; + } // TODO: enabled moving while pinching? + + + var scale = this.pinch.scale * event.scale; + this.zoom(scale, pointer); + } + /** + * Zoom the network in or out + * @param {number} scale a number around 1, and between 0.01 and 10 + * @param {{x: number, y: number}} pointer Position on screen + * @private + */ + + }, { + key: "zoom", + value: function zoom(scale, pointer) { + if (this.options.zoomView === true) { + var scaleOld = this.body.view.scale; + + if (scale < 0.00001) { + scale = 0.00001; + } + + if (scale > 10) { + scale = 10; + } + + var preScaleDragPointer = undefined; + + if (this.drag !== undefined) { + if (this.drag.dragging === true) { + preScaleDragPointer = this.canvas.DOMtoCanvas(this.drag.pointer); + } + } // + this.canvas.frame.canvas.clientHeight / 2 + + + var translation = this.body.view.translation; + var scaleFrac = scale / scaleOld; + var tx = (1 - scaleFrac) * pointer.x + translation.x * scaleFrac; + var ty = (1 - scaleFrac) * pointer.y + translation.y * scaleFrac; + this.body.view.scale = scale; + this.body.view.translation = { + x: tx, + y: ty + }; + + if (preScaleDragPointer != undefined) { + var postScaleDragPointer = this.canvas.canvasToDOM(preScaleDragPointer); + this.drag.pointer.x = postScaleDragPointer.x; + this.drag.pointer.y = postScaleDragPointer.y; + } + + this.body.emitter.emit('_requestRedraw'); + + if (scaleOld < scale) { + this.body.emitter.emit('zoom', { + direction: '+', + scale: this.body.view.scale, + pointer: pointer + }); + } else { + this.body.emitter.emit('zoom', { + direction: '-', + scale: this.body.view.scale, + pointer: pointer + }); + } + } + } + /** + * Event handler for mouse wheel event, used to zoom the timeline + * See http://adomas.org/javascript-mouse-wheel/ + * https://github.com/EightMedia/hammer.js/issues/256 + * @param {MouseEvent} event + * @private + */ + + }, { + key: "onMouseWheel", + value: function onMouseWheel(event) { + if (this.options.zoomView === true) { + // retrieve delta + var delta = 0; + + if (event.wheelDelta) { + /* IE/Opera. */ + delta = event.wheelDelta / 120; + } else if (event.detail) { + /* Mozilla case. */ + // In Mozilla, sign of delta is different than in IE. + // Also, delta is multiple of 3. + delta = -event.detail / 3; + } // If delta is nonzero, handle it. + // Basically, delta is now positive if wheel was scrolled up, + // and negative, if wheel was scrolled down. + + + if (delta !== 0) { + // calculate the new scale + var scale = this.body.view.scale; + var zoom = delta * (this.options.zoomSpeed / 10); + + if (delta < 0) { + zoom = zoom / (1 - zoom); + } + + scale *= 1 + zoom; // calculate the pointer location + + var pointer = this.getPointer({ + x: event.clientX, + y: event.clientY + }); // apply the new scale + + this.zoom(scale, pointer); + } // Prevent default actions caused by mouse wheel. + + + event.preventDefault(); + } + } + /** + * Mouse move handler for checking whether the title moves over a node with a title. + * @param {Event} event + * @private + */ + + }, { + key: "onMouseMove", + value: function onMouseMove(event) { + var _this3 = this; + + var pointer = this.getPointer({ + x: event.clientX, + y: event.clientY + }); + var popupVisible = false; // check if the previously selected node is still selected + + if (this.popup !== undefined) { + if (this.popup.hidden === false) { + this._checkHidePopup(pointer); + } // if the popup was not hidden above + + + if (this.popup.hidden === false) { + popupVisible = true; + this.popup.setPosition(pointer.x + 3, pointer.y - 5); + this.popup.show(); + } + } // if we bind the keyboard to the div, we have to highlight it to use it. This highlights it on mouse over. + + + if (this.options.keyboard.bindToWindow === false && this.options.keyboard.enabled === true) { + this.canvas.frame.focus(); + } // start a timeout that will check if the mouse is positioned above an element + + + if (popupVisible === false) { + if (this.popupTimer !== undefined) { + clearInterval(this.popupTimer); // stop any running calculationTimer + + this.popupTimer = undefined; + } + + if (!this.drag.dragging) { + this.popupTimer = setTimeout(function () { + return _this3._checkShowPopup(pointer); + }, this.options.tooltipDelay); + } + } // adding hover highlights + + + if (this.options.hover === true) { + this.selectionHandler.hoverObject(event, pointer); + } + } + /** + * Check if there is an element on the given position in the network + * (a node or edge). If so, and if this element has a title, + * show a popup window with its title. + * + * @param {{x:number, y:number}} pointer + * @private + */ + + }, { + key: "_checkShowPopup", + value: function _checkShowPopup(pointer) { + var x = this.canvas._XconvertDOMtoCanvas(pointer.x); + + var y = this.canvas._YconvertDOMtoCanvas(pointer.y); + + var pointerObj = { + left: x, + top: y, + right: x, + bottom: y + }; + var previousPopupObjId = this.popupObj === undefined ? undefined : this.popupObj.id; + var nodeUnderCursor = false; + var popupType = 'node'; // check if a node is under the cursor. + + if (this.popupObj === undefined) { + // search the nodes for overlap, select the top one in case of multiple nodes + var nodeIndices = this.body.nodeIndices; + var nodes = this.body.nodes; + var node; + var overlappingNodes = []; + + for (var i = 0; i < nodeIndices.length; i++) { + node = nodes[nodeIndices[i]]; + + if (node.isOverlappingWith(pointerObj) === true) { + nodeUnderCursor = true; + + if (node.getTitle() !== undefined) { + overlappingNodes.push(nodeIndices[i]); + } + } + } + + if (overlappingNodes.length > 0) { + // if there are overlapping nodes, select the last one, this is the one which is drawn on top of the others + this.popupObj = nodes[overlappingNodes[overlappingNodes.length - 1]]; // if you hover over a node, the title of the edge is not supposed to be shown. + + nodeUnderCursor = true; + } + } + + if (this.popupObj === undefined && nodeUnderCursor === false) { + // search the edges for overlap + var edgeIndices = this.body.edgeIndices; + var edges = this.body.edges; + var edge; + var overlappingEdges = []; + + for (var _i = 0; _i < edgeIndices.length; _i++) { + edge = edges[edgeIndices[_i]]; + + if (edge.isOverlappingWith(pointerObj) === true) { + if (edge.connected === true && edge.getTitle() !== undefined) { + overlappingEdges.push(edgeIndices[_i]); + } + } + } + + if (overlappingEdges.length > 0) { + this.popupObj = edges[overlappingEdges[overlappingEdges.length - 1]]; + popupType = 'edge'; + } + } + + if (this.popupObj !== undefined) { + // show popup message window + if (this.popupObj.id !== previousPopupObjId) { + if (this.popup === undefined) { + this.popup = new Popup(this.canvas.frame); + } + + this.popup.popupTargetType = popupType; + this.popup.popupTargetId = this.popupObj.id; // adjust a small offset such that the mouse cursor is located in the + // bottom left location of the popup, and you can easily move over the + // popup area + + this.popup.setPosition(pointer.x + 3, pointer.y - 5); + this.popup.setText(this.popupObj.getTitle()); + this.popup.show(); + this.body.emitter.emit('showPopup', this.popupObj.id); + } + } else { + if (this.popup !== undefined) { + this.popup.hide(); + this.body.emitter.emit('hidePopup'); + } + } + } + /** + * Check if the popup must be hidden, which is the case when the mouse is no + * longer hovering on the object + * @param {{x:number, y:number}} pointer + * @private + */ + + }, { + key: "_checkHidePopup", + value: function _checkHidePopup(pointer) { + var pointerObj = this.selectionHandler._pointerToPositionObject(pointer); + + var stillOnObj = false; + + if (this.popup.popupTargetType === 'node') { + if (this.body.nodes[this.popup.popupTargetId] !== undefined) { + stillOnObj = this.body.nodes[this.popup.popupTargetId].isOverlappingWith(pointerObj); // if the mouse is still one the node, we have to check if it is not also on one that is drawn on top of it. + // we initially only check stillOnObj because this is much faster. + + if (stillOnObj === true) { + var overNode = this.selectionHandler.getNodeAt(pointer); + stillOnObj = overNode === undefined ? false : overNode.id === this.popup.popupTargetId; + } + } + } else { + if (this.selectionHandler.getNodeAt(pointer) === undefined) { + if (this.body.edges[this.popup.popupTargetId] !== undefined) { + stillOnObj = this.body.edges[this.popup.popupTargetId].isOverlappingWith(pointerObj); + } + } + } + + if (stillOnObj === false) { + this.popupObj = undefined; + this.popup.hide(); + this.body.emitter.emit('hidePopup'); + } + } + }]); + + return InteractionHandler; + }(); + + /** + * The handler for selections + */ + + var SelectionHandler = + /*#__PURE__*/ + function () { + /** + * @param {Object} body + * @param {Canvas} canvas + */ + function SelectionHandler(body, canvas) { + var _this = this; + + classCallCheck$1(this, SelectionHandler); + + this.body = body; + this.canvas = canvas; + this.selectionObj = { + nodes: [], + edges: [] + }; + this.hoverObj = { + nodes: {}, + edges: {} + }; + this.options = {}; + this.defaultOptions = { + multiselect: false, + selectable: true, + selectConnectedEdges: true, + hoverConnectedEdges: true + }; + util.extend(this.options, this.defaultOptions); + this.body.emitter.on("_dataChanged", function () { + _this.updateSelection(); + }); + } + /** + * + * @param {Object} [options] + */ + + + createClass$1(SelectionHandler, [{ + key: "setOptions", + value: function setOptions(options) { + if (options !== undefined) { + var fields = ['multiselect', 'hoverConnectedEdges', 'selectable', 'selectConnectedEdges']; + util.selectiveDeepExtend(fields, this.options, options); + } + } + /** + * handles the selection part of the tap; + * + * @param {{x: number, y: number}} pointer + * @returns {boolean} + */ + + }, { + key: "selectOnPoint", + value: function selectOnPoint(pointer) { + var selected = false; + + if (this.options.selectable === true) { + var obj = this.getNodeAt(pointer) || this.getEdgeAt(pointer); // unselect after getting the objects in order to restore width and height. + + this.unselectAll(); + + if (obj !== undefined) { + selected = this.selectObject(obj); + } + + this.body.emitter.emit("_requestRedraw"); + } + + return selected; + } + /** + * + * @param {{x: number, y: number}} pointer + * @returns {boolean} + */ + + }, { + key: "selectAdditionalOnPoint", + value: function selectAdditionalOnPoint(pointer) { + var selectionChanged = false; + + if (this.options.selectable === true) { + var obj = this.getNodeAt(pointer) || this.getEdgeAt(pointer); + + if (obj !== undefined) { + selectionChanged = true; + + if (obj.isSelected() === true) { + this.deselectObject(obj); + } else { + this.selectObject(obj); + } + + this.body.emitter.emit("_requestRedraw"); + } + } + + return selectionChanged; + } + /** + * Create an object containing the standard fields for an event. + * + * @param {Event} event + * @param {{x: number, y: number}} pointer Object with the x and y screen coordinates of the mouse + * @returns {{}} + * @private + */ + + }, { + key: "_initBaseEvent", + value: function _initBaseEvent(event, pointer) { + var properties = {}; + properties['pointer'] = { + DOM: { + x: pointer.x, + y: pointer.y + }, + canvas: this.canvas.DOMtoCanvas(pointer) + }; + properties['event'] = event; + return properties; + } + /** + * Generate an event which the user can catch. + * + * This adds some extra data to the event with respect to cursor position and + * selected nodes and edges. + * + * @param {string} eventType Name of event to send + * @param {Event} event + * @param {{x: number, y: number}} pointer Object with the x and y screen coordinates of the mouse + * @param {Object|undefined} oldSelection If present, selection state before event occured + * @param {boolean|undefined} [emptySelection=false] Indicate if selection data should be passed + */ + + }, { + key: "_generateClickEvent", + value: function _generateClickEvent(eventType, event, pointer, oldSelection) { + var emptySelection = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false; + + var properties = this._initBaseEvent(event, pointer); + + if (emptySelection === true) { + properties.nodes = []; + properties.edges = []; + } else { + var tmp = this.getSelection(); + properties.nodes = tmp.nodes; + properties.edges = tmp.edges; + } + + if (oldSelection !== undefined) { + properties['previousSelection'] = oldSelection; + } + + if (eventType == 'click') { + // For the time being, restrict this functionality to + // just the click event. + properties.items = this.getClickedItems(pointer); + } + + if (event.controlEdge !== undefined) { + properties.controlEdge = event.controlEdge; + } + + this.body.emitter.emit(eventType, properties); + } + /** + * + * @param {Object} obj + * @param {boolean} [highlightEdges=this.options.selectConnectedEdges] + * @returns {boolean} + */ + + }, { + key: "selectObject", + value: function selectObject(obj) { + var highlightEdges = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.options.selectConnectedEdges; + + if (obj !== undefined) { + if (obj instanceof Node) { + if (highlightEdges === true) { + this._selectConnectedEdges(obj); + } + } + + obj.select(); + + this._addToSelection(obj); + + return true; + } + + return false; + } + /** + * + * @param {Object} obj + */ + + }, { + key: "deselectObject", + value: function deselectObject(obj) { + if (obj.isSelected() === true) { + obj.selected = false; + + this._removeFromSelection(obj); + } + } + /** + * retrieve all nodes overlapping with given object + * @param {Object} object An object with parameters left, top, right, bottom + * @return {number[]} An array with id's of the overlapping nodes + * @private + */ + + }, { + key: "_getAllNodesOverlappingWith", + value: function _getAllNodesOverlappingWith(object) { + var overlappingNodes = []; + var nodes = this.body.nodes; + + for (var i = 0; i < this.body.nodeIndices.length; i++) { + var nodeId = this.body.nodeIndices[i]; + + if (nodes[nodeId].isOverlappingWith(object)) { + overlappingNodes.push(nodeId); + } + } + + return overlappingNodes; + } + /** + * Return a position object in canvasspace from a single point in screenspace + * + * @param {{x: number, y: number}} pointer + * @returns {{left: number, top: number, right: number, bottom: number}} + * @private + */ + + }, { + key: "_pointerToPositionObject", + value: function _pointerToPositionObject(pointer) { + var canvasPos = this.canvas.DOMtoCanvas(pointer); + return { + left: canvasPos.x - 1, + top: canvasPos.y + 1, + right: canvasPos.x + 1, + bottom: canvasPos.y - 1 + }; + } + /** + * Get the top node at the passed point (like a click) + * + * @param {{x: number, y: number}} pointer + * @param {boolean} [returnNode=true] + * @return {Node | undefined} node + */ + + }, { + key: "getNodeAt", + value: function getNodeAt(pointer) { + var returnNode = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; + + // we first check if this is an navigation controls element + var positionObject = this._pointerToPositionObject(pointer); + + var overlappingNodes = this._getAllNodesOverlappingWith(positionObject); // if there are overlapping nodes, select the last one, this is the + // one which is drawn on top of the others + + + if (overlappingNodes.length > 0) { + if (returnNode === true) { + return this.body.nodes[overlappingNodes[overlappingNodes.length - 1]]; + } else { + return overlappingNodes[overlappingNodes.length - 1]; + } + } else { + return undefined; + } + } + /** + * retrieve all edges overlapping with given object, selector is around center + * @param {Object} object An object with parameters left, top, right, bottom + * @param {number[]} overlappingEdges An array with id's of the overlapping nodes + * @private + */ + + }, { + key: "_getEdgesOverlappingWith", + value: function _getEdgesOverlappingWith(object, overlappingEdges) { + var edges = this.body.edges; + + for (var i = 0; i < this.body.edgeIndices.length; i++) { + var edgeId = this.body.edgeIndices[i]; + + if (edges[edgeId].isOverlappingWith(object)) { + overlappingEdges.push(edgeId); + } + } + } + /** + * retrieve all nodes overlapping with given object + * @param {Object} object An object with parameters left, top, right, bottom + * @return {number[]} An array with id's of the overlapping nodes + * @private + */ + + }, { + key: "_getAllEdgesOverlappingWith", + value: function _getAllEdgesOverlappingWith(object) { + var overlappingEdges = []; + + this._getEdgesOverlappingWith(object, overlappingEdges); + + return overlappingEdges; + } + /** + * Get the edges nearest to the passed point (like a click) + * + * @param {{x: number, y: number}} pointer + * @param {boolean} [returnEdge=true] + * @return {Edge | undefined} node + */ + + }, { + key: "getEdgeAt", + value: function getEdgeAt(pointer) { + var returnEdge = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; + // Iterate over edges, pick closest within 10 + var canvasPos = this.canvas.DOMtoCanvas(pointer); + var mindist = 10; + var overlappingEdge = null; + var edges = this.body.edges; + + for (var i = 0; i < this.body.edgeIndices.length; i++) { + var edgeId = this.body.edgeIndices[i]; + var edge = edges[edgeId]; + + if (edge.connected) { + var xFrom = edge.from.x; + var yFrom = edge.from.y; + var xTo = edge.to.x; + var yTo = edge.to.y; + var dist = edge.edgeType.getDistanceToEdge(xFrom, yFrom, xTo, yTo, canvasPos.x, canvasPos.y); + + if (dist < mindist) { + overlappingEdge = edgeId; + mindist = dist; + } + } + } + + if (overlappingEdge !== null) { + if (returnEdge === true) { + return this.body.edges[overlappingEdge]; + } else { + return overlappingEdge; + } + } else { + return undefined; + } + } + /** + * Add object to the selection array. + * + * @param {Object} obj + * @private + */ + + }, { + key: "_addToSelection", + value: function _addToSelection(obj) { + if (obj instanceof Node) { + this.selectionObj.nodes[obj.id] = obj; + } else { + this.selectionObj.edges[obj.id] = obj; + } + } + /** + * Add object to the selection array. + * + * @param {Object} obj + * @private + */ + + }, { + key: "_addToHover", + value: function _addToHover(obj) { + if (obj instanceof Node) { + this.hoverObj.nodes[obj.id] = obj; + } else { + this.hoverObj.edges[obj.id] = obj; + } + } + /** + * Remove a single option from selection. + * + * @param {Object} obj + * @private + */ + + }, { + key: "_removeFromSelection", + value: function _removeFromSelection(obj) { + if (obj instanceof Node) { + delete this.selectionObj.nodes[obj.id]; + + this._unselectConnectedEdges(obj); + } else { + delete this.selectionObj.edges[obj.id]; + } + } + /** + * Unselect all. The selectionObj is useful for this. + */ + + }, { + key: "unselectAll", + value: function unselectAll() { + for (var nodeId in this.selectionObj.nodes) { + if (this.selectionObj.nodes.hasOwnProperty(nodeId)) { + this.selectionObj.nodes[nodeId].unselect(); + } + } + + for (var edgeId in this.selectionObj.edges) { + if (this.selectionObj.edges.hasOwnProperty(edgeId)) { + this.selectionObj.edges[edgeId].unselect(); + } + } + + this.selectionObj = { + nodes: {}, + edges: {} + }; + } + /** + * return the number of selected nodes + * + * @returns {number} + * @private + */ + + }, { + key: "_getSelectedNodeCount", + value: function _getSelectedNodeCount() { + var count = 0; + + for (var nodeId in this.selectionObj.nodes) { + if (this.selectionObj.nodes.hasOwnProperty(nodeId)) { + count += 1; + } + } + + return count; + } + /** + * return the selected node + * + * @returns {number} + * @private + */ + + }, { + key: "_getSelectedNode", + value: function _getSelectedNode() { + for (var nodeId in this.selectionObj.nodes) { + if (this.selectionObj.nodes.hasOwnProperty(nodeId)) { + return this.selectionObj.nodes[nodeId]; + } + } + + return undefined; + } + /** + * return the selected edge + * + * @returns {number} + * @private + */ + + }, { + key: "_getSelectedEdge", + value: function _getSelectedEdge() { + for (var edgeId in this.selectionObj.edges) { + if (this.selectionObj.edges.hasOwnProperty(edgeId)) { + return this.selectionObj.edges[edgeId]; + } + } + + return undefined; + } + /** + * return the number of selected edges + * + * @returns {number} + * @private + */ + + }, { + key: "_getSelectedEdgeCount", + value: function _getSelectedEdgeCount() { + var count = 0; + + for (var edgeId in this.selectionObj.edges) { + if (this.selectionObj.edges.hasOwnProperty(edgeId)) { + count += 1; + } + } + + return count; + } + /** + * return the number of selected objects. + * + * @returns {number} + * @private + */ + + }, { + key: "_getSelectedObjectCount", + value: function _getSelectedObjectCount() { + var count = 0; + + for (var nodeId in this.selectionObj.nodes) { + if (this.selectionObj.nodes.hasOwnProperty(nodeId)) { + count += 1; + } + } + + for (var edgeId in this.selectionObj.edges) { + if (this.selectionObj.edges.hasOwnProperty(edgeId)) { + count += 1; + } + } + + return count; + } + /** + * Check if anything is selected + * + * @returns {boolean} + * @private + */ + + }, { + key: "_selectionIsEmpty", + value: function _selectionIsEmpty() { + for (var nodeId in this.selectionObj.nodes) { + if (this.selectionObj.nodes.hasOwnProperty(nodeId)) { + return false; + } + } + + for (var edgeId in this.selectionObj.edges) { + if (this.selectionObj.edges.hasOwnProperty(edgeId)) { + return false; + } + } + + return true; + } + /** + * check if one of the selected nodes is a cluster. + * + * @returns {boolean} + * @private + */ + + }, { + key: "_clusterInSelection", + value: function _clusterInSelection() { + for (var nodeId in this.selectionObj.nodes) { + if (this.selectionObj.nodes.hasOwnProperty(nodeId)) { + if (this.selectionObj.nodes[nodeId].clusterSize > 1) { + return true; + } + } + } + + return false; + } + /** + * select the edges connected to the node that is being selected + * + * @param {Node} node + * @private + */ + + }, { + key: "_selectConnectedEdges", + value: function _selectConnectedEdges(node) { + for (var i = 0; i < node.edges.length; i++) { + var edge = node.edges[i]; + edge.select(); + + this._addToSelection(edge); + } + } + /** + * select the edges connected to the node that is being selected + * + * @param {Node} node + * @private + */ + + }, { + key: "_hoverConnectedEdges", + value: function _hoverConnectedEdges(node) { + for (var i = 0; i < node.edges.length; i++) { + var edge = node.edges[i]; + edge.hover = true; + + this._addToHover(edge); + } + } + /** + * unselect the edges connected to the node that is being selected + * + * @param {Node} node + * @private + */ + + }, { + key: "_unselectConnectedEdges", + value: function _unselectConnectedEdges(node) { + for (var i = 0; i < node.edges.length; i++) { + var edge = node.edges[i]; + edge.unselect(); + + this._removeFromSelection(edge); + } + } + /** + * Remove the highlight from a node or edge, in response to mouse movement + * + * @param {Event} event + * @param {{x: number, y: number}} pointer object with the x and y screen coordinates of the mouse + * @param {Node|vis.Edge} object + * @private + */ + + }, { + key: "emitBlurEvent", + value: function emitBlurEvent(event, pointer, object) { + var properties = this._initBaseEvent(event, pointer); + + if (object.hover === true) { + object.hover = false; + + if (object instanceof Node) { + properties.node = object.id; + this.body.emitter.emit("blurNode", properties); + } else { + properties.edge = object.id; + this.body.emitter.emit("blurEdge", properties); + } + } + } + /** + * Create the highlight for a node or edge, in response to mouse movement + * + * @param {Event} event + * @param {{x: number, y: number}} pointer object with the x and y screen coordinates of the mouse + * @param {Node|vis.Edge} object + * @returns {boolean} hoverChanged + * @private + */ + + }, { + key: "emitHoverEvent", + value: function emitHoverEvent(event, pointer, object) { + var properties = this._initBaseEvent(event, pointer); + + var hoverChanged = false; + + if (object.hover === false) { + object.hover = true; + + this._addToHover(object); + + hoverChanged = true; + + if (object instanceof Node) { + properties.node = object.id; + this.body.emitter.emit("hoverNode", properties); + } else { + properties.edge = object.id; + this.body.emitter.emit("hoverEdge", properties); + } + } + + return hoverChanged; + } + /** + * Perform actions in response to a mouse movement. + * + * @param {Event} event + * @param {{x: number, y: number}} pointer | object with the x and y screen coordinates of the mouse + */ + + }, { + key: "hoverObject", + value: function hoverObject(event, pointer) { + var object = this.getNodeAt(pointer); + + if (object === undefined) { + object = this.getEdgeAt(pointer); + } + + var hoverChanged = false; // remove all node hover highlights + + for (var nodeId in this.hoverObj.nodes) { + if (this.hoverObj.nodes.hasOwnProperty(nodeId)) { + if (object === undefined || object instanceof Node && object.id != nodeId || object instanceof Edge) { + this.emitBlurEvent(event, pointer, this.hoverObj.nodes[nodeId]); + delete this.hoverObj.nodes[nodeId]; + hoverChanged = true; + } + } + } // removing all edge hover highlights + + + for (var edgeId in this.hoverObj.edges) { + if (this.hoverObj.edges.hasOwnProperty(edgeId)) { + // if the hover has been changed here it means that the node has been hovered over or off + // we then do not use the emitBlurEvent method here. + if (hoverChanged === true) { + this.hoverObj.edges[edgeId].hover = false; + delete this.hoverObj.edges[edgeId]; + } // if the blur remains the same and the object is undefined (mouse off) or another + // edge has been hovered, or another node has been hovered we blur the edge. + else if (object === undefined || object instanceof Edge && object.id != edgeId || object instanceof Node && !object.hover) { + this.emitBlurEvent(event, pointer, this.hoverObj.edges[edgeId]); + delete this.hoverObj.edges[edgeId]; + hoverChanged = true; + } + } + } + + if (object !== undefined) { + var hoveredEdgesCount = Object.keys(this.hoverObj.edges).length; + var hoveredNodesCount = Object.keys(this.hoverObj.nodes).length; + var newOnlyHoveredEdge = object instanceof Edge && hoveredEdgesCount === 0 && hoveredNodesCount === 0; + var newOnlyHoveredNode = object instanceof Node && hoveredEdgesCount === 0 && hoveredNodesCount === 0; + + if (hoverChanged || newOnlyHoveredEdge || newOnlyHoveredNode) { + hoverChanged = this.emitHoverEvent(event, pointer, object); + } + + if (object instanceof Node && this.options.hoverConnectedEdges === true) { + this._hoverConnectedEdges(object); + } + } + + if (hoverChanged === true) { + this.body.emitter.emit('_requestRedraw'); + } + } + /** + * + * retrieve the currently selected objects + * @return {{nodes: Array., edges: Array.}} selection + */ + + }, { + key: "getSelection", + value: function getSelection() { + var nodeIds = this.getSelectedNodes(); + var edgeIds = this.getSelectedEdges(); + return { + nodes: nodeIds, + edges: edgeIds + }; + } + /** + * + * retrieve the currently selected nodes + * @return {string[]} selection An array with the ids of the + * selected nodes. + */ + + }, { + key: "getSelectedNodes", + value: function getSelectedNodes() { + var idArray = []; + + if (this.options.selectable === true) { + for (var nodeId in this.selectionObj.nodes) { + if (this.selectionObj.nodes.hasOwnProperty(nodeId)) { + idArray.push(this.selectionObj.nodes[nodeId].id); + } + } + } + + return idArray; + } + /** + * + * retrieve the currently selected edges + * @return {Array} selection An array with the ids of the + * selected nodes. + */ + + }, { + key: "getSelectedEdges", + value: function getSelectedEdges() { + var idArray = []; + + if (this.options.selectable === true) { + for (var edgeId in this.selectionObj.edges) { + if (this.selectionObj.edges.hasOwnProperty(edgeId)) { + idArray.push(this.selectionObj.edges[edgeId].id); + } + } + } + + return idArray; + } + /** + * Updates the current selection + * @param {{nodes: Array., edges: Array.}} selection + * @param {Object} options Options + */ + + }, { + key: "setSelection", + value: function setSelection(selection) { + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + var i, id; + if (!selection || !selection.nodes && !selection.edges) throw 'Selection must be an object with nodes and/or edges properties'; // first unselect any selected node, if option is true or undefined + + if (options.unselectAll || options.unselectAll === undefined) { + this.unselectAll(); + } + + if (selection.nodes) { + for (i = 0; i < selection.nodes.length; i++) { + id = selection.nodes[i]; + var node = this.body.nodes[id]; + + if (!node) { + throw new RangeError('Node with id "' + id + '" not found'); + } // don't select edges with it + + + this.selectObject(node, options.highlightEdges); + } + } + + if (selection.edges) { + for (i = 0; i < selection.edges.length; i++) { + id = selection.edges[i]; + var edge = this.body.edges[id]; + + if (!edge) { + throw new RangeError('Edge with id "' + id + '" not found'); + } + + this.selectObject(edge); + } + } + + this.body.emitter.emit('_requestRedraw'); + } + /** + * select zero or more nodes with the option to highlight edges + * @param {number[] | string[]} selection An array with the ids of the + * selected nodes. + * @param {boolean} [highlightEdges] + */ + + }, { + key: "selectNodes", + value: function selectNodes(selection) { + var highlightEdges = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; + if (!selection || selection.length === undefined) throw 'Selection must be an array with ids'; + this.setSelection({ + nodes: selection + }, { + highlightEdges: highlightEdges + }); + } + /** + * select zero or more edges + * @param {number[] | string[]} selection An array with the ids of the + * selected nodes. + */ + + }, { + key: "selectEdges", + value: function selectEdges(selection) { + if (!selection || selection.length === undefined) throw 'Selection must be an array with ids'; + this.setSelection({ + edges: selection + }); + } + /** + * Validate the selection: remove ids of nodes which no longer exist + * @private + */ + + }, { + key: "updateSelection", + value: function updateSelection() { + for (var nodeId in this.selectionObj.nodes) { + if (this.selectionObj.nodes.hasOwnProperty(nodeId)) { + if (!this.body.nodes.hasOwnProperty(nodeId)) { + delete this.selectionObj.nodes[nodeId]; + } + } + } + + for (var edgeId in this.selectionObj.edges) { + if (this.selectionObj.edges.hasOwnProperty(edgeId)) { + if (!this.body.edges.hasOwnProperty(edgeId)) { + delete this.selectionObj.edges[edgeId]; + } + } + } + } + /** + * Determine all the visual elements clicked which are on the given point. + * + * All elements are returned; this includes nodes, edges and their labels. + * The order returned is from highest to lowest, i.e. element 0 of the return + * value is the topmost item clicked on. + * + * The return value consists of an array of the following possible elements: + * + * - `{nodeId:number}` - node with given id clicked on + * - `{nodeId:number, labelId:0}` - label of node with given id clicked on + * - `{edgeId:number}` - edge with given id clicked on + * - `{edge:number, labelId:0}` - label of edge with given id clicked on + * + * ## NOTES + * + * - Currently, there is only one label associated with a node or an edge, + * but this is expected to change somewhere in the future. + * - Since there is no z-indexing yet, it is not really possible to set the nodes and + * edges in the correct order. For the time being, nodes come first. + * + * @param {point} pointer mouse position in screen coordinates + * @returns {Array.} + * @private + */ + + }, { + key: "getClickedItems", + value: function getClickedItems(pointer) { + var point = this.canvas.DOMtoCanvas(pointer); + var items = []; // Note reverse order; we want the topmost clicked items to be first in the array + // Also note that selected nodes are disregarded here; these normally display on top + + var nodeIndices = this.body.nodeIndices; + var nodes = this.body.nodes; + + for (var i = nodeIndices.length - 1; i >= 0; i--) { + var node = nodes[nodeIndices[i]]; + var ret = node.getItemsOnPoint(point); + items.push.apply(items, ret); // Append the return value to the running list. + } + + var edgeIndices = this.body.edgeIndices; + var edges = this.body.edges; + + for (var _i = edgeIndices.length - 1; _i >= 0; _i--) { + var edge = edges[edgeIndices[_i]]; + + var _ret = edge.getItemsOnPoint(point); + + items.push.apply(items, _ret); // Append the return value to the running list. + } + + return items; + } + }]); + + return SelectionHandler; + }(); + + var timsort = createCommonjsModule$2(function (module, exports) { + /**** + * The MIT License + * + * Copyright (c) 2015 Marco Ziccardi + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * + ****/ + (function (global, factory) { + { + factory(exports); + } + })(commonjsGlobal$2, function (exports) { + + exports.__esModule = true; + exports.sort = sort; + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError('Cannot call a class as a function'); + } + } + + var DEFAULT_MIN_MERGE = 32; + var DEFAULT_MIN_GALLOPING = 7; + var DEFAULT_TMP_STORAGE_LENGTH = 256; + var POWERS_OF_TEN = [1e0, 1e1, 1e2, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9]; + + function log10(x) { + if (x < 1e5) { + if (x < 1e2) { + return x < 1e1 ? 0 : 1; + } + + if (x < 1e4) { + return x < 1e3 ? 2 : 3; + } + + return 4; + } + + if (x < 1e7) { + return x < 1e6 ? 5 : 6; + } + + if (x < 1e9) { + return x < 1e8 ? 7 : 8; + } + + return 9; + } + + function alphabeticalCompare(a, b) { + if (a === b) { + return 0; + } + + if (~~a === a && ~~b === b) { + if (a === 0 || b === 0) { + return a < b ? -1 : 1; + } + + if (a < 0 || b < 0) { + if (b >= 0) { + return -1; + } + + if (a >= 0) { + return 1; + } + + a = -a; + b = -b; + } + + var al = log10(a); + var bl = log10(b); + var t = 0; + + if (al < bl) { + a *= POWERS_OF_TEN[bl - al - 1]; + b /= 10; + t = -1; + } else if (al > bl) { + b *= POWERS_OF_TEN[al - bl - 1]; + a /= 10; + t = 1; + } + + if (a === b) { + return t; + } + + return a < b ? -1 : 1; + } + + var aStr = String(a); + var bStr = String(b); + + if (aStr === bStr) { + return 0; + } + + return aStr < bStr ? -1 : 1; + } + + function minRunLength(n) { + var r = 0; + + while (n >= DEFAULT_MIN_MERGE) { + r |= n & 1; + n >>= 1; + } + + return n + r; + } + + function makeAscendingRun(array, lo, hi, compare) { + var runHi = lo + 1; + + if (runHi === hi) { + return 1; + } + + if (compare(array[runHi++], array[lo]) < 0) { + while (runHi < hi && compare(array[runHi], array[runHi - 1]) < 0) { + runHi++; + } + + reverseRun(array, lo, runHi); + } else { + while (runHi < hi && compare(array[runHi], array[runHi - 1]) >= 0) { + runHi++; + } + } + + return runHi - lo; + } + + function reverseRun(array, lo, hi) { + hi--; + + while (lo < hi) { + var t = array[lo]; + array[lo++] = array[hi]; + array[hi--] = t; + } + } + + function binaryInsertionSort(array, lo, hi, start, compare) { + if (start === lo) { + start++; + } + + for (; start < hi; start++) { + var pivot = array[start]; + var left = lo; + var right = start; + + while (left < right) { + var mid = left + right >>> 1; + + if (compare(pivot, array[mid]) < 0) { + right = mid; + } else { + left = mid + 1; + } + } + + var n = start - left; + + switch (n) { + case 3: + array[left + 3] = array[left + 2]; + + case 2: + array[left + 2] = array[left + 1]; + + case 1: + array[left + 1] = array[left]; + break; + + default: + while (n > 0) { + array[left + n] = array[left + n - 1]; + n--; + } + + } + + array[left] = pivot; + } + } + + function gallopLeft(value, array, start, length, hint, compare) { + var lastOffset = 0; + var maxOffset = 0; + var offset = 1; + + if (compare(value, array[start + hint]) > 0) { + maxOffset = length - hint; + + while (offset < maxOffset && compare(value, array[start + hint + offset]) > 0) { + lastOffset = offset; + offset = (offset << 1) + 1; + + if (offset <= 0) { + offset = maxOffset; + } + } + + if (offset > maxOffset) { + offset = maxOffset; + } + + lastOffset += hint; + offset += hint; + } else { + maxOffset = hint + 1; + + while (offset < maxOffset && compare(value, array[start + hint - offset]) <= 0) { + lastOffset = offset; + offset = (offset << 1) + 1; + + if (offset <= 0) { + offset = maxOffset; + } + } + + if (offset > maxOffset) { + offset = maxOffset; + } + + var tmp = lastOffset; + lastOffset = hint - offset; + offset = hint - tmp; + } + + lastOffset++; + + while (lastOffset < offset) { + var m = lastOffset + (offset - lastOffset >>> 1); + + if (compare(value, array[start + m]) > 0) { + lastOffset = m + 1; + } else { + offset = m; + } + } + + return offset; + } + + function gallopRight(value, array, start, length, hint, compare) { + var lastOffset = 0; + var maxOffset = 0; + var offset = 1; + + if (compare(value, array[start + hint]) < 0) { + maxOffset = hint + 1; + + while (offset < maxOffset && compare(value, array[start + hint - offset]) < 0) { + lastOffset = offset; + offset = (offset << 1) + 1; + + if (offset <= 0) { + offset = maxOffset; + } + } + + if (offset > maxOffset) { + offset = maxOffset; + } + + var tmp = lastOffset; + lastOffset = hint - offset; + offset = hint - tmp; + } else { + maxOffset = length - hint; + + while (offset < maxOffset && compare(value, array[start + hint + offset]) >= 0) { + lastOffset = offset; + offset = (offset << 1) + 1; + + if (offset <= 0) { + offset = maxOffset; + } + } + + if (offset > maxOffset) { + offset = maxOffset; + } + + lastOffset += hint; + offset += hint; + } + + lastOffset++; + + while (lastOffset < offset) { + var m = lastOffset + (offset - lastOffset >>> 1); + + if (compare(value, array[start + m]) < 0) { + offset = m; + } else { + lastOffset = m + 1; + } + } + + return offset; + } + + var TimSort = function () { + function TimSort(array, compare) { + _classCallCheck(this, TimSort); + + this.array = null; + this.compare = null; + this.minGallop = DEFAULT_MIN_GALLOPING; + this.length = 0; + this.tmpStorageLength = DEFAULT_TMP_STORAGE_LENGTH; + this.stackLength = 0; + this.runStart = null; + this.runLength = null; + this.stackSize = 0; + this.array = array; + this.compare = compare; + this.length = array.length; + + if (this.length < 2 * DEFAULT_TMP_STORAGE_LENGTH) { + this.tmpStorageLength = this.length >>> 1; + } + + this.tmp = new Array(this.tmpStorageLength); + this.stackLength = this.length < 120 ? 5 : this.length < 1542 ? 10 : this.length < 119151 ? 19 : 40; + this.runStart = new Array(this.stackLength); + this.runLength = new Array(this.stackLength); + } + + TimSort.prototype.pushRun = function pushRun(runStart, runLength) { + this.runStart[this.stackSize] = runStart; + this.runLength[this.stackSize] = runLength; + this.stackSize += 1; + }; + + TimSort.prototype.mergeRuns = function mergeRuns() { + while (this.stackSize > 1) { + var n = this.stackSize - 2; + + if (n >= 1 && this.runLength[n - 1] <= this.runLength[n] + this.runLength[n + 1] || n >= 2 && this.runLength[n - 2] <= this.runLength[n] + this.runLength[n - 1]) { + if (this.runLength[n - 1] < this.runLength[n + 1]) { + n--; + } + } else if (this.runLength[n] > this.runLength[n + 1]) { + break; + } + + this.mergeAt(n); + } + }; + + TimSort.prototype.forceMergeRuns = function forceMergeRuns() { + while (this.stackSize > 1) { + var n = this.stackSize - 2; + + if (n > 0 && this.runLength[n - 1] < this.runLength[n + 1]) { + n--; + } + + this.mergeAt(n); + } + }; + + TimSort.prototype.mergeAt = function mergeAt(i) { + var compare = this.compare; + var array = this.array; + var start1 = this.runStart[i]; + var length1 = this.runLength[i]; + var start2 = this.runStart[i + 1]; + var length2 = this.runLength[i + 1]; + this.runLength[i] = length1 + length2; + + if (i === this.stackSize - 3) { + this.runStart[i + 1] = this.runStart[i + 2]; + this.runLength[i + 1] = this.runLength[i + 2]; + } + + this.stackSize--; + var k = gallopRight(array[start2], array, start1, length1, 0, compare); + start1 += k; + length1 -= k; + + if (length1 === 0) { + return; + } + + length2 = gallopLeft(array[start1 + length1 - 1], array, start2, length2, length2 - 1, compare); + + if (length2 === 0) { + return; + } + + if (length1 <= length2) { + this.mergeLow(start1, length1, start2, length2); + } else { + this.mergeHigh(start1, length1, start2, length2); + } + }; + + TimSort.prototype.mergeLow = function mergeLow(start1, length1, start2, length2) { + var compare = this.compare; + var array = this.array; + var tmp = this.tmp; + var i = 0; + + for (i = 0; i < length1; i++) { + tmp[i] = array[start1 + i]; + } + + var cursor1 = 0; + var cursor2 = start2; + var dest = start1; + array[dest++] = array[cursor2++]; + + if (--length2 === 0) { + for (i = 0; i < length1; i++) { + array[dest + i] = tmp[cursor1 + i]; + } + + return; + } + + if (length1 === 1) { + for (i = 0; i < length2; i++) { + array[dest + i] = array[cursor2 + i]; + } + + array[dest + length2] = tmp[cursor1]; + return; + } + + var minGallop = this.minGallop; + + while (true) { + var count1 = 0; + var count2 = 0; + var exit = false; + + do { + if (compare(array[cursor2], tmp[cursor1]) < 0) { + array[dest++] = array[cursor2++]; + count2++; + count1 = 0; + + if (--length2 === 0) { + exit = true; + break; + } + } else { + array[dest++] = tmp[cursor1++]; + count1++; + count2 = 0; + + if (--length1 === 1) { + exit = true; + break; + } + } + } while ((count1 | count2) < minGallop); + + if (exit) { + break; + } + + do { + count1 = gallopRight(array[cursor2], tmp, cursor1, length1, 0, compare); + + if (count1 !== 0) { + for (i = 0; i < count1; i++) { + array[dest + i] = tmp[cursor1 + i]; + } + + dest += count1; + cursor1 += count1; + length1 -= count1; + + if (length1 <= 1) { + exit = true; + break; + } + } + + array[dest++] = array[cursor2++]; + + if (--length2 === 0) { + exit = true; + break; + } + + count2 = gallopLeft(tmp[cursor1], array, cursor2, length2, 0, compare); + + if (count2 !== 0) { + for (i = 0; i < count2; i++) { + array[dest + i] = array[cursor2 + i]; + } + + dest += count2; + cursor2 += count2; + length2 -= count2; + + if (length2 === 0) { + exit = true; + break; + } + } + + array[dest++] = tmp[cursor1++]; + + if (--length1 === 1) { + exit = true; + break; + } + + minGallop--; + } while (count1 >= DEFAULT_MIN_GALLOPING || count2 >= DEFAULT_MIN_GALLOPING); + + if (exit) { + break; + } + + if (minGallop < 0) { + minGallop = 0; + } + + minGallop += 2; + } + + this.minGallop = minGallop; + + if (minGallop < 1) { + this.minGallop = 1; + } + + if (length1 === 1) { + for (i = 0; i < length2; i++) { + array[dest + i] = array[cursor2 + i]; + } + + array[dest + length2] = tmp[cursor1]; + } else if (length1 === 0) { + throw new Error('mergeLow preconditions were not respected'); + } else { + for (i = 0; i < length1; i++) { + array[dest + i] = tmp[cursor1 + i]; + } + } + }; + + TimSort.prototype.mergeHigh = function mergeHigh(start1, length1, start2, length2) { + var compare = this.compare; + var array = this.array; + var tmp = this.tmp; + var i = 0; + + for (i = 0; i < length2; i++) { + tmp[i] = array[start2 + i]; + } + + var cursor1 = start1 + length1 - 1; + var cursor2 = length2 - 1; + var dest = start2 + length2 - 1; + var customCursor = 0; + var customDest = 0; + array[dest--] = array[cursor1--]; + + if (--length1 === 0) { + customCursor = dest - (length2 - 1); + + for (i = 0; i < length2; i++) { + array[customCursor + i] = tmp[i]; + } + + return; + } + + if (length2 === 1) { + dest -= length1; + cursor1 -= length1; + customDest = dest + 1; + customCursor = cursor1 + 1; + + for (i = length1 - 1; i >= 0; i--) { + array[customDest + i] = array[customCursor + i]; + } + + array[dest] = tmp[cursor2]; + return; + } + + var minGallop = this.minGallop; + + while (true) { + var count1 = 0; + var count2 = 0; + var exit = false; + + do { + if (compare(tmp[cursor2], array[cursor1]) < 0) { + array[dest--] = array[cursor1--]; + count1++; + count2 = 0; + + if (--length1 === 0) { + exit = true; + break; + } + } else { + array[dest--] = tmp[cursor2--]; + count2++; + count1 = 0; + + if (--length2 === 1) { + exit = true; + break; + } + } + } while ((count1 | count2) < minGallop); + + if (exit) { + break; + } + + do { + count1 = length1 - gallopRight(tmp[cursor2], array, start1, length1, length1 - 1, compare); + + if (count1 !== 0) { + dest -= count1; + cursor1 -= count1; + length1 -= count1; + customDest = dest + 1; + customCursor = cursor1 + 1; + + for (i = count1 - 1; i >= 0; i--) { + array[customDest + i] = array[customCursor + i]; + } + + if (length1 === 0) { + exit = true; + break; + } + } + + array[dest--] = tmp[cursor2--]; + + if (--length2 === 1) { + exit = true; + break; + } + + count2 = length2 - gallopLeft(array[cursor1], tmp, 0, length2, length2 - 1, compare); + + if (count2 !== 0) { + dest -= count2; + cursor2 -= count2; + length2 -= count2; + customDest = dest + 1; + customCursor = cursor2 + 1; + + for (i = 0; i < count2; i++) { + array[customDest + i] = tmp[customCursor + i]; + } + + if (length2 <= 1) { + exit = true; + break; + } + } + + array[dest--] = array[cursor1--]; + + if (--length1 === 0) { + exit = true; + break; + } + + minGallop--; + } while (count1 >= DEFAULT_MIN_GALLOPING || count2 >= DEFAULT_MIN_GALLOPING); + + if (exit) { + break; + } + + if (minGallop < 0) { + minGallop = 0; + } + + minGallop += 2; + } + + this.minGallop = minGallop; + + if (minGallop < 1) { + this.minGallop = 1; + } + + if (length2 === 1) { + dest -= length1; + cursor1 -= length1; + customDest = dest + 1; + customCursor = cursor1 + 1; + + for (i = length1 - 1; i >= 0; i--) { + array[customDest + i] = array[customCursor + i]; + } + + array[dest] = tmp[cursor2]; + } else if (length2 === 0) { + throw new Error('mergeHigh preconditions were not respected'); + } else { + customCursor = dest - (length2 - 1); + + for (i = 0; i < length2; i++) { + array[customCursor + i] = tmp[i]; + } + } + }; + + return TimSort; + }(); + + function sort(array, compare, lo, hi) { + if (!Array.isArray(array)) { + throw new TypeError('Can only sort arrays'); + } + + if (!compare) { + compare = alphabeticalCompare; + } else if (typeof compare !== 'function') { + hi = lo; + lo = compare; + compare = alphabeticalCompare; + } + + if (!lo) { + lo = 0; + } + + if (!hi) { + hi = array.length; + } + + var remaining = hi - lo; + + if (remaining < 2) { + return; + } + + var runLength = 0; + + if (remaining < DEFAULT_MIN_MERGE) { + runLength = makeAscendingRun(array, lo, hi, compare); + binaryInsertionSort(array, lo, hi, lo + runLength, compare); + return; + } + + var ts = new TimSort(array, compare); + var minRun = minRunLength(remaining); + + do { + runLength = makeAscendingRun(array, lo, hi, compare); + + if (runLength < minRun) { + var force = remaining; + + if (force > minRun) { + force = minRun; + } + + binaryInsertionSort(array, lo, lo + force, lo + runLength, compare); + runLength = force; + } + + ts.pushRun(lo, runLength); + ts.mergeRuns(); + remaining -= runLength; + lo += runLength; + } while (remaining !== 0); + + ts.forceMergeRuns(); + } + }); + }); + unwrapExports(timsort); + + var timsort$1 = timsort; + + /** + * Interface definition for direction strategy classes. + * + * This class describes the interface for the Strategy + * pattern classes used to differentiate horizontal and vertical + * direction of hierarchical results. + * + * For a given direction, one coordinate will be 'fixed', meaning that it is + * determined by level. + * The other coordinate is 'unfixed', meaning that the nodes on a given level + * can still move along that coordinate. So: + * + * - `vertical` layout: `x` unfixed, `y` fixed per level + * - `horizontal` layout: `x` fixed per level, `y` unfixed + * + * The local methods are stubs and should be regarded as abstract. + * Derived classes **must** implement all the methods themselves. + * + * @private + */ + + var DirectionInterface = + /*#__PURE__*/ + function () { + function DirectionInterface() { + classCallCheck$1(this, DirectionInterface); + } + + createClass$1(DirectionInterface, [{ + key: "abstract", + + /** @ignore **/ + value: function abstract() { + throw new Error("Can't instantiate abstract class!"); + } + /** + * This is a dummy call which is used to suppress the jsdoc errors of type: + * + * "'param' is assigned a value but never used" + * + * @ignore + **/ + + }, { + key: "fake_use", + value: function fake_use() {} // Do nothing special + + /** + * Type to use to translate dynamic curves to, in the case of hierarchical layout. + * Dynamic curves do not work for these. + * + * The value should be perpendicular to the actual direction of the layout. + * + * @return {string} Direction, either 'vertical' or 'horizontal' + */ + + }, { + key: "curveType", + value: function curveType() { + return this.abstract(); + } + /** + * Return the value of the coordinate that is not fixed for this direction. + * + * @param {Node} node The node to read + * @return {number} Value of the unfixed coordinate + */ + + }, { + key: "getPosition", + value: function getPosition(node) { + this.fake_use(node); + return this.abstract(); + } + /** + * Set the value of the coordinate that is not fixed for this direction. + * + * @param {Node} node The node to adjust + * @param {number} position + * @param {number} [level] if specified, the hierarchy level that this node should be fixed to + */ + + }, { + key: "setPosition", + value: function setPosition(node, position) { + var level = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : undefined; + this.fake_use(node, position, level); + this.abstract(); + } + /** + * Get the width of a tree. + * + * A `tree` here is a subset of nodes within the network which are not connected to other nodes, + * only among themselves. In essence, it is a sub-network. + * + * @param {number} index The index number of a tree + * @return {number} the width of a tree in the view coordinates + */ + + }, { + key: "getTreeSize", + value: function getTreeSize(index) { + this.fake_use(index); + return this.abstract(); + } + /** + * Sort array of nodes on the unfixed coordinates. + * + * **Note:** chrome has non-stable sorting implementation, which + * has a tendency to change the order of the array items, + * even if the custom sort function returns 0. + * + * For this reason, an external sort implementation is used, + * which has the added benefit of being faster than the standard + * platforms implementation. This has been verified on `node.js`, + * `firefox` and `chrome` (all linux). + * + * @param {Array.} nodeArray array of nodes to sort + */ + + }, { + key: "sort", + value: function sort(nodeArray) { + this.fake_use(nodeArray); + this.abstract(); + } + /** + * Assign the fixed coordinate of the node to the given level + * + * @param {Node} node The node to adjust + * @param {number} level The level to fix to + */ + + }, { + key: "fix", + value: function fix(node, level) { + this.fake_use(node, level); + this.abstract(); + } + /** + * Add an offset to the unfixed coordinate of the given node. + * + * @param {NodeId} nodeId Id of the node to adjust + * @param {number} diff Offset to add to the unfixed coordinate + */ + + }, { + key: "shift", + value: function shift(nodeId, diff) { + this.fake_use(nodeId, diff); + this.abstract(); + } + }]); + + return DirectionInterface; + }(); + /** + * Vertical Strategy + * + * Coordinate `y` is fixed on levels, coordinate `x` is unfixed. + * + * @extends DirectionInterface + * @private + */ + + + var VerticalStrategy = + /*#__PURE__*/ + function (_DirectionInterface) { + inherits$1(VerticalStrategy, _DirectionInterface); + + /** + * Constructor + * + * @param {Object} layout reference to the parent LayoutEngine instance. + */ + function VerticalStrategy(layout) { + var _this; + + classCallCheck$1(this, VerticalStrategy); + + _this = possibleConstructorReturn$1(this, getPrototypeOf$1(VerticalStrategy).call(this)); + _this.layout = layout; + return _this; + } + /** @inheritdoc */ + + + createClass$1(VerticalStrategy, [{ + key: "curveType", + value: function curveType() { + return 'horizontal'; + } + /** @inheritdoc */ + + }, { + key: "getPosition", + value: function getPosition(node) { + return node.x; + } + /** @inheritdoc */ + + }, { + key: "setPosition", + value: function setPosition(node, position) { + var level = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : undefined; + + if (level !== undefined) { + this.layout.hierarchical.addToOrdering(node, level); + } + + node.x = position; + } + /** @inheritdoc */ + + }, { + key: "getTreeSize", + value: function getTreeSize(index) { + var res = this.layout.hierarchical.getTreeSize(this.layout.body.nodes, index); + return { + min: res.min_x, + max: res.max_x + }; + } + /** @inheritdoc */ + + }, { + key: "sort", + value: function sort(nodeArray) { + timsort$1.sort(nodeArray, function (a, b) { + return a.x - b.x; + }); + } + /** @inheritdoc */ + + }, { + key: "fix", + value: function fix(node, level) { + node.y = this.layout.options.hierarchical.levelSeparation * level; + node.options.fixed.y = true; + } + /** @inheritdoc */ + + }, { + key: "shift", + value: function shift(nodeId, diff) { + this.layout.body.nodes[nodeId].x += diff; + } + }]); + + return VerticalStrategy; + }(DirectionInterface); + /** + * Horizontal Strategy + * + * Coordinate `x` is fixed on levels, coordinate `y` is unfixed. + * + * @extends DirectionInterface + * @private + */ + + + var HorizontalStrategy = + /*#__PURE__*/ + function (_DirectionInterface2) { + inherits$1(HorizontalStrategy, _DirectionInterface2); + + /** + * Constructor + * + * @param {Object} layout reference to the parent LayoutEngine instance. + */ + function HorizontalStrategy(layout) { + var _this2; + + classCallCheck$1(this, HorizontalStrategy); + + _this2 = possibleConstructorReturn$1(this, getPrototypeOf$1(HorizontalStrategy).call(this)); + _this2.layout = layout; + return _this2; + } + /** @inheritdoc */ + + + createClass$1(HorizontalStrategy, [{ + key: "curveType", + value: function curveType() { + return 'vertical'; + } + /** @inheritdoc */ + + }, { + key: "getPosition", + value: function getPosition(node) { + return node.y; + } + /** @inheritdoc */ + + }, { + key: "setPosition", + value: function setPosition(node, position) { + var level = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : undefined; + + if (level !== undefined) { + this.layout.hierarchical.addToOrdering(node, level); + } + + node.y = position; + } + /** @inheritdoc */ + + }, { + key: "getTreeSize", + value: function getTreeSize(index) { + var res = this.layout.hierarchical.getTreeSize(this.layout.body.nodes, index); + return { + min: res.min_y, + max: res.max_y + }; + } + /** @inheritdoc */ + + }, { + key: "sort", + value: function sort(nodeArray) { + timsort$1.sort(nodeArray, function (a, b) { + return a.y - b.y; + }); + } + /** @inheritdoc */ + + }, { + key: "fix", + value: function fix(node, level) { + node.x = this.layout.options.hierarchical.levelSeparation * level; + node.options.fixed.x = true; + } + /** @inheritdoc */ + + }, { + key: "shift", + value: function shift(nodeId, diff) { + this.layout.body.nodes[nodeId].y += diff; + } + }]); + + return HorizontalStrategy; + }(DirectionInterface); + + /** + * There's a mix-up with terms in the code. Following are the formal definitions: + * + * tree - a strict hierarchical network, i.e. every node has at most one parent + * forest - a collection of trees. These distinct trees are thus not connected. + * + * So: + * - in a network that is not a tree, there exist nodes with multiple parents. + * - a network consisting of unconnected sub-networks, of which at least one + * is not a tree, is not a forest. + * + * In the code, the definitions are: + * + * tree - any disconnected sub-network, strict hierarchical or not. + * forest - a bunch of these sub-networks + * + * The difference between tree and not-tree is important in the code, notably within + * to the block-shifting algorithm. The algorithm assumes formal trees and fails + * for not-trees, often in a spectacular manner (search for 'exploding network' in the issues). + * + * In order to distinguish the definitions in the following code, the adjective 'formal' is + * used. If 'formal' is absent, you must assume the non-formal definition. + * + * ---------------------------------------------------------------------------------- + * NOTES + * ===== + * + * A hierarchical layout is a different thing from a hierarchical network. + * The layout is a way to arrange the nodes in the view; this can be done + * on non-hierarchical networks as well. The converse is also possible. + */ + /** + * Container for derived data on current network, relating to hierarchy. + * + * @private + */ + + var HierarchicalStatus = + /*#__PURE__*/ + function () { + /** + * @ignore + */ + function HierarchicalStatus() { + classCallCheck$1(this, HierarchicalStatus); + + this.childrenReference = {}; // child id's per node id + + this.parentReference = {}; // parent id's per node id + + this.trees = {}; // tree id per node id; i.e. to which tree does given node id belong + + this.distributionOrdering = {}; // The nodes per level, in the display order + + this.levels = {}; // hierarchy level per node id + + this.distributionIndex = {}; // The position of the node in the level sorting order, per node id. + + this.isTree = false; // True if current network is a formal tree + + this.treeIndex = -1; // Highest tree id in current network. + } + /** + * Add the relation between given nodes to the current state. + * + * @param {Node.id} parentNodeId + * @param {Node.id} childNodeId + */ + + + createClass$1(HierarchicalStatus, [{ + key: "addRelation", + value: function addRelation(parentNodeId, childNodeId) { + if (this.childrenReference[parentNodeId] === undefined) { + this.childrenReference[parentNodeId] = []; + } + + this.childrenReference[parentNodeId].push(childNodeId); + + if (this.parentReference[childNodeId] === undefined) { + this.parentReference[childNodeId] = []; + } + + this.parentReference[childNodeId].push(parentNodeId); + } + /** + * Check if the current state is for a formal tree or formal forest. + * + * This is the case if every node has at most one parent. + * + * Pre: parentReference init'ed properly for current network + */ + + }, { + key: "checkIfTree", + value: function checkIfTree() { + for (var i in this.parentReference) { + if (this.parentReference[i].length > 1) { + this.isTree = false; + return; + } + } + + this.isTree = true; + } + /** + * Return the number of separate trees in the current network. + * @returns {number} + */ + + }, { + key: "numTrees", + value: function numTrees() { + return this.treeIndex + 1; // This assumes the indexes are assigned consecitively + } + /** + * Assign a tree id to a node + * @param {Node} node + * @param {string|number} treeId + */ + + }, { + key: "setTreeIndex", + value: function setTreeIndex(node, treeId) { + if (treeId === undefined) return; // Don't bother + + if (this.trees[node.id] === undefined) { + this.trees[node.id] = treeId; + this.treeIndex = Math.max(treeId, this.treeIndex); + } + } + /** + * Ensure level for given id is defined. + * + * Sets level to zero for given node id if not already present + * + * @param {Node.id} nodeId + */ + + }, { + key: "ensureLevel", + value: function ensureLevel(nodeId) { + if (this.levels[nodeId] === undefined) { + this.levels[nodeId] = 0; + } + } + /** + * get the maximum level of a branch. + * + * TODO: Never entered; find a test case to test this! + * @param {Node.id} nodeId + * @returns {number} + */ + + }, { + key: "getMaxLevel", + value: function getMaxLevel(nodeId) { + var _this = this; + + var accumulator = {}; + + var _getMaxLevel = function _getMaxLevel(nodeId) { + if (accumulator[nodeId] !== undefined) { + return accumulator[nodeId]; + } + + var level = _this.levels[nodeId]; + + if (_this.childrenReference[nodeId]) { + var children = _this.childrenReference[nodeId]; + + if (children.length > 0) { + for (var i = 0; i < children.length; i++) { + level = Math.max(level, _getMaxLevel(children[i])); + } + } + } + + accumulator[nodeId] = level; + return level; + }; + + return _getMaxLevel(nodeId); + } + /** + * + * @param {Node} nodeA + * @param {Node} nodeB + */ + + }, { + key: "levelDownstream", + value: function levelDownstream(nodeA, nodeB) { + if (this.levels[nodeB.id] === undefined) { + // set initial level + if (this.levels[nodeA.id] === undefined) { + this.levels[nodeA.id] = 0; + } // set level + + + this.levels[nodeB.id] = this.levels[nodeA.id] + 1; + } + } + /** + * Small util method to set the minimum levels of the nodes to zero. + * + * @param {Array.} nodes + */ + + }, { + key: "setMinLevelToZero", + value: function setMinLevelToZero(nodes) { + var minLevel = 1e9; // get the minimum level + + for (var nodeId in nodes) { + if (nodes.hasOwnProperty(nodeId)) { + if (this.levels[nodeId] !== undefined) { + minLevel = Math.min(this.levels[nodeId], minLevel); + } + } + } // subtract the minimum from the set so we have a range starting from 0 + + + for (var _nodeId in nodes) { + if (nodes.hasOwnProperty(_nodeId)) { + if (this.levels[_nodeId] !== undefined) { + this.levels[_nodeId] -= minLevel; + } + } + } + } + /** + * Get the min and max xy-coordinates of a given tree + * + * @param {Array.} nodes + * @param {number} index + * @returns {{min_x: number, max_x: number, min_y: number, max_y: number}} + */ + + }, { + key: "getTreeSize", + value: function getTreeSize(nodes, index) { + var min_x = 1e9; + var max_x = -1e9; + var min_y = 1e9; + var max_y = -1e9; + + for (var nodeId in this.trees) { + if (this.trees.hasOwnProperty(nodeId)) { + if (this.trees[nodeId] === index) { + var node = nodes[nodeId]; + min_x = Math.min(node.x, min_x); + max_x = Math.max(node.x, max_x); + min_y = Math.min(node.y, min_y); + max_y = Math.max(node.y, max_y); + } + } + } + + return { + min_x: min_x, + max_x: max_x, + min_y: min_y, + max_y: max_y + }; + } + /** + * Check if two nodes have the same parent(s) + * + * @param {Node} node1 + * @param {Node} node2 + * @return {boolean} true if the two nodes have a same ancestor node, false otherwise + */ + + }, { + key: "hasSameParent", + value: function hasSameParent(node1, node2) { + var parents1 = this.parentReference[node1.id]; + var parents2 = this.parentReference[node2.id]; + + if (parents1 === undefined || parents2 === undefined) { + return false; + } + + for (var i = 0; i < parents1.length; i++) { + for (var j = 0; j < parents2.length; j++) { + if (parents1[i] == parents2[j]) { + return true; + } + } + } + + return false; + } + /** + * Check if two nodes are in the same tree. + * + * @param {Node} node1 + * @param {Node} node2 + * @return {Boolean} true if this is so, false otherwise + */ + + }, { + key: "inSameSubNetwork", + value: function inSameSubNetwork(node1, node2) { + return this.trees[node1.id] === this.trees[node2.id]; + } + /** + * Get a list of the distinct levels in the current network + * + * @returns {Array} + */ + + }, { + key: "getLevels", + value: function getLevels() { + return Object.keys(this.distributionOrdering); + } + /** + * Add a node to the ordering per level + * + * @param {Node} node + * @param {number} level + */ + + }, { + key: "addToOrdering", + value: function addToOrdering(node, level) { + if (this.distributionOrdering[level] === undefined) { + this.distributionOrdering[level] = []; + } + + var isPresent = false; + var curLevel = this.distributionOrdering[level]; + + for (var n in curLevel) { + //if (curLevel[n].id === node.id) { + if (curLevel[n] === node) { + isPresent = true; + break; + } + } + + if (!isPresent) { + this.distributionOrdering[level].push(node); + this.distributionIndex[node.id] = this.distributionOrdering[level].length - 1; + } + } + }]); + + return HierarchicalStatus; + }(); + /** + * The Layout Engine + */ + + + var LayoutEngine = + /*#__PURE__*/ + function () { + /** + * @param {Object} body + */ + function LayoutEngine(body) { + classCallCheck$1(this, LayoutEngine); + + this.body = body; + this.initialRandomSeed = Math.round(Math.random() * 1000000); + this.randomSeed = this.initialRandomSeed; + this.setPhysics = false; + this.options = {}; + this.optionsBackup = { + physics: {} + }; + this.defaultOptions = { + randomSeed: undefined, + improvedLayout: true, + hierarchical: { + enabled: false, + levelSeparation: 150, + nodeSpacing: 100, + treeSpacing: 200, + blockShifting: true, + edgeMinimization: true, + parentCentralization: true, + direction: 'UD', + // UD, DU, LR, RL + sortMethod: 'hubsize' // hubsize, directed + + } + }; + util.extend(this.options, this.defaultOptions); + this.bindEventListeners(); + } + /** + * Binds event listeners + */ + + + createClass$1(LayoutEngine, [{ + key: "bindEventListeners", + value: function bindEventListeners() { + var _this2 = this; + + this.body.emitter.on('_dataChanged', function () { + _this2.setupHierarchicalLayout(); + }); + this.body.emitter.on('_dataLoaded', function () { + _this2.layoutNetwork(); + }); + this.body.emitter.on('_resetHierarchicalLayout', function () { + _this2.setupHierarchicalLayout(); + }); + this.body.emitter.on('_adjustEdgesForHierarchicalLayout', function () { + if (_this2.options.hierarchical.enabled !== true) { + return; + } // get the type of static smooth curve in case it is required + + + var type = _this2.direction.curveType(); // force all edges into static smooth curves. + + + _this2.body.emitter.emit('_forceDisableDynamicCurves', type, false); + }); + } + /** + * + * @param {Object} options + * @param {Object} allOptions + * @returns {Object} + */ + + }, { + key: "setOptions", + value: function setOptions(options, allOptions) { + if (options !== undefined) { + var hierarchical = this.options.hierarchical; + var prevHierarchicalState = hierarchical.enabled; + util.selectiveDeepExtend(["randomSeed", "improvedLayout"], this.options, options); + util.mergeOptions(this.options, options, 'hierarchical'); + + if (options.randomSeed !== undefined) { + this.initialRandomSeed = options.randomSeed; + } + + if (hierarchical.enabled === true) { + if (prevHierarchicalState === true) { + // refresh the overridden options for nodes and edges. + this.body.emitter.emit('refresh', true); + } // make sure the level separation is the right way up + + + if (hierarchical.direction === 'RL' || hierarchical.direction === 'DU') { + if (hierarchical.levelSeparation > 0) { + hierarchical.levelSeparation *= -1; + } + } else { + if (hierarchical.levelSeparation < 0) { + hierarchical.levelSeparation *= -1; + } + } + + this.setDirectionStrategy(); + this.body.emitter.emit('_resetHierarchicalLayout'); // because the hierarchical system needs it's own physics and smooth curve settings, + // we adapt the other options if needed. + + return this.adaptAllOptionsForHierarchicalLayout(allOptions); + } else { + if (prevHierarchicalState === true) { + // refresh the overridden options for nodes and edges. + this.body.emitter.emit('refresh'); + return util.deepExtend(allOptions, this.optionsBackup); + } + } + } + + return allOptions; + } + /** + * + * @param {Object} allOptions + * @returns {Object} + */ + + }, { + key: "adaptAllOptionsForHierarchicalLayout", + value: function adaptAllOptionsForHierarchicalLayout(allOptions) { + if (this.options.hierarchical.enabled === true) { + var backupPhysics = this.optionsBackup.physics; // set the physics + + if (allOptions.physics === undefined || allOptions.physics === true) { + allOptions.physics = { + enabled: backupPhysics.enabled === undefined ? true : backupPhysics.enabled, + solver: 'hierarchicalRepulsion' + }; + backupPhysics.enabled = backupPhysics.enabled === undefined ? true : backupPhysics.enabled; + backupPhysics.solver = backupPhysics.solver || 'barnesHut'; + } else if (_typeof_1$1(allOptions.physics) === 'object') { + backupPhysics.enabled = allOptions.physics.enabled === undefined ? true : allOptions.physics.enabled; + backupPhysics.solver = allOptions.physics.solver || 'barnesHut'; + allOptions.physics.solver = 'hierarchicalRepulsion'; + } else if (allOptions.physics !== false) { + backupPhysics.solver = 'barnesHut'; + allOptions.physics = { + solver: 'hierarchicalRepulsion' + }; + } // get the type of static smooth curve in case it is required + + + var type = this.direction.curveType(); // disable smooth curves if nothing is defined. If smooth curves have been turned on, + // turn them into static smooth curves. + + if (allOptions.edges === undefined) { + this.optionsBackup.edges = { + smooth: { + enabled: true, + type: 'dynamic' + } + }; + allOptions.edges = { + smooth: false + }; + } else if (allOptions.edges.smooth === undefined) { + this.optionsBackup.edges = { + smooth: { + enabled: true, + type: 'dynamic' + } + }; + allOptions.edges.smooth = false; + } else { + if (typeof allOptions.edges.smooth === 'boolean') { + this.optionsBackup.edges = { + smooth: allOptions.edges.smooth + }; + allOptions.edges.smooth = { + enabled: allOptions.edges.smooth, + type: type + }; + } else { + var smooth = allOptions.edges.smooth; // allow custom types except for dynamic + + if (smooth.type !== undefined && smooth.type !== 'dynamic') { + type = smooth.type; + } // TODO: this is options merging; see if the standard routines can be used here. + + + this.optionsBackup.edges = { + smooth: smooth.enabled === undefined ? true : smooth.enabled, + type: smooth.type === undefined ? 'dynamic' : smooth.type, + roundness: smooth.roundness === undefined ? 0.5 : smooth.roundness, + forceDirection: smooth.forceDirection === undefined ? false : smooth.forceDirection + }; // NOTE: Copying an object to self; this is basically setting defaults for undefined variables + + allOptions.edges.smooth = { + enabled: smooth.enabled === undefined ? true : smooth.enabled, + type: type, + roundness: smooth.roundness === undefined ? 0.5 : smooth.roundness, + forceDirection: smooth.forceDirection === undefined ? false : smooth.forceDirection + }; + } + } // Force all edges into static smooth curves. + // Only applies to edges that do not use the global options for smooth. + + + this.body.emitter.emit('_forceDisableDynamicCurves', type); + } + + return allOptions; + } + /** + * + * @returns {number} + */ + + }, { + key: "seededRandom", + value: function seededRandom() { + var x = Math.sin(this.randomSeed++) * 10000; + return x - Math.floor(x); + } + /** + * + * @param {Array.} nodesArray + */ + + }, { + key: "positionInitially", + value: function positionInitially(nodesArray) { + if (this.options.hierarchical.enabled !== true) { + this.randomSeed = this.initialRandomSeed; + var radius = nodesArray.length + 50; + + for (var i = 0; i < nodesArray.length; i++) { + var node = nodesArray[i]; + var angle = 2 * Math.PI * this.seededRandom(); + + if (node.x === undefined) { + node.x = radius * Math.cos(angle); + } + + if (node.y === undefined) { + node.y = radius * Math.sin(angle); + } + } + } + } + /** + * Use Kamada Kawai to position nodes. This is quite a heavy algorithm so if there are a lot of nodes we + * cluster them first to reduce the amount. + */ + + }, { + key: "layoutNetwork", + value: function layoutNetwork() { + if (this.options.hierarchical.enabled !== true && this.options.improvedLayout === true) { + var indices = this.body.nodeIndices; // first check if we should Kamada Kawai to layout. The threshold is if less than half of the visible + // nodes have predefined positions we use this. + + var positionDefined = 0; + + for (var i = 0; i < indices.length; i++) { + var node = this.body.nodes[indices[i]]; + + if (node.predefinedPosition === true) { + positionDefined += 1; + } + } // if less than half of the nodes have a predefined position we continue + + + if (positionDefined < 0.5 * indices.length) { + var MAX_LEVELS = 10; + var level = 0; + var clusterThreshold = 150; // TODO add this to options + // + // Define the options for the hidden cluster nodes + // These options don't propagate outside the clustering phase. + // + // Some options are explicitly disabled, because they may be set in group or default node options. + // The clusters are never displayed, so most explicit settings here serve as performance optimizations. + // + // The explicit setting of 'shape' is to avoid `shape: 'image'`; images are not passed to the hidden + // cluster nodes, leading to an exception on creation. + // + // All settings here are performance related, except when noted otherwise. + // + + var clusterOptions = { + clusterNodeProperties: { + shape: 'ellipse', + // Bugfix: avoid type 'image', no images supplied + label: '', + // avoid label handling + group: '', + // avoid group handling + font: { + multi: false + } // avoid font propagation + + }, + clusterEdgeProperties: { + label: '', + // avoid label handling + font: { + multi: false + }, + // avoid font propagation + smooth: { + enabled: false // avoid drawing penalty for complex edges + + } + } + }; // if there are a lot of nodes, we cluster before we run the algorithm. + // NOTE: this part fails to find clusters for large scale-free networks, which should + // be easily clusterable. + // TODO: examine why this is so + + if (indices.length > clusterThreshold) { + var startLength = indices.length; + + while (indices.length > clusterThreshold && level <= MAX_LEVELS) { + //console.time("clustering") + level += 1; + var before = indices.length; // if there are many nodes we do a hubsize cluster + + if (level % 3 === 0) { + this.body.modules.clustering.clusterBridges(clusterOptions); + } else { + this.body.modules.clustering.clusterOutliers(clusterOptions); + } + + var after = indices.length; + + if (before == after && level % 3 !== 0) { + this._declusterAll(); + + this.body.emitter.emit("_layoutFailed"); + console.info("This network could not be positioned by this version of the improved layout algorithm." + " Please disable improvedLayout for better performance."); + return; + } //console.timeEnd("clustering") + //console.log(before,level,after); + + } // increase the size of the edges + + + this.body.modules.kamadaKawai.setOptions({ + springLength: Math.max(150, 2 * startLength) + }); + } + + if (level > MAX_LEVELS) { + console.info("The clustering didn't succeed within the amount of interations allowed," + " progressing with partial result."); + } // position the system for these nodes and edges + + + this.body.modules.kamadaKawai.solve(indices, this.body.edgeIndices, true); // shift to center point + + this._shiftToCenter(); // perturb the nodes a little bit to force the physics to kick in + + + var offset = 70; + + for (var _i = 0; _i < indices.length; _i++) { + // Only perturb the nodes that aren't fixed + var _node = this.body.nodes[indices[_i]]; + + if (_node.predefinedPosition === false) { + _node.x += (0.5 - this.seededRandom()) * offset; + _node.y += (0.5 - this.seededRandom()) * offset; + } + } // uncluster all clusters + + + this._declusterAll(); // reposition all bezier nodes. + + + this.body.emitter.emit("_repositionBezierNodes"); + } + } + } + /** + * Move all the nodes towards to the center so gravitational pull wil not move the nodes away from view + * @private + */ + + }, { + key: "_shiftToCenter", + value: function _shiftToCenter() { + var range = NetworkUtil.getRangeCore(this.body.nodes, this.body.nodeIndices); + var center = NetworkUtil.findCenter(range); + + for (var i = 0; i < this.body.nodeIndices.length; i++) { + var node = this.body.nodes[this.body.nodeIndices[i]]; + node.x -= center.x; + node.y -= center.y; + } + } + /** + * Expands all clusters + * @private + */ + + }, { + key: "_declusterAll", + value: function _declusterAll() { + var clustersPresent = true; + + while (clustersPresent === true) { + clustersPresent = false; + + for (var i = 0; i < this.body.nodeIndices.length; i++) { + if (this.body.nodes[this.body.nodeIndices[i]].isCluster === true) { + clustersPresent = true; + this.body.modules.clustering.openCluster(this.body.nodeIndices[i], {}, false); + } + } + + if (clustersPresent === true) { + this.body.emitter.emit('_dataChanged'); + } + } + } + /** + * + * @returns {number|*} + */ + + }, { + key: "getSeed", + value: function getSeed() { + return this.initialRandomSeed; + } + /** + * This is the main function to layout the nodes in a hierarchical way. + * It checks if the node details are supplied correctly + * + * @private + */ + + }, { + key: "setupHierarchicalLayout", + value: function setupHierarchicalLayout() { + if (this.options.hierarchical.enabled === true && this.body.nodeIndices.length > 0) { + // get the size of the largest hubs and check if the user has defined a level for a node. + var node, nodeId; + var definedLevel = false; + var undefinedLevel = false; + this.lastNodeOnLevel = {}; + this.hierarchical = new HierarchicalStatus(); + + for (nodeId in this.body.nodes) { + if (this.body.nodes.hasOwnProperty(nodeId)) { + node = this.body.nodes[nodeId]; + + if (node.options.level !== undefined) { + definedLevel = true; + this.hierarchical.levels[nodeId] = node.options.level; + } else { + undefinedLevel = true; + } + } + } // if the user defined some levels but not all, alert and run without hierarchical layout + + + if (undefinedLevel === true && definedLevel === true) { + throw new Error('To use the hierarchical layout, nodes require either no predefined levels' + ' or levels have to be defined for all nodes.'); + } else { + // define levels if undefined by the users. Based on hubsize. + if (undefinedLevel === true) { + var sortMethod = this.options.hierarchical.sortMethod; + + if (sortMethod === 'hubsize') { + this._determineLevelsByHubsize(); + } else if (sortMethod === 'directed') { + this._determineLevelsDirected(); + } else if (sortMethod === 'custom') { + this._determineLevelsCustomCallback(); + } + } // fallback for cases where there are nodes but no edges + + + for (var _nodeId2 in this.body.nodes) { + if (this.body.nodes.hasOwnProperty(_nodeId2)) { + this.hierarchical.ensureLevel(_nodeId2); + } + } // check the distribution of the nodes per level. + + + var distribution = this._getDistribution(); // get the parent children relations. + + + this._generateMap(); // place the nodes on the canvas. + + + this._placeNodesByHierarchy(distribution); // condense the whitespace. + + + this._condenseHierarchy(); // shift to center so gravity does not have to do much + + + this._shiftToCenter(); + } + } + } + /** + * @private + */ + + }, { + key: "_condenseHierarchy", + value: function _condenseHierarchy() { + var _this3 = this; + + // Global var in this scope to define when the movement has stopped. + var stillShifting = false; + var branches = {}; // first we have some methods to help shifting trees around. + // the main method to shift the trees + + var shiftTrees = function shiftTrees() { + var treeSizes = getTreeSizes(); + var shiftBy = 0; + + for (var i = 0; i < treeSizes.length - 1; i++) { + var diff = treeSizes[i].max - treeSizes[i + 1].min; + shiftBy += diff + _this3.options.hierarchical.treeSpacing; + shiftTree(i + 1, shiftBy); + } + }; // shift a single tree by an offset + + + var shiftTree = function shiftTree(index, offset) { + var trees = _this3.hierarchical.trees; + + for (var nodeId in trees) { + if (trees.hasOwnProperty(nodeId)) { + if (trees[nodeId] === index) { + _this3.direction.shift(nodeId, offset); + } + } + } + }; // get the width of all trees + + + var getTreeSizes = function getTreeSizes() { + var treeWidths = []; + + for (var i = 0; i < _this3.hierarchical.numTrees(); i++) { + treeWidths.push(_this3.direction.getTreeSize(i)); + } + + return treeWidths; + }; // get a map of all nodes in this branch + + + var getBranchNodes = function getBranchNodes(source, map) { + if (map[source.id]) { + return; + } + + map[source.id] = true; + + if (_this3.hierarchical.childrenReference[source.id]) { + var children = _this3.hierarchical.childrenReference[source.id]; + + if (children.length > 0) { + for (var i = 0; i < children.length; i++) { + getBranchNodes(_this3.body.nodes[children[i]], map); + } + } + } + }; // get a min max width as well as the maximum movement space it has on either sides + // we use min max terminology because width and height can interchange depending on the direction of the layout + + + var getBranchBoundary = function getBranchBoundary(branchMap) { + var maxLevel = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1e9; + var minSpace = 1e9; + var maxSpace = 1e9; + var min = 1e9; + var max = -1e9; + + for (var branchNode in branchMap) { + if (branchMap.hasOwnProperty(branchNode)) { + var node = _this3.body.nodes[branchNode]; + var level = _this3.hierarchical.levels[node.id]; + + var position = _this3.direction.getPosition(node); // get the space around the node. + + + var _this3$_getSpaceAroun = _this3._getSpaceAroundNode(node, branchMap), + _this3$_getSpaceAroun2 = slicedToArray(_this3$_getSpaceAroun, 2), + minSpaceNode = _this3$_getSpaceAroun2[0], + maxSpaceNode = _this3$_getSpaceAroun2[1]; + + minSpace = Math.min(minSpaceNode, minSpace); + maxSpace = Math.min(maxSpaceNode, maxSpace); // the width is only relevant for the levels two nodes have in common. This is why we filter on this. + + if (level <= maxLevel) { + min = Math.min(position, min); + max = Math.max(position, max); + } + } + } + + return [min, max, minSpace, maxSpace]; + }; // check what the maximum level is these nodes have in common. + + + var getCollisionLevel = function getCollisionLevel(node1, node2) { + var maxLevel1 = _this3.hierarchical.getMaxLevel(node1.id); + + var maxLevel2 = _this3.hierarchical.getMaxLevel(node2.id); + + return Math.min(maxLevel1, maxLevel2); + }; + /** + * Condense elements. These can be nodes or branches depending on the callback. + * + * @param {function} callback + * @param {Array.} levels + * @param {*} centerParents + */ + + + var shiftElementsCloser = function shiftElementsCloser(callback, levels, centerParents) { + var hier = _this3.hierarchical; + + for (var i = 0; i < levels.length; i++) { + var level = levels[i]; + var levelNodes = hier.distributionOrdering[level]; + + if (levelNodes.length > 1) { + for (var j = 0; j < levelNodes.length - 1; j++) { + var node1 = levelNodes[j]; + var node2 = levelNodes[j + 1]; // NOTE: logic maintained as it was; if nodes have same ancestor, + // then of course they are in the same sub-network. + + if (hier.hasSameParent(node1, node2) && hier.inSameSubNetwork(node1, node2)) { + callback(node1, node2, centerParents); + } + } + } + } + }; // callback for shifting branches + + + var branchShiftCallback = function branchShiftCallback(node1, node2) { + var centerParent = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; + + //window.CALLBACKS.push(() => { + var pos1 = _this3.direction.getPosition(node1); + + var pos2 = _this3.direction.getPosition(node2); + + var diffAbs = Math.abs(pos2 - pos1); + var nodeSpacing = _this3.options.hierarchical.nodeSpacing; //console.log("NOW CHECKING:", node1.id, node2.id, diffAbs); + + if (diffAbs > nodeSpacing) { + var branchNodes1 = {}; + var branchNodes2 = {}; + getBranchNodes(node1, branchNodes1); + getBranchNodes(node2, branchNodes2); // check the largest distance between the branches + + var maxLevel = getCollisionLevel(node1, node2); + var branchNodeBoundary1 = getBranchBoundary(branchNodes1, maxLevel); + var branchNodeBoundary2 = getBranchBoundary(branchNodes2, maxLevel); + var max1 = branchNodeBoundary1[1]; + var min2 = branchNodeBoundary2[0]; + var minSpace2 = branchNodeBoundary2[2]; //console.log(node1.id, getBranchBoundary(branchNodes1, maxLevel), node2.id, + // getBranchBoundary(branchNodes2, maxLevel), maxLevel); + + var diffBranch = Math.abs(max1 - min2); + + if (diffBranch > nodeSpacing) { + var offset = max1 - min2 + nodeSpacing; + + if (offset < -minSpace2 + nodeSpacing) { + offset = -minSpace2 + nodeSpacing; //console.log("RESETTING OFFSET", max1 - min2 + this.options.hierarchical.nodeSpacing, -minSpace2, offset); + } + + if (offset < 0) { + //console.log("SHIFTING", node2.id, offset); + _this3._shiftBlock(node2.id, offset); + + stillShifting = true; + if (centerParent === true) _this3._centerParent(node2); + } + } + } //this.body.emitter.emit("_redraw");}) + + }; + + var minimizeEdgeLength = function minimizeEdgeLength(iterations, node) { + //window.CALLBACKS.push(() => { + // console.log("ts",node.id); + var nodeId = node.id; + var allEdges = node.edges; + var nodeLevel = _this3.hierarchical.levels[node.id]; // gather constants + + var C2 = _this3.options.hierarchical.levelSeparation * _this3.options.hierarchical.levelSeparation; + var referenceNodes = {}; + var aboveEdges = []; + + for (var i = 0; i < allEdges.length; i++) { + var edge = allEdges[i]; + + if (edge.toId != edge.fromId) { + var otherNode = edge.toId == nodeId ? edge.from : edge.to; + referenceNodes[allEdges[i].id] = otherNode; + + if (_this3.hierarchical.levels[otherNode.id] < nodeLevel) { + aboveEdges.push(edge); + } + } + } // differentiated sum of lengths based on only moving one node over one axis + + + var getFx = function getFx(point, edges) { + var sum = 0; + + for (var _i2 = 0; _i2 < edges.length; _i2++) { + if (referenceNodes[edges[_i2].id] !== undefined) { + var a = _this3.direction.getPosition(referenceNodes[edges[_i2].id]) - point; + sum += a / Math.sqrt(a * a + C2); + } + } + + return sum; + }; // doubly differentiated sum of lengths based on only moving one node over one axis + + + var getDFx = function getDFx(point, edges) { + var sum = 0; + + for (var _i3 = 0; _i3 < edges.length; _i3++) { + if (referenceNodes[edges[_i3].id] !== undefined) { + var a = _this3.direction.getPosition(referenceNodes[edges[_i3].id]) - point; + sum -= C2 * Math.pow(a * a + C2, -1.5); + } + } + + return sum; + }; + + var getGuess = function getGuess(iterations, edges) { + var guess = _this3.direction.getPosition(node); // Newton's method for optimization + + + var guessMap = {}; + + for (var _i4 = 0; _i4 < iterations; _i4++) { + var fx = getFx(guess, edges); + var dfx = getDFx(guess, edges); // we limit the movement to avoid instability. + + var limit = 40; + var ratio = Math.max(-limit, Math.min(limit, Math.round(fx / dfx))); + guess = guess - ratio; // reduce duplicates + + if (guessMap[guess] !== undefined) { + break; + } + + guessMap[guess] = _i4; + } + + return guess; + }; + + var moveBranch = function moveBranch(guess) { + // position node if there is space + var nodePosition = _this3.direction.getPosition(node); // check movable area of the branch + + + if (branches[node.id] === undefined) { + var branchNodes = {}; + getBranchNodes(node, branchNodes); + branches[node.id] = branchNodes; + } + + var branchBoundary = getBranchBoundary(branches[node.id]); + var minSpaceBranch = branchBoundary[2]; + var maxSpaceBranch = branchBoundary[3]; + var diff = guess - nodePosition; // check if we are allowed to move the node: + + var branchOffset = 0; + + if (diff > 0) { + branchOffset = Math.min(diff, maxSpaceBranch - _this3.options.hierarchical.nodeSpacing); + } else if (diff < 0) { + branchOffset = -Math.min(-diff, minSpaceBranch - _this3.options.hierarchical.nodeSpacing); + } + + if (branchOffset != 0) { + //console.log("moving branch:",branchOffset, maxSpaceBranch, minSpaceBranch) + _this3._shiftBlock(node.id, branchOffset); //this.body.emitter.emit("_redraw"); + + + stillShifting = true; + } + }; + + var moveNode = function moveNode(guess) { + var nodePosition = _this3.direction.getPosition(node); // position node if there is space + + + var _this3$_getSpaceAroun3 = _this3._getSpaceAroundNode(node), + _this3$_getSpaceAroun4 = slicedToArray(_this3$_getSpaceAroun3, 2), + minSpace = _this3$_getSpaceAroun4[0], + maxSpace = _this3$_getSpaceAroun4[1]; + + var diff = guess - nodePosition; // check if we are allowed to move the node: + + var newPosition = nodePosition; + + if (diff > 0) { + newPosition = Math.min(nodePosition + (maxSpace - _this3.options.hierarchical.nodeSpacing), guess); + } else if (diff < 0) { + newPosition = Math.max(nodePosition - (minSpace - _this3.options.hierarchical.nodeSpacing), guess); + } + + if (newPosition !== nodePosition) { + //console.log("moving Node:",diff, minSpace, maxSpace); + _this3.direction.setPosition(node, newPosition); //this.body.emitter.emit("_redraw"); + + + stillShifting = true; + } + }; + + var guess = getGuess(iterations, aboveEdges); + moveBranch(guess); + guess = getGuess(iterations, allEdges); + moveNode(guess); //}) + }; // method to remove whitespace between branches. Because we do bottom up, we can center the parents. + + + var minimizeEdgeLengthBottomUp = function minimizeEdgeLengthBottomUp(iterations) { + var levels = _this3.hierarchical.getLevels(); + + levels = levels.reverse(); + + for (var i = 0; i < iterations; i++) { + stillShifting = false; + + for (var j = 0; j < levels.length; j++) { + var level = levels[j]; + var levelNodes = _this3.hierarchical.distributionOrdering[level]; + + for (var k = 0; k < levelNodes.length; k++) { + minimizeEdgeLength(1000, levelNodes[k]); + } + } + + if (stillShifting !== true) { + //console.log("FINISHED minimizeEdgeLengthBottomUp IN " + i); + break; + } + } + }; // method to remove whitespace between branches. Because we do bottom up, we can center the parents. + + + var shiftBranchesCloserBottomUp = function shiftBranchesCloserBottomUp(iterations) { + var levels = _this3.hierarchical.getLevels(); + + levels = levels.reverse(); + + for (var i = 0; i < iterations; i++) { + stillShifting = false; + shiftElementsCloser(branchShiftCallback, levels, true); + + if (stillShifting !== true) { + //console.log("FINISHED shiftBranchesCloserBottomUp IN " + (i+1)); + break; + } + } + }; // center all parents + + + var centerAllParents = function centerAllParents() { + for (var nodeId in _this3.body.nodes) { + if (_this3.body.nodes.hasOwnProperty(nodeId)) _this3._centerParent(_this3.body.nodes[nodeId]); + } + }; // center all parents + + + var centerAllParentsBottomUp = function centerAllParentsBottomUp() { + var levels = _this3.hierarchical.getLevels(); + + levels = levels.reverse(); + + for (var i = 0; i < levels.length; i++) { + var level = levels[i]; + var levelNodes = _this3.hierarchical.distributionOrdering[level]; + + for (var j = 0; j < levelNodes.length; j++) { + _this3._centerParent(levelNodes[j]); + } + } + }; // the actual work is done here. + + + if (this.options.hierarchical.blockShifting === true) { + shiftBranchesCloserBottomUp(5); + centerAllParents(); + } // minimize edge length + + + if (this.options.hierarchical.edgeMinimization === true) { + minimizeEdgeLengthBottomUp(20); + } + + if (this.options.hierarchical.parentCentralization === true) { + centerAllParentsBottomUp(); + } + + shiftTrees(); + } + /** + * This gives the space around the node. IF a map is supplied, it will only check against nodes NOT in the map. + * This is used to only get the distances to nodes outside of a branch. + * @param {Node} node + * @param {{Node.id: vis.Node}} map + * @returns {number[]} + * @private + */ + + }, { + key: "_getSpaceAroundNode", + value: function _getSpaceAroundNode(node, map) { + var useMap = true; + + if (map === undefined) { + useMap = false; + } + + var level = this.hierarchical.levels[node.id]; + + if (level !== undefined) { + var index = this.hierarchical.distributionIndex[node.id]; + var position = this.direction.getPosition(node); + var ordering = this.hierarchical.distributionOrdering[level]; + var minSpace = 1e9; + var maxSpace = 1e9; + + if (index !== 0) { + var prevNode = ordering[index - 1]; + + if (useMap === true && map[prevNode.id] === undefined || useMap === false) { + var prevPos = this.direction.getPosition(prevNode); + minSpace = position - prevPos; + } + } + + if (index != ordering.length - 1) { + var nextNode = ordering[index + 1]; + + if (useMap === true && map[nextNode.id] === undefined || useMap === false) { + var nextPos = this.direction.getPosition(nextNode); + maxSpace = Math.min(maxSpace, nextPos - position); + } + } + + return [minSpace, maxSpace]; + } else { + return [0, 0]; + } + } + /** + * We use this method to center a parent node and check if it does not cross other nodes when it does. + * @param {Node} node + * @private + */ + + }, { + key: "_centerParent", + value: function _centerParent(node) { + if (this.hierarchical.parentReference[node.id]) { + var parents = this.hierarchical.parentReference[node.id]; + + for (var i = 0; i < parents.length; i++) { + var parentId = parents[i]; + var parentNode = this.body.nodes[parentId]; + var children = this.hierarchical.childrenReference[parentId]; + + if (children !== undefined) { + // get the range of the children + var newPosition = this._getCenterPosition(children); + + var position = this.direction.getPosition(parentNode); + + var _this$_getSpaceAround = this._getSpaceAroundNode(parentNode), + _this$_getSpaceAround2 = slicedToArray(_this$_getSpaceAround, 2), + minSpace = _this$_getSpaceAround2[0], + maxSpace = _this$_getSpaceAround2[1]; + + var diff = position - newPosition; + + if (diff < 0 && Math.abs(diff) < maxSpace - this.options.hierarchical.nodeSpacing || diff > 0 && Math.abs(diff) < minSpace - this.options.hierarchical.nodeSpacing) { + this.direction.setPosition(parentNode, newPosition); + } + } + } + } + } + /** + * This function places the nodes on the canvas based on the hierarchial distribution. + * + * @param {Object} distribution | obtained by the function this._getDistribution() + * @private + */ + + }, { + key: "_placeNodesByHierarchy", + value: function _placeNodesByHierarchy(distribution) { + this.positionedNodes = {}; // start placing all the level 0 nodes first. Then recursively position their branches. + + for (var level in distribution) { + if (distribution.hasOwnProperty(level)) { + // sort nodes in level by position: + var nodeArray = Object.keys(distribution[level]); + nodeArray = this._indexArrayToNodes(nodeArray); + this.direction.sort(nodeArray); + var handledNodeCount = 0; + + for (var i = 0; i < nodeArray.length; i++) { + var node = nodeArray[i]; + + if (this.positionedNodes[node.id] === undefined) { + var spacing = this.options.hierarchical.nodeSpacing; + var pos = spacing * handledNodeCount; // We get the X or Y values we need and store them in pos and previousPos. + // The get and set make sure we get X or Y + + if (handledNodeCount > 0) { + pos = this.direction.getPosition(nodeArray[i - 1]) + spacing; + } + + this.direction.setPosition(node, pos, level); + + this._validatePositionAndContinue(node, level, pos); + + handledNodeCount++; + } + } + } + } + } + /** + * This is a recursively called function to enumerate the branches from the largest hubs and place the nodes + * on a X position that ensures there will be no overlap. + * + * @param {Node.id} parentId + * @param {number} parentLevel + * @private + */ + + }, { + key: "_placeBranchNodes", + value: function _placeBranchNodes(parentId, parentLevel) { + var childRef = this.hierarchical.childrenReference[parentId]; // if this is not a parent, cancel the placing. This can happen with multiple parents to one child. + + if (childRef === undefined) { + return; + } // get a list of childNodes + + + var childNodes = []; + + for (var i = 0; i < childRef.length; i++) { + childNodes.push(this.body.nodes[childRef[i]]); + } // use the positions to order the nodes. + + + this.direction.sort(childNodes); // position the childNodes + + for (var _i5 = 0; _i5 < childNodes.length; _i5++) { + var childNode = childNodes[_i5]; + var childNodeLevel = this.hierarchical.levels[childNode.id]; // check if the child node is below the parent node and if it has already been positioned. + + if (childNodeLevel > parentLevel && this.positionedNodes[childNode.id] === undefined) { + // get the amount of space required for this node. If parent the width is based on the amount of children. + var spacing = this.options.hierarchical.nodeSpacing; + var pos = void 0; // we get the X or Y values we need and store them in pos and previousPos. + // The get and set make sure we get X or Y + + if (_i5 === 0) { + pos = this.direction.getPosition(this.body.nodes[parentId]); + } else { + pos = this.direction.getPosition(childNodes[_i5 - 1]) + spacing; + } + + this.direction.setPosition(childNode, pos, childNodeLevel); + + this._validatePositionAndContinue(childNode, childNodeLevel, pos); + } else { + return; + } + } // center the parent nodes. + + + var center = this._getCenterPosition(childNodes); + + this.direction.setPosition(this.body.nodes[parentId], center, parentLevel); + } + /** + * This method checks for overlap and if required shifts the branch. It also keeps records of positioned nodes. + * Finally it will call _placeBranchNodes to place the branch nodes. + * @param {Node} node + * @param {number} level + * @param {number} pos + * @private + */ + + }, { + key: "_validatePositionAndContinue", + value: function _validatePositionAndContinue(node, level, pos) { + // This method only works for formal trees and formal forests + // Early exit if this is not the case + if (!this.hierarchical.isTree) return; // if overlap has been detected, we shift the branch + + if (this.lastNodeOnLevel[level] !== undefined) { + var previousPos = this.direction.getPosition(this.body.nodes[this.lastNodeOnLevel[level]]); + + if (pos - previousPos < this.options.hierarchical.nodeSpacing) { + var diff = previousPos + this.options.hierarchical.nodeSpacing - pos; + + var sharedParent = this._findCommonParent(this.lastNodeOnLevel[level], node.id); + + this._shiftBlock(sharedParent.withChild, diff); + } + } + + this.lastNodeOnLevel[level] = node.id; // store change in position. + + this.positionedNodes[node.id] = true; + + this._placeBranchNodes(node.id, level); + } + /** + * Receives an array with node indices and returns an array with the actual node references. + * Used for sorting based on node properties. + * @param {Array.} idArray + * @returns {Array.} + */ + + }, { + key: "_indexArrayToNodes", + value: function _indexArrayToNodes(idArray) { + var array = []; + + for (var i = 0; i < idArray.length; i++) { + array.push(this.body.nodes[idArray[i]]); + } + + return array; + } + /** + * This function get the distribution of levels based on hubsize + * + * @returns {Object} + * @private + */ + + }, { + key: "_getDistribution", + value: function _getDistribution() { + var distribution = {}; + var nodeId, node; // we fix Y because the hierarchy is vertical, + // we fix X so we do not give a node an x position for a second time. + // the fix of X is removed after the x value has been set. + + for (nodeId in this.body.nodes) { + if (this.body.nodes.hasOwnProperty(nodeId)) { + node = this.body.nodes[nodeId]; + var level = this.hierarchical.levels[nodeId] === undefined ? 0 : this.hierarchical.levels[nodeId]; + this.direction.fix(node, level); + + if (distribution[level] === undefined) { + distribution[level] = {}; + } + + distribution[level][nodeId] = node; + } + } + + return distribution; + } + /** + * Return the active (i.e. visible) edges for this node + * + * @param {Node} node + * @returns {Array.} Array of edge instances + * @private + */ + + }, { + key: "_getActiveEdges", + value: function _getActiveEdges(node) { + var _this4 = this; + + var result = []; + util.forEach(node.edges, function (edge) { + if (_this4.body.edgeIndices.indexOf(edge.id) !== -1) { + result.push(edge); + } + }); + return result; + } + /** + * Get the hubsizes for all active nodes. + * + * @returns {number} + * @private + */ + + }, { + key: "_getHubSizes", + value: function _getHubSizes() { + var _this5 = this; + + var hubSizes = {}; + var nodeIds = this.body.nodeIndices; + util.forEach(nodeIds, function (nodeId) { + var node = _this5.body.nodes[nodeId]; + + var hubSize = _this5._getActiveEdges(node).length; + + hubSizes[hubSize] = true; + }); // Make an array of the size sorted descending + + var result = []; + util.forEach(hubSizes, function (size) { + result.push(Number(size)); + }); + timsort$1.sort(result, function (a, b) { + return b - a; + }); + return result; + } + /** + * this function allocates nodes in levels based on the recursive branching from the largest hubs. + * + * @private + */ + + }, { + key: "_determineLevelsByHubsize", + value: function _determineLevelsByHubsize() { + var _this6 = this; + + var levelDownstream = function levelDownstream(nodeA, nodeB) { + _this6.hierarchical.levelDownstream(nodeA, nodeB); + }; + + var hubSizes = this._getHubSizes(); + + var _loop = function _loop(i) { + var hubSize = hubSizes[i]; + if (hubSize === 0) return "break"; + util.forEach(_this6.body.nodeIndices, function (nodeId) { + var node = _this6.body.nodes[nodeId]; + + if (hubSize === _this6._getActiveEdges(node).length) { + _this6._crawlNetwork(levelDownstream, nodeId); + } + }); + }; + + for (var i = 0; i < hubSizes.length; ++i) { + var _ret = _loop(i); + + if (_ret === "break") break; + } + } + /** + * TODO: release feature + * TODO: Determine if this feature is needed at all + * + * @private + */ + + }, { + key: "_determineLevelsCustomCallback", + value: function _determineLevelsCustomCallback() { + var _this7 = this; + + var minLevel = 100000; // TODO: this should come from options. + + var customCallback = function customCallback(nodeA, nodeB, edge) {// eslint-disable-line no-unused-vars + }; // TODO: perhaps move to HierarchicalStatus. + // But I currently don't see the point, this method is not used. + + + var levelByDirection = function levelByDirection(nodeA, nodeB, edge) { + var levelA = _this7.hierarchical.levels[nodeA.id]; // set initial level + + if (levelA === undefined) { + levelA = _this7.hierarchical.levels[nodeA.id] = minLevel; + } + + var diff = customCallback(NetworkUtil.cloneOptions(nodeA, 'node'), NetworkUtil.cloneOptions(nodeB, 'node'), NetworkUtil.cloneOptions(edge, 'edge')); + _this7.hierarchical.levels[nodeB.id] = levelA + diff; + }; + + this._crawlNetwork(levelByDirection); + + this.hierarchical.setMinLevelToZero(this.body.nodes); + } + /** + * Allocate nodes in levels based on the direction of the edges. + * + * @private + */ + + }, { + key: "_determineLevelsDirected", + value: function _determineLevelsDirected() { + var _this8 = this; + + var minLevel = 10000; + /** + * Check if there is an edge going the opposite direction for given edge + * + * @param {Edge} edge edge to check + * @returns {boolean} true if there's another edge going into the opposite direction + */ + + var isBidirectional = function isBidirectional(edge) { + util.forEach(_this8.body.edges, function (otherEdge) { + if (otherEdge.toId === edge.fromId && otherEdge.fromId === edge.toId) { + return true; + } + }); + return false; + }; + + var levelByDirection = function levelByDirection(nodeA, nodeB, edge) { + var levelA = _this8.hierarchical.levels[nodeA.id]; + var levelB = _this8.hierarchical.levels[nodeB.id]; + + if (isBidirectional(edge) ) ; // set initial level + + + if (levelA === undefined) { + levelA = _this8.hierarchical.levels[nodeA.id] = minLevel; + } + + if (edge.toId == nodeB.id) { + _this8.hierarchical.levels[nodeB.id] = levelA + 1; + } else { + _this8.hierarchical.levels[nodeB.id] = levelA - 1; + } + }; + + this._crawlNetwork(levelByDirection); + + this.hierarchical.setMinLevelToZero(this.body.nodes); + } + /** + * Update the bookkeeping of parent and child. + * @private + */ + + }, { + key: "_generateMap", + value: function _generateMap() { + var _this9 = this; + + var fillInRelations = function fillInRelations(parentNode, childNode) { + if (_this9.hierarchical.levels[childNode.id] > _this9.hierarchical.levels[parentNode.id]) { + _this9.hierarchical.addRelation(parentNode.id, childNode.id); + } + }; + + this._crawlNetwork(fillInRelations); + + this.hierarchical.checkIfTree(); + } + /** + * Crawl over the entire network and use a callback on each node couple that is connected to each other. + * @param {function} [callback=function(){}] | will receive nodeA, nodeB and the connecting edge. A and B are distinct. + * @param {Node.id} startingNodeId + * @private + */ + + }, { + key: "_crawlNetwork", + value: function _crawlNetwork() { + var _this10 = this; + + var callback = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : function () {}; + var startingNodeId = arguments.length > 1 ? arguments[1] : undefined; + var progress = {}; + + var crawler = function crawler(node, tree) { + if (progress[node.id] === undefined) { + _this10.hierarchical.setTreeIndex(node, tree); + + progress[node.id] = true; + var childNode; + + var edges = _this10._getActiveEdges(node); + + for (var i = 0; i < edges.length; i++) { + var edge = edges[i]; + + if (edge.connected === true) { + if (edge.toId == node.id) { + // Not '===' because id's can be string and numeric + childNode = edge.from; + } else { + childNode = edge.to; + } + + if (node.id != childNode.id) { + // Not '!==' because id's can be string and numeric + callback(node, childNode, edge); + crawler(childNode, tree); + } + } + } + } + }; + + if (startingNodeId === undefined) { + // Crawl over all nodes + var treeIndex = 0; // Serves to pass a unique id for the current distinct tree + + for (var i = 0; i < this.body.nodeIndices.length; i++) { + var nodeId = this.body.nodeIndices[i]; + + if (progress[nodeId] === undefined) { + var node = this.body.nodes[nodeId]; + crawler(node, treeIndex); + treeIndex += 1; + } + } + } else { + // Crawl from the given starting node + var _node2 = this.body.nodes[startingNodeId]; + + if (_node2 === undefined) { + console.error("Node not found:", startingNodeId); + return; + } + + crawler(_node2); + } + } + /** + * Shift a branch a certain distance + * @param {Node.id} parentId + * @param {number} diff + * @private + */ + + }, { + key: "_shiftBlock", + value: function _shiftBlock(parentId, diff) { + var _this11 = this; + + var progress = {}; + + var shifter = function shifter(parentId) { + if (progress[parentId]) { + return; + } + + progress[parentId] = true; + + _this11.direction.shift(parentId, diff); + + var childRef = _this11.hierarchical.childrenReference[parentId]; + + if (childRef !== undefined) { + for (var i = 0; i < childRef.length; i++) { + shifter(childRef[i]); + } + } + }; + + shifter(parentId); + } + /** + * Find a common parent between branches. + * @param {Node.id} childA + * @param {Node.id} childB + * @returns {{foundParent, withChild}} + * @private + */ + + }, { + key: "_findCommonParent", + value: function _findCommonParent(childA, childB) { + var _this12 = this; + + var parents = {}; + + var iterateParents = function iterateParents(parents, child) { + var parentRef = _this12.hierarchical.parentReference[child]; + + if (parentRef !== undefined) { + for (var i = 0; i < parentRef.length; i++) { + var parent = parentRef[i]; + parents[parent] = true; + iterateParents(parents, parent); + } + } + }; + + var findParent = function findParent(parents, child) { + var parentRef = _this12.hierarchical.parentReference[child]; + + if (parentRef !== undefined) { + for (var i = 0; i < parentRef.length; i++) { + var parent = parentRef[i]; + + if (parents[parent] !== undefined) { + return { + foundParent: parent, + withChild: child + }; + } + + var branch = findParent(parents, parent); + + if (branch.foundParent !== null) { + return branch; + } + } + } + + return { + foundParent: null, + withChild: child + }; + }; + + iterateParents(parents, childA); + return findParent(parents, childB); + } + /** + * Set the strategy pattern for handling the coordinates given the current direction. + * + * The individual instances contain all the operations and data specific to a layout direction. + * + * @param {Node} node + * @param {{x: number, y: number}} position + * @param {number} level + * @param {boolean} [doNotUpdate=false] + * @private + */ + + }, { + key: "setDirectionStrategy", + value: function setDirectionStrategy() { + var isVertical = this.options.hierarchical.direction === 'UD' || this.options.hierarchical.direction === 'DU'; + + if (isVertical) { + this.direction = new VerticalStrategy(this); + } else { + this.direction = new HorizontalStrategy(this); + } + } + /** + * Determine the center position of a branch from the passed list of child nodes + * + * This takes into account the positions of all the child nodes. + * @param {Array.} childNodes Array of either child nodes or node id's + * @return {number} + * @private + */ + + }, { + key: "_getCenterPosition", + value: function _getCenterPosition(childNodes) { + var minPos = 1e9; + var maxPos = -1e9; + + for (var i = 0; i < childNodes.length; i++) { + var childNode = void 0; + + if (childNodes[i].id !== undefined) { + childNode = childNodes[i]; + } else { + var childNodeId = childNodes[i]; + childNode = this.body.nodes[childNodeId]; + } + + var position = this.direction.getPosition(childNode); + minPos = Math.min(minPos, position); + maxPos = Math.max(maxPos, position); + } + + return 0.5 * (minPos + maxPos); + } + }]); + + return LayoutEngine; + }(); + + /** + * Clears the toolbar div element of children + * + * @private + */ + + var ManipulationSystem = + /*#__PURE__*/ + function () { + /** + * @param {Object} body + * @param {Canvas} canvas + * @param {SelectionHandler} selectionHandler + */ + function ManipulationSystem(body, canvas, selectionHandler) { + var _this = this; + + classCallCheck$1(this, ManipulationSystem); + + this.body = body; + this.canvas = canvas; + this.selectionHandler = selectionHandler; + this.editMode = false; + this.manipulationDiv = undefined; + this.editModeDiv = undefined; + this.closeDiv = undefined; + this.manipulationHammers = []; + this.temporaryUIFunctions = {}; + this.temporaryEventFunctions = []; + this.touchTime = 0; + this.temporaryIds = { + nodes: [], + edges: [] + }; + this.guiEnabled = false; + this.inMode = false; + this.selectedControlNode = undefined; + this.options = {}; + this.defaultOptions = { + enabled: false, + initiallyActive: false, + addNode: true, + addEdge: true, + editNode: undefined, + editEdge: true, + deleteNode: true, + deleteEdge: true, + controlNodeStyle: { + shape: 'dot', + size: 6, + color: { + background: '#ff0000', + border: '#3c3c3c', + highlight: { + background: '#07f968', + border: '#3c3c3c' + } + }, + borderWidth: 2, + borderWidthSelected: 2 + } + }; + util.extend(this.options, this.defaultOptions); + this.body.emitter.on('destroy', function () { + _this._clean(); + }); + this.body.emitter.on('_dataChanged', this._restore.bind(this)); + this.body.emitter.on('_resetData', this._restore.bind(this)); + } + /** + * If something changes in the data during editing, switch back to the initial datamanipulation state and close all edit modes. + * @private + */ + + + createClass$1(ManipulationSystem, [{ + key: "_restore", + value: function _restore() { + if (this.inMode !== false) { + if (this.options.initiallyActive === true) { + this.enableEditMode(); + } else { + this.disableEditMode(); + } + } + } + /** + * Set the Options + * + * @param {Object} options + * @param {Object} allOptions + * @param {Object} globalOptions + */ + + }, { + key: "setOptions", + value: function setOptions(options, allOptions, globalOptions) { + if (allOptions !== undefined) { + if (allOptions.locale !== undefined) { + this.options.locale = allOptions.locale; + } else { + this.options.locale = globalOptions.locale; + } + + if (allOptions.locales !== undefined) { + this.options.locales = allOptions.locales; + } else { + this.options.locales = globalOptions.locales; + } + } + + if (options !== undefined) { + if (typeof options === 'boolean') { + this.options.enabled = options; + } else { + this.options.enabled = true; + util.deepExtend(this.options, options); + } + + if (this.options.initiallyActive === true) { + this.editMode = true; + } + + this._setup(); + } + } + /** + * Enable or disable edit-mode. Draws the DOM required and cleans up after itself. + * + * @private + */ + + }, { + key: "toggleEditMode", + value: function toggleEditMode() { + if (this.editMode === true) { + this.disableEditMode(); + } else { + this.enableEditMode(); + } + } + /** + * Enables Edit Mode + */ + + }, { + key: "enableEditMode", + value: function enableEditMode() { + this.editMode = true; + + this._clean(); + + if (this.guiEnabled === true) { + this.manipulationDiv.style.display = 'block'; + this.closeDiv.style.display = 'block'; + this.editModeDiv.style.display = 'none'; + this.showManipulatorToolbar(); + } + } + /** + * Disables Edit Mode + */ + + }, { + key: "disableEditMode", + value: function disableEditMode() { + this.editMode = false; + + this._clean(); + + if (this.guiEnabled === true) { + this.manipulationDiv.style.display = 'none'; + this.closeDiv.style.display = 'none'; + this.editModeDiv.style.display = 'block'; + + this._createEditButton(); + } + } + /** + * Creates the main toolbar. Removes functions bound to the select event. Binds all the buttons of the toolbar. + * + * @private + */ + + }, { + key: "showManipulatorToolbar", + value: function showManipulatorToolbar() { + // restore the state of any bound functions or events, remove control nodes, restore physics + this._clean(); // reset global variables + + + this.manipulationDOM = {}; // if the gui is enabled, draw all elements. + + if (this.guiEnabled === true) { + // a _restore will hide these menus + this.editMode = true; + this.manipulationDiv.style.display = 'block'; + this.closeDiv.style.display = 'block'; + + var selectedNodeCount = this.selectionHandler._getSelectedNodeCount(); + + var selectedEdgeCount = this.selectionHandler._getSelectedEdgeCount(); + + var selectedTotalCount = selectedNodeCount + selectedEdgeCount; + var locale = this.options.locales[this.options.locale]; + var needSeperator = false; + + if (this.options.addNode !== false) { + this._createAddNodeButton(locale); + + needSeperator = true; + } + + if (this.options.addEdge !== false) { + if (needSeperator === true) { + this._createSeperator(1); + } else { + needSeperator = true; + } + + this._createAddEdgeButton(locale); + } + + if (selectedNodeCount === 1 && typeof this.options.editNode === 'function') { + if (needSeperator === true) { + this._createSeperator(2); + } else { + needSeperator = true; + } + + this._createEditNodeButton(locale); + } else if (selectedEdgeCount === 1 && selectedNodeCount === 0 && this.options.editEdge !== false) { + if (needSeperator === true) { + this._createSeperator(3); + } else { + needSeperator = true; + } + + this._createEditEdgeButton(locale); + } // remove buttons + + + if (selectedTotalCount !== 0) { + if (selectedNodeCount > 0 && this.options.deleteNode !== false) { + if (needSeperator === true) { + this._createSeperator(4); + } + + this._createDeleteButton(locale); + } else if (selectedNodeCount === 0 && this.options.deleteEdge !== false) { + if (needSeperator === true) { + this._createSeperator(4); + } + + this._createDeleteButton(locale); + } + } // bind the close button + + + this._bindHammerToDiv(this.closeDiv, this.toggleEditMode.bind(this)); // refresh this bar based on what has been selected + + + this._temporaryBindEvent('select', this.showManipulatorToolbar.bind(this)); + } // redraw to show any possible changes + + + this.body.emitter.emit('_redraw'); + } + /** + * Create the toolbar for adding Nodes + */ + + }, { + key: "addNodeMode", + value: function addNodeMode() { + // when using the gui, enable edit mode if it wasnt already. + if (this.editMode !== true) { + this.enableEditMode(); + } // restore the state of any bound functions or events, remove control nodes, restore physics + + + this._clean(); + + this.inMode = 'addNode'; + + if (this.guiEnabled === true) { + var locale = this.options.locales[this.options.locale]; + this.manipulationDOM = {}; + + this._createBackButton(locale); + + this._createSeperator(); + + this._createDescription(locale['addDescription'] || this.options.locales['en']['addDescription']); // bind the close button + + + this._bindHammerToDiv(this.closeDiv, this.toggleEditMode.bind(this)); + } + + this._temporaryBindEvent('click', this._performAddNode.bind(this)); + } + /** + * call the bound function to handle the editing of the node. The node has to be selected. + */ + + }, { + key: "editNode", + value: function editNode() { + var _this2 = this; + + // when using the gui, enable edit mode if it wasnt already. + if (this.editMode !== true) { + this.enableEditMode(); + } // restore the state of any bound functions or events, remove control nodes, restore physics + + + this._clean(); + + var node = this.selectionHandler._getSelectedNode(); + + if (node !== undefined) { + this.inMode = 'editNode'; + + if (typeof this.options.editNode === 'function') { + if (node.isCluster !== true) { + var data = util.deepExtend({}, node.options, false); + data.x = node.x; + data.y = node.y; + + if (this.options.editNode.length === 2) { + this.options.editNode(data, function (finalizedData) { + if (finalizedData !== null && finalizedData !== undefined && _this2.inMode === 'editNode') { + // if for whatever reason the mode has changes (due to dataset change) disregard the callback) { + _this2.body.data.nodes.getDataSet().update(finalizedData); + } + + _this2.showManipulatorToolbar(); + }); + } else { + throw new Error('The function for edit does not support two arguments (data, callback)'); + } + } else { + alert(this.options.locales[this.options.locale]['editClusterError'] || this.options.locales['en']['editClusterError']); + } + } else { + throw new Error('No function has been configured to handle the editing of nodes.'); + } + } else { + this.showManipulatorToolbar(); + } + } + /** + * create the toolbar to connect nodes + */ + + }, { + key: "addEdgeMode", + value: function addEdgeMode() { + // when using the gui, enable edit mode if it wasnt already. + if (this.editMode !== true) { + this.enableEditMode(); + } // restore the state of any bound functions or events, remove control nodes, restore physics + + + this._clean(); + + this.inMode = 'addEdge'; + + if (this.guiEnabled === true) { + var locale = this.options.locales[this.options.locale]; + this.manipulationDOM = {}; + + this._createBackButton(locale); + + this._createSeperator(); + + this._createDescription(locale['edgeDescription'] || this.options.locales['en']['edgeDescription']); // bind the close button + + + this._bindHammerToDiv(this.closeDiv, this.toggleEditMode.bind(this)); + } // temporarily overload functions + + + this._temporaryBindUI('onTouch', this._handleConnect.bind(this)); + + this._temporaryBindUI('onDragEnd', this._finishConnect.bind(this)); + + this._temporaryBindUI('onDrag', this._dragControlNode.bind(this)); + + this._temporaryBindUI('onRelease', this._finishConnect.bind(this)); + + this._temporaryBindUI('onDragStart', this._dragStartEdge.bind(this)); + + this._temporaryBindUI('onHold', function () {}); + } + /** + * create the toolbar to edit edges + */ + + }, { + key: "editEdgeMode", + value: function editEdgeMode() { + // when using the gui, enable edit mode if it wasn't already. + if (this.editMode !== true) { + this.enableEditMode(); + } // restore the state of any bound functions or events, remove control nodes, restore physics + + + this._clean(); + + this.inMode = 'editEdge'; + + if (_typeof_1$1(this.options.editEdge) === 'object' && typeof this.options.editEdge.editWithoutDrag === "function") { + this.edgeBeingEditedId = this.selectionHandler.getSelectedEdges()[0]; + + if (this.edgeBeingEditedId !== undefined) { + var edge = this.body.edges[this.edgeBeingEditedId]; + + this._performEditEdge(edge.from, edge.to); + + return; + } + } + + if (this.guiEnabled === true) { + var locale = this.options.locales[this.options.locale]; + this.manipulationDOM = {}; + + this._createBackButton(locale); + + this._createSeperator(); + + this._createDescription(locale['editEdgeDescription'] || this.options.locales['en']['editEdgeDescription']); // bind the close button + + + this._bindHammerToDiv(this.closeDiv, this.toggleEditMode.bind(this)); + } + + this.edgeBeingEditedId = this.selectionHandler.getSelectedEdges()[0]; + + if (this.edgeBeingEditedId !== undefined) { + var _edge = this.body.edges[this.edgeBeingEditedId]; // create control nodes + + var controlNodeFrom = this._getNewTargetNode(_edge.from.x, _edge.from.y); + + var controlNodeTo = this._getNewTargetNode(_edge.to.x, _edge.to.y); + + this.temporaryIds.nodes.push(controlNodeFrom.id); + this.temporaryIds.nodes.push(controlNodeTo.id); + this.body.nodes[controlNodeFrom.id] = controlNodeFrom; + this.body.nodeIndices.push(controlNodeFrom.id); + this.body.nodes[controlNodeTo.id] = controlNodeTo; + this.body.nodeIndices.push(controlNodeTo.id); // temporarily overload UI functions, cleaned up automatically because of _temporaryBindUI + + this._temporaryBindUI('onTouch', this._controlNodeTouch.bind(this)); // used to get the position + + + this._temporaryBindUI('onTap', function () {}); // disabled + + + this._temporaryBindUI('onHold', function () {}); // disabled + + + this._temporaryBindUI('onDragStart', this._controlNodeDragStart.bind(this)); // used to select control node + + + this._temporaryBindUI('onDrag', this._controlNodeDrag.bind(this)); // used to drag control node + + + this._temporaryBindUI('onDragEnd', this._controlNodeDragEnd.bind(this)); // used to connect or revert control nodes + + + this._temporaryBindUI('onMouseMove', function () {}); // disabled + // create function to position control nodes correctly on movement + // automatically cleaned up because we use the temporary bind + + + this._temporaryBindEvent('beforeDrawing', function (ctx) { + var positions = _edge.edgeType.findBorderPositions(ctx); + + if (controlNodeFrom.selected === false) { + controlNodeFrom.x = positions.from.x; + controlNodeFrom.y = positions.from.y; + } + + if (controlNodeTo.selected === false) { + controlNodeTo.x = positions.to.x; + controlNodeTo.y = positions.to.y; + } + }); + + this.body.emitter.emit('_redraw'); + } else { + this.showManipulatorToolbar(); + } + } + /** + * delete everything in the selection + */ + + }, { + key: "deleteSelected", + value: function deleteSelected() { + var _this3 = this; + + // when using the gui, enable edit mode if it wasnt already. + if (this.editMode !== true) { + this.enableEditMode(); + } // restore the state of any bound functions or events, remove control nodes, restore physics + + + this._clean(); + + this.inMode = 'delete'; + var selectedNodes = this.selectionHandler.getSelectedNodes(); + var selectedEdges = this.selectionHandler.getSelectedEdges(); + var deleteFunction = undefined; + + if (selectedNodes.length > 0) { + for (var i = 0; i < selectedNodes.length; i++) { + if (this.body.nodes[selectedNodes[i]].isCluster === true) { + alert(this.options.locales[this.options.locale]['deleteClusterError'] || this.options.locales['en']['deleteClusterError']); + return; + } + } + + if (typeof this.options.deleteNode === 'function') { + deleteFunction = this.options.deleteNode; + } + } else if (selectedEdges.length > 0) { + if (typeof this.options.deleteEdge === 'function') { + deleteFunction = this.options.deleteEdge; + } + } + + if (typeof deleteFunction === 'function') { + var data = { + nodes: selectedNodes, + edges: selectedEdges + }; + + if (deleteFunction.length === 2) { + deleteFunction(data, function (finalizedData) { + if (finalizedData !== null && finalizedData !== undefined && _this3.inMode === 'delete') { + // if for whatever reason the mode has changes (due to dataset change) disregard the callback) { + _this3.body.data.edges.getDataSet().remove(finalizedData.edges); + + _this3.body.data.nodes.getDataSet().remove(finalizedData.nodes); + + _this3.body.emitter.emit('startSimulation'); + + _this3.showManipulatorToolbar(); + } else { + _this3.body.emitter.emit('startSimulation'); + + _this3.showManipulatorToolbar(); + } + }); + } else { + throw new Error('The function for delete does not support two arguments (data, callback)'); + } + } else { + this.body.data.edges.getDataSet().remove(selectedEdges); + this.body.data.nodes.getDataSet().remove(selectedNodes); + this.body.emitter.emit('startSimulation'); + this.showManipulatorToolbar(); + } + } //********************************************** PRIVATE ***************************************// + + /** + * draw or remove the DOM + * @private + */ + + }, { + key: "_setup", + value: function _setup() { + if (this.options.enabled === true) { + // Enable the GUI + this.guiEnabled = true; + + this._createWrappers(); + + if (this.editMode === false) { + this._createEditButton(); + } else { + this.showManipulatorToolbar(); + } + } else { + this._removeManipulationDOM(); // disable the gui + + + this.guiEnabled = false; + } + } + /** + * create the div overlays that contain the DOM + * @private + */ + + }, { + key: "_createWrappers", + value: function _createWrappers() { + // load the manipulator HTML elements. All styling done in css. + if (this.manipulationDiv === undefined) { + this.manipulationDiv = document.createElement('div'); + this.manipulationDiv.className = 'vis-manipulation'; + + if (this.editMode === true) { + this.manipulationDiv.style.display = 'block'; + } else { + this.manipulationDiv.style.display = 'none'; + } + + this.canvas.frame.appendChild(this.manipulationDiv); + } // container for the edit button. + + + if (this.editModeDiv === undefined) { + this.editModeDiv = document.createElement('div'); + this.editModeDiv.className = 'vis-edit-mode'; + + if (this.editMode === true) { + this.editModeDiv.style.display = 'none'; + } else { + this.editModeDiv.style.display = 'block'; + } + + this.canvas.frame.appendChild(this.editModeDiv); + } // container for the close div button + + + if (this.closeDiv === undefined) { + this.closeDiv = document.createElement('div'); + this.closeDiv.className = 'vis-close'; + this.closeDiv.style.display = this.manipulationDiv.style.display; + this.canvas.frame.appendChild(this.closeDiv); + } + } + /** + * generate a new target node. Used for creating new edges and editing edges + * + * @param {number} x + * @param {number} y + * @returns {Node} + * @private + */ + + }, { + key: "_getNewTargetNode", + value: function _getNewTargetNode(x, y) { + var controlNodeStyle = util.deepExtend({}, this.options.controlNodeStyle); + controlNodeStyle.id = 'targetNode' + util.randomUUID(); + controlNodeStyle.hidden = false; + controlNodeStyle.physics = false; + controlNodeStyle.x = x; + controlNodeStyle.y = y; // we have to define the bounding box in order for the nodes to be drawn immediately + + var node = this.body.functions.createNode(controlNodeStyle); + node.shape.boundingBox = { + left: x, + right: x, + top: y, + bottom: y + }; + return node; + } + /** + * Create the edit button + */ + + }, { + key: "_createEditButton", + value: function _createEditButton() { + // restore everything to it's original state (if applicable) + this._clean(); // reset the manipulationDOM + + + this.manipulationDOM = {}; // empty the editModeDiv + + util.recursiveDOMDelete(this.editModeDiv); // create the contents for the editMode button + + var locale = this.options.locales[this.options.locale]; + + var button = this._createButton('editMode', 'vis-button vis-edit vis-edit-mode', locale['edit'] || this.options.locales['en']['edit']); + + this.editModeDiv.appendChild(button); // bind a hammer listener to the button, calling the function toggleEditMode. + + this._bindHammerToDiv(button, this.toggleEditMode.bind(this)); + } + /** + * this function cleans up after everything this module does. Temporary elements, functions and events are removed, physics restored, hammers removed. + * @private + */ + + }, { + key: "_clean", + value: function _clean() { + // not in mode + this.inMode = false; // _clean the divs + + if (this.guiEnabled === true) { + util.recursiveDOMDelete(this.editModeDiv); + util.recursiveDOMDelete(this.manipulationDiv); // removes all the bindings and overloads + + this._cleanManipulatorHammers(); + } // remove temporary nodes and edges + + + this._cleanupTemporaryNodesAndEdges(); // restore overloaded UI functions + + + this._unbindTemporaryUIs(); // remove the temporaryEventFunctions + + + this._unbindTemporaryEvents(); // restore the physics if required + + + this.body.emitter.emit('restorePhysics'); + } + /** + * Each dom element has it's own hammer. They are stored in this.manipulationHammers. This cleans them up. + * @private + */ + + }, { + key: "_cleanManipulatorHammers", + value: function _cleanManipulatorHammers() { + // _clean hammer bindings + if (this.manipulationHammers.length != 0) { + for (var i = 0; i < this.manipulationHammers.length; i++) { + this.manipulationHammers[i].destroy(); + } + + this.manipulationHammers = []; + } + } + /** + * Remove all DOM elements created by this module. + * @private + */ + + }, { + key: "_removeManipulationDOM", + value: function _removeManipulationDOM() { + // removes all the bindings and overloads + this._clean(); // empty the manipulation divs + + + util.recursiveDOMDelete(this.manipulationDiv); + util.recursiveDOMDelete(this.editModeDiv); + util.recursiveDOMDelete(this.closeDiv); // remove the manipulation divs + + if (this.manipulationDiv) { + this.canvas.frame.removeChild(this.manipulationDiv); + } + + if (this.editModeDiv) { + this.canvas.frame.removeChild(this.editModeDiv); + } + + if (this.closeDiv) { + this.canvas.frame.removeChild(this.closeDiv); + } // set the references to undefined + + + this.manipulationDiv = undefined; + this.editModeDiv = undefined; + this.closeDiv = undefined; + } + /** + * create a seperator line. the index is to differentiate in the manipulation dom + * @param {number} [index=1] + * @private + */ + + }, { + key: "_createSeperator", + value: function _createSeperator() { + var index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1; + this.manipulationDOM['seperatorLineDiv' + index] = document.createElement('div'); + this.manipulationDOM['seperatorLineDiv' + index].className = 'vis-separator-line'; + this.manipulationDiv.appendChild(this.manipulationDOM['seperatorLineDiv' + index]); + } // ---------------------- DOM functions for buttons --------------------------// + + /** + * + * @param {Locale} locale + * @private + */ + + }, { + key: "_createAddNodeButton", + value: function _createAddNodeButton(locale) { + var button = this._createButton('addNode', 'vis-button vis-add', locale['addNode'] || this.options.locales['en']['addNode']); + + this.manipulationDiv.appendChild(button); + + this._bindHammerToDiv(button, this.addNodeMode.bind(this)); + } + /** + * + * @param {Locale} locale + * @private + */ + + }, { + key: "_createAddEdgeButton", + value: function _createAddEdgeButton(locale) { + var button = this._createButton('addEdge', 'vis-button vis-connect', locale['addEdge'] || this.options.locales['en']['addEdge']); + + this.manipulationDiv.appendChild(button); + + this._bindHammerToDiv(button, this.addEdgeMode.bind(this)); + } + /** + * + * @param {Locale} locale + * @private + */ + + }, { + key: "_createEditNodeButton", + value: function _createEditNodeButton(locale) { + var button = this._createButton('editNode', 'vis-button vis-edit', locale['editNode'] || this.options.locales['en']['editNode']); + + this.manipulationDiv.appendChild(button); + + this._bindHammerToDiv(button, this.editNode.bind(this)); + } + /** + * + * @param {Locale} locale + * @private + */ + + }, { + key: "_createEditEdgeButton", + value: function _createEditEdgeButton(locale) { + var button = this._createButton('editEdge', 'vis-button vis-edit', locale['editEdge'] || this.options.locales['en']['editEdge']); + + this.manipulationDiv.appendChild(button); + + this._bindHammerToDiv(button, this.editEdgeMode.bind(this)); + } + /** + * + * @param {Locale} locale + * @private + */ + + }, { + key: "_createDeleteButton", + value: function _createDeleteButton(locale) { + var deleteBtnClass; + + if (this.options.rtl) { + deleteBtnClass = 'vis-button vis-delete-rtl'; + } else { + deleteBtnClass = 'vis-button vis-delete'; + } + + var button = this._createButton('delete', deleteBtnClass, locale['del'] || this.options.locales['en']['del']); + + this.manipulationDiv.appendChild(button); + + this._bindHammerToDiv(button, this.deleteSelected.bind(this)); + } + /** + * + * @param {Locale} locale + * @private + */ + + }, { + key: "_createBackButton", + value: function _createBackButton(locale) { + var button = this._createButton('back', 'vis-button vis-back', locale['back'] || this.options.locales['en']['back']); + + this.manipulationDiv.appendChild(button); + + this._bindHammerToDiv(button, this.showManipulatorToolbar.bind(this)); + } + /** + * + * @param {number|string} id + * @param {string} className + * @param {label} label + * @param {string} labelClassName + * @returns {HTMLElement} + * @private + */ + + }, { + key: "_createButton", + value: function _createButton(id, className, label) { + var labelClassName = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 'vis-label'; + this.manipulationDOM[id + 'Div'] = document.createElement('div'); + this.manipulationDOM[id + 'Div'].className = className; + this.manipulationDOM[id + 'Label'] = document.createElement('div'); + this.manipulationDOM[id + 'Label'].className = labelClassName; + this.manipulationDOM[id + 'Label'].innerHTML = label; + this.manipulationDOM[id + 'Div'].appendChild(this.manipulationDOM[id + 'Label']); + return this.manipulationDOM[id + 'Div']; + } + /** + * + * @param {Label} label + * @private + */ + + }, { + key: "_createDescription", + value: function _createDescription(label) { + this.manipulationDiv.appendChild(this._createButton('description', 'vis-button vis-none', label)); + } // -------------------------- End of DOM functions for buttons ------------------------------// + + /** + * this binds an event until cleanup by the clean functions. + * @param {Event} event The event + * @param {function} newFunction + * @private + */ + + }, { + key: "_temporaryBindEvent", + value: function _temporaryBindEvent(event, newFunction) { + this.temporaryEventFunctions.push({ + event: event, + boundFunction: newFunction + }); + this.body.emitter.on(event, newFunction); + } + /** + * this overrides an UI function until cleanup by the clean function + * @param {string} UIfunctionName + * @param {function} newFunction + * @private + */ + + }, { + key: "_temporaryBindUI", + value: function _temporaryBindUI(UIfunctionName, newFunction) { + if (this.body.eventListeners[UIfunctionName] !== undefined) { + this.temporaryUIFunctions[UIfunctionName] = this.body.eventListeners[UIfunctionName]; + this.body.eventListeners[UIfunctionName] = newFunction; + } else { + throw new Error('This UI function does not exist. Typo? You tried: ' + UIfunctionName + ' possible are: ' + JSON.stringify(Object.keys(this.body.eventListeners))); + } + } + /** + * Restore the overridden UI functions to their original state. + * + * @private + */ + + }, { + key: "_unbindTemporaryUIs", + value: function _unbindTemporaryUIs() { + for (var functionName in this.temporaryUIFunctions) { + if (this.temporaryUIFunctions.hasOwnProperty(functionName)) { + this.body.eventListeners[functionName] = this.temporaryUIFunctions[functionName]; + delete this.temporaryUIFunctions[functionName]; + } + } + + this.temporaryUIFunctions = {}; + } + /** + * Unbind the events created by _temporaryBindEvent + * @private + */ + + }, { + key: "_unbindTemporaryEvents", + value: function _unbindTemporaryEvents() { + for (var i = 0; i < this.temporaryEventFunctions.length; i++) { + var eventName = this.temporaryEventFunctions[i].event; + var boundFunction = this.temporaryEventFunctions[i].boundFunction; + this.body.emitter.off(eventName, boundFunction); + } + + this.temporaryEventFunctions = []; + } + /** + * Bind an hammer instance to a DOM element. + * + * @param {Element} domElement + * @param {function} boundFunction + */ + + }, { + key: "_bindHammerToDiv", + value: function _bindHammerToDiv(domElement, boundFunction) { + var hammer$1 = new hammer(domElement, {}); + hammerUtil.onTouch(hammer$1, boundFunction); + this.manipulationHammers.push(hammer$1); + } + /** + * Neatly clean up temporary edges and nodes + * @private + */ + + }, { + key: "_cleanupTemporaryNodesAndEdges", + value: function _cleanupTemporaryNodesAndEdges() { + // _clean temporary edges + for (var i = 0; i < this.temporaryIds.edges.length; i++) { + this.body.edges[this.temporaryIds.edges[i]].disconnect(); + delete this.body.edges[this.temporaryIds.edges[i]]; + var indexTempEdge = this.body.edgeIndices.indexOf(this.temporaryIds.edges[i]); + + if (indexTempEdge !== -1) { + this.body.edgeIndices.splice(indexTempEdge, 1); + } + } // _clean temporary nodes + + + for (var _i = 0; _i < this.temporaryIds.nodes.length; _i++) { + delete this.body.nodes[this.temporaryIds.nodes[_i]]; + var indexTempNode = this.body.nodeIndices.indexOf(this.temporaryIds.nodes[_i]); + + if (indexTempNode !== -1) { + this.body.nodeIndices.splice(indexTempNode, 1); + } + } + + this.temporaryIds = { + nodes: [], + edges: [] + }; + } // ------------------------------------------ EDIT EDGE FUNCTIONS -----------------------------------------// + + /** + * the touch is used to get the position of the initial click + * @param {Event} event The event + * @private + */ + + }, { + key: "_controlNodeTouch", + value: function _controlNodeTouch(event) { + this.selectionHandler.unselectAll(); + this.lastTouch = this.body.functions.getPointer(event.center); + this.lastTouch.translation = util.extend({}, this.body.view.translation); // copy the object + } + /** + * the drag start is used to mark one of the control nodes as selected. + * @param {Event} event The event + * @private + */ + + }, { + key: "_controlNodeDragStart", + value: function _controlNodeDragStart(event) { + // eslint-disable-line no-unused-vars + var pointer = this.lastTouch; + + var pointerObj = this.selectionHandler._pointerToPositionObject(pointer); + + var from = this.body.nodes[this.temporaryIds.nodes[0]]; + var to = this.body.nodes[this.temporaryIds.nodes[1]]; + var edge = this.body.edges[this.edgeBeingEditedId]; + this.selectedControlNode = undefined; + var fromSelect = from.isOverlappingWith(pointerObj); + var toSelect = to.isOverlappingWith(pointerObj); + + if (fromSelect === true) { + this.selectedControlNode = from; + edge.edgeType.from = from; + } else if (toSelect === true) { + this.selectedControlNode = to; + edge.edgeType.to = to; + } // we use the selection to find the node that is being dragged. We explicitly select it here. + + + if (this.selectedControlNode !== undefined) { + this.selectionHandler.selectObject(this.selectedControlNode); + } + + this.body.emitter.emit('_redraw'); + } + /** + * dragging the control nodes or the canvas + * @param {Event} event The event + * @private + */ + + }, { + key: "_controlNodeDrag", + value: function _controlNodeDrag(event) { + this.body.emitter.emit('disablePhysics'); + var pointer = this.body.functions.getPointer(event.center); + var pos = this.canvas.DOMtoCanvas(pointer); + + if (this.selectedControlNode !== undefined) { + this.selectedControlNode.x = pos.x; + this.selectedControlNode.y = pos.y; + } else { + // if the drag was not started properly because the click started outside the network div, start it now. + var diffX = pointer.x - this.lastTouch.x; + var diffY = pointer.y - this.lastTouch.y; + this.body.view.translation = { + x: this.lastTouch.translation.x + diffX, + y: this.lastTouch.translation.y + diffY + }; + } + + this.body.emitter.emit('_redraw'); + } + /** + * connecting or restoring the control nodes. + * @param {Event} event The event + * @private + */ + + }, { + key: "_controlNodeDragEnd", + value: function _controlNodeDragEnd(event) { + var pointer = this.body.functions.getPointer(event.center); + + var pointerObj = this.selectionHandler._pointerToPositionObject(pointer); + + var edge = this.body.edges[this.edgeBeingEditedId]; // if the node that was dragged is not a control node, return + + if (this.selectedControlNode === undefined) { + return; + } // we use the selection to find the node that is being dragged. We explicitly DEselect the control node here. + + + this.selectionHandler.unselectAll(); + + var overlappingNodeIds = this.selectionHandler._getAllNodesOverlappingWith(pointerObj); + + var node = undefined; + + for (var i = overlappingNodeIds.length - 1; i >= 0; i--) { + if (overlappingNodeIds[i] !== this.selectedControlNode.id) { + node = this.body.nodes[overlappingNodeIds[i]]; + break; + } + } // perform the connection + + + if (node !== undefined && this.selectedControlNode !== undefined) { + if (node.isCluster === true) { + alert(this.options.locales[this.options.locale]['createEdgeError'] || this.options.locales['en']['createEdgeError']); + } else { + var from = this.body.nodes[this.temporaryIds.nodes[0]]; + + if (this.selectedControlNode.id === from.id) { + this._performEditEdge(node.id, edge.to.id); + } else { + this._performEditEdge(edge.from.id, node.id); + } + } + } else { + edge.updateEdgeType(); + this.body.emitter.emit('restorePhysics'); + } + + this.body.emitter.emit('_redraw'); + } // ------------------------------------ END OF EDIT EDGE FUNCTIONS -----------------------------------------// + // ------------------------------------------- ADD EDGE FUNCTIONS -----------------------------------------// + + /** + * the function bound to the selection event. It checks if you want to connect a cluster and changes the description + * to walk the user through the process. + * + * @param {Event} event + * @private + */ + + }, { + key: "_handleConnect", + value: function _handleConnect(event) { + // check to avoid double fireing of this function. + if (new Date().valueOf() - this.touchTime > 100) { + this.lastTouch = this.body.functions.getPointer(event.center); + this.lastTouch.translation = util.extend({}, this.body.view.translation); // copy the object + + var pointer = this.lastTouch; + var node = this.selectionHandler.getNodeAt(pointer); + + if (node !== undefined) { + if (node.isCluster === true) { + alert(this.options.locales[this.options.locale]['createEdgeError'] || this.options.locales['en']['createEdgeError']); + } else { + // create a node the temporary line can look at + var targetNode = this._getNewTargetNode(node.x, node.y); + + this.body.nodes[targetNode.id] = targetNode; + this.body.nodeIndices.push(targetNode.id); // create a temporary edge + + var connectionEdge = this.body.functions.createEdge({ + id: 'connectionEdge' + util.randomUUID(), + from: node.id, + to: targetNode.id, + physics: false, + smooth: { + enabled: true, + type: 'continuous', + roundness: 0.5 + } + }); + this.body.edges[connectionEdge.id] = connectionEdge; + this.body.edgeIndices.push(connectionEdge.id); + this.temporaryIds.nodes.push(targetNode.id); + this.temporaryIds.edges.push(connectionEdge.id); + } + } + + this.touchTime = new Date().valueOf(); + } + } + /** + * + * @param {Event} event + * @private + */ + + }, { + key: "_dragControlNode", + value: function _dragControlNode(event) { + var pointer = this.body.functions.getPointer(event.center); + + var pointerObj = this.selectionHandler._pointerToPositionObject(pointer); // remember the edge id + + + var connectFromId = undefined; + + if (this.temporaryIds.edges[0] !== undefined) { + connectFromId = this.body.edges[this.temporaryIds.edges[0]].fromId; + } // get the overlapping node but NOT the temporary node; + + + var overlappingNodeIds = this.selectionHandler._getAllNodesOverlappingWith(pointerObj); + + var node = undefined; + + for (var i = overlappingNodeIds.length - 1; i >= 0; i--) { + // if the node id is NOT a temporary node, accept the node. + if (this.temporaryIds.nodes.indexOf(overlappingNodeIds[i]) === -1) { + node = this.body.nodes[overlappingNodeIds[i]]; + break; + } + } + + event.controlEdge = { + from: connectFromId, + to: node ? node.id : undefined + }; + + this.selectionHandler._generateClickEvent('controlNodeDragging', event, pointer); + + if (this.temporaryIds.nodes[0] !== undefined) { + var targetNode = this.body.nodes[this.temporaryIds.nodes[0]]; // there is only one temp node in the add edge mode. + + targetNode.x = this.canvas._XconvertDOMtoCanvas(pointer.x); + targetNode.y = this.canvas._YconvertDOMtoCanvas(pointer.y); + this.body.emitter.emit('_redraw'); + } else { + var diffX = pointer.x - this.lastTouch.x; + var diffY = pointer.y - this.lastTouch.y; + this.body.view.translation = { + x: this.lastTouch.translation.x + diffX, + y: this.lastTouch.translation.y + diffY + }; + } + } + /** + * Connect the new edge to the target if one exists, otherwise remove temp line + * @param {Event} event The event + * @private + */ + + }, { + key: "_finishConnect", + value: function _finishConnect(event) { + var pointer = this.body.functions.getPointer(event.center); + + var pointerObj = this.selectionHandler._pointerToPositionObject(pointer); // remember the edge id + + + var connectFromId = undefined; + + if (this.temporaryIds.edges[0] !== undefined) { + connectFromId = this.body.edges[this.temporaryIds.edges[0]].fromId; + } // get the overlapping node but NOT the temporary node; + + + var overlappingNodeIds = this.selectionHandler._getAllNodesOverlappingWith(pointerObj); + + var node = undefined; + + for (var i = overlappingNodeIds.length - 1; i >= 0; i--) { + // if the node id is NOT a temporary node, accept the node. + if (this.temporaryIds.nodes.indexOf(overlappingNodeIds[i]) === -1) { + node = this.body.nodes[overlappingNodeIds[i]]; + break; + } + } // clean temporary nodes and edges. + + + this._cleanupTemporaryNodesAndEdges(); // perform the connection + + + if (node !== undefined) { + if (node.isCluster === true) { + alert(this.options.locales[this.options.locale]['createEdgeError'] || this.options.locales['en']['createEdgeError']); + } else { + if (this.body.nodes[connectFromId] !== undefined && this.body.nodes[node.id] !== undefined) { + this._performAddEdge(connectFromId, node.id); + } + } + } + + event.controlEdge = { + from: connectFromId, + to: node ? node.id : undefined + }; + + this.selectionHandler._generateClickEvent('controlNodeDragEnd', event, pointer); // No need to do _generateclickevent('dragEnd') here, the regular dragEnd event fires. + + + this.body.emitter.emit('_redraw'); + } + /** + * + * @param {Event} event + * @private + */ + + }, { + key: "_dragStartEdge", + value: function _dragStartEdge(event) { + var pointer = this.lastTouch; + + this.selectionHandler._generateClickEvent('dragStart', event, pointer, undefined, true); + } // --------------------------------------- END OF ADD EDGE FUNCTIONS -------------------------------------// + // ------------------------------ Performing all the actual data manipulation ------------------------// + + /** + * Adds a node on the specified location + * + * @param {Object} clickData + * @private + */ + + }, { + key: "_performAddNode", + value: function _performAddNode(clickData) { + var _this4 = this; + + var defaultData = { + id: util.randomUUID(), + x: clickData.pointer.canvas.x, + y: clickData.pointer.canvas.y, + label: 'new' + }; + + if (typeof this.options.addNode === 'function') { + if (this.options.addNode.length === 2) { + this.options.addNode(defaultData, function (finalizedData) { + if (finalizedData !== null && finalizedData !== undefined && _this4.inMode === 'addNode') { + // if for whatever reason the mode has changes (due to dataset change) disregard the callback + _this4.body.data.nodes.getDataSet().add(finalizedData); + } + + _this4.showManipulatorToolbar(); + }); + } else { + this.showManipulatorToolbar(); + throw new Error('The function for add does not support two arguments (data,callback)'); + } + } else { + this.body.data.nodes.getDataSet().add(defaultData); + this.showManipulatorToolbar(); + } + } + /** + * connect two nodes with a new edge. + * + * @param {Node.id} sourceNodeId + * @param {Node.id} targetNodeId + * @private + */ + + }, { + key: "_performAddEdge", + value: function _performAddEdge(sourceNodeId, targetNodeId) { + var _this5 = this; + + var defaultData = { + from: sourceNodeId, + to: targetNodeId + }; + + if (typeof this.options.addEdge === 'function') { + if (this.options.addEdge.length === 2) { + this.options.addEdge(defaultData, function (finalizedData) { + if (finalizedData !== null && finalizedData !== undefined && _this5.inMode === 'addEdge') { + // if for whatever reason the mode has changes (due to dataset change) disregard the callback + _this5.body.data.edges.getDataSet().add(finalizedData); + + _this5.selectionHandler.unselectAll(); + + _this5.showManipulatorToolbar(); + } + }); + } else { + throw new Error('The function for connect does not support two arguments (data,callback)'); + } + } else { + this.body.data.edges.getDataSet().add(defaultData); + this.selectionHandler.unselectAll(); + this.showManipulatorToolbar(); + } + } + /** + * connect two nodes with a new edge. + * + * @param {Node.id} sourceNodeId + * @param {Node.id} targetNodeId + * @private + */ + + }, { + key: "_performEditEdge", + value: function _performEditEdge(sourceNodeId, targetNodeId) { + var _this6 = this; + + var defaultData = { + id: this.edgeBeingEditedId, + from: sourceNodeId, + to: targetNodeId, + label: this.body.data.edges._data[this.edgeBeingEditedId].label + }; + var eeFunct = this.options.editEdge; + + if (_typeof_1$1(eeFunct) === 'object') { + eeFunct = eeFunct.editWithoutDrag; + } + + if (typeof eeFunct === 'function') { + if (eeFunct.length === 2) { + eeFunct(defaultData, function (finalizedData) { + if (finalizedData === null || finalizedData === undefined || _this6.inMode !== 'editEdge') { + // if for whatever reason the mode has changes (due to dataset change) disregard the callback) { + _this6.body.edges[defaultData.id].updateEdgeType(); + + _this6.body.emitter.emit('_redraw'); + + _this6.showManipulatorToolbar(); + } else { + _this6.body.data.edges.getDataSet().update(finalizedData); + + _this6.selectionHandler.unselectAll(); + + _this6.showManipulatorToolbar(); + } + }); + } else { + throw new Error('The function for edit does not support two arguments (data, callback)'); + } + } else { + this.body.data.edges.getDataSet().update(defaultData); + this.selectionHandler.unselectAll(); + this.showManipulatorToolbar(); + } + } + }]); + + return ManipulationSystem; + }(); + + var htmlColors = { + black: '#000000', + navy: '#000080', + darkblue: '#00008B', + mediumblue: '#0000CD', + blue: '#0000FF', + darkgreen: '#006400', + green: '#008000', + teal: '#008080', + darkcyan: '#008B8B', + deepskyblue: '#00BFFF', + darkturquoise: '#00CED1', + mediumspringgreen: '#00FA9A', + lime: '#00FF00', + springgreen: '#00FF7F', + aqua: '#00FFFF', + cyan: '#00FFFF', + midnightblue: '#191970', + dodgerblue: '#1E90FF', + lightseagreen: '#20B2AA', + forestgreen: '#228B22', + seagreen: '#2E8B57', + darkslategray: '#2F4F4F', + limegreen: '#32CD32', + mediumseagreen: '#3CB371', + turquoise: '#40E0D0', + royalblue: '#4169E1', + steelblue: '#4682B4', + darkslateblue: '#483D8B', + mediumturquoise: '#48D1CC', + indigo: '#4B0082', + darkolivegreen: '#556B2F', + cadetblue: '#5F9EA0', + cornflowerblue: '#6495ED', + mediumaquamarine: '#66CDAA', + dimgray: '#696969', + slateblue: '#6A5ACD', + olivedrab: '#6B8E23', + slategray: '#708090', + lightslategray: '#778899', + mediumslateblue: '#7B68EE', + lawngreen: '#7CFC00', + chartreuse: '#7FFF00', + aquamarine: '#7FFFD4', + maroon: '#800000', + purple: '#800080', + olive: '#808000', + gray: '#808080', + skyblue: '#87CEEB', + lightskyblue: '#87CEFA', + blueviolet: '#8A2BE2', + darkred: '#8B0000', + darkmagenta: '#8B008B', + saddlebrown: '#8B4513', + darkseagreen: '#8FBC8F', + lightgreen: '#90EE90', + mediumpurple: '#9370D8', + darkviolet: '#9400D3', + palegreen: '#98FB98', + darkorchid: '#9932CC', + yellowgreen: '#9ACD32', + sienna: '#A0522D', + brown: '#A52A2A', + darkgray: '#A9A9A9', + lightblue: '#ADD8E6', + greenyellow: '#ADFF2F', + paleturquoise: '#AFEEEE', + lightsteelblue: '#B0C4DE', + powderblue: '#B0E0E6', + firebrick: '#B22222', + darkgoldenrod: '#B8860B', + mediumorchid: '#BA55D3', + rosybrown: '#BC8F8F', + darkkhaki: '#BDB76B', + silver: '#C0C0C0', + mediumvioletred: '#C71585', + indianred: '#CD5C5C', + peru: '#CD853F', + chocolate: '#D2691E', + tan: '#D2B48C', + lightgrey: '#D3D3D3', + palevioletred: '#D87093', + thistle: '#D8BFD8', + orchid: '#DA70D6', + goldenrod: '#DAA520', + crimson: '#DC143C', + gainsboro: '#DCDCDC', + plum: '#DDA0DD', + burlywood: '#DEB887', + lightcyan: '#E0FFFF', + lavender: '#E6E6FA', + darksalmon: '#E9967A', + violet: '#EE82EE', + palegoldenrod: '#EEE8AA', + lightcoral: '#F08080', + khaki: '#F0E68C', + aliceblue: '#F0F8FF', + honeydew: '#F0FFF0', + azure: '#F0FFFF', + sandybrown: '#F4A460', + wheat: '#F5DEB3', + beige: '#F5F5DC', + whitesmoke: '#F5F5F5', + mintcream: '#F5FFFA', + ghostwhite: '#F8F8FF', + salmon: '#FA8072', + antiquewhite: '#FAEBD7', + linen: '#FAF0E6', + lightgoldenrodyellow: '#FAFAD2', + oldlace: '#FDF5E6', + red: '#FF0000', + fuchsia: '#FF00FF', + magenta: '#FF00FF', + deeppink: '#FF1493', + orangered: '#FF4500', + tomato: '#FF6347', + hotpink: '#FF69B4', + coral: '#FF7F50', + darkorange: '#FF8C00', + lightsalmon: '#FFA07A', + orange: '#FFA500', + lightpink: '#FFB6C1', + pink: '#FFC0CB', + gold: '#FFD700', + peachpuff: '#FFDAB9', + navajowhite: '#FFDEAD', + moccasin: '#FFE4B5', + bisque: '#FFE4C4', + mistyrose: '#FFE4E1', + blanchedalmond: '#FFEBCD', + papayawhip: '#FFEFD5', + lavenderblush: '#FFF0F5', + seashell: '#FFF5EE', + cornsilk: '#FFF8DC', + lemonchiffon: '#FFFACD', + floralwhite: '#FFFAF0', + snow: '#FFFAFA', + yellow: '#FFFF00', + lightyellow: '#FFFFE0', + ivory: '#FFFFF0', + white: '#FFFFFF' + }; + /** + * @param {number} [pixelRatio=1] + */ + + var ColorPicker = + /*#__PURE__*/ + function () { + /** + * @param {number} [pixelRatio=1] + */ + function ColorPicker() { + var pixelRatio = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1; + + classCallCheck$1(this, ColorPicker); + + this.pixelRatio = pixelRatio; + this.generated = false; + this.centerCoordinates = { + x: 289 / 2, + y: 289 / 2 + }; + this.r = 289 * 0.49; + this.color = { + r: 255, + g: 255, + b: 255, + a: 1.0 + }; + this.hueCircle = undefined; + this.initialColor = { + r: 255, + g: 255, + b: 255, + a: 1.0 + }; + this.previousColor = undefined; + this.applied = false; // bound by + + this.updateCallback = function () {}; + + this.closeCallback = function () {}; // create all DOM elements + + + this._create(); + } + /** + * this inserts the colorPicker into a div from the DOM + * @param {Element} container + */ + + + createClass$1(ColorPicker, [{ + key: "insertTo", + value: function insertTo(container) { + if (this.hammer !== undefined) { + this.hammer.destroy(); + this.hammer = undefined; + } + + this.container = container; + this.container.appendChild(this.frame); + + this._bindHammer(); + + this._setSize(); + } + /** + * the callback is executed on apply and save. Bind it to the application + * @param {function} callback + */ + + }, { + key: "setUpdateCallback", + value: function setUpdateCallback(callback) { + if (typeof callback === 'function') { + this.updateCallback = callback; + } else { + throw new Error("Function attempted to set as colorPicker update callback is not a function."); + } + } + /** + * the callback is executed on apply and save. Bind it to the application + * @param {function} callback + */ + + }, { + key: "setCloseCallback", + value: function setCloseCallback(callback) { + if (typeof callback === 'function') { + this.closeCallback = callback; + } else { + throw new Error("Function attempted to set as colorPicker closing callback is not a function."); + } + } + /** + * + * @param {string} color + * @returns {String} + * @private + */ + + }, { + key: "_isColorString", + value: function _isColorString(color) { + if (typeof color === 'string') { + return htmlColors[color]; + } + } + /** + * Set the color of the colorPicker + * Supported formats: + * 'red' --> HTML color string + * '#ffffff' --> hex string + * 'rgb(255,255,255)' --> rgb string + * 'rgba(255,255,255,1.0)' --> rgba string + * {r:255,g:255,b:255} --> rgb object + * {r:255,g:255,b:255,a:1.0} --> rgba object + * @param {string|Object} color + * @param {boolean} [setInitial=true] + */ + + }, { + key: "setColor", + value: function setColor(color) { + var setInitial = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; + + if (color === 'none') { + return; + } + + var rgba; // if a html color shorthand is used, convert to hex + + var htmlColor = this._isColorString(color); + + if (htmlColor !== undefined) { + color = htmlColor; + } // check format + + + if (util.isString(color) === true) { + if (util.isValidRGB(color) === true) { + var rgbaArray = color.substr(4).substr(0, color.length - 5).split(','); + rgba = { + r: rgbaArray[0], + g: rgbaArray[1], + b: rgbaArray[2], + a: 1.0 + }; + } else if (util.isValidRGBA(color) === true) { + var _rgbaArray = color.substr(5).substr(0, color.length - 6).split(','); + + rgba = { + r: _rgbaArray[0], + g: _rgbaArray[1], + b: _rgbaArray[2], + a: _rgbaArray[3] + }; + } else if (util.isValidHex(color) === true) { + var rgbObj = util.hexToRGB(color); + rgba = { + r: rgbObj.r, + g: rgbObj.g, + b: rgbObj.b, + a: 1.0 + }; + } + } else { + if (color instanceof Object) { + if (color.r !== undefined && color.g !== undefined && color.b !== undefined) { + var alpha = color.a !== undefined ? color.a : '1.0'; + rgba = { + r: color.r, + g: color.g, + b: color.b, + a: alpha + }; + } + } + } // set color + + + if (rgba === undefined) { + throw new Error("Unknown color passed to the colorPicker. Supported are strings: rgb, hex, rgba. Object: rgb ({r:r,g:g,b:b,[a:a]}). Supplied: " + JSON.stringify(color)); + } else { + this._setColor(rgba, setInitial); + } + } + /** + * this shows the color picker. + * The hue circle is constructed once and stored. + */ + + }, { + key: "show", + value: function show() { + if (this.closeCallback !== undefined) { + this.closeCallback(); + this.closeCallback = undefined; + } + + this.applied = false; + this.frame.style.display = 'block'; + + this._generateHueCircle(); + } // ------------------------------------------ PRIVATE ----------------------------- // + + /** + * Hide the picker. Is called by the cancel button. + * Optional boolean to store the previous color for easy access later on. + * @param {boolean} [storePrevious=true] + * @private + */ + + }, { + key: "_hide", + value: function _hide() { + var _this = this; + + var storePrevious = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; + + // store the previous color for next time; + if (storePrevious === true) { + this.previousColor = util.extend({}, this.color); + } + + if (this.applied === true) { + this.updateCallback(this.initialColor); + } + + this.frame.style.display = 'none'; // call the closing callback, restoring the onclick method. + // this is in a setTimeout because it will trigger the show again before the click is done. + + setTimeout(function () { + if (_this.closeCallback !== undefined) { + _this.closeCallback(); + + _this.closeCallback = undefined; + } + }, 0); + } + /** + * bound to the save button. Saves and hides. + * @private + */ + + }, { + key: "_save", + value: function _save() { + this.updateCallback(this.color); + this.applied = false; + + this._hide(); + } + /** + * Bound to apply button. Saves but does not close. Is undone by the cancel button. + * @private + */ + + }, { + key: "_apply", + value: function _apply() { + this.applied = true; + this.updateCallback(this.color); + + this._updatePicker(this.color); + } + /** + * load the color from the previous session. + * @private + */ + + }, { + key: "_loadLast", + value: function _loadLast() { + if (this.previousColor !== undefined) { + this.setColor(this.previousColor, false); + } else { + alert("There is no last color to load..."); + } + } + /** + * set the color, place the picker + * @param {Object} rgba + * @param {boolean} [setInitial=true] + * @private + */ + + }, { + key: "_setColor", + value: function _setColor(rgba) { + var setInitial = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; + + // store the initial color + if (setInitial === true) { + this.initialColor = util.extend({}, rgba); + } + + this.color = rgba; + var hsv = util.RGBToHSV(rgba.r, rgba.g, rgba.b); + var angleConvert = 2 * Math.PI; + var radius = this.r * hsv.s; + var x = this.centerCoordinates.x + radius * Math.sin(angleConvert * hsv.h); + var y = this.centerCoordinates.y + radius * Math.cos(angleConvert * hsv.h); + this.colorPickerSelector.style.left = x - 0.5 * this.colorPickerSelector.clientWidth + 'px'; + this.colorPickerSelector.style.top = y - 0.5 * this.colorPickerSelector.clientHeight + 'px'; + + this._updatePicker(rgba); + } + /** + * bound to opacity control + * @param {number} value + * @private + */ + + }, { + key: "_setOpacity", + value: function _setOpacity(value) { + this.color.a = value / 100; + + this._updatePicker(this.color); + } + /** + * bound to brightness control + * @param {number} value + * @private + */ + + }, { + key: "_setBrightness", + value: function _setBrightness(value) { + var hsv = util.RGBToHSV(this.color.r, this.color.g, this.color.b); + hsv.v = value / 100; + var rgba = util.HSVToRGB(hsv.h, hsv.s, hsv.v); + rgba['a'] = this.color.a; + this.color = rgba; + + this._updatePicker(); + } + /** + * update the color picker. A black circle overlays the hue circle to mimic the brightness decreasing. + * @param {Object} rgba + * @private + */ + + }, { + key: "_updatePicker", + value: function _updatePicker() { + var rgba = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.color; + var hsv = util.RGBToHSV(rgba.r, rgba.g, rgba.b); + var ctx = this.colorPickerCanvas.getContext('2d'); + + if (this.pixelRation === undefined) { + this.pixelRatio = (window.devicePixelRatio || 1) / (ctx.webkitBackingStorePixelRatio || ctx.mozBackingStorePixelRatio || ctx.msBackingStorePixelRatio || ctx.oBackingStorePixelRatio || ctx.backingStorePixelRatio || 1); + } + + ctx.setTransform(this.pixelRatio, 0, 0, this.pixelRatio, 0, 0); // clear the canvas + + var w = this.colorPickerCanvas.clientWidth; + var h = this.colorPickerCanvas.clientHeight; + ctx.clearRect(0, 0, w, h); + ctx.putImageData(this.hueCircle, 0, 0); + ctx.fillStyle = 'rgba(0,0,0,' + (1 - hsv.v) + ')'; + ctx.circle(this.centerCoordinates.x, this.centerCoordinates.y, this.r); + ctx.fill(); + this.brightnessRange.value = 100 * hsv.v; + this.opacityRange.value = 100 * rgba.a; + this.initialColorDiv.style.backgroundColor = 'rgba(' + this.initialColor.r + ',' + this.initialColor.g + ',' + this.initialColor.b + ',' + this.initialColor.a + ')'; + this.newColorDiv.style.backgroundColor = 'rgba(' + this.color.r + ',' + this.color.g + ',' + this.color.b + ',' + this.color.a + ')'; + } + /** + * used by create to set the size of the canvas. + * @private + */ + + }, { + key: "_setSize", + value: function _setSize() { + this.colorPickerCanvas.style.width = '100%'; + this.colorPickerCanvas.style.height = '100%'; + this.colorPickerCanvas.width = 289 * this.pixelRatio; + this.colorPickerCanvas.height = 289 * this.pixelRatio; + } + /** + * create all dom elements + * TODO: cleanup, lots of similar dom elements + * @private + */ + + }, { + key: "_create", + value: function _create() { + this.frame = document.createElement('div'); + this.frame.className = 'vis-color-picker'; + this.colorPickerDiv = document.createElement('div'); + this.colorPickerSelector = document.createElement('div'); + this.colorPickerSelector.className = 'vis-selector'; + this.colorPickerDiv.appendChild(this.colorPickerSelector); + this.colorPickerCanvas = document.createElement('canvas'); + this.colorPickerDiv.appendChild(this.colorPickerCanvas); + + if (!this.colorPickerCanvas.getContext) { + var noCanvas = document.createElement('DIV'); + noCanvas.style.color = 'red'; + noCanvas.style.fontWeight = 'bold'; + noCanvas.style.padding = '10px'; + noCanvas.innerHTML = 'Error: your browser does not support HTML canvas'; + this.colorPickerCanvas.appendChild(noCanvas); + } else { + var ctx = this.colorPickerCanvas.getContext("2d"); + this.pixelRatio = (window.devicePixelRatio || 1) / (ctx.webkitBackingStorePixelRatio || ctx.mozBackingStorePixelRatio || ctx.msBackingStorePixelRatio || ctx.oBackingStorePixelRatio || ctx.backingStorePixelRatio || 1); + this.colorPickerCanvas.getContext("2d").setTransform(this.pixelRatio, 0, 0, this.pixelRatio, 0, 0); + } + + this.colorPickerDiv.className = 'vis-color'; + this.opacityDiv = document.createElement('div'); + this.opacityDiv.className = 'vis-opacity'; + this.brightnessDiv = document.createElement('div'); + this.brightnessDiv.className = 'vis-brightness'; + this.arrowDiv = document.createElement('div'); + this.arrowDiv.className = 'vis-arrow'; + this.opacityRange = document.createElement('input'); + + try { + this.opacityRange.type = 'range'; // Not supported on IE9 + + this.opacityRange.min = '0'; + this.opacityRange.max = '100'; + } // TODO: Add some error handling and remove this lint exception + catch (err) {} // eslint-disable-line no-empty + + + this.opacityRange.value = '100'; + this.opacityRange.className = 'vis-range'; + this.brightnessRange = document.createElement('input'); + + try { + this.brightnessRange.type = 'range'; // Not supported on IE9 + + this.brightnessRange.min = '0'; + this.brightnessRange.max = '100'; + } // TODO: Add some error handling and remove this lint exception + catch (err) {} // eslint-disable-line no-empty + + + this.brightnessRange.value = '100'; + this.brightnessRange.className = 'vis-range'; + this.opacityDiv.appendChild(this.opacityRange); + this.brightnessDiv.appendChild(this.brightnessRange); + var me = this; + + this.opacityRange.onchange = function () { + me._setOpacity(this.value); + }; + + this.opacityRange.oninput = function () { + me._setOpacity(this.value); + }; + + this.brightnessRange.onchange = function () { + me._setBrightness(this.value); + }; + + this.brightnessRange.oninput = function () { + me._setBrightness(this.value); + }; + + this.brightnessLabel = document.createElement("div"); + this.brightnessLabel.className = "vis-label vis-brightness"; + this.brightnessLabel.innerHTML = 'brightness:'; + this.opacityLabel = document.createElement("div"); + this.opacityLabel.className = "vis-label vis-opacity"; + this.opacityLabel.innerHTML = 'opacity:'; + this.newColorDiv = document.createElement("div"); + this.newColorDiv.className = "vis-new-color"; + this.newColorDiv.innerHTML = 'new'; + this.initialColorDiv = document.createElement("div"); + this.initialColorDiv.className = "vis-initial-color"; + this.initialColorDiv.innerHTML = 'initial'; + this.cancelButton = document.createElement("div"); + this.cancelButton.className = "vis-button vis-cancel"; + this.cancelButton.innerHTML = 'cancel'; + this.cancelButton.onclick = this._hide.bind(this, false); + this.applyButton = document.createElement("div"); + this.applyButton.className = "vis-button vis-apply"; + this.applyButton.innerHTML = 'apply'; + this.applyButton.onclick = this._apply.bind(this); + this.saveButton = document.createElement("div"); + this.saveButton.className = "vis-button vis-save"; + this.saveButton.innerHTML = 'save'; + this.saveButton.onclick = this._save.bind(this); + this.loadButton = document.createElement("div"); + this.loadButton.className = "vis-button vis-load"; + this.loadButton.innerHTML = 'load last'; + this.loadButton.onclick = this._loadLast.bind(this); + this.frame.appendChild(this.colorPickerDiv); + this.frame.appendChild(this.arrowDiv); + this.frame.appendChild(this.brightnessLabel); + this.frame.appendChild(this.brightnessDiv); + this.frame.appendChild(this.opacityLabel); + this.frame.appendChild(this.opacityDiv); + this.frame.appendChild(this.newColorDiv); + this.frame.appendChild(this.initialColorDiv); + this.frame.appendChild(this.cancelButton); + this.frame.appendChild(this.applyButton); + this.frame.appendChild(this.saveButton); + this.frame.appendChild(this.loadButton); + } + /** + * bind hammer to the color picker + * @private + */ + + }, { + key: "_bindHammer", + value: function _bindHammer() { + var _this2 = this; + + this.drag = {}; + this.pinch = {}; + this.hammer = new hammer(this.colorPickerCanvas); + this.hammer.get('pinch').set({ + enable: true + }); + hammerUtil.onTouch(this.hammer, function (event) { + _this2._moveSelector(event); + }); + this.hammer.on('tap', function (event) { + _this2._moveSelector(event); + }); + this.hammer.on('panstart', function (event) { + _this2._moveSelector(event); + }); + this.hammer.on('panmove', function (event) { + _this2._moveSelector(event); + }); + this.hammer.on('panend', function (event) { + _this2._moveSelector(event); + }); + } + /** + * generate the hue circle. This is relatively heavy (200ms) and is done only once on the first time it is shown. + * @private + */ + + }, { + key: "_generateHueCircle", + value: function _generateHueCircle() { + if (this.generated === false) { + var ctx = this.colorPickerCanvas.getContext('2d'); + + if (this.pixelRation === undefined) { + this.pixelRatio = (window.devicePixelRatio || 1) / (ctx.webkitBackingStorePixelRatio || ctx.mozBackingStorePixelRatio || ctx.msBackingStorePixelRatio || ctx.oBackingStorePixelRatio || ctx.backingStorePixelRatio || 1); + } + + ctx.setTransform(this.pixelRatio, 0, 0, this.pixelRatio, 0, 0); // clear the canvas + + var w = this.colorPickerCanvas.clientWidth; + var h = this.colorPickerCanvas.clientHeight; + ctx.clearRect(0, 0, w, h); // draw hue circle + + var x, y, hue, sat; + this.centerCoordinates = { + x: w * 0.5, + y: h * 0.5 + }; + this.r = 0.49 * w; + var angleConvert = 2 * Math.PI / 360; + var hfac = 1 / 360; + var sfac = 1 / this.r; + var rgb; + + for (hue = 0; hue < 360; hue++) { + for (sat = 0; sat < this.r; sat++) { + x = this.centerCoordinates.x + sat * Math.sin(angleConvert * hue); + y = this.centerCoordinates.y + sat * Math.cos(angleConvert * hue); + rgb = util.HSVToRGB(hue * hfac, sat * sfac, 1); + ctx.fillStyle = 'rgb(' + rgb.r + ',' + rgb.g + ',' + rgb.b + ')'; + ctx.fillRect(x - 0.5, y - 0.5, 2, 2); + } + } + + ctx.strokeStyle = 'rgba(0,0,0,1)'; + ctx.circle(this.centerCoordinates.x, this.centerCoordinates.y, this.r); + ctx.stroke(); + this.hueCircle = ctx.getImageData(0, 0, w, h); + } + + this.generated = true; + } + /** + * move the selector. This is called by hammer functions. + * + * @param {Event} event The event + * @private + */ + + }, { + key: "_moveSelector", + value: function _moveSelector(event) { + var rect = this.colorPickerDiv.getBoundingClientRect(); + var left = event.center.x - rect.left; + var top = event.center.y - rect.top; + var centerY = 0.5 * this.colorPickerDiv.clientHeight; + var centerX = 0.5 * this.colorPickerDiv.clientWidth; + var x = left - centerX; + var y = top - centerY; + var angle = Math.atan2(x, y); + var radius = 0.98 * Math.min(Math.sqrt(x * x + y * y), centerX); + var newTop = Math.cos(angle) * radius + centerY; + var newLeft = Math.sin(angle) * radius + centerX; + this.colorPickerSelector.style.top = newTop - 0.5 * this.colorPickerSelector.clientHeight + 'px'; + this.colorPickerSelector.style.left = newLeft - 0.5 * this.colorPickerSelector.clientWidth + 'px'; // set color + + var h = angle / (2 * Math.PI); + h = h < 0 ? h + 1 : h; + var s = radius / this.r; + var hsv = util.RGBToHSV(this.color.r, this.color.g, this.color.b); + hsv.h = h; + hsv.s = s; + var rgba = util.HSVToRGB(hsv.h, hsv.s, hsv.v); + rgba['a'] = this.color.a; + this.color = rgba; // update previews + + this.initialColorDiv.style.backgroundColor = 'rgba(' + this.initialColor.r + ',' + this.initialColor.g + ',' + this.initialColor.b + ',' + this.initialColor.a + ')'; + this.newColorDiv.style.backgroundColor = 'rgba(' + this.color.r + ',' + this.color.g + ',' + this.color.b + ',' + this.color.a + ')'; + } + }]); + + return ColorPicker; + }(); + + /** + * The way this works is for all properties of this.possible options, you can supply the property name in any form to list the options. + * Boolean options are recognised as Boolean + * Number options should be written as array: [default value, min value, max value, stepsize] + * Colors should be written as array: ['color', '#ffffff'] + * Strings with should be written as array: [option1, option2, option3, ..] + * + * The options are matched with their counterparts in each of the modules and the values used in the configuration are + */ + + var Configurator = + /*#__PURE__*/ + function () { + /** + * @param {Object} parentModule | the location where parentModule.setOptions() can be called + * @param {Object} defaultContainer | the default container of the module + * @param {Object} configureOptions | the fully configured and predefined options set found in allOptions.js + * @param {number} pixelRatio | canvas pixel ratio + */ + function Configurator(parentModule, defaultContainer, configureOptions) { + var pixelRatio = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 1; + + classCallCheck$1(this, Configurator); + + this.parent = parentModule; + this.changedOptions = []; + this.container = defaultContainer; + this.allowCreation = false; + this.options = {}; + this.initialized = false; + this.popupCounter = 0; + this.defaultOptions = { + enabled: false, + filter: true, + container: undefined, + showButton: true + }; + util.extend(this.options, this.defaultOptions); + this.configureOptions = configureOptions; + this.moduleOptions = {}; + this.domElements = []; + this.popupDiv = {}; + this.popupLimit = 5; + this.popupHistory = {}; + this.colorPicker = new ColorPicker(pixelRatio); + this.wrapper = undefined; + } + /** + * refresh all options. + * Because all modules parse their options by themselves, we just use their options. We copy them here. + * + * @param {Object} options + */ + + + createClass$1(Configurator, [{ + key: "setOptions", + value: function setOptions(options) { + if (options !== undefined) { + // reset the popup history because the indices may have been changed. + this.popupHistory = {}; + + this._removePopup(); + + var enabled = true; + + if (typeof options === 'string') { + this.options.filter = options; + } else if (options instanceof Array) { + this.options.filter = options.join(); + } else if (_typeof_1$1(options) === 'object') { + if (options == null) { + throw new TypeError('options cannot be null'); + } + + if (options.container !== undefined) { + this.options.container = options.container; + } + + if (options.filter !== undefined) { + this.options.filter = options.filter; + } + + if (options.showButton !== undefined) { + this.options.showButton = options.showButton; + } + + if (options.enabled !== undefined) { + enabled = options.enabled; + } + } else if (typeof options === 'boolean') { + this.options.filter = true; + enabled = options; + } else if (typeof options === 'function') { + this.options.filter = options; + enabled = true; + } + + if (this.options.filter === false) { + enabled = false; + } + + this.options.enabled = enabled; + } + + this._clean(); + } + /** + * + * @param {Object} moduleOptions + */ + + }, { + key: "setModuleOptions", + value: function setModuleOptions(moduleOptions) { + this.moduleOptions = moduleOptions; + + if (this.options.enabled === true) { + this._clean(); + + if (this.options.container !== undefined) { + this.container = this.options.container; + } + + this._create(); + } + } + /** + * Create all DOM elements + * @private + */ + + }, { + key: "_create", + value: function _create() { + this._clean(); + + this.changedOptions = []; + var filter = this.options.filter; + var counter = 0; + var show = false; + + for (var option in this.configureOptions) { + if (this.configureOptions.hasOwnProperty(option)) { + this.allowCreation = false; + show = false; + + if (typeof filter === 'function') { + show = filter(option, []); + show = show || this._handleObject(this.configureOptions[option], [option], true); + } else if (filter === true || filter.indexOf(option) !== -1) { + show = true; + } + + if (show !== false) { + this.allowCreation = true; // linebreak between categories + + if (counter > 0) { + this._makeItem([]); + } // a header for the category + + + this._makeHeader(option); // get the sub options + + + this._handleObject(this.configureOptions[option], [option]); + } + + counter++; + } + } + + this._makeButton(); + + this._push(); //~ this.colorPicker.insertTo(this.container); + + } + /** + * draw all DOM elements on the screen + * @private + */ + + }, { + key: "_push", + value: function _push() { + this.wrapper = document.createElement('div'); + this.wrapper.className = 'vis-configuration-wrapper'; + this.container.appendChild(this.wrapper); + + for (var i = 0; i < this.domElements.length; i++) { + this.wrapper.appendChild(this.domElements[i]); + } + + this._showPopupIfNeeded(); + } + /** + * delete all DOM elements + * @private + */ + + }, { + key: "_clean", + value: function _clean() { + for (var i = 0; i < this.domElements.length; i++) { + this.wrapper.removeChild(this.domElements[i]); + } + + if (this.wrapper !== undefined) { + this.container.removeChild(this.wrapper); + this.wrapper = undefined; + } + + this.domElements = []; + + this._removePopup(); + } + /** + * get the value from the actualOptions if it exists + * @param {array} path | where to look for the actual option + * @returns {*} + * @private + */ + + }, { + key: "_getValue", + value: function _getValue(path) { + var base = this.moduleOptions; + + for (var i = 0; i < path.length; i++) { + if (base[path[i]] !== undefined) { + base = base[path[i]]; + } else { + base = undefined; + break; + } + } + + return base; + } + /** + * all option elements are wrapped in an item + * @param {Array} path | where to look for the actual option + * @param {Array.} domElements + * @returns {number} + * @private + */ + + }, { + key: "_makeItem", + value: function _makeItem(path) { + if (this.allowCreation === true) { + var item = document.createElement('div'); + item.className = 'vis-configuration vis-config-item vis-config-s' + path.length; + + for (var _len = arguments.length, domElements = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + domElements[_key - 1] = arguments[_key]; + } + + domElements.forEach(function (element) { + item.appendChild(element); + }); + this.domElements.push(item); + return this.domElements.length; + } + + return 0; + } + /** + * header for major subjects + * @param {string} name + * @private + */ + + }, { + key: "_makeHeader", + value: function _makeHeader(name) { + var div = document.createElement('div'); + div.className = 'vis-configuration vis-config-header'; + div.innerHTML = name; + + this._makeItem([], div); + } + /** + * make a label, if it is an object label, it gets different styling. + * @param {string} name + * @param {array} path | where to look for the actual option + * @param {string} objectLabel + * @returns {HTMLElement} + * @private + */ + + }, { + key: "_makeLabel", + value: function _makeLabel(name, path) { + var objectLabel = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; + var div = document.createElement('div'); + div.className = 'vis-configuration vis-config-label vis-config-s' + path.length; + + if (objectLabel === true) { + div.innerHTML = '' + name + ':'; + } else { + div.innerHTML = name + ':'; + } + + return div; + } + /** + * make a dropdown list for multiple possible string optoins + * @param {Array.} arr + * @param {number} value + * @param {array} path | where to look for the actual option + * @private + */ + + }, { + key: "_makeDropdown", + value: function _makeDropdown(arr, value, path) { + var select = document.createElement('select'); + select.className = 'vis-configuration vis-config-select'; + var selectedValue = 0; + + if (value !== undefined) { + if (arr.indexOf(value) !== -1) { + selectedValue = arr.indexOf(value); + } + } + + for (var i = 0; i < arr.length; i++) { + var option = document.createElement('option'); + option.value = arr[i]; + + if (i === selectedValue) { + option.selected = 'selected'; + } + + option.innerHTML = arr[i]; + select.appendChild(option); + } + + var me = this; + + select.onchange = function () { + me._update(this.value, path); + }; + + var label = this._makeLabel(path[path.length - 1], path); + + this._makeItem(path, label, select); + } + /** + * make a range object for numeric options + * @param {Array.} arr + * @param {number} value + * @param {array} path | where to look for the actual option + * @private + */ + + }, { + key: "_makeRange", + value: function _makeRange(arr, value, path) { + var defaultValue = arr[0]; + var min = arr[1]; + var max = arr[2]; + var step = arr[3]; + var range = document.createElement('input'); + range.className = 'vis-configuration vis-config-range'; + + try { + range.type = 'range'; // not supported on IE9 + + range.min = min; + range.max = max; + } // TODO: Add some error handling and remove this lint exception + catch (err) {} // eslint-disable-line no-empty + + + range.step = step; // set up the popup settings in case they are needed. + + var popupString = ''; + var popupValue = 0; + + if (value !== undefined) { + var factor = 1.20; + + if (value < 0 && value * factor < min) { + range.min = Math.ceil(value * factor); + popupValue = range.min; + popupString = 'range increased'; + } else if (value / factor < min) { + range.min = Math.ceil(value / factor); + popupValue = range.min; + popupString = 'range increased'; + } + + if (value * factor > max && max !== 1) { + range.max = Math.ceil(value * factor); + popupValue = range.max; + popupString = 'range increased'; + } + + range.value = value; + } else { + range.value = defaultValue; + } + + var input = document.createElement('input'); + input.className = 'vis-configuration vis-config-rangeinput'; + input.value = range.value; + var me = this; + + range.onchange = function () { + input.value = this.value; + + me._update(Number(this.value), path); + }; + + range.oninput = function () { + input.value = this.value; + }; + + var label = this._makeLabel(path[path.length - 1], path); + + var itemIndex = this._makeItem(path, label, range, input); // if a popup is needed AND it has not been shown for this value, show it. + + + if (popupString !== '' && this.popupHistory[itemIndex] !== popupValue) { + this.popupHistory[itemIndex] = popupValue; + + this._setupPopup(popupString, itemIndex); + } + } + /** + * make a button object + * @private + */ + + }, { + key: "_makeButton", + value: function _makeButton() { + var _this = this; + + if (this.options.showButton === true) { + var generateButton = document.createElement('div'); + generateButton.className = 'vis-configuration vis-config-button'; + generateButton.innerHTML = 'generate options'; + + generateButton.onclick = function () { + _this._printOptions(); + }; + + generateButton.onmouseover = function () { + generateButton.className = 'vis-configuration vis-config-button hover'; + }; + + generateButton.onmouseout = function () { + generateButton.className = 'vis-configuration vis-config-button'; + }; + + this.optionsContainer = document.createElement('div'); + this.optionsContainer.className = 'vis-configuration vis-config-option-container'; + this.domElements.push(this.optionsContainer); + this.domElements.push(generateButton); + } + } + /** + * prepare the popup + * @param {string} string + * @param {number} index + * @private + */ + + }, { + key: "_setupPopup", + value: function _setupPopup(string, index) { + var _this2 = this; + + if (this.initialized === true && this.allowCreation === true && this.popupCounter < this.popupLimit) { + var div = document.createElement("div"); + div.id = "vis-configuration-popup"; + div.className = "vis-configuration-popup"; + div.innerHTML = string; + + div.onclick = function () { + _this2._removePopup(); + }; + + this.popupCounter += 1; + this.popupDiv = { + html: div, + index: index + }; + } + } + /** + * remove the popup from the dom + * @private + */ + + }, { + key: "_removePopup", + value: function _removePopup() { + if (this.popupDiv.html !== undefined) { + this.popupDiv.html.parentNode.removeChild(this.popupDiv.html); + clearTimeout(this.popupDiv.hideTimeout); + clearTimeout(this.popupDiv.deleteTimeout); + this.popupDiv = {}; + } + } + /** + * Show the popup if it is needed. + * @private + */ + + }, { + key: "_showPopupIfNeeded", + value: function _showPopupIfNeeded() { + var _this3 = this; + + if (this.popupDiv.html !== undefined) { + var correspondingElement = this.domElements[this.popupDiv.index]; + var rect = correspondingElement.getBoundingClientRect(); + this.popupDiv.html.style.left = rect.left + "px"; + this.popupDiv.html.style.top = rect.top - 30 + "px"; // 30 is the height; + + document.body.appendChild(this.popupDiv.html); + this.popupDiv.hideTimeout = setTimeout(function () { + _this3.popupDiv.html.style.opacity = 0; + }, 1500); + this.popupDiv.deleteTimeout = setTimeout(function () { + _this3._removePopup(); + }, 1800); + } + } + /** + * make a checkbox for boolean options. + * @param {number} defaultValue + * @param {number} value + * @param {array} path | where to look for the actual option + * @private + */ + + }, { + key: "_makeCheckbox", + value: function _makeCheckbox(defaultValue, value, path) { + var checkbox = document.createElement('input'); + checkbox.type = 'checkbox'; + checkbox.className = 'vis-configuration vis-config-checkbox'; + checkbox.checked = defaultValue; + + if (value !== undefined) { + checkbox.checked = value; + + if (value !== defaultValue) { + if (_typeof_1$1(defaultValue) === 'object') { + if (value !== defaultValue.enabled) { + this.changedOptions.push({ + path: path, + value: value + }); + } + } else { + this.changedOptions.push({ + path: path, + value: value + }); + } + } + } + + var me = this; + + checkbox.onchange = function () { + me._update(this.checked, path); + }; + + var label = this._makeLabel(path[path.length - 1], path); + + this._makeItem(path, label, checkbox); + } + /** + * make a text input field for string options. + * @param {number} defaultValue + * @param {number} value + * @param {array} path | where to look for the actual option + * @private + */ + + }, { + key: "_makeTextInput", + value: function _makeTextInput(defaultValue, value, path) { + var checkbox = document.createElement('input'); + checkbox.type = 'text'; + checkbox.className = 'vis-configuration vis-config-text'; + checkbox.value = value; + + if (value !== defaultValue) { + this.changedOptions.push({ + path: path, + value: value + }); + } + + var me = this; + + checkbox.onchange = function () { + me._update(this.value, path); + }; + + var label = this._makeLabel(path[path.length - 1], path); + + this._makeItem(path, label, checkbox); + } + /** + * make a color field with a color picker for color fields + * @param {Array.} arr + * @param {number} value + * @param {array} path | where to look for the actual option + * @private + */ + + }, { + key: "_makeColorField", + value: function _makeColorField(arr, value, path) { + var _this4 = this; + + var defaultColor = arr[1]; + var div = document.createElement('div'); + value = value === undefined ? defaultColor : value; + + if (value !== 'none') { + div.className = 'vis-configuration vis-config-colorBlock'; + div.style.backgroundColor = value; + } else { + div.className = 'vis-configuration vis-config-colorBlock none'; + } + + value = value === undefined ? defaultColor : value; + + div.onclick = function () { + _this4._showColorPicker(value, div, path); + }; + + var label = this._makeLabel(path[path.length - 1], path); + + this._makeItem(path, label, div); + } + /** + * used by the color buttons to call the color picker. + * @param {number} value + * @param {HTMLElement} div + * @param {array} path | where to look for the actual option + * @private + */ + + }, { + key: "_showColorPicker", + value: function _showColorPicker(value, div, path) { + var _this5 = this; + + // clear the callback from this div + div.onclick = function () {}; + + this.colorPicker.insertTo(div); + this.colorPicker.show(); + this.colorPicker.setColor(value); + this.colorPicker.setUpdateCallback(function (color) { + var colorString = 'rgba(' + color.r + ',' + color.g + ',' + color.b + ',' + color.a + ')'; + div.style.backgroundColor = colorString; + + _this5._update(colorString, path); + }); // on close of the colorpicker, restore the callback. + + this.colorPicker.setCloseCallback(function () { + div.onclick = function () { + _this5._showColorPicker(value, div, path); + }; + }); + } + /** + * parse an object and draw the correct items + * @param {Object} obj + * @param {array} [path=[]] | where to look for the actual option + * @param {boolean} [checkOnly=false] + * @returns {boolean} + * @private + */ + + }, { + key: "_handleObject", + value: function _handleObject(obj) { + var path = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : []; + var checkOnly = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; + var show = false; + var filter = this.options.filter; + var visibleInSet = false; + + for (var subObj in obj) { + if (obj.hasOwnProperty(subObj)) { + show = true; + var item = obj[subObj]; + var newPath = util.copyAndExtendArray(path, subObj); + + if (typeof filter === 'function') { + show = filter(subObj, path); // if needed we must go deeper into the object. + + if (show === false) { + if (!(item instanceof Array) && typeof item !== 'string' && typeof item !== 'boolean' && item instanceof Object) { + this.allowCreation = false; + show = this._handleObject(item, newPath, true); + this.allowCreation = checkOnly === false; + } + } + } + + if (show !== false) { + visibleInSet = true; + + var value = this._getValue(newPath); + + if (item instanceof Array) { + this._handleArray(item, value, newPath); + } else if (typeof item === 'string') { + this._makeTextInput(item, value, newPath); + } else if (typeof item === 'boolean') { + this._makeCheckbox(item, value, newPath); + } else if (item instanceof Object) { + // collapse the physics options that are not enabled + var draw = true; + + if (path.indexOf('physics') !== -1) { + if (this.moduleOptions.physics.solver !== subObj) { + draw = false; + } + } + + if (draw === true) { + // initially collapse options with an disabled enabled option. + if (item.enabled !== undefined) { + var enabledPath = util.copyAndExtendArray(newPath, 'enabled'); + + var enabledValue = this._getValue(enabledPath); + + if (enabledValue === true) { + var label = this._makeLabel(subObj, newPath, true); + + this._makeItem(newPath, label); + + visibleInSet = this._handleObject(item, newPath) || visibleInSet; + } else { + this._makeCheckbox(item, enabledValue, newPath); + } + } else { + var _label = this._makeLabel(subObj, newPath, true); + + this._makeItem(newPath, _label); + + visibleInSet = this._handleObject(item, newPath) || visibleInSet; + } + } + } else { + console.error('dont know how to handle', item, subObj, newPath); + } + } + } + } + + return visibleInSet; + } + /** + * handle the array type of option + * @param {Array.} arr + * @param {number} value + * @param {array} path | where to look for the actual option + * @private + */ + + }, { + key: "_handleArray", + value: function _handleArray(arr, value, path) { + if (typeof arr[0] === 'string' && arr[0] === 'color') { + this._makeColorField(arr, value, path); + + if (arr[1] !== value) { + this.changedOptions.push({ + path: path, + value: value + }); + } + } else if (typeof arr[0] === 'string') { + this._makeDropdown(arr, value, path); + + if (arr[0] !== value) { + this.changedOptions.push({ + path: path, + value: value + }); + } + } else if (typeof arr[0] === 'number') { + this._makeRange(arr, value, path); + + if (arr[0] !== value) { + this.changedOptions.push({ + path: path, + value: Number(value) + }); + } + } + } + /** + * called to update the network with the new settings. + * @param {number} value + * @param {array} path | where to look for the actual option + * @private + */ + + }, { + key: "_update", + value: function _update(value, path) { + var options = this._constructOptions(value, path); + + if (this.parent.body && this.parent.body.emitter && this.parent.body.emitter.emit) { + this.parent.body.emitter.emit("configChange", options); + } + + this.initialized = true; + this.parent.setOptions(options); + } + /** + * + * @param {string|Boolean} value + * @param {Array.} path + * @param {{}} optionsObj + * @returns {{}} + * @private + */ + + }, { + key: "_constructOptions", + value: function _constructOptions(value, path) { + var optionsObj = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; + var pointer = optionsObj; // when dropdown boxes can be string or boolean, we typecast it into correct types + + value = value === 'true' ? true : value; + value = value === 'false' ? false : value; + + for (var i = 0; i < path.length; i++) { + if (path[i] !== 'global') { + if (pointer[path[i]] === undefined) { + pointer[path[i]] = {}; + } + + if (i !== path.length - 1) { + pointer = pointer[path[i]]; + } else { + pointer[path[i]] = value; + } + } + } + + return optionsObj; + } + /** + * @private + */ + + }, { + key: "_printOptions", + value: function _printOptions() { + var options = this.getOptions(); + this.optionsContainer.innerHTML = '
var options = ' + JSON.stringify(options, null, 2) + '
'; + } + /** + * + * @returns {{}} options + */ + + }, { + key: "getOptions", + value: function getOptions() { + var options = {}; + + for (var i = 0; i < this.changedOptions.length; i++) { + this._constructOptions(this.changedOptions[i].value, this.changedOptions[i].path, options); + } + + return options; + } + }]); + + return Configurator; + }(); + + /** + * This object contains all possible options. It will check if the types are correct, if required if the option is one + * of the allowed values. + * + * __any__ means that the name of the property does not matter. + * __type__ is a required field for all objects and contains the allowed types of all objects + */ + var string = 'string'; + var bool = 'boolean'; + var number = 'number'; + var array = 'array'; + var object = 'object'; // should only be in a __type__ property + + var dom = 'dom'; + var any = 'any'; // List of endpoints + + var endPoints = ['arrow', 'circle', 'bar']; + var allOptions$1 = { + configure: { + enabled: { + boolean: bool + }, + filter: { + boolean: bool, + string: string, + array: array, + 'function': 'function' + }, + container: { + dom: dom + }, + showButton: { + boolean: bool + }, + __type__: { + object: object, + boolean: bool, + string: string, + array: array, + 'function': 'function' + } + }, + edges: { + arrows: { + to: { + enabled: { + boolean: bool + }, + scaleFactor: { + number: number + }, + type: { + string: endPoints + }, + __type__: { + object: object, + boolean: bool + } + }, + middle: { + enabled: { + boolean: bool + }, + scaleFactor: { + number: number + }, + type: { + string: endPoints + }, + __type__: { + object: object, + boolean: bool + } + }, + from: { + enabled: { + boolean: bool + }, + scaleFactor: { + number: number + }, + type: { + string: endPoints + }, + __type__: { + object: object, + boolean: bool + } + }, + __type__: { + string: ['from', 'to', 'middle'], + object: object + } + }, + arrowStrikethrough: { + boolean: bool + }, + background: { + enabled: { + boolean: bool + }, + color: { + string: string + }, + size: { + number: number + }, + dashes: { + boolean: bool, + array: array + }, + __type__: { + object: object, + boolean: bool + } + }, + chosen: { + label: { + boolean: bool, + 'function': 'function' + }, + edge: { + boolean: bool, + 'function': 'function' + }, + __type__: { + object: object, + boolean: bool + } + }, + color: { + color: { + string: string + }, + highlight: { + string: string + }, + hover: { + string: string + }, + inherit: { + string: ['from', 'to', 'both'], + boolean: bool + }, + opacity: { + number: number + }, + __type__: { + object: object, + string: string + } + }, + dashes: { + boolean: bool, + array: array + }, + font: { + color: { + string: string + }, + size: { + number: number + }, + // px + face: { + string: string + }, + background: { + string: string + }, + strokeWidth: { + number: number + }, + // px + strokeColor: { + string: string + }, + align: { + string: ['horizontal', 'top', 'middle', 'bottom'] + }, + vadjust: { + number: number + }, + multi: { + boolean: bool, + string: string + }, + bold: { + color: { + string: string + }, + size: { + number: number + }, + // px + face: { + string: string + }, + mod: { + string: string + }, + vadjust: { + number: number + }, + __type__: { + object: object, + string: string + } + }, + boldital: { + color: { + string: string + }, + size: { + number: number + }, + // px + face: { + string: string + }, + mod: { + string: string + }, + vadjust: { + number: number + }, + __type__: { + object: object, + string: string + } + }, + ital: { + color: { + string: string + }, + size: { + number: number + }, + // px + face: { + string: string + }, + mod: { + string: string + }, + vadjust: { + number: number + }, + __type__: { + object: object, + string: string + } + }, + mono: { + color: { + string: string + }, + size: { + number: number + }, + // px + face: { + string: string + }, + mod: { + string: string + }, + vadjust: { + number: number + }, + __type__: { + object: object, + string: string + } + }, + __type__: { + object: object, + string: string + } + }, + hidden: { + boolean: bool + }, + hoverWidth: { + 'function': 'function', + number: number + }, + label: { + string: string, + 'undefined': 'undefined' + }, + labelHighlightBold: { + boolean: bool + }, + length: { + number: number, + 'undefined': 'undefined' + }, + physics: { + boolean: bool + }, + scaling: { + min: { + number: number + }, + max: { + number: number + }, + label: { + enabled: { + boolean: bool + }, + min: { + number: number + }, + max: { + number: number + }, + maxVisible: { + number: number + }, + drawThreshold: { + number: number + }, + __type__: { + object: object, + boolean: bool + } + }, + customScalingFunction: { + 'function': 'function' + }, + __type__: { + object: object + } + }, + selectionWidth: { + 'function': 'function', + number: number + }, + selfReferenceSize: { + number: number + }, + shadow: { + enabled: { + boolean: bool + }, + color: { + string: string + }, + size: { + number: number + }, + x: { + number: number + }, + y: { + number: number + }, + __type__: { + object: object, + boolean: bool + } + }, + smooth: { + enabled: { + boolean: bool + }, + type: { + string: ['dynamic', 'continuous', 'discrete', 'diagonalCross', 'straightCross', 'horizontal', 'vertical', 'curvedCW', 'curvedCCW', 'cubicBezier'] + }, + roundness: { + number: number + }, + forceDirection: { + string: ['horizontal', 'vertical', 'none'], + boolean: bool + }, + __type__: { + object: object, + boolean: bool + } + }, + title: { + string: string, + 'undefined': 'undefined' + }, + width: { + number: number + }, + widthConstraint: { + maximum: { + number: number + }, + __type__: { + object: object, + boolean: bool, + number: number + } + }, + value: { + number: number, + 'undefined': 'undefined' + }, + __type__: { + object: object + } + }, + groups: { + useDefaultGroups: { + boolean: bool + }, + __any__: 'get from nodes, will be overwritten below', + __type__: { + object: object + } + }, + interaction: { + dragNodes: { + boolean: bool + }, + dragView: { + boolean: bool + }, + hideEdgesOnDrag: { + boolean: bool + }, + hideEdgesOnZoom: { + boolean: bool + }, + hideNodesOnDrag: { + boolean: bool + }, + hover: { + boolean: bool + }, + keyboard: { + enabled: { + boolean: bool + }, + speed: { + x: { + number: number + }, + y: { + number: number + }, + zoom: { + number: number + }, + __type__: { + object: object + } + }, + bindToWindow: { + boolean: bool + }, + __type__: { + object: object, + boolean: bool + } + }, + multiselect: { + boolean: bool + }, + navigationButtons: { + boolean: bool + }, + selectable: { + boolean: bool + }, + selectConnectedEdges: { + boolean: bool + }, + hoverConnectedEdges: { + boolean: bool + }, + tooltipDelay: { + number: number + }, + zoomView: { + boolean: bool + }, + zoomSpeed: { + number: number + }, + __type__: { + object: object + } + }, + layout: { + randomSeed: { + 'undefined': 'undefined', + number: number + }, + improvedLayout: { + boolean: bool + }, + hierarchical: { + enabled: { + boolean: bool + }, + levelSeparation: { + number: number + }, + nodeSpacing: { + number: number + }, + treeSpacing: { + number: number + }, + blockShifting: { + boolean: bool + }, + edgeMinimization: { + boolean: bool + }, + parentCentralization: { + boolean: bool + }, + direction: { + string: ['UD', 'DU', 'LR', 'RL'] + }, + // UD, DU, LR, RL + sortMethod: { + string: ['hubsize', 'directed'] + }, + // hubsize, directed + __type__: { + object: object, + boolean: bool + } + }, + __type__: { + object: object + } + }, + manipulation: { + enabled: { + boolean: bool + }, + initiallyActive: { + boolean: bool + }, + addNode: { + boolean: bool, + 'function': 'function' + }, + addEdge: { + boolean: bool, + 'function': 'function' + }, + editNode: { + 'function': 'function' + }, + editEdge: { + editWithoutDrag: { + 'function': 'function' + }, + __type__: { + object: object, + boolean: bool, + 'function': 'function' + } + }, + deleteNode: { + boolean: bool, + 'function': 'function' + }, + deleteEdge: { + boolean: bool, + 'function': 'function' + }, + controlNodeStyle: 'get from nodes, will be overwritten below', + __type__: { + object: object, + boolean: bool + } + }, + nodes: { + borderWidth: { + number: number + }, + borderWidthSelected: { + number: number, + 'undefined': 'undefined' + }, + brokenImage: { + string: string, + 'undefined': 'undefined' + }, + chosen: { + label: { + boolean: bool, + 'function': 'function' + }, + node: { + boolean: bool, + 'function': 'function' + }, + __type__: { + object: object, + boolean: bool + } + }, + color: { + border: { + string: string + }, + background: { + string: string + }, + highlight: { + border: { + string: string + }, + background: { + string: string + }, + __type__: { + object: object, + string: string + } + }, + hover: { + border: { + string: string + }, + background: { + string: string + }, + __type__: { + object: object, + string: string + } + }, + __type__: { + object: object, + string: string + } + }, + fixed: { + x: { + boolean: bool + }, + y: { + boolean: bool + }, + __type__: { + object: object, + boolean: bool + } + }, + font: { + align: { + string: string + }, + color: { + string: string + }, + size: { + number: number + }, + // px + face: { + string: string + }, + background: { + string: string + }, + strokeWidth: { + number: number + }, + // px + strokeColor: { + string: string + }, + vadjust: { + number: number + }, + multi: { + boolean: bool, + string: string + }, + bold: { + color: { + string: string + }, + size: { + number: number + }, + // px + face: { + string: string + }, + mod: { + string: string + }, + vadjust: { + number: number + }, + __type__: { + object: object, + string: string + } + }, + boldital: { + color: { + string: string + }, + size: { + number: number + }, + // px + face: { + string: string + }, + mod: { + string: string + }, + vadjust: { + number: number + }, + __type__: { + object: object, + string: string + } + }, + ital: { + color: { + string: string + }, + size: { + number: number + }, + // px + face: { + string: string + }, + mod: { + string: string + }, + vadjust: { + number: number + }, + __type__: { + object: object, + string: string + } + }, + mono: { + color: { + string: string + }, + size: { + number: number + }, + // px + face: { + string: string + }, + mod: { + string: string + }, + vadjust: { + number: number + }, + __type__: { + object: object, + string: string + } + }, + __type__: { + object: object, + string: string + } + }, + group: { + string: string, + number: number, + 'undefined': 'undefined' + }, + heightConstraint: { + minimum: { + number: number + }, + valign: { + string: string + }, + __type__: { + object: object, + boolean: bool, + number: number + } + }, + hidden: { + boolean: bool + }, + icon: { + face: { + string: string + }, + code: { + string: string + }, + //'\uf007', + size: { + number: number + }, + //50, + color: { + string: string + }, + __type__: { + object: object + } + }, + id: { + string: string, + number: number + }, + image: { + selected: { + string: string, + 'undefined': 'undefined' + }, + // --> URL + unselected: { + string: string, + 'undefined': 'undefined' + }, + // --> URL + __type__: { + object: object, + string: string + } + }, + label: { + string: string, + 'undefined': 'undefined' + }, + labelHighlightBold: { + boolean: bool + }, + level: { + number: number, + 'undefined': 'undefined' + }, + margin: { + top: { + number: number + }, + right: { + number: number + }, + bottom: { + number: number + }, + left: { + number: number + }, + __type__: { + object: object, + number: number + } + }, + mass: { + number: number + }, + physics: { + boolean: bool + }, + scaling: { + min: { + number: number + }, + max: { + number: number + }, + label: { + enabled: { + boolean: bool + }, + min: { + number: number + }, + max: { + number: number + }, + maxVisible: { + number: number + }, + drawThreshold: { + number: number + }, + __type__: { + object: object, + boolean: bool + } + }, + customScalingFunction: { + 'function': 'function' + }, + __type__: { + object: object + } + }, + shadow: { + enabled: { + boolean: bool + }, + color: { + string: string + }, + size: { + number: number + }, + x: { + number: number + }, + y: { + number: number + }, + __type__: { + object: object, + boolean: bool + } + }, + shape: { + string: ['ellipse', 'circle', 'database', 'box', 'text', 'image', 'circularImage', 'diamond', 'dot', 'star', 'triangle', 'triangleDown', 'square', 'icon', 'hexagon'] + }, + shapeProperties: { + borderDashes: { + boolean: bool, + array: array + }, + borderRadius: { + number: number + }, + interpolation: { + boolean: bool + }, + useImageSize: { + boolean: bool + }, + useBorderWithImage: { + boolean: bool + }, + __type__: { + object: object + } + }, + size: { + number: number + }, + title: { + string: string, + dom: dom, + 'undefined': 'undefined' + }, + value: { + number: number, + 'undefined': 'undefined' + }, + widthConstraint: { + minimum: { + number: number + }, + maximum: { + number: number + }, + __type__: { + object: object, + boolean: bool, + number: number + } + }, + x: { + number: number + }, + y: { + number: number + }, + __type__: { + object: object + } + }, + physics: { + enabled: { + boolean: bool + }, + barnesHut: { + gravitationalConstant: { + number: number + }, + centralGravity: { + number: number + }, + springLength: { + number: number + }, + springConstant: { + number: number + }, + damping: { + number: number + }, + avoidOverlap: { + number: number + }, + __type__: { + object: object + } + }, + forceAtlas2Based: { + gravitationalConstant: { + number: number + }, + centralGravity: { + number: number + }, + springLength: { + number: number + }, + springConstant: { + number: number + }, + damping: { + number: number + }, + avoidOverlap: { + number: number + }, + __type__: { + object: object + } + }, + repulsion: { + centralGravity: { + number: number + }, + springLength: { + number: number + }, + springConstant: { + number: number + }, + nodeDistance: { + number: number + }, + damping: { + number: number + }, + __type__: { + object: object + } + }, + hierarchicalRepulsion: { + centralGravity: { + number: number + }, + springLength: { + number: number + }, + springConstant: { + number: number + }, + nodeDistance: { + number: number + }, + damping: { + number: number + }, + __type__: { + object: object + } + }, + maxVelocity: { + number: number + }, + minVelocity: { + number: number + }, + // px/s + solver: { + string: ['barnesHut', 'repulsion', 'hierarchicalRepulsion', 'forceAtlas2Based'] + }, + stabilization: { + enabled: { + boolean: bool + }, + iterations: { + number: number + }, + // maximum number of iteration to stabilize + updateInterval: { + number: number + }, + onlyDynamicEdges: { + boolean: bool + }, + fit: { + boolean: bool + }, + __type__: { + object: object, + boolean: bool + } + }, + timestep: { + number: number + }, + adaptiveTimestep: { + boolean: bool + }, + __type__: { + object: object, + boolean: bool + } + }, + //globals : + autoResize: { + boolean: bool + }, + clickToUse: { + boolean: bool + }, + locale: { + string: string + }, + locales: { + __any__: { + any: any + }, + __type__: { + object: object + } + }, + height: { + string: string + }, + width: { + string: string + }, + __type__: { + object: object + } + }; + allOptions$1.groups.__any__ = allOptions$1.nodes; + allOptions$1.manipulation.controlNodeStyle = allOptions$1.nodes; + var configureOptions = { + nodes: { + borderWidth: [1, 0, 10, 1], + borderWidthSelected: [2, 0, 10, 1], + color: { + border: ['color', '#2B7CE9'], + background: ['color', '#97C2FC'], + highlight: { + border: ['color', '#2B7CE9'], + background: ['color', '#D2E5FF'] + }, + hover: { + border: ['color', '#2B7CE9'], + background: ['color', '#D2E5FF'] + } + }, + fixed: { + x: false, + y: false + }, + font: { + color: ['color', '#343434'], + size: [14, 0, 100, 1], + // px + face: ['arial', 'verdana', 'tahoma'], + background: ['color', 'none'], + strokeWidth: [0, 0, 50, 1], + // px + strokeColor: ['color', '#ffffff'] + }, + //group: 'string', + hidden: false, + labelHighlightBold: true, + //icon: { + // face: 'string', //'FontAwesome', + // code: 'string', //'\uf007', + // size: [50, 0, 200, 1], //50, + // color: ['color','#2B7CE9'] //'#aa00ff' + //}, + //image: 'string', // --> URL + physics: true, + scaling: { + min: [10, 0, 200, 1], + max: [30, 0, 200, 1], + label: { + enabled: false, + min: [14, 0, 200, 1], + max: [30, 0, 200, 1], + maxVisible: [30, 0, 200, 1], + drawThreshold: [5, 0, 20, 1] + } + }, + shadow: { + enabled: false, + color: 'rgba(0,0,0,0.5)', + size: [10, 0, 20, 1], + x: [5, -30, 30, 1], + y: [5, -30, 30, 1] + }, + shape: ['ellipse', 'box', 'circle', 'database', 'diamond', 'dot', 'square', 'star', 'text', 'triangle', 'triangleDown', 'hexagon'], + shapeProperties: { + borderDashes: false, + borderRadius: [6, 0, 20, 1], + interpolation: true, + useImageSize: false + }, + size: [25, 0, 200, 1] + }, + edges: { + arrows: { + to: { + enabled: false, + scaleFactor: [1, 0, 3, 0.05], + type: 'arrow' + }, + middle: { + enabled: false, + scaleFactor: [1, 0, 3, 0.05], + type: 'arrow' + }, + from: { + enabled: false, + scaleFactor: [1, 0, 3, 0.05], + type: 'arrow' + } + }, + arrowStrikethrough: true, + color: { + color: ['color', '#848484'], + highlight: ['color', '#848484'], + hover: ['color', '#848484'], + inherit: ['from', 'to', 'both', true, false], + opacity: [1, 0, 1, 0.05] + }, + dashes: false, + font: { + color: ['color', '#343434'], + size: [14, 0, 100, 1], + // px + face: ['arial', 'verdana', 'tahoma'], + background: ['color', 'none'], + strokeWidth: [2, 0, 50, 1], + // px + strokeColor: ['color', '#ffffff'], + align: ['horizontal', 'top', 'middle', 'bottom'] + }, + hidden: false, + hoverWidth: [1.5, 0, 5, 0.1], + labelHighlightBold: true, + physics: true, + scaling: { + min: [1, 0, 100, 1], + max: [15, 0, 100, 1], + label: { + enabled: true, + min: [14, 0, 200, 1], + max: [30, 0, 200, 1], + maxVisible: [30, 0, 200, 1], + drawThreshold: [5, 0, 20, 1] + } + }, + selectionWidth: [1.5, 0, 5, 0.1], + selfReferenceSize: [20, 0, 200, 1], + shadow: { + enabled: false, + color: 'rgba(0,0,0,0.5)', + size: [10, 0, 20, 1], + x: [5, -30, 30, 1], + y: [5, -30, 30, 1] + }, + smooth: { + enabled: true, + type: ['dynamic', 'continuous', 'discrete', 'diagonalCross', 'straightCross', 'horizontal', 'vertical', 'curvedCW', 'curvedCCW', 'cubicBezier'], + forceDirection: ['horizontal', 'vertical', 'none'], + roundness: [0.5, 0, 1, 0.05] + }, + width: [1, 0, 30, 1] + }, + layout: { + //randomSeed: [0, 0, 500, 1], + //improvedLayout: true, + hierarchical: { + enabled: false, + levelSeparation: [150, 20, 500, 5], + nodeSpacing: [100, 20, 500, 5], + treeSpacing: [200, 20, 500, 5], + blockShifting: true, + edgeMinimization: true, + parentCentralization: true, + direction: ['UD', 'DU', 'LR', 'RL'], + // UD, DU, LR, RL + sortMethod: ['hubsize', 'directed'] // hubsize, directed + + } + }, + interaction: { + dragNodes: true, + dragView: true, + hideEdgesOnDrag: false, + hideEdgesOnZoom: false, + hideNodesOnDrag: false, + hover: false, + keyboard: { + enabled: false, + speed: { + x: [10, 0, 40, 1], + y: [10, 0, 40, 1], + zoom: [0.02, 0, 0.1, 0.005] + }, + bindToWindow: true + }, + multiselect: false, + navigationButtons: false, + selectable: true, + selectConnectedEdges: true, + hoverConnectedEdges: true, + tooltipDelay: [300, 0, 1000, 25], + zoomView: true, + zoomSpeed: [1, 1, 1, 1] + }, + manipulation: { + enabled: false, + initiallyActive: false + }, + physics: { + enabled: true, + barnesHut: { + //theta: [0.5, 0.1, 1, 0.05], + gravitationalConstant: [-2000, -30000, 0, 50], + centralGravity: [0.3, 0, 10, 0.05], + springLength: [95, 0, 500, 5], + springConstant: [0.04, 0, 1.2, 0.005], + damping: [0.09, 0, 1, 0.01], + avoidOverlap: [0, 0, 1, 0.01] + }, + forceAtlas2Based: { + //theta: [0.5, 0.1, 1, 0.05], + gravitationalConstant: [-50, -500, 0, 1], + centralGravity: [0.01, 0, 1, 0.005], + springLength: [95, 0, 500, 5], + springConstant: [0.08, 0, 1.2, 0.005], + damping: [0.4, 0, 1, 0.01], + avoidOverlap: [0, 0, 1, 0.01] + }, + repulsion: { + centralGravity: [0.2, 0, 10, 0.05], + springLength: [200, 0, 500, 5], + springConstant: [0.05, 0, 1.2, 0.005], + nodeDistance: [100, 0, 500, 5], + damping: [0.09, 0, 1, 0.01] + }, + hierarchicalRepulsion: { + centralGravity: [0.2, 0, 10, 0.05], + springLength: [100, 0, 500, 5], + springConstant: [0.01, 0, 1.2, 0.005], + nodeDistance: [120, 0, 500, 5], + damping: [0.09, 0, 1, 0.01] + }, + maxVelocity: [50, 0, 150, 1], + minVelocity: [0.1, 0.01, 0.5, 0.01], + solver: ['barnesHut', 'forceAtlas2Based', 'repulsion', 'hierarchicalRepulsion'], + timestep: [0.5, 0.01, 1, 0.01] //adaptiveTimestep: true + + } + }; + + var allOptions$2 = /*#__PURE__*/Object.freeze({ + allOptions: allOptions$1, + configureOptions: configureOptions + }); + + /** + * The Floyd–Warshall algorithm is an algorithm for finding shortest paths in + * a weighted graph with positive or negative edge weights (but with no negative + * cycles). - https://en.wikipedia.org/wiki/Floyd–Warshall_algorithm + */ + var FloydWarshall = + /*#__PURE__*/ + function () { + /** + * @ignore + */ + function FloydWarshall() { + classCallCheck$1(this, FloydWarshall); + } + /** + * + * @param {Object} body + * @param {Array.} nodesArray + * @param {Array.} edgesArray + * @returns {{}} + */ + + + createClass$1(FloydWarshall, [{ + key: "getDistances", + value: function getDistances(body, nodesArray, edgesArray) { + var D_matrix = {}; + var edges = body.edges; // prepare matrix with large numbers + + for (var i = 0; i < nodesArray.length; i++) { + var node = nodesArray[i]; + var cell = {}; + D_matrix[node] = cell; + + for (var j = 0; j < nodesArray.length; j++) { + cell[nodesArray[j]] = i == j ? 0 : 1e9; + } + } // put the weights for the edges in. This assumes unidirectionality. + + + for (var _i = 0; _i < edgesArray.length; _i++) { + var edge = edges[edgesArray[_i]]; // edge has to be connected if it counts to the distances. If it is connected to inner clusters it will crash so we also check if it is in the D_matrix + + if (edge.connected === true && D_matrix[edge.fromId] !== undefined && D_matrix[edge.toId] !== undefined) { + D_matrix[edge.fromId][edge.toId] = 1; + D_matrix[edge.toId][edge.fromId] = 1; + } + } + + var nodeCount = nodesArray.length; // Adapted FloydWarshall based on unidirectionality to greatly reduce complexity. + + for (var k = 0; k < nodeCount; k++) { + var knode = nodesArray[k]; + var kcolm = D_matrix[knode]; + + for (var _i2 = 0; _i2 < nodeCount - 1; _i2++) { + var inode = nodesArray[_i2]; + var icolm = D_matrix[inode]; + + for (var _j = _i2 + 1; _j < nodeCount; _j++) { + var jnode = nodesArray[_j]; + var jcolm = D_matrix[jnode]; + var val = Math.min(icolm[jnode], icolm[knode] + kcolm[jnode]); + icolm[jnode] = val; + jcolm[inode] = val; + } + } + } + + return D_matrix; + } + }]); + + return FloydWarshall; + }(); + + /** + * KamadaKawai positions the nodes initially based on + * + * "AN ALGORITHM FOR DRAWING GENERAL UNDIRECTED GRAPHS" + * -- Tomihisa KAMADA and Satoru KAWAI in 1989 + * + * Possible optimizations in the distance calculation can be implemented. + */ + + var KamadaKawai = + /*#__PURE__*/ + function () { + /** + * @param {Object} body + * @param {number} edgeLength + * @param {number} edgeStrength + */ + function KamadaKawai(body, edgeLength, edgeStrength) { + classCallCheck$1(this, KamadaKawai); + + this.body = body; + this.springLength = edgeLength; + this.springConstant = edgeStrength; + this.distanceSolver = new FloydWarshall(); + } + /** + * Not sure if needed but can be used to update the spring length and spring constant + * @param {Object} options + */ + + + createClass$1(KamadaKawai, [{ + key: "setOptions", + value: function setOptions(options) { + if (options) { + if (options.springLength) { + this.springLength = options.springLength; + } + + if (options.springConstant) { + this.springConstant = options.springConstant; + } + } + } + /** + * Position the system + * @param {Array.} nodesArray + * @param {Array.} edgesArray + * @param {boolean} [ignoreClusters=false] + */ + + }, { + key: "solve", + value: function solve(nodesArray, edgesArray) { + var ignoreClusters = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; + // get distance matrix + var D_matrix = this.distanceSolver.getDistances(this.body, nodesArray, edgesArray); // distance matrix + // get the L Matrix + + this._createL_matrix(D_matrix); // get the K Matrix + + + this._createK_matrix(D_matrix); // initial E Matrix + + + this._createE_matrix(); // calculate positions + + + var threshold = 0.01; + var innerThreshold = 1; + var iterations = 0; + var maxIterations = Math.max(1000, Math.min(10 * this.body.nodeIndices.length, 6000)); + var maxInnerIterations = 5; + var maxEnergy = 1e9; + var highE_nodeId = 0, + dE_dx = 0, + dE_dy = 0, + delta_m = 0, + subIterations = 0; + + while (maxEnergy > threshold && iterations < maxIterations) { + iterations += 1; + + var _this$_getHighestEner = this._getHighestEnergyNode(ignoreClusters); + + var _this$_getHighestEner2 = slicedToArray(_this$_getHighestEner, 4); + + highE_nodeId = _this$_getHighestEner2[0]; + maxEnergy = _this$_getHighestEner2[1]; + dE_dx = _this$_getHighestEner2[2]; + dE_dy = _this$_getHighestEner2[3]; + delta_m = maxEnergy; + subIterations = 0; + + while (delta_m > innerThreshold && subIterations < maxInnerIterations) { + subIterations += 1; + + this._moveNode(highE_nodeId, dE_dx, dE_dy); + + var _this$_getEnergy = this._getEnergy(highE_nodeId); + + var _this$_getEnergy2 = slicedToArray(_this$_getEnergy, 3); + + delta_m = _this$_getEnergy2[0]; + dE_dx = _this$_getEnergy2[1]; + dE_dy = _this$_getEnergy2[2]; + } + } + } + /** + * get the node with the highest energy + * @param {boolean} ignoreClusters + * @returns {number[]} + * @private + */ + + }, { + key: "_getHighestEnergyNode", + value: function _getHighestEnergyNode(ignoreClusters) { + var nodesArray = this.body.nodeIndices; + var nodes = this.body.nodes; + var maxEnergy = 0; + var maxEnergyNodeId = nodesArray[0]; + var dE_dx_max = 0, + dE_dy_max = 0; + + for (var nodeIdx = 0; nodeIdx < nodesArray.length; nodeIdx++) { + var m = nodesArray[nodeIdx]; // by not evaluating nodes with predefined positions we should only move nodes that have no positions. + + if (nodes[m].predefinedPosition === false || nodes[m].isCluster === true && ignoreClusters === true || nodes[m].options.fixed.x === true || nodes[m].options.fixed.y === true) { + var _this$_getEnergy3 = this._getEnergy(m), + _this$_getEnergy4 = slicedToArray(_this$_getEnergy3, 3), + delta_m = _this$_getEnergy4[0], + dE_dx = _this$_getEnergy4[1], + dE_dy = _this$_getEnergy4[2]; + + if (maxEnergy < delta_m) { + maxEnergy = delta_m; + maxEnergyNodeId = m; + dE_dx_max = dE_dx; + dE_dy_max = dE_dy; + } + } + } + + return [maxEnergyNodeId, maxEnergy, dE_dx_max, dE_dy_max]; + } + /** + * calculate the energy of a single node + * @param {Node.id} m + * @returns {number[]} + * @private + */ + + }, { + key: "_getEnergy", + value: function _getEnergy(m) { + var _this$E_sums$m = slicedToArray(this.E_sums[m], 2), + dE_dx = _this$E_sums$m[0], + dE_dy = _this$E_sums$m[1]; + + var delta_m = Math.sqrt(Math.pow(dE_dx, 2) + Math.pow(dE_dy, 2)); + return [delta_m, dE_dx, dE_dy]; + } + /** + * move the node based on it's energy + * the dx and dy are calculated from the linear system proposed by Kamada and Kawai + * @param {number} m + * @param {number} dE_dx + * @param {number} dE_dy + * @private + */ + + }, { + key: "_moveNode", + value: function _moveNode(m, dE_dx, dE_dy) { + var nodesArray = this.body.nodeIndices; + var nodes = this.body.nodes; + var d2E_dx2 = 0; + var d2E_dxdy = 0; + var d2E_dy2 = 0; + var x_m = nodes[m].x; + var y_m = nodes[m].y; + var km = this.K_matrix[m]; + var lm = this.L_matrix[m]; + + for (var iIdx = 0; iIdx < nodesArray.length; iIdx++) { + var i = nodesArray[iIdx]; + + if (i !== m) { + var x_i = nodes[i].x; + var y_i = nodes[i].y; + var kmat = km[i]; + var lmat = lm[i]; + var denominator = 1.0 / Math.pow(Math.pow(x_m - x_i, 2) + Math.pow(y_m - y_i, 2), 1.5); + d2E_dx2 += kmat * (1 - lmat * Math.pow(y_m - y_i, 2) * denominator); + d2E_dxdy += kmat * (lmat * (x_m - x_i) * (y_m - y_i) * denominator); + d2E_dy2 += kmat * (1 - lmat * Math.pow(x_m - x_i, 2) * denominator); + } + } // make the variable names easier to make the solving of the linear system easier to read + + + var A = d2E_dx2, + B = d2E_dxdy, + C = dE_dx, + D = d2E_dy2, + E = dE_dy; // solve the linear system for dx and dy + + var dy = (C / A + E / B) / (B / A - D / B); + var dx = -(B * dy + C) / A; // move the node + + nodes[m].x += dx; + nodes[m].y += dy; // Recalculate E_matrix (should be incremental) + + this._updateE_matrix(m); + } + /** + * Create the L matrix: edge length times shortest path + * @param {Object} D_matrix + * @private + */ + + }, { + key: "_createL_matrix", + value: function _createL_matrix(D_matrix) { + var nodesArray = this.body.nodeIndices; + var edgeLength = this.springLength; + this.L_matrix = []; + + for (var i = 0; i < nodesArray.length; i++) { + this.L_matrix[nodesArray[i]] = {}; + + for (var j = 0; j < nodesArray.length; j++) { + this.L_matrix[nodesArray[i]][nodesArray[j]] = edgeLength * D_matrix[nodesArray[i]][nodesArray[j]]; + } + } + } + /** + * Create the K matrix: spring constants times shortest path + * @param {Object} D_matrix + * @private + */ + + }, { + key: "_createK_matrix", + value: function _createK_matrix(D_matrix) { + var nodesArray = this.body.nodeIndices; + var edgeStrength = this.springConstant; + this.K_matrix = []; + + for (var i = 0; i < nodesArray.length; i++) { + this.K_matrix[nodesArray[i]] = {}; + + for (var j = 0; j < nodesArray.length; j++) { + this.K_matrix[nodesArray[i]][nodesArray[j]] = edgeStrength * Math.pow(D_matrix[nodesArray[i]][nodesArray[j]], -2); + } + } + } + /** + * Create matrix with all energies between nodes + * @private + */ + + }, { + key: "_createE_matrix", + value: function _createE_matrix() { + var nodesArray = this.body.nodeIndices; + var nodes = this.body.nodes; + this.E_matrix = {}; + this.E_sums = {}; + + for (var mIdx = 0; mIdx < nodesArray.length; mIdx++) { + this.E_matrix[nodesArray[mIdx]] = []; + } + + for (var _mIdx = 0; _mIdx < nodesArray.length; _mIdx++) { + var m = nodesArray[_mIdx]; + var x_m = nodes[m].x; + var y_m = nodes[m].y; + var dE_dx = 0; + var dE_dy = 0; + + for (var iIdx = _mIdx; iIdx < nodesArray.length; iIdx++) { + var i = nodesArray[iIdx]; + + if (i !== m) { + var x_i = nodes[i].x; + var y_i = nodes[i].y; + var denominator = 1.0 / Math.sqrt(Math.pow(x_m - x_i, 2) + Math.pow(y_m - y_i, 2)); + this.E_matrix[m][iIdx] = [this.K_matrix[m][i] * (x_m - x_i - this.L_matrix[m][i] * (x_m - x_i) * denominator), this.K_matrix[m][i] * (y_m - y_i - this.L_matrix[m][i] * (y_m - y_i) * denominator)]; + this.E_matrix[i][_mIdx] = this.E_matrix[m][iIdx]; + dE_dx += this.E_matrix[m][iIdx][0]; + dE_dy += this.E_matrix[m][iIdx][1]; + } + } //Store sum + + + this.E_sums[m] = [dE_dx, dE_dy]; + } + } + /** + * Update method, just doing single column (rows are auto-updated) (update all sums) + * + * @param {number} m + * @private + */ + + }, { + key: "_updateE_matrix", + value: function _updateE_matrix(m) { + var nodesArray = this.body.nodeIndices; + var nodes = this.body.nodes; + var colm = this.E_matrix[m]; + var kcolm = this.K_matrix[m]; + var lcolm = this.L_matrix[m]; + var x_m = nodes[m].x; + var y_m = nodes[m].y; + var dE_dx = 0; + var dE_dy = 0; + + for (var iIdx = 0; iIdx < nodesArray.length; iIdx++) { + var i = nodesArray[iIdx]; + + if (i !== m) { + //Keep old energy value for sum modification below + var cell = colm[iIdx]; + var oldDx = cell[0]; + var oldDy = cell[1]; //Calc new energy: + + var x_i = nodes[i].x; + var y_i = nodes[i].y; + var denominator = 1.0 / Math.sqrt(Math.pow(x_m - x_i, 2) + Math.pow(y_m - y_i, 2)); + var dx = kcolm[i] * (x_m - x_i - lcolm[i] * (x_m - x_i) * denominator); + var dy = kcolm[i] * (y_m - y_i - lcolm[i] * (y_m - y_i) * denominator); + colm[iIdx] = [dx, dy]; + dE_dx += dx; + dE_dy += dy; //add new energy to sum of each column + + var sum = this.E_sums[i]; + sum[0] += dx - oldDx; + sum[1] += dy - oldDy; + } + } //Store sum at -1 index + + + this.E_sums[m] = [dE_dx, dE_dy]; + } + }]); + + return KamadaKawai; + }(); + + // Load custom shapes into CanvasRenderingContext2D + /** + * Create a network visualization, displaying nodes and edges. + * + * @param {Element} container The DOM element in which the Network will + * be created. Normally a div element. + * @param {Object} data An object containing parameters + * {Array} nodes + * {Array} edges + * @param {Object} options Options + * @constructor Network + */ + + function Network(container, data, options) { + var _this = this; + + if (!(this instanceof Network)) { + throw new SyntaxError('Constructor must be called with the new operator'); + } // set constant values + + + this.options = {}; + this.defaultOptions = { + locale: 'en', + locales: locales, + clickToUse: false + }; + util.extend(this.options, this.defaultOptions); + /** + * Containers for nodes and edges. + * + * 'edges' and 'nodes' contain the full definitions of all the network elements. + * 'nodeIndices' and 'edgeIndices' contain the id's of the active elements. + * + * The distinction is important, because a defined node need not be active, i.e. + * visible on the canvas. This happens in particular when clusters are defined, in + * that case there will be nodes and edges not displayed. + * The bottom line is that all code with actions related to visibility, *must* use + * 'nodeIndices' and 'edgeIndices', not 'nodes' and 'edges' directly. + */ + + this.body = { + container: container, + // See comment above for following fields + nodes: {}, + nodeIndices: [], + edges: {}, + edgeIndices: [], + emitter: { + on: this.on.bind(this), + off: this.off.bind(this), + emit: this.emit.bind(this), + once: this.once.bind(this) + }, + eventListeners: { + onTap: function onTap() {}, + onTouch: function onTouch() {}, + onDoubleTap: function onDoubleTap() {}, + onHold: function onHold() {}, + onDragStart: function onDragStart() {}, + onDrag: function onDrag() {}, + onDragEnd: function onDragEnd() {}, + onMouseWheel: function onMouseWheel() {}, + onPinch: function onPinch() {}, + onMouseMove: function onMouseMove() {}, + onRelease: function onRelease() {}, + onContext: function onContext() {} + }, + data: { + nodes: null, + // A DataSet or DataView + edges: null // A DataSet or DataView + + }, + functions: { + createNode: function createNode() {}, + createEdge: function createEdge() {}, + getPointer: function getPointer() {} + }, + modules: {}, + view: { + scale: 1, + translation: { + x: 0, + y: 0 + } + } + }; // bind the event listeners + + this.bindEventListeners(); // setting up all modules + + this.images = new Images(function () { + return _this.body.emitter.emit("_requestRedraw"); + }); // object with images + + this.groups = new Groups(); // object with groups + + this.canvas = new Canvas(this.body); // DOM handler + + this.selectionHandler = new SelectionHandler(this.body, this.canvas); // Selection handler + + this.interactionHandler = new InteractionHandler(this.body, this.canvas, this.selectionHandler); // Interaction handler handles all the hammer bindings (that are bound by canvas), key + + this.view = new View(this.body, this.canvas); // camera handler, does animations and zooms + + this.renderer = new CanvasRenderer(this.body, this.canvas); // renderer, starts renderloop, has events that modules can hook into + + this.physics = new PhysicsEngine(this.body); // physics engine, does all the simulations + + this.layoutEngine = new LayoutEngine(this.body); // layout engine for inital layout and hierarchical layout + + this.clustering = new ClusterEngine(this.body); // clustering api + + this.manipulation = new ManipulationSystem(this.body, this.canvas, this.selectionHandler); // data manipulation system + + this.nodesHandler = new NodesHandler(this.body, this.images, this.groups, this.layoutEngine); // Handle adding, deleting and updating of nodes as well as global options + + this.edgesHandler = new EdgesHandler(this.body, this.images, this.groups); // Handle adding, deleting and updating of edges as well as global options + + this.body.modules["kamadaKawai"] = new KamadaKawai(this.body, 150, 0.05); // Layouting algorithm. + + this.body.modules["clustering"] = this.clustering; // create the DOM elements + + this.canvas._create(); // apply options + + + this.setOptions(options); // load data (the disable start variable will be the same as the enabled clustering) + + this.setData(data); + } // Extend Network with an Emitter mixin + + componentEmitter(Network.prototype); + /** + * Set options + * @param {Object} options + */ + + Network.prototype.setOptions = function (options) { + var _this2 = this; + + if (options === null) { + options = undefined; // This ensures that options handling doesn't crash in the handling + } + + if (options !== undefined) { + var errorFound = Validator.validate(options, allOptions$1); + + if (errorFound === true) { + console.log('%cErrors have been found in the supplied options object.', printStyle); + } // copy the global fields over + + + var fields = ['locale', 'locales', 'clickToUse']; + util.selectiveDeepExtend(fields, this.options, options); // the hierarchical system can adapt the edges and the physics to it's own options because not all combinations work with the hierarichical system. + + options = this.layoutEngine.setOptions(options.layout, options); + this.canvas.setOptions(options); // options for canvas are in globals + // pass the options to the modules + + this.groups.setOptions(options.groups); + this.nodesHandler.setOptions(options.nodes); + this.edgesHandler.setOptions(options.edges); + this.physics.setOptions(options.physics); + this.manipulation.setOptions(options.manipulation, options, this.options); // manipulation uses the locales in the globals + + this.interactionHandler.setOptions(options.interaction); + this.renderer.setOptions(options.interaction); // options for rendering are in interaction + + this.selectionHandler.setOptions(options.interaction); // options for selection are in interaction + // reload the settings of the nodes to apply changes in groups that are not referenced by pointer. + + if (options.groups !== undefined) { + this.body.emitter.emit("refreshNodes"); + } // these two do not have options at the moment, here for completeness + //this.view.setOptions(options.view); + //this.clustering.setOptions(options.clustering); + + + if ('configure' in options) { + if (!this.configurator) { + this.configurator = new Configurator(this, this.body.container, configureOptions, this.canvas.pixelRatio); + } + + this.configurator.setOptions(options.configure); + } // if the configuration system is enabled, copy all options and put them into the config system + + + if (this.configurator && this.configurator.options.enabled === true) { + var networkOptions = { + nodes: {}, + edges: {}, + layout: {}, + interaction: {}, + manipulation: {}, + physics: {}, + global: {} + }; + util.deepExtend(networkOptions.nodes, this.nodesHandler.options); + util.deepExtend(networkOptions.edges, this.edgesHandler.options); + util.deepExtend(networkOptions.layout, this.layoutEngine.options); // load the selectionHandler and render default options in to the interaction group + + util.deepExtend(networkOptions.interaction, this.selectionHandler.options); + util.deepExtend(networkOptions.interaction, this.renderer.options); + util.deepExtend(networkOptions.interaction, this.interactionHandler.options); + util.deepExtend(networkOptions.manipulation, this.manipulation.options); + util.deepExtend(networkOptions.physics, this.physics.options); // load globals into the global object + + util.deepExtend(networkOptions.global, this.canvas.options); + util.deepExtend(networkOptions.global, this.options); + this.configurator.setModuleOptions(networkOptions); + } // handle network global options + + + if (options.clickToUse !== undefined) { + if (options.clickToUse === true) { + if (this.activator === undefined) { + this.activator = new Activator_1(this.canvas.frame); + this.activator.on('change', function () { + _this2.body.emitter.emit("activate"); + }); + } + } else { + if (this.activator !== undefined) { + this.activator.destroy(); + delete this.activator; + } + + this.body.emitter.emit("activate"); + } + } else { + this.body.emitter.emit("activate"); + } + + this.canvas.setSize(); // start the physics simulation. Can be safely called multiple times. + + this.body.emitter.emit("startSimulation"); + } + }; + /** + * Update the visible nodes and edges list with the most recent node state. + * + * Visible nodes are stored in this.body.nodeIndices. + * Visible edges are stored in this.body.edgeIndices. + * A node or edges is visible if it is not hidden or clustered. + * + * @private + */ + + + Network.prototype._updateVisibleIndices = function () { + var nodes = this.body.nodes; + var edges = this.body.edges; + this.body.nodeIndices = []; + this.body.edgeIndices = []; + + for (var nodeId in nodes) { + if (nodes.hasOwnProperty(nodeId)) { + if (!this.clustering._isClusteredNode(nodeId) && nodes[nodeId].options.hidden === false) { + this.body.nodeIndices.push(nodes[nodeId].id); + } + } + } + + for (var edgeId in edges) { + if (edges.hasOwnProperty(edgeId)) { + var edge = edges[edgeId]; // It can happen that this is executed *after* a node edge has been removed, + // but *before* the edge itself has been removed. Taking this into account. + + var fromNode = nodes[edge.fromId]; + var toNode = nodes[edge.toId]; + var edgeNodesPresent = fromNode !== undefined && toNode !== undefined; + var isVisible = !this.clustering._isClusteredEdge(edgeId) && edge.options.hidden === false && edgeNodesPresent && fromNode.options.hidden === false // Also hidden if any of its connecting nodes are hidden + && toNode.options.hidden === false; // idem + + if (isVisible) { + this.body.edgeIndices.push(edge.id); + } + } + } + }; + /** + * Bind all events + */ + + + Network.prototype.bindEventListeners = function () { + var _this3 = this; + + // This event will trigger a rebuilding of the cache everything. + // Used when nodes or edges have been added or removed. + this.body.emitter.on("_dataChanged", function () { + _this3.edgesHandler._updateState(); + + _this3.body.emitter.emit("_dataUpdated"); + }); // this is called when options of EXISTING nodes or edges have changed. + + this.body.emitter.on("_dataUpdated", function () { + // Order important in following block + _this3.clustering._updateState(); + + _this3._updateVisibleIndices(); + + _this3._updateValueRange(_this3.body.nodes); + + _this3._updateValueRange(_this3.body.edges); // start simulation (can be called safely, even if already running) + + + _this3.body.emitter.emit("startSimulation"); + + _this3.body.emitter.emit("_requestRedraw"); + }); + }; + /** + * Set nodes and edges, and optionally options as well. + * + * @param {Object} data Object containing parameters: + * {Array | DataSet | DataView} [nodes] Array with nodes + * {Array | DataSet | DataView} [edges] Array with edges + * {String} [dot] String containing data in DOT format + * {String} [gephi] String containing data in gephi JSON format + * {Options} [options] Object with options + */ + + + Network.prototype.setData = function (data) { + // reset the physics engine. + this.body.emitter.emit("resetPhysics"); + this.body.emitter.emit("_resetData"); // unselect all to ensure no selections from old data are carried over. + + this.selectionHandler.unselectAll(); + + if (data && data.dot && (data.nodes || data.edges)) { + throw new SyntaxError('Data must contain either parameter "dot" or ' + ' parameter pair "nodes" and "edges", but not both.'); + } // set options + + + this.setOptions(data && data.options); // set all data + + if (data && data.dot) { + console.log('The dot property has been deprecated. Please use the static convertDot method to convert DOT into vis.network format and use the normal data format with nodes and edges. This converter is used like this: var data = vis.network.convertDot(dotString);'); // parse DOT file + + var dotData = dotparser.DOTToGraph(data.dot); + this.setData(dotData); + return; + } else if (data && data.gephi) { + // parse DOT file + console.log('The gephi property has been deprecated. Please use the static convertGephi method to convert gephi into vis.network format and use the normal data format with nodes and edges. This converter is used like this: var data = vis.network.convertGephi(gephiJson);'); + var gephiData = parseGephi(data.gephi); + this.setData(gephiData); + return; + } else { + this.nodesHandler.setData(data && data.nodes, true); + this.edgesHandler.setData(data && data.edges, true); + } // emit change in data + + + this.body.emitter.emit("_dataChanged"); // emit data loaded + + this.body.emitter.emit("_dataLoaded"); // find a stable position or start animating to a stable position + + this.body.emitter.emit("initPhysics"); + }; + /** + * Cleans up all bindings of the network, removing it fully from the memory IF the variable is set to null after calling this function. + * var network = new vis.Network(..); + * network.destroy(); + * network = null; + */ + + + Network.prototype.destroy = function () { + this.body.emitter.emit("destroy"); // clear events + + this.body.emitter.off(); + this.off(); // delete modules + + delete this.groups; + delete this.canvas; + delete this.selectionHandler; + delete this.interactionHandler; + delete this.view; + delete this.renderer; + delete this.physics; + delete this.layoutEngine; + delete this.clustering; + delete this.manipulation; + delete this.nodesHandler; + delete this.edgesHandler; + delete this.configurator; + delete this.images; + + for (var nodeId in this.body.nodes) { + if (!this.body.nodes.hasOwnProperty(nodeId)) continue; + delete this.body.nodes[nodeId]; + } + + for (var edgeId in this.body.edges) { + if (!this.body.edges.hasOwnProperty(edgeId)) continue; + delete this.body.edges[edgeId]; + } // remove the container and everything inside it recursively + + + util.recursiveDOMDelete(this.body.container); + }; + /** + * Update the values of all object in the given array according to the current + * value range of the objects in the array. + * @param {Object} obj An object containing a set of Edges or Nodes + * The objects must have a method getValue() and + * setValueRange(min, max). + * @private + */ + + + Network.prototype._updateValueRange = function (obj) { + var id; // determine the range of the objects + + var valueMin = undefined; + var valueMax = undefined; + var valueTotal = 0; + + for (id in obj) { + if (obj.hasOwnProperty(id)) { + var value = obj[id].getValue(); + + if (value !== undefined) { + valueMin = valueMin === undefined ? value : Math.min(value, valueMin); + valueMax = valueMax === undefined ? value : Math.max(value, valueMax); + valueTotal += value; + } + } + } // adjust the range of all objects + + + if (valueMin !== undefined && valueMax !== undefined) { + for (id in obj) { + if (obj.hasOwnProperty(id)) { + obj[id].setValueRange(valueMin, valueMax, valueTotal); + } + } + } + }; + /** + * Returns true when the Network is active. + * @returns {boolean} + */ + + + Network.prototype.isActive = function () { + return !this.activator || this.activator.active; + }; + + Network.prototype.setSize = function () { + return this.canvas.setSize.apply(this.canvas, arguments); + }; + + Network.prototype.canvasToDOM = function () { + return this.canvas.canvasToDOM.apply(this.canvas, arguments); + }; + + Network.prototype.DOMtoCanvas = function () { + return this.canvas.DOMtoCanvas.apply(this.canvas, arguments); + }; + /** + * Nodes can be in clusters. Clusters can also be in clusters. This function returns and array of + * nodeIds showing where the node is. + * + * If any nodeId in the chain, especially the first passed in as a parameter, is not present in + * the current nodes list, an empty array is returned. + * + * Example: + * cluster 'A' contains cluster 'B', + * cluster 'B' contains cluster 'C', + * cluster 'C' contains node 'fred'. + * `jsnetwork.clustering.findNode('fred')` will return `['A','B','C','fred']`. + * + * @param {string|number} nodeId + * @returns {Array} + */ + + + Network.prototype.findNode = function () { + return this.clustering.findNode.apply(this.clustering, arguments); + }; + + Network.prototype.isCluster = function () { + return this.clustering.isCluster.apply(this.clustering, arguments); + }; + + Network.prototype.openCluster = function () { + return this.clustering.openCluster.apply(this.clustering, arguments); + }; + + Network.prototype.cluster = function () { + return this.clustering.cluster.apply(this.clustering, arguments); + }; + + Network.prototype.getNodesInCluster = function () { + return this.clustering.getNodesInCluster.apply(this.clustering, arguments); + }; + + Network.prototype.clusterByConnection = function () { + return this.clustering.clusterByConnection.apply(this.clustering, arguments); + }; + + Network.prototype.clusterByHubsize = function () { + return this.clustering.clusterByHubsize.apply(this.clustering, arguments); + }; + /** + * This method will cluster all nodes with 1 edge with their respective connected node. + * The options object is explained in full
below. + * + * @param {object} [options] + * @returns {undefined} + */ + + + Network.prototype.clusterOutliers = function () { + return this.clustering.clusterOutliers.apply(this.clustering, arguments); + }; + + Network.prototype.getSeed = function () { + return this.layoutEngine.getSeed.apply(this.layoutEngine, arguments); + }; + + Network.prototype.enableEditMode = function () { + return this.manipulation.enableEditMode.apply(this.manipulation, arguments); + }; + + Network.prototype.disableEditMode = function () { + return this.manipulation.disableEditMode.apply(this.manipulation, arguments); + }; + + Network.prototype.addNodeMode = function () { + return this.manipulation.addNodeMode.apply(this.manipulation, arguments); + }; + + Network.prototype.editNode = function () { + return this.manipulation.editNode.apply(this.manipulation, arguments); + }; + + Network.prototype.editNodeMode = function () { + console.log("Deprecated: Please use editNode instead of editNodeMode."); + return this.manipulation.editNode.apply(this.manipulation, arguments); + }; + + Network.prototype.addEdgeMode = function () { + return this.manipulation.addEdgeMode.apply(this.manipulation, arguments); + }; + + Network.prototype.editEdgeMode = function () { + return this.manipulation.editEdgeMode.apply(this.manipulation, arguments); + }; + + Network.prototype.deleteSelected = function () { + return this.manipulation.deleteSelected.apply(this.manipulation, arguments); + }; + + Network.prototype.getPositions = function () { + return this.nodesHandler.getPositions.apply(this.nodesHandler, arguments); + }; + + Network.prototype.storePositions = function () { + return this.nodesHandler.storePositions.apply(this.nodesHandler, arguments); + }; + + Network.prototype.moveNode = function () { + return this.nodesHandler.moveNode.apply(this.nodesHandler, arguments); + }; + + Network.prototype.getBoundingBox = function () { + return this.nodesHandler.getBoundingBox.apply(this.nodesHandler, arguments); + }; + + Network.prototype.getConnectedNodes = function (objectId) { + if (this.body.nodes[objectId] !== undefined) { + return this.nodesHandler.getConnectedNodes.apply(this.nodesHandler, arguments); + } else { + return this.edgesHandler.getConnectedNodes.apply(this.edgesHandler, arguments); + } + }; + + Network.prototype.getConnectedEdges = function () { + return this.nodesHandler.getConnectedEdges.apply(this.nodesHandler, arguments); + }; + + Network.prototype.startSimulation = function () { + return this.physics.startSimulation.apply(this.physics, arguments); + }; + + Network.prototype.stopSimulation = function () { + return this.physics.stopSimulation.apply(this.physics, arguments); + }; + + Network.prototype.stabilize = function () { + return this.physics.stabilize.apply(this.physics, arguments); + }; + + Network.prototype.getSelection = function () { + return this.selectionHandler.getSelection.apply(this.selectionHandler, arguments); + }; + + Network.prototype.setSelection = function () { + return this.selectionHandler.setSelection.apply(this.selectionHandler, arguments); + }; + + Network.prototype.getSelectedNodes = function () { + return this.selectionHandler.getSelectedNodes.apply(this.selectionHandler, arguments); + }; + + Network.prototype.getSelectedEdges = function () { + return this.selectionHandler.getSelectedEdges.apply(this.selectionHandler, arguments); + }; + + Network.prototype.getNodeAt = function () { + var node = this.selectionHandler.getNodeAt.apply(this.selectionHandler, arguments); + + if (node !== undefined && node.id !== undefined) { + return node.id; + } + + return node; + }; + + Network.prototype.getEdgeAt = function () { + var edge = this.selectionHandler.getEdgeAt.apply(this.selectionHandler, arguments); + + if (edge !== undefined && edge.id !== undefined) { + return edge.id; + } + + return edge; + }; + + Network.prototype.selectNodes = function () { + return this.selectionHandler.selectNodes.apply(this.selectionHandler, arguments); + }; + + Network.prototype.selectEdges = function () { + return this.selectionHandler.selectEdges.apply(this.selectionHandler, arguments); + }; + + Network.prototype.unselectAll = function () { + this.selectionHandler.unselectAll.apply(this.selectionHandler, arguments); + this.redraw(); + }; + + Network.prototype.redraw = function () { + return this.renderer.redraw.apply(this.renderer, arguments); + }; + + Network.prototype.getScale = function () { + return this.view.getScale.apply(this.view, arguments); + }; + + Network.prototype.getViewPosition = function () { + return this.view.getViewPosition.apply(this.view, arguments); + }; + + Network.prototype.fit = function () { + return this.view.fit.apply(this.view, arguments); + }; + + Network.prototype.moveTo = function () { + return this.view.moveTo.apply(this.view, arguments); + }; + + Network.prototype.focus = function () { + return this.view.focus.apply(this.view, arguments); + }; + + Network.prototype.releaseNode = function () { + return this.view.releaseNode.apply(this.view, arguments); + }; + + Network.prototype.getOptionsFromConfigurator = function () { + var options = {}; + + if (this.configurator) { + options = this.configurator.getOptions.apply(this.configurator); + } + + return options; + }; + + var DOMutil = createCommonjsModule$2(function (module, exports) { + // DOM utility methods + + /** + * this prepares the JSON container for allocating SVG elements + * @param {Object} JSONcontainer + * @private + */ + exports.prepareElements = function (JSONcontainer) { + // cleanup the redundant svgElements; + for (var elementType in JSONcontainer) { + if (JSONcontainer.hasOwnProperty(elementType)) { + JSONcontainer[elementType].redundant = JSONcontainer[elementType].used; + JSONcontainer[elementType].used = []; + } + } + }; + /** + * this cleans up all the unused SVG elements. By asking for the parentNode, we only need to supply the JSON container from + * which to remove the redundant elements. + * + * @param {Object} JSONcontainer + * @private + */ + + + exports.cleanupElements = function (JSONcontainer) { + // cleanup the redundant svgElements; + for (var elementType in JSONcontainer) { + if (JSONcontainer.hasOwnProperty(elementType)) { + if (JSONcontainer[elementType].redundant) { + for (var i = 0; i < JSONcontainer[elementType].redundant.length; i++) { + JSONcontainer[elementType].redundant[i].parentNode.removeChild(JSONcontainer[elementType].redundant[i]); + } + + JSONcontainer[elementType].redundant = []; + } + } + } + }; + /** + * Ensures that all elements are removed first up so they can be recreated cleanly + * @param {Object} JSONcontainer + */ + + + exports.resetElements = function (JSONcontainer) { + exports.prepareElements(JSONcontainer); + exports.cleanupElements(JSONcontainer); + exports.prepareElements(JSONcontainer); + }; + /** + * Allocate or generate an SVG element if needed. Store a reference to it in the JSON container and draw it in the svgContainer + * the JSON container and the SVG container have to be supplied so other svg containers (like the legend) can use this. + * + * @param {string} elementType + * @param {Object} JSONcontainer + * @param {Object} svgContainer + * @returns {Element} + * @private + */ + + + exports.getSVGElement = function (elementType, JSONcontainer, svgContainer) { + var element; // allocate SVG element, if it doesnt yet exist, create one. + + if (JSONcontainer.hasOwnProperty(elementType)) { + // this element has been created before + // check if there is an redundant element + if (JSONcontainer[elementType].redundant.length > 0) { + element = JSONcontainer[elementType].redundant[0]; + JSONcontainer[elementType].redundant.shift(); + } else { + // create a new element and add it to the SVG + element = document.createElementNS('http://www.w3.org/2000/svg', elementType); + svgContainer.appendChild(element); + } + } else { + // create a new element and add it to the SVG, also create a new object in the svgElements to keep track of it. + element = document.createElementNS('http://www.w3.org/2000/svg', elementType); + JSONcontainer[elementType] = { + used: [], + redundant: [] + }; + svgContainer.appendChild(element); + } + + JSONcontainer[elementType].used.push(element); + return element; + }; + /** + * Allocate or generate an SVG element if needed. Store a reference to it in the JSON container and draw it in the svgContainer + * the JSON container and the SVG container have to be supplied so other svg containers (like the legend) can use this. + * + * @param {string} elementType + * @param {Object} JSONcontainer + * @param {Element} DOMContainer + * @param {Element} insertBefore + * @returns {*} + */ + + + exports.getDOMElement = function (elementType, JSONcontainer, DOMContainer, insertBefore) { + var element; // allocate DOM element, if it doesnt yet exist, create one. + + if (JSONcontainer.hasOwnProperty(elementType)) { + // this element has been created before + // check if there is an redundant element + if (JSONcontainer[elementType].redundant.length > 0) { + element = JSONcontainer[elementType].redundant[0]; + JSONcontainer[elementType].redundant.shift(); + } else { + // create a new element and add it to the SVG + element = document.createElement(elementType); + + if (insertBefore !== undefined) { + DOMContainer.insertBefore(element, insertBefore); + } else { + DOMContainer.appendChild(element); + } + } + } else { + // create a new element and add it to the SVG, also create a new object in the svgElements to keep track of it. + element = document.createElement(elementType); + JSONcontainer[elementType] = { + used: [], + redundant: [] + }; + + if (insertBefore !== undefined) { + DOMContainer.insertBefore(element, insertBefore); + } else { + DOMContainer.appendChild(element); + } + } + + JSONcontainer[elementType].used.push(element); + return element; + }; + /** + * Draw a point object. This is a separate function because it can also be called by the legend. + * The reason the JSONcontainer and the target SVG svgContainer have to be supplied is so the legend can use these functions + * as well. + * + * @param {number} x + * @param {number} y + * @param {Object} groupTemplate: A template containing the necessary information to draw the datapoint e.g., {style: 'circle', size: 5, className: 'className' } + * @param {Object} JSONcontainer + * @param {Object} svgContainer + * @param {Object} labelObj + * @returns {vis.PointItem} + */ + + + exports.drawPoint = function (x, y, groupTemplate, JSONcontainer, svgContainer, labelObj) { + var point; + + if (groupTemplate.style == 'circle') { + point = exports.getSVGElement('circle', JSONcontainer, svgContainer); + point.setAttributeNS(null, "cx", x); + point.setAttributeNS(null, "cy", y); + point.setAttributeNS(null, "r", 0.5 * groupTemplate.size); + } else { + point = exports.getSVGElement('rect', JSONcontainer, svgContainer); + point.setAttributeNS(null, "x", x - 0.5 * groupTemplate.size); + point.setAttributeNS(null, "y", y - 0.5 * groupTemplate.size); + point.setAttributeNS(null, "width", groupTemplate.size); + point.setAttributeNS(null, "height", groupTemplate.size); + } + + if (groupTemplate.styles !== undefined) { + point.setAttributeNS(null, "style", groupTemplate.styles); + } + + point.setAttributeNS(null, "class", groupTemplate.className + " vis-point"); //handle label + + if (labelObj) { + var label = exports.getSVGElement('text', JSONcontainer, svgContainer); + + if (labelObj.xOffset) { + x = x + labelObj.xOffset; + } + + if (labelObj.yOffset) { + y = y + labelObj.yOffset; + } + + if (labelObj.content) { + label.textContent = labelObj.content; + } + + if (labelObj.className) { + label.setAttributeNS(null, "class", labelObj.className + " vis-label"); + } + + label.setAttributeNS(null, "x", x); + label.setAttributeNS(null, "y", y); + } + + return point; + }; + /** + * draw a bar SVG element centered on the X coordinate + * + * @param {number} x + * @param {number} y + * @param {number} width + * @param {number} height + * @param {string} className + * @param {Object} JSONcontainer + * @param {Object} svgContainer + * @param {string} style + */ + + + exports.drawBar = function (x, y, width, height, className, JSONcontainer, svgContainer, style) { + if (height != 0) { + if (height < 0) { + height *= -1; + y -= height; + } + + var rect = exports.getSVGElement('rect', JSONcontainer, svgContainer); + rect.setAttributeNS(null, "x", x - 0.5 * width); + rect.setAttributeNS(null, "y", y); + rect.setAttributeNS(null, "width", width); + rect.setAttributeNS(null, "height", height); + rect.setAttributeNS(null, "class", className); + + if (style) { + rect.setAttributeNS(null, "style", style); + } + } + }; + }); + var DOMutil_1 = DOMutil.prepareElements; + var DOMutil_2 = DOMutil.cleanupElements; + var DOMutil_3 = DOMutil.resetElements; + var DOMutil_4 = DOMutil.getSVGElement; + var DOMutil_5 = DOMutil.getDOMElement; + var DOMutil_6 = DOMutil.drawPoint; + var DOMutil_7 = DOMutil.drawBar; + + var DOMutil$1 = /*#__PURE__*/Object.freeze({ + 'default': DOMutil, + __moduleExports: DOMutil, + prepareElements: DOMutil_1, + cleanupElements: DOMutil_2, + resetElements: DOMutil_3, + getSVGElement: DOMutil_4, + getDOMElement: DOMutil_5, + drawPoint: DOMutil_6, + drawBar: DOMutil_7 + }); + + var moment$2 = createCommonjsModule$2(function (module, exports) { + + (function (global, factory) { + module.exports = factory() ; + })(commonjsGlobal$2, function () { + + var hookCallback; + + function hooks() { + return hookCallback.apply(null, arguments); + } // This is done to register the method called with moment() + // without creating circular dependencies. + + + function setHookCallback(callback) { + hookCallback = callback; + } + + function isArray(input) { + return input instanceof Array || Object.prototype.toString.call(input) === '[object Array]'; + } + + function isObject(input) { + // IE8 will treat undefined and null as object if it wasn't for + // input != null + return input != null && Object.prototype.toString.call(input) === '[object Object]'; + } + + function isObjectEmpty(obj) { + if (Object.getOwnPropertyNames) { + return Object.getOwnPropertyNames(obj).length === 0; + } else { + var k; + + for (k in obj) { + if (obj.hasOwnProperty(k)) { + return false; + } + } + + return true; + } + } + + function isUndefined(input) { + return input === void 0; + } + + function isNumber(input) { + return typeof input === 'number' || Object.prototype.toString.call(input) === '[object Number]'; + } + + function isDate(input) { + return input instanceof Date || Object.prototype.toString.call(input) === '[object Date]'; + } + + function map(arr, fn) { + var res = [], + i; + + for (i = 0; i < arr.length; ++i) { + res.push(fn(arr[i], i)); + } + + return res; + } + + function hasOwnProp(a, b) { + return Object.prototype.hasOwnProperty.call(a, b); + } + + function extend(a, b) { + for (var i in b) { + if (hasOwnProp(b, i)) { + a[i] = b[i]; + } + } + + if (hasOwnProp(b, 'toString')) { + a.toString = b.toString; + } + + if (hasOwnProp(b, 'valueOf')) { + a.valueOf = b.valueOf; + } + + return a; + } + + function createUTC(input, format, locale, strict) { + return createLocalOrUTC(input, format, locale, strict, true).utc(); + } + + function defaultParsingFlags() { + // We need to deep clone this object. + return { + empty: false, + unusedTokens: [], + unusedInput: [], + overflow: -2, + charsLeftOver: 0, + nullInput: false, + invalidMonth: null, + invalidFormat: false, + userInvalidated: false, + iso: false, + parsedDateParts: [], + meridiem: null, + rfc2822: false, + weekdayMismatch: false + }; + } + + function getParsingFlags(m) { + if (m._pf == null) { + m._pf = defaultParsingFlags(); + } + + return m._pf; + } + + var some; + + if (Array.prototype.some) { + some = Array.prototype.some; + } else { + some = function (fun) { + var t = Object(this); + var len = t.length >>> 0; + + for (var i = 0; i < len; i++) { + if (i in t && fun.call(this, t[i], i, t)) { + return true; + } + } + + return false; + }; + } + + function isValid(m) { + if (m._isValid == null) { + var flags = getParsingFlags(m); + var parsedParts = some.call(flags.parsedDateParts, function (i) { + return i != null; + }); + var isNowValid = !isNaN(m._d.getTime()) && flags.overflow < 0 && !flags.empty && !flags.invalidMonth && !flags.invalidWeekday && !flags.weekdayMismatch && !flags.nullInput && !flags.invalidFormat && !flags.userInvalidated && (!flags.meridiem || flags.meridiem && parsedParts); + + if (m._strict) { + isNowValid = isNowValid && flags.charsLeftOver === 0 && flags.unusedTokens.length === 0 && flags.bigHour === undefined; + } + + if (Object.isFrozen == null || !Object.isFrozen(m)) { + m._isValid = isNowValid; + } else { + return isNowValid; + } + } + + return m._isValid; + } + + function createInvalid(flags) { + var m = createUTC(NaN); + + if (flags != null) { + extend(getParsingFlags(m), flags); + } else { + getParsingFlags(m).userInvalidated = true; + } + + return m; + } // Plugins that add properties should also add the key here (null value), + // so we can properly clone ourselves. + + + var momentProperties = hooks.momentProperties = []; + + function copyConfig(to, from) { + var i, prop, val; + + if (!isUndefined(from._isAMomentObject)) { + to._isAMomentObject = from._isAMomentObject; + } + + if (!isUndefined(from._i)) { + to._i = from._i; + } + + if (!isUndefined(from._f)) { + to._f = from._f; + } + + if (!isUndefined(from._l)) { + to._l = from._l; + } + + if (!isUndefined(from._strict)) { + to._strict = from._strict; + } + + if (!isUndefined(from._tzm)) { + to._tzm = from._tzm; + } + + if (!isUndefined(from._isUTC)) { + to._isUTC = from._isUTC; + } + + if (!isUndefined(from._offset)) { + to._offset = from._offset; + } + + if (!isUndefined(from._pf)) { + to._pf = getParsingFlags(from); + } + + if (!isUndefined(from._locale)) { + to._locale = from._locale; + } + + if (momentProperties.length > 0) { + for (i = 0; i < momentProperties.length; i++) { + prop = momentProperties[i]; + val = from[prop]; + + if (!isUndefined(val)) { + to[prop] = val; + } + } + } + + return to; + } + + var updateInProgress = false; // Moment prototype object + + function Moment(config) { + copyConfig(this, config); + this._d = new Date(config._d != null ? config._d.getTime() : NaN); + + if (!this.isValid()) { + this._d = new Date(NaN); + } // Prevent infinite loop in case updateOffset creates new moment + // objects. + + + if (updateInProgress === false) { + updateInProgress = true; + hooks.updateOffset(this); + updateInProgress = false; + } + } + + function isMoment(obj) { + return obj instanceof Moment || obj != null && obj._isAMomentObject != null; + } + + function absFloor(number) { + if (number < 0) { + // -0 -> 0 + return Math.ceil(number) || 0; + } else { + return Math.floor(number); + } + } + + function toInt(argumentForCoercion) { + var coercedNumber = +argumentForCoercion, + value = 0; + + if (coercedNumber !== 0 && isFinite(coercedNumber)) { + value = absFloor(coercedNumber); + } + + return value; + } // compare two arrays, return the number of differences + + + function compareArrays(array1, array2, dontConvert) { + var len = Math.min(array1.length, array2.length), + lengthDiff = Math.abs(array1.length - array2.length), + diffs = 0, + i; + + for (i = 0; i < len; i++) { + if (dontConvert && array1[i] !== array2[i] || !dontConvert && toInt(array1[i]) !== toInt(array2[i])) { + diffs++; + } + } + + return diffs + lengthDiff; + } + + function warn(msg) { + if (hooks.suppressDeprecationWarnings === false && typeof console !== 'undefined' && console.warn) { + console.warn('Deprecation warning: ' + msg); + } + } + + function deprecate(msg, fn) { + var firstTime = true; + return extend(function () { + if (hooks.deprecationHandler != null) { + hooks.deprecationHandler(null, msg); + } + + if (firstTime) { + var args = []; + var arg; + + for (var i = 0; i < arguments.length; i++) { + arg = ''; + + if (typeof arguments[i] === 'object') { + arg += '\n[' + i + '] '; + + for (var key in arguments[0]) { + arg += key + ': ' + arguments[0][key] + ', '; + } + + arg = arg.slice(0, -2); // Remove trailing comma and space + } else { + arg = arguments[i]; + } + + args.push(arg); + } + + warn(msg + '\nArguments: ' + Array.prototype.slice.call(args).join('') + '\n' + new Error().stack); + firstTime = false; + } + + return fn.apply(this, arguments); + }, fn); + } + + var deprecations = {}; + + function deprecateSimple(name, msg) { + if (hooks.deprecationHandler != null) { + hooks.deprecationHandler(name, msg); + } + + if (!deprecations[name]) { + warn(msg); + deprecations[name] = true; + } + } + + hooks.suppressDeprecationWarnings = false; + hooks.deprecationHandler = null; + + function isFunction(input) { + return input instanceof Function || Object.prototype.toString.call(input) === '[object Function]'; + } + + function set(config) { + var prop, i; + + for (i in config) { + prop = config[i]; + + if (isFunction(prop)) { + this[i] = prop; + } else { + this['_' + i] = prop; + } + } + + this._config = config; // Lenient ordinal parsing accepts just a number in addition to + // number + (possibly) stuff coming from _dayOfMonthOrdinalParse. + // TODO: Remove "ordinalParse" fallback in next major release. + + this._dayOfMonthOrdinalParseLenient = new RegExp((this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) + '|' + /\d{1,2}/.source); + } + + function mergeConfigs(parentConfig, childConfig) { + var res = extend({}, parentConfig), + prop; + + for (prop in childConfig) { + if (hasOwnProp(childConfig, prop)) { + if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) { + res[prop] = {}; + extend(res[prop], parentConfig[prop]); + extend(res[prop], childConfig[prop]); + } else if (childConfig[prop] != null) { + res[prop] = childConfig[prop]; + } else { + delete res[prop]; + } + } + } + + for (prop in parentConfig) { + if (hasOwnProp(parentConfig, prop) && !hasOwnProp(childConfig, prop) && isObject(parentConfig[prop])) { + // make sure changes to properties don't modify parent config + res[prop] = extend({}, res[prop]); + } + } + + return res; + } + + function Locale(config) { + if (config != null) { + this.set(config); + } + } + + var keys; + + if (Object.keys) { + keys = Object.keys; + } else { + keys = function (obj) { + var i, + res = []; + + for (i in obj) { + if (hasOwnProp(obj, i)) { + res.push(i); + } + } + + return res; + }; + } + + var defaultCalendar = { + sameDay: '[Today at] LT', + nextDay: '[Tomorrow at] LT', + nextWeek: 'dddd [at] LT', + lastDay: '[Yesterday at] LT', + lastWeek: '[Last] dddd [at] LT', + sameElse: 'L' + }; + + function calendar(key, mom, now) { + var output = this._calendar[key] || this._calendar['sameElse']; + return isFunction(output) ? output.call(mom, now) : output; + } + + var defaultLongDateFormat = { + LTS: 'h:mm:ss A', + LT: 'h:mm A', + L: 'MM/DD/YYYY', + LL: 'MMMM D, YYYY', + LLL: 'MMMM D, YYYY h:mm A', + LLLL: 'dddd, MMMM D, YYYY h:mm A' + }; + + function longDateFormat(key) { + var format = this._longDateFormat[key], + formatUpper = this._longDateFormat[key.toUpperCase()]; + + if (format || !formatUpper) { + return format; + } + + this._longDateFormat[key] = formatUpper.replace(/MMMM|MM|DD|dddd/g, function (val) { + return val.slice(1); + }); + return this._longDateFormat[key]; + } + + var defaultInvalidDate = 'Invalid date'; + + function invalidDate() { + return this._invalidDate; + } + + var defaultOrdinal = '%d'; + var defaultDayOfMonthOrdinalParse = /\d{1,2}/; + + function ordinal(number) { + return this._ordinal.replace('%d', number); + } + + var defaultRelativeTime = { + future: 'in %s', + past: '%s ago', + s: 'a few seconds', + ss: '%d seconds', + m: 'a minute', + mm: '%d minutes', + h: 'an hour', + hh: '%d hours', + d: 'a day', + dd: '%d days', + M: 'a month', + MM: '%d months', + y: 'a year', + yy: '%d years' + }; + + function relativeTime(number, withoutSuffix, string, isFuture) { + var output = this._relativeTime[string]; + return isFunction(output) ? output(number, withoutSuffix, string, isFuture) : output.replace(/%d/i, number); + } + + function pastFuture(diff, output) { + var format = this._relativeTime[diff > 0 ? 'future' : 'past']; + return isFunction(format) ? format(output) : format.replace(/%s/i, output); + } + + var aliases = {}; + + function addUnitAlias(unit, shorthand) { + var lowerCase = unit.toLowerCase(); + aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit; + } + + function normalizeUnits(units) { + return typeof units === 'string' ? aliases[units] || aliases[units.toLowerCase()] : undefined; + } + + function normalizeObjectUnits(inputObject) { + var normalizedInput = {}, + normalizedProp, + prop; + + for (prop in inputObject) { + if (hasOwnProp(inputObject, prop)) { + normalizedProp = normalizeUnits(prop); + + if (normalizedProp) { + normalizedInput[normalizedProp] = inputObject[prop]; + } + } + } + + return normalizedInput; + } + + var priorities = {}; + + function addUnitPriority(unit, priority) { + priorities[unit] = priority; + } + + function getPrioritizedUnits(unitsObj) { + var units = []; + + for (var u in unitsObj) { + units.push({ + unit: u, + priority: priorities[u] + }); + } + + units.sort(function (a, b) { + return a.priority - b.priority; + }); + return units; + } + + function zeroFill(number, targetLength, forceSign) { + var absNumber = '' + Math.abs(number), + zerosToFill = targetLength - absNumber.length, + sign = number >= 0; + return (sign ? forceSign ? '+' : '' : '-') + Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) + absNumber; + } + + var formattingTokens = /(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g; + var localFormattingTokens = /(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g; + var formatFunctions = {}; + var formatTokenFunctions = {}; // token: 'M' + // padded: ['MM', 2] + // ordinal: 'Mo' + // callback: function () { this.month() + 1 } + + function addFormatToken(token, padded, ordinal, callback) { + var func = callback; + + if (typeof callback === 'string') { + func = function () { + return this[callback](); + }; + } + + if (token) { + formatTokenFunctions[token] = func; + } + + if (padded) { + formatTokenFunctions[padded[0]] = function () { + return zeroFill(func.apply(this, arguments), padded[1], padded[2]); + }; + } + + if (ordinal) { + formatTokenFunctions[ordinal] = function () { + return this.localeData().ordinal(func.apply(this, arguments), token); + }; + } + } + + function removeFormattingTokens(input) { + if (input.match(/\[[\s\S]/)) { + return input.replace(/^\[|\]$/g, ''); + } + + return input.replace(/\\/g, ''); + } + + function makeFormatFunction(format) { + var array = format.match(formattingTokens), + i, + length; + + for (i = 0, length = array.length; i < length; i++) { + if (formatTokenFunctions[array[i]]) { + array[i] = formatTokenFunctions[array[i]]; + } else { + array[i] = removeFormattingTokens(array[i]); + } + } + + return function (mom) { + var output = '', + i; + + for (i = 0; i < length; i++) { + output += isFunction(array[i]) ? array[i].call(mom, format) : array[i]; + } + + return output; + }; + } // format date using native date object + + + function formatMoment(m, format) { + if (!m.isValid()) { + return m.localeData().invalidDate(); + } + + format = expandFormat(format, m.localeData()); + formatFunctions[format] = formatFunctions[format] || makeFormatFunction(format); + return formatFunctions[format](m); + } + + function expandFormat(format, locale) { + var i = 5; + + function replaceLongDateFormatTokens(input) { + return locale.longDateFormat(input) || input; + } + + localFormattingTokens.lastIndex = 0; + + while (i >= 0 && localFormattingTokens.test(format)) { + format = format.replace(localFormattingTokens, replaceLongDateFormatTokens); + localFormattingTokens.lastIndex = 0; + i -= 1; + } + + return format; + } + + var match1 = /\d/; // 0 - 9 + + var match2 = /\d\d/; // 00 - 99 + + var match3 = /\d{3}/; // 000 - 999 + + var match4 = /\d{4}/; // 0000 - 9999 + + var match6 = /[+-]?\d{6}/; // -999999 - 999999 + + var match1to2 = /\d\d?/; // 0 - 99 + + var match3to4 = /\d\d\d\d?/; // 999 - 9999 + + var match5to6 = /\d\d\d\d\d\d?/; // 99999 - 999999 + + var match1to3 = /\d{1,3}/; // 0 - 999 + + var match1to4 = /\d{1,4}/; // 0 - 9999 + + var match1to6 = /[+-]?\d{1,6}/; // -999999 - 999999 + + var matchUnsigned = /\d+/; // 0 - inf + + var matchSigned = /[+-]?\d+/; // -inf - inf + + var matchOffset = /Z|[+-]\d\d:?\d\d/gi; // +00:00 -00:00 +0000 -0000 or Z + + var matchShortOffset = /Z|[+-]\d\d(?::?\d\d)?/gi; // +00 -00 +00:00 -00:00 +0000 -0000 or Z + + var matchTimestamp = /[+-]?\d+(\.\d{1,3})?/; // 123456789 123456789.123 + // any word (or two) characters or numbers including two/three word month in arabic. + // includes scottish gaelic two word and hyphenated months + + var matchWord = /[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i; + var regexes = {}; + + function addRegexToken(token, regex, strictRegex) { + regexes[token] = isFunction(regex) ? regex : function (isStrict, localeData) { + return isStrict && strictRegex ? strictRegex : regex; + }; + } + + function getParseRegexForToken(token, config) { + if (!hasOwnProp(regexes, token)) { + return new RegExp(unescapeFormat(token)); + } + + return regexes[token](config._strict, config._locale); + } // Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript + + + function unescapeFormat(s) { + return regexEscape(s.replace('\\', '').replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g, function (matched, p1, p2, p3, p4) { + return p1 || p2 || p3 || p4; + })); + } + + function regexEscape(s) { + return s.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&'); + } + + var tokens = {}; + + function addParseToken(token, callback) { + var i, + func = callback; + + if (typeof token === 'string') { + token = [token]; + } + + if (isNumber(callback)) { + func = function (input, array) { + array[callback] = toInt(input); + }; + } + + for (i = 0; i < token.length; i++) { + tokens[token[i]] = func; + } + } + + function addWeekParseToken(token, callback) { + addParseToken(token, function (input, array, config, token) { + config._w = config._w || {}; + callback(input, config._w, config, token); + }); + } + + function addTimeToArrayFromToken(token, input, config) { + if (input != null && hasOwnProp(tokens, token)) { + tokens[token](input, config._a, config, token); + } + } + + var YEAR = 0; + var MONTH = 1; + var DATE = 2; + var HOUR = 3; + var MINUTE = 4; + var SECOND = 5; + var MILLISECOND = 6; + var WEEK = 7; + var WEEKDAY = 8; // FORMATTING + + addFormatToken('Y', 0, 0, function () { + var y = this.year(); + return y <= 9999 ? '' + y : '+' + y; + }); + addFormatToken(0, ['YY', 2], 0, function () { + return this.year() % 100; + }); + addFormatToken(0, ['YYYY', 4], 0, 'year'); + addFormatToken(0, ['YYYYY', 5], 0, 'year'); + addFormatToken(0, ['YYYYYY', 6, true], 0, 'year'); // ALIASES + + addUnitAlias('year', 'y'); // PRIORITIES + + addUnitPriority('year', 1); // PARSING + + addRegexToken('Y', matchSigned); + addRegexToken('YY', match1to2, match2); + addRegexToken('YYYY', match1to4, match4); + addRegexToken('YYYYY', match1to6, match6); + addRegexToken('YYYYYY', match1to6, match6); + addParseToken(['YYYYY', 'YYYYYY'], YEAR); + addParseToken('YYYY', function (input, array) { + array[YEAR] = input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input); + }); + addParseToken('YY', function (input, array) { + array[YEAR] = hooks.parseTwoDigitYear(input); + }); + addParseToken('Y', function (input, array) { + array[YEAR] = parseInt(input, 10); + }); // HELPERS + + function daysInYear(year) { + return isLeapYear(year) ? 366 : 365; + } + + function isLeapYear(year) { + return year % 4 === 0 && year % 100 !== 0 || year % 400 === 0; + } // HOOKS + + + hooks.parseTwoDigitYear = function (input) { + return toInt(input) + (toInt(input) > 68 ? 1900 : 2000); + }; // MOMENTS + + + var getSetYear = makeGetSet('FullYear', true); + + function getIsLeapYear() { + return isLeapYear(this.year()); + } + + function makeGetSet(unit, keepTime) { + return function (value) { + if (value != null) { + set$1(this, unit, value); + hooks.updateOffset(this, keepTime); + return this; + } else { + return get(this, unit); + } + }; + } + + function get(mom, unit) { + return mom.isValid() ? mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]() : NaN; + } + + function set$1(mom, unit, value) { + if (mom.isValid() && !isNaN(value)) { + if (unit === 'FullYear' && isLeapYear(mom.year()) && mom.month() === 1 && mom.date() === 29) { + mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value, mom.month(), daysInMonth(value, mom.month())); + } else { + mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value); + } + } + } // MOMENTS + + + function stringGet(units) { + units = normalizeUnits(units); + + if (isFunction(this[units])) { + return this[units](); + } + + return this; + } + + function stringSet(units, value) { + if (typeof units === 'object') { + units = normalizeObjectUnits(units); + var prioritized = getPrioritizedUnits(units); + + for (var i = 0; i < prioritized.length; i++) { + this[prioritized[i].unit](units[prioritized[i].unit]); + } + } else { + units = normalizeUnits(units); + + if (isFunction(this[units])) { + return this[units](value); + } + } + + return this; + } + + function mod(n, x) { + return (n % x + x) % x; + } + + var indexOf; + + if (Array.prototype.indexOf) { + indexOf = Array.prototype.indexOf; + } else { + indexOf = function (o) { + // I know + var i; + + for (i = 0; i < this.length; ++i) { + if (this[i] === o) { + return i; + } + } + + return -1; + }; + } + + function daysInMonth(year, month) { + if (isNaN(year) || isNaN(month)) { + return NaN; + } + + var modMonth = mod(month, 12); + year += (month - modMonth) / 12; + return modMonth === 1 ? isLeapYear(year) ? 29 : 28 : 31 - modMonth % 7 % 2; + } // FORMATTING + + + addFormatToken('M', ['MM', 2], 'Mo', function () { + return this.month() + 1; + }); + addFormatToken('MMM', 0, 0, function (format) { + return this.localeData().monthsShort(this, format); + }); + addFormatToken('MMMM', 0, 0, function (format) { + return this.localeData().months(this, format); + }); // ALIASES + + addUnitAlias('month', 'M'); // PRIORITY + + addUnitPriority('month', 8); // PARSING + + addRegexToken('M', match1to2); + addRegexToken('MM', match1to2, match2); + addRegexToken('MMM', function (isStrict, locale) { + return locale.monthsShortRegex(isStrict); + }); + addRegexToken('MMMM', function (isStrict, locale) { + return locale.monthsRegex(isStrict); + }); + addParseToken(['M', 'MM'], function (input, array) { + array[MONTH] = toInt(input) - 1; + }); + addParseToken(['MMM', 'MMMM'], function (input, array, config, token) { + var month = config._locale.monthsParse(input, token, config._strict); // if we didn't find a month name, mark the date as invalid. + + + if (month != null) { + array[MONTH] = month; + } else { + getParsingFlags(config).invalidMonth = input; + } + }); // LOCALES + + var MONTHS_IN_FORMAT = /D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/; + var defaultLocaleMonths = 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'); + + function localeMonths(m, format) { + if (!m) { + return isArray(this._months) ? this._months : this._months['standalone']; + } + + return isArray(this._months) ? this._months[m.month()] : this._months[(this._months.isFormat || MONTHS_IN_FORMAT).test(format) ? 'format' : 'standalone'][m.month()]; + } + + var defaultLocaleMonthsShort = 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'); + + function localeMonthsShort(m, format) { + if (!m) { + return isArray(this._monthsShort) ? this._monthsShort : this._monthsShort['standalone']; + } + + return isArray(this._monthsShort) ? this._monthsShort[m.month()] : this._monthsShort[MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'][m.month()]; + } + + function handleStrictParse(monthName, format, strict) { + var i, + ii, + mom, + llc = monthName.toLocaleLowerCase(); + + if (!this._monthsParse) { + // this is not used + this._monthsParse = []; + this._longMonthsParse = []; + this._shortMonthsParse = []; + + for (i = 0; i < 12; ++i) { + mom = createUTC([2000, i]); + this._shortMonthsParse[i] = this.monthsShort(mom, '').toLocaleLowerCase(); + this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase(); + } + } + + if (strict) { + if (format === 'MMM') { + ii = indexOf.call(this._shortMonthsParse, llc); + return ii !== -1 ? ii : null; + } else { + ii = indexOf.call(this._longMonthsParse, llc); + return ii !== -1 ? ii : null; + } + } else { + if (format === 'MMM') { + ii = indexOf.call(this._shortMonthsParse, llc); + + if (ii !== -1) { + return ii; + } + + ii = indexOf.call(this._longMonthsParse, llc); + return ii !== -1 ? ii : null; + } else { + ii = indexOf.call(this._longMonthsParse, llc); + + if (ii !== -1) { + return ii; + } + + ii = indexOf.call(this._shortMonthsParse, llc); + return ii !== -1 ? ii : null; + } + } + } + + function localeMonthsParse(monthName, format, strict) { + var i, mom, regex; + + if (this._monthsParseExact) { + return handleStrictParse.call(this, monthName, format, strict); + } + + if (!this._monthsParse) { + this._monthsParse = []; + this._longMonthsParse = []; + this._shortMonthsParse = []; + } // TODO: add sorting + // Sorting makes sure if one month (or abbr) is a prefix of another + // see sorting in computeMonthsParse + + + for (i = 0; i < 12; i++) { + // make the regex if we don't have it already + mom = createUTC([2000, i]); + + if (strict && !this._longMonthsParse[i]) { + this._longMonthsParse[i] = new RegExp('^' + this.months(mom, '').replace('.', '') + '$', 'i'); + this._shortMonthsParse[i] = new RegExp('^' + this.monthsShort(mom, '').replace('.', '') + '$', 'i'); + } + + if (!strict && !this._monthsParse[i]) { + regex = '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, ''); + this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i'); + } // test the regex + + + if (strict && format === 'MMMM' && this._longMonthsParse[i].test(monthName)) { + return i; + } else if (strict && format === 'MMM' && this._shortMonthsParse[i].test(monthName)) { + return i; + } else if (!strict && this._monthsParse[i].test(monthName)) { + return i; + } + } + } // MOMENTS + + + function setMonth(mom, value) { + var dayOfMonth; + + if (!mom.isValid()) { + // No op + return mom; + } + + if (typeof value === 'string') { + if (/^\d+$/.test(value)) { + value = toInt(value); + } else { + value = mom.localeData().monthsParse(value); // TODO: Another silent failure? + + if (!isNumber(value)) { + return mom; + } + } + } + + dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value)); + + mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth); + + return mom; + } + + function getSetMonth(value) { + if (value != null) { + setMonth(this, value); + hooks.updateOffset(this, true); + return this; + } else { + return get(this, 'Month'); + } + } + + function getDaysInMonth() { + return daysInMonth(this.year(), this.month()); + } + + var defaultMonthsShortRegex = matchWord; + + function monthsShortRegex(isStrict) { + if (this._monthsParseExact) { + if (!hasOwnProp(this, '_monthsRegex')) { + computeMonthsParse.call(this); + } + + if (isStrict) { + return this._monthsShortStrictRegex; + } else { + return this._monthsShortRegex; + } + } else { + if (!hasOwnProp(this, '_monthsShortRegex')) { + this._monthsShortRegex = defaultMonthsShortRegex; + } + + return this._monthsShortStrictRegex && isStrict ? this._monthsShortStrictRegex : this._monthsShortRegex; + } + } + + var defaultMonthsRegex = matchWord; + + function monthsRegex(isStrict) { + if (this._monthsParseExact) { + if (!hasOwnProp(this, '_monthsRegex')) { + computeMonthsParse.call(this); + } + + if (isStrict) { + return this._monthsStrictRegex; + } else { + return this._monthsRegex; + } + } else { + if (!hasOwnProp(this, '_monthsRegex')) { + this._monthsRegex = defaultMonthsRegex; + } + + return this._monthsStrictRegex && isStrict ? this._monthsStrictRegex : this._monthsRegex; + } + } + + function computeMonthsParse() { + function cmpLenRev(a, b) { + return b.length - a.length; + } + + var shortPieces = [], + longPieces = [], + mixedPieces = [], + i, + mom; + + for (i = 0; i < 12; i++) { + // make the regex if we don't have it already + mom = createUTC([2000, i]); + shortPieces.push(this.monthsShort(mom, '')); + longPieces.push(this.months(mom, '')); + mixedPieces.push(this.months(mom, '')); + mixedPieces.push(this.monthsShort(mom, '')); + } // Sorting makes sure if one month (or abbr) is a prefix of another it + // will match the longer piece. + + + shortPieces.sort(cmpLenRev); + longPieces.sort(cmpLenRev); + mixedPieces.sort(cmpLenRev); + + for (i = 0; i < 12; i++) { + shortPieces[i] = regexEscape(shortPieces[i]); + longPieces[i] = regexEscape(longPieces[i]); + } + + for (i = 0; i < 24; i++) { + mixedPieces[i] = regexEscape(mixedPieces[i]); + } + + this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i'); + this._monthsShortRegex = this._monthsRegex; + this._monthsStrictRegex = new RegExp('^(' + longPieces.join('|') + ')', 'i'); + this._monthsShortStrictRegex = new RegExp('^(' + shortPieces.join('|') + ')', 'i'); + } + + function createDate(y, m, d, h, M, s, ms) { + // can't just apply() to create a date: + // https://stackoverflow.com/q/181348 + var date; // the date constructor remaps years 0-99 to 1900-1999 + + if (y < 100 && y >= 0) { + // preserve leap years using a full 400 year cycle, then reset + date = new Date(y + 400, m, d, h, M, s, ms); + + if (isFinite(date.getFullYear())) { + date.setFullYear(y); + } + } else { + date = new Date(y, m, d, h, M, s, ms); + } + + return date; + } + + function createUTCDate(y) { + var date; // the Date.UTC function remaps years 0-99 to 1900-1999 + + if (y < 100 && y >= 0) { + var args = Array.prototype.slice.call(arguments); // preserve leap years using a full 400 year cycle, then reset + + args[0] = y + 400; + date = new Date(Date.UTC.apply(null, args)); + + if (isFinite(date.getUTCFullYear())) { + date.setUTCFullYear(y); + } + } else { + date = new Date(Date.UTC.apply(null, arguments)); + } + + return date; + } // start-of-first-week - start-of-year + + + function firstWeekOffset(year, dow, doy) { + var // first-week day -- which january is always in the first week (4 for iso, 1 for other) + fwd = 7 + dow - doy, + // first-week day local weekday -- which local weekday is fwd + fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7; + return -fwdlw + fwd - 1; + } // https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday + + + function dayOfYearFromWeeks(year, week, weekday, dow, doy) { + var localWeekday = (7 + weekday - dow) % 7, + weekOffset = firstWeekOffset(year, dow, doy), + dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset, + resYear, + resDayOfYear; + + if (dayOfYear <= 0) { + resYear = year - 1; + resDayOfYear = daysInYear(resYear) + dayOfYear; + } else if (dayOfYear > daysInYear(year)) { + resYear = year + 1; + resDayOfYear = dayOfYear - daysInYear(year); + } else { + resYear = year; + resDayOfYear = dayOfYear; + } + + return { + year: resYear, + dayOfYear: resDayOfYear + }; + } + + function weekOfYear(mom, dow, doy) { + var weekOffset = firstWeekOffset(mom.year(), dow, doy), + week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1, + resWeek, + resYear; + + if (week < 1) { + resYear = mom.year() - 1; + resWeek = week + weeksInYear(resYear, dow, doy); + } else if (week > weeksInYear(mom.year(), dow, doy)) { + resWeek = week - weeksInYear(mom.year(), dow, doy); + resYear = mom.year() + 1; + } else { + resYear = mom.year(); + resWeek = week; + } + + return { + week: resWeek, + year: resYear + }; + } + + function weeksInYear(year, dow, doy) { + var weekOffset = firstWeekOffset(year, dow, doy), + weekOffsetNext = firstWeekOffset(year + 1, dow, doy); + return (daysInYear(year) - weekOffset + weekOffsetNext) / 7; + } // FORMATTING + + + addFormatToken('w', ['ww', 2], 'wo', 'week'); + addFormatToken('W', ['WW', 2], 'Wo', 'isoWeek'); // ALIASES + + addUnitAlias('week', 'w'); + addUnitAlias('isoWeek', 'W'); // PRIORITIES + + addUnitPriority('week', 5); + addUnitPriority('isoWeek', 5); // PARSING + + addRegexToken('w', match1to2); + addRegexToken('ww', match1to2, match2); + addRegexToken('W', match1to2); + addRegexToken('WW', match1to2, match2); + addWeekParseToken(['w', 'ww', 'W', 'WW'], function (input, week, config, token) { + week[token.substr(0, 1)] = toInt(input); + }); // HELPERS + // LOCALES + + function localeWeek(mom) { + return weekOfYear(mom, this._week.dow, this._week.doy).week; + } + + var defaultLocaleWeek = { + dow: 0, + // Sunday is the first day of the week. + doy: 6 // The week that contains Jan 6th is the first week of the year. + + }; + + function localeFirstDayOfWeek() { + return this._week.dow; + } + + function localeFirstDayOfYear() { + return this._week.doy; + } // MOMENTS + + + function getSetWeek(input) { + var week = this.localeData().week(this); + return input == null ? week : this.add((input - week) * 7, 'd'); + } + + function getSetISOWeek(input) { + var week = weekOfYear(this, 1, 4).week; + return input == null ? week : this.add((input - week) * 7, 'd'); + } // FORMATTING + + + addFormatToken('d', 0, 'do', 'day'); + addFormatToken('dd', 0, 0, function (format) { + return this.localeData().weekdaysMin(this, format); + }); + addFormatToken('ddd', 0, 0, function (format) { + return this.localeData().weekdaysShort(this, format); + }); + addFormatToken('dddd', 0, 0, function (format) { + return this.localeData().weekdays(this, format); + }); + addFormatToken('e', 0, 0, 'weekday'); + addFormatToken('E', 0, 0, 'isoWeekday'); // ALIASES + + addUnitAlias('day', 'd'); + addUnitAlias('weekday', 'e'); + addUnitAlias('isoWeekday', 'E'); // PRIORITY + + addUnitPriority('day', 11); + addUnitPriority('weekday', 11); + addUnitPriority('isoWeekday', 11); // PARSING + + addRegexToken('d', match1to2); + addRegexToken('e', match1to2); + addRegexToken('E', match1to2); + addRegexToken('dd', function (isStrict, locale) { + return locale.weekdaysMinRegex(isStrict); + }); + addRegexToken('ddd', function (isStrict, locale) { + return locale.weekdaysShortRegex(isStrict); + }); + addRegexToken('dddd', function (isStrict, locale) { + return locale.weekdaysRegex(isStrict); + }); + addWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) { + var weekday = config._locale.weekdaysParse(input, token, config._strict); // if we didn't get a weekday name, mark the date as invalid + + + if (weekday != null) { + week.d = weekday; + } else { + getParsingFlags(config).invalidWeekday = input; + } + }); + addWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) { + week[token] = toInt(input); + }); // HELPERS + + function parseWeekday(input, locale) { + if (typeof input !== 'string') { + return input; + } + + if (!isNaN(input)) { + return parseInt(input, 10); + } + + input = locale.weekdaysParse(input); + + if (typeof input === 'number') { + return input; + } + + return null; + } + + function parseIsoWeekday(input, locale) { + if (typeof input === 'string') { + return locale.weekdaysParse(input) % 7 || 7; + } + + return isNaN(input) ? null : input; + } // LOCALES + + + function shiftWeekdays(ws, n) { + return ws.slice(n, 7).concat(ws.slice(0, n)); + } + + var defaultLocaleWeekdays = 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'); + + function localeWeekdays(m, format) { + var weekdays = isArray(this._weekdays) ? this._weekdays : this._weekdays[m && m !== true && this._weekdays.isFormat.test(format) ? 'format' : 'standalone']; + return m === true ? shiftWeekdays(weekdays, this._week.dow) : m ? weekdays[m.day()] : weekdays; + } + + var defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'); + + function localeWeekdaysShort(m) { + return m === true ? shiftWeekdays(this._weekdaysShort, this._week.dow) : m ? this._weekdaysShort[m.day()] : this._weekdaysShort; + } + + var defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'); + + function localeWeekdaysMin(m) { + return m === true ? shiftWeekdays(this._weekdaysMin, this._week.dow) : m ? this._weekdaysMin[m.day()] : this._weekdaysMin; + } + + function handleStrictParse$1(weekdayName, format, strict) { + var i, + ii, + mom, + llc = weekdayName.toLocaleLowerCase(); + + if (!this._weekdaysParse) { + this._weekdaysParse = []; + this._shortWeekdaysParse = []; + this._minWeekdaysParse = []; + + for (i = 0; i < 7; ++i) { + mom = createUTC([2000, 1]).day(i); + this._minWeekdaysParse[i] = this.weekdaysMin(mom, '').toLocaleLowerCase(); + this._shortWeekdaysParse[i] = this.weekdaysShort(mom, '').toLocaleLowerCase(); + this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase(); + } + } + + if (strict) { + if (format === 'dddd') { + ii = indexOf.call(this._weekdaysParse, llc); + return ii !== -1 ? ii : null; + } else if (format === 'ddd') { + ii = indexOf.call(this._shortWeekdaysParse, llc); + return ii !== -1 ? ii : null; + } else { + ii = indexOf.call(this._minWeekdaysParse, llc); + return ii !== -1 ? ii : null; + } + } else { + if (format === 'dddd') { + ii = indexOf.call(this._weekdaysParse, llc); + + if (ii !== -1) { + return ii; + } + + ii = indexOf.call(this._shortWeekdaysParse, llc); + + if (ii !== -1) { + return ii; + } + + ii = indexOf.call(this._minWeekdaysParse, llc); + return ii !== -1 ? ii : null; + } else if (format === 'ddd') { + ii = indexOf.call(this._shortWeekdaysParse, llc); + + if (ii !== -1) { + return ii; + } + + ii = indexOf.call(this._weekdaysParse, llc); + + if (ii !== -1) { + return ii; + } + + ii = indexOf.call(this._minWeekdaysParse, llc); + return ii !== -1 ? ii : null; + } else { + ii = indexOf.call(this._minWeekdaysParse, llc); + + if (ii !== -1) { + return ii; + } + + ii = indexOf.call(this._weekdaysParse, llc); + + if (ii !== -1) { + return ii; + } + + ii = indexOf.call(this._shortWeekdaysParse, llc); + return ii !== -1 ? ii : null; + } + } + } + + function localeWeekdaysParse(weekdayName, format, strict) { + var i, mom, regex; + + if (this._weekdaysParseExact) { + return handleStrictParse$1.call(this, weekdayName, format, strict); + } + + if (!this._weekdaysParse) { + this._weekdaysParse = []; + this._minWeekdaysParse = []; + this._shortWeekdaysParse = []; + this._fullWeekdaysParse = []; + } + + for (i = 0; i < 7; i++) { + // make the regex if we don't have it already + mom = createUTC([2000, 1]).day(i); + + if (strict && !this._fullWeekdaysParse[i]) { + this._fullWeekdaysParse[i] = new RegExp('^' + this.weekdays(mom, '').replace('.', '\\.?') + '$', 'i'); + this._shortWeekdaysParse[i] = new RegExp('^' + this.weekdaysShort(mom, '').replace('.', '\\.?') + '$', 'i'); + this._minWeekdaysParse[i] = new RegExp('^' + this.weekdaysMin(mom, '').replace('.', '\\.?') + '$', 'i'); + } + + if (!this._weekdaysParse[i]) { + regex = '^' + this.weekdays(mom, '') + '|^' + this.weekdaysShort(mom, '') + '|^' + this.weekdaysMin(mom, ''); + this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i'); + } // test the regex + + + if (strict && format === 'dddd' && this._fullWeekdaysParse[i].test(weekdayName)) { + return i; + } else if (strict && format === 'ddd' && this._shortWeekdaysParse[i].test(weekdayName)) { + return i; + } else if (strict && format === 'dd' && this._minWeekdaysParse[i].test(weekdayName)) { + return i; + } else if (!strict && this._weekdaysParse[i].test(weekdayName)) { + return i; + } + } + } // MOMENTS + + + function getSetDayOfWeek(input) { + if (!this.isValid()) { + return input != null ? this : NaN; + } + + var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay(); + + if (input != null) { + input = parseWeekday(input, this.localeData()); + return this.add(input - day, 'd'); + } else { + return day; + } + } + + function getSetLocaleDayOfWeek(input) { + if (!this.isValid()) { + return input != null ? this : NaN; + } + + var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7; + return input == null ? weekday : this.add(input - weekday, 'd'); + } + + function getSetISODayOfWeek(input) { + if (!this.isValid()) { + return input != null ? this : NaN; + } // behaves the same as moment#day except + // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6) + // as a setter, sunday should belong to the previous week. + + + if (input != null) { + var weekday = parseIsoWeekday(input, this.localeData()); + return this.day(this.day() % 7 ? weekday : weekday - 7); + } else { + return this.day() || 7; + } + } + + var defaultWeekdaysRegex = matchWord; + + function weekdaysRegex(isStrict) { + if (this._weekdaysParseExact) { + if (!hasOwnProp(this, '_weekdaysRegex')) { + computeWeekdaysParse.call(this); + } + + if (isStrict) { + return this._weekdaysStrictRegex; + } else { + return this._weekdaysRegex; + } + } else { + if (!hasOwnProp(this, '_weekdaysRegex')) { + this._weekdaysRegex = defaultWeekdaysRegex; + } + + return this._weekdaysStrictRegex && isStrict ? this._weekdaysStrictRegex : this._weekdaysRegex; + } + } + + var defaultWeekdaysShortRegex = matchWord; + + function weekdaysShortRegex(isStrict) { + if (this._weekdaysParseExact) { + if (!hasOwnProp(this, '_weekdaysRegex')) { + computeWeekdaysParse.call(this); + } + + if (isStrict) { + return this._weekdaysShortStrictRegex; + } else { + return this._weekdaysShortRegex; + } + } else { + if (!hasOwnProp(this, '_weekdaysShortRegex')) { + this._weekdaysShortRegex = defaultWeekdaysShortRegex; + } + + return this._weekdaysShortStrictRegex && isStrict ? this._weekdaysShortStrictRegex : this._weekdaysShortRegex; + } + } + + var defaultWeekdaysMinRegex = matchWord; + + function weekdaysMinRegex(isStrict) { + if (this._weekdaysParseExact) { + if (!hasOwnProp(this, '_weekdaysRegex')) { + computeWeekdaysParse.call(this); + } + + if (isStrict) { + return this._weekdaysMinStrictRegex; + } else { + return this._weekdaysMinRegex; + } + } else { + if (!hasOwnProp(this, '_weekdaysMinRegex')) { + this._weekdaysMinRegex = defaultWeekdaysMinRegex; + } + + return this._weekdaysMinStrictRegex && isStrict ? this._weekdaysMinStrictRegex : this._weekdaysMinRegex; + } + } + + function computeWeekdaysParse() { + function cmpLenRev(a, b) { + return b.length - a.length; + } + + var minPieces = [], + shortPieces = [], + longPieces = [], + mixedPieces = [], + i, + mom, + minp, + shortp, + longp; + + for (i = 0; i < 7; i++) { + // make the regex if we don't have it already + mom = createUTC([2000, 1]).day(i); + minp = this.weekdaysMin(mom, ''); + shortp = this.weekdaysShort(mom, ''); + longp = this.weekdays(mom, ''); + minPieces.push(minp); + shortPieces.push(shortp); + longPieces.push(longp); + mixedPieces.push(minp); + mixedPieces.push(shortp); + mixedPieces.push(longp); + } // Sorting makes sure if one weekday (or abbr) is a prefix of another it + // will match the longer piece. + + + minPieces.sort(cmpLenRev); + shortPieces.sort(cmpLenRev); + longPieces.sort(cmpLenRev); + mixedPieces.sort(cmpLenRev); + + for (i = 0; i < 7; i++) { + shortPieces[i] = regexEscape(shortPieces[i]); + longPieces[i] = regexEscape(longPieces[i]); + mixedPieces[i] = regexEscape(mixedPieces[i]); + } + + this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i'); + this._weekdaysShortRegex = this._weekdaysRegex; + this._weekdaysMinRegex = this._weekdaysRegex; + this._weekdaysStrictRegex = new RegExp('^(' + longPieces.join('|') + ')', 'i'); + this._weekdaysShortStrictRegex = new RegExp('^(' + shortPieces.join('|') + ')', 'i'); + this._weekdaysMinStrictRegex = new RegExp('^(' + minPieces.join('|') + ')', 'i'); + } // FORMATTING + + + function hFormat() { + return this.hours() % 12 || 12; + } + + function kFormat() { + return this.hours() || 24; + } + + addFormatToken('H', ['HH', 2], 0, 'hour'); + addFormatToken('h', ['hh', 2], 0, hFormat); + addFormatToken('k', ['kk', 2], 0, kFormat); + addFormatToken('hmm', 0, 0, function () { + return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2); + }); + addFormatToken('hmmss', 0, 0, function () { + return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2) + zeroFill(this.seconds(), 2); + }); + addFormatToken('Hmm', 0, 0, function () { + return '' + this.hours() + zeroFill(this.minutes(), 2); + }); + addFormatToken('Hmmss', 0, 0, function () { + return '' + this.hours() + zeroFill(this.minutes(), 2) + zeroFill(this.seconds(), 2); + }); + + function meridiem(token, lowercase) { + addFormatToken(token, 0, 0, function () { + return this.localeData().meridiem(this.hours(), this.minutes(), lowercase); + }); + } + + meridiem('a', true); + meridiem('A', false); // ALIASES + + addUnitAlias('hour', 'h'); // PRIORITY + + addUnitPriority('hour', 13); // PARSING + + function matchMeridiem(isStrict, locale) { + return locale._meridiemParse; + } + + addRegexToken('a', matchMeridiem); + addRegexToken('A', matchMeridiem); + addRegexToken('H', match1to2); + addRegexToken('h', match1to2); + addRegexToken('k', match1to2); + addRegexToken('HH', match1to2, match2); + addRegexToken('hh', match1to2, match2); + addRegexToken('kk', match1to2, match2); + addRegexToken('hmm', match3to4); + addRegexToken('hmmss', match5to6); + addRegexToken('Hmm', match3to4); + addRegexToken('Hmmss', match5to6); + addParseToken(['H', 'HH'], HOUR); + addParseToken(['k', 'kk'], function (input, array, config) { + var kInput = toInt(input); + array[HOUR] = kInput === 24 ? 0 : kInput; + }); + addParseToken(['a', 'A'], function (input, array, config) { + config._isPm = config._locale.isPM(input); + config._meridiem = input; + }); + addParseToken(['h', 'hh'], function (input, array, config) { + array[HOUR] = toInt(input); + getParsingFlags(config).bigHour = true; + }); + addParseToken('hmm', function (input, array, config) { + var pos = input.length - 2; + array[HOUR] = toInt(input.substr(0, pos)); + array[MINUTE] = toInt(input.substr(pos)); + getParsingFlags(config).bigHour = true; + }); + addParseToken('hmmss', function (input, array, config) { + var pos1 = input.length - 4; + var pos2 = input.length - 2; + array[HOUR] = toInt(input.substr(0, pos1)); + array[MINUTE] = toInt(input.substr(pos1, 2)); + array[SECOND] = toInt(input.substr(pos2)); + getParsingFlags(config).bigHour = true; + }); + addParseToken('Hmm', function (input, array, config) { + var pos = input.length - 2; + array[HOUR] = toInt(input.substr(0, pos)); + array[MINUTE] = toInt(input.substr(pos)); + }); + addParseToken('Hmmss', function (input, array, config) { + var pos1 = input.length - 4; + var pos2 = input.length - 2; + array[HOUR] = toInt(input.substr(0, pos1)); + array[MINUTE] = toInt(input.substr(pos1, 2)); + array[SECOND] = toInt(input.substr(pos2)); + }); // LOCALES + + function localeIsPM(input) { + // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays + // Using charAt should be more compatible. + return (input + '').toLowerCase().charAt(0) === 'p'; + } + + var defaultLocaleMeridiemParse = /[ap]\.?m?\.?/i; + + function localeMeridiem(hours, minutes, isLower) { + if (hours > 11) { + return isLower ? 'pm' : 'PM'; + } else { + return isLower ? 'am' : 'AM'; + } + } // MOMENTS + // Setting the hour should keep the time, because the user explicitly + // specified which hour they want. So trying to maintain the same hour (in + // a new timezone) makes sense. Adding/subtracting hours does not follow + // this rule. + + + var getSetHour = makeGetSet('Hours', true); + var baseConfig = { + calendar: defaultCalendar, + longDateFormat: defaultLongDateFormat, + invalidDate: defaultInvalidDate, + ordinal: defaultOrdinal, + dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse, + relativeTime: defaultRelativeTime, + months: defaultLocaleMonths, + monthsShort: defaultLocaleMonthsShort, + week: defaultLocaleWeek, + weekdays: defaultLocaleWeekdays, + weekdaysMin: defaultLocaleWeekdaysMin, + weekdaysShort: defaultLocaleWeekdaysShort, + meridiemParse: defaultLocaleMeridiemParse + }; // internal storage for locale config files + + var locales = {}; + var localeFamilies = {}; + var globalLocale; + + function normalizeLocale(key) { + return key ? key.toLowerCase().replace('_', '-') : key; + } // pick the locale from the array + // try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each + // substring from most specific to least, but move to the next array item if it's a more specific variant than the current root + + + function chooseLocale(names) { + var i = 0, + j, + next, + locale, + split; + + while (i < names.length) { + split = normalizeLocale(names[i]).split('-'); + j = split.length; + next = normalizeLocale(names[i + 1]); + next = next ? next.split('-') : null; + + while (j > 0) { + locale = loadLocale(split.slice(0, j).join('-')); + + if (locale) { + return locale; + } + + if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) { + //the next array item is better than a shallower substring of this one + break; + } + + j--; + } + + i++; + } + + return globalLocale; + } + + function loadLocale(name) { + var oldLocale = null; // TODO: Find a better way to register and load all the locales in Node + + if (!locales[name] && 'object' !== 'undefined' && module && module.exports) { + try { + oldLocale = globalLocale._abbr; + var aliasedRequire = commonjsRequire$2; + aliasedRequire('./locale/' + name); + getSetGlobalLocale(oldLocale); + } catch (e) {} + } + + return locales[name]; + } // This function will load locale and then set the global locale. If + // no arguments are passed in, it will simply return the current global + // locale key. + + + function getSetGlobalLocale(key, values) { + var data; + + if (key) { + if (isUndefined(values)) { + data = getLocale(key); + } else { + data = defineLocale(key, values); + } + + if (data) { + // moment.duration._locale = moment._locale = data; + globalLocale = data; + } else { + if (typeof console !== 'undefined' && console.warn) { + //warn user if arguments are passed but the locale could not be set + console.warn('Locale ' + key + ' not found. Did you forget to load it?'); + } + } + } + + return globalLocale._abbr; + } + + function defineLocale(name, config) { + if (config !== null) { + var locale, + parentConfig = baseConfig; + config.abbr = name; + + if (locales[name] != null) { + deprecateSimple('defineLocaleOverride', 'use moment.updateLocale(localeName, config) to change ' + 'an existing locale. moment.defineLocale(localeName, ' + 'config) should only be used for creating a new locale ' + 'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.'); + parentConfig = locales[name]._config; + } else if (config.parentLocale != null) { + if (locales[config.parentLocale] != null) { + parentConfig = locales[config.parentLocale]._config; + } else { + locale = loadLocale(config.parentLocale); + + if (locale != null) { + parentConfig = locale._config; + } else { + if (!localeFamilies[config.parentLocale]) { + localeFamilies[config.parentLocale] = []; + } + + localeFamilies[config.parentLocale].push({ + name: name, + config: config + }); + return null; + } + } + } + + locales[name] = new Locale(mergeConfigs(parentConfig, config)); + + if (localeFamilies[name]) { + localeFamilies[name].forEach(function (x) { + defineLocale(x.name, x.config); + }); + } // backwards compat for now: also set the locale + // make sure we set the locale AFTER all child locales have been + // created, so we won't end up with the child locale set. + + + getSetGlobalLocale(name); + return locales[name]; + } else { + // useful for testing + delete locales[name]; + return null; + } + } + + function updateLocale(name, config) { + if (config != null) { + var locale, + tmpLocale, + parentConfig = baseConfig; // MERGE + + tmpLocale = loadLocale(name); + + if (tmpLocale != null) { + parentConfig = tmpLocale._config; + } + + config = mergeConfigs(parentConfig, config); + locale = new Locale(config); + locale.parentLocale = locales[name]; + locales[name] = locale; // backwards compat for now: also set the locale + + getSetGlobalLocale(name); + } else { + // pass null for config to unupdate, useful for tests + if (locales[name] != null) { + if (locales[name].parentLocale != null) { + locales[name] = locales[name].parentLocale; + } else if (locales[name] != null) { + delete locales[name]; + } + } + } + + return locales[name]; + } // returns locale data + + + function getLocale(key) { + var locale; + + if (key && key._locale && key._locale._abbr) { + key = key._locale._abbr; + } + + if (!key) { + return globalLocale; + } + + if (!isArray(key)) { + //short-circuit everything else + locale = loadLocale(key); + + if (locale) { + return locale; + } + + key = [key]; + } + + return chooseLocale(key); + } + + function listLocales() { + return keys(locales); + } + + function checkOverflow(m) { + var overflow; + var a = m._a; + + if (a && getParsingFlags(m).overflow === -2) { + overflow = a[MONTH] < 0 || a[MONTH] > 11 ? MONTH : a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH]) ? DATE : a[HOUR] < 0 || a[HOUR] > 24 || a[HOUR] === 24 && (a[MINUTE] !== 0 || a[SECOND] !== 0 || a[MILLISECOND] !== 0) ? HOUR : a[MINUTE] < 0 || a[MINUTE] > 59 ? MINUTE : a[SECOND] < 0 || a[SECOND] > 59 ? SECOND : a[MILLISECOND] < 0 || a[MILLISECOND] > 999 ? MILLISECOND : -1; + + if (getParsingFlags(m)._overflowDayOfYear && (overflow < YEAR || overflow > DATE)) { + overflow = DATE; + } + + if (getParsingFlags(m)._overflowWeeks && overflow === -1) { + overflow = WEEK; + } + + if (getParsingFlags(m)._overflowWeekday && overflow === -1) { + overflow = WEEKDAY; + } + + getParsingFlags(m).overflow = overflow; + } + + return m; + } // Pick the first defined of two or three arguments. + + + function defaults(a, b, c) { + if (a != null) { + return a; + } + + if (b != null) { + return b; + } + + return c; + } + + function currentDateArray(config) { + // hooks is actually the exported moment object + var nowValue = new Date(hooks.now()); + + if (config._useUTC) { + return [nowValue.getUTCFullYear(), nowValue.getUTCMonth(), nowValue.getUTCDate()]; + } + + return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()]; + } // convert an array to a date. + // the array should mirror the parameters below + // note: all values past the year are optional and will default to the lowest possible value. + // [year, month, day , hour, minute, second, millisecond] + + + function configFromArray(config) { + var i, + date, + input = [], + currentDate, + expectedWeekday, + yearToUse; + + if (config._d) { + return; + } + + currentDate = currentDateArray(config); //compute day of the year from weeks and weekdays + + if (config._w && config._a[DATE] == null && config._a[MONTH] == null) { + dayOfYearFromWeekInfo(config); + } //if the day of the year is set, figure out what it is + + + if (config._dayOfYear != null) { + yearToUse = defaults(config._a[YEAR], currentDate[YEAR]); + + if (config._dayOfYear > daysInYear(yearToUse) || config._dayOfYear === 0) { + getParsingFlags(config)._overflowDayOfYear = true; + } + + date = createUTCDate(yearToUse, 0, config._dayOfYear); + config._a[MONTH] = date.getUTCMonth(); + config._a[DATE] = date.getUTCDate(); + } // Default to current date. + // * if no year, month, day of month are given, default to today + // * if day of month is given, default month and year + // * if month is given, default only year + // * if year is given, don't default anything + + + for (i = 0; i < 3 && config._a[i] == null; ++i) { + config._a[i] = input[i] = currentDate[i]; + } // Zero out whatever was not defaulted, including time + + + for (; i < 7; i++) { + config._a[i] = input[i] = config._a[i] == null ? i === 2 ? 1 : 0 : config._a[i]; + } // Check for 24:00:00.000 + + + if (config._a[HOUR] === 24 && config._a[MINUTE] === 0 && config._a[SECOND] === 0 && config._a[MILLISECOND] === 0) { + config._nextDay = true; + config._a[HOUR] = 0; + } + + config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input); + expectedWeekday = config._useUTC ? config._d.getUTCDay() : config._d.getDay(); // Apply timezone offset from input. The actual utcOffset can be changed + // with parseZone. + + if (config._tzm != null) { + config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm); + } + + if (config._nextDay) { + config._a[HOUR] = 24; + } // check for mismatching day of week + + + if (config._w && typeof config._w.d !== 'undefined' && config._w.d !== expectedWeekday) { + getParsingFlags(config).weekdayMismatch = true; + } + } + + function dayOfYearFromWeekInfo(config) { + var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow; + w = config._w; + + if (w.GG != null || w.W != null || w.E != null) { + dow = 1; + doy = 4; // TODO: We need to take the current isoWeekYear, but that depends on + // how we interpret now (local, utc, fixed offset). So create + // a now version of current config (take local/utc/offset flags, and + // create now). + + weekYear = defaults(w.GG, config._a[YEAR], weekOfYear(createLocal(), 1, 4).year); + week = defaults(w.W, 1); + weekday = defaults(w.E, 1); + + if (weekday < 1 || weekday > 7) { + weekdayOverflow = true; + } + } else { + dow = config._locale._week.dow; + doy = config._locale._week.doy; + var curWeek = weekOfYear(createLocal(), dow, doy); + weekYear = defaults(w.gg, config._a[YEAR], curWeek.year); // Default to current week. + + week = defaults(w.w, curWeek.week); + + if (w.d != null) { + // weekday -- low day numbers are considered next week + weekday = w.d; + + if (weekday < 0 || weekday > 6) { + weekdayOverflow = true; + } + } else if (w.e != null) { + // local weekday -- counting starts from beginning of week + weekday = w.e + dow; + + if (w.e < 0 || w.e > 6) { + weekdayOverflow = true; + } + } else { + // default to beginning of week + weekday = dow; + } + } + + if (week < 1 || week > weeksInYear(weekYear, dow, doy)) { + getParsingFlags(config)._overflowWeeks = true; + } else if (weekdayOverflow != null) { + getParsingFlags(config)._overflowWeekday = true; + } else { + temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy); + config._a[YEAR] = temp.year; + config._dayOfYear = temp.dayOfYear; + } + } // iso 8601 regex + // 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00) + + + var extendedIsoRegex = /^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/; + var basicIsoRegex = /^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/; + var tzRegex = /Z|[+-]\d\d(?::?\d\d)?/; + var isoDates = [['YYYYYY-MM-DD', /[+-]\d{6}-\d\d-\d\d/], ['YYYY-MM-DD', /\d{4}-\d\d-\d\d/], ['GGGG-[W]WW-E', /\d{4}-W\d\d-\d/], ['GGGG-[W]WW', /\d{4}-W\d\d/, false], ['YYYY-DDD', /\d{4}-\d{3}/], ['YYYY-MM', /\d{4}-\d\d/, false], ['YYYYYYMMDD', /[+-]\d{10}/], ['YYYYMMDD', /\d{8}/], // YYYYMM is NOT allowed by the standard + ['GGGG[W]WWE', /\d{4}W\d{3}/], ['GGGG[W]WW', /\d{4}W\d{2}/, false], ['YYYYDDD', /\d{7}/]]; // iso time formats and regexes + + var isoTimes = [['HH:mm:ss.SSSS', /\d\d:\d\d:\d\d\.\d+/], ['HH:mm:ss,SSSS', /\d\d:\d\d:\d\d,\d+/], ['HH:mm:ss', /\d\d:\d\d:\d\d/], ['HH:mm', /\d\d:\d\d/], ['HHmmss.SSSS', /\d\d\d\d\d\d\.\d+/], ['HHmmss,SSSS', /\d\d\d\d\d\d,\d+/], ['HHmmss', /\d\d\d\d\d\d/], ['HHmm', /\d\d\d\d/], ['HH', /\d\d/]]; + var aspNetJsonRegex = /^\/?Date\((\-?\d+)/i; // date from iso format + + function configFromISO(config) { + var i, + l, + string = config._i, + match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string), + allowTime, + dateFormat, + timeFormat, + tzFormat; + + if (match) { + getParsingFlags(config).iso = true; + + for (i = 0, l = isoDates.length; i < l; i++) { + if (isoDates[i][1].exec(match[1])) { + dateFormat = isoDates[i][0]; + allowTime = isoDates[i][2] !== false; + break; + } + } + + if (dateFormat == null) { + config._isValid = false; + return; + } + + if (match[3]) { + for (i = 0, l = isoTimes.length; i < l; i++) { + if (isoTimes[i][1].exec(match[3])) { + // match[2] should be 'T' or space + timeFormat = (match[2] || ' ') + isoTimes[i][0]; + break; + } + } + + if (timeFormat == null) { + config._isValid = false; + return; + } + } + + if (!allowTime && timeFormat != null) { + config._isValid = false; + return; + } + + if (match[4]) { + if (tzRegex.exec(match[4])) { + tzFormat = 'Z'; + } else { + config._isValid = false; + return; + } + } + + config._f = dateFormat + (timeFormat || '') + (tzFormat || ''); + configFromStringAndFormat(config); + } else { + config._isValid = false; + } + } // RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3 + + + var rfc2822 = /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/; + + function extractFromRFC2822Strings(yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr) { + var result = [untruncateYear(yearStr), defaultLocaleMonthsShort.indexOf(monthStr), parseInt(dayStr, 10), parseInt(hourStr, 10), parseInt(minuteStr, 10)]; + + if (secondStr) { + result.push(parseInt(secondStr, 10)); + } + + return result; + } + + function untruncateYear(yearStr) { + var year = parseInt(yearStr, 10); + + if (year <= 49) { + return 2000 + year; + } else if (year <= 999) { + return 1900 + year; + } + + return year; + } + + function preprocessRFC2822(s) { + // Remove comments and folding whitespace and replace multiple-spaces with a single space + return s.replace(/\([^)]*\)|[\n\t]/g, ' ').replace(/(\s\s+)/g, ' ').replace(/^\s\s*/, '').replace(/\s\s*$/, ''); + } + + function checkWeekday(weekdayStr, parsedInput, config) { + if (weekdayStr) { + // TODO: Replace the vanilla JS Date object with an indepentent day-of-week check. + var weekdayProvided = defaultLocaleWeekdaysShort.indexOf(weekdayStr), + weekdayActual = new Date(parsedInput[0], parsedInput[1], parsedInput[2]).getDay(); + + if (weekdayProvided !== weekdayActual) { + getParsingFlags(config).weekdayMismatch = true; + config._isValid = false; + return false; + } + } + + return true; + } + + var obsOffsets = { + UT: 0, + GMT: 0, + EDT: -4 * 60, + EST: -5 * 60, + CDT: -5 * 60, + CST: -6 * 60, + MDT: -6 * 60, + MST: -7 * 60, + PDT: -7 * 60, + PST: -8 * 60 + }; + + function calculateOffset(obsOffset, militaryOffset, numOffset) { + if (obsOffset) { + return obsOffsets[obsOffset]; + } else if (militaryOffset) { + // the only allowed military tz is Z + return 0; + } else { + var hm = parseInt(numOffset, 10); + var m = hm % 100, + h = (hm - m) / 100; + return h * 60 + m; + } + } // date and time from ref 2822 format + + + function configFromRFC2822(config) { + var match = rfc2822.exec(preprocessRFC2822(config._i)); + + if (match) { + var parsedArray = extractFromRFC2822Strings(match[4], match[3], match[2], match[5], match[6], match[7]); + + if (!checkWeekday(match[1], parsedArray, config)) { + return; + } + + config._a = parsedArray; + config._tzm = calculateOffset(match[8], match[9], match[10]); + config._d = createUTCDate.apply(null, config._a); + + config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm); + + getParsingFlags(config).rfc2822 = true; + } else { + config._isValid = false; + } + } // date from iso format or fallback + + + function configFromString(config) { + var matched = aspNetJsonRegex.exec(config._i); + + if (matched !== null) { + config._d = new Date(+matched[1]); + return; + } + + configFromISO(config); + + if (config._isValid === false) { + delete config._isValid; + } else { + return; + } + + configFromRFC2822(config); + + if (config._isValid === false) { + delete config._isValid; + } else { + return; + } // Final attempt, use Input Fallback + + + hooks.createFromInputFallback(config); + } + + hooks.createFromInputFallback = deprecate('value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), ' + 'which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are ' + 'discouraged and will be removed in an upcoming major release. Please refer to ' + 'http://momentjs.com/guides/#/warnings/js-date/ for more info.', function (config) { + config._d = new Date(config._i + (config._useUTC ? ' UTC' : '')); + }); // constant that refers to the ISO standard + + hooks.ISO_8601 = function () {}; // constant that refers to the RFC 2822 form + + + hooks.RFC_2822 = function () {}; // date from string and format string + + + function configFromStringAndFormat(config) { + // TODO: Move this to another part of the creation flow to prevent circular deps + if (config._f === hooks.ISO_8601) { + configFromISO(config); + return; + } + + if (config._f === hooks.RFC_2822) { + configFromRFC2822(config); + return; + } + + config._a = []; + getParsingFlags(config).empty = true; // This array is used to make a Date, either with `new Date` or `Date.UTC` + + var string = '' + config._i, + i, + parsedInput, + tokens, + token, + skipped, + stringLength = string.length, + totalParsedInputLength = 0; + tokens = expandFormat(config._f, config._locale).match(formattingTokens) || []; + + for (i = 0; i < tokens.length; i++) { + token = tokens[i]; + parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0]; // console.log('token', token, 'parsedInput', parsedInput, + // 'regex', getParseRegexForToken(token, config)); + + if (parsedInput) { + skipped = string.substr(0, string.indexOf(parsedInput)); + + if (skipped.length > 0) { + getParsingFlags(config).unusedInput.push(skipped); + } + + string = string.slice(string.indexOf(parsedInput) + parsedInput.length); + totalParsedInputLength += parsedInput.length; + } // don't parse if it's not a known token + + + if (formatTokenFunctions[token]) { + if (parsedInput) { + getParsingFlags(config).empty = false; + } else { + getParsingFlags(config).unusedTokens.push(token); + } + + addTimeToArrayFromToken(token, parsedInput, config); + } else if (config._strict && !parsedInput) { + getParsingFlags(config).unusedTokens.push(token); + } + } // add remaining unparsed input length to the string + + + getParsingFlags(config).charsLeftOver = stringLength - totalParsedInputLength; + + if (string.length > 0) { + getParsingFlags(config).unusedInput.push(string); + } // clear _12h flag if hour is <= 12 + + + if (config._a[HOUR] <= 12 && getParsingFlags(config).bigHour === true && config._a[HOUR] > 0) { + getParsingFlags(config).bigHour = undefined; + } + + getParsingFlags(config).parsedDateParts = config._a.slice(0); + getParsingFlags(config).meridiem = config._meridiem; // handle meridiem + + config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR], config._meridiem); + configFromArray(config); + checkOverflow(config); + } + + function meridiemFixWrap(locale, hour, meridiem) { + var isPm; + + if (meridiem == null) { + // nothing to do + return hour; + } + + if (locale.meridiemHour != null) { + return locale.meridiemHour(hour, meridiem); + } else if (locale.isPM != null) { + // Fallback + isPm = locale.isPM(meridiem); + + if (isPm && hour < 12) { + hour += 12; + } + + if (!isPm && hour === 12) { + hour = 0; + } + + return hour; + } else { + // this is not supposed to happen + return hour; + } + } // date from string and array of format strings + + + function configFromStringAndArray(config) { + var tempConfig, bestMoment, scoreToBeat, i, currentScore; + + if (config._f.length === 0) { + getParsingFlags(config).invalidFormat = true; + config._d = new Date(NaN); + return; + } + + for (i = 0; i < config._f.length; i++) { + currentScore = 0; + tempConfig = copyConfig({}, config); + + if (config._useUTC != null) { + tempConfig._useUTC = config._useUTC; + } + + tempConfig._f = config._f[i]; + configFromStringAndFormat(tempConfig); + + if (!isValid(tempConfig)) { + continue; + } // if there is any input that was not parsed add a penalty for that format + + + currentScore += getParsingFlags(tempConfig).charsLeftOver; //or tokens + + currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10; + getParsingFlags(tempConfig).score = currentScore; + + if (scoreToBeat == null || currentScore < scoreToBeat) { + scoreToBeat = currentScore; + bestMoment = tempConfig; + } + } + + extend(config, bestMoment || tempConfig); + } + + function configFromObject(config) { + if (config._d) { + return; + } + + var i = normalizeObjectUnits(config._i); + config._a = map([i.year, i.month, i.day || i.date, i.hour, i.minute, i.second, i.millisecond], function (obj) { + return obj && parseInt(obj, 10); + }); + configFromArray(config); + } + + function createFromConfig(config) { + var res = new Moment(checkOverflow(prepareConfig(config))); + + if (res._nextDay) { + // Adding is smart enough around DST + res.add(1, 'd'); + res._nextDay = undefined; + } + + return res; + } + + function prepareConfig(config) { + var input = config._i, + format = config._f; + config._locale = config._locale || getLocale(config._l); + + if (input === null || format === undefined && input === '') { + return createInvalid({ + nullInput: true + }); + } + + if (typeof input === 'string') { + config._i = input = config._locale.preparse(input); + } + + if (isMoment(input)) { + return new Moment(checkOverflow(input)); + } else if (isDate(input)) { + config._d = input; + } else if (isArray(format)) { + configFromStringAndArray(config); + } else if (format) { + configFromStringAndFormat(config); + } else { + configFromInput(config); + } + + if (!isValid(config)) { + config._d = null; + } + + return config; + } + + function configFromInput(config) { + var input = config._i; + + if (isUndefined(input)) { + config._d = new Date(hooks.now()); + } else if (isDate(input)) { + config._d = new Date(input.valueOf()); + } else if (typeof input === 'string') { + configFromString(config); + } else if (isArray(input)) { + config._a = map(input.slice(0), function (obj) { + return parseInt(obj, 10); + }); + configFromArray(config); + } else if (isObject(input)) { + configFromObject(config); + } else if (isNumber(input)) { + // from milliseconds + config._d = new Date(input); + } else { + hooks.createFromInputFallback(config); + } + } + + function createLocalOrUTC(input, format, locale, strict, isUTC) { + var c = {}; + + if (locale === true || locale === false) { + strict = locale; + locale = undefined; + } + + if (isObject(input) && isObjectEmpty(input) || isArray(input) && input.length === 0) { + input = undefined; + } // object construction must be done this way. + // https://github.com/moment/moment/issues/1423 + + + c._isAMomentObject = true; + c._useUTC = c._isUTC = isUTC; + c._l = locale; + c._i = input; + c._f = format; + c._strict = strict; + return createFromConfig(c); + } + + function createLocal(input, format, locale, strict) { + return createLocalOrUTC(input, format, locale, strict, false); + } + + var prototypeMin = deprecate('moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/', function () { + var other = createLocal.apply(null, arguments); + + if (this.isValid() && other.isValid()) { + return other < this ? this : other; + } else { + return createInvalid(); + } + }); + var prototypeMax = deprecate('moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/', function () { + var other = createLocal.apply(null, arguments); + + if (this.isValid() && other.isValid()) { + return other > this ? this : other; + } else { + return createInvalid(); + } + }); // Pick a moment m from moments so that m[fn](other) is true for all + // other. This relies on the function fn to be transitive. + // + // moments should either be an array of moment objects or an array, whose + // first element is an array of moment objects. + + function pickBy(fn, moments) { + var res, i; + + if (moments.length === 1 && isArray(moments[0])) { + moments = moments[0]; + } + + if (!moments.length) { + return createLocal(); + } + + res = moments[0]; + + for (i = 1; i < moments.length; ++i) { + if (!moments[i].isValid() || moments[i][fn](res)) { + res = moments[i]; + } + } + + return res; + } // TODO: Use [].sort instead? + + + function min() { + var args = [].slice.call(arguments, 0); + return pickBy('isBefore', args); + } + + function max() { + var args = [].slice.call(arguments, 0); + return pickBy('isAfter', args); + } + + var now = function () { + return Date.now ? Date.now() : +new Date(); + }; + + var ordering = ['year', 'quarter', 'month', 'week', 'day', 'hour', 'minute', 'second', 'millisecond']; + + function isDurationValid(m) { + for (var key in m) { + if (!(indexOf.call(ordering, key) !== -1 && (m[key] == null || !isNaN(m[key])))) { + return false; + } + } + + var unitHasDecimal = false; + + for (var i = 0; i < ordering.length; ++i) { + if (m[ordering[i]]) { + if (unitHasDecimal) { + return false; // only allow non-integers for smallest unit + } + + if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) { + unitHasDecimal = true; + } + } + } + + return true; + } + + function isValid$1() { + return this._isValid; + } + + function createInvalid$1() { + return createDuration(NaN); + } + + function Duration(duration) { + var normalizedInput = normalizeObjectUnits(duration), + years = normalizedInput.year || 0, + quarters = normalizedInput.quarter || 0, + months = normalizedInput.month || 0, + weeks = normalizedInput.week || normalizedInput.isoWeek || 0, + days = normalizedInput.day || 0, + hours = normalizedInput.hour || 0, + minutes = normalizedInput.minute || 0, + seconds = normalizedInput.second || 0, + milliseconds = normalizedInput.millisecond || 0; + this._isValid = isDurationValid(normalizedInput); // representation for dateAddRemove + + this._milliseconds = +milliseconds + seconds * 1e3 + // 1000 + minutes * 6e4 + // 1000 * 60 + hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978 + // Because of dateAddRemove treats 24 hours as different from a + // day when working around DST, we need to store them separately + + this._days = +days + weeks * 7; // It is impossible to translate months into days without knowing + // which months you are are talking about, so we have to store + // it separately. + + this._months = +months + quarters * 3 + years * 12; + this._data = {}; + this._locale = getLocale(); + + this._bubble(); + } + + function isDuration(obj) { + return obj instanceof Duration; + } + + function absRound(number) { + if (number < 0) { + return Math.round(-1 * number) * -1; + } else { + return Math.round(number); + } + } // FORMATTING + + + function offset(token, separator) { + addFormatToken(token, 0, 0, function () { + var offset = this.utcOffset(); + var sign = '+'; + + if (offset < 0) { + offset = -offset; + sign = '-'; + } + + return sign + zeroFill(~~(offset / 60), 2) + separator + zeroFill(~~offset % 60, 2); + }); + } + + offset('Z', ':'); + offset('ZZ', ''); // PARSING + + addRegexToken('Z', matchShortOffset); + addRegexToken('ZZ', matchShortOffset); + addParseToken(['Z', 'ZZ'], function (input, array, config) { + config._useUTC = true; + config._tzm = offsetFromString(matchShortOffset, input); + }); // HELPERS + // timezone chunker + // '+10:00' > ['10', '00'] + // '-1530' > ['-15', '30'] + + var chunkOffset = /([\+\-]|\d\d)/gi; + + function offsetFromString(matcher, string) { + var matches = (string || '').match(matcher); + + if (matches === null) { + return null; + } + + var chunk = matches[matches.length - 1] || []; + var parts = (chunk + '').match(chunkOffset) || ['-', 0, 0]; + var minutes = +(parts[1] * 60) + toInt(parts[2]); + return minutes === 0 ? 0 : parts[0] === '+' ? minutes : -minutes; + } // Return a moment from input, that is local/utc/zone equivalent to model. + + + function cloneWithOffset(input, model) { + var res, diff; + + if (model._isUTC) { + res = model.clone(); + diff = (isMoment(input) || isDate(input) ? input.valueOf() : createLocal(input).valueOf()) - res.valueOf(); // Use low-level api, because this fn is low-level api. + + res._d.setTime(res._d.valueOf() + diff); + + hooks.updateOffset(res, false); + return res; + } else { + return createLocal(input).local(); + } + } + + function getDateOffset(m) { + // On Firefox.24 Date#getTimezoneOffset returns a floating point. + // https://github.com/moment/moment/pull/1871 + return -Math.round(m._d.getTimezoneOffset() / 15) * 15; + } // HOOKS + // This function will be called whenever a moment is mutated. + // It is intended to keep the offset in sync with the timezone. + + + hooks.updateOffset = function () {}; // MOMENTS + // keepLocalTime = true means only change the timezone, without + // affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]--> + // 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset + // +0200, so we adjust the time as needed, to be valid. + // + // Keeping the time actually adds/subtracts (one hour) + // from the actual represented time. That is why we call updateOffset + // a second time. In case it wants us to change the offset again + // _changeInProgress == true case, then we have to adjust, because + // there is no such time in the given timezone. + + + function getSetOffset(input, keepLocalTime, keepMinutes) { + var offset = this._offset || 0, + localAdjust; + + if (!this.isValid()) { + return input != null ? this : NaN; + } + + if (input != null) { + if (typeof input === 'string') { + input = offsetFromString(matchShortOffset, input); + + if (input === null) { + return this; + } + } else if (Math.abs(input) < 16 && !keepMinutes) { + input = input * 60; + } + + if (!this._isUTC && keepLocalTime) { + localAdjust = getDateOffset(this); + } + + this._offset = input; + this._isUTC = true; + + if (localAdjust != null) { + this.add(localAdjust, 'm'); + } + + if (offset !== input) { + if (!keepLocalTime || this._changeInProgress) { + addSubtract(this, createDuration(input - offset, 'm'), 1, false); + } else if (!this._changeInProgress) { + this._changeInProgress = true; + hooks.updateOffset(this, true); + this._changeInProgress = null; + } + } + + return this; + } else { + return this._isUTC ? offset : getDateOffset(this); + } + } + + function getSetZone(input, keepLocalTime) { + if (input != null) { + if (typeof input !== 'string') { + input = -input; + } + + this.utcOffset(input, keepLocalTime); + return this; + } else { + return -this.utcOffset(); + } + } + + function setOffsetToUTC(keepLocalTime) { + return this.utcOffset(0, keepLocalTime); + } + + function setOffsetToLocal(keepLocalTime) { + if (this._isUTC) { + this.utcOffset(0, keepLocalTime); + this._isUTC = false; + + if (keepLocalTime) { + this.subtract(getDateOffset(this), 'm'); + } + } + + return this; + } + + function setOffsetToParsedOffset() { + if (this._tzm != null) { + this.utcOffset(this._tzm, false, true); + } else if (typeof this._i === 'string') { + var tZone = offsetFromString(matchOffset, this._i); + + if (tZone != null) { + this.utcOffset(tZone); + } else { + this.utcOffset(0, true); + } + } + + return this; + } + + function hasAlignedHourOffset(input) { + if (!this.isValid()) { + return false; + } + + input = input ? createLocal(input).utcOffset() : 0; + return (this.utcOffset() - input) % 60 === 0; + } + + function isDaylightSavingTime() { + return this.utcOffset() > this.clone().month(0).utcOffset() || this.utcOffset() > this.clone().month(5).utcOffset(); + } + + function isDaylightSavingTimeShifted() { + if (!isUndefined(this._isDSTShifted)) { + return this._isDSTShifted; + } + + var c = {}; + copyConfig(c, this); + c = prepareConfig(c); + + if (c._a) { + var other = c._isUTC ? createUTC(c._a) : createLocal(c._a); + this._isDSTShifted = this.isValid() && compareArrays(c._a, other.toArray()) > 0; + } else { + this._isDSTShifted = false; + } + + return this._isDSTShifted; + } + + function isLocal() { + return this.isValid() ? !this._isUTC : false; + } + + function isUtcOffset() { + return this.isValid() ? this._isUTC : false; + } + + function isUtc() { + return this.isValid() ? this._isUTC && this._offset === 0 : false; + } // ASP.NET json date format regex + + + var aspNetRegex = /^(\-|\+)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/; // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html + // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere + // and further modified to allow for strings containing both week and day + + var isoRegex = /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/; + + function createDuration(input, key) { + var duration = input, + // matching against regexp is expensive, do it on demand + match = null, + sign, + ret, + diffRes; + + if (isDuration(input)) { + duration = { + ms: input._milliseconds, + d: input._days, + M: input._months + }; + } else if (isNumber(input)) { + duration = {}; + + if (key) { + duration[key] = input; + } else { + duration.milliseconds = input; + } + } else if (!!(match = aspNetRegex.exec(input))) { + sign = match[1] === '-' ? -1 : 1; + duration = { + y: 0, + d: toInt(match[DATE]) * sign, + h: toInt(match[HOUR]) * sign, + m: toInt(match[MINUTE]) * sign, + s: toInt(match[SECOND]) * sign, + ms: toInt(absRound(match[MILLISECOND] * 1000)) * sign // the millisecond decimal point is included in the match + + }; + } else if (!!(match = isoRegex.exec(input))) { + sign = match[1] === '-' ? -1 : 1; + duration = { + y: parseIso(match[2], sign), + M: parseIso(match[3], sign), + w: parseIso(match[4], sign), + d: parseIso(match[5], sign), + h: parseIso(match[6], sign), + m: parseIso(match[7], sign), + s: parseIso(match[8], sign) + }; + } else if (duration == null) { + // checks for null or undefined + duration = {}; + } else if (typeof duration === 'object' && ('from' in duration || 'to' in duration)) { + diffRes = momentsDifference(createLocal(duration.from), createLocal(duration.to)); + duration = {}; + duration.ms = diffRes.milliseconds; + duration.M = diffRes.months; + } + + ret = new Duration(duration); + + if (isDuration(input) && hasOwnProp(input, '_locale')) { + ret._locale = input._locale; + } + + return ret; + } + + createDuration.fn = Duration.prototype; + createDuration.invalid = createInvalid$1; + + function parseIso(inp, sign) { + // We'd normally use ~~inp for this, but unfortunately it also + // converts floats to ints. + // inp may be undefined, so careful calling replace on it. + var res = inp && parseFloat(inp.replace(',', '.')); // apply sign while we're at it + + return (isNaN(res) ? 0 : res) * sign; + } + + function positiveMomentsDifference(base, other) { + var res = {}; + res.months = other.month() - base.month() + (other.year() - base.year()) * 12; + + if (base.clone().add(res.months, 'M').isAfter(other)) { + --res.months; + } + + res.milliseconds = +other - +base.clone().add(res.months, 'M'); + return res; + } + + function momentsDifference(base, other) { + var res; + + if (!(base.isValid() && other.isValid())) { + return { + milliseconds: 0, + months: 0 + }; + } + + other = cloneWithOffset(other, base); + + if (base.isBefore(other)) { + res = positiveMomentsDifference(base, other); + } else { + res = positiveMomentsDifference(other, base); + res.milliseconds = -res.milliseconds; + res.months = -res.months; + } + + return res; + } // TODO: remove 'name' arg after deprecation is removed + + + function createAdder(direction, name) { + return function (val, period) { + var dur, tmp; //invert the arguments, but complain about it + + if (period !== null && !isNaN(+period)) { + deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' + 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.'); + tmp = val; + val = period; + period = tmp; + } + + val = typeof val === 'string' ? +val : val; + dur = createDuration(val, period); + addSubtract(this, dur, direction); + return this; + }; + } + + function addSubtract(mom, duration, isAdding, updateOffset) { + var milliseconds = duration._milliseconds, + days = absRound(duration._days), + months = absRound(duration._months); + + if (!mom.isValid()) { + // No op + return; + } + + updateOffset = updateOffset == null ? true : updateOffset; + + if (months) { + setMonth(mom, get(mom, 'Month') + months * isAdding); + } + + if (days) { + set$1(mom, 'Date', get(mom, 'Date') + days * isAdding); + } + + if (milliseconds) { + mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding); + } + + if (updateOffset) { + hooks.updateOffset(mom, days || months); + } + } + + var add = createAdder(1, 'add'); + var subtract = createAdder(-1, 'subtract'); + + function getCalendarFormat(myMoment, now) { + var diff = myMoment.diff(now, 'days', true); + return diff < -6 ? 'sameElse' : diff < -1 ? 'lastWeek' : diff < 0 ? 'lastDay' : diff < 1 ? 'sameDay' : diff < 2 ? 'nextDay' : diff < 7 ? 'nextWeek' : 'sameElse'; + } + + function calendar$1(time, formats) { + // We want to compare the start of today, vs this. + // Getting start-of-today depends on whether we're local/utc/offset or not. + var now = time || createLocal(), + sod = cloneWithOffset(now, this).startOf('day'), + format = hooks.calendarFormat(this, sod) || 'sameElse'; + var output = formats && (isFunction(formats[format]) ? formats[format].call(this, now) : formats[format]); + return this.format(output || this.localeData().calendar(format, this, createLocal(now))); + } + + function clone() { + return new Moment(this); + } + + function isAfter(input, units) { + var localInput = isMoment(input) ? input : createLocal(input); + + if (!(this.isValid() && localInput.isValid())) { + return false; + } + + units = normalizeUnits(units) || 'millisecond'; + + if (units === 'millisecond') { + return this.valueOf() > localInput.valueOf(); + } else { + return localInput.valueOf() < this.clone().startOf(units).valueOf(); + } + } + + function isBefore(input, units) { + var localInput = isMoment(input) ? input : createLocal(input); + + if (!(this.isValid() && localInput.isValid())) { + return false; + } + + units = normalizeUnits(units) || 'millisecond'; + + if (units === 'millisecond') { + return this.valueOf() < localInput.valueOf(); + } else { + return this.clone().endOf(units).valueOf() < localInput.valueOf(); + } + } + + function isBetween(from, to, units, inclusivity) { + var localFrom = isMoment(from) ? from : createLocal(from), + localTo = isMoment(to) ? to : createLocal(to); + + if (!(this.isValid() && localFrom.isValid() && localTo.isValid())) { + return false; + } + + inclusivity = inclusivity || '()'; + return (inclusivity[0] === '(' ? this.isAfter(localFrom, units) : !this.isBefore(localFrom, units)) && (inclusivity[1] === ')' ? this.isBefore(localTo, units) : !this.isAfter(localTo, units)); + } + + function isSame(input, units) { + var localInput = isMoment(input) ? input : createLocal(input), + inputMs; + + if (!(this.isValid() && localInput.isValid())) { + return false; + } + + units = normalizeUnits(units) || 'millisecond'; + + if (units === 'millisecond') { + return this.valueOf() === localInput.valueOf(); + } else { + inputMs = localInput.valueOf(); + return this.clone().startOf(units).valueOf() <= inputMs && inputMs <= this.clone().endOf(units).valueOf(); + } + } + + function isSameOrAfter(input, units) { + return this.isSame(input, units) || this.isAfter(input, units); + } + + function isSameOrBefore(input, units) { + return this.isSame(input, units) || this.isBefore(input, units); + } + + function diff(input, units, asFloat) { + var that, zoneDelta, output; + + if (!this.isValid()) { + return NaN; + } + + that = cloneWithOffset(input, this); + + if (!that.isValid()) { + return NaN; + } + + zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4; + units = normalizeUnits(units); + + switch (units) { + case 'year': + output = monthDiff(this, that) / 12; + break; + + case 'month': + output = monthDiff(this, that); + break; + + case 'quarter': + output = monthDiff(this, that) / 3; + break; + + case 'second': + output = (this - that) / 1e3; + break; + // 1000 + + case 'minute': + output = (this - that) / 6e4; + break; + // 1000 * 60 + + case 'hour': + output = (this - that) / 36e5; + break; + // 1000 * 60 * 60 + + case 'day': + output = (this - that - zoneDelta) / 864e5; + break; + // 1000 * 60 * 60 * 24, negate dst + + case 'week': + output = (this - that - zoneDelta) / 6048e5; + break; + // 1000 * 60 * 60 * 24 * 7, negate dst + + default: + output = this - that; + } + + return asFloat ? output : absFloor(output); + } + + function monthDiff(a, b) { + // difference in months + var wholeMonthDiff = (b.year() - a.year()) * 12 + (b.month() - a.month()), + // b is in (anchor - 1 month, anchor + 1 month) + anchor = a.clone().add(wholeMonthDiff, 'months'), + anchor2, + adjust; + + if (b - anchor < 0) { + anchor2 = a.clone().add(wholeMonthDiff - 1, 'months'); // linear across the month + + adjust = (b - anchor) / (anchor - anchor2); + } else { + anchor2 = a.clone().add(wholeMonthDiff + 1, 'months'); // linear across the month + + adjust = (b - anchor) / (anchor2 - anchor); + } //check for negative zero, return zero if negative zero + + + return -(wholeMonthDiff + adjust) || 0; + } + + hooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ'; + hooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]'; + + function toString() { + return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ'); + } + + function toISOString(keepOffset) { + if (!this.isValid()) { + return null; + } + + var utc = keepOffset !== true; + var m = utc ? this.clone().utc() : this; + + if (m.year() < 0 || m.year() > 9999) { + return formatMoment(m, utc ? 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYYYY-MM-DD[T]HH:mm:ss.SSSZ'); + } + + if (isFunction(Date.prototype.toISOString)) { + // native implementation is ~50x faster, use it when we can + if (utc) { + return this.toDate().toISOString(); + } else { + return new Date(this.valueOf() + this.utcOffset() * 60 * 1000).toISOString().replace('Z', formatMoment(m, 'Z')); + } + } + + return formatMoment(m, utc ? 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYY-MM-DD[T]HH:mm:ss.SSSZ'); + } + /** + * Return a human readable representation of a moment that can + * also be evaluated to get a new moment which is the same + * + * @link https://nodejs.org/dist/latest/docs/api/util.html#util_custom_inspect_function_on_objects + */ + + + function inspect() { + if (!this.isValid()) { + return 'moment.invalid(/* ' + this._i + ' */)'; + } + + var func = 'moment'; + var zone = ''; + + if (!this.isLocal()) { + func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone'; + zone = 'Z'; + } + + var prefix = '[' + func + '("]'; + var year = 0 <= this.year() && this.year() <= 9999 ? 'YYYY' : 'YYYYYY'; + var datetime = '-MM-DD[T]HH:mm:ss.SSS'; + var suffix = zone + '[")]'; + return this.format(prefix + year + datetime + suffix); + } + + function format(inputString) { + if (!inputString) { + inputString = this.isUtc() ? hooks.defaultFormatUtc : hooks.defaultFormat; + } + + var output = formatMoment(this, inputString); + return this.localeData().postformat(output); + } + + function from(time, withoutSuffix) { + if (this.isValid() && (isMoment(time) && time.isValid() || createLocal(time).isValid())) { + return createDuration({ + to: this, + from: time + }).locale(this.locale()).humanize(!withoutSuffix); + } else { + return this.localeData().invalidDate(); + } + } + + function fromNow(withoutSuffix) { + return this.from(createLocal(), withoutSuffix); + } + + function to(time, withoutSuffix) { + if (this.isValid() && (isMoment(time) && time.isValid() || createLocal(time).isValid())) { + return createDuration({ + from: this, + to: time + }).locale(this.locale()).humanize(!withoutSuffix); + } else { + return this.localeData().invalidDate(); + } + } + + function toNow(withoutSuffix) { + return this.to(createLocal(), withoutSuffix); + } // If passed a locale key, it will set the locale for this + // instance. Otherwise, it will return the locale configuration + // variables for this instance. + + + function locale(key) { + var newLocaleData; + + if (key === undefined) { + return this._locale._abbr; + } else { + newLocaleData = getLocale(key); + + if (newLocaleData != null) { + this._locale = newLocaleData; + } + + return this; + } + } + + var lang = deprecate('moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.', function (key) { + if (key === undefined) { + return this.localeData(); + } else { + return this.locale(key); + } + }); + + function localeData() { + return this._locale; + } + + var MS_PER_SECOND = 1000; + var MS_PER_MINUTE = 60 * MS_PER_SECOND; + var MS_PER_HOUR = 60 * MS_PER_MINUTE; + var MS_PER_400_YEARS = (365 * 400 + 97) * 24 * MS_PER_HOUR; // actual modulo - handles negative numbers (for dates before 1970): + + function mod$1(dividend, divisor) { + return (dividend % divisor + divisor) % divisor; + } + + function localStartOfDate(y, m, d) { + // the date constructor remaps years 0-99 to 1900-1999 + if (y < 100 && y >= 0) { + // preserve leap years using a full 400 year cycle, then reset + return new Date(y + 400, m, d) - MS_PER_400_YEARS; + } else { + return new Date(y, m, d).valueOf(); + } + } + + function utcStartOfDate(y, m, d) { + // Date.UTC remaps years 0-99 to 1900-1999 + if (y < 100 && y >= 0) { + // preserve leap years using a full 400 year cycle, then reset + return Date.UTC(y + 400, m, d) - MS_PER_400_YEARS; + } else { + return Date.UTC(y, m, d); + } + } + + function startOf(units) { + var time; + units = normalizeUnits(units); + + if (units === undefined || units === 'millisecond' || !this.isValid()) { + return this; + } + + var startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate; + + switch (units) { + case 'year': + time = startOfDate(this.year(), 0, 1); + break; + + case 'quarter': + time = startOfDate(this.year(), this.month() - this.month() % 3, 1); + break; + + case 'month': + time = startOfDate(this.year(), this.month(), 1); + break; + + case 'week': + time = startOfDate(this.year(), this.month(), this.date() - this.weekday()); + break; + + case 'isoWeek': + time = startOfDate(this.year(), this.month(), this.date() - (this.isoWeekday() - 1)); + break; + + case 'day': + case 'date': + time = startOfDate(this.year(), this.month(), this.date()); + break; + + case 'hour': + time = this._d.valueOf(); + time -= mod$1(time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE), MS_PER_HOUR); + break; + + case 'minute': + time = this._d.valueOf(); + time -= mod$1(time, MS_PER_MINUTE); + break; + + case 'second': + time = this._d.valueOf(); + time -= mod$1(time, MS_PER_SECOND); + break; + } + + this._d.setTime(time); + + hooks.updateOffset(this, true); + return this; + } + + function endOf(units) { + var time; + units = normalizeUnits(units); + + if (units === undefined || units === 'millisecond' || !this.isValid()) { + return this; + } + + var startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate; + + switch (units) { + case 'year': + time = startOfDate(this.year() + 1, 0, 1) - 1; + break; + + case 'quarter': + time = startOfDate(this.year(), this.month() - this.month() % 3 + 3, 1) - 1; + break; + + case 'month': + time = startOfDate(this.year(), this.month() + 1, 1) - 1; + break; + + case 'week': + time = startOfDate(this.year(), this.month(), this.date() - this.weekday() + 7) - 1; + break; + + case 'isoWeek': + time = startOfDate(this.year(), this.month(), this.date() - (this.isoWeekday() - 1) + 7) - 1; + break; + + case 'day': + case 'date': + time = startOfDate(this.year(), this.month(), this.date() + 1) - 1; + break; + + case 'hour': + time = this._d.valueOf(); + time += MS_PER_HOUR - mod$1(time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE), MS_PER_HOUR) - 1; + break; + + case 'minute': + time = this._d.valueOf(); + time += MS_PER_MINUTE - mod$1(time, MS_PER_MINUTE) - 1; + break; + + case 'second': + time = this._d.valueOf(); + time += MS_PER_SECOND - mod$1(time, MS_PER_SECOND) - 1; + break; + } + + this._d.setTime(time); + + hooks.updateOffset(this, true); + return this; + } + + function valueOf() { + return this._d.valueOf() - (this._offset || 0) * 60000; + } + + function unix() { + return Math.floor(this.valueOf() / 1000); + } + + function toDate() { + return new Date(this.valueOf()); + } + + function toArray() { + var m = this; + return [m.year(), m.month(), m.date(), m.hour(), m.minute(), m.second(), m.millisecond()]; + } + + function toObject() { + var m = this; + return { + years: m.year(), + months: m.month(), + date: m.date(), + hours: m.hours(), + minutes: m.minutes(), + seconds: m.seconds(), + milliseconds: m.milliseconds() + }; + } + + function toJSON() { + // new Date(NaN).toJSON() === null + return this.isValid() ? this.toISOString() : null; + } + + function isValid$2() { + return isValid(this); + } + + function parsingFlags() { + return extend({}, getParsingFlags(this)); + } + + function invalidAt() { + return getParsingFlags(this).overflow; + } + + function creationData() { + return { + input: this._i, + format: this._f, + locale: this._locale, + isUTC: this._isUTC, + strict: this._strict + }; + } // FORMATTING + + + addFormatToken(0, ['gg', 2], 0, function () { + return this.weekYear() % 100; + }); + addFormatToken(0, ['GG', 2], 0, function () { + return this.isoWeekYear() % 100; + }); + + function addWeekYearFormatToken(token, getter) { + addFormatToken(0, [token, token.length], 0, getter); + } + + addWeekYearFormatToken('gggg', 'weekYear'); + addWeekYearFormatToken('ggggg', 'weekYear'); + addWeekYearFormatToken('GGGG', 'isoWeekYear'); + addWeekYearFormatToken('GGGGG', 'isoWeekYear'); // ALIASES + + addUnitAlias('weekYear', 'gg'); + addUnitAlias('isoWeekYear', 'GG'); // PRIORITY + + addUnitPriority('weekYear', 1); + addUnitPriority('isoWeekYear', 1); // PARSING + + addRegexToken('G', matchSigned); + addRegexToken('g', matchSigned); + addRegexToken('GG', match1to2, match2); + addRegexToken('gg', match1to2, match2); + addRegexToken('GGGG', match1to4, match4); + addRegexToken('gggg', match1to4, match4); + addRegexToken('GGGGG', match1to6, match6); + addRegexToken('ggggg', match1to6, match6); + addWeekParseToken(['gggg', 'ggggg', 'GGGG', 'GGGGG'], function (input, week, config, token) { + week[token.substr(0, 2)] = toInt(input); + }); + addWeekParseToken(['gg', 'GG'], function (input, week, config, token) { + week[token] = hooks.parseTwoDigitYear(input); + }); // MOMENTS + + function getSetWeekYear(input) { + return getSetWeekYearHelper.call(this, input, this.week(), this.weekday(), this.localeData()._week.dow, this.localeData()._week.doy); + } + + function getSetISOWeekYear(input) { + return getSetWeekYearHelper.call(this, input, this.isoWeek(), this.isoWeekday(), 1, 4); + } + + function getISOWeeksInYear() { + return weeksInYear(this.year(), 1, 4); + } + + function getWeeksInYear() { + var weekInfo = this.localeData()._week; + + return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy); + } + + function getSetWeekYearHelper(input, week, weekday, dow, doy) { + var weeksTarget; + + if (input == null) { + return weekOfYear(this, dow, doy).year; + } else { + weeksTarget = weeksInYear(input, dow, doy); + + if (week > weeksTarget) { + week = weeksTarget; + } + + return setWeekAll.call(this, input, week, weekday, dow, doy); + } + } + + function setWeekAll(weekYear, week, weekday, dow, doy) { + var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy), + date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear); + this.year(date.getUTCFullYear()); + this.month(date.getUTCMonth()); + this.date(date.getUTCDate()); + return this; + } // FORMATTING + + + addFormatToken('Q', 0, 'Qo', 'quarter'); // ALIASES + + addUnitAlias('quarter', 'Q'); // PRIORITY + + addUnitPriority('quarter', 7); // PARSING + + addRegexToken('Q', match1); + addParseToken('Q', function (input, array) { + array[MONTH] = (toInt(input) - 1) * 3; + }); // MOMENTS + + function getSetQuarter(input) { + return input == null ? Math.ceil((this.month() + 1) / 3) : this.month((input - 1) * 3 + this.month() % 3); + } // FORMATTING + + + addFormatToken('D', ['DD', 2], 'Do', 'date'); // ALIASES + + addUnitAlias('date', 'D'); // PRIORITY + + addUnitPriority('date', 9); // PARSING + + addRegexToken('D', match1to2); + addRegexToken('DD', match1to2, match2); + addRegexToken('Do', function (isStrict, locale) { + // TODO: Remove "ordinalParse" fallback in next major release. + return isStrict ? locale._dayOfMonthOrdinalParse || locale._ordinalParse : locale._dayOfMonthOrdinalParseLenient; + }); + addParseToken(['D', 'DD'], DATE); + addParseToken('Do', function (input, array) { + array[DATE] = toInt(input.match(match1to2)[0]); + }); // MOMENTS + + var getSetDayOfMonth = makeGetSet('Date', true); // FORMATTING + + addFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear'); // ALIASES + + addUnitAlias('dayOfYear', 'DDD'); // PRIORITY + + addUnitPriority('dayOfYear', 4); // PARSING + + addRegexToken('DDD', match1to3); + addRegexToken('DDDD', match3); + addParseToken(['DDD', 'DDDD'], function (input, array, config) { + config._dayOfYear = toInt(input); + }); // HELPERS + // MOMENTS + + function getSetDayOfYear(input) { + var dayOfYear = Math.round((this.clone().startOf('day') - this.clone().startOf('year')) / 864e5) + 1; + return input == null ? dayOfYear : this.add(input - dayOfYear, 'd'); + } // FORMATTING + + + addFormatToken('m', ['mm', 2], 0, 'minute'); // ALIASES + + addUnitAlias('minute', 'm'); // PRIORITY + + addUnitPriority('minute', 14); // PARSING + + addRegexToken('m', match1to2); + addRegexToken('mm', match1to2, match2); + addParseToken(['m', 'mm'], MINUTE); // MOMENTS + + var getSetMinute = makeGetSet('Minutes', false); // FORMATTING + + addFormatToken('s', ['ss', 2], 0, 'second'); // ALIASES + + addUnitAlias('second', 's'); // PRIORITY + + addUnitPriority('second', 15); // PARSING + + addRegexToken('s', match1to2); + addRegexToken('ss', match1to2, match2); + addParseToken(['s', 'ss'], SECOND); // MOMENTS + + var getSetSecond = makeGetSet('Seconds', false); // FORMATTING + + addFormatToken('S', 0, 0, function () { + return ~~(this.millisecond() / 100); + }); + addFormatToken(0, ['SS', 2], 0, function () { + return ~~(this.millisecond() / 10); + }); + addFormatToken(0, ['SSS', 3], 0, 'millisecond'); + addFormatToken(0, ['SSSS', 4], 0, function () { + return this.millisecond() * 10; + }); + addFormatToken(0, ['SSSSS', 5], 0, function () { + return this.millisecond() * 100; + }); + addFormatToken(0, ['SSSSSS', 6], 0, function () { + return this.millisecond() * 1000; + }); + addFormatToken(0, ['SSSSSSS', 7], 0, function () { + return this.millisecond() * 10000; + }); + addFormatToken(0, ['SSSSSSSS', 8], 0, function () { + return this.millisecond() * 100000; + }); + addFormatToken(0, ['SSSSSSSSS', 9], 0, function () { + return this.millisecond() * 1000000; + }); // ALIASES + + addUnitAlias('millisecond', 'ms'); // PRIORITY + + addUnitPriority('millisecond', 16); // PARSING + + addRegexToken('S', match1to3, match1); + addRegexToken('SS', match1to3, match2); + addRegexToken('SSS', match1to3, match3); + var token; + + for (token = 'SSSS'; token.length <= 9; token += 'S') { + addRegexToken(token, matchUnsigned); + } + + function parseMs(input, array) { + array[MILLISECOND] = toInt(('0.' + input) * 1000); + } + + for (token = 'S'; token.length <= 9; token += 'S') { + addParseToken(token, parseMs); + } // MOMENTS + + + var getSetMillisecond = makeGetSet('Milliseconds', false); // FORMATTING + + addFormatToken('z', 0, 0, 'zoneAbbr'); + addFormatToken('zz', 0, 0, 'zoneName'); // MOMENTS + + function getZoneAbbr() { + return this._isUTC ? 'UTC' : ''; + } + + function getZoneName() { + return this._isUTC ? 'Coordinated Universal Time' : ''; + } + + var proto = Moment.prototype; + proto.add = add; + proto.calendar = calendar$1; + proto.clone = clone; + proto.diff = diff; + proto.endOf = endOf; + proto.format = format; + proto.from = from; + proto.fromNow = fromNow; + proto.to = to; + proto.toNow = toNow; + proto.get = stringGet; + proto.invalidAt = invalidAt; + proto.isAfter = isAfter; + proto.isBefore = isBefore; + proto.isBetween = isBetween; + proto.isSame = isSame; + proto.isSameOrAfter = isSameOrAfter; + proto.isSameOrBefore = isSameOrBefore; + proto.isValid = isValid$2; + proto.lang = lang; + proto.locale = locale; + proto.localeData = localeData; + proto.max = prototypeMax; + proto.min = prototypeMin; + proto.parsingFlags = parsingFlags; + proto.set = stringSet; + proto.startOf = startOf; + proto.subtract = subtract; + proto.toArray = toArray; + proto.toObject = toObject; + proto.toDate = toDate; + proto.toISOString = toISOString; + proto.inspect = inspect; + proto.toJSON = toJSON; + proto.toString = toString; + proto.unix = unix; + proto.valueOf = valueOf; + proto.creationData = creationData; + proto.year = getSetYear; + proto.isLeapYear = getIsLeapYear; + proto.weekYear = getSetWeekYear; + proto.isoWeekYear = getSetISOWeekYear; + proto.quarter = proto.quarters = getSetQuarter; + proto.month = getSetMonth; + proto.daysInMonth = getDaysInMonth; + proto.week = proto.weeks = getSetWeek; + proto.isoWeek = proto.isoWeeks = getSetISOWeek; + proto.weeksInYear = getWeeksInYear; + proto.isoWeeksInYear = getISOWeeksInYear; + proto.date = getSetDayOfMonth; + proto.day = proto.days = getSetDayOfWeek; + proto.weekday = getSetLocaleDayOfWeek; + proto.isoWeekday = getSetISODayOfWeek; + proto.dayOfYear = getSetDayOfYear; + proto.hour = proto.hours = getSetHour; + proto.minute = proto.minutes = getSetMinute; + proto.second = proto.seconds = getSetSecond; + proto.millisecond = proto.milliseconds = getSetMillisecond; + proto.utcOffset = getSetOffset; + proto.utc = setOffsetToUTC; + proto.local = setOffsetToLocal; + proto.parseZone = setOffsetToParsedOffset; + proto.hasAlignedHourOffset = hasAlignedHourOffset; + proto.isDST = isDaylightSavingTime; + proto.isLocal = isLocal; + proto.isUtcOffset = isUtcOffset; + proto.isUtc = isUtc; + proto.isUTC = isUtc; + proto.zoneAbbr = getZoneAbbr; + proto.zoneName = getZoneName; + proto.dates = deprecate('dates accessor is deprecated. Use date instead.', getSetDayOfMonth); + proto.months = deprecate('months accessor is deprecated. Use month instead', getSetMonth); + proto.years = deprecate('years accessor is deprecated. Use year instead', getSetYear); + proto.zone = deprecate('moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/', getSetZone); + proto.isDSTShifted = deprecate('isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information', isDaylightSavingTimeShifted); + + function createUnix(input) { + return createLocal(input * 1000); + } + + function createInZone() { + return createLocal.apply(null, arguments).parseZone(); + } + + function preParsePostFormat(string) { + return string; + } + + var proto$1 = Locale.prototype; + proto$1.calendar = calendar; + proto$1.longDateFormat = longDateFormat; + proto$1.invalidDate = invalidDate; + proto$1.ordinal = ordinal; + proto$1.preparse = preParsePostFormat; + proto$1.postformat = preParsePostFormat; + proto$1.relativeTime = relativeTime; + proto$1.pastFuture = pastFuture; + proto$1.set = set; + proto$1.months = localeMonths; + proto$1.monthsShort = localeMonthsShort; + proto$1.monthsParse = localeMonthsParse; + proto$1.monthsRegex = monthsRegex; + proto$1.monthsShortRegex = monthsShortRegex; + proto$1.week = localeWeek; + proto$1.firstDayOfYear = localeFirstDayOfYear; + proto$1.firstDayOfWeek = localeFirstDayOfWeek; + proto$1.weekdays = localeWeekdays; + proto$1.weekdaysMin = localeWeekdaysMin; + proto$1.weekdaysShort = localeWeekdaysShort; + proto$1.weekdaysParse = localeWeekdaysParse; + proto$1.weekdaysRegex = weekdaysRegex; + proto$1.weekdaysShortRegex = weekdaysShortRegex; + proto$1.weekdaysMinRegex = weekdaysMinRegex; + proto$1.isPM = localeIsPM; + proto$1.meridiem = localeMeridiem; + + function get$1(format, index, field, setter) { + var locale = getLocale(); + var utc = createUTC().set(setter, index); + return locale[field](utc, format); + } + + function listMonthsImpl(format, index, field) { + if (isNumber(format)) { + index = format; + format = undefined; + } + + format = format || ''; + + if (index != null) { + return get$1(format, index, field, 'month'); + } + + var i; + var out = []; + + for (i = 0; i < 12; i++) { + out[i] = get$1(format, i, field, 'month'); + } + + return out; + } // () + // (5) + // (fmt, 5) + // (fmt) + // (true) + // (true, 5) + // (true, fmt, 5) + // (true, fmt) + + + function listWeekdaysImpl(localeSorted, format, index, field) { + if (typeof localeSorted === 'boolean') { + if (isNumber(format)) { + index = format; + format = undefined; + } + + format = format || ''; + } else { + format = localeSorted; + index = format; + localeSorted = false; + + if (isNumber(format)) { + index = format; + format = undefined; + } + + format = format || ''; + } + + var locale = getLocale(), + shift = localeSorted ? locale._week.dow : 0; + + if (index != null) { + return get$1(format, (index + shift) % 7, field, 'day'); + } + + var i; + var out = []; + + for (i = 0; i < 7; i++) { + out[i] = get$1(format, (i + shift) % 7, field, 'day'); + } + + return out; + } + + function listMonths(format, index) { + return listMonthsImpl(format, index, 'months'); + } + + function listMonthsShort(format, index) { + return listMonthsImpl(format, index, 'monthsShort'); + } + + function listWeekdays(localeSorted, format, index) { + return listWeekdaysImpl(localeSorted, format, index, 'weekdays'); + } + + function listWeekdaysShort(localeSorted, format, index) { + return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort'); + } + + function listWeekdaysMin(localeSorted, format, index) { + return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin'); + } + + getSetGlobalLocale('en', { + dayOfMonthOrdinalParse: /\d{1,2}(th|st|nd|rd)/, + ordinal: function (number) { + var b = number % 10, + output = toInt(number % 100 / 10) === 1 ? 'th' : b === 1 ? 'st' : b === 2 ? 'nd' : b === 3 ? 'rd' : 'th'; + return number + output; + } + }); // Side effect imports + + hooks.lang = deprecate('moment.lang is deprecated. Use moment.locale instead.', getSetGlobalLocale); + hooks.langData = deprecate('moment.langData is deprecated. Use moment.localeData instead.', getLocale); + var mathAbs = Math.abs; + + function abs() { + var data = this._data; + this._milliseconds = mathAbs(this._milliseconds); + this._days = mathAbs(this._days); + this._months = mathAbs(this._months); + data.milliseconds = mathAbs(data.milliseconds); + data.seconds = mathAbs(data.seconds); + data.minutes = mathAbs(data.minutes); + data.hours = mathAbs(data.hours); + data.months = mathAbs(data.months); + data.years = mathAbs(data.years); + return this; + } + + function addSubtract$1(duration, input, value, direction) { + var other = createDuration(input, value); + duration._milliseconds += direction * other._milliseconds; + duration._days += direction * other._days; + duration._months += direction * other._months; + return duration._bubble(); + } // supports only 2.0-style add(1, 's') or add(duration) + + + function add$1(input, value) { + return addSubtract$1(this, input, value, 1); + } // supports only 2.0-style subtract(1, 's') or subtract(duration) + + + function subtract$1(input, value) { + return addSubtract$1(this, input, value, -1); + } + + function absCeil(number) { + if (number < 0) { + return Math.floor(number); + } else { + return Math.ceil(number); + } + } + + function bubble() { + var milliseconds = this._milliseconds; + var days = this._days; + var months = this._months; + var data = this._data; + var seconds, minutes, hours, years, monthsFromDays; // if we have a mix of positive and negative values, bubble down first + // check: https://github.com/moment/moment/issues/2166 + + if (!(milliseconds >= 0 && days >= 0 && months >= 0 || milliseconds <= 0 && days <= 0 && months <= 0)) { + milliseconds += absCeil(monthsToDays(months) + days) * 864e5; + days = 0; + months = 0; + } // The following code bubbles up values, see the tests for + // examples of what that means. + + + data.milliseconds = milliseconds % 1000; + seconds = absFloor(milliseconds / 1000); + data.seconds = seconds % 60; + minutes = absFloor(seconds / 60); + data.minutes = minutes % 60; + hours = absFloor(minutes / 60); + data.hours = hours % 24; + days += absFloor(hours / 24); // convert days to months + + monthsFromDays = absFloor(daysToMonths(days)); + months += monthsFromDays; + days -= absCeil(monthsToDays(monthsFromDays)); // 12 months -> 1 year + + years = absFloor(months / 12); + months %= 12; + data.days = days; + data.months = months; + data.years = years; + return this; + } + + function daysToMonths(days) { + // 400 years have 146097 days (taking into account leap year rules) + // 400 years have 12 months === 4800 + return days * 4800 / 146097; + } + + function monthsToDays(months) { + // the reverse of daysToMonths + return months * 146097 / 4800; + } + + function as(units) { + if (!this.isValid()) { + return NaN; + } + + var days; + var months; + var milliseconds = this._milliseconds; + units = normalizeUnits(units); + + if (units === 'month' || units === 'quarter' || units === 'year') { + days = this._days + milliseconds / 864e5; + months = this._months + daysToMonths(days); + + switch (units) { + case 'month': + return months; + + case 'quarter': + return months / 3; + + case 'year': + return months / 12; + } + } else { + // handle milliseconds separately because of floating point math errors (issue #1867) + days = this._days + Math.round(monthsToDays(this._months)); + + switch (units) { + case 'week': + return days / 7 + milliseconds / 6048e5; + + case 'day': + return days + milliseconds / 864e5; + + case 'hour': + return days * 24 + milliseconds / 36e5; + + case 'minute': + return days * 1440 + milliseconds / 6e4; + + case 'second': + return days * 86400 + milliseconds / 1000; + // Math.floor prevents floating point math errors here + + case 'millisecond': + return Math.floor(days * 864e5) + milliseconds; + + default: + throw new Error('Unknown unit ' + units); + } + } + } // TODO: Use this.as('ms')? + + + function valueOf$1() { + if (!this.isValid()) { + return NaN; + } + + return this._milliseconds + this._days * 864e5 + this._months % 12 * 2592e6 + toInt(this._months / 12) * 31536e6; + } + + function makeAs(alias) { + return function () { + return this.as(alias); + }; + } + + var asMilliseconds = makeAs('ms'); + var asSeconds = makeAs('s'); + var asMinutes = makeAs('m'); + var asHours = makeAs('h'); + var asDays = makeAs('d'); + var asWeeks = makeAs('w'); + var asMonths = makeAs('M'); + var asQuarters = makeAs('Q'); + var asYears = makeAs('y'); + + function clone$1() { + return createDuration(this); + } + + function get$2(units) { + units = normalizeUnits(units); + return this.isValid() ? this[units + 's']() : NaN; + } + + function makeGetter(name) { + return function () { + return this.isValid() ? this._data[name] : NaN; + }; + } + + var milliseconds = makeGetter('milliseconds'); + var seconds = makeGetter('seconds'); + var minutes = makeGetter('minutes'); + var hours = makeGetter('hours'); + var days = makeGetter('days'); + var months = makeGetter('months'); + var years = makeGetter('years'); + + function weeks() { + return absFloor(this.days() / 7); + } + + var round = Math.round; + var thresholds = { + ss: 44, + // a few seconds to seconds + s: 45, + // seconds to minute + m: 45, + // minutes to hour + h: 22, + // hours to day + d: 26, + // days to month + M: 11 // months to year + + }; // helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize + + function substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) { + return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture); + } + + function relativeTime$1(posNegDuration, withoutSuffix, locale) { + var duration = createDuration(posNegDuration).abs(); + var seconds = round(duration.as('s')); + var minutes = round(duration.as('m')); + var hours = round(duration.as('h')); + var days = round(duration.as('d')); + var months = round(duration.as('M')); + var years = round(duration.as('y')); + var a = seconds <= thresholds.ss && ['s', seconds] || seconds < thresholds.s && ['ss', seconds] || minutes <= 1 && ['m'] || minutes < thresholds.m && ['mm', minutes] || hours <= 1 && ['h'] || hours < thresholds.h && ['hh', hours] || days <= 1 && ['d'] || days < thresholds.d && ['dd', days] || months <= 1 && ['M'] || months < thresholds.M && ['MM', months] || years <= 1 && ['y'] || ['yy', years]; + a[2] = withoutSuffix; + a[3] = +posNegDuration > 0; + a[4] = locale; + return substituteTimeAgo.apply(null, a); + } // This function allows you to set the rounding function for relative time strings + + + function getSetRelativeTimeRounding(roundingFunction) { + if (roundingFunction === undefined) { + return round; + } + + if (typeof roundingFunction === 'function') { + round = roundingFunction; + return true; + } + + return false; + } // This function allows you to set a threshold for relative time strings + + + function getSetRelativeTimeThreshold(threshold, limit) { + if (thresholds[threshold] === undefined) { + return false; + } + + if (limit === undefined) { + return thresholds[threshold]; + } + + thresholds[threshold] = limit; + + if (threshold === 's') { + thresholds.ss = limit - 1; + } + + return true; + } + + function humanize(withSuffix) { + if (!this.isValid()) { + return this.localeData().invalidDate(); + } + + var locale = this.localeData(); + var output = relativeTime$1(this, !withSuffix, locale); + + if (withSuffix) { + output = locale.pastFuture(+this, output); + } + + return locale.postformat(output); + } + + var abs$1 = Math.abs; + + function sign(x) { + return (x > 0) - (x < 0) || +x; + } + + function toISOString$1() { + // for ISO strings we do not use the normal bubbling rules: + // * milliseconds bubble up until they become hours + // * days do not bubble at all + // * months bubble up until they become years + // This is because there is no context-free conversion between hours and days + // (think of clock changes) + // and also not between days and months (28-31 days per month) + if (!this.isValid()) { + return this.localeData().invalidDate(); + } + + var seconds = abs$1(this._milliseconds) / 1000; + var days = abs$1(this._days); + var months = abs$1(this._months); + var minutes, hours, years; // 3600 seconds -> 60 minutes -> 1 hour + + minutes = absFloor(seconds / 60); + hours = absFloor(minutes / 60); + seconds %= 60; + minutes %= 60; // 12 months -> 1 year + + years = absFloor(months / 12); + months %= 12; // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js + + var Y = years; + var M = months; + var D = days; + var h = hours; + var m = minutes; + var s = seconds ? seconds.toFixed(3).replace(/\.?0+$/, '') : ''; + var total = this.asSeconds(); + + if (!total) { + // this is the same as C#'s (Noda) and python (isodate)... + // but not other JS (goog.date) + return 'P0D'; + } + + var totalSign = total < 0 ? '-' : ''; + var ymSign = sign(this._months) !== sign(total) ? '-' : ''; + var daysSign = sign(this._days) !== sign(total) ? '-' : ''; + var hmsSign = sign(this._milliseconds) !== sign(total) ? '-' : ''; + return totalSign + 'P' + (Y ? ymSign + Y + 'Y' : '') + (M ? ymSign + M + 'M' : '') + (D ? daysSign + D + 'D' : '') + (h || m || s ? 'T' : '') + (h ? hmsSign + h + 'H' : '') + (m ? hmsSign + m + 'M' : '') + (s ? hmsSign + s + 'S' : ''); + } + + var proto$2 = Duration.prototype; + proto$2.isValid = isValid$1; + proto$2.abs = abs; + proto$2.add = add$1; + proto$2.subtract = subtract$1; + proto$2.as = as; + proto$2.asMilliseconds = asMilliseconds; + proto$2.asSeconds = asSeconds; + proto$2.asMinutes = asMinutes; + proto$2.asHours = asHours; + proto$2.asDays = asDays; + proto$2.asWeeks = asWeeks; + proto$2.asMonths = asMonths; + proto$2.asQuarters = asQuarters; + proto$2.asYears = asYears; + proto$2.valueOf = valueOf$1; + proto$2._bubble = bubble; + proto$2.clone = clone$1; + proto$2.get = get$2; + proto$2.milliseconds = milliseconds; + proto$2.seconds = seconds; + proto$2.minutes = minutes; + proto$2.hours = hours; + proto$2.days = days; + proto$2.weeks = weeks; + proto$2.months = months; + proto$2.years = years; + proto$2.humanize = humanize; + proto$2.toISOString = toISOString$1; + proto$2.toString = toISOString$1; + proto$2.toJSON = toISOString$1; + proto$2.locale = locale; + proto$2.localeData = localeData; + proto$2.toIsoString = deprecate('toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)', toISOString$1); + proto$2.lang = lang; // Side effect imports + // FORMATTING + + addFormatToken('X', 0, 0, 'unix'); + addFormatToken('x', 0, 0, 'valueOf'); // PARSING + + addRegexToken('x', matchSigned); + addRegexToken('X', matchTimestamp); + addParseToken('X', function (input, array, config) { + config._d = new Date(parseFloat(input, 10) * 1000); + }); + addParseToken('x', function (input, array, config) { + config._d = new Date(toInt(input)); + }); // Side effect imports + + hooks.version = '2.24.0'; + setHookCallback(createLocal); + hooks.fn = proto; + hooks.min = min; + hooks.max = max; + hooks.now = now; + hooks.utc = createUTC; + hooks.unix = createUnix; + hooks.months = listMonths; + hooks.isDate = isDate; + hooks.locale = getSetGlobalLocale; + hooks.invalid = createInvalid; + hooks.duration = createDuration; + hooks.isMoment = isMoment; + hooks.weekdays = listWeekdays; + hooks.parseZone = createInZone; + hooks.localeData = getLocale; + hooks.isDuration = isDuration; + hooks.monthsShort = listMonthsShort; + hooks.weekdaysMin = listWeekdaysMin; + hooks.defineLocale = defineLocale; + hooks.updateLocale = updateLocale; + hooks.locales = listLocales; + hooks.weekdaysShort = listWeekdaysShort; + hooks.normalizeUnits = normalizeUnits; + hooks.relativeTimeRounding = getSetRelativeTimeRounding; + hooks.relativeTimeThreshold = getSetRelativeTimeThreshold; + hooks.calendarFormat = getCalendarFormat; + hooks.prototype = proto; // currently HTML5 input type only supports 24-hour formats + + hooks.HTML5_FMT = { + DATETIME_LOCAL: 'YYYY-MM-DDTHH:mm', + // + DATETIME_LOCAL_SECONDS: 'YYYY-MM-DDTHH:mm:ss', + // + DATETIME_LOCAL_MS: 'YYYY-MM-DDTHH:mm:ss.SSS', + // + DATE: 'YYYY-MM-DD', + // + TIME: 'HH:mm', + // + TIME_SECONDS: 'HH:mm:ss', + // + TIME_MS: 'HH:mm:ss.SSS', + // + WEEK: 'GGGG-[W]WW', + // + MONTH: 'YYYY-MM' // + + }; + return hooks; + }); + }); + + // use this instance. Else, load via commonjs. + + var moment$3 = typeof window !== 'undefined' && window['moment'] || moment$2; + + var moment$4 = /*#__PURE__*/Object.freeze({ + 'default': moment$3, + __moduleExports: moment$3 + }); + + // vis-util + var network = { + Images: Images, + dotparser: dotparser$1, + gephiParser: gephiParser, + allOptions: allOptions$2, + convertDot: DOTToGraph_1, + convertGephi: parseGephi + }; // utils + + var index$2 = /*#__PURE__*/Object.freeze({ + util: esm, + data: esm$1, + network: network, + DOMutil: DOMutil$1, + moment: moment$4, + Hammer: hammer$1, + keycharm: keycharm$1, + DataSet: DataSet, + DataView: DataView, + Queue: Queue, + Network: Network + }); + + exports.DOMutil = DOMutil$1; + exports.DataSet = DataSet; + exports.DataView = DataView; + exports.Hammer = hammer$1; + exports.Network = Network; + exports.Queue = Queue; + exports.data = esm$1; + exports.default = index$2; + exports.keycharm = keycharm$1; + exports.moment = moment$4; + exports.network = network; + exports.util = esm; + + Object.defineProperty(exports, '__esModule', { value: true }); + +})); +//# sourceMappingURL=vis-network.js.map diff --git a/node_modules/vis-network/dist/vis-network.js.map b/node_modules/vis-network/dist/vis-network.js.map new file mode 100644 index 0000000000000000000000000000000000000000..f92611bc6bdd0d389141c5bc76f59ff2ce1043e7 --- /dev/null +++ b/node_modules/vis-network/dist/vis-network.js.map @@ -0,0 +1 @@ +{"version":3,"file":"vis-network.js","sources":["../node_modules/vis-util/dist/esm.js","../node_modules/vis-data/dist/esm.js","../lib/network/shapes.js","../node_modules/component-emitter/index.js","../lib/network/dotparser.js","../lib/network/gephiParser.ts","../node_modules/keycharm/keycharm.js","../node_modules/@egjs/hammerjs/dist/hammer.esm.js","../lib/module/hammer.js","../lib/shared/Activator.js","../lib/network/locales.js","../node_modules/@babel/runtime/helpers/classCallCheck.js","../node_modules/@babel/runtime/helpers/createClass.js","../lib/network/CachedImage.js","../lib/network/Images.js","../lib/network/modules/Groups.js","../node_modules/@babel/runtime/helpers/arrayWithHoles.js","../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js","../node_modules/@babel/runtime/helpers/nonIterableRest.js","../node_modules/@babel/runtime/helpers/slicedToArray.js","../node_modules/@babel/runtime/helpers/typeof.js","../lib/network/modules/components/shared/ComponentUtil.js","../lib/network/modules/components/shared/LabelAccumulator.js","../lib/network/modules/components/shared/LabelSplitter.js","../lib/network/modules/components/shared/Label.js","../node_modules/@babel/runtime/helpers/assertThisInitialized.js","../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js","../node_modules/@babel/runtime/helpers/getPrototypeOf.js","../node_modules/@babel/runtime/helpers/setPrototypeOf.js","../node_modules/@babel/runtime/helpers/inherits.js","../lib/network/modules/components/nodes/util/NodeBase.js","../lib/network/modules/components/nodes/shapes/Box.js","../lib/network/modules/components/nodes/util/CircleImageBase.js","../lib/network/modules/components/nodes/shapes/Circle.js","../lib/network/modules/components/nodes/shapes/CircularImage.js","../lib/network/modules/components/nodes/shapes/Database.js","../lib/network/modules/components/nodes/util/ShapeBase.js","../lib/network/modules/components/nodes/shapes/Diamond.js","../lib/network/modules/components/nodes/shapes/Dot.js","../lib/network/modules/components/nodes/shapes/Ellipse.js","../lib/network/modules/components/nodes/shapes/Icon.js","../lib/network/modules/components/nodes/shapes/Image.js","../lib/network/modules/components/nodes/shapes/Square.js","../lib/network/modules/components/nodes/shapes/Hexagon.js","../lib/network/modules/components/nodes/shapes/Star.js","../lib/network/modules/components/nodes/shapes/Text.js","../lib/network/modules/components/nodes/shapes/Triangle.js","../lib/network/modules/components/nodes/shapes/TriangleDown.js","../lib/shared/Validator.js","../lib/network/modules/components/Node.js","../lib/network/modules/NodesHandler.js","../lib/network/modules/components/edges/util/EndPoints.js","../lib/network/modules/components/edges/util/EdgeBase.js","../lib/network/modules/components/edges/util/BezierEdgeBase.js","../lib/network/modules/components/edges/util/CubicBezierEdgeBase.js","../lib/network/modules/components/edges/CubicBezierEdge.js","../lib/network/modules/components/edges/BezierEdgeDynamic.js","../lib/network/modules/components/edges/BezierEdgeStatic.js","../lib/network/modules/components/edges/StraightEdge.js","../lib/network/modules/components/Edge.js","../lib/network/modules/EdgesHandler.js","../lib/network/modules/components/physics/BarnesHutSolver.js","../lib/network/modules/components/physics/RepulsionSolver.js","../lib/network/modules/components/physics/HierarchicalRepulsionSolver.js","../lib/network/modules/components/physics/SpringSolver.js","../lib/network/modules/components/physics/HierarchicalSpringSolver.js","../lib/network/modules/components/physics/CentralGravitySolver.js","../lib/network/modules/components/physics/FA2BasedRepulsionSolver.js","../lib/network/modules/components/physics/FA2BasedCentralGravitySolver.js","../lib/network/modules/PhysicsEngine.js","../lib/network/NetworkUtil.js","../lib/network/modules/components/nodes/Cluster.js","../lib/network/modules/Clustering.js","../lib/network/modules/CanvasRenderer.js","../lib/hammerUtil.js","../lib/network/modules/Canvas.js","../lib/network/modules/View.js","../lib/network/modules/components/NavigationHandler.js","../lib/shared/Popup.js","../lib/network/modules/InteractionHandler.js","../lib/network/modules/SelectionHandler.js","../node_modules/timsort/build/timsort.js","../node_modules/timsort/index.js","../lib/network/modules/components/DirectionStrategy.js","../lib/network/modules/LayoutEngine.js","../lib/network/modules/ManipulationSystem.js","../lib/shared/ColorPicker.js","../lib/shared/Configurator.js","../lib/network/options.js","../lib/network/modules/components/algorithms/FloydWarshall.js","../lib/network/modules/KamadaKawai.js","../lib/network/Network.js","../lib/DOMutil.js","../node_modules/moment/moment.js","../lib/module/moment.js","../lib/index.ts"],"sourcesContent":["var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};\n\nfunction commonjsRequire () {\n\tthrow new Error('Dynamic requires are not currently supported by rollup-plugin-commonjs');\n}\n\nfunction createCommonjsModule(fn, module) {\n\treturn module = { exports: {} }, fn(module, module.exports), module.exports;\n}\n\nvar _global = createCommonjsModule(function (module) {\n // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028\n var global = module.exports = typeof window != 'undefined' && window.Math == Math ? window : typeof self != 'undefined' && self.Math == Math ? self // eslint-disable-next-line no-new-func\n : Function('return this')();\n if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef\n});\n\nvar _core = createCommonjsModule(function (module) {\n var core = module.exports = {\n version: '2.6.9'\n };\n if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef\n});\nvar _core_1 = _core.version;\n\nvar _library = false;\n\nvar _shared = createCommonjsModule(function (module) {\n var SHARED = '__core-js_shared__';\n var store = _global[SHARED] || (_global[SHARED] = {});\n (module.exports = function (key, value) {\n return store[key] || (store[key] = value !== undefined ? value : {});\n })('versions', []).push({\n version: _core.version,\n mode: 'global',\n copyright: '© 2019 Denis Pushkarev (zloirock.ru)'\n });\n});\n\nvar id = 0;\nvar px = Math.random();\n\nvar _uid = function (key) {\n return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));\n};\n\nvar _wks = createCommonjsModule(function (module) {\n var store = _shared('wks');\n var Symbol = _global.Symbol;\n var USE_SYMBOL = typeof Symbol == 'function';\n\n var $exports = module.exports = function (name) {\n return store[name] || (store[name] = USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : _uid)('Symbol.' + name));\n };\n\n $exports.store = store;\n});\n\nvar f = _wks;\nvar _wksExt = {\n f: f\n};\n\nvar _isObject = function (it) {\n return typeof it === 'object' ? it !== null : typeof it === 'function';\n};\n\nvar _anObject = function (it) {\n if (!_isObject(it)) throw TypeError(it + ' is not an object!');\n return it;\n};\n\nvar _fails = function (exec) {\n try {\n return !!exec();\n } catch (e) {\n return true;\n }\n};\n\nvar _descriptors = !_fails(function () {\n return Object.defineProperty({}, 'a', {\n get: function () {\n return 7;\n }\n }).a != 7;\n});\n\nvar document$1 = _global.document; // typeof document.createElement is 'object' in old IE\n\nvar is = _isObject(document$1) && _isObject(document$1.createElement);\n\nvar _domCreate = function (it) {\n return is ? document$1.createElement(it) : {};\n};\n\nvar _ie8DomDefine = !_descriptors && !_fails(function () {\n return Object.defineProperty(_domCreate('div'), 'a', {\n get: function () {\n return 7;\n }\n }).a != 7;\n});\n\n// instead of the ES6 spec version, we didn't implement @@toPrimitive case\n// and the second argument - flag - preferred type is a string\n\nvar _toPrimitive = function (it, S) {\n if (!_isObject(it)) return it;\n var fn, val;\n if (S && typeof (fn = it.toString) == 'function' && !_isObject(val = fn.call(it))) return val;\n if (typeof (fn = it.valueOf) == 'function' && !_isObject(val = fn.call(it))) return val;\n if (!S && typeof (fn = it.toString) == 'function' && !_isObject(val = fn.call(it))) return val;\n throw TypeError(\"Can't convert object to primitive value\");\n};\n\nvar dP = Object.defineProperty;\nvar f$1 = _descriptors ? Object.defineProperty : function defineProperty(O, P, Attributes) {\n _anObject(O);\n P = _toPrimitive(P, true);\n _anObject(Attributes);\n if (_ie8DomDefine) try {\n return dP(O, P, Attributes);\n } catch (e) {\n /* empty */\n }\n if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!');\n if ('value' in Attributes) O[P] = Attributes.value;\n return O;\n};\nvar _objectDp = {\n f: f$1\n};\n\nvar defineProperty = _objectDp.f;\n\nvar _wksDefine = function (name) {\n var $Symbol = _core.Symbol || (_core.Symbol = _global.Symbol || {});\n if (name.charAt(0) != '_' && !(name in $Symbol)) defineProperty($Symbol, name, {\n value: _wksExt.f(name)\n });\n};\n\n_wksDefine('asyncIterator');\n\nvar hasOwnProperty = {}.hasOwnProperty;\n\nvar _has = function (it, key) {\n return hasOwnProperty.call(it, key);\n};\n\nvar _propertyDesc = function (bitmap, value) {\n return {\n enumerable: !(bitmap & 1),\n configurable: !(bitmap & 2),\n writable: !(bitmap & 4),\n value: value\n };\n};\n\nvar _hide = _descriptors ? function (object, key, value) {\n return _objectDp.f(object, key, _propertyDesc(1, value));\n} : function (object, key, value) {\n object[key] = value;\n return object;\n};\n\nvar _functionToString = _shared('native-function-to-string', Function.toString);\n\nvar _redefine = createCommonjsModule(function (module) {\n var SRC = _uid('src');\n var TO_STRING = 'toString';\n var TPL = ('' + _functionToString).split(TO_STRING);\n\n _core.inspectSource = function (it) {\n return _functionToString.call(it);\n };\n\n (module.exports = function (O, key, val, safe) {\n var isFunction = typeof val == 'function';\n if (isFunction) _has(val, 'name') || _hide(val, 'name', key);\n if (O[key] === val) return;\n if (isFunction) _has(val, SRC) || _hide(val, SRC, O[key] ? '' + O[key] : TPL.join(String(key)));\n\n if (O === _global) {\n O[key] = val;\n } else if (!safe) {\n delete O[key];\n _hide(O, key, val);\n } else if (O[key]) {\n O[key] = val;\n } else {\n _hide(O, key, val);\n } // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative\n\n })(Function.prototype, TO_STRING, function toString() {\n return typeof this == 'function' && this[SRC] || _functionToString.call(this);\n });\n});\n\nvar _aFunction = function (it) {\n if (typeof it != 'function') throw TypeError(it + ' is not a function!');\n return it;\n};\n\nvar _ctx = function (fn, that, length) {\n _aFunction(fn);\n if (that === undefined) return fn;\n\n switch (length) {\n case 1:\n return function (a) {\n return fn.call(that, a);\n };\n\n case 2:\n return function (a, b) {\n return fn.call(that, a, b);\n };\n\n case 3:\n return function (a, b, c) {\n return fn.call(that, a, b, c);\n };\n }\n\n return function ()\n /* ...args */\n {\n return fn.apply(that, arguments);\n };\n};\n\nvar PROTOTYPE = 'prototype';\n\nvar $export = function (type, name, source) {\n var IS_FORCED = type & $export.F;\n var IS_GLOBAL = type & $export.G;\n var IS_STATIC = type & $export.S;\n var IS_PROTO = type & $export.P;\n var IS_BIND = type & $export.B;\n var target = IS_GLOBAL ? _global : IS_STATIC ? _global[name] || (_global[name] = {}) : (_global[name] || {})[PROTOTYPE];\n var exports = IS_GLOBAL ? _core : _core[name] || (_core[name] = {});\n var expProto = exports[PROTOTYPE] || (exports[PROTOTYPE] = {});\n var key, own, out, exp;\n if (IS_GLOBAL) source = name;\n\n for (key in source) {\n // contains in native\n own = !IS_FORCED && target && target[key] !== undefined; // export native or passed\n\n out = (own ? target : source)[key]; // bind timers to global for call from export context\n\n exp = IS_BIND && own ? _ctx(out, _global) : IS_PROTO && typeof out == 'function' ? _ctx(Function.call, out) : out; // extend global\n\n if (target) _redefine(target, key, out, type & $export.U); // export\n\n if (exports[key] != out) _hide(exports, key, exp);\n if (IS_PROTO && expProto[key] != out) expProto[key] = out;\n }\n};\n\n_global.core = _core; // type bitmap\n\n$export.F = 1; // forced\n\n$export.G = 2; // global\n\n$export.S = 4; // static\n\n$export.P = 8; // proto\n\n$export.B = 16; // bind\n\n$export.W = 32; // wrap\n\n$export.U = 64; // safe\n\n$export.R = 128; // real proto method for `library`\n\nvar _export = $export;\n\nvar _meta = createCommonjsModule(function (module) {\n var META = _uid('meta');\n var setDesc = _objectDp.f;\n var id = 0;\n\n var isExtensible = Object.isExtensible || function () {\n return true;\n };\n\n var FREEZE = !_fails(function () {\n return isExtensible(Object.preventExtensions({}));\n });\n\n var setMeta = function (it) {\n setDesc(it, META, {\n value: {\n i: 'O' + ++id,\n // object ID\n w: {} // weak collections IDs\n\n }\n });\n };\n\n var fastKey = function (it, create) {\n // return primitive with prefix\n if (!_isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it;\n\n if (!_has(it, META)) {\n // can't set metadata to uncaught frozen object\n if (!isExtensible(it)) return 'F'; // not necessary to add metadata\n\n if (!create) return 'E'; // add missing metadata\n\n setMeta(it); // return object ID\n }\n\n return it[META].i;\n };\n\n var getWeak = function (it, create) {\n if (!_has(it, META)) {\n // can't set metadata to uncaught frozen object\n if (!isExtensible(it)) return true; // not necessary to add metadata\n\n if (!create) return false; // add missing metadata\n\n setMeta(it); // return hash weak collections IDs\n }\n\n return it[META].w;\n }; // add metadata on freeze-family methods calling\n\n\n var onFreeze = function (it) {\n if (FREEZE && meta.NEED && isExtensible(it) && !_has(it, META)) setMeta(it);\n return it;\n };\n\n var meta = module.exports = {\n KEY: META,\n NEED: false,\n fastKey: fastKey,\n getWeak: getWeak,\n onFreeze: onFreeze\n };\n});\nvar _meta_1 = _meta.KEY;\nvar _meta_2 = _meta.NEED;\nvar _meta_3 = _meta.fastKey;\nvar _meta_4 = _meta.getWeak;\nvar _meta_5 = _meta.onFreeze;\n\nvar def = _objectDp.f;\nvar TAG = _wks('toStringTag');\n\nvar _setToStringTag = function (it, tag, stat) {\n if (it && !_has(it = stat ? it : it.prototype, TAG)) def(it, TAG, {\n configurable: true,\n value: tag\n });\n};\n\nvar toString = {}.toString;\n\nvar _cof = function (it) {\n return toString.call(it).slice(8, -1);\n};\n\n// eslint-disable-next-line no-prototype-builtins\n\nvar _iobject = Object('z').propertyIsEnumerable(0) ? Object : function (it) {\n return _cof(it) == 'String' ? it.split('') : Object(it);\n};\n\n// 7.2.1 RequireObjectCoercible(argument)\nvar _defined = function (it) {\n if (it == undefined) throw TypeError(\"Can't call method on \" + it);\n return it;\n};\n\nvar _toIobject = function (it) {\n return _iobject(_defined(it));\n};\n\n// 7.1.4 ToInteger\nvar ceil = Math.ceil;\nvar floor = Math.floor;\n\nvar _toInteger = function (it) {\n return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);\n};\n\nvar min = Math.min;\n\nvar _toLength = function (it) {\n return it > 0 ? min(_toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991\n};\n\nvar max = Math.max;\nvar min$1 = Math.min;\n\nvar _toAbsoluteIndex = function (index, length) {\n index = _toInteger(index);\n return index < 0 ? max(index + length, 0) : min$1(index, length);\n};\n\n// true -> Array#includes\n\nvar _arrayIncludes = function (IS_INCLUDES) {\n return function ($this, el, fromIndex) {\n var O = _toIobject($this);\n var length = _toLength(O.length);\n var index = _toAbsoluteIndex(fromIndex, length);\n var value; // Array#includes uses SameValueZero equality algorithm\n // eslint-disable-next-line no-self-compare\n\n if (IS_INCLUDES && el != el) while (length > index) {\n value = O[index++]; // eslint-disable-next-line no-self-compare\n\n if (value != value) return true; // Array#indexOf ignores holes, Array#includes - not\n } else for (; length > index; index++) if (IS_INCLUDES || index in O) {\n if (O[index] === el) return IS_INCLUDES || index || 0;\n }\n return !IS_INCLUDES && -1;\n };\n};\n\nvar shared = _shared('keys');\n\nvar _sharedKey = function (key) {\n return shared[key] || (shared[key] = _uid(key));\n};\n\nvar arrayIndexOf = _arrayIncludes(false);\nvar IE_PROTO = _sharedKey('IE_PROTO');\n\nvar _objectKeysInternal = function (object, names) {\n var O = _toIobject(object);\n var i = 0;\n var result = [];\n var key;\n\n for (key in O) if (key != IE_PROTO) _has(O, key) && result.push(key); // Don't enum bug & hidden keys\n\n\n while (names.length > i) if (_has(O, key = names[i++])) {\n ~arrayIndexOf(result, key) || result.push(key);\n }\n\n return result;\n};\n\n// IE 8- don't enum bug keys\nvar _enumBugKeys = 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'.split(',');\n\nvar _objectKeys = Object.keys || function keys(O) {\n return _objectKeysInternal(O, _enumBugKeys);\n};\n\nvar f$2 = Object.getOwnPropertySymbols;\nvar _objectGops = {\n f: f$2\n};\n\nvar f$3 = {}.propertyIsEnumerable;\nvar _objectPie = {\n f: f$3\n};\n\nvar _enumKeys = function (it) {\n var result = _objectKeys(it);\n var getSymbols = _objectGops.f;\n\n if (getSymbols) {\n var symbols = getSymbols(it);\n var isEnum = _objectPie.f;\n var i = 0;\n var key;\n\n while (symbols.length > i) if (isEnum.call(it, key = symbols[i++])) result.push(key);\n }\n\n return result;\n};\n\nvar _isArray = Array.isArray || function isArray(arg) {\n return _cof(arg) == 'Array';\n};\n\nvar _toObject = function (it) {\n return Object(_defined(it));\n};\n\nvar _objectDps = _descriptors ? Object.defineProperties : function defineProperties(O, Properties) {\n _anObject(O);\n var keys = _objectKeys(Properties);\n var length = keys.length;\n var i = 0;\n var P;\n\n while (length > i) _objectDp.f(O, P = keys[i++], Properties[P]);\n\n return O;\n};\n\nvar document$2 = _global.document;\n\nvar _html = document$2 && document$2.documentElement;\n\nvar IE_PROTO$1 = _sharedKey('IE_PROTO');\n\nvar Empty = function () {\n /* empty */\n};\n\nvar PROTOTYPE$1 = 'prototype'; // Create object with fake `null` prototype: use iframe Object with cleared prototype\n\nvar createDict = function () {\n // Thrash, waste and sodomy: IE GC bug\n var iframe = _domCreate('iframe');\n var i = _enumBugKeys.length;\n var lt = '<';\n var gt = '>';\n var iframeDocument;\n iframe.style.display = 'none';\n _html.appendChild(iframe);\n iframe.src = 'javascript:'; // eslint-disable-line no-script-url\n // createDict = iframe.contentWindow.Object;\n // html.removeChild(iframe);\n\n iframeDocument = iframe.contentWindow.document;\n iframeDocument.open();\n iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt);\n iframeDocument.close();\n createDict = iframeDocument.F;\n\n while (i--) delete createDict[PROTOTYPE$1][_enumBugKeys[i]];\n\n return createDict();\n};\n\nvar _objectCreate = Object.create || function create(O, Properties) {\n var result;\n\n if (O !== null) {\n Empty[PROTOTYPE$1] = _anObject(O);\n result = new Empty();\n Empty[PROTOTYPE$1] = null; // add \"__proto__\" for Object.getPrototypeOf polyfill\n\n result[IE_PROTO$1] = O;\n } else result = createDict();\n\n return Properties === undefined ? result : _objectDps(result, Properties);\n};\n\nvar hiddenKeys = _enumBugKeys.concat('length', 'prototype');\n\nvar f$4 = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {\n return _objectKeysInternal(O, hiddenKeys);\n};\n\nvar _objectGopn = {\n f: f$4\n};\n\nvar gOPN = _objectGopn.f;\nvar toString$1 = {}.toString;\nvar windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames ? Object.getOwnPropertyNames(window) : [];\n\nvar getWindowNames = function (it) {\n try {\n return gOPN(it);\n } catch (e) {\n return windowNames.slice();\n }\n};\n\nvar f$5 = function getOwnPropertyNames(it) {\n return windowNames && toString$1.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(_toIobject(it));\n};\n\nvar _objectGopnExt = {\n f: f$5\n};\n\nvar gOPD = Object.getOwnPropertyDescriptor;\nvar f$6 = _descriptors ? gOPD : function getOwnPropertyDescriptor(O, P) {\n O = _toIobject(O);\n P = _toPrimitive(P, true);\n if (_ie8DomDefine) try {\n return gOPD(O, P);\n } catch (e) {\n /* empty */\n }\n if (_has(O, P)) return _propertyDesc(!_objectPie.f.call(O, P), O[P]);\n};\nvar _objectGopd = {\n f: f$6\n};\n\nvar META = _meta.KEY;\nvar gOPD$1 = _objectGopd.f;\nvar dP$1 = _objectDp.f;\nvar gOPN$1 = _objectGopnExt.f;\nvar $Symbol = _global.Symbol;\nvar $JSON = _global.JSON;\n\nvar _stringify = $JSON && $JSON.stringify;\n\nvar PROTOTYPE$2 = 'prototype';\nvar HIDDEN = _wks('_hidden');\nvar TO_PRIMITIVE = _wks('toPrimitive');\nvar isEnum = {}.propertyIsEnumerable;\nvar SymbolRegistry = _shared('symbol-registry');\nvar AllSymbols = _shared('symbols');\nvar OPSymbols = _shared('op-symbols');\nvar ObjectProto = Object[PROTOTYPE$2];\nvar USE_NATIVE = typeof $Symbol == 'function' && !!_objectGops.f;\nvar QObject = _global.QObject; // Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173\n\nvar setter = !QObject || !QObject[PROTOTYPE$2] || !QObject[PROTOTYPE$2].findChild; // fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687\n\nvar setSymbolDesc = _descriptors && _fails(function () {\n return _objectCreate(dP$1({}, 'a', {\n get: function () {\n return dP$1(this, 'a', {\n value: 7\n }).a;\n }\n })).a != 7;\n}) ? function (it, key, D) {\n var protoDesc = gOPD$1(ObjectProto, key);\n if (protoDesc) delete ObjectProto[key];\n dP$1(it, key, D);\n if (protoDesc && it !== ObjectProto) dP$1(ObjectProto, key, protoDesc);\n} : dP$1;\n\nvar wrap = function (tag) {\n var sym = AllSymbols[tag] = _objectCreate($Symbol[PROTOTYPE$2]);\n\n sym._k = tag;\n return sym;\n};\n\nvar isSymbol = USE_NATIVE && typeof $Symbol.iterator == 'symbol' ? function (it) {\n return typeof it == 'symbol';\n} : function (it) {\n return it instanceof $Symbol;\n};\n\nvar $defineProperty = function defineProperty(it, key, D) {\n if (it === ObjectProto) $defineProperty(OPSymbols, key, D);\n _anObject(it);\n key = _toPrimitive(key, true);\n _anObject(D);\n\n if (_has(AllSymbols, key)) {\n if (!D.enumerable) {\n if (!_has(it, HIDDEN)) dP$1(it, HIDDEN, _propertyDesc(1, {}));\n it[HIDDEN][key] = true;\n } else {\n if (_has(it, HIDDEN) && it[HIDDEN][key]) it[HIDDEN][key] = false;\n D = _objectCreate(D, {\n enumerable: _propertyDesc(0, false)\n });\n }\n\n return setSymbolDesc(it, key, D);\n }\n\n return dP$1(it, key, D);\n};\n\nvar $defineProperties = function defineProperties(it, P) {\n _anObject(it);\n var keys = _enumKeys(P = _toIobject(P));\n var i = 0;\n var l = keys.length;\n var key;\n\n while (l > i) $defineProperty(it, key = keys[i++], P[key]);\n\n return it;\n};\n\nvar $create = function create(it, P) {\n return P === undefined ? _objectCreate(it) : $defineProperties(_objectCreate(it), P);\n};\n\nvar $propertyIsEnumerable = function propertyIsEnumerable(key) {\n var E = isEnum.call(this, key = _toPrimitive(key, true));\n if (this === ObjectProto && _has(AllSymbols, key) && !_has(OPSymbols, key)) return false;\n return E || !_has(this, key) || !_has(AllSymbols, key) || _has(this, HIDDEN) && this[HIDDEN][key] ? E : true;\n};\n\nvar $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key) {\n it = _toIobject(it);\n key = _toPrimitive(key, true);\n if (it === ObjectProto && _has(AllSymbols, key) && !_has(OPSymbols, key)) return;\n var D = gOPD$1(it, key);\n if (D && _has(AllSymbols, key) && !(_has(it, HIDDEN) && it[HIDDEN][key])) D.enumerable = true;\n return D;\n};\n\nvar $getOwnPropertyNames = function getOwnPropertyNames(it) {\n var names = gOPN$1(_toIobject(it));\n var result = [];\n var i = 0;\n var key;\n\n while (names.length > i) {\n if (!_has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META) result.push(key);\n }\n\n return result;\n};\n\nvar $getOwnPropertySymbols = function getOwnPropertySymbols(it) {\n var IS_OP = it === ObjectProto;\n var names = gOPN$1(IS_OP ? OPSymbols : _toIobject(it));\n var result = [];\n var i = 0;\n var key;\n\n while (names.length > i) {\n if (_has(AllSymbols, key = names[i++]) && (IS_OP ? _has(ObjectProto, key) : true)) result.push(AllSymbols[key]);\n }\n\n return result;\n}; // 19.4.1.1 Symbol([description])\n\n\nif (!USE_NATIVE) {\n $Symbol = function Symbol() {\n if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor!');\n var tag = _uid(arguments.length > 0 ? arguments[0] : undefined);\n\n var $set = function (value) {\n if (this === ObjectProto) $set.call(OPSymbols, value);\n if (_has(this, HIDDEN) && _has(this[HIDDEN], tag)) this[HIDDEN][tag] = false;\n setSymbolDesc(this, tag, _propertyDesc(1, value));\n };\n\n if (_descriptors && setter) setSymbolDesc(ObjectProto, tag, {\n configurable: true,\n set: $set\n });\n return wrap(tag);\n };\n\n _redefine($Symbol[PROTOTYPE$2], 'toString', function toString() {\n return this._k;\n });\n _objectGopd.f = $getOwnPropertyDescriptor;\n _objectDp.f = $defineProperty;\n _objectGopn.f = _objectGopnExt.f = $getOwnPropertyNames;\n _objectPie.f = $propertyIsEnumerable;\n _objectGops.f = $getOwnPropertySymbols;\n\n if (_descriptors && !_library) {\n _redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true);\n }\n\n _wksExt.f = function (name) {\n return wrap(_wks(name));\n };\n}\n\n_export(_export.G + _export.W + _export.F * !USE_NATIVE, {\n Symbol: $Symbol\n});\n\nfor (var es6Symbols = // 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14\n'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables'.split(','), j = 0; es6Symbols.length > j;) _wks(es6Symbols[j++]);\n\nfor (var wellKnownSymbols = _objectKeys(_wks.store), k = 0; wellKnownSymbols.length > k;) _wksDefine(wellKnownSymbols[k++]);\n\n_export(_export.S + _export.F * !USE_NATIVE, 'Symbol', {\n // 19.4.2.1 Symbol.for(key)\n 'for': function (key) {\n return _has(SymbolRegistry, key += '') ? SymbolRegistry[key] : SymbolRegistry[key] = $Symbol(key);\n },\n // 19.4.2.5 Symbol.keyFor(sym)\n keyFor: function keyFor(sym) {\n if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol!');\n\n for (var key in SymbolRegistry) if (SymbolRegistry[key] === sym) return key;\n },\n useSetter: function () {\n setter = true;\n },\n useSimple: function () {\n setter = false;\n }\n});\n_export(_export.S + _export.F * !USE_NATIVE, 'Object', {\n // 19.1.2.2 Object.create(O [, Properties])\n create: $create,\n // 19.1.2.4 Object.defineProperty(O, P, Attributes)\n defineProperty: $defineProperty,\n // 19.1.2.3 Object.defineProperties(O, Properties)\n defineProperties: $defineProperties,\n // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P)\n getOwnPropertyDescriptor: $getOwnPropertyDescriptor,\n // 19.1.2.7 Object.getOwnPropertyNames(O)\n getOwnPropertyNames: $getOwnPropertyNames,\n // 19.1.2.8 Object.getOwnPropertySymbols(O)\n getOwnPropertySymbols: $getOwnPropertySymbols\n}); // Chrome 38 and 39 `Object.getOwnPropertySymbols` fails on primitives\n// https://bugs.chromium.org/p/v8/issues/detail?id=3443\n\nvar FAILS_ON_PRIMITIVES = _fails(function () {\n _objectGops.f(1);\n});\n_export(_export.S + _export.F * FAILS_ON_PRIMITIVES, 'Object', {\n getOwnPropertySymbols: function getOwnPropertySymbols(it) {\n return _objectGops.f(_toObject(it));\n }\n}); // 24.3.2 JSON.stringify(value [, replacer [, space]])\n\n$JSON && _export(_export.S + _export.F * (!USE_NATIVE || _fails(function () {\n var S = $Symbol(); // MS Edge converts symbol values to JSON as {}\n // WebKit converts symbol values to JSON as null\n // V8 throws on boxed symbols\n\n return _stringify([S]) != '[null]' || _stringify({\n a: S\n }) != '{}' || _stringify(Object(S)) != '{}';\n})), 'JSON', {\n stringify: function stringify(it) {\n var args = [it];\n var i = 1;\n var replacer, $replacer;\n\n while (arguments.length > i) args.push(arguments[i++]);\n\n $replacer = replacer = args[1];\n if (!_isObject(replacer) && it === undefined || isSymbol(it)) return; // IE8 returns string on undefined\n\n if (!_isArray(replacer)) replacer = function (key, value) {\n if (typeof $replacer == 'function') value = $replacer.call(this, key, value);\n if (!isSymbol(value)) return value;\n };\n args[1] = replacer;\n return _stringify.apply($JSON, args);\n }\n}); // 19.4.3.4 Symbol.prototype[@@toPrimitive](hint)\n\n$Symbol[PROTOTYPE$2][TO_PRIMITIVE] || _hide($Symbol[PROTOTYPE$2], TO_PRIMITIVE, $Symbol[PROTOTYPE$2].valueOf); // 19.4.3.5 Symbol.prototype[@@toStringTag]\n\n_setToStringTag($Symbol, 'Symbol'); // 20.2.1.9 Math[@@toStringTag]\n\n_setToStringTag(Math, 'Math', true); // 24.3.3 JSON[@@toStringTag]\n\n_setToStringTag(_global.JSON, 'JSON', true);\n\nfunction _typeof(obj) {\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function (obj) {\n return typeof obj;\n };\n } else {\n _typeof = function (obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n\n if (Object.getOwnPropertySymbols) {\n keys.push.apply(keys, Object.getOwnPropertySymbols(object));\n }\n\n if (enumerableOnly) keys = keys.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n return keys;\n}\n\nfunction _objectSpread2(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n\n if (i % 2) {\n ownKeys(source, true).forEach(function (key) {\n _defineProperty(target, key, source[key]);\n });\n } else if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(source).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n }\n\n return target;\n}\n\nfunction _toConsumableArray(arr) {\n return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread();\n}\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) {\n for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) arr2[i] = arr[i];\n\n return arr2;\n }\n}\n\nfunction _iterableToArray(iter) {\n if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === \"[object Arguments]\") return Array.from(iter);\n}\n\nfunction _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance\");\n}\n\nvar _objectSap = function (KEY, exec) {\n var fn = (_core.Object || {})[KEY] || Object[KEY];\n var exp = {};\n exp[KEY] = exec(fn);\n _export(_export.S + _export.F * _fails(function () {\n fn(1);\n }), 'Object', exp);\n};\n\n_objectSap('keys', function () {\n return function keys(it) {\n return _objectKeys(_toObject(it));\n };\n});\n\nvar _flags = function () {\n var that = _anObject(this);\n var result = '';\n if (that.global) result += 'g';\n if (that.ignoreCase) result += 'i';\n if (that.multiline) result += 'm';\n if (that.unicode) result += 'u';\n if (that.sticky) result += 'y';\n return result;\n};\n\nif (_descriptors && /./g.flags != 'g') _objectDp.f(RegExp.prototype, 'flags', {\n configurable: true,\n get: _flags\n});\n\nvar TO_STRING = 'toString';\nvar $toString = /./[TO_STRING];\n\nvar define = function (fn) {\n _redefine(RegExp.prototype, TO_STRING, fn, true);\n}; // 21.2.5.14 RegExp.prototype.toString()\n\n\nif (_fails(function () {\n return $toString.call({\n source: 'a',\n flags: 'b'\n }) != '/a/b';\n})) {\n define(function toString() {\n var R = _anObject(this);\n return '/'.concat(R.source, '/', 'flags' in R ? R.flags : !_descriptors && R instanceof RegExp ? _flags.call(R) : undefined);\n }); // FF44- RegExp#toString has a wrong name\n} else if ($toString.name != TO_STRING) {\n define(function toString() {\n return $toString.call(this);\n });\n}\n\n// false -> String#codePointAt\n\nvar _stringAt = function (TO_STRING) {\n return function (that, pos) {\n var s = String(_defined(that));\n var i = _toInteger(pos);\n var l = s.length;\n var a, b;\n if (i < 0 || i >= l) return TO_STRING ? '' : undefined;\n a = s.charCodeAt(i);\n return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff ? TO_STRING ? s.charAt(i) : a : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000;\n };\n};\n\nvar at = _stringAt(true); // `AdvanceStringIndex` abstract operation\n// https://tc39.github.io/ecma262/#sec-advancestringindex\n\nvar _advanceStringIndex = function (S, index, unicode) {\n return index + (unicode ? at(S, index).length : 1);\n};\n\nvar TAG$1 = _wks('toStringTag'); // ES3 wrong here\n\nvar ARG = _cof(function () {\n return arguments;\n}()) == 'Arguments'; // fallback for IE11 Script Access Denied error\n\nvar tryGet = function (it, key) {\n try {\n return it[key];\n } catch (e) {\n /* empty */\n }\n};\n\nvar _classof = function (it) {\n var O, T, B;\n return it === undefined ? 'Undefined' : it === null ? 'Null' // @@toStringTag case\n : typeof (T = tryGet(O = Object(it), TAG$1)) == 'string' ? T // builtinTag case\n : ARG ? _cof(O) // ES3 arguments fallback\n : (B = _cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B;\n};\n\nvar builtinExec = RegExp.prototype.exec; // `RegExpExec` abstract operation\n// https://tc39.github.io/ecma262/#sec-regexpexec\n\nvar _regexpExecAbstract = function (R, S) {\n var exec = R.exec;\n\n if (typeof exec === 'function') {\n var result = exec.call(R, S);\n\n if (typeof result !== 'object') {\n throw new TypeError('RegExp exec method returned something other than an Object or null');\n }\n\n return result;\n }\n\n if (_classof(R) !== 'RegExp') {\n throw new TypeError('RegExp#exec called on incompatible receiver');\n }\n\n return builtinExec.call(R, S);\n};\n\nvar nativeExec = RegExp.prototype.exec; // This always refers to the native implementation, because the\n// String#replace polyfill uses ./fix-regexp-well-known-symbol-logic.js,\n// which loads this file before patching the method.\n\nvar nativeReplace = String.prototype.replace;\nvar patchedExec = nativeExec;\nvar LAST_INDEX = 'lastIndex';\n\nvar UPDATES_LAST_INDEX_WRONG = function () {\n var re1 = /a/,\n re2 = /b*/g;\n nativeExec.call(re1, 'a');\n nativeExec.call(re2, 'a');\n return re1[LAST_INDEX] !== 0 || re2[LAST_INDEX] !== 0;\n}(); // nonparticipating capturing group, copied from es5-shim's String#split patch.\n\n\nvar NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;\nvar PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED;\n\nif (PATCH) {\n patchedExec = function exec(str) {\n var re = this;\n var lastIndex, reCopy, match, i;\n\n if (NPCG_INCLUDED) {\n reCopy = new RegExp('^' + re.source + '$(?!\\\\s)', _flags.call(re));\n }\n\n if (UPDATES_LAST_INDEX_WRONG) lastIndex = re[LAST_INDEX];\n match = nativeExec.call(re, str);\n\n if (UPDATES_LAST_INDEX_WRONG && match) {\n re[LAST_INDEX] = re.global ? match.index + match[0].length : lastIndex;\n }\n\n if (NPCG_INCLUDED && match && match.length > 1) {\n // Fix browsers whose `exec` methods don't consistently return `undefined`\n // for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/\n // eslint-disable-next-line no-loop-func\n nativeReplace.call(match[0], reCopy, function () {\n for (i = 1; i < arguments.length - 2; i++) {\n if (arguments[i] === undefined) match[i] = undefined;\n }\n });\n }\n\n return match;\n };\n}\n\nvar _regexpExec = patchedExec;\n\n_export({\n target: 'RegExp',\n proto: true,\n forced: _regexpExec !== /./.exec\n}, {\n exec: _regexpExec\n});\n\nvar SPECIES = _wks('species');\nvar REPLACE_SUPPORTS_NAMED_GROUPS = !_fails(function () {\n // #replace needs built-in support for named groups.\n // #match works fine because it just return the exec results, even if it has\n // a \"grops\" property.\n var re = /./;\n\n re.exec = function () {\n var result = [];\n result.groups = {\n a: '7'\n };\n return result;\n };\n\n return ''.replace(re, '$') !== '7';\n});\n\nvar SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = function () {\n // Chrome 51 has a buggy \"split\" implementation when RegExp#exec !== nativeExec\n var re = /(?:)/;\n var originalExec = re.exec;\n\n re.exec = function () {\n return originalExec.apply(this, arguments);\n };\n\n var result = 'ab'.split(re);\n return result.length === 2 && result[0] === 'a' && result[1] === 'b';\n}();\n\nvar _fixReWks = function (KEY, length, exec) {\n var SYMBOL = _wks(KEY);\n var DELEGATES_TO_SYMBOL = !_fails(function () {\n // String methods call symbol-named RegEp methods\n var O = {};\n\n O[SYMBOL] = function () {\n return 7;\n };\n\n return ''[KEY](O) != 7;\n });\n var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL ? !_fails(function () {\n // Symbol-named RegExp methods call .exec\n var execCalled = false;\n var re = /a/;\n\n re.exec = function () {\n execCalled = true;\n return null;\n };\n\n if (KEY === 'split') {\n // RegExp[@@split] doesn't call the regex's exec method, but first creates\n // a new one. We need to return the patched regex when creating the new one.\n re.constructor = {};\n\n re.constructor[SPECIES] = function () {\n return re;\n };\n }\n\n re[SYMBOL]('');\n return !execCalled;\n }) : undefined;\n\n if (!DELEGATES_TO_SYMBOL || !DELEGATES_TO_EXEC || KEY === 'replace' && !REPLACE_SUPPORTS_NAMED_GROUPS || KEY === 'split' && !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC) {\n var nativeRegExpMethod = /./[SYMBOL];\n var fns = exec(_defined, SYMBOL, ''[KEY], function maybeCallNative(nativeMethod, regexp, str, arg2, forceStringMethod) {\n if (regexp.exec === _regexpExec) {\n if (DELEGATES_TO_SYMBOL && !forceStringMethod) {\n // The native String method already delegates to @@method (this\n // polyfilled function), leasing to infinite recursion.\n // We avoid it by directly calling the native @@method method.\n return {\n done: true,\n value: nativeRegExpMethod.call(regexp, str, arg2)\n };\n }\n\n return {\n done: true,\n value: nativeMethod.call(str, regexp, arg2)\n };\n }\n\n return {\n done: false\n };\n });\n var strfn = fns[0];\n var rxfn = fns[1];\n _redefine(String.prototype, KEY, strfn);\n _hide(RegExp.prototype, SYMBOL, length == 2 // 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue)\n // 21.2.5.11 RegExp.prototype[@@split](string, limit)\n ? function (string, arg) {\n return rxfn.call(string, this, arg);\n } // 21.2.5.6 RegExp.prototype[@@match](string)\n // 21.2.5.9 RegExp.prototype[@@search](string)\n : function (string) {\n return rxfn.call(string, this);\n });\n }\n};\n\nvar max$1 = Math.max;\nvar min$2 = Math.min;\nvar floor$1 = Math.floor;\nvar SUBSTITUTION_SYMBOLS = /\\$([$&`']|\\d\\d?|<[^>]*>)/g;\nvar SUBSTITUTION_SYMBOLS_NO_NAMED = /\\$([$&`']|\\d\\d?)/g;\n\nvar maybeToString = function (it) {\n return it === undefined ? it : String(it);\n}; // @@replace logic\n\n\n_fixReWks('replace', 2, function (defined, REPLACE, $replace, maybeCallNative) {\n return [// `String.prototype.replace` method\n // https://tc39.github.io/ecma262/#sec-string.prototype.replace\n function replace(searchValue, replaceValue) {\n var O = defined(this);\n var fn = searchValue == undefined ? undefined : searchValue[REPLACE];\n return fn !== undefined ? fn.call(searchValue, O, replaceValue) : $replace.call(String(O), searchValue, replaceValue);\n }, // `RegExp.prototype[@@replace]` method\n // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@replace\n function (regexp, replaceValue) {\n var res = maybeCallNative($replace, regexp, this, replaceValue);\n if (res.done) return res.value;\n var rx = _anObject(regexp);\n var S = String(this);\n var functionalReplace = typeof replaceValue === 'function';\n if (!functionalReplace) replaceValue = String(replaceValue);\n var global = rx.global;\n\n if (global) {\n var fullUnicode = rx.unicode;\n rx.lastIndex = 0;\n }\n\n var results = [];\n\n while (true) {\n var result = _regexpExecAbstract(rx, S);\n if (result === null) break;\n results.push(result);\n if (!global) break;\n var matchStr = String(result[0]);\n if (matchStr === '') rx.lastIndex = _advanceStringIndex(S, _toLength(rx.lastIndex), fullUnicode);\n }\n\n var accumulatedResult = '';\n var nextSourcePosition = 0;\n\n for (var i = 0; i < results.length; i++) {\n result = results[i];\n var matched = String(result[0]);\n var position = max$1(min$2(_toInteger(result.index), S.length), 0);\n var captures = []; // NOTE: This is equivalent to\n // captures = result.slice(1).map(maybeToString)\n // but for some reason `nativeSlice.call(result, 1, result.length)` (called in\n // the slice polyfill when slicing native arrays) \"doesn't work\" in safari 9 and\n // causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it.\n\n for (var j = 1; j < result.length; j++) captures.push(maybeToString(result[j]));\n\n var namedCaptures = result.groups;\n\n if (functionalReplace) {\n var replacerArgs = [matched].concat(captures, position, S);\n if (namedCaptures !== undefined) replacerArgs.push(namedCaptures);\n var replacement = String(replaceValue.apply(undefined, replacerArgs));\n } else {\n replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue);\n }\n\n if (position >= nextSourcePosition) {\n accumulatedResult += S.slice(nextSourcePosition, position) + replacement;\n nextSourcePosition = position + matched.length;\n }\n }\n\n return accumulatedResult + S.slice(nextSourcePosition);\n }]; // https://tc39.github.io/ecma262/#sec-getsubstitution\n\n function getSubstitution(matched, str, position, captures, namedCaptures, replacement) {\n var tailPos = position + matched.length;\n var m = captures.length;\n var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED;\n\n if (namedCaptures !== undefined) {\n namedCaptures = _toObject(namedCaptures);\n symbols = SUBSTITUTION_SYMBOLS;\n }\n\n return $replace.call(replacement, symbols, function (match, ch) {\n var capture;\n\n switch (ch.charAt(0)) {\n case '$':\n return '$';\n\n case '&':\n return matched;\n\n case '`':\n return str.slice(0, position);\n\n case \"'\":\n return str.slice(tailPos);\n\n case '<':\n capture = namedCaptures[ch.slice(1, -1)];\n break;\n\n default:\n // \\d\\d?\n var n = +ch;\n if (n === 0) return match;\n\n if (n > m) {\n var f = floor$1(n / 10);\n if (f === 0) return match;\n if (f <= m) return captures[f - 1] === undefined ? ch.charAt(1) : captures[f - 1] + ch.charAt(1);\n return match;\n }\n\n capture = captures[n - 1];\n }\n\n return capture === undefined ? '' : capture;\n });\n }\n});\n\nvar UNSCOPABLES = _wks('unscopables');\nvar ArrayProto = Array.prototype;\nif (ArrayProto[UNSCOPABLES] == undefined) _hide(ArrayProto, UNSCOPABLES, {});\n\nvar _addToUnscopables = function (key) {\n ArrayProto[UNSCOPABLES][key] = true;\n};\n\nvar _iterStep = function (done, value) {\n return {\n value: value,\n done: !!done\n };\n};\n\nvar _iterators = {};\n\nvar IteratorPrototype = {}; // 25.1.2.1.1 %IteratorPrototype%[@@iterator]()\n\n_hide(IteratorPrototype, _wks('iterator'), function () {\n return this;\n});\n\nvar _iterCreate = function (Constructor, NAME, next) {\n Constructor.prototype = _objectCreate(IteratorPrototype, {\n next: _propertyDesc(1, next)\n });\n _setToStringTag(Constructor, NAME + ' Iterator');\n};\n\nvar IE_PROTO$2 = _sharedKey('IE_PROTO');\nvar ObjectProto$1 = Object.prototype;\n\nvar _objectGpo = Object.getPrototypeOf || function (O) {\n O = _toObject(O);\n if (_has(O, IE_PROTO$2)) return O[IE_PROTO$2];\n\n if (typeof O.constructor == 'function' && O instanceof O.constructor) {\n return O.constructor.prototype;\n }\n\n return O instanceof Object ? ObjectProto$1 : null;\n};\n\nvar ITERATOR = _wks('iterator');\nvar BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next`\n\nvar FF_ITERATOR = '@@iterator';\nvar KEYS = 'keys';\nvar VALUES = 'values';\n\nvar returnThis = function () {\n return this;\n};\n\nvar _iterDefine = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) {\n _iterCreate(Constructor, NAME, next);\n\n var getMethod = function (kind) {\n if (!BUGGY && kind in proto) return proto[kind];\n\n switch (kind) {\n case KEYS:\n return function keys() {\n return new Constructor(this, kind);\n };\n\n case VALUES:\n return function values() {\n return new Constructor(this, kind);\n };\n }\n\n return function entries() {\n return new Constructor(this, kind);\n };\n };\n\n var TAG = NAME + ' Iterator';\n var DEF_VALUES = DEFAULT == VALUES;\n var VALUES_BUG = false;\n var proto = Base.prototype;\n var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT];\n var $default = $native || getMethod(DEFAULT);\n var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined;\n var $anyNative = NAME == 'Array' ? proto.entries || $native : $native;\n var methods, key, IteratorPrototype; // Fix native\n\n if ($anyNative) {\n IteratorPrototype = _objectGpo($anyNative.call(new Base()));\n\n if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) {\n // Set @@toStringTag to native iterators\n _setToStringTag(IteratorPrototype, TAG, true); // fix for some old engines\n\n if ( typeof IteratorPrototype[ITERATOR] != 'function') _hide(IteratorPrototype, ITERATOR, returnThis);\n }\n } // fix Array#{values, @@iterator}.name in V8 / FF\n\n\n if (DEF_VALUES && $native && $native.name !== VALUES) {\n VALUES_BUG = true;\n\n $default = function values() {\n return $native.call(this);\n };\n } // Define iterator\n\n\n if ( (BUGGY || VALUES_BUG || !proto[ITERATOR])) {\n _hide(proto, ITERATOR, $default);\n } // Plug for library\n\n\n _iterators[NAME] = $default;\n _iterators[TAG] = returnThis;\n\n if (DEFAULT) {\n methods = {\n values: DEF_VALUES ? $default : getMethod(VALUES),\n keys: IS_SET ? $default : getMethod(KEYS),\n entries: $entries\n };\n if (FORCED) for (key in methods) {\n if (!(key in proto)) _redefine(proto, key, methods[key]);\n } else _export(_export.P + _export.F * (BUGGY || VALUES_BUG), NAME, methods);\n }\n\n return methods;\n};\n\n// 22.1.3.13 Array.prototype.keys()\n// 22.1.3.29 Array.prototype.values()\n// 22.1.3.30 Array.prototype[@@iterator]()\n\n\nvar es6_array_iterator = _iterDefine(Array, 'Array', function (iterated, kind) {\n this._t = _toIobject(iterated); // target\n\n this._i = 0; // next index\n\n this._k = kind; // kind\n // 22.1.5.2.1 %ArrayIteratorPrototype%.next()\n}, function () {\n var O = this._t;\n var kind = this._k;\n var index = this._i++;\n\n if (!O || index >= O.length) {\n this._t = undefined;\n return _iterStep(1);\n }\n\n if (kind == 'keys') return _iterStep(0, index);\n if (kind == 'values') return _iterStep(0, O[index]);\n return _iterStep(0, [index, O[index]]);\n}, 'values'); // argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7)\n\n_iterators.Arguments = _iterators.Array;\n_addToUnscopables('keys');\n_addToUnscopables('values');\n_addToUnscopables('entries');\n\nvar ITERATOR$1 = _wks('iterator');\nvar TO_STRING_TAG = _wks('toStringTag');\nvar ArrayValues = _iterators.Array;\nvar DOMIterables = {\n CSSRuleList: true,\n // TODO: Not spec compliant, should be false.\n CSSStyleDeclaration: false,\n CSSValueList: false,\n ClientRectList: false,\n DOMRectList: false,\n DOMStringList: false,\n DOMTokenList: true,\n DataTransferItemList: false,\n FileList: false,\n HTMLAllCollection: false,\n HTMLCollection: false,\n HTMLFormElement: false,\n HTMLSelectElement: false,\n MediaList: true,\n // TODO: Not spec compliant, should be false.\n MimeTypeArray: false,\n NamedNodeMap: false,\n NodeList: true,\n PaintRequestList: false,\n Plugin: false,\n PluginArray: false,\n SVGLengthList: false,\n SVGNumberList: false,\n SVGPathSegList: false,\n SVGPointList: false,\n SVGStringList: false,\n SVGTransformList: false,\n SourceBufferList: false,\n StyleSheetList: true,\n // TODO: Not spec compliant, should be false.\n TextTrackCueList: false,\n TextTrackList: false,\n TouchList: false\n};\n\nfor (var collections = _objectKeys(DOMIterables), i = 0; i < collections.length; i++) {\n var NAME = collections[i];\n var explicit = DOMIterables[NAME];\n var Collection = _global[NAME];\n var proto = Collection && Collection.prototype;\n var key;\n\n if (proto) {\n if (!proto[ITERATOR$1]) _hide(proto, ITERATOR$1, ArrayValues);\n if (!proto[TO_STRING_TAG]) _hide(proto, TO_STRING_TAG, NAME);\n _iterators[NAME] = ArrayValues;\n if (explicit) for (key in es6_array_iterator) if (!proto[key]) _redefine(proto, key, es6_array_iterator[key], true);\n }\n}\n\nvar test = {};\ntest[_wks('toStringTag')] = 'z';\n\nif (test + '' != '[object z]') {\n _redefine(Object.prototype, 'toString', function toString() {\n return '[object ' + _classof(this) + ']';\n }, true);\n}\n\nvar isEnum$1 = _objectPie.f;\n\nvar _objectToArray = function (isEntries) {\n return function (it) {\n var O = _toIobject(it);\n var keys = _objectKeys(O);\n var length = keys.length;\n var i = 0;\n var result = [];\n var key;\n\n while (length > i) {\n key = keys[i++];\n\n if (!_descriptors || isEnum$1.call(O, key)) {\n result.push(isEntries ? [key, O[key]] : O[key]);\n }\n }\n\n return result;\n };\n};\n\nvar $values = _objectToArray(false);\n_export(_export.S, 'Object', {\n values: function values(it) {\n return $values(it);\n }\n});\n\nvar MATCH = _wks('match');\n\nvar _isRegexp = function (it) {\n var isRegExp;\n return _isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : _cof(it) == 'RegExp');\n};\n\nvar SPECIES$1 = _wks('species');\n\nvar _speciesConstructor = function (O, D) {\n var C = _anObject(O).constructor;\n var S;\n return C === undefined || (S = _anObject(C)[SPECIES$1]) == undefined ? D : _aFunction(S);\n};\n\nvar $min = Math.min;\nvar $push = [].push;\nvar $SPLIT = 'split';\nvar LENGTH = 'length';\nvar LAST_INDEX$1 = 'lastIndex';\nvar MAX_UINT32 = 0xffffffff; // babel-minify transpiles RegExp('x', 'y') -> /x/y and it causes SyntaxError\n\nvar SUPPORTS_Y = !_fails(function () {\n RegExp(MAX_UINT32, 'y');\n}); // @@split logic\n\n_fixReWks('split', 2, function (defined, SPLIT, $split, maybeCallNative) {\n var internalSplit;\n\n if ('abbc'[$SPLIT](/(b)*/)[1] == 'c' || 'test'[$SPLIT](/(?:)/, -1)[LENGTH] != 4 || 'ab'[$SPLIT](/(?:ab)*/)[LENGTH] != 2 || '.'[$SPLIT](/(.?)(.?)/)[LENGTH] != 4 || '.'[$SPLIT](/()()/)[LENGTH] > 1 || ''[$SPLIT](/.?/)[LENGTH]) {\n // based on es5-shim implementation, need to rework it\n internalSplit = function (separator, limit) {\n var string = String(this);\n if (separator === undefined && limit === 0) return []; // If `separator` is not a regex, use native split\n\n if (!_isRegexp(separator)) return $split.call(string, separator, limit);\n var output = [];\n var flags = (separator.ignoreCase ? 'i' : '') + (separator.multiline ? 'm' : '') + (separator.unicode ? 'u' : '') + (separator.sticky ? 'y' : '');\n var lastLastIndex = 0;\n var splitLimit = limit === undefined ? MAX_UINT32 : limit >>> 0; // Make `global` and avoid `lastIndex` issues by working with a copy\n\n var separatorCopy = new RegExp(separator.source, flags + 'g');\n var match, lastIndex, lastLength;\n\n while (match = _regexpExec.call(separatorCopy, string)) {\n lastIndex = separatorCopy[LAST_INDEX$1];\n\n if (lastIndex > lastLastIndex) {\n output.push(string.slice(lastLastIndex, match.index));\n if (match[LENGTH] > 1 && match.index < string[LENGTH]) $push.apply(output, match.slice(1));\n lastLength = match[0][LENGTH];\n lastLastIndex = lastIndex;\n if (output[LENGTH] >= splitLimit) break;\n }\n\n if (separatorCopy[LAST_INDEX$1] === match.index) separatorCopy[LAST_INDEX$1]++; // Avoid an infinite loop\n }\n\n if (lastLastIndex === string[LENGTH]) {\n if (lastLength || !separatorCopy.test('')) output.push('');\n } else output.push(string.slice(lastLastIndex));\n\n return output[LENGTH] > splitLimit ? output.slice(0, splitLimit) : output;\n }; // Chakra, V8\n\n } else if ('0'[$SPLIT](undefined, 0)[LENGTH]) {\n internalSplit = function (separator, limit) {\n return separator === undefined && limit === 0 ? [] : $split.call(this, separator, limit);\n };\n } else {\n internalSplit = $split;\n }\n\n return [// `String.prototype.split` method\n // https://tc39.github.io/ecma262/#sec-string.prototype.split\n function split(separator, limit) {\n var O = defined(this);\n var splitter = separator == undefined ? undefined : separator[SPLIT];\n return splitter !== undefined ? splitter.call(separator, O, limit) : internalSplit.call(String(O), separator, limit);\n }, // `RegExp.prototype[@@split]` method\n // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@split\n //\n // NOTE: This cannot be properly polyfilled in engines that don't support\n // the 'y' flag.\n function (regexp, limit) {\n var res = maybeCallNative(internalSplit, regexp, this, limit, internalSplit !== $split);\n if (res.done) return res.value;\n var rx = _anObject(regexp);\n var S = String(this);\n var C = _speciesConstructor(rx, RegExp);\n var unicodeMatching = rx.unicode;\n var flags = (rx.ignoreCase ? 'i' : '') + (rx.multiline ? 'm' : '') + (rx.unicode ? 'u' : '') + (SUPPORTS_Y ? 'y' : 'g'); // ^(? + rx + ) is needed, in combination with some S slicing, to\n // simulate the 'y' flag.\n\n var splitter = new C(SUPPORTS_Y ? rx : '^(?:' + rx.source + ')', flags);\n var lim = limit === undefined ? MAX_UINT32 : limit >>> 0;\n if (lim === 0) return [];\n if (S.length === 0) return _regexpExecAbstract(splitter, S) === null ? [S] : [];\n var p = 0;\n var q = 0;\n var A = [];\n\n while (q < S.length) {\n splitter.lastIndex = SUPPORTS_Y ? q : 0;\n var z = _regexpExecAbstract(splitter, SUPPORTS_Y ? S : S.slice(q));\n var e;\n\n if (z === null || (e = $min(_toLength(splitter.lastIndex + (SUPPORTS_Y ? 0 : q)), S.length)) === p) {\n q = _advanceStringIndex(S, q, unicodeMatching);\n } else {\n A.push(S.slice(p, q));\n if (A.length === lim) return A;\n\n for (var i = 1; i <= z.length - 1; i++) {\n A.push(z[i]);\n if (A.length === lim) return A;\n }\n\n q = p = e;\n }\n }\n\n A.push(S.slice(p));\n return A;\n }];\n});\n\nvar $assign = Object.assign; // should work with symbols and should have deterministic property order (V8 bug)\n\nvar _objectAssign = !$assign || _fails(function () {\n var A = {};\n var B = {}; // eslint-disable-next-line no-undef\n\n var S = Symbol();\n var K = 'abcdefghijklmnopqrst';\n A[S] = 7;\n K.split('').forEach(function (k) {\n B[k] = k;\n });\n return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K;\n}) ? function assign(target, source) {\n // eslint-disable-line no-unused-vars\n var T = _toObject(target);\n var aLen = arguments.length;\n var index = 1;\n var getSymbols = _objectGops.f;\n var isEnum = _objectPie.f;\n\n while (aLen > index) {\n var S = _iobject(arguments[index++]);\n var keys = getSymbols ? _objectKeys(S).concat(getSymbols(S)) : _objectKeys(S);\n var length = keys.length;\n var j = 0;\n var key;\n\n while (length > j) {\n key = keys[j++];\n if (!_descriptors || isEnum.call(S, key)) T[key] = S[key];\n }\n }\n\n return T;\n} : $assign;\n\n_export(_export.S + _export.F, 'Object', {\n assign: _objectAssign\n});\n\n/* eslint-disable no-proto */\n\nvar check = function (O, proto) {\n _anObject(O);\n if (!_isObject(proto) && proto !== null) throw TypeError(proto + \": can't set as prototype!\");\n};\n\nvar _setProto = {\n set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line\n function (test, buggy, set) {\n try {\n set = _ctx(Function.call, _objectGopd.f(Object.prototype, '__proto__').set, 2);\n set(test, []);\n buggy = !(test instanceof Array);\n } catch (e) {\n buggy = true;\n }\n\n return function setPrototypeOf(O, proto) {\n check(O, proto);\n if (buggy) O.__proto__ = proto;else set(O, proto);\n return O;\n };\n }({}, false) : undefined),\n check: check\n};\n\nvar setPrototypeOf = _setProto.set;\n\nvar _inheritIfRequired = function (that, target, C) {\n var S = target.constructor;\n var P;\n\n if (S !== C && typeof S == 'function' && (P = S.prototype) !== C.prototype && _isObject(P) && setPrototypeOf) {\n setPrototypeOf(that, P);\n }\n\n return that;\n};\n\nvar _stringWs = '\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003' + '\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF';\n\nvar space = '[' + _stringWs + ']';\nvar non = '\\u200b\\u0085';\nvar ltrim = RegExp('^' + space + space + '*');\nvar rtrim = RegExp(space + space + '*$');\n\nvar exporter = function (KEY, exec, ALIAS) {\n var exp = {};\n var FORCE = _fails(function () {\n return !!_stringWs[KEY]() || non[KEY]() != non;\n });\n var fn = exp[KEY] = FORCE ? exec(trim) : _stringWs[KEY];\n if (ALIAS) exp[ALIAS] = fn;\n _export(_export.P + _export.F * FORCE, 'String', exp);\n}; // 1 -> String#trimLeft\n// 2 -> String#trimRight\n// 3 -> String#trim\n\n\nvar trim = exporter.trim = function (string, TYPE) {\n string = String(_defined(string));\n if (TYPE & 1) string = string.replace(ltrim, '');\n if (TYPE & 2) string = string.replace(rtrim, '');\n return string;\n};\n\nvar _stringTrim = exporter;\n\nvar gOPN$2 = _objectGopn.f;\nvar gOPD$2 = _objectGopd.f;\nvar dP$2 = _objectDp.f;\nvar $trim = _stringTrim.trim;\nvar NUMBER = 'Number';\nvar $Number = _global[NUMBER];\nvar Base = $Number;\nvar proto$1 = $Number.prototype; // Opera ~12 has broken Object#toString\n\nvar BROKEN_COF = _cof(_objectCreate(proto$1)) == NUMBER;\nvar TRIM = 'trim' in String.prototype; // 7.1.3 ToNumber(argument)\n\nvar toNumber = function (argument) {\n var it = _toPrimitive(argument, false);\n\n if (typeof it == 'string' && it.length > 2) {\n it = TRIM ? it.trim() : $trim(it, 3);\n var first = it.charCodeAt(0);\n var third, radix, maxCode;\n\n if (first === 43 || first === 45) {\n third = it.charCodeAt(2);\n if (third === 88 || third === 120) return NaN; // Number('+0x1') should be NaN, old V8 fix\n } else if (first === 48) {\n switch (it.charCodeAt(1)) {\n case 66:\n case 98:\n radix = 2;\n maxCode = 49;\n break;\n // fast equal /^0b[01]+$/i\n\n case 79:\n case 111:\n radix = 8;\n maxCode = 55;\n break;\n // fast equal /^0o[0-7]+$/i\n\n default:\n return +it;\n }\n\n for (var digits = it.slice(2), i = 0, l = digits.length, code; i < l; i++) {\n code = digits.charCodeAt(i); // parseInt parses a string to a first unavailable symbol\n // but ToNumber should return NaN if a string contains unavailable symbols\n\n if (code < 48 || code > maxCode) return NaN;\n }\n\n return parseInt(digits, radix);\n }\n }\n\n return +it;\n};\n\nif (!$Number(' 0o1') || !$Number('0b1') || $Number('+0x1')) {\n $Number = function Number(value) {\n var it = arguments.length < 1 ? 0 : value;\n var that = this;\n return that instanceof $Number // check on 1..constructor(foo) case\n && (BROKEN_COF ? _fails(function () {\n proto$1.valueOf.call(that);\n }) : _cof(that) != NUMBER) ? _inheritIfRequired(new Base(toNumber(it)), that, $Number) : toNumber(it);\n };\n\n for (var keys = _descriptors ? gOPN$2(Base) : ( // ES3:\n 'MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,' + // ES6 (in case, if modules with ES6 Number statics required before):\n 'EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,' + 'MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger').split(','), j$1 = 0, key$1; keys.length > j$1; j$1++) {\n if (_has(Base, key$1 = keys[j$1]) && !_has($Number, key$1)) {\n dP$2($Number, key$1, gOPD$2(Base, key$1));\n }\n }\n\n $Number.prototype = proto$1;\n proto$1.constructor = $Number;\n _redefine(_global, NUMBER, $Number);\n}\n\nvar moment = createCommonjsModule(function (module, exports) {\n\n (function (global, factory) {\n module.exports = factory() ;\n })(commonjsGlobal, function () {\n\n var hookCallback;\n\n function hooks() {\n return hookCallback.apply(null, arguments);\n } // This is done to register the method called with moment()\n // without creating circular dependencies.\n\n\n function setHookCallback(callback) {\n hookCallback = callback;\n }\n\n function isArray(input) {\n return input instanceof Array || Object.prototype.toString.call(input) === '[object Array]';\n }\n\n function isObject(input) {\n // IE8 will treat undefined and null as object if it wasn't for\n // input != null\n return input != null && Object.prototype.toString.call(input) === '[object Object]';\n }\n\n function isObjectEmpty(obj) {\n if (Object.getOwnPropertyNames) {\n return Object.getOwnPropertyNames(obj).length === 0;\n } else {\n var k;\n\n for (k in obj) {\n if (obj.hasOwnProperty(k)) {\n return false;\n }\n }\n\n return true;\n }\n }\n\n function isUndefined(input) {\n return input === void 0;\n }\n\n function isNumber(input) {\n return typeof input === 'number' || Object.prototype.toString.call(input) === '[object Number]';\n }\n\n function isDate(input) {\n return input instanceof Date || Object.prototype.toString.call(input) === '[object Date]';\n }\n\n function map(arr, fn) {\n var res = [],\n i;\n\n for (i = 0; i < arr.length; ++i) {\n res.push(fn(arr[i], i));\n }\n\n return res;\n }\n\n function hasOwnProp(a, b) {\n return Object.prototype.hasOwnProperty.call(a, b);\n }\n\n function extend(a, b) {\n for (var i in b) {\n if (hasOwnProp(b, i)) {\n a[i] = b[i];\n }\n }\n\n if (hasOwnProp(b, 'toString')) {\n a.toString = b.toString;\n }\n\n if (hasOwnProp(b, 'valueOf')) {\n a.valueOf = b.valueOf;\n }\n\n return a;\n }\n\n function createUTC(input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, true).utc();\n }\n\n function defaultParsingFlags() {\n // We need to deep clone this object.\n return {\n empty: false,\n unusedTokens: [],\n unusedInput: [],\n overflow: -2,\n charsLeftOver: 0,\n nullInput: false,\n invalidMonth: null,\n invalidFormat: false,\n userInvalidated: false,\n iso: false,\n parsedDateParts: [],\n meridiem: null,\n rfc2822: false,\n weekdayMismatch: false\n };\n }\n\n function getParsingFlags(m) {\n if (m._pf == null) {\n m._pf = defaultParsingFlags();\n }\n\n return m._pf;\n }\n\n var some;\n\n if (Array.prototype.some) {\n some = Array.prototype.some;\n } else {\n some = function (fun) {\n var t = Object(this);\n var len = t.length >>> 0;\n\n for (var i = 0; i < len; i++) {\n if (i in t && fun.call(this, t[i], i, t)) {\n return true;\n }\n }\n\n return false;\n };\n }\n\n function isValid(m) {\n if (m._isValid == null) {\n var flags = getParsingFlags(m);\n var parsedParts = some.call(flags.parsedDateParts, function (i) {\n return i != null;\n });\n var isNowValid = !isNaN(m._d.getTime()) && flags.overflow < 0 && !flags.empty && !flags.invalidMonth && !flags.invalidWeekday && !flags.weekdayMismatch && !flags.nullInput && !flags.invalidFormat && !flags.userInvalidated && (!flags.meridiem || flags.meridiem && parsedParts);\n\n if (m._strict) {\n isNowValid = isNowValid && flags.charsLeftOver === 0 && flags.unusedTokens.length === 0 && flags.bigHour === undefined;\n }\n\n if (Object.isFrozen == null || !Object.isFrozen(m)) {\n m._isValid = isNowValid;\n } else {\n return isNowValid;\n }\n }\n\n return m._isValid;\n }\n\n function createInvalid(flags) {\n var m = createUTC(NaN);\n\n if (flags != null) {\n extend(getParsingFlags(m), flags);\n } else {\n getParsingFlags(m).userInvalidated = true;\n }\n\n return m;\n } // Plugins that add properties should also add the key here (null value),\n // so we can properly clone ourselves.\n\n\n var momentProperties = hooks.momentProperties = [];\n\n function copyConfig(to, from) {\n var i, prop, val;\n\n if (!isUndefined(from._isAMomentObject)) {\n to._isAMomentObject = from._isAMomentObject;\n }\n\n if (!isUndefined(from._i)) {\n to._i = from._i;\n }\n\n if (!isUndefined(from._f)) {\n to._f = from._f;\n }\n\n if (!isUndefined(from._l)) {\n to._l = from._l;\n }\n\n if (!isUndefined(from._strict)) {\n to._strict = from._strict;\n }\n\n if (!isUndefined(from._tzm)) {\n to._tzm = from._tzm;\n }\n\n if (!isUndefined(from._isUTC)) {\n to._isUTC = from._isUTC;\n }\n\n if (!isUndefined(from._offset)) {\n to._offset = from._offset;\n }\n\n if (!isUndefined(from._pf)) {\n to._pf = getParsingFlags(from);\n }\n\n if (!isUndefined(from._locale)) {\n to._locale = from._locale;\n }\n\n if (momentProperties.length > 0) {\n for (i = 0; i < momentProperties.length; i++) {\n prop = momentProperties[i];\n val = from[prop];\n\n if (!isUndefined(val)) {\n to[prop] = val;\n }\n }\n }\n\n return to;\n }\n\n var updateInProgress = false; // Moment prototype object\n\n function Moment(config) {\n copyConfig(this, config);\n this._d = new Date(config._d != null ? config._d.getTime() : NaN);\n\n if (!this.isValid()) {\n this._d = new Date(NaN);\n } // Prevent infinite loop in case updateOffset creates new moment\n // objects.\n\n\n if (updateInProgress === false) {\n updateInProgress = true;\n hooks.updateOffset(this);\n updateInProgress = false;\n }\n }\n\n function isMoment(obj) {\n return obj instanceof Moment || obj != null && obj._isAMomentObject != null;\n }\n\n function absFloor(number) {\n if (number < 0) {\n // -0 -> 0\n return Math.ceil(number) || 0;\n } else {\n return Math.floor(number);\n }\n }\n\n function toInt(argumentForCoercion) {\n var coercedNumber = +argumentForCoercion,\n value = 0;\n\n if (coercedNumber !== 0 && isFinite(coercedNumber)) {\n value = absFloor(coercedNumber);\n }\n\n return value;\n } // compare two arrays, return the number of differences\n\n\n function compareArrays(array1, array2, dontConvert) {\n var len = Math.min(array1.length, array2.length),\n lengthDiff = Math.abs(array1.length - array2.length),\n diffs = 0,\n i;\n\n for (i = 0; i < len; i++) {\n if (dontConvert && array1[i] !== array2[i] || !dontConvert && toInt(array1[i]) !== toInt(array2[i])) {\n diffs++;\n }\n }\n\n return diffs + lengthDiff;\n }\n\n function warn(msg) {\n if (hooks.suppressDeprecationWarnings === false && typeof console !== 'undefined' && console.warn) {\n console.warn('Deprecation warning: ' + msg);\n }\n }\n\n function deprecate(msg, fn) {\n var firstTime = true;\n return extend(function () {\n if (hooks.deprecationHandler != null) {\n hooks.deprecationHandler(null, msg);\n }\n\n if (firstTime) {\n var args = [];\n var arg;\n\n for (var i = 0; i < arguments.length; i++) {\n arg = '';\n\n if (typeof arguments[i] === 'object') {\n arg += '\\n[' + i + '] ';\n\n for (var key in arguments[0]) {\n arg += key + ': ' + arguments[0][key] + ', ';\n }\n\n arg = arg.slice(0, -2); // Remove trailing comma and space\n } else {\n arg = arguments[i];\n }\n\n args.push(arg);\n }\n\n warn(msg + '\\nArguments: ' + Array.prototype.slice.call(args).join('') + '\\n' + new Error().stack);\n firstTime = false;\n }\n\n return fn.apply(this, arguments);\n }, fn);\n }\n\n var deprecations = {};\n\n function deprecateSimple(name, msg) {\n if (hooks.deprecationHandler != null) {\n hooks.deprecationHandler(name, msg);\n }\n\n if (!deprecations[name]) {\n warn(msg);\n deprecations[name] = true;\n }\n }\n\n hooks.suppressDeprecationWarnings = false;\n hooks.deprecationHandler = null;\n\n function isFunction(input) {\n return input instanceof Function || Object.prototype.toString.call(input) === '[object Function]';\n }\n\n function set(config) {\n var prop, i;\n\n for (i in config) {\n prop = config[i];\n\n if (isFunction(prop)) {\n this[i] = prop;\n } else {\n this['_' + i] = prop;\n }\n }\n\n this._config = config; // Lenient ordinal parsing accepts just a number in addition to\n // number + (possibly) stuff coming from _dayOfMonthOrdinalParse.\n // TODO: Remove \"ordinalParse\" fallback in next major release.\n\n this._dayOfMonthOrdinalParseLenient = new RegExp((this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) + '|' + /\\d{1,2}/.source);\n }\n\n function mergeConfigs(parentConfig, childConfig) {\n var res = extend({}, parentConfig),\n prop;\n\n for (prop in childConfig) {\n if (hasOwnProp(childConfig, prop)) {\n if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) {\n res[prop] = {};\n extend(res[prop], parentConfig[prop]);\n extend(res[prop], childConfig[prop]);\n } else if (childConfig[prop] != null) {\n res[prop] = childConfig[prop];\n } else {\n delete res[prop];\n }\n }\n }\n\n for (prop in parentConfig) {\n if (hasOwnProp(parentConfig, prop) && !hasOwnProp(childConfig, prop) && isObject(parentConfig[prop])) {\n // make sure changes to properties don't modify parent config\n res[prop] = extend({}, res[prop]);\n }\n }\n\n return res;\n }\n\n function Locale(config) {\n if (config != null) {\n this.set(config);\n }\n }\n\n var keys;\n\n if (Object.keys) {\n keys = Object.keys;\n } else {\n keys = function (obj) {\n var i,\n res = [];\n\n for (i in obj) {\n if (hasOwnProp(obj, i)) {\n res.push(i);\n }\n }\n\n return res;\n };\n }\n\n var defaultCalendar = {\n sameDay: '[Today at] LT',\n nextDay: '[Tomorrow at] LT',\n nextWeek: 'dddd [at] LT',\n lastDay: '[Yesterday at] LT',\n lastWeek: '[Last] dddd [at] LT',\n sameElse: 'L'\n };\n\n function calendar(key, mom, now) {\n var output = this._calendar[key] || this._calendar['sameElse'];\n return isFunction(output) ? output.call(mom, now) : output;\n }\n\n var defaultLongDateFormat = {\n LTS: 'h:mm:ss A',\n LT: 'h:mm A',\n L: 'MM/DD/YYYY',\n LL: 'MMMM D, YYYY',\n LLL: 'MMMM D, YYYY h:mm A',\n LLLL: 'dddd, MMMM D, YYYY h:mm A'\n };\n\n function longDateFormat(key) {\n var format = this._longDateFormat[key],\n formatUpper = this._longDateFormat[key.toUpperCase()];\n\n if (format || !formatUpper) {\n return format;\n }\n\n this._longDateFormat[key] = formatUpper.replace(/MMMM|MM|DD|dddd/g, function (val) {\n return val.slice(1);\n });\n return this._longDateFormat[key];\n }\n\n var defaultInvalidDate = 'Invalid date';\n\n function invalidDate() {\n return this._invalidDate;\n }\n\n var defaultOrdinal = '%d';\n var defaultDayOfMonthOrdinalParse = /\\d{1,2}/;\n\n function ordinal(number) {\n return this._ordinal.replace('%d', number);\n }\n\n var defaultRelativeTime = {\n future: 'in %s',\n past: '%s ago',\n s: 'a few seconds',\n ss: '%d seconds',\n m: 'a minute',\n mm: '%d minutes',\n h: 'an hour',\n hh: '%d hours',\n d: 'a day',\n dd: '%d days',\n M: 'a month',\n MM: '%d months',\n y: 'a year',\n yy: '%d years'\n };\n\n function relativeTime(number, withoutSuffix, string, isFuture) {\n var output = this._relativeTime[string];\n return isFunction(output) ? output(number, withoutSuffix, string, isFuture) : output.replace(/%d/i, number);\n }\n\n function pastFuture(diff, output) {\n var format = this._relativeTime[diff > 0 ? 'future' : 'past'];\n return isFunction(format) ? format(output) : format.replace(/%s/i, output);\n }\n\n var aliases = {};\n\n function addUnitAlias(unit, shorthand) {\n var lowerCase = unit.toLowerCase();\n aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit;\n }\n\n function normalizeUnits(units) {\n return typeof units === 'string' ? aliases[units] || aliases[units.toLowerCase()] : undefined;\n }\n\n function normalizeObjectUnits(inputObject) {\n var normalizedInput = {},\n normalizedProp,\n prop;\n\n for (prop in inputObject) {\n if (hasOwnProp(inputObject, prop)) {\n normalizedProp = normalizeUnits(prop);\n\n if (normalizedProp) {\n normalizedInput[normalizedProp] = inputObject[prop];\n }\n }\n }\n\n return normalizedInput;\n }\n\n var priorities = {};\n\n function addUnitPriority(unit, priority) {\n priorities[unit] = priority;\n }\n\n function getPrioritizedUnits(unitsObj) {\n var units = [];\n\n for (var u in unitsObj) {\n units.push({\n unit: u,\n priority: priorities[u]\n });\n }\n\n units.sort(function (a, b) {\n return a.priority - b.priority;\n });\n return units;\n }\n\n function zeroFill(number, targetLength, forceSign) {\n var absNumber = '' + Math.abs(number),\n zerosToFill = targetLength - absNumber.length,\n sign = number >= 0;\n return (sign ? forceSign ? '+' : '' : '-') + Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) + absNumber;\n }\n\n var formattingTokens = /(\\[[^\\[]*\\])|(\\\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g;\n var localFormattingTokens = /(\\[[^\\[]*\\])|(\\\\)?(LTS|LT|LL?L?L?|l{1,4})/g;\n var formatFunctions = {};\n var formatTokenFunctions = {}; // token: 'M'\n // padded: ['MM', 2]\n // ordinal: 'Mo'\n // callback: function () { this.month() + 1 }\n\n function addFormatToken(token, padded, ordinal, callback) {\n var func = callback;\n\n if (typeof callback === 'string') {\n func = function () {\n return this[callback]();\n };\n }\n\n if (token) {\n formatTokenFunctions[token] = func;\n }\n\n if (padded) {\n formatTokenFunctions[padded[0]] = function () {\n return zeroFill(func.apply(this, arguments), padded[1], padded[2]);\n };\n }\n\n if (ordinal) {\n formatTokenFunctions[ordinal] = function () {\n return this.localeData().ordinal(func.apply(this, arguments), token);\n };\n }\n }\n\n function removeFormattingTokens(input) {\n if (input.match(/\\[[\\s\\S]/)) {\n return input.replace(/^\\[|\\]$/g, '');\n }\n\n return input.replace(/\\\\/g, '');\n }\n\n function makeFormatFunction(format) {\n var array = format.match(formattingTokens),\n i,\n length;\n\n for (i = 0, length = array.length; i < length; i++) {\n if (formatTokenFunctions[array[i]]) {\n array[i] = formatTokenFunctions[array[i]];\n } else {\n array[i] = removeFormattingTokens(array[i]);\n }\n }\n\n return function (mom) {\n var output = '',\n i;\n\n for (i = 0; i < length; i++) {\n output += isFunction(array[i]) ? array[i].call(mom, format) : array[i];\n }\n\n return output;\n };\n } // format date using native date object\n\n\n function formatMoment(m, format) {\n if (!m.isValid()) {\n return m.localeData().invalidDate();\n }\n\n format = expandFormat(format, m.localeData());\n formatFunctions[format] = formatFunctions[format] || makeFormatFunction(format);\n return formatFunctions[format](m);\n }\n\n function expandFormat(format, locale) {\n var i = 5;\n\n function replaceLongDateFormatTokens(input) {\n return locale.longDateFormat(input) || input;\n }\n\n localFormattingTokens.lastIndex = 0;\n\n while (i >= 0 && localFormattingTokens.test(format)) {\n format = format.replace(localFormattingTokens, replaceLongDateFormatTokens);\n localFormattingTokens.lastIndex = 0;\n i -= 1;\n }\n\n return format;\n }\n\n var match1 = /\\d/; // 0 - 9\n\n var match2 = /\\d\\d/; // 00 - 99\n\n var match3 = /\\d{3}/; // 000 - 999\n\n var match4 = /\\d{4}/; // 0000 - 9999\n\n var match6 = /[+-]?\\d{6}/; // -999999 - 999999\n\n var match1to2 = /\\d\\d?/; // 0 - 99\n\n var match3to4 = /\\d\\d\\d\\d?/; // 999 - 9999\n\n var match5to6 = /\\d\\d\\d\\d\\d\\d?/; // 99999 - 999999\n\n var match1to3 = /\\d{1,3}/; // 0 - 999\n\n var match1to4 = /\\d{1,4}/; // 0 - 9999\n\n var match1to6 = /[+-]?\\d{1,6}/; // -999999 - 999999\n\n var matchUnsigned = /\\d+/; // 0 - inf\n\n var matchSigned = /[+-]?\\d+/; // -inf - inf\n\n var matchOffset = /Z|[+-]\\d\\d:?\\d\\d/gi; // +00:00 -00:00 +0000 -0000 or Z\n\n var matchShortOffset = /Z|[+-]\\d\\d(?::?\\d\\d)?/gi; // +00 -00 +00:00 -00:00 +0000 -0000 or Z\n\n var matchTimestamp = /[+-]?\\d+(\\.\\d{1,3})?/; // 123456789 123456789.123\n // any word (or two) characters or numbers including two/three word month in arabic.\n // includes scottish gaelic two word and hyphenated months\n\n var matchWord = /[0-9]{0,256}['a-z\\u00A0-\\u05FF\\u0700-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFF07\\uFF10-\\uFFEF]{1,256}|[\\u0600-\\u06FF\\/]{1,256}(\\s*?[\\u0600-\\u06FF]{1,256}){1,2}/i;\n var regexes = {};\n\n function addRegexToken(token, regex, strictRegex) {\n regexes[token] = isFunction(regex) ? regex : function (isStrict, localeData) {\n return isStrict && strictRegex ? strictRegex : regex;\n };\n }\n\n function getParseRegexForToken(token, config) {\n if (!hasOwnProp(regexes, token)) {\n return new RegExp(unescapeFormat(token));\n }\n\n return regexes[token](config._strict, config._locale);\n } // Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript\n\n\n function unescapeFormat(s) {\n return regexEscape(s.replace('\\\\', '').replace(/\\\\(\\[)|\\\\(\\])|\\[([^\\]\\[]*)\\]|\\\\(.)/g, function (matched, p1, p2, p3, p4) {\n return p1 || p2 || p3 || p4;\n }));\n }\n\n function regexEscape(s) {\n return s.replace(/[-\\/\\\\^$*+?.()|[\\]{}]/g, '\\\\$&');\n }\n\n var tokens = {};\n\n function addParseToken(token, callback) {\n var i,\n func = callback;\n\n if (typeof token === 'string') {\n token = [token];\n }\n\n if (isNumber(callback)) {\n func = function (input, array) {\n array[callback] = toInt(input);\n };\n }\n\n for (i = 0; i < token.length; i++) {\n tokens[token[i]] = func;\n }\n }\n\n function addWeekParseToken(token, callback) {\n addParseToken(token, function (input, array, config, token) {\n config._w = config._w || {};\n callback(input, config._w, config, token);\n });\n }\n\n function addTimeToArrayFromToken(token, input, config) {\n if (input != null && hasOwnProp(tokens, token)) {\n tokens[token](input, config._a, config, token);\n }\n }\n\n var YEAR = 0;\n var MONTH = 1;\n var DATE = 2;\n var HOUR = 3;\n var MINUTE = 4;\n var SECOND = 5;\n var MILLISECOND = 6;\n var WEEK = 7;\n var WEEKDAY = 8; // FORMATTING\n\n addFormatToken('Y', 0, 0, function () {\n var y = this.year();\n return y <= 9999 ? '' + y : '+' + y;\n });\n addFormatToken(0, ['YY', 2], 0, function () {\n return this.year() % 100;\n });\n addFormatToken(0, ['YYYY', 4], 0, 'year');\n addFormatToken(0, ['YYYYY', 5], 0, 'year');\n addFormatToken(0, ['YYYYYY', 6, true], 0, 'year'); // ALIASES\n\n addUnitAlias('year', 'y'); // PRIORITIES\n\n addUnitPriority('year', 1); // PARSING\n\n addRegexToken('Y', matchSigned);\n addRegexToken('YY', match1to2, match2);\n addRegexToken('YYYY', match1to4, match4);\n addRegexToken('YYYYY', match1to6, match6);\n addRegexToken('YYYYYY', match1to6, match6);\n addParseToken(['YYYYY', 'YYYYYY'], YEAR);\n addParseToken('YYYY', function (input, array) {\n array[YEAR] = input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input);\n });\n addParseToken('YY', function (input, array) {\n array[YEAR] = hooks.parseTwoDigitYear(input);\n });\n addParseToken('Y', function (input, array) {\n array[YEAR] = parseInt(input, 10);\n }); // HELPERS\n\n function daysInYear(year) {\n return isLeapYear(year) ? 366 : 365;\n }\n\n function isLeapYear(year) {\n return year % 4 === 0 && year % 100 !== 0 || year % 400 === 0;\n } // HOOKS\n\n\n hooks.parseTwoDigitYear = function (input) {\n return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);\n }; // MOMENTS\n\n\n var getSetYear = makeGetSet('FullYear', true);\n\n function getIsLeapYear() {\n return isLeapYear(this.year());\n }\n\n function makeGetSet(unit, keepTime) {\n return function (value) {\n if (value != null) {\n set$1(this, unit, value);\n hooks.updateOffset(this, keepTime);\n return this;\n } else {\n return get(this, unit);\n }\n };\n }\n\n function get(mom, unit) {\n return mom.isValid() ? mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]() : NaN;\n }\n\n function set$1(mom, unit, value) {\n if (mom.isValid() && !isNaN(value)) {\n if (unit === 'FullYear' && isLeapYear(mom.year()) && mom.month() === 1 && mom.date() === 29) {\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value, mom.month(), daysInMonth(value, mom.month()));\n } else {\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value);\n }\n }\n } // MOMENTS\n\n\n function stringGet(units) {\n units = normalizeUnits(units);\n\n if (isFunction(this[units])) {\n return this[units]();\n }\n\n return this;\n }\n\n function stringSet(units, value) {\n if (typeof units === 'object') {\n units = normalizeObjectUnits(units);\n var prioritized = getPrioritizedUnits(units);\n\n for (var i = 0; i < prioritized.length; i++) {\n this[prioritized[i].unit](units[prioritized[i].unit]);\n }\n } else {\n units = normalizeUnits(units);\n\n if (isFunction(this[units])) {\n return this[units](value);\n }\n }\n\n return this;\n }\n\n function mod(n, x) {\n return (n % x + x) % x;\n }\n\n var indexOf;\n\n if (Array.prototype.indexOf) {\n indexOf = Array.prototype.indexOf;\n } else {\n indexOf = function (o) {\n // I know\n var i;\n\n for (i = 0; i < this.length; ++i) {\n if (this[i] === o) {\n return i;\n }\n }\n\n return -1;\n };\n }\n\n function daysInMonth(year, month) {\n if (isNaN(year) || isNaN(month)) {\n return NaN;\n }\n\n var modMonth = mod(month, 12);\n year += (month - modMonth) / 12;\n return modMonth === 1 ? isLeapYear(year) ? 29 : 28 : 31 - modMonth % 7 % 2;\n } // FORMATTING\n\n\n addFormatToken('M', ['MM', 2], 'Mo', function () {\n return this.month() + 1;\n });\n addFormatToken('MMM', 0, 0, function (format) {\n return this.localeData().monthsShort(this, format);\n });\n addFormatToken('MMMM', 0, 0, function (format) {\n return this.localeData().months(this, format);\n }); // ALIASES\n\n addUnitAlias('month', 'M'); // PRIORITY\n\n addUnitPriority('month', 8); // PARSING\n\n addRegexToken('M', match1to2);\n addRegexToken('MM', match1to2, match2);\n addRegexToken('MMM', function (isStrict, locale) {\n return locale.monthsShortRegex(isStrict);\n });\n addRegexToken('MMMM', function (isStrict, locale) {\n return locale.monthsRegex(isStrict);\n });\n addParseToken(['M', 'MM'], function (input, array) {\n array[MONTH] = toInt(input) - 1;\n });\n addParseToken(['MMM', 'MMMM'], function (input, array, config, token) {\n var month = config._locale.monthsParse(input, token, config._strict); // if we didn't find a month name, mark the date as invalid.\n\n\n if (month != null) {\n array[MONTH] = month;\n } else {\n getParsingFlags(config).invalidMonth = input;\n }\n }); // LOCALES\n\n var MONTHS_IN_FORMAT = /D[oD]?(\\[[^\\[\\]]*\\]|\\s)+MMMM?/;\n var defaultLocaleMonths = 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_');\n\n function localeMonths(m, format) {\n if (!m) {\n return isArray(this._months) ? this._months : this._months['standalone'];\n }\n\n return isArray(this._months) ? this._months[m.month()] : this._months[(this._months.isFormat || MONTHS_IN_FORMAT).test(format) ? 'format' : 'standalone'][m.month()];\n }\n\n var defaultLocaleMonthsShort = 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_');\n\n function localeMonthsShort(m, format) {\n if (!m) {\n return isArray(this._monthsShort) ? this._monthsShort : this._monthsShort['standalone'];\n }\n\n return isArray(this._monthsShort) ? this._monthsShort[m.month()] : this._monthsShort[MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'][m.month()];\n }\n\n function handleStrictParse(monthName, format, strict) {\n var i,\n ii,\n mom,\n llc = monthName.toLocaleLowerCase();\n\n if (!this._monthsParse) {\n // this is not used\n this._monthsParse = [];\n this._longMonthsParse = [];\n this._shortMonthsParse = [];\n\n for (i = 0; i < 12; ++i) {\n mom = createUTC([2000, i]);\n this._shortMonthsParse[i] = this.monthsShort(mom, '').toLocaleLowerCase();\n this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase();\n }\n }\n\n if (strict) {\n if (format === 'MMM') {\n ii = indexOf.call(this._shortMonthsParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._longMonthsParse, llc);\n return ii !== -1 ? ii : null;\n }\n } else {\n if (format === 'MMM') {\n ii = indexOf.call(this._shortMonthsParse, llc);\n\n if (ii !== -1) {\n return ii;\n }\n\n ii = indexOf.call(this._longMonthsParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._longMonthsParse, llc);\n\n if (ii !== -1) {\n return ii;\n }\n\n ii = indexOf.call(this._shortMonthsParse, llc);\n return ii !== -1 ? ii : null;\n }\n }\n }\n\n function localeMonthsParse(monthName, format, strict) {\n var i, mom, regex;\n\n if (this._monthsParseExact) {\n return handleStrictParse.call(this, monthName, format, strict);\n }\n\n if (!this._monthsParse) {\n this._monthsParse = [];\n this._longMonthsParse = [];\n this._shortMonthsParse = [];\n } // TODO: add sorting\n // Sorting makes sure if one month (or abbr) is a prefix of another\n // see sorting in computeMonthsParse\n\n\n for (i = 0; i < 12; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, i]);\n\n if (strict && !this._longMonthsParse[i]) {\n this._longMonthsParse[i] = new RegExp('^' + this.months(mom, '').replace('.', '') + '$', 'i');\n this._shortMonthsParse[i] = new RegExp('^' + this.monthsShort(mom, '').replace('.', '') + '$', 'i');\n }\n\n if (!strict && !this._monthsParse[i]) {\n regex = '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, '');\n this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i');\n } // test the regex\n\n\n if (strict && format === 'MMMM' && this._longMonthsParse[i].test(monthName)) {\n return i;\n } else if (strict && format === 'MMM' && this._shortMonthsParse[i].test(monthName)) {\n return i;\n } else if (!strict && this._monthsParse[i].test(monthName)) {\n return i;\n }\n }\n } // MOMENTS\n\n\n function setMonth(mom, value) {\n var dayOfMonth;\n\n if (!mom.isValid()) {\n // No op\n return mom;\n }\n\n if (typeof value === 'string') {\n if (/^\\d+$/.test(value)) {\n value = toInt(value);\n } else {\n value = mom.localeData().monthsParse(value); // TODO: Another silent failure?\n\n if (!isNumber(value)) {\n return mom;\n }\n }\n }\n\n dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value));\n\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth);\n\n return mom;\n }\n\n function getSetMonth(value) {\n if (value != null) {\n setMonth(this, value);\n hooks.updateOffset(this, true);\n return this;\n } else {\n return get(this, 'Month');\n }\n }\n\n function getDaysInMonth() {\n return daysInMonth(this.year(), this.month());\n }\n\n var defaultMonthsShortRegex = matchWord;\n\n function monthsShortRegex(isStrict) {\n if (this._monthsParseExact) {\n if (!hasOwnProp(this, '_monthsRegex')) {\n computeMonthsParse.call(this);\n }\n\n if (isStrict) {\n return this._monthsShortStrictRegex;\n } else {\n return this._monthsShortRegex;\n }\n } else {\n if (!hasOwnProp(this, '_monthsShortRegex')) {\n this._monthsShortRegex = defaultMonthsShortRegex;\n }\n\n return this._monthsShortStrictRegex && isStrict ? this._monthsShortStrictRegex : this._monthsShortRegex;\n }\n }\n\n var defaultMonthsRegex = matchWord;\n\n function monthsRegex(isStrict) {\n if (this._monthsParseExact) {\n if (!hasOwnProp(this, '_monthsRegex')) {\n computeMonthsParse.call(this);\n }\n\n if (isStrict) {\n return this._monthsStrictRegex;\n } else {\n return this._monthsRegex;\n }\n } else {\n if (!hasOwnProp(this, '_monthsRegex')) {\n this._monthsRegex = defaultMonthsRegex;\n }\n\n return this._monthsStrictRegex && isStrict ? this._monthsStrictRegex : this._monthsRegex;\n }\n }\n\n function computeMonthsParse() {\n function cmpLenRev(a, b) {\n return b.length - a.length;\n }\n\n var shortPieces = [],\n longPieces = [],\n mixedPieces = [],\n i,\n mom;\n\n for (i = 0; i < 12; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, i]);\n shortPieces.push(this.monthsShort(mom, ''));\n longPieces.push(this.months(mom, ''));\n mixedPieces.push(this.months(mom, ''));\n mixedPieces.push(this.monthsShort(mom, ''));\n } // Sorting makes sure if one month (or abbr) is a prefix of another it\n // will match the longer piece.\n\n\n shortPieces.sort(cmpLenRev);\n longPieces.sort(cmpLenRev);\n mixedPieces.sort(cmpLenRev);\n\n for (i = 0; i < 12; i++) {\n shortPieces[i] = regexEscape(shortPieces[i]);\n longPieces[i] = regexEscape(longPieces[i]);\n }\n\n for (i = 0; i < 24; i++) {\n mixedPieces[i] = regexEscape(mixedPieces[i]);\n }\n\n this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._monthsShortRegex = this._monthsRegex;\n this._monthsStrictRegex = new RegExp('^(' + longPieces.join('|') + ')', 'i');\n this._monthsShortStrictRegex = new RegExp('^(' + shortPieces.join('|') + ')', 'i');\n }\n\n function createDate(y, m, d, h, M, s, ms) {\n // can't just apply() to create a date:\n // https://stackoverflow.com/q/181348\n var date; // the date constructor remaps years 0-99 to 1900-1999\n\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n date = new Date(y + 400, m, d, h, M, s, ms);\n\n if (isFinite(date.getFullYear())) {\n date.setFullYear(y);\n }\n } else {\n date = new Date(y, m, d, h, M, s, ms);\n }\n\n return date;\n }\n\n function createUTCDate(y) {\n var date; // the Date.UTC function remaps years 0-99 to 1900-1999\n\n if (y < 100 && y >= 0) {\n var args = Array.prototype.slice.call(arguments); // preserve leap years using a full 400 year cycle, then reset\n\n args[0] = y + 400;\n date = new Date(Date.UTC.apply(null, args));\n\n if (isFinite(date.getUTCFullYear())) {\n date.setUTCFullYear(y);\n }\n } else {\n date = new Date(Date.UTC.apply(null, arguments));\n }\n\n return date;\n } // start-of-first-week - start-of-year\n\n\n function firstWeekOffset(year, dow, doy) {\n var // first-week day -- which january is always in the first week (4 for iso, 1 for other)\n fwd = 7 + dow - doy,\n // first-week day local weekday -- which local weekday is fwd\n fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7;\n return -fwdlw + fwd - 1;\n } // https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday\n\n\n function dayOfYearFromWeeks(year, week, weekday, dow, doy) {\n var localWeekday = (7 + weekday - dow) % 7,\n weekOffset = firstWeekOffset(year, dow, doy),\n dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset,\n resYear,\n resDayOfYear;\n\n if (dayOfYear <= 0) {\n resYear = year - 1;\n resDayOfYear = daysInYear(resYear) + dayOfYear;\n } else if (dayOfYear > daysInYear(year)) {\n resYear = year + 1;\n resDayOfYear = dayOfYear - daysInYear(year);\n } else {\n resYear = year;\n resDayOfYear = dayOfYear;\n }\n\n return {\n year: resYear,\n dayOfYear: resDayOfYear\n };\n }\n\n function weekOfYear(mom, dow, doy) {\n var weekOffset = firstWeekOffset(mom.year(), dow, doy),\n week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1,\n resWeek,\n resYear;\n\n if (week < 1) {\n resYear = mom.year() - 1;\n resWeek = week + weeksInYear(resYear, dow, doy);\n } else if (week > weeksInYear(mom.year(), dow, doy)) {\n resWeek = week - weeksInYear(mom.year(), dow, doy);\n resYear = mom.year() + 1;\n } else {\n resYear = mom.year();\n resWeek = week;\n }\n\n return {\n week: resWeek,\n year: resYear\n };\n }\n\n function weeksInYear(year, dow, doy) {\n var weekOffset = firstWeekOffset(year, dow, doy),\n weekOffsetNext = firstWeekOffset(year + 1, dow, doy);\n return (daysInYear(year) - weekOffset + weekOffsetNext) / 7;\n } // FORMATTING\n\n\n addFormatToken('w', ['ww', 2], 'wo', 'week');\n addFormatToken('W', ['WW', 2], 'Wo', 'isoWeek'); // ALIASES\n\n addUnitAlias('week', 'w');\n addUnitAlias('isoWeek', 'W'); // PRIORITIES\n\n addUnitPriority('week', 5);\n addUnitPriority('isoWeek', 5); // PARSING\n\n addRegexToken('w', match1to2);\n addRegexToken('ww', match1to2, match2);\n addRegexToken('W', match1to2);\n addRegexToken('WW', match1to2, match2);\n addWeekParseToken(['w', 'ww', 'W', 'WW'], function (input, week, config, token) {\n week[token.substr(0, 1)] = toInt(input);\n }); // HELPERS\n // LOCALES\n\n function localeWeek(mom) {\n return weekOfYear(mom, this._week.dow, this._week.doy).week;\n }\n\n var defaultLocaleWeek = {\n dow: 0,\n // Sunday is the first day of the week.\n doy: 6 // The week that contains Jan 6th is the first week of the year.\n\n };\n\n function localeFirstDayOfWeek() {\n return this._week.dow;\n }\n\n function localeFirstDayOfYear() {\n return this._week.doy;\n } // MOMENTS\n\n\n function getSetWeek(input) {\n var week = this.localeData().week(this);\n return input == null ? week : this.add((input - week) * 7, 'd');\n }\n\n function getSetISOWeek(input) {\n var week = weekOfYear(this, 1, 4).week;\n return input == null ? week : this.add((input - week) * 7, 'd');\n } // FORMATTING\n\n\n addFormatToken('d', 0, 'do', 'day');\n addFormatToken('dd', 0, 0, function (format) {\n return this.localeData().weekdaysMin(this, format);\n });\n addFormatToken('ddd', 0, 0, function (format) {\n return this.localeData().weekdaysShort(this, format);\n });\n addFormatToken('dddd', 0, 0, function (format) {\n return this.localeData().weekdays(this, format);\n });\n addFormatToken('e', 0, 0, 'weekday');\n addFormatToken('E', 0, 0, 'isoWeekday'); // ALIASES\n\n addUnitAlias('day', 'd');\n addUnitAlias('weekday', 'e');\n addUnitAlias('isoWeekday', 'E'); // PRIORITY\n\n addUnitPriority('day', 11);\n addUnitPriority('weekday', 11);\n addUnitPriority('isoWeekday', 11); // PARSING\n\n addRegexToken('d', match1to2);\n addRegexToken('e', match1to2);\n addRegexToken('E', match1to2);\n addRegexToken('dd', function (isStrict, locale) {\n return locale.weekdaysMinRegex(isStrict);\n });\n addRegexToken('ddd', function (isStrict, locale) {\n return locale.weekdaysShortRegex(isStrict);\n });\n addRegexToken('dddd', function (isStrict, locale) {\n return locale.weekdaysRegex(isStrict);\n });\n addWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) {\n var weekday = config._locale.weekdaysParse(input, token, config._strict); // if we didn't get a weekday name, mark the date as invalid\n\n\n if (weekday != null) {\n week.d = weekday;\n } else {\n getParsingFlags(config).invalidWeekday = input;\n }\n });\n addWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) {\n week[token] = toInt(input);\n }); // HELPERS\n\n function parseWeekday(input, locale) {\n if (typeof input !== 'string') {\n return input;\n }\n\n if (!isNaN(input)) {\n return parseInt(input, 10);\n }\n\n input = locale.weekdaysParse(input);\n\n if (typeof input === 'number') {\n return input;\n }\n\n return null;\n }\n\n function parseIsoWeekday(input, locale) {\n if (typeof input === 'string') {\n return locale.weekdaysParse(input) % 7 || 7;\n }\n\n return isNaN(input) ? null : input;\n } // LOCALES\n\n\n function shiftWeekdays(ws, n) {\n return ws.slice(n, 7).concat(ws.slice(0, n));\n }\n\n var defaultLocaleWeekdays = 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_');\n\n function localeWeekdays(m, format) {\n var weekdays = isArray(this._weekdays) ? this._weekdays : this._weekdays[m && m !== true && this._weekdays.isFormat.test(format) ? 'format' : 'standalone'];\n return m === true ? shiftWeekdays(weekdays, this._week.dow) : m ? weekdays[m.day()] : weekdays;\n }\n\n var defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_');\n\n function localeWeekdaysShort(m) {\n return m === true ? shiftWeekdays(this._weekdaysShort, this._week.dow) : m ? this._weekdaysShort[m.day()] : this._weekdaysShort;\n }\n\n var defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_');\n\n function localeWeekdaysMin(m) {\n return m === true ? shiftWeekdays(this._weekdaysMin, this._week.dow) : m ? this._weekdaysMin[m.day()] : this._weekdaysMin;\n }\n\n function handleStrictParse$1(weekdayName, format, strict) {\n var i,\n ii,\n mom,\n llc = weekdayName.toLocaleLowerCase();\n\n if (!this._weekdaysParse) {\n this._weekdaysParse = [];\n this._shortWeekdaysParse = [];\n this._minWeekdaysParse = [];\n\n for (i = 0; i < 7; ++i) {\n mom = createUTC([2000, 1]).day(i);\n this._minWeekdaysParse[i] = this.weekdaysMin(mom, '').toLocaleLowerCase();\n this._shortWeekdaysParse[i] = this.weekdaysShort(mom, '').toLocaleLowerCase();\n this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase();\n }\n }\n\n if (strict) {\n if (format === 'dddd') {\n ii = indexOf.call(this._weekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else if (format === 'ddd') {\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n }\n } else {\n if (format === 'dddd') {\n ii = indexOf.call(this._weekdaysParse, llc);\n\n if (ii !== -1) {\n return ii;\n }\n\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n\n if (ii !== -1) {\n return ii;\n }\n\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else if (format === 'ddd') {\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n\n if (ii !== -1) {\n return ii;\n }\n\n ii = indexOf.call(this._weekdaysParse, llc);\n\n if (ii !== -1) {\n return ii;\n }\n\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._minWeekdaysParse, llc);\n\n if (ii !== -1) {\n return ii;\n }\n\n ii = indexOf.call(this._weekdaysParse, llc);\n\n if (ii !== -1) {\n return ii;\n }\n\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n }\n }\n }\n\n function localeWeekdaysParse(weekdayName, format, strict) {\n var i, mom, regex;\n\n if (this._weekdaysParseExact) {\n return handleStrictParse$1.call(this, weekdayName, format, strict);\n }\n\n if (!this._weekdaysParse) {\n this._weekdaysParse = [];\n this._minWeekdaysParse = [];\n this._shortWeekdaysParse = [];\n this._fullWeekdaysParse = [];\n }\n\n for (i = 0; i < 7; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, 1]).day(i);\n\n if (strict && !this._fullWeekdaysParse[i]) {\n this._fullWeekdaysParse[i] = new RegExp('^' + this.weekdays(mom, '').replace('.', '\\\\.?') + '$', 'i');\n this._shortWeekdaysParse[i] = new RegExp('^' + this.weekdaysShort(mom, '').replace('.', '\\\\.?') + '$', 'i');\n this._minWeekdaysParse[i] = new RegExp('^' + this.weekdaysMin(mom, '').replace('.', '\\\\.?') + '$', 'i');\n }\n\n if (!this._weekdaysParse[i]) {\n regex = '^' + this.weekdays(mom, '') + '|^' + this.weekdaysShort(mom, '') + '|^' + this.weekdaysMin(mom, '');\n this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i');\n } // test the regex\n\n\n if (strict && format === 'dddd' && this._fullWeekdaysParse[i].test(weekdayName)) {\n return i;\n } else if (strict && format === 'ddd' && this._shortWeekdaysParse[i].test(weekdayName)) {\n return i;\n } else if (strict && format === 'dd' && this._minWeekdaysParse[i].test(weekdayName)) {\n return i;\n } else if (!strict && this._weekdaysParse[i].test(weekdayName)) {\n return i;\n }\n }\n } // MOMENTS\n\n\n function getSetDayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n\n var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay();\n\n if (input != null) {\n input = parseWeekday(input, this.localeData());\n return this.add(input - day, 'd');\n } else {\n return day;\n }\n }\n\n function getSetLocaleDayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n\n var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7;\n return input == null ? weekday : this.add(input - weekday, 'd');\n }\n\n function getSetISODayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n } // behaves the same as moment#day except\n // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)\n // as a setter, sunday should belong to the previous week.\n\n\n if (input != null) {\n var weekday = parseIsoWeekday(input, this.localeData());\n return this.day(this.day() % 7 ? weekday : weekday - 7);\n } else {\n return this.day() || 7;\n }\n }\n\n var defaultWeekdaysRegex = matchWord;\n\n function weekdaysRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n\n if (isStrict) {\n return this._weekdaysStrictRegex;\n } else {\n return this._weekdaysRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n this._weekdaysRegex = defaultWeekdaysRegex;\n }\n\n return this._weekdaysStrictRegex && isStrict ? this._weekdaysStrictRegex : this._weekdaysRegex;\n }\n }\n\n var defaultWeekdaysShortRegex = matchWord;\n\n function weekdaysShortRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n\n if (isStrict) {\n return this._weekdaysShortStrictRegex;\n } else {\n return this._weekdaysShortRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysShortRegex')) {\n this._weekdaysShortRegex = defaultWeekdaysShortRegex;\n }\n\n return this._weekdaysShortStrictRegex && isStrict ? this._weekdaysShortStrictRegex : this._weekdaysShortRegex;\n }\n }\n\n var defaultWeekdaysMinRegex = matchWord;\n\n function weekdaysMinRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n\n if (isStrict) {\n return this._weekdaysMinStrictRegex;\n } else {\n return this._weekdaysMinRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysMinRegex')) {\n this._weekdaysMinRegex = defaultWeekdaysMinRegex;\n }\n\n return this._weekdaysMinStrictRegex && isStrict ? this._weekdaysMinStrictRegex : this._weekdaysMinRegex;\n }\n }\n\n function computeWeekdaysParse() {\n function cmpLenRev(a, b) {\n return b.length - a.length;\n }\n\n var minPieces = [],\n shortPieces = [],\n longPieces = [],\n mixedPieces = [],\n i,\n mom,\n minp,\n shortp,\n longp;\n\n for (i = 0; i < 7; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, 1]).day(i);\n minp = this.weekdaysMin(mom, '');\n shortp = this.weekdaysShort(mom, '');\n longp = this.weekdays(mom, '');\n minPieces.push(minp);\n shortPieces.push(shortp);\n longPieces.push(longp);\n mixedPieces.push(minp);\n mixedPieces.push(shortp);\n mixedPieces.push(longp);\n } // Sorting makes sure if one weekday (or abbr) is a prefix of another it\n // will match the longer piece.\n\n\n minPieces.sort(cmpLenRev);\n shortPieces.sort(cmpLenRev);\n longPieces.sort(cmpLenRev);\n mixedPieces.sort(cmpLenRev);\n\n for (i = 0; i < 7; i++) {\n shortPieces[i] = regexEscape(shortPieces[i]);\n longPieces[i] = regexEscape(longPieces[i]);\n mixedPieces[i] = regexEscape(mixedPieces[i]);\n }\n\n this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._weekdaysShortRegex = this._weekdaysRegex;\n this._weekdaysMinRegex = this._weekdaysRegex;\n this._weekdaysStrictRegex = new RegExp('^(' + longPieces.join('|') + ')', 'i');\n this._weekdaysShortStrictRegex = new RegExp('^(' + shortPieces.join('|') + ')', 'i');\n this._weekdaysMinStrictRegex = new RegExp('^(' + minPieces.join('|') + ')', 'i');\n } // FORMATTING\n\n\n function hFormat() {\n return this.hours() % 12 || 12;\n }\n\n function kFormat() {\n return this.hours() || 24;\n }\n\n addFormatToken('H', ['HH', 2], 0, 'hour');\n addFormatToken('h', ['hh', 2], 0, hFormat);\n addFormatToken('k', ['kk', 2], 0, kFormat);\n addFormatToken('hmm', 0, 0, function () {\n return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2);\n });\n addFormatToken('hmmss', 0, 0, function () {\n return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2) + zeroFill(this.seconds(), 2);\n });\n addFormatToken('Hmm', 0, 0, function () {\n return '' + this.hours() + zeroFill(this.minutes(), 2);\n });\n addFormatToken('Hmmss', 0, 0, function () {\n return '' + this.hours() + zeroFill(this.minutes(), 2) + zeroFill(this.seconds(), 2);\n });\n\n function meridiem(token, lowercase) {\n addFormatToken(token, 0, 0, function () {\n return this.localeData().meridiem(this.hours(), this.minutes(), lowercase);\n });\n }\n\n meridiem('a', true);\n meridiem('A', false); // ALIASES\n\n addUnitAlias('hour', 'h'); // PRIORITY\n\n addUnitPriority('hour', 13); // PARSING\n\n function matchMeridiem(isStrict, locale) {\n return locale._meridiemParse;\n }\n\n addRegexToken('a', matchMeridiem);\n addRegexToken('A', matchMeridiem);\n addRegexToken('H', match1to2);\n addRegexToken('h', match1to2);\n addRegexToken('k', match1to2);\n addRegexToken('HH', match1to2, match2);\n addRegexToken('hh', match1to2, match2);\n addRegexToken('kk', match1to2, match2);\n addRegexToken('hmm', match3to4);\n addRegexToken('hmmss', match5to6);\n addRegexToken('Hmm', match3to4);\n addRegexToken('Hmmss', match5to6);\n addParseToken(['H', 'HH'], HOUR);\n addParseToken(['k', 'kk'], function (input, array, config) {\n var kInput = toInt(input);\n array[HOUR] = kInput === 24 ? 0 : kInput;\n });\n addParseToken(['a', 'A'], function (input, array, config) {\n config._isPm = config._locale.isPM(input);\n config._meridiem = input;\n });\n addParseToken(['h', 'hh'], function (input, array, config) {\n array[HOUR] = toInt(input);\n getParsingFlags(config).bigHour = true;\n });\n addParseToken('hmm', function (input, array, config) {\n var pos = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos));\n array[MINUTE] = toInt(input.substr(pos));\n getParsingFlags(config).bigHour = true;\n });\n addParseToken('hmmss', function (input, array, config) {\n var pos1 = input.length - 4;\n var pos2 = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos1));\n array[MINUTE] = toInt(input.substr(pos1, 2));\n array[SECOND] = toInt(input.substr(pos2));\n getParsingFlags(config).bigHour = true;\n });\n addParseToken('Hmm', function (input, array, config) {\n var pos = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos));\n array[MINUTE] = toInt(input.substr(pos));\n });\n addParseToken('Hmmss', function (input, array, config) {\n var pos1 = input.length - 4;\n var pos2 = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos1));\n array[MINUTE] = toInt(input.substr(pos1, 2));\n array[SECOND] = toInt(input.substr(pos2));\n }); // LOCALES\n\n function localeIsPM(input) {\n // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays\n // Using charAt should be more compatible.\n return (input + '').toLowerCase().charAt(0) === 'p';\n }\n\n var defaultLocaleMeridiemParse = /[ap]\\.?m?\\.?/i;\n\n function localeMeridiem(hours, minutes, isLower) {\n if (hours > 11) {\n return isLower ? 'pm' : 'PM';\n } else {\n return isLower ? 'am' : 'AM';\n }\n } // MOMENTS\n // Setting the hour should keep the time, because the user explicitly\n // specified which hour they want. So trying to maintain the same hour (in\n // a new timezone) makes sense. Adding/subtracting hours does not follow\n // this rule.\n\n\n var getSetHour = makeGetSet('Hours', true);\n var baseConfig = {\n calendar: defaultCalendar,\n longDateFormat: defaultLongDateFormat,\n invalidDate: defaultInvalidDate,\n ordinal: defaultOrdinal,\n dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse,\n relativeTime: defaultRelativeTime,\n months: defaultLocaleMonths,\n monthsShort: defaultLocaleMonthsShort,\n week: defaultLocaleWeek,\n weekdays: defaultLocaleWeekdays,\n weekdaysMin: defaultLocaleWeekdaysMin,\n weekdaysShort: defaultLocaleWeekdaysShort,\n meridiemParse: defaultLocaleMeridiemParse\n }; // internal storage for locale config files\n\n var locales = {};\n var localeFamilies = {};\n var globalLocale;\n\n function normalizeLocale(key) {\n return key ? key.toLowerCase().replace('_', '-') : key;\n } // pick the locale from the array\n // try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each\n // substring from most specific to least, but move to the next array item if it's a more specific variant than the current root\n\n\n function chooseLocale(names) {\n var i = 0,\n j,\n next,\n locale,\n split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n\n if (locale) {\n return locale;\n }\n\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n\n j--;\n }\n\n i++;\n }\n\n return globalLocale;\n }\n\n function loadLocale(name) {\n var oldLocale = null; // TODO: Find a better way to register and load all the locales in Node\n\n if (!locales[name] && 'object' !== 'undefined' && module && module.exports) {\n try {\n oldLocale = globalLocale._abbr;\n var aliasedRequire = commonjsRequire;\n aliasedRequire('./locale/' + name);\n getSetGlobalLocale(oldLocale);\n } catch (e) {}\n }\n\n return locales[name];\n } // This function will load locale and then set the global locale. If\n // no arguments are passed in, it will simply return the current global\n // locale key.\n\n\n function getSetGlobalLocale(key, values) {\n var data;\n\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n } else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n } else {\n if (typeof console !== 'undefined' && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n }\n\n function defineLocale(name, config) {\n if (config !== null) {\n var locale,\n parentConfig = baseConfig;\n config.abbr = name;\n\n if (locales[name] != null) {\n deprecateSimple('defineLocaleOverride', 'use moment.updateLocale(localeName, config) to change ' + 'an existing locale. moment.defineLocale(localeName, ' + 'config) should only be used for creating a new locale ' + 'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.');\n parentConfig = locales[name]._config;\n } else if (config.parentLocale != null) {\n if (locales[config.parentLocale] != null) {\n parentConfig = locales[config.parentLocale]._config;\n } else {\n locale = loadLocale(config.parentLocale);\n\n if (locale != null) {\n parentConfig = locale._config;\n } else {\n if (!localeFamilies[config.parentLocale]) {\n localeFamilies[config.parentLocale] = [];\n }\n\n localeFamilies[config.parentLocale].push({\n name: name,\n config: config\n });\n return null;\n }\n }\n }\n\n locales[name] = new Locale(mergeConfigs(parentConfig, config));\n\n if (localeFamilies[name]) {\n localeFamilies[name].forEach(function (x) {\n defineLocale(x.name, x.config);\n });\n } // backwards compat for now: also set the locale\n // make sure we set the locale AFTER all child locales have been\n // created, so we won't end up with the child locale set.\n\n\n getSetGlobalLocale(name);\n return locales[name];\n } else {\n // useful for testing\n delete locales[name];\n return null;\n }\n }\n\n function updateLocale(name, config) {\n if (config != null) {\n var locale,\n tmpLocale,\n parentConfig = baseConfig; // MERGE\n\n tmpLocale = loadLocale(name);\n\n if (tmpLocale != null) {\n parentConfig = tmpLocale._config;\n }\n\n config = mergeConfigs(parentConfig, config);\n locale = new Locale(config);\n locale.parentLocale = locales[name];\n locales[name] = locale; // backwards compat for now: also set the locale\n\n getSetGlobalLocale(name);\n } else {\n // pass null for config to unupdate, useful for tests\n if (locales[name] != null) {\n if (locales[name].parentLocale != null) {\n locales[name] = locales[name].parentLocale;\n } else if (locales[name] != null) {\n delete locales[name];\n }\n }\n }\n\n return locales[name];\n } // returns locale data\n\n\n function getLocale(key) {\n var locale;\n\n if (key && key._locale && key._locale._abbr) {\n key = key._locale._abbr;\n }\n\n if (!key) {\n return globalLocale;\n }\n\n if (!isArray(key)) {\n //short-circuit everything else\n locale = loadLocale(key);\n\n if (locale) {\n return locale;\n }\n\n key = [key];\n }\n\n return chooseLocale(key);\n }\n\n function listLocales() {\n return keys(locales);\n }\n\n function checkOverflow(m) {\n var overflow;\n var a = m._a;\n\n if (a && getParsingFlags(m).overflow === -2) {\n overflow = a[MONTH] < 0 || a[MONTH] > 11 ? MONTH : a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH]) ? DATE : a[HOUR] < 0 || a[HOUR] > 24 || a[HOUR] === 24 && (a[MINUTE] !== 0 || a[SECOND] !== 0 || a[MILLISECOND] !== 0) ? HOUR : a[MINUTE] < 0 || a[MINUTE] > 59 ? MINUTE : a[SECOND] < 0 || a[SECOND] > 59 ? SECOND : a[MILLISECOND] < 0 || a[MILLISECOND] > 999 ? MILLISECOND : -1;\n\n if (getParsingFlags(m)._overflowDayOfYear && (overflow < YEAR || overflow > DATE)) {\n overflow = DATE;\n }\n\n if (getParsingFlags(m)._overflowWeeks && overflow === -1) {\n overflow = WEEK;\n }\n\n if (getParsingFlags(m)._overflowWeekday && overflow === -1) {\n overflow = WEEKDAY;\n }\n\n getParsingFlags(m).overflow = overflow;\n }\n\n return m;\n } // Pick the first defined of two or three arguments.\n\n\n function defaults(a, b, c) {\n if (a != null) {\n return a;\n }\n\n if (b != null) {\n return b;\n }\n\n return c;\n }\n\n function currentDateArray(config) {\n // hooks is actually the exported moment object\n var nowValue = new Date(hooks.now());\n\n if (config._useUTC) {\n return [nowValue.getUTCFullYear(), nowValue.getUTCMonth(), nowValue.getUTCDate()];\n }\n\n return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()];\n } // convert an array to a date.\n // the array should mirror the parameters below\n // note: all values past the year are optional and will default to the lowest possible value.\n // [year, month, day , hour, minute, second, millisecond]\n\n\n function configFromArray(config) {\n var i,\n date,\n input = [],\n currentDate,\n expectedWeekday,\n yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config); //compute day of the year from weeks and weekdays\n\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n } //if the day of the year is set, figure out what it is\n\n\n if (config._dayOfYear != null) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse) || config._dayOfYear === 0) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n } // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n\n\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n } // Zero out whatever was not defaulted, including time\n\n\n for (; i < 7; i++) {\n config._a[i] = input[i] = config._a[i] == null ? i === 2 ? 1 : 0 : config._a[i];\n } // Check for 24:00:00.000\n\n\n if (config._a[HOUR] === 24 && config._a[MINUTE] === 0 && config._a[SECOND] === 0 && config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n expectedWeekday = config._useUTC ? config._d.getUTCDay() : config._d.getDay(); // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n } // check for mismatching day of week\n\n\n if (config._w && typeof config._w.d !== 'undefined' && config._w.d !== expectedWeekday) {\n getParsingFlags(config).weekdayMismatch = true;\n }\n }\n\n function dayOfYearFromWeekInfo(config) {\n var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow;\n w = config._w;\n\n if (w.GG != null || w.W != null || w.E != null) {\n dow = 1;\n doy = 4; // TODO: We need to take the current isoWeekYear, but that depends on\n // how we interpret now (local, utc, fixed offset). So create\n // a now version of current config (take local/utc/offset flags, and\n // create now).\n\n weekYear = defaults(w.GG, config._a[YEAR], weekOfYear(createLocal(), 1, 4).year);\n week = defaults(w.W, 1);\n weekday = defaults(w.E, 1);\n\n if (weekday < 1 || weekday > 7) {\n weekdayOverflow = true;\n }\n } else {\n dow = config._locale._week.dow;\n doy = config._locale._week.doy;\n var curWeek = weekOfYear(createLocal(), dow, doy);\n weekYear = defaults(w.gg, config._a[YEAR], curWeek.year); // Default to current week.\n\n week = defaults(w.w, curWeek.week);\n\n if (w.d != null) {\n // weekday -- low day numbers are considered next week\n weekday = w.d;\n\n if (weekday < 0 || weekday > 6) {\n weekdayOverflow = true;\n }\n } else if (w.e != null) {\n // local weekday -- counting starts from beginning of week\n weekday = w.e + dow;\n\n if (w.e < 0 || w.e > 6) {\n weekdayOverflow = true;\n }\n } else {\n // default to beginning of week\n weekday = dow;\n }\n }\n\n if (week < 1 || week > weeksInYear(weekYear, dow, doy)) {\n getParsingFlags(config)._overflowWeeks = true;\n } else if (weekdayOverflow != null) {\n getParsingFlags(config)._overflowWeekday = true;\n } else {\n temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy);\n config._a[YEAR] = temp.year;\n config._dayOfYear = temp.dayOfYear;\n }\n } // iso 8601 regex\n // 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00)\n\n\n var extendedIsoRegex = /^\\s*((?:[+-]\\d{6}|\\d{4})-(?:\\d\\d-\\d\\d|W\\d\\d-\\d|W\\d\\d|\\d\\d\\d|\\d\\d))(?:(T| )(\\d\\d(?::\\d\\d(?::\\d\\d(?:[.,]\\d+)?)?)?)([\\+\\-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/;\n var basicIsoRegex = /^\\s*((?:[+-]\\d{6}|\\d{4})(?:\\d\\d\\d\\d|W\\d\\d\\d|W\\d\\d|\\d\\d\\d|\\d\\d))(?:(T| )(\\d\\d(?:\\d\\d(?:\\d\\d(?:[.,]\\d+)?)?)?)([\\+\\-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/;\n var tzRegex = /Z|[+-]\\d\\d(?::?\\d\\d)?/;\n var isoDates = [['YYYYYY-MM-DD', /[+-]\\d{6}-\\d\\d-\\d\\d/], ['YYYY-MM-DD', /\\d{4}-\\d\\d-\\d\\d/], ['GGGG-[W]WW-E', /\\d{4}-W\\d\\d-\\d/], ['GGGG-[W]WW', /\\d{4}-W\\d\\d/, false], ['YYYY-DDD', /\\d{4}-\\d{3}/], ['YYYY-MM', /\\d{4}-\\d\\d/, false], ['YYYYYYMMDD', /[+-]\\d{10}/], ['YYYYMMDD', /\\d{8}/], // YYYYMM is NOT allowed by the standard\n ['GGGG[W]WWE', /\\d{4}W\\d{3}/], ['GGGG[W]WW', /\\d{4}W\\d{2}/, false], ['YYYYDDD', /\\d{7}/]]; // iso time formats and regexes\n\n var isoTimes = [['HH:mm:ss.SSSS', /\\d\\d:\\d\\d:\\d\\d\\.\\d+/], ['HH:mm:ss,SSSS', /\\d\\d:\\d\\d:\\d\\d,\\d+/], ['HH:mm:ss', /\\d\\d:\\d\\d:\\d\\d/], ['HH:mm', /\\d\\d:\\d\\d/], ['HHmmss.SSSS', /\\d\\d\\d\\d\\d\\d\\.\\d+/], ['HHmmss,SSSS', /\\d\\d\\d\\d\\d\\d,\\d+/], ['HHmmss', /\\d\\d\\d\\d\\d\\d/], ['HHmm', /\\d\\d\\d\\d/], ['HH', /\\d\\d/]];\n var aspNetJsonRegex = /^\\/?Date\\((\\-?\\d+)/i; // date from iso format\n\n function configFromISO(config) {\n var i,\n l,\n string = config._i,\n match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string),\n allowTime,\n dateFormat,\n timeFormat,\n tzFormat;\n\n if (match) {\n getParsingFlags(config).iso = true;\n\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(match[1])) {\n dateFormat = isoDates[i][0];\n allowTime = isoDates[i][2] !== false;\n break;\n }\n }\n\n if (dateFormat == null) {\n config._isValid = false;\n return;\n }\n\n if (match[3]) {\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(match[3])) {\n // match[2] should be 'T' or space\n timeFormat = (match[2] || ' ') + isoTimes[i][0];\n break;\n }\n }\n\n if (timeFormat == null) {\n config._isValid = false;\n return;\n }\n }\n\n if (!allowTime && timeFormat != null) {\n config._isValid = false;\n return;\n }\n\n if (match[4]) {\n if (tzRegex.exec(match[4])) {\n tzFormat = 'Z';\n } else {\n config._isValid = false;\n return;\n }\n }\n\n config._f = dateFormat + (timeFormat || '') + (tzFormat || '');\n configFromStringAndFormat(config);\n } else {\n config._isValid = false;\n }\n } // RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3\n\n\n var rfc2822 = /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\\s)?(\\d{1,2})\\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\\s(\\d{2,4})\\s(\\d\\d):(\\d\\d)(?::(\\d\\d))?\\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\\d{4}))$/;\n\n function extractFromRFC2822Strings(yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr) {\n var result = [untruncateYear(yearStr), defaultLocaleMonthsShort.indexOf(monthStr), parseInt(dayStr, 10), parseInt(hourStr, 10), parseInt(minuteStr, 10)];\n\n if (secondStr) {\n result.push(parseInt(secondStr, 10));\n }\n\n return result;\n }\n\n function untruncateYear(yearStr) {\n var year = parseInt(yearStr, 10);\n\n if (year <= 49) {\n return 2000 + year;\n } else if (year <= 999) {\n return 1900 + year;\n }\n\n return year;\n }\n\n function preprocessRFC2822(s) {\n // Remove comments and folding whitespace and replace multiple-spaces with a single space\n return s.replace(/\\([^)]*\\)|[\\n\\t]/g, ' ').replace(/(\\s\\s+)/g, ' ').replace(/^\\s\\s*/, '').replace(/\\s\\s*$/, '');\n }\n\n function checkWeekday(weekdayStr, parsedInput, config) {\n if (weekdayStr) {\n // TODO: Replace the vanilla JS Date object with an indepentent day-of-week check.\n var weekdayProvided = defaultLocaleWeekdaysShort.indexOf(weekdayStr),\n weekdayActual = new Date(parsedInput[0], parsedInput[1], parsedInput[2]).getDay();\n\n if (weekdayProvided !== weekdayActual) {\n getParsingFlags(config).weekdayMismatch = true;\n config._isValid = false;\n return false;\n }\n }\n\n return true;\n }\n\n var obsOffsets = {\n UT: 0,\n GMT: 0,\n EDT: -4 * 60,\n EST: -5 * 60,\n CDT: -5 * 60,\n CST: -6 * 60,\n MDT: -6 * 60,\n MST: -7 * 60,\n PDT: -7 * 60,\n PST: -8 * 60\n };\n\n function calculateOffset(obsOffset, militaryOffset, numOffset) {\n if (obsOffset) {\n return obsOffsets[obsOffset];\n } else if (militaryOffset) {\n // the only allowed military tz is Z\n return 0;\n } else {\n var hm = parseInt(numOffset, 10);\n var m = hm % 100,\n h = (hm - m) / 100;\n return h * 60 + m;\n }\n } // date and time from ref 2822 format\n\n\n function configFromRFC2822(config) {\n var match = rfc2822.exec(preprocessRFC2822(config._i));\n\n if (match) {\n var parsedArray = extractFromRFC2822Strings(match[4], match[3], match[2], match[5], match[6], match[7]);\n\n if (!checkWeekday(match[1], parsedArray, config)) {\n return;\n }\n\n config._a = parsedArray;\n config._tzm = calculateOffset(match[8], match[9], match[10]);\n config._d = createUTCDate.apply(null, config._a);\n\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n\n getParsingFlags(config).rfc2822 = true;\n } else {\n config._isValid = false;\n }\n } // date from iso format or fallback\n\n\n function configFromString(config) {\n var matched = aspNetJsonRegex.exec(config._i);\n\n if (matched !== null) {\n config._d = new Date(+matched[1]);\n return;\n }\n\n configFromISO(config);\n\n if (config._isValid === false) {\n delete config._isValid;\n } else {\n return;\n }\n\n configFromRFC2822(config);\n\n if (config._isValid === false) {\n delete config._isValid;\n } else {\n return;\n } // Final attempt, use Input Fallback\n\n\n hooks.createFromInputFallback(config);\n }\n\n hooks.createFromInputFallback = deprecate('value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), ' + 'which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are ' + 'discouraged and will be removed in an upcoming major release. Please refer to ' + 'http://momentjs.com/guides/#/warnings/js-date/ for more info.', function (config) {\n config._d = new Date(config._i + (config._useUTC ? ' UTC' : ''));\n }); // constant that refers to the ISO standard\n\n hooks.ISO_8601 = function () {}; // constant that refers to the RFC 2822 form\n\n\n hooks.RFC_2822 = function () {}; // date from string and format string\n\n\n function configFromStringAndFormat(config) {\n // TODO: Move this to another part of the creation flow to prevent circular deps\n if (config._f === hooks.ISO_8601) {\n configFromISO(config);\n return;\n }\n\n if (config._f === hooks.RFC_2822) {\n configFromRFC2822(config);\n return;\n }\n\n config._a = [];\n getParsingFlags(config).empty = true; // This array is used to make a Date, either with `new Date` or `Date.UTC`\n\n var string = '' + config._i,\n i,\n parsedInput,\n tokens,\n token,\n skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0]; // console.log('token', token, 'parsedInput', parsedInput,\n // 'regex', getParseRegexForToken(token, config));\n\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n\n if (skipped.length > 0) {\n getParsingFlags(config).unusedInput.push(skipped);\n }\n\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n } // don't parse if it's not a known token\n\n\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n getParsingFlags(config).empty = false;\n } else {\n getParsingFlags(config).unusedTokens.push(token);\n }\n\n addTimeToArrayFromToken(token, parsedInput, config);\n } else if (config._strict && !parsedInput) {\n getParsingFlags(config).unusedTokens.push(token);\n }\n } // add remaining unparsed input length to the string\n\n\n getParsingFlags(config).charsLeftOver = stringLength - totalParsedInputLength;\n\n if (string.length > 0) {\n getParsingFlags(config).unusedInput.push(string);\n } // clear _12h flag if hour is <= 12\n\n\n if (config._a[HOUR] <= 12 && getParsingFlags(config).bigHour === true && config._a[HOUR] > 0) {\n getParsingFlags(config).bigHour = undefined;\n }\n\n getParsingFlags(config).parsedDateParts = config._a.slice(0);\n getParsingFlags(config).meridiem = config._meridiem; // handle meridiem\n\n config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR], config._meridiem);\n configFromArray(config);\n checkOverflow(config);\n }\n\n function meridiemFixWrap(locale, hour, meridiem) {\n var isPm;\n\n if (meridiem == null) {\n // nothing to do\n return hour;\n }\n\n if (locale.meridiemHour != null) {\n return locale.meridiemHour(hour, meridiem);\n } else if (locale.isPM != null) {\n // Fallback\n isPm = locale.isPM(meridiem);\n\n if (isPm && hour < 12) {\n hour += 12;\n }\n\n if (!isPm && hour === 12) {\n hour = 0;\n }\n\n return hour;\n } else {\n // this is not supposed to happen\n return hour;\n }\n } // date from string and array of format strings\n\n\n function configFromStringAndArray(config) {\n var tempConfig, bestMoment, scoreToBeat, i, currentScore;\n\n if (config._f.length === 0) {\n getParsingFlags(config).invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < config._f.length; i++) {\n currentScore = 0;\n tempConfig = copyConfig({}, config);\n\n if (config._useUTC != null) {\n tempConfig._useUTC = config._useUTC;\n }\n\n tempConfig._f = config._f[i];\n configFromStringAndFormat(tempConfig);\n\n if (!isValid(tempConfig)) {\n continue;\n } // if there is any input that was not parsed add a penalty for that format\n\n\n currentScore += getParsingFlags(tempConfig).charsLeftOver; //or tokens\n\n currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10;\n getParsingFlags(tempConfig).score = currentScore;\n\n if (scoreToBeat == null || currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n\n extend(config, bestMoment || tempConfig);\n }\n\n function configFromObject(config) {\n if (config._d) {\n return;\n }\n\n var i = normalizeObjectUnits(config._i);\n config._a = map([i.year, i.month, i.day || i.date, i.hour, i.minute, i.second, i.millisecond], function (obj) {\n return obj && parseInt(obj, 10);\n });\n configFromArray(config);\n }\n\n function createFromConfig(config) {\n var res = new Moment(checkOverflow(prepareConfig(config)));\n\n if (res._nextDay) {\n // Adding is smart enough around DST\n res.add(1, 'd');\n res._nextDay = undefined;\n }\n\n return res;\n }\n\n function prepareConfig(config) {\n var input = config._i,\n format = config._f;\n config._locale = config._locale || getLocale(config._l);\n\n if (input === null || format === undefined && input === '') {\n return createInvalid({\n nullInput: true\n });\n }\n\n if (typeof input === 'string') {\n config._i = input = config._locale.preparse(input);\n }\n\n if (isMoment(input)) {\n return new Moment(checkOverflow(input));\n } else if (isDate(input)) {\n config._d = input;\n } else if (isArray(format)) {\n configFromStringAndArray(config);\n } else if (format) {\n configFromStringAndFormat(config);\n } else {\n configFromInput(config);\n }\n\n if (!isValid(config)) {\n config._d = null;\n }\n\n return config;\n }\n\n function configFromInput(config) {\n var input = config._i;\n\n if (isUndefined(input)) {\n config._d = new Date(hooks.now());\n } else if (isDate(input)) {\n config._d = new Date(input.valueOf());\n } else if (typeof input === 'string') {\n configFromString(config);\n } else if (isArray(input)) {\n config._a = map(input.slice(0), function (obj) {\n return parseInt(obj, 10);\n });\n configFromArray(config);\n } else if (isObject(input)) {\n configFromObject(config);\n } else if (isNumber(input)) {\n // from milliseconds\n config._d = new Date(input);\n } else {\n hooks.createFromInputFallback(config);\n }\n }\n\n function createLocalOrUTC(input, format, locale, strict, isUTC) {\n var c = {};\n\n if (locale === true || locale === false) {\n strict = locale;\n locale = undefined;\n }\n\n if (isObject(input) && isObjectEmpty(input) || isArray(input) && input.length === 0) {\n input = undefined;\n } // object construction must be done this way.\n // https://github.com/moment/moment/issues/1423\n\n\n c._isAMomentObject = true;\n c._useUTC = c._isUTC = isUTC;\n c._l = locale;\n c._i = input;\n c._f = format;\n c._strict = strict;\n return createFromConfig(c);\n }\n\n function createLocal(input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, false);\n }\n\n var prototypeMin = deprecate('moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/', function () {\n var other = createLocal.apply(null, arguments);\n\n if (this.isValid() && other.isValid()) {\n return other < this ? this : other;\n } else {\n return createInvalid();\n }\n });\n var prototypeMax = deprecate('moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/', function () {\n var other = createLocal.apply(null, arguments);\n\n if (this.isValid() && other.isValid()) {\n return other > this ? this : other;\n } else {\n return createInvalid();\n }\n }); // Pick a moment m from moments so that m[fn](other) is true for all\n // other. This relies on the function fn to be transitive.\n //\n // moments should either be an array of moment objects or an array, whose\n // first element is an array of moment objects.\n\n function pickBy(fn, moments) {\n var res, i;\n\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n\n if (!moments.length) {\n return createLocal();\n }\n\n res = moments[0];\n\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n\n return res;\n } // TODO: Use [].sort instead?\n\n\n function min() {\n var args = [].slice.call(arguments, 0);\n return pickBy('isBefore', args);\n }\n\n function max() {\n var args = [].slice.call(arguments, 0);\n return pickBy('isAfter', args);\n }\n\n var now = function () {\n return Date.now ? Date.now() : +new Date();\n };\n\n var ordering = ['year', 'quarter', 'month', 'week', 'day', 'hour', 'minute', 'second', 'millisecond'];\n\n function isDurationValid(m) {\n for (var key in m) {\n if (!(indexOf.call(ordering, key) !== -1 && (m[key] == null || !isNaN(m[key])))) {\n return false;\n }\n }\n\n var unitHasDecimal = false;\n\n for (var i = 0; i < ordering.length; ++i) {\n if (m[ordering[i]]) {\n if (unitHasDecimal) {\n return false; // only allow non-integers for smallest unit\n }\n\n if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) {\n unitHasDecimal = true;\n }\n }\n }\n\n return true;\n }\n\n function isValid$1() {\n return this._isValid;\n }\n\n function createInvalid$1() {\n return createDuration(NaN);\n }\n\n function Duration(duration) {\n var normalizedInput = normalizeObjectUnits(duration),\n years = normalizedInput.year || 0,\n quarters = normalizedInput.quarter || 0,\n months = normalizedInput.month || 0,\n weeks = normalizedInput.week || normalizedInput.isoWeek || 0,\n days = normalizedInput.day || 0,\n hours = normalizedInput.hour || 0,\n minutes = normalizedInput.minute || 0,\n seconds = normalizedInput.second || 0,\n milliseconds = normalizedInput.millisecond || 0;\n this._isValid = isDurationValid(normalizedInput); // representation for dateAddRemove\n\n this._milliseconds = +milliseconds + seconds * 1e3 + // 1000\n minutes * 6e4 + // 1000 * 60\n hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978\n // Because of dateAddRemove treats 24 hours as different from a\n // day when working around DST, we need to store them separately\n\n this._days = +days + weeks * 7; // It is impossible to translate months into days without knowing\n // which months you are are talking about, so we have to store\n // it separately.\n\n this._months = +months + quarters * 3 + years * 12;\n this._data = {};\n this._locale = getLocale();\n\n this._bubble();\n }\n\n function isDuration(obj) {\n return obj instanceof Duration;\n }\n\n function absRound(number) {\n if (number < 0) {\n return Math.round(-1 * number) * -1;\n } else {\n return Math.round(number);\n }\n } // FORMATTING\n\n\n function offset(token, separator) {\n addFormatToken(token, 0, 0, function () {\n var offset = this.utcOffset();\n var sign = '+';\n\n if (offset < 0) {\n offset = -offset;\n sign = '-';\n }\n\n return sign + zeroFill(~~(offset / 60), 2) + separator + zeroFill(~~offset % 60, 2);\n });\n }\n\n offset('Z', ':');\n offset('ZZ', ''); // PARSING\n\n addRegexToken('Z', matchShortOffset);\n addRegexToken('ZZ', matchShortOffset);\n addParseToken(['Z', 'ZZ'], function (input, array, config) {\n config._useUTC = true;\n config._tzm = offsetFromString(matchShortOffset, input);\n }); // HELPERS\n // timezone chunker\n // '+10:00' > ['10', '00']\n // '-1530' > ['-15', '30']\n\n var chunkOffset = /([\\+\\-]|\\d\\d)/gi;\n\n function offsetFromString(matcher, string) {\n var matches = (string || '').match(matcher);\n\n if (matches === null) {\n return null;\n }\n\n var chunk = matches[matches.length - 1] || [];\n var parts = (chunk + '').match(chunkOffset) || ['-', 0, 0];\n var minutes = +(parts[1] * 60) + toInt(parts[2]);\n return minutes === 0 ? 0 : parts[0] === '+' ? minutes : -minutes;\n } // Return a moment from input, that is local/utc/zone equivalent to model.\n\n\n function cloneWithOffset(input, model) {\n var res, diff;\n\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? input.valueOf() : createLocal(input).valueOf()) - res.valueOf(); // Use low-level api, because this fn is low-level api.\n\n res._d.setTime(res._d.valueOf() + diff);\n\n hooks.updateOffset(res, false);\n return res;\n } else {\n return createLocal(input).local();\n }\n }\n\n function getDateOffset(m) {\n // On Firefox.24 Date#getTimezoneOffset returns a floating point.\n // https://github.com/moment/moment/pull/1871\n return -Math.round(m._d.getTimezoneOffset() / 15) * 15;\n } // HOOKS\n // This function will be called whenever a moment is mutated.\n // It is intended to keep the offset in sync with the timezone.\n\n\n hooks.updateOffset = function () {}; // MOMENTS\n // keepLocalTime = true means only change the timezone, without\n // affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]-->\n // 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset\n // +0200, so we adjust the time as needed, to be valid.\n //\n // Keeping the time actually adds/subtracts (one hour)\n // from the actual represented time. That is why we call updateOffset\n // a second time. In case it wants us to change the offset again\n // _changeInProgress == true case, then we have to adjust, because\n // there is no such time in the given timezone.\n\n\n function getSetOffset(input, keepLocalTime, keepMinutes) {\n var offset = this._offset || 0,\n localAdjust;\n\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n\n if (input === null) {\n return this;\n }\n } else if (Math.abs(input) < 16 && !keepMinutes) {\n input = input * 60;\n }\n\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n\n this._offset = input;\n this._isUTC = true;\n\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n addSubtract(this, createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }\n\n function getSetZone(input, keepLocalTime) {\n if (input != null) {\n if (typeof input !== 'string') {\n input = -input;\n }\n\n this.utcOffset(input, keepLocalTime);\n return this;\n } else {\n return -this.utcOffset();\n }\n }\n\n function setOffsetToUTC(keepLocalTime) {\n return this.utcOffset(0, keepLocalTime);\n }\n\n function setOffsetToLocal(keepLocalTime) {\n if (this._isUTC) {\n this.utcOffset(0, keepLocalTime);\n this._isUTC = false;\n\n if (keepLocalTime) {\n this.subtract(getDateOffset(this), 'm');\n }\n }\n\n return this;\n }\n\n function setOffsetToParsedOffset() {\n if (this._tzm != null) {\n this.utcOffset(this._tzm, false, true);\n } else if (typeof this._i === 'string') {\n var tZone = offsetFromString(matchOffset, this._i);\n\n if (tZone != null) {\n this.utcOffset(tZone);\n } else {\n this.utcOffset(0, true);\n }\n }\n\n return this;\n }\n\n function hasAlignedHourOffset(input) {\n if (!this.isValid()) {\n return false;\n }\n\n input = input ? createLocal(input).utcOffset() : 0;\n return (this.utcOffset() - input) % 60 === 0;\n }\n\n function isDaylightSavingTime() {\n return this.utcOffset() > this.clone().month(0).utcOffset() || this.utcOffset() > this.clone().month(5).utcOffset();\n }\n\n function isDaylightSavingTimeShifted() {\n if (!isUndefined(this._isDSTShifted)) {\n return this._isDSTShifted;\n }\n\n var c = {};\n copyConfig(c, this);\n c = prepareConfig(c);\n\n if (c._a) {\n var other = c._isUTC ? createUTC(c._a) : createLocal(c._a);\n this._isDSTShifted = this.isValid() && compareArrays(c._a, other.toArray()) > 0;\n } else {\n this._isDSTShifted = false;\n }\n\n return this._isDSTShifted;\n }\n\n function isLocal() {\n return this.isValid() ? !this._isUTC : false;\n }\n\n function isUtcOffset() {\n return this.isValid() ? this._isUTC : false;\n }\n\n function isUtc() {\n return this.isValid() ? this._isUTC && this._offset === 0 : false;\n } // ASP.NET json date format regex\n\n\n var aspNetRegex = /^(\\-|\\+)?(?:(\\d*)[. ])?(\\d+)\\:(\\d+)(?:\\:(\\d+)(\\.\\d*)?)?$/; // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html\n // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere\n // and further modified to allow for strings containing both week and day\n\n var isoRegex = /^(-|\\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;\n\n function createDuration(input, key) {\n var duration = input,\n // matching against regexp is expensive, do it on demand\n match = null,\n sign,\n ret,\n diffRes;\n\n if (isDuration(input)) {\n duration = {\n ms: input._milliseconds,\n d: input._days,\n M: input._months\n };\n } else if (isNumber(input)) {\n duration = {};\n\n if (key) {\n duration[key] = input;\n } else {\n duration.milliseconds = input;\n }\n } else if (!!(match = aspNetRegex.exec(input))) {\n sign = match[1] === '-' ? -1 : 1;\n duration = {\n y: 0,\n d: toInt(match[DATE]) * sign,\n h: toInt(match[HOUR]) * sign,\n m: toInt(match[MINUTE]) * sign,\n s: toInt(match[SECOND]) * sign,\n ms: toInt(absRound(match[MILLISECOND] * 1000)) * sign // the millisecond decimal point is included in the match\n\n };\n } else if (!!(match = isoRegex.exec(input))) {\n sign = match[1] === '-' ? -1 : 1;\n duration = {\n y: parseIso(match[2], sign),\n M: parseIso(match[3], sign),\n w: parseIso(match[4], sign),\n d: parseIso(match[5], sign),\n h: parseIso(match[6], sign),\n m: parseIso(match[7], sign),\n s: parseIso(match[8], sign)\n };\n } else if (duration == null) {\n // checks for null or undefined\n duration = {};\n } else if (typeof duration === 'object' && ('from' in duration || 'to' in duration)) {\n diffRes = momentsDifference(createLocal(duration.from), createLocal(duration.to));\n duration = {};\n duration.ms = diffRes.milliseconds;\n duration.M = diffRes.months;\n }\n\n ret = new Duration(duration);\n\n if (isDuration(input) && hasOwnProp(input, '_locale')) {\n ret._locale = input._locale;\n }\n\n return ret;\n }\n\n createDuration.fn = Duration.prototype;\n createDuration.invalid = createInvalid$1;\n\n function parseIso(inp, sign) {\n // We'd normally use ~~inp for this, but unfortunately it also\n // converts floats to ints.\n // inp may be undefined, so careful calling replace on it.\n var res = inp && parseFloat(inp.replace(',', '.')); // apply sign while we're at it\n\n return (isNaN(res) ? 0 : res) * sign;\n }\n\n function positiveMomentsDifference(base, other) {\n var res = {};\n res.months = other.month() - base.month() + (other.year() - base.year()) * 12;\n\n if (base.clone().add(res.months, 'M').isAfter(other)) {\n --res.months;\n }\n\n res.milliseconds = +other - +base.clone().add(res.months, 'M');\n return res;\n }\n\n function momentsDifference(base, other) {\n var res;\n\n if (!(base.isValid() && other.isValid())) {\n return {\n milliseconds: 0,\n months: 0\n };\n }\n\n other = cloneWithOffset(other, base);\n\n if (base.isBefore(other)) {\n res = positiveMomentsDifference(base, other);\n } else {\n res = positiveMomentsDifference(other, base);\n res.milliseconds = -res.milliseconds;\n res.months = -res.months;\n }\n\n return res;\n } // TODO: remove 'name' arg after deprecation is removed\n\n\n function createAdder(direction, name) {\n return function (val, period) {\n var dur, tmp; //invert the arguments, but complain about it\n\n if (period !== null && !isNaN(+period)) {\n deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' + 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.');\n tmp = val;\n val = period;\n period = tmp;\n }\n\n val = typeof val === 'string' ? +val : val;\n dur = createDuration(val, period);\n addSubtract(this, dur, direction);\n return this;\n };\n }\n\n function addSubtract(mom, duration, isAdding, updateOffset) {\n var milliseconds = duration._milliseconds,\n days = absRound(duration._days),\n months = absRound(duration._months);\n\n if (!mom.isValid()) {\n // No op\n return;\n }\n\n updateOffset = updateOffset == null ? true : updateOffset;\n\n if (months) {\n setMonth(mom, get(mom, 'Month') + months * isAdding);\n }\n\n if (days) {\n set$1(mom, 'Date', get(mom, 'Date') + days * isAdding);\n }\n\n if (milliseconds) {\n mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding);\n }\n\n if (updateOffset) {\n hooks.updateOffset(mom, days || months);\n }\n }\n\n var add = createAdder(1, 'add');\n var subtract = createAdder(-1, 'subtract');\n\n function getCalendarFormat(myMoment, now) {\n var diff = myMoment.diff(now, 'days', true);\n return diff < -6 ? 'sameElse' : diff < -1 ? 'lastWeek' : diff < 0 ? 'lastDay' : diff < 1 ? 'sameDay' : diff < 2 ? 'nextDay' : diff < 7 ? 'nextWeek' : 'sameElse';\n }\n\n function calendar$1(time, formats) {\n // We want to compare the start of today, vs this.\n // Getting start-of-today depends on whether we're local/utc/offset or not.\n var now = time || createLocal(),\n sod = cloneWithOffset(now, this).startOf('day'),\n format = hooks.calendarFormat(this, sod) || 'sameElse';\n var output = formats && (isFunction(formats[format]) ? formats[format].call(this, now) : formats[format]);\n return this.format(output || this.localeData().calendar(format, this, createLocal(now)));\n }\n\n function clone() {\n return new Moment(this);\n }\n\n function isAfter(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input);\n\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n\n units = normalizeUnits(units) || 'millisecond';\n\n if (units === 'millisecond') {\n return this.valueOf() > localInput.valueOf();\n } else {\n return localInput.valueOf() < this.clone().startOf(units).valueOf();\n }\n }\n\n function isBefore(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input);\n\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n\n units = normalizeUnits(units) || 'millisecond';\n\n if (units === 'millisecond') {\n return this.valueOf() < localInput.valueOf();\n } else {\n return this.clone().endOf(units).valueOf() < localInput.valueOf();\n }\n }\n\n function isBetween(from, to, units, inclusivity) {\n var localFrom = isMoment(from) ? from : createLocal(from),\n localTo = isMoment(to) ? to : createLocal(to);\n\n if (!(this.isValid() && localFrom.isValid() && localTo.isValid())) {\n return false;\n }\n\n inclusivity = inclusivity || '()';\n return (inclusivity[0] === '(' ? this.isAfter(localFrom, units) : !this.isBefore(localFrom, units)) && (inclusivity[1] === ')' ? this.isBefore(localTo, units) : !this.isAfter(localTo, units));\n }\n\n function isSame(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input),\n inputMs;\n\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n\n units = normalizeUnits(units) || 'millisecond';\n\n if (units === 'millisecond') {\n return this.valueOf() === localInput.valueOf();\n } else {\n inputMs = localInput.valueOf();\n return this.clone().startOf(units).valueOf() <= inputMs && inputMs <= this.clone().endOf(units).valueOf();\n }\n }\n\n function isSameOrAfter(input, units) {\n return this.isSame(input, units) || this.isAfter(input, units);\n }\n\n function isSameOrBefore(input, units) {\n return this.isSame(input, units) || this.isBefore(input, units);\n }\n\n function diff(input, units, asFloat) {\n var that, zoneDelta, output;\n\n if (!this.isValid()) {\n return NaN;\n }\n\n that = cloneWithOffset(input, this);\n\n if (!that.isValid()) {\n return NaN;\n }\n\n zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4;\n units = normalizeUnits(units);\n\n switch (units) {\n case 'year':\n output = monthDiff(this, that) / 12;\n break;\n\n case 'month':\n output = monthDiff(this, that);\n break;\n\n case 'quarter':\n output = monthDiff(this, that) / 3;\n break;\n\n case 'second':\n output = (this - that) / 1e3;\n break;\n // 1000\n\n case 'minute':\n output = (this - that) / 6e4;\n break;\n // 1000 * 60\n\n case 'hour':\n output = (this - that) / 36e5;\n break;\n // 1000 * 60 * 60\n\n case 'day':\n output = (this - that - zoneDelta) / 864e5;\n break;\n // 1000 * 60 * 60 * 24, negate dst\n\n case 'week':\n output = (this - that - zoneDelta) / 6048e5;\n break;\n // 1000 * 60 * 60 * 24 * 7, negate dst\n\n default:\n output = this - that;\n }\n\n return asFloat ? output : absFloor(output);\n }\n\n function monthDiff(a, b) {\n // difference in months\n var wholeMonthDiff = (b.year() - a.year()) * 12 + (b.month() - a.month()),\n // b is in (anchor - 1 month, anchor + 1 month)\n anchor = a.clone().add(wholeMonthDiff, 'months'),\n anchor2,\n adjust;\n\n if (b - anchor < 0) {\n anchor2 = a.clone().add(wholeMonthDiff - 1, 'months'); // linear across the month\n\n adjust = (b - anchor) / (anchor - anchor2);\n } else {\n anchor2 = a.clone().add(wholeMonthDiff + 1, 'months'); // linear across the month\n\n adjust = (b - anchor) / (anchor2 - anchor);\n } //check for negative zero, return zero if negative zero\n\n\n return -(wholeMonthDiff + adjust) || 0;\n }\n\n hooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ';\n hooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]';\n\n function toString() {\n return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ');\n }\n\n function toISOString(keepOffset) {\n if (!this.isValid()) {\n return null;\n }\n\n var utc = keepOffset !== true;\n var m = utc ? this.clone().utc() : this;\n\n if (m.year() < 0 || m.year() > 9999) {\n return formatMoment(m, utc ? 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYYYY-MM-DD[T]HH:mm:ss.SSSZ');\n }\n\n if (isFunction(Date.prototype.toISOString)) {\n // native implementation is ~50x faster, use it when we can\n if (utc) {\n return this.toDate().toISOString();\n } else {\n return new Date(this.valueOf() + this.utcOffset() * 60 * 1000).toISOString().replace('Z', formatMoment(m, 'Z'));\n }\n }\n\n return formatMoment(m, utc ? 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYY-MM-DD[T]HH:mm:ss.SSSZ');\n }\n /**\n * Return a human readable representation of a moment that can\n * also be evaluated to get a new moment which is the same\n *\n * @link https://nodejs.org/dist/latest/docs/api/util.html#util_custom_inspect_function_on_objects\n */\n\n\n function inspect() {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n\n var func = 'moment';\n var zone = '';\n\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n\n var prefix = '[' + func + '(\"]';\n var year = 0 <= this.year() && this.year() <= 9999 ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n return this.format(prefix + year + datetime + suffix);\n }\n\n function format(inputString) {\n if (!inputString) {\n inputString = this.isUtc() ? hooks.defaultFormatUtc : hooks.defaultFormat;\n }\n\n var output = formatMoment(this, inputString);\n return this.localeData().postformat(output);\n }\n\n function from(time, withoutSuffix) {\n if (this.isValid() && (isMoment(time) && time.isValid() || createLocal(time).isValid())) {\n return createDuration({\n to: this,\n from: time\n }).locale(this.locale()).humanize(!withoutSuffix);\n } else {\n return this.localeData().invalidDate();\n }\n }\n\n function fromNow(withoutSuffix) {\n return this.from(createLocal(), withoutSuffix);\n }\n\n function to(time, withoutSuffix) {\n if (this.isValid() && (isMoment(time) && time.isValid() || createLocal(time).isValid())) {\n return createDuration({\n from: this,\n to: time\n }).locale(this.locale()).humanize(!withoutSuffix);\n } else {\n return this.localeData().invalidDate();\n }\n }\n\n function toNow(withoutSuffix) {\n return this.to(createLocal(), withoutSuffix);\n } // If passed a locale key, it will set the locale for this\n // instance. Otherwise, it will return the locale configuration\n // variables for this instance.\n\n\n function locale(key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n\n return this;\n }\n }\n\n var lang = deprecate('moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.', function (key) {\n if (key === undefined) {\n return this.localeData();\n } else {\n return this.locale(key);\n }\n });\n\n function localeData() {\n return this._locale;\n }\n\n var MS_PER_SECOND = 1000;\n var MS_PER_MINUTE = 60 * MS_PER_SECOND;\n var MS_PER_HOUR = 60 * MS_PER_MINUTE;\n var MS_PER_400_YEARS = (365 * 400 + 97) * 24 * MS_PER_HOUR; // actual modulo - handles negative numbers (for dates before 1970):\n\n function mod$1(dividend, divisor) {\n return (dividend % divisor + divisor) % divisor;\n }\n\n function localStartOfDate(y, m, d) {\n // the date constructor remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n return new Date(y + 400, m, d) - MS_PER_400_YEARS;\n } else {\n return new Date(y, m, d).valueOf();\n }\n }\n\n function utcStartOfDate(y, m, d) {\n // Date.UTC remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n return Date.UTC(y + 400, m, d) - MS_PER_400_YEARS;\n } else {\n return Date.UTC(y, m, d);\n }\n }\n\n function startOf(units) {\n var time;\n units = normalizeUnits(units);\n\n if (units === undefined || units === 'millisecond' || !this.isValid()) {\n return this;\n }\n\n var startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;\n\n switch (units) {\n case 'year':\n time = startOfDate(this.year(), 0, 1);\n break;\n\n case 'quarter':\n time = startOfDate(this.year(), this.month() - this.month() % 3, 1);\n break;\n\n case 'month':\n time = startOfDate(this.year(), this.month(), 1);\n break;\n\n case 'week':\n time = startOfDate(this.year(), this.month(), this.date() - this.weekday());\n break;\n\n case 'isoWeek':\n time = startOfDate(this.year(), this.month(), this.date() - (this.isoWeekday() - 1));\n break;\n\n case 'day':\n case 'date':\n time = startOfDate(this.year(), this.month(), this.date());\n break;\n\n case 'hour':\n time = this._d.valueOf();\n time -= mod$1(time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE), MS_PER_HOUR);\n break;\n\n case 'minute':\n time = this._d.valueOf();\n time -= mod$1(time, MS_PER_MINUTE);\n break;\n\n case 'second':\n time = this._d.valueOf();\n time -= mod$1(time, MS_PER_SECOND);\n break;\n }\n\n this._d.setTime(time);\n\n hooks.updateOffset(this, true);\n return this;\n }\n\n function endOf(units) {\n var time;\n units = normalizeUnits(units);\n\n if (units === undefined || units === 'millisecond' || !this.isValid()) {\n return this;\n }\n\n var startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;\n\n switch (units) {\n case 'year':\n time = startOfDate(this.year() + 1, 0, 1) - 1;\n break;\n\n case 'quarter':\n time = startOfDate(this.year(), this.month() - this.month() % 3 + 3, 1) - 1;\n break;\n\n case 'month':\n time = startOfDate(this.year(), this.month() + 1, 1) - 1;\n break;\n\n case 'week':\n time = startOfDate(this.year(), this.month(), this.date() - this.weekday() + 7) - 1;\n break;\n\n case 'isoWeek':\n time = startOfDate(this.year(), this.month(), this.date() - (this.isoWeekday() - 1) + 7) - 1;\n break;\n\n case 'day':\n case 'date':\n time = startOfDate(this.year(), this.month(), this.date() + 1) - 1;\n break;\n\n case 'hour':\n time = this._d.valueOf();\n time += MS_PER_HOUR - mod$1(time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE), MS_PER_HOUR) - 1;\n break;\n\n case 'minute':\n time = this._d.valueOf();\n time += MS_PER_MINUTE - mod$1(time, MS_PER_MINUTE) - 1;\n break;\n\n case 'second':\n time = this._d.valueOf();\n time += MS_PER_SECOND - mod$1(time, MS_PER_SECOND) - 1;\n break;\n }\n\n this._d.setTime(time);\n\n hooks.updateOffset(this, true);\n return this;\n }\n\n function valueOf() {\n return this._d.valueOf() - (this._offset || 0) * 60000;\n }\n\n function unix() {\n return Math.floor(this.valueOf() / 1000);\n }\n\n function toDate() {\n return new Date(this.valueOf());\n }\n\n function toArray() {\n var m = this;\n return [m.year(), m.month(), m.date(), m.hour(), m.minute(), m.second(), m.millisecond()];\n }\n\n function toObject() {\n var m = this;\n return {\n years: m.year(),\n months: m.month(),\n date: m.date(),\n hours: m.hours(),\n minutes: m.minutes(),\n seconds: m.seconds(),\n milliseconds: m.milliseconds()\n };\n }\n\n function toJSON() {\n // new Date(NaN).toJSON() === null\n return this.isValid() ? this.toISOString() : null;\n }\n\n function isValid$2() {\n return isValid(this);\n }\n\n function parsingFlags() {\n return extend({}, getParsingFlags(this));\n }\n\n function invalidAt() {\n return getParsingFlags(this).overflow;\n }\n\n function creationData() {\n return {\n input: this._i,\n format: this._f,\n locale: this._locale,\n isUTC: this._isUTC,\n strict: this._strict\n };\n } // FORMATTING\n\n\n addFormatToken(0, ['gg', 2], 0, function () {\n return this.weekYear() % 100;\n });\n addFormatToken(0, ['GG', 2], 0, function () {\n return this.isoWeekYear() % 100;\n });\n\n function addWeekYearFormatToken(token, getter) {\n addFormatToken(0, [token, token.length], 0, getter);\n }\n\n addWeekYearFormatToken('gggg', 'weekYear');\n addWeekYearFormatToken('ggggg', 'weekYear');\n addWeekYearFormatToken('GGGG', 'isoWeekYear');\n addWeekYearFormatToken('GGGGG', 'isoWeekYear'); // ALIASES\n\n addUnitAlias('weekYear', 'gg');\n addUnitAlias('isoWeekYear', 'GG'); // PRIORITY\n\n addUnitPriority('weekYear', 1);\n addUnitPriority('isoWeekYear', 1); // PARSING\n\n addRegexToken('G', matchSigned);\n addRegexToken('g', matchSigned);\n addRegexToken('GG', match1to2, match2);\n addRegexToken('gg', match1to2, match2);\n addRegexToken('GGGG', match1to4, match4);\n addRegexToken('gggg', match1to4, match4);\n addRegexToken('GGGGG', match1to6, match6);\n addRegexToken('ggggg', match1to6, match6);\n addWeekParseToken(['gggg', 'ggggg', 'GGGG', 'GGGGG'], function (input, week, config, token) {\n week[token.substr(0, 2)] = toInt(input);\n });\n addWeekParseToken(['gg', 'GG'], function (input, week, config, token) {\n week[token] = hooks.parseTwoDigitYear(input);\n }); // MOMENTS\n\n function getSetWeekYear(input) {\n return getSetWeekYearHelper.call(this, input, this.week(), this.weekday(), this.localeData()._week.dow, this.localeData()._week.doy);\n }\n\n function getSetISOWeekYear(input) {\n return getSetWeekYearHelper.call(this, input, this.isoWeek(), this.isoWeekday(), 1, 4);\n }\n\n function getISOWeeksInYear() {\n return weeksInYear(this.year(), 1, 4);\n }\n\n function getWeeksInYear() {\n var weekInfo = this.localeData()._week;\n\n return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy);\n }\n\n function getSetWeekYearHelper(input, week, weekday, dow, doy) {\n var weeksTarget;\n\n if (input == null) {\n return weekOfYear(this, dow, doy).year;\n } else {\n weeksTarget = weeksInYear(input, dow, doy);\n\n if (week > weeksTarget) {\n week = weeksTarget;\n }\n\n return setWeekAll.call(this, input, week, weekday, dow, doy);\n }\n }\n\n function setWeekAll(weekYear, week, weekday, dow, doy) {\n var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy),\n date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear);\n this.year(date.getUTCFullYear());\n this.month(date.getUTCMonth());\n this.date(date.getUTCDate());\n return this;\n } // FORMATTING\n\n\n addFormatToken('Q', 0, 'Qo', 'quarter'); // ALIASES\n\n addUnitAlias('quarter', 'Q'); // PRIORITY\n\n addUnitPriority('quarter', 7); // PARSING\n\n addRegexToken('Q', match1);\n addParseToken('Q', function (input, array) {\n array[MONTH] = (toInt(input) - 1) * 3;\n }); // MOMENTS\n\n function getSetQuarter(input) {\n return input == null ? Math.ceil((this.month() + 1) / 3) : this.month((input - 1) * 3 + this.month() % 3);\n } // FORMATTING\n\n\n addFormatToken('D', ['DD', 2], 'Do', 'date'); // ALIASES\n\n addUnitAlias('date', 'D'); // PRIORITY\n\n addUnitPriority('date', 9); // PARSING\n\n addRegexToken('D', match1to2);\n addRegexToken('DD', match1to2, match2);\n addRegexToken('Do', function (isStrict, locale) {\n // TODO: Remove \"ordinalParse\" fallback in next major release.\n return isStrict ? locale._dayOfMonthOrdinalParse || locale._ordinalParse : locale._dayOfMonthOrdinalParseLenient;\n });\n addParseToken(['D', 'DD'], DATE);\n addParseToken('Do', function (input, array) {\n array[DATE] = toInt(input.match(match1to2)[0]);\n }); // MOMENTS\n\n var getSetDayOfMonth = makeGetSet('Date', true); // FORMATTING\n\n addFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear'); // ALIASES\n\n addUnitAlias('dayOfYear', 'DDD'); // PRIORITY\n\n addUnitPriority('dayOfYear', 4); // PARSING\n\n addRegexToken('DDD', match1to3);\n addRegexToken('DDDD', match3);\n addParseToken(['DDD', 'DDDD'], function (input, array, config) {\n config._dayOfYear = toInt(input);\n }); // HELPERS\n // MOMENTS\n\n function getSetDayOfYear(input) {\n var dayOfYear = Math.round((this.clone().startOf('day') - this.clone().startOf('year')) / 864e5) + 1;\n return input == null ? dayOfYear : this.add(input - dayOfYear, 'd');\n } // FORMATTING\n\n\n addFormatToken('m', ['mm', 2], 0, 'minute'); // ALIASES\n\n addUnitAlias('minute', 'm'); // PRIORITY\n\n addUnitPriority('minute', 14); // PARSING\n\n addRegexToken('m', match1to2);\n addRegexToken('mm', match1to2, match2);\n addParseToken(['m', 'mm'], MINUTE); // MOMENTS\n\n var getSetMinute = makeGetSet('Minutes', false); // FORMATTING\n\n addFormatToken('s', ['ss', 2], 0, 'second'); // ALIASES\n\n addUnitAlias('second', 's'); // PRIORITY\n\n addUnitPriority('second', 15); // PARSING\n\n addRegexToken('s', match1to2);\n addRegexToken('ss', match1to2, match2);\n addParseToken(['s', 'ss'], SECOND); // MOMENTS\n\n var getSetSecond = makeGetSet('Seconds', false); // FORMATTING\n\n addFormatToken('S', 0, 0, function () {\n return ~~(this.millisecond() / 100);\n });\n addFormatToken(0, ['SS', 2], 0, function () {\n return ~~(this.millisecond() / 10);\n });\n addFormatToken(0, ['SSS', 3], 0, 'millisecond');\n addFormatToken(0, ['SSSS', 4], 0, function () {\n return this.millisecond() * 10;\n });\n addFormatToken(0, ['SSSSS', 5], 0, function () {\n return this.millisecond() * 100;\n });\n addFormatToken(0, ['SSSSSS', 6], 0, function () {\n return this.millisecond() * 1000;\n });\n addFormatToken(0, ['SSSSSSS', 7], 0, function () {\n return this.millisecond() * 10000;\n });\n addFormatToken(0, ['SSSSSSSS', 8], 0, function () {\n return this.millisecond() * 100000;\n });\n addFormatToken(0, ['SSSSSSSSS', 9], 0, function () {\n return this.millisecond() * 1000000;\n }); // ALIASES\n\n addUnitAlias('millisecond', 'ms'); // PRIORITY\n\n addUnitPriority('millisecond', 16); // PARSING\n\n addRegexToken('S', match1to3, match1);\n addRegexToken('SS', match1to3, match2);\n addRegexToken('SSS', match1to3, match3);\n var token;\n\n for (token = 'SSSS'; token.length <= 9; token += 'S') {\n addRegexToken(token, matchUnsigned);\n }\n\n function parseMs(input, array) {\n array[MILLISECOND] = toInt(('0.' + input) * 1000);\n }\n\n for (token = 'S'; token.length <= 9; token += 'S') {\n addParseToken(token, parseMs);\n } // MOMENTS\n\n\n var getSetMillisecond = makeGetSet('Milliseconds', false); // FORMATTING\n\n addFormatToken('z', 0, 0, 'zoneAbbr');\n addFormatToken('zz', 0, 0, 'zoneName'); // MOMENTS\n\n function getZoneAbbr() {\n return this._isUTC ? 'UTC' : '';\n }\n\n function getZoneName() {\n return this._isUTC ? 'Coordinated Universal Time' : '';\n }\n\n var proto = Moment.prototype;\n proto.add = add;\n proto.calendar = calendar$1;\n proto.clone = clone;\n proto.diff = diff;\n proto.endOf = endOf;\n proto.format = format;\n proto.from = from;\n proto.fromNow = fromNow;\n proto.to = to;\n proto.toNow = toNow;\n proto.get = stringGet;\n proto.invalidAt = invalidAt;\n proto.isAfter = isAfter;\n proto.isBefore = isBefore;\n proto.isBetween = isBetween;\n proto.isSame = isSame;\n proto.isSameOrAfter = isSameOrAfter;\n proto.isSameOrBefore = isSameOrBefore;\n proto.isValid = isValid$2;\n proto.lang = lang;\n proto.locale = locale;\n proto.localeData = localeData;\n proto.max = prototypeMax;\n proto.min = prototypeMin;\n proto.parsingFlags = parsingFlags;\n proto.set = stringSet;\n proto.startOf = startOf;\n proto.subtract = subtract;\n proto.toArray = toArray;\n proto.toObject = toObject;\n proto.toDate = toDate;\n proto.toISOString = toISOString;\n proto.inspect = inspect;\n proto.toJSON = toJSON;\n proto.toString = toString;\n proto.unix = unix;\n proto.valueOf = valueOf;\n proto.creationData = creationData;\n proto.year = getSetYear;\n proto.isLeapYear = getIsLeapYear;\n proto.weekYear = getSetWeekYear;\n proto.isoWeekYear = getSetISOWeekYear;\n proto.quarter = proto.quarters = getSetQuarter;\n proto.month = getSetMonth;\n proto.daysInMonth = getDaysInMonth;\n proto.week = proto.weeks = getSetWeek;\n proto.isoWeek = proto.isoWeeks = getSetISOWeek;\n proto.weeksInYear = getWeeksInYear;\n proto.isoWeeksInYear = getISOWeeksInYear;\n proto.date = getSetDayOfMonth;\n proto.day = proto.days = getSetDayOfWeek;\n proto.weekday = getSetLocaleDayOfWeek;\n proto.isoWeekday = getSetISODayOfWeek;\n proto.dayOfYear = getSetDayOfYear;\n proto.hour = proto.hours = getSetHour;\n proto.minute = proto.minutes = getSetMinute;\n proto.second = proto.seconds = getSetSecond;\n proto.millisecond = proto.milliseconds = getSetMillisecond;\n proto.utcOffset = getSetOffset;\n proto.utc = setOffsetToUTC;\n proto.local = setOffsetToLocal;\n proto.parseZone = setOffsetToParsedOffset;\n proto.hasAlignedHourOffset = hasAlignedHourOffset;\n proto.isDST = isDaylightSavingTime;\n proto.isLocal = isLocal;\n proto.isUtcOffset = isUtcOffset;\n proto.isUtc = isUtc;\n proto.isUTC = isUtc;\n proto.zoneAbbr = getZoneAbbr;\n proto.zoneName = getZoneName;\n proto.dates = deprecate('dates accessor is deprecated. Use date instead.', getSetDayOfMonth);\n proto.months = deprecate('months accessor is deprecated. Use month instead', getSetMonth);\n proto.years = deprecate('years accessor is deprecated. Use year instead', getSetYear);\n proto.zone = deprecate('moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/', getSetZone);\n proto.isDSTShifted = deprecate('isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information', isDaylightSavingTimeShifted);\n\n function createUnix(input) {\n return createLocal(input * 1000);\n }\n\n function createInZone() {\n return createLocal.apply(null, arguments).parseZone();\n }\n\n function preParsePostFormat(string) {\n return string;\n }\n\n var proto$1 = Locale.prototype;\n proto$1.calendar = calendar;\n proto$1.longDateFormat = longDateFormat;\n proto$1.invalidDate = invalidDate;\n proto$1.ordinal = ordinal;\n proto$1.preparse = preParsePostFormat;\n proto$1.postformat = preParsePostFormat;\n proto$1.relativeTime = relativeTime;\n proto$1.pastFuture = pastFuture;\n proto$1.set = set;\n proto$1.months = localeMonths;\n proto$1.monthsShort = localeMonthsShort;\n proto$1.monthsParse = localeMonthsParse;\n proto$1.monthsRegex = monthsRegex;\n proto$1.monthsShortRegex = monthsShortRegex;\n proto$1.week = localeWeek;\n proto$1.firstDayOfYear = localeFirstDayOfYear;\n proto$1.firstDayOfWeek = localeFirstDayOfWeek;\n proto$1.weekdays = localeWeekdays;\n proto$1.weekdaysMin = localeWeekdaysMin;\n proto$1.weekdaysShort = localeWeekdaysShort;\n proto$1.weekdaysParse = localeWeekdaysParse;\n proto$1.weekdaysRegex = weekdaysRegex;\n proto$1.weekdaysShortRegex = weekdaysShortRegex;\n proto$1.weekdaysMinRegex = weekdaysMinRegex;\n proto$1.isPM = localeIsPM;\n proto$1.meridiem = localeMeridiem;\n\n function get$1(format, index, field, setter) {\n var locale = getLocale();\n var utc = createUTC().set(setter, index);\n return locale[field](utc, format);\n }\n\n function listMonthsImpl(format, index, field) {\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n\n if (index != null) {\n return get$1(format, index, field, 'month');\n }\n\n var i;\n var out = [];\n\n for (i = 0; i < 12; i++) {\n out[i] = get$1(format, i, field, 'month');\n }\n\n return out;\n } // ()\n // (5)\n // (fmt, 5)\n // (fmt)\n // (true)\n // (true, 5)\n // (true, fmt, 5)\n // (true, fmt)\n\n\n function listWeekdaysImpl(localeSorted, format, index, field) {\n if (typeof localeSorted === 'boolean') {\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n } else {\n format = localeSorted;\n index = format;\n localeSorted = false;\n\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n }\n\n var locale = getLocale(),\n shift = localeSorted ? locale._week.dow : 0;\n\n if (index != null) {\n return get$1(format, (index + shift) % 7, field, 'day');\n }\n\n var i;\n var out = [];\n\n for (i = 0; i < 7; i++) {\n out[i] = get$1(format, (i + shift) % 7, field, 'day');\n }\n\n return out;\n }\n\n function listMonths(format, index) {\n return listMonthsImpl(format, index, 'months');\n }\n\n function listMonthsShort(format, index) {\n return listMonthsImpl(format, index, 'monthsShort');\n }\n\n function listWeekdays(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdays');\n }\n\n function listWeekdaysShort(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort');\n }\n\n function listWeekdaysMin(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin');\n }\n\n getSetGlobalLocale('en', {\n dayOfMonthOrdinalParse: /\\d{1,2}(th|st|nd|rd)/,\n ordinal: function (number) {\n var b = number % 10,\n output = toInt(number % 100 / 10) === 1 ? 'th' : b === 1 ? 'st' : b === 2 ? 'nd' : b === 3 ? 'rd' : 'th';\n return number + output;\n }\n }); // Side effect imports\n\n hooks.lang = deprecate('moment.lang is deprecated. Use moment.locale instead.', getSetGlobalLocale);\n hooks.langData = deprecate('moment.langData is deprecated. Use moment.localeData instead.', getLocale);\n var mathAbs = Math.abs;\n\n function abs() {\n var data = this._data;\n this._milliseconds = mathAbs(this._milliseconds);\n this._days = mathAbs(this._days);\n this._months = mathAbs(this._months);\n data.milliseconds = mathAbs(data.milliseconds);\n data.seconds = mathAbs(data.seconds);\n data.minutes = mathAbs(data.minutes);\n data.hours = mathAbs(data.hours);\n data.months = mathAbs(data.months);\n data.years = mathAbs(data.years);\n return this;\n }\n\n function addSubtract$1(duration, input, value, direction) {\n var other = createDuration(input, value);\n duration._milliseconds += direction * other._milliseconds;\n duration._days += direction * other._days;\n duration._months += direction * other._months;\n return duration._bubble();\n } // supports only 2.0-style add(1, 's') or add(duration)\n\n\n function add$1(input, value) {\n return addSubtract$1(this, input, value, 1);\n } // supports only 2.0-style subtract(1, 's') or subtract(duration)\n\n\n function subtract$1(input, value) {\n return addSubtract$1(this, input, value, -1);\n }\n\n function absCeil(number) {\n if (number < 0) {\n return Math.floor(number);\n } else {\n return Math.ceil(number);\n }\n }\n\n function bubble() {\n var milliseconds = this._milliseconds;\n var days = this._days;\n var months = this._months;\n var data = this._data;\n var seconds, minutes, hours, years, monthsFromDays; // if we have a mix of positive and negative values, bubble down first\n // check: https://github.com/moment/moment/issues/2166\n\n if (!(milliseconds >= 0 && days >= 0 && months >= 0 || milliseconds <= 0 && days <= 0 && months <= 0)) {\n milliseconds += absCeil(monthsToDays(months) + days) * 864e5;\n days = 0;\n months = 0;\n } // The following code bubbles up values, see the tests for\n // examples of what that means.\n\n\n data.milliseconds = milliseconds % 1000;\n seconds = absFloor(milliseconds / 1000);\n data.seconds = seconds % 60;\n minutes = absFloor(seconds / 60);\n data.minutes = minutes % 60;\n hours = absFloor(minutes / 60);\n data.hours = hours % 24;\n days += absFloor(hours / 24); // convert days to months\n\n monthsFromDays = absFloor(daysToMonths(days));\n months += monthsFromDays;\n days -= absCeil(monthsToDays(monthsFromDays)); // 12 months -> 1 year\n\n years = absFloor(months / 12);\n months %= 12;\n data.days = days;\n data.months = months;\n data.years = years;\n return this;\n }\n\n function daysToMonths(days) {\n // 400 years have 146097 days (taking into account leap year rules)\n // 400 years have 12 months === 4800\n return days * 4800 / 146097;\n }\n\n function monthsToDays(months) {\n // the reverse of daysToMonths\n return months * 146097 / 4800;\n }\n\n function as(units) {\n if (!this.isValid()) {\n return NaN;\n }\n\n var days;\n var months;\n var milliseconds = this._milliseconds;\n units = normalizeUnits(units);\n\n if (units === 'month' || units === 'quarter' || units === 'year') {\n days = this._days + milliseconds / 864e5;\n months = this._months + daysToMonths(days);\n\n switch (units) {\n case 'month':\n return months;\n\n case 'quarter':\n return months / 3;\n\n case 'year':\n return months / 12;\n }\n } else {\n // handle milliseconds separately because of floating point math errors (issue #1867)\n days = this._days + Math.round(monthsToDays(this._months));\n\n switch (units) {\n case 'week':\n return days / 7 + milliseconds / 6048e5;\n\n case 'day':\n return days + milliseconds / 864e5;\n\n case 'hour':\n return days * 24 + milliseconds / 36e5;\n\n case 'minute':\n return days * 1440 + milliseconds / 6e4;\n\n case 'second':\n return days * 86400 + milliseconds / 1000;\n // Math.floor prevents floating point math errors here\n\n case 'millisecond':\n return Math.floor(days * 864e5) + milliseconds;\n\n default:\n throw new Error('Unknown unit ' + units);\n }\n }\n } // TODO: Use this.as('ms')?\n\n\n function valueOf$1() {\n if (!this.isValid()) {\n return NaN;\n }\n\n return this._milliseconds + this._days * 864e5 + this._months % 12 * 2592e6 + toInt(this._months / 12) * 31536e6;\n }\n\n function makeAs(alias) {\n return function () {\n return this.as(alias);\n };\n }\n\n var asMilliseconds = makeAs('ms');\n var asSeconds = makeAs('s');\n var asMinutes = makeAs('m');\n var asHours = makeAs('h');\n var asDays = makeAs('d');\n var asWeeks = makeAs('w');\n var asMonths = makeAs('M');\n var asQuarters = makeAs('Q');\n var asYears = makeAs('y');\n\n function clone$1() {\n return createDuration(this);\n }\n\n function get$2(units) {\n units = normalizeUnits(units);\n return this.isValid() ? this[units + 's']() : NaN;\n }\n\n function makeGetter(name) {\n return function () {\n return this.isValid() ? this._data[name] : NaN;\n };\n }\n\n var milliseconds = makeGetter('milliseconds');\n var seconds = makeGetter('seconds');\n var minutes = makeGetter('minutes');\n var hours = makeGetter('hours');\n var days = makeGetter('days');\n var months = makeGetter('months');\n var years = makeGetter('years');\n\n function weeks() {\n return absFloor(this.days() / 7);\n }\n\n var round = Math.round;\n var thresholds = {\n ss: 44,\n // a few seconds to seconds\n s: 45,\n // seconds to minute\n m: 45,\n // minutes to hour\n h: 22,\n // hours to day\n d: 26,\n // days to month\n M: 11 // months to year\n\n }; // helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize\n\n function substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) {\n return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture);\n }\n\n function relativeTime$1(posNegDuration, withoutSuffix, locale) {\n var duration = createDuration(posNegDuration).abs();\n var seconds = round(duration.as('s'));\n var minutes = round(duration.as('m'));\n var hours = round(duration.as('h'));\n var days = round(duration.as('d'));\n var months = round(duration.as('M'));\n var years = round(duration.as('y'));\n var a = seconds <= thresholds.ss && ['s', seconds] || seconds < thresholds.s && ['ss', seconds] || minutes <= 1 && ['m'] || minutes < thresholds.m && ['mm', minutes] || hours <= 1 && ['h'] || hours < thresholds.h && ['hh', hours] || days <= 1 && ['d'] || days < thresholds.d && ['dd', days] || months <= 1 && ['M'] || months < thresholds.M && ['MM', months] || years <= 1 && ['y'] || ['yy', years];\n a[2] = withoutSuffix;\n a[3] = +posNegDuration > 0;\n a[4] = locale;\n return substituteTimeAgo.apply(null, a);\n } // This function allows you to set the rounding function for relative time strings\n\n\n function getSetRelativeTimeRounding(roundingFunction) {\n if (roundingFunction === undefined) {\n return round;\n }\n\n if (typeof roundingFunction === 'function') {\n round = roundingFunction;\n return true;\n }\n\n return false;\n } // This function allows you to set a threshold for relative time strings\n\n\n function getSetRelativeTimeThreshold(threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n\n if (limit === undefined) {\n return thresholds[threshold];\n }\n\n thresholds[threshold] = limit;\n\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n\n return true;\n }\n\n function humanize(withSuffix) {\n if (!this.isValid()) {\n return this.localeData().invalidDate();\n }\n\n var locale = this.localeData();\n var output = relativeTime$1(this, !withSuffix, locale);\n\n if (withSuffix) {\n output = locale.pastFuture(+this, output);\n }\n\n return locale.postformat(output);\n }\n\n var abs$1 = Math.abs;\n\n function sign(x) {\n return (x > 0) - (x < 0) || +x;\n }\n\n function toISOString$1() {\n // for ISO strings we do not use the normal bubbling rules:\n // * milliseconds bubble up until they become hours\n // * days do not bubble at all\n // * months bubble up until they become years\n // This is because there is no context-free conversion between hours and days\n // (think of clock changes)\n // and also not between days and months (28-31 days per month)\n if (!this.isValid()) {\n return this.localeData().invalidDate();\n }\n\n var seconds = abs$1(this._milliseconds) / 1000;\n var days = abs$1(this._days);\n var months = abs$1(this._months);\n var minutes, hours, years; // 3600 seconds -> 60 minutes -> 1 hour\n\n minutes = absFloor(seconds / 60);\n hours = absFloor(minutes / 60);\n seconds %= 60;\n minutes %= 60; // 12 months -> 1 year\n\n years = absFloor(months / 12);\n months %= 12; // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js\n\n var Y = years;\n var M = months;\n var D = days;\n var h = hours;\n var m = minutes;\n var s = seconds ? seconds.toFixed(3).replace(/\\.?0+$/, '') : '';\n var total = this.asSeconds();\n\n if (!total) {\n // this is the same as C#'s (Noda) and python (isodate)...\n // but not other JS (goog.date)\n return 'P0D';\n }\n\n var totalSign = total < 0 ? '-' : '';\n var ymSign = sign(this._months) !== sign(total) ? '-' : '';\n var daysSign = sign(this._days) !== sign(total) ? '-' : '';\n var hmsSign = sign(this._milliseconds) !== sign(total) ? '-' : '';\n return totalSign + 'P' + (Y ? ymSign + Y + 'Y' : '') + (M ? ymSign + M + 'M' : '') + (D ? daysSign + D + 'D' : '') + (h || m || s ? 'T' : '') + (h ? hmsSign + h + 'H' : '') + (m ? hmsSign + m + 'M' : '') + (s ? hmsSign + s + 'S' : '');\n }\n\n var proto$2 = Duration.prototype;\n proto$2.isValid = isValid$1;\n proto$2.abs = abs;\n proto$2.add = add$1;\n proto$2.subtract = subtract$1;\n proto$2.as = as;\n proto$2.asMilliseconds = asMilliseconds;\n proto$2.asSeconds = asSeconds;\n proto$2.asMinutes = asMinutes;\n proto$2.asHours = asHours;\n proto$2.asDays = asDays;\n proto$2.asWeeks = asWeeks;\n proto$2.asMonths = asMonths;\n proto$2.asQuarters = asQuarters;\n proto$2.asYears = asYears;\n proto$2.valueOf = valueOf$1;\n proto$2._bubble = bubble;\n proto$2.clone = clone$1;\n proto$2.get = get$2;\n proto$2.milliseconds = milliseconds;\n proto$2.seconds = seconds;\n proto$2.minutes = minutes;\n proto$2.hours = hours;\n proto$2.days = days;\n proto$2.weeks = weeks;\n proto$2.months = months;\n proto$2.years = years;\n proto$2.humanize = humanize;\n proto$2.toISOString = toISOString$1;\n proto$2.toString = toISOString$1;\n proto$2.toJSON = toISOString$1;\n proto$2.locale = locale;\n proto$2.localeData = localeData;\n proto$2.toIsoString = deprecate('toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)', toISOString$1);\n proto$2.lang = lang; // Side effect imports\n // FORMATTING\n\n addFormatToken('X', 0, 0, 'unix');\n addFormatToken('x', 0, 0, 'valueOf'); // PARSING\n\n addRegexToken('x', matchSigned);\n addRegexToken('X', matchTimestamp);\n addParseToken('X', function (input, array, config) {\n config._d = new Date(parseFloat(input, 10) * 1000);\n });\n addParseToken('x', function (input, array, config) {\n config._d = new Date(toInt(input));\n }); // Side effect imports\n\n hooks.version = '2.24.0';\n setHookCallback(createLocal);\n hooks.fn = proto;\n hooks.min = min;\n hooks.max = max;\n hooks.now = now;\n hooks.utc = createUTC;\n hooks.unix = createUnix;\n hooks.months = listMonths;\n hooks.isDate = isDate;\n hooks.locale = getSetGlobalLocale;\n hooks.invalid = createInvalid;\n hooks.duration = createDuration;\n hooks.isMoment = isMoment;\n hooks.weekdays = listWeekdays;\n hooks.parseZone = createInZone;\n hooks.localeData = getLocale;\n hooks.isDuration = isDuration;\n hooks.monthsShort = listMonthsShort;\n hooks.weekdaysMin = listWeekdaysMin;\n hooks.defineLocale = defineLocale;\n hooks.updateLocale = updateLocale;\n hooks.locales = listLocales;\n hooks.weekdaysShort = listWeekdaysShort;\n hooks.normalizeUnits = normalizeUnits;\n hooks.relativeTimeRounding = getSetRelativeTimeRounding;\n hooks.relativeTimeThreshold = getSetRelativeTimeThreshold;\n hooks.calendarFormat = getCalendarFormat;\n hooks.prototype = proto; // currently HTML5 input type only supports 24-hour formats\n\n hooks.HTML5_FMT = {\n DATETIME_LOCAL: 'YYYY-MM-DDTHH:mm',\n // \n DATETIME_LOCAL_SECONDS: 'YYYY-MM-DDTHH:mm:ss',\n // \n DATETIME_LOCAL_MS: 'YYYY-MM-DDTHH:mm:ss.SSS',\n // \n DATE: 'YYYY-MM-DD',\n // \n TIME: 'HH:mm',\n // \n TIME_SECONDS: 'HH:mm:ss',\n // \n TIME_MS: 'HH:mm:ss.SSS',\n // \n WEEK: 'GGGG-[W]WW',\n // \n MONTH: 'YYYY-MM' // \n\n };\n return hooks;\n });\n});\n\n// Maps for number <-> hex string conversion\nvar byteToHex = [];\n\nfor (var i$1 = 0; i$1 < 256; i$1++) {\n byteToHex[i$1] = (i$1 + 0x100).toString(16).substr(1);\n}\n/**\n * Represent binary UUID into it's string representation.\n *\n * @param buf - Buffer containing UUID bytes.\n * @param offset - Offset from the start of the buffer where the UUID is saved (not needed if the buffer starts with the UUID).\n *\n * @returns String representation of the UUID.\n */\n\n\nfunction stringifyUUID(buf, offset) {\n var i = offset || 0;\n var bth = byteToHex;\n return bth[buf[i++]] + bth[buf[i++]] + bth[buf[i++]] + bth[buf[i++]] + '-' + bth[buf[i++]] + bth[buf[i++]] + '-' + bth[buf[i++]] + bth[buf[i++]] + '-' + bth[buf[i++]] + bth[buf[i++]] + '-' + bth[buf[i++]] + bth[buf[i++]] + bth[buf[i++]] + bth[buf[i++]] + bth[buf[i++]] + bth[buf[i++]];\n}\n/**\n * Generate 16 random bytes to be used as a base for UUID.\n *\n * @ignore\n */\n\n\nvar random = function () {\n if (typeof crypto !== 'undefined' && crypto.getRandomValues) {\n // WHATWG crypto-based RNG - http://wiki.whatwg.org/wiki/Crypto\n // Moderately fast, high quality\n var _rnds8 = new Uint8Array(16);\n\n return function whatwgRNG() {\n crypto.getRandomValues(_rnds8);\n return _rnds8;\n };\n } // Math.random()-based (RNG)\n //\n // If all else fails, use Math.random().\n // It's fast, but is of unspecified quality.\n\n\n var _rnds = new Array(16);\n\n return function () {\n for (var i = 0, r; i < 16; i++) {\n if ((i & 0x03) === 0) {\n r = Math.random() * 0x100000000;\n }\n\n _rnds[i] = r >>> ((i & 0x03) << 3) & 0xff;\n }\n\n return _rnds;\n }; // uuid.js\n //\n // Copyright (c) 2010-2012 Robert Kieffer\n // MIT License - http://opensource.org/licenses/mit-license.php\n // Unique ID creation requires a high quality random # generator. We feature\n // detect to determine the best RNG source, normalizing to a function that\n // returns 128-bits of randomness, since that's what's usually required\n // return require('./rng');\n}();\n\nvar byteToHex$1 = [];\n\nfor (var i$1$1 = 0; i$1$1 < 256; i$1$1++) {\n byteToHex$1[i$1$1] = (i$1$1 + 0x100).toString(16).substr(1);\n} // **`v1()` - Generate time-based UUID**\n//\n// Inspired by https://github.com/LiosK/UUID.js\n// and http://docs.python.org/library/uuid.html\n// random #'s we need to init node and clockseq\n\n\nvar seedBytes = random(); // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)\n\nvar defaultNodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]]; // Per 4.2.2, randomize (14 bit) clockseq\n\nvar defaultClockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff; // Previous uuid creation time\n/**\n * UUIDv4 options.\n */\n\n/**\n * Generate UUIDv4\n *\n * @param options - Options to be used instead of default generated values.\n * String 'binary' is a shorthand for uuid4({}, new Array(16)).\n * @param buf - If present the buffer will be filled with the generated UUID.\n * @param offset - Offset of the UUID from the start of the buffer.\n *\n * @returns UUIDv4\n */\n\n\nfunction uuid4() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var buf = arguments.length > 1 ? arguments[1] : undefined;\n var offset = arguments.length > 2 ? arguments[2] : undefined; // Deprecated - 'format' argument, as supported in v1.2\n\n var i = buf && offset || 0;\n\n if (typeof options === 'string') {\n buf = options === 'binary' ? new Array(16) : undefined;\n options = {};\n }\n\n var rnds = options.random || (options.rng || random)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n for (var ii = 0; ii < 16; ii++) {\n buf[i + ii] = rnds[ii];\n }\n }\n\n return buf || stringifyUUID(rnds);\n} // Rollup will complain about mixing default and named exports in UMD build,\n\n// for example '/Date(1198908717056)/' or '/Date(1198908717056-0700)/'\n// code from http://momentjs.com/\n\nvar ASPDateRegex = /^\\/?Date\\((-?\\d+)/i; // Color REs\n\nvar fullHexRE = /^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i;\nvar shortHexRE = /^#?([a-f\\d])([a-f\\d])([a-f\\d])$/i;\nvar rgbRE = /^rgb\\( *(1?\\d{1,2}|2[0-4]\\d|25[0-5]) *, *(1?\\d{1,2}|2[0-4]\\d|25[0-5]) *, *(1?\\d{1,2}|2[0-4]\\d|25[0-5]) *\\)$/i;\nvar rgbaRE = /^rgba\\( *(1?\\d{1,2}|2[0-4]\\d|25[0-5]) *, *(1?\\d{1,2}|2[0-4]\\d|25[0-5]) *, *(1?\\d{1,2}|2[0-4]\\d|25[0-5]) *, *([01]|0?\\.\\d+) *\\)$/i;\n/**\n * Hue, Saturation, Value.\n */\n\n/**\n * Test whether given object is a number\n *\n * @param value - Input value of unknown type.\n *\n * @returns True if number, false otherwise.\n */\nfunction isNumber(value) {\n return value instanceof Number || typeof value === \"number\";\n}\n/**\n * Remove everything in the DOM object\n *\n * @param DOMobject - Node whose child nodes will be recursively deleted.\n */\n\nfunction recursiveDOMDelete(DOMobject) {\n if (DOMobject) {\n while (DOMobject.hasChildNodes() === true) {\n var child = DOMobject.firstChild;\n\n if (child) {\n recursiveDOMDelete(child);\n DOMobject.removeChild(child);\n }\n }\n }\n}\n/**\n * Test whether given object is a string\n *\n * @param value - Input value of unknown type.\n *\n * @returns True if string, false otherwise.\n */\n\nfunction isString(value) {\n return value instanceof String || typeof value === \"string\";\n}\n/**\n * Test whether given object is a object (not primitive or null).\n *\n * @param value - Input value of unknown type.\n *\n * @returns True if not null object, false otherwise.\n */\n\nfunction isObject(value) {\n return _typeof(value) === \"object\" && value !== null;\n}\n/**\n * Test whether given object is a Date, or a String containing a Date\n *\n * @param value - Input value of unknown type.\n *\n * @returns True if Date instance or string date representation, false otherwise.\n */\n\nfunction isDate(value) {\n if (value instanceof Date) {\n return true;\n } else if (isString(value)) {\n // test whether this string contains a date\n var match = ASPDateRegex.exec(value);\n\n if (match) {\n return true;\n } else if (!isNaN(Date.parse(value))) {\n return true;\n }\n }\n\n return false;\n}\n/**\n * Test whether given object is a Moment date.\n * @TODO: This is basically a workaround, if Moment was imported property it wouldn't necessary as moment.isMoment is a TS type guard.\n *\n * @param value - Input value of unknown type.\n *\n * @returns True if Moment instance, false otherwise.\n */\n\nfunction isMoment(value) {\n return moment.isMoment(value);\n}\n/**\n * Copy property from b to a if property present in a.\n * If property in b explicitly set to null, delete it if `allowDeletion` set.\n *\n * Internal helper routine, should not be exported. Not added to `exports` for that reason.\n *\n * @param a - Target object.\n * @param b - Source object.\n * @param prop - Name of property to copy from b to a.\n * @param allowDeletion if true, delete property in a if explicitly set to null in b\n */\n\nfunction copyOrDelete(a, b, prop, allowDeletion) {\n var doDeletion = false;\n\n if (allowDeletion === true) {\n doDeletion = b[prop] === null && a[prop] !== undefined;\n }\n\n if (doDeletion) {\n delete a[prop];\n } else {\n a[prop] = b[prop]; // Remember, this is a reference copy!\n }\n}\n/**\n * Fill an object with a possibly partially defined other object.\n *\n * Only copies values for the properties already present in a.\n * That means an object is not created on a property if only the b object has it.\n *\n * @param a - The object that will have it's properties updated.\n * @param b - The object with property updates.\n * @param allowDeletion - if true, delete properties in a that are explicitly set to null in b\n */\n\n\nfunction fillIfDefined(a, b) {\n var allowDeletion = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n\n // NOTE: iteration of properties of a\n // NOTE: prototype properties iterated over as well\n for (var prop in a) {\n if (b[prop] !== undefined) {\n if (b[prop] === null || _typeof(b[prop]) !== \"object\") {\n // Note: typeof null === 'object'\n copyOrDelete(a, b, prop, allowDeletion);\n } else {\n var aProp = a[prop];\n var bProp = b[prop];\n\n if (isObject(aProp) && isObject(bProp)) {\n fillIfDefined(aProp, bProp, allowDeletion);\n }\n }\n }\n }\n}\n/**\n * Copy the values of all of the enumerable own properties from one or more source objects to a\n * target object. Returns the target object.\n *\n * @param target - The target object to copy to.\n * @param source - The source object from which to copy properties.\n *\n * @return The target object.\n */\n\nvar extend = Object.assign;\n/**\n * Extend object a with selected properties of object b or a series of objects\n * Only properties with defined values are copied\n *\n * @param props - Properties to be copied to a.\n * @param a - The target.\n * @param others - The sources.\n *\n * @returns Argument a.\n */\n\nfunction selectiveExtend(props, a) {\n if (!Array.isArray(props)) {\n throw new Error(\"Array with property names expected as first argument\");\n }\n\n for (var _len = arguments.length, others = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {\n others[_key - 2] = arguments[_key];\n }\n\n for (var _i = 0, _others = others; _i < _others.length; _i++) {\n var other = _others[_i];\n\n for (var p = 0; p < props.length; p++) {\n var prop = props[p];\n\n if (other && Object.prototype.hasOwnProperty.call(other, prop)) {\n a[prop] = other[prop];\n }\n }\n }\n\n return a;\n}\n/**\n * Extend object a with selected properties of object b.\n * Only properties with defined values are copied.\n *\n * **Note:** Previous version of this routine implied that multiple source objects\n * could be used; however, the implementation was **wrong**.\n * Since multiple (>1) sources weren't used anywhere in the `vis.js` code,\n * this has been removed\n *\n * @param props - Names of first-level properties to copy over.\n * @param a - Target object.\n * @param b - Source object.\n * @param allowDeletion - If true, delete property in a if explicitly set to null in b.\n *\n * @returns Argument a.\n */\n\nfunction selectiveDeepExtend(props, a, b) {\n var allowDeletion = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;\n\n // TODO: add support for Arrays to deepExtend\n if (Array.isArray(b)) {\n throw new TypeError(\"Arrays are not supported by deepExtend\");\n }\n\n for (var p = 0; p < props.length; p++) {\n var prop = props[p];\n\n if (Object.prototype.hasOwnProperty.call(b, prop)) {\n if (b[prop] && b[prop].constructor === Object) {\n if (a[prop] === undefined) {\n a[prop] = {};\n }\n\n if (a[prop].constructor === Object) {\n deepExtend(a[prop], b[prop], false, allowDeletion);\n } else {\n copyOrDelete(a, b, prop, allowDeletion);\n }\n } else if (Array.isArray(b[prop])) {\n throw new TypeError(\"Arrays are not supported by deepExtend\");\n } else {\n copyOrDelete(a, b, prop, allowDeletion);\n }\n }\n }\n\n return a;\n}\n/**\n * Extend object `a` with properties of object `b`, ignoring properties which are explicitly\n * specified to be excluded.\n *\n * The properties of `b` are considered for copying.\n * Properties which are themselves objects are are also extended.\n * Only properties with defined values are copied\n *\n * @param propsToExclude - Names of properties which should *not* be copied.\n * @param a - Object to extend.\n * @param b - Object to take properties from for extension.\n * @param allowDeletion - If true, delete properties in a that are explicitly set to null in b.\n *\n * @returns Argument a.\n */\n\nfunction selectiveNotDeepExtend(propsToExclude, a, b) {\n var allowDeletion = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;\n\n // TODO: add support for Arrays to deepExtend\n // NOTE: array properties have an else-below; apparently, there is a problem here.\n if (Array.isArray(b)) {\n throw new TypeError(\"Arrays are not supported by deepExtend\");\n }\n\n for (var prop in b) {\n if (!Object.prototype.hasOwnProperty.call(b, prop)) {\n continue;\n } // Handle local properties only\n\n\n if (propsToExclude.indexOf(prop) !== -1) {\n continue;\n } // In exclusion list, skip\n\n\n if (b[prop] && b[prop].constructor === Object) {\n if (a[prop] === undefined) {\n a[prop] = {};\n }\n\n if (a[prop].constructor === Object) {\n deepExtend(a[prop], b[prop]); // NOTE: allowDeletion not propagated!\n } else {\n copyOrDelete(a, b, prop, allowDeletion);\n }\n } else if (Array.isArray(b[prop])) {\n a[prop] = [];\n\n for (var i = 0; i < b[prop].length; i++) {\n a[prop].push(b[prop][i]);\n }\n } else {\n copyOrDelete(a, b, prop, allowDeletion);\n }\n }\n\n return a;\n}\n/**\n * Deep extend an object a with the properties of object b\n *\n * @param a - Target object.\n * @param b - Source object.\n * @param protoExtend - If true, the prototype values will also be extended\n * (ie. the options objects that inherit from others will also get the inherited options).\n * @param allowDeletion - If true, the values of fields that are null will be deleted.\n *\n * @returns Argument a.\n */\n\nfunction deepExtend(a, b) {\n var protoExtend = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n var allowDeletion = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;\n\n for (var prop in b) {\n if (Object.prototype.hasOwnProperty.call(b, prop) || protoExtend === true) {\n if (b[prop] && Object.getPrototypeOf(b[prop]) === Object.prototype) {\n if (a[prop] === undefined) {\n a[prop] = deepExtend({}, b[prop], protoExtend); // NOTE: allowDeletion not propagated!\n } else if (a[prop] && Object.getPrototypeOf(a[prop]) === Object.prototype) {\n deepExtend(a[prop], b[prop], protoExtend); // NOTE: allowDeletion not propagated!\n } else {\n copyOrDelete(a, b, prop, allowDeletion);\n }\n } else if (Array.isArray(b[prop])) {\n a[prop] = b[prop].slice();\n } else {\n copyOrDelete(a, b, prop, allowDeletion);\n }\n }\n }\n\n return a;\n}\n/**\n * Test whether all elements in two arrays are equal.\n *\n * @param a - First array.\n * @param b - Second array.\n *\n * @returns True if both arrays have the same length and same elements (1 = '1').\n */\n\nfunction equalArray(a, b) {\n if (a.length !== b.length) {\n return false;\n }\n\n for (var i = 0, len = a.length; i < len; i++) {\n if (a[i] != b[i]) {\n return false;\n }\n }\n\n return true;\n}\n\n/**\n * Convert an object into another type\n *\n * @param object - Value of unknown type.\n * @param type - Name of the desired type.\n *\n * @returns Object in the desired type.\n * @throws Error\n */\nfunction convert(object, type) {\n var match;\n\n if (object === undefined) {\n return undefined;\n }\n\n if (object === null) {\n return null;\n }\n\n if (!type) {\n return object;\n }\n\n if (!(typeof type === \"string\") && !(type instanceof String)) {\n throw new Error(\"Type must be a string\");\n } //noinspection FallthroughInSwitchStatementJS\n\n\n switch (type) {\n case \"boolean\":\n case \"Boolean\":\n return Boolean(object);\n\n case \"number\":\n case \"Number\":\n if (isString(object) && !isNaN(Date.parse(object))) {\n return moment(object).valueOf();\n } else {\n // @TODO: I don't think that Number and String constructors are a good idea.\n // This could also fail if the object doesn't have valueOf method or if it's redefined.\n // For example: Object.create(null) or { valueOf: 7 }.\n return Number(object.valueOf());\n }\n\n case \"string\":\n case \"String\":\n return String(object);\n\n case \"Date\":\n if (isNumber(object)) {\n return new Date(object);\n }\n\n if (object instanceof Date) {\n return new Date(object.valueOf());\n } else if (isMoment(object)) {\n return new Date(object.valueOf());\n }\n\n if (isString(object)) {\n match = ASPDateRegex.exec(object);\n\n if (match) {\n // object is an ASP date\n return new Date(Number(match[1])); // parse number\n } else {\n return moment(new Date(object)).toDate(); // parse string\n }\n } else {\n throw new Error(\"Cannot convert object of type \" + getType(object) + \" to type Date\");\n }\n\n case \"Moment\":\n if (isNumber(object)) {\n return moment(object);\n }\n\n if (object instanceof Date) {\n return moment(object.valueOf());\n } else if (isMoment(object)) {\n return moment(object);\n }\n\n if (isString(object)) {\n match = ASPDateRegex.exec(object);\n\n if (match) {\n // object is an ASP date\n return moment(Number(match[1])); // parse number\n } else {\n return moment(object); // parse string\n }\n } else {\n throw new Error(\"Cannot convert object of type \" + getType(object) + \" to type Date\");\n }\n\n case \"ISODate\":\n if (isNumber(object)) {\n return new Date(object);\n } else if (object instanceof Date) {\n return object.toISOString();\n } else if (isMoment(object)) {\n return object.toDate().toISOString();\n } else if (isString(object)) {\n match = ASPDateRegex.exec(object);\n\n if (match) {\n // object is an ASP date\n return new Date(Number(match[1])).toISOString(); // parse number\n } else {\n return moment(object).format(); // ISO 8601\n }\n } else {\n throw new Error(\"Cannot convert object of type \" + getType(object) + \" to type ISODate\");\n }\n\n case \"ASPDate\":\n if (isNumber(object)) {\n return \"/Date(\" + object + \")/\";\n } else if (object instanceof Date || isMoment(object)) {\n return \"/Date(\" + object.valueOf() + \")/\";\n } else if (isString(object)) {\n match = ASPDateRegex.exec(object);\n\n var _value;\n\n if (match) {\n // object is an ASP date\n _value = new Date(Number(match[1])).valueOf(); // parse number\n } else {\n _value = new Date(object).valueOf(); // parse string\n }\n\n return \"/Date(\" + _value + \")/\";\n } else {\n throw new Error(\"Cannot convert object of type \" + getType(object) + \" to type ASPDate\");\n }\n\n default:\n var never = type;\n throw new Error(\"Unknown type \".concat(never));\n }\n}\n/**\n * Get the type of an object, for example exports.getType([]) returns 'Array'\n *\n * @param object - Input value of unknown type.\n *\n * @returns Detected type.\n */\n\nfunction getType(object) {\n var type = _typeof(object);\n\n if (type === \"object\") {\n if (object === null) {\n return \"null\";\n }\n\n if (object instanceof Boolean) {\n return \"Boolean\";\n }\n\n if (object instanceof Number) {\n return \"Number\";\n }\n\n if (object instanceof String) {\n return \"String\";\n }\n\n if (Array.isArray(object)) {\n return \"Array\";\n }\n\n if (object instanceof Date) {\n return \"Date\";\n }\n\n return \"Object\";\n }\n\n if (type === \"number\") {\n return \"Number\";\n }\n\n if (type === \"boolean\") {\n return \"Boolean\";\n }\n\n if (type === \"string\") {\n return \"String\";\n }\n\n if (type === undefined) {\n return \"undefined\";\n }\n\n return type;\n}\n\n/**\n * Used to extend an array and copy it. This is used to propagate paths recursively.\n *\n * @param arr - First part.\n * @param newValue - The value to be aadded into the array.\n *\n * @returns A new array with all items from arr and newValue (which is last).\n */\nfunction copyAndExtendArray(arr, newValue) {\n return [].concat(_toConsumableArray(arr), [newValue]);\n}\n/**\n * Used to extend an array and copy it. This is used to propagate paths recursively.\n *\n * @param arr - The array to be copied.\n *\n * @returns Shallow copy of arr.\n */\n\nfunction copyArray(arr) {\n return arr.slice();\n}\n/**\n * Retrieve the absolute left value of a DOM element\n *\n * @param elem - A dom element, for example a div.\n *\n * @returns The absolute left position of this element in the browser page.\n */\n\nfunction getAbsoluteLeft(elem) {\n return elem.getBoundingClientRect().left;\n}\n/**\n * Retrieve the absolute right value of a DOM element\n *\n * @param elem - A dom element, for example a div.\n *\n * @returns The absolute right position of this element in the browser page.\n */\n\nfunction getAbsoluteRight(elem) {\n return elem.getBoundingClientRect().right;\n}\n/**\n * Retrieve the absolute top value of a DOM element\n *\n * @param elem - A dom element, for example a div.\n *\n * @returns The absolute top position of this element in the browser page.\n */\n\nfunction getAbsoluteTop(elem) {\n return elem.getBoundingClientRect().top;\n}\n/**\n * Add a className to the given elements style.\n *\n * @param elem - The element to which the classes will be added.\n * @param classNames - Space separated list of classes.\n */\n\nfunction addClassName(elem, classNames) {\n var classes = elem.className.split(\" \");\n var newClasses = classNames.split(\" \");\n classes = classes.concat(newClasses.filter(function (className) {\n return classes.indexOf(className) < 0;\n }));\n elem.className = classes.join(\" \");\n}\n/**\n * Remove a className from the given elements style.\n *\n * @param elem - The element from which the classes will be removed.\n * @param classNames - Space separated list of classes.\n */\n\nfunction removeClassName(elem, classNames) {\n var classes = elem.className.split(\" \");\n var oldClasses = classNames.split(\" \");\n classes = classes.filter(function (className) {\n return oldClasses.indexOf(className) < 0;\n });\n elem.className = classes.join(\" \");\n}\n\n/**\n * For each method for both arrays and objects.\n * In case of an array, the built-in Array.forEach() is applied (**No, it's not!**).\n * In case of an Object, the method loops over all properties of the object.\n *\n * @param object - An Object or Array to be iterated over.\n * @param callback - Array.forEach-like callback.\n */\nfunction forEach(object, callback) {\n if (Array.isArray(object)) {\n // array\n var len = object.length;\n\n for (var i = 0; i < len; i++) {\n callback(object[i], i, object);\n }\n } else {\n // object\n for (var _key2 in object) {\n if (Object.prototype.hasOwnProperty.call(object, _key2)) {\n callback(object[_key2], _key2, object);\n }\n }\n }\n}\n/**\n * Convert an object into an array: all objects properties are put into the array. The resulting array is unordered.\n *\n * @param o - Object that contains the properties and methods.\n *\n * @returns An array of unordered values.\n */\n\nvar toArray = Object.values;\n/**\n * Update a property in an object\n *\n * @param object - The object whose property will be updated.\n * @param key - Name of the property to be updated.\n * @param value - The new value to be assigned.\n *\n * @returns Whether the value was updated (true) or already strictly the same in the original object (false).\n */\n\nfunction updateProperty(object, key, value) {\n if (object[key] !== value) {\n object[key] = value;\n return true;\n } else {\n return false;\n }\n}\n/**\n * Throttle the given function to be only executed once per animation frame.\n *\n * @param fn - The original function.\n *\n * @returns The throttled function.\n */\n\nfunction throttle(fn) {\n var scheduled = false;\n return function () {\n if (!scheduled) {\n scheduled = true;\n requestAnimationFrame(function () {\n scheduled = false;\n fn();\n });\n }\n };\n}\n/**\n * Add and event listener. Works for all browsers.\n *\n * @param element - The element to bind the event listener to.\n * @param action - Same as Element.addEventListener(action, —, —).\n * @param listener - Same as Element.addEventListener(—, listener, —).\n * @param useCapture - Same as Element.addEventListener(—, —, useCapture).\n */\n\nfunction addEventListener(element, action, listener, useCapture) {\n if (element.addEventListener) {\n if (useCapture === undefined) {\n useCapture = false;\n }\n\n if (action === \"mousewheel\" && navigator.userAgent.indexOf(\"Firefox\") >= 0) {\n action = \"DOMMouseScroll\"; // For Firefox\n }\n\n element.addEventListener(action, listener, useCapture);\n } else {\n // @TODO: IE types? Does anyone care?\n element.attachEvent(\"on\" + action, listener); // IE browsers\n }\n}\n/**\n * Remove an event listener from an element\n *\n * @param element - The element to bind the event listener to.\n * @param action - Same as Element.removeEventListener(action, —, —).\n * @param listener - Same as Element.removeEventListener(—, listener, —).\n * @param useCapture - Same as Element.removeEventListener(—, —, useCapture).\n */\n\nfunction removeEventListener(element, action, listener, useCapture) {\n if (element.removeEventListener) {\n // non-IE browsers\n if (useCapture === undefined) {\n useCapture = false;\n }\n\n if (action === \"mousewheel\" && navigator.userAgent.indexOf(\"Firefox\") >= 0) {\n action = \"DOMMouseScroll\"; // For Firefox\n }\n\n element.removeEventListener(action, listener, useCapture);\n } else {\n // @TODO: IE types? Does anyone care?\n element.detachEvent(\"on\" + action, listener); // IE browsers\n }\n}\n/**\n * Cancels the event's default action if it is cancelable, without stopping further propagation of the event.\n *\n * @param event - The event whose default action should be prevented.\n */\n\nfunction preventDefault(event) {\n if (!event) {\n event = window.event;\n }\n\n if (!event) ; else if (event.preventDefault) {\n event.preventDefault(); // non-IE browsers\n } else {\n // @TODO: IE types? Does anyone care?\n event.returnValue = false; // IE browsers\n }\n}\n/**\n * Get HTML element which is the target of the event.\n *\n * @param event - The event.\n *\n * @returns The element or null if not obtainable.\n */\n\nfunction getTarget() {\n var event = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : window.event;\n // code from http://www.quirksmode.org/js/events_properties.html\n // @TODO: EventTarget can be almost anything, is it okay to return only Elements?\n var target = null;\n\n if (!event) ; else if (event.target) {\n target = event.target;\n } else if (event.srcElement) {\n target = event.srcElement;\n }\n\n if (!(target instanceof Element)) {\n return null;\n }\n\n if (target.nodeType != null && target.nodeType == 3) {\n // defeat Safari bug\n target = target.parentNode;\n\n if (!(target instanceof Element)) {\n return null;\n }\n }\n\n return target;\n}\n/**\n * Check if given element contains given parent somewhere in the DOM tree\n *\n * @param element - The element to be tested.\n * @param parent - The ancestor (not necessarily parent) of the element.\n *\n * @returns True if parent is an ancestor of the element, false otherwise.\n */\n\nfunction hasParent(element, parent) {\n var elem = element;\n\n while (elem) {\n if (elem === parent) {\n return true;\n } else if (elem.parentNode) {\n elem = elem.parentNode;\n } else {\n return false;\n }\n }\n\n return false;\n}\nvar option = {\n /**\n * Convert a value into a boolean.\n *\n * @param value - Value to be converted intoboolean, a function will be executed as (() => unknown).\n * @param defaultValue - If the value or the return value of the function == null then this will be returned.\n *\n * @returns Corresponding boolean value, if none then the default value, if none then null.\n */\n asBoolean: function asBoolean(value, defaultValue) {\n if (typeof value == \"function\") {\n value = value();\n }\n\n if (value != null) {\n return value != false;\n }\n\n return defaultValue || null;\n },\n\n /**\n * Convert a value into a number.\n *\n * @param value - Value to be converted intonumber, a function will be executed as (() => unknown).\n * @param defaultValue - If the value or the return value of the function == null then this will be returned.\n *\n * @returns Corresponding **boxed** number value, if none then the default value, if none then null.\n */\n asNumber: function asNumber(value, defaultValue) {\n if (typeof value == \"function\") {\n value = value();\n }\n\n if (value != null) {\n return Number(value) || defaultValue || null;\n }\n\n return defaultValue || null;\n },\n\n /**\n * Convert a value into a string.\n *\n * @param value - Value to be converted intostring, a function will be executed as (() => unknown).\n * @param defaultValue - If the value or the return value of the function == null then this will be returned.\n *\n * @returns Corresponding **boxed** string value, if none then the default value, if none then null.\n */\n asString: function asString(value, defaultValue) {\n if (typeof value == \"function\") {\n value = value();\n }\n\n if (value != null) {\n return String(value);\n }\n\n return defaultValue || null;\n },\n\n /**\n * Convert a value into a size.\n *\n * @param value - Value to be converted intosize, a function will be executed as (() => unknown).\n * @param defaultValue - If the value or the return value of the function == null then this will be returned.\n *\n * @returns Corresponding string value (number + 'px'), if none then the default value, if none then null.\n */\n asSize: function asSize(value, defaultValue) {\n if (typeof value == \"function\") {\n value = value();\n }\n\n if (isString(value)) {\n return value;\n } else if (isNumber(value)) {\n return value + \"px\";\n } else {\n return defaultValue || null;\n }\n },\n\n /**\n * Convert a value into a DOM Element.\n *\n * @param value - Value to be converted into DOM Element, a function will be executed as (() => unknown).\n * @param defaultValue - If the value or the return value of the function == null then this will be returned.\n *\n * @returns The DOM Element, if none then the default value, if none then null.\n */\n asElement: function asElement(value, defaultValue) {\n if (typeof value == \"function\") {\n value = value();\n }\n\n return value || defaultValue || null;\n }\n};\n/**\n * Convert hex color string into RGB color object.\n * http://stackoverflow.com/questions/5623838/rgb-to-hex-and-hex-to-rgb\n *\n * @param hex - Hex color string (3 or 6 digits, with or without #).\n *\n * @returns RGB color object.\n */\n\nfunction hexToRGB(hex) {\n var result;\n\n switch (hex.length) {\n case 3:\n case 4:\n result = shortHexRE.exec(hex);\n return result ? {\n r: parseInt(result[1] + result[1], 16),\n g: parseInt(result[2] + result[2], 16),\n b: parseInt(result[3] + result[3], 16)\n } : null;\n\n case 6:\n case 7:\n result = fullHexRE.exec(hex);\n return result ? {\n r: parseInt(result[1], 16),\n g: parseInt(result[2], 16),\n b: parseInt(result[3], 16)\n } : null;\n\n default:\n return null;\n }\n}\n/**\n * This function takes string color in hex or RGB format and adds the opacity, RGBA is passed through unchanged.\n *\n * @param color - The color string (hex, RGB, RGBA).\n * @param opacity - The new opacity.\n *\n * @returns RGBA string, for example 'rgba(255, 0, 127, 0.3)'.\n */\n\nfunction overrideOpacity(color, opacity) {\n if (color.indexOf(\"rgba\") !== -1) {\n return color;\n } else if (color.indexOf(\"rgb\") !== -1) {\n var rgb = color.substr(color.indexOf(\"(\") + 1).replace(\")\", \"\").split(\",\");\n return \"rgba(\" + rgb[0] + \",\" + rgb[1] + \",\" + rgb[2] + \",\" + opacity + \")\";\n } else {\n var _rgb = hexToRGB(color);\n\n if (_rgb == null) {\n return color;\n } else {\n return \"rgba(\" + _rgb.r + \",\" + _rgb.g + \",\" + _rgb.b + \",\" + opacity + \")\";\n }\n }\n}\n/**\n * Convert RGB <0, 255> into hex color string.\n *\n * @param red - Red channel.\n * @param green - Green channel.\n * @param blue - Blue channel.\n *\n * @returns Hex color string (for example: '#0acdc0').\n */\n\nfunction RGBToHex(red, green, blue) {\n return \"#\" + ((1 << 24) + (red << 16) + (green << 8) + blue).toString(16).slice(1);\n}\n\n/**\n * Parse a color property into an object with border, background, and highlight colors\n *\n * @param inputColor - Shorthand color string or input color object.\n * @param defaultColor - Full color object to fill in missing values in inputColor.\n *\n * @returns Color object.\n */\nfunction parseColor(inputColor, defaultColor) {\n if (isString(inputColor)) {\n var colorStr = inputColor;\n\n if (isValidRGB(colorStr)) {\n var rgb = colorStr.substr(4).substr(0, colorStr.length - 5).split(\",\").map(function (value) {\n return parseInt(value);\n });\n colorStr = RGBToHex(rgb[0], rgb[1], rgb[2]);\n }\n\n if (isValidHex(colorStr) === true) {\n var hsv = hexToHSV(colorStr);\n var lighterColorHSV = {\n h: hsv.h,\n s: hsv.s * 0.8,\n v: Math.min(1, hsv.v * 1.02)\n };\n var darkerColorHSV = {\n h: hsv.h,\n s: Math.min(1, hsv.s * 1.25),\n v: hsv.v * 0.8\n };\n var darkerColorHex = HSVToHex(darkerColorHSV.h, darkerColorHSV.s, darkerColorHSV.v);\n var lighterColorHex = HSVToHex(lighterColorHSV.h, lighterColorHSV.s, lighterColorHSV.v);\n return {\n background: colorStr,\n border: darkerColorHex,\n highlight: {\n background: lighterColorHex,\n border: darkerColorHex\n },\n hover: {\n background: lighterColorHex,\n border: darkerColorHex\n }\n };\n } else {\n return {\n background: colorStr,\n border: colorStr,\n highlight: {\n background: colorStr,\n border: colorStr\n },\n hover: {\n background: colorStr,\n border: colorStr\n }\n };\n }\n } else {\n if (defaultColor) {\n var color = {\n background: inputColor.background || defaultColor.background,\n border: inputColor.border || defaultColor.border,\n highlight: isString(inputColor.highlight) ? {\n border: inputColor.highlight,\n background: inputColor.highlight\n } : {\n background: inputColor.highlight && inputColor.highlight.background || defaultColor.highlight.background,\n border: inputColor.highlight && inputColor.highlight.border || defaultColor.highlight.border\n },\n hover: isString(inputColor.hover) ? {\n border: inputColor.hover,\n background: inputColor.hover\n } : {\n border: inputColor.hover && inputColor.hover.border || defaultColor.hover.border,\n background: inputColor.hover && inputColor.hover.background || defaultColor.hover.background\n }\n };\n return color;\n } else {\n var _color = {\n background: inputColor.background || undefined,\n border: inputColor.border || undefined,\n highlight: isString(inputColor.highlight) ? {\n border: inputColor.highlight,\n background: inputColor.highlight\n } : {\n background: inputColor.highlight && inputColor.highlight.background || undefined,\n border: inputColor.highlight && inputColor.highlight.border || undefined\n },\n hover: isString(inputColor.hover) ? {\n border: inputColor.hover,\n background: inputColor.hover\n } : {\n border: inputColor.hover && inputColor.hover.border || undefined,\n background: inputColor.hover && inputColor.hover.background || undefined\n }\n };\n return _color;\n }\n }\n}\n/**\n * Convert RGB <0, 255> into HSV object.\n * http://www.javascripter.net/faq/rgb2hsv.htm\n *\n * @param red - Red channel.\n * @param green - Green channel.\n * @param blue - Blue channel.\n *\n * @returns HSV color object.\n */\n\nfunction RGBToHSV(red, green, blue) {\n red = red / 255;\n green = green / 255;\n blue = blue / 255;\n var minRGB = Math.min(red, Math.min(green, blue));\n var maxRGB = Math.max(red, Math.max(green, blue)); // Black-gray-white\n\n if (minRGB === maxRGB) {\n return {\n h: 0,\n s: 0,\n v: minRGB\n };\n } // Colors other than black-gray-white:\n\n\n var d = red === minRGB ? green - blue : blue === minRGB ? red - green : blue - red;\n var h = red === minRGB ? 3 : blue === minRGB ? 1 : 5;\n var hue = 60 * (h - d / (maxRGB - minRGB)) / 360;\n var saturation = (maxRGB - minRGB) / maxRGB;\n var value = maxRGB;\n return {\n h: hue,\n s: saturation,\n v: value\n };\n}\nvar cssUtil = {\n // split a string with css styles into an object with key/values\n split: function split(cssText) {\n var styles = {};\n cssText.split(\";\").forEach(function (style) {\n if (style.trim() != \"\") {\n var parts = style.split(\":\");\n\n var _key3 = parts[0].trim();\n\n var _value2 = parts[1].trim();\n\n styles[_key3] = _value2;\n }\n });\n return styles;\n },\n // build a css text string from an object with key/values\n join: function join(styles) {\n return Object.keys(styles).map(function (key) {\n return key + \": \" + styles[key];\n }).join(\"; \");\n }\n};\n/**\n * Append a string with css styles to an element\n *\n * @param element - The element that will receive new styles.\n * @param cssText - The styles to be appended.\n */\n\nfunction addCssText(element, cssText) {\n var currentStyles = cssUtil.split(element.style.cssText);\n var newStyles = cssUtil.split(cssText);\n\n var styles = _objectSpread2({}, currentStyles, {}, newStyles);\n\n element.style.cssText = cssUtil.join(styles);\n}\n/**\n * Remove a string with css styles from an element\n *\n * @param element - The element from which styles should be removed.\n * @param cssText - The styles to be removed.\n */\n\nfunction removeCssText(element, cssText) {\n var styles = cssUtil.split(element.style.cssText);\n var removeStyles = cssUtil.split(cssText);\n\n for (var _key4 in removeStyles) {\n if (Object.prototype.hasOwnProperty.call(removeStyles, _key4)) {\n delete styles[_key4];\n }\n }\n\n element.style.cssText = cssUtil.join(styles);\n}\n/**\n * Convert HSV <0, 1> into RGB color object.\n * https://gist.github.com/mjijackson/5311256\n *\n * @param h - Hue\n * @param s - Saturation\n * @param v - Value\n *\n * @returns RGB color object.\n */\n\nfunction HSVToRGB(h, s, v) {\n var r;\n var g;\n var b;\n var i = Math.floor(h * 6);\n var f = h * 6 - i;\n var p = v * (1 - s);\n var q = v * (1 - f * s);\n var t = v * (1 - (1 - f) * s);\n\n switch (i % 6) {\n case 0:\n r = v, g = t, b = p;\n break;\n\n case 1:\n r = q, g = v, b = p;\n break;\n\n case 2:\n r = p, g = v, b = t;\n break;\n\n case 3:\n r = p, g = q, b = v;\n break;\n\n case 4:\n r = t, g = p, b = v;\n break;\n\n case 5:\n r = v, g = p, b = q;\n break;\n }\n\n return {\n r: Math.floor(r * 255),\n g: Math.floor(g * 255),\n b: Math.floor(b * 255)\n };\n}\n/**\n * Convert HSV <0, 1> into hex color string.\n *\n * @param h - Hue\n * @param s - Saturation\n * @param v - Value\n *\n * @returns Hex color string.\n */\n\nfunction HSVToHex(h, s, v) {\n var rgb = HSVToRGB(h, s, v);\n return RGBToHex(rgb.r, rgb.g, rgb.b);\n}\n/**\n * Convert hex color string into HSV <0, 1>.\n *\n * @param hex - Hex color string.\n *\n * @returns HSV color object.\n */\n\nfunction hexToHSV(hex) {\n var rgb = hexToRGB(hex);\n\n if (!rgb) {\n throw new TypeError(\"'\".concat(hex, \"' is not a valid color.\"));\n }\n\n return RGBToHSV(rgb.r, rgb.g, rgb.b);\n}\n/**\n * Validate hex color string.\n *\n * @param hex - Unknown string that may contain a color.\n *\n * @returns True if the string is valid, false otherwise.\n */\n\nfunction isValidHex(hex) {\n var isOk = /(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(hex);\n return isOk;\n}\n/**\n * Validate RGB color string.\n *\n * @param rgb - Unknown string that may contain a color.\n *\n * @returns True if the string is valid, false otherwise.\n */\n\nfunction isValidRGB(rgb) {\n return rgbRE.test(rgb);\n}\n/**\n * Validate RGBA color string.\n *\n * @param rgba - Unknown string that may contain a color.\n *\n * @returns True if the string is valid, false otherwise.\n */\n\nfunction isValidRGBA(rgba) {\n return rgbaRE.test(rgba);\n}\n/**\n * This recursively redirects the prototype of JSON objects to the referenceObject.\n * This is used for default options.\n *\n * @param fields - Names of properties to be bridged.\n * @param referenceObject - The original object.\n *\n * @returns A new object inheriting from the referenceObject.\n */\n\nfunction selectiveBridgeObject(fields, referenceObject) {\n if (referenceObject !== null && _typeof(referenceObject) === \"object\") {\n // !!! typeof null === 'object'\n var objectTo = Object.create(referenceObject);\n\n for (var i = 0; i < fields.length; i++) {\n if (Object.prototype.hasOwnProperty.call(referenceObject, fields[i])) {\n if (_typeof(referenceObject[fields[i]]) == \"object\") {\n objectTo[fields[i]] = bridgeObject(referenceObject[fields[i]]);\n }\n }\n }\n\n return objectTo;\n } else {\n return null;\n }\n}\n\n/**\n * This recursively redirects the prototype of JSON objects to the referenceObject.\n * This is used for default options.\n *\n * @param referenceObject - The original object.\n *\n * @returns The Element if the referenceObject is an Element, or a new object inheriting from the referenceObject.\n */\nfunction bridgeObject(referenceObject) {\n if (referenceObject === null || _typeof(referenceObject) !== \"object\") {\n return null;\n }\n\n if (referenceObject instanceof Element) {\n // Avoid bridging DOM objects\n return referenceObject;\n }\n\n var objectTo = Object.create(referenceObject);\n\n for (var i in referenceObject) {\n if (Object.prototype.hasOwnProperty.call(referenceObject, i)) {\n if (_typeof(referenceObject[i]) == \"object\") {\n objectTo[i] = bridgeObject(referenceObject[i]);\n }\n }\n }\n\n return objectTo;\n}\n/**\n * This method provides a stable sort implementation, very fast for presorted data.\n *\n * @param a - The array to be sorted (in-place).\n * @param compare - An order comparator.\n *\n * @returns The argument a.\n */\n\nfunction insertSort(a, compare) {\n for (var i = 0; i < a.length; i++) {\n var k = a[i];\n var j = void 0;\n\n for (j = i; j > 0 && compare(k, a[j - 1]) < 0; j--) {\n a[j] = a[j - 1];\n }\n\n a[j] = k;\n }\n\n return a;\n}\n/**\n * This is used to set the options of subobjects in the options object.\n *\n * A requirement of these subobjects is that they have an 'enabled' element\n * which is optional for the user but mandatory for the program.\n *\n * The added value here of the merge is that option 'enabled' is set as required.\n *\n * @param mergeTarget - Either this.options or the options used for the groups.\n * @param options - Options.\n * @param option - Option key in the options argument.\n * @param globalOptions - Global options, passed in to determine value of option 'enabled'.\n */\n\nfunction mergeOptions(mergeTarget, options, option) {\n var globalOptions = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};\n\n // Local helpers\n var isPresent = function isPresent(obj) {\n return obj !== null && obj !== undefined;\n };\n\n var isObject = function isObject(obj) {\n return obj !== null && _typeof(obj) === \"object\";\n }; // https://stackoverflow.com/a/34491287/1223531\n\n\n var isEmpty = function isEmpty(obj) {\n for (var x in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, x)) {\n return false;\n }\n }\n\n return true;\n }; // Guards\n\n\n if (!isObject(mergeTarget)) {\n throw new Error(\"Parameter mergeTarget must be an object\");\n }\n\n if (!isObject(options)) {\n throw new Error(\"Parameter options must be an object\");\n }\n\n if (!isPresent(option)) {\n throw new Error(\"Parameter option must have a value\");\n }\n\n if (!isObject(globalOptions)) {\n throw new Error(\"Parameter globalOptions must be an object\");\n } //\n // Actual merge routine, separated from main logic\n // Only a single level of options is merged. Deeper levels are ref'd. This may actually be an issue.\n //\n\n\n var doMerge = function doMerge(target, options, option) {\n if (!isObject(target[option])) {\n target[option] = {};\n }\n\n var src = options[option];\n var dst = target[option];\n\n for (var prop in src) {\n if (Object.prototype.hasOwnProperty.call(src, prop)) {\n dst[prop] = src[prop];\n }\n }\n }; // Local initialization\n\n\n var srcOption = options[option];\n var globalPassed = isObject(globalOptions) && !isEmpty(globalOptions);\n var globalOption = globalPassed ? globalOptions[option] : undefined;\n var globalEnabled = globalOption ? globalOption.enabled : undefined; /////////////////////////////////////////\n // Main routine\n /////////////////////////////////////////\n\n if (srcOption === undefined) {\n return; // Nothing to do\n }\n\n if (typeof srcOption === \"boolean\") {\n if (!isObject(mergeTarget[option])) {\n mergeTarget[option] = {};\n }\n\n mergeTarget[option].enabled = srcOption;\n return;\n }\n\n if (srcOption === null && !isObject(mergeTarget[option])) {\n // If possible, explicit copy from globals\n if (isPresent(globalOption)) {\n mergeTarget[option] = Object.create(globalOption);\n } else {\n return; // Nothing to do\n }\n }\n\n if (!isObject(srcOption)) {\n return;\n } //\n // Ensure that 'enabled' is properly set. It is required internally\n // Note that the value from options will always overwrite the existing value\n //\n\n\n var enabled = true; // default value\n\n if (srcOption.enabled !== undefined) {\n enabled = srcOption.enabled;\n } else {\n // Take from globals, if present\n if (globalEnabled !== undefined) {\n enabled = globalOption.enabled;\n }\n }\n\n doMerge(mergeTarget, options, option);\n mergeTarget[option].enabled = enabled;\n}\n\n/**\n * This function does a binary search for a visible item in a sorted list. If we find a visible item, the code that uses\n * this function will then iterate in both directions over this sorted list to find all visible items.\n *\n * @param orderedItems - Items ordered by start\n * @param comparator - -1 is lower, 0 is equal, 1 is higher\n * @param field - Property name on an item (i.e. item[field]).\n * @param field2 - Second property name on an item (i.e. item[field][field2]).\n *\n * @returns Index of the found item or -1 if nothing was found.\n */\nfunction binarySearchCustom(orderedItems, comparator, field, field2) {\n var maxIterations = 10000;\n var iteration = 0;\n var low = 0;\n var high = orderedItems.length - 1;\n\n while (low <= high && iteration < maxIterations) {\n var middle = Math.floor((low + high) / 2);\n var item = orderedItems[middle];\n\n var _value3 = field2 === undefined ? item[field] : item[field][field2];\n\n var searchResult = comparator(_value3);\n\n if (searchResult == 0) {\n // jihaa, found a visible item!\n return middle;\n } else if (searchResult == -1) {\n // it is too small --> increase low\n low = middle + 1;\n } else {\n // it is too big --> decrease high\n high = middle - 1;\n }\n\n iteration++;\n }\n\n return -1;\n}\n/**\n * This function does a binary search for a specific value in a sorted array. If it does not exist but is in between of\n * two values, we return either the one before or the one after, depending on user input\n * If it is found, we return the index, else -1.\n *\n * @param orderedItems - Sorted array.\n * @param target - The searched value.\n * @param field - Name of the property in items to be searched.\n * @param sidePreference - If the target is between two values, should the index of the before or the after be returned?\n * @param comparator - An optional comparator, returning -1, 0, 1 for <, ===, >.\n *\n * @returns The index of found value or -1 if nothing was found.\n */\n\nfunction binarySearchValue(orderedItems, target, field, sidePreference, comparator) {\n var maxIterations = 10000;\n var iteration = 0;\n var low = 0;\n var high = orderedItems.length - 1;\n var prevValue;\n var value;\n var nextValue;\n var middle;\n comparator = comparator != undefined ? comparator : function (a, b) {\n return a == b ? 0 : a < b ? -1 : 1;\n };\n\n while (low <= high && iteration < maxIterations) {\n // get a new guess\n middle = Math.floor(0.5 * (high + low));\n prevValue = orderedItems[Math.max(0, middle - 1)][field];\n value = orderedItems[middle][field];\n nextValue = orderedItems[Math.min(orderedItems.length - 1, middle + 1)][field];\n\n if (comparator(value, target) == 0) {\n // we found the target\n return middle;\n } else if (comparator(prevValue, target) < 0 && comparator(value, target) > 0) {\n // target is in between of the previous and the current\n return sidePreference == \"before\" ? Math.max(0, middle - 1) : middle;\n } else if (comparator(value, target) < 0 && comparator(nextValue, target) > 0) {\n // target is in between of the current and the next\n return sidePreference == \"before\" ? middle : Math.min(orderedItems.length - 1, middle + 1);\n } else {\n // didnt find the target, we need to change our boundaries.\n if (comparator(value, target) < 0) {\n // it is too small --> increase low\n low = middle + 1;\n } else {\n // it is too big --> decrease high\n high = middle - 1;\n }\n }\n\n iteration++;\n } // didnt find anything. Return -1.\n\n\n return -1;\n}\n/*\n * Easing Functions.\n * Only considering the t value for the range [0, 1] => [0, 1].\n *\n * Inspiration: from http://gizma.com/easing/\n * https://gist.github.com/gre/1650294\n */\n\nvar easingFunctions = {\n /**\n * no easing, no acceleration\n *\n * @param t - Time.\n *\n * @returns Value at time t.\n */\n linear: function linear(t) {\n return t;\n },\n\n /**\n * accelerating from zero velocity\n *\n * @param t - Time.\n *\n * @returns Value at time t.\n */\n easeInQuad: function easeInQuad(t) {\n return t * t;\n },\n\n /**\n * decelerating to zero velocity\n *\n * @param t - Time.\n *\n * @returns Value at time t.\n */\n easeOutQuad: function easeOutQuad(t) {\n return t * (2 - t);\n },\n\n /**\n * acceleration until halfway, then deceleration\n *\n * @param t - Time.\n *\n * @returns Value at time t.\n */\n easeInOutQuad: function easeInOutQuad(t) {\n return t < 0.5 ? 2 * t * t : -1 + (4 - 2 * t) * t;\n },\n\n /**\n * accelerating from zero velocity\n *\n * @param t - Time.\n *\n * @returns Value at time t.\n */\n easeInCubic: function easeInCubic(t) {\n return t * t * t;\n },\n\n /**\n * decelerating to zero velocity\n *\n * @param t - Time.\n *\n * @returns Value at time t.\n */\n easeOutCubic: function easeOutCubic(t) {\n return --t * t * t + 1;\n },\n\n /**\n * acceleration until halfway, then deceleration\n *\n * @param t - Time.\n *\n * @returns Value at time t.\n */\n easeInOutCubic: function easeInOutCubic(t) {\n return t < 0.5 ? 4 * t * t * t : (t - 1) * (2 * t - 2) * (2 * t - 2) + 1;\n },\n\n /**\n * accelerating from zero velocity\n *\n * @param t - Time.\n *\n * @returns Value at time t.\n */\n easeInQuart: function easeInQuart(t) {\n return t * t * t * t;\n },\n\n /**\n * decelerating to zero velocity\n *\n * @param t - Time.\n *\n * @returns Value at time t.\n */\n easeOutQuart: function easeOutQuart(t) {\n return 1 - --t * t * t * t;\n },\n\n /**\n * acceleration until halfway, then deceleration\n *\n * @param t - Time.\n *\n * @returns Value at time t.\n */\n easeInOutQuart: function easeInOutQuart(t) {\n return t < 0.5 ? 8 * t * t * t * t : 1 - 8 * --t * t * t * t;\n },\n\n /**\n * accelerating from zero velocity\n *\n * @param t - Time.\n *\n * @returns Value at time t.\n */\n easeInQuint: function easeInQuint(t) {\n return t * t * t * t * t;\n },\n\n /**\n * decelerating to zero velocity\n *\n * @param t - Time.\n *\n * @returns Value at time t.\n */\n easeOutQuint: function easeOutQuint(t) {\n return 1 + --t * t * t * t * t;\n },\n\n /**\n * acceleration until halfway, then deceleration\n *\n * @param t - Time.\n *\n * @returns Value at time t.\n */\n easeInOutQuint: function easeInOutQuint(t) {\n return t < 0.5 ? 16 * t * t * t * t * t : 1 + 16 * --t * t * t * t * t;\n }\n};\n/**\n * Experimentaly compute the width of the scrollbar for this browser.\n *\n * @returns The width in pixels.\n */\n\nfunction getScrollBarWidth() {\n var inner = document.createElement(\"p\");\n inner.style.width = \"100%\";\n inner.style.height = \"200px\";\n var outer = document.createElement(\"div\");\n outer.style.position = \"absolute\";\n outer.style.top = \"0px\";\n outer.style.left = \"0px\";\n outer.style.visibility = \"hidden\";\n outer.style.width = \"200px\";\n outer.style.height = \"150px\";\n outer.style.overflow = \"hidden\";\n outer.appendChild(inner);\n document.body.appendChild(outer);\n var w1 = inner.offsetWidth;\n outer.style.overflow = \"scroll\";\n var w2 = inner.offsetWidth;\n\n if (w1 == w2) {\n w2 = outer.clientWidth;\n }\n\n document.body.removeChild(outer);\n return w1 - w2;\n} // @TODO: This doesn't work properly.\n// It works only for single property objects,\n// otherwise it combines all of the types in a union.\n// export function topMost (\n// pile: Record[],\n// accessors: K1 | [K1]\n// ): undefined | V1\n// export function topMost (\n// pile: Record>[],\n// accessors: [K1, K2]\n// ): undefined | V1 | V2\n// export function topMost (\n// pile: Record>>[],\n// accessors: [K1, K2, K3]\n// ): undefined | V1 | V2 | V3\n\n/**\n * Get the top most property value from a pile of objects.\n *\n * @param pile - Array of objects, no required format.\n * @param accessors - Array of property names (e.g. object['foo']['bar'] → ['foo', 'bar']).\n *\n * @returns Value of the property with given accessors path from the first pile item where it's not undefined.\n */\n\nfunction topMost(pile, accessors) {\n var candidate;\n\n if (!Array.isArray(accessors)) {\n accessors = [accessors];\n }\n\n var _iteratorNormalCompletion = true;\n var _didIteratorError = false;\n var _iteratorError = undefined;\n\n try {\n for (var _iterator = pile[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var member = _step.value;\n\n if (member) {\n candidate = member[accessors[0]];\n\n for (var i = 1; i < accessors.length; i++) {\n if (candidate) {\n candidate = candidate[accessors[i]];\n }\n }\n\n if (typeof candidate !== \"undefined\") {\n break;\n }\n }\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return != null) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n\n return candidate;\n}\n\nvar util = /*#__PURE__*/Object.freeze({\n\tisNumber: isNumber,\n\trecursiveDOMDelete: recursiveDOMDelete,\n\tisString: isString,\n\tisObject: isObject,\n\tisDate: isDate,\n\tisMoment: isMoment,\n\tfillIfDefined: fillIfDefined,\n\textend: extend,\n\tselectiveExtend: selectiveExtend,\n\tselectiveDeepExtend: selectiveDeepExtend,\n\tselectiveNotDeepExtend: selectiveNotDeepExtend,\n\tdeepExtend: deepExtend,\n\tequalArray: equalArray,\n\tconvert: convert,\n\tgetType: getType,\n\tcopyAndExtendArray: copyAndExtendArray,\n\tcopyArray: copyArray,\n\tgetAbsoluteLeft: getAbsoluteLeft,\n\tgetAbsoluteRight: getAbsoluteRight,\n\tgetAbsoluteTop: getAbsoluteTop,\n\taddClassName: addClassName,\n\tremoveClassName: removeClassName,\n\tforEach: forEach,\n\ttoArray: toArray,\n\tupdateProperty: updateProperty,\n\tthrottle: throttle,\n\taddEventListener: addEventListener,\n\tremoveEventListener: removeEventListener,\n\tpreventDefault: preventDefault,\n\tgetTarget: getTarget,\n\thasParent: hasParent,\n\toption: option,\n\thexToRGB: hexToRGB,\n\toverrideOpacity: overrideOpacity,\n\tRGBToHex: RGBToHex,\n\tparseColor: parseColor,\n\tRGBToHSV: RGBToHSV,\n\taddCssText: addCssText,\n\tremoveCssText: removeCssText,\n\tHSVToRGB: HSVToRGB,\n\tHSVToHex: HSVToHex,\n\thexToHSV: hexToHSV,\n\tisValidHex: isValidHex,\n\tisValidRGB: isValidRGB,\n\tisValidRGBA: isValidRGBA,\n\tselectiveBridgeObject: selectiveBridgeObject,\n\tbridgeObject: bridgeObject,\n\tinsertSort: insertSort,\n\tmergeOptions: mergeOptions,\n\tbinarySearchCustom: binarySearchCustom,\n\tbinarySearchValue: binarySearchValue,\n\teasingFunctions: easingFunctions,\n\tgetScrollBarWidth: getScrollBarWidth,\n\ttopMost: topMost,\n\trandomUUID: uuid4\n});\n\n// New API (tree shakeable).\n\nexport default util;\nexport { HSVToHex, HSVToRGB, RGBToHSV, RGBToHex, addClassName, addCssText, addEventListener, binarySearchCustom, binarySearchValue, bridgeObject, convert, copyAndExtendArray, copyArray, deepExtend, easingFunctions, equalArray, extend, fillIfDefined, forEach, getAbsoluteLeft, getAbsoluteRight, getAbsoluteTop, getScrollBarWidth, getTarget, getType, hasParent, hexToHSV, hexToRGB, insertSort, isDate, isMoment, isNumber, isObject, isString, isValidHex, isValidRGB, isValidRGBA, mergeOptions, option, overrideOpacity, parseColor, preventDefault, uuid4 as randomUUID, recursiveDOMDelete, removeClassName, removeCssText, removeEventListener, selectiveBridgeObject, selectiveDeepExtend, selectiveExtend, selectiveNotDeepExtend, throttle, toArray, topMost, updateProperty };\n","/** \n * vis-data - data\n * http://visjs.org/\n * \n * Manage unstructured data using DataSet. Add, update, and remove data, and listen for changes in the data.\n * \n * @version 6.1.0\n * @date 2019-07-16T13:37:00Z\n * \n * @copyright (c) 2011-2017 Almende B.V, http://almende.com\n * @copyright (c) 2018-2019 visjs contributors, https://github.com/visjs\n * \n * @license \n * vis.js is dual licensed under both\n * \n * 1. The Apache 2.0 License\n * http://www.apache.org/licenses/LICENSE-2.0\n * \n * and\n * \n * 2. The MIT License\n * http://opensource.org/licenses/MIT\n * \n * vis.js may be distributed under either license.\n */\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nvar defineProperty = _defineProperty;\n\nfunction createCommonjsModule(fn, module) {\n\treturn module = { exports: {} }, fn(module, module.exports), module.exports;\n}\n\nvar _typeof_1 = createCommonjsModule(function (module) {\n function _typeof2(obj) {\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof2 = function _typeof2(obj) {\n return typeof obj;\n };\n } else {\n _typeof2 = function _typeof2(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof2(obj);\n }\n\n function _typeof(obj) {\n if (typeof Symbol === \"function\" && _typeof2(Symbol.iterator) === \"symbol\") {\n module.exports = _typeof = function _typeof(obj) {\n return _typeof2(obj);\n };\n } else {\n module.exports = _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : _typeof2(obj);\n };\n }\n\n return _typeof(obj);\n }\n\n module.exports = _typeof;\n});\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nvar classCallCheck = _classCallCheck;\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nvar createClass = _createClass;\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nvar assertThisInitialized = _assertThisInitialized;\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof_1(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return assertThisInitialized(self);\n}\n\nvar possibleConstructorReturn = _possibleConstructorReturn;\n\nvar getPrototypeOf = createCommonjsModule(function (module) {\n function _getPrototypeOf(o) {\n module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n }\n\n module.exports = _getPrototypeOf;\n});\n\nvar setPrototypeOf = createCommonjsModule(function (module) {\n function _setPrototypeOf(o, p) {\n module.exports = _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n }\n\n module.exports = _setPrototypeOf;\n});\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) setPrototypeOf(subClass, superClass);\n}\n\nvar inherits = _inherits;\n\n// Maps for number <-> hex string conversion\nvar byteToHex = [];\n\nfor (var i = 0; i < 256; i++) {\n byteToHex[i] = (i + 0x100).toString(16).substr(1);\n}\n/**\n * Represent binary UUID into it's string representation.\n *\n * @param buf - Buffer containing UUID bytes.\n * @param offset - Offset from the start of the buffer where the UUID is saved (not needed if the buffer starts with the UUID).\n *\n * @returns String representation of the UUID.\n */\n\n\nfunction stringifyUUID(buf, offset) {\n var i = offset || 0;\n var bth = byteToHex;\n return bth[buf[i++]] + bth[buf[i++]] + bth[buf[i++]] + bth[buf[i++]] + '-' + bth[buf[i++]] + bth[buf[i++]] + '-' + bth[buf[i++]] + bth[buf[i++]] + '-' + bth[buf[i++]] + bth[buf[i++]] + '-' + bth[buf[i++]] + bth[buf[i++]] + bth[buf[i++]] + bth[buf[i++]] + bth[buf[i++]] + bth[buf[i++]];\n}\n/**\n * Generate 16 random bytes to be used as a base for UUID.\n *\n * @ignore\n */\n\n\nvar random = function () {\n if (typeof crypto !== 'undefined' && crypto.getRandomValues) {\n // WHATWG crypto-based RNG - http://wiki.whatwg.org/wiki/Crypto\n // Moderately fast, high quality\n var _rnds8 = new Uint8Array(16);\n\n return function whatwgRNG() {\n crypto.getRandomValues(_rnds8);\n return _rnds8;\n };\n } // Math.random()-based (RNG)\n //\n // If all else fails, use Math.random().\n // It's fast, but is of unspecified quality.\n\n\n var _rnds = new Array(16);\n\n return function () {\n for (var i = 0, r; i < 16; i++) {\n if ((i & 0x03) === 0) {\n r = Math.random() * 0x100000000;\n }\n\n _rnds[i] = r >>> ((i & 0x03) << 3) & 0xff;\n }\n\n return _rnds;\n }; // uuid.js\n //\n // Copyright (c) 2010-2012 Robert Kieffer\n // MIT License - http://opensource.org/licenses/mit-license.php\n // Unique ID creation requires a high quality random # generator. We feature\n // detect to determine the best RNG source, normalizing to a function that\n // returns 128-bits of randomness, since that's what's usually required\n // return require('./rng');\n}();\n\nvar byteToHex$1 = [];\n\nfor (var i$1 = 0; i$1 < 256; i$1++) {\n byteToHex$1[i$1] = (i$1 + 0x100).toString(16).substr(1);\n} // **`v1()` - Generate time-based UUID**\n//\n// Inspired by https://github.com/LiosK/UUID.js\n// and http://docs.python.org/library/uuid.html\n// random #'s we need to init node and clockseq\n\n\nvar seedBytes = random(); // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)\n\nvar defaultNodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]]; // Per 4.2.2, randomize (14 bit) clockseq\n\nvar defaultClockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff; // Previous uuid creation time\n/**\n * UUIDv4 options.\n */\n\n/**\n * Generate UUIDv4\n *\n * @param options - Options to be used instead of default generated values.\n * String 'binary' is a shorthand for uuid4({}, new Array(16)).\n * @param buf - If present the buffer will be filled with the generated UUID.\n * @param offset - Offset of the UUID from the start of the buffer.\n *\n * @returns UUIDv4\n */\n\n\nfunction uuid4() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var buf = arguments.length > 1 ? arguments[1] : undefined;\n var offset = arguments.length > 2 ? arguments[2] : undefined; // Deprecated - 'format' argument, as supported in v1.2\n\n var i = buf && offset || 0;\n\n if (typeof options === 'string') {\n buf = options === 'binary' ? new Array(16) : undefined;\n options = {};\n }\n\n var rnds = options.random || (options.rng || random)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n for (var ii = 0; ii < 16; ii++) {\n buf[i + ii] = rnds[ii];\n }\n }\n\n return buf || stringifyUUID(rnds);\n} // Rollup will complain about mixing default and named exports in UMD build,\n\nfunction _typeof(obj) {\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function (obj) {\n return typeof obj;\n };\n } else {\n _typeof = function (obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nvar commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};\n\nfunction commonjsRequire() {\n throw new Error('Dynamic requires are not currently supported by rollup-plugin-commonjs');\n}\n\nfunction createCommonjsModule$1(fn, module) {\n return module = {\n exports: {}\n }, fn(module, module.exports), module.exports;\n}\n\nvar moment = createCommonjsModule$1(function (module, exports) {\n (function (global, factory) {\n module.exports = factory();\n })(commonjsGlobal, function () {\n var hookCallback;\n\n function hooks() {\n return hookCallback.apply(null, arguments);\n } // This is done to register the method called with moment()\n // without creating circular dependencies.\n\n\n function setHookCallback(callback) {\n hookCallback = callback;\n }\n\n function isArray(input) {\n return input instanceof Array || Object.prototype.toString.call(input) === '[object Array]';\n }\n\n function isObject(input) {\n // IE8 will treat undefined and null as object if it wasn't for\n // input != null\n return input != null && Object.prototype.toString.call(input) === '[object Object]';\n }\n\n function isObjectEmpty(obj) {\n if (Object.getOwnPropertyNames) {\n return Object.getOwnPropertyNames(obj).length === 0;\n } else {\n var k;\n\n for (k in obj) {\n if (obj.hasOwnProperty(k)) {\n return false;\n }\n }\n\n return true;\n }\n }\n\n function isUndefined(input) {\n return input === void 0;\n }\n\n function isNumber(input) {\n return typeof input === 'number' || Object.prototype.toString.call(input) === '[object Number]';\n }\n\n function isDate(input) {\n return input instanceof Date || Object.prototype.toString.call(input) === '[object Date]';\n }\n\n function map(arr, fn) {\n var res = [],\n i;\n\n for (i = 0; i < arr.length; ++i) {\n res.push(fn(arr[i], i));\n }\n\n return res;\n }\n\n function hasOwnProp(a, b) {\n return Object.prototype.hasOwnProperty.call(a, b);\n }\n\n function extend(a, b) {\n for (var i in b) {\n if (hasOwnProp(b, i)) {\n a[i] = b[i];\n }\n }\n\n if (hasOwnProp(b, 'toString')) {\n a.toString = b.toString;\n }\n\n if (hasOwnProp(b, 'valueOf')) {\n a.valueOf = b.valueOf;\n }\n\n return a;\n }\n\n function createUTC(input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, true).utc();\n }\n\n function defaultParsingFlags() {\n // We need to deep clone this object.\n return {\n empty: false,\n unusedTokens: [],\n unusedInput: [],\n overflow: -2,\n charsLeftOver: 0,\n nullInput: false,\n invalidMonth: null,\n invalidFormat: false,\n userInvalidated: false,\n iso: false,\n parsedDateParts: [],\n meridiem: null,\n rfc2822: false,\n weekdayMismatch: false\n };\n }\n\n function getParsingFlags(m) {\n if (m._pf == null) {\n m._pf = defaultParsingFlags();\n }\n\n return m._pf;\n }\n\n var some;\n\n if (Array.prototype.some) {\n some = Array.prototype.some;\n } else {\n some = function (fun) {\n var t = Object(this);\n var len = t.length >>> 0;\n\n for (var i = 0; i < len; i++) {\n if (i in t && fun.call(this, t[i], i, t)) {\n return true;\n }\n }\n\n return false;\n };\n }\n\n function isValid(m) {\n if (m._isValid == null) {\n var flags = getParsingFlags(m);\n var parsedParts = some.call(flags.parsedDateParts, function (i) {\n return i != null;\n });\n var isNowValid = !isNaN(m._d.getTime()) && flags.overflow < 0 && !flags.empty && !flags.invalidMonth && !flags.invalidWeekday && !flags.weekdayMismatch && !flags.nullInput && !flags.invalidFormat && !flags.userInvalidated && (!flags.meridiem || flags.meridiem && parsedParts);\n\n if (m._strict) {\n isNowValid = isNowValid && flags.charsLeftOver === 0 && flags.unusedTokens.length === 0 && flags.bigHour === undefined;\n }\n\n if (Object.isFrozen == null || !Object.isFrozen(m)) {\n m._isValid = isNowValid;\n } else {\n return isNowValid;\n }\n }\n\n return m._isValid;\n }\n\n function createInvalid(flags) {\n var m = createUTC(NaN);\n\n if (flags != null) {\n extend(getParsingFlags(m), flags);\n } else {\n getParsingFlags(m).userInvalidated = true;\n }\n\n return m;\n } // Plugins that add properties should also add the key here (null value),\n // so we can properly clone ourselves.\n\n\n var momentProperties = hooks.momentProperties = [];\n\n function copyConfig(to, from) {\n var i, prop, val;\n\n if (!isUndefined(from._isAMomentObject)) {\n to._isAMomentObject = from._isAMomentObject;\n }\n\n if (!isUndefined(from._i)) {\n to._i = from._i;\n }\n\n if (!isUndefined(from._f)) {\n to._f = from._f;\n }\n\n if (!isUndefined(from._l)) {\n to._l = from._l;\n }\n\n if (!isUndefined(from._strict)) {\n to._strict = from._strict;\n }\n\n if (!isUndefined(from._tzm)) {\n to._tzm = from._tzm;\n }\n\n if (!isUndefined(from._isUTC)) {\n to._isUTC = from._isUTC;\n }\n\n if (!isUndefined(from._offset)) {\n to._offset = from._offset;\n }\n\n if (!isUndefined(from._pf)) {\n to._pf = getParsingFlags(from);\n }\n\n if (!isUndefined(from._locale)) {\n to._locale = from._locale;\n }\n\n if (momentProperties.length > 0) {\n for (i = 0; i < momentProperties.length; i++) {\n prop = momentProperties[i];\n val = from[prop];\n\n if (!isUndefined(val)) {\n to[prop] = val;\n }\n }\n }\n\n return to;\n }\n\n var updateInProgress = false; // Moment prototype object\n\n function Moment(config) {\n copyConfig(this, config);\n this._d = new Date(config._d != null ? config._d.getTime() : NaN);\n\n if (!this.isValid()) {\n this._d = new Date(NaN);\n } // Prevent infinite loop in case updateOffset creates new moment\n // objects.\n\n\n if (updateInProgress === false) {\n updateInProgress = true;\n hooks.updateOffset(this);\n updateInProgress = false;\n }\n }\n\n function isMoment(obj) {\n return obj instanceof Moment || obj != null && obj._isAMomentObject != null;\n }\n\n function absFloor(number) {\n if (number < 0) {\n // -0 -> 0\n return Math.ceil(number) || 0;\n } else {\n return Math.floor(number);\n }\n }\n\n function toInt(argumentForCoercion) {\n var coercedNumber = +argumentForCoercion,\n value = 0;\n\n if (coercedNumber !== 0 && isFinite(coercedNumber)) {\n value = absFloor(coercedNumber);\n }\n\n return value;\n } // compare two arrays, return the number of differences\n\n\n function compareArrays(array1, array2, dontConvert) {\n var len = Math.min(array1.length, array2.length),\n lengthDiff = Math.abs(array1.length - array2.length),\n diffs = 0,\n i;\n\n for (i = 0; i < len; i++) {\n if (dontConvert && array1[i] !== array2[i] || !dontConvert && toInt(array1[i]) !== toInt(array2[i])) {\n diffs++;\n }\n }\n\n return diffs + lengthDiff;\n }\n\n function warn(msg) {\n if (hooks.suppressDeprecationWarnings === false && typeof console !== 'undefined' && console.warn) {\n console.warn('Deprecation warning: ' + msg);\n }\n }\n\n function deprecate(msg, fn) {\n var firstTime = true;\n return extend(function () {\n if (hooks.deprecationHandler != null) {\n hooks.deprecationHandler(null, msg);\n }\n\n if (firstTime) {\n var args = [];\n var arg;\n\n for (var i = 0; i < arguments.length; i++) {\n arg = '';\n\n if (typeof arguments[i] === 'object') {\n arg += '\\n[' + i + '] ';\n\n for (var key in arguments[0]) {\n arg += key + ': ' + arguments[0][key] + ', ';\n }\n\n arg = arg.slice(0, -2); // Remove trailing comma and space\n } else {\n arg = arguments[i];\n }\n\n args.push(arg);\n }\n\n warn(msg + '\\nArguments: ' + Array.prototype.slice.call(args).join('') + '\\n' + new Error().stack);\n firstTime = false;\n }\n\n return fn.apply(this, arguments);\n }, fn);\n }\n\n var deprecations = {};\n\n function deprecateSimple(name, msg) {\n if (hooks.deprecationHandler != null) {\n hooks.deprecationHandler(name, msg);\n }\n\n if (!deprecations[name]) {\n warn(msg);\n deprecations[name] = true;\n }\n }\n\n hooks.suppressDeprecationWarnings = false;\n hooks.deprecationHandler = null;\n\n function isFunction(input) {\n return input instanceof Function || Object.prototype.toString.call(input) === '[object Function]';\n }\n\n function set(config) {\n var prop, i;\n\n for (i in config) {\n prop = config[i];\n\n if (isFunction(prop)) {\n this[i] = prop;\n } else {\n this['_' + i] = prop;\n }\n }\n\n this._config = config; // Lenient ordinal parsing accepts just a number in addition to\n // number + (possibly) stuff coming from _dayOfMonthOrdinalParse.\n // TODO: Remove \"ordinalParse\" fallback in next major release.\n\n this._dayOfMonthOrdinalParseLenient = new RegExp((this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) + '|' + /\\d{1,2}/.source);\n }\n\n function mergeConfigs(parentConfig, childConfig) {\n var res = extend({}, parentConfig),\n prop;\n\n for (prop in childConfig) {\n if (hasOwnProp(childConfig, prop)) {\n if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) {\n res[prop] = {};\n extend(res[prop], parentConfig[prop]);\n extend(res[prop], childConfig[prop]);\n } else if (childConfig[prop] != null) {\n res[prop] = childConfig[prop];\n } else {\n delete res[prop];\n }\n }\n }\n\n for (prop in parentConfig) {\n if (hasOwnProp(parentConfig, prop) && !hasOwnProp(childConfig, prop) && isObject(parentConfig[prop])) {\n // make sure changes to properties don't modify parent config\n res[prop] = extend({}, res[prop]);\n }\n }\n\n return res;\n }\n\n function Locale(config) {\n if (config != null) {\n this.set(config);\n }\n }\n\n var keys;\n\n if (Object.keys) {\n keys = Object.keys;\n } else {\n keys = function (obj) {\n var i,\n res = [];\n\n for (i in obj) {\n if (hasOwnProp(obj, i)) {\n res.push(i);\n }\n }\n\n return res;\n };\n }\n\n var defaultCalendar = {\n sameDay: '[Today at] LT',\n nextDay: '[Tomorrow at] LT',\n nextWeek: 'dddd [at] LT',\n lastDay: '[Yesterday at] LT',\n lastWeek: '[Last] dddd [at] LT',\n sameElse: 'L'\n };\n\n function calendar(key, mom, now) {\n var output = this._calendar[key] || this._calendar['sameElse'];\n return isFunction(output) ? output.call(mom, now) : output;\n }\n\n var defaultLongDateFormat = {\n LTS: 'h:mm:ss A',\n LT: 'h:mm A',\n L: 'MM/DD/YYYY',\n LL: 'MMMM D, YYYY',\n LLL: 'MMMM D, YYYY h:mm A',\n LLLL: 'dddd, MMMM D, YYYY h:mm A'\n };\n\n function longDateFormat(key) {\n var format = this._longDateFormat[key],\n formatUpper = this._longDateFormat[key.toUpperCase()];\n\n if (format || !formatUpper) {\n return format;\n }\n\n this._longDateFormat[key] = formatUpper.replace(/MMMM|MM|DD|dddd/g, function (val) {\n return val.slice(1);\n });\n return this._longDateFormat[key];\n }\n\n var defaultInvalidDate = 'Invalid date';\n\n function invalidDate() {\n return this._invalidDate;\n }\n\n var defaultOrdinal = '%d';\n var defaultDayOfMonthOrdinalParse = /\\d{1,2}/;\n\n function ordinal(number) {\n return this._ordinal.replace('%d', number);\n }\n\n var defaultRelativeTime = {\n future: 'in %s',\n past: '%s ago',\n s: 'a few seconds',\n ss: '%d seconds',\n m: 'a minute',\n mm: '%d minutes',\n h: 'an hour',\n hh: '%d hours',\n d: 'a day',\n dd: '%d days',\n M: 'a month',\n MM: '%d months',\n y: 'a year',\n yy: '%d years'\n };\n\n function relativeTime(number, withoutSuffix, string, isFuture) {\n var output = this._relativeTime[string];\n return isFunction(output) ? output(number, withoutSuffix, string, isFuture) : output.replace(/%d/i, number);\n }\n\n function pastFuture(diff, output) {\n var format = this._relativeTime[diff > 0 ? 'future' : 'past'];\n return isFunction(format) ? format(output) : format.replace(/%s/i, output);\n }\n\n var aliases = {};\n\n function addUnitAlias(unit, shorthand) {\n var lowerCase = unit.toLowerCase();\n aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit;\n }\n\n function normalizeUnits(units) {\n return typeof units === 'string' ? aliases[units] || aliases[units.toLowerCase()] : undefined;\n }\n\n function normalizeObjectUnits(inputObject) {\n var normalizedInput = {},\n normalizedProp,\n prop;\n\n for (prop in inputObject) {\n if (hasOwnProp(inputObject, prop)) {\n normalizedProp = normalizeUnits(prop);\n\n if (normalizedProp) {\n normalizedInput[normalizedProp] = inputObject[prop];\n }\n }\n }\n\n return normalizedInput;\n }\n\n var priorities = {};\n\n function addUnitPriority(unit, priority) {\n priorities[unit] = priority;\n }\n\n function getPrioritizedUnits(unitsObj) {\n var units = [];\n\n for (var u in unitsObj) {\n units.push({\n unit: u,\n priority: priorities[u]\n });\n }\n\n units.sort(function (a, b) {\n return a.priority - b.priority;\n });\n return units;\n }\n\n function zeroFill(number, targetLength, forceSign) {\n var absNumber = '' + Math.abs(number),\n zerosToFill = targetLength - absNumber.length,\n sign = number >= 0;\n return (sign ? forceSign ? '+' : '' : '-') + Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) + absNumber;\n }\n\n var formattingTokens = /(\\[[^\\[]*\\])|(\\\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g;\n var localFormattingTokens = /(\\[[^\\[]*\\])|(\\\\)?(LTS|LT|LL?L?L?|l{1,4})/g;\n var formatFunctions = {};\n var formatTokenFunctions = {}; // token: 'M'\n // padded: ['MM', 2]\n // ordinal: 'Mo'\n // callback: function () { this.month() + 1 }\n\n function addFormatToken(token, padded, ordinal, callback) {\n var func = callback;\n\n if (typeof callback === 'string') {\n func = function () {\n return this[callback]();\n };\n }\n\n if (token) {\n formatTokenFunctions[token] = func;\n }\n\n if (padded) {\n formatTokenFunctions[padded[0]] = function () {\n return zeroFill(func.apply(this, arguments), padded[1], padded[2]);\n };\n }\n\n if (ordinal) {\n formatTokenFunctions[ordinal] = function () {\n return this.localeData().ordinal(func.apply(this, arguments), token);\n };\n }\n }\n\n function removeFormattingTokens(input) {\n if (input.match(/\\[[\\s\\S]/)) {\n return input.replace(/^\\[|\\]$/g, '');\n }\n\n return input.replace(/\\\\/g, '');\n }\n\n function makeFormatFunction(format) {\n var array = format.match(formattingTokens),\n i,\n length;\n\n for (i = 0, length = array.length; i < length; i++) {\n if (formatTokenFunctions[array[i]]) {\n array[i] = formatTokenFunctions[array[i]];\n } else {\n array[i] = removeFormattingTokens(array[i]);\n }\n }\n\n return function (mom) {\n var output = '',\n i;\n\n for (i = 0; i < length; i++) {\n output += isFunction(array[i]) ? array[i].call(mom, format) : array[i];\n }\n\n return output;\n };\n } // format date using native date object\n\n\n function formatMoment(m, format) {\n if (!m.isValid()) {\n return m.localeData().invalidDate();\n }\n\n format = expandFormat(format, m.localeData());\n formatFunctions[format] = formatFunctions[format] || makeFormatFunction(format);\n return formatFunctions[format](m);\n }\n\n function expandFormat(format, locale) {\n var i = 5;\n\n function replaceLongDateFormatTokens(input) {\n return locale.longDateFormat(input) || input;\n }\n\n localFormattingTokens.lastIndex = 0;\n\n while (i >= 0 && localFormattingTokens.test(format)) {\n format = format.replace(localFormattingTokens, replaceLongDateFormatTokens);\n localFormattingTokens.lastIndex = 0;\n i -= 1;\n }\n\n return format;\n }\n\n var match1 = /\\d/; // 0 - 9\n\n var match2 = /\\d\\d/; // 00 - 99\n\n var match3 = /\\d{3}/; // 000 - 999\n\n var match4 = /\\d{4}/; // 0000 - 9999\n\n var match6 = /[+-]?\\d{6}/; // -999999 - 999999\n\n var match1to2 = /\\d\\d?/; // 0 - 99\n\n var match3to4 = /\\d\\d\\d\\d?/; // 999 - 9999\n\n var match5to6 = /\\d\\d\\d\\d\\d\\d?/; // 99999 - 999999\n\n var match1to3 = /\\d{1,3}/; // 0 - 999\n\n var match1to4 = /\\d{1,4}/; // 0 - 9999\n\n var match1to6 = /[+-]?\\d{1,6}/; // -999999 - 999999\n\n var matchUnsigned = /\\d+/; // 0 - inf\n\n var matchSigned = /[+-]?\\d+/; // -inf - inf\n\n var matchOffset = /Z|[+-]\\d\\d:?\\d\\d/gi; // +00:00 -00:00 +0000 -0000 or Z\n\n var matchShortOffset = /Z|[+-]\\d\\d(?::?\\d\\d)?/gi; // +00 -00 +00:00 -00:00 +0000 -0000 or Z\n\n var matchTimestamp = /[+-]?\\d+(\\.\\d{1,3})?/; // 123456789 123456789.123\n // any word (or two) characters or numbers including two/three word month in arabic.\n // includes scottish gaelic two word and hyphenated months\n\n var matchWord = /[0-9]{0,256}['a-z\\u00A0-\\u05FF\\u0700-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFF07\\uFF10-\\uFFEF]{1,256}|[\\u0600-\\u06FF\\/]{1,256}(\\s*?[\\u0600-\\u06FF]{1,256}){1,2}/i;\n var regexes = {};\n\n function addRegexToken(token, regex, strictRegex) {\n regexes[token] = isFunction(regex) ? regex : function (isStrict, localeData) {\n return isStrict && strictRegex ? strictRegex : regex;\n };\n }\n\n function getParseRegexForToken(token, config) {\n if (!hasOwnProp(regexes, token)) {\n return new RegExp(unescapeFormat(token));\n }\n\n return regexes[token](config._strict, config._locale);\n } // Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript\n\n\n function unescapeFormat(s) {\n return regexEscape(s.replace('\\\\', '').replace(/\\\\(\\[)|\\\\(\\])|\\[([^\\]\\[]*)\\]|\\\\(.)/g, function (matched, p1, p2, p3, p4) {\n return p1 || p2 || p3 || p4;\n }));\n }\n\n function regexEscape(s) {\n return s.replace(/[-\\/\\\\^$*+?.()|[\\]{}]/g, '\\\\$&');\n }\n\n var tokens = {};\n\n function addParseToken(token, callback) {\n var i,\n func = callback;\n\n if (typeof token === 'string') {\n token = [token];\n }\n\n if (isNumber(callback)) {\n func = function (input, array) {\n array[callback] = toInt(input);\n };\n }\n\n for (i = 0; i < token.length; i++) {\n tokens[token[i]] = func;\n }\n }\n\n function addWeekParseToken(token, callback) {\n addParseToken(token, function (input, array, config, token) {\n config._w = config._w || {};\n callback(input, config._w, config, token);\n });\n }\n\n function addTimeToArrayFromToken(token, input, config) {\n if (input != null && hasOwnProp(tokens, token)) {\n tokens[token](input, config._a, config, token);\n }\n }\n\n var YEAR = 0;\n var MONTH = 1;\n var DATE = 2;\n var HOUR = 3;\n var MINUTE = 4;\n var SECOND = 5;\n var MILLISECOND = 6;\n var WEEK = 7;\n var WEEKDAY = 8; // FORMATTING\n\n addFormatToken('Y', 0, 0, function () {\n var y = this.year();\n return y <= 9999 ? '' + y : '+' + y;\n });\n addFormatToken(0, ['YY', 2], 0, function () {\n return this.year() % 100;\n });\n addFormatToken(0, ['YYYY', 4], 0, 'year');\n addFormatToken(0, ['YYYYY', 5], 0, 'year');\n addFormatToken(0, ['YYYYYY', 6, true], 0, 'year'); // ALIASES\n\n addUnitAlias('year', 'y'); // PRIORITIES\n\n addUnitPriority('year', 1); // PARSING\n\n addRegexToken('Y', matchSigned);\n addRegexToken('YY', match1to2, match2);\n addRegexToken('YYYY', match1to4, match4);\n addRegexToken('YYYYY', match1to6, match6);\n addRegexToken('YYYYYY', match1to6, match6);\n addParseToken(['YYYYY', 'YYYYYY'], YEAR);\n addParseToken('YYYY', function (input, array) {\n array[YEAR] = input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input);\n });\n addParseToken('YY', function (input, array) {\n array[YEAR] = hooks.parseTwoDigitYear(input);\n });\n addParseToken('Y', function (input, array) {\n array[YEAR] = parseInt(input, 10);\n }); // HELPERS\n\n function daysInYear(year) {\n return isLeapYear(year) ? 366 : 365;\n }\n\n function isLeapYear(year) {\n return year % 4 === 0 && year % 100 !== 0 || year % 400 === 0;\n } // HOOKS\n\n\n hooks.parseTwoDigitYear = function (input) {\n return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);\n }; // MOMENTS\n\n\n var getSetYear = makeGetSet('FullYear', true);\n\n function getIsLeapYear() {\n return isLeapYear(this.year());\n }\n\n function makeGetSet(unit, keepTime) {\n return function (value) {\n if (value != null) {\n set$1(this, unit, value);\n hooks.updateOffset(this, keepTime);\n return this;\n } else {\n return get(this, unit);\n }\n };\n }\n\n function get(mom, unit) {\n return mom.isValid() ? mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]() : NaN;\n }\n\n function set$1(mom, unit, value) {\n if (mom.isValid() && !isNaN(value)) {\n if (unit === 'FullYear' && isLeapYear(mom.year()) && mom.month() === 1 && mom.date() === 29) {\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value, mom.month(), daysInMonth(value, mom.month()));\n } else {\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value);\n }\n }\n } // MOMENTS\n\n\n function stringGet(units) {\n units = normalizeUnits(units);\n\n if (isFunction(this[units])) {\n return this[units]();\n }\n\n return this;\n }\n\n function stringSet(units, value) {\n if (typeof units === 'object') {\n units = normalizeObjectUnits(units);\n var prioritized = getPrioritizedUnits(units);\n\n for (var i = 0; i < prioritized.length; i++) {\n this[prioritized[i].unit](units[prioritized[i].unit]);\n }\n } else {\n units = normalizeUnits(units);\n\n if (isFunction(this[units])) {\n return this[units](value);\n }\n }\n\n return this;\n }\n\n function mod(n, x) {\n return (n % x + x) % x;\n }\n\n var indexOf;\n\n if (Array.prototype.indexOf) {\n indexOf = Array.prototype.indexOf;\n } else {\n indexOf = function (o) {\n // I know\n var i;\n\n for (i = 0; i < this.length; ++i) {\n if (this[i] === o) {\n return i;\n }\n }\n\n return -1;\n };\n }\n\n function daysInMonth(year, month) {\n if (isNaN(year) || isNaN(month)) {\n return NaN;\n }\n\n var modMonth = mod(month, 12);\n year += (month - modMonth) / 12;\n return modMonth === 1 ? isLeapYear(year) ? 29 : 28 : 31 - modMonth % 7 % 2;\n } // FORMATTING\n\n\n addFormatToken('M', ['MM', 2], 'Mo', function () {\n return this.month() + 1;\n });\n addFormatToken('MMM', 0, 0, function (format) {\n return this.localeData().monthsShort(this, format);\n });\n addFormatToken('MMMM', 0, 0, function (format) {\n return this.localeData().months(this, format);\n }); // ALIASES\n\n addUnitAlias('month', 'M'); // PRIORITY\n\n addUnitPriority('month', 8); // PARSING\n\n addRegexToken('M', match1to2);\n addRegexToken('MM', match1to2, match2);\n addRegexToken('MMM', function (isStrict, locale) {\n return locale.monthsShortRegex(isStrict);\n });\n addRegexToken('MMMM', function (isStrict, locale) {\n return locale.monthsRegex(isStrict);\n });\n addParseToken(['M', 'MM'], function (input, array) {\n array[MONTH] = toInt(input) - 1;\n });\n addParseToken(['MMM', 'MMMM'], function (input, array, config, token) {\n var month = config._locale.monthsParse(input, token, config._strict); // if we didn't find a month name, mark the date as invalid.\n\n\n if (month != null) {\n array[MONTH] = month;\n } else {\n getParsingFlags(config).invalidMonth = input;\n }\n }); // LOCALES\n\n var MONTHS_IN_FORMAT = /D[oD]?(\\[[^\\[\\]]*\\]|\\s)+MMMM?/;\n var defaultLocaleMonths = 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_');\n\n function localeMonths(m, format) {\n if (!m) {\n return isArray(this._months) ? this._months : this._months['standalone'];\n }\n\n return isArray(this._months) ? this._months[m.month()] : this._months[(this._months.isFormat || MONTHS_IN_FORMAT).test(format) ? 'format' : 'standalone'][m.month()];\n }\n\n var defaultLocaleMonthsShort = 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_');\n\n function localeMonthsShort(m, format) {\n if (!m) {\n return isArray(this._monthsShort) ? this._monthsShort : this._monthsShort['standalone'];\n }\n\n return isArray(this._monthsShort) ? this._monthsShort[m.month()] : this._monthsShort[MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'][m.month()];\n }\n\n function handleStrictParse(monthName, format, strict) {\n var i,\n ii,\n mom,\n llc = monthName.toLocaleLowerCase();\n\n if (!this._monthsParse) {\n // this is not used\n this._monthsParse = [];\n this._longMonthsParse = [];\n this._shortMonthsParse = [];\n\n for (i = 0; i < 12; ++i) {\n mom = createUTC([2000, i]);\n this._shortMonthsParse[i] = this.monthsShort(mom, '').toLocaleLowerCase();\n this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase();\n }\n }\n\n if (strict) {\n if (format === 'MMM') {\n ii = indexOf.call(this._shortMonthsParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._longMonthsParse, llc);\n return ii !== -1 ? ii : null;\n }\n } else {\n if (format === 'MMM') {\n ii = indexOf.call(this._shortMonthsParse, llc);\n\n if (ii !== -1) {\n return ii;\n }\n\n ii = indexOf.call(this._longMonthsParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._longMonthsParse, llc);\n\n if (ii !== -1) {\n return ii;\n }\n\n ii = indexOf.call(this._shortMonthsParse, llc);\n return ii !== -1 ? ii : null;\n }\n }\n }\n\n function localeMonthsParse(monthName, format, strict) {\n var i, mom, regex;\n\n if (this._monthsParseExact) {\n return handleStrictParse.call(this, monthName, format, strict);\n }\n\n if (!this._monthsParse) {\n this._monthsParse = [];\n this._longMonthsParse = [];\n this._shortMonthsParse = [];\n } // TODO: add sorting\n // Sorting makes sure if one month (or abbr) is a prefix of another\n // see sorting in computeMonthsParse\n\n\n for (i = 0; i < 12; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, i]);\n\n if (strict && !this._longMonthsParse[i]) {\n this._longMonthsParse[i] = new RegExp('^' + this.months(mom, '').replace('.', '') + '$', 'i');\n this._shortMonthsParse[i] = new RegExp('^' + this.monthsShort(mom, '').replace('.', '') + '$', 'i');\n }\n\n if (!strict && !this._monthsParse[i]) {\n regex = '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, '');\n this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i');\n } // test the regex\n\n\n if (strict && format === 'MMMM' && this._longMonthsParse[i].test(monthName)) {\n return i;\n } else if (strict && format === 'MMM' && this._shortMonthsParse[i].test(monthName)) {\n return i;\n } else if (!strict && this._monthsParse[i].test(monthName)) {\n return i;\n }\n }\n } // MOMENTS\n\n\n function setMonth(mom, value) {\n var dayOfMonth;\n\n if (!mom.isValid()) {\n // No op\n return mom;\n }\n\n if (typeof value === 'string') {\n if (/^\\d+$/.test(value)) {\n value = toInt(value);\n } else {\n value = mom.localeData().monthsParse(value); // TODO: Another silent failure?\n\n if (!isNumber(value)) {\n return mom;\n }\n }\n }\n\n dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value));\n\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth);\n\n return mom;\n }\n\n function getSetMonth(value) {\n if (value != null) {\n setMonth(this, value);\n hooks.updateOffset(this, true);\n return this;\n } else {\n return get(this, 'Month');\n }\n }\n\n function getDaysInMonth() {\n return daysInMonth(this.year(), this.month());\n }\n\n var defaultMonthsShortRegex = matchWord;\n\n function monthsShortRegex(isStrict) {\n if (this._monthsParseExact) {\n if (!hasOwnProp(this, '_monthsRegex')) {\n computeMonthsParse.call(this);\n }\n\n if (isStrict) {\n return this._monthsShortStrictRegex;\n } else {\n return this._monthsShortRegex;\n }\n } else {\n if (!hasOwnProp(this, '_monthsShortRegex')) {\n this._monthsShortRegex = defaultMonthsShortRegex;\n }\n\n return this._monthsShortStrictRegex && isStrict ? this._monthsShortStrictRegex : this._monthsShortRegex;\n }\n }\n\n var defaultMonthsRegex = matchWord;\n\n function monthsRegex(isStrict) {\n if (this._monthsParseExact) {\n if (!hasOwnProp(this, '_monthsRegex')) {\n computeMonthsParse.call(this);\n }\n\n if (isStrict) {\n return this._monthsStrictRegex;\n } else {\n return this._monthsRegex;\n }\n } else {\n if (!hasOwnProp(this, '_monthsRegex')) {\n this._monthsRegex = defaultMonthsRegex;\n }\n\n return this._monthsStrictRegex && isStrict ? this._monthsStrictRegex : this._monthsRegex;\n }\n }\n\n function computeMonthsParse() {\n function cmpLenRev(a, b) {\n return b.length - a.length;\n }\n\n var shortPieces = [],\n longPieces = [],\n mixedPieces = [],\n i,\n mom;\n\n for (i = 0; i < 12; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, i]);\n shortPieces.push(this.monthsShort(mom, ''));\n longPieces.push(this.months(mom, ''));\n mixedPieces.push(this.months(mom, ''));\n mixedPieces.push(this.monthsShort(mom, ''));\n } // Sorting makes sure if one month (or abbr) is a prefix of another it\n // will match the longer piece.\n\n\n shortPieces.sort(cmpLenRev);\n longPieces.sort(cmpLenRev);\n mixedPieces.sort(cmpLenRev);\n\n for (i = 0; i < 12; i++) {\n shortPieces[i] = regexEscape(shortPieces[i]);\n longPieces[i] = regexEscape(longPieces[i]);\n }\n\n for (i = 0; i < 24; i++) {\n mixedPieces[i] = regexEscape(mixedPieces[i]);\n }\n\n this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._monthsShortRegex = this._monthsRegex;\n this._monthsStrictRegex = new RegExp('^(' + longPieces.join('|') + ')', 'i');\n this._monthsShortStrictRegex = new RegExp('^(' + shortPieces.join('|') + ')', 'i');\n }\n\n function createDate(y, m, d, h, M, s, ms) {\n // can't just apply() to create a date:\n // https://stackoverflow.com/q/181348\n var date; // the date constructor remaps years 0-99 to 1900-1999\n\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n date = new Date(y + 400, m, d, h, M, s, ms);\n\n if (isFinite(date.getFullYear())) {\n date.setFullYear(y);\n }\n } else {\n date = new Date(y, m, d, h, M, s, ms);\n }\n\n return date;\n }\n\n function createUTCDate(y) {\n var date; // the Date.UTC function remaps years 0-99 to 1900-1999\n\n if (y < 100 && y >= 0) {\n var args = Array.prototype.slice.call(arguments); // preserve leap years using a full 400 year cycle, then reset\n\n args[0] = y + 400;\n date = new Date(Date.UTC.apply(null, args));\n\n if (isFinite(date.getUTCFullYear())) {\n date.setUTCFullYear(y);\n }\n } else {\n date = new Date(Date.UTC.apply(null, arguments));\n }\n\n return date;\n } // start-of-first-week - start-of-year\n\n\n function firstWeekOffset(year, dow, doy) {\n var // first-week day -- which january is always in the first week (4 for iso, 1 for other)\n fwd = 7 + dow - doy,\n // first-week day local weekday -- which local weekday is fwd\n fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7;\n return -fwdlw + fwd - 1;\n } // https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday\n\n\n function dayOfYearFromWeeks(year, week, weekday, dow, doy) {\n var localWeekday = (7 + weekday - dow) % 7,\n weekOffset = firstWeekOffset(year, dow, doy),\n dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset,\n resYear,\n resDayOfYear;\n\n if (dayOfYear <= 0) {\n resYear = year - 1;\n resDayOfYear = daysInYear(resYear) + dayOfYear;\n } else if (dayOfYear > daysInYear(year)) {\n resYear = year + 1;\n resDayOfYear = dayOfYear - daysInYear(year);\n } else {\n resYear = year;\n resDayOfYear = dayOfYear;\n }\n\n return {\n year: resYear,\n dayOfYear: resDayOfYear\n };\n }\n\n function weekOfYear(mom, dow, doy) {\n var weekOffset = firstWeekOffset(mom.year(), dow, doy),\n week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1,\n resWeek,\n resYear;\n\n if (week < 1) {\n resYear = mom.year() - 1;\n resWeek = week + weeksInYear(resYear, dow, doy);\n } else if (week > weeksInYear(mom.year(), dow, doy)) {\n resWeek = week - weeksInYear(mom.year(), dow, doy);\n resYear = mom.year() + 1;\n } else {\n resYear = mom.year();\n resWeek = week;\n }\n\n return {\n week: resWeek,\n year: resYear\n };\n }\n\n function weeksInYear(year, dow, doy) {\n var weekOffset = firstWeekOffset(year, dow, doy),\n weekOffsetNext = firstWeekOffset(year + 1, dow, doy);\n return (daysInYear(year) - weekOffset + weekOffsetNext) / 7;\n } // FORMATTING\n\n\n addFormatToken('w', ['ww', 2], 'wo', 'week');\n addFormatToken('W', ['WW', 2], 'Wo', 'isoWeek'); // ALIASES\n\n addUnitAlias('week', 'w');\n addUnitAlias('isoWeek', 'W'); // PRIORITIES\n\n addUnitPriority('week', 5);\n addUnitPriority('isoWeek', 5); // PARSING\n\n addRegexToken('w', match1to2);\n addRegexToken('ww', match1to2, match2);\n addRegexToken('W', match1to2);\n addRegexToken('WW', match1to2, match2);\n addWeekParseToken(['w', 'ww', 'W', 'WW'], function (input, week, config, token) {\n week[token.substr(0, 1)] = toInt(input);\n }); // HELPERS\n // LOCALES\n\n function localeWeek(mom) {\n return weekOfYear(mom, this._week.dow, this._week.doy).week;\n }\n\n var defaultLocaleWeek = {\n dow: 0,\n // Sunday is the first day of the week.\n doy: 6 // The week that contains Jan 6th is the first week of the year.\n\n };\n\n function localeFirstDayOfWeek() {\n return this._week.dow;\n }\n\n function localeFirstDayOfYear() {\n return this._week.doy;\n } // MOMENTS\n\n\n function getSetWeek(input) {\n var week = this.localeData().week(this);\n return input == null ? week : this.add((input - week) * 7, 'd');\n }\n\n function getSetISOWeek(input) {\n var week = weekOfYear(this, 1, 4).week;\n return input == null ? week : this.add((input - week) * 7, 'd');\n } // FORMATTING\n\n\n addFormatToken('d', 0, 'do', 'day');\n addFormatToken('dd', 0, 0, function (format) {\n return this.localeData().weekdaysMin(this, format);\n });\n addFormatToken('ddd', 0, 0, function (format) {\n return this.localeData().weekdaysShort(this, format);\n });\n addFormatToken('dddd', 0, 0, function (format) {\n return this.localeData().weekdays(this, format);\n });\n addFormatToken('e', 0, 0, 'weekday');\n addFormatToken('E', 0, 0, 'isoWeekday'); // ALIASES\n\n addUnitAlias('day', 'd');\n addUnitAlias('weekday', 'e');\n addUnitAlias('isoWeekday', 'E'); // PRIORITY\n\n addUnitPriority('day', 11);\n addUnitPriority('weekday', 11);\n addUnitPriority('isoWeekday', 11); // PARSING\n\n addRegexToken('d', match1to2);\n addRegexToken('e', match1to2);\n addRegexToken('E', match1to2);\n addRegexToken('dd', function (isStrict, locale) {\n return locale.weekdaysMinRegex(isStrict);\n });\n addRegexToken('ddd', function (isStrict, locale) {\n return locale.weekdaysShortRegex(isStrict);\n });\n addRegexToken('dddd', function (isStrict, locale) {\n return locale.weekdaysRegex(isStrict);\n });\n addWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) {\n var weekday = config._locale.weekdaysParse(input, token, config._strict); // if we didn't get a weekday name, mark the date as invalid\n\n\n if (weekday != null) {\n week.d = weekday;\n } else {\n getParsingFlags(config).invalidWeekday = input;\n }\n });\n addWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) {\n week[token] = toInt(input);\n }); // HELPERS\n\n function parseWeekday(input, locale) {\n if (typeof input !== 'string') {\n return input;\n }\n\n if (!isNaN(input)) {\n return parseInt(input, 10);\n }\n\n input = locale.weekdaysParse(input);\n\n if (typeof input === 'number') {\n return input;\n }\n\n return null;\n }\n\n function parseIsoWeekday(input, locale) {\n if (typeof input === 'string') {\n return locale.weekdaysParse(input) % 7 || 7;\n }\n\n return isNaN(input) ? null : input;\n } // LOCALES\n\n\n function shiftWeekdays(ws, n) {\n return ws.slice(n, 7).concat(ws.slice(0, n));\n }\n\n var defaultLocaleWeekdays = 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_');\n\n function localeWeekdays(m, format) {\n var weekdays = isArray(this._weekdays) ? this._weekdays : this._weekdays[m && m !== true && this._weekdays.isFormat.test(format) ? 'format' : 'standalone'];\n return m === true ? shiftWeekdays(weekdays, this._week.dow) : m ? weekdays[m.day()] : weekdays;\n }\n\n var defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_');\n\n function localeWeekdaysShort(m) {\n return m === true ? shiftWeekdays(this._weekdaysShort, this._week.dow) : m ? this._weekdaysShort[m.day()] : this._weekdaysShort;\n }\n\n var defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_');\n\n function localeWeekdaysMin(m) {\n return m === true ? shiftWeekdays(this._weekdaysMin, this._week.dow) : m ? this._weekdaysMin[m.day()] : this._weekdaysMin;\n }\n\n function handleStrictParse$1(weekdayName, format, strict) {\n var i,\n ii,\n mom,\n llc = weekdayName.toLocaleLowerCase();\n\n if (!this._weekdaysParse) {\n this._weekdaysParse = [];\n this._shortWeekdaysParse = [];\n this._minWeekdaysParse = [];\n\n for (i = 0; i < 7; ++i) {\n mom = createUTC([2000, 1]).day(i);\n this._minWeekdaysParse[i] = this.weekdaysMin(mom, '').toLocaleLowerCase();\n this._shortWeekdaysParse[i] = this.weekdaysShort(mom, '').toLocaleLowerCase();\n this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase();\n }\n }\n\n if (strict) {\n if (format === 'dddd') {\n ii = indexOf.call(this._weekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else if (format === 'ddd') {\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n }\n } else {\n if (format === 'dddd') {\n ii = indexOf.call(this._weekdaysParse, llc);\n\n if (ii !== -1) {\n return ii;\n }\n\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n\n if (ii !== -1) {\n return ii;\n }\n\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else if (format === 'ddd') {\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n\n if (ii !== -1) {\n return ii;\n }\n\n ii = indexOf.call(this._weekdaysParse, llc);\n\n if (ii !== -1) {\n return ii;\n }\n\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._minWeekdaysParse, llc);\n\n if (ii !== -1) {\n return ii;\n }\n\n ii = indexOf.call(this._weekdaysParse, llc);\n\n if (ii !== -1) {\n return ii;\n }\n\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n }\n }\n }\n\n function localeWeekdaysParse(weekdayName, format, strict) {\n var i, mom, regex;\n\n if (this._weekdaysParseExact) {\n return handleStrictParse$1.call(this, weekdayName, format, strict);\n }\n\n if (!this._weekdaysParse) {\n this._weekdaysParse = [];\n this._minWeekdaysParse = [];\n this._shortWeekdaysParse = [];\n this._fullWeekdaysParse = [];\n }\n\n for (i = 0; i < 7; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, 1]).day(i);\n\n if (strict && !this._fullWeekdaysParse[i]) {\n this._fullWeekdaysParse[i] = new RegExp('^' + this.weekdays(mom, '').replace('.', '\\\\.?') + '$', 'i');\n this._shortWeekdaysParse[i] = new RegExp('^' + this.weekdaysShort(mom, '').replace('.', '\\\\.?') + '$', 'i');\n this._minWeekdaysParse[i] = new RegExp('^' + this.weekdaysMin(mom, '').replace('.', '\\\\.?') + '$', 'i');\n }\n\n if (!this._weekdaysParse[i]) {\n regex = '^' + this.weekdays(mom, '') + '|^' + this.weekdaysShort(mom, '') + '|^' + this.weekdaysMin(mom, '');\n this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i');\n } // test the regex\n\n\n if (strict && format === 'dddd' && this._fullWeekdaysParse[i].test(weekdayName)) {\n return i;\n } else if (strict && format === 'ddd' && this._shortWeekdaysParse[i].test(weekdayName)) {\n return i;\n } else if (strict && format === 'dd' && this._minWeekdaysParse[i].test(weekdayName)) {\n return i;\n } else if (!strict && this._weekdaysParse[i].test(weekdayName)) {\n return i;\n }\n }\n } // MOMENTS\n\n\n function getSetDayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n\n var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay();\n\n if (input != null) {\n input = parseWeekday(input, this.localeData());\n return this.add(input - day, 'd');\n } else {\n return day;\n }\n }\n\n function getSetLocaleDayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n\n var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7;\n return input == null ? weekday : this.add(input - weekday, 'd');\n }\n\n function getSetISODayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n } // behaves the same as moment#day except\n // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)\n // as a setter, sunday should belong to the previous week.\n\n\n if (input != null) {\n var weekday = parseIsoWeekday(input, this.localeData());\n return this.day(this.day() % 7 ? weekday : weekday - 7);\n } else {\n return this.day() || 7;\n }\n }\n\n var defaultWeekdaysRegex = matchWord;\n\n function weekdaysRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n\n if (isStrict) {\n return this._weekdaysStrictRegex;\n } else {\n return this._weekdaysRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n this._weekdaysRegex = defaultWeekdaysRegex;\n }\n\n return this._weekdaysStrictRegex && isStrict ? this._weekdaysStrictRegex : this._weekdaysRegex;\n }\n }\n\n var defaultWeekdaysShortRegex = matchWord;\n\n function weekdaysShortRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n\n if (isStrict) {\n return this._weekdaysShortStrictRegex;\n } else {\n return this._weekdaysShortRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysShortRegex')) {\n this._weekdaysShortRegex = defaultWeekdaysShortRegex;\n }\n\n return this._weekdaysShortStrictRegex && isStrict ? this._weekdaysShortStrictRegex : this._weekdaysShortRegex;\n }\n }\n\n var defaultWeekdaysMinRegex = matchWord;\n\n function weekdaysMinRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n\n if (isStrict) {\n return this._weekdaysMinStrictRegex;\n } else {\n return this._weekdaysMinRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysMinRegex')) {\n this._weekdaysMinRegex = defaultWeekdaysMinRegex;\n }\n\n return this._weekdaysMinStrictRegex && isStrict ? this._weekdaysMinStrictRegex : this._weekdaysMinRegex;\n }\n }\n\n function computeWeekdaysParse() {\n function cmpLenRev(a, b) {\n return b.length - a.length;\n }\n\n var minPieces = [],\n shortPieces = [],\n longPieces = [],\n mixedPieces = [],\n i,\n mom,\n minp,\n shortp,\n longp;\n\n for (i = 0; i < 7; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, 1]).day(i);\n minp = this.weekdaysMin(mom, '');\n shortp = this.weekdaysShort(mom, '');\n longp = this.weekdays(mom, '');\n minPieces.push(minp);\n shortPieces.push(shortp);\n longPieces.push(longp);\n mixedPieces.push(minp);\n mixedPieces.push(shortp);\n mixedPieces.push(longp);\n } // Sorting makes sure if one weekday (or abbr) is a prefix of another it\n // will match the longer piece.\n\n\n minPieces.sort(cmpLenRev);\n shortPieces.sort(cmpLenRev);\n longPieces.sort(cmpLenRev);\n mixedPieces.sort(cmpLenRev);\n\n for (i = 0; i < 7; i++) {\n shortPieces[i] = regexEscape(shortPieces[i]);\n longPieces[i] = regexEscape(longPieces[i]);\n mixedPieces[i] = regexEscape(mixedPieces[i]);\n }\n\n this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._weekdaysShortRegex = this._weekdaysRegex;\n this._weekdaysMinRegex = this._weekdaysRegex;\n this._weekdaysStrictRegex = new RegExp('^(' + longPieces.join('|') + ')', 'i');\n this._weekdaysShortStrictRegex = new RegExp('^(' + shortPieces.join('|') + ')', 'i');\n this._weekdaysMinStrictRegex = new RegExp('^(' + minPieces.join('|') + ')', 'i');\n } // FORMATTING\n\n\n function hFormat() {\n return this.hours() % 12 || 12;\n }\n\n function kFormat() {\n return this.hours() || 24;\n }\n\n addFormatToken('H', ['HH', 2], 0, 'hour');\n addFormatToken('h', ['hh', 2], 0, hFormat);\n addFormatToken('k', ['kk', 2], 0, kFormat);\n addFormatToken('hmm', 0, 0, function () {\n return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2);\n });\n addFormatToken('hmmss', 0, 0, function () {\n return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2) + zeroFill(this.seconds(), 2);\n });\n addFormatToken('Hmm', 0, 0, function () {\n return '' + this.hours() + zeroFill(this.minutes(), 2);\n });\n addFormatToken('Hmmss', 0, 0, function () {\n return '' + this.hours() + zeroFill(this.minutes(), 2) + zeroFill(this.seconds(), 2);\n });\n\n function meridiem(token, lowercase) {\n addFormatToken(token, 0, 0, function () {\n return this.localeData().meridiem(this.hours(), this.minutes(), lowercase);\n });\n }\n\n meridiem('a', true);\n meridiem('A', false); // ALIASES\n\n addUnitAlias('hour', 'h'); // PRIORITY\n\n addUnitPriority('hour', 13); // PARSING\n\n function matchMeridiem(isStrict, locale) {\n return locale._meridiemParse;\n }\n\n addRegexToken('a', matchMeridiem);\n addRegexToken('A', matchMeridiem);\n addRegexToken('H', match1to2);\n addRegexToken('h', match1to2);\n addRegexToken('k', match1to2);\n addRegexToken('HH', match1to2, match2);\n addRegexToken('hh', match1to2, match2);\n addRegexToken('kk', match1to2, match2);\n addRegexToken('hmm', match3to4);\n addRegexToken('hmmss', match5to6);\n addRegexToken('Hmm', match3to4);\n addRegexToken('Hmmss', match5to6);\n addParseToken(['H', 'HH'], HOUR);\n addParseToken(['k', 'kk'], function (input, array, config) {\n var kInput = toInt(input);\n array[HOUR] = kInput === 24 ? 0 : kInput;\n });\n addParseToken(['a', 'A'], function (input, array, config) {\n config._isPm = config._locale.isPM(input);\n config._meridiem = input;\n });\n addParseToken(['h', 'hh'], function (input, array, config) {\n array[HOUR] = toInt(input);\n getParsingFlags(config).bigHour = true;\n });\n addParseToken('hmm', function (input, array, config) {\n var pos = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos));\n array[MINUTE] = toInt(input.substr(pos));\n getParsingFlags(config).bigHour = true;\n });\n addParseToken('hmmss', function (input, array, config) {\n var pos1 = input.length - 4;\n var pos2 = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos1));\n array[MINUTE] = toInt(input.substr(pos1, 2));\n array[SECOND] = toInt(input.substr(pos2));\n getParsingFlags(config).bigHour = true;\n });\n addParseToken('Hmm', function (input, array, config) {\n var pos = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos));\n array[MINUTE] = toInt(input.substr(pos));\n });\n addParseToken('Hmmss', function (input, array, config) {\n var pos1 = input.length - 4;\n var pos2 = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos1));\n array[MINUTE] = toInt(input.substr(pos1, 2));\n array[SECOND] = toInt(input.substr(pos2));\n }); // LOCALES\n\n function localeIsPM(input) {\n // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays\n // Using charAt should be more compatible.\n return (input + '').toLowerCase().charAt(0) === 'p';\n }\n\n var defaultLocaleMeridiemParse = /[ap]\\.?m?\\.?/i;\n\n function localeMeridiem(hours, minutes, isLower) {\n if (hours > 11) {\n return isLower ? 'pm' : 'PM';\n } else {\n return isLower ? 'am' : 'AM';\n }\n } // MOMENTS\n // Setting the hour should keep the time, because the user explicitly\n // specified which hour they want. So trying to maintain the same hour (in\n // a new timezone) makes sense. Adding/subtracting hours does not follow\n // this rule.\n\n\n var getSetHour = makeGetSet('Hours', true);\n var baseConfig = {\n calendar: defaultCalendar,\n longDateFormat: defaultLongDateFormat,\n invalidDate: defaultInvalidDate,\n ordinal: defaultOrdinal,\n dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse,\n relativeTime: defaultRelativeTime,\n months: defaultLocaleMonths,\n monthsShort: defaultLocaleMonthsShort,\n week: defaultLocaleWeek,\n weekdays: defaultLocaleWeekdays,\n weekdaysMin: defaultLocaleWeekdaysMin,\n weekdaysShort: defaultLocaleWeekdaysShort,\n meridiemParse: defaultLocaleMeridiemParse\n }; // internal storage for locale config files\n\n var locales = {};\n var localeFamilies = {};\n var globalLocale;\n\n function normalizeLocale(key) {\n return key ? key.toLowerCase().replace('_', '-') : key;\n } // pick the locale from the array\n // try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each\n // substring from most specific to least, but move to the next array item if it's a more specific variant than the current root\n\n\n function chooseLocale(names) {\n var i = 0,\n j,\n next,\n locale,\n split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n\n if (locale) {\n return locale;\n }\n\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n\n j--;\n }\n\n i++;\n }\n\n return globalLocale;\n }\n\n function loadLocale(name) {\n var oldLocale = null; // TODO: Find a better way to register and load all the locales in Node\n\n if (!locales[name] && 'object' !== 'undefined' && module && module.exports) {\n try {\n oldLocale = globalLocale._abbr;\n var aliasedRequire = commonjsRequire;\n aliasedRequire('./locale/' + name);\n getSetGlobalLocale(oldLocale);\n } catch (e) {}\n }\n\n return locales[name];\n } // This function will load locale and then set the global locale. If\n // no arguments are passed in, it will simply return the current global\n // locale key.\n\n\n function getSetGlobalLocale(key, values) {\n var data;\n\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n } else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n } else {\n if (typeof console !== 'undefined' && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n }\n\n function defineLocale(name, config) {\n if (config !== null) {\n var locale,\n parentConfig = baseConfig;\n config.abbr = name;\n\n if (locales[name] != null) {\n deprecateSimple('defineLocaleOverride', 'use moment.updateLocale(localeName, config) to change ' + 'an existing locale. moment.defineLocale(localeName, ' + 'config) should only be used for creating a new locale ' + 'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.');\n parentConfig = locales[name]._config;\n } else if (config.parentLocale != null) {\n if (locales[config.parentLocale] != null) {\n parentConfig = locales[config.parentLocale]._config;\n } else {\n locale = loadLocale(config.parentLocale);\n\n if (locale != null) {\n parentConfig = locale._config;\n } else {\n if (!localeFamilies[config.parentLocale]) {\n localeFamilies[config.parentLocale] = [];\n }\n\n localeFamilies[config.parentLocale].push({\n name: name,\n config: config\n });\n return null;\n }\n }\n }\n\n locales[name] = new Locale(mergeConfigs(parentConfig, config));\n\n if (localeFamilies[name]) {\n localeFamilies[name].forEach(function (x) {\n defineLocale(x.name, x.config);\n });\n } // backwards compat for now: also set the locale\n // make sure we set the locale AFTER all child locales have been\n // created, so we won't end up with the child locale set.\n\n\n getSetGlobalLocale(name);\n return locales[name];\n } else {\n // useful for testing\n delete locales[name];\n return null;\n }\n }\n\n function updateLocale(name, config) {\n if (config != null) {\n var locale,\n tmpLocale,\n parentConfig = baseConfig; // MERGE\n\n tmpLocale = loadLocale(name);\n\n if (tmpLocale != null) {\n parentConfig = tmpLocale._config;\n }\n\n config = mergeConfigs(parentConfig, config);\n locale = new Locale(config);\n locale.parentLocale = locales[name];\n locales[name] = locale; // backwards compat for now: also set the locale\n\n getSetGlobalLocale(name);\n } else {\n // pass null for config to unupdate, useful for tests\n if (locales[name] != null) {\n if (locales[name].parentLocale != null) {\n locales[name] = locales[name].parentLocale;\n } else if (locales[name] != null) {\n delete locales[name];\n }\n }\n }\n\n return locales[name];\n } // returns locale data\n\n\n function getLocale(key) {\n var locale;\n\n if (key && key._locale && key._locale._abbr) {\n key = key._locale._abbr;\n }\n\n if (!key) {\n return globalLocale;\n }\n\n if (!isArray(key)) {\n //short-circuit everything else\n locale = loadLocale(key);\n\n if (locale) {\n return locale;\n }\n\n key = [key];\n }\n\n return chooseLocale(key);\n }\n\n function listLocales() {\n return keys(locales);\n }\n\n function checkOverflow(m) {\n var overflow;\n var a = m._a;\n\n if (a && getParsingFlags(m).overflow === -2) {\n overflow = a[MONTH] < 0 || a[MONTH] > 11 ? MONTH : a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH]) ? DATE : a[HOUR] < 0 || a[HOUR] > 24 || a[HOUR] === 24 && (a[MINUTE] !== 0 || a[SECOND] !== 0 || a[MILLISECOND] !== 0) ? HOUR : a[MINUTE] < 0 || a[MINUTE] > 59 ? MINUTE : a[SECOND] < 0 || a[SECOND] > 59 ? SECOND : a[MILLISECOND] < 0 || a[MILLISECOND] > 999 ? MILLISECOND : -1;\n\n if (getParsingFlags(m)._overflowDayOfYear && (overflow < YEAR || overflow > DATE)) {\n overflow = DATE;\n }\n\n if (getParsingFlags(m)._overflowWeeks && overflow === -1) {\n overflow = WEEK;\n }\n\n if (getParsingFlags(m)._overflowWeekday && overflow === -1) {\n overflow = WEEKDAY;\n }\n\n getParsingFlags(m).overflow = overflow;\n }\n\n return m;\n } // Pick the first defined of two or three arguments.\n\n\n function defaults(a, b, c) {\n if (a != null) {\n return a;\n }\n\n if (b != null) {\n return b;\n }\n\n return c;\n }\n\n function currentDateArray(config) {\n // hooks is actually the exported moment object\n var nowValue = new Date(hooks.now());\n\n if (config._useUTC) {\n return [nowValue.getUTCFullYear(), nowValue.getUTCMonth(), nowValue.getUTCDate()];\n }\n\n return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()];\n } // convert an array to a date.\n // the array should mirror the parameters below\n // note: all values past the year are optional and will default to the lowest possible value.\n // [year, month, day , hour, minute, second, millisecond]\n\n\n function configFromArray(config) {\n var i,\n date,\n input = [],\n currentDate,\n expectedWeekday,\n yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config); //compute day of the year from weeks and weekdays\n\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n } //if the day of the year is set, figure out what it is\n\n\n if (config._dayOfYear != null) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse) || config._dayOfYear === 0) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n } // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n\n\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n } // Zero out whatever was not defaulted, including time\n\n\n for (; i < 7; i++) {\n config._a[i] = input[i] = config._a[i] == null ? i === 2 ? 1 : 0 : config._a[i];\n } // Check for 24:00:00.000\n\n\n if (config._a[HOUR] === 24 && config._a[MINUTE] === 0 && config._a[SECOND] === 0 && config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n expectedWeekday = config._useUTC ? config._d.getUTCDay() : config._d.getDay(); // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n } // check for mismatching day of week\n\n\n if (config._w && typeof config._w.d !== 'undefined' && config._w.d !== expectedWeekday) {\n getParsingFlags(config).weekdayMismatch = true;\n }\n }\n\n function dayOfYearFromWeekInfo(config) {\n var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow;\n w = config._w;\n\n if (w.GG != null || w.W != null || w.E != null) {\n dow = 1;\n doy = 4; // TODO: We need to take the current isoWeekYear, but that depends on\n // how we interpret now (local, utc, fixed offset). So create\n // a now version of current config (take local/utc/offset flags, and\n // create now).\n\n weekYear = defaults(w.GG, config._a[YEAR], weekOfYear(createLocal(), 1, 4).year);\n week = defaults(w.W, 1);\n weekday = defaults(w.E, 1);\n\n if (weekday < 1 || weekday > 7) {\n weekdayOverflow = true;\n }\n } else {\n dow = config._locale._week.dow;\n doy = config._locale._week.doy;\n var curWeek = weekOfYear(createLocal(), dow, doy);\n weekYear = defaults(w.gg, config._a[YEAR], curWeek.year); // Default to current week.\n\n week = defaults(w.w, curWeek.week);\n\n if (w.d != null) {\n // weekday -- low day numbers are considered next week\n weekday = w.d;\n\n if (weekday < 0 || weekday > 6) {\n weekdayOverflow = true;\n }\n } else if (w.e != null) {\n // local weekday -- counting starts from beginning of week\n weekday = w.e + dow;\n\n if (w.e < 0 || w.e > 6) {\n weekdayOverflow = true;\n }\n } else {\n // default to beginning of week\n weekday = dow;\n }\n }\n\n if (week < 1 || week > weeksInYear(weekYear, dow, doy)) {\n getParsingFlags(config)._overflowWeeks = true;\n } else if (weekdayOverflow != null) {\n getParsingFlags(config)._overflowWeekday = true;\n } else {\n temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy);\n config._a[YEAR] = temp.year;\n config._dayOfYear = temp.dayOfYear;\n }\n } // iso 8601 regex\n // 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00)\n\n\n var extendedIsoRegex = /^\\s*((?:[+-]\\d{6}|\\d{4})-(?:\\d\\d-\\d\\d|W\\d\\d-\\d|W\\d\\d|\\d\\d\\d|\\d\\d))(?:(T| )(\\d\\d(?::\\d\\d(?::\\d\\d(?:[.,]\\d+)?)?)?)([\\+\\-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/;\n var basicIsoRegex = /^\\s*((?:[+-]\\d{6}|\\d{4})(?:\\d\\d\\d\\d|W\\d\\d\\d|W\\d\\d|\\d\\d\\d|\\d\\d))(?:(T| )(\\d\\d(?:\\d\\d(?:\\d\\d(?:[.,]\\d+)?)?)?)([\\+\\-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/;\n var tzRegex = /Z|[+-]\\d\\d(?::?\\d\\d)?/;\n var isoDates = [['YYYYYY-MM-DD', /[+-]\\d{6}-\\d\\d-\\d\\d/], ['YYYY-MM-DD', /\\d{4}-\\d\\d-\\d\\d/], ['GGGG-[W]WW-E', /\\d{4}-W\\d\\d-\\d/], ['GGGG-[W]WW', /\\d{4}-W\\d\\d/, false], ['YYYY-DDD', /\\d{4}-\\d{3}/], ['YYYY-MM', /\\d{4}-\\d\\d/, false], ['YYYYYYMMDD', /[+-]\\d{10}/], ['YYYYMMDD', /\\d{8}/], // YYYYMM is NOT allowed by the standard\n ['GGGG[W]WWE', /\\d{4}W\\d{3}/], ['GGGG[W]WW', /\\d{4}W\\d{2}/, false], ['YYYYDDD', /\\d{7}/]]; // iso time formats and regexes\n\n var isoTimes = [['HH:mm:ss.SSSS', /\\d\\d:\\d\\d:\\d\\d\\.\\d+/], ['HH:mm:ss,SSSS', /\\d\\d:\\d\\d:\\d\\d,\\d+/], ['HH:mm:ss', /\\d\\d:\\d\\d:\\d\\d/], ['HH:mm', /\\d\\d:\\d\\d/], ['HHmmss.SSSS', /\\d\\d\\d\\d\\d\\d\\.\\d+/], ['HHmmss,SSSS', /\\d\\d\\d\\d\\d\\d,\\d+/], ['HHmmss', /\\d\\d\\d\\d\\d\\d/], ['HHmm', /\\d\\d\\d\\d/], ['HH', /\\d\\d/]];\n var aspNetJsonRegex = /^\\/?Date\\((\\-?\\d+)/i; // date from iso format\n\n function configFromISO(config) {\n var i,\n l,\n string = config._i,\n match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string),\n allowTime,\n dateFormat,\n timeFormat,\n tzFormat;\n\n if (match) {\n getParsingFlags(config).iso = true;\n\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(match[1])) {\n dateFormat = isoDates[i][0];\n allowTime = isoDates[i][2] !== false;\n break;\n }\n }\n\n if (dateFormat == null) {\n config._isValid = false;\n return;\n }\n\n if (match[3]) {\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(match[3])) {\n // match[2] should be 'T' or space\n timeFormat = (match[2] || ' ') + isoTimes[i][0];\n break;\n }\n }\n\n if (timeFormat == null) {\n config._isValid = false;\n return;\n }\n }\n\n if (!allowTime && timeFormat != null) {\n config._isValid = false;\n return;\n }\n\n if (match[4]) {\n if (tzRegex.exec(match[4])) {\n tzFormat = 'Z';\n } else {\n config._isValid = false;\n return;\n }\n }\n\n config._f = dateFormat + (timeFormat || '') + (tzFormat || '');\n configFromStringAndFormat(config);\n } else {\n config._isValid = false;\n }\n } // RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3\n\n\n var rfc2822 = /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\\s)?(\\d{1,2})\\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\\s(\\d{2,4})\\s(\\d\\d):(\\d\\d)(?::(\\d\\d))?\\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\\d{4}))$/;\n\n function extractFromRFC2822Strings(yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr) {\n var result = [untruncateYear(yearStr), defaultLocaleMonthsShort.indexOf(monthStr), parseInt(dayStr, 10), parseInt(hourStr, 10), parseInt(minuteStr, 10)];\n\n if (secondStr) {\n result.push(parseInt(secondStr, 10));\n }\n\n return result;\n }\n\n function untruncateYear(yearStr) {\n var year = parseInt(yearStr, 10);\n\n if (year <= 49) {\n return 2000 + year;\n } else if (year <= 999) {\n return 1900 + year;\n }\n\n return year;\n }\n\n function preprocessRFC2822(s) {\n // Remove comments and folding whitespace and replace multiple-spaces with a single space\n return s.replace(/\\([^)]*\\)|[\\n\\t]/g, ' ').replace(/(\\s\\s+)/g, ' ').replace(/^\\s\\s*/, '').replace(/\\s\\s*$/, '');\n }\n\n function checkWeekday(weekdayStr, parsedInput, config) {\n if (weekdayStr) {\n // TODO: Replace the vanilla JS Date object with an indepentent day-of-week check.\n var weekdayProvided = defaultLocaleWeekdaysShort.indexOf(weekdayStr),\n weekdayActual = new Date(parsedInput[0], parsedInput[1], parsedInput[2]).getDay();\n\n if (weekdayProvided !== weekdayActual) {\n getParsingFlags(config).weekdayMismatch = true;\n config._isValid = false;\n return false;\n }\n }\n\n return true;\n }\n\n var obsOffsets = {\n UT: 0,\n GMT: 0,\n EDT: -4 * 60,\n EST: -5 * 60,\n CDT: -5 * 60,\n CST: -6 * 60,\n MDT: -6 * 60,\n MST: -7 * 60,\n PDT: -7 * 60,\n PST: -8 * 60\n };\n\n function calculateOffset(obsOffset, militaryOffset, numOffset) {\n if (obsOffset) {\n return obsOffsets[obsOffset];\n } else if (militaryOffset) {\n // the only allowed military tz is Z\n return 0;\n } else {\n var hm = parseInt(numOffset, 10);\n var m = hm % 100,\n h = (hm - m) / 100;\n return h * 60 + m;\n }\n } // date and time from ref 2822 format\n\n\n function configFromRFC2822(config) {\n var match = rfc2822.exec(preprocessRFC2822(config._i));\n\n if (match) {\n var parsedArray = extractFromRFC2822Strings(match[4], match[3], match[2], match[5], match[6], match[7]);\n\n if (!checkWeekday(match[1], parsedArray, config)) {\n return;\n }\n\n config._a = parsedArray;\n config._tzm = calculateOffset(match[8], match[9], match[10]);\n config._d = createUTCDate.apply(null, config._a);\n\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n\n getParsingFlags(config).rfc2822 = true;\n } else {\n config._isValid = false;\n }\n } // date from iso format or fallback\n\n\n function configFromString(config) {\n var matched = aspNetJsonRegex.exec(config._i);\n\n if (matched !== null) {\n config._d = new Date(+matched[1]);\n return;\n }\n\n configFromISO(config);\n\n if (config._isValid === false) {\n delete config._isValid;\n } else {\n return;\n }\n\n configFromRFC2822(config);\n\n if (config._isValid === false) {\n delete config._isValid;\n } else {\n return;\n } // Final attempt, use Input Fallback\n\n\n hooks.createFromInputFallback(config);\n }\n\n hooks.createFromInputFallback = deprecate('value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), ' + 'which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are ' + 'discouraged and will be removed in an upcoming major release. Please refer to ' + 'http://momentjs.com/guides/#/warnings/js-date/ for more info.', function (config) {\n config._d = new Date(config._i + (config._useUTC ? ' UTC' : ''));\n }); // constant that refers to the ISO standard\n\n hooks.ISO_8601 = function () {}; // constant that refers to the RFC 2822 form\n\n\n hooks.RFC_2822 = function () {}; // date from string and format string\n\n\n function configFromStringAndFormat(config) {\n // TODO: Move this to another part of the creation flow to prevent circular deps\n if (config._f === hooks.ISO_8601) {\n configFromISO(config);\n return;\n }\n\n if (config._f === hooks.RFC_2822) {\n configFromRFC2822(config);\n return;\n }\n\n config._a = [];\n getParsingFlags(config).empty = true; // This array is used to make a Date, either with `new Date` or `Date.UTC`\n\n var string = '' + config._i,\n i,\n parsedInput,\n tokens,\n token,\n skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0]; // console.log('token', token, 'parsedInput', parsedInput,\n // 'regex', getParseRegexForToken(token, config));\n\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n\n if (skipped.length > 0) {\n getParsingFlags(config).unusedInput.push(skipped);\n }\n\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n } // don't parse if it's not a known token\n\n\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n getParsingFlags(config).empty = false;\n } else {\n getParsingFlags(config).unusedTokens.push(token);\n }\n\n addTimeToArrayFromToken(token, parsedInput, config);\n } else if (config._strict && !parsedInput) {\n getParsingFlags(config).unusedTokens.push(token);\n }\n } // add remaining unparsed input length to the string\n\n\n getParsingFlags(config).charsLeftOver = stringLength - totalParsedInputLength;\n\n if (string.length > 0) {\n getParsingFlags(config).unusedInput.push(string);\n } // clear _12h flag if hour is <= 12\n\n\n if (config._a[HOUR] <= 12 && getParsingFlags(config).bigHour === true && config._a[HOUR] > 0) {\n getParsingFlags(config).bigHour = undefined;\n }\n\n getParsingFlags(config).parsedDateParts = config._a.slice(0);\n getParsingFlags(config).meridiem = config._meridiem; // handle meridiem\n\n config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR], config._meridiem);\n configFromArray(config);\n checkOverflow(config);\n }\n\n function meridiemFixWrap(locale, hour, meridiem) {\n var isPm;\n\n if (meridiem == null) {\n // nothing to do\n return hour;\n }\n\n if (locale.meridiemHour != null) {\n return locale.meridiemHour(hour, meridiem);\n } else if (locale.isPM != null) {\n // Fallback\n isPm = locale.isPM(meridiem);\n\n if (isPm && hour < 12) {\n hour += 12;\n }\n\n if (!isPm && hour === 12) {\n hour = 0;\n }\n\n return hour;\n } else {\n // this is not supposed to happen\n return hour;\n }\n } // date from string and array of format strings\n\n\n function configFromStringAndArray(config) {\n var tempConfig, bestMoment, scoreToBeat, i, currentScore;\n\n if (config._f.length === 0) {\n getParsingFlags(config).invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < config._f.length; i++) {\n currentScore = 0;\n tempConfig = copyConfig({}, config);\n\n if (config._useUTC != null) {\n tempConfig._useUTC = config._useUTC;\n }\n\n tempConfig._f = config._f[i];\n configFromStringAndFormat(tempConfig);\n\n if (!isValid(tempConfig)) {\n continue;\n } // if there is any input that was not parsed add a penalty for that format\n\n\n currentScore += getParsingFlags(tempConfig).charsLeftOver; //or tokens\n\n currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10;\n getParsingFlags(tempConfig).score = currentScore;\n\n if (scoreToBeat == null || currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n\n extend(config, bestMoment || tempConfig);\n }\n\n function configFromObject(config) {\n if (config._d) {\n return;\n }\n\n var i = normalizeObjectUnits(config._i);\n config._a = map([i.year, i.month, i.day || i.date, i.hour, i.minute, i.second, i.millisecond], function (obj) {\n return obj && parseInt(obj, 10);\n });\n configFromArray(config);\n }\n\n function createFromConfig(config) {\n var res = new Moment(checkOverflow(prepareConfig(config)));\n\n if (res._nextDay) {\n // Adding is smart enough around DST\n res.add(1, 'd');\n res._nextDay = undefined;\n }\n\n return res;\n }\n\n function prepareConfig(config) {\n var input = config._i,\n format = config._f;\n config._locale = config._locale || getLocale(config._l);\n\n if (input === null || format === undefined && input === '') {\n return createInvalid({\n nullInput: true\n });\n }\n\n if (typeof input === 'string') {\n config._i = input = config._locale.preparse(input);\n }\n\n if (isMoment(input)) {\n return new Moment(checkOverflow(input));\n } else if (isDate(input)) {\n config._d = input;\n } else if (isArray(format)) {\n configFromStringAndArray(config);\n } else if (format) {\n configFromStringAndFormat(config);\n } else {\n configFromInput(config);\n }\n\n if (!isValid(config)) {\n config._d = null;\n }\n\n return config;\n }\n\n function configFromInput(config) {\n var input = config._i;\n\n if (isUndefined(input)) {\n config._d = new Date(hooks.now());\n } else if (isDate(input)) {\n config._d = new Date(input.valueOf());\n } else if (typeof input === 'string') {\n configFromString(config);\n } else if (isArray(input)) {\n config._a = map(input.slice(0), function (obj) {\n return parseInt(obj, 10);\n });\n configFromArray(config);\n } else if (isObject(input)) {\n configFromObject(config);\n } else if (isNumber(input)) {\n // from milliseconds\n config._d = new Date(input);\n } else {\n hooks.createFromInputFallback(config);\n }\n }\n\n function createLocalOrUTC(input, format, locale, strict, isUTC) {\n var c = {};\n\n if (locale === true || locale === false) {\n strict = locale;\n locale = undefined;\n }\n\n if (isObject(input) && isObjectEmpty(input) || isArray(input) && input.length === 0) {\n input = undefined;\n } // object construction must be done this way.\n // https://github.com/moment/moment/issues/1423\n\n\n c._isAMomentObject = true;\n c._useUTC = c._isUTC = isUTC;\n c._l = locale;\n c._i = input;\n c._f = format;\n c._strict = strict;\n return createFromConfig(c);\n }\n\n function createLocal(input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, false);\n }\n\n var prototypeMin = deprecate('moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/', function () {\n var other = createLocal.apply(null, arguments);\n\n if (this.isValid() && other.isValid()) {\n return other < this ? this : other;\n } else {\n return createInvalid();\n }\n });\n var prototypeMax = deprecate('moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/', function () {\n var other = createLocal.apply(null, arguments);\n\n if (this.isValid() && other.isValid()) {\n return other > this ? this : other;\n } else {\n return createInvalid();\n }\n }); // Pick a moment m from moments so that m[fn](other) is true for all\n // other. This relies on the function fn to be transitive.\n //\n // moments should either be an array of moment objects or an array, whose\n // first element is an array of moment objects.\n\n function pickBy(fn, moments) {\n var res, i;\n\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n\n if (!moments.length) {\n return createLocal();\n }\n\n res = moments[0];\n\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n\n return res;\n } // TODO: Use [].sort instead?\n\n\n function min() {\n var args = [].slice.call(arguments, 0);\n return pickBy('isBefore', args);\n }\n\n function max() {\n var args = [].slice.call(arguments, 0);\n return pickBy('isAfter', args);\n }\n\n var now = function () {\n return Date.now ? Date.now() : +new Date();\n };\n\n var ordering = ['year', 'quarter', 'month', 'week', 'day', 'hour', 'minute', 'second', 'millisecond'];\n\n function isDurationValid(m) {\n for (var key in m) {\n if (!(indexOf.call(ordering, key) !== -1 && (m[key] == null || !isNaN(m[key])))) {\n return false;\n }\n }\n\n var unitHasDecimal = false;\n\n for (var i = 0; i < ordering.length; ++i) {\n if (m[ordering[i]]) {\n if (unitHasDecimal) {\n return false; // only allow non-integers for smallest unit\n }\n\n if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) {\n unitHasDecimal = true;\n }\n }\n }\n\n return true;\n }\n\n function isValid$1() {\n return this._isValid;\n }\n\n function createInvalid$1() {\n return createDuration(NaN);\n }\n\n function Duration(duration) {\n var normalizedInput = normalizeObjectUnits(duration),\n years = normalizedInput.year || 0,\n quarters = normalizedInput.quarter || 0,\n months = normalizedInput.month || 0,\n weeks = normalizedInput.week || normalizedInput.isoWeek || 0,\n days = normalizedInput.day || 0,\n hours = normalizedInput.hour || 0,\n minutes = normalizedInput.minute || 0,\n seconds = normalizedInput.second || 0,\n milliseconds = normalizedInput.millisecond || 0;\n this._isValid = isDurationValid(normalizedInput); // representation for dateAddRemove\n\n this._milliseconds = +milliseconds + seconds * 1e3 + // 1000\n minutes * 6e4 + // 1000 * 60\n hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978\n // Because of dateAddRemove treats 24 hours as different from a\n // day when working around DST, we need to store them separately\n\n this._days = +days + weeks * 7; // It is impossible to translate months into days without knowing\n // which months you are are talking about, so we have to store\n // it separately.\n\n this._months = +months + quarters * 3 + years * 12;\n this._data = {};\n this._locale = getLocale();\n\n this._bubble();\n }\n\n function isDuration(obj) {\n return obj instanceof Duration;\n }\n\n function absRound(number) {\n if (number < 0) {\n return Math.round(-1 * number) * -1;\n } else {\n return Math.round(number);\n }\n } // FORMATTING\n\n\n function offset(token, separator) {\n addFormatToken(token, 0, 0, function () {\n var offset = this.utcOffset();\n var sign = '+';\n\n if (offset < 0) {\n offset = -offset;\n sign = '-';\n }\n\n return sign + zeroFill(~~(offset / 60), 2) + separator + zeroFill(~~offset % 60, 2);\n });\n }\n\n offset('Z', ':');\n offset('ZZ', ''); // PARSING\n\n addRegexToken('Z', matchShortOffset);\n addRegexToken('ZZ', matchShortOffset);\n addParseToken(['Z', 'ZZ'], function (input, array, config) {\n config._useUTC = true;\n config._tzm = offsetFromString(matchShortOffset, input);\n }); // HELPERS\n // timezone chunker\n // '+10:00' > ['10', '00']\n // '-1530' > ['-15', '30']\n\n var chunkOffset = /([\\+\\-]|\\d\\d)/gi;\n\n function offsetFromString(matcher, string) {\n var matches = (string || '').match(matcher);\n\n if (matches === null) {\n return null;\n }\n\n var chunk = matches[matches.length - 1] || [];\n var parts = (chunk + '').match(chunkOffset) || ['-', 0, 0];\n var minutes = +(parts[1] * 60) + toInt(parts[2]);\n return minutes === 0 ? 0 : parts[0] === '+' ? minutes : -minutes;\n } // Return a moment from input, that is local/utc/zone equivalent to model.\n\n\n function cloneWithOffset(input, model) {\n var res, diff;\n\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? input.valueOf() : createLocal(input).valueOf()) - res.valueOf(); // Use low-level api, because this fn is low-level api.\n\n res._d.setTime(res._d.valueOf() + diff);\n\n hooks.updateOffset(res, false);\n return res;\n } else {\n return createLocal(input).local();\n }\n }\n\n function getDateOffset(m) {\n // On Firefox.24 Date#getTimezoneOffset returns a floating point.\n // https://github.com/moment/moment/pull/1871\n return -Math.round(m._d.getTimezoneOffset() / 15) * 15;\n } // HOOKS\n // This function will be called whenever a moment is mutated.\n // It is intended to keep the offset in sync with the timezone.\n\n\n hooks.updateOffset = function () {}; // MOMENTS\n // keepLocalTime = true means only change the timezone, without\n // affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]-->\n // 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset\n // +0200, so we adjust the time as needed, to be valid.\n //\n // Keeping the time actually adds/subtracts (one hour)\n // from the actual represented time. That is why we call updateOffset\n // a second time. In case it wants us to change the offset again\n // _changeInProgress == true case, then we have to adjust, because\n // there is no such time in the given timezone.\n\n\n function getSetOffset(input, keepLocalTime, keepMinutes) {\n var offset = this._offset || 0,\n localAdjust;\n\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n\n if (input === null) {\n return this;\n }\n } else if (Math.abs(input) < 16 && !keepMinutes) {\n input = input * 60;\n }\n\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n\n this._offset = input;\n this._isUTC = true;\n\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n addSubtract(this, createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }\n\n function getSetZone(input, keepLocalTime) {\n if (input != null) {\n if (typeof input !== 'string') {\n input = -input;\n }\n\n this.utcOffset(input, keepLocalTime);\n return this;\n } else {\n return -this.utcOffset();\n }\n }\n\n function setOffsetToUTC(keepLocalTime) {\n return this.utcOffset(0, keepLocalTime);\n }\n\n function setOffsetToLocal(keepLocalTime) {\n if (this._isUTC) {\n this.utcOffset(0, keepLocalTime);\n this._isUTC = false;\n\n if (keepLocalTime) {\n this.subtract(getDateOffset(this), 'm');\n }\n }\n\n return this;\n }\n\n function setOffsetToParsedOffset() {\n if (this._tzm != null) {\n this.utcOffset(this._tzm, false, true);\n } else if (typeof this._i === 'string') {\n var tZone = offsetFromString(matchOffset, this._i);\n\n if (tZone != null) {\n this.utcOffset(tZone);\n } else {\n this.utcOffset(0, true);\n }\n }\n\n return this;\n }\n\n function hasAlignedHourOffset(input) {\n if (!this.isValid()) {\n return false;\n }\n\n input = input ? createLocal(input).utcOffset() : 0;\n return (this.utcOffset() - input) % 60 === 0;\n }\n\n function isDaylightSavingTime() {\n return this.utcOffset() > this.clone().month(0).utcOffset() || this.utcOffset() > this.clone().month(5).utcOffset();\n }\n\n function isDaylightSavingTimeShifted() {\n if (!isUndefined(this._isDSTShifted)) {\n return this._isDSTShifted;\n }\n\n var c = {};\n copyConfig(c, this);\n c = prepareConfig(c);\n\n if (c._a) {\n var other = c._isUTC ? createUTC(c._a) : createLocal(c._a);\n this._isDSTShifted = this.isValid() && compareArrays(c._a, other.toArray()) > 0;\n } else {\n this._isDSTShifted = false;\n }\n\n return this._isDSTShifted;\n }\n\n function isLocal() {\n return this.isValid() ? !this._isUTC : false;\n }\n\n function isUtcOffset() {\n return this.isValid() ? this._isUTC : false;\n }\n\n function isUtc() {\n return this.isValid() ? this._isUTC && this._offset === 0 : false;\n } // ASP.NET json date format regex\n\n\n var aspNetRegex = /^(\\-|\\+)?(?:(\\d*)[. ])?(\\d+)\\:(\\d+)(?:\\:(\\d+)(\\.\\d*)?)?$/; // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html\n // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere\n // and further modified to allow for strings containing both week and day\n\n var isoRegex = /^(-|\\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;\n\n function createDuration(input, key) {\n var duration = input,\n // matching against regexp is expensive, do it on demand\n match = null,\n sign,\n ret,\n diffRes;\n\n if (isDuration(input)) {\n duration = {\n ms: input._milliseconds,\n d: input._days,\n M: input._months\n };\n } else if (isNumber(input)) {\n duration = {};\n\n if (key) {\n duration[key] = input;\n } else {\n duration.milliseconds = input;\n }\n } else if (!!(match = aspNetRegex.exec(input))) {\n sign = match[1] === '-' ? -1 : 1;\n duration = {\n y: 0,\n d: toInt(match[DATE]) * sign,\n h: toInt(match[HOUR]) * sign,\n m: toInt(match[MINUTE]) * sign,\n s: toInt(match[SECOND]) * sign,\n ms: toInt(absRound(match[MILLISECOND] * 1000)) * sign // the millisecond decimal point is included in the match\n\n };\n } else if (!!(match = isoRegex.exec(input))) {\n sign = match[1] === '-' ? -1 : 1;\n duration = {\n y: parseIso(match[2], sign),\n M: parseIso(match[3], sign),\n w: parseIso(match[4], sign),\n d: parseIso(match[5], sign),\n h: parseIso(match[6], sign),\n m: parseIso(match[7], sign),\n s: parseIso(match[8], sign)\n };\n } else if (duration == null) {\n // checks for null or undefined\n duration = {};\n } else if (typeof duration === 'object' && ('from' in duration || 'to' in duration)) {\n diffRes = momentsDifference(createLocal(duration.from), createLocal(duration.to));\n duration = {};\n duration.ms = diffRes.milliseconds;\n duration.M = diffRes.months;\n }\n\n ret = new Duration(duration);\n\n if (isDuration(input) && hasOwnProp(input, '_locale')) {\n ret._locale = input._locale;\n }\n\n return ret;\n }\n\n createDuration.fn = Duration.prototype;\n createDuration.invalid = createInvalid$1;\n\n function parseIso(inp, sign) {\n // We'd normally use ~~inp for this, but unfortunately it also\n // converts floats to ints.\n // inp may be undefined, so careful calling replace on it.\n var res = inp && parseFloat(inp.replace(',', '.')); // apply sign while we're at it\n\n return (isNaN(res) ? 0 : res) * sign;\n }\n\n function positiveMomentsDifference(base, other) {\n var res = {};\n res.months = other.month() - base.month() + (other.year() - base.year()) * 12;\n\n if (base.clone().add(res.months, 'M').isAfter(other)) {\n --res.months;\n }\n\n res.milliseconds = +other - +base.clone().add(res.months, 'M');\n return res;\n }\n\n function momentsDifference(base, other) {\n var res;\n\n if (!(base.isValid() && other.isValid())) {\n return {\n milliseconds: 0,\n months: 0\n };\n }\n\n other = cloneWithOffset(other, base);\n\n if (base.isBefore(other)) {\n res = positiveMomentsDifference(base, other);\n } else {\n res = positiveMomentsDifference(other, base);\n res.milliseconds = -res.milliseconds;\n res.months = -res.months;\n }\n\n return res;\n } // TODO: remove 'name' arg after deprecation is removed\n\n\n function createAdder(direction, name) {\n return function (val, period) {\n var dur, tmp; //invert the arguments, but complain about it\n\n if (period !== null && !isNaN(+period)) {\n deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' + 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.');\n tmp = val;\n val = period;\n period = tmp;\n }\n\n val = typeof val === 'string' ? +val : val;\n dur = createDuration(val, period);\n addSubtract(this, dur, direction);\n return this;\n };\n }\n\n function addSubtract(mom, duration, isAdding, updateOffset) {\n var milliseconds = duration._milliseconds,\n days = absRound(duration._days),\n months = absRound(duration._months);\n\n if (!mom.isValid()) {\n // No op\n return;\n }\n\n updateOffset = updateOffset == null ? true : updateOffset;\n\n if (months) {\n setMonth(mom, get(mom, 'Month') + months * isAdding);\n }\n\n if (days) {\n set$1(mom, 'Date', get(mom, 'Date') + days * isAdding);\n }\n\n if (milliseconds) {\n mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding);\n }\n\n if (updateOffset) {\n hooks.updateOffset(mom, days || months);\n }\n }\n\n var add = createAdder(1, 'add');\n var subtract = createAdder(-1, 'subtract');\n\n function getCalendarFormat(myMoment, now) {\n var diff = myMoment.diff(now, 'days', true);\n return diff < -6 ? 'sameElse' : diff < -1 ? 'lastWeek' : diff < 0 ? 'lastDay' : diff < 1 ? 'sameDay' : diff < 2 ? 'nextDay' : diff < 7 ? 'nextWeek' : 'sameElse';\n }\n\n function calendar$1(time, formats) {\n // We want to compare the start of today, vs this.\n // Getting start-of-today depends on whether we're local/utc/offset or not.\n var now = time || createLocal(),\n sod = cloneWithOffset(now, this).startOf('day'),\n format = hooks.calendarFormat(this, sod) || 'sameElse';\n var output = formats && (isFunction(formats[format]) ? formats[format].call(this, now) : formats[format]);\n return this.format(output || this.localeData().calendar(format, this, createLocal(now)));\n }\n\n function clone() {\n return new Moment(this);\n }\n\n function isAfter(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input);\n\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n\n units = normalizeUnits(units) || 'millisecond';\n\n if (units === 'millisecond') {\n return this.valueOf() > localInput.valueOf();\n } else {\n return localInput.valueOf() < this.clone().startOf(units).valueOf();\n }\n }\n\n function isBefore(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input);\n\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n\n units = normalizeUnits(units) || 'millisecond';\n\n if (units === 'millisecond') {\n return this.valueOf() < localInput.valueOf();\n } else {\n return this.clone().endOf(units).valueOf() < localInput.valueOf();\n }\n }\n\n function isBetween(from, to, units, inclusivity) {\n var localFrom = isMoment(from) ? from : createLocal(from),\n localTo = isMoment(to) ? to : createLocal(to);\n\n if (!(this.isValid() && localFrom.isValid() && localTo.isValid())) {\n return false;\n }\n\n inclusivity = inclusivity || '()';\n return (inclusivity[0] === '(' ? this.isAfter(localFrom, units) : !this.isBefore(localFrom, units)) && (inclusivity[1] === ')' ? this.isBefore(localTo, units) : !this.isAfter(localTo, units));\n }\n\n function isSame(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input),\n inputMs;\n\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n\n units = normalizeUnits(units) || 'millisecond';\n\n if (units === 'millisecond') {\n return this.valueOf() === localInput.valueOf();\n } else {\n inputMs = localInput.valueOf();\n return this.clone().startOf(units).valueOf() <= inputMs && inputMs <= this.clone().endOf(units).valueOf();\n }\n }\n\n function isSameOrAfter(input, units) {\n return this.isSame(input, units) || this.isAfter(input, units);\n }\n\n function isSameOrBefore(input, units) {\n return this.isSame(input, units) || this.isBefore(input, units);\n }\n\n function diff(input, units, asFloat) {\n var that, zoneDelta, output;\n\n if (!this.isValid()) {\n return NaN;\n }\n\n that = cloneWithOffset(input, this);\n\n if (!that.isValid()) {\n return NaN;\n }\n\n zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4;\n units = normalizeUnits(units);\n\n switch (units) {\n case 'year':\n output = monthDiff(this, that) / 12;\n break;\n\n case 'month':\n output = monthDiff(this, that);\n break;\n\n case 'quarter':\n output = monthDiff(this, that) / 3;\n break;\n\n case 'second':\n output = (this - that) / 1e3;\n break;\n // 1000\n\n case 'minute':\n output = (this - that) / 6e4;\n break;\n // 1000 * 60\n\n case 'hour':\n output = (this - that) / 36e5;\n break;\n // 1000 * 60 * 60\n\n case 'day':\n output = (this - that - zoneDelta) / 864e5;\n break;\n // 1000 * 60 * 60 * 24, negate dst\n\n case 'week':\n output = (this - that - zoneDelta) / 6048e5;\n break;\n // 1000 * 60 * 60 * 24 * 7, negate dst\n\n default:\n output = this - that;\n }\n\n return asFloat ? output : absFloor(output);\n }\n\n function monthDiff(a, b) {\n // difference in months\n var wholeMonthDiff = (b.year() - a.year()) * 12 + (b.month() - a.month()),\n // b is in (anchor - 1 month, anchor + 1 month)\n anchor = a.clone().add(wholeMonthDiff, 'months'),\n anchor2,\n adjust;\n\n if (b - anchor < 0) {\n anchor2 = a.clone().add(wholeMonthDiff - 1, 'months'); // linear across the month\n\n adjust = (b - anchor) / (anchor - anchor2);\n } else {\n anchor2 = a.clone().add(wholeMonthDiff + 1, 'months'); // linear across the month\n\n adjust = (b - anchor) / (anchor2 - anchor);\n } //check for negative zero, return zero if negative zero\n\n\n return -(wholeMonthDiff + adjust) || 0;\n }\n\n hooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ';\n hooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]';\n\n function toString() {\n return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ');\n }\n\n function toISOString(keepOffset) {\n if (!this.isValid()) {\n return null;\n }\n\n var utc = keepOffset !== true;\n var m = utc ? this.clone().utc() : this;\n\n if (m.year() < 0 || m.year() > 9999) {\n return formatMoment(m, utc ? 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYYYY-MM-DD[T]HH:mm:ss.SSSZ');\n }\n\n if (isFunction(Date.prototype.toISOString)) {\n // native implementation is ~50x faster, use it when we can\n if (utc) {\n return this.toDate().toISOString();\n } else {\n return new Date(this.valueOf() + this.utcOffset() * 60 * 1000).toISOString().replace('Z', formatMoment(m, 'Z'));\n }\n }\n\n return formatMoment(m, utc ? 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYY-MM-DD[T]HH:mm:ss.SSSZ');\n }\n /**\n * Return a human readable representation of a moment that can\n * also be evaluated to get a new moment which is the same\n *\n * @link https://nodejs.org/dist/latest/docs/api/util.html#util_custom_inspect_function_on_objects\n */\n\n\n function inspect() {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n\n var func = 'moment';\n var zone = '';\n\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n\n var prefix = '[' + func + '(\"]';\n var year = 0 <= this.year() && this.year() <= 9999 ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n return this.format(prefix + year + datetime + suffix);\n }\n\n function format(inputString) {\n if (!inputString) {\n inputString = this.isUtc() ? hooks.defaultFormatUtc : hooks.defaultFormat;\n }\n\n var output = formatMoment(this, inputString);\n return this.localeData().postformat(output);\n }\n\n function from(time, withoutSuffix) {\n if (this.isValid() && (isMoment(time) && time.isValid() || createLocal(time).isValid())) {\n return createDuration({\n to: this,\n from: time\n }).locale(this.locale()).humanize(!withoutSuffix);\n } else {\n return this.localeData().invalidDate();\n }\n }\n\n function fromNow(withoutSuffix) {\n return this.from(createLocal(), withoutSuffix);\n }\n\n function to(time, withoutSuffix) {\n if (this.isValid() && (isMoment(time) && time.isValid() || createLocal(time).isValid())) {\n return createDuration({\n from: this,\n to: time\n }).locale(this.locale()).humanize(!withoutSuffix);\n } else {\n return this.localeData().invalidDate();\n }\n }\n\n function toNow(withoutSuffix) {\n return this.to(createLocal(), withoutSuffix);\n } // If passed a locale key, it will set the locale for this\n // instance. Otherwise, it will return the locale configuration\n // variables for this instance.\n\n\n function locale(key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n\n return this;\n }\n }\n\n var lang = deprecate('moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.', function (key) {\n if (key === undefined) {\n return this.localeData();\n } else {\n return this.locale(key);\n }\n });\n\n function localeData() {\n return this._locale;\n }\n\n var MS_PER_SECOND = 1000;\n var MS_PER_MINUTE = 60 * MS_PER_SECOND;\n var MS_PER_HOUR = 60 * MS_PER_MINUTE;\n var MS_PER_400_YEARS = (365 * 400 + 97) * 24 * MS_PER_HOUR; // actual modulo - handles negative numbers (for dates before 1970):\n\n function mod$1(dividend, divisor) {\n return (dividend % divisor + divisor) % divisor;\n }\n\n function localStartOfDate(y, m, d) {\n // the date constructor remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n return new Date(y + 400, m, d) - MS_PER_400_YEARS;\n } else {\n return new Date(y, m, d).valueOf();\n }\n }\n\n function utcStartOfDate(y, m, d) {\n // Date.UTC remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n return Date.UTC(y + 400, m, d) - MS_PER_400_YEARS;\n } else {\n return Date.UTC(y, m, d);\n }\n }\n\n function startOf(units) {\n var time;\n units = normalizeUnits(units);\n\n if (units === undefined || units === 'millisecond' || !this.isValid()) {\n return this;\n }\n\n var startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;\n\n switch (units) {\n case 'year':\n time = startOfDate(this.year(), 0, 1);\n break;\n\n case 'quarter':\n time = startOfDate(this.year(), this.month() - this.month() % 3, 1);\n break;\n\n case 'month':\n time = startOfDate(this.year(), this.month(), 1);\n break;\n\n case 'week':\n time = startOfDate(this.year(), this.month(), this.date() - this.weekday());\n break;\n\n case 'isoWeek':\n time = startOfDate(this.year(), this.month(), this.date() - (this.isoWeekday() - 1));\n break;\n\n case 'day':\n case 'date':\n time = startOfDate(this.year(), this.month(), this.date());\n break;\n\n case 'hour':\n time = this._d.valueOf();\n time -= mod$1(time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE), MS_PER_HOUR);\n break;\n\n case 'minute':\n time = this._d.valueOf();\n time -= mod$1(time, MS_PER_MINUTE);\n break;\n\n case 'second':\n time = this._d.valueOf();\n time -= mod$1(time, MS_PER_SECOND);\n break;\n }\n\n this._d.setTime(time);\n\n hooks.updateOffset(this, true);\n return this;\n }\n\n function endOf(units) {\n var time;\n units = normalizeUnits(units);\n\n if (units === undefined || units === 'millisecond' || !this.isValid()) {\n return this;\n }\n\n var startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;\n\n switch (units) {\n case 'year':\n time = startOfDate(this.year() + 1, 0, 1) - 1;\n break;\n\n case 'quarter':\n time = startOfDate(this.year(), this.month() - this.month() % 3 + 3, 1) - 1;\n break;\n\n case 'month':\n time = startOfDate(this.year(), this.month() + 1, 1) - 1;\n break;\n\n case 'week':\n time = startOfDate(this.year(), this.month(), this.date() - this.weekday() + 7) - 1;\n break;\n\n case 'isoWeek':\n time = startOfDate(this.year(), this.month(), this.date() - (this.isoWeekday() - 1) + 7) - 1;\n break;\n\n case 'day':\n case 'date':\n time = startOfDate(this.year(), this.month(), this.date() + 1) - 1;\n break;\n\n case 'hour':\n time = this._d.valueOf();\n time += MS_PER_HOUR - mod$1(time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE), MS_PER_HOUR) - 1;\n break;\n\n case 'minute':\n time = this._d.valueOf();\n time += MS_PER_MINUTE - mod$1(time, MS_PER_MINUTE) - 1;\n break;\n\n case 'second':\n time = this._d.valueOf();\n time += MS_PER_SECOND - mod$1(time, MS_PER_SECOND) - 1;\n break;\n }\n\n this._d.setTime(time);\n\n hooks.updateOffset(this, true);\n return this;\n }\n\n function valueOf() {\n return this._d.valueOf() - (this._offset || 0) * 60000;\n }\n\n function unix() {\n return Math.floor(this.valueOf() / 1000);\n }\n\n function toDate() {\n return new Date(this.valueOf());\n }\n\n function toArray() {\n var m = this;\n return [m.year(), m.month(), m.date(), m.hour(), m.minute(), m.second(), m.millisecond()];\n }\n\n function toObject() {\n var m = this;\n return {\n years: m.year(),\n months: m.month(),\n date: m.date(),\n hours: m.hours(),\n minutes: m.minutes(),\n seconds: m.seconds(),\n milliseconds: m.milliseconds()\n };\n }\n\n function toJSON() {\n // new Date(NaN).toJSON() === null\n return this.isValid() ? this.toISOString() : null;\n }\n\n function isValid$2() {\n return isValid(this);\n }\n\n function parsingFlags() {\n return extend({}, getParsingFlags(this));\n }\n\n function invalidAt() {\n return getParsingFlags(this).overflow;\n }\n\n function creationData() {\n return {\n input: this._i,\n format: this._f,\n locale: this._locale,\n isUTC: this._isUTC,\n strict: this._strict\n };\n } // FORMATTING\n\n\n addFormatToken(0, ['gg', 2], 0, function () {\n return this.weekYear() % 100;\n });\n addFormatToken(0, ['GG', 2], 0, function () {\n return this.isoWeekYear() % 100;\n });\n\n function addWeekYearFormatToken(token, getter) {\n addFormatToken(0, [token, token.length], 0, getter);\n }\n\n addWeekYearFormatToken('gggg', 'weekYear');\n addWeekYearFormatToken('ggggg', 'weekYear');\n addWeekYearFormatToken('GGGG', 'isoWeekYear');\n addWeekYearFormatToken('GGGGG', 'isoWeekYear'); // ALIASES\n\n addUnitAlias('weekYear', 'gg');\n addUnitAlias('isoWeekYear', 'GG'); // PRIORITY\n\n addUnitPriority('weekYear', 1);\n addUnitPriority('isoWeekYear', 1); // PARSING\n\n addRegexToken('G', matchSigned);\n addRegexToken('g', matchSigned);\n addRegexToken('GG', match1to2, match2);\n addRegexToken('gg', match1to2, match2);\n addRegexToken('GGGG', match1to4, match4);\n addRegexToken('gggg', match1to4, match4);\n addRegexToken('GGGGG', match1to6, match6);\n addRegexToken('ggggg', match1to6, match6);\n addWeekParseToken(['gggg', 'ggggg', 'GGGG', 'GGGGG'], function (input, week, config, token) {\n week[token.substr(0, 2)] = toInt(input);\n });\n addWeekParseToken(['gg', 'GG'], function (input, week, config, token) {\n week[token] = hooks.parseTwoDigitYear(input);\n }); // MOMENTS\n\n function getSetWeekYear(input) {\n return getSetWeekYearHelper.call(this, input, this.week(), this.weekday(), this.localeData()._week.dow, this.localeData()._week.doy);\n }\n\n function getSetISOWeekYear(input) {\n return getSetWeekYearHelper.call(this, input, this.isoWeek(), this.isoWeekday(), 1, 4);\n }\n\n function getISOWeeksInYear() {\n return weeksInYear(this.year(), 1, 4);\n }\n\n function getWeeksInYear() {\n var weekInfo = this.localeData()._week;\n\n return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy);\n }\n\n function getSetWeekYearHelper(input, week, weekday, dow, doy) {\n var weeksTarget;\n\n if (input == null) {\n return weekOfYear(this, dow, doy).year;\n } else {\n weeksTarget = weeksInYear(input, dow, doy);\n\n if (week > weeksTarget) {\n week = weeksTarget;\n }\n\n return setWeekAll.call(this, input, week, weekday, dow, doy);\n }\n }\n\n function setWeekAll(weekYear, week, weekday, dow, doy) {\n var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy),\n date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear);\n this.year(date.getUTCFullYear());\n this.month(date.getUTCMonth());\n this.date(date.getUTCDate());\n return this;\n } // FORMATTING\n\n\n addFormatToken('Q', 0, 'Qo', 'quarter'); // ALIASES\n\n addUnitAlias('quarter', 'Q'); // PRIORITY\n\n addUnitPriority('quarter', 7); // PARSING\n\n addRegexToken('Q', match1);\n addParseToken('Q', function (input, array) {\n array[MONTH] = (toInt(input) - 1) * 3;\n }); // MOMENTS\n\n function getSetQuarter(input) {\n return input == null ? Math.ceil((this.month() + 1) / 3) : this.month((input - 1) * 3 + this.month() % 3);\n } // FORMATTING\n\n\n addFormatToken('D', ['DD', 2], 'Do', 'date'); // ALIASES\n\n addUnitAlias('date', 'D'); // PRIORITY\n\n addUnitPriority('date', 9); // PARSING\n\n addRegexToken('D', match1to2);\n addRegexToken('DD', match1to2, match2);\n addRegexToken('Do', function (isStrict, locale) {\n // TODO: Remove \"ordinalParse\" fallback in next major release.\n return isStrict ? locale._dayOfMonthOrdinalParse || locale._ordinalParse : locale._dayOfMonthOrdinalParseLenient;\n });\n addParseToken(['D', 'DD'], DATE);\n addParseToken('Do', function (input, array) {\n array[DATE] = toInt(input.match(match1to2)[0]);\n }); // MOMENTS\n\n var getSetDayOfMonth = makeGetSet('Date', true); // FORMATTING\n\n addFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear'); // ALIASES\n\n addUnitAlias('dayOfYear', 'DDD'); // PRIORITY\n\n addUnitPriority('dayOfYear', 4); // PARSING\n\n addRegexToken('DDD', match1to3);\n addRegexToken('DDDD', match3);\n addParseToken(['DDD', 'DDDD'], function (input, array, config) {\n config._dayOfYear = toInt(input);\n }); // HELPERS\n // MOMENTS\n\n function getSetDayOfYear(input) {\n var dayOfYear = Math.round((this.clone().startOf('day') - this.clone().startOf('year')) / 864e5) + 1;\n return input == null ? dayOfYear : this.add(input - dayOfYear, 'd');\n } // FORMATTING\n\n\n addFormatToken('m', ['mm', 2], 0, 'minute'); // ALIASES\n\n addUnitAlias('minute', 'm'); // PRIORITY\n\n addUnitPriority('minute', 14); // PARSING\n\n addRegexToken('m', match1to2);\n addRegexToken('mm', match1to2, match2);\n addParseToken(['m', 'mm'], MINUTE); // MOMENTS\n\n var getSetMinute = makeGetSet('Minutes', false); // FORMATTING\n\n addFormatToken('s', ['ss', 2], 0, 'second'); // ALIASES\n\n addUnitAlias('second', 's'); // PRIORITY\n\n addUnitPriority('second', 15); // PARSING\n\n addRegexToken('s', match1to2);\n addRegexToken('ss', match1to2, match2);\n addParseToken(['s', 'ss'], SECOND); // MOMENTS\n\n var getSetSecond = makeGetSet('Seconds', false); // FORMATTING\n\n addFormatToken('S', 0, 0, function () {\n return ~~(this.millisecond() / 100);\n });\n addFormatToken(0, ['SS', 2], 0, function () {\n return ~~(this.millisecond() / 10);\n });\n addFormatToken(0, ['SSS', 3], 0, 'millisecond');\n addFormatToken(0, ['SSSS', 4], 0, function () {\n return this.millisecond() * 10;\n });\n addFormatToken(0, ['SSSSS', 5], 0, function () {\n return this.millisecond() * 100;\n });\n addFormatToken(0, ['SSSSSS', 6], 0, function () {\n return this.millisecond() * 1000;\n });\n addFormatToken(0, ['SSSSSSS', 7], 0, function () {\n return this.millisecond() * 10000;\n });\n addFormatToken(0, ['SSSSSSSS', 8], 0, function () {\n return this.millisecond() * 100000;\n });\n addFormatToken(0, ['SSSSSSSSS', 9], 0, function () {\n return this.millisecond() * 1000000;\n }); // ALIASES\n\n addUnitAlias('millisecond', 'ms'); // PRIORITY\n\n addUnitPriority('millisecond', 16); // PARSING\n\n addRegexToken('S', match1to3, match1);\n addRegexToken('SS', match1to3, match2);\n addRegexToken('SSS', match1to3, match3);\n var token;\n\n for (token = 'SSSS'; token.length <= 9; token += 'S') {\n addRegexToken(token, matchUnsigned);\n }\n\n function parseMs(input, array) {\n array[MILLISECOND] = toInt(('0.' + input) * 1000);\n }\n\n for (token = 'S'; token.length <= 9; token += 'S') {\n addParseToken(token, parseMs);\n } // MOMENTS\n\n\n var getSetMillisecond = makeGetSet('Milliseconds', false); // FORMATTING\n\n addFormatToken('z', 0, 0, 'zoneAbbr');\n addFormatToken('zz', 0, 0, 'zoneName'); // MOMENTS\n\n function getZoneAbbr() {\n return this._isUTC ? 'UTC' : '';\n }\n\n function getZoneName() {\n return this._isUTC ? 'Coordinated Universal Time' : '';\n }\n\n var proto = Moment.prototype;\n proto.add = add;\n proto.calendar = calendar$1;\n proto.clone = clone;\n proto.diff = diff;\n proto.endOf = endOf;\n proto.format = format;\n proto.from = from;\n proto.fromNow = fromNow;\n proto.to = to;\n proto.toNow = toNow;\n proto.get = stringGet;\n proto.invalidAt = invalidAt;\n proto.isAfter = isAfter;\n proto.isBefore = isBefore;\n proto.isBetween = isBetween;\n proto.isSame = isSame;\n proto.isSameOrAfter = isSameOrAfter;\n proto.isSameOrBefore = isSameOrBefore;\n proto.isValid = isValid$2;\n proto.lang = lang;\n proto.locale = locale;\n proto.localeData = localeData;\n proto.max = prototypeMax;\n proto.min = prototypeMin;\n proto.parsingFlags = parsingFlags;\n proto.set = stringSet;\n proto.startOf = startOf;\n proto.subtract = subtract;\n proto.toArray = toArray;\n proto.toObject = toObject;\n proto.toDate = toDate;\n proto.toISOString = toISOString;\n proto.inspect = inspect;\n proto.toJSON = toJSON;\n proto.toString = toString;\n proto.unix = unix;\n proto.valueOf = valueOf;\n proto.creationData = creationData;\n proto.year = getSetYear;\n proto.isLeapYear = getIsLeapYear;\n proto.weekYear = getSetWeekYear;\n proto.isoWeekYear = getSetISOWeekYear;\n proto.quarter = proto.quarters = getSetQuarter;\n proto.month = getSetMonth;\n proto.daysInMonth = getDaysInMonth;\n proto.week = proto.weeks = getSetWeek;\n proto.isoWeek = proto.isoWeeks = getSetISOWeek;\n proto.weeksInYear = getWeeksInYear;\n proto.isoWeeksInYear = getISOWeeksInYear;\n proto.date = getSetDayOfMonth;\n proto.day = proto.days = getSetDayOfWeek;\n proto.weekday = getSetLocaleDayOfWeek;\n proto.isoWeekday = getSetISODayOfWeek;\n proto.dayOfYear = getSetDayOfYear;\n proto.hour = proto.hours = getSetHour;\n proto.minute = proto.minutes = getSetMinute;\n proto.second = proto.seconds = getSetSecond;\n proto.millisecond = proto.milliseconds = getSetMillisecond;\n proto.utcOffset = getSetOffset;\n proto.utc = setOffsetToUTC;\n proto.local = setOffsetToLocal;\n proto.parseZone = setOffsetToParsedOffset;\n proto.hasAlignedHourOffset = hasAlignedHourOffset;\n proto.isDST = isDaylightSavingTime;\n proto.isLocal = isLocal;\n proto.isUtcOffset = isUtcOffset;\n proto.isUtc = isUtc;\n proto.isUTC = isUtc;\n proto.zoneAbbr = getZoneAbbr;\n proto.zoneName = getZoneName;\n proto.dates = deprecate('dates accessor is deprecated. Use date instead.', getSetDayOfMonth);\n proto.months = deprecate('months accessor is deprecated. Use month instead', getSetMonth);\n proto.years = deprecate('years accessor is deprecated. Use year instead', getSetYear);\n proto.zone = deprecate('moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/', getSetZone);\n proto.isDSTShifted = deprecate('isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information', isDaylightSavingTimeShifted);\n\n function createUnix(input) {\n return createLocal(input * 1000);\n }\n\n function createInZone() {\n return createLocal.apply(null, arguments).parseZone();\n }\n\n function preParsePostFormat(string) {\n return string;\n }\n\n var proto$1 = Locale.prototype;\n proto$1.calendar = calendar;\n proto$1.longDateFormat = longDateFormat;\n proto$1.invalidDate = invalidDate;\n proto$1.ordinal = ordinal;\n proto$1.preparse = preParsePostFormat;\n proto$1.postformat = preParsePostFormat;\n proto$1.relativeTime = relativeTime;\n proto$1.pastFuture = pastFuture;\n proto$1.set = set;\n proto$1.months = localeMonths;\n proto$1.monthsShort = localeMonthsShort;\n proto$1.monthsParse = localeMonthsParse;\n proto$1.monthsRegex = monthsRegex;\n proto$1.monthsShortRegex = monthsShortRegex;\n proto$1.week = localeWeek;\n proto$1.firstDayOfYear = localeFirstDayOfYear;\n proto$1.firstDayOfWeek = localeFirstDayOfWeek;\n proto$1.weekdays = localeWeekdays;\n proto$1.weekdaysMin = localeWeekdaysMin;\n proto$1.weekdaysShort = localeWeekdaysShort;\n proto$1.weekdaysParse = localeWeekdaysParse;\n proto$1.weekdaysRegex = weekdaysRegex;\n proto$1.weekdaysShortRegex = weekdaysShortRegex;\n proto$1.weekdaysMinRegex = weekdaysMinRegex;\n proto$1.isPM = localeIsPM;\n proto$1.meridiem = localeMeridiem;\n\n function get$1(format, index, field, setter) {\n var locale = getLocale();\n var utc = createUTC().set(setter, index);\n return locale[field](utc, format);\n }\n\n function listMonthsImpl(format, index, field) {\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n\n if (index != null) {\n return get$1(format, index, field, 'month');\n }\n\n var i;\n var out = [];\n\n for (i = 0; i < 12; i++) {\n out[i] = get$1(format, i, field, 'month');\n }\n\n return out;\n } // ()\n // (5)\n // (fmt, 5)\n // (fmt)\n // (true)\n // (true, 5)\n // (true, fmt, 5)\n // (true, fmt)\n\n\n function listWeekdaysImpl(localeSorted, format, index, field) {\n if (typeof localeSorted === 'boolean') {\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n } else {\n format = localeSorted;\n index = format;\n localeSorted = false;\n\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n }\n\n var locale = getLocale(),\n shift = localeSorted ? locale._week.dow : 0;\n\n if (index != null) {\n return get$1(format, (index + shift) % 7, field, 'day');\n }\n\n var i;\n var out = [];\n\n for (i = 0; i < 7; i++) {\n out[i] = get$1(format, (i + shift) % 7, field, 'day');\n }\n\n return out;\n }\n\n function listMonths(format, index) {\n return listMonthsImpl(format, index, 'months');\n }\n\n function listMonthsShort(format, index) {\n return listMonthsImpl(format, index, 'monthsShort');\n }\n\n function listWeekdays(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdays');\n }\n\n function listWeekdaysShort(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort');\n }\n\n function listWeekdaysMin(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin');\n }\n\n getSetGlobalLocale('en', {\n dayOfMonthOrdinalParse: /\\d{1,2}(th|st|nd|rd)/,\n ordinal: function (number) {\n var b = number % 10,\n output = toInt(number % 100 / 10) === 1 ? 'th' : b === 1 ? 'st' : b === 2 ? 'nd' : b === 3 ? 'rd' : 'th';\n return number + output;\n }\n }); // Side effect imports\n\n hooks.lang = deprecate('moment.lang is deprecated. Use moment.locale instead.', getSetGlobalLocale);\n hooks.langData = deprecate('moment.langData is deprecated. Use moment.localeData instead.', getLocale);\n var mathAbs = Math.abs;\n\n function abs() {\n var data = this._data;\n this._milliseconds = mathAbs(this._milliseconds);\n this._days = mathAbs(this._days);\n this._months = mathAbs(this._months);\n data.milliseconds = mathAbs(data.milliseconds);\n data.seconds = mathAbs(data.seconds);\n data.minutes = mathAbs(data.minutes);\n data.hours = mathAbs(data.hours);\n data.months = mathAbs(data.months);\n data.years = mathAbs(data.years);\n return this;\n }\n\n function addSubtract$1(duration, input, value, direction) {\n var other = createDuration(input, value);\n duration._milliseconds += direction * other._milliseconds;\n duration._days += direction * other._days;\n duration._months += direction * other._months;\n return duration._bubble();\n } // supports only 2.0-style add(1, 's') or add(duration)\n\n\n function add$1(input, value) {\n return addSubtract$1(this, input, value, 1);\n } // supports only 2.0-style subtract(1, 's') or subtract(duration)\n\n\n function subtract$1(input, value) {\n return addSubtract$1(this, input, value, -1);\n }\n\n function absCeil(number) {\n if (number < 0) {\n return Math.floor(number);\n } else {\n return Math.ceil(number);\n }\n }\n\n function bubble() {\n var milliseconds = this._milliseconds;\n var days = this._days;\n var months = this._months;\n var data = this._data;\n var seconds, minutes, hours, years, monthsFromDays; // if we have a mix of positive and negative values, bubble down first\n // check: https://github.com/moment/moment/issues/2166\n\n if (!(milliseconds >= 0 && days >= 0 && months >= 0 || milliseconds <= 0 && days <= 0 && months <= 0)) {\n milliseconds += absCeil(monthsToDays(months) + days) * 864e5;\n days = 0;\n months = 0;\n } // The following code bubbles up values, see the tests for\n // examples of what that means.\n\n\n data.milliseconds = milliseconds % 1000;\n seconds = absFloor(milliseconds / 1000);\n data.seconds = seconds % 60;\n minutes = absFloor(seconds / 60);\n data.minutes = minutes % 60;\n hours = absFloor(minutes / 60);\n data.hours = hours % 24;\n days += absFloor(hours / 24); // convert days to months\n\n monthsFromDays = absFloor(daysToMonths(days));\n months += monthsFromDays;\n days -= absCeil(monthsToDays(monthsFromDays)); // 12 months -> 1 year\n\n years = absFloor(months / 12);\n months %= 12;\n data.days = days;\n data.months = months;\n data.years = years;\n return this;\n }\n\n function daysToMonths(days) {\n // 400 years have 146097 days (taking into account leap year rules)\n // 400 years have 12 months === 4800\n return days * 4800 / 146097;\n }\n\n function monthsToDays(months) {\n // the reverse of daysToMonths\n return months * 146097 / 4800;\n }\n\n function as(units) {\n if (!this.isValid()) {\n return NaN;\n }\n\n var days;\n var months;\n var milliseconds = this._milliseconds;\n units = normalizeUnits(units);\n\n if (units === 'month' || units === 'quarter' || units === 'year') {\n days = this._days + milliseconds / 864e5;\n months = this._months + daysToMonths(days);\n\n switch (units) {\n case 'month':\n return months;\n\n case 'quarter':\n return months / 3;\n\n case 'year':\n return months / 12;\n }\n } else {\n // handle milliseconds separately because of floating point math errors (issue #1867)\n days = this._days + Math.round(monthsToDays(this._months));\n\n switch (units) {\n case 'week':\n return days / 7 + milliseconds / 6048e5;\n\n case 'day':\n return days + milliseconds / 864e5;\n\n case 'hour':\n return days * 24 + milliseconds / 36e5;\n\n case 'minute':\n return days * 1440 + milliseconds / 6e4;\n\n case 'second':\n return days * 86400 + milliseconds / 1000;\n // Math.floor prevents floating point math errors here\n\n case 'millisecond':\n return Math.floor(days * 864e5) + milliseconds;\n\n default:\n throw new Error('Unknown unit ' + units);\n }\n }\n } // TODO: Use this.as('ms')?\n\n\n function valueOf$1() {\n if (!this.isValid()) {\n return NaN;\n }\n\n return this._milliseconds + this._days * 864e5 + this._months % 12 * 2592e6 + toInt(this._months / 12) * 31536e6;\n }\n\n function makeAs(alias) {\n return function () {\n return this.as(alias);\n };\n }\n\n var asMilliseconds = makeAs('ms');\n var asSeconds = makeAs('s');\n var asMinutes = makeAs('m');\n var asHours = makeAs('h');\n var asDays = makeAs('d');\n var asWeeks = makeAs('w');\n var asMonths = makeAs('M');\n var asQuarters = makeAs('Q');\n var asYears = makeAs('y');\n\n function clone$1() {\n return createDuration(this);\n }\n\n function get$2(units) {\n units = normalizeUnits(units);\n return this.isValid() ? this[units + 's']() : NaN;\n }\n\n function makeGetter(name) {\n return function () {\n return this.isValid() ? this._data[name] : NaN;\n };\n }\n\n var milliseconds = makeGetter('milliseconds');\n var seconds = makeGetter('seconds');\n var minutes = makeGetter('minutes');\n var hours = makeGetter('hours');\n var days = makeGetter('days');\n var months = makeGetter('months');\n var years = makeGetter('years');\n\n function weeks() {\n return absFloor(this.days() / 7);\n }\n\n var round = Math.round;\n var thresholds = {\n ss: 44,\n // a few seconds to seconds\n s: 45,\n // seconds to minute\n m: 45,\n // minutes to hour\n h: 22,\n // hours to day\n d: 26,\n // days to month\n M: 11 // months to year\n\n }; // helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize\n\n function substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) {\n return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture);\n }\n\n function relativeTime$1(posNegDuration, withoutSuffix, locale) {\n var duration = createDuration(posNegDuration).abs();\n var seconds = round(duration.as('s'));\n var minutes = round(duration.as('m'));\n var hours = round(duration.as('h'));\n var days = round(duration.as('d'));\n var months = round(duration.as('M'));\n var years = round(duration.as('y'));\n var a = seconds <= thresholds.ss && ['s', seconds] || seconds < thresholds.s && ['ss', seconds] || minutes <= 1 && ['m'] || minutes < thresholds.m && ['mm', minutes] || hours <= 1 && ['h'] || hours < thresholds.h && ['hh', hours] || days <= 1 && ['d'] || days < thresholds.d && ['dd', days] || months <= 1 && ['M'] || months < thresholds.M && ['MM', months] || years <= 1 && ['y'] || ['yy', years];\n a[2] = withoutSuffix;\n a[3] = +posNegDuration > 0;\n a[4] = locale;\n return substituteTimeAgo.apply(null, a);\n } // This function allows you to set the rounding function for relative time strings\n\n\n function getSetRelativeTimeRounding(roundingFunction) {\n if (roundingFunction === undefined) {\n return round;\n }\n\n if (typeof roundingFunction === 'function') {\n round = roundingFunction;\n return true;\n }\n\n return false;\n } // This function allows you to set a threshold for relative time strings\n\n\n function getSetRelativeTimeThreshold(threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n\n if (limit === undefined) {\n return thresholds[threshold];\n }\n\n thresholds[threshold] = limit;\n\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n\n return true;\n }\n\n function humanize(withSuffix) {\n if (!this.isValid()) {\n return this.localeData().invalidDate();\n }\n\n var locale = this.localeData();\n var output = relativeTime$1(this, !withSuffix, locale);\n\n if (withSuffix) {\n output = locale.pastFuture(+this, output);\n }\n\n return locale.postformat(output);\n }\n\n var abs$1 = Math.abs;\n\n function sign(x) {\n return (x > 0) - (x < 0) || +x;\n }\n\n function toISOString$1() {\n // for ISO strings we do not use the normal bubbling rules:\n // * milliseconds bubble up until they become hours\n // * days do not bubble at all\n // * months bubble up until they become years\n // This is because there is no context-free conversion between hours and days\n // (think of clock changes)\n // and also not between days and months (28-31 days per month)\n if (!this.isValid()) {\n return this.localeData().invalidDate();\n }\n\n var seconds = abs$1(this._milliseconds) / 1000;\n var days = abs$1(this._days);\n var months = abs$1(this._months);\n var minutes, hours, years; // 3600 seconds -> 60 minutes -> 1 hour\n\n minutes = absFloor(seconds / 60);\n hours = absFloor(minutes / 60);\n seconds %= 60;\n minutes %= 60; // 12 months -> 1 year\n\n years = absFloor(months / 12);\n months %= 12; // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js\n\n var Y = years;\n var M = months;\n var D = days;\n var h = hours;\n var m = minutes;\n var s = seconds ? seconds.toFixed(3).replace(/\\.?0+$/, '') : '';\n var total = this.asSeconds();\n\n if (!total) {\n // this is the same as C#'s (Noda) and python (isodate)...\n // but not other JS (goog.date)\n return 'P0D';\n }\n\n var totalSign = total < 0 ? '-' : '';\n var ymSign = sign(this._months) !== sign(total) ? '-' : '';\n var daysSign = sign(this._days) !== sign(total) ? '-' : '';\n var hmsSign = sign(this._milliseconds) !== sign(total) ? '-' : '';\n return totalSign + 'P' + (Y ? ymSign + Y + 'Y' : '') + (M ? ymSign + M + 'M' : '') + (D ? daysSign + D + 'D' : '') + (h || m || s ? 'T' : '') + (h ? hmsSign + h + 'H' : '') + (m ? hmsSign + m + 'M' : '') + (s ? hmsSign + s + 'S' : '');\n }\n\n var proto$2 = Duration.prototype;\n proto$2.isValid = isValid$1;\n proto$2.abs = abs;\n proto$2.add = add$1;\n proto$2.subtract = subtract$1;\n proto$2.as = as;\n proto$2.asMilliseconds = asMilliseconds;\n proto$2.asSeconds = asSeconds;\n proto$2.asMinutes = asMinutes;\n proto$2.asHours = asHours;\n proto$2.asDays = asDays;\n proto$2.asWeeks = asWeeks;\n proto$2.asMonths = asMonths;\n proto$2.asQuarters = asQuarters;\n proto$2.asYears = asYears;\n proto$2.valueOf = valueOf$1;\n proto$2._bubble = bubble;\n proto$2.clone = clone$1;\n proto$2.get = get$2;\n proto$2.milliseconds = milliseconds;\n proto$2.seconds = seconds;\n proto$2.minutes = minutes;\n proto$2.hours = hours;\n proto$2.days = days;\n proto$2.weeks = weeks;\n proto$2.months = months;\n proto$2.years = years;\n proto$2.humanize = humanize;\n proto$2.toISOString = toISOString$1;\n proto$2.toString = toISOString$1;\n proto$2.toJSON = toISOString$1;\n proto$2.locale = locale;\n proto$2.localeData = localeData;\n proto$2.toIsoString = deprecate('toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)', toISOString$1);\n proto$2.lang = lang; // Side effect imports\n // FORMATTING\n\n addFormatToken('X', 0, 0, 'unix');\n addFormatToken('x', 0, 0, 'valueOf'); // PARSING\n\n addRegexToken('x', matchSigned);\n addRegexToken('X', matchTimestamp);\n addParseToken('X', function (input, array, config) {\n config._d = new Date(parseFloat(input, 10) * 1000);\n });\n addParseToken('x', function (input, array, config) {\n config._d = new Date(toInt(input));\n }); // Side effect imports\n\n hooks.version = '2.24.0';\n setHookCallback(createLocal);\n hooks.fn = proto;\n hooks.min = min;\n hooks.max = max;\n hooks.now = now;\n hooks.utc = createUTC;\n hooks.unix = createUnix;\n hooks.months = listMonths;\n hooks.isDate = isDate;\n hooks.locale = getSetGlobalLocale;\n hooks.invalid = createInvalid;\n hooks.duration = createDuration;\n hooks.isMoment = isMoment;\n hooks.weekdays = listWeekdays;\n hooks.parseZone = createInZone;\n hooks.localeData = getLocale;\n hooks.isDuration = isDuration;\n hooks.monthsShort = listMonthsShort;\n hooks.weekdaysMin = listWeekdaysMin;\n hooks.defineLocale = defineLocale;\n hooks.updateLocale = updateLocale;\n hooks.locales = listLocales;\n hooks.weekdaysShort = listWeekdaysShort;\n hooks.normalizeUnits = normalizeUnits;\n hooks.relativeTimeRounding = getSetRelativeTimeRounding;\n hooks.relativeTimeThreshold = getSetRelativeTimeThreshold;\n hooks.calendarFormat = getCalendarFormat;\n hooks.prototype = proto; // currently HTML5 input type only supports 24-hour formats\n\n hooks.HTML5_FMT = {\n DATETIME_LOCAL: 'YYYY-MM-DDTHH:mm',\n // \n DATETIME_LOCAL_SECONDS: 'YYYY-MM-DDTHH:mm:ss',\n // \n DATETIME_LOCAL_MS: 'YYYY-MM-DDTHH:mm:ss.SSS',\n // \n DATE: 'YYYY-MM-DD',\n // \n TIME: 'HH:mm',\n // \n TIME_SECONDS: 'HH:mm:ss',\n // \n TIME_MS: 'HH:mm:ss.SSS',\n // \n WEEK: 'GGGG-[W]WW',\n // \n MONTH: 'YYYY-MM' // \n\n };\n return hooks;\n });\n}); // Maps for number <-> hex string conversion\n\nvar byteToHex$2 = [];\n\nfor (var i$2 = 0; i$2 < 256; i$2++) {\n byteToHex$2[i$2] = (i$2 + 0x100).toString(16).substr(1);\n}\n/**\n * Generate 16 random bytes to be used as a base for UUID.\n *\n * @ignore\n */\n\n\nvar random$1 = function () {\n if (typeof crypto !== 'undefined' && crypto.getRandomValues) {\n // WHATWG crypto-based RNG - http://wiki.whatwg.org/wiki/Crypto\n // Moderately fast, high quality\n var _rnds8 = new Uint8Array(16);\n\n return function whatwgRNG() {\n crypto.getRandomValues(_rnds8);\n return _rnds8;\n };\n } // Math.random()-based (RNG)\n //\n // If all else fails, use Math.random().\n // It's fast, but is of unspecified quality.\n\n\n var _rnds = new Array(16);\n\n return function () {\n for (var i = 0, r; i < 16; i++) {\n if ((i & 0x03) === 0) {\n r = Math.random() * 0x100000000;\n }\n\n _rnds[i] = r >>> ((i & 0x03) << 3) & 0xff;\n }\n\n return _rnds;\n }; // uuid.js\n //\n // Copyright (c) 2010-2012 Robert Kieffer\n // MIT License - http://opensource.org/licenses/mit-license.php\n // Unique ID creation requires a high quality random # generator. We feature\n // detect to determine the best RNG source, normalizing to a function that\n // returns 128-bits of randomness, since that's what's usually required\n // return require('./rng');\n}();\n\nvar byteToHex$1$1 = [];\n\nfor (var i$1$1 = 0; i$1$1 < 256; i$1$1++) {\n byteToHex$1$1[i$1$1] = (i$1$1 + 0x100).toString(16).substr(1);\n} // **`v1()` - Generate time-based UUID**\n//\n// Inspired by https://github.com/LiosK/UUID.js\n// and http://docs.python.org/library/uuid.html\n// random #'s we need to init node and clockseq\n\n\nvar seedBytes$1 = random$1(); // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)\n\nvar defaultNodeId$1 = [seedBytes$1[0] | 0x01, seedBytes$1[1], seedBytes$1[2], seedBytes$1[3], seedBytes$1[4], seedBytes$1[5]]; // Per 4.2.2, randomize (14 bit) clockseq\n\nvar defaultClockseq$1 = (seedBytes$1[6] << 8 | seedBytes$1[7]) & 0x3fff; // Previous uuid creation time\n// for example '/Date(1198908717056)/' or '/Date(1198908717056-0700)/'\n// code from http://momentjs.com/\n\n\nvar ASPDateRegex = /^\\/?Date\\((-?\\d+)/i; // Hex color\n/**\n * Hue, Saturation, Value.\n */\n\n/**\n * Test whether given object is a number\n *\n * @param value - Input value of unknown type.\n *\n * @returns True if number, false otherwise.\n */\n\nfunction isNumber(value) {\n return value instanceof Number || typeof value === 'number';\n}\n/**\n * Test whether given object is a string\n *\n * @param value - Input value of unknown type.\n *\n * @returns True if string, false otherwise.\n */\n\n\nfunction isString(value) {\n return value instanceof String || typeof value === 'string';\n}\n/**\n * Test whether given object is a Moment date.\n * @TODO: This is basically a workaround, if Moment was imported property it wouldn't necessary as moment.isMoment is a TS type guard.\n *\n * @param value - Input value of unknown type.\n *\n * @returns True if Moment instance, false otherwise.\n */\n\n\nfunction isMoment(value) {\n return moment.isMoment(value);\n}\n/**\n * Convert an object into another type\n *\n * @param object - Value of unknown type.\n * @param type - Name of the desired type.\n *\n * @returns Object in the desired type.\n * @throws Error\n */\n\n\nfunction convert(object, type) {\n var match;\n\n if (object === undefined) {\n return undefined;\n }\n\n if (object === null) {\n return null;\n }\n\n if (!type) {\n return object;\n }\n\n if (!(typeof type === 'string') && !(type instanceof String)) {\n throw new Error('Type must be a string');\n } //noinspection FallthroughInSwitchStatementJS\n\n\n switch (type) {\n case 'boolean':\n case 'Boolean':\n return Boolean(object);\n\n case 'number':\n case 'Number':\n if (isString(object) && !isNaN(Date.parse(object))) {\n return moment(object).valueOf();\n } else {\n // @TODO: I don't think that Number and String constructors are a good idea.\n // This could also fail if the object doesn't have valueOf method or if it's redefined.\n // For example: Object.create(null) or { valueOf: 7 }.\n return Number(object.valueOf());\n }\n\n case 'string':\n case 'String':\n return String(object);\n\n case 'Date':\n if (isNumber(object)) {\n return new Date(object);\n }\n\n if (object instanceof Date) {\n return new Date(object.valueOf());\n } else if (isMoment(object)) {\n return new Date(object.valueOf());\n }\n\n if (isString(object)) {\n match = ASPDateRegex.exec(object);\n\n if (match) {\n // object is an ASP date\n return new Date(Number(match[1])); // parse number\n } else {\n return moment(new Date(object)).toDate(); // parse string\n }\n } else {\n throw new Error('Cannot convert object of type ' + getType(object) + ' to type Date');\n }\n\n case 'Moment':\n if (isNumber(object)) {\n return moment(object);\n }\n\n if (object instanceof Date) {\n return moment(object.valueOf());\n } else if (isMoment(object)) {\n return moment(object);\n }\n\n if (isString(object)) {\n match = ASPDateRegex.exec(object);\n\n if (match) {\n // object is an ASP date\n return moment(Number(match[1])); // parse number\n } else {\n return moment(object); // parse string\n }\n } else {\n throw new Error('Cannot convert object of type ' + getType(object) + ' to type Date');\n }\n\n case 'ISODate':\n if (isNumber(object)) {\n return new Date(object);\n } else if (object instanceof Date) {\n return object.toISOString();\n } else if (isMoment(object)) {\n return object.toDate().toISOString();\n } else if (isString(object)) {\n match = ASPDateRegex.exec(object);\n\n if (match) {\n // object is an ASP date\n return new Date(Number(match[1])).toISOString(); // parse number\n } else {\n return moment(object).format(); // ISO 8601\n }\n } else {\n throw new Error('Cannot convert object of type ' + getType(object) + ' to type ISODate');\n }\n\n case 'ASPDate':\n if (isNumber(object)) {\n return '/Date(' + object + ')/';\n } else if (object instanceof Date) {\n return '/Date(' + object.valueOf() + ')/';\n } else if (isString(object)) {\n match = ASPDateRegex.exec(object);\n\n var _value;\n\n if (match) {\n // object is an ASP date\n _value = new Date(Number(match[1])).valueOf(); // parse number\n } else {\n _value = new Date(object).valueOf(); // parse string\n }\n\n return '/Date(' + _value + ')/';\n } else {\n throw new Error('Cannot convert object of type ' + getType(object) + ' to type ASPDate');\n }\n\n default:\n var never = type;\n throw new Error(\"Unknown type \".concat(never));\n }\n}\n/**\n * Get the type of an object, for example exports.getType([]) returns 'Array'\n *\n * @param object - Input value of unknown type.\n *\n * @returns Detected type.\n */\n\n\nfunction getType(object) {\n var type = _typeof(object);\n\n if (type === 'object') {\n if (object === null) {\n return 'null';\n }\n\n if (object instanceof Boolean) {\n return 'Boolean';\n }\n\n if (object instanceof Number) {\n return 'Number';\n }\n\n if (object instanceof String) {\n return 'String';\n }\n\n if (Array.isArray(object)) {\n return 'Array';\n }\n\n if (object instanceof Date) {\n return 'Date';\n }\n\n return 'Object';\n }\n\n if (type === 'number') {\n return 'Number';\n }\n\n if (type === 'boolean') {\n return 'Boolean';\n }\n\n if (type === 'string') {\n return 'String';\n }\n\n if (type === undefined) {\n return 'undefined';\n }\n\n return type;\n}\n\n/**\r\n * Determine whether a value can be used as an id.\r\n *\r\n * @param value - Input value of unknown type.\r\n *\r\n * @returns True if the value is valid id, false otherwise.\r\n */\nfunction isId(value) {\n return typeof value === 'string' || typeof value === 'number';\n}\n\n/**\r\n * A queue.\r\n *\r\n * @typeParam T - The type of method names to be replaced by queued versions.\r\n */\nvar Queue =\n/*#__PURE__*/\nfunction () {\n /**\r\n * Construct a new Queue.\r\n *\r\n * @param options - Queue configuration.\r\n */\n function Queue(options) {\n classCallCheck(this, Queue);\n\n this._queue = [];\n this._timeout = null;\n this._extended = null; // options\n\n this.delay = null;\n this.max = Infinity;\n this.setOptions(options);\n }\n /**\r\n * Update the configuration of the queue.\r\n *\r\n * @param options - Queue configuration.\r\n */\n\n\n createClass(Queue, [{\n key: \"setOptions\",\n value: function setOptions(options) {\n if (options && typeof options.delay !== 'undefined') {\n this.delay = options.delay;\n }\n\n if (options && typeof options.max !== 'undefined') {\n this.max = options.max;\n }\n\n this._flushIfNeeded();\n }\n /**\r\n * Extend an object with queuing functionality.\r\n * The object will be extended with a function flush, and the methods provided in options.replace will be replaced with queued ones.\r\n *\r\n * @param object - The object to be extended.\r\n * @param options - Additional options.\r\n *\r\n * @returns The created queue.\r\n */\n\n }, {\n key: \"destroy\",\n\n /**\r\n * Destroy the queue. The queue will first flush all queued actions, and in case it has extended an object, will restore the original object.\r\n */\n value: function destroy() {\n this.flush();\n\n if (this._extended) {\n var object = this._extended.object;\n var methods = this._extended.methods;\n\n for (var i = 0; i < methods.length; i++) {\n var method = methods[i];\n\n if (method.original) {\n object[method.name] = method.original;\n } else {\n // @TODO: better solution?\n delete object[method.name];\n }\n }\n\n this._extended = null;\n }\n }\n /**\r\n * Replace a method on an object with a queued version.\r\n *\r\n * @param object - Object having the method.\r\n * @param method - The method name.\r\n */\n\n }, {\n key: \"replace\",\n value: function replace(object, method) {\n var me = this;\n var original = object[method];\n\n if (!original) {\n throw new Error('Method ' + method + ' undefined');\n }\n\n object[method] = function () {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n // add this call to the queue\n me.queue({\n args: args,\n fn: original,\n context: this\n });\n };\n }\n /**\r\n * Queue a call.\r\n *\r\n * @param entry - The function or entry to be queued.\r\n */\n\n }, {\n key: \"queue\",\n value: function queue(entry) {\n if (typeof entry === 'function') {\n this._queue.push({\n fn: entry\n });\n } else {\n this._queue.push(entry);\n }\n\n this._flushIfNeeded();\n }\n /**\r\n * Check whether the queue needs to be flushed.\r\n */\n\n }, {\n key: \"_flushIfNeeded\",\n value: function _flushIfNeeded() {\n var _this = this;\n\n // flush when the maximum is exceeded.\n if (this._queue.length > this.max) {\n this.flush();\n } // flush after a period of inactivity when a delay is configured\n\n\n if (this._timeout != null) {\n clearTimeout(this._timeout);\n this._timeout = null;\n }\n\n if (this.queue.length > 0 && typeof this.delay === 'number') {\n this._timeout = setTimeout(function () {\n _this.flush();\n }, this.delay);\n }\n }\n /**\r\n * Flush all queued calls\r\n */\n\n }, {\n key: \"flush\",\n value: function flush() {\n this._queue.splice(0).forEach(function (entry) {\n entry.fn.apply(entry.context || entry.fn, entry.args || []);\n });\n }\n }], [{\n key: \"extend\",\n value: function extend(object, options) {\n var queue = new Queue(options);\n\n if (object.flush !== undefined) {\n throw new Error('Target object already has a property flush');\n }\n\n object.flush = function () {\n queue.flush();\n };\n\n var methods = [{\n name: 'flush',\n original: undefined\n }];\n\n if (options && options.replace) {\n for (var i = 0; i < options.replace.length; i++) {\n var name = options.replace[i];\n methods.push({\n name: name,\n // @TODO: better solution?\n original: object[name]\n }); // @TODO: better solution?\n\n queue.replace(object, name);\n }\n }\n\n queue._extended = {\n object: object,\n methods: methods\n };\n return queue;\n }\n }]);\n\n return Queue;\n}();\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) {\n for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n }\n}\n\nvar arrayWithoutHoles = _arrayWithoutHoles;\n\nfunction _iterableToArray(iter) {\n if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === \"[object Arguments]\") return Array.from(iter);\n}\n\nvar iterableToArray = _iterableToArray;\n\nfunction _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance\");\n}\n\nvar nonIterableSpread = _nonIterableSpread;\n\nfunction _toConsumableArray(arr) {\n return arrayWithoutHoles(arr) || iterableToArray(arr) || nonIterableSpread();\n}\n\nvar toConsumableArray = _toConsumableArray;\n\n/**\r\n * [[DataSet]] code that can be reused in [[DataView]] or other similar implementations of [[DataInterface]].\r\n *\r\n * @typeParam Item - Item type that may or may not have an id.\r\n * @typeParam IdProp - Name of the property that contains the id.\r\n */\nvar DataSetPart =\n/*#__PURE__*/\nfunction () {\n function DataSetPart() {\n classCallCheck(this, DataSetPart);\n\n this._subscribers = {\n '*': [],\n add: [],\n remove: [],\n update: []\n };\n /**\r\n * @deprecated Use on instead (PS: DataView.subscribe === DataView.on).\r\n */\n\n this.subscribe = DataSetPart.prototype.on;\n /**\r\n * @deprecated Use off instead (PS: DataView.unsubscribe === DataView.off).\r\n */\n\n this.unsubscribe = DataSetPart.prototype.off;\n }\n /**\r\n * Trigger an event\r\n *\r\n * @param event - Event name.\r\n * @param payload - Event payload.\r\n * @param senderId - Id of the sender.\r\n */\n\n\n createClass(DataSetPart, [{\n key: \"_trigger\",\n value: function _trigger(event, payload, senderId) {\n if (event === '*') {\n throw new Error('Cannot trigger event *');\n }\n\n var subscribers = [].concat(toConsumableArray(this._subscribers[event]), toConsumableArray(this._subscribers['*']));\n\n for (var i = 0, len = subscribers.length; i < len; i++) {\n var subscriber = subscribers[i];\n\n if (subscriber.callback) {\n subscriber.callback(event, payload, senderId != null ? senderId : null);\n }\n }\n }\n /**\r\n * Subscribe to an event, add an event listener.\r\n *\r\n * @param event - Event name.\r\n * @param callback - Callback method.\r\n */\n\n }, {\n key: \"on\",\n value: function on(event, callback) {\n this._subscribers[event].push({\n callback: callback\n });\n }\n /**\r\n * Unsubscribe from an event, remove an event listener.\r\n *\r\n * @remarks If the same callback was subscribed more than once **all** occurences will be removed.\r\n *\r\n * @param event - Event name.\r\n * @param callback - Callback method.\r\n */\n\n }, {\n key: \"off\",\n value: function off(event, callback) {\n this._subscribers[event] = this._subscribers[event].filter(function (listener) {\n return listener.callback !== callback;\n });\n }\n }]);\n\n return DataSetPart;\n}();\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { keys.push.apply(keys, Object.getOwnPropertySymbols(object)); } if (enumerableOnly) keys = keys.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n/**\r\n * # DataSet\r\n *\r\n * Vis.js comes with a flexible DataSet, which can be used to hold and manipulate unstructured data and listen for changes in the data. The DataSet is key/value based. Data items can be added, updated and removed from the DataSet, and one can subscribe to changes in the DataSet. The data in the DataSet can be filtered and ordered, and fields (like dates) can be converted to a specific type. Data can be normalized when appending it to the DataSet as well.\r\n *\r\n * ## Example\r\n *\r\n * The following example shows how to use a DataSet.\r\n *\r\n * ```javascript\r\n * // create a DataSet\r\n * var options = {};\r\n * var data = new vis.DataSet(options);\r\n *\r\n * // add items\r\n * // note that the data items can contain different properties and data formats\r\n * data.add([\r\n * {id: 1, text: 'item 1', date: new Date(2013, 6, 20), group: 1, first: true},\r\n * {id: 2, text: 'item 2', date: '2013-06-23', group: 2},\r\n * {id: 3, text: 'item 3', date: '2013-06-25', group: 2},\r\n * {id: 4, text: 'item 4'}\r\n * ]);\r\n *\r\n * // subscribe to any change in the DataSet\r\n * data.on('*', function (event, properties, senderId) {\r\n * console.log('event', event, properties);\r\n * });\r\n *\r\n * // update an existing item\r\n * data.update({id: 2, group: 1});\r\n *\r\n * // remove an item\r\n * data.remove(4);\r\n *\r\n * // get all ids\r\n * var ids = data.getIds();\r\n * console.log('ids', ids);\r\n *\r\n * // get a specific item\r\n * var item1 = data.get(1);\r\n * console.log('item1', item1);\r\n *\r\n * // retrieve a filtered subset of the data\r\n * var items = data.get({\r\n * filter: function (item) {\r\n * return item.group == 1;\r\n * }\r\n * });\r\n * console.log('filtered items', items);\r\n *\r\n * // retrieve formatted items\r\n * var items = data.get({\r\n * fields: ['id', 'date'],\r\n * type: {\r\n * date: 'ISODate'\r\n * }\r\n * });\r\n * console.log('formatted items', items);\r\n * ```\r\n *\r\n * @typeParam Item - Item type that may or may not have an id.\r\n * @typeParam IdProp - Name of the property that contains the id.\r\n */\n\nvar DataSet =\n/*#__PURE__*/\nfunction (_DataSetPart) {\n inherits(DataSet, _DataSetPart);\n\n /**\r\n * Construct a new DataSet.\r\n *\r\n * @param data - Initial data or options.\r\n * @param options - Options (type error if data is also options).\r\n */\n function DataSet(data, options) {\n var _this;\n\n classCallCheck(this, DataSet);\n\n _this = possibleConstructorReturn(this, getPrototypeOf(DataSet).call(this)); // correctly read optional arguments\n\n if (data && !Array.isArray(data)) {\n options = data;\n data = [];\n }\n\n _this._options = options || {};\n _this._data = Object.create({}); // map with data indexed by id\n\n _this.length = 0; // number of items in the DataSet\n\n _this._idProp = _this._options.fieldId || 'id'; // name of the field containing id\n\n _this._type = {}; // internal field types (NOTE: this can differ from this._options.type)\n // all variants of a Date are internally stored as Date, so we can convert\n // from everything to everything (also from ISODate to Number for example)\n\n if (_this._options.type) {\n var fields = Object.keys(_this._options.type);\n\n for (var i = 0, len = fields.length; i < len; i++) {\n var field = fields[i];\n var value = _this._options.type[field];\n\n if (value == 'Date' || value == 'ISODate' || value == 'ASPDate') {\n _this._type[field] = 'Date';\n } else {\n _this._type[field] = value;\n }\n }\n } // add initial data when provided\n\n\n if (data && data.length) {\n _this.add(data);\n }\n\n _this.setOptions(options);\n\n return _this;\n }\n /**\r\n * Set new options.\r\n *\r\n * @param options - The new options.\r\n */\n\n\n createClass(DataSet, [{\n key: \"setOptions\",\n value: function setOptions(options) {\n if (options && options.queue !== undefined) {\n if (options.queue === false) {\n // delete queue if loaded\n if (this._queue) {\n this._queue.destroy();\n\n delete this._queue;\n }\n } else {\n // create queue and update its options\n if (!this._queue) {\n this._queue = Queue.extend(this, {\n replace: ['add', 'update', 'remove']\n });\n }\n\n if (options.queue && _typeof_1(options.queue) === 'object') {\n this._queue.setOptions(options.queue);\n }\n }\n }\n }\n /**\r\n * Add a data item or an array with items.\r\n *\r\n * After the items are added to the DataSet, the DataSet will trigger an event `add`. When a `senderId` is provided, this id will be passed with the triggered event to all subscribers.\r\n *\r\n * ## Example\r\n *\r\n * ```javascript\r\n * // create a DataSet\r\n * const data = new vis.DataSet()\r\n *\r\n * // add items\r\n * const ids = data.add([\r\n * { id: 1, text: 'item 1' },\r\n * { id: 2, text: 'item 2' },\r\n * { text: 'item without an id' }\r\n * ])\r\n *\r\n * console.log(ids) // [1, 2, '']\r\n * ```\r\n *\r\n * @param data - Items to be added (ids will be generated if missing).\r\n * @param senderId - Sender id.\r\n *\r\n * @returns addedIds - Array with the ids (generated if not present) of the added items.\r\n *\r\n * @throws When an item with the same id as any of the added items already exists.\r\n */\n\n }, {\n key: \"add\",\n value: function add(data, senderId) {\n var addedIds = [];\n var id;\n\n if (Array.isArray(data)) {\n // Array\n for (var i = 0, len = data.length; i < len; i++) {\n id = this._addItem(data[i]);\n addedIds.push(id);\n }\n } else if (data && _typeof_1(data) === 'object') {\n // Single item\n id = this._addItem(data);\n addedIds.push(id);\n } else {\n throw new Error('Unknown dataType');\n }\n\n if (addedIds.length) {\n this._trigger('add', {\n items: addedIds\n }, senderId);\n }\n\n return addedIds;\n }\n /**\r\n * Update existing items. When an item does not exist, it will be created\r\n *\r\n * The provided properties will be merged in the existing item. When an item does not exist, it will be created.\r\n *\r\n * After the items are updated, the DataSet will trigger an event `add` for the added items, and an event `update`. When a `senderId` is provided, this id will be passed with the triggered event to all subscribers.\r\n *\r\n * ## Example\r\n *\r\n * ```javascript\r\n * // create a DataSet\r\n * const data = new vis.DataSet([\r\n * { id: 1, text: 'item 1' },\r\n * { id: 2, text: 'item 2' },\r\n * { id: 3, text: 'item 3' }\r\n * ])\r\n *\r\n * // update items\r\n * const ids = data.update([\r\n * { id: 2, text: 'item 2 (updated)' },\r\n * { id: 4, text: 'item 4 (new)' }\r\n * ])\r\n *\r\n * console.log(ids) // [2, 4]\r\n * ```\r\n *\r\n * @param data - Items to be updated (if the id is already present) or added (if the id is missing).\r\n * @param senderId - Sender id.\r\n *\r\n * @returns updatedIds - The ids of the added (these may be newly generated if there was no id in the item from the data) or updated items.\r\n *\r\n * @throws When the supplied data is neither an item nor an array of items.\r\n */\n\n }, {\n key: \"update\",\n value: function update(data, senderId) {\n var _this2 = this;\n\n var addedIds = [];\n var updatedIds = [];\n var oldData = [];\n var updatedData = [];\n var idProp = this._idProp;\n\n var addOrUpdate = function addOrUpdate(item) {\n var origId = item[idProp];\n\n if (origId != null && _this2._data[origId]) {\n var fullItem = item; // it has an id, therefore it is a fullitem\n\n var oldItem = Object.assign({}, _this2._data[origId]); // update item\n\n var id = _this2._updateItem(fullItem);\n\n updatedIds.push(id);\n updatedData.push(fullItem);\n oldData.push(oldItem);\n } else {\n // add new item\n var _id = _this2._addItem(item);\n\n addedIds.push(_id);\n }\n };\n\n if (Array.isArray(data)) {\n // Array\n for (var i = 0, len = data.length; i < len; i++) {\n if (data[i] && _typeof_1(data[i]) === 'object') {\n addOrUpdate(data[i]);\n } else {\n console.warn('Ignoring input item, which is not an object at index ' + i);\n }\n }\n } else if (data && _typeof_1(data) === 'object') {\n // Single item\n addOrUpdate(data);\n } else {\n throw new Error('Unknown dataType');\n }\n\n if (addedIds.length) {\n this._trigger('add', {\n items: addedIds\n }, senderId);\n }\n\n if (updatedIds.length) {\n var props = {\n items: updatedIds,\n oldData: oldData,\n data: updatedData\n }; // TODO: remove deprecated property 'data' some day\n //Object.defineProperty(props, 'data', {\n // 'get': (function() {\n // console.warn('Property data is deprecated. Use DataSet.get(ids) to retrieve the new data, use the oldData property on this object to get the old data');\n // return updatedData;\n // }).bind(this)\n //});\n\n this._trigger('update', props, senderId);\n }\n\n return addedIds.concat(updatedIds);\n }\n /** @inheritdoc */\n\n }, {\n key: \"get\",\n value: function get(first, second) {\n // @TODO: Woudn't it be better to split this into multiple methods?\n // parse the arguments\n var id = undefined;\n var ids = undefined;\n var options = undefined;\n\n if (isId(first)) {\n // get(id [, options])\n id = first;\n options = second;\n } else if (Array.isArray(first)) {\n // get(ids [, options])\n ids = first;\n options = second;\n } else {\n // get([, options])\n options = first;\n } // determine the return type\n\n\n var returnType = options && options.returnType === 'Object' ? 'Object' : 'Array'; // @TODO: WTF is this? Or am I missing something?\n // var returnType\n // if (options && options.returnType) {\n // var allowedValues = ['Array', 'Object']\n // returnType =\n // allowedValues.indexOf(options.returnType) == -1\n // ? 'Array'\n // : options.returnType\n // } else {\n // returnType = 'Array'\n // }\n // build options\n\n var type = options && options.type || this._options.type;\n var filter = options && options.filter;\n var items = [];\n var item = null;\n var itemIds = null;\n var itemId = null; // convert items\n\n if (id != null) {\n // return a single item\n item = this._getItem(id, type);\n\n if (item && filter && !filter(item)) {\n item = null;\n }\n } else if (ids != null) {\n // return a subset of items\n for (var i = 0, len = ids.length; i < len; i++) {\n item = this._getItem(ids[i], type);\n\n if (item != null && (!filter || filter(item))) {\n items.push(item);\n }\n }\n } else {\n // return all items\n itemIds = Object.keys(this._data);\n\n for (var _i = 0, _len = itemIds.length; _i < _len; _i++) {\n itemId = itemIds[_i];\n item = this._getItem(itemId, type);\n\n if (item != null && (!filter || filter(item))) {\n items.push(item);\n }\n }\n } // order the results\n\n\n if (options && options.order && id == undefined) {\n this._sort(items, options.order);\n } // filter fields of the items\n\n\n if (options && options.fields) {\n var fields = options.fields;\n\n if (id != undefined && item != null) {\n item = this._filterFields(item, fields);\n } else {\n for (var _i2 = 0, _len2 = items.length; _i2 < _len2; _i2++) {\n items[_i2] = this._filterFields(items[_i2], fields);\n }\n }\n } // return the results\n\n\n if (returnType == 'Object') {\n var result = {};\n\n for (var _i3 = 0, _len3 = items.length; _i3 < _len3; _i3++) {\n var resultant = items[_i3]; // @TODO: Shoudn't this be this._fieldId?\n // result[resultant.id] = resultant\n\n var _id2 = resultant[this._idProp];\n result[_id2] = resultant;\n }\n\n return result;\n } else {\n if (id != null) {\n // a single item\n return item;\n } else {\n // just return our array\n return items;\n }\n }\n }\n /** @inheritdoc */\n\n }, {\n key: \"getIds\",\n value: function getIds(options) {\n var data = this._data;\n var filter = options && options.filter;\n var order = options && options.order;\n var type = options && options.type || this._options.type;\n var itemIds = Object.keys(data);\n var ids = [];\n var item;\n var items;\n\n if (filter) {\n // get filtered items\n if (order) {\n // create ordered list\n items = [];\n\n for (var i = 0, len = itemIds.length; i < len; i++) {\n var id = itemIds[i];\n item = this._getItem(id, type);\n\n if (filter(item)) {\n items.push(item);\n }\n }\n\n this._sort(items, order);\n\n for (var _i4 = 0, _len4 = items.length; _i4 < _len4; _i4++) {\n ids.push(items[_i4][this._idProp]);\n }\n } else {\n // create unordered list\n for (var _i5 = 0, _len5 = itemIds.length; _i5 < _len5; _i5++) {\n var _id3 = itemIds[_i5];\n item = this._getItem(_id3, type);\n\n if (filter(item)) {\n ids.push(item[this._idProp]);\n }\n }\n }\n } else {\n // get all items\n if (order) {\n // create an ordered list\n items = [];\n\n for (var _i6 = 0, _len6 = itemIds.length; _i6 < _len6; _i6++) {\n var _id4 = itemIds[_i6];\n items.push(data[_id4]);\n }\n\n this._sort(items, order);\n\n for (var _i7 = 0, _len7 = items.length; _i7 < _len7; _i7++) {\n ids.push(items[_i7][this._idProp]);\n }\n } else {\n // create unordered list\n for (var _i8 = 0, _len8 = itemIds.length; _i8 < _len8; _i8++) {\n var _id5 = itemIds[_i8];\n item = data[_id5];\n ids.push(item[this._idProp]);\n }\n }\n }\n\n return ids;\n }\n /** @inheritdoc */\n\n }, {\n key: \"getDataSet\",\n value: function getDataSet() {\n return this;\n }\n /** @inheritdoc */\n\n }, {\n key: \"forEach\",\n value: function forEach(callback, options) {\n var filter = options && options.filter;\n var type = options && options.type || this._options.type;\n var data = this._data;\n var itemIds = Object.keys(data);\n\n if (options && options.order) {\n // execute forEach on ordered list\n var items = this.get(options);\n\n for (var i = 0, len = items.length; i < len; i++) {\n var item = items[i];\n var id = item[this._idProp];\n callback(item, id);\n }\n } else {\n // unordered\n for (var _i9 = 0, _len9 = itemIds.length; _i9 < _len9; _i9++) {\n var _id6 = itemIds[_i9];\n\n var _item = this._getItem(_id6, type);\n\n if (!filter || filter(_item)) {\n callback(_item, _id6);\n }\n }\n }\n }\n /** @inheritdoc */\n\n }, {\n key: \"map\",\n value: function map(callback, options) {\n var filter = options && options.filter;\n var type = options && options.type || this._options.type;\n var mappedItems = [];\n var data = this._data;\n var itemIds = Object.keys(data); // convert and filter items\n\n for (var i = 0, len = itemIds.length; i < len; i++) {\n var id = itemIds[i];\n\n var item = this._getItem(id, type);\n\n if (!filter || filter(item)) {\n mappedItems.push(callback(item, id));\n }\n } // order items\n\n\n if (options && options.order) {\n this._sort(mappedItems, options.order);\n }\n\n return mappedItems;\n }\n /**\r\n * Filter the fields of an item.\r\n *\r\n * @param item - The item whose fields should be filtered.\r\n * @param fields - The names of the fields that will be kept.\r\n *\r\n * @typeParam K - Field name type.\r\n *\r\n * @returns The item without any additional fields.\r\n */\n\n }, {\n key: \"_filterFields\",\n value: function _filterFields(item, fields) {\n if (!item) {\n // item is null\n return item;\n }\n\n return (Array.isArray(fields) ? // Use the supplied array\n fields : // Use the keys of the supplied object\n Object.keys(fields)).reduce(function (filteredItem, field) {\n filteredItem[field] = item[field];\n return filteredItem;\n }, {});\n }\n /**\r\n * Sort the provided array with items.\r\n *\r\n * @param items - Items to be sorted in place.\r\n * @param order - A field name or custom sort function.\r\n *\r\n * @typeParam T - The type of the items in the items array.\r\n */\n\n }, {\n key: \"_sort\",\n value: function _sort(items, order) {\n if (typeof order === 'string') {\n // order by provided field name\n var name = order; // field name\n\n items.sort(function (a, b) {\n // @TODO: How to treat missing properties?\n var av = a[name];\n var bv = b[name];\n return av > bv ? 1 : av < bv ? -1 : 0;\n });\n } else if (typeof order === 'function') {\n // order by sort function\n items.sort(order);\n } else {\n // TODO: extend order by an Object {field:string, direction:string}\n // where direction can be 'asc' or 'desc'\n throw new TypeError('Order must be a function or a string');\n }\n }\n /**\r\n * Remove an item or multiple items by “reference” (only the id is used) or by id.\r\n *\r\n * The method ignores removal of non-existing items, and returns an array containing the ids of the items which are actually removed from the DataSet.\r\n *\r\n * After the items are removed, the DataSet will trigger an event `remove` for the removed items. When a `senderId` is provided, this id will be passed with the triggered event to all subscribers.\r\n *\r\n * ## Example\r\n * ```javascript\r\n * // create a DataSet\r\n * const data = new vis.DataSet([\r\n * { id: 1, text: 'item 1' },\r\n * { id: 2, text: 'item 2' },\r\n * { id: 3, text: 'item 3' }\r\n * ])\r\n *\r\n * // remove items\r\n * const ids = data.remove([2, { id: 3 }, 4])\r\n *\r\n * console.log(ids) // [2, 3]\r\n * ```\r\n *\r\n * @param id - One or more items or ids of items to be removed.\r\n * @param senderId - Sender id.\r\n *\r\n * @returns The ids of the removed items.\r\n */\n\n }, {\n key: \"remove\",\n value: function remove(id, senderId) {\n var removedIds = [];\n var removedItems = []; // force everything to be an array for simplicity\n\n var ids = Array.isArray(id) ? id : [id];\n\n for (var i = 0, len = ids.length; i < len; i++) {\n var item = this._remove(ids[i]);\n\n if (item) {\n var itemId = item[this._idProp];\n\n if (itemId != null) {\n removedIds.push(itemId);\n removedItems.push(item);\n }\n }\n }\n\n if (removedIds.length) {\n this._trigger('remove', {\n items: removedIds,\n oldData: removedItems\n }, senderId);\n }\n\n return removedIds;\n }\n /**\r\n * Remove an item by its id or reference.\r\n *\r\n * @param id - Id of an item or the item itself.\r\n *\r\n * @returns The removed item if removed, null otherwise.\r\n */\n\n }, {\n key: \"_remove\",\n value: function _remove(id) {\n // @TODO: It origianlly returned the item although the docs say id.\n // The code expects the item, so probably an error in the docs.\n var ident; // confirm the id to use based on the args type\n\n if (isId(id)) {\n ident = id;\n } else if (id && _typeof_1(id) === 'object') {\n ident = id[this._idProp]; // look for the identifier field using ._idProp\n } // do the removing if the item is found\n\n\n if (ident != null && this._data[ident]) {\n var item = this._data[ident];\n delete this._data[ident];\n --this.length;\n return item;\n }\n\n return null;\n }\n /**\r\n * Clear the entire data set.\r\n *\r\n * After the items are removed, the [[DataSet]] will trigger an event `remove` for all removed items. When a `senderId` is provided, this id will be passed with the triggered event to all subscribers.\r\n *\r\n * @param senderId - Sender id.\r\n *\r\n * @returns removedIds - The ids of all removed items.\r\n */\n\n }, {\n key: \"clear\",\n value: function clear(senderId) {\n var ids = Object.keys(this._data);\n var items = [];\n\n for (var i = 0, len = ids.length; i < len; i++) {\n items.push(this._data[ids[i]]);\n }\n\n this._data = {};\n this.length = 0;\n\n this._trigger('remove', {\n items: ids,\n oldData: items\n }, senderId);\n\n return ids;\n }\n /**\r\n * Find the item with maximum value of a specified field.\r\n *\r\n * @param field - Name of the property that should be searched for max value.\r\n *\r\n * @returns Item containing max value, or null if no items.\r\n */\n\n }, {\n key: \"max\",\n value: function max(field) {\n var data = this._data;\n var itemIds = Object.keys(data);\n var max = null;\n var maxField = null;\n\n for (var i = 0, len = itemIds.length; i < len; i++) {\n var id = itemIds[i];\n var item = data[id];\n var itemField = item[field];\n\n if (itemField != null && (maxField == null || itemField > maxField)) {\n max = item;\n maxField = itemField;\n }\n }\n\n return max;\n }\n /**\r\n * Find the item with minimum value of a specified field.\r\n *\r\n * @param field - Name of the property that should be searched for min value.\r\n *\r\n * @returns Item containing min value, or null if no items.\r\n */\n\n }, {\n key: \"min\",\n value: function min(field) {\n var data = this._data;\n var itemIds = Object.keys(data);\n var min = null;\n var minField = null;\n\n for (var i = 0, len = itemIds.length; i < len; i++) {\n var id = itemIds[i];\n var item = data[id];\n var itemField = item[field];\n\n if (itemField != null && (minField == null || itemField < minField)) {\n min = item;\n minField = itemField;\n }\n }\n\n return min;\n }\n /**\r\n * Find all distinct values of a specified field\r\n *\r\n * @param prop - The property name whose distinct values should be returned.\r\n *\r\n * @returns Unordered array containing all distinct values. Items without specified property are ignored.\r\n */\n\n }, {\n key: \"distinct\",\n value: function distinct(prop) {\n var data = this._data;\n var itemIds = Object.keys(data);\n var values = [];\n var fieldType = this._options.type && this._options.type[prop] || null;\n var count = 0;\n\n for (var i = 0, len = itemIds.length; i < len; i++) {\n var id = itemIds[i];\n var item = data[id];\n var value = item[prop];\n var exists = false;\n\n for (var j = 0; j < count; j++) {\n if (values[j] == value) {\n exists = true;\n break;\n }\n }\n\n if (!exists && value !== undefined) {\n values[count] = value;\n count++;\n }\n }\n\n if (fieldType) {\n for (var _i10 = 0, _len10 = values.length; _i10 < _len10; _i10++) {\n values[_i10] = convert(values[_i10], fieldType);\n }\n }\n\n return values;\n }\n /**\r\n * Add a single item. Will fail when an item with the same id already exists.\r\n *\r\n * @param item - A new item to be added.\r\n *\r\n * @returns Added item's id. An id is generated when it is not present in the item.\r\n */\n\n }, {\n key: \"_addItem\",\n value: function _addItem(item) {\n var id = item[this._idProp];\n\n if (id != null) {\n // check whether this id is already taken\n if (this._data[id]) {\n // item already exists\n throw new Error('Cannot add item: item with id ' + id + ' already exists');\n }\n } else {\n // generate an id\n id = uuid4();\n item[this._idProp] = id;\n }\n\n var d = {};\n var fields = Object.keys(item);\n\n for (var i = 0, len = fields.length; i < len; i++) {\n var field = fields[i];\n var fieldType = this._type[field]; // type may be undefined\n\n d[field] = convert(item[field], fieldType);\n }\n\n this._data[id] = d;\n this.length++;\n return id;\n }\n /**\r\n * Get an item. Fields can be converted to a specific type\r\n *\r\n * @param id - Id of the requested item.\r\n * @param types - Property name to type name object map of type converstions.\r\n *\r\n * @returns The item, optionally after type conversion.\r\n */\n\n }, {\n key: \"_getItem\",\n value: function _getItem(id, types) {\n // @TODO: I have no idea how to type this.\n // get the item from the dataset\n var raw = this._data[id];\n\n if (!raw) {\n return null;\n } // convert the items field types\n\n\n var converted;\n var fields = Object.keys(raw);\n\n if (types) {\n converted = {};\n\n for (var i = 0, len = fields.length; i < len; i++) {\n var field = fields[i];\n var value = raw[field];\n converted[field] = convert(value, types[field]);\n }\n } else {\n // no field types specified, no converting needed\n converted = _objectSpread({}, raw);\n }\n\n if (converted[this._idProp] == null) {\n converted[this._idProp] = raw.id;\n }\n\n return converted;\n }\n /**\r\n * Update a single item: merge with existing item.\r\n * Will fail when the item has no id, or when there does not exist an item with the same id.\r\n *\r\n * @param item - The new item\r\n *\r\n * @returns The id of the updated item.\r\n */\n\n }, {\n key: \"_updateItem\",\n value: function _updateItem(item) {\n var id = item[this._idProp];\n\n if (id == null) {\n throw new Error('Cannot update item: item has no id (item: ' + JSON.stringify(item) + ')');\n }\n\n var d = this._data[id];\n\n if (!d) {\n // item doesn't exist\n throw new Error('Cannot update item: no item with id ' + id + ' found');\n } // merge with current item\n\n\n var fields = Object.keys(item);\n\n for (var i = 0, len = fields.length; i < len; i++) {\n var field = fields[i];\n var fieldType = this._type[field] // type may be undefined\n ;\n d[field] = convert(item[field], fieldType);\n }\n\n return id;\n }\n }]);\n\n return DataSet;\n}(DataSetPart);\n\n/**\r\n * DataView\r\n *\r\n * A DataView offers a filtered and/or formatted view on a DataSet. One can subscribe to changes in a DataView, and easily get filtered or formatted data without having to specify filters and field types all the time.\r\n *\r\n * ## Example\r\n * ```javascript\r\n * // create a DataSet\r\n * var data = new vis.DataSet();\r\n * data.add([\r\n * {id: 1, text: 'item 1', date: new Date(2013, 6, 20), group: 1, first: true},\r\n * {id: 2, text: 'item 2', date: '2013-06-23', group: 2},\r\n * {id: 3, text: 'item 3', date: '2013-06-25', group: 2},\r\n * {id: 4, text: 'item 4'}\r\n * ]);\r\n *\r\n * // create a DataView\r\n * // the view will only contain items having a property group with value 1,\r\n * // and will only output fields id, text, and date.\r\n * var view = new vis.DataView(data, {\r\n * filter: function (item) {\r\n * return (item.group == 1);\r\n * },\r\n * fields: ['id', 'text', 'date']\r\n * });\r\n *\r\n * // subscribe to any change in the DataView\r\n * view.on('*', function (event, properties, senderId) {\r\n * console.log('event', event, properties);\r\n * });\r\n *\r\n * // update an item in the data set\r\n * data.update({id: 2, group: 1});\r\n *\r\n * // get all ids in the view\r\n * var ids = view.getIds();\r\n * console.log('ids', ids); // will output [1, 2]\r\n *\r\n * // get all items in the view\r\n * var items = view.get();\r\n * ```\r\n *\r\n * @typeParam Item - Item type that may or may not have an id.\r\n * @typeParam IdProp - Name of the property that contains the id.\r\n */\n\nvar DataView =\n/*#__PURE__*/\nfunction (_DataSetPart) {\n inherits(DataView, _DataSetPart);\n\n /**\r\n * Create a DataView.\r\n *\r\n * @param data - The instance containing data (directly or indirectly).\r\n * @param options - Options to configure this data view.\r\n */\n function DataView(data, options) {\n var _this;\n\n classCallCheck(this, DataView);\n\n _this = possibleConstructorReturn(this, getPrototypeOf(DataView).call(this));\n /** @inheritdoc */\n\n _this.length = 0;\n _this._ids = {}; // ids of the items currently in memory (just contains a boolean true)\n\n _this._options = options || {};\n _this.listener = _this._onEvent.bind(assertThisInitialized(_this));\n\n _this.setData(data);\n\n return _this;\n } // TODO: implement a function .config() to dynamically update things like configured filter\n // and trigger changes accordingly\n\n /**\r\n * Set a data source for the view.\r\n *\r\n * @param data - The instance containing data (directly or indirectly).\r\n */\n\n\n createClass(DataView, [{\n key: \"setData\",\n value: function setData(data) {\n if (this._data) {\n // unsubscribe from current dataset\n if (this._data.off) {\n this._data.off('*', this.listener);\n } // trigger a remove of all items in memory\n\n\n var ids = this._data.getIds({\n filter: this._options.filter\n });\n\n var items = this._data.get(ids);\n\n this._ids = {};\n this.length = 0;\n\n this._trigger('remove', {\n items: ids,\n oldData: items\n });\n }\n\n if (data != null) {\n this._data = data; // trigger an add of all added items\n\n var _ids = this._data.getIds({\n filter: this._options.filter\n });\n\n for (var i = 0, len = _ids.length; i < len; i++) {\n var id = _ids[i];\n this._ids[id] = true;\n }\n\n this.length = _ids.length;\n\n this._trigger('add', {\n items: _ids\n });\n } else {\n this._data = new DataSet();\n } // subscribe to new dataset\n\n\n if (this._data.on) {\n this._data.on('*', this.listener);\n }\n }\n /**\r\n * Refresh the DataView.\r\n * Useful when the DataView has a filter function containing a variable parameter.\r\n */\n\n }, {\n key: \"refresh\",\n value: function refresh() {\n var ids = this._data.getIds({\n filter: this._options.filter\n });\n\n var oldIds = Object.keys(this._ids);\n var newIds = {};\n var addedIds = [];\n var removedIds = [];\n var removedItems = []; // check for additions\n\n for (var i = 0, len = ids.length; i < len; i++) {\n var id = ids[i];\n newIds[id] = true;\n\n if (!this._ids[id]) {\n addedIds.push(id);\n this._ids[id] = true;\n }\n } // check for removals\n\n\n for (var _i = 0, _len = oldIds.length; _i < _len; _i++) {\n var _id = oldIds[_i];\n\n var item = this._data.get(_id);\n\n if (item == null) {\n // @TODO: Investigate.\n // Doesn't happen during tests or examples.\n // Is it really impossible or could it eventually happen?\n // How to handle it if it does? The types guarantee non-nullable items.\n console.error('If you see this, report it please.');\n } else if (!newIds[_id]) {\n removedIds.push(_id);\n removedItems.push(item);\n delete this._ids[_id];\n }\n }\n\n this.length += addedIds.length - removedIds.length; // trigger events\n\n if (addedIds.length) {\n this._trigger('add', {\n items: addedIds\n });\n }\n\n if (removedIds.length) {\n this._trigger('remove', {\n items: removedIds,\n oldData: removedItems\n });\n }\n }\n /** @inheritdoc */\n\n }, {\n key: \"get\",\n value: function get(first, second) {\n if (this._data == null) {\n return null;\n } // parse the arguments\n\n\n var ids = null;\n var options;\n\n if (isId(first) || Array.isArray(first)) {\n ids = first;\n options = second;\n } else {\n options = first;\n } // extend the options with the default options and provided options\n\n\n var viewOptions = Object.assign({}, this._options, options); // create a combined filter method when needed\n\n var thisFilter = this._options.filter;\n var optionsFilter = options && options.filter;\n\n if (thisFilter && optionsFilter) {\n viewOptions.filter = function (item) {\n return thisFilter(item) && optionsFilter(item);\n };\n }\n\n if (ids == null) {\n return this._data.get(viewOptions);\n } else {\n return this._data.get(ids, viewOptions);\n }\n }\n /** @inheritdoc */\n\n }, {\n key: \"getIds\",\n value: function getIds(options) {\n if (this._data.length) {\n var defaultFilter = this._options.filter;\n var optionsFilter = options != null ? options.filter : null;\n var filter;\n\n if (optionsFilter) {\n if (defaultFilter) {\n filter = function filter(item) {\n return defaultFilter(item) && optionsFilter(item);\n };\n } else {\n filter = optionsFilter;\n }\n } else {\n filter = defaultFilter;\n }\n\n return this._data.getIds({\n filter: filter,\n order: options && options.order\n });\n } else {\n return [];\n }\n }\n /** @inheritdoc */\n\n }, {\n key: \"forEach\",\n value: function forEach(callback, options) {\n if (this._data) {\n var defaultFilter = this._options.filter;\n var optionsFilter = options && options.filter;\n var filter;\n\n if (optionsFilter) {\n if (defaultFilter) {\n filter = function filter(item) {\n return defaultFilter(item) && optionsFilter(item);\n };\n } else {\n filter = optionsFilter;\n }\n } else {\n filter = defaultFilter;\n }\n\n this._data.forEach(callback, {\n filter: filter,\n order: options && options.order\n });\n }\n }\n /** @inheritdoc */\n\n }, {\n key: \"map\",\n value: function map(callback, options) {\n if (this._data) {\n var defaultFilter = this._options.filter;\n var optionsFilter = options && options.filter;\n var filter;\n\n if (optionsFilter) {\n if (defaultFilter) {\n filter = function filter(item) {\n return defaultFilter(item) && optionsFilter(item);\n };\n } else {\n filter = optionsFilter;\n }\n } else {\n filter = defaultFilter;\n }\n\n return this._data.map(callback, {\n filter: filter,\n order: options && options.order\n });\n } else {\n return [];\n }\n }\n /** @inheritdoc */\n\n }, {\n key: \"getDataSet\",\n value: function getDataSet() {\n return this._data.getDataSet();\n }\n /**\r\n * Event listener. Will propagate all events from the connected data set to the subscribers of the DataView, but will filter the items and only trigger when there are changes in the filtered data set.\r\n *\r\n * @param event - The name of the event.\r\n * @param params - Parameters of the event.\r\n * @param senderId - Id supplied by the sender.\r\n */\n\n }, {\n key: \"_onEvent\",\n value: function _onEvent(event, params, senderId) {\n if (!params || !params.items || !this._data) {\n return;\n }\n\n var ids = params.items;\n var addedIds = [];\n var updatedIds = [];\n var removedIds = [];\n var oldItems = [];\n var updatedItems = [];\n var removedItems = [];\n\n switch (event) {\n case 'add':\n // filter the ids of the added items\n for (var i = 0, len = ids.length; i < len; i++) {\n var id = ids[i];\n var item = this.get(id);\n\n if (item) {\n this._ids[id] = true;\n addedIds.push(id);\n }\n }\n\n break;\n\n case 'update':\n // determine the event from the views viewpoint: an updated\n // item can be added, updated, or removed from this view.\n for (var _i2 = 0, _len2 = ids.length; _i2 < _len2; _i2++) {\n var _id2 = ids[_i2];\n\n var _item = this.get(_id2);\n\n if (_item) {\n if (this._ids[_id2]) {\n updatedIds.push(_id2);\n updatedItems.push(params.data[_i2]);\n oldItems.push(params.oldData[_i2]);\n } else {\n this._ids[_id2] = true;\n addedIds.push(_id2);\n }\n } else {\n if (this._ids[_id2]) {\n delete this._ids[_id2];\n removedIds.push(_id2);\n removedItems.push(params.oldData[_i2]);\n }\n }\n }\n\n break;\n\n case 'remove':\n // filter the ids of the removed items\n for (var _i3 = 0, _len3 = ids.length; _i3 < _len3; _i3++) {\n var _id3 = ids[_i3];\n\n if (this._ids[_id3]) {\n delete this._ids[_id3];\n removedIds.push(_id3);\n removedItems.push(params.oldData[_i3]);\n }\n }\n\n break;\n }\n\n this.length += addedIds.length - removedIds.length;\n\n if (addedIds.length) {\n this._trigger('add', {\n items: addedIds\n }, senderId);\n }\n\n if (updatedIds.length) {\n this._trigger('update', {\n items: updatedIds,\n oldData: oldItems,\n data: updatedItems\n }, senderId);\n }\n\n if (removedIds.length) {\n this._trigger('remove', {\n items: removedIds,\n oldData: removedItems\n }, senderId);\n }\n }\n }]);\n\n return DataView;\n}(DataSetPart);\n\nvar index = {\n DataSet: DataSet,\n DataView: DataView,\n Queue: Queue\n};\n\nexport default index;\nexport { DataSet, DataView, Queue };\n","/**\n * Canvas shapes used by Network\n */\nif (typeof CanvasRenderingContext2D !== 'undefined') {\n\n /**\n * Draw a circle shape\n *\n * @param {number} x\n * @param {number} y\n * @param {number} r\n */\n CanvasRenderingContext2D.prototype.circle = function (x, y, r) {\n this.beginPath();\n this.arc(x, y, r, 0, 2 * Math.PI, false);\n this.closePath();\n };\n\n /**\n * Draw a square shape\n * @param {number} x horizontal center\n * @param {number} y vertical center\n * @param {number} r size, width and height of the square\n */\n CanvasRenderingContext2D.prototype.square = function (x, y, r) {\n this.beginPath();\n this.rect(x - r, y - r, r * 2, r * 2);\n this.closePath();\n };\n\n /**\n * Draw a triangle shape\n * @param {number} x horizontal center\n * @param {number} y vertical center\n * @param {number} r radius, half the length of the sides of the triangle\n */\n CanvasRenderingContext2D.prototype.triangle = function (x, y, r) {\n // http://en.wikipedia.org/wiki/Equilateral_triangle\n this.beginPath();\n\n // the change in radius and the offset is here to center the shape\n r *= 1.15;\n y += 0.275 * r;\n\n var s = r * 2;\n var s2 = s / 2;\n var ir = Math.sqrt(3) / 6 * s; // radius of inner circle\n var h = Math.sqrt(s * s - s2 * s2); // height\n\n\n this.moveTo(x, y - (h - ir));\n this.lineTo(x + s2, y + ir);\n this.lineTo(x - s2, y + ir);\n this.lineTo(x, y - (h - ir));\n this.closePath();\n\n\n };\n\n /**\n * Draw a triangle shape in downward orientation\n * @param {number} x horizontal center\n * @param {number} y vertical center\n * @param {number} r radius\n */\n CanvasRenderingContext2D.prototype.triangleDown = function (x, y, r) {\n // http://en.wikipedia.org/wiki/Equilateral_triangle\n this.beginPath();\n\n // the change in radius and the offset is here to center the shape\n r *= 1.15;\n y -= 0.275 * r;\n\n var s = r * 2;\n var s2 = s / 2;\n var ir = Math.sqrt(3) / 6 * s; // radius of inner circle\n var h = Math.sqrt(s * s - s2 * s2); // height\n\n this.moveTo(x, y + (h - ir));\n this.lineTo(x + s2, y - ir);\n this.lineTo(x - s2, y - ir);\n this.lineTo(x, y + (h - ir));\n this.closePath();\n };\n\n /**\n * Draw a star shape, a star with 5 points\n * @param {number} x horizontal center\n * @param {number} y vertical center\n * @param {number} r radius, half the length of the sides of the triangle\n */\n CanvasRenderingContext2D.prototype.star = function (x, y, r) {\n // http://www.html5canvastutorials.com/labs/html5-canvas-star-spinner/\n this.beginPath();\n\n // the change in radius and the offset is here to center the shape\n r *= 0.82;\n y += 0.1 * r;\n\n for (var n = 0; n < 10; n++) {\n var radius = (n % 2 === 0) ? r * 1.3 : r * 0.5;\n this.lineTo(\n x + radius * Math.sin(n * 2 * Math.PI / 10),\n y - radius * Math.cos(n * 2 * Math.PI / 10)\n );\n }\n\n this.closePath();\n };\n\n /**\n * Draw a Diamond shape\n * @param {number} x horizontal center\n * @param {number} y vertical center\n * @param {number} r radius, half the length of the sides of the triangle\n */\n CanvasRenderingContext2D.prototype.diamond = function (x, y, r) {\n // http://www.html5canvastutorials.com/labs/html5-canvas-star-spinner/\n this.beginPath();\n\n this.lineTo(x, y + r);\n this.lineTo(x + r, y);\n this.lineTo(x, y - r);\n this.lineTo(x - r, y);\n\n\n this.closePath();\n };\n\n /**\n * http://stackoverflow.com/questions/1255512/how-to-draw-a-rounded-rectangle-on-html-canvas\n *\n * @param {number} x\n * @param {number} y\n * @param {number} w\n * @param {number} h\n * @param {number} r\n */\n CanvasRenderingContext2D.prototype.roundRect = function (x, y, w, h, r) {\n var r2d = Math.PI / 180;\n if (w - ( 2 * r ) < 0) {\n r = ( w / 2 );\n } //ensure that the radius isn't too large for x\n if (h - ( 2 * r ) < 0) {\n r = ( h / 2 );\n } //ensure that the radius isn't too large for y\n this.beginPath();\n this.moveTo(x + r, y);\n this.lineTo(x + w - r, y);\n this.arc(x + w - r, y + r, r, r2d * 270, r2d * 360, false);\n this.lineTo(x + w, y + h - r);\n this.arc(x + w - r, y + h - r, r, 0, r2d * 90, false);\n this.lineTo(x + r, y + h);\n this.arc(x + r, y + h - r, r, r2d * 90, r2d * 180, false);\n this.lineTo(x, y + r);\n this.arc(x + r, y + r, r, r2d * 180, r2d * 270, false);\n this.closePath();\n };\n\n /**\n * http://stackoverflow.com/questions/2172798/how-to-draw-an-oval-in-html5-canvas\n *\n * Postfix '_vis' added to discern it from standard method ellipse().\n *\n * @param {number} x\n * @param {number} y\n * @param {number} w\n * @param {number} h\n */\n CanvasRenderingContext2D.prototype.ellipse_vis = function (x, y, w, h) {\n var kappa = .5522848,\n ox = (w / 2) * kappa, // control point offset horizontal\n oy = (h / 2) * kappa, // control point offset vertical\n xe = x + w, // x-end\n ye = y + h, // y-end\n xm = x + w / 2, // x-middle\n ym = y + h / 2; // y-middle\n\n this.beginPath();\n this.moveTo(x, ym);\n this.bezierCurveTo(x, ym - oy, xm - ox, y, xm, y);\n this.bezierCurveTo(xm + ox, y, xe, ym - oy, xe, ym);\n this.bezierCurveTo(xe, ym + oy, xm + ox, ye, xm, ye);\n this.bezierCurveTo(xm - ox, ye, x, ym + oy, x, ym);\n this.closePath();\n };\n\n\n /**\n * http://stackoverflow.com/questions/2172798/how-to-draw-an-oval-in-html5-canvas\n *\n * @param {number} x\n * @param {number} y\n * @param {number} w\n * @param {number} h\n */\n CanvasRenderingContext2D.prototype.database = function (x, y, w, h) {\n var f = 1 / 3;\n var wEllipse = w;\n var hEllipse = h * f;\n\n var kappa = .5522848,\n ox = (wEllipse / 2) * kappa, // control point offset horizontal\n oy = (hEllipse / 2) * kappa, // control point offset vertical\n xe = x + wEllipse, // x-end\n ye = y + hEllipse, // y-end\n xm = x + wEllipse / 2, // x-middle\n ym = y + hEllipse / 2, // y-middle\n ymb = y + (h - hEllipse / 2), // y-midlle, bottom ellipse\n yeb = y + h; // y-end, bottom ellipse\n\n this.beginPath();\n this.moveTo(xe, ym);\n\n this.bezierCurveTo(xe, ym + oy, xm + ox, ye, xm, ye);\n this.bezierCurveTo(xm - ox, ye, x, ym + oy, x, ym);\n\n this.bezierCurveTo(x, ym - oy, xm - ox, y, xm, y);\n this.bezierCurveTo(xm + ox, y, xe, ym - oy, xe, ym);\n\n this.lineTo(xe, ymb);\n\n this.bezierCurveTo(xe, ymb + oy, xm + ox, yeb, xm, yeb);\n this.bezierCurveTo(xm - ox, yeb, x, ymb + oy, x, ymb);\n\n this.lineTo(x, ym);\n };\n\n\n /**\n * Sets up the dashedLine functionality for drawing\n * Original code came from http://stackoverflow.com/questions/4576724/dotted-stroke-in-canvas\n * @author David Jordan\n * @date 2012-08-08\n *\n * @param {number} x\n * @param {number} y\n * @param {number} x2\n * @param {number} y2\n * @param {string} pattern\n */\n CanvasRenderingContext2D.prototype.dashedLine = function (x, y, x2, y2, pattern) {\n this.beginPath();\n this.moveTo(x, y);\n\n var patternLength = pattern.length;\n var dx = (x2 - x);\n var dy = (y2 - y);\n var slope = dy / dx;\n var distRemaining = Math.sqrt(dx * dx + dy * dy);\n var patternIndex = 0;\n var draw = true;\n var xStep = 0;\n var dashLength = pattern[0];\n\n while (distRemaining >= 0.1) {\n dashLength = pattern[patternIndex++ % patternLength];\n if (dashLength > distRemaining) {\n dashLength = distRemaining;\n }\n\n xStep = Math.sqrt(dashLength * dashLength / (1 + slope * slope));\n xStep = dx < 0 ? -xStep : xStep;\n x += xStep;\n y += slope * xStep;\n\n if (draw === true) {this.lineTo(x,y);}\n else {this.moveTo(x,y);}\n\n distRemaining -= dashLength;\n draw = !draw;\n }\n };\n\n /**\n * Draw a Hexagon shape with 6 sides\n * @param {Number} x horizontal center\n * @param {Number} y vertical center\n * @param {Number} r radius\n */\n CanvasRenderingContext2D.prototype.hexagon = function (x, y, r) {\n this.beginPath();\n var sides = 6;\n var a = (Math.PI*2)/sides;\n this.moveTo(x+r,y);\n for (var i = 1; i < sides; i++) {\n this.lineTo(x+r*Math.cos(a*i),y+r*Math.sin(a*i));\n }\n this.closePath();\n };\n}\n","\r\n/**\r\n * Expose `Emitter`.\r\n */\r\n\r\nif (typeof module !== 'undefined') {\r\n module.exports = Emitter;\r\n}\r\n\r\n/**\r\n * Initialize a new `Emitter`.\r\n *\r\n * @api public\r\n */\r\n\r\nfunction Emitter(obj) {\r\n if (obj) return mixin(obj);\r\n};\r\n\r\n/**\r\n * Mixin the emitter properties.\r\n *\r\n * @param {Object} obj\r\n * @return {Object}\r\n * @api private\r\n */\r\n\r\nfunction mixin(obj) {\r\n for (var key in Emitter.prototype) {\r\n obj[key] = Emitter.prototype[key];\r\n }\r\n return obj;\r\n}\r\n\r\n/**\r\n * Listen on the given `event` with `fn`.\r\n *\r\n * @param {String} event\r\n * @param {Function} fn\r\n * @return {Emitter}\r\n * @api public\r\n */\r\n\r\nEmitter.prototype.on =\r\nEmitter.prototype.addEventListener = function(event, fn){\r\n this._callbacks = this._callbacks || {};\r\n (this._callbacks['$' + event] = this._callbacks['$' + event] || [])\r\n .push(fn);\r\n return this;\r\n};\r\n\r\n/**\r\n * Adds an `event` listener that will be invoked a single\r\n * time then automatically removed.\r\n *\r\n * @param {String} event\r\n * @param {Function} fn\r\n * @return {Emitter}\r\n * @api public\r\n */\r\n\r\nEmitter.prototype.once = function(event, fn){\r\n function on() {\r\n this.off(event, on);\r\n fn.apply(this, arguments);\r\n }\r\n\r\n on.fn = fn;\r\n this.on(event, on);\r\n return this;\r\n};\r\n\r\n/**\r\n * Remove the given callback for `event` or all\r\n * registered callbacks.\r\n *\r\n * @param {String} event\r\n * @param {Function} fn\r\n * @return {Emitter}\r\n * @api public\r\n */\r\n\r\nEmitter.prototype.off =\r\nEmitter.prototype.removeListener =\r\nEmitter.prototype.removeAllListeners =\r\nEmitter.prototype.removeEventListener = function(event, fn){\r\n this._callbacks = this._callbacks || {};\r\n\r\n // all\r\n if (0 == arguments.length) {\r\n this._callbacks = {};\r\n return this;\r\n }\r\n\r\n // specific event\r\n var callbacks = this._callbacks['$' + event];\r\n if (!callbacks) return this;\r\n\r\n // remove all handlers\r\n if (1 == arguments.length) {\r\n delete this._callbacks['$' + event];\r\n return this;\r\n }\r\n\r\n // remove specific handler\r\n var cb;\r\n for (var i = 0; i < callbacks.length; i++) {\r\n cb = callbacks[i];\r\n if (cb === fn || cb.fn === fn) {\r\n callbacks.splice(i, 1);\r\n break;\r\n }\r\n }\r\n\r\n // Remove event specific arrays for event types that no\r\n // one is subscribed for to avoid memory leak.\r\n if (callbacks.length === 0) {\r\n delete this._callbacks['$' + event];\r\n }\r\n\r\n return this;\r\n};\r\n\r\n/**\r\n * Emit `event` with the given args.\r\n *\r\n * @param {String} event\r\n * @param {Mixed} ...\r\n * @return {Emitter}\r\n */\r\n\r\nEmitter.prototype.emit = function(event){\r\n this._callbacks = this._callbacks || {};\r\n\r\n var args = new Array(arguments.length - 1)\r\n , callbacks = this._callbacks['$' + event];\r\n\r\n for (var i = 1; i < arguments.length; i++) {\r\n args[i - 1] = arguments[i];\r\n }\r\n\r\n if (callbacks) {\r\n callbacks = callbacks.slice(0);\r\n for (var i = 0, len = callbacks.length; i < len; ++i) {\r\n callbacks[i].apply(this, args);\r\n }\r\n }\r\n\r\n return this;\r\n};\r\n\r\n/**\r\n * Return array of callbacks for `event`.\r\n *\r\n * @param {String} event\r\n * @return {Array}\r\n * @api public\r\n */\r\n\r\nEmitter.prototype.listeners = function(event){\r\n this._callbacks = this._callbacks || {};\r\n return this._callbacks['$' + event] || [];\r\n};\r\n\r\n/**\r\n * Check if this emitter has `event` handlers.\r\n *\r\n * @param {String} event\r\n * @return {Boolean}\r\n * @api public\r\n */\r\n\r\nEmitter.prototype.hasListeners = function(event){\r\n return !! this.listeners(event).length;\r\n};\r\n","/**\n * Parse a text source containing data in DOT language into a JSON object.\n * The object contains two lists: one with nodes and one with edges.\n *\n * DOT language reference: http://www.graphviz.org/doc/info/lang.html\n *\n * DOT language attributes: http://graphviz.org/content/attrs\n *\n * @param {string} data Text containing a graph in DOT-notation\n * @return {Object} graph An object containing two parameters:\n * {Object[]} nodes\n * {Object[]} edges\n *\n * -------------------------------------------\n * TODO\n * ====\n *\n * For label handling, this is an incomplete implementation. From docs (quote #3015):\n * \n * > the escape sequences \"\\n\", \"\\l\" and \"\\r\" divide the label into lines, centered, \n * > left-justified, and right-justified, respectively.\n *\n * Source: http://www.graphviz.org/content/attrs#kescString\n *\n * > As another aid for readability, dot allows double-quoted strings to span multiple physical\n * > lines using the standard C convention of a backslash immediately preceding a newline\n * > character\n * > In addition, double-quoted strings can be concatenated using a '+' operator.\n * > As HTML strings can contain newline characters, which are used solely for formatting,\n * > the language does not allow escaped newlines or concatenation operators to be used\n * > within them.\n *\n * - Currently, only '\\\\n' is handled\n * - Note that text explicitly says 'labels'; the dot parser currently handles escape\n * sequences in **all** strings.\n */\nfunction parseDOT (data) {\n dot = data;\n return parseGraph();\n}\n\n// mapping of attributes from DOT (the keys) to vis.js (the values)\nvar NODE_ATTR_MAPPING = {\n 'fontsize': 'font.size',\n 'fontcolor': 'font.color',\n 'labelfontcolor': 'font.color',\n 'fontname': 'font.face',\n 'color': ['color.border', 'color.background'],\n 'fillcolor': 'color.background',\n 'tooltip': 'title',\n 'labeltooltip': 'title'\n};\nvar EDGE_ATTR_MAPPING = Object.create(NODE_ATTR_MAPPING);\nEDGE_ATTR_MAPPING.color = 'color.color';\nEDGE_ATTR_MAPPING.style = 'dashes';\n\n// token types enumeration\nvar TOKENTYPE = {\n NULL : 0,\n DELIMITER : 1,\n IDENTIFIER: 2,\n UNKNOWN : 3\n};\n\n// map with all delimiters\nvar DELIMITERS = {\n '{': true,\n '}': true,\n '[': true,\n ']': true,\n ';': true,\n '=': true,\n ',': true,\n\n '->': true,\n '--': true\n};\n\nvar dot = ''; // current dot file\nvar index = 0; // current index in dot file\nvar c = ''; // current token character in expr\nvar token = ''; // current token\nvar tokenType = TOKENTYPE.NULL; // type of the token\n\n/**\n * Get the first character from the dot file.\n * The character is stored into the char c. If the end of the dot file is\n * reached, the function puts an empty string in c.\n */\nfunction first() {\n index = 0;\n c = dot.charAt(0);\n}\n\n/**\n * Get the next character from the dot file.\n * The character is stored into the char c. If the end of the dot file is\n * reached, the function puts an empty string in c.\n */\nfunction next() {\n index++;\n c = dot.charAt(index);\n}\n\n/**\n * Preview the next character from the dot file.\n * @return {string} cNext\n */\nfunction nextPreview() {\n return dot.charAt(index + 1);\n}\n\nvar regexAlphaNumeric = /[a-zA-Z_0-9.:#]/;\n/**\n * Test whether given character is alphabetic or numeric\n * @param {string} c\n * @return {Boolean} isAlphaNumeric\n */\nfunction isAlphaNumeric(c) {\n return regexAlphaNumeric.test(c);\n}\n\n/**\n * Merge all options of object b into object b\n * @param {Object} a\n * @param {Object} b\n * @return {Object} a\n */\nfunction merge (a, b) {\n if (!a) {\n a = {};\n }\n\n if (b) {\n for (var name in b) {\n if (b.hasOwnProperty(name)) {\n a[name] = b[name];\n }\n }\n }\n return a;\n}\n\n/**\n * Set a value in an object, where the provided parameter name can be a\n * path with nested parameters. For example:\n *\n * var obj = {a: 2};\n * setValue(obj, 'b.c', 3); // obj = {a: 2, b: {c: 3}}\n *\n * @param {Object} obj\n * @param {string} path A parameter name or dot-separated parameter path,\n * like \"color.highlight.border\".\n * @param {*} value\n */\nfunction setValue(obj, path, value) {\n var keys = path.split('.');\n var o = obj;\n while (keys.length) {\n var key = keys.shift();\n if (keys.length) {\n // this isn't the end point\n if (!o[key]) {\n o[key] = {};\n }\n o = o[key];\n }\n else {\n // this is the end point\n o[key] = value;\n }\n }\n}\n\n/**\n * Add a node to a graph object. If there is already a node with\n * the same id, their attributes will be merged.\n * @param {Object} graph\n * @param {Object} node\n */\nfunction addNode(graph, node) {\n var i, len;\n var current = null;\n\n // find root graph (in case of subgraph)\n var graphs = [graph]; // list with all graphs from current graph to root graph\n var root = graph;\n while (root.parent) {\n graphs.push(root.parent);\n root = root.parent;\n }\n\n // find existing node (at root level) by its id\n if (root.nodes) {\n for (i = 0, len = root.nodes.length; i < len; i++) {\n if (node.id === root.nodes[i].id) {\n current = root.nodes[i];\n break;\n }\n }\n }\n\n if (!current) {\n // this is a new node\n current = {\n id: node.id\n };\n if (graph.node) {\n // clone default attributes\n current.attr = merge(current.attr, graph.node);\n }\n }\n\n // add node to this (sub)graph and all its parent graphs\n for (i = graphs.length - 1; i >= 0; i--) {\n var g = graphs[i];\n\n if (!g.nodes) {\n g.nodes = [];\n }\n if (g.nodes.indexOf(current) === -1) {\n g.nodes.push(current);\n }\n }\n\n // merge attributes\n if (node.attr) {\n current.attr = merge(current.attr, node.attr);\n }\n}\n\n/**\n * Add an edge to a graph object\n * @param {Object} graph\n * @param {Object} edge\n */\nfunction addEdge(graph, edge) {\n if (!graph.edges) {\n graph.edges = [];\n }\n graph.edges.push(edge);\n if (graph.edge) {\n var attr = merge({}, graph.edge); // clone default attributes\n edge.attr = merge(attr, edge.attr); // merge attributes\n }\n}\n\n/**\n * Create an edge to a graph object\n * @param {Object} graph\n * @param {string | number | Object} from\n * @param {string | number | Object} to\n * @param {string} type\n * @param {Object | null} attr\n * @return {Object} edge\n */\nfunction createEdge(graph, from, to, type, attr) {\n var edge = {\n from: from,\n to: to,\n type: type\n };\n\n if (graph.edge) {\n edge.attr = merge({}, graph.edge); // clone default attributes\n }\n edge.attr = merge(edge.attr || {}, attr); // merge attributes\n\n // Move arrows attribute from attr to edge temporally created in\n // parseAttributeList().\n if (attr != null) {\n if (attr.hasOwnProperty('arrows') && attr['arrows'] != null) {\n edge['arrows'] = {to: {enabled: true, type: attr.arrows.type}};\n attr['arrows'] = null;\n }\n }\n return edge;\n}\n\n/**\n * Get next token in the current dot file.\n * The token and token type are available as token and tokenType\n */\nfunction getToken() {\n tokenType = TOKENTYPE.NULL;\n token = '';\n\n // skip over whitespaces\n while (c === ' ' || c === '\\t' || c === '\\n' || c === '\\r') { // space, tab, enter\n next();\n }\n\n do {\n var isComment = false;\n\n // skip comment\n if (c === '#') {\n // find the previous non-space character\n var i = index - 1;\n while (dot.charAt(i) === ' ' || dot.charAt(i) === '\\t') {\n i--;\n }\n if (dot.charAt(i) === '\\n' || dot.charAt(i) === '') {\n // the # is at the start of a line, this is indeed a line comment\n while (c != '' && c != '\\n') {\n next();\n }\n isComment = true;\n }\n }\n if (c === '/' && nextPreview() === '/') {\n // skip line comment\n while (c != '' && c != '\\n') {\n next();\n }\n isComment = true;\n }\n if (c === '/' && nextPreview() === '*') {\n // skip block comment\n while (c != '') {\n if (c === '*' && nextPreview() === '/') {\n // end of block comment found. skip these last two characters\n next();\n next();\n break;\n }\n else {\n next();\n }\n }\n isComment = true;\n }\n\n // skip over whitespaces\n while (c === ' ' || c === '\\t' || c === '\\n' || c === '\\r') { // space, tab, enter\n next();\n }\n }\n while (isComment);\n\n // check for end of dot file\n if (c === '') {\n // token is still empty\n tokenType = TOKENTYPE.DELIMITER;\n return;\n }\n\n // check for delimiters consisting of 2 characters\n var c2 = c + nextPreview();\n if (DELIMITERS[c2]) {\n tokenType = TOKENTYPE.DELIMITER;\n token = c2;\n next();\n next();\n return;\n }\n\n // check for delimiters consisting of 1 character\n if (DELIMITERS[c]) {\n tokenType = TOKENTYPE.DELIMITER;\n token = c;\n next();\n return;\n }\n\n // check for an identifier (number or string)\n // TODO: more precise parsing of numbers/strings (and the port separator ':')\n if (isAlphaNumeric(c) || c === '-') {\n token += c;\n next();\n\n while (isAlphaNumeric(c)) {\n token += c;\n next();\n }\n if (token === 'false') {\n token = false; // convert to boolean\n }\n else if (token === 'true') {\n token = true; // convert to boolean\n }\n else if (!isNaN(Number(token))) {\n token = Number(token); // convert to number\n }\n tokenType = TOKENTYPE.IDENTIFIER;\n return;\n }\n\n // check for a string enclosed by double quotes\n if (c === '\"') {\n next();\n while (c != '' && (c != '\"' || (c === '\"' && nextPreview() === '\"'))) {\n if (c === '\"') { // skip the escape character\n token += c;\n next();\n } else if (c === '\\\\' && nextPreview() === 'n') { // Honor a newline escape sequence\n token += '\\n';\n next();\n } else {\n token += c;\n }\n next();\n }\n if (c != '\"') {\n throw newSyntaxError('End of string \" expected');\n }\n next();\n tokenType = TOKENTYPE.IDENTIFIER;\n return;\n }\n\n // something unknown is found, wrong characters, a syntax error\n tokenType = TOKENTYPE.UNKNOWN;\n while (c != '') {\n token += c;\n next();\n }\n throw new SyntaxError('Syntax error in part \"' + chop(token, 30) + '\"');\n}\n\n/**\n * Parse a graph.\n * @returns {Object} graph\n */\nfunction parseGraph() {\n var graph = {};\n\n first();\n getToken();\n\n // optional strict keyword\n if (token === 'strict') {\n graph.strict = true;\n getToken();\n }\n\n // graph or digraph keyword\n if (token === 'graph' || token === 'digraph') {\n graph.type = token;\n getToken();\n }\n\n // optional graph id\n if (tokenType === TOKENTYPE.IDENTIFIER) {\n graph.id = token;\n getToken();\n }\n\n // open angle bracket\n if (token != '{') {\n throw newSyntaxError('Angle bracket { expected');\n }\n getToken();\n\n // statements\n parseStatements(graph);\n\n // close angle bracket\n if (token != '}') {\n throw newSyntaxError('Angle bracket } expected');\n }\n getToken();\n\n // end of file\n if (token !== '') {\n throw newSyntaxError('End of file expected');\n }\n getToken();\n\n // remove temporary default options\n delete graph.node;\n delete graph.edge;\n delete graph.graph;\n\n return graph;\n}\n\n/**\n * Parse a list with statements.\n * @param {Object} graph\n */\nfunction parseStatements (graph) {\n while (token !== '' && token != '}') {\n parseStatement(graph);\n if (token === ';') {\n getToken();\n }\n }\n}\n\n/**\n * Parse a single statement. Can be a an attribute statement, node\n * statement, a series of node statements and edge statements, or a\n * parameter.\n * @param {Object} graph\n */\nfunction parseStatement(graph) {\n // parse subgraph\n var subgraph = parseSubgraph(graph);\n if (subgraph) {\n // edge statements\n parseEdge(graph, subgraph);\n\n return;\n }\n\n // parse an attribute statement\n var attr = parseAttributeStatement(graph);\n if (attr) {\n return;\n }\n\n // parse node\n if (tokenType != TOKENTYPE.IDENTIFIER) {\n throw newSyntaxError('Identifier expected');\n }\n var id = token; // id can be a string or a number\n getToken();\n\n if (token === '=') {\n // id statement\n getToken();\n if (tokenType != TOKENTYPE.IDENTIFIER) {\n throw newSyntaxError('Identifier expected');\n }\n graph[id] = token;\n getToken();\n // TODO: implement comma separated list with \"a_list: ID=ID [','] [a_list] \"\n }\n else {\n parseNodeStatement(graph, id);\n }\n}\n\n/**\n * Parse a subgraph\n * @param {Object} graph parent graph object\n * @return {Object | null} subgraph\n */\nfunction parseSubgraph (graph) {\n var subgraph = null;\n\n // optional subgraph keyword\n if (token === 'subgraph') {\n subgraph = {};\n subgraph.type = 'subgraph';\n getToken();\n\n // optional graph id\n if (tokenType === TOKENTYPE.IDENTIFIER) {\n subgraph.id = token;\n getToken();\n }\n }\n\n // open angle bracket\n if (token === '{') {\n getToken();\n\n if (!subgraph) {\n subgraph = {};\n }\n subgraph.parent = graph;\n subgraph.node = graph.node;\n subgraph.edge = graph.edge;\n subgraph.graph = graph.graph;\n\n // statements\n parseStatements(subgraph);\n\n // close angle bracket\n if (token != '}') {\n throw newSyntaxError('Angle bracket } expected');\n }\n getToken();\n\n // remove temporary default options\n delete subgraph.node;\n delete subgraph.edge;\n delete subgraph.graph;\n delete subgraph.parent;\n\n // register at the parent graph\n if (!graph.subgraphs) {\n graph.subgraphs = [];\n }\n graph.subgraphs.push(subgraph);\n }\n\n return subgraph;\n}\n\n/**\n * parse an attribute statement like \"node [shape=circle fontSize=16]\".\n * Available keywords are 'node', 'edge', 'graph'.\n * The previous list with default attributes will be replaced\n * @param {Object} graph\n * @returns {String | null} keyword Returns the name of the parsed attribute\n * (node, edge, graph), or null if nothing\n * is parsed.\n */\nfunction parseAttributeStatement (graph) {\n // attribute statements\n if (token === 'node') {\n getToken();\n\n // node attributes\n graph.node = parseAttributeList();\n return 'node';\n }\n else if (token === 'edge') {\n getToken();\n\n // edge attributes\n graph.edge = parseAttributeList();\n return 'edge';\n }\n else if (token === 'graph') {\n getToken();\n\n // graph attributes\n graph.graph = parseAttributeList();\n return 'graph';\n }\n\n return null;\n}\n\n/**\n * parse a node statement\n * @param {Object} graph\n * @param {string | number} id\n */\nfunction parseNodeStatement(graph, id) {\n // node statement\n var node = {\n id: id\n };\n var attr = parseAttributeList();\n if (attr) {\n node.attr = attr;\n }\n addNode(graph, node);\n\n // edge statements\n parseEdge(graph, id);\n}\n\n/**\n * Parse an edge or a series of edges\n * @param {Object} graph\n * @param {string | number} from Id of the from node\n */\nfunction parseEdge(graph, from) {\n while (token === '->' || token === '--') {\n var to;\n var type = token;\n getToken();\n\n var subgraph = parseSubgraph(graph);\n if (subgraph) {\n to = subgraph;\n }\n else {\n if (tokenType != TOKENTYPE.IDENTIFIER) {\n throw newSyntaxError('Identifier or subgraph expected');\n }\n to = token;\n addNode(graph, {\n id: to\n });\n getToken();\n }\n\n // parse edge attributes\n var attr = parseAttributeList();\n\n // create edge\n var edge = createEdge(graph, from, to, type, attr);\n addEdge(graph, edge);\n\n from = to;\n }\n}\n\n/**\n * As explained in [1], graphviz has limitations for combination of\n * arrow[head|tail] and dir. If attribute list includes 'dir',\n * following cases just be supported.\n * 1. both or none + arrowhead, arrowtail\n * 2. forward + arrowhead (arrowtail is not affedted)\n * 3. back + arrowtail (arrowhead is not affected)\n * [1] https://www.graphviz.org/doc/info/attrs.html#h:undir_note\n *\n * This function is called from parseAttributeList() to parse 'dir'\n * attribute with given 'attr_names' and 'attr_list'.\n * @param {Object} attr_names Array of attribute names\n * @param {Object} attr_list Array of objects of attribute set\n * @return {Object} attr_list Updated attr_list\n */\nfunction parseDirAttribute(attr_names, attr_list) {\n var i;\n if (attr_names.includes('dir')) {\n var idx = {}; // get index of 'arrows' and 'dir'\n idx.arrows = {};\n for (i = 0; i < attr_list.length; i++) {\n if (attr_list[i].name === 'arrows') {\n if (attr_list[i].value.to != null) {\n idx.arrows.to = i;\n } else if (attr_list[i].value.from != null) {\n idx.arrows.from = i;\n } else {\n throw newSyntaxError('Invalid value of arrows');\n }\n } else if (attr_list[i].name === 'dir') {\n idx.dir = i;\n }\n }\n\n // first, add default arrow shape if it is not assigned to avoid error\n var dir_type = attr_list[idx.dir].value;\n if (!attr_names.includes('arrows')) {\n if (dir_type === 'both') {\n attr_list.push(\n {'attr': attr_list[idx.dir].attr, 'name': 'arrows',\n 'value': {'to': {'enabled': true}}\n }\n );\n idx.arrows.to = attr_list.length - 1;\n attr_list.push(\n {'attr': attr_list[idx.dir].attr, 'name': 'arrows',\n 'value': {'from': {'enabled': true}}\n }\n );\n idx.arrows.from = attr_list.length - 1;\n } else if (dir_type === 'forward') {\n attr_list.push(\n {'attr': attr_list[idx.dir].attr, 'name': 'arrows',\n 'value': {'to': {'enabled': true}}\n }\n );\n idx.arrows.to = attr_list.length - 1;\n } else if (dir_type === 'back') {\n attr_list.push(\n {'attr': attr_list[idx.dir].attr, 'name': 'arrows',\n 'value': {'from': {'enabled': true}}\n }\n );\n idx.arrows.from = attr_list.length - 1;\n } else if (dir_type === 'none') {\n attr_list.push(\n {'attr': attr_list[idx.dir].attr, 'name': 'arrows', 'value': ''}\n );\n idx.arrows.to = attr_list.length - 1;\n } else {\n throw newSyntaxError('Invalid dir type \"' + dir_type + '\"');\n }\n }\n\n var from_type;\n var to_type;\n // update 'arrows' attribute from 'dir'.\n if (dir_type === 'both') {\n // both of shapes of 'from' and 'to' are given\n if (idx.arrows.to && idx.arrows.from) {\n to_type = attr_list[idx.arrows.to].value.to.type;\n from_type = attr_list[idx.arrows.from].value.from.type;\n attr_list[idx.arrows.to] = {\n 'attr': attr_list[idx.arrows.to].attr,\n 'name': attr_list[idx.arrows.to].name,\n 'value': {\n 'to': {'enabled': true, 'type': to_type},\n 'from': {'enabled': true, 'type': from_type}\n }\n };\n attr_list.splice(idx.arrows.from, 1);\n\n // shape of 'to' is assigned and use default to 'from'\n } else if (idx.arrows.to) {\n to_type = attr_list[idx.arrows.to].value.to.type;\n from_type = 'arrow';\n attr_list[idx.arrows.to] = {\n 'attr': attr_list[idx.arrows.to].attr,\n 'name': attr_list[idx.arrows.to].name,\n 'value': {\n 'to': {'enabled': true, 'type': to_type},\n 'from': {'enabled': true, 'type': from_type}\n }\n };\n\n // only shape of 'from' is assigned and use default for 'to'\n } else if (idx.arrows.from) {\n to_type = 'arrow';\n from_type = attr_list[idx.arrows.from].value.from.type;\n attr_list[idx.arrows.from] = {\n 'attr': attr_list[idx.arrows.from].attr,\n 'name': attr_list[idx.arrows.from].name,\n 'value': {\n 'to': {'enabled': true, 'type': to_type},\n 'from': {'enabled': true, 'type': from_type}\n }\n };\n }\n\n } else if (dir_type === 'back') {\n // given both of shapes, but use only 'from'\n if (idx.arrows.to && idx.arrows.from) {\n to_type = '';\n from_type = attr_list[idx.arrows.from].value.from.type;\n attr_list[idx.arrows.from] = {\n 'attr': attr_list[idx.arrows.from].attr,\n 'name': attr_list[idx.arrows.from].name,\n 'value': {\n 'to': {'enabled': true, 'type': to_type},\n 'from': {'enabled': true, 'type': from_type}\n }\n };\n\n // given shape of 'to', but does not use it\n } else if (idx.arrows.to) {\n to_type = '';\n from_type = 'arrow';\n idx.arrows.from = idx.arrows.to;\n attr_list[idx.arrows.from] = {\n 'attr': attr_list[idx.arrows.from].attr,\n 'name': attr_list[idx.arrows.from].name,\n 'value': {\n 'to': {'enabled': true, 'type': to_type},\n 'from': {'enabled': true, 'type': from_type}\n }\n };\n\n // assign given 'from' shape\n } else if (idx.arrows.from) {\n to_type = '';\n from_type = attr_list[idx.arrows.from].value.from.type;\n attr_list[idx.arrows.to] = {\n 'attr': attr_list[idx.arrows.from].attr,\n 'name': attr_list[idx.arrows.from].name,\n 'value': {\n 'to': {'enabled': true, 'type': to_type},\n 'from': {'enabled': true, 'type': from_type}\n }\n };\n }\n\n attr_list[idx.arrows.from] = {\n 'attr': attr_list[idx.arrows.from].attr,\n 'name': attr_list[idx.arrows.from].name,\n 'value': {\n 'from': {\n 'enabled': true,\n 'type': attr_list[idx.arrows.from].value.from.type}\n }\n };\n\n } else if (dir_type === 'none') {\n var idx_arrow;\n if (idx.arrows.to) {\n idx_arrow = idx.arrows.to;\n } else {\n idx_arrow = idx.arrows.from;\n }\n\n attr_list[idx_arrow] = {\n 'attr': attr_list[idx_arrow].attr,\n 'name': attr_list[idx_arrow].name,\n 'value': ''\n };\n\n } else if (dir_type === 'forward'){\n // given both of shapes, but use only 'to'\n if (idx.arrows.to && idx.arrows.from) {\n to_type = attr_list[idx.arrows.to].value.to.type;\n from_type = '';\n attr_list[idx.arrows.to] = {\n 'attr': attr_list[idx.arrows.to].attr,\n 'name': attr_list[idx.arrows.to].name,\n 'value': {\n 'to': {'enabled': true, 'type': to_type},\n 'from': {'enabled': true, 'type': from_type}\n }\n };\n\n // assign given 'to' shape\n } else if (idx.arrows.to) {\n to_type = attr_list[idx.arrows.to].value.to.type;\n from_type = '';\n attr_list[idx.arrows.to] = {\n 'attr': attr_list[idx.arrows.to].attr,\n 'name': attr_list[idx.arrows.to].name,\n 'value': {\n 'to': {'enabled': true, 'type': to_type},\n 'from': {'enabled': true, 'type': from_type}\n }\n };\n\n // given shape of 'from', but does not use it\n } else if (idx.arrows.from) {\n to_type = 'arrow';\n from_type = '';\n idx.arrows.to = idx.arrows.from;\n attr_list[idx.arrows.to] = {\n 'attr': attr_list[idx.arrows.to].attr,\n 'name': attr_list[idx.arrows.to].name,\n 'value': {\n 'to': {'enabled': true, 'type': to_type},\n 'from': {'enabled': true, 'type': from_type}\n }\n };\n }\n\n attr_list[idx.arrows.to] = {\n 'attr': attr_list[idx.arrows.to].attr,\n 'name': attr_list[idx.arrows.to].name,\n 'value': {\n 'to': {\n 'enabled': true,\n 'type': attr_list[idx.arrows.to].value.to.type\n }\n }\n };\n } else {\n throw newSyntaxError('Invalid dir type \"' + dir_type + '\"');\n }\n\n // remove 'dir' attribute no need anymore\n attr_list.splice(idx.dir, 1);\n }\n return attr_list;\n}\n\n/**\n * Parse a set with attributes,\n * for example [label=\"1.000\", shape=solid]\n * @return {Object | null} attr\n */\nfunction parseAttributeList() {\n var i;\n var attr = null;\n\n // edge styles of dot and vis\n var edgeStyles = {\n 'dashed': true,\n 'solid': false,\n 'dotted': [1, 5]\n };\n\n /**\n * Define arrow types.\n * vis currently supports types defined in 'arrowTypes'.\n * Details of arrow shapes are described in\n * http://www.graphviz.org/content/arrow-shapes\n */\n var arrowTypes = {\n dot: 'circle',\n box: 'box',\n crow: 'crow',\n curve: 'curve',\n icurve: 'inv_curve',\n normal: 'triangle',\n inv: 'inv_triangle',\n diamond: 'diamond',\n tee: 'bar',\n vee: 'vee'\n };\n\n /**\n * 'attr_list' contains attributes for checking if some of them are affected\n * later. For instance, both of 'arrowhead' and 'dir' (edge style defined\n * in DOT) make changes to 'arrows' attribute in vis.\n */\n var attr_list = new Array();\n var attr_names = new Array(); // used for checking the case.\n\n // parse attributes\n while (token === '[') {\n getToken();\n attr = {};\n while (token !== '' && token != ']') {\n if (tokenType != TOKENTYPE.IDENTIFIER) {\n throw newSyntaxError('Attribute name expected');\n }\n var name = token;\n\n getToken();\n if (token != '=') {\n throw newSyntaxError('Equal sign = expected');\n }\n getToken();\n\n if (tokenType != TOKENTYPE.IDENTIFIER) {\n throw newSyntaxError('Attribute value expected');\n }\n var value = token;\n\n // convert from dot style to vis\n if (name === 'style') {\n value = edgeStyles[value];\n }\n\n var arrowType;\n if (name === 'arrowhead') {\n arrowType = arrowTypes[value];\n name = 'arrows';\n value = {'to': {'enabled': true, 'type': arrowType}};\n }\n\n if (name === 'arrowtail') {\n arrowType = arrowTypes[value];\n name = 'arrows';\n value = {'from': {'enabled': true, 'type': arrowType}};\n }\n\n attr_list.push(\n {'attr': attr, 'name': name, 'value': value}\n );\n attr_names.push(name);\n\n getToken();\n if (token == ',') {\n getToken();\n }\n }\n\n if (token != ']') {\n throw newSyntaxError('Bracket ] expected');\n }\n getToken();\n }\n\n /**\n * As explained in [1], graphviz has limitations for combination of\n * arrow[head|tail] and dir. If attribute list includes 'dir',\n * following cases just be supported.\n * 1. both or none + arrowhead, arrowtail\n * 2. forward + arrowhead (arrowtail is not affedted)\n * 3. back + arrowtail (arrowhead is not affected)\n * [1] https://www.graphviz.org/doc/info/attrs.html#h:undir_note\n */\n if (attr_names.includes('dir')) {\n var idx = {}; // get index of 'arrows' and 'dir'\n idx.arrows = {};\n for (i = 0; i < attr_list.length; i++) {\n if (attr_list[i].name === 'arrows') {\n if (attr_list[i].value.to != null) {\n idx.arrows.to = i;\n } else if (attr_list[i].value.from != null) {\n idx.arrows.from = i;\n } else {\n throw newSyntaxError('Invalid value of arrows');\n }\n } else if (attr_list[i].name === 'dir') {\n idx.dir = i;\n }\n }\n\n // first, add default arrow shape if it is not assigned to avoid error\n var dir_type = attr_list[idx.dir].value;\n if (!attr_names.includes('arrows')) {\n if (dir_type === 'both') {\n attr_list.push(\n {'attr': attr_list[idx.dir].attr, 'name': 'arrows',\n 'value': {to: {enabled:true}}\n }\n );\n idx.arrows.to = attr_list.length - 1;\n attr_list.push(\n {'attr': attr_list[idx.dir].attr, 'name': 'arrows',\n 'value': {from: {enabled:true}}\n }\n );\n idx.arrows.from = attr_list.length - 1;\n } else if (dir_type === 'forward') {\n attr_list.push(\n {'attr': attr_list[idx.dir].attr, 'name': 'arrows',\n 'value': {to: {enabled:true}}\n }\n );\n idx.arrows.to = attr_list.length - 1;\n } else if (dir_type === 'back') {\n attr_list.push(\n {'attr': attr_list[idx.dir].attr, 'name': 'arrows',\n 'value': {from: {enabled:true}}\n }\n );\n idx.arrows.from = attr_list.length - 1;\n } else if (dir_type === 'none') {\n attr_list.push(\n {'attr': attr_list[idx.dir].attr, 'name': 'arrows', 'value': ''}\n );\n idx.arrows.to = attr_list.length - 1;\n } else {\n throw newSyntaxError('Invalid dir type \"' + dir_type + '\"');\n }\n }\n\n var from_type;\n var to_type;\n // update 'arrows' attribute from 'dir'.\n if (dir_type === 'both') {\n // both of shapes of 'from' and 'to' are given\n if (idx.arrows.to && idx.arrows.from) {\n to_type = attr_list[idx.arrows.to].value.to.type;\n from_type = attr_list[idx.arrows.from].value.from.type;\n attr_list[idx.arrows.to] = {\n 'attr': attr_list[idx.arrows.to].attr,\n 'name': attr_list[idx.arrows.to].name,\n 'value': {\n to:{enabled:true, type: to_type},\n from:{enabled:true, type: from_type}\n }\n };\n attr_list.splice(idx.arrows.from, 1);\n\n // shape of 'to' is assigned and use default to 'from'\n } else if (idx.arrows.to) {\n to_type = attr_list[idx.arrows.to].value.to.type;\n from_type = 'arrow';\n attr_list[idx.arrows.to] = {\n 'attr': attr_list[idx.arrows.to].attr,\n 'name': attr_list[idx.arrows.to].name,\n 'value': {\n to:{enabled:true, type: to_type},\n from:{enabled:true, type: from_type}\n }\n };\n\n // only shape of 'from' is assigned and use default for 'to'\n } else if (idx.arrows.from) {\n to_type = 'arrow';\n from_type = attr_list[idx.arrows.from].value.from.type;\n attr_list[idx.arrows.from] = {\n 'attr': attr_list[idx.arrows.from].attr,\n 'name': attr_list[idx.arrows.from].name,\n 'value': {\n to:{enabled:true, type: to_type},\n from:{enabled:true, type: from_type}\n }\n };\n }\n\n } else if (dir_type === 'back') {\n // given both of shapes, but use only 'from'\n if (idx.arrows.to && idx.arrows.from) {\n to_type = '';\n from_type = attr_list[idx.arrows.from].value.from.type;\n attr_list[idx.arrows.from] = {\n 'attr': attr_list[idx.arrows.from].attr,\n 'name': attr_list[idx.arrows.from].name,\n 'value': {\n to:{enabled:true, type: to_type},\n from:{enabled:true, type: from_type}\n }\n };\n\n // given shape of 'to', but does not use it\n } else if (idx.arrows.to) {\n to_type = '';\n from_type = 'arrow';\n idx.arrows.from = idx.arrows.to;\n attr_list[idx.arrows.from] = {\n 'attr': attr_list[idx.arrows.from].attr,\n 'name': attr_list[idx.arrows.from].name,\n 'value': {\n to:{enabled:true, type: to_type},\n from:{enabled:true, type: from_type}\n }\n };\n\n // assign given 'from' shape\n } else if (idx.arrows.from) {\n to_type = '';\n from_type = attr_list[idx.arrows.from].value.from.type;\n attr_list[idx.arrows.to] = {\n 'attr': attr_list[idx.arrows.from].attr,\n 'name': attr_list[idx.arrows.from].name,\n 'value': {\n to:{enabled:true, type: to_type},\n from:{enabled:true, type: from_type}\n }\n };\n }\n\n attr_list[idx.arrows.from] = {\n 'attr': attr_list[idx.arrows.from].attr,\n 'name': attr_list[idx.arrows.from].name,\n 'value': {from: {enabled:true, type: attr_list[idx.arrows.from].value.from.type}}\n };\n\n } else if (dir_type === 'none') {\n var idx_arrow;\n if (idx.arrows.to) {\n idx_arrow = idx.arrows.to;\n } else {\n idx_arrow = idx.arrows.from;\n }\n\n attr_list[idx_arrow] = {\n 'attr': attr_list[idx_arrow].attr,\n 'name': attr_list[idx_arrow].name,\n 'value': ''\n };\n\n } else if (dir_type === 'forward'){\n // given both of shapes, but use only 'to'\n if (idx.arrows.to && idx.arrows.from) {\n to_type = attr_list[idx.arrows.to].value.to.type;\n from_type = '';\n attr_list[idx.arrows.to] = {\n 'attr': attr_list[idx.arrows.to].attr,\n 'name': attr_list[idx.arrows.to].name,\n 'value': {\n to:{enabled:true, type: to_type},\n from:{enabled:true, type: from_type}\n }\n };\n\n // assign given 'to' shape\n } else if (idx.arrows.to) {\n to_type = attr_list[idx.arrows.to].value.to.type;\n from_type = '';\n attr_list[idx.arrows.to] = {\n 'attr': attr_list[idx.arrows.to].attr,\n 'name': attr_list[idx.arrows.to].name,\n 'value': {\n to:{enabled:true, type: to_type},\n from:{enabled:true, type: from_type}\n }\n };\n\n // given shape of 'from', but does not use it\n } else if (idx.arrows.from) {\n to_type = 'arrow';\n from_type = '';\n idx.arrows.to = idx.arrows.from;\n attr_list[idx.arrows.to] = {\n 'attr': attr_list[idx.arrows.to].attr,\n 'name': attr_list[idx.arrows.to].name,\n 'value': {\n to:{enabled:true, type: to_type},\n from:{enabled:true, type: from_type}\n }\n };\n }\n\n attr_list[idx.arrows.to] = {\n 'attr': attr_list[idx.arrows.to].attr,\n 'name': attr_list[idx.arrows.to].name,\n 'value': {\n to: {enabled:true, type: attr_list[idx.arrows.to].value.to.type}\n }\n };\n } else {\n throw newSyntaxError('Invalid dir type \"' + dir_type + '\"');\n }\n\n // remove 'dir' attribute no need anymore\n attr_list.splice(idx.dir, 1);\n }\n\n // parse 'penwidth'\n var nof_attr_list;\n if (attr_names.includes('penwidth')) {\n var tmp_attr_list = [];\n\n nof_attr_list = attr_list.length;\n for (i = 0; i < nof_attr_list; i++) {\n // exclude 'width' from attr_list if 'penwidth' exists\n if (attr_list[i].name !== 'width') {\n if (attr_list[i].name === 'penwidth') {\n attr_list[i].name = 'width';\n }\n tmp_attr_list.push(attr_list[i]);\n }\n }\n attr_list = tmp_attr_list;\n }\n\n nof_attr_list = attr_list.length;\n for (i = 0; i < nof_attr_list; i++) {\n setValue(attr_list[i].attr, attr_list[i].name, attr_list[i].value);\n }\n\n return attr;\n}\n\n/**\n * Create a syntax error with extra information on current token and index.\n * @param {string} message\n * @returns {SyntaxError} err\n */\nfunction newSyntaxError(message) {\n return new SyntaxError(message + ', got \"' + chop(token, 30) + '\" (char ' + index + ')');\n}\n\n/**\n * Chop off text after a maximum length\n * @param {string} text\n * @param {number} maxLength\n * @returns {String}\n */\nfunction chop (text, maxLength) {\n return (text.length <= maxLength) ? text : (text.substr(0, 27) + '...');\n}\n\n/**\n * Execute a function fn for each pair of elements in two arrays\n * @param {Array | *} array1\n * @param {Array | *} array2\n * @param {function} fn\n */\nfunction forEach2(array1, array2, fn) {\n if (Array.isArray(array1)) {\n array1.forEach(function (elem1) {\n if (Array.isArray(array2)) {\n array2.forEach(function (elem2) {\n fn(elem1, elem2);\n });\n }\n else {\n fn(elem1, array2);\n }\n });\n }\n else {\n if (Array.isArray(array2)) {\n array2.forEach(function (elem2) {\n fn(array1, elem2);\n });\n }\n else {\n fn(array1, array2);\n }\n }\n}\n\n/**\n * Set a nested property on an object\n * When nested objects are missing, they will be created.\n * For example setProp({}, 'font.color', 'red') will return {font: {color: 'red'}}\n * @param {Object} object\n * @param {string} path A dot separated string like 'font.color'\n * @param {*} value Value for the property\n * @return {Object} Returns the original object, allows for chaining.\n */\nfunction setProp(object, path, value) {\n var names = path.split('.');\n var prop = names.pop();\n\n // traverse over the nested objects\n var obj = object;\n for (var i = 0; i < names.length; i++) {\n var name = names[i];\n if (!(name in obj)) {\n obj[name] = {};\n }\n obj = obj[name];\n }\n\n // set the property value\n obj[prop] = value;\n\n return object;\n}\n\n/**\n * Convert an object with DOT attributes to their vis.js equivalents.\n * @param {Object} attr Object with DOT attributes\n * @param {Object} mapping\n * @return {Object} Returns an object with vis.js attributes\n */\nfunction convertAttr (attr, mapping) {\n var converted = {};\n\n for (var prop in attr) {\n if (attr.hasOwnProperty(prop)) {\n var visProp = mapping[prop];\n if (Array.isArray(visProp)) {\n visProp.forEach(function (visPropI) {\n setProp(converted, visPropI, attr[prop]);\n })\n }\n else if (typeof visProp === 'string') {\n setProp(converted, visProp, attr[prop]);\n }\n else {\n setProp(converted, prop, attr[prop]);\n }\n }\n }\n\n return converted;\n}\n\n/**\n * Convert a string containing a graph in DOT language into a map containing\n * with nodes and edges in the format of graph.\n * @param {string} data Text containing a graph in DOT-notation\n * @return {Object} graphData\n */\nfunction DOTToGraph (data) {\n // parse the DOT file\n var dotData = parseDOT(data);\n var graphData = {\n nodes: [],\n edges: [],\n options: {}\n };\n\n // copy the nodes\n if (dotData.nodes) {\n dotData.nodes.forEach(function (dotNode) {\n var graphNode = {\n id: dotNode.id,\n label: String(dotNode.label || dotNode.id)\n };\n merge(graphNode, convertAttr(dotNode.attr, NODE_ATTR_MAPPING));\n if (graphNode.image) {\n graphNode.shape = 'image';\n }\n graphData.nodes.push(graphNode);\n });\n }\n\n // copy the edges\n if (dotData.edges) {\n /**\n * Convert an edge in DOT format to an edge with VisGraph format\n * @param {Object} dotEdge\n * @returns {Object} graphEdge\n */\n var convertEdge = function (dotEdge) {\n var graphEdge = {\n from: dotEdge.from,\n to: dotEdge.to\n };\n merge(graphEdge, convertAttr(dotEdge.attr, EDGE_ATTR_MAPPING));\n\n // Add arrows attribute to default styled arrow.\n // The reason why default style is not added in parseAttributeList() is\n // because only default is cleared before here.\n if (graphEdge.arrows == null && dotEdge.type === '->') {\n graphEdge.arrows = 'to';\n }\n\n return graphEdge;\n };\n\n dotData.edges.forEach(function (dotEdge) {\n var from, to;\n if (dotEdge.from instanceof Object) {\n from = dotEdge.from.nodes;\n }\n else {\n from = {\n id: dotEdge.from\n }\n }\n\n if (dotEdge.to instanceof Object) {\n to = dotEdge.to.nodes;\n }\n else {\n to = {\n id: dotEdge.to\n }\n }\n\n if (dotEdge.from instanceof Object && dotEdge.from.edges) {\n dotEdge.from.edges.forEach(function (subEdge) {\n var graphEdge = convertEdge(subEdge);\n graphData.edges.push(graphEdge);\n });\n }\n\n forEach2(from, to, function (from, to) {\n var subEdge = createEdge(graphData, from.id, to.id, dotEdge.type, dotEdge.attr);\n var graphEdge = convertEdge(subEdge);\n graphData.edges.push(graphEdge);\n });\n\n if (dotEdge.to instanceof Object && dotEdge.to.edges) {\n dotEdge.to.edges.forEach(function (subEdge) {\n var graphEdge = convertEdge(subEdge);\n graphData.edges.push(graphEdge);\n });\n }\n });\n }\n\n // copy the options\n if (dotData.attr) {\n graphData.options = dotData.attr;\n }\n\n return graphData;\n}\n\n// exports\nexports.parseDOT = parseDOT;\nexports.DOTToGraph = DOTToGraph;\n","export type Id = number | string\n\nexport interface ColorObject {\n background: string\n border: string\n highlight: {\n background: string\n border: string\n }\n hover: {\n background: string\n border: string\n }\n}\n\nexport interface GephiData {\n nodes: GephiNode[]\n edges: GephiEdge[]\n}\nexport interface GephiParseOptions {\n fixed?: boolean\n inheritColor?: boolean\n parseColor?: boolean\n}\n\nexport interface GephiNode {\n id: Id\n\n attributes?: { title?: string }\n color?: string\n label?: string\n size?: number\n title?: string\n x?: number\n y?: number\n}\nexport interface GephiEdge {\n id: Id\n source: Id\n target: Id\n\n attributes?: { title?: string }\n color?: string\n label?: string\n type?: string\n}\n\nexport interface VisData {\n nodes: VisNode[]\n edges: VisEdge[]\n}\n\nexport interface VisNode {\n id: Id\n fixed: boolean\n\n color?: string | ColorObject\n label?: string\n size?: number\n title?: string\n x?: number\n y?: number\n\n attributes?: unknown\n}\nexport interface VisEdge {\n id: Id\n from: Id\n to: Id\n\n arrows?: 'to'\n color?: string\n label?: string\n title?: string\n\n attributes?: unknown\n}\n\n/**\n * Convert Gephi to Vis.\n *\n * @param gephiJSON - The parsed JSON data in Gephi format.\n * @param optionsObj - Additional options.\n *\n * @returns The converted data ready to be used in Vis.\n */\nexport function parseGephi(\n gephiJSON: GephiData,\n optionsObj?: GephiParseOptions\n): VisData {\n const options = {\n edges: {\n inheritColor: false,\n },\n nodes: {\n fixed: false,\n parseColor: false,\n },\n }\n\n if (optionsObj != null) {\n if (optionsObj.fixed != null) {\n options.nodes.fixed = optionsObj.fixed\n }\n if (optionsObj.parseColor != null) {\n options.nodes.parseColor = optionsObj.parseColor\n }\n if (optionsObj.inheritColor != null) {\n options.edges.inheritColor = optionsObj.inheritColor\n }\n }\n\n const gEdges = gephiJSON.edges\n const vEdges = gEdges.map(\n (gEdge): VisEdge => {\n const vEdge: VisEdge = {\n from: gEdge.source,\n id: gEdge.id,\n to: gEdge.target,\n }\n\n if (gEdge.attributes != null) {\n vEdge.attributes = gEdge.attributes\n }\n if (gEdge.label != null) {\n vEdge.label = gEdge.label\n }\n if (gEdge.attributes != null && gEdge.attributes.title != null) {\n vEdge.title = gEdge.attributes.title\n }\n if (gEdge.type === 'Directed') {\n vEdge.arrows = 'to'\n }\n // edge['value'] = gEdge.attributes != null ? gEdge.attributes.Weight : undefined;\n // edge['width'] = edge['value'] != null ? undefined : edgegEdge.size;\n if (gEdge.color && options.edges.inheritColor === false) {\n vEdge.color = gEdge.color\n }\n\n return vEdge\n }\n )\n\n const vNodes = gephiJSON.nodes.map(\n (gNode): VisNode => {\n const vNode: VisNode = {\n id: gNode.id,\n fixed: options.nodes.fixed && gNode.x != null && gNode.y != null,\n }\n\n if (gNode.attributes != null) {\n vNode.attributes = gNode.attributes\n }\n if (gNode.label != null) {\n vNode.label = gNode.label\n }\n if (gNode.size != null) {\n vNode.size = gNode.size\n }\n if (gNode.attributes != null && gNode.attributes.title != null) {\n vNode.title = gNode.attributes.title\n }\n if (gNode.title != null) {\n vNode.title = gNode.title\n }\n if (gNode.x != null) {\n vNode.x = gNode.x\n }\n if (gNode.y != null) {\n vNode.y = gNode.y\n }\n if (gNode.color != null) {\n if (options.nodes.parseColor === true) {\n vNode.color = gNode.color\n } else {\n vNode.color = {\n background: gNode.color,\n border: gNode.color,\n highlight: {\n background: gNode.color,\n border: gNode.color,\n },\n hover: {\n background: gNode.color,\n border: gNode.color,\n },\n }\n }\n }\n\n return vNode\n }\n )\n\n return { nodes: vNodes, edges: vEdges }\n}\n","\"use strict\";\r\n/**\r\n * Created by Alex on 11/6/2014.\r\n */\r\n\r\n// https://github.com/umdjs/umd/blob/master/returnExports.js#L40-L60\r\n// if the module has no dependencies, the above pattern can be simplified to\r\n(function (root, factory) {\r\n if (typeof define === 'function' && define.amd) {\r\n // AMD. Register as an anonymous module.\r\n define([], factory);\r\n } else if (typeof exports === 'object') {\r\n // Node. Does not work with strict CommonJS, but\r\n // only CommonJS-like environments that support module.exports,\r\n // like Node.\r\n module.exports = factory();\r\n } else {\r\n // Browser globals (root is window)\r\n root.keycharm = factory();\r\n }\r\n}(this, function () {\r\n\r\n function keycharm(options) {\r\n var preventDefault = options && options.preventDefault || false;\r\n\r\n var container = options && options.container || window;\r\n\r\n var _exportFunctions = {};\r\n var _bound = {keydown:{}, keyup:{}};\r\n var _keys = {};\r\n var i;\r\n\r\n // a - z\r\n for (i = 97; i <= 122; i++) {_keys[String.fromCharCode(i)] = {code:65 + (i - 97), shift: false};}\r\n // A - Z\r\n for (i = 65; i <= 90; i++) {_keys[String.fromCharCode(i)] = {code:i, shift: true};}\r\n // 0 - 9\r\n for (i = 0; i <= 9; i++) {_keys['' + i] = {code:48 + i, shift: false};}\r\n // F1 - F12\r\n for (i = 1; i <= 12; i++) {_keys['F' + i] = {code:111 + i, shift: false};}\r\n // num0 - num9\r\n for (i = 0; i <= 9; i++) {_keys['num' + i] = {code:96 + i, shift: false};}\r\n\r\n // numpad misc\r\n _keys['num*'] = {code:106, shift: false};\r\n _keys['num+'] = {code:107, shift: false};\r\n _keys['num-'] = {code:109, shift: false};\r\n _keys['num/'] = {code:111, shift: false};\r\n _keys['num.'] = {code:110, shift: false};\r\n // arrows\r\n _keys['left'] = {code:37, shift: false};\r\n _keys['up'] = {code:38, shift: false};\r\n _keys['right'] = {code:39, shift: false};\r\n _keys['down'] = {code:40, shift: false};\r\n // extra keys\r\n _keys['space'] = {code:32, shift: false};\r\n _keys['enter'] = {code:13, shift: false};\r\n _keys['shift'] = {code:16, shift: undefined};\r\n _keys['esc'] = {code:27, shift: false};\r\n _keys['backspace'] = {code:8, shift: false};\r\n _keys['tab'] = {code:9, shift: false};\r\n _keys['ctrl'] = {code:17, shift: false};\r\n _keys['alt'] = {code:18, shift: false};\r\n _keys['delete'] = {code:46, shift: false};\r\n _keys['pageup'] = {code:33, shift: false};\r\n _keys['pagedown'] = {code:34, shift: false};\r\n // symbols\r\n _keys['='] = {code:187, shift: false};\r\n _keys['-'] = {code:189, shift: false};\r\n _keys[']'] = {code:221, shift: false};\r\n _keys['['] = {code:219, shift: false};\r\n\r\n\r\n\r\n var down = function(event) {handleEvent(event,'keydown');};\r\n var up = function(event) {handleEvent(event,'keyup');};\r\n\r\n // handle the actualy bound key with the event\r\n var handleEvent = function(event,type) {\r\n if (_bound[type][event.keyCode] !== undefined) {\r\n var bound = _bound[type][event.keyCode];\r\n for (var i = 0; i < bound.length; i++) {\r\n if (bound[i].shift === undefined) {\r\n bound[i].fn(event);\r\n }\r\n else if (bound[i].shift == true && event.shiftKey == true) {\r\n bound[i].fn(event);\r\n }\r\n else if (bound[i].shift == false && event.shiftKey == false) {\r\n bound[i].fn(event);\r\n }\r\n }\r\n\r\n if (preventDefault == true) {\r\n event.preventDefault();\r\n }\r\n }\r\n };\r\n\r\n // bind a key to a callback\r\n _exportFunctions.bind = function(key, callback, type) {\r\n if (type === undefined) {\r\n type = 'keydown';\r\n }\r\n if (_keys[key] === undefined) {\r\n throw new Error(\"unsupported key: \" + key);\r\n }\r\n if (_bound[type][_keys[key].code] === undefined) {\r\n _bound[type][_keys[key].code] = [];\r\n }\r\n _bound[type][_keys[key].code].push({fn:callback, shift:_keys[key].shift});\r\n };\r\n\r\n\r\n // bind all keys to a call back (demo purposes)\r\n _exportFunctions.bindAll = function(callback, type) {\r\n if (type === undefined) {\r\n type = 'keydown';\r\n }\r\n for (var key in _keys) {\r\n if (_keys.hasOwnProperty(key)) {\r\n _exportFunctions.bind(key,callback,type);\r\n }\r\n }\r\n };\r\n\r\n // get the key label from an event\r\n _exportFunctions.getKey = function(event) {\r\n for (var key in _keys) {\r\n if (_keys.hasOwnProperty(key)) {\r\n if (event.shiftKey == true && _keys[key].shift == true && event.keyCode == _keys[key].code) {\r\n return key;\r\n }\r\n else if (event.shiftKey == false && _keys[key].shift == false && event.keyCode == _keys[key].code) {\r\n return key;\r\n }\r\n else if (event.keyCode == _keys[key].code && key == 'shift') {\r\n return key;\r\n }\r\n }\r\n }\r\n return \"unknown key, currently not supported\";\r\n };\r\n\r\n // unbind either a specific callback from a key or all of them (by leaving callback undefined)\r\n _exportFunctions.unbind = function(key, callback, type) {\r\n if (type === undefined) {\r\n type = 'keydown';\r\n }\r\n if (_keys[key] === undefined) {\r\n throw new Error(\"unsupported key: \" + key);\r\n }\r\n if (callback !== undefined) {\r\n var newBindings = [];\r\n var bound = _bound[type][_keys[key].code];\r\n if (bound !== undefined) {\r\n for (var i = 0; i < bound.length; i++) {\r\n if (!(bound[i].fn == callback && bound[i].shift == _keys[key].shift)) {\r\n newBindings.push(_bound[type][_keys[key].code][i]);\r\n }\r\n }\r\n }\r\n _bound[type][_keys[key].code] = newBindings;\r\n }\r\n else {\r\n _bound[type][_keys[key].code] = [];\r\n }\r\n };\r\n\r\n // reset all bound variables.\r\n _exportFunctions.reset = function() {\r\n _bound = {keydown:{}, keyup:{}};\r\n };\r\n\r\n // unbind all listeners and reset all variables.\r\n _exportFunctions.destroy = function() {\r\n _bound = {keydown:{}, keyup:{}};\r\n container.removeEventListener('keydown', down, true);\r\n container.removeEventListener('keyup', up, true);\r\n };\r\n\r\n // create listeners.\r\n container.addEventListener('keydown',down,true);\r\n container.addEventListener('keyup',up,true);\r\n\r\n // return the public functions.\r\n return _exportFunctions;\r\n }\r\n\r\n return keycharm;\r\n}));\r\n\r\n\r\n","/*! Hammer.JS - v2.0.15 - 2019-04-04\n * http://naver.github.io/egjs\n *\n * Forked By Naver egjs\n * Copyright (c) hammerjs\n * Licensed under the MIT license */\nfunction _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}\n\nfunction _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n subClass.__proto__ = superClass;\n}\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\n/**\n * @private\n * extend object.\n * means that properties in dest will be overwritten by the ones in src.\n * @param {Object} target\n * @param {...Object} objects_to_assign\n * @returns {Object} target\n */\nvar assign;\n\nif (typeof Object.assign !== 'function') {\n assign = function assign(target) {\n if (target === undefined || target === null) {\n throw new TypeError('Cannot convert undefined or null to object');\n }\n\n var output = Object(target);\n\n for (var index = 1; index < arguments.length; index++) {\n var source = arguments[index];\n\n if (source !== undefined && source !== null) {\n for (var nextKey in source) {\n if (source.hasOwnProperty(nextKey)) {\n output[nextKey] = source[nextKey];\n }\n }\n }\n }\n\n return output;\n };\n} else {\n assign = Object.assign;\n}\n\nvar assign$1 = assign;\n\nvar VENDOR_PREFIXES = ['', 'webkit', 'Moz', 'MS', 'ms', 'o'];\nvar TEST_ELEMENT = typeof document === \"undefined\" ? {\n style: {}\n} : document.createElement('div');\nvar TYPE_FUNCTION = 'function';\nvar round = Math.round,\n abs = Math.abs;\nvar now = Date.now;\n\n/**\n * @private\n * get the prefixed property\n * @param {Object} obj\n * @param {String} property\n * @returns {String|Undefined} prefixed\n */\n\nfunction prefixed(obj, property) {\n var prefix;\n var prop;\n var camelProp = property[0].toUpperCase() + property.slice(1);\n var i = 0;\n\n while (i < VENDOR_PREFIXES.length) {\n prefix = VENDOR_PREFIXES[i];\n prop = prefix ? prefix + camelProp : property;\n\n if (prop in obj) {\n return prop;\n }\n\n i++;\n }\n\n return undefined;\n}\n\n/* eslint-disable no-new-func, no-nested-ternary */\nvar win;\n\nif (typeof window === \"undefined\") {\n // window is undefined in node.js\n win = {};\n} else {\n win = window;\n}\n\nvar PREFIXED_TOUCH_ACTION = prefixed(TEST_ELEMENT.style, 'touchAction');\nvar NATIVE_TOUCH_ACTION = PREFIXED_TOUCH_ACTION !== undefined;\nfunction getTouchActionProps() {\n if (!NATIVE_TOUCH_ACTION) {\n return false;\n }\n\n var touchMap = {};\n var cssSupports = win.CSS && win.CSS.supports;\n ['auto', 'manipulation', 'pan-y', 'pan-x', 'pan-x pan-y', 'none'].forEach(function (val) {\n // If css.supports is not supported but there is native touch-action assume it supports\n // all values. This is the case for IE 10 and 11.\n return touchMap[val] = cssSupports ? win.CSS.supports('touch-action', val) : true;\n });\n return touchMap;\n}\n\nvar TOUCH_ACTION_COMPUTE = 'compute';\nvar TOUCH_ACTION_AUTO = 'auto';\nvar TOUCH_ACTION_MANIPULATION = 'manipulation'; // not implemented\n\nvar TOUCH_ACTION_NONE = 'none';\nvar TOUCH_ACTION_PAN_X = 'pan-x';\nvar TOUCH_ACTION_PAN_Y = 'pan-y';\nvar TOUCH_ACTION_MAP = getTouchActionProps();\n\nvar MOBILE_REGEX = /mobile|tablet|ip(ad|hone|od)|android/i;\nvar SUPPORT_TOUCH = 'ontouchstart' in win;\nvar SUPPORT_POINTER_EVENTS = prefixed(win, 'PointerEvent') !== undefined;\nvar SUPPORT_ONLY_TOUCH = SUPPORT_TOUCH && MOBILE_REGEX.test(navigator.userAgent);\nvar INPUT_TYPE_TOUCH = 'touch';\nvar INPUT_TYPE_PEN = 'pen';\nvar INPUT_TYPE_MOUSE = 'mouse';\nvar INPUT_TYPE_KINECT = 'kinect';\nvar COMPUTE_INTERVAL = 25;\nvar INPUT_START = 1;\nvar INPUT_MOVE = 2;\nvar INPUT_END = 4;\nvar INPUT_CANCEL = 8;\nvar DIRECTION_NONE = 1;\nvar DIRECTION_LEFT = 2;\nvar DIRECTION_RIGHT = 4;\nvar DIRECTION_UP = 8;\nvar DIRECTION_DOWN = 16;\nvar DIRECTION_HORIZONTAL = DIRECTION_LEFT | DIRECTION_RIGHT;\nvar DIRECTION_VERTICAL = DIRECTION_UP | DIRECTION_DOWN;\nvar DIRECTION_ALL = DIRECTION_HORIZONTAL | DIRECTION_VERTICAL;\nvar PROPS_XY = ['x', 'y'];\nvar PROPS_CLIENT_XY = ['clientX', 'clientY'];\n\n/**\n * @private\n * walk objects and arrays\n * @param {Object} obj\n * @param {Function} iterator\n * @param {Object} context\n */\nfunction each(obj, iterator, context) {\n var i;\n\n if (!obj) {\n return;\n }\n\n if (obj.forEach) {\n obj.forEach(iterator, context);\n } else if (obj.length !== undefined) {\n i = 0;\n\n while (i < obj.length) {\n iterator.call(context, obj[i], i, obj);\n i++;\n }\n } else {\n for (i in obj) {\n obj.hasOwnProperty(i) && iterator.call(context, obj[i], i, obj);\n }\n }\n}\n\n/**\n * @private\n * let a boolean value also be a function that must return a boolean\n * this first item in args will be used as the context\n * @param {Boolean|Function} val\n * @param {Array} [args]\n * @returns {Boolean}\n */\n\nfunction boolOrFn(val, args) {\n if (typeof val === TYPE_FUNCTION) {\n return val.apply(args ? args[0] || undefined : undefined, args);\n }\n\n return val;\n}\n\n/**\n * @private\n * small indexOf wrapper\n * @param {String} str\n * @param {String} find\n * @returns {Boolean} found\n */\nfunction inStr(str, find) {\n return str.indexOf(find) > -1;\n}\n\n/**\n * @private\n * when the touchActions are collected they are not a valid value, so we need to clean things up. *\n * @param {String} actions\n * @returns {*}\n */\n\nfunction cleanTouchActions(actions) {\n // none\n if (inStr(actions, TOUCH_ACTION_NONE)) {\n return TOUCH_ACTION_NONE;\n }\n\n var hasPanX = inStr(actions, TOUCH_ACTION_PAN_X);\n var hasPanY = inStr(actions, TOUCH_ACTION_PAN_Y); // if both pan-x and pan-y are set (different recognizers\n // for different directions, e.g. horizontal pan but vertical swipe?)\n // we need none (as otherwise with pan-x pan-y combined none of these\n // recognizers will work, since the browser would handle all panning\n\n if (hasPanX && hasPanY) {\n return TOUCH_ACTION_NONE;\n } // pan-x OR pan-y\n\n\n if (hasPanX || hasPanY) {\n return hasPanX ? TOUCH_ACTION_PAN_X : TOUCH_ACTION_PAN_Y;\n } // manipulation\n\n\n if (inStr(actions, TOUCH_ACTION_MANIPULATION)) {\n return TOUCH_ACTION_MANIPULATION;\n }\n\n return TOUCH_ACTION_AUTO;\n}\n\n/**\n * @private\n * Touch Action\n * sets the touchAction property or uses the js alternative\n * @param {Manager} manager\n * @param {String} value\n * @constructor\n */\n\nvar TouchAction =\n/*#__PURE__*/\nfunction () {\n function TouchAction(manager, value) {\n this.manager = manager;\n this.set(value);\n }\n /**\n * @private\n * set the touchAction value on the element or enable the polyfill\n * @param {String} value\n */\n\n\n var _proto = TouchAction.prototype;\n\n _proto.set = function set(value) {\n // find out the touch-action by the event handlers\n if (value === TOUCH_ACTION_COMPUTE) {\n value = this.compute();\n }\n\n if (NATIVE_TOUCH_ACTION && this.manager.element.style && TOUCH_ACTION_MAP[value]) {\n this.manager.element.style[PREFIXED_TOUCH_ACTION] = value;\n }\n\n this.actions = value.toLowerCase().trim();\n };\n /**\n * @private\n * just re-set the touchAction value\n */\n\n\n _proto.update = function update() {\n this.set(this.manager.options.touchAction);\n };\n /**\n * @private\n * compute the value for the touchAction property based on the recognizer's settings\n * @returns {String} value\n */\n\n\n _proto.compute = function compute() {\n var actions = [];\n each(this.manager.recognizers, function (recognizer) {\n if (boolOrFn(recognizer.options.enable, [recognizer])) {\n actions = actions.concat(recognizer.getTouchAction());\n }\n });\n return cleanTouchActions(actions.join(' '));\n };\n /**\n * @private\n * this method is called on each input cycle and provides the preventing of the browser behavior\n * @param {Object} input\n */\n\n\n _proto.preventDefaults = function preventDefaults(input) {\n var srcEvent = input.srcEvent;\n var direction = input.offsetDirection; // if the touch action did prevented once this session\n\n if (this.manager.session.prevented) {\n srcEvent.preventDefault();\n return;\n }\n\n var actions = this.actions;\n var hasNone = inStr(actions, TOUCH_ACTION_NONE) && !TOUCH_ACTION_MAP[TOUCH_ACTION_NONE];\n var hasPanY = inStr(actions, TOUCH_ACTION_PAN_Y) && !TOUCH_ACTION_MAP[TOUCH_ACTION_PAN_Y];\n var hasPanX = inStr(actions, TOUCH_ACTION_PAN_X) && !TOUCH_ACTION_MAP[TOUCH_ACTION_PAN_X];\n\n if (hasNone) {\n // do not prevent defaults if this is a tap gesture\n var isTapPointer = input.pointers.length === 1;\n var isTapMovement = input.distance < 2;\n var isTapTouchTime = input.deltaTime < 250;\n\n if (isTapPointer && isTapMovement && isTapTouchTime) {\n return;\n }\n }\n\n if (hasPanX && hasPanY) {\n // `pan-x pan-y` means browser handles all scrolling/panning, do not prevent\n return;\n }\n\n if (hasNone || hasPanY && direction & DIRECTION_HORIZONTAL || hasPanX && direction & DIRECTION_VERTICAL) {\n return this.preventSrc(srcEvent);\n }\n };\n /**\n * @private\n * call preventDefault to prevent the browser's default behavior (scrolling in most cases)\n * @param {Object} srcEvent\n */\n\n\n _proto.preventSrc = function preventSrc(srcEvent) {\n this.manager.session.prevented = true;\n srcEvent.preventDefault();\n };\n\n return TouchAction;\n}();\n\n/**\n * @private\n * find if a node is in the given parent\n * @method hasParent\n * @param {HTMLElement} node\n * @param {HTMLElement} parent\n * @return {Boolean} found\n */\nfunction hasParent(node, parent) {\n while (node) {\n if (node === parent) {\n return true;\n }\n\n node = node.parentNode;\n }\n\n return false;\n}\n\n/**\n * @private\n * get the center of all the pointers\n * @param {Array} pointers\n * @return {Object} center contains `x` and `y` properties\n */\n\nfunction getCenter(pointers) {\n var pointersLength = pointers.length; // no need to loop when only one touch\n\n if (pointersLength === 1) {\n return {\n x: round(pointers[0].clientX),\n y: round(pointers[0].clientY)\n };\n }\n\n var x = 0;\n var y = 0;\n var i = 0;\n\n while (i < pointersLength) {\n x += pointers[i].clientX;\n y += pointers[i].clientY;\n i++;\n }\n\n return {\n x: round(x / pointersLength),\n y: round(y / pointersLength)\n };\n}\n\n/**\n * @private\n * create a simple clone from the input used for storage of firstInput and firstMultiple\n * @param {Object} input\n * @returns {Object} clonedInputData\n */\n\nfunction simpleCloneInputData(input) {\n // make a simple copy of the pointers because we will get a reference if we don't\n // we only need clientXY for the calculations\n var pointers = [];\n var i = 0;\n\n while (i < input.pointers.length) {\n pointers[i] = {\n clientX: round(input.pointers[i].clientX),\n clientY: round(input.pointers[i].clientY)\n };\n i++;\n }\n\n return {\n timeStamp: now(),\n pointers: pointers,\n center: getCenter(pointers),\n deltaX: input.deltaX,\n deltaY: input.deltaY\n };\n}\n\n/**\n * @private\n * calculate the absolute distance between two points\n * @param {Object} p1 {x, y}\n * @param {Object} p2 {x, y}\n * @param {Array} [props] containing x and y keys\n * @return {Number} distance\n */\n\nfunction getDistance(p1, p2, props) {\n if (!props) {\n props = PROPS_XY;\n }\n\n var x = p2[props[0]] - p1[props[0]];\n var y = p2[props[1]] - p1[props[1]];\n return Math.sqrt(x * x + y * y);\n}\n\n/**\n * @private\n * calculate the angle between two coordinates\n * @param {Object} p1\n * @param {Object} p2\n * @param {Array} [props] containing x and y keys\n * @return {Number} angle\n */\n\nfunction getAngle(p1, p2, props) {\n if (!props) {\n props = PROPS_XY;\n }\n\n var x = p2[props[0]] - p1[props[0]];\n var y = p2[props[1]] - p1[props[1]];\n return Math.atan2(y, x) * 180 / Math.PI;\n}\n\n/**\n * @private\n * get the direction between two points\n * @param {Number} x\n * @param {Number} y\n * @return {Number} direction\n */\n\nfunction getDirection(x, y) {\n if (x === y) {\n return DIRECTION_NONE;\n }\n\n if (abs(x) >= abs(y)) {\n return x < 0 ? DIRECTION_LEFT : DIRECTION_RIGHT;\n }\n\n return y < 0 ? DIRECTION_UP : DIRECTION_DOWN;\n}\n\nfunction computeDeltaXY(session, input) {\n var center = input.center; // let { offsetDelta:offset = {}, prevDelta = {}, prevInput = {} } = session;\n // jscs throwing error on defalut destructured values and without defaults tests fail\n\n var offset = session.offsetDelta || {};\n var prevDelta = session.prevDelta || {};\n var prevInput = session.prevInput || {};\n\n if (input.eventType === INPUT_START || prevInput.eventType === INPUT_END) {\n prevDelta = session.prevDelta = {\n x: prevInput.deltaX || 0,\n y: prevInput.deltaY || 0\n };\n offset = session.offsetDelta = {\n x: center.x,\n y: center.y\n };\n }\n\n input.deltaX = prevDelta.x + (center.x - offset.x);\n input.deltaY = prevDelta.y + (center.y - offset.y);\n}\n\n/**\n * @private\n * calculate the velocity between two points. unit is in px per ms.\n * @param {Number} deltaTime\n * @param {Number} x\n * @param {Number} y\n * @return {Object} velocity `x` and `y`\n */\nfunction getVelocity(deltaTime, x, y) {\n return {\n x: x / deltaTime || 0,\n y: y / deltaTime || 0\n };\n}\n\n/**\n * @private\n * calculate the scale factor between two pointersets\n * no scale is 1, and goes down to 0 when pinched together, and bigger when pinched out\n * @param {Array} start array of pointers\n * @param {Array} end array of pointers\n * @return {Number} scale\n */\n\nfunction getScale(start, end) {\n return getDistance(end[0], end[1], PROPS_CLIENT_XY) / getDistance(start[0], start[1], PROPS_CLIENT_XY);\n}\n\n/**\n * @private\n * calculate the rotation degrees between two pointersets\n * @param {Array} start array of pointers\n * @param {Array} end array of pointers\n * @return {Number} rotation\n */\n\nfunction getRotation(start, end) {\n return getAngle(end[1], end[0], PROPS_CLIENT_XY) + getAngle(start[1], start[0], PROPS_CLIENT_XY);\n}\n\n/**\n * @private\n * velocity is calculated every x ms\n * @param {Object} session\n * @param {Object} input\n */\n\nfunction computeIntervalInputData(session, input) {\n var last = session.lastInterval || input;\n var deltaTime = input.timeStamp - last.timeStamp;\n var velocity;\n var velocityX;\n var velocityY;\n var direction;\n\n if (input.eventType !== INPUT_CANCEL && (deltaTime > COMPUTE_INTERVAL || last.velocity === undefined)) {\n var deltaX = input.deltaX - last.deltaX;\n var deltaY = input.deltaY - last.deltaY;\n var v = getVelocity(deltaTime, deltaX, deltaY);\n velocityX = v.x;\n velocityY = v.y;\n velocity = abs(v.x) > abs(v.y) ? v.x : v.y;\n direction = getDirection(deltaX, deltaY);\n session.lastInterval = input;\n } else {\n // use latest velocity info if it doesn't overtake a minimum period\n velocity = last.velocity;\n velocityX = last.velocityX;\n velocityY = last.velocityY;\n direction = last.direction;\n }\n\n input.velocity = velocity;\n input.velocityX = velocityX;\n input.velocityY = velocityY;\n input.direction = direction;\n}\n\n/**\n* @private\n * extend the data with some usable properties like scale, rotate, velocity etc\n * @param {Object} manager\n * @param {Object} input\n */\n\nfunction computeInputData(manager, input) {\n var session = manager.session;\n var pointers = input.pointers;\n var pointersLength = pointers.length; // store the first input to calculate the distance and direction\n\n if (!session.firstInput) {\n session.firstInput = simpleCloneInputData(input);\n } // to compute scale and rotation we need to store the multiple touches\n\n\n if (pointersLength > 1 && !session.firstMultiple) {\n session.firstMultiple = simpleCloneInputData(input);\n } else if (pointersLength === 1) {\n session.firstMultiple = false;\n }\n\n var firstInput = session.firstInput,\n firstMultiple = session.firstMultiple;\n var offsetCenter = firstMultiple ? firstMultiple.center : firstInput.center;\n var center = input.center = getCenter(pointers);\n input.timeStamp = now();\n input.deltaTime = input.timeStamp - firstInput.timeStamp;\n input.angle = getAngle(offsetCenter, center);\n input.distance = getDistance(offsetCenter, center);\n computeDeltaXY(session, input);\n input.offsetDirection = getDirection(input.deltaX, input.deltaY);\n var overallVelocity = getVelocity(input.deltaTime, input.deltaX, input.deltaY);\n input.overallVelocityX = overallVelocity.x;\n input.overallVelocityY = overallVelocity.y;\n input.overallVelocity = abs(overallVelocity.x) > abs(overallVelocity.y) ? overallVelocity.x : overallVelocity.y;\n input.scale = firstMultiple ? getScale(firstMultiple.pointers, pointers) : 1;\n input.rotation = firstMultiple ? getRotation(firstMultiple.pointers, pointers) : 0;\n input.maxPointers = !session.prevInput ? input.pointers.length : input.pointers.length > session.prevInput.maxPointers ? input.pointers.length : session.prevInput.maxPointers;\n computeIntervalInputData(session, input); // find the correct target\n\n var target = manager.element;\n\n if (hasParent(input.srcEvent.target, target)) {\n target = input.srcEvent.target;\n }\n\n input.target = target;\n}\n\n/**\n * @private\n * handle input events\n * @param {Manager} manager\n * @param {String} eventType\n * @param {Object} input\n */\n\nfunction inputHandler(manager, eventType, input) {\n var pointersLen = input.pointers.length;\n var changedPointersLen = input.changedPointers.length;\n var isFirst = eventType & INPUT_START && pointersLen - changedPointersLen === 0;\n var isFinal = eventType & (INPUT_END | INPUT_CANCEL) && pointersLen - changedPointersLen === 0;\n input.isFirst = !!isFirst;\n input.isFinal = !!isFinal;\n\n if (isFirst) {\n manager.session = {};\n } // source event is the normalized value of the domEvents\n // like 'touchstart, mouseup, pointerdown'\n\n\n input.eventType = eventType; // compute scale, rotation etc\n\n computeInputData(manager, input); // emit secret event\n\n manager.emit('hammer.input', input);\n manager.recognize(input);\n manager.session.prevInput = input;\n}\n\n/**\n * @private\n * split string on whitespace\n * @param {String} str\n * @returns {Array} words\n */\nfunction splitStr(str) {\n return str.trim().split(/\\s+/g);\n}\n\n/**\n * @private\n * addEventListener with multiple events at once\n * @param {EventTarget} target\n * @param {String} types\n * @param {Function} handler\n */\n\nfunction addEventListeners(target, types, handler) {\n each(splitStr(types), function (type) {\n target.addEventListener(type, handler, false);\n });\n}\n\n/**\n * @private\n * removeEventListener with multiple events at once\n * @param {EventTarget} target\n * @param {String} types\n * @param {Function} handler\n */\n\nfunction removeEventListeners(target, types, handler) {\n each(splitStr(types), function (type) {\n target.removeEventListener(type, handler, false);\n });\n}\n\n/**\n * @private\n * get the window object of an element\n * @param {HTMLElement} element\n * @returns {DocumentView|Window}\n */\nfunction getWindowForElement(element) {\n var doc = element.ownerDocument || element;\n return doc.defaultView || doc.parentWindow || window;\n}\n\n/**\n * @private\n * create new input type manager\n * @param {Manager} manager\n * @param {Function} callback\n * @returns {Input}\n * @constructor\n */\n\nvar Input =\n/*#__PURE__*/\nfunction () {\n function Input(manager, callback) {\n var self = this;\n this.manager = manager;\n this.callback = callback;\n this.element = manager.element;\n this.target = manager.options.inputTarget; // smaller wrapper around the handler, for the scope and the enabled state of the manager,\n // so when disabled the input events are completely bypassed.\n\n this.domHandler = function (ev) {\n if (boolOrFn(manager.options.enable, [manager])) {\n self.handler(ev);\n }\n };\n\n this.init();\n }\n /**\n * @private\n * should handle the inputEvent data and trigger the callback\n * @virtual\n */\n\n\n var _proto = Input.prototype;\n\n _proto.handler = function handler() {};\n /**\n * @private\n * bind the events\n */\n\n\n _proto.init = function init() {\n this.evEl && addEventListeners(this.element, this.evEl, this.domHandler);\n this.evTarget && addEventListeners(this.target, this.evTarget, this.domHandler);\n this.evWin && addEventListeners(getWindowForElement(this.element), this.evWin, this.domHandler);\n };\n /**\n * @private\n * unbind the events\n */\n\n\n _proto.destroy = function destroy() {\n this.evEl && removeEventListeners(this.element, this.evEl, this.domHandler);\n this.evTarget && removeEventListeners(this.target, this.evTarget, this.domHandler);\n this.evWin && removeEventListeners(getWindowForElement(this.element), this.evWin, this.domHandler);\n };\n\n return Input;\n}();\n\n/**\n * @private\n * find if a array contains the object using indexOf or a simple polyFill\n * @param {Array} src\n * @param {String} find\n * @param {String} [findByKey]\n * @return {Boolean|Number} false when not found, or the index\n */\nfunction inArray(src, find, findByKey) {\n if (src.indexOf && !findByKey) {\n return src.indexOf(find);\n } else {\n var i = 0;\n\n while (i < src.length) {\n if (findByKey && src[i][findByKey] == find || !findByKey && src[i] === find) {\n // do not use === here, test fails\n return i;\n }\n\n i++;\n }\n\n return -1;\n }\n}\n\nvar POINTER_INPUT_MAP = {\n pointerdown: INPUT_START,\n pointermove: INPUT_MOVE,\n pointerup: INPUT_END,\n pointercancel: INPUT_CANCEL,\n pointerout: INPUT_CANCEL\n}; // in IE10 the pointer types is defined as an enum\n\nvar IE10_POINTER_TYPE_ENUM = {\n 2: INPUT_TYPE_TOUCH,\n 3: INPUT_TYPE_PEN,\n 4: INPUT_TYPE_MOUSE,\n 5: INPUT_TYPE_KINECT // see https://twitter.com/jacobrossi/status/480596438489890816\n\n};\nvar POINTER_ELEMENT_EVENTS = 'pointerdown';\nvar POINTER_WINDOW_EVENTS = 'pointermove pointerup pointercancel'; // IE10 has prefixed support, and case-sensitive\n\nif (win.MSPointerEvent && !win.PointerEvent) {\n POINTER_ELEMENT_EVENTS = 'MSPointerDown';\n POINTER_WINDOW_EVENTS = 'MSPointerMove MSPointerUp MSPointerCancel';\n}\n/**\n * @private\n * Pointer events input\n * @constructor\n * @extends Input\n */\n\n\nvar PointerEventInput =\n/*#__PURE__*/\nfunction (_Input) {\n _inheritsLoose(PointerEventInput, _Input);\n\n function PointerEventInput() {\n var _this;\n\n var proto = PointerEventInput.prototype;\n proto.evEl = POINTER_ELEMENT_EVENTS;\n proto.evWin = POINTER_WINDOW_EVENTS;\n _this = _Input.apply(this, arguments) || this;\n _this.store = _this.manager.session.pointerEvents = [];\n return _this;\n }\n /**\n * @private\n * handle mouse events\n * @param {Object} ev\n */\n\n\n var _proto = PointerEventInput.prototype;\n\n _proto.handler = function handler(ev) {\n var store = this.store;\n var removePointer = false;\n var eventTypeNormalized = ev.type.toLowerCase().replace('ms', '');\n var eventType = POINTER_INPUT_MAP[eventTypeNormalized];\n var pointerType = IE10_POINTER_TYPE_ENUM[ev.pointerType] || ev.pointerType;\n var isTouch = pointerType === INPUT_TYPE_TOUCH; // get index of the event in the store\n\n var storeIndex = inArray(store, ev.pointerId, 'pointerId'); // start and mouse must be down\n\n if (eventType & INPUT_START && (ev.button === 0 || isTouch)) {\n if (storeIndex < 0) {\n store.push(ev);\n storeIndex = store.length - 1;\n }\n } else if (eventType & (INPUT_END | INPUT_CANCEL)) {\n removePointer = true;\n } // it not found, so the pointer hasn't been down (so it's probably a hover)\n\n\n if (storeIndex < 0) {\n return;\n } // update the event in the store\n\n\n store[storeIndex] = ev;\n this.callback(this.manager, eventType, {\n pointers: store,\n changedPointers: [ev],\n pointerType: pointerType,\n srcEvent: ev\n });\n\n if (removePointer) {\n // remove from the store\n store.splice(storeIndex, 1);\n }\n };\n\n return PointerEventInput;\n}(Input);\n\n/**\n * @private\n * convert array-like objects to real arrays\n * @param {Object} obj\n * @returns {Array}\n */\nfunction toArray(obj) {\n return Array.prototype.slice.call(obj, 0);\n}\n\n/**\n * @private\n * unique array with objects based on a key (like 'id') or just by the array's value\n * @param {Array} src [{id:1},{id:2},{id:1}]\n * @param {String} [key]\n * @param {Boolean} [sort=False]\n * @returns {Array} [{id:1},{id:2}]\n */\n\nfunction uniqueArray(src, key, sort) {\n var results = [];\n var values = [];\n var i = 0;\n\n while (i < src.length) {\n var val = key ? src[i][key] : src[i];\n\n if (inArray(values, val) < 0) {\n results.push(src[i]);\n }\n\n values[i] = val;\n i++;\n }\n\n if (sort) {\n if (!key) {\n results = results.sort();\n } else {\n results = results.sort(function (a, b) {\n return a[key] > b[key];\n });\n }\n }\n\n return results;\n}\n\nvar TOUCH_INPUT_MAP = {\n touchstart: INPUT_START,\n touchmove: INPUT_MOVE,\n touchend: INPUT_END,\n touchcancel: INPUT_CANCEL\n};\nvar TOUCH_TARGET_EVENTS = 'touchstart touchmove touchend touchcancel';\n/**\n * @private\n * Multi-user touch events input\n * @constructor\n * @extends Input\n */\n\nvar TouchInput =\n/*#__PURE__*/\nfunction (_Input) {\n _inheritsLoose(TouchInput, _Input);\n\n function TouchInput() {\n var _this;\n\n TouchInput.prototype.evTarget = TOUCH_TARGET_EVENTS;\n _this = _Input.apply(this, arguments) || this;\n _this.targetIds = {}; // this.evTarget = TOUCH_TARGET_EVENTS;\n\n return _this;\n }\n\n var _proto = TouchInput.prototype;\n\n _proto.handler = function handler(ev) {\n var type = TOUCH_INPUT_MAP[ev.type];\n var touches = getTouches.call(this, ev, type);\n\n if (!touches) {\n return;\n }\n\n this.callback(this.manager, type, {\n pointers: touches[0],\n changedPointers: touches[1],\n pointerType: INPUT_TYPE_TOUCH,\n srcEvent: ev\n });\n };\n\n return TouchInput;\n}(Input);\n\nfunction getTouches(ev, type) {\n var allTouches = toArray(ev.touches);\n var targetIds = this.targetIds; // when there is only one touch, the process can be simplified\n\n if (type & (INPUT_START | INPUT_MOVE) && allTouches.length === 1) {\n targetIds[allTouches[0].identifier] = true;\n return [allTouches, allTouches];\n }\n\n var i;\n var targetTouches;\n var changedTouches = toArray(ev.changedTouches);\n var changedTargetTouches = [];\n var target = this.target; // get target touches from touches\n\n targetTouches = allTouches.filter(function (touch) {\n return hasParent(touch.target, target);\n }); // collect touches\n\n if (type === INPUT_START) {\n i = 0;\n\n while (i < targetTouches.length) {\n targetIds[targetTouches[i].identifier] = true;\n i++;\n }\n } // filter changed touches to only contain touches that exist in the collected target ids\n\n\n i = 0;\n\n while (i < changedTouches.length) {\n if (targetIds[changedTouches[i].identifier]) {\n changedTargetTouches.push(changedTouches[i]);\n } // cleanup removed touches\n\n\n if (type & (INPUT_END | INPUT_CANCEL)) {\n delete targetIds[changedTouches[i].identifier];\n }\n\n i++;\n }\n\n if (!changedTargetTouches.length) {\n return;\n }\n\n return [// merge targetTouches with changedTargetTouches so it contains ALL touches, including 'end' and 'cancel'\n uniqueArray(targetTouches.concat(changedTargetTouches), 'identifier', true), changedTargetTouches];\n}\n\nvar MOUSE_INPUT_MAP = {\n mousedown: INPUT_START,\n mousemove: INPUT_MOVE,\n mouseup: INPUT_END\n};\nvar MOUSE_ELEMENT_EVENTS = 'mousedown';\nvar MOUSE_WINDOW_EVENTS = 'mousemove mouseup';\n/**\n * @private\n * Mouse events input\n * @constructor\n * @extends Input\n */\n\nvar MouseInput =\n/*#__PURE__*/\nfunction (_Input) {\n _inheritsLoose(MouseInput, _Input);\n\n function MouseInput() {\n var _this;\n\n var proto = MouseInput.prototype;\n proto.evEl = MOUSE_ELEMENT_EVENTS;\n proto.evWin = MOUSE_WINDOW_EVENTS;\n _this = _Input.apply(this, arguments) || this;\n _this.pressed = false; // mousedown state\n\n return _this;\n }\n /**\n * @private\n * handle mouse events\n * @param {Object} ev\n */\n\n\n var _proto = MouseInput.prototype;\n\n _proto.handler = function handler(ev) {\n var eventType = MOUSE_INPUT_MAP[ev.type]; // on start we want to have the left mouse button down\n\n if (eventType & INPUT_START && ev.button === 0) {\n this.pressed = true;\n }\n\n if (eventType & INPUT_MOVE && ev.which !== 1) {\n eventType = INPUT_END;\n } // mouse must be down\n\n\n if (!this.pressed) {\n return;\n }\n\n if (eventType & INPUT_END) {\n this.pressed = false;\n }\n\n this.callback(this.manager, eventType, {\n pointers: [ev],\n changedPointers: [ev],\n pointerType: INPUT_TYPE_MOUSE,\n srcEvent: ev\n });\n };\n\n return MouseInput;\n}(Input);\n\n/**\n * @private\n * Combined touch and mouse input\n *\n * Touch has a higher priority then mouse, and while touching no mouse events are allowed.\n * This because touch devices also emit mouse events while doing a touch.\n *\n * @constructor\n * @extends Input\n */\n\nvar DEDUP_TIMEOUT = 2500;\nvar DEDUP_DISTANCE = 25;\n\nfunction setLastTouch(eventData) {\n var _eventData$changedPoi = eventData.changedPointers,\n touch = _eventData$changedPoi[0];\n\n if (touch.identifier === this.primaryTouch) {\n var lastTouch = {\n x: touch.clientX,\n y: touch.clientY\n };\n var lts = this.lastTouches;\n this.lastTouches.push(lastTouch);\n\n var removeLastTouch = function removeLastTouch() {\n var i = lts.indexOf(lastTouch);\n\n if (i > -1) {\n lts.splice(i, 1);\n }\n };\n\n setTimeout(removeLastTouch, DEDUP_TIMEOUT);\n }\n}\n\nfunction recordTouches(eventType, eventData) {\n if (eventType & INPUT_START) {\n this.primaryTouch = eventData.changedPointers[0].identifier;\n setLastTouch.call(this, eventData);\n } else if (eventType & (INPUT_END | INPUT_CANCEL)) {\n setLastTouch.call(this, eventData);\n }\n}\n\nfunction isSyntheticEvent(eventData) {\n var x = eventData.srcEvent.clientX;\n var y = eventData.srcEvent.clientY;\n\n for (var i = 0; i < this.lastTouches.length; i++) {\n var t = this.lastTouches[i];\n var dx = Math.abs(x - t.x);\n var dy = Math.abs(y - t.y);\n\n if (dx <= DEDUP_DISTANCE && dy <= DEDUP_DISTANCE) {\n return true;\n }\n }\n\n return false;\n}\n\nvar TouchMouseInput =\n/*#__PURE__*/\nfunction () {\n var TouchMouseInput =\n /*#__PURE__*/\n function (_Input) {\n _inheritsLoose(TouchMouseInput, _Input);\n\n function TouchMouseInput(_manager, callback) {\n var _this;\n\n _this = _Input.call(this, _manager, callback) || this;\n\n _this.handler = function (manager, inputEvent, inputData) {\n var isTouch = inputData.pointerType === INPUT_TYPE_TOUCH;\n var isMouse = inputData.pointerType === INPUT_TYPE_MOUSE;\n\n if (isMouse && inputData.sourceCapabilities && inputData.sourceCapabilities.firesTouchEvents) {\n return;\n } // when we're in a touch event, record touches to de-dupe synthetic mouse event\n\n\n if (isTouch) {\n recordTouches.call(_assertThisInitialized(_assertThisInitialized(_this)), inputEvent, inputData);\n } else if (isMouse && isSyntheticEvent.call(_assertThisInitialized(_assertThisInitialized(_this)), inputData)) {\n return;\n }\n\n _this.callback(manager, inputEvent, inputData);\n };\n\n _this.touch = new TouchInput(_this.manager, _this.handler);\n _this.mouse = new MouseInput(_this.manager, _this.handler);\n _this.primaryTouch = null;\n _this.lastTouches = [];\n return _this;\n }\n /**\n * @private\n * handle mouse and touch events\n * @param {Hammer} manager\n * @param {String} inputEvent\n * @param {Object} inputData\n */\n\n\n var _proto = TouchMouseInput.prototype;\n\n /**\n * @private\n * remove the event listeners\n */\n _proto.destroy = function destroy() {\n this.touch.destroy();\n this.mouse.destroy();\n };\n\n return TouchMouseInput;\n }(Input);\n\n return TouchMouseInput;\n}();\n\n/**\n * @private\n * create new input type manager\n * called by the Manager constructor\n * @param {Hammer} manager\n * @returns {Input}\n */\n\nfunction createInputInstance(manager) {\n var Type; // let inputClass = manager.options.inputClass;\n\n var inputClass = manager.options.inputClass;\n\n if (inputClass) {\n Type = inputClass;\n } else if (SUPPORT_POINTER_EVENTS) {\n Type = PointerEventInput;\n } else if (SUPPORT_ONLY_TOUCH) {\n Type = TouchInput;\n } else if (!SUPPORT_TOUCH) {\n Type = MouseInput;\n } else {\n Type = TouchMouseInput;\n }\n\n return new Type(manager, inputHandler);\n}\n\n/**\n * @private\n * if the argument is an array, we want to execute the fn on each entry\n * if it aint an array we don't want to do a thing.\n * this is used by all the methods that accept a single and array argument.\n * @param {*|Array} arg\n * @param {String} fn\n * @param {Object} [context]\n * @returns {Boolean}\n */\n\nfunction invokeArrayArg(arg, fn, context) {\n if (Array.isArray(arg)) {\n each(arg, context[fn], context);\n return true;\n }\n\n return false;\n}\n\nvar STATE_POSSIBLE = 1;\nvar STATE_BEGAN = 2;\nvar STATE_CHANGED = 4;\nvar STATE_ENDED = 8;\nvar STATE_RECOGNIZED = STATE_ENDED;\nvar STATE_CANCELLED = 16;\nvar STATE_FAILED = 32;\n\n/**\n * @private\n * get a unique id\n * @returns {number} uniqueId\n */\nvar _uniqueId = 1;\nfunction uniqueId() {\n return _uniqueId++;\n}\n\n/**\n * @private\n * get a recognizer by name if it is bound to a manager\n * @param {Recognizer|String} otherRecognizer\n * @param {Recognizer} recognizer\n * @returns {Recognizer}\n */\nfunction getRecognizerByNameIfManager(otherRecognizer, recognizer) {\n var manager = recognizer.manager;\n\n if (manager) {\n return manager.get(otherRecognizer);\n }\n\n return otherRecognizer;\n}\n\n/**\n * @private\n * get a usable string, used as event postfix\n * @param {constant} state\n * @returns {String} state\n */\n\nfunction stateStr(state) {\n if (state & STATE_CANCELLED) {\n return 'cancel';\n } else if (state & STATE_ENDED) {\n return 'end';\n } else if (state & STATE_CHANGED) {\n return 'move';\n } else if (state & STATE_BEGAN) {\n return 'start';\n }\n\n return '';\n}\n\n/**\n * @private\n * Recognizer flow explained; *\n * All recognizers have the initial state of POSSIBLE when a input session starts.\n * The definition of a input session is from the first input until the last input, with all it's movement in it. *\n * Example session for mouse-input: mousedown -> mousemove -> mouseup\n *\n * On each recognizing cycle (see Manager.recognize) the .recognize() method is executed\n * which determines with state it should be.\n *\n * If the recognizer has the state FAILED, CANCELLED or RECOGNIZED (equals ENDED), it is reset to\n * POSSIBLE to give it another change on the next cycle.\n *\n * Possible\n * |\n * +-----+---------------+\n * | |\n * +-----+-----+ |\n * | | |\n * Failed Cancelled |\n * +-------+------+\n * | |\n * Recognized Began\n * |\n * Changed\n * |\n * Ended/Recognized\n */\n\n/**\n * @private\n * Recognizer\n * Every recognizer needs to extend from this class.\n * @constructor\n * @param {Object} options\n */\n\nvar Recognizer =\n/*#__PURE__*/\nfunction () {\n function Recognizer(options) {\n if (options === void 0) {\n options = {};\n }\n\n this.options = _extends({\n enable: true\n }, options);\n this.id = uniqueId();\n this.manager = null; // default is enable true\n\n this.state = STATE_POSSIBLE;\n this.simultaneous = {};\n this.requireFail = [];\n }\n /**\n * @private\n * set options\n * @param {Object} options\n * @return {Recognizer}\n */\n\n\n var _proto = Recognizer.prototype;\n\n _proto.set = function set(options) {\n assign$1(this.options, options); // also update the touchAction, in case something changed about the directions/enabled state\n\n this.manager && this.manager.touchAction.update();\n return this;\n };\n /**\n * @private\n * recognize simultaneous with an other recognizer.\n * @param {Recognizer} otherRecognizer\n * @returns {Recognizer} this\n */\n\n\n _proto.recognizeWith = function recognizeWith(otherRecognizer) {\n if (invokeArrayArg(otherRecognizer, 'recognizeWith', this)) {\n return this;\n }\n\n var simultaneous = this.simultaneous;\n otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this);\n\n if (!simultaneous[otherRecognizer.id]) {\n simultaneous[otherRecognizer.id] = otherRecognizer;\n otherRecognizer.recognizeWith(this);\n }\n\n return this;\n };\n /**\n * @private\n * drop the simultaneous link. it doesnt remove the link on the other recognizer.\n * @param {Recognizer} otherRecognizer\n * @returns {Recognizer} this\n */\n\n\n _proto.dropRecognizeWith = function dropRecognizeWith(otherRecognizer) {\n if (invokeArrayArg(otherRecognizer, 'dropRecognizeWith', this)) {\n return this;\n }\n\n otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this);\n delete this.simultaneous[otherRecognizer.id];\n return this;\n };\n /**\n * @private\n * recognizer can only run when an other is failing\n * @param {Recognizer} otherRecognizer\n * @returns {Recognizer} this\n */\n\n\n _proto.requireFailure = function requireFailure(otherRecognizer) {\n if (invokeArrayArg(otherRecognizer, 'requireFailure', this)) {\n return this;\n }\n\n var requireFail = this.requireFail;\n otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this);\n\n if (inArray(requireFail, otherRecognizer) === -1) {\n requireFail.push(otherRecognizer);\n otherRecognizer.requireFailure(this);\n }\n\n return this;\n };\n /**\n * @private\n * drop the requireFailure link. it does not remove the link on the other recognizer.\n * @param {Recognizer} otherRecognizer\n * @returns {Recognizer} this\n */\n\n\n _proto.dropRequireFailure = function dropRequireFailure(otherRecognizer) {\n if (invokeArrayArg(otherRecognizer, 'dropRequireFailure', this)) {\n return this;\n }\n\n otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this);\n var index = inArray(this.requireFail, otherRecognizer);\n\n if (index > -1) {\n this.requireFail.splice(index, 1);\n }\n\n return this;\n };\n /**\n * @private\n * has require failures boolean\n * @returns {boolean}\n */\n\n\n _proto.hasRequireFailures = function hasRequireFailures() {\n return this.requireFail.length > 0;\n };\n /**\n * @private\n * if the recognizer can recognize simultaneous with an other recognizer\n * @param {Recognizer} otherRecognizer\n * @returns {Boolean}\n */\n\n\n _proto.canRecognizeWith = function canRecognizeWith(otherRecognizer) {\n return !!this.simultaneous[otherRecognizer.id];\n };\n /**\n * @private\n * You should use `tryEmit` instead of `emit` directly to check\n * that all the needed recognizers has failed before emitting.\n * @param {Object} input\n */\n\n\n _proto.emit = function emit(input) {\n var self = this;\n var state = this.state;\n\n function emit(event) {\n self.manager.emit(event, input);\n } // 'panstart' and 'panmove'\n\n\n if (state < STATE_ENDED) {\n emit(self.options.event + stateStr(state));\n }\n\n emit(self.options.event); // simple 'eventName' events\n\n if (input.additionalEvent) {\n // additional event(panleft, panright, pinchin, pinchout...)\n emit(input.additionalEvent);\n } // panend and pancancel\n\n\n if (state >= STATE_ENDED) {\n emit(self.options.event + stateStr(state));\n }\n };\n /**\n * @private\n * Check that all the require failure recognizers has failed,\n * if true, it emits a gesture event,\n * otherwise, setup the state to FAILED.\n * @param {Object} input\n */\n\n\n _proto.tryEmit = function tryEmit(input) {\n if (this.canEmit()) {\n return this.emit(input);\n } // it's failing anyway\n\n\n this.state = STATE_FAILED;\n };\n /**\n * @private\n * can we emit?\n * @returns {boolean}\n */\n\n\n _proto.canEmit = function canEmit() {\n var i = 0;\n\n while (i < this.requireFail.length) {\n if (!(this.requireFail[i].state & (STATE_FAILED | STATE_POSSIBLE))) {\n return false;\n }\n\n i++;\n }\n\n return true;\n };\n /**\n * @private\n * update the recognizer\n * @param {Object} inputData\n */\n\n\n _proto.recognize = function recognize(inputData) {\n // make a new copy of the inputData\n // so we can change the inputData without messing up the other recognizers\n var inputDataClone = assign$1({}, inputData); // is is enabled and allow recognizing?\n\n if (!boolOrFn(this.options.enable, [this, inputDataClone])) {\n this.reset();\n this.state = STATE_FAILED;\n return;\n } // reset when we've reached the end\n\n\n if (this.state & (STATE_RECOGNIZED | STATE_CANCELLED | STATE_FAILED)) {\n this.state = STATE_POSSIBLE;\n }\n\n this.state = this.process(inputDataClone); // the recognizer has recognized a gesture\n // so trigger an event\n\n if (this.state & (STATE_BEGAN | STATE_CHANGED | STATE_ENDED | STATE_CANCELLED)) {\n this.tryEmit(inputDataClone);\n }\n };\n /**\n * @private\n * return the state of the recognizer\n * the actual recognizing happens in this method\n * @virtual\n * @param {Object} inputData\n * @returns {constant} STATE\n */\n\n /* jshint ignore:start */\n\n\n _proto.process = function process(inputData) {};\n /* jshint ignore:end */\n\n /**\n * @private\n * return the preferred touch-action\n * @virtual\n * @returns {Array}\n */\n\n\n _proto.getTouchAction = function getTouchAction() {};\n /**\n * @private\n * called when the gesture isn't allowed to recognize\n * like when another is being recognized or it is disabled\n * @virtual\n */\n\n\n _proto.reset = function reset() {};\n\n return Recognizer;\n}();\n\nvar defaults = {\n /**\n * @private\n * set if DOM events are being triggered.\n * But this is slower and unused by simple implementations, so disabled by default.\n * @type {Boolean}\n * @default false\n */\n domEvents: false,\n\n /**\n * @private\n * The value for the touchAction property/fallback.\n * When set to `compute` it will magically set the correct value based on the added recognizers.\n * @type {String}\n * @default compute\n */\n touchAction: TOUCH_ACTION_COMPUTE,\n\n /**\n * @private\n * @type {Boolean}\n * @default true\n */\n enable: true,\n\n /**\n * @private\n * EXPERIMENTAL FEATURE -- can be removed/changed\n * Change the parent input target element.\n * If Null, then it is being set the to main element.\n * @type {Null|EventTarget}\n * @default null\n */\n inputTarget: null,\n\n /**\n * @private\n * force an input class\n * @type {Null|Function}\n * @default null\n */\n inputClass: null,\n\n /**\n * @private\n * Default recognizer setup when calling `Hammer()`\n * When creating a new Manager these will be skipped.\n * @type {Array}\n */\n preset: [],\n\n /**\n * @private\n * Some CSS properties can be used to improve the working of Hammer.\n * Add them to this method and they will be set when creating a new Manager.\n * @namespace\n */\n cssProps: {\n /**\n * @private\n * Disables text selection to improve the dragging gesture. Mainly for desktop browsers.\n * @type {String}\n * @default 'none'\n */\n userSelect: \"none\",\n\n /**\n * @private\n * Disable the Windows Phone grippers when pressing an element.\n * @type {String}\n * @default 'none'\n */\n touchSelect: \"none\",\n\n /**\n * @private\n * Disables the default callout shown when you touch and hold a touch target.\n * On iOS, when you touch and hold a touch target such as a link, Safari displays\n * a callout containing information about the link. This property allows you to disable that callout.\n * @type {String}\n * @default 'none'\n */\n touchCallout: \"none\",\n\n /**\n * @private\n * Specifies whether zooming is enabled. Used by IE10>\n * @type {String}\n * @default 'none'\n */\n contentZooming: \"none\",\n\n /**\n * @private\n * Specifies that an entire element should be draggable instead of its contents. Mainly for desktop browsers.\n * @type {String}\n * @default 'none'\n */\n userDrag: \"none\",\n\n /**\n * @private\n * Overrides the highlight color shown when the user taps a link or a JavaScript\n * clickable element in iOS. This property obeys the alpha value, if specified.\n * @type {String}\n * @default 'rgba(0,0,0,0)'\n */\n tapHighlightColor: \"rgba(0,0,0,0)\"\n }\n};\n\nvar STOP = 1;\nvar FORCED_STOP = 2;\n/**\n * @private\n * add/remove the css properties as defined in manager.options.cssProps\n * @param {Manager} manager\n * @param {Boolean} add\n */\n\nfunction toggleCssProps(manager, add) {\n var element = manager.element;\n\n if (!element.style) {\n return;\n }\n\n var prop;\n each(manager.options.cssProps, function (value, name) {\n prop = prefixed(element.style, name);\n\n if (add) {\n manager.oldCssProps[prop] = element.style[prop];\n element.style[prop] = value;\n } else {\n element.style[prop] = manager.oldCssProps[prop] || \"\";\n }\n });\n\n if (!add) {\n manager.oldCssProps = {};\n }\n}\n/**\n * @private\n * trigger dom event\n * @param {String} event\n * @param {Object} data\n */\n\n\nfunction triggerDomEvent(event, data) {\n var gestureEvent = document.createEvent(\"Event\");\n gestureEvent.initEvent(event, true, true);\n gestureEvent.gesture = data;\n data.target.dispatchEvent(gestureEvent);\n}\n/**\n* @private\n * Manager\n * @param {HTMLElement} element\n * @param {Object} [options]\n * @constructor\n */\n\n\nvar Manager =\n/*#__PURE__*/\nfunction () {\n function Manager(element, options) {\n var _this = this;\n\n this.options = assign$1({}, defaults, options || {});\n this.options.inputTarget = this.options.inputTarget || element;\n this.handlers = {};\n this.session = {};\n this.recognizers = [];\n this.oldCssProps = {};\n this.element = element;\n this.input = createInputInstance(this);\n this.touchAction = new TouchAction(this, this.options.touchAction);\n toggleCssProps(this, true);\n each(this.options.recognizers, function (item) {\n var recognizer = _this.add(new item[0](item[1]));\n\n item[2] && recognizer.recognizeWith(item[2]);\n item[3] && recognizer.requireFailure(item[3]);\n }, this);\n }\n /**\n * @private\n * set options\n * @param {Object} options\n * @returns {Manager}\n */\n\n\n var _proto = Manager.prototype;\n\n _proto.set = function set(options) {\n assign$1(this.options, options); // Options that need a little more setup\n\n if (options.touchAction) {\n this.touchAction.update();\n }\n\n if (options.inputTarget) {\n // Clean up existing event listeners and reinitialize\n this.input.destroy();\n this.input.target = options.inputTarget;\n this.input.init();\n }\n\n return this;\n };\n /**\n * @private\n * stop recognizing for this session.\n * This session will be discarded, when a new [input]start event is fired.\n * When forced, the recognizer cycle is stopped immediately.\n * @param {Boolean} [force]\n */\n\n\n _proto.stop = function stop(force) {\n this.session.stopped = force ? FORCED_STOP : STOP;\n };\n /**\n * @private\n * run the recognizers!\n * called by the inputHandler function on every movement of the pointers (touches)\n * it walks through all the recognizers and tries to detect the gesture that is being made\n * @param {Object} inputData\n */\n\n\n _proto.recognize = function recognize(inputData) {\n var session = this.session;\n\n if (session.stopped) {\n return;\n } // run the touch-action polyfill\n\n\n this.touchAction.preventDefaults(inputData);\n var recognizer;\n var recognizers = this.recognizers; // this holds the recognizer that is being recognized.\n // so the recognizer's state needs to be BEGAN, CHANGED, ENDED or RECOGNIZED\n // if no recognizer is detecting a thing, it is set to `null`\n\n var curRecognizer = session.curRecognizer; // reset when the last recognizer is recognized\n // or when we're in a new session\n\n if (!curRecognizer || curRecognizer && curRecognizer.state & STATE_RECOGNIZED) {\n session.curRecognizer = null;\n curRecognizer = null;\n }\n\n var i = 0;\n\n while (i < recognizers.length) {\n recognizer = recognizers[i]; // find out if we are allowed try to recognize the input for this one.\n // 1. allow if the session is NOT forced stopped (see the .stop() method)\n // 2. allow if we still haven't recognized a gesture in this session, or the this recognizer is the one\n // that is being recognized.\n // 3. allow if the recognizer is allowed to run simultaneous with the current recognized recognizer.\n // this can be setup with the `recognizeWith()` method on the recognizer.\n\n if (session.stopped !== FORCED_STOP && ( // 1\n !curRecognizer || recognizer === curRecognizer || // 2\n recognizer.canRecognizeWith(curRecognizer))) {\n // 3\n recognizer.recognize(inputData);\n } else {\n recognizer.reset();\n } // if the recognizer has been recognizing the input as a valid gesture, we want to store this one as the\n // current active recognizer. but only if we don't already have an active recognizer\n\n\n if (!curRecognizer && recognizer.state & (STATE_BEGAN | STATE_CHANGED | STATE_ENDED)) {\n session.curRecognizer = recognizer;\n curRecognizer = recognizer;\n }\n\n i++;\n }\n };\n /**\n * @private\n * get a recognizer by its event name.\n * @param {Recognizer|String} recognizer\n * @returns {Recognizer|Null}\n */\n\n\n _proto.get = function get(recognizer) {\n if (recognizer instanceof Recognizer) {\n return recognizer;\n }\n\n var recognizers = this.recognizers;\n\n for (var i = 0; i < recognizers.length; i++) {\n if (recognizers[i].options.event === recognizer) {\n return recognizers[i];\n }\n }\n\n return null;\n };\n /**\n * @private add a recognizer to the manager\n * existing recognizers with the same event name will be removed\n * @param {Recognizer} recognizer\n * @returns {Recognizer|Manager}\n */\n\n\n _proto.add = function add(recognizer) {\n if (invokeArrayArg(recognizer, \"add\", this)) {\n return this;\n } // remove existing\n\n\n var existing = this.get(recognizer.options.event);\n\n if (existing) {\n this.remove(existing);\n }\n\n this.recognizers.push(recognizer);\n recognizer.manager = this;\n this.touchAction.update();\n return recognizer;\n };\n /**\n * @private\n * remove a recognizer by name or instance\n * @param {Recognizer|String} recognizer\n * @returns {Manager}\n */\n\n\n _proto.remove = function remove(recognizer) {\n if (invokeArrayArg(recognizer, \"remove\", this)) {\n return this;\n }\n\n var targetRecognizer = this.get(recognizer); // let's make sure this recognizer exists\n\n if (recognizer) {\n var recognizers = this.recognizers;\n var index = inArray(recognizers, targetRecognizer);\n\n if (index !== -1) {\n recognizers.splice(index, 1);\n this.touchAction.update();\n }\n }\n\n return this;\n };\n /**\n * @private\n * bind event\n * @param {String} events\n * @param {Function} handler\n * @returns {EventEmitter} this\n */\n\n\n _proto.on = function on(events, handler) {\n if (events === undefined || handler === undefined) {\n return this;\n }\n\n var handlers = this.handlers;\n each(splitStr(events), function (event) {\n handlers[event] = handlers[event] || [];\n handlers[event].push(handler);\n });\n return this;\n };\n /**\n * @private unbind event, leave emit blank to remove all handlers\n * @param {String} events\n * @param {Function} [handler]\n * @returns {EventEmitter} this\n */\n\n\n _proto.off = function off(events, handler) {\n if (events === undefined) {\n return this;\n }\n\n var handlers = this.handlers;\n each(splitStr(events), function (event) {\n if (!handler) {\n delete handlers[event];\n } else {\n handlers[event] && handlers[event].splice(inArray(handlers[event], handler), 1);\n }\n });\n return this;\n };\n /**\n * @private emit event to the listeners\n * @param {String} event\n * @param {Object} data\n */\n\n\n _proto.emit = function emit(event, data) {\n // we also want to trigger dom events\n if (this.options.domEvents) {\n triggerDomEvent(event, data);\n } // no handlers, so skip it all\n\n\n var handlers = this.handlers[event] && this.handlers[event].slice();\n\n if (!handlers || !handlers.length) {\n return;\n }\n\n data.type = event;\n\n data.preventDefault = function () {\n data.srcEvent.preventDefault();\n };\n\n var i = 0;\n\n while (i < handlers.length) {\n handlers[i](data);\n i++;\n }\n };\n /**\n * @private\n * destroy the manager and unbinds all events\n * it doesn't unbind dom events, that is the user own responsibility\n */\n\n\n _proto.destroy = function destroy() {\n this.element && toggleCssProps(this, false);\n this.handlers = {};\n this.session = {};\n this.input.destroy();\n this.element = null;\n };\n\n return Manager;\n}();\n\nvar SINGLE_TOUCH_INPUT_MAP = {\n touchstart: INPUT_START,\n touchmove: INPUT_MOVE,\n touchend: INPUT_END,\n touchcancel: INPUT_CANCEL\n};\nvar SINGLE_TOUCH_TARGET_EVENTS = 'touchstart';\nvar SINGLE_TOUCH_WINDOW_EVENTS = 'touchstart touchmove touchend touchcancel';\n/**\n * @private\n * Touch events input\n * @constructor\n * @extends Input\n */\n\nvar SingleTouchInput =\n/*#__PURE__*/\nfunction (_Input) {\n _inheritsLoose(SingleTouchInput, _Input);\n\n function SingleTouchInput() {\n var _this;\n\n var proto = SingleTouchInput.prototype;\n proto.evTarget = SINGLE_TOUCH_TARGET_EVENTS;\n proto.evWin = SINGLE_TOUCH_WINDOW_EVENTS;\n _this = _Input.apply(this, arguments) || this;\n _this.started = false;\n return _this;\n }\n\n var _proto = SingleTouchInput.prototype;\n\n _proto.handler = function handler(ev) {\n var type = SINGLE_TOUCH_INPUT_MAP[ev.type]; // should we handle the touch events?\n\n if (type === INPUT_START) {\n this.started = true;\n }\n\n if (!this.started) {\n return;\n }\n\n var touches = normalizeSingleTouches.call(this, ev, type); // when done, reset the started state\n\n if (type & (INPUT_END | INPUT_CANCEL) && touches[0].length - touches[1].length === 0) {\n this.started = false;\n }\n\n this.callback(this.manager, type, {\n pointers: touches[0],\n changedPointers: touches[1],\n pointerType: INPUT_TYPE_TOUCH,\n srcEvent: ev\n });\n };\n\n return SingleTouchInput;\n}(Input);\n\nfunction normalizeSingleTouches(ev, type) {\n var all = toArray(ev.touches);\n var changed = toArray(ev.changedTouches);\n\n if (type & (INPUT_END | INPUT_CANCEL)) {\n all = uniqueArray(all.concat(changed), 'identifier', true);\n }\n\n return [all, changed];\n}\n\n/**\n * @private\n * This recognizer is just used as a base for the simple attribute recognizers.\n * @constructor\n * @extends Recognizer\n */\n\nvar AttrRecognizer =\n/*#__PURE__*/\nfunction (_Recognizer) {\n _inheritsLoose(AttrRecognizer, _Recognizer);\n\n function AttrRecognizer(options) {\n if (options === void 0) {\n options = {};\n }\n\n return _Recognizer.call(this, _extends({\n pointers: 1\n }, options)) || this;\n }\n /**\n * @private\n * Used to check if it the recognizer receives valid input, like input.distance > 10.\n * @memberof AttrRecognizer\n * @param {Object} input\n * @returns {Boolean} recognized\n */\n\n\n var _proto = AttrRecognizer.prototype;\n\n _proto.attrTest = function attrTest(input) {\n var optionPointers = this.options.pointers;\n return optionPointers === 0 || input.pointers.length === optionPointers;\n };\n /**\n * @private\n * Process the input and return the state for the recognizer\n * @memberof AttrRecognizer\n * @param {Object} input\n * @returns {*} State\n */\n\n\n _proto.process = function process(input) {\n var state = this.state;\n var eventType = input.eventType;\n var isRecognized = state & (STATE_BEGAN | STATE_CHANGED);\n var isValid = this.attrTest(input); // on cancel input and we've recognized before, return STATE_CANCELLED\n\n if (isRecognized && (eventType & INPUT_CANCEL || !isValid)) {\n return state | STATE_CANCELLED;\n } else if (isRecognized || isValid) {\n if (eventType & INPUT_END) {\n return state | STATE_ENDED;\n } else if (!(state & STATE_BEGAN)) {\n return STATE_BEGAN;\n }\n\n return state | STATE_CHANGED;\n }\n\n return STATE_FAILED;\n };\n\n return AttrRecognizer;\n}(Recognizer);\n\n/**\n * @private\n * A tap is recognized when the pointer is doing a small tap/click. Multiple taps are recognized if they occur\n * between the given interval and position. The delay option can be used to recognize multi-taps without firing\n * a single tap.\n *\n * The eventData from the emitted event contains the property `tapCount`, which contains the amount of\n * multi-taps being recognized.\n * @constructor\n * @extends Recognizer\n */\n\nvar TapRecognizer =\n/*#__PURE__*/\nfunction (_Recognizer) {\n _inheritsLoose(TapRecognizer, _Recognizer);\n\n function TapRecognizer(options) {\n var _this;\n\n if (options === void 0) {\n options = {};\n }\n\n _this = _Recognizer.call(this, _extends({\n event: 'tap',\n pointers: 1,\n taps: 1,\n interval: 300,\n // max time between the multi-tap taps\n time: 250,\n // max time of the pointer to be down (like finger on the screen)\n threshold: 9,\n // a minimal movement is ok, but keep it low\n posThreshold: 10\n }, options)) || this; // previous time and center,\n // used for tap counting\n\n _this.pTime = false;\n _this.pCenter = false;\n _this._timer = null;\n _this._input = null;\n _this.count = 0;\n return _this;\n }\n\n var _proto = TapRecognizer.prototype;\n\n _proto.getTouchAction = function getTouchAction() {\n return [TOUCH_ACTION_MANIPULATION];\n };\n\n _proto.process = function process(input) {\n var _this2 = this;\n\n var options = this.options;\n var validPointers = input.pointers.length === options.pointers;\n var validMovement = input.distance < options.threshold;\n var validTouchTime = input.deltaTime < options.time;\n this.reset();\n\n if (input.eventType & INPUT_START && this.count === 0) {\n return this.failTimeout();\n } // we only allow little movement\n // and we've reached an end event, so a tap is possible\n\n\n if (validMovement && validTouchTime && validPointers) {\n if (input.eventType !== INPUT_END) {\n return this.failTimeout();\n }\n\n var validInterval = this.pTime ? input.timeStamp - this.pTime < options.interval : true;\n var validMultiTap = !this.pCenter || getDistance(this.pCenter, input.center) < options.posThreshold;\n this.pTime = input.timeStamp;\n this.pCenter = input.center;\n\n if (!validMultiTap || !validInterval) {\n this.count = 1;\n } else {\n this.count += 1;\n }\n\n this._input = input; // if tap count matches we have recognized it,\n // else it has began recognizing...\n\n var tapCount = this.count % options.taps;\n\n if (tapCount === 0) {\n // no failing requirements, immediately trigger the tap event\n // or wait as long as the multitap interval to trigger\n if (!this.hasRequireFailures()) {\n return STATE_RECOGNIZED;\n } else {\n this._timer = setTimeout(function () {\n _this2.state = STATE_RECOGNIZED;\n\n _this2.tryEmit();\n }, options.interval);\n return STATE_BEGAN;\n }\n }\n }\n\n return STATE_FAILED;\n };\n\n _proto.failTimeout = function failTimeout() {\n var _this3 = this;\n\n this._timer = setTimeout(function () {\n _this3.state = STATE_FAILED;\n }, this.options.interval);\n return STATE_FAILED;\n };\n\n _proto.reset = function reset() {\n clearTimeout(this._timer);\n };\n\n _proto.emit = function emit() {\n if (this.state === STATE_RECOGNIZED) {\n this._input.tapCount = this.count;\n this.manager.emit(this.options.event, this._input);\n }\n };\n\n return TapRecognizer;\n}(Recognizer);\n\n/**\n * @private\n * direction cons to string\n * @param {constant} direction\n * @returns {String}\n */\n\nfunction directionStr(direction) {\n if (direction === DIRECTION_DOWN) {\n return 'down';\n } else if (direction === DIRECTION_UP) {\n return 'up';\n } else if (direction === DIRECTION_LEFT) {\n return 'left';\n } else if (direction === DIRECTION_RIGHT) {\n return 'right';\n }\n\n return '';\n}\n\n/**\n * @private\n * Pan\n * Recognized when the pointer is down and moved in the allowed direction.\n * @constructor\n * @extends AttrRecognizer\n */\n\nvar PanRecognizer =\n/*#__PURE__*/\nfunction (_AttrRecognizer) {\n _inheritsLoose(PanRecognizer, _AttrRecognizer);\n\n function PanRecognizer(options) {\n var _this;\n\n if (options === void 0) {\n options = {};\n }\n\n _this = _AttrRecognizer.call(this, _extends({\n event: 'pan',\n threshold: 10,\n pointers: 1,\n direction: DIRECTION_ALL\n }, options)) || this;\n _this.pX = null;\n _this.pY = null;\n return _this;\n }\n\n var _proto = PanRecognizer.prototype;\n\n _proto.getTouchAction = function getTouchAction() {\n var direction = this.options.direction;\n var actions = [];\n\n if (direction & DIRECTION_HORIZONTAL) {\n actions.push(TOUCH_ACTION_PAN_Y);\n }\n\n if (direction & DIRECTION_VERTICAL) {\n actions.push(TOUCH_ACTION_PAN_X);\n }\n\n return actions;\n };\n\n _proto.directionTest = function directionTest(input) {\n var options = this.options;\n var hasMoved = true;\n var distance = input.distance;\n var direction = input.direction;\n var x = input.deltaX;\n var y = input.deltaY; // lock to axis?\n\n if (!(direction & options.direction)) {\n if (options.direction & DIRECTION_HORIZONTAL) {\n direction = x === 0 ? DIRECTION_NONE : x < 0 ? DIRECTION_LEFT : DIRECTION_RIGHT;\n hasMoved = x !== this.pX;\n distance = Math.abs(input.deltaX);\n } else {\n direction = y === 0 ? DIRECTION_NONE : y < 0 ? DIRECTION_UP : DIRECTION_DOWN;\n hasMoved = y !== this.pY;\n distance = Math.abs(input.deltaY);\n }\n }\n\n input.direction = direction;\n return hasMoved && distance > options.threshold && direction & options.direction;\n };\n\n _proto.attrTest = function attrTest(input) {\n return AttrRecognizer.prototype.attrTest.call(this, input) && ( // replace with a super call\n this.state & STATE_BEGAN || !(this.state & STATE_BEGAN) && this.directionTest(input));\n };\n\n _proto.emit = function emit(input) {\n this.pX = input.deltaX;\n this.pY = input.deltaY;\n var direction = directionStr(input.direction);\n\n if (direction) {\n input.additionalEvent = this.options.event + direction;\n }\n\n _AttrRecognizer.prototype.emit.call(this, input);\n };\n\n return PanRecognizer;\n}(AttrRecognizer);\n\n/**\n * @private\n * Swipe\n * Recognized when the pointer is moving fast (velocity), with enough distance in the allowed direction.\n * @constructor\n * @extends AttrRecognizer\n */\n\nvar SwipeRecognizer =\n/*#__PURE__*/\nfunction (_AttrRecognizer) {\n _inheritsLoose(SwipeRecognizer, _AttrRecognizer);\n\n function SwipeRecognizer(options) {\n if (options === void 0) {\n options = {};\n }\n\n return _AttrRecognizer.call(this, _extends({\n event: 'swipe',\n threshold: 10,\n velocity: 0.3,\n direction: DIRECTION_HORIZONTAL | DIRECTION_VERTICAL,\n pointers: 1\n }, options)) || this;\n }\n\n var _proto = SwipeRecognizer.prototype;\n\n _proto.getTouchAction = function getTouchAction() {\n return PanRecognizer.prototype.getTouchAction.call(this);\n };\n\n _proto.attrTest = function attrTest(input) {\n var direction = this.options.direction;\n var velocity;\n\n if (direction & (DIRECTION_HORIZONTAL | DIRECTION_VERTICAL)) {\n velocity = input.overallVelocity;\n } else if (direction & DIRECTION_HORIZONTAL) {\n velocity = input.overallVelocityX;\n } else if (direction & DIRECTION_VERTICAL) {\n velocity = input.overallVelocityY;\n }\n\n return _AttrRecognizer.prototype.attrTest.call(this, input) && direction & input.offsetDirection && input.distance > this.options.threshold && input.maxPointers === this.options.pointers && abs(velocity) > this.options.velocity && input.eventType & INPUT_END;\n };\n\n _proto.emit = function emit(input) {\n var direction = directionStr(input.offsetDirection);\n\n if (direction) {\n this.manager.emit(this.options.event + direction, input);\n }\n\n this.manager.emit(this.options.event, input);\n };\n\n return SwipeRecognizer;\n}(AttrRecognizer);\n\n/**\n * @private\n * Pinch\n * Recognized when two or more pointers are moving toward (zoom-in) or away from each other (zoom-out).\n * @constructor\n * @extends AttrRecognizer\n */\n\nvar PinchRecognizer =\n/*#__PURE__*/\nfunction (_AttrRecognizer) {\n _inheritsLoose(PinchRecognizer, _AttrRecognizer);\n\n function PinchRecognizer(options) {\n if (options === void 0) {\n options = {};\n }\n\n return _AttrRecognizer.call(this, _extends({\n event: 'pinch',\n threshold: 0,\n pointers: 2\n }, options)) || this;\n }\n\n var _proto = PinchRecognizer.prototype;\n\n _proto.getTouchAction = function getTouchAction() {\n return [TOUCH_ACTION_NONE];\n };\n\n _proto.attrTest = function attrTest(input) {\n return _AttrRecognizer.prototype.attrTest.call(this, input) && (Math.abs(input.scale - 1) > this.options.threshold || this.state & STATE_BEGAN);\n };\n\n _proto.emit = function emit(input) {\n if (input.scale !== 1) {\n var inOut = input.scale < 1 ? 'in' : 'out';\n input.additionalEvent = this.options.event + inOut;\n }\n\n _AttrRecognizer.prototype.emit.call(this, input);\n };\n\n return PinchRecognizer;\n}(AttrRecognizer);\n\n/**\n * @private\n * Rotate\n * Recognized when two or more pointer are moving in a circular motion.\n * @constructor\n * @extends AttrRecognizer\n */\n\nvar RotateRecognizer =\n/*#__PURE__*/\nfunction (_AttrRecognizer) {\n _inheritsLoose(RotateRecognizer, _AttrRecognizer);\n\n function RotateRecognizer(options) {\n if (options === void 0) {\n options = {};\n }\n\n return _AttrRecognizer.call(this, _extends({\n event: 'rotate',\n threshold: 0,\n pointers: 2\n }, options)) || this;\n }\n\n var _proto = RotateRecognizer.prototype;\n\n _proto.getTouchAction = function getTouchAction() {\n return [TOUCH_ACTION_NONE];\n };\n\n _proto.attrTest = function attrTest(input) {\n return _AttrRecognizer.prototype.attrTest.call(this, input) && (Math.abs(input.rotation) > this.options.threshold || this.state & STATE_BEGAN);\n };\n\n return RotateRecognizer;\n}(AttrRecognizer);\n\n/**\n * @private\n * Press\n * Recognized when the pointer is down for x ms without any movement.\n * @constructor\n * @extends Recognizer\n */\n\nvar PressRecognizer =\n/*#__PURE__*/\nfunction (_Recognizer) {\n _inheritsLoose(PressRecognizer, _Recognizer);\n\n function PressRecognizer(options) {\n var _this;\n\n if (options === void 0) {\n options = {};\n }\n\n _this = _Recognizer.call(this, _extends({\n event: 'press',\n pointers: 1,\n time: 251,\n // minimal time of the pointer to be pressed\n threshold: 9\n }, options)) || this;\n _this._timer = null;\n _this._input = null;\n return _this;\n }\n\n var _proto = PressRecognizer.prototype;\n\n _proto.getTouchAction = function getTouchAction() {\n return [TOUCH_ACTION_AUTO];\n };\n\n _proto.process = function process(input) {\n var _this2 = this;\n\n var options = this.options;\n var validPointers = input.pointers.length === options.pointers;\n var validMovement = input.distance < options.threshold;\n var validTime = input.deltaTime > options.time;\n this._input = input; // we only allow little movement\n // and we've reached an end event, so a tap is possible\n\n if (!validMovement || !validPointers || input.eventType & (INPUT_END | INPUT_CANCEL) && !validTime) {\n this.reset();\n } else if (input.eventType & INPUT_START) {\n this.reset();\n this._timer = setTimeout(function () {\n _this2.state = STATE_RECOGNIZED;\n\n _this2.tryEmit();\n }, options.time);\n } else if (input.eventType & INPUT_END) {\n return STATE_RECOGNIZED;\n }\n\n return STATE_FAILED;\n };\n\n _proto.reset = function reset() {\n clearTimeout(this._timer);\n };\n\n _proto.emit = function emit(input) {\n if (this.state !== STATE_RECOGNIZED) {\n return;\n }\n\n if (input && input.eventType & INPUT_END) {\n this.manager.emit(this.options.event + \"up\", input);\n } else {\n this._input.timeStamp = now();\n this.manager.emit(this.options.event, this._input);\n }\n };\n\n return PressRecognizer;\n}(Recognizer);\n\n/**\n * @private\n * wrap a method with a deprecation warning and stack trace\n * @param {Function} method\n * @param {String} name\n * @param {String} message\n * @returns {Function} A new function wrapping the supplied method.\n */\nfunction deprecate(method, name, message) {\n var deprecationMessage = \"DEPRECATED METHOD: \" + name + \"\\n\" + message + \" AT \\n\";\n return function () {\n var e = new Error('get-stack-trace');\n var stack = e && e.stack ? e.stack.replace(/^[^\\(]+?[\\n$]/gm, '').replace(/^\\s+at\\s+/gm, '').replace(/^Object.\\s*\\(/gm, '{anonymous}()@') : 'Unknown Stack Trace';\n var log = window.console && (window.console.warn || window.console.log);\n\n if (log) {\n log.call(window.console, deprecationMessage, stack);\n }\n\n return method.apply(this, arguments);\n };\n}\n\n/**\n * @private\n * extend object.\n * means that properties in dest will be overwritten by the ones in src.\n * @param {Object} dest\n * @param {Object} src\n * @param {Boolean} [merge=false]\n * @returns {Object} dest\n */\n\nvar extend = deprecate(function (dest, src, merge) {\n var keys = Object.keys(src);\n var i = 0;\n\n while (i < keys.length) {\n if (!merge || merge && dest[keys[i]] === undefined) {\n dest[keys[i]] = src[keys[i]];\n }\n\n i++;\n }\n\n return dest;\n}, 'extend', 'Use `assign`.');\n\n/**\n * @private\n * merge the values from src in the dest.\n * means that properties that exist in dest will not be overwritten by src\n * @param {Object} dest\n * @param {Object} src\n * @returns {Object} dest\n */\n\nvar merge = deprecate(function (dest, src) {\n return extend(dest, src, true);\n}, 'merge', 'Use `assign`.');\n\n/**\n * @private\n * simple class inheritance\n * @param {Function} child\n * @param {Function} base\n * @param {Object} [properties]\n */\n\nfunction inherit(child, base, properties) {\n var baseP = base.prototype;\n var childP;\n childP = child.prototype = Object.create(baseP);\n childP.constructor = child;\n childP._super = baseP;\n\n if (properties) {\n assign$1(childP, properties);\n }\n}\n\n/**\n * @private\n * simple function bind\n * @param {Function} fn\n * @param {Object} context\n * @returns {Function}\n */\nfunction bindFn(fn, context) {\n return function boundFn() {\n return fn.apply(context, arguments);\n };\n}\n\n/**\n * @private\n * Simple way to create a manager with a default set of recognizers.\n * @param {HTMLElement} element\n * @param {Object} [options]\n * @constructor\n */\n\nvar Hammer =\n/*#__PURE__*/\nfunction () {\n var Hammer =\n /**\n * @private\n * @const {string}\n */\n function Hammer(element, options) {\n if (options === void 0) {\n options = {};\n }\n\n return new Manager(element, _extends({\n recognizers: [// RecognizerClass, options, [recognizeWith, ...], [requireFailure, ...]\n [RotateRecognizer, {\n enable: false\n }], [PinchRecognizer, {\n enable: false\n }, ['rotate']], [SwipeRecognizer, {\n direction: DIRECTION_HORIZONTAL\n }], [PanRecognizer, {\n direction: DIRECTION_HORIZONTAL\n }, ['swipe']], [TapRecognizer], [TapRecognizer, {\n event: 'doubletap',\n taps: 2\n }, ['tap']], [PressRecognizer]]\n }, options));\n };\n\n Hammer.VERSION = \"2.0.15\";\n Hammer.DIRECTION_ALL = DIRECTION_ALL;\n Hammer.DIRECTION_DOWN = DIRECTION_DOWN;\n Hammer.DIRECTION_LEFT = DIRECTION_LEFT;\n Hammer.DIRECTION_RIGHT = DIRECTION_RIGHT;\n Hammer.DIRECTION_UP = DIRECTION_UP;\n Hammer.DIRECTION_HORIZONTAL = DIRECTION_HORIZONTAL;\n Hammer.DIRECTION_VERTICAL = DIRECTION_VERTICAL;\n Hammer.DIRECTION_NONE = DIRECTION_NONE;\n Hammer.DIRECTION_DOWN = DIRECTION_DOWN;\n Hammer.INPUT_START = INPUT_START;\n Hammer.INPUT_MOVE = INPUT_MOVE;\n Hammer.INPUT_END = INPUT_END;\n Hammer.INPUT_CANCEL = INPUT_CANCEL;\n Hammer.STATE_POSSIBLE = STATE_POSSIBLE;\n Hammer.STATE_BEGAN = STATE_BEGAN;\n Hammer.STATE_CHANGED = STATE_CHANGED;\n Hammer.STATE_ENDED = STATE_ENDED;\n Hammer.STATE_RECOGNIZED = STATE_RECOGNIZED;\n Hammer.STATE_CANCELLED = STATE_CANCELLED;\n Hammer.STATE_FAILED = STATE_FAILED;\n Hammer.Manager = Manager;\n Hammer.Input = Input;\n Hammer.TouchAction = TouchAction;\n Hammer.TouchInput = TouchInput;\n Hammer.MouseInput = MouseInput;\n Hammer.PointerEventInput = PointerEventInput;\n Hammer.TouchMouseInput = TouchMouseInput;\n Hammer.SingleTouchInput = SingleTouchInput;\n Hammer.Recognizer = Recognizer;\n Hammer.AttrRecognizer = AttrRecognizer;\n Hammer.Tap = TapRecognizer;\n Hammer.Pan = PanRecognizer;\n Hammer.Swipe = SwipeRecognizer;\n Hammer.Pinch = PinchRecognizer;\n Hammer.Rotate = RotateRecognizer;\n Hammer.Press = PressRecognizer;\n Hammer.on = addEventListeners;\n Hammer.off = removeEventListeners;\n Hammer.each = each;\n Hammer.merge = merge;\n Hammer.extend = extend;\n Hammer.bindFn = bindFn;\n Hammer.assign = assign$1;\n Hammer.inherit = inherit;\n Hammer.bindFn = bindFn;\n Hammer.prefixed = prefixed;\n Hammer.toArray = toArray;\n Hammer.inArray = inArray;\n Hammer.uniqueArray = uniqueArray;\n Hammer.splitStr = splitStr;\n Hammer.boolOrFn = boolOrFn;\n Hammer.hasParent = hasParent;\n Hammer.addEventListeners = addEventListeners;\n Hammer.removeEventListeners = removeEventListeners;\n Hammer.defaults = defaults;\n return Hammer;\n}();\n\nexport default Hammer;\nexport { INPUT_START, INPUT_MOVE, INPUT_END, INPUT_CANCEL, STATE_POSSIBLE, STATE_BEGAN, STATE_CHANGED, STATE_ENDED, STATE_RECOGNIZED, STATE_CANCELLED, STATE_FAILED, DIRECTION_NONE, DIRECTION_LEFT, DIRECTION_RIGHT, DIRECTION_UP, DIRECTION_DOWN, DIRECTION_HORIZONTAL, DIRECTION_VERTICAL, DIRECTION_ALL, Manager, Input, TouchAction, TouchInput, MouseInput, PointerEventInput, TouchMouseInput, SingleTouchInput, Recognizer, AttrRecognizer, TapRecognizer as Tap, PanRecognizer as Pan, SwipeRecognizer as Swipe, PinchRecognizer as Pinch, RotateRecognizer as Rotate, PressRecognizer as Press, addEventListeners as on, removeEventListeners as off, each, merge, extend, assign$1 as assign, inherit, bindFn, prefixed, toArray, inArray, uniqueArray, splitStr, boolOrFn, hasParent, addEventListeners, removeEventListeners, defaults };\n//# sourceMappingURL=hammer.esm.js.map\n","/**\n * Setup a mock hammer.js object, for unit testing.\n *\n * Inspiration: https://github.com/uber/deck.gl/pull/658\n *\n * @returns {{on: noop, off: noop, destroy: noop, emit: noop, get: get}}\n */\nfunction hammerMock() {\n const noop = () => {};\n\n return {\n on: noop,\n off: noop,\n destroy: noop,\n emit: noop,\n\n get: function(m) {\t//eslint-disable-line no-unused-vars\n return {\n set: noop\n };\n }\n };\n}\n\n\nif (typeof window !== 'undefined') {\n var Hammer = window['Hammer'] || require('@egjs/hammerjs');\n module.exports = Hammer;\n}\nelse {\n module.exports = function () {\n // hammer.js is only available in a browser, not in node.js. Replacing it with a mock object.\n return hammerMock();\n }\n}\n","require('./Activator.css');\n\nvar keycharm = require('keycharm');\nvar Emitter = require('component-emitter');\nvar Hammer = require('../module/hammer');\nvar util = require('vis-util');\n\n/**\n * Turn an element into an clickToUse element.\n * When not active, the element has a transparent overlay. When the overlay is\n * clicked, the mode is changed to active.\n * When active, the element is displayed with a blue border around it, and\n * the interactive contents of the element can be used. When clicked outside\n * the element, the elements mode is changed to inactive.\n * @param {Element} container\n * @constructor Activator\n */\nfunction Activator(container) {\n this.active = false;\n\n this.dom = {\n container: container\n };\n\n this.dom.overlay = document.createElement('div');\n this.dom.overlay.className = 'vis-overlay';\n\n this.dom.container.appendChild(this.dom.overlay);\n\n this.hammer = Hammer(this.dom.overlay);\n this.hammer.on('tap', this._onTapOverlay.bind(this));\n\n // block all touch events (except tap)\n var me = this;\n var events = [\n 'tap', 'doubletap', 'press',\n 'pinch',\n 'pan', 'panstart', 'panmove', 'panend'\n ];\n events.forEach(function (event) {\n me.hammer.on(event, function (event) {\n event.stopPropagation();\n });\n });\n\n // attach a click event to the window, in order to deactivate when clicking outside the timeline\n if (document && document.body) {\n this.onClick = function (event) {\n if (!_hasParent(event.target, container)) {\n me.deactivate();\n }\n };\n document.body.addEventListener('click', this.onClick);\n }\n\n if (this.keycharm !== undefined) {\n this.keycharm.destroy();\n }\n this.keycharm = keycharm();\n\n // keycharm listener only bounded when active)\n this.escListener = this.deactivate.bind(this);\n}\n\n// turn into an event emitter\nEmitter(Activator.prototype);\n\n// The currently active activator\nActivator.current = null;\n\n/**\n * Destroy the activator. Cleans up all created DOM and event listeners\n */\nActivator.prototype.destroy = function () {\n this.deactivate();\n\n // remove dom\n this.dom.overlay.parentNode.removeChild(this.dom.overlay);\n\n // remove global event listener\n if (this.onClick) {\n document.body.removeEventListener('click', this.onClick);\n }\n // remove keycharm\n if (this.keycharm !== undefined) {\n this.keycharm.destroy();\n }\n this.keycharm = null;\n // cleanup hammer instances\n this.hammer.destroy();\n this.hammer = null;\n // FIXME: cleaning up hammer instances doesn't work (Timeline not removed from memory)\n};\n\n/**\n * Activate the element\n * Overlay is hidden, element is decorated with a blue shadow border\n */\nActivator.prototype.activate = function () {\n // we allow only one active activator at a time\n if (Activator.current) {\n Activator.current.deactivate();\n }\n Activator.current = this;\n\n this.active = true;\n this.dom.overlay.style.display = 'none';\n util.addClassName(this.dom.container, 'vis-active');\n\n this.emit('change');\n this.emit('activate');\n\n // ugly hack: bind ESC after emitting the events, as the Network rebinds all\n // keyboard events on a 'change' event\n this.keycharm.bind('esc', this.escListener);\n};\n\n/**\n * Deactivate the element\n * Overlay is displayed on top of the element\n */\nActivator.prototype.deactivate = function () {\n this.active = false;\n this.dom.overlay.style.display = '';\n util.removeClassName(this.dom.container, 'vis-active');\n this.keycharm.unbind('esc', this.escListener);\n\n this.emit('change');\n this.emit('deactivate');\n};\n\n/**\n * Handle a tap event: activate the container\n * @param {Event} event The event\n * @private\n */\nActivator.prototype._onTapOverlay = function (event) {\n // activate the container\n this.activate();\n event.stopPropagation();\n};\n\n/**\n * Test whether the element has the requested parent element somewhere in\n * its chain of parent nodes.\n * @param {HTMLElement} element\n * @param {HTMLElement} parent\n * @returns {boolean} Returns true when the parent is found somewhere in the\n * chain of parent nodes.\n * @private\n */\nfunction _hasParent(element, parent) {\n while (element) {\n if (element === parent) {\n return true\n }\n element = element.parentNode;\n }\n return false;\n}\n\nmodule.exports = Activator;\n","// English\nexports['en'] = {\n edit: 'Edit',\n del: 'Delete selected',\n back: 'Back',\n addNode: 'Add Node',\n addEdge: 'Add Edge',\n editNode: 'Edit Node',\n editEdge: 'Edit Edge',\n addDescription: 'Click in an empty space to place a new node.',\n edgeDescription: 'Click on a node and drag the edge to another node to connect them.',\n editEdgeDescription: 'Click on the control points and drag them to a node to connect to it.',\n createEdgeError: 'Cannot link edges to a cluster.',\n deleteClusterError: 'Clusters cannot be deleted.',\n editClusterError: 'Clusters cannot be edited.'\n};\nexports['en_EN'] = exports['en'];\nexports['en_US'] = exports['en'];\n\n// German\nexports['de'] = {\n edit: 'Editieren',\n del: 'L\\u00f6sche Auswahl',\n back: 'Zur\\u00fcck',\n addNode: 'Knoten hinzuf\\u00fcgen',\n addEdge: 'Kante hinzuf\\u00fcgen',\n editNode: 'Knoten editieren',\n editEdge: 'Kante editieren',\n addDescription: 'Klicke auf eine freie Stelle, um einen neuen Knoten zu plazieren.',\n edgeDescription: 'Klicke auf einen Knoten und ziehe die Kante zu einem anderen Knoten, um diese zu verbinden.',\n editEdgeDescription: 'Klicke auf die Verbindungspunkte und ziehe diese auf einen Knoten, um sie zu verbinden.',\n createEdgeError: 'Es ist nicht m\\u00f6glich, Kanten mit Clustern zu verbinden.',\n deleteClusterError: 'Cluster k\\u00f6nnen nicht gel\\u00f6scht werden.',\n editClusterError: 'Cluster k\\u00f6nnen nicht editiert werden.'\n};\nexports['de_DE'] = exports['de'];\n\n// Spanish\nexports['es'] = {\n edit: 'Editar',\n del: 'Eliminar selecci\\u00f3n',\n back: 'Atr\\u00e1s',\n addNode: 'A\\u00f1adir nodo',\n addEdge: 'A\\u00f1adir arista',\n editNode: 'Editar nodo',\n editEdge: 'Editar arista',\n addDescription: 'Haga clic en un lugar vac\\u00edo para colocar un nuevo nodo.',\n edgeDescription: 'Haga clic en un nodo y arrastre la arista hacia otro nodo para conectarlos.',\n editEdgeDescription: 'Haga clic en un punto de control y arrastrelo a un nodo para conectarlo.',\n createEdgeError: 'No se puede conectar una arista a un grupo.',\n deleteClusterError: 'No es posible eliminar grupos.',\n editClusterError: 'No es posible editar grupos.'\n};\nexports['es_ES'] = exports['es'];\n\n//Italiano\nexports['it'] = {\n edit: 'Modifica',\n del: 'Cancella la selezione',\n back: 'Indietro',\n addNode: 'Aggiungi un nodo',\n addEdge: 'Aggiungi un vertice',\n editNode: 'Modifica il nodo',\n editEdge: 'Modifica il vertice',\n addDescription: 'Clicca per aggiungere un nuovo nodo',\n edgeDescription: 'Clicca su un nodo e trascinalo ad un altro nodo per connetterli.',\n editEdgeDescription: 'Clicca sui Punti di controllo e trascinali ad un nodo per connetterli.',\n createEdgeError: 'Non si possono collegare vertici ad un cluster',\n deleteClusterError: 'I cluster non possono essere cancellati',\n editClusterError: 'I clusters non possono essere modificati.'\n};\nexports['it_IT'] = exports['it'];\n\n// Dutch\nexports['nl'] = {\n edit: 'Wijzigen',\n del: 'Selectie verwijderen',\n back: 'Terug',\n addNode: 'Node toevoegen',\n addEdge: 'Link toevoegen',\n editNode: 'Node wijzigen',\n editEdge: 'Link wijzigen',\n addDescription: 'Klik op een leeg gebied om een nieuwe node te maken.',\n edgeDescription: 'Klik op een node en sleep de link naar een andere node om ze te verbinden.',\n editEdgeDescription: 'Klik op de verbindingspunten en sleep ze naar een node om daarmee te verbinden.',\n createEdgeError: 'Kan geen link maken naar een cluster.',\n deleteClusterError: 'Clusters kunnen niet worden verwijderd.',\n editClusterError: 'Clusters kunnen niet worden aangepast.'\n};\nexports['nl_NL'] = exports['nl'];\nexports['nl_BE'] = exports['nl'];\n\n// Portuguese Brazil\nexports['pt-br'] = {\n edit: 'Editar',\n del: 'Remover selecionado',\n back: 'Voltar',\n addNode: 'Adicionar nó',\n addEdge: 'Adicionar aresta',\n editNode: 'Editar nó',\n editEdge: 'Editar aresta',\n addDescription: 'Clique em um espaço em branco para adicionar um novo nó',\n edgeDescription: 'Clique em um nó e arraste a aresta até outro nó para conectá-los',\n editEdgeDescription: 'Clique nos pontos de controle e os arraste para um nó para conectá-los',\n createEdgeError: 'Não foi possível linkar arestas a um cluster.',\n deleteClusterError: 'Clusters não puderam ser removidos.',\n editClusterError: 'Clusters não puderam ser editados.'\n};\nexports['pt-BR'] = exports['pt-br'];\nexports['pt_BR'] = exports['pt-br'];\nexports['pt_br'] = exports['pt-br'];\n\n// Russian\nexports['ru'] = {\n edit: 'Редактировать',\n del: 'Удалить выбранное',\n back: 'Назад',\n addNode: 'Добавить узел',\n addEdge: 'Добавить ребро',\n editNode: 'Редактировать узел',\n editEdge: 'Редактировать ребро',\n addDescription: 'Кликните в свободное место, чтобы добавить новый узел.',\n edgeDescription: 'Кликните на узел и протяните ребро к другому узлу, чтобы соединить их.',\n editEdgeDescription: 'Кликните на контрольные точки и перетащите их в узел, чтобы подключиться к нему.',\n createEdgeError: 'Невозможно соединить ребра в кластер.',\n deleteClusterError: 'Кластеры не могут быть удалены',\n editClusterError: 'Кластеры недоступны для редактирования.'\n};\nexports['ru_RU'] = exports['ru'];\n\n// Chinese\nexports['cn'] = {\n edit: '编辑',\n del: '删除选定',\n back: '返回',\n addNode: '添加节点',\n addEdge: '添加连接线',\n editNode: '编辑节点',\n editEdge: '编辑连接线',\n addDescription: '单击空白处放置新节点。',\n edgeDescription: '单击某个节点并将该连接线拖动到另一个节点以连接它们。',\n editEdgeDescription: '单击控制节点并将它们拖到节点上连接。',\n createEdgeError: '无法将连接线连接到群集。',\n deleteClusterError: '无法删除群集。',\n editClusterError: '无法编辑群集。'\n};\nexports['zh_CN'] = exports['cn'];\n\n// Ukrainian\nexports['uk'] = {\n edit: 'Редагувати',\n del: 'Видалити обране',\n back: 'Назад',\n addNode: 'Додати вузол',\n addEdge: 'Додати край',\n editNode: 'Редагувати вузол',\n editEdge: 'Редагувати край',\n addDescription: 'Kлікніть на вільне місце, щоб додати новий вузол.',\n edgeDescription: 'Клікніть на вузол і перетягніть край до іншого вузла, щоб їх з\\'єднати.',\n editEdgeDescription: 'Клікніть на контрольні точки і перетягніть їх у вузол, щоб підключитися до нього.',\n createEdgeError: 'Не можливо об\\'єднати краї в групу.',\n deleteClusterError: 'Групи не можуть бути видалені.',\n editClusterError: 'Групи недоступні для редагування.'\n};\nexports['uk_UA'] = exports['uk'];\n\n// French\nexports['fr'] = {\n edit: 'Editer',\n del: 'Effacer la selection',\n back: 'Retour',\n addNode: 'Ajouter un noeud',\n addEdge: 'Ajouter un lien',\n editNode: 'Editer le noeud',\n editEdge: 'Editer le lien',\n addDescription: 'Cliquez dans un endroit vide pour placer un noeud.',\n edgeDescription: 'Cliquez sur un noeud et glissez le lien vers un autre noeud pour les connecter.',\n editEdgeDescription: 'Cliquez sur les points de contrôle et glissez-les pour connecter un noeud.',\n createEdgeError: 'Impossible de créer un lien vers un cluster.',\n deleteClusterError: 'Les clusters ne peuvent pas être éffacés.',\n editClusterError: 'Les clusters ne peuvent pas être édites.'\n};\nexports['fr_FR'] = exports['fr'];\n\n// Czech\nexports['cs'] = {\n edit: 'Upravit',\n del: 'Smazat výběr',\n back: 'Zpět',\n addNode: 'Přidat vrchol',\n addEdge: 'Přidat hranu',\n editNode: 'Upravit vrchol',\n editEdge: 'Upravit hranu',\n addDescription: 'Kluknutím do prázdného prostoru můžete přidat nový vrchol.',\n edgeDescription: 'Přetažením z jednoho vrcholu do druhého můžete spojit tyto vrcholy novou hranou.',\n editEdgeDescription: 'Přetažením kontrolního vrcholu hrany ji můžete připojit k jinému vrcholu.',\n createEdgeError: 'Nelze připojit hranu ke shluku.',\n deleteClusterError: 'Nelze mazat shluky.',\n editClusterError: 'Nelze upravovat shluky.'\n};\nexports['cs_CZ'] = exports['cs'];\n","function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nmodule.exports = _classCallCheck;","function _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nmodule.exports = _createClass;","\n/**\n * Associates a canvas to a given image, containing a number of renderings\n * of the image at various sizes.\n *\n * This technique is known as 'mipmapping'.\n *\n * NOTE: Images can also be of type 'data:svg+xml`. This code also works\n * for svg, but the mipmapping may not be necessary.\n *\n * @param {Image} image\n */\nclass CachedImage {\n /**\n * @ignore\n */ \n constructor() { // eslint-disable-line no-unused-vars\n this.NUM_ITERATIONS = 4; // Number of items in the coordinates array\n\n this.image = new Image();\n this.canvas = document.createElement('canvas');\n }\n\n\n /**\n * Called when the image has been successfully loaded.\n */\n init() {\n if (this.initialized()) return;\n\n this.src = this.image.src; // For same interface with Image\n var w = this.image.width;\n var h = this.image.height;\n\n // Ease external access\n this.width = w;\n this.height = h;\n\n var h2 = Math.floor(h/2);\n var h4 = Math.floor(h/4);\n var h8 = Math.floor(h/8);\n var h16 = Math.floor(h/16);\n\n var w2 = Math.floor(w/2);\n var w4 = Math.floor(w/4);\n var w8 = Math.floor(w/8);\n var w16 = Math.floor(w/16);\n\n // Make canvas as small as possible\n this.canvas.width = 3*w4;\n this.canvas.height = h2;\n\n // Coordinates and sizes of images contained in the canvas\n // Values per row: [top x, left y, width, height]\n\n this.coordinates = [\n [ 0 , 0 , w2 , h2],\n [ w2 , 0 , w4 , h4],\n [ w2 , h4, w8 , h8],\n [ 5*w8, h4, w16, h16]\n ];\n\n this._fillMipMap();\n }\n\n\n /**\n * @return {Boolean} true if init() has been called, false otherwise.\n */\n initialized() {\n return (this.coordinates !== undefined);\n }\n\n\n /**\n * Redraw main image in various sizes to the context.\n *\n * The rationale behind this is to reduce artefacts due to interpolation\n * at differing zoom levels.\n *\n * Source: http://stackoverflow.com/q/18761404/1223531\n *\n * This methods takes the resizing out of the drawing loop, in order to\n * reduce performance overhead.\n *\n * TODO: The code assumes that a 2D context can always be gotten. This is\n * not necessarily true! OTOH, if not true then usage of this class\n * is senseless.\n *\n * @private\n */\n _fillMipMap() {\n var ctx = this.canvas.getContext('2d');\n\n // First zoom-level comes from the image\n var to = this.coordinates[0];\n ctx.drawImage(this.image, to[0], to[1], to[2], to[3]);\n\n // The rest are copy actions internal to the canvas/context\n for (let iterations = 1; iterations < this.NUM_ITERATIONS; iterations++) {\n let from = this.coordinates[iterations - 1];\n let to = this.coordinates[iterations];\n\n ctx.drawImage(this.canvas,\n from[0], from[1], from[2], from[3],\n to[0], to[1], to[2], to[3]\n );\n }\n }\n\n\n /**\n * Draw the image, using the mipmap if necessary.\n *\n * MipMap is only used if param factor > 2; otherwise, original bitmap\n * is resized. This is also used to skip mipmap usage, e.g. by setting factor = 1\n *\n * Credits to 'Alex de Mulder' for original implementation.\n *\n * @param {CanvasRenderingContext2D} ctx context on which to draw zoomed image\n * @param {Float} factor scale factor at which to draw\n * @param {number} left\n * @param {number} top\n * @param {number} width\n * @param {number} height\n */\n drawImageAtPosition(ctx, factor, left, top, width, height) {\n\n if(!this.initialized())\n return; //can't draw image yet not intialized\n\n if (factor > 2) {\n // Determine which zoomed image to use\n factor *= 0.5;\n let iterations = 0;\n while (factor > 2 && iterations < this.NUM_ITERATIONS) {\n factor *= 0.5;\n iterations += 1;\n }\n\n if (iterations >= this.NUM_ITERATIONS) {\n iterations = this.NUM_ITERATIONS - 1;\n }\n //console.log(\"iterations: \" + iterations);\n\n let from = this.coordinates[iterations];\n ctx.drawImage(this.canvas,\n from[0], from[1], from[2], from[3],\n left, top, width, height\n );\n } else {\n // Draw image directly\n ctx.drawImage(this.image, left, top, width, height);\n }\n }\n\n}\n\n\nexport default CachedImage;\n","import CachedImage from './CachedImage';\n\n/**\n * This callback is a callback that accepts an Image.\n * @callback ImageCallback\n * @param {Image} image\n */\n\n/**\n * This class loads images and keeps them stored.\n *\n * @param {ImageCallback} callback\n */\nclass Images {\n /**\n * @param {ImageCallback} callback\n */\n constructor(callback){\n this.images = {};\n this.imageBroken = {};\n this.callback = callback;\n }\n \n /**\n * @param {string} url The original Url that failed to load, if the broken image is successfully loaded it will be added to the cache using this Url as the key so that subsequent requests for this Url will return the broken image\n * @param {string} brokenUrl Url the broken image to try and load\n * @param {Image} imageToLoadBrokenUrlOn The image object\n */ \n _tryloadBrokenUrl (url, brokenUrl, imageToLoadBrokenUrlOn) {\n //If these parameters aren't specified then exit the function because nothing constructive can be done\n if (url === undefined || imageToLoadBrokenUrlOn === undefined) return;\n if (brokenUrl === undefined) {\n console.warn(\"No broken url image defined\");\n return;\n }\n \n //Clear the old subscription to the error event and put a new in place that only handle errors in loading the brokenImageUrl\n imageToLoadBrokenUrlOn.image.onerror = () => {\n console.error(\"Could not load brokenImage:\", brokenUrl);\n // cache item will contain empty image, this should be OK for default\n };\n \n //Set the source of the image to the brokenUrl, this is actually what kicks off the loading of the broken image\n imageToLoadBrokenUrlOn.image.src = brokenUrl;\n }\n \n /**\n *\n * @param {vis.Image} imageToRedrawWith\n * @private\n */\n _redrawWithImage (imageToRedrawWith) {\n if (this.callback) {\n this.callback(imageToRedrawWith);\n }\n }\n \n /**\n * @param {string} url Url of the image\n * @param {string} brokenUrl Url of an image to use if the url image is not found\n * @return {Image} img The image object\n */ \n load (url, brokenUrl) {\n //Try and get the image from the cache, if successful then return the cached image \n var cachedImage = this.images[url]; \n if (cachedImage) return cachedImage;\n \n //Create a new image\n var img = new CachedImage();\n\n // Need to add to cache here, otherwise final return will spawn different copies of the same image,\n // Also, there will be multiple loads of the same image.\n this.images[url] = img; \n \n //Subscribe to the event that is raised if the image loads successfully \n img.image.onload = () => {\n // Properly init the cached item and then request a redraw\n this._fixImageCoordinates(img.image);\n img.init();\n this._redrawWithImage(img);\n };\n \n //Subscribe to the event that is raised if the image fails to load\n img.image.onerror = () => {\n console.error(\"Could not load image:\", url);\n //Try and load the image specified by the brokenUrl using\n this._tryloadBrokenUrl(url, brokenUrl, img);\n };\n \n //Set the source of the image to the url, this is what actually kicks off the loading of the image\n img.image.src = url;\n \n //Return the new image\n return img;\n }\n\n\n /**\n * IE11 fix -- thanks dponch!\n *\n * Local helper function\n * @param {vis.Image} imageToCache\n * @private\n */\n _fixImageCoordinates(imageToCache) {\n if (imageToCache.width === 0) {\n document.body.appendChild(imageToCache);\n imageToCache.width = imageToCache.offsetWidth;\n imageToCache.height = imageToCache.offsetHeight;\n document.body.removeChild(imageToCache);\n }\n }\n}\n\nexport default Images;\n","import util from 'vis-util';\n\n/**\n * This class can store groups and options specific for groups.\n */\nclass Groups {\n /**\n * @ignore\n */\n constructor() {\n this.clear();\n this.defaultIndex = 0;\n this.groupsArray = [];\n this.groupIndex = 0;\n\n this.defaultGroups = [\n {border: \"#2B7CE9\", background: \"#97C2FC\", highlight: {border: \"#2B7CE9\", background: \"#D2E5FF\"}, hover: {border: \"#2B7CE9\", background: \"#D2E5FF\"}}, // 0: blue\n {border: \"#FFA500\", background: \"#FFFF00\", highlight: {border: \"#FFA500\", background: \"#FFFFA3\"}, hover: {border: \"#FFA500\", background: \"#FFFFA3\"}}, // 1: yellow\n {border: \"#FA0A10\", background: \"#FB7E81\", highlight: {border: \"#FA0A10\", background: \"#FFAFB1\"}, hover: {border: \"#FA0A10\", background: \"#FFAFB1\"}}, // 2: red\n {border: \"#41A906\", background: \"#7BE141\", highlight: {border: \"#41A906\", background: \"#A1EC76\"}, hover: {border: \"#41A906\", background: \"#A1EC76\"}}, // 3: green\n {border: \"#E129F0\", background: \"#EB7DF4\", highlight: {border: \"#E129F0\", background: \"#F0B3F5\"}, hover: {border: \"#E129F0\", background: \"#F0B3F5\"}}, // 4: magenta\n {border: \"#7C29F0\", background: \"#AD85E4\", highlight: {border: \"#7C29F0\", background: \"#D3BDF0\"}, hover: {border: \"#7C29F0\", background: \"#D3BDF0\"}}, // 5: purple\n {border: \"#C37F00\", background: \"#FFA807\", highlight: {border: \"#C37F00\", background: \"#FFCA66\"}, hover: {border: \"#C37F00\", background: \"#FFCA66\"}}, // 6: orange\n {border: \"#4220FB\", background: \"#6E6EFD\", highlight: {border: \"#4220FB\", background: \"#9B9BFD\"}, hover: {border: \"#4220FB\", background: \"#9B9BFD\"}}, // 7: darkblue\n {border: \"#FD5A77\", background: \"#FFC0CB\", highlight: {border: \"#FD5A77\", background: \"#FFD1D9\"}, hover: {border: \"#FD5A77\", background: \"#FFD1D9\"}}, // 8: pink\n {border: \"#4AD63A\", background: \"#C2FABC\", highlight: {border: \"#4AD63A\", background: \"#E6FFE3\"}, hover: {border: \"#4AD63A\", background: \"#E6FFE3\"}}, // 9: mint\n\n {border: \"#990000\", background: \"#EE0000\", highlight: {border: \"#BB0000\", background: \"#FF3333\"}, hover: {border: \"#BB0000\", background: \"#FF3333\"}}, // 10:bright red\n\n {border: \"#FF6000\", background: \"#FF6000\", highlight: {border: \"#FF6000\", background: \"#FF6000\"}, hover: {border: \"#FF6000\", background: \"#FF6000\"}}, // 12: real orange\n {border: \"#97C2FC\", background: \"#2B7CE9\", highlight: {border: \"#D2E5FF\", background: \"#2B7CE9\"}, hover: {border: \"#D2E5FF\", background: \"#2B7CE9\"}}, // 13: blue\n {border: \"#399605\", background: \"#255C03\", highlight: {border: \"#399605\", background: \"#255C03\"}, hover: {border: \"#399605\", background: \"#255C03\"}}, // 14: green\n {border: \"#B70054\", background: \"#FF007E\", highlight: {border: \"#B70054\", background: \"#FF007E\"}, hover: {border: \"#B70054\", background: \"#FF007E\"}}, // 15: magenta\n {border: \"#AD85E4\", background: \"#7C29F0\", highlight: {border: \"#D3BDF0\", background: \"#7C29F0\"}, hover: {border: \"#D3BDF0\", background: \"#7C29F0\"}}, // 16: purple\n {border: \"#4557FA\", background: \"#000EA1\", highlight: {border: \"#6E6EFD\", background: \"#000EA1\"}, hover: {border: \"#6E6EFD\", background: \"#000EA1\"}}, // 17: darkblue\n {border: \"#FFC0CB\", background: \"#FD5A77\", highlight: {border: \"#FFD1D9\", background: \"#FD5A77\"}, hover: {border: \"#FFD1D9\", background: \"#FD5A77\"}}, // 18: pink\n {border: \"#C2FABC\", background: \"#74D66A\", highlight: {border: \"#E6FFE3\", background: \"#74D66A\"}, hover: {border: \"#E6FFE3\", background: \"#74D66A\"}}, // 19: mint\n\n {border: \"#EE0000\", background: \"#990000\", highlight: {border: \"#FF3333\", background: \"#BB0000\"}, hover: {border: \"#FF3333\", background: \"#BB0000\"}} // 20:bright red\n ];\n\n this.options = {};\n this.defaultOptions = {\n useDefaultGroups: true\n };\n util.extend(this.options, this.defaultOptions);\n }\n\n /**\n *\n * @param {Object} options\n */\n setOptions(options) {\n let optionFields = ['useDefaultGroups'];\n\n if (options !== undefined) {\n for (let groupName in options) {\n if (options.hasOwnProperty(groupName)) {\n if (optionFields.indexOf(groupName) === -1) {\n let group = options[groupName];\n this.add(groupName, group);\n }\n }\n }\n }\n }\n\n \n /**\n * Clear all groups\n */\n clear() {\n this.groups = {};\n this.groupsArray = [];\n }\n \n /**\n * Get group options of a groupname.\n * If groupname is not found, a new group may be created.\n *\n * @param {*} groupname Can be a number, string, Date, etc.\n * @param {boolean} [shouldCreate=true] If true, create a new group\n * @return {Object} The found or created group\n */\n get(groupname, shouldCreate = true) {\n let group = this.groups[groupname];\n\n if (group === undefined && shouldCreate) {\n if (this.options.useDefaultGroups === false && this.groupsArray.length > 0) {\n // create new group\n let index = this.groupIndex % this.groupsArray.length;\n this.groupIndex++;\n group = {};\n group.color = this.groups[this.groupsArray[index]];\n this.groups[groupname] = group;\n }\n else {\n // create new group\n let index = this.defaultIndex % this.defaultGroups.length;\n this.defaultIndex++;\n group = {};\n group.color = this.defaultGroups[index];\n this.groups[groupname] = group;\n }\n }\n \n return group;\n }\n \n /**\n * Add a custom group style\n * @param {string} groupName\n * @param {Object} style An object containing borderColor,\n * backgroundColor, etc.\n * @return {Object} group The created group object\n */\n add(groupName, style) {\n this.groups[groupName] = style;\n this.groupsArray.push(groupName);\n return style;\n }\n}\n\nexport default Groups;\n","function _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n\nmodule.exports = _arrayWithHoles;","function _iterableToArrayLimit(arr, i) {\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}\n\nmodule.exports = _iterableToArrayLimit;","function _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance\");\n}\n\nmodule.exports = _nonIterableRest;","var arrayWithHoles = require(\"./arrayWithHoles\");\n\nvar iterableToArrayLimit = require(\"./iterableToArrayLimit\");\n\nvar nonIterableRest = require(\"./nonIterableRest\");\n\nfunction _slicedToArray(arr, i) {\n return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || nonIterableRest();\n}\n\nmodule.exports = _slicedToArray;","function _typeof2(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof2 = function _typeof2(obj) { return typeof obj; }; } else { _typeof2 = function _typeof2(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof2(obj); }\n\nfunction _typeof(obj) {\n if (typeof Symbol === \"function\" && _typeof2(Symbol.iterator) === \"symbol\") {\n module.exports = _typeof = function _typeof(obj) {\n return _typeof2(obj);\n };\n } else {\n module.exports = _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : _typeof2(obj);\n };\n }\n\n return _typeof(obj);\n}\n\nmodule.exports = _typeof;","import util from 'vis-util';\n\n/**\n * Helper functions for components\n * @class\n */\nclass ComponentUtil {\n /**\n * Determine values to use for (sub)options of 'chosen'.\n *\n * This option is either a boolean or an object whose values should be examined further.\n * The relevant structures are:\n *\n * - chosen: \n * - chosen: { subOption: }\n *\n * Where subOption is 'node', 'edge' or 'label'.\n *\n * The intention of this method appears to be to set a specific priority to the options;\n * Since most properties are either bridged or merged into the local options objects, there\n * is not much point in handling them separately.\n * TODO: examine if 'most' in previous sentence can be replaced with 'all'. In that case, we\n * should be able to get rid of this method.\n *\n * @param {string} subOption option within object 'chosen' to consider; either 'node', 'edge' or 'label'\n * @param {Object} pile array of options objects to consider\n * \n * @return {boolean|function} value for passed subOption of 'chosen' to use\n */\n static choosify(subOption, pile) {\n // allowed values for subOption\n let allowed = [ 'node', 'edge', 'label'];\n let value = true;\n\n let chosen = util.topMost(pile, 'chosen');\n if (typeof chosen === 'boolean') {\n value = chosen;\n } else if (typeof chosen === 'object') {\n if (allowed.indexOf(subOption) === -1 ) {\n throw new Error('choosify: subOption \\'' + subOption + '\\' should be one of '\n + \"'\" + allowed.join(\"', '\") + \"'\");\n }\n\n let chosenEdge = util.topMost(pile, ['chosen', subOption]);\n if ((typeof chosenEdge === 'boolean') || (typeof chosenEdge === 'function')) {\n value = chosenEdge;\n }\n }\n\n return value;\n }\n\n\n /**\n * Check if the point falls within the given rectangle.\n *\n * @param {rect} rect\n * @param {point} point\n * @param {rotationPoint} [rotationPoint] if specified, the rotation that applies to the rectangle.\n * @returns {boolean} true if point within rectangle, false otherwise\n * @static\n */\n static pointInRect(rect, point, rotationPoint) {\n if (rect.width <= 0 || rect.height <= 0) {\n return false; // early out\n }\n\n if (rotationPoint !== undefined) {\n // Rotate the point the same amount as the rectangle\n var tmp = {\n x: point.x - rotationPoint.x,\n y: point.y - rotationPoint.y\n };\n\n if (rotationPoint.angle !== 0) {\n // In order to get the coordinates the same, you need to \n // rotate in the reverse direction\n var angle = -rotationPoint.angle;\n\n var tmp2 = {\n x: Math.cos(angle)*tmp.x - Math.sin(angle)*tmp.y,\n y: Math.sin(angle)*tmp.x + Math.cos(angle)*tmp.y\n };\n point = tmp2;\n } else {\n point = tmp;\n }\n\n // Note that if a rotation is specified, the rectangle coordinates\n // are **not* the full canvas coordinates. They are relative to the\n // rotationPoint. Hence, the point coordinates need not be translated\n // back in this case.\n }\n\n var right = rect.x + rect.width;\n var bottom = rect.y + rect.width;\n\n return (\n rect.left < point.x &&\n right > point.x &&\n rect.top < point.y &&\n bottom > point.y\n );\n }\n\n\n /**\n * Check if given value is acceptable as a label text.\n *\n * @param {*} text value to check; can be anything at this point\n * @returns {boolean} true if valid label value, false otherwise\n */\n static isValidLabel(text) {\n // Note that this is quite strict: types that *might* be converted to string are disallowed\n return (typeof text === 'string' && text !== '');\n }\n}\n\nexport default ComponentUtil;\n","/**\n * Callback to determine text dimensions, using the parent label settings.\n * @callback MeasureText\n * @param {text} text\n * @param {text} mod\n * @return {Object} { width, values} width in pixels and font attributes\n */\n\n\n/**\n * Helper class for Label which collects results of splitting labels into lines and blocks.\n *\n * @private\n */\nclass LabelAccumulator {\n\n /**\n * @param {MeasureText} measureText\n */\n constructor(measureText) {\n this.measureText = measureText;\n this.current = 0;\n this.width = 0;\n this.height = 0;\n this.lines = [];\n }\n\n\n /**\n * Append given text to the given line.\n *\n * @param {number} l index of line to add to\n * @param {string} text string to append to line\n * @param {'bold'|'ital'|'boldital'|'mono'|'normal'} [mod='normal']\n * @private\n */\n _add(l, text, mod = 'normal') { \n\n if (this.lines[l] === undefined) {\n this.lines[l] = {\n width : 0,\n height: 0,\n blocks: []\n };\n }\n\n // We still need to set a block for undefined and empty texts, hence return at this point\n // This is necessary because we don't know at this point if we're at the\n // start of an empty line or not.\n // To compensate, empty blocks are removed in `finalize()`.\n //\n // Empty strings should still have a height\n let tmpText = text;\n if (text === undefined || text === \"\") tmpText = \" \";\n\n // Determine width and get the font properties\n let result = this.measureText(tmpText, mod);\n let block = Object.assign({}, result.values);\n block.text = text;\n block.width = result.width;\n block.mod = mod;\n\n if (text === undefined || text === \"\") {\n block.width = 0;\n }\n\n this.lines[l].blocks.push(block);\n\n // Update the line width. We need this for determining if a string goes over max width\n this.lines[l].width += block.width;\n }\n\n\n /**\n * Returns the width in pixels of the current line.\n *\n * @returns {number}\n */\n curWidth() {\n let line = this.lines[this.current];\n if (line === undefined) return 0;\n\n return line.width;\n }\n\n\n /**\n * Add text in block to current line\n *\n * @param {string} text\n * @param {'bold'|'ital'|'boldital'|'mono'|'normal'} [mod='normal']\n */\n append(text, mod = 'normal') { \n this._add(this.current, text, mod);\n }\n\n\n /**\n * Add text in block to current line and start a new line\n *\n * @param {string} text\n * @param {'bold'|'ital'|'boldital'|'mono'|'normal'} [mod='normal']\n */\n newLine(text, mod = 'normal') {\n this._add(this.current, text, mod);\n this.current++;\n }\n\n\n /**\n * Determine and set the heights of all the lines currently contained in this instance\n *\n * Note that width has already been set.\n * \n * @private\n */\n determineLineHeights() {\n for (let k = 0; k < this.lines.length; k++) {\n let line = this.lines[k];\n\n // Looking for max height of blocks in line\n let height = 0;\n\n if (line.blocks !== undefined) { // Can happen if text contains e.g. '\\n '\n for (let l = 0; l < line.blocks.length; l++) {\n let block = line.blocks[l];\n\n if (height < block.height) {\n height = block.height;\n }\n }\n }\n \n line.height = height;\n }\n }\n\n\n /**\n * Determine the full size of the label text, as determined by current lines and blocks\n * \n * @private\n */\n determineLabelSize() {\n let width = 0;\n let height = 0;\n for (let k = 0; k < this.lines.length; k++) {\n let line = this.lines[k];\n\n if (line.width > width) {\n width = line.width;\n }\n height += line.height;\n }\n\n this.width = width;\n this.height = height;\n }\n\n\n /**\n * Remove all empty blocks and empty lines we don't need\n * \n * This must be done after the width/height determination,\n * so that these are set properly for processing here.\n *\n * @returns {Array} Lines with empty blocks (and some empty lines) removed\n * @private\n */\n removeEmptyBlocks() {\n let tmpLines = [];\n for (let k = 0; k < this.lines.length; k++) {\n let line = this.lines[k];\n\n // Note: an empty line in between text has width zero but is still relevant to layout.\n // So we can't use width for testing empty line here\n if (line.blocks.length === 0) continue;\n\n // Discard final empty line always\n if(k === this.lines.length - 1) {\n if (line.width === 0) continue;\n }\n\n let tmpLine = {};\n Object.assign(tmpLine, line);\n tmpLine.blocks = [];\n\n let firstEmptyBlock;\n let tmpBlocks = []\n for (let l = 0; l < line.blocks.length; l++) {\n let block = line.blocks[l];\n if (block.width !== 0) {\n tmpBlocks.push(block);\n } else {\n if (firstEmptyBlock === undefined) {\n firstEmptyBlock = block;\n }\n }\n }\n\n // Ensure that there is *some* text present\n if (tmpBlocks.length === 0 && firstEmptyBlock !== undefined) {\n tmpBlocks.push(firstEmptyBlock);\n }\n\n tmpLine.blocks = tmpBlocks;\n\n tmpLines.push(tmpLine);\n }\n\n return tmpLines;\n }\n\n\n /**\n * Set the sizes for all lines and the whole thing.\n *\n * @returns {{width: (number|*), height: (number|*), lines: Array}}\n */\n finalize() {\n //console.log(JSON.stringify(this.lines, null, 2));\n\n this.determineLineHeights();\n this.determineLabelSize();\n let tmpLines = this.removeEmptyBlocks();\n\n\n // Return a simple hash object for further processing.\n return {\n width : this.width,\n height: this.height,\n lines : tmpLines\n }\n }\n} \n\n\nexport default LabelAccumulator;\n","import LabelAccumulator from './LabelAccumulator';\nimport ComponentUtil from './ComponentUtil';\n\n// Hash of prepared regexp's for tags\nvar tagPattern = {\n // HTML\n '': //,\n '': //,\n '': //,\n '': /<\\/b>/,\n '': /<\\/i>/,\n '': /<\\/code>/,\n // Markdown\n '*': /\\*/, // bold\n '_': /\\_/, // ital\n '`': /`/, // mono\n 'afterBold': /[^\\*]/,\n 'afterItal': /[^_]/,\n 'afterMono': /[^`]/,\n};\n\n\n/**\n * Internal helper class for parsing the markup tags for HTML and Markdown.\n *\n * NOTE: Sequences of tabs and spaces are reduced to single space.\n * Scan usage of `this.spacing` within method\n */\nclass MarkupAccumulator {\n\n /**\n * Create an instance\n *\n * @param {string} text text to parse for markup\n */\n constructor(text) {\n this.text = text;\n this.bold = false;\n this.ital = false;\n this.mono = false;\n this.spacing = false;\n this.position = 0;\n this.buffer = \"\";\n this.modStack = [];\n\n this.blocks = [];\n }\n\n\n /**\n * Return the mod label currently on the top of the stack\n *\n * @returns {string} label of topmost mod \n * @private\n */\n mod() {\n return (this.modStack.length === 0) ? 'normal' : this.modStack[0];\n }\n\n\n /**\n * Return the mod label currently active\n * \n * @returns {string} label of active mod \n * @private\n */\n modName() {\n if (this.modStack.length === 0)\n return 'normal';\n else if (this.modStack[0] === 'mono')\n return 'mono';\n else {\n if (this.bold && this.ital) {\n return 'boldital';\n } else if (this.bold) {\n return 'bold';\n } else if (this.ital) {\n return 'ital';\n }\n }\n }\n\n\n /**\n * @private\n */\n emitBlock() {\n if (this.spacing) {\n this.add(\" \");\n this.spacing = false;\n }\n if (this.buffer.length > 0) {\n this.blocks.push({ text: this.buffer, mod: this.modName() });\n this.buffer = \"\";\n }\n }\n\n\n /**\n * Output text to buffer\n *\n * @param {string} text text to add\n * @private\n */\n add(text) {\n if (text === \" \") {\n this.spacing = true;\n }\n if (this.spacing) {\n this.buffer += \" \";\n this.spacing = false;\n }\n if (text != \" \") {\n this.buffer += text;\n }\n }\n\n\n /**\n * Handle parsing of whitespace\n *\n * @param {string} ch the character to check\n * @returns {boolean} true if the character was processed as whitespace, false otherwise\n */\n parseWS(ch) {\n if (/[ \\t]/.test(ch)) {\n if (!this.mono) {\n this.spacing = true;\n } else {\n this.add(ch);\n }\n return true;\n }\n\n return false;\n }\n\n\n /**\n * @param {string} tagName label for block type to set\n * @private\n */\n setTag(tagName) {\n this.emitBlock();\n this[tagName] = true;\n this.modStack.unshift(tagName);\n }\n\n\n /**\n * @param {string} tagName label for block type to unset\n * @private\n */\n unsetTag(tagName) {\n this.emitBlock();\n this[tagName] = false;\n this.modStack.shift();\n }\n\n\n /**\n * @param {string} tagName label for block type we are currently processing\n * @param {string|RegExp} tag string to match in text\n * @returns {boolean} true if the tag was processed, false otherwise\n */\n parseStartTag(tagName, tag) {\n // Note: if 'mono' passed as tagName, there is a double check here. This is OK\n if (!this.mono && !this[tagName] && this.match(tag)) {\n this.setTag(tagName);\n return true;\n }\n\n return false;\n }\n\n\n /**\n * @param {string|RegExp} tag\n * @param {number} [advance=true] if set, advance current position in text\n * @returns {boolean} true if match at given position, false otherwise\n * @private\n */\n match(tag, advance = true) {\n let [regExp, length] = this.prepareRegExp(tag);\n let matched = regExp.test(this.text.substr(this.position, length));\n\n if (matched && advance) {\n this.position += length - 1;\n }\n\n return matched;\n }\n\n\n /**\n * @param {string} tagName label for block type we are currently processing\n * @param {string|RegExp} tag string to match in text\n * @param {RegExp} [nextTag] regular expression to match for characters *following* the current tag \n * @returns {boolean} true if the tag was processed, false otherwise\n */\n parseEndTag(tagName, tag, nextTag) {\n let checkTag = (this.mod() === tagName);\n if (tagName === 'mono') { // special handling for 'mono'\n checkTag = checkTag && this.mono;\n } else {\n checkTag = checkTag && !this.mono;\n }\n\n if (checkTag && this.match(tag)) {\n if (nextTag !== undefined) {\n // Purpose of the following match is to prevent a direct unset/set of a given tag\n // E.g. '*bold **still bold*' => '*bold still bold*'\n if ((this.position === this.text.length-1) || this.match(nextTag, false)) {\n this.unsetTag(tagName);\n }\n } else {\n this.unsetTag(tagName);\n }\n\n return true;\n }\n\n return false;\n }\n\n\n /**\n * @param {string|RegExp} tag string to match in text\n * @param {value} value string to replace tag with, if found at current position\n * @returns {boolean} true if the tag was processed, false otherwise\n */\n replace(tag, value) {\n if (this.match(tag)) {\n this.add(value);\n this.position += length - 1;\n return true;\n }\n\n return false;\n }\n\n\n /**\n * Create a regular expression for the tag if it isn't already one.\n *\n * The return value is an array `[RegExp, number]`, with exactly two value, where:\n * - RegExp is the regular expression to use\n * - number is the lenth of the input string to match\n *\n * @param {string|RegExp} tag string to match in text\n * @returns {Array} regular expression to use and length of input string to match\n * @private\n */\n prepareRegExp(tag) {\n let length;\n let regExp;\n if (tag instanceof RegExp) {\n regExp = tag;\n length = 1; // ASSUMPTION: regexp only tests one character\n } else {\n // use prepared regexp if present\n var prepared = tagPattern[tag];\n if (prepared !== undefined) {\n regExp = prepared;\n } else {\n regExp = new RegExp(tag);\n }\n\n length = tag.length;\n }\n\n return [regExp, length];\n }\n}\n\n\n/**\n * Helper class for Label which explodes the label text into lines and blocks within lines\n *\n * @private\n */\nclass LabelSplitter {\n\n /**\n * @param {CanvasRenderingContext2D} ctx Canvas rendering context\n * @param {Label} parent reference to the Label instance using current instance\n * @param {boolean} selected \n * @param {boolean} hover\n */\n constructor(ctx, parent, selected, hover) {\n this.ctx = ctx;\n this.parent = parent;\n this.selected = selected;\n this.hover = hover;\n\n /**\n * Callback to determine text width; passed to LabelAccumulator instance\n *\n * @param {String} text string to determine width of\n * @param {String} mod font type to use for this text\n * @return {Object} { width, values} width in pixels and font attributes\n */\n let textWidth = (text, mod) => {\n if (text === undefined) return 0;\n\n // TODO: This can be done more efficiently with caching\n // This will set the ctx.font correctly, depending on selected/hover and mod - so that ctx.measureText() will be accurate.\n let values = this.parent.getFormattingValues(ctx, selected, hover, mod);\n\n let width = 0;\n if (text !== '') {\n let measure = this.ctx.measureText(text);\n width = measure.width;\n }\n\n return {width, values: values};\n };\n\n\n this.lines = new LabelAccumulator(textWidth);\n }\n\n\n /**\n * Split passed text of a label into lines and blocks.\n *\n * # NOTE\n *\n * The handling of spacing is option dependent:\n *\n * - if `font.multi : false`, all spaces are retained\n * - if `font.multi : true`, every sequence of spaces is compressed to a single space\n *\n * This might not be the best way to do it, but this is as it has been working till now.\n * In order not to break existing functionality, for the time being this behaviour will\n * be retained in any code changes. \n *\n * @param {string} text text to split\n * @returns {Array}\n */\n process(text) {\n if (!ComponentUtil.isValidLabel(text)) {\n return this.lines.finalize();\n }\n\n var font = this.parent.fontOptions;\n\n // Normalize the end-of-line's to a single representation - order important\n text = text.replace(/\\r\\n/g, '\\n'); // Dos EOL's\n text = text.replace(/\\r/g, '\\n'); // Mac EOL's\n\n // Note that at this point, there can be no \\r's in the text.\n // This is used later on splitStringIntoLines() to split multifont texts.\n\n let nlLines = String(text).split('\\n');\n let lineCount = nlLines.length;\n\n if (font.multi) {\n // Multi-font case: styling tags active\n for (let i = 0; i < lineCount; i++) {\n let blocks = this.splitBlocks(nlLines[i], font.multi);\n // Post: Sequences of tabs and spaces are reduced to single space\n\n if (blocks === undefined) continue;\n\n if (blocks.length === 0) {\n this.lines.newLine(\"\");\n continue;\n }\n\n if (font.maxWdt > 0) {\n // widthConstraint.maximum defined\n //console.log('Running widthConstraint multi, max: ' + this.fontOptions.maxWdt);\n for (let j = 0; j < blocks.length; j++) {\n let mod = blocks[j].mod;\n let text = blocks[j].text;\n this.splitStringIntoLines(text, mod, true);\n }\n } else {\n // widthConstraint.maximum NOT defined\n for (let j = 0; j < blocks.length; j++) {\n let mod = blocks[j].mod;\n let text = blocks[j].text;\n this.lines.append(text, mod); \n }\n }\n\n this.lines.newLine();\n }\n } else {\n // Single-font case\n if (font.maxWdt > 0) {\n // widthConstraint.maximum defined\n // console.log('Running widthConstraint normal, max: ' + this.fontOptions.maxWdt);\n for (let i = 0; i < lineCount; i++) {\n this.splitStringIntoLines(nlLines[i]);\n }\n } else {\n // widthConstraint.maximum NOT defined\n for (let i = 0; i < lineCount; i++) {\n this.lines.newLine(nlLines[i]); \n }\n }\n }\n \n return this.lines.finalize();\n }\n\n\n /**\n * normalize the markup system\n *\n * @param {boolean|'md'|'markdown'|'html'} markupSystem\n * @returns {string}\n */\n decodeMarkupSystem(markupSystem) {\n let system = 'none';\n if (markupSystem === 'markdown' || markupSystem === 'md') {\n system = 'markdown';\n } else if (markupSystem === true || markupSystem === 'html') {\n system = 'html'\n }\n return system;\n }\n\n\n /**\n *\n * @param {string} text\n * @returns {Array}\n */\n splitHtmlBlocks(text) {\n let s = new MarkupAccumulator(text);\n\n let parseEntities = (ch) => {\n if (/&/.test(ch)) {\n let parsed = s.replace(s.text, '<', '<')\n || s.replace(s.text, '&', '&');\n\n if (!parsed) {\n s.add(\"&\");\n }\n\n return true;\n }\n\n return false;\n };\n\n while (s.position < s.text.length) {\n let ch = s.text.charAt(s.position);\n\n let parsed = s.parseWS(ch)\n || (/')\n || s.parseStartTag('ital', '')\n || s.parseStartTag('mono', '')\n || s.parseEndTag('bold', '')\n || s.parseEndTag('ital', '')\n || s.parseEndTag('mono', '')))\n || parseEntities(ch);\n\n if (!parsed) {\n s.add(ch);\n }\n s.position++\n }\n s.emitBlock();\n return s.blocks;\n }\n\n\n /**\n *\n * @param {string} text\n * @returns {Array}\n */\n splitMarkdownBlocks(text) {\n let s = new MarkupAccumulator(text); \n let beginable = true;\n\n let parseOverride = (ch) => {\n if (/\\\\/.test(ch)) {\n if (s.position < this.text.length + 1) {\n s.position++;\n ch = this.text.charAt(s.position);\n if (/ \\t/.test(ch)) {\n s.spacing = true;\n } else {\n s.add(ch);\n beginable = false;\n }\n }\n\n return true\n }\n\n return false;\n }\n\n while (s.position < s.text.length) {\n let ch = s.text.charAt(s.position);\n\n let parsed = s.parseWS(ch)\n || parseOverride(ch)\n || ((beginable || s.spacing) && (\n s.parseStartTag('bold', '*')\n || s.parseStartTag('ital', '_')\n || s.parseStartTag('mono', '`')))\n || s.parseEndTag('bold', '*', 'afterBold')\n || s.parseEndTag('ital', '_', 'afterItal')\n || s.parseEndTag('mono', '`', 'afterMono');\n\n if (!parsed) {\n s.add(ch);\n beginable = false;\n }\n s.position++\n }\n s.emitBlock();\n return s.blocks;\n }\n\n\n /**\n * Explodes a piece of text into single-font blocks using a given markup\n *\n * @param {string} text\n * @param {boolean|'md'|'markdown'|'html'} markupSystem\n * @returns {Array.<{text: string, mod: string}>}\n * @private\n */\n splitBlocks(text, markupSystem) {\n let system = this.decodeMarkupSystem(markupSystem);\n if (system === 'none') {\n return [{\n text: text,\n mod: 'normal'\n }]\n } else if (system === 'markdown') {\n return this.splitMarkdownBlocks(text);\n } else if (system === 'html') {\n return this.splitHtmlBlocks(text);\n }\n }\n\n\n /**\n * @param {string} text\n * @returns {boolean} true if text length over the current max with\n * @private\n */\n overMaxWidth(text) {\n let width = this.ctx.measureText(text).width;\n return (this.lines.curWidth() + width > this.parent.fontOptions.maxWdt);\n }\n\n\n /**\n * Determine the longest part of the sentence which still fits in the \n * current max width.\n * \n * @param {Array} words Array of strings signifying a text lines\n * @return {number} index of first item in string making string go over max\n * @private\n */\n getLongestFit(words) {\n let text = '';\n let w = 0;\n\n while (w < words.length) {\n let pre = (text === '') ? '' : ' ';\n let newText = text + pre + words[w];\n\n if (this.overMaxWidth(newText)) break;\n text = newText;\n w++;\n }\n\n return w;\n }\n\n\n /**\n * Determine the longest part of the string which still fits in the\n * current max width.\n * \n * @param {Array} words Array of strings signifying a text lines\n * @return {number} index of first item in string making string go over max\n */\n getLongestFitWord(words) {\n let w = 0;\n\n while (w < words.length) {\n if (this.overMaxWidth(words.slice(0,w))) break;\n w++;\n }\n\n return w;\n }\n\n\n /**\n * Split the passed text into lines, according to width constraint (if any).\n * \n * The method assumes that the input string is a single line, i.e. without lines break.\n *\n * This method retains spaces, if still present (case `font.multi: false`).\n * A space which falls on an internal line break, will be replaced by a newline.\n * There is no special handling of tabs; these go along with the flow.\n * \n * @param {string} str\n * @param {string} [mod='normal']\n * @param {boolean} [appendLast=false]\n * @private\n */\n splitStringIntoLines(str, mod = 'normal', appendLast = false) {\n // Set the canvas context font, based upon the current selected/hover state\n // and the provided mod, so the text measurement performed by getLongestFit\n // will be accurate - and not just use the font of whoever last used the canvas.\n this.parent.getFormattingValues(this.ctx, this.selected, this.hover, mod)\n\n // Still-present spaces are relevant, retain them\n str = str.replace(/^( +)/g, '$1\\r');\n str = str.replace(/([^\\r][^ ]*)( +)/g, '$1\\r$2\\r');\n let words = str.split('\\r');\n\n while (words.length > 0) {\n let w = this.getLongestFit(words);\n\n if (w === 0) {\n // Special case: the first word is already larger than the max width.\n let word = words[0];\n\n // Break the word to the largest part that fits the line\n let x = this.getLongestFitWord(word);\n this.lines.newLine(word.slice(0, x), mod);\n\n // Adjust the word, so that the rest will be done next iteration\n words[0] = word.slice(x);\n } else {\n // skip any space that is replaced by a newline\n let newW = w;\n if (words[w - 1] === ' ') {\n w--;\n } else if (words[newW] === ' ') {\n newW++;\n }\n\n let text = words.slice(0, w).join(\"\");\n\n if (w == words.length && appendLast) {\n this.lines.append(text, mod); \n } else {\n this.lines.newLine(text, mod); \n }\n\n // Adjust the word, so that the rest will be done next iteration\n words = words.slice(newW);\n }\n }\n }\n} \n\nexport default LabelSplitter;\n","import util from 'vis-util';\nimport ComponentUtil from './ComponentUtil';\nimport LabelSplitter from './LabelSplitter';\n\n\n/**\n * List of special styles for multi-fonts\n * @private\n */\nconst multiFontStyle = ['bold', 'ital', 'boldital', 'mono'];\n\n\n/**\n * A Label to be used for Nodes or Edges.\n */\nclass Label {\n\n /**\n * @param {Object} body\n * @param {Object} options\n * @param {boolean} [edgelabel=false]\n */\n constructor(body, options, edgelabel = false) {\n this.body = body;\n this.pointToSelf = false;\n this.baseSize = undefined;\n this.fontOptions = {}; // instance variable containing the *instance-local* font options\n this.setOptions(options);\n this.size = {top: 0, left: 0, width: 0, height: 0, yLine: 0};\n this.isEdgeLabel = edgelabel;\n }\n\n\n /**\n * @param {Object} options the options of the parent Node-instance\n */\n setOptions(options) {\n this.elementOptions = options; // Reference to the options of the parent Node-instance \n\n this.initFontOptions(options.font);\n\n if (ComponentUtil.isValidLabel(options.label)) {\n this.labelDirty = true;\n } else {\n // Bad label! Change the option value to prevent bad stuff happening\n options.label = undefined\n }\n\n if (options.font !== undefined && options.font !== null) { // font options can be deleted at various levels\n if (typeof options.font === 'string') {\n this.baseSize = this.fontOptions.size;\n }\n else if (typeof options.font === 'object') {\n let size = options.font.size;\n \n if (size !== undefined) {\n this.baseSize = size;\n }\n }\n }\n }\n\n\n /**\n * Init the font Options structure.\n *\n * Member fontOptions serves as an accumulator for the current font options.\n * As such, it needs to be completely separated from the node options.\n *\n * @param {Object} newFontOptions the new font options to process\n * @private\n */\n initFontOptions(newFontOptions) {\n // Prepare the multi-font option objects.\n // These will be filled in propagateFonts(), if required\n util.forEach(multiFontStyle, (style) => {\n this.fontOptions[style] = {};\n });\n\n // Handle shorthand option, if present\n if (Label.parseFontString(this.fontOptions, newFontOptions)) {\n this.fontOptions.vadjust = 0;\n return;\n }\n\n // Copy over the non-multifont options, if specified\n util.forEach(newFontOptions, (prop, n) => {\n if (prop !== undefined && prop !== null && typeof prop !== 'object') {\n this.fontOptions[n] = prop;\n }\n });\n }\n\n\n /**\n * If in-variable is a string, parse it as a font specifier.\n *\n * Note that following is not done here and have to be done after the call:\n * - Not all font options are set (vadjust, mod)\n *\n * @param {Object} outOptions out-parameter, object in which to store the parse results (if any)\n * @param {Object} inOptions font options to parse\n * @return {boolean} true if font parsed as string, false otherwise\n * @static\n */\n static parseFontString(outOptions, inOptions) {\n if (!inOptions || typeof inOptions !== 'string') return false;\n\n let newOptionsArray = inOptions.split(\" \");\n\n outOptions.size = +newOptionsArray[0].replace(\"px\",'');\n outOptions.face = newOptionsArray[1];\n outOptions.color = newOptionsArray[2];\n\n return true;\n }\n\n\n /**\n * Set the width and height constraints based on 'nearest' value\n *\n * @param {Array} pile array of option objects to consider\n * @returns {object} the actual constraint values to use\n * @private\n */\n constrain(pile) {\n // NOTE: constrainWidth and constrainHeight never set!\n // NOTE: for edge labels, only 'maxWdt' set\n // Node labels can set all the fields\n let fontOptions = {\n constrainWidth: false,\n maxWdt: -1,\n minWdt: -1,\n constrainHeight: false,\n minHgt: -1,\n valign: 'middle',\n }\n\n let widthConstraint = util.topMost(pile, 'widthConstraint');\n if (typeof widthConstraint === 'number') {\n fontOptions.maxWdt = Number(widthConstraint);\n fontOptions.minWdt = Number(widthConstraint);\n } else if (typeof widthConstraint === 'object') {\n let widthConstraintMaximum = util.topMost(pile, ['widthConstraint', 'maximum']);\n if (typeof widthConstraintMaximum === 'number') {\n fontOptions.maxWdt = Number(widthConstraintMaximum);\n }\n let widthConstraintMinimum = util.topMost(pile, ['widthConstraint', 'minimum'])\n if (typeof widthConstraintMinimum === 'number') {\n fontOptions.minWdt = Number(widthConstraintMinimum);\n }\n }\n\n\n let heightConstraint = util.topMost(pile, 'heightConstraint');\n if (typeof heightConstraint === 'number') {\n fontOptions.minHgt = Number(heightConstraint);\n } else if (typeof heightConstraint === 'object') {\n let heightConstraintMinimum = util.topMost(pile, ['heightConstraint', 'minimum']);\n if (typeof heightConstraintMinimum === 'number') {\n fontOptions.minHgt = Number(heightConstraintMinimum);\n }\n let heightConstraintValign = util.topMost(pile, ['heightConstraint', 'valign']);\n if (typeof heightConstraintValign === 'string') {\n if ((heightConstraintValign === 'top')|| (heightConstraintValign === 'bottom')) {\n fontOptions.valign = heightConstraintValign;\n }\n }\n }\n\n return fontOptions;\n }\n\n\n /**\n * Set options and update internal state\n *\n * @param {Object} options options to set\n * @param {Array} pile array of option objects to consider for option 'chosen'\n */\n update(options, pile) {\n this.setOptions(options, true);\n this.propagateFonts(pile);\n util.deepExtend(this.fontOptions, this.constrain(pile));\n this.fontOptions.chooser = ComponentUtil.choosify('label', pile);\n }\n\n\n /**\n * When margins are set in an element, adjust sizes is called to remove them\n * from the width/height constraints. This must be done prior to label sizing.\n *\n * @param {{top: number, right: number, bottom: number, left: number}} margins\n */\n adjustSizes(margins) {\n let widthBias = (margins) ? (margins.right + margins.left) : 0;\n if (this.fontOptions.constrainWidth) {\n this.fontOptions.maxWdt -= widthBias;\n this.fontOptions.minWdt -= widthBias;\n }\n let heightBias = (margins) ? (margins.top + margins.bottom) : 0;\n if (this.fontOptions.constrainHeight) {\n this.fontOptions.minHgt -= heightBias;\n }\n }\n\n\n/////////////////////////////////////////////////////////\n// Methods for handling options piles\n// Eventually, these will be moved to a separate class\n/////////////////////////////////////////////////////////\n\n /**\n * Add the font members of the passed list of option objects to the pile.\n *\n * @param {Pile} dstPile pile of option objects add to \n * @param {Pile} srcPile pile of option objects to take font options from\n * @private\n */\n addFontOptionsToPile(dstPile, srcPile) {\n for (let i = 0; i < srcPile.length; ++i) {\n this.addFontToPile(dstPile, srcPile[i]);\n }\n }\n\n\n /**\n * Add given font option object to the list of objects (the 'pile') to consider for determining\n * multi-font option values.\n *\n * @param {Pile} pile pile of option objects to use\n * @param {object} options instance to add to pile\n * @private\n */\n addFontToPile(pile, options) {\n if (options === undefined) return;\n if (options.font === undefined || options.font === null) return;\n\n let item = options.font;\n pile.push(item);\n }\n\n\n /**\n * Collect all own-property values from the font pile that aren't multi-font option objectss.\n *\n * @param {Pile} pile pile of option objects to use\n * @returns {object} object with all current own basic font properties\n * @private\n */\n getBasicOptions(pile) {\n let ret = {};\n\n // Scans the whole pile to get all options present\n for (let n = 0; n < pile.length; ++n) {\n let fontOptions = pile[n];\n\n // Convert shorthand if necessary\n let tmpShorthand = {};\n if (Label.parseFontString(tmpShorthand, fontOptions)) {\n fontOptions = tmpShorthand;\n }\n\n util.forEach(fontOptions, (opt, name) => {\n if (opt === undefined) return; // multi-font option need not be present \n if (ret.hasOwnProperty(name)) return; // Keep first value we encounter\n\n if (multiFontStyle.indexOf(name) !== -1) {\n // Skip multi-font properties but we do need the structure\n ret[name] = {};\n } else {\n ret[name] = opt;\n }\n });\n }\n\n return ret;\n }\n\n\n /**\n * Return the value for given option for the given multi-font.\n *\n * All available option objects are trawled in the set order to construct the option values.\n *\n * ---------------------------------------------------------------------\n * ## Traversal of pile for multi-fonts\n *\n * The determination of multi-font option values is a special case, because any values not\n * present in the multi-font options should by definition be taken from the main font options,\n * i.e. from the current 'parent' object of the multi-font option.\n *\n * ### Search order for multi-fonts\n *\n * 'bold' used as example:\n *\n * - search in option group 'bold' in local properties\n * - search in main font option group in local properties\n *\n * ---------------------------------------------------------------------\n *\n * @param {Pile} pile pile of option objects to use\n * @param {MultiFontStyle} multiName sub path for the multi-font\n * @param {string} option the option to search for, for the given multi-font\n * @returns {string|number} the value for the given option\n * @private\n */\n getFontOption(pile, multiName, option) {\n let multiFont;\n\n // Search multi font in local properties\n for (let n = 0; n < pile.length; ++n) {\n let fontOptions = pile[n];\n\n if (fontOptions.hasOwnProperty(multiName)) {\n multiFont = fontOptions[multiName];\n if (multiFont === undefined || multiFont === null) continue;\n\n // Convert shorthand if necessary\n // TODO: inefficient to do this conversion every time; find a better way.\n let tmpShorthand = {};\n if (Label.parseFontString(tmpShorthand, multiFont)) {\n multiFont = tmpShorthand;\n }\n\n if (multiFont.hasOwnProperty(option)) {\n return multiFont[option];\n }\n }\n }\n\n // Option is not mentioned in the multi font options; take it from the parent font options.\n // These have already been converted with getBasicOptions(), so use the converted values.\n if (this.fontOptions.hasOwnProperty(option)) {\n return this.fontOptions[option];\n }\n\n // A value **must** be found; you should never get here.\n throw new Error(\"Did not find value for multi-font for property: '\" + option + \"'\");\n }\n\n\n /**\n * Return all options values for the given multi-font.\n *\n * All available option objects are trawled in the set order to construct the option values.\n *\n * @param {Pile} pile pile of option objects to use\n * @param {MultiFontStyle} multiName sub path for the mod-font\n * @returns {MultiFontOptions}\n * @private\n */\n getFontOptions(pile, multiName) {\n let result = {};\n let optionNames = ['color', 'size', 'face', 'mod', 'vadjust']; // List of allowed options per multi-font\n\n for (let i = 0; i < optionNames.length; ++i) {\n let mod = optionNames[i];\n result[mod] = this.getFontOption(pile, multiName, mod);\n }\n\n return result;\n }\n\n/////////////////////////////////////////////////////////\n// End methods for handling options piles\n/////////////////////////////////////////////////////////\n\n\n /**\n * Collapse the font options for the multi-font to single objects, from\n * the chain of option objects passed (the 'pile').\n *\n * @param {Pile} pile sequence of option objects to consider.\n * First item in list assumed to be the newly set options.\n */\n propagateFonts(pile) {\n let fontPile = []; // sequence of font objects to consider, order important\n\n // Note that this.elementOptions is not used here.\n this.addFontOptionsToPile(fontPile, pile);\n this.fontOptions = this.getBasicOptions(fontPile);\n\n // We set multifont values even if multi === false, for consistency (things break otherwise)\n for (let i = 0; i < multiFontStyle.length; ++i) {\n let mod = multiFontStyle[i];\n let modOptions = this.fontOptions[mod];\n let tmpMultiFontOptions = this.getFontOptions(fontPile, mod);\n\n // Copy over found values\n util.forEach(tmpMultiFontOptions, (option, n) => {\n modOptions[n] = option;\n });\n\n modOptions.size = Number(modOptions.size);\n modOptions.vadjust = Number(modOptions.vadjust);\n }\n }\n\n\n /**\n * Main function. This is called from anything that wants to draw a label.\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} x\n * @param {number} y\n * @param {boolean} selected\n * @param {boolean} hover\n * @param {string} [baseline='middle']\n */\n draw(ctx, x, y, selected, hover, baseline = 'middle') {\n // if no label, return\n if (this.elementOptions.label === undefined)\n return;\n\n // check if we have to render the label\n let viewFontSize = this.fontOptions.size * this.body.view.scale;\n if (this.elementOptions.label && viewFontSize < this.elementOptions.scaling.label.drawThreshold - 1)\n return;\n\n // This ensures that there will not be HUGE letters on screen\n // by setting an upper limit on the visible text size (regardless of zoomLevel)\n if (viewFontSize >= this.elementOptions.scaling.label.maxVisible) {\n viewFontSize = Number(this.elementOptions.scaling.label.maxVisible) / this.body.view.scale;\n }\n\n // update the size cache if required\n this.calculateLabelSize(ctx, selected, hover, x, y, baseline);\n this._drawBackground(ctx);\n this._drawText(ctx, x, this.size.yLine, baseline, viewFontSize);\n }\n\n\n /**\n * Draws the label background\n * @param {CanvasRenderingContext2D} ctx\n * @private\n */\n _drawBackground(ctx) {\n if (this.fontOptions.background !== undefined && this.fontOptions.background !== \"none\") {\n ctx.fillStyle = this.fontOptions.background;\n let size = this.getSize();\n ctx.fillRect(size.left, size.top, size.width, size.height);\n }\n }\n\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} x\n * @param {number} y\n * @param {string} [baseline='middle']\n * @param {number} viewFontSize \n * @private\n */\n _drawText(ctx, x, y, baseline = 'middle', viewFontSize) {\n [x, y] = this._setAlignment(ctx, x, y, baseline);\n\n ctx.textAlign = 'left';\n x = x - this.size.width / 2; // Shift label 1/2-distance to the left\n if ((this.fontOptions.valign) && (this.size.height > this.size.labelHeight)) {\n if (this.fontOptions.valign === 'top') {\n y -= (this.size.height - this.size.labelHeight) / 2;\n }\n if (this.fontOptions.valign === 'bottom') {\n y += (this.size.height - this.size.labelHeight) / 2;\n }\n }\n\n // draw the text\n for (let i = 0; i < this.lineCount; i++) {\n let line = this.lines[i];\n if (line && line.blocks) {\n let width = 0;\n if (this.isEdgeLabel || this.fontOptions.align === 'center') {\n width += (this.size.width - line.width) / 2\n } else if (this.fontOptions.align === 'right') {\n width += (this.size.width - line.width)\n }\n for (let j = 0; j < line.blocks.length; j++) {\n let block = line.blocks[j];\n ctx.font = block.font;\n let [fontColor, strokeColor] = this._getColor(block.color, viewFontSize, block.strokeColor);\n if (block.strokeWidth > 0) {\n ctx.lineWidth = block.strokeWidth;\n ctx.strokeStyle = strokeColor;\n ctx.lineJoin = 'round';\n }\n ctx.fillStyle = fontColor;\n\n if (block.strokeWidth > 0) {\n ctx.strokeText(block.text, x + width, y + block.vadjust);\n }\n ctx.fillText(block.text, x + width, y + block.vadjust);\n width += block.width;\n }\n y += line.height;\n }\n }\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} x\n * @param {number} y\n * @param {string} baseline\n * @returns {Array.}\n * @private\n */\n _setAlignment(ctx, x, y, baseline) {\n // check for label alignment (for edges)\n // TODO: make alignment for nodes\n if (this.isEdgeLabel && this.fontOptions.align !== 'horizontal' && this.pointToSelf === false) {\n x = 0;\n y = 0;\n\n let lineMargin = 2;\n if (this.fontOptions.align === 'top') {\n ctx.textBaseline = 'alphabetic';\n y -= 2 * lineMargin; // distance from edge, required because we use alphabetic. Alphabetic has less difference between browsers\n }\n else if (this.fontOptions.align === 'bottom') {\n ctx.textBaseline = 'hanging';\n y += 2 * lineMargin;// distance from edge, required because we use hanging. Hanging has less difference between browsers\n }\n else {\n ctx.textBaseline = 'middle';\n }\n }\n else {\n ctx.textBaseline = baseline;\n }\n return [x,y];\n }\n\n /**\n * fade in when relative scale is between threshold and threshold - 1.\n * If the relative scale would be smaller than threshold -1 the draw function would have returned before coming here.\n *\n * @param {string} color The font color to use\n * @param {number} viewFontSize\n * @param {string} initialStrokeColor\n * @returns {Array.} An array containing the font color and stroke color\n * @private\n */\n _getColor(color, viewFontSize, initialStrokeColor) {\n let fontColor = color || '#000000';\n let strokeColor = initialStrokeColor || '#ffffff';\n if (viewFontSize <= this.elementOptions.scaling.label.drawThreshold) {\n let opacity = Math.max(0, Math.min(1, 1 - (this.elementOptions.scaling.label.drawThreshold - viewFontSize)));\n fontColor = util.overrideOpacity(fontColor, opacity);\n strokeColor = util.overrideOpacity(strokeColor, opacity);\n }\n return [fontColor, strokeColor];\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {boolean} selected\n * @param {boolean} hover\n * @returns {{width: number, height: number}}\n */\n getTextSize(ctx, selected = false, hover = false) {\n this._processLabel(ctx, selected, hover);\n return {\n width: this.size.width,\n height: this.size.height,\n lineCount: this.lineCount\n };\n }\n\n\n /**\n * Get the current dimensions of the label\n *\n * @return {rect}\n */\n getSize() {\n let lineMargin = 2;\n let x = this.size.left; // default values which might be overridden below\n let y = this.size.top - 0.5*lineMargin; // idem\n\n if (this.isEdgeLabel) {\n const x2 = -this.size.width * 0.5;\n\n switch (this.fontOptions.align) {\n case 'middle':\n x = x2;\n y = -this.size.height * 0.5\n break;\n case 'top':\n x = x2;\n y = -(this.size.height + lineMargin);\n break;\n case 'bottom':\n x = x2;\n y = lineMargin;\n break;\n }\n }\n\n var ret = {\n left : x,\n top : y,\n width : this.size.width,\n height: this.size.height,\n };\n\n return ret;\n }\n\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {boolean} selected\n * @param {boolean} hover\n * @param {number} [x=0]\n * @param {number} [y=0]\n * @param {'middle'|'hanging'} [baseline='middle']\n */\n calculateLabelSize(ctx, selected, hover, x = 0, y = 0, baseline = 'middle') {\n this._processLabel(ctx, selected, hover);\n this.size.left = x - this.size.width * 0.5;\n this.size.top = y - this.size.height * 0.5;\n this.size.yLine = y + (1 - this.lineCount) * 0.5 * this.fontOptions.size;\n if (baseline === \"hanging\") {\n this.size.top += 0.5 * this.fontOptions.size;\n this.size.top += 4; // distance from node, required because we use hanging. Hanging has less difference between browsers\n this.size.yLine += 4; // distance from node\n }\n }\n\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {boolean} selected\n * @param {boolean} hover\n * @param {string} mod\n * @returns {{color, size, face, mod, vadjust, strokeWidth: *, strokeColor: (*|string|allOptions.edges.font.strokeColor|{string}|allOptions.nodes.font.strokeColor|Array)}}\n */\n getFormattingValues(ctx, selected, hover, mod) {\n let getValue = function(fontOptions, mod, option) {\n if (mod === \"normal\") {\n if (option === 'mod' ) return \"\";\n return fontOptions[option];\n }\n\n if (fontOptions[mod][option] !== undefined) { // Grumbl leaving out test on undefined equals false for \"\" \n return fontOptions[mod][option];\n } else {\n // Take from parent font option\n return fontOptions[option];\n }\n };\n\n let values = {\n color : getValue(this.fontOptions, mod, 'color' ),\n size : getValue(this.fontOptions, mod, 'size' ),\n face : getValue(this.fontOptions, mod, 'face' ),\n mod : getValue(this.fontOptions, mod, 'mod' ),\n vadjust: getValue(this.fontOptions, mod, 'vadjust'),\n strokeWidth: this.fontOptions.strokeWidth,\n strokeColor: this.fontOptions.strokeColor\n };\n if (selected || hover) {\n if (mod === \"normal\" && (this.fontOptions.chooser === true) && (this.elementOptions.labelHighlightBold)) {\n values.mod = 'bold';\n } else {\n if (typeof this.fontOptions.chooser === 'function') {\n this.fontOptions.chooser(values, this.elementOptions.id, selected, hover);\n }\n }\n }\n\n let fontString = \"\";\n if (values.mod !== undefined && values.mod !== \"\") { // safeguard for undefined - this happened\n fontString += values.mod + \" \";\n }\n fontString += values.size + \"px \" + values.face;\n\n ctx.font = fontString.replace(/\"/g, \"\");\n values.font = ctx.font;\n values.height = values.size;\n return values;\n }\n\n\n /**\n *\n * @param {boolean} selected\n * @param {boolean} hover\n * @returns {boolean}\n */\n differentState(selected, hover) {\n return ((selected !== this.selectedState) || (hover !== this.hoverState));\n }\n \n\n /**\n * This explodes the passed text into lines and determines the width, height and number of lines.\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {boolean} selected\n * @param {boolean} hover\n * @param {string} inText the text to explode\n * @returns {{width, height, lines}|*}\n * @private\n */\n _processLabelText(ctx, selected, hover, inText) {\n let splitter = new LabelSplitter(ctx, this, selected, hover);\n return splitter.process(inText);\n }\n\n\n /**\n * This explodes the label string into lines and sets the width, height and number of lines.\n * @param {CanvasRenderingContext2D} ctx\n * @param {boolean} selected\n * @param {boolean} hover\n * @private\n */\n _processLabel(ctx, selected, hover) {\n\n if(this.labelDirty === false && !this.differentState(selected,hover))\n return;\n \n let state = this._processLabelText(ctx, selected, hover, this.elementOptions.label);\n\n if ((this.fontOptions.minWdt > 0) && (state.width < this.fontOptions.minWdt)) {\n state.width = this.fontOptions.minWdt;\n }\n\n this.size.labelHeight =state.height;\n if ((this.fontOptions.minHgt > 0) && (state.height < this.fontOptions.minHgt)) {\n state.height = this.fontOptions.minHgt;\n }\n\n this.lines = state.lines;\n this.lineCount = state.lines.length;\n this.size.width = state.width;\n this.size.height = state.height;\n this.selectedState = selected;\n this.hoverState = hover;\n\n this.labelDirty = false;\n }\n\n\n /**\n * Check if this label is visible\n *\n * @return {boolean} true if this label will be show, false otherwise\n */\n visible() {\n if ((this.size.width === 0 || this.size.height === 0)\n || this.elementOptions.label === undefined) {\n return false; // nothing to display\n }\n\n let viewFontSize = this.fontOptions.size * this.body.view.scale;\n if (viewFontSize < this.elementOptions.scaling.label.drawThreshold - 1) {\n return false; // Too small or too far away to show\n }\n\n return true;\n }\n}\n\nexport default Label;\n","function _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nmodule.exports = _assertThisInitialized;","var _typeof = require(\"../helpers/typeof\");\n\nvar assertThisInitialized = require(\"./assertThisInitialized\");\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return assertThisInitialized(self);\n}\n\nmodule.exports = _possibleConstructorReturn;","function _getPrototypeOf(o) {\n module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nmodule.exports = _getPrototypeOf;","function _setPrototypeOf(o, p) {\n module.exports = _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nmodule.exports = _setPrototypeOf;","var setPrototypeOf = require(\"./setPrototypeOf\");\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) setPrototypeOf(subClass, superClass);\n}\n\nmodule.exports = _inherits;","/**\n * The Base class for all Nodes.\n */\nclass NodeBase {\n /**\n * @param {Object} options\n * @param {Object} body\n * @param {Label} labelModule\n */\n constructor(options, body, labelModule) {\n this.body = body;\n this.labelModule = labelModule;\n this.setOptions(options);\n this.top = undefined;\n this.left = undefined;\n this.height = undefined;\n this.width = undefined;\n this.radius = undefined;\n this.margin = undefined;\n this.refreshNeeded = true;\n this.boundingBox = {top: 0, left: 0, right: 0, bottom: 0};\n }\n\n /**\n *\n * @param {Object} options\n */\n setOptions(options) {\n this.options = options;\n }\n\n /**\n *\n * @param {Label} labelModule\n * @private\n */\n _setMargins(labelModule) {\n this.margin = {};\n if (this.options.margin) {\n if (typeof this.options.margin == 'object') {\n this.margin.top = this.options.margin.top;\n this.margin.right = this.options.margin.right;\n this.margin.bottom = this.options.margin.bottom;\n this.margin.left = this.options.margin.left;\n } else {\n this.margin.top = this.options.margin;\n this.margin.right = this.options.margin;\n this.margin.bottom = this.options.margin;\n this.margin.left = this.options.margin;\n }\n }\n labelModule.adjustSizes(this.margin)\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} angle\n * @returns {number}\n * @private\n */\n _distanceToBorder(ctx,angle) {\n var borderWidth = this.options.borderWidth;\n this.resize(ctx);\n return Math.min(\n Math.abs(this.width / 2 / Math.cos(angle)),\n Math.abs(this.height / 2 / Math.sin(angle))) + borderWidth;\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {ArrowOptions} values\n */\n enableShadow(ctx, values) {\n if (values.shadow) {\n ctx.shadowColor = values.shadowColor;\n ctx.shadowBlur = values.shadowSize;\n ctx.shadowOffsetX = values.shadowX;\n ctx.shadowOffsetY = values.shadowY;\n }\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {ArrowOptions} values\n */\n disableShadow(ctx, values) {\n if (values.shadow) {\n ctx.shadowColor = 'rgba(0,0,0,0)';\n ctx.shadowBlur = 0;\n ctx.shadowOffsetX = 0;\n ctx.shadowOffsetY = 0;\n }\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {ArrowOptions} values\n */\n enableBorderDashes(ctx, values) {\n if (values.borderDashes !== false) {\n if (ctx.setLineDash !== undefined) {\n let dashes = values.borderDashes;\n if (dashes === true) {\n dashes = [5,15]\n }\n ctx.setLineDash(dashes);\n }\n else {\n console.warn(\"setLineDash is not supported in this browser. The dashed borders cannot be used.\");\n this.options.shapeProperties.borderDashes = false;\n values.borderDashes = false;\n }\n }\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {ArrowOptions} values\n */\n disableBorderDashes(ctx, values) {\n if (values.borderDashes !== false) {\n if (ctx.setLineDash !== undefined) {\n ctx.setLineDash([0]);\n }\n else {\n console.warn(\"setLineDash is not supported in this browser. The dashed borders cannot be used.\");\n this.options.shapeProperties.borderDashes = false;\n values.borderDashes = false;\n }\n }\n }\n\n /**\n * Determine if the shape of a node needs to be recalculated.\n *\n * @param {boolean} selected\n * @param {boolean} hover\n * @returns {boolean}\n * @protected\n */\n needsRefresh(selected, hover) {\n if (this.refreshNeeded === true) {\n // This is probably not the best location to reset this member.\n // However, in the current logic, it is the most convenient one.\n this.refreshNeeded = false;\n return true;\n }\n\n return (this.width === undefined) || (this.labelModule.differentState(selected, hover));\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {ArrowOptions} values\n */\n initContextForDraw(ctx, values) {\n var borderWidth = values.borderWidth / this.body.view.scale;\n\n ctx.lineWidth = Math.min(this.width, borderWidth);\n ctx.strokeStyle = values.borderColor;\n ctx.fillStyle = values.color;\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {ArrowOptions} values\n */\n performStroke(ctx, values) {\n var borderWidth = values.borderWidth / this.body.view.scale;\n\n //draw dashed border if enabled, save and restore is required for firefox not to crash on unix.\n ctx.save();\n // if borders are zero width, they will be drawn with width 1 by default. This prevents that\n if (borderWidth > 0) {\n this.enableBorderDashes(ctx, values);\n //draw the border\n ctx.stroke();\n //disable dashed border for other elements\n this.disableBorderDashes(ctx, values);\n }\n ctx.restore();\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {ArrowOptions} values\n */\n performFill(ctx, values) {\n // draw shadow if enabled\n this.enableShadow(ctx, values);\n // draw the background\n ctx.fill();\n // disable shadows for other elements.\n this.disableShadow(ctx, values);\n\n this.performStroke(ctx, values);\n }\n\n\n /**\n *\n * @param {number} margin\n * @private\n */\n _addBoundingBoxMargin(margin) {\n this.boundingBox.left -= margin;\n this.boundingBox.top -= margin;\n this.boundingBox.bottom += margin;\n this.boundingBox.right += margin;\n }\n\n\n /**\n * Actual implementation of this method call.\n *\n * Doing it like this makes it easier to override\n * in the child classes.\n *\n * @param {number} x width\n * @param {number} y height\n * @param {CanvasRenderingContext2D} ctx\n * @param {boolean} selected\n * @param {boolean} hover\n * @private\n */\n _updateBoundingBox(x, y, ctx, selected, hover) {\n if (ctx !== undefined) {\n this.resize(ctx, selected, hover);\n }\n\n this.left = x - this.width / 2;\n this.top = y - this.height/ 2;\n\n this.boundingBox.left = this.left;\n this.boundingBox.top = this.top;\n this.boundingBox.bottom = this.top + this.height;\n this.boundingBox.right = this.left + this.width;\n }\n\n\n /**\n * Default implementation of this method call.\n * This acts as a stub which can be overridden.\n *\n * @param {number} x width\n * @param {number} y height\n * @param {CanvasRenderingContext2D} ctx\n * @param {boolean} selected\n * @param {boolean} hover\n */\n updateBoundingBox(x, y, ctx, selected, hover) {\n this._updateBoundingBox(x, y, ctx, selected, hover);\n }\n\n\n /**\n * Determine the dimensions to use for nodes with an internal label\n *\n * Currently, these are: Circle, Ellipse, Database, Box\n * The other nodes have external labels, and will not call this method\n *\n * If there is no label, decent default values are supplied.\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {boolean} [selected]\n * @param {boolean} [hover]\n * @returns {{width:number, height:number}}\n */\n getDimensionsFromLabel(ctx, selected, hover) {\n // NOTE: previously 'textSize' was not put in 'this' for Ellipse\n // TODO: examine the consequences.\n this.textSize = this.labelModule.getTextSize(ctx, selected, hover);\n var width = this.textSize.width;\n var height = this.textSize.height;\n\n const DEFAULT_SIZE = 14;\n if (width === 0) {\n // This happens when there is no label text set\n width = DEFAULT_SIZE; // use a decent default\n height = DEFAULT_SIZE; // if width zero, then height also always zero\n }\n\n return {width:width, height:height};\n }\n}\n\nexport default NodeBase;\n","'use strict';\n\nimport NodeBase from '../util/NodeBase'\n\n/**\n * A Box Node/Cluster shape.\n *\n * @extends NodeBase\n */\nclass Box extends NodeBase {\n /**\n * @param {Object} options\n * @param {Object} body\n * @param {Label} labelModule\n */\n constructor (options, body, labelModule) {\n super(options,body,labelModule);\n this._setMargins(labelModule);\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {boolean} [selected]\n * @param {boolean} [hover]\n */\n resize(ctx, selected = this.selected, hover = this.hover) {\n if (this.needsRefresh(selected, hover)) {\n var dimensions = this.getDimensionsFromLabel(ctx, selected, hover);\n\n this.width = dimensions.width + this.margin.right + this.margin.left;\n this.height = dimensions.height + this.margin.top + this.margin.bottom;\n this.radius = this.width / 2;\n }\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} x width\n * @param {number} y height\n * @param {boolean} selected\n * @param {boolean} hover\n * @param {ArrowOptions} values\n */\n draw(ctx, x, y, selected, hover, values) {\n this.resize(ctx, selected, hover);\n this.left = x - this.width / 2;\n this.top = y - this.height / 2;\n\n this.initContextForDraw(ctx, values);\n ctx.roundRect(this.left, this.top, this.width, this.height, values.borderRadius);\n this.performFill(ctx, values);\n\n this.updateBoundingBox(x, y, ctx, selected, hover);\n this.labelModule.draw(ctx, this.left + this.textSize.width / 2 + this.margin.left,\n this.top + this.textSize.height / 2 + this.margin.top, selected, hover);\n }\n\n /**\n *\n * @param {number} x width\n * @param {number} y height\n * @param {CanvasRenderingContext2D} ctx\n * @param {boolean} selected\n * @param {boolean} hover\n */\n updateBoundingBox(x, y, ctx, selected, hover) {\n this._updateBoundingBox(x, y, ctx, selected, hover);\n\n let borderRadius = this.options.shapeProperties.borderRadius; // only effective for box\n this._addBoundingBoxMargin(borderRadius);\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} angle\n * @returns {number}\n */\n distanceToBorder(ctx, angle) {\n this.resize(ctx);\n let borderWidth = this.options.borderWidth;\n\n return Math.min(\n Math.abs((this.width) / 2 / Math.cos(angle)),\n Math.abs((this.height) / 2 / Math.sin(angle))) + borderWidth;\n }\n}\n\nexport default Box;\n","import NodeBase from './NodeBase';\n\n/**\n * NOTE: This is a bad base class\n *\n * Child classes are:\n *\n * Image - uses *only* image methods\n * Circle - uses *only* _drawRawCircle\n * CircleImage - uses all\n *\n * TODO: Refactor, move _drawRawCircle to different module, derive Circle from NodeBase\n * Rename this to ImageBase\n * Consolidate common code in Image and CircleImage to base class\n *\n * @extends NodeBase\n */\nclass CircleImageBase extends NodeBase {\n /**\n * @param {Object} options\n * @param {Object} body\n * @param {Label} labelModule\n */\n constructor(options, body, labelModule) {\n super(options, body, labelModule);\n this.labelOffset = 0;\n this.selected = false;\n }\n\n /**\n *\n * @param {Object} options\n * @param {Object} [imageObj]\n * @param {Object} [imageObjAlt]\n */\n setOptions(options, imageObj, imageObjAlt) {\n this.options = options;\n\n if (!(imageObj === undefined && imageObjAlt === undefined)) {\n this.setImages(imageObj, imageObjAlt);\n }\n }\n\n\n /**\n * Set the images for this node.\n *\n * The images can be updated after the initial setting of options;\n * therefore, this method needs to be reentrant. \n *\n * For correct working in error cases, it is necessary to properly set\n * field 'nodes.brokenImage' in the options.\n *\n * @param {Image} imageObj required; main image to show for this node\n * @param {Image|undefined} imageObjAlt optional; image to show when node is selected\n */\n setImages(imageObj, imageObjAlt) {\n if (imageObjAlt && this.selected) {\n this.imageObj = imageObjAlt;\n this.imageObjAlt = imageObj;\n } else {\n this.imageObj = imageObj;\n this.imageObjAlt = imageObjAlt;\n }\n }\n\n /**\n * Set selection and switch between the base and the selected image.\n *\n * Do the switch only if imageObjAlt exists.\n *\n * @param {boolean} selected value of new selected state for current node\n */\n switchImages(selected) {\n var selection_changed = ((selected && !this.selected) || (!selected && this.selected));\n this.selected = selected; // Remember new selection\n\n if (this.imageObjAlt !== undefined && selection_changed) {\n let imageTmp = this.imageObj;\n this.imageObj = this.imageObjAlt;\n this.imageObjAlt = imageTmp;\n }\n }\n\n /**\n * Adjust the node dimensions for a loaded image.\n *\n * Pre: this.imageObj is valid\n */\n _resizeImage() {\n var width, height;\n\n if (this.options.shapeProperties.useImageSize === false) {\n // Use the size property\n var ratio_width = 1;\n var ratio_height = 1;\n\n // Only calculate the proper ratio if both width and height not zero\n if (this.imageObj.width && this.imageObj.height) {\n if (this.imageObj.width > this.imageObj.height) {\n ratio_width = this.imageObj.width / this.imageObj.height;\n }\n else {\n ratio_height = this.imageObj.height / this.imageObj.width;\n }\n }\n\n width = this.options.size * 2 * ratio_width;\n height = this.options.size * 2 * ratio_height;\n }\n else {\n // Use the image size\n width = this.imageObj.width;\n height = this.imageObj.height;\n }\n\n this.width = width;\n this.height = height;\n this.radius = 0.5 * this.width;\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} x width\n * @param {number} y height\n * @param {ArrowOptions} values\n * @private\n */\n _drawRawCircle(ctx, x, y, values) {\n this.initContextForDraw(ctx, values);\n ctx.circle(x, y, values.size);\n this.performFill(ctx, values);\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {ArrowOptions} values\n * @private\n */\n _drawImageAtPosition(ctx, values) {\n if (this.imageObj.width != 0) {\n // draw the image\n ctx.globalAlpha = 1.0;\n\n // draw shadow if enabled\n this.enableShadow(ctx, values);\n\n let factor = 1;\n if (this.options.shapeProperties.interpolation === true) {\n factor = (this.imageObj.width / this.width) / this.body.view.scale;\n }\n\n this.imageObj.drawImageAtPosition(ctx, factor, this.left, this.top, this.width, this.height);\n\n // disable shadows for other elements.\n this.disableShadow(ctx, values);\n }\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} x width\n * @param {number} y height\n * @param {boolean} selected\n * @param {boolean} hover\n * @private\n */\n _drawImageLabel(ctx, x, y, selected, hover) {\n var yLabel;\n var offset = 0;\n\n if (this.height !== undefined) {\n offset = this.height * 0.5;\n var labelDimensions = this.labelModule.getTextSize(ctx, selected, hover);\n if (labelDimensions.lineCount >= 1) {\n offset += labelDimensions.height / 2;\n }\n }\n\n yLabel = y + offset;\n\n if (this.options.label) {\n this.labelOffset = offset;\n }\n this.labelModule.draw(ctx, x, yLabel, selected, hover, 'hanging');\n }\n}\n\nexport default CircleImageBase;\n","'use strict';\n\nimport CircleImageBase from '../util/CircleImageBase'\n\n/**\n * A Circle Node/Cluster shape.\n *\n * @extends CircleImageBase\n */\nclass Circle extends CircleImageBase {\n /**\n * @param {Object} options\n * @param {Object} body\n * @param {Label} labelModule\n */\n constructor(options, body, labelModule) {\n super(options, body, labelModule);\n this._setMargins(labelModule);\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {boolean} [selected]\n * @param {boolean} [hover]\n */\n resize(ctx, selected = this.selected, hover = this.hover) {\n if (this.needsRefresh(selected, hover)) {\n var dimensions = this.getDimensionsFromLabel(ctx, selected, hover);\n\n var diameter = Math.max(dimensions.width + this.margin.right + this.margin.left,\n dimensions.height + this.margin.top + this.margin.bottom);\n\n this.options.size = diameter / 2; // NOTE: this size field only set here, not in Ellipse, Database, Box\n this.width = diameter;\n this.height = diameter;\n this.radius = this.width / 2;\n }\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} x width\n * @param {number} y height\n * @param {boolean} selected\n * @param {boolean} hover\n * @param {ArrowOptions} values\n */\n draw(ctx, x, y, selected, hover, values) {\n this.resize(ctx, selected, hover);\n this.left = x - this.width / 2;\n this.top = y - this.height / 2;\n\n this._drawRawCircle(ctx, x, y, values);\n\n this.updateBoundingBox(x,y);\n this.labelModule.draw(ctx, this.left + this.textSize.width / 2 + this.margin.left,\n y, selected, hover);\n }\n\n /**\n *\n * @param {number} x width\n * @param {number} y height\n */\n updateBoundingBox(x, y) {\n this.boundingBox.top = y - this.options.size;\n this.boundingBox.left = x - this.options.size;\n this.boundingBox.right = x + this.options.size;\n this.boundingBox.bottom = y + this.options.size;\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} angle - Unused\n * @returns {number}\n */\n distanceToBorder(ctx, angle) { // eslint-disable-line no-unused-vars\n this.resize(ctx);\n return this.width * 0.5;\n }\n}\n\nexport default Circle;\n","'use strict';\n\nimport CircleImageBase from '../util/CircleImageBase'\n\n/**\n * A CircularImage Node/Cluster shape.\n *\n * @extends CircleImageBase\n */\nclass CircularImage extends CircleImageBase {\n /**\n * @param {Object} options\n * @param {Object} body\n * @param {Label} labelModule\n * @param {Image} imageObj\n * @param {Image} imageObjAlt\n */\n constructor (options, body, labelModule, imageObj, imageObjAlt) {\n super(options, body, labelModule);\n\n this.setImages(imageObj, imageObjAlt);\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {boolean} [selected]\n * @param {boolean} [hover]\n */\n resize(ctx, selected = this.selected, hover = this.hover) {\n var imageAbsent = (this.imageObj.src === undefined) ||\n (this.imageObj.width === undefined) ||\n (this.imageObj.height === undefined);\n\n if (imageAbsent) {\n var diameter = this.options.size * 2;\n this.width = diameter;\n this.height = diameter;\n this.radius = 0.5*this.width;\n\t\t\treturn;\n }\n\n // At this point, an image is present, i.e. this.imageObj is valid.\n if (this.needsRefresh(selected, hover)) {\n this._resizeImage();\n }\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} x width\n * @param {number} y height\n * @param {boolean} selected\n * @param {boolean} hover\n * @param {ArrowOptions} values\n */\n draw(ctx, x, y, selected, hover, values) {\n this.switchImages(selected);\n this.resize();\n this.left = x - this.width / 2;\n this.top = y - this.height / 2;\n\n // draw the background circle. IMPORTANT: the stroke in this method is used by the clip method below.\n this._drawRawCircle(ctx, x, y, values);\n\n // now we draw in the circle, we save so we can revert the clip operation after drawing.\n ctx.save();\n // clip is used to use the stroke in drawRawCircle as an area that we can draw in.\n ctx.clip();\n // draw the image\n this._drawImageAtPosition(ctx, values);\n // restore so we can again draw on the full canvas\n ctx.restore();\n\n this._drawImageLabel(ctx, x, y, selected, hover);\n\n this.updateBoundingBox(x,y);\n }\n\n // TODO: compare with Circle.updateBoundingBox(), consolidate? More stuff is happening here\n /**\n *\n * @param {number} x width\n * @param {number} y height\n */\n updateBoundingBox(x,y) {\n this.boundingBox.top = y - this.options.size;\n this.boundingBox.left = x - this.options.size;\n this.boundingBox.right = x + this.options.size;\n this.boundingBox.bottom = y + this.options.size;\n\n // TODO: compare with Image.updateBoundingBox(), consolidate?\n this.boundingBox.left = Math.min(this.boundingBox.left, this.labelModule.size.left);\n this.boundingBox.right = Math.max(this.boundingBox.right, this.labelModule.size.left + this.labelModule.size.width);\n this.boundingBox.bottom = Math.max(this.boundingBox.bottom, this.boundingBox.bottom + this.labelOffset);\n }\n\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} angle - Unused\n * @returns {number}\n */\n distanceToBorder(ctx, angle) { // eslint-disable-line no-unused-vars\n this.resize(ctx);\n return this.width * 0.5;\n }\n}\n\nexport default CircularImage;\n","'use strict';\n\nimport NodeBase from '../util/NodeBase'\n\n/**\n * A Database Node/Cluster shape.\n *\n * @extends NodeBase\n */\nclass Database extends NodeBase {\n /**\n * @param {Object} options\n * @param {Object} body\n * @param {Label} labelModule\n */\n constructor (options, body, labelModule) {\n super(options, body, labelModule);\n this._setMargins(labelModule);\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {boolean} selected\n * @param {boolean} hover\n */\n resize(ctx, selected, hover) {\n if (this.needsRefresh(selected, hover)) {\n var dimensions = this.getDimensionsFromLabel(ctx, selected, hover);\n var size = dimensions.width + this.margin.right + this.margin.left;\n\n this.width = size;\n this.height = size;\n this.radius = this.width / 2;\n }\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} x width\n * @param {number} y height\n * @param {boolean} selected\n * @param {boolean} hover\n * @param {ArrowOptions} values\n */\n draw(ctx, x, y, selected, hover, values) {\n this.resize(ctx, selected, hover);\n this.left = x - this.width / 2;\n this.top = y - this.height / 2;\n\n this.initContextForDraw(ctx, values);\n ctx.database(x - this.width / 2, y - this.height / 2, this.width, this.height);\n this.performFill(ctx, values);\n\n this.updateBoundingBox(x, y, ctx, selected, hover);\n this.labelModule.draw(ctx, this.left + this.textSize.width / 2 + this.margin.left,\n this.top + this.textSize.height / 2 + this.margin.top, selected, hover);\n }\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} angle\n * @returns {number}\n */\n distanceToBorder(ctx, angle) {\n return this._distanceToBorder(ctx, angle);\n }\n}\n\nexport default Database;\n","import NodeBase from '../util/NodeBase'\n\n/**\n * Base class for constructing Node/Cluster Shapes.\n *\n * @extends NodeBase\n */\nclass ShapeBase extends NodeBase {\n /**\n * @param {Object} options\n * @param {Object} body\n * @param {Label} labelModule\n */\n constructor(options, body, labelModule) {\n super(options, body, labelModule)\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {boolean} [selected]\n * @param {boolean} [hover]\n * @param {Object} [values={size: this.options.size}]\n */\n resize(ctx, selected = this.selected, hover = this.hover, values = { size: this.options.size }) {\n if (this.needsRefresh(selected, hover)) {\n this.labelModule.getTextSize(ctx, selected, hover);\n var size = 2 * values.size;\n this.width = size;\n this.height = size;\n this.radius = 0.5*this.width;\n }\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {string} shape\n * @param {number} sizeMultiplier - Unused! TODO: Remove next major release\n * @param {number} x\n * @param {number} y\n * @param {boolean} selected\n * @param {boolean} hover\n * @param {ArrowOptions} values\n * @private\n */\n _drawShape(ctx, shape, sizeMultiplier, x, y, selected, hover, values) {\n this.resize(ctx, selected, hover, values);\n this.left = x - this.width / 2;\n this.top = y - this.height / 2;\n\n this.initContextForDraw(ctx, values);\n ctx[shape](x, y, values.size);\n this.performFill(ctx, values);\n \n if (this.options.icon !== undefined) {\n if (this.options.icon.code !== undefined) {\n ctx.font = (selected ? \"bold \" : \"\")\n + (this.height / 2) + \"px \"\n + (this.options.icon.face || 'FontAwesome');\n ctx.fillStyle = this.options.icon.color || \"black\";\n ctx.textAlign = \"center\";\n ctx.textBaseline = \"middle\";\n ctx.fillText(this.options.icon.code, x, y);\n }\n }\n\n if (this.options.label !== undefined) {\n // Need to call following here in order to ensure value for `this.labelModule.size.height`\n this.labelModule.calculateLabelSize(ctx, selected, hover, x, y, 'hanging')\n let yLabel = y + 0.5 * this.height + 0.5 * this.labelModule.size.height;\n this.labelModule.draw(ctx, x, yLabel, selected, hover, 'hanging');\n }\n\n this.updateBoundingBox(x,y);\n }\n\n /**\n *\n * @param {number} x\n * @param {number} y\n */\n updateBoundingBox(x, y) {\n this.boundingBox.top = y - this.options.size;\n this.boundingBox.left = x - this.options.size;\n this.boundingBox.right = x + this.options.size;\n this.boundingBox.bottom = y + this.options.size;\n\n if (this.options.label !== undefined && this.labelModule.size.width > 0) {\n this.boundingBox.left = Math.min(this.boundingBox.left, this.labelModule.size.left);\n this.boundingBox.right = Math.max(this.boundingBox.right, this.labelModule.size.left + this.labelModule.size.width);\n this.boundingBox.bottom = Math.max(this.boundingBox.bottom, this.boundingBox.bottom + this.labelModule.size.height);\n }\n }\n}\n\nexport default ShapeBase;\n","'use strict';\n\nimport ShapeBase from '../util/ShapeBase'\n\n/**\n * A Diamond Node/Cluster shape.\n *\n * @extends ShapeBase\n */\nclass Diamond extends ShapeBase {\n /**\n * @param {Object} options\n * @param {Object} body\n * @param {Label} labelModule\n */\n constructor(options, body, labelModule) {\n super(options, body, labelModule)\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} x width\n * @param {number} y height\n * @param {boolean} selected\n * @param {boolean} hover\n * @param {ArrowOptions} values\n */\n draw(ctx, x, y, selected, hover, values) {\n this._drawShape(ctx, 'diamond', 4, x, y, selected, hover, values);\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} angle\n * @returns {number}\n */\n distanceToBorder(ctx, angle) {\n return this._distanceToBorder(ctx,angle);\n }\n}\n\nexport default Diamond;\n","'use strict';\n\nimport ShapeBase from '../util/ShapeBase'\n\n/**\n * A Dot Node/Cluster shape.\n *\n * @extends ShapeBase\n */\nclass Dot extends ShapeBase {\n /**\n * @param {Object} options\n * @param {Object} body\n * @param {Label} labelModule\n */\n constructor(options, body, labelModule) {\n super(options, body, labelModule)\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} x width\n * @param {number} y height\n * @param {boolean} selected\n * @param {boolean} hover\n * @param {ArrowOptions} values\n */\n draw(ctx, x, y, selected, hover, values) {\n this._drawShape(ctx, 'circle', 2, x, y, selected, hover, values);\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} angle\n * @returns {number}\n */\n distanceToBorder(ctx, angle) { // eslint-disable-line no-unused-vars\n this.resize(ctx);\n return this.options.size;\n }\n}\n\nexport default Dot;\n","'use strict';\n\nimport NodeBase from '../util/NodeBase'\n\n/**\n * Am Ellipse Node/Cluster shape.\n *\n * @extends NodeBase\n */\nclass Ellipse extends NodeBase {\n /**\n * @param {Object} options\n * @param {Object} body\n * @param {Label} labelModule\n */\n constructor(options, body, labelModule) {\n super(options, body, labelModule);\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {boolean} [selected]\n * @param {boolean} [hover]\n */\n resize(ctx, selected = this.selected, hover = this.hover) {\n if (this.needsRefresh(selected, hover)) {\n var dimensions = this.getDimensionsFromLabel(ctx, selected, hover);\n\n this.height = dimensions.height * 2;\n this.width = dimensions.width + dimensions.height;\n this.radius = 0.5*this.width;\n }\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} x width\n * @param {number} y height\n * @param {boolean} selected\n * @param {boolean} hover\n * @param {ArrowOptions} values\n */\n draw(ctx, x, y, selected, hover, values) {\n this.resize(ctx, selected, hover);\n this.left = x - this.width * 0.5;\n this.top = y - this.height * 0.5;\n\n this.initContextForDraw(ctx, values);\n ctx.ellipse_vis(this.left, this.top, this.width, this.height);\n this.performFill(ctx, values);\n\n this.updateBoundingBox(x, y, ctx, selected, hover);\n this.labelModule.draw(ctx, x, y, selected, hover);\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} angle\n * @returns {number}\n */\n distanceToBorder(ctx, angle) {\n this.resize(ctx);\n var a = this.width * 0.5;\n var b = this.height * 0.5;\n var w = (Math.sin(angle) * a);\n var h = (Math.cos(angle) * b);\n return a * b / Math.sqrt(w * w + h * h);\n }\n}\n\nexport default Ellipse;\n","'use strict';\n\nimport NodeBase from '../util/NodeBase'\n\n/**\n * An icon replacement for the default Node shape.\n *\n * @extends NodeBase\n */\nclass Icon extends NodeBase {\n /**\n * @param {Object} options\n * @param {Object} body\n * @param {Label} labelModule\n */\n constructor(options, body, labelModule) {\n super(options, body, labelModule);\n this._setMargins(labelModule);\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx - Unused.\n * @param {boolean} [selected]\n * @param {boolean} [hover]\n */\n resize(ctx, selected, hover) {\n if (this.needsRefresh(selected, hover)) {\n this.iconSize = {\n width: Number(this.options.icon.size),\n height: Number(this.options.icon.size)\n };\n this.width = this.iconSize.width + this.margin.right + this.margin.left;\n this.height = this.iconSize.height + this.margin.top + this.margin.bottom;\n this.radius = 0.5*this.width;\n }\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} x width\n * @param {number} y height\n * @param {boolean} selected\n * @param {boolean} hover\n * @param {ArrowOptions} values\n */\n draw(ctx, x, y, selected, hover, values) {\n this.resize(ctx, selected, hover);\n this.options.icon.size = this.options.icon.size || 50;\n\n this.left = x - this.width / 2;\n this.top = y - this.height / 2;\n this._icon(ctx, x, y, selected, hover, values);\n\n if (this.options.label !== undefined) {\n var iconTextSpacing = 5;\n this.labelModule.draw(ctx, this.left + this.iconSize.width / 2 + this.margin.left,\n y + this.height / 2 + iconTextSpacing, selected);\n }\n\n this.updateBoundingBox(x, y)\n }\n\n /**\n *\n * @param {number} x\n * @param {number} y\n */\n updateBoundingBox(x, y) {\n this.boundingBox.top = y - this.options.icon.size * 0.5;\n this.boundingBox.left = x - this.options.icon.size * 0.5;\n this.boundingBox.right = x + this.options.icon.size * 0.5;\n this.boundingBox.bottom = y + this.options.icon.size * 0.5;\n\n if (this.options.label !== undefined && this.labelModule.size.width > 0) {\n var iconTextSpacing = 5;\n this.boundingBox.left = Math.min(this.boundingBox.left, this.labelModule.size.left);\n this.boundingBox.right = Math.max(this.boundingBox.right, this.labelModule.size.left + this.labelModule.size.width);\n this.boundingBox.bottom = Math.max(this.boundingBox.bottom, this.boundingBox.bottom + this.labelModule.size.height + iconTextSpacing);\n }\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} x width\n * @param {number} y height\n * @param {boolean} selected\n * @param {boolean} hover - Unused\n * @param {ArrowOptions} values\n */\n _icon(ctx, x, y, selected, hover, values) {\n let iconSize = Number(this.options.icon.size);\n\n if (this.options.icon.code !== undefined) {\n ctx.font = (selected ? \"bold \" : \"\") + iconSize + \"px \" + this.options.icon.face;\n\n // draw icon\n ctx.fillStyle = this.options.icon.color || \"black\";\n ctx.textAlign = \"center\";\n ctx.textBaseline = \"middle\";\n\n // draw shadow if enabled\n this.enableShadow(ctx, values);\n ctx.fillText(this.options.icon.code, x, y);\n\n // disable shadows for other elements.\n this.disableShadow(ctx, values);\n } else {\n console.error('When using the icon shape, you need to define the code in the icon options object. This can be done per node or globally.')\n }\n\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} angle\n * @returns {number}\n */\n distanceToBorder(ctx, angle) {\n return this._distanceToBorder(ctx,angle);\n }\n}\n\nexport default Icon;\n","'use strict';\n\nimport CircleImageBase from '../util/CircleImageBase'\n\n\n/**\n * An image-based replacement for the default Node shape.\n *\n * @extends CircleImageBase\n */\nclass Image extends CircleImageBase {\n /**\n * @param {Object} options\n * @param {Object} body\n * @param {Label} labelModule\n * @param {Image} imageObj\n * @param {Image} imageObjAlt\n */\n constructor (options, body, labelModule, imageObj, imageObjAlt) {\n super(options, body, labelModule);\n\n this.setImages(imageObj, imageObjAlt);\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx - Unused.\n * @param {boolean} [selected]\n * @param {boolean} [hover]\n */\n resize(ctx, selected = this.selected, hover = this.hover) {\n var imageAbsent = (this.imageObj.src === undefined) ||\n (this.imageObj.width === undefined) ||\n (this.imageObj.height === undefined);\n\n if (imageAbsent) {\n var side = this.options.size * 2;\n this.width = side;\n this.height = side;\n return;\n }\n\n if (this.needsRefresh(selected, hover)) {\n this._resizeImage();\n }\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} x width\n * @param {number} y height\n * @param {boolean} selected\n * @param {boolean} hover\n * @param {ArrowOptions} values\n */\n draw(ctx, x, y, selected, hover, values) {\n this.switchImages(selected);\n this.resize();\n this.left = x - this.width / 2;\n this.top = y - this.height / 2;\n\n if (this.options.shapeProperties.useBorderWithImage === true) {\n var neutralborderWidth = this.options.borderWidth;\n var selectionLineWidth = this.options.borderWidthSelected || 2 * this.options.borderWidth;\n var borderWidth = (selected ? selectionLineWidth : neutralborderWidth) / this.body.view.scale;\n ctx.lineWidth = Math.min(this.width, borderWidth);\n\n ctx.beginPath();\n\n // setup the line properties.\n ctx.strokeStyle = selected ? this.options.color.highlight.border : hover ? this.options.color.hover.border : this.options.color.border;\n\n // set a fillstyle\n ctx.fillStyle = selected ? this.options.color.highlight.background : hover ? this.options.color.hover.background : this.options.color.background;\n\n // draw a rectangle to form the border around. This rectangle is filled so the opacity of a picture (in future vis releases?) can be used to tint the image\n ctx.rect(this.left - 0.5 * ctx.lineWidth,\n this.top - 0.5 * ctx.lineWidth,\n this.width + ctx.lineWidth,\n this.height + ctx.lineWidth);\n ctx.fill();\n\n this.performStroke(ctx, values);\n \n ctx.closePath();\n }\n\n this._drawImageAtPosition(ctx, values);\n\n this._drawImageLabel(ctx, x, y, selected, hover);\n\n this.updateBoundingBox(x,y);\n }\n\n /**\n *\n * @param {number} x\n * @param {number} y\n */\n updateBoundingBox(x, y) {\n this.resize();\n this._updateBoundingBox(x, y);\n\n if (this.options.label !== undefined && this.labelModule.size.width > 0) {\n this.boundingBox.left = Math.min(this.boundingBox.left, this.labelModule.size.left);\n this.boundingBox.right = Math.max(this.boundingBox.right, this.labelModule.size.left + this.labelModule.size.width);\n this.boundingBox.bottom = Math.max(this.boundingBox.bottom, this.boundingBox.bottom + this.labelOffset);\n }\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} angle\n * @returns {number}\n */\n distanceToBorder(ctx, angle) {\n return this._distanceToBorder(ctx,angle);\n }\n}\n\nexport default Image;\n","'use strict';\n\nimport ShapeBase from '../util/ShapeBase'\n\n/**\n * A Square Node/Cluster shape.\n *\n * @extends ShapeBase\n */\nclass Square extends ShapeBase {\n /**\n * @param {Object} options\n * @param {Object} body\n * @param {Label} labelModule\n */\n constructor(options, body, labelModule) {\n super(options, body, labelModule)\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} x width\n * @param {number} y height\n * @param {boolean} selected\n * @param {boolean} hover\n * @param {ArrowOptions} values\n */\n draw(ctx, x, y, selected, hover, values) {\n this._drawShape(ctx, 'square', 2, x, y, selected, hover, values);\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} angle\n * @returns {number}\n */\n distanceToBorder(ctx, angle) {\n return this._distanceToBorder(ctx,angle);\n }\n}\n\nexport default Square;\n","'use strict';\n\nimport ShapeBase from '../util/ShapeBase'\n\n/**\n * A Hexagon Node/Cluster shape.\n *\n * @extends ShapeBase\n */\nclass Hexagon extends ShapeBase {\n /**\n * @param {Object} options\n * @param {Object} body\n * @param {Label} labelModule\n */\n constructor(options, body, labelModule) {\n super(options, body, labelModule)\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} x width\n * @param {number} y height\n * @param {boolean} selected\n * @param {boolean} hover\n * @param {ArrowOptions} values\n */\n draw(ctx, x, y, selected, hover, values) {\n this._drawShape(ctx, 'hexagon', 4, x, y, selected, hover, values);\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} angle\n * @returns {number}\n */\n distanceToBorder(ctx, angle) {\n return this._distanceToBorder(ctx,angle);\n }\n}\n\nexport default Hexagon;\n","'use strict';\n\nimport ShapeBase from '../util/ShapeBase'\n\n/**\n * A Star Node/Cluster shape.\n *\n * @extends ShapeBase\n */\nclass Star extends ShapeBase {\n /**\n * @param {Object} options\n * @param {Object} body\n * @param {Label} labelModule\n */\n constructor(options, body, labelModule) {\n super(options, body, labelModule)\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} x width\n * @param {number} y height\n * @param {boolean} selected\n * @param {boolean} hover\n * @param {ArrowOptions} values\n */\n draw(ctx, x, y, selected, hover, values) {\n this._drawShape(ctx, 'star', 4, x, y, selected, hover, values);\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} angle\n * @returns {number}\n */\n distanceToBorder(ctx, angle) {\n return this._distanceToBorder(ctx,angle);\n }\n}\n\nexport default Star;\n","'use strict';\n\nimport NodeBase from '../util/NodeBase'\n\n/**\n * A text-based replacement for the default Node shape.\n *\n * @extends NodeBase\n */\nclass Text extends NodeBase {\n /**\n * @param {Object} options\n * @param {Object} body\n * @param {Label} labelModule\n */\n constructor(options, body, labelModule) {\n super(options, body, labelModule);\n this._setMargins(labelModule);\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {boolean} selected\n * @param {boolean} hover\n */\n resize(ctx, selected, hover) {\n if (this.needsRefresh(selected, hover)) {\n this.textSize = this.labelModule.getTextSize(ctx, selected, hover);\n this.width = this.textSize.width + this.margin.right + this.margin.left;\n this.height = this.textSize.height + this.margin.top + this.margin.bottom;\n this.radius = 0.5*this.width;\n }\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} x width\n * @param {number} y height\n * @param {boolean} selected\n * @param {boolean} hover\n * @param {ArrowOptions} values\n */\n draw(ctx, x, y, selected, hover, values) {\n this.resize(ctx, selected, hover);\n this.left = x - this.width / 2;\n this.top = y - this.height / 2;\n\n // draw shadow if enabled\n this.enableShadow(ctx, values);\n this.labelModule.draw(ctx, this.left + this.textSize.width / 2 + this.margin.left,\n this.top + this.textSize.height / 2 + this.margin.top, selected, hover);\n\n // disable shadows for other elements.\n this.disableShadow(ctx, values);\n\n this.updateBoundingBox(x, y, ctx, selected, hover);\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} angle\n * @returns {number}\n */\n distanceToBorder(ctx, angle) {\n return this._distanceToBorder(ctx,angle);\n }\n}\n\nexport default Text;\n","'use strict';\n\nimport ShapeBase from '../util/ShapeBase'\n\n/**\n * A Triangle Node/Cluster shape.\n *\n * @extends ShapeBase\n */\nclass Triangle extends ShapeBase {\n /**\n * @param {Object} options\n * @param {Object} body\n * @param {Label} labelModule\n */\n constructor(options, body, labelModule) {\n super(options, body, labelModule)\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} x\n * @param {number} y\n * @param {boolean} selected\n * @param {boolean} hover\n * @param {ArrowOptions} values\n */\n draw(ctx, x, y, selected, hover, values) {\n this._drawShape(ctx, 'triangle', 3, x, y, selected, hover, values);\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} angle\n * @returns {number}\n */\n distanceToBorder(ctx, angle) {\n return this._distanceToBorder(ctx,angle);\n }\n}\n\nexport default Triangle;\n","'use strict';\n\nimport ShapeBase from '../util/ShapeBase'\n\n/**\n * A downward facing Triangle Node/Cluster shape.\n *\n * @extends ShapeBase\n */\nclass TriangleDown extends ShapeBase {\n /**\n * @param {Object} options\n * @param {Object} body\n * @param {Label} labelModule\n */\n constructor(options, body, labelModule) {\n super(options, body, labelModule)\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} x\n * @param {number} y\n * @param {boolean} selected\n * @param {boolean} hover\n * @param {ArrowOptions} values\n */\n draw(ctx, x, y, selected, hover, values) {\n this._drawShape(ctx, 'triangleDown', 3, x, y, selected, hover, values);\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} angle\n * @returns {number}\n */\n distanceToBorder(ctx, angle) {\n return this._distanceToBorder(ctx,angle);\n }\n}\n\nexport default TriangleDown;\n","import util from 'vis-util';\n\nlet errorFound = false;\nlet allOptions;\nlet printStyle = 'background: #FFeeee; color: #dd0000';\n/**\n * Used to validate options.\n */\nclass Validator {\n /**\n * @ignore\n */\n constructor() {\n }\n\n /**\n * Main function to be called\n * @param {Object} options\n * @param {Object} referenceOptions\n * @param {Object} subObject\n * @returns {boolean}\n * @static\n */\n static validate(options, referenceOptions, subObject) {\n errorFound = false;\n allOptions = referenceOptions;\n let usedOptions = referenceOptions;\n if (subObject !== undefined) {\n usedOptions = referenceOptions[subObject];\n }\n Validator.parse(options, usedOptions, []);\n return errorFound;\n }\n\n\n /**\n * Will traverse an object recursively and check every value\n * @param {Object} options\n * @param {Object} referenceOptions\n * @param {array} path | where to look for the actual option\n * @static\n */\n static parse(options, referenceOptions, path) {\n for (let option in options) {\n if (options.hasOwnProperty(option)) {\n Validator.check(option, options, referenceOptions, path);\n }\n }\n }\n\n\n /**\n * Check every value. If the value is an object, call the parse function on that object.\n * @param {string} option\n * @param {Object} options\n * @param {Object} referenceOptions\n * @param {array} path | where to look for the actual option\n * @static\n */\n static check(option, options, referenceOptions, path) {\n if (referenceOptions[option] === undefined && referenceOptions.__any__ === undefined) {\n Validator.getSuggestion(option, referenceOptions, path);\n return;\n }\n\n let referenceOption = option;\n let is_object = true;\n\n if (referenceOptions[option] === undefined && referenceOptions.__any__ !== undefined) {\n // NOTE: This only triggers if the __any__ is in the top level of the options object.\n // THAT'S A REALLY BAD PLACE TO ALLOW IT!!!!\n // TODO: Examine if needed, remove if possible\n\n // __any__ is a wildcard. Any value is accepted and will be further analysed by reference.\n referenceOption = '__any__';\n\n // if the any-subgroup is not a predefined object in the configurator,\n // we do not look deeper into the object.\n is_object = (Validator.getType(options[option]) === 'object');\n }\n else {\n // Since all options in the reference are objects, we can check whether \n // they are supposed to be the object to look for the __type__ field.\n // if this is an object, we check if the correct type has been supplied to account for shorthand options.\n }\n\n let refOptionObj = referenceOptions[referenceOption];\n if (is_object && refOptionObj.__type__ !== undefined) {\n refOptionObj = refOptionObj.__type__;\n }\n\n Validator.checkFields(option, options, referenceOptions, referenceOption, refOptionObj, path);\n }\n\n /**\n *\n * @param {string} option | the option property\n * @param {Object} options | The supplied options object\n * @param {Object} referenceOptions | The reference options containing all options and their allowed formats\n * @param {string} referenceOption | Usually this is the same as option, except when handling an __any__ tag.\n * @param {string} refOptionObj | This is the type object from the reference options\n * @param {Array} path | where in the object is the option\n * @static\n */\n static checkFields(option, options, referenceOptions, referenceOption, refOptionObj, path) {\n let log = function(message) {\n console.log('%c' + message + Validator.printLocation(path, option), printStyle);\n };\n\n let optionType = Validator.getType(options[option]);\n let refOptionType = refOptionObj[optionType];\n\n if (refOptionType !== undefined) {\n // if the type is correct, we check if it is supposed to be one of a few select values\n if (Validator.getType(refOptionType) === 'array' && refOptionType.indexOf(options[option]) === -1) {\n log('Invalid option detected in \"' + option + '\".' +\n ' Allowed values are:' + Validator.print(refOptionType) +\n ' not \"' + options[option] + '\". ');\n errorFound = true;\n }\n else if (optionType === 'object' && referenceOption !== \"__any__\") {\n path = util.copyAndExtendArray(path, option);\n Validator.parse(options[option], referenceOptions[referenceOption], path);\n }\n }\n else if (refOptionObj['any'] === undefined) {\n // type of the field is incorrect and the field cannot be any\n log('Invalid type received for \"' + option +\n '\". Expected: ' + Validator.print(Object.keys(refOptionObj)) +\n '. Received [' + optionType + '] \"' + options[option] + '\"');\n errorFound = true;\n }\n }\n\n /**\n *\n * @param {Object|boolean|number|string|Array.|Date|Node|Moment|undefined|null} object\n * @returns {string}\n * @static\n */\n static getType(object) {\n var type = typeof object;\n\n if (type === 'object') {\n if (object === null) {\n return 'null';\n }\n if (object instanceof Boolean) {\n return 'boolean';\n }\n if (object instanceof Number) {\n return 'number';\n }\n if (object instanceof String) {\n return 'string';\n }\n if (Array.isArray(object)) {\n return 'array';\n }\n if (object instanceof Date) {\n return 'date';\n }\n if (object.nodeType !== undefined) {\n return 'dom';\n }\n if (object._isAMomentObject === true) {\n return 'moment';\n }\n return 'object';\n }\n else if (type === 'number') {\n return 'number';\n }\n else if (type === 'boolean') {\n return 'boolean';\n }\n else if (type === 'string') {\n return 'string';\n }\n else if (type === undefined) {\n return 'undefined';\n }\n return type;\n }\n\n /**\n * @param {string} option\n * @param {Object} options\n * @param {Array.} path\n * @static\n */\n static getSuggestion(option, options, path) {\n let localSearch = Validator.findInOptions(option,options,path,false);\n let globalSearch = Validator.findInOptions(option,allOptions,[],true);\n\n let localSearchThreshold = 8;\n let globalSearchThreshold = 4;\n\n let msg;\n if (localSearch.indexMatch !== undefined) {\n msg = ' in ' + Validator.printLocation(localSearch.path, option,'') +\n 'Perhaps it was incomplete? Did you mean: \"' + localSearch.indexMatch + '\"?\\n\\n';\n }\n else if (globalSearch.distance <= globalSearchThreshold && localSearch.distance > globalSearch.distance) {\n msg = ' in ' + Validator.printLocation(localSearch.path, option,'') +\n 'Perhaps it was misplaced? Matching option found at: ' +\n Validator.printLocation(globalSearch.path, globalSearch.closestMatch,'');\n }\n else if (localSearch.distance <= localSearchThreshold) {\n msg = '. Did you mean \"' + localSearch.closestMatch + '\"?' +\n Validator.printLocation(localSearch.path, option);\n }\n else {\n msg = '. Did you mean one of these: ' + Validator.print(Object.keys(options)) +\n Validator.printLocation(path, option);\n }\n\n console.log('%cUnknown option detected: \"' + option + '\"' + msg, printStyle);\n errorFound = true;\n }\n\n /**\n * traverse the options in search for a match.\n * @param {string} option\n * @param {Object} options\n * @param {Array} path | where to look for the actual option\n * @param {boolean} [recursive=false]\n * @returns {{closestMatch: string, path: Array, distance: number}}\n * @static\n */\n static findInOptions(option, options, path, recursive = false) {\n let min = 1e9;\n let closestMatch = '';\n let closestMatchPath = [];\n let lowerCaseOption = option.toLowerCase();\n let indexMatch = undefined;\n for (let op in options) { // eslint-disable-line guard-for-in\n let distance;\n if (options[op].__type__ !== undefined && recursive === true) {\n let result = Validator.findInOptions(option, options[op], util.copyAndExtendArray(path,op));\n if (min > result.distance) {\n closestMatch = result.closestMatch;\n closestMatchPath = result.path;\n min = result.distance;\n indexMatch = result.indexMatch;\n }\n }\n else {\n if (op.toLowerCase().indexOf(lowerCaseOption) !== -1) {\n indexMatch = op;\n }\n distance = Validator.levenshteinDistance(option, op);\n if (min > distance) {\n closestMatch = op;\n closestMatchPath = util.copyArray(path);\n min = distance;\n }\n }\n }\n return {closestMatch:closestMatch, path:closestMatchPath, distance:min, indexMatch: indexMatch};\n }\n\n /**\n * @param {Array.} path\n * @param {Object} option\n * @param {string} prefix\n * @returns {String}\n * @static\n */\n static printLocation(path, option, prefix = 'Problem value found at: \\n') {\n let str = '\\n\\n' + prefix + 'options = {\\n';\n for (let i = 0; i < path.length; i++) {\n for (let j = 0; j < i + 1; j++) {\n str += ' ';\n }\n str += path[i] + ': {\\n'\n }\n for (let j = 0; j < path.length + 1; j++) {\n str += ' ';\n }\n str += option + '\\n';\n for (let i = 0; i < path.length + 1; i++) {\n for (let j = 0; j < path.length - i; j++) {\n str += ' ';\n }\n str += '}\\n'\n }\n return str + '\\n\\n';\n }\n\n /**\n * @param {Object} options\n * @returns {String}\n * @static\n */\n static print(options) {\n return JSON.stringify(options).replace(/(\\\")|(\\[)|(\\])|(,\"__type__\")/g, \"\").replace(/(\\,)/g, ', ')\n }\n\n\n /**\n * Compute the edit distance between the two given strings\n * http://en.wikibooks.org/wiki/Algorithm_Implementation/Strings/Levenshtein_distance#JavaScript\n *\n * Copyright (c) 2011 Andrei Mackenzie\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n *\n * @param {string} a\n * @param {string} b\n * @returns {Array.>}}\n * @static\n */\n static levenshteinDistance(a, b) {\n if (a.length === 0) return b.length;\n if (b.length === 0) return a.length;\n\n var matrix = [];\n\n // increment along the first column of each row\n var i;\n for (i = 0; i <= b.length; i++) {\n matrix[i] = [i];\n }\n\n // increment each column in the first row\n var j;\n for (j = 0; j <= a.length; j++) {\n matrix[0][j] = j;\n }\n\n // Fill in the rest of the matrix\n for (i = 1; i <= b.length; i++) {\n for (j = 1; j <= a.length; j++) {\n if (b.charAt(i - 1) == a.charAt(j - 1)) {\n matrix[i][j] = matrix[i - 1][j - 1];\n } else {\n matrix[i][j] = Math.min(matrix[i - 1][j - 1] + 1, // substitution\n Math.min(matrix[i][j - 1] + 1, // insertion\n matrix[i - 1][j] + 1)); // deletion\n }\n }\n }\n\n return matrix[b.length][a.length];\n }\n}\n\n\nexport {\n Validator,\n printStyle\n};\n","import util from 'vis-util';\n\nimport Label from './shared/Label';\nimport ComponentUtil from './shared/ComponentUtil';\nimport Box from './nodes/shapes/Box';\nimport Circle from './nodes/shapes/Circle';\nimport CircularImage from './nodes/shapes/CircularImage';\nimport Database from './nodes/shapes/Database';\nimport Diamond from './nodes/shapes/Diamond';\nimport Dot from './nodes/shapes/Dot';\nimport Ellipse from './nodes/shapes/Ellipse';\nimport Icon from './nodes/shapes/Icon';\nimport Image from './nodes/shapes/Image';\nimport Square from './nodes/shapes/Square';\nimport Hexagon from './nodes/shapes/Hexagon';\nimport Star from './nodes/shapes/Star';\nimport Text from './nodes/shapes/Text';\nimport Triangle from './nodes/shapes/Triangle';\nimport TriangleDown from './nodes/shapes/TriangleDown';\nimport { printStyle } from \"../../../shared/Validator\";\n\n\n/**\n * A node. A node can be connected to other nodes via one or multiple edges.\n */\nclass Node {\n /**\n *\n * @param {object} options An object containing options for the node. All\n * options are optional, except for the id.\n * {number} id Id of the node. Required\n * {string} label Text label for the node\n * {number} x Horizontal position of the node\n * {number} y Vertical position of the node\n * {string} shape Node shape\n * {string} image An image url\n * {string} title A title text, can be HTML\n * {anytype} group A group name or number\n *\n * @param {Object} body Shared state of current network instance\n * @param {Network.Images} imagelist A list with images. Only needed when the node has an image\n * @param {Groups} grouplist A list with groups. Needed for retrieving group options\n * @param {Object} globalOptions Current global node options; these serve as defaults for the node instance\n * @param {Object} defaultOptions Global default options for nodes; note that this is also the prototype\n * for parameter `globalOptions`.\n */\n constructor(options, body, imagelist, grouplist, globalOptions, defaultOptions) {\n this.options = util.bridgeObject(globalOptions);\n this.globalOptions = globalOptions;\n this.defaultOptions = defaultOptions;\n this.body = body;\n\n this.edges = []; // all edges connected to this node\n\n // set defaults for the options\n this.id = undefined;\n this.imagelist = imagelist;\n this.grouplist = grouplist;\n\n // state options\n this.x = undefined;\n this.y = undefined;\n this.baseSize = this.options.size;\n this.baseFontSize = this.options.font.size;\n this.predefinedPosition = false; // used to check if initial fit should just take the range or approximate\n this.selected = false;\n this.hover = false;\n\n this.labelModule = new Label(this.body, this.options, false /* Not edge label */);\n this.setOptions(options);\n }\n\n\n /**\n * Attach a edge to the node\n * @param {Edge} edge\n */\n attachEdge(edge) {\n if (this.edges.indexOf(edge) === -1) {\n this.edges.push(edge);\n }\n }\n\n\n /**\n * Detach a edge from the node\n *\n * @param {Edge} edge\n */\n detachEdge(edge) {\n var index = this.edges.indexOf(edge);\n if (index != -1) {\n this.edges.splice(index, 1);\n }\n }\n\n\n /**\n * Set or overwrite options for the node\n *\n * @param {Object} options an object with options\n * @returns {null|boolean}\n */\n setOptions(options) {\n let currentShape = this.options.shape;\n if (!options) {\n return; // Note that the return value will be 'undefined'! This is OK.\n }\n\n // basic options\n if (options.id !== undefined) {this.id = options.id;}\n\n if (this.id === undefined) {\n throw new Error(\"Node must have an id\");\n }\n\n Node.checkMass(options, this.id);\n\n // set these options locally\n // clear x and y positions\n if (options.x !== undefined) {\n if (options.x === null) {this.x = undefined; this.predefinedPosition = false;}\n else {this.x = parseInt(options.x); this.predefinedPosition = true;}\n }\n if (options.y !== undefined) {\n if (options.y === null) {this.y = undefined; this.predefinedPosition = false;}\n else {this.y = parseInt(options.y); this.predefinedPosition = true;}\n }\n if (options.size !== undefined) {this.baseSize = options.size;}\n if (options.value !== undefined) {options.value = parseFloat(options.value);}\n\n // this transforms all shorthands into fully defined options\n Node.parseOptions(this.options, options, true, this.globalOptions, this.grouplist);\n\n let pile = [options, this.options, this.defaultOptions];\n this.chooser = ComponentUtil.choosify('node', pile);\n\n this._load_images();\n this.updateLabelModule(options);\n this.updateShape(currentShape);\n\n return (options.hidden !== undefined || options.physics !== undefined);\n }\n\n\n /**\n * Load the images from the options, for the nodes that need them.\n *\n * Images are always loaded, even if they are not used in the current shape.\n * The user may switch to an image shape later on.\n *\n * @private\n */\n _load_images() {\n if (this.options.shape === 'circularImage' || this.options.shape === 'image') {\n if (this.options.image === undefined) {\n throw new Error(\"Option image must be defined for node type '\" + this.options.shape + \"'\");\n }\n }\n\n if (this.options.image === undefined) {\n return;\n }\n\n if (this.imagelist === undefined) {\n throw new Error(\"Internal Error: No images provided\");\n }\n\n if (typeof this.options.image === 'string') {\n this.imageObj = this.imagelist.load(this.options.image, this.options.brokenImage, this.id);\n } else {\n if (this.options.image.unselected === undefined) {\n throw new Error(\"No unselected image provided\");\n }\n\n this.imageObj = this.imagelist.load(this.options.image.unselected, this.options.brokenImage, this.id);\n\n if (this.options.image.selected !== undefined) {\n this.imageObjAlt = this.imagelist.load(this.options.image.selected, this.options.brokenImage, this.id);\n } else {\n this.imageObjAlt = undefined;\n }\n }\n }\n\n\n /**\n * Copy group option values into the node options.\n *\n * The group options override the global node options, so the copy of group options\n * must happen *after* the global node options have been set.\n *\n * This method must also be called also if the global node options have changed and the group options did not.\n *\n * @param {Object} parentOptions\n * @param {Object} newOptions new values for the options, currently only passed in for check\n * @param {Object} groupList\n */\n static updateGroupOptions(parentOptions, newOptions, groupList) {\n if (groupList === undefined) return; // No groups, nothing to do\n\n var group = parentOptions.group;\n\n // paranoia: the selected group is already merged into node options, check.\n if (newOptions !== undefined && newOptions.group !== undefined && group !== newOptions.group) {\n throw new Error(\"updateGroupOptions: group values in options don't match.\");\n }\n\n var hasGroup = (typeof group === 'number' || (typeof group === 'string' && group != ''));\n if (!hasGroup) return; // current node has no group, no need to merge\n\n var groupObj = groupList.get(group);\n\n // Skip merging of group font options into parent; these are required to be distinct for labels\n // Also skip mergin of color IF it is already defined in the node itself. This is to avoid the color of the\n // group overriding the color set at the node level\n // TODO: It might not be a good idea either to merge the rest of the options, investigate this.\n var skipProperties = ['font'];\n if (newOptions !== undefined && newOptions.color !== undefined && newOptions.color != null) skipProperties.push('color');\n util.selectiveNotDeepExtend(skipProperties, parentOptions, groupObj);\n\n // the color object needs to be completely defined.\n // Since groups can partially overwrite the colors, we parse it again, just in case.\n parentOptions.color = util.parseColor(parentOptions.color);\n }\n\n\n /**\n * This process all possible shorthands in the new options and makes sure that the parentOptions are fully defined.\n * Static so it can also be used by the handler.\n *\n * @param {Object} parentOptions\n * @param {Object} newOptions\n * @param {boolean} [allowDeletion=false]\n * @param {Object} [globalOptions={}]\n * @param {Object} [groupList]\n * @static\n */\n static parseOptions(parentOptions, newOptions, allowDeletion = false, globalOptions = {}, groupList) {\n\n var fields = [\n 'color',\n 'fixed',\n 'shadow'\n ];\n util.selectiveNotDeepExtend(fields, parentOptions, newOptions, allowDeletion);\n\n Node.checkMass(newOptions);\n\n // merge the shadow options into the parent.\n util.mergeOptions(parentOptions, newOptions, 'shadow', globalOptions);\n\n // individual shape newOptions\n if (newOptions.color !== undefined && newOptions.color !== null) {\n let parsedColor = util.parseColor(newOptions.color);\n util.fillIfDefined(parentOptions.color, parsedColor);\n }\n else if (allowDeletion === true && newOptions.color === null) {\n parentOptions.color = util.bridgeObject(globalOptions.color); // set the object back to the global options\n }\n\n // handle the fixed options\n if (newOptions.fixed !== undefined && newOptions.fixed !== null) {\n if (typeof newOptions.fixed === 'boolean') {\n parentOptions.fixed.x = newOptions.fixed;\n parentOptions.fixed.y = newOptions.fixed;\n }\n else {\n if (newOptions.fixed.x !== undefined && typeof newOptions.fixed.x === 'boolean') {\n parentOptions.fixed.x = newOptions.fixed.x;\n }\n if (newOptions.fixed.y !== undefined && typeof newOptions.fixed.y === 'boolean') {\n parentOptions.fixed.y = newOptions.fixed.y;\n }\n }\n }\n\n if (allowDeletion === true && newOptions.font === null) {\n parentOptions.font = util.bridgeObject(globalOptions.font); // set the object back to the global options\n }\n\n Node.updateGroupOptions(parentOptions, newOptions, groupList);\n\n // handle the scaling options, specifically the label part\n if (newOptions.scaling !== undefined) {\n util.mergeOptions(parentOptions.scaling, newOptions.scaling, 'label', globalOptions.scaling);\n }\n }\n\n\n /**\n *\n * @returns {{color: *, borderWidth: *, borderColor: *, size: *, borderDashes: (boolean|Array|allOptions.nodes.shapeProperties.borderDashes|{boolean, array}), borderRadius: (number|allOptions.nodes.shapeProperties.borderRadius|{number}|Array), shadow: *, shadowColor: *, shadowSize: *, shadowX: *, shadowY: *}}\n */\n getFormattingValues() {\n let values = {\n color: this.options.color.background,\n borderWidth: this.options.borderWidth,\n borderColor: this.options.color.border,\n size: this.options.size,\n borderDashes: this.options.shapeProperties.borderDashes,\n borderRadius: this.options.shapeProperties.borderRadius,\n shadow: this.options.shadow.enabled,\n shadowColor: this.options.shadow.color,\n shadowSize: this.options.shadow.size,\n shadowX: this.options.shadow.x,\n shadowY: this.options.shadow.y\n };\n if (this.selected || this.hover) {\n if (this.chooser === true) {\n if (this.selected) {\n values.borderWidth *= 2;\n values.color = this.options.color.highlight.background;\n values.borderColor = this.options.color.highlight.border;\n values.shadow = this.options.shadow.enabled;\n } else if (this.hover) {\n values.color = this.options.color.hover.background;\n values.borderColor = this.options.color.hover.border;\n values.shadow = this.options.shadow.enabled;\n }\n } else if (typeof this.chooser === 'function') {\n this.chooser(values, this.options.id, this.selected, this.hover);\n if (values.shadow === false) {\n if ((values.shadowColor !== this.options.shadow.color) ||\n (values.shadowSize !== this.options.shadow.size) ||\n (values.shadowX !== this.options.shadow.x) ||\n (values.shadowY !== this.options.shadow.y)) {\n values.shadow = true;\n }\n }\n }\n } else {\n values.shadow = this.options.shadow.enabled;\n }\n return values;\n }\n\n\n /**\n *\n * @param {Object} options\n */\n updateLabelModule(options) {\n if (this.options.label === undefined || this.options.label === null) {\n this.options.label = '';\n }\n\n Node.updateGroupOptions(this.options, options, this.grouplist);\n\n //\n // Note:The prototype chain for this.options is:\n //\n // this.options -> NodesHandler.options -> NodesHandler.defaultOptions\n // (also: this.globalOptions)\n //\n // Note that the prototypes are mentioned explicitly in the pile list below;\n // WE DON'T WANT THE ORDER OF THE PROTOTYPES!!!! At least, not for font handling of labels.\n // This is a good indication that the prototype usage of options is deficient.\n //\n var currentGroup = this.grouplist.get(this.options.group, false);\n let pile = [\n options, // new options\n this.options, // current node options, see comment above for prototype\n currentGroup, // group options, if any\n this.globalOptions, // Currently set global node options\n this.defaultOptions // Default global node options\n ];\n this.labelModule.update(this.options, pile);\n\n if (this.labelModule.baseSize !== undefined) {\n this.baseFontSize = this.labelModule.baseSize;\n }\n }\n\n\n /**\n *\n * @param {string} currentShape\n */\n updateShape(currentShape) {\n if (currentShape === this.options.shape && this.shape) {\n this.shape.setOptions(this.options, this.imageObj, this.imageObjAlt);\n }\n else {\n // choose draw method depending on the shape\n switch (this.options.shape) {\n case 'box':\n this.shape = new Box(this.options, this.body, this.labelModule);\n break;\n case 'circle':\n this.shape = new Circle(this.options, this.body, this.labelModule);\n break;\n case 'circularImage':\n this.shape = new CircularImage(this.options, this.body, this.labelModule, this.imageObj, this.imageObjAlt);\n break;\n case 'database':\n this.shape = new Database(this.options, this.body, this.labelModule);\n break;\n case 'diamond':\n this.shape = new Diamond(this.options, this.body, this.labelModule);\n break;\n case 'dot':\n this.shape = new Dot(this.options, this.body, this.labelModule);\n break;\n case 'ellipse':\n this.shape = new Ellipse(this.options, this.body, this.labelModule);\n break;\n case 'icon':\n this.shape = new Icon(this.options, this.body, this.labelModule);\n break;\n case 'image':\n this.shape = new Image(this.options, this.body, this.labelModule, this.imageObj, this.imageObjAlt);\n break;\n case 'square':\n this.shape = new Square(this.options, this.body, this.labelModule);\n break;\n case 'hexagon':\n this.shape = new Hexagon(this.options, this.body, this.labelModule);\n break;\n case 'star':\n this.shape = new Star(this.options, this.body, this.labelModule);\n break;\n case 'text':\n this.shape = new Text(this.options, this.body, this.labelModule);\n break;\n case 'triangle':\n this.shape = new Triangle(this.options, this.body, this.labelModule);\n break;\n case 'triangleDown':\n this.shape = new TriangleDown(this.options, this.body, this.labelModule);\n break;\n default:\n this.shape = new Ellipse(this.options, this.body, this.labelModule);\n break;\n }\n }\n this.needsRefresh();\n }\n\n\n /**\n * select this node\n */\n select() {\n this.selected = true;\n this.needsRefresh();\n }\n\n\n /**\n * unselect this node\n */\n unselect() {\n this.selected = false;\n this.needsRefresh();\n }\n\n\n\n /**\n * Reset the calculated size of the node, forces it to recalculate its size\n */\n needsRefresh() {\n this.shape.refreshNeeded = true;\n }\n\n\n /**\n * get the title of this node.\n * @return {string} title The title of the node, or undefined when no title\n * has been set.\n */\n getTitle() {\n return this.options.title;\n }\n\n\n /**\n * Calculate the distance to the border of the Node\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} angle Angle in radians\n * @returns {number} distance Distance to the border in pixels\n */\n distanceToBorder(ctx, angle) {\n return this.shape.distanceToBorder(ctx,angle);\n }\n\n\n /**\n * Check if this node has a fixed x and y position\n * @return {boolean} true if fixed, false if not\n */\n isFixed() {\n return (this.options.fixed.x && this.options.fixed.y);\n }\n\n\n /**\n * check if this node is selecte\n * @return {boolean} selected True if node is selected, else false\n */\n isSelected() {\n return this.selected;\n }\n\n\n /**\n * Retrieve the value of the node. Can be undefined\n * @return {number} value\n */\n getValue() {\n return this.options.value;\n }\n\n\n /**\n * Get the current dimensions of the label\n *\n * @return {rect}\n */\n getLabelSize() {\n return this.labelModule.size();\n }\n\n\n /**\n * Adjust the value range of the node. The node will adjust it's size\n * based on its value.\n * @param {number} min\n * @param {number} max\n * @param {number} total\n */\n setValueRange(min, max, total) {\n if (this.options.value !== undefined) {\n var scale = this.options.scaling.customScalingFunction(min, max, total, this.options.value);\n var sizeDiff = this.options.scaling.max - this.options.scaling.min;\n if (this.options.scaling.label.enabled === true) {\n var fontDiff = this.options.scaling.label.max - this.options.scaling.label.min;\n this.options.font.size = this.options.scaling.label.min + scale * fontDiff;\n }\n this.options.size = this.options.scaling.min + scale * sizeDiff;\n }\n else {\n this.options.size = this.baseSize;\n this.options.font.size = this.baseFontSize;\n }\n\n this.updateLabelModule();\n }\n\n\n /**\n * Draw this node in the given canvas\n * The 2d context of a HTML canvas can be retrieved by canvas.getContext(\"2d\");\n * @param {CanvasRenderingContext2D} ctx\n */\n draw(ctx) {\n let values = this.getFormattingValues();\n this.shape.draw(ctx, this.x, this.y, this.selected, this.hover, values);\n }\n\n\n /**\n * Update the bounding box of the shape\n * @param {CanvasRenderingContext2D} ctx\n */\n updateBoundingBox(ctx) {\n this.shape.updateBoundingBox(this.x,this.y,ctx);\n }\n\n\n /**\n * Recalculate the size of this node in the given canvas\n * The 2d context of a HTML canvas can be retrieved by canvas.getContext(\"2d\");\n * @param {CanvasRenderingContext2D} ctx\n */\n resize(ctx) {\n let values = this.getFormattingValues();\n this.shape.resize(ctx, this.selected, this.hover, values);\n }\n\n\n /**\n * Determine all visual elements of this node instance, in which the given\n * point falls within the bounding shape.\n *\n * @param {point} point\n * @returns {Array.} list with the items which are on the point\n */\n getItemsOnPoint(point) {\n var ret = [];\n\n if (this.labelModule.visible()) {\n if (ComponentUtil.pointInRect(this.labelModule.getSize(), point)) {\n ret.push({nodeId:this.id, labelId:0});\n }\n }\n\n if (ComponentUtil.pointInRect(this.shape.boundingBox, point)) {\n ret.push({nodeId:this.id});\n }\n\n return ret;\n }\n\n\n /**\n * Check if this object is overlapping with the provided object\n * @param {Object} obj an object with parameters left, top, right, bottom\n * @return {boolean} True if location is located on node\n */\n isOverlappingWith(obj) {\n return (\n this.shape.left < obj.right &&\n this.shape.left + this.shape.width > obj.left &&\n this.shape.top < obj.bottom &&\n this.shape.top + this.shape.height > obj.top\n );\n }\n\n\n /**\n * Check if this object is overlapping with the provided object\n * @param {Object} obj an object with parameters left, top, right, bottom\n * @return {boolean} True if location is located on node\n */\n isBoundingBoxOverlappingWith(obj) {\n return (\n this.shape.boundingBox.left < obj.right &&\n this.shape.boundingBox.right > obj.left &&\n this.shape.boundingBox.top < obj.bottom &&\n this.shape.boundingBox.bottom > obj.top\n );\n }\n\n\n /**\n * Check valid values for mass\n *\n * The mass may not be negative or zero. If it is, reset to 1\n *\n * @param {object} options\n * @param {Node.id} id\n * @static\n */\n static checkMass(options, id) {\n if (options.mass !== undefined && options.mass <= 0) {\n let strId = '';\n if (id !== undefined) {\n strId = ' in node id: ' + id;\n }\n console.log('%cNegative or zero mass disallowed' + strId +\n ', setting mass to 1.' , printStyle);\n options.mass = 1;\n }\n }\n}\n\nexport default Node;\n","import util from 'vis-util';\nimport { DataSet, DataView } from 'vis-data';\nimport Node from \"./components/Node\";\n\n/**\n * Handler for Nodes\n */\nclass NodesHandler {\n /**\n * @param {Object} body\n * @param {Images} images\n * @param {Array.} groups\n * @param {LayoutEngine} layoutEngine\n */\n constructor(body, images, groups, layoutEngine) {\n this.body = body;\n this.images = images;\n this.groups = groups;\n this.layoutEngine = layoutEngine;\n\n // create the node API in the body container\n this.body.functions.createNode = this.create.bind(this);\n\n this.nodesListeners = {\n add: (event, params) => { this.add(params.items); },\n update: (event, params) => { this.update(params.items, params.data, params.oldData); },\n remove: (event, params) => { this.remove(params.items); }\n };\n\n this.defaultOptions = {\n borderWidth: 1,\n borderWidthSelected: 2,\n brokenImage: undefined,\n color: {\n border: '#2B7CE9',\n background: '#97C2FC',\n highlight: {\n border: '#2B7CE9',\n background: '#D2E5FF'\n },\n hover: {\n border: '#2B7CE9',\n background: '#D2E5FF'\n }\n },\n fixed: {\n x: false,\n y: false\n },\n font: {\n color: '#343434',\n size: 14, // px\n face: 'arial',\n background: 'none',\n strokeWidth: 0, // px\n strokeColor: '#ffffff',\n align: 'center',\n vadjust: 0,\n multi: false,\n bold: {\n mod: 'bold'\n },\n boldital: {\n mod: 'bold italic'\n },\n ital: {\n mod: 'italic'\n },\n mono: {\n mod: '',\n size: 15, // px\n face: 'monospace',\n vadjust: 2\n }\n },\n group: undefined,\n hidden: false,\n icon: {\n face: 'FontAwesome', //'FontAwesome',\n code: undefined, //'\\uf007',\n size: 50, //50,\n color: '#2B7CE9' //'#aa00ff'\n },\n image: undefined, // --> URL\n label: undefined,\n labelHighlightBold: true,\n level: undefined,\n margin: {\n top: 5,\n right: 5,\n bottom: 5,\n left: 5\n },\n mass: 1,\n physics: true,\n scaling: {\n min: 10,\n max: 30,\n label: {\n enabled: false,\n min: 14,\n max: 30,\n maxVisible: 30,\n drawThreshold: 5\n },\n customScalingFunction: function (min, max, total, value) {\n if (max === min) {\n return 0.5;\n }\n else {\n let scale = 1 / (max - min);\n return Math.max(0, (value - min) * scale);\n }\n }\n },\n shadow: {\n enabled: false,\n color: 'rgba(0,0,0,0.5)',\n size: 10,\n x: 5,\n y: 5\n },\n shape: 'ellipse',\n shapeProperties: {\n borderDashes: false, // only for borders\n borderRadius: 6, // only for box shape\n interpolation: true, // only for image and circularImage shapes\n useImageSize: false, // only for image and circularImage shapes\n useBorderWithImage: false // only for image shape\n },\n size: 25,\n title: undefined,\n value: undefined,\n x: undefined,\n y: undefined\n };\n\n // Protect from idiocy\n if (this.defaultOptions.mass <= 0) {\n throw 'Internal error: mass in defaultOptions of NodesHandler may not be zero or negative';\n }\n\n this.options = util.bridgeObject(this.defaultOptions);\n\n this.bindEventListeners();\n }\n\n /**\n * Binds event listeners\n */\n bindEventListeners() {\n // refresh the nodes. Used when reverting from hierarchical layout\n this.body.emitter.on('refreshNodes', this.refresh.bind(this));\n this.body.emitter.on('refresh', this.refresh.bind(this));\n this.body.emitter.on('destroy', () => {\n util.forEach(this.nodesListeners, (callback, event) => {\n if (this.body.data.nodes)\n this.body.data.nodes.off(event, callback);\n });\n delete this.body.functions.createNode;\n delete this.nodesListeners.add;\n delete this.nodesListeners.update;\n delete this.nodesListeners.remove;\n delete this.nodesListeners;\n });\n }\n\n /**\n *\n * @param {Object} options\n */\n setOptions(options) {\n if (options !== undefined) {\n Node.parseOptions(this.options, options);\n\n // update the shape in all nodes\n if (options.shape !== undefined) {\n for (let nodeId in this.body.nodes) {\n if (this.body.nodes.hasOwnProperty(nodeId)) {\n this.body.nodes[nodeId].updateShape();\n }\n }\n }\n\n // update the font in all nodes\n if (options.font !== undefined) {\n for (let nodeId in this.body.nodes) {\n if (this.body.nodes.hasOwnProperty(nodeId)) {\n this.body.nodes[nodeId].updateLabelModule();\n this.body.nodes[nodeId].needsRefresh();\n }\n }\n }\n\n // update the shape size in all nodes\n if (options.size !== undefined) {\n for (let nodeId in this.body.nodes) {\n if (this.body.nodes.hasOwnProperty(nodeId)) {\n this.body.nodes[nodeId].needsRefresh();\n }\n }\n }\n\n // update the state of the variables if needed\n if (options.hidden !== undefined || options.physics !== undefined) {\n this.body.emitter.emit('_dataChanged');\n }\n }\n }\n\n /**\n * Set a data set with nodes for the network\n * @param {Array | DataSet | DataView} nodes The data containing the nodes.\n * @param {boolean} [doNotEmit=false]\n * @private\n */\n setData(nodes, doNotEmit = false) {\n let oldNodesData = this.body.data.nodes;\n\n if (nodes instanceof DataSet || nodes instanceof DataView) {\n this.body.data.nodes = nodes;\n }\n else if (Array.isArray(nodes)) {\n this.body.data.nodes = new DataSet();\n this.body.data.nodes.add(nodes);\n }\n else if (!nodes) {\n this.body.data.nodes = new DataSet();\n }\n else {\n throw new TypeError('Array or DataSet expected');\n }\n\n if (oldNodesData) {\n // unsubscribe from old dataset\n util.forEach(this.nodesListeners, function (callback, event) {\n oldNodesData.off(event, callback);\n });\n }\n\n // remove drawn nodes\n this.body.nodes = {};\n\n if (this.body.data.nodes) {\n // subscribe to new dataset\n let me = this;\n util.forEach(this.nodesListeners, function (callback, event) {\n me.body.data.nodes.on(event, callback);\n });\n\n // draw all new nodes\n let ids = this.body.data.nodes.getIds();\n this.add(ids, true);\n }\n\n if (doNotEmit === false) {\n this.body.emitter.emit(\"_dataChanged\");\n }\n }\n\n\n /**\n * Add nodes\n * @param {number[] | string[]} ids\n * @param {boolean} [doNotEmit=false]\n * @private\n */\n add(ids, doNotEmit = false) {\n let id;\n let newNodes = [];\n for (let i = 0; i < ids.length; i++) {\n id = ids[i];\n let properties = this.body.data.nodes.get(id);\n let node = this.create(properties);\n newNodes.push(node);\n this.body.nodes[id] = node; // note: this may replace an existing node\n }\n\n this.layoutEngine.positionInitially(newNodes);\n\n if (doNotEmit === false) {\n this.body.emitter.emit(\"_dataChanged\");\n }\n }\n\n /**\n * Update existing nodes, or create them when not yet existing\n * @param {number[] | string[]} ids id's of changed nodes\n * @param {Array} changedData array with changed data\n * @param {Array|undefined} oldData optional; array with previous data\n * @private\n */\n update(ids, changedData, oldData) {\n let nodes = this.body.nodes;\n let dataChanged = false;\n for (let i = 0; i < ids.length; i++) {\n let id = ids[i];\n let node = nodes[id];\n let data = changedData[i];\n if (node !== undefined) {\n // update node\n if (node.setOptions(data)) {\n dataChanged = true;\n }\n }\n else {\n dataChanged = true;\n // create node\n node = this.create(data);\n nodes[id] = node;\n }\n }\n\n if (!dataChanged && oldData !== undefined) {\n // Check for any changes which should trigger a layout recalculation\n // For now, this is just 'level' for hierarchical layout\n // Assumption: old and new data arranged in same order; at time of writing, this holds.\n dataChanged = changedData.some(function(newValue, index) {\n let oldValue = oldData[index];\n return (oldValue && oldValue.level !== newValue.level);\n });\n }\n\n if (dataChanged === true) {\n this.body.emitter.emit(\"_dataChanged\");\n }\n else {\n this.body.emitter.emit(\"_dataUpdated\");\n }\n }\n\n /**\n * Remove existing nodes. If nodes do not exist, the method will just ignore it.\n * @param {number[] | string[]} ids\n * @private\n */\n remove(ids) {\n let nodes = this.body.nodes;\n\n for (let i = 0; i < ids.length; i++) {\n let id = ids[i];\n delete nodes[id];\n }\n\n this.body.emitter.emit(\"_dataChanged\");\n }\n\n\n /**\n * create a node\n * @param {Object} properties\n * @param {class} [constructorClass=Node.default]\n * @returns {*}\n */\n create(properties, constructorClass = Node) {\n return new constructorClass(properties, this.body, this.images, this.groups, this.options, this.defaultOptions)\n }\n\n\n /**\n *\n * @param {boolean} [clearPositions=false]\n */\n refresh(clearPositions = false) {\n util.forEach(this.body.nodes, (node, nodeId) => {\n let data = this.body.data.nodes.get(nodeId);\n if (data !== undefined) {\n if (clearPositions === true) {\n node.setOptions({x:null, y:null});\n }\n node.setOptions({ fixed: false });\n node.setOptions(data);\n }\n });\n }\n\n\n /**\n * Returns the positions of the nodes.\n * @param {Array.|String} [ids] --> optional, can be array of nodeIds, can be string\n * @returns {{}}\n */\n getPositions(ids) {\n let dataArray = {};\n if (ids !== undefined) {\n if (Array.isArray(ids) === true) {\n for (let i = 0; i < ids.length; i++) {\n if (this.body.nodes[ids[i]] !== undefined) {\n let node = this.body.nodes[ids[i]];\n dataArray[ids[i]] = { x: Math.round(node.x), y: Math.round(node.y) };\n }\n }\n }\n else {\n if (this.body.nodes[ids] !== undefined) {\n let node = this.body.nodes[ids];\n dataArray[ids] = { x: Math.round(node.x), y: Math.round(node.y) };\n }\n }\n }\n else {\n for (let i = 0; i < this.body.nodeIndices.length; i++) {\n let node = this.body.nodes[this.body.nodeIndices[i]];\n dataArray[this.body.nodeIndices[i]] = { x: Math.round(node.x), y: Math.round(node.y) };\n }\n }\n return dataArray;\n }\n\n\n /**\n * Load the XY positions of the nodes into the dataset.\n */\n storePositions() {\n // todo: add support for clusters and hierarchical.\n let dataArray = [];\n var dataset = this.body.data.nodes.getDataSet();\n\n for (let nodeId in dataset._data) {\n if (dataset._data.hasOwnProperty(nodeId)) {\n let node = this.body.nodes[nodeId];\n if (dataset._data[nodeId].x != Math.round(node.x) || dataset._data[nodeId].y != Math.round(node.y)) {\n dataArray.push({ id: node.id, x: Math.round(node.x), y: Math.round(node.y) });\n }\n }\n }\n dataset.update(dataArray);\n }\n\n /**\n * get the bounding box of a node.\n * @param {Node.id} nodeId\n * @returns {j|*}\n */\n getBoundingBox(nodeId) {\n if (this.body.nodes[nodeId] !== undefined) {\n return this.body.nodes[nodeId].shape.boundingBox;\n }\n }\n\n\n /**\n * Get the Ids of nodes connected to this node.\n * @param {Node.id} nodeId\n * @param {'to'|'from'|undefined} direction values 'from' and 'to' select respectively parent and child nodes only.\n * Any other value returns both parent and child nodes.\n * @returns {Array}\n */\n getConnectedNodes(nodeId, direction) {\n let nodeList = [];\n if (this.body.nodes[nodeId] !== undefined) {\n let node = this.body.nodes[nodeId];\n let nodeObj = {}; // used to quickly check if node already exists\n for (let i = 0; i < node.edges.length; i++) {\n let edge = node.edges[i];\n if (direction !== 'to' && edge.toId == node.id) { // these are double equals since ids can be numeric or string\n if (nodeObj[edge.fromId] === undefined) {\n nodeList.push(edge.fromId);\n nodeObj[edge.fromId] = true;\n }\n }\n else if (direction !== 'from' && edge.fromId == node.id) { // these are double equals since ids can be numeric or string\n if (nodeObj[edge.toId] === undefined) {\n nodeList.push(edge.toId);\n nodeObj[edge.toId] = true;\n }\n }\n }\n }\n return nodeList;\n }\n\n /**\n * Get the ids of the edges connected to this node.\n * @param {Node.id} nodeId\n * @returns {*}\n */\n getConnectedEdges(nodeId) {\n let edgeList = [];\n if (this.body.nodes[nodeId] !== undefined) {\n let node = this.body.nodes[nodeId];\n for (let i = 0; i < node.edges.length; i++) {\n edgeList.push(node.edges[i].id)\n }\n }\n else {\n console.log(\"NodeId provided for getConnectedEdges does not exist. Provided: \", nodeId);\n }\n return edgeList;\n }\n\n\n /**\n * Move a node.\n *\n * @param {Node.id} nodeId\n * @param {number} x\n * @param {number} y\n */\n moveNode(nodeId, x, y) {\n if (this.body.nodes[nodeId] !== undefined) {\n this.body.nodes[nodeId].x = Number(x);\n this.body.nodes[nodeId].y = Number(y);\n setTimeout(() => {this.body.emitter.emit(\"startSimulation\")},0);\n }\n else {\n console.log(\"Node id supplied to moveNode does not exist. Provided: \", nodeId);\n }\n }\n}\n\nexport default NodesHandler;\n","/** ============================================================================\n * Location of all the endpoint drawing routines.\n *\n * Every endpoint has its own drawing routine, which contains an endpoint definition.\n *\n * The endpoint definitions must have the following properies:\n *\n * - (0,0) is the connection point to the node it attaches to\n * - The endpoints are orientated to the positive x-direction\n * - The length of the endpoint is at most 1\n *\n * As long as the endpoint classes remain simple and not too numerous, they will\n * be contained within this module.\n * All classes here except `EndPoints` should be considered as private to this module.\n *\n * -----------------------------------------------------------------------------\n * ### Further Actions\n *\n * After adding a new endpoint here, you also need to do the following things:\n *\n * - Add the new endpoint name to `network/options.js` in array `endPoints`.\n * - Add the new endpoint name to the documentation.\n * Scan for 'arrows.to.type` and add it to the description.\n * - Add the endpoint to the examples. At the very least, add it to example\n * `edgeStyles/arrowTypes`.\n * ============================================================================= */\n\n/**\n * Common methods for endpoints\n *\n * @class\n */\nclass EndPoint {\n\n /**\n * Apply transformation on points for display.\n *\n * The following is done:\n * - rotate by the specified angle\n * - multiply the (normalized) coordinates by the passed length\n * - offset by the target coordinates\n *\n * @param {Array} points\n * @param {ArrowData} arrowData\n * @static\n */\n static transform(points, arrowData) {\n if (!(points instanceof Array)) {\n points = [points];\n }\n\n var x = arrowData.point.x;\n var y = arrowData.point.y;\n var angle = arrowData.angle\n var length = arrowData.length;\n\n for(var i = 0; i < points.length; ++i) {\n var p = points[i];\n var xt = p.x * Math.cos(angle) - p.y * Math.sin(angle);\n var yt = p.x * Math.sin(angle) + p.y * Math.cos(angle);\n\n p.x = x + length*xt;\n p.y = y + length*yt;\n }\n }\n\n\n /**\n * Draw a closed path using the given real coordinates.\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {Array.} points\n * @static\n */\n static drawPath(ctx, points) {\n ctx.beginPath();\n ctx.moveTo(points[0].x, points[0].y);\n for(var i = 1; i < points.length; ++i) {\n ctx.lineTo(points[i].x, points[i].y);\n }\n ctx.closePath();\n }\n}\n\n\n\n\n/**\n * Drawing methods for the arrow endpoint.\n * @extends EndPoint\n */\nclass Arrow extends EndPoint {\n\n /**\n * Draw this shape at the end of a line.\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {ArrowData} arrowData\n * @static\n */\n static draw(ctx, arrowData) {\n // Normalized points of closed path, in the order that they should be drawn.\n // (0, 0) is the attachment point, and the point around which should be rotated\n var points = [\n { x: 0 , y: 0 },\n { x:-1 , y: 0.3},\n { x:-0.9, y: 0 },\n { x:-1 , y:-0.3},\n ];\n\n EndPoint.transform(points, arrowData);\n EndPoint.drawPath(ctx, points);\n }\n}\n\n/**\n * Drawing methods for the crow endpoint.\n * @extends EndPoint\n */\nclass Crow {\n\n /**\n * Draw this shape at the end of a line.\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {ArrowData} arrowData\n * @static\n */\n static draw(ctx, arrowData) {\n // Normalized points of closed path, in the order that they should be drawn.\n // (0, 0) is the attachment point, and the point around which should be rotated\n var points = [\n { x:-1, y: 0},\n { x:0, y: 0.3},\n { x:-0.4, y: 0},\n { x:0, y:-0.3},\n ];\n\n EndPoint.transform(points, arrowData);\n EndPoint.drawPath(ctx, points);\n }\n}\n\n/**\n * Drawing methods for the curve endpoint.\n * @extends EndPoint\n */\nclass Curve {\n\n /**\n * Draw this shape at the end of a line.\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {ArrowData} arrowData\n * @static\n */\n static draw(ctx, arrowData) {\n // Normalized points of closed path, in the order that they should be drawn.\n // (0, 0) is the attachment point, and the point around which should be rotated\n var point = {x:-0.4, y:0};\n EndPoint.transform(point, arrowData);\n\n // Update endpoint style for drawing transparent arc.\n ctx.strokeStyle = ctx.fillStyle;\n ctx.fillStyle = 'rgba(0, 0, 0, 0)';\n\n // Define curve endpoint as semicircle.\n var pi = Math.PI\n var start_angle = arrowData.angle - pi/2;\n var end_angle = arrowData.angle + pi/2;\n ctx.beginPath();\n ctx.arc(point.x, point.y, arrowData.length*0.4, start_angle, end_angle, false);\n ctx.stroke()\n }\n}\n\n/**\n * Drawing methods for the inverted curve endpoint.\n * @extends EndPoint\n */\nclass InvertedCurve {\n\n /**\n * Draw this shape at the end of a line.\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {ArrowData} arrowData\n * @static\n */\n static draw(ctx, arrowData) {\n // Normalized points of closed path, in the order that they should be drawn.\n // (0, 0) is the attachment point, and the point around which should be rotated\n var point = {x:-0.3, y:0};\n EndPoint.transform(point, arrowData);\n\n // Update endpoint style for drawing transparent arc.\n ctx.strokeStyle = ctx.fillStyle;\n ctx.fillStyle = 'rgba(0, 0, 0, 0)';\n\n // Define inverted curve endpoint as semicircle.\n var pi = Math.PI\n var start_angle = arrowData.angle + pi/2;\n var end_angle = arrowData.angle + 3*pi/2;\n ctx.beginPath();\n ctx.arc(point.x, point.y, arrowData.length*0.4, start_angle, end_angle, false);\n ctx.stroke()\n }\n}\n\n/**\n * Drawing methods for the trinagle endpoint.\n * @extends EndPoint\n */\nclass Triangle {\n\n /**\n * Draw this shape at the end of a line.\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {ArrowData} arrowData\n * @static\n */\n static draw(ctx, arrowData) {\n // Normalized points of closed path, in the order that they should be drawn.\n // (0, 0) is the attachment point, and the point around which should be rotated\n var points = [\n { x:0.02, y:0},\n { x:-1, y: 0.3},\n { x:-1, y:-0.3},\n ];\n\n EndPoint.transform(points, arrowData);\n EndPoint.drawPath(ctx, points);\n }\n}\n\n/**\n * Drawing methods for the inverted trinagle endpoint.\n * @extends EndPoint\n */\nclass InvertedTriangle {\n\n /**\n * Draw this shape at the end of a line.\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {ArrowData} arrowData\n * @static\n */\n static draw(ctx, arrowData) {\n // Normalized points of closed path, in the order that they should be drawn.\n // (0, 0) is the attachment point, and the point around which should be rotated\n var points = [\n { x:0, y:0.3},\n { x:0, y: -0.3},\n { x:-1, y:0},\n ];\n\n EndPoint.transform(points, arrowData);\n EndPoint.drawPath(ctx, points);\n }\n}\n\n/**\n * Drawing methods for the circle endpoint.\n */\nclass Circle {\n\n /**\n * Draw this shape at the end of a line.\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {ArrowData} arrowData\n * @static\n */\n static draw(ctx, arrowData) {\n var point = {x:-0.4, y:0};\n\n EndPoint.transform(point, arrowData);\n ctx.circle(point.x, point.y, arrowData.length*0.4);\n }\n}\n\n\n/**\n * Drawing methods for the bar endpoint.\n */\nclass Bar {\n\n /**\n * Draw this shape at the end of a line.\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {ArrowData} arrowData\n * @static\n */\n static draw(ctx, arrowData) {\n/*\n var points = [\n {x:0, y:0.5},\n {x:0, y:-0.5}\n ];\n\n EndPoint.transform(points, arrowData);\n ctx.beginPath();\n ctx.moveTo(points[0].x, points[0].y);\n ctx.lineTo(points[1].x, points[1].y);\n ctx.stroke();\n*/\n\n var points = [\n {x:0, y:0.5},\n {x:0, y:-0.5},\n {x:-0.15, y:-0.5},\n {x:-0.15, y:0.5},\n ];\n\n EndPoint.transform(points, arrowData);\n EndPoint.drawPath(ctx, points);\n }\n}\n\n/**\n * Drawing methods for the box endpoint.\n */\nclass Box {\n\n /**\n * Draw this shape at the end of a line.\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {ArrowData} arrowData\n * @static\n */\n static draw(ctx, arrowData) {\n var points = [\n {x:0, y:0.3},\n {x:0, y:-0.3},\n {x:-0.6, y:-0.3},\n {x:-0.6, y:0.3},\n ];\n\n EndPoint.transform(points, arrowData);\n EndPoint.drawPath(ctx, points);\n }\n}\n\n/**\n * Drawing methods for the diamond endpoint.\n */\nclass Diamond {\n\n /**\n * Draw this shape at the end of a line.\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {ArrowData} arrowData\n * @static\n */\n static draw(ctx, arrowData) {\n var points = [\n {x:0, y:0},\n {x:-0.5, y:-0.3},\n {x:-1, y:0},\n {x:-0.5, y:0.3},\n ];\n\n EndPoint.transform(points, arrowData);\n EndPoint.drawPath(ctx, points);\n }\n}\n\n/**\n * Drawing methods for the vee endpoint.\n * @extends EndPoint\n */\nclass Vee {\n\n /**\n * Draw this shape at the end of a line.\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {ArrowData} arrowData\n * @static\n */\n static draw(ctx, arrowData) {\n // Normalized points of closed path, in the order that they should be drawn.\n // (0, 0) is the attachment point, and the point around which should be rotated\n var points = [\n { x:-1, y: 0.3},\n { x:-0.5, y: 0},\n { x:-1, y:-0.3},\n { x:0, y: 0},\n ];\n\n EndPoint.transform(points, arrowData);\n EndPoint.drawPath(ctx, points);\n }\n}\n\n/**\n * Drawing methods for the endpoints.\n */\nclass EndPoints {\n\n /**\n * Draw an endpoint\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {ArrowData} arrowData\n * @static\n */\n static draw(ctx, arrowData) {\n var type;\n if (arrowData.type) {\n type = arrowData.type.toLowerCase();\n }\n\n switch (type) {\n case 'circle':\n Circle.draw(ctx, arrowData);\n break;\n case 'box':\n Box.draw(ctx, arrowData);\n break;\n case 'crow':\n Crow.draw(ctx, arrowData);\n break;\n case 'curve':\n Curve.draw(ctx, arrowData);\n break;\n case 'diamond':\n Diamond.draw(ctx, arrowData);\n break;\n case 'inv_curve':\n InvertedCurve.draw(ctx, arrowData);\n break;\n case 'triangle':\n Triangle.draw(ctx, arrowData);\n break;\n case 'inv_triangle':\n InvertedTriangle.draw(ctx, arrowData);\n break;\n case 'bar':\n Bar.draw(ctx, arrowData);\n break;\n case 'vee':\n Vee.draw(ctx, arrowData);\n break;\n case 'arrow': // fall-through\n default:\n Arrow.draw(ctx, arrowData);\n }\n }\n}\n\nexport default EndPoints;\n","import util from 'vis-util';\nimport EndPoints from './EndPoints';\n\n\n/**\n * The Base Class for all edges.\n *\n */\nclass EdgeBase {\n /**\n * @param {Object} options\n * @param {Object} body\n * @param {Label} labelModule\n */\n constructor(options, body, labelModule) {\n this.body = body;\n this.labelModule = labelModule;\n this.options = {};\n this.setOptions(options);\n this.colorDirty = true;\n this.color = {};\n this.selectionWidth = 2;\n this.hoverWidth = 1.5;\n this.fromPoint = this.from;\n this.toPoint = this.to;\n }\n\n /**\n * Connects a node to itself\n */\n connect() {\n this.from = this.body.nodes[this.options.from];\n this.to = this.body.nodes[this.options.to];\n }\n\n /**\n *\n * @returns {boolean} always false\n */\n cleanup() {\n return false;\n }\n\n /**\n *\n * @param {Object} options\n */\n setOptions(options) {\n this.options = options;\n this.from = this.body.nodes[this.options.from];\n this.to = this.body.nodes[this.options.to];\n this.id = this.options.id;\n }\n\n /**\n * Redraw a edge as a line\n * Draw this edge in the given canvas\n * The 2d context of a HTML canvas can be retrieved by canvas.getContext(\"2d\");\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {Array} values\n * @param {boolean} selected\n * @param {boolean} hover\n * @param {Node} viaNode\n * @private\n */\n drawLine(ctx, values, selected, hover, viaNode) {\n // set style\n ctx.strokeStyle = this.getColor(ctx, values, selected, hover);\n ctx.lineWidth = values.width;\n\n if (values.dashes !== false) {\n this._drawDashedLine(ctx, values, viaNode);\n }\n else {\n this._drawLine(ctx, values, viaNode);\n }\n }\n\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {Array} values\n * @param {Node} viaNode\n * @param {{x: number, y: number}} [fromPoint]\n * @param {{x: number, y: number}} [toPoint]\n * @private\n */\n _drawLine(ctx, values, viaNode, fromPoint, toPoint) {\n if (this.from != this.to) {\n // draw line\n this._line(ctx, values, viaNode, fromPoint, toPoint);\n }\n else {\n let [x,y,radius] = this._getCircleData(ctx);\n this._circle(ctx, values, x, y, radius);\n }\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {Array} values\n * @param {Node} viaNode\n * @param {{x: number, y: number}} [fromPoint] TODO: Remove in next major release\n * @param {{x: number, y: number}} [toPoint] TODO: Remove in next major release\n * @private\n */\n _drawDashedLine(ctx, values, viaNode, fromPoint, toPoint) { // eslint-disable-line no-unused-vars\n ctx.lineCap = 'round';\n let pattern = [5,5];\n if (Array.isArray(values.dashes) === true) {\n pattern = values.dashes;\n }\n\n // only firefox and chrome support this method, else we use the legacy one.\n if (ctx.setLineDash !== undefined) {\n ctx.save();\n\n // set dash settings for chrome or firefox\n ctx.setLineDash(pattern);\n ctx.lineDashOffset = 0;\n\n // draw the line\n if (this.from != this.to) {\n // draw line\n this._line(ctx, values, viaNode);\n }\n else {\n let [x,y,radius] = this._getCircleData(ctx);\n this._circle(ctx, values, x, y, radius);\n }\n\n // restore the dash settings.\n ctx.setLineDash([0]);\n ctx.lineDashOffset = 0;\n ctx.restore();\n }\n else { // unsupporting smooth lines\n if (this.from != this.to) {\n // draw line\n ctx.dashedLine(this.from.x, this.from.y, this.to.x, this.to.y, pattern);\n }\n else {\n let [x,y,radius] = this._getCircleData(ctx);\n this._circle(ctx, values, x, y, radius);\n }\n // draw shadow if enabled\n this.enableShadow(ctx, values);\n\n ctx.stroke();\n\n // disable shadows for other elements.\n this.disableShadow(ctx, values);\n }\n }\n\n\n /**\n *\n * @param {Node} nearNode\n * @param {CanvasRenderingContext2D} ctx\n * @param {Object} options\n * @returns {{x: number, y: number}}\n */\n findBorderPosition(nearNode, ctx, options) {\n if (this.from != this.to) {\n return this._findBorderPosition(nearNode, ctx, options);\n }\n else {\n return this._findBorderPositionCircle(nearNode, ctx, options);\n }\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @returns {{from: ({x: number, y: number, t: number}|*), to: ({x: number, y: number, t: number}|*)}}\n */\n findBorderPositions(ctx) {\n let from = {};\n let to = {};\n if (this.from != this.to) {\n from = this._findBorderPosition(this.from, ctx);\n to = this._findBorderPosition(this.to, ctx);\n }\n else {\n let [x,y] = this._getCircleData(ctx).slice(0, 2);\n\n from = this._findBorderPositionCircle(this.from, ctx, {x, y, low:0.25, high:0.6, direction:-1});\n to = this._findBorderPositionCircle(this.from, ctx, {x, y, low:0.6, high:0.8, direction:1});\n }\n return {from, to};\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @returns {Array.} x, y, radius\n * @private\n */\n _getCircleData(ctx) {\n let x, y;\n let node = this.from;\n let radius = this.options.selfReferenceSize;\n\n if (ctx !== undefined) {\n if (node.shape.width === undefined) {\n node.shape.resize(ctx);\n }\n }\n\n // get circle coordinates\n if (node.shape.width > node.shape.height) {\n x = node.x + node.shape.width * 0.5;\n y = node.y - radius;\n }\n else {\n x = node.x + radius;\n y = node.y - node.shape.height * 0.5;\n }\n return [x,y,radius];\n }\n\n /**\n * Get a point on a circle\n * @param {number} x\n * @param {number} y\n * @param {number} radius\n * @param {number} percentage - Value between 0 (line start) and 1 (line end)\n * @return {Object} point\n * @private\n */\n _pointOnCircle(x, y, radius, percentage) {\n let angle = percentage * 2 * Math.PI;\n return {\n x: x + radius * Math.cos(angle),\n y: y - radius * Math.sin(angle)\n }\n }\n\n /**\n * This function uses binary search to look for the point where the circle crosses the border of the node.\n * @param {Node} node\n * @param {CanvasRenderingContext2D} ctx\n * @param {Object} options\n * @returns {*}\n * @private\n */\n _findBorderPositionCircle(node, ctx, options) {\n let x = options.x;\n let y = options.y;\n let low = options.low;\n let high = options.high;\n let direction = options.direction;\n\n let maxIterations = 10;\n let iteration = 0;\n let radius = this.options.selfReferenceSize;\n let pos, angle, distanceToBorder, distanceToPoint, difference;\n let threshold = 0.05;\n let middle = (low + high) * 0.5;\n\n while (low <= high && iteration < maxIterations) {\n middle = (low + high) * 0.5;\n\n pos = this._pointOnCircle(x, y, radius, middle);\n angle = Math.atan2((node.y - pos.y), (node.x - pos.x));\n distanceToBorder = node.distanceToBorder(ctx, angle);\n distanceToPoint = Math.sqrt(Math.pow(pos.x - node.x, 2) + Math.pow(pos.y - node.y, 2));\n difference = distanceToBorder - distanceToPoint;\n if (Math.abs(difference) < threshold) {\n break; // found\n }\n else if (difference > 0) { // distance to nodes is larger than distance to border --> t needs to be bigger if we're looking at the to node.\n if (direction > 0) {\n low = middle;\n }\n else {\n high = middle;\n }\n }\n else {\n if (direction > 0) {\n high = middle;\n }\n else {\n low = middle;\n }\n }\n iteration++;\n\n }\n pos.t = middle;\n\n return pos;\n }\n\n /**\n * Get the line width of the edge. Depends on width and whether one of the\n * connected nodes is selected.\n * @param {boolean} selected\n * @param {boolean} hover\n * @returns {number} width\n * @private\n */\n getLineWidth(selected, hover) {\n if (selected === true) {\n return Math.max(this.selectionWidth, 0.3 / this.body.view.scale);\n }\n else {\n if (hover === true) {\n return Math.max(this.hoverWidth, 0.3 / this.body.view.scale);\n }\n else {\n return Math.max(this.options.width, 0.3 / this.body.view.scale);\n }\n }\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {ArrowOptions} values\n * @param {boolean} selected - Unused\n * @param {boolean} hover - Unused\n * @returns {string}\n */\n getColor(ctx, values, selected, hover) { // eslint-disable-line no-unused-vars\n if (values.inheritsColor !== false) {\n // when this is a loop edge, just use the 'from' method\n if ((values.inheritsColor === 'both') && (this.from.id !== this.to.id)) {\n let grd = ctx.createLinearGradient(this.from.x, this.from.y, this.to.x, this.to.y);\n let fromColor, toColor;\n fromColor = this.from.options.color.highlight.border;\n toColor = this.to.options.color.highlight.border;\n\n if ((this.from.selected === false) && (this.to.selected === false)) {\n fromColor = util.overrideOpacity(this.from.options.color.border, values.opacity);\n toColor = util.overrideOpacity(this.to.options.color.border, values.opacity);\n }\n else if ((this.from.selected === true) && (this.to.selected === false)) {\n toColor = this.to.options.color.border;\n }\n else if ((this.from.selected === false) && (this.to.selected === true)) {\n fromColor = this.from.options.color.border;\n }\n grd.addColorStop(0, fromColor);\n grd.addColorStop(1, toColor);\n\n // -------------------- this returns -------------------- //\n return grd;\n }\n\n if (values.inheritsColor === \"to\") {\n return util.overrideOpacity(this.to.options.color.border, values.opacity);\n } else { // \"from\"\n return util.overrideOpacity(this.from.options.color.border, values.opacity);\n }\n } else {\n return util.overrideOpacity(values.color, values.opacity);\n }\n }\n\n /**\n * Draw a line from a node to itself, a circle\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {Array} values\n * @param {number} x\n * @param {number} y\n * @param {number} radius\n * @private\n */\n _circle(ctx, values, x, y, radius) {\n // draw shadow if enabled\n this.enableShadow(ctx, values);\n\n // draw a circle\n ctx.beginPath();\n ctx.arc(x, y, radius, 0, 2 * Math.PI, false);\n ctx.stroke();\n\n // disable shadows for other elements.\n this.disableShadow(ctx, values);\n }\n\n\n /**\n * Calculate the distance between a point (x3,y3) and a line segment from (x1,y1) to (x2,y2).\n * (x3,y3) is the point.\n *\n * http://stackoverflow.com/questions/849211/shortest-distancae-between-a-point-and-a-line-segment\n *\n * @param {number} x1\n * @param {number} y1\n * @param {number} x2\n * @param {number} y2\n * @param {number} x3\n * @param {number} y3\n * @param {Node} via\n * @param {Array} values\n * @returns {number}\n */\n getDistanceToEdge(x1, y1, x2, y2, x3, y3, via, values) { // eslint-disable-line no-unused-vars\n let returnValue = 0;\n if (this.from != this.to) {\n returnValue = this._getDistanceToEdge(x1, y1, x2, y2, x3, y3, via)\n }\n else {\n let [x,y,radius] = this._getCircleData(undefined);\n let dx = x - x3;\n let dy = y - y3;\n returnValue = Math.abs(Math.sqrt(dx * dx + dy * dy) - radius);\n }\n\n return returnValue;\n }\n\n\n /**\n *\n * @param {number} x1\n * @param {number} y1\n * @param {number} x2\n * @param {number} y2\n * @param {number} x3\n * @param {number} y3\n * @returns {number}\n * @private\n */\n _getDistanceToLine(x1, y1, x2, y2, x3, y3) {\n let px = x2 - x1;\n let py = y2 - y1;\n let something = px * px + py * py;\n let u = ((x3 - x1) * px + (y3 - y1) * py) / something;\n\n if (u > 1) {\n u = 1;\n }\n else if (u < 0) {\n u = 0;\n }\n\n let x = x1 + u * px;\n let y = y1 + u * py;\n let dx = x - x3;\n let dy = y - y3;\n\n //# Note: If the actual distance does not matter,\n //# if you only want to compare what this function\n //# returns to other results of this function, you\n //# can just return the squared distance instead\n //# (i.e. remove the sqrt) to gain a little performance\n\n return Math.sqrt(dx * dx + dy * dy);\n }\n\n\n /**\n * @param {CanvasRenderingContext2D} ctx\n * @param {string} position\n * @param {Node} viaNode\n * @param {boolean} selected\n * @param {boolean} hover\n * @param {Array} values\n * @returns {{point: *, core: {x: number, y: number}, angle: *, length: number, type: *}}\n */\n getArrowData(ctx, position, viaNode, selected, hover, values) {\n // set lets\n let angle;\n let arrowPoint;\n let node1;\n let node2;\n let guideOffset;\n let scaleFactor;\n let type;\n let lineWidth = values.width;\n\n if (position === 'from') {\n node1 = this.from;\n node2 = this.to;\n guideOffset = 0.1;\n scaleFactor = values.fromArrowScale;\n type = values.fromArrowType;\n }\n else if (position === 'to') {\n node1 = this.to;\n node2 = this.from;\n guideOffset = -0.1;\n scaleFactor = values.toArrowScale;\n type = values.toArrowType;\n }\n else {\n node1 = this.to;\n node2 = this.from;\n scaleFactor = values.middleArrowScale;\n type = values.middleArrowType;\n }\n\n // if not connected to itself\n if (node1 != node2) {\n if (position !== 'middle') {\n // draw arrow head\n if (this.options.smooth.enabled === true) {\n arrowPoint = this.findBorderPosition(node1, ctx, { via: viaNode });\n let guidePos = this.getPoint(Math.max(0.0, Math.min(1.0, arrowPoint.t + guideOffset)), viaNode);\n angle = Math.atan2((arrowPoint.y - guidePos.y), (arrowPoint.x - guidePos.x));\n } else {\n angle = Math.atan2((node1.y - node2.y), (node1.x - node2.x));\n arrowPoint = this.findBorderPosition(node1, ctx);\n }\n } else {\n angle = Math.atan2((node1.y - node2.y), (node1.x - node2.x));\n arrowPoint = this.getPoint(0.5, viaNode); // this is 0.6 to account for the size of the arrow.\n }\n } else {\n // draw circle\n let [x,y,radius] = this._getCircleData(ctx);\n\n if (position === 'from') {\n arrowPoint = this.findBorderPosition(this.from, ctx, { x, y, low: 0.25, high: 0.6, direction: -1 });\n angle = arrowPoint.t * -2 * Math.PI + 1.5 * Math.PI + 0.1 * Math.PI;\n } else if (position === 'to') {\n arrowPoint = this.findBorderPosition(this.from, ctx, { x, y, low: 0.6, high: 1.0, direction: 1 });\n angle = arrowPoint.t * -2 * Math.PI + 1.5 * Math.PI - 1.1 * Math.PI;\n } else {\n arrowPoint = this._pointOnCircle(x, y, radius, 0.175);\n angle = 3.9269908169872414; // === 0.175 * -2 * Math.PI + 1.5 * Math.PI + 0.1 * Math.PI;\n }\n }\n\n if (position === 'middle' && scaleFactor < 0) lineWidth *= -1; // reversed middle arrow\n let length = 15 * scaleFactor + 3 * lineWidth; // 3* lineWidth is the width of the edge.\n\n var xi = arrowPoint.x - length * 0.9 * Math.cos(angle);\n var yi = arrowPoint.y - length * 0.9 * Math.sin(angle);\n let arrowCore = { x: xi, y: yi };\n\n return { point: arrowPoint, core: arrowCore, angle: angle, length: length, type: type };\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {ArrowOptions} values\n * @param {boolean} selected\n * @param {boolean} hover\n * @param {Object} arrowData\n */\n drawArrowHead(ctx, values, selected, hover, arrowData) {\n // set style\n ctx.strokeStyle = this.getColor(ctx, values, selected, hover);\n ctx.fillStyle = ctx.strokeStyle;\n ctx.lineWidth = values.width;\n\n EndPoints.draw(ctx, arrowData);\n\n // draw shadow if enabled\n this.enableShadow(ctx, values);\n ctx.fill();\n // disable shadows for other elements.\n this.disableShadow(ctx, values);\n }\n\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {ArrowOptions} values\n */\n enableShadow(ctx, values) {\n if (values.shadow === true) {\n ctx.shadowColor = values.shadowColor;\n ctx.shadowBlur = values.shadowSize;\n ctx.shadowOffsetX = values.shadowX;\n ctx.shadowOffsetY = values.shadowY;\n }\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {ArrowOptions} values\n */\n disableShadow(ctx, values) {\n if (values.shadow === true) {\n ctx.shadowColor = 'rgba(0,0,0,0)';\n ctx.shadowBlur = 0;\n ctx.shadowOffsetX = 0;\n ctx.shadowOffsetY = 0;\n }\n }\n \n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {{toArrow: boolean, toArrowScale: (allOptions.edges.arrows.to.scaleFactor|{number}|allOptions.edges.arrows.middle.scaleFactor|allOptions.edges.arrows.from.scaleFactor|Array|number), toArrowType: *, middleArrow: boolean, middleArrowScale: (number|allOptions.edges.arrows.middle.scaleFactor|{number}|Array), middleArrowType: (allOptions.edges.arrows.middle.type|{string}|string|*), fromArrow: boolean, fromArrowScale: (allOptions.edges.arrows.to.scaleFactor|{number}|allOptions.edges.arrows.middle.scaleFactor|allOptions.edges.arrows.from.scaleFactor|Array|number), fromArrowType: *, arrowStrikethrough: (*|boolean|allOptions.edges.arrowStrikethrough|{boolean}), color: undefined, inheritsColor: (string|string|string|allOptions.edges.color.inherit|{string, boolean}|Array|*), opacity: *, hidden: *, length: *, shadow: *, shadowColor: *, shadowSize: *, shadowX: *, shadowY: *, dashes: (*|boolean|Array|allOptions.edges.dashes|{boolean, array}), width: *}} values\n */\n drawBackground(ctx, values) {\n if (values.background !== false) {\n let attrs = ['strokeStyle', 'lineWidth', 'dashes'];\n let origCtxAttr = {};\n // save original line attrs\n attrs.forEach(function(attrname) {\n origCtxAttr[attrname] = ctx[attrname];\n });\n\n ctx.strokeStyle = values.backgroundColor;\n ctx.lineWidth = values.backgroundSize;\n this.setStrokeDashed(ctx, values.backgroundDashes);\n\n ctx.stroke();\n\n // restore original line attrs\n attrs.forEach(function(attrname) {\n ctx[attrname] = origCtxAttr[attrname];\n });\n this.setStrokeDashed(ctx, values.dashes);\n }\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {boolean|Array} dashes\n */\n setStrokeDashed(ctx, dashes) {\n if (dashes !== false) {\n if (ctx.setLineDash !== undefined) {\n let pattern = [5, 5];\n if (Array.isArray(dashes) === true) {\n pattern = dashes;\n }\n ctx.setLineDash(pattern);\n }\n else {\n console.warn(\"setLineDash is not supported in this browser. The dashed stroke cannot be used.\");\n }\n }\n else {\n if (ctx.setLineDash !== undefined) {\n ctx.setLineDash([]);\n }\n else {\n console.warn(\"setLineDash is not supported in this browser. The dashed stroke cannot be used.\");\n }\n }\n }\n}\n\nexport default EdgeBase;\n","import EdgeBase from './EdgeBase'\n\n/**\n * The Base Class for all Bezier edges. Bezier curves are used to model smooth\n * gradual curves in paths between nodes.\n *\n * @extends EdgeBase\n */\nclass BezierEdgeBase extends EdgeBase {\n /**\n * @param {Object} options\n * @param {Object} body\n * @param {Label} labelModule\n */\n constructor(options, body, labelModule) {\n super(options, body, labelModule);\n }\n\n /**\n * This function uses binary search to look for the point where the bezier curve crosses the border of the node.\n *\n * @param {Node} nearNode\n * @param {CanvasRenderingContext2D} ctx\n * @param {Node} viaNode\n * @returns {*}\n * @private\n */\n _findBorderPositionBezier(nearNode, ctx, viaNode = this._getViaCoordinates()) {\n var maxIterations = 10;\n var iteration = 0;\n var low = 0;\n var high = 1;\n var pos, angle, distanceToBorder, distanceToPoint, difference;\n var threshold = 0.2;\n var node = this.to;\n var from = false;\n if (nearNode.id === this.from.id) {\n node = this.from;\n from = true;\n }\n\n while (low <= high && iteration < maxIterations) {\n var middle = (low + high) * 0.5;\n\n pos = this.getPoint(middle, viaNode);\n angle = Math.atan2((node.y - pos.y), (node.x - pos.x));\n distanceToBorder = node.distanceToBorder(ctx, angle);\n distanceToPoint = Math.sqrt(Math.pow(pos.x - node.x, 2) + Math.pow(pos.y - node.y, 2));\n difference = distanceToBorder - distanceToPoint;\n if (Math.abs(difference) < threshold) {\n break; // found\n }\n else if (difference < 0) { // distance to nodes is larger than distance to border --> t needs to be bigger if we're looking at the to node.\n if (from === false) {\n low = middle;\n }\n else {\n high = middle;\n }\n }\n else {\n if (from === false) {\n high = middle;\n }\n else {\n low = middle;\n }\n }\n\n iteration++;\n }\n pos.t = middle;\n\n return pos;\n }\n\n\n\n /**\n * Calculate the distance between a point (x3,y3) and a line segment from\n * (x1,y1) to (x2,y2).\n * http://stackoverflow.com/questions/849211/shortest-distancae-between-a-point-and-a-line-segment\n * @param {number} x1 from x\n * @param {number} y1 from y\n * @param {number} x2 to x\n * @param {number} y2 to y\n * @param {number} x3 point to check x\n * @param {number} y3 point to check y\n * @param {Node} via\n * @returns {number}\n * @private\n */\n _getDistanceToBezierEdge(x1, y1, x2, y2, x3, y3, via) { // x3,y3 is the point\n let minDistance = 1e9;\n let distance;\n let i, t, x, y;\n let lastX = x1;\n let lastY = y1;\n for (i = 1; i < 10; i++) {\n t = 0.1 * i;\n x = Math.pow(1 - t, 2) * x1 + (2 * t * (1 - t)) * via.x + Math.pow(t, 2) * x2;\n y = Math.pow(1 - t, 2) * y1 + (2 * t * (1 - t)) * via.y + Math.pow(t, 2) * y2;\n if (i > 0) {\n distance = this._getDistanceToLine(lastX, lastY, x, y, x3, y3);\n minDistance = distance < minDistance ? distance : minDistance;\n }\n lastX = x;\n lastY = y;\n }\n\n return minDistance;\n }\n\n\n /**\n * Draw a bezier curve between two nodes\n *\n * The method accepts zero, one or two control points.\n * Passing zero control points just draws a straight line\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {Object} values | options for shadow drawing\n * @param {Object|undefined} viaNode1 | first control point for curve drawing\n * @param {Object|undefined} viaNode2 | second control point for curve drawing\n *\n * @protected\n */\n _bezierCurve(ctx, values, viaNode1, viaNode2) {\n var hasNode1 = (viaNode1 !== undefined && viaNode1.x !== undefined);\n var hasNode2 = (viaNode2 !== undefined && viaNode2.x !== undefined);\n\n ctx.beginPath();\n ctx.moveTo(this.fromPoint.x, this.fromPoint.y);\n\n if (hasNode1 && hasNode2) {\n ctx.bezierCurveTo(viaNode1.x, viaNode1.y, viaNode2.x, viaNode2.y, this.toPoint.x, this.toPoint.y);\n } else if (hasNode1) {\n ctx.quadraticCurveTo(viaNode1.x, viaNode1.y, this.toPoint.x, this.toPoint.y);\n } else {\n // fallback to normal straight edge\n ctx.lineTo(this.toPoint.x, this.toPoint.y);\n }\n // draw a background\n this.drawBackground(ctx, values);\n\n // draw shadow if enabled\n this.enableShadow(ctx, values);\n ctx.stroke();\n this.disableShadow(ctx, values);\n }\n\n /**\n *\n * @returns {*|{x, y}|{x: undefined, y: undefined}}\n */\n getViaNode() {\n return this._getViaCoordinates();\n }\n}\n\nexport default BezierEdgeBase;\n","import BezierEdgeBase from './BezierEdgeBase'\n\n/**\n * A Base Class for all Cubic Bezier Edges. Bezier curves are used to model\n * smooth gradual curves in paths between nodes.\n *\n * @extends BezierEdgeBase\n */\nclass CubicBezierEdgeBase extends BezierEdgeBase {\n /**\n * @param {Object} options\n * @param {Object} body\n * @param {Label} labelModule\n */\n constructor(options, body, labelModule) {\n super(options, body, labelModule);\n }\n\n /**\n * Calculate the distance between a point (x3,y3) and a line segment from\n * (x1,y1) to (x2,y2).\n * http://stackoverflow.com/questions/849211/shortest-distancae-between-a-point-and-a-line-segment\n * https://en.wikipedia.org/wiki/B%C3%A9zier_curve\n * @param {number} x1 from x\n * @param {number} y1 from y\n * @param {number} x2 to x\n * @param {number} y2 to y\n * @param {number} x3 point to check x\n * @param {number} y3 point to check y\n * @param {Node} via1\n * @param {Node} via2\n * @returns {number}\n * @private\n */\n _getDistanceToBezierEdge(x1, y1, x2, y2, x3, y3, via1, via2) { // x3,y3 is the point\n let minDistance = 1e9;\n let distance;\n let i, t, x, y;\n let lastX = x1;\n let lastY = y1;\n let vec = [0,0,0,0]\n for (i = 1; i < 10; i++) {\n t = 0.1 * i;\n vec[0] = Math.pow(1 - t, 3);\n vec[1] = 3 * t * Math.pow(1 - t, 2);\n vec[2] = 3 * Math.pow(t,2) * (1 - t);\n vec[3] = Math.pow(t, 3);\n x = vec[0] * x1 + vec[1] * via1.x + vec[2] * via2.x + vec[3] * x2;\n y = vec[0] * y1 + vec[1] * via1.y + vec[2] * via2.y + vec[3] * y2;\n if (i > 0) {\n distance = this._getDistanceToLine(lastX, lastY, x, y, x3, y3);\n minDistance = distance < minDistance ? distance : minDistance;\n }\n lastX = x;\n lastY = y;\n }\n\n return minDistance;\n }\n}\n\nexport default CubicBezierEdgeBase;","import CubicBezierEdgeBase from './util/CubicBezierEdgeBase'\n\n/**\n * A Cubic Bezier Edge. Bezier curves are used to model smooth gradual\n * curves in paths between nodes.\n *\n * @extends CubicBezierEdgeBase\n */\nclass CubicBezierEdge extends CubicBezierEdgeBase {\n /**\n * @param {Object} options\n * @param {Object} body\n * @param {Label} labelModule\n */\n constructor(options, body, labelModule) {\n super(options, body, labelModule);\n }\n\n /**\n * Draw a line between two nodes\n * @param {CanvasRenderingContext2D} ctx\n * @param {ArrowOptions} values\n * @param {Array.} viaNodes\n * @private\n */\n _line(ctx, values, viaNodes) {\n // get the coordinates of the support points.\n let via1 = viaNodes[0];\n let via2 = viaNodes[1];\n this._bezierCurve(ctx, values, via1, via2);\n }\n\n /**\n *\n * @returns {Array.<{x: number, y: number}>}\n * @private\n */\n _getViaCoordinates() {\n let dx = this.from.x - this.to.x;\n let dy = this.from.y - this.to.y;\n\n let x1, y1, x2, y2;\n let roundness = this.options.smooth.roundness;\n\n // horizontal if x > y or if direction is forced or if direction is horizontal\n if ((Math.abs(dx) > Math.abs(dy) || this.options.smooth.forceDirection === true || this.options.smooth.forceDirection === 'horizontal') && this.options.smooth.forceDirection !== 'vertical') {\n y1 = this.from.y;\n y2 = this.to.y;\n x1 = this.from.x - roundness * dx;\n x2 = this.to.x + roundness * dx;\n }\n else {\n y1 = this.from.y - roundness * dy;\n y2 = this.to.y + roundness * dy;\n x1 = this.from.x;\n x2 = this.to.x;\n }\n\n return [{x: x1, y: y1},{x: x2, y: y2}];\n }\n\n /**\n *\n * @returns {Array.<{x: number, y: number}>}\n */\n getViaNode() {\n return this._getViaCoordinates();\n }\n\n /**\n *\n * @param {Node} nearNode\n * @param {CanvasRenderingContext2D} ctx\n * @returns {{x: number, y: number, t: number}}\n * @private\n */\n _findBorderPosition(nearNode, ctx) {\n return this._findBorderPositionBezier(nearNode, ctx);\n }\n\n /**\n *\n * @param {number} x1\n * @param {number} y1\n * @param {number} x2\n * @param {number} y2\n * @param {number} x3\n * @param {number} y3\n * @param {Node} via1\n * @param {Node} via2\n * @returns {number}\n * @private\n */\n _getDistanceToEdge(x1, y1, x2, y2, x3, y3, [via1, via2] = this._getViaCoordinates()) { // x3,y3 is the point\n return this._getDistanceToBezierEdge(x1, y1, x2, y2, x3, y3, via1, via2);\n }\n\n /**\n * Combined function of pointOnLine and pointOnBezier. This gives the coordinates of a point on the line at a certain percentage of the way\n * @param {number} percentage\n * @param {{x: number, y: number}} [via1=this._getViaCoordinates()[0]]\n * @param {{x: number, y: number}} [via2=this._getViaCoordinates()[1]]\n * @returns {{x: number, y: number}}\n * @private\n */\n getPoint(percentage, [via1, via2] = this._getViaCoordinates()) {\n let t = percentage;\n let vec = [];\n vec[0] = Math.pow(1 - t, 3);\n vec[1] = 3 * t * Math.pow(1 - t, 2);\n vec[2] = 3 * Math.pow(t,2) * (1 - t);\n vec[3] = Math.pow(t, 3);\n let x = vec[0] * this.fromPoint.x + vec[1] * via1.x + vec[2] * via2.x + vec[3] * this.toPoint.x;\n let y = vec[0] * this.fromPoint.y + vec[1] * via1.y + vec[2] * via2.y + vec[3] * this.toPoint.y;\n\n return {x: x, y: y};\n }\n}\n\n\nexport default CubicBezierEdge;\n","import BezierEdgeBase from './util/BezierEdgeBase'\n\n/**\n * A Dynamic Bezier Edge. Bezier curves are used to model smooth gradual\n * curves in paths between nodes. The Dynamic piece refers to how the curve\n * reacts to physics changes.\n *\n * @extends BezierEdgeBase\n */\nclass BezierEdgeDynamic extends BezierEdgeBase {\n /**\n * @param {Object} options\n * @param {Object} body\n * @param {Label} labelModule\n */\n constructor(options, body, labelModule) {\n //this.via = undefined; // Here for completeness but not allowed to defined before super() is invoked.\n super(options, body, labelModule); // --> this calls the setOptions below\n this._boundFunction = () => {this.positionBezierNode();};\n this.body.emitter.on(\"_repositionBezierNodes\", this._boundFunction);\n }\n\n /**\n *\n * @param {Object} options\n */\n setOptions(options) {\n // check if the physics has changed.\n let physicsChange = false;\n if (this.options.physics !== options.physics) {\n physicsChange = true;\n }\n\n // set the options and the to and from nodes\n this.options = options;\n this.id = this.options.id;\n this.from = this.body.nodes[this.options.from];\n this.to = this.body.nodes[this.options.to];\n\n // setup the support node and connect\n this.setupSupportNode();\n this.connect();\n\n // when we change the physics state of the edge, we reposition the support node.\n if (physicsChange === true) {\n this.via.setOptions({physics: this.options.physics});\n this.positionBezierNode();\n }\n }\n\n /**\n * Connects an edge to node(s)\n */\n connect() {\n this.from = this.body.nodes[this.options.from];\n this.to = this.body.nodes[this.options.to];\n if (this.from === undefined || this.to === undefined || this.options.physics === false) {\n this.via.setOptions({physics:false})\n }\n else {\n // fix weird behaviour where a self referencing node has physics enabled\n if (this.from.id === this.to.id) {\n this.via.setOptions({physics: false})\n }\n else {\n this.via.setOptions({physics: true})\n }\n }\n }\n\n /**\n * remove the support nodes\n * @returns {boolean}\n */\n cleanup() {\n this.body.emitter.off(\"_repositionBezierNodes\", this._boundFunction);\n if (this.via !== undefined) {\n delete this.body.nodes[this.via.id];\n this.via = undefined;\n return true;\n }\n return false;\n }\n\n /**\n * Bezier curves require an anchor point to calculate the smooth flow. These points are nodes. These nodes are invisible but\n * are used for the force calculation.\n *\n * The changed data is not called, if needed, it is returned by the main edge constructor.\n * @private\n */\n setupSupportNode() {\n if (this.via === undefined) {\n var nodeId = \"edgeId:\" + this.id;\n var node = this.body.functions.createNode({\n id: nodeId,\n shape: 'circle',\n physics:true,\n hidden:true\n });\n this.body.nodes[nodeId] = node;\n this.via = node;\n this.via.parentEdgeId = this.id;\n this.positionBezierNode();\n }\n }\n\n /**\n * Positions bezier node\n */\n positionBezierNode() {\n if (this.via !== undefined && this.from !== undefined && this.to !== undefined) {\n this.via.x = 0.5 * (this.from.x + this.to.x);\n this.via.y = 0.5 * (this.from.y + this.to.y);\n }\n else if (this.via !== undefined) {\n this.via.x = 0;\n this.via.y = 0;\n }\n }\n\n /**\n * Draw a line between two nodes\n * @param {CanvasRenderingContext2D} ctx\n * @param {ArrowOptions} values\n * @param {Node} viaNode\n * @private\n */\n _line(ctx, values, viaNode) {\n this._bezierCurve(ctx, values, viaNode);\n }\n\n /**\n *\n * @returns {Node|undefined|*|{index, line, column}}\n */\n getViaNode() {\n return this.via;\n }\n\n\n /**\n * Combined function of pointOnLine and pointOnBezier. This gives the coordinates of a point on the line at a certain percentage of the way\n *\n * @param {number} percentage\n * @param {Node} viaNode\n * @returns {{x: number, y: number}}\n * @private\n */\n getPoint(percentage, viaNode = this.via) {\n let t = percentage;\n let x, y;\n if (this.from === this.to){\n let [cx,cy,cr] = this._getCircleData(this.from);\n let a = 2 * Math.PI * (1 - t);\n x = cx + cr * Math.sin(a);\n y = cy + cr - cr * (1 - Math.cos(a));\n } else {\n x = Math.pow(1 - t, 2) * this.fromPoint.x + 2 * t * (1 - t) * viaNode.x + Math.pow(t, 2) * this.toPoint.x;\n y = Math.pow(1 - t, 2) * this.fromPoint.y + 2 * t * (1 - t) * viaNode.y + Math.pow(t, 2) * this.toPoint.y;\n }\n\n return {x: x, y: y};\n }\n\n /**\n *\n * @param {Node} nearNode\n * @param {CanvasRenderingContext2D} ctx\n * @returns {*}\n * @private\n */\n _findBorderPosition(nearNode, ctx) {\n return this._findBorderPositionBezier(nearNode, ctx, this.via);\n }\n\n /**\n *\n * @param {number} x1\n * @param {number} y1\n * @param {number} x2\n * @param {number} y2\n * @param {number} x3\n * @param {number} y3\n * @returns {number}\n * @private\n */\n _getDistanceToEdge(x1, y1, x2, y2, x3, y3) { // x3,y3 is the point\n return this._getDistanceToBezierEdge(x1, y1, x2, y2, x3, y3, this.via);\n }\n}\n\n\nexport default BezierEdgeDynamic;\n","import BezierEdgeBase from './util/BezierEdgeBase'\n\n/**\n * A Static Bezier Edge. Bezier curves are used to model smooth gradual\n * curves in paths between nodes.\n *\n * @extends BezierEdgeBase\n */\nclass BezierEdgeStatic extends BezierEdgeBase {\n /**\n * @param {Object} options\n * @param {Object} body\n * @param {Label} labelModule\n */\n constructor(options, body, labelModule) {\n super(options, body, labelModule);\n }\n\n /**\n * Draw a line between two nodes\n * @param {CanvasRenderingContext2D} ctx\n * @param {ArrowOptions} values\n * @param {Node} viaNode\n * @private\n */\n _line(ctx, values, viaNode) {\n this._bezierCurve(ctx, values, viaNode);\n }\n\n /**\n *\n * @returns {Array.<{x: number, y: number}>}\n */\n getViaNode() {\n return this._getViaCoordinates();\n }\n\n\n /**\n * We do not use the to and fromPoints here to make the via nodes the same as edges without arrows.\n * @returns {{x: undefined, y: undefined}}\n * @private\n */\n _getViaCoordinates() {\n // Assumption: x/y coordinates in from/to always defined\n let xVia = undefined;\n let yVia = undefined;\n let factor = this.options.smooth.roundness;\n let type = this.options.smooth.type;\n let dx = Math.abs(this.from.x - this.to.x);\n let dy = Math.abs(this.from.y - this.to.y);\n if (type === 'discrete' || type === 'diagonalCross') {\n let stepX;\n let stepY;\n\n if (dx <= dy) {\n stepX = stepY = factor * dy;\n } else {\n stepX = stepY = factor * dx;\n }\n\n if (this.from.x > this.to.x) stepX = -stepX;\n if (this.from.y >= this.to.y) stepY = -stepY;\n\n xVia = this.from.x + stepX;\n yVia = this.from.y + stepY;\n\n if (type === \"discrete\") {\n if (dx <= dy) {\n xVia = dx < factor * dy ? this.from.x : xVia;\n } else {\n yVia = dy < factor * dx ? this.from.y : yVia;\n }\n }\n }\n else if (type === \"straightCross\") {\n let stepX = (1 - factor) * dx;\n let stepY = (1 - factor) * dy;\n\n if (dx <= dy) { // up - down\n stepX = 0;\n if (this.from.y < this.to.y) stepY = -stepY;\n }\n else { // left - right\n if (this.from.x < this.to.x) stepX = -stepX;\n stepY = 0;\n }\n xVia = this.to.x + stepX;\n yVia = this.to.y + stepY;\n }\n else if (type === 'horizontal') {\n let stepX = (1 - factor) * dx;\n if (this.from.x < this.to.x) stepX = -stepX;\n xVia = this.to.x + stepX;\n yVia = this.from.y;\n }\n else if (type === 'vertical') {\n let stepY = (1 - factor) * dy;\n if (this.from.y < this.to.y) stepY = -stepY;\n xVia = this.from.x;\n yVia = this.to.y + stepY;\n }\n else if (type === 'curvedCW') {\n dx = this.to.x - this.from.x;\n dy = this.from.y - this.to.y;\n let radius = Math.sqrt(dx * dx + dy * dy);\n let pi = Math.PI;\n\n let originalAngle = Math.atan2(dy, dx);\n let myAngle = (originalAngle + ((factor * 0.5) + 0.5) * pi) % (2 * pi);\n\n xVia = this.from.x + (factor * 0.5 + 0.5) * radius * Math.sin(myAngle);\n yVia = this.from.y + (factor * 0.5 + 0.5) * radius * Math.cos(myAngle);\n }\n else if (type === 'curvedCCW') {\n dx = this.to.x - this.from.x;\n dy = this.from.y - this.to.y;\n let radius = Math.sqrt(dx * dx + dy * dy);\n let pi = Math.PI;\n\n let originalAngle = Math.atan2(dy, dx);\n let myAngle = (originalAngle + ((-factor * 0.5) + 0.5) * pi) % (2 * pi);\n\n xVia = this.from.x + (factor * 0.5 + 0.5) * radius * Math.sin(myAngle);\n yVia = this.from.y + (factor * 0.5 + 0.5) * radius * Math.cos(myAngle);\n }\n else { // continuous\n let stepX;\n let stepY;\n\n if (dx <= dy) {\n stepX = stepY = factor * dy;\n } else {\n stepX = stepY = factor * dx;\n }\n\n if (this.from.x > this.to.x) stepX = -stepX;\n if (this.from.y >= this.to.y) stepY = -stepY;\n\n xVia = this.from.x + stepX;\n yVia = this.from.y + stepY;\n\n if (dx <= dy) {\n if (this.from.x <= this.to.x) {\n xVia = this.to.x < xVia ? this.to.x : xVia;\n }\n else {\n xVia = this.to.x > xVia ? this.to.x : xVia;\n }\n }\n else {\n if (this.from.y >= this.to.y) {\n yVia = this.to.y > yVia ? this.to.y : yVia;\n } else {\n yVia = this.to.y < yVia ? this.to.y : yVia;\n }\n }\n }\n return {x: xVia, y: yVia};\n }\n\n /**\n *\n * @param {Node} nearNode\n * @param {CanvasRenderingContext2D} ctx\n * @param {Object} options\n * @returns {*}\n * @private\n */\n _findBorderPosition(nearNode, ctx, options = {}) {\n return this._findBorderPositionBezier(nearNode, ctx, options.via);\n }\n\n /**\n *\n * @param {number} x1\n * @param {number} y1\n * @param {number} x2\n * @param {number} y2\n * @param {number} x3\n * @param {number} y3\n * @param {Node} viaNode\n * @returns {number}\n * @private\n */\n _getDistanceToEdge(x1, y1, x2, y2, x3, y3, viaNode = this._getViaCoordinates()) { // x3,y3 is the point\n return this._getDistanceToBezierEdge(x1, y1, x2, y2, x3, y3, viaNode);\n }\n\n /**\n * Combined function of pointOnLine and pointOnBezier. This gives the coordinates of a point on the line at a certain percentage of the way\n * @param {number} percentage\n * @param {Node} viaNode\n * @returns {{x: number, y: number}}\n * @private\n */\n getPoint(percentage, viaNode = this._getViaCoordinates()) {\n var t = percentage;\n var x = Math.pow(1 - t, 2) * this.fromPoint.x + (2 * t * (1 - t)) * viaNode.x + Math.pow(t, 2) * this.toPoint.x;\n var y = Math.pow(1 - t, 2) * this.fromPoint.y + (2 * t * (1 - t)) * viaNode.y + Math.pow(t, 2) * this.toPoint.y;\n\n return {x: x, y: y};\n }\n}\n\n\nexport default BezierEdgeStatic;\n","import EdgeBase from './util/EdgeBase'\n\n/**\n * A Straight Edge.\n *\n * @extends EdgeBase\n */\nclass StraightEdge extends EdgeBase {\n /**\n * @param {Object} options\n * @param {Object} body\n * @param {Label} labelModule\n */\n constructor(options, body, labelModule) {\n super(options, body, labelModule);\n }\n\n /**\n * Draw a line between two nodes\n * @param {CanvasRenderingContext2D} ctx\n * @param {ArrowOptions} values\n * @private\n */\n _line(ctx, values) {\n // draw a straight line\n ctx.beginPath();\n ctx.moveTo(this.fromPoint.x, this.fromPoint.y);\n ctx.lineTo(this.toPoint.x, this.toPoint.y);\n // draw shadow if enabled\n this.enableShadow(ctx, values);\n ctx.stroke();\n this.disableShadow(ctx, values);\n }\n\n /**\n *\n * @returns {undefined}\n */\n getViaNode() {\n return undefined;\n }\n\n /**\n * Combined function of pointOnLine and pointOnBezier. This gives the coordinates of a point on the line at a certain percentage of the way\n *\n * @param {number} percentage\n * @returns {{x: number, y: number}}\n * @private\n */\n getPoint(percentage) {\n return {\n x: (1 - percentage) * this.fromPoint.x + percentage * this.toPoint.x,\n y: (1 - percentage) * this.fromPoint.y + percentage * this.toPoint.y\n }\n }\n\n /**\n *\n * @param {Node} nearNode\n * @param {CanvasRenderingContext2D} ctx\n * @returns {{x: number, y: number}}\n * @private\n */\n _findBorderPosition(nearNode, ctx) {\n let node1 = this.to;\n let node2 = this.from;\n if (nearNode.id === this.from.id) {\n node1 = this.from;\n node2 = this.to;\n }\n\n let angle = Math.atan2((node1.y - node2.y), (node1.x - node2.x));\n let dx = (node1.x - node2.x);\n let dy = (node1.y - node2.y);\n let edgeSegmentLength = Math.sqrt(dx * dx + dy * dy);\n let toBorderDist = nearNode.distanceToBorder(ctx, angle);\n let toBorderPoint = (edgeSegmentLength - toBorderDist) / edgeSegmentLength;\n\n let borderPos = {};\n borderPos.x = (1 - toBorderPoint) * node2.x + toBorderPoint * node1.x;\n borderPos.y = (1 - toBorderPoint) * node2.y + toBorderPoint * node1.y;\n\n return borderPos;\n }\n\n /**\n *\n * @param {number} x1\n * @param {number} y1\n * @param {number} x2\n * @param {number} y2\n * @param {number} x3\n * @param {number} y3\n * @returns {number}\n * @private\n */\n _getDistanceToEdge(x1, y1, x2, y2, x3, y3) { // x3,y3 is the point\n return this._getDistanceToLine(x1, y1, x2, y2, x3, y3);\n }\n\n}\n\nexport default StraightEdge;\n","import util from 'vis-util';\nimport Label from './shared/Label';\nimport ComponentUtil from './shared/ComponentUtil';\nimport CubicBezierEdge from './edges/CubicBezierEdge';\nimport BezierEdgeDynamic from './edges/BezierEdgeDynamic';\nimport BezierEdgeStatic from './edges/BezierEdgeStatic';\nimport StraightEdge from './edges/StraightEdge';\n\n\n/**\n * An edge connects two nodes and has a specific direction.\n */\nclass Edge {\n /**\n * @param {Object} options values specific to this edge, must contain at least 'from' and 'to'\n * @param {Object} body shared state from Network instance\n * @param {Object} globalOptions options from the EdgesHandler instance\n * @param {Object} defaultOptions default options from the EdgeHandler instance. Value and reference are constant\n */\n constructor(options, body, globalOptions, defaultOptions) {\n if (body === undefined) {\n throw new Error(\"No body provided\");\n }\n\n // Since globalOptions is constant in values as well as reference,\n // Following needs to be done only once.\n\n this.options = util.bridgeObject(globalOptions);\n this.globalOptions = globalOptions;\n this.defaultOptions = defaultOptions;\n this.body = body;\n\n // initialize variables\n this.id = undefined;\n this.fromId = undefined;\n this.toId = undefined;\n this.selected = false;\n this.hover = false;\n this.labelDirty = true;\n\n this.baseWidth = this.options.width;\n this.baseFontSize = this.options.font.size;\n\n this.from = undefined; // a node\n this.to = undefined; // a node\n\n this.edgeType = undefined;\n\n this.connected = false;\n\n this.labelModule = new Label(this.body, this.options, true /* It's an edge label */);\n this.setOptions(options);\n }\n\n\n /**\n * Set or overwrite options for the edge\n * @param {Object} options an object with options\n * @returns {null|boolean} null if no options, boolean if date changed\n */\n setOptions(options) {\n if (!options) {\n return;\n }\n\n // record old value of this.options.hidden\n let oldHidden = this.options.hidden\n\n if (oldHidden === undefined || oldHidden === null) {\n oldHidden = false\n }\n\n Edge.parseOptions(this.options, options, true, this.globalOptions);\n\n if (options.id !== undefined) {\n this.id = options.id;\n }\n if (options.from !== undefined) {\n this.fromId = options.from;\n }\n if (options.to !== undefined) {\n this.toId = options.to;\n }\n if (options.title !== undefined) {\n this.title = options.title;\n }\n if (options.value !== undefined) {\n options.value = parseFloat(options.value);\n }\n\n let pile = [options, this.options, this.defaultOptions];\n this.chooser = ComponentUtil.choosify('edge', pile);\n\n // update label Module\n this.updateLabelModule(options);\n\n let dataChanged = this.updateEdgeType();\n\n // if anything has been updates, reset the selection width and the hover width\n this._setInteractionWidths();\n\n // A node is connected when it has a from and to node that both exist in the network.body.nodes.\n this.connect();\n\n let newHidden = this.options.hidden\n\n if (newHidden === undefined || newHidden === null) {\n newHidden = false\n }\n if (newHidden != oldHidden || options.physics !== undefined) {\n dataChanged = true\n }\n\n // there might be a similar problem with physics, but a bug has not been reported\t\n if (options.physics !== undefined) {\n dataChanged = true;\n }\n\n return dataChanged;\n }\n\n\n /**\n *\n * @param {Object} parentOptions\n * @param {Object} newOptions\n * @param {boolean} [allowDeletion=false]\n * @param {Object} [globalOptions={}]\n * @param {boolean} [copyFromGlobals=false]\n */\n static parseOptions(parentOptions, newOptions, allowDeletion = false, globalOptions = {}, copyFromGlobals = false) {\n var fields = [\n 'arrowStrikethrough',\n 'id',\n 'from',\n 'hidden',\n 'hoverWidth',\n 'labelHighlightBold',\n 'length',\n 'line',\n 'opacity',\n 'physics',\n 'scaling',\n 'selectionWidth',\n 'selfReferenceSize',\n 'to',\n 'title',\n 'value',\n 'width',\n 'font',\n 'chosen',\n 'widthConstraint'\n ];\n\n // only deep extend the items in the field array. These do not have shorthand.\n util.selectiveDeepExtend(fields, parentOptions, newOptions, allowDeletion);\n\n // Only copy label if it's a legal value.\n if (ComponentUtil.isValidLabel(newOptions.label)) {\n parentOptions.label = newOptions.label;\n } else if (!ComponentUtil.isValidLabel(parentOptions.label)) {\n parentOptions.label = undefined;\n }\n\n util.mergeOptions(parentOptions, newOptions, 'smooth', globalOptions);\n util.mergeOptions(parentOptions, newOptions, 'shadow', globalOptions);\n util.mergeOptions(parentOptions, newOptions, 'background', globalOptions);\n\n if (newOptions.dashes !== undefined && newOptions.dashes !== null) {\n parentOptions.dashes = newOptions.dashes;\n }\n else if (allowDeletion === true && newOptions.dashes === null) {\n parentOptions.dashes = Object.create(globalOptions.dashes); // this sets the pointer of the option back to the global option.\n }\n\n // set the scaling newOptions\n if (newOptions.scaling !== undefined && newOptions.scaling !== null) {\n if (newOptions.scaling.min !== undefined) {parentOptions.scaling.min = newOptions.scaling.min;}\n if (newOptions.scaling.max !== undefined) {parentOptions.scaling.max = newOptions.scaling.max;}\n util.mergeOptions(parentOptions.scaling, newOptions.scaling, 'label', globalOptions.scaling);\n }\n else if (allowDeletion === true && newOptions.scaling === null) {\n parentOptions.scaling = Object.create(globalOptions.scaling); // this sets the pointer of the option back to the global option.\n }\n\n // handle multiple input cases for arrows\n if (newOptions.arrows !== undefined && newOptions.arrows !== null) {\n if (typeof newOptions.arrows === 'string') {\n let arrows = newOptions.arrows.toLowerCase();\n parentOptions.arrows.to.enabled = arrows.indexOf(\"to\") != -1;\n parentOptions.arrows.middle.enabled = arrows.indexOf(\"middle\") != -1;\n parentOptions.arrows.from.enabled = arrows.indexOf(\"from\") != -1;\n }\n else if (typeof newOptions.arrows === 'object') {\n util.mergeOptions(parentOptions.arrows, newOptions.arrows, 'to', globalOptions.arrows);\n util.mergeOptions(parentOptions.arrows, newOptions.arrows, 'middle', globalOptions.arrows);\n util.mergeOptions(parentOptions.arrows, newOptions.arrows, 'from', globalOptions.arrows);\n }\n else {\n throw new Error(\"The arrow newOptions can only be an object or a string. Refer to the documentation. You used:\" + JSON.stringify(newOptions.arrows));\n }\n }\n else if (allowDeletion === true && newOptions.arrows === null) {\n parentOptions.arrows = Object.create(globalOptions.arrows); // this sets the pointer of the option back to the global option.\n }\n\n // handle multiple input cases for color\n if (newOptions.color !== undefined && newOptions.color !== null) {\n let fromColor = newOptions.color;\n let toColor = parentOptions.color;\n\n // If passed, fill in values from default options - required in the case of no prototype bridging\n if (copyFromGlobals) {\n util.deepExtend(toColor, globalOptions.color, false, allowDeletion);\n } else {\n // Clear local properties - need to do it like this in order to retain prototype bridges\n for (var i in toColor) {\n if (toColor.hasOwnProperty(i)) {\n delete toColor[i];\n }\n }\n }\n\n if (util.isString(toColor)) {\n toColor.color = toColor;\n toColor.highlight = toColor;\n toColor.hover = toColor;\n toColor.inherit = false;\n if (fromColor.opacity === undefined) {\n toColor.opacity = 1.0; // set default\n }\n }\n else {\n let colorsDefined = false;\n if (fromColor.color !== undefined) {toColor.color = fromColor.color; colorsDefined = true;}\n if (fromColor.highlight !== undefined) {toColor.highlight = fromColor.highlight; colorsDefined = true;}\n if (fromColor.hover !== undefined) {toColor.hover = fromColor.hover; colorsDefined = true;}\n if (fromColor.inherit !== undefined) {toColor.inherit = fromColor.inherit;}\n if (fromColor.opacity !== undefined) {toColor.opacity = Math.min(1,Math.max(0,fromColor.opacity));}\n\n if (colorsDefined === true) {\n toColor.inherit = false;\n } else {\n if (toColor.inherit === undefined) {\n toColor.inherit = 'from'; // Set default\n }\n }\n }\n }\n else if (allowDeletion === true && newOptions.color === null) {\n parentOptions.color = util.bridgeObject(globalOptions.color); // set the object back to the global options\n }\n\n if (allowDeletion === true && newOptions.font === null) {\n parentOptions.font = util.bridgeObject(globalOptions.font); // set the object back to the global options\n }\n }\n\n\n /**\n *\n * @returns {ArrowOptions}\n */\n getFormattingValues() {\n let toArrow = (this.options.arrows.to === true) || (this.options.arrows.to.enabled === true)\n let fromArrow = (this.options.arrows.from === true) || (this.options.arrows.from.enabled === true)\n let middleArrow = (this.options.arrows.middle === true) || (this.options.arrows.middle.enabled === true)\n let inheritsColor = this.options.color.inherit;\n let values = {\n toArrow: toArrow,\n toArrowScale: this.options.arrows.to.scaleFactor,\n toArrowType: this.options.arrows.to.type,\n middleArrow: middleArrow,\n middleArrowScale: this.options.arrows.middle.scaleFactor,\n middleArrowType: this.options.arrows.middle.type,\n fromArrow: fromArrow,\n fromArrowScale: this.options.arrows.from.scaleFactor,\n fromArrowType: this.options.arrows.from.type,\n arrowStrikethrough: this.options.arrowStrikethrough,\n color: (inheritsColor? undefined : this.options.color.color),\n inheritsColor: inheritsColor,\n opacity: this.options.color.opacity,\n hidden: this.options.hidden,\n length: this.options.length,\n shadow: this.options.shadow.enabled,\n shadowColor: this.options.shadow.color,\n shadowSize: this.options.shadow.size,\n shadowX: this.options.shadow.x,\n shadowY: this.options.shadow.y,\n dashes: this.options.dashes,\n width: this.options.width,\n background: this.options.background.enabled,\n backgroundColor: this.options.background.color,\n backgroundSize: this.options.background.size,\n backgroundDashes: this.options.background.dashes\n };\n if (this.selected || this.hover) {\n if (this.chooser === true) {\n if (this.selected) {\n let selectedWidth = this.options.selectionWidth;\n if (typeof selectedWidth === 'function') {\n values.width = selectedWidth(values.width);\n } else if (typeof selectedWidth === 'number') {\n values.width += selectedWidth;\n }\n values.width = Math.max(values.width, 0.3 / this.body.view.scale);\n values.color = this.options.color.highlight;\n values.shadow = this.options.shadow.enabled;\n } else if (this.hover) {\n let hoverWidth = this.options.hoverWidth;\n if (typeof hoverWidth === 'function') {\n values.width = hoverWidth(values.width);\n } else if (typeof hoverWidth === 'number') {\n values.width += hoverWidth;\n }\n values.width = Math.max(values.width, 0.3 / this.body.view.scale);\n values.color = this.options.color.hover;\n values.shadow = this.options.shadow.enabled;\n }\n } else if (typeof this.chooser === 'function') {\n this.chooser(values, this.options.id, this.selected, this.hover);\n if (values.color !== undefined) {\n values.inheritsColor = false;\n }\n if (values.shadow === false) {\n if ((values.shadowColor !== this.options.shadow.color) ||\n (values.shadowSize !== this.options.shadow.size) ||\n (values.shadowX !== this.options.shadow.x) ||\n (values.shadowY !== this.options.shadow.y)) {\n values.shadow = true;\n }\n }\n }\n } else {\n values.shadow = this.options.shadow.enabled;\n values.width = Math.max(values.width, 0.3 / this.body.view.scale);\n }\n return values;\n }\n\n /**\n * update the options in the label module\n *\n * @param {Object} options\n */\n updateLabelModule(options) {\n let pile = [\n options,\n this.options,\n this.globalOptions, // Currently set global edge options\n this.defaultOptions\n ];\n\n this.labelModule.update(this.options, pile);\n\n if (this.labelModule.baseSize !== undefined) {\n this.baseFontSize = this.labelModule.baseSize;\n }\n }\n\n /**\n * update the edge type, set the options\n * @returns {boolean}\n */\n updateEdgeType() {\n let smooth = this.options.smooth;\n let dataChanged = false;\n let changeInType = true;\n if (this.edgeType !== undefined) {\n if ((((this.edgeType instanceof BezierEdgeDynamic) &&\n (smooth.enabled === true) &&\n (smooth.type === 'dynamic'))) ||\n (((this.edgeType instanceof CubicBezierEdge) &&\n (smooth.enabled === true) &&\n (smooth.type === 'cubicBezier'))) ||\n (((this.edgeType instanceof BezierEdgeStatic) &&\n (smooth.enabled === true) &&\n (smooth.type !== 'dynamic') &&\n (smooth.type !== 'cubicBezier'))) ||\n (((this.edgeType instanceof StraightEdge) &&\n (smooth.type.enabled === false)))) {\n changeInType = false;\n }\n if (changeInType === true) {\n dataChanged = this.cleanup();\n }\n }\n if (changeInType === true) {\n if (smooth.enabled === true) {\n if (smooth.type === 'dynamic') {\n dataChanged = true;\n this.edgeType = new BezierEdgeDynamic(this.options, this.body, this.labelModule);\n } else if (smooth.type === 'cubicBezier') {\n this.edgeType = new CubicBezierEdge(this.options, this.body, this.labelModule);\n } else {\n this.edgeType = new BezierEdgeStatic(this.options, this.body, this.labelModule);\n }\n } else {\n this.edgeType = new StraightEdge(this.options, this.body, this.labelModule);\n }\n } else { // if nothing changes, we just set the options.\n this.edgeType.setOptions(this.options);\n }\n return dataChanged;\n }\n\n /**\n * Connect an edge to its nodes\n */\n connect() {\n this.disconnect();\n\n this.from = this.body.nodes[this.fromId] || undefined;\n this.to = this.body.nodes[this.toId] || undefined;\n this.connected = (this.from !== undefined && this.to !== undefined);\n\n if (this.connected === true) {\n this.from.attachEdge(this);\n this.to.attachEdge(this);\n }\n else {\n if (this.from) {\n this.from.detachEdge(this);\n }\n if (this.to) {\n this.to.detachEdge(this);\n }\n }\n\n this.edgeType.connect();\n }\n\n\n /**\n * Disconnect an edge from its nodes\n */\n disconnect() {\n if (this.from) {\n this.from.detachEdge(this);\n this.from = undefined;\n }\n if (this.to) {\n this.to.detachEdge(this);\n this.to = undefined;\n }\n\n this.connected = false;\n }\n\n\n /**\n * get the title of this edge.\n * @return {string} title The title of the edge, or undefined when no title\n * has been set.\n */\n getTitle() {\n return this.title;\n }\n\n\n /**\n * check if this node is selecte\n * @return {boolean} selected True if node is selected, else false\n */\n isSelected() {\n return this.selected;\n }\n\n\n /**\n * Retrieve the value of the edge. Can be undefined\n * @return {number} value\n */\n getValue() {\n return this.options.value;\n }\n\n\n /**\n * Adjust the value range of the edge. The edge will adjust it's width\n * based on its value.\n * @param {number} min\n * @param {number} max\n * @param {number} total\n */\n setValueRange(min, max, total) {\n if (this.options.value !== undefined) {\n var scale = this.options.scaling.customScalingFunction(min, max, total, this.options.value);\n var widthDiff = this.options.scaling.max - this.options.scaling.min;\n if (this.options.scaling.label.enabled === true) {\n var fontDiff = this.options.scaling.label.max - this.options.scaling.label.min;\n this.options.font.size = this.options.scaling.label.min + scale * fontDiff;\n }\n this.options.width = this.options.scaling.min + scale * widthDiff;\n }\n else {\n this.options.width = this.baseWidth;\n this.options.font.size = this.baseFontSize;\n }\n\n this._setInteractionWidths();\n this.updateLabelModule();\n }\n\n /**\n *\n * @private\n */\n _setInteractionWidths() {\n if (typeof this.options.hoverWidth === 'function') {\n this.edgeType.hoverWidth = this.options.hoverWidth(this.options.width);\n } else {\n this.edgeType.hoverWidth = this.options.hoverWidth + this.options.width;\n }\n if (typeof this.options.selectionWidth === 'function') {\n this.edgeType.selectionWidth = this.options.selectionWidth(this.options.width);\n } else {\n this.edgeType.selectionWidth = this.options.selectionWidth + this.options.width;\n }\n }\n\n\n /**\n * Redraw a edge\n * Draw this edge in the given canvas\n * The 2d context of a HTML canvas can be retrieved by canvas.getContext(\"2d\");\n * @param {CanvasRenderingContext2D} ctx\n */\n draw(ctx) {\n let values = this.getFormattingValues();\n if (values.hidden) {\n return;\n }\n\n // get the via node from the edge type\n let viaNode = this.edgeType.getViaNode();\n let arrowData = {};\n\n // restore edge targets to defaults\n this.edgeType.fromPoint = this.edgeType.from;\n this.edgeType.toPoint = this.edgeType.to;\n\n // from and to arrows give a different end point for edges. we set them here\n if (values.fromArrow) {\n arrowData.from = this.edgeType.getArrowData(ctx, 'from', viaNode, this.selected, this.hover, values);\n if (values.arrowStrikethrough === false)\n this.edgeType.fromPoint = arrowData.from.core;\n }\n if (values.toArrow) {\n arrowData.to = this.edgeType.getArrowData(ctx, 'to', viaNode, this.selected, this.hover, values);\n if (values.arrowStrikethrough === false)\n this.edgeType.toPoint = arrowData.to.core;\n }\n\n // the middle arrow depends on the line, which can depend on the to and from arrows so we do this one lastly.\n if (values.middleArrow) {\n arrowData.middle = this.edgeType.getArrowData(ctx,'middle', viaNode, this.selected, this.hover, values);\n }\n\n // draw everything\n this.edgeType.drawLine(ctx, values, this.selected, this.hover, viaNode);\n this.drawArrows(ctx, arrowData, values);\n this.drawLabel(ctx, viaNode);\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {Object} arrowData\n * @param {ArrowOptions} values\n */\n drawArrows(ctx, arrowData, values) {\n if (values.fromArrow) {\n this.edgeType.drawArrowHead(ctx, values, this.selected, this.hover, arrowData.from);\n }\n if (values.middleArrow) {\n this.edgeType.drawArrowHead(ctx, values, this.selected, this.hover, arrowData.middle);\n }\n if (values.toArrow) {\n this.edgeType.drawArrowHead(ctx, values, this.selected, this.hover, arrowData.to);\n }\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {Node} viaNode\n */\n drawLabel(ctx, viaNode) {\n if (this.options.label !== undefined) {\n // set style\n var node1 = this.from;\n var node2 = this.to;\n\n if (this.labelModule.differentState(this.selected, this.hover)) {\n this.labelModule.getTextSize(ctx, this.selected, this.hover);\n }\n\n if (node1.id != node2.id) {\n this.labelModule.pointToSelf = false;\n var point = this.edgeType.getPoint(0.5, viaNode);\n ctx.save();\n\n let rotationPoint = this._getRotation(ctx);\n if (rotationPoint.angle != 0) {\n ctx.translate(rotationPoint.x, rotationPoint.y);\n ctx.rotate(rotationPoint.angle);\n }\n\n // draw the label\n this.labelModule.draw(ctx, point.x, point.y, this.selected, this.hover);\n\n/*\n // Useful debug code: draw a border around the label\n // This should **not** be enabled in production!\n var size = this.labelModule.getSize();; // ;; intentional so lint catches it\n ctx.strokeStyle = \"#ff0000\";\n ctx.strokeRect(size.left, size.top, size.width, size.height);\n // End debug code\n*/\n\n ctx.restore();\n }\n else {\n // Ignore the orientations.\n this.labelModule.pointToSelf = true;\n var x, y;\n var radius = this.options.selfReferenceSize;\n if (node1.shape.width > node1.shape.height) {\n x = node1.x + node1.shape.width * 0.5;\n y = node1.y - radius;\n }\n else {\n x = node1.x + radius;\n y = node1.y - node1.shape.height * 0.5;\n }\n point = this._pointOnCircle(x, y, radius, 0.125);\n this.labelModule.draw(ctx, point.x, point.y, this.selected, this.hover);\n }\n }\n }\n\n\n /**\n * Determine all visual elements of this edge instance, in which the given\n * point falls within the bounding shape.\n *\n * @param {point} point\n * @returns {Array.} list with the items which are on the point\n */\n getItemsOnPoint(point) {\n var ret = [];\n\n if (this.labelModule.visible()) {\n let rotationPoint = this._getRotation();\n if (ComponentUtil.pointInRect(this.labelModule.getSize(), point, rotationPoint)) {\n ret.push({edgeId:this.id, labelId:0});\n }\n }\n\n let obj = {\n left: point.x,\n top: point.y\n };\n\n if (this.isOverlappingWith(obj)) {\n ret.push({edgeId:this.id});\n }\n\n return ret;\n }\n\n\n /**\n * Check if this object is overlapping with the provided object\n * @param {Object} obj an object with parameters left, top\n * @return {boolean} True if location is located on the edge\n */\n isOverlappingWith(obj) {\n if (this.connected) {\n var distMax = 10;\n var xFrom = this.from.x;\n var yFrom = this.from.y;\n var xTo = this.to.x;\n var yTo = this.to.y;\n var xObj = obj.left;\n var yObj = obj.top;\n\n var dist = this.edgeType.getDistanceToEdge(xFrom, yFrom, xTo, yTo, xObj, yObj);\n\n return (dist < distMax);\n }\n else {\n return false\n }\n }\n\n\n /** \n * Determine the rotation point, if any.\n *\n * @param {CanvasRenderingContext2D} [ctx] if passed, do a recalculation of the label size\n * @returns {rotationPoint} the point to rotate around and the angle in radians to rotate\n * @private\n */\n _getRotation(ctx) {\n let viaNode = this.edgeType.getViaNode();\n let point = this.edgeType.getPoint(0.5, viaNode);\n\n if (ctx !== undefined) {\n this.labelModule.calculateLabelSize(ctx, this.selected, this.hover, point.x, point.y);\n }\n\n let ret = {\n x: point.x,\n y: this.labelModule.size.yLine,\n angle: 0\n };\n\n if (!this.labelModule.visible()) {\n return ret; // Don't even bother doing the atan2, there's nothing to draw\n }\n\n if (this.options.font.align === \"horizontal\") {\n return ret; // No need to calculate angle\n }\n\n var dy = this.from.y - this.to.y;\n var dx = this.from.x - this.to.x;\n var angle = Math.atan2(dy, dx); // radians\n\n // rotate so that label is readable\n if ((angle < -1 && dx < 0) || (angle > 0 && dx < 0)) {\n angle += Math.PI;\n }\n ret.angle = angle;\n\n return ret;\n }\n\n\n /**\n * Get a point on a circle\n * @param {number} x\n * @param {number} y\n * @param {number} radius\n * @param {number} percentage Value between 0 (line start) and 1 (line end)\n * @return {Object} point\n * @private\n */\n _pointOnCircle(x, y, radius, percentage) {\n var angle = percentage * 2 * Math.PI;\n return {\n x: x + radius * Math.cos(angle),\n y: y - radius * Math.sin(angle)\n }\n }\n\n /**\n * Sets selected state to true\n */\n select() {\n this.selected = true;\n }\n\n /**\n * Sets selected state to false\n */\n unselect() {\n this.selected = false;\n }\n\n\n /**\n * cleans all required things on delete\n * @returns {*}\n */\n cleanup() {\n return this.edgeType.cleanup();\n }\n\n\n /**\n * Remove edge from the list and perform necessary cleanup.\n */\n remove() {\n this.cleanup();\n this.disconnect();\n delete this.body.edges[this.id];\n }\n\n\n /**\n * Check if both connecting nodes exist\n * @returns {boolean}\n */\n endPointsValid() {\n return this.body.nodes[this.fromId] !== undefined\n && this.body.nodes[this.toId] !== undefined;\n }\n}\n\nexport default Edge;\n","import util from 'vis-util';\nimport { DataSet, DataView } from 'vis-data';\nimport Edge from './components/Edge';\n\n/**\n * Handler for Edges\n */\nclass EdgesHandler {\n /**\n * @param {Object} body\n * @param {Array.} images\n * @param {Array.} groups\n */\n constructor(body, images, groups) {\n this.body = body;\n this.images = images;\n this.groups = groups;\n\n // create the edge API in the body container\n this.body.functions.createEdge = this.create.bind(this);\n\n this.edgesListeners = {\n add: (event, params) => {this.add(params.items);},\n update: (event, params) => {this.update(params.items);},\n remove: (event, params) => {this.remove(params.items);}\n };\n\n this.options = {};\n this.defaultOptions = {\n arrows: {\n to: {enabled: false, scaleFactor:1, type: 'arrow'},// boolean / {arrowScaleFactor:1} / {enabled: false, arrowScaleFactor:1}\n middle: {enabled: false, scaleFactor:1, type: 'arrow'},\n from: {enabled: false, scaleFactor:1, type: 'arrow'}\n },\n arrowStrikethrough: true,\n color: {\n color:'#848484',\n highlight:'#848484',\n hover: '#848484',\n inherit: 'from',\n opacity:1.0\n },\n dashes: false,\n font: {\n color: '#343434',\n size: 14, // px\n face: 'arial',\n background: 'none',\n strokeWidth: 2, // px\n strokeColor: '#ffffff',\n align:'horizontal',\n multi: false,\n vadjust: 0,\n bold: {\n mod: 'bold'\n },\n boldital: {\n mod: 'bold italic'\n },\n ital: {\n mod: 'italic'\n },\n mono: {\n mod: '',\n size: 15, // px\n face: 'courier new',\n vadjust: 2\n }\n },\n hidden: false,\n hoverWidth: 1.5,\n label: undefined,\n labelHighlightBold: true,\n length: undefined,\n physics: true,\n scaling:{\n min: 1,\n max: 15,\n label: {\n enabled: true,\n min: 14,\n max: 30,\n maxVisible: 30,\n drawThreshold: 5\n },\n customScalingFunction: function (min,max,total,value) {\n if (max === min) {\n return 0.5;\n }\n else {\n var scale = 1 / (max - min);\n return Math.max(0,(value - min)*scale);\n }\n }\n },\n selectionWidth: 1.5,\n selfReferenceSize:20,\n shadow:{\n enabled: false,\n color: 'rgba(0,0,0,0.5)',\n size:10,\n x:5,\n y:5\n },\n background:{\n enabled: false,\n color: 'rgba(111,111,111,1)',\n size:10,\n dashes: false\n },\n smooth: {\n enabled: true,\n type: \"dynamic\",\n forceDirection:'none',\n roundness: 0.5\n },\n title:undefined,\n width: 1,\n value: undefined\n };\n\n util.deepExtend(this.options, this.defaultOptions);\n\n this.bindEventListeners();\n }\n\n /**\n * Binds event listeners\n */\n bindEventListeners() {\n // this allows external modules to force all dynamic curves to turn static.\n this.body.emitter.on(\"_forceDisableDynamicCurves\", (type, emit = true) => {\n if (type === 'dynamic') {\n type = 'continuous';\n }\n let dataChanged = false;\n for (let edgeId in this.body.edges) {\n if (this.body.edges.hasOwnProperty(edgeId)) {\n let edge = this.body.edges[edgeId];\n let edgeData = this.body.data.edges._data[edgeId];\n\n // only forcibly remove the smooth curve if the data has been set of the edge has the smooth curves defined.\n // this is because a change in the global would not affect these curves.\n if (edgeData !== undefined) {\n let smoothOptions = edgeData.smooth;\n if (smoothOptions !== undefined) {\n if (smoothOptions.enabled === true && smoothOptions.type === 'dynamic') {\n if (type === undefined) {\n edge.setOptions({smooth: false});\n }\n else {\n edge.setOptions({smooth: {type: type}});\n }\n dataChanged = true;\n }\n }\n }\n }\n }\n if (emit === true && dataChanged === true) {\n this.body.emitter.emit(\"_dataChanged\");\n }\n });\n\n // this is called when options of EXISTING nodes or edges have changed.\n //\n // NOTE: Not true, called when options have NOT changed, for both existing as well as new nodes.\n // See update() for logic.\n // TODO: Verify and examine the consequences of this. It might still trigger when\n // non-option fields have changed, but then reconnecting edges is still useless.\n // Alternatively, it might also be called when edges are removed.\n //\n this.body.emitter.on(\"_dataUpdated\", () => {\n this.reconnectEdges();\n });\n\n // refresh the edges. Used when reverting from hierarchical layout\n this.body.emitter.on(\"refreshEdges\", this.refresh.bind(this));\n this.body.emitter.on(\"refresh\", this.refresh.bind(this));\n this.body.emitter.on(\"destroy\", () => {\n util.forEach(this.edgesListeners, (callback, event) => {\n if (this.body.data.edges)\n this.body.data.edges.off(event, callback);\n });\n delete this.body.functions.createEdge;\n delete this.edgesListeners.add;\n delete this.edgesListeners.update;\n delete this.edgesListeners.remove;\n delete this.edgesListeners;\n });\n\n }\n\n /**\n *\n * @param {Object} options\n */\n setOptions(options) {\n if (options !== undefined) {\n // use the parser from the Edge class to fill in all shorthand notations\n Edge.parseOptions(this.options, options, true, this.defaultOptions, true);\n\n // update smooth settings in all edges\n let dataChanged = false;\n if (options.smooth !== undefined) {\n for (let edgeId in this.body.edges) {\n if (this.body.edges.hasOwnProperty(edgeId)) {\n dataChanged = this.body.edges[edgeId].updateEdgeType() || dataChanged;\n }\n }\n }\n\n // update fonts in all edges\n if (options.font !== undefined) {\n for (let edgeId in this.body.edges) {\n if (this.body.edges.hasOwnProperty(edgeId)) {\n this.body.edges[edgeId].updateLabelModule();\n }\n }\n }\n\n // update the state of the variables if needed\n if (options.hidden !== undefined || options.physics !== undefined || dataChanged === true) {\n this.body.emitter.emit('_dataChanged');\n }\n }\n }\n\n\n /**\n * Load edges by reading the data table\n * @param {Array | DataSet | DataView} edges The data containing the edges.\n * @param {boolean} [doNotEmit=false]\n * @private\n */\n setData(edges, doNotEmit = false) {\n var oldEdgesData = this.body.data.edges;\n\n if (edges instanceof DataSet || edges instanceof DataView) {\n this.body.data.edges = edges;\n }\n else if (Array.isArray(edges)) {\n this.body.data.edges = new DataSet();\n this.body.data.edges.add(edges);\n }\n else if (!edges) {\n this.body.data.edges = new DataSet();\n }\n else {\n throw new TypeError('Array or DataSet expected');\n }\n\n // TODO: is this null or undefined or false?\n if (oldEdgesData) {\n // unsubscribe from old dataset\n util.forEach(this.edgesListeners, (callback, event) => {oldEdgesData.off(event, callback);});\n }\n\n // remove drawn edges\n this.body.edges = {};\n\n // TODO: is this null or undefined or false?\n if (this.body.data.edges) {\n // subscribe to new dataset\n util.forEach(this.edgesListeners, (callback, event) => {this.body.data.edges.on(event, callback);});\n\n // draw all new nodes\n var ids = this.body.data.edges.getIds();\n this.add(ids, true);\n }\n\n this.body.emitter.emit('_adjustEdgesForHierarchicalLayout');\n if (doNotEmit === false) {\n this.body.emitter.emit(\"_dataChanged\");\n }\n }\n\n\n /**\n * Add edges\n * @param {number[] | string[]} ids\n * @param {boolean} [doNotEmit=false]\n * @private\n */\n add(ids, doNotEmit = false) {\n var edges = this.body.edges;\n var edgesData = this.body.data.edges;\n\n for (let i = 0; i < ids.length; i++) {\n var id = ids[i];\n\n var oldEdge = edges[id];\n if (oldEdge) {\n oldEdge.disconnect();\n }\n\n var data = edgesData.get(id, {\"showInternalIds\" : true});\n edges[id] = this.create(data);\n }\n\n this.body.emitter.emit('_adjustEdgesForHierarchicalLayout');\n\n if (doNotEmit === false) {\n this.body.emitter.emit(\"_dataChanged\");\n }\n }\n\n\n\n /**\n * Update existing edges, or create them when not yet existing\n * @param {number[] | string[]} ids\n * @private\n */\n update(ids) {\n var edges = this.body.edges;\n var edgesData = this.body.data.edges;\n var dataChanged = false;\n for (var i = 0; i < ids.length; i++) {\n var id = ids[i];\n var data = edgesData.get(id);\n var edge = edges[id];\n if (edge !== undefined) {\n // update edge\n edge.disconnect();\n dataChanged = edge.setOptions(data) || dataChanged; // if a support node is added, data can be changed.\n edge.connect();\n }\n else {\n // create edge\n this.body.edges[id] = this.create(data);\n dataChanged = true;\n }\n }\n\n if (dataChanged === true) {\n this.body.emitter.emit('_adjustEdgesForHierarchicalLayout');\n this.body.emitter.emit(\"_dataChanged\");\n }\n else {\n this.body.emitter.emit(\"_dataUpdated\");\n }\n }\n\n\n /**\n * Remove existing edges. Non existing ids will be ignored\n * @param {number[] | string[]} ids\n * @param {boolean} [emit=true]\n * @private\n */\n remove(ids, emit = true) {\n if (ids.length === 0) return; // early out\n\n var edges = this.body.edges;\n util.forEach(ids, (id) => {\n var edge = edges[id];\n if (edge !== undefined) {\n edge.remove();\n }\n });\n\n if (emit) {\n this.body.emitter.emit(\"_dataChanged\");\n }\n }\n\n /**\n * Refreshes Edge Handler\n */\n refresh() {\n util.forEach(this.body.edges, (edge, edgeId) => {\n let data = this.body.data.edges._data[edgeId];\n if (data !== undefined) {\n edge.setOptions(data);\n }\n });\n }\n\n /**\n *\n * @param {Object} properties\n * @returns {Edge}\n */\n create(properties) {\n return new Edge(properties, this.body, this.options, this.defaultOptions)\n }\n\n /**\n * Reconnect all edges\n * @private\n */\n reconnectEdges() {\n var id;\n var nodes = this.body.nodes;\n var edges = this.body.edges;\n\n for (id in nodes) {\n if (nodes.hasOwnProperty(id)) {\n nodes[id].edges = [];\n }\n }\n\n for (id in edges) {\n if (edges.hasOwnProperty(id)) {\n var edge = edges[id];\n edge.from = null;\n edge.to = null;\n edge.connect();\n }\n }\n }\n\n /**\n *\n * @param {Edge.id} edgeId\n * @returns {Array}\n */\n getConnectedNodes(edgeId) {\n let nodeList = [];\n if (this.body.edges[edgeId] !== undefined) {\n let edge = this.body.edges[edgeId];\n if (edge.fromId !== undefined) {nodeList.push(edge.fromId);}\n if (edge.toId !== undefined) {nodeList.push(edge.toId);}\n }\n return nodeList;\n }\n\n /**\n * There is no direct relation between the nodes and the edges DataSet,\n * so the right place to do call this is in the handler for event `_dataUpdated`.\n */\n _updateState() {\n this._addMissingEdges();\n this._removeInvalidEdges();\n }\n\n /**\n * Scan for missing nodes and remove corresponding edges, if any.\n * @private\n */\n _removeInvalidEdges() {\n \n let edgesToDelete = [];\n\n util.forEach(this.body.edges, (edge, id) => {\n let toNode = this.body.nodes[edge.toId];\n let fromNode = this.body.nodes[edge.fromId];\n\n // Skip clustering edges here, let the Clustering module handle those\n if ((toNode !== undefined && toNode.isCluster === true)\n || (fromNode !== undefined && fromNode.isCluster === true)) {\n return;\n }\n\n if (toNode === undefined || fromNode === undefined) {\n edgesToDelete.push(id);\n }\n });\n\n this.remove(edgesToDelete, false);\n }\n\n /**\n * add all edges from dataset that are not in the cached state\n * @private\n */ \n _addMissingEdges() {\n let edgesData = this.body.data.edges;\n if (edgesData === undefined || edgesData === null) {\n return; // No edges DataSet yet; can happen on startup \n }\n\n let edges = this.body.edges;\n let addIds = [];\n\n edgesData.forEach((edgeData, edgeId) => {\n let edge = edges[edgeId];\n if(edge===undefined) {\n addIds.push(edgeId);\n }\n });\n \n this.add(addIds,true);\n } \n}\n\nexport default EdgesHandler;\n","/**\n * Barnes Hut Solver\n */\nclass BarnesHutSolver {\n /**\n * @param {Object} body\n * @param {{physicsNodeIndices: Array, physicsEdgeIndices: Array, forces: {}, velocities: {}}} physicsBody\n * @param {Object} options\n */\n constructor(body, physicsBody, options) {\n this.body = body;\n this.physicsBody = physicsBody;\n this.barnesHutTree;\n this.setOptions(options);\n this.randomSeed = 5;\n\n // debug: show grid\n // this.body.emitter.on(\"afterDrawing\", (ctx) => {this._debug(ctx,'#ff0000')})\n }\n\n /**\n *\n * @param {Object} options\n */\n setOptions(options) {\n this.options = options;\n this.thetaInversed = 1 / this.options.theta;\n\n // if 1 then min distance = 0.5, if 0.5 then min distance = 0.5 + 0.5*node.shape.radius\n this.overlapAvoidanceFactor = 1 - Math.max(0, Math.min(1, this.options.avoidOverlap));\n }\n\n /**\n *\n * @returns {number} random integer\n */\n seededRandom() {\n var x = Math.sin(this.randomSeed++) * 10000;\n return x - Math.floor(x);\n }\n\n\n /**\n * This function calculates the forces the nodes apply on each other based on a gravitational model.\n * The Barnes Hut method is used to speed up this N-body simulation.\n *\n * @private\n */\n solve() {\n if (this.options.gravitationalConstant !== 0 && this.physicsBody.physicsNodeIndices.length > 0) {\n let node;\n let nodes = this.body.nodes;\n let nodeIndices = this.physicsBody.physicsNodeIndices;\n let nodeCount = nodeIndices.length;\n\n // create the tree\n let barnesHutTree = this._formBarnesHutTree(nodes, nodeIndices);\n\n // for debugging\n this.barnesHutTree = barnesHutTree;\n\n // place the nodes one by one recursively\n for (let i = 0; i < nodeCount; i++) {\n node = nodes[nodeIndices[i]];\n if (node.options.mass > 0) {\n // starting with root is irrelevant, it never passes the BarnesHutSolver condition\n this._getForceContributions(barnesHutTree.root, node);\n }\n }\n }\n }\n\n\n /**\n * @param {Object} parentBranch\n * @param {Node} node\n * @private\n */\n _getForceContributions(parentBranch, node) {\n this._getForceContribution(parentBranch.children.NW, node);\n this._getForceContribution(parentBranch.children.NE, node);\n this._getForceContribution(parentBranch.children.SW, node);\n this._getForceContribution(parentBranch.children.SE, node);\n }\n\n\n /**\n * This function traverses the barnesHutTree. It checks when it can approximate distant nodes with their center of mass.\n * If a region contains a single node, we check if it is not itself, then we apply the force.\n *\n * @param {Object} parentBranch\n * @param {Node} node\n * @private\n */\n _getForceContribution(parentBranch, node) {\n // we get no force contribution from an empty region\n if (parentBranch.childrenCount > 0) {\n let dx, dy, distance;\n\n // get the distance from the center of mass to the node.\n dx = parentBranch.centerOfMass.x - node.x;\n dy = parentBranch.centerOfMass.y - node.y;\n distance = Math.sqrt(dx * dx + dy * dy);\n\n // BarnesHutSolver condition\n // original condition : s/d < theta = passed === d/s > 1/theta = passed\n // calcSize = 1/s --> d * 1/s > 1/theta = passed\n if (distance * parentBranch.calcSize > this.thetaInversed) {\n this._calculateForces(distance, dx, dy, node, parentBranch);\n }\n else {\n // Did not pass the condition, go into children if available\n if (parentBranch.childrenCount === 4) {\n this._getForceContributions(parentBranch, node);\n }\n else { // parentBranch must have only one node, if it was empty we wouldnt be here\n if (parentBranch.children.data.id != node.id) { // if it is not self\n this._calculateForces(distance, dx, dy, node, parentBranch);\n }\n }\n }\n }\n }\n\n\n /**\n * Calculate the forces based on the distance.\n *\n * @param {number} distance\n * @param {number} dx\n * @param {number} dy\n * @param {Node} node\n * @param {Object} parentBranch\n * @private\n */\n _calculateForces(distance, dx, dy, node, parentBranch) {\n if (distance === 0) {\n distance = 0.1;\n dx = distance;\n }\n\n if (this.overlapAvoidanceFactor < 1 && node.shape.radius) {\n distance = Math.max(0.1 + (this.overlapAvoidanceFactor * node.shape.radius), distance - node.shape.radius);\n }\n\n // the dividing by the distance cubed instead of squared allows us to get the fx and fy components without sines and cosines\n // it is shorthand for gravityforce with distance squared and fx = dx/distance * gravityForce\n let gravityForce = this.options.gravitationalConstant * parentBranch.mass * node.options.mass / Math.pow(distance,3);\n let fx = dx * gravityForce;\n let fy = dy * gravityForce;\n\n this.physicsBody.forces[node.id].x += fx;\n this.physicsBody.forces[node.id].y += fy;\n }\n\n\n /**\n * This function constructs the barnesHut tree recursively. It creates the root, splits it and starts placing the nodes.\n *\n * @param {Array.} nodes\n * @param {Array.} nodeIndices\n * @returns {{root: {centerOfMass: {x: number, y: number}, mass: number, range: {minX: number, maxX: number, minY: number, maxY: number}, size: number, calcSize: number, children: {data: null}, maxWidth: number, level: number, childrenCount: number}}} BarnesHutTree\n * @private\n */\n _formBarnesHutTree(nodes, nodeIndices) {\n let node;\n let nodeCount = nodeIndices.length;\n\n let minX = nodes[nodeIndices[0]].x;\n let minY = nodes[nodeIndices[0]].y;\n let maxX = nodes[nodeIndices[0]].x;\n let maxY = nodes[nodeIndices[0]].y;\n\n // get the range of the nodes\n for (let i = 1; i < nodeCount; i++) {\n let node = nodes[nodeIndices[i]];\n let x = node.x;\n let y = node.y;\n if (node.options.mass > 0) {\n if (x < minX) {\n minX = x;\n }\n if (x > maxX) {\n maxX = x;\n }\n if (y < minY) {\n minY = y;\n }\n if (y > maxY) {\n maxY = y;\n }\n }\n }\n // make the range a square\n let sizeDiff = Math.abs(maxX - minX) - Math.abs(maxY - minY); // difference between X and Y\n if (sizeDiff > 0) {\n minY -= 0.5 * sizeDiff;\n maxY += 0.5 * sizeDiff;\n } // xSize > ySize\n else {\n minX += 0.5 * sizeDiff;\n maxX -= 0.5 * sizeDiff;\n } // xSize < ySize\n\n\n let minimumTreeSize = 1e-5;\n let rootSize = Math.max(minimumTreeSize, Math.abs(maxX - minX));\n let halfRootSize = 0.5 * rootSize;\n let centerX = 0.5 * (minX + maxX), centerY = 0.5 * (minY + maxY);\n\n // construct the barnesHutTree\n let barnesHutTree = {\n root: {\n centerOfMass: {x: 0, y: 0},\n mass: 0,\n range: {\n minX: centerX - halfRootSize, maxX: centerX + halfRootSize,\n minY: centerY - halfRootSize, maxY: centerY + halfRootSize\n },\n size: rootSize,\n calcSize: 1 / rootSize,\n children: {data: null},\n maxWidth: 0,\n level: 0,\n childrenCount: 4\n }\n };\n this._splitBranch(barnesHutTree.root);\n\n // place the nodes one by one recursively\n for (let i = 0; i < nodeCount; i++) {\n node = nodes[nodeIndices[i]];\n if (node.options.mass > 0) {\n this._placeInTree(barnesHutTree.root, node);\n }\n }\n\n // make global\n return barnesHutTree\n }\n\n\n /**\n * this updates the mass of a branch. this is increased by adding a node.\n *\n * @param {Object} parentBranch\n * @param {Node} node\n * @private\n */\n _updateBranchMass(parentBranch, node) {\n let centerOfMass = parentBranch.centerOfMass;\n let totalMass = parentBranch.mass + node.options.mass;\n let totalMassInv = 1 / totalMass;\n\n centerOfMass.x = centerOfMass.x * parentBranch.mass + node.x * node.options.mass;\n centerOfMass.x *= totalMassInv;\n\n centerOfMass.y = centerOfMass.y * parentBranch.mass + node.y * node.options.mass;\n centerOfMass.y *= totalMassInv;\n\n parentBranch.mass = totalMass;\n let biggestSize = Math.max(Math.max(node.height, node.radius), node.width);\n parentBranch.maxWidth = (parentBranch.maxWidth < biggestSize) ? biggestSize : parentBranch.maxWidth;\n\n }\n\n\n /**\n * determine in which branch the node will be placed.\n *\n * @param {Object} parentBranch\n * @param {Node} node\n * @param {boolean} skipMassUpdate\n * @private\n */\n _placeInTree(parentBranch, node, skipMassUpdate) {\n if (skipMassUpdate != true || skipMassUpdate === undefined) {\n // update the mass of the branch.\n this._updateBranchMass(parentBranch, node);\n }\n\n let range = parentBranch.children.NW.range;\n let region;\n if (range.maxX > node.x) { // in NW or SW\n if (range.maxY > node.y) {\n region = \"NW\";\n }\n else {\n region = \"SW\";\n }\n }\n else { // in NE or SE\n if (range.maxY > node.y) {\n region = \"NE\";\n }\n else {\n region = \"SE\";\n }\n }\n\n this._placeInRegion(parentBranch, node, region);\n }\n\n\n /**\n * actually place the node in a region (or branch)\n *\n * @param {Object} parentBranch\n * @param {Node} node\n * @param {'NW'| 'NE' | 'SW' | 'SE'} region\n * @private\n */\n _placeInRegion(parentBranch, node, region) {\n let children = parentBranch.children[region];\n\n switch (children.childrenCount) {\n case 0: // place node here\n children.children.data = node;\n children.childrenCount = 1;\n this._updateBranchMass(children, node);\n break;\n case 1: // convert into children\n // if there are two nodes exactly overlapping (on init, on opening of cluster etc.)\n // we move one node a little bit and we do not put it in the tree.\n if (children.children.data.x === node.x && children.children.data.y === node.y) {\n node.x += this.seededRandom();\n node.y += this.seededRandom();\n }\n else {\n this._splitBranch(children);\n this._placeInTree(children, node);\n }\n break;\n case 4: // place in branch\n this._placeInTree(children, node);\n break;\n }\n }\n\n\n /**\n * this function splits a branch into 4 sub branches. If the branch contained a node, we place it in the subbranch\n * after the split is complete.\n *\n * @param {Object} parentBranch\n * @private\n */\n _splitBranch(parentBranch) {\n // if the branch is shaded with a node, replace the node in the new subset.\n let containedNode = null;\n if (parentBranch.childrenCount === 1) {\n containedNode = parentBranch.children.data;\n parentBranch.mass = 0;\n parentBranch.centerOfMass.x = 0;\n parentBranch.centerOfMass.y = 0;\n }\n parentBranch.childrenCount = 4;\n parentBranch.children.data = null;\n this._insertRegion(parentBranch, \"NW\");\n this._insertRegion(parentBranch, \"NE\");\n this._insertRegion(parentBranch, \"SW\");\n this._insertRegion(parentBranch, \"SE\");\n\n if (containedNode != null) {\n this._placeInTree(parentBranch, containedNode);\n }\n }\n\n\n /**\n * This function subdivides the region into four new segments.\n * Specifically, this inserts a single new segment.\n * It fills the children section of the parentBranch\n *\n * @param {Object} parentBranch\n * @param {'NW'| 'NE' | 'SW' | 'SE'} region\n * @private\n */\n _insertRegion(parentBranch, region) {\n let minX, maxX, minY, maxY;\n let childSize = 0.5 * parentBranch.size;\n switch (region) {\n case \"NW\":\n minX = parentBranch.range.minX;\n maxX = parentBranch.range.minX + childSize;\n minY = parentBranch.range.minY;\n maxY = parentBranch.range.minY + childSize;\n break;\n case \"NE\":\n minX = parentBranch.range.minX + childSize;\n maxX = parentBranch.range.maxX;\n minY = parentBranch.range.minY;\n maxY = parentBranch.range.minY + childSize;\n break;\n case \"SW\":\n minX = parentBranch.range.minX;\n maxX = parentBranch.range.minX + childSize;\n minY = parentBranch.range.minY + childSize;\n maxY = parentBranch.range.maxY;\n break;\n case \"SE\":\n minX = parentBranch.range.minX + childSize;\n maxX = parentBranch.range.maxX;\n minY = parentBranch.range.minY + childSize;\n maxY = parentBranch.range.maxY;\n break;\n }\n\n\n parentBranch.children[region] = {\n centerOfMass: {x: 0, y: 0},\n mass: 0,\n range: {minX: minX, maxX: maxX, minY: minY, maxY: maxY},\n size: 0.5 * parentBranch.size,\n calcSize: 2 * parentBranch.calcSize,\n children: {data: null},\n maxWidth: 0,\n level: parentBranch.level + 1,\n childrenCount: 0\n };\n }\n\n\n //--------------------------- DEBUGGING BELOW ---------------------------//\n\n\n /**\n * This function is for debugging purposed, it draws the tree.\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {string} color\n * @private\n */\n _debug(ctx, color) {\n if (this.barnesHutTree !== undefined) {\n\n ctx.lineWidth = 1;\n\n this._drawBranch(this.barnesHutTree.root, ctx, color);\n }\n }\n\n\n /**\n * This function is for debugging purposes. It draws the branches recursively.\n *\n * @param {Object} branch\n * @param {CanvasRenderingContext2D} ctx\n * @param {string} color\n * @private\n */\n _drawBranch(branch, ctx, color) {\n if (color === undefined) {\n color = \"#FF0000\";\n }\n\n if (branch.childrenCount === 4) {\n this._drawBranch(branch.children.NW, ctx);\n this._drawBranch(branch.children.NE, ctx);\n this._drawBranch(branch.children.SE, ctx);\n this._drawBranch(branch.children.SW, ctx);\n }\n ctx.strokeStyle = color;\n ctx.beginPath();\n ctx.moveTo(branch.range.minX, branch.range.minY);\n ctx.lineTo(branch.range.maxX, branch.range.minY);\n ctx.stroke();\n\n ctx.beginPath();\n ctx.moveTo(branch.range.maxX, branch.range.minY);\n ctx.lineTo(branch.range.maxX, branch.range.maxY);\n ctx.stroke();\n\n ctx.beginPath();\n ctx.moveTo(branch.range.maxX, branch.range.maxY);\n ctx.lineTo(branch.range.minX, branch.range.maxY);\n ctx.stroke();\n\n ctx.beginPath();\n ctx.moveTo(branch.range.minX, branch.range.maxY);\n ctx.lineTo(branch.range.minX, branch.range.minY);\n ctx.stroke();\n\n /*\n if (branch.mass > 0) {\n ctx.circle(branch.centerOfMass.x, branch.centerOfMass.y, 3*branch.mass);\n ctx.stroke();\n }\n */\n }\n}\n\n\nexport default BarnesHutSolver;\n","/**\n * Repulsion Solver\n */\nclass RepulsionSolver {\n /**\n * @param {Object} body\n * @param {{physicsNodeIndices: Array, physicsEdgeIndices: Array, forces: {}, velocities: {}}} physicsBody\n * @param {Object} options\n */\n constructor(body, physicsBody, options) {\n this.body = body;\n this.physicsBody = physicsBody;\n this.setOptions(options);\n }\n\n /**\n *\n * @param {Object} options\n */\n setOptions(options) {\n this.options = options;\n }\n\n /**\n * Calculate the forces the nodes apply on each other based on a repulsion field.\n * This field is linearly approximated.\n *\n * @private\n */\n solve() {\n var dx, dy, distance, fx, fy, repulsingForce, node1, node2;\n\n var nodes = this.body.nodes;\n var nodeIndices = this.physicsBody.physicsNodeIndices;\n var forces = this.physicsBody.forces;\n\n // repulsing forces between nodes\n var nodeDistance = this.options.nodeDistance;\n\n // approximation constants\n var a = (-2 / 3) / nodeDistance;\n var b = 4 / 3;\n\n // we loop from i over all but the last entree in the array\n // j loops from i+1 to the last. This way we do not double count any of the indices, nor i === j\n for (let i = 0; i < nodeIndices.length - 1; i++) {\n node1 = nodes[nodeIndices[i]];\n for (let j = i + 1; j < nodeIndices.length; j++) {\n node2 = nodes[nodeIndices[j]];\n\n dx = node2.x - node1.x;\n dy = node2.y - node1.y;\n distance = Math.sqrt(dx * dx + dy * dy);\n\n // same condition as BarnesHutSolver, making sure nodes are never 100% overlapping.\n if (distance === 0) {\n distance = 0.1*Math.random();\n dx = distance;\n }\n\n if (distance < 2 * nodeDistance) {\n if (distance < 0.5 * nodeDistance) {\n repulsingForce = 1.0;\n }\n else {\n repulsingForce = a * distance + b; // linear approx of 1 / (1 + Math.exp((distance / nodeDistance - 1) * steepness))\n }\n repulsingForce = repulsingForce / distance;\n\n fx = dx * repulsingForce;\n fy = dy * repulsingForce;\n\n forces[node1.id].x -= fx;\n forces[node1.id].y -= fy;\n forces[node2.id].x += fx;\n forces[node2.id].y += fy;\n }\n }\n }\n }\n}\n\n\nexport default RepulsionSolver;","/**\n * Hierarchical Repulsion Solver\n */\nclass HierarchicalRepulsionSolver {\n /**\n * @param {Object} body\n * @param {{physicsNodeIndices: Array, physicsEdgeIndices: Array, forces: {}, velocities: {}}} physicsBody\n * @param {Object} options\n */\n constructor(body, physicsBody, options) {\n this.body = body;\n this.physicsBody = physicsBody;\n this.setOptions(options);\n }\n\n /**\n *\n * @param {Object} options\n */\n setOptions(options) {\n this.options = options;\n }\n\n /**\n * Calculate the forces the nodes apply on each other based on a repulsion field.\n * This field is linearly approximated.\n *\n * @private\n */\n solve() {\n var dx, dy, distance, fx, fy, repulsingForce, node1, node2, i, j;\n\n var nodes = this.body.nodes;\n var nodeIndices = this.physicsBody.physicsNodeIndices;\n var forces = this.physicsBody.forces;\n\n // repulsing forces between nodes\n var nodeDistance = this.options.nodeDistance;\n\n // we loop from i over all but the last entree in the array\n // j loops from i+1 to the last. This way we do not double count any of the indices, nor i === j\n for (i = 0; i < nodeIndices.length - 1; i++) {\n node1 = nodes[nodeIndices[i]];\n for (j = i + 1; j < nodeIndices.length; j++) {\n node2 = nodes[nodeIndices[j]];\n\n // nodes only affect nodes on their level\n if (node1.level === node2.level) {\n dx = node2.x - node1.x;\n dy = node2.y - node1.y;\n distance = Math.sqrt(dx * dx + dy * dy);\n\n var steepness = 0.05;\n if (distance < nodeDistance) {\n repulsingForce = -Math.pow(steepness * distance, 2) + Math.pow(steepness * nodeDistance, 2);\n }\n else {\n repulsingForce = 0;\n }\n // normalize force with\n if (distance === 0) {\n distance = 0.01;\n }\n else {\n repulsingForce = repulsingForce / distance;\n }\n fx = dx * repulsingForce;\n fy = dy * repulsingForce;\n\n forces[node1.id].x -= fx;\n forces[node1.id].y -= fy;\n forces[node2.id].x += fx;\n forces[node2.id].y += fy;\n }\n }\n }\n }\n}\n\n\nexport default HierarchicalRepulsionSolver;","/**\n * Spring Solver\n */\nclass SpringSolver {\n /**\n * @param {Object} body\n * @param {{physicsNodeIndices: Array, physicsEdgeIndices: Array, forces: {}, velocities: {}}} physicsBody\n * @param {Object} options\n */\n constructor(body, physicsBody, options) {\n this.body = body;\n this.physicsBody = physicsBody;\n this.setOptions(options);\n }\n\n /**\n *\n * @param {Object} options\n */\n setOptions(options) {\n this.options = options;\n }\n\n /**\n * This function calculates the springforces on the nodes, accounting for the support nodes.\n *\n * @private\n */\n solve() {\n let edgeLength, edge;\n let edgeIndices = this.physicsBody.physicsEdgeIndices;\n let edges = this.body.edges;\n let node1, node2, node3;\n\n // forces caused by the edges, modelled as springs\n for (let i = 0; i < edgeIndices.length; i++) {\n edge = edges[edgeIndices[i]];\n if (edge.connected === true && edge.toId !== edge.fromId) {\n // only calculate forces if nodes are in the same sector\n if (this.body.nodes[edge.toId] !== undefined && this.body.nodes[edge.fromId] !== undefined) {\n if (edge.edgeType.via !== undefined) {\n edgeLength = edge.options.length === undefined ? this.options.springLength : edge.options.length;\n node1 = edge.to;\n node2 = edge.edgeType.via;\n node3 = edge.from;\n\n this._calculateSpringForce(node1, node2, 0.5 * edgeLength);\n this._calculateSpringForce(node2, node3, 0.5 * edgeLength);\n }\n else {\n // the * 1.5 is here so the edge looks as large as a smooth edge. It does not initially because the smooth edges use\n // the support nodes which exert a repulsive force on the to and from nodes, making the edge appear larger.\n edgeLength = edge.options.length === undefined ? this.options.springLength * 1.5: edge.options.length;\n this._calculateSpringForce(edge.from, edge.to, edgeLength);\n }\n }\n }\n }\n }\n\n\n /**\n * This is the code actually performing the calculation for the function above.\n *\n * @param {Node} node1\n * @param {Node} node2\n * @param {number} edgeLength\n * @private\n */\n _calculateSpringForce(node1, node2, edgeLength) {\n let dx = (node1.x - node2.x);\n let dy = (node1.y - node2.y);\n let distance = Math.max(Math.sqrt(dx * dx + dy * dy),0.01);\n\n // the 1/distance is so the fx and fy can be calculated without sine or cosine.\n let springForce = this.options.springConstant * (edgeLength - distance) / distance;\n\n let fx = dx * springForce;\n let fy = dy * springForce;\n\n // handle the case where one node is not part of the physcis\n if (this.physicsBody.forces[node1.id] !== undefined) {\n this.physicsBody.forces[node1.id].x += fx;\n this.physicsBody.forces[node1.id].y += fy;\n }\n\n if (this.physicsBody.forces[node2.id] !== undefined) {\n this.physicsBody.forces[node2.id].x -= fx;\n this.physicsBody.forces[node2.id].y -= fy;\n }\n }\n}\n\nexport default SpringSolver;","/**\n * Hierarchical Spring Solver\n */\nclass HierarchicalSpringSolver {\n /**\n * @param {Object} body\n * @param {{physicsNodeIndices: Array, physicsEdgeIndices: Array, forces: {}, velocities: {}}} physicsBody\n * @param {Object} options\n */\n constructor(body, physicsBody, options) {\n this.body = body;\n this.physicsBody = physicsBody;\n this.setOptions(options);\n }\n\n /**\n *\n * @param {Object} options\n */\n setOptions(options) {\n this.options = options;\n }\n\n /**\n * This function calculates the springforces on the nodes, accounting for the support nodes.\n *\n * @private\n */\n solve() {\n var edgeLength, edge;\n var dx, dy, fx, fy, springForce, distance;\n var edges = this.body.edges;\n var factor = 0.5;\n\n var edgeIndices = this.physicsBody.physicsEdgeIndices;\n var nodeIndices = this.physicsBody.physicsNodeIndices;\n var forces = this.physicsBody.forces;\n\n // initialize the spring force counters\n for (let i = 0; i < nodeIndices.length; i++) {\n let nodeId = nodeIndices[i];\n forces[nodeId].springFx = 0;\n forces[nodeId].springFy = 0;\n }\n\n\n // forces caused by the edges, modelled as springs\n for (let i = 0; i < edgeIndices.length; i++) {\n edge = edges[edgeIndices[i]];\n if (edge.connected === true) {\n edgeLength = edge.options.length === undefined ? this.options.springLength : edge.options.length;\n\n dx = (edge.from.x - edge.to.x);\n dy = (edge.from.y - edge.to.y);\n distance = Math.sqrt(dx * dx + dy * dy);\n distance = distance === 0 ? 0.01 : distance;\n\n // the 1/distance is so the fx and fy can be calculated without sine or cosine.\n springForce = this.options.springConstant * (edgeLength - distance) / distance;\n\n fx = dx * springForce;\n fy = dy * springForce;\n\n if (edge.to.level != edge.from.level) {\n if (forces[edge.toId] !== undefined) {\n forces[edge.toId].springFx -= fx;\n forces[edge.toId].springFy -= fy;\n }\n if (forces[edge.fromId] !== undefined) {\n forces[edge.fromId].springFx += fx;\n forces[edge.fromId].springFy += fy;\n }\n }\n else {\n if (forces[edge.toId] !== undefined) {\n forces[edge.toId].x -= factor * fx;\n forces[edge.toId].y -= factor * fy;\n }\n if (forces[edge.fromId] !== undefined) {\n forces[edge.fromId].x += factor * fx;\n forces[edge.fromId].y += factor * fy;\n }\n }\n }\n }\n\n // normalize spring forces\n springForce = 1;\n var springFx, springFy;\n for (let i = 0; i < nodeIndices.length; i++) {\n let nodeId = nodeIndices[i];\n springFx = Math.min(springForce,Math.max(-springForce,forces[nodeId].springFx));\n springFy = Math.min(springForce,Math.max(-springForce,forces[nodeId].springFy));\n\n forces[nodeId].x += springFx;\n forces[nodeId].y += springFy;\n }\n\n // retain energy balance\n var totalFx = 0;\n var totalFy = 0;\n for (let i = 0; i < nodeIndices.length; i++) {\n let nodeId = nodeIndices[i];\n totalFx += forces[nodeId].x;\n totalFy += forces[nodeId].y;\n }\n var correctionFx = totalFx / nodeIndices.length;\n var correctionFy = totalFy / nodeIndices.length;\n\n for (let i = 0; i < nodeIndices.length; i++) {\n let nodeId = nodeIndices[i];\n forces[nodeId].x -= correctionFx;\n forces[nodeId].y -= correctionFy;\n }\n }\n}\n\nexport default HierarchicalSpringSolver;\n","/**\n * Central Gravity Solver\n */\nclass CentralGravitySolver {\n /**\n * @param {Object} body\n * @param {{physicsNodeIndices: Array, physicsEdgeIndices: Array, forces: {}, velocities: {}}} physicsBody\n * @param {Object} options\n */\n constructor(body, physicsBody, options) {\n this.body = body;\n this.physicsBody = physicsBody;\n this.setOptions(options);\n }\n\n /**\n *\n * @param {Object} options\n */\n setOptions(options) {\n this.options = options;\n }\n\n /**\n * Calculates forces for each node\n */\n solve() {\n let dx, dy, distance, node;\n let nodes = this.body.nodes;\n let nodeIndices = this.physicsBody.physicsNodeIndices;\n let forces = this.physicsBody.forces;\n\n for (let i = 0; i < nodeIndices.length; i++) {\n let nodeId = nodeIndices[i];\n node = nodes[nodeId];\n dx = -node.x;\n dy = -node.y;\n distance = Math.sqrt(dx * dx + dy * dy);\n\n this._calculateForces(distance, dx, dy, forces, node);\n }\n }\n\n /**\n * Calculate the forces based on the distance.\n * @param {number} distance\n * @param {number} dx\n * @param {number} dy\n * @param {Object} forces\n * @param {Node} node\n * @private\n */\n _calculateForces(distance, dx, dy, forces, node) {\n let gravityForce = (distance === 0) ? 0 : (this.options.centralGravity / distance);\n forces[node.id].x = dx * gravityForce;\n forces[node.id].y = dy * gravityForce;\n }\n}\n\n\nexport default CentralGravitySolver;","import BarnesHutSolver from \"./BarnesHutSolver\"\n\n/**\n * @extends BarnesHutSolver\n */\nclass ForceAtlas2BasedRepulsionSolver extends BarnesHutSolver {\n /**\n * @param {Object} body\n * @param {{physicsNodeIndices: Array, physicsEdgeIndices: Array, forces: {}, velocities: {}}} physicsBody\n * @param {Object} options\n */\n constructor(body, physicsBody, options) {\n super(body, physicsBody, options);\n }\n\n /**\n * Calculate the forces based on the distance.\n *\n * @param {number} distance\n * @param {number} dx\n * @param {number} dy\n * @param {Node} node\n * @param {Object} parentBranch\n * @private\n */\n _calculateForces(distance, dx, dy, node, parentBranch) {\n if (distance === 0) {\n distance = 0.1 * Math.random();\n dx = distance;\n }\n\n if (this.overlapAvoidanceFactor < 1 && node.shape.radius) {\n distance = Math.max(0.1 + (this.overlapAvoidanceFactor * node.shape.radius), distance - node.shape.radius);\n }\n\n let degree = (node.edges.length + 1);\n // the dividing by the distance cubed instead of squared allows us to get the fx and fy components without sines and cosines\n // it is shorthand for gravityforce with distance squared and fx = dx/distance * gravityForce\n let gravityForce = this.options.gravitationalConstant * parentBranch.mass * node.options.mass * degree / Math.pow(distance,2);\n let fx = dx * gravityForce;\n let fy = dy * gravityForce;\n\n this.physicsBody.forces[node.id].x += fx;\n this.physicsBody.forces[node.id].y += fy;\n }\n}\n\nexport default ForceAtlas2BasedRepulsionSolver;\n","import CentralGravitySolver from \"./CentralGravitySolver\"\n\n/**\n * @extends CentralGravitySolver\n */\nclass ForceAtlas2BasedCentralGravitySolver extends CentralGravitySolver {\n /**\n * @param {Object} body\n * @param {{physicsNodeIndices: Array, physicsEdgeIndices: Array, forces: {}, velocities: {}}} physicsBody\n * @param {Object} options\n */\n constructor(body, physicsBody, options) {\n super(body, physicsBody, options);\n }\n\n\n /**\n * Calculate the forces based on the distance.\n *\n * @param {number} distance\n * @param {number} dx\n * @param {number} dy\n * @param {Object} forces\n * @param {Node} node\n * @private\n */\n _calculateForces(distance, dx, dy, forces, node) {\n if (distance > 0) {\n let degree = (node.edges.length + 1);\n let gravityForce = this.options.centralGravity * degree * node.options.mass;\n forces[node.id].x = dx * gravityForce;\n forces[node.id].y = dy * gravityForce;\n }\n }\n}\n\nexport default ForceAtlas2BasedCentralGravitySolver;","import BarnesHutSolver from './components/physics/BarnesHutSolver';\nimport Repulsion from './components/physics/RepulsionSolver';\nimport HierarchicalRepulsion from './components/physics/HierarchicalRepulsionSolver';\nimport SpringSolver from './components/physics/SpringSolver';\nimport HierarchicalSpringSolver from './components/physics/HierarchicalSpringSolver';\nimport CentralGravitySolver from './components/physics/CentralGravitySolver';\nimport ForceAtlas2BasedRepulsionSolver from './components/physics/FA2BasedRepulsionSolver';\nimport ForceAtlas2BasedCentralGravitySolver from './components/physics/FA2BasedCentralGravitySolver';\nimport util from 'vis-util';\nimport EndPoints from './components/edges/util/EndPoints'; // for debugging with _drawForces()\n\n\n/**\n * The physics engine\n */\nclass PhysicsEngine {\n /**\n * @param {Object} body\n */\n constructor(body) {\n this.body = body;\n this.physicsBody = {physicsNodeIndices:[], physicsEdgeIndices:[], forces: {}, velocities: {}};\n\n this.physicsEnabled = true;\n this.simulationInterval = 1000 / 60;\n this.requiresTimeout = true;\n this.previousStates = {};\n this.referenceState = {};\n this.freezeCache = {};\n this.renderTimer = undefined;\n\n // parameters for the adaptive timestep\n this.adaptiveTimestep = false;\n this.adaptiveTimestepEnabled = false;\n this.adaptiveCounter = 0;\n this.adaptiveInterval = 3;\n\n this.stabilized = false;\n this.startedStabilization = false;\n this.stabilizationIterations = 0;\n this.ready = false; // will be set to true if the stabilize\n\n // default options\n this.options = {};\n this.defaultOptions = {\n enabled: true,\n barnesHut: {\n theta: 0.5,\n gravitationalConstant: -2000,\n centralGravity: 0.3,\n springLength: 95,\n springConstant: 0.04,\n damping: 0.09,\n avoidOverlap: 0\n },\n forceAtlas2Based: {\n theta: 0.5,\n gravitationalConstant: -50,\n centralGravity: 0.01,\n springConstant: 0.08,\n springLength: 100,\n damping: 0.4,\n avoidOverlap: 0\n },\n repulsion: {\n centralGravity: 0.2,\n springLength: 200,\n springConstant: 0.05,\n nodeDistance: 100,\n damping: 0.09,\n avoidOverlap: 0\n },\n hierarchicalRepulsion: {\n centralGravity: 0.0,\n springLength: 100,\n springConstant: 0.01,\n nodeDistance: 120,\n damping: 0.09\n },\n maxVelocity: 50,\n minVelocity: 0.75, // px/s\n solver: 'barnesHut',\n stabilization: {\n enabled: true,\n iterations: 1000, // maximum number of iteration to stabilize\n updateInterval: 50,\n onlyDynamicEdges: false,\n fit: true\n },\n timestep: 0.5,\n adaptiveTimestep: true\n };\n util.extend(this.options, this.defaultOptions);\n this.timestep = 0.5;\n this.layoutFailed = false;\n\n this.bindEventListeners();\n }\n\n /**\n * Binds event listeners\n */\n bindEventListeners() {\n this.body.emitter.on('initPhysics', () => {this.initPhysics();});\n this.body.emitter.on('_layoutFailed', () => {this.layoutFailed = true;});\n this.body.emitter.on('resetPhysics', () => {this.stopSimulation(); this.ready = false;});\n this.body.emitter.on('disablePhysics', () => {this.physicsEnabled = false; this.stopSimulation();});\n this.body.emitter.on('restorePhysics', () => {\n this.setOptions(this.options);\n if (this.ready === true) {\n this.startSimulation();\n }\n });\n this.body.emitter.on('startSimulation', () => {\n if (this.ready === true) {\n this.startSimulation();\n }\n });\n this.body.emitter.on('stopSimulation', () => {this.stopSimulation();});\n this.body.emitter.on('destroy', () => {\n this.stopSimulation(false);\n this.body.emitter.off();\n });\n this.body.emitter.on(\"_dataChanged\", () => {\n // Nodes and/or edges have been added or removed, update shortcut lists.\n this.updatePhysicsData();\n });\n\n // debug: show forces\n // this.body.emitter.on(\"afterDrawing\", (ctx) => {this._drawForces(ctx);});\n }\n\n\n /**\n * set the physics options\n * @param {Object} options\n */\n setOptions(options) {\n if (options !== undefined) {\n if (options === false) {\n this.options.enabled = false;\n this.physicsEnabled = false;\n this.stopSimulation();\n }\n else if (options === true) {\n this.options.enabled = true;\n this.physicsEnabled = true;\n this.startSimulation();\n }\n else {\n this.physicsEnabled = true;\n util.selectiveNotDeepExtend(['stabilization'], this.options, options);\n util.mergeOptions(this.options, options, 'stabilization');\n\n if (options.enabled === undefined) {\n this.options.enabled = true;\n }\n\n if (this.options.enabled === false) {\n this.physicsEnabled = false;\n this.stopSimulation();\n }\n\n // set the timestep\n this.timestep = this.options.timestep;\n }\n }\n this.init();\n }\n\n\n /**\n * configure the engine.\n */\n init() {\n var options;\n if (this.options.solver === 'forceAtlas2Based') {\n options = this.options.forceAtlas2Based;\n this.nodesSolver = new ForceAtlas2BasedRepulsionSolver(this.body, this.physicsBody, options);\n this.edgesSolver = new SpringSolver(this.body, this.physicsBody, options);\n this.gravitySolver = new ForceAtlas2BasedCentralGravitySolver(this.body, this.physicsBody, options);\n }\n else if (this.options.solver === 'repulsion') {\n options = this.options.repulsion;\n this.nodesSolver = new Repulsion(this.body, this.physicsBody, options);\n this.edgesSolver = new SpringSolver(this.body, this.physicsBody, options);\n this.gravitySolver = new CentralGravitySolver(this.body, this.physicsBody, options);\n }\n else if (this.options.solver === 'hierarchicalRepulsion') {\n options = this.options.hierarchicalRepulsion;\n this.nodesSolver = new HierarchicalRepulsion(this.body, this.physicsBody, options);\n this.edgesSolver = new HierarchicalSpringSolver(this.body, this.physicsBody, options);\n this.gravitySolver = new CentralGravitySolver(this.body, this.physicsBody, options);\n }\n else { // barnesHut\n options = this.options.barnesHut;\n this.nodesSolver = new BarnesHutSolver(this.body, this.physicsBody, options);\n this.edgesSolver = new SpringSolver(this.body, this.physicsBody, options);\n this.gravitySolver = new CentralGravitySolver(this.body, this.physicsBody, options);\n }\n\n this.modelOptions = options;\n }\n\n\n /**\n * initialize the engine\n */\n initPhysics() {\n if (this.physicsEnabled === true && this.options.enabled === true) {\n if (this.options.stabilization.enabled === true) {\n this.stabilize();\n }\n else {\n this.stabilized = false;\n this.ready = true;\n this.body.emitter.emit('fit', {}, this.layoutFailed); // if the layout failed, we use the approximation for the zoom\n this.startSimulation();\n }\n }\n else {\n this.ready = true;\n this.body.emitter.emit('fit');\n }\n }\n\n /**\n * Start the simulation\n */\n startSimulation() {\n if (this.physicsEnabled === true && this.options.enabled === true) {\n this.stabilized = false;\n\n // when visible, adaptivity is disabled.\n this.adaptiveTimestep = false;\n\n // this sets the width of all nodes initially which could be required for the avoidOverlap\n this.body.emitter.emit(\"_resizeNodes\");\n if (this.viewFunction === undefined) {\n this.viewFunction = this.simulationStep.bind(this);\n this.body.emitter.on('initRedraw', this.viewFunction);\n this.body.emitter.emit('_startRendering');\n }\n }\n else {\n this.body.emitter.emit('_redraw');\n }\n }\n\n\n /**\n * Stop the simulation, force stabilization.\n * @param {boolean} [emit=true]\n */\n stopSimulation(emit = true) {\n this.stabilized = true;\n if (emit === true) {\n this._emitStabilized();\n }\n if (this.viewFunction !== undefined) {\n this.body.emitter.off('initRedraw', this.viewFunction);\n this.viewFunction = undefined;\n if (emit === true) {\n this.body.emitter.emit('_stopRendering');\n }\n }\n }\n\n\n /**\n * The viewFunction inserts this step into each render loop. It calls the physics tick and handles the cleanup at stabilized.\n *\n */\n simulationStep() {\n // check if the physics have settled\n var startTime = Date.now();\n this.physicsTick();\n var physicsTime = Date.now() - startTime;\n\n // run double speed if it is a little graph\n if ((physicsTime < 0.4 * this.simulationInterval || this.runDoubleSpeed === true) && this.stabilized === false) {\n this.physicsTick();\n\n // this makes sure there is no jitter. The decision is taken once to run it at double speed.\n this.runDoubleSpeed = true;\n }\n\n if (this.stabilized === true) {\n this.stopSimulation();\n }\n }\n\n\n /**\n * trigger the stabilized event.\n *\n * @param {number} [amountOfIterations=this.stabilizationIterations]\n * @private\n */\n _emitStabilized(amountOfIterations = this.stabilizationIterations) {\n if (this.stabilizationIterations > 1 || this.startedStabilization === true) {\n setTimeout(() => {\n this.body.emitter.emit('stabilized', {iterations: amountOfIterations});\n this.startedStabilization = false;\n this.stabilizationIterations = 0;\n }, 0);\n }\n }\n\n\n /**\n * Calculate the forces for one physics iteration and move the nodes.\n * @private\n */\n physicsStep() {\n this.gravitySolver.solve();\n this.nodesSolver.solve();\n this.edgesSolver.solve();\n this.moveNodes();\n }\n\n\n /**\n * Make dynamic adjustments to the timestep, based on current state.\n *\n * Helper function for physicsTick().\n * @private\n */\n adjustTimeStep() {\n const factor = 1.2; // Factor for increasing the timestep on success.\n\n // we compare the two steps. if it is acceptable we double the step.\n if (this._evaluateStepQuality() === true) {\n this.timestep = factor * this.timestep;\n }\n else {\n // if not, we decrease the step to a minimum of the options timestep.\n // if the decreased timestep is smaller than the options step, we do not reset the counter\n // we assume that the options timestep is stable enough.\n if (this.timestep/factor < this.options.timestep) {\n this.timestep = this.options.timestep;\n }\n else {\n // if the timestep was larger than 2 times the option one we check the adaptivity again to ensure\n // that large instabilities do not form.\n this.adaptiveCounter = -1; // check again next iteration\n this.timestep = Math.max(this.options.timestep, this.timestep/factor);\n }\n }\n }\n\n\n /**\n * A single simulation step (or 'tick') in the physics simulation\n *\n * @private\n */\n physicsTick() {\n this._startStabilizing(); // this ensures that there is no start event when the network is already stable.\n if (this.stabilized === true) return;\n\n // adaptivity means the timestep adapts to the situation, only applicable for stabilization\n if (this.adaptiveTimestep === true && this.adaptiveTimestepEnabled === true) {\n // timestep remains stable for \"interval\" iterations.\n let doAdaptive = (this.adaptiveCounter % this.adaptiveInterval === 0);\n\n if (doAdaptive) {\n // first the big step and revert.\n this.timestep = 2 * this.timestep;\n this.physicsStep();\n this.revert(); // saves the reference state\n\n // now the normal step. Since this is the last step, it is the more stable one and we will take this.\n this.timestep = 0.5 * this.timestep;\n\n // since it's half the step, we do it twice.\n this.physicsStep();\n this.physicsStep();\n\n this.adjustTimeStep();\n }\n else {\n this.physicsStep(); // normal step, keeping timestep constant\n }\n\n this.adaptiveCounter += 1;\n }\n else {\n // case for the static timestep, we reset it to the one in options and take a normal step.\n this.timestep = this.options.timestep;\n this.physicsStep();\n }\n\n if (this.stabilized === true) this.revert();\n this.stabilizationIterations++;\n }\n\n\n /**\n * Nodes and edges can have the physics toggles on or off. A collection of indices is created here so we can skip the check all the time.\n *\n * @private\n */\n updatePhysicsData() {\n this.physicsBody.forces = {};\n this.physicsBody.physicsNodeIndices = [];\n this.physicsBody.physicsEdgeIndices = [];\n let nodes = this.body.nodes;\n let edges = this.body.edges;\n\n // get node indices for physics\n for (let nodeId in nodes) {\n if (nodes.hasOwnProperty(nodeId)) {\n if (nodes[nodeId].options.physics === true) {\n this.physicsBody.physicsNodeIndices.push(nodes[nodeId].id);\n }\n }\n }\n\n // get edge indices for physics\n for (let edgeId in edges) {\n if (edges.hasOwnProperty(edgeId)) {\n if (edges[edgeId].options.physics === true) {\n this.physicsBody.physicsEdgeIndices.push(edges[edgeId].id);\n }\n }\n }\n\n // get the velocity and the forces vector\n for (let i = 0; i < this.physicsBody.physicsNodeIndices.length; i++) {\n let nodeId = this.physicsBody.physicsNodeIndices[i];\n this.physicsBody.forces[nodeId] = {x:0,y:0};\n\n // forces can be reset because they are recalculated. Velocities have to persist.\n if (this.physicsBody.velocities[nodeId] === undefined) {\n this.physicsBody.velocities[nodeId] = {x:0,y:0};\n }\n }\n\n // clean deleted nodes from the velocity vector\n for (let nodeId in this.physicsBody.velocities) {\n if (nodes[nodeId] === undefined) {\n delete this.physicsBody.velocities[nodeId];\n }\n }\n }\n\n\n /**\n * Revert the simulation one step. This is done so after stabilization, every new start of the simulation will also say stabilized.\n */\n revert() {\n var nodeIds = Object.keys(this.previousStates);\n var nodes = this.body.nodes;\n var velocities = this.physicsBody.velocities;\n this.referenceState = {};\n\n for (let i = 0; i < nodeIds.length; i++) {\n let nodeId = nodeIds[i];\n if (nodes[nodeId] !== undefined) {\n if (nodes[nodeId].options.physics === true) {\n this.referenceState[nodeId] = {\n positions: {x:nodes[nodeId].x, y:nodes[nodeId].y}\n };\n velocities[nodeId].x = this.previousStates[nodeId].vx;\n velocities[nodeId].y = this.previousStates[nodeId].vy;\n nodes[nodeId].x = this.previousStates[nodeId].x;\n nodes[nodeId].y = this.previousStates[nodeId].y;\n }\n }\n else {\n delete this.previousStates[nodeId];\n }\n }\n }\n\n /**\n * This compares the reference state to the current state\n *\n * @returns {boolean}\n * @private\n */\n _evaluateStepQuality() {\n let dx, dy, dpos;\n let nodes = this.body.nodes;\n let reference = this.referenceState;\n let posThreshold = 0.3;\n\n for (let nodeId in this.referenceState) {\n if (this.referenceState.hasOwnProperty(nodeId) && nodes[nodeId] !== undefined) {\n dx = nodes[nodeId].x - reference[nodeId].positions.x;\n dy = nodes[nodeId].y - reference[nodeId].positions.y;\n\n dpos = Math.sqrt(Math.pow(dx,2) + Math.pow(dy,2))\n\n if (dpos > posThreshold) {\n return false;\n }\n }\n }\n return true;\n }\n\n /**\n * move the nodes one timestep and check if they are stabilized\n */\n moveNodes() {\n var nodeIndices = this.physicsBody.physicsNodeIndices;\n var maxNodeVelocity = 0;\n var averageNodeVelocity = 0;\n\n // the velocity threshold (energy in the system) for the adaptivity toggle\n var velocityAdaptiveThreshold = 5;\n\n for (let i = 0; i < nodeIndices.length; i++) {\n let nodeId = nodeIndices[i];\n let nodeVelocity = this._performStep(nodeId);\n // stabilized is true if stabilized is true and velocity is smaller than vmin --> all nodes must be stabilized\n maxNodeVelocity = Math.max(maxNodeVelocity, nodeVelocity);\n averageNodeVelocity += nodeVelocity;\n }\n\n // evaluating the stabilized and adaptiveTimestepEnabled conditions\n this.adaptiveTimestepEnabled = (averageNodeVelocity/nodeIndices.length) < velocityAdaptiveThreshold;\n this.stabilized = maxNodeVelocity < this.options.minVelocity;\n }\n\n\n /**\n * Calculate new velocity for a coordinate direction\n *\n * @param {number} v velocity for current coordinate\n * @param {number} f regular force for current coordinate\n * @param {number} m mass of current node\n * @returns {number} new velocity for current coordinate\n * @private\n */\n calculateComponentVelocity(v,f, m) {\n let df = this.modelOptions.damping * v; // damping force\n let a = (f - df) / m; // acceleration\n\n v += a * this.timestep;\n\n // Put a limit on the velocities if it is really high\n let maxV = this.options.maxVelocity || 1e9;\n if (Math.abs(v) > maxV) {\n v = ((v > 0) ? maxV: -maxV);\n }\n\n return v;\n }\n\n\n /**\n * Perform the actual step\n *\n * @param {Node.id} nodeId\n * @returns {number} the new velocity of given node\n * @private\n */\n _performStep(nodeId) {\n let node = this.body.nodes[nodeId];\n let force = this.physicsBody.forces[nodeId];\n let velocity = this.physicsBody.velocities[nodeId];\n\n // store the state so we can revert\n this.previousStates[nodeId] = {x:node.x, y:node.y, vx:velocity.x, vy:velocity.y};\n\n if (node.options.fixed.x === false) {\n velocity.x = this.calculateComponentVelocity(velocity.x, force.x, node.options.mass);\n node.x += velocity.x * this.timestep;\n }\n else {\n force.x = 0;\n velocity.x = 0;\n }\n\n if (node.options.fixed.y === false) {\n velocity.y = this.calculateComponentVelocity(velocity.y, force.y, node.options.mass);\n node.y += velocity.y * this.timestep;\n }\n else {\n force.y = 0;\n velocity.y = 0;\n }\n\n let totalVelocity = Math.sqrt(Math.pow(velocity.x,2) + Math.pow(velocity.y,2));\n return totalVelocity;\n }\n\n\n /**\n * When initializing and stabilizing, we can freeze nodes with a predefined position.\n * This greatly speeds up stabilization because only the supportnodes for the smoothCurves have to settle.\n *\n * @private\n */\n _freezeNodes() {\n var nodes = this.body.nodes;\n for (var id in nodes) {\n if (nodes.hasOwnProperty(id)) {\n if (nodes[id].x && nodes[id].y) {\n let fixed = nodes[id].options.fixed;\n this.freezeCache[id] = {x:fixed.x, y:fixed.y};\n fixed.x = true;\n fixed.y = true;\n }\n }\n }\n }\n\n\n /**\n * Unfreezes the nodes that have been frozen by _freezeDefinedNodes.\n *\n * @private\n */\n _restoreFrozenNodes() {\n var nodes = this.body.nodes;\n for (var id in nodes) {\n if (nodes.hasOwnProperty(id)) {\n if (this.freezeCache[id] !== undefined) {\n nodes[id].options.fixed.x = this.freezeCache[id].x;\n nodes[id].options.fixed.y = this.freezeCache[id].y;\n }\n }\n }\n this.freezeCache = {};\n }\n\n /**\n * Find a stable position for all nodes\n *\n * @param {number} [iterations=this.options.stabilization.iterations]\n */\n stabilize(iterations = this.options.stabilization.iterations) {\n if (typeof iterations !== 'number') {\n iterations = this.options.stabilization.iterations;\n console.log('The stabilize method needs a numeric amount of iterations. Switching to default: ', iterations);\n }\n\n if (this.physicsBody.physicsNodeIndices.length === 0) {\n this.ready = true;\n return;\n }\n\n // enable adaptive timesteps\n this.adaptiveTimestep = true && this.options.adaptiveTimestep;\n\n // this sets the width of all nodes initially which could be required for the avoidOverlap\n this.body.emitter.emit(\"_resizeNodes\");\n\n this.stopSimulation(); // stop the render loop\n this.stabilized = false;\n\n // block redraw requests\n this.body.emitter.emit('_blockRedraw');\n this.targetIterations = iterations;\n\n // start the stabilization\n if (this.options.stabilization.onlyDynamicEdges === true) {\n this._freezeNodes();\n }\n this.stabilizationIterations = 0;\n\n setTimeout(() => this._stabilizationBatch(),0);\n }\n\n\n /**\n * If not already stabilizing, start it and emit a start event.\n *\n * @returns {boolean} true if stabilization started with this call\n * @private\n */\n _startStabilizing() {\n if (this.startedStabilization === true) return false;\n\n this.body.emitter.emit('startStabilizing');\n this.startedStabilization = true;\n return true;\n }\n\n\n /**\n * One batch of stabilization\n * @private\n */\n _stabilizationBatch() {\n var running = () => (this.stabilized === false && this.stabilizationIterations < this.targetIterations);\n\n var sendProgress = () => {\n this.body.emitter.emit('stabilizationProgress', {\n iterations: this.stabilizationIterations,\n total: this.targetIterations\n });\n };\n\n if (this._startStabilizing()) {\n sendProgress(); // Ensure that there is at least one start event.\n }\n\n var count = 0;\n while (running() && count < this.options.stabilization.updateInterval) {\n this.physicsTick();\n count++;\n }\n\n sendProgress();\n\n if (running()) {\n setTimeout(this._stabilizationBatch.bind(this),0);\n }\n else {\n this._finalizeStabilization();\n }\n }\n\n\n /**\n * Wrap up the stabilization, fit and emit the events.\n * @private\n */\n _finalizeStabilization() {\n this.body.emitter.emit('_allowRedraw');\n if (this.options.stabilization.fit === true) {\n this.body.emitter.emit('fit');\n }\n\n if (this.options.stabilization.onlyDynamicEdges === true) {\n this._restoreFrozenNodes();\n }\n\n this.body.emitter.emit('stabilizationIterationsDone');\n this.body.emitter.emit('_requestRedraw');\n\n if (this.stabilized === true) {\n this._emitStabilized();\n }\n else {\n this.startSimulation();\n }\n\n this.ready = true;\n }\n\n\n //--------------------------- DEBUGGING BELOW ---------------------------//\n\n\n /**\n * Debug function that display arrows for the forces currently active in the network.\n *\n * Use this when debugging only.\n *\n * @param {CanvasRenderingContext2D} ctx\n * @private\n */\n _drawForces(ctx) {\n for (var i = 0; i < this.physicsBody.physicsNodeIndices.length; i++) {\n let index = this.physicsBody.physicsNodeIndices[i];\n let node = this.body.nodes[index];\n let force = this.physicsBody.forces[index];\n let factor = 20;\n let colorFactor = 0.03;\n let forceSize = Math.sqrt(Math.pow(force.x,2) + Math.pow(force.x,2));\n\n let size = Math.min(Math.max(5,forceSize),15);\n let arrowSize = 3*size;\n\n let color = util.HSVToHex((180 - Math.min(1,Math.max(0,colorFactor*forceSize))*180) / 360,1,1);\n\n let point = {\n x: node.x + factor*force.x,\n y: node.y + factor*force.y\n };\n\n ctx.lineWidth = size;\n ctx.strokeStyle = color;\n ctx.beginPath();\n ctx.moveTo(node.x,node.y);\n ctx.lineTo(point.x, point.y);\n ctx.stroke();\n\n let angle = Math.atan2(force.y, force.x);\n ctx.fillStyle = color;\n EndPoints.draw(ctx, {type: 'arrow', point: point, angle: angle, length: arrowSize});\n ctx.fill();\n\n }\n }\n}\n\nexport default PhysicsEngine;\n","import util from 'vis-util';\n\n/**\n * Utility Class\n */\nclass NetworkUtil {\n /**\n * @ignore\n */\n constructor() {}\n\n /**\n * Find the center position of the network considering the bounding boxes\n *\n * @param {Array.} allNodes\n * @param {Array.} [specificNodes=[]]\n * @returns {{minX: number, maxX: number, minY: number, maxY: number}}\n * @static\n */\n static getRange(allNodes, specificNodes = []) {\n var minY = 1e9, maxY = -1e9, minX = 1e9, maxX = -1e9, node;\n if (specificNodes.length > 0) {\n for (var i = 0; i < specificNodes.length; i++) {\n node = allNodes[specificNodes[i]];\n if (minX > node.shape.boundingBox.left) {\n minX = node.shape.boundingBox.left;\n }\n if (maxX < node.shape.boundingBox.right) {\n maxX = node.shape.boundingBox.right;\n }\n if (minY > node.shape.boundingBox.top) {\n minY = node.shape.boundingBox.top;\n } // top is negative, bottom is positive\n if (maxY < node.shape.boundingBox.bottom) {\n maxY = node.shape.boundingBox.bottom;\n } // top is negative, bottom is positive\n }\n }\n\n if (minX === 1e9 && maxX === -1e9 && minY === 1e9 && maxY === -1e9) {\n minY = 0, maxY = 0, minX = 0, maxX = 0;\n }\n return {minX: minX, maxX: maxX, minY: minY, maxY: maxY};\n }\n\n /**\n * Find the center position of the network\n *\n * @param {Array.} allNodes\n * @param {Array.} [specificNodes=[]]\n * @returns {{minX: number, maxX: number, minY: number, maxY: number}}\n * @static\n */\n static getRangeCore(allNodes, specificNodes = []) {\n var minY = 1e9, maxY = -1e9, minX = 1e9, maxX = -1e9, node;\n if (specificNodes.length > 0) {\n for (var i = 0; i < specificNodes.length; i++) {\n node = allNodes[specificNodes[i]];\n if (minX > node.x) {\n minX = node.x;\n }\n if (maxX < node.x) {\n maxX = node.x;\n }\n if (minY > node.y) {\n minY = node.y;\n } // top is negative, bottom is positive\n if (maxY < node.y) {\n maxY = node.y;\n } // top is negative, bottom is positive\n }\n }\n\n if (minX === 1e9 && maxX === -1e9 && minY === 1e9 && maxY === -1e9) {\n minY = 0, maxY = 0, minX = 0, maxX = 0;\n }\n return {minX: minX, maxX: maxX, minY: minY, maxY: maxY};\n }\n\n\n /**\n * @param {object} range = {minX: minX, maxX: maxX, minY: minY, maxY: maxY};\n * @returns {{x: number, y: number}}\n * @static\n */\n static findCenter(range) {\n return {x: (0.5 * (range.maxX + range.minX)),\n y: (0.5 * (range.maxY + range.minY))};\n }\n\n\n /**\n * This returns a clone of the options or options of the edge or node to be used for construction of new edges or check functions for new nodes.\n * @param {vis.Item} item\n * @param {'node'|undefined} type\n * @returns {{}}\n * @static\n */\n static cloneOptions(item, type) {\n let clonedOptions = {};\n if (type === undefined || type === 'node') {\n util.deepExtend(clonedOptions, item.options, true);\n clonedOptions.x = item.x;\n clonedOptions.y = item.y;\n clonedOptions.amountOfConnections = item.edges.length;\n }\n else {\n util.deepExtend(clonedOptions, item.options, true);\n }\n return clonedOptions;\n }\n\n}\n\nexport default NetworkUtil;","import util from 'vis-util';\nimport Node from \"../Node\";\n\n/**\n * A Cluster is a special Node that allows a group of Nodes positioned closely together\n * to be represented by a single Cluster Node.\n *\n * @extends Node\n */\nclass Cluster extends Node {\n /**\n * @param {Object} options\n * @param {Object} body\n * @param {Array.}imagelist\n * @param {Array} grouplist\n * @param {Object} globalOptions\n * @param {Object} defaultOptions Global default options for nodes\n */\n constructor(options, body, imagelist, grouplist, globalOptions, defaultOptions) {\n super(options, body, imagelist, grouplist, globalOptions, defaultOptions);\n\n this.isCluster = true;\n this.containedNodes = {};\n this.containedEdges = {};\n }\n\n\n /**\n * Transfer child cluster data to current and disconnect the child cluster.\n *\n * Please consult the header comment in 'Clustering.js' for the fields set here.\n *\n * @param {string|number} childClusterId id of child cluster to open\n */\n _openChildCluster(childClusterId) {\n let childCluster = this.body.nodes[childClusterId];\n if (this.containedNodes[childClusterId] === undefined) {\n throw new Error('node with id: ' + childClusterId + ' not in current cluster');\n }\n if (!childCluster.isCluster) {\n throw new Error('node with id: ' + childClusterId + ' is not a cluster');\n }\n\n // Disconnect child cluster from current cluster\n delete this.containedNodes[childClusterId];\n util.forEach(childCluster.edges, (edge) => {\n delete this.containedEdges[edge.id];\n });\n\n // Transfer nodes and edges\n util.forEach(childCluster.containedNodes, (node, nodeId) => {\n this.containedNodes[nodeId] = node;\n });\n childCluster.containedNodes = {};\n\n util.forEach(childCluster.containedEdges, (edge, edgeId) => {\n this.containedEdges[edgeId] = edge;\n });\n childCluster.containedEdges = {};\n\n // Transfer edges within cluster edges which are clustered\n util.forEach(childCluster.edges, (clusterEdge) => {\n util.forEach(this.edges, (parentClusterEdge) => {\n // Assumption: a clustered edge can only be present in a single clustering edge\n // Not tested here\n let index = parentClusterEdge.clusteringEdgeReplacingIds.indexOf(clusterEdge.id);\n if (index === -1) return;\n\n util.forEach(clusterEdge.clusteringEdgeReplacingIds, (srcId) => {\n parentClusterEdge.clusteringEdgeReplacingIds.push(srcId);\n\n // Maintain correct bookkeeping for transferred edge\n this.body.edges[srcId].edgeReplacedById = parentClusterEdge.id;\n });\n\n // Remove cluster edge from parent cluster edge\n parentClusterEdge.clusteringEdgeReplacingIds.splice(index, 1);\n });\n });\n childCluster.edges = [];\n }\n}\n\n\nexport default Cluster;\n","/* ===========================================================================\n\n# TODO\n\n- `edgeReplacedById` not cleaned up yet on cluster edge removal\n- allowSingleNodeCluster could be a global option as well; currently needs to always\n be passed to clustering methods\n\n----------------------------------------------\n\n# State Model for Clustering\n\nThe total state for clustering is non-trivial. It is useful to have a model\navailable as to how it works. The following documents the relevant state items.\n\n\n## Network State\n\nThe following `network`-members are relevant to clustering:\n\n- `body.nodes` - all nodes actively participating in the network\n- `body.edges` - same for edges\n- `body.nodeIndices` - id's of nodes that are visible at a given moment\n- `body.edgeIndices` - same for edges\n\nThis includes:\n\n- helper nodes for dragging in `manipulation`\n- helper nodes for edge type `dynamic`\n- cluster nodes and edges\n- there may be more than this.\n\nA node/edge may be missing in the `Indices` member if:\n\n- it is a helper node\n- the node or edge state has option `hidden` set\n- It is not visible due to clustering\n\n\n## Clustering State\n\nFor the hashes, the id's of the nodes/edges are used as key.\n\nMember `network.clustering` contains the following items:\n\n- `clusteredNodes` - hash with values: { clusterId: , node: }\n- `clusteredEdges` - hash with values: restore information for given edge\n\n\nDue to nesting of clusters, these members can contain cluster nodes and edges as well.\n\nThe important thing to note here, is that the clustered nodes and edges also\nappear in the members of the cluster nodes. For data update, it is therefore \nimportant to scan these lists as well as the cluster nodes.\n\n\n### Cluster Node\n\nA cluster node has the following extra fields:\n\n- `isCluster : true` - indication that this is a cluster node\n- `containedNodes` - hash of nodes contained in this cluster\n- `containedEdges` - same for edges\n- `edges` - array of cluster edges for this node \n\n\n**NOTE:**\n\n- `containedEdges` can also contain edges which are not clustered; e.g. an edge\n connecting two nodes in the same cluster.\n\n\n### Cluster Edge\n\nThese are the items in the `edges` member of a clustered node. They have the\nfollowing relevant members:\n\n- 'clusteringEdgeReplacingIds` - array of id's of edges replaced by this edge\n\nNote that it's possible to nest clusters, so that `clusteringEdgeReplacingIds`\ncan contain edge id's of other clusters.\n\n\n### Clustered Edge\n\nThis is any edge contained by a cluster edge. It gets the following additional\nmember:\n\n- `edgeReplacedById` - id of the cluster edge in which current edge is clustered\n\n\n =========================================================================== */\nimport util from 'vis-util';\nimport NetworkUtil from'../NetworkUtil';\nimport Cluster from'./components/nodes/Cluster';\nimport Edge from './components/Edge'; // Only needed for check on type!\nimport Node from './components/Node'; // Only needed for check on type!\n\n/**\n * The clustering engine\n */\nclass ClusterEngine {\n /**\n * @param {Object} body\n */\n constructor(body) {\n this.body = body;\n this.clusteredNodes = {}; // key: node id, value: { clusterId: , node: }\n this.clusteredEdges = {}; // key: edge id, value: restore information for given edge\n\n this.options = {};\n this.defaultOptions = {};\n util.extend(this.options, this.defaultOptions);\n\n this.body.emitter.on('_resetData', () => {this.clusteredNodes = {}; this.clusteredEdges = {};})\n }\n\n /**\n *\n * @param {number} hubsize\n * @param {Object} options\n */\n clusterByHubsize(hubsize, options) {\n if (hubsize === undefined) {\n hubsize = this._getHubSize();\n }\n else if (typeof(hubsize) === \"object\") {\n options = this._checkOptions(hubsize);\n hubsize = this._getHubSize();\n }\n\n let nodesToCluster = [];\n for (let i = 0; i < this.body.nodeIndices.length; i++) {\n let node = this.body.nodes[this.body.nodeIndices[i]];\n if (node.edges.length >= hubsize) {\n nodesToCluster.push(node.id);\n }\n }\n\n for (let i = 0; i < nodesToCluster.length; i++) {\n this.clusterByConnection(nodesToCluster[i],options,true);\n }\n\n this.body.emitter.emit('_dataChanged');\n }\n\n\n /**\n * loop over all nodes, check if they adhere to the condition and cluster if needed.\n * @param {Object} options\n * @param {boolean} [refreshData=true]\n */\n cluster(options = {}, refreshData = true) {\n if (options.joinCondition === undefined) {throw new Error(\"Cannot call clusterByNodeData without a joinCondition function in the options.\");}\n\n // check if the options object is fine, append if needed\n options = this._checkOptions(options);\n\n let childNodesObj = {};\n let childEdgesObj = {};\n\n // collect the nodes that will be in the cluster\n util.forEach(this.body.nodes, (node, nodeId) => {\n if (node.options && options.joinCondition(node.options) === true) {\n childNodesObj[nodeId] = node;\n\n // collect the edges that will be in the cluster\n util.forEach(node.edges, (edge) => {\n if (this.clusteredEdges[edge.id] === undefined) {\n childEdgesObj[edge.id] = edge;\n }\n });\n }\n });\n\n this._cluster(childNodesObj, childEdgesObj, options, refreshData);\n }\n\n\n /**\n * Cluster all nodes in the network that have only X edges\n * @param {number} edgeCount\n * @param {Object} options\n * @param {boolean} [refreshData=true]\n */\n clusterByEdgeCount(edgeCount, options, refreshData = true) {\n options = this._checkOptions(options);\n let clusters = [];\n let usedNodes = {};\n let edge, edges, relevantEdgeCount;\n // collect the nodes that will be in the cluster\n for (let i = 0; i < this.body.nodeIndices.length; i++) {\n let childNodesObj = {};\n let childEdgesObj = {};\n let nodeId = this.body.nodeIndices[i];\n let node = this.body.nodes[nodeId];\n\n // if this node is already used in another cluster this session, we do not have to re-evaluate it.\n if (usedNodes[nodeId] === undefined) {\n relevantEdgeCount = 0;\n edges = [];\n for (let j = 0; j < node.edges.length; j++) {\n edge = node.edges[j];\n if (this.clusteredEdges[edge.id] === undefined) {\n if (edge.toId !== edge.fromId) {\n relevantEdgeCount++;\n }\n edges.push(edge);\n }\n }\n\n // this node qualifies, we collect its neighbours to start the clustering process.\n if (relevantEdgeCount === edgeCount) {\n var checkJoinCondition = function(node) {\n if (options.joinCondition === undefined || options.joinCondition === null) {\n return true;\n }\n\n let clonedOptions = NetworkUtil.cloneOptions(node);\n return options.joinCondition(clonedOptions);\n }\n\n let gatheringSuccessful = true;\n for (let j = 0; j < edges.length; j++) {\n edge = edges[j];\n let childNodeId = this._getConnectedId(edge, nodeId);\n // add the nodes to the list by the join condition.\n if (checkJoinCondition(node)) {\n childEdgesObj[edge.id] = edge;\n childNodesObj[nodeId] = node;\n childNodesObj[childNodeId] = this.body.nodes[childNodeId];\n usedNodes[nodeId] = true;\n } else {\n // this node does not qualify after all.\n gatheringSuccessful = false;\n break;\n }\n }\n\n // add to the cluster queue\n if (Object.keys(childNodesObj).length > 0 && Object.keys(childEdgesObj).length > 0 && gatheringSuccessful === true) {\n /**\n * Search for cluster data that contains any of the node id's\n * @returns {Boolean} true if no joinCondition, otherwise return value of joinCondition\n */\n var findClusterData = function() {\n for (let n = 0; n < clusters.length; ++n) {\n // Search for a cluster containing any of the node id's\n for (var m in childNodesObj) {\n if (clusters[n].nodes[m] !== undefined) {\n return clusters[n];\n }\n }\n }\n\n return undefined;\n };\n\n\n // If any of the found nodes is part of a cluster found in this method,\n // add the current values to that cluster\n var foundCluster = findClusterData();\n if (foundCluster !== undefined) {\n // Add nodes to found cluster if not present\n for (let m in childNodesObj) {\n if (foundCluster.nodes[m] === undefined) {\n foundCluster.nodes[m] = childNodesObj[m];\n }\n }\n\n // Add edges to found cluster, if not present\n for (let m in childEdgesObj) {\n if (foundCluster.edges[m] === undefined) {\n foundCluster.edges[m] = childEdgesObj[m];\n }\n }\n } else {\n // Create a new cluster group\n clusters.push({nodes: childNodesObj, edges: childEdgesObj})\n }\n }\n }\n }\n }\n\n for (let i = 0; i < clusters.length; i++) {\n this._cluster(clusters[i].nodes, clusters[i].edges, options, false)\n }\n\n if (refreshData === true) {\n this.body.emitter.emit('_dataChanged');\n }\n }\n\n /**\n * Cluster all nodes in the network that have only 1 edge\n * @param {Object} options\n * @param {boolean} [refreshData=true]\n */\n clusterOutliers(options, refreshData = true) {\n this.clusterByEdgeCount(1,options,refreshData);\n }\n\n /**\n * Cluster all nodes in the network that have only 2 edge\n * @param {Object} options\n * @param {boolean} [refreshData=true]\n */\n clusterBridges(options, refreshData = true) {\n this.clusterByEdgeCount(2,options,refreshData);\n }\n\n\n\n /**\n * suck all connected nodes of a node into the node.\n * @param {Node.id} nodeId\n * @param {Object} options\n * @param {boolean} [refreshData=true]\n */\n clusterByConnection(nodeId, options, refreshData = true) {\n // kill conditions\n if (nodeId === undefined) {throw new Error(\"No nodeId supplied to clusterByConnection!\");}\n if (this.body.nodes[nodeId] === undefined) {throw new Error(\"The nodeId given to clusterByConnection does not exist!\");}\n\n let node = this.body.nodes[nodeId];\n options = this._checkOptions(options, node);\n if (options.clusterNodeProperties.x === undefined) {options.clusterNodeProperties.x = node.x;}\n if (options.clusterNodeProperties.y === undefined) {options.clusterNodeProperties.y = node.y;}\n if (options.clusterNodeProperties.fixed === undefined) {\n options.clusterNodeProperties.fixed = {};\n options.clusterNodeProperties.fixed.x = node.options.fixed.x;\n options.clusterNodeProperties.fixed.y = node.options.fixed.y;\n }\n\n\n let childNodesObj = {};\n let childEdgesObj = {};\n let parentNodeId = node.id;\n let parentClonedOptions = NetworkUtil.cloneOptions(node);\n childNodesObj[parentNodeId] = node;\n\n // collect the nodes that will be in the cluster\n for (let i = 0; i < node.edges.length; i++) {\n let edge = node.edges[i];\n if (this.clusteredEdges[edge.id] === undefined) {\n let childNodeId = this._getConnectedId(edge, parentNodeId);\n\n // if the child node is not in a cluster\n if (this.clusteredNodes[childNodeId] === undefined) {\n if (childNodeId !== parentNodeId) {\n if (options.joinCondition === undefined) {\n childEdgesObj[edge.id] = edge;\n childNodesObj[childNodeId] = this.body.nodes[childNodeId];\n }\n else {\n // clone the options and insert some additional parameters that could be interesting.\n let childClonedOptions = NetworkUtil.cloneOptions(this.body.nodes[childNodeId]);\n if (options.joinCondition(parentClonedOptions, childClonedOptions) === true) {\n childEdgesObj[edge.id] = edge;\n childNodesObj[childNodeId] = this.body.nodes[childNodeId];\n }\n }\n }\n else {\n // swallow the edge if it is self-referencing.\n childEdgesObj[edge.id] = edge;\n }\n }\n }\n }\n var childNodeIDs = Object.keys(childNodesObj).map(function(childNode){\n return childNodesObj[childNode].id;\n })\n\n for (childNode in childNodesObj) {\n if (!childNodesObj.hasOwnProperty(childNode)) continue;\n\n var childNode = childNodesObj[childNode];\n for (var y=0; y < childNode.edges.length; y++){\n var childEdge = childNode.edges[y];\n if (childNodeIDs.indexOf(this._getConnectedId(childEdge,childNode.id)) > -1){\n childEdgesObj[childEdge.id] = childEdge;\n }\n }\n }\n this._cluster(childNodesObj, childEdgesObj, options, refreshData);\n }\n\n\n /**\n * This function creates the edges that will be attached to the cluster\n * It looks for edges that are connected to the nodes from the \"outside' of the cluster.\n *\n * @param {{Node.id: vis.Node}} childNodesObj\n * @param {{vis.Edge.id: vis.Edge}} childEdgesObj\n * @param {Object} clusterNodeProperties\n * @param {Object} clusterEdgeProperties\n * @private\n */\n _createClusterEdges (childNodesObj, childEdgesObj, clusterNodeProperties, clusterEdgeProperties) {\n let edge, childNodeId, childNode, toId, fromId, otherNodeId;\n\n // loop over all child nodes and their edges to find edges going out of the cluster\n // these edges will be replaced by clusterEdges.\n let childKeys = Object.keys(childNodesObj);\n let createEdges = [];\n for (let i = 0; i < childKeys.length; i++) {\n childNodeId = childKeys[i];\n childNode = childNodesObj[childNodeId];\n\n // construct new edges from the cluster to others\n for (let j = 0; j < childNode.edges.length; j++) {\n edge = childNode.edges[j];\n // we only handle edges that are visible to the system, not the disabled ones from the clustering process.\n if (this.clusteredEdges[edge.id] === undefined) {\n // self-referencing edges will be added to the \"hidden\" list\n if (edge.toId == edge.fromId) {\n childEdgesObj[edge.id] = edge;\n }\n else {\n // set up the from and to.\n if (edge.toId == childNodeId) { // this is a double equals because ints and strings can be interchanged here.\n toId = clusterNodeProperties.id;\n fromId = edge.fromId;\n otherNodeId = fromId;\n }\n else {\n toId = edge.toId;\n fromId = clusterNodeProperties.id;\n otherNodeId = toId;\n }\n }\n\n // Only edges from the cluster outwards are being replaced.\n if (childNodesObj[otherNodeId] === undefined) {\n createEdges.push({edge: edge, fromId: fromId, toId: toId});\n }\n }\n }\n }\n\n\n //\n // Here we actually create the replacement edges.\n //\n // We could not do this in the loop above as the creation process\n // would add an edge to the edges array we are iterating over.\n //\n // NOTE: a clustered edge can have multiple base edges!\n //\n var newEdges = [];\n\n /**\n * Find a cluster edge which matches the given created edge.\n * @param {vis.Edge} createdEdge\n * @returns {vis.Edge}\n */\n var getNewEdge = function(createdEdge) {\n for (let j = 0; j < newEdges.length; j++) {\n let newEdge = newEdges[j];\n\n // We replace both to and from edges with a single cluster edge\n let matchToDirection = (createdEdge.fromId === newEdge.fromId && createdEdge.toId === newEdge.toId);\n let matchFromDirection = (createdEdge.fromId === newEdge.toId && createdEdge.toId === newEdge.fromId);\n\n if (matchToDirection || matchFromDirection ) {\n return newEdge;\n }\n }\n\n return null;\n };\n\n\n for (let j = 0; j < createEdges.length; j++) {\n let createdEdge = createEdges[j];\n let edge = createdEdge.edge;\n let newEdge = getNewEdge(createdEdge);\n\n if (newEdge === null) {\n // Create a clustered edge for this connection\n newEdge = this._createClusteredEdge(\n createdEdge.fromId,\n createdEdge.toId,\n edge,\n clusterEdgeProperties);\n\n newEdges.push(newEdge);\n } else {\n newEdge.clusteringEdgeReplacingIds.push(edge.id);\n }\n\n // also reference the new edge in the old edge\n this.body.edges[edge.id].edgeReplacedById = newEdge.id;\n\n // hide the replaced edge\n this._backupEdgeOptions(edge);\n edge.setOptions({physics:false});\n }\n }\n\n /**\n * This function checks the options that can be supplied to the different cluster functions\n * for certain fields and inserts defaults if needed\n * @param {Object} options\n * @returns {*}\n * @private\n */\n _checkOptions(options = {}) {\n if (options.clusterEdgeProperties === undefined) {options.clusterEdgeProperties = {};}\n if (options.clusterNodeProperties === undefined) {options.clusterNodeProperties = {};}\n\n return options;\n }\n\n /**\n *\n * @param {Object} childNodesObj | object with node objects, id as keys, same as childNodes except it also contains a source node\n * @param {Object} childEdgesObj | object with edge objects, id as keys\n * @param {Array} options | object with {clusterNodeProperties, clusterEdgeProperties, processProperties}\n * @param {boolean} refreshData | when true, do not wrap up\n * @private\n */\n _cluster(childNodesObj, childEdgesObj, options, refreshData = true) {\n // Remove nodes which are already clustered\n var tmpNodesToRemove = []\n for (let nodeId in childNodesObj) {\n if (childNodesObj.hasOwnProperty(nodeId)) {\n if (this.clusteredNodes[nodeId] !== undefined) {\n tmpNodesToRemove.push(nodeId);\n }\n }\n }\n\n for (var n = 0; n < tmpNodesToRemove.length; ++n) {\n delete childNodesObj[tmpNodesToRemove[n]];\n }\n\n // kill condition: no nodes don't bother\n if (Object.keys(childNodesObj).length == 0) {return;}\n\n // allow clusters of 1 if options allow\n if (Object.keys(childNodesObj).length == 1 && options.clusterNodeProperties.allowSingleNodeCluster != true) {return;}\n\n let clusterNodeProperties = util.deepExtend({},options.clusterNodeProperties);\n\n // construct the clusterNodeProperties\n if (options.processProperties !== undefined) {\n // get the childNode options\n let childNodesOptions = [];\n for (let nodeId in childNodesObj) {\n if (childNodesObj.hasOwnProperty(nodeId)) {\n let clonedOptions = NetworkUtil.cloneOptions(childNodesObj[nodeId]);\n childNodesOptions.push(clonedOptions);\n }\n }\n\n // get cluster properties based on childNodes\n let childEdgesOptions = [];\n for (let edgeId in childEdgesObj) {\n if (childEdgesObj.hasOwnProperty(edgeId)) {\n // these cluster edges will be removed on creation of the cluster.\n if (edgeId.substr(0, 12) !== \"clusterEdge:\") {\n let clonedOptions = NetworkUtil.cloneOptions(childEdgesObj[edgeId], 'edge');\n childEdgesOptions.push(clonedOptions);\n }\n }\n }\n\n clusterNodeProperties = options.processProperties(clusterNodeProperties, childNodesOptions, childEdgesOptions);\n if (!clusterNodeProperties) {\n throw new Error(\"The processProperties function does not return properties!\");\n }\n }\n\n // check if we have an unique id;\n if (clusterNodeProperties.id === undefined) {clusterNodeProperties.id = 'cluster:' + util.randomUUID();}\n let clusterId = clusterNodeProperties.id;\n\n if (clusterNodeProperties.label === undefined) {\n clusterNodeProperties.label = 'cluster';\n }\n\n\n // give the clusterNode a position if it does not have one.\n let pos = undefined;\n if (clusterNodeProperties.x === undefined) {\n pos = this._getClusterPosition(childNodesObj);\n clusterNodeProperties.x = pos.x;\n }\n if (clusterNodeProperties.y === undefined) {\n if (pos === undefined) {pos = this._getClusterPosition(childNodesObj);}\n clusterNodeProperties.y = pos.y;\n }\n\n // force the ID to remain the same\n clusterNodeProperties.id = clusterId;\n\n // create the cluster Node\n // Note that allowSingleNodeCluster, if present, is stored in the options as well\n let clusterNode = this.body.functions.createNode(clusterNodeProperties, Cluster);\n clusterNode.containedNodes = childNodesObj;\n clusterNode.containedEdges = childEdgesObj;\n // cache a copy from the cluster edge properties if we have to reconnect others later on\n clusterNode.clusterEdgeProperties = options.clusterEdgeProperties;\n\n // finally put the cluster node into global\n this.body.nodes[clusterNodeProperties.id] = clusterNode;\n\n this._clusterEdges(childNodesObj, childEdgesObj, clusterNodeProperties, options.clusterEdgeProperties);\n\n // set ID to undefined so no duplicates arise\n clusterNodeProperties.id = undefined;\n\n // wrap up\n if (refreshData === true) {\n this.body.emitter.emit('_dataChanged');\n }\n }\n\n /**\n *\n * @param {Edge} edge\n * @private\n */\n _backupEdgeOptions(edge) {\n if (this.clusteredEdges[edge.id] === undefined) {\n this.clusteredEdges[edge.id] = {physics: edge.options.physics};\n }\n }\n\n /**\n *\n * @param {Edge} edge\n * @private\n */\n _restoreEdge(edge) {\n let originalOptions = this.clusteredEdges[edge.id];\n if (originalOptions !== undefined) {\n edge.setOptions({physics: originalOptions.physics});\n delete this.clusteredEdges[edge.id];\n }\n }\n\n\n /**\n * Check if a node is a cluster.\n * @param {Node.id} nodeId\n * @returns {*}\n */\n isCluster(nodeId) {\n if (this.body.nodes[nodeId] !== undefined) {\n return this.body.nodes[nodeId].isCluster === true;\n }\n else {\n console.log(\"Node does not exist.\");\n return false;\n }\n }\n\n /**\n * get the position of the cluster node based on what's inside\n * @param {object} childNodesObj | object with node objects, id as keys\n * @returns {{x: number, y: number}}\n * @private\n */\n _getClusterPosition(childNodesObj) {\n let childKeys = Object.keys(childNodesObj);\n let minX = childNodesObj[childKeys[0]].x;\n let maxX = childNodesObj[childKeys[0]].x;\n let minY = childNodesObj[childKeys[0]].y;\n let maxY = childNodesObj[childKeys[0]].y;\n let node;\n for (let i = 1; i < childKeys.length; i++) {\n node = childNodesObj[childKeys[i]];\n minX = node.x < minX ? node.x : minX;\n maxX = node.x > maxX ? node.x : maxX;\n minY = node.y < minY ? node.y : minY;\n maxY = node.y > maxY ? node.y : maxY;\n }\n\n return {x: 0.5*(minX + maxX), y: 0.5*(minY + maxY)};\n }\n\n\n\n /**\n * Open a cluster by calling this function.\n * @param {vis.Edge.id} clusterNodeId | the ID of the cluster node\n * @param {Object} options\n * @param {boolean} refreshData | wrap up afterwards if not true\n */\n openCluster(clusterNodeId, options, refreshData = true) {\n // kill conditions\n if (clusterNodeId === undefined) {\n throw new Error(\"No clusterNodeId supplied to openCluster.\");\n }\n\n let clusterNode = this.body.nodes[clusterNodeId];\n\n if (clusterNode === undefined) {\n throw new Error(\"The clusterNodeId supplied to openCluster does not exist.\");\n }\n if (clusterNode.isCluster !== true\n || clusterNode.containedNodes === undefined\n || clusterNode.containedEdges === undefined) {\n throw new Error(\"The node:\" + clusterNodeId + \" is not a valid cluster.\");\n }\n\n // Check if current cluster is clustered itself\n let stack = this.findNode(clusterNodeId);\n let parentIndex = stack.indexOf(clusterNodeId) - 1;\n if (parentIndex >= 0) {\n // Current cluster is clustered; transfer contained nodes and edges to parent\n let parentClusterNodeId = stack[parentIndex];\n let parentClusterNode = this.body.nodes[parentClusterNodeId];\n\n // clustering.clusteredNodes and clustering.clusteredEdges remain unchanged\n parentClusterNode._openChildCluster(clusterNodeId);\n\n // All components of child cluster node have been transferred. It can die now.\n delete this.body.nodes[clusterNodeId];\n if (refreshData === true) {\n this.body.emitter.emit('_dataChanged');\n }\n\n return;\n }\n\n // main body \n let containedNodes = clusterNode.containedNodes;\n let containedEdges = clusterNode.containedEdges;\n\n // allow the user to position the nodes after release.\n if (options !== undefined && options.releaseFunction !== undefined && typeof options.releaseFunction === 'function') {\n let positions = {};\n let clusterPosition = {x:clusterNode.x, y:clusterNode.y};\n for (let nodeId in containedNodes) {\n if (containedNodes.hasOwnProperty(nodeId)) {\n let containedNode = this.body.nodes[nodeId];\n positions[nodeId] = {x: containedNode.x, y: containedNode.y};\n }\n }\n let newPositions = options.releaseFunction(clusterPosition, positions);\n\n for (let nodeId in containedNodes) {\n if (containedNodes.hasOwnProperty(nodeId)) {\n let containedNode = this.body.nodes[nodeId];\n if (newPositions[nodeId] !== undefined) {\n containedNode.x = (newPositions[nodeId].x === undefined ? clusterNode.x : newPositions[nodeId].x);\n containedNode.y = (newPositions[nodeId].y === undefined ? clusterNode.y : newPositions[nodeId].y);\n }\n }\n }\n }\n else {\n // copy the position from the cluster\n util.forEach(containedNodes, function(containedNode) {\n // inherit position\n if (containedNode.options.fixed.x === false) {containedNode.x = clusterNode.x;}\n if (containedNode.options.fixed.y === false) {containedNode.y = clusterNode.y;}\n });\n }\n\n // release nodes\n for (let nodeId in containedNodes) {\n if (containedNodes.hasOwnProperty(nodeId)) {\n let containedNode = this.body.nodes[nodeId];\n\n // inherit speed\n containedNode.vx = clusterNode.vx;\n containedNode.vy = clusterNode.vy;\n\n containedNode.setOptions({physics:true});\n\n delete this.clusteredNodes[nodeId];\n }\n }\n\n // copy the clusterNode edges because we cannot iterate over an object that we add or remove from.\n let edgesToBeDeleted = [];\n for (let i = 0; i < clusterNode.edges.length; i++) {\n edgesToBeDeleted.push(clusterNode.edges[i]);\n }\n\n // actually handling the deleting.\n for (let i = 0; i < edgesToBeDeleted.length; i++) {\n let edge = edgesToBeDeleted[i];\n let otherNodeId = this._getConnectedId(edge, clusterNodeId);\n let otherNode = this.clusteredNodes[otherNodeId];\n\n for (let j = 0; j < edge.clusteringEdgeReplacingIds.length; j++) {\n let transferId = edge.clusteringEdgeReplacingIds[j];\n let transferEdge = this.body.edges[transferId];\n if (transferEdge === undefined) continue; \n\n // if the other node is in another cluster, we transfer ownership of this edge to the other cluster\n if (otherNode !== undefined) {\n // transfer ownership:\n let otherCluster = this.body.nodes[otherNode.clusterId];\n otherCluster.containedEdges[transferEdge.id] = transferEdge;\n\n // delete local reference\n delete containedEdges[transferEdge.id];\n\n // get to and from\n let fromId = transferEdge.fromId;\n let toId = transferEdge.toId;\n if (transferEdge.toId == otherNodeId) {\n toId = otherNode.clusterId;\n }\n else {\n fromId = otherNode.clusterId;\n }\n\n // create new cluster edge from the otherCluster\n this._createClusteredEdge(\n fromId,\n toId,\n transferEdge,\n otherCluster.clusterEdgeProperties,\n {hidden: false, physics: true});\n\n } else {\n this._restoreEdge(transferEdge);\n }\n }\n\n edge.remove();\n }\n\n // handle the releasing of the edges\n for (let edgeId in containedEdges) {\n if (containedEdges.hasOwnProperty(edgeId)) {\n this._restoreEdge(containedEdges[edgeId]);\n }\n }\n\n // remove clusterNode\n delete this.body.nodes[clusterNodeId];\n\n if (refreshData === true) {\n this.body.emitter.emit('_dataChanged');\n }\n }\n\n /**\n *\n * @param {Cluster.id} clusterId\n * @returns {Array.}\n */\n getNodesInCluster(clusterId) {\n let nodesArray = [];\n if (this.isCluster(clusterId) === true) {\n let containedNodes = this.body.nodes[clusterId].containedNodes;\n for (let nodeId in containedNodes) {\n if (containedNodes.hasOwnProperty(nodeId)) {\n nodesArray.push(this.body.nodes[nodeId].id)\n }\n }\n }\n\n return nodesArray;\n }\n\n /**\n * Get the stack clusterId's that a certain node resides in. cluster A -> cluster B -> cluster C -> node\n *\n * If a node can't be found in the chain, return an empty array.\n *\n * @param {string|number} nodeId\n * @returns {Array}\n */\n findNode(nodeId) {\n let stack = [];\n let max = 100;\n let counter = 0;\n let node;\n\n while (this.clusteredNodes[nodeId] !== undefined && counter < max) {\n node = this.body.nodes[nodeId]\n if (node === undefined) return [];\n stack.push(node.id);\n\n nodeId = this.clusteredNodes[nodeId].clusterId;\n counter++;\n }\n\n node = this.body.nodes[nodeId]\n if (node === undefined) return [];\n stack.push(node.id);\n\n stack.reverse();\n return stack;\n }\n\n /**\n * Using a clustered nodeId, update with the new options\n * @param {vis.Edge.id} clusteredNodeId\n * @param {object} newOptions\n */\n updateClusteredNode(clusteredNodeId, newOptions) {\n if (clusteredNodeId === undefined) {throw new Error(\"No clusteredNodeId supplied to updateClusteredNode.\");}\n if (newOptions === undefined) {throw new Error(\"No newOptions supplied to updateClusteredNode.\");}\n if (this.body.nodes[clusteredNodeId] === undefined) {throw new Error(\"The clusteredNodeId supplied to updateClusteredNode does not exist.\");}\n\n this.body.nodes[clusteredNodeId].setOptions(newOptions);\n this.body.emitter.emit('_dataChanged');\n }\n\n /**\n * Using a base edgeId, update all related clustered edges with the new options\n * @param {vis.Edge.id} startEdgeId\n * @param {object} newOptions\n */\n updateEdge(startEdgeId, newOptions) {\n if (startEdgeId === undefined) {throw new Error(\"No startEdgeId supplied to updateEdge.\");}\n if (newOptions === undefined) {throw new Error(\"No newOptions supplied to updateEdge.\");}\n if (this.body.edges[startEdgeId] === undefined) {throw new Error(\"The startEdgeId supplied to updateEdge does not exist.\");}\n\n let allEdgeIds = this.getClusteredEdges(startEdgeId);\n for (let i = 0; i < allEdgeIds.length; i++) {\n var edge = this.body.edges[allEdgeIds[i]];\n edge.setOptions(newOptions);\n }\n this.body.emitter.emit('_dataChanged');\n }\n\n /**\n * Get a stack of clusterEdgeId's (+base edgeid) that a base edge is the same as. cluster edge C -> cluster edge B -> cluster edge A -> base edge(edgeId)\n * @param {vis.Edge.id} edgeId\n * @returns {Array.}\n */\n getClusteredEdges(edgeId) {\n let stack = [];\n let max = 100;\n let counter = 0;\n\n while (edgeId !== undefined && this.body.edges[edgeId] !== undefined && counter < max) {\n stack.push(this.body.edges[edgeId].id);\n edgeId = this.body.edges[edgeId].edgeReplacedById;\n counter++;\n }\n stack.reverse();\n return stack;\n }\n\n /**\n * Get the base edge id of clusterEdgeId. cluster edge (clusteredEdgeId) -> cluster edge B -> cluster edge C -> base edge\n * @param {vis.Edge.id} clusteredEdgeId\n * @returns {vis.Edge.id} baseEdgeId\n *\n * TODO: deprecate in 5.0.0. Method getBaseEdges() is the correct one to use.\n */\n getBaseEdge(clusteredEdgeId) {\n // Just kludge this by returning the first base edge id found\n return this.getBaseEdges(clusteredEdgeId)[0];\n }\n\n\n /**\n * Get all regular edges for this clustered edge id.\n *\n * @param {vis.Edge.id} clusteredEdgeId\n * @returns {Array.} all baseEdgeId's under this clustered edge\n */\n getBaseEdges(clusteredEdgeId) {\n let IdsToHandle = [clusteredEdgeId];\n let doneIds = [];\n let foundIds = [];\n let max = 100;\n let counter = 0;\n\n while (IdsToHandle.length > 0 && counter < max) {\n let nextId = IdsToHandle.pop();\n if (nextId === undefined) continue; // Paranoia here and onwards\n let nextEdge = this.body.edges[nextId];\n if (nextEdge === undefined) continue;\n counter++;\n\n let replacingIds = nextEdge.clusteringEdgeReplacingIds;\n if (replacingIds === undefined) {\n // nextId is a base id\n foundIds.push(nextId);\n } else {\n // Another cluster edge, unravel this one as well\n for (let i = 0; i < replacingIds.length; ++i) {\n let replacingId = replacingIds[i];\n\n // Don't add if already handled\n // TODO: never triggers; find a test-case which does\n if (IdsToHandle.indexOf(replacingIds) !== -1 || doneIds.indexOf(replacingIds) !== -1) {\n continue;\n }\n\n IdsToHandle.push(replacingId);\n }\n }\n\n doneIds.push(nextId);\n }\n\n return foundIds;\n }\n\n\n /**\n * Get the Id the node is connected to\n * @param {vis.Edge} edge\n * @param {Node.id} nodeId\n * @returns {*}\n * @private\n */\n _getConnectedId(edge, nodeId) {\n if (edge.toId != nodeId) {\n return edge.toId;\n }\n else if (edge.fromId != nodeId) {\n return edge.fromId;\n }\n else {\n return edge.fromId;\n }\n }\n\n /**\n * We determine how many connections denote an important hub.\n * We take the mean + 2*std as the important hub size. (Assuming a normal distribution of data, ~2.2%)\n *\n * @returns {number}\n * @private\n */\n _getHubSize() {\n let average = 0;\n let averageSquared = 0;\n let hubCounter = 0;\n let largestHub = 0;\n\n for (let i = 0; i < this.body.nodeIndices.length; i++) {\n let node = this.body.nodes[this.body.nodeIndices[i]];\n if (node.edges.length > largestHub) {\n largestHub = node.edges.length;\n }\n average += node.edges.length;\n averageSquared += Math.pow(node.edges.length,2);\n hubCounter += 1;\n }\n average = average / hubCounter;\n averageSquared = averageSquared / hubCounter;\n\n let variance = averageSquared - Math.pow(average,2);\n let standardDeviation = Math.sqrt(variance);\n\n let hubThreshold = Math.floor(average + 2*standardDeviation);\n\n // always have at least one to cluster\n if (hubThreshold > largestHub) {\n hubThreshold = largestHub;\n }\n\n return hubThreshold;\n }\n\n\n /**\n * Create an edge for the cluster representation.\n *\n * @param {Node.id} fromId\n * @param {Node.id} toId\n * @param {vis.Edge} baseEdge\n * @param {Object} clusterEdgeProperties\n * @param {Object} extraOptions\n * @returns {Edge} newly created clustered edge\n * @private\n */\n _createClusteredEdge(fromId, toId, baseEdge, clusterEdgeProperties, extraOptions) {\n // copy the options of the edge we will replace\n let clonedOptions = NetworkUtil.cloneOptions(baseEdge, 'edge');\n // make sure the properties of clusterEdges are superimposed on it\n util.deepExtend(clonedOptions, clusterEdgeProperties);\n\n // set up the edge\n clonedOptions.from = fromId;\n clonedOptions.to = toId;\n clonedOptions.id = 'clusterEdge:' + util.randomUUID();\n\n // apply the edge specific options to it if specified\n if (extraOptions !== undefined) {\n util.deepExtend(clonedOptions, extraOptions);\n }\n\n let newEdge = this.body.functions.createEdge(clonedOptions);\n newEdge.clusteringEdgeReplacingIds = [baseEdge.id];\n newEdge.connect();\n\n // Register the new edge\n this.body.edges[newEdge.id] = newEdge;\n\n return newEdge;\n }\n\n\n /**\n * Add the passed child nodes and edges to the given cluster node.\n *\n * @param {Object|Node} childNodes hash of nodes or single node to add in cluster\n * @param {Object|Edge} childEdges hash of edges or single edge to take into account when clustering\n * @param {Node} clusterNode cluster node to add nodes and edges to\n * @param {Object} [clusterEdgeProperties]\n * @private\n */\n _clusterEdges(childNodes, childEdges, clusterNode, clusterEdgeProperties) {\n if (childEdges instanceof Edge) {\n let edge = childEdges;\n let obj = {};\n obj[edge.id] = edge;\n childEdges = obj;\n }\n\n if (childNodes instanceof Node) {\n let node = childNodes;\n let obj = {};\n obj[node.id] = node;\n childNodes = obj;\n }\n\n if (clusterNode === undefined || clusterNode === null) {\n throw new Error(\"_clusterEdges: parameter clusterNode required\");\n }\n\n if (clusterEdgeProperties === undefined) {\n // Take the required properties from the cluster node\n clusterEdgeProperties = clusterNode.clusterEdgeProperties;\n }\n\n // create the new edges that will connect to the cluster.\n // All self-referencing edges will be added to childEdges here.\n this._createClusterEdges(childNodes, childEdges, clusterNode, clusterEdgeProperties);\n\n // disable the childEdges\n for (let edgeId in childEdges) {\n if (childEdges.hasOwnProperty(edgeId)) {\n if (this.body.edges[edgeId] !== undefined) {\n let edge = this.body.edges[edgeId];\n // cache the options before changing\n this._backupEdgeOptions(edge);\n // disable physics and hide the edge\n edge.setOptions({physics:false});\n }\n }\n }\n\n // disable the childNodes\n for (let nodeId in childNodes) {\n if (childNodes.hasOwnProperty(nodeId)) {\n this.clusteredNodes[nodeId] = {clusterId:clusterNode.id, node: this.body.nodes[nodeId]};\n this.body.nodes[nodeId].setOptions({physics:false});\n }\n }\n }\n\n\n /**\n * Determine in which cluster given nodeId resides.\n *\n * If not in cluster, return undefined.\n *\n * NOTE: If you know a cleaner way to do this, please enlighten me (wimrijnders).\n *\n * @param {Node.id} nodeId\n * @returns {Node|undefined} Node instance for cluster, if present\n * @private\n */\n _getClusterNodeForNode(nodeId) {\n if (nodeId === undefined) return undefined;\n let clusteredNode = this.clusteredNodes[nodeId];\n\n // NOTE: If no cluster info found, it should actually be an error\n if (clusteredNode === undefined) return undefined;\n let clusterId = clusteredNode.clusterId;\n if (clusterId === undefined) return undefined;\n\n return this.body.nodes[clusterId];\n }\n\n\n /**\n * Internal helper function for conditionally removing items in array\n *\n * Done like this because Array.filter() is not fully supported by all IE's.\n *\n * @param {Array} arr\n * @param {function} callback\n * @returns {Array}\n * @private\n */\n _filter(arr, callback) {\n let ret = [];\n\n util.forEach(arr, (item) => {\n if (callback(item)) {\n ret.push(item);\n }\n });\n\n return ret;\n }\n\n\n /**\n * Scan all edges for changes in clustering and adjust this if necessary.\n *\n * Call this (internally) after there has been a change in node or edge data.\n *\n * Pre: States of this.body.nodes and this.body.edges consistent\n * Pre: this.clusteredNodes and this.clusteredEdge consistent with containedNodes and containedEdges\n * of cluster nodes.\n */\n _updateState() {\n let nodeId;\n let deletedNodeIds = [];\n let deletedEdgeIds = {};\n\n /**\n * Utility function to iterate over clustering nodes only\n *\n * @param {Function} callback function to call for each cluster node\n */\n let eachClusterNode = (callback) => {\n util.forEach(this.body.nodes, (node) => {\n if (node.isCluster === true) {\n callback(node);\n }\n });\n };\n\n\n //\n // Remove deleted regular nodes from clustering\n //\n\n // Determine the deleted nodes\n for (nodeId in this.clusteredNodes) {\n if (!this.clusteredNodes.hasOwnProperty(nodeId)) continue;\n let node = this.body.nodes[nodeId];\n\n if (node === undefined) {\n deletedNodeIds.push(nodeId);\n }\n }\n\n // Remove nodes from cluster nodes\n eachClusterNode(function(clusterNode) {\n for (let n = 0; n < deletedNodeIds.length; n++) {\n delete clusterNode.containedNodes[deletedNodeIds[n]];\n }\n });\n\n // Remove nodes from cluster list\n for (let n = 0; n < deletedNodeIds.length; n++) {\n delete this.clusteredNodes[deletedNodeIds[n]];\n }\n\n\n //\n // Remove deleted edges from clustering\n //\n\n // Add the deleted clustered edges to the list\n util.forEach(this.clusteredEdges, (edgeId) => {\n let edge = this.body.edges[edgeId];\n if (edge === undefined || !edge.endPointsValid()) {\n deletedEdgeIds[edgeId] = edgeId;\n }\n });\n\n // Cluster nodes can also contain edges which are not clustered, \n // i.e. nodes 1-2 within cluster with an edge in between.\n // So the cluster nodes also need to be scanned for invalid edges\n eachClusterNode(function(clusterNode) {\n util.forEach(clusterNode.containedEdges, (edge, edgeId) => {\n if (!edge.endPointsValid() && !deletedEdgeIds[edgeId]) {\n deletedEdgeIds[edgeId] = edgeId;\n }\n });\n });\n\n // Also scan for cluster edges which need to be removed in the active list.\n // Regular edges have been removed beforehand, so this only picks up the cluster edges.\n util.forEach(this.body.edges, (edge, edgeId) => {\n // Explicitly scan the contained edges for validity\n let isValid = true;\n let replacedIds = edge.clusteringEdgeReplacingIds;\n if (replacedIds !== undefined) {\n let numValid = 0;\n\n util.forEach(replacedIds, (containedEdgeId) => {\n let containedEdge = this.body.edges[containedEdgeId];\n\n if (containedEdge !== undefined && containedEdge.endPointsValid()) {\n numValid += 1;\n }\n });\n\n isValid = (numValid > 0);\n }\n\n if (!edge.endPointsValid() || !isValid) {\n deletedEdgeIds[edgeId] = edgeId;\n }\n });\n\n // Remove edges from cluster nodes\n eachClusterNode((clusterNode) => {\n util.forEach(deletedEdgeIds, (deletedEdgeId) => {\n delete clusterNode.containedEdges[deletedEdgeId];\n\n util.forEach(clusterNode.edges, (edge, m) => {\n if (edge.id === deletedEdgeId) {\n clusterNode.edges[m] = null; // Don't want to directly delete here, because in the loop\n return;\n }\n\n edge.clusteringEdgeReplacingIds = this._filter(edge.clusteringEdgeReplacingIds, function(id) {\n return !deletedEdgeIds[id];\n });\n });\n\n // Clean up the nulls\n clusterNode.edges = this._filter(clusterNode.edges, function(item) {return item !== null});\n });\n });\n\n\n // Remove from cluster list\n util.forEach(deletedEdgeIds, (edgeId) => {\n delete this.clusteredEdges[edgeId];\n });\n\n // Remove cluster edges from active list (this.body.edges).\n // deletedEdgeIds still contains id of regular edges, but these should all\n // be gone when you reach here.\n util.forEach(deletedEdgeIds, (edgeId) => {\n delete this.body.edges[edgeId];\n });\n\n\n //\n // Check changed cluster state of edges\n //\n\n // Iterating over keys here, because edges may be removed in the loop\n let ids = Object.keys(this.body.edges);\n util.forEach(ids, (edgeId) => {\n let edge = this.body.edges[edgeId];\n\n let shouldBeClustered = this._isClusteredNode(edge.fromId) || this._isClusteredNode(edge.toId);\n if (shouldBeClustered === this._isClusteredEdge(edge.id)) {\n return; // all is well\n }\n\n if (shouldBeClustered) {\n // add edge to clustering\n let clusterFrom = this._getClusterNodeForNode(edge.fromId);\n if (clusterFrom !== undefined) {\n this._clusterEdges(this.body.nodes[edge.fromId], edge, clusterFrom);\n }\n\n let clusterTo = this._getClusterNodeForNode(edge.toId);\n if (clusterTo !== undefined) {\n this._clusterEdges(this.body.nodes[edge.toId], edge, clusterTo);\n }\n\n\t\t\t\t// TODO: check that it works for both edges clustered\n // (This might be paranoia)\n } else {\n delete this._clusterEdges[edgeId];\n this._restoreEdge(edge);\n // This should not be happening, the state should\n // be properly updated at this point.\n // \n // If it *is* reached during normal operation, then we have to implement\n // undo clustering for this edge here.\n // throw new Error('remove edge from clustering not implemented!')\n }\n });\n\n\n // Clusters may be nested to any level. Keep on opening until nothing to open\n var changed = false;\n var continueLoop = true;\n while (continueLoop) {\n let clustersToOpen = [];\n\n // Determine the id's of clusters that need opening\n eachClusterNode(function(clusterNode) {\n let numNodes = Object.keys(clusterNode.containedNodes).length;\n let allowSingle = (clusterNode.options.allowSingleNodeCluster === true);\n if ((allowSingle && numNodes < 1) || (!allowSingle && numNodes < 2)) {\n clustersToOpen.push(clusterNode.id);\n }\n });\n\n // Open them\n for (let n = 0; n < clustersToOpen.length; ++n) {\n this.openCluster(clustersToOpen[n], {}, false /* Don't refresh, we're in an refresh/update already */);\n }\n\n continueLoop = (clustersToOpen.length > 0);\n changed = changed || continueLoop;\n }\n\n if (changed) {\n this._updateState() // Redo this method (recursion possible! should be safe)\n }\n }\n\n\n /**\n * Determine if node with given id is part of a cluster.\n *\n * @param {Node.id} nodeId\n * @return {boolean} true if part of a cluster.\n */\n _isClusteredNode(nodeId) {\n return this.clusteredNodes[nodeId] !== undefined;\n }\n\n\n /**\n * Determine if edge with given id is not visible due to clustering.\n *\n * An edge is considered clustered if:\n * - it is directly replaced by a clustering edge\n * - any of its connecting nodes is in a cluster\n *\n * @param {vis.Edge.id} edgeId\n * @return {boolean} true if part of a cluster.\n */\n _isClusteredEdge(edgeId) {\n return this.clusteredEdges[edgeId] !== undefined;\n }\n}\n\n\nexport default ClusterEngine;\n","/**\n * Initializes window.requestAnimationFrame() to a usable form.\n *\n * Specifically, set up this method for the case of running on node.js with jsdom enabled.\n *\n * NOTES:\n *\n * * On node.js, when calling this directly outside of this class, `window` is not defined.\n * This happens even if jsdom is used.\n * * For node.js + jsdom, `window` is available at the moment the constructor is called.\n * For this reason, the called is placed within the constructor.\n * * Even then, `window.requestAnimationFrame()` is not defined, so it still needs to be added.\n * * During unit testing, it happens that the window object is reset during execution, causing\n * a runtime error due to missing `requestAnimationFrame()`. This needs to be compensated for,\n * see `_requestNextFrame()`.\n * * Since this is a global object, it may affect other modules besides `Network`. With normal\n * usage, this does not cause any problems. During unit testing, errors may occur. These have\n * been compensated for, see comment block in _requestNextFrame().\n *\n * @private\n */\nfunction _initRequestAnimationFrame() {\n var func;\n\n if (window !== undefined) {\n func = window.requestAnimationFrame\n || window.mozRequestAnimationFrame\n || window.webkitRequestAnimationFrame\n || window.msRequestAnimationFrame;\n }\n\n if (func === undefined) {\n // window or method not present, setting mock requestAnimationFrame\n window.requestAnimationFrame =\n function(callback) {\n //console.log(\"Called mock requestAnimationFrame\");\n callback();\n }\n } else {\n window.requestAnimationFrame = func;\n }\n}\n\nimport util from 'vis-util';\n\n/**\n * The canvas renderer\n */\nclass CanvasRenderer {\n /**\n * @param {Object} body\n * @param {Canvas} canvas\n */\n constructor(body, canvas) {\n _initRequestAnimationFrame();\n this.body = body;\n this.canvas = canvas;\n\n this.redrawRequested = false;\n this.renderTimer = undefined;\n this.requiresTimeout = true;\n this.renderingActive = false;\n this.renderRequests = 0;\n this.allowRedraw = true;\n\n this.dragging = false;\n this.zooming = false;\n this.options = {};\n this.defaultOptions = {\n hideEdgesOnDrag: false,\n hideEdgesOnZoom: false,\n hideNodesOnDrag: false,\n };\n util.extend(this.options, this.defaultOptions);\n\n this._determineBrowserMethod();\n this.bindEventListeners();\n }\n\n /**\n * Binds event listeners\n */\n bindEventListeners() {\n this.body.emitter.on(\"dragStart\", () => { this.dragging = true; });\n this.body.emitter.on(\"dragEnd\", () => { this.dragging = false; });\n this.body.emitter.on(\"zoom\", () => {\n this.zooming = true;\n window.clearTimeout(this.zoomTimeoutId)\n this.zoomTimeoutId = window.setTimeout(() => { \n this.zooming = false;\n this._requestRedraw.bind(this)()\n }, 250) \n });\n this.body.emitter.on(\"_resizeNodes\", () => { this._resizeNodes(); });\n this.body.emitter.on(\"_redraw\", () => {\n if (this.renderingActive === false) {\n this._redraw();\n }\n });\n this.body.emitter.on(\"_blockRedraw\", () => {this.allowRedraw = false;});\n this.body.emitter.on(\"_allowRedraw\", () => {this.allowRedraw = true; this.redrawRequested = false;});\n this.body.emitter.on(\"_requestRedraw\", this._requestRedraw.bind(this));\n this.body.emitter.on(\"_startRendering\", () => {\n this.renderRequests += 1;\n this.renderingActive = true;\n this._startRendering();\n });\n this.body.emitter.on(\"_stopRendering\", () => {\n this.renderRequests -= 1;\n this.renderingActive = this.renderRequests > 0;\n this.renderTimer = undefined;\n });\n this.body.emitter.on('destroy', () => {\n this.renderRequests = 0;\n this.allowRedraw = false;\n this.renderingActive = false;\n if (this.requiresTimeout === true) {\n clearTimeout(this.renderTimer);\n }\n else {\n window.cancelAnimationFrame(this.renderTimer);\n }\n this.body.emitter.off();\n });\n\n\n }\n\n /**\n *\n * @param {Object} options\n */\n setOptions(options) {\n if (options !== undefined) {\n let fields = ['hideEdgesOnDrag', 'hideEdgesOnZoom', 'hideNodesOnDrag'];\n util.selectiveDeepExtend(fields,this.options, options);\n }\n }\n\n\n /**\n * Prepare the drawing of the next frame.\n *\n * Calls the callback when the next frame can or will be drawn.\n *\n * @param {function} callback\n * @param {number} delay - timeout case only, wait this number of milliseconds\n * @returns {function|undefined}\n * @private\n */\n _requestNextFrame(callback, delay) { \n // During unit testing, it happens that the mock window object is reset while\n // the next frame is still pending. Then, either 'window' is not present, or\n // 'requestAnimationFrame()' is not present because it is not defined on the\n // mock window object.\n //\n // As a consequence, unrelated unit tests may appear to fail, even if the problem\n // described happens in the current unit test.\n //\n // This is not something that will happen in normal operation, but we still need\n // to take it into account.\n //\n if (typeof window === 'undefined') return; // Doing `if (window === undefined)` does not work here!\n\n let timer;\n\n var myWindow = window; // Grab a reference to reduce the possibility that 'window' is reset\n // while running this method.\n\n if (this.requiresTimeout === true) {\n // wait given number of milliseconds and perform the animation step function\n timer = myWindow.setTimeout(callback, delay);\n } else {\n if (myWindow.requestAnimationFrame) {\n timer = myWindow.requestAnimationFrame(callback);\n }\n }\n\n return timer;\n }\n\n /**\n *\n * @private\n */\n _startRendering() {\n if (this.renderingActive === true) {\n if (this.renderTimer === undefined) {\n this.renderTimer = this._requestNextFrame(this._renderStep.bind(this), this.simulationInterval);\n }\n }\n }\n\n /**\n *\n * @private\n */\n _renderStep() {\n if (this.renderingActive === true) {\n // reset the renderTimer so a new scheduled animation step can be set\n this.renderTimer = undefined;\n\n if (this.requiresTimeout === true) {\n // this schedules a new simulation step\n this._startRendering();\n }\n\n this._redraw();\n\n if (this.requiresTimeout === false) {\n // this schedules a new simulation step\n this._startRendering();\n }\n }\n }\n\n /**\n * Redraw the network with the current data\n * chart will be resized too.\n */\n redraw() {\n this.body.emitter.emit('setSize');\n this._redraw();\n }\n\n /**\n * Redraw the network with the current data\n * @private\n */\n _requestRedraw() {\n if (this.redrawRequested !== true && this.renderingActive === false && this.allowRedraw === true) {\n this.redrawRequested = true;\n this._requestNextFrame(() => {this._redraw(false);}, 0);\n }\n }\n\n /**\n * Redraw the network with the current data\n * @param {boolean} [hidden=false] | Used to get the first estimate of the node sizes.\n * Only the nodes are drawn after which they are quickly drawn over.\n * @private\n */\n _redraw(hidden = false) {\n if (this.allowRedraw === true) {\n this.body.emitter.emit(\"initRedraw\");\n\n this.redrawRequested = false;\n\n // when the container div was hidden, this fixes it back up!\n if (this.canvas.frame.canvas.width === 0 || this.canvas.frame.canvas.height === 0) {\n this.canvas.setSize();\n }\n\n this.canvas.setTransform();\n\n let ctx = this.canvas.getContext();\n\n // clear the canvas\n let w = this.canvas.frame.canvas.clientWidth;\n let h = this.canvas.frame.canvas.clientHeight;\n ctx.clearRect(0, 0, w, h);\n\n // if the div is hidden, we stop the redraw here for performance.\n if (this.canvas.frame.clientWidth === 0) {\n return;\n }\n\n // set scaling and translation\n ctx.save();\n ctx.translate(this.body.view.translation.x, this.body.view.translation.y);\n ctx.scale(this.body.view.scale, this.body.view.scale);\n\n ctx.beginPath();\n this.body.emitter.emit(\"beforeDrawing\", ctx);\n ctx.closePath();\n\n if (hidden === false) {\n if (\n (this.dragging === false || (this.dragging === true && this.options.hideEdgesOnDrag === false)) && \n (this.zooming === false || (this.zooming === true && this.options.hideEdgesOnZoom === false))\n ) {\n this._drawEdges(ctx);\n }\n }\n\n if (this.dragging === false || (this.dragging === true && this.options.hideNodesOnDrag === false)) {\n this._drawNodes(ctx, hidden);\n }\n\n ctx.beginPath();\n this.body.emitter.emit(\"afterDrawing\", ctx);\n ctx.closePath();\n\n\n // restore original scaling and translation\n ctx.restore();\n if (hidden === true) {\n ctx.clearRect(0, 0, w, h);\n }\n }\n }\n\n\n /**\n * Redraw all nodes\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {boolean} [alwaysShow]\n * @private\n */\n _resizeNodes() {\n this.canvas.setTransform();\n let ctx = this.canvas.getContext();\n ctx.save();\n ctx.translate(this.body.view.translation.x, this.body.view.translation.y);\n ctx.scale(this.body.view.scale, this.body.view.scale);\n\n let nodes = this.body.nodes;\n let node;\n\n // resize all nodes\n for (let nodeId in nodes) {\n if (nodes.hasOwnProperty(nodeId)) {\n node = nodes[nodeId];\n node.resize(ctx);\n node.updateBoundingBox(ctx, node.selected);\n }\n }\n\n // restore original scaling and translation\n ctx.restore();\n }\n\n /**\n * Redraw all nodes\n *\n * @param {CanvasRenderingContext2D} ctx 2D context of a HTML canvas\n * @param {boolean} [alwaysShow]\n * @private\n */\n _drawNodes(ctx, alwaysShow = false) {\n let nodes = this.body.nodes;\n let nodeIndices = this.body.nodeIndices;\n let node;\n let selected = [];\n let margin = 20;\n let topLeft = this.canvas.DOMtoCanvas({x:-margin,y:-margin});\n let bottomRight = this.canvas.DOMtoCanvas({\n x: this.canvas.frame.canvas.clientWidth+margin,\n y: this.canvas.frame.canvas.clientHeight+margin\n });\n let viewableArea = {top:topLeft.y,left:topLeft.x,bottom:bottomRight.y,right:bottomRight.x};\n\n // draw unselected nodes;\n for (let i = 0; i < nodeIndices.length; i++) {\n node = nodes[nodeIndices[i]];\n // set selected nodes aside\n if (node.isSelected()) {\n selected.push(nodeIndices[i]);\n }\n else {\n if (alwaysShow === true) {\n node.draw(ctx);\n }\n else if (node.isBoundingBoxOverlappingWith(viewableArea) === true) {\n node.draw(ctx);\n }\n else {\n node.updateBoundingBox(ctx, node.selected);\n }\n }\n }\n\n // draw the selected nodes on top\n for (let i = 0; i < selected.length; i++) {\n node = nodes[selected[i]];\n node.draw(ctx);\n }\n }\n\n\n /**\n * Redraw all edges\n * @param {CanvasRenderingContext2D} ctx 2D context of a HTML canvas\n * @private\n */\n _drawEdges(ctx) {\n let edges = this.body.edges;\n let edgeIndices = this.body.edgeIndices;\n let edge;\n\n for (let i = 0; i < edgeIndices.length; i++) {\n edge = edges[edgeIndices[i]];\n if (edge.connected === true) {\n edge.draw(ctx);\n }\n }\n }\n\n /**\n * Determine if the browser requires a setTimeout or a requestAnimationFrame. This was required because\n * some implementations (safari and IE9) did not support requestAnimationFrame\n * @private\n */\n _determineBrowserMethod() {\n if (typeof window !== 'undefined') {\n let browserType = navigator.userAgent.toLowerCase();\n this.requiresTimeout = false;\n if (browserType.indexOf('msie 9.0') != -1) { // IE 9\n this.requiresTimeout = true;\n }\n else if (browserType.indexOf('safari') != -1) { // safari\n if (browserType.indexOf('chrome') <= -1) {\n this.requiresTimeout = true;\n }\n }\n }\n else {\n this.requiresTimeout = true;\n }\n }\n}\n\nexport default CanvasRenderer;\n","/**\n * Register a touch event, taking place before a gesture\n * @param {Hammer} hammer A hammer instance\n * @param {function} callback Callback, called as callback(event)\n */\nexports.onTouch = function (hammer, callback) {\n callback.inputHandler = function (event) {\n if (event.isFirst) {\n callback(event);\n }\n };\n\n hammer.on('hammer.input', callback.inputHandler);\n};\n\n/**\n * Register a release event, taking place after a gesture\n * @param {Hammer} hammer A hammer instance\n * @param {function} callback Callback, called as callback(event)\n * @returns {*}\n */\nexports.onRelease = function (hammer, callback) {\n callback.inputHandler = function (event) {\n if (event.isFinal) {\n callback(event);\n }\n };\n\n return hammer.on('hammer.input', callback.inputHandler);\n};\n\n\n/**\n * Unregister a touch event, taking place before a gesture\n * @param {Hammer} hammer A hammer instance\n * @param {function} callback Callback, called as callback(event)\n */\nexports.offTouch = function (hammer, callback) {\n hammer.off('hammer.input', callback.inputHandler);\n};\n\n/**\n * Unregister a release event, taking place before a gesture\n * @param {Hammer} hammer A hammer instance\n * @param {function} callback Callback, called as callback(event)\n */\nexports.offRelease = exports.offTouch;\n\n/**\n * Hack the PinchRecognizer such that it doesn't prevent default behavior\n * for vertical panning.\n *\n * Yeah ... this is quite a hack ... see https://github.com/hammerjs/hammer.js/issues/932\n *\n * @param {Hammer.Pinch} pinchRecognizer\n * @return {Hammer.Pinch} returns the pinchRecognizer\n */\nexports.disablePreventDefaultVertically = function (pinchRecognizer) {\n var TOUCH_ACTION_PAN_Y = 'pan-y';\n\n pinchRecognizer.getTouchAction = function() {\n // default method returns [TOUCH_ACTION_NONE]\n return [TOUCH_ACTION_PAN_Y];\n };\n\n return pinchRecognizer;\n};\n","import Hammer from '../../module/hammer';\nimport hammerUtil from '../../hammerUtil';\n\nimport util from 'vis-util';\n\n/**\n * Create the main frame for the Network.\n * This function is executed once when a Network object is created. The frame\n * contains a canvas, and this canvas contains all objects like the axis and\n * nodes.\n */\nclass Canvas {\n /**\n * @param {Object} body\n */\n constructor(body) {\n this.body = body;\n this.pixelRatio = 1;\n this.resizeTimer = undefined;\n this.resizeFunction = this._onResize.bind(this);\n this.cameraState = {};\n this.initialized = false;\n this.canvasViewCenter = {};\n\n this.options = {};\n this.defaultOptions = {\n autoResize: true,\n height: '100%',\n width: '100%'\n };\n util.extend(this.options, this.defaultOptions);\n\n this.bindEventListeners();\n }\n\n /**\n * Binds event listeners\n */\n bindEventListeners() {\n // bind the events\n this.body.emitter.once(\"resize\", (obj) => {\n if (obj.width !== 0) {\n this.body.view.translation.x = obj.width * 0.5;\n }\n if (obj.height !== 0) {\n this.body.view.translation.y = obj.height * 0.5;\n }\n });\n this.body.emitter.on(\"setSize\", this.setSize.bind(this));\n this.body.emitter.on(\"destroy\", () => {\n this.hammerFrame.destroy();\n this.hammer.destroy();\n this._cleanUp();\n });\n }\n\n /**\n * @param {Object} options\n */\n setOptions(options) {\n if (options !== undefined) {\n let fields = ['width','height','autoResize'];\n util.selectiveDeepExtend(fields,this.options, options);\n }\n\n if (this.options.autoResize === true) {\n // automatically adapt to a changing size of the browser.\n this._cleanUp();\n this.resizeTimer = setInterval(() => {\n let changed = this.setSize();\n if (changed === true) {\n this.body.emitter.emit(\"_requestRedraw\");\n }\n }, 1000);\n this.resizeFunction = this._onResize.bind(this);\n util.addEventListener(window,'resize',this.resizeFunction);\n }\n }\n\n /**\n * @private\n */\n _cleanUp() {\n // automatically adapt to a changing size of the browser.\n if (this.resizeTimer !== undefined) {\n clearInterval(this.resizeTimer);\n }\n util.removeEventListener(window,'resize',this.resizeFunction);\n this.resizeFunction = undefined;\n }\n\n /**\n * @private\n */\n _onResize() {\n this.setSize();\n this.body.emitter.emit(\"_redraw\");\n }\n\n /**\n * Get and store the cameraState\n *\n * @param {number} [pixelRatio=this.pixelRatio]\n * @private\n */\n _getCameraState(pixelRatio = this.pixelRatio) {\n if (this.initialized === true) {\n this.cameraState.previousWidth = this.frame.canvas.width / pixelRatio;\n this.cameraState.previousHeight = this.frame.canvas.height / pixelRatio;\n this.cameraState.scale = this.body.view.scale;\n this.cameraState.position = this.DOMtoCanvas({\n x: 0.5 * this.frame.canvas.width / pixelRatio,\n y: 0.5 * this.frame.canvas.height / pixelRatio\n });\n }\n }\n\n /**\n * Set the cameraState\n * @private\n */\n _setCameraState() {\n if (this.cameraState.scale !== undefined &&\n this.frame.canvas.clientWidth !== 0 &&\n this.frame.canvas.clientHeight !== 0 &&\n this.pixelRatio !== 0 &&\n this.cameraState.previousWidth > 0) {\n\n let widthRatio = (this.frame.canvas.width / this.pixelRatio) / this.cameraState.previousWidth;\n let heightRatio = (this.frame.canvas.height / this.pixelRatio) / this.cameraState.previousHeight;\n let newScale = this.cameraState.scale;\n\n if (widthRatio != 1 && heightRatio != 1) {\n newScale = this.cameraState.scale * 0.5 * (widthRatio + heightRatio);\n }\n else if (widthRatio != 1) {\n newScale = this.cameraState.scale * widthRatio;\n }\n else if (heightRatio != 1) {\n newScale = this.cameraState.scale * heightRatio;\n }\n\n this.body.view.scale = newScale;\n // this comes from the view module.\n var currentViewCenter = this.DOMtoCanvas({\n x: 0.5 * this.frame.canvas.clientWidth,\n y: 0.5 * this.frame.canvas.clientHeight\n });\n\n var distanceFromCenter = { // offset from view, distance view has to change by these x and y to center the node\n x: currentViewCenter.x - this.cameraState.position.x,\n y: currentViewCenter.y - this.cameraState.position.y\n };\n this.body.view.translation.x += distanceFromCenter.x * this.body.view.scale;\n this.body.view.translation.y += distanceFromCenter.y * this.body.view.scale;\n }\n }\n\n /**\n *\n * @param {number|string} value\n * @returns {string}\n * @private\n */\n _prepareValue(value) {\n if (typeof value === 'number') {\n return value + 'px';\n }\n else if (typeof value === 'string') {\n if (value.indexOf('%') !== -1 || value.indexOf('px') !== -1) {\n return value;\n }\n else if (value.indexOf('%') === -1) {\n return value + 'px';\n }\n }\n throw new Error('Could not use the value supplied for width or height:' + value);\n }\n\n\n /**\n * Create the HTML\n */\n _create() {\n // remove all elements from the container element.\n while (this.body.container.hasChildNodes()) {\n this.body.container.removeChild(this.body.container.firstChild);\n }\n\n this.frame = document.createElement('div');\n this.frame.className = 'vis-network';\n this.frame.style.position = 'relative';\n this.frame.style.overflow = 'hidden';\n this.frame.tabIndex = 900; // tab index is required for keycharm to bind keystrokes to the div instead of the window\n\n //////////////////////////////////////////////////////////////////\n\n this.frame.canvas = document.createElement(\"canvas\");\n this.frame.canvas.style.position = 'relative';\n this.frame.appendChild(this.frame.canvas);\n\n if (!this.frame.canvas.getContext) {\n let noCanvas = document.createElement( 'DIV' );\n noCanvas.style.color = 'red';\n noCanvas.style.fontWeight = 'bold' ;\n noCanvas.style.padding = '10px';\n noCanvas.innerHTML = 'Error: your browser does not support HTML canvas';\n this.frame.canvas.appendChild(noCanvas);\n }\n else {\n this._setPixelRatio();\n this.setTransform();\n }\n\n // add the frame to the container element\n this.body.container.appendChild(this.frame);\n\n this.body.view.scale = 1;\n this.body.view.translation = {x: 0.5 * this.frame.canvas.clientWidth,y: 0.5 * this.frame.canvas.clientHeight};\n\n this._bindHammer();\n }\n\n\n /**\n * This function binds hammer, it can be repeated over and over due to the uniqueness check.\n * @private\n */\n _bindHammer() {\n if (this.hammer !== undefined) {\n this.hammer.destroy();\n }\n this.drag = {};\n this.pinch = {};\n\n // init hammer\n this.hammer = new Hammer(this.frame.canvas);\n this.hammer.get('pinch').set({enable: true});\n // enable to get better response, todo: test on mobile.\n this.hammer.get('pan').set({threshold:5, direction: Hammer.DIRECTION_ALL});\n\n hammerUtil.onTouch(this.hammer, (event) => {this.body.eventListeners.onTouch(event)});\n this.hammer.on('tap', (event) => {this.body.eventListeners.onTap(event)});\n this.hammer.on('doubletap', (event) => {this.body.eventListeners.onDoubleTap(event)});\n this.hammer.on('press', (event) => {this.body.eventListeners.onHold(event)});\n this.hammer.on('panstart', (event) => {this.body.eventListeners.onDragStart(event)});\n this.hammer.on('panmove', (event) => {this.body.eventListeners.onDrag(event)});\n this.hammer.on('panend', (event) => {this.body.eventListeners.onDragEnd(event)});\n this.hammer.on('pinch', (event) => {this.body.eventListeners.onPinch(event)});\n\n // TODO: neatly cleanup these handlers when re-creating the Canvas, IF these are done with hammer, event.stopPropagation will not work?\n this.frame.canvas.addEventListener('mousewheel', (event) => {this.body.eventListeners.onMouseWheel(event)});\n this.frame.canvas.addEventListener('DOMMouseScroll', (event) => {this.body.eventListeners.onMouseWheel(event)});\n\n this.frame.canvas.addEventListener('mousemove', (event) => {this.body.eventListeners.onMouseMove(event)});\n this.frame.canvas.addEventListener('contextmenu', (event) => {this.body.eventListeners.onContext(event)});\n\n this.hammerFrame = new Hammer(this.frame);\n hammerUtil.onRelease(this.hammerFrame, (event) => {this.body.eventListeners.onRelease(event)});\n }\n\n\n /**\n * Set a new size for the network\n * @param {string} width Width in pixels or percentage (for example '800px'\n * or '50%')\n * @param {string} height Height in pixels or percentage (for example '400px'\n * or '30%')\n * @returns {boolean}\n */\n setSize(width = this.options.width, height = this.options.height) {\n width = this._prepareValue(width);\n height= this._prepareValue(height);\n\n let emitEvent = false;\n let oldWidth = this.frame.canvas.width;\n let oldHeight = this.frame.canvas.height;\n\n // update the pixel ratio\n //\n // NOTE: Comment in following is rather inconsistent; this is the ONLY place in the code\n // where it is assumed that the pixel ratio could change at runtime.\n // The only way I can think of this happening is a rotating screen or tablet; but then\n // there should be a mechanism for reloading the data (TODO: check if this is present).\n //\n // If the assumption is true (i.e. pixel ratio can change at runtime), then *all* usage\n // of pixel ratio must be overhauled for this.\n //\n // For the time being, I will humor the assumption here, and in the rest of the code assume it is\n // constant.\n let previousRatio = this.pixelRatio; // we cache this because the camera state storage needs the old value\n this._setPixelRatio();\n\n if (width != this.options.width || height != this.options.height || this.frame.style.width != width || this.frame.style.height != height) {\n this._getCameraState(previousRatio);\n\n this.frame.style.width = width;\n this.frame.style.height = height;\n\n this.frame.canvas.style.width = '100%';\n this.frame.canvas.style.height = '100%';\n\n this.frame.canvas.width = Math.round(this.frame.canvas.clientWidth * this.pixelRatio);\n this.frame.canvas.height = Math.round(this.frame.canvas.clientHeight * this.pixelRatio);\n\n this.options.width = width;\n this.options.height = height;\n\n this.canvasViewCenter = {\n x: 0.5 * this.frame.clientWidth,\n y: 0.5 * this.frame.clientHeight\n };\n\n emitEvent = true;\n }\n else {\n // this would adapt the width of the canvas to the width from 100% if and only if\n // there is a change.\n\n let newWidth = Math.round(this.frame.canvas.clientWidth * this.pixelRatio);\n let newHeight = Math.round(this.frame.canvas.clientHeight * this.pixelRatio);\n\n // store the camera if there is a change in size.\n if (this.frame.canvas.width !== newWidth || this.frame.canvas.height !== newHeight) {\n this._getCameraState(previousRatio);\n }\n\n if (this.frame.canvas.width !== newWidth) {\n this.frame.canvas.width = newWidth;\n emitEvent = true;\n }\n if (this.frame.canvas.height !== newHeight) {\n this.frame.canvas.height = newHeight;\n emitEvent = true;\n }\n }\n\n if (emitEvent === true) {\n this.body.emitter.emit('resize', {\n width : Math.round(this.frame.canvas.width / this.pixelRatio),\n height : Math.round(this.frame.canvas.height / this.pixelRatio),\n oldWidth : Math.round(oldWidth / this.pixelRatio),\n oldHeight: Math.round(oldHeight / this.pixelRatio)\n });\n\n // restore the camera on change.\n this._setCameraState();\n }\n\n\n // set initialized so the get and set camera will work from now on.\n this.initialized = true;\n return emitEvent;\n }\n\n /**\n *\n * @returns {CanvasRenderingContext2D}\n */\n getContext() {\n return this.frame.canvas.getContext(\"2d\");\n }\n\n /**\n * Determine the pixel ratio for various browsers.\n *\n * @returns {number}\n * @private\n */\n _determinePixelRatio() {\n let ctx = this.getContext();\n if (ctx === undefined) {\n throw new Error(\"Could not get canvax context\");\n }\n\n var numerator = 1;\n if(typeof window !== 'undefined') { // (window !== undefined) doesn't work here!\n // Protection during unit tests, where 'window' can be missing\n numerator = (window.devicePixelRatio || 1);\n }\n\n var denominator = (ctx.webkitBackingStorePixelRatio ||\n ctx.mozBackingStorePixelRatio ||\n ctx.msBackingStorePixelRatio ||\n ctx.oBackingStorePixelRatio ||\n ctx.backingStorePixelRatio || 1);\n\n return numerator / denominator;\n }\n\n /**\n * Lazy determination of pixel ratio.\n *\n * @private\n */\n _setPixelRatio() {\n this.pixelRatio = this._determinePixelRatio();\n }\n\n /**\n * Set the transform in the contained context, based on its pixelRatio\n */\n setTransform() {\n let ctx = this.getContext();\n if (ctx === undefined) {\n throw new Error(\"Could not get canvax context\");\n }\n\n ctx.setTransform(this.pixelRatio, 0, 0, this.pixelRatio, 0, 0);\n }\n\n\n /**\n * Convert the X coordinate in DOM-space (coordinate point in browser relative to the container div) to\n * the X coordinate in canvas-space (the simulation sandbox, which the camera looks upon)\n * @param {number} x\n * @returns {number}\n * @private\n */\n _XconvertDOMtoCanvas(x) {\n return (x - this.body.view.translation.x) / this.body.view.scale;\n }\n\n /**\n * Convert the X coordinate in canvas-space (the simulation sandbox, which the camera looks upon) to\n * the X coordinate in DOM-space (coordinate point in browser relative to the container div)\n * @param {number} x\n * @returns {number}\n * @private\n */\n _XconvertCanvasToDOM(x) {\n return x * this.body.view.scale + this.body.view.translation.x;\n }\n\n /**\n * Convert the Y coordinate in DOM-space (coordinate point in browser relative to the container div) to\n * the Y coordinate in canvas-space (the simulation sandbox, which the camera looks upon)\n * @param {number} y\n * @returns {number}\n * @private\n */\n _YconvertDOMtoCanvas(y) {\n return (y - this.body.view.translation.y) / this.body.view.scale;\n }\n\n /**\n * Convert the Y coordinate in canvas-space (the simulation sandbox, which the camera looks upon) to\n * the Y coordinate in DOM-space (coordinate point in browser relative to the container div)\n * @param {number} y\n * @returns {number}\n * @private\n */\n _YconvertCanvasToDOM(y) {\n return y * this.body.view.scale + this.body.view.translation.y;\n }\n\n\n /**\n * @param {point} pos\n * @returns {point}\n */\n canvasToDOM (pos) {\n return {x: this._XconvertCanvasToDOM(pos.x), y: this._YconvertCanvasToDOM(pos.y)};\n }\n\n /**\n *\n * @param {point} pos\n * @returns {point}\n */\n DOMtoCanvas (pos) {\n return {x: this._XconvertDOMtoCanvas(pos.x), y: this._YconvertDOMtoCanvas(pos.y)};\n }\n\n}\n\nexport default Canvas;\n","import util from 'vis-util';\n\nimport NetworkUtil from '../NetworkUtil';\n\n/**\n * The view\n */\nclass View {\n /**\n * @param {Object} body\n * @param {Canvas} canvas\n */\n constructor(body, canvas) {\n this.body = body;\n this.canvas = canvas;\n\n this.animationSpeed = 1/this.renderRefreshRate;\n this.animationEasingFunction = \"easeInOutQuint\";\n this.easingTime = 0;\n this.sourceScale = 0;\n this.targetScale = 0;\n this.sourceTranslation = 0;\n this.targetTranslation = 0;\n this.lockedOnNodeId = undefined;\n this.lockedOnNodeOffset = undefined;\n this.touchTime = 0;\n\n this.viewFunction = undefined;\n\n this.body.emitter.on(\"fit\", this.fit.bind(this));\n this.body.emitter.on(\"animationFinished\", () => {this.body.emitter.emit(\"_stopRendering\");});\n this.body.emitter.on(\"unlockNode\", this.releaseNode.bind(this));\n }\n\n /**\n *\n * @param {Object} [options={}]\n */\n setOptions(options = {}) {\n this.options = options;\n }\n\n\n /**\n * This function zooms out to fit all data on screen based on amount of nodes\n * @param {Object} [options={{nodes=Array}}]\n * @param {boolean} [initialZoom=false] | zoom based on fitted formula or range, true = fitted, default = false;\n */\n fit(options = {nodes:[]}, initialZoom = false) {\n let range;\n let zoomLevel;\n options = Object.assign({}, options);\n if (options.nodes === undefined || options.nodes.length === 0) {\n options.nodes = this.body.nodeIndices;\n }\n\n\n if (initialZoom === true) {\n // check if more than half of the nodes have a predefined position. If so, we use the range, not the approximation.\n let positionDefined = 0;\n for (let nodeId in this.body.nodes) {\n if (this.body.nodes.hasOwnProperty(nodeId)) {\n let node = this.body.nodes[nodeId];\n if (node.predefinedPosition === true) {\n positionDefined += 1;\n }\n }\n }\n if (positionDefined > 0.5 * this.body.nodeIndices.length) {\n this.fit(options,false);\n return;\n }\n\n range = NetworkUtil.getRange(this.body.nodes, options.nodes);\n\n let numberOfNodes = this.body.nodeIndices.length;\n zoomLevel = 12.662 / (numberOfNodes + 7.4147) + 0.0964822; // this is obtained from fitting a dataset from 5 points with scale levels that looked good.\n\n // correct for larger canvasses.\n let factor = Math.min(this.canvas.frame.canvas.clientWidth / 600, this.canvas.frame.canvas.clientHeight / 600);\n zoomLevel *= factor;\n }\n else {\n this.body.emitter.emit(\"_resizeNodes\");\n range = NetworkUtil.getRange(this.body.nodes, options.nodes);\n\n let xDistance = Math.abs(range.maxX - range.minX) * 1.1;\n let yDistance = Math.abs(range.maxY - range.minY) * 1.1;\n\n let xZoomLevel = this.canvas.frame.canvas.clientWidth / xDistance;\n let yZoomLevel = this.canvas.frame.canvas.clientHeight / yDistance;\n\n zoomLevel = (xZoomLevel <= yZoomLevel) ? xZoomLevel : yZoomLevel;\n }\n\n if (zoomLevel > 1.0) {\n zoomLevel = 1.0;\n }\n else if (zoomLevel === 0) {\n zoomLevel = 1.0;\n }\n\n let center = NetworkUtil.findCenter(range);\n let animationOptions = {position: center, scale: zoomLevel, animation: options.animation};\n this.moveTo(animationOptions);\n }\n \n // animation\n\n /**\n * Center a node in view.\n *\n * @param {number} nodeId\n * @param {number} [options]\n */\n focus(nodeId, options = {}) {\n if (this.body.nodes[nodeId] !== undefined) {\n let nodePosition = {x: this.body.nodes[nodeId].x, y: this.body.nodes[nodeId].y};\n options.position = nodePosition;\n options.lockedOnNode = nodeId;\n\n this.moveTo(options)\n }\n else {\n console.log(\"Node: \" + nodeId + \" cannot be found.\");\n }\n }\n\n /**\n *\n * @param {Object} options | options.offset = {x:number, y:number} // offset from the center in DOM pixels\n * | options.scale = number // scale to move to\n * | options.position = {x:number, y:number} // position to move to\n * | options.animation = {duration:number, easingFunction:String} || Boolean // position to move to\n */\n moveTo(options) {\n if (options === undefined) {\n options = {};\n return;\n }\n\n if (options.offset != null) {\n if (options.offset.x != null) {\n // Coerce and verify that x is valid.\n options.offset.x = +options.offset.x\n if (!Number.isFinite(options.offset.x)) {\n throw new TypeError('The option \"offset.x\" has to be a finite number.')\n }\n } else {\n options.offset.x = 0\n }\n\n if (options.offset.y != null) {\n // Coerce and verify that y is valid.\n options.offset.y = +options.offset.y\n if (!Number.isFinite(options.offset.y)) {\n throw new TypeError('The option \"offset.y\" has to be a finite number.')\n }\n } else {\n options.offset.x = 0\n }\n } else {\n options.offset = {\n x: 0,\n y: 0\n }\n }\n\n if (options.position != null) {\n if (options.position.x != null) {\n // Coerce and verify that x is valid.\n options.position.x = +options.position.x\n if (!Number.isFinite(options.position.x)) {\n throw new TypeError('The option \"position.x\" has to be a finite number.')\n }\n } else {\n options.position.x = 0\n }\n\n if (options.position.y != null) {\n // Coerce and verify that y is valid.\n options.position.y = +options.position.y\n if (!Number.isFinite(options.position.y)) {\n throw new TypeError('The option \"position.y\" has to be a finite number.')\n }\n } else {\n options.position.x = 0\n }\n } else {\n options.position = this.getViewPosition()\n }\n\n if (options.scale != null) {\n // Coerce and verify that the scale is valid.\n options.scale = +options.scale\n if (!(options.scale > 0)) {\n throw new TypeError('The option \"scale\" has to be a number greater than zero.')\n }\n } else {\n options.scale = this.body.view.scale\n }\n\n if (options.animation === undefined) {options.animation = {duration:0}; }\n if (options.animation === false ) {options.animation = {duration:0}; }\n if (options.animation === true ) {options.animation = {}; }\n if (options.animation.duration === undefined) {options.animation.duration = 1000; } // default duration\n if (options.animation.easingFunction === undefined) {options.animation.easingFunction = \"easeInOutQuad\"; } // default easing function\n\n this.animateView(options);\n }\n\n /**\n *\n * @param {Object} options | options.offset = {x:number, y:number} // offset from the center in DOM pixels\n * | options.time = number // animation time in milliseconds\n * | options.scale = number // scale to animate to\n * | options.position = {x:number, y:number} // position to animate to\n * | options.easingFunction = String // linear, easeInQuad, easeOutQuad, easeInOutQuad,\n * // easeInCubic, easeOutCubic, easeInOutCubic,\n * // easeInQuart, easeOutQuart, easeInOutQuart,\n * // easeInQuint, easeOutQuint, easeInOutQuint\n */\n animateView(options) {\n if (options === undefined) {\n return;\n }\n this.animationEasingFunction = options.animation.easingFunction;\n // release if something focussed on the node\n this.releaseNode();\n if (options.locked === true) {\n this.lockedOnNodeId = options.lockedOnNode;\n this.lockedOnNodeOffset = options.offset;\n }\n\n // forcefully complete the old animation if it was still running\n if (this.easingTime != 0) {\n this._transitionRedraw(true); // by setting easingtime to 1, we finish the animation.\n }\n\n this.sourceScale = this.body.view.scale;\n this.sourceTranslation = this.body.view.translation;\n this.targetScale = options.scale;\n\n // set the scale so the viewCenter is based on the correct zoom level. This is overridden in the transitionRedraw\n // but at least then we'll have the target transition\n this.body.view.scale = this.targetScale;\n let viewCenter = this.canvas.DOMtoCanvas({x: 0.5 * this.canvas.frame.canvas.clientWidth, y: 0.5 * this.canvas.frame.canvas.clientHeight});\n\n let distanceFromCenter = { // offset from view, distance view has to change by these x and y to center the node\n x: viewCenter.x - options.position.x,\n y: viewCenter.y - options.position.y\n };\n this.targetTranslation = {\n x: this.sourceTranslation.x + distanceFromCenter.x * this.targetScale + options.offset.x,\n y: this.sourceTranslation.y + distanceFromCenter.y * this.targetScale + options.offset.y\n };\n\n // if the time is set to 0, don't do an animation\n if (options.animation.duration === 0) {\n if (this.lockedOnNodeId != undefined) {\n this.viewFunction = this._lockedRedraw.bind(this);\n this.body.emitter.on(\"initRedraw\", this.viewFunction);\n }\n else {\n this.body.view.scale = this.targetScale;\n this.body.view.translation = this.targetTranslation;\n this.body.emitter.emit(\"_requestRedraw\");\n }\n }\n else {\n this.animationSpeed = 1 / (60 * options.animation.duration * 0.001) || 1 / 60; // 60 for 60 seconds, 0.001 for milli's\n this.animationEasingFunction = options.animation.easingFunction;\n\n\n this.viewFunction = this._transitionRedraw.bind(this);\n this.body.emitter.on(\"initRedraw\", this.viewFunction);\n this.body.emitter.emit(\"_startRendering\");\n }\n }\n\n /**\n * used to animate smoothly by hijacking the redraw function.\n * @private\n */\n _lockedRedraw() {\n let nodePosition = {x: this.body.nodes[this.lockedOnNodeId].x, y: this.body.nodes[this.lockedOnNodeId].y};\n let viewCenter = this.canvas.DOMtoCanvas({x: 0.5 * this.canvas.frame.canvas.clientWidth, y: 0.5 * this.canvas.frame.canvas.clientHeight});\n let distanceFromCenter = { // offset from view, distance view has to change by these x and y to center the node\n x: viewCenter.x - nodePosition.x,\n y: viewCenter.y - nodePosition.y\n };\n let sourceTranslation = this.body.view.translation;\n let targetTranslation = {\n x: sourceTranslation.x + distanceFromCenter.x * this.body.view.scale + this.lockedOnNodeOffset.x,\n y: sourceTranslation.y + distanceFromCenter.y * this.body.view.scale + this.lockedOnNodeOffset.y\n };\n\n this.body.view.translation = targetTranslation;\n }\n\n /**\n * Resets state of a locked on Node\n */\n releaseNode() {\n if (this.lockedOnNodeId !== undefined && this.viewFunction !== undefined) {\n this.body.emitter.off(\"initRedraw\", this.viewFunction);\n this.lockedOnNodeId = undefined;\n this.lockedOnNodeOffset = undefined;\n }\n }\n\n /**\n * @param {boolean} [finished=false]\n * @private\n */\n _transitionRedraw(finished = false) {\n this.easingTime += this.animationSpeed;\n this.easingTime = finished === true ? 1.0 : this.easingTime;\n\n let progress = util.easingFunctions[this.animationEasingFunction](this.easingTime);\n\n this.body.view.scale = this.sourceScale + (this.targetScale - this.sourceScale) * progress;\n this.body.view.translation = {\n x: this.sourceTranslation.x + (this.targetTranslation.x - this.sourceTranslation.x) * progress,\n y: this.sourceTranslation.y + (this.targetTranslation.y - this.sourceTranslation.y) * progress\n };\n\n // cleanup\n if (this.easingTime >= 1.0) {\n this.body.emitter.off(\"initRedraw\", this.viewFunction);\n this.easingTime = 0;\n if (this.lockedOnNodeId != undefined) {\n this.viewFunction = this._lockedRedraw.bind(this);\n this.body.emitter.on(\"initRedraw\", this.viewFunction);\n }\n this.body.emitter.emit(\"animationFinished\");\n }\n }\n\n\n /**\n *\n * @returns {number}\n */\n getScale() {\n return this.body.view.scale;\n }\n\n /**\n *\n * @returns {{x: number, y: number}}\n */\n getViewPosition() {\n return this.canvas.DOMtoCanvas({x: 0.5 * this.canvas.frame.canvas.clientWidth, y: 0.5 * this.canvas.frame.canvas.clientHeight});\n }\n\n\n}\n\nexport default View;\n","import './NavigationHandler.css';\n\nimport Hammer from '../../../module/hammer';\nimport hammerUtil from '../../../hammerUtil';\nimport keycharm from 'keycharm';\n\n/**\n * Navigation Handler\n */\nclass NavigationHandler {\n /**\n * @param {Object} body\n * @param {Canvas} canvas\n */\n constructor(body, canvas) {\n this.body = body;\n this.canvas = canvas;\n\n this.iconsCreated = false;\n this.navigationHammers = [];\n this.boundFunctions = {};\n this.touchTime = 0;\n this.activated = false;\n\n\n this.body.emitter.on(\"activate\", () => {this.activated = true; this.configureKeyboardBindings();});\n this.body.emitter.on(\"deactivate\", () => {this.activated = false; this.configureKeyboardBindings();});\n this.body.emitter.on(\"destroy\", () => {if (this.keycharm !== undefined) {this.keycharm.destroy();}});\n\n this.options = {}\n }\n\n /**\n *\n * @param {Object} options\n */\n setOptions(options) {\n if (options !== undefined) {\n this.options = options;\n this.create();\n }\n }\n\n /**\n * Creates or refreshes navigation and sets key bindings\n */\n create() {\n if (this.options.navigationButtons === true) {\n if (this.iconsCreated === false) {\n this.loadNavigationElements();\n }\n }\n else if (this.iconsCreated === true) {\n this.cleanNavigation();\n }\n\n this.configureKeyboardBindings();\n }\n\n /**\n * Cleans up previous navigation items\n */\n cleanNavigation() {\n // clean hammer bindings\n if (this.navigationHammers.length != 0) {\n for (var i = 0; i < this.navigationHammers.length; i++) {\n this.navigationHammers[i].destroy();\n }\n this.navigationHammers = [];\n }\n\n // clean up previous navigation items\n if (this.navigationDOM && this.navigationDOM['wrapper'] && this.navigationDOM['wrapper'].parentNode) {\n this.navigationDOM['wrapper'].parentNode.removeChild(this.navigationDOM['wrapper']);\n }\n\n this.iconsCreated = false;\n }\n\n /**\n * Creation of the navigation controls nodes. They are drawn over the rest of the nodes and are not affected by scale and translation\n * they have a triggerFunction which is called on click. If the position of the navigation controls is dependent\n * on this.frame.canvas.clientWidth or this.frame.canvas.clientHeight, we flag horizontalAlignLeft and verticalAlignTop false.\n * This means that the location will be corrected by the _relocateNavigation function on a size change of the canvas.\n *\n * @private\n */\n loadNavigationElements() {\n this.cleanNavigation();\n\n this.navigationDOM = {};\n var navigationDivs = ['up','down','left','right','zoomIn','zoomOut','zoomExtends'];\n var navigationDivActions = ['_moveUp','_moveDown','_moveLeft','_moveRight','_zoomIn','_zoomOut','_fit'];\n\n this.navigationDOM['wrapper'] = document.createElement('div');\n this.navigationDOM['wrapper'].className = 'vis-navigation';\n this.canvas.frame.appendChild(this.navigationDOM['wrapper']);\n\n for (var i = 0; i < navigationDivs.length; i++) {\n this.navigationDOM[navigationDivs[i]] = document.createElement('div');\n this.navigationDOM[navigationDivs[i]].className = 'vis-button vis-' + navigationDivs[i];\n this.navigationDOM['wrapper'].appendChild(this.navigationDOM[navigationDivs[i]]);\n\n var hammer = new Hammer(this.navigationDOM[navigationDivs[i]]);\n if (navigationDivActions[i] === \"_fit\") {\n hammerUtil.onTouch(hammer, this._fit.bind(this));\n }\n else {\n hammerUtil.onTouch(hammer, this.bindToRedraw.bind(this,navigationDivActions[i]));\n }\n\n this.navigationHammers.push(hammer);\n }\n\n // use a hammer for the release so we do not require the one used in the rest of the network\n // the one the rest uses can be overloaded by the manipulation system.\n var hammerFrame = new Hammer(this.canvas.frame);\n hammerUtil.onRelease(hammerFrame, () => {this._stopMovement();});\n this.navigationHammers.push(hammerFrame);\n\n this.iconsCreated = true;\n }\n\n /**\n *\n * @param {string} action\n */\n bindToRedraw(action) {\n if (this.boundFunctions[action] === undefined) {\n this.boundFunctions[action] = this[action].bind(this);\n this.body.emitter.on(\"initRedraw\", this.boundFunctions[action]);\n this.body.emitter.emit(\"_startRendering\");\n }\n }\n\n /**\n *\n * @param {string} action\n */\n unbindFromRedraw(action) {\n if (this.boundFunctions[action] !== undefined) {\n this.body.emitter.off(\"initRedraw\", this.boundFunctions[action]);\n this.body.emitter.emit(\"_stopRendering\");\n delete this.boundFunctions[action];\n }\n }\n\n /**\n * this stops all movement induced by the navigation buttons\n *\n * @private\n */\n _fit() {\n if (new Date().valueOf() - this.touchTime > 700) { // TODO: fix ugly hack to avoid hammer's double fireing of event (because we use release?)\n this.body.emitter.emit(\"fit\", {duration: 700});\n this.touchTime = new Date().valueOf();\n }\n }\n\n /**\n * this stops all movement induced by the navigation buttons\n *\n * @private\n */\n _stopMovement() {\n for (let boundAction in this.boundFunctions) {\n if (this.boundFunctions.hasOwnProperty(boundAction)) {\n this.body.emitter.off(\"initRedraw\", this.boundFunctions[boundAction]);\n this.body.emitter.emit(\"_stopRendering\");\n }\n }\n this.boundFunctions = {};\n }\n /**\n *\n * @private\n */\n _moveUp() {this.body.view.translation.y += this.options.keyboard.speed.y;}\n /**\n *\n * @private\n */\n _moveDown() {this.body.view.translation.y -= this.options.keyboard.speed.y;}\n /**\n *\n * @private\n */\n _moveLeft() {this.body.view.translation.x += this.options.keyboard.speed.x;}\n /**\n *\n * @private\n */\n _moveRight(){this.body.view.translation.x -= this.options.keyboard.speed.x;}\n /**\n *\n * @private\n */\n _zoomIn() {\n var scaleOld = this.body.view.scale;\n var scale = this.body.view.scale * (1 + this.options.keyboard.speed.zoom);\n var translation = this.body.view.translation;\n var scaleFrac = scale / scaleOld;\n var tx = (1 - scaleFrac) * this.canvas.canvasViewCenter.x + translation.x * scaleFrac;\n var ty = (1 - scaleFrac) * this.canvas.canvasViewCenter.y + translation.y * scaleFrac;\n\n this.body.view.scale = scale;\n this.body.view.translation = { x: tx, y: ty };\n this.body.emitter.emit('zoom', { direction: '+', scale: this.body.view.scale, pointer: null });\n\n }\n\n /**\n *\n * @private\n */\n _zoomOut() {\n var scaleOld = this.body.view.scale;\n var scale = this.body.view.scale / (1 + this.options.keyboard.speed.zoom);\n var translation = this.body.view.translation;\n var scaleFrac = scale / scaleOld;\n var tx = (1 - scaleFrac) * this.canvas.canvasViewCenter.x + translation.x * scaleFrac;\n var ty = (1 - scaleFrac) * this.canvas.canvasViewCenter.y + translation.y * scaleFrac;\n\n this.body.view.scale = scale;\n this.body.view.translation = { x: tx, y: ty };\n this.body.emitter.emit('zoom', { direction: '-', scale: this.body.view.scale, pointer: null });\n }\n\n\n /**\n * bind all keys using keycharm.\n */\n configureKeyboardBindings() {\n if (this.keycharm !== undefined) {\n this.keycharm.destroy();\n }\n\n if (this.options.keyboard.enabled === true) {\n if (this.options.keyboard.bindToWindow === true) {\n this.keycharm = keycharm({container: window, preventDefault: true});\n }\n else {\n this.keycharm = keycharm({container: this.canvas.frame, preventDefault: true});\n }\n\n this.keycharm.reset();\n\n if (this.activated === true) {\n this.keycharm.bind(\"up\", () => {this.bindToRedraw(\"_moveUp\") ;}, \"keydown\");\n this.keycharm.bind(\"down\", () => {this.bindToRedraw(\"_moveDown\") ;}, \"keydown\");\n this.keycharm.bind(\"left\", () => {this.bindToRedraw(\"_moveLeft\") ;}, \"keydown\");\n this.keycharm.bind(\"right\", () => {this.bindToRedraw(\"_moveRight\");}, \"keydown\");\n this.keycharm.bind(\"=\", () => {this.bindToRedraw(\"_zoomIn\") ;}, \"keydown\");\n this.keycharm.bind(\"num+\", () => {this.bindToRedraw(\"_zoomIn\") ;}, \"keydown\");\n this.keycharm.bind(\"num-\", () => {this.bindToRedraw(\"_zoomOut\") ;}, \"keydown\");\n this.keycharm.bind(\"-\", () => {this.bindToRedraw(\"_zoomOut\") ;}, \"keydown\");\n this.keycharm.bind(\"[\", () => {this.bindToRedraw(\"_zoomOut\") ;}, \"keydown\");\n this.keycharm.bind(\"]\", () => {this.bindToRedraw(\"_zoomIn\") ;}, \"keydown\");\n this.keycharm.bind(\"pageup\", () => {this.bindToRedraw(\"_zoomIn\") ;}, \"keydown\");\n this.keycharm.bind(\"pagedown\", () => {this.bindToRedraw(\"_zoomOut\") ;}, \"keydown\");\n\n this.keycharm.bind(\"up\", () => {this.unbindFromRedraw(\"_moveUp\") ;}, \"keyup\");\n this.keycharm.bind(\"down\", () => {this.unbindFromRedraw(\"_moveDown\") ;}, \"keyup\");\n this.keycharm.bind(\"left\", () => {this.unbindFromRedraw(\"_moveLeft\") ;}, \"keyup\");\n this.keycharm.bind(\"right\", () => {this.unbindFromRedraw(\"_moveRight\");}, \"keyup\");\n this.keycharm.bind(\"=\", () => {this.unbindFromRedraw(\"_zoomIn\") ;}, \"keyup\");\n this.keycharm.bind(\"num+\", () => {this.unbindFromRedraw(\"_zoomIn\") ;}, \"keyup\");\n this.keycharm.bind(\"num-\", () => {this.unbindFromRedraw(\"_zoomOut\") ;}, \"keyup\");\n this.keycharm.bind(\"-\", () => {this.unbindFromRedraw(\"_zoomOut\") ;}, \"keyup\");\n this.keycharm.bind(\"[\", () => {this.unbindFromRedraw(\"_zoomOut\") ;}, \"keyup\");\n this.keycharm.bind(\"]\", () => {this.unbindFromRedraw(\"_zoomIn\") ;}, \"keyup\");\n this.keycharm.bind(\"pageup\", () => {this.unbindFromRedraw(\"_zoomIn\") ;}, \"keyup\");\n this.keycharm.bind(\"pagedown\", () => {this.unbindFromRedraw(\"_zoomOut\") ;}, \"keyup\");\n }\n }\n }\n}\n\n\nexport default NavigationHandler;\n","import './Popup.css';\n\n/**\n * Popup is a class to create a popup window with some text\n */\nclass Popup {\n /**\n * @param {Element} container The container object.\n * @param {string} overflowMethod How the popup should act to overflowing ('flip' or 'cap')\n */\n constructor(container, overflowMethod) {\n this.container = container;\n this.overflowMethod = overflowMethod || 'cap';\n\n this.x = 0;\n this.y = 0;\n this.padding = 5;\n this.hidden = false;\n\n // create the frame\n this.frame = document.createElement('div');\n this.frame.className = 'vis-tooltip';\n this.container.appendChild(this.frame);\n }\n\n /**\n * @param {number} x Horizontal position of the popup window\n * @param {number} y Vertical position of the popup window\n */\n setPosition(x, y) {\n this.x = parseInt(x);\n this.y = parseInt(y);\n }\n\n /**\n * Set the content for the popup window. This can be HTML code or text.\n * @param {string | Element} content\n */\n setText(content) {\n if (content instanceof Element) {\n this.frame.innerHTML = '';\n this.frame.appendChild(content);\n }\n else {\n this.frame.innerHTML = content; // string containing text or HTML\n }\n }\n\n /**\n * Show the popup window\n * @param {boolean} [doShow] Show or hide the window\n */\n show(doShow) {\n if (doShow === undefined) {\n doShow = true;\n }\n\n if (doShow === true) {\n var height = this.frame.clientHeight;\n var width = this.frame.clientWidth;\n var maxHeight = this.frame.parentNode.clientHeight;\n var maxWidth = this.frame.parentNode.clientWidth;\n\n var left = 0, top = 0;\n\n if (this.overflowMethod == 'flip') {\n var isLeft = false, isTop = true; // Where around the position it's located\n\n if (this.y - height < this.padding) {\n isTop = false;\n }\n\n if (this.x + width > maxWidth - this.padding) {\n isLeft = true;\n }\n\n if (isLeft) {\n left = this.x - width;\n } else {\n left = this.x;\n }\n\n if (isTop) {\n top = this.y - height;\n } else {\n top = this.y;\n }\n } else {\n top = (this.y - height);\n if (top + height + this.padding > maxHeight) {\n top = maxHeight - height - this.padding;\n }\n if (top < this.padding) {\n top = this.padding;\n }\n\n left = this.x;\n if (left + width + this.padding > maxWidth) {\n left = maxWidth - width - this.padding;\n }\n if (left < this.padding) {\n left = this.padding;\n }\n }\n\n this.frame.style.left = left + \"px\";\n this.frame.style.top = top + \"px\";\n this.frame.style.visibility = \"visible\";\n this.hidden = false;\n }\n else {\n this.hide();\n }\n }\n\n /**\n * Hide the popup window\n */\n hide() {\n this.hidden = true;\n this.frame.style.left = \"0\";\n this.frame.style.top = \"0\";\n this.frame.style.visibility = \"hidden\";\n }\n\n /**\n * Remove the popup window\n */\n destroy() {\n this.frame.parentNode.removeChild(this.frame); // Remove element from DOM\n }\n}\n\nexport default Popup;\n","import util from 'vis-util';\nimport NavigationHandler from './components/NavigationHandler';\nimport Popup from './../../shared/Popup';\n\n\n/**\n * Handler for interactions\n */\nclass InteractionHandler {\n /**\n * @param {Object} body\n * @param {Canvas} canvas\n * @param {SelectionHandler} selectionHandler\n */\n constructor(body, canvas, selectionHandler) {\n this.body = body;\n this.canvas = canvas;\n this.selectionHandler = selectionHandler;\n this.navigationHandler = new NavigationHandler(body,canvas);\n\n // bind the events from hammer to functions in this object\n this.body.eventListeners.onTap = this.onTap.bind(this);\n this.body.eventListeners.onTouch = this.onTouch.bind(this);\n this.body.eventListeners.onDoubleTap = this.onDoubleTap.bind(this);\n this.body.eventListeners.onHold = this.onHold.bind(this);\n this.body.eventListeners.onDragStart = this.onDragStart.bind(this);\n this.body.eventListeners.onDrag = this.onDrag.bind(this);\n this.body.eventListeners.onDragEnd = this.onDragEnd.bind(this);\n this.body.eventListeners.onMouseWheel = this.onMouseWheel.bind(this);\n this.body.eventListeners.onPinch = this.onPinch.bind(this);\n this.body.eventListeners.onMouseMove = this.onMouseMove.bind(this);\n this.body.eventListeners.onRelease = this.onRelease.bind(this);\n this.body.eventListeners.onContext = this.onContext.bind(this);\n\n this.touchTime = 0;\n this.drag = {};\n this.pinch = {};\n this.popup = undefined;\n this.popupObj = undefined;\n this.popupTimer = undefined;\n\n this.body.functions.getPointer = this.getPointer.bind(this);\n\n this.options = {};\n this.defaultOptions = {\n dragNodes:true,\n dragView: true,\n hover: false,\n keyboard: {\n enabled: false,\n speed: {x: 10, y: 10, zoom: 0.02},\n bindToWindow: true\n },\n navigationButtons: false,\n tooltipDelay: 300,\n zoomView: true,\n zoomSpeed: 1\n };\n util.extend(this.options,this.defaultOptions);\n\n this.bindEventListeners()\n }\n\n /**\n * Binds event listeners\n */\n bindEventListeners() {\n this.body.emitter.on('destroy', () => {\n clearTimeout(this.popupTimer);\n delete this.body.functions.getPointer;\n })\n }\n\n /**\n *\n * @param {Object} options\n */\n setOptions(options) {\n if (options !== undefined) {\n // extend all but the values in fields\n let fields = ['hideEdgesOnDrag', 'hideEdgesOnZoom', 'hideNodesOnDrag','keyboard','multiselect','selectable','selectConnectedEdges'];\n util.selectiveNotDeepExtend(fields, this.options, options);\n\n // merge the keyboard options in.\n util.mergeOptions(this.options, options, 'keyboard');\n\n if (options.tooltip) {\n util.extend(this.options.tooltip, options.tooltip);\n if (options.tooltip.color) {\n this.options.tooltip.color = util.parseColor(options.tooltip.color);\n }\n }\n }\n\n this.navigationHandler.setOptions(this.options);\n }\n\n\n /**\n * Get the pointer location from a touch location\n * @param {{x: number, y: number}} touch\n * @return {{x: number, y: number}} pointer\n * @private\n */\n getPointer(touch) {\n return {\n x: touch.x - util.getAbsoluteLeft(this.canvas.frame.canvas),\n y: touch.y - util.getAbsoluteTop(this.canvas.frame.canvas)\n };\n }\n\n\n /**\n * On start of a touch gesture, store the pointer\n * @param {Event} event The event\n * @private\n */\n onTouch(event) {\n if (new Date().valueOf() - this.touchTime > 50) {\n this.drag.pointer = this.getPointer(event.center);\n this.drag.pinched = false;\n this.pinch.scale = this.body.view.scale;\n // to avoid double fireing of this event because we have two hammer instances. (on canvas and on frame)\n this.touchTime = new Date().valueOf();\n }\n }\n\n\n /**\n * handle tap/click event: select/unselect a node\n * @param {Event} event\n * @private\n */\n onTap(event) {\n let pointer = this.getPointer(event.center);\n let multiselect = this.selectionHandler.options.multiselect &&\n (event.changedPointers[0].ctrlKey || event.changedPointers[0].metaKey);\n\n this.checkSelectionChanges(pointer, event, multiselect);\n this.selectionHandler._generateClickEvent('click', event, pointer);\n }\n\n\n /**\n * handle doubletap event\n * @param {Event} event\n * @private\n */\n onDoubleTap(event) {\n let pointer = this.getPointer(event.center);\n this.selectionHandler._generateClickEvent('doubleClick', event, pointer);\n }\n\n\n /**\n * handle long tap event: multi select nodes\n * @param {Event} event\n * @private\n */\n onHold(event) {\n let pointer = this.getPointer(event.center);\n let multiselect = this.selectionHandler.options.multiselect;\n\n this.checkSelectionChanges(pointer, event, multiselect);\n\n this.selectionHandler._generateClickEvent('click', event, pointer);\n this.selectionHandler._generateClickEvent('hold', event, pointer);\n }\n\n\n /**\n * handle the release of the screen\n *\n * @param {Event} event\n * @private\n */\n onRelease(event) {\n if (new Date().valueOf() - this.touchTime > 10) {\n let pointer = this.getPointer(event.center);\n this.selectionHandler._generateClickEvent('release', event, pointer);\n // to avoid double fireing of this event because we have two hammer instances. (on canvas and on frame)\n this.touchTime = new Date().valueOf();\n }\n }\n\n /**\n *\n * @param {Event} event\n */\n onContext(event) {\n let pointer = this.getPointer({x:event.clientX, y:event.clientY});\n this.selectionHandler._generateClickEvent('oncontext', event, pointer);\n }\n\n\n /**\n * Select and deselect nodes depending current selection change.\n *\n * For changing nodes, select/deselect events are fired.\n *\n * NOTE: For a given edge, if one connecting node is deselected and with the same\n * click the other node is selected, no events for the edge will fire.\n * It was selected and it will remain selected.\n *\n * TODO: This is all SelectionHandler calls; the method should be moved to there.\n *\n * @param {{x: number, y: number}} pointer\n * @param {Event} event\n * @param {boolean} [add=false]\n */\n checkSelectionChanges(pointer, event, add = false) {\n let previousSelection = this.selectionHandler.getSelection();\n let selected = false;\n if (add === true) {\n selected = this.selectionHandler.selectAdditionalOnPoint(pointer);\n }\n else {\n selected = this.selectionHandler.selectOnPoint(pointer);\n }\n let currentSelection = this.selectionHandler.getSelection();\n\n // See NOTE in method comment for the reason to do it like this\n let deselectedItems = this._determineDifference(previousSelection, currentSelection);\n let selectedItems = this._determineDifference(currentSelection , previousSelection);\n\n if (deselectedItems.edges.length > 0) {\n this.selectionHandler._generateClickEvent('deselectEdge', event, pointer, previousSelection);\n selected = true;\n }\n\n if (deselectedItems.nodes.length > 0) {\n this.selectionHandler._generateClickEvent('deselectNode', event, pointer, previousSelection);\n selected = true;\n }\n\n if (selectedItems.nodes.length > 0) {\n this.selectionHandler._generateClickEvent('selectNode', event, pointer);\n selected = true;\n }\n\n if (selectedItems.edges.length > 0) {\n this.selectionHandler._generateClickEvent('selectEdge', event, pointer);\n selected = true;\n }\n\n // fire the select event if anything has been selected or deselected\n if (selected === true) { // select or unselect\n this.selectionHandler._generateClickEvent('select', event, pointer);\n }\n }\n\n\n /**\n * Remove all node and edge id's from the first set that are present in the second one.\n *\n * @param {{nodes: Array., edges: Array.}} firstSet\n * @param {{nodes: Array., edges: Array.}} secondSet\n * @returns {{nodes: Array., edges: Array.}}\n * @private\n */\n _determineDifference(firstSet, secondSet) {\n let arrayDiff = function(firstArr, secondArr) {\n let result = [];\n\n for (let i = 0; i < firstArr.length; i++) {\n let value = firstArr[i];\n if (secondArr.indexOf(value) === -1) {\n result.push(value);\n }\n }\n\n return result;\n };\n\n return {\n nodes: arrayDiff(firstSet.nodes, secondSet.nodes),\n edges: arrayDiff(firstSet.edges, secondSet.edges)\n };\n }\n\n\n /**\n * This function is called by onDragStart.\n * It is separated out because we can then overload it for the datamanipulation system.\n *\n * @param {Event} event\n * @private\n */\n onDragStart(event) {\n //in case the touch event was triggered on an external div, do the initial touch now.\n if (this.drag.pointer === undefined) {\n this.onTouch(event);\n }\n\n // note: drag.pointer is set in onTouch to get the initial touch location\n let node = this.selectionHandler.getNodeAt(this.drag.pointer);\n\n this.drag.dragging = true;\n this.drag.selection = [];\n this.drag.translation = util.extend({},this.body.view.translation); // copy the object\n this.drag.nodeId = undefined;\n\n if (node !== undefined && this.options.dragNodes === true) {\n this.drag.nodeId = node.id;\n // select the clicked node if not yet selected\n if (node.isSelected() === false) {\n this.selectionHandler.unselectAll();\n this.selectionHandler.selectObject(node);\n }\n\n // after select to contain the node\n this.selectionHandler._generateClickEvent('dragStart', event, this.drag.pointer);\n\n let selection = this.selectionHandler.selectionObj.nodes;\n // create an array with the selected nodes and their original location and status\n for (let nodeId in selection) {\n if (selection.hasOwnProperty(nodeId)) {\n let object = selection[nodeId];\n let s = {\n id: object.id,\n node: object,\n\n // store original x, y, xFixed and yFixed, make the node temporarily Fixed\n x: object.x,\n y: object.y,\n xFixed: object.options.fixed.x,\n yFixed: object.options.fixed.y\n };\n\n object.options.fixed.x = true;\n object.options.fixed.y = true;\n\n this.drag.selection.push(s);\n }\n }\n }\n else {\n // fallback if no node is selected and thus the view is dragged.\n this.selectionHandler._generateClickEvent('dragStart', event, this.drag.pointer, undefined, true);\n }\n }\n\n\n /**\n * handle drag event\n * @param {Event} event\n * @private\n */\n onDrag(event) {\n if (this.drag.pinched === true) {\n return;\n }\n\n // remove the focus on node if it is focussed on by the focusOnNode\n this.body.emitter.emit('unlockNode');\n\n let pointer = this.getPointer(event.center);\n\n let selection = this.drag.selection;\n if (selection && selection.length && this.options.dragNodes === true) {\n this.selectionHandler._generateClickEvent('dragging', event, pointer);\n\n // calculate delta's and new location\n let deltaX = pointer.x - this.drag.pointer.x;\n let deltaY = pointer.y - this.drag.pointer.y;\n\n // update position of all selected nodes\n selection.forEach((selection) => {\n let node = selection.node;\n // only move the node if it was not fixed initially\n if (selection.xFixed === false) {\n node.x = this.canvas._XconvertDOMtoCanvas(this.canvas._XconvertCanvasToDOM(selection.x) + deltaX);\n }\n // only move the node if it was not fixed initially\n if (selection.yFixed === false) {\n node.y = this.canvas._YconvertDOMtoCanvas(this.canvas._YconvertCanvasToDOM(selection.y) + deltaY);\n }\n });\n\n // start the simulation of the physics\n this.body.emitter.emit('startSimulation');\n }\n else {\n // move the network\n if (this.options.dragView === true) {\n this.selectionHandler._generateClickEvent('dragging', event, pointer, undefined, true);\n\n // if the drag was not started properly because the click started outside the network div, start it now.\n if (this.drag.pointer === undefined) {\n this.onDragStart(event);\n return;\n }\n let diffX = pointer.x - this.drag.pointer.x;\n let diffY = pointer.y - this.drag.pointer.y;\n\n this.body.view.translation = {x:this.drag.translation.x + diffX, y:this.drag.translation.y + diffY};\n this.body.emitter.emit('_requestRedraw');\n }\n }\n }\n\n\n /**\n * handle drag start event\n * @param {Event} event\n * @private\n */\n onDragEnd(event) {\n this.drag.dragging = false;\n let selection = this.drag.selection;\n if (selection && selection.length) {\n selection.forEach(function (s) {\n // restore original xFixed and yFixed\n s.node.options.fixed.x = s.xFixed;\n s.node.options.fixed.y = s.yFixed;\n });\n this.selectionHandler._generateClickEvent('dragEnd', event, this.getPointer(event.center));\n this.body.emitter.emit('startSimulation');\n }\n else {\n this.selectionHandler._generateClickEvent('dragEnd', event, this.getPointer(event.center), undefined, true);\n this.body.emitter.emit('_requestRedraw');\n }\n }\n\n\n\n /**\n * Handle pinch event\n * @param {Event} event The event\n * @private\n */\n onPinch(event) {\n let pointer = this.getPointer(event.center);\n\n this.drag.pinched = true;\n if (this.pinch['scale'] === undefined) {\n this.pinch.scale = 1;\n }\n\n // TODO: enabled moving while pinching?\n let scale = this.pinch.scale * event.scale;\n this.zoom(scale, pointer)\n }\n\n\n /**\n * Zoom the network in or out\n * @param {number} scale a number around 1, and between 0.01 and 10\n * @param {{x: number, y: number}} pointer Position on screen\n * @private\n */\n zoom(scale, pointer) {\n if (this.options.zoomView === true) {\n let scaleOld = this.body.view.scale;\n if (scale < 0.00001) {\n scale = 0.00001;\n }\n if (scale > 10) {\n scale = 10;\n }\n\n let preScaleDragPointer = undefined;\n if (this.drag !== undefined) {\n if (this.drag.dragging === true) {\n preScaleDragPointer = this.canvas.DOMtoCanvas(this.drag.pointer);\n }\n }\n // + this.canvas.frame.canvas.clientHeight / 2\n let translation = this.body.view.translation;\n\n let scaleFrac = scale / scaleOld;\n let tx = (1 - scaleFrac) * pointer.x + translation.x * scaleFrac;\n let ty = (1 - scaleFrac) * pointer.y + translation.y * scaleFrac;\n\n this.body.view.scale = scale;\n this.body.view.translation = {x:tx, y:ty};\n\n if (preScaleDragPointer != undefined) {\n let postScaleDragPointer = this.canvas.canvasToDOM(preScaleDragPointer);\n this.drag.pointer.x = postScaleDragPointer.x;\n this.drag.pointer.y = postScaleDragPointer.y;\n }\n\n this.body.emitter.emit('_requestRedraw');\n\n if (scaleOld < scale) {\n this.body.emitter.emit('zoom', {direction: '+', scale: this.body.view.scale, pointer: pointer});\n }\n else {\n this.body.emitter.emit('zoom', {direction: '-', scale: this.body.view.scale, pointer: pointer});\n }\n }\n }\n\n\n /**\n * Event handler for mouse wheel event, used to zoom the timeline\n * See http://adomas.org/javascript-mouse-wheel/\n * https://github.com/EightMedia/hammer.js/issues/256\n * @param {MouseEvent} event\n * @private\n */\n onMouseWheel(event) {\n if (this.options.zoomView === true) {\n // retrieve delta\n let delta = 0;\n if (event.wheelDelta) { /* IE/Opera. */\n delta = event.wheelDelta / 120;\n }\n else if (event.detail) { /* Mozilla case. */\n // In Mozilla, sign of delta is different than in IE.\n // Also, delta is multiple of 3.\n delta = -event.detail / 3;\n }\n\n // If delta is nonzero, handle it.\n // Basically, delta is now positive if wheel was scrolled up,\n // and negative, if wheel was scrolled down.\n if (delta !== 0) {\n\n // calculate the new scale\n let scale = this.body.view.scale;\n let zoom = delta * (this.options.zoomSpeed / 10);\n if (delta < 0) {\n zoom = zoom / (1 - zoom);\n }\n scale *= (1 + zoom);\n\n // calculate the pointer location\n let pointer = this.getPointer({x: event.clientX, y: event.clientY});\n\n // apply the new scale\n this.zoom(scale, pointer);\n }\n\n // Prevent default actions caused by mouse wheel.\n event.preventDefault();\n }\n }\n\n\n /**\n * Mouse move handler for checking whether the title moves over a node with a title.\n * @param {Event} event\n * @private\n */\n onMouseMove(event) {\n let pointer = this.getPointer({x:event.clientX, y:event.clientY});\n let popupVisible = false;\n\n // check if the previously selected node is still selected\n if (this.popup !== undefined) {\n if (this.popup.hidden === false) {\n this._checkHidePopup(pointer);\n }\n\n // if the popup was not hidden above\n if (this.popup.hidden === false) {\n popupVisible = true;\n this.popup.setPosition(pointer.x + 3, pointer.y - 5);\n this.popup.show();\n }\n }\n\n // if we bind the keyboard to the div, we have to highlight it to use it. This highlights it on mouse over.\n if (this.options.keyboard.bindToWindow === false && this.options.keyboard.enabled === true) {\n this.canvas.frame.focus();\n }\n\n // start a timeout that will check if the mouse is positioned above an element\n if (popupVisible === false) {\n if (this.popupTimer !== undefined) {\n clearInterval(this.popupTimer); // stop any running calculationTimer\n this.popupTimer = undefined;\n }\n if (!this.drag.dragging) {\n this.popupTimer = setTimeout(() => this._checkShowPopup(pointer), this.options.tooltipDelay);\n }\n }\n\n // adding hover highlights\n if (this.options.hover === true) {\n this.selectionHandler.hoverObject(event, pointer);\n }\n }\n\n\n\n /**\n * Check if there is an element on the given position in the network\n * (a node or edge). If so, and if this element has a title,\n * show a popup window with its title.\n *\n * @param {{x:number, y:number}} pointer\n * @private\n */\n _checkShowPopup(pointer) {\n let x = this.canvas._XconvertDOMtoCanvas(pointer.x);\n let y = this.canvas._YconvertDOMtoCanvas(pointer.y);\n let pointerObj = {\n left: x,\n top: y,\n right: x,\n bottom: y\n };\n\n let previousPopupObjId = this.popupObj === undefined ? undefined : this.popupObj.id;\n let nodeUnderCursor = false;\n let popupType = 'node';\n\n // check if a node is under the cursor.\n if (this.popupObj === undefined) {\n // search the nodes for overlap, select the top one in case of multiple nodes\n let nodeIndices = this.body.nodeIndices;\n let nodes = this.body.nodes;\n let node;\n let overlappingNodes = [];\n for (let i = 0; i < nodeIndices.length; i++) {\n node = nodes[nodeIndices[i]];\n if (node.isOverlappingWith(pointerObj) === true) {\n nodeUnderCursor = true;\n if (node.getTitle() !== undefined) {\n overlappingNodes.push(nodeIndices[i]);\n }\n }\n }\n\n if (overlappingNodes.length > 0) {\n // if there are overlapping nodes, select the last one, this is the one which is drawn on top of the others\n this.popupObj = nodes[overlappingNodes[overlappingNodes.length - 1]];\n // if you hover over a node, the title of the edge is not supposed to be shown.\n nodeUnderCursor = true;\n }\n }\n\n if (this.popupObj === undefined && nodeUnderCursor === false) {\n // search the edges for overlap\n let edgeIndices = this.body.edgeIndices;\n let edges = this.body.edges;\n let edge;\n let overlappingEdges = [];\n for (let i = 0; i < edgeIndices.length; i++) {\n edge = edges[edgeIndices[i]];\n if (edge.isOverlappingWith(pointerObj) === true) {\n if (edge.connected === true && edge.getTitle() !== undefined) {\n overlappingEdges.push(edgeIndices[i]);\n }\n }\n }\n\n if (overlappingEdges.length > 0) {\n this.popupObj = edges[overlappingEdges[overlappingEdges.length - 1]];\n popupType = 'edge';\n }\n }\n\n if (this.popupObj !== undefined) {\n // show popup message window\n if (this.popupObj.id !== previousPopupObjId) {\n if (this.popup === undefined) {\n this.popup = new Popup(this.canvas.frame);\n }\n\n this.popup.popupTargetType = popupType;\n this.popup.popupTargetId = this.popupObj.id;\n\n // adjust a small offset such that the mouse cursor is located in the\n // bottom left location of the popup, and you can easily move over the\n // popup area\n this.popup.setPosition(pointer.x + 3, pointer.y - 5);\n this.popup.setText(this.popupObj.getTitle());\n this.popup.show();\n this.body.emitter.emit('showPopup',this.popupObj.id);\n }\n }\n else {\n if (this.popup !== undefined) {\n this.popup.hide();\n this.body.emitter.emit('hidePopup');\n }\n }\n }\n\n\n /**\n * Check if the popup must be hidden, which is the case when the mouse is no\n * longer hovering on the object\n * @param {{x:number, y:number}} pointer\n * @private\n */\n _checkHidePopup(pointer) {\n let pointerObj = this.selectionHandler._pointerToPositionObject(pointer);\n\n let stillOnObj = false;\n if (this.popup.popupTargetType === 'node') {\n if (this.body.nodes[this.popup.popupTargetId] !== undefined) {\n stillOnObj = this.body.nodes[this.popup.popupTargetId].isOverlappingWith(pointerObj);\n\n // if the mouse is still one the node, we have to check if it is not also on one that is drawn on top of it.\n // we initially only check stillOnObj because this is much faster.\n if (stillOnObj === true) {\n let overNode = this.selectionHandler.getNodeAt(pointer);\n stillOnObj = overNode === undefined ? false : overNode.id === this.popup.popupTargetId;\n }\n }\n }\n else {\n if (this.selectionHandler.getNodeAt(pointer) === undefined) {\n if (this.body.edges[this.popup.popupTargetId] !== undefined) {\n stillOnObj = this.body.edges[this.popup.popupTargetId].isOverlappingWith(pointerObj);\n }\n }\n }\n\n\n if (stillOnObj === false) {\n this.popupObj = undefined;\n this.popup.hide();\n this.body.emitter.emit('hidePopup');\n }\n }\n}\n\nexport default InteractionHandler;\n","import Node from './components/Node';\nimport Edge from './components/Edge';\n\nimport util from 'vis-util';\n\n/**\n * The handler for selections\n */\nclass SelectionHandler {\n /**\n * @param {Object} body\n * @param {Canvas} canvas\n */\n constructor(body, canvas) {\n this.body = body;\n this.canvas = canvas;\n this.selectionObj = { nodes: [], edges: [] };\n this.hoverObj = { nodes: {}, edges: {} };\n\n this.options = {};\n this.defaultOptions = {\n multiselect: false,\n selectable: true,\n selectConnectedEdges: true,\n hoverConnectedEdges: true\n };\n util.extend(this.options, this.defaultOptions);\n\n this.body.emitter.on(\"_dataChanged\", () => {\n this.updateSelection()\n });\n }\n\n\n /**\n *\n * @param {Object} [options]\n */\n setOptions(options) {\n if (options !== undefined) {\n let fields = ['multiselect', 'hoverConnectedEdges', 'selectable', 'selectConnectedEdges'];\n util.selectiveDeepExtend(fields, this.options, options);\n }\n }\n\n\n /**\n * handles the selection part of the tap;\n *\n * @param {{x: number, y: number}} pointer\n * @returns {boolean}\n */\n selectOnPoint(pointer) {\n let selected = false;\n if (this.options.selectable === true) {\n let obj = this.getNodeAt(pointer) || this.getEdgeAt(pointer);\n\n // unselect after getting the objects in order to restore width and height.\n this.unselectAll();\n\n if (obj !== undefined) {\n selected = this.selectObject(obj);\n }\n this.body.emitter.emit(\"_requestRedraw\");\n }\n return selected;\n }\n\n /**\n *\n * @param {{x: number, y: number}} pointer\n * @returns {boolean}\n */\n selectAdditionalOnPoint(pointer) {\n let selectionChanged = false;\n if (this.options.selectable === true) {\n let obj = this.getNodeAt(pointer) || this.getEdgeAt(pointer);\n\n if (obj !== undefined) {\n selectionChanged = true;\n if (obj.isSelected() === true) {\n this.deselectObject(obj);\n }\n else {\n this.selectObject(obj);\n }\n\n this.body.emitter.emit(\"_requestRedraw\");\n }\n }\n return selectionChanged;\n }\n\n\n /**\n * Create an object containing the standard fields for an event.\n *\n * @param {Event} event\n * @param {{x: number, y: number}} pointer Object with the x and y screen coordinates of the mouse\n * @returns {{}}\n * @private\n */\n _initBaseEvent(event, pointer) {\n let properties = {};\n\n properties['pointer'] = {\n DOM: { x: pointer.x, y: pointer.y },\n canvas: this.canvas.DOMtoCanvas(pointer)\n };\n properties['event'] = event;\n\n return properties;\n }\n\n\n /**\n * Generate an event which the user can catch.\n *\n * This adds some extra data to the event with respect to cursor position and\n * selected nodes and edges.\n *\n * @param {string} eventType Name of event to send\n * @param {Event} event\n * @param {{x: number, y: number}} pointer Object with the x and y screen coordinates of the mouse\n * @param {Object|undefined} oldSelection If present, selection state before event occured\n * @param {boolean|undefined} [emptySelection=false] Indicate if selection data should be passed\n */\n _generateClickEvent(eventType, event, pointer, oldSelection, emptySelection = false) {\n let properties = this._initBaseEvent(event, pointer);\n\n if (emptySelection === true) {\n properties.nodes = [];\n properties.edges = [];\n }\n else {\n let tmp = this.getSelection();\n properties.nodes = tmp.nodes;\n properties.edges = tmp.edges;\n }\n\n if (oldSelection !== undefined) {\n properties['previousSelection'] = oldSelection;\n }\n\n if (eventType == 'click') {\n // For the time being, restrict this functionality to\n // just the click event.\n properties.items = this.getClickedItems(pointer);\n }\n\n if (event.controlEdge !== undefined) {\n properties.controlEdge = event.controlEdge;\n }\n\n this.body.emitter.emit(eventType, properties);\n }\n\n /**\n *\n * @param {Object} obj\n * @param {boolean} [highlightEdges=this.options.selectConnectedEdges]\n * @returns {boolean}\n */\n selectObject(obj, highlightEdges = this.options.selectConnectedEdges) {\n if (obj !== undefined) {\n if (obj instanceof Node) {\n if (highlightEdges === true) {\n this._selectConnectedEdges(obj);\n }\n }\n obj.select();\n this._addToSelection(obj);\n return true;\n }\n return false;\n }\n\n /**\n *\n * @param {Object} obj\n */\n deselectObject(obj) {\n if (obj.isSelected() === true) {\n obj.selected = false;\n this._removeFromSelection(obj);\n }\n }\n\n\n\n /**\n * retrieve all nodes overlapping with given object\n * @param {Object} object An object with parameters left, top, right, bottom\n * @return {number[]} An array with id's of the overlapping nodes\n * @private\n */\n _getAllNodesOverlappingWith(object) {\n let overlappingNodes = [];\n let nodes = this.body.nodes;\n for (let i = 0; i < this.body.nodeIndices.length; i++) {\n let nodeId = this.body.nodeIndices[i];\n if (nodes[nodeId].isOverlappingWith(object)) {\n overlappingNodes.push(nodeId);\n }\n }\n return overlappingNodes;\n }\n\n\n /**\n * Return a position object in canvasspace from a single point in screenspace\n *\n * @param {{x: number, y: number}} pointer\n * @returns {{left: number, top: number, right: number, bottom: number}}\n * @private\n */\n _pointerToPositionObject(pointer) {\n let canvasPos = this.canvas.DOMtoCanvas(pointer);\n return {\n left: canvasPos.x - 1,\n top: canvasPos.y + 1,\n right: canvasPos.x + 1,\n bottom: canvasPos.y - 1\n };\n }\n\n\n /**\n * Get the top node at the passed point (like a click)\n *\n * @param {{x: number, y: number}} pointer\n * @param {boolean} [returnNode=true]\n * @return {Node | undefined} node\n */\n getNodeAt(pointer, returnNode = true) {\n // we first check if this is an navigation controls element\n let positionObject = this._pointerToPositionObject(pointer);\n let overlappingNodes = this._getAllNodesOverlappingWith(positionObject);\n // if there are overlapping nodes, select the last one, this is the\n // one which is drawn on top of the others\n if (overlappingNodes.length > 0) {\n if (returnNode === true) {\n return this.body.nodes[overlappingNodes[overlappingNodes.length - 1]];\n }\n else {\n return overlappingNodes[overlappingNodes.length - 1];\n }\n }\n else {\n return undefined;\n }\n }\n\n\n /**\n * retrieve all edges overlapping with given object, selector is around center\n * @param {Object} object An object with parameters left, top, right, bottom\n * @param {number[]} overlappingEdges An array with id's of the overlapping nodes\n * @private\n */\n _getEdgesOverlappingWith(object, overlappingEdges) {\n let edges = this.body.edges;\n for (let i = 0; i < this.body.edgeIndices.length; i++) {\n let edgeId = this.body.edgeIndices[i];\n if (edges[edgeId].isOverlappingWith(object)) {\n overlappingEdges.push(edgeId);\n }\n }\n }\n\n\n /**\n * retrieve all nodes overlapping with given object\n * @param {Object} object An object with parameters left, top, right, bottom\n * @return {number[]} An array with id's of the overlapping nodes\n * @private\n */\n _getAllEdgesOverlappingWith(object) {\n let overlappingEdges = [];\n this._getEdgesOverlappingWith(object, overlappingEdges);\n return overlappingEdges;\n }\n\n\n /**\n * Get the edges nearest to the passed point (like a click)\n *\n * @param {{x: number, y: number}} pointer\n * @param {boolean} [returnEdge=true]\n * @return {Edge | undefined} node\n */\n getEdgeAt(pointer, returnEdge = true) {\n // Iterate over edges, pick closest within 10\n var canvasPos = this.canvas.DOMtoCanvas(pointer);\n var mindist = 10;\n var overlappingEdge = null;\n var edges = this.body.edges;\n for (var i = 0; i < this.body.edgeIndices.length; i++) {\n var edgeId = this.body.edgeIndices[i];\n var edge = edges[edgeId];\n if (edge.connected) {\n var xFrom = edge.from.x;\n var yFrom = edge.from.y;\n var xTo = edge.to.x;\n var yTo = edge.to.y;\n var dist = edge.edgeType.getDistanceToEdge(xFrom, yFrom, xTo, yTo, canvasPos.x, canvasPos.y);\n if (dist < mindist) {\n overlappingEdge = edgeId;\n mindist = dist;\n }\n }\n }\n if (overlappingEdge !== null) {\n if (returnEdge === true) {\n return this.body.edges[overlappingEdge];\n }\n else {\n return overlappingEdge;\n }\n }\n else {\n return undefined;\n }\n }\n\n\n /**\n * Add object to the selection array.\n *\n * @param {Object} obj\n * @private\n */\n _addToSelection(obj) {\n if (obj instanceof Node) {\n this.selectionObj.nodes[obj.id] = obj;\n }\n else {\n this.selectionObj.edges[obj.id] = obj;\n }\n }\n\n /**\n * Add object to the selection array.\n *\n * @param {Object} obj\n * @private\n */\n _addToHover(obj) {\n if (obj instanceof Node) {\n this.hoverObj.nodes[obj.id] = obj;\n }\n else {\n this.hoverObj.edges[obj.id] = obj;\n }\n }\n\n\n /**\n * Remove a single option from selection.\n *\n * @param {Object} obj\n * @private\n */\n _removeFromSelection(obj) {\n if (obj instanceof Node) {\n delete this.selectionObj.nodes[obj.id];\n this._unselectConnectedEdges(obj);\n }\n else {\n delete this.selectionObj.edges[obj.id];\n }\n }\n\n /**\n * Unselect all. The selectionObj is useful for this.\n */\n unselectAll() {\n for (let nodeId in this.selectionObj.nodes) {\n if (this.selectionObj.nodes.hasOwnProperty(nodeId)) {\n this.selectionObj.nodes[nodeId].unselect();\n }\n }\n for (let edgeId in this.selectionObj.edges) {\n if (this.selectionObj.edges.hasOwnProperty(edgeId)) {\n this.selectionObj.edges[edgeId].unselect();\n }\n }\n\n this.selectionObj = { nodes: {}, edges: {} };\n }\n\n\n /**\n * return the number of selected nodes\n *\n * @returns {number}\n * @private\n */\n _getSelectedNodeCount() {\n let count = 0;\n for (let nodeId in this.selectionObj.nodes) {\n if (this.selectionObj.nodes.hasOwnProperty(nodeId)) {\n count += 1;\n }\n }\n return count;\n }\n\n /**\n * return the selected node\n *\n * @returns {number}\n * @private\n */\n _getSelectedNode() {\n for (let nodeId in this.selectionObj.nodes) {\n if (this.selectionObj.nodes.hasOwnProperty(nodeId)) {\n return this.selectionObj.nodes[nodeId];\n }\n }\n return undefined;\n }\n\n /**\n * return the selected edge\n *\n * @returns {number}\n * @private\n */\n _getSelectedEdge() {\n for (let edgeId in this.selectionObj.edges) {\n if (this.selectionObj.edges.hasOwnProperty(edgeId)) {\n return this.selectionObj.edges[edgeId];\n }\n }\n return undefined;\n }\n\n\n /**\n * return the number of selected edges\n *\n * @returns {number}\n * @private\n */\n _getSelectedEdgeCount() {\n let count = 0;\n for (let edgeId in this.selectionObj.edges) {\n if (this.selectionObj.edges.hasOwnProperty(edgeId)) {\n count += 1;\n }\n }\n return count;\n }\n\n\n /**\n * return the number of selected objects.\n *\n * @returns {number}\n * @private\n */\n _getSelectedObjectCount() {\n let count = 0;\n for (let nodeId in this.selectionObj.nodes) {\n if (this.selectionObj.nodes.hasOwnProperty(nodeId)) {\n count += 1;\n }\n }\n for (let edgeId in this.selectionObj.edges) {\n if (this.selectionObj.edges.hasOwnProperty(edgeId)) {\n count += 1;\n }\n }\n return count;\n }\n\n /**\n * Check if anything is selected\n *\n * @returns {boolean}\n * @private\n */\n _selectionIsEmpty() {\n for (let nodeId in this.selectionObj.nodes) {\n if (this.selectionObj.nodes.hasOwnProperty(nodeId)) {\n return false;\n }\n }\n for (let edgeId in this.selectionObj.edges) {\n if (this.selectionObj.edges.hasOwnProperty(edgeId)) {\n return false;\n }\n }\n return true;\n }\n\n\n /**\n * check if one of the selected nodes is a cluster.\n *\n * @returns {boolean}\n * @private\n */\n _clusterInSelection() {\n for (let nodeId in this.selectionObj.nodes) {\n if (this.selectionObj.nodes.hasOwnProperty(nodeId)) {\n if (this.selectionObj.nodes[nodeId].clusterSize > 1) {\n return true;\n }\n }\n }\n return false;\n }\n\n /**\n * select the edges connected to the node that is being selected\n *\n * @param {Node} node\n * @private\n */\n _selectConnectedEdges(node) {\n for (let i = 0; i < node.edges.length; i++) {\n let edge = node.edges[i];\n edge.select();\n this._addToSelection(edge);\n }\n }\n\n /**\n * select the edges connected to the node that is being selected\n *\n * @param {Node} node\n * @private\n */\n _hoverConnectedEdges(node) {\n for (let i = 0; i < node.edges.length; i++) {\n let edge = node.edges[i];\n edge.hover = true;\n this._addToHover(edge);\n }\n }\n\n\n /**\n * unselect the edges connected to the node that is being selected\n *\n * @param {Node} node\n * @private\n */\n _unselectConnectedEdges(node) {\n for (let i = 0; i < node.edges.length; i++) {\n let edge = node.edges[i];\n edge.unselect();\n this._removeFromSelection(edge);\n }\n }\n\n\n /**\n * Remove the highlight from a node or edge, in response to mouse movement\n *\n * @param {Event} event\n * @param {{x: number, y: number}} pointer object with the x and y screen coordinates of the mouse\n * @param {Node|vis.Edge} object\n * @private\n */\n emitBlurEvent(event, pointer, object) {\n let properties = this._initBaseEvent(event, pointer);\n\n if (object.hover === true) {\n object.hover = false;\n if (object instanceof Node) {\n properties.node = object.id;\n this.body.emitter.emit(\"blurNode\", properties);\n }\n else {\n properties.edge = object.id;\n this.body.emitter.emit(\"blurEdge\", properties);\n }\n }\n }\n\n\n /**\n * Create the highlight for a node or edge, in response to mouse movement\n *\n * @param {Event} event\n * @param {{x: number, y: number}} pointer object with the x and y screen coordinates of the mouse\n * @param {Node|vis.Edge} object\n * @returns {boolean} hoverChanged\n * @private\n */\n emitHoverEvent(event, pointer, object) {\n let properties = this._initBaseEvent(event, pointer);\n let hoverChanged = false;\n\n if (object.hover === false) {\n object.hover = true;\n this._addToHover(object);\n hoverChanged = true;\n if (object instanceof Node) {\n properties.node = object.id;\n this.body.emitter.emit(\"hoverNode\", properties);\n }\n else {\n properties.edge = object.id;\n this.body.emitter.emit(\"hoverEdge\", properties);\n }\n }\n\n return hoverChanged;\n }\n\n\n /**\n * Perform actions in response to a mouse movement.\n *\n * @param {Event} event\n * @param {{x: number, y: number}} pointer | object with the x and y screen coordinates of the mouse\n */\n hoverObject(event, pointer) {\n let object = this.getNodeAt(pointer);\n if (object === undefined) {\n object = this.getEdgeAt(pointer);\n }\n\n let hoverChanged = false;\n // remove all node hover highlights\n for (let nodeId in this.hoverObj.nodes) {\n if (this.hoverObj.nodes.hasOwnProperty(nodeId)) {\n if (object === undefined || (object instanceof Node && object.id != nodeId) || object instanceof Edge) {\n this.emitBlurEvent(event, pointer, this.hoverObj.nodes[nodeId]);\n delete this.hoverObj.nodes[nodeId];\n hoverChanged = true;\n }\n }\n }\n\n // removing all edge hover highlights\n for (let edgeId in this.hoverObj.edges) {\n if (this.hoverObj.edges.hasOwnProperty(edgeId)) {\n // if the hover has been changed here it means that the node has been hovered over or off\n // we then do not use the emitBlurEvent method here.\n if (hoverChanged === true) {\n this.hoverObj.edges[edgeId].hover = false;\n delete this.hoverObj.edges[edgeId];\n }\n // if the blur remains the same and the object is undefined (mouse off) or another\n // edge has been hovered, or another node has been hovered we blur the edge.\n else if (object === undefined || (object instanceof Edge && object.id != edgeId) || (object instanceof Node && !object.hover)) {\n this.emitBlurEvent(event, pointer, this.hoverObj.edges[edgeId]);\n delete this.hoverObj.edges[edgeId];\n hoverChanged = true;\n }\n }\n }\n\n if (object !== undefined) {\n const hoveredEdgesCount = Object.keys(this.hoverObj.edges).length;\n const hoveredNodesCount = Object.keys(this.hoverObj.nodes).length;\n const newOnlyHoveredEdge = object instanceof Edge && hoveredEdgesCount === 0 && hoveredNodesCount === 0;\n const newOnlyHoveredNode = object instanceof Node && hoveredEdgesCount === 0 && hoveredNodesCount === 0;\n\n if (hoverChanged || newOnlyHoveredEdge || newOnlyHoveredNode) {\n hoverChanged = this.emitHoverEvent(event, pointer, object);\n }\n\n if (object instanceof Node && this.options.hoverConnectedEdges === true) {\n this._hoverConnectedEdges(object);\n }\n }\n\n if (hoverChanged === true) {\n this.body.emitter.emit('_requestRedraw');\n }\n }\n\n\n\n\n /**\n *\n * retrieve the currently selected objects\n * @return {{nodes: Array., edges: Array.}} selection\n */\n getSelection() {\n let nodeIds = this.getSelectedNodes();\n let edgeIds = this.getSelectedEdges();\n return { nodes: nodeIds, edges: edgeIds };\n }\n\n /**\n *\n * retrieve the currently selected nodes\n * @return {string[]} selection An array with the ids of the\n * selected nodes.\n */\n getSelectedNodes() {\n let idArray = [];\n if (this.options.selectable === true) {\n for (let nodeId in this.selectionObj.nodes) {\n if (this.selectionObj.nodes.hasOwnProperty(nodeId)) {\n idArray.push(this.selectionObj.nodes[nodeId].id);\n }\n }\n }\n return idArray;\n }\n\n /**\n *\n * retrieve the currently selected edges\n * @return {Array} selection An array with the ids of the\n * selected nodes.\n */\n getSelectedEdges() {\n let idArray = [];\n if (this.options.selectable === true) {\n for (let edgeId in this.selectionObj.edges) {\n if (this.selectionObj.edges.hasOwnProperty(edgeId)) {\n idArray.push(this.selectionObj.edges[edgeId].id);\n }\n }\n }\n return idArray;\n }\n\n /**\n * Updates the current selection\n * @param {{nodes: Array., edges: Array.}} selection\n * @param {Object} options Options\n */\n setSelection(selection, options = {}) {\n let i, id;\n\n if (!selection || (!selection.nodes && !selection.edges))\n throw 'Selection must be an object with nodes and/or edges properties';\n // first unselect any selected node, if option is true or undefined\n if (options.unselectAll || options.unselectAll === undefined) {\n this.unselectAll();\n }\n if (selection.nodes) {\n for (i = 0; i < selection.nodes.length; i++) {\n id = selection.nodes[i];\n\n let node = this.body.nodes[id];\n if (!node) {\n throw new RangeError('Node with id \"' + id + '\" not found');\n }\n // don't select edges with it\n this.selectObject(node, options.highlightEdges);\n }\n }\n\n if (selection.edges) {\n for (i = 0; i < selection.edges.length; i++) {\n id = selection.edges[i];\n\n let edge = this.body.edges[id];\n if (!edge) {\n throw new RangeError('Edge with id \"' + id + '\" not found');\n }\n this.selectObject(edge);\n }\n }\n this.body.emitter.emit('_requestRedraw');\n }\n\n\n /**\n * select zero or more nodes with the option to highlight edges\n * @param {number[] | string[]} selection An array with the ids of the\n * selected nodes.\n * @param {boolean} [highlightEdges]\n */\n selectNodes(selection, highlightEdges = true) {\n if (!selection || (selection.length === undefined))\n throw 'Selection must be an array with ids';\n\n this.setSelection({ nodes: selection }, { highlightEdges: highlightEdges });\n }\n\n\n /**\n * select zero or more edges\n * @param {number[] | string[]} selection An array with the ids of the\n * selected nodes.\n */\n selectEdges(selection) {\n if (!selection || (selection.length === undefined))\n throw 'Selection must be an array with ids';\n\n this.setSelection({ edges: selection });\n }\n\n /**\n * Validate the selection: remove ids of nodes which no longer exist\n * @private\n */\n updateSelection() {\n for (let nodeId in this.selectionObj.nodes) {\n if (this.selectionObj.nodes.hasOwnProperty(nodeId)) {\n if (!this.body.nodes.hasOwnProperty(nodeId)) {\n delete this.selectionObj.nodes[nodeId];\n }\n }\n }\n for (let edgeId in this.selectionObj.edges) {\n if (this.selectionObj.edges.hasOwnProperty(edgeId)) {\n if (!this.body.edges.hasOwnProperty(edgeId)) {\n delete this.selectionObj.edges[edgeId];\n }\n }\n }\n }\n\n\n /**\n * Determine all the visual elements clicked which are on the given point.\n *\n * All elements are returned; this includes nodes, edges and their labels.\n * The order returned is from highest to lowest, i.e. element 0 of the return\n * value is the topmost item clicked on.\n *\n * The return value consists of an array of the following possible elements:\n *\n * - `{nodeId:number}` - node with given id clicked on\n * - `{nodeId:number, labelId:0}` - label of node with given id clicked on\n * - `{edgeId:number}` - edge with given id clicked on\n * - `{edge:number, labelId:0}` - label of edge with given id clicked on\n *\n * ## NOTES\n *\n * - Currently, there is only one label associated with a node or an edge,\n * but this is expected to change somewhere in the future.\n * - Since there is no z-indexing yet, it is not really possible to set the nodes and\n * edges in the correct order. For the time being, nodes come first.\n *\n * @param {point} pointer mouse position in screen coordinates\n * @returns {Array.}\n * @private\n */\n getClickedItems(pointer) {\n let point = this.canvas.DOMtoCanvas(pointer);\n var items = [];\n\n // Note reverse order; we want the topmost clicked items to be first in the array\n // Also note that selected nodes are disregarded here; these normally display on top\n let nodeIndices = this.body.nodeIndices;\n let nodes = this.body.nodes;\n for (let i = nodeIndices.length - 1; i >= 0; i--) {\n let node = nodes[nodeIndices[i]];\n let ret = node.getItemsOnPoint(point);\n items.push.apply(items, ret); // Append the return value to the running list.\n }\n\n let edgeIndices = this.body.edgeIndices;\n let edges = this.body.edges;\n for (let i = edgeIndices.length - 1; i >= 0; i--) {\n let edge = edges[edgeIndices[i]];\n let ret = edge.getItemsOnPoint(point);\n items.push.apply(items, ret); // Append the return value to the running list.\n }\n\n return items;\n }\n}\n\nexport default SelectionHandler;\n","/****\n * The MIT License\n *\n * Copyright (c) 2015 Marco Ziccardi\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n *\n ****/\n(function (global, factory) {\n if (typeof define === 'function' && define.amd) {\n define('timsort', ['exports'], factory);\n } else if (typeof exports !== 'undefined') {\n factory(exports);\n } else {\n var mod = {\n exports: {}\n };\n factory(mod.exports);\n global.timsort = mod.exports;\n }\n})(this, function (exports) {\n 'use strict';\n\n exports.__esModule = true;\n exports.sort = sort;\n\n function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError('Cannot call a class as a function');\n }\n }\n\n var DEFAULT_MIN_MERGE = 32;\n\n var DEFAULT_MIN_GALLOPING = 7;\n\n var DEFAULT_TMP_STORAGE_LENGTH = 256;\n\n var POWERS_OF_TEN = [1e0, 1e1, 1e2, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9];\n\n function log10(x) {\n if (x < 1e5) {\n if (x < 1e2) {\n return x < 1e1 ? 0 : 1;\n }\n\n if (x < 1e4) {\n return x < 1e3 ? 2 : 3;\n }\n\n return 4;\n }\n\n if (x < 1e7) {\n return x < 1e6 ? 5 : 6;\n }\n\n if (x < 1e9) {\n return x < 1e8 ? 7 : 8;\n }\n\n return 9;\n }\n\n function alphabeticalCompare(a, b) {\n if (a === b) {\n return 0;\n }\n\n if (~ ~a === a && ~ ~b === b) {\n if (a === 0 || b === 0) {\n return a < b ? -1 : 1;\n }\n\n if (a < 0 || b < 0) {\n if (b >= 0) {\n return -1;\n }\n\n if (a >= 0) {\n return 1;\n }\n\n a = -a;\n b = -b;\n }\n\n var al = log10(a);\n var bl = log10(b);\n\n var t = 0;\n\n if (al < bl) {\n a *= POWERS_OF_TEN[bl - al - 1];\n b /= 10;\n t = -1;\n } else if (al > bl) {\n b *= POWERS_OF_TEN[al - bl - 1];\n a /= 10;\n t = 1;\n }\n\n if (a === b) {\n return t;\n }\n\n return a < b ? -1 : 1;\n }\n\n var aStr = String(a);\n var bStr = String(b);\n\n if (aStr === bStr) {\n return 0;\n }\n\n return aStr < bStr ? -1 : 1;\n }\n\n function minRunLength(n) {\n var r = 0;\n\n while (n >= DEFAULT_MIN_MERGE) {\n r |= n & 1;\n n >>= 1;\n }\n\n return n + r;\n }\n\n function makeAscendingRun(array, lo, hi, compare) {\n var runHi = lo + 1;\n\n if (runHi === hi) {\n return 1;\n }\n\n if (compare(array[runHi++], array[lo]) < 0) {\n while (runHi < hi && compare(array[runHi], array[runHi - 1]) < 0) {\n runHi++;\n }\n\n reverseRun(array, lo, runHi);\n } else {\n while (runHi < hi && compare(array[runHi], array[runHi - 1]) >= 0) {\n runHi++;\n }\n }\n\n return runHi - lo;\n }\n\n function reverseRun(array, lo, hi) {\n hi--;\n\n while (lo < hi) {\n var t = array[lo];\n array[lo++] = array[hi];\n array[hi--] = t;\n }\n }\n\n function binaryInsertionSort(array, lo, hi, start, compare) {\n if (start === lo) {\n start++;\n }\n\n for (; start < hi; start++) {\n var pivot = array[start];\n\n var left = lo;\n var right = start;\n\n while (left < right) {\n var mid = left + right >>> 1;\n\n if (compare(pivot, array[mid]) < 0) {\n right = mid;\n } else {\n left = mid + 1;\n }\n }\n\n var n = start - left;\n\n switch (n) {\n case 3:\n array[left + 3] = array[left + 2];\n\n case 2:\n array[left + 2] = array[left + 1];\n\n case 1:\n array[left + 1] = array[left];\n break;\n default:\n while (n > 0) {\n array[left + n] = array[left + n - 1];\n n--;\n }\n }\n\n array[left] = pivot;\n }\n }\n\n function gallopLeft(value, array, start, length, hint, compare) {\n var lastOffset = 0;\n var maxOffset = 0;\n var offset = 1;\n\n if (compare(value, array[start + hint]) > 0) {\n maxOffset = length - hint;\n\n while (offset < maxOffset && compare(value, array[start + hint + offset]) > 0) {\n lastOffset = offset;\n offset = (offset << 1) + 1;\n\n if (offset <= 0) {\n offset = maxOffset;\n }\n }\n\n if (offset > maxOffset) {\n offset = maxOffset;\n }\n\n lastOffset += hint;\n offset += hint;\n } else {\n maxOffset = hint + 1;\n while (offset < maxOffset && compare(value, array[start + hint - offset]) <= 0) {\n lastOffset = offset;\n offset = (offset << 1) + 1;\n\n if (offset <= 0) {\n offset = maxOffset;\n }\n }\n if (offset > maxOffset) {\n offset = maxOffset;\n }\n\n var tmp = lastOffset;\n lastOffset = hint - offset;\n offset = hint - tmp;\n }\n\n lastOffset++;\n while (lastOffset < offset) {\n var m = lastOffset + (offset - lastOffset >>> 1);\n\n if (compare(value, array[start + m]) > 0) {\n lastOffset = m + 1;\n } else {\n offset = m;\n }\n }\n return offset;\n }\n\n function gallopRight(value, array, start, length, hint, compare) {\n var lastOffset = 0;\n var maxOffset = 0;\n var offset = 1;\n\n if (compare(value, array[start + hint]) < 0) {\n maxOffset = hint + 1;\n\n while (offset < maxOffset && compare(value, array[start + hint - offset]) < 0) {\n lastOffset = offset;\n offset = (offset << 1) + 1;\n\n if (offset <= 0) {\n offset = maxOffset;\n }\n }\n\n if (offset > maxOffset) {\n offset = maxOffset;\n }\n\n var tmp = lastOffset;\n lastOffset = hint - offset;\n offset = hint - tmp;\n } else {\n maxOffset = length - hint;\n\n while (offset < maxOffset && compare(value, array[start + hint + offset]) >= 0) {\n lastOffset = offset;\n offset = (offset << 1) + 1;\n\n if (offset <= 0) {\n offset = maxOffset;\n }\n }\n\n if (offset > maxOffset) {\n offset = maxOffset;\n }\n\n lastOffset += hint;\n offset += hint;\n }\n\n lastOffset++;\n\n while (lastOffset < offset) {\n var m = lastOffset + (offset - lastOffset >>> 1);\n\n if (compare(value, array[start + m]) < 0) {\n offset = m;\n } else {\n lastOffset = m + 1;\n }\n }\n\n return offset;\n }\n\n var TimSort = (function () {\n function TimSort(array, compare) {\n _classCallCheck(this, TimSort);\n\n this.array = null;\n this.compare = null;\n this.minGallop = DEFAULT_MIN_GALLOPING;\n this.length = 0;\n this.tmpStorageLength = DEFAULT_TMP_STORAGE_LENGTH;\n this.stackLength = 0;\n this.runStart = null;\n this.runLength = null;\n this.stackSize = 0;\n\n this.array = array;\n this.compare = compare;\n\n this.length = array.length;\n\n if (this.length < 2 * DEFAULT_TMP_STORAGE_LENGTH) {\n this.tmpStorageLength = this.length >>> 1;\n }\n\n this.tmp = new Array(this.tmpStorageLength);\n\n this.stackLength = this.length < 120 ? 5 : this.length < 1542 ? 10 : this.length < 119151 ? 19 : 40;\n\n this.runStart = new Array(this.stackLength);\n this.runLength = new Array(this.stackLength);\n }\n\n TimSort.prototype.pushRun = function pushRun(runStart, runLength) {\n this.runStart[this.stackSize] = runStart;\n this.runLength[this.stackSize] = runLength;\n this.stackSize += 1;\n };\n\n TimSort.prototype.mergeRuns = function mergeRuns() {\n while (this.stackSize > 1) {\n var n = this.stackSize - 2;\n\n if (n >= 1 && this.runLength[n - 1] <= this.runLength[n] + this.runLength[n + 1] || n >= 2 && this.runLength[n - 2] <= this.runLength[n] + this.runLength[n - 1]) {\n\n if (this.runLength[n - 1] < this.runLength[n + 1]) {\n n--;\n }\n } else if (this.runLength[n] > this.runLength[n + 1]) {\n break;\n }\n this.mergeAt(n);\n }\n };\n\n TimSort.prototype.forceMergeRuns = function forceMergeRuns() {\n while (this.stackSize > 1) {\n var n = this.stackSize - 2;\n\n if (n > 0 && this.runLength[n - 1] < this.runLength[n + 1]) {\n n--;\n }\n\n this.mergeAt(n);\n }\n };\n\n TimSort.prototype.mergeAt = function mergeAt(i) {\n var compare = this.compare;\n var array = this.array;\n\n var start1 = this.runStart[i];\n var length1 = this.runLength[i];\n var start2 = this.runStart[i + 1];\n var length2 = this.runLength[i + 1];\n\n this.runLength[i] = length1 + length2;\n\n if (i === this.stackSize - 3) {\n this.runStart[i + 1] = this.runStart[i + 2];\n this.runLength[i + 1] = this.runLength[i + 2];\n }\n\n this.stackSize--;\n\n var k = gallopRight(array[start2], array, start1, length1, 0, compare);\n start1 += k;\n length1 -= k;\n\n if (length1 === 0) {\n return;\n }\n\n length2 = gallopLeft(array[start1 + length1 - 1], array, start2, length2, length2 - 1, compare);\n\n if (length2 === 0) {\n return;\n }\n\n if (length1 <= length2) {\n this.mergeLow(start1, length1, start2, length2);\n } else {\n this.mergeHigh(start1, length1, start2, length2);\n }\n };\n\n TimSort.prototype.mergeLow = function mergeLow(start1, length1, start2, length2) {\n\n var compare = this.compare;\n var array = this.array;\n var tmp = this.tmp;\n var i = 0;\n\n for (i = 0; i < length1; i++) {\n tmp[i] = array[start1 + i];\n }\n\n var cursor1 = 0;\n var cursor2 = start2;\n var dest = start1;\n\n array[dest++] = array[cursor2++];\n\n if (--length2 === 0) {\n for (i = 0; i < length1; i++) {\n array[dest + i] = tmp[cursor1 + i];\n }\n return;\n }\n\n if (length1 === 1) {\n for (i = 0; i < length2; i++) {\n array[dest + i] = array[cursor2 + i];\n }\n array[dest + length2] = tmp[cursor1];\n return;\n }\n\n var minGallop = this.minGallop;\n\n while (true) {\n var count1 = 0;\n var count2 = 0;\n var exit = false;\n\n do {\n if (compare(array[cursor2], tmp[cursor1]) < 0) {\n array[dest++] = array[cursor2++];\n count2++;\n count1 = 0;\n\n if (--length2 === 0) {\n exit = true;\n break;\n }\n } else {\n array[dest++] = tmp[cursor1++];\n count1++;\n count2 = 0;\n if (--length1 === 1) {\n exit = true;\n break;\n }\n }\n } while ((count1 | count2) < minGallop);\n\n if (exit) {\n break;\n }\n\n do {\n count1 = gallopRight(array[cursor2], tmp, cursor1, length1, 0, compare);\n\n if (count1 !== 0) {\n for (i = 0; i < count1; i++) {\n array[dest + i] = tmp[cursor1 + i];\n }\n\n dest += count1;\n cursor1 += count1;\n length1 -= count1;\n if (length1 <= 1) {\n exit = true;\n break;\n }\n }\n\n array[dest++] = array[cursor2++];\n\n if (--length2 === 0) {\n exit = true;\n break;\n }\n\n count2 = gallopLeft(tmp[cursor1], array, cursor2, length2, 0, compare);\n\n if (count2 !== 0) {\n for (i = 0; i < count2; i++) {\n array[dest + i] = array[cursor2 + i];\n }\n\n dest += count2;\n cursor2 += count2;\n length2 -= count2;\n\n if (length2 === 0) {\n exit = true;\n break;\n }\n }\n array[dest++] = tmp[cursor1++];\n\n if (--length1 === 1) {\n exit = true;\n break;\n }\n\n minGallop--;\n } while (count1 >= DEFAULT_MIN_GALLOPING || count2 >= DEFAULT_MIN_GALLOPING);\n\n if (exit) {\n break;\n }\n\n if (minGallop < 0) {\n minGallop = 0;\n }\n\n minGallop += 2;\n }\n\n this.minGallop = minGallop;\n\n if (minGallop < 1) {\n this.minGallop = 1;\n }\n\n if (length1 === 1) {\n for (i = 0; i < length2; i++) {\n array[dest + i] = array[cursor2 + i];\n }\n array[dest + length2] = tmp[cursor1];\n } else if (length1 === 0) {\n throw new Error('mergeLow preconditions were not respected');\n } else {\n for (i = 0; i < length1; i++) {\n array[dest + i] = tmp[cursor1 + i];\n }\n }\n };\n\n TimSort.prototype.mergeHigh = function mergeHigh(start1, length1, start2, length2) {\n var compare = this.compare;\n var array = this.array;\n var tmp = this.tmp;\n var i = 0;\n\n for (i = 0; i < length2; i++) {\n tmp[i] = array[start2 + i];\n }\n\n var cursor1 = start1 + length1 - 1;\n var cursor2 = length2 - 1;\n var dest = start2 + length2 - 1;\n var customCursor = 0;\n var customDest = 0;\n\n array[dest--] = array[cursor1--];\n\n if (--length1 === 0) {\n customCursor = dest - (length2 - 1);\n\n for (i = 0; i < length2; i++) {\n array[customCursor + i] = tmp[i];\n }\n\n return;\n }\n\n if (length2 === 1) {\n dest -= length1;\n cursor1 -= length1;\n customDest = dest + 1;\n customCursor = cursor1 + 1;\n\n for (i = length1 - 1; i >= 0; i--) {\n array[customDest + i] = array[customCursor + i];\n }\n\n array[dest] = tmp[cursor2];\n return;\n }\n\n var minGallop = this.minGallop;\n\n while (true) {\n var count1 = 0;\n var count2 = 0;\n var exit = false;\n\n do {\n if (compare(tmp[cursor2], array[cursor1]) < 0) {\n array[dest--] = array[cursor1--];\n count1++;\n count2 = 0;\n if (--length1 === 0) {\n exit = true;\n break;\n }\n } else {\n array[dest--] = tmp[cursor2--];\n count2++;\n count1 = 0;\n if (--length2 === 1) {\n exit = true;\n break;\n }\n }\n } while ((count1 | count2) < minGallop);\n\n if (exit) {\n break;\n }\n\n do {\n count1 = length1 - gallopRight(tmp[cursor2], array, start1, length1, length1 - 1, compare);\n\n if (count1 !== 0) {\n dest -= count1;\n cursor1 -= count1;\n length1 -= count1;\n customDest = dest + 1;\n customCursor = cursor1 + 1;\n\n for (i = count1 - 1; i >= 0; i--) {\n array[customDest + i] = array[customCursor + i];\n }\n\n if (length1 === 0) {\n exit = true;\n break;\n }\n }\n\n array[dest--] = tmp[cursor2--];\n\n if (--length2 === 1) {\n exit = true;\n break;\n }\n\n count2 = length2 - gallopLeft(array[cursor1], tmp, 0, length2, length2 - 1, compare);\n\n if (count2 !== 0) {\n dest -= count2;\n cursor2 -= count2;\n length2 -= count2;\n customDest = dest + 1;\n customCursor = cursor2 + 1;\n\n for (i = 0; i < count2; i++) {\n array[customDest + i] = tmp[customCursor + i];\n }\n\n if (length2 <= 1) {\n exit = true;\n break;\n }\n }\n\n array[dest--] = array[cursor1--];\n\n if (--length1 === 0) {\n exit = true;\n break;\n }\n\n minGallop--;\n } while (count1 >= DEFAULT_MIN_GALLOPING || count2 >= DEFAULT_MIN_GALLOPING);\n\n if (exit) {\n break;\n }\n\n if (minGallop < 0) {\n minGallop = 0;\n }\n\n minGallop += 2;\n }\n\n this.minGallop = minGallop;\n\n if (minGallop < 1) {\n this.minGallop = 1;\n }\n\n if (length2 === 1) {\n dest -= length1;\n cursor1 -= length1;\n customDest = dest + 1;\n customCursor = cursor1 + 1;\n\n for (i = length1 - 1; i >= 0; i--) {\n array[customDest + i] = array[customCursor + i];\n }\n\n array[dest] = tmp[cursor2];\n } else if (length2 === 0) {\n throw new Error('mergeHigh preconditions were not respected');\n } else {\n customCursor = dest - (length2 - 1);\n for (i = 0; i < length2; i++) {\n array[customCursor + i] = tmp[i];\n }\n }\n };\n\n return TimSort;\n })();\n\n function sort(array, compare, lo, hi) {\n if (!Array.isArray(array)) {\n throw new TypeError('Can only sort arrays');\n }\n\n if (!compare) {\n compare = alphabeticalCompare;\n } else if (typeof compare !== 'function') {\n hi = lo;\n lo = compare;\n compare = alphabeticalCompare;\n }\n\n if (!lo) {\n lo = 0;\n }\n if (!hi) {\n hi = array.length;\n }\n\n var remaining = hi - lo;\n\n if (remaining < 2) {\n return;\n }\n\n var runLength = 0;\n\n if (remaining < DEFAULT_MIN_MERGE) {\n runLength = makeAscendingRun(array, lo, hi, compare);\n binaryInsertionSort(array, lo, hi, lo + runLength, compare);\n return;\n }\n\n var ts = new TimSort(array, compare);\n\n var minRun = minRunLength(remaining);\n\n do {\n runLength = makeAscendingRun(array, lo, hi, compare);\n if (runLength < minRun) {\n var force = remaining;\n if (force > minRun) {\n force = minRun;\n }\n\n binaryInsertionSort(array, lo, lo + force, lo + runLength, compare);\n runLength = force;\n }\n\n ts.pushRun(lo, runLength);\n ts.mergeRuns();\n\n remaining -= runLength;\n lo += runLength;\n } while (remaining !== 0);\n\n ts.forceMergeRuns();\n }\n});\n","module.exports = require('./build/timsort.js');","/**\n * Helper classes for LayoutEngine.\n *\n * Strategy pattern for usage of direction methods for hierarchical layouts.\n */\nimport TimSort from 'timsort';\n\n\n/**\n * Interface definition for direction strategy classes.\n *\n * This class describes the interface for the Strategy\n * pattern classes used to differentiate horizontal and vertical\n * direction of hierarchical results.\n *\n * For a given direction, one coordinate will be 'fixed', meaning that it is\n * determined by level.\n * The other coordinate is 'unfixed', meaning that the nodes on a given level\n * can still move along that coordinate. So:\n *\n * - `vertical` layout: `x` unfixed, `y` fixed per level\n * - `horizontal` layout: `x` fixed per level, `y` unfixed\n *\n * The local methods are stubs and should be regarded as abstract.\n * Derived classes **must** implement all the methods themselves.\n *\n * @private\n */\nclass DirectionInterface {\n /** @ignore **/\n abstract() {\n throw new Error(\"Can't instantiate abstract class!\");\n }\n\n /**\n * This is a dummy call which is used to suppress the jsdoc errors of type:\n *\n * \"'param' is assigned a value but never used\"\n *\n * @ignore\n **/\n fake_use() {\n // Do nothing special\n }\n\n /**\n * Type to use to translate dynamic curves to, in the case of hierarchical layout.\n * Dynamic curves do not work for these.\n *\n * The value should be perpendicular to the actual direction of the layout.\n *\n * @return {string} Direction, either 'vertical' or 'horizontal'\n */\n curveType() { return this.abstract(); }\n\n\n /**\n * Return the value of the coordinate that is not fixed for this direction.\n *\n * @param {Node} node The node to read\n * @return {number} Value of the unfixed coordinate\n */\n getPosition(node) { this.fake_use(node); return this.abstract(); }\n\n\n /**\n * Set the value of the coordinate that is not fixed for this direction.\n *\n * @param {Node} node The node to adjust\n * @param {number} position\n * @param {number} [level] if specified, the hierarchy level that this node should be fixed to\n */\n setPosition(node, position, level = undefined) { this.fake_use(node, position, level); this.abstract(); }\n\n\n /**\n * Get the width of a tree.\n *\n * A `tree` here is a subset of nodes within the network which are not connected to other nodes,\n * only among themselves. In essence, it is a sub-network.\n *\n * @param {number} index The index number of a tree\n * @return {number} the width of a tree in the view coordinates\n */\n getTreeSize(index) { this.fake_use(index); return this.abstract(); }\n\n\n /**\n * Sort array of nodes on the unfixed coordinates.\n *\n * **Note:** chrome has non-stable sorting implementation, which\n * has a tendency to change the order of the array items,\n * even if the custom sort function returns 0.\n *\n * For this reason, an external sort implementation is used,\n * which has the added benefit of being faster than the standard\n * platforms implementation. This has been verified on `node.js`,\n * `firefox` and `chrome` (all linux).\n *\n * @param {Array.} nodeArray array of nodes to sort\n */\n sort(nodeArray) { this.fake_use(nodeArray); this.abstract(); }\n\n\n /**\n * Assign the fixed coordinate of the node to the given level\n *\n * @param {Node} node The node to adjust\n * @param {number} level The level to fix to\n */\n fix(node, level) { this.fake_use(node, level); this.abstract(); }\n\n\n /**\n * Add an offset to the unfixed coordinate of the given node. \n *\n * @param {NodeId} nodeId Id of the node to adjust\n * @param {number} diff Offset to add to the unfixed coordinate\n */\n shift(nodeId, diff) { this.fake_use(nodeId, diff); this.abstract(); }\n}\n\n\n/**\n * Vertical Strategy\n *\n * Coordinate `y` is fixed on levels, coordinate `x` is unfixed.\n *\n * @extends DirectionInterface\n * @private\n */\nclass VerticalStrategy extends DirectionInterface {\n /**\n * Constructor\n *\n * @param {Object} layout reference to the parent LayoutEngine instance.\n */\n constructor(layout) {\n super();\n this.layout = layout;\n }\n\n /** @inheritdoc */\n curveType() {\n return 'horizontal';\n }\n\n /** @inheritdoc */\n getPosition(node) {\n return node.x;\n }\n\n /** @inheritdoc */\n setPosition(node, position, level = undefined) {\n if (level !== undefined) {\n this.layout.hierarchical.addToOrdering(node, level);\n }\n node.x = position;\n }\n\n /** @inheritdoc */\n getTreeSize(index) {\n let res = this.layout.hierarchical.getTreeSize(this.layout.body.nodes, index);\n return {min: res.min_x, max: res.max_x};\n }\n\n /** @inheritdoc */\n sort(nodeArray) {\n TimSort.sort(nodeArray, function(a, b) {\n return a.x - b.x;\n });\n }\n\n /** @inheritdoc */\n fix(node, level) {\n node.y = this.layout.options.hierarchical.levelSeparation * level;\n node.options.fixed.y = true;\n }\n\n /** @inheritdoc */\n shift(nodeId, diff) {\n this.layout.body.nodes[nodeId].x += diff;\n }\n}\n\n\n/**\n * Horizontal Strategy\n *\n * Coordinate `x` is fixed on levels, coordinate `y` is unfixed.\n *\n * @extends DirectionInterface\n * @private\n */\nclass HorizontalStrategy extends DirectionInterface {\n /**\n * Constructor\n *\n * @param {Object} layout reference to the parent LayoutEngine instance.\n */\n constructor(layout) {\n super();\n this.layout = layout;\n }\n\n /** @inheritdoc */\n curveType() {\n return 'vertical';\n }\n\n /** @inheritdoc */\n getPosition(node) {\n return node.y;\n }\n\n /** @inheritdoc */\n setPosition(node, position, level = undefined) {\n if (level !== undefined) {\n this.layout.hierarchical.addToOrdering(node, level);\n }\n node.y = position;\n }\n\n /** @inheritdoc */\n getTreeSize(index) {\n let res = this.layout.hierarchical.getTreeSize(this.layout.body.nodes, index);\n return {min: res.min_y, max: res.max_y};\n }\n\n /** @inheritdoc */\n sort(nodeArray) {\n TimSort.sort(nodeArray, function(a, b) {\n return a.y - b.y;\n });\n }\n\n /** @inheritdoc */\n fix(node, level) {\n node.x = this.layout.options.hierarchical.levelSeparation * level;\n node.options.fixed.x = true;\n }\n\n /** @inheritdoc */\n shift(nodeId, diff) {\n this.layout.body.nodes[nodeId].y += diff;\n }\n}\n\n\nexport {HorizontalStrategy, VerticalStrategy};\n","/**\n * There's a mix-up with terms in the code. Following are the formal definitions:\n *\n * tree - a strict hierarchical network, i.e. every node has at most one parent\n * forest - a collection of trees. These distinct trees are thus not connected.\n *\n * So:\n * - in a network that is not a tree, there exist nodes with multiple parents.\n * - a network consisting of unconnected sub-networks, of which at least one\n * is not a tree, is not a forest.\n *\n * In the code, the definitions are:\n *\n * tree - any disconnected sub-network, strict hierarchical or not.\n * forest - a bunch of these sub-networks\n *\n * The difference between tree and not-tree is important in the code, notably within\n * to the block-shifting algorithm. The algorithm assumes formal trees and fails\n * for not-trees, often in a spectacular manner (search for 'exploding network' in the issues).\n *\n * In order to distinguish the definitions in the following code, the adjective 'formal' is\n * used. If 'formal' is absent, you must assume the non-formal definition.\n *\n * ----------------------------------------------------------------------------------\n * NOTES\n * =====\n *\n * A hierarchical layout is a different thing from a hierarchical network.\n * The layout is a way to arrange the nodes in the view; this can be done\n * on non-hierarchical networks as well. The converse is also possible.\n */\n'use strict';\nimport TimSort from 'timsort';\nimport util from 'vis-util';\nimport NetworkUtil from '../NetworkUtil';\nimport { HorizontalStrategy, VerticalStrategy } from './components/DirectionStrategy.js';\n\n\n/**\n * Container for derived data on current network, relating to hierarchy.\n *\n * @private\n */\nclass HierarchicalStatus {\n /**\n * @ignore\n */\n constructor() {\n this.childrenReference = {}; // child id's per node id\n this.parentReference = {}; // parent id's per node id\n this.trees = {}; // tree id per node id; i.e. to which tree does given node id belong\n\n this.distributionOrdering = {}; // The nodes per level, in the display order\n this.levels = {}; // hierarchy level per node id\n this.distributionIndex = {}; // The position of the node in the level sorting order, per node id.\n\n this.isTree = false; // True if current network is a formal tree \n this.treeIndex = -1; // Highest tree id in current network.\n }\n\n /**\n * Add the relation between given nodes to the current state.\n *\n * @param {Node.id} parentNodeId\n * @param {Node.id} childNodeId\n */\n addRelation(parentNodeId, childNodeId) {\n if (this.childrenReference[parentNodeId] === undefined) {\n this.childrenReference[parentNodeId] = [];\n }\n this.childrenReference[parentNodeId].push(childNodeId);\n\n if (this.parentReference[childNodeId] === undefined) {\n this.parentReference[childNodeId] = [];\n }\n this.parentReference[childNodeId].push(parentNodeId);\n }\n\n\n /**\n * Check if the current state is for a formal tree or formal forest.\n *\n * This is the case if every node has at most one parent.\n *\n * Pre: parentReference init'ed properly for current network\n */\n checkIfTree() {\n for (let i in this.parentReference) {\n if (this.parentReference[i].length > 1) {\n this.isTree = false;\n return;\n }\n }\n\n this.isTree = true;\n }\n\n\n /**\n * Return the number of separate trees in the current network.\n * @returns {number}\n */\n numTrees() {\n return (this.treeIndex + 1); // This assumes the indexes are assigned consecitively\n }\n\n\n /**\n * Assign a tree id to a node\n * @param {Node} node\n * @param {string|number} treeId\n */\n setTreeIndex(node, treeId) {\n if (treeId === undefined) return; // Don't bother\n\n if (this.trees[node.id] === undefined) {\n this.trees[node.id] = treeId;\n this.treeIndex = Math.max(treeId, this.treeIndex);\n }\n }\n\n\n /**\n * Ensure level for given id is defined.\n *\n * Sets level to zero for given node id if not already present\n *\n * @param {Node.id} nodeId\n */\n ensureLevel(nodeId) {\n if (this.levels[nodeId] === undefined) {\n this.levels[nodeId] = 0;\n }\n }\n\n\n /**\n * get the maximum level of a branch.\n *\n * TODO: Never entered; find a test case to test this!\n * @param {Node.id} nodeId\n * @returns {number}\n */\n getMaxLevel(nodeId) {\n let accumulator = {};\n\n let _getMaxLevel = (nodeId) => {\n if (accumulator[nodeId] !== undefined) {\n return accumulator[nodeId];\n }\n let level = this.levels[nodeId];\n if (this.childrenReference[nodeId]) {\n let children = this.childrenReference[nodeId];\n if (children.length > 0) {\n for (let i = 0; i < children.length; i++) {\n level = Math.max(level,_getMaxLevel(children[i]));\n }\n }\n }\n accumulator[nodeId] = level;\n return level;\n };\n\n return _getMaxLevel(nodeId);\n }\n\n\n /**\n *\n * @param {Node} nodeA\n * @param {Node} nodeB\n */\n levelDownstream(nodeA, nodeB) {\n if (this.levels[nodeB.id] === undefined) {\n // set initial level\n if (this.levels[nodeA.id] === undefined) {\n this.levels[nodeA.id] = 0;\n }\n // set level\n this.levels[nodeB.id] = this.levels[nodeA.id] + 1;\n }\n }\n\n\n /**\n * Small util method to set the minimum levels of the nodes to zero.\n *\n * @param {Array.} nodes\n */\n setMinLevelToZero(nodes) {\n let minLevel = 1e9;\n // get the minimum level\n for (let nodeId in nodes) {\n if (nodes.hasOwnProperty(nodeId)) {\n if (this.levels[nodeId] !== undefined) {\n minLevel = Math.min(this.levels[nodeId], minLevel);\n }\n }\n }\n\n // subtract the minimum from the set so we have a range starting from 0\n for (let nodeId in nodes) {\n if (nodes.hasOwnProperty(nodeId)) {\n if (this.levels[nodeId] !== undefined) {\n this.levels[nodeId] -= minLevel;\n }\n }\n }\n }\n\n\n /**\n * Get the min and max xy-coordinates of a given tree\n *\n * @param {Array.} nodes\n * @param {number} index\n * @returns {{min_x: number, max_x: number, min_y: number, max_y: number}}\n */\n getTreeSize(nodes, index) {\n let min_x = 1e9;\n let max_x = -1e9;\n let min_y = 1e9;\n let max_y = -1e9;\n\n for (let nodeId in this.trees) {\n if (this.trees.hasOwnProperty(nodeId)) {\n if (this.trees[nodeId] === index) {\n let node = nodes[nodeId];\n min_x = Math.min(node.x, min_x);\n max_x = Math.max(node.x, max_x);\n min_y = Math.min(node.y, min_y);\n max_y = Math.max(node.y, max_y);\n }\n }\n }\n\n return {\n min_x: min_x,\n max_x: max_x,\n min_y: min_y,\n max_y: max_y\n };\n }\n\n\n /**\n * Check if two nodes have the same parent(s)\n *\n * @param {Node} node1\n * @param {Node} node2\n * @return {boolean} true if the two nodes have a same ancestor node, false otherwise\n */\n hasSameParent(node1, node2) {\n let parents1 = this.parentReference[node1.id];\n let parents2 = this.parentReference[node2.id];\n if (parents1 === undefined || parents2 === undefined) {\n return false;\n }\n\n for (let i = 0; i < parents1.length; i++) {\n for (let j = 0; j < parents2.length; j++) {\n if (parents1[i] == parents2[j]) {\n return true;\n }\n }\n }\n return false;\n }\n\n\n /**\n * Check if two nodes are in the same tree.\n *\n * @param {Node} node1\n * @param {Node} node2\n * @return {Boolean} true if this is so, false otherwise\n */\n inSameSubNetwork(node1, node2) {\n return (this.trees[node1.id] === this.trees[node2.id]);\n }\n\n\n /**\n * Get a list of the distinct levels in the current network\n *\n * @returns {Array}\n */\n getLevels() {\n return Object.keys(this.distributionOrdering);\n }\n\n\n /**\n * Add a node to the ordering per level\n *\n * @param {Node} node\n * @param {number} level\n */\n addToOrdering(node, level) {\n if (this.distributionOrdering[level] === undefined) {\n this.distributionOrdering[level] = [];\n }\n\n var isPresent = false;\n var curLevel = this.distributionOrdering[level];\n for (var n in curLevel) {\n //if (curLevel[n].id === node.id) {\n if (curLevel[n] === node) {\n isPresent = true;\n break;\n }\n }\n\n if (!isPresent) {\n this.distributionOrdering[level].push(node);\n this.distributionIndex[node.id] = this.distributionOrdering[level].length - 1;\n }\n }\n}\n\n/**\n * The Layout Engine\n */\nclass LayoutEngine {\n /**\n * @param {Object} body\n */\n constructor(body) {\n this.body = body;\n\n this.initialRandomSeed = Math.round(Math.random() * 1000000);\n this.randomSeed = this.initialRandomSeed;\n this.setPhysics = false;\n this.options = {};\n this.optionsBackup = {physics:{}};\n\n this.defaultOptions = {\n randomSeed: undefined,\n improvedLayout: true,\n hierarchical: {\n enabled:false,\n levelSeparation: 150,\n nodeSpacing: 100,\n treeSpacing: 200,\n blockShifting: true,\n edgeMinimization: true,\n parentCentralization: true,\n direction: 'UD', // UD, DU, LR, RL\n sortMethod: 'hubsize' // hubsize, directed\n }\n };\n util.extend(this.options, this.defaultOptions);\n this.bindEventListeners();\n }\n\n /**\n * Binds event listeners\n */\n bindEventListeners() {\n this.body.emitter.on('_dataChanged', () => {\n this.setupHierarchicalLayout();\n });\n this.body.emitter.on('_dataLoaded', () => {\n this.layoutNetwork();\n });\n this.body.emitter.on('_resetHierarchicalLayout', () => {\n this.setupHierarchicalLayout();\n });\n this.body.emitter.on('_adjustEdgesForHierarchicalLayout', () => {\n if (this.options.hierarchical.enabled !== true) {\n return;\n }\n // get the type of static smooth curve in case it is required\n let type = this.direction.curveType();\n\n // force all edges into static smooth curves.\n this.body.emitter.emit('_forceDisableDynamicCurves', type, false);\n });\n }\n\n /**\n *\n * @param {Object} options\n * @param {Object} allOptions\n * @returns {Object}\n */\n setOptions(options, allOptions) {\n if (options !== undefined) {\n let hierarchical = this.options.hierarchical;\n let prevHierarchicalState = hierarchical.enabled;\n util.selectiveDeepExtend([\"randomSeed\", \"improvedLayout\"],this.options, options);\n util.mergeOptions(this.options, options, 'hierarchical');\n if (options.randomSeed !== undefined) {this.initialRandomSeed = options.randomSeed;}\n\n if (hierarchical.enabled === true) {\n if (prevHierarchicalState === true) {\n // refresh the overridden options for nodes and edges.\n this.body.emitter.emit('refresh', true);\n }\n\n // make sure the level separation is the right way up\n if (hierarchical.direction === 'RL' || hierarchical.direction === 'DU') {\n if (hierarchical.levelSeparation > 0) {\n hierarchical.levelSeparation *= -1;\n }\n }\n else {\n if (hierarchical.levelSeparation < 0) {\n hierarchical.levelSeparation *= -1;\n }\n }\n\n this.setDirectionStrategy();\n\n this.body.emitter.emit('_resetHierarchicalLayout');\n // because the hierarchical system needs it's own physics and smooth curve settings,\n // we adapt the other options if needed.\n return this.adaptAllOptionsForHierarchicalLayout(allOptions);\n }\n else {\n if (prevHierarchicalState === true) {\n // refresh the overridden options for nodes and edges.\n this.body.emitter.emit('refresh');\n return util.deepExtend(allOptions,this.optionsBackup);\n }\n }\n }\n return allOptions;\n }\n\n /**\n *\n * @param {Object} allOptions\n * @returns {Object}\n */\n adaptAllOptionsForHierarchicalLayout(allOptions) {\n if (this.options.hierarchical.enabled === true) {\n let backupPhysics = this.optionsBackup.physics;\n\n // set the physics\n if (allOptions.physics === undefined || allOptions.physics === true) {\n allOptions.physics = {\n enabled: backupPhysics.enabled === undefined ? true : backupPhysics.enabled,\n solver :'hierarchicalRepulsion'\n };\n backupPhysics.enabled = backupPhysics.enabled === undefined ? true : backupPhysics.enabled;\n backupPhysics.solver = backupPhysics.solver || 'barnesHut';\n }\n else if (typeof allOptions.physics === 'object') {\n backupPhysics.enabled = allOptions.physics.enabled === undefined ? true : allOptions.physics.enabled;\n backupPhysics.solver = allOptions.physics.solver || 'barnesHut';\n allOptions.physics.solver = 'hierarchicalRepulsion';\n }\n else if (allOptions.physics !== false) {\n backupPhysics.solver ='barnesHut';\n allOptions.physics = {solver:'hierarchicalRepulsion'};\n }\n\n // get the type of static smooth curve in case it is required\n let type = this.direction.curveType();\n\n // disable smooth curves if nothing is defined. If smooth curves have been turned on,\n // turn them into static smooth curves.\n if (allOptions.edges === undefined) {\n this.optionsBackup.edges = {smooth:{enabled:true, type:'dynamic'}};\n allOptions.edges = {smooth: false};\n }\n else if (allOptions.edges.smooth === undefined) {\n this.optionsBackup.edges = {smooth:{enabled:true, type:'dynamic'}};\n allOptions.edges.smooth = false;\n }\n else {\n if (typeof allOptions.edges.smooth === 'boolean') {\n this.optionsBackup.edges = {smooth:allOptions.edges.smooth};\n allOptions.edges.smooth = {enabled: allOptions.edges.smooth, type:type}\n }\n else {\n let smooth = allOptions.edges.smooth;\n\n // allow custom types except for dynamic\n if (smooth.type !== undefined && smooth.type !== 'dynamic') {\n type = smooth.type;\n }\n\n // TODO: this is options merging; see if the standard routines can be used here.\n this.optionsBackup.edges = {\n smooth : smooth.enabled === undefined ? true : smooth.enabled,\n type : smooth.type === undefined ? 'dynamic': smooth.type,\n roundness : smooth.roundness === undefined ? 0.5 : smooth.roundness,\n forceDirection: smooth.forceDirection === undefined ? false : smooth.forceDirection\n };\n\n\n // NOTE: Copying an object to self; this is basically setting defaults for undefined variables\n allOptions.edges.smooth = {\n enabled : smooth.enabled === undefined ? true : smooth.enabled,\n type : type,\n roundness : smooth.roundness === undefined ? 0.5 : smooth.roundness,\n forceDirection: smooth.forceDirection === undefined ? false: smooth.forceDirection\n }\n }\n }\n\n // Force all edges into static smooth curves.\n // Only applies to edges that do not use the global options for smooth.\n this.body.emitter.emit('_forceDisableDynamicCurves', type);\n }\n\n return allOptions;\n }\n\n /**\n *\n * @returns {number}\n */\n seededRandom() {\n let x = Math.sin(this.randomSeed++) * 10000;\n return x - Math.floor(x);\n }\n\n /**\n *\n * @param {Array.} nodesArray\n */\n positionInitially(nodesArray) {\n if (this.options.hierarchical.enabled !== true) {\n this.randomSeed = this.initialRandomSeed;\n let radius = nodesArray.length + 50;\n for (let i = 0; i < nodesArray.length; i++) {\n let node = nodesArray[i];\n let angle = 2 * Math.PI * this.seededRandom();\n if (node.x === undefined) {\n node.x = radius * Math.cos(angle);\n }\n if (node.y === undefined) {\n node.y = radius * Math.sin(angle);\n }\n }\n }\n }\n\n\n /**\n * Use Kamada Kawai to position nodes. This is quite a heavy algorithm so if there are a lot of nodes we\n * cluster them first to reduce the amount.\n */\n layoutNetwork() {\n if (this.options.hierarchical.enabled !== true && this.options.improvedLayout === true) {\n let indices = this.body.nodeIndices;\n\n // first check if we should Kamada Kawai to layout. The threshold is if less than half of the visible\n // nodes have predefined positions we use this.\n let positionDefined = 0;\n for (let i = 0; i < indices.length; i++) {\n let node = this.body.nodes[indices[i]];\n if (node.predefinedPosition === true) {\n positionDefined += 1;\n }\n }\n\n // if less than half of the nodes have a predefined position we continue\n if (positionDefined < 0.5 * indices.length) {\n let MAX_LEVELS = 10;\n let level = 0;\n let clusterThreshold = 150; // TODO add this to options\n\n //\n // Define the options for the hidden cluster nodes\n // These options don't propagate outside the clustering phase.\n //\n // Some options are explicitly disabled, because they may be set in group or default node options.\n // The clusters are never displayed, so most explicit settings here serve as performance optimizations.\n //\n // The explicit setting of 'shape' is to avoid `shape: 'image'`; images are not passed to the hidden\n // cluster nodes, leading to an exception on creation.\n //\n // All settings here are performance related, except when noted otherwise.\n //\n let clusterOptions = {\n clusterNodeProperties:{\n shape: 'ellipse', // Bugfix: avoid type 'image', no images supplied\n label: '', // avoid label handling\n group: '', // avoid group handling\n font: {multi: false}, // avoid font propagation\n },\n clusterEdgeProperties:{\n label: '', // avoid label handling\n font: {multi: false}, // avoid font propagation\n smooth: {\n enabled: false // avoid drawing penalty for complex edges\n }\n }\n };\n\n // if there are a lot of nodes, we cluster before we run the algorithm.\n // NOTE: this part fails to find clusters for large scale-free networks, which should\n // be easily clusterable.\n // TODO: examine why this is so\n if (indices.length > clusterThreshold) {\n let startLength = indices.length;\n while (indices.length > clusterThreshold && level <= MAX_LEVELS) {\n //console.time(\"clustering\")\n level += 1;\n let before = indices.length;\n // if there are many nodes we do a hubsize cluster\n if (level % 3 === 0) {\n this.body.modules.clustering.clusterBridges(clusterOptions);\n }\n else {\n this.body.modules.clustering.clusterOutliers(clusterOptions);\n }\n let after = indices.length;\n if (before == after && level % 3 !== 0) {\n this._declusterAll();\n this.body.emitter.emit(\"_layoutFailed\");\n console.info(\"This network could not be positioned by this version of the improved layout algorithm.\"\n + \" Please disable improvedLayout for better performance.\");\n return;\n }\n //console.timeEnd(\"clustering\")\n //console.log(before,level,after);\n }\n // increase the size of the edges\n this.body.modules.kamadaKawai.setOptions({springLength: Math.max(150, 2 * startLength)})\n }\n if (level > MAX_LEVELS){\n console.info(\"The clustering didn't succeed within the amount of interations allowed,\"\n + \" progressing with partial result.\");\n }\n\n // position the system for these nodes and edges\n this.body.modules.kamadaKawai.solve(indices, this.body.edgeIndices, true);\n\n // shift to center point\n this._shiftToCenter();\n\n // perturb the nodes a little bit to force the physics to kick in\n let offset = 70;\n for (let i = 0; i < indices.length; i++) {\n // Only perturb the nodes that aren't fixed\n let node = this.body.nodes[indices[i]];\n if (node.predefinedPosition === false) {\n node.x += (0.5 - this.seededRandom())*offset;\n node.y += (0.5 - this.seededRandom())*offset;\n }\n }\n\n // uncluster all clusters\n this._declusterAll();\n\n // reposition all bezier nodes.\n this.body.emitter.emit(\"_repositionBezierNodes\");\n }\n }\n }\n\n /**\n * Move all the nodes towards to the center so gravitational pull wil not move the nodes away from view\n * @private\n */\n _shiftToCenter() {\n let range = NetworkUtil.getRangeCore(this.body.nodes, this.body.nodeIndices);\n let center = NetworkUtil.findCenter(range);\n for (let i = 0; i < this.body.nodeIndices.length; i++) {\n let node = this.body.nodes[this.body.nodeIndices[i]];\n node.x -= center.x;\n node.y -= center.y;\n }\n }\n\n /**\n * Expands all clusters\n * @private\n */\n _declusterAll() {\n let clustersPresent = true;\n while (clustersPresent === true) {\n clustersPresent = false;\n for (let i = 0; i < this.body.nodeIndices.length; i++) {\n if (this.body.nodes[this.body.nodeIndices[i]].isCluster === true) {\n clustersPresent = true;\n this.body.modules.clustering.openCluster(this.body.nodeIndices[i], {}, false);\n }\n }\n if (clustersPresent === true) {\n this.body.emitter.emit('_dataChanged');\n }\n }\n }\n\n /**\n *\n * @returns {number|*}\n */\n getSeed() {\n return this.initialRandomSeed;\n }\n\n /**\n * This is the main function to layout the nodes in a hierarchical way.\n * It checks if the node details are supplied correctly\n *\n * @private\n */\n setupHierarchicalLayout() {\n if (this.options.hierarchical.enabled === true && this.body.nodeIndices.length > 0) {\n // get the size of the largest hubs and check if the user has defined a level for a node.\n let node, nodeId;\n let definedLevel = false;\n let undefinedLevel = false;\n this.lastNodeOnLevel = {};\n this.hierarchical = new HierarchicalStatus();\n\n for (nodeId in this.body.nodes) {\n if (this.body.nodes.hasOwnProperty(nodeId)) {\n node = this.body.nodes[nodeId];\n if (node.options.level !== undefined) {\n definedLevel = true;\n this.hierarchical.levels[nodeId] = node.options.level;\n }\n else {\n undefinedLevel = true;\n }\n }\n }\n\n // if the user defined some levels but not all, alert and run without hierarchical layout\n if (undefinedLevel === true && definedLevel === true) {\n throw new Error('To use the hierarchical layout, nodes require either no predefined levels'\n + ' or levels have to be defined for all nodes.');\n }\n else {\n // define levels if undefined by the users. Based on hubsize.\n if (undefinedLevel === true) {\n let sortMethod = this.options.hierarchical.sortMethod;\n if (sortMethod === 'hubsize') {\n this._determineLevelsByHubsize();\n }\n else if (sortMethod === 'directed') {\n this._determineLevelsDirected();\n }\n else if (sortMethod === 'custom') {\n this._determineLevelsCustomCallback();\n }\n }\n\n\n // fallback for cases where there are nodes but no edges\n for (let nodeId in this.body.nodes) {\n if (this.body.nodes.hasOwnProperty(nodeId)) {\n this.hierarchical.ensureLevel(nodeId);\n }\n }\n // check the distribution of the nodes per level.\n let distribution = this._getDistribution();\n\n // get the parent children relations.\n this._generateMap();\n\n // place the nodes on the canvas.\n this._placeNodesByHierarchy(distribution);\n\n // condense the whitespace.\n this._condenseHierarchy();\n\n // shift to center so gravity does not have to do much\n this._shiftToCenter();\n }\n }\n }\n\n /**\n * @private\n */\n _condenseHierarchy() {\n // Global var in this scope to define when the movement has stopped.\n let stillShifting = false;\n let branches = {};\n // first we have some methods to help shifting trees around.\n // the main method to shift the trees\n let shiftTrees = () => {\n let treeSizes = getTreeSizes();\n let shiftBy = 0;\n for (let i = 0; i < treeSizes.length - 1; i++) {\n let diff = treeSizes[i].max - treeSizes[i+1].min;\n shiftBy += diff + this.options.hierarchical.treeSpacing;\n shiftTree(i + 1, shiftBy);\n }\n };\n\n // shift a single tree by an offset\n let shiftTree = (index, offset) => {\n let trees = this.hierarchical.trees;\n\n for (let nodeId in trees) {\n if (trees.hasOwnProperty(nodeId)) {\n if (trees[nodeId] === index) {\n this.direction.shift(nodeId, offset);\n }\n }\n }\n };\n\n // get the width of all trees\n let getTreeSizes = () => {\n let treeWidths = [];\n for (let i = 0; i < this.hierarchical.numTrees(); i++) {\n treeWidths.push(this.direction.getTreeSize(i));\n }\n return treeWidths;\n };\n\n\n // get a map of all nodes in this branch\n let getBranchNodes = (source, map) => {\n if (map[source.id]) {\n return;\n }\n map[source.id] = true;\n if (this.hierarchical.childrenReference[source.id]) {\n let children = this.hierarchical.childrenReference[source.id];\n if (children.length > 0) {\n for (let i = 0; i < children.length; i++) {\n getBranchNodes(this.body.nodes[children[i]], map);\n }\n }\n }\n };\n\n // get a min max width as well as the maximum movement space it has on either sides\n // we use min max terminology because width and height can interchange depending on the direction of the layout\n let getBranchBoundary = (branchMap, maxLevel = 1e9) => {\n let minSpace = 1e9;\n let maxSpace = 1e9;\n let min = 1e9;\n let max = -1e9;\n for (let branchNode in branchMap) {\n if (branchMap.hasOwnProperty(branchNode)) {\n let node = this.body.nodes[branchNode];\n let level = this.hierarchical.levels[node.id];\n let position = this.direction.getPosition(node);\n\n // get the space around the node.\n let [minSpaceNode, maxSpaceNode] = this._getSpaceAroundNode(node,branchMap);\n minSpace = Math.min(minSpaceNode, minSpace);\n maxSpace = Math.min(maxSpaceNode, maxSpace);\n\n // the width is only relevant for the levels two nodes have in common. This is why we filter on this.\n if (level <= maxLevel) {\n min = Math.min(position, min);\n max = Math.max(position, max);\n }\n }\n }\n\n return [min, max, minSpace, maxSpace];\n }\n\n\n // check what the maximum level is these nodes have in common.\n let getCollisionLevel = (node1, node2) => {\n let maxLevel1 = this.hierarchical.getMaxLevel(node1.id);\n let maxLevel2 = this.hierarchical.getMaxLevel(node2.id);\n return Math.min(maxLevel1, maxLevel2);\n };\n\n\n /**\n * Condense elements. These can be nodes or branches depending on the callback.\n *\n * @param {function} callback\n * @param {Array.} levels\n * @param {*} centerParents\n */\n let shiftElementsCloser = (callback, levels, centerParents) => {\n let hier = this.hierarchical;\n\n for (let i = 0; i < levels.length; i++) {\n let level = levels[i];\n let levelNodes = hier.distributionOrdering[level];\n if (levelNodes.length > 1) {\n for (let j = 0; j < levelNodes.length - 1; j++) {\n let node1 = levelNodes[j];\n let node2 = levelNodes[j+1];\n\n // NOTE: logic maintained as it was; if nodes have same ancestor,\n // then of course they are in the same sub-network.\n if (hier.hasSameParent(node1, node2) && hier.inSameSubNetwork(node1, node2) ) {\n callback(node1, node2, centerParents);\n }\n }\n }\n }\n };\n\n\n // callback for shifting branches\n let branchShiftCallback = (node1, node2, centerParent = false) => {\n //window.CALLBACKS.push(() => {\n let pos1 = this.direction.getPosition(node1);\n let pos2 = this.direction.getPosition(node2);\n let diffAbs = Math.abs(pos2 - pos1);\n let nodeSpacing = this.options.hierarchical.nodeSpacing;\n //console.log(\"NOW CHECKING:\", node1.id, node2.id, diffAbs);\n if (diffAbs > nodeSpacing) {\n let branchNodes1 = {};\n let branchNodes2 = {};\n\n getBranchNodes(node1, branchNodes1);\n getBranchNodes(node2, branchNodes2);\n\n // check the largest distance between the branches\n let maxLevel = getCollisionLevel(node1, node2);\n let branchNodeBoundary1 = getBranchBoundary(branchNodes1, maxLevel);\n let branchNodeBoundary2 = getBranchBoundary(branchNodes2, maxLevel);\n let max1 = branchNodeBoundary1[1];\n let min2 = branchNodeBoundary2[0];\n let minSpace2 = branchNodeBoundary2[2];\n\n //console.log(node1.id, getBranchBoundary(branchNodes1, maxLevel), node2.id,\n // getBranchBoundary(branchNodes2, maxLevel), maxLevel);\n let diffBranch = Math.abs(max1 - min2);\n if (diffBranch > nodeSpacing) {\n let offset = max1 - min2 + nodeSpacing;\n if (offset < -minSpace2 + nodeSpacing) {\n offset = -minSpace2 + nodeSpacing;\n //console.log(\"RESETTING OFFSET\", max1 - min2 + this.options.hierarchical.nodeSpacing, -minSpace2, offset);\n }\n if (offset < 0) {\n //console.log(\"SHIFTING\", node2.id, offset);\n this._shiftBlock(node2.id, offset);\n stillShifting = true;\n\n if (centerParent === true)\n this._centerParent(node2);\n }\n }\n\n }\n //this.body.emitter.emit(\"_redraw\");})\n };\n\n let minimizeEdgeLength = (iterations, node) => {\n //window.CALLBACKS.push(() => {\n // console.log(\"ts\",node.id);\n let nodeId = node.id;\n let allEdges = node.edges;\n let nodeLevel = this.hierarchical.levels[node.id];\n\n // gather constants\n let C2 = this.options.hierarchical.levelSeparation * this.options.hierarchical.levelSeparation;\n let referenceNodes = {};\n let aboveEdges = [];\n for (let i = 0; i < allEdges.length; i++) {\n let edge = allEdges[i];\n if (edge.toId != edge.fromId) {\n let otherNode = edge.toId == nodeId ? edge.from : edge.to;\n referenceNodes[allEdges[i].id] = otherNode;\n if (this.hierarchical.levels[otherNode.id] < nodeLevel) {\n aboveEdges.push(edge);\n }\n }\n }\n\n // differentiated sum of lengths based on only moving one node over one axis\n let getFx = (point, edges) => {\n let sum = 0;\n for (let i = 0; i < edges.length; i++) {\n if (referenceNodes[edges[i].id] !== undefined) {\n let a = this.direction.getPosition(referenceNodes[edges[i].id]) - point;\n sum += a / Math.sqrt(a * a + C2);\n }\n }\n return sum;\n };\n\n // doubly differentiated sum of lengths based on only moving one node over one axis\n let getDFx = (point, edges) => {\n let sum = 0;\n for (let i = 0; i < edges.length; i++) {\n if (referenceNodes[edges[i].id] !== undefined) {\n let a = this.direction.getPosition(referenceNodes[edges[i].id]) - point;\n sum -= (C2 * Math.pow(a * a + C2, -1.5));\n }\n }\n return sum;\n };\n\n let getGuess = (iterations, edges) => {\n let guess = this.direction.getPosition(node);\n // Newton's method for optimization\n let guessMap = {};\n for (let i = 0; i < iterations; i++) {\n let fx = getFx(guess, edges);\n let dfx = getDFx(guess, edges);\n\n // we limit the movement to avoid instability.\n let limit = 40;\n let ratio = Math.max(-limit, Math.min(limit, Math.round(fx/dfx)));\n guess = guess - ratio;\n // reduce duplicates\n if (guessMap[guess] !== undefined) {\n break;\n }\n guessMap[guess] = i;\n }\n return guess;\n };\n\n let moveBranch = (guess) => {\n // position node if there is space\n let nodePosition = this.direction.getPosition(node);\n\n // check movable area of the branch\n if (branches[node.id] === undefined) {\n let branchNodes = {};\n getBranchNodes(node, branchNodes);\n branches[node.id] = branchNodes;\n }\n let branchBoundary = getBranchBoundary(branches[node.id]);\n let minSpaceBranch = branchBoundary[2];\n let maxSpaceBranch = branchBoundary[3];\n\n let diff = guess - nodePosition;\n\n // check if we are allowed to move the node:\n let branchOffset = 0;\n if (diff > 0) {\n branchOffset = Math.min(diff, maxSpaceBranch - this.options.hierarchical.nodeSpacing);\n }\n else if (diff < 0) {\n branchOffset = -Math.min(-diff, minSpaceBranch - this.options.hierarchical.nodeSpacing);\n }\n\n if (branchOffset != 0) {\n //console.log(\"moving branch:\",branchOffset, maxSpaceBranch, minSpaceBranch)\n this._shiftBlock(node.id, branchOffset);\n //this.body.emitter.emit(\"_redraw\");\n stillShifting = true;\n }\n };\n\n let moveNode = (guess) => {\n let nodePosition = this.direction.getPosition(node);\n\n // position node if there is space\n let [minSpace, maxSpace] = this._getSpaceAroundNode(node);\n let diff = guess - nodePosition;\n // check if we are allowed to move the node:\n let newPosition = nodePosition;\n if (diff > 0) {\n newPosition = Math.min(nodePosition + (maxSpace - this.options.hierarchical.nodeSpacing), guess);\n }\n else if (diff < 0) {\n newPosition = Math.max(nodePosition - (minSpace - this.options.hierarchical.nodeSpacing), guess);\n }\n\n if (newPosition !== nodePosition) {\n //console.log(\"moving Node:\",diff, minSpace, maxSpace);\n this.direction.setPosition(node, newPosition);\n //this.body.emitter.emit(\"_redraw\");\n stillShifting = true;\n }\n };\n\n let guess = getGuess(iterations, aboveEdges);\n moveBranch(guess);\n guess = getGuess(iterations, allEdges);\n moveNode(guess);\n //})\n };\n\n // method to remove whitespace between branches. Because we do bottom up, we can center the parents.\n let minimizeEdgeLengthBottomUp = (iterations) => {\n let levels = this.hierarchical.getLevels();\n levels = levels.reverse();\n for (let i = 0; i < iterations; i++) {\n stillShifting = false;\n for (let j = 0; j < levels.length; j++) {\n let level = levels[j];\n let levelNodes = this.hierarchical.distributionOrdering[level];\n for (let k = 0; k < levelNodes.length; k++) {\n minimizeEdgeLength(1000, levelNodes[k]);\n }\n }\n if (stillShifting !== true) {\n //console.log(\"FINISHED minimizeEdgeLengthBottomUp IN \" + i);\n break;\n }\n }\n };\n\n // method to remove whitespace between branches. Because we do bottom up, we can center the parents.\n let shiftBranchesCloserBottomUp = (iterations) => {\n let levels = this.hierarchical.getLevels();\n levels = levels.reverse();\n for (let i = 0; i < iterations; i++) {\n stillShifting = false;\n shiftElementsCloser(branchShiftCallback, levels, true);\n if (stillShifting !== true) {\n //console.log(\"FINISHED shiftBranchesCloserBottomUp IN \" + (i+1));\n break;\n }\n }\n };\n\n // center all parents\n let centerAllParents = () => {\n for (let nodeId in this.body.nodes) {\n if (this.body.nodes.hasOwnProperty(nodeId))\n this._centerParent(this.body.nodes[nodeId]);\n }\n };\n\n // center all parents\n let centerAllParentsBottomUp = () => {\n let levels = this.hierarchical.getLevels();\n levels = levels.reverse();\n for (let i = 0; i < levels.length; i++) {\n let level = levels[i];\n let levelNodes = this.hierarchical.distributionOrdering[level];\n for (let j = 0; j < levelNodes.length; j++) {\n this._centerParent(levelNodes[j]);\n }\n }\n };\n\n // the actual work is done here.\n if (this.options.hierarchical.blockShifting === true) {\n shiftBranchesCloserBottomUp(5);\n centerAllParents();\n }\n\n // minimize edge length\n if (this.options.hierarchical.edgeMinimization === true) {\n minimizeEdgeLengthBottomUp(20);\n }\n\n if (this.options.hierarchical.parentCentralization === true) {\n centerAllParentsBottomUp()\n }\n\n shiftTrees();\n }\n\n /**\n * This gives the space around the node. IF a map is supplied, it will only check against nodes NOT in the map.\n * This is used to only get the distances to nodes outside of a branch.\n * @param {Node} node\n * @param {{Node.id: vis.Node}} map\n * @returns {number[]}\n * @private\n */\n _getSpaceAroundNode(node, map) {\n let useMap = true;\n if (map === undefined) {\n useMap = false;\n }\n let level = this.hierarchical.levels[node.id];\n if (level !== undefined) {\n let index = this.hierarchical.distributionIndex[node.id];\n let position = this.direction.getPosition(node);\n let ordering = this.hierarchical.distributionOrdering[level];\n let minSpace = 1e9;\n let maxSpace = 1e9;\n if (index !== 0) {\n let prevNode = ordering[index - 1];\n if ((useMap === true && map[prevNode.id] === undefined) || useMap === false) {\n let prevPos = this.direction.getPosition(prevNode);\n minSpace = position - prevPos;\n }\n }\n\n if (index != ordering.length - 1) {\n let nextNode = ordering[index + 1];\n if ((useMap === true && map[nextNode.id] === undefined) || useMap === false) {\n let nextPos = this.direction.getPosition(nextNode);\n maxSpace = Math.min(maxSpace, nextPos - position);\n }\n }\n\n return [minSpace, maxSpace];\n }\n else {\n return [0, 0];\n }\n }\n\n\n /**\n * We use this method to center a parent node and check if it does not cross other nodes when it does.\n * @param {Node} node\n * @private\n */\n _centerParent(node) {\n if (this.hierarchical.parentReference[node.id]) {\n let parents = this.hierarchical.parentReference[node.id];\n for (var i = 0; i < parents.length; i++) {\n let parentId = parents[i];\n let parentNode = this.body.nodes[parentId];\n let children = this.hierarchical.childrenReference[parentId];\n\n if (children !== undefined) {\n // get the range of the children\n let newPosition = this._getCenterPosition(children);\n\n let position = this.direction.getPosition(parentNode);\n let [minSpace, maxSpace] = this._getSpaceAroundNode(parentNode);\n let diff = position - newPosition;\n if ((diff < 0 && Math.abs(diff) < maxSpace - this.options.hierarchical.nodeSpacing) ||\n (diff > 0 && Math.abs(diff) < minSpace - this.options.hierarchical.nodeSpacing)) {\n this.direction.setPosition(parentNode, newPosition);\n }\n }\n }\n }\n }\n\n\n /**\n * This function places the nodes on the canvas based on the hierarchial distribution.\n *\n * @param {Object} distribution | obtained by the function this._getDistribution()\n * @private\n */\n _placeNodesByHierarchy(distribution) {\n this.positionedNodes = {};\n // start placing all the level 0 nodes first. Then recursively position their branches.\n for (let level in distribution) {\n if (distribution.hasOwnProperty(level)) {\n // sort nodes in level by position:\n let nodeArray = Object.keys(distribution[level]);\n nodeArray = this._indexArrayToNodes(nodeArray);\n this.direction.sort(nodeArray);\n let handledNodeCount = 0;\n\n for (let i = 0; i < nodeArray.length; i++) {\n let node = nodeArray[i];\n if (this.positionedNodes[node.id] === undefined) {\n let spacing = this.options.hierarchical.nodeSpacing;\n let pos = spacing * handledNodeCount;\n // We get the X or Y values we need and store them in pos and previousPos.\n // The get and set make sure we get X or Y\n if (handledNodeCount > 0) {\n pos = this.direction.getPosition(nodeArray[i-1]) + spacing;\n }\n this.direction.setPosition(node, pos, level);\n this._validatePositionAndContinue(node, level, pos);\n\n handledNodeCount++;\n }\n }\n }\n }\n }\n\n\n /**\n * This is a recursively called function to enumerate the branches from the largest hubs and place the nodes\n * on a X position that ensures there will be no overlap.\n *\n * @param {Node.id} parentId\n * @param {number} parentLevel\n * @private\n */\n _placeBranchNodes(parentId, parentLevel) {\n let childRef = this.hierarchical.childrenReference[parentId];\n\n // if this is not a parent, cancel the placing. This can happen with multiple parents to one child.\n if (childRef === undefined) {\n return;\n }\n\n // get a list of childNodes\n let childNodes = [];\n for (let i = 0; i < childRef.length; i++) {\n childNodes.push(this.body.nodes[childRef[i]]);\n }\n\n // use the positions to order the nodes.\n this.direction.sort(childNodes);\n\n // position the childNodes\n for (let i = 0; i < childNodes.length; i++) {\n let childNode = childNodes[i];\n let childNodeLevel = this.hierarchical.levels[childNode.id];\n // check if the child node is below the parent node and if it has already been positioned.\n if (childNodeLevel > parentLevel && this.positionedNodes[childNode.id] === undefined) {\n // get the amount of space required for this node. If parent the width is based on the amount of children.\n let spacing = this.options.hierarchical.nodeSpacing;\n let pos;\n\n // we get the X or Y values we need and store them in pos and previousPos.\n // The get and set make sure we get X or Y\n if (i === 0) {\n pos = this.direction.getPosition(this.body.nodes[parentId]);\n } else {\n pos = this.direction.getPosition(childNodes[i-1]) + spacing;\n }\n this.direction.setPosition(childNode, pos, childNodeLevel);\n this._validatePositionAndContinue(childNode, childNodeLevel, pos);\n }\n else {\n return;\n }\n }\n\n // center the parent nodes.\n let center = this._getCenterPosition(childNodes);\n this.direction.setPosition(this.body.nodes[parentId], center, parentLevel);\n }\n\n\n /**\n * This method checks for overlap and if required shifts the branch. It also keeps records of positioned nodes.\n * Finally it will call _placeBranchNodes to place the branch nodes.\n * @param {Node} node\n * @param {number} level\n * @param {number} pos\n * @private\n */\n _validatePositionAndContinue(node, level, pos) {\n // This method only works for formal trees and formal forests\n // Early exit if this is not the case\n if (!this.hierarchical.isTree) return;\n\n // if overlap has been detected, we shift the branch\n if (this.lastNodeOnLevel[level] !== undefined) {\n let previousPos = this.direction.getPosition(this.body.nodes[this.lastNodeOnLevel[level]]);\n if (pos - previousPos < this.options.hierarchical.nodeSpacing) {\n let diff = (previousPos + this.options.hierarchical.nodeSpacing) - pos;\n let sharedParent = this._findCommonParent(this.lastNodeOnLevel[level], node.id);\n this._shiftBlock(sharedParent.withChild, diff);\n }\n }\n\n this.lastNodeOnLevel[level] = node.id; // store change in position.\n this.positionedNodes[node.id] = true;\n this._placeBranchNodes(node.id, level);\n }\n\n /**\n * Receives an array with node indices and returns an array with the actual node references.\n * Used for sorting based on node properties.\n * @param {Array.} idArray\n * @returns {Array.}\n */\n _indexArrayToNodes(idArray) {\n let array = [];\n for (let i = 0; i < idArray.length; i++) {\n array.push(this.body.nodes[idArray[i]])\n }\n return array;\n }\n\n /**\n * This function get the distribution of levels based on hubsize\n *\n * @returns {Object}\n * @private\n */\n _getDistribution() {\n let distribution = {};\n let nodeId, node;\n\n // we fix Y because the hierarchy is vertical,\n // we fix X so we do not give a node an x position for a second time.\n // the fix of X is removed after the x value has been set.\n for (nodeId in this.body.nodes) {\n if (this.body.nodes.hasOwnProperty(nodeId)) {\n node = this.body.nodes[nodeId];\n let level = this.hierarchical.levels[nodeId] === undefined ? 0 : this.hierarchical.levels[nodeId];\n this.direction.fix(node, level);\n if (distribution[level] === undefined) {\n distribution[level] = {};\n }\n distribution[level][nodeId] = node;\n }\n }\n return distribution;\n }\n\n\n /**\n * Return the active (i.e. visible) edges for this node\n *\n * @param {Node} node\n * @returns {Array.} Array of edge instances\n * @private\n */\n _getActiveEdges(node) {\n let result = [];\n\n util.forEach(node.edges, (edge) => { \n if (this.body.edgeIndices.indexOf(edge.id) !== -1) {\n result.push(edge);\n }\n });\n\n return result;\n }\n\n\n /**\n * Get the hubsizes for all active nodes.\n *\n * @returns {number}\n * @private\n */\n _getHubSizes() {\n let hubSizes = {};\n let nodeIds = this.body.nodeIndices;\n\n util.forEach(nodeIds, (nodeId) => { \n let node = this.body.nodes[nodeId];\n let hubSize = this._getActiveEdges(node).length;\n hubSizes[hubSize] = true;\n });\n\n // Make an array of the size sorted descending\n let result = [];\n util.forEach(hubSizes, (size) => { \n result.push(Number(size));\n });\n\n TimSort.sort(result, function(a, b) {\n return b - a;\n });\n\n return result;\n }\n\n\n /**\n * this function allocates nodes in levels based on the recursive branching from the largest hubs.\n *\n * @private\n */\n _determineLevelsByHubsize() {\n let levelDownstream = (nodeA, nodeB) => {\n this.hierarchical.levelDownstream(nodeA, nodeB);\n }\n\n let hubSizes = this._getHubSizes();\n\n for (let i = 0; i < hubSizes.length; ++i ) {\n let hubSize = hubSizes[i];\n if (hubSize === 0) break;\n\n util.forEach(this.body.nodeIndices, (nodeId) => { \n let node = this.body.nodes[nodeId];\n\n if (hubSize === this._getActiveEdges(node).length) {\n this._crawlNetwork(levelDownstream, nodeId);\n }\n });\n }\n }\n\n\n /**\n * TODO: release feature\n * TODO: Determine if this feature is needed at all\n *\n * @private\n */\n _determineLevelsCustomCallback() {\n let minLevel = 100000;\n\n // TODO: this should come from options.\n let customCallback = function(nodeA, nodeB, edge) { // eslint-disable-line no-unused-vars\n\n };\n\n // TODO: perhaps move to HierarchicalStatus.\n // But I currently don't see the point, this method is not used.\n let levelByDirection = (nodeA, nodeB, edge) => {\n let levelA = this.hierarchical.levels[nodeA.id];\n // set initial level\n if (levelA === undefined) { levelA = this.hierarchical.levels[nodeA.id] = minLevel;}\n\n let diff = customCallback(\n NetworkUtil.cloneOptions(nodeA,'node'),\n NetworkUtil.cloneOptions(nodeB,'node'),\n NetworkUtil.cloneOptions(edge,'edge')\n );\n\n this.hierarchical.levels[nodeB.id] = levelA + diff;\n };\n\n this._crawlNetwork(levelByDirection);\n this.hierarchical.setMinLevelToZero(this.body.nodes);\n }\n\n /**\n * Allocate nodes in levels based on the direction of the edges.\n *\n * @private\n */\n _determineLevelsDirected() {\n let minLevel = 10000;\n\n /**\n * Check if there is an edge going the opposite direction for given edge\n *\n * @param {Edge} edge edge to check\n * @returns {boolean} true if there's another edge going into the opposite direction\n */\n let isBidirectional = (edge) => {\n util.forEach(this.body.edges, (otherEdge) => {\n if (otherEdge.toId === edge.fromId && otherEdge.fromId === edge.toId) {\n return true;\n }\n });\n\n return false;\n };\n\n\n let levelByDirection = (nodeA, nodeB, edge) => {\n let levelA = this.hierarchical.levels[nodeA.id];\n let levelB = this.hierarchical.levels[nodeB.id];\n\n if (isBidirectional(edge) && levelA !== undefined && levelB !== undefined) {\n // Don't redo the level determination if already done in this case.\n return;\n }\n\n // set initial level\n if (levelA === undefined) { levelA = this.hierarchical.levels[nodeA.id] = minLevel;}\n if (edge.toId == nodeB.id) {\n this.hierarchical.levels[nodeB.id] = levelA + 1;\n }\n else {\n this.hierarchical.levels[nodeB.id] = levelA - 1;\n }\n };\n\n this._crawlNetwork(levelByDirection);\n this.hierarchical.setMinLevelToZero(this.body.nodes);\n }\n\n\n /**\n * Update the bookkeeping of parent and child.\n * @private\n */\n _generateMap() {\n let fillInRelations = (parentNode, childNode) => {\n if (this.hierarchical.levels[childNode.id] > this.hierarchical.levels[parentNode.id]) {\n this.hierarchical.addRelation(parentNode.id, childNode.id);\n }\n };\n\n this._crawlNetwork(fillInRelations);\n this.hierarchical.checkIfTree();\n }\n\n\n /**\n * Crawl over the entire network and use a callback on each node couple that is connected to each other.\n * @param {function} [callback=function(){}] | will receive nodeA, nodeB and the connecting edge. A and B are distinct.\n * @param {Node.id} startingNodeId\n * @private\n */\n _crawlNetwork(callback = function() {}, startingNodeId) {\n let progress = {};\n\n let crawler = (node, tree) => {\n if (progress[node.id] === undefined) {\n this.hierarchical.setTreeIndex(node, tree);\n\n progress[node.id] = true;\n let childNode;\n let edges = this._getActiveEdges(node);\n for (let i = 0; i < edges.length; i++) {\n let edge = edges[i];\n if (edge.connected === true) {\n if (edge.toId == node.id) { // Not '===' because id's can be string and numeric\n childNode = edge.from;\n }\n else {\n childNode = edge.to;\n }\n\n if (node.id != childNode.id) { // Not '!==' because id's can be string and numeric\n callback(node, childNode, edge);\n crawler(childNode, tree);\n }\n }\n }\n }\n };\n\n\n if (startingNodeId === undefined) {\n // Crawl over all nodes\n let treeIndex = 0; // Serves to pass a unique id for the current distinct tree\n\n for (let i = 0; i < this.body.nodeIndices.length; i++) {\n let nodeId = this.body.nodeIndices[i];\n\n if (progress[nodeId] === undefined) {\n let node = this.body.nodes[nodeId];\n crawler(node, treeIndex);\n treeIndex += 1;\n }\n }\n }\n else {\n // Crawl from the given starting node\n let node = this.body.nodes[startingNodeId];\n if (node === undefined) {\n console.error(\"Node not found:\", startingNodeId);\n return;\n }\n crawler(node);\n }\n }\n\n\n /**\n * Shift a branch a certain distance\n * @param {Node.id} parentId\n * @param {number} diff\n * @private\n */\n _shiftBlock(parentId, diff) {\n let progress = {};\n let shifter = (parentId) => {\n if (progress[parentId]) {\n return;\n }\n progress[parentId] = true;\n this.direction.shift(parentId, diff);\n\n let childRef = this.hierarchical.childrenReference[parentId];\n if (childRef !== undefined) {\n for (let i = 0; i < childRef.length; i++) {\n shifter(childRef[i]);\n }\n }\n };\n shifter(parentId);\n }\n\n\n /**\n * Find a common parent between branches.\n * @param {Node.id} childA\n * @param {Node.id} childB\n * @returns {{foundParent, withChild}}\n * @private\n */\n _findCommonParent(childA,childB) {\n let parents = {};\n let iterateParents = (parents,child) => {\n let parentRef = this.hierarchical.parentReference[child];\n if (parentRef !== undefined) {\n for (let i = 0; i < parentRef.length; i++) {\n let parent = parentRef[i];\n parents[parent] = true;\n iterateParents(parents, parent)\n }\n }\n };\n let findParent = (parents, child) => {\n let parentRef = this.hierarchical.parentReference[child];\n if (parentRef !== undefined) {\n for (let i = 0; i < parentRef.length; i++) {\n let parent = parentRef[i];\n if (parents[parent] !== undefined) {\n return {foundParent:parent, withChild:child};\n }\n let branch = findParent(parents, parent);\n if (branch.foundParent !== null) {\n return branch;\n }\n }\n }\n return {foundParent:null, withChild:child};\n };\n\n iterateParents(parents, childA);\n return findParent(parents, childB);\n }\n\n\n /**\n * Set the strategy pattern for handling the coordinates given the current direction.\n *\n * The individual instances contain all the operations and data specific to a layout direction.\n *\n * @param {Node} node\n * @param {{x: number, y: number}} position\n * @param {number} level\n * @param {boolean} [doNotUpdate=false]\n * @private\n */\n setDirectionStrategy() {\n var isVertical = (this.options.hierarchical.direction === 'UD'\n || this.options.hierarchical.direction === 'DU');\n\n if(isVertical) {\n this.direction = new VerticalStrategy(this); \n } else {\n this.direction = new HorizontalStrategy(this); \n }\n }\n\n\n /**\n * Determine the center position of a branch from the passed list of child nodes\n *\n * This takes into account the positions of all the child nodes.\n * @param {Array.} childNodes Array of either child nodes or node id's\n * @return {number}\n * @private\n */\n _getCenterPosition(childNodes) {\n let minPos = 1e9;\n let maxPos = -1e9;\n\n for (let i = 0; i < childNodes.length; i++) {\n let childNode;\n if (childNodes[i].id !== undefined) {\n childNode = childNodes[i];\n } else {\n let childNodeId = childNodes[i];\n childNode = this.body.nodes[childNodeId];\n }\n\n let position = this.direction.getPosition(childNode);\n minPos = Math.min(minPos, position);\n maxPos = Math.max(maxPos, position);\n }\n\n return 0.5 * (minPos + maxPos);\n }\n}\n\nexport default LayoutEngine;\n","import './ManipulationSystem.css';\n\nimport util from 'vis-util';\nimport Hammer from '../../module/hammer';\nimport hammerUtil from '../../hammerUtil';\n\n/**\n * Clears the toolbar div element of children\n *\n * @private\n */\nclass ManipulationSystem {\n /**\n * @param {Object} body\n * @param {Canvas} canvas\n * @param {SelectionHandler} selectionHandler\n */\n constructor(body, canvas, selectionHandler) {\n this.body = body;\n this.canvas = canvas;\n this.selectionHandler = selectionHandler;\n\n this.editMode = false;\n this.manipulationDiv = undefined;\n this.editModeDiv = undefined;\n this.closeDiv = undefined;\n\n this.manipulationHammers = [];\n this.temporaryUIFunctions = {};\n this.temporaryEventFunctions = [];\n\n this.touchTime = 0;\n this.temporaryIds = {nodes: [], edges:[]};\n this.guiEnabled = false;\n this.inMode = false;\n this.selectedControlNode = undefined;\n\n this.options = {};\n this.defaultOptions = {\n enabled: false,\n initiallyActive: false,\n addNode: true,\n addEdge: true,\n editNode: undefined,\n editEdge: true,\n deleteNode: true,\n deleteEdge: true,\n controlNodeStyle:{\n shape:'dot',\n size:6,\n color: {background: '#ff0000', border: '#3c3c3c', highlight: {background: '#07f968', border: '#3c3c3c'}},\n borderWidth: 2,\n borderWidthSelected: 2\n }\n };\n util.extend(this.options, this.defaultOptions);\n\n this.body.emitter.on('destroy', () => {this._clean();});\n this.body.emitter.on('_dataChanged',this._restore.bind(this));\n this.body.emitter.on('_resetData', this._restore.bind(this));\n }\n\n\n /**\n * If something changes in the data during editing, switch back to the initial datamanipulation state and close all edit modes.\n * @private\n */\n _restore() {\n if (this.inMode !== false) {\n if (this.options.initiallyActive === true) {\n this.enableEditMode();\n }\n else {\n this.disableEditMode();\n }\n }\n }\n\n /**\n * Set the Options\n *\n * @param {Object} options\n * @param {Object} allOptions\n * @param {Object} globalOptions\n */\n setOptions(options, allOptions, globalOptions) {\n if (allOptions !== undefined) {\n if (allOptions.locale !== undefined) {this.options.locale = allOptions.locale} else {this.options.locale = globalOptions.locale;}\n if (allOptions.locales !== undefined) {this.options.locales = allOptions.locales} else {this.options.locales = globalOptions.locales;}\n }\n\n if (options !== undefined) {\n if (typeof options === 'boolean') {\n this.options.enabled = options;\n }\n else {\n this.options.enabled = true;\n util.deepExtend(this.options, options);\n }\n if (this.options.initiallyActive === true) {\n this.editMode = true;\n }\n this._setup();\n }\n }\n\n\n /**\n * Enable or disable edit-mode. Draws the DOM required and cleans up after itself.\n *\n * @private\n */\n toggleEditMode() {\n if (this.editMode === true) {\n this.disableEditMode();\n }\n else {\n this.enableEditMode();\n }\n }\n\n\n /**\n * Enables Edit Mode\n */\n enableEditMode() {\n this.editMode = true;\n\n this._clean();\n if (this.guiEnabled === true) {\n this.manipulationDiv.style.display = 'block';\n this.closeDiv.style.display = 'block';\n this.editModeDiv.style.display = 'none';\n this.showManipulatorToolbar();\n }\n }\n\n /**\n * Disables Edit Mode\n */\n disableEditMode() {\n this.editMode = false;\n\n this._clean();\n if (this.guiEnabled === true) {\n this.manipulationDiv.style.display = 'none';\n this.closeDiv.style.display = 'none';\n this.editModeDiv.style.display = 'block';\n this._createEditButton();\n }\n }\n\n /**\n * Creates the main toolbar. Removes functions bound to the select event. Binds all the buttons of the toolbar.\n *\n * @private\n */\n showManipulatorToolbar() {\n // restore the state of any bound functions or events, remove control nodes, restore physics\n this._clean();\n\n // reset global variables\n this.manipulationDOM = {};\n\n // if the gui is enabled, draw all elements.\n if (this.guiEnabled === true) {\n // a _restore will hide these menus\n this.editMode = true;\n this.manipulationDiv.style.display = 'block';\n this.closeDiv.style.display = 'block';\n\n let selectedNodeCount = this.selectionHandler._getSelectedNodeCount();\n let selectedEdgeCount = this.selectionHandler._getSelectedEdgeCount();\n let selectedTotalCount = selectedNodeCount + selectedEdgeCount;\n let locale = this.options.locales[this.options.locale];\n let needSeperator = false;\n\n\n if (this.options.addNode !== false) {\n this._createAddNodeButton(locale);\n needSeperator = true;\n }\n if (this.options.addEdge !== false) {\n if (needSeperator === true) {\n this._createSeperator(1);\n } else {\n needSeperator = true;\n }\n this._createAddEdgeButton(locale);\n }\n\n if (selectedNodeCount === 1 && typeof this.options.editNode === 'function') {\n if (needSeperator === true) {\n this._createSeperator(2);\n } else {\n needSeperator = true;\n }\n this._createEditNodeButton(locale);\n }\n else if (selectedEdgeCount === 1 && selectedNodeCount === 0 && this.options.editEdge !== false) {\n if (needSeperator === true) {\n this._createSeperator(3);\n } else {\n needSeperator = true;\n }\n this._createEditEdgeButton(locale);\n }\n\n // remove buttons\n if (selectedTotalCount !== 0) {\n if (selectedNodeCount > 0 && this.options.deleteNode !== false) {\n if (needSeperator === true) {\n this._createSeperator(4);\n }\n this._createDeleteButton(locale);\n }\n else if (selectedNodeCount === 0 && this.options.deleteEdge !== false) {\n if (needSeperator === true) {\n this._createSeperator(4);\n }\n this._createDeleteButton(locale);\n }\n }\n\n // bind the close button\n this._bindHammerToDiv(this.closeDiv, this.toggleEditMode.bind(this));\n\n // refresh this bar based on what has been selected\n this._temporaryBindEvent('select', this.showManipulatorToolbar.bind(this));\n }\n\n // redraw to show any possible changes\n this.body.emitter.emit('_redraw');\n\n }\n\n\n /**\n * Create the toolbar for adding Nodes\n */\n addNodeMode() {\n // when using the gui, enable edit mode if it wasnt already.\n if (this.editMode !== true) {\n this.enableEditMode();\n }\n\n // restore the state of any bound functions or events, remove control nodes, restore physics\n this._clean();\n\n this.inMode = 'addNode';\n if (this.guiEnabled === true) {\n let locale = this.options.locales[this.options.locale];\n this.manipulationDOM = {};\n this._createBackButton(locale);\n this._createSeperator();\n this._createDescription(locale['addDescription'] || this.options.locales['en']['addDescription']);\n\n // bind the close button\n this._bindHammerToDiv(this.closeDiv, this.toggleEditMode.bind(this));\n }\n\n this._temporaryBindEvent('click', this._performAddNode.bind(this));\n }\n\n /**\n * call the bound function to handle the editing of the node. The node has to be selected.\n */\n editNode() {\n // when using the gui, enable edit mode if it wasnt already.\n if (this.editMode !== true) {\n this.enableEditMode();\n }\n\n // restore the state of any bound functions or events, remove control nodes, restore physics\n this._clean();\n let node = this.selectionHandler._getSelectedNode();\n if (node !== undefined) {\n this.inMode = 'editNode';\n if (typeof this.options.editNode === 'function') {\n if (node.isCluster !== true) {\n let data = util.deepExtend({}, node.options, false);\n data.x = node.x;\n data.y = node.y;\n\n if (this.options.editNode.length === 2) {\n this.options.editNode(data, (finalizedData) => {\n if (finalizedData !== null && finalizedData !== undefined && this.inMode === 'editNode') { // if for whatever reason the mode has changes (due to dataset change) disregard the callback) {\n this.body.data.nodes.getDataSet().update(finalizedData);\n }\n this.showManipulatorToolbar();\n });\n }\n else {\n throw new Error('The function for edit does not support two arguments (data, callback)');\n }\n }\n else {\n alert(this.options.locales[this.options.locale]['editClusterError'] || this.options.locales['en']['editClusterError']);\n }\n }\n else {\n throw new Error('No function has been configured to handle the editing of nodes.');\n }\n }\n else {\n this.showManipulatorToolbar();\n }\n }\n\n\n /**\n * create the toolbar to connect nodes\n */\n addEdgeMode() {\n // when using the gui, enable edit mode if it wasnt already.\n if (this.editMode !== true) {\n this.enableEditMode();\n }\n\n // restore the state of any bound functions or events, remove control nodes, restore physics\n this._clean();\n\n this.inMode = 'addEdge';\n if (this.guiEnabled === true) {\n let locale = this.options.locales[this.options.locale];\n this.manipulationDOM = {};\n this._createBackButton(locale);\n this._createSeperator();\n this._createDescription(locale['edgeDescription'] || this.options.locales['en']['edgeDescription']);\n\n // bind the close button\n this._bindHammerToDiv(this.closeDiv, this.toggleEditMode.bind(this));\n }\n\n // temporarily overload functions\n this._temporaryBindUI('onTouch', this._handleConnect.bind(this));\n this._temporaryBindUI('onDragEnd', this._finishConnect.bind(this));\n this._temporaryBindUI('onDrag', this._dragControlNode.bind(this));\n this._temporaryBindUI('onRelease', this._finishConnect.bind(this));\n this._temporaryBindUI('onDragStart',this._dragStartEdge.bind(this));\n this._temporaryBindUI('onHold', () => {});\n }\n\n /**\n * create the toolbar to edit edges\n */\n editEdgeMode() {\n // when using the gui, enable edit mode if it wasn't already.\n if (this.editMode !== true) {\n this.enableEditMode();\n }\n\n // restore the state of any bound functions or events, remove control nodes, restore physics\n this._clean();\n\n this.inMode = 'editEdge';\n if (typeof this.options.editEdge === 'object' && typeof this.options.editEdge.editWithoutDrag === \"function\") {\n this.edgeBeingEditedId = this.selectionHandler.getSelectedEdges()[0];\n if (this.edgeBeingEditedId !== undefined) {\n var edge = this.body.edges[this.edgeBeingEditedId];\n this._performEditEdge(edge.from, edge.to);\n return;\n }\n }\n if (this.guiEnabled === true) {\n let locale = this.options.locales[this.options.locale];\n this.manipulationDOM = {};\n this._createBackButton(locale);\n this._createSeperator();\n this._createDescription(locale['editEdgeDescription'] || this.options.locales['en']['editEdgeDescription']);\n\n // bind the close button\n this._bindHammerToDiv(this.closeDiv, this.toggleEditMode.bind(this));\n }\n\n this.edgeBeingEditedId = this.selectionHandler.getSelectedEdges()[0];\n if (this.edgeBeingEditedId !== undefined) {\n let edge = this.body.edges[this.edgeBeingEditedId];\n\n // create control nodes\n let controlNodeFrom = this._getNewTargetNode(edge.from.x, edge.from.y);\n let controlNodeTo = this._getNewTargetNode(edge.to.x, edge.to.y);\n\n this.temporaryIds.nodes.push(controlNodeFrom.id);\n this.temporaryIds.nodes.push(controlNodeTo.id);\n\n this.body.nodes[controlNodeFrom.id] = controlNodeFrom;\n this.body.nodeIndices.push(controlNodeFrom.id);\n this.body.nodes[controlNodeTo.id] = controlNodeTo;\n this.body.nodeIndices.push(controlNodeTo.id);\n\n // temporarily overload UI functions, cleaned up automatically because of _temporaryBindUI\n this._temporaryBindUI('onTouch', this._controlNodeTouch.bind(this)); // used to get the position\n this._temporaryBindUI('onTap', () => {}); // disabled\n this._temporaryBindUI('onHold', () => {}); // disabled\n this._temporaryBindUI('onDragStart', this._controlNodeDragStart.bind(this));// used to select control node\n this._temporaryBindUI('onDrag', this._controlNodeDrag.bind(this)); // used to drag control node\n this._temporaryBindUI('onDragEnd', this._controlNodeDragEnd.bind(this)); // used to connect or revert control nodes\n this._temporaryBindUI('onMouseMove', () => {}); // disabled\n\n // create function to position control nodes correctly on movement\n // automatically cleaned up because we use the temporary bind\n this._temporaryBindEvent('beforeDrawing', (ctx) => {\n let positions = edge.edgeType.findBorderPositions(ctx);\n if (controlNodeFrom.selected === false) {\n controlNodeFrom.x = positions.from.x;\n controlNodeFrom.y = positions.from.y;\n }\n if (controlNodeTo.selected === false) {\n controlNodeTo.x = positions.to.x;\n controlNodeTo.y = positions.to.y;\n }\n });\n\n this.body.emitter.emit('_redraw');\n }\n else {\n this.showManipulatorToolbar();\n }\n }\n\n /**\n * delete everything in the selection\n */\n deleteSelected() {\n // when using the gui, enable edit mode if it wasnt already.\n if (this.editMode !== true) {\n this.enableEditMode();\n }\n\n // restore the state of any bound functions or events, remove control nodes, restore physics\n this._clean();\n\n this.inMode = 'delete';\n let selectedNodes = this.selectionHandler.getSelectedNodes();\n let selectedEdges = this.selectionHandler.getSelectedEdges();\n let deleteFunction = undefined;\n if (selectedNodes.length > 0) {\n for (let i = 0; i < selectedNodes.length; i++) {\n if (this.body.nodes[selectedNodes[i]].isCluster === true) {\n alert(this.options.locales[this.options.locale]['deleteClusterError'] || this.options.locales['en']['deleteClusterError']);\n return;\n }\n }\n\n if (typeof this.options.deleteNode === 'function') {\n deleteFunction = this.options.deleteNode;\n }\n }\n else if (selectedEdges.length > 0) {\n if (typeof this.options.deleteEdge === 'function') {\n deleteFunction = this.options.deleteEdge;\n }\n }\n\n if (typeof deleteFunction === 'function') {\n let data = {nodes: selectedNodes, edges: selectedEdges};\n if (deleteFunction.length === 2) {\n deleteFunction(data, (finalizedData) => {\n if (finalizedData !== null && finalizedData !== undefined && this.inMode === 'delete') { // if for whatever reason the mode has changes (due to dataset change) disregard the callback) {\n this.body.data.edges.getDataSet().remove(finalizedData.edges);\n this.body.data.nodes.getDataSet().remove(finalizedData.nodes);\n this.body.emitter.emit('startSimulation');\n this.showManipulatorToolbar();\n }\n else {\n this.body.emitter.emit('startSimulation');\n this.showManipulatorToolbar();\n }\n });\n }\n else {\n throw new Error('The function for delete does not support two arguments (data, callback)')\n }\n }\n else {\n this.body.data.edges.getDataSet().remove(selectedEdges);\n this.body.data.nodes.getDataSet().remove(selectedNodes);\n this.body.emitter.emit('startSimulation');\n this.showManipulatorToolbar();\n }\n }\n\n\n\n\n //********************************************** PRIVATE ***************************************//\n\n /**\n * draw or remove the DOM\n * @private\n */\n _setup() {\n if (this.options.enabled === true) {\n // Enable the GUI\n this.guiEnabled = true;\n\n this._createWrappers();\n if (this.editMode === false) {\n this._createEditButton();\n }\n else {\n this.showManipulatorToolbar();\n }\n }\n else {\n this._removeManipulationDOM();\n\n // disable the gui\n this.guiEnabled = false;\n }\n }\n\n\n /**\n * create the div overlays that contain the DOM\n * @private\n */\n _createWrappers() {\n // load the manipulator HTML elements. All styling done in css.\n if (this.manipulationDiv === undefined) {\n this.manipulationDiv = document.createElement('div');\n this.manipulationDiv.className = 'vis-manipulation';\n if (this.editMode === true) {\n this.manipulationDiv.style.display = 'block';\n }\n else {\n this.manipulationDiv.style.display = 'none';\n }\n this.canvas.frame.appendChild(this.manipulationDiv);\n }\n\n // container for the edit button.\n if (this.editModeDiv === undefined) {\n this.editModeDiv = document.createElement('div');\n this.editModeDiv.className = 'vis-edit-mode';\n if (this.editMode === true) {\n this.editModeDiv.style.display = 'none';\n }\n else {\n this.editModeDiv.style.display = 'block';\n }\n this.canvas.frame.appendChild(this.editModeDiv);\n }\n\n\n // container for the close div button\n if (this.closeDiv === undefined) {\n this.closeDiv = document.createElement('div');\n this.closeDiv.className = 'vis-close';\n this.closeDiv.style.display = this.manipulationDiv.style.display;\n this.canvas.frame.appendChild(this.closeDiv);\n }\n }\n\n\n /**\n * generate a new target node. Used for creating new edges and editing edges\n *\n * @param {number} x\n * @param {number} y\n * @returns {Node}\n * @private\n */\n _getNewTargetNode(x,y) {\n let controlNodeStyle = util.deepExtend({}, this.options.controlNodeStyle);\n\n controlNodeStyle.id = 'targetNode' + util.randomUUID();\n controlNodeStyle.hidden = false;\n controlNodeStyle.physics = false;\n controlNodeStyle.x = x;\n controlNodeStyle.y = y;\n\n // we have to define the bounding box in order for the nodes to be drawn immediately\n let node = this.body.functions.createNode(controlNodeStyle);\n node.shape.boundingBox = {left: x, right:x, top:y, bottom:y};\n\n return node;\n }\n\n\n /**\n * Create the edit button\n */\n _createEditButton() {\n // restore everything to it's original state (if applicable)\n this._clean();\n\n // reset the manipulationDOM\n this.manipulationDOM = {};\n\n // empty the editModeDiv\n util.recursiveDOMDelete(this.editModeDiv);\n\n\n // create the contents for the editMode button\n let locale = this.options.locales[this.options.locale];\n let button = this._createButton('editMode', 'vis-button vis-edit vis-edit-mode', locale['edit'] || this.options.locales['en']['edit']);\n this.editModeDiv.appendChild(button);\n\n // bind a hammer listener to the button, calling the function toggleEditMode.\n this._bindHammerToDiv(button, this.toggleEditMode.bind(this));\n }\n\n\n /**\n * this function cleans up after everything this module does. Temporary elements, functions and events are removed, physics restored, hammers removed.\n * @private\n */\n _clean() {\n // not in mode\n this.inMode = false;\n\n // _clean the divs\n if (this.guiEnabled === true) {\n util.recursiveDOMDelete(this.editModeDiv);\n util.recursiveDOMDelete(this.manipulationDiv);\n\n // removes all the bindings and overloads\n this._cleanManipulatorHammers();\n }\n\n // remove temporary nodes and edges\n this._cleanupTemporaryNodesAndEdges();\n\n // restore overloaded UI functions\n this._unbindTemporaryUIs();\n\n // remove the temporaryEventFunctions\n this._unbindTemporaryEvents();\n\n // restore the physics if required\n this.body.emitter.emit('restorePhysics');\n }\n\n\n /**\n * Each dom element has it's own hammer. They are stored in this.manipulationHammers. This cleans them up.\n * @private\n */\n _cleanManipulatorHammers() {\n // _clean hammer bindings\n if (this.manipulationHammers.length != 0) {\n for (let i = 0; i < this.manipulationHammers.length; i++) {\n this.manipulationHammers[i].destroy();\n }\n this.manipulationHammers = [];\n }\n }\n\n\n /**\n * Remove all DOM elements created by this module.\n * @private\n */\n _removeManipulationDOM() {\n // removes all the bindings and overloads\n this._clean();\n\n // empty the manipulation divs\n util.recursiveDOMDelete(this.manipulationDiv);\n util.recursiveDOMDelete(this.editModeDiv);\n util.recursiveDOMDelete(this.closeDiv);\n\n // remove the manipulation divs\n if (this.manipulationDiv) {this.canvas.frame.removeChild(this.manipulationDiv);}\n if (this.editModeDiv) {this.canvas.frame.removeChild(this.editModeDiv);}\n if (this.closeDiv) {this.canvas.frame.removeChild(this.closeDiv);}\n\n // set the references to undefined\n this.manipulationDiv = undefined;\n this.editModeDiv = undefined;\n this.closeDiv = undefined;\n }\n\n\n /**\n * create a seperator line. the index is to differentiate in the manipulation dom\n * @param {number} [index=1]\n * @private\n */\n _createSeperator(index = 1) {\n this.manipulationDOM['seperatorLineDiv' + index] = document.createElement('div');\n this.manipulationDOM['seperatorLineDiv' + index].className = 'vis-separator-line';\n this.manipulationDiv.appendChild(this.manipulationDOM['seperatorLineDiv' + index]);\n }\n\n // ---------------------- DOM functions for buttons --------------------------//\n\n /**\n *\n * @param {Locale} locale\n * @private\n */\n _createAddNodeButton(locale) {\n let button = this._createButton('addNode', 'vis-button vis-add', locale['addNode'] || this.options.locales['en']['addNode']);\n this.manipulationDiv.appendChild(button);\n this._bindHammerToDiv(button, this.addNodeMode.bind(this));\n }\n\n /**\n *\n * @param {Locale} locale\n * @private\n */\n _createAddEdgeButton(locale) {\n let button = this._createButton('addEdge', 'vis-button vis-connect', locale['addEdge'] || this.options.locales['en']['addEdge']);\n this.manipulationDiv.appendChild(button);\n this._bindHammerToDiv(button, this.addEdgeMode.bind(this));\n }\n\n /**\n *\n * @param {Locale} locale\n * @private\n */\n _createEditNodeButton(locale) {\n let button = this._createButton('editNode', 'vis-button vis-edit', locale['editNode'] || this.options.locales['en']['editNode']);\n this.manipulationDiv.appendChild(button);\n this._bindHammerToDiv(button, this.editNode.bind(this));\n }\n\n /**\n *\n * @param {Locale} locale\n * @private\n */\n _createEditEdgeButton(locale) {\n let button = this._createButton('editEdge', 'vis-button vis-edit', locale['editEdge'] || this.options.locales['en']['editEdge']);\n this.manipulationDiv.appendChild(button);\n this._bindHammerToDiv(button, this.editEdgeMode.bind(this));\n }\n\n /**\n *\n * @param {Locale} locale\n * @private\n */\n _createDeleteButton(locale) {\n var deleteBtnClass;\n if (this.options.rtl) {\n deleteBtnClass = 'vis-button vis-delete-rtl';\n } else {\n deleteBtnClass = 'vis-button vis-delete';\n }\n let button = this._createButton('delete', deleteBtnClass, locale['del'] || this.options.locales['en']['del']);\n this.manipulationDiv.appendChild(button);\n this._bindHammerToDiv(button, this.deleteSelected.bind(this));\n }\n\n /**\n *\n * @param {Locale} locale\n * @private\n */\n _createBackButton(locale) {\n let button = this._createButton('back', 'vis-button vis-back', locale['back'] || this.options.locales['en']['back']);\n this.manipulationDiv.appendChild(button);\n this._bindHammerToDiv(button, this.showManipulatorToolbar.bind(this));\n }\n\n /**\n *\n * @param {number|string} id\n * @param {string} className\n * @param {label} label\n * @param {string} labelClassName\n * @returns {HTMLElement}\n * @private\n */\n _createButton(id, className, label, labelClassName = 'vis-label') {\n\n this.manipulationDOM[id+'Div'] = document.createElement('div');\n this.manipulationDOM[id+'Div'].className = className;\n this.manipulationDOM[id+'Label'] = document.createElement('div');\n this.manipulationDOM[id+'Label'].className = labelClassName;\n this.manipulationDOM[id+'Label'].innerHTML = label;\n this.manipulationDOM[id+'Div'].appendChild(this.manipulationDOM[id+'Label']);\n return this.manipulationDOM[id+'Div'];\n }\n\n /**\n *\n * @param {Label} label\n * @private\n */\n _createDescription(label) {\n this.manipulationDiv.appendChild(\n this._createButton('description', 'vis-button vis-none', label)\n );\n }\n\n // -------------------------- End of DOM functions for buttons ------------------------------//\n\n /**\n * this binds an event until cleanup by the clean functions.\n * @param {Event} event The event\n * @param {function} newFunction\n * @private\n */\n _temporaryBindEvent(event, newFunction) {\n this.temporaryEventFunctions.push({event:event, boundFunction:newFunction});\n this.body.emitter.on(event, newFunction);\n }\n\n /**\n * this overrides an UI function until cleanup by the clean function\n * @param {string} UIfunctionName\n * @param {function} newFunction\n * @private\n */\n _temporaryBindUI(UIfunctionName, newFunction) {\n if (this.body.eventListeners[UIfunctionName] !== undefined) {\n this.temporaryUIFunctions[UIfunctionName] = this.body.eventListeners[UIfunctionName];\n this.body.eventListeners[UIfunctionName] = newFunction;\n }\n else {\n throw new Error('This UI function does not exist. Typo? You tried: ' + UIfunctionName + ' possible are: ' + JSON.stringify(Object.keys(this.body.eventListeners)));\n }\n }\n\n /**\n * Restore the overridden UI functions to their original state.\n *\n * @private\n */\n _unbindTemporaryUIs() {\n for (let functionName in this.temporaryUIFunctions) {\n if (this.temporaryUIFunctions.hasOwnProperty(functionName)) {\n this.body.eventListeners[functionName] = this.temporaryUIFunctions[functionName];\n delete this.temporaryUIFunctions[functionName];\n }\n }\n this.temporaryUIFunctions = {};\n }\n\n /**\n * Unbind the events created by _temporaryBindEvent\n * @private\n */\n _unbindTemporaryEvents() {\n for (let i = 0; i < this.temporaryEventFunctions.length; i++) {\n let eventName = this.temporaryEventFunctions[i].event;\n let boundFunction = this.temporaryEventFunctions[i].boundFunction;\n this.body.emitter.off(eventName, boundFunction);\n }\n this.temporaryEventFunctions = [];\n }\n\n /**\n * Bind an hammer instance to a DOM element.\n *\n * @param {Element} domElement\n * @param {function} boundFunction\n */\n _bindHammerToDiv(domElement, boundFunction) {\n let hammer = new Hammer(domElement, {});\n hammerUtil.onTouch(hammer, boundFunction);\n this.manipulationHammers.push(hammer);\n }\n\n\n /**\n * Neatly clean up temporary edges and nodes\n * @private\n */\n _cleanupTemporaryNodesAndEdges() {\n // _clean temporary edges\n for (let i = 0; i < this.temporaryIds.edges.length; i++) {\n this.body.edges[this.temporaryIds.edges[i]].disconnect();\n delete this.body.edges[this.temporaryIds.edges[i]];\n let indexTempEdge = this.body.edgeIndices.indexOf(this.temporaryIds.edges[i]);\n if (indexTempEdge !== -1) {this.body.edgeIndices.splice(indexTempEdge,1);}\n }\n\n // _clean temporary nodes\n for (let i = 0; i < this.temporaryIds.nodes.length; i++) {\n delete this.body.nodes[this.temporaryIds.nodes[i]];\n let indexTempNode = this.body.nodeIndices.indexOf(this.temporaryIds.nodes[i]);\n if (indexTempNode !== -1) {this.body.nodeIndices.splice(indexTempNode,1);}\n }\n\n this.temporaryIds = {nodes: [], edges: []};\n }\n\n // ------------------------------------------ EDIT EDGE FUNCTIONS -----------------------------------------//\n\n /**\n * the touch is used to get the position of the initial click\n * @param {Event} event The event\n * @private\n */\n _controlNodeTouch(event) {\n this.selectionHandler.unselectAll();\n this.lastTouch = this.body.functions.getPointer(event.center);\n this.lastTouch.translation = util.extend({},this.body.view.translation); // copy the object\n }\n\n\n /**\n * the drag start is used to mark one of the control nodes as selected.\n * @param {Event} event The event\n * @private\n */\n _controlNodeDragStart(event) { // eslint-disable-line no-unused-vars\n let pointer = this.lastTouch;\n let pointerObj = this.selectionHandler._pointerToPositionObject(pointer);\n let from = this.body.nodes[this.temporaryIds.nodes[0]];\n let to = this.body.nodes[this.temporaryIds.nodes[1]];\n let edge = this.body.edges[this.edgeBeingEditedId];\n this.selectedControlNode = undefined;\n\n let fromSelect = from.isOverlappingWith(pointerObj);\n let toSelect = to.isOverlappingWith(pointerObj);\n\n if (fromSelect === true) {\n this.selectedControlNode = from;\n edge.edgeType.from = from;\n }\n else if (toSelect === true) {\n this.selectedControlNode = to;\n edge.edgeType.to = to;\n }\n\n // we use the selection to find the node that is being dragged. We explicitly select it here.\n if (this.selectedControlNode !== undefined) {\n this.selectionHandler.selectObject(this.selectedControlNode)\n }\n\n this.body.emitter.emit('_redraw');\n }\n\n /**\n * dragging the control nodes or the canvas\n * @param {Event} event The event\n * @private\n */\n _controlNodeDrag(event) {\n this.body.emitter.emit('disablePhysics');\n let pointer = this.body.functions.getPointer(event.center);\n let pos = this.canvas.DOMtoCanvas(pointer);\n if (this.selectedControlNode !== undefined) {\n this.selectedControlNode.x = pos.x;\n this.selectedControlNode.y = pos.y;\n }\n else {\n // if the drag was not started properly because the click started outside the network div, start it now.\n let diffX = pointer.x - this.lastTouch.x;\n let diffY = pointer.y - this.lastTouch.y;\n this.body.view.translation = {x:this.lastTouch.translation.x + diffX, y:this.lastTouch.translation.y + diffY};\n }\n this.body.emitter.emit('_redraw');\n }\n\n\n /**\n * connecting or restoring the control nodes.\n * @param {Event} event The event\n * @private\n */\n _controlNodeDragEnd(event) {\n let pointer = this.body.functions.getPointer(event.center);\n let pointerObj = this.selectionHandler._pointerToPositionObject(pointer);\n let edge = this.body.edges[this.edgeBeingEditedId];\n // if the node that was dragged is not a control node, return\n if (this.selectedControlNode === undefined) {\n return;\n }\n\n // we use the selection to find the node that is being dragged. We explicitly DEselect the control node here.\n this.selectionHandler.unselectAll();\n let overlappingNodeIds = this.selectionHandler._getAllNodesOverlappingWith(pointerObj);\n let node = undefined;\n for (let i = overlappingNodeIds.length-1; i >= 0; i--) {\n if (overlappingNodeIds[i] !== this.selectedControlNode.id) {\n node = this.body.nodes[overlappingNodeIds[i]];\n break;\n }\n }\n // perform the connection\n if (node !== undefined && this.selectedControlNode !== undefined) {\n if (node.isCluster === true) {\n alert(this.options.locales[this.options.locale]['createEdgeError'] || this.options.locales['en']['createEdgeError'])\n }\n else {\n let from = this.body.nodes[this.temporaryIds.nodes[0]];\n if (this.selectedControlNode.id === from.id) {\n this._performEditEdge(node.id, edge.to.id);\n }\n else {\n this._performEditEdge(edge.from.id, node.id);\n }\n }\n }\n else {\n edge.updateEdgeType();\n this.body.emitter.emit('restorePhysics');\n }\n\n this.body.emitter.emit('_redraw');\n }\n\n // ------------------------------------ END OF EDIT EDGE FUNCTIONS -----------------------------------------//\n\n\n\n // ------------------------------------------- ADD EDGE FUNCTIONS -----------------------------------------//\n /**\n * the function bound to the selection event. It checks if you want to connect a cluster and changes the description\n * to walk the user through the process.\n *\n * @param {Event} event\n * @private\n */\n _handleConnect(event) {\n // check to avoid double fireing of this function.\n if (new Date().valueOf() - this.touchTime > 100) {\n this.lastTouch = this.body.functions.getPointer(event.center);\n this.lastTouch.translation = util.extend({},this.body.view.translation); // copy the object\n\n let pointer = this.lastTouch;\n let node = this.selectionHandler.getNodeAt(pointer);\n\n if (node !== undefined) {\n if (node.isCluster === true) {\n alert(this.options.locales[this.options.locale]['createEdgeError'] || this.options.locales['en']['createEdgeError'])\n }\n else {\n // create a node the temporary line can look at\n let targetNode = this._getNewTargetNode(node.x,node.y);\n this.body.nodes[targetNode.id] = targetNode;\n this.body.nodeIndices.push(targetNode.id);\n\n // create a temporary edge\n let connectionEdge = this.body.functions.createEdge({\n id: 'connectionEdge' + util.randomUUID(),\n from: node.id,\n to: targetNode.id,\n physics: false,\n smooth: {\n enabled: true,\n type: 'continuous',\n roundness: 0.5\n }\n });\n this.body.edges[connectionEdge.id] = connectionEdge;\n this.body.edgeIndices.push(connectionEdge.id);\n\n this.temporaryIds.nodes.push(targetNode.id);\n this.temporaryIds.edges.push(connectionEdge.id);\n }\n }\n this.touchTime = new Date().valueOf();\n }\n }\n\n /**\n *\n * @param {Event} event\n * @private\n */\n _dragControlNode(event) {\n let pointer = this.body.functions.getPointer(event.center);\n\n var pointerObj = this.selectionHandler._pointerToPositionObject(pointer);\n // remember the edge id\n var connectFromId = undefined;\n if (this.temporaryIds.edges[0] !== undefined) {\n connectFromId = this.body.edges[this.temporaryIds.edges[0]].fromId;\n }\n\n // get the overlapping node but NOT the temporary node;\n var overlappingNodeIds = this.selectionHandler._getAllNodesOverlappingWith(pointerObj);\n var node = undefined;\n for (var i = overlappingNodeIds.length - 1; i >= 0; i--) {\n // if the node id is NOT a temporary node, accept the node.\n if (this.temporaryIds.nodes.indexOf(overlappingNodeIds[i]) === -1) {\n node = this.body.nodes[overlappingNodeIds[i]];\n break;\n }\n }\n \n event.controlEdge = { from: connectFromId, to: node ? node.id : undefined };\n this.selectionHandler._generateClickEvent('controlNodeDragging', event, pointer);\n\n if (this.temporaryIds.nodes[0] !== undefined) {\n let targetNode = this.body.nodes[this.temporaryIds.nodes[0]]; // there is only one temp node in the add edge mode.\n targetNode.x = this.canvas._XconvertDOMtoCanvas(pointer.x);\n targetNode.y = this.canvas._YconvertDOMtoCanvas(pointer.y);\n this.body.emitter.emit('_redraw');\n }\n else {\n let diffX = pointer.x - this.lastTouch.x;\n let diffY = pointer.y - this.lastTouch.y;\n this.body.view.translation = {x:this.lastTouch.translation.x + diffX, y:this.lastTouch.translation.y + diffY};\n }\n\n }\n\n\n /**\n * Connect the new edge to the target if one exists, otherwise remove temp line\n * @param {Event} event The event\n * @private\n */\n _finishConnect(event) {\n let pointer = this.body.functions.getPointer(event.center);\n let pointerObj = this.selectionHandler._pointerToPositionObject(pointer);\n\n // remember the edge id\n let connectFromId = undefined;\n if (this.temporaryIds.edges[0] !== undefined) {\n connectFromId = this.body.edges[this.temporaryIds.edges[0]].fromId;\n }\n\n // get the overlapping node but NOT the temporary node;\n let overlappingNodeIds = this.selectionHandler._getAllNodesOverlappingWith(pointerObj);\n let node = undefined;\n for (let i = overlappingNodeIds.length-1; i >= 0; i--) {\n // if the node id is NOT a temporary node, accept the node.\n if (this.temporaryIds.nodes.indexOf(overlappingNodeIds[i]) === -1) {\n node = this.body.nodes[overlappingNodeIds[i]];\n break;\n }\n }\n\n // clean temporary nodes and edges.\n this._cleanupTemporaryNodesAndEdges();\n\n // perform the connection\n if (node !== undefined) {\n if (node.isCluster === true) {\n alert(this.options.locales[this.options.locale]['createEdgeError'] || this.options.locales['en']['createEdgeError']);\n }\n else {\n if (this.body.nodes[connectFromId] !== undefined && this.body.nodes[node.id] !== undefined) {\n this._performAddEdge(connectFromId, node.id);\n }\n }\n }\n\n event.controlEdge = { from: connectFromId, to: node ? node.id : undefined };\n this.selectionHandler._generateClickEvent('controlNodeDragEnd', event, pointer);\n\n // No need to do _generateclickevent('dragEnd') here, the regular dragEnd event fires.\n this.body.emitter.emit('_redraw');\n }\n\n\n /**\n *\n * @param {Event} event\n * @private\n */\n _dragStartEdge(event) {\n let pointer = this.lastTouch;\n this.selectionHandler._generateClickEvent('dragStart', event, pointer, undefined, true);\n }\n\n // --------------------------------------- END OF ADD EDGE FUNCTIONS -------------------------------------//\n\n\n // ------------------------------ Performing all the actual data manipulation ------------------------//\n\n /**\n * Adds a node on the specified location\n *\n * @param {Object} clickData\n * @private\n */\n _performAddNode(clickData) {\n let defaultData = {\n id: util.randomUUID(),\n x: clickData.pointer.canvas.x,\n y: clickData.pointer.canvas.y,\n label: 'new'\n };\n\n if (typeof this.options.addNode === 'function') {\n if (this.options.addNode.length === 2) {\n this.options.addNode(defaultData, (finalizedData) => {\n if (finalizedData !== null && finalizedData !== undefined && this.inMode === 'addNode') { // if for whatever reason the mode has changes (due to dataset change) disregard the callback\n this.body.data.nodes.getDataSet().add(finalizedData);\n }\n this.showManipulatorToolbar();\n });\n }\n else {\n this.showManipulatorToolbar();\n throw new Error('The function for add does not support two arguments (data,callback)');\n }\n }\n else {\n this.body.data.nodes.getDataSet().add(defaultData);\n this.showManipulatorToolbar();\n }\n }\n\n\n /**\n * connect two nodes with a new edge.\n *\n * @param {Node.id} sourceNodeId\n * @param {Node.id} targetNodeId\n * @private\n */\n _performAddEdge(sourceNodeId, targetNodeId) {\n let defaultData = {from: sourceNodeId, to: targetNodeId};\n if (typeof this.options.addEdge === 'function') {\n if (this.options.addEdge.length === 2) {\n this.options.addEdge(defaultData, (finalizedData) => {\n if (finalizedData !== null && finalizedData !== undefined && this.inMode === 'addEdge') { // if for whatever reason the mode has changes (due to dataset change) disregard the callback\n this.body.data.edges.getDataSet().add(finalizedData);\n this.selectionHandler.unselectAll();\n this.showManipulatorToolbar();\n }\n });\n }\n else {\n throw new Error('The function for connect does not support two arguments (data,callback)');\n }\n }\n else {\n this.body.data.edges.getDataSet().add(defaultData);\n this.selectionHandler.unselectAll();\n this.showManipulatorToolbar();\n }\n }\n\n /**\n * connect two nodes with a new edge.\n *\n * @param {Node.id} sourceNodeId\n * @param {Node.id} targetNodeId\n * @private\n */\n _performEditEdge(sourceNodeId, targetNodeId) {\n let defaultData = {id: this.edgeBeingEditedId, from: sourceNodeId, to: targetNodeId, label: this.body.data.edges._data[this.edgeBeingEditedId].label };\n let eeFunct = this.options.editEdge;\n if (typeof eeFunct === 'object') {\n eeFunct = eeFunct.editWithoutDrag;\n }\n if (typeof eeFunct === 'function') {\n if (eeFunct.length === 2) {\n eeFunct(defaultData, (finalizedData) => {\n if (finalizedData === null || finalizedData === undefined || this.inMode !== 'editEdge') { // if for whatever reason the mode has changes (due to dataset change) disregard the callback) {\n this.body.edges[defaultData.id].updateEdgeType();\n this.body.emitter.emit('_redraw');\n this.showManipulatorToolbar();\n }\n else {\n this.body.data.edges.getDataSet().update(finalizedData);\n this.selectionHandler.unselectAll();\n this.showManipulatorToolbar();\n }\n });\n }\n else {\n throw new Error('The function for edit does not support two arguments (data, callback)');\n }\n }\n else {\n this.body.data.edges.getDataSet().update(defaultData);\n this.selectionHandler.unselectAll();\n this.showManipulatorToolbar();\n }\n }\n\n\n}\n\nexport default ManipulationSystem;\n","import './ColorPicker.css';\n\nimport Hammer from '../module/hammer';\nimport hammerUtil from '../hammerUtil';\nimport util from 'vis-util';\n\n\nvar htmlColors = {black: '#000000', navy: '#000080', darkblue: '#00008B', mediumblue: '#0000CD', blue: '#0000FF', darkgreen: '#006400', green: '#008000', teal: '#008080', darkcyan: '#008B8B', deepskyblue: '#00BFFF', darkturquoise: '#00CED1', mediumspringgreen: '#00FA9A', lime: '#00FF00', springgreen: '#00FF7F', aqua: '#00FFFF', cyan: '#00FFFF', midnightblue: '#191970', dodgerblue: '#1E90FF', lightseagreen: '#20B2AA', forestgreen: '#228B22', seagreen: '#2E8B57', darkslategray: '#2F4F4F', limegreen: '#32CD32', mediumseagreen: '#3CB371', turquoise: '#40E0D0', royalblue: '#4169E1', steelblue: '#4682B4', darkslateblue: '#483D8B', mediumturquoise: '#48D1CC', indigo: '#4B0082', darkolivegreen: '#556B2F', cadetblue: '#5F9EA0', cornflowerblue: '#6495ED', mediumaquamarine: '#66CDAA', dimgray: '#696969', slateblue: '#6A5ACD', olivedrab: '#6B8E23', slategray: '#708090', lightslategray: '#778899', mediumslateblue: '#7B68EE', lawngreen: '#7CFC00', chartreuse: '#7FFF00', aquamarine: '#7FFFD4', maroon: '#800000', purple: '#800080', olive: '#808000', gray: '#808080', skyblue: '#87CEEB', lightskyblue: '#87CEFA', blueviolet: '#8A2BE2', darkred: '#8B0000', darkmagenta: '#8B008B', saddlebrown: '#8B4513', darkseagreen: '#8FBC8F', lightgreen: '#90EE90', mediumpurple: '#9370D8', darkviolet: '#9400D3', palegreen: '#98FB98', darkorchid: '#9932CC', yellowgreen: '#9ACD32', sienna: '#A0522D', brown: '#A52A2A', darkgray: '#A9A9A9', lightblue: '#ADD8E6', greenyellow: '#ADFF2F', paleturquoise: '#AFEEEE', lightsteelblue: '#B0C4DE', powderblue: '#B0E0E6', firebrick: '#B22222', darkgoldenrod: '#B8860B', mediumorchid: '#BA55D3', rosybrown: '#BC8F8F', darkkhaki: '#BDB76B', silver: '#C0C0C0', mediumvioletred: '#C71585', indianred: '#CD5C5C', peru: '#CD853F', chocolate: '#D2691E', tan: '#D2B48C', lightgrey: '#D3D3D3', palevioletred: '#D87093', thistle: '#D8BFD8', orchid: '#DA70D6', goldenrod: '#DAA520', crimson: '#DC143C', gainsboro: '#DCDCDC', plum: '#DDA0DD', burlywood: '#DEB887', lightcyan: '#E0FFFF', lavender: '#E6E6FA', darksalmon: '#E9967A', violet: '#EE82EE', palegoldenrod: '#EEE8AA', lightcoral: '#F08080', khaki: '#F0E68C', aliceblue: '#F0F8FF', honeydew: '#F0FFF0', azure: '#F0FFFF', sandybrown: '#F4A460', wheat: '#F5DEB3', beige: '#F5F5DC', whitesmoke: '#F5F5F5', mintcream: '#F5FFFA', ghostwhite: '#F8F8FF', salmon: '#FA8072', antiquewhite: '#FAEBD7', linen: '#FAF0E6', lightgoldenrodyellow: '#FAFAD2', oldlace: '#FDF5E6', red: '#FF0000', fuchsia: '#FF00FF', magenta: '#FF00FF', deeppink: '#FF1493', orangered: '#FF4500', tomato: '#FF6347', hotpink: '#FF69B4', coral: '#FF7F50', darkorange: '#FF8C00', lightsalmon: '#FFA07A', orange: '#FFA500', lightpink: '#FFB6C1', pink: '#FFC0CB', gold: '#FFD700', peachpuff: '#FFDAB9', navajowhite: '#FFDEAD', moccasin: '#FFE4B5', bisque: '#FFE4C4', mistyrose: '#FFE4E1', blanchedalmond: '#FFEBCD', papayawhip: '#FFEFD5', lavenderblush: '#FFF0F5', seashell: '#FFF5EE', cornsilk: '#FFF8DC', lemonchiffon: '#FFFACD', floralwhite: '#FFFAF0', snow: '#FFFAFA', yellow: '#FFFF00', lightyellow: '#FFFFE0', ivory: '#FFFFF0', white: '#FFFFFF'};\n\n/**\n * @param {number} [pixelRatio=1]\n */\nclass ColorPicker {\n /**\n * @param {number} [pixelRatio=1]\n */\n constructor(pixelRatio = 1) {\n this.pixelRatio = pixelRatio;\n this.generated = false;\n this.centerCoordinates = {x:289/2, y:289/2};\n this.r = 289 * 0.49;\n this.color = {r:255,g:255,b:255,a:1.0};\n this.hueCircle = undefined;\n this.initialColor = {r:255,g:255,b:255,a:1.0};\n this.previousColor= undefined;\n this.applied = false;\n\n // bound by\n this.updateCallback = () => {};\n this.closeCallback = () => {};\n\n // create all DOM elements\n this._create();\n }\n\n\n /**\n * this inserts the colorPicker into a div from the DOM\n * @param {Element} container\n */\n insertTo(container) {\n if (this.hammer !== undefined) {\n this.hammer.destroy();\n this.hammer = undefined;\n }\n this.container = container;\n this.container.appendChild(this.frame);\n this._bindHammer();\n\n this._setSize();\n }\n\n /**\n * the callback is executed on apply and save. Bind it to the application\n * @param {function} callback\n */\n setUpdateCallback(callback) {\n if (typeof callback === 'function') {\n this.updateCallback = callback;\n }\n else {\n throw new Error(\"Function attempted to set as colorPicker update callback is not a function.\");\n }\n }\n\n /**\n * the callback is executed on apply and save. Bind it to the application\n * @param {function} callback\n */\n setCloseCallback(callback) {\n if (typeof callback === 'function') {\n this.closeCallback = callback;\n }\n else {\n throw new Error(\"Function attempted to set as colorPicker closing callback is not a function.\");\n }\n }\n\n /**\n *\n * @param {string} color\n * @returns {String}\n * @private\n */\n _isColorString(color) {\n if (typeof color === 'string') {\n return htmlColors[color];\n }\n }\n\n\n /**\n * Set the color of the colorPicker\n * Supported formats:\n * 'red' --> HTML color string\n * '#ffffff' --> hex string\n * 'rgb(255,255,255)' --> rgb string\n * 'rgba(255,255,255,1.0)' --> rgba string\n * {r:255,g:255,b:255} --> rgb object\n * {r:255,g:255,b:255,a:1.0} --> rgba object\n * @param {string|Object} color\n * @param {boolean} [setInitial=true]\n */\n setColor(color, setInitial = true) {\n if (color === 'none') {\n return;\n }\n\n let rgba;\n\n // if a html color shorthand is used, convert to hex\n var htmlColor = this._isColorString(color);\n if (htmlColor !== undefined) {\n color = htmlColor;\n }\n\n // check format\n if (util.isString(color) === true) {\n if (util.isValidRGB(color) === true) {\n let rgbaArray = color.substr(4).substr(0, color.length - 5).split(',');\n rgba = {r:rgbaArray[0], g:rgbaArray[1], b:rgbaArray[2], a:1.0};\n }\n else if (util.isValidRGBA(color) === true) {\n let rgbaArray = color.substr(5).substr(0, color.length - 6).split(',');\n rgba = {r:rgbaArray[0], g:rgbaArray[1], b:rgbaArray[2], a:rgbaArray[3]};\n }\n else if (util.isValidHex(color) === true) {\n let rgbObj = util.hexToRGB(color);\n rgba = {r:rgbObj.r, g:rgbObj.g, b:rgbObj.b, a:1.0};\n }\n }\n else {\n if (color instanceof Object) {\n if (color.r !== undefined && color.g !== undefined && color.b !== undefined) {\n let alpha = color.a !== undefined ? color.a : '1.0';\n rgba = {r:color.r, g:color.g, b:color.b, a:alpha};\n }\n }\n }\n\n // set color\n if (rgba === undefined) {\n throw new Error(\"Unknown color passed to the colorPicker. Supported are strings: rgb, hex, rgba. Object: rgb ({r:r,g:g,b:b,[a:a]}). Supplied: \" + JSON.stringify(color));\n }\n else {\n this._setColor(rgba, setInitial);\n }\n }\n\n\n /**\n * this shows the color picker.\n * The hue circle is constructed once and stored.\n */\n show() {\n if (this.closeCallback !== undefined) {\n this.closeCallback();\n this.closeCallback = undefined;\n }\n\n this.applied = false;\n this.frame.style.display = 'block';\n this._generateHueCircle();\n }\n\n // ------------------------------------------ PRIVATE ----------------------------- //\n\n /**\n * Hide the picker. Is called by the cancel button.\n * Optional boolean to store the previous color for easy access later on.\n * @param {boolean} [storePrevious=true]\n * @private\n */\n _hide(storePrevious = true) {\n // store the previous color for next time;\n if (storePrevious === true) {\n this.previousColor = util.extend({}, this.color);\n }\n\n if (this.applied === true) {\n this.updateCallback(this.initialColor);\n }\n\n this.frame.style.display = 'none';\n\n // call the closing callback, restoring the onclick method.\n // this is in a setTimeout because it will trigger the show again before the click is done.\n setTimeout(() => {\n if (this.closeCallback !== undefined) {\n this.closeCallback();\n this.closeCallback = undefined;\n }\n },0);\n }\n\n\n /**\n * bound to the save button. Saves and hides.\n * @private\n */\n _save() {\n this.updateCallback(this.color);\n this.applied = false;\n this._hide();\n }\n\n\n /**\n * Bound to apply button. Saves but does not close. Is undone by the cancel button.\n * @private\n */\n _apply() {\n this.applied = true;\n this.updateCallback(this.color);\n this._updatePicker(this.color);\n }\n\n\n /**\n * load the color from the previous session.\n * @private\n */\n _loadLast() {\n if (this.previousColor !== undefined) {\n this.setColor(this.previousColor, false);\n }\n else {\n alert(\"There is no last color to load...\");\n }\n }\n\n\n /**\n * set the color, place the picker\n * @param {Object} rgba\n * @param {boolean} [setInitial=true]\n * @private\n */\n _setColor(rgba, setInitial = true) {\n // store the initial color\n if (setInitial === true) {\n this.initialColor = util.extend({}, rgba);\n }\n\n this.color = rgba;\n let hsv = util.RGBToHSV(rgba.r, rgba.g, rgba.b);\n\n let angleConvert = 2 * Math.PI;\n let radius = this.r * hsv.s;\n let x = this.centerCoordinates.x + radius * Math.sin(angleConvert * hsv.h);\n let y = this.centerCoordinates.y + radius * Math.cos(angleConvert * hsv.h);\n\n this.colorPickerSelector.style.left = x - 0.5 * this.colorPickerSelector.clientWidth + 'px';\n this.colorPickerSelector.style.top = y - 0.5 * this.colorPickerSelector.clientHeight + 'px';\n\n this._updatePicker(rgba);\n }\n\n\n /**\n * bound to opacity control\n * @param {number} value\n * @private\n */\n _setOpacity(value) {\n this.color.a = value / 100;\n this._updatePicker(this.color);\n }\n\n\n /**\n * bound to brightness control\n * @param {number} value\n * @private\n */\n _setBrightness(value) {\n let hsv = util.RGBToHSV(this.color.r, this.color.g, this.color.b);\n hsv.v = value / 100;\n let rgba = util.HSVToRGB(hsv.h, hsv.s, hsv.v);\n rgba['a'] = this.color.a;\n this.color = rgba;\n this._updatePicker();\n }\n\n\n /**\n * update the color picker. A black circle overlays the hue circle to mimic the brightness decreasing.\n * @param {Object} rgba\n * @private\n */\n _updatePicker(rgba = this.color) {\n let hsv = util.RGBToHSV(rgba.r, rgba.g, rgba.b);\n let ctx = this.colorPickerCanvas.getContext('2d');\n if (this.pixelRation === undefined) {\n this.pixelRatio = (window.devicePixelRatio || 1) / (ctx.webkitBackingStorePixelRatio ||\n ctx.mozBackingStorePixelRatio ||\n ctx.msBackingStorePixelRatio ||\n ctx.oBackingStorePixelRatio ||\n ctx.backingStorePixelRatio || 1);\n }\n ctx.setTransform(this.pixelRatio, 0, 0, this.pixelRatio, 0, 0);\n\n // clear the canvas\n let w = this.colorPickerCanvas.clientWidth;\n let h = this.colorPickerCanvas.clientHeight;\n ctx.clearRect(0, 0, w, h);\n\n ctx.putImageData(this.hueCircle, 0,0);\n ctx.fillStyle = 'rgba(0,0,0,' + (1- hsv.v) + ')';\n ctx.circle(this.centerCoordinates.x, this.centerCoordinates.y, this.r);\n ctx.fill();\n\n this.brightnessRange.value = 100 * hsv.v;\n this.opacityRange.value = 100 * rgba.a;\n\n this.initialColorDiv.style.backgroundColor = 'rgba(' + this.initialColor.r + ',' + this.initialColor.g + ',' + this.initialColor.b + ',' + this.initialColor.a + ')';\n this.newColorDiv.style.backgroundColor = 'rgba(' + this.color.r + ',' + this.color.g + ',' + this.color.b + ',' + this.color.a + ')';\n }\n\n\n /**\n * used by create to set the size of the canvas.\n * @private\n */\n _setSize() {\n this.colorPickerCanvas.style.width = '100%';\n this.colorPickerCanvas.style.height = '100%';\n\n this.colorPickerCanvas.width = 289 * this.pixelRatio;\n this.colorPickerCanvas.height = 289 * this.pixelRatio;\n }\n\n\n /**\n * create all dom elements\n * TODO: cleanup, lots of similar dom elements\n * @private\n */\n _create() {\n this.frame = document.createElement('div');\n this.frame.className = 'vis-color-picker';\n\n this.colorPickerDiv = document.createElement('div');\n this.colorPickerSelector = document.createElement('div');\n this.colorPickerSelector.className = 'vis-selector';\n this.colorPickerDiv.appendChild(this.colorPickerSelector);\n\n this.colorPickerCanvas = document.createElement('canvas');\n this.colorPickerDiv.appendChild(this.colorPickerCanvas);\n\n if (!this.colorPickerCanvas.getContext) {\n let noCanvas = document.createElement( 'DIV' );\n noCanvas.style.color = 'red';\n noCanvas.style.fontWeight = 'bold' ;\n noCanvas.style.padding = '10px';\n noCanvas.innerHTML = 'Error: your browser does not support HTML canvas';\n this.colorPickerCanvas.appendChild(noCanvas);\n }\n else {\n let ctx = this.colorPickerCanvas.getContext(\"2d\");\n this.pixelRatio = (window.devicePixelRatio || 1) / (ctx.webkitBackingStorePixelRatio ||\n ctx.mozBackingStorePixelRatio ||\n ctx.msBackingStorePixelRatio ||\n ctx.oBackingStorePixelRatio ||\n ctx.backingStorePixelRatio || 1);\n this.colorPickerCanvas.getContext(\"2d\").setTransform(this.pixelRatio, 0, 0, this.pixelRatio, 0, 0);\n }\n\n this.colorPickerDiv.className = 'vis-color';\n\n this.opacityDiv = document.createElement('div');\n this.opacityDiv.className = 'vis-opacity';\n\n this.brightnessDiv = document.createElement('div');\n this.brightnessDiv.className = 'vis-brightness';\n\n this.arrowDiv = document.createElement('div');\n this.arrowDiv.className = 'vis-arrow';\n\n this.opacityRange = document.createElement('input');\n try {\n this.opacityRange.type = 'range'; // Not supported on IE9\n this.opacityRange.min = '0';\n this.opacityRange.max = '100';\n }\n // TODO: Add some error handling and remove this lint exception\n catch (err) {} // eslint-disable-line no-empty\n this.opacityRange.value = '100';\n this.opacityRange.className = 'vis-range';\n\n this.brightnessRange = document.createElement('input');\n try {\n this.brightnessRange.type = 'range'; // Not supported on IE9\n this.brightnessRange.min = '0';\n this.brightnessRange.max = '100';\n }\n // TODO: Add some error handling and remove this lint exception\n catch (err) {} // eslint-disable-line no-empty\n this.brightnessRange.value = '100';\n this.brightnessRange.className = 'vis-range';\n\n this.opacityDiv.appendChild(this.opacityRange);\n this.brightnessDiv.appendChild(this.brightnessRange);\n\n var me = this;\n this.opacityRange.onchange = function () {me._setOpacity(this.value);};\n this.opacityRange.oninput = function () {me._setOpacity(this.value);};\n this.brightnessRange.onchange = function () {me._setBrightness(this.value);};\n this.brightnessRange.oninput = function () {me._setBrightness(this.value);};\n\n this.brightnessLabel = document.createElement(\"div\");\n this.brightnessLabel.className = \"vis-label vis-brightness\";\n this.brightnessLabel.innerHTML = 'brightness:';\n\n this.opacityLabel = document.createElement(\"div\");\n this.opacityLabel.className = \"vis-label vis-opacity\";\n this.opacityLabel.innerHTML = 'opacity:';\n\n this.newColorDiv = document.createElement(\"div\");\n this.newColorDiv.className = \"vis-new-color\";\n this.newColorDiv.innerHTML = 'new';\n\n this.initialColorDiv = document.createElement(\"div\");\n this.initialColorDiv.className = \"vis-initial-color\";\n this.initialColorDiv.innerHTML = 'initial';\n\n this.cancelButton = document.createElement(\"div\");\n this.cancelButton.className = \"vis-button vis-cancel\";\n this.cancelButton.innerHTML = 'cancel';\n this.cancelButton.onclick = this._hide.bind(this, false);\n\n this.applyButton = document.createElement(\"div\");\n this.applyButton.className = \"vis-button vis-apply\";\n this.applyButton.innerHTML = 'apply';\n this.applyButton.onclick = this._apply.bind(this);\n\n this.saveButton = document.createElement(\"div\");\n this.saveButton.className = \"vis-button vis-save\";\n this.saveButton.innerHTML = 'save';\n this.saveButton.onclick = this._save.bind(this);\n\n this.loadButton = document.createElement(\"div\");\n this.loadButton.className = \"vis-button vis-load\";\n this.loadButton.innerHTML = 'load last';\n this.loadButton.onclick = this._loadLast.bind(this);\n\n this.frame.appendChild(this.colorPickerDiv);\n this.frame.appendChild(this.arrowDiv);\n this.frame.appendChild(this.brightnessLabel);\n this.frame.appendChild(this.brightnessDiv);\n this.frame.appendChild(this.opacityLabel);\n this.frame.appendChild(this.opacityDiv);\n this.frame.appendChild(this.newColorDiv);\n this.frame.appendChild(this.initialColorDiv);\n\n this.frame.appendChild(this.cancelButton);\n this.frame.appendChild(this.applyButton);\n this.frame.appendChild(this.saveButton);\n this.frame.appendChild(this.loadButton);\n }\n\n\n /**\n * bind hammer to the color picker\n * @private\n */\n _bindHammer() {\n this.drag = {};\n this.pinch = {};\n this.hammer = new Hammer(this.colorPickerCanvas);\n this.hammer.get('pinch').set({enable: true});\n\n hammerUtil.onTouch(this.hammer, (event) => {this._moveSelector(event)});\n this.hammer.on('tap', (event) => {this._moveSelector(event)});\n this.hammer.on('panstart', (event) => {this._moveSelector(event)});\n this.hammer.on('panmove', (event) => {this._moveSelector(event)});\n this.hammer.on('panend', (event) => {this._moveSelector(event)});\n }\n\n\n /**\n * generate the hue circle. This is relatively heavy (200ms) and is done only once on the first time it is shown.\n * @private\n */\n _generateHueCircle() {\n if (this.generated === false) {\n let ctx = this.colorPickerCanvas.getContext('2d');\n if (this.pixelRation === undefined) {\n this.pixelRatio = (window.devicePixelRatio || 1) / (ctx.webkitBackingStorePixelRatio ||\n ctx.mozBackingStorePixelRatio ||\n ctx.msBackingStorePixelRatio ||\n ctx.oBackingStorePixelRatio ||\n ctx.backingStorePixelRatio || 1);\n }\n ctx.setTransform(this.pixelRatio, 0, 0, this.pixelRatio, 0, 0);\n\n // clear the canvas\n let w = this.colorPickerCanvas.clientWidth;\n let h = this.colorPickerCanvas.clientHeight;\n ctx.clearRect(0, 0, w, h);\n\n\n // draw hue circle\n let x, y, hue, sat;\n this.centerCoordinates = {x: w * 0.5, y: h * 0.5};\n this.r = 0.49 * w;\n let angleConvert = (2 * Math.PI) / 360;\n let hfac = 1 / 360;\n let sfac = 1 / this.r;\n let rgb;\n for (hue = 0; hue < 360; hue++) {\n for (sat = 0; sat < this.r; sat++) {\n x = this.centerCoordinates.x + sat * Math.sin(angleConvert * hue);\n y = this.centerCoordinates.y + sat * Math.cos(angleConvert * hue);\n rgb = util.HSVToRGB(hue * hfac, sat * sfac, 1);\n ctx.fillStyle = 'rgb(' + rgb.r + ',' + rgb.g + ',' + rgb.b + ')';\n ctx.fillRect(x - 0.5, y - 0.5, 2, 2);\n }\n }\n ctx.strokeStyle = 'rgba(0,0,0,1)';\n ctx.circle(this.centerCoordinates.x, this.centerCoordinates.y, this.r);\n ctx.stroke();\n\n this.hueCircle = ctx.getImageData(0,0,w,h);\n }\n this.generated = true;\n }\n\n\n /**\n * move the selector. This is called by hammer functions.\n *\n * @param {Event} event The event\n * @private\n */\n _moveSelector(event) {\n let rect = this.colorPickerDiv.getBoundingClientRect();\n let left = event.center.x - rect.left;\n let top = event.center.y - rect.top;\n\n let centerY = 0.5 * this.colorPickerDiv.clientHeight;\n let centerX = 0.5 * this.colorPickerDiv.clientWidth;\n\n let x = left - centerX;\n let y = top - centerY;\n\n let angle = Math.atan2(x,y);\n let radius = 0.98 * Math.min(Math.sqrt(x * x + y * y), centerX);\n\n let newTop = Math.cos(angle) * radius + centerY;\n let newLeft = Math.sin(angle) * radius + centerX;\n\n this.colorPickerSelector.style.top = newTop - 0.5 * this.colorPickerSelector.clientHeight + 'px';\n this.colorPickerSelector.style.left = newLeft - 0.5 * this.colorPickerSelector.clientWidth + 'px';\n\n // set color\n let h = angle / (2 * Math.PI);\n h = h < 0 ? h + 1 : h;\n let s = radius / this.r;\n let hsv = util.RGBToHSV(this.color.r, this.color.g, this.color.b);\n hsv.h = h;\n hsv.s = s;\n let rgba = util.HSVToRGB(hsv.h, hsv.s, hsv.v);\n rgba['a'] = this.color.a;\n this.color = rgba;\n\n // update previews\n this.initialColorDiv.style.backgroundColor = 'rgba(' + this.initialColor.r + ',' + this.initialColor.g + ',' + this.initialColor.b + ',' + this.initialColor.a + ')';\n this.newColorDiv.style.backgroundColor = 'rgba(' + this.color.r + ',' + this.color.g + ',' + this.color.b + ',' + this.color.a + ')';\n }\n}\n\nexport default ColorPicker;\n","import './Configurator.css';\n\nimport util from 'vis-util';\n\nimport ColorPicker from './ColorPicker';\n\n/**\n * The way this works is for all properties of this.possible options, you can supply the property name in any form to list the options.\n * Boolean options are recognised as Boolean\n * Number options should be written as array: [default value, min value, max value, stepsize]\n * Colors should be written as array: ['color', '#ffffff']\n * Strings with should be written as array: [option1, option2, option3, ..]\n *\n * The options are matched with their counterparts in each of the modules and the values used in the configuration are\n */\nclass Configurator {\n /**\n * @param {Object} parentModule | the location where parentModule.setOptions() can be called\n * @param {Object} defaultContainer | the default container of the module\n * @param {Object} configureOptions | the fully configured and predefined options set found in allOptions.js\n * @param {number} pixelRatio | canvas pixel ratio\n */\n constructor(parentModule, defaultContainer, configureOptions, pixelRatio = 1) {\n this.parent = parentModule;\n this.changedOptions = [];\n this.container = defaultContainer;\n this.allowCreation = false;\n\n this.options = {};\n this.initialized = false;\n this.popupCounter = 0;\n this.defaultOptions = {\n enabled: false,\n filter: true,\n container: undefined,\n showButton: true\n };\n util.extend(this.options, this.defaultOptions);\n\n this.configureOptions = configureOptions;\n this.moduleOptions = {};\n this.domElements = [];\n this.popupDiv = {};\n this.popupLimit = 5;\n this.popupHistory = {};\n this.colorPicker = new ColorPicker(pixelRatio);\n this.wrapper = undefined;\n }\n\n\n /**\n * refresh all options.\n * Because all modules parse their options by themselves, we just use their options. We copy them here.\n *\n * @param {Object} options\n */\n setOptions(options) {\n if (options !== undefined) {\n // reset the popup history because the indices may have been changed.\n this.popupHistory = {};\n this._removePopup();\n\n let enabled = true;\n if (typeof options === 'string') {\n this.options.filter = options;\n }\n else if (options instanceof Array) {\n this.options.filter = options.join();\n }\n else if (typeof options === 'object') {\n if (options == null) {\n throw new TypeError('options cannot be null');\n }\n if (options.container !== undefined) {\n this.options.container = options.container;\n }\n if (options.filter !== undefined) {\n this.options.filter = options.filter;\n }\n if (options.showButton !== undefined) {\n this.options.showButton = options.showButton;\n }\n if (options.enabled !== undefined) {\n enabled = options.enabled;\n }\n }\n else if (typeof options === 'boolean') {\n this.options.filter = true;\n enabled = options;\n }\n else if (typeof options === 'function') {\n this.options.filter = options;\n enabled = true;\n }\n if (this.options.filter === false) {\n enabled = false;\n }\n\n this.options.enabled = enabled;\n }\n this._clean();\n }\n\n /**\n *\n * @param {Object} moduleOptions\n */\n setModuleOptions(moduleOptions) {\n this.moduleOptions = moduleOptions;\n if (this.options.enabled === true) {\n this._clean();\n if (this.options.container !== undefined) {\n this.container = this.options.container;\n }\n this._create();\n }\n }\n\n /**\n * Create all DOM elements\n * @private\n */\n _create() {\n this._clean();\n this.changedOptions = [];\n\n let filter = this.options.filter;\n let counter = 0;\n let show = false;\n for (let option in this.configureOptions) {\n if (this.configureOptions.hasOwnProperty(option)) {\n this.allowCreation = false;\n show = false;\n if (typeof filter === 'function') {\n show = filter(option,[]);\n show = show || this._handleObject(this.configureOptions[option], [option], true);\n }\n else if (filter === true || filter.indexOf(option) !== -1) {\n show = true;\n }\n\n if (show !== false) {\n this.allowCreation = true;\n\n // linebreak between categories\n if (counter > 0) {\n this._makeItem([]);\n }\n // a header for the category\n this._makeHeader(option);\n\n // get the sub options\n this._handleObject(this.configureOptions[option], [option]);\n }\n counter++;\n }\n }\n this._makeButton();\n this._push();\n //~ this.colorPicker.insertTo(this.container);\n }\n\n\n /**\n * draw all DOM elements on the screen\n * @private\n */\n _push() {\n this.wrapper = document.createElement('div');\n this.wrapper.className = 'vis-configuration-wrapper';\n this.container.appendChild(this.wrapper);\n for (var i = 0; i < this.domElements.length; i++) {\n this.wrapper.appendChild(this.domElements[i]);\n }\n\n this._showPopupIfNeeded()\n }\n\n\n /**\n * delete all DOM elements\n * @private\n */\n _clean() {\n for (var i = 0; i < this.domElements.length; i++) {\n this.wrapper.removeChild(this.domElements[i]);\n }\n\n if (this.wrapper !== undefined) {\n this.container.removeChild(this.wrapper);\n this.wrapper = undefined;\n }\n this.domElements = [];\n\n this._removePopup();\n }\n\n\n /**\n * get the value from the actualOptions if it exists\n * @param {array} path | where to look for the actual option\n * @returns {*}\n * @private\n */\n _getValue(path) {\n let base = this.moduleOptions;\n for (let i = 0; i < path.length; i++) {\n if (base[path[i]] !== undefined) {\n base = base[path[i]];\n }\n else {\n base = undefined;\n break;\n }\n }\n return base;\n }\n\n\n /**\n * all option elements are wrapped in an item\n * @param {Array} path | where to look for the actual option\n * @param {Array.} domElements\n * @returns {number}\n * @private\n */\n _makeItem(path, ...domElements) {\n if (this.allowCreation === true) {\n let item = document.createElement('div');\n item.className = 'vis-configuration vis-config-item vis-config-s' + path.length;\n domElements.forEach((element) => {\n item.appendChild(element);\n });\n this.domElements.push(item);\n return this.domElements.length;\n }\n return 0;\n }\n\n\n /**\n * header for major subjects\n * @param {string} name\n * @private\n */\n _makeHeader(name) {\n let div = document.createElement('div');\n div.className = 'vis-configuration vis-config-header';\n div.innerHTML = name;\n this._makeItem([],div);\n }\n\n\n /**\n * make a label, if it is an object label, it gets different styling.\n * @param {string} name\n * @param {array} path | where to look for the actual option\n * @param {string} objectLabel\n * @returns {HTMLElement}\n * @private\n */\n _makeLabel(name, path, objectLabel = false) {\n let div = document.createElement('div');\n div.className = 'vis-configuration vis-config-label vis-config-s' + path.length;\n if (objectLabel === true) {\n div.innerHTML = '' + name + ':';\n }\n else {\n div.innerHTML = name + ':';\n }\n return div;\n }\n\n\n /**\n * make a dropdown list for multiple possible string optoins\n * @param {Array.} arr\n * @param {number} value\n * @param {array} path | where to look for the actual option\n * @private\n */\n _makeDropdown(arr, value, path) {\n let select = document.createElement('select');\n select.className = 'vis-configuration vis-config-select';\n let selectedValue = 0;\n if (value !== undefined) {\n if (arr.indexOf(value) !== -1) {\n selectedValue = arr.indexOf(value);\n }\n }\n\n for (let i = 0; i < arr.length; i++) {\n let option = document.createElement('option');\n option.value = arr[i];\n if (i === selectedValue) {\n option.selected = 'selected';\n }\n option.innerHTML = arr[i];\n select.appendChild(option);\n }\n\n let me = this;\n select.onchange = function () {me._update(this.value, path);};\n\n let label = this._makeLabel(path[path.length-1], path);\n this._makeItem(path, label, select);\n }\n\n\n /**\n * make a range object for numeric options\n * @param {Array.} arr\n * @param {number} value\n * @param {array} path | where to look for the actual option\n * @private\n */\n _makeRange(arr, value, path) {\n let defaultValue = arr[0];\n let min = arr[1];\n let max = arr[2];\n let step = arr[3];\n let range = document.createElement('input');\n range.className = 'vis-configuration vis-config-range';\n try {\n range.type = 'range'; // not supported on IE9\n range.min = min;\n range.max = max;\n }\n // TODO: Add some error handling and remove this lint exception\n catch (err) {} // eslint-disable-line no-empty\n range.step = step;\n\n // set up the popup settings in case they are needed.\n let popupString = '';\n let popupValue = 0;\n\n if (value !== undefined) {\n let factor = 1.20;\n if (value < 0 && value * factor < min) {\n range.min = Math.ceil(value * factor);\n popupValue = range.min;\n popupString = 'range increased';\n }\n else if (value / factor < min) {\n range.min = Math.ceil(value / factor);\n popupValue = range.min;\n popupString = 'range increased';\n }\n if (value * factor > max && max !== 1) {\n range.max = Math.ceil(value * factor);\n popupValue = range.max;\n popupString = 'range increased';\n }\n range.value = value;\n }\n else {\n range.value = defaultValue;\n }\n\n let input = document.createElement('input');\n input.className = 'vis-configuration vis-config-rangeinput';\n input.value = range.value;\n\n var me = this;\n range.onchange = function () {input.value = this.value; me._update(Number(this.value), path);};\n range.oninput = function () {input.value = this.value; };\n\n let label = this._makeLabel(path[path.length-1], path);\n let itemIndex = this._makeItem(path, label, range, input);\n\n // if a popup is needed AND it has not been shown for this value, show it.\n if (popupString !== '' && this.popupHistory[itemIndex] !== popupValue) {\n this.popupHistory[itemIndex] = popupValue;\n this._setupPopup(popupString, itemIndex);\n }\n }\n\n /**\n * make a button object\n * @private\n */\n _makeButton() {\n if (this.options.showButton === true) {\n let generateButton = document.createElement('div');\n generateButton.className = 'vis-configuration vis-config-button';\n generateButton.innerHTML = 'generate options';\n generateButton.onclick = () => {this._printOptions();};\n generateButton.onmouseover = () => {generateButton.className = 'vis-configuration vis-config-button hover';};\n generateButton.onmouseout = () => {generateButton.className = 'vis-configuration vis-config-button';};\n\n this.optionsContainer = document.createElement('div');\n this.optionsContainer.className = 'vis-configuration vis-config-option-container';\n\n this.domElements.push(this.optionsContainer);\n this.domElements.push(generateButton);\n }\n }\n\n\n /**\n * prepare the popup\n * @param {string} string\n * @param {number} index\n * @private\n */\n _setupPopup(string, index) {\n if (this.initialized === true && this.allowCreation === true && this.popupCounter < this.popupLimit) {\n let div = document.createElement(\"div\");\n div.id = \"vis-configuration-popup\";\n div.className = \"vis-configuration-popup\";\n div.innerHTML = string;\n div.onclick = () => {this._removePopup()};\n this.popupCounter += 1;\n this.popupDiv = {html:div, index:index};\n }\n }\n\n\n /**\n * remove the popup from the dom\n * @private\n */\n _removePopup() {\n if (this.popupDiv.html !== undefined) {\n this.popupDiv.html.parentNode.removeChild(this.popupDiv.html);\n clearTimeout(this.popupDiv.hideTimeout);\n clearTimeout(this.popupDiv.deleteTimeout);\n this.popupDiv = {};\n }\n }\n\n\n /**\n * Show the popup if it is needed.\n * @private\n */\n _showPopupIfNeeded() {\n if (this.popupDiv.html !== undefined) {\n let correspondingElement = this.domElements[this.popupDiv.index];\n let rect = correspondingElement.getBoundingClientRect();\n this.popupDiv.html.style.left = rect.left + \"px\";\n this.popupDiv.html.style.top = rect.top - 30 + \"px\"; // 30 is the height;\n document.body.appendChild(this.popupDiv.html)\n this.popupDiv.hideTimeout = setTimeout(() => {\n this.popupDiv.html.style.opacity = 0;\n },1500);\n this.popupDiv.deleteTimeout = setTimeout(() => {\n this._removePopup();\n },1800)\n }\n }\n\n /**\n * make a checkbox for boolean options.\n * @param {number} defaultValue\n * @param {number} value\n * @param {array} path | where to look for the actual option\n * @private\n */\n _makeCheckbox(defaultValue, value, path) {\n var checkbox = document.createElement('input');\n checkbox.type = 'checkbox';\n checkbox.className = 'vis-configuration vis-config-checkbox';\n checkbox.checked = defaultValue;\n if (value !== undefined) {\n checkbox.checked = value;\n if (value !== defaultValue) {\n if (typeof defaultValue === 'object') {\n if (value !== defaultValue.enabled) {\n this.changedOptions.push({path:path, value:value});\n }\n }\n else {\n this.changedOptions.push({path:path, value:value});\n }\n }\n }\n\n let me = this;\n checkbox.onchange = function() {me._update(this.checked, path)};\n\n let label = this._makeLabel(path[path.length-1], path);\n this._makeItem(path, label, checkbox);\n }\n\n /**\n * make a text input field for string options.\n * @param {number} defaultValue\n * @param {number} value\n * @param {array} path | where to look for the actual option\n * @private\n */\n _makeTextInput(defaultValue, value, path) {\n var checkbox = document.createElement('input');\n checkbox.type = 'text';\n checkbox.className = 'vis-configuration vis-config-text';\n checkbox.value = value;\n if (value !== defaultValue) {\n this.changedOptions.push({path:path, value:value});\n }\n\n let me = this;\n checkbox.onchange = function() {me._update(this.value, path)};\n\n let label = this._makeLabel(path[path.length-1], path);\n this._makeItem(path, label, checkbox);\n }\n\n\n /**\n * make a color field with a color picker for color fields\n * @param {Array.} arr\n * @param {number} value\n * @param {array} path | where to look for the actual option\n * @private\n */\n _makeColorField(arr, value, path) {\n let defaultColor = arr[1];\n let div = document.createElement('div');\n value = value === undefined ? defaultColor : value;\n\n if (value !== 'none') {\n div.className = 'vis-configuration vis-config-colorBlock';\n div.style.backgroundColor = value;\n }\n else {\n div.className = 'vis-configuration vis-config-colorBlock none';\n }\n\n value = value === undefined ? defaultColor : value;\n div.onclick = () => {\n this._showColorPicker(value,div,path);\n };\n\n let label = this._makeLabel(path[path.length-1], path);\n this._makeItem(path,label, div);\n }\n\n\n /**\n * used by the color buttons to call the color picker.\n * @param {number} value\n * @param {HTMLElement} div\n * @param {array} path | where to look for the actual option\n * @private\n */\n _showColorPicker(value, div, path) {\n // clear the callback from this div\n div.onclick = function() {};\n\n this.colorPicker.insertTo(div);\n this.colorPicker.show();\n\n this.colorPicker.setColor(value);\n this.colorPicker.setUpdateCallback((color) => {\n let colorString = 'rgba(' + color.r + ',' + color.g + ',' + color.b + ',' + color.a + ')';\n div.style.backgroundColor = colorString;\n this._update(colorString,path);\n });\n\n // on close of the colorpicker, restore the callback.\n this.colorPicker.setCloseCallback(() => {\n div.onclick = () => {\n this._showColorPicker(value,div,path);\n };\n });\n }\n\n\n /**\n * parse an object and draw the correct items\n * @param {Object} obj\n * @param {array} [path=[]] | where to look for the actual option\n * @param {boolean} [checkOnly=false]\n * @returns {boolean}\n * @private\n */\n _handleObject(obj, path = [], checkOnly = false) {\n let show = false;\n let filter = this.options.filter;\n let visibleInSet = false;\n for (let subObj in obj) {\n if (obj.hasOwnProperty(subObj)) {\n show = true;\n let item = obj[subObj];\n let newPath = util.copyAndExtendArray(path, subObj);\n if (typeof filter === 'function') {\n show = filter(subObj,path);\n\n // if needed we must go deeper into the object.\n if (show === false) {\n if (!(item instanceof Array) && typeof item !== 'string' && typeof item !== 'boolean' && item instanceof Object) {\n this.allowCreation = false;\n show = this._handleObject(item, newPath, true);\n this.allowCreation = checkOnly === false;\n }\n }\n }\n\n if (show !== false) {\n visibleInSet = true;\n let value = this._getValue(newPath);\n\n if (item instanceof Array) {\n this._handleArray(item, value, newPath);\n }\n else if (typeof item === 'string') {\n this._makeTextInput(item, value, newPath);\n }\n else if (typeof item === 'boolean') {\n this._makeCheckbox(item, value, newPath);\n }\n else if (item instanceof Object) {\n // collapse the physics options that are not enabled\n let draw = true;\n if (path.indexOf('physics') !== -1) {\n if (this.moduleOptions.physics.solver !== subObj) {\n draw = false;\n }\n }\n\n if (draw === true) {\n // initially collapse options with an disabled enabled option.\n if (item.enabled !== undefined) {\n let enabledPath = util.copyAndExtendArray(newPath, 'enabled');\n let enabledValue = this._getValue(enabledPath);\n if (enabledValue === true) {\n let label = this._makeLabel(subObj, newPath, true);\n this._makeItem(newPath, label);\n visibleInSet = this._handleObject(item, newPath) || visibleInSet;\n }\n else {\n this._makeCheckbox(item, enabledValue, newPath);\n }\n }\n else {\n let label = this._makeLabel(subObj, newPath, true);\n this._makeItem(newPath, label);\n visibleInSet = this._handleObject(item, newPath) || visibleInSet;\n }\n }\n }\n else {\n console.error('dont know how to handle', item, subObj, newPath);\n }\n }\n }\n }\n return visibleInSet;\n }\n\n\n /**\n * handle the array type of option\n * @param {Array.} arr\n * @param {number} value\n * @param {array} path | where to look for the actual option\n * @private\n */\n _handleArray(arr, value, path) {\n if (typeof arr[0] === 'string' && arr[0] === 'color') {\n this._makeColorField(arr, value, path);\n if (arr[1] !== value) {this.changedOptions.push({path:path, value:value});}\n }\n else if (typeof arr[0] === 'string') {\n this._makeDropdown(arr, value, path);\n if (arr[0] !== value) {this.changedOptions.push({path:path, value:value});}\n }\n else if (typeof arr[0] === 'number') {\n this._makeRange(arr, value, path);\n if (arr[0] !== value) {this.changedOptions.push({path:path, value:Number(value)});}\n }\n }\n\n\n\n /**\n * called to update the network with the new settings.\n * @param {number} value\n * @param {array} path | where to look for the actual option\n * @private\n */\n _update(value, path) {\n let options = this._constructOptions(value,path);\n\n if (this.parent.body && this.parent.body.emitter && this.parent.body.emitter.emit) {\n this.parent.body.emitter.emit(\"configChange\", options);\n }\n this.initialized = true;\n this.parent.setOptions(options);\n }\n\n\n /**\n *\n * @param {string|Boolean} value\n * @param {Array.} path\n * @param {{}} optionsObj\n * @returns {{}}\n * @private\n */\n _constructOptions(value, path, optionsObj = {}) {\n let pointer = optionsObj;\n\n // when dropdown boxes can be string or boolean, we typecast it into correct types\n value = value === 'true' ? true : value;\n value = value === 'false' ? false : value;\n\n for (let i = 0; i < path.length; i++) {\n if (path[i] !== 'global') {\n if (pointer[path[i]] === undefined) {\n pointer[path[i]] = {};\n }\n if (i !== path.length - 1) {\n pointer = pointer[path[i]];\n }\n else {\n pointer[path[i]] = value;\n }\n }\n }\n return optionsObj;\n }\n\n /**\n * @private\n */\n _printOptions() {\n let options = this.getOptions();\n this.optionsContainer.innerHTML = '
var options = ' + JSON.stringify(options, null, 2) + '
';\n }\n\n /**\n *\n * @returns {{}} options\n */\n getOptions() {\n let options = {};\n for (var i = 0; i < this.changedOptions.length; i++) {\n this._constructOptions(this.changedOptions[i].value, this.changedOptions[i].path, options)\n }\n return options;\n }\n}\n\n\nexport default Configurator;\n","/**\n * This object contains all possible options. It will check if the types are correct, if required if the option is one\n * of the allowed values.\n *\n * __any__ means that the name of the property does not matter.\n * __type__ is a required field for all objects and contains the allowed types of all objects\n */\nlet string = 'string';\nlet bool = 'boolean';\nlet number = 'number';\nlet array = 'array';\nlet object = 'object'; // should only be in a __type__ property\nlet dom = 'dom';\nlet any = 'any';\n\n// List of endpoints\nlet endPoints = ['arrow', 'circle', 'bar'];\n\nlet allOptions = {\n configure: {\n enabled: { boolean: bool },\n filter: { boolean: bool, string, array, 'function': 'function' },\n container: { dom },\n showButton: { boolean: bool },\n __type__: { object, boolean: bool, string, array, 'function': 'function' }\n },\n edges: {\n arrows: {\n to: { enabled: { boolean: bool }, scaleFactor: { number }, type: { string: endPoints }, __type__: { object, boolean: bool } },\n middle: { enabled: { boolean: bool }, scaleFactor: { number }, type: { string: endPoints }, __type__: { object, boolean: bool } },\n from: { enabled: { boolean: bool }, scaleFactor: { number }, type: { string: endPoints }, __type__: { object, boolean: bool } },\n __type__: { string: ['from', 'to', 'middle'], object }\n },\n arrowStrikethrough: { boolean: bool },\n background: {\n enabled: { boolean: bool },\n color: { string },\n size: { number },\n dashes: { boolean: bool, array },\n __type__: { object, boolean: bool }\n },\n chosen: {\n label: { boolean: bool, 'function': 'function' },\n edge: { boolean: bool, 'function': 'function' },\n __type__: { object, boolean: bool }\n },\n color: {\n color: { string },\n highlight: { string },\n hover: { string },\n inherit: { string: ['from', 'to', 'both'], boolean: bool },\n opacity: { number },\n __type__: { object, string }\n },\n dashes: { boolean: bool, array },\n font: {\n color: { string },\n size: { number }, // px\n face: { string },\n background: { string },\n strokeWidth: { number }, // px\n strokeColor: { string },\n align: { string: ['horizontal', 'top', 'middle', 'bottom'] },\n vadjust: { number },\n multi: { boolean: bool, string },\n bold: {\n color: { string },\n size: { number }, // px\n face: { string },\n mod: { string },\n vadjust: { number },\n __type__: { object, string }\n },\n boldital: {\n color: { string },\n size: { number }, // px\n face: { string },\n mod: { string },\n vadjust: { number },\n __type__: { object, string }\n },\n ital: {\n color: { string },\n size: { number }, // px\n face: { string },\n mod: { string },\n vadjust: { number },\n __type__: { object, string }\n },\n mono: {\n color: { string },\n size: { number }, // px\n face: { string },\n mod: { string },\n vadjust: { number },\n __type__: { object, string }\n },\n __type__: { object, string }\n },\n hidden: { boolean: bool },\n hoverWidth: { 'function': 'function', number },\n label: { string, 'undefined': 'undefined' },\n labelHighlightBold: { boolean: bool },\n length: { number, 'undefined': 'undefined' },\n physics: { boolean: bool },\n scaling: {\n min: { number },\n max: { number },\n label: {\n enabled: { boolean: bool },\n min: { number },\n max: { number },\n maxVisible: { number },\n drawThreshold: { number },\n __type__: { object, boolean: bool }\n },\n customScalingFunction: { 'function': 'function' },\n __type__: { object }\n },\n selectionWidth: { 'function': 'function', number },\n selfReferenceSize: { number },\n shadow: {\n enabled: { boolean: bool },\n color: { string },\n size: { number },\n x: { number },\n y: { number },\n __type__: { object, boolean: bool }\n },\n smooth: {\n enabled: { boolean: bool },\n type: { string: ['dynamic', 'continuous', 'discrete', 'diagonalCross', 'straightCross', 'horizontal', 'vertical', 'curvedCW', 'curvedCCW', 'cubicBezier'] },\n roundness: { number },\n forceDirection: { string: ['horizontal', 'vertical', 'none'], boolean: bool },\n __type__: { object, boolean: bool }\n },\n title: { string, 'undefined': 'undefined' },\n width: { number },\n widthConstraint: {\n maximum: { number },\n __type__: { object, boolean: bool, number }\n },\n value: { number, 'undefined': 'undefined' },\n __type__: { object }\n },\n groups: {\n useDefaultGroups: { boolean: bool },\n __any__: 'get from nodes, will be overwritten below',\n __type__: { object }\n },\n interaction: {\n dragNodes: { boolean: bool },\n dragView: { boolean: bool },\n hideEdgesOnDrag: { boolean: bool },\n hideEdgesOnZoom: { boolean: bool },\n hideNodesOnDrag: { boolean: bool },\n hover: { boolean: bool },\n keyboard: {\n enabled: { boolean: bool },\n speed: { x: { number }, y: { number }, zoom: { number }, __type__: { object } },\n bindToWindow: { boolean: bool },\n __type__: { object, boolean: bool }\n },\n multiselect: { boolean: bool },\n navigationButtons: { boolean: bool },\n selectable: { boolean: bool },\n selectConnectedEdges: { boolean: bool },\n hoverConnectedEdges: { boolean: bool },\n tooltipDelay: { number },\n zoomView: { boolean: bool },\n zoomSpeed: { number },\n __type__: { object }\n },\n layout: {\n randomSeed: { 'undefined': 'undefined', number },\n improvedLayout: { boolean: bool },\n hierarchical: {\n enabled: { boolean: bool },\n levelSeparation: { number },\n nodeSpacing: { number },\n treeSpacing: { number },\n blockShifting: { boolean: bool },\n edgeMinimization: { boolean: bool },\n parentCentralization: { boolean: bool },\n direction: { string: ['UD', 'DU', 'LR', 'RL'] }, // UD, DU, LR, RL\n sortMethod: { string: ['hubsize', 'directed'] }, // hubsize, directed\n __type__: { object, boolean: bool }\n },\n __type__: { object }\n },\n manipulation: {\n enabled: { boolean: bool },\n initiallyActive: { boolean: bool },\n addNode: { boolean: bool, 'function': 'function' },\n addEdge: { boolean: bool, 'function': 'function' },\n editNode: { 'function': 'function' },\n editEdge: {\n editWithoutDrag: { 'function' : 'function' },\n __type__: {object, boolean: bool, 'function': 'function' }\n },\n deleteNode: { boolean: bool, 'function': 'function' },\n deleteEdge: { boolean: bool, 'function': 'function' },\n controlNodeStyle: 'get from nodes, will be overwritten below',\n __type__: { object, boolean: bool }\n },\n nodes: {\n borderWidth: { number },\n borderWidthSelected: { number, 'undefined': 'undefined' },\n brokenImage: { string, 'undefined': 'undefined' },\n chosen: {\n label: { boolean: bool, 'function': 'function' },\n node: { boolean: bool, 'function': 'function' },\n __type__: { object, boolean: bool }\n },\n color: {\n border: { string },\n background: { string },\n highlight: {\n border: { string },\n background: { string },\n __type__: { object, string }\n },\n hover: {\n border: { string },\n background: { string },\n __type__: { object, string }\n },\n __type__: { object, string }\n },\n fixed: {\n x: { boolean: bool },\n y: { boolean: bool },\n __type__: { object, boolean: bool }\n },\n font: {\n align: { string },\n color: { string },\n size: { number }, // px\n face: { string },\n background: { string },\n strokeWidth: { number }, // px\n strokeColor: { string },\n vadjust: { number },\n multi: { boolean: bool, string },\n bold: {\n color: { string },\n size: { number }, // px\n face: { string },\n mod: { string },\n vadjust: { number },\n __type__: { object, string }\n },\n boldital: {\n color: { string },\n size: { number }, // px\n face: { string },\n mod: { string },\n vadjust: { number },\n __type__: { object, string }\n },\n ital: {\n color: { string },\n size: { number }, // px\n face: { string },\n mod: { string },\n vadjust: { number },\n __type__: { object, string }\n },\n mono: {\n color: { string },\n size: { number }, // px\n face: { string },\n mod: { string },\n vadjust: { number },\n __type__: { object, string }\n },\n __type__: { object, string }\n },\n group: { string, number, 'undefined': 'undefined' },\n heightConstraint: {\n minimum: { number },\n valign: { string },\n __type__: { object, boolean: bool, number }\n },\n hidden: { boolean: bool },\n icon: {\n face: { string },\n code: { string }, //'\\uf007',\n size: { number }, //50,\n color: { string },\n __type__: { object }\n },\n id: { string, number },\n image: {\n selected: { string, 'undefined': 'undefined' }, // --> URL\n unselected: { string, 'undefined': 'undefined' }, // --> URL\n __type__: { object, string }\n },\n label: { string, 'undefined': 'undefined' },\n labelHighlightBold: { boolean: bool },\n level: { number, 'undefined': 'undefined' },\n margin: {\n top: { number },\n right: { number },\n bottom: { number },\n left: { number },\n __type__: { object, number }\n },\n mass: { number },\n physics: { boolean: bool },\n scaling: {\n min: { number },\n max: { number },\n label: {\n enabled: { boolean: bool },\n min: { number },\n max: { number },\n maxVisible: { number },\n drawThreshold: { number },\n __type__: { object, boolean: bool }\n },\n customScalingFunction: { 'function': 'function' },\n __type__: { object }\n },\n shadow: {\n enabled: { boolean: bool },\n color: { string },\n size: { number },\n x: { number },\n y: { number },\n __type__: { object, boolean: bool }\n },\n shape: { string: ['ellipse', 'circle', 'database', 'box', 'text', 'image', 'circularImage', 'diamond', 'dot', 'star', 'triangle', 'triangleDown', 'square', 'icon', 'hexagon'] },\n shapeProperties: {\n borderDashes: { boolean: bool, array },\n borderRadius: { number },\n interpolation: { boolean: bool },\n useImageSize: { boolean: bool },\n useBorderWithImage: { boolean: bool },\n __type__: { object }\n },\n size: { number },\n title: { string, dom, 'undefined': 'undefined' },\n value: { number, 'undefined': 'undefined' },\n widthConstraint: {\n minimum: { number },\n maximum: { number },\n __type__: { object, boolean: bool, number }\n },\n x: { number },\n y: { number },\n __type__: { object }\n },\n physics: {\n enabled: { boolean: bool },\n barnesHut: {\n gravitationalConstant: { number },\n centralGravity: { number },\n springLength: { number },\n springConstant: { number },\n damping: { number },\n avoidOverlap: { number },\n __type__: { object }\n },\n forceAtlas2Based: {\n gravitationalConstant: { number },\n centralGravity: { number },\n springLength: { number },\n springConstant: { number },\n damping: { number },\n avoidOverlap: { number },\n __type__: { object }\n },\n repulsion: {\n centralGravity: { number },\n springLength: { number },\n springConstant: { number },\n nodeDistance: { number },\n damping: { number },\n __type__: { object }\n },\n hierarchicalRepulsion: {\n centralGravity: { number },\n springLength: { number },\n springConstant: { number },\n nodeDistance: { number },\n damping: { number },\n __type__: { object }\n },\n maxVelocity: { number },\n minVelocity: { number }, // px/s\n solver: { string: ['barnesHut', 'repulsion', 'hierarchicalRepulsion', 'forceAtlas2Based'] },\n stabilization: {\n enabled: { boolean: bool },\n iterations: { number }, // maximum number of iteration to stabilize\n updateInterval: { number },\n onlyDynamicEdges: { boolean: bool },\n fit: { boolean: bool },\n __type__: { object, boolean: bool }\n },\n timestep: { number },\n adaptiveTimestep: { boolean: bool },\n __type__: { object, boolean: bool }\n },\n\n //globals :\n autoResize: { boolean: bool },\n clickToUse: { boolean: bool },\n locale: { string },\n locales: {\n __any__: { any },\n __type__: { object }\n },\n height: { string },\n width: { string },\n __type__: { object }\n};\n\nallOptions.groups.__any__ = allOptions.nodes;\nallOptions.manipulation.controlNodeStyle = allOptions.nodes;\n\n\nlet configureOptions = {\n nodes: {\n borderWidth: [1, 0, 10, 1],\n borderWidthSelected: [2, 0, 10, 1],\n color: {\n border: ['color', '#2B7CE9'],\n background: ['color', '#97C2FC'],\n highlight: {\n border: ['color', '#2B7CE9'],\n background: ['color', '#D2E5FF']\n },\n hover: {\n border: ['color', '#2B7CE9'],\n background: ['color', '#D2E5FF']\n }\n },\n fixed: {\n x: false,\n y: false\n },\n font: {\n color: ['color', '#343434'],\n size: [14, 0, 100, 1], // px\n face: ['arial', 'verdana', 'tahoma'],\n background: ['color', 'none'],\n strokeWidth: [0, 0, 50, 1], // px\n strokeColor: ['color', '#ffffff']\n },\n //group: 'string',\n hidden: false,\n labelHighlightBold: true,\n //icon: {\n // face: 'string', //'FontAwesome',\n // code: 'string', //'\\uf007',\n // size: [50, 0, 200, 1], //50,\n // color: ['color','#2B7CE9'] //'#aa00ff'\n //},\n //image: 'string', // --> URL\n physics: true,\n scaling: {\n min: [10, 0, 200, 1],\n max: [30, 0, 200, 1],\n label: {\n enabled: false,\n min: [14, 0, 200, 1],\n max: [30, 0, 200, 1],\n maxVisible: [30, 0, 200, 1],\n drawThreshold: [5, 0, 20, 1]\n }\n },\n shadow: {\n enabled: false,\n color: 'rgba(0,0,0,0.5)',\n size: [10, 0, 20, 1],\n x: [5, -30, 30, 1],\n y: [5, -30, 30, 1]\n },\n shape: ['ellipse', 'box', 'circle', 'database', 'diamond', 'dot', 'square', 'star', 'text', 'triangle', 'triangleDown','hexagon'],\n shapeProperties: {\n borderDashes: false,\n borderRadius: [6, 0, 20, 1],\n interpolation: true,\n useImageSize: false\n },\n size: [25, 0, 200, 1]\n },\n edges: {\n arrows: {\n to: { enabled: false, scaleFactor: [1, 0, 3, 0.05], type: 'arrow' },\n middle: { enabled: false, scaleFactor: [1, 0, 3, 0.05], type: 'arrow' },\n from: { enabled: false, scaleFactor: [1, 0, 3, 0.05], type: 'arrow' }\n },\n arrowStrikethrough: true,\n color: {\n color: ['color', '#848484'],\n highlight: ['color', '#848484'],\n hover: ['color', '#848484'],\n inherit: ['from', 'to', 'both', true, false],\n opacity: [1, 0, 1, 0.05]\n },\n dashes: false,\n font: {\n color: ['color', '#343434'],\n size: [14, 0, 100, 1], // px\n face: ['arial', 'verdana', 'tahoma'],\n background: ['color', 'none'],\n strokeWidth: [2, 0, 50, 1], // px\n strokeColor: ['color', '#ffffff'],\n align: ['horizontal', 'top', 'middle', 'bottom']\n },\n hidden: false,\n hoverWidth: [1.5, 0, 5, 0.1],\n labelHighlightBold: true,\n physics: true,\n scaling: {\n min: [1, 0, 100, 1],\n max: [15, 0, 100, 1],\n label: {\n enabled: true,\n min: [14, 0, 200, 1],\n max: [30, 0, 200, 1],\n maxVisible: [30, 0, 200, 1],\n drawThreshold: [5, 0, 20, 1]\n }\n },\n selectionWidth: [1.5, 0, 5, 0.1],\n selfReferenceSize: [20, 0, 200, 1],\n shadow: {\n enabled: false,\n color: 'rgba(0,0,0,0.5)',\n size: [10, 0, 20, 1],\n x: [5, -30, 30, 1],\n y: [5, -30, 30, 1]\n },\n smooth: {\n enabled: true,\n type: ['dynamic', 'continuous', 'discrete', 'diagonalCross', 'straightCross', 'horizontal', 'vertical', 'curvedCW', 'curvedCCW', 'cubicBezier'],\n forceDirection: ['horizontal', 'vertical', 'none'],\n roundness: [0.5, 0, 1, 0.05]\n },\n width: [1, 0, 30, 1]\n },\n layout: {\n //randomSeed: [0, 0, 500, 1],\n //improvedLayout: true,\n hierarchical: {\n enabled: false,\n levelSeparation: [150, 20, 500, 5],\n nodeSpacing: [100, 20, 500, 5],\n treeSpacing: [200, 20, 500, 5],\n blockShifting: true,\n edgeMinimization: true,\n parentCentralization: true,\n direction: ['UD', 'DU', 'LR', 'RL'], // UD, DU, LR, RL\n sortMethod: ['hubsize', 'directed'] // hubsize, directed\n }\n },\n interaction: {\n dragNodes: true,\n dragView: true,\n hideEdgesOnDrag: false,\n hideEdgesOnZoom: false,\n hideNodesOnDrag: false,\n hover: false,\n keyboard: {\n enabled: false,\n speed: { x: [10, 0, 40, 1], y: [10, 0, 40, 1], zoom: [0.02, 0, 0.1, 0.005] },\n bindToWindow: true\n },\n multiselect: false,\n navigationButtons: false,\n selectable: true,\n selectConnectedEdges: true,\n hoverConnectedEdges: true,\n tooltipDelay: [300, 0, 1000, 25],\n zoomView: true,\n zoomSpeed: [1, 1, 1, 1]\n },\n manipulation: {\n enabled: false,\n initiallyActive: false\n },\n physics: {\n enabled: true,\n barnesHut: {\n //theta: [0.5, 0.1, 1, 0.05],\n gravitationalConstant: [-2000, -30000, 0, 50],\n centralGravity: [0.3, 0, 10, 0.05],\n springLength: [95, 0, 500, 5],\n springConstant: [0.04, 0, 1.2, 0.005],\n damping: [0.09, 0, 1, 0.01],\n avoidOverlap: [0, 0, 1, 0.01]\n },\n forceAtlas2Based: {\n //theta: [0.5, 0.1, 1, 0.05],\n gravitationalConstant: [-50, -500, 0, 1],\n centralGravity: [0.01, 0, 1, 0.005],\n springLength: [95, 0, 500, 5],\n springConstant: [0.08, 0, 1.2, 0.005],\n damping: [0.4, 0, 1, 0.01],\n avoidOverlap: [0, 0, 1, 0.01]\n },\n repulsion: {\n centralGravity: [0.2, 0, 10, 0.05],\n springLength: [200, 0, 500, 5],\n springConstant: [0.05, 0, 1.2, 0.005],\n nodeDistance: [100, 0, 500, 5],\n damping: [0.09, 0, 1, 0.01]\n },\n hierarchicalRepulsion: {\n centralGravity: [0.2, 0, 10, 0.05],\n springLength: [100, 0, 500, 5],\n springConstant: [0.01, 0, 1.2, 0.005],\n nodeDistance: [120, 0, 500, 5],\n damping: [0.09, 0, 1, 0.01]\n },\n maxVelocity: [50, 0, 150, 1],\n minVelocity: [0.1, 0.01, 0.5, 0.01],\n solver: ['barnesHut', 'forceAtlas2Based', 'repulsion', 'hierarchicalRepulsion'],\n timestep: [0.5, 0.01, 1, 0.01],\n //adaptiveTimestep: true\n }\n};\n\nexport {allOptions, configureOptions};\n","/**\n * The Floyd–Warshall algorithm is an algorithm for finding shortest paths in\n * a weighted graph with positive or negative edge weights (but with no negative\n * cycles). - https://en.wikipedia.org/wiki/Floyd–Warshall_algorithm\n */\nclass FloydWarshall {\n /**\n * @ignore\n */\n constructor() {\n }\n\n /**\n *\n * @param {Object} body\n * @param {Array.} nodesArray\n * @param {Array.} edgesArray\n * @returns {{}}\n */\n getDistances(body, nodesArray, edgesArray) {\n let D_matrix = {};\n let edges = body.edges;\n\n // prepare matrix with large numbers\n for (let i = 0; i < nodesArray.length; i++) {\n let node = nodesArray[i];\n let cell = {};\n D_matrix[node] = cell;\n for (let j = 0; j < nodesArray.length; j++) {\n cell[nodesArray[j]] = (i == j ? 0 : 1e9);\n }\n }\n\n // put the weights for the edges in. This assumes unidirectionality.\n for (let i = 0; i < edgesArray.length; i++) {\n let edge = edges[edgesArray[i]];\n // edge has to be connected if it counts to the distances. If it is connected to inner clusters it will crash so we also check if it is in the D_matrix\n if (edge.connected === true && D_matrix[edge.fromId] !== undefined && D_matrix[edge.toId] !== undefined) {\n D_matrix[edge.fromId][edge.toId] = 1;\n D_matrix[edge.toId][edge.fromId] = 1;\n }\n }\n\n let nodeCount = nodesArray.length;\n\n // Adapted FloydWarshall based on unidirectionality to greatly reduce complexity.\n for (let k = 0; k < nodeCount; k++) {\n let knode = nodesArray[k];\n let kcolm = D_matrix[knode];\n for (let i = 0; i < nodeCount - 1; i++) {\n let inode = nodesArray[i];\n let icolm = D_matrix[inode];\n for (let j = i + 1; j < nodeCount; j++) {\n let jnode = nodesArray[j];\n let jcolm = D_matrix[jnode];\n\n let val = Math.min(icolm[jnode], icolm[knode] + kcolm[jnode]);\n icolm[jnode] = val;\n jcolm[inode] = val;\n }\n }\n }\n\n return D_matrix;\n }\n}\n\nexport default FloydWarshall;","// distance finding algorithm\nimport FloydWarshall from \"./components/algorithms/FloydWarshall.js\"\n\n\n/**\n * KamadaKawai positions the nodes initially based on\n *\n * \"AN ALGORITHM FOR DRAWING GENERAL UNDIRECTED GRAPHS\"\n * -- Tomihisa KAMADA and Satoru KAWAI in 1989\n *\n * Possible optimizations in the distance calculation can be implemented.\n */\nclass KamadaKawai {\n /**\n * @param {Object} body\n * @param {number} edgeLength\n * @param {number} edgeStrength\n */\n constructor(body, edgeLength, edgeStrength) {\n this.body = body;\n this.springLength = edgeLength;\n this.springConstant = edgeStrength;\n this.distanceSolver = new FloydWarshall();\n }\n\n /**\n * Not sure if needed but can be used to update the spring length and spring constant\n * @param {Object} options\n */\n setOptions(options) {\n if (options) {\n if (options.springLength) {\n this.springLength = options.springLength;\n }\n if (options.springConstant) {\n this.springConstant = options.springConstant;\n }\n }\n }\n\n\n /**\n * Position the system\n * @param {Array.} nodesArray\n * @param {Array.} edgesArray\n * @param {boolean} [ignoreClusters=false]\n */\n solve(nodesArray, edgesArray, ignoreClusters = false) {\n // get distance matrix\n let D_matrix = this.distanceSolver.getDistances(this.body, nodesArray, edgesArray); // distance matrix\n\n // get the L Matrix\n this._createL_matrix(D_matrix);\n\n // get the K Matrix\n this._createK_matrix(D_matrix);\n\n // initial E Matrix\n this._createE_matrix();\n\n // calculate positions\n let threshold = 0.01;\n let innerThreshold = 1;\n let iterations = 0;\n let maxIterations = Math.max(1000, Math.min(10 * this.body.nodeIndices.length, 6000));\n let maxInnerIterations = 5;\n\n let maxEnergy = 1e9;\n let highE_nodeId = 0, dE_dx = 0, dE_dy = 0, delta_m = 0, subIterations = 0;\n\n while (maxEnergy > threshold && iterations < maxIterations) {\n iterations += 1;\n [highE_nodeId, maxEnergy, dE_dx, dE_dy] = this._getHighestEnergyNode(ignoreClusters);\n delta_m = maxEnergy;\n subIterations = 0;\n while (delta_m > innerThreshold && subIterations < maxInnerIterations) {\n subIterations += 1;\n this._moveNode(highE_nodeId, dE_dx, dE_dy);\n [delta_m, dE_dx, dE_dy] = this._getEnergy(highE_nodeId);\n }\n }\n }\n\n /**\n * get the node with the highest energy\n * @param {boolean} ignoreClusters\n * @returns {number[]}\n * @private\n */\n _getHighestEnergyNode(ignoreClusters) {\n let nodesArray = this.body.nodeIndices;\n let nodes = this.body.nodes;\n let maxEnergy = 0;\n let maxEnergyNodeId = nodesArray[0];\n let dE_dx_max = 0, dE_dy_max = 0;\n\n for (let nodeIdx = 0; nodeIdx < nodesArray.length; nodeIdx++) {\n let m = nodesArray[nodeIdx];\n // by not evaluating nodes with predefined positions we should only move nodes that have no positions.\n if ((nodes[m].predefinedPosition === false || nodes[m].isCluster === true && ignoreClusters === true) || nodes[m].options.fixed.x === true || nodes[m].options.fixed.y === true) {\n let [delta_m,dE_dx,dE_dy] = this._getEnergy(m);\n if (maxEnergy < delta_m) {\n maxEnergy = delta_m;\n maxEnergyNodeId = m;\n dE_dx_max = dE_dx;\n dE_dy_max = dE_dy;\n }\n }\n }\n\n return [maxEnergyNodeId, maxEnergy, dE_dx_max, dE_dy_max];\n }\n\n /**\n * calculate the energy of a single node\n * @param {Node.id} m\n * @returns {number[]}\n * @private\n */\n _getEnergy(m) {\n let [dE_dx,dE_dy] = this.E_sums[m];\n let delta_m = Math.sqrt(Math.pow(dE_dx, 2) + Math.pow(dE_dy, 2));\n return [delta_m, dE_dx, dE_dy];\n }\n\n /**\n * move the node based on it's energy\n * the dx and dy are calculated from the linear system proposed by Kamada and Kawai\n * @param {number} m\n * @param {number} dE_dx\n * @param {number} dE_dy\n * @private\n */\n _moveNode(m, dE_dx, dE_dy) {\n let nodesArray = this.body.nodeIndices;\n let nodes = this.body.nodes;\n let d2E_dx2 = 0;\n let d2E_dxdy = 0;\n let d2E_dy2 = 0;\n\n let x_m = nodes[m].x;\n let y_m = nodes[m].y;\n let km = this.K_matrix[m];\n let lm = this.L_matrix[m];\n\n for (let iIdx = 0; iIdx < nodesArray.length; iIdx++) {\n let i = nodesArray[iIdx];\n if (i !== m) {\n let x_i = nodes[i].x;\n let y_i = nodes[i].y;\n let kmat = km[i];\n let lmat = lm[i];\n let denominator = 1.0 / Math.pow(Math.pow(x_m - x_i, 2) + Math.pow(y_m - y_i, 2), 1.5);\n d2E_dx2 += kmat * (1 - lmat * Math.pow(y_m - y_i, 2) * denominator);\n d2E_dxdy += kmat * (lmat * (x_m - x_i) * (y_m - y_i) * denominator);\n d2E_dy2 += kmat * (1 - lmat * Math.pow(x_m - x_i, 2) * denominator);\n }\n }\n // make the variable names easier to make the solving of the linear system easier to read\n let A = d2E_dx2, B = d2E_dxdy, C = dE_dx, D = d2E_dy2, E = dE_dy;\n\n // solve the linear system for dx and dy\n let dy = (C / A + E / B) / (B / A - D / B);\n let dx = -(B * dy + C) / A;\n\n // move the node\n nodes[m].x += dx;\n nodes[m].y += dy;\n\n // Recalculate E_matrix (should be incremental)\n this._updateE_matrix(m);\n }\n\n\n /**\n * Create the L matrix: edge length times shortest path\n * @param {Object} D_matrix\n * @private\n */\n _createL_matrix(D_matrix) {\n let nodesArray = this.body.nodeIndices;\n let edgeLength = this.springLength;\n\n this.L_matrix = [];\n for (let i = 0; i < nodesArray.length; i++) {\n this.L_matrix[nodesArray[i]] = {};\n for (let j = 0; j < nodesArray.length; j++) {\n this.L_matrix[nodesArray[i]][nodesArray[j]] = edgeLength * D_matrix[nodesArray[i]][nodesArray[j]];\n }\n }\n }\n\n\n /**\n * Create the K matrix: spring constants times shortest path\n * @param {Object} D_matrix\n * @private\n */\n _createK_matrix(D_matrix) {\n let nodesArray = this.body.nodeIndices;\n let edgeStrength = this.springConstant;\n\n this.K_matrix = [];\n for (let i = 0; i < nodesArray.length; i++) {\n this.K_matrix[nodesArray[i]] = {};\n for (let j = 0; j < nodesArray.length; j++) {\n this.K_matrix[nodesArray[i]][nodesArray[j]] = edgeStrength * Math.pow(D_matrix[nodesArray[i]][nodesArray[j]], -2);\n }\n }\n }\n\n /**\n * Create matrix with all energies between nodes\n * @private\n */\n _createE_matrix() {\n let nodesArray = this.body.nodeIndices;\n let nodes = this.body.nodes;\n this.E_matrix = {};\n this.E_sums = {};\n for (let mIdx = 0; mIdx < nodesArray.length; mIdx++) {\n this.E_matrix[nodesArray[mIdx]] = [];\n }\n for (let mIdx = 0; mIdx < nodesArray.length; mIdx++) {\n let m = nodesArray[mIdx];\n let x_m = nodes[m].x;\n let y_m = nodes[m].y;\n let dE_dx = 0;\n let dE_dy = 0;\n for (let iIdx = mIdx; iIdx < nodesArray.length; iIdx++) {\n let i = nodesArray[iIdx];\n if (i !== m) {\n let x_i = nodes[i].x;\n let y_i = nodes[i].y;\n let denominator = 1.0 / Math.sqrt(Math.pow(x_m - x_i, 2) + Math.pow(y_m - y_i, 2));\n this.E_matrix[m][iIdx] = [\n this.K_matrix[m][i] * ((x_m - x_i) - this.L_matrix[m][i] * (x_m - x_i) * denominator),\n this.K_matrix[m][i] * ((y_m - y_i) - this.L_matrix[m][i] * (y_m - y_i) * denominator)\n ];\n this.E_matrix[i][mIdx] = this.E_matrix[m][iIdx];\n dE_dx += this.E_matrix[m][iIdx][0];\n dE_dy += this.E_matrix[m][iIdx][1];\n }\n }\n //Store sum\n this.E_sums[m] = [dE_dx, dE_dy];\n }\n }\n\n /**\n * Update method, just doing single column (rows are auto-updated) (update all sums)\n *\n * @param {number} m\n * @private\n */\n _updateE_matrix(m) {\n let nodesArray = this.body.nodeIndices;\n let nodes = this.body.nodes;\n let colm = this.E_matrix[m];\n let kcolm = this.K_matrix[m];\n let lcolm = this.L_matrix[m];\n let x_m = nodes[m].x;\n let y_m = nodes[m].y;\n let dE_dx = 0;\n let dE_dy = 0;\n for (let iIdx = 0; iIdx < nodesArray.length; iIdx++) {\n let i = nodesArray[iIdx];\n if (i !== m) {\n //Keep old energy value for sum modification below\n let cell = colm[iIdx];\n let oldDx = cell[0];\n let oldDy = cell[1];\n\n //Calc new energy:\n let x_i = nodes[i].x;\n let y_i = nodes[i].y;\n let denominator = 1.0 / Math.sqrt(Math.pow(x_m - x_i, 2) + Math.pow(y_m - y_i, 2));\n let dx = kcolm[i] * ((x_m - x_i) - lcolm[i] * (x_m - x_i) * denominator);\n let dy = kcolm[i] * ((y_m - y_i) - lcolm[i] * (y_m - y_i) * denominator);\n colm[iIdx] = [dx, dy];\n dE_dx += dx;\n dE_dy += dy;\n\n //add new energy to sum of each column\n let sum = this.E_sums[i];\n sum[0] += (dx-oldDx);\n sum[1] += (dy-oldDy);\n }\n }\n //Store sum at -1 index\n this.E_sums[m] = [dE_dx, dE_dy];\n }\n}\n\nexport default KamadaKawai;","// Load custom shapes into CanvasRenderingContext2D\nimport './shapes';\n\nimport Emitter from 'component-emitter';\nimport util from 'vis-util';\nimport dotparser from './dotparser';\nimport * as gephiParser from './gephiParser';\nimport Activator from '../shared/Activator';\nimport locales from './locales';\n\nimport Images from './Images';\nimport Groups from './modules/Groups';\nimport NodesHandler from './modules/NodesHandler';\nimport EdgesHandler from './modules/EdgesHandler';\nimport PhysicsEngine from './modules/PhysicsEngine';\nimport ClusterEngine from './modules/Clustering';\nimport CanvasRenderer from './modules/CanvasRenderer';\nimport Canvas from './modules/Canvas';\nimport View from './modules/View';\nimport InteractionHandler from './modules/InteractionHandler';\nimport SelectionHandler from \"./modules/SelectionHandler\";\nimport LayoutEngine from \"./modules/LayoutEngine\";\nimport ManipulationSystem from \"./modules/ManipulationSystem\";\nimport Configurator from \"./../shared/Configurator\";\nimport { Validator, printStyle } from \"./../shared/Validator\";\nimport {allOptions, configureOptions} from './options.js';\nimport KamadaKawai from \"./modules/KamadaKawai.js\";\n\n\n/**\n * Create a network visualization, displaying nodes and edges.\n *\n * @param {Element} container The DOM element in which the Network will\n * be created. Normally a div element.\n * @param {Object} data An object containing parameters\n * {Array} nodes\n * {Array} edges\n * @param {Object} options Options\n * @constructor Network\n */\nexport function Network(container, data, options) {\n if (!(this instanceof Network)) {\n throw new SyntaxError('Constructor must be called with the new operator');\n }\n\n // set constant values\n this.options = {};\n this.defaultOptions = {\n locale: 'en',\n locales: locales,\n clickToUse: false\n };\n util.extend(this.options, this.defaultOptions);\n\n /**\n * Containers for nodes and edges.\n *\n * 'edges' and 'nodes' contain the full definitions of all the network elements.\n * 'nodeIndices' and 'edgeIndices' contain the id's of the active elements.\n *\n * The distinction is important, because a defined node need not be active, i.e.\n * visible on the canvas. This happens in particular when clusters are defined, in\n * that case there will be nodes and edges not displayed.\n * The bottom line is that all code with actions related to visibility, *must* use\n * 'nodeIndices' and 'edgeIndices', not 'nodes' and 'edges' directly.\n */\n this.body = {\n container: container,\n\n // See comment above for following fields\n nodes: {},\n nodeIndices: [],\n edges: {},\n edgeIndices: [],\n\n emitter: {\n on: this.on.bind(this),\n off: this.off.bind(this),\n emit: this.emit.bind(this),\n once: this.once.bind(this)\n },\n eventListeners: {\n onTap: function() {},\n onTouch: function() {},\n onDoubleTap: function() {},\n onHold: function() {},\n onDragStart: function() {},\n onDrag: function() {},\n onDragEnd: function() {},\n onMouseWheel: function() {},\n onPinch: function() {},\n onMouseMove: function() {},\n onRelease: function() {},\n onContext: function() {}\n },\n data: {\n nodes: null, // A DataSet or DataView\n edges: null // A DataSet or DataView\n },\n functions: {\n createNode: function() {},\n createEdge: function() {},\n getPointer: function() {}\n },\n modules: {},\n view: {\n scale: 1,\n translation: {x: 0, y: 0}\n }\n };\n\n\n\n // bind the event listeners\n this.bindEventListeners();\n\n // setting up all modules\n this.images = new Images(() => this.body.emitter.emit(\"_requestRedraw\")); // object with images\n this.groups = new Groups(); // object with groups\n this.canvas = new Canvas(this.body); // DOM handler\n this.selectionHandler = new SelectionHandler(this.body, this.canvas); // Selection handler\n this.interactionHandler = new InteractionHandler(this.body, this.canvas, this.selectionHandler); // Interaction handler handles all the hammer bindings (that are bound by canvas), key\n this.view = new View(this.body, this.canvas); // camera handler, does animations and zooms\n this.renderer = new CanvasRenderer(this.body, this.canvas); // renderer, starts renderloop, has events that modules can hook into\n this.physics = new PhysicsEngine(this.body); // physics engine, does all the simulations\n this.layoutEngine = new LayoutEngine(this.body); // layout engine for inital layout and hierarchical layout\n this.clustering = new ClusterEngine(this.body); // clustering api\n this.manipulation = new ManipulationSystem(this.body, this.canvas, this.selectionHandler); // data manipulation system\n\n this.nodesHandler = new NodesHandler(this.body, this.images, this.groups, this.layoutEngine); // Handle adding, deleting and updating of nodes as well as global options\n this.edgesHandler = new EdgesHandler(this.body, this.images, this.groups); // Handle adding, deleting and updating of edges as well as global options\n\n this.body.modules[\"kamadaKawai\"] = new KamadaKawai(this.body,150,0.05); // Layouting algorithm.\n this.body.modules[\"clustering\"] = this.clustering;\n\n // create the DOM elements\n this.canvas._create();\n\n // apply options\n this.setOptions(options);\n\n // load data (the disable start variable will be the same as the enabled clustering)\n this.setData(data);\n\n}\n\n// Extend Network with an Emitter mixin\nEmitter(Network.prototype);\n\n\n/**\n * Set options\n * @param {Object} options\n */\nNetwork.prototype.setOptions = function (options) {\n if (options === null) {\n options = undefined; // This ensures that options handling doesn't crash in the handling\n }\n\n if (options !== undefined) {\n let errorFound = Validator.validate(options, allOptions);\n if (errorFound === true) {\n console.log('%cErrors have been found in the supplied options object.', printStyle);\n }\n\n // copy the global fields over\n let fields = ['locale','locales','clickToUse'];\n util.selectiveDeepExtend(fields,this.options, options);\n\n // the hierarchical system can adapt the edges and the physics to it's own options because not all combinations work with the hierarichical system.\n options = this.layoutEngine.setOptions(options.layout, options);\n\n this.canvas.setOptions(options); // options for canvas are in globals\n\n // pass the options to the modules\n this.groups.setOptions(options.groups);\n this.nodesHandler.setOptions(options.nodes);\n this.edgesHandler.setOptions(options.edges);\n this.physics.setOptions(options.physics);\n this.manipulation.setOptions(options.manipulation, options, this.options); // manipulation uses the locales in the globals\n\n this.interactionHandler.setOptions(options.interaction);\n this.renderer.setOptions(options.interaction); // options for rendering are in interaction\n this.selectionHandler.setOptions(options.interaction); // options for selection are in interaction\n\n // reload the settings of the nodes to apply changes in groups that are not referenced by pointer.\n if (options.groups !== undefined) {\n this.body.emitter.emit(\"refreshNodes\");\n }\n // these two do not have options at the moment, here for completeness\n //this.view.setOptions(options.view);\n //this.clustering.setOptions(options.clustering);\n\n if ('configure' in options) {\n if (!this.configurator) {\n this.configurator = new Configurator(this, this.body.container, configureOptions, this.canvas.pixelRatio);\n }\n\n this.configurator.setOptions(options.configure);\n }\n\n // if the configuration system is enabled, copy all options and put them into the config system\n if (this.configurator && this.configurator.options.enabled === true) {\n let networkOptions = {nodes:{},edges:{},layout:{},interaction:{},manipulation:{},physics:{},global:{}};\n util.deepExtend(networkOptions.nodes, this.nodesHandler.options);\n util.deepExtend(networkOptions.edges, this.edgesHandler.options);\n util.deepExtend(networkOptions.layout, this.layoutEngine.options);\n // load the selectionHandler and render default options in to the interaction group\n util.deepExtend(networkOptions.interaction, this.selectionHandler.options);\n util.deepExtend(networkOptions.interaction, this.renderer.options);\n\n util.deepExtend(networkOptions.interaction, this.interactionHandler.options);\n util.deepExtend(networkOptions.manipulation, this.manipulation.options);\n util.deepExtend(networkOptions.physics, this.physics.options);\n\n // load globals into the global object\n util.deepExtend(networkOptions.global, this.canvas.options);\n util.deepExtend(networkOptions.global, this.options);\n\n this.configurator.setModuleOptions(networkOptions);\n }\n\n // handle network global options\n if (options.clickToUse !== undefined) {\n if (options.clickToUse === true) {\n if (this.activator === undefined) {\n this.activator = new Activator(this.canvas.frame);\n this.activator.on('change', () => {this.body.emitter.emit(\"activate\")});\n }\n }\n else {\n if (this.activator !== undefined) {\n this.activator.destroy();\n delete this.activator;\n }\n this.body.emitter.emit(\"activate\");\n }\n }\n else {\n this.body.emitter.emit(\"activate\");\n }\n\n this.canvas.setSize();\n // start the physics simulation. Can be safely called multiple times.\n this.body.emitter.emit(\"startSimulation\");\n }\n};\n\n\n/**\n * Update the visible nodes and edges list with the most recent node state.\n *\n * Visible nodes are stored in this.body.nodeIndices.\n * Visible edges are stored in this.body.edgeIndices.\n * A node or edges is visible if it is not hidden or clustered.\n *\n * @private\n */\nNetwork.prototype._updateVisibleIndices = function () {\n let nodes = this.body.nodes;\n let edges = this.body.edges;\n this.body.nodeIndices = [];\n this.body.edgeIndices = [];\n\n for (let nodeId in nodes) {\n if (nodes.hasOwnProperty(nodeId)) {\n if (!this.clustering._isClusteredNode(nodeId) && nodes[nodeId].options.hidden === false) {\n this.body.nodeIndices.push(nodes[nodeId].id);\n }\n }\n }\n\n for (let edgeId in edges) {\n if (edges.hasOwnProperty(edgeId)) {\n let edge = edges[edgeId];\n\n // It can happen that this is executed *after* a node edge has been removed,\n // but *before* the edge itself has been removed. Taking this into account.\n let fromNode = nodes[edge.fromId];\n let toNode = nodes[edge.toId];\n let edgeNodesPresent = (fromNode !== undefined) && (toNode !== undefined);\n\n let isVisible =\n !this.clustering._isClusteredEdge(edgeId)\n && edge.options.hidden === false\n && edgeNodesPresent\n && fromNode.options.hidden === false // Also hidden if any of its connecting nodes are hidden\n && toNode.options.hidden === false; // idem\n\n if (isVisible) {\n this.body.edgeIndices.push(edge.id);\n }\n }\n }\n};\n\n\n/**\n * Bind all events\n */\nNetwork.prototype.bindEventListeners = function () {\n // This event will trigger a rebuilding of the cache everything.\n // Used when nodes or edges have been added or removed.\n this.body.emitter.on(\"_dataChanged\", () => {\n this.edgesHandler._updateState();\n this.body.emitter.emit(\"_dataUpdated\");\n });\n\n // this is called when options of EXISTING nodes or edges have changed.\n this.body.emitter.on(\"_dataUpdated\", () => {\n // Order important in following block\n this.clustering._updateState();\n this._updateVisibleIndices();\n\n this._updateValueRange(this.body.nodes);\n this._updateValueRange(this.body.edges);\n // start simulation (can be called safely, even if already running)\n this.body.emitter.emit(\"startSimulation\");\n this.body.emitter.emit(\"_requestRedraw\");\n });\n};\n\n\n/**\n * Set nodes and edges, and optionally options as well.\n *\n * @param {Object} data Object containing parameters:\n * {Array | DataSet | DataView} [nodes] Array with nodes\n * {Array | DataSet | DataView} [edges] Array with edges\n * {String} [dot] String containing data in DOT format\n * {String} [gephi] String containing data in gephi JSON format\n * {Options} [options] Object with options\n */\nNetwork.prototype.setData = function (data) {\n // reset the physics engine.\n this.body.emitter.emit(\"resetPhysics\");\n this.body.emitter.emit(\"_resetData\");\n\n // unselect all to ensure no selections from old data are carried over.\n this.selectionHandler.unselectAll();\n\n if (data && data.dot && (data.nodes || data.edges)) {\n throw new SyntaxError('Data must contain either parameter \"dot\" or ' +\n ' parameter pair \"nodes\" and \"edges\", but not both.');\n }\n\n // set options\n this.setOptions(data && data.options);\n // set all data\n if (data && data.dot) {\n console.log('The dot property has been deprecated. Please use the static convertDot method to convert DOT into vis.network format and use the normal data format with nodes and edges. This converter is used like this: var data = vis.network.convertDot(dotString);');\n // parse DOT file\n var dotData = dotparser.DOTToGraph(data.dot);\n this.setData(dotData);\n return;\n }\n else if (data && data.gephi) {\n // parse DOT file\n console.log('The gephi property has been deprecated. Please use the static convertGephi method to convert gephi into vis.network format and use the normal data format with nodes and edges. This converter is used like this: var data = vis.network.convertGephi(gephiJson);');\n var gephiData = gephiParser.parseGephi(data.gephi);\n this.setData(gephiData);\n return;\n }\n else {\n this.nodesHandler.setData(data && data.nodes, true);\n this.edgesHandler.setData(data && data.edges, true);\n }\n\n // emit change in data\n this.body.emitter.emit(\"_dataChanged\");\n\n // emit data loaded\n this.body.emitter.emit(\"_dataLoaded\");\n\n // find a stable position or start animating to a stable position\n this.body.emitter.emit(\"initPhysics\");\n};\n\n\n/**\n * Cleans up all bindings of the network, removing it fully from the memory IF the variable is set to null after calling this function.\n * var network = new vis.Network(..);\n * network.destroy();\n * network = null;\n */\nNetwork.prototype.destroy = function () {\n this.body.emitter.emit(\"destroy\");\n // clear events\n this.body.emitter.off();\n this.off();\n\n // delete modules\n delete this.groups;\n delete this.canvas;\n delete this.selectionHandler;\n delete this.interactionHandler;\n delete this.view;\n delete this.renderer;\n delete this.physics;\n delete this.layoutEngine;\n delete this.clustering;\n delete this.manipulation;\n delete this.nodesHandler;\n delete this.edgesHandler;\n delete this.configurator;\n delete this.images;\n\n for (var nodeId in this.body.nodes) {\n if (!this.body.nodes.hasOwnProperty(nodeId)) continue;\n delete this.body.nodes[nodeId];\n }\n\n for (var edgeId in this.body.edges) {\n if (!this.body.edges.hasOwnProperty(edgeId)) continue;\n delete this.body.edges[edgeId];\n }\n\n // remove the container and everything inside it recursively\n util.recursiveDOMDelete(this.body.container);\n};\n\n\n/**\n * Update the values of all object in the given array according to the current\n * value range of the objects in the array.\n * @param {Object} obj An object containing a set of Edges or Nodes\n * The objects must have a method getValue() and\n * setValueRange(min, max).\n * @private\n */\nNetwork.prototype._updateValueRange = function (obj) {\n var id;\n\n // determine the range of the objects\n var valueMin = undefined;\n var valueMax = undefined;\n var valueTotal = 0;\n for (id in obj) {\n if (obj.hasOwnProperty(id)) {\n var value = obj[id].getValue();\n if (value !== undefined) {\n valueMin = (valueMin === undefined) ? value : Math.min(value, valueMin);\n valueMax = (valueMax === undefined) ? value : Math.max(value, valueMax);\n valueTotal += value;\n }\n }\n }\n\n // adjust the range of all objects\n if (valueMin !== undefined && valueMax !== undefined) {\n for (id in obj) {\n if (obj.hasOwnProperty(id)) {\n obj[id].setValueRange(valueMin, valueMax, valueTotal);\n }\n }\n }\n};\n\n\n/**\n * Returns true when the Network is active.\n * @returns {boolean}\n */\nNetwork.prototype.isActive = function () {\n return !this.activator || this.activator.active;\n};\n\n\nNetwork.prototype.setSize = function() {return this.canvas.setSize.apply(this.canvas,arguments);};\nNetwork.prototype.canvasToDOM = function() {return this.canvas.canvasToDOM.apply(this.canvas,arguments);};\nNetwork.prototype.DOMtoCanvas = function() {return this.canvas.DOMtoCanvas.apply(this.canvas,arguments);};\n\n\n/**\n * Nodes can be in clusters. Clusters can also be in clusters. This function returns and array of\n * nodeIds showing where the node is.\n *\n * If any nodeId in the chain, especially the first passed in as a parameter, is not present in\n * the current nodes list, an empty array is returned.\n *\n * Example:\n * cluster 'A' contains cluster 'B',\n * cluster 'B' contains cluster 'C',\n * cluster 'C' contains node 'fred'.\n * `jsnetwork.clustering.findNode('fred')` will return `['A','B','C','fred']`.\n *\n * @param {string|number} nodeId\n * @returns {Array}\n */\nNetwork.prototype.findNode = function() {return this.clustering.findNode.apply(this.clustering,arguments);};\n\n\nNetwork.prototype.isCluster = function() {return this.clustering.isCluster.apply(this.clustering,arguments);};\nNetwork.prototype.openCluster = function() {return this.clustering.openCluster.apply(this.clustering,arguments);};\nNetwork.prototype.cluster = function() {return this.clustering.cluster.apply(this.clustering,arguments);};\nNetwork.prototype.getNodesInCluster = function() {return this.clustering.getNodesInCluster.apply(this.clustering,arguments);};\nNetwork.prototype.clusterByConnection = function() {return this.clustering.clusterByConnection.apply(this.clustering,arguments);};\nNetwork.prototype.clusterByHubsize = function() {return this.clustering.clusterByHubsize.apply(this.clustering,arguments);};\n\n/**\n * This method will cluster all nodes with 1 edge with their respective connected node.\n * The options object is explained in full
below.\n *\n * @param {object} [options]\n * @returns {undefined}\n */\nNetwork.prototype.clusterOutliers = function() {return this.clustering.clusterOutliers.apply(this.clustering,arguments);};\n\nNetwork.prototype.getSeed = function() {return this.layoutEngine.getSeed.apply(this.layoutEngine,arguments);};\nNetwork.prototype.enableEditMode = function() {return this.manipulation.enableEditMode.apply(this.manipulation,arguments);};\nNetwork.prototype.disableEditMode = function() {return this.manipulation.disableEditMode.apply(this.manipulation,arguments);};\nNetwork.prototype.addNodeMode = function() {return this.manipulation.addNodeMode.apply(this.manipulation,arguments);};\nNetwork.prototype.editNode = function() {return this.manipulation.editNode.apply(this.manipulation,arguments);};\nNetwork.prototype.editNodeMode = function() {console.log(\"Deprecated: Please use editNode instead of editNodeMode.\"); return this.manipulation.editNode.apply(this.manipulation,arguments);};\nNetwork.prototype.addEdgeMode = function() {return this.manipulation.addEdgeMode.apply(this.manipulation,arguments);};\nNetwork.prototype.editEdgeMode = function() {return this.manipulation.editEdgeMode.apply(this.manipulation,arguments);};\nNetwork.prototype.deleteSelected = function() {return this.manipulation.deleteSelected.apply(this.manipulation,arguments);};\nNetwork.prototype.getPositions = function() {return this.nodesHandler.getPositions.apply(this.nodesHandler,arguments);};\nNetwork.prototype.storePositions = function() {return this.nodesHandler.storePositions.apply(this.nodesHandler,arguments);};\nNetwork.prototype.moveNode = function() {return this.nodesHandler.moveNode.apply(this.nodesHandler,arguments);};\nNetwork.prototype.getBoundingBox = function() {return this.nodesHandler.getBoundingBox.apply(this.nodesHandler,arguments);};\nNetwork.prototype.getConnectedNodes = function(objectId) {\n if (this.body.nodes[objectId] !== undefined) {\n return this.nodesHandler.getConnectedNodes.apply(this.nodesHandler,arguments);\n }\n else {\n return this.edgesHandler.getConnectedNodes.apply(this.edgesHandler,arguments);\n }\n};\nNetwork.prototype.getConnectedEdges = function() {return this.nodesHandler.getConnectedEdges.apply(this.nodesHandler,arguments);};\nNetwork.prototype.startSimulation = function() {return this.physics.startSimulation.apply(this.physics,arguments);};\nNetwork.prototype.stopSimulation = function() {return this.physics.stopSimulation.apply(this.physics,arguments);};\nNetwork.prototype.stabilize = function() {return this.physics.stabilize.apply(this.physics,arguments);};\nNetwork.prototype.getSelection = function() {return this.selectionHandler.getSelection.apply(this.selectionHandler,arguments);};\nNetwork.prototype.setSelection = function() {return this.selectionHandler.setSelection.apply(this.selectionHandler,arguments);};\nNetwork.prototype.getSelectedNodes = function() {return this.selectionHandler.getSelectedNodes.apply(this.selectionHandler,arguments);};\nNetwork.prototype.getSelectedEdges = function() {return this.selectionHandler.getSelectedEdges.apply(this.selectionHandler,arguments);};\nNetwork.prototype.getNodeAt = function() {\n var node = this.selectionHandler.getNodeAt.apply(this.selectionHandler,arguments);\n if (node !== undefined && node.id !== undefined) {\n return node.id;\n }\n return node;\n};\nNetwork.prototype.getEdgeAt = function() {\n var edge = this.selectionHandler.getEdgeAt.apply(this.selectionHandler,arguments);\n if (edge !== undefined && edge.id !== undefined) {\n return edge.id;\n }\n return edge;\n };\nNetwork.prototype.selectNodes = function() {return this.selectionHandler.selectNodes.apply(this.selectionHandler,arguments);};\nNetwork.prototype.selectEdges = function() {return this.selectionHandler.selectEdges.apply(this.selectionHandler,arguments);};\nNetwork.prototype.unselectAll = function() {\n this.selectionHandler.unselectAll.apply(this.selectionHandler,arguments);\n this.redraw();\n};\nNetwork.prototype.redraw = function() {return this.renderer.redraw.apply(this.renderer,arguments);};\nNetwork.prototype.getScale = function() {return this.view.getScale.apply(this.view,arguments);};\nNetwork.prototype.getViewPosition = function() {return this.view.getViewPosition.apply(this.view,arguments);};\nNetwork.prototype.fit = function() {return this.view.fit.apply(this.view,arguments);};\nNetwork.prototype.moveTo = function() {return this.view.moveTo.apply(this.view,arguments);};\nNetwork.prototype.focus = function() {return this.view.focus.apply(this.view,arguments);};\nNetwork.prototype.releaseNode = function() {return this.view.releaseNode.apply(this.view,arguments);};\nNetwork.prototype.getOptionsFromConfigurator = function() {\n let options = {};\n if (this.configurator) {\n options = this.configurator.getOptions.apply(this.configurator);\n }\n return options;\n};\n\n\n\nexport default Network;\n","// DOM utility methods\n\n/**\n * this prepares the JSON container for allocating SVG elements\n * @param {Object} JSONcontainer\n * @private\n */\nexports.prepareElements = function(JSONcontainer) {\n // cleanup the redundant svgElements;\n for (var elementType in JSONcontainer) {\n if (JSONcontainer.hasOwnProperty(elementType)) {\n JSONcontainer[elementType].redundant = JSONcontainer[elementType].used;\n JSONcontainer[elementType].used = [];\n }\n }\n};\n\n/**\n * this cleans up all the unused SVG elements. By asking for the parentNode, we only need to supply the JSON container from\n * which to remove the redundant elements.\n *\n * @param {Object} JSONcontainer\n * @private\n */\nexports.cleanupElements = function(JSONcontainer) {\n // cleanup the redundant svgElements;\n for (var elementType in JSONcontainer) {\n if (JSONcontainer.hasOwnProperty(elementType)) {\n if (JSONcontainer[elementType].redundant) {\n for (var i = 0; i < JSONcontainer[elementType].redundant.length; i++) {\n JSONcontainer[elementType].redundant[i].parentNode.removeChild(JSONcontainer[elementType].redundant[i]);\n }\n JSONcontainer[elementType].redundant = [];\n }\n }\n }\n};\n\n/**\n * Ensures that all elements are removed first up so they can be recreated cleanly\n * @param {Object} JSONcontainer\n */\nexports.resetElements = function(JSONcontainer) {\n exports.prepareElements(JSONcontainer);\n exports.cleanupElements(JSONcontainer);\n exports.prepareElements(JSONcontainer);\n};\n\n/**\n * Allocate or generate an SVG element if needed. Store a reference to it in the JSON container and draw it in the svgContainer\n * the JSON container and the SVG container have to be supplied so other svg containers (like the legend) can use this.\n *\n * @param {string} elementType\n * @param {Object} JSONcontainer\n * @param {Object} svgContainer\n * @returns {Element}\n * @private\n */\nexports.getSVGElement = function (elementType, JSONcontainer, svgContainer) {\n var element;\n // allocate SVG element, if it doesnt yet exist, create one.\n if (JSONcontainer.hasOwnProperty(elementType)) { // this element has been created before\n // check if there is an redundant element\n if (JSONcontainer[elementType].redundant.length > 0) {\n element = JSONcontainer[elementType].redundant[0];\n JSONcontainer[elementType].redundant.shift();\n }\n else {\n // create a new element and add it to the SVG\n element = document.createElementNS('http://www.w3.org/2000/svg', elementType);\n svgContainer.appendChild(element);\n }\n }\n else {\n // create a new element and add it to the SVG, also create a new object in the svgElements to keep track of it.\n element = document.createElementNS('http://www.w3.org/2000/svg', elementType);\n JSONcontainer[elementType] = {used: [], redundant: []};\n svgContainer.appendChild(element);\n }\n JSONcontainer[elementType].used.push(element);\n return element;\n};\n\n\n/**\n * Allocate or generate an SVG element if needed. Store a reference to it in the JSON container and draw it in the svgContainer\n * the JSON container and the SVG container have to be supplied so other svg containers (like the legend) can use this.\n *\n * @param {string} elementType\n * @param {Object} JSONcontainer\n * @param {Element} DOMContainer\n * @param {Element} insertBefore\n * @returns {*}\n */\nexports.getDOMElement = function (elementType, JSONcontainer, DOMContainer, insertBefore) {\n var element;\n // allocate DOM element, if it doesnt yet exist, create one.\n if (JSONcontainer.hasOwnProperty(elementType)) { // this element has been created before\n // check if there is an redundant element\n if (JSONcontainer[elementType].redundant.length > 0) {\n element = JSONcontainer[elementType].redundant[0];\n JSONcontainer[elementType].redundant.shift();\n }\n else {\n // create a new element and add it to the SVG\n element = document.createElement(elementType);\n if (insertBefore !== undefined) {\n DOMContainer.insertBefore(element, insertBefore);\n }\n else {\n DOMContainer.appendChild(element);\n }\n }\n }\n else {\n // create a new element and add it to the SVG, also create a new object in the svgElements to keep track of it.\n element = document.createElement(elementType);\n JSONcontainer[elementType] = {used: [], redundant: []};\n if (insertBefore !== undefined) {\n DOMContainer.insertBefore(element, insertBefore);\n }\n else {\n DOMContainer.appendChild(element);\n }\n }\n JSONcontainer[elementType].used.push(element);\n return element;\n};\n\n\n\n\n/**\n * Draw a point object. This is a separate function because it can also be called by the legend.\n * The reason the JSONcontainer and the target SVG svgContainer have to be supplied is so the legend can use these functions\n * as well.\n *\n * @param {number} x\n * @param {number} y\n * @param {Object} groupTemplate: A template containing the necessary information to draw the datapoint e.g., {style: 'circle', size: 5, className: 'className' }\n * @param {Object} JSONcontainer\n * @param {Object} svgContainer\n * @param {Object} labelObj\n * @returns {vis.PointItem}\n */\nexports.drawPoint = function(x, y, groupTemplate, JSONcontainer, svgContainer, labelObj) {\n var point;\n if (groupTemplate.style == 'circle') {\n point = exports.getSVGElement('circle', JSONcontainer, svgContainer);\n point.setAttributeNS(null, \"cx\", x);\n point.setAttributeNS(null, \"cy\", y);\n point.setAttributeNS(null, \"r\", 0.5 * groupTemplate.size);\n }\n else {\n point = exports.getSVGElement('rect', JSONcontainer, svgContainer);\n point.setAttributeNS(null, \"x\", x - 0.5 * groupTemplate.size);\n point.setAttributeNS(null, \"y\", y - 0.5 * groupTemplate.size);\n point.setAttributeNS(null, \"width\", groupTemplate.size);\n point.setAttributeNS(null, \"height\", groupTemplate.size);\n }\n\n if (groupTemplate.styles !== undefined) {\n point.setAttributeNS(null, \"style\", groupTemplate.styles);\n }\n point.setAttributeNS(null, \"class\", groupTemplate.className + \" vis-point\");\n //handle label\n\n\n if (labelObj) {\n var label = exports.getSVGElement('text', JSONcontainer, svgContainer);\n if (labelObj.xOffset) {\n x = x + labelObj.xOffset;\n }\n\n if (labelObj.yOffset) {\n y = y + labelObj.yOffset;\n }\n if (labelObj.content) {\n label.textContent = labelObj.content;\n }\n\n if (labelObj.className) {\n label.setAttributeNS(null, \"class\", labelObj.className + \" vis-label\");\n }\n label.setAttributeNS(null, \"x\", x);\n label.setAttributeNS(null, \"y\", y);\n }\n\n return point;\n};\n\n/**\n * draw a bar SVG element centered on the X coordinate\n *\n * @param {number} x\n * @param {number} y\n * @param {number} width\n * @param {number} height\n * @param {string} className\n * @param {Object} JSONcontainer\n * @param {Object} svgContainer\n * @param {string} style\n */\nexports.drawBar = function (x, y, width, height, className, JSONcontainer, svgContainer, style) {\n if (height != 0) {\n if (height < 0) {\n height *= -1;\n y -= height;\n }\n var rect = exports.getSVGElement('rect',JSONcontainer, svgContainer);\n rect.setAttributeNS(null, \"x\", x - 0.5 * width);\n rect.setAttributeNS(null, \"y\", y);\n rect.setAttributeNS(null, \"width\", width);\n rect.setAttributeNS(null, \"height\", height);\n rect.setAttributeNS(null, \"class\", className);\n if (style) {\n rect.setAttributeNS(null, \"style\", style);\n }\n }\n};","//! moment.js\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n typeof define === 'function' && define.amd ? define(factory) :\n global.moment = factory()\n}(this, (function () { 'use strict';\n\n var hookCallback;\n\n function hooks () {\n return hookCallback.apply(null, arguments);\n }\n\n // This is done to register the method called with moment()\n // without creating circular dependencies.\n function setHookCallback (callback) {\n hookCallback = callback;\n }\n\n function isArray(input) {\n return input instanceof Array || Object.prototype.toString.call(input) === '[object Array]';\n }\n\n function isObject(input) {\n // IE8 will treat undefined and null as object if it wasn't for\n // input != null\n return input != null && Object.prototype.toString.call(input) === '[object Object]';\n }\n\n function isObjectEmpty(obj) {\n if (Object.getOwnPropertyNames) {\n return (Object.getOwnPropertyNames(obj).length === 0);\n } else {\n var k;\n for (k in obj) {\n if (obj.hasOwnProperty(k)) {\n return false;\n }\n }\n return true;\n }\n }\n\n function isUndefined(input) {\n return input === void 0;\n }\n\n function isNumber(input) {\n return typeof input === 'number' || Object.prototype.toString.call(input) === '[object Number]';\n }\n\n function isDate(input) {\n return input instanceof Date || Object.prototype.toString.call(input) === '[object Date]';\n }\n\n function map(arr, fn) {\n var res = [], i;\n for (i = 0; i < arr.length; ++i) {\n res.push(fn(arr[i], i));\n }\n return res;\n }\n\n function hasOwnProp(a, b) {\n return Object.prototype.hasOwnProperty.call(a, b);\n }\n\n function extend(a, b) {\n for (var i in b) {\n if (hasOwnProp(b, i)) {\n a[i] = b[i];\n }\n }\n\n if (hasOwnProp(b, 'toString')) {\n a.toString = b.toString;\n }\n\n if (hasOwnProp(b, 'valueOf')) {\n a.valueOf = b.valueOf;\n }\n\n return a;\n }\n\n function createUTC (input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, true).utc();\n }\n\n function defaultParsingFlags() {\n // We need to deep clone this object.\n return {\n empty : false,\n unusedTokens : [],\n unusedInput : [],\n overflow : -2,\n charsLeftOver : 0,\n nullInput : false,\n invalidMonth : null,\n invalidFormat : false,\n userInvalidated : false,\n iso : false,\n parsedDateParts : [],\n meridiem : null,\n rfc2822 : false,\n weekdayMismatch : false\n };\n }\n\n function getParsingFlags(m) {\n if (m._pf == null) {\n m._pf = defaultParsingFlags();\n }\n return m._pf;\n }\n\n var some;\n if (Array.prototype.some) {\n some = Array.prototype.some;\n } else {\n some = function (fun) {\n var t = Object(this);\n var len = t.length >>> 0;\n\n for (var i = 0; i < len; i++) {\n if (i in t && fun.call(this, t[i], i, t)) {\n return true;\n }\n }\n\n return false;\n };\n }\n\n function isValid(m) {\n if (m._isValid == null) {\n var flags = getParsingFlags(m);\n var parsedParts = some.call(flags.parsedDateParts, function (i) {\n return i != null;\n });\n var isNowValid = !isNaN(m._d.getTime()) &&\n flags.overflow < 0 &&\n !flags.empty &&\n !flags.invalidMonth &&\n !flags.invalidWeekday &&\n !flags.weekdayMismatch &&\n !flags.nullInput &&\n !flags.invalidFormat &&\n !flags.userInvalidated &&\n (!flags.meridiem || (flags.meridiem && parsedParts));\n\n if (m._strict) {\n isNowValid = isNowValid &&\n flags.charsLeftOver === 0 &&\n flags.unusedTokens.length === 0 &&\n flags.bigHour === undefined;\n }\n\n if (Object.isFrozen == null || !Object.isFrozen(m)) {\n m._isValid = isNowValid;\n }\n else {\n return isNowValid;\n }\n }\n return m._isValid;\n }\n\n function createInvalid (flags) {\n var m = createUTC(NaN);\n if (flags != null) {\n extend(getParsingFlags(m), flags);\n }\n else {\n getParsingFlags(m).userInvalidated = true;\n }\n\n return m;\n }\n\n // Plugins that add properties should also add the key here (null value),\n // so we can properly clone ourselves.\n var momentProperties = hooks.momentProperties = [];\n\n function copyConfig(to, from) {\n var i, prop, val;\n\n if (!isUndefined(from._isAMomentObject)) {\n to._isAMomentObject = from._isAMomentObject;\n }\n if (!isUndefined(from._i)) {\n to._i = from._i;\n }\n if (!isUndefined(from._f)) {\n to._f = from._f;\n }\n if (!isUndefined(from._l)) {\n to._l = from._l;\n }\n if (!isUndefined(from._strict)) {\n to._strict = from._strict;\n }\n if (!isUndefined(from._tzm)) {\n to._tzm = from._tzm;\n }\n if (!isUndefined(from._isUTC)) {\n to._isUTC = from._isUTC;\n }\n if (!isUndefined(from._offset)) {\n to._offset = from._offset;\n }\n if (!isUndefined(from._pf)) {\n to._pf = getParsingFlags(from);\n }\n if (!isUndefined(from._locale)) {\n to._locale = from._locale;\n }\n\n if (momentProperties.length > 0) {\n for (i = 0; i < momentProperties.length; i++) {\n prop = momentProperties[i];\n val = from[prop];\n if (!isUndefined(val)) {\n to[prop] = val;\n }\n }\n }\n\n return to;\n }\n\n var updateInProgress = false;\n\n // Moment prototype object\n function Moment(config) {\n copyConfig(this, config);\n this._d = new Date(config._d != null ? config._d.getTime() : NaN);\n if (!this.isValid()) {\n this._d = new Date(NaN);\n }\n // Prevent infinite loop in case updateOffset creates new moment\n // objects.\n if (updateInProgress === false) {\n updateInProgress = true;\n hooks.updateOffset(this);\n updateInProgress = false;\n }\n }\n\n function isMoment (obj) {\n return obj instanceof Moment || (obj != null && obj._isAMomentObject != null);\n }\n\n function absFloor (number) {\n if (number < 0) {\n // -0 -> 0\n return Math.ceil(number) || 0;\n } else {\n return Math.floor(number);\n }\n }\n\n function toInt(argumentForCoercion) {\n var coercedNumber = +argumentForCoercion,\n value = 0;\n\n if (coercedNumber !== 0 && isFinite(coercedNumber)) {\n value = absFloor(coercedNumber);\n }\n\n return value;\n }\n\n // compare two arrays, return the number of differences\n function compareArrays(array1, array2, dontConvert) {\n var len = Math.min(array1.length, array2.length),\n lengthDiff = Math.abs(array1.length - array2.length),\n diffs = 0,\n i;\n for (i = 0; i < len; i++) {\n if ((dontConvert && array1[i] !== array2[i]) ||\n (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {\n diffs++;\n }\n }\n return diffs + lengthDiff;\n }\n\n function warn(msg) {\n if (hooks.suppressDeprecationWarnings === false &&\n (typeof console !== 'undefined') && console.warn) {\n console.warn('Deprecation warning: ' + msg);\n }\n }\n\n function deprecate(msg, fn) {\n var firstTime = true;\n\n return extend(function () {\n if (hooks.deprecationHandler != null) {\n hooks.deprecationHandler(null, msg);\n }\n if (firstTime) {\n var args = [];\n var arg;\n for (var i = 0; i < arguments.length; i++) {\n arg = '';\n if (typeof arguments[i] === 'object') {\n arg += '\\n[' + i + '] ';\n for (var key in arguments[0]) {\n arg += key + ': ' + arguments[0][key] + ', ';\n }\n arg = arg.slice(0, -2); // Remove trailing comma and space\n } else {\n arg = arguments[i];\n }\n args.push(arg);\n }\n warn(msg + '\\nArguments: ' + Array.prototype.slice.call(args).join('') + '\\n' + (new Error()).stack);\n firstTime = false;\n }\n return fn.apply(this, arguments);\n }, fn);\n }\n\n var deprecations = {};\n\n function deprecateSimple(name, msg) {\n if (hooks.deprecationHandler != null) {\n hooks.deprecationHandler(name, msg);\n }\n if (!deprecations[name]) {\n warn(msg);\n deprecations[name] = true;\n }\n }\n\n hooks.suppressDeprecationWarnings = false;\n hooks.deprecationHandler = null;\n\n function isFunction(input) {\n return input instanceof Function || Object.prototype.toString.call(input) === '[object Function]';\n }\n\n function set (config) {\n var prop, i;\n for (i in config) {\n prop = config[i];\n if (isFunction(prop)) {\n this[i] = prop;\n } else {\n this['_' + i] = prop;\n }\n }\n this._config = config;\n // Lenient ordinal parsing accepts just a number in addition to\n // number + (possibly) stuff coming from _dayOfMonthOrdinalParse.\n // TODO: Remove \"ordinalParse\" fallback in next major release.\n this._dayOfMonthOrdinalParseLenient = new RegExp(\n (this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) +\n '|' + (/\\d{1,2}/).source);\n }\n\n function mergeConfigs(parentConfig, childConfig) {\n var res = extend({}, parentConfig), prop;\n for (prop in childConfig) {\n if (hasOwnProp(childConfig, prop)) {\n if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) {\n res[prop] = {};\n extend(res[prop], parentConfig[prop]);\n extend(res[prop], childConfig[prop]);\n } else if (childConfig[prop] != null) {\n res[prop] = childConfig[prop];\n } else {\n delete res[prop];\n }\n }\n }\n for (prop in parentConfig) {\n if (hasOwnProp(parentConfig, prop) &&\n !hasOwnProp(childConfig, prop) &&\n isObject(parentConfig[prop])) {\n // make sure changes to properties don't modify parent config\n res[prop] = extend({}, res[prop]);\n }\n }\n return res;\n }\n\n function Locale(config) {\n if (config != null) {\n this.set(config);\n }\n }\n\n var keys;\n\n if (Object.keys) {\n keys = Object.keys;\n } else {\n keys = function (obj) {\n var i, res = [];\n for (i in obj) {\n if (hasOwnProp(obj, i)) {\n res.push(i);\n }\n }\n return res;\n };\n }\n\n var defaultCalendar = {\n sameDay : '[Today at] LT',\n nextDay : '[Tomorrow at] LT',\n nextWeek : 'dddd [at] LT',\n lastDay : '[Yesterday at] LT',\n lastWeek : '[Last] dddd [at] LT',\n sameElse : 'L'\n };\n\n function calendar (key, mom, now) {\n var output = this._calendar[key] || this._calendar['sameElse'];\n return isFunction(output) ? output.call(mom, now) : output;\n }\n\n var defaultLongDateFormat = {\n LTS : 'h:mm:ss A',\n LT : 'h:mm A',\n L : 'MM/DD/YYYY',\n LL : 'MMMM D, YYYY',\n LLL : 'MMMM D, YYYY h:mm A',\n LLLL : 'dddd, MMMM D, YYYY h:mm A'\n };\n\n function longDateFormat (key) {\n var format = this._longDateFormat[key],\n formatUpper = this._longDateFormat[key.toUpperCase()];\n\n if (format || !formatUpper) {\n return format;\n }\n\n this._longDateFormat[key] = formatUpper.replace(/MMMM|MM|DD|dddd/g, function (val) {\n return val.slice(1);\n });\n\n return this._longDateFormat[key];\n }\n\n var defaultInvalidDate = 'Invalid date';\n\n function invalidDate () {\n return this._invalidDate;\n }\n\n var defaultOrdinal = '%d';\n var defaultDayOfMonthOrdinalParse = /\\d{1,2}/;\n\n function ordinal (number) {\n return this._ordinal.replace('%d', number);\n }\n\n var defaultRelativeTime = {\n future : 'in %s',\n past : '%s ago',\n s : 'a few seconds',\n ss : '%d seconds',\n m : 'a minute',\n mm : '%d minutes',\n h : 'an hour',\n hh : '%d hours',\n d : 'a day',\n dd : '%d days',\n M : 'a month',\n MM : '%d months',\n y : 'a year',\n yy : '%d years'\n };\n\n function relativeTime (number, withoutSuffix, string, isFuture) {\n var output = this._relativeTime[string];\n return (isFunction(output)) ?\n output(number, withoutSuffix, string, isFuture) :\n output.replace(/%d/i, number);\n }\n\n function pastFuture (diff, output) {\n var format = this._relativeTime[diff > 0 ? 'future' : 'past'];\n return isFunction(format) ? format(output) : format.replace(/%s/i, output);\n }\n\n var aliases = {};\n\n function addUnitAlias (unit, shorthand) {\n var lowerCase = unit.toLowerCase();\n aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit;\n }\n\n function normalizeUnits(units) {\n return typeof units === 'string' ? aliases[units] || aliases[units.toLowerCase()] : undefined;\n }\n\n function normalizeObjectUnits(inputObject) {\n var normalizedInput = {},\n normalizedProp,\n prop;\n\n for (prop in inputObject) {\n if (hasOwnProp(inputObject, prop)) {\n normalizedProp = normalizeUnits(prop);\n if (normalizedProp) {\n normalizedInput[normalizedProp] = inputObject[prop];\n }\n }\n }\n\n return normalizedInput;\n }\n\n var priorities = {};\n\n function addUnitPriority(unit, priority) {\n priorities[unit] = priority;\n }\n\n function getPrioritizedUnits(unitsObj) {\n var units = [];\n for (var u in unitsObj) {\n units.push({unit: u, priority: priorities[u]});\n }\n units.sort(function (a, b) {\n return a.priority - b.priority;\n });\n return units;\n }\n\n function zeroFill(number, targetLength, forceSign) {\n var absNumber = '' + Math.abs(number),\n zerosToFill = targetLength - absNumber.length,\n sign = number >= 0;\n return (sign ? (forceSign ? '+' : '') : '-') +\n Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) + absNumber;\n }\n\n var formattingTokens = /(\\[[^\\[]*\\])|(\\\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g;\n\n var localFormattingTokens = /(\\[[^\\[]*\\])|(\\\\)?(LTS|LT|LL?L?L?|l{1,4})/g;\n\n var formatFunctions = {};\n\n var formatTokenFunctions = {};\n\n // token: 'M'\n // padded: ['MM', 2]\n // ordinal: 'Mo'\n // callback: function () { this.month() + 1 }\n function addFormatToken (token, padded, ordinal, callback) {\n var func = callback;\n if (typeof callback === 'string') {\n func = function () {\n return this[callback]();\n };\n }\n if (token) {\n formatTokenFunctions[token] = func;\n }\n if (padded) {\n formatTokenFunctions[padded[0]] = function () {\n return zeroFill(func.apply(this, arguments), padded[1], padded[2]);\n };\n }\n if (ordinal) {\n formatTokenFunctions[ordinal] = function () {\n return this.localeData().ordinal(func.apply(this, arguments), token);\n };\n }\n }\n\n function removeFormattingTokens(input) {\n if (input.match(/\\[[\\s\\S]/)) {\n return input.replace(/^\\[|\\]$/g, '');\n }\n return input.replace(/\\\\/g, '');\n }\n\n function makeFormatFunction(format) {\n var array = format.match(formattingTokens), i, length;\n\n for (i = 0, length = array.length; i < length; i++) {\n if (formatTokenFunctions[array[i]]) {\n array[i] = formatTokenFunctions[array[i]];\n } else {\n array[i] = removeFormattingTokens(array[i]);\n }\n }\n\n return function (mom) {\n var output = '', i;\n for (i = 0; i < length; i++) {\n output += isFunction(array[i]) ? array[i].call(mom, format) : array[i];\n }\n return output;\n };\n }\n\n // format date using native date object\n function formatMoment(m, format) {\n if (!m.isValid()) {\n return m.localeData().invalidDate();\n }\n\n format = expandFormat(format, m.localeData());\n formatFunctions[format] = formatFunctions[format] || makeFormatFunction(format);\n\n return formatFunctions[format](m);\n }\n\n function expandFormat(format, locale) {\n var i = 5;\n\n function replaceLongDateFormatTokens(input) {\n return locale.longDateFormat(input) || input;\n }\n\n localFormattingTokens.lastIndex = 0;\n while (i >= 0 && localFormattingTokens.test(format)) {\n format = format.replace(localFormattingTokens, replaceLongDateFormatTokens);\n localFormattingTokens.lastIndex = 0;\n i -= 1;\n }\n\n return format;\n }\n\n var match1 = /\\d/; // 0 - 9\n var match2 = /\\d\\d/; // 00 - 99\n var match3 = /\\d{3}/; // 000 - 999\n var match4 = /\\d{4}/; // 0000 - 9999\n var match6 = /[+-]?\\d{6}/; // -999999 - 999999\n var match1to2 = /\\d\\d?/; // 0 - 99\n var match3to4 = /\\d\\d\\d\\d?/; // 999 - 9999\n var match5to6 = /\\d\\d\\d\\d\\d\\d?/; // 99999 - 999999\n var match1to3 = /\\d{1,3}/; // 0 - 999\n var match1to4 = /\\d{1,4}/; // 0 - 9999\n var match1to6 = /[+-]?\\d{1,6}/; // -999999 - 999999\n\n var matchUnsigned = /\\d+/; // 0 - inf\n var matchSigned = /[+-]?\\d+/; // -inf - inf\n\n var matchOffset = /Z|[+-]\\d\\d:?\\d\\d/gi; // +00:00 -00:00 +0000 -0000 or Z\n var matchShortOffset = /Z|[+-]\\d\\d(?::?\\d\\d)?/gi; // +00 -00 +00:00 -00:00 +0000 -0000 or Z\n\n var matchTimestamp = /[+-]?\\d+(\\.\\d{1,3})?/; // 123456789 123456789.123\n\n // any word (or two) characters or numbers including two/three word month in arabic.\n // includes scottish gaelic two word and hyphenated months\n var matchWord = /[0-9]{0,256}['a-z\\u00A0-\\u05FF\\u0700-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFF07\\uFF10-\\uFFEF]{1,256}|[\\u0600-\\u06FF\\/]{1,256}(\\s*?[\\u0600-\\u06FF]{1,256}){1,2}/i;\n\n var regexes = {};\n\n function addRegexToken (token, regex, strictRegex) {\n regexes[token] = isFunction(regex) ? regex : function (isStrict, localeData) {\n return (isStrict && strictRegex) ? strictRegex : regex;\n };\n }\n\n function getParseRegexForToken (token, config) {\n if (!hasOwnProp(regexes, token)) {\n return new RegExp(unescapeFormat(token));\n }\n\n return regexes[token](config._strict, config._locale);\n }\n\n // Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript\n function unescapeFormat(s) {\n return regexEscape(s.replace('\\\\', '').replace(/\\\\(\\[)|\\\\(\\])|\\[([^\\]\\[]*)\\]|\\\\(.)/g, function (matched, p1, p2, p3, p4) {\n return p1 || p2 || p3 || p4;\n }));\n }\n\n function regexEscape(s) {\n return s.replace(/[-\\/\\\\^$*+?.()|[\\]{}]/g, '\\\\$&');\n }\n\n var tokens = {};\n\n function addParseToken (token, callback) {\n var i, func = callback;\n if (typeof token === 'string') {\n token = [token];\n }\n if (isNumber(callback)) {\n func = function (input, array) {\n array[callback] = toInt(input);\n };\n }\n for (i = 0; i < token.length; i++) {\n tokens[token[i]] = func;\n }\n }\n\n function addWeekParseToken (token, callback) {\n addParseToken(token, function (input, array, config, token) {\n config._w = config._w || {};\n callback(input, config._w, config, token);\n });\n }\n\n function addTimeToArrayFromToken(token, input, config) {\n if (input != null && hasOwnProp(tokens, token)) {\n tokens[token](input, config._a, config, token);\n }\n }\n\n var YEAR = 0;\n var MONTH = 1;\n var DATE = 2;\n var HOUR = 3;\n var MINUTE = 4;\n var SECOND = 5;\n var MILLISECOND = 6;\n var WEEK = 7;\n var WEEKDAY = 8;\n\n // FORMATTING\n\n addFormatToken('Y', 0, 0, function () {\n var y = this.year();\n return y <= 9999 ? '' + y : '+' + y;\n });\n\n addFormatToken(0, ['YY', 2], 0, function () {\n return this.year() % 100;\n });\n\n addFormatToken(0, ['YYYY', 4], 0, 'year');\n addFormatToken(0, ['YYYYY', 5], 0, 'year');\n addFormatToken(0, ['YYYYYY', 6, true], 0, 'year');\n\n // ALIASES\n\n addUnitAlias('year', 'y');\n\n // PRIORITIES\n\n addUnitPriority('year', 1);\n\n // PARSING\n\n addRegexToken('Y', matchSigned);\n addRegexToken('YY', match1to2, match2);\n addRegexToken('YYYY', match1to4, match4);\n addRegexToken('YYYYY', match1to6, match6);\n addRegexToken('YYYYYY', match1to6, match6);\n\n addParseToken(['YYYYY', 'YYYYYY'], YEAR);\n addParseToken('YYYY', function (input, array) {\n array[YEAR] = input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input);\n });\n addParseToken('YY', function (input, array) {\n array[YEAR] = hooks.parseTwoDigitYear(input);\n });\n addParseToken('Y', function (input, array) {\n array[YEAR] = parseInt(input, 10);\n });\n\n // HELPERS\n\n function daysInYear(year) {\n return isLeapYear(year) ? 366 : 365;\n }\n\n function isLeapYear(year) {\n return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;\n }\n\n // HOOKS\n\n hooks.parseTwoDigitYear = function (input) {\n return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);\n };\n\n // MOMENTS\n\n var getSetYear = makeGetSet('FullYear', true);\n\n function getIsLeapYear () {\n return isLeapYear(this.year());\n }\n\n function makeGetSet (unit, keepTime) {\n return function (value) {\n if (value != null) {\n set$1(this, unit, value);\n hooks.updateOffset(this, keepTime);\n return this;\n } else {\n return get(this, unit);\n }\n };\n }\n\n function get (mom, unit) {\n return mom.isValid() ?\n mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]() : NaN;\n }\n\n function set$1 (mom, unit, value) {\n if (mom.isValid() && !isNaN(value)) {\n if (unit === 'FullYear' && isLeapYear(mom.year()) && mom.month() === 1 && mom.date() === 29) {\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value, mom.month(), daysInMonth(value, mom.month()));\n }\n else {\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value);\n }\n }\n }\n\n // MOMENTS\n\n function stringGet (units) {\n units = normalizeUnits(units);\n if (isFunction(this[units])) {\n return this[units]();\n }\n return this;\n }\n\n\n function stringSet (units, value) {\n if (typeof units === 'object') {\n units = normalizeObjectUnits(units);\n var prioritized = getPrioritizedUnits(units);\n for (var i = 0; i < prioritized.length; i++) {\n this[prioritized[i].unit](units[prioritized[i].unit]);\n }\n } else {\n units = normalizeUnits(units);\n if (isFunction(this[units])) {\n return this[units](value);\n }\n }\n return this;\n }\n\n function mod(n, x) {\n return ((n % x) + x) % x;\n }\n\n var indexOf;\n\n if (Array.prototype.indexOf) {\n indexOf = Array.prototype.indexOf;\n } else {\n indexOf = function (o) {\n // I know\n var i;\n for (i = 0; i < this.length; ++i) {\n if (this[i] === o) {\n return i;\n }\n }\n return -1;\n };\n }\n\n function daysInMonth(year, month) {\n if (isNaN(year) || isNaN(month)) {\n return NaN;\n }\n var modMonth = mod(month, 12);\n year += (month - modMonth) / 12;\n return modMonth === 1 ? (isLeapYear(year) ? 29 : 28) : (31 - modMonth % 7 % 2);\n }\n\n // FORMATTING\n\n addFormatToken('M', ['MM', 2], 'Mo', function () {\n return this.month() + 1;\n });\n\n addFormatToken('MMM', 0, 0, function (format) {\n return this.localeData().monthsShort(this, format);\n });\n\n addFormatToken('MMMM', 0, 0, function (format) {\n return this.localeData().months(this, format);\n });\n\n // ALIASES\n\n addUnitAlias('month', 'M');\n\n // PRIORITY\n\n addUnitPriority('month', 8);\n\n // PARSING\n\n addRegexToken('M', match1to2);\n addRegexToken('MM', match1to2, match2);\n addRegexToken('MMM', function (isStrict, locale) {\n return locale.monthsShortRegex(isStrict);\n });\n addRegexToken('MMMM', function (isStrict, locale) {\n return locale.monthsRegex(isStrict);\n });\n\n addParseToken(['M', 'MM'], function (input, array) {\n array[MONTH] = toInt(input) - 1;\n });\n\n addParseToken(['MMM', 'MMMM'], function (input, array, config, token) {\n var month = config._locale.monthsParse(input, token, config._strict);\n // if we didn't find a month name, mark the date as invalid.\n if (month != null) {\n array[MONTH] = month;\n } else {\n getParsingFlags(config).invalidMonth = input;\n }\n });\n\n // LOCALES\n\n var MONTHS_IN_FORMAT = /D[oD]?(\\[[^\\[\\]]*\\]|\\s)+MMMM?/;\n var defaultLocaleMonths = 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_');\n function localeMonths (m, format) {\n if (!m) {\n return isArray(this._months) ? this._months :\n this._months['standalone'];\n }\n return isArray(this._months) ? this._months[m.month()] :\n this._months[(this._months.isFormat || MONTHS_IN_FORMAT).test(format) ? 'format' : 'standalone'][m.month()];\n }\n\n var defaultLocaleMonthsShort = 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_');\n function localeMonthsShort (m, format) {\n if (!m) {\n return isArray(this._monthsShort) ? this._monthsShort :\n this._monthsShort['standalone'];\n }\n return isArray(this._monthsShort) ? this._monthsShort[m.month()] :\n this._monthsShort[MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'][m.month()];\n }\n\n function handleStrictParse(monthName, format, strict) {\n var i, ii, mom, llc = monthName.toLocaleLowerCase();\n if (!this._monthsParse) {\n // this is not used\n this._monthsParse = [];\n this._longMonthsParse = [];\n this._shortMonthsParse = [];\n for (i = 0; i < 12; ++i) {\n mom = createUTC([2000, i]);\n this._shortMonthsParse[i] = this.monthsShort(mom, '').toLocaleLowerCase();\n this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase();\n }\n }\n\n if (strict) {\n if (format === 'MMM') {\n ii = indexOf.call(this._shortMonthsParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._longMonthsParse, llc);\n return ii !== -1 ? ii : null;\n }\n } else {\n if (format === 'MMM') {\n ii = indexOf.call(this._shortMonthsParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._longMonthsParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._longMonthsParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortMonthsParse, llc);\n return ii !== -1 ? ii : null;\n }\n }\n }\n\n function localeMonthsParse (monthName, format, strict) {\n var i, mom, regex;\n\n if (this._monthsParseExact) {\n return handleStrictParse.call(this, monthName, format, strict);\n }\n\n if (!this._monthsParse) {\n this._monthsParse = [];\n this._longMonthsParse = [];\n this._shortMonthsParse = [];\n }\n\n // TODO: add sorting\n // Sorting makes sure if one month (or abbr) is a prefix of another\n // see sorting in computeMonthsParse\n for (i = 0; i < 12; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, i]);\n if (strict && !this._longMonthsParse[i]) {\n this._longMonthsParse[i] = new RegExp('^' + this.months(mom, '').replace('.', '') + '$', 'i');\n this._shortMonthsParse[i] = new RegExp('^' + this.monthsShort(mom, '').replace('.', '') + '$', 'i');\n }\n if (!strict && !this._monthsParse[i]) {\n regex = '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, '');\n this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i');\n }\n // test the regex\n if (strict && format === 'MMMM' && this._longMonthsParse[i].test(monthName)) {\n return i;\n } else if (strict && format === 'MMM' && this._shortMonthsParse[i].test(monthName)) {\n return i;\n } else if (!strict && this._monthsParse[i].test(monthName)) {\n return i;\n }\n }\n }\n\n // MOMENTS\n\n function setMonth (mom, value) {\n var dayOfMonth;\n\n if (!mom.isValid()) {\n // No op\n return mom;\n }\n\n if (typeof value === 'string') {\n if (/^\\d+$/.test(value)) {\n value = toInt(value);\n } else {\n value = mom.localeData().monthsParse(value);\n // TODO: Another silent failure?\n if (!isNumber(value)) {\n return mom;\n }\n }\n }\n\n dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value));\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth);\n return mom;\n }\n\n function getSetMonth (value) {\n if (value != null) {\n setMonth(this, value);\n hooks.updateOffset(this, true);\n return this;\n } else {\n return get(this, 'Month');\n }\n }\n\n function getDaysInMonth () {\n return daysInMonth(this.year(), this.month());\n }\n\n var defaultMonthsShortRegex = matchWord;\n function monthsShortRegex (isStrict) {\n if (this._monthsParseExact) {\n if (!hasOwnProp(this, '_monthsRegex')) {\n computeMonthsParse.call(this);\n }\n if (isStrict) {\n return this._monthsShortStrictRegex;\n } else {\n return this._monthsShortRegex;\n }\n } else {\n if (!hasOwnProp(this, '_monthsShortRegex')) {\n this._monthsShortRegex = defaultMonthsShortRegex;\n }\n return this._monthsShortStrictRegex && isStrict ?\n this._monthsShortStrictRegex : this._monthsShortRegex;\n }\n }\n\n var defaultMonthsRegex = matchWord;\n function monthsRegex (isStrict) {\n if (this._monthsParseExact) {\n if (!hasOwnProp(this, '_monthsRegex')) {\n computeMonthsParse.call(this);\n }\n if (isStrict) {\n return this._monthsStrictRegex;\n } else {\n return this._monthsRegex;\n }\n } else {\n if (!hasOwnProp(this, '_monthsRegex')) {\n this._monthsRegex = defaultMonthsRegex;\n }\n return this._monthsStrictRegex && isStrict ?\n this._monthsStrictRegex : this._monthsRegex;\n }\n }\n\n function computeMonthsParse () {\n function cmpLenRev(a, b) {\n return b.length - a.length;\n }\n\n var shortPieces = [], longPieces = [], mixedPieces = [],\n i, mom;\n for (i = 0; i < 12; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, i]);\n shortPieces.push(this.monthsShort(mom, ''));\n longPieces.push(this.months(mom, ''));\n mixedPieces.push(this.months(mom, ''));\n mixedPieces.push(this.monthsShort(mom, ''));\n }\n // Sorting makes sure if one month (or abbr) is a prefix of another it\n // will match the longer piece.\n shortPieces.sort(cmpLenRev);\n longPieces.sort(cmpLenRev);\n mixedPieces.sort(cmpLenRev);\n for (i = 0; i < 12; i++) {\n shortPieces[i] = regexEscape(shortPieces[i]);\n longPieces[i] = regexEscape(longPieces[i]);\n }\n for (i = 0; i < 24; i++) {\n mixedPieces[i] = regexEscape(mixedPieces[i]);\n }\n\n this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._monthsShortRegex = this._monthsRegex;\n this._monthsStrictRegex = new RegExp('^(' + longPieces.join('|') + ')', 'i');\n this._monthsShortStrictRegex = new RegExp('^(' + shortPieces.join('|') + ')', 'i');\n }\n\n function createDate (y, m, d, h, M, s, ms) {\n // can't just apply() to create a date:\n // https://stackoverflow.com/q/181348\n var date;\n // the date constructor remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n date = new Date(y + 400, m, d, h, M, s, ms);\n if (isFinite(date.getFullYear())) {\n date.setFullYear(y);\n }\n } else {\n date = new Date(y, m, d, h, M, s, ms);\n }\n\n return date;\n }\n\n function createUTCDate (y) {\n var date;\n // the Date.UTC function remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n var args = Array.prototype.slice.call(arguments);\n // preserve leap years using a full 400 year cycle, then reset\n args[0] = y + 400;\n date = new Date(Date.UTC.apply(null, args));\n if (isFinite(date.getUTCFullYear())) {\n date.setUTCFullYear(y);\n }\n } else {\n date = new Date(Date.UTC.apply(null, arguments));\n }\n\n return date;\n }\n\n // start-of-first-week - start-of-year\n function firstWeekOffset(year, dow, doy) {\n var // first-week day -- which january is always in the first week (4 for iso, 1 for other)\n fwd = 7 + dow - doy,\n // first-week day local weekday -- which local weekday is fwd\n fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7;\n\n return -fwdlw + fwd - 1;\n }\n\n // https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday\n function dayOfYearFromWeeks(year, week, weekday, dow, doy) {\n var localWeekday = (7 + weekday - dow) % 7,\n weekOffset = firstWeekOffset(year, dow, doy),\n dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset,\n resYear, resDayOfYear;\n\n if (dayOfYear <= 0) {\n resYear = year - 1;\n resDayOfYear = daysInYear(resYear) + dayOfYear;\n } else if (dayOfYear > daysInYear(year)) {\n resYear = year + 1;\n resDayOfYear = dayOfYear - daysInYear(year);\n } else {\n resYear = year;\n resDayOfYear = dayOfYear;\n }\n\n return {\n year: resYear,\n dayOfYear: resDayOfYear\n };\n }\n\n function weekOfYear(mom, dow, doy) {\n var weekOffset = firstWeekOffset(mom.year(), dow, doy),\n week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1,\n resWeek, resYear;\n\n if (week < 1) {\n resYear = mom.year() - 1;\n resWeek = week + weeksInYear(resYear, dow, doy);\n } else if (week > weeksInYear(mom.year(), dow, doy)) {\n resWeek = week - weeksInYear(mom.year(), dow, doy);\n resYear = mom.year() + 1;\n } else {\n resYear = mom.year();\n resWeek = week;\n }\n\n return {\n week: resWeek,\n year: resYear\n };\n }\n\n function weeksInYear(year, dow, doy) {\n var weekOffset = firstWeekOffset(year, dow, doy),\n weekOffsetNext = firstWeekOffset(year + 1, dow, doy);\n return (daysInYear(year) - weekOffset + weekOffsetNext) / 7;\n }\n\n // FORMATTING\n\n addFormatToken('w', ['ww', 2], 'wo', 'week');\n addFormatToken('W', ['WW', 2], 'Wo', 'isoWeek');\n\n // ALIASES\n\n addUnitAlias('week', 'w');\n addUnitAlias('isoWeek', 'W');\n\n // PRIORITIES\n\n addUnitPriority('week', 5);\n addUnitPriority('isoWeek', 5);\n\n // PARSING\n\n addRegexToken('w', match1to2);\n addRegexToken('ww', match1to2, match2);\n addRegexToken('W', match1to2);\n addRegexToken('WW', match1to2, match2);\n\n addWeekParseToken(['w', 'ww', 'W', 'WW'], function (input, week, config, token) {\n week[token.substr(0, 1)] = toInt(input);\n });\n\n // HELPERS\n\n // LOCALES\n\n function localeWeek (mom) {\n return weekOfYear(mom, this._week.dow, this._week.doy).week;\n }\n\n var defaultLocaleWeek = {\n dow : 0, // Sunday is the first day of the week.\n doy : 6 // The week that contains Jan 6th is the first week of the year.\n };\n\n function localeFirstDayOfWeek () {\n return this._week.dow;\n }\n\n function localeFirstDayOfYear () {\n return this._week.doy;\n }\n\n // MOMENTS\n\n function getSetWeek (input) {\n var week = this.localeData().week(this);\n return input == null ? week : this.add((input - week) * 7, 'd');\n }\n\n function getSetISOWeek (input) {\n var week = weekOfYear(this, 1, 4).week;\n return input == null ? week : this.add((input - week) * 7, 'd');\n }\n\n // FORMATTING\n\n addFormatToken('d', 0, 'do', 'day');\n\n addFormatToken('dd', 0, 0, function (format) {\n return this.localeData().weekdaysMin(this, format);\n });\n\n addFormatToken('ddd', 0, 0, function (format) {\n return this.localeData().weekdaysShort(this, format);\n });\n\n addFormatToken('dddd', 0, 0, function (format) {\n return this.localeData().weekdays(this, format);\n });\n\n addFormatToken('e', 0, 0, 'weekday');\n addFormatToken('E', 0, 0, 'isoWeekday');\n\n // ALIASES\n\n addUnitAlias('day', 'd');\n addUnitAlias('weekday', 'e');\n addUnitAlias('isoWeekday', 'E');\n\n // PRIORITY\n addUnitPriority('day', 11);\n addUnitPriority('weekday', 11);\n addUnitPriority('isoWeekday', 11);\n\n // PARSING\n\n addRegexToken('d', match1to2);\n addRegexToken('e', match1to2);\n addRegexToken('E', match1to2);\n addRegexToken('dd', function (isStrict, locale) {\n return locale.weekdaysMinRegex(isStrict);\n });\n addRegexToken('ddd', function (isStrict, locale) {\n return locale.weekdaysShortRegex(isStrict);\n });\n addRegexToken('dddd', function (isStrict, locale) {\n return locale.weekdaysRegex(isStrict);\n });\n\n addWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) {\n var weekday = config._locale.weekdaysParse(input, token, config._strict);\n // if we didn't get a weekday name, mark the date as invalid\n if (weekday != null) {\n week.d = weekday;\n } else {\n getParsingFlags(config).invalidWeekday = input;\n }\n });\n\n addWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) {\n week[token] = toInt(input);\n });\n\n // HELPERS\n\n function parseWeekday(input, locale) {\n if (typeof input !== 'string') {\n return input;\n }\n\n if (!isNaN(input)) {\n return parseInt(input, 10);\n }\n\n input = locale.weekdaysParse(input);\n if (typeof input === 'number') {\n return input;\n }\n\n return null;\n }\n\n function parseIsoWeekday(input, locale) {\n if (typeof input === 'string') {\n return locale.weekdaysParse(input) % 7 || 7;\n }\n return isNaN(input) ? null : input;\n }\n\n // LOCALES\n function shiftWeekdays (ws, n) {\n return ws.slice(n, 7).concat(ws.slice(0, n));\n }\n\n var defaultLocaleWeekdays = 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_');\n function localeWeekdays (m, format) {\n var weekdays = isArray(this._weekdays) ? this._weekdays :\n this._weekdays[(m && m !== true && this._weekdays.isFormat.test(format)) ? 'format' : 'standalone'];\n return (m === true) ? shiftWeekdays(weekdays, this._week.dow)\n : (m) ? weekdays[m.day()] : weekdays;\n }\n\n var defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_');\n function localeWeekdaysShort (m) {\n return (m === true) ? shiftWeekdays(this._weekdaysShort, this._week.dow)\n : (m) ? this._weekdaysShort[m.day()] : this._weekdaysShort;\n }\n\n var defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_');\n function localeWeekdaysMin (m) {\n return (m === true) ? shiftWeekdays(this._weekdaysMin, this._week.dow)\n : (m) ? this._weekdaysMin[m.day()] : this._weekdaysMin;\n }\n\n function handleStrictParse$1(weekdayName, format, strict) {\n var i, ii, mom, llc = weekdayName.toLocaleLowerCase();\n if (!this._weekdaysParse) {\n this._weekdaysParse = [];\n this._shortWeekdaysParse = [];\n this._minWeekdaysParse = [];\n\n for (i = 0; i < 7; ++i) {\n mom = createUTC([2000, 1]).day(i);\n this._minWeekdaysParse[i] = this.weekdaysMin(mom, '').toLocaleLowerCase();\n this._shortWeekdaysParse[i] = this.weekdaysShort(mom, '').toLocaleLowerCase();\n this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase();\n }\n }\n\n if (strict) {\n if (format === 'dddd') {\n ii = indexOf.call(this._weekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else if (format === 'ddd') {\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n }\n } else {\n if (format === 'dddd') {\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else if (format === 'ddd') {\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._minWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n }\n }\n }\n\n function localeWeekdaysParse (weekdayName, format, strict) {\n var i, mom, regex;\n\n if (this._weekdaysParseExact) {\n return handleStrictParse$1.call(this, weekdayName, format, strict);\n }\n\n if (!this._weekdaysParse) {\n this._weekdaysParse = [];\n this._minWeekdaysParse = [];\n this._shortWeekdaysParse = [];\n this._fullWeekdaysParse = [];\n }\n\n for (i = 0; i < 7; i++) {\n // make the regex if we don't have it already\n\n mom = createUTC([2000, 1]).day(i);\n if (strict && !this._fullWeekdaysParse[i]) {\n this._fullWeekdaysParse[i] = new RegExp('^' + this.weekdays(mom, '').replace('.', '\\\\.?') + '$', 'i');\n this._shortWeekdaysParse[i] = new RegExp('^' + this.weekdaysShort(mom, '').replace('.', '\\\\.?') + '$', 'i');\n this._minWeekdaysParse[i] = new RegExp('^' + this.weekdaysMin(mom, '').replace('.', '\\\\.?') + '$', 'i');\n }\n if (!this._weekdaysParse[i]) {\n regex = '^' + this.weekdays(mom, '') + '|^' + this.weekdaysShort(mom, '') + '|^' + this.weekdaysMin(mom, '');\n this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i');\n }\n // test the regex\n if (strict && format === 'dddd' && this._fullWeekdaysParse[i].test(weekdayName)) {\n return i;\n } else if (strict && format === 'ddd' && this._shortWeekdaysParse[i].test(weekdayName)) {\n return i;\n } else if (strict && format === 'dd' && this._minWeekdaysParse[i].test(weekdayName)) {\n return i;\n } else if (!strict && this._weekdaysParse[i].test(weekdayName)) {\n return i;\n }\n }\n }\n\n // MOMENTS\n\n function getSetDayOfWeek (input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay();\n if (input != null) {\n input = parseWeekday(input, this.localeData());\n return this.add(input - day, 'd');\n } else {\n return day;\n }\n }\n\n function getSetLocaleDayOfWeek (input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7;\n return input == null ? weekday : this.add(input - weekday, 'd');\n }\n\n function getSetISODayOfWeek (input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n\n // behaves the same as moment#day except\n // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)\n // as a setter, sunday should belong to the previous week.\n\n if (input != null) {\n var weekday = parseIsoWeekday(input, this.localeData());\n return this.day(this.day() % 7 ? weekday : weekday - 7);\n } else {\n return this.day() || 7;\n }\n }\n\n var defaultWeekdaysRegex = matchWord;\n function weekdaysRegex (isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysStrictRegex;\n } else {\n return this._weekdaysRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n this._weekdaysRegex = defaultWeekdaysRegex;\n }\n return this._weekdaysStrictRegex && isStrict ?\n this._weekdaysStrictRegex : this._weekdaysRegex;\n }\n }\n\n var defaultWeekdaysShortRegex = matchWord;\n function weekdaysShortRegex (isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysShortStrictRegex;\n } else {\n return this._weekdaysShortRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysShortRegex')) {\n this._weekdaysShortRegex = defaultWeekdaysShortRegex;\n }\n return this._weekdaysShortStrictRegex && isStrict ?\n this._weekdaysShortStrictRegex : this._weekdaysShortRegex;\n }\n }\n\n var defaultWeekdaysMinRegex = matchWord;\n function weekdaysMinRegex (isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysMinStrictRegex;\n } else {\n return this._weekdaysMinRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysMinRegex')) {\n this._weekdaysMinRegex = defaultWeekdaysMinRegex;\n }\n return this._weekdaysMinStrictRegex && isStrict ?\n this._weekdaysMinStrictRegex : this._weekdaysMinRegex;\n }\n }\n\n\n function computeWeekdaysParse () {\n function cmpLenRev(a, b) {\n return b.length - a.length;\n }\n\n var minPieces = [], shortPieces = [], longPieces = [], mixedPieces = [],\n i, mom, minp, shortp, longp;\n for (i = 0; i < 7; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, 1]).day(i);\n minp = this.weekdaysMin(mom, '');\n shortp = this.weekdaysShort(mom, '');\n longp = this.weekdays(mom, '');\n minPieces.push(minp);\n shortPieces.push(shortp);\n longPieces.push(longp);\n mixedPieces.push(minp);\n mixedPieces.push(shortp);\n mixedPieces.push(longp);\n }\n // Sorting makes sure if one weekday (or abbr) is a prefix of another it\n // will match the longer piece.\n minPieces.sort(cmpLenRev);\n shortPieces.sort(cmpLenRev);\n longPieces.sort(cmpLenRev);\n mixedPieces.sort(cmpLenRev);\n for (i = 0; i < 7; i++) {\n shortPieces[i] = regexEscape(shortPieces[i]);\n longPieces[i] = regexEscape(longPieces[i]);\n mixedPieces[i] = regexEscape(mixedPieces[i]);\n }\n\n this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._weekdaysShortRegex = this._weekdaysRegex;\n this._weekdaysMinRegex = this._weekdaysRegex;\n\n this._weekdaysStrictRegex = new RegExp('^(' + longPieces.join('|') + ')', 'i');\n this._weekdaysShortStrictRegex = new RegExp('^(' + shortPieces.join('|') + ')', 'i');\n this._weekdaysMinStrictRegex = new RegExp('^(' + minPieces.join('|') + ')', 'i');\n }\n\n // FORMATTING\n\n function hFormat() {\n return this.hours() % 12 || 12;\n }\n\n function kFormat() {\n return this.hours() || 24;\n }\n\n addFormatToken('H', ['HH', 2], 0, 'hour');\n addFormatToken('h', ['hh', 2], 0, hFormat);\n addFormatToken('k', ['kk', 2], 0, kFormat);\n\n addFormatToken('hmm', 0, 0, function () {\n return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2);\n });\n\n addFormatToken('hmmss', 0, 0, function () {\n return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2) +\n zeroFill(this.seconds(), 2);\n });\n\n addFormatToken('Hmm', 0, 0, function () {\n return '' + this.hours() + zeroFill(this.minutes(), 2);\n });\n\n addFormatToken('Hmmss', 0, 0, function () {\n return '' + this.hours() + zeroFill(this.minutes(), 2) +\n zeroFill(this.seconds(), 2);\n });\n\n function meridiem (token, lowercase) {\n addFormatToken(token, 0, 0, function () {\n return this.localeData().meridiem(this.hours(), this.minutes(), lowercase);\n });\n }\n\n meridiem('a', true);\n meridiem('A', false);\n\n // ALIASES\n\n addUnitAlias('hour', 'h');\n\n // PRIORITY\n addUnitPriority('hour', 13);\n\n // PARSING\n\n function matchMeridiem (isStrict, locale) {\n return locale._meridiemParse;\n }\n\n addRegexToken('a', matchMeridiem);\n addRegexToken('A', matchMeridiem);\n addRegexToken('H', match1to2);\n addRegexToken('h', match1to2);\n addRegexToken('k', match1to2);\n addRegexToken('HH', match1to2, match2);\n addRegexToken('hh', match1to2, match2);\n addRegexToken('kk', match1to2, match2);\n\n addRegexToken('hmm', match3to4);\n addRegexToken('hmmss', match5to6);\n addRegexToken('Hmm', match3to4);\n addRegexToken('Hmmss', match5to6);\n\n addParseToken(['H', 'HH'], HOUR);\n addParseToken(['k', 'kk'], function (input, array, config) {\n var kInput = toInt(input);\n array[HOUR] = kInput === 24 ? 0 : kInput;\n });\n addParseToken(['a', 'A'], function (input, array, config) {\n config._isPm = config._locale.isPM(input);\n config._meridiem = input;\n });\n addParseToken(['h', 'hh'], function (input, array, config) {\n array[HOUR] = toInt(input);\n getParsingFlags(config).bigHour = true;\n });\n addParseToken('hmm', function (input, array, config) {\n var pos = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos));\n array[MINUTE] = toInt(input.substr(pos));\n getParsingFlags(config).bigHour = true;\n });\n addParseToken('hmmss', function (input, array, config) {\n var pos1 = input.length - 4;\n var pos2 = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos1));\n array[MINUTE] = toInt(input.substr(pos1, 2));\n array[SECOND] = toInt(input.substr(pos2));\n getParsingFlags(config).bigHour = true;\n });\n addParseToken('Hmm', function (input, array, config) {\n var pos = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos));\n array[MINUTE] = toInt(input.substr(pos));\n });\n addParseToken('Hmmss', function (input, array, config) {\n var pos1 = input.length - 4;\n var pos2 = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos1));\n array[MINUTE] = toInt(input.substr(pos1, 2));\n array[SECOND] = toInt(input.substr(pos2));\n });\n\n // LOCALES\n\n function localeIsPM (input) {\n // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays\n // Using charAt should be more compatible.\n return ((input + '').toLowerCase().charAt(0) === 'p');\n }\n\n var defaultLocaleMeridiemParse = /[ap]\\.?m?\\.?/i;\n function localeMeridiem (hours, minutes, isLower) {\n if (hours > 11) {\n return isLower ? 'pm' : 'PM';\n } else {\n return isLower ? 'am' : 'AM';\n }\n }\n\n\n // MOMENTS\n\n // Setting the hour should keep the time, because the user explicitly\n // specified which hour they want. So trying to maintain the same hour (in\n // a new timezone) makes sense. Adding/subtracting hours does not follow\n // this rule.\n var getSetHour = makeGetSet('Hours', true);\n\n var baseConfig = {\n calendar: defaultCalendar,\n longDateFormat: defaultLongDateFormat,\n invalidDate: defaultInvalidDate,\n ordinal: defaultOrdinal,\n dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse,\n relativeTime: defaultRelativeTime,\n\n months: defaultLocaleMonths,\n monthsShort: defaultLocaleMonthsShort,\n\n week: defaultLocaleWeek,\n\n weekdays: defaultLocaleWeekdays,\n weekdaysMin: defaultLocaleWeekdaysMin,\n weekdaysShort: defaultLocaleWeekdaysShort,\n\n meridiemParse: defaultLocaleMeridiemParse\n };\n\n // internal storage for locale config files\n var locales = {};\n var localeFamilies = {};\n var globalLocale;\n\n function normalizeLocale(key) {\n return key ? key.toLowerCase().replace('_', '-') : key;\n }\n\n // pick the locale from the array\n // try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each\n // substring from most specific to least, but move to the next array item if it's a more specific variant than the current root\n function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return globalLocale;\n }\n\n function loadLocale(name) {\n var oldLocale = null;\n // TODO: Find a better way to register and load all the locales in Node\n if (!locales[name] && (typeof module !== 'undefined') &&\n module && module.exports) {\n try {\n oldLocale = globalLocale._abbr;\n var aliasedRequire = require;\n aliasedRequire('./locale/' + name);\n getSetGlobalLocale(oldLocale);\n } catch (e) {}\n }\n return locales[name];\n }\n\n // This function will load locale and then set the global locale. If\n // no arguments are passed in, it will simply return the current global\n // locale key.\n function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n }\n\n function defineLocale (name, config) {\n if (config !== null) {\n var locale, parentConfig = baseConfig;\n config.abbr = name;\n if (locales[name] != null) {\n deprecateSimple('defineLocaleOverride',\n 'use moment.updateLocale(localeName, config) to change ' +\n 'an existing locale. moment.defineLocale(localeName, ' +\n 'config) should only be used for creating a new locale ' +\n 'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.');\n parentConfig = locales[name]._config;\n } else if (config.parentLocale != null) {\n if (locales[config.parentLocale] != null) {\n parentConfig = locales[config.parentLocale]._config;\n } else {\n locale = loadLocale(config.parentLocale);\n if (locale != null) {\n parentConfig = locale._config;\n } else {\n if (!localeFamilies[config.parentLocale]) {\n localeFamilies[config.parentLocale] = [];\n }\n localeFamilies[config.parentLocale].push({\n name: name,\n config: config\n });\n return null;\n }\n }\n }\n locales[name] = new Locale(mergeConfigs(parentConfig, config));\n\n if (localeFamilies[name]) {\n localeFamilies[name].forEach(function (x) {\n defineLocale(x.name, x.config);\n });\n }\n\n // backwards compat for now: also set the locale\n // make sure we set the locale AFTER all child locales have been\n // created, so we won't end up with the child locale set.\n getSetGlobalLocale(name);\n\n\n return locales[name];\n } else {\n // useful for testing\n delete locales[name];\n return null;\n }\n }\n\n function updateLocale(name, config) {\n if (config != null) {\n var locale, tmpLocale, parentConfig = baseConfig;\n // MERGE\n tmpLocale = loadLocale(name);\n if (tmpLocale != null) {\n parentConfig = tmpLocale._config;\n }\n config = mergeConfigs(parentConfig, config);\n locale = new Locale(config);\n locale.parentLocale = locales[name];\n locales[name] = locale;\n\n // backwards compat for now: also set the locale\n getSetGlobalLocale(name);\n } else {\n // pass null for config to unupdate, useful for tests\n if (locales[name] != null) {\n if (locales[name].parentLocale != null) {\n locales[name] = locales[name].parentLocale;\n } else if (locales[name] != null) {\n delete locales[name];\n }\n }\n }\n return locales[name];\n }\n\n // returns locale data\n function getLocale (key) {\n var locale;\n\n if (key && key._locale && key._locale._abbr) {\n key = key._locale._abbr;\n }\n\n if (!key) {\n return globalLocale;\n }\n\n if (!isArray(key)) {\n //short-circuit everything else\n locale = loadLocale(key);\n if (locale) {\n return locale;\n }\n key = [key];\n }\n\n return chooseLocale(key);\n }\n\n function listLocales() {\n return keys(locales);\n }\n\n function checkOverflow (m) {\n var overflow;\n var a = m._a;\n\n if (a && getParsingFlags(m).overflow === -2) {\n overflow =\n a[MONTH] < 0 || a[MONTH] > 11 ? MONTH :\n a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH]) ? DATE :\n a[HOUR] < 0 || a[HOUR] > 24 || (a[HOUR] === 24 && (a[MINUTE] !== 0 || a[SECOND] !== 0 || a[MILLISECOND] !== 0)) ? HOUR :\n a[MINUTE] < 0 || a[MINUTE] > 59 ? MINUTE :\n a[SECOND] < 0 || a[SECOND] > 59 ? SECOND :\n a[MILLISECOND] < 0 || a[MILLISECOND] > 999 ? MILLISECOND :\n -1;\n\n if (getParsingFlags(m)._overflowDayOfYear && (overflow < YEAR || overflow > DATE)) {\n overflow = DATE;\n }\n if (getParsingFlags(m)._overflowWeeks && overflow === -1) {\n overflow = WEEK;\n }\n if (getParsingFlags(m)._overflowWeekday && overflow === -1) {\n overflow = WEEKDAY;\n }\n\n getParsingFlags(m).overflow = overflow;\n }\n\n return m;\n }\n\n // Pick the first defined of two or three arguments.\n function defaults(a, b, c) {\n if (a != null) {\n return a;\n }\n if (b != null) {\n return b;\n }\n return c;\n }\n\n function currentDateArray(config) {\n // hooks is actually the exported moment object\n var nowValue = new Date(hooks.now());\n if (config._useUTC) {\n return [nowValue.getUTCFullYear(), nowValue.getUTCMonth(), nowValue.getUTCDate()];\n }\n return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()];\n }\n\n // convert an array to a date.\n // the array should mirror the parameters below\n // note: all values past the year are optional and will default to the lowest possible value.\n // [year, month, day , hour, minute, second, millisecond]\n function configFromArray (config) {\n var i, date, input = [], currentDate, expectedWeekday, yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear != null) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse) || config._dayOfYear === 0) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n expectedWeekday = config._useUTC ? config._d.getUTCDay() : config._d.getDay();\n\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n\n // check for mismatching day of week\n if (config._w && typeof config._w.d !== 'undefined' && config._w.d !== expectedWeekday) {\n getParsingFlags(config).weekdayMismatch = true;\n }\n }\n\n function dayOfYearFromWeekInfo(config) {\n var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow;\n\n w = config._w;\n if (w.GG != null || w.W != null || w.E != null) {\n dow = 1;\n doy = 4;\n\n // TODO: We need to take the current isoWeekYear, but that depends on\n // how we interpret now (local, utc, fixed offset). So create\n // a now version of current config (take local/utc/offset flags, and\n // create now).\n weekYear = defaults(w.GG, config._a[YEAR], weekOfYear(createLocal(), 1, 4).year);\n week = defaults(w.W, 1);\n weekday = defaults(w.E, 1);\n if (weekday < 1 || weekday > 7) {\n weekdayOverflow = true;\n }\n } else {\n dow = config._locale._week.dow;\n doy = config._locale._week.doy;\n\n var curWeek = weekOfYear(createLocal(), dow, doy);\n\n weekYear = defaults(w.gg, config._a[YEAR], curWeek.year);\n\n // Default to current week.\n week = defaults(w.w, curWeek.week);\n\n if (w.d != null) {\n // weekday -- low day numbers are considered next week\n weekday = w.d;\n if (weekday < 0 || weekday > 6) {\n weekdayOverflow = true;\n }\n } else if (w.e != null) {\n // local weekday -- counting starts from beginning of week\n weekday = w.e + dow;\n if (w.e < 0 || w.e > 6) {\n weekdayOverflow = true;\n }\n } else {\n // default to beginning of week\n weekday = dow;\n }\n }\n if (week < 1 || week > weeksInYear(weekYear, dow, doy)) {\n getParsingFlags(config)._overflowWeeks = true;\n } else if (weekdayOverflow != null) {\n getParsingFlags(config)._overflowWeekday = true;\n } else {\n temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy);\n config._a[YEAR] = temp.year;\n config._dayOfYear = temp.dayOfYear;\n }\n }\n\n // iso 8601 regex\n // 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00)\n var extendedIsoRegex = /^\\s*((?:[+-]\\d{6}|\\d{4})-(?:\\d\\d-\\d\\d|W\\d\\d-\\d|W\\d\\d|\\d\\d\\d|\\d\\d))(?:(T| )(\\d\\d(?::\\d\\d(?::\\d\\d(?:[.,]\\d+)?)?)?)([\\+\\-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/;\n var basicIsoRegex = /^\\s*((?:[+-]\\d{6}|\\d{4})(?:\\d\\d\\d\\d|W\\d\\d\\d|W\\d\\d|\\d\\d\\d|\\d\\d))(?:(T| )(\\d\\d(?:\\d\\d(?:\\d\\d(?:[.,]\\d+)?)?)?)([\\+\\-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/;\n\n var tzRegex = /Z|[+-]\\d\\d(?::?\\d\\d)?/;\n\n var isoDates = [\n ['YYYYYY-MM-DD', /[+-]\\d{6}-\\d\\d-\\d\\d/],\n ['YYYY-MM-DD', /\\d{4}-\\d\\d-\\d\\d/],\n ['GGGG-[W]WW-E', /\\d{4}-W\\d\\d-\\d/],\n ['GGGG-[W]WW', /\\d{4}-W\\d\\d/, false],\n ['YYYY-DDD', /\\d{4}-\\d{3}/],\n ['YYYY-MM', /\\d{4}-\\d\\d/, false],\n ['YYYYYYMMDD', /[+-]\\d{10}/],\n ['YYYYMMDD', /\\d{8}/],\n // YYYYMM is NOT allowed by the standard\n ['GGGG[W]WWE', /\\d{4}W\\d{3}/],\n ['GGGG[W]WW', /\\d{4}W\\d{2}/, false],\n ['YYYYDDD', /\\d{7}/]\n ];\n\n // iso time formats and regexes\n var isoTimes = [\n ['HH:mm:ss.SSSS', /\\d\\d:\\d\\d:\\d\\d\\.\\d+/],\n ['HH:mm:ss,SSSS', /\\d\\d:\\d\\d:\\d\\d,\\d+/],\n ['HH:mm:ss', /\\d\\d:\\d\\d:\\d\\d/],\n ['HH:mm', /\\d\\d:\\d\\d/],\n ['HHmmss.SSSS', /\\d\\d\\d\\d\\d\\d\\.\\d+/],\n ['HHmmss,SSSS', /\\d\\d\\d\\d\\d\\d,\\d+/],\n ['HHmmss', /\\d\\d\\d\\d\\d\\d/],\n ['HHmm', /\\d\\d\\d\\d/],\n ['HH', /\\d\\d/]\n ];\n\n var aspNetJsonRegex = /^\\/?Date\\((\\-?\\d+)/i;\n\n // date from iso format\n function configFromISO(config) {\n var i, l,\n string = config._i,\n match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string),\n allowTime, dateFormat, timeFormat, tzFormat;\n\n if (match) {\n getParsingFlags(config).iso = true;\n\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(match[1])) {\n dateFormat = isoDates[i][0];\n allowTime = isoDates[i][2] !== false;\n break;\n }\n }\n if (dateFormat == null) {\n config._isValid = false;\n return;\n }\n if (match[3]) {\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(match[3])) {\n // match[2] should be 'T' or space\n timeFormat = (match[2] || ' ') + isoTimes[i][0];\n break;\n }\n }\n if (timeFormat == null) {\n config._isValid = false;\n return;\n }\n }\n if (!allowTime && timeFormat != null) {\n config._isValid = false;\n return;\n }\n if (match[4]) {\n if (tzRegex.exec(match[4])) {\n tzFormat = 'Z';\n } else {\n config._isValid = false;\n return;\n }\n }\n config._f = dateFormat + (timeFormat || '') + (tzFormat || '');\n configFromStringAndFormat(config);\n } else {\n config._isValid = false;\n }\n }\n\n // RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3\n var rfc2822 = /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\\s)?(\\d{1,2})\\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\\s(\\d{2,4})\\s(\\d\\d):(\\d\\d)(?::(\\d\\d))?\\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\\d{4}))$/;\n\n function extractFromRFC2822Strings(yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr) {\n var result = [\n untruncateYear(yearStr),\n defaultLocaleMonthsShort.indexOf(monthStr),\n parseInt(dayStr, 10),\n parseInt(hourStr, 10),\n parseInt(minuteStr, 10)\n ];\n\n if (secondStr) {\n result.push(parseInt(secondStr, 10));\n }\n\n return result;\n }\n\n function untruncateYear(yearStr) {\n var year = parseInt(yearStr, 10);\n if (year <= 49) {\n return 2000 + year;\n } else if (year <= 999) {\n return 1900 + year;\n }\n return year;\n }\n\n function preprocessRFC2822(s) {\n // Remove comments and folding whitespace and replace multiple-spaces with a single space\n return s.replace(/\\([^)]*\\)|[\\n\\t]/g, ' ').replace(/(\\s\\s+)/g, ' ').replace(/^\\s\\s*/, '').replace(/\\s\\s*$/, '');\n }\n\n function checkWeekday(weekdayStr, parsedInput, config) {\n if (weekdayStr) {\n // TODO: Replace the vanilla JS Date object with an indepentent day-of-week check.\n var weekdayProvided = defaultLocaleWeekdaysShort.indexOf(weekdayStr),\n weekdayActual = new Date(parsedInput[0], parsedInput[1], parsedInput[2]).getDay();\n if (weekdayProvided !== weekdayActual) {\n getParsingFlags(config).weekdayMismatch = true;\n config._isValid = false;\n return false;\n }\n }\n return true;\n }\n\n var obsOffsets = {\n UT: 0,\n GMT: 0,\n EDT: -4 * 60,\n EST: -5 * 60,\n CDT: -5 * 60,\n CST: -6 * 60,\n MDT: -6 * 60,\n MST: -7 * 60,\n PDT: -7 * 60,\n PST: -8 * 60\n };\n\n function calculateOffset(obsOffset, militaryOffset, numOffset) {\n if (obsOffset) {\n return obsOffsets[obsOffset];\n } else if (militaryOffset) {\n // the only allowed military tz is Z\n return 0;\n } else {\n var hm = parseInt(numOffset, 10);\n var m = hm % 100, h = (hm - m) / 100;\n return h * 60 + m;\n }\n }\n\n // date and time from ref 2822 format\n function configFromRFC2822(config) {\n var match = rfc2822.exec(preprocessRFC2822(config._i));\n if (match) {\n var parsedArray = extractFromRFC2822Strings(match[4], match[3], match[2], match[5], match[6], match[7]);\n if (!checkWeekday(match[1], parsedArray, config)) {\n return;\n }\n\n config._a = parsedArray;\n config._tzm = calculateOffset(match[8], match[9], match[10]);\n\n config._d = createUTCDate.apply(null, config._a);\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n\n getParsingFlags(config).rfc2822 = true;\n } else {\n config._isValid = false;\n }\n }\n\n // date from iso format or fallback\n function configFromString(config) {\n var matched = aspNetJsonRegex.exec(config._i);\n\n if (matched !== null) {\n config._d = new Date(+matched[1]);\n return;\n }\n\n configFromISO(config);\n if (config._isValid === false) {\n delete config._isValid;\n } else {\n return;\n }\n\n configFromRFC2822(config);\n if (config._isValid === false) {\n delete config._isValid;\n } else {\n return;\n }\n\n // Final attempt, use Input Fallback\n hooks.createFromInputFallback(config);\n }\n\n hooks.createFromInputFallback = deprecate(\n 'value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), ' +\n 'which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are ' +\n 'discouraged and will be removed in an upcoming major release. Please refer to ' +\n 'http://momentjs.com/guides/#/warnings/js-date/ for more info.',\n function (config) {\n config._d = new Date(config._i + (config._useUTC ? ' UTC' : ''));\n }\n );\n\n // constant that refers to the ISO standard\n hooks.ISO_8601 = function () {};\n\n // constant that refers to the RFC 2822 form\n hooks.RFC_2822 = function () {};\n\n // date from string and format string\n function configFromStringAndFormat(config) {\n // TODO: Move this to another part of the creation flow to prevent circular deps\n if (config._f === hooks.ISO_8601) {\n configFromISO(config);\n return;\n }\n if (config._f === hooks.RFC_2822) {\n configFromRFC2822(config);\n return;\n }\n config._a = [];\n getParsingFlags(config).empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n // console.log('token', token, 'parsedInput', parsedInput,\n // 'regex', getParseRegexForToken(token, config));\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n getParsingFlags(config).unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n getParsingFlags(config).empty = false;\n }\n else {\n getParsingFlags(config).unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n getParsingFlags(config).unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n getParsingFlags(config).charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n getParsingFlags(config).unusedInput.push(string);\n }\n\n // clear _12h flag if hour is <= 12\n if (config._a[HOUR] <= 12 &&\n getParsingFlags(config).bigHour === true &&\n config._a[HOUR] > 0) {\n getParsingFlags(config).bigHour = undefined;\n }\n\n getParsingFlags(config).parsedDateParts = config._a.slice(0);\n getParsingFlags(config).meridiem = config._meridiem;\n // handle meridiem\n config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR], config._meridiem);\n\n configFromArray(config);\n checkOverflow(config);\n }\n\n\n function meridiemFixWrap (locale, hour, meridiem) {\n var isPm;\n\n if (meridiem == null) {\n // nothing to do\n return hour;\n }\n if (locale.meridiemHour != null) {\n return locale.meridiemHour(hour, meridiem);\n } else if (locale.isPM != null) {\n // Fallback\n isPm = locale.isPM(meridiem);\n if (isPm && hour < 12) {\n hour += 12;\n }\n if (!isPm && hour === 12) {\n hour = 0;\n }\n return hour;\n } else {\n // this is not supposed to happen\n return hour;\n }\n }\n\n // date from string and array of format strings\n function configFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n\n scoreToBeat,\n i,\n currentScore;\n\n if (config._f.length === 0) {\n getParsingFlags(config).invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < config._f.length; i++) {\n currentScore = 0;\n tempConfig = copyConfig({}, config);\n if (config._useUTC != null) {\n tempConfig._useUTC = config._useUTC;\n }\n tempConfig._f = config._f[i];\n configFromStringAndFormat(tempConfig);\n\n if (!isValid(tempConfig)) {\n continue;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += getParsingFlags(tempConfig).charsLeftOver;\n\n //or tokens\n currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10;\n\n getParsingFlags(tempConfig).score = currentScore;\n\n if (scoreToBeat == null || currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n\n extend(config, bestMoment || tempConfig);\n }\n\n function configFromObject(config) {\n if (config._d) {\n return;\n }\n\n var i = normalizeObjectUnits(config._i);\n config._a = map([i.year, i.month, i.day || i.date, i.hour, i.minute, i.second, i.millisecond], function (obj) {\n return obj && parseInt(obj, 10);\n });\n\n configFromArray(config);\n }\n\n function createFromConfig (config) {\n var res = new Moment(checkOverflow(prepareConfig(config)));\n if (res._nextDay) {\n // Adding is smart enough around DST\n res.add(1, 'd');\n res._nextDay = undefined;\n }\n\n return res;\n }\n\n function prepareConfig (config) {\n var input = config._i,\n format = config._f;\n\n config._locale = config._locale || getLocale(config._l);\n\n if (input === null || (format === undefined && input === '')) {\n return createInvalid({nullInput: true});\n }\n\n if (typeof input === 'string') {\n config._i = input = config._locale.preparse(input);\n }\n\n if (isMoment(input)) {\n return new Moment(checkOverflow(input));\n } else if (isDate(input)) {\n config._d = input;\n } else if (isArray(format)) {\n configFromStringAndArray(config);\n } else if (format) {\n configFromStringAndFormat(config);\n } else {\n configFromInput(config);\n }\n\n if (!isValid(config)) {\n config._d = null;\n }\n\n return config;\n }\n\n function configFromInput(config) {\n var input = config._i;\n if (isUndefined(input)) {\n config._d = new Date(hooks.now());\n } else if (isDate(input)) {\n config._d = new Date(input.valueOf());\n } else if (typeof input === 'string') {\n configFromString(config);\n } else if (isArray(input)) {\n config._a = map(input.slice(0), function (obj) {\n return parseInt(obj, 10);\n });\n configFromArray(config);\n } else if (isObject(input)) {\n configFromObject(config);\n } else if (isNumber(input)) {\n // from milliseconds\n config._d = new Date(input);\n } else {\n hooks.createFromInputFallback(config);\n }\n }\n\n function createLocalOrUTC (input, format, locale, strict, isUTC) {\n var c = {};\n\n if (locale === true || locale === false) {\n strict = locale;\n locale = undefined;\n }\n\n if ((isObject(input) && isObjectEmpty(input)) ||\n (isArray(input) && input.length === 0)) {\n input = undefined;\n }\n // object construction must be done this way.\n // https://github.com/moment/moment/issues/1423\n c._isAMomentObject = true;\n c._useUTC = c._isUTC = isUTC;\n c._l = locale;\n c._i = input;\n c._f = format;\n c._strict = strict;\n\n return createFromConfig(c);\n }\n\n function createLocal (input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, false);\n }\n\n var prototypeMin = deprecate(\n 'moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/',\n function () {\n var other = createLocal.apply(null, arguments);\n if (this.isValid() && other.isValid()) {\n return other < this ? this : other;\n } else {\n return createInvalid();\n }\n }\n );\n\n var prototypeMax = deprecate(\n 'moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/',\n function () {\n var other = createLocal.apply(null, arguments);\n if (this.isValid() && other.isValid()) {\n return other > this ? this : other;\n } else {\n return createInvalid();\n }\n }\n );\n\n // Pick a moment m from moments so that m[fn](other) is true for all\n // other. This relies on the function fn to be transitive.\n //\n // moments should either be an array of moment objects or an array, whose\n // first element is an array of moment objects.\n function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return createLocal();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }\n\n // TODO: Use [].sort instead?\n function min () {\n var args = [].slice.call(arguments, 0);\n\n return pickBy('isBefore', args);\n }\n\n function max () {\n var args = [].slice.call(arguments, 0);\n\n return pickBy('isAfter', args);\n }\n\n var now = function () {\n return Date.now ? Date.now() : +(new Date());\n };\n\n var ordering = ['year', 'quarter', 'month', 'week', 'day', 'hour', 'minute', 'second', 'millisecond'];\n\n function isDurationValid(m) {\n for (var key in m) {\n if (!(indexOf.call(ordering, key) !== -1 && (m[key] == null || !isNaN(m[key])))) {\n return false;\n }\n }\n\n var unitHasDecimal = false;\n for (var i = 0; i < ordering.length; ++i) {\n if (m[ordering[i]]) {\n if (unitHasDecimal) {\n return false; // only allow non-integers for smallest unit\n }\n if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) {\n unitHasDecimal = true;\n }\n }\n }\n\n return true;\n }\n\n function isValid$1() {\n return this._isValid;\n }\n\n function createInvalid$1() {\n return createDuration(NaN);\n }\n\n function Duration (duration) {\n var normalizedInput = normalizeObjectUnits(duration),\n years = normalizedInput.year || 0,\n quarters = normalizedInput.quarter || 0,\n months = normalizedInput.month || 0,\n weeks = normalizedInput.week || normalizedInput.isoWeek || 0,\n days = normalizedInput.day || 0,\n hours = normalizedInput.hour || 0,\n minutes = normalizedInput.minute || 0,\n seconds = normalizedInput.second || 0,\n milliseconds = normalizedInput.millisecond || 0;\n\n this._isValid = isDurationValid(normalizedInput);\n\n // representation for dateAddRemove\n this._milliseconds = +milliseconds +\n seconds * 1e3 + // 1000\n minutes * 6e4 + // 1000 * 60\n hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978\n // Because of dateAddRemove treats 24 hours as different from a\n // day when working around DST, we need to store them separately\n this._days = +days +\n weeks * 7;\n // It is impossible to translate months into days without knowing\n // which months you are are talking about, so we have to store\n // it separately.\n this._months = +months +\n quarters * 3 +\n years * 12;\n\n this._data = {};\n\n this._locale = getLocale();\n\n this._bubble();\n }\n\n function isDuration (obj) {\n return obj instanceof Duration;\n }\n\n function absRound (number) {\n if (number < 0) {\n return Math.round(-1 * number) * -1;\n } else {\n return Math.round(number);\n }\n }\n\n // FORMATTING\n\n function offset (token, separator) {\n addFormatToken(token, 0, 0, function () {\n var offset = this.utcOffset();\n var sign = '+';\n if (offset < 0) {\n offset = -offset;\n sign = '-';\n }\n return sign + zeroFill(~~(offset / 60), 2) + separator + zeroFill(~~(offset) % 60, 2);\n });\n }\n\n offset('Z', ':');\n offset('ZZ', '');\n\n // PARSING\n\n addRegexToken('Z', matchShortOffset);\n addRegexToken('ZZ', matchShortOffset);\n addParseToken(['Z', 'ZZ'], function (input, array, config) {\n config._useUTC = true;\n config._tzm = offsetFromString(matchShortOffset, input);\n });\n\n // HELPERS\n\n // timezone chunker\n // '+10:00' > ['10', '00']\n // '-1530' > ['-15', '30']\n var chunkOffset = /([\\+\\-]|\\d\\d)/gi;\n\n function offsetFromString(matcher, string) {\n var matches = (string || '').match(matcher);\n\n if (matches === null) {\n return null;\n }\n\n var chunk = matches[matches.length - 1] || [];\n var parts = (chunk + '').match(chunkOffset) || ['-', 0, 0];\n var minutes = +(parts[1] * 60) + toInt(parts[2]);\n\n return minutes === 0 ?\n 0 :\n parts[0] === '+' ? minutes : -minutes;\n }\n\n // Return a moment from input, that is local/utc/zone equivalent to model.\n function cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? input.valueOf() : createLocal(input).valueOf()) - res.valueOf();\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(res._d.valueOf() + diff);\n hooks.updateOffset(res, false);\n return res;\n } else {\n return createLocal(input).local();\n }\n }\n\n function getDateOffset (m) {\n // On Firefox.24 Date#getTimezoneOffset returns a floating point.\n // https://github.com/moment/moment/pull/1871\n return -Math.round(m._d.getTimezoneOffset() / 15) * 15;\n }\n\n // HOOKS\n\n // This function will be called whenever a moment is mutated.\n // It is intended to keep the offset in sync with the timezone.\n hooks.updateOffset = function () {};\n\n // MOMENTS\n\n // keepLocalTime = true means only change the timezone, without\n // affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]-->\n // 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset\n // +0200, so we adjust the time as needed, to be valid.\n //\n // Keeping the time actually adds/subtracts (one hour)\n // from the actual represented time. That is why we call updateOffset\n // a second time. In case it wants us to change the offset again\n // _changeInProgress == true case, then we have to adjust, because\n // there is no such time in the given timezone.\n function getSetOffset (input, keepLocalTime, keepMinutes) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n if (input === null) {\n return this;\n }\n } else if (Math.abs(input) < 16 && !keepMinutes) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n addSubtract(this, createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }\n\n function getSetZone (input, keepLocalTime) {\n if (input != null) {\n if (typeof input !== 'string') {\n input = -input;\n }\n\n this.utcOffset(input, keepLocalTime);\n\n return this;\n } else {\n return -this.utcOffset();\n }\n }\n\n function setOffsetToUTC (keepLocalTime) {\n return this.utcOffset(0, keepLocalTime);\n }\n\n function setOffsetToLocal (keepLocalTime) {\n if (this._isUTC) {\n this.utcOffset(0, keepLocalTime);\n this._isUTC = false;\n\n if (keepLocalTime) {\n this.subtract(getDateOffset(this), 'm');\n }\n }\n return this;\n }\n\n function setOffsetToParsedOffset () {\n if (this._tzm != null) {\n this.utcOffset(this._tzm, false, true);\n } else if (typeof this._i === 'string') {\n var tZone = offsetFromString(matchOffset, this._i);\n if (tZone != null) {\n this.utcOffset(tZone);\n }\n else {\n this.utcOffset(0, true);\n }\n }\n return this;\n }\n\n function hasAlignedHourOffset (input) {\n if (!this.isValid()) {\n return false;\n }\n input = input ? createLocal(input).utcOffset() : 0;\n\n return (this.utcOffset() - input) % 60 === 0;\n }\n\n function isDaylightSavingTime () {\n return (\n this.utcOffset() > this.clone().month(0).utcOffset() ||\n this.utcOffset() > this.clone().month(5).utcOffset()\n );\n }\n\n function isDaylightSavingTimeShifted () {\n if (!isUndefined(this._isDSTShifted)) {\n return this._isDSTShifted;\n }\n\n var c = {};\n\n copyConfig(c, this);\n c = prepareConfig(c);\n\n if (c._a) {\n var other = c._isUTC ? createUTC(c._a) : createLocal(c._a);\n this._isDSTShifted = this.isValid() &&\n compareArrays(c._a, other.toArray()) > 0;\n } else {\n this._isDSTShifted = false;\n }\n\n return this._isDSTShifted;\n }\n\n function isLocal () {\n return this.isValid() ? !this._isUTC : false;\n }\n\n function isUtcOffset () {\n return this.isValid() ? this._isUTC : false;\n }\n\n function isUtc () {\n return this.isValid() ? this._isUTC && this._offset === 0 : false;\n }\n\n // ASP.NET json date format regex\n var aspNetRegex = /^(\\-|\\+)?(?:(\\d*)[. ])?(\\d+)\\:(\\d+)(?:\\:(\\d+)(\\.\\d*)?)?$/;\n\n // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html\n // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere\n // and further modified to allow for strings containing both week and day\n var isoRegex = /^(-|\\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;\n\n function createDuration (input, key) {\n var duration = input,\n // matching against regexp is expensive, do it on demand\n match = null,\n sign,\n ret,\n diffRes;\n\n if (isDuration(input)) {\n duration = {\n ms : input._milliseconds,\n d : input._days,\n M : input._months\n };\n } else if (isNumber(input)) {\n duration = {};\n if (key) {\n duration[key] = input;\n } else {\n duration.milliseconds = input;\n }\n } else if (!!(match = aspNetRegex.exec(input))) {\n sign = (match[1] === '-') ? -1 : 1;\n duration = {\n y : 0,\n d : toInt(match[DATE]) * sign,\n h : toInt(match[HOUR]) * sign,\n m : toInt(match[MINUTE]) * sign,\n s : toInt(match[SECOND]) * sign,\n ms : toInt(absRound(match[MILLISECOND] * 1000)) * sign // the millisecond decimal point is included in the match\n };\n } else if (!!(match = isoRegex.exec(input))) {\n sign = (match[1] === '-') ? -1 : 1;\n duration = {\n y : parseIso(match[2], sign),\n M : parseIso(match[3], sign),\n w : parseIso(match[4], sign),\n d : parseIso(match[5], sign),\n h : parseIso(match[6], sign),\n m : parseIso(match[7], sign),\n s : parseIso(match[8], sign)\n };\n } else if (duration == null) {// checks for null or undefined\n duration = {};\n } else if (typeof duration === 'object' && ('from' in duration || 'to' in duration)) {\n diffRes = momentsDifference(createLocal(duration.from), createLocal(duration.to));\n\n duration = {};\n duration.ms = diffRes.milliseconds;\n duration.M = diffRes.months;\n }\n\n ret = new Duration(duration);\n\n if (isDuration(input) && hasOwnProp(input, '_locale')) {\n ret._locale = input._locale;\n }\n\n return ret;\n }\n\n createDuration.fn = Duration.prototype;\n createDuration.invalid = createInvalid$1;\n\n function parseIso (inp, sign) {\n // We'd normally use ~~inp for this, but unfortunately it also\n // converts floats to ints.\n // inp may be undefined, so careful calling replace on it.\n var res = inp && parseFloat(inp.replace(',', '.'));\n // apply sign while we're at it\n return (isNaN(res) ? 0 : res) * sign;\n }\n\n function positiveMomentsDifference(base, other) {\n var res = {};\n\n res.months = other.month() - base.month() +\n (other.year() - base.year()) * 12;\n if (base.clone().add(res.months, 'M').isAfter(other)) {\n --res.months;\n }\n\n res.milliseconds = +other - +(base.clone().add(res.months, 'M'));\n\n return res;\n }\n\n function momentsDifference(base, other) {\n var res;\n if (!(base.isValid() && other.isValid())) {\n return {milliseconds: 0, months: 0};\n }\n\n other = cloneWithOffset(other, base);\n if (base.isBefore(other)) {\n res = positiveMomentsDifference(base, other);\n } else {\n res = positiveMomentsDifference(other, base);\n res.milliseconds = -res.milliseconds;\n res.months = -res.months;\n }\n\n return res;\n }\n\n // TODO: remove 'name' arg after deprecation is removed\n function createAdder(direction, name) {\n return function (val, period) {\n var dur, tmp;\n //invert the arguments, but complain about it\n if (period !== null && !isNaN(+period)) {\n deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' +\n 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.');\n tmp = val; val = period; period = tmp;\n }\n\n val = typeof val === 'string' ? +val : val;\n dur = createDuration(val, period);\n addSubtract(this, dur, direction);\n return this;\n };\n }\n\n function addSubtract (mom, duration, isAdding, updateOffset) {\n var milliseconds = duration._milliseconds,\n days = absRound(duration._days),\n months = absRound(duration._months);\n\n if (!mom.isValid()) {\n // No op\n return;\n }\n\n updateOffset = updateOffset == null ? true : updateOffset;\n\n if (months) {\n setMonth(mom, get(mom, 'Month') + months * isAdding);\n }\n if (days) {\n set$1(mom, 'Date', get(mom, 'Date') + days * isAdding);\n }\n if (milliseconds) {\n mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding);\n }\n if (updateOffset) {\n hooks.updateOffset(mom, days || months);\n }\n }\n\n var add = createAdder(1, 'add');\n var subtract = createAdder(-1, 'subtract');\n\n function getCalendarFormat(myMoment, now) {\n var diff = myMoment.diff(now, 'days', true);\n return diff < -6 ? 'sameElse' :\n diff < -1 ? 'lastWeek' :\n diff < 0 ? 'lastDay' :\n diff < 1 ? 'sameDay' :\n diff < 2 ? 'nextDay' :\n diff < 7 ? 'nextWeek' : 'sameElse';\n }\n\n function calendar$1 (time, formats) {\n // We want to compare the start of today, vs this.\n // Getting start-of-today depends on whether we're local/utc/offset or not.\n var now = time || createLocal(),\n sod = cloneWithOffset(now, this).startOf('day'),\n format = hooks.calendarFormat(this, sod) || 'sameElse';\n\n var output = formats && (isFunction(formats[format]) ? formats[format].call(this, now) : formats[format]);\n\n return this.format(output || this.localeData().calendar(format, this, createLocal(now)));\n }\n\n function clone () {\n return new Moment(this);\n }\n\n function isAfter (input, units) {\n var localInput = isMoment(input) ? input : createLocal(input);\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() > localInput.valueOf();\n } else {\n return localInput.valueOf() < this.clone().startOf(units).valueOf();\n }\n }\n\n function isBefore (input, units) {\n var localInput = isMoment(input) ? input : createLocal(input);\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() < localInput.valueOf();\n } else {\n return this.clone().endOf(units).valueOf() < localInput.valueOf();\n }\n }\n\n function isBetween (from, to, units, inclusivity) {\n var localFrom = isMoment(from) ? from : createLocal(from),\n localTo = isMoment(to) ? to : createLocal(to);\n if (!(this.isValid() && localFrom.isValid() && localTo.isValid())) {\n return false;\n }\n inclusivity = inclusivity || '()';\n return (inclusivity[0] === '(' ? this.isAfter(localFrom, units) : !this.isBefore(localFrom, units)) &&\n (inclusivity[1] === ')' ? this.isBefore(localTo, units) : !this.isAfter(localTo, units));\n }\n\n function isSame (input, units) {\n var localInput = isMoment(input) ? input : createLocal(input),\n inputMs;\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() === localInput.valueOf();\n } else {\n inputMs = localInput.valueOf();\n return this.clone().startOf(units).valueOf() <= inputMs && inputMs <= this.clone().endOf(units).valueOf();\n }\n }\n\n function isSameOrAfter (input, units) {\n return this.isSame(input, units) || this.isAfter(input, units);\n }\n\n function isSameOrBefore (input, units) {\n return this.isSame(input, units) || this.isBefore(input, units);\n }\n\n function diff (input, units, asFloat) {\n var that,\n zoneDelta,\n output;\n\n if (!this.isValid()) {\n return NaN;\n }\n\n that = cloneWithOffset(input, this);\n\n if (!that.isValid()) {\n return NaN;\n }\n\n zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4;\n\n units = normalizeUnits(units);\n\n switch (units) {\n case 'year': output = monthDiff(this, that) / 12; break;\n case 'month': output = monthDiff(this, that); break;\n case 'quarter': output = monthDiff(this, that) / 3; break;\n case 'second': output = (this - that) / 1e3; break; // 1000\n case 'minute': output = (this - that) / 6e4; break; // 1000 * 60\n case 'hour': output = (this - that) / 36e5; break; // 1000 * 60 * 60\n case 'day': output = (this - that - zoneDelta) / 864e5; break; // 1000 * 60 * 60 * 24, negate dst\n case 'week': output = (this - that - zoneDelta) / 6048e5; break; // 1000 * 60 * 60 * 24 * 7, negate dst\n default: output = this - that;\n }\n\n return asFloat ? output : absFloor(output);\n }\n\n function monthDiff (a, b) {\n // difference in months\n var wholeMonthDiff = ((b.year() - a.year()) * 12) + (b.month() - a.month()),\n // b is in (anchor - 1 month, anchor + 1 month)\n anchor = a.clone().add(wholeMonthDiff, 'months'),\n anchor2, adjust;\n\n if (b - anchor < 0) {\n anchor2 = a.clone().add(wholeMonthDiff - 1, 'months');\n // linear across the month\n adjust = (b - anchor) / (anchor - anchor2);\n } else {\n anchor2 = a.clone().add(wholeMonthDiff + 1, 'months');\n // linear across the month\n adjust = (b - anchor) / (anchor2 - anchor);\n }\n\n //check for negative zero, return zero if negative zero\n return -(wholeMonthDiff + adjust) || 0;\n }\n\n hooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ';\n hooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]';\n\n function toString () {\n return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ');\n }\n\n function toISOString(keepOffset) {\n if (!this.isValid()) {\n return null;\n }\n var utc = keepOffset !== true;\n var m = utc ? this.clone().utc() : this;\n if (m.year() < 0 || m.year() > 9999) {\n return formatMoment(m, utc ? 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYYYY-MM-DD[T]HH:mm:ss.SSSZ');\n }\n if (isFunction(Date.prototype.toISOString)) {\n // native implementation is ~50x faster, use it when we can\n if (utc) {\n return this.toDate().toISOString();\n } else {\n return new Date(this.valueOf() + this.utcOffset() * 60 * 1000).toISOString().replace('Z', formatMoment(m, 'Z'));\n }\n }\n return formatMoment(m, utc ? 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYY-MM-DD[T]HH:mm:ss.SSSZ');\n }\n\n /**\n * Return a human readable representation of a moment that can\n * also be evaluated to get a new moment which is the same\n *\n * @link https://nodejs.org/dist/latest/docs/api/util.html#util_custom_inspect_function_on_objects\n */\n function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n }\n\n function format (inputString) {\n if (!inputString) {\n inputString = this.isUtc() ? hooks.defaultFormatUtc : hooks.defaultFormat;\n }\n var output = formatMoment(this, inputString);\n return this.localeData().postformat(output);\n }\n\n function from (time, withoutSuffix) {\n if (this.isValid() &&\n ((isMoment(time) && time.isValid()) ||\n createLocal(time).isValid())) {\n return createDuration({to: this, from: time}).locale(this.locale()).humanize(!withoutSuffix);\n } else {\n return this.localeData().invalidDate();\n }\n }\n\n function fromNow (withoutSuffix) {\n return this.from(createLocal(), withoutSuffix);\n }\n\n function to (time, withoutSuffix) {\n if (this.isValid() &&\n ((isMoment(time) && time.isValid()) ||\n createLocal(time).isValid())) {\n return createDuration({from: this, to: time}).locale(this.locale()).humanize(!withoutSuffix);\n } else {\n return this.localeData().invalidDate();\n }\n }\n\n function toNow (withoutSuffix) {\n return this.to(createLocal(), withoutSuffix);\n }\n\n // If passed a locale key, it will set the locale for this\n // instance. Otherwise, it will return the locale configuration\n // variables for this instance.\n function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n }\n\n var lang = deprecate(\n 'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.',\n function (key) {\n if (key === undefined) {\n return this.localeData();\n } else {\n return this.locale(key);\n }\n }\n );\n\n function localeData () {\n return this._locale;\n }\n\n var MS_PER_SECOND = 1000;\n var MS_PER_MINUTE = 60 * MS_PER_SECOND;\n var MS_PER_HOUR = 60 * MS_PER_MINUTE;\n var MS_PER_400_YEARS = (365 * 400 + 97) * 24 * MS_PER_HOUR;\n\n // actual modulo - handles negative numbers (for dates before 1970):\n function mod$1(dividend, divisor) {\n return (dividend % divisor + divisor) % divisor;\n }\n\n function localStartOfDate(y, m, d) {\n // the date constructor remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n return new Date(y + 400, m, d) - MS_PER_400_YEARS;\n } else {\n return new Date(y, m, d).valueOf();\n }\n }\n\n function utcStartOfDate(y, m, d) {\n // Date.UTC remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n return Date.UTC(y + 400, m, d) - MS_PER_400_YEARS;\n } else {\n return Date.UTC(y, m, d);\n }\n }\n\n function startOf (units) {\n var time;\n units = normalizeUnits(units);\n if (units === undefined || units === 'millisecond' || !this.isValid()) {\n return this;\n }\n\n var startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;\n\n switch (units) {\n case 'year':\n time = startOfDate(this.year(), 0, 1);\n break;\n case 'quarter':\n time = startOfDate(this.year(), this.month() - this.month() % 3, 1);\n break;\n case 'month':\n time = startOfDate(this.year(), this.month(), 1);\n break;\n case 'week':\n time = startOfDate(this.year(), this.month(), this.date() - this.weekday());\n break;\n case 'isoWeek':\n time = startOfDate(this.year(), this.month(), this.date() - (this.isoWeekday() - 1));\n break;\n case 'day':\n case 'date':\n time = startOfDate(this.year(), this.month(), this.date());\n break;\n case 'hour':\n time = this._d.valueOf();\n time -= mod$1(time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE), MS_PER_HOUR);\n break;\n case 'minute':\n time = this._d.valueOf();\n time -= mod$1(time, MS_PER_MINUTE);\n break;\n case 'second':\n time = this._d.valueOf();\n time -= mod$1(time, MS_PER_SECOND);\n break;\n }\n\n this._d.setTime(time);\n hooks.updateOffset(this, true);\n return this;\n }\n\n function endOf (units) {\n var time;\n units = normalizeUnits(units);\n if (units === undefined || units === 'millisecond' || !this.isValid()) {\n return this;\n }\n\n var startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;\n\n switch (units) {\n case 'year':\n time = startOfDate(this.year() + 1, 0, 1) - 1;\n break;\n case 'quarter':\n time = startOfDate(this.year(), this.month() - this.month() % 3 + 3, 1) - 1;\n break;\n case 'month':\n time = startOfDate(this.year(), this.month() + 1, 1) - 1;\n break;\n case 'week':\n time = startOfDate(this.year(), this.month(), this.date() - this.weekday() + 7) - 1;\n break;\n case 'isoWeek':\n time = startOfDate(this.year(), this.month(), this.date() - (this.isoWeekday() - 1) + 7) - 1;\n break;\n case 'day':\n case 'date':\n time = startOfDate(this.year(), this.month(), this.date() + 1) - 1;\n break;\n case 'hour':\n time = this._d.valueOf();\n time += MS_PER_HOUR - mod$1(time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE), MS_PER_HOUR) - 1;\n break;\n case 'minute':\n time = this._d.valueOf();\n time += MS_PER_MINUTE - mod$1(time, MS_PER_MINUTE) - 1;\n break;\n case 'second':\n time = this._d.valueOf();\n time += MS_PER_SECOND - mod$1(time, MS_PER_SECOND) - 1;\n break;\n }\n\n this._d.setTime(time);\n hooks.updateOffset(this, true);\n return this;\n }\n\n function valueOf () {\n return this._d.valueOf() - ((this._offset || 0) * 60000);\n }\n\n function unix () {\n return Math.floor(this.valueOf() / 1000);\n }\n\n function toDate () {\n return new Date(this.valueOf());\n }\n\n function toArray () {\n var m = this;\n return [m.year(), m.month(), m.date(), m.hour(), m.minute(), m.second(), m.millisecond()];\n }\n\n function toObject () {\n var m = this;\n return {\n years: m.year(),\n months: m.month(),\n date: m.date(),\n hours: m.hours(),\n minutes: m.minutes(),\n seconds: m.seconds(),\n milliseconds: m.milliseconds()\n };\n }\n\n function toJSON () {\n // new Date(NaN).toJSON() === null\n return this.isValid() ? this.toISOString() : null;\n }\n\n function isValid$2 () {\n return isValid(this);\n }\n\n function parsingFlags () {\n return extend({}, getParsingFlags(this));\n }\n\n function invalidAt () {\n return getParsingFlags(this).overflow;\n }\n\n function creationData() {\n return {\n input: this._i,\n format: this._f,\n locale: this._locale,\n isUTC: this._isUTC,\n strict: this._strict\n };\n }\n\n // FORMATTING\n\n addFormatToken(0, ['gg', 2], 0, function () {\n return this.weekYear() % 100;\n });\n\n addFormatToken(0, ['GG', 2], 0, function () {\n return this.isoWeekYear() % 100;\n });\n\n function addWeekYearFormatToken (token, getter) {\n addFormatToken(0, [token, token.length], 0, getter);\n }\n\n addWeekYearFormatToken('gggg', 'weekYear');\n addWeekYearFormatToken('ggggg', 'weekYear');\n addWeekYearFormatToken('GGGG', 'isoWeekYear');\n addWeekYearFormatToken('GGGGG', 'isoWeekYear');\n\n // ALIASES\n\n addUnitAlias('weekYear', 'gg');\n addUnitAlias('isoWeekYear', 'GG');\n\n // PRIORITY\n\n addUnitPriority('weekYear', 1);\n addUnitPriority('isoWeekYear', 1);\n\n\n // PARSING\n\n addRegexToken('G', matchSigned);\n addRegexToken('g', matchSigned);\n addRegexToken('GG', match1to2, match2);\n addRegexToken('gg', match1to2, match2);\n addRegexToken('GGGG', match1to4, match4);\n addRegexToken('gggg', match1to4, match4);\n addRegexToken('GGGGG', match1to6, match6);\n addRegexToken('ggggg', match1to6, match6);\n\n addWeekParseToken(['gggg', 'ggggg', 'GGGG', 'GGGGG'], function (input, week, config, token) {\n week[token.substr(0, 2)] = toInt(input);\n });\n\n addWeekParseToken(['gg', 'GG'], function (input, week, config, token) {\n week[token] = hooks.parseTwoDigitYear(input);\n });\n\n // MOMENTS\n\n function getSetWeekYear (input) {\n return getSetWeekYearHelper.call(this,\n input,\n this.week(),\n this.weekday(),\n this.localeData()._week.dow,\n this.localeData()._week.doy);\n }\n\n function getSetISOWeekYear (input) {\n return getSetWeekYearHelper.call(this,\n input, this.isoWeek(), this.isoWeekday(), 1, 4);\n }\n\n function getISOWeeksInYear () {\n return weeksInYear(this.year(), 1, 4);\n }\n\n function getWeeksInYear () {\n var weekInfo = this.localeData()._week;\n return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy);\n }\n\n function getSetWeekYearHelper(input, week, weekday, dow, doy) {\n var weeksTarget;\n if (input == null) {\n return weekOfYear(this, dow, doy).year;\n } else {\n weeksTarget = weeksInYear(input, dow, doy);\n if (week > weeksTarget) {\n week = weeksTarget;\n }\n return setWeekAll.call(this, input, week, weekday, dow, doy);\n }\n }\n\n function setWeekAll(weekYear, week, weekday, dow, doy) {\n var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy),\n date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear);\n\n this.year(date.getUTCFullYear());\n this.month(date.getUTCMonth());\n this.date(date.getUTCDate());\n return this;\n }\n\n // FORMATTING\n\n addFormatToken('Q', 0, 'Qo', 'quarter');\n\n // ALIASES\n\n addUnitAlias('quarter', 'Q');\n\n // PRIORITY\n\n addUnitPriority('quarter', 7);\n\n // PARSING\n\n addRegexToken('Q', match1);\n addParseToken('Q', function (input, array) {\n array[MONTH] = (toInt(input) - 1) * 3;\n });\n\n // MOMENTS\n\n function getSetQuarter (input) {\n return input == null ? Math.ceil((this.month() + 1) / 3) : this.month((input - 1) * 3 + this.month() % 3);\n }\n\n // FORMATTING\n\n addFormatToken('D', ['DD', 2], 'Do', 'date');\n\n // ALIASES\n\n addUnitAlias('date', 'D');\n\n // PRIORITY\n addUnitPriority('date', 9);\n\n // PARSING\n\n addRegexToken('D', match1to2);\n addRegexToken('DD', match1to2, match2);\n addRegexToken('Do', function (isStrict, locale) {\n // TODO: Remove \"ordinalParse\" fallback in next major release.\n return isStrict ?\n (locale._dayOfMonthOrdinalParse || locale._ordinalParse) :\n locale._dayOfMonthOrdinalParseLenient;\n });\n\n addParseToken(['D', 'DD'], DATE);\n addParseToken('Do', function (input, array) {\n array[DATE] = toInt(input.match(match1to2)[0]);\n });\n\n // MOMENTS\n\n var getSetDayOfMonth = makeGetSet('Date', true);\n\n // FORMATTING\n\n addFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear');\n\n // ALIASES\n\n addUnitAlias('dayOfYear', 'DDD');\n\n // PRIORITY\n addUnitPriority('dayOfYear', 4);\n\n // PARSING\n\n addRegexToken('DDD', match1to3);\n addRegexToken('DDDD', match3);\n addParseToken(['DDD', 'DDDD'], function (input, array, config) {\n config._dayOfYear = toInt(input);\n });\n\n // HELPERS\n\n // MOMENTS\n\n function getSetDayOfYear (input) {\n var dayOfYear = Math.round((this.clone().startOf('day') - this.clone().startOf('year')) / 864e5) + 1;\n return input == null ? dayOfYear : this.add((input - dayOfYear), 'd');\n }\n\n // FORMATTING\n\n addFormatToken('m', ['mm', 2], 0, 'minute');\n\n // ALIASES\n\n addUnitAlias('minute', 'm');\n\n // PRIORITY\n\n addUnitPriority('minute', 14);\n\n // PARSING\n\n addRegexToken('m', match1to2);\n addRegexToken('mm', match1to2, match2);\n addParseToken(['m', 'mm'], MINUTE);\n\n // MOMENTS\n\n var getSetMinute = makeGetSet('Minutes', false);\n\n // FORMATTING\n\n addFormatToken('s', ['ss', 2], 0, 'second');\n\n // ALIASES\n\n addUnitAlias('second', 's');\n\n // PRIORITY\n\n addUnitPriority('second', 15);\n\n // PARSING\n\n addRegexToken('s', match1to2);\n addRegexToken('ss', match1to2, match2);\n addParseToken(['s', 'ss'], SECOND);\n\n // MOMENTS\n\n var getSetSecond = makeGetSet('Seconds', false);\n\n // FORMATTING\n\n addFormatToken('S', 0, 0, function () {\n return ~~(this.millisecond() / 100);\n });\n\n addFormatToken(0, ['SS', 2], 0, function () {\n return ~~(this.millisecond() / 10);\n });\n\n addFormatToken(0, ['SSS', 3], 0, 'millisecond');\n addFormatToken(0, ['SSSS', 4], 0, function () {\n return this.millisecond() * 10;\n });\n addFormatToken(0, ['SSSSS', 5], 0, function () {\n return this.millisecond() * 100;\n });\n addFormatToken(0, ['SSSSSS', 6], 0, function () {\n return this.millisecond() * 1000;\n });\n addFormatToken(0, ['SSSSSSS', 7], 0, function () {\n return this.millisecond() * 10000;\n });\n addFormatToken(0, ['SSSSSSSS', 8], 0, function () {\n return this.millisecond() * 100000;\n });\n addFormatToken(0, ['SSSSSSSSS', 9], 0, function () {\n return this.millisecond() * 1000000;\n });\n\n\n // ALIASES\n\n addUnitAlias('millisecond', 'ms');\n\n // PRIORITY\n\n addUnitPriority('millisecond', 16);\n\n // PARSING\n\n addRegexToken('S', match1to3, match1);\n addRegexToken('SS', match1to3, match2);\n addRegexToken('SSS', match1to3, match3);\n\n var token;\n for (token = 'SSSS'; token.length <= 9; token += 'S') {\n addRegexToken(token, matchUnsigned);\n }\n\n function parseMs(input, array) {\n array[MILLISECOND] = toInt(('0.' + input) * 1000);\n }\n\n for (token = 'S'; token.length <= 9; token += 'S') {\n addParseToken(token, parseMs);\n }\n // MOMENTS\n\n var getSetMillisecond = makeGetSet('Milliseconds', false);\n\n // FORMATTING\n\n addFormatToken('z', 0, 0, 'zoneAbbr');\n addFormatToken('zz', 0, 0, 'zoneName');\n\n // MOMENTS\n\n function getZoneAbbr () {\n return this._isUTC ? 'UTC' : '';\n }\n\n function getZoneName () {\n return this._isUTC ? 'Coordinated Universal Time' : '';\n }\n\n var proto = Moment.prototype;\n\n proto.add = add;\n proto.calendar = calendar$1;\n proto.clone = clone;\n proto.diff = diff;\n proto.endOf = endOf;\n proto.format = format;\n proto.from = from;\n proto.fromNow = fromNow;\n proto.to = to;\n proto.toNow = toNow;\n proto.get = stringGet;\n proto.invalidAt = invalidAt;\n proto.isAfter = isAfter;\n proto.isBefore = isBefore;\n proto.isBetween = isBetween;\n proto.isSame = isSame;\n proto.isSameOrAfter = isSameOrAfter;\n proto.isSameOrBefore = isSameOrBefore;\n proto.isValid = isValid$2;\n proto.lang = lang;\n proto.locale = locale;\n proto.localeData = localeData;\n proto.max = prototypeMax;\n proto.min = prototypeMin;\n proto.parsingFlags = parsingFlags;\n proto.set = stringSet;\n proto.startOf = startOf;\n proto.subtract = subtract;\n proto.toArray = toArray;\n proto.toObject = toObject;\n proto.toDate = toDate;\n proto.toISOString = toISOString;\n proto.inspect = inspect;\n proto.toJSON = toJSON;\n proto.toString = toString;\n proto.unix = unix;\n proto.valueOf = valueOf;\n proto.creationData = creationData;\n proto.year = getSetYear;\n proto.isLeapYear = getIsLeapYear;\n proto.weekYear = getSetWeekYear;\n proto.isoWeekYear = getSetISOWeekYear;\n proto.quarter = proto.quarters = getSetQuarter;\n proto.month = getSetMonth;\n proto.daysInMonth = getDaysInMonth;\n proto.week = proto.weeks = getSetWeek;\n proto.isoWeek = proto.isoWeeks = getSetISOWeek;\n proto.weeksInYear = getWeeksInYear;\n proto.isoWeeksInYear = getISOWeeksInYear;\n proto.date = getSetDayOfMonth;\n proto.day = proto.days = getSetDayOfWeek;\n proto.weekday = getSetLocaleDayOfWeek;\n proto.isoWeekday = getSetISODayOfWeek;\n proto.dayOfYear = getSetDayOfYear;\n proto.hour = proto.hours = getSetHour;\n proto.minute = proto.minutes = getSetMinute;\n proto.second = proto.seconds = getSetSecond;\n proto.millisecond = proto.milliseconds = getSetMillisecond;\n proto.utcOffset = getSetOffset;\n proto.utc = setOffsetToUTC;\n proto.local = setOffsetToLocal;\n proto.parseZone = setOffsetToParsedOffset;\n proto.hasAlignedHourOffset = hasAlignedHourOffset;\n proto.isDST = isDaylightSavingTime;\n proto.isLocal = isLocal;\n proto.isUtcOffset = isUtcOffset;\n proto.isUtc = isUtc;\n proto.isUTC = isUtc;\n proto.zoneAbbr = getZoneAbbr;\n proto.zoneName = getZoneName;\n proto.dates = deprecate('dates accessor is deprecated. Use date instead.', getSetDayOfMonth);\n proto.months = deprecate('months accessor is deprecated. Use month instead', getSetMonth);\n proto.years = deprecate('years accessor is deprecated. Use year instead', getSetYear);\n proto.zone = deprecate('moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/', getSetZone);\n proto.isDSTShifted = deprecate('isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information', isDaylightSavingTimeShifted);\n\n function createUnix (input) {\n return createLocal(input * 1000);\n }\n\n function createInZone () {\n return createLocal.apply(null, arguments).parseZone();\n }\n\n function preParsePostFormat (string) {\n return string;\n }\n\n var proto$1 = Locale.prototype;\n\n proto$1.calendar = calendar;\n proto$1.longDateFormat = longDateFormat;\n proto$1.invalidDate = invalidDate;\n proto$1.ordinal = ordinal;\n proto$1.preparse = preParsePostFormat;\n proto$1.postformat = preParsePostFormat;\n proto$1.relativeTime = relativeTime;\n proto$1.pastFuture = pastFuture;\n proto$1.set = set;\n\n proto$1.months = localeMonths;\n proto$1.monthsShort = localeMonthsShort;\n proto$1.monthsParse = localeMonthsParse;\n proto$1.monthsRegex = monthsRegex;\n proto$1.monthsShortRegex = monthsShortRegex;\n proto$1.week = localeWeek;\n proto$1.firstDayOfYear = localeFirstDayOfYear;\n proto$1.firstDayOfWeek = localeFirstDayOfWeek;\n\n proto$1.weekdays = localeWeekdays;\n proto$1.weekdaysMin = localeWeekdaysMin;\n proto$1.weekdaysShort = localeWeekdaysShort;\n proto$1.weekdaysParse = localeWeekdaysParse;\n\n proto$1.weekdaysRegex = weekdaysRegex;\n proto$1.weekdaysShortRegex = weekdaysShortRegex;\n proto$1.weekdaysMinRegex = weekdaysMinRegex;\n\n proto$1.isPM = localeIsPM;\n proto$1.meridiem = localeMeridiem;\n\n function get$1 (format, index, field, setter) {\n var locale = getLocale();\n var utc = createUTC().set(setter, index);\n return locale[field](utc, format);\n }\n\n function listMonthsImpl (format, index, field) {\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n\n if (index != null) {\n return get$1(format, index, field, 'month');\n }\n\n var i;\n var out = [];\n for (i = 0; i < 12; i++) {\n out[i] = get$1(format, i, field, 'month');\n }\n return out;\n }\n\n // ()\n // (5)\n // (fmt, 5)\n // (fmt)\n // (true)\n // (true, 5)\n // (true, fmt, 5)\n // (true, fmt)\n function listWeekdaysImpl (localeSorted, format, index, field) {\n if (typeof localeSorted === 'boolean') {\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n } else {\n format = localeSorted;\n index = format;\n localeSorted = false;\n\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n }\n\n var locale = getLocale(),\n shift = localeSorted ? locale._week.dow : 0;\n\n if (index != null) {\n return get$1(format, (index + shift) % 7, field, 'day');\n }\n\n var i;\n var out = [];\n for (i = 0; i < 7; i++) {\n out[i] = get$1(format, (i + shift) % 7, field, 'day');\n }\n return out;\n }\n\n function listMonths (format, index) {\n return listMonthsImpl(format, index, 'months');\n }\n\n function listMonthsShort (format, index) {\n return listMonthsImpl(format, index, 'monthsShort');\n }\n\n function listWeekdays (localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdays');\n }\n\n function listWeekdaysShort (localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort');\n }\n\n function listWeekdaysMin (localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin');\n }\n\n getSetGlobalLocale('en', {\n dayOfMonthOrdinalParse: /\\d{1,2}(th|st|nd|rd)/,\n ordinal : function (number) {\n var b = number % 10,\n output = (toInt(number % 100 / 10) === 1) ? 'th' :\n (b === 1) ? 'st' :\n (b === 2) ? 'nd' :\n (b === 3) ? 'rd' : 'th';\n return number + output;\n }\n });\n\n // Side effect imports\n\n hooks.lang = deprecate('moment.lang is deprecated. Use moment.locale instead.', getSetGlobalLocale);\n hooks.langData = deprecate('moment.langData is deprecated. Use moment.localeData instead.', getLocale);\n\n var mathAbs = Math.abs;\n\n function abs () {\n var data = this._data;\n\n this._milliseconds = mathAbs(this._milliseconds);\n this._days = mathAbs(this._days);\n this._months = mathAbs(this._months);\n\n data.milliseconds = mathAbs(data.milliseconds);\n data.seconds = mathAbs(data.seconds);\n data.minutes = mathAbs(data.minutes);\n data.hours = mathAbs(data.hours);\n data.months = mathAbs(data.months);\n data.years = mathAbs(data.years);\n\n return this;\n }\n\n function addSubtract$1 (duration, input, value, direction) {\n var other = createDuration(input, value);\n\n duration._milliseconds += direction * other._milliseconds;\n duration._days += direction * other._days;\n duration._months += direction * other._months;\n\n return duration._bubble();\n }\n\n // supports only 2.0-style add(1, 's') or add(duration)\n function add$1 (input, value) {\n return addSubtract$1(this, input, value, 1);\n }\n\n // supports only 2.0-style subtract(1, 's') or subtract(duration)\n function subtract$1 (input, value) {\n return addSubtract$1(this, input, value, -1);\n }\n\n function absCeil (number) {\n if (number < 0) {\n return Math.floor(number);\n } else {\n return Math.ceil(number);\n }\n }\n\n function bubble () {\n var milliseconds = this._milliseconds;\n var days = this._days;\n var months = this._months;\n var data = this._data;\n var seconds, minutes, hours, years, monthsFromDays;\n\n // if we have a mix of positive and negative values, bubble down first\n // check: https://github.com/moment/moment/issues/2166\n if (!((milliseconds >= 0 && days >= 0 && months >= 0) ||\n (milliseconds <= 0 && days <= 0 && months <= 0))) {\n milliseconds += absCeil(monthsToDays(months) + days) * 864e5;\n days = 0;\n months = 0;\n }\n\n // The following code bubbles up values, see the tests for\n // examples of what that means.\n data.milliseconds = milliseconds % 1000;\n\n seconds = absFloor(milliseconds / 1000);\n data.seconds = seconds % 60;\n\n minutes = absFloor(seconds / 60);\n data.minutes = minutes % 60;\n\n hours = absFloor(minutes / 60);\n data.hours = hours % 24;\n\n days += absFloor(hours / 24);\n\n // convert days to months\n monthsFromDays = absFloor(daysToMonths(days));\n months += monthsFromDays;\n days -= absCeil(monthsToDays(monthsFromDays));\n\n // 12 months -> 1 year\n years = absFloor(months / 12);\n months %= 12;\n\n data.days = days;\n data.months = months;\n data.years = years;\n\n return this;\n }\n\n function daysToMonths (days) {\n // 400 years have 146097 days (taking into account leap year rules)\n // 400 years have 12 months === 4800\n return days * 4800 / 146097;\n }\n\n function monthsToDays (months) {\n // the reverse of daysToMonths\n return months * 146097 / 4800;\n }\n\n function as (units) {\n if (!this.isValid()) {\n return NaN;\n }\n var days;\n var months;\n var milliseconds = this._milliseconds;\n\n units = normalizeUnits(units);\n\n if (units === 'month' || units === 'quarter' || units === 'year') {\n days = this._days + milliseconds / 864e5;\n months = this._months + daysToMonths(days);\n switch (units) {\n case 'month': return months;\n case 'quarter': return months / 3;\n case 'year': return months / 12;\n }\n } else {\n // handle milliseconds separately because of floating point math errors (issue #1867)\n days = this._days + Math.round(monthsToDays(this._months));\n switch (units) {\n case 'week' : return days / 7 + milliseconds / 6048e5;\n case 'day' : return days + milliseconds / 864e5;\n case 'hour' : return days * 24 + milliseconds / 36e5;\n case 'minute' : return days * 1440 + milliseconds / 6e4;\n case 'second' : return days * 86400 + milliseconds / 1000;\n // Math.floor prevents floating point math errors here\n case 'millisecond': return Math.floor(days * 864e5) + milliseconds;\n default: throw new Error('Unknown unit ' + units);\n }\n }\n }\n\n // TODO: Use this.as('ms')?\n function valueOf$1 () {\n if (!this.isValid()) {\n return NaN;\n }\n return (\n this._milliseconds +\n this._days * 864e5 +\n (this._months % 12) * 2592e6 +\n toInt(this._months / 12) * 31536e6\n );\n }\n\n function makeAs (alias) {\n return function () {\n return this.as(alias);\n };\n }\n\n var asMilliseconds = makeAs('ms');\n var asSeconds = makeAs('s');\n var asMinutes = makeAs('m');\n var asHours = makeAs('h');\n var asDays = makeAs('d');\n var asWeeks = makeAs('w');\n var asMonths = makeAs('M');\n var asQuarters = makeAs('Q');\n var asYears = makeAs('y');\n\n function clone$1 () {\n return createDuration(this);\n }\n\n function get$2 (units) {\n units = normalizeUnits(units);\n return this.isValid() ? this[units + 's']() : NaN;\n }\n\n function makeGetter(name) {\n return function () {\n return this.isValid() ? this._data[name] : NaN;\n };\n }\n\n var milliseconds = makeGetter('milliseconds');\n var seconds = makeGetter('seconds');\n var minutes = makeGetter('minutes');\n var hours = makeGetter('hours');\n var days = makeGetter('days');\n var months = makeGetter('months');\n var years = makeGetter('years');\n\n function weeks () {\n return absFloor(this.days() / 7);\n }\n\n var round = Math.round;\n var thresholds = {\n ss: 44, // a few seconds to seconds\n s : 45, // seconds to minute\n m : 45, // minutes to hour\n h : 22, // hours to day\n d : 26, // days to month\n M : 11 // months to year\n };\n\n // helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize\n function substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) {\n return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture);\n }\n\n function relativeTime$1 (posNegDuration, withoutSuffix, locale) {\n var duration = createDuration(posNegDuration).abs();\n var seconds = round(duration.as('s'));\n var minutes = round(duration.as('m'));\n var hours = round(duration.as('h'));\n var days = round(duration.as('d'));\n var months = round(duration.as('M'));\n var years = round(duration.as('y'));\n\n var a = seconds <= thresholds.ss && ['s', seconds] ||\n seconds < thresholds.s && ['ss', seconds] ||\n minutes <= 1 && ['m'] ||\n minutes < thresholds.m && ['mm', minutes] ||\n hours <= 1 && ['h'] ||\n hours < thresholds.h && ['hh', hours] ||\n days <= 1 && ['d'] ||\n days < thresholds.d && ['dd', days] ||\n months <= 1 && ['M'] ||\n months < thresholds.M && ['MM', months] ||\n years <= 1 && ['y'] || ['yy', years];\n\n a[2] = withoutSuffix;\n a[3] = +posNegDuration > 0;\n a[4] = locale;\n return substituteTimeAgo.apply(null, a);\n }\n\n // This function allows you to set the rounding function for relative time strings\n function getSetRelativeTimeRounding (roundingFunction) {\n if (roundingFunction === undefined) {\n return round;\n }\n if (typeof(roundingFunction) === 'function') {\n round = roundingFunction;\n return true;\n }\n return false;\n }\n\n // This function allows you to set a threshold for relative time strings\n function getSetRelativeTimeThreshold (threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n return true;\n }\n\n function humanize (withSuffix) {\n if (!this.isValid()) {\n return this.localeData().invalidDate();\n }\n\n var locale = this.localeData();\n var output = relativeTime$1(this, !withSuffix, locale);\n\n if (withSuffix) {\n output = locale.pastFuture(+this, output);\n }\n\n return locale.postformat(output);\n }\n\n var abs$1 = Math.abs;\n\n function sign(x) {\n return ((x > 0) - (x < 0)) || +x;\n }\n\n function toISOString$1() {\n // for ISO strings we do not use the normal bubbling rules:\n // * milliseconds bubble up until they become hours\n // * days do not bubble at all\n // * months bubble up until they become years\n // This is because there is no context-free conversion between hours and days\n // (think of clock changes)\n // and also not between days and months (28-31 days per month)\n if (!this.isValid()) {\n return this.localeData().invalidDate();\n }\n\n var seconds = abs$1(this._milliseconds) / 1000;\n var days = abs$1(this._days);\n var months = abs$1(this._months);\n var minutes, hours, years;\n\n // 3600 seconds -> 60 minutes -> 1 hour\n minutes = absFloor(seconds / 60);\n hours = absFloor(minutes / 60);\n seconds %= 60;\n minutes %= 60;\n\n // 12 months -> 1 year\n years = absFloor(months / 12);\n months %= 12;\n\n\n // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js\n var Y = years;\n var M = months;\n var D = days;\n var h = hours;\n var m = minutes;\n var s = seconds ? seconds.toFixed(3).replace(/\\.?0+$/, '') : '';\n var total = this.asSeconds();\n\n if (!total) {\n // this is the same as C#'s (Noda) and python (isodate)...\n // but not other JS (goog.date)\n return 'P0D';\n }\n\n var totalSign = total < 0 ? '-' : '';\n var ymSign = sign(this._months) !== sign(total) ? '-' : '';\n var daysSign = sign(this._days) !== sign(total) ? '-' : '';\n var hmsSign = sign(this._milliseconds) !== sign(total) ? '-' : '';\n\n return totalSign + 'P' +\n (Y ? ymSign + Y + 'Y' : '') +\n (M ? ymSign + M + 'M' : '') +\n (D ? daysSign + D + 'D' : '') +\n ((h || m || s) ? 'T' : '') +\n (h ? hmsSign + h + 'H' : '') +\n (m ? hmsSign + m + 'M' : '') +\n (s ? hmsSign + s + 'S' : '');\n }\n\n var proto$2 = Duration.prototype;\n\n proto$2.isValid = isValid$1;\n proto$2.abs = abs;\n proto$2.add = add$1;\n proto$2.subtract = subtract$1;\n proto$2.as = as;\n proto$2.asMilliseconds = asMilliseconds;\n proto$2.asSeconds = asSeconds;\n proto$2.asMinutes = asMinutes;\n proto$2.asHours = asHours;\n proto$2.asDays = asDays;\n proto$2.asWeeks = asWeeks;\n proto$2.asMonths = asMonths;\n proto$2.asQuarters = asQuarters;\n proto$2.asYears = asYears;\n proto$2.valueOf = valueOf$1;\n proto$2._bubble = bubble;\n proto$2.clone = clone$1;\n proto$2.get = get$2;\n proto$2.milliseconds = milliseconds;\n proto$2.seconds = seconds;\n proto$2.minutes = minutes;\n proto$2.hours = hours;\n proto$2.days = days;\n proto$2.weeks = weeks;\n proto$2.months = months;\n proto$2.years = years;\n proto$2.humanize = humanize;\n proto$2.toISOString = toISOString$1;\n proto$2.toString = toISOString$1;\n proto$2.toJSON = toISOString$1;\n proto$2.locale = locale;\n proto$2.localeData = localeData;\n\n proto$2.toIsoString = deprecate('toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)', toISOString$1);\n proto$2.lang = lang;\n\n // Side effect imports\n\n // FORMATTING\n\n addFormatToken('X', 0, 0, 'unix');\n addFormatToken('x', 0, 0, 'valueOf');\n\n // PARSING\n\n addRegexToken('x', matchSigned);\n addRegexToken('X', matchTimestamp);\n addParseToken('X', function (input, array, config) {\n config._d = new Date(parseFloat(input, 10) * 1000);\n });\n addParseToken('x', function (input, array, config) {\n config._d = new Date(toInt(input));\n });\n\n // Side effect imports\n\n\n hooks.version = '2.24.0';\n\n setHookCallback(createLocal);\n\n hooks.fn = proto;\n hooks.min = min;\n hooks.max = max;\n hooks.now = now;\n hooks.utc = createUTC;\n hooks.unix = createUnix;\n hooks.months = listMonths;\n hooks.isDate = isDate;\n hooks.locale = getSetGlobalLocale;\n hooks.invalid = createInvalid;\n hooks.duration = createDuration;\n hooks.isMoment = isMoment;\n hooks.weekdays = listWeekdays;\n hooks.parseZone = createInZone;\n hooks.localeData = getLocale;\n hooks.isDuration = isDuration;\n hooks.monthsShort = listMonthsShort;\n hooks.weekdaysMin = listWeekdaysMin;\n hooks.defineLocale = defineLocale;\n hooks.updateLocale = updateLocale;\n hooks.locales = listLocales;\n hooks.weekdaysShort = listWeekdaysShort;\n hooks.normalizeUnits = normalizeUnits;\n hooks.relativeTimeRounding = getSetRelativeTimeRounding;\n hooks.relativeTimeThreshold = getSetRelativeTimeThreshold;\n hooks.calendarFormat = getCalendarFormat;\n hooks.prototype = proto;\n\n // currently HTML5 input type only supports 24-hour formats\n hooks.HTML5_FMT = {\n DATETIME_LOCAL: 'YYYY-MM-DDTHH:mm', // \n DATETIME_LOCAL_SECONDS: 'YYYY-MM-DDTHH:mm:ss', // \n DATETIME_LOCAL_MS: 'YYYY-MM-DDTHH:mm:ss.SSS', // \n DATE: 'YYYY-MM-DD', // \n TIME: 'HH:mm', // \n TIME_SECONDS: 'HH:mm:ss', // \n TIME_MS: 'HH:mm:ss.SSS', // \n WEEK: 'GGGG-[W]WW', // \n MONTH: 'YYYY-MM' // \n };\n\n return hooks;\n\n})));\n","// first check if moment.js is already loaded in the browser window, if so,\n// use this instance. Else, load via commonjs.\nmodule.exports = (typeof window !== 'undefined') && window['moment'] || require('moment');\n","// vis-util\nimport * as util from 'vis-util'\nexport { util }\n\n// vis-data\nimport * as data from 'vis-data'\nexport { data }\nexport { DataSet, DataView, Queue } from 'vis-data'\n\n// Network.\nexport * from './network/Network'\n\nimport Images from './network/Images'\nimport * as dotparser from './network/dotparser'\nimport * as gephiParser from './network/gephiParser'\nimport { parseGephi } from './network/gephiParser'\nimport * as allOptions from './network/options'\nexport const network = {\n Images,\n dotparser,\n gephiParser,\n allOptions,\n convertDot: dotparser.DOTToGraph,\n convertGephi: parseGephi,\n}\n\n// utils\nimport * as DOMutil from './DOMutil'\nexport { DOMutil }\n\n// bundled external libraries\nimport * as moment from './module/moment'\nexport { moment }\nimport * as Hammer from './module/hammer'\nexport { Hammer }\nimport * as keycharm from 'keycharm'\nexport { keycharm }\n"],"names":["commonjsGlobal","globalThis","window","global","self","commonjsRequire","Error","createCommonjsModule","fn","module","exports","_global","Math","Function","__g","_core","core","version","__e","_core_1","_library","_shared","SHARED","store","key","value","undefined","push","mode","copyright","id","px","random","_uid","concat","toString","_wks","Symbol","USE_SYMBOL","$exports","name","f","_wksExt","_isObject","it","_anObject","TypeError","_fails","exec","e","_descriptors","Object","defineProperty","get","a","document$1","document","is","createElement","_domCreate","_ie8DomDefine","_toPrimitive","S","val","call","valueOf","dP","f$1","O","P","Attributes","_objectDp","_wksDefine","$Symbol","charAt","hasOwnProperty","_has","_propertyDesc","bitmap","enumerable","configurable","writable","_hide","object","_functionToString","_redefine","SRC","TO_STRING","TPL","split","inspectSource","safe","isFunction","join","String","prototype","_aFunction","_ctx","that","length","b","c","apply","arguments","PROTOTYPE","$export","type","source","IS_FORCED","F","IS_GLOBAL","G","IS_STATIC","IS_PROTO","IS_BIND","B","target","expProto","own","out","exp","U","W","R","_export","_meta","META","setDesc","isExtensible","FREEZE","preventExtensions","setMeta","i","w","fastKey","create","getWeak","onFreeze","meta","NEED","KEY","_meta_1","_meta_2","_meta_3","_meta_4","_meta_5","def","TAG","_setToStringTag","tag","stat","_cof","slice","_iobject","propertyIsEnumerable","_defined","_toIobject","ceil","floor","_toInteger","isNaN","min","_toLength","max","min$1","_toAbsoluteIndex","index","_arrayIncludes","IS_INCLUDES","$this","el","fromIndex","shared","_sharedKey","arrayIndexOf","IE_PROTO","_objectKeysInternal","names","result","_enumBugKeys","_objectKeys","keys","f$2","getOwnPropertySymbols","_objectGops","f$3","_objectPie","_enumKeys","getSymbols","symbols","isEnum","_isArray","Array","isArray","arg","_toObject","_objectDps","defineProperties","Properties","document$2","_html","documentElement","IE_PROTO$1","Empty","PROTOTYPE$1","createDict","iframe","lt","gt","iframeDocument","style","display","appendChild","src","contentWindow","open","write","close","_objectCreate","hiddenKeys","f$4","getOwnPropertyNames","_objectGopn","gOPN","toString$1","windowNames","getWindowNames","f$5","_objectGopnExt","gOPD","getOwnPropertyDescriptor","f$6","_objectGopd","gOPD$1","dP$1","gOPN$1","$JSON","JSON","_stringify","stringify","PROTOTYPE$2","HIDDEN","TO_PRIMITIVE","SymbolRegistry","AllSymbols","OPSymbols","ObjectProto","USE_NATIVE","QObject","setter","findChild","setSymbolDesc","D","protoDesc","wrap","sym","_k","isSymbol","iterator","$defineProperty","$defineProperties","l","$create","$propertyIsEnumerable","E","$getOwnPropertyDescriptor","$getOwnPropertyNames","$getOwnPropertySymbols","IS_OP","$set","set","es6Symbols","j","wellKnownSymbols","k","keyFor","useSetter","useSimple","FAILS_ON_PRIMITIVES","args","replacer","$replacer","_typeof","obj","constructor","_defineProperty","ownKeys","enumerableOnly","filter","_objectSpread2","forEach","getOwnPropertyDescriptors","_toConsumableArray","arr","_arrayWithoutHoles","_iterableToArray","_nonIterableSpread","arr2","iter","from","_objectSap","_flags","ignoreCase","multiline","unicode","sticky","flags","RegExp","$toString","define","_stringAt","pos","s","charCodeAt","at","_advanceStringIndex","TAG$1","ARG","tryGet","_classof","T","callee","builtinExec","_regexpExecAbstract","nativeExec","nativeReplace","replace","patchedExec","LAST_INDEX","UPDATES_LAST_INDEX_WRONG","re1","re2","NPCG_INCLUDED","PATCH","str","re","lastIndex","reCopy","match","_regexpExec","proto","forced","SPECIES","REPLACE_SUPPORTS_NAMED_GROUPS","groups","SPLIT_WORKS_WITH_OVERWRITTEN_EXEC","originalExec","_fixReWks","SYMBOL","DELEGATES_TO_SYMBOL","DELEGATES_TO_EXEC","execCalled","nativeRegExpMethod","fns","maybeCallNative","nativeMethod","regexp","arg2","forceStringMethod","done","strfn","rxfn","string","max$1","min$2","floor$1","SUBSTITUTION_SYMBOLS","SUBSTITUTION_SYMBOLS_NO_NAMED","maybeToString","defined","REPLACE","$replace","searchValue","replaceValue","res","rx","functionalReplace","fullUnicode","results","matchStr","accumulatedResult","nextSourcePosition","matched","position","captures","namedCaptures","replacerArgs","replacement","getSubstitution","tailPos","m","ch","capture","n","UNSCOPABLES","ArrayProto","_addToUnscopables","_iterStep","_iterators","IteratorPrototype","_iterCreate","Constructor","NAME","next","IE_PROTO$2","ObjectProto$1","_objectGpo","getPrototypeOf","ITERATOR","BUGGY","FF_ITERATOR","KEYS","VALUES","returnThis","_iterDefine","Base","DEFAULT","IS_SET","FORCED","getMethod","kind","values","entries","DEF_VALUES","VALUES_BUG","$native","$default","$entries","$anyNative","methods","es6_array_iterator","iterated","_t","_i","Arguments","ITERATOR$1","TO_STRING_TAG","ArrayValues","DOMIterables","CSSRuleList","CSSStyleDeclaration","CSSValueList","ClientRectList","DOMRectList","DOMStringList","DOMTokenList","DataTransferItemList","FileList","HTMLAllCollection","HTMLCollection","HTMLFormElement","HTMLSelectElement","MediaList","MimeTypeArray","NamedNodeMap","NodeList","PaintRequestList","Plugin","PluginArray","SVGLengthList","SVGNumberList","SVGPathSegList","SVGPointList","SVGStringList","SVGTransformList","SourceBufferList","StyleSheetList","TextTrackCueList","TextTrackList","TouchList","collections","explicit","Collection","test","isEnum$1","_objectToArray","isEntries","$values","MATCH","_isRegexp","isRegExp","SPECIES$1","_speciesConstructor","C","$min","$push","$SPLIT","LENGTH","LAST_INDEX$1","MAX_UINT32","SUPPORTS_Y","SPLIT","$split","internalSplit","separator","limit","output","lastLastIndex","splitLimit","separatorCopy","lastLength","splitter","unicodeMatching","lim","p","q","A","z","$assign","assign","_objectAssign","K","aLen","check","_setProto","setPrototypeOf","buggy","__proto__","_inheritIfRequired","_stringWs","space","non","ltrim","rtrim","exporter","ALIAS","FORCE","trim","TYPE","_stringTrim","gOPN$2","gOPD$2","dP$2","$trim","NUMBER","$Number","proto$1","BROKEN_COF","TRIM","toNumber","argument","first","third","radix","maxCode","NaN","digits","code","parseInt","Number","j$1","key$1","moment","factory","hookCallback","hooks","setHookCallback","callback","input","isObject","isObjectEmpty","isUndefined","isNumber","isDate","Date","map","hasOwnProp","extend","createUTC","format","locale","strict","createLocalOrUTC","utc","defaultParsingFlags","empty","unusedTokens","unusedInput","overflow","charsLeftOver","nullInput","invalidMonth","invalidFormat","userInvalidated","iso","parsedDateParts","meridiem","rfc2822","weekdayMismatch","getParsingFlags","_pf","some","fun","t","len","isValid","_isValid","parsedParts","isNowValid","_d","getTime","invalidWeekday","_strict","bigHour","isFrozen","createInvalid","momentProperties","copyConfig","to","prop","_isAMomentObject","_f","_l","_tzm","_isUTC","_offset","_locale","updateInProgress","Moment","config","updateOffset","isMoment","absFloor","number","toInt","argumentForCoercion","coercedNumber","isFinite","compareArrays","array1","array2","dontConvert","lengthDiff","abs","diffs","warn","msg","suppressDeprecationWarnings","console","deprecate","firstTime","deprecationHandler","stack","deprecations","deprecateSimple","_config","_dayOfMonthOrdinalParseLenient","_dayOfMonthOrdinalParse","_ordinalParse","mergeConfigs","parentConfig","childConfig","Locale","defaultCalendar","sameDay","nextDay","nextWeek","lastDay","lastWeek","sameElse","calendar","mom","now","_calendar","defaultLongDateFormat","LTS","LT","L","LL","LLL","LLLL","longDateFormat","_longDateFormat","formatUpper","toUpperCase","defaultInvalidDate","invalidDate","_invalidDate","defaultOrdinal","defaultDayOfMonthOrdinalParse","ordinal","_ordinal","defaultRelativeTime","future","past","ss","mm","h","hh","d","dd","M","MM","y","yy","relativeTime","withoutSuffix","isFuture","_relativeTime","pastFuture","diff","aliases","addUnitAlias","unit","shorthand","lowerCase","toLowerCase","normalizeUnits","units","normalizeObjectUnits","inputObject","normalizedInput","normalizedProp","priorities","addUnitPriority","priority","getPrioritizedUnits","unitsObj","u","sort","zeroFill","targetLength","forceSign","absNumber","zerosToFill","sign","pow","substr","formattingTokens","localFormattingTokens","formatFunctions","formatTokenFunctions","addFormatToken","token","padded","func","localeData","removeFormattingTokens","makeFormatFunction","array","formatMoment","expandFormat","replaceLongDateFormatTokens","match1","match2","match3","match4","match6","match1to2","match3to4","match5to6","match1to3","match1to4","match1to6","matchUnsigned","matchSigned","matchOffset","matchShortOffset","matchTimestamp","matchWord","regexes","addRegexToken","regex","strictRegex","isStrict","getParseRegexForToken","unescapeFormat","regexEscape","p1","p2","p3","p4","tokens","addParseToken","addWeekParseToken","_w","addTimeToArrayFromToken","_a","YEAR","MONTH","DATE","HOUR","MINUTE","SECOND","MILLISECOND","WEEK","WEEKDAY","year","parseTwoDigitYear","daysInYear","isLeapYear","getSetYear","makeGetSet","getIsLeapYear","keepTime","set$1","month","date","daysInMonth","stringGet","stringSet","prioritized","mod","x","indexOf","o","modMonth","monthsShort","months","monthsShortRegex","monthsRegex","monthsParse","MONTHS_IN_FORMAT","defaultLocaleMonths","localeMonths","_months","isFormat","defaultLocaleMonthsShort","localeMonthsShort","_monthsShort","handleStrictParse","monthName","ii","llc","toLocaleLowerCase","_monthsParse","_longMonthsParse","_shortMonthsParse","localeMonthsParse","_monthsParseExact","setMonth","dayOfMonth","getSetMonth","getDaysInMonth","defaultMonthsShortRegex","computeMonthsParse","_monthsShortStrictRegex","_monthsShortRegex","defaultMonthsRegex","_monthsStrictRegex","_monthsRegex","cmpLenRev","shortPieces","longPieces","mixedPieces","createDate","ms","getFullYear","setFullYear","createUTCDate","UTC","getUTCFullYear","setUTCFullYear","firstWeekOffset","dow","doy","fwd","fwdlw","getUTCDay","dayOfYearFromWeeks","week","weekday","localWeekday","weekOffset","dayOfYear","resYear","resDayOfYear","weekOfYear","resWeek","weeksInYear","weekOffsetNext","localeWeek","_week","defaultLocaleWeek","localeFirstDayOfWeek","localeFirstDayOfYear","getSetWeek","add","getSetISOWeek","weekdaysMin","weekdaysShort","weekdays","weekdaysMinRegex","weekdaysShortRegex","weekdaysRegex","weekdaysParse","parseWeekday","parseIsoWeekday","shiftWeekdays","ws","defaultLocaleWeekdays","localeWeekdays","_weekdays","day","defaultLocaleWeekdaysShort","localeWeekdaysShort","_weekdaysShort","defaultLocaleWeekdaysMin","localeWeekdaysMin","_weekdaysMin","handleStrictParse$1","weekdayName","_weekdaysParse","_shortWeekdaysParse","_minWeekdaysParse","localeWeekdaysParse","_weekdaysParseExact","_fullWeekdaysParse","getSetDayOfWeek","getDay","getSetLocaleDayOfWeek","getSetISODayOfWeek","defaultWeekdaysRegex","computeWeekdaysParse","_weekdaysStrictRegex","_weekdaysRegex","defaultWeekdaysShortRegex","_weekdaysShortStrictRegex","_weekdaysShortRegex","defaultWeekdaysMinRegex","_weekdaysMinStrictRegex","_weekdaysMinRegex","minPieces","minp","shortp","longp","hFormat","hours","kFormat","minutes","seconds","lowercase","matchMeridiem","_meridiemParse","kInput","_isPm","isPM","_meridiem","pos1","pos2","localeIsPM","defaultLocaleMeridiemParse","localeMeridiem","isLower","getSetHour","baseConfig","dayOfMonthOrdinalParse","meridiemParse","locales","localeFamilies","globalLocale","normalizeLocale","chooseLocale","loadLocale","oldLocale","_abbr","aliasedRequire","getSetGlobalLocale","data","getLocale","defineLocale","abbr","parentLocale","updateLocale","tmpLocale","listLocales","checkOverflow","_overflowDayOfYear","_overflowWeeks","_overflowWeekday","defaults","currentDateArray","nowValue","_useUTC","getUTCMonth","getUTCDate","getMonth","getDate","configFromArray","currentDate","expectedWeekday","yearToUse","dayOfYearFromWeekInfo","_dayOfYear","_nextDay","setUTCMinutes","getUTCMinutes","weekYear","temp","weekdayOverflow","GG","createLocal","curWeek","gg","extendedIsoRegex","basicIsoRegex","tzRegex","isoDates","isoTimes","aspNetJsonRegex","configFromISO","allowTime","dateFormat","timeFormat","tzFormat","configFromStringAndFormat","extractFromRFC2822Strings","yearStr","monthStr","dayStr","hourStr","minuteStr","secondStr","untruncateYear","preprocessRFC2822","checkWeekday","weekdayStr","parsedInput","weekdayProvided","weekdayActual","obsOffsets","UT","GMT","EDT","EST","CDT","CST","MDT","MST","PDT","PST","calculateOffset","obsOffset","militaryOffset","numOffset","hm","configFromRFC2822","parsedArray","configFromString","createFromInputFallback","ISO_8601","RFC_2822","skipped","stringLength","totalParsedInputLength","meridiemFixWrap","hour","isPm","meridiemHour","configFromStringAndArray","tempConfig","bestMoment","scoreToBeat","currentScore","score","configFromObject","minute","second","millisecond","createFromConfig","prepareConfig","preparse","configFromInput","isUTC","prototypeMin","other","prototypeMax","pickBy","moments","ordering","isDurationValid","unitHasDecimal","parseFloat","isValid$1","createInvalid$1","createDuration","Duration","duration","years","quarters","quarter","weeks","isoWeek","days","milliseconds","_milliseconds","_days","_data","_bubble","isDuration","absRound","round","offset","utcOffset","offsetFromString","chunkOffset","matcher","matches","chunk","parts","cloneWithOffset","model","clone","setTime","local","getDateOffset","getTimezoneOffset","getSetOffset","keepLocalTime","keepMinutes","localAdjust","_changeInProgress","addSubtract","getSetZone","setOffsetToUTC","setOffsetToLocal","subtract","setOffsetToParsedOffset","tZone","hasAlignedHourOffset","isDaylightSavingTime","isDaylightSavingTimeShifted","_isDSTShifted","toArray","isLocal","isUtcOffset","isUtc","aspNetRegex","isoRegex","ret","diffRes","parseIso","momentsDifference","invalid","inp","positiveMomentsDifference","base","isAfter","isBefore","createAdder","direction","period","dur","tmp","isAdding","getCalendarFormat","myMoment","calendar$1","time","formats","sod","startOf","calendarFormat","localInput","endOf","isBetween","inclusivity","localFrom","localTo","isSame","inputMs","isSameOrAfter","isSameOrBefore","asFloat","zoneDelta","monthDiff","wholeMonthDiff","anchor","anchor2","adjust","defaultFormat","defaultFormatUtc","toISOString","keepOffset","toDate","inspect","zone","prefix","datetime","suffix","inputString","postformat","humanize","fromNow","toNow","newLocaleData","lang","MS_PER_SECOND","MS_PER_MINUTE","MS_PER_HOUR","MS_PER_400_YEARS","mod$1","dividend","divisor","localStartOfDate","utcStartOfDate","startOfDate","isoWeekday","unix","toObject","toJSON","isValid$2","parsingFlags","invalidAt","creationData","isoWeekYear","addWeekYearFormatToken","getter","getSetWeekYear","getSetWeekYearHelper","getSetISOWeekYear","getISOWeeksInYear","getWeeksInYear","weekInfo","weeksTarget","setWeekAll","dayOfYearData","getSetQuarter","getSetDayOfMonth","getSetDayOfYear","getSetMinute","getSetSecond","parseMs","getSetMillisecond","getZoneAbbr","getZoneName","isoWeeks","isoWeeksInYear","parseZone","isDST","zoneAbbr","zoneName","dates","isDSTShifted","createUnix","createInZone","preParsePostFormat","firstDayOfYear","firstDayOfWeek","get$1","field","listMonthsImpl","listWeekdaysImpl","localeSorted","shift","listMonths","listMonthsShort","listWeekdays","listWeekdaysShort","listWeekdaysMin","langData","mathAbs","addSubtract$1","add$1","subtract$1","absCeil","bubble","monthsFromDays","monthsToDays","daysToMonths","as","valueOf$1","makeAs","alias","asMilliseconds","asSeconds","asMinutes","asHours","asDays","asWeeks","asMonths","asQuarters","asYears","clone$1","get$2","makeGetter","thresholds","substituteTimeAgo","relativeTime$1","posNegDuration","getSetRelativeTimeRounding","roundingFunction","getSetRelativeTimeThreshold","threshold","withSuffix","abs$1","toISOString$1","Y","toFixed","total","totalSign","ymSign","daysSign","hmsSign","proto$2","toIsoString","relativeTimeRounding","relativeTimeThreshold","HTML5_FMT","DATETIME_LOCAL","DATETIME_LOCAL_SECONDS","DATETIME_LOCAL_MS","TIME","TIME_SECONDS","TIME_MS","byteToHex","i$1","stringifyUUID","buf","bth","crypto","getRandomValues","_rnds8","Uint8Array","whatwgRNG","_rnds","r","byteToHex$1","i$1$1","seedBytes","defaultNodeId","defaultClockseq","uuid4","options","rnds","rng","ASPDateRegex","fullHexRE","shortHexRE","rgbRE","rgbaRE","recursiveDOMDelete","DOMobject","hasChildNodes","child","firstChild","removeChild","isString","parse","copyOrDelete","allowDeletion","doDeletion","fillIfDefined","aProp","bProp","selectiveExtend","props","_len","others","_key","_others","selectiveDeepExtend","deepExtend","selectiveNotDeepExtend","propsToExclude","protoExtend","equalArray","convert","Boolean","getType","_value","never","copyAndExtendArray","newValue","copyArray","getAbsoluteLeft","elem","getBoundingClientRect","left","getAbsoluteRight","right","getAbsoluteTop","top","addClassName","classNames","classes","className","newClasses","removeClassName","oldClasses","_key2","updateProperty","throttle","scheduled","requestAnimationFrame","addEventListener","element","action","listener","useCapture","navigator","userAgent","attachEvent","removeEventListener","detachEvent","preventDefault","event","returnValue","getTarget","srcElement","Element","nodeType","parentNode","hasParent","parent","option","asBoolean","defaultValue","asNumber","asString","asSize","asElement","hexToRGB","hex","g","overrideOpacity","color","opacity","rgb","_rgb","RGBToHex","red","green","blue","parseColor","inputColor","defaultColor","colorStr","isValidRGB","isValidHex","hsv","hexToHSV","lighterColorHSV","v","darkerColorHSV","darkerColorHex","HSVToHex","lighterColorHex","background","border","highlight","hover","_color","RGBToHSV","minRGB","maxRGB","hue","saturation","cssUtil","cssText","styles","_key3","_value2","addCssText","currentStyles","newStyles","removeCssText","removeStyles","_key4","HSVToRGB","isOk","isValidRGBA","rgba","selectiveBridgeObject","fields","referenceObject","objectTo","bridgeObject","insertSort","compare","mergeOptions","mergeTarget","globalOptions","isPresent","isEmpty","doMerge","dst","srcOption","globalPassed","globalOption","globalEnabled","enabled","binarySearchCustom","orderedItems","comparator","field2","maxIterations","iteration","low","high","middle","item","_value3","searchResult","binarySearchValue","sidePreference","prevValue","nextValue","easingFunctions","linear","easeInQuad","easeOutQuad","easeInOutQuad","easeInCubic","easeOutCubic","easeInOutCubic","easeInQuart","easeOutQuart","easeInOutQuart","easeInQuint","easeOutQuint","easeInOutQuint","getScrollBarWidth","inner","width","height","outer","visibility","body","w1","offsetWidth","w2","clientWidth","topMost","pile","accessors","candidate","_iteratorNormalCompletion","_didIteratorError","_iteratorError","_iterator","_step","member","err","return","util","freeze","randomUUID","_typeof_1","_typeof2","_classCallCheck","instance","classCallCheck","_defineProperties","descriptor","_createClass","protoProps","staticProps","createClass","_assertThisInitialized","ReferenceError","assertThisInitialized","_possibleConstructorReturn","possibleConstructorReturn","_getPrototypeOf","_setPrototypeOf","_inherits","subClass","superClass","inherits","createCommonjsModule$1","byteToHex$2","i$2","random$1","byteToHex$1$1","seedBytes$1","defaultNodeId$1","defaultClockseq$1","isId","Queue","_queue","_timeout","_extended","delay","Infinity","setOptions","_flushIfNeeded","destroy","flush","method","original","me","queue","context","entry","_this","clearTimeout","setTimeout","splice","arrayWithoutHoles","iterableToArray","nonIterableSpread","toConsumableArray","DataSetPart","_subscribers","remove","update","subscribe","on","unsubscribe","off","_trigger","payload","senderId","subscribers","subscriber","_objectSpread","DataSet","_DataSetPart","_options","_idProp","fieldId","_type","addedIds","_addItem","items","_this2","updatedIds","oldData","updatedData","idProp","addOrUpdate","origId","fullItem","oldItem","_updateItem","_id","ids","returnType","itemIds","itemId","_getItem","order","_sort","_filterFields","_i2","_len2","_i3","_len3","resultant","_id2","getIds","_i4","_len4","_i5","_len5","_id3","_i6","_len6","_id4","_i7","_len7","_i8","_len8","_id5","getDataSet","_i9","_len9","_id6","_item","mappedItems","reduce","filteredItem","av","bv","removedIds","removedItems","_remove","ident","clear","maxField","itemField","minField","distinct","fieldType","count","exists","_i10","_len10","types","raw","converted","DataView","_ids","_onEvent","bind","setData","refresh","oldIds","newIds","error","viewOptions","thisFilter","optionsFilter","defaultFilter","params","oldItems","updatedItems","CanvasRenderingContext2D","circle","beginPath","arc","PI","closePath","square","rect","triangle","s2","ir","sqrt","moveTo","lineTo","triangleDown","star","radius","sin","cos","diamond","roundRect","r2d","ellipse_vis","kappa","ox","oy","xe","ye","xm","ym","bezierCurveTo","database","wEllipse","hEllipse","ymb","yeb","dashedLine","x2","y2","pattern","patternLength","dx","dy","slope","distRemaining","patternIndex","draw","xStep","dashLength","hexagon","sides","Emitter","mixin","_callbacks","once","removeListener","removeAllListeners","callbacks","cb","emit","listeners","hasListeners","parseDOT","dot","parseGraph","NODE_ATTR_MAPPING","EDGE_ATTR_MAPPING","TOKENTYPE","NULL","DELIMITER","IDENTIFIER","UNKNOWN","DELIMITERS","tokenType","nextPreview","regexAlphaNumeric","isAlphaNumeric","merge","setValue","path","addNode","graph","node","current","graphs","root","nodes","attr","addEdge","edge","edges","createEdge","arrows","getToken","isComment","c2","newSyntaxError","SyntaxError","chop","parseStatements","parseStatement","subgraph","parseSubgraph","parseEdge","parseAttributeStatement","parseNodeStatement","subgraphs","parseAttributeList","edgeStyles","arrowTypes","box","crow","curve","icurve","normal","inv","tee","vee","attr_list","attr_names","arrowType","includes","idx","dir","dir_type","from_type","to_type","idx_arrow","nof_attr_list","tmp_attr_list","message","text","maxLength","forEach2","elem1","elem2","setProp","pop","convertAttr","mapping","visProp","visPropI","DOTToGraph","dotData","graphData","dotNode","graphNode","label","image","shape","convertEdge","dotEdge","graphEdge","subEdge","parseGephi","gephiJSON","optionsObj","inheritColor","fixed","gEdges","vEdges","gEdge","vEdge","attributes","title","vNodes","gNode","vNode","size","this","keycharm","container","_exportFunctions","_bound","keydown","keyup","_keys","fromCharCode","down","handleEvent","up","keyCode","bound","shiftKey","bindAll","getKey","unbind","newBindings","reset","hammerMock","noop","Hammer","require$$0","Activator","active","dom","overlay","hammer","_onTapOverlay","events","stopPropagation","onClick","_hasParent","deactivate","escListener","activate","edit","del","back","editNode","editEdge","addDescription","edgeDescription","editEdgeDescription","createEdgeError","deleteClusterError","editClusterError","CachedImage","NUM_ITERATIONS","Image","canvas","initialized","h2","h4","h8","h16","w4","w8","w16","coordinates","_fillMipMap","ctx","getContext","drawImage","iterations","factor","Images","images","imageBroken","url","brokenUrl","imageToLoadBrokenUrlOn","onerror","imageToRedrawWith","cachedImage","img","onload","_fixImageCoordinates","init","_redrawWithImage","_tryloadBrokenUrl","imageToCache","offsetHeight","Groups","defaultIndex","groupsArray","groupIndex","defaultGroups","defaultOptions","useDefaultGroups","optionFields","groupName","group","groupname","shouldCreate","_arrayWithHoles","_iterableToArrayLimit","_arr","_n","_e","_s","_nonIterableRest","_slicedToArray","arrayWithHoles","iterableToArrayLimit","nonIterableRest","ComponentUtil","subOption","allowed","chosen","chosenEdge","point","rotationPoint","angle","tmp2","bottom","LabelAccumulator","measureText","lines","blocks","tmpText","block","line","_add","tmpLines","tmpLine","firstEmptyBlock","tmpBlocks","determineLineHeights","determineLabelSize","removeEmptyBlocks","tagPattern","MarkupAccumulator","bold","ital","mono","spacing","buffer","modStack","modName","tagName","emitBlock","unshift","setTag","advance","prepareRegExp","regExp","nextTag","checkTag","unsetTag","prepared","LabelSplitter","selected","textWidth","getFormattingValues","measure","isValidLabel","finalize","font","fontOptions","nlLines","lineCount","multi","splitBlocks","newLine","maxWdt","splitStringIntoLines","append","markupSystem","system","parseEntities","parsed","parseWS","parseStartTag","parseEndTag","beginable","parseOverride","decodeMarkupSystem","splitMarkdownBlocks","splitHtmlBlocks","curWidth","words","pre","newText","overMaxWidth","appendLast","getLongestFit","word","getLongestFitWord","newW","multiFontStyle","Label","edgelabel","pointToSelf","baseSize","yLine","isEdgeLabel","elementOptions","initFontOptions","labelDirty","newFontOptions","parseFontString","vadjust","constrainWidth","minWdt","constrainHeight","minHgt","valign","widthConstraint","widthConstraintMaximum","widthConstraintMinimum","heightConstraint","heightConstraintMinimum","heightConstraintValign","propagateFonts","constrain","chooser","choosify","margins","widthBias","heightBias","dstPile","srcPile","addFontToPile","tmpShorthand","opt","multiName","multiFont","optionNames","getFontOption","fontPile","addFontOptionsToPile","getBasicOptions","modOptions","tmpMultiFontOptions","getFontOptions","baseline","viewFontSize","view","scale","scaling","drawThreshold","maxVisible","calculateLabelSize","_drawBackground","_drawText","fillStyle","getSize","fillRect","_setAlignment","textAlign","labelHeight","align","_getColor","strokeColor","fontColor","strokeWidth","lineWidth","strokeStyle","lineJoin","strokeText","fillText","lineMargin","textBaseline","initialStrokeColor","_processLabel","getValue","face","labelHighlightBold","fontString","selectedState","hoverState","inText","process","differentState","state","_processLabelText","outOptions","inOptions","newOptionsArray","NodeBase","labelModule","margin","refreshNeeded","boundingBox","adjustSizes","borderWidth","resize","shadow","shadowColor","shadowBlur","shadowSize","shadowOffsetX","shadowX","shadowOffsetY","shadowY","borderDashes","setLineDash","dashes","shapeProperties","borderColor","save","enableBorderDashes","stroke","disableBorderDashes","restore","enableShadow","fill","disableShadow","performStroke","_updateBoundingBox","textSize","getTextSize","DEFAULT_SIZE","Box","_setMargins","needsRefresh","dimensions","getDimensionsFromLabel","initContextForDraw","borderRadius","performFill","updateBoundingBox","_addBoundingBoxMargin","CircleImageBase","labelOffset","imageObj","imageObjAlt","setImages","selection_changed","imageTmp","useImageSize","ratio_width","ratio_height","globalAlpha","interpolation","drawImageAtPosition","yLabel","labelDimensions","Circle","diameter","_drawRawCircle","CircularImage","imageAbsent","_resizeImage","switchImages","clip","_drawImageAtPosition","_drawImageLabel","Database","_distanceToBorder","ShapeBase","sizeMultiplier","icon","Diamond","_drawShape","Dot","Ellipse","Icon","iconSize","_icon","iconTextSpacing","side","useBorderWithImage","neutralborderWidth","selectionLineWidth","borderWidthSelected","Square","Hexagon","Star","Text","Triangle","TriangleDown","errorFound","allOptions","printStyle","Validator","referenceOptions","subObject","usedOptions","__any__","getSuggestion","referenceOption","is_object","refOptionObj","__type__","checkFields","log","printLocation","optionType","refOptionType","print","localSearch","findInOptions","globalSearch","localSearchThreshold","globalSearchThreshold","indexMatch","distance","closestMatch","recursive","closestMatchPath","lowerCaseOption","op","levenshteinDistance","matrix","Node","imagelist","grouplist","baseFontSize","predefinedPosition","currentShape","checkMass","parseOptions","_load_images","updateLabelModule","updateShape","hidden","physics","load","brokenImage","unselected","updateGroupOptions","currentGroup","distanceToBorder","customScalingFunction","sizeDiff","fontDiff","visible","pointInRect","nodeId","labelId","parentOptions","newOptions","groupList","hasGroup","groupObj","skipProperties","parsedColor","mass","strId","NodesHandler","layoutEngine","functions","createNode","nodesListeners","boldital","level","bindEventListeners","emitter","doNotEmit","oldNodesData","newNodes","properties","positionInitially","changedData","dataChanged","oldValue","constructorClass","clearPositions","dataArray","nodeIndices","dataset","nodeList","nodeObj","toId","fromId","edgeList","EndPoint","points","arrowData","xt","yt","Arrow","transform","drawPath","Crow","Curve","pi","start_angle","end_angle","InvertedCurve","InvertedTriangle","Bar","Vee","EndPoints","EdgeBase","colorDirty","selectionWidth","hoverWidth","fromPoint","toPoint","viaNode","getColor","_drawDashedLine","_drawLine","_line","_getCircleData","_circle","lineCap","lineDashOffset","nearNode","_findBorderPosition","_findBorderPositionCircle","selfReferenceSize","percentage","distanceToPoint","difference","_pointOnCircle","atan2","inheritsColor","grd","createLinearGradient","fromColor","toColor","addColorStop","x1","y1","x3","y3","via","_getDistanceToEdge","py","something","arrowPoint","node1","node2","guideOffset","scaleFactor","fromArrowScale","fromArrowType","toArrowScale","toArrowType","middleArrowScale","middleArrowType","smooth","findBorderPosition","guidePos","getPoint","xi","yi","arrowCore","attrs","origCtxAttr","attrname","backgroundColor","backgroundSize","setStrokeDashed","backgroundDashes","BezierEdgeBase","_getViaCoordinates","minDistance","lastX","lastY","_getDistanceToLine","viaNode1","viaNode2","hasNode1","hasNode2","quadraticCurveTo","drawBackground","CubicBezierEdgeBase","via1","via2","vec","CubicBezierEdge","viaNodes","_bezierCurve","roundness","forceDirection","_findBorderPositionBezier","_getDistanceToBezierEdge","BezierEdgeDynamic","_boundFunction","positionBezierNode","physicsChange","setupSupportNode","connect","parentEdgeId","cx","cy","cr","BezierEdgeStatic","xVia","yVia","stepX","stepY","originalAngle","myAngle","StraightEdge","edgeSegmentLength","toBorderDist","toBorderPoint","borderPos","Edge","baseWidth","edgeType","connected","oldHidden","updateEdgeType","_setInteractionWidths","newHidden","toArrow","fromArrow","middleArrow","inherit","arrowStrikethrough","selectedWidth","changeInType","cleanup","disconnect","attachEdge","detachEdge","widthDiff","getViaNode","getArrowData","drawLine","drawArrows","drawLabel","drawArrowHead","_getRotation","translate","rotate","edgeId","isOverlappingWith","distMax","xFrom","yFrom","xTo","yTo","xObj","yObj","dist","getDistanceToEdge","copyFromGlobals","colorsDefined","EdgesHandler","edgesListeners","edgeData","smoothOptions","reconnectEdges","oldEdgesData","edgesData","oldEdge","_addMissingEdges","_removeInvalidEdges","edgesToDelete","toNode","fromNode","isCluster","addIds","BarnesHutSolver","physicsBody","barnesHutTree","randomSeed","thetaInversed","theta","overlapAvoidanceFactor","avoidOverlap","gravitationalConstant","physicsNodeIndices","nodeCount","_formBarnesHutTree","_getForceContributions","parentBranch","_getForceContribution","children","NW","NE","SW","SE","childrenCount","centerOfMass","calcSize","_calculateForces","gravityForce","fx","fy","forces","minX","minY","maxX","maxY","minimumTreeSize","rootSize","halfRootSize","centerX","centerY","range","maxWidth","_splitBranch","_placeInTree","totalMass","totalMassInv","biggestSize","skipMassUpdate","_updateBranchMass","region","_placeInRegion","seededRandom","containedNode","_insertRegion","childSize","_drawBranch","branch","RepulsionSolver","repulsingForce","nodeDistance","HierarchicalRepulsionSolver","steepness","SpringSolver","edgeLength","edgeIndices","physicsEdgeIndices","node3","springLength","_calculateSpringForce","springForce","springConstant","HierarchicalSpringSolver","springFx","springFy","totalFx","totalFy","correctionFx","correctionFy","CentralGravitySolver","centralGravity","ForceAtlas2BasedRepulsionSolver","degree","ForceAtlas2BasedCentralGravitySolver","PhysicsEngine","velocities","physicsEnabled","simulationInterval","requiresTimeout","previousStates","referenceState","freezeCache","renderTimer","adaptiveTimestep","adaptiveTimestepEnabled","adaptiveCounter","adaptiveInterval","stabilized","startedStabilization","stabilizationIterations","ready","barnesHut","damping","forceAtlas2Based","repulsion","hierarchicalRepulsion","maxVelocity","minVelocity","solver","stabilization","updateInterval","onlyDynamicEdges","fit","timestep","layoutFailed","initPhysics","stopSimulation","startSimulation","updatePhysicsData","nodesSolver","edgesSolver","gravitySolver","Repulsion","HierarchicalRepulsion","modelOptions","stabilize","viewFunction","simulationStep","_emitStabilized","startTime","physicsTick","physicsTime","runDoubleSpeed","amountOfIterations","solve","moveNodes","_evaluateStepQuality","_startStabilizing","doAdaptive","physicsStep","revert","adjustTimeStep","nodeIds","positions","vx","vy","dpos","reference","posThreshold","maxNodeVelocity","averageNodeVelocity","velocityAdaptiveThreshold","nodeVelocity","_performStep","df","maxV","force","velocity","calculateComponentVelocity","totalVelocity","targetIterations","_freezeNodes","_stabilizationBatch","running","sendProgress","_finalizeStabilization","_restoreFrozenNodes","colorFactor","forceSize","arrowSize","NetworkUtil","allNodes","specificNodes","clonedOptions","amountOfConnections","Cluster","containedNodes","containedEdges","childClusterId","childCluster","clusterEdge","parentClusterEdge","clusteringEdgeReplacingIds","srcId","edgeReplacedById","ClusterEngine","clusteredNodes","clusteredEdges","hubsize","_getHubSize","_checkOptions","nodesToCluster","clusterByConnection","refreshData","joinCondition","childNodesObj","childEdgesObj","_cluster","edgeCount","clusters","usedNodes","relevantEdgeCount","checkJoinCondition","cloneOptions","gatheringSuccessful","childNodeId","_getConnectedId","findClusterData","foundCluster","clusterByEdgeCount","clusterNodeProperties","parentNodeId","parentClonedOptions","childClonedOptions","childNodeIDs","childNode","childEdge","clusterEdgeProperties","otherNodeId","childKeys","createEdges","newEdges","getNewEdge","createdEdge","newEdge","matchToDirection","matchFromDirection","_createClusteredEdge","_backupEdgeOptions","tmpNodesToRemove","allowSingleNodeCluster","processProperties","childNodesOptions","childEdgesOptions","clusterId","_getClusterPosition","clusterNode","_clusterEdges","originalOptions","clusterNodeId","findNode","parentIndex","parentClusterNodeId","parentClusterNode","_openChildCluster","releaseFunction","clusterPosition","newPositions","edgesToBeDeleted","otherNode","transferId","transferEdge","otherCluster","_restoreEdge","nodesArray","counter","reverse","clusteredNodeId","startEdgeId","allEdgeIds","getClusteredEdges","clusteredEdgeId","getBaseEdges","IdsToHandle","doneIds","foundIds","nextId","nextEdge","replacingIds","replacingId","average","averageSquared","hubCounter","largestHub","variance","standardDeviation","hubThreshold","baseEdge","extraOptions","childNodes","childEdges","_createClusterEdges","clusteredNode","deletedNodeIds","deletedEdgeIds","eachClusterNode","endPointsValid","replacedIds","numValid","containedEdgeId","containedEdge","deletedEdgeId","_filter","shouldBeClustered","_isClusteredNode","_isClusteredEdge","clusterFrom","_getClusterNodeForNode","clusterTo","changed","continueLoop","clustersToOpen","numNodes","allowSingle","openCluster","_updateState","_initRequestAnimationFrame","mozRequestAnimationFrame","webkitRequestAnimationFrame","msRequestAnimationFrame","CanvasRenderer","redrawRequested","renderingActive","renderRequests","allowRedraw","dragging","zooming","hideEdgesOnDrag","hideEdgesOnZoom","hideNodesOnDrag","_determineBrowserMethod","zoomTimeoutId","_requestRedraw","_resizeNodes","_redraw","_startRendering","cancelAnimationFrame","timer","myWindow","_requestNextFrame","_renderStep","frame","setSize","setTransform","clientHeight","clearRect","translation","_drawEdges","_drawNodes","alwaysShow","topLeft","DOMtoCanvas","bottomRight","viewableArea","isSelected","isBoundingBoxOverlappingWith","browserType","inputHandler","isFirst","isFinal","offTouch","pinchRecognizer","TOUCH_ACTION_PAN_Y","getTouchAction","Canvas","pixelRatio","resizeTimer","resizeFunction","_onResize","cameraState","canvasViewCenter","autoResize","hammerFrame","_cleanUp","setInterval","clearInterval","previousWidth","previousHeight","widthRatio","heightRatio","newScale","currentViewCenter","distanceFromCenter","tabIndex","noCanvas","fontWeight","padding","innerHTML","_setPixelRatio","_bindHammer","drag","pinch","enable","DIRECTION_ALL","hammerUtil","onTouch","eventListeners","onTap","onDoubleTap","onHold","onDragStart","onDrag","onDragEnd","onPinch","onMouseWheel","onMouseMove","onContext","onRelease","_prepareValue","emitEvent","oldWidth","oldHeight","previousRatio","_getCameraState","newWidth","newHeight","_setCameraState","numerator","devicePixelRatio","denominator","webkitBackingStorePixelRatio","mozBackingStorePixelRatio","msBackingStorePixelRatio","oBackingStorePixelRatio","backingStorePixelRatio","_determinePixelRatio","_XconvertCanvasToDOM","_YconvertCanvasToDOM","_XconvertDOMtoCanvas","_YconvertDOMtoCanvas","View","animationSpeed","renderRefreshRate","animationEasingFunction","easingTime","sourceScale","targetScale","sourceTranslation","targetTranslation","lockedOnNodeId","lockedOnNodeOffset","touchTime","releaseNode","initialZoom","zoomLevel","positionDefined","getRange","numberOfNodes","xDistance","yDistance","xZoomLevel","yZoomLevel","center","findCenter","animationOptions","animation","nodePosition","lockedOnNode","getViewPosition","easingFunction","animateView","locked","_transitionRedraw","viewCenter","_lockedRedraw","finished","progress","NavigationHandler","iconsCreated","navigationHammers","boundFunctions","activated","configureKeyboardBindings","navigationButtons","loadNavigationElements","cleanNavigation","navigationDOM","navigationDivs","navigationDivActions","_fit","bindToRedraw","_stopMovement","boundAction","keyboard","speed","scaleOld","zoom","scaleFrac","tx","ty","pointer","bindToWindow","unbindFromRedraw","Popup","overflowMethod","content","doShow","maxHeight","isLeft","isTop","hide","InteractionHandler","selectionHandler","navigationHandler","popup","popupObj","popupTimer","getPointer","dragNodes","dragView","tooltipDelay","zoomView","zoomSpeed","tooltip","touch","pinched","multiselect","changedPointers","ctrlKey","metaKey","checkSelectionChanges","_generateClickEvent","clientX","clientY","previousSelection","getSelection","selectAdditionalOnPoint","selectOnPoint","currentSelection","deselectedItems","_determineDifference","selectedItems","firstSet","secondSet","arrayDiff","firstArr","secondArr","getNodeAt","selection","unselectAll","selectObject","selectionObj","xFixed","yFixed","deltaX","deltaY","diffX","diffY","preScaleDragPointer","postScaleDragPointer","canvasToDOM","delta","wheelDelta","detail","popupVisible","_checkHidePopup","setPosition","show","focus","_checkShowPopup","hoverObject","pointerObj","previousPopupObjId","nodeUnderCursor","popupType","overlappingNodes","getTitle","overlappingEdges","popupTargetType","popupTargetId","setText","_pointerToPositionObject","stillOnObj","overNode","SelectionHandler","hoverObj","selectable","selectConnectedEdges","hoverConnectedEdges","updateSelection","getEdgeAt","selectionChanged","deselectObject","DOM","eventType","oldSelection","emptySelection","_initBaseEvent","getClickedItems","controlEdge","highlightEdges","_selectConnectedEdges","select","_addToSelection","_removeFromSelection","canvasPos","returnNode","positionObject","_getAllNodesOverlappingWith","_getEdgesOverlappingWith","returnEdge","mindist","overlappingEdge","_unselectConnectedEdges","unselect","clusterSize","_addToHover","hoverChanged","emitBlurEvent","hoveredEdgesCount","hoveredNodesCount","newOnlyHoveredEdge","newOnlyHoveredNode","emitHoverEvent","_hoverConnectedEdges","getSelectedNodes","edgeIds","getSelectedEdges","idArray","RangeError","setSelection","getItemsOnPoint","__esModule","DEFAULT_MIN_MERGE","DEFAULT_MIN_GALLOPING","DEFAULT_TMP_STORAGE_LENGTH","POWERS_OF_TEN","log10","alphabeticalCompare","al","bl","aStr","bStr","minRunLength","makeAscendingRun","lo","hi","runHi","reverseRun","binaryInsertionSort","start","pivot","mid","gallopLeft","hint","lastOffset","maxOffset","gallopRight","TimSort","minGallop","tmpStorageLength","stackLength","runStart","runLength","stackSize","pushRun","mergeRuns","mergeAt","forceMergeRuns","start1","length1","start2","length2","mergeLow","mergeHigh","cursor1","cursor2","dest","count1","count2","exit","customCursor","customDest","remaining","ts","minRun","DirectionInterface","abstract","fake_use","nodeArray","VerticalStrategy","layout","hierarchical","addToOrdering","getTreeSize","min_x","max_x","levelSeparation","HorizontalStrategy","min_y","max_y","HierarchicalStatus","childrenReference","parentReference","trees","distributionOrdering","levels","distributionIndex","isTree","treeIndex","treeId","accumulator","_getMaxLevel","nodeA","nodeB","minLevel","parents1","parents2","curLevel","LayoutEngine","initialRandomSeed","setPhysics","optionsBackup","improvedLayout","nodeSpacing","treeSpacing","blockShifting","edgeMinimization","parentCentralization","sortMethod","setupHierarchicalLayout","layoutNetwork","curveType","prevHierarchicalState","setDirectionStrategy","adaptAllOptionsForHierarchicalLayout","backupPhysics","indices","MAX_LEVELS","clusterThreshold","clusterOptions","startLength","before","modules","clustering","clusterBridges","clusterOutliers","after","_declusterAll","info","kamadaKawai","_shiftToCenter","getRangeCore","clustersPresent","definedLevel","undefinedLevel","lastNodeOnLevel","_determineLevelsByHubsize","_determineLevelsDirected","_determineLevelsCustomCallback","ensureLevel","distribution","_getDistribution","_generateMap","_placeNodesByHierarchy","_condenseHierarchy","stillShifting","branches","shiftTrees","treeSizes","getTreeSizes","shiftBy","shiftTree","treeWidths","numTrees","getBranchNodes","getBranchBoundary","branchMap","maxLevel","minSpace","maxSpace","branchNode","getPosition","_getSpaceAroundNode","minSpaceNode","maxSpaceNode","getCollisionLevel","maxLevel1","getMaxLevel","maxLevel2","shiftElementsCloser","centerParents","hier","levelNodes","hasSameParent","inSameSubNetwork","branchShiftCallback","centerParent","diffAbs","branchNodes1","branchNodes2","branchNodeBoundary1","branchNodeBoundary2","max1","min2","minSpace2","diffBranch","_shiftBlock","_centerParent","minimizeEdgeLength","allEdges","nodeLevel","C2","referenceNodes","aboveEdges","getFx","sum","getDFx","getGuess","guess","guessMap","dfx","ratio","moveBranch","branchNodes","branchBoundary","minSpaceBranch","maxSpaceBranch","branchOffset","moveNode","newPosition","minimizeEdgeLengthBottomUp","getLevels","shiftBranchesCloserBottomUp","centerAllParents","centerAllParentsBottomUp","useMap","prevNode","prevPos","nextNode","nextPos","parents","parentId","_getCenterPosition","positionedNodes","_indexArrayToNodes","handledNodeCount","_validatePositionAndContinue","parentLevel","childRef","childNodeLevel","previousPos","sharedParent","_findCommonParent","withChild","_placeBranchNodes","fix","hubSizes","hubSize","_getActiveEdges","levelDownstream","_getHubSizes","_crawlNetwork","customCallback","levelByDirection","levelA","setMinLevelToZero","isBidirectional","otherEdge","levelB","fillInRelations","addRelation","checkIfTree","startingNodeId","crawler","tree","setTreeIndex","shifter","childA","childB","iterateParents","parentRef","findParent","foundParent","isVertical","minPos","maxPos","ManipulationSystem","editMode","manipulationDiv","editModeDiv","closeDiv","manipulationHammers","temporaryUIFunctions","temporaryEventFunctions","temporaryIds","guiEnabled","inMode","selectedControlNode","initiallyActive","deleteNode","deleteEdge","controlNodeStyle","_clean","_restore","enableEditMode","disableEditMode","_setup","showManipulatorToolbar","_createEditButton","manipulationDOM","selectedNodeCount","_getSelectedNodeCount","selectedEdgeCount","_getSelectedEdgeCount","selectedTotalCount","needSeperator","_createAddNodeButton","_createSeperator","_createAddEdgeButton","_createEditNodeButton","_createEditEdgeButton","_createDeleteButton","_bindHammerToDiv","toggleEditMode","_temporaryBindEvent","_createBackButton","_createDescription","_performAddNode","_getSelectedNode","finalizedData","alert","_temporaryBindUI","_handleConnect","_finishConnect","_dragControlNode","_dragStartEdge","editWithoutDrag","edgeBeingEditedId","_performEditEdge","controlNodeFrom","_getNewTargetNode","controlNodeTo","_controlNodeTouch","_controlNodeDragStart","_controlNodeDrag","_controlNodeDragEnd","findBorderPositions","selectedNodes","selectedEdges","deleteFunction","_createWrappers","_removeManipulationDOM","button","_createButton","_cleanManipulatorHammers","_cleanupTemporaryNodesAndEdges","_unbindTemporaryUIs","_unbindTemporaryEvents","addNodeMode","addEdgeMode","editEdgeMode","deleteBtnClass","rtl","deleteSelected","labelClassName","newFunction","boundFunction","UIfunctionName","functionName","eventName","domElement","indexTempEdge","indexTempNode","lastTouch","fromSelect","toSelect","overlappingNodeIds","targetNode","connectionEdge","connectFromId","_performAddEdge","clickData","defaultData","sourceNodeId","targetNodeId","eeFunct","htmlColors","black","navy","darkblue","mediumblue","darkgreen","teal","darkcyan","deepskyblue","darkturquoise","mediumspringgreen","lime","springgreen","aqua","cyan","midnightblue","dodgerblue","lightseagreen","forestgreen","seagreen","darkslategray","limegreen","mediumseagreen","turquoise","royalblue","steelblue","darkslateblue","mediumturquoise","indigo","darkolivegreen","cadetblue","cornflowerblue","mediumaquamarine","dimgray","slateblue","olivedrab","slategray","lightslategray","mediumslateblue","lawngreen","chartreuse","aquamarine","maroon","purple","olive","gray","skyblue","lightskyblue","blueviolet","darkred","darkmagenta","saddlebrown","darkseagreen","lightgreen","mediumpurple","darkviolet","palegreen","darkorchid","yellowgreen","sienna","brown","darkgray","lightblue","greenyellow","paleturquoise","lightsteelblue","powderblue","firebrick","darkgoldenrod","mediumorchid","rosybrown","darkkhaki","silver","mediumvioletred","indianred","peru","chocolate","tan","lightgrey","palevioletred","thistle","orchid","goldenrod","crimson","gainsboro","plum","burlywood","lightcyan","lavender","darksalmon","violet","palegoldenrod","lightcoral","khaki","aliceblue","honeydew","azure","sandybrown","wheat","beige","whitesmoke","mintcream","ghostwhite","salmon","antiquewhite","linen","lightgoldenrodyellow","oldlace","fuchsia","magenta","deeppink","orangered","tomato","hotpink","coral","darkorange","lightsalmon","orange","lightpink","pink","gold","peachpuff","navajowhite","moccasin","bisque","mistyrose","blanchedalmond","papayawhip","lavenderblush","seashell","cornsilk","lemonchiffon","floralwhite","snow","yellow","lightyellow","ivory","white","ColorPicker","generated","centerCoordinates","hueCircle","initialColor","previousColor","applied","updateCallback","closeCallback","_create","_setSize","setInitial","htmlColor","_isColorString","rgbaArray","rgbObj","alpha","_setColor","_generateHueCircle","storePrevious","_updatePicker","setColor","angleConvert","colorPickerSelector","colorPickerCanvas","pixelRation","putImageData","brightnessRange","opacityRange","initialColorDiv","newColorDiv","colorPickerDiv","opacityDiv","brightnessDiv","arrowDiv","onchange","_setOpacity","oninput","_setBrightness","brightnessLabel","opacityLabel","cancelButton","onclick","applyButton","_apply","saveButton","_save","loadButton","_loadLast","_moveSelector","sat","hfac","sfac","getImageData","newTop","newLeft","Configurator","parentModule","defaultContainer","configureOptions","changedOptions","allowCreation","popupCounter","showButton","moduleOptions","domElements","popupDiv","popupLimit","popupHistory","colorPicker","wrapper","_removePopup","_handleObject","_makeItem","_makeHeader","_makeButton","_push","_showPopupIfNeeded","div","objectLabel","selectedValue","_update","_makeLabel","step","popupString","popupValue","itemIndex","_setupPopup","generateButton","_printOptions","onmouseover","onmouseout","optionsContainer","html","hideTimeout","deleteTimeout","correspondingElement","checkbox","checked","_showColorPicker","insertTo","setUpdateCallback","colorString","setCloseCallback","checkOnly","visibleInSet","subObj","newPath","_getValue","_handleArray","_makeTextInput","_makeCheckbox","enabledPath","enabledValue","_makeColorField","_makeDropdown","_makeRange","_constructOptions","getOptions","bool","any","endPoints","configure","boolean","maximum","interaction","manipulation","minimum","clickToUse","FloydWarshall","edgesArray","D_matrix","cell","knode","kcolm","inode","icolm","jnode","jcolm","KamadaKawai","edgeStrength","distanceSolver","ignoreClusters","getDistances","_createL_matrix","_createK_matrix","_createE_matrix","innerThreshold","maxInnerIterations","maxEnergy","highE_nodeId","dE_dx","dE_dy","delta_m","subIterations","_getHighestEnergyNode","_moveNode","_getEnergy","maxEnergyNodeId","dE_dx_max","dE_dy_max","nodeIdx","E_sums","d2E_dx2","d2E_dxdy","d2E_dy2","x_m","y_m","km","K_matrix","lm","L_matrix","iIdx","x_i","y_i","kmat","lmat","_updateE_matrix","E_matrix","mIdx","colm","lcolm","oldDx","oldDy","Network","interactionHandler","renderer","nodesHandler","edgesHandler","validate","configurator","networkOptions","setModuleOptions","activator","_updateVisibleIndices","edgeNodesPresent","isVisible","_updateValueRange","dotparser","gephi","gephiData","gephiParser","valueMin","valueMax","valueTotal","setValueRange","isActive","cluster","getNodesInCluster","clusterByHubsize","getSeed","editNodeMode","getPositions","storePositions","getBoundingBox","getConnectedNodes","objectId","getConnectedEdges","selectNodes","selectEdges","redraw","getScale","getOptionsFromConfigurator","JSONcontainer","elementType","redundant","used","prepareElements","cleanupElements","svgContainer","createElementNS","DOMContainer","insertBefore","groupTemplate","labelObj","getSVGElement","setAttributeNS","xOffset","yOffset","textContent","require","network","convertDot","convertGephi"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAA,IAAIA,cAAc,GAAG,OAAOC,UAAP,KAAsB,WAAtB,GAAoCA,UAApC,GAAiD,OAAOC,MAAP,KAAkB,WAAlB,GAAgCA,MAAhC,GAAyC,OAAOC,MAAP,KAAkB,WAAlB,GAAgCA,MAAhC,GAAyC,OAAOC,IAAP,KAAgB,WAAhB,GAA8BA,IAA9B,GAAqC,EAA7L;;EAEA,SAASC,eAAT,GAA4B;EAC3B,QAAM,IAAIC,KAAJ,CAAU,wEAAV,CAAN;EACA;;EAED,SAASC,oBAAT,CAA8BC,EAA9B,EAAkCC,MAAlC,EAA0C;EACzC,SAAOA,MAAM,GAAG;EAAEC,IAAAA,OAAO,EAAE;EAAX,GAAT,EAA0BF,EAAE,CAACC,MAAD,EAASA,MAAM,CAACC,OAAhB,CAA5B,EAAsDD,MAAM,CAACC,OAApE;EACA;;EAED,IAAIC,OAAO,GAAGJ,oBAAoB,CAAC,UAAUE,MAAV,EAAkB;EACnD;EACA,MAAIN,MAAM,GAAGM,MAAM,CAACC,OAAP,GAAiB,OAAOR,MAAP,IAAiB,WAAjB,IAAgCA,MAAM,CAACU,IAAP,IAAeA,IAA/C,GAAsDV,MAAtD,GAA+D,OAAOE,IAAP,IAAe,WAAf,IAA8BA,IAAI,CAACQ,IAAL,IAAaA,IAA3C,GAAkDR,IAAlD;EAAA,IAC3FS,QAAQ,CAAC,aAAD,CAAR,EADF;EAEA,MAAI,OAAOC,GAAP,IAAc,QAAlB,EAA4BA,GAAG,GAAGX,MAAN,CAJuB;EAKpD,CALiC,CAAlC;;EAOA,IAAIY,KAAK,GAAGR,oBAAoB,CAAC,UAAUE,MAAV,EAAkB;EACjD,MAAIO,IAAI,GAAGP,MAAM,CAACC,OAAP,GAAiB;EAC1BO,IAAAA,OAAO,EAAE;EADiB,GAA5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F;;EAEdC,MAAAA,sBAAsB,EAAE,qBAFV;;EAGdC,MAAAA,iBAAiB,EAAE,yBAHL;;EAIdzgB,MAAAA,IAAI,EAAE,YAJQ;;EAKd0gB,MAAAA,IAAI,EAAE,OALQ;;EAMdC,MAAAA,YAAY,EAAE,UANA;;EAOdC,MAAAA,OAAO,EAAE,cAPK;;EAQdvgB,MAAAA,IAAI,EAAE,YARQ;;EASdN,MAAAA,KAAK,EAAE,SATO;;EAAA,KAAlB;EAYA,WAAOhO,KAAP;EAEH,GAv/IC,CAAD;;;;;ECAD,YAAc,GAAI,OAAOziB,MAAP,KAAkB,WAAnB,IAAmCA,MAAM,CAAC,QAAD,CAAzC,IAAuDg2D,QAAxE;;;;;;;ECFA;AACA,MAgBam7D,OAAO,GAAG;EACrBv4D,EAAAA,MAAM,EAANA,MADqB;EAErB41D,EAAAA,SAAS,EAATA,WAFqB;EAGrBG,EAAAA,WAAW,EAAXA,WAHqB;EAIrB3iD,EAAAA,UAAU,EAAVA,YAJqB;EAKrBolD,EAAAA,UAAU,EAAE5C,YALS;EAMrB6C,EAAAA,YAAY,EAAE39D;EANO,CAAhB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/node_modules/vis-network/dist/vis-network.min.css b/node_modules/vis-network/dist/vis-network.min.css index d1d9c3637ac8f299fcd90ddbf55f740d2db846cd..7dab8fc778bbcb28417c84f8d46ca470ea0264bc 100644 --- a/node_modules/vis-network/dist/vis-network.min.css +++ b/node_modules/vis-network/dist/vis-network.min.css @@ -1 +1 @@ -div.vis-color-picker{position:absolute;top:0;left:30px;margin-top:-140px;margin-left:30px;width:310px;height:444px;z-index:1;padding:10px;border-radius:15px;background-color:#fff;display:none;box-shadow:rgba(0,0,0,0.5) 0 0 10px 0}div.vis-color-picker div.vis-arrow{position:absolute;top:147px;left:5px}div.vis-color-picker div.vis-arrow::after,div.vis-color-picker div.vis-arrow::before{right:100%;top:50%;border:solid transparent;content:" ";height:0;width:0;position:absolute;pointer-events:none}div.vis-color-picker div.vis-arrow:after{border-color:rgba(255,255,255,0);border-right-color:#fff;border-width:30px;margin-top:-30px}div.vis-color-picker div.vis-color{position:absolute;width:289px;height:289px;cursor:pointer}div.vis-color-picker div.vis-brightness{position:absolute;top:313px}div.vis-color-picker div.vis-opacity{position:absolute;top:350px}div.vis-color-picker div.vis-selector{position:absolute;top:137px;left:137px;width:15px;height:15px;border-radius:15px;border:1px solid #fff;background:#4c4c4c;background:-moz-linear-gradient(top,#4c4c4c 0,#595959 12%,#666 25%,#474747 39%,#2c2c2c 50%,#000 51%,#111 60%,#2b2b2b 76%,#1c1c1c 91%,#131313 100%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0,#4c4c4c),color-stop(12%,#595959),color-stop(25%,#666),color-stop(39%,#474747),color-stop(50%,#2c2c2c),color-stop(51%,#000),color-stop(60%,#111),color-stop(76%,#2b2b2b),color-stop(91%,#1c1c1c),color-stop(100%,#131313));background:-webkit-linear-gradient(top,#4c4c4c 0,#595959 12%,#666 25%,#474747 39%,#2c2c2c 50%,#000 51%,#111 60%,#2b2b2b 76%,#1c1c1c 91%,#131313 100%);background:-o-linear-gradient(top,#4c4c4c 0,#595959 12%,#666 25%,#474747 39%,#2c2c2c 50%,#000 51%,#111 60%,#2b2b2b 76%,#1c1c1c 91%,#131313 100%);background:-ms-linear-gradient(top,#4c4c4c 0,#595959 12%,#666 25%,#474747 39%,#2c2c2c 50%,#000 51%,#111 60%,#2b2b2b 76%,#1c1c1c 91%,#131313 100%);background:linear-gradient(to bottom,#4c4c4c 0,#595959 12%,#666 25%,#474747 39%,#2c2c2c 50%,#000 51%,#111 60%,#2b2b2b 76%,#1c1c1c 91%,#131313 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#4c4c4c',endColorstr='#131313',GradientType=0)}div.vis-color-picker div.vis-new-color{position:absolute;width:140px;height:20px;border:1px solid rgba(0,0,0,0.1);border-radius:5px;top:380px;left:159px;text-align:right;padding-right:2px;font-size:10px;color:rgba(0,0,0,0.4);vertical-align:middle;line-height:20px}div.vis-color-picker div.vis-initial-color{position:absolute;width:140px;height:20px;border:1px solid rgba(0,0,0,0.1);border-radius:5px;top:380px;left:10px;text-align:left;padding-left:2px;font-size:10px;color:rgba(0,0,0,0.4);vertical-align:middle;line-height:20px}div.vis-color-picker div.vis-label{position:absolute;width:300px;left:10px}div.vis-color-picker div.vis-label.vis-brightness{top:300px}div.vis-color-picker div.vis-label.vis-opacity{top:338px}div.vis-color-picker div.vis-button{position:absolute;width:68px;height:25px;border-radius:10px;vertical-align:middle;text-align:center;line-height:25px;top:410px;border:2px solid #d9d9d9;background-color:#f7f7f7;cursor:pointer}div.vis-color-picker div.vis-button.vis-cancel{left:5px}div.vis-color-picker div.vis-button.vis-load{left:82px}div.vis-color-picker div.vis-button.vis-apply{left:159px}div.vis-color-picker div.vis-button.vis-save{left:236px}div.vis-color-picker input.vis-range{width:290px;height:20px}div.vis-network div.vis-manipulation{box-sizing:content-box;border-width:0;border-bottom:1px;border-style:solid;border-color:#d6d9d8;background:#fff;background:-moz-linear-gradient(top,#fff 0,#fcfcfc 48%,#fafafa 50%,#fcfcfc 100%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0,#fff),color-stop(48%,#fcfcfc),color-stop(50%,#fafafa),color-stop(100%,#fcfcfc));background:-webkit-linear-gradient(top,#fff 0,#fcfcfc 48%,#fafafa 50%,#fcfcfc 100%);background:-o-linear-gradient(top,#fff 0,#fcfcfc 48%,#fafafa 50%,#fcfcfc 100%);background:-ms-linear-gradient(top,#fff 0,#fcfcfc 48%,#fafafa 50%,#fcfcfc 100%);background:linear-gradient(to bottom,#fff 0,#fcfcfc 48%,#fafafa 50%,#fcfcfc 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff',endColorstr='#fcfcfc',GradientType=0);padding-top:4px;position:absolute;left:0;top:0;width:100%;height:28px}div.vis-network div.vis-edit-mode{position:absolute;left:0;top:5px;height:30px}div.vis-network div.vis-close{position:absolute;right:0;top:0;width:30px;height:30px;background-position:20px 3px;background-repeat:no-repeat;background-image:url("img/network/cross.png");cursor:pointer;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}div.vis-network div.vis-close:hover{opacity:.6}div.vis-network div.vis-manipulation div.vis-button,div.vis-network div.vis-edit-mode div.vis-button{float:left;font-family:verdana;font-size:12px;-moz-border-radius:15px;border-radius:15px;display:inline-block;background-position:0 0;background-repeat:no-repeat;height:24px;margin-left:10px;cursor:pointer;padding:0 8px 0 8px;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}div.vis-network div.vis-manipulation div.vis-button:hover{box-shadow:1px 1px 8px rgba(0,0,0,0.20)}div.vis-network div.vis-manipulation div.vis-button:active{box-shadow:1px 1px 8px rgba(0,0,0,0.50)}div.vis-network div.vis-manipulation div.vis-button.vis-back{background-image:url("img/network/backIcon.png")}div.vis-network div.vis-manipulation div.vis-button.vis-none:hover{box-shadow:1px 1px 8px rgba(0,0,0,0.0);cursor:default}div.vis-network div.vis-manipulation div.vis-button.vis-none:active{box-shadow:1px 1px 8px rgba(0,0,0,0.0)}div.vis-network div.vis-manipulation div.vis-button.vis-none{padding:0}div.vis-network div.vis-manipulation div.notification{margin:2px;font-weight:bold}div.vis-network div.vis-manipulation div.vis-button.vis-add{background-image:url("img/network/addNodeIcon.png")}div.vis-network div.vis-manipulation div.vis-button.vis-edit,div.vis-network div.vis-edit-mode div.vis-button.vis-edit{background-image:url("img/network/editIcon.png")}div.vis-network div.vis-edit-mode div.vis-button.vis-edit.vis-edit-mode{background-color:#fcfcfc;border:1px solid #ccc}div.vis-network div.vis-manipulation div.vis-button.vis-connect{background-image:url("img/network/connectIcon.png")}div.vis-network div.vis-manipulation div.vis-button.vis-delete{background-image:url("img/network/deleteIcon.png")}div.vis-network div.vis-manipulation div.vis-label,div.vis-network div.vis-edit-mode div.vis-label{margin:0 0 0 23px;line-height:25px}div.vis-network div.vis-manipulation div.vis-separator-line{float:left;display:inline-block;width:1px;height:21px;background-color:#bdbdbd;margin:0 7px 0 15px}div.vis-network div.vis-navigation div.vis-button{width:34px;height:34px;-moz-border-radius:17px;border-radius:17px;position:absolute;display:inline-block;background-position:2px 2px;background-repeat:no-repeat;cursor:pointer;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}div.vis-network div.vis-navigation div.vis-button:hover{box-shadow:0 0 3px 3px rgba(56,207,21,0.30)}div.vis-network div.vis-navigation div.vis-button:active{box-shadow:0 0 1px 3px rgba(56,207,21,0.95)}div.vis-network div.vis-navigation div.vis-button.vis-up{background-image:url("img/network/upArrow.png");bottom:50px;left:55px}div.vis-network div.vis-navigation div.vis-button.vis-down{background-image:url("img/network/downArrow.png");bottom:10px;left:55px}div.vis-network div.vis-navigation div.vis-button.vis-left{background-image:url("img/network/leftArrow.png");bottom:10px;left:15px}div.vis-network div.vis-navigation div.vis-button.vis-right{background-image:url("img/network/rightArrow.png");bottom:10px;left:95px}div.vis-network div.vis-navigation div.vis-button.vis-zoomIn{background-image:url("img/network/plus.png");bottom:10px;right:15px}div.vis-network div.vis-navigation div.vis-button.vis-zoomOut{background-image:url("img/network/minus.png");bottom:10px;right:55px}div.vis-network div.vis-navigation div.vis-button.vis-zoomExtends{background-image:url("img/network/zoomExtends.png");bottom:50px;right:15px}.vis .overlay{position:absolute;top:0;left:0;width:100%;height:100%;z-index:10}.vis-active{box-shadow:0 0 10px #86d5f8}.vis [class*="span"]{min-height:0;width:auto}div.vis-configuration{position:relative;display:block;float:left;font-size:12px}div.vis-configuration-wrapper{display:block;width:700px}div.vis-configuration-wrapper::after{clear:both;content:"";display:block}div.vis-configuration.vis-config-option-container{display:block;width:495px;background-color:#fff;border:2px solid #f7f8fa;border-radius:4px;margin-top:20px;left:10px;padding-left:5px}div.vis-configuration.vis-config-button{display:block;width:495px;height:25px;vertical-align:middle;line-height:25px;background-color:#f7f8fa;border:2px solid #ceced0;border-radius:4px;margin-top:20px;left:10px;padding-left:5px;cursor:pointer;margin-bottom:30px}div.vis-configuration.vis-config-button.hover{background-color:#4588e6;border:2px solid #214373;color:#fff}div.vis-configuration.vis-config-item{display:block;float:left;width:495px;height:25px;vertical-align:middle;line-height:25px}div.vis-configuration.vis-config-item.vis-config-s2{left:10px;background-color:#f7f8fa;padding-left:5px;border-radius:3px}div.vis-configuration.vis-config-item.vis-config-s3{left:20px;background-color:#e4e9f0;padding-left:5px;border-radius:3px}div.vis-configuration.vis-config-item.vis-config-s4{left:30px;background-color:#cfd8e6;padding-left:5px;border-radius:3px}div.vis-configuration.vis-config-header{font-size:18px;font-weight:bold}div.vis-configuration.vis-config-label{width:120px;height:25px;line-height:25px}div.vis-configuration.vis-config-label.vis-config-s3{width:110px}div.vis-configuration.vis-config-label.vis-config-s4{width:100px}div.vis-configuration.vis-config-colorBlock{top:1px;width:30px;height:19px;border:1px solid #444;border-radius:2px;padding:0;margin:0;cursor:pointer}input.vis-configuration.vis-config-checkbox{left:-5px}input.vis-configuration.vis-config-rangeinput{position:relative;top:-5px;width:60px;padding:1px;margin:0;pointer-events:none}input.vis-configuration.vis-config-range{-webkit-appearance:none;border:0 solid white;background-color:rgba(0,0,0,0);width:300px;height:20px}input.vis-configuration.vis-config-range::-webkit-slider-runnable-track{width:300px;height:5px;background:#dedede;background:-moz-linear-gradient(top,#dedede 0,#c8c8c8 99%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0,#dedede),color-stop(99%,#c8c8c8));background:-webkit-linear-gradient(top,#dedede 0,#c8c8c8 99%);background:-o-linear-gradient(top,#dedede 0,#c8c8c8 99%);background:-ms-linear-gradient(top,#dedede 0,#c8c8c8 99%);background:linear-gradient(to bottom,#dedede 0,#c8c8c8 99%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#dedede',endColorstr='#c8c8c8',GradientType=0);border:1px solid #999;box-shadow:#aaa 0 0 3px 0;border-radius:3px}input.vis-configuration.vis-config-range::-webkit-slider-thumb{-webkit-appearance:none;border:1px solid #14334b;height:17px;width:17px;border-radius:50%;background:#3876c2;background:-moz-linear-gradient(top,#3876c2 0,#385380 100%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0,#3876c2),color-stop(100%,#385380));background:-webkit-linear-gradient(top,#3876c2 0,#385380 100%);background:-o-linear-gradient(top,#3876c2 0,#385380 100%);background:-ms-linear-gradient(top,#3876c2 0,#385380 100%);background:linear-gradient(to bottom,#3876c2 0,#385380 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#3876c2',endColorstr='#385380',GradientType=0);box-shadow:#111927 0 0 1px 0;margin-top:-7px}input.vis-configuration.vis-config-range:focus{outline:0}input.vis-configuration.vis-config-range:focus::-webkit-slider-runnable-track{background:#9d9d9d;background:-moz-linear-gradient(top,#9d9d9d 0,#c8c8c8 99%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0,#9d9d9d),color-stop(99%,#c8c8c8));background:-webkit-linear-gradient(top,#9d9d9d 0,#c8c8c8 99%);background:-o-linear-gradient(top,#9d9d9d 0,#c8c8c8 99%);background:-ms-linear-gradient(top,#9d9d9d 0,#c8c8c8 99%);background:linear-gradient(to bottom,#9d9d9d 0,#c8c8c8 99%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#9d9d9d',endColorstr='#c8c8c8',GradientType=0)}input.vis-configuration.vis-config-range::-moz-range-track{width:300px;height:10px;background:#dedede;background:-moz-linear-gradient(top,#dedede 0,#c8c8c8 99%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0,#dedede),color-stop(99%,#c8c8c8));background:-webkit-linear-gradient(top,#dedede 0,#c8c8c8 99%);background:-o-linear-gradient(top,#dedede 0,#c8c8c8 99%);background:-ms-linear-gradient(top,#dedede 0,#c8c8c8 99%);background:linear-gradient(to bottom,#dedede 0,#c8c8c8 99%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#dedede',endColorstr='#c8c8c8',GradientType=0);border:1px solid #999;box-shadow:#aaa 0 0 3px 0;border-radius:3px}input.vis-configuration.vis-config-range::-moz-range-thumb{border:0;height:16px;width:16px;border-radius:50%;background:#385380}input.vis-configuration.vis-config-range:-moz-focusring{outline:1px solid white;outline-offset:-1px}input.vis-configuration.vis-config-range::-ms-track{width:300px;height:5px;background:transparent;border-color:transparent;border-width:6px 0;color:transparent}input.vis-configuration.vis-config-range::-ms-fill-lower{background:#777;border-radius:10px}input.vis-configuration.vis-config-range::-ms-fill-upper{background:#ddd;border-radius:10px}input.vis-configuration.vis-config-range::-ms-thumb{border:0;height:16px;width:16px;border-radius:50%;background:#385380}input.vis-configuration.vis-config-range:focus::-ms-fill-lower{background:#888}input.vis-configuration.vis-config-range:focus::-ms-fill-upper{background:#ccc}.vis-configuration-popup{position:absolute;background:rgba(57,76,89,0.85);border:2px solid #f2faff;line-height:30px;height:30px;width:150px;text-align:center;color:#fff;font-size:14px;border-radius:4px;-webkit-transition:opacity .3s ease-in-out;-moz-transition:opacity .3s ease-in-out;transition:opacity .3s ease-in-out}.vis-configuration-popup:after,.vis-configuration-popup:before{left:100%;top:50%;border:solid transparent;content:" ";height:0;width:0;position:absolute;pointer-events:none}.vis-configuration-popup:after{border-color:rgba(136,183,213,0);border-left-color:rgba(57,76,89,0.85);border-width:8px;margin-top:-8px}.vis-configuration-popup:before{border-color:rgba(194,225,245,0);border-left-color:#f2faff;border-width:12px;margin-top:-12px}div.vis-tooltip{position:absolute;visibility:hidden;padding:5px;white-space:nowrap;font-family:verdana;font-size:14px;color:#000;background-color:#f5f4ed;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;border:1px solid #808074;box-shadow:3px 3px 10px rgba(0,0,0,0.2);pointer-events:none;z-index:5} +.vis .overlay{position:absolute;top:0;left:0;width:100%;height:100%;z-index:10}.vis-active{box-shadow:0 0 10px #86d5f8}div.vis-configuration{position:relative;display:block;float:left;font-size:12px}div.vis-configuration-wrapper{display:block;width:700px}div.vis-configuration-wrapper::after{clear:both;content:"";display:block}div.vis-configuration.vis-config-option-container{display:block;width:495px;background-color:#fff;border:2px solid #f7f8fa;border-radius:4px;margin-top:20px;left:10px;padding-left:5px}div.vis-configuration.vis-config-button{display:block;width:495px;height:25px;vertical-align:middle;line-height:25px;background-color:#f7f8fa;border:2px solid #ceced0;border-radius:4px;margin-top:20px;left:10px;padding-left:5px;cursor:pointer;margin-bottom:30px}div.vis-configuration.vis-config-button.hover{background-color:#4588e6;border:2px solid #214373;color:#fff}div.vis-configuration.vis-config-item{display:block;float:left;width:495px;height:25px;vertical-align:middle;line-height:25px}div.vis-configuration.vis-config-item.vis-config-s2{left:10px;background-color:#f7f8fa;padding-left:5px;border-radius:3px}div.vis-configuration.vis-config-item.vis-config-s3{left:20px;background-color:#e4e9f0;padding-left:5px;border-radius:3px}div.vis-configuration.vis-config-item.vis-config-s4{left:30px;background-color:#cfd8e6;padding-left:5px;border-radius:3px}div.vis-configuration.vis-config-header{font-size:18px;font-weight:700}div.vis-configuration.vis-config-label{width:120px;height:25px;line-height:25px}div.vis-configuration.vis-config-label.vis-config-s3{width:110px}div.vis-configuration.vis-config-label.vis-config-s4{width:100px}div.vis-configuration.vis-config-colorBlock{top:1px;width:30px;height:19px;border:1px solid #444;border-radius:2px;padding:0;margin:0;cursor:pointer}input.vis-configuration.vis-config-checkbox{left:-5px}input.vis-configuration.vis-config-rangeinput{position:relative;top:-5px;width:60px;padding:1px;margin:0;pointer-events:none}input.vis-configuration.vis-config-range{-webkit-appearance:none;border:0 solid #fff;background-color:rgba(0,0,0,0);width:300px;height:20px}input.vis-configuration.vis-config-range::-webkit-slider-runnable-track{width:300px;height:5px;background:#dedede;background:-moz-linear-gradient(top,#dedede 0,#c8c8c8 99%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0,#dedede),color-stop(99%,#c8c8c8));background:-webkit-linear-gradient(top,#dedede 0,#c8c8c8 99%);background:-o-linear-gradient(top,#dedede 0,#c8c8c8 99%);background:-ms-linear-gradient(top,#dedede 0,#c8c8c8 99%);background:linear-gradient(to bottom,#dedede 0,#c8c8c8 99%);border:1px solid #999;box-shadow:#aaa 0 0 3px 0;border-radius:3px}input.vis-configuration.vis-config-range::-webkit-slider-thumb{-webkit-appearance:none;border:1px solid #14334b;height:17px;width:17px;border-radius:50%;background:#3876c2;background:-moz-linear-gradient(top,#3876c2 0,#385380 100%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0,#3876c2),color-stop(100%,#385380));background:-webkit-linear-gradient(top,#3876c2 0,#385380 100%);background:-o-linear-gradient(top,#3876c2 0,#385380 100%);background:-ms-linear-gradient(top,#3876c2 0,#385380 100%);background:linear-gradient(to bottom,#3876c2 0,#385380 100%);box-shadow:#111927 0 0 1px 0;margin-top:-7px}input.vis-configuration.vis-config-range:focus{outline:0}input.vis-configuration.vis-config-range:focus::-webkit-slider-runnable-track{background:#9d9d9d;background:-moz-linear-gradient(top,#9d9d9d 0,#c8c8c8 99%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0,#9d9d9d),color-stop(99%,#c8c8c8));background:-webkit-linear-gradient(top,#9d9d9d 0,#c8c8c8 99%);background:-o-linear-gradient(top,#9d9d9d 0,#c8c8c8 99%);background:-ms-linear-gradient(top,#9d9d9d 0,#c8c8c8 99%);background:linear-gradient(to bottom,#9d9d9d 0,#c8c8c8 99%)}input.vis-configuration.vis-config-range::-moz-range-track{width:300px;height:10px;background:#dedede;background:-moz-linear-gradient(top,#dedede 0,#c8c8c8 99%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0,#dedede),color-stop(99%,#c8c8c8));background:-webkit-linear-gradient(top,#dedede 0,#c8c8c8 99%);background:-o-linear-gradient(top,#dedede 0,#c8c8c8 99%);background:-ms-linear-gradient(top,#dedede 0,#c8c8c8 99%);background:linear-gradient(to bottom,#dedede 0,#c8c8c8 99%);border:1px solid #999;box-shadow:#aaa 0 0 3px 0;border-radius:3px}input.vis-configuration.vis-config-range::-moz-range-thumb{border:none;height:16px;width:16px;border-radius:50%;background:#385380}input.vis-configuration.vis-config-range:-moz-focusring{outline:1px solid #fff;outline-offset:-1px}input.vis-configuration.vis-config-range::-ms-track{width:300px;height:5px;background:0 0;border-color:transparent;border-width:6px 0;color:transparent}input.vis-configuration.vis-config-range::-ms-fill-lower{background:#777;border-radius:10px}input.vis-configuration.vis-config-range::-ms-fill-upper{background:#ddd;border-radius:10px}input.vis-configuration.vis-config-range::-ms-thumb{border:none;height:16px;width:16px;border-radius:50%;background:#385380}input.vis-configuration.vis-config-range:focus::-ms-fill-lower{background:#888}input.vis-configuration.vis-config-range:focus::-ms-fill-upper{background:#ccc}.vis-configuration-popup{position:absolute;background:rgba(57,76,89,.85);border:2px solid #f2faff;line-height:30px;height:30px;width:150px;text-align:center;color:#fff;font-size:14px;border-radius:4px;-webkit-transition:opacity .3s ease-in-out;-moz-transition:opacity .3s ease-in-out;transition:opacity .3s ease-in-out}.vis-configuration-popup:after,.vis-configuration-popup:before{left:100%;top:50%;border:solid transparent;content:" ";height:0;width:0;position:absolute;pointer-events:none}.vis-configuration-popup:after{border-color:rgba(136,183,213,0);border-left-color:rgba(57,76,89,.85);border-width:8px;margin-top:-8px}.vis-configuration-popup:before{border-color:rgba(194,225,245,0);border-left-color:#f2faff;border-width:12px;margin-top:-12px}div.vis-network div.vis-manipulation{box-sizing:content-box;border-width:0;border-bottom:1px;border-style:solid;border-color:#d6d9d8;background:#fff;background:-moz-linear-gradient(top,#fff 0,#fcfcfc 48%,#fafafa 50%,#fcfcfc 100%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0,#fff),color-stop(48%,#fcfcfc),color-stop(50%,#fafafa),color-stop(100%,#fcfcfc));background:-webkit-linear-gradient(top,#fff 0,#fcfcfc 48%,#fafafa 50%,#fcfcfc 100%);background:-o-linear-gradient(top,#fff 0,#fcfcfc 48%,#fafafa 50%,#fcfcfc 100%);background:-ms-linear-gradient(top,#fff 0,#fcfcfc 48%,#fafafa 50%,#fcfcfc 100%);background:linear-gradient(to bottom,#fff 0,#fcfcfc 48%,#fafafa 50%,#fcfcfc 100%);padding-top:4px;position:absolute;left:0;top:0;width:100%;height:28px}div.vis-network div.vis-edit-mode{position:absolute;left:0;top:5px;height:30px}div.vis-network div.vis-close{position:absolute;right:0;top:0;width:30px;height:30px;background-position:20px 3px;background-repeat:no-repeat;background-image:url(img/network/cross.png);cursor:pointer;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}div.vis-network div.vis-close:hover{opacity:.6}div.vis-network div.vis-edit-mode div.vis-button,div.vis-network div.vis-manipulation div.vis-button{float:left;font-family:verdana;font-size:12px;-moz-border-radius:15px;border-radius:15px;display:inline-block;background-position:0 0;background-repeat:no-repeat;height:24px;margin-left:10px;cursor:pointer;padding:0 8px 0 8px;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}div.vis-network div.vis-manipulation div.vis-button:hover{box-shadow:1px 1px 8px rgba(0,0,0,.2)}div.vis-network div.vis-manipulation div.vis-button:active{box-shadow:1px 1px 8px rgba(0,0,0,.5)}div.vis-network div.vis-manipulation div.vis-button.vis-back{background-image:url(img/network/backIcon.png)}div.vis-network div.vis-manipulation div.vis-button.vis-none:hover{box-shadow:1px 1px 8px transparent;cursor:default}div.vis-network div.vis-manipulation div.vis-button.vis-none:active{box-shadow:1px 1px 8px transparent}div.vis-network div.vis-manipulation div.vis-button.vis-none{padding:0}div.vis-network div.vis-manipulation div.notification{margin:2px;font-weight:700}div.vis-network div.vis-manipulation div.vis-button.vis-add{background-image:url(img/network/addNodeIcon.png)}div.vis-network div.vis-edit-mode div.vis-button.vis-edit,div.vis-network div.vis-manipulation div.vis-button.vis-edit{background-image:url(img/network/editIcon.png)}div.vis-network div.vis-edit-mode div.vis-button.vis-edit.vis-edit-mode{background-color:#fcfcfc;border:1px solid #ccc}div.vis-network div.vis-manipulation div.vis-button.vis-connect{background-image:url(img/network/connectIcon.png)}div.vis-network div.vis-manipulation div.vis-button.vis-delete{background-image:url(img/network/deleteIcon.png)}div.vis-network div.vis-edit-mode div.vis-label,div.vis-network div.vis-manipulation div.vis-label{margin:0 0 0 23px;line-height:25px}div.vis-network div.vis-manipulation div.vis-separator-line{float:left;display:inline-block;width:1px;height:21px;background-color:#bdbdbd;margin:0 7px 0 15px}div.vis-color-picker{position:absolute;top:0;left:30px;margin-top:-140px;margin-left:30px;width:310px;height:444px;z-index:1;padding:10px;border-radius:15px;background-color:#fff;display:none;box-shadow:rgba(0,0,0,.5) 0 0 10px 0}div.vis-color-picker div.vis-arrow{position:absolute;top:147px;left:5px}div.vis-color-picker div.vis-arrow::after,div.vis-color-picker div.vis-arrow::before{right:100%;top:50%;border:solid transparent;content:" ";height:0;width:0;position:absolute;pointer-events:none}div.vis-color-picker div.vis-arrow:after{border-color:rgba(255,255,255,0);border-right-color:#fff;border-width:30px;margin-top:-30px}div.vis-color-picker div.vis-color{position:absolute;width:289px;height:289px;cursor:pointer}div.vis-color-picker div.vis-brightness{position:absolute;top:313px}div.vis-color-picker div.vis-opacity{position:absolute;top:350px}div.vis-color-picker div.vis-selector{position:absolute;top:137px;left:137px;width:15px;height:15px;border-radius:15px;border:1px solid #fff;background:#4c4c4c;background:-moz-linear-gradient(top,#4c4c4c 0,#595959 12%,#666 25%,#474747 39%,#2c2c2c 50%,#000 51%,#111 60%,#2b2b2b 76%,#1c1c1c 91%,#131313 100%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0,#4c4c4c),color-stop(12%,#595959),color-stop(25%,#666),color-stop(39%,#474747),color-stop(50%,#2c2c2c),color-stop(51%,#000),color-stop(60%,#111),color-stop(76%,#2b2b2b),color-stop(91%,#1c1c1c),color-stop(100%,#131313));background:-webkit-linear-gradient(top,#4c4c4c 0,#595959 12%,#666 25%,#474747 39%,#2c2c2c 50%,#000 51%,#111 60%,#2b2b2b 76%,#1c1c1c 91%,#131313 100%);background:-o-linear-gradient(top,#4c4c4c 0,#595959 12%,#666 25%,#474747 39%,#2c2c2c 50%,#000 51%,#111 60%,#2b2b2b 76%,#1c1c1c 91%,#131313 100%);background:-ms-linear-gradient(top,#4c4c4c 0,#595959 12%,#666 25%,#474747 39%,#2c2c2c 50%,#000 51%,#111 60%,#2b2b2b 76%,#1c1c1c 91%,#131313 100%);background:linear-gradient(to bottom,#4c4c4c 0,#595959 12%,#666 25%,#474747 39%,#2c2c2c 50%,#000 51%,#111 60%,#2b2b2b 76%,#1c1c1c 91%,#131313 100%)}div.vis-color-picker div.vis-new-color{position:absolute;width:140px;height:20px;border:1px solid rgba(0,0,0,.1);border-radius:5px;top:380px;left:159px;text-align:right;padding-right:2px;font-size:10px;color:rgba(0,0,0,.4);vertical-align:middle;line-height:20px}div.vis-color-picker div.vis-initial-color{position:absolute;width:140px;height:20px;border:1px solid rgba(0,0,0,.1);border-radius:5px;top:380px;left:10px;text-align:left;padding-left:2px;font-size:10px;color:rgba(0,0,0,.4);vertical-align:middle;line-height:20px}div.vis-color-picker div.vis-label{position:absolute;width:300px;left:10px}div.vis-color-picker div.vis-label.vis-brightness{top:300px}div.vis-color-picker div.vis-label.vis-opacity{top:338px}div.vis-color-picker div.vis-button{position:absolute;width:68px;height:25px;border-radius:10px;vertical-align:middle;text-align:center;line-height:25px;top:410px;border:2px solid #d9d9d9;background-color:#f7f7f7;cursor:pointer}div.vis-color-picker div.vis-button.vis-cancel{left:5px}div.vis-color-picker div.vis-button.vis-load{left:82px}div.vis-color-picker div.vis-button.vis-apply{left:159px}div.vis-color-picker div.vis-button.vis-save{left:236px}div.vis-color-picker input.vis-range{width:290px;height:20px}div.vis-tooltip{position:absolute;visibility:hidden;padding:5px;white-space:nowrap;font-family:verdana;font-size:14px;color:#000;background-color:#f5f4ed;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;border:1px solid #808074;box-shadow:3px 3px 10px rgba(0,0,0,.2);pointer-events:none;z-index:5}div.vis-network div.vis-navigation div.vis-button{width:34px;height:34px;-moz-border-radius:17px;border-radius:17px;position:absolute;display:inline-block;background-position:2px 2px;background-repeat:no-repeat;cursor:pointer;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}div.vis-network div.vis-navigation div.vis-button:hover{box-shadow:0 0 3px 3px rgba(56,207,21,.3)}div.vis-network div.vis-navigation div.vis-button:active{box-shadow:0 0 1px 3px rgba(56,207,21,.95)}div.vis-network div.vis-navigation div.vis-button.vis-up{background-image:url(img/network/upArrow.png);bottom:50px;left:55px}div.vis-network div.vis-navigation div.vis-button.vis-down{background-image:url(img/network/downArrow.png);bottom:10px;left:55px}div.vis-network div.vis-navigation div.vis-button.vis-left{background-image:url(img/network/leftArrow.png);bottom:10px;left:15px}div.vis-network div.vis-navigation div.vis-button.vis-right{background-image:url(img/network/rightArrow.png);bottom:10px;left:95px}div.vis-network div.vis-navigation div.vis-button.vis-zoomIn{background-image:url(img/network/plus.png);bottom:10px;right:15px}div.vis-network div.vis-navigation div.vis-button.vis-zoomOut{background-image:url(img/network/minus.png);bottom:10px;right:55px}div.vis-network div.vis-navigation div.vis-button.vis-zoomExtends{background-image:url(img/network/zoomExtends.png);bottom:50px;right:15px} \ No newline at end of file diff --git a/node_modules/vis-network/dist/vis-network.min.js b/node_modules/vis-network/dist/vis-network.min.js index cab6b4421542df5bd7ffd49c1ef708c7b1d01cb3..9c056b6456a0fa49700494d9eae41998e59d1c80 100644 --- a/node_modules/vis-network/dist/vis-network.min.js +++ b/node_modules/vis-network/dist/vis-network.min.js @@ -1,26 +1,26 @@ -/** - * vis - network +/** + * vis-network - network * http://visjs.org/ - * + * * A dynamic, browser-based visualization library. - * - * @version 5.0.0 - * @date 2019-07-16T20:12:25Z - * + * + * @version 5.2.4 + * @date 2019-08-18T08:11:56Z + * * @copyright (c) 2011-2017 Almende B.V, http://almende.com * @copyright (c) 2018-2019 visjs contributors, https://github.com/visjs - * + * * @license * vis.js is dual licensed under both - * + * * 1. The Apache 2.0 License * http://www.apache.org/licenses/LICENSE-2.0 - * + * * and - * + * * 2. The MIT License * http://opensource.org/licenses/MIT - * + * * vis.js may be distributed under either license. - */ -!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e=e||self).vis={})}(this,function(e){"use strict";"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;function en(){throw new Error("Dynamic requires are not currently supported by rollup-plugin-commonjs")}function t(e,t){return e(t={exports:{}},t.exports),t.exports}function l(e){return(l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function n(t,e){var i=Object.keys(t);return Object.getOwnPropertySymbols&&i.push.apply(i,Object.getOwnPropertySymbols(t)),e&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),i}function i(e){return function(e){if(Array.isArray(e)){for(var t=0,i=new Array(e.length);t>>0,n=0;nMe(e)?(s=e+1,d-Me(e)):(s=e,d),{year:s,dayOfYear:r}}function Ge(e,t,i){var n,o,s=Ve(e.year(),t,i),r=Math.floor((e.dayOfYear()-s-1)/7)+1;return r<1?(o=e.year()-1,n=r+qe(o,t,i)):r>qe(e.year(),t,i)?(n=r-qe(e.year(),t,i),o=e.year()+1):(o=e.year(),n=r),{week:n,year:o}}function qe(e,t,i){var n=Ve(e,t,i),o=Ve(e+1,t,i);return(Me(e)-n+o)/7}W("w",["ww",2],"wo","week"),W("W",["WW",2],"Wo","isoWeek"),F("week","w"),F("isoWeek","W"),R("week",5),R("isoWeek",5),le("w",Q),le("ww",Q,Z),le("W",Q),le("WW",Q,Z),ve(["w","ww","W","WW"],function(e,t,i,n){t[n.substr(0,1)]=k(e)});function Ze(e,t){return e.slice(t,7).concat(e.slice(0,t))}W("d",0,"do","day"),W("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),W("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),W("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),W("e",0,0,"weekday"),W("E",0,0,"isoWeekday"),F("day","d"),F("weekday","e"),F("isoWeekday","E"),R("day",11),R("weekday",11),R("isoWeekday",11),le("d",Q),le("e",Q),le("E",Q),le("dd",function(e,t){return t.weekdaysMinRegex(e)}),le("ddd",function(e,t){return t.weekdaysShortRegex(e)}),le("dddd",function(e,t){return t.weekdaysRegex(e)}),ve(["dd","ddd","dddd"],function(e,t,i,n){var o=i._locale.weekdaysParse(e,n,i._strict);null!=o?t.d=o:p(i).invalidWeekday=e}),ve(["d","e","E"],function(e,t,i,n){t[n]=k(e)});var Xe="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_");var $e="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_");var Ke="Su_Mo_Tu_We_Th_Fr_Sa".split("_");function Qe(e,t,i){var n,o,s,r=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],n=0;n<7;++n)s=f([2e3,1]).day(n),this._minWeekdaysParse[n]=this.weekdaysMin(s,"").toLocaleLowerCase(),this._shortWeekdaysParse[n]=this.weekdaysShort(s,"").toLocaleLowerCase(),this._weekdaysParse[n]=this.weekdays(s,"").toLocaleLowerCase();return i?"dddd"===t?-1!==(o=Ee.call(this._weekdaysParse,r))?o:null:"ddd"===t?-1!==(o=Ee.call(this._shortWeekdaysParse,r))?o:null:-1!==(o=Ee.call(this._minWeekdaysParse,r))?o:null:"dddd"===t?-1!==(o=Ee.call(this._weekdaysParse,r))?o:-1!==(o=Ee.call(this._shortWeekdaysParse,r))?o:-1!==(o=Ee.call(this._minWeekdaysParse,r))?o:null:"ddd"===t?-1!==(o=Ee.call(this._shortWeekdaysParse,r))?o:-1!==(o=Ee.call(this._weekdaysParse,r))?o:-1!==(o=Ee.call(this._minWeekdaysParse,r))?o:null:-1!==(o=Ee.call(this._minWeekdaysParse,r))?o:-1!==(o=Ee.call(this._weekdaysParse,r))?o:-1!==(o=Ee.call(this._shortWeekdaysParse,r))?o:null}var Je=he;var et=he;var tt=he;function it(){function e(e,t){return t.length-e.length}var t,i,n,o,s,r=[],a=[],h=[],d=[];for(t=0;t<7;t++)i=f([2e3,1]).day(t),n=this.weekdaysMin(i,""),o=this.weekdaysShort(i,""),s=this.weekdays(i,""),r.push(n),a.push(o),h.push(s),d.push(n),d.push(o),d.push(s);for(r.sort(e),a.sort(e),h.sort(e),d.sort(e),t=0;t<7;t++)a[t]=ce(a[t]),h[t]=ce(h[t]),d[t]=ce(d[t]);this._weekdaysRegex=new RegExp("^("+d.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+h.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+r.join("|")+")","i")}function nt(){return this.hours()%12||12}function ot(e,t){W(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function st(e,t){return t._meridiemParse}W("H",["HH",2],0,"hour"),W("h",["hh",2],0,nt),W("k",["kk",2],0,function(){return this.hours()||24}),W("hmm",0,0,function(){return""+nt.apply(this)+B(this.minutes(),2)}),W("hmmss",0,0,function(){return""+nt.apply(this)+B(this.minutes(),2)+B(this.seconds(),2)}),W("Hmm",0,0,function(){return""+this.hours()+B(this.minutes(),2)}),W("Hmmss",0,0,function(){return""+this.hours()+B(this.minutes(),2)+B(this.seconds(),2)}),ot("a",!0),ot("A",!1),F("hour","h"),R("hour",13),le("a",st),le("A",st),le("H",Q),le("h",Q),le("k",Q),le("HH",Q,Z),le("hh",Q,Z),le("kk",Q,Z),le("hmm",J),le("hmmss",ee),le("Hmm",J),le("Hmmss",ee),pe(["H","HH"],_e),pe(["k","kk"],function(e,t,i){var n=k(e);t[_e]=24===n?0:n}),pe(["a","A"],function(e,t,i){i._isPm=i._locale.isPM(e),i._meridiem=e}),pe(["h","hh"],function(e,t,i){t[_e]=k(e),p(i).bigHour=!0}),pe("hmm",function(e,t,i){var n=e.length-2;t[_e]=k(e.substr(0,n)),t[we]=k(e.substr(n)),p(i).bigHour=!0}),pe("hmmss",function(e,t,i){var n=e.length-4,o=e.length-2;t[_e]=k(e.substr(0,n)),t[we]=k(e.substr(n,2)),t[ke]=k(e.substr(o)),p(i).bigHour=!0}),pe("Hmm",function(e,t,i){var n=e.length-2;t[_e]=k(e.substr(0,n)),t[we]=k(e.substr(n))}),pe("Hmmss",function(e,t,i){var n=e.length-4,o=e.length-2;t[_e]=k(e.substr(0,n)),t[we]=k(e.substr(n,2)),t[ke]=k(e.substr(o))});var rt,at=Ce("Hours",!0),ht={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:Ye,monthsShort:Re,week:{dow:0,doy:6},weekdays:Xe,weekdaysMin:Ke,weekdaysShort:$e,meridiemParse:/[ap]\.?m?\.?/i},dt={},lt={};function ut(e){return e?e.toLowerCase().replace("_","-"):e}function ct(e){var t=null;if(!dt[e]&&Ji&&Ji.exports)try{t=rt._abbr;var i=tn;i("./locale/"+e),ft(t)}catch(e){}return dt[e]}function ft(e,t){var i;return e&&((i=s(t)?vt(e):pt(e,t))?rt=i:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),rt._abbr}function pt(e,t){if(null===t)return delete dt[e],null;var i,n=ht;if(t.abbr=e,null!=dt[e])O("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),n=dt[e]._config;else if(null!=t.parentLocale)if(null!=dt[t.parentLocale])n=dt[t.parentLocale]._config;else{if(null==(i=ct(t.parentLocale)))return lt[t.parentLocale]||(lt[t.parentLocale]=[]),lt[t.parentLocale].push({name:e,config:t}),null;n=i._config}return dt[e]=new C(T(n,t)),lt[e]&<[e].forEach(function(e){pt(e.name,e.config)}),ft(e),dt[e]}function vt(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return rt;if(!r(e)){if(t=ct(e))return t;e=[e]}return function(e){var t,i,n,o,s=0;for(;s=t&&x(o,i,!0)>=t-1)break;t--}s++}return rt}(e)}function gt(e){var t,i=e._a;return i&&-2===p(e).overflow&&(t=i[ye]<0||11Ne(i[me],i[ye])?be:i[_e]<0||24qe(i,s,r)?p(e)._overflowWeeks=!0:null!=h?p(e)._overflowWeekday=!0:(a=Ue(i,n,o,s,r),e._a[me]=a.year,e._dayOfYear=a.dayOfYear)}(e),null!=e._dayOfYear&&(s=mt(e._a[me],n[me]),(e._dayOfYear>Me(s)||0===e._dayOfYear)&&(p(e)._overflowDayOfYear=!0),i=We(s,0,e._dayOfYear),e._a[ye]=i.getUTCMonth(),e._a[be]=i.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=r[t]=n[t];for(;t<7;t++)e._a[t]=r[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[_e]&&0===e._a[we]&&0===e._a[ke]&&0===e._a[xe]&&(e._nextDay=!0,e._a[_e]=0),e._d=(e._useUTC?We:function(e,t,i,n,o,s,r){var a;e<100&&0<=e?(a=new Date(e+400,t,i,n,o,s,r),isFinite(a.getFullYear())&&a.setFullYear(e)):a=new Date(e,t,i,n,o,s,r);return a}).apply(null,r),o=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[_e]=24),e._w&&void 0!==e._w.d&&e._w.d!==o&&(p(e).weekdayMismatch=!0)}}var bt=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,_t=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,wt=/Z|[+-]\d\d(?::?\d\d)?/,kt=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],xt=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],St=/^\/?Date\((\-?\d+)/i;function Dt(e){var t,i,n,o,s,r,a=e._i,h=bt.exec(a)||_t.exec(a);if(h){for(p(e).iso=!0,t=0,i=kt.length;ti.valueOf():i.valueOf()this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},yi.isLocal=function(){return!!this.isValid()&&!this._isUTC},yi.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},yi.isUtc=Gt,yi.isUTC=Gt,yi.zoneAbbr=function(){return this._isUTC?"UTC":""},yi.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},yi.dates=e("dates accessor is deprecated. Use date instead.",ci),yi.months=e("months accessor is deprecated. Use month instead",Ae),yi.years=e("years accessor is deprecated. Use year instead",Te),yi.zone=e("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",function(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}),yi.isDSTShifted=e("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",function(){if(!s(this._isDSTShifted))return this._isDSTShifted;var e={};if(y(e,this),(e=Pt(e))._a){var t=e._isUTC?f(e._a):Nt(e._a);this._isDSTShifted=this.isValid()&&0>>((3&t)<<3)&255;return i}}(),d=[],u=0;u<256;u++)d[u]=(u+256).toString(16).substr(1);var c=h();c[0],c[1],c[2],c[3],c[4],c[5],c[6],c[7];var f=/^\/?Date\((-?\d+)/i,p=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,v=/^#?([a-f\d])([a-f\d])([a-f\d])$/i;function g(e){return e instanceof Number||"number"==typeof e}function m(e){return e instanceof String||"string"==typeof e}function y(e){return"object"===l(e)&&null!==e}function b(e){return s.isMoment(e)}function _(e,t,i,n){var o=!1;!0===n&&(o=null===t[i]&&void 0!==e[i]),o?delete e[i]:e[i]=t[i]}var w=Object.assign;function k(e,t){var i=2>>((3&t)<<3)&255;return i}}(),J=[],ee=0;ee<256;ee++)J[ee]=(ee+256).toString(16).substr(1);var te=Q();te[0],te[1],te[2],te[3],te[4],te[5],te[6],te[7];function ie(e,t,i){var n=0>>0,n=0;nMe(e)?(s=e+1,d-Me(e)):(s=e,d),{year:s,dayOfYear:r}}function Ge(e,t,i){var n,o,s=Ve(e.year(),t,i),r=Math.floor((e.dayOfYear()-s-1)/7)+1;return r<1?(o=e.year()-1,n=r+qe(o,t,i)):r>qe(e.year(),t,i)?(n=r-qe(e.year(),t,i),o=e.year()+1):(o=e.year(),n=r),{week:n,year:o}}function qe(e,t,i){var n=Ve(e,t,i),o=Ve(e+1,t,i);return(Me(e)-n+o)/7}W("w",["ww",2],"wo","week"),W("W",["WW",2],"Wo","isoWeek"),F("week","w"),F("isoWeek","W"),R("week",5),R("isoWeek",5),le("w",Q),le("ww",Q,Z),le("W",Q),le("WW",Q,Z),ve(["w","ww","W","WW"],function(e,t,i,n){t[n.substr(0,1)]=k(e)});function Ze(e,t){return e.slice(t,7).concat(e.slice(0,t))}W("d",0,"do","day"),W("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),W("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),W("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),W("e",0,0,"weekday"),W("E",0,0,"isoWeekday"),F("day","d"),F("weekday","e"),F("isoWeekday","E"),R("day",11),R("weekday",11),R("isoWeekday",11),le("d",Q),le("e",Q),le("E",Q),le("dd",function(e,t){return t.weekdaysMinRegex(e)}),le("ddd",function(e,t){return t.weekdaysShortRegex(e)}),le("dddd",function(e,t){return t.weekdaysRegex(e)}),ve(["dd","ddd","dddd"],function(e,t,i,n){var o=i._locale.weekdaysParse(e,n,i._strict);null!=o?t.d=o:p(i).invalidWeekday=e}),ve(["d","e","E"],function(e,t,i,n){t[n]=k(e)});var Xe="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_");var $e="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_");var Ke="Su_Mo_Tu_We_Th_Fr_Sa".split("_");function Qe(e,t,i){var n,o,s,r=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],n=0;n<7;++n)s=f([2e3,1]).day(n),this._minWeekdaysParse[n]=this.weekdaysMin(s,"").toLocaleLowerCase(),this._shortWeekdaysParse[n]=this.weekdaysShort(s,"").toLocaleLowerCase(),this._weekdaysParse[n]=this.weekdays(s,"").toLocaleLowerCase();return i?"dddd"===t?-1!==(o=Ee.call(this._weekdaysParse,r))?o:null:"ddd"===t?-1!==(o=Ee.call(this._shortWeekdaysParse,r))?o:null:-1!==(o=Ee.call(this._minWeekdaysParse,r))?o:null:"dddd"===t?-1!==(o=Ee.call(this._weekdaysParse,r))?o:-1!==(o=Ee.call(this._shortWeekdaysParse,r))?o:-1!==(o=Ee.call(this._minWeekdaysParse,r))?o:null:"ddd"===t?-1!==(o=Ee.call(this._shortWeekdaysParse,r))?o:-1!==(o=Ee.call(this._weekdaysParse,r))?o:-1!==(o=Ee.call(this._minWeekdaysParse,r))?o:null:-1!==(o=Ee.call(this._minWeekdaysParse,r))?o:-1!==(o=Ee.call(this._weekdaysParse,r))?o:-1!==(o=Ee.call(this._shortWeekdaysParse,r))?o:null}var Je=he;var et=he;var tt=he;function it(){function e(e,t){return t.length-e.length}var t,i,n,o,s,r=[],a=[],h=[],d=[];for(t=0;t<7;t++)i=f([2e3,1]).day(t),n=this.weekdaysMin(i,""),o=this.weekdaysShort(i,""),s=this.weekdays(i,""),r.push(n),a.push(o),h.push(s),d.push(n),d.push(o),d.push(s);for(r.sort(e),a.sort(e),h.sort(e),d.sort(e),t=0;t<7;t++)a[t]=ce(a[t]),h[t]=ce(h[t]),d[t]=ce(d[t]);this._weekdaysRegex=new RegExp("^("+d.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+h.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+r.join("|")+")","i")}function nt(){return this.hours()%12||12}function ot(e,t){W(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function st(e,t){return t._meridiemParse}W("H",["HH",2],0,"hour"),W("h",["hh",2],0,nt),W("k",["kk",2],0,function(){return this.hours()||24}),W("hmm",0,0,function(){return""+nt.apply(this)+B(this.minutes(),2)}),W("hmmss",0,0,function(){return""+nt.apply(this)+B(this.minutes(),2)+B(this.seconds(),2)}),W("Hmm",0,0,function(){return""+this.hours()+B(this.minutes(),2)}),W("Hmmss",0,0,function(){return""+this.hours()+B(this.minutes(),2)+B(this.seconds(),2)}),ot("a",!0),ot("A",!1),F("hour","h"),R("hour",13),le("a",st),le("A",st),le("H",Q),le("h",Q),le("k",Q),le("HH",Q,Z),le("hh",Q,Z),le("kk",Q,Z),le("hmm",J),le("hmmss",ee),le("Hmm",J),le("Hmmss",ee),pe(["H","HH"],_e),pe(["k","kk"],function(e,t,i){var n=k(e);t[_e]=24===n?0:n}),pe(["a","A"],function(e,t,i){i._isPm=i._locale.isPM(e),i._meridiem=e}),pe(["h","hh"],function(e,t,i){t[_e]=k(e),p(i).bigHour=!0}),pe("hmm",function(e,t,i){var n=e.length-2;t[_e]=k(e.substr(0,n)),t[we]=k(e.substr(n)),p(i).bigHour=!0}),pe("hmmss",function(e,t,i){var n=e.length-4,o=e.length-2;t[_e]=k(e.substr(0,n)),t[we]=k(e.substr(n,2)),t[ke]=k(e.substr(o)),p(i).bigHour=!0}),pe("Hmm",function(e,t,i){var n=e.length-2;t[_e]=k(e.substr(0,n)),t[we]=k(e.substr(n))}),pe("Hmmss",function(e,t,i){var n=e.length-4,o=e.length-2;t[_e]=k(e.substr(0,n)),t[we]=k(e.substr(n,2)),t[ke]=k(e.substr(o))});var rt,at=Ce("Hours",!0),ht={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:Ye,monthsShort:Re,week:{dow:0,doy:6},weekdays:Xe,weekdaysMin:Ke,weekdaysShort:$e,meridiemParse:/[ap]\.?m?\.?/i},dt={},lt={};function ut(e){return e?e.toLowerCase().replace("_","-"):e}function ct(e){var t=null;if(!dt[e]&&Ji&&Ji.exports)try{t=rt._abbr;var i=nn;i("./locale/"+e),ft(t)}catch(e){}return dt[e]}function ft(e,t){var i;return e&&((i=s(t)?vt(e):pt(e,t))?rt=i:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),rt._abbr}function pt(e,t){if(null===t)return delete dt[e],null;var i,n=ht;if(t.abbr=e,null!=dt[e])O("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),n=dt[e]._config;else if(null!=t.parentLocale)if(null!=dt[t.parentLocale])n=dt[t.parentLocale]._config;else{if(null==(i=ct(t.parentLocale)))return lt[t.parentLocale]||(lt[t.parentLocale]=[]),lt[t.parentLocale].push({name:e,config:t}),null;n=i._config}return dt[e]=new C(T(n,t)),lt[e]&<[e].forEach(function(e){pt(e.name,e.config)}),ft(e),dt[e]}function vt(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return rt;if(!r(e)){if(t=ct(e))return t;e=[e]}return function(e){var t,i,n,o,s=0;for(;s=t&&x(o,i,!0)>=t-1)break;t--}s++}return rt}(e)}function gt(e){var t,i=e._a;return i&&-2===p(e).overflow&&(t=i[ye]<0||11Ne(i[me],i[ye])?be:i[_e]<0||24qe(i,s,r)?p(e)._overflowWeeks=!0:null!=h?p(e)._overflowWeekday=!0:(a=Ue(i,n,o,s,r),e._a[me]=a.year,e._dayOfYear=a.dayOfYear)}(e),null!=e._dayOfYear&&(s=mt(e._a[me],n[me]),(e._dayOfYear>Me(s)||0===e._dayOfYear)&&(p(e)._overflowDayOfYear=!0),i=We(s,0,e._dayOfYear),e._a[ye]=i.getUTCMonth(),e._a[be]=i.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=r[t]=n[t];for(;t<7;t++)e._a[t]=r[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[_e]&&0===e._a[we]&&0===e._a[ke]&&0===e._a[xe]&&(e._nextDay=!0,e._a[_e]=0),e._d=(e._useUTC?We:function(e,t,i,n,o,s,r){var a;e<100&&0<=e?(a=new Date(e+400,t,i,n,o,s,r),isFinite(a.getFullYear())&&a.setFullYear(e)):a=new Date(e,t,i,n,o,s,r);return a}).apply(null,r),o=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[_e]=24),e._w&&void 0!==e._w.d&&e._w.d!==o&&(p(e).weekdayMismatch=!0)}}var bt=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,_t=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,wt=/Z|[+-]\d\d(?::?\d\d)?/,kt=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],xt=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],St=/^\/?Date\((\-?\d+)/i;function Dt(e){var t,i,n,o,s,r,a=e._i,h=bt.exec(a)||_t.exec(a);if(h){for(p(e).iso=!0,t=0,i=kt.length;ti.valueOf():i.valueOf()this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},yi.isLocal=function(){return!!this.isValid()&&!this._isUTC},yi.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},yi.isUtc=Gt,yi.isUTC=Gt,yi.zoneAbbr=function(){return this._isUTC?"UTC":""},yi.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},yi.dates=e("dates accessor is deprecated. Use date instead.",ci),yi.months=e("months accessor is deprecated. Use month instead",Ae),yi.years=e("years accessor is deprecated. Use year instead",Te),yi.zone=e("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",function(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}),yi.isDSTShifted=e("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",function(){if(!s(this._isDSTShifted))return this._isDSTShifted;var e={};if(y(e,this),(e=Pt(e))._a){var t=e._isUTC?f(e._a):Nt(e._a);this._isDSTShifted=this.isValid()&&0>>((3&t)<<3)&255;return i}}(),de=[],le=0;le<256;le++)de[le]=(le+256).toString(16).substr(1);var ue=he(),ce=(ue[0],ue[1],ue[2],ue[3],ue[4],ue[5],ue[6],ue[7],/^\/?Date\((-?\d+)/i);function fe(e){return e instanceof Number||"number"==typeof e}function pe(e){return e instanceof String||"string"==typeof e}function ve(e){return se.isMoment(e)}function ge(e,t){var i;if(void 0!==e){if(null===e)return null;if(!t)return e;if("string"!=typeof t&&!(t instanceof String))throw new Error("Type must be a string");switch(t){case"boolean":case"Boolean":return Boolean(e);case"number":case"Number":return pe(e)&&!isNaN(Date.parse(e))?se(e).valueOf():Number(e.valueOf());case"string":case"String":return String(e);case"Date":if(fe(e))return new Date(e);if(e instanceof Date)return new Date(e.valueOf());if(ve(e))return new Date(e.valueOf());if(pe(e))return(i=ce.exec(e))?new Date(Number(i[1])):se(new Date(e)).toDate();throw new Error("Cannot convert object of type "+me(e)+" to type Date");case"Moment":if(fe(e))return se(e);if(e instanceof Date)return se(e.valueOf());if(ve(e))return se(e);if(pe(e))return i=ce.exec(e),se(i?Number(i[1]):e);throw new Error("Cannot convert object of type "+me(e)+" to type Date");case"ISODate":if(fe(e))return new Date(e);if(e instanceof Date)return e.toISOString();if(ve(e))return e.toDate().toISOString();if(pe(e))return(i=ce.exec(e))?new Date(Number(i[1])).toISOString():se(e).format();throw new Error("Cannot convert object of type "+me(e)+" to type ISODate");case"ASPDate":if(fe(e))return"/Date("+e+")/";if(e instanceof Date)return"/Date("+e.valueOf()+")/";if(pe(e))return"/Date("+((i=ce.exec(e))?new Date(Number(i[1])).valueOf():new Date(e).valueOf())+")/";throw new Error("Cannot convert object of type "+me(e)+" to type ASPDate");default:throw new Error("Unknown type ".concat(t))}}}function me(e){var t=ne(e);return"object"===t?null===e?"null":e instanceof Boolean?"Boolean":e instanceof Number?"Number":e instanceof String?"String":Array.isArray(e)?"Array":e instanceof Date?"Date":"Object":"number"===t?"Number":"boolean"===t?"Boolean":"string"===t?"String":void 0===t?"undefined":t}function ye(e){return"string"==typeof e||"number"==typeof e}var be=function(){function r(e){j(this,r),this._queue=[],this._timeout=null,this._extended=null,this.delay=null,this.max=1/0,this.setOptions(e)}return V(r,[{key:"setOptions",value:function(e){e&&void 0!==e.delay&&(this.delay=e.delay),e&&void 0!==e.max&&(this.max=e.max),this._flushIfNeeded()}},{key:"destroy",value:function(){if(this.flush(),this._extended){for(var e=this._extended.object,t=this._extended.methods,i=0;ithis.max&&this.flush(),null!=this._timeout&&(clearTimeout(this._timeout),this._timeout=null),0":!0,"--":!0},Re="",ze=0,Be="",Ae="",Le=Ie.NULL;function He(){ze++,Be=Re.charAt(ze)}function je(){return Re.charAt(ze+1)}var We=/[a-zA-Z_0-9.:#]/;function Ve(e){return We.test(e)}function Ue(e,t){if(e=e||{},t)for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);return e}function Ge(e,t,i){for(var n=t.split("."),o=e;n.length;){var s=n.shift();n.length?(o[s]||(o[s]={}),o=o[s]):o[s]=i}}function qe(e,t){for(var i,n,o=null,s=[e],r=e;r.parent;)s.push(r.parent),r=r.parent;if(r.nodes)for(i=0,n=r.nodes.length;i"===Ae||"--"===Ae;){var i,n=Ae;$e();var o=Je(e);if(o)i=o;else{if(Le!=Ie.IDENTIFIER)throw it("Identifier or subgraph expected");qe(e,{id:i=Ae}),$e()}Ze(e,Xe(e,t,i,n,tt())),t=i}}function tt(){for(var e=null,t={dashed:!0,solid:!1,dotted:[1,5]};"["===Ae;){for($e(),e={};""!==Ae&&"]"!=Ae;){if(Le!=Ie.IDENTIFIER)throw it("Attribute name expected");var i=Ae;if($e(),"="!=Ae)throw it("Equal sign = expected");if($e(),Le!=Ie.IDENTIFIER)throw it("Attribute value expected");var n=Ae;"style"===i&&(n=t[n]);if("arrowhead"===i)i="arrows",n={to:{enabled:!0,type:{dot:"circle",box:"box",crow:"crow",curve:"curve",icurve:"inv_curve",normal:"triangle",inv:"inv_triangle",diamond:"diamond",tee:"bar",vee:"vee"}[n]}};Ge(e,i,n),$e(),","==Ae&&$e()}if("]"!=Ae)throw it("Bracket ] expected");$e()}return e}function it(e){return new SyntaxError(e+', got "'+nt(Ae,30)+'" (char '+ze+")")}function nt(e,t){return e.length<=t?e:e.substr(0,27)+"..."}function ot(e,t,i){for(var n=t.split("."),o=n.pop(),s=e,r=0;r"===e.type&&(t.arrows="to"),t};t.edges.forEach(function(o){var e,t;e=o.from instanceof Object?o.from.nodes:{id:o.from},t=o.to instanceof Object?o.to.nodes:{id:o.to},o.from instanceof Object&&o.from.edges&&o.from.edges.forEach(function(e){var t=r(e);s.edges.push(t)}),function(t,e,i){Array.isArray(t)?t.forEach(function(t){Array.isArray(e)?e.forEach(function(e){i(t,e)}):i(t,e)}):Array.isArray(e)?e.forEach(function(e){i(t,e)}):i(t,e)}(e,t,function(e,t){var i=Xe(s,e.id,t.id,o.type,o.attr),n=r(i);s.edges.push(n)}),o.to instanceof Object&&o.to.edges&&o.to.edges.forEach(function(e){var t=r(e);s.edges.push(t)})})}return t.attr&&(s.options=t.attr),s}};var at={parseGephi:function(e,t){var i=[],n=[],o={edges:{inheritColor:!1},nodes:{fixed:!1,parseColor:!1}};void 0!==t&&(void 0!==t.fixed&&(o.nodes.fixed=t.fixed),void 0!==t.parseColor&&(o.nodes.parseColor=t.parseColor),void 0!==t.inheritColor&&(o.edges.inheritColor=t.inheritColor));for(var s=e.edges,r=e.nodes,a=0;a\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",i=s.console&&(s.console.warn||s.console.log);return i&&i.call(s.console,o,t),n.apply(this,arguments)}}r="function"!=typeof Object.assign?function(e){if(e===u||null===e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),i=1;it[i]}):n.sort()),n}function T(e,t){for(var i,n,o=t[0].toUpperCase()+t.slice(1),s=0;sc(d.y)?d.x:d.y,t.scale=r?function(e,t){return ie(t[0],t[1],X)/ie(e[0],e[1],X)}(r.pointers,n):1,t.rotation=r?function(e,t){return ne(t[1],t[0],X)+ne(e[1],e[0],X)}(r.pointers,n):0,t.maxPointers=i.prevInput?t.pointers.length>i.prevInput.maxPointers?t.pointers.length:i.prevInput.maxPointers:t.pointers.length,function(e,t){var i,n,o,s,r=e.lastInterval||t,a=t.timeStamp-r.timeStamp;if(t.eventType!=A&&(Rc(l.y)?l.x:l.y,s=te(h,d),e.lastInterval=t}else i=r.velocity,n=r.velocityX,o=r.velocityY,s=r.direction;t.velocity=i,t.velocityX=n,t.velocityY=o,t.direction=s}(i,t);var l=e.element;x(t.srcEvent.target,l)&&(l=t.srcEvent.target);t.target=l}(e,i),e.emit("hammer.input",i),e.recognize(i),e.session.prevInput=i}function Q(e){for(var t=[],i=0;i=c(t)?e<0?H:j:t<0?W:V}function ie(e,t,i){var n=t[(i=i||Z)[0]]-e[i[0]],o=t[i[1]]-e[i[1]];return Math.sqrt(n*n+o*o)}function ne(e,t,i){var n=t[(i=i||Z)[0]]-e[i[0]],o=t[i[1]]-e[i[1]];return 180*Math.atan2(o,n)/Math.PI}$.prototype={handler:function(){},init:function(){this.evEl&&w(this.element,this.evEl,this.domHandler),this.evTarget&&w(this.target,this.evTarget,this.domHandler),this.evWin&&w(P(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&k(this.element,this.evEl,this.domHandler),this.evTarget&&k(this.target,this.evTarget,this.domHandler),this.evWin&&k(P(this.element),this.evWin,this.domHandler)}};var oe={mousedown:z,mousemove:2,mouseup:B},se="mousedown",re="mousemove mouseup";function ae(){this.evEl=se,this.evWin=re,this.pressed=!1,$.apply(this,arguments)}m(ae,$,{handler:function(e){var t=oe[e.type];t&z&&0===e.button&&(this.pressed=!0),2&t&&1!==e.which&&(t=B),this.pressed&&(t&B&&(this.pressed=!1),this.callback(this.manager,t,{pointers:[e],changedPointers:[e],pointerType:"mouse",srcEvent:e}))}});var he={pointerdown:z,pointermove:2,pointerup:B,pointercancel:A,pointerout:A},de={2:Y,3:"pen",4:"mouse",5:"kinect"},le="pointerdown",ue="pointermove pointerup pointercancel";function ce(){this.evEl=le,this.evWin=ue,$.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}s.MSPointerEvent&&!s.PointerEvent&&(le="MSPointerDown",ue="MSPointerMove MSPointerUp MSPointerCancel"),m(ce,$,{handler:function(e){var t=this.store,i=!1,n=e.type.toLowerCase().replace("ms",""),o=he[n],s=de[e.pointerType]||e.pointerType,r=s==Y,a=M(t,e.pointerId,"pointerId");o&z&&(0===e.button||r)?a<0&&(t.push(e),a=t.length-1):o&(B|A)&&(i=!0),a<0||(t[a]=e,this.callback(this.manager,o,{pointers:t,changedPointers:[e],pointerType:s,srcEvent:e}),i&&t.splice(a,1))}});var fe={touchstart:z,touchmove:2,touchend:B,touchcancel:A};function pe(){this.evTarget="touchstart",this.evWin="touchstart touchmove touchend touchcancel",this.started=!1,$.apply(this,arguments)}m(pe,$,{handler:function(e){var t=fe[e.type];if(t===z&&(this.started=!0),this.started){var i=function(e,t){var i=O(e.touches),n=O(e.changedTouches);t&(B|A)&&(i=E(i.concat(n),"identifier",!0));return[i,n]}.call(this,e,t);t&(B|A)&&i[0].length-i[1].length==0&&(this.started=!1),this.callback(this.manager,t,{pointers:i[0],changedPointers:i[1],pointerType:Y,srcEvent:e})}}});var ve={touchstart:z,touchmove:2,touchend:B,touchcancel:A},ge="touchstart touchmove touchend touchcancel";function me(){this.evTarget=ge,this.targetIds={},$.apply(this,arguments)}m(me,$,{handler:function(e){var t=ve[e.type],i=function(e,t){var i=O(e.touches),n=this.targetIds;if(t&(2|z)&&1===i.length)return n[i[0].identifier]=!0,[i,i];var o,s,r=O(e.changedTouches),a=[],h=this.target;if(s=i.filter(function(e){return x(e.target,h)}),t===z)for(o=0;ot.threshold&&o&t.direction},attrTest:function(e){return Ie.prototype.attrTest.call(this,e)&&(2&this.state||!(2&this.state)&&this.directionTest(e))},emit:function(e){this.pX=e.deltaX,this.pY=e.deltaY;var t=Fe(e.direction);t&&(e.additionalEvent=this.options.event+t),this._super.emit.call(this,e)}}),m(Re,Ie,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[Se]},attrTest:function(e){return this._super.attrTest.call(this,e)&&(Math.abs(e.scale-1)>this.options.threshold||2&this.state)},emit:function(e){if(1!==e.scale){var t=e.scale<1?"in":"out";e.additionalEvent=this.options.event+t}this._super.emit.call(this,e)}}),m(ze,Ce,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return["auto"]},process:function(e){var t=this.options,i=e.pointers.length===t.pointers,n=e.distancet.time;if(this._input=e,!n||!i||e.eventType&(B|A)&&!o)this.reset();else if(e.eventType&z)this.reset(),this._timer=d(function(){this.state=8,this.tryEmit()},t.time,this);else if(e.eventType&B)return 8;return 32},reset:function(){clearTimeout(this._timer)},emit:function(e){8===this.state&&(e&&e.eventType&B?this.manager.emit(this.options.event+"up",e):(this._input.timeStamp=f(),this.manager.emit(this.options.event,this._input)))}}),m(Be,Ie,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[Se]},attrTest:function(e){return this._super.attrTest.call(this,e)&&(Math.abs(e.rotation)>this.options.threshold||2&this.state)}}),m(Ae,Ie,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:U|G,pointers:1},getTouchAction:function(){return Ye.prototype.getTouchAction.call(this)},attrTest:function(e){var t,i=this.options.direction;return i&(U|G)?t=e.overallVelocity:i&U?t=e.overallVelocityX:i&G&&(t=e.overallVelocityY),this._super.attrTest.call(this,e)&&i&e.offsetDirection&&e.distance>this.options.threshold&&e.maxPointers==this.options.pointers&&c(t)>this.options.velocity&&e.eventType&B},emit:function(e){var t=Fe(e.offsetDirection);t&&this.manager.emit(this.options.event+t,e),this.manager.emit(this.options.event,e)}}),m(Le,Ce,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[xe]},process:function(e){var t=this.options,i=e.pointers.length===t.pointers,n=e.distance=this.NUM_ITERATIONS&&(r=this.NUM_ITERATIONS-1);var a=this.coordinates[r];e.drawImage(this.canvas,a[0],a[1],a[2],a[3],i,n,o,s)}else e.drawImage(this.image,i,n,o,s)}}]),e}(),Mt=function(){function t(e){gt(this,t),this.images={},this.imageBroken={},this.callback=e}return yt(t,[{key:"_tryloadBrokenUrl",value:function(e,t,i){void 0!==e&&void 0!==i&&(void 0!==t?(i.image.onerror=function(){console.error("Could not load brokenImage:",t)},i.image.src=t):console.warn("No broken url image defined"))}},{key:"_redrawWithImage",value:function(e){this.callback&&this.callback(e)}},{key:"load",value:function(e,t){var i=this,n=this.images[e];if(n)return n;var o=new Dt;return(this.images[e]=o).image.onload=function(){i._fixImageCoordinates(o.image),o.init(),i._redrawWithImage(o)},o.image.onerror=function(){console.error("Could not load image:",e),i._tryloadBrokenUrl(e,t,o)},o.image.src=e,o}},{key:"_fixImageCoordinates",value:function(e){0===e.width&&(document.body.appendChild(e),e.width=e.offsetWidth,e.height=e.offsetHeight,document.body.removeChild(e))}}]),t}(),Ot=function(){function e(){gt(this,e),this.clear(),this.defaultIndex=0,this.groupsArray=[],this.groupIndex=0,this.defaultGroups=[{border:"#2B7CE9",background:"#97C2FC",highlight:{border:"#2B7CE9",background:"#D2E5FF"},hover:{border:"#2B7CE9",background:"#D2E5FF"}},{border:"#FFA500",background:"#FFFF00",highlight:{border:"#FFA500",background:"#FFFFA3"},hover:{border:"#FFA500",background:"#FFFFA3"}},{border:"#FA0A10",background:"#FB7E81",highlight:{border:"#FA0A10",background:"#FFAFB1"},hover:{border:"#FA0A10",background:"#FFAFB1"}},{border:"#41A906",background:"#7BE141",highlight:{border:"#41A906",background:"#A1EC76"},hover:{border:"#41A906",background:"#A1EC76"}},{border:"#E129F0",background:"#EB7DF4",highlight:{border:"#E129F0",background:"#F0B3F5"},hover:{border:"#E129F0",background:"#F0B3F5"}},{border:"#7C29F0",background:"#AD85E4",highlight:{border:"#7C29F0",background:"#D3BDF0"},hover:{border:"#7C29F0",background:"#D3BDF0"}},{border:"#C37F00",background:"#FFA807",highlight:{border:"#C37F00",background:"#FFCA66"},hover:{border:"#C37F00",background:"#FFCA66"}},{border:"#4220FB",background:"#6E6EFD",highlight:{border:"#4220FB",background:"#9B9BFD"},hover:{border:"#4220FB",background:"#9B9BFD"}},{border:"#FD5A77",background:"#FFC0CB",highlight:{border:"#FD5A77",background:"#FFD1D9"},hover:{border:"#FD5A77",background:"#FFD1D9"}},{border:"#4AD63A",background:"#C2FABC",highlight:{border:"#4AD63A",background:"#E6FFE3"},hover:{border:"#4AD63A",background:"#E6FFE3"}},{border:"#990000",background:"#EE0000",highlight:{border:"#BB0000",background:"#FF3333"},hover:{border:"#BB0000",background:"#FF3333"}},{border:"#FF6000",background:"#FF6000",highlight:{border:"#FF6000",background:"#FF6000"},hover:{border:"#FF6000",background:"#FF6000"}},{border:"#97C2FC",background:"#2B7CE9",highlight:{border:"#D2E5FF",background:"#2B7CE9"},hover:{border:"#D2E5FF",background:"#2B7CE9"}},{border:"#399605",background:"#255C03",highlight:{border:"#399605",background:"#255C03"},hover:{border:"#399605",background:"#255C03"}},{border:"#B70054",background:"#FF007E",highlight:{border:"#B70054",background:"#FF007E"},hover:{border:"#B70054",background:"#FF007E"}},{border:"#AD85E4",background:"#7C29F0",highlight:{border:"#D3BDF0",background:"#7C29F0"},hover:{border:"#D3BDF0",background:"#7C29F0"}},{border:"#4557FA",background:"#000EA1",highlight:{border:"#6E6EFD",background:"#000EA1"},hover:{border:"#6E6EFD",background:"#000EA1"}},{border:"#FFC0CB",background:"#FD5A77",highlight:{border:"#FFD1D9",background:"#FD5A77"},hover:{border:"#FFD1D9",background:"#FD5A77"}},{border:"#C2FABC",background:"#74D66A",highlight:{border:"#E6FFE3",background:"#74D66A"},hover:{border:"#E6FFE3",background:"#74D66A"}},{border:"#EE0000",background:"#990000",highlight:{border:"#FF3333",background:"#BB0000"},hover:{border:"#FF3333",background:"#BB0000"}}],this.options={},this.defaultOptions={useDefaultGroups:!0},z.extend(this.options,this.defaultOptions)}return yt(e,[{key:"setOptions",value:function(e){var t=["useDefaultGroups"];if(void 0!==e)for(var i in e)if(e.hasOwnProperty(i)&&-1===t.indexOf(i)){var n=e[i];this.add(i,n)}}},{key:"clear",value:function(){this.groups={},this.groupsArray=[]}},{key:"get",value:function(e,t){var i=!(1t.x&&e.topt.y}},{key:"isValidLabel",value:function(e){return"string"==typeof e&&""!==e}}]),e}(),Tt=function(){function t(e){gt(this,t),this.measureText=e,this.current=0,this.width=0,this.height=0,this.lines=[]}return yt(t,[{key:"_add",value:function(e,t,i){var n=2e&&(e=n.width),t+=n.height}this.width=e,this.height=t}},{key:"removeEmptyBlocks",value:function(){for(var e=[],t=0;t"://,""://,""://,"":/<\/b>/,"":/<\/i>/,"":/<\/code>/,"*":/\*/,_:/\_/,"`":/`/,afterBold:/[^\*]/,afterItal:/[^_]/,afterMono:/[^`]/},Pt=function(){function t(e){gt(this,t),this.text=e,this.bold=!1,this.ital=!1,this.mono=!1,this.spacing=!1,this.position=0,this.buffer="",this.modStack=[],this.blocks=[]}return yt(t,[{key:"mod",value:function(){return 0===this.modStack.length?"normal":this.modStack[0]}},{key:"modName",value:function(){return 0===this.modStack.length?"normal":"mono"===this.modStack[0]?"mono":this.bold&&this.ital?"boldital":this.bold?"bold":this.ital?"ital":void 0}},{key:"emitBlock",value:function(){this.spacing&&(this.add(" "),this.spacing=!1),0")||t.parseStartTag("ital","")||t.parseStartTag("mono","")||t.parseEndTag("bold","")||t.parseEndTag("ital","")||t.parseEndTag("mono",""))||!!/&/.test(i)&&(t.replace(t.text,"<","<")||t.replace(t.text,"&","&")||t.add("&"),!0)||t.add(i),t.position++}return t.emitBlock(),t.blocks}},{key:"splitMarkdownBlocks",value:function(e){for(var t,i=this,n=new Pt(e),o=!0;n.positionthis.parent.fontOptions.maxWdt}},{key:"getLongestFit",value:function(e){for(var t="",i=0;i=this.elementOptions.scaling.label.maxVisible&&(a=Number(this.elementOptions.scaling.label.maxVisible)/this.body.view.scale),this.calculateLabelSize(e,n,o,t,i,r),this._drawBackground(e),this._drawText(e,t,this.size.yLine,r,a))}}},{key:"_drawBackground",value:function(e){if(void 0!==this.fontOptions.background&&"none"!==this.fontOptions.background){e.fillStyle=this.fontOptions.background;var t=this.getSize();e.fillRect(t.left,t.top,t.width,t.height)}}},{key:"_drawText",value:function(e,t,i,n,o){var s=3this.size.labelHeight&&("top"===this.fontOptions.valign&&(i-=(this.size.height-this.size.labelHeight)/2),"bottom"===this.fontOptions.valign&&(i+=(this.size.height-this.size.labelHeight)/2));for(var h=0;hthis.imageObj.height?i=this.imageObj.width/this.imageObj.height:n=this.imageObj.height/this.imageObj.width),e=2*this.options.size*i,t=2*this.options.size*n}else e=this.imageObj.width,t=this.imageObj.height;this.width=e,this.height=t,this.radius=.5*this.width}},{key:"_drawRawCircle",value:function(e,t,i,n){this.initContextForDraw(e,n),e.circle(t,i,n.size),this.performFill(e,n)}},{key:"_drawImageAtPosition",value:function(e,t){if(0!=this.imageObj.width){e.globalAlpha=1,this.enableShadow(e,t);var i=1;!0===this.options.shapeProperties.interpolation&&(i=this.imageObj.width/this.width/this.body.view.scale),this.imageObj.drawImageAtPosition(e,i,this.left,this.top,this.width,this.height),this.disableShadow(e,t)}}},{key:"_drawImageLabel",value:function(e,t,i,n,o){var s,r=0;if(void 0!==this.height){r=.5*this.height;var a=this.labelModule.getTextSize(e,n,o);1<=a.lineCount&&(r+=a.height/2)}s=i+r,this.options.label&&(this.labelOffset=r),this.labelModule.draw(e,t,s,n,o,"hanging")}}]),o}(),Bt=function(){function o(e,t,i){var n;return gt(this,o),(n=kt(this,_t(o).call(this,e,t,i)))._setMargins(i),n}return bt(o,zt),yt(o,[{key:"resize",value:function(e,t,i){var n=1s.distance?" in "+f.printLocation(o.path,e,"")+"Perhaps it was misplaced? Matching option found at: "+f.printLocation(s.path,s.closestMatch,""):o.distance<=8?'. Did you mean "'+o.closestMatch+'"?'+f.printLocation(o.path,e):". Did you mean one of these: "+f.print(Object.keys(t))+f.printLocation(i,e),console.log('%cUnknown option detected: "'+e+'"'+n,ei),Jt=!0}},{key:"findInOptions",value:function(e,t,i,n){var o=3c.distance&&(r=c.closestMatch,a=c.path,s=c.distance,d=c.indexMatch)}else-1!==l.toLowerCase().indexOf(h)&&(d=l),(u=f.levenshteinDistance(e,l))e.left&&this.shape.tope.top}},{key:"isBoundingBoxOverlappingWith",value:function(e){return this.shape.boundingBox.lefte.left&&this.shape.boundingBox.tope.top}}],[{key:"updateGroupOptions",value:function(e,t,i){if(void 0!==i){var n=e.group;if(void 0!==t&&void 0!==t.group&&n!==t.group)throw new Error("updateGroupOptions: group values in options don't match.");if("number"==typeof n||"string"==typeof n&&""!=n){var o=i.get(n),s=["font"];void 0!==t&&void 0!==t.color&&null!=t.color&&s.push("color"),z.selectiveNotDeepExtend(s,e,o),e.color=z.parseColor(e.color)}}}},{key:"parseOptions",value:function(e,t,i,n,o){var s=2n.shape.height?(t=n.x+.5*n.shape.width,n.y-o):(t=n.x+o,n.y-.5*n.shape.height),[t,i,o]}},{key:"_pointOnCircle",value:function(e,t,i,n){var o=2*n*Math.PI;return{x:e+i*Math.cos(o),y:t-i*Math.sin(o)}}},{key:"_findBorderPositionCircle",value:function(e,t,i){for(var n,o,s,r=i.x,a=i.y,h=i.low,d=i.high,l=i.direction,u=0,c=this.options.selfReferenceSize,f=.5*(h+d);h<=d&&u<10&&(f=.5*(h+d),n=this._pointOnCircle(r,a,c,f),o=Math.atan2(e.y-n.y,e.x-n.x),s=e.distanceToBorder(t,o)-Math.sqrt(Math.pow(n.x-e.x,2)+Math.pow(n.y-e.y,2)),!(Math.abs(s)<.05));)0Math.abs(s)||!0===this.options.smooth.forceDirection||"horizontal"===this.options.smooth.forceDirection)&&"vertical"!==this.options.smooth.forceDirection?(t=this.from.y,n=this.to.y,e=this.from.x-r*o,this.to.x+r*o):(t=this.from.y-r*s,n=this.to.y+r*s,e=this.from.x,this.to.x),[{x:e,y:t},{x:i,y:n}]}},{key:"getViaNode",value:function(){return this._getViaCoordinates()}},{key:"_findBorderPosition",value:function(e,t){return this._findBorderPositionBezier(e,t)}},{key:"_getDistanceToEdge",value:function(e,t,i,n,o,s,r){var a=xt(6this.to.x&&(e=-e),this.from.y>=this.to.y&&(t=-t),i=this.from.x+e,n=this.from.y+t,"discrete"===s&&(r<=a?i=rthis.to.x&&(y=-y),this.from.y>=this.to.y&&(b=-b),i=this.from.x+y,n=this.from.y+b,r<=a?i=this.from.x<=this.to.x?this.to.xi?this.to.x:i:n=this.from.y>=this.to.y?this.to.y>n?this.to.y:n:this.to.yi.shape.height?(r=i.x+.5*i.shape.width,i.y-h):(r=i.x+h,i.y-.5*i.shape.height),o=this._pointOnCircle(r,a,h,.125),this.labelModule.draw(e,o.x,o.y,this.selected,this.hover)}}}},{key:"getItemsOnPoint",value:function(e){var t=[];if(this.labelModule.visible()){var i=this._getRotation();Et.pointInRect(this.labelModule.getSize(),e,i)&&t.push({edgeId:this.id,labelId:0})}var n={left:e.x,top:e.y};return this.isOverlappingWith(n)&&t.push({edgeId:this.id}),t}},{key:"isOverlappingWith",value:function(e){if(this.connected){var t=this.from.x,i=this.from.y,n=this.to.x,o=this.to.y,s=e.left,r=e.top;return this.edgeType.getDistanceToEdge(t,i,n,o,s,r)<10}return!1}},{key:"_getRotation",value:function(e){var t=this.edgeType.getViaNode(),i=this.edgeType.getPoint(.5,t);void 0!==e&&this.labelModule.calculateLabelSize(e,this.selected,this.hover,i.x,i.y);var n={x:i.x,y:this.labelModule.size.yLine,angle:0};if(!this.labelModule.visible())return n;if("horizontal"===this.options.font.align)return n;var o=this.from.y-this.to.y,s=this.from.x-this.to.x,r=Math.atan2(o,s);return(r<-1&&s<0||0this.thetaInversed?this._calculateForces(o,i,n,t,e):4===e.childrenCount?this._getForceContributions(e,t):e.children.data.id!=t.id&&this._calculateForces(o,i,n,t,e))}},{key:"_calculateForces",value:function(e,t,i,n,o){0===e&&(t=e=.1),this.overlapAvoidanceFactor<1&&n.shape.radius&&(e=Math.max(.1+this.overlapAvoidanceFactor*n.shape.radius,e-n.shape.radius));var s=this.options.gravitationalConstant*o.mass*n.options.mass/Math.pow(e,3),r=t*s,a=i*s;this.physicsBody.forces[n.id].x+=r,this.physicsBody.forces[n.id].y+=a}},{key:"_formBarnesHutTree",value:function(e,t){for(var i,n=t.length,o=e[t[0]].x,s=e[t[0]].y,r=e[t[0]].x,a=e[t[0]].y,h=1;ht.x?o.maxY>t.y?"NW":"SW":o.maxY>t.y?"NE":"SE",this._placeInRegion(e,t,n)}},{key:"_placeInRegion",value:function(e,t,i){var n=e.children[i];switch(n.childrenCount){case 0:n.children.data=t,n.childrenCount=1,this._updateBranchMass(n,t);break;case 1:n.children.data.x===t.x&&n.children.data.y===t.y?(t.x+=this.seededRandom(),t.y+=this.seededRandom()):(this._splitBranch(n),this._placeInTree(n,t));break;case 4:this._placeInTree(n,t)}}},{key:"_splitBranch",value:function(e){var t=null;1===e.childrenCount&&(t=e.children.data,e.mass=0,e.centerOfMass.x=0,e.centerOfMass.y=0),e.childrenCount=4,e.children.data=null,this._insertRegion(e,"NW"),this._insertRegion(e,"NE"),this._insertRegion(e,"SW"),this._insertRegion(e,"SE"),null!=t&&this._placeInTree(e,t)}},{key:"_insertRegion",value:function(e,t){var i,n,o,s,r=.5*e.size;switch(t){case"NW":i=e.range.minX,n=e.range.minX+r,o=e.range.minY,s=e.range.minY+r;break;case"NE":i=e.range.minX+r,n=e.range.maxX,o=e.range.minY,s=e.range.minY+r;break;case"SW":i=e.range.minX,n=e.range.minX+r,o=e.range.minY+r,s=e.range.maxY;break;case"SE":i=e.range.minX+r,n=e.range.maxX,o=e.range.minY+r,s=e.range.maxY}e.children[t]={centerOfMass:{x:0,y:0},mass:0,range:{minX:i,maxX:n,minY:o,maxY:s},size:.5*e.size,calcSize:2*e.calcSize,children:{data:null},maxWidth:0,level:e.level+1,childrenCount:0}}},{key:"_debug",value:function(e,t){void 0!==this.barnesHutTree&&(e.lineWidth=1,this._drawBranch(this.barnesHutTree.root,e,t))}},{key:"_drawBranch",value:function(e,t,i){void 0===i&&(i="#FF0000"),4===e.childrenCount&&(this._drawBranch(e.children.NW,t),this._drawBranch(e.children.NE,t),this._drawBranch(e.children.SE,t),this._drawBranch(e.children.SW,t)),t.strokeStyle=i,t.beginPath(),t.moveTo(e.range.minX,e.range.minY),t.lineTo(e.range.maxX,e.range.minY),t.stroke(),t.beginPath(),t.moveTo(e.range.maxX,e.range.minY),t.lineTo(e.range.maxX,e.range.maxY),t.stroke(),t.beginPath(),t.moveTo(e.range.maxX,e.range.maxY),t.lineTo(e.range.minX,e.range.maxY),t.stroke(),t.beginPath(),t.moveTo(e.range.minX,e.range.maxY),t.lineTo(e.range.minX,e.range.minY),t.stroke()}}]),n}(),Oi=function(){function n(e,t,i){gt(this,n),this.body=e,this.physicsBody=t,this.setOptions(i)}return yt(n,[{key:"setOptions",value:function(e){this.options=e}},{key:"solve",value:function(){for(var e,t,i,n,o,s,r,a,h=this.body.nodes,d=this.physicsBody.physicsNodeIndices,l=this.physicsBody.forces,u=this.options.nodeDistance,c=-2/3/u,f=0;fn&&(e=0(i=e[n[h]]).shape.boundingBox.left&&(r=i.shape.boundingBox.left),ai.shape.boundingBox.top&&(o=i.shape.boundingBox.top),s(i=e[n[h]]).x&&(r=i.x),ai.y&&(o=i.y),s=e&&i.push(o.id)}for(var s=0;so?t.x:o,s=t.yr?t.y:r;return{x:.5*(n+o),y:.5*(s+r)}}},{key:"openCluster",value:function(e,t,i){var n=!(2n&&(n=s.edges.length),e+=s.edges.length,t+=Math.pow(s.edges.length,2),i+=1}e/=i;var r=(t/=i)-Math.pow(e,2),a=Math.sqrt(r),h=Math.floor(e+2*a);return n.5*this.body.nodeIndices.length)return void this.fit(o,!1);i=Yi.getRange(this.body.nodes,o.nodes),n=12.662/(this.body.nodeIndices.length+7.4147)+.0964822,n*=Math.min(this.canvas.frame.canvas.clientWidth/600,this.canvas.frame.canvas.clientHeight/600)}else{this.body.emitter.emit("_resizeNodes"),i=Yi.getRange(this.body.nodes,o.nodes);var h=1.1*Math.abs(i.maxX-i.minX),d=1.1*Math.abs(i.maxY-i.minY),l=this.canvas.frame.canvas.clientWidth/h,u=this.canvas.frame.canvas.clientHeight/d;n=l<=u?l:u}1o-this.padding&&(a=!0),s=a?this.x-i:this.x,r=h?this.y-t:this.y}else(r=this.y-t)+t+this.padding>n&&(r=n-t-this.padding),ro&&(s=o-i-this.padding),s>=1;return e+t}(o);do{if((s=u(e,i,n,t))>>1;o(s,e[h])<0?a=h:r=1+h}var d=n-r;switch(d){case 3:e[r+3]=e[r+2];case 2:e[r+2]=e[r+1];case 1:e[r+1]=e[r];break;default:for(;0>>1);0>>1);s(e,t[i+l])<0?h=l:r=l+1}return h}var f=function(){function i(e,t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),this.array=null,this.compare=null,this.minGallop=7,this.length=0,this.tmpStorageLength=256,this.stackLength=0,this.runStart=null,this.runLength=null,this.stackSize=0,this.array=e,this.compare=t,this.length=e.length,this.length<512&&(this.tmpStorageLength=this.length>>>1),this.tmp=new Array(this.tmpStorageLength),this.stackLength=this.length<120?5:this.length<1542?10:this.length<119151?19:40,this.runStart=new Array(this.stackLength),this.runLength=new Array(this.stackLength)}return i.prototype.pushRun=function(e,t){this.runStart[this.stackSize]=e,this.runLength[this.stackSize]=t,this.stackSize+=1},i.prototype.mergeRuns=function(){for(;1this.runLength[e+1])break;this.mergeAt(e)}},i.prototype.forceMergeRuns=function(){for(;1i.hierarchical.levels[e.id]&&i.hierarchical.addRelation(e.id,t.id)}),this.hierarchical.checkIfTree()}},{key:"_crawlNetwork",value:function(e,t){function r(e,t){if(void 0===d[e.id]){var i;a.hierarchical.setTreeIndex(e,t),d[e.id]=!0;for(var n=a._getActiveEdges(e),o=0;o"+e+":":e+":",o}},{key:"_makeDropdown",value:function(e,t,i){var n=document.createElement("select");n.className="vis-configuration vis-config-select";var o=0;void 0!==t&&-1!==e.indexOf(t)&&(o=e.indexOf(t));for(var s=0;svar options = "+JSON.stringify(e,null,2)+""}},{key:"getOptions",value:function(){for(var e={},t=0;t>>0,n=0;nMe(e)?(s=e+1,d-Me(e)):(s=e,d),{year:s,dayOfYear:r}}function Ge(e,t,i){var n,o,s=Ve(e.year(),t,i),r=Math.floor((e.dayOfYear()-s-1)/7)+1;return r<1?(o=e.year()-1,n=r+qe(o,t,i)):r>qe(e.year(),t,i)?(n=r-qe(e.year(),t,i),o=e.year()+1):(o=e.year(),n=r),{week:n,year:o}}function qe(e,t,i){var n=Ve(e,t,i),o=Ve(e+1,t,i);return(Me(e)-n+o)/7}W("w",["ww",2],"wo","week"),W("W",["WW",2],"Wo","isoWeek"),F("week","w"),F("isoWeek","W"),R("week",5),R("isoWeek",5),le("w",Q),le("ww",Q,Z),le("W",Q),le("WW",Q,Z),ve(["w","ww","W","WW"],function(e,t,i,n){t[n.substr(0,1)]=k(e)});function Ze(e,t){return e.slice(t,7).concat(e.slice(0,t))}W("d",0,"do","day"),W("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),W("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),W("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),W("e",0,0,"weekday"),W("E",0,0,"isoWeekday"),F("day","d"),F("weekday","e"),F("isoWeekday","E"),R("day",11),R("weekday",11),R("isoWeekday",11),le("d",Q),le("e",Q),le("E",Q),le("dd",function(e,t){return t.weekdaysMinRegex(e)}),le("ddd",function(e,t){return t.weekdaysShortRegex(e)}),le("dddd",function(e,t){return t.weekdaysRegex(e)}),ve(["dd","ddd","dddd"],function(e,t,i,n){var o=i._locale.weekdaysParse(e,n,i._strict);null!=o?t.d=o:p(i).invalidWeekday=e}),ve(["d","e","E"],function(e,t,i,n){t[n]=k(e)});var Xe="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_");var $e="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_");var Ke="Su_Mo_Tu_We_Th_Fr_Sa".split("_");function Qe(e,t,i){var n,o,s,r=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],n=0;n<7;++n)s=f([2e3,1]).day(n),this._minWeekdaysParse[n]=this.weekdaysMin(s,"").toLocaleLowerCase(),this._shortWeekdaysParse[n]=this.weekdaysShort(s,"").toLocaleLowerCase(),this._weekdaysParse[n]=this.weekdays(s,"").toLocaleLowerCase();return i?"dddd"===t?-1!==(o=Ee.call(this._weekdaysParse,r))?o:null:"ddd"===t?-1!==(o=Ee.call(this._shortWeekdaysParse,r))?o:null:-1!==(o=Ee.call(this._minWeekdaysParse,r))?o:null:"dddd"===t?-1!==(o=Ee.call(this._weekdaysParse,r))?o:-1!==(o=Ee.call(this._shortWeekdaysParse,r))?o:-1!==(o=Ee.call(this._minWeekdaysParse,r))?o:null:"ddd"===t?-1!==(o=Ee.call(this._shortWeekdaysParse,r))?o:-1!==(o=Ee.call(this._weekdaysParse,r))?o:-1!==(o=Ee.call(this._minWeekdaysParse,r))?o:null:-1!==(o=Ee.call(this._minWeekdaysParse,r))?o:-1!==(o=Ee.call(this._weekdaysParse,r))?o:-1!==(o=Ee.call(this._shortWeekdaysParse,r))?o:null}var Je=he;var et=he;var tt=he;function it(){function e(e,t){return t.length-e.length}var t,i,n,o,s,r=[],a=[],h=[],d=[];for(t=0;t<7;t++)i=f([2e3,1]).day(t),n=this.weekdaysMin(i,""),o=this.weekdaysShort(i,""),s=this.weekdays(i,""),r.push(n),a.push(o),h.push(s),d.push(n),d.push(o),d.push(s);for(r.sort(e),a.sort(e),h.sort(e),d.sort(e),t=0;t<7;t++)a[t]=ce(a[t]),h[t]=ce(h[t]),d[t]=ce(d[t]);this._weekdaysRegex=new RegExp("^("+d.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+h.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+r.join("|")+")","i")}function nt(){return this.hours()%12||12}function ot(e,t){W(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function st(e,t){return t._meridiemParse}W("H",["HH",2],0,"hour"),W("h",["hh",2],0,nt),W("k",["kk",2],0,function(){return this.hours()||24}),W("hmm",0,0,function(){return""+nt.apply(this)+B(this.minutes(),2)}),W("hmmss",0,0,function(){return""+nt.apply(this)+B(this.minutes(),2)+B(this.seconds(),2)}),W("Hmm",0,0,function(){return""+this.hours()+B(this.minutes(),2)}),W("Hmmss",0,0,function(){return""+this.hours()+B(this.minutes(),2)+B(this.seconds(),2)}),ot("a",!0),ot("A",!1),F("hour","h"),R("hour",13),le("a",st),le("A",st),le("H",Q),le("h",Q),le("k",Q),le("HH",Q,Z),le("hh",Q,Z),le("kk",Q,Z),le("hmm",J),le("hmmss",ee),le("Hmm",J),le("Hmmss",ee),pe(["H","HH"],_e),pe(["k","kk"],function(e,t,i){var n=k(e);t[_e]=24===n?0:n}),pe(["a","A"],function(e,t,i){i._isPm=i._locale.isPM(e),i._meridiem=e}),pe(["h","hh"],function(e,t,i){t[_e]=k(e),p(i).bigHour=!0}),pe("hmm",function(e,t,i){var n=e.length-2;t[_e]=k(e.substr(0,n)),t[we]=k(e.substr(n)),p(i).bigHour=!0}),pe("hmmss",function(e,t,i){var n=e.length-4,o=e.length-2;t[_e]=k(e.substr(0,n)),t[we]=k(e.substr(n,2)),t[ke]=k(e.substr(o)),p(i).bigHour=!0}),pe("Hmm",function(e,t,i){var n=e.length-2;t[_e]=k(e.substr(0,n)),t[we]=k(e.substr(n))}),pe("Hmmss",function(e,t,i){var n=e.length-4,o=e.length-2;t[_e]=k(e.substr(0,n)),t[we]=k(e.substr(n,2)),t[ke]=k(e.substr(o))});var rt,at=Ce("Hours",!0),ht={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:Ye,monthsShort:Re,week:{dow:0,doy:6},weekdays:Xe,weekdaysMin:Ke,weekdaysShort:$e,meridiemParse:/[ap]\.?m?\.?/i},dt={},lt={};function ut(e){return e?e.toLowerCase().replace("_","-"):e}function ct(e){var t=null;if(!dt[e]&&Ji&&Ji.exports)try{t=rt._abbr;var i=en;i("./locale/"+e),ft(t)}catch(e){}return dt[e]}function ft(e,t){var i;return e&&((i=s(t)?vt(e):pt(e,t))?rt=i:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),rt._abbr}function pt(e,t){if(null===t)return delete dt[e],null;var i,n=ht;if(t.abbr=e,null!=dt[e])O("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),n=dt[e]._config;else if(null!=t.parentLocale)if(null!=dt[t.parentLocale])n=dt[t.parentLocale]._config;else{if(null==(i=ct(t.parentLocale)))return lt[t.parentLocale]||(lt[t.parentLocale]=[]),lt[t.parentLocale].push({name:e,config:t}),null;n=i._config}return dt[e]=new C(T(n,t)),lt[e]&<[e].forEach(function(e){pt(e.name,e.config)}),ft(e),dt[e]}function vt(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return rt;if(!r(e)){if(t=ct(e))return t;e=[e]}return function(e){var t,i,n,o,s=0;for(;s=t&&x(o,i,!0)>=t-1)break;t--}s++}return rt}(e)}function gt(e){var t,i=e._a;return i&&-2===p(e).overflow&&(t=i[ye]<0||11Ne(i[me],i[ye])?be:i[_e]<0||24qe(i,s,r)?p(e)._overflowWeeks=!0:null!=h?p(e)._overflowWeekday=!0:(a=Ue(i,n,o,s,r),e._a[me]=a.year,e._dayOfYear=a.dayOfYear)}(e),null!=e._dayOfYear&&(s=mt(e._a[me],n[me]),(e._dayOfYear>Me(s)||0===e._dayOfYear)&&(p(e)._overflowDayOfYear=!0),i=We(s,0,e._dayOfYear),e._a[ye]=i.getUTCMonth(),e._a[be]=i.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=r[t]=n[t];for(;t<7;t++)e._a[t]=r[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[_e]&&0===e._a[we]&&0===e._a[ke]&&0===e._a[xe]&&(e._nextDay=!0,e._a[_e]=0),e._d=(e._useUTC?We:function(e,t,i,n,o,s,r){var a;e<100&&0<=e?(a=new Date(e+400,t,i,n,o,s,r),isFinite(a.getFullYear())&&a.setFullYear(e)):a=new Date(e,t,i,n,o,s,r);return a}).apply(null,r),o=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[_e]=24),e._w&&void 0!==e._w.d&&e._w.d!==o&&(p(e).weekdayMismatch=!0)}}var bt=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,_t=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,wt=/Z|[+-]\d\d(?::?\d\d)?/,kt=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],xt=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],St=/^\/?Date\((\-?\d+)/i;function Dt(e){var t,i,n,o,s,r,a=e._i,h=bt.exec(a)||_t.exec(a);if(h){for(p(e).iso=!0,t=0,i=kt.length;ti.valueOf():i.valueOf()this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},yi.isLocal=function(){return!!this.isValid()&&!this._isUTC},yi.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},yi.isUtc=Gt,yi.isUTC=Gt,yi.zoneAbbr=function(){return this._isUTC?"UTC":""},yi.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},yi.dates=e("dates accessor is deprecated. Use date instead.",ci),yi.months=e("months accessor is deprecated. Use month instead",Ae),yi.years=e("years accessor is deprecated. Use year instead",Te),yi.zone=e("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",function(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}),yi.isDSTShifted=e("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",function(){if(!s(this._isDSTShifted))return this._isDSTShifted;var e={};if(y(e,this),(e=Pt(e))._a){var t=e._isUTC?f(e._a):Nt(e._a);this._isDSTShifted=this.isValid()&&0a;a++)t[n+a]=i[a];return t||h(i)}function m(e){return e instanceof Number||"number"==typeof e}function y(e){if(e)for(;!0===e.hasChildNodes();){var t=e.firstChild;t&&(y(t),e.removeChild(t))}}function f(e){return e instanceof String||"string"==typeof e}function _(e){return"object"===n(e)&&null!==e}function v(e){if(e instanceof Date)return!0;if(f(e)){var t=Dd.exec(e);if(t)return!0;if(!isNaN(Date.parse(e)))return!0}return!1}function w(e){return fd.isMoment(e)}function x(e,t,o,n){var i=!1;!0===n&&(i=null===t[o]&&e[o]!==void 0),i?delete e[o]:e[o]=t[o]}function S(e,t){var o=!!(2o.indexOf(e)})),e.className=o.join(" ")}function B(e,t){var o=e.className.split(" "),n=t.split(" ");o=o.filter(function(e){return 0>n.indexOf(e)}),e.className=o.join(" ")}function L(e,t){if(Array.isArray(e))for(var o=e.length,n=0;nt(n,e[a-1]);a--)e[a]=e[a-1];e[a]=n}return e}function ce(e,t,o){var i=3a;){if(u=ko(.5*(s+d)),r=e[wo(0,u-1)][o],l=e[u][o],c=e[xo(e.length-1,u+1)][o],0==i(l,t))return u;if(0>i(r,t)&&0i(l,t)&&0i(l,t)?d=u+1:s=u-1,a++}return-1}function he(){var e=document.createElement("p");e.style.width="100%",e.style.height="200px";var t=document.createElement("div");t.style.position="absolute",t.style.top="0px",t.style.left="0px",t.style.visibility="hidden",t.style.width="200px",t.style.height="150px",t.style.overflow="hidden",t.appendChild(e),document.body.appendChild(t);var o=e.offsetWidth;t.style.overflow="scroll";var n=e.offsetWidth;return o==n&&(n=t.clientWidth),document.body.removeChild(t),o-n}function ge(e,t){var o;Array.isArray(t)||(t=[t]);var n=!0,a=!1,d=void 0;try{for(var s=e[Symbol.iterator](),r,l;!(n=(r=s.next()).done);n=!0)if(l=r.value,l){o=l[t[0]];for(var c=1;ca;a++)t[n+a]=i[a];return t||xe(i)}function Oe(e){return Oe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Oe(e)}function De(){throw new Error("Dynamic requires are not currently supported by rollup-plugin-commonjs")}function Te(e,t){return t={exports:{}},e(t,t.exports),t.exports}function Ee(e){return e instanceof Number||"number"==typeof e}function Ce(e){return e instanceof String||"string"==typeof e}function Me(e){return os.isMoment(e)}function Ie(e,t){var o;if(void 0!==e){if(null===e)return null;if(!t)return e;if("string"!=typeof t&&!(t instanceof String))throw new Error("Type must be a string");switch(t){case"boolean":case"Boolean":return!!e;case"number":case"Number":return Ce(e)&&!isNaN(Date.parse(e))?os(e).valueOf():+e.valueOf();case"string":case"String":return e+"";case"Date":if(Ee(e))return new Date(e);if(e instanceof Date)return new Date(e.valueOf());if(Me(e))return new Date(e.valueOf());if(Ce(e))return o=us.exec(e),o?new Date(+o[1]):os(new Date(e)).toDate();throw new Error("Cannot convert object of type "+Pe(e)+" to type Date");case"Moment":if(Ee(e))return os(e);if(e instanceof Date)return os(e.valueOf());if(Me(e))return os(e);if(Ce(e))return o=us.exec(e),o?os(+o[1]):os(e);throw new Error("Cannot convert object of type "+Pe(e)+" to type Date");case"ISODate":if(Ee(e))return new Date(e);if(e instanceof Date)return e.toISOString();if(Me(e))return e.toDate().toISOString();if(Ce(e))return o=us.exec(e),o?new Date(+o[1]).toISOString():os(e).format();throw new Error("Cannot convert object of type "+Pe(e)+" to type ISODate");case"ASPDate":if(Ee(e))return"/Date("+e+")/";if(e instanceof Date)return"/Date("+e.valueOf()+")/";if(Ce(e)){o=us.exec(e);var n;return n=o?new Date(+o[1]).valueOf():new Date(e).valueOf(),"/Date("+n+")/"}throw new Error("Cannot convert object of type "+Pe(e)+" to type ASPDate");default:throw new Error("Unknown type ".concat(t));}}}function Pe(e){var t=Oe(e);return"object"===t?null===e?"null":e instanceof Boolean?"Boolean":e instanceof Number?"Number":e instanceof String?"String":Array.isArray(e)?"Array":e instanceof Date?"Date":"Object":"number"===t?"Number":"boolean"===t?"Boolean":"string"===t?"String":void 0===t?"undefined":t}function Fe(e){return"string"==typeof e||"number"==typeof e}function Ne(e){if(Array.isArray(e)){for(var t=0,o=Array(e.length);t"===Es||"--"===Es;){var o=Es,n;$e();var i=et(e);if(i)n=i;else{if(Cs!=xs.IDENTIFIER)throw dt("Identifier or subgraph expected");n=Es,qe(e,{id:n}),$e()}var a=it(),d=Ze(e,t,n,o,a);Xe(e,d),t=n}}function it(){for(var e=null,t={dashed:!0,solid:!1,dotted:[1,5]},o={dot:"circle",box:"box",crow:"crow",curve:"curve",icurve:"inv_curve",normal:"triangle",inv:"inv_triangle",diamond:"diamond",tee:"bar",vee:"vee"},n=[],a=[],d;"["===Es;){for($e(),e={};""!==Es&&"]"!=Es;){if(Cs!=xs.IDENTIFIER)throw dt("Attribute name expected");var s=Es;if($e(),"="!=Es)throw dt("Equal sign = expected");if($e(),Cs!=xs.IDENTIFIER)throw dt("Attribute value expected");var r=Es;"style"===s&&(r=t[r]);var l;"arrowhead"===s&&(l=o[r],s="arrows",r={to:{enabled:!0,type:l}}),"arrowtail"===s&&(l=o[r],s="arrows",r={from:{enabled:!0,type:l}}),n.push({attr:e,name:s,value:r}),a.push(s),$e(),","==Es&&$e()}if("]"!=Es)throw dt("Bracket ] expected");$e()}if(a.includes("dir")){var c={arrows:{}};for(d=0;d=Us(t)?0>e?2:4:0>t?8:16}function Tt(e,t){var o=t.center,n=e.offsetDelta||{},i=e.prevDelta||{},a=e.prevInput||{};(t.eventType===1||a.eventType===4)&&(i=e.prevDelta={x:a.deltaX||0,y:a.deltaY||0},n=e.offsetDelta={x:o.x,y:o.y}),t.deltaX=i.x+(o.x-n.x),t.deltaY=i.y+(o.y-n.y)}function Et(e,t,o){return{x:t/e||0,y:o/e||0}}function Ct(e,t){return St(t[0],t[1],_r)/St(e[0],e[1],_r)}function Mt(e,t){return Ot(t[1],t[0],_r)+Ot(e[1],e[0],_r)}function It(e,t){var o=e.lastInterval||t,n=t.timeStamp-o.timeStamp,i,a,d,s;if(t.eventType!==8&&(n>25||o.velocity===void 0)){var r=t.deltaX-o.deltaX,l=t.deltaY-o.deltaY,c=Et(n,r,l);a=c.x,d=c.y,i=Us(c.x)>Us(c.y)?c.x:c.y,s=Dt(r,l),e.lastInterval=t}else i=o.velocity,a=o.velocityX,d=o.velocityY,s=o.direction;t.velocity=i,t.velocityX=a,t.velocityY=d,t.direction=s}function Pt(e,t){var o=e.session,n=t.pointers,i=n.length;o.firstInput||(o.firstInput=xt(t)),1Us(l.y)?l.x:l.y,t.scale=d?Ct(d.pointers,n):1,t.rotation=d?Mt(d.pointers,n):0,t.maxPointers=o.prevInput?t.pointers.length>o.prevInput.maxPointers?t.pointers.length:o.prevInput.maxPointers:t.pointers.length,It(o,t);var c=e.element;kt(t.srcEvent.target,c)&&(c=t.srcEvent.target),t.target=c}function Ft(e,t,o){var n=o.pointers.length,i=o.changedPointers.length,a=t&1&&0==n-i;o.isFirst=!!a,o.isFinal=!!(t&12&&0==n-i),a&&(e.session={}),o.eventType=t,Pt(e,o),e.emit("hammer.input",o),e.recognize(o),e.session.prevInput=o}function Nt(e){return e.trim().split(/\s+/g)}function Yt(e,t,o){ft(Nt(t),function(t){e.addEventListener(t,o,!1)})}function Rt(e,t,o){ft(Nt(t),function(t){e.removeEventListener(t,o,!1)})}function zt(e){var t=e.ownerDocument||e;return t.defaultView||t.parentWindow||window}function Bt(e,t,o){if(e.indexOf&&!o)return e.indexOf(t);for(var n=0;nBt(a,s)&&n.push(e[d]),a[d]=s,d++;return o&&(t?n=n.sort(function(e,o){return e[t]>o[t]}):n=n.sort()),n}function Ht(e,t){var o=Lt(e.touches),n=this.targetIds;if(3&t&&1===o.length)return n[o[0].identifier]=!0,[o,o];var a=Lt(e.changedTouches),d=[],s=this.target,r,l;if(l=o.filter(function(e){return kt(e.target,s)}),1===t)for(r=0;r\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",a=window.console&&(window.console.warn||window.console.log);return a&&a.call(window.console,"DEPRECATED METHOD: "+o+"\n"+n+" AT \n",e),t.apply(this,arguments)}}function to(e,t,o){var n=t.prototype,i;i=e.prototype=Object.create(n),i.constructor=e,i._super=n,o&&As(i,o)}function oo(e,t){return function(){return e.apply(t,arguments)}}function no(e){this.active=!1,this.dom={container:e},this.dom.overlay=document.createElement("div"),this.dom.overlay.className="vis-overlay",this.dom.container.appendChild(this.dom.overlay),this.hammer=ol(this.dom.overlay),this.hammer.on("tap",this._onTapOverlay.bind(this));var t=this;["tap","doubletap","press","pinch","pan","panstart","panmove","panend"].forEach(function(e){t.hammer.on(e,function(e){e.stopPropagation()})}),document&&document.body&&(this.onClick=function(o){io(o.target,e)||t.deactivate()},document.body.addEventListener("click",this.onClick)),this.keycharm!==void 0&&this.keycharm.destroy(),this.keycharm=zs(),this.escListener=this.deactivate.bind(this)}function io(e,t){for(;e;){if(e===t)return!0;e=e.parentNode}return!1}function ao(e,t){for(var o=0,n;oe?wo(e+t,0):xo(e,t)},wn=Eo("keys"),xn=function(e){return wn[e]||(wn[e]=Mo(e))},Sn=function(e){return function(t,o,n){var i=bn(t),a=vn(i.length),d=kn(n,a),s;if(e&&o!=o){for(;a>d;)if(s=i[d++],s!=s)return!0;}else for(;a>d;d++)if((e||d in i)&&i[d]===o)return e||d||0;return!e&&-1}}(!1),On=xn("IE_PROTO"),Dn=function(e,t){var o=bn(e),n=0,a=[],d;for(d in o)d!=On&&Xo(o,d)&&a.push(d);for(;t.length>n;)Xo(o,d=t[n++])&&(~Sn(a,d)||a.push(d));return a},Tn=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],En=Object.keys||function(e){return Dn(e,Tn)},Cn=Object.getOwnPropertySymbols,Mn={f:Cn},In={}.propertyIsEnumerable,Pn={f:In},Fn=function(e){var t=En(e),o=Mn.f;if(o)for(var n=o(e),a=Pn.f,d=0,s;n.length>d;)a.call(e,s=n[d++])&&t.push(s);return t},Nn=Array.isArray||function(e){return"Array"==mn(e)},Yn=function(e){return Object(fn(e))},Rn=Ro?Object.defineProperties:function(e,t){No(e);for(var o=En(t),n=o.length,a=0,d;n>a;)Uo.f(e,d=o[a++],t[d]);return e},zn=Oo.document,Bn=zn&&zn.documentElement,Ln=xn("IE_PROTO"),An=function(){},Hn="prototype",jn=function(){var e=Lo("iframe"),t=Tn.length,o="<",n=">",a;for(e.style.display="none",Bn.appendChild(e),e.src="javascript:",a=e.contentWindow.document,a.open(),a.write(o+"script"+n+"document.F=Object"+o+"/script"+n),a.close(),jn=a.F;t--;)delete jn[Hn][Tn[t]];return jn()},Wn=Object.create||function(e,t){var o;return null===e?o=jn():(An[Hn]=No(e),o=new An,An[Hn]=null,o[Ln]=e),void 0===t?o:Rn(o,t)},Un=Tn.concat("length","prototype"),Vn=Object.getOwnPropertyNames||function(e){return Dn(e,Un)},Gn={f:Vn},qn=Gn.f,Xn={}.toString,Zn="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],$n=function(e){try{return qn(e)}catch(t){return Zn.slice()}},Kn={f:function(e){return Zn&&"[object Window]"==Xn.call(e)?$n(e):qn(bn(e))}},Qn=Object.getOwnPropertyDescriptor,Jn=Ro?Qn:function(e,t){if(e=bn(e),t=Ho(t,!0),Ao)try{return Qn(e,t)}catch(t){}return Xo(e,t)?Zo(!Pn.f.call(e,t),e[t]):void 0},ei={f:Jn},ti=an.KEY,oi=ei.f,ni=Uo.f,ii=Kn.f,ai=Oo.Symbol,di=Oo.JSON,si=di&&di.stringify,ri="prototype",li=Io("_hidden"),ci=Io("toPrimitive"),ui={}.propertyIsEnumerable,pi=Eo("symbol-registry"),hi=Eo("symbols"),gi=Eo("op-symbols"),mi=Object[ri],yi="function"==typeof ai&&!!Mn.f,fi=Oo.QObject,bi=!fi||!fi[ri]||!fi[ri].findChild,_i=Ro&&Yo(function(){return 7!=Wn(ni({},"a",{get:function(){return ni(this,"a",{value:7}).a}})).a})?function(e,t,o){var n=oi(mi,t);n&&delete mi[t],ni(e,t,o),n&&e!==mi&&ni(mi,t,n)}:ni,vi=function(e){var t=hi[e]=Wn(ai[ri]);return t._k=e,t},ki=yi&&"symbol"==typeof ai.iterator?function(e){return"symbol"==typeof e}:function(e){return e instanceof ai},wi=function(e,t,o){return e===mi&&wi(gi,t,o),No(e),t=Ho(t,!0),No(o),Xo(hi,t)?(o.enumerable?(Xo(e,li)&&e[li][t]&&(e[li][t]=!1),o=Wn(o,{enumerable:Zo(0,!1)})):(!Xo(e,li)&&ni(e,li,Zo(1,{})),e[li][t]=!0),_i(e,t,o)):ni(e,t,o)},xi=function(e,t){No(e);for(var o=Fn(t=bn(t)),n=0,a=o.length,d;a>n;)wi(e,d=o[n++],t[d]);return e},Si=function(e){var t=ui.call(this,e=Ho(e,!0));return(this!==mi||!Xo(hi,e)||Xo(gi,e))&&(!(t||!Xo(this,e)||!Xo(hi,e)||Xo(this,li)&&this[li][e])||t)},Oi=function(e,t){if(e=bn(e),t=Ho(t,!0),e!==mi||!Xo(hi,t)||Xo(gi,t)){var o=oi(e,t);return o&&Xo(hi,t)&&!(Xo(e,li)&&e[li][t])&&(o.enumerable=!0),o}},Di=function(e){for(var t=ii(bn(e)),o=[],n=0,a;t.length>n;)Xo(hi,a=t[n++])||a==li||a==ti||o.push(a);return o},Ti=function(e){for(var t=e===mi,o=ii(t?gi:bn(e)),n=[],a=0,d;o.length>a;)Xo(hi,d=o[a++])&&(!t||Xo(mi,d))&&n.push(hi[d]);return n};yi||(ai=function(){if(this instanceof ai)throw TypeError("Symbol is not a constructor!");var e=Mo(0Ci;)Io(Ei[Ci++]);for(var Mi=En(Io.store),Ii=0;Mi.length>Ii;)Go(Mi[Ii++]);nn(nn.S+nn.F*!yi,"Symbol",{for:function(e){return Xo(pi,e+="")?pi[e]:pi[e]=ai(e)},keyFor:function(e){if(!ki(e))throw TypeError(e+" is not a symbol!");for(var t in pi)if(pi[t]===e)return t},useSetter:function(){bi=!0},useSimple:function(){bi=!1}}),nn(nn.S+nn.F*!yi,"Object",{create:function(e,t){return t===void 0?Wn(e):xi(Wn(e),t)},defineProperty:wi,defineProperties:xi,getOwnPropertyDescriptor:Oi,getOwnPropertyNames:Di,getOwnPropertySymbols:Ti});var Pi=Yo(function(){Mn.f(1)});nn(nn.S+nn.F*Pi,"Object",{getOwnPropertySymbols:function(e){return Mn.f(Yn(e))}}),di&&nn(nn.S+nn.F*(!yi||Yo(function(){var e=ai();return"[null]"!=si([e])||"{}"!=si({a:e})||"{}"!=si(Object(e))})),"JSON",{stringify:function(e){for(var t=[e],o=1,n,a;arguments.length>o;)t.push(arguments[o++]);if(a=n=t[1],(Fo(n)||void 0!==e)&&!ki(e))return Nn(n)||(n=function(e,t){if("function"==typeof a&&(t=a.call(this,e,t)),!ki(t))return t}),t[1]=n,si.apply(di,t)}}),ai[ri][ci]||$o(ai[ri],ci,ai[ri].valueOf),hn(ai,"Symbol"),hn(Math,"Math",!0),hn(Oo.JSON,"JSON",!0);(function(e,t){var o=(Do.Object||{})[e]||Object[e],n={};n[e]=t(o),nn(nn.S+nn.F*Yo(function(){o(1)}),"Object",n)})("keys",function(){return function(e){return En(Yn(e))}});var Fi=function(){var e=No(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t};Ro&&"g"!=/./g.flags&&Uo.f(RegExp.prototype,"flags",{configurable:!0,get:Fi});var Ni=/./.toString,Yi=function(e){Qo(RegExp.prototype,"toString",e,!0)};Yo(function(){return"/a/b"!=Ni.call({source:"a",flags:"b"})})?Yi(function(){var e=No(this);return"/".concat(e.source,"/","flags"in e?e.flags:!Ro&&e instanceof RegExp?Fi.call(e):void 0)}):Ni.name!="toString"&&Yi(function(){return Ni.call(this)});var Ri=function(e){return function(t,o){var n=fn(t)+"",d=_n(o),i=n.length,s,r;return 0>d||d>=i?e?"":void 0:(s=n.charCodeAt(d),55296>s||56319(r=n.charCodeAt(d+1))||57343")}),Qi=function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var o="ab".split(e);return 2===o.length&&"a"===o[0]&&"b"===o[1]}(),Ji=function(e,t,o){var n=Io(e),i=!Yo(function(){var t={};return t[n]=function(){return 7},7!=""[e](t)}),a=i?!Yo(function(){var t=!1,o=/a/;return o.exec=function(){return t=!0,null},"split"===e&&(o.constructor={},o.constructor[$i]=function(){return o}),o[n](""),!t}):void 0;if(!i||!a||"replace"===e&&!Ki||"split"===e&&!Qi){var d=/./[n],s=o(fn,n,""[e],function(e,t,o,n,a){return t.exec===Zi?i&&!a?{done:!0,value:d.call(t,o,n)}:{done:!0,value:e.call(o,t,n)}:{done:!1}}),r=s[0],l=s[1];Qo(String.prototype,e,r),$o(RegExp.prototype,n,2==t?function(e,t){return l.call(e,this,t)}:function(e){return l.call(e,this)})}},ea=/\$([$&`']|\d\d?|<[^>]*>)/g,ta=/\$([$&`']|\d\d?)/g,oa=function(e){return e===void 0?e:e+""};Ji("replace",2,function(e,t,o,n){function a(e,t,i,a,d,s){var r=i+e.length,l=a.length,n=ta;return void 0!==d&&(d=Yn(d),n=ea),o.call(s,n,function(o,s){var c;switch(s.charAt(0)){case"$":return"$";case"&":return e;case"`":return t.slice(0,i);case"'":return t.slice(r);case"<":c=d[s.slice(1,-1)];break;default:var u=+s;if(0==u)return o;if(u>l){var n=ko(u/10);return 0===n?o:n<=l?void 0===a[n-1]?s.charAt(1):a[n-1]+s.charAt(1):o}c=a[u-1];}return void 0===c?"":c})}return[function(n,i){var a=e(this),d=n==null?void 0:n[t];return d===void 0?o.call(a+"",n,i):d.call(n,a,i)},function(e,t){var d=n(o,e,this,t);if(d.done)return d.value;var s=No(e),r=this+"",l="function"==typeof t;l||(t=t+"");var c=s.global;if(c){var u=s.unicode;s.lastIndex=0}for(var p=[],h;(h=ji(s,r),null!==h)&&!(p.push(h),!c);){var g=h[0]+"";""==g&&(s.lastIndex=at(r,vn(s.lastIndex),u))}for(var m="",y=0,f=0;f=y&&(m+=r.slice(y,_)+S,y=_+b.length)}return m+r.slice(y)}]});var na=Io("unscopables"),ia=Array.prototype;ia[na]==null&&$o(ia,na,{});var aa=function(e){ia[na][e]=!0},da=function(e,t){return{value:t,done:!!e}},sa={},ra={};$o(ra,Io("iterator"),function(){return this});var la=function(e,t,o){e.prototype=Wn(ra,{next:Zo(1,o)}),hn(e,t+" Iterator")},ca=xn("IE_PROTO"),ua=Object.prototype,pa=Object.getPrototypeOf||function(e){return e=Yn(e),Xo(e,ca)?e[ca]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?ua:null},ha=Io("iterator"),ga=!([].keys&&"next"in[].keys()),ma="keys",ya="values",fa=function(){return this},ba=function(e,t,o,n,i,a,d){la(o,t,n);var s=function(e){return!ga&&e in u?u[e]:e===ma?function(){return new o(this,e)}:e===ya?function(){return new o(this,e)}:function(){return new o(this,e)}},r=t+" Iterator",l=i==ya,c=!1,u=e.prototype,p=u[ha]||u["@@iterator"]||i&&u[i],h=p||s(i),g=i?l?s("entries"):h:void 0,m="Array"==t?u.entries||p:p,y,f,b;if(m&&(b=pa(m.call(new e)),b!==Object.prototype&&b.next&&(hn(b,r,!0),"function"!=typeof b[ha]&&$o(b,ha,fa))),l&&p&&p.name!==ya&&(c=!0,h=function(){return p.call(this)}),(ga||c||!u[ha])&&$o(u,ha,h),sa[t]=h,sa[r]=fa,i)if(y={values:l?h:s(ya),keys:a?h:s(ma),entries:g},d)for(f in y)f in u||Qo(u,f,y[f]);else nn(nn.P+nn.F*(ga||c),t,y);return y},_a=ba(Array,"Array",function(e,t){this._t=bn(e),this._i=0,this._k=t},function(){var e=this._t,t=this._k,o=this._i++;return!e||o>=e.length?(this._t=void 0,da(1)):"keys"==t?da(0,o):"values"==t?da(0,e[o]):da(0,[o,e[o]])},"values");sa.Arguments=sa.Array,aa("keys"),aa("values"),aa("entries");for(var va=Io("iterator"),ka=Io("toStringTag"),wa=sa.Array,xa={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},Sa=En(xa),Oa=0;Oad;)r=n[d++],(!Ro||Ia.call(o,r))&&s.push(e?[r,o[r]]:o[r]);return s}}(!1);nn(nn.S,"Object",{values:function(e){return Pa(e)}});var Fa=Io("match"),Na=function(e){var t;return Fo(e)&&((t=e[Fa])===void 0?"RegExp"==mn(e):!!t)},Ya=Io("species"),Ra=function(e,t){var o=No(e).constructor,n;return o===void 0||(n=No(o)[Ya])==null?t:Jo(n)},za=[].push,Ba="split",La="length",Aa="lastIndex",Ha=4294967295,ja=!Yo(function(){RegExp(Ha,"y")});Ji("split",2,function(e,t,o,n){var a;return a="c"=="abbc"[Ba](/(b)*/)[1]||4!="test"[Ba](/(?:)/,-1)[La]||2!="ab"[Ba](/(?:ab)*/)[La]||4!="."[Ba](/(.?)(.?)/)[La]||1<"."[Ba](/()()/)[La]||""[Ba](/.?/)[La]?function(e,t){var n=this+"";if(void 0===e&&0===t)return[];if(!Na(e))return o.call(n,e,t);for(var i=[],a=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),d=0,s=void 0===t?Ha:t>>>0,r=new RegExp(e.source,a+"g"),l,c,u;(l=Zi.call(r,n))&&(c=r[Aa],!(c>d&&(i.push(n.slice(d,l.index)),1=s)));)r[Aa]===l.index&&r[Aa]++;return d===n[La]?(u||!r.test(""))&&i.push(""):i.push(n.slice(d)),i[La]>s?i.slice(0,s):i}:"0"[Ba](void 0,0)[La]?function(e,t){return void 0===e&&0===t?[]:o.call(this,e,t)}:o,[function(o,n){var i=e(this),d=null==o?void 0:o[t];return void 0===d?a.call(i+"",o,n):d.call(o,i,n)},function(t,d){var s=n(a,t,this,d,a!==o);if(s.done)return s.value;var r=No(t),l=this+"",c=Ra(r,RegExp),u=r.unicode,h=(r.ignoreCase?"i":"")+(r.multiline?"m":"")+(r.unicode?"u":"")+(ja?"y":"g"),g=new c(ja?r:"^(?:"+r.source+")",h),m=void 0===d?Ha:d>>>0;if(0===m)return[];if(0===l.length)return null===ji(g,l)?[l]:[];for(var y=0,f=0,b=[];fn;)for(var d=yn(arguments[n++]),s=i?En(d).concat(i(d)):En(d),r=s.length,l=0,c;r>l;)c=s[l++],(!Ro||a.call(d,c))&&(t[c]=d[c]);return t}:Wa;nn(nn.S+nn.F,"Object",{assign:Ua});var Va=function(e,t){if(No(e),!Fo(t)&&null!==t)throw TypeError(t+": can't set as prototype!")},Ga={set:Object.setPrototypeOf||("__proto__"in{}?function(e,t,o){try{o=en(Function.call,ei.f(Object.prototype,"__proto__").set,2),o(e,[]),t=!(e instanceof Array)}catch(o){t=!0}return function(e,n){return Va(e,n),t?e.__proto__=n:o(e,n),e}}({},!1):void 0),check:Va},qa=Ga.set,Xa=function(e,t,o){var n=t.constructor,i;return n!==o&&"function"==typeof n&&(i=n.prototype)!==o.prototype&&Fo(i)&&qa&&qa(e,i),e},Za="\t\n\x0B\f\r \xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF",$a="["+Za+"]",Ka="\u200B\x85",Qa=RegExp("^"+$a+$a+"*"),Ja=RegExp($a+$a+"*$"),ed=function(e,t,o){var n={},i=Yo(function(){return!!Za[e]()||Ka[e]()!=Ka}),a=n[e]=i?t(td):Za[e];o&&(n[o]=a),nn(nn.P+nn.F*i,"String",n)},td=ed.trim=function(e,t){return e=fn(e)+"",1&t&&(e=e.replace(Qa,"")),2&t&&(e=e.replace(Ja,"")),e},od=Gn.f,nd=ei.f,ad=Uo.f,dd=ed.trim,sd="Number",rd=Oo[sd],ld=rd,cd=rd.prototype,ud=mn(Wn(cd))==sd,pd="trim"in mo,hd=function(e){var t=Ho(e,!1);if("string"==typeof t&&2l||l>d)return NaN;return parseInt(s,a)}}return+t};if(!rd(" 0o1")||!rd("0b1")||rd("+0x1")){rd=function(e){var t=1>arguments.length?0:e,o=this;return o instanceof rd&&(ud?Yo(function(){cd.valueOf.call(o)}):mn(o)!=sd)?Xa(new ld(hd(t)),o,rd):hd(t)};for(var gd=Ro?od(ld):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),md=0,yd;gd.length>md;md++)Xo(ld,yd=gd[md])&&!Xo(rd,yd)&&ad(rd,yd,nd(ld,yd));rd.prototype=cd,cd.constructor=rd,Qo(Oo,sd,rd)}for(var fd=o(function(e){(function(t,o){e.exports=o()})(So,function(){function o(){return Ht.apply(null,arguments)}function n(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function i(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function a(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}function d(e){return void 0===e}function s(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function r(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function l(e,t){var o=[],n;for(n=0;nt.overflow&&!t.empty&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&o);if(e._strict&&(n=n&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour),null==Object.isFrozen||!Object.isFrozen(e))e._isValid=n;else return n}return e._isValid}function y(e){var t=p(NaN);return null==e?g(t).userInvalidated=!0:u(g(t),e),t}function f(e,t){var o,n,a;if(d(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),d(t._i)||(e._i=t._i),d(t._f)||(e._f=t._f),d(t._l)||(e._l=t._l),d(t._strict)||(e._strict=t._strict),d(t._tzm)||(e._tzm=t._tzm),d(t._isUTC)||(e._isUTC=t._isUTC),d(t._offset)||(e._offset=t._offset),d(t._pf)||(e._pf=g(t)),d(t._locale)||(e._locale=t._locale),0e?yo(e)||0:ko(e)}function k(e){var t=+e,o=0;return 0!=t&&isFinite(t)&&(o=v(t)),o}function w(e,t,o){var n=xo(e.length,t.length),a=fo(e.length-t.length),d=0,s;for(s=0;sa;++a)s=p([2e3,a]),this._shortMonthsParse[a]=this.monthsShort(s,"").toLocaleLowerCase(),this._longMonthsParse[a]=this.months(s,"").toLocaleLowerCase();return o?"MMM"===t?(d=No.call(this._shortMonthsParse,n),-1===d?null:d):(d=No.call(this._longMonthsParse,n),-1===d?null:d):"MMM"===t?(d=No.call(this._shortMonthsParse,n),-1!==d)?d:(d=No.call(this._longMonthsParse,n),-1===d?null:d):(d=No.call(this._longMonthsParse,n),-1!==d)?d:(d=No.call(this._shortMonthsParse,n),-1===d?null:d)}function ae(e,t,o){var n,a,d;if(this._monthsParseExact)return ie.call(this,e,t,o);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),n=0;12>n;n++){if(a=p([2e3,n]),o&&!this._longMonthsParse[n]&&(this._longMonthsParse[n]=new RegExp("^"+this.months(a,"").replace(".","")+"$","i"),this._shortMonthsParse[n]=new RegExp("^"+this.monthsShort(a,"").replace(".","")+"$","i")),o||this._monthsParse[n]||(d="^"+this.months(a,"")+"|^"+this.monthsShort(a,""),this._monthsParse[n]=new RegExp(d.replace(".",""),"i")),o&&"MMMM"===t&&this._longMonthsParse[n].test(e))return n;if(o&&"MMM"===t&&this._shortMonthsParse[n].test(e))return n;if(!o&&this._monthsParse[n].test(e))return n}}function de(e,t){var o;if(!e.isValid())return e;if("string"==typeof t)if(/^\d+$/.test(t))t=k(t);else if(t=e.localeData().monthsParse(t),!s(t))return e;return o=xo(e.date(),ne(e.year(),t)),e._d["set"+(e._isUTC?"UTC":"")+"Month"](t,o),e}function se(e){return null==e?J(this,"Month"):(de(this,e),o.updateOffset(this,!0),this)}function re(){function e(e,t){return t.length-e.length}var t=[],o=[],n=[],a,d;for(a=0;12>a;a++)d=p([2e3,a]),t.push(this.monthsShort(d,"")),o.push(this.months(d,"")),n.push(this.months(d,"")),n.push(this.monthsShort(d,""));for(t.sort(e),o.sort(e),n.sort(e),a=0;12>a;a++)t[a]=G(t[a]),o[a]=G(o[a]);for(a=0;24>a;a++)n[a]=G(n[a]);this._monthsRegex=new RegExp("^("+n.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+o.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+t.join("|")+")","i")}function le(e,t,o,n,i,a,d){var s;return 100>e&&0<=e?(s=new Date(e+400,t,o,n,i,a,d),isFinite(s.getFullYear())&&s.setFullYear(e)):s=new Date(e,t,o,n,i,a,d),s}function ce(e){var t;if(100>e&&0<=e){var o=Array.prototype.slice.call(arguments);o[0]=e+400,t=new Date(Date.UTC.apply(null,o)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)}else t=new Date(Date.UTC.apply(null,arguments));return t}function ue(e,t,o){var n=7+t-o,i=(7+ce(e,0,n).getUTCDay()-t)%7;return-i+n-1}function pe(e,t,o,n,i){var a=ue(e,n,i),d=1+7*(t-1)+(7+o-n)%7+a,s,r;return 0>=d?(s=e-1,r=$(s)+d):d>$(e)?(s=e+1,r=d-$(e)):(s=e,r=d),{year:s,dayOfYear:r}}function he(e,t,o){var n=ue(e.year(),t,o),i=ko((e.dayOfYear()-n-1)/7)+1,a,d;return 1>i?(d=e.year()-1,a=i+ge(d,t,o)):i>ge(e.year(),t,o)?(a=i-ge(e.year(),t,o),d=e.year()+1):(d=e.year(),a=i),{week:a,year:d}}function ge(e,t,o){var n=ue(e,t,o),i=ue(e+1,t,o);return($(e)-n+i)/7}function me(e,t){return"string"==typeof e?isNaN(e)?(e=t.weekdaysParse(e),"number"==typeof e?e:null):parseInt(e,10):e}function ye(e,t){return"string"==typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function fe(e,t){return e.slice(t,7).concat(e.slice(0,t))}function be(e,t,o){var n=e.toLocaleLowerCase(),a,d,s;if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],a=0;7>a;++a)s=p([2e3,1]).day(a),this._minWeekdaysParse[a]=this.weekdaysMin(s,"").toLocaleLowerCase(),this._shortWeekdaysParse[a]=this.weekdaysShort(s,"").toLocaleLowerCase(),this._weekdaysParse[a]=this.weekdays(s,"").toLocaleLowerCase();return o?"dddd"===t?(d=No.call(this._weekdaysParse,n),-1===d?null:d):"ddd"===t?(d=No.call(this._shortWeekdaysParse,n),-1===d?null:d):(d=No.call(this._minWeekdaysParse,n),-1===d?null:d):"dddd"===t?(d=No.call(this._weekdaysParse,n),-1!==d)?d:(d=No.call(this._shortWeekdaysParse,n),-1!==d)?d:(d=No.call(this._minWeekdaysParse,n),-1===d?null:d):"ddd"===t?(d=No.call(this._shortWeekdaysParse,n),-1!==d)?d:(d=No.call(this._weekdaysParse,n),-1!==d)?d:(d=No.call(this._minWeekdaysParse,n),-1===d?null:d):(d=No.call(this._minWeekdaysParse,n),-1!==d)?d:(d=No.call(this._weekdaysParse,n),-1!==d)?d:(d=No.call(this._shortWeekdaysParse,n),-1===d?null:d)}function _e(e,t,o){var n,a,d;if(this._weekdaysParseExact)return be.call(this,e,t,o);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),n=0;7>n;n++){if(a=p([2e3,1]).day(n),o&&!this._fullWeekdaysParse[n]&&(this._fullWeekdaysParse[n]=new RegExp("^"+this.weekdays(a,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[n]=new RegExp("^"+this.weekdaysShort(a,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[n]=new RegExp("^"+this.weekdaysMin(a,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[n]||(d="^"+this.weekdays(a,"")+"|^"+this.weekdaysShort(a,"")+"|^"+this.weekdaysMin(a,""),this._weekdaysParse[n]=new RegExp(d.replace(".",""),"i")),o&&"dddd"===t&&this._fullWeekdaysParse[n].test(e))return n;if(o&&"ddd"===t&&this._shortWeekdaysParse[n].test(e))return n;if(o&&"dd"===t&&this._minWeekdaysParse[n].test(e))return n;if(!o&&this._weekdaysParse[n].test(e))return n}}function ve(){function e(e,t){return t.length-e.length}var t=[],o=[],n=[],a=[],d,s,r,l,c;for(d=0;7>d;d++)s=p([2e3,1]).day(d),r=this.weekdaysMin(s,""),l=this.weekdaysShort(s,""),c=this.weekdays(s,""),t.push(r),o.push(l),n.push(c),a.push(r),a.push(l),a.push(c);for(t.sort(e),o.sort(e),n.sort(e),a.sort(e),d=0;7>d;d++)o[d]=G(o[d]),n[d]=G(n[d]),a[d]=G(a[d]);this._weekdaysRegex=new RegExp("^("+a.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+o.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+t.join("|")+")","i")}function ke(){return this.hours()%12||12}function we(e,t){B(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function xe(e,t){return t._meridiemParse}function Se(e){return e?e.toLowerCase().replace("_","-"):e}function Oe(e){for(var t=0,o,n,a,d;t=o&&w(d,n,!0)>=o-1)break;o--}t++}return Ko}function De(o){var n=null;if(!Ho[o]&&!0&&e&&e.exports)try{n=Ko._abbr;t("./locale/"+o),Te(n)}catch(t){}return Ho[o]}function Te(e,t){var o;return e&&(o=d(t)?Ce(e):Ee(e,t),o?Ko=o:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),Ko._abbr}function Ee(e,t){if(null!==t){var o=Ao,n;if(t.abbr=e,null!=Ho[e])O("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),o=Ho[e]._config;else if(null!=t.parentLocale)if(null!=Ho[t.parentLocale])o=Ho[t.parentLocale]._config;else if(n=De(t.parentLocale),null!=n)o=n._config;else return jo[t.parentLocale]||(jo[t.parentLocale]=[]),jo[t.parentLocale].push({name:e,config:t}),null;return Ho[e]=new C(E(o,t)),jo[e]&&jo[e].forEach(function(e){Ee(e.name,e.config)}),Te(e),Ho[e]}return delete Ho[e],null}function Ce(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return Ko;if(!n(e)){if(t=De(e),t)return t;e=[e]}return Oe(e)}function Me(){return Gt(Ho)}function Ie(e){var t=e._a,o;return t&&-2===g(e).overflow&&(o=0>t[1]||11t[2]||t[2]>ne(t[0],t[1])?2:0>t[3]||24t[4]||59t[5]||59t[6]||999o||2$(s)||0===e._dayOfYear)&&(g(e)._overflowDayOfYear=!0),n=ce(s,0,e._dayOfYear),e._a[1]=n.getUTCMonth(),e._a[2]=n.getUTCDate()),o=0;3>o&&null==e._a[o];++o)e._a[o]=t[o]=a[o];for(;7>o;o++)e._a[o]=t[o]=null==e._a[o]?2===o?1:0:e._a[o];24===e._a[3]&&0===e._a[4]&&0===e._a[5]&&0===e._a[6]&&(e._nextDay=!0,e._a[3]=0),e._d=(e._useUTC?ce:le).apply(null,t),d=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[3]=24),e._w&&"undefined"!=typeof e._w.d&&e._w.d!==d&&(g(e).weekdayMismatch=!0)}}function Ye(e){var t,o,n,i,a,d,s,r;if(t=e._w,null!=t.GG||null!=t.W||null!=t.E)a=1,d=4,o=Pe(t.GG,e._a[0],he(Qe(),1,4).year),n=Pe(t.W,1),i=Pe(t.E,1),(1>i||7t.e||6i||6n||n>ge(o,a,d)?g(e)._overflowWeeks=!0:null==r?(s=pe(o,n,i,a,d),e._a[0]=s.year,e._dayOfYear=s.dayOfYear):g(e)._overflowWeekday=!0}function Re(e){var t=e._i,o=Wo.exec(t)||Uo.exec(t),n,a,d,s,r,c;if(o){for(g(e).iso=!0,n=0,a=Go.length;n=t?2e3+t:999>=t?1900+t:t}function Le(e){return e.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function Ae(e,t,o){if(e){var n=zo.indexOf(e),i=new Date(t[0],t[1],t[2]).getDay();if(n!==i)return g(o).weekdayMismatch=!0,o._isValid=!1,!1}return!0}function He(e,t,o){if(e)return $o[e];if(t)return 0;var n=parseInt(o,10),i=n%100;return 60*((n-i)/100)+i}function je(e){var t=Zo.exec(Le(e._i));if(t){var o=ze(t[4],t[3],t[2],t[5],t[6],t[7]);if(!Ae(t[1],o,e))return;e._a=o,e._tzm=He(t[8],t[9],t[10]),e._d=ce.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),g(e).rfc2822=!0}else e._isValid=!1}function We(e){var t=Xo.exec(e._i);if(null!==t)return void(e._d=new Date(+t[1]));if(Re(e),!1===e._isValid)delete e._isValid;else return;if(je(e),!1===e._isValid)delete e._isValid;else return;o.createFromInputFallback(e)}function Ue(e){if(e._f===o.ISO_8601)return void Re(e);if(e._f===o.RFC_2822)return void je(e);e._a=[],g(e).empty=!0;var t=""+e._i,n=t.length,a=0,d,s,r,l,c;for(r=j(e._f,e._locale).match($t)||[],d=0;d=e._a[3]&&!0===g(e).bigHour&&0t&&(t+=12),n||12!==t||(t=0),t):e.meridiemHour(t,o)}function Ge(e){var t,o,n,a,d;if(0===e._f.length)return g(e).invalidFormat=!0,void(e._d=new Date(NaN));for(a=0;ae?-1*ho(-1*e):ho(e)}function it(e,t){B(e,0,0,function(){var e=this.utcOffset(),o="+";return 0>e&&(e=-e,o="-"),o+z(~~(e/60),2)+t+z(~~e%60,2)})}function at(e,t){var o=(t||"").match(e);if(null===o)return null;var n=o[o.length-1]||[],i=(n+"").match(tn)||["-",0,0],a=+(60*i[1])+k(i[2]);return 0===a?0:"+"===i[0]?a:-a}function dt(e,t){var n,i;return t._isUTC?(n=t.clone(),i=(_(e)||r(e)?e.valueOf():Qe(e).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+i),o.updateOffset(n,!1),n):Qe(e).local()}function st(e){return 15*-ho(e._d.getTimezoneOffset()/15)}function rt(){if(!d(this._isDSTShifted))return this._isDSTShifted;var e={};if(f(e,this),e=Ze(e),e._a){var t=e._isUTC?p(e._a):Qe(e._a);this._isDSTShifted=this.isValid()&&0t-n?(i=e.clone().add(o-1,"months"),a=(t-n)/(n-i)):(i=e.clone().add(o+1,"months"),a=(t-n)/(i-n)),-(o+a)||0}function ft(e){var t;return void 0===e?this._locale._abbr:(t=Ce(e),null!=t&&(this._locale=t),this)}function bt(){return this._locale}function _t(e,t){return(e%t+t)%t}function vt(e,t,o){return 100>e&&0<=e?new Date(e+400,t,o)-12622780800000:new Date(e,t,o).valueOf()}function kt(e,t,o){return 100>e&&0<=e?Date.UTC(e+400,t,o)-12622780800000:Date.UTC(e,t,o)}function wt(e,t){B(0,[e,e.length],0,t)}function xt(e,t,o,n,i){var a;return null==e?he(this,n,i).year:(a=ge(e,n,i),t>a&&(t=a),St.call(this,e,t,o,n,i))}function St(e,t,o,n,i){var a=pe(e,t,o,n,i),d=ce(a.year,0,a.dayOfYear);return this.year(d.getUTCFullYear()),this.month(d.getUTCMonth()),this.date(d.getUTCDate()),this}function Ot(e,t){t[6]=k(1e3*("0."+e))}function Dt(e){return e}function Tt(e,t,o,n){var i=Ce(),a=p().set(n,t);return i[o](a,e)}function Et(e,t,o){if(s(e)&&(t=e,e=void 0),e=e||"",null!=t)return Tt(e,t,o,"month");var n=[],a;for(a=0;12>a;a++)n[a]=Tt(e,a,o,"month");return n}function Ct(e,t,o,n){"boolean"==typeof e?(s(t)&&(o=t,t=void 0),t=t||""):(t=e,o=t,e=!1,s(t)&&(o=t,t=void 0),t=t||"");var a=Ce(),d=e?a._week.dow:0;if(null!=o)return Tt(t,(o+d)%7,n,"day");var r=[],l;for(l=0;7>l;l++)r[l]=Tt(t,(l+d)%7,n,"day");return r}function Mt(e,t,o,n){var i=ct(t,o);return e._milliseconds+=n*i._milliseconds,e._days+=n*i._days,e._months+=n*i._months,e._bubble()}function It(e){return 0>e?ko(e):yo(e)}function Pt(e){return 4800*e/146097}function Ft(e){return 146097*e/4800}function Nt(e){return function(){return this.as(e)}}function Yt(e){return function(){return this.isValid()?this._data[e]:NaN}}function Rt(e,t,o,n,i){return i.relativeTime(t||1,!!o,e,n)}function zt(e,t,o){var n=ct(e).abs(),i=Pn(n.as("s")),d=Pn(n.as("m")),s=Pn(n.as("h")),r=Pn(n.as("d")),l=Pn(n.as("M")),c=Pn(n.as("y")),u=i<=Fn.ss&&["s",i]||i=d&&["m"]||d=s&&["h"]||s=r&&["d"]||r=l&&["M"]||l=c&&["y"]||["yy",c];return u[2]=t,u[3]=0<+e,u[4]=o,Rt.apply(null,u)}function Bt(e){return void 0===e?Pn:"function"==typeof e&&(Pn=e,!0)}function Lt(e){return(0e)||+e}function At(){if(!this.isValid())return this.localeData().invalidDate();var e=Nn(this._milliseconds)/1e3,t=Nn(this._days),o=Nn(this._months),n,i,a;n=v(e/60),i=v(n/60),e%=60,n%=60,a=v(o/12),o%=12;var d=a,r=o,l=t,c=i,u=n,p=e?e.toFixed(3).replace(/\.?0+$/,""):"",s=this.asSeconds();if(!s)return"P0D";var h=0>s?"-":"",g=Lt(this._months)===Lt(s)?"":"-",m=Lt(this._days)===Lt(s)?"":"-",y=Lt(this._milliseconds)===Lt(s)?"":"-";return h+"P"+(d?g+d+"Y":"")+(r?g+r+"M":"")+(l?m+l+"D":"")+(c||u||p?"T":"")+(c?y+c+"H":"")+(u?y+u+"M":"")+(p?y+p+"S":"")}var Ht,jt;jt=Array.prototype.some?Array.prototype.some:function(e){for(var o=Object(this),t=o.length>>>0,n=0;n=e?""+e:"+"+e}),B(0,["YY",2],0,function(){return this.year()%100}),B(0,["YYYY",4],0,"year"),B(0,["YYYYY",5],0,"year"),B(0,["YYYYYY",6,!0],0,"year"),P("year","y"),Y("year",1),W("Y",mo),W("YY",ao,to),W("YYYY",co,no),W("YYYYY",uo,io),W("YYYYYY",uo,io),q(["YYYYY","YYYYYY"],To),q("YYYY",function(e,t){t[To]=2===e.length?o.parseTwoDigitYear(e):k(e)}),q("YY",function(e,t){t[To]=o.parseTwoDigitYear(e)}),q("Y",function(e,t){t[To]=parseInt(e,10)}),o.parseTwoDigitYear=function(e){return k(e)+(68this?this:e:y()}),en=["year","quarter","month","week","day","hour","minute","second","millisecond"];it("Z",":"),it("ZZ",""),W("Z",_o),W("ZZ",_o),q(["Z","ZZ"],function(e,t,o){o._useUTC=!0,o._tzm=at(_o,e)});var tn=/([\+\-]|\d\d)/gi;o.updateOffset=function(){};var on=/^(\-|\+)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,nn=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;ct.fn=tt.prototype,ct.invalid=function(){return ct(NaN)};var an=gt(1,"add"),dn=gt(-1,"subtract");o.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",o.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var sn=S("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return void 0===e?this.localeData():this.locale(e)});B(0,["gg",2],0,function(){return this.weekYear()%100}),B(0,["GG",2],0,function(){return this.isoWeekYear()%100}),wt("gggg","weekYear"),wt("ggggg","weekYear"),wt("GGGG","isoWeekYear"),wt("GGGGG","isoWeekYear"),P("weekYear","gg"),P("isoWeekYear","GG"),Y("weekYear",1),Y("isoWeekYear",1),W("G",mo),W("g",mo),W("GG",ao,to),W("gg",ao,to),W("GGGG",co,no),W("gggg",co,no),W("GGGGG",uo,io),W("ggggg",uo,io),X(["gggg","ggggg","GGGG","GGGGG"],function(e,t,o,n){t[n.substr(0,2)]=k(e)}),X(["gg","GG"],function(e,t,n,i){t[i]=o.parseTwoDigitYear(e)}),B("Q",0,"Qo","quarter"),P("quarter","Q"),Y("quarter",7),W("Q",eo),q("Q",function(e,t){t[Eo]=3*(k(e)-1)}),B("D",["DD",2],"Do","date"),P("date","D"),Y("date",9),W("D",ao),W("DD",ao,to),W("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient}),q(["D","DD"],Co),q("Do",function(e,t){t[Co]=k(e.match(ao)[0])});var rn=Q("Date",!0);B("DDD",["DDDD",3],"DDDo","dayOfYear"),P("dayOfYear","DDD"),Y("dayOfYear",4),W("DDD",lo),W("DDDD",oo),q(["DDD","DDDD"],function(e,t,o){o._dayOfYear=k(e)}),B("m",["mm",2],0,"minute"),P("minute","m"),Y("minute",14),W("m",ao),W("mm",ao,to),q(["m","mm"],Io);var ln=Q("Minutes",!1);B("s",["ss",2],0,"second"),P("second","s"),Y("second",15),W("s",ao),W("ss",ao,to),q(["s","ss"],Po);var cn=Q("Seconds",!1);B("S",0,0,function(){return~~(this.millisecond()/100)}),B(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),B(0,["SSS",3],0,"millisecond"),B(0,["SSSS",4],0,function(){return 10*this.millisecond()}),B(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),B(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),B(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),B(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),B(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),P("millisecond","ms"),Y("millisecond",16),W("S",lo,eo),W("SS",lo,to),W("SSS",lo,oo);var un;for(un="SSSS";9>=un.length;un+="S")W(un,po);for(un="S";9>=un.length;un+="S")q(un,Ot);var pn=Q("Milliseconds",!1);B("z",0,0,"zoneAbbr"),B("zz",0,0,"zoneName");var hn=b.prototype;hn.add=an,hn.calendar=function(e,t){var n=e||Qe(),i=dt(n,this).startOf("day"),a=o.calendarFormat(this,i)||"sameElse",d=t&&(D(t[a])?t[a].call(this,n):t[a]);return this.format(d||this.localeData().calendar(a,this,Qe(n)))},hn.clone=function(){return new b(this)},hn.diff=function(e,t,o){var n,i,a;return this.isValid()?(n=dt(e,this),!n.isValid())?NaN:(i=6e4*(n.utcOffset()-this.utcOffset()),t=F(t),(a="year"===t?yt(this,n)/12:"month"===t?yt(this,n):"quarter"===t?yt(this,n)/3:"second"===t?(this-n)/1e3:"minute"===t?(this-n)/6e4:"hour"===t?(this-n)/36e5:"day"===t?(this-n-i)/864e5:"week"===t?(this-n-i)/6048e5:this-n,o?a:v(a))):NaN},hn.endOf=function(e){var t;if(e=F(e),void 0===e||"millisecond"===e||!this.isValid())return this;var n=this._isUTC?kt:vt;return"year"===e?t=n(this.year()+1,0,1)-1:"quarter"===e?t=n(this.year(),this.month()-this.month()%3+3,1)-1:"month"===e?t=n(this.year(),this.month()+1,1)-1:"week"===e?t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1:"isoWeek"===e?t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1:"day"===e||"date"===e?t=n(this.year(),this.month(),this.date()+1)-1:"hour"===e?(t=this._d.valueOf(),t+=3600000-_t(t+(this._isUTC?0:60000*this.utcOffset()),3600000)-1):"minute"===e?(t=this._d.valueOf(),t+=60000-_t(t,60000)-1):"second"===e?(t=this._d.valueOf(),t+=1000-_t(t,1000)-1):void 0,this._d.setTime(t),o.updateOffset(this,!0),this},hn.format=function(e){e||(e=this.isUtc()?o.defaultFormatUtc:o.defaultFormat);var t=H(this,e);return this.localeData().postformat(t)},hn.from=function(e,t){return this.isValid()&&(_(e)&&e.isValid()||Qe(e).isValid())?ct({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},hn.fromNow=function(e){return this.from(Qe(),e)},hn.to=function(e,t){return this.isValid()&&(_(e)&&e.isValid()||Qe(e).isValid())?ct({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},hn.toNow=function(e){return this.to(Qe(),e)},hn.get=function(e){return e=F(e),D(this[e])?this[e]():this},hn.invalidAt=function(){return g(this).overflow},hn.isAfter=function(e,t){var o=_(e)?e:Qe(e);return!!(this.isValid()&&o.isValid())&&(t=F(t)||"millisecond","millisecond"===t?this.valueOf()>o.valueOf():o.valueOf()o.year()||9999=this.year()?"YYYY":"YYYYYY",i=t+"[\")]";return this.format(o+n+"-MM-DD[T]HH:mm:ss.SSS"+i)},hn.toJSON=function(){return this.isValid()?this.toISOString():null},hn.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},hn.unix=function(){return ko(this.valueOf()/1e3)},hn.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},hn.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},hn.year=Fo,hn.isLeapYear=function(){return K(this.year())},hn.weekYear=function(e){return xt.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},hn.isoWeekYear=function(e){return xt.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)},hn.quarter=hn.quarters=function(e){return null==e?yo((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)},hn.month=se,hn.daysInMonth=function(){return ne(this.year(),this.month())},hn.week=hn.weeks=function(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")},hn.isoWeek=hn.isoWeeks=function(e){var t=he(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")},hn.weeksInYear=function(){var e=this.localeData()._week;return ge(this.year(),e.dow,e.doy)},hn.isoWeeksInYear=function(){return ge(this.year(),1,4)},hn.date=rn,hn.day=hn.days=function(e){if(!this.isValid())return null==e?NaN:this;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return null==e?t:(e=me(e,this.localeData()),this.add(e-t,"d"))},hn.weekday=function(e){if(!this.isValid())return null==e?NaN:this;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")},hn.isoWeekday=function(e){if(!this.isValid())return null==e?NaN:this;if(null!=e){var t=ye(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7},hn.dayOfYear=function(e){var t=ho((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")},hn.hour=hn.hours=Lo,hn.minute=hn.minutes=ln,hn.second=hn.seconds=cn,hn.millisecond=hn.milliseconds=pn,hn.utcOffset=function(e,t,n){var i=this._offset||0,a;if(!this.isValid())return null==e?NaN:this;if(null!=e){if("string"!=typeof e)16>fo(e)&&!n&&(e*=60);else if(e=at(_o,e),null===e)return this;return!this._isUTC&&t&&(a=st(this)),this._offset=e,this._isUTC=!0,null!=a&&this.add(a,"m"),i!==e&&(!t||this._changeInProgress?mt(this,ct(e-i,"m"),1,!1):!this._changeInProgress&&(this._changeInProgress=!0,o.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?i:st(this)},hn.utc=function(e){return this.utcOffset(0,e)},hn.local=function(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(st(this),"m")),this},hn.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var e=at(bo,this._i);null==e?this.utcOffset(0,!0):this.utcOffset(e)}return this},hn.hasAlignedHourOffset=function(e){return!!this.isValid()&&(e=e?Qe(e).utcOffset():0,0==(this.utcOffset()-e)%60)},hn.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},hn.isLocal=function(){return!!this.isValid()&&!this._isUTC},hn.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},hn.isUtc=lt,hn.isUTC=lt,hn.zoneAbbr=function(){return this._isUTC?"UTC":""},hn.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},hn.dates=S("dates accessor is deprecated. Use date instead.",rn),hn.months=S("months accessor is deprecated. Use month instead",se),hn.years=S("years accessor is deprecated. Use year instead",Fo),hn.zone=S("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",function(e,t){return null==e?-this.utcOffset():("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this)}),hn.isDSTShifted=S("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",rt);var gn=C.prototype;gn.calendar=M,gn.longDateFormat=I,gn.invalidDate=function(){return this._invalidDate},gn.ordinal=function(e){return this._ordinal.replace("%d",e)},gn.preparse=Dt,gn.postformat=Dt,gn.relativeTime=function(e,t,o,n){var i=this._relativeTime[o];return D(i)?i(e,t,o,n):i.replace(/%d/i,e)},gn.pastFuture=function(e,t){var o=this._relativeTime[0=e&&0>=t&&0>=o||(e+=864e5*It(Ft(o)+t),t=0,o=0),n.milliseconds=e%1e3,i=v(e/1e3),n.seconds=i%60,a=v(i/60),n.minutes=a%60,d=v(a/60),n.hours=d%24,t+=v(d/24),r=v(Pt(t)),o+=r,t-=It(Ft(r)),s=v(o/12),o%=12,n.days=t,n.months=o,n.years=s,this},Yn.clone=function(){return ct(this)},Yn.get=function(e){return e=F(e),this.isValid()?this[e+"s"]():NaN},Yn.milliseconds=On,Yn.seconds=Dn,Yn.minutes=Tn,Yn.hours=En,Yn.days=Cn,Yn.weeks=function(){return v(this.days()/7)},Yn.months=Mn,Yn.years=In,Yn.humanize=function(e){if(!this.isValid())return this.localeData().invalidDate();var t=this.localeData(),o=zt(this,!e,t);return e&&(o=t.pastFuture(+this,o)),t.postformat(o)},Yn.toISOString=At,Yn.toString=At,Yn.toJSON=At,Yn.locale=ft,Yn.localeData=bt,Yn.toIsoString=S("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",At),Yn.lang=sn,B("X",0,0,"unix"),B("x",0,0,"valueOf"),W("x",mo),W("X",vo),q("X",function(e,t,o){o._d=new Date(1e3*parseFloat(e,10))}),q("x",function(e,t,o){o._d=new Date(k(e))}),o.version="2.24.0",function(e){Ht=e}(Qe),o.fn=hn,o.min=function(){var e=[].slice.call(arguments,0);return Je("isBefore",e)},o.max=function(){var e=[].slice.call(arguments,0);return Je("isAfter",e)},o.now=function(){return Date.now?Date.now():+new Date},o.utc=p,o.unix=function(e){return Qe(1e3*e)},o.months=function(e,t){return Et(e,t,"months")},o.isDate=r,o.locale=Te,o.invalid=y,o.duration=ct,o.isMoment=_,o.weekdays=function(e,t,o){return Ct(e,t,o,"weekdays")},o.parseZone=function(){return Qe.apply(null,arguments).parseZone()},o.localeData=Ce,o.isDuration=ot,o.monthsShort=function(e,t){return Et(e,t,"monthsShort")},o.weekdaysMin=function(e,t,o){return Ct(e,t,o,"weekdaysMin")},o.defineLocale=Ee,o.updateLocale=function(e,t){if(null!=t){var o=Ao,n,i;i=De(e),null!=i&&(o=i._config),t=E(o,t),n=new C(t),n.parentLocale=Ho[e],Ho[e]=n,Te(e)}else null!=Ho[e]&&(null==Ho[e].parentLocale?null!=Ho[e]&&delete Ho[e]:Ho[e]=Ho[e].parentLocale);return Ho[e]},o.locales=Me,o.weekdaysShort=function(e,t,o){return Ct(e,t,o,"weekdaysShort")},o.normalizeUnits=F,o.relativeTimeRounding=Bt,o.relativeTimeThreshold=function(e,t){return void 0!==Fn[e]&&(void 0===t?Fn[e]:(Fn[e]=t,"s"===e&&(Fn.ss=t-1),!0))},o.calendarFormat=function(e,t){var o=e.diff(t,"days",!0);return-6>o?"sameElse":-1>o?"lastWeek":0>o?"lastDay":1>o?"sameDay":2>o?"nextDay":7>o?"nextWeek":"sameElse"},o.prototype=hn,o.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},o})}),bd=[],_d=0;256>_d;_d++)bd[_d]=(_d+256).toString(16).substr(1);for(var vd=function(){if("undefined"!=typeof crypto&&crypto.getRandomValues){var e=new Uint8Array(16);return function(){return crypto.getRandomValues(e),e}}var t=Array(16);return function(){for(var e=0,o;16>e;e++)0==(3&e)&&(o=4294967296*Math.random()),t[e]=255&o>>>((3&e)<<3);return t}}(),kd=[],wd=0;256>wd;wd++)kd[wd]=(wd+256).toString(16).substr(1);for(var xd=vd(),Sd=[1|xd[0],xd[1],xd[2],xd[3],xd[4],xd[5]],Od=16383&(xd[6]<<8|xd[7]),Dd=/^\/?Date\((-?\d+)/i,Td=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,Ed=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,Cd=/^rgb\( *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *(1?\d{1,2}|2[0-4]\d|25[0-5]) *\)$/i,Md=/^rgba\( *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *([01]|0?\.\d+) *\)$/i,Id=Object.assign,Pd=Object.values,Fd={asBoolean:function(e,t){return"function"==typeof e&&(e=e()),null==e?t||null:!1!=e},asNumber:function(e,t){return"function"==typeof e&&(e=e()),null==e?t||null:+e||t||null},asString:function(e,t){return"function"==typeof e&&(e=e()),null==e?t||null:e+""},asSize:function(e,t){return"function"==typeof e&&(e=e()),f(e)?e:m(e)?e+"px":t||null},asElement:function(e,t){return"function"==typeof e&&(e=e()),e||t||null}},Nd={split:function(e){var t={};return e.split(";").forEach(function(e){if(""!=e.trim()){var o=e.split(":"),n=o[0].trim(),i=o[1].trim();t[n]=i}}),t},join:function(e){return Object.keys(e).map(function(t){return t+": "+e[t]}).join("; ")}},Yd={linear:function(e){return e},easeInQuad:function(e){return e*e},easeOutQuad:function(e){return e*(2-e)},easeInOutQuad:function(e){return .5>e?2*e*e:-1+(4-2*e)*e},easeInCubic:function(e){return e*e*e},easeOutCubic:function(e){return--e*e*e+1},easeInOutCubic:function(e){return .5>e?4*e*e*e:(e-1)*(2*e-2)*(2*e-2)+1},easeInQuart:function(e){return e*e*e*e},easeOutQuart:function(e){return 1- --e*e*e*e},easeInOutQuart:function(e){return .5>e?8*e*e*e*e:1-8*--e*e*e*e},easeInQuint:function(e){return e*e*e*e*e},easeOutQuint:function(e){return 1+--e*e*e*e*e},easeInOutQuint:function(e){return .5>e?16*e*e*e*e*e:1+16*--e*e*e*e*e}},Rd=Object.freeze({isNumber:m,recursiveDOMDelete:y,isString:f,isObject:_,isDate:v,isMoment:w,fillIfDefined:S,extend:Id,selectiveExtend:O,selectiveDeepExtend:D,selectiveNotDeepExtend:T,deepExtend:E,equalArray:C,convert:M,getType:I,copyAndExtendArray:P,copyArray:F,getAbsoluteLeft:N,getAbsoluteRight:Y,getAbsoluteTop:R,addClassName:z,removeClassName:B,forEach:L,toArray:Pd,updateProperty:A,throttle:H,addEventListener:W,removeEventListener:U,preventDefault:V,getTarget:G,hasParent:q,option:Fd,hexToRGB:X,overrideOpacity:Z,RGBToHex:$,parseColor:K,RGBToHSV:Q,addCssText:J,removeCssText:ee,HSVToRGB:te,HSVToHex:oe,hexToHSV:ne,isValidHex:ie,isValidRGB:ae,isValidRGBA:de,selectiveBridgeObject:se,bridgeObject:re,insertSort:le,mergeOptions:ce,binarySearchCustom:ue,binarySearchValue:pe,easingFunctions:Yd,getScrollBarWidth:he,topMost:ge,randomUUID:g}),zd=Object.freeze({default:Rd,HSVToHex:oe,HSVToRGB:te,RGBToHSV:Q,RGBToHex:$,addClassName:z,addCssText:J,addEventListener:W,binarySearchCustom:ue,binarySearchValue:pe,bridgeObject:re,convert:M,copyAndExtendArray:P,copyArray:F,deepExtend:E,easingFunctions:Yd,equalArray:C,extend:Id,fillIfDefined:S,forEach:L,getAbsoluteLeft:N,getAbsoluteRight:Y,getAbsoluteTop:R,getScrollBarWidth:he,getTarget:G,getType:I,hasParent:q,hexToHSV:ne,hexToRGB:X,insertSort:le,isDate:v,isMoment:w,isNumber:m,isObject:_,isString:f,isValidHex:ie,isValidRGB:ae,isValidRGBA:de,mergeOptions:ce,option:Fd,overrideOpacity:Z,parseColor:K,preventDefault:V,randomUUID:g,recursiveDOMDelete:y,removeClassName:B,removeCssText:ee,removeEventListener:U,selectiveBridgeObject:se,selectiveDeepExtend:D,selectiveExtend:O,selectiveNotDeepExtend:T,throttle:H,toArray:Pd,topMost:ge,updateProperty:A}),Bd=me,Ld=ye(function(e){function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(e)}function o(n){return e.exports="function"==typeof Symbol&&"symbol"===t(Symbol.iterator)?o=function(e){return t(e)}:o=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":t(e)},o(n)}e.exports=o}),Ad=fe,Hd=_e,jd=ve,Wd=ke,Ud=ye(function(e){function t(n){return e.exports=t=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},t(n)}e.exports=t}),Vd=ye(function(e){function t(n,o){return e.exports=t=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},t(n,o)}e.exports=t}),Gd=we,qd=[],Xd=0;256>Xd;Xd++)qd[Xd]=(Xd+256).toString(16).substr(1);for(var Zd=function(){if("undefined"!=typeof crypto&&crypto.getRandomValues){var e=new Uint8Array(16);return function(){return crypto.getRandomValues(e),e}}var t=Array(16);return function(){for(var e=0,o;16>e;e++)0==(3&e)&&(o=4294967296*Math.random()),t[e]=255&o>>>((3&e)<<3);return t}}(),$d=[],Kd=0;256>Kd;Kd++)$d[Kd]=(Kd+256).toString(16).substr(1);for(var Qd=Zd(),Jd=[1|Qd[0],Qd[1],Qd[2],Qd[3],Qd[4],Qd[5]],es=16383&(Qd[6]<<8|Qd[7]),ts="undefined"==typeof globalThis?"undefined"==typeof window?"undefined"==typeof global?"undefined"==typeof self?{}:self:global:window:globalThis,os=Te(function(e){(function(t,o){e.exports=o()})(ts,function(){function t(){return Ht.apply(null,arguments)}function o(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function n(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function i(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}function a(e){return void 0===e}function d(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function s(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function r(e,t){var o=[],n;for(n=0;nt.overflow&&!t.empty&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&o);if(e._strict&&(n=n&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour),null==Object.isFrozen||!Object.isFrozen(e))e._isValid=n;else return n}return e._isValid}function m(e){var t=u(NaN);return null==e?h(t).userInvalidated=!0:c(h(t),e),t}function y(e,t){var o,n,d;if(a(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),a(t._i)||(e._i=t._i),a(t._f)||(e._f=t._f),a(t._l)||(e._l=t._l),a(t._strict)||(e._strict=t._strict),a(t._tzm)||(e._tzm=t._tzm),a(t._isUTC)||(e._isUTC=t._isUTC),a(t._offset)||(e._offset=t._offset),a(t._pf)||(e._pf=h(t)),a(t._locale)||(e._locale=t._locale),0e?yo(e)||0:ko(e)}function v(e){var t=+e,o=0;return 0!=t&&isFinite(t)&&(o=_(t)),o}function k(e,t,o){var n=xo(e.length,t.length),a=fo(e.length-t.length),d=0,s;for(s=0;sa;++a)s=u([2e3,a]),this._shortMonthsParse[a]=this.monthsShort(s,"").toLocaleLowerCase(),this._longMonthsParse[a]=this.months(s,"").toLocaleLowerCase();return o?"MMM"===t?(d=No.call(this._shortMonthsParse,n),-1===d?null:d):(d=No.call(this._longMonthsParse,n),-1===d?null:d):"MMM"===t?(d=No.call(this._shortMonthsParse,n),-1!==d)?d:(d=No.call(this._longMonthsParse,n),-1===d?null:d):(d=No.call(this._longMonthsParse,n),-1!==d)?d:(d=No.call(this._shortMonthsParse,n),-1===d?null:d)}function ie(e,t,o){var n,a,d;if(this._monthsParseExact)return ne.call(this,e,t,o);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),n=0;12>n;n++){if(a=u([2e3,n]),o&&!this._longMonthsParse[n]&&(this._longMonthsParse[n]=new RegExp("^"+this.months(a,"").replace(".","")+"$","i"),this._shortMonthsParse[n]=new RegExp("^"+this.monthsShort(a,"").replace(".","")+"$","i")),o||this._monthsParse[n]||(d="^"+this.months(a,"")+"|^"+this.monthsShort(a,""),this._monthsParse[n]=new RegExp(d.replace(".",""),"i")),o&&"MMMM"===t&&this._longMonthsParse[n].test(e))return n;if(o&&"MMM"===t&&this._shortMonthsParse[n].test(e))return n;if(!o&&this._monthsParse[n].test(e))return n}}function ae(e,t){var o;if(!e.isValid())return e;if("string"==typeof t)if(/^\d+$/.test(t))t=v(t);else if(t=e.localeData().monthsParse(t),!d(t))return e;return o=xo(e.date(),oe(e.year(),t)),e._d["set"+(e._isUTC?"UTC":"")+"Month"](t,o),e}function de(e){return null==e?Q(this,"Month"):(ae(this,e),t.updateOffset(this,!0),this)}function se(){function e(e,t){return t.length-e.length}var t=[],o=[],n=[],a,d;for(a=0;12>a;a++)d=u([2e3,a]),t.push(this.monthsShort(d,"")),o.push(this.months(d,"")),n.push(this.months(d,"")),n.push(this.monthsShort(d,""));for(t.sort(e),o.sort(e),n.sort(e),a=0;12>a;a++)t[a]=V(t[a]),o[a]=V(o[a]);for(a=0;24>a;a++)n[a]=V(n[a]);this._monthsRegex=new RegExp("^("+n.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+o.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+t.join("|")+")","i")}function re(e,t,o,n,i,a,d){var s;return 100>e&&0<=e?(s=new Date(e+400,t,o,n,i,a,d),isFinite(s.getFullYear())&&s.setFullYear(e)):s=new Date(e,t,o,n,i,a,d),s}function le(e){var t;if(100>e&&0<=e){var o=Array.prototype.slice.call(arguments);o[0]=e+400,t=new Date(Date.UTC.apply(null,o)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)}else t=new Date(Date.UTC.apply(null,arguments));return t}function ce(e,t,o){var n=7+t-o,i=(7+le(e,0,n).getUTCDay()-t)%7;return-i+n-1}function ue(e,t,o,n,i){var a=ce(e,n,i),d=1+7*(t-1)+(7+o-n)%7+a,s,r;return 0>=d?(s=e-1,r=Z(s)+d):d>Z(e)?(s=e+1,r=d-Z(e)):(s=e,r=d),{year:s,dayOfYear:r}}function pe(e,t,o){var n=ce(e.year(),t,o),i=ko((e.dayOfYear()-n-1)/7)+1,a,d;return 1>i?(d=e.year()-1,a=i+he(d,t,o)):i>he(e.year(),t,o)?(a=i-he(e.year(),t,o),d=e.year()+1):(d=e.year(),a=i),{week:a,year:d}}function he(e,t,o){var n=ce(e,t,o),i=ce(e+1,t,o);return(Z(e)-n+i)/7}function ge(e,t){return"string"==typeof e?isNaN(e)?(e=t.weekdaysParse(e),"number"==typeof e?e:null):parseInt(e,10):e}function me(e,t){return"string"==typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function ye(e,t){return e.slice(t,7).concat(e.slice(0,t))}function fe(e,t,o){var n=e.toLocaleLowerCase(),a,d,s;if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],a=0;7>a;++a)s=u([2e3,1]).day(a),this._minWeekdaysParse[a]=this.weekdaysMin(s,"").toLocaleLowerCase(),this._shortWeekdaysParse[a]=this.weekdaysShort(s,"").toLocaleLowerCase(),this._weekdaysParse[a]=this.weekdays(s,"").toLocaleLowerCase();return o?"dddd"===t?(d=No.call(this._weekdaysParse,n),-1===d?null:d):"ddd"===t?(d=No.call(this._shortWeekdaysParse,n),-1===d?null:d):(d=No.call(this._minWeekdaysParse,n),-1===d?null:d):"dddd"===t?(d=No.call(this._weekdaysParse,n),-1!==d)?d:(d=No.call(this._shortWeekdaysParse,n),-1!==d)?d:(d=No.call(this._minWeekdaysParse,n),-1===d?null:d):"ddd"===t?(d=No.call(this._shortWeekdaysParse,n),-1!==d)?d:(d=No.call(this._weekdaysParse,n),-1!==d)?d:(d=No.call(this._minWeekdaysParse,n),-1===d?null:d):(d=No.call(this._minWeekdaysParse,n),-1!==d)?d:(d=No.call(this._weekdaysParse,n),-1!==d)?d:(d=No.call(this._shortWeekdaysParse,n),-1===d?null:d)}function be(e,t,o){var n,a,d;if(this._weekdaysParseExact)return fe.call(this,e,t,o);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),n=0;7>n;n++){if(a=u([2e3,1]).day(n),o&&!this._fullWeekdaysParse[n]&&(this._fullWeekdaysParse[n]=new RegExp("^"+this.weekdays(a,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[n]=new RegExp("^"+this.weekdaysShort(a,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[n]=new RegExp("^"+this.weekdaysMin(a,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[n]||(d="^"+this.weekdays(a,"")+"|^"+this.weekdaysShort(a,"")+"|^"+this.weekdaysMin(a,""),this._weekdaysParse[n]=new RegExp(d.replace(".",""),"i")),o&&"dddd"===t&&this._fullWeekdaysParse[n].test(e))return n;if(o&&"ddd"===t&&this._shortWeekdaysParse[n].test(e))return n;if(o&&"dd"===t&&this._minWeekdaysParse[n].test(e))return n;if(!o&&this._weekdaysParse[n].test(e))return n}}function _e(){function e(e,t){return t.length-e.length}var t=[],o=[],n=[],a=[],d,s,r,l,c;for(d=0;7>d;d++)s=u([2e3,1]).day(d),r=this.weekdaysMin(s,""),l=this.weekdaysShort(s,""),c=this.weekdays(s,""),t.push(r),o.push(l),n.push(c),a.push(r),a.push(l),a.push(c);for(t.sort(e),o.sort(e),n.sort(e),a.sort(e),d=0;7>d;d++)o[d]=V(o[d]),n[d]=V(n[d]),a[d]=V(a[d]);this._weekdaysRegex=new RegExp("^("+a.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+o.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+t.join("|")+")","i")}function ve(){return this.hours()%12||12}function ke(e,t){z(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function we(e,t){return t._meridiemParse}function xe(e){return e?e.toLowerCase().replace("_","-"):e}function Se(e){for(var t=0,o,n,a,d;t=o&&k(d,n,!0)>=o-1)break;o--}t++}return Ko}function Oe(t){var o=null;if(!Ho[t]&&!0&&e&&e.exports)try{o=Ko._abbr;De("./locale/"+t),Te(o)}catch(t){}return Ho[t]}function Te(e,t){var o;return e&&(o=a(t)?Ce(e):Ee(e,t),o?Ko=o:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),Ko._abbr}function Ee(e,t){if(null!==t){var o=Ao,n;if(t.abbr=e,null!=Ho[e])S("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),o=Ho[e]._config;else if(null!=t.parentLocale)if(null!=Ho[t.parentLocale])o=Ho[t.parentLocale]._config;else if(n=Oe(t.parentLocale),null!=n)o=n._config;else return jo[t.parentLocale]||(jo[t.parentLocale]=[]),jo[t.parentLocale].push({name:e,config:t}),null;return Ho[e]=new E(T(o,t)),jo[e]&&jo[e].forEach(function(e){Ee(e.name,e.config)}),Te(e),Ho[e]}return delete Ho[e],null}function Ce(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return Ko;if(!o(e)){if(t=Oe(e),t)return t;e=[e]}return Se(e)}function Me(){return Gt(Ho)}function Ie(e){var t=e._a,o;return t&&-2===h(e).overflow&&(o=0>t[1]||11t[2]||t[2]>oe(t[0],t[1])?2:0>t[3]||24t[4]||59t[5]||59t[6]||999o||2Z(s)||0===e._dayOfYear)&&(h(e)._overflowDayOfYear=!0),n=le(s,0,e._dayOfYear),e._a[1]=n.getUTCMonth(),e._a[2]=n.getUTCDate()),o=0;3>o&&null==e._a[o];++o)e._a[o]=t[o]=a[o];for(;7>o;o++)e._a[o]=t[o]=null==e._a[o]?2===o?1:0:e._a[o];24===e._a[3]&&0===e._a[4]&&0===e._a[5]&&0===e._a[6]&&(e._nextDay=!0,e._a[3]=0),e._d=(e._useUTC?le:re).apply(null,t),d=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[3]=24),e._w&&"undefined"!=typeof e._w.d&&e._w.d!==d&&(h(e).weekdayMismatch=!0)}}function Ye(e){var t,o,n,i,a,d,s,r;if(t=e._w,null!=t.GG||null!=t.W||null!=t.E)a=1,d=4,o=Pe(t.GG,e._a[0],pe(Qe(),1,4).year),n=Pe(t.W,1),i=Pe(t.E,1),(1>i||7t.e||6i||6n||n>he(o,a,d)?h(e)._overflowWeeks=!0:null==r?(s=ue(o,n,i,a,d),e._a[0]=s.year,e._dayOfYear=s.dayOfYear):h(e)._overflowWeekday=!0}function Re(e){var t=e._i,o=Wo.exec(t)||Uo.exec(t),n,a,d,s,r,c;if(o){for(h(e).iso=!0,n=0,a=Go.length;n=t?2e3+t:999>=t?1900+t:t}function Le(e){return e.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function Ae(e,t,o){if(e){var n=zo.indexOf(e),i=new Date(t[0],t[1],t[2]).getDay();if(n!==i)return h(o).weekdayMismatch=!0,o._isValid=!1,!1}return!0}function He(e,t,o){if(e)return $o[e];if(t)return 0;var n=parseInt(o,10),i=n%100;return 60*((n-i)/100)+i}function je(e){var t=Zo.exec(Le(e._i));if(t){var o=ze(t[4],t[3],t[2],t[5],t[6],t[7]);if(!Ae(t[1],o,e))return;e._a=o,e._tzm=He(t[8],t[9],t[10]),e._d=le.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),h(e).rfc2822=!0}else e._isValid=!1}function We(e){var o=Xo.exec(e._i);if(null!==o)return void(e._d=new Date(+o[1]));if(Re(e),!1===e._isValid)delete e._isValid;else return;if(je(e),!1===e._isValid)delete e._isValid;else return;t.createFromInputFallback(e)}function Ue(e){if(e._f===t.ISO_8601)return void Re(e);if(e._f===t.RFC_2822)return void je(e);e._a=[],h(e).empty=!0;var o=""+e._i,n=o.length,a=0,d,s,r,l,c;for(r=H(e._f,e._locale).match($t)||[],d=0;d=e._a[3]&&!0===h(e).bigHour&&0t&&(t+=12),n||12!==t||(t=0),t):e.meridiemHour(t,o)}function Ge(e){var t,o,n,a,d;if(0===e._f.length)return h(e).invalidFormat=!0,void(e._d=new Date(NaN));for(a=0;ae?-1*ho(-1*e):ho(e)}function it(e,t){z(e,0,0,function(){var e=this.utcOffset(),o="+";return 0>e&&(e=-e,o="-"),o+R(~~(e/60),2)+t+R(~~e%60,2)})}function at(e,t){var o=(t||"").match(e);if(null===o)return null;var n=o[o.length-1]||[],i=(n+"").match(tn)||["-",0,0],a=+(60*i[1])+v(i[2]);return 0===a?0:"+"===i[0]?a:-a}function dt(e,o){var n,i;return o._isUTC?(n=o.clone(),i=(b(e)||s(e)?e.valueOf():Qe(e).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+i),t.updateOffset(n,!1),n):Qe(e).local()}function st(e){return 15*-ho(e._d.getTimezoneOffset()/15)}function rt(){if(!a(this._isDSTShifted))return this._isDSTShifted;var e={};if(y(e,this),e=Ze(e),e._a){var t=e._isUTC?u(e._a):Qe(e._a);this._isDSTShifted=this.isValid()&&0t-n?(i=e.clone().add(o-1,"months"),a=(t-n)/(n-i)):(i=e.clone().add(o+1,"months"),a=(t-n)/(i-n)),-(o+a)||0}function ft(e){var t;return void 0===e?this._locale._abbr:(t=Ce(e),null!=t&&(this._locale=t),this)}function bt(){return this._locale}function _t(e,t){return(e%t+t)%t}function vt(e,t,o){return 100>e&&0<=e?new Date(e+400,t,o)-12622780800000:new Date(e,t,o).valueOf()}function kt(e,t,o){return 100>e&&0<=e?Date.UTC(e+400,t,o)-12622780800000:Date.UTC(e,t,o)}function wt(e,t){z(0,[e,e.length],0,t)}function xt(e,t,o,n,i){var a;return null==e?pe(this,n,i).year:(a=he(e,n,i),t>a&&(t=a),St.call(this,e,t,o,n,i))}function St(e,t,o,n,i){var a=ue(e,t,o,n,i),d=le(a.year,0,a.dayOfYear);return this.year(d.getUTCFullYear()),this.month(d.getUTCMonth()),this.date(d.getUTCDate()),this}function Ot(e,t){t[6]=v(1e3*("0."+e))}function Dt(e){return e}function Tt(e,t,o,n){var i=Ce(),a=u().set(n,t);return i[o](a,e)}function Et(e,t,o){if(d(e)&&(t=e,e=void 0),e=e||"",null!=t)return Tt(e,t,o,"month");var n=[],a;for(a=0;12>a;a++)n[a]=Tt(e,a,o,"month");return n}function Ct(e,t,o,n){"boolean"==typeof e?(d(t)&&(o=t,t=void 0),t=t||""):(t=e,o=t,e=!1,d(t)&&(o=t,t=void 0),t=t||"");var a=Ce(),s=e?a._week.dow:0;if(null!=o)return Tt(t,(o+s)%7,n,"day");var r=[],l;for(l=0;7>l;l++)r[l]=Tt(t,(l+s)%7,n,"day");return r}function Mt(e,t,o,n){var i=ct(t,o);return e._milliseconds+=n*i._milliseconds,e._days+=n*i._days,e._months+=n*i._months,e._bubble()}function It(e){return 0>e?ko(e):yo(e)}function Pt(e){return 4800*e/146097}function Ft(e){return 146097*e/4800}function Nt(e){return function(){return this.as(e)}}function Yt(e){return function(){return this.isValid()?this._data[e]:NaN}}function Rt(e,t,o,n,i){return i.relativeTime(t||1,!!o,e,n)}function zt(e,t,o){var n=ct(e).abs(),i=Pn(n.as("s")),d=Pn(n.as("m")),s=Pn(n.as("h")),r=Pn(n.as("d")),l=Pn(n.as("M")),c=Pn(n.as("y")),u=i<=Fn.ss&&["s",i]||i=d&&["m"]||d=s&&["h"]||s=r&&["d"]||r=l&&["M"]||l=c&&["y"]||["yy",c];return u[2]=t,u[3]=0<+e,u[4]=o,Rt.apply(null,u)}function Bt(e){return void 0===e?Pn:"function"==typeof e&&(Pn=e,!0)}function Lt(e){return(0e)||+e}function At(){if(!this.isValid())return this.localeData().invalidDate();var e=Nn(this._milliseconds)/1e3,t=Nn(this._days),o=Nn(this._months),n,i,a;n=_(e/60),i=_(n/60),e%=60,n%=60,a=_(o/12),o%=12;var d=a,r=o,l=t,c=i,u=n,p=e?e.toFixed(3).replace(/\.?0+$/,""):"",s=this.asSeconds();if(!s)return"P0D";var h=0>s?"-":"",g=Lt(this._months)===Lt(s)?"":"-",m=Lt(this._days)===Lt(s)?"":"-",y=Lt(this._milliseconds)===Lt(s)?"":"-";return h+"P"+(d?g+d+"Y":"")+(r?g+r+"M":"")+(l?m+l+"D":"")+(c||u||p?"T":"")+(c?y+c+"H":"")+(u?y+u+"M":"")+(p?y+p+"S":"")}var Ht,jt;jt=Array.prototype.some?Array.prototype.some:function(e){for(var o=Object(this),t=o.length>>>0,n=0;n=e?""+e:"+"+e}),z(0,["YY",2],0,function(){return this.year()%100}),z(0,["YYYY",4],0,"year"),z(0,["YYYYY",5],0,"year"),z(0,["YYYYYY",6,!0],0,"year"),I("year","y"),N("year",1),j("Y",mo),j("YY",ao,to),j("YYYY",co,no),j("YYYYY",uo,io),j("YYYYYY",uo,io),G(["YYYYY","YYYYYY"],To),G("YYYY",function(e,o){o[To]=2===e.length?t.parseTwoDigitYear(e):v(e)}),G("YY",function(e,o){o[To]=t.parseTwoDigitYear(e)}),G("Y",function(e,t){t[To]=parseInt(e,10)}),t.parseTwoDigitYear=function(e){return v(e)+(68this?this:e:m()}),en=["year","quarter","month","week","day","hour","minute","second","millisecond"];it("Z",":"),it("ZZ",""),j("Z",_o),j("ZZ",_o),G(["Z","ZZ"],function(e,t,o){o._useUTC=!0,o._tzm=at(_o,e)});var tn=/([\+\-]|\d\d)/gi;t.updateOffset=function(){};var on=/^(\-|\+)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,nn=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;ct.fn=tt.prototype,ct.invalid=function(){return ct(NaN)};var an=gt(1,"add"),dn=gt(-1,"subtract");t.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",t.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var sn=x("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return void 0===e?this.localeData():this.locale(e)});z(0,["gg",2],0,function(){return this.weekYear()%100}),z(0,["GG",2],0,function(){return this.isoWeekYear()%100}),wt("gggg","weekYear"),wt("ggggg","weekYear"),wt("GGGG","isoWeekYear"),wt("GGGGG","isoWeekYear"),I("weekYear","gg"),I("isoWeekYear","GG"),N("weekYear",1),N("isoWeekYear",1),j("G",mo),j("g",mo),j("GG",ao,to),j("gg",ao,to),j("GGGG",co,no),j("gggg",co,no),j("GGGGG",uo,io),j("ggggg",uo,io),q(["gggg","ggggg","GGGG","GGGGG"],function(e,t,o,n){t[n.substr(0,2)]=v(e)}),q(["gg","GG"],function(e,o,n,i){o[i]=t.parseTwoDigitYear(e)}),z("Q",0,"Qo","quarter"),I("quarter","Q"),N("quarter",7),j("Q",eo),G("Q",function(e,t){t[Eo]=3*(v(e)-1)}),z("D",["DD",2],"Do","date"),I("date","D"),N("date",9),j("D",ao),j("DD",ao,to),j("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient}),G(["D","DD"],Co),G("Do",function(e,t){t[Co]=v(e.match(ao)[0])});var rn=K("Date",!0);z("DDD",["DDDD",3],"DDDo","dayOfYear"),I("dayOfYear","DDD"),N("dayOfYear",4),j("DDD",lo),j("DDDD",oo),G(["DDD","DDDD"],function(e,t,o){o._dayOfYear=v(e)}),z("m",["mm",2],0,"minute"),I("minute","m"),N("minute",14),j("m",ao),j("mm",ao,to),G(["m","mm"],Io);var ln=K("Minutes",!1);z("s",["ss",2],0,"second"),I("second","s"),N("second",15),j("s",ao),j("ss",ao,to),G(["s","ss"],Po);var cn=K("Seconds",!1);z("S",0,0,function(){return~~(this.millisecond()/100)}),z(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),z(0,["SSS",3],0,"millisecond"),z(0,["SSSS",4],0,function(){return 10*this.millisecond()}),z(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),z(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),z(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),z(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),z(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),I("millisecond","ms"),N("millisecond",16),j("S",lo,eo),j("SS",lo,to),j("SSS",lo,oo);var un;for(un="SSSS";9>=un.length;un+="S")j(un,po);for(un="S";9>=un.length;un+="S")G(un,Ot);var pn=K("Milliseconds",!1);z("z",0,0,"zoneAbbr"),z("zz",0,0,"zoneName");var hn=f.prototype;hn.add=an,hn.calendar=function(e,o){var n=e||Qe(),i=dt(n,this).startOf("day"),a=t.calendarFormat(this,i)||"sameElse",d=o&&(O(o[a])?o[a].call(this,n):o[a]);return this.format(d||this.localeData().calendar(a,this,Qe(n)))},hn.clone=function(){return new f(this)},hn.diff=function(e,t,o){var n,i,a;return this.isValid()?(n=dt(e,this),!n.isValid())?NaN:(i=6e4*(n.utcOffset()-this.utcOffset()),t=P(t),(a="year"===t?yt(this,n)/12:"month"===t?yt(this,n):"quarter"===t?yt(this,n)/3:"second"===t?(this-n)/1e3:"minute"===t?(this-n)/6e4:"hour"===t?(this-n)/36e5:"day"===t?(this-n-i)/864e5:"week"===t?(this-n-i)/6048e5:this-n,o?a:_(a))):NaN},hn.endOf=function(e){var o;if(e=P(e),void 0===e||"millisecond"===e||!this.isValid())return this;var n=this._isUTC?kt:vt;return"year"===e?o=n(this.year()+1,0,1)-1:"quarter"===e?o=n(this.year(),this.month()-this.month()%3+3,1)-1:"month"===e?o=n(this.year(),this.month()+1,1)-1:"week"===e?o=n(this.year(),this.month(),this.date()-this.weekday()+7)-1:"isoWeek"===e?o=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1:"day"===e||"date"===e?o=n(this.year(),this.month(),this.date()+1)-1:"hour"===e?(o=this._d.valueOf(),o+=3600000-_t(o+(this._isUTC?0:60000*this.utcOffset()),3600000)-1):"minute"===e?(o=this._d.valueOf(),o+=60000-_t(o,60000)-1):"second"===e?(o=this._d.valueOf(),o+=1000-_t(o,1000)-1):void 0,this._d.setTime(o),t.updateOffset(this,!0),this},hn.format=function(e){e||(e=this.isUtc()?t.defaultFormatUtc:t.defaultFormat);var o=A(this,e);return this.localeData().postformat(o)},hn.from=function(e,t){return this.isValid()&&(b(e)&&e.isValid()||Qe(e).isValid())?ct({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},hn.fromNow=function(e){return this.from(Qe(),e)},hn.to=function(e,t){return this.isValid()&&(b(e)&&e.isValid()||Qe(e).isValid())?ct({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},hn.toNow=function(e){return this.to(Qe(),e)},hn.get=function(e){return e=P(e),O(this[e])?this[e]():this},hn.invalidAt=function(){return h(this).overflow},hn.isAfter=function(e,t){var o=b(e)?e:Qe(e);return!!(this.isValid()&&o.isValid())&&(t=P(t)||"millisecond","millisecond"===t?this.valueOf()>o.valueOf():o.valueOf()o.year()||9999=this.year()?"YYYY":"YYYYYY",i=t+"[\")]";return this.format(o+n+"-MM-DD[T]HH:mm:ss.SSS"+i)},hn.toJSON=function(){return this.isValid()?this.toISOString():null},hn.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},hn.unix=function(){return ko(this.valueOf()/1e3)},hn.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},hn.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},hn.year=Fo,hn.isLeapYear=function(){return $(this.year())},hn.weekYear=function(e){return xt.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},hn.isoWeekYear=function(e){return xt.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)},hn.quarter=hn.quarters=function(e){return null==e?yo((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)},hn.month=de,hn.daysInMonth=function(){return oe(this.year(),this.month())},hn.week=hn.weeks=function(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")},hn.isoWeek=hn.isoWeeks=function(e){var t=pe(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")},hn.weeksInYear=function(){var e=this.localeData()._week;return he(this.year(),e.dow,e.doy)},hn.isoWeeksInYear=function(){return he(this.year(),1,4)},hn.date=rn,hn.day=hn.days=function(e){if(!this.isValid())return null==e?NaN:this;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return null==e?t:(e=ge(e,this.localeData()),this.add(e-t,"d"))},hn.weekday=function(e){if(!this.isValid())return null==e?NaN:this;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")},hn.isoWeekday=function(e){if(!this.isValid())return null==e?NaN:this;if(null!=e){var t=me(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7},hn.dayOfYear=function(e){var t=ho((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")},hn.hour=hn.hours=Lo,hn.minute=hn.minutes=ln,hn.second=hn.seconds=cn,hn.millisecond=hn.milliseconds=pn,hn.utcOffset=function(e,o,n){var i=this._offset||0,a;if(!this.isValid())return null==e?NaN:this;if(null!=e){if("string"!=typeof e)16>fo(e)&&!n&&(e*=60);else if(e=at(_o,e),null===e)return this;return!this._isUTC&&o&&(a=st(this)),this._offset=e,this._isUTC=!0,null!=a&&this.add(a,"m"),i!==e&&(!o||this._changeInProgress?mt(this,ct(e-i,"m"),1,!1):!this._changeInProgress&&(this._changeInProgress=!0,t.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?i:st(this)},hn.utc=function(e){return this.utcOffset(0,e)},hn.local=function(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(st(this),"m")),this},hn.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var e=at(bo,this._i);null==e?this.utcOffset(0,!0):this.utcOffset(e)}return this},hn.hasAlignedHourOffset=function(e){return!!this.isValid()&&(e=e?Qe(e).utcOffset():0,0==(this.utcOffset()-e)%60)},hn.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},hn.isLocal=function(){return!!this.isValid()&&!this._isUTC},hn.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},hn.isUtc=lt,hn.isUTC=lt,hn.zoneAbbr=function(){return this._isUTC?"UTC":""},hn.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},hn.dates=x("dates accessor is deprecated. Use date instead.",rn),hn.months=x("months accessor is deprecated. Use month instead",de),hn.years=x("years accessor is deprecated. Use year instead",Fo),hn.zone=x("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",function(e,t){return null==e?-this.utcOffset():("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this)}),hn.isDSTShifted=x("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",rt);var gn=E.prototype;gn.calendar=C,gn.longDateFormat=M,gn.invalidDate=function(){return this._invalidDate},gn.ordinal=function(e){return this._ordinal.replace("%d",e)},gn.preparse=Dt,gn.postformat=Dt,gn.relativeTime=function(e,t,o,n){var i=this._relativeTime[o];return O(i)?i(e,t,o,n):i.replace(/%d/i,e)},gn.pastFuture=function(e,t){var o=this._relativeTime[0=e&&0>=t&&0>=o||(e+=864e5*It(Ft(o)+t),t=0,o=0),n.milliseconds=e%1e3,i=_(e/1e3),n.seconds=i%60,a=_(i/60),n.minutes=a%60,d=_(a/60),n.hours=d%24,t+=_(d/24),r=_(Pt(t)),o+=r,t-=It(Ft(r)),s=_(o/12),o%=12,n.days=t,n.months=o,n.years=s,this},Yn.clone=function(){return ct(this)},Yn.get=function(e){return e=P(e),this.isValid()?this[e+"s"]():NaN},Yn.milliseconds=On,Yn.seconds=Dn,Yn.minutes=Tn,Yn.hours=En,Yn.days=Cn,Yn.weeks=function(){return _(this.days()/7)},Yn.months=Mn,Yn.years=In,Yn.humanize=function(e){if(!this.isValid())return this.localeData().invalidDate();var t=this.localeData(),o=zt(this,!e,t);return e&&(o=t.pastFuture(+this,o)),t.postformat(o)},Yn.toISOString=At,Yn.toString=At,Yn.toJSON=At,Yn.locale=ft,Yn.localeData=bt,Yn.toIsoString=x("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",At),Yn.lang=sn,z("X",0,0,"unix"),z("x",0,0,"valueOf"),j("x",mo),j("X",vo),G("X",function(e,t,o){o._d=new Date(1e3*parseFloat(e,10))}),G("x",function(e,t,o){o._d=new Date(v(e))}),t.version="2.24.0",function(e){Ht=e}(Qe),t.fn=hn,t.min=function(){var e=[].slice.call(arguments,0);return Je("isBefore",e)},t.max=function(){var e=[].slice.call(arguments,0);return Je("isAfter",e)},t.now=function(){return Date.now?Date.now():+new Date},t.utc=u,t.unix=function(e){return Qe(1e3*e)},t.months=function(e,t){return Et(e,t,"months")},t.isDate=s,t.locale=Te,t.invalid=m,t.duration=ct,t.isMoment=b,t.weekdays=function(e,t,o){return Ct(e,t,o,"weekdays")},t.parseZone=function(){return Qe.apply(null,arguments).parseZone()},t.localeData=Ce,t.isDuration=ot,t.monthsShort=function(e,t){return Et(e,t,"monthsShort")},t.weekdaysMin=function(e,t,o){return Ct(e,t,o,"weekdaysMin")},t.defineLocale=Ee,t.updateLocale=function(e,t){if(null!=t){var o=Ao,n,i;i=Oe(e),null!=i&&(o=i._config),t=T(o,t),n=new E(t),n.parentLocale=Ho[e],Ho[e]=n,Te(e)}else null!=Ho[e]&&(null==Ho[e].parentLocale?null!=Ho[e]&&delete Ho[e]:Ho[e]=Ho[e].parentLocale);return Ho[e]},t.locales=Me,t.weekdaysShort=function(e,t,o){return Ct(e,t,o,"weekdaysShort")},t.normalizeUnits=P,t.relativeTimeRounding=Bt,t.relativeTimeThreshold=function(e,t){return void 0!==Fn[e]&&(void 0===t?Fn[e]:(Fn[e]=t,"s"===e&&(Fn.ss=t-1),!0))},t.calendarFormat=function(e,t){var o=e.diff(t,"days",!0);return-6>o?"sameElse":-1>o?"lastWeek":0>o?"lastDay":1>o?"sameDay":2>o?"nextDay":7>o?"nextWeek":"sameElse"},t.prototype=hn,t.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},t})}),ns=[],is=0;256>is;is++)ns[is]=(is+256).toString(16).substr(1);for(var as=function(){if("undefined"!=typeof crypto&&crypto.getRandomValues){var e=new Uint8Array(16);return function(){return crypto.getRandomValues(e),e}}var t=Array(16);return function(){for(var e=0,o;16>e;e++)0==(3&e)&&(o=4294967296*Math.random()),t[e]=255&o>>>((3&e)<<3);return t}}(),ds=[],ss=0;256>ss;ss++)ds[ss]=(ss+256).toString(16).substr(1);var rs=as(),ls=[1|rs[0],rs[1],rs[2],rs[3],rs[4],rs[5]],cs=16383&(rs[6]<<8|rs[7]),us=/^\/?Date\((-?\d+)/i,ps=function(){function e(t){Ad(this,e),this._queue=[],this._timeout=null,this._extended=null,this.delay=null,this.max=1/0,this.setOptions(t)}return Hd(e,[{key:"setOptions",value:function(e){e&&"undefined"!=typeof e.delay&&(this.delay=e.delay),e&&"undefined"!=typeof e.max&&(this.max=e.max),this._flushIfNeeded()}},{key:"destroy",value:function(){if(this.flush(),this._extended){for(var e=this._extended.object,t=this._extended.methods,o=0,n;othis.max&&this.flush(),null!=this._timeout&&(clearTimeout(this._timeout),this._timeout=null),0i?1:na)&&(e=l,a=c)}return e}},{key:"min",value:function e(t){for(var o=this._data,n=Object.keys(o),e=null,a=null,d=0,s=n.length;di;i++)a=0==i%2?1.3*o:.5*o,this.lineTo(e+a*po(2*i*bo/10),t-a*uo(2*i*bo/10));this.closePath()},CanvasRenderingContext2D.prototype.diamond=function(e,t,o){this.beginPath(),this.lineTo(e,t+o),this.lineTo(e+o,t),this.lineTo(e,t-o),this.lineTo(e-o,t),this.closePath()},CanvasRenderingContext2D.prototype.roundRect=function(e,t,o,n,i){var a=bo/180;0>o-2*i&&(i=o/2),0>n-2*i&&(i=n/2),this.beginPath(),this.moveTo(e+i,t),this.lineTo(e+o-i,t),this.arc(e+o-i,t+i,i,270*a,360*a,!1),this.lineTo(e+o,t+n-i),this.arc(e+o-i,t+n-i,i,0,90*a,!1),this.lineTo(e+i,t+n),this.arc(e+i,t+n-i,i,90*a,180*a,!1),this.lineTo(e,t+i),this.arc(e+i,t+i,i,180*a,270*a,!1),this.closePath()},CanvasRenderingContext2D.prototype.ellipse_vis=function(e,t,o,n){var i=.5522848,a=o/2*i,d=n/2*i,s=e+o,r=t+n,l=e+o/2,c=t+n/2;this.beginPath(),this.moveTo(e,c),this.bezierCurveTo(e,c-d,l-a,t,l,t),this.bezierCurveTo(l+a,t,s,c-d,s,c),this.bezierCurveTo(s,c+d,l+a,r,l,r),this.bezierCurveTo(l-a,r,e,c+d,e,c),this.closePath()},CanvasRenderingContext2D.prototype.database=function(e,t,o,n){var i=o,a=n*(1/3),d=.5522848,s=i/2*d,r=a/2*d,l=e+i,c=t+a,u=e+i/2,p=t+a/2,h=t+(n-a/2),g=t+n;this.beginPath(),this.moveTo(l,p),this.bezierCurveTo(l,p+r,u+s,c,u,c),this.bezierCurveTo(u-s,c,e,p+r,e,p),this.bezierCurveTo(e,p-r,u-s,t,u,t),this.bezierCurveTo(u+s,t,l,p-r,l,p),this.lineTo(l,h),this.bezierCurveTo(l,h+r,u+s,g,u,g),this.bezierCurveTo(u-s,g,e,h+r,e,h),this.lineTo(e,p)},CanvasRenderingContext2D.prototype.dashedLine=function(e,t,o,n,i){this.beginPath(),this.moveTo(e,t);for(var a=i.length,d=o-e,s=n-t,r=s/d,l=vo(d*d+s*s),c=0,u=!0,p=0,h=i[0];.1<=l;)h=i[c++%a],h>l&&(h=l),p=vo(h*h/(1+r*r)),p=0>d?-p:p,e+=p,t+=r*p,!0===u?this.lineTo(e,t):this.moveTo(e,t),l-=h,u=!u},CanvasRenderingContext2D.prototype.hexagon=function(e,t,o){this.beginPath();var n=2*bo/6;this.moveTo(e+o,t);for(var a=1;a<6;a++)this.lineTo(e+o*uo(n*a),t+o*po(n*a));this.closePath()});var _s="undefined"==typeof globalThis?"undefined"==typeof window?"undefined"==typeof global?"undefined"==typeof self?{}:self:global:window:globalThis,vs=Le(function(e){function t(e){if(e)return o(e)}function o(e){for(var o in t.prototype)e[o]=t.prototype[o];return e}e.exports=t,t.prototype.on=t.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},t.prototype.once=function(e,t){function o(){this.off(e,o),t.apply(this,arguments)}return o.fn=t,this.on(e,o),this},t.prototype.off=t.prototype.removeListener=t.prototype.removeAllListeners=t.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var o=this._callbacks["$"+e];if(!o)return this;if(1==arguments.length)return delete this._callbacks["$"+e],this;for(var n=0,a;n":!0,"--":!0},Os="",Ds=0,Ts="",Es="",Cs=xs.NULL,Ms=/[a-zA-Z_0-9.:#]/,Is=Ae,Ps=function(e){var t=Ae(e),o={nodes:[],edges:[],options:{}};if(t.nodes&&t.nodes.forEach(function(e){var t={id:e.id,label:(e.label||e.id)+""};Ve(t,ct(e.attr,ks)),t.image&&(t.shape="image"),o.nodes.push(t)}),t.edges){var n=function(e){var t={from:e.from,to:e.to};return Ve(t,ct(e.attr,ws)),null==t.arrows&&"->"===e.type&&(t.arrows="to"),t};t.edges.forEach(function(e){var t,i;t=e.from instanceof Object?e.from.nodes:{id:e.from},i=e.to instanceof Object?e.to.nodes:{id:e.to},e.from instanceof Object&&e.from.edges&&e.from.edges.forEach(function(e){var t=n(e);o.edges.push(t)}),rt(t,i,function(t,i){var a=Ze(o,t.id,i.id,e.type,e.attr),d=n(a);o.edges.push(d)}),e.to instanceof Object&&e.to.edges&&e.to.edges.forEach(function(e){var t=n(e);o.edges.push(t)})})}return t.attr&&(o.options=t.attr),o},Fs={parseDOT:Is,DOTToGraph:Ps},Ns=Object.freeze({default:Fs,__moduleExports:Fs,parseDOT:Is,DOTToGraph:Ps}),Ys=Object.freeze({parseGephi:ut}),Rs=Object.freeze({}),zs=Le(function(e){(function(t,o){e.exports=o()})(_s,function(){function e(e){var t=String.fromCharCode,o=e&&e.preventDefault||!1,n=e&&e.container||window,a={},d={keydown:{},keyup:{}},s={},r;for(r=97;122>=r;r++)s[t(r)]={code:65+(r-97),shift:!1};for(r=65;90>=r;r++)s[t(r)]={code:r,shift:!0};for(r=0;9>=r;r++)s[""+r]={code:48+r,shift:!1};for(r=1;12>=r;r++)s["F"+r]={code:111+r,shift:!1};for(r=0;9>=r;r++)s["num"+r]={code:96+r,shift:!1};s["num*"]={code:106,shift:!1},s["num+"]={code:107,shift:!1},s["num-"]={code:109,shift:!1},s["num/"]={code:111,shift:!1},s["num."]={code:110,shift:!1},s.left={code:37,shift:!1},s.up={code:38,shift:!1},s.right={code:39,shift:!1},s.down={code:40,shift:!1},s.space={code:32,shift:!1},s.enter={code:13,shift:!1},s.shift={code:16,shift:void 0},s.esc={code:27,shift:!1},s.backspace={code:8,shift:!1},s.tab={code:9,shift:!1},s.ctrl={code:17,shift:!1},s.alt={code:18,shift:!1},s["delete"]={code:46,shift:!1},s.pageup={code:33,shift:!1},s.pagedown={code:34,shift:!1},s["="]={code:187,shift:!1},s["-"]={code:189,shift:!1},s["]"]={code:221,shift:!1},s["["]={code:219,shift:!1};var l=function(e){u(e,"keydown")},c=function(e){u(e,"keyup")},u=function(e,t){if(void 0!==d[t][e.keyCode]){for(var n=d[t][e.keyCode],a=0;ae.distance,l=250>e.deltaTime;if(s&&r&&l)return}return d&&a?void 0:i||a&&o&mr||d&&o&yr?this.preventSrc(t):void 0},t.preventSrc=function(e){this.manager.session.prevented=!0,e.preventDefault()},e}(),kr=function(){function e(e,t){var o=this;this.manager=e,this.callback=t,this.element=e.element,this.target=e.options.inputTarget,this.domHandler=function(t){bt(e.options.enable,[e])&&o.handler(t)},this.init()}var t=e.prototype;return t.handler=function(){},t.init=function(){this.evEl&&Yt(this.element,this.evEl,this.domHandler),this.evTarget&&Yt(this.target,this.evTarget,this.domHandler),this.evWin&&Yt(zt(this.element),this.evWin,this.domHandler)},t.destroy=function(){this.evEl&&Rt(this.element,this.evEl,this.domHandler),this.evTarget&&Rt(this.target,this.evTarget,this.domHandler),this.evWin&&Rt(zt(this.element),this.evWin,this.domHandler)},e}(),wr={pointerdown:dr,pointermove:sr,pointerup:rr,pointercancel:lr,pointerout:lr},xr={2:ir,3:"pen",4:ar,5:"kinect"},Sr="pointerdown",Or="pointermove pointerup pointercancel";Gs.MSPointerEvent&&!Gs.PointerEvent&&(Sr="MSPointerDown",Or="MSPointerMove MSPointerUp MSPointerCancel");var Dr=function(e){function t(){var o=t.prototype,n;return o.evEl=Sr,o.evWin=Or,n=e.apply(this,arguments)||this,n.store=n.manager.session.pointerEvents=[],n}ht(t,e);var o=t.prototype;return o.handler=function(e){var t=this.store,o=!1,n=e.type.toLowerCase().replace("ms",""),i=wr[n],a=xr[e.pointerType]||e.pointerType,d=Bt(t,e.pointerId,"pointerId");i&dr&&(0===e.button||a===ir)?0>d&&(t.push(e),d=t.length-1):i&(rr|lr)&&(o=!0),0>d||(t[d]=e,this.callback(this.manager,i,{pointers:t,changedPointers:[e],pointerType:a,srcEvent:e}),o&&t.splice(d,1))},t}(kr),Tr={touchstart:dr,touchmove:sr,touchend:rr,touchcancel:lr},Er=function(e){function t(){var o;return t.prototype.evTarget="touchstart touchmove touchend touchcancel",o=e.apply(this,arguments)||this,o.targetIds={},o}ht(t,e);var o=t.prototype;return o.handler=function(e){var t=Tr[e.type],o=Ht.call(this,e,t);o&&this.callback(this.manager,t,{pointers:o[0],changedPointers:o[1],pointerType:ir,srcEvent:e})},t}(kr),Cr={mousedown:dr,mousemove:sr,mouseup:rr},Mr=function(e){function t(){var o=t.prototype,n;return o.evEl="mousedown",o.evWin="mousemove mouseup",n=e.apply(this,arguments)||this,n.pressed=!1,n}ht(t,e);var o=t.prototype;return o.handler=function(e){var t=Cr[e.type];t&dr&&0===e.button&&(this.pressed=!0),t&sr&&1!==e.which&&(t=rr),this.pressed&&(t&rr&&(this.pressed=!1),this.callback(this.manager,t,{pointers:[e],changedPointers:[e],pointerType:ar,srcEvent:e}))},t}(kr),Ir=function(){var e=function(e){function t(t,o){var n;return n=e.call(this,t,o)||this,n.handler=function(e,t,o){var i=o.pointerType===ir,a=o.pointerType===ar;if(!(a&&o.sourceCapabilities&&o.sourceCapabilities.firesTouchEvents)){if(i)Wt.call(gt(gt(n)),t,o);else if(a&&Ut.call(gt(gt(n)),o))return;n.callback(e,t,o)}},n.touch=new Er(n.manager,n.handler),n.mouse=new Mr(n.manager,n.handler),n.primaryTouch=null,n.lastTouches=[],n}ht(t,e);var o=t.prototype;return o.destroy=function(){this.touch.destroy(),this.mouse.destroy()},t}(kr);return e}(),Pr=1,Fr=2,Nr=4,Yr=8,Rr=Yr,zr=16,Br=32,Lr=1,Ar=function(){function e(e){void 0===e&&(e={}),this.options=pt({enable:!0},e),this.id=qt(),this.manager=null,this.state=Pr,this.simultaneous={},this.requireFail=[]}var t=e.prototype;return t.set=function(e){return As(this.options,e),this.manager&&this.manager.touchAction.update(),this},t.recognizeWith=function(e){if(Gt(e,"recognizeWith",this))return this;var t=this.simultaneous;return e=Xt(e,this),t[e.id]||(t[e.id]=e,e.recognizeWith(this)),this},t.dropRecognizeWith=function(e){return Gt(e,"dropRecognizeWith",this)?this:(e=Xt(e,this),delete this.simultaneous[e.id],this)},t.requireFailure=function(e){if(Gt(e,"requireFailure",this))return this;var t=this.requireFail;return e=Xt(e,this),-1===Bt(t,e)&&(t.push(e),e.requireFailure(this)),this},t.dropRequireFailure=function(e){if(Gt(e,"dropRequireFailure",this))return this;e=Xt(e,this);var t=Bt(this.requireFail,e);return-1=Yr&&e(o.options.event+Zt(n))},t.tryEmit=function(e){return this.canEmit()?this.emit(e):void(this.state=Br)},t.canEmit=function(){for(var e=0;ea?ur:pr,o=a!==this.pX,n=fo(e.deltaX)):(i=0===d?cr:0>d?hr:gr,o=d!==this.pY,n=fo(e.deltaY))),e.direction=i,o&&n>t.threshold&&i&t.direction},o.attrTest=function(e){return Gr.prototype.attrTest.call(this,e)&&(this.state&Fr||!(this.state&Fr)&&this.directionTest(e))},o.emit=function(t){this.pX=t.deltaX,this.pY=t.deltaY;var o=Jt(t.direction);o&&(t.additionalEvent=this.options.event+o),e.prototype.emit.call(this,t)},t}(Gr),Zr=function(e){function t(t){return void 0===t&&(t={}),e.call(this,pt({event:"swipe",threshold:10,velocity:.3,direction:mr|yr,pointers:1},t))||this}ht(t,e);var o=t.prototype;return o.getTouchAction=function(){return Xr.prototype.getTouchAction.call(this)},o.attrTest=function(t){var o=this.options.direction,n;return o&(mr|yr)?n=t.overallVelocity:o&mr?n=t.overallVelocityX:o&yr&&(n=t.overallVelocityY),e.prototype.attrTest.call(this,t)&&o&t.offsetDirection&&t.distance>this.options.threshold&&t.maxPointers===this.options.pointers&&Us(n)>this.options.velocity&&t.eventType&rr},o.emit=function(e){var t=Jt(e.offsetDirection);t&&this.manager.emit(this.options.event+t,e),this.manager.emit(this.options.event,e)},t}(Gr),$r=function(e){function t(t){return void 0===t&&(t={}),e.call(this,pt({event:"pinch",threshold:0,pointers:2},t))||this}ht(t,e);var o=t.prototype;return o.getTouchAction=function(){return[$s]},o.attrTest=function(t){return e.prototype.attrTest.call(this,t)&&(fo(t.scale-1)>this.options.threshold||this.state&Fr)},o.emit=function(t){if(1!==t.scale){var o=1>t.scale?"in":"out";t.additionalEvent=this.options.event+o}e.prototype.emit.call(this,t)},t}(Gr),Kr=function(e){function t(t){return void 0===t&&(t={}),e.call(this,pt({event:"rotate",threshold:0,pointers:2},t))||this}ht(t,e);var o=t.prototype;return o.getTouchAction=function(){return[$s]},o.attrTest=function(t){return e.prototype.attrTest.call(this,t)&&(fo(t.rotation)>this.options.threshold||this.state&Fr)},t}(Gr),Qr=function(e){function t(t){var o;return void 0===t&&(t={}),o=e.call(this,pt({event:"press",pointers:1,time:251,threshold:9},t))||this,o._timer=null,o._input=null,o}ht(t,e);var o=t.prototype;return o.getTouchAction=function(){return["auto"]},o.process=function(e){var t=this,o=this.options,n=e.pointers.length===o.pointers,i=e.distanceo.time;if(this._input=e,!i||!n||e.eventType&(rr|lr)&&!a)this.reset();else if(e.eventType&dr)this.reset(),this._timer=setTimeout(function(){t.state=Rr,t.tryEmit()},o.time);else if(e.eventType&rr)return Rr;return Br},o.reset=function(){clearTimeout(this._timer)},o.emit=function(e){this.state!==Rr||(e&&e.eventType&rr?this.manager.emit(this.options.event+"up",e):(this._input.timeStamp=Vs(),this.manager.emit(this.options.event,this._input)))},t}(Ar),Jr=eo(function(e,t,o){for(var n=Object.keys(t),a=0;a=this.NUM_ITERATIONS&&(d=this.NUM_ITERATIONS-1);var s=this.coordinates[d];e.drawImage(this.canvas,s[0],s[1],s[2],s[3],o,n,i,a)}else e.drawImage(this.image,o,n,i,a)}}]),e}(),rl=function(){function e(t){al(this,e),this.images={},this.imageBroken={},this.callback=t}return dl(e,[{key:"_tryloadBrokenUrl",value:function(e,t,o){return void 0===e||void 0===o?void 0:void 0===t?void console.warn("No broken url image defined"):void(o.image.onerror=function(){console.error("Could not load brokenImage:",t)},o.image.src=t)}},{key:"_redrawWithImage",value:function(e){this.callback&&this.callback(e)}},{key:"load",value:function(e,t){var o=this,n=this.images[e];if(n)return n;var i=new sl;return this.images[e]=i,i.image.onload=function(){o._fixImageCoordinates(i.image),i.init(),o._redrawWithImage(i)},i.image.onerror=function(){console.error("Could not load image:",e),o._tryloadBrokenUrl(e,t,i)},i.image.src=e,i}},{key:"_fixImageCoordinates",value:function(e){0===e.width&&(document.body.appendChild(e),e.width=e.offsetWidth,e.height=e.offsetHeight,document.body.removeChild(e))}}]),e}(),ll=function(){function e(){al(this,e),this.clear(),this.defaultIndex=0,this.groupsArray=[],this.groupIndex=0,this.defaultGroups=[{border:"#2B7CE9",background:"#97C2FC",highlight:{border:"#2B7CE9",background:"#D2E5FF"},hover:{border:"#2B7CE9",background:"#D2E5FF"}},{border:"#FFA500",background:"#FFFF00",highlight:{border:"#FFA500",background:"#FFFFA3"},hover:{border:"#FFA500",background:"#FFFFA3"}},{border:"#FA0A10",background:"#FB7E81",highlight:{border:"#FA0A10",background:"#FFAFB1"},hover:{border:"#FA0A10",background:"#FFAFB1"}},{border:"#41A906",background:"#7BE141",highlight:{border:"#41A906",background:"#A1EC76"},hover:{border:"#41A906",background:"#A1EC76"}},{border:"#E129F0",background:"#EB7DF4",highlight:{border:"#E129F0",background:"#F0B3F5"},hover:{border:"#E129F0",background:"#F0B3F5"}},{border:"#7C29F0",background:"#AD85E4",highlight:{border:"#7C29F0",background:"#D3BDF0"},hover:{border:"#7C29F0",background:"#D3BDF0"}},{border:"#C37F00",background:"#FFA807",highlight:{border:"#C37F00",background:"#FFCA66"},hover:{border:"#C37F00",background:"#FFCA66"}},{border:"#4220FB",background:"#6E6EFD",highlight:{border:"#4220FB",background:"#9B9BFD"},hover:{border:"#4220FB",background:"#9B9BFD"}},{border:"#FD5A77",background:"#FFC0CB",highlight:{border:"#FD5A77",background:"#FFD1D9"},hover:{border:"#FD5A77",background:"#FFD1D9"}},{border:"#4AD63A",background:"#C2FABC",highlight:{border:"#4AD63A",background:"#E6FFE3"},hover:{border:"#4AD63A",background:"#E6FFE3"}},{border:"#990000",background:"#EE0000",highlight:{border:"#BB0000",background:"#FF3333"},hover:{border:"#BB0000",background:"#FF3333"}},{border:"#FF6000",background:"#FF6000",highlight:{border:"#FF6000",background:"#FF6000"},hover:{border:"#FF6000",background:"#FF6000"}},{border:"#97C2FC",background:"#2B7CE9",highlight:{border:"#D2E5FF",background:"#2B7CE9"},hover:{border:"#D2E5FF",background:"#2B7CE9"}},{border:"#399605",background:"#255C03",highlight:{border:"#399605",background:"#255C03"},hover:{border:"#399605",background:"#255C03"}},{border:"#B70054",background:"#FF007E",highlight:{border:"#B70054",background:"#FF007E"},hover:{border:"#B70054",background:"#FF007E"}},{border:"#AD85E4",background:"#7C29F0",highlight:{border:"#D3BDF0",background:"#7C29F0"},hover:{border:"#D3BDF0",background:"#7C29F0"}},{border:"#4557FA",background:"#000EA1",highlight:{border:"#6E6EFD",background:"#000EA1"},hover:{border:"#6E6EFD",background:"#000EA1"}},{border:"#FFC0CB",background:"#FD5A77",highlight:{border:"#FFD1D9",background:"#FD5A77"},hover:{border:"#FFD1D9",background:"#FD5A77"}},{border:"#C2FABC",background:"#74D66A",highlight:{border:"#E6FFE3",background:"#74D66A"},hover:{border:"#E6FFE3",background:"#74D66A"}},{border:"#EE0000",background:"#990000",highlight:{border:"#FF3333",background:"#BB0000"},hover:{border:"#FF3333",background:"#BB0000"}}],this.options={},this.defaultOptions={useDefaultGroups:!0},Rd.extend(this.options,this.defaultOptions)}return dl(e,[{key:"setOptions",value:function(e){var t=["useDefaultGroups"];if(void 0!==e)for(var o in e)if(e.hasOwnProperty(o)&&-1===t.indexOf(o)){var n=e[o];this.add(o,n)}}},{key:"clear",value:function(){this.groups={},this.groupsArray=[]}},{key:"get",value:function(e){var t=!(1=e.width||0>=e.height)return!1;if(void 0!==o){var n={x:t.x-o.x,y:t.y-o.y};if(0!==o.angle){var i=-o.angle,a={x:uo(i)*n.x-po(i)*n.y,y:po(i)*n.x+uo(i)*n.y};t=a}else t=n}var d=e.x+e.width,s=e.y+e.width;return e.leftt.x&&e.topt.y}},{key:"isValidLabel",value:function(e){return"string"==typeof e&&""!==e}}]),e}(),yl=function(){function e(t){al(this,e),this.measureText=t,this.current=0,this.width=0,this.height=0,this.lines=[]}return dl(e,[{key:"_add",value:function(e,t){var o=2e&&(e=n.width),t+=n.height;this.width=e,this.height=t}},{key:"removeEmptyBlocks",value:function(){for(var e=[],t=0,o;t"://,""://,""://,"":/<\/b>/,"":/<\/i>/,"":/<\/code>/,"*":/\*/,_:/\_/,"`":/`/,afterBold:/[^\*]/,afterItal:/[^_]/,afterMono:/[^`]/},bl=function(){function e(t){al(this,e),this.text=t,this.bold=!1,this.ital=!1,this.mono=!1,this.spacing=!1,this.position=0,this.buffer="",this.modStack=[],this.blocks=[]}return dl(e,[{key:"mod",value:function(){return 0===this.modStack.length?"normal":this.modStack[0]}},{key:"modName",value:function(){return 0===this.modStack.length?"normal":"mono"===this.modStack[0]?"mono":this.bold&&this.ital?"boldital":this.bold?"bold":this.ital?"ital":void 0}},{key:"emitBlock",value:function(){this.spacing&&(this.add(" "),this.spacing=!1),0")||t.parseStartTag("ital","")||t.parseStartTag("mono","")||t.parseEndTag("bold","")||t.parseEndTag("ital","")||t.parseEndTag("mono",""))||o(n);i||t.add(n),t.position++}return t.emitBlock(),t.blocks}},{key:"splitMarkdownBlocks",value:function(e){for(var t=this,o=new bl(e),n=!0,i=function(e){return!!/\\/.test(e)&&(o.positionthis.parent.fontOptions.maxWdt}},{key:"getLongestFit",value:function(e){for(var t="",o=0;o=this.elementOptions.scaling.label.maxVisible&&(d=+this.elementOptions.scaling.label.maxVisible/this.body.view.scale),this.calculateLabelSize(e,n,i,t,o,a),this._drawBackground(e),this._drawText(e,t,this.size.yLine,a,d))}}},{key:"_drawBackground",value:function(e){if(void 0!==this.fontOptions.background&&"none"!==this.fontOptions.background){e.fillStyle=this.fontOptions.background;var t=this.getSize();e.fillRect(t.left,t.top,t.width,t.height)}}},{key:"_drawText",value:function(e,t,o){var n=3this.size.labelHeight&&("top"===this.fontOptions.valign&&(o-=(this.size.height-this.size.labelHeight)/2),"bottom"===this.fontOptions.valign&&(o+=(this.size.height-this.size.labelHeight)/2));for(var r=0,l;rthis.imageObj.height?o=this.imageObj.width/this.imageObj.height:n=this.imageObj.height/this.imageObj.width),e=2*this.options.size*o,t=2*this.options.size*n}else e=this.imageObj.width,t=this.imageObj.height;this.width=e,this.height=t,this.radius=.5*this.width}},{key:"_drawRawCircle",value:function(e,t,o,n){this.initContextForDraw(e,n),e.circle(t,o,n.size),this.performFill(e,n)}},{key:"_drawImageAtPosition",value:function(e,t){if(0!=this.imageObj.width){e.globalAlpha=1,this.enableShadow(e,t);var o=1;!0===this.options.shapeProperties.interpolation&&(o=this.imageObj.width/this.width/this.body.view.scale),this.imageObj.drawImageAtPosition(e,o,this.left,this.top,this.width,this.height),this.disableShadow(e,t)}}},{key:"_drawImageLabel",value:function(e,t,o,n,i){var a=0,d;if(void 0!==this.height){a=.5*this.height;var s=this.labelModule.getTextSize(e,n,i);1<=s.lineCount&&(a+=s.height/2)}d=o+a,this.options.label&&(this.labelOffset=a),this.labelModule.draw(e,t,d,n,i,"hanging")}}]),t}(Tl),Ml=function(e){function t(e,o,n){var i;return al(this,t),i=xl(this,Sl(t).call(this,e,o,n)),i._setMargins(n),i}return Dl(t,e),dl(t,[{key:"resize",value:function(e){var t=1a.distance?" in "+e.printLocation(i.path,t,"")+"Perhaps it was misplaced? Matching option found at: "+e.printLocation(a.path,a.closestMatch,""):i.distance<=8?". Did you mean \""+i.closestMatch+"\"?"+e.printLocation(i.path,t):". Did you mean one of these: "+e.print(Object.keys(o))+e.printLocation(n,t):" in "+e.printLocation(i.path,t,"")+"Perhaps it was incomplete? Did you mean: \""+i.indexMatch+"\"?\n\n",console.log("%cUnknown option detected: \""+t+"\""+d,Gl),Vl=!0}},{key:"findInOptions",value:function(t,o,n){var i=!!(3p.distance&&(d=p.closestMatch,s=p.path,a=p.distance,l=p.indexMatch)}else-1!==c.toLowerCase().indexOf(r)&&(l=c),u=e.levenshteinDistance(t,c),a>u&&(d=c,s=Rd.copyArray(n),a=u)}return{closestMatch:d,path:s,distance:a,indexMatch:l}}},{key:"printLocation",value:function(e,t){for(var o=2e.left&&this.shape.tope.top}},{key:"isBoundingBoxOverlappingWith",value:function(e){return this.shape.boundingBox.lefte.left&&this.shape.boundingBox.tope.top}}],[{key:"updateGroupOptions",value:function(e,t,o){if(void 0!==o){var n=e.group;if(void 0!==t&&void 0!==t.group&&n!==t.group)throw new Error("updateGroupOptions: group values in options don't match.");if("number"==typeof n||"string"==typeof n&&""!=n){var i=o.get(n),a=["font"];void 0!==t&&void 0!==t.color&&null!=t.color&&a.push("color"),Rd.selectiveNotDeepExtend(a,e,i),e.color=Rd.parseColor(e.color)}}}},{key:"parseOptions",value:function(t,o){var n=!!(2=e.mass){var o="";void 0!==t&&(o=" in node id: "+t),console.log("%cNegative or zero mass disallowed"+o+", setting mass to 1.",Gl),e.mass=1}}}]),e}(),Zl=function(){function e(t,o,n,i){var a=this;if(al(this,e),this.body=t,this.images=o,this.groups=n,this.layoutEngine=i,this.body.functions.createNode=this.create.bind(this),this.nodesListeners={add:function(e,t){a.add(t.items)},update:function(e,t){a.update(t.items,t.data,t.oldData)},remove:function(e,t){a.remove(t.items)}},this.defaultOptions={borderWidth:1,borderWidthSelected:2,brokenImage:void 0,color:{border:"#2B7CE9",background:"#97C2FC",highlight:{border:"#2B7CE9",background:"#D2E5FF"},hover:{border:"#2B7CE9",background:"#D2E5FF"}},fixed:{x:!1,y:!1},font:{color:"#343434",size:14,face:"arial",background:"none",strokeWidth:0,strokeColor:"#ffffff",align:"center",vadjust:0,multi:!1,bold:{mod:"bold"},boldital:{mod:"bold italic"},ital:{mod:"italic"},mono:{mod:"",size:15,face:"monospace",vadjust:2}},group:void 0,hidden:!1,icon:{face:"FontAwesome",code:void 0,size:50,color:"#2B7CE9"},image:void 0,label:void 0,labelHighlightBold:!0,level:void 0,margin:{top:5,right:5,bottom:5,left:5},mass:1,physics:!0,scaling:{min:10,max:30,label:{enabled:!1,min:14,max:30,maxVisible:30,drawThreshold:5},customScalingFunction:function(e,t,o,n){if(t===e)return .5;return wo(0,(n-e)*(1/(t-e)))}},shadow:{enabled:!1,color:"rgba(0,0,0,0.5)",size:10,x:5,y:5},shape:"ellipse",shapeProperties:{borderDashes:!1,borderRadius:6,interpolation:!0,useImageSize:!1,useBorderWithImage:!1},size:25,title:void 0,value:void 0,x:void 0,y:void 0},0>=this.defaultOptions.mass)throw"Internal error: mass in defaultOptions of NodesHandler may not be zero or negative";this.options=Rd.bridgeObject(this.defaultOptions),this.bindEventListeners()}return dl(e,[{key:"bindEventListeners",value:function(){var e=this;this.body.emitter.on("refreshNodes",this.refresh.bind(this)),this.body.emitter.on("refresh",this.refresh.bind(this)),this.body.emitter.on("destroy",function(){Rd.forEach(e.nodesListeners,function(t,o){e.body.data.nodes&&e.body.data.nodes.off(o,t)}),delete e.body.functions.createNode,delete e.nodesListeners.add,delete e.nodesListeners.update,delete e.nodesListeners.remove,delete e.nodesListeners})}},{key:"setOptions",value:function(e){if(void 0!==e){if(Xl.parseOptions(this.options,e),void 0!==e.shape)for(var t in this.body.nodes)this.body.nodes.hasOwnProperty(t)&&this.body.nodes[t].updateShape();if(void 0!==e.font)for(var o in this.body.nodes)this.body.nodes.hasOwnProperty(o)&&(this.body.nodes[o].updateLabelModule(),this.body.nodes[o].needsRefresh());if(void 0!==e.size)for(var n in this.body.nodes)this.body.nodes.hasOwnProperty(n)&&this.body.nodes[n].needsRefresh();(void 0!==e.hidden||void 0!==e.physics)&&this.body.emitter.emit("_dataChanged")}}},{key:"setData",value:function(e){var t=!!(1t.shape.height?(n=t.x+.5*t.shape.width,i=t.y-o):(n=t.x+o,i=t.y-.5*t.shape.height),[n,i,o]}},{key:"_pointOnCircle",value:function(e,t,o,n){var i=2*n*bo;return{x:e+o*uo(i),y:t-o*po(i)}}},{key:"_findBorderPositionCircle",value:function(e,t,o){for(var n=o.x,i=o.y,a=o.low,d=o.high,s=o.direction,r=0,l=this.options.selfReferenceSize,c=.5*(a+d),u,p,h,g,m;a<=d&&r<10&&(c=.5*(a+d),u=this._pointOnCircle(n,i,l,c),p=_o(e.y-u.y,e.x-u.x),h=e.distanceToBorder(t,p),g=vo(go(u.x-e.x,2)+go(u.y-e.y,2)),m=h-g,!(fo(m)<.05));)0r&&(r=0);var l=e+r*d,c=t+r*s,p=l-i,h=c-a;return vo(p*p+h*h)}},{key:"getArrowData",value:function(e,t,o,n,i,a){var d=a.width,s,r,l,c,u,p,h;if("from"===t?(l=this.from,c=this.to,u=.1,p=a.fromArrowScale,h=a.fromArrowType):"to"===t?(l=this.to,c=this.from,u=-.1,p=a.toArrowScale,h=a.toArrowType):(l=this.to,c=this.from,p=a.middleArrowScale,h=a.middleArrowType),l==c){var g=this._getCircleData(e),m=hl(g,3),f=m[0],b=m[1],y=m[2];"from"===t?(r=this.findBorderPosition(this.from,e,{x:f,y:b,low:.25,high:.6,direction:-1}),s=-2*r.t*bo+1.5*bo+.1*bo):"to"===t?(r=this.findBorderPosition(this.from,e,{x:f,y:b,low:.6,high:1,direction:1}),s=-2*r.t*bo+1.5*bo-1.1*bo):(r=this._pointOnCircle(f,b,y,.175),s=3.9269908169872414)}else if("middle"===t)s=_o(l.y-c.y,l.x-c.x),r=this.getPoint(.5,o);else if(!0===this.options.smooth.enabled){r=this.findBorderPosition(l,e,{via:o});var _=this.getPoint(wo(0,xo(1,r.t+u)),o);s=_o(r.y-_.y,r.x-_.x)}else s=_o(l.y-c.y,l.x-c.x),r=this.findBorderPosition(l,e);"middle"===t&&0>p&&(d*=-1);var v=15*p+3*d,k=r.x-.9*v*uo(s),w=r.y-.9*v*po(s);return{point:r,core:{x:k,y:w},angle:s,length:v,type:h}}},{key:"drawArrowHead",value:function(e,t,o,n,i){e.strokeStyle=this.getColor(e,t,o,n),e.fillStyle=e.strokeStyle,e.lineWidth=t.width,rc.draw(e,i),this.enableShadow(e,t),e.fill(),this.disableShadow(e,t)}},{key:"enableShadow",value:function(e,t){!0===t.shadow&&(e.shadowColor=t.shadowColor,e.shadowBlur=t.shadowSize,e.shadowOffsetX=t.shadowX,e.shadowOffsetY=t.shadowY)}},{key:"disableShadow",value:function(e,t){!0===t.shadow&&(e.shadowColor="rgba(0,0,0,0)",e.shadowBlur=0,e.shadowOffsetX=0,e.shadowOffsetY=0)}},{key:"drawBackground",value:function(e,t){if(!1!==t.background){var o=["strokeStyle","lineWidth","dashes"],n={};o.forEach(function(t){n[t]=e[t]}),e.strokeStyle=t.backgroundColor,e.lineWidth=t.backgroundSize,this.setStrokeDashed(e,t.backgroundDashes),e.stroke(),o.forEach(function(t){e[t]=n[t]}),this.setStrokeDashed(e,t.dashes)}}},{key:"setStrokeDashed",value:function(e,t){if(!1===t)void 0===e.setLineDash?console.warn("setLineDash is not supported in this browser. The dashed stroke cannot be used."):e.setLineDash([]);else if(void 0!==e.setLineDash){var o=[5,5];!0===Array.isArray(t)&&(o=t),e.setLineDash(o)}else console.warn("setLineDash is not supported in this browser. The dashed stroke cannot be used.")}}]),e}(),cc=function(e){function t(e,o,n){return al(this,t),xl(this,Sl(t).call(this,e,o,n))}return Dl(t,e),dl(t,[{key:"_findBorderPositionBezier",value:function(e,t){var o=2p?!1===s?i=h:a=h:!1===s?a=h:i=h;n++}return r.t=h,r}},{key:"_getDistanceToBezierEdge",value:function(e,o,n,a,d,s,r){var l=1e9,c=e,u=o,p,h,g,m,f;for(h=1;10>h;h++)g=.1*h,m=go(1-g,2)*e+2*g*(1-g)*r.x+go(g,2)*n,f=go(1-g,2)*o+2*g*(1-g)*r.y+go(g,2)*a,0m;m++)f=.1*m,h[0]=go(1-f,3),h[1]=3*f*go(1-f,2),h[2]=3*go(f,2)*(1-f),h[3]=go(f,3),b=h[0]*e+h[1]*r.x+h[2]*l.x+h[3]*n,_=h[0]*o+h[1]*r.y+h[2]*l.y+h[3]*a,0fo(t)||!0===this.options.smooth.forceDirection||"horizontal"===this.options.smooth.forceDirection)&&"vertical"!==this.options.smooth.forceDirection?(i=this.from.y,d=this.to.y,n=this.from.x-o*e,a=this.to.x+o*e):(i=this.from.y-o*t,d=this.to.y+o*t,n=this.from.x,a=this.to.x),[{x:n,y:i},{x:a,y:d}]}},{key:"getViaNode",value:function(){return this._getViaCoordinates()}},{key:"_findBorderPosition",value:function(e,t){return this._findBorderPositionBezier(e,t)}},{key:"_getDistanceToEdge",value:function(e,t,o,n,i,a){var d=6this.to.x&&(d=-d),this.from.y>=this.to.y&&(s=-s),e=this.from.x+d,t=this.from.y+s,"discrete"===n&&(i<=a?e=ithis.to.x&&(v=-v),this.from.y>=this.to.y&&(k=-k),e=this.from.x+v,t=this.from.y+k,i<=a?this.from.x<=this.to.x?e=this.to.xe?this.to.x:e:this.from.y>=this.to.y?t=this.to.y>t?this.to.y:t:t=this.to.yo.shape.height?(s=o.x+.5*o.shape.width,r=o.y-d):(s=o.x+d,r=o.y-.5*o.shape.height),i=this._pointOnCircle(s,r,d,.125),this.labelModule.draw(e,i.x,i.y,this.selected,this.hover)}}}},{key:"getItemsOnPoint",value:function(e){var t=[];if(this.labelModule.visible()){var o=this._getRotation();ml.pointInRect(this.labelModule.getSize(),e,o)&&t.push({edgeId:this.id,labelId:0})}var n={left:e.x,top:e.y};return this.isOverlappingWith(n)&&t.push({edgeId:this.id}),t}},{key:"isOverlappingWith",value:function(e){if(this.connected){var t=this.from.x,o=this.from.y,n=this.to.x,i=this.to.y,a=e.left,d=e.top,s=this.edgeType.getDistanceToEdge(t,o,n,i,a,d);return 10>s}return!1}},{key:"_getRotation",value:function(e){var t=this.edgeType.getViaNode(),o=this.edgeType.getPoint(.5,t);void 0!==e&&this.labelModule.calculateLabelSize(e,this.selected,this.hover,o.x,o.y);var n={x:o.x,y:this.labelModule.size.yLine,angle:0};if(!this.labelModule.visible())return n;if("horizontal"===this.options.font.align)return n;var i=this.from.y-this.to.y,a=this.from.x-this.to.x,d=_o(i,a);return(-1>d&&0>a||0a)&&(d+=bo),n.angle=d,n}},{key:"_pointOnCircle",value:function(e,t,o,n){var i=2*n*bo;return{x:e+o*uo(i),y:t-o*po(i)}}},{key:"select",value:function(){this.selected=!0}},{key:"unselect",value:function(){this.selected=!1}},{key:"cleanup",value:function(){return this.edgeType.cleanup()}},{key:"remove",value:function(){this.cleanup(),this.disconnect(),delete this.body.edges[this.id]}},{key:"endPointsValid",value:function(){return void 0!==this.body.nodes[this.fromId]&&void 0!==this.body.nodes[this.toId]}}],[{key:"parseOptions",value:function(e,t){var o=!!(2this.thetaInversed?this._calculateForces(i,o,n,t,e):4===e.childrenCount?this._getForceContributions(e,t):e.children.data.id!=t.id&&this._calculateForces(i,o,n,t,e)}}},{key:"_calculateForces",value:function(e,t,o,n,i){0===e&&(e=.1,t=e),1>this.overlapAvoidanceFactor&&n.shape.radius&&(e=wo(.1+this.overlapAvoidanceFactor*n.shape.radius,e-n.shape.radius));var a=this.options.gravitationalConstant*i.mass*n.options.mass/go(e,3),d=t*a;this.physicsBody.forces[n.id].x+=d,this.physicsBody.forces[n.id].y+=o*a}},{key:"_formBarnesHutTree",value:function(e,t){for(var o=t.length,n=e[t[0]].x,a=e[t[0]].y,d=e[t[0]].x,s=e[t[0]].y,r=1,l;rd&&(d=u),ps&&(s=p))}var h=fo(d-n)-fo(s-a);0t.x?n.maxY>t.y?"NW":"SW":n.maxY>t.y?"NE":"SE",this._placeInRegion(e,t,i)}},{key:"_placeInRegion",value:function(e,t,o){var n=e.children[o];switch(n.childrenCount){case 0:n.children.data=t,n.childrenCount=1,this._updateBranchMass(n,t);break;case 1:n.children.data.x===t.x&&n.children.data.y===t.y?(t.x+=this.seededRandom(),t.y+=this.seededRandom()):(this._splitBranch(n),this._placeInTree(n,t));break;case 4:this._placeInTree(n,t);}}},{key:"_splitBranch",value:function(e){var t=null;1===e.childrenCount&&(t=e.children.data,e.mass=0,e.centerOfMass.x=0,e.centerOfMass.y=0),e.childrenCount=4,e.children.data=null,this._insertRegion(e,"NW"),this._insertRegion(e,"NE"),this._insertRegion(e,"SW"),this._insertRegion(e,"SE"),null!=t&&this._placeInTree(e,t)}},{key:"_insertRegion",value:function(e,t){var o=.5*e.size,n,i,a,d;"NW"===t?(n=e.range.minX,i=e.range.minX+o,a=e.range.minY,d=e.range.minY+o):"NE"===t?(n=e.range.minX+o,i=e.range.maxX,a=e.range.minY,d=e.range.minY+o):"SW"===t?(n=e.range.minX,i=e.range.minX+o,a=e.range.minY+o,d=e.range.maxY):"SE"===t?(n=e.range.minX+o,i=e.range.maxX,a=e.range.minY+o,d=e.range.maxY):void 0,e.children[t]={centerOfMass:{x:0,y:0},mass:0,range:{minX:n,maxX:i,minY:a,maxY:d},size:.5*e.size,calcSize:2*e.calcSize,children:{data:null},maxWidth:0,level:e.level+1,childrenCount:0}}},{key:"_debug",value:function(e,t){void 0!==this.barnesHutTree&&(e.lineWidth=1,this._drawBranch(this.barnesHutTree.root,e,t))}},{key:"_drawBranch",value:function(e,t,o){void 0===o&&(o="#FF0000"),4===e.childrenCount&&(this._drawBranch(e.children.NW,t),this._drawBranch(e.children.NE,t),this._drawBranch(e.children.SE,t),this._drawBranch(e.children.SW,t)),t.strokeStyle=o,t.beginPath(),t.moveTo(e.range.minX,e.range.minY),t.lineTo(e.range.maxX,e.range.minY),t.stroke(),t.beginPath(),t.moveTo(e.range.maxX,e.range.minY),t.lineTo(e.range.maxX,e.range.maxY),t.stroke(),t.beginPath(),t.moveTo(e.range.maxX,e.range.maxY),t.lineTo(e.range.minX,e.range.maxY),t.stroke(),t.beginPath(),t.moveTo(e.range.minX,e.range.maxY),t.lineTo(e.range.minX,e.range.minY),t.stroke()}}]),e}(),_c=function(){function e(t,o,n){al(this,e),this.body=t,this.physicsBody=o,this.setOptions(n)}return dl(e,[{key:"setOptions",value:function(e){this.options=e}},{key:"solve",value:function(){for(var e=this.body.nodes,t=this.physicsBody.physicsNodeIndices,o=this.physicsBody.forces,n=this.options.nodeDistance,a=0,d,s,r,l,c,u,p,h;athis.overlapAvoidanceFactor&&n.shape.radius&&(e=wo(.1+this.overlapAvoidanceFactor*n.shape.radius,e-n.shape.radius));var a=n.edges.length+1,d=this.options.gravitationalConstant*i.mass*n.options.mass*a/go(e,2),s=t*d;this.physicsBody.forces[n.id].x+=s,this.physicsBody.forces[n.id].y+=o*d}}]),t}(bc),Oc=function(e){function t(e,o,n){return al(this,t),xl(this,Sl(t).call(this,e,o,n))}return Dl(t,e),dl(t,[{key:"_calculateForces",value:function(e,t,o,n,i){if(0.3))return!1;return!0}},{key:"moveNodes",value:function(){for(var e=this.physicsBody.physicsNodeIndices,t=0,o=0,n=5,a=0;ai&&(e=0s.shape.boundingBox.left&&(a=s.shape.boundingBox.left),ds.shape.boundingBox.top&&(o=s.shape.boundingBox.top),ns.x&&(a=s.x),ds.y&&(o=s.y),n=e&&o.push(a.id);for(var d=0;dn?r.x:n,a=r.yd?r.y:d;return{x:.5*(o+n),y:.5*(a+d)}}},{key:"openCluster",value:function(e,t){var o=!(2n&&(n=d.edges.length),e+=d.edges.length,t+=go(d.edges.length,2),o+=1;e/=o,t/=o;var s=t-go(e,2),r=vo(s),l=ko(e+2*r);return l>n&&(l=n),l}},{key:"_createClusteredEdge",value:function(e,t,o,n,i){var a=Tc.cloneOptions(o,"edge");Rd.deepExtend(a,n),a.from=e,a.to=t,a.id="clusterEdge:"+Rd.randomUUID(),void 0!==i&&Rd.deepExtend(a,i);var d=this.body.functions.createEdge(a);return d.clusteringEdgeReplacingIds=[o.id],d.connect(),this.body.edges[d.id]=d,d}},{key:"_clusterEdges",value:function(e,t,o,n){if(t instanceof yc){var i=t,a={};a[i.id]=i,t=a}if(e instanceof Xl){var d=e,s={};s[d.id]=d,e=s}if(void 0===o||null===o)throw new Error("_clusterEdges: parameter clusterNode required");for(var r in void 0===n&&(n=o.clusterEdgeProperties),this._createClusterEdges(e,t,o,n),t)if(t.hasOwnProperty(r)&&void 0!==this.body.edges[r]){var l=this.body.edges[r];this._backupEdgeOptions(l),l.setOptions({physics:!1})}for(var c in e)e.hasOwnProperty(c)&&(this.clusteredNodes[c]={clusterId:o.id,node:this.body.nodes[c]},this.body.nodes[c].setOptions({physics:!1}))}},{key:"_getClusterNodeForNode",value:function(e){if(void 0!==e){var t=this.clusteredNodes[e];if(void 0!==t){var o=t.clusterId;return void 0===o?void 0:this.body.nodes[o]}}}},{key:"_filter",value:function(e,t){var o=[];return Rd.forEach(e,function(e){t(e)&&o.push(e)}),o}},{key:"_updateState",value:function(){var e=this,t=[],o={},i=function(t){Rd.forEach(e.body.nodes,function(e){!0===e.isCluster&&t(e)})},a;for(a in this.clusteredNodes)if(this.clusteredNodes.hasOwnProperty(a)){var d=this.body.nodes[a];void 0===d&&t.push(a)}i(function(e){for(var o=0;oo||!n&&2>o)&&t.push(e.id)});for(var o=0;o=e.indexOf("chrome")&&(this.requiresTimeout=!0):this.requiresTimeout=!0}else this.requiresTimeout=!0}}]),e}(),Ic=Le(function(e,t){t.onTouch=function(e,t){t.inputHandler=function(e){e.isFirst&&t(e)},e.on("hammer.input",t.inputHandler)},t.onRelease=function(e,t){return t.inputHandler=function(e){e.isFinal&&t(e)},e.on("hammer.input",t.inputHandler)},t.offTouch=function(e,t){e.off("hammer.input",t.inputHandler)},t.offRelease=t.offTouch,t.disablePreventDefaultVertically=function(e){return e.getTouchAction=function(){return["pan-y"]},e}}),Pc=Ic.onTouch,Fc=Ic.onRelease,Nc=Ic.offTouch,Yc=Ic.offRelease,Rc=Ic.disablePreventDefaultVertically,zc=function(){function e(t){al(this,e),this.body=t,this.pixelRatio=1,this.resizeTimer=void 0,this.resizeFunction=this._onResize.bind(this),this.cameraState={},this.initialized=!1,this.canvasViewCenter={},this.options={},this.defaultOptions={autoResize:!0,height:"100%",width:"100%"},Rd.extend(this.options,this.defaultOptions),this.bindEventListeners()}return dl(e,[{key:"bindEventListeners",value:function(){var e=this;this.body.emitter.once("resize",function(t){0!==t.width&&(e.body.view.translation.x=.5*t.width),0!==t.height&&(e.body.view.translation.y=.5*t.height)}),this.body.emitter.on("setSize",this.setSize.bind(this)),this.body.emitter.on("destroy",function(){e.hammerFrame.destroy(),e.hammer.destroy(),e._cleanUp()})}},{key:"setOptions",value:function(e){var t=this;if(void 0!==e){Rd.selectiveDeepExtend(["width","height","autoResize"],this.options,e)}!0===this.options.autoResize&&(this._cleanUp(),this.resizeTimer=setInterval(function(){var e=t.setSize();!0===e&&t.body.emitter.emit("_requestRedraw")},1e3),this.resizeFunction=this._onResize.bind(this),Rd.addEventListener(window,"resize",this.resizeFunction))}},{key:"_cleanUp",value:function(){void 0!==this.resizeTimer&&clearInterval(this.resizeTimer),Rd.removeEventListener(window,"resize",this.resizeFunction),this.resizeFunction=void 0}},{key:"_onResize",value:function(){this.setSize(),this.body.emitter.emit("_redraw")}},{key:"_getCameraState",value:function(){var e=0.5*this.body.nodeIndices.length)return void this.fit(e,!1);o=Tc.getRange(this.body.nodes,e.nodes);var s=this.body.nodeIndices.length;n=12.662/(s+7.4147)+.0964822;var r=xo(this.canvas.frame.canvas.clientWidth/600,this.canvas.frame.canvas.clientHeight/600);n*=r}else{this.body.emitter.emit("_resizeNodes"),o=Tc.getRange(this.body.nodes,e.nodes);var l=1.1*fo(o.maxX-o.minX),c=1.1*fo(o.maxY-o.minY),u=this.canvas.frame.canvas.clientWidth/l,p=this.canvas.frame.canvas.clientHeight/c;n=u<=p?u:p}1i-this.padding&&(s=!0),a=s?this.x-o:this.x,d=r?this.y-t:this.y}else d=this.y-t,d+t+this.padding>n&&(d=n-t-this.padding),di&&(a=i-o-this.padding),ae&&(e=1e-5),10t&&(n/=1-n),o*=1+n;var i=this.getPointer({x:e.clientX,y:e.clientY});this.zoom(o,i)}e.preventDefault()}}},{key:"onMouseMove",value:function(e){var t=this,o=this.getPointer({x:e.clientX,y:e.clientY}),n=!1;void 0!==this.popup&&(!1===this.popup.hidden&&this._checkHidePopup(o),!1===this.popup.hidden&&(n=!0,this.popup.setPosition(o.x+3,o.y-5),this.popup.show())),!1===this.options.keyboard.bindToWindow&&!0===this.options.keyboard.enabled&&this.canvas.frame.focus(),!1===n&&(void 0!==this.popupTimer&&(clearInterval(this.popupTimer),this.popupTimer=void 0),!this.drag.dragging&&(this.popupTimer=setTimeout(function(){return t._checkShowPopup(o)},this.options.tooltipDelay))),!0===this.options.hover&&this.selectionHandler.hoverObject(e,o)}},{key:"_checkShowPopup",value:function(e){var t=this.canvas._XconvertDOMtoCanvas(e.x),o=this.canvas._YconvertDOMtoCanvas(e.y),n={left:t,top:o,right:t,bottom:o},a=void 0===this.popupObj?void 0:this.popupObj.id,d=!1,s="node";if(void 0===this.popupObj){for(var r=this.body.nodeIndices,l=this.body.nodes,c=[],u=0,p;ue?100>e?10>e?0:1:1e4>e?1e3>e?2:3:4:1e7>e?1e6>e?5:6:1e9>e?1e8>e?7:8:9}function n(e,n){if(e===n)return 0;if(~~e===e&&~~n===n){if(0===e||0===n)return ee||0>n){if(0<=n)return-1;if(0<=e)return 1;e=-e,n=-n}var i=o(e),d=o(n),s=0;return id&&(n*=p[i-d-1],e/=10,s=1),e===n?s:e=32;)t|=1&e,e>>=1;return e+t}function a(e,t,o,n){var i=t+1;if(i===o)return 1;if(0>n(e[i++],e[t])){for(;in(e[i],e[i-1]);)i++;d(e,t,i)}else for(;i>>1;0>a(d,e[l])?r=l:s=l+1}var c=i-s;switch(c){case 3:e[s+3]=e[s+2];case 2:e[s+2]=e[s+1];case 1:e[s+1]=e[s];break;default:for(;0=r&&(r=s);r>s&&(r=s),d+=i,r+=i}else{for(s=i+1;r=a(e,t[o+i-r]);)d=r,r=(r<<1)+1,0>=r&&(r=s);r>s&&(r=s);var l=d;d=i-r,r=i-l}for(d++;d>>1);0a(e,t[o+i])){for(s=i+1;ra(e,t[o+i-r]);)d=r,r=(r<<1)+1,0>=r&&(r=s);r>s&&(r=s);var l=d;d=i-r,r=i-l}else{for(s=n-i;r=r&&(r=s);r>s&&(r=s),d+=i,r+=i}for(d++;d>>1);0>a(e,t[o+c])?r=c:d=c+1}return r}e.__esModule=!0,e.sort=function(e,t,o,d){if(!Array.isArray(e))throw new TypeError("Can only sort arrays");t?"function"!=typeof t&&(d=o,o=t,t=n):t=n,o||(o=0),d||(d=e.length);var r=d-o;if(!(2>r)){var l=0;if(32>r)return l=a(e,o,d,t),void s(e,o,d,o+l,t);var c=new h(e,t),u=i(r);do{if(l=a(e,o,d,t),lu&&(p=u),s(e,o,o+p,o+l,t),l=p}c.pushRun(o,l),c.mergeRuns(),r-=l,o+=l}while(0!==r);c.forceMergeRuns()}};var c=7,u=256,p=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9],h=function(){function e(o,n){t(this,e),this.array=null,this.compare=null,this.minGallop=c,this.length=0,this.tmpStorageLength=u,this.stackLength=0,this.runStart=null,this.runLength=null,this.stackSize=0,this.array=o,this.compare=n,this.length=o.length,this.length<2*u&&(this.tmpStorageLength=this.length>>>1),this.tmp=Array(this.tmpStorageLength),this.stackLength=120>this.length?5:1542>this.length?10:119151>this.length?19:40,this.runStart=Array(this.stackLength),this.runLength=Array(this.stackLength)}return e.prototype.pushRun=function(e,t){this.runStart[this.stackSize]=e,this.runLength[this.stackSize]=t,this.stackSize+=1},e.prototype.mergeRuns=function(){for(;1this.runLength[e+1])break;this.mergeAt(e)}},e.prototype.forceMergeRuns=function(){for(;1a(d[h],s[p])){if(d[g++]=d[h++],f++,y=0,0==--n){b=!0;break}}else if(d[g++]=s[p++],y++,f=0,1==--t){b=!0;break}while((y|f)=t){b=!0;break}}if(d[g++]=d[h++],0==--n){b=!0;break}if(f=r(s[p],d,h,n,0,a),0!==f){for(u=0;u=c||f>=c);if(b)break;0>m&&(m=0),m+=2}if(this.minGallop=m,1>m&&(this.minGallop=1),1===t){for(u=0;ua(s[h],d[p])){if(d[g--]=d[p--],b++,_=0,0==--t){v=!0;break}}else if(d[g--]=s[h--],_++,b=0,1==--n){v=!0;break}while((b|_)=n){v=!0;break}}if(d[g--]=d[p--],0==--t){v=!0;break}f--}while(b>=c||_>=c);if(v)break;0>f&&(f=0),f+=2}if(this.minGallop=f,1>f&&(this.minGallop=1),1===n){for(g-=t,p-=t,y=g+1,m=p+1,u=t-1;0<=u;u--)d[y+u]=d[m+u];d[g]=s[h]}else if(0===n)throw new Error("mergeHigh preconditions were not respected");else for(m=g-(n-1),u=0;uo.levelSeparation&&(o.levelSeparation*=-1),this.setDirectionStrategy(),this.body.emitter.emit("_resetHierarchicalLayout"),this.adaptAllOptionsForHierarchicalLayout(t);if(!0===n)return this.body.emitter.emit("refresh"),Rd.deepExtend(t,this.optionsBackup)}return t}},{key:"adaptAllOptionsForHierarchicalLayout",value:function(e){if(!0===this.options.hierarchical.enabled){var t=this.optionsBackup.physics;void 0===e.physics||!0===e.physics?(e.physics={enabled:void 0===t.enabled||t.enabled,solver:"hierarchicalRepulsion"},t.enabled=void 0===t.enabled||t.enabled,t.solver=t.solver||"barnesHut"):"object"===gl(e.physics)?(t.enabled=void 0===e.physics.enabled||e.physics.enabled,t.solver=e.physics.solver||"barnesHut",e.physics.solver="hierarchicalRepulsion"):!1!==e.physics&&(t.solver="barnesHut",e.physics={solver:"hierarchicalRepulsion"});var o=this.direction.curveType();if(void 0===e.edges)this.optionsBackup.edges={smooth:{enabled:!0,type:"dynamic"}},e.edges={smooth:!1};else if(void 0===e.edges.smooth)this.optionsBackup.edges={smooth:{enabled:!0,type:"dynamic"}},e.edges.smooth=!1;else if("boolean"==typeof e.edges.smooth)this.optionsBackup.edges={smooth:e.edges.smooth},e.edges.smooth={enabled:e.edges.smooth,type:o};else{var n=e.edges.smooth;void 0!==n.type&&"dynamic"!==n.type&&(o=n.type),this.optionsBackup.edges={smooth:void 0===n.enabled||n.enabled,type:void 0===n.type?"dynamic":n.type,roundness:void 0===n.roundness?.5:n.roundness,forceDirection:void 0!==n.forceDirection&&n.forceDirection},e.edges.smooth={enabled:void 0===n.enabled||n.enabled,type:o,roundness:void 0===n.roundness?.5:n.roundness,forceDirection:void 0!==n.forceDirection&&n.forceDirection}}this.body.emitter.emit("_forceDisableDynamicCurves",o)}return e}},{key:"seededRandom",value:function(){var e=1e4*po(this.randomSeed++);return e-ko(e)}},{key:"positionInitially",value:function(e){if(!0!==this.options.hierarchical.enabled){this.randomSeed=this.initialRandomSeed;for(var t=e.length+50,o=0;od){for(var r=e.length;e.length>d&&10>=a;){a+=1;var l=e.length;0==a%3?this.body.modules.clustering.clusterBridges(s):this.body.modules.clustering.clusterOutliers(s);var c=e.length;if(l==c&&0!=a%3)return this._declusterAll(),this.body.emitter.emit("_layoutFailed"),void console.info("This network could not be positioned by this version of the improved layout algorithm. Please disable improvedLayout for better performance.")}this.body.modules.kamadaKawai.setOptions({springLength:wo(150,2*r)})}10u){var p={},h={};s(o,p),s(n,h);var g=l(o,n),m=r(p,g),y=r(h,g),f=m[1],b=y[0],_=y[2],v=fo(f-b);if(v>u){var k=f-b+u;k<-_+u&&(k=-_+u),0>k&&(e._shiftBlock(n.id,k),t=!0,!0===i&&e._centerParent(n))}}},p=function(n,a){for(var d=a.id,l=a.edges,c=e.hierarchical.levels[a.id],u=e.options.hierarchical.levelSeparation*e.options.hierarchical.levelSeparation,p={},h=[],g=0,m;gp&&(h=-xo(-p,c-e.options.hierarchical.nodeSpacing)),0!=h&&(e._shiftBlock(a.id,h),t=!0)},k=function(o){var n=e.direction.getPosition(a),i=e._getSpaceAroundNode(a),d=hl(i,2),s=d[0],r=d[1],l=o-n,c=n;0l&&(c=wo(n-(s-e.options.hierarchical.nodeSpacing),o)),c!==n&&(e.direction.setPosition(a,c),t=!0)},w=_(n,h);v(w),w=_(n,l),k(w)},h=function(o){var n=e.hierarchical.getLevels();n=n.reverse();for(var a=0;ah&&fo(h)t&&void 0===this.positionedNodes[s.id]){var l=this.options.hierarchical.nodeSpacing,c=void 0;c=0==d?this.direction.getPosition(this.body.nodes[e]):this.direction.getPosition(n[d-1])+l,this.direction.setPosition(s,c,r),this._validatePositionAndContinue(s,r,c)}else return}var u=this._getCenterPosition(n);this.direction.setPosition(this.body.nodes[e],u,t)}}},{key:"_validatePositionAndContinue",value:function(e,t,o){if(this.hierarchical.isTree){if(void 0!==this.lastNodeOnLevel[t]){var n=this.direction.getPosition(this.body.nodes[this.lastNodeOnLevel[t]]);if(o-ne.hierarchical.levels[t.id]&&e.hierarchical.addRelation(t.id,o.id)}),this.hierarchical.checkIfTree()}},{key:"_crawlNetwork",value:function(){var e=this,t=0a;a++)for(d=0;dg?g+1:g;var m=c/this.r,s=Rd.RGBToHSV(this.color.r,this.color.g,this.color.b);s.h=g,s.s=m;var y=Rd.HSVToRGB(s.h,s.s,s.v);y.a=this.color.a,this.color=y,this.initialColorDiv.style.backgroundColor="rgba("+this.initialColor.r+","+this.initialColor.g+","+this.initialColor.b+","+this.initialColor.a+")",this.newColorDiv.style.backgroundColor="rgba("+this.color.r+","+this.color.g+","+this.color.b+","+this.color.a+")"}}]),e}(),eu=function(){function e(t,o,n){var i=3"+e+":":e+":",n}},{key:"_makeDropdown",value:function(e,t,o){var n=document.createElement("select");n.className="vis-configuration vis-config-select";var a=0;void 0!==t&&-1!==e.indexOf(t)&&(a=e.indexOf(t));for(var d=0,s;dt&&t*ca&&1!==a&&(s.max=yo(t*c),l=s.max,r="range increased"),s.value=t}else s.value=n;var u=document.createElement("input");u.className="vis-configuration vis-config-rangeinput",u.value=s.value;var p=this;s.onchange=function(){u.value=this.value,p._update(+this.value,o)},s.oninput=function(){u.value=this.value};var h=this._makeLabel(o[o.length-1],o),g=this._makeItem(o,h,s,u);""!=r&&this.popupHistory[g]!==l&&(this.popupHistory[g]=l,this._setupPopup(r,g))}},{key:"_makeButton",value:function(){var e=this;if(!0===this.options.showButton){var t=document.createElement("div");t.className="vis-configuration vis-config-button",t.innerHTML="generate options",t.onclick=function(){e._printOptions()},t.onmouseover=function(){t.className="vis-configuration vis-config-button hover"},t.onmouseout=function(){t.className="vis-configuration vis-config-button"},this.optionsContainer=document.createElement("div"),this.optionsContainer.className="vis-configuration vis-config-option-container",this.domElements.push(this.optionsContainer),this.domElements.push(t)}}},{key:"_setupPopup",value:function(e,t){var o=this;if(!0===this.initialized&&!0===this.allowCreation&&this.popupCountervar options = "+JSON.stringify(e,null,2)+""}},{key:"getOptions",value:function(){for(var e={},t=0;t.01&&i1&&u<5;){u+=1,this._moveNode(s,r,l);var g=this._getEnergy(s),m=hl(g,3);c=m[0],r=m[1],l=m[2]}}}},{key:"_getHighestEnergyNode",value:function(e){for(var t=this.body.nodeIndices,o=this.body.nodes,n=0,i=t[0],a=0,d=0,s=0,r;si&&(i*=-1,o-=i);var l=t.getSVGElement("rect",d,s);l.setAttributeNS(null,"x",e-.5*n),l.setAttributeNS(null,"y",o),l.setAttributeNS(null,"width",n),l.setAttributeNS(null,"height",i),l.setAttributeNS(null,"class",a),r&&l.setAttributeNS(null,"style",r)}}}),gu=hu.prepareElements,mu=hu.cleanupElements,yu=hu.resetElements,fu=hu.getSVGElement,bu=hu.getDOMElement,_u=hu.drawPoint,vu=hu.drawBar,ku=Object.freeze({default:hu,__moduleExports:hu,prepareElements:gu,cleanupElements:mu,resetElements:yu,getSVGElement:fu,getDOMElement:bu,drawPoint:_u,drawBar:vu}),wu=Le(function(e){(function(t,o){e.exports=o()})(_s,function(){function t(){return Ht.apply(null,arguments)}function o(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function n(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function i(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}function a(e){return void 0===e}function d(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function s(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function r(e,t){var o=[],n;for(n=0;nt.overflow&&!t.empty&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&o);if(e._strict&&(n=n&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour),null==Object.isFrozen||!Object.isFrozen(e))e._isValid=n;else return n}return e._isValid}function m(e){var t=u(NaN);return null==e?h(t).userInvalidated=!0:c(h(t),e),t}function y(e,t){var o,n,d;if(a(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),a(t._i)||(e._i=t._i),a(t._f)||(e._f=t._f),a(t._l)||(e._l=t._l),a(t._strict)||(e._strict=t._strict),a(t._tzm)||(e._tzm=t._tzm),a(t._isUTC)||(e._isUTC=t._isUTC),a(t._offset)||(e._offset=t._offset),a(t._pf)||(e._pf=h(t)),a(t._locale)||(e._locale=t._locale),0e?yo(e)||0:ko(e)}function v(e){var t=+e,o=0;return 0!=t&&isFinite(t)&&(o=_(t)),o}function k(e,t,o){var n=xo(e.length,t.length),a=fo(e.length-t.length),d=0,s;for(s=0;sa;++a)s=u([2e3,a]),this._shortMonthsParse[a]=this.monthsShort(s,"").toLocaleLowerCase(),this._longMonthsParse[a]=this.months(s,"").toLocaleLowerCase();return o?"MMM"===t?(d=No.call(this._shortMonthsParse,n),-1===d?null:d):(d=No.call(this._longMonthsParse,n),-1===d?null:d):"MMM"===t?(d=No.call(this._shortMonthsParse,n),-1!==d)?d:(d=No.call(this._longMonthsParse,n),-1===d?null:d):(d=No.call(this._longMonthsParse,n),-1!==d)?d:(d=No.call(this._shortMonthsParse,n),-1===d?null:d)}function ie(e,t,o){var n,a,d;if(this._monthsParseExact)return ne.call(this,e,t,o);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),n=0;12>n;n++){if(a=u([2e3,n]),o&&!this._longMonthsParse[n]&&(this._longMonthsParse[n]=new RegExp("^"+this.months(a,"").replace(".","")+"$","i"),this._shortMonthsParse[n]=new RegExp("^"+this.monthsShort(a,"").replace(".","")+"$","i")),o||this._monthsParse[n]||(d="^"+this.months(a,"")+"|^"+this.monthsShort(a,""),this._monthsParse[n]=new RegExp(d.replace(".",""),"i")),o&&"MMMM"===t&&this._longMonthsParse[n].test(e))return n;if(o&&"MMM"===t&&this._shortMonthsParse[n].test(e))return n;if(!o&&this._monthsParse[n].test(e))return n}}function ae(e,t){var o;if(!e.isValid())return e;if("string"==typeof t)if(/^\d+$/.test(t))t=v(t);else if(t=e.localeData().monthsParse(t),!d(t))return e;return o=xo(e.date(),oe(e.year(),t)),e._d["set"+(e._isUTC?"UTC":"")+"Month"](t,o),e}function de(e){return null==e?Q(this,"Month"):(ae(this,e),t.updateOffset(this,!0),this)}function se(){function e(e,t){return t.length-e.length}var t=[],o=[],n=[],a,d;for(a=0;12>a;a++)d=u([2e3,a]),t.push(this.monthsShort(d,"")),o.push(this.months(d,"")),n.push(this.months(d,"")),n.push(this.monthsShort(d,""));for(t.sort(e),o.sort(e),n.sort(e),a=0;12>a;a++)t[a]=V(t[a]),o[a]=V(o[a]);for(a=0;24>a;a++)n[a]=V(n[a]);this._monthsRegex=new RegExp("^("+n.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+o.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+t.join("|")+")","i")}function re(e,t,o,n,i,a,d){var s;return 100>e&&0<=e?(s=new Date(e+400,t,o,n,i,a,d),isFinite(s.getFullYear())&&s.setFullYear(e)):s=new Date(e,t,o,n,i,a,d),s}function le(e){var t;if(100>e&&0<=e){var o=Array.prototype.slice.call(arguments);o[0]=e+400,t=new Date(Date.UTC.apply(null,o)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)}else t=new Date(Date.UTC.apply(null,arguments));return t}function ce(e,t,o){var n=7+t-o,i=(7+le(e,0,n).getUTCDay()-t)%7;return-i+n-1}function ue(e,t,o,n,i){var a=ce(e,n,i),d=1+7*(t-1)+(7+o-n)%7+a,s,r;return 0>=d?(s=e-1,r=Z(s)+d):d>Z(e)?(s=e+1,r=d-Z(e)):(s=e,r=d),{year:s,dayOfYear:r}}function pe(e,t,o){var n=ce(e.year(),t,o),i=ko((e.dayOfYear()-n-1)/7)+1,a,d;return 1>i?(d=e.year()-1,a=i+he(d,t,o)):i>he(e.year(),t,o)?(a=i-he(e.year(),t,o),d=e.year()+1):(d=e.year(),a=i),{week:a,year:d}}function he(e,t,o){var n=ce(e,t,o),i=ce(e+1,t,o);return(Z(e)-n+i)/7}function ge(e,t){return"string"==typeof e?isNaN(e)?(e=t.weekdaysParse(e),"number"==typeof e?e:null):parseInt(e,10):e}function me(e,t){return"string"==typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function ye(e,t){return e.slice(t,7).concat(e.slice(0,t))}function fe(e,t,o){var n=e.toLocaleLowerCase(),a,d,s;if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],a=0;7>a;++a)s=u([2e3,1]).day(a),this._minWeekdaysParse[a]=this.weekdaysMin(s,"").toLocaleLowerCase(),this._shortWeekdaysParse[a]=this.weekdaysShort(s,"").toLocaleLowerCase(),this._weekdaysParse[a]=this.weekdays(s,"").toLocaleLowerCase();return o?"dddd"===t?(d=No.call(this._weekdaysParse,n),-1===d?null:d):"ddd"===t?(d=No.call(this._shortWeekdaysParse,n),-1===d?null:d):(d=No.call(this._minWeekdaysParse,n),-1===d?null:d):"dddd"===t?(d=No.call(this._weekdaysParse,n),-1!==d)?d:(d=No.call(this._shortWeekdaysParse,n),-1!==d)?d:(d=No.call(this._minWeekdaysParse,n),-1===d?null:d):"ddd"===t?(d=No.call(this._shortWeekdaysParse,n),-1!==d)?d:(d=No.call(this._weekdaysParse,n),-1!==d)?d:(d=No.call(this._minWeekdaysParse,n),-1===d?null:d):(d=No.call(this._minWeekdaysParse,n),-1!==d)?d:(d=No.call(this._weekdaysParse,n),-1!==d)?d:(d=No.call(this._shortWeekdaysParse,n),-1===d?null:d)}function be(e,t,o){var n,a,d;if(this._weekdaysParseExact)return fe.call(this,e,t,o);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),n=0;7>n;n++){if(a=u([2e3,1]).day(n),o&&!this._fullWeekdaysParse[n]&&(this._fullWeekdaysParse[n]=new RegExp("^"+this.weekdays(a,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[n]=new RegExp("^"+this.weekdaysShort(a,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[n]=new RegExp("^"+this.weekdaysMin(a,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[n]||(d="^"+this.weekdays(a,"")+"|^"+this.weekdaysShort(a,"")+"|^"+this.weekdaysMin(a,""),this._weekdaysParse[n]=new RegExp(d.replace(".",""),"i")),o&&"dddd"===t&&this._fullWeekdaysParse[n].test(e))return n;if(o&&"ddd"===t&&this._shortWeekdaysParse[n].test(e))return n;if(o&&"dd"===t&&this._minWeekdaysParse[n].test(e))return n;if(!o&&this._weekdaysParse[n].test(e))return n}}function _e(){function e(e,t){return t.length-e.length}var t=[],o=[],n=[],a=[],d,s,r,l,c;for(d=0;7>d;d++)s=u([2e3,1]).day(d),r=this.weekdaysMin(s,""),l=this.weekdaysShort(s,""),c=this.weekdays(s,""),t.push(r),o.push(l),n.push(c),a.push(r),a.push(l),a.push(c);for(t.sort(e),o.sort(e),n.sort(e),a.sort(e),d=0;7>d;d++)o[d]=V(o[d]),n[d]=V(n[d]),a[d]=V(a[d]);this._weekdaysRegex=new RegExp("^("+a.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+o.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+t.join("|")+")","i")}function ve(){return this.hours()%12||12}function ke(e,t){z(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function we(e,t){return t._meridiemParse}function xe(e){return e?e.toLowerCase().replace("_","-"):e}function Se(e){for(var t=0,o,n,a,d;t=o&&k(d,n,!0)>=o-1)break;o--}t++}return Ko}function Oe(t){var o=null;if(!Ho[t]&&!0&&e&&e.exports)try{o=Ko._abbr;Be("./locale/"+t),De(o)}catch(t){}return Ho[t]}function De(e,t){var o;return e&&(o=a(t)?Ee(e):Te(e,t),o?Ko=o:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),Ko._abbr}function Te(e,t){if(null!==t){var o=Ao,n;if(t.abbr=e,null!=Ho[e])S("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),o=Ho[e]._config;else if(null!=t.parentLocale)if(null!=Ho[t.parentLocale])o=Ho[t.parentLocale]._config;else if(n=Oe(t.parentLocale),null!=n)o=n._config;else return jo[t.parentLocale]||(jo[t.parentLocale]=[]),jo[t.parentLocale].push({name:e,config:t}),null;return Ho[e]=new E(T(o,t)),jo[e]&&jo[e].forEach(function(e){Te(e.name,e.config)}),De(e),Ho[e]}return delete Ho[e],null}function Ee(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return Ko;if(!o(e)){if(t=Oe(e),t)return t;e=[e]}return Se(e)}function Ce(){return Gt(Ho)}function Me(e){var t=e._a,o;return t&&-2===h(e).overflow&&(o=0>t[1]||11t[2]||t[2]>oe(t[0],t[1])?2:0>t[3]||24t[4]||59t[5]||59t[6]||999o||2Z(s)||0===e._dayOfYear)&&(h(e)._overflowDayOfYear=!0),n=le(s,0,e._dayOfYear),e._a[1]=n.getUTCMonth(),e._a[2]=n.getUTCDate()),o=0;3>o&&null==e._a[o];++o)e._a[o]=t[o]=a[o];for(;7>o;o++)e._a[o]=t[o]=null==e._a[o]?2===o?1:0:e._a[o];24===e._a[3]&&0===e._a[4]&&0===e._a[5]&&0===e._a[6]&&(e._nextDay=!0,e._a[3]=0),e._d=(e._useUTC?le:re).apply(null,t),d=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[3]=24),e._w&&"undefined"!=typeof e._w.d&&e._w.d!==d&&(h(e).weekdayMismatch=!0)}}function Ne(e){var t,o,n,i,a,d,s,r;if(t=e._w,null!=t.GG||null!=t.W||null!=t.E)a=1,d=4,o=Ie(t.GG,e._a[0],pe(Qe(),1,4).year),n=Ie(t.W,1),i=Ie(t.E,1),(1>i||7t.e||6i||6n||n>he(o,a,d)?h(e)._overflowWeeks=!0:null==r?(s=ue(o,n,i,a,d),e._a[0]=s.year,e._dayOfYear=s.dayOfYear):h(e)._overflowWeekday=!0}function Ye(e){var t=e._i,o=Wo.exec(t)||Uo.exec(t),n,a,d,s,r,c;if(o){for(h(e).iso=!0,n=0,a=Go.length;n=t?2e3+t:999>=t?1900+t:t}function Le(e){return e.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function Ae(e,t,o){if(e){var n=zo.indexOf(e),i=new Date(t[0],t[1],t[2]).getDay();if(n!==i)return h(o).weekdayMismatch=!0,o._isValid=!1,!1}return!0}function He(e,t,o){if(e)return $o[e];if(t)return 0;var n=parseInt(o,10),i=n%100;return 60*((n-i)/100)+i}function je(e){var t=Zo.exec(Le(e._i));if(t){var o=Re(t[4],t[3],t[2],t[5],t[6],t[7]);if(!Ae(t[1],o,e))return;e._a=o,e._tzm=He(t[8],t[9],t[10]),e._d=le.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),h(e).rfc2822=!0}else e._isValid=!1}function We(e){var o=Xo.exec(e._i);if(null!==o)return void(e._d=new Date(+o[1]));if(Ye(e),!1===e._isValid)delete e._isValid;else return;if(je(e),!1===e._isValid)delete e._isValid;else return;t.createFromInputFallback(e)}function Ue(e){if(e._f===t.ISO_8601)return void Ye(e);if(e._f===t.RFC_2822)return void je(e);e._a=[],h(e).empty=!0;var o=""+e._i,n=o.length,a=0,d,s,r,l,c;for(r=H(e._f,e._locale).match($t)||[],d=0;d=e._a[3]&&!0===h(e).bigHour&&0t&&(t+=12),n||12!==t||(t=0),t):e.meridiemHour(t,o)}function Ge(e){var t,o,n,a,d;if(0===e._f.length)return h(e).invalidFormat=!0,void(e._d=new Date(NaN));for(a=0;ae?-1*ho(-1*e):ho(e)}function it(e,t){z(e,0,0,function(){var e=this.utcOffset(),o="+";return 0>e&&(e=-e,o="-"),o+R(~~(e/60),2)+t+R(~~e%60,2)})}function at(e,t){var o=(t||"").match(e);if(null===o)return null;var n=o[o.length-1]||[],i=(n+"").match(tn)||["-",0,0],a=+(60*i[1])+v(i[2]);return 0===a?0:"+"===i[0]?a:-a}function dt(e,o){var n,i;return o._isUTC?(n=o.clone(),i=(b(e)||s(e)?e.valueOf():Qe(e).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+i),t.updateOffset(n,!1),n):Qe(e).local()}function st(e){return 15*-ho(e._d.getTimezoneOffset()/15)}function rt(){if(!a(this._isDSTShifted))return this._isDSTShifted;var e={};if(y(e,this),e=Ze(e),e._a){var t=e._isUTC?u(e._a):Qe(e._a);this._isDSTShifted=this.isValid()&&0t-n?(i=e.clone().add(o-1,"months"),a=(t-n)/(n-i)):(i=e.clone().add(o+1,"months"),a=(t-n)/(i-n)),-(o+a)||0}function ft(e){var t;return void 0===e?this._locale._abbr:(t=Ee(e),null!=t&&(this._locale=t),this)}function bt(){return this._locale}function _t(e,t){return(e%t+t)%t}function vt(e,t,o){return 100>e&&0<=e?new Date(e+400,t,o)-12622780800000:new Date(e,t,o).valueOf()}function kt(e,t,o){return 100>e&&0<=e?Date.UTC(e+400,t,o)-12622780800000:Date.UTC(e,t,o)}function wt(e,t){z(0,[e,e.length],0,t)}function xt(e,t,o,n,i){var a;return null==e?pe(this,n,i).year:(a=he(e,n,i),t>a&&(t=a),St.call(this,e,t,o,n,i))}function St(e,t,o,n,i){var a=ue(e,t,o,n,i),d=le(a.year,0,a.dayOfYear);return this.year(d.getUTCFullYear()),this.month(d.getUTCMonth()),this.date(d.getUTCDate()),this}function Ot(e,t){t[6]=v(1e3*("0."+e))}function Dt(e){return e}function Tt(e,t,o,n){var i=Ee(),a=u().set(n,t);return i[o](a,e)}function Et(e,t,o){if(d(e)&&(t=e,e=void 0),e=e||"",null!=t)return Tt(e,t,o,"month");var n=[],a;for(a=0;12>a;a++)n[a]=Tt(e,a,o,"month");return n}function Ct(e,t,o,n){"boolean"==typeof e?(d(t)&&(o=t,t=void 0),t=t||""):(t=e,o=t,e=!1,d(t)&&(o=t,t=void 0),t=t||"");var a=Ee(),s=e?a._week.dow:0;if(null!=o)return Tt(t,(o+s)%7,n,"day");var r=[],l;for(l=0;7>l;l++)r[l]=Tt(t,(l+s)%7,n,"day");return r}function Mt(e,t,o,n){var i=ct(t,o);return e._milliseconds+=n*i._milliseconds,e._days+=n*i._days,e._months+=n*i._months,e._bubble()}function It(e){return 0>e?ko(e):yo(e)}function Pt(e){return 4800*e/146097}function Ft(e){return 146097*e/4800}function Nt(e){return function(){return this.as(e)}}function Yt(e){return function(){return this.isValid()?this._data[e]:NaN}}function Rt(e,t,o,n,i){return i.relativeTime(t||1,!!o,e,n)}function zt(e,t,o){var n=ct(e).abs(),i=Pn(n.as("s")),d=Pn(n.as("m")),s=Pn(n.as("h")),r=Pn(n.as("d")),l=Pn(n.as("M")),c=Pn(n.as("y")),u=i<=Fn.ss&&["s",i]||i=d&&["m"]||d=s&&["h"]||s=r&&["d"]||r=l&&["M"]||l=c&&["y"]||["yy",c];return u[2]=t,u[3]=0<+e,u[4]=o,Rt.apply(null,u)}function Bt(e){return void 0===e?Pn:"function"==typeof e&&(Pn=e,!0)}function Lt(e){return(0e)||+e}function At(){if(!this.isValid())return this.localeData().invalidDate();var e=Nn(this._milliseconds)/1e3,t=Nn(this._days),o=Nn(this._months),n,i,a;n=_(e/60),i=_(n/60),e%=60,n%=60,a=_(o/12),o%=12;var d=a,r=o,l=t,c=i,u=n,p=e?e.toFixed(3).replace(/\.?0+$/,""):"",s=this.asSeconds();if(!s)return"P0D";var h=0>s?"-":"",g=Lt(this._months)===Lt(s)?"":"-",m=Lt(this._days)===Lt(s)?"":"-",y=Lt(this._milliseconds)===Lt(s)?"":"-";return h+"P"+(d?g+d+"Y":"")+(r?g+r+"M":"")+(l?m+l+"D":"")+(c||u||p?"T":"")+(c?y+c+"H":"")+(u?y+u+"M":"")+(p?y+p+"S":"")}var Ht,jt;jt=Array.prototype.some?Array.prototype.some:function(e){for(var o=Object(this),t=o.length>>>0,n=0;n=e?""+e:"+"+e}),z(0,["YY",2],0,function(){return this.year()%100}),z(0,["YYYY",4],0,"year"),z(0,["YYYYY",5],0,"year"),z(0,["YYYYYY",6,!0],0,"year"),I("year","y"),N("year",1),j("Y",mo),j("YY",ao,to),j("YYYY",co,no),j("YYYYY",uo,io),j("YYYYYY",uo,io),G(["YYYYY","YYYYYY"],To),G("YYYY",function(e,o){o[To]=2===e.length?t.parseTwoDigitYear(e):v(e)}),G("YY",function(e,o){o[To]=t.parseTwoDigitYear(e)}),G("Y",function(e,t){t[To]=parseInt(e,10)}),t.parseTwoDigitYear=function(e){return v(e)+(68this?this:e:m()}),en=["year","quarter","month","week","day","hour","minute","second","millisecond"];it("Z",":"),it("ZZ",""),j("Z",_o),j("ZZ",_o),G(["Z","ZZ"],function(e,t,o){o._useUTC=!0,o._tzm=at(_o,e)});var tn=/([\+\-]|\d\d)/gi;t.updateOffset=function(){};var on=/^(\-|\+)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,nn=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;ct.fn=tt.prototype,ct.invalid=function(){return ct(NaN)};var an=gt(1,"add"),dn=gt(-1,"subtract");t.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",t.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var sn=x("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return void 0===e?this.localeData():this.locale(e)});z(0,["gg",2],0,function(){return this.weekYear()%100}),z(0,["GG",2],0,function(){return this.isoWeekYear()%100}),wt("gggg","weekYear"),wt("ggggg","weekYear"),wt("GGGG","isoWeekYear"),wt("GGGGG","isoWeekYear"),I("weekYear","gg"),I("isoWeekYear","GG"),N("weekYear",1),N("isoWeekYear",1),j("G",mo),j("g",mo),j("GG",ao,to),j("gg",ao,to),j("GGGG",co,no),j("gggg",co,no),j("GGGGG",uo,io),j("ggggg",uo,io),q(["gggg","ggggg","GGGG","GGGGG"],function(e,t,o,n){t[n.substr(0,2)]=v(e)}),q(["gg","GG"],function(e,o,n,i){o[i]=t.parseTwoDigitYear(e)}),z("Q",0,"Qo","quarter"),I("quarter","Q"),N("quarter",7),j("Q",eo),G("Q",function(e,t){t[Eo]=3*(v(e)-1)}),z("D",["DD",2],"Do","date"),I("date","D"),N("date",9),j("D",ao),j("DD",ao,to),j("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient}),G(["D","DD"],Co),G("Do",function(e,t){t[Co]=v(e.match(ao)[0])});var rn=K("Date",!0);z("DDD",["DDDD",3],"DDDo","dayOfYear"),I("dayOfYear","DDD"),N("dayOfYear",4),j("DDD",lo),j("DDDD",oo),G(["DDD","DDDD"],function(e,t,o){o._dayOfYear=v(e)}),z("m",["mm",2],0,"minute"),I("minute","m"),N("minute",14),j("m",ao),j("mm",ao,to),G(["m","mm"],Io);var ln=K("Minutes",!1);z("s",["ss",2],0,"second"),I("second","s"),N("second",15),j("s",ao),j("ss",ao,to),G(["s","ss"],Po);var cn=K("Seconds",!1);z("S",0,0,function(){return~~(this.millisecond()/100)}),z(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),z(0,["SSS",3],0,"millisecond"),z(0,["SSSS",4],0,function(){return 10*this.millisecond()}),z(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),z(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),z(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),z(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),z(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),I("millisecond","ms"),N("millisecond",16),j("S",lo,eo),j("SS",lo,to),j("SSS",lo,oo);var un;for(un="SSSS";9>=un.length;un+="S")j(un,po);for(un="S";9>=un.length;un+="S")G(un,Ot);var pn=K("Milliseconds",!1);z("z",0,0,"zoneAbbr"),z("zz",0,0,"zoneName");var hn=f.prototype;hn.add=an,hn.calendar=function(e,o){var n=e||Qe(),i=dt(n,this).startOf("day"),a=t.calendarFormat(this,i)||"sameElse",d=o&&(O(o[a])?o[a].call(this,n):o[a]);return this.format(d||this.localeData().calendar(a,this,Qe(n)))},hn.clone=function(){return new f(this)},hn.diff=function(e,t,o){var n,i,a;return this.isValid()?(n=dt(e,this),!n.isValid())?NaN:(i=6e4*(n.utcOffset()-this.utcOffset()),t=P(t),(a="year"===t?yt(this,n)/12:"month"===t?yt(this,n):"quarter"===t?yt(this,n)/3:"second"===t?(this-n)/1e3:"minute"===t?(this-n)/6e4:"hour"===t?(this-n)/36e5:"day"===t?(this-n-i)/864e5:"week"===t?(this-n-i)/6048e5:this-n,o?a:_(a))):NaN},hn.endOf=function(e){var o;if(e=P(e),void 0===e||"millisecond"===e||!this.isValid())return this;var n=this._isUTC?kt:vt;return"year"===e?o=n(this.year()+1,0,1)-1:"quarter"===e?o=n(this.year(),this.month()-this.month()%3+3,1)-1:"month"===e?o=n(this.year(),this.month()+1,1)-1:"week"===e?o=n(this.year(),this.month(),this.date()-this.weekday()+7)-1:"isoWeek"===e?o=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1:"day"===e||"date"===e?o=n(this.year(),this.month(),this.date()+1)-1:"hour"===e?(o=this._d.valueOf(),o+=3600000-_t(o+(this._isUTC?0:60000*this.utcOffset()),3600000)-1):"minute"===e?(o=this._d.valueOf(),o+=60000-_t(o,60000)-1):"second"===e?(o=this._d.valueOf(),o+=1000-_t(o,1000)-1):void 0,this._d.setTime(o),t.updateOffset(this,!0),this},hn.format=function(e){e||(e=this.isUtc()?t.defaultFormatUtc:t.defaultFormat);var o=A(this,e);return this.localeData().postformat(o)},hn.from=function(e,t){return this.isValid()&&(b(e)&&e.isValid()||Qe(e).isValid())?ct({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},hn.fromNow=function(e){return this.from(Qe(),e)},hn.to=function(e,t){return this.isValid()&&(b(e)&&e.isValid()||Qe(e).isValid())?ct({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},hn.toNow=function(e){return this.to(Qe(),e)},hn.get=function(e){return e=P(e),O(this[e])?this[e]():this},hn.invalidAt=function(){return h(this).overflow},hn.isAfter=function(e,t){var o=b(e)?e:Qe(e);return!!(this.isValid()&&o.isValid())&&(t=P(t)||"millisecond","millisecond"===t?this.valueOf()>o.valueOf():o.valueOf()o.year()||9999=this.year()?"YYYY":"YYYYYY",i=t+"[\")]";return this.format(o+n+"-MM-DD[T]HH:mm:ss.SSS"+i)},hn.toJSON=function(){return this.isValid()?this.toISOString():null},hn.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},hn.unix=function(){return ko(this.valueOf()/1e3)},hn.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},hn.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},hn.year=Fo,hn.isLeapYear=function(){return $(this.year())},hn.weekYear=function(e){return xt.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},hn.isoWeekYear=function(e){return xt.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)},hn.quarter=hn.quarters=function(e){return null==e?yo((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)},hn.month=de,hn.daysInMonth=function(){return oe(this.year(),this.month())},hn.week=hn.weeks=function(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")},hn.isoWeek=hn.isoWeeks=function(e){var t=pe(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")},hn.weeksInYear=function(){var e=this.localeData()._week;return he(this.year(),e.dow,e.doy)},hn.isoWeeksInYear=function(){return he(this.year(),1,4)},hn.date=rn,hn.day=hn.days=function(e){if(!this.isValid())return null==e?NaN:this;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return null==e?t:(e=ge(e,this.localeData()),this.add(e-t,"d"))},hn.weekday=function(e){if(!this.isValid())return null==e?NaN:this;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")},hn.isoWeekday=function(e){if(!this.isValid())return null==e?NaN:this;if(null!=e){var t=me(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7},hn.dayOfYear=function(e){var t=ho((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")},hn.hour=hn.hours=Lo,hn.minute=hn.minutes=ln,hn.second=hn.seconds=cn,hn.millisecond=hn.milliseconds=pn,hn.utcOffset=function(e,o,n){var i=this._offset||0,a;if(!this.isValid())return null==e?NaN:this;if(null!=e){if("string"!=typeof e)16>fo(e)&&!n&&(e*=60);else if(e=at(_o,e),null===e)return this;return!this._isUTC&&o&&(a=st(this)),this._offset=e,this._isUTC=!0,null!=a&&this.add(a,"m"),i!==e&&(!o||this._changeInProgress?mt(this,ct(e-i,"m"),1,!1):!this._changeInProgress&&(this._changeInProgress=!0,t.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?i:st(this)},hn.utc=function(e){return this.utcOffset(0,e)},hn.local=function(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(st(this),"m")),this},hn.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var e=at(bo,this._i);null==e?this.utcOffset(0,!0):this.utcOffset(e)}return this},hn.hasAlignedHourOffset=function(e){return!!this.isValid()&&(e=e?Qe(e).utcOffset():0,0==(this.utcOffset()-e)%60)},hn.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},hn.isLocal=function(){return!!this.isValid()&&!this._isUTC},hn.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},hn.isUtc=lt,hn.isUTC=lt,hn.zoneAbbr=function(){return this._isUTC?"UTC":""},hn.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},hn.dates=x("dates accessor is deprecated. Use date instead.",rn),hn.months=x("months accessor is deprecated. Use month instead",de),hn.years=x("years accessor is deprecated. Use year instead",Fo),hn.zone=x("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",function(e,t){return null==e?-this.utcOffset():("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this)}),hn.isDSTShifted=x("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",rt);var gn=E.prototype;gn.calendar=C,gn.longDateFormat=M,gn.invalidDate=function(){return this._invalidDate},gn.ordinal=function(e){return this._ordinal.replace("%d",e)},gn.preparse=Dt,gn.postformat=Dt,gn.relativeTime=function(e,t,o,n){var i=this._relativeTime[o];return O(i)?i(e,t,o,n):i.replace(/%d/i,e)},gn.pastFuture=function(e,t){var o=this._relativeTime[0=e&&0>=t&&0>=o||(e+=864e5*It(Ft(o)+t),t=0,o=0),n.milliseconds=e%1e3,i=_(e/1e3),n.seconds=i%60,a=_(i/60),n.minutes=a%60,d=_(a/60),n.hours=d%24,t+=_(d/24),r=_(Pt(t)),o+=r,t-=It(Ft(r)),s=_(o/12),o%=12,n.days=t,n.months=o,n.years=s,this},Yn.clone=function(){return ct(this)},Yn.get=function(e){return e=P(e),this.isValid()?this[e+"s"]():NaN},Yn.milliseconds=On,Yn.seconds=Dn,Yn.minutes=Tn,Yn.hours=En,Yn.days=Cn,Yn.weeks=function(){return _(this.days()/7)},Yn.months=Mn,Yn.years=In,Yn.humanize=function(e){if(!this.isValid())return this.localeData().invalidDate();var t=this.localeData(),o=zt(this,!e,t);return e&&(o=t.pastFuture(+this,o)),t.postformat(o)},Yn.toISOString=At,Yn.toString=At,Yn.toJSON=At,Yn.locale=ft,Yn.localeData=bt,Yn.toIsoString=x("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",At),Yn.lang=sn,z("X",0,0,"unix"),z("x",0,0,"valueOf"),j("x",mo),j("X",vo),G("X",function(e,t,o){o._d=new Date(1e3*parseFloat(e,10))}),G("x",function(e,t,o){o._d=new Date(v(e))}),t.version="2.24.0",function(e){Ht=e}(Qe),t.fn=hn,t.min=function(){var e=[].slice.call(arguments,0);return Je("isBefore",e)},t.max=function(){var e=[].slice.call(arguments,0);return Je("isAfter",e)},t.now=function(){return Date.now?Date.now():+new Date},t.utc=u,t.unix=function(e){return Qe(1e3*e)},t.months=function(e,t){return Et(e,t,"months")},t.isDate=s,t.locale=De,t.invalid=m,t.duration=ct,t.isMoment=b,t.weekdays=function(e,t,o){return Ct(e,t,o,"weekdays")},t.parseZone=function(){return Qe.apply(null,arguments).parseZone()},t.localeData=Ee,t.isDuration=ot,t.monthsShort=function(e,t){return Et(e,t,"monthsShort")},t.weekdaysMin=function(e,t,o){return Ct(e,t,o,"weekdaysMin")},t.defineLocale=Te,t.updateLocale=function(e,t){if(null!=t){var o=Ao,n,i;i=Oe(e),null!=i&&(o=i._config),t=T(o,t),n=new E(t),n.parentLocale=Ho[e],Ho[e]=n,De(e)}else null!=Ho[e]&&(null==Ho[e].parentLocale?null!=Ho[e]&&delete Ho[e]:Ho[e]=Ho[e].parentLocale);return Ho[e]},t.locales=Ce,t.weekdaysShort=function(e,t,o){return Ct(e,t,o,"weekdaysShort")},t.normalizeUnits=P,t.relativeTimeRounding=Bt,t.relativeTimeThreshold=function(e,t){return void 0!==Fn[e]&&(void 0===t?Fn[e]:(Fn[e]=t,"s"===e&&(Fn.ss=t-1),!0))},t.calendarFormat=function(e,t){var o=e.diff(t,"days",!0);return-6>o?"sameElse":-1>o?"lastWeek":0>o?"lastDay":1>o?"sameDay":2>o?"nextDay":7>o?"nextWeek":"sameElse"},t.prototype=hn,t.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},t})}),xu="undefined"!=typeof window&&window.moment||wu,Su=Object.freeze({default:xu,__moduleExports:xu}),Ou={Images:rl,dotparser:Ns,gephiParser:Ys,allOptions:cu,convertDot:Ps,convertGephi:ut},Du=Object.freeze({util:zd,data:bs,network:Ou,DOMutil:ku,moment:Su,Hammer:nl,keycharm:Bs,DataSet:ys,DataView:fs,Queue:ps,Network:co});e.DOMutil=ku,e.DataSet=ys,e.DataView=fs,e.Hammer=nl,e.Network=co,e.Queue=ps,e.data=bs,e.default=Du,e.keycharm=Bs,e.moment=Su,e.network=Ou,e.util=zd,Object.defineProperty(e,"__esModule",{value:!0})}); +//# sourceMappingURL=vis-network.min.js.map diff --git a/node_modules/vis-network/dist/vis-network.min.js.map b/node_modules/vis-network/dist/vis-network.min.js.map new file mode 100644 index 0000000000000000000000000000000000000000..9eed3ccb9bbb50836d22444e163c523a57903e71 --- /dev/null +++ b/node_modules/vis-network/dist/vis-network.min.js.map @@ -0,0 +1 @@ +{"version":3,"file":"vis-network.min.js","sources":["../lib/network/shapes.js","../node_modules/vis-util/dist/esm.js","../node_modules/vis-data/dist/esm.js","../lib/network/dotparser.js","../lib/network/gephiParser.ts","../lib/shared/Activator.js","../node_modules/@babel/runtime/helpers/createClass.js","../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js","../node_modules/@babel/runtime/helpers/slicedToArray.js","../lib/network/modules/CanvasRenderer.js","../lib/network/Network.js","../node_modules/component-emitter/index.js","../node_modules/keycharm/keycharm.js","../node_modules/@egjs/hammerjs/dist/hammer.esm.js","../lib/module/hammer.js","../lib/network/locales.js","../node_modules/@babel/runtime/helpers/classCallCheck.js","../lib/network/CachedImage.js","../lib/network/Images.js","../lib/network/modules/Groups.js","../node_modules/@babel/runtime/helpers/arrayWithHoles.js","../node_modules/@babel/runtime/helpers/nonIterableRest.js","../node_modules/@babel/runtime/helpers/typeof.js","../lib/network/modules/components/shared/ComponentUtil.js","../lib/network/modules/components/shared/LabelAccumulator.js","../lib/network/modules/components/shared/LabelSplitter.js","../lib/network/modules/components/shared/Label.js","../node_modules/@babel/runtime/helpers/assertThisInitialized.js","../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js","../node_modules/@babel/runtime/helpers/getPrototypeOf.js","../node_modules/@babel/runtime/helpers/setPrototypeOf.js","../node_modules/@babel/runtime/helpers/inherits.js","../lib/network/modules/components/nodes/util/NodeBase.js","../lib/network/modules/components/nodes/shapes/Box.js","../lib/network/modules/components/nodes/util/CircleImageBase.js","../lib/network/modules/components/nodes/shapes/Circle.js","../lib/network/modules/components/nodes/shapes/CircularImage.js","../lib/network/modules/components/nodes/shapes/Database.js","../lib/network/modules/components/nodes/util/ShapeBase.js","../lib/network/modules/components/nodes/shapes/Diamond.js","../lib/network/modules/components/nodes/shapes/Dot.js","../lib/network/modules/components/nodes/shapes/Ellipse.js","../lib/network/modules/components/nodes/shapes/Icon.js","../lib/network/modules/components/nodes/shapes/Image.js","../lib/network/modules/components/nodes/shapes/Square.js","../lib/network/modules/components/nodes/shapes/Hexagon.js","../lib/network/modules/components/nodes/shapes/Star.js","../lib/network/modules/components/nodes/shapes/Text.js","../lib/network/modules/components/nodes/shapes/Triangle.js","../lib/network/modules/components/nodes/shapes/TriangleDown.js","../lib/shared/Validator.js","../lib/network/modules/components/Node.js","../lib/network/modules/NodesHandler.js","../lib/network/modules/components/edges/util/EndPoints.js","../lib/network/modules/components/edges/util/EdgeBase.js","../lib/network/modules/components/edges/util/BezierEdgeBase.js","../lib/network/modules/components/edges/util/CubicBezierEdgeBase.js","../lib/network/modules/components/edges/CubicBezierEdge.js","../lib/network/modules/components/edges/BezierEdgeDynamic.js","../lib/network/modules/components/edges/BezierEdgeStatic.js","../lib/network/modules/components/edges/StraightEdge.js","../lib/network/modules/components/Edge.js","../lib/network/modules/EdgesHandler.js","../lib/network/modules/components/physics/BarnesHutSolver.js","../lib/network/modules/components/physics/RepulsionSolver.js","../lib/network/modules/components/physics/HierarchicalRepulsionSolver.js","../lib/network/modules/components/physics/SpringSolver.js","../lib/network/modules/components/physics/HierarchicalSpringSolver.js","../lib/network/modules/components/physics/CentralGravitySolver.js","../lib/network/modules/components/physics/FA2BasedRepulsionSolver.js","../lib/network/modules/components/physics/FA2BasedCentralGravitySolver.js","../lib/network/modules/PhysicsEngine.js","../lib/network/NetworkUtil.js","../lib/network/modules/components/nodes/Cluster.js","../lib/network/modules/Clustering.js","../lib/hammerUtil.js","../lib/network/modules/Canvas.js","../lib/network/modules/View.js","../lib/network/modules/components/NavigationHandler.js","../lib/shared/Popup.js","../lib/network/modules/InteractionHandler.js","../lib/network/modules/SelectionHandler.js","../node_modules/timsort/build/timsort.js","../node_modules/timsort/index.js","../lib/network/modules/components/DirectionStrategy.js","../lib/network/modules/LayoutEngine.js","../lib/network/modules/ManipulationSystem.js","../lib/shared/ColorPicker.js","../lib/shared/Configurator.js","../lib/network/options.js","../lib/network/modules/components/algorithms/FloydWarshall.js","../lib/network/modules/KamadaKawai.js","../lib/DOMutil.js","../node_modules/moment/moment.js","../lib/module/moment.js","../lib/index.ts"],"sourcesContent":["/**\n * Canvas shapes used by Network\n */\nif (typeof CanvasRenderingContext2D !== 'undefined') {\n\n /**\n * Draw a circle shape\n *\n * @param {number} x\n * @param {number} y\n * @param {number} r\n */\n CanvasRenderingContext2D.prototype.circle = function (x, y, r) {\n this.beginPath();\n this.arc(x, y, r, 0, 2 * Math.PI, false);\n this.closePath();\n };\n\n /**\n * Draw a square shape\n * @param {number} x horizontal center\n * @param {number} y vertical center\n * @param {number} r size, width and height of the square\n */\n CanvasRenderingContext2D.prototype.square = function (x, y, r) {\n this.beginPath();\n this.rect(x - r, y - r, r * 2, r * 2);\n this.closePath();\n };\n\n /**\n * Draw a triangle shape\n * @param {number} x horizontal center\n * @param {number} y vertical center\n * @param {number} r radius, half the length of the sides of the triangle\n */\n CanvasRenderingContext2D.prototype.triangle = function (x, y, r) {\n // http://en.wikipedia.org/wiki/Equilateral_triangle\n this.beginPath();\n\n // the change in radius and the offset is here to center the shape\n r *= 1.15;\n y += 0.275 * r;\n\n var s = r * 2;\n var s2 = s / 2;\n var ir = Math.sqrt(3) / 6 * s; // radius of inner circle\n var h = Math.sqrt(s * s - s2 * s2); // height\n\n\n this.moveTo(x, y - (h - ir));\n this.lineTo(x + s2, y + ir);\n this.lineTo(x - s2, y + ir);\n this.lineTo(x, y - (h - ir));\n this.closePath();\n\n\n };\n\n /**\n * Draw a triangle shape in downward orientation\n * @param {number} x horizontal center\n * @param {number} y vertical center\n * @param {number} r radius\n */\n CanvasRenderingContext2D.prototype.triangleDown = function (x, y, r) {\n // http://en.wikipedia.org/wiki/Equilateral_triangle\n this.beginPath();\n\n // the change in radius and the offset is here to center the shape\n r *= 1.15;\n y -= 0.275 * r;\n\n var s = r * 2;\n var s2 = s / 2;\n var ir = Math.sqrt(3) / 6 * s; // radius of inner circle\n var h = Math.sqrt(s * s - s2 * s2); // height\n\n this.moveTo(x, y + (h - ir));\n this.lineTo(x + s2, y - ir);\n this.lineTo(x - s2, y - ir);\n this.lineTo(x, y + (h - ir));\n this.closePath();\n };\n\n /**\n * Draw a star shape, a star with 5 points\n * @param {number} x horizontal center\n * @param {number} y vertical center\n * @param {number} r radius, half the length of the sides of the triangle\n */\n CanvasRenderingContext2D.prototype.star = function (x, y, r) {\n // http://www.html5canvastutorials.com/labs/html5-canvas-star-spinner/\n this.beginPath();\n\n // the change in radius and the offset is here to center the shape\n r *= 0.82;\n y += 0.1 * r;\n\n for (var n = 0; n < 10; n++) {\n var radius = (n % 2 === 0) ? r * 1.3 : r * 0.5;\n this.lineTo(\n x + radius * Math.sin(n * 2 * Math.PI / 10),\n y - radius * Math.cos(n * 2 * Math.PI / 10)\n );\n }\n\n this.closePath();\n };\n\n /**\n * Draw a Diamond shape\n * @param {number} x horizontal center\n * @param {number} y vertical center\n * @param {number} r radius, half the length of the sides of the triangle\n */\n CanvasRenderingContext2D.prototype.diamond = function (x, y, r) {\n // http://www.html5canvastutorials.com/labs/html5-canvas-star-spinner/\n this.beginPath();\n\n this.lineTo(x, y + r);\n this.lineTo(x + r, y);\n this.lineTo(x, y - r);\n this.lineTo(x - r, y);\n\n\n this.closePath();\n };\n\n /**\n * http://stackoverflow.com/questions/1255512/how-to-draw-a-rounded-rectangle-on-html-canvas\n *\n * @param {number} x\n * @param {number} y\n * @param {number} w\n * @param {number} h\n * @param {number} r\n */\n CanvasRenderingContext2D.prototype.roundRect = function (x, y, w, h, r) {\n var r2d = Math.PI / 180;\n if (w - ( 2 * r ) < 0) {\n r = ( w / 2 );\n } //ensure that the radius isn't too large for x\n if (h - ( 2 * r ) < 0) {\n r = ( h / 2 );\n } //ensure that the radius isn't too large for y\n this.beginPath();\n this.moveTo(x + r, y);\n this.lineTo(x + w - r, y);\n this.arc(x + w - r, y + r, r, r2d * 270, r2d * 360, false);\n this.lineTo(x + w, y + h - r);\n this.arc(x + w - r, y + h - r, r, 0, r2d * 90, false);\n this.lineTo(x + r, y + h);\n this.arc(x + r, y + h - r, r, r2d * 90, r2d * 180, false);\n this.lineTo(x, y + r);\n this.arc(x + r, y + r, r, r2d * 180, r2d * 270, false);\n this.closePath();\n };\n\n /**\n * http://stackoverflow.com/questions/2172798/how-to-draw-an-oval-in-html5-canvas\n *\n * Postfix '_vis' added to discern it from standard method ellipse().\n *\n * @param {number} x\n * @param {number} y\n * @param {number} w\n * @param {number} h\n */\n CanvasRenderingContext2D.prototype.ellipse_vis = function (x, y, w, h) {\n var kappa = .5522848,\n ox = (w / 2) * kappa, // control point offset horizontal\n oy = (h / 2) * kappa, // control point offset vertical\n xe = x + w, // x-end\n ye = y + h, // y-end\n xm = x + w / 2, // x-middle\n ym = y + h / 2; // y-middle\n\n this.beginPath();\n this.moveTo(x, ym);\n this.bezierCurveTo(x, ym - oy, xm - ox, y, xm, y);\n this.bezierCurveTo(xm + ox, y, xe, ym - oy, xe, ym);\n this.bezierCurveTo(xe, ym + oy, xm + ox, ye, xm, ye);\n this.bezierCurveTo(xm - ox, ye, x, ym + oy, x, ym);\n this.closePath();\n };\n\n\n /**\n * http://stackoverflow.com/questions/2172798/how-to-draw-an-oval-in-html5-canvas\n *\n * @param {number} x\n * @param {number} y\n * @param {number} w\n * @param {number} h\n */\n CanvasRenderingContext2D.prototype.database = function (x, y, w, h) {\n var f = 1 / 3;\n var wEllipse = w;\n var hEllipse = h * f;\n\n var kappa = .5522848,\n ox = (wEllipse / 2) * kappa, // control point offset horizontal\n oy = (hEllipse / 2) * kappa, // control point offset vertical\n xe = x + wEllipse, // x-end\n ye = y + hEllipse, // y-end\n xm = x + wEllipse / 2, // x-middle\n ym = y + hEllipse / 2, // y-middle\n ymb = y + (h - hEllipse / 2), // y-midlle, bottom ellipse\n yeb = y + h; // y-end, bottom ellipse\n\n this.beginPath();\n this.moveTo(xe, ym);\n\n this.bezierCurveTo(xe, ym + oy, xm + ox, ye, xm, ye);\n this.bezierCurveTo(xm - ox, ye, x, ym + oy, x, ym);\n\n this.bezierCurveTo(x, ym - oy, xm - ox, y, xm, y);\n this.bezierCurveTo(xm + ox, y, xe, ym - oy, xe, ym);\n\n this.lineTo(xe, ymb);\n\n this.bezierCurveTo(xe, ymb + oy, xm + ox, yeb, xm, yeb);\n this.bezierCurveTo(xm - ox, yeb, x, ymb + oy, x, ymb);\n\n this.lineTo(x, ym);\n };\n\n\n /**\n * Sets up the dashedLine functionality for drawing\n * Original code came from http://stackoverflow.com/questions/4576724/dotted-stroke-in-canvas\n * @author David Jordan\n * @date 2012-08-08\n *\n * @param {number} x\n * @param {number} y\n * @param {number} x2\n * @param {number} y2\n * @param {string} pattern\n */\n CanvasRenderingContext2D.prototype.dashedLine = function (x, y, x2, y2, pattern) {\n this.beginPath();\n this.moveTo(x, y);\n\n var patternLength = pattern.length;\n var dx = (x2 - x);\n var dy = (y2 - y);\n var slope = dy / dx;\n var distRemaining = Math.sqrt(dx * dx + dy * dy);\n var patternIndex = 0;\n var draw = true;\n var xStep = 0;\n var dashLength = pattern[0];\n\n while (distRemaining >= 0.1) {\n dashLength = pattern[patternIndex++ % patternLength];\n if (dashLength > distRemaining) {\n dashLength = distRemaining;\n }\n\n xStep = Math.sqrt(dashLength * dashLength / (1 + slope * slope));\n xStep = dx < 0 ? -xStep : xStep;\n x += xStep;\n y += slope * xStep;\n\n if (draw === true) {this.lineTo(x,y);}\n else {this.moveTo(x,y);}\n\n distRemaining -= dashLength;\n draw = !draw;\n }\n };\n\n /**\n * Draw a Hexagon shape with 6 sides\n * @param {Number} x horizontal center\n * @param {Number} y vertical center\n * @param {Number} r radius\n */\n CanvasRenderingContext2D.prototype.hexagon = function (x, y, r) {\n this.beginPath();\n var sides = 6;\n var a = (Math.PI*2)/sides;\n this.moveTo(x+r,y);\n for (var i = 1; i < sides; i++) {\n this.lineTo(x+r*Math.cos(a*i),y+r*Math.sin(a*i));\n }\n this.closePath();\n };\n}\n","var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};\n\nfunction commonjsRequire () {\n\tthrow new Error('Dynamic requires are not currently supported by rollup-plugin-commonjs');\n}\n\nfunction createCommonjsModule(fn, module) {\n\treturn module = { exports: {} }, fn(module, module.exports), module.exports;\n}\n\nvar _global = createCommonjsModule(function (module) {\n // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028\n var global = module.exports = typeof window != 'undefined' && window.Math == Math ? window : typeof self != 'undefined' && self.Math == Math ? self // eslint-disable-next-line no-new-func\n : Function('return this')();\n if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef\n});\n\nvar _core = createCommonjsModule(function (module) {\n var core = module.exports = {\n version: '2.6.9'\n };\n if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef\n});\nvar _core_1 = _core.version;\n\nvar _library = false;\n\nvar _shared = createCommonjsModule(function (module) {\n var SHARED = '__core-js_shared__';\n var store = _global[SHARED] || (_global[SHARED] = {});\n (module.exports = function (key, value) {\n return store[key] || (store[key] = value !== undefined ? value : {});\n })('versions', []).push({\n version: _core.version,\n mode: 'global',\n copyright: '© 2019 Denis Pushkarev (zloirock.ru)'\n });\n});\n\nvar id = 0;\nvar px = Math.random();\n\nvar _uid = function (key) {\n return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));\n};\n\nvar _wks = createCommonjsModule(function (module) {\n var store = _shared('wks');\n var Symbol = _global.Symbol;\n var USE_SYMBOL = typeof Symbol == 'function';\n\n var $exports = module.exports = function (name) {\n return store[name] || (store[name] = USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : _uid)('Symbol.' + name));\n };\n\n $exports.store = store;\n});\n\nvar f = _wks;\nvar _wksExt = {\n f: f\n};\n\nvar _isObject = function (it) {\n return typeof it === 'object' ? it !== null : typeof it === 'function';\n};\n\nvar _anObject = function (it) {\n if (!_isObject(it)) throw TypeError(it + ' is not an object!');\n return it;\n};\n\nvar _fails = function (exec) {\n try {\n return !!exec();\n } catch (e) {\n return true;\n }\n};\n\nvar _descriptors = !_fails(function () {\n return Object.defineProperty({}, 'a', {\n get: function () {\n return 7;\n }\n }).a != 7;\n});\n\nvar document$1 = _global.document; // typeof document.createElement is 'object' in old IE\n\nvar is = _isObject(document$1) && _isObject(document$1.createElement);\n\nvar _domCreate = function (it) {\n return is ? document$1.createElement(it) : {};\n};\n\nvar _ie8DomDefine = !_descriptors && !_fails(function () {\n return Object.defineProperty(_domCreate('div'), 'a', {\n get: function () {\n return 7;\n }\n }).a != 7;\n});\n\n// instead of the ES6 spec version, we didn't implement @@toPrimitive case\n// and the second argument - flag - preferred type is a string\n\nvar _toPrimitive = function (it, S) {\n if (!_isObject(it)) return it;\n var fn, val;\n if (S && typeof (fn = it.toString) == 'function' && !_isObject(val = fn.call(it))) return val;\n if (typeof (fn = it.valueOf) == 'function' && !_isObject(val = fn.call(it))) return val;\n if (!S && typeof (fn = it.toString) == 'function' && !_isObject(val = fn.call(it))) return val;\n throw TypeError(\"Can't convert object to primitive value\");\n};\n\nvar dP = Object.defineProperty;\nvar f$1 = _descriptors ? Object.defineProperty : function defineProperty(O, P, Attributes) {\n _anObject(O);\n P = _toPrimitive(P, true);\n _anObject(Attributes);\n if (_ie8DomDefine) try {\n return dP(O, P, Attributes);\n } catch (e) {\n /* empty */\n }\n if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!');\n if ('value' in Attributes) O[P] = Attributes.value;\n return O;\n};\nvar _objectDp = {\n f: f$1\n};\n\nvar defineProperty = _objectDp.f;\n\nvar _wksDefine = function (name) {\n var $Symbol = _core.Symbol || (_core.Symbol = _global.Symbol || {});\n if (name.charAt(0) != '_' && !(name in $Symbol)) defineProperty($Symbol, name, {\n value: _wksExt.f(name)\n });\n};\n\n_wksDefine('asyncIterator');\n\nvar hasOwnProperty = {}.hasOwnProperty;\n\nvar _has = function (it, key) {\n return hasOwnProperty.call(it, key);\n};\n\nvar _propertyDesc = function (bitmap, value) {\n return {\n enumerable: !(bitmap & 1),\n configurable: !(bitmap & 2),\n writable: !(bitmap & 4),\n value: value\n };\n};\n\nvar _hide = _descriptors ? function (object, key, value) {\n return _objectDp.f(object, key, _propertyDesc(1, value));\n} : function (object, key, value) {\n object[key] = value;\n return object;\n};\n\nvar _functionToString = _shared('native-function-to-string', Function.toString);\n\nvar _redefine = createCommonjsModule(function (module) {\n var SRC = _uid('src');\n var TO_STRING = 'toString';\n var TPL = ('' + _functionToString).split(TO_STRING);\n\n _core.inspectSource = function (it) {\n return _functionToString.call(it);\n };\n\n (module.exports = function (O, key, val, safe) {\n var isFunction = typeof val == 'function';\n if (isFunction) _has(val, 'name') || _hide(val, 'name', key);\n if (O[key] === val) return;\n if (isFunction) _has(val, SRC) || _hide(val, SRC, O[key] ? '' + O[key] : TPL.join(String(key)));\n\n if (O === _global) {\n O[key] = val;\n } else if (!safe) {\n delete O[key];\n _hide(O, key, val);\n } else if (O[key]) {\n O[key] = val;\n } else {\n _hide(O, key, val);\n } // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative\n\n })(Function.prototype, TO_STRING, function toString() {\n return typeof this == 'function' && this[SRC] || _functionToString.call(this);\n });\n});\n\nvar _aFunction = function (it) {\n if (typeof it != 'function') throw TypeError(it + ' is not a function!');\n return it;\n};\n\nvar _ctx = function (fn, that, length) {\n _aFunction(fn);\n if (that === undefined) return fn;\n\n switch (length) {\n case 1:\n return function (a) {\n return fn.call(that, a);\n };\n\n case 2:\n return function (a, b) {\n return fn.call(that, a, b);\n };\n\n case 3:\n return function (a, b, c) {\n return fn.call(that, a, b, c);\n };\n }\n\n return function ()\n /* ...args */\n {\n return fn.apply(that, arguments);\n };\n};\n\nvar PROTOTYPE = 'prototype';\n\nvar $export = function (type, name, source) {\n var IS_FORCED = type & $export.F;\n var IS_GLOBAL = type & $export.G;\n var IS_STATIC = type & $export.S;\n var IS_PROTO = type & $export.P;\n var IS_BIND = type & $export.B;\n var target = IS_GLOBAL ? _global : IS_STATIC ? _global[name] || (_global[name] = {}) : (_global[name] || {})[PROTOTYPE];\n var exports = IS_GLOBAL ? _core : _core[name] || (_core[name] = {});\n var expProto = exports[PROTOTYPE] || (exports[PROTOTYPE] = {});\n var key, own, out, exp;\n if (IS_GLOBAL) source = name;\n\n for (key in source) {\n // contains in native\n own = !IS_FORCED && target && target[key] !== undefined; // export native or passed\n\n out = (own ? target : source)[key]; // bind timers to global for call from export context\n\n exp = IS_BIND && own ? _ctx(out, _global) : IS_PROTO && typeof out == 'function' ? _ctx(Function.call, out) : out; // extend global\n\n if (target) _redefine(target, key, out, type & $export.U); // export\n\n if (exports[key] != out) _hide(exports, key, exp);\n if (IS_PROTO && expProto[key] != out) expProto[key] = out;\n }\n};\n\n_global.core = _core; // type bitmap\n\n$export.F = 1; // forced\n\n$export.G = 2; // global\n\n$export.S = 4; // static\n\n$export.P = 8; // proto\n\n$export.B = 16; // bind\n\n$export.W = 32; // wrap\n\n$export.U = 64; // safe\n\n$export.R = 128; // real proto method for `library`\n\nvar _export = $export;\n\nvar _meta = createCommonjsModule(function (module) {\n var META = _uid('meta');\n var setDesc = _objectDp.f;\n var id = 0;\n\n var isExtensible = Object.isExtensible || function () {\n return true;\n };\n\n var FREEZE = !_fails(function () {\n return isExtensible(Object.preventExtensions({}));\n });\n\n var setMeta = function (it) {\n setDesc(it, META, {\n value: {\n i: 'O' + ++id,\n // object ID\n w: {} // weak collections IDs\n\n }\n });\n };\n\n var fastKey = function (it, create) {\n // return primitive with prefix\n if (!_isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it;\n\n if (!_has(it, META)) {\n // can't set metadata to uncaught frozen object\n if (!isExtensible(it)) return 'F'; // not necessary to add metadata\n\n if (!create) return 'E'; // add missing metadata\n\n setMeta(it); // return object ID\n }\n\n return it[META].i;\n };\n\n var getWeak = function (it, create) {\n if (!_has(it, META)) {\n // can't set metadata to uncaught frozen object\n if (!isExtensible(it)) return true; // not necessary to add metadata\n\n if (!create) return false; // add missing metadata\n\n setMeta(it); // return hash weak collections IDs\n }\n\n return it[META].w;\n }; // add metadata on freeze-family methods calling\n\n\n var onFreeze = function (it) {\n if (FREEZE && meta.NEED && isExtensible(it) && !_has(it, META)) setMeta(it);\n return it;\n };\n\n var meta = module.exports = {\n KEY: META,\n NEED: false,\n fastKey: fastKey,\n getWeak: getWeak,\n onFreeze: onFreeze\n };\n});\nvar _meta_1 = _meta.KEY;\nvar _meta_2 = _meta.NEED;\nvar _meta_3 = _meta.fastKey;\nvar _meta_4 = _meta.getWeak;\nvar _meta_5 = _meta.onFreeze;\n\nvar def = _objectDp.f;\nvar TAG = _wks('toStringTag');\n\nvar _setToStringTag = function (it, tag, stat) {\n if (it && !_has(it = stat ? it : it.prototype, TAG)) def(it, TAG, {\n configurable: true,\n value: tag\n });\n};\n\nvar toString = {}.toString;\n\nvar _cof = function (it) {\n return toString.call(it).slice(8, -1);\n};\n\n// eslint-disable-next-line no-prototype-builtins\n\nvar _iobject = Object('z').propertyIsEnumerable(0) ? Object : function (it) {\n return _cof(it) == 'String' ? it.split('') : Object(it);\n};\n\n// 7.2.1 RequireObjectCoercible(argument)\nvar _defined = function (it) {\n if (it == undefined) throw TypeError(\"Can't call method on \" + it);\n return it;\n};\n\nvar _toIobject = function (it) {\n return _iobject(_defined(it));\n};\n\n// 7.1.4 ToInteger\nvar ceil = Math.ceil;\nvar floor = Math.floor;\n\nvar _toInteger = function (it) {\n return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);\n};\n\nvar min = Math.min;\n\nvar _toLength = function (it) {\n return it > 0 ? min(_toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991\n};\n\nvar max = Math.max;\nvar min$1 = Math.min;\n\nvar _toAbsoluteIndex = function (index, length) {\n index = _toInteger(index);\n return index < 0 ? max(index + length, 0) : min$1(index, length);\n};\n\n// true -> Array#includes\n\nvar _arrayIncludes = function (IS_INCLUDES) {\n return function ($this, el, fromIndex) {\n var O = _toIobject($this);\n var length = _toLength(O.length);\n var index = _toAbsoluteIndex(fromIndex, length);\n var value; // Array#includes uses SameValueZero equality algorithm\n // eslint-disable-next-line no-self-compare\n\n if (IS_INCLUDES && el != el) while (length > index) {\n value = O[index++]; // eslint-disable-next-line no-self-compare\n\n if (value != value) return true; // Array#indexOf ignores holes, Array#includes - not\n } else for (; length > index; index++) if (IS_INCLUDES || index in O) {\n if (O[index] === el) return IS_INCLUDES || index || 0;\n }\n return !IS_INCLUDES && -1;\n };\n};\n\nvar shared = _shared('keys');\n\nvar _sharedKey = function (key) {\n return shared[key] || (shared[key] = _uid(key));\n};\n\nvar arrayIndexOf = _arrayIncludes(false);\nvar IE_PROTO = _sharedKey('IE_PROTO');\n\nvar _objectKeysInternal = function (object, names) {\n var O = _toIobject(object);\n var i = 0;\n var result = [];\n var key;\n\n for (key in O) if (key != IE_PROTO) _has(O, key) && result.push(key); // Don't enum bug & hidden keys\n\n\n while (names.length > i) if (_has(O, key = names[i++])) {\n ~arrayIndexOf(result, key) || result.push(key);\n }\n\n return result;\n};\n\n// IE 8- don't enum bug keys\nvar _enumBugKeys = 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'.split(',');\n\nvar _objectKeys = Object.keys || function keys(O) {\n return _objectKeysInternal(O, _enumBugKeys);\n};\n\nvar f$2 = Object.getOwnPropertySymbols;\nvar _objectGops = {\n f: f$2\n};\n\nvar f$3 = {}.propertyIsEnumerable;\nvar _objectPie = {\n f: f$3\n};\n\nvar _enumKeys = function (it) {\n var result = _objectKeys(it);\n var getSymbols = _objectGops.f;\n\n if (getSymbols) {\n var symbols = getSymbols(it);\n var isEnum = _objectPie.f;\n var i = 0;\n var key;\n\n while (symbols.length > i) if (isEnum.call(it, key = symbols[i++])) result.push(key);\n }\n\n return result;\n};\n\nvar _isArray = Array.isArray || function isArray(arg) {\n return _cof(arg) == 'Array';\n};\n\nvar _toObject = function (it) {\n return Object(_defined(it));\n};\n\nvar _objectDps = _descriptors ? Object.defineProperties : function defineProperties(O, Properties) {\n _anObject(O);\n var keys = _objectKeys(Properties);\n var length = keys.length;\n var i = 0;\n var P;\n\n while (length > i) _objectDp.f(O, P = keys[i++], Properties[P]);\n\n return O;\n};\n\nvar document$2 = _global.document;\n\nvar _html = document$2 && document$2.documentElement;\n\nvar IE_PROTO$1 = _sharedKey('IE_PROTO');\n\nvar Empty = function () {\n /* empty */\n};\n\nvar PROTOTYPE$1 = 'prototype'; // Create object with fake `null` prototype: use iframe Object with cleared prototype\n\nvar createDict = function () {\n // Thrash, waste and sodomy: IE GC bug\n var iframe = _domCreate('iframe');\n var i = _enumBugKeys.length;\n var lt = '<';\n var gt = '>';\n var iframeDocument;\n iframe.style.display = 'none';\n _html.appendChild(iframe);\n iframe.src = 'javascript:'; // eslint-disable-line no-script-url\n // createDict = iframe.contentWindow.Object;\n // html.removeChild(iframe);\n\n iframeDocument = iframe.contentWindow.document;\n iframeDocument.open();\n iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt);\n iframeDocument.close();\n createDict = iframeDocument.F;\n\n while (i--) delete createDict[PROTOTYPE$1][_enumBugKeys[i]];\n\n return createDict();\n};\n\nvar _objectCreate = Object.create || function create(O, Properties) {\n var result;\n\n if (O !== null) {\n Empty[PROTOTYPE$1] = _anObject(O);\n result = new Empty();\n Empty[PROTOTYPE$1] = null; // add \"__proto__\" for Object.getPrototypeOf polyfill\n\n result[IE_PROTO$1] = O;\n } else result = createDict();\n\n return Properties === undefined ? result : _objectDps(result, Properties);\n};\n\nvar hiddenKeys = _enumBugKeys.concat('length', 'prototype');\n\nvar f$4 = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {\n return _objectKeysInternal(O, hiddenKeys);\n};\n\nvar _objectGopn = {\n f: f$4\n};\n\nvar gOPN = _objectGopn.f;\nvar toString$1 = {}.toString;\nvar windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames ? Object.getOwnPropertyNames(window) : [];\n\nvar getWindowNames = function (it) {\n try {\n return gOPN(it);\n } catch (e) {\n return windowNames.slice();\n }\n};\n\nvar f$5 = function getOwnPropertyNames(it) {\n return windowNames && toString$1.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(_toIobject(it));\n};\n\nvar _objectGopnExt = {\n f: f$5\n};\n\nvar gOPD = Object.getOwnPropertyDescriptor;\nvar f$6 = _descriptors ? gOPD : function getOwnPropertyDescriptor(O, P) {\n O = _toIobject(O);\n P = _toPrimitive(P, true);\n if (_ie8DomDefine) try {\n return gOPD(O, P);\n } catch (e) {\n /* empty */\n }\n if (_has(O, P)) return _propertyDesc(!_objectPie.f.call(O, P), O[P]);\n};\nvar _objectGopd = {\n f: f$6\n};\n\nvar META = _meta.KEY;\nvar gOPD$1 = _objectGopd.f;\nvar dP$1 = _objectDp.f;\nvar gOPN$1 = _objectGopnExt.f;\nvar $Symbol = _global.Symbol;\nvar $JSON = _global.JSON;\n\nvar _stringify = $JSON && $JSON.stringify;\n\nvar PROTOTYPE$2 = 'prototype';\nvar HIDDEN = _wks('_hidden');\nvar TO_PRIMITIVE = _wks('toPrimitive');\nvar isEnum = {}.propertyIsEnumerable;\nvar SymbolRegistry = _shared('symbol-registry');\nvar AllSymbols = _shared('symbols');\nvar OPSymbols = _shared('op-symbols');\nvar ObjectProto = Object[PROTOTYPE$2];\nvar USE_NATIVE = typeof $Symbol == 'function' && !!_objectGops.f;\nvar QObject = _global.QObject; // Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173\n\nvar setter = !QObject || !QObject[PROTOTYPE$2] || !QObject[PROTOTYPE$2].findChild; // fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687\n\nvar setSymbolDesc = _descriptors && _fails(function () {\n return _objectCreate(dP$1({}, 'a', {\n get: function () {\n return dP$1(this, 'a', {\n value: 7\n }).a;\n }\n })).a != 7;\n}) ? function (it, key, D) {\n var protoDesc = gOPD$1(ObjectProto, key);\n if (protoDesc) delete ObjectProto[key];\n dP$1(it, key, D);\n if (protoDesc && it !== ObjectProto) dP$1(ObjectProto, key, protoDesc);\n} : dP$1;\n\nvar wrap = function (tag) {\n var sym = AllSymbols[tag] = _objectCreate($Symbol[PROTOTYPE$2]);\n\n sym._k = tag;\n return sym;\n};\n\nvar isSymbol = USE_NATIVE && typeof $Symbol.iterator == 'symbol' ? function (it) {\n return typeof it == 'symbol';\n} : function (it) {\n return it instanceof $Symbol;\n};\n\nvar $defineProperty = function defineProperty(it, key, D) {\n if (it === ObjectProto) $defineProperty(OPSymbols, key, D);\n _anObject(it);\n key = _toPrimitive(key, true);\n _anObject(D);\n\n if (_has(AllSymbols, key)) {\n if (!D.enumerable) {\n if (!_has(it, HIDDEN)) dP$1(it, HIDDEN, _propertyDesc(1, {}));\n it[HIDDEN][key] = true;\n } else {\n if (_has(it, HIDDEN) && it[HIDDEN][key]) it[HIDDEN][key] = false;\n D = _objectCreate(D, {\n enumerable: _propertyDesc(0, false)\n });\n }\n\n return setSymbolDesc(it, key, D);\n }\n\n return dP$1(it, key, D);\n};\n\nvar $defineProperties = function defineProperties(it, P) {\n _anObject(it);\n var keys = _enumKeys(P = _toIobject(P));\n var i = 0;\n var l = keys.length;\n var key;\n\n while (l > i) $defineProperty(it, key = keys[i++], P[key]);\n\n return it;\n};\n\nvar $create = function create(it, P) {\n return P === undefined ? _objectCreate(it) : $defineProperties(_objectCreate(it), P);\n};\n\nvar $propertyIsEnumerable = function propertyIsEnumerable(key) {\n var E = isEnum.call(this, key = _toPrimitive(key, true));\n if (this === ObjectProto && _has(AllSymbols, key) && !_has(OPSymbols, key)) return false;\n return E || !_has(this, key) || !_has(AllSymbols, key) || _has(this, HIDDEN) && this[HIDDEN][key] ? E : true;\n};\n\nvar $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key) {\n it = _toIobject(it);\n key = _toPrimitive(key, true);\n if (it === ObjectProto && _has(AllSymbols, key) && !_has(OPSymbols, key)) return;\n var D = gOPD$1(it, key);\n if (D && _has(AllSymbols, key) && !(_has(it, HIDDEN) && it[HIDDEN][key])) D.enumerable = true;\n return D;\n};\n\nvar $getOwnPropertyNames = function getOwnPropertyNames(it) {\n var names = gOPN$1(_toIobject(it));\n var result = [];\n var i = 0;\n var key;\n\n while (names.length > i) {\n if (!_has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META) result.push(key);\n }\n\n return result;\n};\n\nvar $getOwnPropertySymbols = function getOwnPropertySymbols(it) {\n var IS_OP = it === ObjectProto;\n var names = gOPN$1(IS_OP ? OPSymbols : _toIobject(it));\n var result = [];\n var i = 0;\n var key;\n\n while (names.length > i) {\n if (_has(AllSymbols, key = names[i++]) && (IS_OP ? _has(ObjectProto, key) : true)) result.push(AllSymbols[key]);\n }\n\n return result;\n}; // 19.4.1.1 Symbol([description])\n\n\nif (!USE_NATIVE) {\n $Symbol = function Symbol() {\n if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor!');\n var tag = _uid(arguments.length > 0 ? arguments[0] : undefined);\n\n var $set = function (value) {\n if (this === ObjectProto) $set.call(OPSymbols, value);\n if (_has(this, HIDDEN) && _has(this[HIDDEN], tag)) this[HIDDEN][tag] = false;\n setSymbolDesc(this, tag, _propertyDesc(1, value));\n };\n\n if (_descriptors && setter) setSymbolDesc(ObjectProto, tag, {\n configurable: true,\n set: $set\n });\n return wrap(tag);\n };\n\n _redefine($Symbol[PROTOTYPE$2], 'toString', function toString() {\n return this._k;\n });\n _objectGopd.f = $getOwnPropertyDescriptor;\n _objectDp.f = $defineProperty;\n _objectGopn.f = _objectGopnExt.f = $getOwnPropertyNames;\n _objectPie.f = $propertyIsEnumerable;\n _objectGops.f = $getOwnPropertySymbols;\n\n if (_descriptors && !_library) {\n _redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true);\n }\n\n _wksExt.f = function (name) {\n return wrap(_wks(name));\n };\n}\n\n_export(_export.G + _export.W + _export.F * !USE_NATIVE, {\n Symbol: $Symbol\n});\n\nfor (var es6Symbols = // 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14\n'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables'.split(','), j = 0; es6Symbols.length > j;) _wks(es6Symbols[j++]);\n\nfor (var wellKnownSymbols = _objectKeys(_wks.store), k = 0; wellKnownSymbols.length > k;) _wksDefine(wellKnownSymbols[k++]);\n\n_export(_export.S + _export.F * !USE_NATIVE, 'Symbol', {\n // 19.4.2.1 Symbol.for(key)\n 'for': function (key) {\n return _has(SymbolRegistry, key += '') ? SymbolRegistry[key] : SymbolRegistry[key] = $Symbol(key);\n },\n // 19.4.2.5 Symbol.keyFor(sym)\n keyFor: function keyFor(sym) {\n if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol!');\n\n for (var key in SymbolRegistry) if (SymbolRegistry[key] === sym) return key;\n },\n useSetter: function () {\n setter = true;\n },\n useSimple: function () {\n setter = false;\n }\n});\n_export(_export.S + _export.F * !USE_NATIVE, 'Object', {\n // 19.1.2.2 Object.create(O [, Properties])\n create: $create,\n // 19.1.2.4 Object.defineProperty(O, P, Attributes)\n defineProperty: $defineProperty,\n // 19.1.2.3 Object.defineProperties(O, Properties)\n defineProperties: $defineProperties,\n // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P)\n getOwnPropertyDescriptor: $getOwnPropertyDescriptor,\n // 19.1.2.7 Object.getOwnPropertyNames(O)\n getOwnPropertyNames: $getOwnPropertyNames,\n // 19.1.2.8 Object.getOwnPropertySymbols(O)\n getOwnPropertySymbols: $getOwnPropertySymbols\n}); // Chrome 38 and 39 `Object.getOwnPropertySymbols` fails on primitives\n// https://bugs.chromium.org/p/v8/issues/detail?id=3443\n\nvar FAILS_ON_PRIMITIVES = _fails(function () {\n _objectGops.f(1);\n});\n_export(_export.S + _export.F * FAILS_ON_PRIMITIVES, 'Object', {\n getOwnPropertySymbols: function getOwnPropertySymbols(it) {\n return _objectGops.f(_toObject(it));\n }\n}); // 24.3.2 JSON.stringify(value [, replacer [, space]])\n\n$JSON && _export(_export.S + _export.F * (!USE_NATIVE || _fails(function () {\n var S = $Symbol(); // MS Edge converts symbol values to JSON as {}\n // WebKit converts symbol values to JSON as null\n // V8 throws on boxed symbols\n\n return _stringify([S]) != '[null]' || _stringify({\n a: S\n }) != '{}' || _stringify(Object(S)) != '{}';\n})), 'JSON', {\n stringify: function stringify(it) {\n var args = [it];\n var i = 1;\n var replacer, $replacer;\n\n while (arguments.length > i) args.push(arguments[i++]);\n\n $replacer = replacer = args[1];\n if (!_isObject(replacer) && it === undefined || isSymbol(it)) return; // IE8 returns string on undefined\n\n if (!_isArray(replacer)) replacer = function (key, value) {\n if (typeof $replacer == 'function') value = $replacer.call(this, key, value);\n if (!isSymbol(value)) return value;\n };\n args[1] = replacer;\n return _stringify.apply($JSON, args);\n }\n}); // 19.4.3.4 Symbol.prototype[@@toPrimitive](hint)\n\n$Symbol[PROTOTYPE$2][TO_PRIMITIVE] || _hide($Symbol[PROTOTYPE$2], TO_PRIMITIVE, $Symbol[PROTOTYPE$2].valueOf); // 19.4.3.5 Symbol.prototype[@@toStringTag]\n\n_setToStringTag($Symbol, 'Symbol'); // 20.2.1.9 Math[@@toStringTag]\n\n_setToStringTag(Math, 'Math', true); // 24.3.3 JSON[@@toStringTag]\n\n_setToStringTag(_global.JSON, 'JSON', true);\n\nfunction _typeof(obj) {\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function (obj) {\n return typeof obj;\n };\n } else {\n _typeof = function (obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n\n if (Object.getOwnPropertySymbols) {\n keys.push.apply(keys, Object.getOwnPropertySymbols(object));\n }\n\n if (enumerableOnly) keys = keys.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n return keys;\n}\n\nfunction _objectSpread2(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n\n if (i % 2) {\n ownKeys(source, true).forEach(function (key) {\n _defineProperty(target, key, source[key]);\n });\n } else if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(source).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n }\n\n return target;\n}\n\nfunction _toConsumableArray(arr) {\n return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread();\n}\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) {\n for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) arr2[i] = arr[i];\n\n return arr2;\n }\n}\n\nfunction _iterableToArray(iter) {\n if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === \"[object Arguments]\") return Array.from(iter);\n}\n\nfunction _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance\");\n}\n\nvar _objectSap = function (KEY, exec) {\n var fn = (_core.Object || {})[KEY] || Object[KEY];\n var exp = {};\n exp[KEY] = exec(fn);\n _export(_export.S + _export.F * _fails(function () {\n fn(1);\n }), 'Object', exp);\n};\n\n_objectSap('keys', function () {\n return function keys(it) {\n return _objectKeys(_toObject(it));\n };\n});\n\nvar _flags = function () {\n var that = _anObject(this);\n var result = '';\n if (that.global) result += 'g';\n if (that.ignoreCase) result += 'i';\n if (that.multiline) result += 'm';\n if (that.unicode) result += 'u';\n if (that.sticky) result += 'y';\n return result;\n};\n\nif (_descriptors && /./g.flags != 'g') _objectDp.f(RegExp.prototype, 'flags', {\n configurable: true,\n get: _flags\n});\n\nvar TO_STRING = 'toString';\nvar $toString = /./[TO_STRING];\n\nvar define = function (fn) {\n _redefine(RegExp.prototype, TO_STRING, fn, true);\n}; // 21.2.5.14 RegExp.prototype.toString()\n\n\nif (_fails(function () {\n return $toString.call({\n source: 'a',\n flags: 'b'\n }) != '/a/b';\n})) {\n define(function toString() {\n var R = _anObject(this);\n return '/'.concat(R.source, '/', 'flags' in R ? R.flags : !_descriptors && R instanceof RegExp ? _flags.call(R) : undefined);\n }); // FF44- RegExp#toString has a wrong name\n} else if ($toString.name != TO_STRING) {\n define(function toString() {\n return $toString.call(this);\n });\n}\n\n// false -> String#codePointAt\n\nvar _stringAt = function (TO_STRING) {\n return function (that, pos) {\n var s = String(_defined(that));\n var i = _toInteger(pos);\n var l = s.length;\n var a, b;\n if (i < 0 || i >= l) return TO_STRING ? '' : undefined;\n a = s.charCodeAt(i);\n return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff ? TO_STRING ? s.charAt(i) : a : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000;\n };\n};\n\nvar at = _stringAt(true); // `AdvanceStringIndex` abstract operation\n// https://tc39.github.io/ecma262/#sec-advancestringindex\n\nvar _advanceStringIndex = function (S, index, unicode) {\n return index + (unicode ? at(S, index).length : 1);\n};\n\nvar TAG$1 = _wks('toStringTag'); // ES3 wrong here\n\nvar ARG = _cof(function () {\n return arguments;\n}()) == 'Arguments'; // fallback for IE11 Script Access Denied error\n\nvar tryGet = function (it, key) {\n try {\n return it[key];\n } catch (e) {\n /* empty */\n }\n};\n\nvar _classof = function (it) {\n var O, T, B;\n return it === undefined ? 'Undefined' : it === null ? 'Null' // @@toStringTag case\n : typeof (T = tryGet(O = Object(it), TAG$1)) == 'string' ? T // builtinTag case\n : ARG ? _cof(O) // ES3 arguments fallback\n : (B = _cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B;\n};\n\nvar builtinExec = RegExp.prototype.exec; // `RegExpExec` abstract operation\n// https://tc39.github.io/ecma262/#sec-regexpexec\n\nvar _regexpExecAbstract = function (R, S) {\n var exec = R.exec;\n\n if (typeof exec === 'function') {\n var result = exec.call(R, S);\n\n if (typeof result !== 'object') {\n throw new TypeError('RegExp exec method returned something other than an Object or null');\n }\n\n return result;\n }\n\n if (_classof(R) !== 'RegExp') {\n throw new TypeError('RegExp#exec called on incompatible receiver');\n }\n\n return builtinExec.call(R, S);\n};\n\nvar nativeExec = RegExp.prototype.exec; // This always refers to the native implementation, because the\n// String#replace polyfill uses ./fix-regexp-well-known-symbol-logic.js,\n// which loads this file before patching the method.\n\nvar nativeReplace = String.prototype.replace;\nvar patchedExec = nativeExec;\nvar LAST_INDEX = 'lastIndex';\n\nvar UPDATES_LAST_INDEX_WRONG = function () {\n var re1 = /a/,\n re2 = /b*/g;\n nativeExec.call(re1, 'a');\n nativeExec.call(re2, 'a');\n return re1[LAST_INDEX] !== 0 || re2[LAST_INDEX] !== 0;\n}(); // nonparticipating capturing group, copied from es5-shim's String#split patch.\n\n\nvar NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;\nvar PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED;\n\nif (PATCH) {\n patchedExec = function exec(str) {\n var re = this;\n var lastIndex, reCopy, match, i;\n\n if (NPCG_INCLUDED) {\n reCopy = new RegExp('^' + re.source + '$(?!\\\\s)', _flags.call(re));\n }\n\n if (UPDATES_LAST_INDEX_WRONG) lastIndex = re[LAST_INDEX];\n match = nativeExec.call(re, str);\n\n if (UPDATES_LAST_INDEX_WRONG && match) {\n re[LAST_INDEX] = re.global ? match.index + match[0].length : lastIndex;\n }\n\n if (NPCG_INCLUDED && match && match.length > 1) {\n // Fix browsers whose `exec` methods don't consistently return `undefined`\n // for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/\n // eslint-disable-next-line no-loop-func\n nativeReplace.call(match[0], reCopy, function () {\n for (i = 1; i < arguments.length - 2; i++) {\n if (arguments[i] === undefined) match[i] = undefined;\n }\n });\n }\n\n return match;\n };\n}\n\nvar _regexpExec = patchedExec;\n\n_export({\n target: 'RegExp',\n proto: true,\n forced: _regexpExec !== /./.exec\n}, {\n exec: _regexpExec\n});\n\nvar SPECIES = _wks('species');\nvar REPLACE_SUPPORTS_NAMED_GROUPS = !_fails(function () {\n // #replace needs built-in support for named groups.\n // #match works fine because it just return the exec results, even if it has\n // a \"grops\" property.\n var re = /./;\n\n re.exec = function () {\n var result = [];\n result.groups = {\n a: '7'\n };\n return result;\n };\n\n return ''.replace(re, '$') !== '7';\n});\n\nvar SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = function () {\n // Chrome 51 has a buggy \"split\" implementation when RegExp#exec !== nativeExec\n var re = /(?:)/;\n var originalExec = re.exec;\n\n re.exec = function () {\n return originalExec.apply(this, arguments);\n };\n\n var result = 'ab'.split(re);\n return result.length === 2 && result[0] === 'a' && result[1] === 'b';\n}();\n\nvar _fixReWks = function (KEY, length, exec) {\n var SYMBOL = _wks(KEY);\n var DELEGATES_TO_SYMBOL = !_fails(function () {\n // String methods call symbol-named RegEp methods\n var O = {};\n\n O[SYMBOL] = function () {\n return 7;\n };\n\n return ''[KEY](O) != 7;\n });\n var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL ? !_fails(function () {\n // Symbol-named RegExp methods call .exec\n var execCalled = false;\n var re = /a/;\n\n re.exec = function () {\n execCalled = true;\n return null;\n };\n\n if (KEY === 'split') {\n // RegExp[@@split] doesn't call the regex's exec method, but first creates\n // a new one. We need to return the patched regex when creating the new one.\n re.constructor = {};\n\n re.constructor[SPECIES] = function () {\n return re;\n };\n }\n\n re[SYMBOL]('');\n return !execCalled;\n }) : undefined;\n\n if (!DELEGATES_TO_SYMBOL || !DELEGATES_TO_EXEC || KEY === 'replace' && !REPLACE_SUPPORTS_NAMED_GROUPS || KEY === 'split' && !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC) {\n var nativeRegExpMethod = /./[SYMBOL];\n var fns = exec(_defined, SYMBOL, ''[KEY], function maybeCallNative(nativeMethod, regexp, str, arg2, forceStringMethod) {\n if (regexp.exec === _regexpExec) {\n if (DELEGATES_TO_SYMBOL && !forceStringMethod) {\n // The native String method already delegates to @@method (this\n // polyfilled function), leasing to infinite recursion.\n // We avoid it by directly calling the native @@method method.\n return {\n done: true,\n value: nativeRegExpMethod.call(regexp, str, arg2)\n };\n }\n\n return {\n done: true,\n value: nativeMethod.call(str, regexp, arg2)\n };\n }\n\n return {\n done: false\n };\n });\n var strfn = fns[0];\n var rxfn = fns[1];\n _redefine(String.prototype, KEY, strfn);\n _hide(RegExp.prototype, SYMBOL, length == 2 // 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue)\n // 21.2.5.11 RegExp.prototype[@@split](string, limit)\n ? function (string, arg) {\n return rxfn.call(string, this, arg);\n } // 21.2.5.6 RegExp.prototype[@@match](string)\n // 21.2.5.9 RegExp.prototype[@@search](string)\n : function (string) {\n return rxfn.call(string, this);\n });\n }\n};\n\nvar max$1 = Math.max;\nvar min$2 = Math.min;\nvar floor$1 = Math.floor;\nvar SUBSTITUTION_SYMBOLS = /\\$([$&`']|\\d\\d?|<[^>]*>)/g;\nvar SUBSTITUTION_SYMBOLS_NO_NAMED = /\\$([$&`']|\\d\\d?)/g;\n\nvar maybeToString = function (it) {\n return it === undefined ? it : String(it);\n}; // @@replace logic\n\n\n_fixReWks('replace', 2, function (defined, REPLACE, $replace, maybeCallNative) {\n return [// `String.prototype.replace` method\n // https://tc39.github.io/ecma262/#sec-string.prototype.replace\n function replace(searchValue, replaceValue) {\n var O = defined(this);\n var fn = searchValue == undefined ? undefined : searchValue[REPLACE];\n return fn !== undefined ? fn.call(searchValue, O, replaceValue) : $replace.call(String(O), searchValue, replaceValue);\n }, // `RegExp.prototype[@@replace]` method\n // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@replace\n function (regexp, replaceValue) {\n var res = maybeCallNative($replace, regexp, this, replaceValue);\n if (res.done) return res.value;\n var rx = _anObject(regexp);\n var S = String(this);\n var functionalReplace = typeof replaceValue === 'function';\n if (!functionalReplace) replaceValue = String(replaceValue);\n var global = rx.global;\n\n if (global) {\n var fullUnicode = rx.unicode;\n rx.lastIndex = 0;\n }\n\n var results = [];\n\n while (true) {\n var result = _regexpExecAbstract(rx, S);\n if (result === null) break;\n results.push(result);\n if (!global) break;\n var matchStr = String(result[0]);\n if (matchStr === '') rx.lastIndex = _advanceStringIndex(S, _toLength(rx.lastIndex), fullUnicode);\n }\n\n var accumulatedResult = '';\n var nextSourcePosition = 0;\n\n for (var i = 0; i < results.length; i++) {\n result = results[i];\n var matched = String(result[0]);\n var position = max$1(min$2(_toInteger(result.index), S.length), 0);\n var captures = []; // NOTE: This is equivalent to\n // captures = result.slice(1).map(maybeToString)\n // but for some reason `nativeSlice.call(result, 1, result.length)` (called in\n // the slice polyfill when slicing native arrays) \"doesn't work\" in safari 9 and\n // causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it.\n\n for (var j = 1; j < result.length; j++) captures.push(maybeToString(result[j]));\n\n var namedCaptures = result.groups;\n\n if (functionalReplace) {\n var replacerArgs = [matched].concat(captures, position, S);\n if (namedCaptures !== undefined) replacerArgs.push(namedCaptures);\n var replacement = String(replaceValue.apply(undefined, replacerArgs));\n } else {\n replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue);\n }\n\n if (position >= nextSourcePosition) {\n accumulatedResult += S.slice(nextSourcePosition, position) + replacement;\n nextSourcePosition = position + matched.length;\n }\n }\n\n return accumulatedResult + S.slice(nextSourcePosition);\n }]; // https://tc39.github.io/ecma262/#sec-getsubstitution\n\n function getSubstitution(matched, str, position, captures, namedCaptures, replacement) {\n var tailPos = position + matched.length;\n var m = captures.length;\n var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED;\n\n if (namedCaptures !== undefined) {\n namedCaptures = _toObject(namedCaptures);\n symbols = SUBSTITUTION_SYMBOLS;\n }\n\n return $replace.call(replacement, symbols, function (match, ch) {\n var capture;\n\n switch (ch.charAt(0)) {\n case '$':\n return '$';\n\n case '&':\n return matched;\n\n case '`':\n return str.slice(0, position);\n\n case \"'\":\n return str.slice(tailPos);\n\n case '<':\n capture = namedCaptures[ch.slice(1, -1)];\n break;\n\n default:\n // \\d\\d?\n var n = +ch;\n if (n === 0) return match;\n\n if (n > m) {\n var f = floor$1(n / 10);\n if (f === 0) return match;\n if (f <= m) return captures[f - 1] === undefined ? ch.charAt(1) : captures[f - 1] + ch.charAt(1);\n return match;\n }\n\n capture = captures[n - 1];\n }\n\n return capture === undefined ? '' : capture;\n });\n }\n});\n\nvar UNSCOPABLES = _wks('unscopables');\nvar ArrayProto = Array.prototype;\nif (ArrayProto[UNSCOPABLES] == undefined) _hide(ArrayProto, UNSCOPABLES, {});\n\nvar _addToUnscopables = function (key) {\n ArrayProto[UNSCOPABLES][key] = true;\n};\n\nvar _iterStep = function (done, value) {\n return {\n value: value,\n done: !!done\n };\n};\n\nvar _iterators = {};\n\nvar IteratorPrototype = {}; // 25.1.2.1.1 %IteratorPrototype%[@@iterator]()\n\n_hide(IteratorPrototype, _wks('iterator'), function () {\n return this;\n});\n\nvar _iterCreate = function (Constructor, NAME, next) {\n Constructor.prototype = _objectCreate(IteratorPrototype, {\n next: _propertyDesc(1, next)\n });\n _setToStringTag(Constructor, NAME + ' Iterator');\n};\n\nvar IE_PROTO$2 = _sharedKey('IE_PROTO');\nvar ObjectProto$1 = Object.prototype;\n\nvar _objectGpo = Object.getPrototypeOf || function (O) {\n O = _toObject(O);\n if (_has(O, IE_PROTO$2)) return O[IE_PROTO$2];\n\n if (typeof O.constructor == 'function' && O instanceof O.constructor) {\n return O.constructor.prototype;\n }\n\n return O instanceof Object ? ObjectProto$1 : null;\n};\n\nvar ITERATOR = _wks('iterator');\nvar BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next`\n\nvar FF_ITERATOR = '@@iterator';\nvar KEYS = 'keys';\nvar VALUES = 'values';\n\nvar returnThis = function () {\n return this;\n};\n\nvar _iterDefine = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) {\n _iterCreate(Constructor, NAME, next);\n\n var getMethod = function (kind) {\n if (!BUGGY && kind in proto) return proto[kind];\n\n switch (kind) {\n case KEYS:\n return function keys() {\n return new Constructor(this, kind);\n };\n\n case VALUES:\n return function values() {\n return new Constructor(this, kind);\n };\n }\n\n return function entries() {\n return new Constructor(this, kind);\n };\n };\n\n var TAG = NAME + ' Iterator';\n var DEF_VALUES = DEFAULT == VALUES;\n var VALUES_BUG = false;\n var proto = Base.prototype;\n var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT];\n var $default = $native || getMethod(DEFAULT);\n var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined;\n var $anyNative = NAME == 'Array' ? proto.entries || $native : $native;\n var methods, key, IteratorPrototype; // Fix native\n\n if ($anyNative) {\n IteratorPrototype = _objectGpo($anyNative.call(new Base()));\n\n if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) {\n // Set @@toStringTag to native iterators\n _setToStringTag(IteratorPrototype, TAG, true); // fix for some old engines\n\n if ( typeof IteratorPrototype[ITERATOR] != 'function') _hide(IteratorPrototype, ITERATOR, returnThis);\n }\n } // fix Array#{values, @@iterator}.name in V8 / FF\n\n\n if (DEF_VALUES && $native && $native.name !== VALUES) {\n VALUES_BUG = true;\n\n $default = function values() {\n return $native.call(this);\n };\n } // Define iterator\n\n\n if ( (BUGGY || VALUES_BUG || !proto[ITERATOR])) {\n _hide(proto, ITERATOR, $default);\n } // Plug for library\n\n\n _iterators[NAME] = $default;\n _iterators[TAG] = returnThis;\n\n if (DEFAULT) {\n methods = {\n values: DEF_VALUES ? $default : getMethod(VALUES),\n keys: IS_SET ? $default : getMethod(KEYS),\n entries: $entries\n };\n if (FORCED) for (key in methods) {\n if (!(key in proto)) _redefine(proto, key, methods[key]);\n } else _export(_export.P + _export.F * (BUGGY || VALUES_BUG), NAME, methods);\n }\n\n return methods;\n};\n\n// 22.1.3.13 Array.prototype.keys()\n// 22.1.3.29 Array.prototype.values()\n// 22.1.3.30 Array.prototype[@@iterator]()\n\n\nvar es6_array_iterator = _iterDefine(Array, 'Array', function (iterated, kind) {\n this._t = _toIobject(iterated); // target\n\n this._i = 0; // next index\n\n this._k = kind; // kind\n // 22.1.5.2.1 %ArrayIteratorPrototype%.next()\n}, function () {\n var O = this._t;\n var kind = this._k;\n var index = this._i++;\n\n if (!O || index >= O.length) {\n this._t = undefined;\n return _iterStep(1);\n }\n\n if (kind == 'keys') return _iterStep(0, index);\n if (kind == 'values') return _iterStep(0, O[index]);\n return _iterStep(0, [index, O[index]]);\n}, 'values'); // argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7)\n\n_iterators.Arguments = _iterators.Array;\n_addToUnscopables('keys');\n_addToUnscopables('values');\n_addToUnscopables('entries');\n\nvar ITERATOR$1 = _wks('iterator');\nvar TO_STRING_TAG = _wks('toStringTag');\nvar ArrayValues = _iterators.Array;\nvar DOMIterables = {\n CSSRuleList: true,\n // TODO: Not spec compliant, should be false.\n CSSStyleDeclaration: false,\n CSSValueList: false,\n ClientRectList: false,\n DOMRectList: false,\n DOMStringList: false,\n DOMTokenList: true,\n DataTransferItemList: false,\n FileList: false,\n HTMLAllCollection: false,\n HTMLCollection: false,\n HTMLFormElement: false,\n HTMLSelectElement: false,\n MediaList: true,\n // TODO: Not spec compliant, should be false.\n MimeTypeArray: false,\n NamedNodeMap: false,\n NodeList: true,\n PaintRequestList: false,\n Plugin: false,\n PluginArray: false,\n SVGLengthList: false,\n SVGNumberList: false,\n SVGPathSegList: false,\n SVGPointList: false,\n SVGStringList: false,\n SVGTransformList: false,\n SourceBufferList: false,\n StyleSheetList: true,\n // TODO: Not spec compliant, should be false.\n TextTrackCueList: false,\n TextTrackList: false,\n TouchList: false\n};\n\nfor (var collections = _objectKeys(DOMIterables), i = 0; i < collections.length; i++) {\n var NAME = collections[i];\n var explicit = DOMIterables[NAME];\n var Collection = _global[NAME];\n var proto = Collection && Collection.prototype;\n var key;\n\n if (proto) {\n if (!proto[ITERATOR$1]) _hide(proto, ITERATOR$1, ArrayValues);\n if (!proto[TO_STRING_TAG]) _hide(proto, TO_STRING_TAG, NAME);\n _iterators[NAME] = ArrayValues;\n if (explicit) for (key in es6_array_iterator) if (!proto[key]) _redefine(proto, key, es6_array_iterator[key], true);\n }\n}\n\nvar test = {};\ntest[_wks('toStringTag')] = 'z';\n\nif (test + '' != '[object z]') {\n _redefine(Object.prototype, 'toString', function toString() {\n return '[object ' + _classof(this) + ']';\n }, true);\n}\n\nvar isEnum$1 = _objectPie.f;\n\nvar _objectToArray = function (isEntries) {\n return function (it) {\n var O = _toIobject(it);\n var keys = _objectKeys(O);\n var length = keys.length;\n var i = 0;\n var result = [];\n var key;\n\n while (length > i) {\n key = keys[i++];\n\n if (!_descriptors || isEnum$1.call(O, key)) {\n result.push(isEntries ? [key, O[key]] : O[key]);\n }\n }\n\n return result;\n };\n};\n\nvar $values = _objectToArray(false);\n_export(_export.S, 'Object', {\n values: function values(it) {\n return $values(it);\n }\n});\n\nvar MATCH = _wks('match');\n\nvar _isRegexp = function (it) {\n var isRegExp;\n return _isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : _cof(it) == 'RegExp');\n};\n\nvar SPECIES$1 = _wks('species');\n\nvar _speciesConstructor = function (O, D) {\n var C = _anObject(O).constructor;\n var S;\n return C === undefined || (S = _anObject(C)[SPECIES$1]) == undefined ? D : _aFunction(S);\n};\n\nvar $min = Math.min;\nvar $push = [].push;\nvar $SPLIT = 'split';\nvar LENGTH = 'length';\nvar LAST_INDEX$1 = 'lastIndex';\nvar MAX_UINT32 = 0xffffffff; // babel-minify transpiles RegExp('x', 'y') -> /x/y and it causes SyntaxError\n\nvar SUPPORTS_Y = !_fails(function () {\n RegExp(MAX_UINT32, 'y');\n}); // @@split logic\n\n_fixReWks('split', 2, function (defined, SPLIT, $split, maybeCallNative) {\n var internalSplit;\n\n if ('abbc'[$SPLIT](/(b)*/)[1] == 'c' || 'test'[$SPLIT](/(?:)/, -1)[LENGTH] != 4 || 'ab'[$SPLIT](/(?:ab)*/)[LENGTH] != 2 || '.'[$SPLIT](/(.?)(.?)/)[LENGTH] != 4 || '.'[$SPLIT](/()()/)[LENGTH] > 1 || ''[$SPLIT](/.?/)[LENGTH]) {\n // based on es5-shim implementation, need to rework it\n internalSplit = function (separator, limit) {\n var string = String(this);\n if (separator === undefined && limit === 0) return []; // If `separator` is not a regex, use native split\n\n if (!_isRegexp(separator)) return $split.call(string, separator, limit);\n var output = [];\n var flags = (separator.ignoreCase ? 'i' : '') + (separator.multiline ? 'm' : '') + (separator.unicode ? 'u' : '') + (separator.sticky ? 'y' : '');\n var lastLastIndex = 0;\n var splitLimit = limit === undefined ? MAX_UINT32 : limit >>> 0; // Make `global` and avoid `lastIndex` issues by working with a copy\n\n var separatorCopy = new RegExp(separator.source, flags + 'g');\n var match, lastIndex, lastLength;\n\n while (match = _regexpExec.call(separatorCopy, string)) {\n lastIndex = separatorCopy[LAST_INDEX$1];\n\n if (lastIndex > lastLastIndex) {\n output.push(string.slice(lastLastIndex, match.index));\n if (match[LENGTH] > 1 && match.index < string[LENGTH]) $push.apply(output, match.slice(1));\n lastLength = match[0][LENGTH];\n lastLastIndex = lastIndex;\n if (output[LENGTH] >= splitLimit) break;\n }\n\n if (separatorCopy[LAST_INDEX$1] === match.index) separatorCopy[LAST_INDEX$1]++; // Avoid an infinite loop\n }\n\n if (lastLastIndex === string[LENGTH]) {\n if (lastLength || !separatorCopy.test('')) output.push('');\n } else output.push(string.slice(lastLastIndex));\n\n return output[LENGTH] > splitLimit ? output.slice(0, splitLimit) : output;\n }; // Chakra, V8\n\n } else if ('0'[$SPLIT](undefined, 0)[LENGTH]) {\n internalSplit = function (separator, limit) {\n return separator === undefined && limit === 0 ? [] : $split.call(this, separator, limit);\n };\n } else {\n internalSplit = $split;\n }\n\n return [// `String.prototype.split` method\n // https://tc39.github.io/ecma262/#sec-string.prototype.split\n function split(separator, limit) {\n var O = defined(this);\n var splitter = separator == undefined ? undefined : separator[SPLIT];\n return splitter !== undefined ? splitter.call(separator, O, limit) : internalSplit.call(String(O), separator, limit);\n }, // `RegExp.prototype[@@split]` method\n // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@split\n //\n // NOTE: This cannot be properly polyfilled in engines that don't support\n // the 'y' flag.\n function (regexp, limit) {\n var res = maybeCallNative(internalSplit, regexp, this, limit, internalSplit !== $split);\n if (res.done) return res.value;\n var rx = _anObject(regexp);\n var S = String(this);\n var C = _speciesConstructor(rx, RegExp);\n var unicodeMatching = rx.unicode;\n var flags = (rx.ignoreCase ? 'i' : '') + (rx.multiline ? 'm' : '') + (rx.unicode ? 'u' : '') + (SUPPORTS_Y ? 'y' : 'g'); // ^(? + rx + ) is needed, in combination with some S slicing, to\n // simulate the 'y' flag.\n\n var splitter = new C(SUPPORTS_Y ? rx : '^(?:' + rx.source + ')', flags);\n var lim = limit === undefined ? MAX_UINT32 : limit >>> 0;\n if (lim === 0) return [];\n if (S.length === 0) return _regexpExecAbstract(splitter, S) === null ? [S] : [];\n var p = 0;\n var q = 0;\n var A = [];\n\n while (q < S.length) {\n splitter.lastIndex = SUPPORTS_Y ? q : 0;\n var z = _regexpExecAbstract(splitter, SUPPORTS_Y ? S : S.slice(q));\n var e;\n\n if (z === null || (e = $min(_toLength(splitter.lastIndex + (SUPPORTS_Y ? 0 : q)), S.length)) === p) {\n q = _advanceStringIndex(S, q, unicodeMatching);\n } else {\n A.push(S.slice(p, q));\n if (A.length === lim) return A;\n\n for (var i = 1; i <= z.length - 1; i++) {\n A.push(z[i]);\n if (A.length === lim) return A;\n }\n\n q = p = e;\n }\n }\n\n A.push(S.slice(p));\n return A;\n }];\n});\n\nvar $assign = Object.assign; // should work with symbols and should have deterministic property order (V8 bug)\n\nvar _objectAssign = !$assign || _fails(function () {\n var A = {};\n var B = {}; // eslint-disable-next-line no-undef\n\n var S = Symbol();\n var K = 'abcdefghijklmnopqrst';\n A[S] = 7;\n K.split('').forEach(function (k) {\n B[k] = k;\n });\n return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K;\n}) ? function assign(target, source) {\n // eslint-disable-line no-unused-vars\n var T = _toObject(target);\n var aLen = arguments.length;\n var index = 1;\n var getSymbols = _objectGops.f;\n var isEnum = _objectPie.f;\n\n while (aLen > index) {\n var S = _iobject(arguments[index++]);\n var keys = getSymbols ? _objectKeys(S).concat(getSymbols(S)) : _objectKeys(S);\n var length = keys.length;\n var j = 0;\n var key;\n\n while (length > j) {\n key = keys[j++];\n if (!_descriptors || isEnum.call(S, key)) T[key] = S[key];\n }\n }\n\n return T;\n} : $assign;\n\n_export(_export.S + _export.F, 'Object', {\n assign: _objectAssign\n});\n\n/* eslint-disable no-proto */\n\nvar check = function (O, proto) {\n _anObject(O);\n if (!_isObject(proto) && proto !== null) throw TypeError(proto + \": can't set as prototype!\");\n};\n\nvar _setProto = {\n set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line\n function (test, buggy, set) {\n try {\n set = _ctx(Function.call, _objectGopd.f(Object.prototype, '__proto__').set, 2);\n set(test, []);\n buggy = !(test instanceof Array);\n } catch (e) {\n buggy = true;\n }\n\n return function setPrototypeOf(O, proto) {\n check(O, proto);\n if (buggy) O.__proto__ = proto;else set(O, proto);\n return O;\n };\n }({}, false) : undefined),\n check: check\n};\n\nvar setPrototypeOf = _setProto.set;\n\nvar _inheritIfRequired = function (that, target, C) {\n var S = target.constructor;\n var P;\n\n if (S !== C && typeof S == 'function' && (P = S.prototype) !== C.prototype && _isObject(P) && setPrototypeOf) {\n setPrototypeOf(that, P);\n }\n\n return that;\n};\n\nvar _stringWs = '\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003' + '\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF';\n\nvar space = '[' + _stringWs + ']';\nvar non = '\\u200b\\u0085';\nvar ltrim = RegExp('^' + space + space + '*');\nvar rtrim = RegExp(space + space + '*$');\n\nvar exporter = function (KEY, exec, ALIAS) {\n var exp = {};\n var FORCE = _fails(function () {\n return !!_stringWs[KEY]() || non[KEY]() != non;\n });\n var fn = exp[KEY] = FORCE ? exec(trim) : _stringWs[KEY];\n if (ALIAS) exp[ALIAS] = fn;\n _export(_export.P + _export.F * FORCE, 'String', exp);\n}; // 1 -> String#trimLeft\n// 2 -> String#trimRight\n// 3 -> String#trim\n\n\nvar trim = exporter.trim = function (string, TYPE) {\n string = String(_defined(string));\n if (TYPE & 1) string = string.replace(ltrim, '');\n if (TYPE & 2) string = string.replace(rtrim, '');\n return string;\n};\n\nvar _stringTrim = exporter;\n\nvar gOPN$2 = _objectGopn.f;\nvar gOPD$2 = _objectGopd.f;\nvar dP$2 = _objectDp.f;\nvar $trim = _stringTrim.trim;\nvar NUMBER = 'Number';\nvar $Number = _global[NUMBER];\nvar Base = $Number;\nvar proto$1 = $Number.prototype; // Opera ~12 has broken Object#toString\n\nvar BROKEN_COF = _cof(_objectCreate(proto$1)) == NUMBER;\nvar TRIM = 'trim' in String.prototype; // 7.1.3 ToNumber(argument)\n\nvar toNumber = function (argument) {\n var it = _toPrimitive(argument, false);\n\n if (typeof it == 'string' && it.length > 2) {\n it = TRIM ? it.trim() : $trim(it, 3);\n var first = it.charCodeAt(0);\n var third, radix, maxCode;\n\n if (first === 43 || first === 45) {\n third = it.charCodeAt(2);\n if (third === 88 || third === 120) return NaN; // Number('+0x1') should be NaN, old V8 fix\n } else if (first === 48) {\n switch (it.charCodeAt(1)) {\n case 66:\n case 98:\n radix = 2;\n maxCode = 49;\n break;\n // fast equal /^0b[01]+$/i\n\n case 79:\n case 111:\n radix = 8;\n maxCode = 55;\n break;\n // fast equal /^0o[0-7]+$/i\n\n default:\n return +it;\n }\n\n for (var digits = it.slice(2), i = 0, l = digits.length, code; i < l; i++) {\n code = digits.charCodeAt(i); // parseInt parses a string to a first unavailable symbol\n // but ToNumber should return NaN if a string contains unavailable symbols\n\n if (code < 48 || code > maxCode) return NaN;\n }\n\n return parseInt(digits, radix);\n }\n }\n\n return +it;\n};\n\nif (!$Number(' 0o1') || !$Number('0b1') || $Number('+0x1')) {\n $Number = function Number(value) {\n var it = arguments.length < 1 ? 0 : value;\n var that = this;\n return that instanceof $Number // check on 1..constructor(foo) case\n && (BROKEN_COF ? _fails(function () {\n proto$1.valueOf.call(that);\n }) : _cof(that) != NUMBER) ? _inheritIfRequired(new Base(toNumber(it)), that, $Number) : toNumber(it);\n };\n\n for (var keys = _descriptors ? gOPN$2(Base) : ( // ES3:\n 'MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,' + // ES6 (in case, if modules with ES6 Number statics required before):\n 'EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,' + 'MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger').split(','), j$1 = 0, key$1; keys.length > j$1; j$1++) {\n if (_has(Base, key$1 = keys[j$1]) && !_has($Number, key$1)) {\n dP$2($Number, key$1, gOPD$2(Base, key$1));\n }\n }\n\n $Number.prototype = proto$1;\n proto$1.constructor = $Number;\n _redefine(_global, NUMBER, $Number);\n}\n\nvar moment = createCommonjsModule(function (module, exports) {\n\n (function (global, factory) {\n module.exports = factory() ;\n })(commonjsGlobal, function () {\n\n var hookCallback;\n\n function hooks() {\n return hookCallback.apply(null, arguments);\n } // This is done to register the method called with moment()\n // without creating circular dependencies.\n\n\n function setHookCallback(callback) {\n hookCallback = callback;\n }\n\n function isArray(input) {\n return input instanceof Array || Object.prototype.toString.call(input) === '[object Array]';\n }\n\n function isObject(input) {\n // IE8 will treat undefined and null as object if it wasn't for\n // input != null\n return input != null && Object.prototype.toString.call(input) === '[object Object]';\n }\n\n function isObjectEmpty(obj) {\n if (Object.getOwnPropertyNames) {\n return Object.getOwnPropertyNames(obj).length === 0;\n } else {\n var k;\n\n for (k in obj) {\n if (obj.hasOwnProperty(k)) {\n return false;\n }\n }\n\n return true;\n }\n }\n\n function isUndefined(input) {\n return input === void 0;\n }\n\n function isNumber(input) {\n return typeof input === 'number' || Object.prototype.toString.call(input) === '[object Number]';\n }\n\n function isDate(input) {\n return input instanceof Date || Object.prototype.toString.call(input) === '[object Date]';\n }\n\n function map(arr, fn) {\n var res = [],\n i;\n\n for (i = 0; i < arr.length; ++i) {\n res.push(fn(arr[i], i));\n }\n\n return res;\n }\n\n function hasOwnProp(a, b) {\n return Object.prototype.hasOwnProperty.call(a, b);\n }\n\n function extend(a, b) {\n for (var i in b) {\n if (hasOwnProp(b, i)) {\n a[i] = b[i];\n }\n }\n\n if (hasOwnProp(b, 'toString')) {\n a.toString = b.toString;\n }\n\n if (hasOwnProp(b, 'valueOf')) {\n a.valueOf = b.valueOf;\n }\n\n return a;\n }\n\n function createUTC(input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, true).utc();\n }\n\n function defaultParsingFlags() {\n // We need to deep clone this object.\n return {\n empty: false,\n unusedTokens: [],\n unusedInput: [],\n overflow: -2,\n charsLeftOver: 0,\n nullInput: false,\n invalidMonth: null,\n invalidFormat: false,\n userInvalidated: false,\n iso: false,\n parsedDateParts: [],\n meridiem: null,\n rfc2822: false,\n weekdayMismatch: false\n };\n }\n\n function getParsingFlags(m) {\n if (m._pf == null) {\n m._pf = defaultParsingFlags();\n }\n\n return m._pf;\n }\n\n var some;\n\n if (Array.prototype.some) {\n some = Array.prototype.some;\n } else {\n some = function (fun) {\n var t = Object(this);\n var len = t.length >>> 0;\n\n for (var i = 0; i < len; i++) {\n if (i in t && fun.call(this, t[i], i, t)) {\n return true;\n }\n }\n\n return false;\n };\n }\n\n function isValid(m) {\n if (m._isValid == null) {\n var flags = getParsingFlags(m);\n var parsedParts = some.call(flags.parsedDateParts, function (i) {\n return i != null;\n });\n var isNowValid = !isNaN(m._d.getTime()) && flags.overflow < 0 && !flags.empty && !flags.invalidMonth && !flags.invalidWeekday && !flags.weekdayMismatch && !flags.nullInput && !flags.invalidFormat && !flags.userInvalidated && (!flags.meridiem || flags.meridiem && parsedParts);\n\n if (m._strict) {\n isNowValid = isNowValid && flags.charsLeftOver === 0 && flags.unusedTokens.length === 0 && flags.bigHour === undefined;\n }\n\n if (Object.isFrozen == null || !Object.isFrozen(m)) {\n m._isValid = isNowValid;\n } else {\n return isNowValid;\n }\n }\n\n return m._isValid;\n }\n\n function createInvalid(flags) {\n var m = createUTC(NaN);\n\n if (flags != null) {\n extend(getParsingFlags(m), flags);\n } else {\n getParsingFlags(m).userInvalidated = true;\n }\n\n return m;\n } // Plugins that add properties should also add the key here (null value),\n // so we can properly clone ourselves.\n\n\n var momentProperties = hooks.momentProperties = [];\n\n function copyConfig(to, from) {\n var i, prop, val;\n\n if (!isUndefined(from._isAMomentObject)) {\n to._isAMomentObject = from._isAMomentObject;\n }\n\n if (!isUndefined(from._i)) {\n to._i = from._i;\n }\n\n if (!isUndefined(from._f)) {\n to._f = from._f;\n }\n\n if (!isUndefined(from._l)) {\n to._l = from._l;\n }\n\n if (!isUndefined(from._strict)) {\n to._strict = from._strict;\n }\n\n if (!isUndefined(from._tzm)) {\n to._tzm = from._tzm;\n }\n\n if (!isUndefined(from._isUTC)) {\n to._isUTC = from._isUTC;\n }\n\n if (!isUndefined(from._offset)) {\n to._offset = from._offset;\n }\n\n if (!isUndefined(from._pf)) {\n to._pf = getParsingFlags(from);\n }\n\n if (!isUndefined(from._locale)) {\n to._locale = from._locale;\n }\n\n if (momentProperties.length > 0) {\n for (i = 0; i < momentProperties.length; i++) {\n prop = momentProperties[i];\n val = from[prop];\n\n if (!isUndefined(val)) {\n to[prop] = val;\n }\n }\n }\n\n return to;\n }\n\n var updateInProgress = false; // Moment prototype object\n\n function Moment(config) {\n copyConfig(this, config);\n this._d = new Date(config._d != null ? config._d.getTime() : NaN);\n\n if (!this.isValid()) {\n this._d = new Date(NaN);\n } // Prevent infinite loop in case updateOffset creates new moment\n // objects.\n\n\n if (updateInProgress === false) {\n updateInProgress = true;\n hooks.updateOffset(this);\n updateInProgress = false;\n }\n }\n\n function isMoment(obj) {\n return obj instanceof Moment || obj != null && obj._isAMomentObject != null;\n }\n\n function absFloor(number) {\n if (number < 0) {\n // -0 -> 0\n return Math.ceil(number) || 0;\n } else {\n return Math.floor(number);\n }\n }\n\n function toInt(argumentForCoercion) {\n var coercedNumber = +argumentForCoercion,\n value = 0;\n\n if (coercedNumber !== 0 && isFinite(coercedNumber)) {\n value = absFloor(coercedNumber);\n }\n\n return value;\n } // compare two arrays, return the number of differences\n\n\n function compareArrays(array1, array2, dontConvert) {\n var len = Math.min(array1.length, array2.length),\n lengthDiff = Math.abs(array1.length - array2.length),\n diffs = 0,\n i;\n\n for (i = 0; i < len; i++) {\n if (dontConvert && array1[i] !== array2[i] || !dontConvert && toInt(array1[i]) !== toInt(array2[i])) {\n diffs++;\n }\n }\n\n return diffs + lengthDiff;\n }\n\n function warn(msg) {\n if (hooks.suppressDeprecationWarnings === false && typeof console !== 'undefined' && console.warn) {\n console.warn('Deprecation warning: ' + msg);\n }\n }\n\n function deprecate(msg, fn) {\n var firstTime = true;\n return extend(function () {\n if (hooks.deprecationHandler != null) {\n hooks.deprecationHandler(null, msg);\n }\n\n if (firstTime) {\n var args = [];\n var arg;\n\n for (var i = 0; i < arguments.length; i++) {\n arg = '';\n\n if (typeof arguments[i] === 'object') {\n arg += '\\n[' + i + '] ';\n\n for (var key in arguments[0]) {\n arg += key + ': ' + arguments[0][key] + ', ';\n }\n\n arg = arg.slice(0, -2); // Remove trailing comma and space\n } else {\n arg = arguments[i];\n }\n\n args.push(arg);\n }\n\n warn(msg + '\\nArguments: ' + Array.prototype.slice.call(args).join('') + '\\n' + new Error().stack);\n firstTime = false;\n }\n\n return fn.apply(this, arguments);\n }, fn);\n }\n\n var deprecations = {};\n\n function deprecateSimple(name, msg) {\n if (hooks.deprecationHandler != null) {\n hooks.deprecationHandler(name, msg);\n }\n\n if (!deprecations[name]) {\n warn(msg);\n deprecations[name] = true;\n }\n }\n\n hooks.suppressDeprecationWarnings = false;\n hooks.deprecationHandler = null;\n\n function isFunction(input) {\n return input instanceof Function || Object.prototype.toString.call(input) === '[object Function]';\n }\n\n function set(config) {\n var prop, i;\n\n for (i in config) {\n prop = config[i];\n\n if (isFunction(prop)) {\n this[i] = prop;\n } else {\n this['_' + i] = prop;\n }\n }\n\n this._config = config; // Lenient ordinal parsing accepts just a number in addition to\n // number + (possibly) stuff coming from _dayOfMonthOrdinalParse.\n // TODO: Remove \"ordinalParse\" fallback in next major release.\n\n this._dayOfMonthOrdinalParseLenient = new RegExp((this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) + '|' + /\\d{1,2}/.source);\n }\n\n function mergeConfigs(parentConfig, childConfig) {\n var res = extend({}, parentConfig),\n prop;\n\n for (prop in childConfig) {\n if (hasOwnProp(childConfig, prop)) {\n if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) {\n res[prop] = {};\n extend(res[prop], parentConfig[prop]);\n extend(res[prop], childConfig[prop]);\n } else if (childConfig[prop] != null) {\n res[prop] = childConfig[prop];\n } else {\n delete res[prop];\n }\n }\n }\n\n for (prop in parentConfig) {\n if (hasOwnProp(parentConfig, prop) && !hasOwnProp(childConfig, prop) && isObject(parentConfig[prop])) {\n // make sure changes to properties don't modify parent config\n res[prop] = extend({}, res[prop]);\n }\n }\n\n return res;\n }\n\n function Locale(config) {\n if (config != null) {\n this.set(config);\n }\n }\n\n var keys;\n\n if (Object.keys) {\n keys = Object.keys;\n } else {\n keys = function (obj) {\n var i,\n res = [];\n\n for (i in obj) {\n if (hasOwnProp(obj, i)) {\n res.push(i);\n }\n }\n\n return res;\n };\n }\n\n var defaultCalendar = {\n sameDay: '[Today at] LT',\n nextDay: '[Tomorrow at] LT',\n nextWeek: 'dddd [at] LT',\n lastDay: '[Yesterday at] LT',\n lastWeek: '[Last] dddd [at] LT',\n sameElse: 'L'\n };\n\n function calendar(key, mom, now) {\n var output = this._calendar[key] || this._calendar['sameElse'];\n return isFunction(output) ? output.call(mom, now) : output;\n }\n\n var defaultLongDateFormat = {\n LTS: 'h:mm:ss A',\n LT: 'h:mm A',\n L: 'MM/DD/YYYY',\n LL: 'MMMM D, YYYY',\n LLL: 'MMMM D, YYYY h:mm A',\n LLLL: 'dddd, MMMM D, YYYY h:mm A'\n };\n\n function longDateFormat(key) {\n var format = this._longDateFormat[key],\n formatUpper = this._longDateFormat[key.toUpperCase()];\n\n if (format || !formatUpper) {\n return format;\n }\n\n this._longDateFormat[key] = formatUpper.replace(/MMMM|MM|DD|dddd/g, function (val) {\n return val.slice(1);\n });\n return this._longDateFormat[key];\n }\n\n var defaultInvalidDate = 'Invalid date';\n\n function invalidDate() {\n return this._invalidDate;\n }\n\n var defaultOrdinal = '%d';\n var defaultDayOfMonthOrdinalParse = /\\d{1,2}/;\n\n function ordinal(number) {\n return this._ordinal.replace('%d', number);\n }\n\n var defaultRelativeTime = {\n future: 'in %s',\n past: '%s ago',\n s: 'a few seconds',\n ss: '%d seconds',\n m: 'a minute',\n mm: '%d minutes',\n h: 'an hour',\n hh: '%d hours',\n d: 'a day',\n dd: '%d days',\n M: 'a month',\n MM: '%d months',\n y: 'a year',\n yy: '%d years'\n };\n\n function relativeTime(number, withoutSuffix, string, isFuture) {\n var output = this._relativeTime[string];\n return isFunction(output) ? output(number, withoutSuffix, string, isFuture) : output.replace(/%d/i, number);\n }\n\n function pastFuture(diff, output) {\n var format = this._relativeTime[diff > 0 ? 'future' : 'past'];\n return isFunction(format) ? format(output) : format.replace(/%s/i, output);\n }\n\n var aliases = {};\n\n function addUnitAlias(unit, shorthand) {\n var lowerCase = unit.toLowerCase();\n aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit;\n }\n\n function normalizeUnits(units) {\n return typeof units === 'string' ? aliases[units] || aliases[units.toLowerCase()] : undefined;\n }\n\n function normalizeObjectUnits(inputObject) {\n var normalizedInput = {},\n normalizedProp,\n prop;\n\n for (prop in inputObject) {\n if (hasOwnProp(inputObject, prop)) {\n normalizedProp = normalizeUnits(prop);\n\n if (normalizedProp) {\n normalizedInput[normalizedProp] = inputObject[prop];\n }\n }\n }\n\n return normalizedInput;\n }\n\n var priorities = {};\n\n function addUnitPriority(unit, priority) {\n priorities[unit] = priority;\n }\n\n function getPrioritizedUnits(unitsObj) {\n var units = [];\n\n for (var u in unitsObj) {\n units.push({\n unit: u,\n priority: priorities[u]\n });\n }\n\n units.sort(function (a, b) {\n return a.priority - b.priority;\n });\n return units;\n }\n\n function zeroFill(number, targetLength, forceSign) {\n var absNumber = '' + Math.abs(number),\n zerosToFill = targetLength - absNumber.length,\n sign = number >= 0;\n return (sign ? forceSign ? '+' : '' : '-') + Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) + absNumber;\n }\n\n var formattingTokens = /(\\[[^\\[]*\\])|(\\\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g;\n var localFormattingTokens = /(\\[[^\\[]*\\])|(\\\\)?(LTS|LT|LL?L?L?|l{1,4})/g;\n var formatFunctions = {};\n var formatTokenFunctions = {}; // token: 'M'\n // padded: ['MM', 2]\n // ordinal: 'Mo'\n // callback: function () { this.month() + 1 }\n\n function addFormatToken(token, padded, ordinal, callback) {\n var func = callback;\n\n if (typeof callback === 'string') {\n func = function () {\n return this[callback]();\n };\n }\n\n if (token) {\n formatTokenFunctions[token] = func;\n }\n\n if (padded) {\n formatTokenFunctions[padded[0]] = function () {\n return zeroFill(func.apply(this, arguments), padded[1], padded[2]);\n };\n }\n\n if (ordinal) {\n formatTokenFunctions[ordinal] = function () {\n return this.localeData().ordinal(func.apply(this, arguments), token);\n };\n }\n }\n\n function removeFormattingTokens(input) {\n if (input.match(/\\[[\\s\\S]/)) {\n return input.replace(/^\\[|\\]$/g, '');\n }\n\n return input.replace(/\\\\/g, '');\n }\n\n function makeFormatFunction(format) {\n var array = format.match(formattingTokens),\n i,\n length;\n\n for (i = 0, length = array.length; i < length; i++) {\n if (formatTokenFunctions[array[i]]) {\n array[i] = formatTokenFunctions[array[i]];\n } else {\n array[i] = removeFormattingTokens(array[i]);\n }\n }\n\n return function (mom) {\n var output = '',\n i;\n\n for (i = 0; i < length; i++) {\n output += isFunction(array[i]) ? array[i].call(mom, format) : array[i];\n }\n\n return output;\n };\n } // format date using native date object\n\n\n function formatMoment(m, format) {\n if (!m.isValid()) {\n return m.localeData().invalidDate();\n }\n\n format = expandFormat(format, m.localeData());\n formatFunctions[format] = formatFunctions[format] || makeFormatFunction(format);\n return formatFunctions[format](m);\n }\n\n function expandFormat(format, locale) {\n var i = 5;\n\n function replaceLongDateFormatTokens(input) {\n return locale.longDateFormat(input) || input;\n }\n\n localFormattingTokens.lastIndex = 0;\n\n while (i >= 0 && localFormattingTokens.test(format)) {\n format = format.replace(localFormattingTokens, replaceLongDateFormatTokens);\n localFormattingTokens.lastIndex = 0;\n i -= 1;\n }\n\n return format;\n }\n\n var match1 = /\\d/; // 0 - 9\n\n var match2 = /\\d\\d/; // 00 - 99\n\n var match3 = /\\d{3}/; // 000 - 999\n\n var match4 = /\\d{4}/; // 0000 - 9999\n\n var match6 = /[+-]?\\d{6}/; // -999999 - 999999\n\n var match1to2 = /\\d\\d?/; // 0 - 99\n\n var match3to4 = /\\d\\d\\d\\d?/; // 999 - 9999\n\n var match5to6 = /\\d\\d\\d\\d\\d\\d?/; // 99999 - 999999\n\n var match1to3 = /\\d{1,3}/; // 0 - 999\n\n var match1to4 = /\\d{1,4}/; // 0 - 9999\n\n var match1to6 = /[+-]?\\d{1,6}/; // -999999 - 999999\n\n var matchUnsigned = /\\d+/; // 0 - inf\n\n var matchSigned = /[+-]?\\d+/; // -inf - inf\n\n var matchOffset = /Z|[+-]\\d\\d:?\\d\\d/gi; // +00:00 -00:00 +0000 -0000 or Z\n\n var matchShortOffset = /Z|[+-]\\d\\d(?::?\\d\\d)?/gi; // +00 -00 +00:00 -00:00 +0000 -0000 or Z\n\n var matchTimestamp = /[+-]?\\d+(\\.\\d{1,3})?/; // 123456789 123456789.123\n // any word (or two) characters or numbers including two/three word month in arabic.\n // includes scottish gaelic two word and hyphenated months\n\n var matchWord = /[0-9]{0,256}['a-z\\u00A0-\\u05FF\\u0700-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFF07\\uFF10-\\uFFEF]{1,256}|[\\u0600-\\u06FF\\/]{1,256}(\\s*?[\\u0600-\\u06FF]{1,256}){1,2}/i;\n var regexes = {};\n\n function addRegexToken(token, regex, strictRegex) {\n regexes[token] = isFunction(regex) ? regex : function (isStrict, localeData) {\n return isStrict && strictRegex ? strictRegex : regex;\n };\n }\n\n function getParseRegexForToken(token, config) {\n if (!hasOwnProp(regexes, token)) {\n return new RegExp(unescapeFormat(token));\n }\n\n return regexes[token](config._strict, config._locale);\n } // Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript\n\n\n function unescapeFormat(s) {\n return regexEscape(s.replace('\\\\', '').replace(/\\\\(\\[)|\\\\(\\])|\\[([^\\]\\[]*)\\]|\\\\(.)/g, function (matched, p1, p2, p3, p4) {\n return p1 || p2 || p3 || p4;\n }));\n }\n\n function regexEscape(s) {\n return s.replace(/[-\\/\\\\^$*+?.()|[\\]{}]/g, '\\\\$&');\n }\n\n var tokens = {};\n\n function addParseToken(token, callback) {\n var i,\n func = callback;\n\n if (typeof token === 'string') {\n token = [token];\n }\n\n if (isNumber(callback)) {\n func = function (input, array) {\n array[callback] = toInt(input);\n };\n }\n\n for (i = 0; i < token.length; i++) {\n tokens[token[i]] = func;\n }\n }\n\n function addWeekParseToken(token, callback) {\n addParseToken(token, function (input, array, config, token) {\n config._w = config._w || {};\n callback(input, config._w, config, token);\n });\n }\n\n function addTimeToArrayFromToken(token, input, config) {\n if (input != null && hasOwnProp(tokens, token)) {\n tokens[token](input, config._a, config, token);\n }\n }\n\n var YEAR = 0;\n var MONTH = 1;\n var DATE = 2;\n var HOUR = 3;\n var MINUTE = 4;\n var SECOND = 5;\n var MILLISECOND = 6;\n var WEEK = 7;\n var WEEKDAY = 8; // FORMATTING\n\n addFormatToken('Y', 0, 0, function () {\n var y = this.year();\n return y <= 9999 ? '' + y : '+' + y;\n });\n addFormatToken(0, ['YY', 2], 0, function () {\n return this.year() % 100;\n });\n addFormatToken(0, ['YYYY', 4], 0, 'year');\n addFormatToken(0, ['YYYYY', 5], 0, 'year');\n addFormatToken(0, ['YYYYYY', 6, true], 0, 'year'); // ALIASES\n\n addUnitAlias('year', 'y'); // PRIORITIES\n\n addUnitPriority('year', 1); // PARSING\n\n addRegexToken('Y', matchSigned);\n addRegexToken('YY', match1to2, match2);\n addRegexToken('YYYY', match1to4, match4);\n addRegexToken('YYYYY', match1to6, match6);\n addRegexToken('YYYYYY', match1to6, match6);\n addParseToken(['YYYYY', 'YYYYYY'], YEAR);\n addParseToken('YYYY', function (input, array) {\n array[YEAR] = input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input);\n });\n addParseToken('YY', function (input, array) {\n array[YEAR] = hooks.parseTwoDigitYear(input);\n });\n addParseToken('Y', function (input, array) {\n array[YEAR] = parseInt(input, 10);\n }); // HELPERS\n\n function daysInYear(year) {\n return isLeapYear(year) ? 366 : 365;\n }\n\n function isLeapYear(year) {\n return year % 4 === 0 && year % 100 !== 0 || year % 400 === 0;\n } // HOOKS\n\n\n hooks.parseTwoDigitYear = function (input) {\n return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);\n }; // MOMENTS\n\n\n var getSetYear = makeGetSet('FullYear', true);\n\n function getIsLeapYear() {\n return isLeapYear(this.year());\n }\n\n function makeGetSet(unit, keepTime) {\n return function (value) {\n if (value != null) {\n set$1(this, unit, value);\n hooks.updateOffset(this, keepTime);\n return this;\n } else {\n return get(this, unit);\n }\n };\n }\n\n function get(mom, unit) {\n return mom.isValid() ? mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]() : NaN;\n }\n\n function set$1(mom, unit, value) {\n if (mom.isValid() && !isNaN(value)) {\n if (unit === 'FullYear' && isLeapYear(mom.year()) && mom.month() === 1 && mom.date() === 29) {\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value, mom.month(), daysInMonth(value, mom.month()));\n } else {\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value);\n }\n }\n } // MOMENTS\n\n\n function stringGet(units) {\n units = normalizeUnits(units);\n\n if (isFunction(this[units])) {\n return this[units]();\n }\n\n return this;\n }\n\n function stringSet(units, value) {\n if (typeof units === 'object') {\n units = normalizeObjectUnits(units);\n var prioritized = getPrioritizedUnits(units);\n\n for (var i = 0; i < prioritized.length; i++) {\n this[prioritized[i].unit](units[prioritized[i].unit]);\n }\n } else {\n units = normalizeUnits(units);\n\n if (isFunction(this[units])) {\n return this[units](value);\n }\n }\n\n return this;\n }\n\n function mod(n, x) {\n return (n % x + x) % x;\n }\n\n var indexOf;\n\n if (Array.prototype.indexOf) {\n indexOf = Array.prototype.indexOf;\n } else {\n indexOf = function (o) {\n // I know\n var i;\n\n for (i = 0; i < this.length; ++i) {\n if (this[i] === o) {\n return i;\n }\n }\n\n return -1;\n };\n }\n\n function daysInMonth(year, month) {\n if (isNaN(year) || isNaN(month)) {\n return NaN;\n }\n\n var modMonth = mod(month, 12);\n year += (month - modMonth) / 12;\n return modMonth === 1 ? isLeapYear(year) ? 29 : 28 : 31 - modMonth % 7 % 2;\n } // FORMATTING\n\n\n addFormatToken('M', ['MM', 2], 'Mo', function () {\n return this.month() + 1;\n });\n addFormatToken('MMM', 0, 0, function (format) {\n return this.localeData().monthsShort(this, format);\n });\n addFormatToken('MMMM', 0, 0, function (format) {\n return this.localeData().months(this, format);\n }); // ALIASES\n\n addUnitAlias('month', 'M'); // PRIORITY\n\n addUnitPriority('month', 8); // PARSING\n\n addRegexToken('M', match1to2);\n addRegexToken('MM', match1to2, match2);\n addRegexToken('MMM', function (isStrict, locale) {\n return locale.monthsShortRegex(isStrict);\n });\n addRegexToken('MMMM', function (isStrict, locale) {\n return locale.monthsRegex(isStrict);\n });\n addParseToken(['M', 'MM'], function (input, array) {\n array[MONTH] = toInt(input) - 1;\n });\n addParseToken(['MMM', 'MMMM'], function (input, array, config, token) {\n var month = config._locale.monthsParse(input, token, config._strict); // if we didn't find a month name, mark the date as invalid.\n\n\n if (month != null) {\n array[MONTH] = month;\n } else {\n getParsingFlags(config).invalidMonth = input;\n }\n }); // LOCALES\n\n var MONTHS_IN_FORMAT = /D[oD]?(\\[[^\\[\\]]*\\]|\\s)+MMMM?/;\n var defaultLocaleMonths = 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_');\n\n function localeMonths(m, format) {\n if (!m) {\n return isArray(this._months) ? this._months : this._months['standalone'];\n }\n\n return isArray(this._months) ? this._months[m.month()] : this._months[(this._months.isFormat || MONTHS_IN_FORMAT).test(format) ? 'format' : 'standalone'][m.month()];\n }\n\n var defaultLocaleMonthsShort = 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_');\n\n function localeMonthsShort(m, format) {\n if (!m) {\n return isArray(this._monthsShort) ? this._monthsShort : this._monthsShort['standalone'];\n }\n\n return isArray(this._monthsShort) ? this._monthsShort[m.month()] : this._monthsShort[MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'][m.month()];\n }\n\n function handleStrictParse(monthName, format, strict) {\n var i,\n ii,\n mom,\n llc = monthName.toLocaleLowerCase();\n\n if (!this._monthsParse) {\n // this is not used\n this._monthsParse = [];\n this._longMonthsParse = [];\n this._shortMonthsParse = [];\n\n for (i = 0; i < 12; ++i) {\n mom = createUTC([2000, i]);\n this._shortMonthsParse[i] = this.monthsShort(mom, '').toLocaleLowerCase();\n this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase();\n }\n }\n\n if (strict) {\n if (format === 'MMM') {\n ii = indexOf.call(this._shortMonthsParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._longMonthsParse, llc);\n return ii !== -1 ? ii : null;\n }\n } else {\n if (format === 'MMM') {\n ii = indexOf.call(this._shortMonthsParse, llc);\n\n if (ii !== -1) {\n return ii;\n }\n\n ii = indexOf.call(this._longMonthsParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._longMonthsParse, llc);\n\n if (ii !== -1) {\n return ii;\n }\n\n ii = indexOf.call(this._shortMonthsParse, llc);\n return ii !== -1 ? ii : null;\n }\n }\n }\n\n function localeMonthsParse(monthName, format, strict) {\n var i, mom, regex;\n\n if (this._monthsParseExact) {\n return handleStrictParse.call(this, monthName, format, strict);\n }\n\n if (!this._monthsParse) {\n this._monthsParse = [];\n this._longMonthsParse = [];\n this._shortMonthsParse = [];\n } // TODO: add sorting\n // Sorting makes sure if one month (or abbr) is a prefix of another\n // see sorting in computeMonthsParse\n\n\n for (i = 0; i < 12; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, i]);\n\n if (strict && !this._longMonthsParse[i]) {\n this._longMonthsParse[i] = new RegExp('^' + this.months(mom, '').replace('.', '') + '$', 'i');\n this._shortMonthsParse[i] = new RegExp('^' + this.monthsShort(mom, '').replace('.', '') + '$', 'i');\n }\n\n if (!strict && !this._monthsParse[i]) {\n regex = '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, '');\n this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i');\n } // test the regex\n\n\n if (strict && format === 'MMMM' && this._longMonthsParse[i].test(monthName)) {\n return i;\n } else if (strict && format === 'MMM' && this._shortMonthsParse[i].test(monthName)) {\n return i;\n } else if (!strict && this._monthsParse[i].test(monthName)) {\n return i;\n }\n }\n } // MOMENTS\n\n\n function setMonth(mom, value) {\n var dayOfMonth;\n\n if (!mom.isValid()) {\n // No op\n return mom;\n }\n\n if (typeof value === 'string') {\n if (/^\\d+$/.test(value)) {\n value = toInt(value);\n } else {\n value = mom.localeData().monthsParse(value); // TODO: Another silent failure?\n\n if (!isNumber(value)) {\n return mom;\n }\n }\n }\n\n dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value));\n\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth);\n\n return mom;\n }\n\n function getSetMonth(value) {\n if (value != null) {\n setMonth(this, value);\n hooks.updateOffset(this, true);\n return this;\n } else {\n return get(this, 'Month');\n }\n }\n\n function getDaysInMonth() {\n return daysInMonth(this.year(), this.month());\n }\n\n var defaultMonthsShortRegex = matchWord;\n\n function monthsShortRegex(isStrict) {\n if (this._monthsParseExact) {\n if (!hasOwnProp(this, '_monthsRegex')) {\n computeMonthsParse.call(this);\n }\n\n if (isStrict) {\n return this._monthsShortStrictRegex;\n } else {\n return this._monthsShortRegex;\n }\n } else {\n if (!hasOwnProp(this, '_monthsShortRegex')) {\n this._monthsShortRegex = defaultMonthsShortRegex;\n }\n\n return this._monthsShortStrictRegex && isStrict ? this._monthsShortStrictRegex : this._monthsShortRegex;\n }\n }\n\n var defaultMonthsRegex = matchWord;\n\n function monthsRegex(isStrict) {\n if (this._monthsParseExact) {\n if (!hasOwnProp(this, '_monthsRegex')) {\n computeMonthsParse.call(this);\n }\n\n if (isStrict) {\n return this._monthsStrictRegex;\n } else {\n return this._monthsRegex;\n }\n } else {\n if (!hasOwnProp(this, '_monthsRegex')) {\n this._monthsRegex = defaultMonthsRegex;\n }\n\n return this._monthsStrictRegex && isStrict ? this._monthsStrictRegex : this._monthsRegex;\n }\n }\n\n function computeMonthsParse() {\n function cmpLenRev(a, b) {\n return b.length - a.length;\n }\n\n var shortPieces = [],\n longPieces = [],\n mixedPieces = [],\n i,\n mom;\n\n for (i = 0; i < 12; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, i]);\n shortPieces.push(this.monthsShort(mom, ''));\n longPieces.push(this.months(mom, ''));\n mixedPieces.push(this.months(mom, ''));\n mixedPieces.push(this.monthsShort(mom, ''));\n } // Sorting makes sure if one month (or abbr) is a prefix of another it\n // will match the longer piece.\n\n\n shortPieces.sort(cmpLenRev);\n longPieces.sort(cmpLenRev);\n mixedPieces.sort(cmpLenRev);\n\n for (i = 0; i < 12; i++) {\n shortPieces[i] = regexEscape(shortPieces[i]);\n longPieces[i] = regexEscape(longPieces[i]);\n }\n\n for (i = 0; i < 24; i++) {\n mixedPieces[i] = regexEscape(mixedPieces[i]);\n }\n\n this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._monthsShortRegex = this._monthsRegex;\n this._monthsStrictRegex = new RegExp('^(' + longPieces.join('|') + ')', 'i');\n this._monthsShortStrictRegex = new RegExp('^(' + shortPieces.join('|') + ')', 'i');\n }\n\n function createDate(y, m, d, h, M, s, ms) {\n // can't just apply() to create a date:\n // https://stackoverflow.com/q/181348\n var date; // the date constructor remaps years 0-99 to 1900-1999\n\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n date = new Date(y + 400, m, d, h, M, s, ms);\n\n if (isFinite(date.getFullYear())) {\n date.setFullYear(y);\n }\n } else {\n date = new Date(y, m, d, h, M, s, ms);\n }\n\n return date;\n }\n\n function createUTCDate(y) {\n var date; // the Date.UTC function remaps years 0-99 to 1900-1999\n\n if (y < 100 && y >= 0) {\n var args = Array.prototype.slice.call(arguments); // preserve leap years using a full 400 year cycle, then reset\n\n args[0] = y + 400;\n date = new Date(Date.UTC.apply(null, args));\n\n if (isFinite(date.getUTCFullYear())) {\n date.setUTCFullYear(y);\n }\n } else {\n date = new Date(Date.UTC.apply(null, arguments));\n }\n\n return date;\n } // start-of-first-week - start-of-year\n\n\n function firstWeekOffset(year, dow, doy) {\n var // first-week day -- which january is always in the first week (4 for iso, 1 for other)\n fwd = 7 + dow - doy,\n // first-week day local weekday -- which local weekday is fwd\n fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7;\n return -fwdlw + fwd - 1;\n } // https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday\n\n\n function dayOfYearFromWeeks(year, week, weekday, dow, doy) {\n var localWeekday = (7 + weekday - dow) % 7,\n weekOffset = firstWeekOffset(year, dow, doy),\n dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset,\n resYear,\n resDayOfYear;\n\n if (dayOfYear <= 0) {\n resYear = year - 1;\n resDayOfYear = daysInYear(resYear) + dayOfYear;\n } else if (dayOfYear > daysInYear(year)) {\n resYear = year + 1;\n resDayOfYear = dayOfYear - daysInYear(year);\n } else {\n resYear = year;\n resDayOfYear = dayOfYear;\n }\n\n return {\n year: resYear,\n dayOfYear: resDayOfYear\n };\n }\n\n function weekOfYear(mom, dow, doy) {\n var weekOffset = firstWeekOffset(mom.year(), dow, doy),\n week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1,\n resWeek,\n resYear;\n\n if (week < 1) {\n resYear = mom.year() - 1;\n resWeek = week + weeksInYear(resYear, dow, doy);\n } else if (week > weeksInYear(mom.year(), dow, doy)) {\n resWeek = week - weeksInYear(mom.year(), dow, doy);\n resYear = mom.year() + 1;\n } else {\n resYear = mom.year();\n resWeek = week;\n }\n\n return {\n week: resWeek,\n year: resYear\n };\n }\n\n function weeksInYear(year, dow, doy) {\n var weekOffset = firstWeekOffset(year, dow, doy),\n weekOffsetNext = firstWeekOffset(year + 1, dow, doy);\n return (daysInYear(year) - weekOffset + weekOffsetNext) / 7;\n } // FORMATTING\n\n\n addFormatToken('w', ['ww', 2], 'wo', 'week');\n addFormatToken('W', ['WW', 2], 'Wo', 'isoWeek'); // ALIASES\n\n addUnitAlias('week', 'w');\n addUnitAlias('isoWeek', 'W'); // PRIORITIES\n\n addUnitPriority('week', 5);\n addUnitPriority('isoWeek', 5); // PARSING\n\n addRegexToken('w', match1to2);\n addRegexToken('ww', match1to2, match2);\n addRegexToken('W', match1to2);\n addRegexToken('WW', match1to2, match2);\n addWeekParseToken(['w', 'ww', 'W', 'WW'], function (input, week, config, token) {\n week[token.substr(0, 1)] = toInt(input);\n }); // HELPERS\n // LOCALES\n\n function localeWeek(mom) {\n return weekOfYear(mom, this._week.dow, this._week.doy).week;\n }\n\n var defaultLocaleWeek = {\n dow: 0,\n // Sunday is the first day of the week.\n doy: 6 // The week that contains Jan 6th is the first week of the year.\n\n };\n\n function localeFirstDayOfWeek() {\n return this._week.dow;\n }\n\n function localeFirstDayOfYear() {\n return this._week.doy;\n } // MOMENTS\n\n\n function getSetWeek(input) {\n var week = this.localeData().week(this);\n return input == null ? week : this.add((input - week) * 7, 'd');\n }\n\n function getSetISOWeek(input) {\n var week = weekOfYear(this, 1, 4).week;\n return input == null ? week : this.add((input - week) * 7, 'd');\n } // FORMATTING\n\n\n addFormatToken('d', 0, 'do', 'day');\n addFormatToken('dd', 0, 0, function (format) {\n return this.localeData().weekdaysMin(this, format);\n });\n addFormatToken('ddd', 0, 0, function (format) {\n return this.localeData().weekdaysShort(this, format);\n });\n addFormatToken('dddd', 0, 0, function (format) {\n return this.localeData().weekdays(this, format);\n });\n addFormatToken('e', 0, 0, 'weekday');\n addFormatToken('E', 0, 0, 'isoWeekday'); // ALIASES\n\n addUnitAlias('day', 'd');\n addUnitAlias('weekday', 'e');\n addUnitAlias('isoWeekday', 'E'); // PRIORITY\n\n addUnitPriority('day', 11);\n addUnitPriority('weekday', 11);\n addUnitPriority('isoWeekday', 11); // PARSING\n\n addRegexToken('d', match1to2);\n addRegexToken('e', match1to2);\n addRegexToken('E', match1to2);\n addRegexToken('dd', function (isStrict, locale) {\n return locale.weekdaysMinRegex(isStrict);\n });\n addRegexToken('ddd', function (isStrict, locale) {\n return locale.weekdaysShortRegex(isStrict);\n });\n addRegexToken('dddd', function (isStrict, locale) {\n return locale.weekdaysRegex(isStrict);\n });\n addWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) {\n var weekday = config._locale.weekdaysParse(input, token, config._strict); // if we didn't get a weekday name, mark the date as invalid\n\n\n if (weekday != null) {\n week.d = weekday;\n } else {\n getParsingFlags(config).invalidWeekday = input;\n }\n });\n addWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) {\n week[token] = toInt(input);\n }); // HELPERS\n\n function parseWeekday(input, locale) {\n if (typeof input !== 'string') {\n return input;\n }\n\n if (!isNaN(input)) {\n return parseInt(input, 10);\n }\n\n input = locale.weekdaysParse(input);\n\n if (typeof input === 'number') {\n return input;\n }\n\n return null;\n }\n\n function parseIsoWeekday(input, locale) {\n if (typeof input === 'string') {\n return locale.weekdaysParse(input) % 7 || 7;\n }\n\n return isNaN(input) ? null : input;\n } // LOCALES\n\n\n function shiftWeekdays(ws, n) {\n return ws.slice(n, 7).concat(ws.slice(0, n));\n }\n\n var defaultLocaleWeekdays = 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_');\n\n function localeWeekdays(m, format) {\n var weekdays = isArray(this._weekdays) ? this._weekdays : this._weekdays[m && m !== true && this._weekdays.isFormat.test(format) ? 'format' : 'standalone'];\n return m === true ? shiftWeekdays(weekdays, this._week.dow) : m ? weekdays[m.day()] : weekdays;\n }\n\n var defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_');\n\n function localeWeekdaysShort(m) {\n return m === true ? shiftWeekdays(this._weekdaysShort, this._week.dow) : m ? this._weekdaysShort[m.day()] : this._weekdaysShort;\n }\n\n var defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_');\n\n function localeWeekdaysMin(m) {\n return m === true ? shiftWeekdays(this._weekdaysMin, this._week.dow) : m ? this._weekdaysMin[m.day()] : this._weekdaysMin;\n }\n\n function handleStrictParse$1(weekdayName, format, strict) {\n var i,\n ii,\n mom,\n llc = weekdayName.toLocaleLowerCase();\n\n if (!this._weekdaysParse) {\n this._weekdaysParse = [];\n this._shortWeekdaysParse = [];\n this._minWeekdaysParse = [];\n\n for (i = 0; i < 7; ++i) {\n mom = createUTC([2000, 1]).day(i);\n this._minWeekdaysParse[i] = this.weekdaysMin(mom, '').toLocaleLowerCase();\n this._shortWeekdaysParse[i] = this.weekdaysShort(mom, '').toLocaleLowerCase();\n this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase();\n }\n }\n\n if (strict) {\n if (format === 'dddd') {\n ii = indexOf.call(this._weekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else if (format === 'ddd') {\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n }\n } else {\n if (format === 'dddd') {\n ii = indexOf.call(this._weekdaysParse, llc);\n\n if (ii !== -1) {\n return ii;\n }\n\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n\n if (ii !== -1) {\n return ii;\n }\n\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else if (format === 'ddd') {\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n\n if (ii !== -1) {\n return ii;\n }\n\n ii = indexOf.call(this._weekdaysParse, llc);\n\n if (ii !== -1) {\n return ii;\n }\n\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._minWeekdaysParse, llc);\n\n if (ii !== -1) {\n return ii;\n }\n\n ii = indexOf.call(this._weekdaysParse, llc);\n\n if (ii !== -1) {\n return ii;\n }\n\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n }\n }\n }\n\n function localeWeekdaysParse(weekdayName, format, strict) {\n var i, mom, regex;\n\n if (this._weekdaysParseExact) {\n return handleStrictParse$1.call(this, weekdayName, format, strict);\n }\n\n if (!this._weekdaysParse) {\n this._weekdaysParse = [];\n this._minWeekdaysParse = [];\n this._shortWeekdaysParse = [];\n this._fullWeekdaysParse = [];\n }\n\n for (i = 0; i < 7; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, 1]).day(i);\n\n if (strict && !this._fullWeekdaysParse[i]) {\n this._fullWeekdaysParse[i] = new RegExp('^' + this.weekdays(mom, '').replace('.', '\\\\.?') + '$', 'i');\n this._shortWeekdaysParse[i] = new RegExp('^' + this.weekdaysShort(mom, '').replace('.', '\\\\.?') + '$', 'i');\n this._minWeekdaysParse[i] = new RegExp('^' + this.weekdaysMin(mom, '').replace('.', '\\\\.?') + '$', 'i');\n }\n\n if (!this._weekdaysParse[i]) {\n regex = '^' + this.weekdays(mom, '') + '|^' + this.weekdaysShort(mom, '') + '|^' + this.weekdaysMin(mom, '');\n this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i');\n } // test the regex\n\n\n if (strict && format === 'dddd' && this._fullWeekdaysParse[i].test(weekdayName)) {\n return i;\n } else if (strict && format === 'ddd' && this._shortWeekdaysParse[i].test(weekdayName)) {\n return i;\n } else if (strict && format === 'dd' && this._minWeekdaysParse[i].test(weekdayName)) {\n return i;\n } else if (!strict && this._weekdaysParse[i].test(weekdayName)) {\n return i;\n }\n }\n } // MOMENTS\n\n\n function getSetDayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n\n var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay();\n\n if (input != null) {\n input = parseWeekday(input, this.localeData());\n return this.add(input - day, 'd');\n } else {\n return day;\n }\n }\n\n function getSetLocaleDayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n\n var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7;\n return input == null ? weekday : this.add(input - weekday, 'd');\n }\n\n function getSetISODayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n } // behaves the same as moment#day except\n // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)\n // as a setter, sunday should belong to the previous week.\n\n\n if (input != null) {\n var weekday = parseIsoWeekday(input, this.localeData());\n return this.day(this.day() % 7 ? weekday : weekday - 7);\n } else {\n return this.day() || 7;\n }\n }\n\n var defaultWeekdaysRegex = matchWord;\n\n function weekdaysRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n\n if (isStrict) {\n return this._weekdaysStrictRegex;\n } else {\n return this._weekdaysRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n this._weekdaysRegex = defaultWeekdaysRegex;\n }\n\n return this._weekdaysStrictRegex && isStrict ? this._weekdaysStrictRegex : this._weekdaysRegex;\n }\n }\n\n var defaultWeekdaysShortRegex = matchWord;\n\n function weekdaysShortRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n\n if (isStrict) {\n return this._weekdaysShortStrictRegex;\n } else {\n return this._weekdaysShortRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysShortRegex')) {\n this._weekdaysShortRegex = defaultWeekdaysShortRegex;\n }\n\n return this._weekdaysShortStrictRegex && isStrict ? this._weekdaysShortStrictRegex : this._weekdaysShortRegex;\n }\n }\n\n var defaultWeekdaysMinRegex = matchWord;\n\n function weekdaysMinRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n\n if (isStrict) {\n return this._weekdaysMinStrictRegex;\n } else {\n return this._weekdaysMinRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysMinRegex')) {\n this._weekdaysMinRegex = defaultWeekdaysMinRegex;\n }\n\n return this._weekdaysMinStrictRegex && isStrict ? this._weekdaysMinStrictRegex : this._weekdaysMinRegex;\n }\n }\n\n function computeWeekdaysParse() {\n function cmpLenRev(a, b) {\n return b.length - a.length;\n }\n\n var minPieces = [],\n shortPieces = [],\n longPieces = [],\n mixedPieces = [],\n i,\n mom,\n minp,\n shortp,\n longp;\n\n for (i = 0; i < 7; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, 1]).day(i);\n minp = this.weekdaysMin(mom, '');\n shortp = this.weekdaysShort(mom, '');\n longp = this.weekdays(mom, '');\n minPieces.push(minp);\n shortPieces.push(shortp);\n longPieces.push(longp);\n mixedPieces.push(minp);\n mixedPieces.push(shortp);\n mixedPieces.push(longp);\n } // Sorting makes sure if one weekday (or abbr) is a prefix of another it\n // will match the longer piece.\n\n\n minPieces.sort(cmpLenRev);\n shortPieces.sort(cmpLenRev);\n longPieces.sort(cmpLenRev);\n mixedPieces.sort(cmpLenRev);\n\n for (i = 0; i < 7; i++) {\n shortPieces[i] = regexEscape(shortPieces[i]);\n longPieces[i] = regexEscape(longPieces[i]);\n mixedPieces[i] = regexEscape(mixedPieces[i]);\n }\n\n this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._weekdaysShortRegex = this._weekdaysRegex;\n this._weekdaysMinRegex = this._weekdaysRegex;\n this._weekdaysStrictRegex = new RegExp('^(' + longPieces.join('|') + ')', 'i');\n this._weekdaysShortStrictRegex = new RegExp('^(' + shortPieces.join('|') + ')', 'i');\n this._weekdaysMinStrictRegex = new RegExp('^(' + minPieces.join('|') + ')', 'i');\n } // FORMATTING\n\n\n function hFormat() {\n return this.hours() % 12 || 12;\n }\n\n function kFormat() {\n return this.hours() || 24;\n }\n\n addFormatToken('H', ['HH', 2], 0, 'hour');\n addFormatToken('h', ['hh', 2], 0, hFormat);\n addFormatToken('k', ['kk', 2], 0, kFormat);\n addFormatToken('hmm', 0, 0, function () {\n return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2);\n });\n addFormatToken('hmmss', 0, 0, function () {\n return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2) + zeroFill(this.seconds(), 2);\n });\n addFormatToken('Hmm', 0, 0, function () {\n return '' + this.hours() + zeroFill(this.minutes(), 2);\n });\n addFormatToken('Hmmss', 0, 0, function () {\n return '' + this.hours() + zeroFill(this.minutes(), 2) + zeroFill(this.seconds(), 2);\n });\n\n function meridiem(token, lowercase) {\n addFormatToken(token, 0, 0, function () {\n return this.localeData().meridiem(this.hours(), this.minutes(), lowercase);\n });\n }\n\n meridiem('a', true);\n meridiem('A', false); // ALIASES\n\n addUnitAlias('hour', 'h'); // PRIORITY\n\n addUnitPriority('hour', 13); // PARSING\n\n function matchMeridiem(isStrict, locale) {\n return locale._meridiemParse;\n }\n\n addRegexToken('a', matchMeridiem);\n addRegexToken('A', matchMeridiem);\n addRegexToken('H', match1to2);\n addRegexToken('h', match1to2);\n addRegexToken('k', match1to2);\n addRegexToken('HH', match1to2, match2);\n addRegexToken('hh', match1to2, match2);\n addRegexToken('kk', match1to2, match2);\n addRegexToken('hmm', match3to4);\n addRegexToken('hmmss', match5to6);\n addRegexToken('Hmm', match3to4);\n addRegexToken('Hmmss', match5to6);\n addParseToken(['H', 'HH'], HOUR);\n addParseToken(['k', 'kk'], function (input, array, config) {\n var kInput = toInt(input);\n array[HOUR] = kInput === 24 ? 0 : kInput;\n });\n addParseToken(['a', 'A'], function (input, array, config) {\n config._isPm = config._locale.isPM(input);\n config._meridiem = input;\n });\n addParseToken(['h', 'hh'], function (input, array, config) {\n array[HOUR] = toInt(input);\n getParsingFlags(config).bigHour = true;\n });\n addParseToken('hmm', function (input, array, config) {\n var pos = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos));\n array[MINUTE] = toInt(input.substr(pos));\n getParsingFlags(config).bigHour = true;\n });\n addParseToken('hmmss', function (input, array, config) {\n var pos1 = input.length - 4;\n var pos2 = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos1));\n array[MINUTE] = toInt(input.substr(pos1, 2));\n array[SECOND] = toInt(input.substr(pos2));\n getParsingFlags(config).bigHour = true;\n });\n addParseToken('Hmm', function (input, array, config) {\n var pos = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos));\n array[MINUTE] = toInt(input.substr(pos));\n });\n addParseToken('Hmmss', function (input, array, config) {\n var pos1 = input.length - 4;\n var pos2 = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos1));\n array[MINUTE] = toInt(input.substr(pos1, 2));\n array[SECOND] = toInt(input.substr(pos2));\n }); // LOCALES\n\n function localeIsPM(input) {\n // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays\n // Using charAt should be more compatible.\n return (input + '').toLowerCase().charAt(0) === 'p';\n }\n\n var defaultLocaleMeridiemParse = /[ap]\\.?m?\\.?/i;\n\n function localeMeridiem(hours, minutes, isLower) {\n if (hours > 11) {\n return isLower ? 'pm' : 'PM';\n } else {\n return isLower ? 'am' : 'AM';\n }\n } // MOMENTS\n // Setting the hour should keep the time, because the user explicitly\n // specified which hour they want. So trying to maintain the same hour (in\n // a new timezone) makes sense. Adding/subtracting hours does not follow\n // this rule.\n\n\n var getSetHour = makeGetSet('Hours', true);\n var baseConfig = {\n calendar: defaultCalendar,\n longDateFormat: defaultLongDateFormat,\n invalidDate: defaultInvalidDate,\n ordinal: defaultOrdinal,\n dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse,\n relativeTime: defaultRelativeTime,\n months: defaultLocaleMonths,\n monthsShort: defaultLocaleMonthsShort,\n week: defaultLocaleWeek,\n weekdays: defaultLocaleWeekdays,\n weekdaysMin: defaultLocaleWeekdaysMin,\n weekdaysShort: defaultLocaleWeekdaysShort,\n meridiemParse: defaultLocaleMeridiemParse\n }; // internal storage for locale config files\n\n var locales = {};\n var localeFamilies = {};\n var globalLocale;\n\n function normalizeLocale(key) {\n return key ? key.toLowerCase().replace('_', '-') : key;\n } // pick the locale from the array\n // try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each\n // substring from most specific to least, but move to the next array item if it's a more specific variant than the current root\n\n\n function chooseLocale(names) {\n var i = 0,\n j,\n next,\n locale,\n split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n\n if (locale) {\n return locale;\n }\n\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n\n j--;\n }\n\n i++;\n }\n\n return globalLocale;\n }\n\n function loadLocale(name) {\n var oldLocale = null; // TODO: Find a better way to register and load all the locales in Node\n\n if (!locales[name] && 'object' !== 'undefined' && module && module.exports) {\n try {\n oldLocale = globalLocale._abbr;\n var aliasedRequire = commonjsRequire;\n aliasedRequire('./locale/' + name);\n getSetGlobalLocale(oldLocale);\n } catch (e) {}\n }\n\n return locales[name];\n } // This function will load locale and then set the global locale. If\n // no arguments are passed in, it will simply return the current global\n // locale key.\n\n\n function getSetGlobalLocale(key, values) {\n var data;\n\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n } else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n } else {\n if (typeof console !== 'undefined' && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n }\n\n function defineLocale(name, config) {\n if (config !== null) {\n var locale,\n parentConfig = baseConfig;\n config.abbr = name;\n\n if (locales[name] != null) {\n deprecateSimple('defineLocaleOverride', 'use moment.updateLocale(localeName, config) to change ' + 'an existing locale. moment.defineLocale(localeName, ' + 'config) should only be used for creating a new locale ' + 'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.');\n parentConfig = locales[name]._config;\n } else if (config.parentLocale != null) {\n if (locales[config.parentLocale] != null) {\n parentConfig = locales[config.parentLocale]._config;\n } else {\n locale = loadLocale(config.parentLocale);\n\n if (locale != null) {\n parentConfig = locale._config;\n } else {\n if (!localeFamilies[config.parentLocale]) {\n localeFamilies[config.parentLocale] = [];\n }\n\n localeFamilies[config.parentLocale].push({\n name: name,\n config: config\n });\n return null;\n }\n }\n }\n\n locales[name] = new Locale(mergeConfigs(parentConfig, config));\n\n if (localeFamilies[name]) {\n localeFamilies[name].forEach(function (x) {\n defineLocale(x.name, x.config);\n });\n } // backwards compat for now: also set the locale\n // make sure we set the locale AFTER all child locales have been\n // created, so we won't end up with the child locale set.\n\n\n getSetGlobalLocale(name);\n return locales[name];\n } else {\n // useful for testing\n delete locales[name];\n return null;\n }\n }\n\n function updateLocale(name, config) {\n if (config != null) {\n var locale,\n tmpLocale,\n parentConfig = baseConfig; // MERGE\n\n tmpLocale = loadLocale(name);\n\n if (tmpLocale != null) {\n parentConfig = tmpLocale._config;\n }\n\n config = mergeConfigs(parentConfig, config);\n locale = new Locale(config);\n locale.parentLocale = locales[name];\n locales[name] = locale; // backwards compat for now: also set the locale\n\n getSetGlobalLocale(name);\n } else {\n // pass null for config to unupdate, useful for tests\n if (locales[name] != null) {\n if (locales[name].parentLocale != null) {\n locales[name] = locales[name].parentLocale;\n } else if (locales[name] != null) {\n delete locales[name];\n }\n }\n }\n\n return locales[name];\n } // returns locale data\n\n\n function getLocale(key) {\n var locale;\n\n if (key && key._locale && key._locale._abbr) {\n key = key._locale._abbr;\n }\n\n if (!key) {\n return globalLocale;\n }\n\n if (!isArray(key)) {\n //short-circuit everything else\n locale = loadLocale(key);\n\n if (locale) {\n return locale;\n }\n\n key = [key];\n }\n\n return chooseLocale(key);\n }\n\n function listLocales() {\n return keys(locales);\n }\n\n function checkOverflow(m) {\n var overflow;\n var a = m._a;\n\n if (a && getParsingFlags(m).overflow === -2) {\n overflow = a[MONTH] < 0 || a[MONTH] > 11 ? MONTH : a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH]) ? DATE : a[HOUR] < 0 || a[HOUR] > 24 || a[HOUR] === 24 && (a[MINUTE] !== 0 || a[SECOND] !== 0 || a[MILLISECOND] !== 0) ? HOUR : a[MINUTE] < 0 || a[MINUTE] > 59 ? MINUTE : a[SECOND] < 0 || a[SECOND] > 59 ? SECOND : a[MILLISECOND] < 0 || a[MILLISECOND] > 999 ? MILLISECOND : -1;\n\n if (getParsingFlags(m)._overflowDayOfYear && (overflow < YEAR || overflow > DATE)) {\n overflow = DATE;\n }\n\n if (getParsingFlags(m)._overflowWeeks && overflow === -1) {\n overflow = WEEK;\n }\n\n if (getParsingFlags(m)._overflowWeekday && overflow === -1) {\n overflow = WEEKDAY;\n }\n\n getParsingFlags(m).overflow = overflow;\n }\n\n return m;\n } // Pick the first defined of two or three arguments.\n\n\n function defaults(a, b, c) {\n if (a != null) {\n return a;\n }\n\n if (b != null) {\n return b;\n }\n\n return c;\n }\n\n function currentDateArray(config) {\n // hooks is actually the exported moment object\n var nowValue = new Date(hooks.now());\n\n if (config._useUTC) {\n return [nowValue.getUTCFullYear(), nowValue.getUTCMonth(), nowValue.getUTCDate()];\n }\n\n return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()];\n } // convert an array to a date.\n // the array should mirror the parameters below\n // note: all values past the year are optional and will default to the lowest possible value.\n // [year, month, day , hour, minute, second, millisecond]\n\n\n function configFromArray(config) {\n var i,\n date,\n input = [],\n currentDate,\n expectedWeekday,\n yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config); //compute day of the year from weeks and weekdays\n\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n } //if the day of the year is set, figure out what it is\n\n\n if (config._dayOfYear != null) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse) || config._dayOfYear === 0) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n } // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n\n\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n } // Zero out whatever was not defaulted, including time\n\n\n for (; i < 7; i++) {\n config._a[i] = input[i] = config._a[i] == null ? i === 2 ? 1 : 0 : config._a[i];\n } // Check for 24:00:00.000\n\n\n if (config._a[HOUR] === 24 && config._a[MINUTE] === 0 && config._a[SECOND] === 0 && config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n expectedWeekday = config._useUTC ? config._d.getUTCDay() : config._d.getDay(); // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n } // check for mismatching day of week\n\n\n if (config._w && typeof config._w.d !== 'undefined' && config._w.d !== expectedWeekday) {\n getParsingFlags(config).weekdayMismatch = true;\n }\n }\n\n function dayOfYearFromWeekInfo(config) {\n var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow;\n w = config._w;\n\n if (w.GG != null || w.W != null || w.E != null) {\n dow = 1;\n doy = 4; // TODO: We need to take the current isoWeekYear, but that depends on\n // how we interpret now (local, utc, fixed offset). So create\n // a now version of current config (take local/utc/offset flags, and\n // create now).\n\n weekYear = defaults(w.GG, config._a[YEAR], weekOfYear(createLocal(), 1, 4).year);\n week = defaults(w.W, 1);\n weekday = defaults(w.E, 1);\n\n if (weekday < 1 || weekday > 7) {\n weekdayOverflow = true;\n }\n } else {\n dow = config._locale._week.dow;\n doy = config._locale._week.doy;\n var curWeek = weekOfYear(createLocal(), dow, doy);\n weekYear = defaults(w.gg, config._a[YEAR], curWeek.year); // Default to current week.\n\n week = defaults(w.w, curWeek.week);\n\n if (w.d != null) {\n // weekday -- low day numbers are considered next week\n weekday = w.d;\n\n if (weekday < 0 || weekday > 6) {\n weekdayOverflow = true;\n }\n } else if (w.e != null) {\n // local weekday -- counting starts from beginning of week\n weekday = w.e + dow;\n\n if (w.e < 0 || w.e > 6) {\n weekdayOverflow = true;\n }\n } else {\n // default to beginning of week\n weekday = dow;\n }\n }\n\n if (week < 1 || week > weeksInYear(weekYear, dow, doy)) {\n getParsingFlags(config)._overflowWeeks = true;\n } else if (weekdayOverflow != null) {\n getParsingFlags(config)._overflowWeekday = true;\n } else {\n temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy);\n config._a[YEAR] = temp.year;\n config._dayOfYear = temp.dayOfYear;\n }\n } // iso 8601 regex\n // 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00)\n\n\n var extendedIsoRegex = /^\\s*((?:[+-]\\d{6}|\\d{4})-(?:\\d\\d-\\d\\d|W\\d\\d-\\d|W\\d\\d|\\d\\d\\d|\\d\\d))(?:(T| )(\\d\\d(?::\\d\\d(?::\\d\\d(?:[.,]\\d+)?)?)?)([\\+\\-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/;\n var basicIsoRegex = /^\\s*((?:[+-]\\d{6}|\\d{4})(?:\\d\\d\\d\\d|W\\d\\d\\d|W\\d\\d|\\d\\d\\d|\\d\\d))(?:(T| )(\\d\\d(?:\\d\\d(?:\\d\\d(?:[.,]\\d+)?)?)?)([\\+\\-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/;\n var tzRegex = /Z|[+-]\\d\\d(?::?\\d\\d)?/;\n var isoDates = [['YYYYYY-MM-DD', /[+-]\\d{6}-\\d\\d-\\d\\d/], ['YYYY-MM-DD', /\\d{4}-\\d\\d-\\d\\d/], ['GGGG-[W]WW-E', /\\d{4}-W\\d\\d-\\d/], ['GGGG-[W]WW', /\\d{4}-W\\d\\d/, false], ['YYYY-DDD', /\\d{4}-\\d{3}/], ['YYYY-MM', /\\d{4}-\\d\\d/, false], ['YYYYYYMMDD', /[+-]\\d{10}/], ['YYYYMMDD', /\\d{8}/], // YYYYMM is NOT allowed by the standard\n ['GGGG[W]WWE', /\\d{4}W\\d{3}/], ['GGGG[W]WW', /\\d{4}W\\d{2}/, false], ['YYYYDDD', /\\d{7}/]]; // iso time formats and regexes\n\n var isoTimes = [['HH:mm:ss.SSSS', /\\d\\d:\\d\\d:\\d\\d\\.\\d+/], ['HH:mm:ss,SSSS', /\\d\\d:\\d\\d:\\d\\d,\\d+/], ['HH:mm:ss', /\\d\\d:\\d\\d:\\d\\d/], ['HH:mm', /\\d\\d:\\d\\d/], ['HHmmss.SSSS', /\\d\\d\\d\\d\\d\\d\\.\\d+/], ['HHmmss,SSSS', /\\d\\d\\d\\d\\d\\d,\\d+/], ['HHmmss', /\\d\\d\\d\\d\\d\\d/], ['HHmm', /\\d\\d\\d\\d/], ['HH', /\\d\\d/]];\n var aspNetJsonRegex = /^\\/?Date\\((\\-?\\d+)/i; // date from iso format\n\n function configFromISO(config) {\n var i,\n l,\n string = config._i,\n match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string),\n allowTime,\n dateFormat,\n timeFormat,\n tzFormat;\n\n if (match) {\n getParsingFlags(config).iso = true;\n\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(match[1])) {\n dateFormat = isoDates[i][0];\n allowTime = isoDates[i][2] !== false;\n break;\n }\n }\n\n if (dateFormat == null) {\n config._isValid = false;\n return;\n }\n\n if (match[3]) {\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(match[3])) {\n // match[2] should be 'T' or space\n timeFormat = (match[2] || ' ') + isoTimes[i][0];\n break;\n }\n }\n\n if (timeFormat == null) {\n config._isValid = false;\n return;\n }\n }\n\n if (!allowTime && timeFormat != null) {\n config._isValid = false;\n return;\n }\n\n if (match[4]) {\n if (tzRegex.exec(match[4])) {\n tzFormat = 'Z';\n } else {\n config._isValid = false;\n return;\n }\n }\n\n config._f = dateFormat + (timeFormat || '') + (tzFormat || '');\n configFromStringAndFormat(config);\n } else {\n config._isValid = false;\n }\n } // RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3\n\n\n var rfc2822 = /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\\s)?(\\d{1,2})\\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\\s(\\d{2,4})\\s(\\d\\d):(\\d\\d)(?::(\\d\\d))?\\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\\d{4}))$/;\n\n function extractFromRFC2822Strings(yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr) {\n var result = [untruncateYear(yearStr), defaultLocaleMonthsShort.indexOf(monthStr), parseInt(dayStr, 10), parseInt(hourStr, 10), parseInt(minuteStr, 10)];\n\n if (secondStr) {\n result.push(parseInt(secondStr, 10));\n }\n\n return result;\n }\n\n function untruncateYear(yearStr) {\n var year = parseInt(yearStr, 10);\n\n if (year <= 49) {\n return 2000 + year;\n } else if (year <= 999) {\n return 1900 + year;\n }\n\n return year;\n }\n\n function preprocessRFC2822(s) {\n // Remove comments and folding whitespace and replace multiple-spaces with a single space\n return s.replace(/\\([^)]*\\)|[\\n\\t]/g, ' ').replace(/(\\s\\s+)/g, ' ').replace(/^\\s\\s*/, '').replace(/\\s\\s*$/, '');\n }\n\n function checkWeekday(weekdayStr, parsedInput, config) {\n if (weekdayStr) {\n // TODO: Replace the vanilla JS Date object with an indepentent day-of-week check.\n var weekdayProvided = defaultLocaleWeekdaysShort.indexOf(weekdayStr),\n weekdayActual = new Date(parsedInput[0], parsedInput[1], parsedInput[2]).getDay();\n\n if (weekdayProvided !== weekdayActual) {\n getParsingFlags(config).weekdayMismatch = true;\n config._isValid = false;\n return false;\n }\n }\n\n return true;\n }\n\n var obsOffsets = {\n UT: 0,\n GMT: 0,\n EDT: -4 * 60,\n EST: -5 * 60,\n CDT: -5 * 60,\n CST: -6 * 60,\n MDT: -6 * 60,\n MST: -7 * 60,\n PDT: -7 * 60,\n PST: -8 * 60\n };\n\n function calculateOffset(obsOffset, militaryOffset, numOffset) {\n if (obsOffset) {\n return obsOffsets[obsOffset];\n } else if (militaryOffset) {\n // the only allowed military tz is Z\n return 0;\n } else {\n var hm = parseInt(numOffset, 10);\n var m = hm % 100,\n h = (hm - m) / 100;\n return h * 60 + m;\n }\n } // date and time from ref 2822 format\n\n\n function configFromRFC2822(config) {\n var match = rfc2822.exec(preprocessRFC2822(config._i));\n\n if (match) {\n var parsedArray = extractFromRFC2822Strings(match[4], match[3], match[2], match[5], match[6], match[7]);\n\n if (!checkWeekday(match[1], parsedArray, config)) {\n return;\n }\n\n config._a = parsedArray;\n config._tzm = calculateOffset(match[8], match[9], match[10]);\n config._d = createUTCDate.apply(null, config._a);\n\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n\n getParsingFlags(config).rfc2822 = true;\n } else {\n config._isValid = false;\n }\n } // date from iso format or fallback\n\n\n function configFromString(config) {\n var matched = aspNetJsonRegex.exec(config._i);\n\n if (matched !== null) {\n config._d = new Date(+matched[1]);\n return;\n }\n\n configFromISO(config);\n\n if (config._isValid === false) {\n delete config._isValid;\n } else {\n return;\n }\n\n configFromRFC2822(config);\n\n if (config._isValid === false) {\n delete config._isValid;\n } else {\n return;\n } // Final attempt, use Input Fallback\n\n\n hooks.createFromInputFallback(config);\n }\n\n hooks.createFromInputFallback = deprecate('value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), ' + 'which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are ' + 'discouraged and will be removed in an upcoming major release. Please refer to ' + 'http://momentjs.com/guides/#/warnings/js-date/ for more info.', function (config) {\n config._d = new Date(config._i + (config._useUTC ? ' UTC' : ''));\n }); // constant that refers to the ISO standard\n\n hooks.ISO_8601 = function () {}; // constant that refers to the RFC 2822 form\n\n\n hooks.RFC_2822 = function () {}; // date from string and format string\n\n\n function configFromStringAndFormat(config) {\n // TODO: Move this to another part of the creation flow to prevent circular deps\n if (config._f === hooks.ISO_8601) {\n configFromISO(config);\n return;\n }\n\n if (config._f === hooks.RFC_2822) {\n configFromRFC2822(config);\n return;\n }\n\n config._a = [];\n getParsingFlags(config).empty = true; // This array is used to make a Date, either with `new Date` or `Date.UTC`\n\n var string = '' + config._i,\n i,\n parsedInput,\n tokens,\n token,\n skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0]; // console.log('token', token, 'parsedInput', parsedInput,\n // 'regex', getParseRegexForToken(token, config));\n\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n\n if (skipped.length > 0) {\n getParsingFlags(config).unusedInput.push(skipped);\n }\n\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n } // don't parse if it's not a known token\n\n\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n getParsingFlags(config).empty = false;\n } else {\n getParsingFlags(config).unusedTokens.push(token);\n }\n\n addTimeToArrayFromToken(token, parsedInput, config);\n } else if (config._strict && !parsedInput) {\n getParsingFlags(config).unusedTokens.push(token);\n }\n } // add remaining unparsed input length to the string\n\n\n getParsingFlags(config).charsLeftOver = stringLength - totalParsedInputLength;\n\n if (string.length > 0) {\n getParsingFlags(config).unusedInput.push(string);\n } // clear _12h flag if hour is <= 12\n\n\n if (config._a[HOUR] <= 12 && getParsingFlags(config).bigHour === true && config._a[HOUR] > 0) {\n getParsingFlags(config).bigHour = undefined;\n }\n\n getParsingFlags(config).parsedDateParts = config._a.slice(0);\n getParsingFlags(config).meridiem = config._meridiem; // handle meridiem\n\n config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR], config._meridiem);\n configFromArray(config);\n checkOverflow(config);\n }\n\n function meridiemFixWrap(locale, hour, meridiem) {\n var isPm;\n\n if (meridiem == null) {\n // nothing to do\n return hour;\n }\n\n if (locale.meridiemHour != null) {\n return locale.meridiemHour(hour, meridiem);\n } else if (locale.isPM != null) {\n // Fallback\n isPm = locale.isPM(meridiem);\n\n if (isPm && hour < 12) {\n hour += 12;\n }\n\n if (!isPm && hour === 12) {\n hour = 0;\n }\n\n return hour;\n } else {\n // this is not supposed to happen\n return hour;\n }\n } // date from string and array of format strings\n\n\n function configFromStringAndArray(config) {\n var tempConfig, bestMoment, scoreToBeat, i, currentScore;\n\n if (config._f.length === 0) {\n getParsingFlags(config).invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < config._f.length; i++) {\n currentScore = 0;\n tempConfig = copyConfig({}, config);\n\n if (config._useUTC != null) {\n tempConfig._useUTC = config._useUTC;\n }\n\n tempConfig._f = config._f[i];\n configFromStringAndFormat(tempConfig);\n\n if (!isValid(tempConfig)) {\n continue;\n } // if there is any input that was not parsed add a penalty for that format\n\n\n currentScore += getParsingFlags(tempConfig).charsLeftOver; //or tokens\n\n currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10;\n getParsingFlags(tempConfig).score = currentScore;\n\n if (scoreToBeat == null || currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n\n extend(config, bestMoment || tempConfig);\n }\n\n function configFromObject(config) {\n if (config._d) {\n return;\n }\n\n var i = normalizeObjectUnits(config._i);\n config._a = map([i.year, i.month, i.day || i.date, i.hour, i.minute, i.second, i.millisecond], function (obj) {\n return obj && parseInt(obj, 10);\n });\n configFromArray(config);\n }\n\n function createFromConfig(config) {\n var res = new Moment(checkOverflow(prepareConfig(config)));\n\n if (res._nextDay) {\n // Adding is smart enough around DST\n res.add(1, 'd');\n res._nextDay = undefined;\n }\n\n return res;\n }\n\n function prepareConfig(config) {\n var input = config._i,\n format = config._f;\n config._locale = config._locale || getLocale(config._l);\n\n if (input === null || format === undefined && input === '') {\n return createInvalid({\n nullInput: true\n });\n }\n\n if (typeof input === 'string') {\n config._i = input = config._locale.preparse(input);\n }\n\n if (isMoment(input)) {\n return new Moment(checkOverflow(input));\n } else if (isDate(input)) {\n config._d = input;\n } else if (isArray(format)) {\n configFromStringAndArray(config);\n } else if (format) {\n configFromStringAndFormat(config);\n } else {\n configFromInput(config);\n }\n\n if (!isValid(config)) {\n config._d = null;\n }\n\n return config;\n }\n\n function configFromInput(config) {\n var input = config._i;\n\n if (isUndefined(input)) {\n config._d = new Date(hooks.now());\n } else if (isDate(input)) {\n config._d = new Date(input.valueOf());\n } else if (typeof input === 'string') {\n configFromString(config);\n } else if (isArray(input)) {\n config._a = map(input.slice(0), function (obj) {\n return parseInt(obj, 10);\n });\n configFromArray(config);\n } else if (isObject(input)) {\n configFromObject(config);\n } else if (isNumber(input)) {\n // from milliseconds\n config._d = new Date(input);\n } else {\n hooks.createFromInputFallback(config);\n }\n }\n\n function createLocalOrUTC(input, format, locale, strict, isUTC) {\n var c = {};\n\n if (locale === true || locale === false) {\n strict = locale;\n locale = undefined;\n }\n\n if (isObject(input) && isObjectEmpty(input) || isArray(input) && input.length === 0) {\n input = undefined;\n } // object construction must be done this way.\n // https://github.com/moment/moment/issues/1423\n\n\n c._isAMomentObject = true;\n c._useUTC = c._isUTC = isUTC;\n c._l = locale;\n c._i = input;\n c._f = format;\n c._strict = strict;\n return createFromConfig(c);\n }\n\n function createLocal(input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, false);\n }\n\n var prototypeMin = deprecate('moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/', function () {\n var other = createLocal.apply(null, arguments);\n\n if (this.isValid() && other.isValid()) {\n return other < this ? this : other;\n } else {\n return createInvalid();\n }\n });\n var prototypeMax = deprecate('moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/', function () {\n var other = createLocal.apply(null, arguments);\n\n if (this.isValid() && other.isValid()) {\n return other > this ? this : other;\n } else {\n return createInvalid();\n }\n }); // Pick a moment m from moments so that m[fn](other) is true for all\n // other. This relies on the function fn to be transitive.\n //\n // moments should either be an array of moment objects or an array, whose\n // first element is an array of moment objects.\n\n function pickBy(fn, moments) {\n var res, i;\n\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n\n if (!moments.length) {\n return createLocal();\n }\n\n res = moments[0];\n\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n\n return res;\n } // TODO: Use [].sort instead?\n\n\n function min() {\n var args = [].slice.call(arguments, 0);\n return pickBy('isBefore', args);\n }\n\n function max() {\n var args = [].slice.call(arguments, 0);\n return pickBy('isAfter', args);\n }\n\n var now = function () {\n return Date.now ? Date.now() : +new Date();\n };\n\n var ordering = ['year', 'quarter', 'month', 'week', 'day', 'hour', 'minute', 'second', 'millisecond'];\n\n function isDurationValid(m) {\n for (var key in m) {\n if (!(indexOf.call(ordering, key) !== -1 && (m[key] == null || !isNaN(m[key])))) {\n return false;\n }\n }\n\n var unitHasDecimal = false;\n\n for (var i = 0; i < ordering.length; ++i) {\n if (m[ordering[i]]) {\n if (unitHasDecimal) {\n return false; // only allow non-integers for smallest unit\n }\n\n if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) {\n unitHasDecimal = true;\n }\n }\n }\n\n return true;\n }\n\n function isValid$1() {\n return this._isValid;\n }\n\n function createInvalid$1() {\n return createDuration(NaN);\n }\n\n function Duration(duration) {\n var normalizedInput = normalizeObjectUnits(duration),\n years = normalizedInput.year || 0,\n quarters = normalizedInput.quarter || 0,\n months = normalizedInput.month || 0,\n weeks = normalizedInput.week || normalizedInput.isoWeek || 0,\n days = normalizedInput.day || 0,\n hours = normalizedInput.hour || 0,\n minutes = normalizedInput.minute || 0,\n seconds = normalizedInput.second || 0,\n milliseconds = normalizedInput.millisecond || 0;\n this._isValid = isDurationValid(normalizedInput); // representation for dateAddRemove\n\n this._milliseconds = +milliseconds + seconds * 1e3 + // 1000\n minutes * 6e4 + // 1000 * 60\n hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978\n // Because of dateAddRemove treats 24 hours as different from a\n // day when working around DST, we need to store them separately\n\n this._days = +days + weeks * 7; // It is impossible to translate months into days without knowing\n // which months you are are talking about, so we have to store\n // it separately.\n\n this._months = +months + quarters * 3 + years * 12;\n this._data = {};\n this._locale = getLocale();\n\n this._bubble();\n }\n\n function isDuration(obj) {\n return obj instanceof Duration;\n }\n\n function absRound(number) {\n if (number < 0) {\n return Math.round(-1 * number) * -1;\n } else {\n return Math.round(number);\n }\n } // FORMATTING\n\n\n function offset(token, separator) {\n addFormatToken(token, 0, 0, function () {\n var offset = this.utcOffset();\n var sign = '+';\n\n if (offset < 0) {\n offset = -offset;\n sign = '-';\n }\n\n return sign + zeroFill(~~(offset / 60), 2) + separator + zeroFill(~~offset % 60, 2);\n });\n }\n\n offset('Z', ':');\n offset('ZZ', ''); // PARSING\n\n addRegexToken('Z', matchShortOffset);\n addRegexToken('ZZ', matchShortOffset);\n addParseToken(['Z', 'ZZ'], function (input, array, config) {\n config._useUTC = true;\n config._tzm = offsetFromString(matchShortOffset, input);\n }); // HELPERS\n // timezone chunker\n // '+10:00' > ['10', '00']\n // '-1530' > ['-15', '30']\n\n var chunkOffset = /([\\+\\-]|\\d\\d)/gi;\n\n function offsetFromString(matcher, string) {\n var matches = (string || '').match(matcher);\n\n if (matches === null) {\n return null;\n }\n\n var chunk = matches[matches.length - 1] || [];\n var parts = (chunk + '').match(chunkOffset) || ['-', 0, 0];\n var minutes = +(parts[1] * 60) + toInt(parts[2]);\n return minutes === 0 ? 0 : parts[0] === '+' ? minutes : -minutes;\n } // Return a moment from input, that is local/utc/zone equivalent to model.\n\n\n function cloneWithOffset(input, model) {\n var res, diff;\n\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? input.valueOf() : createLocal(input).valueOf()) - res.valueOf(); // Use low-level api, because this fn is low-level api.\n\n res._d.setTime(res._d.valueOf() + diff);\n\n hooks.updateOffset(res, false);\n return res;\n } else {\n return createLocal(input).local();\n }\n }\n\n function getDateOffset(m) {\n // On Firefox.24 Date#getTimezoneOffset returns a floating point.\n // https://github.com/moment/moment/pull/1871\n return -Math.round(m._d.getTimezoneOffset() / 15) * 15;\n } // HOOKS\n // This function will be called whenever a moment is mutated.\n // It is intended to keep the offset in sync with the timezone.\n\n\n hooks.updateOffset = function () {}; // MOMENTS\n // keepLocalTime = true means only change the timezone, without\n // affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]-->\n // 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset\n // +0200, so we adjust the time as needed, to be valid.\n //\n // Keeping the time actually adds/subtracts (one hour)\n // from the actual represented time. That is why we call updateOffset\n // a second time. In case it wants us to change the offset again\n // _changeInProgress == true case, then we have to adjust, because\n // there is no such time in the given timezone.\n\n\n function getSetOffset(input, keepLocalTime, keepMinutes) {\n var offset = this._offset || 0,\n localAdjust;\n\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n\n if (input === null) {\n return this;\n }\n } else if (Math.abs(input) < 16 && !keepMinutes) {\n input = input * 60;\n }\n\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n\n this._offset = input;\n this._isUTC = true;\n\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n addSubtract(this, createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }\n\n function getSetZone(input, keepLocalTime) {\n if (input != null) {\n if (typeof input !== 'string') {\n input = -input;\n }\n\n this.utcOffset(input, keepLocalTime);\n return this;\n } else {\n return -this.utcOffset();\n }\n }\n\n function setOffsetToUTC(keepLocalTime) {\n return this.utcOffset(0, keepLocalTime);\n }\n\n function setOffsetToLocal(keepLocalTime) {\n if (this._isUTC) {\n this.utcOffset(0, keepLocalTime);\n this._isUTC = false;\n\n if (keepLocalTime) {\n this.subtract(getDateOffset(this), 'm');\n }\n }\n\n return this;\n }\n\n function setOffsetToParsedOffset() {\n if (this._tzm != null) {\n this.utcOffset(this._tzm, false, true);\n } else if (typeof this._i === 'string') {\n var tZone = offsetFromString(matchOffset, this._i);\n\n if (tZone != null) {\n this.utcOffset(tZone);\n } else {\n this.utcOffset(0, true);\n }\n }\n\n return this;\n }\n\n function hasAlignedHourOffset(input) {\n if (!this.isValid()) {\n return false;\n }\n\n input = input ? createLocal(input).utcOffset() : 0;\n return (this.utcOffset() - input) % 60 === 0;\n }\n\n function isDaylightSavingTime() {\n return this.utcOffset() > this.clone().month(0).utcOffset() || this.utcOffset() > this.clone().month(5).utcOffset();\n }\n\n function isDaylightSavingTimeShifted() {\n if (!isUndefined(this._isDSTShifted)) {\n return this._isDSTShifted;\n }\n\n var c = {};\n copyConfig(c, this);\n c = prepareConfig(c);\n\n if (c._a) {\n var other = c._isUTC ? createUTC(c._a) : createLocal(c._a);\n this._isDSTShifted = this.isValid() && compareArrays(c._a, other.toArray()) > 0;\n } else {\n this._isDSTShifted = false;\n }\n\n return this._isDSTShifted;\n }\n\n function isLocal() {\n return this.isValid() ? !this._isUTC : false;\n }\n\n function isUtcOffset() {\n return this.isValid() ? this._isUTC : false;\n }\n\n function isUtc() {\n return this.isValid() ? this._isUTC && this._offset === 0 : false;\n } // ASP.NET json date format regex\n\n\n var aspNetRegex = /^(\\-|\\+)?(?:(\\d*)[. ])?(\\d+)\\:(\\d+)(?:\\:(\\d+)(\\.\\d*)?)?$/; // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html\n // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere\n // and further modified to allow for strings containing both week and day\n\n var isoRegex = /^(-|\\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;\n\n function createDuration(input, key) {\n var duration = input,\n // matching against regexp is expensive, do it on demand\n match = null,\n sign,\n ret,\n diffRes;\n\n if (isDuration(input)) {\n duration = {\n ms: input._milliseconds,\n d: input._days,\n M: input._months\n };\n } else if (isNumber(input)) {\n duration = {};\n\n if (key) {\n duration[key] = input;\n } else {\n duration.milliseconds = input;\n }\n } else if (!!(match = aspNetRegex.exec(input))) {\n sign = match[1] === '-' ? -1 : 1;\n duration = {\n y: 0,\n d: toInt(match[DATE]) * sign,\n h: toInt(match[HOUR]) * sign,\n m: toInt(match[MINUTE]) * sign,\n s: toInt(match[SECOND]) * sign,\n ms: toInt(absRound(match[MILLISECOND] * 1000)) * sign // the millisecond decimal point is included in the match\n\n };\n } else if (!!(match = isoRegex.exec(input))) {\n sign = match[1] === '-' ? -1 : 1;\n duration = {\n y: parseIso(match[2], sign),\n M: parseIso(match[3], sign),\n w: parseIso(match[4], sign),\n d: parseIso(match[5], sign),\n h: parseIso(match[6], sign),\n m: parseIso(match[7], sign),\n s: parseIso(match[8], sign)\n };\n } else if (duration == null) {\n // checks for null or undefined\n duration = {};\n } else if (typeof duration === 'object' && ('from' in duration || 'to' in duration)) {\n diffRes = momentsDifference(createLocal(duration.from), createLocal(duration.to));\n duration = {};\n duration.ms = diffRes.milliseconds;\n duration.M = diffRes.months;\n }\n\n ret = new Duration(duration);\n\n if (isDuration(input) && hasOwnProp(input, '_locale')) {\n ret._locale = input._locale;\n }\n\n return ret;\n }\n\n createDuration.fn = Duration.prototype;\n createDuration.invalid = createInvalid$1;\n\n function parseIso(inp, sign) {\n // We'd normally use ~~inp for this, but unfortunately it also\n // converts floats to ints.\n // inp may be undefined, so careful calling replace on it.\n var res = inp && parseFloat(inp.replace(',', '.')); // apply sign while we're at it\n\n return (isNaN(res) ? 0 : res) * sign;\n }\n\n function positiveMomentsDifference(base, other) {\n var res = {};\n res.months = other.month() - base.month() + (other.year() - base.year()) * 12;\n\n if (base.clone().add(res.months, 'M').isAfter(other)) {\n --res.months;\n }\n\n res.milliseconds = +other - +base.clone().add(res.months, 'M');\n return res;\n }\n\n function momentsDifference(base, other) {\n var res;\n\n if (!(base.isValid() && other.isValid())) {\n return {\n milliseconds: 0,\n months: 0\n };\n }\n\n other = cloneWithOffset(other, base);\n\n if (base.isBefore(other)) {\n res = positiveMomentsDifference(base, other);\n } else {\n res = positiveMomentsDifference(other, base);\n res.milliseconds = -res.milliseconds;\n res.months = -res.months;\n }\n\n return res;\n } // TODO: remove 'name' arg after deprecation is removed\n\n\n function createAdder(direction, name) {\n return function (val, period) {\n var dur, tmp; //invert the arguments, but complain about it\n\n if (period !== null && !isNaN(+period)) {\n deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' + 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.');\n tmp = val;\n val = period;\n period = tmp;\n }\n\n val = typeof val === 'string' ? +val : val;\n dur = createDuration(val, period);\n addSubtract(this, dur, direction);\n return this;\n };\n }\n\n function addSubtract(mom, duration, isAdding, updateOffset) {\n var milliseconds = duration._milliseconds,\n days = absRound(duration._days),\n months = absRound(duration._months);\n\n if (!mom.isValid()) {\n // No op\n return;\n }\n\n updateOffset = updateOffset == null ? true : updateOffset;\n\n if (months) {\n setMonth(mom, get(mom, 'Month') + months * isAdding);\n }\n\n if (days) {\n set$1(mom, 'Date', get(mom, 'Date') + days * isAdding);\n }\n\n if (milliseconds) {\n mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding);\n }\n\n if (updateOffset) {\n hooks.updateOffset(mom, days || months);\n }\n }\n\n var add = createAdder(1, 'add');\n var subtract = createAdder(-1, 'subtract');\n\n function getCalendarFormat(myMoment, now) {\n var diff = myMoment.diff(now, 'days', true);\n return diff < -6 ? 'sameElse' : diff < -1 ? 'lastWeek' : diff < 0 ? 'lastDay' : diff < 1 ? 'sameDay' : diff < 2 ? 'nextDay' : diff < 7 ? 'nextWeek' : 'sameElse';\n }\n\n function calendar$1(time, formats) {\n // We want to compare the start of today, vs this.\n // Getting start-of-today depends on whether we're local/utc/offset or not.\n var now = time || createLocal(),\n sod = cloneWithOffset(now, this).startOf('day'),\n format = hooks.calendarFormat(this, sod) || 'sameElse';\n var output = formats && (isFunction(formats[format]) ? formats[format].call(this, now) : formats[format]);\n return this.format(output || this.localeData().calendar(format, this, createLocal(now)));\n }\n\n function clone() {\n return new Moment(this);\n }\n\n function isAfter(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input);\n\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n\n units = normalizeUnits(units) || 'millisecond';\n\n if (units === 'millisecond') {\n return this.valueOf() > localInput.valueOf();\n } else {\n return localInput.valueOf() < this.clone().startOf(units).valueOf();\n }\n }\n\n function isBefore(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input);\n\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n\n units = normalizeUnits(units) || 'millisecond';\n\n if (units === 'millisecond') {\n return this.valueOf() < localInput.valueOf();\n } else {\n return this.clone().endOf(units).valueOf() < localInput.valueOf();\n }\n }\n\n function isBetween(from, to, units, inclusivity) {\n var localFrom = isMoment(from) ? from : createLocal(from),\n localTo = isMoment(to) ? to : createLocal(to);\n\n if (!(this.isValid() && localFrom.isValid() && localTo.isValid())) {\n return false;\n }\n\n inclusivity = inclusivity || '()';\n return (inclusivity[0] === '(' ? this.isAfter(localFrom, units) : !this.isBefore(localFrom, units)) && (inclusivity[1] === ')' ? this.isBefore(localTo, units) : !this.isAfter(localTo, units));\n }\n\n function isSame(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input),\n inputMs;\n\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n\n units = normalizeUnits(units) || 'millisecond';\n\n if (units === 'millisecond') {\n return this.valueOf() === localInput.valueOf();\n } else {\n inputMs = localInput.valueOf();\n return this.clone().startOf(units).valueOf() <= inputMs && inputMs <= this.clone().endOf(units).valueOf();\n }\n }\n\n function isSameOrAfter(input, units) {\n return this.isSame(input, units) || this.isAfter(input, units);\n }\n\n function isSameOrBefore(input, units) {\n return this.isSame(input, units) || this.isBefore(input, units);\n }\n\n function diff(input, units, asFloat) {\n var that, zoneDelta, output;\n\n if (!this.isValid()) {\n return NaN;\n }\n\n that = cloneWithOffset(input, this);\n\n if (!that.isValid()) {\n return NaN;\n }\n\n zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4;\n units = normalizeUnits(units);\n\n switch (units) {\n case 'year':\n output = monthDiff(this, that) / 12;\n break;\n\n case 'month':\n output = monthDiff(this, that);\n break;\n\n case 'quarter':\n output = monthDiff(this, that) / 3;\n break;\n\n case 'second':\n output = (this - that) / 1e3;\n break;\n // 1000\n\n case 'minute':\n output = (this - that) / 6e4;\n break;\n // 1000 * 60\n\n case 'hour':\n output = (this - that) / 36e5;\n break;\n // 1000 * 60 * 60\n\n case 'day':\n output = (this - that - zoneDelta) / 864e5;\n break;\n // 1000 * 60 * 60 * 24, negate dst\n\n case 'week':\n output = (this - that - zoneDelta) / 6048e5;\n break;\n // 1000 * 60 * 60 * 24 * 7, negate dst\n\n default:\n output = this - that;\n }\n\n return asFloat ? output : absFloor(output);\n }\n\n function monthDiff(a, b) {\n // difference in months\n var wholeMonthDiff = (b.year() - a.year()) * 12 + (b.month() - a.month()),\n // b is in (anchor - 1 month, anchor + 1 month)\n anchor = a.clone().add(wholeMonthDiff, 'months'),\n anchor2,\n adjust;\n\n if (b - anchor < 0) {\n anchor2 = a.clone().add(wholeMonthDiff - 1, 'months'); // linear across the month\n\n adjust = (b - anchor) / (anchor - anchor2);\n } else {\n anchor2 = a.clone().add(wholeMonthDiff + 1, 'months'); // linear across the month\n\n adjust = (b - anchor) / (anchor2 - anchor);\n } //check for negative zero, return zero if negative zero\n\n\n return -(wholeMonthDiff + adjust) || 0;\n }\n\n hooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ';\n hooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]';\n\n function toString() {\n return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ');\n }\n\n function toISOString(keepOffset) {\n if (!this.isValid()) {\n return null;\n }\n\n var utc = keepOffset !== true;\n var m = utc ? this.clone().utc() : this;\n\n if (m.year() < 0 || m.year() > 9999) {\n return formatMoment(m, utc ? 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYYYY-MM-DD[T]HH:mm:ss.SSSZ');\n }\n\n if (isFunction(Date.prototype.toISOString)) {\n // native implementation is ~50x faster, use it when we can\n if (utc) {\n return this.toDate().toISOString();\n } else {\n return new Date(this.valueOf() + this.utcOffset() * 60 * 1000).toISOString().replace('Z', formatMoment(m, 'Z'));\n }\n }\n\n return formatMoment(m, utc ? 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYY-MM-DD[T]HH:mm:ss.SSSZ');\n }\n /**\n * Return a human readable representation of a moment that can\n * also be evaluated to get a new moment which is the same\n *\n * @link https://nodejs.org/dist/latest/docs/api/util.html#util_custom_inspect_function_on_objects\n */\n\n\n function inspect() {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n\n var func = 'moment';\n var zone = '';\n\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n\n var prefix = '[' + func + '(\"]';\n var year = 0 <= this.year() && this.year() <= 9999 ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n return this.format(prefix + year + datetime + suffix);\n }\n\n function format(inputString) {\n if (!inputString) {\n inputString = this.isUtc() ? hooks.defaultFormatUtc : hooks.defaultFormat;\n }\n\n var output = formatMoment(this, inputString);\n return this.localeData().postformat(output);\n }\n\n function from(time, withoutSuffix) {\n if (this.isValid() && (isMoment(time) && time.isValid() || createLocal(time).isValid())) {\n return createDuration({\n to: this,\n from: time\n }).locale(this.locale()).humanize(!withoutSuffix);\n } else {\n return this.localeData().invalidDate();\n }\n }\n\n function fromNow(withoutSuffix) {\n return this.from(createLocal(), withoutSuffix);\n }\n\n function to(time, withoutSuffix) {\n if (this.isValid() && (isMoment(time) && time.isValid() || createLocal(time).isValid())) {\n return createDuration({\n from: this,\n to: time\n }).locale(this.locale()).humanize(!withoutSuffix);\n } else {\n return this.localeData().invalidDate();\n }\n }\n\n function toNow(withoutSuffix) {\n return this.to(createLocal(), withoutSuffix);\n } // If passed a locale key, it will set the locale for this\n // instance. Otherwise, it will return the locale configuration\n // variables for this instance.\n\n\n function locale(key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n\n return this;\n }\n }\n\n var lang = deprecate('moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.', function (key) {\n if (key === undefined) {\n return this.localeData();\n } else {\n return this.locale(key);\n }\n });\n\n function localeData() {\n return this._locale;\n }\n\n var MS_PER_SECOND = 1000;\n var MS_PER_MINUTE = 60 * MS_PER_SECOND;\n var MS_PER_HOUR = 60 * MS_PER_MINUTE;\n var MS_PER_400_YEARS = (365 * 400 + 97) * 24 * MS_PER_HOUR; // actual modulo - handles negative numbers (for dates before 1970):\n\n function mod$1(dividend, divisor) {\n return (dividend % divisor + divisor) % divisor;\n }\n\n function localStartOfDate(y, m, d) {\n // the date constructor remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n return new Date(y + 400, m, d) - MS_PER_400_YEARS;\n } else {\n return new Date(y, m, d).valueOf();\n }\n }\n\n function utcStartOfDate(y, m, d) {\n // Date.UTC remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n return Date.UTC(y + 400, m, d) - MS_PER_400_YEARS;\n } else {\n return Date.UTC(y, m, d);\n }\n }\n\n function startOf(units) {\n var time;\n units = normalizeUnits(units);\n\n if (units === undefined || units === 'millisecond' || !this.isValid()) {\n return this;\n }\n\n var startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;\n\n switch (units) {\n case 'year':\n time = startOfDate(this.year(), 0, 1);\n break;\n\n case 'quarter':\n time = startOfDate(this.year(), this.month() - this.month() % 3, 1);\n break;\n\n case 'month':\n time = startOfDate(this.year(), this.month(), 1);\n break;\n\n case 'week':\n time = startOfDate(this.year(), this.month(), this.date() - this.weekday());\n break;\n\n case 'isoWeek':\n time = startOfDate(this.year(), this.month(), this.date() - (this.isoWeekday() - 1));\n break;\n\n case 'day':\n case 'date':\n time = startOfDate(this.year(), this.month(), this.date());\n break;\n\n case 'hour':\n time = this._d.valueOf();\n time -= mod$1(time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE), MS_PER_HOUR);\n break;\n\n case 'minute':\n time = this._d.valueOf();\n time -= mod$1(time, MS_PER_MINUTE);\n break;\n\n case 'second':\n time = this._d.valueOf();\n time -= mod$1(time, MS_PER_SECOND);\n break;\n }\n\n this._d.setTime(time);\n\n hooks.updateOffset(this, true);\n return this;\n }\n\n function endOf(units) {\n var time;\n units = normalizeUnits(units);\n\n if (units === undefined || units === 'millisecond' || !this.isValid()) {\n return this;\n }\n\n var startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;\n\n switch (units) {\n case 'year':\n time = startOfDate(this.year() + 1, 0, 1) - 1;\n break;\n\n case 'quarter':\n time = startOfDate(this.year(), this.month() - this.month() % 3 + 3, 1) - 1;\n break;\n\n case 'month':\n time = startOfDate(this.year(), this.month() + 1, 1) - 1;\n break;\n\n case 'week':\n time = startOfDate(this.year(), this.month(), this.date() - this.weekday() + 7) - 1;\n break;\n\n case 'isoWeek':\n time = startOfDate(this.year(), this.month(), this.date() - (this.isoWeekday() - 1) + 7) - 1;\n break;\n\n case 'day':\n case 'date':\n time = startOfDate(this.year(), this.month(), this.date() + 1) - 1;\n break;\n\n case 'hour':\n time = this._d.valueOf();\n time += MS_PER_HOUR - mod$1(time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE), MS_PER_HOUR) - 1;\n break;\n\n case 'minute':\n time = this._d.valueOf();\n time += MS_PER_MINUTE - mod$1(time, MS_PER_MINUTE) - 1;\n break;\n\n case 'second':\n time = this._d.valueOf();\n time += MS_PER_SECOND - mod$1(time, MS_PER_SECOND) - 1;\n break;\n }\n\n this._d.setTime(time);\n\n hooks.updateOffset(this, true);\n return this;\n }\n\n function valueOf() {\n return this._d.valueOf() - (this._offset || 0) * 60000;\n }\n\n function unix() {\n return Math.floor(this.valueOf() / 1000);\n }\n\n function toDate() {\n return new Date(this.valueOf());\n }\n\n function toArray() {\n var m = this;\n return [m.year(), m.month(), m.date(), m.hour(), m.minute(), m.second(), m.millisecond()];\n }\n\n function toObject() {\n var m = this;\n return {\n years: m.year(),\n months: m.month(),\n date: m.date(),\n hours: m.hours(),\n minutes: m.minutes(),\n seconds: m.seconds(),\n milliseconds: m.milliseconds()\n };\n }\n\n function toJSON() {\n // new Date(NaN).toJSON() === null\n return this.isValid() ? this.toISOString() : null;\n }\n\n function isValid$2() {\n return isValid(this);\n }\n\n function parsingFlags() {\n return extend({}, getParsingFlags(this));\n }\n\n function invalidAt() {\n return getParsingFlags(this).overflow;\n }\n\n function creationData() {\n return {\n input: this._i,\n format: this._f,\n locale: this._locale,\n isUTC: this._isUTC,\n strict: this._strict\n };\n } // FORMATTING\n\n\n addFormatToken(0, ['gg', 2], 0, function () {\n return this.weekYear() % 100;\n });\n addFormatToken(0, ['GG', 2], 0, function () {\n return this.isoWeekYear() % 100;\n });\n\n function addWeekYearFormatToken(token, getter) {\n addFormatToken(0, [token, token.length], 0, getter);\n }\n\n addWeekYearFormatToken('gggg', 'weekYear');\n addWeekYearFormatToken('ggggg', 'weekYear');\n addWeekYearFormatToken('GGGG', 'isoWeekYear');\n addWeekYearFormatToken('GGGGG', 'isoWeekYear'); // ALIASES\n\n addUnitAlias('weekYear', 'gg');\n addUnitAlias('isoWeekYear', 'GG'); // PRIORITY\n\n addUnitPriority('weekYear', 1);\n addUnitPriority('isoWeekYear', 1); // PARSING\n\n addRegexToken('G', matchSigned);\n addRegexToken('g', matchSigned);\n addRegexToken('GG', match1to2, match2);\n addRegexToken('gg', match1to2, match2);\n addRegexToken('GGGG', match1to4, match4);\n addRegexToken('gggg', match1to4, match4);\n addRegexToken('GGGGG', match1to6, match6);\n addRegexToken('ggggg', match1to6, match6);\n addWeekParseToken(['gggg', 'ggggg', 'GGGG', 'GGGGG'], function (input, week, config, token) {\n week[token.substr(0, 2)] = toInt(input);\n });\n addWeekParseToken(['gg', 'GG'], function (input, week, config, token) {\n week[token] = hooks.parseTwoDigitYear(input);\n }); // MOMENTS\n\n function getSetWeekYear(input) {\n return getSetWeekYearHelper.call(this, input, this.week(), this.weekday(), this.localeData()._week.dow, this.localeData()._week.doy);\n }\n\n function getSetISOWeekYear(input) {\n return getSetWeekYearHelper.call(this, input, this.isoWeek(), this.isoWeekday(), 1, 4);\n }\n\n function getISOWeeksInYear() {\n return weeksInYear(this.year(), 1, 4);\n }\n\n function getWeeksInYear() {\n var weekInfo = this.localeData()._week;\n\n return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy);\n }\n\n function getSetWeekYearHelper(input, week, weekday, dow, doy) {\n var weeksTarget;\n\n if (input == null) {\n return weekOfYear(this, dow, doy).year;\n } else {\n weeksTarget = weeksInYear(input, dow, doy);\n\n if (week > weeksTarget) {\n week = weeksTarget;\n }\n\n return setWeekAll.call(this, input, week, weekday, dow, doy);\n }\n }\n\n function setWeekAll(weekYear, week, weekday, dow, doy) {\n var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy),\n date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear);\n this.year(date.getUTCFullYear());\n this.month(date.getUTCMonth());\n this.date(date.getUTCDate());\n return this;\n } // FORMATTING\n\n\n addFormatToken('Q', 0, 'Qo', 'quarter'); // ALIASES\n\n addUnitAlias('quarter', 'Q'); // PRIORITY\n\n addUnitPriority('quarter', 7); // PARSING\n\n addRegexToken('Q', match1);\n addParseToken('Q', function (input, array) {\n array[MONTH] = (toInt(input) - 1) * 3;\n }); // MOMENTS\n\n function getSetQuarter(input) {\n return input == null ? Math.ceil((this.month() + 1) / 3) : this.month((input - 1) * 3 + this.month() % 3);\n } // FORMATTING\n\n\n addFormatToken('D', ['DD', 2], 'Do', 'date'); // ALIASES\n\n addUnitAlias('date', 'D'); // PRIORITY\n\n addUnitPriority('date', 9); // PARSING\n\n addRegexToken('D', match1to2);\n addRegexToken('DD', match1to2, match2);\n addRegexToken('Do', function (isStrict, locale) {\n // TODO: Remove \"ordinalParse\" fallback in next major release.\n return isStrict ? locale._dayOfMonthOrdinalParse || locale._ordinalParse : locale._dayOfMonthOrdinalParseLenient;\n });\n addParseToken(['D', 'DD'], DATE);\n addParseToken('Do', function (input, array) {\n array[DATE] = toInt(input.match(match1to2)[0]);\n }); // MOMENTS\n\n var getSetDayOfMonth = makeGetSet('Date', true); // FORMATTING\n\n addFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear'); // ALIASES\n\n addUnitAlias('dayOfYear', 'DDD'); // PRIORITY\n\n addUnitPriority('dayOfYear', 4); // PARSING\n\n addRegexToken('DDD', match1to3);\n addRegexToken('DDDD', match3);\n addParseToken(['DDD', 'DDDD'], function (input, array, config) {\n config._dayOfYear = toInt(input);\n }); // HELPERS\n // MOMENTS\n\n function getSetDayOfYear(input) {\n var dayOfYear = Math.round((this.clone().startOf('day') - this.clone().startOf('year')) / 864e5) + 1;\n return input == null ? dayOfYear : this.add(input - dayOfYear, 'd');\n } // FORMATTING\n\n\n addFormatToken('m', ['mm', 2], 0, 'minute'); // ALIASES\n\n addUnitAlias('minute', 'm'); // PRIORITY\n\n addUnitPriority('minute', 14); // PARSING\n\n addRegexToken('m', match1to2);\n addRegexToken('mm', match1to2, match2);\n addParseToken(['m', 'mm'], MINUTE); // MOMENTS\n\n var getSetMinute = makeGetSet('Minutes', false); // FORMATTING\n\n addFormatToken('s', ['ss', 2], 0, 'second'); // ALIASES\n\n addUnitAlias('second', 's'); // PRIORITY\n\n addUnitPriority('second', 15); // PARSING\n\n addRegexToken('s', match1to2);\n addRegexToken('ss', match1to2, match2);\n addParseToken(['s', 'ss'], SECOND); // MOMENTS\n\n var getSetSecond = makeGetSet('Seconds', false); // FORMATTING\n\n addFormatToken('S', 0, 0, function () {\n return ~~(this.millisecond() / 100);\n });\n addFormatToken(0, ['SS', 2], 0, function () {\n return ~~(this.millisecond() / 10);\n });\n addFormatToken(0, ['SSS', 3], 0, 'millisecond');\n addFormatToken(0, ['SSSS', 4], 0, function () {\n return this.millisecond() * 10;\n });\n addFormatToken(0, ['SSSSS', 5], 0, function () {\n return this.millisecond() * 100;\n });\n addFormatToken(0, ['SSSSSS', 6], 0, function () {\n return this.millisecond() * 1000;\n });\n addFormatToken(0, ['SSSSSSS', 7], 0, function () {\n return this.millisecond() * 10000;\n });\n addFormatToken(0, ['SSSSSSSS', 8], 0, function () {\n return this.millisecond() * 100000;\n });\n addFormatToken(0, ['SSSSSSSSS', 9], 0, function () {\n return this.millisecond() * 1000000;\n }); // ALIASES\n\n addUnitAlias('millisecond', 'ms'); // PRIORITY\n\n addUnitPriority('millisecond', 16); // PARSING\n\n addRegexToken('S', match1to3, match1);\n addRegexToken('SS', match1to3, match2);\n addRegexToken('SSS', match1to3, match3);\n var token;\n\n for (token = 'SSSS'; token.length <= 9; token += 'S') {\n addRegexToken(token, matchUnsigned);\n }\n\n function parseMs(input, array) {\n array[MILLISECOND] = toInt(('0.' + input) * 1000);\n }\n\n for (token = 'S'; token.length <= 9; token += 'S') {\n addParseToken(token, parseMs);\n } // MOMENTS\n\n\n var getSetMillisecond = makeGetSet('Milliseconds', false); // FORMATTING\n\n addFormatToken('z', 0, 0, 'zoneAbbr');\n addFormatToken('zz', 0, 0, 'zoneName'); // MOMENTS\n\n function getZoneAbbr() {\n return this._isUTC ? 'UTC' : '';\n }\n\n function getZoneName() {\n return this._isUTC ? 'Coordinated Universal Time' : '';\n }\n\n var proto = Moment.prototype;\n proto.add = add;\n proto.calendar = calendar$1;\n proto.clone = clone;\n proto.diff = diff;\n proto.endOf = endOf;\n proto.format = format;\n proto.from = from;\n proto.fromNow = fromNow;\n proto.to = to;\n proto.toNow = toNow;\n proto.get = stringGet;\n proto.invalidAt = invalidAt;\n proto.isAfter = isAfter;\n proto.isBefore = isBefore;\n proto.isBetween = isBetween;\n proto.isSame = isSame;\n proto.isSameOrAfter = isSameOrAfter;\n proto.isSameOrBefore = isSameOrBefore;\n proto.isValid = isValid$2;\n proto.lang = lang;\n proto.locale = locale;\n proto.localeData = localeData;\n proto.max = prototypeMax;\n proto.min = prototypeMin;\n proto.parsingFlags = parsingFlags;\n proto.set = stringSet;\n proto.startOf = startOf;\n proto.subtract = subtract;\n proto.toArray = toArray;\n proto.toObject = toObject;\n proto.toDate = toDate;\n proto.toISOString = toISOString;\n proto.inspect = inspect;\n proto.toJSON = toJSON;\n proto.toString = toString;\n proto.unix = unix;\n proto.valueOf = valueOf;\n proto.creationData = creationData;\n proto.year = getSetYear;\n proto.isLeapYear = getIsLeapYear;\n proto.weekYear = getSetWeekYear;\n proto.isoWeekYear = getSetISOWeekYear;\n proto.quarter = proto.quarters = getSetQuarter;\n proto.month = getSetMonth;\n proto.daysInMonth = getDaysInMonth;\n proto.week = proto.weeks = getSetWeek;\n proto.isoWeek = proto.isoWeeks = getSetISOWeek;\n proto.weeksInYear = getWeeksInYear;\n proto.isoWeeksInYear = getISOWeeksInYear;\n proto.date = getSetDayOfMonth;\n proto.day = proto.days = getSetDayOfWeek;\n proto.weekday = getSetLocaleDayOfWeek;\n proto.isoWeekday = getSetISODayOfWeek;\n proto.dayOfYear = getSetDayOfYear;\n proto.hour = proto.hours = getSetHour;\n proto.minute = proto.minutes = getSetMinute;\n proto.second = proto.seconds = getSetSecond;\n proto.millisecond = proto.milliseconds = getSetMillisecond;\n proto.utcOffset = getSetOffset;\n proto.utc = setOffsetToUTC;\n proto.local = setOffsetToLocal;\n proto.parseZone = setOffsetToParsedOffset;\n proto.hasAlignedHourOffset = hasAlignedHourOffset;\n proto.isDST = isDaylightSavingTime;\n proto.isLocal = isLocal;\n proto.isUtcOffset = isUtcOffset;\n proto.isUtc = isUtc;\n proto.isUTC = isUtc;\n proto.zoneAbbr = getZoneAbbr;\n proto.zoneName = getZoneName;\n proto.dates = deprecate('dates accessor is deprecated. Use date instead.', getSetDayOfMonth);\n proto.months = deprecate('months accessor is deprecated. Use month instead', getSetMonth);\n proto.years = deprecate('years accessor is deprecated. Use year instead', getSetYear);\n proto.zone = deprecate('moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/', getSetZone);\n proto.isDSTShifted = deprecate('isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information', isDaylightSavingTimeShifted);\n\n function createUnix(input) {\n return createLocal(input * 1000);\n }\n\n function createInZone() {\n return createLocal.apply(null, arguments).parseZone();\n }\n\n function preParsePostFormat(string) {\n return string;\n }\n\n var proto$1 = Locale.prototype;\n proto$1.calendar = calendar;\n proto$1.longDateFormat = longDateFormat;\n proto$1.invalidDate = invalidDate;\n proto$1.ordinal = ordinal;\n proto$1.preparse = preParsePostFormat;\n proto$1.postformat = preParsePostFormat;\n proto$1.relativeTime = relativeTime;\n proto$1.pastFuture = pastFuture;\n proto$1.set = set;\n proto$1.months = localeMonths;\n proto$1.monthsShort = localeMonthsShort;\n proto$1.monthsParse = localeMonthsParse;\n proto$1.monthsRegex = monthsRegex;\n proto$1.monthsShortRegex = monthsShortRegex;\n proto$1.week = localeWeek;\n proto$1.firstDayOfYear = localeFirstDayOfYear;\n proto$1.firstDayOfWeek = localeFirstDayOfWeek;\n proto$1.weekdays = localeWeekdays;\n proto$1.weekdaysMin = localeWeekdaysMin;\n proto$1.weekdaysShort = localeWeekdaysShort;\n proto$1.weekdaysParse = localeWeekdaysParse;\n proto$1.weekdaysRegex = weekdaysRegex;\n proto$1.weekdaysShortRegex = weekdaysShortRegex;\n proto$1.weekdaysMinRegex = weekdaysMinRegex;\n proto$1.isPM = localeIsPM;\n proto$1.meridiem = localeMeridiem;\n\n function get$1(format, index, field, setter) {\n var locale = getLocale();\n var utc = createUTC().set(setter, index);\n return locale[field](utc, format);\n }\n\n function listMonthsImpl(format, index, field) {\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n\n if (index != null) {\n return get$1(format, index, field, 'month');\n }\n\n var i;\n var out = [];\n\n for (i = 0; i < 12; i++) {\n out[i] = get$1(format, i, field, 'month');\n }\n\n return out;\n } // ()\n // (5)\n // (fmt, 5)\n // (fmt)\n // (true)\n // (true, 5)\n // (true, fmt, 5)\n // (true, fmt)\n\n\n function listWeekdaysImpl(localeSorted, format, index, field) {\n if (typeof localeSorted === 'boolean') {\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n } else {\n format = localeSorted;\n index = format;\n localeSorted = false;\n\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n }\n\n var locale = getLocale(),\n shift = localeSorted ? locale._week.dow : 0;\n\n if (index != null) {\n return get$1(format, (index + shift) % 7, field, 'day');\n }\n\n var i;\n var out = [];\n\n for (i = 0; i < 7; i++) {\n out[i] = get$1(format, (i + shift) % 7, field, 'day');\n }\n\n return out;\n }\n\n function listMonths(format, index) {\n return listMonthsImpl(format, index, 'months');\n }\n\n function listMonthsShort(format, index) {\n return listMonthsImpl(format, index, 'monthsShort');\n }\n\n function listWeekdays(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdays');\n }\n\n function listWeekdaysShort(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort');\n }\n\n function listWeekdaysMin(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin');\n }\n\n getSetGlobalLocale('en', {\n dayOfMonthOrdinalParse: /\\d{1,2}(th|st|nd|rd)/,\n ordinal: function (number) {\n var b = number % 10,\n output = toInt(number % 100 / 10) === 1 ? 'th' : b === 1 ? 'st' : b === 2 ? 'nd' : b === 3 ? 'rd' : 'th';\n return number + output;\n }\n }); // Side effect imports\n\n hooks.lang = deprecate('moment.lang is deprecated. Use moment.locale instead.', getSetGlobalLocale);\n hooks.langData = deprecate('moment.langData is deprecated. Use moment.localeData instead.', getLocale);\n var mathAbs = Math.abs;\n\n function abs() {\n var data = this._data;\n this._milliseconds = mathAbs(this._milliseconds);\n this._days = mathAbs(this._days);\n this._months = mathAbs(this._months);\n data.milliseconds = mathAbs(data.milliseconds);\n data.seconds = mathAbs(data.seconds);\n data.minutes = mathAbs(data.minutes);\n data.hours = mathAbs(data.hours);\n data.months = mathAbs(data.months);\n data.years = mathAbs(data.years);\n return this;\n }\n\n function addSubtract$1(duration, input, value, direction) {\n var other = createDuration(input, value);\n duration._milliseconds += direction * other._milliseconds;\n duration._days += direction * other._days;\n duration._months += direction * other._months;\n return duration._bubble();\n } // supports only 2.0-style add(1, 's') or add(duration)\n\n\n function add$1(input, value) {\n return addSubtract$1(this, input, value, 1);\n } // supports only 2.0-style subtract(1, 's') or subtract(duration)\n\n\n function subtract$1(input, value) {\n return addSubtract$1(this, input, value, -1);\n }\n\n function absCeil(number) {\n if (number < 0) {\n return Math.floor(number);\n } else {\n return Math.ceil(number);\n }\n }\n\n function bubble() {\n var milliseconds = this._milliseconds;\n var days = this._days;\n var months = this._months;\n var data = this._data;\n var seconds, minutes, hours, years, monthsFromDays; // if we have a mix of positive and negative values, bubble down first\n // check: https://github.com/moment/moment/issues/2166\n\n if (!(milliseconds >= 0 && days >= 0 && months >= 0 || milliseconds <= 0 && days <= 0 && months <= 0)) {\n milliseconds += absCeil(monthsToDays(months) + days) * 864e5;\n days = 0;\n months = 0;\n } // The following code bubbles up values, see the tests for\n // examples of what that means.\n\n\n data.milliseconds = milliseconds % 1000;\n seconds = absFloor(milliseconds / 1000);\n data.seconds = seconds % 60;\n minutes = absFloor(seconds / 60);\n data.minutes = minutes % 60;\n hours = absFloor(minutes / 60);\n data.hours = hours % 24;\n days += absFloor(hours / 24); // convert days to months\n\n monthsFromDays = absFloor(daysToMonths(days));\n months += monthsFromDays;\n days -= absCeil(monthsToDays(monthsFromDays)); // 12 months -> 1 year\n\n years = absFloor(months / 12);\n months %= 12;\n data.days = days;\n data.months = months;\n data.years = years;\n return this;\n }\n\n function daysToMonths(days) {\n // 400 years have 146097 days (taking into account leap year rules)\n // 400 years have 12 months === 4800\n return days * 4800 / 146097;\n }\n\n function monthsToDays(months) {\n // the reverse of daysToMonths\n return months * 146097 / 4800;\n }\n\n function as(units) {\n if (!this.isValid()) {\n return NaN;\n }\n\n var days;\n var months;\n var milliseconds = this._milliseconds;\n units = normalizeUnits(units);\n\n if (units === 'month' || units === 'quarter' || units === 'year') {\n days = this._days + milliseconds / 864e5;\n months = this._months + daysToMonths(days);\n\n switch (units) {\n case 'month':\n return months;\n\n case 'quarter':\n return months / 3;\n\n case 'year':\n return months / 12;\n }\n } else {\n // handle milliseconds separately because of floating point math errors (issue #1867)\n days = this._days + Math.round(monthsToDays(this._months));\n\n switch (units) {\n case 'week':\n return days / 7 + milliseconds / 6048e5;\n\n case 'day':\n return days + milliseconds / 864e5;\n\n case 'hour':\n return days * 24 + milliseconds / 36e5;\n\n case 'minute':\n return days * 1440 + milliseconds / 6e4;\n\n case 'second':\n return days * 86400 + milliseconds / 1000;\n // Math.floor prevents floating point math errors here\n\n case 'millisecond':\n return Math.floor(days * 864e5) + milliseconds;\n\n default:\n throw new Error('Unknown unit ' + units);\n }\n }\n } // TODO: Use this.as('ms')?\n\n\n function valueOf$1() {\n if (!this.isValid()) {\n return NaN;\n }\n\n return this._milliseconds + this._days * 864e5 + this._months % 12 * 2592e6 + toInt(this._months / 12) * 31536e6;\n }\n\n function makeAs(alias) {\n return function () {\n return this.as(alias);\n };\n }\n\n var asMilliseconds = makeAs('ms');\n var asSeconds = makeAs('s');\n var asMinutes = makeAs('m');\n var asHours = makeAs('h');\n var asDays = makeAs('d');\n var asWeeks = makeAs('w');\n var asMonths = makeAs('M');\n var asQuarters = makeAs('Q');\n var asYears = makeAs('y');\n\n function clone$1() {\n return createDuration(this);\n }\n\n function get$2(units) {\n units = normalizeUnits(units);\n return this.isValid() ? this[units + 's']() : NaN;\n }\n\n function makeGetter(name) {\n return function () {\n return this.isValid() ? this._data[name] : NaN;\n };\n }\n\n var milliseconds = makeGetter('milliseconds');\n var seconds = makeGetter('seconds');\n var minutes = makeGetter('minutes');\n var hours = makeGetter('hours');\n var days = makeGetter('days');\n var months = makeGetter('months');\n var years = makeGetter('years');\n\n function weeks() {\n return absFloor(this.days() / 7);\n }\n\n var round = Math.round;\n var thresholds = {\n ss: 44,\n // a few seconds to seconds\n s: 45,\n // seconds to minute\n m: 45,\n // minutes to hour\n h: 22,\n // hours to day\n d: 26,\n // days to month\n M: 11 // months to year\n\n }; // helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize\n\n function substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) {\n return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture);\n }\n\n function relativeTime$1(posNegDuration, withoutSuffix, locale) {\n var duration = createDuration(posNegDuration).abs();\n var seconds = round(duration.as('s'));\n var minutes = round(duration.as('m'));\n var hours = round(duration.as('h'));\n var days = round(duration.as('d'));\n var months = round(duration.as('M'));\n var years = round(duration.as('y'));\n var a = seconds <= thresholds.ss && ['s', seconds] || seconds < thresholds.s && ['ss', seconds] || minutes <= 1 && ['m'] || minutes < thresholds.m && ['mm', minutes] || hours <= 1 && ['h'] || hours < thresholds.h && ['hh', hours] || days <= 1 && ['d'] || days < thresholds.d && ['dd', days] || months <= 1 && ['M'] || months < thresholds.M && ['MM', months] || years <= 1 && ['y'] || ['yy', years];\n a[2] = withoutSuffix;\n a[3] = +posNegDuration > 0;\n a[4] = locale;\n return substituteTimeAgo.apply(null, a);\n } // This function allows you to set the rounding function for relative time strings\n\n\n function getSetRelativeTimeRounding(roundingFunction) {\n if (roundingFunction === undefined) {\n return round;\n }\n\n if (typeof roundingFunction === 'function') {\n round = roundingFunction;\n return true;\n }\n\n return false;\n } // This function allows you to set a threshold for relative time strings\n\n\n function getSetRelativeTimeThreshold(threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n\n if (limit === undefined) {\n return thresholds[threshold];\n }\n\n thresholds[threshold] = limit;\n\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n\n return true;\n }\n\n function humanize(withSuffix) {\n if (!this.isValid()) {\n return this.localeData().invalidDate();\n }\n\n var locale = this.localeData();\n var output = relativeTime$1(this, !withSuffix, locale);\n\n if (withSuffix) {\n output = locale.pastFuture(+this, output);\n }\n\n return locale.postformat(output);\n }\n\n var abs$1 = Math.abs;\n\n function sign(x) {\n return (x > 0) - (x < 0) || +x;\n }\n\n function toISOString$1() {\n // for ISO strings we do not use the normal bubbling rules:\n // * milliseconds bubble up until they become hours\n // * days do not bubble at all\n // * months bubble up until they become years\n // This is because there is no context-free conversion between hours and days\n // (think of clock changes)\n // and also not between days and months (28-31 days per month)\n if (!this.isValid()) {\n return this.localeData().invalidDate();\n }\n\n var seconds = abs$1(this._milliseconds) / 1000;\n var days = abs$1(this._days);\n var months = abs$1(this._months);\n var minutes, hours, years; // 3600 seconds -> 60 minutes -> 1 hour\n\n minutes = absFloor(seconds / 60);\n hours = absFloor(minutes / 60);\n seconds %= 60;\n minutes %= 60; // 12 months -> 1 year\n\n years = absFloor(months / 12);\n months %= 12; // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js\n\n var Y = years;\n var M = months;\n var D = days;\n var h = hours;\n var m = minutes;\n var s = seconds ? seconds.toFixed(3).replace(/\\.?0+$/, '') : '';\n var total = this.asSeconds();\n\n if (!total) {\n // this is the same as C#'s (Noda) and python (isodate)...\n // but not other JS (goog.date)\n return 'P0D';\n }\n\n var totalSign = total < 0 ? '-' : '';\n var ymSign = sign(this._months) !== sign(total) ? '-' : '';\n var daysSign = sign(this._days) !== sign(total) ? '-' : '';\n var hmsSign = sign(this._milliseconds) !== sign(total) ? '-' : '';\n return totalSign + 'P' + (Y ? ymSign + Y + 'Y' : '') + (M ? ymSign + M + 'M' : '') + (D ? daysSign + D + 'D' : '') + (h || m || s ? 'T' : '') + (h ? hmsSign + h + 'H' : '') + (m ? hmsSign + m + 'M' : '') + (s ? hmsSign + s + 'S' : '');\n }\n\n var proto$2 = Duration.prototype;\n proto$2.isValid = isValid$1;\n proto$2.abs = abs;\n proto$2.add = add$1;\n proto$2.subtract = subtract$1;\n proto$2.as = as;\n proto$2.asMilliseconds = asMilliseconds;\n proto$2.asSeconds = asSeconds;\n proto$2.asMinutes = asMinutes;\n proto$2.asHours = asHours;\n proto$2.asDays = asDays;\n proto$2.asWeeks = asWeeks;\n proto$2.asMonths = asMonths;\n proto$2.asQuarters = asQuarters;\n proto$2.asYears = asYears;\n proto$2.valueOf = valueOf$1;\n proto$2._bubble = bubble;\n proto$2.clone = clone$1;\n proto$2.get = get$2;\n proto$2.milliseconds = milliseconds;\n proto$2.seconds = seconds;\n proto$2.minutes = minutes;\n proto$2.hours = hours;\n proto$2.days = days;\n proto$2.weeks = weeks;\n proto$2.months = months;\n proto$2.years = years;\n proto$2.humanize = humanize;\n proto$2.toISOString = toISOString$1;\n proto$2.toString = toISOString$1;\n proto$2.toJSON = toISOString$1;\n proto$2.locale = locale;\n proto$2.localeData = localeData;\n proto$2.toIsoString = deprecate('toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)', toISOString$1);\n proto$2.lang = lang; // Side effect imports\n // FORMATTING\n\n addFormatToken('X', 0, 0, 'unix');\n addFormatToken('x', 0, 0, 'valueOf'); // PARSING\n\n addRegexToken('x', matchSigned);\n addRegexToken('X', matchTimestamp);\n addParseToken('X', function (input, array, config) {\n config._d = new Date(parseFloat(input, 10) * 1000);\n });\n addParseToken('x', function (input, array, config) {\n config._d = new Date(toInt(input));\n }); // Side effect imports\n\n hooks.version = '2.24.0';\n setHookCallback(createLocal);\n hooks.fn = proto;\n hooks.min = min;\n hooks.max = max;\n hooks.now = now;\n hooks.utc = createUTC;\n hooks.unix = createUnix;\n hooks.months = listMonths;\n hooks.isDate = isDate;\n hooks.locale = getSetGlobalLocale;\n hooks.invalid = createInvalid;\n hooks.duration = createDuration;\n hooks.isMoment = isMoment;\n hooks.weekdays = listWeekdays;\n hooks.parseZone = createInZone;\n hooks.localeData = getLocale;\n hooks.isDuration = isDuration;\n hooks.monthsShort = listMonthsShort;\n hooks.weekdaysMin = listWeekdaysMin;\n hooks.defineLocale = defineLocale;\n hooks.updateLocale = updateLocale;\n hooks.locales = listLocales;\n hooks.weekdaysShort = listWeekdaysShort;\n hooks.normalizeUnits = normalizeUnits;\n hooks.relativeTimeRounding = getSetRelativeTimeRounding;\n hooks.relativeTimeThreshold = getSetRelativeTimeThreshold;\n hooks.calendarFormat = getCalendarFormat;\n hooks.prototype = proto; // currently HTML5 input type only supports 24-hour formats\n\n hooks.HTML5_FMT = {\n DATETIME_LOCAL: 'YYYY-MM-DDTHH:mm',\n // \n DATETIME_LOCAL_SECONDS: 'YYYY-MM-DDTHH:mm:ss',\n // \n DATETIME_LOCAL_MS: 'YYYY-MM-DDTHH:mm:ss.SSS',\n // \n DATE: 'YYYY-MM-DD',\n // \n TIME: 'HH:mm',\n // \n TIME_SECONDS: 'HH:mm:ss',\n // \n TIME_MS: 'HH:mm:ss.SSS',\n // \n WEEK: 'GGGG-[W]WW',\n // \n MONTH: 'YYYY-MM' // \n\n };\n return hooks;\n });\n});\n\n// Maps for number <-> hex string conversion\nvar byteToHex = [];\n\nfor (var i$1 = 0; i$1 < 256; i$1++) {\n byteToHex[i$1] = (i$1 + 0x100).toString(16).substr(1);\n}\n/**\n * Represent binary UUID into it's string representation.\n *\n * @param buf - Buffer containing UUID bytes.\n * @param offset - Offset from the start of the buffer where the UUID is saved (not needed if the buffer starts with the UUID).\n *\n * @returns String representation of the UUID.\n */\n\n\nfunction stringifyUUID(buf, offset) {\n var i = offset || 0;\n var bth = byteToHex;\n return bth[buf[i++]] + bth[buf[i++]] + bth[buf[i++]] + bth[buf[i++]] + '-' + bth[buf[i++]] + bth[buf[i++]] + '-' + bth[buf[i++]] + bth[buf[i++]] + '-' + bth[buf[i++]] + bth[buf[i++]] + '-' + bth[buf[i++]] + bth[buf[i++]] + bth[buf[i++]] + bth[buf[i++]] + bth[buf[i++]] + bth[buf[i++]];\n}\n/**\n * Generate 16 random bytes to be used as a base for UUID.\n *\n * @ignore\n */\n\n\nvar random = function () {\n if (typeof crypto !== 'undefined' && crypto.getRandomValues) {\n // WHATWG crypto-based RNG - http://wiki.whatwg.org/wiki/Crypto\n // Moderately fast, high quality\n var _rnds8 = new Uint8Array(16);\n\n return function whatwgRNG() {\n crypto.getRandomValues(_rnds8);\n return _rnds8;\n };\n } // Math.random()-based (RNG)\n //\n // If all else fails, use Math.random().\n // It's fast, but is of unspecified quality.\n\n\n var _rnds = new Array(16);\n\n return function () {\n for (var i = 0, r; i < 16; i++) {\n if ((i & 0x03) === 0) {\n r = Math.random() * 0x100000000;\n }\n\n _rnds[i] = r >>> ((i & 0x03) << 3) & 0xff;\n }\n\n return _rnds;\n }; // uuid.js\n //\n // Copyright (c) 2010-2012 Robert Kieffer\n // MIT License - http://opensource.org/licenses/mit-license.php\n // Unique ID creation requires a high quality random # generator. We feature\n // detect to determine the best RNG source, normalizing to a function that\n // returns 128-bits of randomness, since that's what's usually required\n // return require('./rng');\n}();\n\nvar byteToHex$1 = [];\n\nfor (var i$1$1 = 0; i$1$1 < 256; i$1$1++) {\n byteToHex$1[i$1$1] = (i$1$1 + 0x100).toString(16).substr(1);\n} // **`v1()` - Generate time-based UUID**\n//\n// Inspired by https://github.com/LiosK/UUID.js\n// and http://docs.python.org/library/uuid.html\n// random #'s we need to init node and clockseq\n\n\nvar seedBytes = random(); // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)\n\nvar defaultNodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]]; // Per 4.2.2, randomize (14 bit) clockseq\n\nvar defaultClockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff; // Previous uuid creation time\n/**\n * UUIDv4 options.\n */\n\n/**\n * Generate UUIDv4\n *\n * @param options - Options to be used instead of default generated values.\n * String 'binary' is a shorthand for uuid4({}, new Array(16)).\n * @param buf - If present the buffer will be filled with the generated UUID.\n * @param offset - Offset of the UUID from the start of the buffer.\n *\n * @returns UUIDv4\n */\n\n\nfunction uuid4() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var buf = arguments.length > 1 ? arguments[1] : undefined;\n var offset = arguments.length > 2 ? arguments[2] : undefined; // Deprecated - 'format' argument, as supported in v1.2\n\n var i = buf && offset || 0;\n\n if (typeof options === 'string') {\n buf = options === 'binary' ? new Array(16) : undefined;\n options = {};\n }\n\n var rnds = options.random || (options.rng || random)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n for (var ii = 0; ii < 16; ii++) {\n buf[i + ii] = rnds[ii];\n }\n }\n\n return buf || stringifyUUID(rnds);\n} // Rollup will complain about mixing default and named exports in UMD build,\n\n// for example '/Date(1198908717056)/' or '/Date(1198908717056-0700)/'\n// code from http://momentjs.com/\n\nvar ASPDateRegex = /^\\/?Date\\((-?\\d+)/i; // Color REs\n\nvar fullHexRE = /^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i;\nvar shortHexRE = /^#?([a-f\\d])([a-f\\d])([a-f\\d])$/i;\nvar rgbRE = /^rgb\\( *(1?\\d{1,2}|2[0-4]\\d|25[0-5]) *, *(1?\\d{1,2}|2[0-4]\\d|25[0-5]) *, *(1?\\d{1,2}|2[0-4]\\d|25[0-5]) *\\)$/i;\nvar rgbaRE = /^rgba\\( *(1?\\d{1,2}|2[0-4]\\d|25[0-5]) *, *(1?\\d{1,2}|2[0-4]\\d|25[0-5]) *, *(1?\\d{1,2}|2[0-4]\\d|25[0-5]) *, *([01]|0?\\.\\d+) *\\)$/i;\n/**\n * Hue, Saturation, Value.\n */\n\n/**\n * Test whether given object is a number\n *\n * @param value - Input value of unknown type.\n *\n * @returns True if number, false otherwise.\n */\nfunction isNumber(value) {\n return value instanceof Number || typeof value === \"number\";\n}\n/**\n * Remove everything in the DOM object\n *\n * @param DOMobject - Node whose child nodes will be recursively deleted.\n */\n\nfunction recursiveDOMDelete(DOMobject) {\n if (DOMobject) {\n while (DOMobject.hasChildNodes() === true) {\n var child = DOMobject.firstChild;\n\n if (child) {\n recursiveDOMDelete(child);\n DOMobject.removeChild(child);\n }\n }\n }\n}\n/**\n * Test whether given object is a string\n *\n * @param value - Input value of unknown type.\n *\n * @returns True if string, false otherwise.\n */\n\nfunction isString(value) {\n return value instanceof String || typeof value === \"string\";\n}\n/**\n * Test whether given object is a object (not primitive or null).\n *\n * @param value - Input value of unknown type.\n *\n * @returns True if not null object, false otherwise.\n */\n\nfunction isObject(value) {\n return _typeof(value) === \"object\" && value !== null;\n}\n/**\n * Test whether given object is a Date, or a String containing a Date\n *\n * @param value - Input value of unknown type.\n *\n * @returns True if Date instance or string date representation, false otherwise.\n */\n\nfunction isDate(value) {\n if (value instanceof Date) {\n return true;\n } else if (isString(value)) {\n // test whether this string contains a date\n var match = ASPDateRegex.exec(value);\n\n if (match) {\n return true;\n } else if (!isNaN(Date.parse(value))) {\n return true;\n }\n }\n\n return false;\n}\n/**\n * Test whether given object is a Moment date.\n * @TODO: This is basically a workaround, if Moment was imported property it wouldn't necessary as moment.isMoment is a TS type guard.\n *\n * @param value - Input value of unknown type.\n *\n * @returns True if Moment instance, false otherwise.\n */\n\nfunction isMoment(value) {\n return moment.isMoment(value);\n}\n/**\n * Copy property from b to a if property present in a.\n * If property in b explicitly set to null, delete it if `allowDeletion` set.\n *\n * Internal helper routine, should not be exported. Not added to `exports` for that reason.\n *\n * @param a - Target object.\n * @param b - Source object.\n * @param prop - Name of property to copy from b to a.\n * @param allowDeletion if true, delete property in a if explicitly set to null in b\n */\n\nfunction copyOrDelete(a, b, prop, allowDeletion) {\n var doDeletion = false;\n\n if (allowDeletion === true) {\n doDeletion = b[prop] === null && a[prop] !== undefined;\n }\n\n if (doDeletion) {\n delete a[prop];\n } else {\n a[prop] = b[prop]; // Remember, this is a reference copy!\n }\n}\n/**\n * Fill an object with a possibly partially defined other object.\n *\n * Only copies values for the properties already present in a.\n * That means an object is not created on a property if only the b object has it.\n *\n * @param a - The object that will have it's properties updated.\n * @param b - The object with property updates.\n * @param allowDeletion - if true, delete properties in a that are explicitly set to null in b\n */\n\n\nfunction fillIfDefined(a, b) {\n var allowDeletion = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n\n // NOTE: iteration of properties of a\n // NOTE: prototype properties iterated over as well\n for (var prop in a) {\n if (b[prop] !== undefined) {\n if (b[prop] === null || _typeof(b[prop]) !== \"object\") {\n // Note: typeof null === 'object'\n copyOrDelete(a, b, prop, allowDeletion);\n } else {\n var aProp = a[prop];\n var bProp = b[prop];\n\n if (isObject(aProp) && isObject(bProp)) {\n fillIfDefined(aProp, bProp, allowDeletion);\n }\n }\n }\n }\n}\n/**\n * Copy the values of all of the enumerable own properties from one or more source objects to a\n * target object. Returns the target object.\n *\n * @param target - The target object to copy to.\n * @param source - The source object from which to copy properties.\n *\n * @return The target object.\n */\n\nvar extend = Object.assign;\n/**\n * Extend object a with selected properties of object b or a series of objects\n * Only properties with defined values are copied\n *\n * @param props - Properties to be copied to a.\n * @param a - The target.\n * @param others - The sources.\n *\n * @returns Argument a.\n */\n\nfunction selectiveExtend(props, a) {\n if (!Array.isArray(props)) {\n throw new Error(\"Array with property names expected as first argument\");\n }\n\n for (var _len = arguments.length, others = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {\n others[_key - 2] = arguments[_key];\n }\n\n for (var _i = 0, _others = others; _i < _others.length; _i++) {\n var other = _others[_i];\n\n for (var p = 0; p < props.length; p++) {\n var prop = props[p];\n\n if (other && Object.prototype.hasOwnProperty.call(other, prop)) {\n a[prop] = other[prop];\n }\n }\n }\n\n return a;\n}\n/**\n * Extend object a with selected properties of object b.\n * Only properties with defined values are copied.\n *\n * **Note:** Previous version of this routine implied that multiple source objects\n * could be used; however, the implementation was **wrong**.\n * Since multiple (>1) sources weren't used anywhere in the `vis.js` code,\n * this has been removed\n *\n * @param props - Names of first-level properties to copy over.\n * @param a - Target object.\n * @param b - Source object.\n * @param allowDeletion - If true, delete property in a if explicitly set to null in b.\n *\n * @returns Argument a.\n */\n\nfunction selectiveDeepExtend(props, a, b) {\n var allowDeletion = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;\n\n // TODO: add support for Arrays to deepExtend\n if (Array.isArray(b)) {\n throw new TypeError(\"Arrays are not supported by deepExtend\");\n }\n\n for (var p = 0; p < props.length; p++) {\n var prop = props[p];\n\n if (Object.prototype.hasOwnProperty.call(b, prop)) {\n if (b[prop] && b[prop].constructor === Object) {\n if (a[prop] === undefined) {\n a[prop] = {};\n }\n\n if (a[prop].constructor === Object) {\n deepExtend(a[prop], b[prop], false, allowDeletion);\n } else {\n copyOrDelete(a, b, prop, allowDeletion);\n }\n } else if (Array.isArray(b[prop])) {\n throw new TypeError(\"Arrays are not supported by deepExtend\");\n } else {\n copyOrDelete(a, b, prop, allowDeletion);\n }\n }\n }\n\n return a;\n}\n/**\n * Extend object `a` with properties of object `b`, ignoring properties which are explicitly\n * specified to be excluded.\n *\n * The properties of `b` are considered for copying.\n * Properties which are themselves objects are are also extended.\n * Only properties with defined values are copied\n *\n * @param propsToExclude - Names of properties which should *not* be copied.\n * @param a - Object to extend.\n * @param b - Object to take properties from for extension.\n * @param allowDeletion - If true, delete properties in a that are explicitly set to null in b.\n *\n * @returns Argument a.\n */\n\nfunction selectiveNotDeepExtend(propsToExclude, a, b) {\n var allowDeletion = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;\n\n // TODO: add support for Arrays to deepExtend\n // NOTE: array properties have an else-below; apparently, there is a problem here.\n if (Array.isArray(b)) {\n throw new TypeError(\"Arrays are not supported by deepExtend\");\n }\n\n for (var prop in b) {\n if (!Object.prototype.hasOwnProperty.call(b, prop)) {\n continue;\n } // Handle local properties only\n\n\n if (propsToExclude.indexOf(prop) !== -1) {\n continue;\n } // In exclusion list, skip\n\n\n if (b[prop] && b[prop].constructor === Object) {\n if (a[prop] === undefined) {\n a[prop] = {};\n }\n\n if (a[prop].constructor === Object) {\n deepExtend(a[prop], b[prop]); // NOTE: allowDeletion not propagated!\n } else {\n copyOrDelete(a, b, prop, allowDeletion);\n }\n } else if (Array.isArray(b[prop])) {\n a[prop] = [];\n\n for (var i = 0; i < b[prop].length; i++) {\n a[prop].push(b[prop][i]);\n }\n } else {\n copyOrDelete(a, b, prop, allowDeletion);\n }\n }\n\n return a;\n}\n/**\n * Deep extend an object a with the properties of object b\n *\n * @param a - Target object.\n * @param b - Source object.\n * @param protoExtend - If true, the prototype values will also be extended\n * (ie. the options objects that inherit from others will also get the inherited options).\n * @param allowDeletion - If true, the values of fields that are null will be deleted.\n *\n * @returns Argument a.\n */\n\nfunction deepExtend(a, b) {\n var protoExtend = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n var allowDeletion = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;\n\n for (var prop in b) {\n if (Object.prototype.hasOwnProperty.call(b, prop) || protoExtend === true) {\n if (b[prop] && Object.getPrototypeOf(b[prop]) === Object.prototype) {\n if (a[prop] === undefined) {\n a[prop] = deepExtend({}, b[prop], protoExtend); // NOTE: allowDeletion not propagated!\n } else if (a[prop] && Object.getPrototypeOf(a[prop]) === Object.prototype) {\n deepExtend(a[prop], b[prop], protoExtend); // NOTE: allowDeletion not propagated!\n } else {\n copyOrDelete(a, b, prop, allowDeletion);\n }\n } else if (Array.isArray(b[prop])) {\n a[prop] = b[prop].slice();\n } else {\n copyOrDelete(a, b, prop, allowDeletion);\n }\n }\n }\n\n return a;\n}\n/**\n * Test whether all elements in two arrays are equal.\n *\n * @param a - First array.\n * @param b - Second array.\n *\n * @returns True if both arrays have the same length and same elements (1 = '1').\n */\n\nfunction equalArray(a, b) {\n if (a.length !== b.length) {\n return false;\n }\n\n for (var i = 0, len = a.length; i < len; i++) {\n if (a[i] != b[i]) {\n return false;\n }\n }\n\n return true;\n}\n\n/**\n * Convert an object into another type\n *\n * @param object - Value of unknown type.\n * @param type - Name of the desired type.\n *\n * @returns Object in the desired type.\n * @throws Error\n */\nfunction convert(object, type) {\n var match;\n\n if (object === undefined) {\n return undefined;\n }\n\n if (object === null) {\n return null;\n }\n\n if (!type) {\n return object;\n }\n\n if (!(typeof type === \"string\") && !(type instanceof String)) {\n throw new Error(\"Type must be a string\");\n } //noinspection FallthroughInSwitchStatementJS\n\n\n switch (type) {\n case \"boolean\":\n case \"Boolean\":\n return Boolean(object);\n\n case \"number\":\n case \"Number\":\n if (isString(object) && !isNaN(Date.parse(object))) {\n return moment(object).valueOf();\n } else {\n // @TODO: I don't think that Number and String constructors are a good idea.\n // This could also fail if the object doesn't have valueOf method or if it's redefined.\n // For example: Object.create(null) or { valueOf: 7 }.\n return Number(object.valueOf());\n }\n\n case \"string\":\n case \"String\":\n return String(object);\n\n case \"Date\":\n if (isNumber(object)) {\n return new Date(object);\n }\n\n if (object instanceof Date) {\n return new Date(object.valueOf());\n } else if (isMoment(object)) {\n return new Date(object.valueOf());\n }\n\n if (isString(object)) {\n match = ASPDateRegex.exec(object);\n\n if (match) {\n // object is an ASP date\n return new Date(Number(match[1])); // parse number\n } else {\n return moment(new Date(object)).toDate(); // parse string\n }\n } else {\n throw new Error(\"Cannot convert object of type \" + getType(object) + \" to type Date\");\n }\n\n case \"Moment\":\n if (isNumber(object)) {\n return moment(object);\n }\n\n if (object instanceof Date) {\n return moment(object.valueOf());\n } else if (isMoment(object)) {\n return moment(object);\n }\n\n if (isString(object)) {\n match = ASPDateRegex.exec(object);\n\n if (match) {\n // object is an ASP date\n return moment(Number(match[1])); // parse number\n } else {\n return moment(object); // parse string\n }\n } else {\n throw new Error(\"Cannot convert object of type \" + getType(object) + \" to type Date\");\n }\n\n case \"ISODate\":\n if (isNumber(object)) {\n return new Date(object);\n } else if (object instanceof Date) {\n return object.toISOString();\n } else if (isMoment(object)) {\n return object.toDate().toISOString();\n } else if (isString(object)) {\n match = ASPDateRegex.exec(object);\n\n if (match) {\n // object is an ASP date\n return new Date(Number(match[1])).toISOString(); // parse number\n } else {\n return moment(object).format(); // ISO 8601\n }\n } else {\n throw new Error(\"Cannot convert object of type \" + getType(object) + \" to type ISODate\");\n }\n\n case \"ASPDate\":\n if (isNumber(object)) {\n return \"/Date(\" + object + \")/\";\n } else if (object instanceof Date || isMoment(object)) {\n return \"/Date(\" + object.valueOf() + \")/\";\n } else if (isString(object)) {\n match = ASPDateRegex.exec(object);\n\n var _value;\n\n if (match) {\n // object is an ASP date\n _value = new Date(Number(match[1])).valueOf(); // parse number\n } else {\n _value = new Date(object).valueOf(); // parse string\n }\n\n return \"/Date(\" + _value + \")/\";\n } else {\n throw new Error(\"Cannot convert object of type \" + getType(object) + \" to type ASPDate\");\n }\n\n default:\n var never = type;\n throw new Error(\"Unknown type \".concat(never));\n }\n}\n/**\n * Get the type of an object, for example exports.getType([]) returns 'Array'\n *\n * @param object - Input value of unknown type.\n *\n * @returns Detected type.\n */\n\nfunction getType(object) {\n var type = _typeof(object);\n\n if (type === \"object\") {\n if (object === null) {\n return \"null\";\n }\n\n if (object instanceof Boolean) {\n return \"Boolean\";\n }\n\n if (object instanceof Number) {\n return \"Number\";\n }\n\n if (object instanceof String) {\n return \"String\";\n }\n\n if (Array.isArray(object)) {\n return \"Array\";\n }\n\n if (object instanceof Date) {\n return \"Date\";\n }\n\n return \"Object\";\n }\n\n if (type === \"number\") {\n return \"Number\";\n }\n\n if (type === \"boolean\") {\n return \"Boolean\";\n }\n\n if (type === \"string\") {\n return \"String\";\n }\n\n if (type === undefined) {\n return \"undefined\";\n }\n\n return type;\n}\n\n/**\n * Used to extend an array and copy it. This is used to propagate paths recursively.\n *\n * @param arr - First part.\n * @param newValue - The value to be aadded into the array.\n *\n * @returns A new array with all items from arr and newValue (which is last).\n */\nfunction copyAndExtendArray(arr, newValue) {\n return [].concat(_toConsumableArray(arr), [newValue]);\n}\n/**\n * Used to extend an array and copy it. This is used to propagate paths recursively.\n *\n * @param arr - The array to be copied.\n *\n * @returns Shallow copy of arr.\n */\n\nfunction copyArray(arr) {\n return arr.slice();\n}\n/**\n * Retrieve the absolute left value of a DOM element\n *\n * @param elem - A dom element, for example a div.\n *\n * @returns The absolute left position of this element in the browser page.\n */\n\nfunction getAbsoluteLeft(elem) {\n return elem.getBoundingClientRect().left;\n}\n/**\n * Retrieve the absolute right value of a DOM element\n *\n * @param elem - A dom element, for example a div.\n *\n * @returns The absolute right position of this element in the browser page.\n */\n\nfunction getAbsoluteRight(elem) {\n return elem.getBoundingClientRect().right;\n}\n/**\n * Retrieve the absolute top value of a DOM element\n *\n * @param elem - A dom element, for example a div.\n *\n * @returns The absolute top position of this element in the browser page.\n */\n\nfunction getAbsoluteTop(elem) {\n return elem.getBoundingClientRect().top;\n}\n/**\n * Add a className to the given elements style.\n *\n * @param elem - The element to which the classes will be added.\n * @param classNames - Space separated list of classes.\n */\n\nfunction addClassName(elem, classNames) {\n var classes = elem.className.split(\" \");\n var newClasses = classNames.split(\" \");\n classes = classes.concat(newClasses.filter(function (className) {\n return classes.indexOf(className) < 0;\n }));\n elem.className = classes.join(\" \");\n}\n/**\n * Remove a className from the given elements style.\n *\n * @param elem - The element from which the classes will be removed.\n * @param classNames - Space separated list of classes.\n */\n\nfunction removeClassName(elem, classNames) {\n var classes = elem.className.split(\" \");\n var oldClasses = classNames.split(\" \");\n classes = classes.filter(function (className) {\n return oldClasses.indexOf(className) < 0;\n });\n elem.className = classes.join(\" \");\n}\n\n/**\n * For each method for both arrays and objects.\n * In case of an array, the built-in Array.forEach() is applied (**No, it's not!**).\n * In case of an Object, the method loops over all properties of the object.\n *\n * @param object - An Object or Array to be iterated over.\n * @param callback - Array.forEach-like callback.\n */\nfunction forEach(object, callback) {\n if (Array.isArray(object)) {\n // array\n var len = object.length;\n\n for (var i = 0; i < len; i++) {\n callback(object[i], i, object);\n }\n } else {\n // object\n for (var _key2 in object) {\n if (Object.prototype.hasOwnProperty.call(object, _key2)) {\n callback(object[_key2], _key2, object);\n }\n }\n }\n}\n/**\n * Convert an object into an array: all objects properties are put into the array. The resulting array is unordered.\n *\n * @param o - Object that contains the properties and methods.\n *\n * @returns An array of unordered values.\n */\n\nvar toArray = Object.values;\n/**\n * Update a property in an object\n *\n * @param object - The object whose property will be updated.\n * @param key - Name of the property to be updated.\n * @param value - The new value to be assigned.\n *\n * @returns Whether the value was updated (true) or already strictly the same in the original object (false).\n */\n\nfunction updateProperty(object, key, value) {\n if (object[key] !== value) {\n object[key] = value;\n return true;\n } else {\n return false;\n }\n}\n/**\n * Throttle the given function to be only executed once per animation frame.\n *\n * @param fn - The original function.\n *\n * @returns The throttled function.\n */\n\nfunction throttle(fn) {\n var scheduled = false;\n return function () {\n if (!scheduled) {\n scheduled = true;\n requestAnimationFrame(function () {\n scheduled = false;\n fn();\n });\n }\n };\n}\n/**\n * Add and event listener. Works for all browsers.\n *\n * @param element - The element to bind the event listener to.\n * @param action - Same as Element.addEventListener(action, —, —).\n * @param listener - Same as Element.addEventListener(—, listener, —).\n * @param useCapture - Same as Element.addEventListener(—, —, useCapture).\n */\n\nfunction addEventListener(element, action, listener, useCapture) {\n if (element.addEventListener) {\n if (useCapture === undefined) {\n useCapture = false;\n }\n\n if (action === \"mousewheel\" && navigator.userAgent.indexOf(\"Firefox\") >= 0) {\n action = \"DOMMouseScroll\"; // For Firefox\n }\n\n element.addEventListener(action, listener, useCapture);\n } else {\n // @TODO: IE types? Does anyone care?\n element.attachEvent(\"on\" + action, listener); // IE browsers\n }\n}\n/**\n * Remove an event listener from an element\n *\n * @param element - The element to bind the event listener to.\n * @param action - Same as Element.removeEventListener(action, —, —).\n * @param listener - Same as Element.removeEventListener(—, listener, —).\n * @param useCapture - Same as Element.removeEventListener(—, —, useCapture).\n */\n\nfunction removeEventListener(element, action, listener, useCapture) {\n if (element.removeEventListener) {\n // non-IE browsers\n if (useCapture === undefined) {\n useCapture = false;\n }\n\n if (action === \"mousewheel\" && navigator.userAgent.indexOf(\"Firefox\") >= 0) {\n action = \"DOMMouseScroll\"; // For Firefox\n }\n\n element.removeEventListener(action, listener, useCapture);\n } else {\n // @TODO: IE types? Does anyone care?\n element.detachEvent(\"on\" + action, listener); // IE browsers\n }\n}\n/**\n * Cancels the event's default action if it is cancelable, without stopping further propagation of the event.\n *\n * @param event - The event whose default action should be prevented.\n */\n\nfunction preventDefault(event) {\n if (!event) {\n event = window.event;\n }\n\n if (!event) ; else if (event.preventDefault) {\n event.preventDefault(); // non-IE browsers\n } else {\n // @TODO: IE types? Does anyone care?\n event.returnValue = false; // IE browsers\n }\n}\n/**\n * Get HTML element which is the target of the event.\n *\n * @param event - The event.\n *\n * @returns The element or null if not obtainable.\n */\n\nfunction getTarget() {\n var event = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : window.event;\n // code from http://www.quirksmode.org/js/events_properties.html\n // @TODO: EventTarget can be almost anything, is it okay to return only Elements?\n var target = null;\n\n if (!event) ; else if (event.target) {\n target = event.target;\n } else if (event.srcElement) {\n target = event.srcElement;\n }\n\n if (!(target instanceof Element)) {\n return null;\n }\n\n if (target.nodeType != null && target.nodeType == 3) {\n // defeat Safari bug\n target = target.parentNode;\n\n if (!(target instanceof Element)) {\n return null;\n }\n }\n\n return target;\n}\n/**\n * Check if given element contains given parent somewhere in the DOM tree\n *\n * @param element - The element to be tested.\n * @param parent - The ancestor (not necessarily parent) of the element.\n *\n * @returns True if parent is an ancestor of the element, false otherwise.\n */\n\nfunction hasParent(element, parent) {\n var elem = element;\n\n while (elem) {\n if (elem === parent) {\n return true;\n } else if (elem.parentNode) {\n elem = elem.parentNode;\n } else {\n return false;\n }\n }\n\n return false;\n}\nvar option = {\n /**\n * Convert a value into a boolean.\n *\n * @param value - Value to be converted intoboolean, a function will be executed as (() => unknown).\n * @param defaultValue - If the value or the return value of the function == null then this will be returned.\n *\n * @returns Corresponding boolean value, if none then the default value, if none then null.\n */\n asBoolean: function asBoolean(value, defaultValue) {\n if (typeof value == \"function\") {\n value = value();\n }\n\n if (value != null) {\n return value != false;\n }\n\n return defaultValue || null;\n },\n\n /**\n * Convert a value into a number.\n *\n * @param value - Value to be converted intonumber, a function will be executed as (() => unknown).\n * @param defaultValue - If the value or the return value of the function == null then this will be returned.\n *\n * @returns Corresponding **boxed** number value, if none then the default value, if none then null.\n */\n asNumber: function asNumber(value, defaultValue) {\n if (typeof value == \"function\") {\n value = value();\n }\n\n if (value != null) {\n return Number(value) || defaultValue || null;\n }\n\n return defaultValue || null;\n },\n\n /**\n * Convert a value into a string.\n *\n * @param value - Value to be converted intostring, a function will be executed as (() => unknown).\n * @param defaultValue - If the value or the return value of the function == null then this will be returned.\n *\n * @returns Corresponding **boxed** string value, if none then the default value, if none then null.\n */\n asString: function asString(value, defaultValue) {\n if (typeof value == \"function\") {\n value = value();\n }\n\n if (value != null) {\n return String(value);\n }\n\n return defaultValue || null;\n },\n\n /**\n * Convert a value into a size.\n *\n * @param value - Value to be converted intosize, a function will be executed as (() => unknown).\n * @param defaultValue - If the value or the return value of the function == null then this will be returned.\n *\n * @returns Corresponding string value (number + 'px'), if none then the default value, if none then null.\n */\n asSize: function asSize(value, defaultValue) {\n if (typeof value == \"function\") {\n value = value();\n }\n\n if (isString(value)) {\n return value;\n } else if (isNumber(value)) {\n return value + \"px\";\n } else {\n return defaultValue || null;\n }\n },\n\n /**\n * Convert a value into a DOM Element.\n *\n * @param value - Value to be converted into DOM Element, a function will be executed as (() => unknown).\n * @param defaultValue - If the value or the return value of the function == null then this will be returned.\n *\n * @returns The DOM Element, if none then the default value, if none then null.\n */\n asElement: function asElement(value, defaultValue) {\n if (typeof value == \"function\") {\n value = value();\n }\n\n return value || defaultValue || null;\n }\n};\n/**\n * Convert hex color string into RGB color object.\n * http://stackoverflow.com/questions/5623838/rgb-to-hex-and-hex-to-rgb\n *\n * @param hex - Hex color string (3 or 6 digits, with or without #).\n *\n * @returns RGB color object.\n */\n\nfunction hexToRGB(hex) {\n var result;\n\n switch (hex.length) {\n case 3:\n case 4:\n result = shortHexRE.exec(hex);\n return result ? {\n r: parseInt(result[1] + result[1], 16),\n g: parseInt(result[2] + result[2], 16),\n b: parseInt(result[3] + result[3], 16)\n } : null;\n\n case 6:\n case 7:\n result = fullHexRE.exec(hex);\n return result ? {\n r: parseInt(result[1], 16),\n g: parseInt(result[2], 16),\n b: parseInt(result[3], 16)\n } : null;\n\n default:\n return null;\n }\n}\n/**\n * This function takes string color in hex or RGB format and adds the opacity, RGBA is passed through unchanged.\n *\n * @param color - The color string (hex, RGB, RGBA).\n * @param opacity - The new opacity.\n *\n * @returns RGBA string, for example 'rgba(255, 0, 127, 0.3)'.\n */\n\nfunction overrideOpacity(color, opacity) {\n if (color.indexOf(\"rgba\") !== -1) {\n return color;\n } else if (color.indexOf(\"rgb\") !== -1) {\n var rgb = color.substr(color.indexOf(\"(\") + 1).replace(\")\", \"\").split(\",\");\n return \"rgba(\" + rgb[0] + \",\" + rgb[1] + \",\" + rgb[2] + \",\" + opacity + \")\";\n } else {\n var _rgb = hexToRGB(color);\n\n if (_rgb == null) {\n return color;\n } else {\n return \"rgba(\" + _rgb.r + \",\" + _rgb.g + \",\" + _rgb.b + \",\" + opacity + \")\";\n }\n }\n}\n/**\n * Convert RGB <0, 255> into hex color string.\n *\n * @param red - Red channel.\n * @param green - Green channel.\n * @param blue - Blue channel.\n *\n * @returns Hex color string (for example: '#0acdc0').\n */\n\nfunction RGBToHex(red, green, blue) {\n return \"#\" + ((1 << 24) + (red << 16) + (green << 8) + blue).toString(16).slice(1);\n}\n\n/**\n * Parse a color property into an object with border, background, and highlight colors\n *\n * @param inputColor - Shorthand color string or input color object.\n * @param defaultColor - Full color object to fill in missing values in inputColor.\n *\n * @returns Color object.\n */\nfunction parseColor(inputColor, defaultColor) {\n if (isString(inputColor)) {\n var colorStr = inputColor;\n\n if (isValidRGB(colorStr)) {\n var rgb = colorStr.substr(4).substr(0, colorStr.length - 5).split(\",\").map(function (value) {\n return parseInt(value);\n });\n colorStr = RGBToHex(rgb[0], rgb[1], rgb[2]);\n }\n\n if (isValidHex(colorStr) === true) {\n var hsv = hexToHSV(colorStr);\n var lighterColorHSV = {\n h: hsv.h,\n s: hsv.s * 0.8,\n v: Math.min(1, hsv.v * 1.02)\n };\n var darkerColorHSV = {\n h: hsv.h,\n s: Math.min(1, hsv.s * 1.25),\n v: hsv.v * 0.8\n };\n var darkerColorHex = HSVToHex(darkerColorHSV.h, darkerColorHSV.s, darkerColorHSV.v);\n var lighterColorHex = HSVToHex(lighterColorHSV.h, lighterColorHSV.s, lighterColorHSV.v);\n return {\n background: colorStr,\n border: darkerColorHex,\n highlight: {\n background: lighterColorHex,\n border: darkerColorHex\n },\n hover: {\n background: lighterColorHex,\n border: darkerColorHex\n }\n };\n } else {\n return {\n background: colorStr,\n border: colorStr,\n highlight: {\n background: colorStr,\n border: colorStr\n },\n hover: {\n background: colorStr,\n border: colorStr\n }\n };\n }\n } else {\n if (defaultColor) {\n var color = {\n background: inputColor.background || defaultColor.background,\n border: inputColor.border || defaultColor.border,\n highlight: isString(inputColor.highlight) ? {\n border: inputColor.highlight,\n background: inputColor.highlight\n } : {\n background: inputColor.highlight && inputColor.highlight.background || defaultColor.highlight.background,\n border: inputColor.highlight && inputColor.highlight.border || defaultColor.highlight.border\n },\n hover: isString(inputColor.hover) ? {\n border: inputColor.hover,\n background: inputColor.hover\n } : {\n border: inputColor.hover && inputColor.hover.border || defaultColor.hover.border,\n background: inputColor.hover && inputColor.hover.background || defaultColor.hover.background\n }\n };\n return color;\n } else {\n var _color = {\n background: inputColor.background || undefined,\n border: inputColor.border || undefined,\n highlight: isString(inputColor.highlight) ? {\n border: inputColor.highlight,\n background: inputColor.highlight\n } : {\n background: inputColor.highlight && inputColor.highlight.background || undefined,\n border: inputColor.highlight && inputColor.highlight.border || undefined\n },\n hover: isString(inputColor.hover) ? {\n border: inputColor.hover,\n background: inputColor.hover\n } : {\n border: inputColor.hover && inputColor.hover.border || undefined,\n background: inputColor.hover && inputColor.hover.background || undefined\n }\n };\n return _color;\n }\n }\n}\n/**\n * Convert RGB <0, 255> into HSV object.\n * http://www.javascripter.net/faq/rgb2hsv.htm\n *\n * @param red - Red channel.\n * @param green - Green channel.\n * @param blue - Blue channel.\n *\n * @returns HSV color object.\n */\n\nfunction RGBToHSV(red, green, blue) {\n red = red / 255;\n green = green / 255;\n blue = blue / 255;\n var minRGB = Math.min(red, Math.min(green, blue));\n var maxRGB = Math.max(red, Math.max(green, blue)); // Black-gray-white\n\n if (minRGB === maxRGB) {\n return {\n h: 0,\n s: 0,\n v: minRGB\n };\n } // Colors other than black-gray-white:\n\n\n var d = red === minRGB ? green - blue : blue === minRGB ? red - green : blue - red;\n var h = red === minRGB ? 3 : blue === minRGB ? 1 : 5;\n var hue = 60 * (h - d / (maxRGB - minRGB)) / 360;\n var saturation = (maxRGB - minRGB) / maxRGB;\n var value = maxRGB;\n return {\n h: hue,\n s: saturation,\n v: value\n };\n}\nvar cssUtil = {\n // split a string with css styles into an object with key/values\n split: function split(cssText) {\n var styles = {};\n cssText.split(\";\").forEach(function (style) {\n if (style.trim() != \"\") {\n var parts = style.split(\":\");\n\n var _key3 = parts[0].trim();\n\n var _value2 = parts[1].trim();\n\n styles[_key3] = _value2;\n }\n });\n return styles;\n },\n // build a css text string from an object with key/values\n join: function join(styles) {\n return Object.keys(styles).map(function (key) {\n return key + \": \" + styles[key];\n }).join(\"; \");\n }\n};\n/**\n * Append a string with css styles to an element\n *\n * @param element - The element that will receive new styles.\n * @param cssText - The styles to be appended.\n */\n\nfunction addCssText(element, cssText) {\n var currentStyles = cssUtil.split(element.style.cssText);\n var newStyles = cssUtil.split(cssText);\n\n var styles = _objectSpread2({}, currentStyles, {}, newStyles);\n\n element.style.cssText = cssUtil.join(styles);\n}\n/**\n * Remove a string with css styles from an element\n *\n * @param element - The element from which styles should be removed.\n * @param cssText - The styles to be removed.\n */\n\nfunction removeCssText(element, cssText) {\n var styles = cssUtil.split(element.style.cssText);\n var removeStyles = cssUtil.split(cssText);\n\n for (var _key4 in removeStyles) {\n if (Object.prototype.hasOwnProperty.call(removeStyles, _key4)) {\n delete styles[_key4];\n }\n }\n\n element.style.cssText = cssUtil.join(styles);\n}\n/**\n * Convert HSV <0, 1> into RGB color object.\n * https://gist.github.com/mjijackson/5311256\n *\n * @param h - Hue\n * @param s - Saturation\n * @param v - Value\n *\n * @returns RGB color object.\n */\n\nfunction HSVToRGB(h, s, v) {\n var r;\n var g;\n var b;\n var i = Math.floor(h * 6);\n var f = h * 6 - i;\n var p = v * (1 - s);\n var q = v * (1 - f * s);\n var t = v * (1 - (1 - f) * s);\n\n switch (i % 6) {\n case 0:\n r = v, g = t, b = p;\n break;\n\n case 1:\n r = q, g = v, b = p;\n break;\n\n case 2:\n r = p, g = v, b = t;\n break;\n\n case 3:\n r = p, g = q, b = v;\n break;\n\n case 4:\n r = t, g = p, b = v;\n break;\n\n case 5:\n r = v, g = p, b = q;\n break;\n }\n\n return {\n r: Math.floor(r * 255),\n g: Math.floor(g * 255),\n b: Math.floor(b * 255)\n };\n}\n/**\n * Convert HSV <0, 1> into hex color string.\n *\n * @param h - Hue\n * @param s - Saturation\n * @param v - Value\n *\n * @returns Hex color string.\n */\n\nfunction HSVToHex(h, s, v) {\n var rgb = HSVToRGB(h, s, v);\n return RGBToHex(rgb.r, rgb.g, rgb.b);\n}\n/**\n * Convert hex color string into HSV <0, 1>.\n *\n * @param hex - Hex color string.\n *\n * @returns HSV color object.\n */\n\nfunction hexToHSV(hex) {\n var rgb = hexToRGB(hex);\n\n if (!rgb) {\n throw new TypeError(\"'\".concat(hex, \"' is not a valid color.\"));\n }\n\n return RGBToHSV(rgb.r, rgb.g, rgb.b);\n}\n/**\n * Validate hex color string.\n *\n * @param hex - Unknown string that may contain a color.\n *\n * @returns True if the string is valid, false otherwise.\n */\n\nfunction isValidHex(hex) {\n var isOk = /(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(hex);\n return isOk;\n}\n/**\n * Validate RGB color string.\n *\n * @param rgb - Unknown string that may contain a color.\n *\n * @returns True if the string is valid, false otherwise.\n */\n\nfunction isValidRGB(rgb) {\n return rgbRE.test(rgb);\n}\n/**\n * Validate RGBA color string.\n *\n * @param rgba - Unknown string that may contain a color.\n *\n * @returns True if the string is valid, false otherwise.\n */\n\nfunction isValidRGBA(rgba) {\n return rgbaRE.test(rgba);\n}\n/**\n * This recursively redirects the prototype of JSON objects to the referenceObject.\n * This is used for default options.\n *\n * @param fields - Names of properties to be bridged.\n * @param referenceObject - The original object.\n *\n * @returns A new object inheriting from the referenceObject.\n */\n\nfunction selectiveBridgeObject(fields, referenceObject) {\n if (referenceObject !== null && _typeof(referenceObject) === \"object\") {\n // !!! typeof null === 'object'\n var objectTo = Object.create(referenceObject);\n\n for (var i = 0; i < fields.length; i++) {\n if (Object.prototype.hasOwnProperty.call(referenceObject, fields[i])) {\n if (_typeof(referenceObject[fields[i]]) == \"object\") {\n objectTo[fields[i]] = bridgeObject(referenceObject[fields[i]]);\n }\n }\n }\n\n return objectTo;\n } else {\n return null;\n }\n}\n\n/**\n * This recursively redirects the prototype of JSON objects to the referenceObject.\n * This is used for default options.\n *\n * @param referenceObject - The original object.\n *\n * @returns The Element if the referenceObject is an Element, or a new object inheriting from the referenceObject.\n */\nfunction bridgeObject(referenceObject) {\n if (referenceObject === null || _typeof(referenceObject) !== \"object\") {\n return null;\n }\n\n if (referenceObject instanceof Element) {\n // Avoid bridging DOM objects\n return referenceObject;\n }\n\n var objectTo = Object.create(referenceObject);\n\n for (var i in referenceObject) {\n if (Object.prototype.hasOwnProperty.call(referenceObject, i)) {\n if (_typeof(referenceObject[i]) == \"object\") {\n objectTo[i] = bridgeObject(referenceObject[i]);\n }\n }\n }\n\n return objectTo;\n}\n/**\n * This method provides a stable sort implementation, very fast for presorted data.\n *\n * @param a - The array to be sorted (in-place).\n * @param compare - An order comparator.\n *\n * @returns The argument a.\n */\n\nfunction insertSort(a, compare) {\n for (var i = 0; i < a.length; i++) {\n var k = a[i];\n var j = void 0;\n\n for (j = i; j > 0 && compare(k, a[j - 1]) < 0; j--) {\n a[j] = a[j - 1];\n }\n\n a[j] = k;\n }\n\n return a;\n}\n/**\n * This is used to set the options of subobjects in the options object.\n *\n * A requirement of these subobjects is that they have an 'enabled' element\n * which is optional for the user but mandatory for the program.\n *\n * The added value here of the merge is that option 'enabled' is set as required.\n *\n * @param mergeTarget - Either this.options or the options used for the groups.\n * @param options - Options.\n * @param option - Option key in the options argument.\n * @param globalOptions - Global options, passed in to determine value of option 'enabled'.\n */\n\nfunction mergeOptions(mergeTarget, options, option) {\n var globalOptions = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};\n\n // Local helpers\n var isPresent = function isPresent(obj) {\n return obj !== null && obj !== undefined;\n };\n\n var isObject = function isObject(obj) {\n return obj !== null && _typeof(obj) === \"object\";\n }; // https://stackoverflow.com/a/34491287/1223531\n\n\n var isEmpty = function isEmpty(obj) {\n for (var x in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, x)) {\n return false;\n }\n }\n\n return true;\n }; // Guards\n\n\n if (!isObject(mergeTarget)) {\n throw new Error(\"Parameter mergeTarget must be an object\");\n }\n\n if (!isObject(options)) {\n throw new Error(\"Parameter options must be an object\");\n }\n\n if (!isPresent(option)) {\n throw new Error(\"Parameter option must have a value\");\n }\n\n if (!isObject(globalOptions)) {\n throw new Error(\"Parameter globalOptions must be an object\");\n } //\n // Actual merge routine, separated from main logic\n // Only a single level of options is merged. Deeper levels are ref'd. This may actually be an issue.\n //\n\n\n var doMerge = function doMerge(target, options, option) {\n if (!isObject(target[option])) {\n target[option] = {};\n }\n\n var src = options[option];\n var dst = target[option];\n\n for (var prop in src) {\n if (Object.prototype.hasOwnProperty.call(src, prop)) {\n dst[prop] = src[prop];\n }\n }\n }; // Local initialization\n\n\n var srcOption = options[option];\n var globalPassed = isObject(globalOptions) && !isEmpty(globalOptions);\n var globalOption = globalPassed ? globalOptions[option] : undefined;\n var globalEnabled = globalOption ? globalOption.enabled : undefined; /////////////////////////////////////////\n // Main routine\n /////////////////////////////////////////\n\n if (srcOption === undefined) {\n return; // Nothing to do\n }\n\n if (typeof srcOption === \"boolean\") {\n if (!isObject(mergeTarget[option])) {\n mergeTarget[option] = {};\n }\n\n mergeTarget[option].enabled = srcOption;\n return;\n }\n\n if (srcOption === null && !isObject(mergeTarget[option])) {\n // If possible, explicit copy from globals\n if (isPresent(globalOption)) {\n mergeTarget[option] = Object.create(globalOption);\n } else {\n return; // Nothing to do\n }\n }\n\n if (!isObject(srcOption)) {\n return;\n } //\n // Ensure that 'enabled' is properly set. It is required internally\n // Note that the value from options will always overwrite the existing value\n //\n\n\n var enabled = true; // default value\n\n if (srcOption.enabled !== undefined) {\n enabled = srcOption.enabled;\n } else {\n // Take from globals, if present\n if (globalEnabled !== undefined) {\n enabled = globalOption.enabled;\n }\n }\n\n doMerge(mergeTarget, options, option);\n mergeTarget[option].enabled = enabled;\n}\n\n/**\n * This function does a binary search for a visible item in a sorted list. If we find a visible item, the code that uses\n * this function will then iterate in both directions over this sorted list to find all visible items.\n *\n * @param orderedItems - Items ordered by start\n * @param comparator - -1 is lower, 0 is equal, 1 is higher\n * @param field - Property name on an item (i.e. item[field]).\n * @param field2 - Second property name on an item (i.e. item[field][field2]).\n *\n * @returns Index of the found item or -1 if nothing was found.\n */\nfunction binarySearchCustom(orderedItems, comparator, field, field2) {\n var maxIterations = 10000;\n var iteration = 0;\n var low = 0;\n var high = orderedItems.length - 1;\n\n while (low <= high && iteration < maxIterations) {\n var middle = Math.floor((low + high) / 2);\n var item = orderedItems[middle];\n\n var _value3 = field2 === undefined ? item[field] : item[field][field2];\n\n var searchResult = comparator(_value3);\n\n if (searchResult == 0) {\n // jihaa, found a visible item!\n return middle;\n } else if (searchResult == -1) {\n // it is too small --> increase low\n low = middle + 1;\n } else {\n // it is too big --> decrease high\n high = middle - 1;\n }\n\n iteration++;\n }\n\n return -1;\n}\n/**\n * This function does a binary search for a specific value in a sorted array. If it does not exist but is in between of\n * two values, we return either the one before or the one after, depending on user input\n * If it is found, we return the index, else -1.\n *\n * @param orderedItems - Sorted array.\n * @param target - The searched value.\n * @param field - Name of the property in items to be searched.\n * @param sidePreference - If the target is between two values, should the index of the before or the after be returned?\n * @param comparator - An optional comparator, returning -1, 0, 1 for <, ===, >.\n *\n * @returns The index of found value or -1 if nothing was found.\n */\n\nfunction binarySearchValue(orderedItems, target, field, sidePreference, comparator) {\n var maxIterations = 10000;\n var iteration = 0;\n var low = 0;\n var high = orderedItems.length - 1;\n var prevValue;\n var value;\n var nextValue;\n var middle;\n comparator = comparator != undefined ? comparator : function (a, b) {\n return a == b ? 0 : a < b ? -1 : 1;\n };\n\n while (low <= high && iteration < maxIterations) {\n // get a new guess\n middle = Math.floor(0.5 * (high + low));\n prevValue = orderedItems[Math.max(0, middle - 1)][field];\n value = orderedItems[middle][field];\n nextValue = orderedItems[Math.min(orderedItems.length - 1, middle + 1)][field];\n\n if (comparator(value, target) == 0) {\n // we found the target\n return middle;\n } else if (comparator(prevValue, target) < 0 && comparator(value, target) > 0) {\n // target is in between of the previous and the current\n return sidePreference == \"before\" ? Math.max(0, middle - 1) : middle;\n } else if (comparator(value, target) < 0 && comparator(nextValue, target) > 0) {\n // target is in between of the current and the next\n return sidePreference == \"before\" ? middle : Math.min(orderedItems.length - 1, middle + 1);\n } else {\n // didnt find the target, we need to change our boundaries.\n if (comparator(value, target) < 0) {\n // it is too small --> increase low\n low = middle + 1;\n } else {\n // it is too big --> decrease high\n high = middle - 1;\n }\n }\n\n iteration++;\n } // didnt find anything. Return -1.\n\n\n return -1;\n}\n/*\n * Easing Functions.\n * Only considering the t value for the range [0, 1] => [0, 1].\n *\n * Inspiration: from http://gizma.com/easing/\n * https://gist.github.com/gre/1650294\n */\n\nvar easingFunctions = {\n /**\n * no easing, no acceleration\n *\n * @param t - Time.\n *\n * @returns Value at time t.\n */\n linear: function linear(t) {\n return t;\n },\n\n /**\n * accelerating from zero velocity\n *\n * @param t - Time.\n *\n * @returns Value at time t.\n */\n easeInQuad: function easeInQuad(t) {\n return t * t;\n },\n\n /**\n * decelerating to zero velocity\n *\n * @param t - Time.\n *\n * @returns Value at time t.\n */\n easeOutQuad: function easeOutQuad(t) {\n return t * (2 - t);\n },\n\n /**\n * acceleration until halfway, then deceleration\n *\n * @param t - Time.\n *\n * @returns Value at time t.\n */\n easeInOutQuad: function easeInOutQuad(t) {\n return t < 0.5 ? 2 * t * t : -1 + (4 - 2 * t) * t;\n },\n\n /**\n * accelerating from zero velocity\n *\n * @param t - Time.\n *\n * @returns Value at time t.\n */\n easeInCubic: function easeInCubic(t) {\n return t * t * t;\n },\n\n /**\n * decelerating to zero velocity\n *\n * @param t - Time.\n *\n * @returns Value at time t.\n */\n easeOutCubic: function easeOutCubic(t) {\n return --t * t * t + 1;\n },\n\n /**\n * acceleration until halfway, then deceleration\n *\n * @param t - Time.\n *\n * @returns Value at time t.\n */\n easeInOutCubic: function easeInOutCubic(t) {\n return t < 0.5 ? 4 * t * t * t : (t - 1) * (2 * t - 2) * (2 * t - 2) + 1;\n },\n\n /**\n * accelerating from zero velocity\n *\n * @param t - Time.\n *\n * @returns Value at time t.\n */\n easeInQuart: function easeInQuart(t) {\n return t * t * t * t;\n },\n\n /**\n * decelerating to zero velocity\n *\n * @param t - Time.\n *\n * @returns Value at time t.\n */\n easeOutQuart: function easeOutQuart(t) {\n return 1 - --t * t * t * t;\n },\n\n /**\n * acceleration until halfway, then deceleration\n *\n * @param t - Time.\n *\n * @returns Value at time t.\n */\n easeInOutQuart: function easeInOutQuart(t) {\n return t < 0.5 ? 8 * t * t * t * t : 1 - 8 * --t * t * t * t;\n },\n\n /**\n * accelerating from zero velocity\n *\n * @param t - Time.\n *\n * @returns Value at time t.\n */\n easeInQuint: function easeInQuint(t) {\n return t * t * t * t * t;\n },\n\n /**\n * decelerating to zero velocity\n *\n * @param t - Time.\n *\n * @returns Value at time t.\n */\n easeOutQuint: function easeOutQuint(t) {\n return 1 + --t * t * t * t * t;\n },\n\n /**\n * acceleration until halfway, then deceleration\n *\n * @param t - Time.\n *\n * @returns Value at time t.\n */\n easeInOutQuint: function easeInOutQuint(t) {\n return t < 0.5 ? 16 * t * t * t * t * t : 1 + 16 * --t * t * t * t * t;\n }\n};\n/**\n * Experimentaly compute the width of the scrollbar for this browser.\n *\n * @returns The width in pixels.\n */\n\nfunction getScrollBarWidth() {\n var inner = document.createElement(\"p\");\n inner.style.width = \"100%\";\n inner.style.height = \"200px\";\n var outer = document.createElement(\"div\");\n outer.style.position = \"absolute\";\n outer.style.top = \"0px\";\n outer.style.left = \"0px\";\n outer.style.visibility = \"hidden\";\n outer.style.width = \"200px\";\n outer.style.height = \"150px\";\n outer.style.overflow = \"hidden\";\n outer.appendChild(inner);\n document.body.appendChild(outer);\n var w1 = inner.offsetWidth;\n outer.style.overflow = \"scroll\";\n var w2 = inner.offsetWidth;\n\n if (w1 == w2) {\n w2 = outer.clientWidth;\n }\n\n document.body.removeChild(outer);\n return w1 - w2;\n} // @TODO: This doesn't work properly.\n// It works only for single property objects,\n// otherwise it combines all of the types in a union.\n// export function topMost (\n// pile: Record[],\n// accessors: K1 | [K1]\n// ): undefined | V1\n// export function topMost (\n// pile: Record>[],\n// accessors: [K1, K2]\n// ): undefined | V1 | V2\n// export function topMost (\n// pile: Record>>[],\n// accessors: [K1, K2, K3]\n// ): undefined | V1 | V2 | V3\n\n/**\n * Get the top most property value from a pile of objects.\n *\n * @param pile - Array of objects, no required format.\n * @param accessors - Array of property names (e.g. object['foo']['bar'] → ['foo', 'bar']).\n *\n * @returns Value of the property with given accessors path from the first pile item where it's not undefined.\n */\n\nfunction topMost(pile, accessors) {\n var candidate;\n\n if (!Array.isArray(accessors)) {\n accessors = [accessors];\n }\n\n var _iteratorNormalCompletion = true;\n var _didIteratorError = false;\n var _iteratorError = undefined;\n\n try {\n for (var _iterator = pile[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var member = _step.value;\n\n if (member) {\n candidate = member[accessors[0]];\n\n for (var i = 1; i < accessors.length; i++) {\n if (candidate) {\n candidate = candidate[accessors[i]];\n }\n }\n\n if (typeof candidate !== \"undefined\") {\n break;\n }\n }\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return != null) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n\n return candidate;\n}\n\nvar util = /*#__PURE__*/Object.freeze({\n\tisNumber: isNumber,\n\trecursiveDOMDelete: recursiveDOMDelete,\n\tisString: isString,\n\tisObject: isObject,\n\tisDate: isDate,\n\tisMoment: isMoment,\n\tfillIfDefined: fillIfDefined,\n\textend: extend,\n\tselectiveExtend: selectiveExtend,\n\tselectiveDeepExtend: selectiveDeepExtend,\n\tselectiveNotDeepExtend: selectiveNotDeepExtend,\n\tdeepExtend: deepExtend,\n\tequalArray: equalArray,\n\tconvert: convert,\n\tgetType: getType,\n\tcopyAndExtendArray: copyAndExtendArray,\n\tcopyArray: copyArray,\n\tgetAbsoluteLeft: getAbsoluteLeft,\n\tgetAbsoluteRight: getAbsoluteRight,\n\tgetAbsoluteTop: getAbsoluteTop,\n\taddClassName: addClassName,\n\tremoveClassName: removeClassName,\n\tforEach: forEach,\n\ttoArray: toArray,\n\tupdateProperty: updateProperty,\n\tthrottle: throttle,\n\taddEventListener: addEventListener,\n\tremoveEventListener: removeEventListener,\n\tpreventDefault: preventDefault,\n\tgetTarget: getTarget,\n\thasParent: hasParent,\n\toption: option,\n\thexToRGB: hexToRGB,\n\toverrideOpacity: overrideOpacity,\n\tRGBToHex: RGBToHex,\n\tparseColor: parseColor,\n\tRGBToHSV: RGBToHSV,\n\taddCssText: addCssText,\n\tremoveCssText: removeCssText,\n\tHSVToRGB: HSVToRGB,\n\tHSVToHex: HSVToHex,\n\thexToHSV: hexToHSV,\n\tisValidHex: isValidHex,\n\tisValidRGB: isValidRGB,\n\tisValidRGBA: isValidRGBA,\n\tselectiveBridgeObject: selectiveBridgeObject,\n\tbridgeObject: bridgeObject,\n\tinsertSort: insertSort,\n\tmergeOptions: mergeOptions,\n\tbinarySearchCustom: binarySearchCustom,\n\tbinarySearchValue: binarySearchValue,\n\teasingFunctions: easingFunctions,\n\tgetScrollBarWidth: getScrollBarWidth,\n\ttopMost: topMost,\n\trandomUUID: uuid4\n});\n\n// New API (tree shakeable).\n\nexport default util;\nexport { HSVToHex, HSVToRGB, RGBToHSV, RGBToHex, addClassName, addCssText, addEventListener, binarySearchCustom, binarySearchValue, bridgeObject, convert, copyAndExtendArray, copyArray, deepExtend, easingFunctions, equalArray, extend, fillIfDefined, forEach, getAbsoluteLeft, getAbsoluteRight, getAbsoluteTop, getScrollBarWidth, getTarget, getType, hasParent, hexToHSV, hexToRGB, insertSort, isDate, isMoment, isNumber, isObject, isString, isValidHex, isValidRGB, isValidRGBA, mergeOptions, option, overrideOpacity, parseColor, preventDefault, uuid4 as randomUUID, recursiveDOMDelete, removeClassName, removeCssText, removeEventListener, selectiveBridgeObject, selectiveDeepExtend, selectiveExtend, selectiveNotDeepExtend, throttle, toArray, topMost, updateProperty };\n","/** \n * vis-data - data\n * http://visjs.org/\n * \n * Manage unstructured data using DataSet. Add, update, and remove data, and listen for changes in the data.\n * \n * @version 6.1.0\n * @date 2019-07-16T13:37:00Z\n * \n * @copyright (c) 2011-2017 Almende B.V, http://almende.com\n * @copyright (c) 2018-2019 visjs contributors, https://github.com/visjs\n * \n * @license \n * vis.js is dual licensed under both\n * \n * 1. The Apache 2.0 License\n * http://www.apache.org/licenses/LICENSE-2.0\n * \n * and\n * \n * 2. The MIT License\n * http://opensource.org/licenses/MIT\n * \n * vis.js may be distributed under either license.\n */\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nvar defineProperty = _defineProperty;\n\nfunction createCommonjsModule(fn, module) {\n\treturn module = { exports: {} }, fn(module, module.exports), module.exports;\n}\n\nvar _typeof_1 = createCommonjsModule(function (module) {\n function _typeof2(obj) {\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof2 = function _typeof2(obj) {\n return typeof obj;\n };\n } else {\n _typeof2 = function _typeof2(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof2(obj);\n }\n\n function _typeof(obj) {\n if (typeof Symbol === \"function\" && _typeof2(Symbol.iterator) === \"symbol\") {\n module.exports = _typeof = function _typeof(obj) {\n return _typeof2(obj);\n };\n } else {\n module.exports = _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : _typeof2(obj);\n };\n }\n\n return _typeof(obj);\n }\n\n module.exports = _typeof;\n});\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nvar classCallCheck = _classCallCheck;\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nvar createClass = _createClass;\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nvar assertThisInitialized = _assertThisInitialized;\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof_1(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return assertThisInitialized(self);\n}\n\nvar possibleConstructorReturn = _possibleConstructorReturn;\n\nvar getPrototypeOf = createCommonjsModule(function (module) {\n function _getPrototypeOf(o) {\n module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n }\n\n module.exports = _getPrototypeOf;\n});\n\nvar setPrototypeOf = createCommonjsModule(function (module) {\n function _setPrototypeOf(o, p) {\n module.exports = _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n }\n\n module.exports = _setPrototypeOf;\n});\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) setPrototypeOf(subClass, superClass);\n}\n\nvar inherits = _inherits;\n\n// Maps for number <-> hex string conversion\nvar byteToHex = [];\n\nfor (var i = 0; i < 256; i++) {\n byteToHex[i] = (i + 0x100).toString(16).substr(1);\n}\n/**\n * Represent binary UUID into it's string representation.\n *\n * @param buf - Buffer containing UUID bytes.\n * @param offset - Offset from the start of the buffer where the UUID is saved (not needed if the buffer starts with the UUID).\n *\n * @returns String representation of the UUID.\n */\n\n\nfunction stringifyUUID(buf, offset) {\n var i = offset || 0;\n var bth = byteToHex;\n return bth[buf[i++]] + bth[buf[i++]] + bth[buf[i++]] + bth[buf[i++]] + '-' + bth[buf[i++]] + bth[buf[i++]] + '-' + bth[buf[i++]] + bth[buf[i++]] + '-' + bth[buf[i++]] + bth[buf[i++]] + '-' + bth[buf[i++]] + bth[buf[i++]] + bth[buf[i++]] + bth[buf[i++]] + bth[buf[i++]] + bth[buf[i++]];\n}\n/**\n * Generate 16 random bytes to be used as a base for UUID.\n *\n * @ignore\n */\n\n\nvar random = function () {\n if (typeof crypto !== 'undefined' && crypto.getRandomValues) {\n // WHATWG crypto-based RNG - http://wiki.whatwg.org/wiki/Crypto\n // Moderately fast, high quality\n var _rnds8 = new Uint8Array(16);\n\n return function whatwgRNG() {\n crypto.getRandomValues(_rnds8);\n return _rnds8;\n };\n } // Math.random()-based (RNG)\n //\n // If all else fails, use Math.random().\n // It's fast, but is of unspecified quality.\n\n\n var _rnds = new Array(16);\n\n return function () {\n for (var i = 0, r; i < 16; i++) {\n if ((i & 0x03) === 0) {\n r = Math.random() * 0x100000000;\n }\n\n _rnds[i] = r >>> ((i & 0x03) << 3) & 0xff;\n }\n\n return _rnds;\n }; // uuid.js\n //\n // Copyright (c) 2010-2012 Robert Kieffer\n // MIT License - http://opensource.org/licenses/mit-license.php\n // Unique ID creation requires a high quality random # generator. We feature\n // detect to determine the best RNG source, normalizing to a function that\n // returns 128-bits of randomness, since that's what's usually required\n // return require('./rng');\n}();\n\nvar byteToHex$1 = [];\n\nfor (var i$1 = 0; i$1 < 256; i$1++) {\n byteToHex$1[i$1] = (i$1 + 0x100).toString(16).substr(1);\n} // **`v1()` - Generate time-based UUID**\n//\n// Inspired by https://github.com/LiosK/UUID.js\n// and http://docs.python.org/library/uuid.html\n// random #'s we need to init node and clockseq\n\n\nvar seedBytes = random(); // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)\n\nvar defaultNodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]]; // Per 4.2.2, randomize (14 bit) clockseq\n\nvar defaultClockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff; // Previous uuid creation time\n/**\n * UUIDv4 options.\n */\n\n/**\n * Generate UUIDv4\n *\n * @param options - Options to be used instead of default generated values.\n * String 'binary' is a shorthand for uuid4({}, new Array(16)).\n * @param buf - If present the buffer will be filled with the generated UUID.\n * @param offset - Offset of the UUID from the start of the buffer.\n *\n * @returns UUIDv4\n */\n\n\nfunction uuid4() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var buf = arguments.length > 1 ? arguments[1] : undefined;\n var offset = arguments.length > 2 ? arguments[2] : undefined; // Deprecated - 'format' argument, as supported in v1.2\n\n var i = buf && offset || 0;\n\n if (typeof options === 'string') {\n buf = options === 'binary' ? new Array(16) : undefined;\n options = {};\n }\n\n var rnds = options.random || (options.rng || random)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n for (var ii = 0; ii < 16; ii++) {\n buf[i + ii] = rnds[ii];\n }\n }\n\n return buf || stringifyUUID(rnds);\n} // Rollup will complain about mixing default and named exports in UMD build,\n\nfunction _typeof(obj) {\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function (obj) {\n return typeof obj;\n };\n } else {\n _typeof = function (obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nvar commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};\n\nfunction commonjsRequire() {\n throw new Error('Dynamic requires are not currently supported by rollup-plugin-commonjs');\n}\n\nfunction createCommonjsModule$1(fn, module) {\n return module = {\n exports: {}\n }, fn(module, module.exports), module.exports;\n}\n\nvar moment = createCommonjsModule$1(function (module, exports) {\n (function (global, factory) {\n module.exports = factory();\n })(commonjsGlobal, function () {\n var hookCallback;\n\n function hooks() {\n return hookCallback.apply(null, arguments);\n } // This is done to register the method called with moment()\n // without creating circular dependencies.\n\n\n function setHookCallback(callback) {\n hookCallback = callback;\n }\n\n function isArray(input) {\n return input instanceof Array || Object.prototype.toString.call(input) === '[object Array]';\n }\n\n function isObject(input) {\n // IE8 will treat undefined and null as object if it wasn't for\n // input != null\n return input != null && Object.prototype.toString.call(input) === '[object Object]';\n }\n\n function isObjectEmpty(obj) {\n if (Object.getOwnPropertyNames) {\n return Object.getOwnPropertyNames(obj).length === 0;\n } else {\n var k;\n\n for (k in obj) {\n if (obj.hasOwnProperty(k)) {\n return false;\n }\n }\n\n return true;\n }\n }\n\n function isUndefined(input) {\n return input === void 0;\n }\n\n function isNumber(input) {\n return typeof input === 'number' || Object.prototype.toString.call(input) === '[object Number]';\n }\n\n function isDate(input) {\n return input instanceof Date || Object.prototype.toString.call(input) === '[object Date]';\n }\n\n function map(arr, fn) {\n var res = [],\n i;\n\n for (i = 0; i < arr.length; ++i) {\n res.push(fn(arr[i], i));\n }\n\n return res;\n }\n\n function hasOwnProp(a, b) {\n return Object.prototype.hasOwnProperty.call(a, b);\n }\n\n function extend(a, b) {\n for (var i in b) {\n if (hasOwnProp(b, i)) {\n a[i] = b[i];\n }\n }\n\n if (hasOwnProp(b, 'toString')) {\n a.toString = b.toString;\n }\n\n if (hasOwnProp(b, 'valueOf')) {\n a.valueOf = b.valueOf;\n }\n\n return a;\n }\n\n function createUTC(input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, true).utc();\n }\n\n function defaultParsingFlags() {\n // We need to deep clone this object.\n return {\n empty: false,\n unusedTokens: [],\n unusedInput: [],\n overflow: -2,\n charsLeftOver: 0,\n nullInput: false,\n invalidMonth: null,\n invalidFormat: false,\n userInvalidated: false,\n iso: false,\n parsedDateParts: [],\n meridiem: null,\n rfc2822: false,\n weekdayMismatch: false\n };\n }\n\n function getParsingFlags(m) {\n if (m._pf == null) {\n m._pf = defaultParsingFlags();\n }\n\n return m._pf;\n }\n\n var some;\n\n if (Array.prototype.some) {\n some = Array.prototype.some;\n } else {\n some = function (fun) {\n var t = Object(this);\n var len = t.length >>> 0;\n\n for (var i = 0; i < len; i++) {\n if (i in t && fun.call(this, t[i], i, t)) {\n return true;\n }\n }\n\n return false;\n };\n }\n\n function isValid(m) {\n if (m._isValid == null) {\n var flags = getParsingFlags(m);\n var parsedParts = some.call(flags.parsedDateParts, function (i) {\n return i != null;\n });\n var isNowValid = !isNaN(m._d.getTime()) && flags.overflow < 0 && !flags.empty && !flags.invalidMonth && !flags.invalidWeekday && !flags.weekdayMismatch && !flags.nullInput && !flags.invalidFormat && !flags.userInvalidated && (!flags.meridiem || flags.meridiem && parsedParts);\n\n if (m._strict) {\n isNowValid = isNowValid && flags.charsLeftOver === 0 && flags.unusedTokens.length === 0 && flags.bigHour === undefined;\n }\n\n if (Object.isFrozen == null || !Object.isFrozen(m)) {\n m._isValid = isNowValid;\n } else {\n return isNowValid;\n }\n }\n\n return m._isValid;\n }\n\n function createInvalid(flags) {\n var m = createUTC(NaN);\n\n if (flags != null) {\n extend(getParsingFlags(m), flags);\n } else {\n getParsingFlags(m).userInvalidated = true;\n }\n\n return m;\n } // Plugins that add properties should also add the key here (null value),\n // so we can properly clone ourselves.\n\n\n var momentProperties = hooks.momentProperties = [];\n\n function copyConfig(to, from) {\n var i, prop, val;\n\n if (!isUndefined(from._isAMomentObject)) {\n to._isAMomentObject = from._isAMomentObject;\n }\n\n if (!isUndefined(from._i)) {\n to._i = from._i;\n }\n\n if (!isUndefined(from._f)) {\n to._f = from._f;\n }\n\n if (!isUndefined(from._l)) {\n to._l = from._l;\n }\n\n if (!isUndefined(from._strict)) {\n to._strict = from._strict;\n }\n\n if (!isUndefined(from._tzm)) {\n to._tzm = from._tzm;\n }\n\n if (!isUndefined(from._isUTC)) {\n to._isUTC = from._isUTC;\n }\n\n if (!isUndefined(from._offset)) {\n to._offset = from._offset;\n }\n\n if (!isUndefined(from._pf)) {\n to._pf = getParsingFlags(from);\n }\n\n if (!isUndefined(from._locale)) {\n to._locale = from._locale;\n }\n\n if (momentProperties.length > 0) {\n for (i = 0; i < momentProperties.length; i++) {\n prop = momentProperties[i];\n val = from[prop];\n\n if (!isUndefined(val)) {\n to[prop] = val;\n }\n }\n }\n\n return to;\n }\n\n var updateInProgress = false; // Moment prototype object\n\n function Moment(config) {\n copyConfig(this, config);\n this._d = new Date(config._d != null ? config._d.getTime() : NaN);\n\n if (!this.isValid()) {\n this._d = new Date(NaN);\n } // Prevent infinite loop in case updateOffset creates new moment\n // objects.\n\n\n if (updateInProgress === false) {\n updateInProgress = true;\n hooks.updateOffset(this);\n updateInProgress = false;\n }\n }\n\n function isMoment(obj) {\n return obj instanceof Moment || obj != null && obj._isAMomentObject != null;\n }\n\n function absFloor(number) {\n if (number < 0) {\n // -0 -> 0\n return Math.ceil(number) || 0;\n } else {\n return Math.floor(number);\n }\n }\n\n function toInt(argumentForCoercion) {\n var coercedNumber = +argumentForCoercion,\n value = 0;\n\n if (coercedNumber !== 0 && isFinite(coercedNumber)) {\n value = absFloor(coercedNumber);\n }\n\n return value;\n } // compare two arrays, return the number of differences\n\n\n function compareArrays(array1, array2, dontConvert) {\n var len = Math.min(array1.length, array2.length),\n lengthDiff = Math.abs(array1.length - array2.length),\n diffs = 0,\n i;\n\n for (i = 0; i < len; i++) {\n if (dontConvert && array1[i] !== array2[i] || !dontConvert && toInt(array1[i]) !== toInt(array2[i])) {\n diffs++;\n }\n }\n\n return diffs + lengthDiff;\n }\n\n function warn(msg) {\n if (hooks.suppressDeprecationWarnings === false && typeof console !== 'undefined' && console.warn) {\n console.warn('Deprecation warning: ' + msg);\n }\n }\n\n function deprecate(msg, fn) {\n var firstTime = true;\n return extend(function () {\n if (hooks.deprecationHandler != null) {\n hooks.deprecationHandler(null, msg);\n }\n\n if (firstTime) {\n var args = [];\n var arg;\n\n for (var i = 0; i < arguments.length; i++) {\n arg = '';\n\n if (typeof arguments[i] === 'object') {\n arg += '\\n[' + i + '] ';\n\n for (var key in arguments[0]) {\n arg += key + ': ' + arguments[0][key] + ', ';\n }\n\n arg = arg.slice(0, -2); // Remove trailing comma and space\n } else {\n arg = arguments[i];\n }\n\n args.push(arg);\n }\n\n warn(msg + '\\nArguments: ' + Array.prototype.slice.call(args).join('') + '\\n' + new Error().stack);\n firstTime = false;\n }\n\n return fn.apply(this, arguments);\n }, fn);\n }\n\n var deprecations = {};\n\n function deprecateSimple(name, msg) {\n if (hooks.deprecationHandler != null) {\n hooks.deprecationHandler(name, msg);\n }\n\n if (!deprecations[name]) {\n warn(msg);\n deprecations[name] = true;\n }\n }\n\n hooks.suppressDeprecationWarnings = false;\n hooks.deprecationHandler = null;\n\n function isFunction(input) {\n return input instanceof Function || Object.prototype.toString.call(input) === '[object Function]';\n }\n\n function set(config) {\n var prop, i;\n\n for (i in config) {\n prop = config[i];\n\n if (isFunction(prop)) {\n this[i] = prop;\n } else {\n this['_' + i] = prop;\n }\n }\n\n this._config = config; // Lenient ordinal parsing accepts just a number in addition to\n // number + (possibly) stuff coming from _dayOfMonthOrdinalParse.\n // TODO: Remove \"ordinalParse\" fallback in next major release.\n\n this._dayOfMonthOrdinalParseLenient = new RegExp((this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) + '|' + /\\d{1,2}/.source);\n }\n\n function mergeConfigs(parentConfig, childConfig) {\n var res = extend({}, parentConfig),\n prop;\n\n for (prop in childConfig) {\n if (hasOwnProp(childConfig, prop)) {\n if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) {\n res[prop] = {};\n extend(res[prop], parentConfig[prop]);\n extend(res[prop], childConfig[prop]);\n } else if (childConfig[prop] != null) {\n res[prop] = childConfig[prop];\n } else {\n delete res[prop];\n }\n }\n }\n\n for (prop in parentConfig) {\n if (hasOwnProp(parentConfig, prop) && !hasOwnProp(childConfig, prop) && isObject(parentConfig[prop])) {\n // make sure changes to properties don't modify parent config\n res[prop] = extend({}, res[prop]);\n }\n }\n\n return res;\n }\n\n function Locale(config) {\n if (config != null) {\n this.set(config);\n }\n }\n\n var keys;\n\n if (Object.keys) {\n keys = Object.keys;\n } else {\n keys = function (obj) {\n var i,\n res = [];\n\n for (i in obj) {\n if (hasOwnProp(obj, i)) {\n res.push(i);\n }\n }\n\n return res;\n };\n }\n\n var defaultCalendar = {\n sameDay: '[Today at] LT',\n nextDay: '[Tomorrow at] LT',\n nextWeek: 'dddd [at] LT',\n lastDay: '[Yesterday at] LT',\n lastWeek: '[Last] dddd [at] LT',\n sameElse: 'L'\n };\n\n function calendar(key, mom, now) {\n var output = this._calendar[key] || this._calendar['sameElse'];\n return isFunction(output) ? output.call(mom, now) : output;\n }\n\n var defaultLongDateFormat = {\n LTS: 'h:mm:ss A',\n LT: 'h:mm A',\n L: 'MM/DD/YYYY',\n LL: 'MMMM D, YYYY',\n LLL: 'MMMM D, YYYY h:mm A',\n LLLL: 'dddd, MMMM D, YYYY h:mm A'\n };\n\n function longDateFormat(key) {\n var format = this._longDateFormat[key],\n formatUpper = this._longDateFormat[key.toUpperCase()];\n\n if (format || !formatUpper) {\n return format;\n }\n\n this._longDateFormat[key] = formatUpper.replace(/MMMM|MM|DD|dddd/g, function (val) {\n return val.slice(1);\n });\n return this._longDateFormat[key];\n }\n\n var defaultInvalidDate = 'Invalid date';\n\n function invalidDate() {\n return this._invalidDate;\n }\n\n var defaultOrdinal = '%d';\n var defaultDayOfMonthOrdinalParse = /\\d{1,2}/;\n\n function ordinal(number) {\n return this._ordinal.replace('%d', number);\n }\n\n var defaultRelativeTime = {\n future: 'in %s',\n past: '%s ago',\n s: 'a few seconds',\n ss: '%d seconds',\n m: 'a minute',\n mm: '%d minutes',\n h: 'an hour',\n hh: '%d hours',\n d: 'a day',\n dd: '%d days',\n M: 'a month',\n MM: '%d months',\n y: 'a year',\n yy: '%d years'\n };\n\n function relativeTime(number, withoutSuffix, string, isFuture) {\n var output = this._relativeTime[string];\n return isFunction(output) ? output(number, withoutSuffix, string, isFuture) : output.replace(/%d/i, number);\n }\n\n function pastFuture(diff, output) {\n var format = this._relativeTime[diff > 0 ? 'future' : 'past'];\n return isFunction(format) ? format(output) : format.replace(/%s/i, output);\n }\n\n var aliases = {};\n\n function addUnitAlias(unit, shorthand) {\n var lowerCase = unit.toLowerCase();\n aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit;\n }\n\n function normalizeUnits(units) {\n return typeof units === 'string' ? aliases[units] || aliases[units.toLowerCase()] : undefined;\n }\n\n function normalizeObjectUnits(inputObject) {\n var normalizedInput = {},\n normalizedProp,\n prop;\n\n for (prop in inputObject) {\n if (hasOwnProp(inputObject, prop)) {\n normalizedProp = normalizeUnits(prop);\n\n if (normalizedProp) {\n normalizedInput[normalizedProp] = inputObject[prop];\n }\n }\n }\n\n return normalizedInput;\n }\n\n var priorities = {};\n\n function addUnitPriority(unit, priority) {\n priorities[unit] = priority;\n }\n\n function getPrioritizedUnits(unitsObj) {\n var units = [];\n\n for (var u in unitsObj) {\n units.push({\n unit: u,\n priority: priorities[u]\n });\n }\n\n units.sort(function (a, b) {\n return a.priority - b.priority;\n });\n return units;\n }\n\n function zeroFill(number, targetLength, forceSign) {\n var absNumber = '' + Math.abs(number),\n zerosToFill = targetLength - absNumber.length,\n sign = number >= 0;\n return (sign ? forceSign ? '+' : '' : '-') + Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) + absNumber;\n }\n\n var formattingTokens = /(\\[[^\\[]*\\])|(\\\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g;\n var localFormattingTokens = /(\\[[^\\[]*\\])|(\\\\)?(LTS|LT|LL?L?L?|l{1,4})/g;\n var formatFunctions = {};\n var formatTokenFunctions = {}; // token: 'M'\n // padded: ['MM', 2]\n // ordinal: 'Mo'\n // callback: function () { this.month() + 1 }\n\n function addFormatToken(token, padded, ordinal, callback) {\n var func = callback;\n\n if (typeof callback === 'string') {\n func = function () {\n return this[callback]();\n };\n }\n\n if (token) {\n formatTokenFunctions[token] = func;\n }\n\n if (padded) {\n formatTokenFunctions[padded[0]] = function () {\n return zeroFill(func.apply(this, arguments), padded[1], padded[2]);\n };\n }\n\n if (ordinal) {\n formatTokenFunctions[ordinal] = function () {\n return this.localeData().ordinal(func.apply(this, arguments), token);\n };\n }\n }\n\n function removeFormattingTokens(input) {\n if (input.match(/\\[[\\s\\S]/)) {\n return input.replace(/^\\[|\\]$/g, '');\n }\n\n return input.replace(/\\\\/g, '');\n }\n\n function makeFormatFunction(format) {\n var array = format.match(formattingTokens),\n i,\n length;\n\n for (i = 0, length = array.length; i < length; i++) {\n if (formatTokenFunctions[array[i]]) {\n array[i] = formatTokenFunctions[array[i]];\n } else {\n array[i] = removeFormattingTokens(array[i]);\n }\n }\n\n return function (mom) {\n var output = '',\n i;\n\n for (i = 0; i < length; i++) {\n output += isFunction(array[i]) ? array[i].call(mom, format) : array[i];\n }\n\n return output;\n };\n } // format date using native date object\n\n\n function formatMoment(m, format) {\n if (!m.isValid()) {\n return m.localeData().invalidDate();\n }\n\n format = expandFormat(format, m.localeData());\n formatFunctions[format] = formatFunctions[format] || makeFormatFunction(format);\n return formatFunctions[format](m);\n }\n\n function expandFormat(format, locale) {\n var i = 5;\n\n function replaceLongDateFormatTokens(input) {\n return locale.longDateFormat(input) || input;\n }\n\n localFormattingTokens.lastIndex = 0;\n\n while (i >= 0 && localFormattingTokens.test(format)) {\n format = format.replace(localFormattingTokens, replaceLongDateFormatTokens);\n localFormattingTokens.lastIndex = 0;\n i -= 1;\n }\n\n return format;\n }\n\n var match1 = /\\d/; // 0 - 9\n\n var match2 = /\\d\\d/; // 00 - 99\n\n var match3 = /\\d{3}/; // 000 - 999\n\n var match4 = /\\d{4}/; // 0000 - 9999\n\n var match6 = /[+-]?\\d{6}/; // -999999 - 999999\n\n var match1to2 = /\\d\\d?/; // 0 - 99\n\n var match3to4 = /\\d\\d\\d\\d?/; // 999 - 9999\n\n var match5to6 = /\\d\\d\\d\\d\\d\\d?/; // 99999 - 999999\n\n var match1to3 = /\\d{1,3}/; // 0 - 999\n\n var match1to4 = /\\d{1,4}/; // 0 - 9999\n\n var match1to6 = /[+-]?\\d{1,6}/; // -999999 - 999999\n\n var matchUnsigned = /\\d+/; // 0 - inf\n\n var matchSigned = /[+-]?\\d+/; // -inf - inf\n\n var matchOffset = /Z|[+-]\\d\\d:?\\d\\d/gi; // +00:00 -00:00 +0000 -0000 or Z\n\n var matchShortOffset = /Z|[+-]\\d\\d(?::?\\d\\d)?/gi; // +00 -00 +00:00 -00:00 +0000 -0000 or Z\n\n var matchTimestamp = /[+-]?\\d+(\\.\\d{1,3})?/; // 123456789 123456789.123\n // any word (or two) characters or numbers including two/three word month in arabic.\n // includes scottish gaelic two word and hyphenated months\n\n var matchWord = /[0-9]{0,256}['a-z\\u00A0-\\u05FF\\u0700-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFF07\\uFF10-\\uFFEF]{1,256}|[\\u0600-\\u06FF\\/]{1,256}(\\s*?[\\u0600-\\u06FF]{1,256}){1,2}/i;\n var regexes = {};\n\n function addRegexToken(token, regex, strictRegex) {\n regexes[token] = isFunction(regex) ? regex : function (isStrict, localeData) {\n return isStrict && strictRegex ? strictRegex : regex;\n };\n }\n\n function getParseRegexForToken(token, config) {\n if (!hasOwnProp(regexes, token)) {\n return new RegExp(unescapeFormat(token));\n }\n\n return regexes[token](config._strict, config._locale);\n } // Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript\n\n\n function unescapeFormat(s) {\n return regexEscape(s.replace('\\\\', '').replace(/\\\\(\\[)|\\\\(\\])|\\[([^\\]\\[]*)\\]|\\\\(.)/g, function (matched, p1, p2, p3, p4) {\n return p1 || p2 || p3 || p4;\n }));\n }\n\n function regexEscape(s) {\n return s.replace(/[-\\/\\\\^$*+?.()|[\\]{}]/g, '\\\\$&');\n }\n\n var tokens = {};\n\n function addParseToken(token, callback) {\n var i,\n func = callback;\n\n if (typeof token === 'string') {\n token = [token];\n }\n\n if (isNumber(callback)) {\n func = function (input, array) {\n array[callback] = toInt(input);\n };\n }\n\n for (i = 0; i < token.length; i++) {\n tokens[token[i]] = func;\n }\n }\n\n function addWeekParseToken(token, callback) {\n addParseToken(token, function (input, array, config, token) {\n config._w = config._w || {};\n callback(input, config._w, config, token);\n });\n }\n\n function addTimeToArrayFromToken(token, input, config) {\n if (input != null && hasOwnProp(tokens, token)) {\n tokens[token](input, config._a, config, token);\n }\n }\n\n var YEAR = 0;\n var MONTH = 1;\n var DATE = 2;\n var HOUR = 3;\n var MINUTE = 4;\n var SECOND = 5;\n var MILLISECOND = 6;\n var WEEK = 7;\n var WEEKDAY = 8; // FORMATTING\n\n addFormatToken('Y', 0, 0, function () {\n var y = this.year();\n return y <= 9999 ? '' + y : '+' + y;\n });\n addFormatToken(0, ['YY', 2], 0, function () {\n return this.year() % 100;\n });\n addFormatToken(0, ['YYYY', 4], 0, 'year');\n addFormatToken(0, ['YYYYY', 5], 0, 'year');\n addFormatToken(0, ['YYYYYY', 6, true], 0, 'year'); // ALIASES\n\n addUnitAlias('year', 'y'); // PRIORITIES\n\n addUnitPriority('year', 1); // PARSING\n\n addRegexToken('Y', matchSigned);\n addRegexToken('YY', match1to2, match2);\n addRegexToken('YYYY', match1to4, match4);\n addRegexToken('YYYYY', match1to6, match6);\n addRegexToken('YYYYYY', match1to6, match6);\n addParseToken(['YYYYY', 'YYYYYY'], YEAR);\n addParseToken('YYYY', function (input, array) {\n array[YEAR] = input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input);\n });\n addParseToken('YY', function (input, array) {\n array[YEAR] = hooks.parseTwoDigitYear(input);\n });\n addParseToken('Y', function (input, array) {\n array[YEAR] = parseInt(input, 10);\n }); // HELPERS\n\n function daysInYear(year) {\n return isLeapYear(year) ? 366 : 365;\n }\n\n function isLeapYear(year) {\n return year % 4 === 0 && year % 100 !== 0 || year % 400 === 0;\n } // HOOKS\n\n\n hooks.parseTwoDigitYear = function (input) {\n return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);\n }; // MOMENTS\n\n\n var getSetYear = makeGetSet('FullYear', true);\n\n function getIsLeapYear() {\n return isLeapYear(this.year());\n }\n\n function makeGetSet(unit, keepTime) {\n return function (value) {\n if (value != null) {\n set$1(this, unit, value);\n hooks.updateOffset(this, keepTime);\n return this;\n } else {\n return get(this, unit);\n }\n };\n }\n\n function get(mom, unit) {\n return mom.isValid() ? mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]() : NaN;\n }\n\n function set$1(mom, unit, value) {\n if (mom.isValid() && !isNaN(value)) {\n if (unit === 'FullYear' && isLeapYear(mom.year()) && mom.month() === 1 && mom.date() === 29) {\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value, mom.month(), daysInMonth(value, mom.month()));\n } else {\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value);\n }\n }\n } // MOMENTS\n\n\n function stringGet(units) {\n units = normalizeUnits(units);\n\n if (isFunction(this[units])) {\n return this[units]();\n }\n\n return this;\n }\n\n function stringSet(units, value) {\n if (typeof units === 'object') {\n units = normalizeObjectUnits(units);\n var prioritized = getPrioritizedUnits(units);\n\n for (var i = 0; i < prioritized.length; i++) {\n this[prioritized[i].unit](units[prioritized[i].unit]);\n }\n } else {\n units = normalizeUnits(units);\n\n if (isFunction(this[units])) {\n return this[units](value);\n }\n }\n\n return this;\n }\n\n function mod(n, x) {\n return (n % x + x) % x;\n }\n\n var indexOf;\n\n if (Array.prototype.indexOf) {\n indexOf = Array.prototype.indexOf;\n } else {\n indexOf = function (o) {\n // I know\n var i;\n\n for (i = 0; i < this.length; ++i) {\n if (this[i] === o) {\n return i;\n }\n }\n\n return -1;\n };\n }\n\n function daysInMonth(year, month) {\n if (isNaN(year) || isNaN(month)) {\n return NaN;\n }\n\n var modMonth = mod(month, 12);\n year += (month - modMonth) / 12;\n return modMonth === 1 ? isLeapYear(year) ? 29 : 28 : 31 - modMonth % 7 % 2;\n } // FORMATTING\n\n\n addFormatToken('M', ['MM', 2], 'Mo', function () {\n return this.month() + 1;\n });\n addFormatToken('MMM', 0, 0, function (format) {\n return this.localeData().monthsShort(this, format);\n });\n addFormatToken('MMMM', 0, 0, function (format) {\n return this.localeData().months(this, format);\n }); // ALIASES\n\n addUnitAlias('month', 'M'); // PRIORITY\n\n addUnitPriority('month', 8); // PARSING\n\n addRegexToken('M', match1to2);\n addRegexToken('MM', match1to2, match2);\n addRegexToken('MMM', function (isStrict, locale) {\n return locale.monthsShortRegex(isStrict);\n });\n addRegexToken('MMMM', function (isStrict, locale) {\n return locale.monthsRegex(isStrict);\n });\n addParseToken(['M', 'MM'], function (input, array) {\n array[MONTH] = toInt(input) - 1;\n });\n addParseToken(['MMM', 'MMMM'], function (input, array, config, token) {\n var month = config._locale.monthsParse(input, token, config._strict); // if we didn't find a month name, mark the date as invalid.\n\n\n if (month != null) {\n array[MONTH] = month;\n } else {\n getParsingFlags(config).invalidMonth = input;\n }\n }); // LOCALES\n\n var MONTHS_IN_FORMAT = /D[oD]?(\\[[^\\[\\]]*\\]|\\s)+MMMM?/;\n var defaultLocaleMonths = 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_');\n\n function localeMonths(m, format) {\n if (!m) {\n return isArray(this._months) ? this._months : this._months['standalone'];\n }\n\n return isArray(this._months) ? this._months[m.month()] : this._months[(this._months.isFormat || MONTHS_IN_FORMAT).test(format) ? 'format' : 'standalone'][m.month()];\n }\n\n var defaultLocaleMonthsShort = 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_');\n\n function localeMonthsShort(m, format) {\n if (!m) {\n return isArray(this._monthsShort) ? this._monthsShort : this._monthsShort['standalone'];\n }\n\n return isArray(this._monthsShort) ? this._monthsShort[m.month()] : this._monthsShort[MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'][m.month()];\n }\n\n function handleStrictParse(monthName, format, strict) {\n var i,\n ii,\n mom,\n llc = monthName.toLocaleLowerCase();\n\n if (!this._monthsParse) {\n // this is not used\n this._monthsParse = [];\n this._longMonthsParse = [];\n this._shortMonthsParse = [];\n\n for (i = 0; i < 12; ++i) {\n mom = createUTC([2000, i]);\n this._shortMonthsParse[i] = this.monthsShort(mom, '').toLocaleLowerCase();\n this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase();\n }\n }\n\n if (strict) {\n if (format === 'MMM') {\n ii = indexOf.call(this._shortMonthsParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._longMonthsParse, llc);\n return ii !== -1 ? ii : null;\n }\n } else {\n if (format === 'MMM') {\n ii = indexOf.call(this._shortMonthsParse, llc);\n\n if (ii !== -1) {\n return ii;\n }\n\n ii = indexOf.call(this._longMonthsParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._longMonthsParse, llc);\n\n if (ii !== -1) {\n return ii;\n }\n\n ii = indexOf.call(this._shortMonthsParse, llc);\n return ii !== -1 ? ii : null;\n }\n }\n }\n\n function localeMonthsParse(monthName, format, strict) {\n var i, mom, regex;\n\n if (this._monthsParseExact) {\n return handleStrictParse.call(this, monthName, format, strict);\n }\n\n if (!this._monthsParse) {\n this._monthsParse = [];\n this._longMonthsParse = [];\n this._shortMonthsParse = [];\n } // TODO: add sorting\n // Sorting makes sure if one month (or abbr) is a prefix of another\n // see sorting in computeMonthsParse\n\n\n for (i = 0; i < 12; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, i]);\n\n if (strict && !this._longMonthsParse[i]) {\n this._longMonthsParse[i] = new RegExp('^' + this.months(mom, '').replace('.', '') + '$', 'i');\n this._shortMonthsParse[i] = new RegExp('^' + this.monthsShort(mom, '').replace('.', '') + '$', 'i');\n }\n\n if (!strict && !this._monthsParse[i]) {\n regex = '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, '');\n this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i');\n } // test the regex\n\n\n if (strict && format === 'MMMM' && this._longMonthsParse[i].test(monthName)) {\n return i;\n } else if (strict && format === 'MMM' && this._shortMonthsParse[i].test(monthName)) {\n return i;\n } else if (!strict && this._monthsParse[i].test(monthName)) {\n return i;\n }\n }\n } // MOMENTS\n\n\n function setMonth(mom, value) {\n var dayOfMonth;\n\n if (!mom.isValid()) {\n // No op\n return mom;\n }\n\n if (typeof value === 'string') {\n if (/^\\d+$/.test(value)) {\n value = toInt(value);\n } else {\n value = mom.localeData().monthsParse(value); // TODO: Another silent failure?\n\n if (!isNumber(value)) {\n return mom;\n }\n }\n }\n\n dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value));\n\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth);\n\n return mom;\n }\n\n function getSetMonth(value) {\n if (value != null) {\n setMonth(this, value);\n hooks.updateOffset(this, true);\n return this;\n } else {\n return get(this, 'Month');\n }\n }\n\n function getDaysInMonth() {\n return daysInMonth(this.year(), this.month());\n }\n\n var defaultMonthsShortRegex = matchWord;\n\n function monthsShortRegex(isStrict) {\n if (this._monthsParseExact) {\n if (!hasOwnProp(this, '_monthsRegex')) {\n computeMonthsParse.call(this);\n }\n\n if (isStrict) {\n return this._monthsShortStrictRegex;\n } else {\n return this._monthsShortRegex;\n }\n } else {\n if (!hasOwnProp(this, '_monthsShortRegex')) {\n this._monthsShortRegex = defaultMonthsShortRegex;\n }\n\n return this._monthsShortStrictRegex && isStrict ? this._monthsShortStrictRegex : this._monthsShortRegex;\n }\n }\n\n var defaultMonthsRegex = matchWord;\n\n function monthsRegex(isStrict) {\n if (this._monthsParseExact) {\n if (!hasOwnProp(this, '_monthsRegex')) {\n computeMonthsParse.call(this);\n }\n\n if (isStrict) {\n return this._monthsStrictRegex;\n } else {\n return this._monthsRegex;\n }\n } else {\n if (!hasOwnProp(this, '_monthsRegex')) {\n this._monthsRegex = defaultMonthsRegex;\n }\n\n return this._monthsStrictRegex && isStrict ? this._monthsStrictRegex : this._monthsRegex;\n }\n }\n\n function computeMonthsParse() {\n function cmpLenRev(a, b) {\n return b.length - a.length;\n }\n\n var shortPieces = [],\n longPieces = [],\n mixedPieces = [],\n i,\n mom;\n\n for (i = 0; i < 12; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, i]);\n shortPieces.push(this.monthsShort(mom, ''));\n longPieces.push(this.months(mom, ''));\n mixedPieces.push(this.months(mom, ''));\n mixedPieces.push(this.monthsShort(mom, ''));\n } // Sorting makes sure if one month (or abbr) is a prefix of another it\n // will match the longer piece.\n\n\n shortPieces.sort(cmpLenRev);\n longPieces.sort(cmpLenRev);\n mixedPieces.sort(cmpLenRev);\n\n for (i = 0; i < 12; i++) {\n shortPieces[i] = regexEscape(shortPieces[i]);\n longPieces[i] = regexEscape(longPieces[i]);\n }\n\n for (i = 0; i < 24; i++) {\n mixedPieces[i] = regexEscape(mixedPieces[i]);\n }\n\n this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._monthsShortRegex = this._monthsRegex;\n this._monthsStrictRegex = new RegExp('^(' + longPieces.join('|') + ')', 'i');\n this._monthsShortStrictRegex = new RegExp('^(' + shortPieces.join('|') + ')', 'i');\n }\n\n function createDate(y, m, d, h, M, s, ms) {\n // can't just apply() to create a date:\n // https://stackoverflow.com/q/181348\n var date; // the date constructor remaps years 0-99 to 1900-1999\n\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n date = new Date(y + 400, m, d, h, M, s, ms);\n\n if (isFinite(date.getFullYear())) {\n date.setFullYear(y);\n }\n } else {\n date = new Date(y, m, d, h, M, s, ms);\n }\n\n return date;\n }\n\n function createUTCDate(y) {\n var date; // the Date.UTC function remaps years 0-99 to 1900-1999\n\n if (y < 100 && y >= 0) {\n var args = Array.prototype.slice.call(arguments); // preserve leap years using a full 400 year cycle, then reset\n\n args[0] = y + 400;\n date = new Date(Date.UTC.apply(null, args));\n\n if (isFinite(date.getUTCFullYear())) {\n date.setUTCFullYear(y);\n }\n } else {\n date = new Date(Date.UTC.apply(null, arguments));\n }\n\n return date;\n } // start-of-first-week - start-of-year\n\n\n function firstWeekOffset(year, dow, doy) {\n var // first-week day -- which january is always in the first week (4 for iso, 1 for other)\n fwd = 7 + dow - doy,\n // first-week day local weekday -- which local weekday is fwd\n fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7;\n return -fwdlw + fwd - 1;\n } // https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday\n\n\n function dayOfYearFromWeeks(year, week, weekday, dow, doy) {\n var localWeekday = (7 + weekday - dow) % 7,\n weekOffset = firstWeekOffset(year, dow, doy),\n dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset,\n resYear,\n resDayOfYear;\n\n if (dayOfYear <= 0) {\n resYear = year - 1;\n resDayOfYear = daysInYear(resYear) + dayOfYear;\n } else if (dayOfYear > daysInYear(year)) {\n resYear = year + 1;\n resDayOfYear = dayOfYear - daysInYear(year);\n } else {\n resYear = year;\n resDayOfYear = dayOfYear;\n }\n\n return {\n year: resYear,\n dayOfYear: resDayOfYear\n };\n }\n\n function weekOfYear(mom, dow, doy) {\n var weekOffset = firstWeekOffset(mom.year(), dow, doy),\n week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1,\n resWeek,\n resYear;\n\n if (week < 1) {\n resYear = mom.year() - 1;\n resWeek = week + weeksInYear(resYear, dow, doy);\n } else if (week > weeksInYear(mom.year(), dow, doy)) {\n resWeek = week - weeksInYear(mom.year(), dow, doy);\n resYear = mom.year() + 1;\n } else {\n resYear = mom.year();\n resWeek = week;\n }\n\n return {\n week: resWeek,\n year: resYear\n };\n }\n\n function weeksInYear(year, dow, doy) {\n var weekOffset = firstWeekOffset(year, dow, doy),\n weekOffsetNext = firstWeekOffset(year + 1, dow, doy);\n return (daysInYear(year) - weekOffset + weekOffsetNext) / 7;\n } // FORMATTING\n\n\n addFormatToken('w', ['ww', 2], 'wo', 'week');\n addFormatToken('W', ['WW', 2], 'Wo', 'isoWeek'); // ALIASES\n\n addUnitAlias('week', 'w');\n addUnitAlias('isoWeek', 'W'); // PRIORITIES\n\n addUnitPriority('week', 5);\n addUnitPriority('isoWeek', 5); // PARSING\n\n addRegexToken('w', match1to2);\n addRegexToken('ww', match1to2, match2);\n addRegexToken('W', match1to2);\n addRegexToken('WW', match1to2, match2);\n addWeekParseToken(['w', 'ww', 'W', 'WW'], function (input, week, config, token) {\n week[token.substr(0, 1)] = toInt(input);\n }); // HELPERS\n // LOCALES\n\n function localeWeek(mom) {\n return weekOfYear(mom, this._week.dow, this._week.doy).week;\n }\n\n var defaultLocaleWeek = {\n dow: 0,\n // Sunday is the first day of the week.\n doy: 6 // The week that contains Jan 6th is the first week of the year.\n\n };\n\n function localeFirstDayOfWeek() {\n return this._week.dow;\n }\n\n function localeFirstDayOfYear() {\n return this._week.doy;\n } // MOMENTS\n\n\n function getSetWeek(input) {\n var week = this.localeData().week(this);\n return input == null ? week : this.add((input - week) * 7, 'd');\n }\n\n function getSetISOWeek(input) {\n var week = weekOfYear(this, 1, 4).week;\n return input == null ? week : this.add((input - week) * 7, 'd');\n } // FORMATTING\n\n\n addFormatToken('d', 0, 'do', 'day');\n addFormatToken('dd', 0, 0, function (format) {\n return this.localeData().weekdaysMin(this, format);\n });\n addFormatToken('ddd', 0, 0, function (format) {\n return this.localeData().weekdaysShort(this, format);\n });\n addFormatToken('dddd', 0, 0, function (format) {\n return this.localeData().weekdays(this, format);\n });\n addFormatToken('e', 0, 0, 'weekday');\n addFormatToken('E', 0, 0, 'isoWeekday'); // ALIASES\n\n addUnitAlias('day', 'd');\n addUnitAlias('weekday', 'e');\n addUnitAlias('isoWeekday', 'E'); // PRIORITY\n\n addUnitPriority('day', 11);\n addUnitPriority('weekday', 11);\n addUnitPriority('isoWeekday', 11); // PARSING\n\n addRegexToken('d', match1to2);\n addRegexToken('e', match1to2);\n addRegexToken('E', match1to2);\n addRegexToken('dd', function (isStrict, locale) {\n return locale.weekdaysMinRegex(isStrict);\n });\n addRegexToken('ddd', function (isStrict, locale) {\n return locale.weekdaysShortRegex(isStrict);\n });\n addRegexToken('dddd', function (isStrict, locale) {\n return locale.weekdaysRegex(isStrict);\n });\n addWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) {\n var weekday = config._locale.weekdaysParse(input, token, config._strict); // if we didn't get a weekday name, mark the date as invalid\n\n\n if (weekday != null) {\n week.d = weekday;\n } else {\n getParsingFlags(config).invalidWeekday = input;\n }\n });\n addWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) {\n week[token] = toInt(input);\n }); // HELPERS\n\n function parseWeekday(input, locale) {\n if (typeof input !== 'string') {\n return input;\n }\n\n if (!isNaN(input)) {\n return parseInt(input, 10);\n }\n\n input = locale.weekdaysParse(input);\n\n if (typeof input === 'number') {\n return input;\n }\n\n return null;\n }\n\n function parseIsoWeekday(input, locale) {\n if (typeof input === 'string') {\n return locale.weekdaysParse(input) % 7 || 7;\n }\n\n return isNaN(input) ? null : input;\n } // LOCALES\n\n\n function shiftWeekdays(ws, n) {\n return ws.slice(n, 7).concat(ws.slice(0, n));\n }\n\n var defaultLocaleWeekdays = 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_');\n\n function localeWeekdays(m, format) {\n var weekdays = isArray(this._weekdays) ? this._weekdays : this._weekdays[m && m !== true && this._weekdays.isFormat.test(format) ? 'format' : 'standalone'];\n return m === true ? shiftWeekdays(weekdays, this._week.dow) : m ? weekdays[m.day()] : weekdays;\n }\n\n var defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_');\n\n function localeWeekdaysShort(m) {\n return m === true ? shiftWeekdays(this._weekdaysShort, this._week.dow) : m ? this._weekdaysShort[m.day()] : this._weekdaysShort;\n }\n\n var defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_');\n\n function localeWeekdaysMin(m) {\n return m === true ? shiftWeekdays(this._weekdaysMin, this._week.dow) : m ? this._weekdaysMin[m.day()] : this._weekdaysMin;\n }\n\n function handleStrictParse$1(weekdayName, format, strict) {\n var i,\n ii,\n mom,\n llc = weekdayName.toLocaleLowerCase();\n\n if (!this._weekdaysParse) {\n this._weekdaysParse = [];\n this._shortWeekdaysParse = [];\n this._minWeekdaysParse = [];\n\n for (i = 0; i < 7; ++i) {\n mom = createUTC([2000, 1]).day(i);\n this._minWeekdaysParse[i] = this.weekdaysMin(mom, '').toLocaleLowerCase();\n this._shortWeekdaysParse[i] = this.weekdaysShort(mom, '').toLocaleLowerCase();\n this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase();\n }\n }\n\n if (strict) {\n if (format === 'dddd') {\n ii = indexOf.call(this._weekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else if (format === 'ddd') {\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n }\n } else {\n if (format === 'dddd') {\n ii = indexOf.call(this._weekdaysParse, llc);\n\n if (ii !== -1) {\n return ii;\n }\n\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n\n if (ii !== -1) {\n return ii;\n }\n\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else if (format === 'ddd') {\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n\n if (ii !== -1) {\n return ii;\n }\n\n ii = indexOf.call(this._weekdaysParse, llc);\n\n if (ii !== -1) {\n return ii;\n }\n\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._minWeekdaysParse, llc);\n\n if (ii !== -1) {\n return ii;\n }\n\n ii = indexOf.call(this._weekdaysParse, llc);\n\n if (ii !== -1) {\n return ii;\n }\n\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n }\n }\n }\n\n function localeWeekdaysParse(weekdayName, format, strict) {\n var i, mom, regex;\n\n if (this._weekdaysParseExact) {\n return handleStrictParse$1.call(this, weekdayName, format, strict);\n }\n\n if (!this._weekdaysParse) {\n this._weekdaysParse = [];\n this._minWeekdaysParse = [];\n this._shortWeekdaysParse = [];\n this._fullWeekdaysParse = [];\n }\n\n for (i = 0; i < 7; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, 1]).day(i);\n\n if (strict && !this._fullWeekdaysParse[i]) {\n this._fullWeekdaysParse[i] = new RegExp('^' + this.weekdays(mom, '').replace('.', '\\\\.?') + '$', 'i');\n this._shortWeekdaysParse[i] = new RegExp('^' + this.weekdaysShort(mom, '').replace('.', '\\\\.?') + '$', 'i');\n this._minWeekdaysParse[i] = new RegExp('^' + this.weekdaysMin(mom, '').replace('.', '\\\\.?') + '$', 'i');\n }\n\n if (!this._weekdaysParse[i]) {\n regex = '^' + this.weekdays(mom, '') + '|^' + this.weekdaysShort(mom, '') + '|^' + this.weekdaysMin(mom, '');\n this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i');\n } // test the regex\n\n\n if (strict && format === 'dddd' && this._fullWeekdaysParse[i].test(weekdayName)) {\n return i;\n } else if (strict && format === 'ddd' && this._shortWeekdaysParse[i].test(weekdayName)) {\n return i;\n } else if (strict && format === 'dd' && this._minWeekdaysParse[i].test(weekdayName)) {\n return i;\n } else if (!strict && this._weekdaysParse[i].test(weekdayName)) {\n return i;\n }\n }\n } // MOMENTS\n\n\n function getSetDayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n\n var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay();\n\n if (input != null) {\n input = parseWeekday(input, this.localeData());\n return this.add(input - day, 'd');\n } else {\n return day;\n }\n }\n\n function getSetLocaleDayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n\n var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7;\n return input == null ? weekday : this.add(input - weekday, 'd');\n }\n\n function getSetISODayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n } // behaves the same as moment#day except\n // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)\n // as a setter, sunday should belong to the previous week.\n\n\n if (input != null) {\n var weekday = parseIsoWeekday(input, this.localeData());\n return this.day(this.day() % 7 ? weekday : weekday - 7);\n } else {\n return this.day() || 7;\n }\n }\n\n var defaultWeekdaysRegex = matchWord;\n\n function weekdaysRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n\n if (isStrict) {\n return this._weekdaysStrictRegex;\n } else {\n return this._weekdaysRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n this._weekdaysRegex = defaultWeekdaysRegex;\n }\n\n return this._weekdaysStrictRegex && isStrict ? this._weekdaysStrictRegex : this._weekdaysRegex;\n }\n }\n\n var defaultWeekdaysShortRegex = matchWord;\n\n function weekdaysShortRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n\n if (isStrict) {\n return this._weekdaysShortStrictRegex;\n } else {\n return this._weekdaysShortRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysShortRegex')) {\n this._weekdaysShortRegex = defaultWeekdaysShortRegex;\n }\n\n return this._weekdaysShortStrictRegex && isStrict ? this._weekdaysShortStrictRegex : this._weekdaysShortRegex;\n }\n }\n\n var defaultWeekdaysMinRegex = matchWord;\n\n function weekdaysMinRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n\n if (isStrict) {\n return this._weekdaysMinStrictRegex;\n } else {\n return this._weekdaysMinRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysMinRegex')) {\n this._weekdaysMinRegex = defaultWeekdaysMinRegex;\n }\n\n return this._weekdaysMinStrictRegex && isStrict ? this._weekdaysMinStrictRegex : this._weekdaysMinRegex;\n }\n }\n\n function computeWeekdaysParse() {\n function cmpLenRev(a, b) {\n return b.length - a.length;\n }\n\n var minPieces = [],\n shortPieces = [],\n longPieces = [],\n mixedPieces = [],\n i,\n mom,\n minp,\n shortp,\n longp;\n\n for (i = 0; i < 7; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, 1]).day(i);\n minp = this.weekdaysMin(mom, '');\n shortp = this.weekdaysShort(mom, '');\n longp = this.weekdays(mom, '');\n minPieces.push(minp);\n shortPieces.push(shortp);\n longPieces.push(longp);\n mixedPieces.push(minp);\n mixedPieces.push(shortp);\n mixedPieces.push(longp);\n } // Sorting makes sure if one weekday (or abbr) is a prefix of another it\n // will match the longer piece.\n\n\n minPieces.sort(cmpLenRev);\n shortPieces.sort(cmpLenRev);\n longPieces.sort(cmpLenRev);\n mixedPieces.sort(cmpLenRev);\n\n for (i = 0; i < 7; i++) {\n shortPieces[i] = regexEscape(shortPieces[i]);\n longPieces[i] = regexEscape(longPieces[i]);\n mixedPieces[i] = regexEscape(mixedPieces[i]);\n }\n\n this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._weekdaysShortRegex = this._weekdaysRegex;\n this._weekdaysMinRegex = this._weekdaysRegex;\n this._weekdaysStrictRegex = new RegExp('^(' + longPieces.join('|') + ')', 'i');\n this._weekdaysShortStrictRegex = new RegExp('^(' + shortPieces.join('|') + ')', 'i');\n this._weekdaysMinStrictRegex = new RegExp('^(' + minPieces.join('|') + ')', 'i');\n } // FORMATTING\n\n\n function hFormat() {\n return this.hours() % 12 || 12;\n }\n\n function kFormat() {\n return this.hours() || 24;\n }\n\n addFormatToken('H', ['HH', 2], 0, 'hour');\n addFormatToken('h', ['hh', 2], 0, hFormat);\n addFormatToken('k', ['kk', 2], 0, kFormat);\n addFormatToken('hmm', 0, 0, function () {\n return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2);\n });\n addFormatToken('hmmss', 0, 0, function () {\n return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2) + zeroFill(this.seconds(), 2);\n });\n addFormatToken('Hmm', 0, 0, function () {\n return '' + this.hours() + zeroFill(this.minutes(), 2);\n });\n addFormatToken('Hmmss', 0, 0, function () {\n return '' + this.hours() + zeroFill(this.minutes(), 2) + zeroFill(this.seconds(), 2);\n });\n\n function meridiem(token, lowercase) {\n addFormatToken(token, 0, 0, function () {\n return this.localeData().meridiem(this.hours(), this.minutes(), lowercase);\n });\n }\n\n meridiem('a', true);\n meridiem('A', false); // ALIASES\n\n addUnitAlias('hour', 'h'); // PRIORITY\n\n addUnitPriority('hour', 13); // PARSING\n\n function matchMeridiem(isStrict, locale) {\n return locale._meridiemParse;\n }\n\n addRegexToken('a', matchMeridiem);\n addRegexToken('A', matchMeridiem);\n addRegexToken('H', match1to2);\n addRegexToken('h', match1to2);\n addRegexToken('k', match1to2);\n addRegexToken('HH', match1to2, match2);\n addRegexToken('hh', match1to2, match2);\n addRegexToken('kk', match1to2, match2);\n addRegexToken('hmm', match3to4);\n addRegexToken('hmmss', match5to6);\n addRegexToken('Hmm', match3to4);\n addRegexToken('Hmmss', match5to6);\n addParseToken(['H', 'HH'], HOUR);\n addParseToken(['k', 'kk'], function (input, array, config) {\n var kInput = toInt(input);\n array[HOUR] = kInput === 24 ? 0 : kInput;\n });\n addParseToken(['a', 'A'], function (input, array, config) {\n config._isPm = config._locale.isPM(input);\n config._meridiem = input;\n });\n addParseToken(['h', 'hh'], function (input, array, config) {\n array[HOUR] = toInt(input);\n getParsingFlags(config).bigHour = true;\n });\n addParseToken('hmm', function (input, array, config) {\n var pos = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos));\n array[MINUTE] = toInt(input.substr(pos));\n getParsingFlags(config).bigHour = true;\n });\n addParseToken('hmmss', function (input, array, config) {\n var pos1 = input.length - 4;\n var pos2 = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos1));\n array[MINUTE] = toInt(input.substr(pos1, 2));\n array[SECOND] = toInt(input.substr(pos2));\n getParsingFlags(config).bigHour = true;\n });\n addParseToken('Hmm', function (input, array, config) {\n var pos = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos));\n array[MINUTE] = toInt(input.substr(pos));\n });\n addParseToken('Hmmss', function (input, array, config) {\n var pos1 = input.length - 4;\n var pos2 = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos1));\n array[MINUTE] = toInt(input.substr(pos1, 2));\n array[SECOND] = toInt(input.substr(pos2));\n }); // LOCALES\n\n function localeIsPM(input) {\n // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays\n // Using charAt should be more compatible.\n return (input + '').toLowerCase().charAt(0) === 'p';\n }\n\n var defaultLocaleMeridiemParse = /[ap]\\.?m?\\.?/i;\n\n function localeMeridiem(hours, minutes, isLower) {\n if (hours > 11) {\n return isLower ? 'pm' : 'PM';\n } else {\n return isLower ? 'am' : 'AM';\n }\n } // MOMENTS\n // Setting the hour should keep the time, because the user explicitly\n // specified which hour they want. So trying to maintain the same hour (in\n // a new timezone) makes sense. Adding/subtracting hours does not follow\n // this rule.\n\n\n var getSetHour = makeGetSet('Hours', true);\n var baseConfig = {\n calendar: defaultCalendar,\n longDateFormat: defaultLongDateFormat,\n invalidDate: defaultInvalidDate,\n ordinal: defaultOrdinal,\n dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse,\n relativeTime: defaultRelativeTime,\n months: defaultLocaleMonths,\n monthsShort: defaultLocaleMonthsShort,\n week: defaultLocaleWeek,\n weekdays: defaultLocaleWeekdays,\n weekdaysMin: defaultLocaleWeekdaysMin,\n weekdaysShort: defaultLocaleWeekdaysShort,\n meridiemParse: defaultLocaleMeridiemParse\n }; // internal storage for locale config files\n\n var locales = {};\n var localeFamilies = {};\n var globalLocale;\n\n function normalizeLocale(key) {\n return key ? key.toLowerCase().replace('_', '-') : key;\n } // pick the locale from the array\n // try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each\n // substring from most specific to least, but move to the next array item if it's a more specific variant than the current root\n\n\n function chooseLocale(names) {\n var i = 0,\n j,\n next,\n locale,\n split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n\n if (locale) {\n return locale;\n }\n\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n\n j--;\n }\n\n i++;\n }\n\n return globalLocale;\n }\n\n function loadLocale(name) {\n var oldLocale = null; // TODO: Find a better way to register and load all the locales in Node\n\n if (!locales[name] && 'object' !== 'undefined' && module && module.exports) {\n try {\n oldLocale = globalLocale._abbr;\n var aliasedRequire = commonjsRequire;\n aliasedRequire('./locale/' + name);\n getSetGlobalLocale(oldLocale);\n } catch (e) {}\n }\n\n return locales[name];\n } // This function will load locale and then set the global locale. If\n // no arguments are passed in, it will simply return the current global\n // locale key.\n\n\n function getSetGlobalLocale(key, values) {\n var data;\n\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n } else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n } else {\n if (typeof console !== 'undefined' && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n }\n\n function defineLocale(name, config) {\n if (config !== null) {\n var locale,\n parentConfig = baseConfig;\n config.abbr = name;\n\n if (locales[name] != null) {\n deprecateSimple('defineLocaleOverride', 'use moment.updateLocale(localeName, config) to change ' + 'an existing locale. moment.defineLocale(localeName, ' + 'config) should only be used for creating a new locale ' + 'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.');\n parentConfig = locales[name]._config;\n } else if (config.parentLocale != null) {\n if (locales[config.parentLocale] != null) {\n parentConfig = locales[config.parentLocale]._config;\n } else {\n locale = loadLocale(config.parentLocale);\n\n if (locale != null) {\n parentConfig = locale._config;\n } else {\n if (!localeFamilies[config.parentLocale]) {\n localeFamilies[config.parentLocale] = [];\n }\n\n localeFamilies[config.parentLocale].push({\n name: name,\n config: config\n });\n return null;\n }\n }\n }\n\n locales[name] = new Locale(mergeConfigs(parentConfig, config));\n\n if (localeFamilies[name]) {\n localeFamilies[name].forEach(function (x) {\n defineLocale(x.name, x.config);\n });\n } // backwards compat for now: also set the locale\n // make sure we set the locale AFTER all child locales have been\n // created, so we won't end up with the child locale set.\n\n\n getSetGlobalLocale(name);\n return locales[name];\n } else {\n // useful for testing\n delete locales[name];\n return null;\n }\n }\n\n function updateLocale(name, config) {\n if (config != null) {\n var locale,\n tmpLocale,\n parentConfig = baseConfig; // MERGE\n\n tmpLocale = loadLocale(name);\n\n if (tmpLocale != null) {\n parentConfig = tmpLocale._config;\n }\n\n config = mergeConfigs(parentConfig, config);\n locale = new Locale(config);\n locale.parentLocale = locales[name];\n locales[name] = locale; // backwards compat for now: also set the locale\n\n getSetGlobalLocale(name);\n } else {\n // pass null for config to unupdate, useful for tests\n if (locales[name] != null) {\n if (locales[name].parentLocale != null) {\n locales[name] = locales[name].parentLocale;\n } else if (locales[name] != null) {\n delete locales[name];\n }\n }\n }\n\n return locales[name];\n } // returns locale data\n\n\n function getLocale(key) {\n var locale;\n\n if (key && key._locale && key._locale._abbr) {\n key = key._locale._abbr;\n }\n\n if (!key) {\n return globalLocale;\n }\n\n if (!isArray(key)) {\n //short-circuit everything else\n locale = loadLocale(key);\n\n if (locale) {\n return locale;\n }\n\n key = [key];\n }\n\n return chooseLocale(key);\n }\n\n function listLocales() {\n return keys(locales);\n }\n\n function checkOverflow(m) {\n var overflow;\n var a = m._a;\n\n if (a && getParsingFlags(m).overflow === -2) {\n overflow = a[MONTH] < 0 || a[MONTH] > 11 ? MONTH : a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH]) ? DATE : a[HOUR] < 0 || a[HOUR] > 24 || a[HOUR] === 24 && (a[MINUTE] !== 0 || a[SECOND] !== 0 || a[MILLISECOND] !== 0) ? HOUR : a[MINUTE] < 0 || a[MINUTE] > 59 ? MINUTE : a[SECOND] < 0 || a[SECOND] > 59 ? SECOND : a[MILLISECOND] < 0 || a[MILLISECOND] > 999 ? MILLISECOND : -1;\n\n if (getParsingFlags(m)._overflowDayOfYear && (overflow < YEAR || overflow > DATE)) {\n overflow = DATE;\n }\n\n if (getParsingFlags(m)._overflowWeeks && overflow === -1) {\n overflow = WEEK;\n }\n\n if (getParsingFlags(m)._overflowWeekday && overflow === -1) {\n overflow = WEEKDAY;\n }\n\n getParsingFlags(m).overflow = overflow;\n }\n\n return m;\n } // Pick the first defined of two or three arguments.\n\n\n function defaults(a, b, c) {\n if (a != null) {\n return a;\n }\n\n if (b != null) {\n return b;\n }\n\n return c;\n }\n\n function currentDateArray(config) {\n // hooks is actually the exported moment object\n var nowValue = new Date(hooks.now());\n\n if (config._useUTC) {\n return [nowValue.getUTCFullYear(), nowValue.getUTCMonth(), nowValue.getUTCDate()];\n }\n\n return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()];\n } // convert an array to a date.\n // the array should mirror the parameters below\n // note: all values past the year are optional and will default to the lowest possible value.\n // [year, month, day , hour, minute, second, millisecond]\n\n\n function configFromArray(config) {\n var i,\n date,\n input = [],\n currentDate,\n expectedWeekday,\n yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config); //compute day of the year from weeks and weekdays\n\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n } //if the day of the year is set, figure out what it is\n\n\n if (config._dayOfYear != null) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse) || config._dayOfYear === 0) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n } // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n\n\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n } // Zero out whatever was not defaulted, including time\n\n\n for (; i < 7; i++) {\n config._a[i] = input[i] = config._a[i] == null ? i === 2 ? 1 : 0 : config._a[i];\n } // Check for 24:00:00.000\n\n\n if (config._a[HOUR] === 24 && config._a[MINUTE] === 0 && config._a[SECOND] === 0 && config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n expectedWeekday = config._useUTC ? config._d.getUTCDay() : config._d.getDay(); // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n } // check for mismatching day of week\n\n\n if (config._w && typeof config._w.d !== 'undefined' && config._w.d !== expectedWeekday) {\n getParsingFlags(config).weekdayMismatch = true;\n }\n }\n\n function dayOfYearFromWeekInfo(config) {\n var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow;\n w = config._w;\n\n if (w.GG != null || w.W != null || w.E != null) {\n dow = 1;\n doy = 4; // TODO: We need to take the current isoWeekYear, but that depends on\n // how we interpret now (local, utc, fixed offset). So create\n // a now version of current config (take local/utc/offset flags, and\n // create now).\n\n weekYear = defaults(w.GG, config._a[YEAR], weekOfYear(createLocal(), 1, 4).year);\n week = defaults(w.W, 1);\n weekday = defaults(w.E, 1);\n\n if (weekday < 1 || weekday > 7) {\n weekdayOverflow = true;\n }\n } else {\n dow = config._locale._week.dow;\n doy = config._locale._week.doy;\n var curWeek = weekOfYear(createLocal(), dow, doy);\n weekYear = defaults(w.gg, config._a[YEAR], curWeek.year); // Default to current week.\n\n week = defaults(w.w, curWeek.week);\n\n if (w.d != null) {\n // weekday -- low day numbers are considered next week\n weekday = w.d;\n\n if (weekday < 0 || weekday > 6) {\n weekdayOverflow = true;\n }\n } else if (w.e != null) {\n // local weekday -- counting starts from beginning of week\n weekday = w.e + dow;\n\n if (w.e < 0 || w.e > 6) {\n weekdayOverflow = true;\n }\n } else {\n // default to beginning of week\n weekday = dow;\n }\n }\n\n if (week < 1 || week > weeksInYear(weekYear, dow, doy)) {\n getParsingFlags(config)._overflowWeeks = true;\n } else if (weekdayOverflow != null) {\n getParsingFlags(config)._overflowWeekday = true;\n } else {\n temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy);\n config._a[YEAR] = temp.year;\n config._dayOfYear = temp.dayOfYear;\n }\n } // iso 8601 regex\n // 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00)\n\n\n var extendedIsoRegex = /^\\s*((?:[+-]\\d{6}|\\d{4})-(?:\\d\\d-\\d\\d|W\\d\\d-\\d|W\\d\\d|\\d\\d\\d|\\d\\d))(?:(T| )(\\d\\d(?::\\d\\d(?::\\d\\d(?:[.,]\\d+)?)?)?)([\\+\\-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/;\n var basicIsoRegex = /^\\s*((?:[+-]\\d{6}|\\d{4})(?:\\d\\d\\d\\d|W\\d\\d\\d|W\\d\\d|\\d\\d\\d|\\d\\d))(?:(T| )(\\d\\d(?:\\d\\d(?:\\d\\d(?:[.,]\\d+)?)?)?)([\\+\\-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/;\n var tzRegex = /Z|[+-]\\d\\d(?::?\\d\\d)?/;\n var isoDates = [['YYYYYY-MM-DD', /[+-]\\d{6}-\\d\\d-\\d\\d/], ['YYYY-MM-DD', /\\d{4}-\\d\\d-\\d\\d/], ['GGGG-[W]WW-E', /\\d{4}-W\\d\\d-\\d/], ['GGGG-[W]WW', /\\d{4}-W\\d\\d/, false], ['YYYY-DDD', /\\d{4}-\\d{3}/], ['YYYY-MM', /\\d{4}-\\d\\d/, false], ['YYYYYYMMDD', /[+-]\\d{10}/], ['YYYYMMDD', /\\d{8}/], // YYYYMM is NOT allowed by the standard\n ['GGGG[W]WWE', /\\d{4}W\\d{3}/], ['GGGG[W]WW', /\\d{4}W\\d{2}/, false], ['YYYYDDD', /\\d{7}/]]; // iso time formats and regexes\n\n var isoTimes = [['HH:mm:ss.SSSS', /\\d\\d:\\d\\d:\\d\\d\\.\\d+/], ['HH:mm:ss,SSSS', /\\d\\d:\\d\\d:\\d\\d,\\d+/], ['HH:mm:ss', /\\d\\d:\\d\\d:\\d\\d/], ['HH:mm', /\\d\\d:\\d\\d/], ['HHmmss.SSSS', /\\d\\d\\d\\d\\d\\d\\.\\d+/], ['HHmmss,SSSS', /\\d\\d\\d\\d\\d\\d,\\d+/], ['HHmmss', /\\d\\d\\d\\d\\d\\d/], ['HHmm', /\\d\\d\\d\\d/], ['HH', /\\d\\d/]];\n var aspNetJsonRegex = /^\\/?Date\\((\\-?\\d+)/i; // date from iso format\n\n function configFromISO(config) {\n var i,\n l,\n string = config._i,\n match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string),\n allowTime,\n dateFormat,\n timeFormat,\n tzFormat;\n\n if (match) {\n getParsingFlags(config).iso = true;\n\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(match[1])) {\n dateFormat = isoDates[i][0];\n allowTime = isoDates[i][2] !== false;\n break;\n }\n }\n\n if (dateFormat == null) {\n config._isValid = false;\n return;\n }\n\n if (match[3]) {\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(match[3])) {\n // match[2] should be 'T' or space\n timeFormat = (match[2] || ' ') + isoTimes[i][0];\n break;\n }\n }\n\n if (timeFormat == null) {\n config._isValid = false;\n return;\n }\n }\n\n if (!allowTime && timeFormat != null) {\n config._isValid = false;\n return;\n }\n\n if (match[4]) {\n if (tzRegex.exec(match[4])) {\n tzFormat = 'Z';\n } else {\n config._isValid = false;\n return;\n }\n }\n\n config._f = dateFormat + (timeFormat || '') + (tzFormat || '');\n configFromStringAndFormat(config);\n } else {\n config._isValid = false;\n }\n } // RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3\n\n\n var rfc2822 = /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\\s)?(\\d{1,2})\\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\\s(\\d{2,4})\\s(\\d\\d):(\\d\\d)(?::(\\d\\d))?\\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\\d{4}))$/;\n\n function extractFromRFC2822Strings(yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr) {\n var result = [untruncateYear(yearStr), defaultLocaleMonthsShort.indexOf(monthStr), parseInt(dayStr, 10), parseInt(hourStr, 10), parseInt(minuteStr, 10)];\n\n if (secondStr) {\n result.push(parseInt(secondStr, 10));\n }\n\n return result;\n }\n\n function untruncateYear(yearStr) {\n var year = parseInt(yearStr, 10);\n\n if (year <= 49) {\n return 2000 + year;\n } else if (year <= 999) {\n return 1900 + year;\n }\n\n return year;\n }\n\n function preprocessRFC2822(s) {\n // Remove comments and folding whitespace and replace multiple-spaces with a single space\n return s.replace(/\\([^)]*\\)|[\\n\\t]/g, ' ').replace(/(\\s\\s+)/g, ' ').replace(/^\\s\\s*/, '').replace(/\\s\\s*$/, '');\n }\n\n function checkWeekday(weekdayStr, parsedInput, config) {\n if (weekdayStr) {\n // TODO: Replace the vanilla JS Date object with an indepentent day-of-week check.\n var weekdayProvided = defaultLocaleWeekdaysShort.indexOf(weekdayStr),\n weekdayActual = new Date(parsedInput[0], parsedInput[1], parsedInput[2]).getDay();\n\n if (weekdayProvided !== weekdayActual) {\n getParsingFlags(config).weekdayMismatch = true;\n config._isValid = false;\n return false;\n }\n }\n\n return true;\n }\n\n var obsOffsets = {\n UT: 0,\n GMT: 0,\n EDT: -4 * 60,\n EST: -5 * 60,\n CDT: -5 * 60,\n CST: -6 * 60,\n MDT: -6 * 60,\n MST: -7 * 60,\n PDT: -7 * 60,\n PST: -8 * 60\n };\n\n function calculateOffset(obsOffset, militaryOffset, numOffset) {\n if (obsOffset) {\n return obsOffsets[obsOffset];\n } else if (militaryOffset) {\n // the only allowed military tz is Z\n return 0;\n } else {\n var hm = parseInt(numOffset, 10);\n var m = hm % 100,\n h = (hm - m) / 100;\n return h * 60 + m;\n }\n } // date and time from ref 2822 format\n\n\n function configFromRFC2822(config) {\n var match = rfc2822.exec(preprocessRFC2822(config._i));\n\n if (match) {\n var parsedArray = extractFromRFC2822Strings(match[4], match[3], match[2], match[5], match[6], match[7]);\n\n if (!checkWeekday(match[1], parsedArray, config)) {\n return;\n }\n\n config._a = parsedArray;\n config._tzm = calculateOffset(match[8], match[9], match[10]);\n config._d = createUTCDate.apply(null, config._a);\n\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n\n getParsingFlags(config).rfc2822 = true;\n } else {\n config._isValid = false;\n }\n } // date from iso format or fallback\n\n\n function configFromString(config) {\n var matched = aspNetJsonRegex.exec(config._i);\n\n if (matched !== null) {\n config._d = new Date(+matched[1]);\n return;\n }\n\n configFromISO(config);\n\n if (config._isValid === false) {\n delete config._isValid;\n } else {\n return;\n }\n\n configFromRFC2822(config);\n\n if (config._isValid === false) {\n delete config._isValid;\n } else {\n return;\n } // Final attempt, use Input Fallback\n\n\n hooks.createFromInputFallback(config);\n }\n\n hooks.createFromInputFallback = deprecate('value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), ' + 'which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are ' + 'discouraged and will be removed in an upcoming major release. Please refer to ' + 'http://momentjs.com/guides/#/warnings/js-date/ for more info.', function (config) {\n config._d = new Date(config._i + (config._useUTC ? ' UTC' : ''));\n }); // constant that refers to the ISO standard\n\n hooks.ISO_8601 = function () {}; // constant that refers to the RFC 2822 form\n\n\n hooks.RFC_2822 = function () {}; // date from string and format string\n\n\n function configFromStringAndFormat(config) {\n // TODO: Move this to another part of the creation flow to prevent circular deps\n if (config._f === hooks.ISO_8601) {\n configFromISO(config);\n return;\n }\n\n if (config._f === hooks.RFC_2822) {\n configFromRFC2822(config);\n return;\n }\n\n config._a = [];\n getParsingFlags(config).empty = true; // This array is used to make a Date, either with `new Date` or `Date.UTC`\n\n var string = '' + config._i,\n i,\n parsedInput,\n tokens,\n token,\n skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0]; // console.log('token', token, 'parsedInput', parsedInput,\n // 'regex', getParseRegexForToken(token, config));\n\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n\n if (skipped.length > 0) {\n getParsingFlags(config).unusedInput.push(skipped);\n }\n\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n } // don't parse if it's not a known token\n\n\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n getParsingFlags(config).empty = false;\n } else {\n getParsingFlags(config).unusedTokens.push(token);\n }\n\n addTimeToArrayFromToken(token, parsedInput, config);\n } else if (config._strict && !parsedInput) {\n getParsingFlags(config).unusedTokens.push(token);\n }\n } // add remaining unparsed input length to the string\n\n\n getParsingFlags(config).charsLeftOver = stringLength - totalParsedInputLength;\n\n if (string.length > 0) {\n getParsingFlags(config).unusedInput.push(string);\n } // clear _12h flag if hour is <= 12\n\n\n if (config._a[HOUR] <= 12 && getParsingFlags(config).bigHour === true && config._a[HOUR] > 0) {\n getParsingFlags(config).bigHour = undefined;\n }\n\n getParsingFlags(config).parsedDateParts = config._a.slice(0);\n getParsingFlags(config).meridiem = config._meridiem; // handle meridiem\n\n config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR], config._meridiem);\n configFromArray(config);\n checkOverflow(config);\n }\n\n function meridiemFixWrap(locale, hour, meridiem) {\n var isPm;\n\n if (meridiem == null) {\n // nothing to do\n return hour;\n }\n\n if (locale.meridiemHour != null) {\n return locale.meridiemHour(hour, meridiem);\n } else if (locale.isPM != null) {\n // Fallback\n isPm = locale.isPM(meridiem);\n\n if (isPm && hour < 12) {\n hour += 12;\n }\n\n if (!isPm && hour === 12) {\n hour = 0;\n }\n\n return hour;\n } else {\n // this is not supposed to happen\n return hour;\n }\n } // date from string and array of format strings\n\n\n function configFromStringAndArray(config) {\n var tempConfig, bestMoment, scoreToBeat, i, currentScore;\n\n if (config._f.length === 0) {\n getParsingFlags(config).invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < config._f.length; i++) {\n currentScore = 0;\n tempConfig = copyConfig({}, config);\n\n if (config._useUTC != null) {\n tempConfig._useUTC = config._useUTC;\n }\n\n tempConfig._f = config._f[i];\n configFromStringAndFormat(tempConfig);\n\n if (!isValid(tempConfig)) {\n continue;\n } // if there is any input that was not parsed add a penalty for that format\n\n\n currentScore += getParsingFlags(tempConfig).charsLeftOver; //or tokens\n\n currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10;\n getParsingFlags(tempConfig).score = currentScore;\n\n if (scoreToBeat == null || currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n\n extend(config, bestMoment || tempConfig);\n }\n\n function configFromObject(config) {\n if (config._d) {\n return;\n }\n\n var i = normalizeObjectUnits(config._i);\n config._a = map([i.year, i.month, i.day || i.date, i.hour, i.minute, i.second, i.millisecond], function (obj) {\n return obj && parseInt(obj, 10);\n });\n configFromArray(config);\n }\n\n function createFromConfig(config) {\n var res = new Moment(checkOverflow(prepareConfig(config)));\n\n if (res._nextDay) {\n // Adding is smart enough around DST\n res.add(1, 'd');\n res._nextDay = undefined;\n }\n\n return res;\n }\n\n function prepareConfig(config) {\n var input = config._i,\n format = config._f;\n config._locale = config._locale || getLocale(config._l);\n\n if (input === null || format === undefined && input === '') {\n return createInvalid({\n nullInput: true\n });\n }\n\n if (typeof input === 'string') {\n config._i = input = config._locale.preparse(input);\n }\n\n if (isMoment(input)) {\n return new Moment(checkOverflow(input));\n } else if (isDate(input)) {\n config._d = input;\n } else if (isArray(format)) {\n configFromStringAndArray(config);\n } else if (format) {\n configFromStringAndFormat(config);\n } else {\n configFromInput(config);\n }\n\n if (!isValid(config)) {\n config._d = null;\n }\n\n return config;\n }\n\n function configFromInput(config) {\n var input = config._i;\n\n if (isUndefined(input)) {\n config._d = new Date(hooks.now());\n } else if (isDate(input)) {\n config._d = new Date(input.valueOf());\n } else if (typeof input === 'string') {\n configFromString(config);\n } else if (isArray(input)) {\n config._a = map(input.slice(0), function (obj) {\n return parseInt(obj, 10);\n });\n configFromArray(config);\n } else if (isObject(input)) {\n configFromObject(config);\n } else if (isNumber(input)) {\n // from milliseconds\n config._d = new Date(input);\n } else {\n hooks.createFromInputFallback(config);\n }\n }\n\n function createLocalOrUTC(input, format, locale, strict, isUTC) {\n var c = {};\n\n if (locale === true || locale === false) {\n strict = locale;\n locale = undefined;\n }\n\n if (isObject(input) && isObjectEmpty(input) || isArray(input) && input.length === 0) {\n input = undefined;\n } // object construction must be done this way.\n // https://github.com/moment/moment/issues/1423\n\n\n c._isAMomentObject = true;\n c._useUTC = c._isUTC = isUTC;\n c._l = locale;\n c._i = input;\n c._f = format;\n c._strict = strict;\n return createFromConfig(c);\n }\n\n function createLocal(input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, false);\n }\n\n var prototypeMin = deprecate('moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/', function () {\n var other = createLocal.apply(null, arguments);\n\n if (this.isValid() && other.isValid()) {\n return other < this ? this : other;\n } else {\n return createInvalid();\n }\n });\n var prototypeMax = deprecate('moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/', function () {\n var other = createLocal.apply(null, arguments);\n\n if (this.isValid() && other.isValid()) {\n return other > this ? this : other;\n } else {\n return createInvalid();\n }\n }); // Pick a moment m from moments so that m[fn](other) is true for all\n // other. This relies on the function fn to be transitive.\n //\n // moments should either be an array of moment objects or an array, whose\n // first element is an array of moment objects.\n\n function pickBy(fn, moments) {\n var res, i;\n\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n\n if (!moments.length) {\n return createLocal();\n }\n\n res = moments[0];\n\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n\n return res;\n } // TODO: Use [].sort instead?\n\n\n function min() {\n var args = [].slice.call(arguments, 0);\n return pickBy('isBefore', args);\n }\n\n function max() {\n var args = [].slice.call(arguments, 0);\n return pickBy('isAfter', args);\n }\n\n var now = function () {\n return Date.now ? Date.now() : +new Date();\n };\n\n var ordering = ['year', 'quarter', 'month', 'week', 'day', 'hour', 'minute', 'second', 'millisecond'];\n\n function isDurationValid(m) {\n for (var key in m) {\n if (!(indexOf.call(ordering, key) !== -1 && (m[key] == null || !isNaN(m[key])))) {\n return false;\n }\n }\n\n var unitHasDecimal = false;\n\n for (var i = 0; i < ordering.length; ++i) {\n if (m[ordering[i]]) {\n if (unitHasDecimal) {\n return false; // only allow non-integers for smallest unit\n }\n\n if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) {\n unitHasDecimal = true;\n }\n }\n }\n\n return true;\n }\n\n function isValid$1() {\n return this._isValid;\n }\n\n function createInvalid$1() {\n return createDuration(NaN);\n }\n\n function Duration(duration) {\n var normalizedInput = normalizeObjectUnits(duration),\n years = normalizedInput.year || 0,\n quarters = normalizedInput.quarter || 0,\n months = normalizedInput.month || 0,\n weeks = normalizedInput.week || normalizedInput.isoWeek || 0,\n days = normalizedInput.day || 0,\n hours = normalizedInput.hour || 0,\n minutes = normalizedInput.minute || 0,\n seconds = normalizedInput.second || 0,\n milliseconds = normalizedInput.millisecond || 0;\n this._isValid = isDurationValid(normalizedInput); // representation for dateAddRemove\n\n this._milliseconds = +milliseconds + seconds * 1e3 + // 1000\n minutes * 6e4 + // 1000 * 60\n hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978\n // Because of dateAddRemove treats 24 hours as different from a\n // day when working around DST, we need to store them separately\n\n this._days = +days + weeks * 7; // It is impossible to translate months into days without knowing\n // which months you are are talking about, so we have to store\n // it separately.\n\n this._months = +months + quarters * 3 + years * 12;\n this._data = {};\n this._locale = getLocale();\n\n this._bubble();\n }\n\n function isDuration(obj) {\n return obj instanceof Duration;\n }\n\n function absRound(number) {\n if (number < 0) {\n return Math.round(-1 * number) * -1;\n } else {\n return Math.round(number);\n }\n } // FORMATTING\n\n\n function offset(token, separator) {\n addFormatToken(token, 0, 0, function () {\n var offset = this.utcOffset();\n var sign = '+';\n\n if (offset < 0) {\n offset = -offset;\n sign = '-';\n }\n\n return sign + zeroFill(~~(offset / 60), 2) + separator + zeroFill(~~offset % 60, 2);\n });\n }\n\n offset('Z', ':');\n offset('ZZ', ''); // PARSING\n\n addRegexToken('Z', matchShortOffset);\n addRegexToken('ZZ', matchShortOffset);\n addParseToken(['Z', 'ZZ'], function (input, array, config) {\n config._useUTC = true;\n config._tzm = offsetFromString(matchShortOffset, input);\n }); // HELPERS\n // timezone chunker\n // '+10:00' > ['10', '00']\n // '-1530' > ['-15', '30']\n\n var chunkOffset = /([\\+\\-]|\\d\\d)/gi;\n\n function offsetFromString(matcher, string) {\n var matches = (string || '').match(matcher);\n\n if (matches === null) {\n return null;\n }\n\n var chunk = matches[matches.length - 1] || [];\n var parts = (chunk + '').match(chunkOffset) || ['-', 0, 0];\n var minutes = +(parts[1] * 60) + toInt(parts[2]);\n return minutes === 0 ? 0 : parts[0] === '+' ? minutes : -minutes;\n } // Return a moment from input, that is local/utc/zone equivalent to model.\n\n\n function cloneWithOffset(input, model) {\n var res, diff;\n\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? input.valueOf() : createLocal(input).valueOf()) - res.valueOf(); // Use low-level api, because this fn is low-level api.\n\n res._d.setTime(res._d.valueOf() + diff);\n\n hooks.updateOffset(res, false);\n return res;\n } else {\n return createLocal(input).local();\n }\n }\n\n function getDateOffset(m) {\n // On Firefox.24 Date#getTimezoneOffset returns a floating point.\n // https://github.com/moment/moment/pull/1871\n return -Math.round(m._d.getTimezoneOffset() / 15) * 15;\n } // HOOKS\n // This function will be called whenever a moment is mutated.\n // It is intended to keep the offset in sync with the timezone.\n\n\n hooks.updateOffset = function () {}; // MOMENTS\n // keepLocalTime = true means only change the timezone, without\n // affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]-->\n // 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset\n // +0200, so we adjust the time as needed, to be valid.\n //\n // Keeping the time actually adds/subtracts (one hour)\n // from the actual represented time. That is why we call updateOffset\n // a second time. In case it wants us to change the offset again\n // _changeInProgress == true case, then we have to adjust, because\n // there is no such time in the given timezone.\n\n\n function getSetOffset(input, keepLocalTime, keepMinutes) {\n var offset = this._offset || 0,\n localAdjust;\n\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n\n if (input === null) {\n return this;\n }\n } else if (Math.abs(input) < 16 && !keepMinutes) {\n input = input * 60;\n }\n\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n\n this._offset = input;\n this._isUTC = true;\n\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n addSubtract(this, createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }\n\n function getSetZone(input, keepLocalTime) {\n if (input != null) {\n if (typeof input !== 'string') {\n input = -input;\n }\n\n this.utcOffset(input, keepLocalTime);\n return this;\n } else {\n return -this.utcOffset();\n }\n }\n\n function setOffsetToUTC(keepLocalTime) {\n return this.utcOffset(0, keepLocalTime);\n }\n\n function setOffsetToLocal(keepLocalTime) {\n if (this._isUTC) {\n this.utcOffset(0, keepLocalTime);\n this._isUTC = false;\n\n if (keepLocalTime) {\n this.subtract(getDateOffset(this), 'm');\n }\n }\n\n return this;\n }\n\n function setOffsetToParsedOffset() {\n if (this._tzm != null) {\n this.utcOffset(this._tzm, false, true);\n } else if (typeof this._i === 'string') {\n var tZone = offsetFromString(matchOffset, this._i);\n\n if (tZone != null) {\n this.utcOffset(tZone);\n } else {\n this.utcOffset(0, true);\n }\n }\n\n return this;\n }\n\n function hasAlignedHourOffset(input) {\n if (!this.isValid()) {\n return false;\n }\n\n input = input ? createLocal(input).utcOffset() : 0;\n return (this.utcOffset() - input) % 60 === 0;\n }\n\n function isDaylightSavingTime() {\n return this.utcOffset() > this.clone().month(0).utcOffset() || this.utcOffset() > this.clone().month(5).utcOffset();\n }\n\n function isDaylightSavingTimeShifted() {\n if (!isUndefined(this._isDSTShifted)) {\n return this._isDSTShifted;\n }\n\n var c = {};\n copyConfig(c, this);\n c = prepareConfig(c);\n\n if (c._a) {\n var other = c._isUTC ? createUTC(c._a) : createLocal(c._a);\n this._isDSTShifted = this.isValid() && compareArrays(c._a, other.toArray()) > 0;\n } else {\n this._isDSTShifted = false;\n }\n\n return this._isDSTShifted;\n }\n\n function isLocal() {\n return this.isValid() ? !this._isUTC : false;\n }\n\n function isUtcOffset() {\n return this.isValid() ? this._isUTC : false;\n }\n\n function isUtc() {\n return this.isValid() ? this._isUTC && this._offset === 0 : false;\n } // ASP.NET json date format regex\n\n\n var aspNetRegex = /^(\\-|\\+)?(?:(\\d*)[. ])?(\\d+)\\:(\\d+)(?:\\:(\\d+)(\\.\\d*)?)?$/; // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html\n // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere\n // and further modified to allow for strings containing both week and day\n\n var isoRegex = /^(-|\\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;\n\n function createDuration(input, key) {\n var duration = input,\n // matching against regexp is expensive, do it on demand\n match = null,\n sign,\n ret,\n diffRes;\n\n if (isDuration(input)) {\n duration = {\n ms: input._milliseconds,\n d: input._days,\n M: input._months\n };\n } else if (isNumber(input)) {\n duration = {};\n\n if (key) {\n duration[key] = input;\n } else {\n duration.milliseconds = input;\n }\n } else if (!!(match = aspNetRegex.exec(input))) {\n sign = match[1] === '-' ? -1 : 1;\n duration = {\n y: 0,\n d: toInt(match[DATE]) * sign,\n h: toInt(match[HOUR]) * sign,\n m: toInt(match[MINUTE]) * sign,\n s: toInt(match[SECOND]) * sign,\n ms: toInt(absRound(match[MILLISECOND] * 1000)) * sign // the millisecond decimal point is included in the match\n\n };\n } else if (!!(match = isoRegex.exec(input))) {\n sign = match[1] === '-' ? -1 : 1;\n duration = {\n y: parseIso(match[2], sign),\n M: parseIso(match[3], sign),\n w: parseIso(match[4], sign),\n d: parseIso(match[5], sign),\n h: parseIso(match[6], sign),\n m: parseIso(match[7], sign),\n s: parseIso(match[8], sign)\n };\n } else if (duration == null) {\n // checks for null or undefined\n duration = {};\n } else if (typeof duration === 'object' && ('from' in duration || 'to' in duration)) {\n diffRes = momentsDifference(createLocal(duration.from), createLocal(duration.to));\n duration = {};\n duration.ms = diffRes.milliseconds;\n duration.M = diffRes.months;\n }\n\n ret = new Duration(duration);\n\n if (isDuration(input) && hasOwnProp(input, '_locale')) {\n ret._locale = input._locale;\n }\n\n return ret;\n }\n\n createDuration.fn = Duration.prototype;\n createDuration.invalid = createInvalid$1;\n\n function parseIso(inp, sign) {\n // We'd normally use ~~inp for this, but unfortunately it also\n // converts floats to ints.\n // inp may be undefined, so careful calling replace on it.\n var res = inp && parseFloat(inp.replace(',', '.')); // apply sign while we're at it\n\n return (isNaN(res) ? 0 : res) * sign;\n }\n\n function positiveMomentsDifference(base, other) {\n var res = {};\n res.months = other.month() - base.month() + (other.year() - base.year()) * 12;\n\n if (base.clone().add(res.months, 'M').isAfter(other)) {\n --res.months;\n }\n\n res.milliseconds = +other - +base.clone().add(res.months, 'M');\n return res;\n }\n\n function momentsDifference(base, other) {\n var res;\n\n if (!(base.isValid() && other.isValid())) {\n return {\n milliseconds: 0,\n months: 0\n };\n }\n\n other = cloneWithOffset(other, base);\n\n if (base.isBefore(other)) {\n res = positiveMomentsDifference(base, other);\n } else {\n res = positiveMomentsDifference(other, base);\n res.milliseconds = -res.milliseconds;\n res.months = -res.months;\n }\n\n return res;\n } // TODO: remove 'name' arg after deprecation is removed\n\n\n function createAdder(direction, name) {\n return function (val, period) {\n var dur, tmp; //invert the arguments, but complain about it\n\n if (period !== null && !isNaN(+period)) {\n deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' + 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.');\n tmp = val;\n val = period;\n period = tmp;\n }\n\n val = typeof val === 'string' ? +val : val;\n dur = createDuration(val, period);\n addSubtract(this, dur, direction);\n return this;\n };\n }\n\n function addSubtract(mom, duration, isAdding, updateOffset) {\n var milliseconds = duration._milliseconds,\n days = absRound(duration._days),\n months = absRound(duration._months);\n\n if (!mom.isValid()) {\n // No op\n return;\n }\n\n updateOffset = updateOffset == null ? true : updateOffset;\n\n if (months) {\n setMonth(mom, get(mom, 'Month') + months * isAdding);\n }\n\n if (days) {\n set$1(mom, 'Date', get(mom, 'Date') + days * isAdding);\n }\n\n if (milliseconds) {\n mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding);\n }\n\n if (updateOffset) {\n hooks.updateOffset(mom, days || months);\n }\n }\n\n var add = createAdder(1, 'add');\n var subtract = createAdder(-1, 'subtract');\n\n function getCalendarFormat(myMoment, now) {\n var diff = myMoment.diff(now, 'days', true);\n return diff < -6 ? 'sameElse' : diff < -1 ? 'lastWeek' : diff < 0 ? 'lastDay' : diff < 1 ? 'sameDay' : diff < 2 ? 'nextDay' : diff < 7 ? 'nextWeek' : 'sameElse';\n }\n\n function calendar$1(time, formats) {\n // We want to compare the start of today, vs this.\n // Getting start-of-today depends on whether we're local/utc/offset or not.\n var now = time || createLocal(),\n sod = cloneWithOffset(now, this).startOf('day'),\n format = hooks.calendarFormat(this, sod) || 'sameElse';\n var output = formats && (isFunction(formats[format]) ? formats[format].call(this, now) : formats[format]);\n return this.format(output || this.localeData().calendar(format, this, createLocal(now)));\n }\n\n function clone() {\n return new Moment(this);\n }\n\n function isAfter(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input);\n\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n\n units = normalizeUnits(units) || 'millisecond';\n\n if (units === 'millisecond') {\n return this.valueOf() > localInput.valueOf();\n } else {\n return localInput.valueOf() < this.clone().startOf(units).valueOf();\n }\n }\n\n function isBefore(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input);\n\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n\n units = normalizeUnits(units) || 'millisecond';\n\n if (units === 'millisecond') {\n return this.valueOf() < localInput.valueOf();\n } else {\n return this.clone().endOf(units).valueOf() < localInput.valueOf();\n }\n }\n\n function isBetween(from, to, units, inclusivity) {\n var localFrom = isMoment(from) ? from : createLocal(from),\n localTo = isMoment(to) ? to : createLocal(to);\n\n if (!(this.isValid() && localFrom.isValid() && localTo.isValid())) {\n return false;\n }\n\n inclusivity = inclusivity || '()';\n return (inclusivity[0] === '(' ? this.isAfter(localFrom, units) : !this.isBefore(localFrom, units)) && (inclusivity[1] === ')' ? this.isBefore(localTo, units) : !this.isAfter(localTo, units));\n }\n\n function isSame(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input),\n inputMs;\n\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n\n units = normalizeUnits(units) || 'millisecond';\n\n if (units === 'millisecond') {\n return this.valueOf() === localInput.valueOf();\n } else {\n inputMs = localInput.valueOf();\n return this.clone().startOf(units).valueOf() <= inputMs && inputMs <= this.clone().endOf(units).valueOf();\n }\n }\n\n function isSameOrAfter(input, units) {\n return this.isSame(input, units) || this.isAfter(input, units);\n }\n\n function isSameOrBefore(input, units) {\n return this.isSame(input, units) || this.isBefore(input, units);\n }\n\n function diff(input, units, asFloat) {\n var that, zoneDelta, output;\n\n if (!this.isValid()) {\n return NaN;\n }\n\n that = cloneWithOffset(input, this);\n\n if (!that.isValid()) {\n return NaN;\n }\n\n zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4;\n units = normalizeUnits(units);\n\n switch (units) {\n case 'year':\n output = monthDiff(this, that) / 12;\n break;\n\n case 'month':\n output = monthDiff(this, that);\n break;\n\n case 'quarter':\n output = monthDiff(this, that) / 3;\n break;\n\n case 'second':\n output = (this - that) / 1e3;\n break;\n // 1000\n\n case 'minute':\n output = (this - that) / 6e4;\n break;\n // 1000 * 60\n\n case 'hour':\n output = (this - that) / 36e5;\n break;\n // 1000 * 60 * 60\n\n case 'day':\n output = (this - that - zoneDelta) / 864e5;\n break;\n // 1000 * 60 * 60 * 24, negate dst\n\n case 'week':\n output = (this - that - zoneDelta) / 6048e5;\n break;\n // 1000 * 60 * 60 * 24 * 7, negate dst\n\n default:\n output = this - that;\n }\n\n return asFloat ? output : absFloor(output);\n }\n\n function monthDiff(a, b) {\n // difference in months\n var wholeMonthDiff = (b.year() - a.year()) * 12 + (b.month() - a.month()),\n // b is in (anchor - 1 month, anchor + 1 month)\n anchor = a.clone().add(wholeMonthDiff, 'months'),\n anchor2,\n adjust;\n\n if (b - anchor < 0) {\n anchor2 = a.clone().add(wholeMonthDiff - 1, 'months'); // linear across the month\n\n adjust = (b - anchor) / (anchor - anchor2);\n } else {\n anchor2 = a.clone().add(wholeMonthDiff + 1, 'months'); // linear across the month\n\n adjust = (b - anchor) / (anchor2 - anchor);\n } //check for negative zero, return zero if negative zero\n\n\n return -(wholeMonthDiff + adjust) || 0;\n }\n\n hooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ';\n hooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]';\n\n function toString() {\n return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ');\n }\n\n function toISOString(keepOffset) {\n if (!this.isValid()) {\n return null;\n }\n\n var utc = keepOffset !== true;\n var m = utc ? this.clone().utc() : this;\n\n if (m.year() < 0 || m.year() > 9999) {\n return formatMoment(m, utc ? 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYYYY-MM-DD[T]HH:mm:ss.SSSZ');\n }\n\n if (isFunction(Date.prototype.toISOString)) {\n // native implementation is ~50x faster, use it when we can\n if (utc) {\n return this.toDate().toISOString();\n } else {\n return new Date(this.valueOf() + this.utcOffset() * 60 * 1000).toISOString().replace('Z', formatMoment(m, 'Z'));\n }\n }\n\n return formatMoment(m, utc ? 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYY-MM-DD[T]HH:mm:ss.SSSZ');\n }\n /**\n * Return a human readable representation of a moment that can\n * also be evaluated to get a new moment which is the same\n *\n * @link https://nodejs.org/dist/latest/docs/api/util.html#util_custom_inspect_function_on_objects\n */\n\n\n function inspect() {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n\n var func = 'moment';\n var zone = '';\n\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n\n var prefix = '[' + func + '(\"]';\n var year = 0 <= this.year() && this.year() <= 9999 ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n return this.format(prefix + year + datetime + suffix);\n }\n\n function format(inputString) {\n if (!inputString) {\n inputString = this.isUtc() ? hooks.defaultFormatUtc : hooks.defaultFormat;\n }\n\n var output = formatMoment(this, inputString);\n return this.localeData().postformat(output);\n }\n\n function from(time, withoutSuffix) {\n if (this.isValid() && (isMoment(time) && time.isValid() || createLocal(time).isValid())) {\n return createDuration({\n to: this,\n from: time\n }).locale(this.locale()).humanize(!withoutSuffix);\n } else {\n return this.localeData().invalidDate();\n }\n }\n\n function fromNow(withoutSuffix) {\n return this.from(createLocal(), withoutSuffix);\n }\n\n function to(time, withoutSuffix) {\n if (this.isValid() && (isMoment(time) && time.isValid() || createLocal(time).isValid())) {\n return createDuration({\n from: this,\n to: time\n }).locale(this.locale()).humanize(!withoutSuffix);\n } else {\n return this.localeData().invalidDate();\n }\n }\n\n function toNow(withoutSuffix) {\n return this.to(createLocal(), withoutSuffix);\n } // If passed a locale key, it will set the locale for this\n // instance. Otherwise, it will return the locale configuration\n // variables for this instance.\n\n\n function locale(key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n\n return this;\n }\n }\n\n var lang = deprecate('moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.', function (key) {\n if (key === undefined) {\n return this.localeData();\n } else {\n return this.locale(key);\n }\n });\n\n function localeData() {\n return this._locale;\n }\n\n var MS_PER_SECOND = 1000;\n var MS_PER_MINUTE = 60 * MS_PER_SECOND;\n var MS_PER_HOUR = 60 * MS_PER_MINUTE;\n var MS_PER_400_YEARS = (365 * 400 + 97) * 24 * MS_PER_HOUR; // actual modulo - handles negative numbers (for dates before 1970):\n\n function mod$1(dividend, divisor) {\n return (dividend % divisor + divisor) % divisor;\n }\n\n function localStartOfDate(y, m, d) {\n // the date constructor remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n return new Date(y + 400, m, d) - MS_PER_400_YEARS;\n } else {\n return new Date(y, m, d).valueOf();\n }\n }\n\n function utcStartOfDate(y, m, d) {\n // Date.UTC remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n return Date.UTC(y + 400, m, d) - MS_PER_400_YEARS;\n } else {\n return Date.UTC(y, m, d);\n }\n }\n\n function startOf(units) {\n var time;\n units = normalizeUnits(units);\n\n if (units === undefined || units === 'millisecond' || !this.isValid()) {\n return this;\n }\n\n var startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;\n\n switch (units) {\n case 'year':\n time = startOfDate(this.year(), 0, 1);\n break;\n\n case 'quarter':\n time = startOfDate(this.year(), this.month() - this.month() % 3, 1);\n break;\n\n case 'month':\n time = startOfDate(this.year(), this.month(), 1);\n break;\n\n case 'week':\n time = startOfDate(this.year(), this.month(), this.date() - this.weekday());\n break;\n\n case 'isoWeek':\n time = startOfDate(this.year(), this.month(), this.date() - (this.isoWeekday() - 1));\n break;\n\n case 'day':\n case 'date':\n time = startOfDate(this.year(), this.month(), this.date());\n break;\n\n case 'hour':\n time = this._d.valueOf();\n time -= mod$1(time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE), MS_PER_HOUR);\n break;\n\n case 'minute':\n time = this._d.valueOf();\n time -= mod$1(time, MS_PER_MINUTE);\n break;\n\n case 'second':\n time = this._d.valueOf();\n time -= mod$1(time, MS_PER_SECOND);\n break;\n }\n\n this._d.setTime(time);\n\n hooks.updateOffset(this, true);\n return this;\n }\n\n function endOf(units) {\n var time;\n units = normalizeUnits(units);\n\n if (units === undefined || units === 'millisecond' || !this.isValid()) {\n return this;\n }\n\n var startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;\n\n switch (units) {\n case 'year':\n time = startOfDate(this.year() + 1, 0, 1) - 1;\n break;\n\n case 'quarter':\n time = startOfDate(this.year(), this.month() - this.month() % 3 + 3, 1) - 1;\n break;\n\n case 'month':\n time = startOfDate(this.year(), this.month() + 1, 1) - 1;\n break;\n\n case 'week':\n time = startOfDate(this.year(), this.month(), this.date() - this.weekday() + 7) - 1;\n break;\n\n case 'isoWeek':\n time = startOfDate(this.year(), this.month(), this.date() - (this.isoWeekday() - 1) + 7) - 1;\n break;\n\n case 'day':\n case 'date':\n time = startOfDate(this.year(), this.month(), this.date() + 1) - 1;\n break;\n\n case 'hour':\n time = this._d.valueOf();\n time += MS_PER_HOUR - mod$1(time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE), MS_PER_HOUR) - 1;\n break;\n\n case 'minute':\n time = this._d.valueOf();\n time += MS_PER_MINUTE - mod$1(time, MS_PER_MINUTE) - 1;\n break;\n\n case 'second':\n time = this._d.valueOf();\n time += MS_PER_SECOND - mod$1(time, MS_PER_SECOND) - 1;\n break;\n }\n\n this._d.setTime(time);\n\n hooks.updateOffset(this, true);\n return this;\n }\n\n function valueOf() {\n return this._d.valueOf() - (this._offset || 0) * 60000;\n }\n\n function unix() {\n return Math.floor(this.valueOf() / 1000);\n }\n\n function toDate() {\n return new Date(this.valueOf());\n }\n\n function toArray() {\n var m = this;\n return [m.year(), m.month(), m.date(), m.hour(), m.minute(), m.second(), m.millisecond()];\n }\n\n function toObject() {\n var m = this;\n return {\n years: m.year(),\n months: m.month(),\n date: m.date(),\n hours: m.hours(),\n minutes: m.minutes(),\n seconds: m.seconds(),\n milliseconds: m.milliseconds()\n };\n }\n\n function toJSON() {\n // new Date(NaN).toJSON() === null\n return this.isValid() ? this.toISOString() : null;\n }\n\n function isValid$2() {\n return isValid(this);\n }\n\n function parsingFlags() {\n return extend({}, getParsingFlags(this));\n }\n\n function invalidAt() {\n return getParsingFlags(this).overflow;\n }\n\n function creationData() {\n return {\n input: this._i,\n format: this._f,\n locale: this._locale,\n isUTC: this._isUTC,\n strict: this._strict\n };\n } // FORMATTING\n\n\n addFormatToken(0, ['gg', 2], 0, function () {\n return this.weekYear() % 100;\n });\n addFormatToken(0, ['GG', 2], 0, function () {\n return this.isoWeekYear() % 100;\n });\n\n function addWeekYearFormatToken(token, getter) {\n addFormatToken(0, [token, token.length], 0, getter);\n }\n\n addWeekYearFormatToken('gggg', 'weekYear');\n addWeekYearFormatToken('ggggg', 'weekYear');\n addWeekYearFormatToken('GGGG', 'isoWeekYear');\n addWeekYearFormatToken('GGGGG', 'isoWeekYear'); // ALIASES\n\n addUnitAlias('weekYear', 'gg');\n addUnitAlias('isoWeekYear', 'GG'); // PRIORITY\n\n addUnitPriority('weekYear', 1);\n addUnitPriority('isoWeekYear', 1); // PARSING\n\n addRegexToken('G', matchSigned);\n addRegexToken('g', matchSigned);\n addRegexToken('GG', match1to2, match2);\n addRegexToken('gg', match1to2, match2);\n addRegexToken('GGGG', match1to4, match4);\n addRegexToken('gggg', match1to4, match4);\n addRegexToken('GGGGG', match1to6, match6);\n addRegexToken('ggggg', match1to6, match6);\n addWeekParseToken(['gggg', 'ggggg', 'GGGG', 'GGGGG'], function (input, week, config, token) {\n week[token.substr(0, 2)] = toInt(input);\n });\n addWeekParseToken(['gg', 'GG'], function (input, week, config, token) {\n week[token] = hooks.parseTwoDigitYear(input);\n }); // MOMENTS\n\n function getSetWeekYear(input) {\n return getSetWeekYearHelper.call(this, input, this.week(), this.weekday(), this.localeData()._week.dow, this.localeData()._week.doy);\n }\n\n function getSetISOWeekYear(input) {\n return getSetWeekYearHelper.call(this, input, this.isoWeek(), this.isoWeekday(), 1, 4);\n }\n\n function getISOWeeksInYear() {\n return weeksInYear(this.year(), 1, 4);\n }\n\n function getWeeksInYear() {\n var weekInfo = this.localeData()._week;\n\n return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy);\n }\n\n function getSetWeekYearHelper(input, week, weekday, dow, doy) {\n var weeksTarget;\n\n if (input == null) {\n return weekOfYear(this, dow, doy).year;\n } else {\n weeksTarget = weeksInYear(input, dow, doy);\n\n if (week > weeksTarget) {\n week = weeksTarget;\n }\n\n return setWeekAll.call(this, input, week, weekday, dow, doy);\n }\n }\n\n function setWeekAll(weekYear, week, weekday, dow, doy) {\n var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy),\n date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear);\n this.year(date.getUTCFullYear());\n this.month(date.getUTCMonth());\n this.date(date.getUTCDate());\n return this;\n } // FORMATTING\n\n\n addFormatToken('Q', 0, 'Qo', 'quarter'); // ALIASES\n\n addUnitAlias('quarter', 'Q'); // PRIORITY\n\n addUnitPriority('quarter', 7); // PARSING\n\n addRegexToken('Q', match1);\n addParseToken('Q', function (input, array) {\n array[MONTH] = (toInt(input) - 1) * 3;\n }); // MOMENTS\n\n function getSetQuarter(input) {\n return input == null ? Math.ceil((this.month() + 1) / 3) : this.month((input - 1) * 3 + this.month() % 3);\n } // FORMATTING\n\n\n addFormatToken('D', ['DD', 2], 'Do', 'date'); // ALIASES\n\n addUnitAlias('date', 'D'); // PRIORITY\n\n addUnitPriority('date', 9); // PARSING\n\n addRegexToken('D', match1to2);\n addRegexToken('DD', match1to2, match2);\n addRegexToken('Do', function (isStrict, locale) {\n // TODO: Remove \"ordinalParse\" fallback in next major release.\n return isStrict ? locale._dayOfMonthOrdinalParse || locale._ordinalParse : locale._dayOfMonthOrdinalParseLenient;\n });\n addParseToken(['D', 'DD'], DATE);\n addParseToken('Do', function (input, array) {\n array[DATE] = toInt(input.match(match1to2)[0]);\n }); // MOMENTS\n\n var getSetDayOfMonth = makeGetSet('Date', true); // FORMATTING\n\n addFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear'); // ALIASES\n\n addUnitAlias('dayOfYear', 'DDD'); // PRIORITY\n\n addUnitPriority('dayOfYear', 4); // PARSING\n\n addRegexToken('DDD', match1to3);\n addRegexToken('DDDD', match3);\n addParseToken(['DDD', 'DDDD'], function (input, array, config) {\n config._dayOfYear = toInt(input);\n }); // HELPERS\n // MOMENTS\n\n function getSetDayOfYear(input) {\n var dayOfYear = Math.round((this.clone().startOf('day') - this.clone().startOf('year')) / 864e5) + 1;\n return input == null ? dayOfYear : this.add(input - dayOfYear, 'd');\n } // FORMATTING\n\n\n addFormatToken('m', ['mm', 2], 0, 'minute'); // ALIASES\n\n addUnitAlias('minute', 'm'); // PRIORITY\n\n addUnitPriority('minute', 14); // PARSING\n\n addRegexToken('m', match1to2);\n addRegexToken('mm', match1to2, match2);\n addParseToken(['m', 'mm'], MINUTE); // MOMENTS\n\n var getSetMinute = makeGetSet('Minutes', false); // FORMATTING\n\n addFormatToken('s', ['ss', 2], 0, 'second'); // ALIASES\n\n addUnitAlias('second', 's'); // PRIORITY\n\n addUnitPriority('second', 15); // PARSING\n\n addRegexToken('s', match1to2);\n addRegexToken('ss', match1to2, match2);\n addParseToken(['s', 'ss'], SECOND); // MOMENTS\n\n var getSetSecond = makeGetSet('Seconds', false); // FORMATTING\n\n addFormatToken('S', 0, 0, function () {\n return ~~(this.millisecond() / 100);\n });\n addFormatToken(0, ['SS', 2], 0, function () {\n return ~~(this.millisecond() / 10);\n });\n addFormatToken(0, ['SSS', 3], 0, 'millisecond');\n addFormatToken(0, ['SSSS', 4], 0, function () {\n return this.millisecond() * 10;\n });\n addFormatToken(0, ['SSSSS', 5], 0, function () {\n return this.millisecond() * 100;\n });\n addFormatToken(0, ['SSSSSS', 6], 0, function () {\n return this.millisecond() * 1000;\n });\n addFormatToken(0, ['SSSSSSS', 7], 0, function () {\n return this.millisecond() * 10000;\n });\n addFormatToken(0, ['SSSSSSSS', 8], 0, function () {\n return this.millisecond() * 100000;\n });\n addFormatToken(0, ['SSSSSSSSS', 9], 0, function () {\n return this.millisecond() * 1000000;\n }); // ALIASES\n\n addUnitAlias('millisecond', 'ms'); // PRIORITY\n\n addUnitPriority('millisecond', 16); // PARSING\n\n addRegexToken('S', match1to3, match1);\n addRegexToken('SS', match1to3, match2);\n addRegexToken('SSS', match1to3, match3);\n var token;\n\n for (token = 'SSSS'; token.length <= 9; token += 'S') {\n addRegexToken(token, matchUnsigned);\n }\n\n function parseMs(input, array) {\n array[MILLISECOND] = toInt(('0.' + input) * 1000);\n }\n\n for (token = 'S'; token.length <= 9; token += 'S') {\n addParseToken(token, parseMs);\n } // MOMENTS\n\n\n var getSetMillisecond = makeGetSet('Milliseconds', false); // FORMATTING\n\n addFormatToken('z', 0, 0, 'zoneAbbr');\n addFormatToken('zz', 0, 0, 'zoneName'); // MOMENTS\n\n function getZoneAbbr() {\n return this._isUTC ? 'UTC' : '';\n }\n\n function getZoneName() {\n return this._isUTC ? 'Coordinated Universal Time' : '';\n }\n\n var proto = Moment.prototype;\n proto.add = add;\n proto.calendar = calendar$1;\n proto.clone = clone;\n proto.diff = diff;\n proto.endOf = endOf;\n proto.format = format;\n proto.from = from;\n proto.fromNow = fromNow;\n proto.to = to;\n proto.toNow = toNow;\n proto.get = stringGet;\n proto.invalidAt = invalidAt;\n proto.isAfter = isAfter;\n proto.isBefore = isBefore;\n proto.isBetween = isBetween;\n proto.isSame = isSame;\n proto.isSameOrAfter = isSameOrAfter;\n proto.isSameOrBefore = isSameOrBefore;\n proto.isValid = isValid$2;\n proto.lang = lang;\n proto.locale = locale;\n proto.localeData = localeData;\n proto.max = prototypeMax;\n proto.min = prototypeMin;\n proto.parsingFlags = parsingFlags;\n proto.set = stringSet;\n proto.startOf = startOf;\n proto.subtract = subtract;\n proto.toArray = toArray;\n proto.toObject = toObject;\n proto.toDate = toDate;\n proto.toISOString = toISOString;\n proto.inspect = inspect;\n proto.toJSON = toJSON;\n proto.toString = toString;\n proto.unix = unix;\n proto.valueOf = valueOf;\n proto.creationData = creationData;\n proto.year = getSetYear;\n proto.isLeapYear = getIsLeapYear;\n proto.weekYear = getSetWeekYear;\n proto.isoWeekYear = getSetISOWeekYear;\n proto.quarter = proto.quarters = getSetQuarter;\n proto.month = getSetMonth;\n proto.daysInMonth = getDaysInMonth;\n proto.week = proto.weeks = getSetWeek;\n proto.isoWeek = proto.isoWeeks = getSetISOWeek;\n proto.weeksInYear = getWeeksInYear;\n proto.isoWeeksInYear = getISOWeeksInYear;\n proto.date = getSetDayOfMonth;\n proto.day = proto.days = getSetDayOfWeek;\n proto.weekday = getSetLocaleDayOfWeek;\n proto.isoWeekday = getSetISODayOfWeek;\n proto.dayOfYear = getSetDayOfYear;\n proto.hour = proto.hours = getSetHour;\n proto.minute = proto.minutes = getSetMinute;\n proto.second = proto.seconds = getSetSecond;\n proto.millisecond = proto.milliseconds = getSetMillisecond;\n proto.utcOffset = getSetOffset;\n proto.utc = setOffsetToUTC;\n proto.local = setOffsetToLocal;\n proto.parseZone = setOffsetToParsedOffset;\n proto.hasAlignedHourOffset = hasAlignedHourOffset;\n proto.isDST = isDaylightSavingTime;\n proto.isLocal = isLocal;\n proto.isUtcOffset = isUtcOffset;\n proto.isUtc = isUtc;\n proto.isUTC = isUtc;\n proto.zoneAbbr = getZoneAbbr;\n proto.zoneName = getZoneName;\n proto.dates = deprecate('dates accessor is deprecated. Use date instead.', getSetDayOfMonth);\n proto.months = deprecate('months accessor is deprecated. Use month instead', getSetMonth);\n proto.years = deprecate('years accessor is deprecated. Use year instead', getSetYear);\n proto.zone = deprecate('moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/', getSetZone);\n proto.isDSTShifted = deprecate('isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information', isDaylightSavingTimeShifted);\n\n function createUnix(input) {\n return createLocal(input * 1000);\n }\n\n function createInZone() {\n return createLocal.apply(null, arguments).parseZone();\n }\n\n function preParsePostFormat(string) {\n return string;\n }\n\n var proto$1 = Locale.prototype;\n proto$1.calendar = calendar;\n proto$1.longDateFormat = longDateFormat;\n proto$1.invalidDate = invalidDate;\n proto$1.ordinal = ordinal;\n proto$1.preparse = preParsePostFormat;\n proto$1.postformat = preParsePostFormat;\n proto$1.relativeTime = relativeTime;\n proto$1.pastFuture = pastFuture;\n proto$1.set = set;\n proto$1.months = localeMonths;\n proto$1.monthsShort = localeMonthsShort;\n proto$1.monthsParse = localeMonthsParse;\n proto$1.monthsRegex = monthsRegex;\n proto$1.monthsShortRegex = monthsShortRegex;\n proto$1.week = localeWeek;\n proto$1.firstDayOfYear = localeFirstDayOfYear;\n proto$1.firstDayOfWeek = localeFirstDayOfWeek;\n proto$1.weekdays = localeWeekdays;\n proto$1.weekdaysMin = localeWeekdaysMin;\n proto$1.weekdaysShort = localeWeekdaysShort;\n proto$1.weekdaysParse = localeWeekdaysParse;\n proto$1.weekdaysRegex = weekdaysRegex;\n proto$1.weekdaysShortRegex = weekdaysShortRegex;\n proto$1.weekdaysMinRegex = weekdaysMinRegex;\n proto$1.isPM = localeIsPM;\n proto$1.meridiem = localeMeridiem;\n\n function get$1(format, index, field, setter) {\n var locale = getLocale();\n var utc = createUTC().set(setter, index);\n return locale[field](utc, format);\n }\n\n function listMonthsImpl(format, index, field) {\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n\n if (index != null) {\n return get$1(format, index, field, 'month');\n }\n\n var i;\n var out = [];\n\n for (i = 0; i < 12; i++) {\n out[i] = get$1(format, i, field, 'month');\n }\n\n return out;\n } // ()\n // (5)\n // (fmt, 5)\n // (fmt)\n // (true)\n // (true, 5)\n // (true, fmt, 5)\n // (true, fmt)\n\n\n function listWeekdaysImpl(localeSorted, format, index, field) {\n if (typeof localeSorted === 'boolean') {\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n } else {\n format = localeSorted;\n index = format;\n localeSorted = false;\n\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n }\n\n var locale = getLocale(),\n shift = localeSorted ? locale._week.dow : 0;\n\n if (index != null) {\n return get$1(format, (index + shift) % 7, field, 'day');\n }\n\n var i;\n var out = [];\n\n for (i = 0; i < 7; i++) {\n out[i] = get$1(format, (i + shift) % 7, field, 'day');\n }\n\n return out;\n }\n\n function listMonths(format, index) {\n return listMonthsImpl(format, index, 'months');\n }\n\n function listMonthsShort(format, index) {\n return listMonthsImpl(format, index, 'monthsShort');\n }\n\n function listWeekdays(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdays');\n }\n\n function listWeekdaysShort(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort');\n }\n\n function listWeekdaysMin(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin');\n }\n\n getSetGlobalLocale('en', {\n dayOfMonthOrdinalParse: /\\d{1,2}(th|st|nd|rd)/,\n ordinal: function (number) {\n var b = number % 10,\n output = toInt(number % 100 / 10) === 1 ? 'th' : b === 1 ? 'st' : b === 2 ? 'nd' : b === 3 ? 'rd' : 'th';\n return number + output;\n }\n }); // Side effect imports\n\n hooks.lang = deprecate('moment.lang is deprecated. Use moment.locale instead.', getSetGlobalLocale);\n hooks.langData = deprecate('moment.langData is deprecated. Use moment.localeData instead.', getLocale);\n var mathAbs = Math.abs;\n\n function abs() {\n var data = this._data;\n this._milliseconds = mathAbs(this._milliseconds);\n this._days = mathAbs(this._days);\n this._months = mathAbs(this._months);\n data.milliseconds = mathAbs(data.milliseconds);\n data.seconds = mathAbs(data.seconds);\n data.minutes = mathAbs(data.minutes);\n data.hours = mathAbs(data.hours);\n data.months = mathAbs(data.months);\n data.years = mathAbs(data.years);\n return this;\n }\n\n function addSubtract$1(duration, input, value, direction) {\n var other = createDuration(input, value);\n duration._milliseconds += direction * other._milliseconds;\n duration._days += direction * other._days;\n duration._months += direction * other._months;\n return duration._bubble();\n } // supports only 2.0-style add(1, 's') or add(duration)\n\n\n function add$1(input, value) {\n return addSubtract$1(this, input, value, 1);\n } // supports only 2.0-style subtract(1, 's') or subtract(duration)\n\n\n function subtract$1(input, value) {\n return addSubtract$1(this, input, value, -1);\n }\n\n function absCeil(number) {\n if (number < 0) {\n return Math.floor(number);\n } else {\n return Math.ceil(number);\n }\n }\n\n function bubble() {\n var milliseconds = this._milliseconds;\n var days = this._days;\n var months = this._months;\n var data = this._data;\n var seconds, minutes, hours, years, monthsFromDays; // if we have a mix of positive and negative values, bubble down first\n // check: https://github.com/moment/moment/issues/2166\n\n if (!(milliseconds >= 0 && days >= 0 && months >= 0 || milliseconds <= 0 && days <= 0 && months <= 0)) {\n milliseconds += absCeil(monthsToDays(months) + days) * 864e5;\n days = 0;\n months = 0;\n } // The following code bubbles up values, see the tests for\n // examples of what that means.\n\n\n data.milliseconds = milliseconds % 1000;\n seconds = absFloor(milliseconds / 1000);\n data.seconds = seconds % 60;\n minutes = absFloor(seconds / 60);\n data.minutes = minutes % 60;\n hours = absFloor(minutes / 60);\n data.hours = hours % 24;\n days += absFloor(hours / 24); // convert days to months\n\n monthsFromDays = absFloor(daysToMonths(days));\n months += monthsFromDays;\n days -= absCeil(monthsToDays(monthsFromDays)); // 12 months -> 1 year\n\n years = absFloor(months / 12);\n months %= 12;\n data.days = days;\n data.months = months;\n data.years = years;\n return this;\n }\n\n function daysToMonths(days) {\n // 400 years have 146097 days (taking into account leap year rules)\n // 400 years have 12 months === 4800\n return days * 4800 / 146097;\n }\n\n function monthsToDays(months) {\n // the reverse of daysToMonths\n return months * 146097 / 4800;\n }\n\n function as(units) {\n if (!this.isValid()) {\n return NaN;\n }\n\n var days;\n var months;\n var milliseconds = this._milliseconds;\n units = normalizeUnits(units);\n\n if (units === 'month' || units === 'quarter' || units === 'year') {\n days = this._days + milliseconds / 864e5;\n months = this._months + daysToMonths(days);\n\n switch (units) {\n case 'month':\n return months;\n\n case 'quarter':\n return months / 3;\n\n case 'year':\n return months / 12;\n }\n } else {\n // handle milliseconds separately because of floating point math errors (issue #1867)\n days = this._days + Math.round(monthsToDays(this._months));\n\n switch (units) {\n case 'week':\n return days / 7 + milliseconds / 6048e5;\n\n case 'day':\n return days + milliseconds / 864e5;\n\n case 'hour':\n return days * 24 + milliseconds / 36e5;\n\n case 'minute':\n return days * 1440 + milliseconds / 6e4;\n\n case 'second':\n return days * 86400 + milliseconds / 1000;\n // Math.floor prevents floating point math errors here\n\n case 'millisecond':\n return Math.floor(days * 864e5) + milliseconds;\n\n default:\n throw new Error('Unknown unit ' + units);\n }\n }\n } // TODO: Use this.as('ms')?\n\n\n function valueOf$1() {\n if (!this.isValid()) {\n return NaN;\n }\n\n return this._milliseconds + this._days * 864e5 + this._months % 12 * 2592e6 + toInt(this._months / 12) * 31536e6;\n }\n\n function makeAs(alias) {\n return function () {\n return this.as(alias);\n };\n }\n\n var asMilliseconds = makeAs('ms');\n var asSeconds = makeAs('s');\n var asMinutes = makeAs('m');\n var asHours = makeAs('h');\n var asDays = makeAs('d');\n var asWeeks = makeAs('w');\n var asMonths = makeAs('M');\n var asQuarters = makeAs('Q');\n var asYears = makeAs('y');\n\n function clone$1() {\n return createDuration(this);\n }\n\n function get$2(units) {\n units = normalizeUnits(units);\n return this.isValid() ? this[units + 's']() : NaN;\n }\n\n function makeGetter(name) {\n return function () {\n return this.isValid() ? this._data[name] : NaN;\n };\n }\n\n var milliseconds = makeGetter('milliseconds');\n var seconds = makeGetter('seconds');\n var minutes = makeGetter('minutes');\n var hours = makeGetter('hours');\n var days = makeGetter('days');\n var months = makeGetter('months');\n var years = makeGetter('years');\n\n function weeks() {\n return absFloor(this.days() / 7);\n }\n\n var round = Math.round;\n var thresholds = {\n ss: 44,\n // a few seconds to seconds\n s: 45,\n // seconds to minute\n m: 45,\n // minutes to hour\n h: 22,\n // hours to day\n d: 26,\n // days to month\n M: 11 // months to year\n\n }; // helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize\n\n function substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) {\n return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture);\n }\n\n function relativeTime$1(posNegDuration, withoutSuffix, locale) {\n var duration = createDuration(posNegDuration).abs();\n var seconds = round(duration.as('s'));\n var minutes = round(duration.as('m'));\n var hours = round(duration.as('h'));\n var days = round(duration.as('d'));\n var months = round(duration.as('M'));\n var years = round(duration.as('y'));\n var a = seconds <= thresholds.ss && ['s', seconds] || seconds < thresholds.s && ['ss', seconds] || minutes <= 1 && ['m'] || minutes < thresholds.m && ['mm', minutes] || hours <= 1 && ['h'] || hours < thresholds.h && ['hh', hours] || days <= 1 && ['d'] || days < thresholds.d && ['dd', days] || months <= 1 && ['M'] || months < thresholds.M && ['MM', months] || years <= 1 && ['y'] || ['yy', years];\n a[2] = withoutSuffix;\n a[3] = +posNegDuration > 0;\n a[4] = locale;\n return substituteTimeAgo.apply(null, a);\n } // This function allows you to set the rounding function for relative time strings\n\n\n function getSetRelativeTimeRounding(roundingFunction) {\n if (roundingFunction === undefined) {\n return round;\n }\n\n if (typeof roundingFunction === 'function') {\n round = roundingFunction;\n return true;\n }\n\n return false;\n } // This function allows you to set a threshold for relative time strings\n\n\n function getSetRelativeTimeThreshold(threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n\n if (limit === undefined) {\n return thresholds[threshold];\n }\n\n thresholds[threshold] = limit;\n\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n\n return true;\n }\n\n function humanize(withSuffix) {\n if (!this.isValid()) {\n return this.localeData().invalidDate();\n }\n\n var locale = this.localeData();\n var output = relativeTime$1(this, !withSuffix, locale);\n\n if (withSuffix) {\n output = locale.pastFuture(+this, output);\n }\n\n return locale.postformat(output);\n }\n\n var abs$1 = Math.abs;\n\n function sign(x) {\n return (x > 0) - (x < 0) || +x;\n }\n\n function toISOString$1() {\n // for ISO strings we do not use the normal bubbling rules:\n // * milliseconds bubble up until they become hours\n // * days do not bubble at all\n // * months bubble up until they become years\n // This is because there is no context-free conversion between hours and days\n // (think of clock changes)\n // and also not between days and months (28-31 days per month)\n if (!this.isValid()) {\n return this.localeData().invalidDate();\n }\n\n var seconds = abs$1(this._milliseconds) / 1000;\n var days = abs$1(this._days);\n var months = abs$1(this._months);\n var minutes, hours, years; // 3600 seconds -> 60 minutes -> 1 hour\n\n minutes = absFloor(seconds / 60);\n hours = absFloor(minutes / 60);\n seconds %= 60;\n minutes %= 60; // 12 months -> 1 year\n\n years = absFloor(months / 12);\n months %= 12; // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js\n\n var Y = years;\n var M = months;\n var D = days;\n var h = hours;\n var m = minutes;\n var s = seconds ? seconds.toFixed(3).replace(/\\.?0+$/, '') : '';\n var total = this.asSeconds();\n\n if (!total) {\n // this is the same as C#'s (Noda) and python (isodate)...\n // but not other JS (goog.date)\n return 'P0D';\n }\n\n var totalSign = total < 0 ? '-' : '';\n var ymSign = sign(this._months) !== sign(total) ? '-' : '';\n var daysSign = sign(this._days) !== sign(total) ? '-' : '';\n var hmsSign = sign(this._milliseconds) !== sign(total) ? '-' : '';\n return totalSign + 'P' + (Y ? ymSign + Y + 'Y' : '') + (M ? ymSign + M + 'M' : '') + (D ? daysSign + D + 'D' : '') + (h || m || s ? 'T' : '') + (h ? hmsSign + h + 'H' : '') + (m ? hmsSign + m + 'M' : '') + (s ? hmsSign + s + 'S' : '');\n }\n\n var proto$2 = Duration.prototype;\n proto$2.isValid = isValid$1;\n proto$2.abs = abs;\n proto$2.add = add$1;\n proto$2.subtract = subtract$1;\n proto$2.as = as;\n proto$2.asMilliseconds = asMilliseconds;\n proto$2.asSeconds = asSeconds;\n proto$2.asMinutes = asMinutes;\n proto$2.asHours = asHours;\n proto$2.asDays = asDays;\n proto$2.asWeeks = asWeeks;\n proto$2.asMonths = asMonths;\n proto$2.asQuarters = asQuarters;\n proto$2.asYears = asYears;\n proto$2.valueOf = valueOf$1;\n proto$2._bubble = bubble;\n proto$2.clone = clone$1;\n proto$2.get = get$2;\n proto$2.milliseconds = milliseconds;\n proto$2.seconds = seconds;\n proto$2.minutes = minutes;\n proto$2.hours = hours;\n proto$2.days = days;\n proto$2.weeks = weeks;\n proto$2.months = months;\n proto$2.years = years;\n proto$2.humanize = humanize;\n proto$2.toISOString = toISOString$1;\n proto$2.toString = toISOString$1;\n proto$2.toJSON = toISOString$1;\n proto$2.locale = locale;\n proto$2.localeData = localeData;\n proto$2.toIsoString = deprecate('toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)', toISOString$1);\n proto$2.lang = lang; // Side effect imports\n // FORMATTING\n\n addFormatToken('X', 0, 0, 'unix');\n addFormatToken('x', 0, 0, 'valueOf'); // PARSING\n\n addRegexToken('x', matchSigned);\n addRegexToken('X', matchTimestamp);\n addParseToken('X', function (input, array, config) {\n config._d = new Date(parseFloat(input, 10) * 1000);\n });\n addParseToken('x', function (input, array, config) {\n config._d = new Date(toInt(input));\n }); // Side effect imports\n\n hooks.version = '2.24.0';\n setHookCallback(createLocal);\n hooks.fn = proto;\n hooks.min = min;\n hooks.max = max;\n hooks.now = now;\n hooks.utc = createUTC;\n hooks.unix = createUnix;\n hooks.months = listMonths;\n hooks.isDate = isDate;\n hooks.locale = getSetGlobalLocale;\n hooks.invalid = createInvalid;\n hooks.duration = createDuration;\n hooks.isMoment = isMoment;\n hooks.weekdays = listWeekdays;\n hooks.parseZone = createInZone;\n hooks.localeData = getLocale;\n hooks.isDuration = isDuration;\n hooks.monthsShort = listMonthsShort;\n hooks.weekdaysMin = listWeekdaysMin;\n hooks.defineLocale = defineLocale;\n hooks.updateLocale = updateLocale;\n hooks.locales = listLocales;\n hooks.weekdaysShort = listWeekdaysShort;\n hooks.normalizeUnits = normalizeUnits;\n hooks.relativeTimeRounding = getSetRelativeTimeRounding;\n hooks.relativeTimeThreshold = getSetRelativeTimeThreshold;\n hooks.calendarFormat = getCalendarFormat;\n hooks.prototype = proto; // currently HTML5 input type only supports 24-hour formats\n\n hooks.HTML5_FMT = {\n DATETIME_LOCAL: 'YYYY-MM-DDTHH:mm',\n // \n DATETIME_LOCAL_SECONDS: 'YYYY-MM-DDTHH:mm:ss',\n // \n DATETIME_LOCAL_MS: 'YYYY-MM-DDTHH:mm:ss.SSS',\n // \n DATE: 'YYYY-MM-DD',\n // \n TIME: 'HH:mm',\n // \n TIME_SECONDS: 'HH:mm:ss',\n // \n TIME_MS: 'HH:mm:ss.SSS',\n // \n WEEK: 'GGGG-[W]WW',\n // \n MONTH: 'YYYY-MM' // \n\n };\n return hooks;\n });\n}); // Maps for number <-> hex string conversion\n\nvar byteToHex$2 = [];\n\nfor (var i$2 = 0; i$2 < 256; i$2++) {\n byteToHex$2[i$2] = (i$2 + 0x100).toString(16).substr(1);\n}\n/**\n * Generate 16 random bytes to be used as a base for UUID.\n *\n * @ignore\n */\n\n\nvar random$1 = function () {\n if (typeof crypto !== 'undefined' && crypto.getRandomValues) {\n // WHATWG crypto-based RNG - http://wiki.whatwg.org/wiki/Crypto\n // Moderately fast, high quality\n var _rnds8 = new Uint8Array(16);\n\n return function whatwgRNG() {\n crypto.getRandomValues(_rnds8);\n return _rnds8;\n };\n } // Math.random()-based (RNG)\n //\n // If all else fails, use Math.random().\n // It's fast, but is of unspecified quality.\n\n\n var _rnds = new Array(16);\n\n return function () {\n for (var i = 0, r; i < 16; i++) {\n if ((i & 0x03) === 0) {\n r = Math.random() * 0x100000000;\n }\n\n _rnds[i] = r >>> ((i & 0x03) << 3) & 0xff;\n }\n\n return _rnds;\n }; // uuid.js\n //\n // Copyright (c) 2010-2012 Robert Kieffer\n // MIT License - http://opensource.org/licenses/mit-license.php\n // Unique ID creation requires a high quality random # generator. We feature\n // detect to determine the best RNG source, normalizing to a function that\n // returns 128-bits of randomness, since that's what's usually required\n // return require('./rng');\n}();\n\nvar byteToHex$1$1 = [];\n\nfor (var i$1$1 = 0; i$1$1 < 256; i$1$1++) {\n byteToHex$1$1[i$1$1] = (i$1$1 + 0x100).toString(16).substr(1);\n} // **`v1()` - Generate time-based UUID**\n//\n// Inspired by https://github.com/LiosK/UUID.js\n// and http://docs.python.org/library/uuid.html\n// random #'s we need to init node and clockseq\n\n\nvar seedBytes$1 = random$1(); // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)\n\nvar defaultNodeId$1 = [seedBytes$1[0] | 0x01, seedBytes$1[1], seedBytes$1[2], seedBytes$1[3], seedBytes$1[4], seedBytes$1[5]]; // Per 4.2.2, randomize (14 bit) clockseq\n\nvar defaultClockseq$1 = (seedBytes$1[6] << 8 | seedBytes$1[7]) & 0x3fff; // Previous uuid creation time\n// for example '/Date(1198908717056)/' or '/Date(1198908717056-0700)/'\n// code from http://momentjs.com/\n\n\nvar ASPDateRegex = /^\\/?Date\\((-?\\d+)/i; // Hex color\n/**\n * Hue, Saturation, Value.\n */\n\n/**\n * Test whether given object is a number\n *\n * @param value - Input value of unknown type.\n *\n * @returns True if number, false otherwise.\n */\n\nfunction isNumber(value) {\n return value instanceof Number || typeof value === 'number';\n}\n/**\n * Test whether given object is a string\n *\n * @param value - Input value of unknown type.\n *\n * @returns True if string, false otherwise.\n */\n\n\nfunction isString(value) {\n return value instanceof String || typeof value === 'string';\n}\n/**\n * Test whether given object is a Moment date.\n * @TODO: This is basically a workaround, if Moment was imported property it wouldn't necessary as moment.isMoment is a TS type guard.\n *\n * @param value - Input value of unknown type.\n *\n * @returns True if Moment instance, false otherwise.\n */\n\n\nfunction isMoment(value) {\n return moment.isMoment(value);\n}\n/**\n * Convert an object into another type\n *\n * @param object - Value of unknown type.\n * @param type - Name of the desired type.\n *\n * @returns Object in the desired type.\n * @throws Error\n */\n\n\nfunction convert(object, type) {\n var match;\n\n if (object === undefined) {\n return undefined;\n }\n\n if (object === null) {\n return null;\n }\n\n if (!type) {\n return object;\n }\n\n if (!(typeof type === 'string') && !(type instanceof String)) {\n throw new Error('Type must be a string');\n } //noinspection FallthroughInSwitchStatementJS\n\n\n switch (type) {\n case 'boolean':\n case 'Boolean':\n return Boolean(object);\n\n case 'number':\n case 'Number':\n if (isString(object) && !isNaN(Date.parse(object))) {\n return moment(object).valueOf();\n } else {\n // @TODO: I don't think that Number and String constructors are a good idea.\n // This could also fail if the object doesn't have valueOf method or if it's redefined.\n // For example: Object.create(null) or { valueOf: 7 }.\n return Number(object.valueOf());\n }\n\n case 'string':\n case 'String':\n return String(object);\n\n case 'Date':\n if (isNumber(object)) {\n return new Date(object);\n }\n\n if (object instanceof Date) {\n return new Date(object.valueOf());\n } else if (isMoment(object)) {\n return new Date(object.valueOf());\n }\n\n if (isString(object)) {\n match = ASPDateRegex.exec(object);\n\n if (match) {\n // object is an ASP date\n return new Date(Number(match[1])); // parse number\n } else {\n return moment(new Date(object)).toDate(); // parse string\n }\n } else {\n throw new Error('Cannot convert object of type ' + getType(object) + ' to type Date');\n }\n\n case 'Moment':\n if (isNumber(object)) {\n return moment(object);\n }\n\n if (object instanceof Date) {\n return moment(object.valueOf());\n } else if (isMoment(object)) {\n return moment(object);\n }\n\n if (isString(object)) {\n match = ASPDateRegex.exec(object);\n\n if (match) {\n // object is an ASP date\n return moment(Number(match[1])); // parse number\n } else {\n return moment(object); // parse string\n }\n } else {\n throw new Error('Cannot convert object of type ' + getType(object) + ' to type Date');\n }\n\n case 'ISODate':\n if (isNumber(object)) {\n return new Date(object);\n } else if (object instanceof Date) {\n return object.toISOString();\n } else if (isMoment(object)) {\n return object.toDate().toISOString();\n } else if (isString(object)) {\n match = ASPDateRegex.exec(object);\n\n if (match) {\n // object is an ASP date\n return new Date(Number(match[1])).toISOString(); // parse number\n } else {\n return moment(object).format(); // ISO 8601\n }\n } else {\n throw new Error('Cannot convert object of type ' + getType(object) + ' to type ISODate');\n }\n\n case 'ASPDate':\n if (isNumber(object)) {\n return '/Date(' + object + ')/';\n } else if (object instanceof Date) {\n return '/Date(' + object.valueOf() + ')/';\n } else if (isString(object)) {\n match = ASPDateRegex.exec(object);\n\n var _value;\n\n if (match) {\n // object is an ASP date\n _value = new Date(Number(match[1])).valueOf(); // parse number\n } else {\n _value = new Date(object).valueOf(); // parse string\n }\n\n return '/Date(' + _value + ')/';\n } else {\n throw new Error('Cannot convert object of type ' + getType(object) + ' to type ASPDate');\n }\n\n default:\n var never = type;\n throw new Error(\"Unknown type \".concat(never));\n }\n}\n/**\n * Get the type of an object, for example exports.getType([]) returns 'Array'\n *\n * @param object - Input value of unknown type.\n *\n * @returns Detected type.\n */\n\n\nfunction getType(object) {\n var type = _typeof(object);\n\n if (type === 'object') {\n if (object === null) {\n return 'null';\n }\n\n if (object instanceof Boolean) {\n return 'Boolean';\n }\n\n if (object instanceof Number) {\n return 'Number';\n }\n\n if (object instanceof String) {\n return 'String';\n }\n\n if (Array.isArray(object)) {\n return 'Array';\n }\n\n if (object instanceof Date) {\n return 'Date';\n }\n\n return 'Object';\n }\n\n if (type === 'number') {\n return 'Number';\n }\n\n if (type === 'boolean') {\n return 'Boolean';\n }\n\n if (type === 'string') {\n return 'String';\n }\n\n if (type === undefined) {\n return 'undefined';\n }\n\n return type;\n}\n\n/**\r\n * Determine whether a value can be used as an id.\r\n *\r\n * @param value - Input value of unknown type.\r\n *\r\n * @returns True if the value is valid id, false otherwise.\r\n */\nfunction isId(value) {\n return typeof value === 'string' || typeof value === 'number';\n}\n\n/**\r\n * A queue.\r\n *\r\n * @typeParam T - The type of method names to be replaced by queued versions.\r\n */\nvar Queue =\n/*#__PURE__*/\nfunction () {\n /**\r\n * Construct a new Queue.\r\n *\r\n * @param options - Queue configuration.\r\n */\n function Queue(options) {\n classCallCheck(this, Queue);\n\n this._queue = [];\n this._timeout = null;\n this._extended = null; // options\n\n this.delay = null;\n this.max = Infinity;\n this.setOptions(options);\n }\n /**\r\n * Update the configuration of the queue.\r\n *\r\n * @param options - Queue configuration.\r\n */\n\n\n createClass(Queue, [{\n key: \"setOptions\",\n value: function setOptions(options) {\n if (options && typeof options.delay !== 'undefined') {\n this.delay = options.delay;\n }\n\n if (options && typeof options.max !== 'undefined') {\n this.max = options.max;\n }\n\n this._flushIfNeeded();\n }\n /**\r\n * Extend an object with queuing functionality.\r\n * The object will be extended with a function flush, and the methods provided in options.replace will be replaced with queued ones.\r\n *\r\n * @param object - The object to be extended.\r\n * @param options - Additional options.\r\n *\r\n * @returns The created queue.\r\n */\n\n }, {\n key: \"destroy\",\n\n /**\r\n * Destroy the queue. The queue will first flush all queued actions, and in case it has extended an object, will restore the original object.\r\n */\n value: function destroy() {\n this.flush();\n\n if (this._extended) {\n var object = this._extended.object;\n var methods = this._extended.methods;\n\n for (var i = 0; i < methods.length; i++) {\n var method = methods[i];\n\n if (method.original) {\n object[method.name] = method.original;\n } else {\n // @TODO: better solution?\n delete object[method.name];\n }\n }\n\n this._extended = null;\n }\n }\n /**\r\n * Replace a method on an object with a queued version.\r\n *\r\n * @param object - Object having the method.\r\n * @param method - The method name.\r\n */\n\n }, {\n key: \"replace\",\n value: function replace(object, method) {\n var me = this;\n var original = object[method];\n\n if (!original) {\n throw new Error('Method ' + method + ' undefined');\n }\n\n object[method] = function () {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n // add this call to the queue\n me.queue({\n args: args,\n fn: original,\n context: this\n });\n };\n }\n /**\r\n * Queue a call.\r\n *\r\n * @param entry - The function or entry to be queued.\r\n */\n\n }, {\n key: \"queue\",\n value: function queue(entry) {\n if (typeof entry === 'function') {\n this._queue.push({\n fn: entry\n });\n } else {\n this._queue.push(entry);\n }\n\n this._flushIfNeeded();\n }\n /**\r\n * Check whether the queue needs to be flushed.\r\n */\n\n }, {\n key: \"_flushIfNeeded\",\n value: function _flushIfNeeded() {\n var _this = this;\n\n // flush when the maximum is exceeded.\n if (this._queue.length > this.max) {\n this.flush();\n } // flush after a period of inactivity when a delay is configured\n\n\n if (this._timeout != null) {\n clearTimeout(this._timeout);\n this._timeout = null;\n }\n\n if (this.queue.length > 0 && typeof this.delay === 'number') {\n this._timeout = setTimeout(function () {\n _this.flush();\n }, this.delay);\n }\n }\n /**\r\n * Flush all queued calls\r\n */\n\n }, {\n key: \"flush\",\n value: function flush() {\n this._queue.splice(0).forEach(function (entry) {\n entry.fn.apply(entry.context || entry.fn, entry.args || []);\n });\n }\n }], [{\n key: \"extend\",\n value: function extend(object, options) {\n var queue = new Queue(options);\n\n if (object.flush !== undefined) {\n throw new Error('Target object already has a property flush');\n }\n\n object.flush = function () {\n queue.flush();\n };\n\n var methods = [{\n name: 'flush',\n original: undefined\n }];\n\n if (options && options.replace) {\n for (var i = 0; i < options.replace.length; i++) {\n var name = options.replace[i];\n methods.push({\n name: name,\n // @TODO: better solution?\n original: object[name]\n }); // @TODO: better solution?\n\n queue.replace(object, name);\n }\n }\n\n queue._extended = {\n object: object,\n methods: methods\n };\n return queue;\n }\n }]);\n\n return Queue;\n}();\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) {\n for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n }\n}\n\nvar arrayWithoutHoles = _arrayWithoutHoles;\n\nfunction _iterableToArray(iter) {\n if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === \"[object Arguments]\") return Array.from(iter);\n}\n\nvar iterableToArray = _iterableToArray;\n\nfunction _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance\");\n}\n\nvar nonIterableSpread = _nonIterableSpread;\n\nfunction _toConsumableArray(arr) {\n return arrayWithoutHoles(arr) || iterableToArray(arr) || nonIterableSpread();\n}\n\nvar toConsumableArray = _toConsumableArray;\n\n/**\r\n * [[DataSet]] code that can be reused in [[DataView]] or other similar implementations of [[DataInterface]].\r\n *\r\n * @typeParam Item - Item type that may or may not have an id.\r\n * @typeParam IdProp - Name of the property that contains the id.\r\n */\nvar DataSetPart =\n/*#__PURE__*/\nfunction () {\n function DataSetPart() {\n classCallCheck(this, DataSetPart);\n\n this._subscribers = {\n '*': [],\n add: [],\n remove: [],\n update: []\n };\n /**\r\n * @deprecated Use on instead (PS: DataView.subscribe === DataView.on).\r\n */\n\n this.subscribe = DataSetPart.prototype.on;\n /**\r\n * @deprecated Use off instead (PS: DataView.unsubscribe === DataView.off).\r\n */\n\n this.unsubscribe = DataSetPart.prototype.off;\n }\n /**\r\n * Trigger an event\r\n *\r\n * @param event - Event name.\r\n * @param payload - Event payload.\r\n * @param senderId - Id of the sender.\r\n */\n\n\n createClass(DataSetPart, [{\n key: \"_trigger\",\n value: function _trigger(event, payload, senderId) {\n if (event === '*') {\n throw new Error('Cannot trigger event *');\n }\n\n var subscribers = [].concat(toConsumableArray(this._subscribers[event]), toConsumableArray(this._subscribers['*']));\n\n for (var i = 0, len = subscribers.length; i < len; i++) {\n var subscriber = subscribers[i];\n\n if (subscriber.callback) {\n subscriber.callback(event, payload, senderId != null ? senderId : null);\n }\n }\n }\n /**\r\n * Subscribe to an event, add an event listener.\r\n *\r\n * @param event - Event name.\r\n * @param callback - Callback method.\r\n */\n\n }, {\n key: \"on\",\n value: function on(event, callback) {\n this._subscribers[event].push({\n callback: callback\n });\n }\n /**\r\n * Unsubscribe from an event, remove an event listener.\r\n *\r\n * @remarks If the same callback was subscribed more than once **all** occurences will be removed.\r\n *\r\n * @param event - Event name.\r\n * @param callback - Callback method.\r\n */\n\n }, {\n key: \"off\",\n value: function off(event, callback) {\n this._subscribers[event] = this._subscribers[event].filter(function (listener) {\n return listener.callback !== callback;\n });\n }\n }]);\n\n return DataSetPart;\n}();\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { keys.push.apply(keys, Object.getOwnPropertySymbols(object)); } if (enumerableOnly) keys = keys.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n/**\r\n * # DataSet\r\n *\r\n * Vis.js comes with a flexible DataSet, which can be used to hold and manipulate unstructured data and listen for changes in the data. The DataSet is key/value based. Data items can be added, updated and removed from the DataSet, and one can subscribe to changes in the DataSet. The data in the DataSet can be filtered and ordered, and fields (like dates) can be converted to a specific type. Data can be normalized when appending it to the DataSet as well.\r\n *\r\n * ## Example\r\n *\r\n * The following example shows how to use a DataSet.\r\n *\r\n * ```javascript\r\n * // create a DataSet\r\n * var options = {};\r\n * var data = new vis.DataSet(options);\r\n *\r\n * // add items\r\n * // note that the data items can contain different properties and data formats\r\n * data.add([\r\n * {id: 1, text: 'item 1', date: new Date(2013, 6, 20), group: 1, first: true},\r\n * {id: 2, text: 'item 2', date: '2013-06-23', group: 2},\r\n * {id: 3, text: 'item 3', date: '2013-06-25', group: 2},\r\n * {id: 4, text: 'item 4'}\r\n * ]);\r\n *\r\n * // subscribe to any change in the DataSet\r\n * data.on('*', function (event, properties, senderId) {\r\n * console.log('event', event, properties);\r\n * });\r\n *\r\n * // update an existing item\r\n * data.update({id: 2, group: 1});\r\n *\r\n * // remove an item\r\n * data.remove(4);\r\n *\r\n * // get all ids\r\n * var ids = data.getIds();\r\n * console.log('ids', ids);\r\n *\r\n * // get a specific item\r\n * var item1 = data.get(1);\r\n * console.log('item1', item1);\r\n *\r\n * // retrieve a filtered subset of the data\r\n * var items = data.get({\r\n * filter: function (item) {\r\n * return item.group == 1;\r\n * }\r\n * });\r\n * console.log('filtered items', items);\r\n *\r\n * // retrieve formatted items\r\n * var items = data.get({\r\n * fields: ['id', 'date'],\r\n * type: {\r\n * date: 'ISODate'\r\n * }\r\n * });\r\n * console.log('formatted items', items);\r\n * ```\r\n *\r\n * @typeParam Item - Item type that may or may not have an id.\r\n * @typeParam IdProp - Name of the property that contains the id.\r\n */\n\nvar DataSet =\n/*#__PURE__*/\nfunction (_DataSetPart) {\n inherits(DataSet, _DataSetPart);\n\n /**\r\n * Construct a new DataSet.\r\n *\r\n * @param data - Initial data or options.\r\n * @param options - Options (type error if data is also options).\r\n */\n function DataSet(data, options) {\n var _this;\n\n classCallCheck(this, DataSet);\n\n _this = possibleConstructorReturn(this, getPrototypeOf(DataSet).call(this)); // correctly read optional arguments\n\n if (data && !Array.isArray(data)) {\n options = data;\n data = [];\n }\n\n _this._options = options || {};\n _this._data = Object.create({}); // map with data indexed by id\n\n _this.length = 0; // number of items in the DataSet\n\n _this._idProp = _this._options.fieldId || 'id'; // name of the field containing id\n\n _this._type = {}; // internal field types (NOTE: this can differ from this._options.type)\n // all variants of a Date are internally stored as Date, so we can convert\n // from everything to everything (also from ISODate to Number for example)\n\n if (_this._options.type) {\n var fields = Object.keys(_this._options.type);\n\n for (var i = 0, len = fields.length; i < len; i++) {\n var field = fields[i];\n var value = _this._options.type[field];\n\n if (value == 'Date' || value == 'ISODate' || value == 'ASPDate') {\n _this._type[field] = 'Date';\n } else {\n _this._type[field] = value;\n }\n }\n } // add initial data when provided\n\n\n if (data && data.length) {\n _this.add(data);\n }\n\n _this.setOptions(options);\n\n return _this;\n }\n /**\r\n * Set new options.\r\n *\r\n * @param options - The new options.\r\n */\n\n\n createClass(DataSet, [{\n key: \"setOptions\",\n value: function setOptions(options) {\n if (options && options.queue !== undefined) {\n if (options.queue === false) {\n // delete queue if loaded\n if (this._queue) {\n this._queue.destroy();\n\n delete this._queue;\n }\n } else {\n // create queue and update its options\n if (!this._queue) {\n this._queue = Queue.extend(this, {\n replace: ['add', 'update', 'remove']\n });\n }\n\n if (options.queue && _typeof_1(options.queue) === 'object') {\n this._queue.setOptions(options.queue);\n }\n }\n }\n }\n /**\r\n * Add a data item or an array with items.\r\n *\r\n * After the items are added to the DataSet, the DataSet will trigger an event `add`. When a `senderId` is provided, this id will be passed with the triggered event to all subscribers.\r\n *\r\n * ## Example\r\n *\r\n * ```javascript\r\n * // create a DataSet\r\n * const data = new vis.DataSet()\r\n *\r\n * // add items\r\n * const ids = data.add([\r\n * { id: 1, text: 'item 1' },\r\n * { id: 2, text: 'item 2' },\r\n * { text: 'item without an id' }\r\n * ])\r\n *\r\n * console.log(ids) // [1, 2, '']\r\n * ```\r\n *\r\n * @param data - Items to be added (ids will be generated if missing).\r\n * @param senderId - Sender id.\r\n *\r\n * @returns addedIds - Array with the ids (generated if not present) of the added items.\r\n *\r\n * @throws When an item with the same id as any of the added items already exists.\r\n */\n\n }, {\n key: \"add\",\n value: function add(data, senderId) {\n var addedIds = [];\n var id;\n\n if (Array.isArray(data)) {\n // Array\n for (var i = 0, len = data.length; i < len; i++) {\n id = this._addItem(data[i]);\n addedIds.push(id);\n }\n } else if (data && _typeof_1(data) === 'object') {\n // Single item\n id = this._addItem(data);\n addedIds.push(id);\n } else {\n throw new Error('Unknown dataType');\n }\n\n if (addedIds.length) {\n this._trigger('add', {\n items: addedIds\n }, senderId);\n }\n\n return addedIds;\n }\n /**\r\n * Update existing items. When an item does not exist, it will be created\r\n *\r\n * The provided properties will be merged in the existing item. When an item does not exist, it will be created.\r\n *\r\n * After the items are updated, the DataSet will trigger an event `add` for the added items, and an event `update`. When a `senderId` is provided, this id will be passed with the triggered event to all subscribers.\r\n *\r\n * ## Example\r\n *\r\n * ```javascript\r\n * // create a DataSet\r\n * const data = new vis.DataSet([\r\n * { id: 1, text: 'item 1' },\r\n * { id: 2, text: 'item 2' },\r\n * { id: 3, text: 'item 3' }\r\n * ])\r\n *\r\n * // update items\r\n * const ids = data.update([\r\n * { id: 2, text: 'item 2 (updated)' },\r\n * { id: 4, text: 'item 4 (new)' }\r\n * ])\r\n *\r\n * console.log(ids) // [2, 4]\r\n * ```\r\n *\r\n * @param data - Items to be updated (if the id is already present) or added (if the id is missing).\r\n * @param senderId - Sender id.\r\n *\r\n * @returns updatedIds - The ids of the added (these may be newly generated if there was no id in the item from the data) or updated items.\r\n *\r\n * @throws When the supplied data is neither an item nor an array of items.\r\n */\n\n }, {\n key: \"update\",\n value: function update(data, senderId) {\n var _this2 = this;\n\n var addedIds = [];\n var updatedIds = [];\n var oldData = [];\n var updatedData = [];\n var idProp = this._idProp;\n\n var addOrUpdate = function addOrUpdate(item) {\n var origId = item[idProp];\n\n if (origId != null && _this2._data[origId]) {\n var fullItem = item; // it has an id, therefore it is a fullitem\n\n var oldItem = Object.assign({}, _this2._data[origId]); // update item\n\n var id = _this2._updateItem(fullItem);\n\n updatedIds.push(id);\n updatedData.push(fullItem);\n oldData.push(oldItem);\n } else {\n // add new item\n var _id = _this2._addItem(item);\n\n addedIds.push(_id);\n }\n };\n\n if (Array.isArray(data)) {\n // Array\n for (var i = 0, len = data.length; i < len; i++) {\n if (data[i] && _typeof_1(data[i]) === 'object') {\n addOrUpdate(data[i]);\n } else {\n console.warn('Ignoring input item, which is not an object at index ' + i);\n }\n }\n } else if (data && _typeof_1(data) === 'object') {\n // Single item\n addOrUpdate(data);\n } else {\n throw new Error('Unknown dataType');\n }\n\n if (addedIds.length) {\n this._trigger('add', {\n items: addedIds\n }, senderId);\n }\n\n if (updatedIds.length) {\n var props = {\n items: updatedIds,\n oldData: oldData,\n data: updatedData\n }; // TODO: remove deprecated property 'data' some day\n //Object.defineProperty(props, 'data', {\n // 'get': (function() {\n // console.warn('Property data is deprecated. Use DataSet.get(ids) to retrieve the new data, use the oldData property on this object to get the old data');\n // return updatedData;\n // }).bind(this)\n //});\n\n this._trigger('update', props, senderId);\n }\n\n return addedIds.concat(updatedIds);\n }\n /** @inheritdoc */\n\n }, {\n key: \"get\",\n value: function get(first, second) {\n // @TODO: Woudn't it be better to split this into multiple methods?\n // parse the arguments\n var id = undefined;\n var ids = undefined;\n var options = undefined;\n\n if (isId(first)) {\n // get(id [, options])\n id = first;\n options = second;\n } else if (Array.isArray(first)) {\n // get(ids [, options])\n ids = first;\n options = second;\n } else {\n // get([, options])\n options = first;\n } // determine the return type\n\n\n var returnType = options && options.returnType === 'Object' ? 'Object' : 'Array'; // @TODO: WTF is this? Or am I missing something?\n // var returnType\n // if (options && options.returnType) {\n // var allowedValues = ['Array', 'Object']\n // returnType =\n // allowedValues.indexOf(options.returnType) == -1\n // ? 'Array'\n // : options.returnType\n // } else {\n // returnType = 'Array'\n // }\n // build options\n\n var type = options && options.type || this._options.type;\n var filter = options && options.filter;\n var items = [];\n var item = null;\n var itemIds = null;\n var itemId = null; // convert items\n\n if (id != null) {\n // return a single item\n item = this._getItem(id, type);\n\n if (item && filter && !filter(item)) {\n item = null;\n }\n } else if (ids != null) {\n // return a subset of items\n for (var i = 0, len = ids.length; i < len; i++) {\n item = this._getItem(ids[i], type);\n\n if (item != null && (!filter || filter(item))) {\n items.push(item);\n }\n }\n } else {\n // return all items\n itemIds = Object.keys(this._data);\n\n for (var _i = 0, _len = itemIds.length; _i < _len; _i++) {\n itemId = itemIds[_i];\n item = this._getItem(itemId, type);\n\n if (item != null && (!filter || filter(item))) {\n items.push(item);\n }\n }\n } // order the results\n\n\n if (options && options.order && id == undefined) {\n this._sort(items, options.order);\n } // filter fields of the items\n\n\n if (options && options.fields) {\n var fields = options.fields;\n\n if (id != undefined && item != null) {\n item = this._filterFields(item, fields);\n } else {\n for (var _i2 = 0, _len2 = items.length; _i2 < _len2; _i2++) {\n items[_i2] = this._filterFields(items[_i2], fields);\n }\n }\n } // return the results\n\n\n if (returnType == 'Object') {\n var result = {};\n\n for (var _i3 = 0, _len3 = items.length; _i3 < _len3; _i3++) {\n var resultant = items[_i3]; // @TODO: Shoudn't this be this._fieldId?\n // result[resultant.id] = resultant\n\n var _id2 = resultant[this._idProp];\n result[_id2] = resultant;\n }\n\n return result;\n } else {\n if (id != null) {\n // a single item\n return item;\n } else {\n // just return our array\n return items;\n }\n }\n }\n /** @inheritdoc */\n\n }, {\n key: \"getIds\",\n value: function getIds(options) {\n var data = this._data;\n var filter = options && options.filter;\n var order = options && options.order;\n var type = options && options.type || this._options.type;\n var itemIds = Object.keys(data);\n var ids = [];\n var item;\n var items;\n\n if (filter) {\n // get filtered items\n if (order) {\n // create ordered list\n items = [];\n\n for (var i = 0, len = itemIds.length; i < len; i++) {\n var id = itemIds[i];\n item = this._getItem(id, type);\n\n if (filter(item)) {\n items.push(item);\n }\n }\n\n this._sort(items, order);\n\n for (var _i4 = 0, _len4 = items.length; _i4 < _len4; _i4++) {\n ids.push(items[_i4][this._idProp]);\n }\n } else {\n // create unordered list\n for (var _i5 = 0, _len5 = itemIds.length; _i5 < _len5; _i5++) {\n var _id3 = itemIds[_i5];\n item = this._getItem(_id3, type);\n\n if (filter(item)) {\n ids.push(item[this._idProp]);\n }\n }\n }\n } else {\n // get all items\n if (order) {\n // create an ordered list\n items = [];\n\n for (var _i6 = 0, _len6 = itemIds.length; _i6 < _len6; _i6++) {\n var _id4 = itemIds[_i6];\n items.push(data[_id4]);\n }\n\n this._sort(items, order);\n\n for (var _i7 = 0, _len7 = items.length; _i7 < _len7; _i7++) {\n ids.push(items[_i7][this._idProp]);\n }\n } else {\n // create unordered list\n for (var _i8 = 0, _len8 = itemIds.length; _i8 < _len8; _i8++) {\n var _id5 = itemIds[_i8];\n item = data[_id5];\n ids.push(item[this._idProp]);\n }\n }\n }\n\n return ids;\n }\n /** @inheritdoc */\n\n }, {\n key: \"getDataSet\",\n value: function getDataSet() {\n return this;\n }\n /** @inheritdoc */\n\n }, {\n key: \"forEach\",\n value: function forEach(callback, options) {\n var filter = options && options.filter;\n var type = options && options.type || this._options.type;\n var data = this._data;\n var itemIds = Object.keys(data);\n\n if (options && options.order) {\n // execute forEach on ordered list\n var items = this.get(options);\n\n for (var i = 0, len = items.length; i < len; i++) {\n var item = items[i];\n var id = item[this._idProp];\n callback(item, id);\n }\n } else {\n // unordered\n for (var _i9 = 0, _len9 = itemIds.length; _i9 < _len9; _i9++) {\n var _id6 = itemIds[_i9];\n\n var _item = this._getItem(_id6, type);\n\n if (!filter || filter(_item)) {\n callback(_item, _id6);\n }\n }\n }\n }\n /** @inheritdoc */\n\n }, {\n key: \"map\",\n value: function map(callback, options) {\n var filter = options && options.filter;\n var type = options && options.type || this._options.type;\n var mappedItems = [];\n var data = this._data;\n var itemIds = Object.keys(data); // convert and filter items\n\n for (var i = 0, len = itemIds.length; i < len; i++) {\n var id = itemIds[i];\n\n var item = this._getItem(id, type);\n\n if (!filter || filter(item)) {\n mappedItems.push(callback(item, id));\n }\n } // order items\n\n\n if (options && options.order) {\n this._sort(mappedItems, options.order);\n }\n\n return mappedItems;\n }\n /**\r\n * Filter the fields of an item.\r\n *\r\n * @param item - The item whose fields should be filtered.\r\n * @param fields - The names of the fields that will be kept.\r\n *\r\n * @typeParam K - Field name type.\r\n *\r\n * @returns The item without any additional fields.\r\n */\n\n }, {\n key: \"_filterFields\",\n value: function _filterFields(item, fields) {\n if (!item) {\n // item is null\n return item;\n }\n\n return (Array.isArray(fields) ? // Use the supplied array\n fields : // Use the keys of the supplied object\n Object.keys(fields)).reduce(function (filteredItem, field) {\n filteredItem[field] = item[field];\n return filteredItem;\n }, {});\n }\n /**\r\n * Sort the provided array with items.\r\n *\r\n * @param items - Items to be sorted in place.\r\n * @param order - A field name or custom sort function.\r\n *\r\n * @typeParam T - The type of the items in the items array.\r\n */\n\n }, {\n key: \"_sort\",\n value: function _sort(items, order) {\n if (typeof order === 'string') {\n // order by provided field name\n var name = order; // field name\n\n items.sort(function (a, b) {\n // @TODO: How to treat missing properties?\n var av = a[name];\n var bv = b[name];\n return av > bv ? 1 : av < bv ? -1 : 0;\n });\n } else if (typeof order === 'function') {\n // order by sort function\n items.sort(order);\n } else {\n // TODO: extend order by an Object {field:string, direction:string}\n // where direction can be 'asc' or 'desc'\n throw new TypeError('Order must be a function or a string');\n }\n }\n /**\r\n * Remove an item or multiple items by “reference” (only the id is used) or by id.\r\n *\r\n * The method ignores removal of non-existing items, and returns an array containing the ids of the items which are actually removed from the DataSet.\r\n *\r\n * After the items are removed, the DataSet will trigger an event `remove` for the removed items. When a `senderId` is provided, this id will be passed with the triggered event to all subscribers.\r\n *\r\n * ## Example\r\n * ```javascript\r\n * // create a DataSet\r\n * const data = new vis.DataSet([\r\n * { id: 1, text: 'item 1' },\r\n * { id: 2, text: 'item 2' },\r\n * { id: 3, text: 'item 3' }\r\n * ])\r\n *\r\n * // remove items\r\n * const ids = data.remove([2, { id: 3 }, 4])\r\n *\r\n * console.log(ids) // [2, 3]\r\n * ```\r\n *\r\n * @param id - One or more items or ids of items to be removed.\r\n * @param senderId - Sender id.\r\n *\r\n * @returns The ids of the removed items.\r\n */\n\n }, {\n key: \"remove\",\n value: function remove(id, senderId) {\n var removedIds = [];\n var removedItems = []; // force everything to be an array for simplicity\n\n var ids = Array.isArray(id) ? id : [id];\n\n for (var i = 0, len = ids.length; i < len; i++) {\n var item = this._remove(ids[i]);\n\n if (item) {\n var itemId = item[this._idProp];\n\n if (itemId != null) {\n removedIds.push(itemId);\n removedItems.push(item);\n }\n }\n }\n\n if (removedIds.length) {\n this._trigger('remove', {\n items: removedIds,\n oldData: removedItems\n }, senderId);\n }\n\n return removedIds;\n }\n /**\r\n * Remove an item by its id or reference.\r\n *\r\n * @param id - Id of an item or the item itself.\r\n *\r\n * @returns The removed item if removed, null otherwise.\r\n */\n\n }, {\n key: \"_remove\",\n value: function _remove(id) {\n // @TODO: It origianlly returned the item although the docs say id.\n // The code expects the item, so probably an error in the docs.\n var ident; // confirm the id to use based on the args type\n\n if (isId(id)) {\n ident = id;\n } else if (id && _typeof_1(id) === 'object') {\n ident = id[this._idProp]; // look for the identifier field using ._idProp\n } // do the removing if the item is found\n\n\n if (ident != null && this._data[ident]) {\n var item = this._data[ident];\n delete this._data[ident];\n --this.length;\n return item;\n }\n\n return null;\n }\n /**\r\n * Clear the entire data set.\r\n *\r\n * After the items are removed, the [[DataSet]] will trigger an event `remove` for all removed items. When a `senderId` is provided, this id will be passed with the triggered event to all subscribers.\r\n *\r\n * @param senderId - Sender id.\r\n *\r\n * @returns removedIds - The ids of all removed items.\r\n */\n\n }, {\n key: \"clear\",\n value: function clear(senderId) {\n var ids = Object.keys(this._data);\n var items = [];\n\n for (var i = 0, len = ids.length; i < len; i++) {\n items.push(this._data[ids[i]]);\n }\n\n this._data = {};\n this.length = 0;\n\n this._trigger('remove', {\n items: ids,\n oldData: items\n }, senderId);\n\n return ids;\n }\n /**\r\n * Find the item with maximum value of a specified field.\r\n *\r\n * @param field - Name of the property that should be searched for max value.\r\n *\r\n * @returns Item containing max value, or null if no items.\r\n */\n\n }, {\n key: \"max\",\n value: function max(field) {\n var data = this._data;\n var itemIds = Object.keys(data);\n var max = null;\n var maxField = null;\n\n for (var i = 0, len = itemIds.length; i < len; i++) {\n var id = itemIds[i];\n var item = data[id];\n var itemField = item[field];\n\n if (itemField != null && (maxField == null || itemField > maxField)) {\n max = item;\n maxField = itemField;\n }\n }\n\n return max;\n }\n /**\r\n * Find the item with minimum value of a specified field.\r\n *\r\n * @param field - Name of the property that should be searched for min value.\r\n *\r\n * @returns Item containing min value, or null if no items.\r\n */\n\n }, {\n key: \"min\",\n value: function min(field) {\n var data = this._data;\n var itemIds = Object.keys(data);\n var min = null;\n var minField = null;\n\n for (var i = 0, len = itemIds.length; i < len; i++) {\n var id = itemIds[i];\n var item = data[id];\n var itemField = item[field];\n\n if (itemField != null && (minField == null || itemField < minField)) {\n min = item;\n minField = itemField;\n }\n }\n\n return min;\n }\n /**\r\n * Find all distinct values of a specified field\r\n *\r\n * @param prop - The property name whose distinct values should be returned.\r\n *\r\n * @returns Unordered array containing all distinct values. Items without specified property are ignored.\r\n */\n\n }, {\n key: \"distinct\",\n value: function distinct(prop) {\n var data = this._data;\n var itemIds = Object.keys(data);\n var values = [];\n var fieldType = this._options.type && this._options.type[prop] || null;\n var count = 0;\n\n for (var i = 0, len = itemIds.length; i < len; i++) {\n var id = itemIds[i];\n var item = data[id];\n var value = item[prop];\n var exists = false;\n\n for (var j = 0; j < count; j++) {\n if (values[j] == value) {\n exists = true;\n break;\n }\n }\n\n if (!exists && value !== undefined) {\n values[count] = value;\n count++;\n }\n }\n\n if (fieldType) {\n for (var _i10 = 0, _len10 = values.length; _i10 < _len10; _i10++) {\n values[_i10] = convert(values[_i10], fieldType);\n }\n }\n\n return values;\n }\n /**\r\n * Add a single item. Will fail when an item with the same id already exists.\r\n *\r\n * @param item - A new item to be added.\r\n *\r\n * @returns Added item's id. An id is generated when it is not present in the item.\r\n */\n\n }, {\n key: \"_addItem\",\n value: function _addItem(item) {\n var id = item[this._idProp];\n\n if (id != null) {\n // check whether this id is already taken\n if (this._data[id]) {\n // item already exists\n throw new Error('Cannot add item: item with id ' + id + ' already exists');\n }\n } else {\n // generate an id\n id = uuid4();\n item[this._idProp] = id;\n }\n\n var d = {};\n var fields = Object.keys(item);\n\n for (var i = 0, len = fields.length; i < len; i++) {\n var field = fields[i];\n var fieldType = this._type[field]; // type may be undefined\n\n d[field] = convert(item[field], fieldType);\n }\n\n this._data[id] = d;\n this.length++;\n return id;\n }\n /**\r\n * Get an item. Fields can be converted to a specific type\r\n *\r\n * @param id - Id of the requested item.\r\n * @param types - Property name to type name object map of type converstions.\r\n *\r\n * @returns The item, optionally after type conversion.\r\n */\n\n }, {\n key: \"_getItem\",\n value: function _getItem(id, types) {\n // @TODO: I have no idea how to type this.\n // get the item from the dataset\n var raw = this._data[id];\n\n if (!raw) {\n return null;\n } // convert the items field types\n\n\n var converted;\n var fields = Object.keys(raw);\n\n if (types) {\n converted = {};\n\n for (var i = 0, len = fields.length; i < len; i++) {\n var field = fields[i];\n var value = raw[field];\n converted[field] = convert(value, types[field]);\n }\n } else {\n // no field types specified, no converting needed\n converted = _objectSpread({}, raw);\n }\n\n if (converted[this._idProp] == null) {\n converted[this._idProp] = raw.id;\n }\n\n return converted;\n }\n /**\r\n * Update a single item: merge with existing item.\r\n * Will fail when the item has no id, or when there does not exist an item with the same id.\r\n *\r\n * @param item - The new item\r\n *\r\n * @returns The id of the updated item.\r\n */\n\n }, {\n key: \"_updateItem\",\n value: function _updateItem(item) {\n var id = item[this._idProp];\n\n if (id == null) {\n throw new Error('Cannot update item: item has no id (item: ' + JSON.stringify(item) + ')');\n }\n\n var d = this._data[id];\n\n if (!d) {\n // item doesn't exist\n throw new Error('Cannot update item: no item with id ' + id + ' found');\n } // merge with current item\n\n\n var fields = Object.keys(item);\n\n for (var i = 0, len = fields.length; i < len; i++) {\n var field = fields[i];\n var fieldType = this._type[field] // type may be undefined\n ;\n d[field] = convert(item[field], fieldType);\n }\n\n return id;\n }\n }]);\n\n return DataSet;\n}(DataSetPart);\n\n/**\r\n * DataView\r\n *\r\n * A DataView offers a filtered and/or formatted view on a DataSet. One can subscribe to changes in a DataView, and easily get filtered or formatted data without having to specify filters and field types all the time.\r\n *\r\n * ## Example\r\n * ```javascript\r\n * // create a DataSet\r\n * var data = new vis.DataSet();\r\n * data.add([\r\n * {id: 1, text: 'item 1', date: new Date(2013, 6, 20), group: 1, first: true},\r\n * {id: 2, text: 'item 2', date: '2013-06-23', group: 2},\r\n * {id: 3, text: 'item 3', date: '2013-06-25', group: 2},\r\n * {id: 4, text: 'item 4'}\r\n * ]);\r\n *\r\n * // create a DataView\r\n * // the view will only contain items having a property group with value 1,\r\n * // and will only output fields id, text, and date.\r\n * var view = new vis.DataView(data, {\r\n * filter: function (item) {\r\n * return (item.group == 1);\r\n * },\r\n * fields: ['id', 'text', 'date']\r\n * });\r\n *\r\n * // subscribe to any change in the DataView\r\n * view.on('*', function (event, properties, senderId) {\r\n * console.log('event', event, properties);\r\n * });\r\n *\r\n * // update an item in the data set\r\n * data.update({id: 2, group: 1});\r\n *\r\n * // get all ids in the view\r\n * var ids = view.getIds();\r\n * console.log('ids', ids); // will output [1, 2]\r\n *\r\n * // get all items in the view\r\n * var items = view.get();\r\n * ```\r\n *\r\n * @typeParam Item - Item type that may or may not have an id.\r\n * @typeParam IdProp - Name of the property that contains the id.\r\n */\n\nvar DataView =\n/*#__PURE__*/\nfunction (_DataSetPart) {\n inherits(DataView, _DataSetPart);\n\n /**\r\n * Create a DataView.\r\n *\r\n * @param data - The instance containing data (directly or indirectly).\r\n * @param options - Options to configure this data view.\r\n */\n function DataView(data, options) {\n var _this;\n\n classCallCheck(this, DataView);\n\n _this = possibleConstructorReturn(this, getPrototypeOf(DataView).call(this));\n /** @inheritdoc */\n\n _this.length = 0;\n _this._ids = {}; // ids of the items currently in memory (just contains a boolean true)\n\n _this._options = options || {};\n _this.listener = _this._onEvent.bind(assertThisInitialized(_this));\n\n _this.setData(data);\n\n return _this;\n } // TODO: implement a function .config() to dynamically update things like configured filter\n // and trigger changes accordingly\n\n /**\r\n * Set a data source for the view.\r\n *\r\n * @param data - The instance containing data (directly or indirectly).\r\n */\n\n\n createClass(DataView, [{\n key: \"setData\",\n value: function setData(data) {\n if (this._data) {\n // unsubscribe from current dataset\n if (this._data.off) {\n this._data.off('*', this.listener);\n } // trigger a remove of all items in memory\n\n\n var ids = this._data.getIds({\n filter: this._options.filter\n });\n\n var items = this._data.get(ids);\n\n this._ids = {};\n this.length = 0;\n\n this._trigger('remove', {\n items: ids,\n oldData: items\n });\n }\n\n if (data != null) {\n this._data = data; // trigger an add of all added items\n\n var _ids = this._data.getIds({\n filter: this._options.filter\n });\n\n for (var i = 0, len = _ids.length; i < len; i++) {\n var id = _ids[i];\n this._ids[id] = true;\n }\n\n this.length = _ids.length;\n\n this._trigger('add', {\n items: _ids\n });\n } else {\n this._data = new DataSet();\n } // subscribe to new dataset\n\n\n if (this._data.on) {\n this._data.on('*', this.listener);\n }\n }\n /**\r\n * Refresh the DataView.\r\n * Useful when the DataView has a filter function containing a variable parameter.\r\n */\n\n }, {\n key: \"refresh\",\n value: function refresh() {\n var ids = this._data.getIds({\n filter: this._options.filter\n });\n\n var oldIds = Object.keys(this._ids);\n var newIds = {};\n var addedIds = [];\n var removedIds = [];\n var removedItems = []; // check for additions\n\n for (var i = 0, len = ids.length; i < len; i++) {\n var id = ids[i];\n newIds[id] = true;\n\n if (!this._ids[id]) {\n addedIds.push(id);\n this._ids[id] = true;\n }\n } // check for removals\n\n\n for (var _i = 0, _len = oldIds.length; _i < _len; _i++) {\n var _id = oldIds[_i];\n\n var item = this._data.get(_id);\n\n if (item == null) {\n // @TODO: Investigate.\n // Doesn't happen during tests or examples.\n // Is it really impossible or could it eventually happen?\n // How to handle it if it does? The types guarantee non-nullable items.\n console.error('If you see this, report it please.');\n } else if (!newIds[_id]) {\n removedIds.push(_id);\n removedItems.push(item);\n delete this._ids[_id];\n }\n }\n\n this.length += addedIds.length - removedIds.length; // trigger events\n\n if (addedIds.length) {\n this._trigger('add', {\n items: addedIds\n });\n }\n\n if (removedIds.length) {\n this._trigger('remove', {\n items: removedIds,\n oldData: removedItems\n });\n }\n }\n /** @inheritdoc */\n\n }, {\n key: \"get\",\n value: function get(first, second) {\n if (this._data == null) {\n return null;\n } // parse the arguments\n\n\n var ids = null;\n var options;\n\n if (isId(first) || Array.isArray(first)) {\n ids = first;\n options = second;\n } else {\n options = first;\n } // extend the options with the default options and provided options\n\n\n var viewOptions = Object.assign({}, this._options, options); // create a combined filter method when needed\n\n var thisFilter = this._options.filter;\n var optionsFilter = options && options.filter;\n\n if (thisFilter && optionsFilter) {\n viewOptions.filter = function (item) {\n return thisFilter(item) && optionsFilter(item);\n };\n }\n\n if (ids == null) {\n return this._data.get(viewOptions);\n } else {\n return this._data.get(ids, viewOptions);\n }\n }\n /** @inheritdoc */\n\n }, {\n key: \"getIds\",\n value: function getIds(options) {\n if (this._data.length) {\n var defaultFilter = this._options.filter;\n var optionsFilter = options != null ? options.filter : null;\n var filter;\n\n if (optionsFilter) {\n if (defaultFilter) {\n filter = function filter(item) {\n return defaultFilter(item) && optionsFilter(item);\n };\n } else {\n filter = optionsFilter;\n }\n } else {\n filter = defaultFilter;\n }\n\n return this._data.getIds({\n filter: filter,\n order: options && options.order\n });\n } else {\n return [];\n }\n }\n /** @inheritdoc */\n\n }, {\n key: \"forEach\",\n value: function forEach(callback, options) {\n if (this._data) {\n var defaultFilter = this._options.filter;\n var optionsFilter = options && options.filter;\n var filter;\n\n if (optionsFilter) {\n if (defaultFilter) {\n filter = function filter(item) {\n return defaultFilter(item) && optionsFilter(item);\n };\n } else {\n filter = optionsFilter;\n }\n } else {\n filter = defaultFilter;\n }\n\n this._data.forEach(callback, {\n filter: filter,\n order: options && options.order\n });\n }\n }\n /** @inheritdoc */\n\n }, {\n key: \"map\",\n value: function map(callback, options) {\n if (this._data) {\n var defaultFilter = this._options.filter;\n var optionsFilter = options && options.filter;\n var filter;\n\n if (optionsFilter) {\n if (defaultFilter) {\n filter = function filter(item) {\n return defaultFilter(item) && optionsFilter(item);\n };\n } else {\n filter = optionsFilter;\n }\n } else {\n filter = defaultFilter;\n }\n\n return this._data.map(callback, {\n filter: filter,\n order: options && options.order\n });\n } else {\n return [];\n }\n }\n /** @inheritdoc */\n\n }, {\n key: \"getDataSet\",\n value: function getDataSet() {\n return this._data.getDataSet();\n }\n /**\r\n * Event listener. Will propagate all events from the connected data set to the subscribers of the DataView, but will filter the items and only trigger when there are changes in the filtered data set.\r\n *\r\n * @param event - The name of the event.\r\n * @param params - Parameters of the event.\r\n * @param senderId - Id supplied by the sender.\r\n */\n\n }, {\n key: \"_onEvent\",\n value: function _onEvent(event, params, senderId) {\n if (!params || !params.items || !this._data) {\n return;\n }\n\n var ids = params.items;\n var addedIds = [];\n var updatedIds = [];\n var removedIds = [];\n var oldItems = [];\n var updatedItems = [];\n var removedItems = [];\n\n switch (event) {\n case 'add':\n // filter the ids of the added items\n for (var i = 0, len = ids.length; i < len; i++) {\n var id = ids[i];\n var item = this.get(id);\n\n if (item) {\n this._ids[id] = true;\n addedIds.push(id);\n }\n }\n\n break;\n\n case 'update':\n // determine the event from the views viewpoint: an updated\n // item can be added, updated, or removed from this view.\n for (var _i2 = 0, _len2 = ids.length; _i2 < _len2; _i2++) {\n var _id2 = ids[_i2];\n\n var _item = this.get(_id2);\n\n if (_item) {\n if (this._ids[_id2]) {\n updatedIds.push(_id2);\n updatedItems.push(params.data[_i2]);\n oldItems.push(params.oldData[_i2]);\n } else {\n this._ids[_id2] = true;\n addedIds.push(_id2);\n }\n } else {\n if (this._ids[_id2]) {\n delete this._ids[_id2];\n removedIds.push(_id2);\n removedItems.push(params.oldData[_i2]);\n }\n }\n }\n\n break;\n\n case 'remove':\n // filter the ids of the removed items\n for (var _i3 = 0, _len3 = ids.length; _i3 < _len3; _i3++) {\n var _id3 = ids[_i3];\n\n if (this._ids[_id3]) {\n delete this._ids[_id3];\n removedIds.push(_id3);\n removedItems.push(params.oldData[_i3]);\n }\n }\n\n break;\n }\n\n this.length += addedIds.length - removedIds.length;\n\n if (addedIds.length) {\n this._trigger('add', {\n items: addedIds\n }, senderId);\n }\n\n if (updatedIds.length) {\n this._trigger('update', {\n items: updatedIds,\n oldData: oldItems,\n data: updatedItems\n }, senderId);\n }\n\n if (removedIds.length) {\n this._trigger('remove', {\n items: removedIds,\n oldData: removedItems\n }, senderId);\n }\n }\n }]);\n\n return DataView;\n}(DataSetPart);\n\nvar index = {\n DataSet: DataSet,\n DataView: DataView,\n Queue: Queue\n};\n\nexport default index;\nexport { DataSet, DataView, Queue };\n","/**\n * Parse a text source containing data in DOT language into a JSON object.\n * The object contains two lists: one with nodes and one with edges.\n *\n * DOT language reference: http://www.graphviz.org/doc/info/lang.html\n *\n * DOT language attributes: http://graphviz.org/content/attrs\n *\n * @param {string} data Text containing a graph in DOT-notation\n * @return {Object} graph An object containing two parameters:\n * {Object[]} nodes\n * {Object[]} edges\n *\n * -------------------------------------------\n * TODO\n * ====\n *\n * For label handling, this is an incomplete implementation. From docs (quote #3015):\n * \n * > the escape sequences \"\\n\", \"\\l\" and \"\\r\" divide the label into lines, centered, \n * > left-justified, and right-justified, respectively.\n *\n * Source: http://www.graphviz.org/content/attrs#kescString\n *\n * > As another aid for readability, dot allows double-quoted strings to span multiple physical\n * > lines using the standard C convention of a backslash immediately preceding a newline\n * > character\n * > In addition, double-quoted strings can be concatenated using a '+' operator.\n * > As HTML strings can contain newline characters, which are used solely for formatting,\n * > the language does not allow escaped newlines or concatenation operators to be used\n * > within them.\n *\n * - Currently, only '\\\\n' is handled\n * - Note that text explicitly says 'labels'; the dot parser currently handles escape\n * sequences in **all** strings.\n */\nfunction parseDOT (data) {\n dot = data;\n return parseGraph();\n}\n\n// mapping of attributes from DOT (the keys) to vis.js (the values)\nvar NODE_ATTR_MAPPING = {\n 'fontsize': 'font.size',\n 'fontcolor': 'font.color',\n 'labelfontcolor': 'font.color',\n 'fontname': 'font.face',\n 'color': ['color.border', 'color.background'],\n 'fillcolor': 'color.background',\n 'tooltip': 'title',\n 'labeltooltip': 'title'\n};\nvar EDGE_ATTR_MAPPING = Object.create(NODE_ATTR_MAPPING);\nEDGE_ATTR_MAPPING.color = 'color.color';\nEDGE_ATTR_MAPPING.style = 'dashes';\n\n// token types enumeration\nvar TOKENTYPE = {\n NULL : 0,\n DELIMITER : 1,\n IDENTIFIER: 2,\n UNKNOWN : 3\n};\n\n// map with all delimiters\nvar DELIMITERS = {\n '{': true,\n '}': true,\n '[': true,\n ']': true,\n ';': true,\n '=': true,\n ',': true,\n\n '->': true,\n '--': true\n};\n\nvar dot = ''; // current dot file\nvar index = 0; // current index in dot file\nvar c = ''; // current token character in expr\nvar token = ''; // current token\nvar tokenType = TOKENTYPE.NULL; // type of the token\n\n/**\n * Get the first character from the dot file.\n * The character is stored into the char c. If the end of the dot file is\n * reached, the function puts an empty string in c.\n */\nfunction first() {\n index = 0;\n c = dot.charAt(0);\n}\n\n/**\n * Get the next character from the dot file.\n * The character is stored into the char c. If the end of the dot file is\n * reached, the function puts an empty string in c.\n */\nfunction next() {\n index++;\n c = dot.charAt(index);\n}\n\n/**\n * Preview the next character from the dot file.\n * @return {string} cNext\n */\nfunction nextPreview() {\n return dot.charAt(index + 1);\n}\n\nvar regexAlphaNumeric = /[a-zA-Z_0-9.:#]/;\n/**\n * Test whether given character is alphabetic or numeric\n * @param {string} c\n * @return {Boolean} isAlphaNumeric\n */\nfunction isAlphaNumeric(c) {\n return regexAlphaNumeric.test(c);\n}\n\n/**\n * Merge all options of object b into object b\n * @param {Object} a\n * @param {Object} b\n * @return {Object} a\n */\nfunction merge (a, b) {\n if (!a) {\n a = {};\n }\n\n if (b) {\n for (var name in b) {\n if (b.hasOwnProperty(name)) {\n a[name] = b[name];\n }\n }\n }\n return a;\n}\n\n/**\n * Set a value in an object, where the provided parameter name can be a\n * path with nested parameters. For example:\n *\n * var obj = {a: 2};\n * setValue(obj, 'b.c', 3); // obj = {a: 2, b: {c: 3}}\n *\n * @param {Object} obj\n * @param {string} path A parameter name or dot-separated parameter path,\n * like \"color.highlight.border\".\n * @param {*} value\n */\nfunction setValue(obj, path, value) {\n var keys = path.split('.');\n var o = obj;\n while (keys.length) {\n var key = keys.shift();\n if (keys.length) {\n // this isn't the end point\n if (!o[key]) {\n o[key] = {};\n }\n o = o[key];\n }\n else {\n // this is the end point\n o[key] = value;\n }\n }\n}\n\n/**\n * Add a node to a graph object. If there is already a node with\n * the same id, their attributes will be merged.\n * @param {Object} graph\n * @param {Object} node\n */\nfunction addNode(graph, node) {\n var i, len;\n var current = null;\n\n // find root graph (in case of subgraph)\n var graphs = [graph]; // list with all graphs from current graph to root graph\n var root = graph;\n while (root.parent) {\n graphs.push(root.parent);\n root = root.parent;\n }\n\n // find existing node (at root level) by its id\n if (root.nodes) {\n for (i = 0, len = root.nodes.length; i < len; i++) {\n if (node.id === root.nodes[i].id) {\n current = root.nodes[i];\n break;\n }\n }\n }\n\n if (!current) {\n // this is a new node\n current = {\n id: node.id\n };\n if (graph.node) {\n // clone default attributes\n current.attr = merge(current.attr, graph.node);\n }\n }\n\n // add node to this (sub)graph and all its parent graphs\n for (i = graphs.length - 1; i >= 0; i--) {\n var g = graphs[i];\n\n if (!g.nodes) {\n g.nodes = [];\n }\n if (g.nodes.indexOf(current) === -1) {\n g.nodes.push(current);\n }\n }\n\n // merge attributes\n if (node.attr) {\n current.attr = merge(current.attr, node.attr);\n }\n}\n\n/**\n * Add an edge to a graph object\n * @param {Object} graph\n * @param {Object} edge\n */\nfunction addEdge(graph, edge) {\n if (!graph.edges) {\n graph.edges = [];\n }\n graph.edges.push(edge);\n if (graph.edge) {\n var attr = merge({}, graph.edge); // clone default attributes\n edge.attr = merge(attr, edge.attr); // merge attributes\n }\n}\n\n/**\n * Create an edge to a graph object\n * @param {Object} graph\n * @param {string | number | Object} from\n * @param {string | number | Object} to\n * @param {string} type\n * @param {Object | null} attr\n * @return {Object} edge\n */\nfunction createEdge(graph, from, to, type, attr) {\n var edge = {\n from: from,\n to: to,\n type: type\n };\n\n if (graph.edge) {\n edge.attr = merge({}, graph.edge); // clone default attributes\n }\n edge.attr = merge(edge.attr || {}, attr); // merge attributes\n\n // Move arrows attribute from attr to edge temporally created in\n // parseAttributeList().\n if (attr != null) {\n if (attr.hasOwnProperty('arrows') && attr['arrows'] != null) {\n edge['arrows'] = {to: {enabled: true, type: attr.arrows.type}};\n attr['arrows'] = null;\n }\n }\n return edge;\n}\n\n/**\n * Get next token in the current dot file.\n * The token and token type are available as token and tokenType\n */\nfunction getToken() {\n tokenType = TOKENTYPE.NULL;\n token = '';\n\n // skip over whitespaces\n while (c === ' ' || c === '\\t' || c === '\\n' || c === '\\r') { // space, tab, enter\n next();\n }\n\n do {\n var isComment = false;\n\n // skip comment\n if (c === '#') {\n // find the previous non-space character\n var i = index - 1;\n while (dot.charAt(i) === ' ' || dot.charAt(i) === '\\t') {\n i--;\n }\n if (dot.charAt(i) === '\\n' || dot.charAt(i) === '') {\n // the # is at the start of a line, this is indeed a line comment\n while (c != '' && c != '\\n') {\n next();\n }\n isComment = true;\n }\n }\n if (c === '/' && nextPreview() === '/') {\n // skip line comment\n while (c != '' && c != '\\n') {\n next();\n }\n isComment = true;\n }\n if (c === '/' && nextPreview() === '*') {\n // skip block comment\n while (c != '') {\n if (c === '*' && nextPreview() === '/') {\n // end of block comment found. skip these last two characters\n next();\n next();\n break;\n }\n else {\n next();\n }\n }\n isComment = true;\n }\n\n // skip over whitespaces\n while (c === ' ' || c === '\\t' || c === '\\n' || c === '\\r') { // space, tab, enter\n next();\n }\n }\n while (isComment);\n\n // check for end of dot file\n if (c === '') {\n // token is still empty\n tokenType = TOKENTYPE.DELIMITER;\n return;\n }\n\n // check for delimiters consisting of 2 characters\n var c2 = c + nextPreview();\n if (DELIMITERS[c2]) {\n tokenType = TOKENTYPE.DELIMITER;\n token = c2;\n next();\n next();\n return;\n }\n\n // check for delimiters consisting of 1 character\n if (DELIMITERS[c]) {\n tokenType = TOKENTYPE.DELIMITER;\n token = c;\n next();\n return;\n }\n\n // check for an identifier (number or string)\n // TODO: more precise parsing of numbers/strings (and the port separator ':')\n if (isAlphaNumeric(c) || c === '-') {\n token += c;\n next();\n\n while (isAlphaNumeric(c)) {\n token += c;\n next();\n }\n if (token === 'false') {\n token = false; // convert to boolean\n }\n else if (token === 'true') {\n token = true; // convert to boolean\n }\n else if (!isNaN(Number(token))) {\n token = Number(token); // convert to number\n }\n tokenType = TOKENTYPE.IDENTIFIER;\n return;\n }\n\n // check for a string enclosed by double quotes\n if (c === '\"') {\n next();\n while (c != '' && (c != '\"' || (c === '\"' && nextPreview() === '\"'))) {\n if (c === '\"') { // skip the escape character\n token += c;\n next();\n } else if (c === '\\\\' && nextPreview() === 'n') { // Honor a newline escape sequence\n token += '\\n';\n next();\n } else {\n token += c;\n }\n next();\n }\n if (c != '\"') {\n throw newSyntaxError('End of string \" expected');\n }\n next();\n tokenType = TOKENTYPE.IDENTIFIER;\n return;\n }\n\n // something unknown is found, wrong characters, a syntax error\n tokenType = TOKENTYPE.UNKNOWN;\n while (c != '') {\n token += c;\n next();\n }\n throw new SyntaxError('Syntax error in part \"' + chop(token, 30) + '\"');\n}\n\n/**\n * Parse a graph.\n * @returns {Object} graph\n */\nfunction parseGraph() {\n var graph = {};\n\n first();\n getToken();\n\n // optional strict keyword\n if (token === 'strict') {\n graph.strict = true;\n getToken();\n }\n\n // graph or digraph keyword\n if (token === 'graph' || token === 'digraph') {\n graph.type = token;\n getToken();\n }\n\n // optional graph id\n if (tokenType === TOKENTYPE.IDENTIFIER) {\n graph.id = token;\n getToken();\n }\n\n // open angle bracket\n if (token != '{') {\n throw newSyntaxError('Angle bracket { expected');\n }\n getToken();\n\n // statements\n parseStatements(graph);\n\n // close angle bracket\n if (token != '}') {\n throw newSyntaxError('Angle bracket } expected');\n }\n getToken();\n\n // end of file\n if (token !== '') {\n throw newSyntaxError('End of file expected');\n }\n getToken();\n\n // remove temporary default options\n delete graph.node;\n delete graph.edge;\n delete graph.graph;\n\n return graph;\n}\n\n/**\n * Parse a list with statements.\n * @param {Object} graph\n */\nfunction parseStatements (graph) {\n while (token !== '' && token != '}') {\n parseStatement(graph);\n if (token === ';') {\n getToken();\n }\n }\n}\n\n/**\n * Parse a single statement. Can be a an attribute statement, node\n * statement, a series of node statements and edge statements, or a\n * parameter.\n * @param {Object} graph\n */\nfunction parseStatement(graph) {\n // parse subgraph\n var subgraph = parseSubgraph(graph);\n if (subgraph) {\n // edge statements\n parseEdge(graph, subgraph);\n\n return;\n }\n\n // parse an attribute statement\n var attr = parseAttributeStatement(graph);\n if (attr) {\n return;\n }\n\n // parse node\n if (tokenType != TOKENTYPE.IDENTIFIER) {\n throw newSyntaxError('Identifier expected');\n }\n var id = token; // id can be a string or a number\n getToken();\n\n if (token === '=') {\n // id statement\n getToken();\n if (tokenType != TOKENTYPE.IDENTIFIER) {\n throw newSyntaxError('Identifier expected');\n }\n graph[id] = token;\n getToken();\n // TODO: implement comma separated list with \"a_list: ID=ID [','] [a_list] \"\n }\n else {\n parseNodeStatement(graph, id);\n }\n}\n\n/**\n * Parse a subgraph\n * @param {Object} graph parent graph object\n * @return {Object | null} subgraph\n */\nfunction parseSubgraph (graph) {\n var subgraph = null;\n\n // optional subgraph keyword\n if (token === 'subgraph') {\n subgraph = {};\n subgraph.type = 'subgraph';\n getToken();\n\n // optional graph id\n if (tokenType === TOKENTYPE.IDENTIFIER) {\n subgraph.id = token;\n getToken();\n }\n }\n\n // open angle bracket\n if (token === '{') {\n getToken();\n\n if (!subgraph) {\n subgraph = {};\n }\n subgraph.parent = graph;\n subgraph.node = graph.node;\n subgraph.edge = graph.edge;\n subgraph.graph = graph.graph;\n\n // statements\n parseStatements(subgraph);\n\n // close angle bracket\n if (token != '}') {\n throw newSyntaxError('Angle bracket } expected');\n }\n getToken();\n\n // remove temporary default options\n delete subgraph.node;\n delete subgraph.edge;\n delete subgraph.graph;\n delete subgraph.parent;\n\n // register at the parent graph\n if (!graph.subgraphs) {\n graph.subgraphs = [];\n }\n graph.subgraphs.push(subgraph);\n }\n\n return subgraph;\n}\n\n/**\n * parse an attribute statement like \"node [shape=circle fontSize=16]\".\n * Available keywords are 'node', 'edge', 'graph'.\n * The previous list with default attributes will be replaced\n * @param {Object} graph\n * @returns {String | null} keyword Returns the name of the parsed attribute\n * (node, edge, graph), or null if nothing\n * is parsed.\n */\nfunction parseAttributeStatement (graph) {\n // attribute statements\n if (token === 'node') {\n getToken();\n\n // node attributes\n graph.node = parseAttributeList();\n return 'node';\n }\n else if (token === 'edge') {\n getToken();\n\n // edge attributes\n graph.edge = parseAttributeList();\n return 'edge';\n }\n else if (token === 'graph') {\n getToken();\n\n // graph attributes\n graph.graph = parseAttributeList();\n return 'graph';\n }\n\n return null;\n}\n\n/**\n * parse a node statement\n * @param {Object} graph\n * @param {string | number} id\n */\nfunction parseNodeStatement(graph, id) {\n // node statement\n var node = {\n id: id\n };\n var attr = parseAttributeList();\n if (attr) {\n node.attr = attr;\n }\n addNode(graph, node);\n\n // edge statements\n parseEdge(graph, id);\n}\n\n/**\n * Parse an edge or a series of edges\n * @param {Object} graph\n * @param {string | number} from Id of the from node\n */\nfunction parseEdge(graph, from) {\n while (token === '->' || token === '--') {\n var to;\n var type = token;\n getToken();\n\n var subgraph = parseSubgraph(graph);\n if (subgraph) {\n to = subgraph;\n }\n else {\n if (tokenType != TOKENTYPE.IDENTIFIER) {\n throw newSyntaxError('Identifier or subgraph expected');\n }\n to = token;\n addNode(graph, {\n id: to\n });\n getToken();\n }\n\n // parse edge attributes\n var attr = parseAttributeList();\n\n // create edge\n var edge = createEdge(graph, from, to, type, attr);\n addEdge(graph, edge);\n\n from = to;\n }\n}\n\n/**\n * As explained in [1], graphviz has limitations for combination of\n * arrow[head|tail] and dir. If attribute list includes 'dir',\n * following cases just be supported.\n * 1. both or none + arrowhead, arrowtail\n * 2. forward + arrowhead (arrowtail is not affedted)\n * 3. back + arrowtail (arrowhead is not affected)\n * [1] https://www.graphviz.org/doc/info/attrs.html#h:undir_note\n *\n * This function is called from parseAttributeList() to parse 'dir'\n * attribute with given 'attr_names' and 'attr_list'.\n * @param {Object} attr_names Array of attribute names\n * @param {Object} attr_list Array of objects of attribute set\n * @return {Object} attr_list Updated attr_list\n */\nfunction parseDirAttribute(attr_names, attr_list) {\n var i;\n if (attr_names.includes('dir')) {\n var idx = {}; // get index of 'arrows' and 'dir'\n idx.arrows = {};\n for (i = 0; i < attr_list.length; i++) {\n if (attr_list[i].name === 'arrows') {\n if (attr_list[i].value.to != null) {\n idx.arrows.to = i;\n } else if (attr_list[i].value.from != null) {\n idx.arrows.from = i;\n } else {\n throw newSyntaxError('Invalid value of arrows');\n }\n } else if (attr_list[i].name === 'dir') {\n idx.dir = i;\n }\n }\n\n // first, add default arrow shape if it is not assigned to avoid error\n var dir_type = attr_list[idx.dir].value;\n if (!attr_names.includes('arrows')) {\n if (dir_type === 'both') {\n attr_list.push(\n {'attr': attr_list[idx.dir].attr, 'name': 'arrows',\n 'value': {'to': {'enabled': true}}\n }\n );\n idx.arrows.to = attr_list.length - 1;\n attr_list.push(\n {'attr': attr_list[idx.dir].attr, 'name': 'arrows',\n 'value': {'from': {'enabled': true}}\n }\n );\n idx.arrows.from = attr_list.length - 1;\n } else if (dir_type === 'forward') {\n attr_list.push(\n {'attr': attr_list[idx.dir].attr, 'name': 'arrows',\n 'value': {'to': {'enabled': true}}\n }\n );\n idx.arrows.to = attr_list.length - 1;\n } else if (dir_type === 'back') {\n attr_list.push(\n {'attr': attr_list[idx.dir].attr, 'name': 'arrows',\n 'value': {'from': {'enabled': true}}\n }\n );\n idx.arrows.from = attr_list.length - 1;\n } else if (dir_type === 'none') {\n attr_list.push(\n {'attr': attr_list[idx.dir].attr, 'name': 'arrows', 'value': ''}\n );\n idx.arrows.to = attr_list.length - 1;\n } else {\n throw newSyntaxError('Invalid dir type \"' + dir_type + '\"');\n }\n }\n\n var from_type;\n var to_type;\n // update 'arrows' attribute from 'dir'.\n if (dir_type === 'both') {\n // both of shapes of 'from' and 'to' are given\n if (idx.arrows.to && idx.arrows.from) {\n to_type = attr_list[idx.arrows.to].value.to.type;\n from_type = attr_list[idx.arrows.from].value.from.type;\n attr_list[idx.arrows.to] = {\n 'attr': attr_list[idx.arrows.to].attr,\n 'name': attr_list[idx.arrows.to].name,\n 'value': {\n 'to': {'enabled': true, 'type': to_type},\n 'from': {'enabled': true, 'type': from_type}\n }\n };\n attr_list.splice(idx.arrows.from, 1);\n\n // shape of 'to' is assigned and use default to 'from'\n } else if (idx.arrows.to) {\n to_type = attr_list[idx.arrows.to].value.to.type;\n from_type = 'arrow';\n attr_list[idx.arrows.to] = {\n 'attr': attr_list[idx.arrows.to].attr,\n 'name': attr_list[idx.arrows.to].name,\n 'value': {\n 'to': {'enabled': true, 'type': to_type},\n 'from': {'enabled': true, 'type': from_type}\n }\n };\n\n // only shape of 'from' is assigned and use default for 'to'\n } else if (idx.arrows.from) {\n to_type = 'arrow';\n from_type = attr_list[idx.arrows.from].value.from.type;\n attr_list[idx.arrows.from] = {\n 'attr': attr_list[idx.arrows.from].attr,\n 'name': attr_list[idx.arrows.from].name,\n 'value': {\n 'to': {'enabled': true, 'type': to_type},\n 'from': {'enabled': true, 'type': from_type}\n }\n };\n }\n\n } else if (dir_type === 'back') {\n // given both of shapes, but use only 'from'\n if (idx.arrows.to && idx.arrows.from) {\n to_type = '';\n from_type = attr_list[idx.arrows.from].value.from.type;\n attr_list[idx.arrows.from] = {\n 'attr': attr_list[idx.arrows.from].attr,\n 'name': attr_list[idx.arrows.from].name,\n 'value': {\n 'to': {'enabled': true, 'type': to_type},\n 'from': {'enabled': true, 'type': from_type}\n }\n };\n\n // given shape of 'to', but does not use it\n } else if (idx.arrows.to) {\n to_type = '';\n from_type = 'arrow';\n idx.arrows.from = idx.arrows.to;\n attr_list[idx.arrows.from] = {\n 'attr': attr_list[idx.arrows.from].attr,\n 'name': attr_list[idx.arrows.from].name,\n 'value': {\n 'to': {'enabled': true, 'type': to_type},\n 'from': {'enabled': true, 'type': from_type}\n }\n };\n\n // assign given 'from' shape\n } else if (idx.arrows.from) {\n to_type = '';\n from_type = attr_list[idx.arrows.from].value.from.type;\n attr_list[idx.arrows.to] = {\n 'attr': attr_list[idx.arrows.from].attr,\n 'name': attr_list[idx.arrows.from].name,\n 'value': {\n 'to': {'enabled': true, 'type': to_type},\n 'from': {'enabled': true, 'type': from_type}\n }\n };\n }\n\n attr_list[idx.arrows.from] = {\n 'attr': attr_list[idx.arrows.from].attr,\n 'name': attr_list[idx.arrows.from].name,\n 'value': {\n 'from': {\n 'enabled': true,\n 'type': attr_list[idx.arrows.from].value.from.type}\n }\n };\n\n } else if (dir_type === 'none') {\n var idx_arrow;\n if (idx.arrows.to) {\n idx_arrow = idx.arrows.to;\n } else {\n idx_arrow = idx.arrows.from;\n }\n\n attr_list[idx_arrow] = {\n 'attr': attr_list[idx_arrow].attr,\n 'name': attr_list[idx_arrow].name,\n 'value': ''\n };\n\n } else if (dir_type === 'forward'){\n // given both of shapes, but use only 'to'\n if (idx.arrows.to && idx.arrows.from) {\n to_type = attr_list[idx.arrows.to].value.to.type;\n from_type = '';\n attr_list[idx.arrows.to] = {\n 'attr': attr_list[idx.arrows.to].attr,\n 'name': attr_list[idx.arrows.to].name,\n 'value': {\n 'to': {'enabled': true, 'type': to_type},\n 'from': {'enabled': true, 'type': from_type}\n }\n };\n\n // assign given 'to' shape\n } else if (idx.arrows.to) {\n to_type = attr_list[idx.arrows.to].value.to.type;\n from_type = '';\n attr_list[idx.arrows.to] = {\n 'attr': attr_list[idx.arrows.to].attr,\n 'name': attr_list[idx.arrows.to].name,\n 'value': {\n 'to': {'enabled': true, 'type': to_type},\n 'from': {'enabled': true, 'type': from_type}\n }\n };\n\n // given shape of 'from', but does not use it\n } else if (idx.arrows.from) {\n to_type = 'arrow';\n from_type = '';\n idx.arrows.to = idx.arrows.from;\n attr_list[idx.arrows.to] = {\n 'attr': attr_list[idx.arrows.to].attr,\n 'name': attr_list[idx.arrows.to].name,\n 'value': {\n 'to': {'enabled': true, 'type': to_type},\n 'from': {'enabled': true, 'type': from_type}\n }\n };\n }\n\n attr_list[idx.arrows.to] = {\n 'attr': attr_list[idx.arrows.to].attr,\n 'name': attr_list[idx.arrows.to].name,\n 'value': {\n 'to': {\n 'enabled': true,\n 'type': attr_list[idx.arrows.to].value.to.type\n }\n }\n };\n } else {\n throw newSyntaxError('Invalid dir type \"' + dir_type + '\"');\n }\n\n // remove 'dir' attribute no need anymore\n attr_list.splice(idx.dir, 1);\n }\n return attr_list;\n}\n\n/**\n * Parse a set with attributes,\n * for example [label=\"1.000\", shape=solid]\n * @return {Object | null} attr\n */\nfunction parseAttributeList() {\n var i;\n var attr = null;\n\n // edge styles of dot and vis\n var edgeStyles = {\n 'dashed': true,\n 'solid': false,\n 'dotted': [1, 5]\n };\n\n /**\n * Define arrow types.\n * vis currently supports types defined in 'arrowTypes'.\n * Details of arrow shapes are described in\n * http://www.graphviz.org/content/arrow-shapes\n */\n var arrowTypes = {\n dot: 'circle',\n box: 'box',\n crow: 'crow',\n curve: 'curve',\n icurve: 'inv_curve',\n normal: 'triangle',\n inv: 'inv_triangle',\n diamond: 'diamond',\n tee: 'bar',\n vee: 'vee'\n };\n\n /**\n * 'attr_list' contains attributes for checking if some of them are affected\n * later. For instance, both of 'arrowhead' and 'dir' (edge style defined\n * in DOT) make changes to 'arrows' attribute in vis.\n */\n var attr_list = new Array();\n var attr_names = new Array(); // used for checking the case.\n\n // parse attributes\n while (token === '[') {\n getToken();\n attr = {};\n while (token !== '' && token != ']') {\n if (tokenType != TOKENTYPE.IDENTIFIER) {\n throw newSyntaxError('Attribute name expected');\n }\n var name = token;\n\n getToken();\n if (token != '=') {\n throw newSyntaxError('Equal sign = expected');\n }\n getToken();\n\n if (tokenType != TOKENTYPE.IDENTIFIER) {\n throw newSyntaxError('Attribute value expected');\n }\n var value = token;\n\n // convert from dot style to vis\n if (name === 'style') {\n value = edgeStyles[value];\n }\n\n var arrowType;\n if (name === 'arrowhead') {\n arrowType = arrowTypes[value];\n name = 'arrows';\n value = {'to': {'enabled': true, 'type': arrowType}};\n }\n\n if (name === 'arrowtail') {\n arrowType = arrowTypes[value];\n name = 'arrows';\n value = {'from': {'enabled': true, 'type': arrowType}};\n }\n\n attr_list.push(\n {'attr': attr, 'name': name, 'value': value}\n );\n attr_names.push(name);\n\n getToken();\n if (token == ',') {\n getToken();\n }\n }\n\n if (token != ']') {\n throw newSyntaxError('Bracket ] expected');\n }\n getToken();\n }\n\n /**\n * As explained in [1], graphviz has limitations for combination of\n * arrow[head|tail] and dir. If attribute list includes 'dir',\n * following cases just be supported.\n * 1. both or none + arrowhead, arrowtail\n * 2. forward + arrowhead (arrowtail is not affedted)\n * 3. back + arrowtail (arrowhead is not affected)\n * [1] https://www.graphviz.org/doc/info/attrs.html#h:undir_note\n */\n if (attr_names.includes('dir')) {\n var idx = {}; // get index of 'arrows' and 'dir'\n idx.arrows = {};\n for (i = 0; i < attr_list.length; i++) {\n if (attr_list[i].name === 'arrows') {\n if (attr_list[i].value.to != null) {\n idx.arrows.to = i;\n } else if (attr_list[i].value.from != null) {\n idx.arrows.from = i;\n } else {\n throw newSyntaxError('Invalid value of arrows');\n }\n } else if (attr_list[i].name === 'dir') {\n idx.dir = i;\n }\n }\n\n // first, add default arrow shape if it is not assigned to avoid error\n var dir_type = attr_list[idx.dir].value;\n if (!attr_names.includes('arrows')) {\n if (dir_type === 'both') {\n attr_list.push(\n {'attr': attr_list[idx.dir].attr, 'name': 'arrows',\n 'value': {to: {enabled:true}}\n }\n );\n idx.arrows.to = attr_list.length - 1;\n attr_list.push(\n {'attr': attr_list[idx.dir].attr, 'name': 'arrows',\n 'value': {from: {enabled:true}}\n }\n );\n idx.arrows.from = attr_list.length - 1;\n } else if (dir_type === 'forward') {\n attr_list.push(\n {'attr': attr_list[idx.dir].attr, 'name': 'arrows',\n 'value': {to: {enabled:true}}\n }\n );\n idx.arrows.to = attr_list.length - 1;\n } else if (dir_type === 'back') {\n attr_list.push(\n {'attr': attr_list[idx.dir].attr, 'name': 'arrows',\n 'value': {from: {enabled:true}}\n }\n );\n idx.arrows.from = attr_list.length - 1;\n } else if (dir_type === 'none') {\n attr_list.push(\n {'attr': attr_list[idx.dir].attr, 'name': 'arrows', 'value': ''}\n );\n idx.arrows.to = attr_list.length - 1;\n } else {\n throw newSyntaxError('Invalid dir type \"' + dir_type + '\"');\n }\n }\n\n var from_type;\n var to_type;\n // update 'arrows' attribute from 'dir'.\n if (dir_type === 'both') {\n // both of shapes of 'from' and 'to' are given\n if (idx.arrows.to && idx.arrows.from) {\n to_type = attr_list[idx.arrows.to].value.to.type;\n from_type = attr_list[idx.arrows.from].value.from.type;\n attr_list[idx.arrows.to] = {\n 'attr': attr_list[idx.arrows.to].attr,\n 'name': attr_list[idx.arrows.to].name,\n 'value': {\n to:{enabled:true, type: to_type},\n from:{enabled:true, type: from_type}\n }\n };\n attr_list.splice(idx.arrows.from, 1);\n\n // shape of 'to' is assigned and use default to 'from'\n } else if (idx.arrows.to) {\n to_type = attr_list[idx.arrows.to].value.to.type;\n from_type = 'arrow';\n attr_list[idx.arrows.to] = {\n 'attr': attr_list[idx.arrows.to].attr,\n 'name': attr_list[idx.arrows.to].name,\n 'value': {\n to:{enabled:true, type: to_type},\n from:{enabled:true, type: from_type}\n }\n };\n\n // only shape of 'from' is assigned and use default for 'to'\n } else if (idx.arrows.from) {\n to_type = 'arrow';\n from_type = attr_list[idx.arrows.from].value.from.type;\n attr_list[idx.arrows.from] = {\n 'attr': attr_list[idx.arrows.from].attr,\n 'name': attr_list[idx.arrows.from].name,\n 'value': {\n to:{enabled:true, type: to_type},\n from:{enabled:true, type: from_type}\n }\n };\n }\n\n } else if (dir_type === 'back') {\n // given both of shapes, but use only 'from'\n if (idx.arrows.to && idx.arrows.from) {\n to_type = '';\n from_type = attr_list[idx.arrows.from].value.from.type;\n attr_list[idx.arrows.from] = {\n 'attr': attr_list[idx.arrows.from].attr,\n 'name': attr_list[idx.arrows.from].name,\n 'value': {\n to:{enabled:true, type: to_type},\n from:{enabled:true, type: from_type}\n }\n };\n\n // given shape of 'to', but does not use it\n } else if (idx.arrows.to) {\n to_type = '';\n from_type = 'arrow';\n idx.arrows.from = idx.arrows.to;\n attr_list[idx.arrows.from] = {\n 'attr': attr_list[idx.arrows.from].attr,\n 'name': attr_list[idx.arrows.from].name,\n 'value': {\n to:{enabled:true, type: to_type},\n from:{enabled:true, type: from_type}\n }\n };\n\n // assign given 'from' shape\n } else if (idx.arrows.from) {\n to_type = '';\n from_type = attr_list[idx.arrows.from].value.from.type;\n attr_list[idx.arrows.to] = {\n 'attr': attr_list[idx.arrows.from].attr,\n 'name': attr_list[idx.arrows.from].name,\n 'value': {\n to:{enabled:true, type: to_type},\n from:{enabled:true, type: from_type}\n }\n };\n }\n\n attr_list[idx.arrows.from] = {\n 'attr': attr_list[idx.arrows.from].attr,\n 'name': attr_list[idx.arrows.from].name,\n 'value': {from: {enabled:true, type: attr_list[idx.arrows.from].value.from.type}}\n };\n\n } else if (dir_type === 'none') {\n var idx_arrow;\n if (idx.arrows.to) {\n idx_arrow = idx.arrows.to;\n } else {\n idx_arrow = idx.arrows.from;\n }\n\n attr_list[idx_arrow] = {\n 'attr': attr_list[idx_arrow].attr,\n 'name': attr_list[idx_arrow].name,\n 'value': ''\n };\n\n } else if (dir_type === 'forward'){\n // given both of shapes, but use only 'to'\n if (idx.arrows.to && idx.arrows.from) {\n to_type = attr_list[idx.arrows.to].value.to.type;\n from_type = '';\n attr_list[idx.arrows.to] = {\n 'attr': attr_list[idx.arrows.to].attr,\n 'name': attr_list[idx.arrows.to].name,\n 'value': {\n to:{enabled:true, type: to_type},\n from:{enabled:true, type: from_type}\n }\n };\n\n // assign given 'to' shape\n } else if (idx.arrows.to) {\n to_type = attr_list[idx.arrows.to].value.to.type;\n from_type = '';\n attr_list[idx.arrows.to] = {\n 'attr': attr_list[idx.arrows.to].attr,\n 'name': attr_list[idx.arrows.to].name,\n 'value': {\n to:{enabled:true, type: to_type},\n from:{enabled:true, type: from_type}\n }\n };\n\n // given shape of 'from', but does not use it\n } else if (idx.arrows.from) {\n to_type = 'arrow';\n from_type = '';\n idx.arrows.to = idx.arrows.from;\n attr_list[idx.arrows.to] = {\n 'attr': attr_list[idx.arrows.to].attr,\n 'name': attr_list[idx.arrows.to].name,\n 'value': {\n to:{enabled:true, type: to_type},\n from:{enabled:true, type: from_type}\n }\n };\n }\n\n attr_list[idx.arrows.to] = {\n 'attr': attr_list[idx.arrows.to].attr,\n 'name': attr_list[idx.arrows.to].name,\n 'value': {\n to: {enabled:true, type: attr_list[idx.arrows.to].value.to.type}\n }\n };\n } else {\n throw newSyntaxError('Invalid dir type \"' + dir_type + '\"');\n }\n\n // remove 'dir' attribute no need anymore\n attr_list.splice(idx.dir, 1);\n }\n\n // parse 'penwidth'\n var nof_attr_list;\n if (attr_names.includes('penwidth')) {\n var tmp_attr_list = [];\n\n nof_attr_list = attr_list.length;\n for (i = 0; i < nof_attr_list; i++) {\n // exclude 'width' from attr_list if 'penwidth' exists\n if (attr_list[i].name !== 'width') {\n if (attr_list[i].name === 'penwidth') {\n attr_list[i].name = 'width';\n }\n tmp_attr_list.push(attr_list[i]);\n }\n }\n attr_list = tmp_attr_list;\n }\n\n nof_attr_list = attr_list.length;\n for (i = 0; i < nof_attr_list; i++) {\n setValue(attr_list[i].attr, attr_list[i].name, attr_list[i].value);\n }\n\n return attr;\n}\n\n/**\n * Create a syntax error with extra information on current token and index.\n * @param {string} message\n * @returns {SyntaxError} err\n */\nfunction newSyntaxError(message) {\n return new SyntaxError(message + ', got \"' + chop(token, 30) + '\" (char ' + index + ')');\n}\n\n/**\n * Chop off text after a maximum length\n * @param {string} text\n * @param {number} maxLength\n * @returns {String}\n */\nfunction chop (text, maxLength) {\n return (text.length <= maxLength) ? text : (text.substr(0, 27) + '...');\n}\n\n/**\n * Execute a function fn for each pair of elements in two arrays\n * @param {Array | *} array1\n * @param {Array | *} array2\n * @param {function} fn\n */\nfunction forEach2(array1, array2, fn) {\n if (Array.isArray(array1)) {\n array1.forEach(function (elem1) {\n if (Array.isArray(array2)) {\n array2.forEach(function (elem2) {\n fn(elem1, elem2);\n });\n }\n else {\n fn(elem1, array2);\n }\n });\n }\n else {\n if (Array.isArray(array2)) {\n array2.forEach(function (elem2) {\n fn(array1, elem2);\n });\n }\n else {\n fn(array1, array2);\n }\n }\n}\n\n/**\n * Set a nested property on an object\n * When nested objects are missing, they will be created.\n * For example setProp({}, 'font.color', 'red') will return {font: {color: 'red'}}\n * @param {Object} object\n * @param {string} path A dot separated string like 'font.color'\n * @param {*} value Value for the property\n * @return {Object} Returns the original object, allows for chaining.\n */\nfunction setProp(object, path, value) {\n var names = path.split('.');\n var prop = names.pop();\n\n // traverse over the nested objects\n var obj = object;\n for (var i = 0; i < names.length; i++) {\n var name = names[i];\n if (!(name in obj)) {\n obj[name] = {};\n }\n obj = obj[name];\n }\n\n // set the property value\n obj[prop] = value;\n\n return object;\n}\n\n/**\n * Convert an object with DOT attributes to their vis.js equivalents.\n * @param {Object} attr Object with DOT attributes\n * @param {Object} mapping\n * @return {Object} Returns an object with vis.js attributes\n */\nfunction convertAttr (attr, mapping) {\n var converted = {};\n\n for (var prop in attr) {\n if (attr.hasOwnProperty(prop)) {\n var visProp = mapping[prop];\n if (Array.isArray(visProp)) {\n visProp.forEach(function (visPropI) {\n setProp(converted, visPropI, attr[prop]);\n })\n }\n else if (typeof visProp === 'string') {\n setProp(converted, visProp, attr[prop]);\n }\n else {\n setProp(converted, prop, attr[prop]);\n }\n }\n }\n\n return converted;\n}\n\n/**\n * Convert a string containing a graph in DOT language into a map containing\n * with nodes and edges in the format of graph.\n * @param {string} data Text containing a graph in DOT-notation\n * @return {Object} graphData\n */\nfunction DOTToGraph (data) {\n // parse the DOT file\n var dotData = parseDOT(data);\n var graphData = {\n nodes: [],\n edges: [],\n options: {}\n };\n\n // copy the nodes\n if (dotData.nodes) {\n dotData.nodes.forEach(function (dotNode) {\n var graphNode = {\n id: dotNode.id,\n label: String(dotNode.label || dotNode.id)\n };\n merge(graphNode, convertAttr(dotNode.attr, NODE_ATTR_MAPPING));\n if (graphNode.image) {\n graphNode.shape = 'image';\n }\n graphData.nodes.push(graphNode);\n });\n }\n\n // copy the edges\n if (dotData.edges) {\n /**\n * Convert an edge in DOT format to an edge with VisGraph format\n * @param {Object} dotEdge\n * @returns {Object} graphEdge\n */\n var convertEdge = function (dotEdge) {\n var graphEdge = {\n from: dotEdge.from,\n to: dotEdge.to\n };\n merge(graphEdge, convertAttr(dotEdge.attr, EDGE_ATTR_MAPPING));\n\n // Add arrows attribute to default styled arrow.\n // The reason why default style is not added in parseAttributeList() is\n // because only default is cleared before here.\n if (graphEdge.arrows == null && dotEdge.type === '->') {\n graphEdge.arrows = 'to';\n }\n\n return graphEdge;\n };\n\n dotData.edges.forEach(function (dotEdge) {\n var from, to;\n if (dotEdge.from instanceof Object) {\n from = dotEdge.from.nodes;\n }\n else {\n from = {\n id: dotEdge.from\n }\n }\n\n if (dotEdge.to instanceof Object) {\n to = dotEdge.to.nodes;\n }\n else {\n to = {\n id: dotEdge.to\n }\n }\n\n if (dotEdge.from instanceof Object && dotEdge.from.edges) {\n dotEdge.from.edges.forEach(function (subEdge) {\n var graphEdge = convertEdge(subEdge);\n graphData.edges.push(graphEdge);\n });\n }\n\n forEach2(from, to, function (from, to) {\n var subEdge = createEdge(graphData, from.id, to.id, dotEdge.type, dotEdge.attr);\n var graphEdge = convertEdge(subEdge);\n graphData.edges.push(graphEdge);\n });\n\n if (dotEdge.to instanceof Object && dotEdge.to.edges) {\n dotEdge.to.edges.forEach(function (subEdge) {\n var graphEdge = convertEdge(subEdge);\n graphData.edges.push(graphEdge);\n });\n }\n });\n }\n\n // copy the options\n if (dotData.attr) {\n graphData.options = dotData.attr;\n }\n\n return graphData;\n}\n\n// exports\nexports.parseDOT = parseDOT;\nexports.DOTToGraph = DOTToGraph;\n","export type Id = number | string\n\nexport interface ColorObject {\n background: string\n border: string\n highlight: {\n background: string\n border: string\n }\n hover: {\n background: string\n border: string\n }\n}\n\nexport interface GephiData {\n nodes: GephiNode[]\n edges: GephiEdge[]\n}\nexport interface GephiParseOptions {\n fixed?: boolean\n inheritColor?: boolean\n parseColor?: boolean\n}\n\nexport interface GephiNode {\n id: Id\n\n attributes?: { title?: string }\n color?: string\n label?: string\n size?: number\n title?: string\n x?: number\n y?: number\n}\nexport interface GephiEdge {\n id: Id\n source: Id\n target: Id\n\n attributes?: { title?: string }\n color?: string\n label?: string\n type?: string\n}\n\nexport interface VisData {\n nodes: VisNode[]\n edges: VisEdge[]\n}\n\nexport interface VisNode {\n id: Id\n fixed: boolean\n\n color?: string | ColorObject\n label?: string\n size?: number\n title?: string\n x?: number\n y?: number\n\n attributes?: unknown\n}\nexport interface VisEdge {\n id: Id\n from: Id\n to: Id\n\n arrows?: 'to'\n color?: string\n label?: string\n title?: string\n\n attributes?: unknown\n}\n\n/**\n * Convert Gephi to Vis.\n *\n * @param gephiJSON - The parsed JSON data in Gephi format.\n * @param optionsObj - Additional options.\n *\n * @returns The converted data ready to be used in Vis.\n */\nexport function parseGephi(\n gephiJSON: GephiData,\n optionsObj?: GephiParseOptions\n): VisData {\n const options = {\n edges: {\n inheritColor: false,\n },\n nodes: {\n fixed: false,\n parseColor: false,\n },\n }\n\n if (optionsObj != null) {\n if (optionsObj.fixed != null) {\n options.nodes.fixed = optionsObj.fixed\n }\n if (optionsObj.parseColor != null) {\n options.nodes.parseColor = optionsObj.parseColor\n }\n if (optionsObj.inheritColor != null) {\n options.edges.inheritColor = optionsObj.inheritColor\n }\n }\n\n const gEdges = gephiJSON.edges\n const vEdges = gEdges.map(\n (gEdge): VisEdge => {\n const vEdge: VisEdge = {\n from: gEdge.source,\n id: gEdge.id,\n to: gEdge.target,\n }\n\n if (gEdge.attributes != null) {\n vEdge.attributes = gEdge.attributes\n }\n if (gEdge.label != null) {\n vEdge.label = gEdge.label\n }\n if (gEdge.attributes != null && gEdge.attributes.title != null) {\n vEdge.title = gEdge.attributes.title\n }\n if (gEdge.type === 'Directed') {\n vEdge.arrows = 'to'\n }\n // edge['value'] = gEdge.attributes != null ? gEdge.attributes.Weight : undefined;\n // edge['width'] = edge['value'] != null ? undefined : edgegEdge.size;\n if (gEdge.color && options.edges.inheritColor === false) {\n vEdge.color = gEdge.color\n }\n\n return vEdge\n }\n )\n\n const vNodes = gephiJSON.nodes.map(\n (gNode): VisNode => {\n const vNode: VisNode = {\n id: gNode.id,\n fixed: options.nodes.fixed && gNode.x != null && gNode.y != null,\n }\n\n if (gNode.attributes != null) {\n vNode.attributes = gNode.attributes\n }\n if (gNode.label != null) {\n vNode.label = gNode.label\n }\n if (gNode.size != null) {\n vNode.size = gNode.size\n }\n if (gNode.attributes != null && gNode.attributes.title != null) {\n vNode.title = gNode.attributes.title\n }\n if (gNode.title != null) {\n vNode.title = gNode.title\n }\n if (gNode.x != null) {\n vNode.x = gNode.x\n }\n if (gNode.y != null) {\n vNode.y = gNode.y\n }\n if (gNode.color != null) {\n if (options.nodes.parseColor === true) {\n vNode.color = gNode.color\n } else {\n vNode.color = {\n background: gNode.color,\n border: gNode.color,\n highlight: {\n background: gNode.color,\n border: gNode.color,\n },\n hover: {\n background: gNode.color,\n border: gNode.color,\n },\n }\n }\n }\n\n return vNode\n }\n )\n\n return { nodes: vNodes, edges: vEdges }\n}\n","require('./Activator.css');\n\nvar keycharm = require('keycharm');\nvar Emitter = require('component-emitter');\nvar Hammer = require('../module/hammer');\nvar util = require('vis-util');\n\n/**\n * Turn an element into an clickToUse element.\n * When not active, the element has a transparent overlay. When the overlay is\n * clicked, the mode is changed to active.\n * When active, the element is displayed with a blue border around it, and\n * the interactive contents of the element can be used. When clicked outside\n * the element, the elements mode is changed to inactive.\n * @param {Element} container\n * @constructor Activator\n */\nfunction Activator(container) {\n this.active = false;\n\n this.dom = {\n container: container\n };\n\n this.dom.overlay = document.createElement('div');\n this.dom.overlay.className = 'vis-overlay';\n\n this.dom.container.appendChild(this.dom.overlay);\n\n this.hammer = Hammer(this.dom.overlay);\n this.hammer.on('tap', this._onTapOverlay.bind(this));\n\n // block all touch events (except tap)\n var me = this;\n var events = [\n 'tap', 'doubletap', 'press',\n 'pinch',\n 'pan', 'panstart', 'panmove', 'panend'\n ];\n events.forEach(function (event) {\n me.hammer.on(event, function (event) {\n event.stopPropagation();\n });\n });\n\n // attach a click event to the window, in order to deactivate when clicking outside the timeline\n if (document && document.body) {\n this.onClick = function (event) {\n if (!_hasParent(event.target, container)) {\n me.deactivate();\n }\n };\n document.body.addEventListener('click', this.onClick);\n }\n\n if (this.keycharm !== undefined) {\n this.keycharm.destroy();\n }\n this.keycharm = keycharm();\n\n // keycharm listener only bounded when active)\n this.escListener = this.deactivate.bind(this);\n}\n\n// turn into an event emitter\nEmitter(Activator.prototype);\n\n// The currently active activator\nActivator.current = null;\n\n/**\n * Destroy the activator. Cleans up all created DOM and event listeners\n */\nActivator.prototype.destroy = function () {\n this.deactivate();\n\n // remove dom\n this.dom.overlay.parentNode.removeChild(this.dom.overlay);\n\n // remove global event listener\n if (this.onClick) {\n document.body.removeEventListener('click', this.onClick);\n }\n // remove keycharm\n if (this.keycharm !== undefined) {\n this.keycharm.destroy();\n }\n this.keycharm = null;\n // cleanup hammer instances\n this.hammer.destroy();\n this.hammer = null;\n // FIXME: cleaning up hammer instances doesn't work (Timeline not removed from memory)\n};\n\n/**\n * Activate the element\n * Overlay is hidden, element is decorated with a blue shadow border\n */\nActivator.prototype.activate = function () {\n // we allow only one active activator at a time\n if (Activator.current) {\n Activator.current.deactivate();\n }\n Activator.current = this;\n\n this.active = true;\n this.dom.overlay.style.display = 'none';\n util.addClassName(this.dom.container, 'vis-active');\n\n this.emit('change');\n this.emit('activate');\n\n // ugly hack: bind ESC after emitting the events, as the Network rebinds all\n // keyboard events on a 'change' event\n this.keycharm.bind('esc', this.escListener);\n};\n\n/**\n * Deactivate the element\n * Overlay is displayed on top of the element\n */\nActivator.prototype.deactivate = function () {\n this.active = false;\n this.dom.overlay.style.display = '';\n util.removeClassName(this.dom.container, 'vis-active');\n this.keycharm.unbind('esc', this.escListener);\n\n this.emit('change');\n this.emit('deactivate');\n};\n\n/**\n * Handle a tap event: activate the container\n * @param {Event} event The event\n * @private\n */\nActivator.prototype._onTapOverlay = function (event) {\n // activate the container\n this.activate();\n event.stopPropagation();\n};\n\n/**\n * Test whether the element has the requested parent element somewhere in\n * its chain of parent nodes.\n * @param {HTMLElement} element\n * @param {HTMLElement} parent\n * @returns {boolean} Returns true when the parent is found somewhere in the\n * chain of parent nodes.\n * @private\n */\nfunction _hasParent(element, parent) {\n while (element) {\n if (element === parent) {\n return true\n }\n element = element.parentNode;\n }\n return false;\n}\n\nmodule.exports = Activator;\n","function _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nmodule.exports = _createClass;","function _iterableToArrayLimit(arr, i) {\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}\n\nmodule.exports = _iterableToArrayLimit;","var arrayWithHoles = require(\"./arrayWithHoles\");\n\nvar iterableToArrayLimit = require(\"./iterableToArrayLimit\");\n\nvar nonIterableRest = require(\"./nonIterableRest\");\n\nfunction _slicedToArray(arr, i) {\n return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || nonIterableRest();\n}\n\nmodule.exports = _slicedToArray;","/**\n * Initializes window.requestAnimationFrame() to a usable form.\n *\n * Specifically, set up this method for the case of running on node.js with jsdom enabled.\n *\n * NOTES:\n *\n * * On node.js, when calling this directly outside of this class, `window` is not defined.\n * This happens even if jsdom is used.\n * * For node.js + jsdom, `window` is available at the moment the constructor is called.\n * For this reason, the called is placed within the constructor.\n * * Even then, `window.requestAnimationFrame()` is not defined, so it still needs to be added.\n * * During unit testing, it happens that the window object is reset during execution, causing\n * a runtime error due to missing `requestAnimationFrame()`. This needs to be compensated for,\n * see `_requestNextFrame()`.\n * * Since this is a global object, it may affect other modules besides `Network`. With normal\n * usage, this does not cause any problems. During unit testing, errors may occur. These have\n * been compensated for, see comment block in _requestNextFrame().\n *\n * @private\n */\nfunction _initRequestAnimationFrame() {\n var func;\n\n if (window !== undefined) {\n func = window.requestAnimationFrame\n || window.mozRequestAnimationFrame\n || window.webkitRequestAnimationFrame\n || window.msRequestAnimationFrame;\n }\n\n if (func === undefined) {\n // window or method not present, setting mock requestAnimationFrame\n window.requestAnimationFrame =\n function(callback) {\n //console.log(\"Called mock requestAnimationFrame\");\n callback();\n }\n } else {\n window.requestAnimationFrame = func;\n }\n}\n\nimport util from 'vis-util';\n\n/**\n * The canvas renderer\n */\nclass CanvasRenderer {\n /**\n * @param {Object} body\n * @param {Canvas} canvas\n */\n constructor(body, canvas) {\n _initRequestAnimationFrame();\n this.body = body;\n this.canvas = canvas;\n\n this.redrawRequested = false;\n this.renderTimer = undefined;\n this.requiresTimeout = true;\n this.renderingActive = false;\n this.renderRequests = 0;\n this.allowRedraw = true;\n\n this.dragging = false;\n this.zooming = false;\n this.options = {};\n this.defaultOptions = {\n hideEdgesOnDrag: false,\n hideEdgesOnZoom: false,\n hideNodesOnDrag: false,\n };\n util.extend(this.options, this.defaultOptions);\n\n this._determineBrowserMethod();\n this.bindEventListeners();\n }\n\n /**\n * Binds event listeners\n */\n bindEventListeners() {\n this.body.emitter.on(\"dragStart\", () => { this.dragging = true; });\n this.body.emitter.on(\"dragEnd\", () => { this.dragging = false; });\n this.body.emitter.on(\"zoom\", () => {\n this.zooming = true;\n window.clearTimeout(this.zoomTimeoutId)\n this.zoomTimeoutId = window.setTimeout(() => { \n this.zooming = false;\n this._requestRedraw.bind(this)()\n }, 250) \n });\n this.body.emitter.on(\"_resizeNodes\", () => { this._resizeNodes(); });\n this.body.emitter.on(\"_redraw\", () => {\n if (this.renderingActive === false) {\n this._redraw();\n }\n });\n this.body.emitter.on(\"_blockRedraw\", () => {this.allowRedraw = false;});\n this.body.emitter.on(\"_allowRedraw\", () => {this.allowRedraw = true; this.redrawRequested = false;});\n this.body.emitter.on(\"_requestRedraw\", this._requestRedraw.bind(this));\n this.body.emitter.on(\"_startRendering\", () => {\n this.renderRequests += 1;\n this.renderingActive = true;\n this._startRendering();\n });\n this.body.emitter.on(\"_stopRendering\", () => {\n this.renderRequests -= 1;\n this.renderingActive = this.renderRequests > 0;\n this.renderTimer = undefined;\n });\n this.body.emitter.on('destroy', () => {\n this.renderRequests = 0;\n this.allowRedraw = false;\n this.renderingActive = false;\n if (this.requiresTimeout === true) {\n clearTimeout(this.renderTimer);\n }\n else {\n window.cancelAnimationFrame(this.renderTimer);\n }\n this.body.emitter.off();\n });\n\n\n }\n\n /**\n *\n * @param {Object} options\n */\n setOptions(options) {\n if (options !== undefined) {\n let fields = ['hideEdgesOnDrag', 'hideEdgesOnZoom', 'hideNodesOnDrag'];\n util.selectiveDeepExtend(fields,this.options, options);\n }\n }\n\n\n /**\n * Prepare the drawing of the next frame.\n *\n * Calls the callback when the next frame can or will be drawn.\n *\n * @param {function} callback\n * @param {number} delay - timeout case only, wait this number of milliseconds\n * @returns {function|undefined}\n * @private\n */\n _requestNextFrame(callback, delay) { \n // During unit testing, it happens that the mock window object is reset while\n // the next frame is still pending. Then, either 'window' is not present, or\n // 'requestAnimationFrame()' is not present because it is not defined on the\n // mock window object.\n //\n // As a consequence, unrelated unit tests may appear to fail, even if the problem\n // described happens in the current unit test.\n //\n // This is not something that will happen in normal operation, but we still need\n // to take it into account.\n //\n if (typeof window === 'undefined') return; // Doing `if (window === undefined)` does not work here!\n\n let timer;\n\n var myWindow = window; // Grab a reference to reduce the possibility that 'window' is reset\n // while running this method.\n\n if (this.requiresTimeout === true) {\n // wait given number of milliseconds and perform the animation step function\n timer = myWindow.setTimeout(callback, delay);\n } else {\n if (myWindow.requestAnimationFrame) {\n timer = myWindow.requestAnimationFrame(callback);\n }\n }\n\n return timer;\n }\n\n /**\n *\n * @private\n */\n _startRendering() {\n if (this.renderingActive === true) {\n if (this.renderTimer === undefined) {\n this.renderTimer = this._requestNextFrame(this._renderStep.bind(this), this.simulationInterval);\n }\n }\n }\n\n /**\n *\n * @private\n */\n _renderStep() {\n if (this.renderingActive === true) {\n // reset the renderTimer so a new scheduled animation step can be set\n this.renderTimer = undefined;\n\n if (this.requiresTimeout === true) {\n // this schedules a new simulation step\n this._startRendering();\n }\n\n this._redraw();\n\n if (this.requiresTimeout === false) {\n // this schedules a new simulation step\n this._startRendering();\n }\n }\n }\n\n /**\n * Redraw the network with the current data\n * chart will be resized too.\n */\n redraw() {\n this.body.emitter.emit('setSize');\n this._redraw();\n }\n\n /**\n * Redraw the network with the current data\n * @private\n */\n _requestRedraw() {\n if (this.redrawRequested !== true && this.renderingActive === false && this.allowRedraw === true) {\n this.redrawRequested = true;\n this._requestNextFrame(() => {this._redraw(false);}, 0);\n }\n }\n\n /**\n * Redraw the network with the current data\n * @param {boolean} [hidden=false] | Used to get the first estimate of the node sizes.\n * Only the nodes are drawn after which they are quickly drawn over.\n * @private\n */\n _redraw(hidden = false) {\n if (this.allowRedraw === true) {\n this.body.emitter.emit(\"initRedraw\");\n\n this.redrawRequested = false;\n\n // when the container div was hidden, this fixes it back up!\n if (this.canvas.frame.canvas.width === 0 || this.canvas.frame.canvas.height === 0) {\n this.canvas.setSize();\n }\n\n this.canvas.setTransform();\n\n let ctx = this.canvas.getContext();\n\n // clear the canvas\n let w = this.canvas.frame.canvas.clientWidth;\n let h = this.canvas.frame.canvas.clientHeight;\n ctx.clearRect(0, 0, w, h);\n\n // if the div is hidden, we stop the redraw here for performance.\n if (this.canvas.frame.clientWidth === 0) {\n return;\n }\n\n // set scaling and translation\n ctx.save();\n ctx.translate(this.body.view.translation.x, this.body.view.translation.y);\n ctx.scale(this.body.view.scale, this.body.view.scale);\n\n ctx.beginPath();\n this.body.emitter.emit(\"beforeDrawing\", ctx);\n ctx.closePath();\n\n if (hidden === false) {\n if (\n (this.dragging === false || (this.dragging === true && this.options.hideEdgesOnDrag === false)) && \n (this.zooming === false || (this.zooming === true && this.options.hideEdgesOnZoom === false))\n ) {\n this._drawEdges(ctx);\n }\n }\n\n if (this.dragging === false || (this.dragging === true && this.options.hideNodesOnDrag === false)) {\n this._drawNodes(ctx, hidden);\n }\n\n ctx.beginPath();\n this.body.emitter.emit(\"afterDrawing\", ctx);\n ctx.closePath();\n\n\n // restore original scaling and translation\n ctx.restore();\n if (hidden === true) {\n ctx.clearRect(0, 0, w, h);\n }\n }\n }\n\n\n /**\n * Redraw all nodes\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {boolean} [alwaysShow]\n * @private\n */\n _resizeNodes() {\n this.canvas.setTransform();\n let ctx = this.canvas.getContext();\n ctx.save();\n ctx.translate(this.body.view.translation.x, this.body.view.translation.y);\n ctx.scale(this.body.view.scale, this.body.view.scale);\n\n let nodes = this.body.nodes;\n let node;\n\n // resize all nodes\n for (let nodeId in nodes) {\n if (nodes.hasOwnProperty(nodeId)) {\n node = nodes[nodeId];\n node.resize(ctx);\n node.updateBoundingBox(ctx, node.selected);\n }\n }\n\n // restore original scaling and translation\n ctx.restore();\n }\n\n /**\n * Redraw all nodes\n *\n * @param {CanvasRenderingContext2D} ctx 2D context of a HTML canvas\n * @param {boolean} [alwaysShow]\n * @private\n */\n _drawNodes(ctx, alwaysShow = false) {\n let nodes = this.body.nodes;\n let nodeIndices = this.body.nodeIndices;\n let node;\n let selected = [];\n let margin = 20;\n let topLeft = this.canvas.DOMtoCanvas({x:-margin,y:-margin});\n let bottomRight = this.canvas.DOMtoCanvas({\n x: this.canvas.frame.canvas.clientWidth+margin,\n y: this.canvas.frame.canvas.clientHeight+margin\n });\n let viewableArea = {top:topLeft.y,left:topLeft.x,bottom:bottomRight.y,right:bottomRight.x};\n\n // draw unselected nodes;\n for (let i = 0; i < nodeIndices.length; i++) {\n node = nodes[nodeIndices[i]];\n // set selected nodes aside\n if (node.isSelected()) {\n selected.push(nodeIndices[i]);\n }\n else {\n if (alwaysShow === true) {\n node.draw(ctx);\n }\n else if (node.isBoundingBoxOverlappingWith(viewableArea) === true) {\n node.draw(ctx);\n }\n else {\n node.updateBoundingBox(ctx, node.selected);\n }\n }\n }\n\n // draw the selected nodes on top\n for (let i = 0; i < selected.length; i++) {\n node = nodes[selected[i]];\n node.draw(ctx);\n }\n }\n\n\n /**\n * Redraw all edges\n * @param {CanvasRenderingContext2D} ctx 2D context of a HTML canvas\n * @private\n */\n _drawEdges(ctx) {\n let edges = this.body.edges;\n let edgeIndices = this.body.edgeIndices;\n let edge;\n\n for (let i = 0; i < edgeIndices.length; i++) {\n edge = edges[edgeIndices[i]];\n if (edge.connected === true) {\n edge.draw(ctx);\n }\n }\n }\n\n /**\n * Determine if the browser requires a setTimeout or a requestAnimationFrame. This was required because\n * some implementations (safari and IE9) did not support requestAnimationFrame\n * @private\n */\n _determineBrowserMethod() {\n if (typeof window !== 'undefined') {\n let browserType = navigator.userAgent.toLowerCase();\n this.requiresTimeout = false;\n if (browserType.indexOf('msie 9.0') != -1) { // IE 9\n this.requiresTimeout = true;\n }\n else if (browserType.indexOf('safari') != -1) { // safari\n if (browserType.indexOf('chrome') <= -1) {\n this.requiresTimeout = true;\n }\n }\n }\n else {\n this.requiresTimeout = true;\n }\n }\n}\n\nexport default CanvasRenderer;\n","// Load custom shapes into CanvasRenderingContext2D\nimport './shapes';\n\nimport Emitter from 'component-emitter';\nimport util from 'vis-util';\nimport dotparser from './dotparser';\nimport * as gephiParser from './gephiParser';\nimport Activator from '../shared/Activator';\nimport locales from './locales';\n\nimport Images from './Images';\nimport Groups from './modules/Groups';\nimport NodesHandler from './modules/NodesHandler';\nimport EdgesHandler from './modules/EdgesHandler';\nimport PhysicsEngine from './modules/PhysicsEngine';\nimport ClusterEngine from './modules/Clustering';\nimport CanvasRenderer from './modules/CanvasRenderer';\nimport Canvas from './modules/Canvas';\nimport View from './modules/View';\nimport InteractionHandler from './modules/InteractionHandler';\nimport SelectionHandler from \"./modules/SelectionHandler\";\nimport LayoutEngine from \"./modules/LayoutEngine\";\nimport ManipulationSystem from \"./modules/ManipulationSystem\";\nimport Configurator from \"./../shared/Configurator\";\nimport { Validator, printStyle } from \"./../shared/Validator\";\nimport {allOptions, configureOptions} from './options.js';\nimport KamadaKawai from \"./modules/KamadaKawai.js\";\n\n\n/**\n * Create a network visualization, displaying nodes and edges.\n *\n * @param {Element} container The DOM element in which the Network will\n * be created. Normally a div element.\n * @param {Object} data An object containing parameters\n * {Array} nodes\n * {Array} edges\n * @param {Object} options Options\n * @constructor Network\n */\nexport function Network(container, data, options) {\n if (!(this instanceof Network)) {\n throw new SyntaxError('Constructor must be called with the new operator');\n }\n\n // set constant values\n this.options = {};\n this.defaultOptions = {\n locale: 'en',\n locales: locales,\n clickToUse: false\n };\n util.extend(this.options, this.defaultOptions);\n\n /**\n * Containers for nodes and edges.\n *\n * 'edges' and 'nodes' contain the full definitions of all the network elements.\n * 'nodeIndices' and 'edgeIndices' contain the id's of the active elements.\n *\n * The distinction is important, because a defined node need not be active, i.e.\n * visible on the canvas. This happens in particular when clusters are defined, in\n * that case there will be nodes and edges not displayed.\n * The bottom line is that all code with actions related to visibility, *must* use\n * 'nodeIndices' and 'edgeIndices', not 'nodes' and 'edges' directly.\n */\n this.body = {\n container: container,\n\n // See comment above for following fields\n nodes: {},\n nodeIndices: [],\n edges: {},\n edgeIndices: [],\n\n emitter: {\n on: this.on.bind(this),\n off: this.off.bind(this),\n emit: this.emit.bind(this),\n once: this.once.bind(this)\n },\n eventListeners: {\n onTap: function() {},\n onTouch: function() {},\n onDoubleTap: function() {},\n onHold: function() {},\n onDragStart: function() {},\n onDrag: function() {},\n onDragEnd: function() {},\n onMouseWheel: function() {},\n onPinch: function() {},\n onMouseMove: function() {},\n onRelease: function() {},\n onContext: function() {}\n },\n data: {\n nodes: null, // A DataSet or DataView\n edges: null // A DataSet or DataView\n },\n functions: {\n createNode: function() {},\n createEdge: function() {},\n getPointer: function() {}\n },\n modules: {},\n view: {\n scale: 1,\n translation: {x: 0, y: 0}\n }\n };\n\n\n\n // bind the event listeners\n this.bindEventListeners();\n\n // setting up all modules\n this.images = new Images(() => this.body.emitter.emit(\"_requestRedraw\")); // object with images\n this.groups = new Groups(); // object with groups\n this.canvas = new Canvas(this.body); // DOM handler\n this.selectionHandler = new SelectionHandler(this.body, this.canvas); // Selection handler\n this.interactionHandler = new InteractionHandler(this.body, this.canvas, this.selectionHandler); // Interaction handler handles all the hammer bindings (that are bound by canvas), key\n this.view = new View(this.body, this.canvas); // camera handler, does animations and zooms\n this.renderer = new CanvasRenderer(this.body, this.canvas); // renderer, starts renderloop, has events that modules can hook into\n this.physics = new PhysicsEngine(this.body); // physics engine, does all the simulations\n this.layoutEngine = new LayoutEngine(this.body); // layout engine for inital layout and hierarchical layout\n this.clustering = new ClusterEngine(this.body); // clustering api\n this.manipulation = new ManipulationSystem(this.body, this.canvas, this.selectionHandler); // data manipulation system\n\n this.nodesHandler = new NodesHandler(this.body, this.images, this.groups, this.layoutEngine); // Handle adding, deleting and updating of nodes as well as global options\n this.edgesHandler = new EdgesHandler(this.body, this.images, this.groups); // Handle adding, deleting and updating of edges as well as global options\n\n this.body.modules[\"kamadaKawai\"] = new KamadaKawai(this.body,150,0.05); // Layouting algorithm.\n this.body.modules[\"clustering\"] = this.clustering;\n\n // create the DOM elements\n this.canvas._create();\n\n // apply options\n this.setOptions(options);\n\n // load data (the disable start variable will be the same as the enabled clustering)\n this.setData(data);\n\n}\n\n// Extend Network with an Emitter mixin\nEmitter(Network.prototype);\n\n\n/**\n * Set options\n * @param {Object} options\n */\nNetwork.prototype.setOptions = function (options) {\n if (options === null) {\n options = undefined; // This ensures that options handling doesn't crash in the handling\n }\n\n if (options !== undefined) {\n let errorFound = Validator.validate(options, allOptions);\n if (errorFound === true) {\n console.log('%cErrors have been found in the supplied options object.', printStyle);\n }\n\n // copy the global fields over\n let fields = ['locale','locales','clickToUse'];\n util.selectiveDeepExtend(fields,this.options, options);\n\n // the hierarchical system can adapt the edges and the physics to it's own options because not all combinations work with the hierarichical system.\n options = this.layoutEngine.setOptions(options.layout, options);\n\n this.canvas.setOptions(options); // options for canvas are in globals\n\n // pass the options to the modules\n this.groups.setOptions(options.groups);\n this.nodesHandler.setOptions(options.nodes);\n this.edgesHandler.setOptions(options.edges);\n this.physics.setOptions(options.physics);\n this.manipulation.setOptions(options.manipulation, options, this.options); // manipulation uses the locales in the globals\n\n this.interactionHandler.setOptions(options.interaction);\n this.renderer.setOptions(options.interaction); // options for rendering are in interaction\n this.selectionHandler.setOptions(options.interaction); // options for selection are in interaction\n\n // reload the settings of the nodes to apply changes in groups that are not referenced by pointer.\n if (options.groups !== undefined) {\n this.body.emitter.emit(\"refreshNodes\");\n }\n // these two do not have options at the moment, here for completeness\n //this.view.setOptions(options.view);\n //this.clustering.setOptions(options.clustering);\n\n if ('configure' in options) {\n if (!this.configurator) {\n this.configurator = new Configurator(this, this.body.container, configureOptions, this.canvas.pixelRatio);\n }\n\n this.configurator.setOptions(options.configure);\n }\n\n // if the configuration system is enabled, copy all options and put them into the config system\n if (this.configurator && this.configurator.options.enabled === true) {\n let networkOptions = {nodes:{},edges:{},layout:{},interaction:{},manipulation:{},physics:{},global:{}};\n util.deepExtend(networkOptions.nodes, this.nodesHandler.options);\n util.deepExtend(networkOptions.edges, this.edgesHandler.options);\n util.deepExtend(networkOptions.layout, this.layoutEngine.options);\n // load the selectionHandler and render default options in to the interaction group\n util.deepExtend(networkOptions.interaction, this.selectionHandler.options);\n util.deepExtend(networkOptions.interaction, this.renderer.options);\n\n util.deepExtend(networkOptions.interaction, this.interactionHandler.options);\n util.deepExtend(networkOptions.manipulation, this.manipulation.options);\n util.deepExtend(networkOptions.physics, this.physics.options);\n\n // load globals into the global object\n util.deepExtend(networkOptions.global, this.canvas.options);\n util.deepExtend(networkOptions.global, this.options);\n\n this.configurator.setModuleOptions(networkOptions);\n }\n\n // handle network global options\n if (options.clickToUse !== undefined) {\n if (options.clickToUse === true) {\n if (this.activator === undefined) {\n this.activator = new Activator(this.canvas.frame);\n this.activator.on('change', () => {this.body.emitter.emit(\"activate\")});\n }\n }\n else {\n if (this.activator !== undefined) {\n this.activator.destroy();\n delete this.activator;\n }\n this.body.emitter.emit(\"activate\");\n }\n }\n else {\n this.body.emitter.emit(\"activate\");\n }\n\n this.canvas.setSize();\n // start the physics simulation. Can be safely called multiple times.\n this.body.emitter.emit(\"startSimulation\");\n }\n};\n\n\n/**\n * Update the visible nodes and edges list with the most recent node state.\n *\n * Visible nodes are stored in this.body.nodeIndices.\n * Visible edges are stored in this.body.edgeIndices.\n * A node or edges is visible if it is not hidden or clustered.\n *\n * @private\n */\nNetwork.prototype._updateVisibleIndices = function () {\n let nodes = this.body.nodes;\n let edges = this.body.edges;\n this.body.nodeIndices = [];\n this.body.edgeIndices = [];\n\n for (let nodeId in nodes) {\n if (nodes.hasOwnProperty(nodeId)) {\n if (!this.clustering._isClusteredNode(nodeId) && nodes[nodeId].options.hidden === false) {\n this.body.nodeIndices.push(nodes[nodeId].id);\n }\n }\n }\n\n for (let edgeId in edges) {\n if (edges.hasOwnProperty(edgeId)) {\n let edge = edges[edgeId];\n\n // It can happen that this is executed *after* a node edge has been removed,\n // but *before* the edge itself has been removed. Taking this into account.\n let fromNode = nodes[edge.fromId];\n let toNode = nodes[edge.toId];\n let edgeNodesPresent = (fromNode !== undefined) && (toNode !== undefined);\n\n let isVisible =\n !this.clustering._isClusteredEdge(edgeId)\n && edge.options.hidden === false\n && edgeNodesPresent\n && fromNode.options.hidden === false // Also hidden if any of its connecting nodes are hidden\n && toNode.options.hidden === false; // idem\n\n if (isVisible) {\n this.body.edgeIndices.push(edge.id);\n }\n }\n }\n};\n\n\n/**\n * Bind all events\n */\nNetwork.prototype.bindEventListeners = function () {\n // This event will trigger a rebuilding of the cache everything.\n // Used when nodes or edges have been added or removed.\n this.body.emitter.on(\"_dataChanged\", () => {\n this.edgesHandler._updateState();\n this.body.emitter.emit(\"_dataUpdated\");\n });\n\n // this is called when options of EXISTING nodes or edges have changed.\n this.body.emitter.on(\"_dataUpdated\", () => {\n // Order important in following block\n this.clustering._updateState();\n this._updateVisibleIndices();\n\n this._updateValueRange(this.body.nodes);\n this._updateValueRange(this.body.edges);\n // start simulation (can be called safely, even if already running)\n this.body.emitter.emit(\"startSimulation\");\n this.body.emitter.emit(\"_requestRedraw\");\n });\n};\n\n\n/**\n * Set nodes and edges, and optionally options as well.\n *\n * @param {Object} data Object containing parameters:\n * {Array | DataSet | DataView} [nodes] Array with nodes\n * {Array | DataSet | DataView} [edges] Array with edges\n * {String} [dot] String containing data in DOT format\n * {String} [gephi] String containing data in gephi JSON format\n * {Options} [options] Object with options\n */\nNetwork.prototype.setData = function (data) {\n // reset the physics engine.\n this.body.emitter.emit(\"resetPhysics\");\n this.body.emitter.emit(\"_resetData\");\n\n // unselect all to ensure no selections from old data are carried over.\n this.selectionHandler.unselectAll();\n\n if (data && data.dot && (data.nodes || data.edges)) {\n throw new SyntaxError('Data must contain either parameter \"dot\" or ' +\n ' parameter pair \"nodes\" and \"edges\", but not both.');\n }\n\n // set options\n this.setOptions(data && data.options);\n // set all data\n if (data && data.dot) {\n console.log('The dot property has been deprecated. Please use the static convertDot method to convert DOT into vis.network format and use the normal data format with nodes and edges. This converter is used like this: var data = vis.network.convertDot(dotString);');\n // parse DOT file\n var dotData = dotparser.DOTToGraph(data.dot);\n this.setData(dotData);\n return;\n }\n else if (data && data.gephi) {\n // parse DOT file\n console.log('The gephi property has been deprecated. Please use the static convertGephi method to convert gephi into vis.network format and use the normal data format with nodes and edges. This converter is used like this: var data = vis.network.convertGephi(gephiJson);');\n var gephiData = gephiParser.parseGephi(data.gephi);\n this.setData(gephiData);\n return;\n }\n else {\n this.nodesHandler.setData(data && data.nodes, true);\n this.edgesHandler.setData(data && data.edges, true);\n }\n\n // emit change in data\n this.body.emitter.emit(\"_dataChanged\");\n\n // emit data loaded\n this.body.emitter.emit(\"_dataLoaded\");\n\n // find a stable position or start animating to a stable position\n this.body.emitter.emit(\"initPhysics\");\n};\n\n\n/**\n * Cleans up all bindings of the network, removing it fully from the memory IF the variable is set to null after calling this function.\n * var network = new vis.Network(..);\n * network.destroy();\n * network = null;\n */\nNetwork.prototype.destroy = function () {\n this.body.emitter.emit(\"destroy\");\n // clear events\n this.body.emitter.off();\n this.off();\n\n // delete modules\n delete this.groups;\n delete this.canvas;\n delete this.selectionHandler;\n delete this.interactionHandler;\n delete this.view;\n delete this.renderer;\n delete this.physics;\n delete this.layoutEngine;\n delete this.clustering;\n delete this.manipulation;\n delete this.nodesHandler;\n delete this.edgesHandler;\n delete this.configurator;\n delete this.images;\n\n for (var nodeId in this.body.nodes) {\n if (!this.body.nodes.hasOwnProperty(nodeId)) continue;\n delete this.body.nodes[nodeId];\n }\n\n for (var edgeId in this.body.edges) {\n if (!this.body.edges.hasOwnProperty(edgeId)) continue;\n delete this.body.edges[edgeId];\n }\n\n // remove the container and everything inside it recursively\n util.recursiveDOMDelete(this.body.container);\n};\n\n\n/**\n * Update the values of all object in the given array according to the current\n * value range of the objects in the array.\n * @param {Object} obj An object containing a set of Edges or Nodes\n * The objects must have a method getValue() and\n * setValueRange(min, max).\n * @private\n */\nNetwork.prototype._updateValueRange = function (obj) {\n var id;\n\n // determine the range of the objects\n var valueMin = undefined;\n var valueMax = undefined;\n var valueTotal = 0;\n for (id in obj) {\n if (obj.hasOwnProperty(id)) {\n var value = obj[id].getValue();\n if (value !== undefined) {\n valueMin = (valueMin === undefined) ? value : Math.min(value, valueMin);\n valueMax = (valueMax === undefined) ? value : Math.max(value, valueMax);\n valueTotal += value;\n }\n }\n }\n\n // adjust the range of all objects\n if (valueMin !== undefined && valueMax !== undefined) {\n for (id in obj) {\n if (obj.hasOwnProperty(id)) {\n obj[id].setValueRange(valueMin, valueMax, valueTotal);\n }\n }\n }\n};\n\n\n/**\n * Returns true when the Network is active.\n * @returns {boolean}\n */\nNetwork.prototype.isActive = function () {\n return !this.activator || this.activator.active;\n};\n\n\nNetwork.prototype.setSize = function() {return this.canvas.setSize.apply(this.canvas,arguments);};\nNetwork.prototype.canvasToDOM = function() {return this.canvas.canvasToDOM.apply(this.canvas,arguments);};\nNetwork.prototype.DOMtoCanvas = function() {return this.canvas.DOMtoCanvas.apply(this.canvas,arguments);};\n\n\n/**\n * Nodes can be in clusters. Clusters can also be in clusters. This function returns and array of\n * nodeIds showing where the node is.\n *\n * If any nodeId in the chain, especially the first passed in as a parameter, is not present in\n * the current nodes list, an empty array is returned.\n *\n * Example:\n * cluster 'A' contains cluster 'B',\n * cluster 'B' contains cluster 'C',\n * cluster 'C' contains node 'fred'.\n * `jsnetwork.clustering.findNode('fred')` will return `['A','B','C','fred']`.\n *\n * @param {string|number} nodeId\n * @returns {Array}\n */\nNetwork.prototype.findNode = function() {return this.clustering.findNode.apply(this.clustering,arguments);};\n\n\nNetwork.prototype.isCluster = function() {return this.clustering.isCluster.apply(this.clustering,arguments);};\nNetwork.prototype.openCluster = function() {return this.clustering.openCluster.apply(this.clustering,arguments);};\nNetwork.prototype.cluster = function() {return this.clustering.cluster.apply(this.clustering,arguments);};\nNetwork.prototype.getNodesInCluster = function() {return this.clustering.getNodesInCluster.apply(this.clustering,arguments);};\nNetwork.prototype.clusterByConnection = function() {return this.clustering.clusterByConnection.apply(this.clustering,arguments);};\nNetwork.prototype.clusterByHubsize = function() {return this.clustering.clusterByHubsize.apply(this.clustering,arguments);};\n\n/**\n * This method will cluster all nodes with 1 edge with their respective connected node.\n * The options object is explained in full below.\n *\n * @param {object} [options]\n * @returns {undefined}\n */\nNetwork.prototype.clusterOutliers = function() {return this.clustering.clusterOutliers.apply(this.clustering,arguments);};\n\nNetwork.prototype.getSeed = function() {return this.layoutEngine.getSeed.apply(this.layoutEngine,arguments);};\nNetwork.prototype.enableEditMode = function() {return this.manipulation.enableEditMode.apply(this.manipulation,arguments);};\nNetwork.prototype.disableEditMode = function() {return this.manipulation.disableEditMode.apply(this.manipulation,arguments);};\nNetwork.prototype.addNodeMode = function() {return this.manipulation.addNodeMode.apply(this.manipulation,arguments);};\nNetwork.prototype.editNode = function() {return this.manipulation.editNode.apply(this.manipulation,arguments);};\nNetwork.prototype.editNodeMode = function() {console.log(\"Deprecated: Please use editNode instead of editNodeMode.\"); return this.manipulation.editNode.apply(this.manipulation,arguments);};\nNetwork.prototype.addEdgeMode = function() {return this.manipulation.addEdgeMode.apply(this.manipulation,arguments);};\nNetwork.prototype.editEdgeMode = function() {return this.manipulation.editEdgeMode.apply(this.manipulation,arguments);};\nNetwork.prototype.deleteSelected = function() {return this.manipulation.deleteSelected.apply(this.manipulation,arguments);};\nNetwork.prototype.getPositions = function() {return this.nodesHandler.getPositions.apply(this.nodesHandler,arguments);};\nNetwork.prototype.storePositions = function() {return this.nodesHandler.storePositions.apply(this.nodesHandler,arguments);};\nNetwork.prototype.moveNode = function() {return this.nodesHandler.moveNode.apply(this.nodesHandler,arguments);};\nNetwork.prototype.getBoundingBox = function() {return this.nodesHandler.getBoundingBox.apply(this.nodesHandler,arguments);};\nNetwork.prototype.getConnectedNodes = function(objectId) {\n if (this.body.nodes[objectId] !== undefined) {\n return this.nodesHandler.getConnectedNodes.apply(this.nodesHandler,arguments);\n }\n else {\n return this.edgesHandler.getConnectedNodes.apply(this.edgesHandler,arguments);\n }\n};\nNetwork.prototype.getConnectedEdges = function() {return this.nodesHandler.getConnectedEdges.apply(this.nodesHandler,arguments);};\nNetwork.prototype.startSimulation = function() {return this.physics.startSimulation.apply(this.physics,arguments);};\nNetwork.prototype.stopSimulation = function() {return this.physics.stopSimulation.apply(this.physics,arguments);};\nNetwork.prototype.stabilize = function() {return this.physics.stabilize.apply(this.physics,arguments);};\nNetwork.prototype.getSelection = function() {return this.selectionHandler.getSelection.apply(this.selectionHandler,arguments);};\nNetwork.prototype.setSelection = function() {return this.selectionHandler.setSelection.apply(this.selectionHandler,arguments);};\nNetwork.prototype.getSelectedNodes = function() {return this.selectionHandler.getSelectedNodes.apply(this.selectionHandler,arguments);};\nNetwork.prototype.getSelectedEdges = function() {return this.selectionHandler.getSelectedEdges.apply(this.selectionHandler,arguments);};\nNetwork.prototype.getNodeAt = function() {\n var node = this.selectionHandler.getNodeAt.apply(this.selectionHandler,arguments);\n if (node !== undefined && node.id !== undefined) {\n return node.id;\n }\n return node;\n};\nNetwork.prototype.getEdgeAt = function() {\n var edge = this.selectionHandler.getEdgeAt.apply(this.selectionHandler,arguments);\n if (edge !== undefined && edge.id !== undefined) {\n return edge.id;\n }\n return edge;\n };\nNetwork.prototype.selectNodes = function() {return this.selectionHandler.selectNodes.apply(this.selectionHandler,arguments);};\nNetwork.prototype.selectEdges = function() {return this.selectionHandler.selectEdges.apply(this.selectionHandler,arguments);};\nNetwork.prototype.unselectAll = function() {\n this.selectionHandler.unselectAll.apply(this.selectionHandler,arguments);\n this.redraw();\n};\nNetwork.prototype.redraw = function() {return this.renderer.redraw.apply(this.renderer,arguments);};\nNetwork.prototype.getScale = function() {return this.view.getScale.apply(this.view,arguments);};\nNetwork.prototype.getViewPosition = function() {return this.view.getViewPosition.apply(this.view,arguments);};\nNetwork.prototype.fit = function() {return this.view.fit.apply(this.view,arguments);};\nNetwork.prototype.moveTo = function() {return this.view.moveTo.apply(this.view,arguments);};\nNetwork.prototype.focus = function() {return this.view.focus.apply(this.view,arguments);};\nNetwork.prototype.releaseNode = function() {return this.view.releaseNode.apply(this.view,arguments);};\nNetwork.prototype.getOptionsFromConfigurator = function() {\n let options = {};\n if (this.configurator) {\n options = this.configurator.getOptions.apply(this.configurator);\n }\n return options;\n};\n\n\n\nexport default Network;\n","\r\n/**\r\n * Expose `Emitter`.\r\n */\r\n\r\nif (typeof module !== 'undefined') {\r\n module.exports = Emitter;\r\n}\r\n\r\n/**\r\n * Initialize a new `Emitter`.\r\n *\r\n * @api public\r\n */\r\n\r\nfunction Emitter(obj) {\r\n if (obj) return mixin(obj);\r\n};\r\n\r\n/**\r\n * Mixin the emitter properties.\r\n *\r\n * @param {Object} obj\r\n * @return {Object}\r\n * @api private\r\n */\r\n\r\nfunction mixin(obj) {\r\n for (var key in Emitter.prototype) {\r\n obj[key] = Emitter.prototype[key];\r\n }\r\n return obj;\r\n}\r\n\r\n/**\r\n * Listen on the given `event` with `fn`.\r\n *\r\n * @param {String} event\r\n * @param {Function} fn\r\n * @return {Emitter}\r\n * @api public\r\n */\r\n\r\nEmitter.prototype.on =\r\nEmitter.prototype.addEventListener = function(event, fn){\r\n this._callbacks = this._callbacks || {};\r\n (this._callbacks['$' + event] = this._callbacks['$' + event] || [])\r\n .push(fn);\r\n return this;\r\n};\r\n\r\n/**\r\n * Adds an `event` listener that will be invoked a single\r\n * time then automatically removed.\r\n *\r\n * @param {String} event\r\n * @param {Function} fn\r\n * @return {Emitter}\r\n * @api public\r\n */\r\n\r\nEmitter.prototype.once = function(event, fn){\r\n function on() {\r\n this.off(event, on);\r\n fn.apply(this, arguments);\r\n }\r\n\r\n on.fn = fn;\r\n this.on(event, on);\r\n return this;\r\n};\r\n\r\n/**\r\n * Remove the given callback for `event` or all\r\n * registered callbacks.\r\n *\r\n * @param {String} event\r\n * @param {Function} fn\r\n * @return {Emitter}\r\n * @api public\r\n */\r\n\r\nEmitter.prototype.off =\r\nEmitter.prototype.removeListener =\r\nEmitter.prototype.removeAllListeners =\r\nEmitter.prototype.removeEventListener = function(event, fn){\r\n this._callbacks = this._callbacks || {};\r\n\r\n // all\r\n if (0 == arguments.length) {\r\n this._callbacks = {};\r\n return this;\r\n }\r\n\r\n // specific event\r\n var callbacks = this._callbacks['$' + event];\r\n if (!callbacks) return this;\r\n\r\n // remove all handlers\r\n if (1 == arguments.length) {\r\n delete this._callbacks['$' + event];\r\n return this;\r\n }\r\n\r\n // remove specific handler\r\n var cb;\r\n for (var i = 0; i < callbacks.length; i++) {\r\n cb = callbacks[i];\r\n if (cb === fn || cb.fn === fn) {\r\n callbacks.splice(i, 1);\r\n break;\r\n }\r\n }\r\n\r\n // Remove event specific arrays for event types that no\r\n // one is subscribed for to avoid memory leak.\r\n if (callbacks.length === 0) {\r\n delete this._callbacks['$' + event];\r\n }\r\n\r\n return this;\r\n};\r\n\r\n/**\r\n * Emit `event` with the given args.\r\n *\r\n * @param {String} event\r\n * @param {Mixed} ...\r\n * @return {Emitter}\r\n */\r\n\r\nEmitter.prototype.emit = function(event){\r\n this._callbacks = this._callbacks || {};\r\n\r\n var args = new Array(arguments.length - 1)\r\n , callbacks = this._callbacks['$' + event];\r\n\r\n for (var i = 1; i < arguments.length; i++) {\r\n args[i - 1] = arguments[i];\r\n }\r\n\r\n if (callbacks) {\r\n callbacks = callbacks.slice(0);\r\n for (var i = 0, len = callbacks.length; i < len; ++i) {\r\n callbacks[i].apply(this, args);\r\n }\r\n }\r\n\r\n return this;\r\n};\r\n\r\n/**\r\n * Return array of callbacks for `event`.\r\n *\r\n * @param {String} event\r\n * @return {Array}\r\n * @api public\r\n */\r\n\r\nEmitter.prototype.listeners = function(event){\r\n this._callbacks = this._callbacks || {};\r\n return this._callbacks['$' + event] || [];\r\n};\r\n\r\n/**\r\n * Check if this emitter has `event` handlers.\r\n *\r\n * @param {String} event\r\n * @return {Boolean}\r\n * @api public\r\n */\r\n\r\nEmitter.prototype.hasListeners = function(event){\r\n return !! this.listeners(event).length;\r\n};\r\n","\"use strict\";\r\n/**\r\n * Created by Alex on 11/6/2014.\r\n */\r\n\r\n// https://github.com/umdjs/umd/blob/master/returnExports.js#L40-L60\r\n// if the module has no dependencies, the above pattern can be simplified to\r\n(function (root, factory) {\r\n if (typeof define === 'function' && define.amd) {\r\n // AMD. Register as an anonymous module.\r\n define([], factory);\r\n } else if (typeof exports === 'object') {\r\n // Node. Does not work with strict CommonJS, but\r\n // only CommonJS-like environments that support module.exports,\r\n // like Node.\r\n module.exports = factory();\r\n } else {\r\n // Browser globals (root is window)\r\n root.keycharm = factory();\r\n }\r\n}(this, function () {\r\n\r\n function keycharm(options) {\r\n var preventDefault = options && options.preventDefault || false;\r\n\r\n var container = options && options.container || window;\r\n\r\n var _exportFunctions = {};\r\n var _bound = {keydown:{}, keyup:{}};\r\n var _keys = {};\r\n var i;\r\n\r\n // a - z\r\n for (i = 97; i <= 122; i++) {_keys[String.fromCharCode(i)] = {code:65 + (i - 97), shift: false};}\r\n // A - Z\r\n for (i = 65; i <= 90; i++) {_keys[String.fromCharCode(i)] = {code:i, shift: true};}\r\n // 0 - 9\r\n for (i = 0; i <= 9; i++) {_keys['' + i] = {code:48 + i, shift: false};}\r\n // F1 - F12\r\n for (i = 1; i <= 12; i++) {_keys['F' + i] = {code:111 + i, shift: false};}\r\n // num0 - num9\r\n for (i = 0; i <= 9; i++) {_keys['num' + i] = {code:96 + i, shift: false};}\r\n\r\n // numpad misc\r\n _keys['num*'] = {code:106, shift: false};\r\n _keys['num+'] = {code:107, shift: false};\r\n _keys['num-'] = {code:109, shift: false};\r\n _keys['num/'] = {code:111, shift: false};\r\n _keys['num.'] = {code:110, shift: false};\r\n // arrows\r\n _keys['left'] = {code:37, shift: false};\r\n _keys['up'] = {code:38, shift: false};\r\n _keys['right'] = {code:39, shift: false};\r\n _keys['down'] = {code:40, shift: false};\r\n // extra keys\r\n _keys['space'] = {code:32, shift: false};\r\n _keys['enter'] = {code:13, shift: false};\r\n _keys['shift'] = {code:16, shift: undefined};\r\n _keys['esc'] = {code:27, shift: false};\r\n _keys['backspace'] = {code:8, shift: false};\r\n _keys['tab'] = {code:9, shift: false};\r\n _keys['ctrl'] = {code:17, shift: false};\r\n _keys['alt'] = {code:18, shift: false};\r\n _keys['delete'] = {code:46, shift: false};\r\n _keys['pageup'] = {code:33, shift: false};\r\n _keys['pagedown'] = {code:34, shift: false};\r\n // symbols\r\n _keys['='] = {code:187, shift: false};\r\n _keys['-'] = {code:189, shift: false};\r\n _keys[']'] = {code:221, shift: false};\r\n _keys['['] = {code:219, shift: false};\r\n\r\n\r\n\r\n var down = function(event) {handleEvent(event,'keydown');};\r\n var up = function(event) {handleEvent(event,'keyup');};\r\n\r\n // handle the actualy bound key with the event\r\n var handleEvent = function(event,type) {\r\n if (_bound[type][event.keyCode] !== undefined) {\r\n var bound = _bound[type][event.keyCode];\r\n for (var i = 0; i < bound.length; i++) {\r\n if (bound[i].shift === undefined) {\r\n bound[i].fn(event);\r\n }\r\n else if (bound[i].shift == true && event.shiftKey == true) {\r\n bound[i].fn(event);\r\n }\r\n else if (bound[i].shift == false && event.shiftKey == false) {\r\n bound[i].fn(event);\r\n }\r\n }\r\n\r\n if (preventDefault == true) {\r\n event.preventDefault();\r\n }\r\n }\r\n };\r\n\r\n // bind a key to a callback\r\n _exportFunctions.bind = function(key, callback, type) {\r\n if (type === undefined) {\r\n type = 'keydown';\r\n }\r\n if (_keys[key] === undefined) {\r\n throw new Error(\"unsupported key: \" + key);\r\n }\r\n if (_bound[type][_keys[key].code] === undefined) {\r\n _bound[type][_keys[key].code] = [];\r\n }\r\n _bound[type][_keys[key].code].push({fn:callback, shift:_keys[key].shift});\r\n };\r\n\r\n\r\n // bind all keys to a call back (demo purposes)\r\n _exportFunctions.bindAll = function(callback, type) {\r\n if (type === undefined) {\r\n type = 'keydown';\r\n }\r\n for (var key in _keys) {\r\n if (_keys.hasOwnProperty(key)) {\r\n _exportFunctions.bind(key,callback,type);\r\n }\r\n }\r\n };\r\n\r\n // get the key label from an event\r\n _exportFunctions.getKey = function(event) {\r\n for (var key in _keys) {\r\n if (_keys.hasOwnProperty(key)) {\r\n if (event.shiftKey == true && _keys[key].shift == true && event.keyCode == _keys[key].code) {\r\n return key;\r\n }\r\n else if (event.shiftKey == false && _keys[key].shift == false && event.keyCode == _keys[key].code) {\r\n return key;\r\n }\r\n else if (event.keyCode == _keys[key].code && key == 'shift') {\r\n return key;\r\n }\r\n }\r\n }\r\n return \"unknown key, currently not supported\";\r\n };\r\n\r\n // unbind either a specific callback from a key or all of them (by leaving callback undefined)\r\n _exportFunctions.unbind = function(key, callback, type) {\r\n if (type === undefined) {\r\n type = 'keydown';\r\n }\r\n if (_keys[key] === undefined) {\r\n throw new Error(\"unsupported key: \" + key);\r\n }\r\n if (callback !== undefined) {\r\n var newBindings = [];\r\n var bound = _bound[type][_keys[key].code];\r\n if (bound !== undefined) {\r\n for (var i = 0; i < bound.length; i++) {\r\n if (!(bound[i].fn == callback && bound[i].shift == _keys[key].shift)) {\r\n newBindings.push(_bound[type][_keys[key].code][i]);\r\n }\r\n }\r\n }\r\n _bound[type][_keys[key].code] = newBindings;\r\n }\r\n else {\r\n _bound[type][_keys[key].code] = [];\r\n }\r\n };\r\n\r\n // reset all bound variables.\r\n _exportFunctions.reset = function() {\r\n _bound = {keydown:{}, keyup:{}};\r\n };\r\n\r\n // unbind all listeners and reset all variables.\r\n _exportFunctions.destroy = function() {\r\n _bound = {keydown:{}, keyup:{}};\r\n container.removeEventListener('keydown', down, true);\r\n container.removeEventListener('keyup', up, true);\r\n };\r\n\r\n // create listeners.\r\n container.addEventListener('keydown',down,true);\r\n container.addEventListener('keyup',up,true);\r\n\r\n // return the public functions.\r\n return _exportFunctions;\r\n }\r\n\r\n return keycharm;\r\n}));\r\n\r\n\r\n","/*! Hammer.JS - v2.0.15 - 2019-04-04\n * http://naver.github.io/egjs\n *\n * Forked By Naver egjs\n * Copyright (c) hammerjs\n * Licensed under the MIT license */\nfunction _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}\n\nfunction _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n subClass.__proto__ = superClass;\n}\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\n/**\n * @private\n * extend object.\n * means that properties in dest will be overwritten by the ones in src.\n * @param {Object} target\n * @param {...Object} objects_to_assign\n * @returns {Object} target\n */\nvar assign;\n\nif (typeof Object.assign !== 'function') {\n assign = function assign(target) {\n if (target === undefined || target === null) {\n throw new TypeError('Cannot convert undefined or null to object');\n }\n\n var output = Object(target);\n\n for (var index = 1; index < arguments.length; index++) {\n var source = arguments[index];\n\n if (source !== undefined && source !== null) {\n for (var nextKey in source) {\n if (source.hasOwnProperty(nextKey)) {\n output[nextKey] = source[nextKey];\n }\n }\n }\n }\n\n return output;\n };\n} else {\n assign = Object.assign;\n}\n\nvar assign$1 = assign;\n\nvar VENDOR_PREFIXES = ['', 'webkit', 'Moz', 'MS', 'ms', 'o'];\nvar TEST_ELEMENT = typeof document === \"undefined\" ? {\n style: {}\n} : document.createElement('div');\nvar TYPE_FUNCTION = 'function';\nvar round = Math.round,\n abs = Math.abs;\nvar now = Date.now;\n\n/**\n * @private\n * get the prefixed property\n * @param {Object} obj\n * @param {String} property\n * @returns {String|Undefined} prefixed\n */\n\nfunction prefixed(obj, property) {\n var prefix;\n var prop;\n var camelProp = property[0].toUpperCase() + property.slice(1);\n var i = 0;\n\n while (i < VENDOR_PREFIXES.length) {\n prefix = VENDOR_PREFIXES[i];\n prop = prefix ? prefix + camelProp : property;\n\n if (prop in obj) {\n return prop;\n }\n\n i++;\n }\n\n return undefined;\n}\n\n/* eslint-disable no-new-func, no-nested-ternary */\nvar win;\n\nif (typeof window === \"undefined\") {\n // window is undefined in node.js\n win = {};\n} else {\n win = window;\n}\n\nvar PREFIXED_TOUCH_ACTION = prefixed(TEST_ELEMENT.style, 'touchAction');\nvar NATIVE_TOUCH_ACTION = PREFIXED_TOUCH_ACTION !== undefined;\nfunction getTouchActionProps() {\n if (!NATIVE_TOUCH_ACTION) {\n return false;\n }\n\n var touchMap = {};\n var cssSupports = win.CSS && win.CSS.supports;\n ['auto', 'manipulation', 'pan-y', 'pan-x', 'pan-x pan-y', 'none'].forEach(function (val) {\n // If css.supports is not supported but there is native touch-action assume it supports\n // all values. This is the case for IE 10 and 11.\n return touchMap[val] = cssSupports ? win.CSS.supports('touch-action', val) : true;\n });\n return touchMap;\n}\n\nvar TOUCH_ACTION_COMPUTE = 'compute';\nvar TOUCH_ACTION_AUTO = 'auto';\nvar TOUCH_ACTION_MANIPULATION = 'manipulation'; // not implemented\n\nvar TOUCH_ACTION_NONE = 'none';\nvar TOUCH_ACTION_PAN_X = 'pan-x';\nvar TOUCH_ACTION_PAN_Y = 'pan-y';\nvar TOUCH_ACTION_MAP = getTouchActionProps();\n\nvar MOBILE_REGEX = /mobile|tablet|ip(ad|hone|od)|android/i;\nvar SUPPORT_TOUCH = 'ontouchstart' in win;\nvar SUPPORT_POINTER_EVENTS = prefixed(win, 'PointerEvent') !== undefined;\nvar SUPPORT_ONLY_TOUCH = SUPPORT_TOUCH && MOBILE_REGEX.test(navigator.userAgent);\nvar INPUT_TYPE_TOUCH = 'touch';\nvar INPUT_TYPE_PEN = 'pen';\nvar INPUT_TYPE_MOUSE = 'mouse';\nvar INPUT_TYPE_KINECT = 'kinect';\nvar COMPUTE_INTERVAL = 25;\nvar INPUT_START = 1;\nvar INPUT_MOVE = 2;\nvar INPUT_END = 4;\nvar INPUT_CANCEL = 8;\nvar DIRECTION_NONE = 1;\nvar DIRECTION_LEFT = 2;\nvar DIRECTION_RIGHT = 4;\nvar DIRECTION_UP = 8;\nvar DIRECTION_DOWN = 16;\nvar DIRECTION_HORIZONTAL = DIRECTION_LEFT | DIRECTION_RIGHT;\nvar DIRECTION_VERTICAL = DIRECTION_UP | DIRECTION_DOWN;\nvar DIRECTION_ALL = DIRECTION_HORIZONTAL | DIRECTION_VERTICAL;\nvar PROPS_XY = ['x', 'y'];\nvar PROPS_CLIENT_XY = ['clientX', 'clientY'];\n\n/**\n * @private\n * walk objects and arrays\n * @param {Object} obj\n * @param {Function} iterator\n * @param {Object} context\n */\nfunction each(obj, iterator, context) {\n var i;\n\n if (!obj) {\n return;\n }\n\n if (obj.forEach) {\n obj.forEach(iterator, context);\n } else if (obj.length !== undefined) {\n i = 0;\n\n while (i < obj.length) {\n iterator.call(context, obj[i], i, obj);\n i++;\n }\n } else {\n for (i in obj) {\n obj.hasOwnProperty(i) && iterator.call(context, obj[i], i, obj);\n }\n }\n}\n\n/**\n * @private\n * let a boolean value also be a function that must return a boolean\n * this first item in args will be used as the context\n * @param {Boolean|Function} val\n * @param {Array} [args]\n * @returns {Boolean}\n */\n\nfunction boolOrFn(val, args) {\n if (typeof val === TYPE_FUNCTION) {\n return val.apply(args ? args[0] || undefined : undefined, args);\n }\n\n return val;\n}\n\n/**\n * @private\n * small indexOf wrapper\n * @param {String} str\n * @param {String} find\n * @returns {Boolean} found\n */\nfunction inStr(str, find) {\n return str.indexOf(find) > -1;\n}\n\n/**\n * @private\n * when the touchActions are collected they are not a valid value, so we need to clean things up. *\n * @param {String} actions\n * @returns {*}\n */\n\nfunction cleanTouchActions(actions) {\n // none\n if (inStr(actions, TOUCH_ACTION_NONE)) {\n return TOUCH_ACTION_NONE;\n }\n\n var hasPanX = inStr(actions, TOUCH_ACTION_PAN_X);\n var hasPanY = inStr(actions, TOUCH_ACTION_PAN_Y); // if both pan-x and pan-y are set (different recognizers\n // for different directions, e.g. horizontal pan but vertical swipe?)\n // we need none (as otherwise with pan-x pan-y combined none of these\n // recognizers will work, since the browser would handle all panning\n\n if (hasPanX && hasPanY) {\n return TOUCH_ACTION_NONE;\n } // pan-x OR pan-y\n\n\n if (hasPanX || hasPanY) {\n return hasPanX ? TOUCH_ACTION_PAN_X : TOUCH_ACTION_PAN_Y;\n } // manipulation\n\n\n if (inStr(actions, TOUCH_ACTION_MANIPULATION)) {\n return TOUCH_ACTION_MANIPULATION;\n }\n\n return TOUCH_ACTION_AUTO;\n}\n\n/**\n * @private\n * Touch Action\n * sets the touchAction property or uses the js alternative\n * @param {Manager} manager\n * @param {String} value\n * @constructor\n */\n\nvar TouchAction =\n/*#__PURE__*/\nfunction () {\n function TouchAction(manager, value) {\n this.manager = manager;\n this.set(value);\n }\n /**\n * @private\n * set the touchAction value on the element or enable the polyfill\n * @param {String} value\n */\n\n\n var _proto = TouchAction.prototype;\n\n _proto.set = function set(value) {\n // find out the touch-action by the event handlers\n if (value === TOUCH_ACTION_COMPUTE) {\n value = this.compute();\n }\n\n if (NATIVE_TOUCH_ACTION && this.manager.element.style && TOUCH_ACTION_MAP[value]) {\n this.manager.element.style[PREFIXED_TOUCH_ACTION] = value;\n }\n\n this.actions = value.toLowerCase().trim();\n };\n /**\n * @private\n * just re-set the touchAction value\n */\n\n\n _proto.update = function update() {\n this.set(this.manager.options.touchAction);\n };\n /**\n * @private\n * compute the value for the touchAction property based on the recognizer's settings\n * @returns {String} value\n */\n\n\n _proto.compute = function compute() {\n var actions = [];\n each(this.manager.recognizers, function (recognizer) {\n if (boolOrFn(recognizer.options.enable, [recognizer])) {\n actions = actions.concat(recognizer.getTouchAction());\n }\n });\n return cleanTouchActions(actions.join(' '));\n };\n /**\n * @private\n * this method is called on each input cycle and provides the preventing of the browser behavior\n * @param {Object} input\n */\n\n\n _proto.preventDefaults = function preventDefaults(input) {\n var srcEvent = input.srcEvent;\n var direction = input.offsetDirection; // if the touch action did prevented once this session\n\n if (this.manager.session.prevented) {\n srcEvent.preventDefault();\n return;\n }\n\n var actions = this.actions;\n var hasNone = inStr(actions, TOUCH_ACTION_NONE) && !TOUCH_ACTION_MAP[TOUCH_ACTION_NONE];\n var hasPanY = inStr(actions, TOUCH_ACTION_PAN_Y) && !TOUCH_ACTION_MAP[TOUCH_ACTION_PAN_Y];\n var hasPanX = inStr(actions, TOUCH_ACTION_PAN_X) && !TOUCH_ACTION_MAP[TOUCH_ACTION_PAN_X];\n\n if (hasNone) {\n // do not prevent defaults if this is a tap gesture\n var isTapPointer = input.pointers.length === 1;\n var isTapMovement = input.distance < 2;\n var isTapTouchTime = input.deltaTime < 250;\n\n if (isTapPointer && isTapMovement && isTapTouchTime) {\n return;\n }\n }\n\n if (hasPanX && hasPanY) {\n // `pan-x pan-y` means browser handles all scrolling/panning, do not prevent\n return;\n }\n\n if (hasNone || hasPanY && direction & DIRECTION_HORIZONTAL || hasPanX && direction & DIRECTION_VERTICAL) {\n return this.preventSrc(srcEvent);\n }\n };\n /**\n * @private\n * call preventDefault to prevent the browser's default behavior (scrolling in most cases)\n * @param {Object} srcEvent\n */\n\n\n _proto.preventSrc = function preventSrc(srcEvent) {\n this.manager.session.prevented = true;\n srcEvent.preventDefault();\n };\n\n return TouchAction;\n}();\n\n/**\n * @private\n * find if a node is in the given parent\n * @method hasParent\n * @param {HTMLElement} node\n * @param {HTMLElement} parent\n * @return {Boolean} found\n */\nfunction hasParent(node, parent) {\n while (node) {\n if (node === parent) {\n return true;\n }\n\n node = node.parentNode;\n }\n\n return false;\n}\n\n/**\n * @private\n * get the center of all the pointers\n * @param {Array} pointers\n * @return {Object} center contains `x` and `y` properties\n */\n\nfunction getCenter(pointers) {\n var pointersLength = pointers.length; // no need to loop when only one touch\n\n if (pointersLength === 1) {\n return {\n x: round(pointers[0].clientX),\n y: round(pointers[0].clientY)\n };\n }\n\n var x = 0;\n var y = 0;\n var i = 0;\n\n while (i < pointersLength) {\n x += pointers[i].clientX;\n y += pointers[i].clientY;\n i++;\n }\n\n return {\n x: round(x / pointersLength),\n y: round(y / pointersLength)\n };\n}\n\n/**\n * @private\n * create a simple clone from the input used for storage of firstInput and firstMultiple\n * @param {Object} input\n * @returns {Object} clonedInputData\n */\n\nfunction simpleCloneInputData(input) {\n // make a simple copy of the pointers because we will get a reference if we don't\n // we only need clientXY for the calculations\n var pointers = [];\n var i = 0;\n\n while (i < input.pointers.length) {\n pointers[i] = {\n clientX: round(input.pointers[i].clientX),\n clientY: round(input.pointers[i].clientY)\n };\n i++;\n }\n\n return {\n timeStamp: now(),\n pointers: pointers,\n center: getCenter(pointers),\n deltaX: input.deltaX,\n deltaY: input.deltaY\n };\n}\n\n/**\n * @private\n * calculate the absolute distance between two points\n * @param {Object} p1 {x, y}\n * @param {Object} p2 {x, y}\n * @param {Array} [props] containing x and y keys\n * @return {Number} distance\n */\n\nfunction getDistance(p1, p2, props) {\n if (!props) {\n props = PROPS_XY;\n }\n\n var x = p2[props[0]] - p1[props[0]];\n var y = p2[props[1]] - p1[props[1]];\n return Math.sqrt(x * x + y * y);\n}\n\n/**\n * @private\n * calculate the angle between two coordinates\n * @param {Object} p1\n * @param {Object} p2\n * @param {Array} [props] containing x and y keys\n * @return {Number} angle\n */\n\nfunction getAngle(p1, p2, props) {\n if (!props) {\n props = PROPS_XY;\n }\n\n var x = p2[props[0]] - p1[props[0]];\n var y = p2[props[1]] - p1[props[1]];\n return Math.atan2(y, x) * 180 / Math.PI;\n}\n\n/**\n * @private\n * get the direction between two points\n * @param {Number} x\n * @param {Number} y\n * @return {Number} direction\n */\n\nfunction getDirection(x, y) {\n if (x === y) {\n return DIRECTION_NONE;\n }\n\n if (abs(x) >= abs(y)) {\n return x < 0 ? DIRECTION_LEFT : DIRECTION_RIGHT;\n }\n\n return y < 0 ? DIRECTION_UP : DIRECTION_DOWN;\n}\n\nfunction computeDeltaXY(session, input) {\n var center = input.center; // let { offsetDelta:offset = {}, prevDelta = {}, prevInput = {} } = session;\n // jscs throwing error on defalut destructured values and without defaults tests fail\n\n var offset = session.offsetDelta || {};\n var prevDelta = session.prevDelta || {};\n var prevInput = session.prevInput || {};\n\n if (input.eventType === INPUT_START || prevInput.eventType === INPUT_END) {\n prevDelta = session.prevDelta = {\n x: prevInput.deltaX || 0,\n y: prevInput.deltaY || 0\n };\n offset = session.offsetDelta = {\n x: center.x,\n y: center.y\n };\n }\n\n input.deltaX = prevDelta.x + (center.x - offset.x);\n input.deltaY = prevDelta.y + (center.y - offset.y);\n}\n\n/**\n * @private\n * calculate the velocity between two points. unit is in px per ms.\n * @param {Number} deltaTime\n * @param {Number} x\n * @param {Number} y\n * @return {Object} velocity `x` and `y`\n */\nfunction getVelocity(deltaTime, x, y) {\n return {\n x: x / deltaTime || 0,\n y: y / deltaTime || 0\n };\n}\n\n/**\n * @private\n * calculate the scale factor between two pointersets\n * no scale is 1, and goes down to 0 when pinched together, and bigger when pinched out\n * @param {Array} start array of pointers\n * @param {Array} end array of pointers\n * @return {Number} scale\n */\n\nfunction getScale(start, end) {\n return getDistance(end[0], end[1], PROPS_CLIENT_XY) / getDistance(start[0], start[1], PROPS_CLIENT_XY);\n}\n\n/**\n * @private\n * calculate the rotation degrees between two pointersets\n * @param {Array} start array of pointers\n * @param {Array} end array of pointers\n * @return {Number} rotation\n */\n\nfunction getRotation(start, end) {\n return getAngle(end[1], end[0], PROPS_CLIENT_XY) + getAngle(start[1], start[0], PROPS_CLIENT_XY);\n}\n\n/**\n * @private\n * velocity is calculated every x ms\n * @param {Object} session\n * @param {Object} input\n */\n\nfunction computeIntervalInputData(session, input) {\n var last = session.lastInterval || input;\n var deltaTime = input.timeStamp - last.timeStamp;\n var velocity;\n var velocityX;\n var velocityY;\n var direction;\n\n if (input.eventType !== INPUT_CANCEL && (deltaTime > COMPUTE_INTERVAL || last.velocity === undefined)) {\n var deltaX = input.deltaX - last.deltaX;\n var deltaY = input.deltaY - last.deltaY;\n var v = getVelocity(deltaTime, deltaX, deltaY);\n velocityX = v.x;\n velocityY = v.y;\n velocity = abs(v.x) > abs(v.y) ? v.x : v.y;\n direction = getDirection(deltaX, deltaY);\n session.lastInterval = input;\n } else {\n // use latest velocity info if it doesn't overtake a minimum period\n velocity = last.velocity;\n velocityX = last.velocityX;\n velocityY = last.velocityY;\n direction = last.direction;\n }\n\n input.velocity = velocity;\n input.velocityX = velocityX;\n input.velocityY = velocityY;\n input.direction = direction;\n}\n\n/**\n* @private\n * extend the data with some usable properties like scale, rotate, velocity etc\n * @param {Object} manager\n * @param {Object} input\n */\n\nfunction computeInputData(manager, input) {\n var session = manager.session;\n var pointers = input.pointers;\n var pointersLength = pointers.length; // store the first input to calculate the distance and direction\n\n if (!session.firstInput) {\n session.firstInput = simpleCloneInputData(input);\n } // to compute scale and rotation we need to store the multiple touches\n\n\n if (pointersLength > 1 && !session.firstMultiple) {\n session.firstMultiple = simpleCloneInputData(input);\n } else if (pointersLength === 1) {\n session.firstMultiple = false;\n }\n\n var firstInput = session.firstInput,\n firstMultiple = session.firstMultiple;\n var offsetCenter = firstMultiple ? firstMultiple.center : firstInput.center;\n var center = input.center = getCenter(pointers);\n input.timeStamp = now();\n input.deltaTime = input.timeStamp - firstInput.timeStamp;\n input.angle = getAngle(offsetCenter, center);\n input.distance = getDistance(offsetCenter, center);\n computeDeltaXY(session, input);\n input.offsetDirection = getDirection(input.deltaX, input.deltaY);\n var overallVelocity = getVelocity(input.deltaTime, input.deltaX, input.deltaY);\n input.overallVelocityX = overallVelocity.x;\n input.overallVelocityY = overallVelocity.y;\n input.overallVelocity = abs(overallVelocity.x) > abs(overallVelocity.y) ? overallVelocity.x : overallVelocity.y;\n input.scale = firstMultiple ? getScale(firstMultiple.pointers, pointers) : 1;\n input.rotation = firstMultiple ? getRotation(firstMultiple.pointers, pointers) : 0;\n input.maxPointers = !session.prevInput ? input.pointers.length : input.pointers.length > session.prevInput.maxPointers ? input.pointers.length : session.prevInput.maxPointers;\n computeIntervalInputData(session, input); // find the correct target\n\n var target = manager.element;\n\n if (hasParent(input.srcEvent.target, target)) {\n target = input.srcEvent.target;\n }\n\n input.target = target;\n}\n\n/**\n * @private\n * handle input events\n * @param {Manager} manager\n * @param {String} eventType\n * @param {Object} input\n */\n\nfunction inputHandler(manager, eventType, input) {\n var pointersLen = input.pointers.length;\n var changedPointersLen = input.changedPointers.length;\n var isFirst = eventType & INPUT_START && pointersLen - changedPointersLen === 0;\n var isFinal = eventType & (INPUT_END | INPUT_CANCEL) && pointersLen - changedPointersLen === 0;\n input.isFirst = !!isFirst;\n input.isFinal = !!isFinal;\n\n if (isFirst) {\n manager.session = {};\n } // source event is the normalized value of the domEvents\n // like 'touchstart, mouseup, pointerdown'\n\n\n input.eventType = eventType; // compute scale, rotation etc\n\n computeInputData(manager, input); // emit secret event\n\n manager.emit('hammer.input', input);\n manager.recognize(input);\n manager.session.prevInput = input;\n}\n\n/**\n * @private\n * split string on whitespace\n * @param {String} str\n * @returns {Array} words\n */\nfunction splitStr(str) {\n return str.trim().split(/\\s+/g);\n}\n\n/**\n * @private\n * addEventListener with multiple events at once\n * @param {EventTarget} target\n * @param {String} types\n * @param {Function} handler\n */\n\nfunction addEventListeners(target, types, handler) {\n each(splitStr(types), function (type) {\n target.addEventListener(type, handler, false);\n });\n}\n\n/**\n * @private\n * removeEventListener with multiple events at once\n * @param {EventTarget} target\n * @param {String} types\n * @param {Function} handler\n */\n\nfunction removeEventListeners(target, types, handler) {\n each(splitStr(types), function (type) {\n target.removeEventListener(type, handler, false);\n });\n}\n\n/**\n * @private\n * get the window object of an element\n * @param {HTMLElement} element\n * @returns {DocumentView|Window}\n */\nfunction getWindowForElement(element) {\n var doc = element.ownerDocument || element;\n return doc.defaultView || doc.parentWindow || window;\n}\n\n/**\n * @private\n * create new input type manager\n * @param {Manager} manager\n * @param {Function} callback\n * @returns {Input}\n * @constructor\n */\n\nvar Input =\n/*#__PURE__*/\nfunction () {\n function Input(manager, callback) {\n var self = this;\n this.manager = manager;\n this.callback = callback;\n this.element = manager.element;\n this.target = manager.options.inputTarget; // smaller wrapper around the handler, for the scope and the enabled state of the manager,\n // so when disabled the input events are completely bypassed.\n\n this.domHandler = function (ev) {\n if (boolOrFn(manager.options.enable, [manager])) {\n self.handler(ev);\n }\n };\n\n this.init();\n }\n /**\n * @private\n * should handle the inputEvent data and trigger the callback\n * @virtual\n */\n\n\n var _proto = Input.prototype;\n\n _proto.handler = function handler() {};\n /**\n * @private\n * bind the events\n */\n\n\n _proto.init = function init() {\n this.evEl && addEventListeners(this.element, this.evEl, this.domHandler);\n this.evTarget && addEventListeners(this.target, this.evTarget, this.domHandler);\n this.evWin && addEventListeners(getWindowForElement(this.element), this.evWin, this.domHandler);\n };\n /**\n * @private\n * unbind the events\n */\n\n\n _proto.destroy = function destroy() {\n this.evEl && removeEventListeners(this.element, this.evEl, this.domHandler);\n this.evTarget && removeEventListeners(this.target, this.evTarget, this.domHandler);\n this.evWin && removeEventListeners(getWindowForElement(this.element), this.evWin, this.domHandler);\n };\n\n return Input;\n}();\n\n/**\n * @private\n * find if a array contains the object using indexOf or a simple polyFill\n * @param {Array} src\n * @param {String} find\n * @param {String} [findByKey]\n * @return {Boolean|Number} false when not found, or the index\n */\nfunction inArray(src, find, findByKey) {\n if (src.indexOf && !findByKey) {\n return src.indexOf(find);\n } else {\n var i = 0;\n\n while (i < src.length) {\n if (findByKey && src[i][findByKey] == find || !findByKey && src[i] === find) {\n // do not use === here, test fails\n return i;\n }\n\n i++;\n }\n\n return -1;\n }\n}\n\nvar POINTER_INPUT_MAP = {\n pointerdown: INPUT_START,\n pointermove: INPUT_MOVE,\n pointerup: INPUT_END,\n pointercancel: INPUT_CANCEL,\n pointerout: INPUT_CANCEL\n}; // in IE10 the pointer types is defined as an enum\n\nvar IE10_POINTER_TYPE_ENUM = {\n 2: INPUT_TYPE_TOUCH,\n 3: INPUT_TYPE_PEN,\n 4: INPUT_TYPE_MOUSE,\n 5: INPUT_TYPE_KINECT // see https://twitter.com/jacobrossi/status/480596438489890816\n\n};\nvar POINTER_ELEMENT_EVENTS = 'pointerdown';\nvar POINTER_WINDOW_EVENTS = 'pointermove pointerup pointercancel'; // IE10 has prefixed support, and case-sensitive\n\nif (win.MSPointerEvent && !win.PointerEvent) {\n POINTER_ELEMENT_EVENTS = 'MSPointerDown';\n POINTER_WINDOW_EVENTS = 'MSPointerMove MSPointerUp MSPointerCancel';\n}\n/**\n * @private\n * Pointer events input\n * @constructor\n * @extends Input\n */\n\n\nvar PointerEventInput =\n/*#__PURE__*/\nfunction (_Input) {\n _inheritsLoose(PointerEventInput, _Input);\n\n function PointerEventInput() {\n var _this;\n\n var proto = PointerEventInput.prototype;\n proto.evEl = POINTER_ELEMENT_EVENTS;\n proto.evWin = POINTER_WINDOW_EVENTS;\n _this = _Input.apply(this, arguments) || this;\n _this.store = _this.manager.session.pointerEvents = [];\n return _this;\n }\n /**\n * @private\n * handle mouse events\n * @param {Object} ev\n */\n\n\n var _proto = PointerEventInput.prototype;\n\n _proto.handler = function handler(ev) {\n var store = this.store;\n var removePointer = false;\n var eventTypeNormalized = ev.type.toLowerCase().replace('ms', '');\n var eventType = POINTER_INPUT_MAP[eventTypeNormalized];\n var pointerType = IE10_POINTER_TYPE_ENUM[ev.pointerType] || ev.pointerType;\n var isTouch = pointerType === INPUT_TYPE_TOUCH; // get index of the event in the store\n\n var storeIndex = inArray(store, ev.pointerId, 'pointerId'); // start and mouse must be down\n\n if (eventType & INPUT_START && (ev.button === 0 || isTouch)) {\n if (storeIndex < 0) {\n store.push(ev);\n storeIndex = store.length - 1;\n }\n } else if (eventType & (INPUT_END | INPUT_CANCEL)) {\n removePointer = true;\n } // it not found, so the pointer hasn't been down (so it's probably a hover)\n\n\n if (storeIndex < 0) {\n return;\n } // update the event in the store\n\n\n store[storeIndex] = ev;\n this.callback(this.manager, eventType, {\n pointers: store,\n changedPointers: [ev],\n pointerType: pointerType,\n srcEvent: ev\n });\n\n if (removePointer) {\n // remove from the store\n store.splice(storeIndex, 1);\n }\n };\n\n return PointerEventInput;\n}(Input);\n\n/**\n * @private\n * convert array-like objects to real arrays\n * @param {Object} obj\n * @returns {Array}\n */\nfunction toArray(obj) {\n return Array.prototype.slice.call(obj, 0);\n}\n\n/**\n * @private\n * unique array with objects based on a key (like 'id') or just by the array's value\n * @param {Array} src [{id:1},{id:2},{id:1}]\n * @param {String} [key]\n * @param {Boolean} [sort=False]\n * @returns {Array} [{id:1},{id:2}]\n */\n\nfunction uniqueArray(src, key, sort) {\n var results = [];\n var values = [];\n var i = 0;\n\n while (i < src.length) {\n var val = key ? src[i][key] : src[i];\n\n if (inArray(values, val) < 0) {\n results.push(src[i]);\n }\n\n values[i] = val;\n i++;\n }\n\n if (sort) {\n if (!key) {\n results = results.sort();\n } else {\n results = results.sort(function (a, b) {\n return a[key] > b[key];\n });\n }\n }\n\n return results;\n}\n\nvar TOUCH_INPUT_MAP = {\n touchstart: INPUT_START,\n touchmove: INPUT_MOVE,\n touchend: INPUT_END,\n touchcancel: INPUT_CANCEL\n};\nvar TOUCH_TARGET_EVENTS = 'touchstart touchmove touchend touchcancel';\n/**\n * @private\n * Multi-user touch events input\n * @constructor\n * @extends Input\n */\n\nvar TouchInput =\n/*#__PURE__*/\nfunction (_Input) {\n _inheritsLoose(TouchInput, _Input);\n\n function TouchInput() {\n var _this;\n\n TouchInput.prototype.evTarget = TOUCH_TARGET_EVENTS;\n _this = _Input.apply(this, arguments) || this;\n _this.targetIds = {}; // this.evTarget = TOUCH_TARGET_EVENTS;\n\n return _this;\n }\n\n var _proto = TouchInput.prototype;\n\n _proto.handler = function handler(ev) {\n var type = TOUCH_INPUT_MAP[ev.type];\n var touches = getTouches.call(this, ev, type);\n\n if (!touches) {\n return;\n }\n\n this.callback(this.manager, type, {\n pointers: touches[0],\n changedPointers: touches[1],\n pointerType: INPUT_TYPE_TOUCH,\n srcEvent: ev\n });\n };\n\n return TouchInput;\n}(Input);\n\nfunction getTouches(ev, type) {\n var allTouches = toArray(ev.touches);\n var targetIds = this.targetIds; // when there is only one touch, the process can be simplified\n\n if (type & (INPUT_START | INPUT_MOVE) && allTouches.length === 1) {\n targetIds[allTouches[0].identifier] = true;\n return [allTouches, allTouches];\n }\n\n var i;\n var targetTouches;\n var changedTouches = toArray(ev.changedTouches);\n var changedTargetTouches = [];\n var target = this.target; // get target touches from touches\n\n targetTouches = allTouches.filter(function (touch) {\n return hasParent(touch.target, target);\n }); // collect touches\n\n if (type === INPUT_START) {\n i = 0;\n\n while (i < targetTouches.length) {\n targetIds[targetTouches[i].identifier] = true;\n i++;\n }\n } // filter changed touches to only contain touches that exist in the collected target ids\n\n\n i = 0;\n\n while (i < changedTouches.length) {\n if (targetIds[changedTouches[i].identifier]) {\n changedTargetTouches.push(changedTouches[i]);\n } // cleanup removed touches\n\n\n if (type & (INPUT_END | INPUT_CANCEL)) {\n delete targetIds[changedTouches[i].identifier];\n }\n\n i++;\n }\n\n if (!changedTargetTouches.length) {\n return;\n }\n\n return [// merge targetTouches with changedTargetTouches so it contains ALL touches, including 'end' and 'cancel'\n uniqueArray(targetTouches.concat(changedTargetTouches), 'identifier', true), changedTargetTouches];\n}\n\nvar MOUSE_INPUT_MAP = {\n mousedown: INPUT_START,\n mousemove: INPUT_MOVE,\n mouseup: INPUT_END\n};\nvar MOUSE_ELEMENT_EVENTS = 'mousedown';\nvar MOUSE_WINDOW_EVENTS = 'mousemove mouseup';\n/**\n * @private\n * Mouse events input\n * @constructor\n * @extends Input\n */\n\nvar MouseInput =\n/*#__PURE__*/\nfunction (_Input) {\n _inheritsLoose(MouseInput, _Input);\n\n function MouseInput() {\n var _this;\n\n var proto = MouseInput.prototype;\n proto.evEl = MOUSE_ELEMENT_EVENTS;\n proto.evWin = MOUSE_WINDOW_EVENTS;\n _this = _Input.apply(this, arguments) || this;\n _this.pressed = false; // mousedown state\n\n return _this;\n }\n /**\n * @private\n * handle mouse events\n * @param {Object} ev\n */\n\n\n var _proto = MouseInput.prototype;\n\n _proto.handler = function handler(ev) {\n var eventType = MOUSE_INPUT_MAP[ev.type]; // on start we want to have the left mouse button down\n\n if (eventType & INPUT_START && ev.button === 0) {\n this.pressed = true;\n }\n\n if (eventType & INPUT_MOVE && ev.which !== 1) {\n eventType = INPUT_END;\n } // mouse must be down\n\n\n if (!this.pressed) {\n return;\n }\n\n if (eventType & INPUT_END) {\n this.pressed = false;\n }\n\n this.callback(this.manager, eventType, {\n pointers: [ev],\n changedPointers: [ev],\n pointerType: INPUT_TYPE_MOUSE,\n srcEvent: ev\n });\n };\n\n return MouseInput;\n}(Input);\n\n/**\n * @private\n * Combined touch and mouse input\n *\n * Touch has a higher priority then mouse, and while touching no mouse events are allowed.\n * This because touch devices also emit mouse events while doing a touch.\n *\n * @constructor\n * @extends Input\n */\n\nvar DEDUP_TIMEOUT = 2500;\nvar DEDUP_DISTANCE = 25;\n\nfunction setLastTouch(eventData) {\n var _eventData$changedPoi = eventData.changedPointers,\n touch = _eventData$changedPoi[0];\n\n if (touch.identifier === this.primaryTouch) {\n var lastTouch = {\n x: touch.clientX,\n y: touch.clientY\n };\n var lts = this.lastTouches;\n this.lastTouches.push(lastTouch);\n\n var removeLastTouch = function removeLastTouch() {\n var i = lts.indexOf(lastTouch);\n\n if (i > -1) {\n lts.splice(i, 1);\n }\n };\n\n setTimeout(removeLastTouch, DEDUP_TIMEOUT);\n }\n}\n\nfunction recordTouches(eventType, eventData) {\n if (eventType & INPUT_START) {\n this.primaryTouch = eventData.changedPointers[0].identifier;\n setLastTouch.call(this, eventData);\n } else if (eventType & (INPUT_END | INPUT_CANCEL)) {\n setLastTouch.call(this, eventData);\n }\n}\n\nfunction isSyntheticEvent(eventData) {\n var x = eventData.srcEvent.clientX;\n var y = eventData.srcEvent.clientY;\n\n for (var i = 0; i < this.lastTouches.length; i++) {\n var t = this.lastTouches[i];\n var dx = Math.abs(x - t.x);\n var dy = Math.abs(y - t.y);\n\n if (dx <= DEDUP_DISTANCE && dy <= DEDUP_DISTANCE) {\n return true;\n }\n }\n\n return false;\n}\n\nvar TouchMouseInput =\n/*#__PURE__*/\nfunction () {\n var TouchMouseInput =\n /*#__PURE__*/\n function (_Input) {\n _inheritsLoose(TouchMouseInput, _Input);\n\n function TouchMouseInput(_manager, callback) {\n var _this;\n\n _this = _Input.call(this, _manager, callback) || this;\n\n _this.handler = function (manager, inputEvent, inputData) {\n var isTouch = inputData.pointerType === INPUT_TYPE_TOUCH;\n var isMouse = inputData.pointerType === INPUT_TYPE_MOUSE;\n\n if (isMouse && inputData.sourceCapabilities && inputData.sourceCapabilities.firesTouchEvents) {\n return;\n } // when we're in a touch event, record touches to de-dupe synthetic mouse event\n\n\n if (isTouch) {\n recordTouches.call(_assertThisInitialized(_assertThisInitialized(_this)), inputEvent, inputData);\n } else if (isMouse && isSyntheticEvent.call(_assertThisInitialized(_assertThisInitialized(_this)), inputData)) {\n return;\n }\n\n _this.callback(manager, inputEvent, inputData);\n };\n\n _this.touch = new TouchInput(_this.manager, _this.handler);\n _this.mouse = new MouseInput(_this.manager, _this.handler);\n _this.primaryTouch = null;\n _this.lastTouches = [];\n return _this;\n }\n /**\n * @private\n * handle mouse and touch events\n * @param {Hammer} manager\n * @param {String} inputEvent\n * @param {Object} inputData\n */\n\n\n var _proto = TouchMouseInput.prototype;\n\n /**\n * @private\n * remove the event listeners\n */\n _proto.destroy = function destroy() {\n this.touch.destroy();\n this.mouse.destroy();\n };\n\n return TouchMouseInput;\n }(Input);\n\n return TouchMouseInput;\n}();\n\n/**\n * @private\n * create new input type manager\n * called by the Manager constructor\n * @param {Hammer} manager\n * @returns {Input}\n */\n\nfunction createInputInstance(manager) {\n var Type; // let inputClass = manager.options.inputClass;\n\n var inputClass = manager.options.inputClass;\n\n if (inputClass) {\n Type = inputClass;\n } else if (SUPPORT_POINTER_EVENTS) {\n Type = PointerEventInput;\n } else if (SUPPORT_ONLY_TOUCH) {\n Type = TouchInput;\n } else if (!SUPPORT_TOUCH) {\n Type = MouseInput;\n } else {\n Type = TouchMouseInput;\n }\n\n return new Type(manager, inputHandler);\n}\n\n/**\n * @private\n * if the argument is an array, we want to execute the fn on each entry\n * if it aint an array we don't want to do a thing.\n * this is used by all the methods that accept a single and array argument.\n * @param {*|Array} arg\n * @param {String} fn\n * @param {Object} [context]\n * @returns {Boolean}\n */\n\nfunction invokeArrayArg(arg, fn, context) {\n if (Array.isArray(arg)) {\n each(arg, context[fn], context);\n return true;\n }\n\n return false;\n}\n\nvar STATE_POSSIBLE = 1;\nvar STATE_BEGAN = 2;\nvar STATE_CHANGED = 4;\nvar STATE_ENDED = 8;\nvar STATE_RECOGNIZED = STATE_ENDED;\nvar STATE_CANCELLED = 16;\nvar STATE_FAILED = 32;\n\n/**\n * @private\n * get a unique id\n * @returns {number} uniqueId\n */\nvar _uniqueId = 1;\nfunction uniqueId() {\n return _uniqueId++;\n}\n\n/**\n * @private\n * get a recognizer by name if it is bound to a manager\n * @param {Recognizer|String} otherRecognizer\n * @param {Recognizer} recognizer\n * @returns {Recognizer}\n */\nfunction getRecognizerByNameIfManager(otherRecognizer, recognizer) {\n var manager = recognizer.manager;\n\n if (manager) {\n return manager.get(otherRecognizer);\n }\n\n return otherRecognizer;\n}\n\n/**\n * @private\n * get a usable string, used as event postfix\n * @param {constant} state\n * @returns {String} state\n */\n\nfunction stateStr(state) {\n if (state & STATE_CANCELLED) {\n return 'cancel';\n } else if (state & STATE_ENDED) {\n return 'end';\n } else if (state & STATE_CHANGED) {\n return 'move';\n } else if (state & STATE_BEGAN) {\n return 'start';\n }\n\n return '';\n}\n\n/**\n * @private\n * Recognizer flow explained; *\n * All recognizers have the initial state of POSSIBLE when a input session starts.\n * The definition of a input session is from the first input until the last input, with all it's movement in it. *\n * Example session for mouse-input: mousedown -> mousemove -> mouseup\n *\n * On each recognizing cycle (see Manager.recognize) the .recognize() method is executed\n * which determines with state it should be.\n *\n * If the recognizer has the state FAILED, CANCELLED or RECOGNIZED (equals ENDED), it is reset to\n * POSSIBLE to give it another change on the next cycle.\n *\n * Possible\n * |\n * +-----+---------------+\n * | |\n * +-----+-----+ |\n * | | |\n * Failed Cancelled |\n * +-------+------+\n * | |\n * Recognized Began\n * |\n * Changed\n * |\n * Ended/Recognized\n */\n\n/**\n * @private\n * Recognizer\n * Every recognizer needs to extend from this class.\n * @constructor\n * @param {Object} options\n */\n\nvar Recognizer =\n/*#__PURE__*/\nfunction () {\n function Recognizer(options) {\n if (options === void 0) {\n options = {};\n }\n\n this.options = _extends({\n enable: true\n }, options);\n this.id = uniqueId();\n this.manager = null; // default is enable true\n\n this.state = STATE_POSSIBLE;\n this.simultaneous = {};\n this.requireFail = [];\n }\n /**\n * @private\n * set options\n * @param {Object} options\n * @return {Recognizer}\n */\n\n\n var _proto = Recognizer.prototype;\n\n _proto.set = function set(options) {\n assign$1(this.options, options); // also update the touchAction, in case something changed about the directions/enabled state\n\n this.manager && this.manager.touchAction.update();\n return this;\n };\n /**\n * @private\n * recognize simultaneous with an other recognizer.\n * @param {Recognizer} otherRecognizer\n * @returns {Recognizer} this\n */\n\n\n _proto.recognizeWith = function recognizeWith(otherRecognizer) {\n if (invokeArrayArg(otherRecognizer, 'recognizeWith', this)) {\n return this;\n }\n\n var simultaneous = this.simultaneous;\n otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this);\n\n if (!simultaneous[otherRecognizer.id]) {\n simultaneous[otherRecognizer.id] = otherRecognizer;\n otherRecognizer.recognizeWith(this);\n }\n\n return this;\n };\n /**\n * @private\n * drop the simultaneous link. it doesnt remove the link on the other recognizer.\n * @param {Recognizer} otherRecognizer\n * @returns {Recognizer} this\n */\n\n\n _proto.dropRecognizeWith = function dropRecognizeWith(otherRecognizer) {\n if (invokeArrayArg(otherRecognizer, 'dropRecognizeWith', this)) {\n return this;\n }\n\n otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this);\n delete this.simultaneous[otherRecognizer.id];\n return this;\n };\n /**\n * @private\n * recognizer can only run when an other is failing\n * @param {Recognizer} otherRecognizer\n * @returns {Recognizer} this\n */\n\n\n _proto.requireFailure = function requireFailure(otherRecognizer) {\n if (invokeArrayArg(otherRecognizer, 'requireFailure', this)) {\n return this;\n }\n\n var requireFail = this.requireFail;\n otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this);\n\n if (inArray(requireFail, otherRecognizer) === -1) {\n requireFail.push(otherRecognizer);\n otherRecognizer.requireFailure(this);\n }\n\n return this;\n };\n /**\n * @private\n * drop the requireFailure link. it does not remove the link on the other recognizer.\n * @param {Recognizer} otherRecognizer\n * @returns {Recognizer} this\n */\n\n\n _proto.dropRequireFailure = function dropRequireFailure(otherRecognizer) {\n if (invokeArrayArg(otherRecognizer, 'dropRequireFailure', this)) {\n return this;\n }\n\n otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this);\n var index = inArray(this.requireFail, otherRecognizer);\n\n if (index > -1) {\n this.requireFail.splice(index, 1);\n }\n\n return this;\n };\n /**\n * @private\n * has require failures boolean\n * @returns {boolean}\n */\n\n\n _proto.hasRequireFailures = function hasRequireFailures() {\n return this.requireFail.length > 0;\n };\n /**\n * @private\n * if the recognizer can recognize simultaneous with an other recognizer\n * @param {Recognizer} otherRecognizer\n * @returns {Boolean}\n */\n\n\n _proto.canRecognizeWith = function canRecognizeWith(otherRecognizer) {\n return !!this.simultaneous[otherRecognizer.id];\n };\n /**\n * @private\n * You should use `tryEmit` instead of `emit` directly to check\n * that all the needed recognizers has failed before emitting.\n * @param {Object} input\n */\n\n\n _proto.emit = function emit(input) {\n var self = this;\n var state = this.state;\n\n function emit(event) {\n self.manager.emit(event, input);\n } // 'panstart' and 'panmove'\n\n\n if (state < STATE_ENDED) {\n emit(self.options.event + stateStr(state));\n }\n\n emit(self.options.event); // simple 'eventName' events\n\n if (input.additionalEvent) {\n // additional event(panleft, panright, pinchin, pinchout...)\n emit(input.additionalEvent);\n } // panend and pancancel\n\n\n if (state >= STATE_ENDED) {\n emit(self.options.event + stateStr(state));\n }\n };\n /**\n * @private\n * Check that all the require failure recognizers has failed,\n * if true, it emits a gesture event,\n * otherwise, setup the state to FAILED.\n * @param {Object} input\n */\n\n\n _proto.tryEmit = function tryEmit(input) {\n if (this.canEmit()) {\n return this.emit(input);\n } // it's failing anyway\n\n\n this.state = STATE_FAILED;\n };\n /**\n * @private\n * can we emit?\n * @returns {boolean}\n */\n\n\n _proto.canEmit = function canEmit() {\n var i = 0;\n\n while (i < this.requireFail.length) {\n if (!(this.requireFail[i].state & (STATE_FAILED | STATE_POSSIBLE))) {\n return false;\n }\n\n i++;\n }\n\n return true;\n };\n /**\n * @private\n * update the recognizer\n * @param {Object} inputData\n */\n\n\n _proto.recognize = function recognize(inputData) {\n // make a new copy of the inputData\n // so we can change the inputData without messing up the other recognizers\n var inputDataClone = assign$1({}, inputData); // is is enabled and allow recognizing?\n\n if (!boolOrFn(this.options.enable, [this, inputDataClone])) {\n this.reset();\n this.state = STATE_FAILED;\n return;\n } // reset when we've reached the end\n\n\n if (this.state & (STATE_RECOGNIZED | STATE_CANCELLED | STATE_FAILED)) {\n this.state = STATE_POSSIBLE;\n }\n\n this.state = this.process(inputDataClone); // the recognizer has recognized a gesture\n // so trigger an event\n\n if (this.state & (STATE_BEGAN | STATE_CHANGED | STATE_ENDED | STATE_CANCELLED)) {\n this.tryEmit(inputDataClone);\n }\n };\n /**\n * @private\n * return the state of the recognizer\n * the actual recognizing happens in this method\n * @virtual\n * @param {Object} inputData\n * @returns {constant} STATE\n */\n\n /* jshint ignore:start */\n\n\n _proto.process = function process(inputData) {};\n /* jshint ignore:end */\n\n /**\n * @private\n * return the preferred touch-action\n * @virtual\n * @returns {Array}\n */\n\n\n _proto.getTouchAction = function getTouchAction() {};\n /**\n * @private\n * called when the gesture isn't allowed to recognize\n * like when another is being recognized or it is disabled\n * @virtual\n */\n\n\n _proto.reset = function reset() {};\n\n return Recognizer;\n}();\n\nvar defaults = {\n /**\n * @private\n * set if DOM events are being triggered.\n * But this is slower and unused by simple implementations, so disabled by default.\n * @type {Boolean}\n * @default false\n */\n domEvents: false,\n\n /**\n * @private\n * The value for the touchAction property/fallback.\n * When set to `compute` it will magically set the correct value based on the added recognizers.\n * @type {String}\n * @default compute\n */\n touchAction: TOUCH_ACTION_COMPUTE,\n\n /**\n * @private\n * @type {Boolean}\n * @default true\n */\n enable: true,\n\n /**\n * @private\n * EXPERIMENTAL FEATURE -- can be removed/changed\n * Change the parent input target element.\n * If Null, then it is being set the to main element.\n * @type {Null|EventTarget}\n * @default null\n */\n inputTarget: null,\n\n /**\n * @private\n * force an input class\n * @type {Null|Function}\n * @default null\n */\n inputClass: null,\n\n /**\n * @private\n * Default recognizer setup when calling `Hammer()`\n * When creating a new Manager these will be skipped.\n * @type {Array}\n */\n preset: [],\n\n /**\n * @private\n * Some CSS properties can be used to improve the working of Hammer.\n * Add them to this method and they will be set when creating a new Manager.\n * @namespace\n */\n cssProps: {\n /**\n * @private\n * Disables text selection to improve the dragging gesture. Mainly for desktop browsers.\n * @type {String}\n * @default 'none'\n */\n userSelect: \"none\",\n\n /**\n * @private\n * Disable the Windows Phone grippers when pressing an element.\n * @type {String}\n * @default 'none'\n */\n touchSelect: \"none\",\n\n /**\n * @private\n * Disables the default callout shown when you touch and hold a touch target.\n * On iOS, when you touch and hold a touch target such as a link, Safari displays\n * a callout containing information about the link. This property allows you to disable that callout.\n * @type {String}\n * @default 'none'\n */\n touchCallout: \"none\",\n\n /**\n * @private\n * Specifies whether zooming is enabled. Used by IE10>\n * @type {String}\n * @default 'none'\n */\n contentZooming: \"none\",\n\n /**\n * @private\n * Specifies that an entire element should be draggable instead of its contents. Mainly for desktop browsers.\n * @type {String}\n * @default 'none'\n */\n userDrag: \"none\",\n\n /**\n * @private\n * Overrides the highlight color shown when the user taps a link or a JavaScript\n * clickable element in iOS. This property obeys the alpha value, if specified.\n * @type {String}\n * @default 'rgba(0,0,0,0)'\n */\n tapHighlightColor: \"rgba(0,0,0,0)\"\n }\n};\n\nvar STOP = 1;\nvar FORCED_STOP = 2;\n/**\n * @private\n * add/remove the css properties as defined in manager.options.cssProps\n * @param {Manager} manager\n * @param {Boolean} add\n */\n\nfunction toggleCssProps(manager, add) {\n var element = manager.element;\n\n if (!element.style) {\n return;\n }\n\n var prop;\n each(manager.options.cssProps, function (value, name) {\n prop = prefixed(element.style, name);\n\n if (add) {\n manager.oldCssProps[prop] = element.style[prop];\n element.style[prop] = value;\n } else {\n element.style[prop] = manager.oldCssProps[prop] || \"\";\n }\n });\n\n if (!add) {\n manager.oldCssProps = {};\n }\n}\n/**\n * @private\n * trigger dom event\n * @param {String} event\n * @param {Object} data\n */\n\n\nfunction triggerDomEvent(event, data) {\n var gestureEvent = document.createEvent(\"Event\");\n gestureEvent.initEvent(event, true, true);\n gestureEvent.gesture = data;\n data.target.dispatchEvent(gestureEvent);\n}\n/**\n* @private\n * Manager\n * @param {HTMLElement} element\n * @param {Object} [options]\n * @constructor\n */\n\n\nvar Manager =\n/*#__PURE__*/\nfunction () {\n function Manager(element, options) {\n var _this = this;\n\n this.options = assign$1({}, defaults, options || {});\n this.options.inputTarget = this.options.inputTarget || element;\n this.handlers = {};\n this.session = {};\n this.recognizers = [];\n this.oldCssProps = {};\n this.element = element;\n this.input = createInputInstance(this);\n this.touchAction = new TouchAction(this, this.options.touchAction);\n toggleCssProps(this, true);\n each(this.options.recognizers, function (item) {\n var recognizer = _this.add(new item[0](item[1]));\n\n item[2] && recognizer.recognizeWith(item[2]);\n item[3] && recognizer.requireFailure(item[3]);\n }, this);\n }\n /**\n * @private\n * set options\n * @param {Object} options\n * @returns {Manager}\n */\n\n\n var _proto = Manager.prototype;\n\n _proto.set = function set(options) {\n assign$1(this.options, options); // Options that need a little more setup\n\n if (options.touchAction) {\n this.touchAction.update();\n }\n\n if (options.inputTarget) {\n // Clean up existing event listeners and reinitialize\n this.input.destroy();\n this.input.target = options.inputTarget;\n this.input.init();\n }\n\n return this;\n };\n /**\n * @private\n * stop recognizing for this session.\n * This session will be discarded, when a new [input]start event is fired.\n * When forced, the recognizer cycle is stopped immediately.\n * @param {Boolean} [force]\n */\n\n\n _proto.stop = function stop(force) {\n this.session.stopped = force ? FORCED_STOP : STOP;\n };\n /**\n * @private\n * run the recognizers!\n * called by the inputHandler function on every movement of the pointers (touches)\n * it walks through all the recognizers and tries to detect the gesture that is being made\n * @param {Object} inputData\n */\n\n\n _proto.recognize = function recognize(inputData) {\n var session = this.session;\n\n if (session.stopped) {\n return;\n } // run the touch-action polyfill\n\n\n this.touchAction.preventDefaults(inputData);\n var recognizer;\n var recognizers = this.recognizers; // this holds the recognizer that is being recognized.\n // so the recognizer's state needs to be BEGAN, CHANGED, ENDED or RECOGNIZED\n // if no recognizer is detecting a thing, it is set to `null`\n\n var curRecognizer = session.curRecognizer; // reset when the last recognizer is recognized\n // or when we're in a new session\n\n if (!curRecognizer || curRecognizer && curRecognizer.state & STATE_RECOGNIZED) {\n session.curRecognizer = null;\n curRecognizer = null;\n }\n\n var i = 0;\n\n while (i < recognizers.length) {\n recognizer = recognizers[i]; // find out if we are allowed try to recognize the input for this one.\n // 1. allow if the session is NOT forced stopped (see the .stop() method)\n // 2. allow if we still haven't recognized a gesture in this session, or the this recognizer is the one\n // that is being recognized.\n // 3. allow if the recognizer is allowed to run simultaneous with the current recognized recognizer.\n // this can be setup with the `recognizeWith()` method on the recognizer.\n\n if (session.stopped !== FORCED_STOP && ( // 1\n !curRecognizer || recognizer === curRecognizer || // 2\n recognizer.canRecognizeWith(curRecognizer))) {\n // 3\n recognizer.recognize(inputData);\n } else {\n recognizer.reset();\n } // if the recognizer has been recognizing the input as a valid gesture, we want to store this one as the\n // current active recognizer. but only if we don't already have an active recognizer\n\n\n if (!curRecognizer && recognizer.state & (STATE_BEGAN | STATE_CHANGED | STATE_ENDED)) {\n session.curRecognizer = recognizer;\n curRecognizer = recognizer;\n }\n\n i++;\n }\n };\n /**\n * @private\n * get a recognizer by its event name.\n * @param {Recognizer|String} recognizer\n * @returns {Recognizer|Null}\n */\n\n\n _proto.get = function get(recognizer) {\n if (recognizer instanceof Recognizer) {\n return recognizer;\n }\n\n var recognizers = this.recognizers;\n\n for (var i = 0; i < recognizers.length; i++) {\n if (recognizers[i].options.event === recognizer) {\n return recognizers[i];\n }\n }\n\n return null;\n };\n /**\n * @private add a recognizer to the manager\n * existing recognizers with the same event name will be removed\n * @param {Recognizer} recognizer\n * @returns {Recognizer|Manager}\n */\n\n\n _proto.add = function add(recognizer) {\n if (invokeArrayArg(recognizer, \"add\", this)) {\n return this;\n } // remove existing\n\n\n var existing = this.get(recognizer.options.event);\n\n if (existing) {\n this.remove(existing);\n }\n\n this.recognizers.push(recognizer);\n recognizer.manager = this;\n this.touchAction.update();\n return recognizer;\n };\n /**\n * @private\n * remove a recognizer by name or instance\n * @param {Recognizer|String} recognizer\n * @returns {Manager}\n */\n\n\n _proto.remove = function remove(recognizer) {\n if (invokeArrayArg(recognizer, \"remove\", this)) {\n return this;\n }\n\n var targetRecognizer = this.get(recognizer); // let's make sure this recognizer exists\n\n if (recognizer) {\n var recognizers = this.recognizers;\n var index = inArray(recognizers, targetRecognizer);\n\n if (index !== -1) {\n recognizers.splice(index, 1);\n this.touchAction.update();\n }\n }\n\n return this;\n };\n /**\n * @private\n * bind event\n * @param {String} events\n * @param {Function} handler\n * @returns {EventEmitter} this\n */\n\n\n _proto.on = function on(events, handler) {\n if (events === undefined || handler === undefined) {\n return this;\n }\n\n var handlers = this.handlers;\n each(splitStr(events), function (event) {\n handlers[event] = handlers[event] || [];\n handlers[event].push(handler);\n });\n return this;\n };\n /**\n * @private unbind event, leave emit blank to remove all handlers\n * @param {String} events\n * @param {Function} [handler]\n * @returns {EventEmitter} this\n */\n\n\n _proto.off = function off(events, handler) {\n if (events === undefined) {\n return this;\n }\n\n var handlers = this.handlers;\n each(splitStr(events), function (event) {\n if (!handler) {\n delete handlers[event];\n } else {\n handlers[event] && handlers[event].splice(inArray(handlers[event], handler), 1);\n }\n });\n return this;\n };\n /**\n * @private emit event to the listeners\n * @param {String} event\n * @param {Object} data\n */\n\n\n _proto.emit = function emit(event, data) {\n // we also want to trigger dom events\n if (this.options.domEvents) {\n triggerDomEvent(event, data);\n } // no handlers, so skip it all\n\n\n var handlers = this.handlers[event] && this.handlers[event].slice();\n\n if (!handlers || !handlers.length) {\n return;\n }\n\n data.type = event;\n\n data.preventDefault = function () {\n data.srcEvent.preventDefault();\n };\n\n var i = 0;\n\n while (i < handlers.length) {\n handlers[i](data);\n i++;\n }\n };\n /**\n * @private\n * destroy the manager and unbinds all events\n * it doesn't unbind dom events, that is the user own responsibility\n */\n\n\n _proto.destroy = function destroy() {\n this.element && toggleCssProps(this, false);\n this.handlers = {};\n this.session = {};\n this.input.destroy();\n this.element = null;\n };\n\n return Manager;\n}();\n\nvar SINGLE_TOUCH_INPUT_MAP = {\n touchstart: INPUT_START,\n touchmove: INPUT_MOVE,\n touchend: INPUT_END,\n touchcancel: INPUT_CANCEL\n};\nvar SINGLE_TOUCH_TARGET_EVENTS = 'touchstart';\nvar SINGLE_TOUCH_WINDOW_EVENTS = 'touchstart touchmove touchend touchcancel';\n/**\n * @private\n * Touch events input\n * @constructor\n * @extends Input\n */\n\nvar SingleTouchInput =\n/*#__PURE__*/\nfunction (_Input) {\n _inheritsLoose(SingleTouchInput, _Input);\n\n function SingleTouchInput() {\n var _this;\n\n var proto = SingleTouchInput.prototype;\n proto.evTarget = SINGLE_TOUCH_TARGET_EVENTS;\n proto.evWin = SINGLE_TOUCH_WINDOW_EVENTS;\n _this = _Input.apply(this, arguments) || this;\n _this.started = false;\n return _this;\n }\n\n var _proto = SingleTouchInput.prototype;\n\n _proto.handler = function handler(ev) {\n var type = SINGLE_TOUCH_INPUT_MAP[ev.type]; // should we handle the touch events?\n\n if (type === INPUT_START) {\n this.started = true;\n }\n\n if (!this.started) {\n return;\n }\n\n var touches = normalizeSingleTouches.call(this, ev, type); // when done, reset the started state\n\n if (type & (INPUT_END | INPUT_CANCEL) && touches[0].length - touches[1].length === 0) {\n this.started = false;\n }\n\n this.callback(this.manager, type, {\n pointers: touches[0],\n changedPointers: touches[1],\n pointerType: INPUT_TYPE_TOUCH,\n srcEvent: ev\n });\n };\n\n return SingleTouchInput;\n}(Input);\n\nfunction normalizeSingleTouches(ev, type) {\n var all = toArray(ev.touches);\n var changed = toArray(ev.changedTouches);\n\n if (type & (INPUT_END | INPUT_CANCEL)) {\n all = uniqueArray(all.concat(changed), 'identifier', true);\n }\n\n return [all, changed];\n}\n\n/**\n * @private\n * This recognizer is just used as a base for the simple attribute recognizers.\n * @constructor\n * @extends Recognizer\n */\n\nvar AttrRecognizer =\n/*#__PURE__*/\nfunction (_Recognizer) {\n _inheritsLoose(AttrRecognizer, _Recognizer);\n\n function AttrRecognizer(options) {\n if (options === void 0) {\n options = {};\n }\n\n return _Recognizer.call(this, _extends({\n pointers: 1\n }, options)) || this;\n }\n /**\n * @private\n * Used to check if it the recognizer receives valid input, like input.distance > 10.\n * @memberof AttrRecognizer\n * @param {Object} input\n * @returns {Boolean} recognized\n */\n\n\n var _proto = AttrRecognizer.prototype;\n\n _proto.attrTest = function attrTest(input) {\n var optionPointers = this.options.pointers;\n return optionPointers === 0 || input.pointers.length === optionPointers;\n };\n /**\n * @private\n * Process the input and return the state for the recognizer\n * @memberof AttrRecognizer\n * @param {Object} input\n * @returns {*} State\n */\n\n\n _proto.process = function process(input) {\n var state = this.state;\n var eventType = input.eventType;\n var isRecognized = state & (STATE_BEGAN | STATE_CHANGED);\n var isValid = this.attrTest(input); // on cancel input and we've recognized before, return STATE_CANCELLED\n\n if (isRecognized && (eventType & INPUT_CANCEL || !isValid)) {\n return state | STATE_CANCELLED;\n } else if (isRecognized || isValid) {\n if (eventType & INPUT_END) {\n return state | STATE_ENDED;\n } else if (!(state & STATE_BEGAN)) {\n return STATE_BEGAN;\n }\n\n return state | STATE_CHANGED;\n }\n\n return STATE_FAILED;\n };\n\n return AttrRecognizer;\n}(Recognizer);\n\n/**\n * @private\n * A tap is recognized when the pointer is doing a small tap/click. Multiple taps are recognized if they occur\n * between the given interval and position. The delay option can be used to recognize multi-taps without firing\n * a single tap.\n *\n * The eventData from the emitted event contains the property `tapCount`, which contains the amount of\n * multi-taps being recognized.\n * @constructor\n * @extends Recognizer\n */\n\nvar TapRecognizer =\n/*#__PURE__*/\nfunction (_Recognizer) {\n _inheritsLoose(TapRecognizer, _Recognizer);\n\n function TapRecognizer(options) {\n var _this;\n\n if (options === void 0) {\n options = {};\n }\n\n _this = _Recognizer.call(this, _extends({\n event: 'tap',\n pointers: 1,\n taps: 1,\n interval: 300,\n // max time between the multi-tap taps\n time: 250,\n // max time of the pointer to be down (like finger on the screen)\n threshold: 9,\n // a minimal movement is ok, but keep it low\n posThreshold: 10\n }, options)) || this; // previous time and center,\n // used for tap counting\n\n _this.pTime = false;\n _this.pCenter = false;\n _this._timer = null;\n _this._input = null;\n _this.count = 0;\n return _this;\n }\n\n var _proto = TapRecognizer.prototype;\n\n _proto.getTouchAction = function getTouchAction() {\n return [TOUCH_ACTION_MANIPULATION];\n };\n\n _proto.process = function process(input) {\n var _this2 = this;\n\n var options = this.options;\n var validPointers = input.pointers.length === options.pointers;\n var validMovement = input.distance < options.threshold;\n var validTouchTime = input.deltaTime < options.time;\n this.reset();\n\n if (input.eventType & INPUT_START && this.count === 0) {\n return this.failTimeout();\n } // we only allow little movement\n // and we've reached an end event, so a tap is possible\n\n\n if (validMovement && validTouchTime && validPointers) {\n if (input.eventType !== INPUT_END) {\n return this.failTimeout();\n }\n\n var validInterval = this.pTime ? input.timeStamp - this.pTime < options.interval : true;\n var validMultiTap = !this.pCenter || getDistance(this.pCenter, input.center) < options.posThreshold;\n this.pTime = input.timeStamp;\n this.pCenter = input.center;\n\n if (!validMultiTap || !validInterval) {\n this.count = 1;\n } else {\n this.count += 1;\n }\n\n this._input = input; // if tap count matches we have recognized it,\n // else it has began recognizing...\n\n var tapCount = this.count % options.taps;\n\n if (tapCount === 0) {\n // no failing requirements, immediately trigger the tap event\n // or wait as long as the multitap interval to trigger\n if (!this.hasRequireFailures()) {\n return STATE_RECOGNIZED;\n } else {\n this._timer = setTimeout(function () {\n _this2.state = STATE_RECOGNIZED;\n\n _this2.tryEmit();\n }, options.interval);\n return STATE_BEGAN;\n }\n }\n }\n\n return STATE_FAILED;\n };\n\n _proto.failTimeout = function failTimeout() {\n var _this3 = this;\n\n this._timer = setTimeout(function () {\n _this3.state = STATE_FAILED;\n }, this.options.interval);\n return STATE_FAILED;\n };\n\n _proto.reset = function reset() {\n clearTimeout(this._timer);\n };\n\n _proto.emit = function emit() {\n if (this.state === STATE_RECOGNIZED) {\n this._input.tapCount = this.count;\n this.manager.emit(this.options.event, this._input);\n }\n };\n\n return TapRecognizer;\n}(Recognizer);\n\n/**\n * @private\n * direction cons to string\n * @param {constant} direction\n * @returns {String}\n */\n\nfunction directionStr(direction) {\n if (direction === DIRECTION_DOWN) {\n return 'down';\n } else if (direction === DIRECTION_UP) {\n return 'up';\n } else if (direction === DIRECTION_LEFT) {\n return 'left';\n } else if (direction === DIRECTION_RIGHT) {\n return 'right';\n }\n\n return '';\n}\n\n/**\n * @private\n * Pan\n * Recognized when the pointer is down and moved in the allowed direction.\n * @constructor\n * @extends AttrRecognizer\n */\n\nvar PanRecognizer =\n/*#__PURE__*/\nfunction (_AttrRecognizer) {\n _inheritsLoose(PanRecognizer, _AttrRecognizer);\n\n function PanRecognizer(options) {\n var _this;\n\n if (options === void 0) {\n options = {};\n }\n\n _this = _AttrRecognizer.call(this, _extends({\n event: 'pan',\n threshold: 10,\n pointers: 1,\n direction: DIRECTION_ALL\n }, options)) || this;\n _this.pX = null;\n _this.pY = null;\n return _this;\n }\n\n var _proto = PanRecognizer.prototype;\n\n _proto.getTouchAction = function getTouchAction() {\n var direction = this.options.direction;\n var actions = [];\n\n if (direction & DIRECTION_HORIZONTAL) {\n actions.push(TOUCH_ACTION_PAN_Y);\n }\n\n if (direction & DIRECTION_VERTICAL) {\n actions.push(TOUCH_ACTION_PAN_X);\n }\n\n return actions;\n };\n\n _proto.directionTest = function directionTest(input) {\n var options = this.options;\n var hasMoved = true;\n var distance = input.distance;\n var direction = input.direction;\n var x = input.deltaX;\n var y = input.deltaY; // lock to axis?\n\n if (!(direction & options.direction)) {\n if (options.direction & DIRECTION_HORIZONTAL) {\n direction = x === 0 ? DIRECTION_NONE : x < 0 ? DIRECTION_LEFT : DIRECTION_RIGHT;\n hasMoved = x !== this.pX;\n distance = Math.abs(input.deltaX);\n } else {\n direction = y === 0 ? DIRECTION_NONE : y < 0 ? DIRECTION_UP : DIRECTION_DOWN;\n hasMoved = y !== this.pY;\n distance = Math.abs(input.deltaY);\n }\n }\n\n input.direction = direction;\n return hasMoved && distance > options.threshold && direction & options.direction;\n };\n\n _proto.attrTest = function attrTest(input) {\n return AttrRecognizer.prototype.attrTest.call(this, input) && ( // replace with a super call\n this.state & STATE_BEGAN || !(this.state & STATE_BEGAN) && this.directionTest(input));\n };\n\n _proto.emit = function emit(input) {\n this.pX = input.deltaX;\n this.pY = input.deltaY;\n var direction = directionStr(input.direction);\n\n if (direction) {\n input.additionalEvent = this.options.event + direction;\n }\n\n _AttrRecognizer.prototype.emit.call(this, input);\n };\n\n return PanRecognizer;\n}(AttrRecognizer);\n\n/**\n * @private\n * Swipe\n * Recognized when the pointer is moving fast (velocity), with enough distance in the allowed direction.\n * @constructor\n * @extends AttrRecognizer\n */\n\nvar SwipeRecognizer =\n/*#__PURE__*/\nfunction (_AttrRecognizer) {\n _inheritsLoose(SwipeRecognizer, _AttrRecognizer);\n\n function SwipeRecognizer(options) {\n if (options === void 0) {\n options = {};\n }\n\n return _AttrRecognizer.call(this, _extends({\n event: 'swipe',\n threshold: 10,\n velocity: 0.3,\n direction: DIRECTION_HORIZONTAL | DIRECTION_VERTICAL,\n pointers: 1\n }, options)) || this;\n }\n\n var _proto = SwipeRecognizer.prototype;\n\n _proto.getTouchAction = function getTouchAction() {\n return PanRecognizer.prototype.getTouchAction.call(this);\n };\n\n _proto.attrTest = function attrTest(input) {\n var direction = this.options.direction;\n var velocity;\n\n if (direction & (DIRECTION_HORIZONTAL | DIRECTION_VERTICAL)) {\n velocity = input.overallVelocity;\n } else if (direction & DIRECTION_HORIZONTAL) {\n velocity = input.overallVelocityX;\n } else if (direction & DIRECTION_VERTICAL) {\n velocity = input.overallVelocityY;\n }\n\n return _AttrRecognizer.prototype.attrTest.call(this, input) && direction & input.offsetDirection && input.distance > this.options.threshold && input.maxPointers === this.options.pointers && abs(velocity) > this.options.velocity && input.eventType & INPUT_END;\n };\n\n _proto.emit = function emit(input) {\n var direction = directionStr(input.offsetDirection);\n\n if (direction) {\n this.manager.emit(this.options.event + direction, input);\n }\n\n this.manager.emit(this.options.event, input);\n };\n\n return SwipeRecognizer;\n}(AttrRecognizer);\n\n/**\n * @private\n * Pinch\n * Recognized when two or more pointers are moving toward (zoom-in) or away from each other (zoom-out).\n * @constructor\n * @extends AttrRecognizer\n */\n\nvar PinchRecognizer =\n/*#__PURE__*/\nfunction (_AttrRecognizer) {\n _inheritsLoose(PinchRecognizer, _AttrRecognizer);\n\n function PinchRecognizer(options) {\n if (options === void 0) {\n options = {};\n }\n\n return _AttrRecognizer.call(this, _extends({\n event: 'pinch',\n threshold: 0,\n pointers: 2\n }, options)) || this;\n }\n\n var _proto = PinchRecognizer.prototype;\n\n _proto.getTouchAction = function getTouchAction() {\n return [TOUCH_ACTION_NONE];\n };\n\n _proto.attrTest = function attrTest(input) {\n return _AttrRecognizer.prototype.attrTest.call(this, input) && (Math.abs(input.scale - 1) > this.options.threshold || this.state & STATE_BEGAN);\n };\n\n _proto.emit = function emit(input) {\n if (input.scale !== 1) {\n var inOut = input.scale < 1 ? 'in' : 'out';\n input.additionalEvent = this.options.event + inOut;\n }\n\n _AttrRecognizer.prototype.emit.call(this, input);\n };\n\n return PinchRecognizer;\n}(AttrRecognizer);\n\n/**\n * @private\n * Rotate\n * Recognized when two or more pointer are moving in a circular motion.\n * @constructor\n * @extends AttrRecognizer\n */\n\nvar RotateRecognizer =\n/*#__PURE__*/\nfunction (_AttrRecognizer) {\n _inheritsLoose(RotateRecognizer, _AttrRecognizer);\n\n function RotateRecognizer(options) {\n if (options === void 0) {\n options = {};\n }\n\n return _AttrRecognizer.call(this, _extends({\n event: 'rotate',\n threshold: 0,\n pointers: 2\n }, options)) || this;\n }\n\n var _proto = RotateRecognizer.prototype;\n\n _proto.getTouchAction = function getTouchAction() {\n return [TOUCH_ACTION_NONE];\n };\n\n _proto.attrTest = function attrTest(input) {\n return _AttrRecognizer.prototype.attrTest.call(this, input) && (Math.abs(input.rotation) > this.options.threshold || this.state & STATE_BEGAN);\n };\n\n return RotateRecognizer;\n}(AttrRecognizer);\n\n/**\n * @private\n * Press\n * Recognized when the pointer is down for x ms without any movement.\n * @constructor\n * @extends Recognizer\n */\n\nvar PressRecognizer =\n/*#__PURE__*/\nfunction (_Recognizer) {\n _inheritsLoose(PressRecognizer, _Recognizer);\n\n function PressRecognizer(options) {\n var _this;\n\n if (options === void 0) {\n options = {};\n }\n\n _this = _Recognizer.call(this, _extends({\n event: 'press',\n pointers: 1,\n time: 251,\n // minimal time of the pointer to be pressed\n threshold: 9\n }, options)) || this;\n _this._timer = null;\n _this._input = null;\n return _this;\n }\n\n var _proto = PressRecognizer.prototype;\n\n _proto.getTouchAction = function getTouchAction() {\n return [TOUCH_ACTION_AUTO];\n };\n\n _proto.process = function process(input) {\n var _this2 = this;\n\n var options = this.options;\n var validPointers = input.pointers.length === options.pointers;\n var validMovement = input.distance < options.threshold;\n var validTime = input.deltaTime > options.time;\n this._input = input; // we only allow little movement\n // and we've reached an end event, so a tap is possible\n\n if (!validMovement || !validPointers || input.eventType & (INPUT_END | INPUT_CANCEL) && !validTime) {\n this.reset();\n } else if (input.eventType & INPUT_START) {\n this.reset();\n this._timer = setTimeout(function () {\n _this2.state = STATE_RECOGNIZED;\n\n _this2.tryEmit();\n }, options.time);\n } else if (input.eventType & INPUT_END) {\n return STATE_RECOGNIZED;\n }\n\n return STATE_FAILED;\n };\n\n _proto.reset = function reset() {\n clearTimeout(this._timer);\n };\n\n _proto.emit = function emit(input) {\n if (this.state !== STATE_RECOGNIZED) {\n return;\n }\n\n if (input && input.eventType & INPUT_END) {\n this.manager.emit(this.options.event + \"up\", input);\n } else {\n this._input.timeStamp = now();\n this.manager.emit(this.options.event, this._input);\n }\n };\n\n return PressRecognizer;\n}(Recognizer);\n\n/**\n * @private\n * wrap a method with a deprecation warning and stack trace\n * @param {Function} method\n * @param {String} name\n * @param {String} message\n * @returns {Function} A new function wrapping the supplied method.\n */\nfunction deprecate(method, name, message) {\n var deprecationMessage = \"DEPRECATED METHOD: \" + name + \"\\n\" + message + \" AT \\n\";\n return function () {\n var e = new Error('get-stack-trace');\n var stack = e && e.stack ? e.stack.replace(/^[^\\(]+?[\\n$]/gm, '').replace(/^\\s+at\\s+/gm, '').replace(/^Object.\\s*\\(/gm, '{anonymous}()@') : 'Unknown Stack Trace';\n var log = window.console && (window.console.warn || window.console.log);\n\n if (log) {\n log.call(window.console, deprecationMessage, stack);\n }\n\n return method.apply(this, arguments);\n };\n}\n\n/**\n * @private\n * extend object.\n * means that properties in dest will be overwritten by the ones in src.\n * @param {Object} dest\n * @param {Object} src\n * @param {Boolean} [merge=false]\n * @returns {Object} dest\n */\n\nvar extend = deprecate(function (dest, src, merge) {\n var keys = Object.keys(src);\n var i = 0;\n\n while (i < keys.length) {\n if (!merge || merge && dest[keys[i]] === undefined) {\n dest[keys[i]] = src[keys[i]];\n }\n\n i++;\n }\n\n return dest;\n}, 'extend', 'Use `assign`.');\n\n/**\n * @private\n * merge the values from src in the dest.\n * means that properties that exist in dest will not be overwritten by src\n * @param {Object} dest\n * @param {Object} src\n * @returns {Object} dest\n */\n\nvar merge = deprecate(function (dest, src) {\n return extend(dest, src, true);\n}, 'merge', 'Use `assign`.');\n\n/**\n * @private\n * simple class inheritance\n * @param {Function} child\n * @param {Function} base\n * @param {Object} [properties]\n */\n\nfunction inherit(child, base, properties) {\n var baseP = base.prototype;\n var childP;\n childP = child.prototype = Object.create(baseP);\n childP.constructor = child;\n childP._super = baseP;\n\n if (properties) {\n assign$1(childP, properties);\n }\n}\n\n/**\n * @private\n * simple function bind\n * @param {Function} fn\n * @param {Object} context\n * @returns {Function}\n */\nfunction bindFn(fn, context) {\n return function boundFn() {\n return fn.apply(context, arguments);\n };\n}\n\n/**\n * @private\n * Simple way to create a manager with a default set of recognizers.\n * @param {HTMLElement} element\n * @param {Object} [options]\n * @constructor\n */\n\nvar Hammer =\n/*#__PURE__*/\nfunction () {\n var Hammer =\n /**\n * @private\n * @const {string}\n */\n function Hammer(element, options) {\n if (options === void 0) {\n options = {};\n }\n\n return new Manager(element, _extends({\n recognizers: [// RecognizerClass, options, [recognizeWith, ...], [requireFailure, ...]\n [RotateRecognizer, {\n enable: false\n }], [PinchRecognizer, {\n enable: false\n }, ['rotate']], [SwipeRecognizer, {\n direction: DIRECTION_HORIZONTAL\n }], [PanRecognizer, {\n direction: DIRECTION_HORIZONTAL\n }, ['swipe']], [TapRecognizer], [TapRecognizer, {\n event: 'doubletap',\n taps: 2\n }, ['tap']], [PressRecognizer]]\n }, options));\n };\n\n Hammer.VERSION = \"2.0.15\";\n Hammer.DIRECTION_ALL = DIRECTION_ALL;\n Hammer.DIRECTION_DOWN = DIRECTION_DOWN;\n Hammer.DIRECTION_LEFT = DIRECTION_LEFT;\n Hammer.DIRECTION_RIGHT = DIRECTION_RIGHT;\n Hammer.DIRECTION_UP = DIRECTION_UP;\n Hammer.DIRECTION_HORIZONTAL = DIRECTION_HORIZONTAL;\n Hammer.DIRECTION_VERTICAL = DIRECTION_VERTICAL;\n Hammer.DIRECTION_NONE = DIRECTION_NONE;\n Hammer.DIRECTION_DOWN = DIRECTION_DOWN;\n Hammer.INPUT_START = INPUT_START;\n Hammer.INPUT_MOVE = INPUT_MOVE;\n Hammer.INPUT_END = INPUT_END;\n Hammer.INPUT_CANCEL = INPUT_CANCEL;\n Hammer.STATE_POSSIBLE = STATE_POSSIBLE;\n Hammer.STATE_BEGAN = STATE_BEGAN;\n Hammer.STATE_CHANGED = STATE_CHANGED;\n Hammer.STATE_ENDED = STATE_ENDED;\n Hammer.STATE_RECOGNIZED = STATE_RECOGNIZED;\n Hammer.STATE_CANCELLED = STATE_CANCELLED;\n Hammer.STATE_FAILED = STATE_FAILED;\n Hammer.Manager = Manager;\n Hammer.Input = Input;\n Hammer.TouchAction = TouchAction;\n Hammer.TouchInput = TouchInput;\n Hammer.MouseInput = MouseInput;\n Hammer.PointerEventInput = PointerEventInput;\n Hammer.TouchMouseInput = TouchMouseInput;\n Hammer.SingleTouchInput = SingleTouchInput;\n Hammer.Recognizer = Recognizer;\n Hammer.AttrRecognizer = AttrRecognizer;\n Hammer.Tap = TapRecognizer;\n Hammer.Pan = PanRecognizer;\n Hammer.Swipe = SwipeRecognizer;\n Hammer.Pinch = PinchRecognizer;\n Hammer.Rotate = RotateRecognizer;\n Hammer.Press = PressRecognizer;\n Hammer.on = addEventListeners;\n Hammer.off = removeEventListeners;\n Hammer.each = each;\n Hammer.merge = merge;\n Hammer.extend = extend;\n Hammer.bindFn = bindFn;\n Hammer.assign = assign$1;\n Hammer.inherit = inherit;\n Hammer.bindFn = bindFn;\n Hammer.prefixed = prefixed;\n Hammer.toArray = toArray;\n Hammer.inArray = inArray;\n Hammer.uniqueArray = uniqueArray;\n Hammer.splitStr = splitStr;\n Hammer.boolOrFn = boolOrFn;\n Hammer.hasParent = hasParent;\n Hammer.addEventListeners = addEventListeners;\n Hammer.removeEventListeners = removeEventListeners;\n Hammer.defaults = defaults;\n return Hammer;\n}();\n\nexport default Hammer;\nexport { INPUT_START, INPUT_MOVE, INPUT_END, INPUT_CANCEL, STATE_POSSIBLE, STATE_BEGAN, STATE_CHANGED, STATE_ENDED, STATE_RECOGNIZED, STATE_CANCELLED, STATE_FAILED, DIRECTION_NONE, DIRECTION_LEFT, DIRECTION_RIGHT, DIRECTION_UP, DIRECTION_DOWN, DIRECTION_HORIZONTAL, DIRECTION_VERTICAL, DIRECTION_ALL, Manager, Input, TouchAction, TouchInput, MouseInput, PointerEventInput, TouchMouseInput, SingleTouchInput, Recognizer, AttrRecognizer, TapRecognizer as Tap, PanRecognizer as Pan, SwipeRecognizer as Swipe, PinchRecognizer as Pinch, RotateRecognizer as Rotate, PressRecognizer as Press, addEventListeners as on, removeEventListeners as off, each, merge, extend, assign$1 as assign, inherit, bindFn, prefixed, toArray, inArray, uniqueArray, splitStr, boolOrFn, hasParent, addEventListeners, removeEventListeners, defaults };\n//# sourceMappingURL=hammer.esm.js.map\n","/**\n * Setup a mock hammer.js object, for unit testing.\n *\n * Inspiration: https://github.com/uber/deck.gl/pull/658\n *\n * @returns {{on: noop, off: noop, destroy: noop, emit: noop, get: get}}\n */\nfunction hammerMock() {\n const noop = () => {};\n\n return {\n on: noop,\n off: noop,\n destroy: noop,\n emit: noop,\n\n get: function(m) {\t//eslint-disable-line no-unused-vars\n return {\n set: noop\n };\n }\n };\n}\n\n\nif (typeof window !== 'undefined') {\n var Hammer = window['Hammer'] || require('@egjs/hammerjs');\n module.exports = Hammer;\n}\nelse {\n module.exports = function () {\n // hammer.js is only available in a browser, not in node.js. Replacing it with a mock object.\n return hammerMock();\n }\n}\n","// English\nexports['en'] = {\n edit: 'Edit',\n del: 'Delete selected',\n back: 'Back',\n addNode: 'Add Node',\n addEdge: 'Add Edge',\n editNode: 'Edit Node',\n editEdge: 'Edit Edge',\n addDescription: 'Click in an empty space to place a new node.',\n edgeDescription: 'Click on a node and drag the edge to another node to connect them.',\n editEdgeDescription: 'Click on the control points and drag them to a node to connect to it.',\n createEdgeError: 'Cannot link edges to a cluster.',\n deleteClusterError: 'Clusters cannot be deleted.',\n editClusterError: 'Clusters cannot be edited.'\n};\nexports['en_EN'] = exports['en'];\nexports['en_US'] = exports['en'];\n\n// German\nexports['de'] = {\n edit: 'Editieren',\n del: 'L\\u00f6sche Auswahl',\n back: 'Zur\\u00fcck',\n addNode: 'Knoten hinzuf\\u00fcgen',\n addEdge: 'Kante hinzuf\\u00fcgen',\n editNode: 'Knoten editieren',\n editEdge: 'Kante editieren',\n addDescription: 'Klicke auf eine freie Stelle, um einen neuen Knoten zu plazieren.',\n edgeDescription: 'Klicke auf einen Knoten und ziehe die Kante zu einem anderen Knoten, um diese zu verbinden.',\n editEdgeDescription: 'Klicke auf die Verbindungspunkte und ziehe diese auf einen Knoten, um sie zu verbinden.',\n createEdgeError: 'Es ist nicht m\\u00f6glich, Kanten mit Clustern zu verbinden.',\n deleteClusterError: 'Cluster k\\u00f6nnen nicht gel\\u00f6scht werden.',\n editClusterError: 'Cluster k\\u00f6nnen nicht editiert werden.'\n};\nexports['de_DE'] = exports['de'];\n\n// Spanish\nexports['es'] = {\n edit: 'Editar',\n del: 'Eliminar selecci\\u00f3n',\n back: 'Atr\\u00e1s',\n addNode: 'A\\u00f1adir nodo',\n addEdge: 'A\\u00f1adir arista',\n editNode: 'Editar nodo',\n editEdge: 'Editar arista',\n addDescription: 'Haga clic en un lugar vac\\u00edo para colocar un nuevo nodo.',\n edgeDescription: 'Haga clic en un nodo y arrastre la arista hacia otro nodo para conectarlos.',\n editEdgeDescription: 'Haga clic en un punto de control y arrastrelo a un nodo para conectarlo.',\n createEdgeError: 'No se puede conectar una arista a un grupo.',\n deleteClusterError: 'No es posible eliminar grupos.',\n editClusterError: 'No es posible editar grupos.'\n};\nexports['es_ES'] = exports['es'];\n\n//Italiano\nexports['it'] = {\n edit: 'Modifica',\n del: 'Cancella la selezione',\n back: 'Indietro',\n addNode: 'Aggiungi un nodo',\n addEdge: 'Aggiungi un vertice',\n editNode: 'Modifica il nodo',\n editEdge: 'Modifica il vertice',\n addDescription: 'Clicca per aggiungere un nuovo nodo',\n edgeDescription: 'Clicca su un nodo e trascinalo ad un altro nodo per connetterli.',\n editEdgeDescription: 'Clicca sui Punti di controllo e trascinali ad un nodo per connetterli.',\n createEdgeError: 'Non si possono collegare vertici ad un cluster',\n deleteClusterError: 'I cluster non possono essere cancellati',\n editClusterError: 'I clusters non possono essere modificati.'\n};\nexports['it_IT'] = exports['it'];\n\n// Dutch\nexports['nl'] = {\n edit: 'Wijzigen',\n del: 'Selectie verwijderen',\n back: 'Terug',\n addNode: 'Node toevoegen',\n addEdge: 'Link toevoegen',\n editNode: 'Node wijzigen',\n editEdge: 'Link wijzigen',\n addDescription: 'Klik op een leeg gebied om een nieuwe node te maken.',\n edgeDescription: 'Klik op een node en sleep de link naar een andere node om ze te verbinden.',\n editEdgeDescription: 'Klik op de verbindingspunten en sleep ze naar een node om daarmee te verbinden.',\n createEdgeError: 'Kan geen link maken naar een cluster.',\n deleteClusterError: 'Clusters kunnen niet worden verwijderd.',\n editClusterError: 'Clusters kunnen niet worden aangepast.'\n};\nexports['nl_NL'] = exports['nl'];\nexports['nl_BE'] = exports['nl'];\n\n// Portuguese Brazil\nexports['pt-br'] = {\n edit: 'Editar',\n del: 'Remover selecionado',\n back: 'Voltar',\n addNode: 'Adicionar nó',\n addEdge: 'Adicionar aresta',\n editNode: 'Editar nó',\n editEdge: 'Editar aresta',\n addDescription: 'Clique em um espaço em branco para adicionar um novo nó',\n edgeDescription: 'Clique em um nó e arraste a aresta até outro nó para conectá-los',\n editEdgeDescription: 'Clique nos pontos de controle e os arraste para um nó para conectá-los',\n createEdgeError: 'Não foi possível linkar arestas a um cluster.',\n deleteClusterError: 'Clusters não puderam ser removidos.',\n editClusterError: 'Clusters não puderam ser editados.'\n};\nexports['pt-BR'] = exports['pt-br'];\nexports['pt_BR'] = exports['pt-br'];\nexports['pt_br'] = exports['pt-br'];\n\n// Russian\nexports['ru'] = {\n edit: 'Редактировать',\n del: 'Удалить выбранное',\n back: 'Назад',\n addNode: 'Добавить узел',\n addEdge: 'Добавить ребро',\n editNode: 'Редактировать узел',\n editEdge: 'Редактировать ребро',\n addDescription: 'Кликните в свободное место, чтобы добавить новый узел.',\n edgeDescription: 'Кликните на узел и протяните ребро к другому узлу, чтобы соединить их.',\n editEdgeDescription: 'Кликните на контрольные точки и перетащите их в узел, чтобы подключиться к нему.',\n createEdgeError: 'Невозможно соединить ребра в кластер.',\n deleteClusterError: 'Кластеры не могут быть удалены',\n editClusterError: 'Кластеры недоступны для редактирования.'\n};\nexports['ru_RU'] = exports['ru'];\n\n// Chinese\nexports['cn'] = {\n edit: '编辑',\n del: '删除选定',\n back: '返回',\n addNode: '添加节点',\n addEdge: '添加连接线',\n editNode: '编辑节点',\n editEdge: '编辑连接线',\n addDescription: '单击空白处放置新节点。',\n edgeDescription: '单击某个节点并将该连接线拖动到另一个节点以连接它们。',\n editEdgeDescription: '单击控制节点并将它们拖到节点上连接。',\n createEdgeError: '无法将连接线连接到群集。',\n deleteClusterError: '无法删除群集。',\n editClusterError: '无法编辑群集。'\n};\nexports['zh_CN'] = exports['cn'];\n\n// Ukrainian\nexports['uk'] = {\n edit: 'Редагувати',\n del: 'Видалити обране',\n back: 'Назад',\n addNode: 'Додати вузол',\n addEdge: 'Додати край',\n editNode: 'Редагувати вузол',\n editEdge: 'Редагувати край',\n addDescription: 'Kлікніть на вільне місце, щоб додати новий вузол.',\n edgeDescription: 'Клікніть на вузол і перетягніть край до іншого вузла, щоб їх з\\'єднати.',\n editEdgeDescription: 'Клікніть на контрольні точки і перетягніть їх у вузол, щоб підключитися до нього.',\n createEdgeError: 'Не можливо об\\'єднати краї в групу.',\n deleteClusterError: 'Групи не можуть бути видалені.',\n editClusterError: 'Групи недоступні для редагування.'\n};\nexports['uk_UA'] = exports['uk'];\n\n// French\nexports['fr'] = {\n edit: 'Editer',\n del: 'Effacer la selection',\n back: 'Retour',\n addNode: 'Ajouter un noeud',\n addEdge: 'Ajouter un lien',\n editNode: 'Editer le noeud',\n editEdge: 'Editer le lien',\n addDescription: 'Cliquez dans un endroit vide pour placer un noeud.',\n edgeDescription: 'Cliquez sur un noeud et glissez le lien vers un autre noeud pour les connecter.',\n editEdgeDescription: 'Cliquez sur les points de contrôle et glissez-les pour connecter un noeud.',\n createEdgeError: 'Impossible de créer un lien vers un cluster.',\n deleteClusterError: 'Les clusters ne peuvent pas être éffacés.',\n editClusterError: 'Les clusters ne peuvent pas être édites.'\n};\nexports['fr_FR'] = exports['fr'];\n\n// Czech\nexports['cs'] = {\n edit: 'Upravit',\n del: 'Smazat výběr',\n back: 'Zpět',\n addNode: 'Přidat vrchol',\n addEdge: 'Přidat hranu',\n editNode: 'Upravit vrchol',\n editEdge: 'Upravit hranu',\n addDescription: 'Kluknutím do prázdného prostoru můžete přidat nový vrchol.',\n edgeDescription: 'Přetažením z jednoho vrcholu do druhého můžete spojit tyto vrcholy novou hranou.',\n editEdgeDescription: 'Přetažením kontrolního vrcholu hrany ji můžete připojit k jinému vrcholu.',\n createEdgeError: 'Nelze připojit hranu ke shluku.',\n deleteClusterError: 'Nelze mazat shluky.',\n editClusterError: 'Nelze upravovat shluky.'\n};\nexports['cs_CZ'] = exports['cs'];\n","function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nmodule.exports = _classCallCheck;","\n/**\n * Associates a canvas to a given image, containing a number of renderings\n * of the image at various sizes.\n *\n * This technique is known as 'mipmapping'.\n *\n * NOTE: Images can also be of type 'data:svg+xml`. This code also works\n * for svg, but the mipmapping may not be necessary.\n *\n * @param {Image} image\n */\nclass CachedImage {\n /**\n * @ignore\n */ \n constructor() { // eslint-disable-line no-unused-vars\n this.NUM_ITERATIONS = 4; // Number of items in the coordinates array\n\n this.image = new Image();\n this.canvas = document.createElement('canvas');\n }\n\n\n /**\n * Called when the image has been successfully loaded.\n */\n init() {\n if (this.initialized()) return;\n\n this.src = this.image.src; // For same interface with Image\n var w = this.image.width;\n var h = this.image.height;\n\n // Ease external access\n this.width = w;\n this.height = h;\n\n var h2 = Math.floor(h/2);\n var h4 = Math.floor(h/4);\n var h8 = Math.floor(h/8);\n var h16 = Math.floor(h/16);\n\n var w2 = Math.floor(w/2);\n var w4 = Math.floor(w/4);\n var w8 = Math.floor(w/8);\n var w16 = Math.floor(w/16);\n\n // Make canvas as small as possible\n this.canvas.width = 3*w4;\n this.canvas.height = h2;\n\n // Coordinates and sizes of images contained in the canvas\n // Values per row: [top x, left y, width, height]\n\n this.coordinates = [\n [ 0 , 0 , w2 , h2],\n [ w2 , 0 , w4 , h4],\n [ w2 , h4, w8 , h8],\n [ 5*w8, h4, w16, h16]\n ];\n\n this._fillMipMap();\n }\n\n\n /**\n * @return {Boolean} true if init() has been called, false otherwise.\n */\n initialized() {\n return (this.coordinates !== undefined);\n }\n\n\n /**\n * Redraw main image in various sizes to the context.\n *\n * The rationale behind this is to reduce artefacts due to interpolation\n * at differing zoom levels.\n *\n * Source: http://stackoverflow.com/q/18761404/1223531\n *\n * This methods takes the resizing out of the drawing loop, in order to\n * reduce performance overhead.\n *\n * TODO: The code assumes that a 2D context can always be gotten. This is\n * not necessarily true! OTOH, if not true then usage of this class\n * is senseless.\n *\n * @private\n */\n _fillMipMap() {\n var ctx = this.canvas.getContext('2d');\n\n // First zoom-level comes from the image\n var to = this.coordinates[0];\n ctx.drawImage(this.image, to[0], to[1], to[2], to[3]);\n\n // The rest are copy actions internal to the canvas/context\n for (let iterations = 1; iterations < this.NUM_ITERATIONS; iterations++) {\n let from = this.coordinates[iterations - 1];\n let to = this.coordinates[iterations];\n\n ctx.drawImage(this.canvas,\n from[0], from[1], from[2], from[3],\n to[0], to[1], to[2], to[3]\n );\n }\n }\n\n\n /**\n * Draw the image, using the mipmap if necessary.\n *\n * MipMap is only used if param factor > 2; otherwise, original bitmap\n * is resized. This is also used to skip mipmap usage, e.g. by setting factor = 1\n *\n * Credits to 'Alex de Mulder' for original implementation.\n *\n * @param {CanvasRenderingContext2D} ctx context on which to draw zoomed image\n * @param {Float} factor scale factor at which to draw\n * @param {number} left\n * @param {number} top\n * @param {number} width\n * @param {number} height\n */\n drawImageAtPosition(ctx, factor, left, top, width, height) {\n\n if(!this.initialized())\n return; //can't draw image yet not intialized\n\n if (factor > 2) {\n // Determine which zoomed image to use\n factor *= 0.5;\n let iterations = 0;\n while (factor > 2 && iterations < this.NUM_ITERATIONS) {\n factor *= 0.5;\n iterations += 1;\n }\n\n if (iterations >= this.NUM_ITERATIONS) {\n iterations = this.NUM_ITERATIONS - 1;\n }\n //console.log(\"iterations: \" + iterations);\n\n let from = this.coordinates[iterations];\n ctx.drawImage(this.canvas,\n from[0], from[1], from[2], from[3],\n left, top, width, height\n );\n } else {\n // Draw image directly\n ctx.drawImage(this.image, left, top, width, height);\n }\n }\n\n}\n\n\nexport default CachedImage;\n","import CachedImage from './CachedImage';\n\n/**\n * This callback is a callback that accepts an Image.\n * @callback ImageCallback\n * @param {Image} image\n */\n\n/**\n * This class loads images and keeps them stored.\n *\n * @param {ImageCallback} callback\n */\nclass Images {\n /**\n * @param {ImageCallback} callback\n */\n constructor(callback){\n this.images = {};\n this.imageBroken = {};\n this.callback = callback;\n }\n \n /**\n * @param {string} url The original Url that failed to load, if the broken image is successfully loaded it will be added to the cache using this Url as the key so that subsequent requests for this Url will return the broken image\n * @param {string} brokenUrl Url the broken image to try and load\n * @param {Image} imageToLoadBrokenUrlOn The image object\n */ \n _tryloadBrokenUrl (url, brokenUrl, imageToLoadBrokenUrlOn) {\n //If these parameters aren't specified then exit the function because nothing constructive can be done\n if (url === undefined || imageToLoadBrokenUrlOn === undefined) return;\n if (brokenUrl === undefined) {\n console.warn(\"No broken url image defined\");\n return;\n }\n \n //Clear the old subscription to the error event and put a new in place that only handle errors in loading the brokenImageUrl\n imageToLoadBrokenUrlOn.image.onerror = () => {\n console.error(\"Could not load brokenImage:\", brokenUrl);\n // cache item will contain empty image, this should be OK for default\n };\n \n //Set the source of the image to the brokenUrl, this is actually what kicks off the loading of the broken image\n imageToLoadBrokenUrlOn.image.src = brokenUrl;\n }\n \n /**\n *\n * @param {vis.Image} imageToRedrawWith\n * @private\n */\n _redrawWithImage (imageToRedrawWith) {\n if (this.callback) {\n this.callback(imageToRedrawWith);\n }\n }\n \n /**\n * @param {string} url Url of the image\n * @param {string} brokenUrl Url of an image to use if the url image is not found\n * @return {Image} img The image object\n */ \n load (url, brokenUrl) {\n //Try and get the image from the cache, if successful then return the cached image \n var cachedImage = this.images[url]; \n if (cachedImage) return cachedImage;\n \n //Create a new image\n var img = new CachedImage();\n\n // Need to add to cache here, otherwise final return will spawn different copies of the same image,\n // Also, there will be multiple loads of the same image.\n this.images[url] = img; \n \n //Subscribe to the event that is raised if the image loads successfully \n img.image.onload = () => {\n // Properly init the cached item and then request a redraw\n this._fixImageCoordinates(img.image);\n img.init();\n this._redrawWithImage(img);\n };\n \n //Subscribe to the event that is raised if the image fails to load\n img.image.onerror = () => {\n console.error(\"Could not load image:\", url);\n //Try and load the image specified by the brokenUrl using\n this._tryloadBrokenUrl(url, brokenUrl, img);\n };\n \n //Set the source of the image to the url, this is what actually kicks off the loading of the image\n img.image.src = url;\n \n //Return the new image\n return img;\n }\n\n\n /**\n * IE11 fix -- thanks dponch!\n *\n * Local helper function\n * @param {vis.Image} imageToCache\n * @private\n */\n _fixImageCoordinates(imageToCache) {\n if (imageToCache.width === 0) {\n document.body.appendChild(imageToCache);\n imageToCache.width = imageToCache.offsetWidth;\n imageToCache.height = imageToCache.offsetHeight;\n document.body.removeChild(imageToCache);\n }\n }\n}\n\nexport default Images;\n","import util from 'vis-util';\n\n/**\n * This class can store groups and options specific for groups.\n */\nclass Groups {\n /**\n * @ignore\n */\n constructor() {\n this.clear();\n this.defaultIndex = 0;\n this.groupsArray = [];\n this.groupIndex = 0;\n\n this.defaultGroups = [\n {border: \"#2B7CE9\", background: \"#97C2FC\", highlight: {border: \"#2B7CE9\", background: \"#D2E5FF\"}, hover: {border: \"#2B7CE9\", background: \"#D2E5FF\"}}, // 0: blue\n {border: \"#FFA500\", background: \"#FFFF00\", highlight: {border: \"#FFA500\", background: \"#FFFFA3\"}, hover: {border: \"#FFA500\", background: \"#FFFFA3\"}}, // 1: yellow\n {border: \"#FA0A10\", background: \"#FB7E81\", highlight: {border: \"#FA0A10\", background: \"#FFAFB1\"}, hover: {border: \"#FA0A10\", background: \"#FFAFB1\"}}, // 2: red\n {border: \"#41A906\", background: \"#7BE141\", highlight: {border: \"#41A906\", background: \"#A1EC76\"}, hover: {border: \"#41A906\", background: \"#A1EC76\"}}, // 3: green\n {border: \"#E129F0\", background: \"#EB7DF4\", highlight: {border: \"#E129F0\", background: \"#F0B3F5\"}, hover: {border: \"#E129F0\", background: \"#F0B3F5\"}}, // 4: magenta\n {border: \"#7C29F0\", background: \"#AD85E4\", highlight: {border: \"#7C29F0\", background: \"#D3BDF0\"}, hover: {border: \"#7C29F0\", background: \"#D3BDF0\"}}, // 5: purple\n {border: \"#C37F00\", background: \"#FFA807\", highlight: {border: \"#C37F00\", background: \"#FFCA66\"}, hover: {border: \"#C37F00\", background: \"#FFCA66\"}}, // 6: orange\n {border: \"#4220FB\", background: \"#6E6EFD\", highlight: {border: \"#4220FB\", background: \"#9B9BFD\"}, hover: {border: \"#4220FB\", background: \"#9B9BFD\"}}, // 7: darkblue\n {border: \"#FD5A77\", background: \"#FFC0CB\", highlight: {border: \"#FD5A77\", background: \"#FFD1D9\"}, hover: {border: \"#FD5A77\", background: \"#FFD1D9\"}}, // 8: pink\n {border: \"#4AD63A\", background: \"#C2FABC\", highlight: {border: \"#4AD63A\", background: \"#E6FFE3\"}, hover: {border: \"#4AD63A\", background: \"#E6FFE3\"}}, // 9: mint\n\n {border: \"#990000\", background: \"#EE0000\", highlight: {border: \"#BB0000\", background: \"#FF3333\"}, hover: {border: \"#BB0000\", background: \"#FF3333\"}}, // 10:bright red\n\n {border: \"#FF6000\", background: \"#FF6000\", highlight: {border: \"#FF6000\", background: \"#FF6000\"}, hover: {border: \"#FF6000\", background: \"#FF6000\"}}, // 12: real orange\n {border: \"#97C2FC\", background: \"#2B7CE9\", highlight: {border: \"#D2E5FF\", background: \"#2B7CE9\"}, hover: {border: \"#D2E5FF\", background: \"#2B7CE9\"}}, // 13: blue\n {border: \"#399605\", background: \"#255C03\", highlight: {border: \"#399605\", background: \"#255C03\"}, hover: {border: \"#399605\", background: \"#255C03\"}}, // 14: green\n {border: \"#B70054\", background: \"#FF007E\", highlight: {border: \"#B70054\", background: \"#FF007E\"}, hover: {border: \"#B70054\", background: \"#FF007E\"}}, // 15: magenta\n {border: \"#AD85E4\", background: \"#7C29F0\", highlight: {border: \"#D3BDF0\", background: \"#7C29F0\"}, hover: {border: \"#D3BDF0\", background: \"#7C29F0\"}}, // 16: purple\n {border: \"#4557FA\", background: \"#000EA1\", highlight: {border: \"#6E6EFD\", background: \"#000EA1\"}, hover: {border: \"#6E6EFD\", background: \"#000EA1\"}}, // 17: darkblue\n {border: \"#FFC0CB\", background: \"#FD5A77\", highlight: {border: \"#FFD1D9\", background: \"#FD5A77\"}, hover: {border: \"#FFD1D9\", background: \"#FD5A77\"}}, // 18: pink\n {border: \"#C2FABC\", background: \"#74D66A\", highlight: {border: \"#E6FFE3\", background: \"#74D66A\"}, hover: {border: \"#E6FFE3\", background: \"#74D66A\"}}, // 19: mint\n\n {border: \"#EE0000\", background: \"#990000\", highlight: {border: \"#FF3333\", background: \"#BB0000\"}, hover: {border: \"#FF3333\", background: \"#BB0000\"}} // 20:bright red\n ];\n\n this.options = {};\n this.defaultOptions = {\n useDefaultGroups: true\n };\n util.extend(this.options, this.defaultOptions);\n }\n\n /**\n *\n * @param {Object} options\n */\n setOptions(options) {\n let optionFields = ['useDefaultGroups'];\n\n if (options !== undefined) {\n for (let groupName in options) {\n if (options.hasOwnProperty(groupName)) {\n if (optionFields.indexOf(groupName) === -1) {\n let group = options[groupName];\n this.add(groupName, group);\n }\n }\n }\n }\n }\n\n \n /**\n * Clear all groups\n */\n clear() {\n this.groups = {};\n this.groupsArray = [];\n }\n \n /**\n * Get group options of a groupname.\n * If groupname is not found, a new group may be created.\n *\n * @param {*} groupname Can be a number, string, Date, etc.\n * @param {boolean} [shouldCreate=true] If true, create a new group\n * @return {Object} The found or created group\n */\n get(groupname, shouldCreate = true) {\n let group = this.groups[groupname];\n\n if (group === undefined && shouldCreate) {\n if (this.options.useDefaultGroups === false && this.groupsArray.length > 0) {\n // create new group\n let index = this.groupIndex % this.groupsArray.length;\n this.groupIndex++;\n group = {};\n group.color = this.groups[this.groupsArray[index]];\n this.groups[groupname] = group;\n }\n else {\n // create new group\n let index = this.defaultIndex % this.defaultGroups.length;\n this.defaultIndex++;\n group = {};\n group.color = this.defaultGroups[index];\n this.groups[groupname] = group;\n }\n }\n \n return group;\n }\n \n /**\n * Add a custom group style\n * @param {string} groupName\n * @param {Object} style An object containing borderColor,\n * backgroundColor, etc.\n * @return {Object} group The created group object\n */\n add(groupName, style) {\n this.groups[groupName] = style;\n this.groupsArray.push(groupName);\n return style;\n }\n}\n\nexport default Groups;\n","function _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n\nmodule.exports = _arrayWithHoles;","function _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance\");\n}\n\nmodule.exports = _nonIterableRest;","function _typeof2(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof2 = function _typeof2(obj) { return typeof obj; }; } else { _typeof2 = function _typeof2(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof2(obj); }\n\nfunction _typeof(obj) {\n if (typeof Symbol === \"function\" && _typeof2(Symbol.iterator) === \"symbol\") {\n module.exports = _typeof = function _typeof(obj) {\n return _typeof2(obj);\n };\n } else {\n module.exports = _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : _typeof2(obj);\n };\n }\n\n return _typeof(obj);\n}\n\nmodule.exports = _typeof;","import util from 'vis-util';\n\n/**\n * Helper functions for components\n * @class\n */\nclass ComponentUtil {\n /**\n * Determine values to use for (sub)options of 'chosen'.\n *\n * This option is either a boolean or an object whose values should be examined further.\n * The relevant structures are:\n *\n * - chosen: \n * - chosen: { subOption: }\n *\n * Where subOption is 'node', 'edge' or 'label'.\n *\n * The intention of this method appears to be to set a specific priority to the options;\n * Since most properties are either bridged or merged into the local options objects, there\n * is not much point in handling them separately.\n * TODO: examine if 'most' in previous sentence can be replaced with 'all'. In that case, we\n * should be able to get rid of this method.\n *\n * @param {string} subOption option within object 'chosen' to consider; either 'node', 'edge' or 'label'\n * @param {Object} pile array of options objects to consider\n * \n * @return {boolean|function} value for passed subOption of 'chosen' to use\n */\n static choosify(subOption, pile) {\n // allowed values for subOption\n let allowed = [ 'node', 'edge', 'label'];\n let value = true;\n\n let chosen = util.topMost(pile, 'chosen');\n if (typeof chosen === 'boolean') {\n value = chosen;\n } else if (typeof chosen === 'object') {\n if (allowed.indexOf(subOption) === -1 ) {\n throw new Error('choosify: subOption \\'' + subOption + '\\' should be one of '\n + \"'\" + allowed.join(\"', '\") + \"'\");\n }\n\n let chosenEdge = util.topMost(pile, ['chosen', subOption]);\n if ((typeof chosenEdge === 'boolean') || (typeof chosenEdge === 'function')) {\n value = chosenEdge;\n }\n }\n\n return value;\n }\n\n\n /**\n * Check if the point falls within the given rectangle.\n *\n * @param {rect} rect\n * @param {point} point\n * @param {rotationPoint} [rotationPoint] if specified, the rotation that applies to the rectangle.\n * @returns {boolean} true if point within rectangle, false otherwise\n * @static\n */\n static pointInRect(rect, point, rotationPoint) {\n if (rect.width <= 0 || rect.height <= 0) {\n return false; // early out\n }\n\n if (rotationPoint !== undefined) {\n // Rotate the point the same amount as the rectangle\n var tmp = {\n x: point.x - rotationPoint.x,\n y: point.y - rotationPoint.y\n };\n\n if (rotationPoint.angle !== 0) {\n // In order to get the coordinates the same, you need to \n // rotate in the reverse direction\n var angle = -rotationPoint.angle;\n\n var tmp2 = {\n x: Math.cos(angle)*tmp.x - Math.sin(angle)*tmp.y,\n y: Math.sin(angle)*tmp.x + Math.cos(angle)*tmp.y\n };\n point = tmp2;\n } else {\n point = tmp;\n }\n\n // Note that if a rotation is specified, the rectangle coordinates\n // are **not* the full canvas coordinates. They are relative to the\n // rotationPoint. Hence, the point coordinates need not be translated\n // back in this case.\n }\n\n var right = rect.x + rect.width;\n var bottom = rect.y + rect.width;\n\n return (\n rect.left < point.x &&\n right > point.x &&\n rect.top < point.y &&\n bottom > point.y\n );\n }\n\n\n /**\n * Check if given value is acceptable as a label text.\n *\n * @param {*} text value to check; can be anything at this point\n * @returns {boolean} true if valid label value, false otherwise\n */\n static isValidLabel(text) {\n // Note that this is quite strict: types that *might* be converted to string are disallowed\n return (typeof text === 'string' && text !== '');\n }\n}\n\nexport default ComponentUtil;\n","/**\n * Callback to determine text dimensions, using the parent label settings.\n * @callback MeasureText\n * @param {text} text\n * @param {text} mod\n * @return {Object} { width, values} width in pixels and font attributes\n */\n\n\n/**\n * Helper class for Label which collects results of splitting labels into lines and blocks.\n *\n * @private\n */\nclass LabelAccumulator {\n\n /**\n * @param {MeasureText} measureText\n */\n constructor(measureText) {\n this.measureText = measureText;\n this.current = 0;\n this.width = 0;\n this.height = 0;\n this.lines = [];\n }\n\n\n /**\n * Append given text to the given line.\n *\n * @param {number} l index of line to add to\n * @param {string} text string to append to line\n * @param {'bold'|'ital'|'boldital'|'mono'|'normal'} [mod='normal']\n * @private\n */\n _add(l, text, mod = 'normal') { \n\n if (this.lines[l] === undefined) {\n this.lines[l] = {\n width : 0,\n height: 0,\n blocks: []\n };\n }\n\n // We still need to set a block for undefined and empty texts, hence return at this point\n // This is necessary because we don't know at this point if we're at the\n // start of an empty line or not.\n // To compensate, empty blocks are removed in `finalize()`.\n //\n // Empty strings should still have a height\n let tmpText = text;\n if (text === undefined || text === \"\") tmpText = \" \";\n\n // Determine width and get the font properties\n let result = this.measureText(tmpText, mod);\n let block = Object.assign({}, result.values);\n block.text = text;\n block.width = result.width;\n block.mod = mod;\n\n if (text === undefined || text === \"\") {\n block.width = 0;\n }\n\n this.lines[l].blocks.push(block);\n\n // Update the line width. We need this for determining if a string goes over max width\n this.lines[l].width += block.width;\n }\n\n\n /**\n * Returns the width in pixels of the current line.\n *\n * @returns {number}\n */\n curWidth() {\n let line = this.lines[this.current];\n if (line === undefined) return 0;\n\n return line.width;\n }\n\n\n /**\n * Add text in block to current line\n *\n * @param {string} text\n * @param {'bold'|'ital'|'boldital'|'mono'|'normal'} [mod='normal']\n */\n append(text, mod = 'normal') { \n this._add(this.current, text, mod);\n }\n\n\n /**\n * Add text in block to current line and start a new line\n *\n * @param {string} text\n * @param {'bold'|'ital'|'boldital'|'mono'|'normal'} [mod='normal']\n */\n newLine(text, mod = 'normal') {\n this._add(this.current, text, mod);\n this.current++;\n }\n\n\n /**\n * Determine and set the heights of all the lines currently contained in this instance\n *\n * Note that width has already been set.\n * \n * @private\n */\n determineLineHeights() {\n for (let k = 0; k < this.lines.length; k++) {\n let line = this.lines[k];\n\n // Looking for max height of blocks in line\n let height = 0;\n\n if (line.blocks !== undefined) { // Can happen if text contains e.g. '\\n '\n for (let l = 0; l < line.blocks.length; l++) {\n let block = line.blocks[l];\n\n if (height < block.height) {\n height = block.height;\n }\n }\n }\n \n line.height = height;\n }\n }\n\n\n /**\n * Determine the full size of the label text, as determined by current lines and blocks\n * \n * @private\n */\n determineLabelSize() {\n let width = 0;\n let height = 0;\n for (let k = 0; k < this.lines.length; k++) {\n let line = this.lines[k];\n\n if (line.width > width) {\n width = line.width;\n }\n height += line.height;\n }\n\n this.width = width;\n this.height = height;\n }\n\n\n /**\n * Remove all empty blocks and empty lines we don't need\n * \n * This must be done after the width/height determination,\n * so that these are set properly for processing here.\n *\n * @returns {Array} Lines with empty blocks (and some empty lines) removed\n * @private\n */\n removeEmptyBlocks() {\n let tmpLines = [];\n for (let k = 0; k < this.lines.length; k++) {\n let line = this.lines[k];\n\n // Note: an empty line in between text has width zero but is still relevant to layout.\n // So we can't use width for testing empty line here\n if (line.blocks.length === 0) continue;\n\n // Discard final empty line always\n if(k === this.lines.length - 1) {\n if (line.width === 0) continue;\n }\n\n let tmpLine = {};\n Object.assign(tmpLine, line);\n tmpLine.blocks = [];\n\n let firstEmptyBlock;\n let tmpBlocks = []\n for (let l = 0; l < line.blocks.length; l++) {\n let block = line.blocks[l];\n if (block.width !== 0) {\n tmpBlocks.push(block);\n } else {\n if (firstEmptyBlock === undefined) {\n firstEmptyBlock = block;\n }\n }\n }\n\n // Ensure that there is *some* text present\n if (tmpBlocks.length === 0 && firstEmptyBlock !== undefined) {\n tmpBlocks.push(firstEmptyBlock);\n }\n\n tmpLine.blocks = tmpBlocks;\n\n tmpLines.push(tmpLine);\n }\n\n return tmpLines;\n }\n\n\n /**\n * Set the sizes for all lines and the whole thing.\n *\n * @returns {{width: (number|*), height: (number|*), lines: Array}}\n */\n finalize() {\n //console.log(JSON.stringify(this.lines, null, 2));\n\n this.determineLineHeights();\n this.determineLabelSize();\n let tmpLines = this.removeEmptyBlocks();\n\n\n // Return a simple hash object for further processing.\n return {\n width : this.width,\n height: this.height,\n lines : tmpLines\n }\n }\n} \n\n\nexport default LabelAccumulator;\n","import LabelAccumulator from './LabelAccumulator';\nimport ComponentUtil from './ComponentUtil';\n\n// Hash of prepared regexp's for tags\nvar tagPattern = {\n // HTML\n '': //,\n '': //,\n '': //,\n '': /<\\/b>/,\n '': /<\\/i>/,\n '': /<\\/code>/,\n // Markdown\n '*': /\\*/, // bold\n '_': /\\_/, // ital\n '`': /`/, // mono\n 'afterBold': /[^\\*]/,\n 'afterItal': /[^_]/,\n 'afterMono': /[^`]/,\n};\n\n\n/**\n * Internal helper class for parsing the markup tags for HTML and Markdown.\n *\n * NOTE: Sequences of tabs and spaces are reduced to single space.\n * Scan usage of `this.spacing` within method\n */\nclass MarkupAccumulator {\n\n /**\n * Create an instance\n *\n * @param {string} text text to parse for markup\n */\n constructor(text) {\n this.text = text;\n this.bold = false;\n this.ital = false;\n this.mono = false;\n this.spacing = false;\n this.position = 0;\n this.buffer = \"\";\n this.modStack = [];\n\n this.blocks = [];\n }\n\n\n /**\n * Return the mod label currently on the top of the stack\n *\n * @returns {string} label of topmost mod \n * @private\n */\n mod() {\n return (this.modStack.length === 0) ? 'normal' : this.modStack[0];\n }\n\n\n /**\n * Return the mod label currently active\n * \n * @returns {string} label of active mod \n * @private\n */\n modName() {\n if (this.modStack.length === 0)\n return 'normal';\n else if (this.modStack[0] === 'mono')\n return 'mono';\n else {\n if (this.bold && this.ital) {\n return 'boldital';\n } else if (this.bold) {\n return 'bold';\n } else if (this.ital) {\n return 'ital';\n }\n }\n }\n\n\n /**\n * @private\n */\n emitBlock() {\n if (this.spacing) {\n this.add(\" \");\n this.spacing = false;\n }\n if (this.buffer.length > 0) {\n this.blocks.push({ text: this.buffer, mod: this.modName() });\n this.buffer = \"\";\n }\n }\n\n\n /**\n * Output text to buffer\n *\n * @param {string} text text to add\n * @private\n */\n add(text) {\n if (text === \" \") {\n this.spacing = true;\n }\n if (this.spacing) {\n this.buffer += \" \";\n this.spacing = false;\n }\n if (text != \" \") {\n this.buffer += text;\n }\n }\n\n\n /**\n * Handle parsing of whitespace\n *\n * @param {string} ch the character to check\n * @returns {boolean} true if the character was processed as whitespace, false otherwise\n */\n parseWS(ch) {\n if (/[ \\t]/.test(ch)) {\n if (!this.mono) {\n this.spacing = true;\n } else {\n this.add(ch);\n }\n return true;\n }\n\n return false;\n }\n\n\n /**\n * @param {string} tagName label for block type to set\n * @private\n */\n setTag(tagName) {\n this.emitBlock();\n this[tagName] = true;\n this.modStack.unshift(tagName);\n }\n\n\n /**\n * @param {string} tagName label for block type to unset\n * @private\n */\n unsetTag(tagName) {\n this.emitBlock();\n this[tagName] = false;\n this.modStack.shift();\n }\n\n\n /**\n * @param {string} tagName label for block type we are currently processing\n * @param {string|RegExp} tag string to match in text\n * @returns {boolean} true if the tag was processed, false otherwise\n */\n parseStartTag(tagName, tag) {\n // Note: if 'mono' passed as tagName, there is a double check here. This is OK\n if (!this.mono && !this[tagName] && this.match(tag)) {\n this.setTag(tagName);\n return true;\n }\n\n return false;\n }\n\n\n /**\n * @param {string|RegExp} tag\n * @param {number} [advance=true] if set, advance current position in text\n * @returns {boolean} true if match at given position, false otherwise\n * @private\n */\n match(tag, advance = true) {\n let [regExp, length] = this.prepareRegExp(tag);\n let matched = regExp.test(this.text.substr(this.position, length));\n\n if (matched && advance) {\n this.position += length - 1;\n }\n\n return matched;\n }\n\n\n /**\n * @param {string} tagName label for block type we are currently processing\n * @param {string|RegExp} tag string to match in text\n * @param {RegExp} [nextTag] regular expression to match for characters *following* the current tag \n * @returns {boolean} true if the tag was processed, false otherwise\n */\n parseEndTag(tagName, tag, nextTag) {\n let checkTag = (this.mod() === tagName);\n if (tagName === 'mono') { // special handling for 'mono'\n checkTag = checkTag && this.mono;\n } else {\n checkTag = checkTag && !this.mono;\n }\n\n if (checkTag && this.match(tag)) {\n if (nextTag !== undefined) {\n // Purpose of the following match is to prevent a direct unset/set of a given tag\n // E.g. '*bold **still bold*' => '*bold still bold*'\n if ((this.position === this.text.length-1) || this.match(nextTag, false)) {\n this.unsetTag(tagName);\n }\n } else {\n this.unsetTag(tagName);\n }\n\n return true;\n }\n\n return false;\n }\n\n\n /**\n * @param {string|RegExp} tag string to match in text\n * @param {value} value string to replace tag with, if found at current position\n * @returns {boolean} true if the tag was processed, false otherwise\n */\n replace(tag, value) {\n if (this.match(tag)) {\n this.add(value);\n this.position += length - 1;\n return true;\n }\n\n return false;\n }\n\n\n /**\n * Create a regular expression for the tag if it isn't already one.\n *\n * The return value is an array `[RegExp, number]`, with exactly two value, where:\n * - RegExp is the regular expression to use\n * - number is the lenth of the input string to match\n *\n * @param {string|RegExp} tag string to match in text\n * @returns {Array} regular expression to use and length of input string to match\n * @private\n */\n prepareRegExp(tag) {\n let length;\n let regExp;\n if (tag instanceof RegExp) {\n regExp = tag;\n length = 1; // ASSUMPTION: regexp only tests one character\n } else {\n // use prepared regexp if present\n var prepared = tagPattern[tag];\n if (prepared !== undefined) {\n regExp = prepared;\n } else {\n regExp = new RegExp(tag);\n }\n\n length = tag.length;\n }\n\n return [regExp, length];\n }\n}\n\n\n/**\n * Helper class for Label which explodes the label text into lines and blocks within lines\n *\n * @private\n */\nclass LabelSplitter {\n\n /**\n * @param {CanvasRenderingContext2D} ctx Canvas rendering context\n * @param {Label} parent reference to the Label instance using current instance\n * @param {boolean} selected \n * @param {boolean} hover\n */\n constructor(ctx, parent, selected, hover) {\n this.ctx = ctx;\n this.parent = parent;\n this.selected = selected;\n this.hover = hover;\n\n /**\n * Callback to determine text width; passed to LabelAccumulator instance\n *\n * @param {String} text string to determine width of\n * @param {String} mod font type to use for this text\n * @return {Object} { width, values} width in pixels and font attributes\n */\n let textWidth = (text, mod) => {\n if (text === undefined) return 0;\n\n // TODO: This can be done more efficiently with caching\n // This will set the ctx.font correctly, depending on selected/hover and mod - so that ctx.measureText() will be accurate.\n let values = this.parent.getFormattingValues(ctx, selected, hover, mod);\n\n let width = 0;\n if (text !== '') {\n let measure = this.ctx.measureText(text);\n width = measure.width;\n }\n\n return {width, values: values};\n };\n\n\n this.lines = new LabelAccumulator(textWidth);\n }\n\n\n /**\n * Split passed text of a label into lines and blocks.\n *\n * # NOTE\n *\n * The handling of spacing is option dependent:\n *\n * - if `font.multi : false`, all spaces are retained\n * - if `font.multi : true`, every sequence of spaces is compressed to a single space\n *\n * This might not be the best way to do it, but this is as it has been working till now.\n * In order not to break existing functionality, for the time being this behaviour will\n * be retained in any code changes. \n *\n * @param {string} text text to split\n * @returns {Array}\n */\n process(text) {\n if (!ComponentUtil.isValidLabel(text)) {\n return this.lines.finalize();\n }\n\n var font = this.parent.fontOptions;\n\n // Normalize the end-of-line's to a single representation - order important\n text = text.replace(/\\r\\n/g, '\\n'); // Dos EOL's\n text = text.replace(/\\r/g, '\\n'); // Mac EOL's\n\n // Note that at this point, there can be no \\r's in the text.\n // This is used later on splitStringIntoLines() to split multifont texts.\n\n let nlLines = String(text).split('\\n');\n let lineCount = nlLines.length;\n\n if (font.multi) {\n // Multi-font case: styling tags active\n for (let i = 0; i < lineCount; i++) {\n let blocks = this.splitBlocks(nlLines[i], font.multi);\n // Post: Sequences of tabs and spaces are reduced to single space\n\n if (blocks === undefined) continue;\n\n if (blocks.length === 0) {\n this.lines.newLine(\"\");\n continue;\n }\n\n if (font.maxWdt > 0) {\n // widthConstraint.maximum defined\n //console.log('Running widthConstraint multi, max: ' + this.fontOptions.maxWdt);\n for (let j = 0; j < blocks.length; j++) {\n let mod = blocks[j].mod;\n let text = blocks[j].text;\n this.splitStringIntoLines(text, mod, true);\n }\n } else {\n // widthConstraint.maximum NOT defined\n for (let j = 0; j < blocks.length; j++) {\n let mod = blocks[j].mod;\n let text = blocks[j].text;\n this.lines.append(text, mod); \n }\n }\n\n this.lines.newLine();\n }\n } else {\n // Single-font case\n if (font.maxWdt > 0) {\n // widthConstraint.maximum defined\n // console.log('Running widthConstraint normal, max: ' + this.fontOptions.maxWdt);\n for (let i = 0; i < lineCount; i++) {\n this.splitStringIntoLines(nlLines[i]);\n }\n } else {\n // widthConstraint.maximum NOT defined\n for (let i = 0; i < lineCount; i++) {\n this.lines.newLine(nlLines[i]); \n }\n }\n }\n \n return this.lines.finalize();\n }\n\n\n /**\n * normalize the markup system\n *\n * @param {boolean|'md'|'markdown'|'html'} markupSystem\n * @returns {string}\n */\n decodeMarkupSystem(markupSystem) {\n let system = 'none';\n if (markupSystem === 'markdown' || markupSystem === 'md') {\n system = 'markdown';\n } else if (markupSystem === true || markupSystem === 'html') {\n system = 'html'\n }\n return system;\n }\n\n\n /**\n *\n * @param {string} text\n * @returns {Array}\n */\n splitHtmlBlocks(text) {\n let s = new MarkupAccumulator(text);\n\n let parseEntities = (ch) => {\n if (/&/.test(ch)) {\n let parsed = s.replace(s.text, '<', '<')\n || s.replace(s.text, '&', '&');\n\n if (!parsed) {\n s.add(\"&\");\n }\n\n return true;\n }\n\n return false;\n };\n\n while (s.position < s.text.length) {\n let ch = s.text.charAt(s.position);\n\n let parsed = s.parseWS(ch)\n || (/')\n || s.parseStartTag('ital', '')\n || s.parseStartTag('mono', '')\n || s.parseEndTag('bold', '')\n || s.parseEndTag('ital', '')\n || s.parseEndTag('mono', '')))\n || parseEntities(ch);\n\n if (!parsed) {\n s.add(ch);\n }\n s.position++\n }\n s.emitBlock();\n return s.blocks;\n }\n\n\n /**\n *\n * @param {string} text\n * @returns {Array}\n */\n splitMarkdownBlocks(text) {\n let s = new MarkupAccumulator(text); \n let beginable = true;\n\n let parseOverride = (ch) => {\n if (/\\\\/.test(ch)) {\n if (s.position < this.text.length + 1) {\n s.position++;\n ch = this.text.charAt(s.position);\n if (/ \\t/.test(ch)) {\n s.spacing = true;\n } else {\n s.add(ch);\n beginable = false;\n }\n }\n\n return true\n }\n\n return false;\n }\n\n while (s.position < s.text.length) {\n let ch = s.text.charAt(s.position);\n\n let parsed = s.parseWS(ch)\n || parseOverride(ch)\n || ((beginable || s.spacing) && (\n s.parseStartTag('bold', '*')\n || s.parseStartTag('ital', '_')\n || s.parseStartTag('mono', '`')))\n || s.parseEndTag('bold', '*', 'afterBold')\n || s.parseEndTag('ital', '_', 'afterItal')\n || s.parseEndTag('mono', '`', 'afterMono');\n\n if (!parsed) {\n s.add(ch);\n beginable = false;\n }\n s.position++\n }\n s.emitBlock();\n return s.blocks;\n }\n\n\n /**\n * Explodes a piece of text into single-font blocks using a given markup\n *\n * @param {string} text\n * @param {boolean|'md'|'markdown'|'html'} markupSystem\n * @returns {Array.<{text: string, mod: string}>}\n * @private\n */\n splitBlocks(text, markupSystem) {\n let system = this.decodeMarkupSystem(markupSystem);\n if (system === 'none') {\n return [{\n text: text,\n mod: 'normal'\n }]\n } else if (system === 'markdown') {\n return this.splitMarkdownBlocks(text);\n } else if (system === 'html') {\n return this.splitHtmlBlocks(text);\n }\n }\n\n\n /**\n * @param {string} text\n * @returns {boolean} true if text length over the current max with\n * @private\n */\n overMaxWidth(text) {\n let width = this.ctx.measureText(text).width;\n return (this.lines.curWidth() + width > this.parent.fontOptions.maxWdt);\n }\n\n\n /**\n * Determine the longest part of the sentence which still fits in the \n * current max width.\n * \n * @param {Array} words Array of strings signifying a text lines\n * @return {number} index of first item in string making string go over max\n * @private\n */\n getLongestFit(words) {\n let text = '';\n let w = 0;\n\n while (w < words.length) {\n let pre = (text === '') ? '' : ' ';\n let newText = text + pre + words[w];\n\n if (this.overMaxWidth(newText)) break;\n text = newText;\n w++;\n }\n\n return w;\n }\n\n\n /**\n * Determine the longest part of the string which still fits in the\n * current max width.\n * \n * @param {Array} words Array of strings signifying a text lines\n * @return {number} index of first item in string making string go over max\n */\n getLongestFitWord(words) {\n let w = 0;\n\n while (w < words.length) {\n if (this.overMaxWidth(words.slice(0,w))) break;\n w++;\n }\n\n return w;\n }\n\n\n /**\n * Split the passed text into lines, according to width constraint (if any).\n * \n * The method assumes that the input string is a single line, i.e. without lines break.\n *\n * This method retains spaces, if still present (case `font.multi: false`).\n * A space which falls on an internal line break, will be replaced by a newline.\n * There is no special handling of tabs; these go along with the flow.\n * \n * @param {string} str\n * @param {string} [mod='normal']\n * @param {boolean} [appendLast=false]\n * @private\n */\n splitStringIntoLines(str, mod = 'normal', appendLast = false) {\n // Set the canvas context font, based upon the current selected/hover state\n // and the provided mod, so the text measurement performed by getLongestFit\n // will be accurate - and not just use the font of whoever last used the canvas.\n this.parent.getFormattingValues(this.ctx, this.selected, this.hover, mod)\n\n // Still-present spaces are relevant, retain them\n str = str.replace(/^( +)/g, '$1\\r');\n str = str.replace(/([^\\r][^ ]*)( +)/g, '$1\\r$2\\r');\n let words = str.split('\\r');\n\n while (words.length > 0) {\n let w = this.getLongestFit(words);\n\n if (w === 0) {\n // Special case: the first word is already larger than the max width.\n let word = words[0];\n\n // Break the word to the largest part that fits the line\n let x = this.getLongestFitWord(word);\n this.lines.newLine(word.slice(0, x), mod);\n\n // Adjust the word, so that the rest will be done next iteration\n words[0] = word.slice(x);\n } else {\n // skip any space that is replaced by a newline\n let newW = w;\n if (words[w - 1] === ' ') {\n w--;\n } else if (words[newW] === ' ') {\n newW++;\n }\n\n let text = words.slice(0, w).join(\"\");\n\n if (w == words.length && appendLast) {\n this.lines.append(text, mod); \n } else {\n this.lines.newLine(text, mod); \n }\n\n // Adjust the word, so that the rest will be done next iteration\n words = words.slice(newW);\n }\n }\n }\n} \n\nexport default LabelSplitter;\n","import util from 'vis-util';\nimport ComponentUtil from './ComponentUtil';\nimport LabelSplitter from './LabelSplitter';\n\n\n/**\n * List of special styles for multi-fonts\n * @private\n */\nconst multiFontStyle = ['bold', 'ital', 'boldital', 'mono'];\n\n\n/**\n * A Label to be used for Nodes or Edges.\n */\nclass Label {\n\n /**\n * @param {Object} body\n * @param {Object} options\n * @param {boolean} [edgelabel=false]\n */\n constructor(body, options, edgelabel = false) {\n this.body = body;\n this.pointToSelf = false;\n this.baseSize = undefined;\n this.fontOptions = {}; // instance variable containing the *instance-local* font options\n this.setOptions(options);\n this.size = {top: 0, left: 0, width: 0, height: 0, yLine: 0};\n this.isEdgeLabel = edgelabel;\n }\n\n\n /**\n * @param {Object} options the options of the parent Node-instance\n */\n setOptions(options) {\n this.elementOptions = options; // Reference to the options of the parent Node-instance \n\n this.initFontOptions(options.font);\n\n if (ComponentUtil.isValidLabel(options.label)) {\n this.labelDirty = true;\n } else {\n // Bad label! Change the option value to prevent bad stuff happening\n options.label = undefined\n }\n\n if (options.font !== undefined && options.font !== null) { // font options can be deleted at various levels\n if (typeof options.font === 'string') {\n this.baseSize = this.fontOptions.size;\n }\n else if (typeof options.font === 'object') {\n let size = options.font.size;\n \n if (size !== undefined) {\n this.baseSize = size;\n }\n }\n }\n }\n\n\n /**\n * Init the font Options structure.\n *\n * Member fontOptions serves as an accumulator for the current font options.\n * As such, it needs to be completely separated from the node options.\n *\n * @param {Object} newFontOptions the new font options to process\n * @private\n */\n initFontOptions(newFontOptions) {\n // Prepare the multi-font option objects.\n // These will be filled in propagateFonts(), if required\n util.forEach(multiFontStyle, (style) => {\n this.fontOptions[style] = {};\n });\n\n // Handle shorthand option, if present\n if (Label.parseFontString(this.fontOptions, newFontOptions)) {\n this.fontOptions.vadjust = 0;\n return;\n }\n\n // Copy over the non-multifont options, if specified\n util.forEach(newFontOptions, (prop, n) => {\n if (prop !== undefined && prop !== null && typeof prop !== 'object') {\n this.fontOptions[n] = prop;\n }\n });\n }\n\n\n /**\n * If in-variable is a string, parse it as a font specifier.\n *\n * Note that following is not done here and have to be done after the call:\n * - Not all font options are set (vadjust, mod)\n *\n * @param {Object} outOptions out-parameter, object in which to store the parse results (if any)\n * @param {Object} inOptions font options to parse\n * @return {boolean} true if font parsed as string, false otherwise\n * @static\n */\n static parseFontString(outOptions, inOptions) {\n if (!inOptions || typeof inOptions !== 'string') return false;\n\n let newOptionsArray = inOptions.split(\" \");\n\n outOptions.size = +newOptionsArray[0].replace(\"px\",'');\n outOptions.face = newOptionsArray[1];\n outOptions.color = newOptionsArray[2];\n\n return true;\n }\n\n\n /**\n * Set the width and height constraints based on 'nearest' value\n *\n * @param {Array} pile array of option objects to consider\n * @returns {object} the actual constraint values to use\n * @private\n */\n constrain(pile) {\n // NOTE: constrainWidth and constrainHeight never set!\n // NOTE: for edge labels, only 'maxWdt' set\n // Node labels can set all the fields\n let fontOptions = {\n constrainWidth: false,\n maxWdt: -1,\n minWdt: -1,\n constrainHeight: false,\n minHgt: -1,\n valign: 'middle',\n }\n\n let widthConstraint = util.topMost(pile, 'widthConstraint');\n if (typeof widthConstraint === 'number') {\n fontOptions.maxWdt = Number(widthConstraint);\n fontOptions.minWdt = Number(widthConstraint);\n } else if (typeof widthConstraint === 'object') {\n let widthConstraintMaximum = util.topMost(pile, ['widthConstraint', 'maximum']);\n if (typeof widthConstraintMaximum === 'number') {\n fontOptions.maxWdt = Number(widthConstraintMaximum);\n }\n let widthConstraintMinimum = util.topMost(pile, ['widthConstraint', 'minimum'])\n if (typeof widthConstraintMinimum === 'number') {\n fontOptions.minWdt = Number(widthConstraintMinimum);\n }\n }\n\n\n let heightConstraint = util.topMost(pile, 'heightConstraint');\n if (typeof heightConstraint === 'number') {\n fontOptions.minHgt = Number(heightConstraint);\n } else if (typeof heightConstraint === 'object') {\n let heightConstraintMinimum = util.topMost(pile, ['heightConstraint', 'minimum']);\n if (typeof heightConstraintMinimum === 'number') {\n fontOptions.minHgt = Number(heightConstraintMinimum);\n }\n let heightConstraintValign = util.topMost(pile, ['heightConstraint', 'valign']);\n if (typeof heightConstraintValign === 'string') {\n if ((heightConstraintValign === 'top')|| (heightConstraintValign === 'bottom')) {\n fontOptions.valign = heightConstraintValign;\n }\n }\n }\n\n return fontOptions;\n }\n\n\n /**\n * Set options and update internal state\n *\n * @param {Object} options options to set\n * @param {Array} pile array of option objects to consider for option 'chosen'\n */\n update(options, pile) {\n this.setOptions(options, true);\n this.propagateFonts(pile);\n util.deepExtend(this.fontOptions, this.constrain(pile));\n this.fontOptions.chooser = ComponentUtil.choosify('label', pile);\n }\n\n\n /**\n * When margins are set in an element, adjust sizes is called to remove them\n * from the width/height constraints. This must be done prior to label sizing.\n *\n * @param {{top: number, right: number, bottom: number, left: number}} margins\n */\n adjustSizes(margins) {\n let widthBias = (margins) ? (margins.right + margins.left) : 0;\n if (this.fontOptions.constrainWidth) {\n this.fontOptions.maxWdt -= widthBias;\n this.fontOptions.minWdt -= widthBias;\n }\n let heightBias = (margins) ? (margins.top + margins.bottom) : 0;\n if (this.fontOptions.constrainHeight) {\n this.fontOptions.minHgt -= heightBias;\n }\n }\n\n\n/////////////////////////////////////////////////////////\n// Methods for handling options piles\n// Eventually, these will be moved to a separate class\n/////////////////////////////////////////////////////////\n\n /**\n * Add the font members of the passed list of option objects to the pile.\n *\n * @param {Pile} dstPile pile of option objects add to \n * @param {Pile} srcPile pile of option objects to take font options from\n * @private\n */\n addFontOptionsToPile(dstPile, srcPile) {\n for (let i = 0; i < srcPile.length; ++i) {\n this.addFontToPile(dstPile, srcPile[i]);\n }\n }\n\n\n /**\n * Add given font option object to the list of objects (the 'pile') to consider for determining\n * multi-font option values.\n *\n * @param {Pile} pile pile of option objects to use\n * @param {object} options instance to add to pile\n * @private\n */\n addFontToPile(pile, options) {\n if (options === undefined) return;\n if (options.font === undefined || options.font === null) return;\n\n let item = options.font;\n pile.push(item);\n }\n\n\n /**\n * Collect all own-property values from the font pile that aren't multi-font option objectss.\n *\n * @param {Pile} pile pile of option objects to use\n * @returns {object} object with all current own basic font properties\n * @private\n */\n getBasicOptions(pile) {\n let ret = {};\n\n // Scans the whole pile to get all options present\n for (let n = 0; n < pile.length; ++n) {\n let fontOptions = pile[n];\n\n // Convert shorthand if necessary\n let tmpShorthand = {};\n if (Label.parseFontString(tmpShorthand, fontOptions)) {\n fontOptions = tmpShorthand;\n }\n\n util.forEach(fontOptions, (opt, name) => {\n if (opt === undefined) return; // multi-font option need not be present \n if (ret.hasOwnProperty(name)) return; // Keep first value we encounter\n\n if (multiFontStyle.indexOf(name) !== -1) {\n // Skip multi-font properties but we do need the structure\n ret[name] = {};\n } else {\n ret[name] = opt;\n }\n });\n }\n\n return ret;\n }\n\n\n /**\n * Return the value for given option for the given multi-font.\n *\n * All available option objects are trawled in the set order to construct the option values.\n *\n * ---------------------------------------------------------------------\n * ## Traversal of pile for multi-fonts\n *\n * The determination of multi-font option values is a special case, because any values not\n * present in the multi-font options should by definition be taken from the main font options,\n * i.e. from the current 'parent' object of the multi-font option.\n *\n * ### Search order for multi-fonts\n *\n * 'bold' used as example:\n *\n * - search in option group 'bold' in local properties\n * - search in main font option group in local properties\n *\n * ---------------------------------------------------------------------\n *\n * @param {Pile} pile pile of option objects to use\n * @param {MultiFontStyle} multiName sub path for the multi-font\n * @param {string} option the option to search for, for the given multi-font\n * @returns {string|number} the value for the given option\n * @private\n */\n getFontOption(pile, multiName, option) {\n let multiFont;\n\n // Search multi font in local properties\n for (let n = 0; n < pile.length; ++n) {\n let fontOptions = pile[n];\n\n if (fontOptions.hasOwnProperty(multiName)) {\n multiFont = fontOptions[multiName];\n if (multiFont === undefined || multiFont === null) continue;\n\n // Convert shorthand if necessary\n // TODO: inefficient to do this conversion every time; find a better way.\n let tmpShorthand = {};\n if (Label.parseFontString(tmpShorthand, multiFont)) {\n multiFont = tmpShorthand;\n }\n\n if (multiFont.hasOwnProperty(option)) {\n return multiFont[option];\n }\n }\n }\n\n // Option is not mentioned in the multi font options; take it from the parent font options.\n // These have already been converted with getBasicOptions(), so use the converted values.\n if (this.fontOptions.hasOwnProperty(option)) {\n return this.fontOptions[option];\n }\n\n // A value **must** be found; you should never get here.\n throw new Error(\"Did not find value for multi-font for property: '\" + option + \"'\");\n }\n\n\n /**\n * Return all options values for the given multi-font.\n *\n * All available option objects are trawled in the set order to construct the option values.\n *\n * @param {Pile} pile pile of option objects to use\n * @param {MultiFontStyle} multiName sub path for the mod-font\n * @returns {MultiFontOptions}\n * @private\n */\n getFontOptions(pile, multiName) {\n let result = {};\n let optionNames = ['color', 'size', 'face', 'mod', 'vadjust']; // List of allowed options per multi-font\n\n for (let i = 0; i < optionNames.length; ++i) {\n let mod = optionNames[i];\n result[mod] = this.getFontOption(pile, multiName, mod);\n }\n\n return result;\n }\n\n/////////////////////////////////////////////////////////\n// End methods for handling options piles\n/////////////////////////////////////////////////////////\n\n\n /**\n * Collapse the font options for the multi-font to single objects, from\n * the chain of option objects passed (the 'pile').\n *\n * @param {Pile} pile sequence of option objects to consider.\n * First item in list assumed to be the newly set options.\n */\n propagateFonts(pile) {\n let fontPile = []; // sequence of font objects to consider, order important\n\n // Note that this.elementOptions is not used here.\n this.addFontOptionsToPile(fontPile, pile);\n this.fontOptions = this.getBasicOptions(fontPile);\n\n // We set multifont values even if multi === false, for consistency (things break otherwise)\n for (let i = 0; i < multiFontStyle.length; ++i) {\n let mod = multiFontStyle[i];\n let modOptions = this.fontOptions[mod];\n let tmpMultiFontOptions = this.getFontOptions(fontPile, mod);\n\n // Copy over found values\n util.forEach(tmpMultiFontOptions, (option, n) => {\n modOptions[n] = option;\n });\n\n modOptions.size = Number(modOptions.size);\n modOptions.vadjust = Number(modOptions.vadjust);\n }\n }\n\n\n /**\n * Main function. This is called from anything that wants to draw a label.\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} x\n * @param {number} y\n * @param {boolean} selected\n * @param {boolean} hover\n * @param {string} [baseline='middle']\n */\n draw(ctx, x, y, selected, hover, baseline = 'middle') {\n // if no label, return\n if (this.elementOptions.label === undefined)\n return;\n\n // check if we have to render the label\n let viewFontSize = this.fontOptions.size * this.body.view.scale;\n if (this.elementOptions.label && viewFontSize < this.elementOptions.scaling.label.drawThreshold - 1)\n return;\n\n // This ensures that there will not be HUGE letters on screen\n // by setting an upper limit on the visible text size (regardless of zoomLevel)\n if (viewFontSize >= this.elementOptions.scaling.label.maxVisible) {\n viewFontSize = Number(this.elementOptions.scaling.label.maxVisible) / this.body.view.scale;\n }\n\n // update the size cache if required\n this.calculateLabelSize(ctx, selected, hover, x, y, baseline);\n this._drawBackground(ctx);\n this._drawText(ctx, x, this.size.yLine, baseline, viewFontSize);\n }\n\n\n /**\n * Draws the label background\n * @param {CanvasRenderingContext2D} ctx\n * @private\n */\n _drawBackground(ctx) {\n if (this.fontOptions.background !== undefined && this.fontOptions.background !== \"none\") {\n ctx.fillStyle = this.fontOptions.background;\n let size = this.getSize();\n ctx.fillRect(size.left, size.top, size.width, size.height);\n }\n }\n\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} x\n * @param {number} y\n * @param {string} [baseline='middle']\n * @param {number} viewFontSize \n * @private\n */\n _drawText(ctx, x, y, baseline = 'middle', viewFontSize) {\n [x, y] = this._setAlignment(ctx, x, y, baseline);\n\n ctx.textAlign = 'left';\n x = x - this.size.width / 2; // Shift label 1/2-distance to the left\n if ((this.fontOptions.valign) && (this.size.height > this.size.labelHeight)) {\n if (this.fontOptions.valign === 'top') {\n y -= (this.size.height - this.size.labelHeight) / 2;\n }\n if (this.fontOptions.valign === 'bottom') {\n y += (this.size.height - this.size.labelHeight) / 2;\n }\n }\n\n // draw the text\n for (let i = 0; i < this.lineCount; i++) {\n let line = this.lines[i];\n if (line && line.blocks) {\n let width = 0;\n if (this.isEdgeLabel || this.fontOptions.align === 'center') {\n width += (this.size.width - line.width) / 2\n } else if (this.fontOptions.align === 'right') {\n width += (this.size.width - line.width)\n }\n for (let j = 0; j < line.blocks.length; j++) {\n let block = line.blocks[j];\n ctx.font = block.font;\n let [fontColor, strokeColor] = this._getColor(block.color, viewFontSize, block.strokeColor);\n if (block.strokeWidth > 0) {\n ctx.lineWidth = block.strokeWidth;\n ctx.strokeStyle = strokeColor;\n ctx.lineJoin = 'round';\n }\n ctx.fillStyle = fontColor;\n\n if (block.strokeWidth > 0) {\n ctx.strokeText(block.text, x + width, y + block.vadjust);\n }\n ctx.fillText(block.text, x + width, y + block.vadjust);\n width += block.width;\n }\n y += line.height;\n }\n }\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} x\n * @param {number} y\n * @param {string} baseline\n * @returns {Array.}\n * @private\n */\n _setAlignment(ctx, x, y, baseline) {\n // check for label alignment (for edges)\n // TODO: make alignment for nodes\n if (this.isEdgeLabel && this.fontOptions.align !== 'horizontal' && this.pointToSelf === false) {\n x = 0;\n y = 0;\n\n let lineMargin = 2;\n if (this.fontOptions.align === 'top') {\n ctx.textBaseline = 'alphabetic';\n y -= 2 * lineMargin; // distance from edge, required because we use alphabetic. Alphabetic has less difference between browsers\n }\n else if (this.fontOptions.align === 'bottom') {\n ctx.textBaseline = 'hanging';\n y += 2 * lineMargin;// distance from edge, required because we use hanging. Hanging has less difference between browsers\n }\n else {\n ctx.textBaseline = 'middle';\n }\n }\n else {\n ctx.textBaseline = baseline;\n }\n return [x,y];\n }\n\n /**\n * fade in when relative scale is between threshold and threshold - 1.\n * If the relative scale would be smaller than threshold -1 the draw function would have returned before coming here.\n *\n * @param {string} color The font color to use\n * @param {number} viewFontSize\n * @param {string} initialStrokeColor\n * @returns {Array.} An array containing the font color and stroke color\n * @private\n */\n _getColor(color, viewFontSize, initialStrokeColor) {\n let fontColor = color || '#000000';\n let strokeColor = initialStrokeColor || '#ffffff';\n if (viewFontSize <= this.elementOptions.scaling.label.drawThreshold) {\n let opacity = Math.max(0, Math.min(1, 1 - (this.elementOptions.scaling.label.drawThreshold - viewFontSize)));\n fontColor = util.overrideOpacity(fontColor, opacity);\n strokeColor = util.overrideOpacity(strokeColor, opacity);\n }\n return [fontColor, strokeColor];\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {boolean} selected\n * @param {boolean} hover\n * @returns {{width: number, height: number}}\n */\n getTextSize(ctx, selected = false, hover = false) {\n this._processLabel(ctx, selected, hover);\n return {\n width: this.size.width,\n height: this.size.height,\n lineCount: this.lineCount\n };\n }\n\n\n /**\n * Get the current dimensions of the label\n *\n * @return {rect}\n */\n getSize() {\n let lineMargin = 2;\n let x = this.size.left; // default values which might be overridden below\n let y = this.size.top - 0.5*lineMargin; // idem\n\n if (this.isEdgeLabel) {\n const x2 = -this.size.width * 0.5;\n\n switch (this.fontOptions.align) {\n case 'middle':\n x = x2;\n y = -this.size.height * 0.5\n break;\n case 'top':\n x = x2;\n y = -(this.size.height + lineMargin);\n break;\n case 'bottom':\n x = x2;\n y = lineMargin;\n break;\n }\n }\n\n var ret = {\n left : x,\n top : y,\n width : this.size.width,\n height: this.size.height,\n };\n\n return ret;\n }\n\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {boolean} selected\n * @param {boolean} hover\n * @param {number} [x=0]\n * @param {number} [y=0]\n * @param {'middle'|'hanging'} [baseline='middle']\n */\n calculateLabelSize(ctx, selected, hover, x = 0, y = 0, baseline = 'middle') {\n this._processLabel(ctx, selected, hover);\n this.size.left = x - this.size.width * 0.5;\n this.size.top = y - this.size.height * 0.5;\n this.size.yLine = y + (1 - this.lineCount) * 0.5 * this.fontOptions.size;\n if (baseline === \"hanging\") {\n this.size.top += 0.5 * this.fontOptions.size;\n this.size.top += 4; // distance from node, required because we use hanging. Hanging has less difference between browsers\n this.size.yLine += 4; // distance from node\n }\n }\n\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {boolean} selected\n * @param {boolean} hover\n * @param {string} mod\n * @returns {{color, size, face, mod, vadjust, strokeWidth: *, strokeColor: (*|string|allOptions.edges.font.strokeColor|{string}|allOptions.nodes.font.strokeColor|Array)}}\n */\n getFormattingValues(ctx, selected, hover, mod) {\n let getValue = function(fontOptions, mod, option) {\n if (mod === \"normal\") {\n if (option === 'mod' ) return \"\";\n return fontOptions[option];\n }\n\n if (fontOptions[mod][option] !== undefined) { // Grumbl leaving out test on undefined equals false for \"\" \n return fontOptions[mod][option];\n } else {\n // Take from parent font option\n return fontOptions[option];\n }\n };\n\n let values = {\n color : getValue(this.fontOptions, mod, 'color' ),\n size : getValue(this.fontOptions, mod, 'size' ),\n face : getValue(this.fontOptions, mod, 'face' ),\n mod : getValue(this.fontOptions, mod, 'mod' ),\n vadjust: getValue(this.fontOptions, mod, 'vadjust'),\n strokeWidth: this.fontOptions.strokeWidth,\n strokeColor: this.fontOptions.strokeColor\n };\n if (selected || hover) {\n if (mod === \"normal\" && (this.fontOptions.chooser === true) && (this.elementOptions.labelHighlightBold)) {\n values.mod = 'bold';\n } else {\n if (typeof this.fontOptions.chooser === 'function') {\n this.fontOptions.chooser(values, this.elementOptions.id, selected, hover);\n }\n }\n }\n\n let fontString = \"\";\n if (values.mod !== undefined && values.mod !== \"\") { // safeguard for undefined - this happened\n fontString += values.mod + \" \";\n }\n fontString += values.size + \"px \" + values.face;\n\n ctx.font = fontString.replace(/\"/g, \"\");\n values.font = ctx.font;\n values.height = values.size;\n return values;\n }\n\n\n /**\n *\n * @param {boolean} selected\n * @param {boolean} hover\n * @returns {boolean}\n */\n differentState(selected, hover) {\n return ((selected !== this.selectedState) || (hover !== this.hoverState));\n }\n \n\n /**\n * This explodes the passed text into lines and determines the width, height and number of lines.\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {boolean} selected\n * @param {boolean} hover\n * @param {string} inText the text to explode\n * @returns {{width, height, lines}|*}\n * @private\n */\n _processLabelText(ctx, selected, hover, inText) {\n let splitter = new LabelSplitter(ctx, this, selected, hover);\n return splitter.process(inText);\n }\n\n\n /**\n * This explodes the label string into lines and sets the width, height and number of lines.\n * @param {CanvasRenderingContext2D} ctx\n * @param {boolean} selected\n * @param {boolean} hover\n * @private\n */\n _processLabel(ctx, selected, hover) {\n\n if(this.labelDirty === false && !this.differentState(selected,hover))\n return;\n \n let state = this._processLabelText(ctx, selected, hover, this.elementOptions.label);\n\n if ((this.fontOptions.minWdt > 0) && (state.width < this.fontOptions.minWdt)) {\n state.width = this.fontOptions.minWdt;\n }\n\n this.size.labelHeight =state.height;\n if ((this.fontOptions.minHgt > 0) && (state.height < this.fontOptions.minHgt)) {\n state.height = this.fontOptions.minHgt;\n }\n\n this.lines = state.lines;\n this.lineCount = state.lines.length;\n this.size.width = state.width;\n this.size.height = state.height;\n this.selectedState = selected;\n this.hoverState = hover;\n\n this.labelDirty = false;\n }\n\n\n /**\n * Check if this label is visible\n *\n * @return {boolean} true if this label will be show, false otherwise\n */\n visible() {\n if ((this.size.width === 0 || this.size.height === 0)\n || this.elementOptions.label === undefined) {\n return false; // nothing to display\n }\n\n let viewFontSize = this.fontOptions.size * this.body.view.scale;\n if (viewFontSize < this.elementOptions.scaling.label.drawThreshold - 1) {\n return false; // Too small or too far away to show\n }\n\n return true;\n }\n}\n\nexport default Label;\n","function _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nmodule.exports = _assertThisInitialized;","var _typeof = require(\"../helpers/typeof\");\n\nvar assertThisInitialized = require(\"./assertThisInitialized\");\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return assertThisInitialized(self);\n}\n\nmodule.exports = _possibleConstructorReturn;","function _getPrototypeOf(o) {\n module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nmodule.exports = _getPrototypeOf;","function _setPrototypeOf(o, p) {\n module.exports = _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nmodule.exports = _setPrototypeOf;","var setPrototypeOf = require(\"./setPrototypeOf\");\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) setPrototypeOf(subClass, superClass);\n}\n\nmodule.exports = _inherits;","/**\n * The Base class for all Nodes.\n */\nclass NodeBase {\n /**\n * @param {Object} options\n * @param {Object} body\n * @param {Label} labelModule\n */\n constructor(options, body, labelModule) {\n this.body = body;\n this.labelModule = labelModule;\n this.setOptions(options);\n this.top = undefined;\n this.left = undefined;\n this.height = undefined;\n this.width = undefined;\n this.radius = undefined;\n this.margin = undefined;\n this.refreshNeeded = true;\n this.boundingBox = {top: 0, left: 0, right: 0, bottom: 0};\n }\n\n /**\n *\n * @param {Object} options\n */\n setOptions(options) {\n this.options = options;\n }\n\n /**\n *\n * @param {Label} labelModule\n * @private\n */\n _setMargins(labelModule) {\n this.margin = {};\n if (this.options.margin) {\n if (typeof this.options.margin == 'object') {\n this.margin.top = this.options.margin.top;\n this.margin.right = this.options.margin.right;\n this.margin.bottom = this.options.margin.bottom;\n this.margin.left = this.options.margin.left;\n } else {\n this.margin.top = this.options.margin;\n this.margin.right = this.options.margin;\n this.margin.bottom = this.options.margin;\n this.margin.left = this.options.margin;\n }\n }\n labelModule.adjustSizes(this.margin)\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} angle\n * @returns {number}\n * @private\n */\n _distanceToBorder(ctx,angle) {\n var borderWidth = this.options.borderWidth;\n this.resize(ctx);\n return Math.min(\n Math.abs(this.width / 2 / Math.cos(angle)),\n Math.abs(this.height / 2 / Math.sin(angle))) + borderWidth;\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {ArrowOptions} values\n */\n enableShadow(ctx, values) {\n if (values.shadow) {\n ctx.shadowColor = values.shadowColor;\n ctx.shadowBlur = values.shadowSize;\n ctx.shadowOffsetX = values.shadowX;\n ctx.shadowOffsetY = values.shadowY;\n }\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {ArrowOptions} values\n */\n disableShadow(ctx, values) {\n if (values.shadow) {\n ctx.shadowColor = 'rgba(0,0,0,0)';\n ctx.shadowBlur = 0;\n ctx.shadowOffsetX = 0;\n ctx.shadowOffsetY = 0;\n }\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {ArrowOptions} values\n */\n enableBorderDashes(ctx, values) {\n if (values.borderDashes !== false) {\n if (ctx.setLineDash !== undefined) {\n let dashes = values.borderDashes;\n if (dashes === true) {\n dashes = [5,15]\n }\n ctx.setLineDash(dashes);\n }\n else {\n console.warn(\"setLineDash is not supported in this browser. The dashed borders cannot be used.\");\n this.options.shapeProperties.borderDashes = false;\n values.borderDashes = false;\n }\n }\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {ArrowOptions} values\n */\n disableBorderDashes(ctx, values) {\n if (values.borderDashes !== false) {\n if (ctx.setLineDash !== undefined) {\n ctx.setLineDash([0]);\n }\n else {\n console.warn(\"setLineDash is not supported in this browser. The dashed borders cannot be used.\");\n this.options.shapeProperties.borderDashes = false;\n values.borderDashes = false;\n }\n }\n }\n\n /**\n * Determine if the shape of a node needs to be recalculated.\n *\n * @param {boolean} selected\n * @param {boolean} hover\n * @returns {boolean}\n * @protected\n */\n needsRefresh(selected, hover) {\n if (this.refreshNeeded === true) {\n // This is probably not the best location to reset this member.\n // However, in the current logic, it is the most convenient one.\n this.refreshNeeded = false;\n return true;\n }\n\n return (this.width === undefined) || (this.labelModule.differentState(selected, hover));\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {ArrowOptions} values\n */\n initContextForDraw(ctx, values) {\n var borderWidth = values.borderWidth / this.body.view.scale;\n\n ctx.lineWidth = Math.min(this.width, borderWidth);\n ctx.strokeStyle = values.borderColor;\n ctx.fillStyle = values.color;\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {ArrowOptions} values\n */\n performStroke(ctx, values) {\n var borderWidth = values.borderWidth / this.body.view.scale;\n\n //draw dashed border if enabled, save and restore is required for firefox not to crash on unix.\n ctx.save();\n // if borders are zero width, they will be drawn with width 1 by default. This prevents that\n if (borderWidth > 0) {\n this.enableBorderDashes(ctx, values);\n //draw the border\n ctx.stroke();\n //disable dashed border for other elements\n this.disableBorderDashes(ctx, values);\n }\n ctx.restore();\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {ArrowOptions} values\n */\n performFill(ctx, values) {\n // draw shadow if enabled\n this.enableShadow(ctx, values);\n // draw the background\n ctx.fill();\n // disable shadows for other elements.\n this.disableShadow(ctx, values);\n\n this.performStroke(ctx, values);\n }\n\n\n /**\n *\n * @param {number} margin\n * @private\n */\n _addBoundingBoxMargin(margin) {\n this.boundingBox.left -= margin;\n this.boundingBox.top -= margin;\n this.boundingBox.bottom += margin;\n this.boundingBox.right += margin;\n }\n\n\n /**\n * Actual implementation of this method call.\n *\n * Doing it like this makes it easier to override\n * in the child classes.\n *\n * @param {number} x width\n * @param {number} y height\n * @param {CanvasRenderingContext2D} ctx\n * @param {boolean} selected\n * @param {boolean} hover\n * @private\n */\n _updateBoundingBox(x, y, ctx, selected, hover) {\n if (ctx !== undefined) {\n this.resize(ctx, selected, hover);\n }\n\n this.left = x - this.width / 2;\n this.top = y - this.height/ 2;\n\n this.boundingBox.left = this.left;\n this.boundingBox.top = this.top;\n this.boundingBox.bottom = this.top + this.height;\n this.boundingBox.right = this.left + this.width;\n }\n\n\n /**\n * Default implementation of this method call.\n * This acts as a stub which can be overridden.\n *\n * @param {number} x width\n * @param {number} y height\n * @param {CanvasRenderingContext2D} ctx\n * @param {boolean} selected\n * @param {boolean} hover\n */\n updateBoundingBox(x, y, ctx, selected, hover) {\n this._updateBoundingBox(x, y, ctx, selected, hover);\n }\n\n\n /**\n * Determine the dimensions to use for nodes with an internal label\n *\n * Currently, these are: Circle, Ellipse, Database, Box\n * The other nodes have external labels, and will not call this method\n *\n * If there is no label, decent default values are supplied.\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {boolean} [selected]\n * @param {boolean} [hover]\n * @returns {{width:number, height:number}}\n */\n getDimensionsFromLabel(ctx, selected, hover) {\n // NOTE: previously 'textSize' was not put in 'this' for Ellipse\n // TODO: examine the consequences.\n this.textSize = this.labelModule.getTextSize(ctx, selected, hover);\n var width = this.textSize.width;\n var height = this.textSize.height;\n\n const DEFAULT_SIZE = 14;\n if (width === 0) {\n // This happens when there is no label text set\n width = DEFAULT_SIZE; // use a decent default\n height = DEFAULT_SIZE; // if width zero, then height also always zero\n }\n\n return {width:width, height:height};\n }\n}\n\nexport default NodeBase;\n","'use strict';\n\nimport NodeBase from '../util/NodeBase'\n\n/**\n * A Box Node/Cluster shape.\n *\n * @extends NodeBase\n */\nclass Box extends NodeBase {\n /**\n * @param {Object} options\n * @param {Object} body\n * @param {Label} labelModule\n */\n constructor (options, body, labelModule) {\n super(options,body,labelModule);\n this._setMargins(labelModule);\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {boolean} [selected]\n * @param {boolean} [hover]\n */\n resize(ctx, selected = this.selected, hover = this.hover) {\n if (this.needsRefresh(selected, hover)) {\n var dimensions = this.getDimensionsFromLabel(ctx, selected, hover);\n\n this.width = dimensions.width + this.margin.right + this.margin.left;\n this.height = dimensions.height + this.margin.top + this.margin.bottom;\n this.radius = this.width / 2;\n }\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} x width\n * @param {number} y height\n * @param {boolean} selected\n * @param {boolean} hover\n * @param {ArrowOptions} values\n */\n draw(ctx, x, y, selected, hover, values) {\n this.resize(ctx, selected, hover);\n this.left = x - this.width / 2;\n this.top = y - this.height / 2;\n\n this.initContextForDraw(ctx, values);\n ctx.roundRect(this.left, this.top, this.width, this.height, values.borderRadius);\n this.performFill(ctx, values);\n\n this.updateBoundingBox(x, y, ctx, selected, hover);\n this.labelModule.draw(ctx, this.left + this.textSize.width / 2 + this.margin.left,\n this.top + this.textSize.height / 2 + this.margin.top, selected, hover);\n }\n\n /**\n *\n * @param {number} x width\n * @param {number} y height\n * @param {CanvasRenderingContext2D} ctx\n * @param {boolean} selected\n * @param {boolean} hover\n */\n updateBoundingBox(x, y, ctx, selected, hover) {\n this._updateBoundingBox(x, y, ctx, selected, hover);\n\n let borderRadius = this.options.shapeProperties.borderRadius; // only effective for box\n this._addBoundingBoxMargin(borderRadius);\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} angle\n * @returns {number}\n */\n distanceToBorder(ctx, angle) {\n this.resize(ctx);\n let borderWidth = this.options.borderWidth;\n\n return Math.min(\n Math.abs((this.width) / 2 / Math.cos(angle)),\n Math.abs((this.height) / 2 / Math.sin(angle))) + borderWidth;\n }\n}\n\nexport default Box;\n","import NodeBase from './NodeBase';\n\n/**\n * NOTE: This is a bad base class\n *\n * Child classes are:\n *\n * Image - uses *only* image methods\n * Circle - uses *only* _drawRawCircle\n * CircleImage - uses all\n *\n * TODO: Refactor, move _drawRawCircle to different module, derive Circle from NodeBase\n * Rename this to ImageBase\n * Consolidate common code in Image and CircleImage to base class\n *\n * @extends NodeBase\n */\nclass CircleImageBase extends NodeBase {\n /**\n * @param {Object} options\n * @param {Object} body\n * @param {Label} labelModule\n */\n constructor(options, body, labelModule) {\n super(options, body, labelModule);\n this.labelOffset = 0;\n this.selected = false;\n }\n\n /**\n *\n * @param {Object} options\n * @param {Object} [imageObj]\n * @param {Object} [imageObjAlt]\n */\n setOptions(options, imageObj, imageObjAlt) {\n this.options = options;\n\n if (!(imageObj === undefined && imageObjAlt === undefined)) {\n this.setImages(imageObj, imageObjAlt);\n }\n }\n\n\n /**\n * Set the images for this node.\n *\n * The images can be updated after the initial setting of options;\n * therefore, this method needs to be reentrant. \n *\n * For correct working in error cases, it is necessary to properly set\n * field 'nodes.brokenImage' in the options.\n *\n * @param {Image} imageObj required; main image to show for this node\n * @param {Image|undefined} imageObjAlt optional; image to show when node is selected\n */\n setImages(imageObj, imageObjAlt) {\n if (imageObjAlt && this.selected) {\n this.imageObj = imageObjAlt;\n this.imageObjAlt = imageObj;\n } else {\n this.imageObj = imageObj;\n this.imageObjAlt = imageObjAlt;\n }\n }\n\n /**\n * Set selection and switch between the base and the selected image.\n *\n * Do the switch only if imageObjAlt exists.\n *\n * @param {boolean} selected value of new selected state for current node\n */\n switchImages(selected) {\n var selection_changed = ((selected && !this.selected) || (!selected && this.selected));\n this.selected = selected; // Remember new selection\n\n if (this.imageObjAlt !== undefined && selection_changed) {\n let imageTmp = this.imageObj;\n this.imageObj = this.imageObjAlt;\n this.imageObjAlt = imageTmp;\n }\n }\n\n /**\n * Adjust the node dimensions for a loaded image.\n *\n * Pre: this.imageObj is valid\n */\n _resizeImage() {\n var width, height;\n\n if (this.options.shapeProperties.useImageSize === false) {\n // Use the size property\n var ratio_width = 1;\n var ratio_height = 1;\n\n // Only calculate the proper ratio if both width and height not zero\n if (this.imageObj.width && this.imageObj.height) {\n if (this.imageObj.width > this.imageObj.height) {\n ratio_width = this.imageObj.width / this.imageObj.height;\n }\n else {\n ratio_height = this.imageObj.height / this.imageObj.width;\n }\n }\n\n width = this.options.size * 2 * ratio_width;\n height = this.options.size * 2 * ratio_height;\n }\n else {\n // Use the image size\n width = this.imageObj.width;\n height = this.imageObj.height;\n }\n\n this.width = width;\n this.height = height;\n this.radius = 0.5 * this.width;\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} x width\n * @param {number} y height\n * @param {ArrowOptions} values\n * @private\n */\n _drawRawCircle(ctx, x, y, values) {\n this.initContextForDraw(ctx, values);\n ctx.circle(x, y, values.size);\n this.performFill(ctx, values);\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {ArrowOptions} values\n * @private\n */\n _drawImageAtPosition(ctx, values) {\n if (this.imageObj.width != 0) {\n // draw the image\n ctx.globalAlpha = 1.0;\n\n // draw shadow if enabled\n this.enableShadow(ctx, values);\n\n let factor = 1;\n if (this.options.shapeProperties.interpolation === true) {\n factor = (this.imageObj.width / this.width) / this.body.view.scale;\n }\n\n this.imageObj.drawImageAtPosition(ctx, factor, this.left, this.top, this.width, this.height);\n\n // disable shadows for other elements.\n this.disableShadow(ctx, values);\n }\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} x width\n * @param {number} y height\n * @param {boolean} selected\n * @param {boolean} hover\n * @private\n */\n _drawImageLabel(ctx, x, y, selected, hover) {\n var yLabel;\n var offset = 0;\n\n if (this.height !== undefined) {\n offset = this.height * 0.5;\n var labelDimensions = this.labelModule.getTextSize(ctx, selected, hover);\n if (labelDimensions.lineCount >= 1) {\n offset += labelDimensions.height / 2;\n }\n }\n\n yLabel = y + offset;\n\n if (this.options.label) {\n this.labelOffset = offset;\n }\n this.labelModule.draw(ctx, x, yLabel, selected, hover, 'hanging');\n }\n}\n\nexport default CircleImageBase;\n","'use strict';\n\nimport CircleImageBase from '../util/CircleImageBase'\n\n/**\n * A Circle Node/Cluster shape.\n *\n * @extends CircleImageBase\n */\nclass Circle extends CircleImageBase {\n /**\n * @param {Object} options\n * @param {Object} body\n * @param {Label} labelModule\n */\n constructor(options, body, labelModule) {\n super(options, body, labelModule);\n this._setMargins(labelModule);\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {boolean} [selected]\n * @param {boolean} [hover]\n */\n resize(ctx, selected = this.selected, hover = this.hover) {\n if (this.needsRefresh(selected, hover)) {\n var dimensions = this.getDimensionsFromLabel(ctx, selected, hover);\n\n var diameter = Math.max(dimensions.width + this.margin.right + this.margin.left,\n dimensions.height + this.margin.top + this.margin.bottom);\n\n this.options.size = diameter / 2; // NOTE: this size field only set here, not in Ellipse, Database, Box\n this.width = diameter;\n this.height = diameter;\n this.radius = this.width / 2;\n }\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} x width\n * @param {number} y height\n * @param {boolean} selected\n * @param {boolean} hover\n * @param {ArrowOptions} values\n */\n draw(ctx, x, y, selected, hover, values) {\n this.resize(ctx, selected, hover);\n this.left = x - this.width / 2;\n this.top = y - this.height / 2;\n\n this._drawRawCircle(ctx, x, y, values);\n\n this.updateBoundingBox(x,y);\n this.labelModule.draw(ctx, this.left + this.textSize.width / 2 + this.margin.left,\n y, selected, hover);\n }\n\n /**\n *\n * @param {number} x width\n * @param {number} y height\n */\n updateBoundingBox(x, y) {\n this.boundingBox.top = y - this.options.size;\n this.boundingBox.left = x - this.options.size;\n this.boundingBox.right = x + this.options.size;\n this.boundingBox.bottom = y + this.options.size;\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} angle - Unused\n * @returns {number}\n */\n distanceToBorder(ctx, angle) { // eslint-disable-line no-unused-vars\n this.resize(ctx);\n return this.width * 0.5;\n }\n}\n\nexport default Circle;\n","'use strict';\n\nimport CircleImageBase from '../util/CircleImageBase'\n\n/**\n * A CircularImage Node/Cluster shape.\n *\n * @extends CircleImageBase\n */\nclass CircularImage extends CircleImageBase {\n /**\n * @param {Object} options\n * @param {Object} body\n * @param {Label} labelModule\n * @param {Image} imageObj\n * @param {Image} imageObjAlt\n */\n constructor (options, body, labelModule, imageObj, imageObjAlt) {\n super(options, body, labelModule);\n\n this.setImages(imageObj, imageObjAlt);\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {boolean} [selected]\n * @param {boolean} [hover]\n */\n resize(ctx, selected = this.selected, hover = this.hover) {\n var imageAbsent = (this.imageObj.src === undefined) ||\n (this.imageObj.width === undefined) ||\n (this.imageObj.height === undefined);\n\n if (imageAbsent) {\n var diameter = this.options.size * 2;\n this.width = diameter;\n this.height = diameter;\n this.radius = 0.5*this.width;\n\t\t\treturn;\n }\n\n // At this point, an image is present, i.e. this.imageObj is valid.\n if (this.needsRefresh(selected, hover)) {\n this._resizeImage();\n }\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} x width\n * @param {number} y height\n * @param {boolean} selected\n * @param {boolean} hover\n * @param {ArrowOptions} values\n */\n draw(ctx, x, y, selected, hover, values) {\n this.switchImages(selected);\n this.resize();\n this.left = x - this.width / 2;\n this.top = y - this.height / 2;\n\n // draw the background circle. IMPORTANT: the stroke in this method is used by the clip method below.\n this._drawRawCircle(ctx, x, y, values);\n\n // now we draw in the circle, we save so we can revert the clip operation after drawing.\n ctx.save();\n // clip is used to use the stroke in drawRawCircle as an area that we can draw in.\n ctx.clip();\n // draw the image\n this._drawImageAtPosition(ctx, values);\n // restore so we can again draw on the full canvas\n ctx.restore();\n\n this._drawImageLabel(ctx, x, y, selected, hover);\n\n this.updateBoundingBox(x,y);\n }\n\n // TODO: compare with Circle.updateBoundingBox(), consolidate? More stuff is happening here\n /**\n *\n * @param {number} x width\n * @param {number} y height\n */\n updateBoundingBox(x,y) {\n this.boundingBox.top = y - this.options.size;\n this.boundingBox.left = x - this.options.size;\n this.boundingBox.right = x + this.options.size;\n this.boundingBox.bottom = y + this.options.size;\n\n // TODO: compare with Image.updateBoundingBox(), consolidate?\n this.boundingBox.left = Math.min(this.boundingBox.left, this.labelModule.size.left);\n this.boundingBox.right = Math.max(this.boundingBox.right, this.labelModule.size.left + this.labelModule.size.width);\n this.boundingBox.bottom = Math.max(this.boundingBox.bottom, this.boundingBox.bottom + this.labelOffset);\n }\n\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} angle - Unused\n * @returns {number}\n */\n distanceToBorder(ctx, angle) { // eslint-disable-line no-unused-vars\n this.resize(ctx);\n return this.width * 0.5;\n }\n}\n\nexport default CircularImage;\n","'use strict';\n\nimport NodeBase from '../util/NodeBase'\n\n/**\n * A Database Node/Cluster shape.\n *\n * @extends NodeBase\n */\nclass Database extends NodeBase {\n /**\n * @param {Object} options\n * @param {Object} body\n * @param {Label} labelModule\n */\n constructor (options, body, labelModule) {\n super(options, body, labelModule);\n this._setMargins(labelModule);\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {boolean} selected\n * @param {boolean} hover\n */\n resize(ctx, selected, hover) {\n if (this.needsRefresh(selected, hover)) {\n var dimensions = this.getDimensionsFromLabel(ctx, selected, hover);\n var size = dimensions.width + this.margin.right + this.margin.left;\n\n this.width = size;\n this.height = size;\n this.radius = this.width / 2;\n }\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} x width\n * @param {number} y height\n * @param {boolean} selected\n * @param {boolean} hover\n * @param {ArrowOptions} values\n */\n draw(ctx, x, y, selected, hover, values) {\n this.resize(ctx, selected, hover);\n this.left = x - this.width / 2;\n this.top = y - this.height / 2;\n\n this.initContextForDraw(ctx, values);\n ctx.database(x - this.width / 2, y - this.height / 2, this.width, this.height);\n this.performFill(ctx, values);\n\n this.updateBoundingBox(x, y, ctx, selected, hover);\n this.labelModule.draw(ctx, this.left + this.textSize.width / 2 + this.margin.left,\n this.top + this.textSize.height / 2 + this.margin.top, selected, hover);\n }\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} angle\n * @returns {number}\n */\n distanceToBorder(ctx, angle) {\n return this._distanceToBorder(ctx, angle);\n }\n}\n\nexport default Database;\n","import NodeBase from '../util/NodeBase'\n\n/**\n * Base class for constructing Node/Cluster Shapes.\n *\n * @extends NodeBase\n */\nclass ShapeBase extends NodeBase {\n /**\n * @param {Object} options\n * @param {Object} body\n * @param {Label} labelModule\n */\n constructor(options, body, labelModule) {\n super(options, body, labelModule)\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {boolean} [selected]\n * @param {boolean} [hover]\n * @param {Object} [values={size: this.options.size}]\n */\n resize(ctx, selected = this.selected, hover = this.hover, values = { size: this.options.size }) {\n if (this.needsRefresh(selected, hover)) {\n this.labelModule.getTextSize(ctx, selected, hover);\n var size = 2 * values.size;\n this.width = size;\n this.height = size;\n this.radius = 0.5*this.width;\n }\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {string} shape\n * @param {number} sizeMultiplier - Unused! TODO: Remove next major release\n * @param {number} x\n * @param {number} y\n * @param {boolean} selected\n * @param {boolean} hover\n * @param {ArrowOptions} values\n * @private\n */\n _drawShape(ctx, shape, sizeMultiplier, x, y, selected, hover, values) {\n this.resize(ctx, selected, hover, values);\n this.left = x - this.width / 2;\n this.top = y - this.height / 2;\n\n this.initContextForDraw(ctx, values);\n ctx[shape](x, y, values.size);\n this.performFill(ctx, values);\n \n if (this.options.icon !== undefined) {\n if (this.options.icon.code !== undefined) {\n ctx.font = (selected ? \"bold \" : \"\")\n + (this.height / 2) + \"px \"\n + (this.options.icon.face || 'FontAwesome');\n ctx.fillStyle = this.options.icon.color || \"black\";\n ctx.textAlign = \"center\";\n ctx.textBaseline = \"middle\";\n ctx.fillText(this.options.icon.code, x, y);\n }\n }\n\n if (this.options.label !== undefined) {\n // Need to call following here in order to ensure value for `this.labelModule.size.height`\n this.labelModule.calculateLabelSize(ctx, selected, hover, x, y, 'hanging')\n let yLabel = y + 0.5 * this.height + 0.5 * this.labelModule.size.height;\n this.labelModule.draw(ctx, x, yLabel, selected, hover, 'hanging');\n }\n\n this.updateBoundingBox(x,y);\n }\n\n /**\n *\n * @param {number} x\n * @param {number} y\n */\n updateBoundingBox(x, y) {\n this.boundingBox.top = y - this.options.size;\n this.boundingBox.left = x - this.options.size;\n this.boundingBox.right = x + this.options.size;\n this.boundingBox.bottom = y + this.options.size;\n\n if (this.options.label !== undefined && this.labelModule.size.width > 0) {\n this.boundingBox.left = Math.min(this.boundingBox.left, this.labelModule.size.left);\n this.boundingBox.right = Math.max(this.boundingBox.right, this.labelModule.size.left + this.labelModule.size.width);\n this.boundingBox.bottom = Math.max(this.boundingBox.bottom, this.boundingBox.bottom + this.labelModule.size.height);\n }\n }\n}\n\nexport default ShapeBase;\n","'use strict';\n\nimport ShapeBase from '../util/ShapeBase'\n\n/**\n * A Diamond Node/Cluster shape.\n *\n * @extends ShapeBase\n */\nclass Diamond extends ShapeBase {\n /**\n * @param {Object} options\n * @param {Object} body\n * @param {Label} labelModule\n */\n constructor(options, body, labelModule) {\n super(options, body, labelModule)\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} x width\n * @param {number} y height\n * @param {boolean} selected\n * @param {boolean} hover\n * @param {ArrowOptions} values\n */\n draw(ctx, x, y, selected, hover, values) {\n this._drawShape(ctx, 'diamond', 4, x, y, selected, hover, values);\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} angle\n * @returns {number}\n */\n distanceToBorder(ctx, angle) {\n return this._distanceToBorder(ctx,angle);\n }\n}\n\nexport default Diamond;\n","'use strict';\n\nimport ShapeBase from '../util/ShapeBase'\n\n/**\n * A Dot Node/Cluster shape.\n *\n * @extends ShapeBase\n */\nclass Dot extends ShapeBase {\n /**\n * @param {Object} options\n * @param {Object} body\n * @param {Label} labelModule\n */\n constructor(options, body, labelModule) {\n super(options, body, labelModule)\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} x width\n * @param {number} y height\n * @param {boolean} selected\n * @param {boolean} hover\n * @param {ArrowOptions} values\n */\n draw(ctx, x, y, selected, hover, values) {\n this._drawShape(ctx, 'circle', 2, x, y, selected, hover, values);\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} angle\n * @returns {number}\n */\n distanceToBorder(ctx, angle) { // eslint-disable-line no-unused-vars\n this.resize(ctx);\n return this.options.size;\n }\n}\n\nexport default Dot;\n","'use strict';\n\nimport NodeBase from '../util/NodeBase'\n\n/**\n * Am Ellipse Node/Cluster shape.\n *\n * @extends NodeBase\n */\nclass Ellipse extends NodeBase {\n /**\n * @param {Object} options\n * @param {Object} body\n * @param {Label} labelModule\n */\n constructor(options, body, labelModule) {\n super(options, body, labelModule);\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {boolean} [selected]\n * @param {boolean} [hover]\n */\n resize(ctx, selected = this.selected, hover = this.hover) {\n if (this.needsRefresh(selected, hover)) {\n var dimensions = this.getDimensionsFromLabel(ctx, selected, hover);\n\n this.height = dimensions.height * 2;\n this.width = dimensions.width + dimensions.height;\n this.radius = 0.5*this.width;\n }\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} x width\n * @param {number} y height\n * @param {boolean} selected\n * @param {boolean} hover\n * @param {ArrowOptions} values\n */\n draw(ctx, x, y, selected, hover, values) {\n this.resize(ctx, selected, hover);\n this.left = x - this.width * 0.5;\n this.top = y - this.height * 0.5;\n\n this.initContextForDraw(ctx, values);\n ctx.ellipse_vis(this.left, this.top, this.width, this.height);\n this.performFill(ctx, values);\n\n this.updateBoundingBox(x, y, ctx, selected, hover);\n this.labelModule.draw(ctx, x, y, selected, hover);\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} angle\n * @returns {number}\n */\n distanceToBorder(ctx, angle) {\n this.resize(ctx);\n var a = this.width * 0.5;\n var b = this.height * 0.5;\n var w = (Math.sin(angle) * a);\n var h = (Math.cos(angle) * b);\n return a * b / Math.sqrt(w * w + h * h);\n }\n}\n\nexport default Ellipse;\n","'use strict';\n\nimport NodeBase from '../util/NodeBase'\n\n/**\n * An icon replacement for the default Node shape.\n *\n * @extends NodeBase\n */\nclass Icon extends NodeBase {\n /**\n * @param {Object} options\n * @param {Object} body\n * @param {Label} labelModule\n */\n constructor(options, body, labelModule) {\n super(options, body, labelModule);\n this._setMargins(labelModule);\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx - Unused.\n * @param {boolean} [selected]\n * @param {boolean} [hover]\n */\n resize(ctx, selected, hover) {\n if (this.needsRefresh(selected, hover)) {\n this.iconSize = {\n width: Number(this.options.icon.size),\n height: Number(this.options.icon.size)\n };\n this.width = this.iconSize.width + this.margin.right + this.margin.left;\n this.height = this.iconSize.height + this.margin.top + this.margin.bottom;\n this.radius = 0.5*this.width;\n }\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} x width\n * @param {number} y height\n * @param {boolean} selected\n * @param {boolean} hover\n * @param {ArrowOptions} values\n */\n draw(ctx, x, y, selected, hover, values) {\n this.resize(ctx, selected, hover);\n this.options.icon.size = this.options.icon.size || 50;\n\n this.left = x - this.width / 2;\n this.top = y - this.height / 2;\n this._icon(ctx, x, y, selected, hover, values);\n\n if (this.options.label !== undefined) {\n var iconTextSpacing = 5;\n this.labelModule.draw(ctx, this.left + this.iconSize.width / 2 + this.margin.left,\n y + this.height / 2 + iconTextSpacing, selected);\n }\n\n this.updateBoundingBox(x, y)\n }\n\n /**\n *\n * @param {number} x\n * @param {number} y\n */\n updateBoundingBox(x, y) {\n this.boundingBox.top = y - this.options.icon.size * 0.5;\n this.boundingBox.left = x - this.options.icon.size * 0.5;\n this.boundingBox.right = x + this.options.icon.size * 0.5;\n this.boundingBox.bottom = y + this.options.icon.size * 0.5;\n\n if (this.options.label !== undefined && this.labelModule.size.width > 0) {\n var iconTextSpacing = 5;\n this.boundingBox.left = Math.min(this.boundingBox.left, this.labelModule.size.left);\n this.boundingBox.right = Math.max(this.boundingBox.right, this.labelModule.size.left + this.labelModule.size.width);\n this.boundingBox.bottom = Math.max(this.boundingBox.bottom, this.boundingBox.bottom + this.labelModule.size.height + iconTextSpacing);\n }\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} x width\n * @param {number} y height\n * @param {boolean} selected\n * @param {boolean} hover - Unused\n * @param {ArrowOptions} values\n */\n _icon(ctx, x, y, selected, hover, values) {\n let iconSize = Number(this.options.icon.size);\n\n if (this.options.icon.code !== undefined) {\n ctx.font = (selected ? \"bold \" : \"\") + iconSize + \"px \" + this.options.icon.face;\n\n // draw icon\n ctx.fillStyle = this.options.icon.color || \"black\";\n ctx.textAlign = \"center\";\n ctx.textBaseline = \"middle\";\n\n // draw shadow if enabled\n this.enableShadow(ctx, values);\n ctx.fillText(this.options.icon.code, x, y);\n\n // disable shadows for other elements.\n this.disableShadow(ctx, values);\n } else {\n console.error('When using the icon shape, you need to define the code in the icon options object. This can be done per node or globally.')\n }\n\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} angle\n * @returns {number}\n */\n distanceToBorder(ctx, angle) {\n return this._distanceToBorder(ctx,angle);\n }\n}\n\nexport default Icon;\n","'use strict';\n\nimport CircleImageBase from '../util/CircleImageBase'\n\n\n/**\n * An image-based replacement for the default Node shape.\n *\n * @extends CircleImageBase\n */\nclass Image extends CircleImageBase {\n /**\n * @param {Object} options\n * @param {Object} body\n * @param {Label} labelModule\n * @param {Image} imageObj\n * @param {Image} imageObjAlt\n */\n constructor (options, body, labelModule, imageObj, imageObjAlt) {\n super(options, body, labelModule);\n\n this.setImages(imageObj, imageObjAlt);\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx - Unused.\n * @param {boolean} [selected]\n * @param {boolean} [hover]\n */\n resize(ctx, selected = this.selected, hover = this.hover) {\n var imageAbsent = (this.imageObj.src === undefined) ||\n (this.imageObj.width === undefined) ||\n (this.imageObj.height === undefined);\n\n if (imageAbsent) {\n var side = this.options.size * 2;\n this.width = side;\n this.height = side;\n return;\n }\n\n if (this.needsRefresh(selected, hover)) {\n this._resizeImage();\n }\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} x width\n * @param {number} y height\n * @param {boolean} selected\n * @param {boolean} hover\n * @param {ArrowOptions} values\n */\n draw(ctx, x, y, selected, hover, values) {\n this.switchImages(selected);\n this.resize();\n this.left = x - this.width / 2;\n this.top = y - this.height / 2;\n\n if (this.options.shapeProperties.useBorderWithImage === true) {\n var neutralborderWidth = this.options.borderWidth;\n var selectionLineWidth = this.options.borderWidthSelected || 2 * this.options.borderWidth;\n var borderWidth = (selected ? selectionLineWidth : neutralborderWidth) / this.body.view.scale;\n ctx.lineWidth = Math.min(this.width, borderWidth);\n\n ctx.beginPath();\n\n // setup the line properties.\n ctx.strokeStyle = selected ? this.options.color.highlight.border : hover ? this.options.color.hover.border : this.options.color.border;\n\n // set a fillstyle\n ctx.fillStyle = selected ? this.options.color.highlight.background : hover ? this.options.color.hover.background : this.options.color.background;\n\n // draw a rectangle to form the border around. This rectangle is filled so the opacity of a picture (in future vis releases?) can be used to tint the image\n ctx.rect(this.left - 0.5 * ctx.lineWidth,\n this.top - 0.5 * ctx.lineWidth,\n this.width + ctx.lineWidth,\n this.height + ctx.lineWidth);\n ctx.fill();\n\n this.performStroke(ctx, values);\n \n ctx.closePath();\n }\n\n this._drawImageAtPosition(ctx, values);\n\n this._drawImageLabel(ctx, x, y, selected, hover);\n\n this.updateBoundingBox(x,y);\n }\n\n /**\n *\n * @param {number} x\n * @param {number} y\n */\n updateBoundingBox(x, y) {\n this.resize();\n this._updateBoundingBox(x, y);\n\n if (this.options.label !== undefined && this.labelModule.size.width > 0) {\n this.boundingBox.left = Math.min(this.boundingBox.left, this.labelModule.size.left);\n this.boundingBox.right = Math.max(this.boundingBox.right, this.labelModule.size.left + this.labelModule.size.width);\n this.boundingBox.bottom = Math.max(this.boundingBox.bottom, this.boundingBox.bottom + this.labelOffset);\n }\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} angle\n * @returns {number}\n */\n distanceToBorder(ctx, angle) {\n return this._distanceToBorder(ctx,angle);\n }\n}\n\nexport default Image;\n","'use strict';\n\nimport ShapeBase from '../util/ShapeBase'\n\n/**\n * A Square Node/Cluster shape.\n *\n * @extends ShapeBase\n */\nclass Square extends ShapeBase {\n /**\n * @param {Object} options\n * @param {Object} body\n * @param {Label} labelModule\n */\n constructor(options, body, labelModule) {\n super(options, body, labelModule)\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} x width\n * @param {number} y height\n * @param {boolean} selected\n * @param {boolean} hover\n * @param {ArrowOptions} values\n */\n draw(ctx, x, y, selected, hover, values) {\n this._drawShape(ctx, 'square', 2, x, y, selected, hover, values);\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} angle\n * @returns {number}\n */\n distanceToBorder(ctx, angle) {\n return this._distanceToBorder(ctx,angle);\n }\n}\n\nexport default Square;\n","'use strict';\n\nimport ShapeBase from '../util/ShapeBase'\n\n/**\n * A Hexagon Node/Cluster shape.\n *\n * @extends ShapeBase\n */\nclass Hexagon extends ShapeBase {\n /**\n * @param {Object} options\n * @param {Object} body\n * @param {Label} labelModule\n */\n constructor(options, body, labelModule) {\n super(options, body, labelModule)\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} x width\n * @param {number} y height\n * @param {boolean} selected\n * @param {boolean} hover\n * @param {ArrowOptions} values\n */\n draw(ctx, x, y, selected, hover, values) {\n this._drawShape(ctx, 'hexagon', 4, x, y, selected, hover, values);\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} angle\n * @returns {number}\n */\n distanceToBorder(ctx, angle) {\n return this._distanceToBorder(ctx,angle);\n }\n}\n\nexport default Hexagon;\n","'use strict';\n\nimport ShapeBase from '../util/ShapeBase'\n\n/**\n * A Star Node/Cluster shape.\n *\n * @extends ShapeBase\n */\nclass Star extends ShapeBase {\n /**\n * @param {Object} options\n * @param {Object} body\n * @param {Label} labelModule\n */\n constructor(options, body, labelModule) {\n super(options, body, labelModule)\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} x width\n * @param {number} y height\n * @param {boolean} selected\n * @param {boolean} hover\n * @param {ArrowOptions} values\n */\n draw(ctx, x, y, selected, hover, values) {\n this._drawShape(ctx, 'star', 4, x, y, selected, hover, values);\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} angle\n * @returns {number}\n */\n distanceToBorder(ctx, angle) {\n return this._distanceToBorder(ctx,angle);\n }\n}\n\nexport default Star;\n","'use strict';\n\nimport NodeBase from '../util/NodeBase'\n\n/**\n * A text-based replacement for the default Node shape.\n *\n * @extends NodeBase\n */\nclass Text extends NodeBase {\n /**\n * @param {Object} options\n * @param {Object} body\n * @param {Label} labelModule\n */\n constructor(options, body, labelModule) {\n super(options, body, labelModule);\n this._setMargins(labelModule);\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {boolean} selected\n * @param {boolean} hover\n */\n resize(ctx, selected, hover) {\n if (this.needsRefresh(selected, hover)) {\n this.textSize = this.labelModule.getTextSize(ctx, selected, hover);\n this.width = this.textSize.width + this.margin.right + this.margin.left;\n this.height = this.textSize.height + this.margin.top + this.margin.bottom;\n this.radius = 0.5*this.width;\n }\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} x width\n * @param {number} y height\n * @param {boolean} selected\n * @param {boolean} hover\n * @param {ArrowOptions} values\n */\n draw(ctx, x, y, selected, hover, values) {\n this.resize(ctx, selected, hover);\n this.left = x - this.width / 2;\n this.top = y - this.height / 2;\n\n // draw shadow if enabled\n this.enableShadow(ctx, values);\n this.labelModule.draw(ctx, this.left + this.textSize.width / 2 + this.margin.left,\n this.top + this.textSize.height / 2 + this.margin.top, selected, hover);\n\n // disable shadows for other elements.\n this.disableShadow(ctx, values);\n\n this.updateBoundingBox(x, y, ctx, selected, hover);\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} angle\n * @returns {number}\n */\n distanceToBorder(ctx, angle) {\n return this._distanceToBorder(ctx,angle);\n }\n}\n\nexport default Text;\n","'use strict';\n\nimport ShapeBase from '../util/ShapeBase'\n\n/**\n * A Triangle Node/Cluster shape.\n *\n * @extends ShapeBase\n */\nclass Triangle extends ShapeBase {\n /**\n * @param {Object} options\n * @param {Object} body\n * @param {Label} labelModule\n */\n constructor(options, body, labelModule) {\n super(options, body, labelModule)\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} x\n * @param {number} y\n * @param {boolean} selected\n * @param {boolean} hover\n * @param {ArrowOptions} values\n */\n draw(ctx, x, y, selected, hover, values) {\n this._drawShape(ctx, 'triangle', 3, x, y, selected, hover, values);\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} angle\n * @returns {number}\n */\n distanceToBorder(ctx, angle) {\n return this._distanceToBorder(ctx,angle);\n }\n}\n\nexport default Triangle;\n","'use strict';\n\nimport ShapeBase from '../util/ShapeBase'\n\n/**\n * A downward facing Triangle Node/Cluster shape.\n *\n * @extends ShapeBase\n */\nclass TriangleDown extends ShapeBase {\n /**\n * @param {Object} options\n * @param {Object} body\n * @param {Label} labelModule\n */\n constructor(options, body, labelModule) {\n super(options, body, labelModule)\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} x\n * @param {number} y\n * @param {boolean} selected\n * @param {boolean} hover\n * @param {ArrowOptions} values\n */\n draw(ctx, x, y, selected, hover, values) {\n this._drawShape(ctx, 'triangleDown', 3, x, y, selected, hover, values);\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} angle\n * @returns {number}\n */\n distanceToBorder(ctx, angle) {\n return this._distanceToBorder(ctx,angle);\n }\n}\n\nexport default TriangleDown;\n","import util from 'vis-util';\n\nlet errorFound = false;\nlet allOptions;\nlet printStyle = 'background: #FFeeee; color: #dd0000';\n/**\n * Used to validate options.\n */\nclass Validator {\n /**\n * @ignore\n */\n constructor() {\n }\n\n /**\n * Main function to be called\n * @param {Object} options\n * @param {Object} referenceOptions\n * @param {Object} subObject\n * @returns {boolean}\n * @static\n */\n static validate(options, referenceOptions, subObject) {\n errorFound = false;\n allOptions = referenceOptions;\n let usedOptions = referenceOptions;\n if (subObject !== undefined) {\n usedOptions = referenceOptions[subObject];\n }\n Validator.parse(options, usedOptions, []);\n return errorFound;\n }\n\n\n /**\n * Will traverse an object recursively and check every value\n * @param {Object} options\n * @param {Object} referenceOptions\n * @param {array} path | where to look for the actual option\n * @static\n */\n static parse(options, referenceOptions, path) {\n for (let option in options) {\n if (options.hasOwnProperty(option)) {\n Validator.check(option, options, referenceOptions, path);\n }\n }\n }\n\n\n /**\n * Check every value. If the value is an object, call the parse function on that object.\n * @param {string} option\n * @param {Object} options\n * @param {Object} referenceOptions\n * @param {array} path | where to look for the actual option\n * @static\n */\n static check(option, options, referenceOptions, path) {\n if (referenceOptions[option] === undefined && referenceOptions.__any__ === undefined) {\n Validator.getSuggestion(option, referenceOptions, path);\n return;\n }\n\n let referenceOption = option;\n let is_object = true;\n\n if (referenceOptions[option] === undefined && referenceOptions.__any__ !== undefined) {\n // NOTE: This only triggers if the __any__ is in the top level of the options object.\n // THAT'S A REALLY BAD PLACE TO ALLOW IT!!!!\n // TODO: Examine if needed, remove if possible\n\n // __any__ is a wildcard. Any value is accepted and will be further analysed by reference.\n referenceOption = '__any__';\n\n // if the any-subgroup is not a predefined object in the configurator,\n // we do not look deeper into the object.\n is_object = (Validator.getType(options[option]) === 'object');\n }\n else {\n // Since all options in the reference are objects, we can check whether \n // they are supposed to be the object to look for the __type__ field.\n // if this is an object, we check if the correct type has been supplied to account for shorthand options.\n }\n\n let refOptionObj = referenceOptions[referenceOption];\n if (is_object && refOptionObj.__type__ !== undefined) {\n refOptionObj = refOptionObj.__type__;\n }\n\n Validator.checkFields(option, options, referenceOptions, referenceOption, refOptionObj, path);\n }\n\n /**\n *\n * @param {string} option | the option property\n * @param {Object} options | The supplied options object\n * @param {Object} referenceOptions | The reference options containing all options and their allowed formats\n * @param {string} referenceOption | Usually this is the same as option, except when handling an __any__ tag.\n * @param {string} refOptionObj | This is the type object from the reference options\n * @param {Array} path | where in the object is the option\n * @static\n */\n static checkFields(option, options, referenceOptions, referenceOption, refOptionObj, path) {\n let log = function(message) {\n console.log('%c' + message + Validator.printLocation(path, option), printStyle);\n };\n\n let optionType = Validator.getType(options[option]);\n let refOptionType = refOptionObj[optionType];\n\n if (refOptionType !== undefined) {\n // if the type is correct, we check if it is supposed to be one of a few select values\n if (Validator.getType(refOptionType) === 'array' && refOptionType.indexOf(options[option]) === -1) {\n log('Invalid option detected in \"' + option + '\".' +\n ' Allowed values are:' + Validator.print(refOptionType) +\n ' not \"' + options[option] + '\". ');\n errorFound = true;\n }\n else if (optionType === 'object' && referenceOption !== \"__any__\") {\n path = util.copyAndExtendArray(path, option);\n Validator.parse(options[option], referenceOptions[referenceOption], path);\n }\n }\n else if (refOptionObj['any'] === undefined) {\n // type of the field is incorrect and the field cannot be any\n log('Invalid type received for \"' + option +\n '\". Expected: ' + Validator.print(Object.keys(refOptionObj)) +\n '. Received [' + optionType + '] \"' + options[option] + '\"');\n errorFound = true;\n }\n }\n\n /**\n *\n * @param {Object|boolean|number|string|Array.|Date|Node|Moment|undefined|null} object\n * @returns {string}\n * @static\n */\n static getType(object) {\n var type = typeof object;\n\n if (type === 'object') {\n if (object === null) {\n return 'null';\n }\n if (object instanceof Boolean) {\n return 'boolean';\n }\n if (object instanceof Number) {\n return 'number';\n }\n if (object instanceof String) {\n return 'string';\n }\n if (Array.isArray(object)) {\n return 'array';\n }\n if (object instanceof Date) {\n return 'date';\n }\n if (object.nodeType !== undefined) {\n return 'dom';\n }\n if (object._isAMomentObject === true) {\n return 'moment';\n }\n return 'object';\n }\n else if (type === 'number') {\n return 'number';\n }\n else if (type === 'boolean') {\n return 'boolean';\n }\n else if (type === 'string') {\n return 'string';\n }\n else if (type === undefined) {\n return 'undefined';\n }\n return type;\n }\n\n /**\n * @param {string} option\n * @param {Object} options\n * @param {Array.} path\n * @static\n */\n static getSuggestion(option, options, path) {\n let localSearch = Validator.findInOptions(option,options,path,false);\n let globalSearch = Validator.findInOptions(option,allOptions,[],true);\n\n let localSearchThreshold = 8;\n let globalSearchThreshold = 4;\n\n let msg;\n if (localSearch.indexMatch !== undefined) {\n msg = ' in ' + Validator.printLocation(localSearch.path, option,'') +\n 'Perhaps it was incomplete? Did you mean: \"' + localSearch.indexMatch + '\"?\\n\\n';\n }\n else if (globalSearch.distance <= globalSearchThreshold && localSearch.distance > globalSearch.distance) {\n msg = ' in ' + Validator.printLocation(localSearch.path, option,'') +\n 'Perhaps it was misplaced? Matching option found at: ' +\n Validator.printLocation(globalSearch.path, globalSearch.closestMatch,'');\n }\n else if (localSearch.distance <= localSearchThreshold) {\n msg = '. Did you mean \"' + localSearch.closestMatch + '\"?' +\n Validator.printLocation(localSearch.path, option);\n }\n else {\n msg = '. Did you mean one of these: ' + Validator.print(Object.keys(options)) +\n Validator.printLocation(path, option);\n }\n\n console.log('%cUnknown option detected: \"' + option + '\"' + msg, printStyle);\n errorFound = true;\n }\n\n /**\n * traverse the options in search for a match.\n * @param {string} option\n * @param {Object} options\n * @param {Array} path | where to look for the actual option\n * @param {boolean} [recursive=false]\n * @returns {{closestMatch: string, path: Array, distance: number}}\n * @static\n */\n static findInOptions(option, options, path, recursive = false) {\n let min = 1e9;\n let closestMatch = '';\n let closestMatchPath = [];\n let lowerCaseOption = option.toLowerCase();\n let indexMatch = undefined;\n for (let op in options) { // eslint-disable-line guard-for-in\n let distance;\n if (options[op].__type__ !== undefined && recursive === true) {\n let result = Validator.findInOptions(option, options[op], util.copyAndExtendArray(path,op));\n if (min > result.distance) {\n closestMatch = result.closestMatch;\n closestMatchPath = result.path;\n min = result.distance;\n indexMatch = result.indexMatch;\n }\n }\n else {\n if (op.toLowerCase().indexOf(lowerCaseOption) !== -1) {\n indexMatch = op;\n }\n distance = Validator.levenshteinDistance(option, op);\n if (min > distance) {\n closestMatch = op;\n closestMatchPath = util.copyArray(path);\n min = distance;\n }\n }\n }\n return {closestMatch:closestMatch, path:closestMatchPath, distance:min, indexMatch: indexMatch};\n }\n\n /**\n * @param {Array.} path\n * @param {Object} option\n * @param {string} prefix\n * @returns {String}\n * @static\n */\n static printLocation(path, option, prefix = 'Problem value found at: \\n') {\n let str = '\\n\\n' + prefix + 'options = {\\n';\n for (let i = 0; i < path.length; i++) {\n for (let j = 0; j < i + 1; j++) {\n str += ' ';\n }\n str += path[i] + ': {\\n'\n }\n for (let j = 0; j < path.length + 1; j++) {\n str += ' ';\n }\n str += option + '\\n';\n for (let i = 0; i < path.length + 1; i++) {\n for (let j = 0; j < path.length - i; j++) {\n str += ' ';\n }\n str += '}\\n'\n }\n return str + '\\n\\n';\n }\n\n /**\n * @param {Object} options\n * @returns {String}\n * @static\n */\n static print(options) {\n return JSON.stringify(options).replace(/(\\\")|(\\[)|(\\])|(,\"__type__\")/g, \"\").replace(/(\\,)/g, ', ')\n }\n\n\n /**\n * Compute the edit distance between the two given strings\n * http://en.wikibooks.org/wiki/Algorithm_Implementation/Strings/Levenshtein_distance#JavaScript\n *\n * Copyright (c) 2011 Andrei Mackenzie\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n *\n * @param {string} a\n * @param {string} b\n * @returns {Array.>}}\n * @static\n */\n static levenshteinDistance(a, b) {\n if (a.length === 0) return b.length;\n if (b.length === 0) return a.length;\n\n var matrix = [];\n\n // increment along the first column of each row\n var i;\n for (i = 0; i <= b.length; i++) {\n matrix[i] = [i];\n }\n\n // increment each column in the first row\n var j;\n for (j = 0; j <= a.length; j++) {\n matrix[0][j] = j;\n }\n\n // Fill in the rest of the matrix\n for (i = 1; i <= b.length; i++) {\n for (j = 1; j <= a.length; j++) {\n if (b.charAt(i - 1) == a.charAt(j - 1)) {\n matrix[i][j] = matrix[i - 1][j - 1];\n } else {\n matrix[i][j] = Math.min(matrix[i - 1][j - 1] + 1, // substitution\n Math.min(matrix[i][j - 1] + 1, // insertion\n matrix[i - 1][j] + 1)); // deletion\n }\n }\n }\n\n return matrix[b.length][a.length];\n }\n}\n\n\nexport {\n Validator,\n printStyle\n};\n","import util from 'vis-util';\n\nimport Label from './shared/Label';\nimport ComponentUtil from './shared/ComponentUtil';\nimport Box from './nodes/shapes/Box';\nimport Circle from './nodes/shapes/Circle';\nimport CircularImage from './nodes/shapes/CircularImage';\nimport Database from './nodes/shapes/Database';\nimport Diamond from './nodes/shapes/Diamond';\nimport Dot from './nodes/shapes/Dot';\nimport Ellipse from './nodes/shapes/Ellipse';\nimport Icon from './nodes/shapes/Icon';\nimport Image from './nodes/shapes/Image';\nimport Square from './nodes/shapes/Square';\nimport Hexagon from './nodes/shapes/Hexagon';\nimport Star from './nodes/shapes/Star';\nimport Text from './nodes/shapes/Text';\nimport Triangle from './nodes/shapes/Triangle';\nimport TriangleDown from './nodes/shapes/TriangleDown';\nimport { printStyle } from \"../../../shared/Validator\";\n\n\n/**\n * A node. A node can be connected to other nodes via one or multiple edges.\n */\nclass Node {\n /**\n *\n * @param {object} options An object containing options for the node. All\n * options are optional, except for the id.\n * {number} id Id of the node. Required\n * {string} label Text label for the node\n * {number} x Horizontal position of the node\n * {number} y Vertical position of the node\n * {string} shape Node shape\n * {string} image An image url\n * {string} title A title text, can be HTML\n * {anytype} group A group name or number\n *\n * @param {Object} body Shared state of current network instance\n * @param {Network.Images} imagelist A list with images. Only needed when the node has an image\n * @param {Groups} grouplist A list with groups. Needed for retrieving group options\n * @param {Object} globalOptions Current global node options; these serve as defaults for the node instance\n * @param {Object} defaultOptions Global default options for nodes; note that this is also the prototype\n * for parameter `globalOptions`.\n */\n constructor(options, body, imagelist, grouplist, globalOptions, defaultOptions) {\n this.options = util.bridgeObject(globalOptions);\n this.globalOptions = globalOptions;\n this.defaultOptions = defaultOptions;\n this.body = body;\n\n this.edges = []; // all edges connected to this node\n\n // set defaults for the options\n this.id = undefined;\n this.imagelist = imagelist;\n this.grouplist = grouplist;\n\n // state options\n this.x = undefined;\n this.y = undefined;\n this.baseSize = this.options.size;\n this.baseFontSize = this.options.font.size;\n this.predefinedPosition = false; // used to check if initial fit should just take the range or approximate\n this.selected = false;\n this.hover = false;\n\n this.labelModule = new Label(this.body, this.options, false /* Not edge label */);\n this.setOptions(options);\n }\n\n\n /**\n * Attach a edge to the node\n * @param {Edge} edge\n */\n attachEdge(edge) {\n if (this.edges.indexOf(edge) === -1) {\n this.edges.push(edge);\n }\n }\n\n\n /**\n * Detach a edge from the node\n *\n * @param {Edge} edge\n */\n detachEdge(edge) {\n var index = this.edges.indexOf(edge);\n if (index != -1) {\n this.edges.splice(index, 1);\n }\n }\n\n\n /**\n * Set or overwrite options for the node\n *\n * @param {Object} options an object with options\n * @returns {null|boolean}\n */\n setOptions(options) {\n let currentShape = this.options.shape;\n if (!options) {\n return; // Note that the return value will be 'undefined'! This is OK.\n }\n\n // basic options\n if (options.id !== undefined) {this.id = options.id;}\n\n if (this.id === undefined) {\n throw new Error(\"Node must have an id\");\n }\n\n Node.checkMass(options, this.id);\n\n // set these options locally\n // clear x and y positions\n if (options.x !== undefined) {\n if (options.x === null) {this.x = undefined; this.predefinedPosition = false;}\n else {this.x = parseInt(options.x); this.predefinedPosition = true;}\n }\n if (options.y !== undefined) {\n if (options.y === null) {this.y = undefined; this.predefinedPosition = false;}\n else {this.y = parseInt(options.y); this.predefinedPosition = true;}\n }\n if (options.size !== undefined) {this.baseSize = options.size;}\n if (options.value !== undefined) {options.value = parseFloat(options.value);}\n\n // this transforms all shorthands into fully defined options\n Node.parseOptions(this.options, options, true, this.globalOptions, this.grouplist);\n\n let pile = [options, this.options, this.defaultOptions];\n this.chooser = ComponentUtil.choosify('node', pile);\n\n this._load_images();\n this.updateLabelModule(options);\n this.updateShape(currentShape);\n\n return (options.hidden !== undefined || options.physics !== undefined);\n }\n\n\n /**\n * Load the images from the options, for the nodes that need them.\n *\n * Images are always loaded, even if they are not used in the current shape.\n * The user may switch to an image shape later on.\n *\n * @private\n */\n _load_images() {\n if (this.options.shape === 'circularImage' || this.options.shape === 'image') {\n if (this.options.image === undefined) {\n throw new Error(\"Option image must be defined for node type '\" + this.options.shape + \"'\");\n }\n }\n\n if (this.options.image === undefined) {\n return;\n }\n\n if (this.imagelist === undefined) {\n throw new Error(\"Internal Error: No images provided\");\n }\n\n if (typeof this.options.image === 'string') {\n this.imageObj = this.imagelist.load(this.options.image, this.options.brokenImage, this.id);\n } else {\n if (this.options.image.unselected === undefined) {\n throw new Error(\"No unselected image provided\");\n }\n\n this.imageObj = this.imagelist.load(this.options.image.unselected, this.options.brokenImage, this.id);\n\n if (this.options.image.selected !== undefined) {\n this.imageObjAlt = this.imagelist.load(this.options.image.selected, this.options.brokenImage, this.id);\n } else {\n this.imageObjAlt = undefined;\n }\n }\n }\n\n\n /**\n * Copy group option values into the node options.\n *\n * The group options override the global node options, so the copy of group options\n * must happen *after* the global node options have been set.\n *\n * This method must also be called also if the global node options have changed and the group options did not.\n *\n * @param {Object} parentOptions\n * @param {Object} newOptions new values for the options, currently only passed in for check\n * @param {Object} groupList\n */\n static updateGroupOptions(parentOptions, newOptions, groupList) {\n if (groupList === undefined) return; // No groups, nothing to do\n\n var group = parentOptions.group;\n\n // paranoia: the selected group is already merged into node options, check.\n if (newOptions !== undefined && newOptions.group !== undefined && group !== newOptions.group) {\n throw new Error(\"updateGroupOptions: group values in options don't match.\");\n }\n\n var hasGroup = (typeof group === 'number' || (typeof group === 'string' && group != ''));\n if (!hasGroup) return; // current node has no group, no need to merge\n\n var groupObj = groupList.get(group);\n\n // Skip merging of group font options into parent; these are required to be distinct for labels\n // Also skip mergin of color IF it is already defined in the node itself. This is to avoid the color of the\n // group overriding the color set at the node level\n // TODO: It might not be a good idea either to merge the rest of the options, investigate this.\n var skipProperties = ['font'];\n if (newOptions !== undefined && newOptions.color !== undefined && newOptions.color != null) skipProperties.push('color');\n util.selectiveNotDeepExtend(skipProperties, parentOptions, groupObj);\n\n // the color object needs to be completely defined.\n // Since groups can partially overwrite the colors, we parse it again, just in case.\n parentOptions.color = util.parseColor(parentOptions.color);\n }\n\n\n /**\n * This process all possible shorthands in the new options and makes sure that the parentOptions are fully defined.\n * Static so it can also be used by the handler.\n *\n * @param {Object} parentOptions\n * @param {Object} newOptions\n * @param {boolean} [allowDeletion=false]\n * @param {Object} [globalOptions={}]\n * @param {Object} [groupList]\n * @static\n */\n static parseOptions(parentOptions, newOptions, allowDeletion = false, globalOptions = {}, groupList) {\n\n var fields = [\n 'color',\n 'fixed',\n 'shadow'\n ];\n util.selectiveNotDeepExtend(fields, parentOptions, newOptions, allowDeletion);\n\n Node.checkMass(newOptions);\n\n // merge the shadow options into the parent.\n util.mergeOptions(parentOptions, newOptions, 'shadow', globalOptions);\n\n // individual shape newOptions\n if (newOptions.color !== undefined && newOptions.color !== null) {\n let parsedColor = util.parseColor(newOptions.color);\n util.fillIfDefined(parentOptions.color, parsedColor);\n }\n else if (allowDeletion === true && newOptions.color === null) {\n parentOptions.color = util.bridgeObject(globalOptions.color); // set the object back to the global options\n }\n\n // handle the fixed options\n if (newOptions.fixed !== undefined && newOptions.fixed !== null) {\n if (typeof newOptions.fixed === 'boolean') {\n parentOptions.fixed.x = newOptions.fixed;\n parentOptions.fixed.y = newOptions.fixed;\n }\n else {\n if (newOptions.fixed.x !== undefined && typeof newOptions.fixed.x === 'boolean') {\n parentOptions.fixed.x = newOptions.fixed.x;\n }\n if (newOptions.fixed.y !== undefined && typeof newOptions.fixed.y === 'boolean') {\n parentOptions.fixed.y = newOptions.fixed.y;\n }\n }\n }\n\n if (allowDeletion === true && newOptions.font === null) {\n parentOptions.font = util.bridgeObject(globalOptions.font); // set the object back to the global options\n }\n\n Node.updateGroupOptions(parentOptions, newOptions, groupList);\n\n // handle the scaling options, specifically the label part\n if (newOptions.scaling !== undefined) {\n util.mergeOptions(parentOptions.scaling, newOptions.scaling, 'label', globalOptions.scaling);\n }\n }\n\n\n /**\n *\n * @returns {{color: *, borderWidth: *, borderColor: *, size: *, borderDashes: (boolean|Array|allOptions.nodes.shapeProperties.borderDashes|{boolean, array}), borderRadius: (number|allOptions.nodes.shapeProperties.borderRadius|{number}|Array), shadow: *, shadowColor: *, shadowSize: *, shadowX: *, shadowY: *}}\n */\n getFormattingValues() {\n let values = {\n color: this.options.color.background,\n borderWidth: this.options.borderWidth,\n borderColor: this.options.color.border,\n size: this.options.size,\n borderDashes: this.options.shapeProperties.borderDashes,\n borderRadius: this.options.shapeProperties.borderRadius,\n shadow: this.options.shadow.enabled,\n shadowColor: this.options.shadow.color,\n shadowSize: this.options.shadow.size,\n shadowX: this.options.shadow.x,\n shadowY: this.options.shadow.y\n };\n if (this.selected || this.hover) {\n if (this.chooser === true) {\n if (this.selected) {\n values.borderWidth *= 2;\n values.color = this.options.color.highlight.background;\n values.borderColor = this.options.color.highlight.border;\n values.shadow = this.options.shadow.enabled;\n } else if (this.hover) {\n values.color = this.options.color.hover.background;\n values.borderColor = this.options.color.hover.border;\n values.shadow = this.options.shadow.enabled;\n }\n } else if (typeof this.chooser === 'function') {\n this.chooser(values, this.options.id, this.selected, this.hover);\n if (values.shadow === false) {\n if ((values.shadowColor !== this.options.shadow.color) ||\n (values.shadowSize !== this.options.shadow.size) ||\n (values.shadowX !== this.options.shadow.x) ||\n (values.shadowY !== this.options.shadow.y)) {\n values.shadow = true;\n }\n }\n }\n } else {\n values.shadow = this.options.shadow.enabled;\n }\n return values;\n }\n\n\n /**\n *\n * @param {Object} options\n */\n updateLabelModule(options) {\n if (this.options.label === undefined || this.options.label === null) {\n this.options.label = '';\n }\n\n Node.updateGroupOptions(this.options, options, this.grouplist);\n\n //\n // Note:The prototype chain for this.options is:\n //\n // this.options -> NodesHandler.options -> NodesHandler.defaultOptions\n // (also: this.globalOptions)\n //\n // Note that the prototypes are mentioned explicitly in the pile list below;\n // WE DON'T WANT THE ORDER OF THE PROTOTYPES!!!! At least, not for font handling of labels.\n // This is a good indication that the prototype usage of options is deficient.\n //\n var currentGroup = this.grouplist.get(this.options.group, false);\n let pile = [\n options, // new options\n this.options, // current node options, see comment above for prototype\n currentGroup, // group options, if any\n this.globalOptions, // Currently set global node options\n this.defaultOptions // Default global node options\n ];\n this.labelModule.update(this.options, pile);\n\n if (this.labelModule.baseSize !== undefined) {\n this.baseFontSize = this.labelModule.baseSize;\n }\n }\n\n\n /**\n *\n * @param {string} currentShape\n */\n updateShape(currentShape) {\n if (currentShape === this.options.shape && this.shape) {\n this.shape.setOptions(this.options, this.imageObj, this.imageObjAlt);\n }\n else {\n // choose draw method depending on the shape\n switch (this.options.shape) {\n case 'box':\n this.shape = new Box(this.options, this.body, this.labelModule);\n break;\n case 'circle':\n this.shape = new Circle(this.options, this.body, this.labelModule);\n break;\n case 'circularImage':\n this.shape = new CircularImage(this.options, this.body, this.labelModule, this.imageObj, this.imageObjAlt);\n break;\n case 'database':\n this.shape = new Database(this.options, this.body, this.labelModule);\n break;\n case 'diamond':\n this.shape = new Diamond(this.options, this.body, this.labelModule);\n break;\n case 'dot':\n this.shape = new Dot(this.options, this.body, this.labelModule);\n break;\n case 'ellipse':\n this.shape = new Ellipse(this.options, this.body, this.labelModule);\n break;\n case 'icon':\n this.shape = new Icon(this.options, this.body, this.labelModule);\n break;\n case 'image':\n this.shape = new Image(this.options, this.body, this.labelModule, this.imageObj, this.imageObjAlt);\n break;\n case 'square':\n this.shape = new Square(this.options, this.body, this.labelModule);\n break;\n case 'hexagon':\n this.shape = new Hexagon(this.options, this.body, this.labelModule);\n break;\n case 'star':\n this.shape = new Star(this.options, this.body, this.labelModule);\n break;\n case 'text':\n this.shape = new Text(this.options, this.body, this.labelModule);\n break;\n case 'triangle':\n this.shape = new Triangle(this.options, this.body, this.labelModule);\n break;\n case 'triangleDown':\n this.shape = new TriangleDown(this.options, this.body, this.labelModule);\n break;\n default:\n this.shape = new Ellipse(this.options, this.body, this.labelModule);\n break;\n }\n }\n this.needsRefresh();\n }\n\n\n /**\n * select this node\n */\n select() {\n this.selected = true;\n this.needsRefresh();\n }\n\n\n /**\n * unselect this node\n */\n unselect() {\n this.selected = false;\n this.needsRefresh();\n }\n\n\n\n /**\n * Reset the calculated size of the node, forces it to recalculate its size\n */\n needsRefresh() {\n this.shape.refreshNeeded = true;\n }\n\n\n /**\n * get the title of this node.\n * @return {string} title The title of the node, or undefined when no title\n * has been set.\n */\n getTitle() {\n return this.options.title;\n }\n\n\n /**\n * Calculate the distance to the border of the Node\n * @param {CanvasRenderingContext2D} ctx\n * @param {number} angle Angle in radians\n * @returns {number} distance Distance to the border in pixels\n */\n distanceToBorder(ctx, angle) {\n return this.shape.distanceToBorder(ctx,angle);\n }\n\n\n /**\n * Check if this node has a fixed x and y position\n * @return {boolean} true if fixed, false if not\n */\n isFixed() {\n return (this.options.fixed.x && this.options.fixed.y);\n }\n\n\n /**\n * check if this node is selecte\n * @return {boolean} selected True if node is selected, else false\n */\n isSelected() {\n return this.selected;\n }\n\n\n /**\n * Retrieve the value of the node. Can be undefined\n * @return {number} value\n */\n getValue() {\n return this.options.value;\n }\n\n\n /**\n * Get the current dimensions of the label\n *\n * @return {rect}\n */\n getLabelSize() {\n return this.labelModule.size();\n }\n\n\n /**\n * Adjust the value range of the node. The node will adjust it's size\n * based on its value.\n * @param {number} min\n * @param {number} max\n * @param {number} total\n */\n setValueRange(min, max, total) {\n if (this.options.value !== undefined) {\n var scale = this.options.scaling.customScalingFunction(min, max, total, this.options.value);\n var sizeDiff = this.options.scaling.max - this.options.scaling.min;\n if (this.options.scaling.label.enabled === true) {\n var fontDiff = this.options.scaling.label.max - this.options.scaling.label.min;\n this.options.font.size = this.options.scaling.label.min + scale * fontDiff;\n }\n this.options.size = this.options.scaling.min + scale * sizeDiff;\n }\n else {\n this.options.size = this.baseSize;\n this.options.font.size = this.baseFontSize;\n }\n\n this.updateLabelModule();\n }\n\n\n /**\n * Draw this node in the given canvas\n * The 2d context of a HTML canvas can be retrieved by canvas.getContext(\"2d\");\n * @param {CanvasRenderingContext2D} ctx\n */\n draw(ctx) {\n let values = this.getFormattingValues();\n this.shape.draw(ctx, this.x, this.y, this.selected, this.hover, values);\n }\n\n\n /**\n * Update the bounding box of the shape\n * @param {CanvasRenderingContext2D} ctx\n */\n updateBoundingBox(ctx) {\n this.shape.updateBoundingBox(this.x,this.y,ctx);\n }\n\n\n /**\n * Recalculate the size of this node in the given canvas\n * The 2d context of a HTML canvas can be retrieved by canvas.getContext(\"2d\");\n * @param {CanvasRenderingContext2D} ctx\n */\n resize(ctx) {\n let values = this.getFormattingValues();\n this.shape.resize(ctx, this.selected, this.hover, values);\n }\n\n\n /**\n * Determine all visual elements of this node instance, in which the given\n * point falls within the bounding shape.\n *\n * @param {point} point\n * @returns {Array.} list with the items which are on the point\n */\n getItemsOnPoint(point) {\n var ret = [];\n\n if (this.labelModule.visible()) {\n if (ComponentUtil.pointInRect(this.labelModule.getSize(), point)) {\n ret.push({nodeId:this.id, labelId:0});\n }\n }\n\n if (ComponentUtil.pointInRect(this.shape.boundingBox, point)) {\n ret.push({nodeId:this.id});\n }\n\n return ret;\n }\n\n\n /**\n * Check if this object is overlapping with the provided object\n * @param {Object} obj an object with parameters left, top, right, bottom\n * @return {boolean} True if location is located on node\n */\n isOverlappingWith(obj) {\n return (\n this.shape.left < obj.right &&\n this.shape.left + this.shape.width > obj.left &&\n this.shape.top < obj.bottom &&\n this.shape.top + this.shape.height > obj.top\n );\n }\n\n\n /**\n * Check if this object is overlapping with the provided object\n * @param {Object} obj an object with parameters left, top, right, bottom\n * @return {boolean} True if location is located on node\n */\n isBoundingBoxOverlappingWith(obj) {\n return (\n this.shape.boundingBox.left < obj.right &&\n this.shape.boundingBox.right > obj.left &&\n this.shape.boundingBox.top < obj.bottom &&\n this.shape.boundingBox.bottom > obj.top\n );\n }\n\n\n /**\n * Check valid values for mass\n *\n * The mass may not be negative or zero. If it is, reset to 1\n *\n * @param {object} options\n * @param {Node.id} id\n * @static\n */\n static checkMass(options, id) {\n if (options.mass !== undefined && options.mass <= 0) {\n let strId = '';\n if (id !== undefined) {\n strId = ' in node id: ' + id;\n }\n console.log('%cNegative or zero mass disallowed' + strId +\n ', setting mass to 1.' , printStyle);\n options.mass = 1;\n }\n }\n}\n\nexport default Node;\n","import util from 'vis-util';\nimport { DataSet, DataView } from 'vis-data';\nimport Node from \"./components/Node\";\n\n/**\n * Handler for Nodes\n */\nclass NodesHandler {\n /**\n * @param {Object} body\n * @param {Images} images\n * @param {Array.} groups\n * @param {LayoutEngine} layoutEngine\n */\n constructor(body, images, groups, layoutEngine) {\n this.body = body;\n this.images = images;\n this.groups = groups;\n this.layoutEngine = layoutEngine;\n\n // create the node API in the body container\n this.body.functions.createNode = this.create.bind(this);\n\n this.nodesListeners = {\n add: (event, params) => { this.add(params.items); },\n update: (event, params) => { this.update(params.items, params.data, params.oldData); },\n remove: (event, params) => { this.remove(params.items); }\n };\n\n this.defaultOptions = {\n borderWidth: 1,\n borderWidthSelected: 2,\n brokenImage: undefined,\n color: {\n border: '#2B7CE9',\n background: '#97C2FC',\n highlight: {\n border: '#2B7CE9',\n background: '#D2E5FF'\n },\n hover: {\n border: '#2B7CE9',\n background: '#D2E5FF'\n }\n },\n fixed: {\n x: false,\n y: false\n },\n font: {\n color: '#343434',\n size: 14, // px\n face: 'arial',\n background: 'none',\n strokeWidth: 0, // px\n strokeColor: '#ffffff',\n align: 'center',\n vadjust: 0,\n multi: false,\n bold: {\n mod: 'bold'\n },\n boldital: {\n mod: 'bold italic'\n },\n ital: {\n mod: 'italic'\n },\n mono: {\n mod: '',\n size: 15, // px\n face: 'monospace',\n vadjust: 2\n }\n },\n group: undefined,\n hidden: false,\n icon: {\n face: 'FontAwesome', //'FontAwesome',\n code: undefined, //'\\uf007',\n size: 50, //50,\n color: '#2B7CE9' //'#aa00ff'\n },\n image: undefined, // --> URL\n label: undefined,\n labelHighlightBold: true,\n level: undefined,\n margin: {\n top: 5,\n right: 5,\n bottom: 5,\n left: 5\n },\n mass: 1,\n physics: true,\n scaling: {\n min: 10,\n max: 30,\n label: {\n enabled: false,\n min: 14,\n max: 30,\n maxVisible: 30,\n drawThreshold: 5\n },\n customScalingFunction: function (min, max, total, value) {\n if (max === min) {\n return 0.5;\n }\n else {\n let scale = 1 / (max - min);\n return Math.max(0, (value - min) * scale);\n }\n }\n },\n shadow: {\n enabled: false,\n color: 'rgba(0,0,0,0.5)',\n size: 10,\n x: 5,\n y: 5\n },\n shape: 'ellipse',\n shapeProperties: {\n borderDashes: false, // only for borders\n borderRadius: 6, // only for box shape\n interpolation: true, // only for image and circularImage shapes\n useImageSize: false, // only for image and circularImage shapes\n useBorderWithImage: false // only for image shape\n },\n size: 25,\n title: undefined,\n value: undefined,\n x: undefined,\n y: undefined\n };\n\n // Protect from idiocy\n if (this.defaultOptions.mass <= 0) {\n throw 'Internal error: mass in defaultOptions of NodesHandler may not be zero or negative';\n }\n\n this.options = util.bridgeObject(this.defaultOptions);\n\n this.bindEventListeners();\n }\n\n /**\n * Binds event listeners\n */\n bindEventListeners() {\n // refresh the nodes. Used when reverting from hierarchical layout\n this.body.emitter.on('refreshNodes', this.refresh.bind(this));\n this.body.emitter.on('refresh', this.refresh.bind(this));\n this.body.emitter.on('destroy', () => {\n util.forEach(this.nodesListeners, (callback, event) => {\n if (this.body.data.nodes)\n this.body.data.nodes.off(event, callback);\n });\n delete this.body.functions.createNode;\n delete this.nodesListeners.add;\n delete this.nodesListeners.update;\n delete this.nodesListeners.remove;\n delete this.nodesListeners;\n });\n }\n\n /**\n *\n * @param {Object} options\n */\n setOptions(options) {\n if (options !== undefined) {\n Node.parseOptions(this.options, options);\n\n // update the shape in all nodes\n if (options.shape !== undefined) {\n for (let nodeId in this.body.nodes) {\n if (this.body.nodes.hasOwnProperty(nodeId)) {\n this.body.nodes[nodeId].updateShape();\n }\n }\n }\n\n // update the font in all nodes\n if (options.font !== undefined) {\n for (let nodeId in this.body.nodes) {\n if (this.body.nodes.hasOwnProperty(nodeId)) {\n this.body.nodes[nodeId].updateLabelModule();\n this.body.nodes[nodeId].needsRefresh();\n }\n }\n }\n\n // update the shape size in all nodes\n if (options.size !== undefined) {\n for (let nodeId in this.body.nodes) {\n if (this.body.nodes.hasOwnProperty(nodeId)) {\n this.body.nodes[nodeId].needsRefresh();\n }\n }\n }\n\n // update the state of the variables if needed\n if (options.hidden !== undefined || options.physics !== undefined) {\n this.body.emitter.emit('_dataChanged');\n }\n }\n }\n\n /**\n * Set a data set with nodes for the network\n * @param {Array | DataSet | DataView} nodes The data containing the nodes.\n * @param {boolean} [doNotEmit=false]\n * @private\n */\n setData(nodes, doNotEmit = false) {\n let oldNodesData = this.body.data.nodes;\n\n if (nodes instanceof DataSet || nodes instanceof DataView) {\n this.body.data.nodes = nodes;\n }\n else if (Array.isArray(nodes)) {\n this.body.data.nodes = new DataSet();\n this.body.data.nodes.add(nodes);\n }\n else if (!nodes) {\n this.body.data.nodes = new DataSet();\n }\n else {\n throw new TypeError('Array or DataSet expected');\n }\n\n if (oldNodesData) {\n // unsubscribe from old dataset\n util.forEach(this.nodesListeners, function (callback, event) {\n oldNodesData.off(event, callback);\n });\n }\n\n // remove drawn nodes\n this.body.nodes = {};\n\n if (this.body.data.nodes) {\n // subscribe to new dataset\n let me = this;\n util.forEach(this.nodesListeners, function (callback, event) {\n me.body.data.nodes.on(event, callback);\n });\n\n // draw all new nodes\n let ids = this.body.data.nodes.getIds();\n this.add(ids, true);\n }\n\n if (doNotEmit === false) {\n this.body.emitter.emit(\"_dataChanged\");\n }\n }\n\n\n /**\n * Add nodes\n * @param {number[] | string[]} ids\n * @param {boolean} [doNotEmit=false]\n * @private\n */\n add(ids, doNotEmit = false) {\n let id;\n let newNodes = [];\n for (let i = 0; i < ids.length; i++) {\n id = ids[i];\n let properties = this.body.data.nodes.get(id);\n let node = this.create(properties);\n newNodes.push(node);\n this.body.nodes[id] = node; // note: this may replace an existing node\n }\n\n this.layoutEngine.positionInitially(newNodes);\n\n if (doNotEmit === false) {\n this.body.emitter.emit(\"_dataChanged\");\n }\n }\n\n /**\n * Update existing nodes, or create them when not yet existing\n * @param {number[] | string[]} ids id's of changed nodes\n * @param {Array} changedData array with changed data\n * @param {Array|undefined} oldData optional; array with previous data\n * @private\n */\n update(ids, changedData, oldData) {\n let nodes = this.body.nodes;\n let dataChanged = false;\n for (let i = 0; i < ids.length; i++) {\n let id = ids[i];\n let node = nodes[id];\n let data = changedData[i];\n if (node !== undefined) {\n // update node\n if (node.setOptions(data)) {\n dataChanged = true;\n }\n }\n else {\n dataChanged = true;\n // create node\n node = this.create(data);\n nodes[id] = node;\n }\n }\n\n if (!dataChanged && oldData !== undefined) {\n // Check for any changes which should trigger a layout recalculation\n // For now, this is just 'level' for hierarchical layout\n // Assumption: old and new data arranged in same order; at time of writing, this holds.\n dataChanged = changedData.some(function(newValue, index) {\n let oldValue = oldData[index];\n return (oldValue && oldValue.level !== newValue.level);\n });\n }\n\n if (dataChanged === true) {\n this.body.emitter.emit(\"_dataChanged\");\n }\n else {\n this.body.emitter.emit(\"_dataUpdated\");\n }\n }\n\n /**\n * Remove existing nodes. If nodes do not exist, the method will just ignore it.\n * @param {number[] | string[]} ids\n * @private\n */\n remove(ids) {\n let nodes = this.body.nodes;\n\n for (let i = 0; i < ids.length; i++) {\n let id = ids[i];\n delete nodes[id];\n }\n\n this.body.emitter.emit(\"_dataChanged\");\n }\n\n\n /**\n * create a node\n * @param {Object} properties\n * @param {class} [constructorClass=Node.default]\n * @returns {*}\n */\n create(properties, constructorClass = Node) {\n return new constructorClass(properties, this.body, this.images, this.groups, this.options, this.defaultOptions)\n }\n\n\n /**\n *\n * @param {boolean} [clearPositions=false]\n */\n refresh(clearPositions = false) {\n util.forEach(this.body.nodes, (node, nodeId) => {\n let data = this.body.data.nodes.get(nodeId);\n if (data !== undefined) {\n if (clearPositions === true) {\n node.setOptions({x:null, y:null});\n }\n node.setOptions({ fixed: false });\n node.setOptions(data);\n }\n });\n }\n\n\n /**\n * Returns the positions of the nodes.\n * @param {Array.|String} [ids] --> optional, can be array of nodeIds, can be string\n * @returns {{}}\n */\n getPositions(ids) {\n let dataArray = {};\n if (ids !== undefined) {\n if (Array.isArray(ids) === true) {\n for (let i = 0; i < ids.length; i++) {\n if (this.body.nodes[ids[i]] !== undefined) {\n let node = this.body.nodes[ids[i]];\n dataArray[ids[i]] = { x: Math.round(node.x), y: Math.round(node.y) };\n }\n }\n }\n else {\n if (this.body.nodes[ids] !== undefined) {\n let node = this.body.nodes[ids];\n dataArray[ids] = { x: Math.round(node.x), y: Math.round(node.y) };\n }\n }\n }\n else {\n for (let i = 0; i < this.body.nodeIndices.length; i++) {\n let node = this.body.nodes[this.body.nodeIndices[i]];\n dataArray[this.body.nodeIndices[i]] = { x: Math.round(node.x), y: Math.round(node.y) };\n }\n }\n return dataArray;\n }\n\n\n /**\n * Load the XY positions of the nodes into the dataset.\n */\n storePositions() {\n // todo: add support for clusters and hierarchical.\n let dataArray = [];\n var dataset = this.body.data.nodes.getDataSet();\n\n for (let nodeId in dataset._data) {\n if (dataset._data.hasOwnProperty(nodeId)) {\n let node = this.body.nodes[nodeId];\n if (dataset._data[nodeId].x != Math.round(node.x) || dataset._data[nodeId].y != Math.round(node.y)) {\n dataArray.push({ id: node.id, x: Math.round(node.x), y: Math.round(node.y) });\n }\n }\n }\n dataset.update(dataArray);\n }\n\n /**\n * get the bounding box of a node.\n * @param {Node.id} nodeId\n * @returns {j|*}\n */\n getBoundingBox(nodeId) {\n if (this.body.nodes[nodeId] !== undefined) {\n return this.body.nodes[nodeId].shape.boundingBox;\n }\n }\n\n\n /**\n * Get the Ids of nodes connected to this node.\n * @param {Node.id} nodeId\n * @param {'to'|'from'|undefined} direction values 'from' and 'to' select respectively parent and child nodes only.\n * Any other value returns both parent and child nodes.\n * @returns {Array}\n */\n getConnectedNodes(nodeId, direction) {\n let nodeList = [];\n if (this.body.nodes[nodeId] !== undefined) {\n let node = this.body.nodes[nodeId];\n let nodeObj = {}; // used to quickly check if node already exists\n for (let i = 0; i < node.edges.length; i++) {\n let edge = node.edges[i];\n if (direction !== 'to' && edge.toId == node.id) { // these are double equals since ids can be numeric or string\n if (nodeObj[edge.fromId] === undefined) {\n nodeList.push(edge.fromId);\n nodeObj[edge.fromId] = true;\n }\n }\n else if (direction !== 'from' && edge.fromId == node.id) { // these are double equals since ids can be numeric or string\n if (nodeObj[edge.toId] === undefined) {\n nodeList.push(edge.toId);\n nodeObj[edge.toId] = true;\n }\n }\n }\n }\n return nodeList;\n }\n\n /**\n * Get the ids of the edges connected to this node.\n * @param {Node.id} nodeId\n * @returns {*}\n */\n getConnectedEdges(nodeId) {\n let edgeList = [];\n if (this.body.nodes[nodeId] !== undefined) {\n let node = this.body.nodes[nodeId];\n for (let i = 0; i < node.edges.length; i++) {\n edgeList.push(node.edges[i].id)\n }\n }\n else {\n console.log(\"NodeId provided for getConnectedEdges does not exist. Provided: \", nodeId);\n }\n return edgeList;\n }\n\n\n /**\n * Move a node.\n *\n * @param {Node.id} nodeId\n * @param {number} x\n * @param {number} y\n */\n moveNode(nodeId, x, y) {\n if (this.body.nodes[nodeId] !== undefined) {\n this.body.nodes[nodeId].x = Number(x);\n this.body.nodes[nodeId].y = Number(y);\n setTimeout(() => {this.body.emitter.emit(\"startSimulation\")},0);\n }\n else {\n console.log(\"Node id supplied to moveNode does not exist. Provided: \", nodeId);\n }\n }\n}\n\nexport default NodesHandler;\n","/** ============================================================================\n * Location of all the endpoint drawing routines.\n *\n * Every endpoint has its own drawing routine, which contains an endpoint definition.\n *\n * The endpoint definitions must have the following properies:\n *\n * - (0,0) is the connection point to the node it attaches to\n * - The endpoints are orientated to the positive x-direction\n * - The length of the endpoint is at most 1\n *\n * As long as the endpoint classes remain simple and not too numerous, they will\n * be contained within this module.\n * All classes here except `EndPoints` should be considered as private to this module.\n *\n * -----------------------------------------------------------------------------\n * ### Further Actions\n *\n * After adding a new endpoint here, you also need to do the following things:\n *\n * - Add the new endpoint name to `network/options.js` in array `endPoints`.\n * - Add the new endpoint name to the documentation.\n * Scan for 'arrows.to.type` and add it to the description.\n * - Add the endpoint to the examples. At the very least, add it to example\n * `edgeStyles/arrowTypes`.\n * ============================================================================= */\n\n/**\n * Common methods for endpoints\n *\n * @class\n */\nclass EndPoint {\n\n /**\n * Apply transformation on points for display.\n *\n * The following is done:\n * - rotate by the specified angle\n * - multiply the (normalized) coordinates by the passed length\n * - offset by the target coordinates\n *\n * @param {Array} points\n * @param {ArrowData} arrowData\n * @static\n */\n static transform(points, arrowData) {\n if (!(points instanceof Array)) {\n points = [points];\n }\n\n var x = arrowData.point.x;\n var y = arrowData.point.y;\n var angle = arrowData.angle\n var length = arrowData.length;\n\n for(var i = 0; i < points.length; ++i) {\n var p = points[i];\n var xt = p.x * Math.cos(angle) - p.y * Math.sin(angle);\n var yt = p.x * Math.sin(angle) + p.y * Math.cos(angle);\n\n p.x = x + length*xt;\n p.y = y + length*yt;\n }\n }\n\n\n /**\n * Draw a closed path using the given real coordinates.\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {Array.} points\n * @static\n */\n static drawPath(ctx, points) {\n ctx.beginPath();\n ctx.moveTo(points[0].x, points[0].y);\n for(var i = 1; i < points.length; ++i) {\n ctx.lineTo(points[i].x, points[i].y);\n }\n ctx.closePath();\n }\n}\n\n\n\n\n/**\n * Drawing methods for the arrow endpoint.\n * @extends EndPoint\n */\nclass Arrow extends EndPoint {\n\n /**\n * Draw this shape at the end of a line.\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {ArrowData} arrowData\n * @static\n */\n static draw(ctx, arrowData) {\n // Normalized points of closed path, in the order that they should be drawn.\n // (0, 0) is the attachment point, and the point around which should be rotated\n var points = [\n { x: 0 , y: 0 },\n { x:-1 , y: 0.3},\n { x:-0.9, y: 0 },\n { x:-1 , y:-0.3},\n ];\n\n EndPoint.transform(points, arrowData);\n EndPoint.drawPath(ctx, points);\n }\n}\n\n/**\n * Drawing methods for the crow endpoint.\n * @extends EndPoint\n */\nclass Crow {\n\n /**\n * Draw this shape at the end of a line.\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {ArrowData} arrowData\n * @static\n */\n static draw(ctx, arrowData) {\n // Normalized points of closed path, in the order that they should be drawn.\n // (0, 0) is the attachment point, and the point around which should be rotated\n var points = [\n { x:-1, y: 0},\n { x:0, y: 0.3},\n { x:-0.4, y: 0},\n { x:0, y:-0.3},\n ];\n\n EndPoint.transform(points, arrowData);\n EndPoint.drawPath(ctx, points);\n }\n}\n\n/**\n * Drawing methods for the curve endpoint.\n * @extends EndPoint\n */\nclass Curve {\n\n /**\n * Draw this shape at the end of a line.\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {ArrowData} arrowData\n * @static\n */\n static draw(ctx, arrowData) {\n // Normalized points of closed path, in the order that they should be drawn.\n // (0, 0) is the attachment point, and the point around which should be rotated\n var point = {x:-0.4, y:0};\n EndPoint.transform(point, arrowData);\n\n // Update endpoint style for drawing transparent arc.\n ctx.strokeStyle = ctx.fillStyle;\n ctx.fillStyle = 'rgba(0, 0, 0, 0)';\n\n // Define curve endpoint as semicircle.\n var pi = Math.PI\n var start_angle = arrowData.angle - pi/2;\n var end_angle = arrowData.angle + pi/2;\n ctx.beginPath();\n ctx.arc(point.x, point.y, arrowData.length*0.4, start_angle, end_angle, false);\n ctx.stroke()\n }\n}\n\n/**\n * Drawing methods for the inverted curve endpoint.\n * @extends EndPoint\n */\nclass InvertedCurve {\n\n /**\n * Draw this shape at the end of a line.\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {ArrowData} arrowData\n * @static\n */\n static draw(ctx, arrowData) {\n // Normalized points of closed path, in the order that they should be drawn.\n // (0, 0) is the attachment point, and the point around which should be rotated\n var point = {x:-0.3, y:0};\n EndPoint.transform(point, arrowData);\n\n // Update endpoint style for drawing transparent arc.\n ctx.strokeStyle = ctx.fillStyle;\n ctx.fillStyle = 'rgba(0, 0, 0, 0)';\n\n // Define inverted curve endpoint as semicircle.\n var pi = Math.PI\n var start_angle = arrowData.angle + pi/2;\n var end_angle = arrowData.angle + 3*pi/2;\n ctx.beginPath();\n ctx.arc(point.x, point.y, arrowData.length*0.4, start_angle, end_angle, false);\n ctx.stroke()\n }\n}\n\n/**\n * Drawing methods for the trinagle endpoint.\n * @extends EndPoint\n */\nclass Triangle {\n\n /**\n * Draw this shape at the end of a line.\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {ArrowData} arrowData\n * @static\n */\n static draw(ctx, arrowData) {\n // Normalized points of closed path, in the order that they should be drawn.\n // (0, 0) is the attachment point, and the point around which should be rotated\n var points = [\n { x:0.02, y:0},\n { x:-1, y: 0.3},\n { x:-1, y:-0.3},\n ];\n\n EndPoint.transform(points, arrowData);\n EndPoint.drawPath(ctx, points);\n }\n}\n\n/**\n * Drawing methods for the inverted trinagle endpoint.\n * @extends EndPoint\n */\nclass InvertedTriangle {\n\n /**\n * Draw this shape at the end of a line.\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {ArrowData} arrowData\n * @static\n */\n static draw(ctx, arrowData) {\n // Normalized points of closed path, in the order that they should be drawn.\n // (0, 0) is the attachment point, and the point around which should be rotated\n var points = [\n { x:0, y:0.3},\n { x:0, y: -0.3},\n { x:-1, y:0},\n ];\n\n EndPoint.transform(points, arrowData);\n EndPoint.drawPath(ctx, points);\n }\n}\n\n/**\n * Drawing methods for the circle endpoint.\n */\nclass Circle {\n\n /**\n * Draw this shape at the end of a line.\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {ArrowData} arrowData\n * @static\n */\n static draw(ctx, arrowData) {\n var point = {x:-0.4, y:0};\n\n EndPoint.transform(point, arrowData);\n ctx.circle(point.x, point.y, arrowData.length*0.4);\n }\n}\n\n\n/**\n * Drawing methods for the bar endpoint.\n */\nclass Bar {\n\n /**\n * Draw this shape at the end of a line.\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {ArrowData} arrowData\n * @static\n */\n static draw(ctx, arrowData) {\n/*\n var points = [\n {x:0, y:0.5},\n {x:0, y:-0.5}\n ];\n\n EndPoint.transform(points, arrowData);\n ctx.beginPath();\n ctx.moveTo(points[0].x, points[0].y);\n ctx.lineTo(points[1].x, points[1].y);\n ctx.stroke();\n*/\n\n var points = [\n {x:0, y:0.5},\n {x:0, y:-0.5},\n {x:-0.15, y:-0.5},\n {x:-0.15, y:0.5},\n ];\n\n EndPoint.transform(points, arrowData);\n EndPoint.drawPath(ctx, points);\n }\n}\n\n/**\n * Drawing methods for the box endpoint.\n */\nclass Box {\n\n /**\n * Draw this shape at the end of a line.\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {ArrowData} arrowData\n * @static\n */\n static draw(ctx, arrowData) {\n var points = [\n {x:0, y:0.3},\n {x:0, y:-0.3},\n {x:-0.6, y:-0.3},\n {x:-0.6, y:0.3},\n ];\n\n EndPoint.transform(points, arrowData);\n EndPoint.drawPath(ctx, points);\n }\n}\n\n/**\n * Drawing methods for the diamond endpoint.\n */\nclass Diamond {\n\n /**\n * Draw this shape at the end of a line.\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {ArrowData} arrowData\n * @static\n */\n static draw(ctx, arrowData) {\n var points = [\n {x:0, y:0},\n {x:-0.5, y:-0.3},\n {x:-1, y:0},\n {x:-0.5, y:0.3},\n ];\n\n EndPoint.transform(points, arrowData);\n EndPoint.drawPath(ctx, points);\n }\n}\n\n/**\n * Drawing methods for the vee endpoint.\n * @extends EndPoint\n */\nclass Vee {\n\n /**\n * Draw this shape at the end of a line.\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {ArrowData} arrowData\n * @static\n */\n static draw(ctx, arrowData) {\n // Normalized points of closed path, in the order that they should be drawn.\n // (0, 0) is the attachment point, and the point around which should be rotated\n var points = [\n { x:-1, y: 0.3},\n { x:-0.5, y: 0},\n { x:-1, y:-0.3},\n { x:0, y: 0},\n ];\n\n EndPoint.transform(points, arrowData);\n EndPoint.drawPath(ctx, points);\n }\n}\n\n/**\n * Drawing methods for the endpoints.\n */\nclass EndPoints {\n\n /**\n * Draw an endpoint\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {ArrowData} arrowData\n * @static\n */\n static draw(ctx, arrowData) {\n var type;\n if (arrowData.type) {\n type = arrowData.type.toLowerCase();\n }\n\n switch (type) {\n case 'circle':\n Circle.draw(ctx, arrowData);\n break;\n case 'box':\n Box.draw(ctx, arrowData);\n break;\n case 'crow':\n Crow.draw(ctx, arrowData);\n break;\n case 'curve':\n Curve.draw(ctx, arrowData);\n break;\n case 'diamond':\n Diamond.draw(ctx, arrowData);\n break;\n case 'inv_curve':\n InvertedCurve.draw(ctx, arrowData);\n break;\n case 'triangle':\n Triangle.draw(ctx, arrowData);\n break;\n case 'inv_triangle':\n InvertedTriangle.draw(ctx, arrowData);\n break;\n case 'bar':\n Bar.draw(ctx, arrowData);\n break;\n case 'vee':\n Vee.draw(ctx, arrowData);\n break;\n case 'arrow': // fall-through\n default:\n Arrow.draw(ctx, arrowData);\n }\n }\n}\n\nexport default EndPoints;\n","import util from 'vis-util';\nimport EndPoints from './EndPoints';\n\n\n/**\n * The Base Class for all edges.\n *\n */\nclass EdgeBase {\n /**\n * @param {Object} options\n * @param {Object} body\n * @param {Label} labelModule\n */\n constructor(options, body, labelModule) {\n this.body = body;\n this.labelModule = labelModule;\n this.options = {};\n this.setOptions(options);\n this.colorDirty = true;\n this.color = {};\n this.selectionWidth = 2;\n this.hoverWidth = 1.5;\n this.fromPoint = this.from;\n this.toPoint = this.to;\n }\n\n /**\n * Connects a node to itself\n */\n connect() {\n this.from = this.body.nodes[this.options.from];\n this.to = this.body.nodes[this.options.to];\n }\n\n /**\n *\n * @returns {boolean} always false\n */\n cleanup() {\n return false;\n }\n\n /**\n *\n * @param {Object} options\n */\n setOptions(options) {\n this.options = options;\n this.from = this.body.nodes[this.options.from];\n this.to = this.body.nodes[this.options.to];\n this.id = this.options.id;\n }\n\n /**\n * Redraw a edge as a line\n * Draw this edge in the given canvas\n * The 2d context of a HTML canvas can be retrieved by canvas.getContext(\"2d\");\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {Array} values\n * @param {boolean} selected\n * @param {boolean} hover\n * @param {Node} viaNode\n * @private\n */\n drawLine(ctx, values, selected, hover, viaNode) {\n // set style\n ctx.strokeStyle = this.getColor(ctx, values, selected, hover);\n ctx.lineWidth = values.width;\n\n if (values.dashes !== false) {\n this._drawDashedLine(ctx, values, viaNode);\n }\n else {\n this._drawLine(ctx, values, viaNode);\n }\n }\n\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {Array} values\n * @param {Node} viaNode\n * @param {{x: number, y: number}} [fromPoint]\n * @param {{x: number, y: number}} [toPoint]\n * @private\n */\n _drawLine(ctx, values, viaNode, fromPoint, toPoint) {\n if (this.from != this.to) {\n // draw line\n this._line(ctx, values, viaNode, fromPoint, toPoint);\n }\n else {\n let [x,y,radius] = this._getCircleData(ctx);\n this._circle(ctx, values, x, y, radius);\n }\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {Array} values\n * @param {Node} viaNode\n * @param {{x: number, y: number}} [fromPoint] TODO: Remove in next major release\n * @param {{x: number, y: number}} [toPoint] TODO: Remove in next major release\n * @private\n */\n _drawDashedLine(ctx, values, viaNode, fromPoint, toPoint) { // eslint-disable-line no-unused-vars\n ctx.lineCap = 'round';\n let pattern = [5,5];\n if (Array.isArray(values.dashes) === true) {\n pattern = values.dashes;\n }\n\n // only firefox and chrome support this method, else we use the legacy one.\n if (ctx.setLineDash !== undefined) {\n ctx.save();\n\n // set dash settings for chrome or firefox\n ctx.setLineDash(pattern);\n ctx.lineDashOffset = 0;\n\n // draw the line\n if (this.from != this.to) {\n // draw line\n this._line(ctx, values, viaNode);\n }\n else {\n let [x,y,radius] = this._getCircleData(ctx);\n this._circle(ctx, values, x, y, radius);\n }\n\n // restore the dash settings.\n ctx.setLineDash([0]);\n ctx.lineDashOffset = 0;\n ctx.restore();\n }\n else { // unsupporting smooth lines\n if (this.from != this.to) {\n // draw line\n ctx.dashedLine(this.from.x, this.from.y, this.to.x, this.to.y, pattern);\n }\n else {\n let [x,y,radius] = this._getCircleData(ctx);\n this._circle(ctx, values, x, y, radius);\n }\n // draw shadow if enabled\n this.enableShadow(ctx, values);\n\n ctx.stroke();\n\n // disable shadows for other elements.\n this.disableShadow(ctx, values);\n }\n }\n\n\n /**\n *\n * @param {Node} nearNode\n * @param {CanvasRenderingContext2D} ctx\n * @param {Object} options\n * @returns {{x: number, y: number}}\n */\n findBorderPosition(nearNode, ctx, options) {\n if (this.from != this.to) {\n return this._findBorderPosition(nearNode, ctx, options);\n }\n else {\n return this._findBorderPositionCircle(nearNode, ctx, options);\n }\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @returns {{from: ({x: number, y: number, t: number}|*), to: ({x: number, y: number, t: number}|*)}}\n */\n findBorderPositions(ctx) {\n let from = {};\n let to = {};\n if (this.from != this.to) {\n from = this._findBorderPosition(this.from, ctx);\n to = this._findBorderPosition(this.to, ctx);\n }\n else {\n let [x,y] = this._getCircleData(ctx).slice(0, 2);\n\n from = this._findBorderPositionCircle(this.from, ctx, {x, y, low:0.25, high:0.6, direction:-1});\n to = this._findBorderPositionCircle(this.from, ctx, {x, y, low:0.6, high:0.8, direction:1});\n }\n return {from, to};\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @returns {Array.} x, y, radius\n * @private\n */\n _getCircleData(ctx) {\n let x, y;\n let node = this.from;\n let radius = this.options.selfReferenceSize;\n\n if (ctx !== undefined) {\n if (node.shape.width === undefined) {\n node.shape.resize(ctx);\n }\n }\n\n // get circle coordinates\n if (node.shape.width > node.shape.height) {\n x = node.x + node.shape.width * 0.5;\n y = node.y - radius;\n }\n else {\n x = node.x + radius;\n y = node.y - node.shape.height * 0.5;\n }\n return [x,y,radius];\n }\n\n /**\n * Get a point on a circle\n * @param {number} x\n * @param {number} y\n * @param {number} radius\n * @param {number} percentage - Value between 0 (line start) and 1 (line end)\n * @return {Object} point\n * @private\n */\n _pointOnCircle(x, y, radius, percentage) {\n let angle = percentage * 2 * Math.PI;\n return {\n x: x + radius * Math.cos(angle),\n y: y - radius * Math.sin(angle)\n }\n }\n\n /**\n * This function uses binary search to look for the point where the circle crosses the border of the node.\n * @param {Node} node\n * @param {CanvasRenderingContext2D} ctx\n * @param {Object} options\n * @returns {*}\n * @private\n */\n _findBorderPositionCircle(node, ctx, options) {\n let x = options.x;\n let y = options.y;\n let low = options.low;\n let high = options.high;\n let direction = options.direction;\n\n let maxIterations = 10;\n let iteration = 0;\n let radius = this.options.selfReferenceSize;\n let pos, angle, distanceToBorder, distanceToPoint, difference;\n let threshold = 0.05;\n let middle = (low + high) * 0.5;\n\n while (low <= high && iteration < maxIterations) {\n middle = (low + high) * 0.5;\n\n pos = this._pointOnCircle(x, y, radius, middle);\n angle = Math.atan2((node.y - pos.y), (node.x - pos.x));\n distanceToBorder = node.distanceToBorder(ctx, angle);\n distanceToPoint = Math.sqrt(Math.pow(pos.x - node.x, 2) + Math.pow(pos.y - node.y, 2));\n difference = distanceToBorder - distanceToPoint;\n if (Math.abs(difference) < threshold) {\n break; // found\n }\n else if (difference > 0) { // distance to nodes is larger than distance to border --> t needs to be bigger if we're looking at the to node.\n if (direction > 0) {\n low = middle;\n }\n else {\n high = middle;\n }\n }\n else {\n if (direction > 0) {\n high = middle;\n }\n else {\n low = middle;\n }\n }\n iteration++;\n\n }\n pos.t = middle;\n\n return pos;\n }\n\n /**\n * Get the line width of the edge. Depends on width and whether one of the\n * connected nodes is selected.\n * @param {boolean} selected\n * @param {boolean} hover\n * @returns {number} width\n * @private\n */\n getLineWidth(selected, hover) {\n if (selected === true) {\n return Math.max(this.selectionWidth, 0.3 / this.body.view.scale);\n }\n else {\n if (hover === true) {\n return Math.max(this.hoverWidth, 0.3 / this.body.view.scale);\n }\n else {\n return Math.max(this.options.width, 0.3 / this.body.view.scale);\n }\n }\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {ArrowOptions} values\n * @param {boolean} selected - Unused\n * @param {boolean} hover - Unused\n * @returns {string}\n */\n getColor(ctx, values, selected, hover) { // eslint-disable-line no-unused-vars\n if (values.inheritsColor !== false) {\n // when this is a loop edge, just use the 'from' method\n if ((values.inheritsColor === 'both') && (this.from.id !== this.to.id)) {\n let grd = ctx.createLinearGradient(this.from.x, this.from.y, this.to.x, this.to.y);\n let fromColor, toColor;\n fromColor = this.from.options.color.highlight.border;\n toColor = this.to.options.color.highlight.border;\n\n if ((this.from.selected === false) && (this.to.selected === false)) {\n fromColor = util.overrideOpacity(this.from.options.color.border, values.opacity);\n toColor = util.overrideOpacity(this.to.options.color.border, values.opacity);\n }\n else if ((this.from.selected === true) && (this.to.selected === false)) {\n toColor = this.to.options.color.border;\n }\n else if ((this.from.selected === false) && (this.to.selected === true)) {\n fromColor = this.from.options.color.border;\n }\n grd.addColorStop(0, fromColor);\n grd.addColorStop(1, toColor);\n\n // -------------------- this returns -------------------- //\n return grd;\n }\n\n if (values.inheritsColor === \"to\") {\n return util.overrideOpacity(this.to.options.color.border, values.opacity);\n } else { // \"from\"\n return util.overrideOpacity(this.from.options.color.border, values.opacity);\n }\n } else {\n return util.overrideOpacity(values.color, values.opacity);\n }\n }\n\n /**\n * Draw a line from a node to itself, a circle\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {Array} values\n * @param {number} x\n * @param {number} y\n * @param {number} radius\n * @private\n */\n _circle(ctx, values, x, y, radius) {\n // draw shadow if enabled\n this.enableShadow(ctx, values);\n\n // draw a circle\n ctx.beginPath();\n ctx.arc(x, y, radius, 0, 2 * Math.PI, false);\n ctx.stroke();\n\n // disable shadows for other elements.\n this.disableShadow(ctx, values);\n }\n\n\n /**\n * Calculate the distance between a point (x3,y3) and a line segment from (x1,y1) to (x2,y2).\n * (x3,y3) is the point.\n *\n * http://stackoverflow.com/questions/849211/shortest-distancae-between-a-point-and-a-line-segment\n *\n * @param {number} x1\n * @param {number} y1\n * @param {number} x2\n * @param {number} y2\n * @param {number} x3\n * @param {number} y3\n * @param {Node} via\n * @param {Array} values\n * @returns {number}\n */\n getDistanceToEdge(x1, y1, x2, y2, x3, y3, via, values) { // eslint-disable-line no-unused-vars\n let returnValue = 0;\n if (this.from != this.to) {\n returnValue = this._getDistanceToEdge(x1, y1, x2, y2, x3, y3, via)\n }\n else {\n let [x,y,radius] = this._getCircleData(undefined);\n let dx = x - x3;\n let dy = y - y3;\n returnValue = Math.abs(Math.sqrt(dx * dx + dy * dy) - radius);\n }\n\n return returnValue;\n }\n\n\n /**\n *\n * @param {number} x1\n * @param {number} y1\n * @param {number} x2\n * @param {number} y2\n * @param {number} x3\n * @param {number} y3\n * @returns {number}\n * @private\n */\n _getDistanceToLine(x1, y1, x2, y2, x3, y3) {\n let px = x2 - x1;\n let py = y2 - y1;\n let something = px * px + py * py;\n let u = ((x3 - x1) * px + (y3 - y1) * py) / something;\n\n if (u > 1) {\n u = 1;\n }\n else if (u < 0) {\n u = 0;\n }\n\n let x = x1 + u * px;\n let y = y1 + u * py;\n let dx = x - x3;\n let dy = y - y3;\n\n //# Note: If the actual distance does not matter,\n //# if you only want to compare what this function\n //# returns to other results of this function, you\n //# can just return the squared distance instead\n //# (i.e. remove the sqrt) to gain a little performance\n\n return Math.sqrt(dx * dx + dy * dy);\n }\n\n\n /**\n * @param {CanvasRenderingContext2D} ctx\n * @param {string} position\n * @param {Node} viaNode\n * @param {boolean} selected\n * @param {boolean} hover\n * @param {Array} values\n * @returns {{point: *, core: {x: number, y: number}, angle: *, length: number, type: *}}\n */\n getArrowData(ctx, position, viaNode, selected, hover, values) {\n // set lets\n let angle;\n let arrowPoint;\n let node1;\n let node2;\n let guideOffset;\n let scaleFactor;\n let type;\n let lineWidth = values.width;\n\n if (position === 'from') {\n node1 = this.from;\n node2 = this.to;\n guideOffset = 0.1;\n scaleFactor = values.fromArrowScale;\n type = values.fromArrowType;\n }\n else if (position === 'to') {\n node1 = this.to;\n node2 = this.from;\n guideOffset = -0.1;\n scaleFactor = values.toArrowScale;\n type = values.toArrowType;\n }\n else {\n node1 = this.to;\n node2 = this.from;\n scaleFactor = values.middleArrowScale;\n type = values.middleArrowType;\n }\n\n // if not connected to itself\n if (node1 != node2) {\n if (position !== 'middle') {\n // draw arrow head\n if (this.options.smooth.enabled === true) {\n arrowPoint = this.findBorderPosition(node1, ctx, { via: viaNode });\n let guidePos = this.getPoint(Math.max(0.0, Math.min(1.0, arrowPoint.t + guideOffset)), viaNode);\n angle = Math.atan2((arrowPoint.y - guidePos.y), (arrowPoint.x - guidePos.x));\n } else {\n angle = Math.atan2((node1.y - node2.y), (node1.x - node2.x));\n arrowPoint = this.findBorderPosition(node1, ctx);\n }\n } else {\n angle = Math.atan2((node1.y - node2.y), (node1.x - node2.x));\n arrowPoint = this.getPoint(0.5, viaNode); // this is 0.6 to account for the size of the arrow.\n }\n } else {\n // draw circle\n let [x,y,radius] = this._getCircleData(ctx);\n\n if (position === 'from') {\n arrowPoint = this.findBorderPosition(this.from, ctx, { x, y, low: 0.25, high: 0.6, direction: -1 });\n angle = arrowPoint.t * -2 * Math.PI + 1.5 * Math.PI + 0.1 * Math.PI;\n } else if (position === 'to') {\n arrowPoint = this.findBorderPosition(this.from, ctx, { x, y, low: 0.6, high: 1.0, direction: 1 });\n angle = arrowPoint.t * -2 * Math.PI + 1.5 * Math.PI - 1.1 * Math.PI;\n } else {\n arrowPoint = this._pointOnCircle(x, y, radius, 0.175);\n angle = 3.9269908169872414; // === 0.175 * -2 * Math.PI + 1.5 * Math.PI + 0.1 * Math.PI;\n }\n }\n\n if (position === 'middle' && scaleFactor < 0) lineWidth *= -1; // reversed middle arrow\n let length = 15 * scaleFactor + 3 * lineWidth; // 3* lineWidth is the width of the edge.\n\n var xi = arrowPoint.x - length * 0.9 * Math.cos(angle);\n var yi = arrowPoint.y - length * 0.9 * Math.sin(angle);\n let arrowCore = { x: xi, y: yi };\n\n return { point: arrowPoint, core: arrowCore, angle: angle, length: length, type: type };\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {ArrowOptions} values\n * @param {boolean} selected\n * @param {boolean} hover\n * @param {Object} arrowData\n */\n drawArrowHead(ctx, values, selected, hover, arrowData) {\n // set style\n ctx.strokeStyle = this.getColor(ctx, values, selected, hover);\n ctx.fillStyle = ctx.strokeStyle;\n ctx.lineWidth = values.width;\n\n EndPoints.draw(ctx, arrowData);\n\n // draw shadow if enabled\n this.enableShadow(ctx, values);\n ctx.fill();\n // disable shadows for other elements.\n this.disableShadow(ctx, values);\n }\n\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {ArrowOptions} values\n */\n enableShadow(ctx, values) {\n if (values.shadow === true) {\n ctx.shadowColor = values.shadowColor;\n ctx.shadowBlur = values.shadowSize;\n ctx.shadowOffsetX = values.shadowX;\n ctx.shadowOffsetY = values.shadowY;\n }\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {ArrowOptions} values\n */\n disableShadow(ctx, values) {\n if (values.shadow === true) {\n ctx.shadowColor = 'rgba(0,0,0,0)';\n ctx.shadowBlur = 0;\n ctx.shadowOffsetX = 0;\n ctx.shadowOffsetY = 0;\n }\n }\n \n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {{toArrow: boolean, toArrowScale: (allOptions.edges.arrows.to.scaleFactor|{number}|allOptions.edges.arrows.middle.scaleFactor|allOptions.edges.arrows.from.scaleFactor|Array|number), toArrowType: *, middleArrow: boolean, middleArrowScale: (number|allOptions.edges.arrows.middle.scaleFactor|{number}|Array), middleArrowType: (allOptions.edges.arrows.middle.type|{string}|string|*), fromArrow: boolean, fromArrowScale: (allOptions.edges.arrows.to.scaleFactor|{number}|allOptions.edges.arrows.middle.scaleFactor|allOptions.edges.arrows.from.scaleFactor|Array|number), fromArrowType: *, arrowStrikethrough: (*|boolean|allOptions.edges.arrowStrikethrough|{boolean}), color: undefined, inheritsColor: (string|string|string|allOptions.edges.color.inherit|{string, boolean}|Array|*), opacity: *, hidden: *, length: *, shadow: *, shadowColor: *, shadowSize: *, shadowX: *, shadowY: *, dashes: (*|boolean|Array|allOptions.edges.dashes|{boolean, array}), width: *}} values\n */\n drawBackground(ctx, values) {\n if (values.background !== false) {\n let attrs = ['strokeStyle', 'lineWidth', 'dashes'];\n let origCtxAttr = {};\n // save original line attrs\n attrs.forEach(function(attrname) {\n origCtxAttr[attrname] = ctx[attrname];\n });\n\n ctx.strokeStyle = values.backgroundColor;\n ctx.lineWidth = values.backgroundSize;\n this.setStrokeDashed(ctx, values.backgroundDashes);\n\n ctx.stroke();\n\n // restore original line attrs\n attrs.forEach(function(attrname) {\n ctx[attrname] = origCtxAttr[attrname];\n });\n this.setStrokeDashed(ctx, values.dashes);\n }\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {boolean|Array} dashes\n */\n setStrokeDashed(ctx, dashes) {\n if (dashes !== false) {\n if (ctx.setLineDash !== undefined) {\n let pattern = [5, 5];\n if (Array.isArray(dashes) === true) {\n pattern = dashes;\n }\n ctx.setLineDash(pattern);\n }\n else {\n console.warn(\"setLineDash is not supported in this browser. The dashed stroke cannot be used.\");\n }\n }\n else {\n if (ctx.setLineDash !== undefined) {\n ctx.setLineDash([]);\n }\n else {\n console.warn(\"setLineDash is not supported in this browser. The dashed stroke cannot be used.\");\n }\n }\n }\n}\n\nexport default EdgeBase;\n","import EdgeBase from './EdgeBase'\n\n/**\n * The Base Class for all Bezier edges. Bezier curves are used to model smooth\n * gradual curves in paths between nodes.\n *\n * @extends EdgeBase\n */\nclass BezierEdgeBase extends EdgeBase {\n /**\n * @param {Object} options\n * @param {Object} body\n * @param {Label} labelModule\n */\n constructor(options, body, labelModule) {\n super(options, body, labelModule);\n }\n\n /**\n * This function uses binary search to look for the point where the bezier curve crosses the border of the node.\n *\n * @param {Node} nearNode\n * @param {CanvasRenderingContext2D} ctx\n * @param {Node} viaNode\n * @returns {*}\n * @private\n */\n _findBorderPositionBezier(nearNode, ctx, viaNode = this._getViaCoordinates()) {\n var maxIterations = 10;\n var iteration = 0;\n var low = 0;\n var high = 1;\n var pos, angle, distanceToBorder, distanceToPoint, difference;\n var threshold = 0.2;\n var node = this.to;\n var from = false;\n if (nearNode.id === this.from.id) {\n node = this.from;\n from = true;\n }\n\n while (low <= high && iteration < maxIterations) {\n var middle = (low + high) * 0.5;\n\n pos = this.getPoint(middle, viaNode);\n angle = Math.atan2((node.y - pos.y), (node.x - pos.x));\n distanceToBorder = node.distanceToBorder(ctx, angle);\n distanceToPoint = Math.sqrt(Math.pow(pos.x - node.x, 2) + Math.pow(pos.y - node.y, 2));\n difference = distanceToBorder - distanceToPoint;\n if (Math.abs(difference) < threshold) {\n break; // found\n }\n else if (difference < 0) { // distance to nodes is larger than distance to border --> t needs to be bigger if we're looking at the to node.\n if (from === false) {\n low = middle;\n }\n else {\n high = middle;\n }\n }\n else {\n if (from === false) {\n high = middle;\n }\n else {\n low = middle;\n }\n }\n\n iteration++;\n }\n pos.t = middle;\n\n return pos;\n }\n\n\n\n /**\n * Calculate the distance between a point (x3,y3) and a line segment from\n * (x1,y1) to (x2,y2).\n * http://stackoverflow.com/questions/849211/shortest-distancae-between-a-point-and-a-line-segment\n * @param {number} x1 from x\n * @param {number} y1 from y\n * @param {number} x2 to x\n * @param {number} y2 to y\n * @param {number} x3 point to check x\n * @param {number} y3 point to check y\n * @param {Node} via\n * @returns {number}\n * @private\n */\n _getDistanceToBezierEdge(x1, y1, x2, y2, x3, y3, via) { // x3,y3 is the point\n let minDistance = 1e9;\n let distance;\n let i, t, x, y;\n let lastX = x1;\n let lastY = y1;\n for (i = 1; i < 10; i++) {\n t = 0.1 * i;\n x = Math.pow(1 - t, 2) * x1 + (2 * t * (1 - t)) * via.x + Math.pow(t, 2) * x2;\n y = Math.pow(1 - t, 2) * y1 + (2 * t * (1 - t)) * via.y + Math.pow(t, 2) * y2;\n if (i > 0) {\n distance = this._getDistanceToLine(lastX, lastY, x, y, x3, y3);\n minDistance = distance < minDistance ? distance : minDistance;\n }\n lastX = x;\n lastY = y;\n }\n\n return minDistance;\n }\n\n\n /**\n * Draw a bezier curve between two nodes\n *\n * The method accepts zero, one or two control points.\n * Passing zero control points just draws a straight line\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {Object} values | options for shadow drawing\n * @param {Object|undefined} viaNode1 | first control point for curve drawing\n * @param {Object|undefined} viaNode2 | second control point for curve drawing\n *\n * @protected\n */\n _bezierCurve(ctx, values, viaNode1, viaNode2) {\n var hasNode1 = (viaNode1 !== undefined && viaNode1.x !== undefined);\n var hasNode2 = (viaNode2 !== undefined && viaNode2.x !== undefined);\n\n ctx.beginPath();\n ctx.moveTo(this.fromPoint.x, this.fromPoint.y);\n\n if (hasNode1 && hasNode2) {\n ctx.bezierCurveTo(viaNode1.x, viaNode1.y, viaNode2.x, viaNode2.y, this.toPoint.x, this.toPoint.y);\n } else if (hasNode1) {\n ctx.quadraticCurveTo(viaNode1.x, viaNode1.y, this.toPoint.x, this.toPoint.y);\n } else {\n // fallback to normal straight edge\n ctx.lineTo(this.toPoint.x, this.toPoint.y);\n }\n // draw a background\n this.drawBackground(ctx, values);\n\n // draw shadow if enabled\n this.enableShadow(ctx, values);\n ctx.stroke();\n this.disableShadow(ctx, values);\n }\n\n /**\n *\n * @returns {*|{x, y}|{x: undefined, y: undefined}}\n */\n getViaNode() {\n return this._getViaCoordinates();\n }\n}\n\nexport default BezierEdgeBase;\n","import BezierEdgeBase from './BezierEdgeBase'\n\n/**\n * A Base Class for all Cubic Bezier Edges. Bezier curves are used to model\n * smooth gradual curves in paths between nodes.\n *\n * @extends BezierEdgeBase\n */\nclass CubicBezierEdgeBase extends BezierEdgeBase {\n /**\n * @param {Object} options\n * @param {Object} body\n * @param {Label} labelModule\n */\n constructor(options, body, labelModule) {\n super(options, body, labelModule);\n }\n\n /**\n * Calculate the distance between a point (x3,y3) and a line segment from\n * (x1,y1) to (x2,y2).\n * http://stackoverflow.com/questions/849211/shortest-distancae-between-a-point-and-a-line-segment\n * https://en.wikipedia.org/wiki/B%C3%A9zier_curve\n * @param {number} x1 from x\n * @param {number} y1 from y\n * @param {number} x2 to x\n * @param {number} y2 to y\n * @param {number} x3 point to check x\n * @param {number} y3 point to check y\n * @param {Node} via1\n * @param {Node} via2\n * @returns {number}\n * @private\n */\n _getDistanceToBezierEdge(x1, y1, x2, y2, x3, y3, via1, via2) { // x3,y3 is the point\n let minDistance = 1e9;\n let distance;\n let i, t, x, y;\n let lastX = x1;\n let lastY = y1;\n let vec = [0,0,0,0]\n for (i = 1; i < 10; i++) {\n t = 0.1 * i;\n vec[0] = Math.pow(1 - t, 3);\n vec[1] = 3 * t * Math.pow(1 - t, 2);\n vec[2] = 3 * Math.pow(t,2) * (1 - t);\n vec[3] = Math.pow(t, 3);\n x = vec[0] * x1 + vec[1] * via1.x + vec[2] * via2.x + vec[3] * x2;\n y = vec[0] * y1 + vec[1] * via1.y + vec[2] * via2.y + vec[3] * y2;\n if (i > 0) {\n distance = this._getDistanceToLine(lastX, lastY, x, y, x3, y3);\n minDistance = distance < minDistance ? distance : minDistance;\n }\n lastX = x;\n lastY = y;\n }\n\n return minDistance;\n }\n}\n\nexport default CubicBezierEdgeBase;","import CubicBezierEdgeBase from './util/CubicBezierEdgeBase'\n\n/**\n * A Cubic Bezier Edge. Bezier curves are used to model smooth gradual\n * curves in paths between nodes.\n *\n * @extends CubicBezierEdgeBase\n */\nclass CubicBezierEdge extends CubicBezierEdgeBase {\n /**\n * @param {Object} options\n * @param {Object} body\n * @param {Label} labelModule\n */\n constructor(options, body, labelModule) {\n super(options, body, labelModule);\n }\n\n /**\n * Draw a line between two nodes\n * @param {CanvasRenderingContext2D} ctx\n * @param {ArrowOptions} values\n * @param {Array.} viaNodes\n * @private\n */\n _line(ctx, values, viaNodes) {\n // get the coordinates of the support points.\n let via1 = viaNodes[0];\n let via2 = viaNodes[1];\n this._bezierCurve(ctx, values, via1, via2);\n }\n\n /**\n *\n * @returns {Array.<{x: number, y: number}>}\n * @private\n */\n _getViaCoordinates() {\n let dx = this.from.x - this.to.x;\n let dy = this.from.y - this.to.y;\n\n let x1, y1, x2, y2;\n let roundness = this.options.smooth.roundness;\n\n // horizontal if x > y or if direction is forced or if direction is horizontal\n if ((Math.abs(dx) > Math.abs(dy) || this.options.smooth.forceDirection === true || this.options.smooth.forceDirection === 'horizontal') && this.options.smooth.forceDirection !== 'vertical') {\n y1 = this.from.y;\n y2 = this.to.y;\n x1 = this.from.x - roundness * dx;\n x2 = this.to.x + roundness * dx;\n }\n else {\n y1 = this.from.y - roundness * dy;\n y2 = this.to.y + roundness * dy;\n x1 = this.from.x;\n x2 = this.to.x;\n }\n\n return [{x: x1, y: y1},{x: x2, y: y2}];\n }\n\n /**\n *\n * @returns {Array.<{x: number, y: number}>}\n */\n getViaNode() {\n return this._getViaCoordinates();\n }\n\n /**\n *\n * @param {Node} nearNode\n * @param {CanvasRenderingContext2D} ctx\n * @returns {{x: number, y: number, t: number}}\n * @private\n */\n _findBorderPosition(nearNode, ctx) {\n return this._findBorderPositionBezier(nearNode, ctx);\n }\n\n /**\n *\n * @param {number} x1\n * @param {number} y1\n * @param {number} x2\n * @param {number} y2\n * @param {number} x3\n * @param {number} y3\n * @param {Node} via1\n * @param {Node} via2\n * @returns {number}\n * @private\n */\n _getDistanceToEdge(x1, y1, x2, y2, x3, y3, [via1, via2] = this._getViaCoordinates()) { // x3,y3 is the point\n return this._getDistanceToBezierEdge(x1, y1, x2, y2, x3, y3, via1, via2);\n }\n\n /**\n * Combined function of pointOnLine and pointOnBezier. This gives the coordinates of a point on the line at a certain percentage of the way\n * @param {number} percentage\n * @param {{x: number, y: number}} [via1=this._getViaCoordinates()[0]]\n * @param {{x: number, y: number}} [via2=this._getViaCoordinates()[1]]\n * @returns {{x: number, y: number}}\n * @private\n */\n getPoint(percentage, [via1, via2] = this._getViaCoordinates()) {\n let t = percentage;\n let vec = [];\n vec[0] = Math.pow(1 - t, 3);\n vec[1] = 3 * t * Math.pow(1 - t, 2);\n vec[2] = 3 * Math.pow(t,2) * (1 - t);\n vec[3] = Math.pow(t, 3);\n let x = vec[0] * this.fromPoint.x + vec[1] * via1.x + vec[2] * via2.x + vec[3] * this.toPoint.x;\n let y = vec[0] * this.fromPoint.y + vec[1] * via1.y + vec[2] * via2.y + vec[3] * this.toPoint.y;\n\n return {x: x, y: y};\n }\n}\n\n\nexport default CubicBezierEdge;\n","import BezierEdgeBase from './util/BezierEdgeBase'\n\n/**\n * A Dynamic Bezier Edge. Bezier curves are used to model smooth gradual\n * curves in paths between nodes. The Dynamic piece refers to how the curve\n * reacts to physics changes.\n *\n * @extends BezierEdgeBase\n */\nclass BezierEdgeDynamic extends BezierEdgeBase {\n /**\n * @param {Object} options\n * @param {Object} body\n * @param {Label} labelModule\n */\n constructor(options, body, labelModule) {\n //this.via = undefined; // Here for completeness but not allowed to defined before super() is invoked.\n super(options, body, labelModule); // --> this calls the setOptions below\n this._boundFunction = () => {this.positionBezierNode();};\n this.body.emitter.on(\"_repositionBezierNodes\", this._boundFunction);\n }\n\n /**\n *\n * @param {Object} options\n */\n setOptions(options) {\n // check if the physics has changed.\n let physicsChange = false;\n if (this.options.physics !== options.physics) {\n physicsChange = true;\n }\n\n // set the options and the to and from nodes\n this.options = options;\n this.id = this.options.id;\n this.from = this.body.nodes[this.options.from];\n this.to = this.body.nodes[this.options.to];\n\n // setup the support node and connect\n this.setupSupportNode();\n this.connect();\n\n // when we change the physics state of the edge, we reposition the support node.\n if (physicsChange === true) {\n this.via.setOptions({physics: this.options.physics});\n this.positionBezierNode();\n }\n }\n\n /**\n * Connects an edge to node(s)\n */\n connect() {\n this.from = this.body.nodes[this.options.from];\n this.to = this.body.nodes[this.options.to];\n if (this.from === undefined || this.to === undefined || this.options.physics === false) {\n this.via.setOptions({physics:false})\n }\n else {\n // fix weird behaviour where a self referencing node has physics enabled\n if (this.from.id === this.to.id) {\n this.via.setOptions({physics: false})\n }\n else {\n this.via.setOptions({physics: true})\n }\n }\n }\n\n /**\n * remove the support nodes\n * @returns {boolean}\n */\n cleanup() {\n this.body.emitter.off(\"_repositionBezierNodes\", this._boundFunction);\n if (this.via !== undefined) {\n delete this.body.nodes[this.via.id];\n this.via = undefined;\n return true;\n }\n return false;\n }\n\n /**\n * Bezier curves require an anchor point to calculate the smooth flow. These points are nodes. These nodes are invisible but\n * are used for the force calculation.\n *\n * The changed data is not called, if needed, it is returned by the main edge constructor.\n * @private\n */\n setupSupportNode() {\n if (this.via === undefined) {\n var nodeId = \"edgeId:\" + this.id;\n var node = this.body.functions.createNode({\n id: nodeId,\n shape: 'circle',\n physics:true,\n hidden:true\n });\n this.body.nodes[nodeId] = node;\n this.via = node;\n this.via.parentEdgeId = this.id;\n this.positionBezierNode();\n }\n }\n\n /**\n * Positions bezier node\n */\n positionBezierNode() {\n if (this.via !== undefined && this.from !== undefined && this.to !== undefined) {\n this.via.x = 0.5 * (this.from.x + this.to.x);\n this.via.y = 0.5 * (this.from.y + this.to.y);\n }\n else if (this.via !== undefined) {\n this.via.x = 0;\n this.via.y = 0;\n }\n }\n\n /**\n * Draw a line between two nodes\n * @param {CanvasRenderingContext2D} ctx\n * @param {ArrowOptions} values\n * @param {Node} viaNode\n * @private\n */\n _line(ctx, values, viaNode) {\n this._bezierCurve(ctx, values, viaNode);\n }\n\n /**\n *\n * @returns {Node|undefined|*|{index, line, column}}\n */\n getViaNode() {\n return this.via;\n }\n\n\n /**\n * Combined function of pointOnLine and pointOnBezier. This gives the coordinates of a point on the line at a certain percentage of the way\n *\n * @param {number} percentage\n * @param {Node} viaNode\n * @returns {{x: number, y: number}}\n * @private\n */\n getPoint(percentage, viaNode = this.via) {\n let t = percentage;\n let x, y;\n if (this.from === this.to){\n let [cx,cy,cr] = this._getCircleData(this.from);\n let a = 2 * Math.PI * (1 - t);\n x = cx + cr * Math.sin(a);\n y = cy + cr - cr * (1 - Math.cos(a));\n } else {\n x = Math.pow(1 - t, 2) * this.fromPoint.x + 2 * t * (1 - t) * viaNode.x + Math.pow(t, 2) * this.toPoint.x;\n y = Math.pow(1 - t, 2) * this.fromPoint.y + 2 * t * (1 - t) * viaNode.y + Math.pow(t, 2) * this.toPoint.y;\n }\n\n return {x: x, y: y};\n }\n\n /**\n *\n * @param {Node} nearNode\n * @param {CanvasRenderingContext2D} ctx\n * @returns {*}\n * @private\n */\n _findBorderPosition(nearNode, ctx) {\n return this._findBorderPositionBezier(nearNode, ctx, this.via);\n }\n\n /**\n *\n * @param {number} x1\n * @param {number} y1\n * @param {number} x2\n * @param {number} y2\n * @param {number} x3\n * @param {number} y3\n * @returns {number}\n * @private\n */\n _getDistanceToEdge(x1, y1, x2, y2, x3, y3) { // x3,y3 is the point\n return this._getDistanceToBezierEdge(x1, y1, x2, y2, x3, y3, this.via);\n }\n}\n\n\nexport default BezierEdgeDynamic;\n","import BezierEdgeBase from './util/BezierEdgeBase'\n\n/**\n * A Static Bezier Edge. Bezier curves are used to model smooth gradual\n * curves in paths between nodes.\n *\n * @extends BezierEdgeBase\n */\nclass BezierEdgeStatic extends BezierEdgeBase {\n /**\n * @param {Object} options\n * @param {Object} body\n * @param {Label} labelModule\n */\n constructor(options, body, labelModule) {\n super(options, body, labelModule);\n }\n\n /**\n * Draw a line between two nodes\n * @param {CanvasRenderingContext2D} ctx\n * @param {ArrowOptions} values\n * @param {Node} viaNode\n * @private\n */\n _line(ctx, values, viaNode) {\n this._bezierCurve(ctx, values, viaNode);\n }\n\n /**\n *\n * @returns {Array.<{x: number, y: number}>}\n */\n getViaNode() {\n return this._getViaCoordinates();\n }\n\n\n /**\n * We do not use the to and fromPoints here to make the via nodes the same as edges without arrows.\n * @returns {{x: undefined, y: undefined}}\n * @private\n */\n _getViaCoordinates() {\n // Assumption: x/y coordinates in from/to always defined\n let xVia = undefined;\n let yVia = undefined;\n let factor = this.options.smooth.roundness;\n let type = this.options.smooth.type;\n let dx = Math.abs(this.from.x - this.to.x);\n let dy = Math.abs(this.from.y - this.to.y);\n if (type === 'discrete' || type === 'diagonalCross') {\n let stepX;\n let stepY;\n\n if (dx <= dy) {\n stepX = stepY = factor * dy;\n } else {\n stepX = stepY = factor * dx;\n }\n\n if (this.from.x > this.to.x) stepX = -stepX;\n if (this.from.y >= this.to.y) stepY = -stepY;\n\n xVia = this.from.x + stepX;\n yVia = this.from.y + stepY;\n\n if (type === \"discrete\") {\n if (dx <= dy) {\n xVia = dx < factor * dy ? this.from.x : xVia;\n } else {\n yVia = dy < factor * dx ? this.from.y : yVia;\n }\n }\n }\n else if (type === \"straightCross\") {\n let stepX = (1 - factor) * dx;\n let stepY = (1 - factor) * dy;\n\n if (dx <= dy) { // up - down\n stepX = 0;\n if (this.from.y < this.to.y) stepY = -stepY;\n }\n else { // left - right\n if (this.from.x < this.to.x) stepX = -stepX;\n stepY = 0;\n }\n xVia = this.to.x + stepX;\n yVia = this.to.y + stepY;\n }\n else if (type === 'horizontal') {\n let stepX = (1 - factor) * dx;\n if (this.from.x < this.to.x) stepX = -stepX;\n xVia = this.to.x + stepX;\n yVia = this.from.y;\n }\n else if (type === 'vertical') {\n let stepY = (1 - factor) * dy;\n if (this.from.y < this.to.y) stepY = -stepY;\n xVia = this.from.x;\n yVia = this.to.y + stepY;\n }\n else if (type === 'curvedCW') {\n dx = this.to.x - this.from.x;\n dy = this.from.y - this.to.y;\n let radius = Math.sqrt(dx * dx + dy * dy);\n let pi = Math.PI;\n\n let originalAngle = Math.atan2(dy, dx);\n let myAngle = (originalAngle + ((factor * 0.5) + 0.5) * pi) % (2 * pi);\n\n xVia = this.from.x + (factor * 0.5 + 0.5) * radius * Math.sin(myAngle);\n yVia = this.from.y + (factor * 0.5 + 0.5) * radius * Math.cos(myAngle);\n }\n else if (type === 'curvedCCW') {\n dx = this.to.x - this.from.x;\n dy = this.from.y - this.to.y;\n let radius = Math.sqrt(dx * dx + dy * dy);\n let pi = Math.PI;\n\n let originalAngle = Math.atan2(dy, dx);\n let myAngle = (originalAngle + ((-factor * 0.5) + 0.5) * pi) % (2 * pi);\n\n xVia = this.from.x + (factor * 0.5 + 0.5) * radius * Math.sin(myAngle);\n yVia = this.from.y + (factor * 0.5 + 0.5) * radius * Math.cos(myAngle);\n }\n else { // continuous\n let stepX;\n let stepY;\n\n if (dx <= dy) {\n stepX = stepY = factor * dy;\n } else {\n stepX = stepY = factor * dx;\n }\n\n if (this.from.x > this.to.x) stepX = -stepX;\n if (this.from.y >= this.to.y) stepY = -stepY;\n\n xVia = this.from.x + stepX;\n yVia = this.from.y + stepY;\n\n if (dx <= dy) {\n if (this.from.x <= this.to.x) {\n xVia = this.to.x < xVia ? this.to.x : xVia;\n }\n else {\n xVia = this.to.x > xVia ? this.to.x : xVia;\n }\n }\n else {\n if (this.from.y >= this.to.y) {\n yVia = this.to.y > yVia ? this.to.y : yVia;\n } else {\n yVia = this.to.y < yVia ? this.to.y : yVia;\n }\n }\n }\n return {x: xVia, y: yVia};\n }\n\n /**\n *\n * @param {Node} nearNode\n * @param {CanvasRenderingContext2D} ctx\n * @param {Object} options\n * @returns {*}\n * @private\n */\n _findBorderPosition(nearNode, ctx, options = {}) {\n return this._findBorderPositionBezier(nearNode, ctx, options.via);\n }\n\n /**\n *\n * @param {number} x1\n * @param {number} y1\n * @param {number} x2\n * @param {number} y2\n * @param {number} x3\n * @param {number} y3\n * @param {Node} viaNode\n * @returns {number}\n * @private\n */\n _getDistanceToEdge(x1, y1, x2, y2, x3, y3, viaNode = this._getViaCoordinates()) { // x3,y3 is the point\n return this._getDistanceToBezierEdge(x1, y1, x2, y2, x3, y3, viaNode);\n }\n\n /**\n * Combined function of pointOnLine and pointOnBezier. This gives the coordinates of a point on the line at a certain percentage of the way\n * @param {number} percentage\n * @param {Node} viaNode\n * @returns {{x: number, y: number}}\n * @private\n */\n getPoint(percentage, viaNode = this._getViaCoordinates()) {\n var t = percentage;\n var x = Math.pow(1 - t, 2) * this.fromPoint.x + (2 * t * (1 - t)) * viaNode.x + Math.pow(t, 2) * this.toPoint.x;\n var y = Math.pow(1 - t, 2) * this.fromPoint.y + (2 * t * (1 - t)) * viaNode.y + Math.pow(t, 2) * this.toPoint.y;\n\n return {x: x, y: y};\n }\n}\n\n\nexport default BezierEdgeStatic;\n","import EdgeBase from './util/EdgeBase'\n\n/**\n * A Straight Edge.\n *\n * @extends EdgeBase\n */\nclass StraightEdge extends EdgeBase {\n /**\n * @param {Object} options\n * @param {Object} body\n * @param {Label} labelModule\n */\n constructor(options, body, labelModule) {\n super(options, body, labelModule);\n }\n\n /**\n * Draw a line between two nodes\n * @param {CanvasRenderingContext2D} ctx\n * @param {ArrowOptions} values\n * @private\n */\n _line(ctx, values) {\n // draw a straight line\n ctx.beginPath();\n ctx.moveTo(this.fromPoint.x, this.fromPoint.y);\n ctx.lineTo(this.toPoint.x, this.toPoint.y);\n // draw shadow if enabled\n this.enableShadow(ctx, values);\n ctx.stroke();\n this.disableShadow(ctx, values);\n }\n\n /**\n *\n * @returns {undefined}\n */\n getViaNode() {\n return undefined;\n }\n\n /**\n * Combined function of pointOnLine and pointOnBezier. This gives the coordinates of a point on the line at a certain percentage of the way\n *\n * @param {number} percentage\n * @returns {{x: number, y: number}}\n * @private\n */\n getPoint(percentage) {\n return {\n x: (1 - percentage) * this.fromPoint.x + percentage * this.toPoint.x,\n y: (1 - percentage) * this.fromPoint.y + percentage * this.toPoint.y\n }\n }\n\n /**\n *\n * @param {Node} nearNode\n * @param {CanvasRenderingContext2D} ctx\n * @returns {{x: number, y: number}}\n * @private\n */\n _findBorderPosition(nearNode, ctx) {\n let node1 = this.to;\n let node2 = this.from;\n if (nearNode.id === this.from.id) {\n node1 = this.from;\n node2 = this.to;\n }\n\n let angle = Math.atan2((node1.y - node2.y), (node1.x - node2.x));\n let dx = (node1.x - node2.x);\n let dy = (node1.y - node2.y);\n let edgeSegmentLength = Math.sqrt(dx * dx + dy * dy);\n let toBorderDist = nearNode.distanceToBorder(ctx, angle);\n let toBorderPoint = (edgeSegmentLength - toBorderDist) / edgeSegmentLength;\n\n let borderPos = {};\n borderPos.x = (1 - toBorderPoint) * node2.x + toBorderPoint * node1.x;\n borderPos.y = (1 - toBorderPoint) * node2.y + toBorderPoint * node1.y;\n\n return borderPos;\n }\n\n /**\n *\n * @param {number} x1\n * @param {number} y1\n * @param {number} x2\n * @param {number} y2\n * @param {number} x3\n * @param {number} y3\n * @returns {number}\n * @private\n */\n _getDistanceToEdge(x1, y1, x2, y2, x3, y3) { // x3,y3 is the point\n return this._getDistanceToLine(x1, y1, x2, y2, x3, y3);\n }\n\n}\n\nexport default StraightEdge;\n","import util from 'vis-util';\nimport Label from './shared/Label';\nimport ComponentUtil from './shared/ComponentUtil';\nimport CubicBezierEdge from './edges/CubicBezierEdge';\nimport BezierEdgeDynamic from './edges/BezierEdgeDynamic';\nimport BezierEdgeStatic from './edges/BezierEdgeStatic';\nimport StraightEdge from './edges/StraightEdge';\n\n\n/**\n * An edge connects two nodes and has a specific direction.\n */\nclass Edge {\n /**\n * @param {Object} options values specific to this edge, must contain at least 'from' and 'to'\n * @param {Object} body shared state from Network instance\n * @param {Object} globalOptions options from the EdgesHandler instance\n * @param {Object} defaultOptions default options from the EdgeHandler instance. Value and reference are constant\n */\n constructor(options, body, globalOptions, defaultOptions) {\n if (body === undefined) {\n throw new Error(\"No body provided\");\n }\n\n // Since globalOptions is constant in values as well as reference,\n // Following needs to be done only once.\n\n this.options = util.bridgeObject(globalOptions);\n this.globalOptions = globalOptions;\n this.defaultOptions = defaultOptions;\n this.body = body;\n\n // initialize variables\n this.id = undefined;\n this.fromId = undefined;\n this.toId = undefined;\n this.selected = false;\n this.hover = false;\n this.labelDirty = true;\n\n this.baseWidth = this.options.width;\n this.baseFontSize = this.options.font.size;\n\n this.from = undefined; // a node\n this.to = undefined; // a node\n\n this.edgeType = undefined;\n\n this.connected = false;\n\n this.labelModule = new Label(this.body, this.options, true /* It's an edge label */);\n this.setOptions(options);\n }\n\n\n /**\n * Set or overwrite options for the edge\n * @param {Object} options an object with options\n * @returns {null|boolean} null if no options, boolean if date changed\n */\n setOptions(options) {\n if (!options) {\n return;\n }\n\n // record old value of this.options.hidden\n let oldHidden = this.options.hidden\n\n if (oldHidden === undefined || oldHidden === null) {\n oldHidden = false\n }\n\n Edge.parseOptions(this.options, options, true, this.globalOptions);\n\n if (options.id !== undefined) {\n this.id = options.id;\n }\n if (options.from !== undefined) {\n this.fromId = options.from;\n }\n if (options.to !== undefined) {\n this.toId = options.to;\n }\n if (options.title !== undefined) {\n this.title = options.title;\n }\n if (options.value !== undefined) {\n options.value = parseFloat(options.value);\n }\n\n let pile = [options, this.options, this.defaultOptions];\n this.chooser = ComponentUtil.choosify('edge', pile);\n\n // update label Module\n this.updateLabelModule(options);\n\n let dataChanged = this.updateEdgeType();\n\n // if anything has been updates, reset the selection width and the hover width\n this._setInteractionWidths();\n\n // A node is connected when it has a from and to node that both exist in the network.body.nodes.\n this.connect();\n\n let newHidden = this.options.hidden\n\n if (newHidden === undefined || newHidden === null) {\n newHidden = false\n }\n if (newHidden != oldHidden || options.physics !== undefined) {\n dataChanged = true\n }\n\n // there might be a similar problem with physics, but a bug has not been reported\t\n if (options.physics !== undefined) {\n dataChanged = true;\n }\n\n return dataChanged;\n }\n\n\n /**\n *\n * @param {Object} parentOptions\n * @param {Object} newOptions\n * @param {boolean} [allowDeletion=false]\n * @param {Object} [globalOptions={}]\n * @param {boolean} [copyFromGlobals=false]\n */\n static parseOptions(parentOptions, newOptions, allowDeletion = false, globalOptions = {}, copyFromGlobals = false) {\n var fields = [\n 'arrowStrikethrough',\n 'id',\n 'from',\n 'hidden',\n 'hoverWidth',\n 'labelHighlightBold',\n 'length',\n 'line',\n 'opacity',\n 'physics',\n 'scaling',\n 'selectionWidth',\n 'selfReferenceSize',\n 'to',\n 'title',\n 'value',\n 'width',\n 'font',\n 'chosen',\n 'widthConstraint'\n ];\n\n // only deep extend the items in the field array. These do not have shorthand.\n util.selectiveDeepExtend(fields, parentOptions, newOptions, allowDeletion);\n\n // Only copy label if it's a legal value.\n if (ComponentUtil.isValidLabel(newOptions.label)) {\n parentOptions.label = newOptions.label;\n } else if (!ComponentUtil.isValidLabel(parentOptions.label)) {\n parentOptions.label = undefined;\n }\n\n util.mergeOptions(parentOptions, newOptions, 'smooth', globalOptions);\n util.mergeOptions(parentOptions, newOptions, 'shadow', globalOptions);\n util.mergeOptions(parentOptions, newOptions, 'background', globalOptions);\n\n if (newOptions.dashes !== undefined && newOptions.dashes !== null) {\n parentOptions.dashes = newOptions.dashes;\n }\n else if (allowDeletion === true && newOptions.dashes === null) {\n parentOptions.dashes = Object.create(globalOptions.dashes); // this sets the pointer of the option back to the global option.\n }\n\n // set the scaling newOptions\n if (newOptions.scaling !== undefined && newOptions.scaling !== null) {\n if (newOptions.scaling.min !== undefined) {parentOptions.scaling.min = newOptions.scaling.min;}\n if (newOptions.scaling.max !== undefined) {parentOptions.scaling.max = newOptions.scaling.max;}\n util.mergeOptions(parentOptions.scaling, newOptions.scaling, 'label', globalOptions.scaling);\n }\n else if (allowDeletion === true && newOptions.scaling === null) {\n parentOptions.scaling = Object.create(globalOptions.scaling); // this sets the pointer of the option back to the global option.\n }\n\n // handle multiple input cases for arrows\n if (newOptions.arrows !== undefined && newOptions.arrows !== null) {\n if (typeof newOptions.arrows === 'string') {\n let arrows = newOptions.arrows.toLowerCase();\n parentOptions.arrows.to.enabled = arrows.indexOf(\"to\") != -1;\n parentOptions.arrows.middle.enabled = arrows.indexOf(\"middle\") != -1;\n parentOptions.arrows.from.enabled = arrows.indexOf(\"from\") != -1;\n }\n else if (typeof newOptions.arrows === 'object') {\n util.mergeOptions(parentOptions.arrows, newOptions.arrows, 'to', globalOptions.arrows);\n util.mergeOptions(parentOptions.arrows, newOptions.arrows, 'middle', globalOptions.arrows);\n util.mergeOptions(parentOptions.arrows, newOptions.arrows, 'from', globalOptions.arrows);\n }\n else {\n throw new Error(\"The arrow newOptions can only be an object or a string. Refer to the documentation. You used:\" + JSON.stringify(newOptions.arrows));\n }\n }\n else if (allowDeletion === true && newOptions.arrows === null) {\n parentOptions.arrows = Object.create(globalOptions.arrows); // this sets the pointer of the option back to the global option.\n }\n\n // handle multiple input cases for color\n if (newOptions.color !== undefined && newOptions.color !== null) {\n let fromColor = newOptions.color;\n let toColor = parentOptions.color;\n\n // If passed, fill in values from default options - required in the case of no prototype bridging\n if (copyFromGlobals) {\n util.deepExtend(toColor, globalOptions.color, false, allowDeletion);\n } else {\n // Clear local properties - need to do it like this in order to retain prototype bridges\n for (var i in toColor) {\n if (toColor.hasOwnProperty(i)) {\n delete toColor[i];\n }\n }\n }\n\n if (util.isString(toColor)) {\n toColor.color = toColor;\n toColor.highlight = toColor;\n toColor.hover = toColor;\n toColor.inherit = false;\n if (fromColor.opacity === undefined) {\n toColor.opacity = 1.0; // set default\n }\n }\n else {\n let colorsDefined = false;\n if (fromColor.color !== undefined) {toColor.color = fromColor.color; colorsDefined = true;}\n if (fromColor.highlight !== undefined) {toColor.highlight = fromColor.highlight; colorsDefined = true;}\n if (fromColor.hover !== undefined) {toColor.hover = fromColor.hover; colorsDefined = true;}\n if (fromColor.inherit !== undefined) {toColor.inherit = fromColor.inherit;}\n if (fromColor.opacity !== undefined) {toColor.opacity = Math.min(1,Math.max(0,fromColor.opacity));}\n\n if (colorsDefined === true) {\n toColor.inherit = false;\n } else {\n if (toColor.inherit === undefined) {\n toColor.inherit = 'from'; // Set default\n }\n }\n }\n }\n else if (allowDeletion === true && newOptions.color === null) {\n parentOptions.color = util.bridgeObject(globalOptions.color); // set the object back to the global options\n }\n\n if (allowDeletion === true && newOptions.font === null) {\n parentOptions.font = util.bridgeObject(globalOptions.font); // set the object back to the global options\n }\n }\n\n\n /**\n *\n * @returns {ArrowOptions}\n */\n getFormattingValues() {\n let toArrow = (this.options.arrows.to === true) || (this.options.arrows.to.enabled === true)\n let fromArrow = (this.options.arrows.from === true) || (this.options.arrows.from.enabled === true)\n let middleArrow = (this.options.arrows.middle === true) || (this.options.arrows.middle.enabled === true)\n let inheritsColor = this.options.color.inherit;\n let values = {\n toArrow: toArrow,\n toArrowScale: this.options.arrows.to.scaleFactor,\n toArrowType: this.options.arrows.to.type,\n middleArrow: middleArrow,\n middleArrowScale: this.options.arrows.middle.scaleFactor,\n middleArrowType: this.options.arrows.middle.type,\n fromArrow: fromArrow,\n fromArrowScale: this.options.arrows.from.scaleFactor,\n fromArrowType: this.options.arrows.from.type,\n arrowStrikethrough: this.options.arrowStrikethrough,\n color: (inheritsColor? undefined : this.options.color.color),\n inheritsColor: inheritsColor,\n opacity: this.options.color.opacity,\n hidden: this.options.hidden,\n length: this.options.length,\n shadow: this.options.shadow.enabled,\n shadowColor: this.options.shadow.color,\n shadowSize: this.options.shadow.size,\n shadowX: this.options.shadow.x,\n shadowY: this.options.shadow.y,\n dashes: this.options.dashes,\n width: this.options.width,\n background: this.options.background.enabled,\n backgroundColor: this.options.background.color,\n backgroundSize: this.options.background.size,\n backgroundDashes: this.options.background.dashes\n };\n if (this.selected || this.hover) {\n if (this.chooser === true) {\n if (this.selected) {\n let selectedWidth = this.options.selectionWidth;\n if (typeof selectedWidth === 'function') {\n values.width = selectedWidth(values.width);\n } else if (typeof selectedWidth === 'number') {\n values.width += selectedWidth;\n }\n values.width = Math.max(values.width, 0.3 / this.body.view.scale);\n values.color = this.options.color.highlight;\n values.shadow = this.options.shadow.enabled;\n } else if (this.hover) {\n let hoverWidth = this.options.hoverWidth;\n if (typeof hoverWidth === 'function') {\n values.width = hoverWidth(values.width);\n } else if (typeof hoverWidth === 'number') {\n values.width += hoverWidth;\n }\n values.width = Math.max(values.width, 0.3 / this.body.view.scale);\n values.color = this.options.color.hover;\n values.shadow = this.options.shadow.enabled;\n }\n } else if (typeof this.chooser === 'function') {\n this.chooser(values, this.options.id, this.selected, this.hover);\n if (values.color !== undefined) {\n values.inheritsColor = false;\n }\n if (values.shadow === false) {\n if ((values.shadowColor !== this.options.shadow.color) ||\n (values.shadowSize !== this.options.shadow.size) ||\n (values.shadowX !== this.options.shadow.x) ||\n (values.shadowY !== this.options.shadow.y)) {\n values.shadow = true;\n }\n }\n }\n } else {\n values.shadow = this.options.shadow.enabled;\n values.width = Math.max(values.width, 0.3 / this.body.view.scale);\n }\n return values;\n }\n\n /**\n * update the options in the label module\n *\n * @param {Object} options\n */\n updateLabelModule(options) {\n let pile = [\n options,\n this.options,\n this.globalOptions, // Currently set global edge options\n this.defaultOptions\n ];\n\n this.labelModule.update(this.options, pile);\n\n if (this.labelModule.baseSize !== undefined) {\n this.baseFontSize = this.labelModule.baseSize;\n }\n }\n\n /**\n * update the edge type, set the options\n * @returns {boolean}\n */\n updateEdgeType() {\n let smooth = this.options.smooth;\n let dataChanged = false;\n let changeInType = true;\n if (this.edgeType !== undefined) {\n if ((((this.edgeType instanceof BezierEdgeDynamic) &&\n (smooth.enabled === true) &&\n (smooth.type === 'dynamic'))) ||\n (((this.edgeType instanceof CubicBezierEdge) &&\n (smooth.enabled === true) &&\n (smooth.type === 'cubicBezier'))) ||\n (((this.edgeType instanceof BezierEdgeStatic) &&\n (smooth.enabled === true) &&\n (smooth.type !== 'dynamic') &&\n (smooth.type !== 'cubicBezier'))) ||\n (((this.edgeType instanceof StraightEdge) &&\n (smooth.type.enabled === false)))) {\n changeInType = false;\n }\n if (changeInType === true) {\n dataChanged = this.cleanup();\n }\n }\n if (changeInType === true) {\n if (smooth.enabled === true) {\n if (smooth.type === 'dynamic') {\n dataChanged = true;\n this.edgeType = new BezierEdgeDynamic(this.options, this.body, this.labelModule);\n } else if (smooth.type === 'cubicBezier') {\n this.edgeType = new CubicBezierEdge(this.options, this.body, this.labelModule);\n } else {\n this.edgeType = new BezierEdgeStatic(this.options, this.body, this.labelModule);\n }\n } else {\n this.edgeType = new StraightEdge(this.options, this.body, this.labelModule);\n }\n } else { // if nothing changes, we just set the options.\n this.edgeType.setOptions(this.options);\n }\n return dataChanged;\n }\n\n /**\n * Connect an edge to its nodes\n */\n connect() {\n this.disconnect();\n\n this.from = this.body.nodes[this.fromId] || undefined;\n this.to = this.body.nodes[this.toId] || undefined;\n this.connected = (this.from !== undefined && this.to !== undefined);\n\n if (this.connected === true) {\n this.from.attachEdge(this);\n this.to.attachEdge(this);\n }\n else {\n if (this.from) {\n this.from.detachEdge(this);\n }\n if (this.to) {\n this.to.detachEdge(this);\n }\n }\n\n this.edgeType.connect();\n }\n\n\n /**\n * Disconnect an edge from its nodes\n */\n disconnect() {\n if (this.from) {\n this.from.detachEdge(this);\n this.from = undefined;\n }\n if (this.to) {\n this.to.detachEdge(this);\n this.to = undefined;\n }\n\n this.connected = false;\n }\n\n\n /**\n * get the title of this edge.\n * @return {string} title The title of the edge, or undefined when no title\n * has been set.\n */\n getTitle() {\n return this.title;\n }\n\n\n /**\n * check if this node is selecte\n * @return {boolean} selected True if node is selected, else false\n */\n isSelected() {\n return this.selected;\n }\n\n\n /**\n * Retrieve the value of the edge. Can be undefined\n * @return {number} value\n */\n getValue() {\n return this.options.value;\n }\n\n\n /**\n * Adjust the value range of the edge. The edge will adjust it's width\n * based on its value.\n * @param {number} min\n * @param {number} max\n * @param {number} total\n */\n setValueRange(min, max, total) {\n if (this.options.value !== undefined) {\n var scale = this.options.scaling.customScalingFunction(min, max, total, this.options.value);\n var widthDiff = this.options.scaling.max - this.options.scaling.min;\n if (this.options.scaling.label.enabled === true) {\n var fontDiff = this.options.scaling.label.max - this.options.scaling.label.min;\n this.options.font.size = this.options.scaling.label.min + scale * fontDiff;\n }\n this.options.width = this.options.scaling.min + scale * widthDiff;\n }\n else {\n this.options.width = this.baseWidth;\n this.options.font.size = this.baseFontSize;\n }\n\n this._setInteractionWidths();\n this.updateLabelModule();\n }\n\n /**\n *\n * @private\n */\n _setInteractionWidths() {\n if (typeof this.options.hoverWidth === 'function') {\n this.edgeType.hoverWidth = this.options.hoverWidth(this.options.width);\n } else {\n this.edgeType.hoverWidth = this.options.hoverWidth + this.options.width;\n }\n if (typeof this.options.selectionWidth === 'function') {\n this.edgeType.selectionWidth = this.options.selectionWidth(this.options.width);\n } else {\n this.edgeType.selectionWidth = this.options.selectionWidth + this.options.width;\n }\n }\n\n\n /**\n * Redraw a edge\n * Draw this edge in the given canvas\n * The 2d context of a HTML canvas can be retrieved by canvas.getContext(\"2d\");\n * @param {CanvasRenderingContext2D} ctx\n */\n draw(ctx) {\n let values = this.getFormattingValues();\n if (values.hidden) {\n return;\n }\n\n // get the via node from the edge type\n let viaNode = this.edgeType.getViaNode();\n let arrowData = {};\n\n // restore edge targets to defaults\n this.edgeType.fromPoint = this.edgeType.from;\n this.edgeType.toPoint = this.edgeType.to;\n\n // from and to arrows give a different end point for edges. we set them here\n if (values.fromArrow) {\n arrowData.from = this.edgeType.getArrowData(ctx, 'from', viaNode, this.selected, this.hover, values);\n if (values.arrowStrikethrough === false)\n this.edgeType.fromPoint = arrowData.from.core;\n }\n if (values.toArrow) {\n arrowData.to = this.edgeType.getArrowData(ctx, 'to', viaNode, this.selected, this.hover, values);\n if (values.arrowStrikethrough === false)\n this.edgeType.toPoint = arrowData.to.core;\n }\n\n // the middle arrow depends on the line, which can depend on the to and from arrows so we do this one lastly.\n if (values.middleArrow) {\n arrowData.middle = this.edgeType.getArrowData(ctx,'middle', viaNode, this.selected, this.hover, values);\n }\n\n // draw everything\n this.edgeType.drawLine(ctx, values, this.selected, this.hover, viaNode);\n this.drawArrows(ctx, arrowData, values);\n this.drawLabel(ctx, viaNode);\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {Object} arrowData\n * @param {ArrowOptions} values\n */\n drawArrows(ctx, arrowData, values) {\n if (values.fromArrow) {\n this.edgeType.drawArrowHead(ctx, values, this.selected, this.hover, arrowData.from);\n }\n if (values.middleArrow) {\n this.edgeType.drawArrowHead(ctx, values, this.selected, this.hover, arrowData.middle);\n }\n if (values.toArrow) {\n this.edgeType.drawArrowHead(ctx, values, this.selected, this.hover, arrowData.to);\n }\n }\n\n /**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {Node} viaNode\n */\n drawLabel(ctx, viaNode) {\n if (this.options.label !== undefined) {\n // set style\n var node1 = this.from;\n var node2 = this.to;\n\n if (this.labelModule.differentState(this.selected, this.hover)) {\n this.labelModule.getTextSize(ctx, this.selected, this.hover);\n }\n\n if (node1.id != node2.id) {\n this.labelModule.pointToSelf = false;\n var point = this.edgeType.getPoint(0.5, viaNode);\n ctx.save();\n\n let rotationPoint = this._getRotation(ctx);\n if (rotationPoint.angle != 0) {\n ctx.translate(rotationPoint.x, rotationPoint.y);\n ctx.rotate(rotationPoint.angle);\n }\n\n // draw the label\n this.labelModule.draw(ctx, point.x, point.y, this.selected, this.hover);\n\n/*\n // Useful debug code: draw a border around the label\n // This should **not** be enabled in production!\n var size = this.labelModule.getSize();; // ;; intentional so lint catches it\n ctx.strokeStyle = \"#ff0000\";\n ctx.strokeRect(size.left, size.top, size.width, size.height);\n // End debug code\n*/\n\n ctx.restore();\n }\n else {\n // Ignore the orientations.\n this.labelModule.pointToSelf = true;\n var x, y;\n var radius = this.options.selfReferenceSize;\n if (node1.shape.width > node1.shape.height) {\n x = node1.x + node1.shape.width * 0.5;\n y = node1.y - radius;\n }\n else {\n x = node1.x + radius;\n y = node1.y - node1.shape.height * 0.5;\n }\n point = this._pointOnCircle(x, y, radius, 0.125);\n this.labelModule.draw(ctx, point.x, point.y, this.selected, this.hover);\n }\n }\n }\n\n\n /**\n * Determine all visual elements of this edge instance, in which the given\n * point falls within the bounding shape.\n *\n * @param {point} point\n * @returns {Array.} list with the items which are on the point\n */\n getItemsOnPoint(point) {\n var ret = [];\n\n if (this.labelModule.visible()) {\n let rotationPoint = this._getRotation();\n if (ComponentUtil.pointInRect(this.labelModule.getSize(), point, rotationPoint)) {\n ret.push({edgeId:this.id, labelId:0});\n }\n }\n\n let obj = {\n left: point.x,\n top: point.y\n };\n\n if (this.isOverlappingWith(obj)) {\n ret.push({edgeId:this.id});\n }\n\n return ret;\n }\n\n\n /**\n * Check if this object is overlapping with the provided object\n * @param {Object} obj an object with parameters left, top\n * @return {boolean} True if location is located on the edge\n */\n isOverlappingWith(obj) {\n if (this.connected) {\n var distMax = 10;\n var xFrom = this.from.x;\n var yFrom = this.from.y;\n var xTo = this.to.x;\n var yTo = this.to.y;\n var xObj = obj.left;\n var yObj = obj.top;\n\n var dist = this.edgeType.getDistanceToEdge(xFrom, yFrom, xTo, yTo, xObj, yObj);\n\n return (dist < distMax);\n }\n else {\n return false\n }\n }\n\n\n /** \n * Determine the rotation point, if any.\n *\n * @param {CanvasRenderingContext2D} [ctx] if passed, do a recalculation of the label size\n * @returns {rotationPoint} the point to rotate around and the angle in radians to rotate\n * @private\n */\n _getRotation(ctx) {\n let viaNode = this.edgeType.getViaNode();\n let point = this.edgeType.getPoint(0.5, viaNode);\n\n if (ctx !== undefined) {\n this.labelModule.calculateLabelSize(ctx, this.selected, this.hover, point.x, point.y);\n }\n\n let ret = {\n x: point.x,\n y: this.labelModule.size.yLine,\n angle: 0\n };\n\n if (!this.labelModule.visible()) {\n return ret; // Don't even bother doing the atan2, there's nothing to draw\n }\n\n if (this.options.font.align === \"horizontal\") {\n return ret; // No need to calculate angle\n }\n\n var dy = this.from.y - this.to.y;\n var dx = this.from.x - this.to.x;\n var angle = Math.atan2(dy, dx); // radians\n\n // rotate so that label is readable\n if ((angle < -1 && dx < 0) || (angle > 0 && dx < 0)) {\n angle += Math.PI;\n }\n ret.angle = angle;\n\n return ret;\n }\n\n\n /**\n * Get a point on a circle\n * @param {number} x\n * @param {number} y\n * @param {number} radius\n * @param {number} percentage Value between 0 (line start) and 1 (line end)\n * @return {Object} point\n * @private\n */\n _pointOnCircle(x, y, radius, percentage) {\n var angle = percentage * 2 * Math.PI;\n return {\n x: x + radius * Math.cos(angle),\n y: y - radius * Math.sin(angle)\n }\n }\n\n /**\n * Sets selected state to true\n */\n select() {\n this.selected = true;\n }\n\n /**\n * Sets selected state to false\n */\n unselect() {\n this.selected = false;\n }\n\n\n /**\n * cleans all required things on delete\n * @returns {*}\n */\n cleanup() {\n return this.edgeType.cleanup();\n }\n\n\n /**\n * Remove edge from the list and perform necessary cleanup.\n */\n remove() {\n this.cleanup();\n this.disconnect();\n delete this.body.edges[this.id];\n }\n\n\n /**\n * Check if both connecting nodes exist\n * @returns {boolean}\n */\n endPointsValid() {\n return this.body.nodes[this.fromId] !== undefined\n && this.body.nodes[this.toId] !== undefined;\n }\n}\n\nexport default Edge;\n","import util from 'vis-util';\nimport { DataSet, DataView } from 'vis-data';\nimport Edge from './components/Edge';\n\n/**\n * Handler for Edges\n */\nclass EdgesHandler {\n /**\n * @param {Object} body\n * @param {Array.} images\n * @param {Array.} groups\n */\n constructor(body, images, groups) {\n this.body = body;\n this.images = images;\n this.groups = groups;\n\n // create the edge API in the body container\n this.body.functions.createEdge = this.create.bind(this);\n\n this.edgesListeners = {\n add: (event, params) => {this.add(params.items);},\n update: (event, params) => {this.update(params.items);},\n remove: (event, params) => {this.remove(params.items);}\n };\n\n this.options = {};\n this.defaultOptions = {\n arrows: {\n to: {enabled: false, scaleFactor:1, type: 'arrow'},// boolean / {arrowScaleFactor:1} / {enabled: false, arrowScaleFactor:1}\n middle: {enabled: false, scaleFactor:1, type: 'arrow'},\n from: {enabled: false, scaleFactor:1, type: 'arrow'}\n },\n arrowStrikethrough: true,\n color: {\n color:'#848484',\n highlight:'#848484',\n hover: '#848484',\n inherit: 'from',\n opacity:1.0\n },\n dashes: false,\n font: {\n color: '#343434',\n size: 14, // px\n face: 'arial',\n background: 'none',\n strokeWidth: 2, // px\n strokeColor: '#ffffff',\n align:'horizontal',\n multi: false,\n vadjust: 0,\n bold: {\n mod: 'bold'\n },\n boldital: {\n mod: 'bold italic'\n },\n ital: {\n mod: 'italic'\n },\n mono: {\n mod: '',\n size: 15, // px\n face: 'courier new',\n vadjust: 2\n }\n },\n hidden: false,\n hoverWidth: 1.5,\n label: undefined,\n labelHighlightBold: true,\n length: undefined,\n physics: true,\n scaling:{\n min: 1,\n max: 15,\n label: {\n enabled: true,\n min: 14,\n max: 30,\n maxVisible: 30,\n drawThreshold: 5\n },\n customScalingFunction: function (min,max,total,value) {\n if (max === min) {\n return 0.5;\n }\n else {\n var scale = 1 / (max - min);\n return Math.max(0,(value - min)*scale);\n }\n }\n },\n selectionWidth: 1.5,\n selfReferenceSize:20,\n shadow:{\n enabled: false,\n color: 'rgba(0,0,0,0.5)',\n size:10,\n x:5,\n y:5\n },\n background:{\n enabled: false,\n color: 'rgba(111,111,111,1)',\n size:10,\n dashes: false\n },\n smooth: {\n enabled: true,\n type: \"dynamic\",\n forceDirection:'none',\n roundness: 0.5\n },\n title:undefined,\n width: 1,\n value: undefined\n };\n\n util.deepExtend(this.options, this.defaultOptions);\n\n this.bindEventListeners();\n }\n\n /**\n * Binds event listeners\n */\n bindEventListeners() {\n // this allows external modules to force all dynamic curves to turn static.\n this.body.emitter.on(\"_forceDisableDynamicCurves\", (type, emit = true) => {\n if (type === 'dynamic') {\n type = 'continuous';\n }\n let dataChanged = false;\n for (let edgeId in this.body.edges) {\n if (this.body.edges.hasOwnProperty(edgeId)) {\n let edge = this.body.edges[edgeId];\n let edgeData = this.body.data.edges._data[edgeId];\n\n // only forcibly remove the smooth curve if the data has been set of the edge has the smooth curves defined.\n // this is because a change in the global would not affect these curves.\n if (edgeData !== undefined) {\n let smoothOptions = edgeData.smooth;\n if (smoothOptions !== undefined) {\n if (smoothOptions.enabled === true && smoothOptions.type === 'dynamic') {\n if (type === undefined) {\n edge.setOptions({smooth: false});\n }\n else {\n edge.setOptions({smooth: {type: type}});\n }\n dataChanged = true;\n }\n }\n }\n }\n }\n if (emit === true && dataChanged === true) {\n this.body.emitter.emit(\"_dataChanged\");\n }\n });\n\n // this is called when options of EXISTING nodes or edges have changed.\n //\n // NOTE: Not true, called when options have NOT changed, for both existing as well as new nodes.\n // See update() for logic.\n // TODO: Verify and examine the consequences of this. It might still trigger when\n // non-option fields have changed, but then reconnecting edges is still useless.\n // Alternatively, it might also be called when edges are removed.\n //\n this.body.emitter.on(\"_dataUpdated\", () => {\n this.reconnectEdges();\n });\n\n // refresh the edges. Used when reverting from hierarchical layout\n this.body.emitter.on(\"refreshEdges\", this.refresh.bind(this));\n this.body.emitter.on(\"refresh\", this.refresh.bind(this));\n this.body.emitter.on(\"destroy\", () => {\n util.forEach(this.edgesListeners, (callback, event) => {\n if (this.body.data.edges)\n this.body.data.edges.off(event, callback);\n });\n delete this.body.functions.createEdge;\n delete this.edgesListeners.add;\n delete this.edgesListeners.update;\n delete this.edgesListeners.remove;\n delete this.edgesListeners;\n });\n\n }\n\n /**\n *\n * @param {Object} options\n */\n setOptions(options) {\n if (options !== undefined) {\n // use the parser from the Edge class to fill in all shorthand notations\n Edge.parseOptions(this.options, options, true, this.defaultOptions, true);\n\n // update smooth settings in all edges\n let dataChanged = false;\n if (options.smooth !== undefined) {\n for (let edgeId in this.body.edges) {\n if (this.body.edges.hasOwnProperty(edgeId)) {\n dataChanged = this.body.edges[edgeId].updateEdgeType() || dataChanged;\n }\n }\n }\n\n // update fonts in all edges\n if (options.font !== undefined) {\n for (let edgeId in this.body.edges) {\n if (this.body.edges.hasOwnProperty(edgeId)) {\n this.body.edges[edgeId].updateLabelModule();\n }\n }\n }\n\n // update the state of the variables if needed\n if (options.hidden !== undefined || options.physics !== undefined || dataChanged === true) {\n this.body.emitter.emit('_dataChanged');\n }\n }\n }\n\n\n /**\n * Load edges by reading the data table\n * @param {Array | DataSet | DataView} edges The data containing the edges.\n * @param {boolean} [doNotEmit=false]\n * @private\n */\n setData(edges, doNotEmit = false) {\n var oldEdgesData = this.body.data.edges;\n\n if (edges instanceof DataSet || edges instanceof DataView) {\n this.body.data.edges = edges;\n }\n else if (Array.isArray(edges)) {\n this.body.data.edges = new DataSet();\n this.body.data.edges.add(edges);\n }\n else if (!edges) {\n this.body.data.edges = new DataSet();\n }\n else {\n throw new TypeError('Array or DataSet expected');\n }\n\n // TODO: is this null or undefined or false?\n if (oldEdgesData) {\n // unsubscribe from old dataset\n util.forEach(this.edgesListeners, (callback, event) => {oldEdgesData.off(event, callback);});\n }\n\n // remove drawn edges\n this.body.edges = {};\n\n // TODO: is this null or undefined or false?\n if (this.body.data.edges) {\n // subscribe to new dataset\n util.forEach(this.edgesListeners, (callback, event) => {this.body.data.edges.on(event, callback);});\n\n // draw all new nodes\n var ids = this.body.data.edges.getIds();\n this.add(ids, true);\n }\n\n this.body.emitter.emit('_adjustEdgesForHierarchicalLayout');\n if (doNotEmit === false) {\n this.body.emitter.emit(\"_dataChanged\");\n }\n }\n\n\n /**\n * Add edges\n * @param {number[] | string[]} ids\n * @param {boolean} [doNotEmit=false]\n * @private\n */\n add(ids, doNotEmit = false) {\n var edges = this.body.edges;\n var edgesData = this.body.data.edges;\n\n for (let i = 0; i < ids.length; i++) {\n var id = ids[i];\n\n var oldEdge = edges[id];\n if (oldEdge) {\n oldEdge.disconnect();\n }\n\n var data = edgesData.get(id, {\"showInternalIds\" : true});\n edges[id] = this.create(data);\n }\n\n this.body.emitter.emit('_adjustEdgesForHierarchicalLayout');\n\n if (doNotEmit === false) {\n this.body.emitter.emit(\"_dataChanged\");\n }\n }\n\n\n\n /**\n * Update existing edges, or create them when not yet existing\n * @param {number[] | string[]} ids\n * @private\n */\n update(ids) {\n var edges = this.body.edges;\n var edgesData = this.body.data.edges;\n var dataChanged = false;\n for (var i = 0; i < ids.length; i++) {\n var id = ids[i];\n var data = edgesData.get(id);\n var edge = edges[id];\n if (edge !== undefined) {\n // update edge\n edge.disconnect();\n dataChanged = edge.setOptions(data) || dataChanged; // if a support node is added, data can be changed.\n edge.connect();\n }\n else {\n // create edge\n this.body.edges[id] = this.create(data);\n dataChanged = true;\n }\n }\n\n if (dataChanged === true) {\n this.body.emitter.emit('_adjustEdgesForHierarchicalLayout');\n this.body.emitter.emit(\"_dataChanged\");\n }\n else {\n this.body.emitter.emit(\"_dataUpdated\");\n }\n }\n\n\n /**\n * Remove existing edges. Non existing ids will be ignored\n * @param {number[] | string[]} ids\n * @param {boolean} [emit=true]\n * @private\n */\n remove(ids, emit = true) {\n if (ids.length === 0) return; // early out\n\n var edges = this.body.edges;\n util.forEach(ids, (id) => {\n var edge = edges[id];\n if (edge !== undefined) {\n edge.remove();\n }\n });\n\n if (emit) {\n this.body.emitter.emit(\"_dataChanged\");\n }\n }\n\n /**\n * Refreshes Edge Handler\n */\n refresh() {\n util.forEach(this.body.edges, (edge, edgeId) => {\n let data = this.body.data.edges._data[edgeId];\n if (data !== undefined) {\n edge.setOptions(data);\n }\n });\n }\n\n /**\n *\n * @param {Object} properties\n * @returns {Edge}\n */\n create(properties) {\n return new Edge(properties, this.body, this.options, this.defaultOptions)\n }\n\n /**\n * Reconnect all edges\n * @private\n */\n reconnectEdges() {\n var id;\n var nodes = this.body.nodes;\n var edges = this.body.edges;\n\n for (id in nodes) {\n if (nodes.hasOwnProperty(id)) {\n nodes[id].edges = [];\n }\n }\n\n for (id in edges) {\n if (edges.hasOwnProperty(id)) {\n var edge = edges[id];\n edge.from = null;\n edge.to = null;\n edge.connect();\n }\n }\n }\n\n /**\n *\n * @param {Edge.id} edgeId\n * @returns {Array}\n */\n getConnectedNodes(edgeId) {\n let nodeList = [];\n if (this.body.edges[edgeId] !== undefined) {\n let edge = this.body.edges[edgeId];\n if (edge.fromId !== undefined) {nodeList.push(edge.fromId);}\n if (edge.toId !== undefined) {nodeList.push(edge.toId);}\n }\n return nodeList;\n }\n\n /**\n * There is no direct relation between the nodes and the edges DataSet,\n * so the right place to do call this is in the handler for event `_dataUpdated`.\n */\n _updateState() {\n this._addMissingEdges();\n this._removeInvalidEdges();\n }\n\n /**\n * Scan for missing nodes and remove corresponding edges, if any.\n * @private\n */\n _removeInvalidEdges() {\n \n let edgesToDelete = [];\n\n util.forEach(this.body.edges, (edge, id) => {\n let toNode = this.body.nodes[edge.toId];\n let fromNode = this.body.nodes[edge.fromId];\n\n // Skip clustering edges here, let the Clustering module handle those\n if ((toNode !== undefined && toNode.isCluster === true)\n || (fromNode !== undefined && fromNode.isCluster === true)) {\n return;\n }\n\n if (toNode === undefined || fromNode === undefined) {\n edgesToDelete.push(id);\n }\n });\n\n this.remove(edgesToDelete, false);\n }\n\n /**\n * add all edges from dataset that are not in the cached state\n * @private\n */ \n _addMissingEdges() {\n let edgesData = this.body.data.edges;\n if (edgesData === undefined || edgesData === null) {\n return; // No edges DataSet yet; can happen on startup \n }\n\n let edges = this.body.edges;\n let addIds = [];\n\n edgesData.forEach((edgeData, edgeId) => {\n let edge = edges[edgeId];\n if(edge===undefined) {\n addIds.push(edgeId);\n }\n });\n \n this.add(addIds,true);\n } \n}\n\nexport default EdgesHandler;\n","/**\n * Barnes Hut Solver\n */\nclass BarnesHutSolver {\n /**\n * @param {Object} body\n * @param {{physicsNodeIndices: Array, physicsEdgeIndices: Array, forces: {}, velocities: {}}} physicsBody\n * @param {Object} options\n */\n constructor(body, physicsBody, options) {\n this.body = body;\n this.physicsBody = physicsBody;\n this.barnesHutTree;\n this.setOptions(options);\n this.randomSeed = 5;\n\n // debug: show grid\n // this.body.emitter.on(\"afterDrawing\", (ctx) => {this._debug(ctx,'#ff0000')})\n }\n\n /**\n *\n * @param {Object} options\n */\n setOptions(options) {\n this.options = options;\n this.thetaInversed = 1 / this.options.theta;\n\n // if 1 then min distance = 0.5, if 0.5 then min distance = 0.5 + 0.5*node.shape.radius\n this.overlapAvoidanceFactor = 1 - Math.max(0, Math.min(1, this.options.avoidOverlap));\n }\n\n /**\n *\n * @returns {number} random integer\n */\n seededRandom() {\n var x = Math.sin(this.randomSeed++) * 10000;\n return x - Math.floor(x);\n }\n\n\n /**\n * This function calculates the forces the nodes apply on each other based on a gravitational model.\n * The Barnes Hut method is used to speed up this N-body simulation.\n *\n * @private\n */\n solve() {\n if (this.options.gravitationalConstant !== 0 && this.physicsBody.physicsNodeIndices.length > 0) {\n let node;\n let nodes = this.body.nodes;\n let nodeIndices = this.physicsBody.physicsNodeIndices;\n let nodeCount = nodeIndices.length;\n\n // create the tree\n let barnesHutTree = this._formBarnesHutTree(nodes, nodeIndices);\n\n // for debugging\n this.barnesHutTree = barnesHutTree;\n\n // place the nodes one by one recursively\n for (let i = 0; i < nodeCount; i++) {\n node = nodes[nodeIndices[i]];\n if (node.options.mass > 0) {\n // starting with root is irrelevant, it never passes the BarnesHutSolver condition\n this._getForceContributions(barnesHutTree.root, node);\n }\n }\n }\n }\n\n\n /**\n * @param {Object} parentBranch\n * @param {Node} node\n * @private\n */\n _getForceContributions(parentBranch, node) {\n this._getForceContribution(parentBranch.children.NW, node);\n this._getForceContribution(parentBranch.children.NE, node);\n this._getForceContribution(parentBranch.children.SW, node);\n this._getForceContribution(parentBranch.children.SE, node);\n }\n\n\n /**\n * This function traverses the barnesHutTree. It checks when it can approximate distant nodes with their center of mass.\n * If a region contains a single node, we check if it is not itself, then we apply the force.\n *\n * @param {Object} parentBranch\n * @param {Node} node\n * @private\n */\n _getForceContribution(parentBranch, node) {\n // we get no force contribution from an empty region\n if (parentBranch.childrenCount > 0) {\n let dx, dy, distance;\n\n // get the distance from the center of mass to the node.\n dx = parentBranch.centerOfMass.x - node.x;\n dy = parentBranch.centerOfMass.y - node.y;\n distance = Math.sqrt(dx * dx + dy * dy);\n\n // BarnesHutSolver condition\n // original condition : s/d < theta = passed === d/s > 1/theta = passed\n // calcSize = 1/s --> d * 1/s > 1/theta = passed\n if (distance * parentBranch.calcSize > this.thetaInversed) {\n this._calculateForces(distance, dx, dy, node, parentBranch);\n }\n else {\n // Did not pass the condition, go into children if available\n if (parentBranch.childrenCount === 4) {\n this._getForceContributions(parentBranch, node);\n }\n else { // parentBranch must have only one node, if it was empty we wouldnt be here\n if (parentBranch.children.data.id != node.id) { // if it is not self\n this._calculateForces(distance, dx, dy, node, parentBranch);\n }\n }\n }\n }\n }\n\n\n /**\n * Calculate the forces based on the distance.\n *\n * @param {number} distance\n * @param {number} dx\n * @param {number} dy\n * @param {Node} node\n * @param {Object} parentBranch\n * @private\n */\n _calculateForces(distance, dx, dy, node, parentBranch) {\n if (distance === 0) {\n distance = 0.1;\n dx = distance;\n }\n\n if (this.overlapAvoidanceFactor < 1 && node.shape.radius) {\n distance = Math.max(0.1 + (this.overlapAvoidanceFactor * node.shape.radius), distance - node.shape.radius);\n }\n\n // the dividing by the distance cubed instead of squared allows us to get the fx and fy components without sines and cosines\n // it is shorthand for gravityforce with distance squared and fx = dx/distance * gravityForce\n let gravityForce = this.options.gravitationalConstant * parentBranch.mass * node.options.mass / Math.pow(distance,3);\n let fx = dx * gravityForce;\n let fy = dy * gravityForce;\n\n this.physicsBody.forces[node.id].x += fx;\n this.physicsBody.forces[node.id].y += fy;\n }\n\n\n /**\n * This function constructs the barnesHut tree recursively. It creates the root, splits it and starts placing the nodes.\n *\n * @param {Array.} nodes\n * @param {Array.} nodeIndices\n * @returns {{root: {centerOfMass: {x: number, y: number}, mass: number, range: {minX: number, maxX: number, minY: number, maxY: number}, size: number, calcSize: number, children: {data: null}, maxWidth: number, level: number, childrenCount: number}}} BarnesHutTree\n * @private\n */\n _formBarnesHutTree(nodes, nodeIndices) {\n let node;\n let nodeCount = nodeIndices.length;\n\n let minX = nodes[nodeIndices[0]].x;\n let minY = nodes[nodeIndices[0]].y;\n let maxX = nodes[nodeIndices[0]].x;\n let maxY = nodes[nodeIndices[0]].y;\n\n // get the range of the nodes\n for (let i = 1; i < nodeCount; i++) {\n let node = nodes[nodeIndices[i]];\n let x = node.x;\n let y = node.y;\n if (node.options.mass > 0) {\n if (x < minX) {\n minX = x;\n }\n if (x > maxX) {\n maxX = x;\n }\n if (y < minY) {\n minY = y;\n }\n if (y > maxY) {\n maxY = y;\n }\n }\n }\n // make the range a square\n let sizeDiff = Math.abs(maxX - minX) - Math.abs(maxY - minY); // difference between X and Y\n if (sizeDiff > 0) {\n minY -= 0.5 * sizeDiff;\n maxY += 0.5 * sizeDiff;\n } // xSize > ySize\n else {\n minX += 0.5 * sizeDiff;\n maxX -= 0.5 * sizeDiff;\n } // xSize < ySize\n\n\n let minimumTreeSize = 1e-5;\n let rootSize = Math.max(minimumTreeSize, Math.abs(maxX - minX));\n let halfRootSize = 0.5 * rootSize;\n let centerX = 0.5 * (minX + maxX), centerY = 0.5 * (minY + maxY);\n\n // construct the barnesHutTree\n let barnesHutTree = {\n root: {\n centerOfMass: {x: 0, y: 0},\n mass: 0,\n range: {\n minX: centerX - halfRootSize, maxX: centerX + halfRootSize,\n minY: centerY - halfRootSize, maxY: centerY + halfRootSize\n },\n size: rootSize,\n calcSize: 1 / rootSize,\n children: {data: null},\n maxWidth: 0,\n level: 0,\n childrenCount: 4\n }\n };\n this._splitBranch(barnesHutTree.root);\n\n // place the nodes one by one recursively\n for (let i = 0; i < nodeCount; i++) {\n node = nodes[nodeIndices[i]];\n if (node.options.mass > 0) {\n this._placeInTree(barnesHutTree.root, node);\n }\n }\n\n // make global\n return barnesHutTree\n }\n\n\n /**\n * this updates the mass of a branch. this is increased by adding a node.\n *\n * @param {Object} parentBranch\n * @param {Node} node\n * @private\n */\n _updateBranchMass(parentBranch, node) {\n let centerOfMass = parentBranch.centerOfMass;\n let totalMass = parentBranch.mass + node.options.mass;\n let totalMassInv = 1 / totalMass;\n\n centerOfMass.x = centerOfMass.x * parentBranch.mass + node.x * node.options.mass;\n centerOfMass.x *= totalMassInv;\n\n centerOfMass.y = centerOfMass.y * parentBranch.mass + node.y * node.options.mass;\n centerOfMass.y *= totalMassInv;\n\n parentBranch.mass = totalMass;\n let biggestSize = Math.max(Math.max(node.height, node.radius), node.width);\n parentBranch.maxWidth = (parentBranch.maxWidth < biggestSize) ? biggestSize : parentBranch.maxWidth;\n\n }\n\n\n /**\n * determine in which branch the node will be placed.\n *\n * @param {Object} parentBranch\n * @param {Node} node\n * @param {boolean} skipMassUpdate\n * @private\n */\n _placeInTree(parentBranch, node, skipMassUpdate) {\n if (skipMassUpdate != true || skipMassUpdate === undefined) {\n // update the mass of the branch.\n this._updateBranchMass(parentBranch, node);\n }\n\n let range = parentBranch.children.NW.range;\n let region;\n if (range.maxX > node.x) { // in NW or SW\n if (range.maxY > node.y) {\n region = \"NW\";\n }\n else {\n region = \"SW\";\n }\n }\n else { // in NE or SE\n if (range.maxY > node.y) {\n region = \"NE\";\n }\n else {\n region = \"SE\";\n }\n }\n\n this._placeInRegion(parentBranch, node, region);\n }\n\n\n /**\n * actually place the node in a region (or branch)\n *\n * @param {Object} parentBranch\n * @param {Node} node\n * @param {'NW'| 'NE' | 'SW' | 'SE'} region\n * @private\n */\n _placeInRegion(parentBranch, node, region) {\n let children = parentBranch.children[region];\n\n switch (children.childrenCount) {\n case 0: // place node here\n children.children.data = node;\n children.childrenCount = 1;\n this._updateBranchMass(children, node);\n break;\n case 1: // convert into children\n // if there are two nodes exactly overlapping (on init, on opening of cluster etc.)\n // we move one node a little bit and we do not put it in the tree.\n if (children.children.data.x === node.x && children.children.data.y === node.y) {\n node.x += this.seededRandom();\n node.y += this.seededRandom();\n }\n else {\n this._splitBranch(children);\n this._placeInTree(children, node);\n }\n break;\n case 4: // place in branch\n this._placeInTree(children, node);\n break;\n }\n }\n\n\n /**\n * this function splits a branch into 4 sub branches. If the branch contained a node, we place it in the subbranch\n * after the split is complete.\n *\n * @param {Object} parentBranch\n * @private\n */\n _splitBranch(parentBranch) {\n // if the branch is shaded with a node, replace the node in the new subset.\n let containedNode = null;\n if (parentBranch.childrenCount === 1) {\n containedNode = parentBranch.children.data;\n parentBranch.mass = 0;\n parentBranch.centerOfMass.x = 0;\n parentBranch.centerOfMass.y = 0;\n }\n parentBranch.childrenCount = 4;\n parentBranch.children.data = null;\n this._insertRegion(parentBranch, \"NW\");\n this._insertRegion(parentBranch, \"NE\");\n this._insertRegion(parentBranch, \"SW\");\n this._insertRegion(parentBranch, \"SE\");\n\n if (containedNode != null) {\n this._placeInTree(parentBranch, containedNode);\n }\n }\n\n\n /**\n * This function subdivides the region into four new segments.\n * Specifically, this inserts a single new segment.\n * It fills the children section of the parentBranch\n *\n * @param {Object} parentBranch\n * @param {'NW'| 'NE' | 'SW' | 'SE'} region\n * @private\n */\n _insertRegion(parentBranch, region) {\n let minX, maxX, minY, maxY;\n let childSize = 0.5 * parentBranch.size;\n switch (region) {\n case \"NW\":\n minX = parentBranch.range.minX;\n maxX = parentBranch.range.minX + childSize;\n minY = parentBranch.range.minY;\n maxY = parentBranch.range.minY + childSize;\n break;\n case \"NE\":\n minX = parentBranch.range.minX + childSize;\n maxX = parentBranch.range.maxX;\n minY = parentBranch.range.minY;\n maxY = parentBranch.range.minY + childSize;\n break;\n case \"SW\":\n minX = parentBranch.range.minX;\n maxX = parentBranch.range.minX + childSize;\n minY = parentBranch.range.minY + childSize;\n maxY = parentBranch.range.maxY;\n break;\n case \"SE\":\n minX = parentBranch.range.minX + childSize;\n maxX = parentBranch.range.maxX;\n minY = parentBranch.range.minY + childSize;\n maxY = parentBranch.range.maxY;\n break;\n }\n\n\n parentBranch.children[region] = {\n centerOfMass: {x: 0, y: 0},\n mass: 0,\n range: {minX: minX, maxX: maxX, minY: minY, maxY: maxY},\n size: 0.5 * parentBranch.size,\n calcSize: 2 * parentBranch.calcSize,\n children: {data: null},\n maxWidth: 0,\n level: parentBranch.level + 1,\n childrenCount: 0\n };\n }\n\n\n //--------------------------- DEBUGGING BELOW ---------------------------//\n\n\n /**\n * This function is for debugging purposed, it draws the tree.\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {string} color\n * @private\n */\n _debug(ctx, color) {\n if (this.barnesHutTree !== undefined) {\n\n ctx.lineWidth = 1;\n\n this._drawBranch(this.barnesHutTree.root, ctx, color);\n }\n }\n\n\n /**\n * This function is for debugging purposes. It draws the branches recursively.\n *\n * @param {Object} branch\n * @param {CanvasRenderingContext2D} ctx\n * @param {string} color\n * @private\n */\n _drawBranch(branch, ctx, color) {\n if (color === undefined) {\n color = \"#FF0000\";\n }\n\n if (branch.childrenCount === 4) {\n this._drawBranch(branch.children.NW, ctx);\n this._drawBranch(branch.children.NE, ctx);\n this._drawBranch(branch.children.SE, ctx);\n this._drawBranch(branch.children.SW, ctx);\n }\n ctx.strokeStyle = color;\n ctx.beginPath();\n ctx.moveTo(branch.range.minX, branch.range.minY);\n ctx.lineTo(branch.range.maxX, branch.range.minY);\n ctx.stroke();\n\n ctx.beginPath();\n ctx.moveTo(branch.range.maxX, branch.range.minY);\n ctx.lineTo(branch.range.maxX, branch.range.maxY);\n ctx.stroke();\n\n ctx.beginPath();\n ctx.moveTo(branch.range.maxX, branch.range.maxY);\n ctx.lineTo(branch.range.minX, branch.range.maxY);\n ctx.stroke();\n\n ctx.beginPath();\n ctx.moveTo(branch.range.minX, branch.range.maxY);\n ctx.lineTo(branch.range.minX, branch.range.minY);\n ctx.stroke();\n\n /*\n if (branch.mass > 0) {\n ctx.circle(branch.centerOfMass.x, branch.centerOfMass.y, 3*branch.mass);\n ctx.stroke();\n }\n */\n }\n}\n\n\nexport default BarnesHutSolver;\n","/**\n * Repulsion Solver\n */\nclass RepulsionSolver {\n /**\n * @param {Object} body\n * @param {{physicsNodeIndices: Array, physicsEdgeIndices: Array, forces: {}, velocities: {}}} physicsBody\n * @param {Object} options\n */\n constructor(body, physicsBody, options) {\n this.body = body;\n this.physicsBody = physicsBody;\n this.setOptions(options);\n }\n\n /**\n *\n * @param {Object} options\n */\n setOptions(options) {\n this.options = options;\n }\n\n /**\n * Calculate the forces the nodes apply on each other based on a repulsion field.\n * This field is linearly approximated.\n *\n * @private\n */\n solve() {\n var dx, dy, distance, fx, fy, repulsingForce, node1, node2;\n\n var nodes = this.body.nodes;\n var nodeIndices = this.physicsBody.physicsNodeIndices;\n var forces = this.physicsBody.forces;\n\n // repulsing forces between nodes\n var nodeDistance = this.options.nodeDistance;\n\n // approximation constants\n var a = (-2 / 3) / nodeDistance;\n var b = 4 / 3;\n\n // we loop from i over all but the last entree in the array\n // j loops from i+1 to the last. This way we do not double count any of the indices, nor i === j\n for (let i = 0; i < nodeIndices.length - 1; i++) {\n node1 = nodes[nodeIndices[i]];\n for (let j = i + 1; j < nodeIndices.length; j++) {\n node2 = nodes[nodeIndices[j]];\n\n dx = node2.x - node1.x;\n dy = node2.y - node1.y;\n distance = Math.sqrt(dx * dx + dy * dy);\n\n // same condition as BarnesHutSolver, making sure nodes are never 100% overlapping.\n if (distance === 0) {\n distance = 0.1*Math.random();\n dx = distance;\n }\n\n if (distance < 2 * nodeDistance) {\n if (distance < 0.5 * nodeDistance) {\n repulsingForce = 1.0;\n }\n else {\n repulsingForce = a * distance + b; // linear approx of 1 / (1 + Math.exp((distance / nodeDistance - 1) * steepness))\n }\n repulsingForce = repulsingForce / distance;\n\n fx = dx * repulsingForce;\n fy = dy * repulsingForce;\n\n forces[node1.id].x -= fx;\n forces[node1.id].y -= fy;\n forces[node2.id].x += fx;\n forces[node2.id].y += fy;\n }\n }\n }\n }\n}\n\n\nexport default RepulsionSolver;","/**\n * Hierarchical Repulsion Solver\n */\nclass HierarchicalRepulsionSolver {\n /**\n * @param {Object} body\n * @param {{physicsNodeIndices: Array, physicsEdgeIndices: Array, forces: {}, velocities: {}}} physicsBody\n * @param {Object} options\n */\n constructor(body, physicsBody, options) {\n this.body = body;\n this.physicsBody = physicsBody;\n this.setOptions(options);\n }\n\n /**\n *\n * @param {Object} options\n */\n setOptions(options) {\n this.options = options;\n }\n\n /**\n * Calculate the forces the nodes apply on each other based on a repulsion field.\n * This field is linearly approximated.\n *\n * @private\n */\n solve() {\n var dx, dy, distance, fx, fy, repulsingForce, node1, node2, i, j;\n\n var nodes = this.body.nodes;\n var nodeIndices = this.physicsBody.physicsNodeIndices;\n var forces = this.physicsBody.forces;\n\n // repulsing forces between nodes\n var nodeDistance = this.options.nodeDistance;\n\n // we loop from i over all but the last entree in the array\n // j loops from i+1 to the last. This way we do not double count any of the indices, nor i === j\n for (i = 0; i < nodeIndices.length - 1; i++) {\n node1 = nodes[nodeIndices[i]];\n for (j = i + 1; j < nodeIndices.length; j++) {\n node2 = nodes[nodeIndices[j]];\n\n // nodes only affect nodes on their level\n if (node1.level === node2.level) {\n dx = node2.x - node1.x;\n dy = node2.y - node1.y;\n distance = Math.sqrt(dx * dx + dy * dy);\n\n var steepness = 0.05;\n if (distance < nodeDistance) {\n repulsingForce = -Math.pow(steepness * distance, 2) + Math.pow(steepness * nodeDistance, 2);\n }\n else {\n repulsingForce = 0;\n }\n // normalize force with\n if (distance === 0) {\n distance = 0.01;\n }\n else {\n repulsingForce = repulsingForce / distance;\n }\n fx = dx * repulsingForce;\n fy = dy * repulsingForce;\n\n forces[node1.id].x -= fx;\n forces[node1.id].y -= fy;\n forces[node2.id].x += fx;\n forces[node2.id].y += fy;\n }\n }\n }\n }\n}\n\n\nexport default HierarchicalRepulsionSolver;","/**\n * Spring Solver\n */\nclass SpringSolver {\n /**\n * @param {Object} body\n * @param {{physicsNodeIndices: Array, physicsEdgeIndices: Array, forces: {}, velocities: {}}} physicsBody\n * @param {Object} options\n */\n constructor(body, physicsBody, options) {\n this.body = body;\n this.physicsBody = physicsBody;\n this.setOptions(options);\n }\n\n /**\n *\n * @param {Object} options\n */\n setOptions(options) {\n this.options = options;\n }\n\n /**\n * This function calculates the springforces on the nodes, accounting for the support nodes.\n *\n * @private\n */\n solve() {\n let edgeLength, edge;\n let edgeIndices = this.physicsBody.physicsEdgeIndices;\n let edges = this.body.edges;\n let node1, node2, node3;\n\n // forces caused by the edges, modelled as springs\n for (let i = 0; i < edgeIndices.length; i++) {\n edge = edges[edgeIndices[i]];\n if (edge.connected === true && edge.toId !== edge.fromId) {\n // only calculate forces if nodes are in the same sector\n if (this.body.nodes[edge.toId] !== undefined && this.body.nodes[edge.fromId] !== undefined) {\n if (edge.edgeType.via !== undefined) {\n edgeLength = edge.options.length === undefined ? this.options.springLength : edge.options.length;\n node1 = edge.to;\n node2 = edge.edgeType.via;\n node3 = edge.from;\n\n this._calculateSpringForce(node1, node2, 0.5 * edgeLength);\n this._calculateSpringForce(node2, node3, 0.5 * edgeLength);\n }\n else {\n // the * 1.5 is here so the edge looks as large as a smooth edge. It does not initially because the smooth edges use\n // the support nodes which exert a repulsive force on the to and from nodes, making the edge appear larger.\n edgeLength = edge.options.length === undefined ? this.options.springLength * 1.5: edge.options.length;\n this._calculateSpringForce(edge.from, edge.to, edgeLength);\n }\n }\n }\n }\n }\n\n\n /**\n * This is the code actually performing the calculation for the function above.\n *\n * @param {Node} node1\n * @param {Node} node2\n * @param {number} edgeLength\n * @private\n */\n _calculateSpringForce(node1, node2, edgeLength) {\n let dx = (node1.x - node2.x);\n let dy = (node1.y - node2.y);\n let distance = Math.max(Math.sqrt(dx * dx + dy * dy),0.01);\n\n // the 1/distance is so the fx and fy can be calculated without sine or cosine.\n let springForce = this.options.springConstant * (edgeLength - distance) / distance;\n\n let fx = dx * springForce;\n let fy = dy * springForce;\n\n // handle the case where one node is not part of the physcis\n if (this.physicsBody.forces[node1.id] !== undefined) {\n this.physicsBody.forces[node1.id].x += fx;\n this.physicsBody.forces[node1.id].y += fy;\n }\n\n if (this.physicsBody.forces[node2.id] !== undefined) {\n this.physicsBody.forces[node2.id].x -= fx;\n this.physicsBody.forces[node2.id].y -= fy;\n }\n }\n}\n\nexport default SpringSolver;","/**\n * Hierarchical Spring Solver\n */\nclass HierarchicalSpringSolver {\n /**\n * @param {Object} body\n * @param {{physicsNodeIndices: Array, physicsEdgeIndices: Array, forces: {}, velocities: {}}} physicsBody\n * @param {Object} options\n */\n constructor(body, physicsBody, options) {\n this.body = body;\n this.physicsBody = physicsBody;\n this.setOptions(options);\n }\n\n /**\n *\n * @param {Object} options\n */\n setOptions(options) {\n this.options = options;\n }\n\n /**\n * This function calculates the springforces on the nodes, accounting for the support nodes.\n *\n * @private\n */\n solve() {\n var edgeLength, edge;\n var dx, dy, fx, fy, springForce, distance;\n var edges = this.body.edges;\n var factor = 0.5;\n\n var edgeIndices = this.physicsBody.physicsEdgeIndices;\n var nodeIndices = this.physicsBody.physicsNodeIndices;\n var forces = this.physicsBody.forces;\n\n // initialize the spring force counters\n for (let i = 0; i < nodeIndices.length; i++) {\n let nodeId = nodeIndices[i];\n forces[nodeId].springFx = 0;\n forces[nodeId].springFy = 0;\n }\n\n\n // forces caused by the edges, modelled as springs\n for (let i = 0; i < edgeIndices.length; i++) {\n edge = edges[edgeIndices[i]];\n if (edge.connected === true) {\n edgeLength = edge.options.length === undefined ? this.options.springLength : edge.options.length;\n\n dx = (edge.from.x - edge.to.x);\n dy = (edge.from.y - edge.to.y);\n distance = Math.sqrt(dx * dx + dy * dy);\n distance = distance === 0 ? 0.01 : distance;\n\n // the 1/distance is so the fx and fy can be calculated without sine or cosine.\n springForce = this.options.springConstant * (edgeLength - distance) / distance;\n\n fx = dx * springForce;\n fy = dy * springForce;\n\n if (edge.to.level != edge.from.level) {\n if (forces[edge.toId] !== undefined) {\n forces[edge.toId].springFx -= fx;\n forces[edge.toId].springFy -= fy;\n }\n if (forces[edge.fromId] !== undefined) {\n forces[edge.fromId].springFx += fx;\n forces[edge.fromId].springFy += fy;\n }\n }\n else {\n if (forces[edge.toId] !== undefined) {\n forces[edge.toId].x -= factor * fx;\n forces[edge.toId].y -= factor * fy;\n }\n if (forces[edge.fromId] !== undefined) {\n forces[edge.fromId].x += factor * fx;\n forces[edge.fromId].y += factor * fy;\n }\n }\n }\n }\n\n // normalize spring forces\n springForce = 1;\n var springFx, springFy;\n for (let i = 0; i < nodeIndices.length; i++) {\n let nodeId = nodeIndices[i];\n springFx = Math.min(springForce,Math.max(-springForce,forces[nodeId].springFx));\n springFy = Math.min(springForce,Math.max(-springForce,forces[nodeId].springFy));\n\n forces[nodeId].x += springFx;\n forces[nodeId].y += springFy;\n }\n\n // retain energy balance\n var totalFx = 0;\n var totalFy = 0;\n for (let i = 0; i < nodeIndices.length; i++) {\n let nodeId = nodeIndices[i];\n totalFx += forces[nodeId].x;\n totalFy += forces[nodeId].y;\n }\n var correctionFx = totalFx / nodeIndices.length;\n var correctionFy = totalFy / nodeIndices.length;\n\n for (let i = 0; i < nodeIndices.length; i++) {\n let nodeId = nodeIndices[i];\n forces[nodeId].x -= correctionFx;\n forces[nodeId].y -= correctionFy;\n }\n }\n}\n\nexport default HierarchicalSpringSolver;\n","/**\n * Central Gravity Solver\n */\nclass CentralGravitySolver {\n /**\n * @param {Object} body\n * @param {{physicsNodeIndices: Array, physicsEdgeIndices: Array, forces: {}, velocities: {}}} physicsBody\n * @param {Object} options\n */\n constructor(body, physicsBody, options) {\n this.body = body;\n this.physicsBody = physicsBody;\n this.setOptions(options);\n }\n\n /**\n *\n * @param {Object} options\n */\n setOptions(options) {\n this.options = options;\n }\n\n /**\n * Calculates forces for each node\n */\n solve() {\n let dx, dy, distance, node;\n let nodes = this.body.nodes;\n let nodeIndices = this.physicsBody.physicsNodeIndices;\n let forces = this.physicsBody.forces;\n\n for (let i = 0; i < nodeIndices.length; i++) {\n let nodeId = nodeIndices[i];\n node = nodes[nodeId];\n dx = -node.x;\n dy = -node.y;\n distance = Math.sqrt(dx * dx + dy * dy);\n\n this._calculateForces(distance, dx, dy, forces, node);\n }\n }\n\n /**\n * Calculate the forces based on the distance.\n * @param {number} distance\n * @param {number} dx\n * @param {number} dy\n * @param {Object} forces\n * @param {Node} node\n * @private\n */\n _calculateForces(distance, dx, dy, forces, node) {\n let gravityForce = (distance === 0) ? 0 : (this.options.centralGravity / distance);\n forces[node.id].x = dx * gravityForce;\n forces[node.id].y = dy * gravityForce;\n }\n}\n\n\nexport default CentralGravitySolver;","import BarnesHutSolver from \"./BarnesHutSolver\"\n\n/**\n * @extends BarnesHutSolver\n */\nclass ForceAtlas2BasedRepulsionSolver extends BarnesHutSolver {\n /**\n * @param {Object} body\n * @param {{physicsNodeIndices: Array, physicsEdgeIndices: Array, forces: {}, velocities: {}}} physicsBody\n * @param {Object} options\n */\n constructor(body, physicsBody, options) {\n super(body, physicsBody, options);\n }\n\n /**\n * Calculate the forces based on the distance.\n *\n * @param {number} distance\n * @param {number} dx\n * @param {number} dy\n * @param {Node} node\n * @param {Object} parentBranch\n * @private\n */\n _calculateForces(distance, dx, dy, node, parentBranch) {\n if (distance === 0) {\n distance = 0.1 * Math.random();\n dx = distance;\n }\n\n if (this.overlapAvoidanceFactor < 1 && node.shape.radius) {\n distance = Math.max(0.1 + (this.overlapAvoidanceFactor * node.shape.radius), distance - node.shape.radius);\n }\n\n let degree = (node.edges.length + 1);\n // the dividing by the distance cubed instead of squared allows us to get the fx and fy components without sines and cosines\n // it is shorthand for gravityforce with distance squared and fx = dx/distance * gravityForce\n let gravityForce = this.options.gravitationalConstant * parentBranch.mass * node.options.mass * degree / Math.pow(distance,2);\n let fx = dx * gravityForce;\n let fy = dy * gravityForce;\n\n this.physicsBody.forces[node.id].x += fx;\n this.physicsBody.forces[node.id].y += fy;\n }\n}\n\nexport default ForceAtlas2BasedRepulsionSolver;\n","import CentralGravitySolver from \"./CentralGravitySolver\"\n\n/**\n * @extends CentralGravitySolver\n */\nclass ForceAtlas2BasedCentralGravitySolver extends CentralGravitySolver {\n /**\n * @param {Object} body\n * @param {{physicsNodeIndices: Array, physicsEdgeIndices: Array, forces: {}, velocities: {}}} physicsBody\n * @param {Object} options\n */\n constructor(body, physicsBody, options) {\n super(body, physicsBody, options);\n }\n\n\n /**\n * Calculate the forces based on the distance.\n *\n * @param {number} distance\n * @param {number} dx\n * @param {number} dy\n * @param {Object} forces\n * @param {Node} node\n * @private\n */\n _calculateForces(distance, dx, dy, forces, node) {\n if (distance > 0) {\n let degree = (node.edges.length + 1);\n let gravityForce = this.options.centralGravity * degree * node.options.mass;\n forces[node.id].x = dx * gravityForce;\n forces[node.id].y = dy * gravityForce;\n }\n }\n}\n\nexport default ForceAtlas2BasedCentralGravitySolver;","import BarnesHutSolver from './components/physics/BarnesHutSolver';\nimport Repulsion from './components/physics/RepulsionSolver';\nimport HierarchicalRepulsion from './components/physics/HierarchicalRepulsionSolver';\nimport SpringSolver from './components/physics/SpringSolver';\nimport HierarchicalSpringSolver from './components/physics/HierarchicalSpringSolver';\nimport CentralGravitySolver from './components/physics/CentralGravitySolver';\nimport ForceAtlas2BasedRepulsionSolver from './components/physics/FA2BasedRepulsionSolver';\nimport ForceAtlas2BasedCentralGravitySolver from './components/physics/FA2BasedCentralGravitySolver';\nimport util from 'vis-util';\nimport EndPoints from './components/edges/util/EndPoints'; // for debugging with _drawForces()\n\n\n/**\n * The physics engine\n */\nclass PhysicsEngine {\n /**\n * @param {Object} body\n */\n constructor(body) {\n this.body = body;\n this.physicsBody = {physicsNodeIndices:[], physicsEdgeIndices:[], forces: {}, velocities: {}};\n\n this.physicsEnabled = true;\n this.simulationInterval = 1000 / 60;\n this.requiresTimeout = true;\n this.previousStates = {};\n this.referenceState = {};\n this.freezeCache = {};\n this.renderTimer = undefined;\n\n // parameters for the adaptive timestep\n this.adaptiveTimestep = false;\n this.adaptiveTimestepEnabled = false;\n this.adaptiveCounter = 0;\n this.adaptiveInterval = 3;\n\n this.stabilized = false;\n this.startedStabilization = false;\n this.stabilizationIterations = 0;\n this.ready = false; // will be set to true if the stabilize\n\n // default options\n this.options = {};\n this.defaultOptions = {\n enabled: true,\n barnesHut: {\n theta: 0.5,\n gravitationalConstant: -2000,\n centralGravity: 0.3,\n springLength: 95,\n springConstant: 0.04,\n damping: 0.09,\n avoidOverlap: 0\n },\n forceAtlas2Based: {\n theta: 0.5,\n gravitationalConstant: -50,\n centralGravity: 0.01,\n springConstant: 0.08,\n springLength: 100,\n damping: 0.4,\n avoidOverlap: 0\n },\n repulsion: {\n centralGravity: 0.2,\n springLength: 200,\n springConstant: 0.05,\n nodeDistance: 100,\n damping: 0.09,\n avoidOverlap: 0\n },\n hierarchicalRepulsion: {\n centralGravity: 0.0,\n springLength: 100,\n springConstant: 0.01,\n nodeDistance: 120,\n damping: 0.09\n },\n maxVelocity: 50,\n minVelocity: 0.75, // px/s\n solver: 'barnesHut',\n stabilization: {\n enabled: true,\n iterations: 1000, // maximum number of iteration to stabilize\n updateInterval: 50,\n onlyDynamicEdges: false,\n fit: true\n },\n timestep: 0.5,\n adaptiveTimestep: true\n };\n util.extend(this.options, this.defaultOptions);\n this.timestep = 0.5;\n this.layoutFailed = false;\n\n this.bindEventListeners();\n }\n\n /**\n * Binds event listeners\n */\n bindEventListeners() {\n this.body.emitter.on('initPhysics', () => {this.initPhysics();});\n this.body.emitter.on('_layoutFailed', () => {this.layoutFailed = true;});\n this.body.emitter.on('resetPhysics', () => {this.stopSimulation(); this.ready = false;});\n this.body.emitter.on('disablePhysics', () => {this.physicsEnabled = false; this.stopSimulation();});\n this.body.emitter.on('restorePhysics', () => {\n this.setOptions(this.options);\n if (this.ready === true) {\n this.startSimulation();\n }\n });\n this.body.emitter.on('startSimulation', () => {\n if (this.ready === true) {\n this.startSimulation();\n }\n });\n this.body.emitter.on('stopSimulation', () => {this.stopSimulation();});\n this.body.emitter.on('destroy', () => {\n this.stopSimulation(false);\n this.body.emitter.off();\n });\n this.body.emitter.on(\"_dataChanged\", () => {\n // Nodes and/or edges have been added or removed, update shortcut lists.\n this.updatePhysicsData();\n });\n\n // debug: show forces\n // this.body.emitter.on(\"afterDrawing\", (ctx) => {this._drawForces(ctx);});\n }\n\n\n /**\n * set the physics options\n * @param {Object} options\n */\n setOptions(options) {\n if (options !== undefined) {\n if (options === false) {\n this.options.enabled = false;\n this.physicsEnabled = false;\n this.stopSimulation();\n }\n else if (options === true) {\n this.options.enabled = true;\n this.physicsEnabled = true;\n this.startSimulation();\n }\n else {\n this.physicsEnabled = true;\n util.selectiveNotDeepExtend(['stabilization'], this.options, options);\n util.mergeOptions(this.options, options, 'stabilization');\n\n if (options.enabled === undefined) {\n this.options.enabled = true;\n }\n\n if (this.options.enabled === false) {\n this.physicsEnabled = false;\n this.stopSimulation();\n }\n\n // set the timestep\n this.timestep = this.options.timestep;\n }\n }\n this.init();\n }\n\n\n /**\n * configure the engine.\n */\n init() {\n var options;\n if (this.options.solver === 'forceAtlas2Based') {\n options = this.options.forceAtlas2Based;\n this.nodesSolver = new ForceAtlas2BasedRepulsionSolver(this.body, this.physicsBody, options);\n this.edgesSolver = new SpringSolver(this.body, this.physicsBody, options);\n this.gravitySolver = new ForceAtlas2BasedCentralGravitySolver(this.body, this.physicsBody, options);\n }\n else if (this.options.solver === 'repulsion') {\n options = this.options.repulsion;\n this.nodesSolver = new Repulsion(this.body, this.physicsBody, options);\n this.edgesSolver = new SpringSolver(this.body, this.physicsBody, options);\n this.gravitySolver = new CentralGravitySolver(this.body, this.physicsBody, options);\n }\n else if (this.options.solver === 'hierarchicalRepulsion') {\n options = this.options.hierarchicalRepulsion;\n this.nodesSolver = new HierarchicalRepulsion(this.body, this.physicsBody, options);\n this.edgesSolver = new HierarchicalSpringSolver(this.body, this.physicsBody, options);\n this.gravitySolver = new CentralGravitySolver(this.body, this.physicsBody, options);\n }\n else { // barnesHut\n options = this.options.barnesHut;\n this.nodesSolver = new BarnesHutSolver(this.body, this.physicsBody, options);\n this.edgesSolver = new SpringSolver(this.body, this.physicsBody, options);\n this.gravitySolver = new CentralGravitySolver(this.body, this.physicsBody, options);\n }\n\n this.modelOptions = options;\n }\n\n\n /**\n * initialize the engine\n */\n initPhysics() {\n if (this.physicsEnabled === true && this.options.enabled === true) {\n if (this.options.stabilization.enabled === true) {\n this.stabilize();\n }\n else {\n this.stabilized = false;\n this.ready = true;\n this.body.emitter.emit('fit', {}, this.layoutFailed); // if the layout failed, we use the approximation for the zoom\n this.startSimulation();\n }\n }\n else {\n this.ready = true;\n this.body.emitter.emit('fit');\n }\n }\n\n /**\n * Start the simulation\n */\n startSimulation() {\n if (this.physicsEnabled === true && this.options.enabled === true) {\n this.stabilized = false;\n\n // when visible, adaptivity is disabled.\n this.adaptiveTimestep = false;\n\n // this sets the width of all nodes initially which could be required for the avoidOverlap\n this.body.emitter.emit(\"_resizeNodes\");\n if (this.viewFunction === undefined) {\n this.viewFunction = this.simulationStep.bind(this);\n this.body.emitter.on('initRedraw', this.viewFunction);\n this.body.emitter.emit('_startRendering');\n }\n }\n else {\n this.body.emitter.emit('_redraw');\n }\n }\n\n\n /**\n * Stop the simulation, force stabilization.\n * @param {boolean} [emit=true]\n */\n stopSimulation(emit = true) {\n this.stabilized = true;\n if (emit === true) {\n this._emitStabilized();\n }\n if (this.viewFunction !== undefined) {\n this.body.emitter.off('initRedraw', this.viewFunction);\n this.viewFunction = undefined;\n if (emit === true) {\n this.body.emitter.emit('_stopRendering');\n }\n }\n }\n\n\n /**\n * The viewFunction inserts this step into each render loop. It calls the physics tick and handles the cleanup at stabilized.\n *\n */\n simulationStep() {\n // check if the physics have settled\n var startTime = Date.now();\n this.physicsTick();\n var physicsTime = Date.now() - startTime;\n\n // run double speed if it is a little graph\n if ((physicsTime < 0.4 * this.simulationInterval || this.runDoubleSpeed === true) && this.stabilized === false) {\n this.physicsTick();\n\n // this makes sure there is no jitter. The decision is taken once to run it at double speed.\n this.runDoubleSpeed = true;\n }\n\n if (this.stabilized === true) {\n this.stopSimulation();\n }\n }\n\n\n /**\n * trigger the stabilized event.\n *\n * @param {number} [amountOfIterations=this.stabilizationIterations]\n * @private\n */\n _emitStabilized(amountOfIterations = this.stabilizationIterations) {\n if (this.stabilizationIterations > 1 || this.startedStabilization === true) {\n setTimeout(() => {\n this.body.emitter.emit('stabilized', {iterations: amountOfIterations});\n this.startedStabilization = false;\n this.stabilizationIterations = 0;\n }, 0);\n }\n }\n\n\n /**\n * Calculate the forces for one physics iteration and move the nodes.\n * @private\n */\n physicsStep() {\n this.gravitySolver.solve();\n this.nodesSolver.solve();\n this.edgesSolver.solve();\n this.moveNodes();\n }\n\n\n /**\n * Make dynamic adjustments to the timestep, based on current state.\n *\n * Helper function for physicsTick().\n * @private\n */\n adjustTimeStep() {\n const factor = 1.2; // Factor for increasing the timestep on success.\n\n // we compare the two steps. if it is acceptable we double the step.\n if (this._evaluateStepQuality() === true) {\n this.timestep = factor * this.timestep;\n }\n else {\n // if not, we decrease the step to a minimum of the options timestep.\n // if the decreased timestep is smaller than the options step, we do not reset the counter\n // we assume that the options timestep is stable enough.\n if (this.timestep/factor < this.options.timestep) {\n this.timestep = this.options.timestep;\n }\n else {\n // if the timestep was larger than 2 times the option one we check the adaptivity again to ensure\n // that large instabilities do not form.\n this.adaptiveCounter = -1; // check again next iteration\n this.timestep = Math.max(this.options.timestep, this.timestep/factor);\n }\n }\n }\n\n\n /**\n * A single simulation step (or 'tick') in the physics simulation\n *\n * @private\n */\n physicsTick() {\n this._startStabilizing(); // this ensures that there is no start event when the network is already stable.\n if (this.stabilized === true) return;\n\n // adaptivity means the timestep adapts to the situation, only applicable for stabilization\n if (this.adaptiveTimestep === true && this.adaptiveTimestepEnabled === true) {\n // timestep remains stable for \"interval\" iterations.\n let doAdaptive = (this.adaptiveCounter % this.adaptiveInterval === 0);\n\n if (doAdaptive) {\n // first the big step and revert.\n this.timestep = 2 * this.timestep;\n this.physicsStep();\n this.revert(); // saves the reference state\n\n // now the normal step. Since this is the last step, it is the more stable one and we will take this.\n this.timestep = 0.5 * this.timestep;\n\n // since it's half the step, we do it twice.\n this.physicsStep();\n this.physicsStep();\n\n this.adjustTimeStep();\n }\n else {\n this.physicsStep(); // normal step, keeping timestep constant\n }\n\n this.adaptiveCounter += 1;\n }\n else {\n // case for the static timestep, we reset it to the one in options and take a normal step.\n this.timestep = this.options.timestep;\n this.physicsStep();\n }\n\n if (this.stabilized === true) this.revert();\n this.stabilizationIterations++;\n }\n\n\n /**\n * Nodes and edges can have the physics toggles on or off. A collection of indices is created here so we can skip the check all the time.\n *\n * @private\n */\n updatePhysicsData() {\n this.physicsBody.forces = {};\n this.physicsBody.physicsNodeIndices = [];\n this.physicsBody.physicsEdgeIndices = [];\n let nodes = this.body.nodes;\n let edges = this.body.edges;\n\n // get node indices for physics\n for (let nodeId in nodes) {\n if (nodes.hasOwnProperty(nodeId)) {\n if (nodes[nodeId].options.physics === true) {\n this.physicsBody.physicsNodeIndices.push(nodes[nodeId].id);\n }\n }\n }\n\n // get edge indices for physics\n for (let edgeId in edges) {\n if (edges.hasOwnProperty(edgeId)) {\n if (edges[edgeId].options.physics === true) {\n this.physicsBody.physicsEdgeIndices.push(edges[edgeId].id);\n }\n }\n }\n\n // get the velocity and the forces vector\n for (let i = 0; i < this.physicsBody.physicsNodeIndices.length; i++) {\n let nodeId = this.physicsBody.physicsNodeIndices[i];\n this.physicsBody.forces[nodeId] = {x:0,y:0};\n\n // forces can be reset because they are recalculated. Velocities have to persist.\n if (this.physicsBody.velocities[nodeId] === undefined) {\n this.physicsBody.velocities[nodeId] = {x:0,y:0};\n }\n }\n\n // clean deleted nodes from the velocity vector\n for (let nodeId in this.physicsBody.velocities) {\n if (nodes[nodeId] === undefined) {\n delete this.physicsBody.velocities[nodeId];\n }\n }\n }\n\n\n /**\n * Revert the simulation one step. This is done so after stabilization, every new start of the simulation will also say stabilized.\n */\n revert() {\n var nodeIds = Object.keys(this.previousStates);\n var nodes = this.body.nodes;\n var velocities = this.physicsBody.velocities;\n this.referenceState = {};\n\n for (let i = 0; i < nodeIds.length; i++) {\n let nodeId = nodeIds[i];\n if (nodes[nodeId] !== undefined) {\n if (nodes[nodeId].options.physics === true) {\n this.referenceState[nodeId] = {\n positions: {x:nodes[nodeId].x, y:nodes[nodeId].y}\n };\n velocities[nodeId].x = this.previousStates[nodeId].vx;\n velocities[nodeId].y = this.previousStates[nodeId].vy;\n nodes[nodeId].x = this.previousStates[nodeId].x;\n nodes[nodeId].y = this.previousStates[nodeId].y;\n }\n }\n else {\n delete this.previousStates[nodeId];\n }\n }\n }\n\n /**\n * This compares the reference state to the current state\n *\n * @returns {boolean}\n * @private\n */\n _evaluateStepQuality() {\n let dx, dy, dpos;\n let nodes = this.body.nodes;\n let reference = this.referenceState;\n let posThreshold = 0.3;\n\n for (let nodeId in this.referenceState) {\n if (this.referenceState.hasOwnProperty(nodeId) && nodes[nodeId] !== undefined) {\n dx = nodes[nodeId].x - reference[nodeId].positions.x;\n dy = nodes[nodeId].y - reference[nodeId].positions.y;\n\n dpos = Math.sqrt(Math.pow(dx,2) + Math.pow(dy,2))\n\n if (dpos > posThreshold) {\n return false;\n }\n }\n }\n return true;\n }\n\n /**\n * move the nodes one timestep and check if they are stabilized\n */\n moveNodes() {\n var nodeIndices = this.physicsBody.physicsNodeIndices;\n var maxNodeVelocity = 0;\n var averageNodeVelocity = 0;\n\n // the velocity threshold (energy in the system) for the adaptivity toggle\n var velocityAdaptiveThreshold = 5;\n\n for (let i = 0; i < nodeIndices.length; i++) {\n let nodeId = nodeIndices[i];\n let nodeVelocity = this._performStep(nodeId);\n // stabilized is true if stabilized is true and velocity is smaller than vmin --> all nodes must be stabilized\n maxNodeVelocity = Math.max(maxNodeVelocity, nodeVelocity);\n averageNodeVelocity += nodeVelocity;\n }\n\n // evaluating the stabilized and adaptiveTimestepEnabled conditions\n this.adaptiveTimestepEnabled = (averageNodeVelocity/nodeIndices.length) < velocityAdaptiveThreshold;\n this.stabilized = maxNodeVelocity < this.options.minVelocity;\n }\n\n\n /**\n * Calculate new velocity for a coordinate direction\n *\n * @param {number} v velocity for current coordinate\n * @param {number} f regular force for current coordinate\n * @param {number} m mass of current node\n * @returns {number} new velocity for current coordinate\n * @private\n */\n calculateComponentVelocity(v,f, m) {\n let df = this.modelOptions.damping * v; // damping force\n let a = (f - df) / m; // acceleration\n\n v += a * this.timestep;\n\n // Put a limit on the velocities if it is really high\n let maxV = this.options.maxVelocity || 1e9;\n if (Math.abs(v) > maxV) {\n v = ((v > 0) ? maxV: -maxV);\n }\n\n return v;\n }\n\n\n /**\n * Perform the actual step\n *\n * @param {Node.id} nodeId\n * @returns {number} the new velocity of given node\n * @private\n */\n _performStep(nodeId) {\n let node = this.body.nodes[nodeId];\n let force = this.physicsBody.forces[nodeId];\n let velocity = this.physicsBody.velocities[nodeId];\n\n // store the state so we can revert\n this.previousStates[nodeId] = {x:node.x, y:node.y, vx:velocity.x, vy:velocity.y};\n\n if (node.options.fixed.x === false) {\n velocity.x = this.calculateComponentVelocity(velocity.x, force.x, node.options.mass);\n node.x += velocity.x * this.timestep;\n }\n else {\n force.x = 0;\n velocity.x = 0;\n }\n\n if (node.options.fixed.y === false) {\n velocity.y = this.calculateComponentVelocity(velocity.y, force.y, node.options.mass);\n node.y += velocity.y * this.timestep;\n }\n else {\n force.y = 0;\n velocity.y = 0;\n }\n\n let totalVelocity = Math.sqrt(Math.pow(velocity.x,2) + Math.pow(velocity.y,2));\n return totalVelocity;\n }\n\n\n /**\n * When initializing and stabilizing, we can freeze nodes with a predefined position.\n * This greatly speeds up stabilization because only the supportnodes for the smoothCurves have to settle.\n *\n * @private\n */\n _freezeNodes() {\n var nodes = this.body.nodes;\n for (var id in nodes) {\n if (nodes.hasOwnProperty(id)) {\n if (nodes[id].x && nodes[id].y) {\n let fixed = nodes[id].options.fixed;\n this.freezeCache[id] = {x:fixed.x, y:fixed.y};\n fixed.x = true;\n fixed.y = true;\n }\n }\n }\n }\n\n\n /**\n * Unfreezes the nodes that have been frozen by _freezeDefinedNodes.\n *\n * @private\n */\n _restoreFrozenNodes() {\n var nodes = this.body.nodes;\n for (var id in nodes) {\n if (nodes.hasOwnProperty(id)) {\n if (this.freezeCache[id] !== undefined) {\n nodes[id].options.fixed.x = this.freezeCache[id].x;\n nodes[id].options.fixed.y = this.freezeCache[id].y;\n }\n }\n }\n this.freezeCache = {};\n }\n\n /**\n * Find a stable position for all nodes\n *\n * @param {number} [iterations=this.options.stabilization.iterations]\n */\n stabilize(iterations = this.options.stabilization.iterations) {\n if (typeof iterations !== 'number') {\n iterations = this.options.stabilization.iterations;\n console.log('The stabilize method needs a numeric amount of iterations. Switching to default: ', iterations);\n }\n\n if (this.physicsBody.physicsNodeIndices.length === 0) {\n this.ready = true;\n return;\n }\n\n // enable adaptive timesteps\n this.adaptiveTimestep = true && this.options.adaptiveTimestep;\n\n // this sets the width of all nodes initially which could be required for the avoidOverlap\n this.body.emitter.emit(\"_resizeNodes\");\n\n this.stopSimulation(); // stop the render loop\n this.stabilized = false;\n\n // block redraw requests\n this.body.emitter.emit('_blockRedraw');\n this.targetIterations = iterations;\n\n // start the stabilization\n if (this.options.stabilization.onlyDynamicEdges === true) {\n this._freezeNodes();\n }\n this.stabilizationIterations = 0;\n\n setTimeout(() => this._stabilizationBatch(),0);\n }\n\n\n /**\n * If not already stabilizing, start it and emit a start event.\n *\n * @returns {boolean} true if stabilization started with this call\n * @private\n */\n _startStabilizing() {\n if (this.startedStabilization === true) return false;\n\n this.body.emitter.emit('startStabilizing');\n this.startedStabilization = true;\n return true;\n }\n\n\n /**\n * One batch of stabilization\n * @private\n */\n _stabilizationBatch() {\n var running = () => (this.stabilized === false && this.stabilizationIterations < this.targetIterations);\n\n var sendProgress = () => {\n this.body.emitter.emit('stabilizationProgress', {\n iterations: this.stabilizationIterations,\n total: this.targetIterations\n });\n };\n\n if (this._startStabilizing()) {\n sendProgress(); // Ensure that there is at least one start event.\n }\n\n var count = 0;\n while (running() && count < this.options.stabilization.updateInterval) {\n this.physicsTick();\n count++;\n }\n\n sendProgress();\n\n if (running()) {\n setTimeout(this._stabilizationBatch.bind(this),0);\n }\n else {\n this._finalizeStabilization();\n }\n }\n\n\n /**\n * Wrap up the stabilization, fit and emit the events.\n * @private\n */\n _finalizeStabilization() {\n this.body.emitter.emit('_allowRedraw');\n if (this.options.stabilization.fit === true) {\n this.body.emitter.emit('fit');\n }\n\n if (this.options.stabilization.onlyDynamicEdges === true) {\n this._restoreFrozenNodes();\n }\n\n this.body.emitter.emit('stabilizationIterationsDone');\n this.body.emitter.emit('_requestRedraw');\n\n if (this.stabilized === true) {\n this._emitStabilized();\n }\n else {\n this.startSimulation();\n }\n\n this.ready = true;\n }\n\n\n //--------------------------- DEBUGGING BELOW ---------------------------//\n\n\n /**\n * Debug function that display arrows for the forces currently active in the network.\n *\n * Use this when debugging only.\n *\n * @param {CanvasRenderingContext2D} ctx\n * @private\n */\n _drawForces(ctx) {\n for (var i = 0; i < this.physicsBody.physicsNodeIndices.length; i++) {\n let index = this.physicsBody.physicsNodeIndices[i];\n let node = this.body.nodes[index];\n let force = this.physicsBody.forces[index];\n let factor = 20;\n let colorFactor = 0.03;\n let forceSize = Math.sqrt(Math.pow(force.x,2) + Math.pow(force.x,2));\n\n let size = Math.min(Math.max(5,forceSize),15);\n let arrowSize = 3*size;\n\n let color = util.HSVToHex((180 - Math.min(1,Math.max(0,colorFactor*forceSize))*180) / 360,1,1);\n\n let point = {\n x: node.x + factor*force.x,\n y: node.y + factor*force.y\n };\n\n ctx.lineWidth = size;\n ctx.strokeStyle = color;\n ctx.beginPath();\n ctx.moveTo(node.x,node.y);\n ctx.lineTo(point.x, point.y);\n ctx.stroke();\n\n let angle = Math.atan2(force.y, force.x);\n ctx.fillStyle = color;\n EndPoints.draw(ctx, {type: 'arrow', point: point, angle: angle, length: arrowSize});\n ctx.fill();\n\n }\n }\n}\n\nexport default PhysicsEngine;\n","import util from 'vis-util';\n\n/**\n * Utility Class\n */\nclass NetworkUtil {\n /**\n * @ignore\n */\n constructor() {}\n\n /**\n * Find the center position of the network considering the bounding boxes\n *\n * @param {Array.} allNodes\n * @param {Array.} [specificNodes=[]]\n * @returns {{minX: number, maxX: number, minY: number, maxY: number}}\n * @static\n */\n static getRange(allNodes, specificNodes = []) {\n var minY = 1e9, maxY = -1e9, minX = 1e9, maxX = -1e9, node;\n if (specificNodes.length > 0) {\n for (var i = 0; i < specificNodes.length; i++) {\n node = allNodes[specificNodes[i]];\n if (minX > node.shape.boundingBox.left) {\n minX = node.shape.boundingBox.left;\n }\n if (maxX < node.shape.boundingBox.right) {\n maxX = node.shape.boundingBox.right;\n }\n if (minY > node.shape.boundingBox.top) {\n minY = node.shape.boundingBox.top;\n } // top is negative, bottom is positive\n if (maxY < node.shape.boundingBox.bottom) {\n maxY = node.shape.boundingBox.bottom;\n } // top is negative, bottom is positive\n }\n }\n\n if (minX === 1e9 && maxX === -1e9 && minY === 1e9 && maxY === -1e9) {\n minY = 0, maxY = 0, minX = 0, maxX = 0;\n }\n return {minX: minX, maxX: maxX, minY: minY, maxY: maxY};\n }\n\n /**\n * Find the center position of the network\n *\n * @param {Array.} allNodes\n * @param {Array.} [specificNodes=[]]\n * @returns {{minX: number, maxX: number, minY: number, maxY: number}}\n * @static\n */\n static getRangeCore(allNodes, specificNodes = []) {\n var minY = 1e9, maxY = -1e9, minX = 1e9, maxX = -1e9, node;\n if (specificNodes.length > 0) {\n for (var i = 0; i < specificNodes.length; i++) {\n node = allNodes[specificNodes[i]];\n if (minX > node.x) {\n minX = node.x;\n }\n if (maxX < node.x) {\n maxX = node.x;\n }\n if (minY > node.y) {\n minY = node.y;\n } // top is negative, bottom is positive\n if (maxY < node.y) {\n maxY = node.y;\n } // top is negative, bottom is positive\n }\n }\n\n if (minX === 1e9 && maxX === -1e9 && minY === 1e9 && maxY === -1e9) {\n minY = 0, maxY = 0, minX = 0, maxX = 0;\n }\n return {minX: minX, maxX: maxX, minY: minY, maxY: maxY};\n }\n\n\n /**\n * @param {object} range = {minX: minX, maxX: maxX, minY: minY, maxY: maxY};\n * @returns {{x: number, y: number}}\n * @static\n */\n static findCenter(range) {\n return {x: (0.5 * (range.maxX + range.minX)),\n y: (0.5 * (range.maxY + range.minY))};\n }\n\n\n /**\n * This returns a clone of the options or options of the edge or node to be used for construction of new edges or check functions for new nodes.\n * @param {vis.Item} item\n * @param {'node'|undefined} type\n * @returns {{}}\n * @static\n */\n static cloneOptions(item, type) {\n let clonedOptions = {};\n if (type === undefined || type === 'node') {\n util.deepExtend(clonedOptions, item.options, true);\n clonedOptions.x = item.x;\n clonedOptions.y = item.y;\n clonedOptions.amountOfConnections = item.edges.length;\n }\n else {\n util.deepExtend(clonedOptions, item.options, true);\n }\n return clonedOptions;\n }\n\n}\n\nexport default NetworkUtil;","import util from 'vis-util';\nimport Node from \"../Node\";\n\n/**\n * A Cluster is a special Node that allows a group of Nodes positioned closely together\n * to be represented by a single Cluster Node.\n *\n * @extends Node\n */\nclass Cluster extends Node {\n /**\n * @param {Object} options\n * @param {Object} body\n * @param {Array.}imagelist\n * @param {Array} grouplist\n * @param {Object} globalOptions\n * @param {Object} defaultOptions Global default options for nodes\n */\n constructor(options, body, imagelist, grouplist, globalOptions, defaultOptions) {\n super(options, body, imagelist, grouplist, globalOptions, defaultOptions);\n\n this.isCluster = true;\n this.containedNodes = {};\n this.containedEdges = {};\n }\n\n\n /**\n * Transfer child cluster data to current and disconnect the child cluster.\n *\n * Please consult the header comment in 'Clustering.js' for the fields set here.\n *\n * @param {string|number} childClusterId id of child cluster to open\n */\n _openChildCluster(childClusterId) {\n let childCluster = this.body.nodes[childClusterId];\n if (this.containedNodes[childClusterId] === undefined) {\n throw new Error('node with id: ' + childClusterId + ' not in current cluster');\n }\n if (!childCluster.isCluster) {\n throw new Error('node with id: ' + childClusterId + ' is not a cluster');\n }\n\n // Disconnect child cluster from current cluster\n delete this.containedNodes[childClusterId];\n util.forEach(childCluster.edges, (edge) => {\n delete this.containedEdges[edge.id];\n });\n\n // Transfer nodes and edges\n util.forEach(childCluster.containedNodes, (node, nodeId) => {\n this.containedNodes[nodeId] = node;\n });\n childCluster.containedNodes = {};\n\n util.forEach(childCluster.containedEdges, (edge, edgeId) => {\n this.containedEdges[edgeId] = edge;\n });\n childCluster.containedEdges = {};\n\n // Transfer edges within cluster edges which are clustered\n util.forEach(childCluster.edges, (clusterEdge) => {\n util.forEach(this.edges, (parentClusterEdge) => {\n // Assumption: a clustered edge can only be present in a single clustering edge\n // Not tested here\n let index = parentClusterEdge.clusteringEdgeReplacingIds.indexOf(clusterEdge.id);\n if (index === -1) return;\n\n util.forEach(clusterEdge.clusteringEdgeReplacingIds, (srcId) => {\n parentClusterEdge.clusteringEdgeReplacingIds.push(srcId);\n\n // Maintain correct bookkeeping for transferred edge\n this.body.edges[srcId].edgeReplacedById = parentClusterEdge.id;\n });\n\n // Remove cluster edge from parent cluster edge\n parentClusterEdge.clusteringEdgeReplacingIds.splice(index, 1);\n });\n });\n childCluster.edges = [];\n }\n}\n\n\nexport default Cluster;\n","/* ===========================================================================\n\n# TODO\n\n- `edgeReplacedById` not cleaned up yet on cluster edge removal\n- allowSingleNodeCluster could be a global option as well; currently needs to always\n be passed to clustering methods\n\n----------------------------------------------\n\n# State Model for Clustering\n\nThe total state for clustering is non-trivial. It is useful to have a model\navailable as to how it works. The following documents the relevant state items.\n\n\n## Network State\n\nThe following `network`-members are relevant to clustering:\n\n- `body.nodes` - all nodes actively participating in the network\n- `body.edges` - same for edges\n- `body.nodeIndices` - id's of nodes that are visible at a given moment\n- `body.edgeIndices` - same for edges\n\nThis includes:\n\n- helper nodes for dragging in `manipulation`\n- helper nodes for edge type `dynamic`\n- cluster nodes and edges\n- there may be more than this.\n\nA node/edge may be missing in the `Indices` member if:\n\n- it is a helper node\n- the node or edge state has option `hidden` set\n- It is not visible due to clustering\n\n\n## Clustering State\n\nFor the hashes, the id's of the nodes/edges are used as key.\n\nMember `network.clustering` contains the following items:\n\n- `clusteredNodes` - hash with values: { clusterId: , node: }\n- `clusteredEdges` - hash with values: restore information for given edge\n\n\nDue to nesting of clusters, these members can contain cluster nodes and edges as well.\n\nThe important thing to note here, is that the clustered nodes and edges also\nappear in the members of the cluster nodes. For data update, it is therefore \nimportant to scan these lists as well as the cluster nodes.\n\n\n### Cluster Node\n\nA cluster node has the following extra fields:\n\n- `isCluster : true` - indication that this is a cluster node\n- `containedNodes` - hash of nodes contained in this cluster\n- `containedEdges` - same for edges\n- `edges` - array of cluster edges for this node \n\n\n**NOTE:**\n\n- `containedEdges` can also contain edges which are not clustered; e.g. an edge\n connecting two nodes in the same cluster.\n\n\n### Cluster Edge\n\nThese are the items in the `edges` member of a clustered node. They have the\nfollowing relevant members:\n\n- 'clusteringEdgeReplacingIds` - array of id's of edges replaced by this edge\n\nNote that it's possible to nest clusters, so that `clusteringEdgeReplacingIds`\ncan contain edge id's of other clusters.\n\n\n### Clustered Edge\n\nThis is any edge contained by a cluster edge. It gets the following additional\nmember:\n\n- `edgeReplacedById` - id of the cluster edge in which current edge is clustered\n\n\n =========================================================================== */\nimport util from 'vis-util';\nimport NetworkUtil from'../NetworkUtil';\nimport Cluster from'./components/nodes/Cluster';\nimport Edge from './components/Edge'; // Only needed for check on type!\nimport Node from './components/Node'; // Only needed for check on type!\n\n/**\n * The clustering engine\n */\nclass ClusterEngine {\n /**\n * @param {Object} body\n */\n constructor(body) {\n this.body = body;\n this.clusteredNodes = {}; // key: node id, value: { clusterId: , node: }\n this.clusteredEdges = {}; // key: edge id, value: restore information for given edge\n\n this.options = {};\n this.defaultOptions = {};\n util.extend(this.options, this.defaultOptions);\n\n this.body.emitter.on('_resetData', () => {this.clusteredNodes = {}; this.clusteredEdges = {};})\n }\n\n /**\n *\n * @param {number} hubsize\n * @param {Object} options\n */\n clusterByHubsize(hubsize, options) {\n if (hubsize === undefined) {\n hubsize = this._getHubSize();\n }\n else if (typeof(hubsize) === \"object\") {\n options = this._checkOptions(hubsize);\n hubsize = this._getHubSize();\n }\n\n let nodesToCluster = [];\n for (let i = 0; i < this.body.nodeIndices.length; i++) {\n let node = this.body.nodes[this.body.nodeIndices[i]];\n if (node.edges.length >= hubsize) {\n nodesToCluster.push(node.id);\n }\n }\n\n for (let i = 0; i < nodesToCluster.length; i++) {\n this.clusterByConnection(nodesToCluster[i],options,true);\n }\n\n this.body.emitter.emit('_dataChanged');\n }\n\n\n /**\n * loop over all nodes, check if they adhere to the condition and cluster if needed.\n * @param {Object} options\n * @param {boolean} [refreshData=true]\n */\n cluster(options = {}, refreshData = true) {\n if (options.joinCondition === undefined) {throw new Error(\"Cannot call clusterByNodeData without a joinCondition function in the options.\");}\n\n // check if the options object is fine, append if needed\n options = this._checkOptions(options);\n\n let childNodesObj = {};\n let childEdgesObj = {};\n\n // collect the nodes that will be in the cluster\n util.forEach(this.body.nodes, (node, nodeId) => {\n if (node.options && options.joinCondition(node.options) === true) {\n childNodesObj[nodeId] = node;\n\n // collect the edges that will be in the cluster\n util.forEach(node.edges, (edge) => {\n if (this.clusteredEdges[edge.id] === undefined) {\n childEdgesObj[edge.id] = edge;\n }\n });\n }\n });\n\n this._cluster(childNodesObj, childEdgesObj, options, refreshData);\n }\n\n\n /**\n * Cluster all nodes in the network that have only X edges\n * @param {number} edgeCount\n * @param {Object} options\n * @param {boolean} [refreshData=true]\n */\n clusterByEdgeCount(edgeCount, options, refreshData = true) {\n options = this._checkOptions(options);\n let clusters = [];\n let usedNodes = {};\n let edge, edges, relevantEdgeCount;\n // collect the nodes that will be in the cluster\n for (let i = 0; i < this.body.nodeIndices.length; i++) {\n let childNodesObj = {};\n let childEdgesObj = {};\n let nodeId = this.body.nodeIndices[i];\n let node = this.body.nodes[nodeId];\n\n // if this node is already used in another cluster this session, we do not have to re-evaluate it.\n if (usedNodes[nodeId] === undefined) {\n relevantEdgeCount = 0;\n edges = [];\n for (let j = 0; j < node.edges.length; j++) {\n edge = node.edges[j];\n if (this.clusteredEdges[edge.id] === undefined) {\n if (edge.toId !== edge.fromId) {\n relevantEdgeCount++;\n }\n edges.push(edge);\n }\n }\n\n // this node qualifies, we collect its neighbours to start the clustering process.\n if (relevantEdgeCount === edgeCount) {\n var checkJoinCondition = function(node) {\n if (options.joinCondition === undefined || options.joinCondition === null) {\n return true;\n }\n\n let clonedOptions = NetworkUtil.cloneOptions(node);\n return options.joinCondition(clonedOptions);\n }\n\n let gatheringSuccessful = true;\n for (let j = 0; j < edges.length; j++) {\n edge = edges[j];\n let childNodeId = this._getConnectedId(edge, nodeId);\n // add the nodes to the list by the join condition.\n if (checkJoinCondition(node)) {\n childEdgesObj[edge.id] = edge;\n childNodesObj[nodeId] = node;\n childNodesObj[childNodeId] = this.body.nodes[childNodeId];\n usedNodes[nodeId] = true;\n } else {\n // this node does not qualify after all.\n gatheringSuccessful = false;\n break;\n }\n }\n\n // add to the cluster queue\n if (Object.keys(childNodesObj).length > 0 && Object.keys(childEdgesObj).length > 0 && gatheringSuccessful === true) {\n /**\n * Search for cluster data that contains any of the node id's\n * @returns {Boolean} true if no joinCondition, otherwise return value of joinCondition\n */\n var findClusterData = function() {\n for (let n = 0; n < clusters.length; ++n) {\n // Search for a cluster containing any of the node id's\n for (var m in childNodesObj) {\n if (clusters[n].nodes[m] !== undefined) {\n return clusters[n];\n }\n }\n }\n\n return undefined;\n };\n\n\n // If any of the found nodes is part of a cluster found in this method,\n // add the current values to that cluster\n var foundCluster = findClusterData();\n if (foundCluster !== undefined) {\n // Add nodes to found cluster if not present\n for (let m in childNodesObj) {\n if (foundCluster.nodes[m] === undefined) {\n foundCluster.nodes[m] = childNodesObj[m];\n }\n }\n\n // Add edges to found cluster, if not present\n for (let m in childEdgesObj) {\n if (foundCluster.edges[m] === undefined) {\n foundCluster.edges[m] = childEdgesObj[m];\n }\n }\n } else {\n // Create a new cluster group\n clusters.push({nodes: childNodesObj, edges: childEdgesObj})\n }\n }\n }\n }\n }\n\n for (let i = 0; i < clusters.length; i++) {\n this._cluster(clusters[i].nodes, clusters[i].edges, options, false)\n }\n\n if (refreshData === true) {\n this.body.emitter.emit('_dataChanged');\n }\n }\n\n /**\n * Cluster all nodes in the network that have only 1 edge\n * @param {Object} options\n * @param {boolean} [refreshData=true]\n */\n clusterOutliers(options, refreshData = true) {\n this.clusterByEdgeCount(1,options,refreshData);\n }\n\n /**\n * Cluster all nodes in the network that have only 2 edge\n * @param {Object} options\n * @param {boolean} [refreshData=true]\n */\n clusterBridges(options, refreshData = true) {\n this.clusterByEdgeCount(2,options,refreshData);\n }\n\n\n\n /**\n * suck all connected nodes of a node into the node.\n * @param {Node.id} nodeId\n * @param {Object} options\n * @param {boolean} [refreshData=true]\n */\n clusterByConnection(nodeId, options, refreshData = true) {\n // kill conditions\n if (nodeId === undefined) {throw new Error(\"No nodeId supplied to clusterByConnection!\");}\n if (this.body.nodes[nodeId] === undefined) {throw new Error(\"The nodeId given to clusterByConnection does not exist!\");}\n\n let node = this.body.nodes[nodeId];\n options = this._checkOptions(options, node);\n if (options.clusterNodeProperties.x === undefined) {options.clusterNodeProperties.x = node.x;}\n if (options.clusterNodeProperties.y === undefined) {options.clusterNodeProperties.y = node.y;}\n if (options.clusterNodeProperties.fixed === undefined) {\n options.clusterNodeProperties.fixed = {};\n options.clusterNodeProperties.fixed.x = node.options.fixed.x;\n options.clusterNodeProperties.fixed.y = node.options.fixed.y;\n }\n\n\n let childNodesObj = {};\n let childEdgesObj = {};\n let parentNodeId = node.id;\n let parentClonedOptions = NetworkUtil.cloneOptions(node);\n childNodesObj[parentNodeId] = node;\n\n // collect the nodes that will be in the cluster\n for (let i = 0; i < node.edges.length; i++) {\n let edge = node.edges[i];\n if (this.clusteredEdges[edge.id] === undefined) {\n let childNodeId = this._getConnectedId(edge, parentNodeId);\n\n // if the child node is not in a cluster\n if (this.clusteredNodes[childNodeId] === undefined) {\n if (childNodeId !== parentNodeId) {\n if (options.joinCondition === undefined) {\n childEdgesObj[edge.id] = edge;\n childNodesObj[childNodeId] = this.body.nodes[childNodeId];\n }\n else {\n // clone the options and insert some additional parameters that could be interesting.\n let childClonedOptions = NetworkUtil.cloneOptions(this.body.nodes[childNodeId]);\n if (options.joinCondition(parentClonedOptions, childClonedOptions) === true) {\n childEdgesObj[edge.id] = edge;\n childNodesObj[childNodeId] = this.body.nodes[childNodeId];\n }\n }\n }\n else {\n // swallow the edge if it is self-referencing.\n childEdgesObj[edge.id] = edge;\n }\n }\n }\n }\n var childNodeIDs = Object.keys(childNodesObj).map(function(childNode){\n return childNodesObj[childNode].id;\n })\n\n for (childNode in childNodesObj) {\n if (!childNodesObj.hasOwnProperty(childNode)) continue;\n\n var childNode = childNodesObj[childNode];\n for (var y=0; y < childNode.edges.length; y++){\n var childEdge = childNode.edges[y];\n if (childNodeIDs.indexOf(this._getConnectedId(childEdge,childNode.id)) > -1){\n childEdgesObj[childEdge.id] = childEdge;\n }\n }\n }\n this._cluster(childNodesObj, childEdgesObj, options, refreshData);\n }\n\n\n /**\n * This function creates the edges that will be attached to the cluster\n * It looks for edges that are connected to the nodes from the \"outside' of the cluster.\n *\n * @param {{Node.id: vis.Node}} childNodesObj\n * @param {{vis.Edge.id: vis.Edge}} childEdgesObj\n * @param {Object} clusterNodeProperties\n * @param {Object} clusterEdgeProperties\n * @private\n */\n _createClusterEdges (childNodesObj, childEdgesObj, clusterNodeProperties, clusterEdgeProperties) {\n let edge, childNodeId, childNode, toId, fromId, otherNodeId;\n\n // loop over all child nodes and their edges to find edges going out of the cluster\n // these edges will be replaced by clusterEdges.\n let childKeys = Object.keys(childNodesObj);\n let createEdges = [];\n for (let i = 0; i < childKeys.length; i++) {\n childNodeId = childKeys[i];\n childNode = childNodesObj[childNodeId];\n\n // construct new edges from the cluster to others\n for (let j = 0; j < childNode.edges.length; j++) {\n edge = childNode.edges[j];\n // we only handle edges that are visible to the system, not the disabled ones from the clustering process.\n if (this.clusteredEdges[edge.id] === undefined) {\n // self-referencing edges will be added to the \"hidden\" list\n if (edge.toId == edge.fromId) {\n childEdgesObj[edge.id] = edge;\n }\n else {\n // set up the from and to.\n if (edge.toId == childNodeId) { // this is a double equals because ints and strings can be interchanged here.\n toId = clusterNodeProperties.id;\n fromId = edge.fromId;\n otherNodeId = fromId;\n }\n else {\n toId = edge.toId;\n fromId = clusterNodeProperties.id;\n otherNodeId = toId;\n }\n }\n\n // Only edges from the cluster outwards are being replaced.\n if (childNodesObj[otherNodeId] === undefined) {\n createEdges.push({edge: edge, fromId: fromId, toId: toId});\n }\n }\n }\n }\n\n\n //\n // Here we actually create the replacement edges.\n //\n // We could not do this in the loop above as the creation process\n // would add an edge to the edges array we are iterating over.\n //\n // NOTE: a clustered edge can have multiple base edges!\n //\n var newEdges = [];\n\n /**\n * Find a cluster edge which matches the given created edge.\n * @param {vis.Edge} createdEdge\n * @returns {vis.Edge}\n */\n var getNewEdge = function(createdEdge) {\n for (let j = 0; j < newEdges.length; j++) {\n let newEdge = newEdges[j];\n\n // We replace both to and from edges with a single cluster edge\n let matchToDirection = (createdEdge.fromId === newEdge.fromId && createdEdge.toId === newEdge.toId);\n let matchFromDirection = (createdEdge.fromId === newEdge.toId && createdEdge.toId === newEdge.fromId);\n\n if (matchToDirection || matchFromDirection ) {\n return newEdge;\n }\n }\n\n return null;\n };\n\n\n for (let j = 0; j < createEdges.length; j++) {\n let createdEdge = createEdges[j];\n let edge = createdEdge.edge;\n let newEdge = getNewEdge(createdEdge);\n\n if (newEdge === null) {\n // Create a clustered edge for this connection\n newEdge = this._createClusteredEdge(\n createdEdge.fromId,\n createdEdge.toId,\n edge,\n clusterEdgeProperties);\n\n newEdges.push(newEdge);\n } else {\n newEdge.clusteringEdgeReplacingIds.push(edge.id);\n }\n\n // also reference the new edge in the old edge\n this.body.edges[edge.id].edgeReplacedById = newEdge.id;\n\n // hide the replaced edge\n this._backupEdgeOptions(edge);\n edge.setOptions({physics:false});\n }\n }\n\n /**\n * This function checks the options that can be supplied to the different cluster functions\n * for certain fields and inserts defaults if needed\n * @param {Object} options\n * @returns {*}\n * @private\n */\n _checkOptions(options = {}) {\n if (options.clusterEdgeProperties === undefined) {options.clusterEdgeProperties = {};}\n if (options.clusterNodeProperties === undefined) {options.clusterNodeProperties = {};}\n\n return options;\n }\n\n /**\n *\n * @param {Object} childNodesObj | object with node objects, id as keys, same as childNodes except it also contains a source node\n * @param {Object} childEdgesObj | object with edge objects, id as keys\n * @param {Array} options | object with {clusterNodeProperties, clusterEdgeProperties, processProperties}\n * @param {boolean} refreshData | when true, do not wrap up\n * @private\n */\n _cluster(childNodesObj, childEdgesObj, options, refreshData = true) {\n // Remove nodes which are already clustered\n var tmpNodesToRemove = []\n for (let nodeId in childNodesObj) {\n if (childNodesObj.hasOwnProperty(nodeId)) {\n if (this.clusteredNodes[nodeId] !== undefined) {\n tmpNodesToRemove.push(nodeId);\n }\n }\n }\n\n for (var n = 0; n < tmpNodesToRemove.length; ++n) {\n delete childNodesObj[tmpNodesToRemove[n]];\n }\n\n // kill condition: no nodes don't bother\n if (Object.keys(childNodesObj).length == 0) {return;}\n\n // allow clusters of 1 if options allow\n if (Object.keys(childNodesObj).length == 1 && options.clusterNodeProperties.allowSingleNodeCluster != true) {return;}\n\n let clusterNodeProperties = util.deepExtend({},options.clusterNodeProperties);\n\n // construct the clusterNodeProperties\n if (options.processProperties !== undefined) {\n // get the childNode options\n let childNodesOptions = [];\n for (let nodeId in childNodesObj) {\n if (childNodesObj.hasOwnProperty(nodeId)) {\n let clonedOptions = NetworkUtil.cloneOptions(childNodesObj[nodeId]);\n childNodesOptions.push(clonedOptions);\n }\n }\n\n // get cluster properties based on childNodes\n let childEdgesOptions = [];\n for (let edgeId in childEdgesObj) {\n if (childEdgesObj.hasOwnProperty(edgeId)) {\n // these cluster edges will be removed on creation of the cluster.\n if (edgeId.substr(0, 12) !== \"clusterEdge:\") {\n let clonedOptions = NetworkUtil.cloneOptions(childEdgesObj[edgeId], 'edge');\n childEdgesOptions.push(clonedOptions);\n }\n }\n }\n\n clusterNodeProperties = options.processProperties(clusterNodeProperties, childNodesOptions, childEdgesOptions);\n if (!clusterNodeProperties) {\n throw new Error(\"The processProperties function does not return properties!\");\n }\n }\n\n // check if we have an unique id;\n if (clusterNodeProperties.id === undefined) {clusterNodeProperties.id = 'cluster:' + util.randomUUID();}\n let clusterId = clusterNodeProperties.id;\n\n if (clusterNodeProperties.label === undefined) {\n clusterNodeProperties.label = 'cluster';\n }\n\n\n // give the clusterNode a position if it does not have one.\n let pos = undefined;\n if (clusterNodeProperties.x === undefined) {\n pos = this._getClusterPosition(childNodesObj);\n clusterNodeProperties.x = pos.x;\n }\n if (clusterNodeProperties.y === undefined) {\n if (pos === undefined) {pos = this._getClusterPosition(childNodesObj);}\n clusterNodeProperties.y = pos.y;\n }\n\n // force the ID to remain the same\n clusterNodeProperties.id = clusterId;\n\n // create the cluster Node\n // Note that allowSingleNodeCluster, if present, is stored in the options as well\n let clusterNode = this.body.functions.createNode(clusterNodeProperties, Cluster);\n clusterNode.containedNodes = childNodesObj;\n clusterNode.containedEdges = childEdgesObj;\n // cache a copy from the cluster edge properties if we have to reconnect others later on\n clusterNode.clusterEdgeProperties = options.clusterEdgeProperties;\n\n // finally put the cluster node into global\n this.body.nodes[clusterNodeProperties.id] = clusterNode;\n\n this._clusterEdges(childNodesObj, childEdgesObj, clusterNodeProperties, options.clusterEdgeProperties);\n\n // set ID to undefined so no duplicates arise\n clusterNodeProperties.id = undefined;\n\n // wrap up\n if (refreshData === true) {\n this.body.emitter.emit('_dataChanged');\n }\n }\n\n /**\n *\n * @param {Edge} edge\n * @private\n */\n _backupEdgeOptions(edge) {\n if (this.clusteredEdges[edge.id] === undefined) {\n this.clusteredEdges[edge.id] = {physics: edge.options.physics};\n }\n }\n\n /**\n *\n * @param {Edge} edge\n * @private\n */\n _restoreEdge(edge) {\n let originalOptions = this.clusteredEdges[edge.id];\n if (originalOptions !== undefined) {\n edge.setOptions({physics: originalOptions.physics});\n delete this.clusteredEdges[edge.id];\n }\n }\n\n\n /**\n * Check if a node is a cluster.\n * @param {Node.id} nodeId\n * @returns {*}\n */\n isCluster(nodeId) {\n if (this.body.nodes[nodeId] !== undefined) {\n return this.body.nodes[nodeId].isCluster === true;\n }\n else {\n console.log(\"Node does not exist.\");\n return false;\n }\n }\n\n /**\n * get the position of the cluster node based on what's inside\n * @param {object} childNodesObj | object with node objects, id as keys\n * @returns {{x: number, y: number}}\n * @private\n */\n _getClusterPosition(childNodesObj) {\n let childKeys = Object.keys(childNodesObj);\n let minX = childNodesObj[childKeys[0]].x;\n let maxX = childNodesObj[childKeys[0]].x;\n let minY = childNodesObj[childKeys[0]].y;\n let maxY = childNodesObj[childKeys[0]].y;\n let node;\n for (let i = 1; i < childKeys.length; i++) {\n node = childNodesObj[childKeys[i]];\n minX = node.x < minX ? node.x : minX;\n maxX = node.x > maxX ? node.x : maxX;\n minY = node.y < minY ? node.y : minY;\n maxY = node.y > maxY ? node.y : maxY;\n }\n\n return {x: 0.5*(minX + maxX), y: 0.5*(minY + maxY)};\n }\n\n\n\n /**\n * Open a cluster by calling this function.\n * @param {vis.Edge.id} clusterNodeId | the ID of the cluster node\n * @param {Object} options\n * @param {boolean} refreshData | wrap up afterwards if not true\n */\n openCluster(clusterNodeId, options, refreshData = true) {\n // kill conditions\n if (clusterNodeId === undefined) {\n throw new Error(\"No clusterNodeId supplied to openCluster.\");\n }\n\n let clusterNode = this.body.nodes[clusterNodeId];\n\n if (clusterNode === undefined) {\n throw new Error(\"The clusterNodeId supplied to openCluster does not exist.\");\n }\n if (clusterNode.isCluster !== true\n || clusterNode.containedNodes === undefined\n || clusterNode.containedEdges === undefined) {\n throw new Error(\"The node:\" + clusterNodeId + \" is not a valid cluster.\");\n }\n\n // Check if current cluster is clustered itself\n let stack = this.findNode(clusterNodeId);\n let parentIndex = stack.indexOf(clusterNodeId) - 1;\n if (parentIndex >= 0) {\n // Current cluster is clustered; transfer contained nodes and edges to parent\n let parentClusterNodeId = stack[parentIndex];\n let parentClusterNode = this.body.nodes[parentClusterNodeId];\n\n // clustering.clusteredNodes and clustering.clusteredEdges remain unchanged\n parentClusterNode._openChildCluster(clusterNodeId);\n\n // All components of child cluster node have been transferred. It can die now.\n delete this.body.nodes[clusterNodeId];\n if (refreshData === true) {\n this.body.emitter.emit('_dataChanged');\n }\n\n return;\n }\n\n // main body \n let containedNodes = clusterNode.containedNodes;\n let containedEdges = clusterNode.containedEdges;\n\n // allow the user to position the nodes after release.\n if (options !== undefined && options.releaseFunction !== undefined && typeof options.releaseFunction === 'function') {\n let positions = {};\n let clusterPosition = {x:clusterNode.x, y:clusterNode.y};\n for (let nodeId in containedNodes) {\n if (containedNodes.hasOwnProperty(nodeId)) {\n let containedNode = this.body.nodes[nodeId];\n positions[nodeId] = {x: containedNode.x, y: containedNode.y};\n }\n }\n let newPositions = options.releaseFunction(clusterPosition, positions);\n\n for (let nodeId in containedNodes) {\n if (containedNodes.hasOwnProperty(nodeId)) {\n let containedNode = this.body.nodes[nodeId];\n if (newPositions[nodeId] !== undefined) {\n containedNode.x = (newPositions[nodeId].x === undefined ? clusterNode.x : newPositions[nodeId].x);\n containedNode.y = (newPositions[nodeId].y === undefined ? clusterNode.y : newPositions[nodeId].y);\n }\n }\n }\n }\n else {\n // copy the position from the cluster\n util.forEach(containedNodes, function(containedNode) {\n // inherit position\n if (containedNode.options.fixed.x === false) {containedNode.x = clusterNode.x;}\n if (containedNode.options.fixed.y === false) {containedNode.y = clusterNode.y;}\n });\n }\n\n // release nodes\n for (let nodeId in containedNodes) {\n if (containedNodes.hasOwnProperty(nodeId)) {\n let containedNode = this.body.nodes[nodeId];\n\n // inherit speed\n containedNode.vx = clusterNode.vx;\n containedNode.vy = clusterNode.vy;\n\n containedNode.setOptions({physics:true});\n\n delete this.clusteredNodes[nodeId];\n }\n }\n\n // copy the clusterNode edges because we cannot iterate over an object that we add or remove from.\n let edgesToBeDeleted = [];\n for (let i = 0; i < clusterNode.edges.length; i++) {\n edgesToBeDeleted.push(clusterNode.edges[i]);\n }\n\n // actually handling the deleting.\n for (let i = 0; i < edgesToBeDeleted.length; i++) {\n let edge = edgesToBeDeleted[i];\n let otherNodeId = this._getConnectedId(edge, clusterNodeId);\n let otherNode = this.clusteredNodes[otherNodeId];\n\n for (let j = 0; j < edge.clusteringEdgeReplacingIds.length; j++) {\n let transferId = edge.clusteringEdgeReplacingIds[j];\n let transferEdge = this.body.edges[transferId];\n if (transferEdge === undefined) continue; \n\n // if the other node is in another cluster, we transfer ownership of this edge to the other cluster\n if (otherNode !== undefined) {\n // transfer ownership:\n let otherCluster = this.body.nodes[otherNode.clusterId];\n otherCluster.containedEdges[transferEdge.id] = transferEdge;\n\n // delete local reference\n delete containedEdges[transferEdge.id];\n\n // get to and from\n let fromId = transferEdge.fromId;\n let toId = transferEdge.toId;\n if (transferEdge.toId == otherNodeId) {\n toId = otherNode.clusterId;\n }\n else {\n fromId = otherNode.clusterId;\n }\n\n // create new cluster edge from the otherCluster\n this._createClusteredEdge(\n fromId,\n toId,\n transferEdge,\n otherCluster.clusterEdgeProperties,\n {hidden: false, physics: true});\n\n } else {\n this._restoreEdge(transferEdge);\n }\n }\n\n edge.remove();\n }\n\n // handle the releasing of the edges\n for (let edgeId in containedEdges) {\n if (containedEdges.hasOwnProperty(edgeId)) {\n this._restoreEdge(containedEdges[edgeId]);\n }\n }\n\n // remove clusterNode\n delete this.body.nodes[clusterNodeId];\n\n if (refreshData === true) {\n this.body.emitter.emit('_dataChanged');\n }\n }\n\n /**\n *\n * @param {Cluster.id} clusterId\n * @returns {Array.}\n */\n getNodesInCluster(clusterId) {\n let nodesArray = [];\n if (this.isCluster(clusterId) === true) {\n let containedNodes = this.body.nodes[clusterId].containedNodes;\n for (let nodeId in containedNodes) {\n if (containedNodes.hasOwnProperty(nodeId)) {\n nodesArray.push(this.body.nodes[nodeId].id)\n }\n }\n }\n\n return nodesArray;\n }\n\n /**\n * Get the stack clusterId's that a certain node resides in. cluster A -> cluster B -> cluster C -> node\n *\n * If a node can't be found in the chain, return an empty array.\n *\n * @param {string|number} nodeId\n * @returns {Array}\n */\n findNode(nodeId) {\n let stack = [];\n let max = 100;\n let counter = 0;\n let node;\n\n while (this.clusteredNodes[nodeId] !== undefined && counter < max) {\n node = this.body.nodes[nodeId]\n if (node === undefined) return [];\n stack.push(node.id);\n\n nodeId = this.clusteredNodes[nodeId].clusterId;\n counter++;\n }\n\n node = this.body.nodes[nodeId]\n if (node === undefined) return [];\n stack.push(node.id);\n\n stack.reverse();\n return stack;\n }\n\n /**\n * Using a clustered nodeId, update with the new options\n * @param {vis.Edge.id} clusteredNodeId\n * @param {object} newOptions\n */\n updateClusteredNode(clusteredNodeId, newOptions) {\n if (clusteredNodeId === undefined) {throw new Error(\"No clusteredNodeId supplied to updateClusteredNode.\");}\n if (newOptions === undefined) {throw new Error(\"No newOptions supplied to updateClusteredNode.\");}\n if (this.body.nodes[clusteredNodeId] === undefined) {throw new Error(\"The clusteredNodeId supplied to updateClusteredNode does not exist.\");}\n\n this.body.nodes[clusteredNodeId].setOptions(newOptions);\n this.body.emitter.emit('_dataChanged');\n }\n\n /**\n * Using a base edgeId, update all related clustered edges with the new options\n * @param {vis.Edge.id} startEdgeId\n * @param {object} newOptions\n */\n updateEdge(startEdgeId, newOptions) {\n if (startEdgeId === undefined) {throw new Error(\"No startEdgeId supplied to updateEdge.\");}\n if (newOptions === undefined) {throw new Error(\"No newOptions supplied to updateEdge.\");}\n if (this.body.edges[startEdgeId] === undefined) {throw new Error(\"The startEdgeId supplied to updateEdge does not exist.\");}\n\n let allEdgeIds = this.getClusteredEdges(startEdgeId);\n for (let i = 0; i < allEdgeIds.length; i++) {\n var edge = this.body.edges[allEdgeIds[i]];\n edge.setOptions(newOptions);\n }\n this.body.emitter.emit('_dataChanged');\n }\n\n /**\n * Get a stack of clusterEdgeId's (+base edgeid) that a base edge is the same as. cluster edge C -> cluster edge B -> cluster edge A -> base edge(edgeId)\n * @param {vis.Edge.id} edgeId\n * @returns {Array.}\n */\n getClusteredEdges(edgeId) {\n let stack = [];\n let max = 100;\n let counter = 0;\n\n while (edgeId !== undefined && this.body.edges[edgeId] !== undefined && counter < max) {\n stack.push(this.body.edges[edgeId].id);\n edgeId = this.body.edges[edgeId].edgeReplacedById;\n counter++;\n }\n stack.reverse();\n return stack;\n }\n\n /**\n * Get the base edge id of clusterEdgeId. cluster edge (clusteredEdgeId) -> cluster edge B -> cluster edge C -> base edge\n * @param {vis.Edge.id} clusteredEdgeId\n * @returns {vis.Edge.id} baseEdgeId\n *\n * TODO: deprecate in 5.0.0. Method getBaseEdges() is the correct one to use.\n */\n getBaseEdge(clusteredEdgeId) {\n // Just kludge this by returning the first base edge id found\n return this.getBaseEdges(clusteredEdgeId)[0];\n }\n\n\n /**\n * Get all regular edges for this clustered edge id.\n *\n * @param {vis.Edge.id} clusteredEdgeId\n * @returns {Array.} all baseEdgeId's under this clustered edge\n */\n getBaseEdges(clusteredEdgeId) {\n let IdsToHandle = [clusteredEdgeId];\n let doneIds = [];\n let foundIds = [];\n let max = 100;\n let counter = 0;\n\n while (IdsToHandle.length > 0 && counter < max) {\n let nextId = IdsToHandle.pop();\n if (nextId === undefined) continue; // Paranoia here and onwards\n let nextEdge = this.body.edges[nextId];\n if (nextEdge === undefined) continue;\n counter++;\n\n let replacingIds = nextEdge.clusteringEdgeReplacingIds;\n if (replacingIds === undefined) {\n // nextId is a base id\n foundIds.push(nextId);\n } else {\n // Another cluster edge, unravel this one as well\n for (let i = 0; i < replacingIds.length; ++i) {\n let replacingId = replacingIds[i];\n\n // Don't add if already handled\n // TODO: never triggers; find a test-case which does\n if (IdsToHandle.indexOf(replacingIds) !== -1 || doneIds.indexOf(replacingIds) !== -1) {\n continue;\n }\n\n IdsToHandle.push(replacingId);\n }\n }\n\n doneIds.push(nextId);\n }\n\n return foundIds;\n }\n\n\n /**\n * Get the Id the node is connected to\n * @param {vis.Edge} edge\n * @param {Node.id} nodeId\n * @returns {*}\n * @private\n */\n _getConnectedId(edge, nodeId) {\n if (edge.toId != nodeId) {\n return edge.toId;\n }\n else if (edge.fromId != nodeId) {\n return edge.fromId;\n }\n else {\n return edge.fromId;\n }\n }\n\n /**\n * We determine how many connections denote an important hub.\n * We take the mean + 2*std as the important hub size. (Assuming a normal distribution of data, ~2.2%)\n *\n * @returns {number}\n * @private\n */\n _getHubSize() {\n let average = 0;\n let averageSquared = 0;\n let hubCounter = 0;\n let largestHub = 0;\n\n for (let i = 0; i < this.body.nodeIndices.length; i++) {\n let node = this.body.nodes[this.body.nodeIndices[i]];\n if (node.edges.length > largestHub) {\n largestHub = node.edges.length;\n }\n average += node.edges.length;\n averageSquared += Math.pow(node.edges.length,2);\n hubCounter += 1;\n }\n average = average / hubCounter;\n averageSquared = averageSquared / hubCounter;\n\n let variance = averageSquared - Math.pow(average,2);\n let standardDeviation = Math.sqrt(variance);\n\n let hubThreshold = Math.floor(average + 2*standardDeviation);\n\n // always have at least one to cluster\n if (hubThreshold > largestHub) {\n hubThreshold = largestHub;\n }\n\n return hubThreshold;\n }\n\n\n /**\n * Create an edge for the cluster representation.\n *\n * @param {Node.id} fromId\n * @param {Node.id} toId\n * @param {vis.Edge} baseEdge\n * @param {Object} clusterEdgeProperties\n * @param {Object} extraOptions\n * @returns {Edge} newly created clustered edge\n * @private\n */\n _createClusteredEdge(fromId, toId, baseEdge, clusterEdgeProperties, extraOptions) {\n // copy the options of the edge we will replace\n let clonedOptions = NetworkUtil.cloneOptions(baseEdge, 'edge');\n // make sure the properties of clusterEdges are superimposed on it\n util.deepExtend(clonedOptions, clusterEdgeProperties);\n\n // set up the edge\n clonedOptions.from = fromId;\n clonedOptions.to = toId;\n clonedOptions.id = 'clusterEdge:' + util.randomUUID();\n\n // apply the edge specific options to it if specified\n if (extraOptions !== undefined) {\n util.deepExtend(clonedOptions, extraOptions);\n }\n\n let newEdge = this.body.functions.createEdge(clonedOptions);\n newEdge.clusteringEdgeReplacingIds = [baseEdge.id];\n newEdge.connect();\n\n // Register the new edge\n this.body.edges[newEdge.id] = newEdge;\n\n return newEdge;\n }\n\n\n /**\n * Add the passed child nodes and edges to the given cluster node.\n *\n * @param {Object|Node} childNodes hash of nodes or single node to add in cluster\n * @param {Object|Edge} childEdges hash of edges or single edge to take into account when clustering\n * @param {Node} clusterNode cluster node to add nodes and edges to\n * @param {Object} [clusterEdgeProperties]\n * @private\n */\n _clusterEdges(childNodes, childEdges, clusterNode, clusterEdgeProperties) {\n if (childEdges instanceof Edge) {\n let edge = childEdges;\n let obj = {};\n obj[edge.id] = edge;\n childEdges = obj;\n }\n\n if (childNodes instanceof Node) {\n let node = childNodes;\n let obj = {};\n obj[node.id] = node;\n childNodes = obj;\n }\n\n if (clusterNode === undefined || clusterNode === null) {\n throw new Error(\"_clusterEdges: parameter clusterNode required\");\n }\n\n if (clusterEdgeProperties === undefined) {\n // Take the required properties from the cluster node\n clusterEdgeProperties = clusterNode.clusterEdgeProperties;\n }\n\n // create the new edges that will connect to the cluster.\n // All self-referencing edges will be added to childEdges here.\n this._createClusterEdges(childNodes, childEdges, clusterNode, clusterEdgeProperties);\n\n // disable the childEdges\n for (let edgeId in childEdges) {\n if (childEdges.hasOwnProperty(edgeId)) {\n if (this.body.edges[edgeId] !== undefined) {\n let edge = this.body.edges[edgeId];\n // cache the options before changing\n this._backupEdgeOptions(edge);\n // disable physics and hide the edge\n edge.setOptions({physics:false});\n }\n }\n }\n\n // disable the childNodes\n for (let nodeId in childNodes) {\n if (childNodes.hasOwnProperty(nodeId)) {\n this.clusteredNodes[nodeId] = {clusterId:clusterNode.id, node: this.body.nodes[nodeId]};\n this.body.nodes[nodeId].setOptions({physics:false});\n }\n }\n }\n\n\n /**\n * Determine in which cluster given nodeId resides.\n *\n * If not in cluster, return undefined.\n *\n * NOTE: If you know a cleaner way to do this, please enlighten me (wimrijnders).\n *\n * @param {Node.id} nodeId\n * @returns {Node|undefined} Node instance for cluster, if present\n * @private\n */\n _getClusterNodeForNode(nodeId) {\n if (nodeId === undefined) return undefined;\n let clusteredNode = this.clusteredNodes[nodeId];\n\n // NOTE: If no cluster info found, it should actually be an error\n if (clusteredNode === undefined) return undefined;\n let clusterId = clusteredNode.clusterId;\n if (clusterId === undefined) return undefined;\n\n return this.body.nodes[clusterId];\n }\n\n\n /**\n * Internal helper function for conditionally removing items in array\n *\n * Done like this because Array.filter() is not fully supported by all IE's.\n *\n * @param {Array} arr\n * @param {function} callback\n * @returns {Array}\n * @private\n */\n _filter(arr, callback) {\n let ret = [];\n\n util.forEach(arr, (item) => {\n if (callback(item)) {\n ret.push(item);\n }\n });\n\n return ret;\n }\n\n\n /**\n * Scan all edges for changes in clustering and adjust this if necessary.\n *\n * Call this (internally) after there has been a change in node or edge data.\n *\n * Pre: States of this.body.nodes and this.body.edges consistent\n * Pre: this.clusteredNodes and this.clusteredEdge consistent with containedNodes and containedEdges\n * of cluster nodes.\n */\n _updateState() {\n let nodeId;\n let deletedNodeIds = [];\n let deletedEdgeIds = {};\n\n /**\n * Utility function to iterate over clustering nodes only\n *\n * @param {Function} callback function to call for each cluster node\n */\n let eachClusterNode = (callback) => {\n util.forEach(this.body.nodes, (node) => {\n if (node.isCluster === true) {\n callback(node);\n }\n });\n };\n\n\n //\n // Remove deleted regular nodes from clustering\n //\n\n // Determine the deleted nodes\n for (nodeId in this.clusteredNodes) {\n if (!this.clusteredNodes.hasOwnProperty(nodeId)) continue;\n let node = this.body.nodes[nodeId];\n\n if (node === undefined) {\n deletedNodeIds.push(nodeId);\n }\n }\n\n // Remove nodes from cluster nodes\n eachClusterNode(function(clusterNode) {\n for (let n = 0; n < deletedNodeIds.length; n++) {\n delete clusterNode.containedNodes[deletedNodeIds[n]];\n }\n });\n\n // Remove nodes from cluster list\n for (let n = 0; n < deletedNodeIds.length; n++) {\n delete this.clusteredNodes[deletedNodeIds[n]];\n }\n\n\n //\n // Remove deleted edges from clustering\n //\n\n // Add the deleted clustered edges to the list\n util.forEach(this.clusteredEdges, (edgeId) => {\n let edge = this.body.edges[edgeId];\n if (edge === undefined || !edge.endPointsValid()) {\n deletedEdgeIds[edgeId] = edgeId;\n }\n });\n\n // Cluster nodes can also contain edges which are not clustered, \n // i.e. nodes 1-2 within cluster with an edge in between.\n // So the cluster nodes also need to be scanned for invalid edges\n eachClusterNode(function(clusterNode) {\n util.forEach(clusterNode.containedEdges, (edge, edgeId) => {\n if (!edge.endPointsValid() && !deletedEdgeIds[edgeId]) {\n deletedEdgeIds[edgeId] = edgeId;\n }\n });\n });\n\n // Also scan for cluster edges which need to be removed in the active list.\n // Regular edges have been removed beforehand, so this only picks up the cluster edges.\n util.forEach(this.body.edges, (edge, edgeId) => {\n // Explicitly scan the contained edges for validity\n let isValid = true;\n let replacedIds = edge.clusteringEdgeReplacingIds;\n if (replacedIds !== undefined) {\n let numValid = 0;\n\n util.forEach(replacedIds, (containedEdgeId) => {\n let containedEdge = this.body.edges[containedEdgeId];\n\n if (containedEdge !== undefined && containedEdge.endPointsValid()) {\n numValid += 1;\n }\n });\n\n isValid = (numValid > 0);\n }\n\n if (!edge.endPointsValid() || !isValid) {\n deletedEdgeIds[edgeId] = edgeId;\n }\n });\n\n // Remove edges from cluster nodes\n eachClusterNode((clusterNode) => {\n util.forEach(deletedEdgeIds, (deletedEdgeId) => {\n delete clusterNode.containedEdges[deletedEdgeId];\n\n util.forEach(clusterNode.edges, (edge, m) => {\n if (edge.id === deletedEdgeId) {\n clusterNode.edges[m] = null; // Don't want to directly delete here, because in the loop\n return;\n }\n\n edge.clusteringEdgeReplacingIds = this._filter(edge.clusteringEdgeReplacingIds, function(id) {\n return !deletedEdgeIds[id];\n });\n });\n\n // Clean up the nulls\n clusterNode.edges = this._filter(clusterNode.edges, function(item) {return item !== null});\n });\n });\n\n\n // Remove from cluster list\n util.forEach(deletedEdgeIds, (edgeId) => {\n delete this.clusteredEdges[edgeId];\n });\n\n // Remove cluster edges from active list (this.body.edges).\n // deletedEdgeIds still contains id of regular edges, but these should all\n // be gone when you reach here.\n util.forEach(deletedEdgeIds, (edgeId) => {\n delete this.body.edges[edgeId];\n });\n\n\n //\n // Check changed cluster state of edges\n //\n\n // Iterating over keys here, because edges may be removed in the loop\n let ids = Object.keys(this.body.edges);\n util.forEach(ids, (edgeId) => {\n let edge = this.body.edges[edgeId];\n\n let shouldBeClustered = this._isClusteredNode(edge.fromId) || this._isClusteredNode(edge.toId);\n if (shouldBeClustered === this._isClusteredEdge(edge.id)) {\n return; // all is well\n }\n\n if (shouldBeClustered) {\n // add edge to clustering\n let clusterFrom = this._getClusterNodeForNode(edge.fromId);\n if (clusterFrom !== undefined) {\n this._clusterEdges(this.body.nodes[edge.fromId], edge, clusterFrom);\n }\n\n let clusterTo = this._getClusterNodeForNode(edge.toId);\n if (clusterTo !== undefined) {\n this._clusterEdges(this.body.nodes[edge.toId], edge, clusterTo);\n }\n\n\t\t\t\t// TODO: check that it works for both edges clustered\n // (This might be paranoia)\n } else {\n delete this._clusterEdges[edgeId];\n this._restoreEdge(edge);\n // This should not be happening, the state should\n // be properly updated at this point.\n // \n // If it *is* reached during normal operation, then we have to implement\n // undo clustering for this edge here.\n // throw new Error('remove edge from clustering not implemented!')\n }\n });\n\n\n // Clusters may be nested to any level. Keep on opening until nothing to open\n var changed = false;\n var continueLoop = true;\n while (continueLoop) {\n let clustersToOpen = [];\n\n // Determine the id's of clusters that need opening\n eachClusterNode(function(clusterNode) {\n let numNodes = Object.keys(clusterNode.containedNodes).length;\n let allowSingle = (clusterNode.options.allowSingleNodeCluster === true);\n if ((allowSingle && numNodes < 1) || (!allowSingle && numNodes < 2)) {\n clustersToOpen.push(clusterNode.id);\n }\n });\n\n // Open them\n for (let n = 0; n < clustersToOpen.length; ++n) {\n this.openCluster(clustersToOpen[n], {}, false /* Don't refresh, we're in an refresh/update already */);\n }\n\n continueLoop = (clustersToOpen.length > 0);\n changed = changed || continueLoop;\n }\n\n if (changed) {\n this._updateState() // Redo this method (recursion possible! should be safe)\n }\n }\n\n\n /**\n * Determine if node with given id is part of a cluster.\n *\n * @param {Node.id} nodeId\n * @return {boolean} true if part of a cluster.\n */\n _isClusteredNode(nodeId) {\n return this.clusteredNodes[nodeId] !== undefined;\n }\n\n\n /**\n * Determine if edge with given id is not visible due to clustering.\n *\n * An edge is considered clustered if:\n * - it is directly replaced by a clustering edge\n * - any of its connecting nodes is in a cluster\n *\n * @param {vis.Edge.id} edgeId\n * @return {boolean} true if part of a cluster.\n */\n _isClusteredEdge(edgeId) {\n return this.clusteredEdges[edgeId] !== undefined;\n }\n}\n\n\nexport default ClusterEngine;\n","/**\n * Register a touch event, taking place before a gesture\n * @param {Hammer} hammer A hammer instance\n * @param {function} callback Callback, called as callback(event)\n */\nexports.onTouch = function (hammer, callback) {\n callback.inputHandler = function (event) {\n if (event.isFirst) {\n callback(event);\n }\n };\n\n hammer.on('hammer.input', callback.inputHandler);\n};\n\n/**\n * Register a release event, taking place after a gesture\n * @param {Hammer} hammer A hammer instance\n * @param {function} callback Callback, called as callback(event)\n * @returns {*}\n */\nexports.onRelease = function (hammer, callback) {\n callback.inputHandler = function (event) {\n if (event.isFinal) {\n callback(event);\n }\n };\n\n return hammer.on('hammer.input', callback.inputHandler);\n};\n\n\n/**\n * Unregister a touch event, taking place before a gesture\n * @param {Hammer} hammer A hammer instance\n * @param {function} callback Callback, called as callback(event)\n */\nexports.offTouch = function (hammer, callback) {\n hammer.off('hammer.input', callback.inputHandler);\n};\n\n/**\n * Unregister a release event, taking place before a gesture\n * @param {Hammer} hammer A hammer instance\n * @param {function} callback Callback, called as callback(event)\n */\nexports.offRelease = exports.offTouch;\n\n/**\n * Hack the PinchRecognizer such that it doesn't prevent default behavior\n * for vertical panning.\n *\n * Yeah ... this is quite a hack ... see https://github.com/hammerjs/hammer.js/issues/932\n *\n * @param {Hammer.Pinch} pinchRecognizer\n * @return {Hammer.Pinch} returns the pinchRecognizer\n */\nexports.disablePreventDefaultVertically = function (pinchRecognizer) {\n var TOUCH_ACTION_PAN_Y = 'pan-y';\n\n pinchRecognizer.getTouchAction = function() {\n // default method returns [TOUCH_ACTION_NONE]\n return [TOUCH_ACTION_PAN_Y];\n };\n\n return pinchRecognizer;\n};\n","import Hammer from '../../module/hammer';\nimport hammerUtil from '../../hammerUtil';\n\nimport util from 'vis-util';\n\n/**\n * Create the main frame for the Network.\n * This function is executed once when a Network object is created. The frame\n * contains a canvas, and this canvas contains all objects like the axis and\n * nodes.\n */\nclass Canvas {\n /**\n * @param {Object} body\n */\n constructor(body) {\n this.body = body;\n this.pixelRatio = 1;\n this.resizeTimer = undefined;\n this.resizeFunction = this._onResize.bind(this);\n this.cameraState = {};\n this.initialized = false;\n this.canvasViewCenter = {};\n\n this.options = {};\n this.defaultOptions = {\n autoResize: true,\n height: '100%',\n width: '100%'\n };\n util.extend(this.options, this.defaultOptions);\n\n this.bindEventListeners();\n }\n\n /**\n * Binds event listeners\n */\n bindEventListeners() {\n // bind the events\n this.body.emitter.once(\"resize\", (obj) => {\n if (obj.width !== 0) {\n this.body.view.translation.x = obj.width * 0.5;\n }\n if (obj.height !== 0) {\n this.body.view.translation.y = obj.height * 0.5;\n }\n });\n this.body.emitter.on(\"setSize\", this.setSize.bind(this));\n this.body.emitter.on(\"destroy\", () => {\n this.hammerFrame.destroy();\n this.hammer.destroy();\n this._cleanUp();\n });\n }\n\n /**\n * @param {Object} options\n */\n setOptions(options) {\n if (options !== undefined) {\n let fields = ['width','height','autoResize'];\n util.selectiveDeepExtend(fields,this.options, options);\n }\n\n if (this.options.autoResize === true) {\n // automatically adapt to a changing size of the browser.\n this._cleanUp();\n this.resizeTimer = setInterval(() => {\n let changed = this.setSize();\n if (changed === true) {\n this.body.emitter.emit(\"_requestRedraw\");\n }\n }, 1000);\n this.resizeFunction = this._onResize.bind(this);\n util.addEventListener(window,'resize',this.resizeFunction);\n }\n }\n\n /**\n * @private\n */\n _cleanUp() {\n // automatically adapt to a changing size of the browser.\n if (this.resizeTimer !== undefined) {\n clearInterval(this.resizeTimer);\n }\n util.removeEventListener(window,'resize',this.resizeFunction);\n this.resizeFunction = undefined;\n }\n\n /**\n * @private\n */\n _onResize() {\n this.setSize();\n this.body.emitter.emit(\"_redraw\");\n }\n\n /**\n * Get and store the cameraState\n *\n * @param {number} [pixelRatio=this.pixelRatio]\n * @private\n */\n _getCameraState(pixelRatio = this.pixelRatio) {\n if (this.initialized === true) {\n this.cameraState.previousWidth = this.frame.canvas.width / pixelRatio;\n this.cameraState.previousHeight = this.frame.canvas.height / pixelRatio;\n this.cameraState.scale = this.body.view.scale;\n this.cameraState.position = this.DOMtoCanvas({\n x: 0.5 * this.frame.canvas.width / pixelRatio,\n y: 0.5 * this.frame.canvas.height / pixelRatio\n });\n }\n }\n\n /**\n * Set the cameraState\n * @private\n */\n _setCameraState() {\n if (this.cameraState.scale !== undefined &&\n this.frame.canvas.clientWidth !== 0 &&\n this.frame.canvas.clientHeight !== 0 &&\n this.pixelRatio !== 0 &&\n this.cameraState.previousWidth > 0) {\n\n let widthRatio = (this.frame.canvas.width / this.pixelRatio) / this.cameraState.previousWidth;\n let heightRatio = (this.frame.canvas.height / this.pixelRatio) / this.cameraState.previousHeight;\n let newScale = this.cameraState.scale;\n\n if (widthRatio != 1 && heightRatio != 1) {\n newScale = this.cameraState.scale * 0.5 * (widthRatio + heightRatio);\n }\n else if (widthRatio != 1) {\n newScale = this.cameraState.scale * widthRatio;\n }\n else if (heightRatio != 1) {\n newScale = this.cameraState.scale * heightRatio;\n }\n\n this.body.view.scale = newScale;\n // this comes from the view module.\n var currentViewCenter = this.DOMtoCanvas({\n x: 0.5 * this.frame.canvas.clientWidth,\n y: 0.5 * this.frame.canvas.clientHeight\n });\n\n var distanceFromCenter = { // offset from view, distance view has to change by these x and y to center the node\n x: currentViewCenter.x - this.cameraState.position.x,\n y: currentViewCenter.y - this.cameraState.position.y\n };\n this.body.view.translation.x += distanceFromCenter.x * this.body.view.scale;\n this.body.view.translation.y += distanceFromCenter.y * this.body.view.scale;\n }\n }\n\n /**\n *\n * @param {number|string} value\n * @returns {string}\n * @private\n */\n _prepareValue(value) {\n if (typeof value === 'number') {\n return value + 'px';\n }\n else if (typeof value === 'string') {\n if (value.indexOf('%') !== -1 || value.indexOf('px') !== -1) {\n return value;\n }\n else if (value.indexOf('%') === -1) {\n return value + 'px';\n }\n }\n throw new Error('Could not use the value supplied for width or height:' + value);\n }\n\n\n /**\n * Create the HTML\n */\n _create() {\n // remove all elements from the container element.\n while (this.body.container.hasChildNodes()) {\n this.body.container.removeChild(this.body.container.firstChild);\n }\n\n this.frame = document.createElement('div');\n this.frame.className = 'vis-network';\n this.frame.style.position = 'relative';\n this.frame.style.overflow = 'hidden';\n this.frame.tabIndex = 900; // tab index is required for keycharm to bind keystrokes to the div instead of the window\n\n //////////////////////////////////////////////////////////////////\n\n this.frame.canvas = document.createElement(\"canvas\");\n this.frame.canvas.style.position = 'relative';\n this.frame.appendChild(this.frame.canvas);\n\n if (!this.frame.canvas.getContext) {\n let noCanvas = document.createElement( 'DIV' );\n noCanvas.style.color = 'red';\n noCanvas.style.fontWeight = 'bold' ;\n noCanvas.style.padding = '10px';\n noCanvas.innerHTML = 'Error: your browser does not support HTML canvas';\n this.frame.canvas.appendChild(noCanvas);\n }\n else {\n this._setPixelRatio();\n this.setTransform();\n }\n\n // add the frame to the container element\n this.body.container.appendChild(this.frame);\n\n this.body.view.scale = 1;\n this.body.view.translation = {x: 0.5 * this.frame.canvas.clientWidth,y: 0.5 * this.frame.canvas.clientHeight};\n\n this._bindHammer();\n }\n\n\n /**\n * This function binds hammer, it can be repeated over and over due to the uniqueness check.\n * @private\n */\n _bindHammer() {\n if (this.hammer !== undefined) {\n this.hammer.destroy();\n }\n this.drag = {};\n this.pinch = {};\n\n // init hammer\n this.hammer = new Hammer(this.frame.canvas);\n this.hammer.get('pinch').set({enable: true});\n // enable to get better response, todo: test on mobile.\n this.hammer.get('pan').set({threshold:5, direction: Hammer.DIRECTION_ALL});\n\n hammerUtil.onTouch(this.hammer, (event) => {this.body.eventListeners.onTouch(event)});\n this.hammer.on('tap', (event) => {this.body.eventListeners.onTap(event)});\n this.hammer.on('doubletap', (event) => {this.body.eventListeners.onDoubleTap(event)});\n this.hammer.on('press', (event) => {this.body.eventListeners.onHold(event)});\n this.hammer.on('panstart', (event) => {this.body.eventListeners.onDragStart(event)});\n this.hammer.on('panmove', (event) => {this.body.eventListeners.onDrag(event)});\n this.hammer.on('panend', (event) => {this.body.eventListeners.onDragEnd(event)});\n this.hammer.on('pinch', (event) => {this.body.eventListeners.onPinch(event)});\n\n // TODO: neatly cleanup these handlers when re-creating the Canvas, IF these are done with hammer, event.stopPropagation will not work?\n this.frame.canvas.addEventListener('mousewheel', (event) => {this.body.eventListeners.onMouseWheel(event)});\n this.frame.canvas.addEventListener('DOMMouseScroll', (event) => {this.body.eventListeners.onMouseWheel(event)});\n\n this.frame.canvas.addEventListener('mousemove', (event) => {this.body.eventListeners.onMouseMove(event)});\n this.frame.canvas.addEventListener('contextmenu', (event) => {this.body.eventListeners.onContext(event)});\n\n this.hammerFrame = new Hammer(this.frame);\n hammerUtil.onRelease(this.hammerFrame, (event) => {this.body.eventListeners.onRelease(event)});\n }\n\n\n /**\n * Set a new size for the network\n * @param {string} width Width in pixels or percentage (for example '800px'\n * or '50%')\n * @param {string} height Height in pixels or percentage (for example '400px'\n * or '30%')\n * @returns {boolean}\n */\n setSize(width = this.options.width, height = this.options.height) {\n width = this._prepareValue(width);\n height= this._prepareValue(height);\n\n let emitEvent = false;\n let oldWidth = this.frame.canvas.width;\n let oldHeight = this.frame.canvas.height;\n\n // update the pixel ratio\n //\n // NOTE: Comment in following is rather inconsistent; this is the ONLY place in the code\n // where it is assumed that the pixel ratio could change at runtime.\n // The only way I can think of this happening is a rotating screen or tablet; but then\n // there should be a mechanism for reloading the data (TODO: check if this is present).\n //\n // If the assumption is true (i.e. pixel ratio can change at runtime), then *all* usage\n // of pixel ratio must be overhauled for this.\n //\n // For the time being, I will humor the assumption here, and in the rest of the code assume it is\n // constant.\n let previousRatio = this.pixelRatio; // we cache this because the camera state storage needs the old value\n this._setPixelRatio();\n\n if (width != this.options.width || height != this.options.height || this.frame.style.width != width || this.frame.style.height != height) {\n this._getCameraState(previousRatio);\n\n this.frame.style.width = width;\n this.frame.style.height = height;\n\n this.frame.canvas.style.width = '100%';\n this.frame.canvas.style.height = '100%';\n\n this.frame.canvas.width = Math.round(this.frame.canvas.clientWidth * this.pixelRatio);\n this.frame.canvas.height = Math.round(this.frame.canvas.clientHeight * this.pixelRatio);\n\n this.options.width = width;\n this.options.height = height;\n\n this.canvasViewCenter = {\n x: 0.5 * this.frame.clientWidth,\n y: 0.5 * this.frame.clientHeight\n };\n\n emitEvent = true;\n }\n else {\n // this would adapt the width of the canvas to the width from 100% if and only if\n // there is a change.\n\n let newWidth = Math.round(this.frame.canvas.clientWidth * this.pixelRatio);\n let newHeight = Math.round(this.frame.canvas.clientHeight * this.pixelRatio);\n\n // store the camera if there is a change in size.\n if (this.frame.canvas.width !== newWidth || this.frame.canvas.height !== newHeight) {\n this._getCameraState(previousRatio);\n }\n\n if (this.frame.canvas.width !== newWidth) {\n this.frame.canvas.width = newWidth;\n emitEvent = true;\n }\n if (this.frame.canvas.height !== newHeight) {\n this.frame.canvas.height = newHeight;\n emitEvent = true;\n }\n }\n\n if (emitEvent === true) {\n this.body.emitter.emit('resize', {\n width : Math.round(this.frame.canvas.width / this.pixelRatio),\n height : Math.round(this.frame.canvas.height / this.pixelRatio),\n oldWidth : Math.round(oldWidth / this.pixelRatio),\n oldHeight: Math.round(oldHeight / this.pixelRatio)\n });\n\n // restore the camera on change.\n this._setCameraState();\n }\n\n\n // set initialized so the get and set camera will work from now on.\n this.initialized = true;\n return emitEvent;\n }\n\n /**\n *\n * @returns {CanvasRenderingContext2D}\n */\n getContext() {\n return this.frame.canvas.getContext(\"2d\");\n }\n\n /**\n * Determine the pixel ratio for various browsers.\n *\n * @returns {number}\n * @private\n */\n _determinePixelRatio() {\n let ctx = this.getContext();\n if (ctx === undefined) {\n throw new Error(\"Could not get canvax context\");\n }\n\n var numerator = 1;\n if(typeof window !== 'undefined') { // (window !== undefined) doesn't work here!\n // Protection during unit tests, where 'window' can be missing\n numerator = (window.devicePixelRatio || 1);\n }\n\n var denominator = (ctx.webkitBackingStorePixelRatio ||\n ctx.mozBackingStorePixelRatio ||\n ctx.msBackingStorePixelRatio ||\n ctx.oBackingStorePixelRatio ||\n ctx.backingStorePixelRatio || 1);\n\n return numerator / denominator;\n }\n\n /**\n * Lazy determination of pixel ratio.\n *\n * @private\n */\n _setPixelRatio() {\n this.pixelRatio = this._determinePixelRatio();\n }\n\n /**\n * Set the transform in the contained context, based on its pixelRatio\n */\n setTransform() {\n let ctx = this.getContext();\n if (ctx === undefined) {\n throw new Error(\"Could not get canvax context\");\n }\n\n ctx.setTransform(this.pixelRatio, 0, 0, this.pixelRatio, 0, 0);\n }\n\n\n /**\n * Convert the X coordinate in DOM-space (coordinate point in browser relative to the container div) to\n * the X coordinate in canvas-space (the simulation sandbox, which the camera looks upon)\n * @param {number} x\n * @returns {number}\n * @private\n */\n _XconvertDOMtoCanvas(x) {\n return (x - this.body.view.translation.x) / this.body.view.scale;\n }\n\n /**\n * Convert the X coordinate in canvas-space (the simulation sandbox, which the camera looks upon) to\n * the X coordinate in DOM-space (coordinate point in browser relative to the container div)\n * @param {number} x\n * @returns {number}\n * @private\n */\n _XconvertCanvasToDOM(x) {\n return x * this.body.view.scale + this.body.view.translation.x;\n }\n\n /**\n * Convert the Y coordinate in DOM-space (coordinate point in browser relative to the container div) to\n * the Y coordinate in canvas-space (the simulation sandbox, which the camera looks upon)\n * @param {number} y\n * @returns {number}\n * @private\n */\n _YconvertDOMtoCanvas(y) {\n return (y - this.body.view.translation.y) / this.body.view.scale;\n }\n\n /**\n * Convert the Y coordinate in canvas-space (the simulation sandbox, which the camera looks upon) to\n * the Y coordinate in DOM-space (coordinate point in browser relative to the container div)\n * @param {number} y\n * @returns {number}\n * @private\n */\n _YconvertCanvasToDOM(y) {\n return y * this.body.view.scale + this.body.view.translation.y;\n }\n\n\n /**\n * @param {point} pos\n * @returns {point}\n */\n canvasToDOM (pos) {\n return {x: this._XconvertCanvasToDOM(pos.x), y: this._YconvertCanvasToDOM(pos.y)};\n }\n\n /**\n *\n * @param {point} pos\n * @returns {point}\n */\n DOMtoCanvas (pos) {\n return {x: this._XconvertDOMtoCanvas(pos.x), y: this._YconvertDOMtoCanvas(pos.y)};\n }\n\n}\n\nexport default Canvas;\n","import util from 'vis-util';\n\nimport NetworkUtil from '../NetworkUtil';\n\n/**\n * The view\n */\nclass View {\n /**\n * @param {Object} body\n * @param {Canvas} canvas\n */\n constructor(body, canvas) {\n this.body = body;\n this.canvas = canvas;\n\n this.animationSpeed = 1/this.renderRefreshRate;\n this.animationEasingFunction = \"easeInOutQuint\";\n this.easingTime = 0;\n this.sourceScale = 0;\n this.targetScale = 0;\n this.sourceTranslation = 0;\n this.targetTranslation = 0;\n this.lockedOnNodeId = undefined;\n this.lockedOnNodeOffset = undefined;\n this.touchTime = 0;\n\n this.viewFunction = undefined;\n\n this.body.emitter.on(\"fit\", this.fit.bind(this));\n this.body.emitter.on(\"animationFinished\", () => {this.body.emitter.emit(\"_stopRendering\");});\n this.body.emitter.on(\"unlockNode\", this.releaseNode.bind(this));\n }\n\n /**\n *\n * @param {Object} [options={}]\n */\n setOptions(options = {}) {\n this.options = options;\n }\n\n\n /**\n * This function zooms out to fit all data on screen based on amount of nodes\n * @param {Object} [options={{nodes=Array}}]\n * @param {boolean} [initialZoom=false] | zoom based on fitted formula or range, true = fitted, default = false;\n */\n fit(options = {nodes:[]}, initialZoom = false) {\n let range;\n let zoomLevel;\n options = Object.assign({}, options);\n if (options.nodes === undefined || options.nodes.length === 0) {\n options.nodes = this.body.nodeIndices;\n }\n\n\n if (initialZoom === true) {\n // check if more than half of the nodes have a predefined position. If so, we use the range, not the approximation.\n let positionDefined = 0;\n for (let nodeId in this.body.nodes) {\n if (this.body.nodes.hasOwnProperty(nodeId)) {\n let node = this.body.nodes[nodeId];\n if (node.predefinedPosition === true) {\n positionDefined += 1;\n }\n }\n }\n if (positionDefined > 0.5 * this.body.nodeIndices.length) {\n this.fit(options,false);\n return;\n }\n\n range = NetworkUtil.getRange(this.body.nodes, options.nodes);\n\n let numberOfNodes = this.body.nodeIndices.length;\n zoomLevel = 12.662 / (numberOfNodes + 7.4147) + 0.0964822; // this is obtained from fitting a dataset from 5 points with scale levels that looked good.\n\n // correct for larger canvasses.\n let factor = Math.min(this.canvas.frame.canvas.clientWidth / 600, this.canvas.frame.canvas.clientHeight / 600);\n zoomLevel *= factor;\n }\n else {\n this.body.emitter.emit(\"_resizeNodes\");\n range = NetworkUtil.getRange(this.body.nodes, options.nodes);\n\n let xDistance = Math.abs(range.maxX - range.minX) * 1.1;\n let yDistance = Math.abs(range.maxY - range.minY) * 1.1;\n\n let xZoomLevel = this.canvas.frame.canvas.clientWidth / xDistance;\n let yZoomLevel = this.canvas.frame.canvas.clientHeight / yDistance;\n\n zoomLevel = (xZoomLevel <= yZoomLevel) ? xZoomLevel : yZoomLevel;\n }\n\n if (zoomLevel > 1.0) {\n zoomLevel = 1.0;\n }\n else if (zoomLevel === 0) {\n zoomLevel = 1.0;\n }\n\n let center = NetworkUtil.findCenter(range);\n let animationOptions = {position: center, scale: zoomLevel, animation: options.animation};\n this.moveTo(animationOptions);\n }\n \n // animation\n\n /**\n * Center a node in view.\n *\n * @param {number} nodeId\n * @param {number} [options]\n */\n focus(nodeId, options = {}) {\n if (this.body.nodes[nodeId] !== undefined) {\n let nodePosition = {x: this.body.nodes[nodeId].x, y: this.body.nodes[nodeId].y};\n options.position = nodePosition;\n options.lockedOnNode = nodeId;\n\n this.moveTo(options)\n }\n else {\n console.log(\"Node: \" + nodeId + \" cannot be found.\");\n }\n }\n\n /**\n *\n * @param {Object} options | options.offset = {x:number, y:number} // offset from the center in DOM pixels\n * | options.scale = number // scale to move to\n * | options.position = {x:number, y:number} // position to move to\n * | options.animation = {duration:number, easingFunction:String} || Boolean // position to move to\n */\n moveTo(options) {\n if (options === undefined) {\n options = {};\n return;\n }\n\n if (options.offset != null) {\n if (options.offset.x != null) {\n // Coerce and verify that x is valid.\n options.offset.x = +options.offset.x\n if (!Number.isFinite(options.offset.x)) {\n throw new TypeError('The option \"offset.x\" has to be a finite number.')\n }\n } else {\n options.offset.x = 0\n }\n\n if (options.offset.y != null) {\n // Coerce and verify that y is valid.\n options.offset.y = +options.offset.y\n if (!Number.isFinite(options.offset.y)) {\n throw new TypeError('The option \"offset.y\" has to be a finite number.')\n }\n } else {\n options.offset.x = 0\n }\n } else {\n options.offset = {\n x: 0,\n y: 0\n }\n }\n\n if (options.position != null) {\n if (options.position.x != null) {\n // Coerce and verify that x is valid.\n options.position.x = +options.position.x\n if (!Number.isFinite(options.position.x)) {\n throw new TypeError('The option \"position.x\" has to be a finite number.')\n }\n } else {\n options.position.x = 0\n }\n\n if (options.position.y != null) {\n // Coerce and verify that y is valid.\n options.position.y = +options.position.y\n if (!Number.isFinite(options.position.y)) {\n throw new TypeError('The option \"position.y\" has to be a finite number.')\n }\n } else {\n options.position.x = 0\n }\n } else {\n options.position = this.getViewPosition()\n }\n\n if (options.scale != null) {\n // Coerce and verify that the scale is valid.\n options.scale = +options.scale\n if (!(options.scale > 0)) {\n throw new TypeError('The option \"scale\" has to be a number greater than zero.')\n }\n } else {\n options.scale = this.body.view.scale\n }\n\n if (options.animation === undefined) {options.animation = {duration:0}; }\n if (options.animation === false ) {options.animation = {duration:0}; }\n if (options.animation === true ) {options.animation = {}; }\n if (options.animation.duration === undefined) {options.animation.duration = 1000; } // default duration\n if (options.animation.easingFunction === undefined) {options.animation.easingFunction = \"easeInOutQuad\"; } // default easing function\n\n this.animateView(options);\n }\n\n /**\n *\n * @param {Object} options | options.offset = {x:number, y:number} // offset from the center in DOM pixels\n * | options.time = number // animation time in milliseconds\n * | options.scale = number // scale to animate to\n * | options.position = {x:number, y:number} // position to animate to\n * | options.easingFunction = String // linear, easeInQuad, easeOutQuad, easeInOutQuad,\n * // easeInCubic, easeOutCubic, easeInOutCubic,\n * // easeInQuart, easeOutQuart, easeInOutQuart,\n * // easeInQuint, easeOutQuint, easeInOutQuint\n */\n animateView(options) {\n if (options === undefined) {\n return;\n }\n this.animationEasingFunction = options.animation.easingFunction;\n // release if something focussed on the node\n this.releaseNode();\n if (options.locked === true) {\n this.lockedOnNodeId = options.lockedOnNode;\n this.lockedOnNodeOffset = options.offset;\n }\n\n // forcefully complete the old animation if it was still running\n if (this.easingTime != 0) {\n this._transitionRedraw(true); // by setting easingtime to 1, we finish the animation.\n }\n\n this.sourceScale = this.body.view.scale;\n this.sourceTranslation = this.body.view.translation;\n this.targetScale = options.scale;\n\n // set the scale so the viewCenter is based on the correct zoom level. This is overridden in the transitionRedraw\n // but at least then we'll have the target transition\n this.body.view.scale = this.targetScale;\n let viewCenter = this.canvas.DOMtoCanvas({x: 0.5 * this.canvas.frame.canvas.clientWidth, y: 0.5 * this.canvas.frame.canvas.clientHeight});\n\n let distanceFromCenter = { // offset from view, distance view has to change by these x and y to center the node\n x: viewCenter.x - options.position.x,\n y: viewCenter.y - options.position.y\n };\n this.targetTranslation = {\n x: this.sourceTranslation.x + distanceFromCenter.x * this.targetScale + options.offset.x,\n y: this.sourceTranslation.y + distanceFromCenter.y * this.targetScale + options.offset.y\n };\n\n // if the time is set to 0, don't do an animation\n if (options.animation.duration === 0) {\n if (this.lockedOnNodeId != undefined) {\n this.viewFunction = this._lockedRedraw.bind(this);\n this.body.emitter.on(\"initRedraw\", this.viewFunction);\n }\n else {\n this.body.view.scale = this.targetScale;\n this.body.view.translation = this.targetTranslation;\n this.body.emitter.emit(\"_requestRedraw\");\n }\n }\n else {\n this.animationSpeed = 1 / (60 * options.animation.duration * 0.001) || 1 / 60; // 60 for 60 seconds, 0.001 for milli's\n this.animationEasingFunction = options.animation.easingFunction;\n\n\n this.viewFunction = this._transitionRedraw.bind(this);\n this.body.emitter.on(\"initRedraw\", this.viewFunction);\n this.body.emitter.emit(\"_startRendering\");\n }\n }\n\n /**\n * used to animate smoothly by hijacking the redraw function.\n * @private\n */\n _lockedRedraw() {\n let nodePosition = {x: this.body.nodes[this.lockedOnNodeId].x, y: this.body.nodes[this.lockedOnNodeId].y};\n let viewCenter = this.canvas.DOMtoCanvas({x: 0.5 * this.canvas.frame.canvas.clientWidth, y: 0.5 * this.canvas.frame.canvas.clientHeight});\n let distanceFromCenter = { // offset from view, distance view has to change by these x and y to center the node\n x: viewCenter.x - nodePosition.x,\n y: viewCenter.y - nodePosition.y\n };\n let sourceTranslation = this.body.view.translation;\n let targetTranslation = {\n x: sourceTranslation.x + distanceFromCenter.x * this.body.view.scale + this.lockedOnNodeOffset.x,\n y: sourceTranslation.y + distanceFromCenter.y * this.body.view.scale + this.lockedOnNodeOffset.y\n };\n\n this.body.view.translation = targetTranslation;\n }\n\n /**\n * Resets state of a locked on Node\n */\n releaseNode() {\n if (this.lockedOnNodeId !== undefined && this.viewFunction !== undefined) {\n this.body.emitter.off(\"initRedraw\", this.viewFunction);\n this.lockedOnNodeId = undefined;\n this.lockedOnNodeOffset = undefined;\n }\n }\n\n /**\n * @param {boolean} [finished=false]\n * @private\n */\n _transitionRedraw(finished = false) {\n this.easingTime += this.animationSpeed;\n this.easingTime = finished === true ? 1.0 : this.easingTime;\n\n let progress = util.easingFunctions[this.animationEasingFunction](this.easingTime);\n\n this.body.view.scale = this.sourceScale + (this.targetScale - this.sourceScale) * progress;\n this.body.view.translation = {\n x: this.sourceTranslation.x + (this.targetTranslation.x - this.sourceTranslation.x) * progress,\n y: this.sourceTranslation.y + (this.targetTranslation.y - this.sourceTranslation.y) * progress\n };\n\n // cleanup\n if (this.easingTime >= 1.0) {\n this.body.emitter.off(\"initRedraw\", this.viewFunction);\n this.easingTime = 0;\n if (this.lockedOnNodeId != undefined) {\n this.viewFunction = this._lockedRedraw.bind(this);\n this.body.emitter.on(\"initRedraw\", this.viewFunction);\n }\n this.body.emitter.emit(\"animationFinished\");\n }\n }\n\n\n /**\n *\n * @returns {number}\n */\n getScale() {\n return this.body.view.scale;\n }\n\n /**\n *\n * @returns {{x: number, y: number}}\n */\n getViewPosition() {\n return this.canvas.DOMtoCanvas({x: 0.5 * this.canvas.frame.canvas.clientWidth, y: 0.5 * this.canvas.frame.canvas.clientHeight});\n }\n\n\n}\n\nexport default View;\n","import './NavigationHandler.css';\n\nimport Hammer from '../../../module/hammer';\nimport hammerUtil from '../../../hammerUtil';\nimport keycharm from 'keycharm';\n\n/**\n * Navigation Handler\n */\nclass NavigationHandler {\n /**\n * @param {Object} body\n * @param {Canvas} canvas\n */\n constructor(body, canvas) {\n this.body = body;\n this.canvas = canvas;\n\n this.iconsCreated = false;\n this.navigationHammers = [];\n this.boundFunctions = {};\n this.touchTime = 0;\n this.activated = false;\n\n\n this.body.emitter.on(\"activate\", () => {this.activated = true; this.configureKeyboardBindings();});\n this.body.emitter.on(\"deactivate\", () => {this.activated = false; this.configureKeyboardBindings();});\n this.body.emitter.on(\"destroy\", () => {if (this.keycharm !== undefined) {this.keycharm.destroy();}});\n\n this.options = {}\n }\n\n /**\n *\n * @param {Object} options\n */\n setOptions(options) {\n if (options !== undefined) {\n this.options = options;\n this.create();\n }\n }\n\n /**\n * Creates or refreshes navigation and sets key bindings\n */\n create() {\n if (this.options.navigationButtons === true) {\n if (this.iconsCreated === false) {\n this.loadNavigationElements();\n }\n }\n else if (this.iconsCreated === true) {\n this.cleanNavigation();\n }\n\n this.configureKeyboardBindings();\n }\n\n /**\n * Cleans up previous navigation items\n */\n cleanNavigation() {\n // clean hammer bindings\n if (this.navigationHammers.length != 0) {\n for (var i = 0; i < this.navigationHammers.length; i++) {\n this.navigationHammers[i].destroy();\n }\n this.navigationHammers = [];\n }\n\n // clean up previous navigation items\n if (this.navigationDOM && this.navigationDOM['wrapper'] && this.navigationDOM['wrapper'].parentNode) {\n this.navigationDOM['wrapper'].parentNode.removeChild(this.navigationDOM['wrapper']);\n }\n\n this.iconsCreated = false;\n }\n\n /**\n * Creation of the navigation controls nodes. They are drawn over the rest of the nodes and are not affected by scale and translation\n * they have a triggerFunction which is called on click. If the position of the navigation controls is dependent\n * on this.frame.canvas.clientWidth or this.frame.canvas.clientHeight, we flag horizontalAlignLeft and verticalAlignTop false.\n * This means that the location will be corrected by the _relocateNavigation function on a size change of the canvas.\n *\n * @private\n */\n loadNavigationElements() {\n this.cleanNavigation();\n\n this.navigationDOM = {};\n var navigationDivs = ['up','down','left','right','zoomIn','zoomOut','zoomExtends'];\n var navigationDivActions = ['_moveUp','_moveDown','_moveLeft','_moveRight','_zoomIn','_zoomOut','_fit'];\n\n this.navigationDOM['wrapper'] = document.createElement('div');\n this.navigationDOM['wrapper'].className = 'vis-navigation';\n this.canvas.frame.appendChild(this.navigationDOM['wrapper']);\n\n for (var i = 0; i < navigationDivs.length; i++) {\n this.navigationDOM[navigationDivs[i]] = document.createElement('div');\n this.navigationDOM[navigationDivs[i]].className = 'vis-button vis-' + navigationDivs[i];\n this.navigationDOM['wrapper'].appendChild(this.navigationDOM[navigationDivs[i]]);\n\n var hammer = new Hammer(this.navigationDOM[navigationDivs[i]]);\n if (navigationDivActions[i] === \"_fit\") {\n hammerUtil.onTouch(hammer, this._fit.bind(this));\n }\n else {\n hammerUtil.onTouch(hammer, this.bindToRedraw.bind(this,navigationDivActions[i]));\n }\n\n this.navigationHammers.push(hammer);\n }\n\n // use a hammer for the release so we do not require the one used in the rest of the network\n // the one the rest uses can be overloaded by the manipulation system.\n var hammerFrame = new Hammer(this.canvas.frame);\n hammerUtil.onRelease(hammerFrame, () => {this._stopMovement();});\n this.navigationHammers.push(hammerFrame);\n\n this.iconsCreated = true;\n }\n\n /**\n *\n * @param {string} action\n */\n bindToRedraw(action) {\n if (this.boundFunctions[action] === undefined) {\n this.boundFunctions[action] = this[action].bind(this);\n this.body.emitter.on(\"initRedraw\", this.boundFunctions[action]);\n this.body.emitter.emit(\"_startRendering\");\n }\n }\n\n /**\n *\n * @param {string} action\n */\n unbindFromRedraw(action) {\n if (this.boundFunctions[action] !== undefined) {\n this.body.emitter.off(\"initRedraw\", this.boundFunctions[action]);\n this.body.emitter.emit(\"_stopRendering\");\n delete this.boundFunctions[action];\n }\n }\n\n /**\n * this stops all movement induced by the navigation buttons\n *\n * @private\n */\n _fit() {\n if (new Date().valueOf() - this.touchTime > 700) { // TODO: fix ugly hack to avoid hammer's double fireing of event (because we use release?)\n this.body.emitter.emit(\"fit\", {duration: 700});\n this.touchTime = new Date().valueOf();\n }\n }\n\n /**\n * this stops all movement induced by the navigation buttons\n *\n * @private\n */\n _stopMovement() {\n for (let boundAction in this.boundFunctions) {\n if (this.boundFunctions.hasOwnProperty(boundAction)) {\n this.body.emitter.off(\"initRedraw\", this.boundFunctions[boundAction]);\n this.body.emitter.emit(\"_stopRendering\");\n }\n }\n this.boundFunctions = {};\n }\n /**\n *\n * @private\n */\n _moveUp() {this.body.view.translation.y += this.options.keyboard.speed.y;}\n /**\n *\n * @private\n */\n _moveDown() {this.body.view.translation.y -= this.options.keyboard.speed.y;}\n /**\n *\n * @private\n */\n _moveLeft() {this.body.view.translation.x += this.options.keyboard.speed.x;}\n /**\n *\n * @private\n */\n _moveRight(){this.body.view.translation.x -= this.options.keyboard.speed.x;}\n /**\n *\n * @private\n */\n _zoomIn() {\n var scaleOld = this.body.view.scale;\n var scale = this.body.view.scale * (1 + this.options.keyboard.speed.zoom);\n var translation = this.body.view.translation;\n var scaleFrac = scale / scaleOld;\n var tx = (1 - scaleFrac) * this.canvas.canvasViewCenter.x + translation.x * scaleFrac;\n var ty = (1 - scaleFrac) * this.canvas.canvasViewCenter.y + translation.y * scaleFrac;\n\n this.body.view.scale = scale;\n this.body.view.translation = { x: tx, y: ty };\n this.body.emitter.emit('zoom', { direction: '+', scale: this.body.view.scale, pointer: null });\n\n }\n\n /**\n *\n * @private\n */\n _zoomOut() {\n var scaleOld = this.body.view.scale;\n var scale = this.body.view.scale / (1 + this.options.keyboard.speed.zoom);\n var translation = this.body.view.translation;\n var scaleFrac = scale / scaleOld;\n var tx = (1 - scaleFrac) * this.canvas.canvasViewCenter.x + translation.x * scaleFrac;\n var ty = (1 - scaleFrac) * this.canvas.canvasViewCenter.y + translation.y * scaleFrac;\n\n this.body.view.scale = scale;\n this.body.view.translation = { x: tx, y: ty };\n this.body.emitter.emit('zoom', { direction: '-', scale: this.body.view.scale, pointer: null });\n }\n\n\n /**\n * bind all keys using keycharm.\n */\n configureKeyboardBindings() {\n if (this.keycharm !== undefined) {\n this.keycharm.destroy();\n }\n\n if (this.options.keyboard.enabled === true) {\n if (this.options.keyboard.bindToWindow === true) {\n this.keycharm = keycharm({container: window, preventDefault: true});\n }\n else {\n this.keycharm = keycharm({container: this.canvas.frame, preventDefault: true});\n }\n\n this.keycharm.reset();\n\n if (this.activated === true) {\n this.keycharm.bind(\"up\", () => {this.bindToRedraw(\"_moveUp\") ;}, \"keydown\");\n this.keycharm.bind(\"down\", () => {this.bindToRedraw(\"_moveDown\") ;}, \"keydown\");\n this.keycharm.bind(\"left\", () => {this.bindToRedraw(\"_moveLeft\") ;}, \"keydown\");\n this.keycharm.bind(\"right\", () => {this.bindToRedraw(\"_moveRight\");}, \"keydown\");\n this.keycharm.bind(\"=\", () => {this.bindToRedraw(\"_zoomIn\") ;}, \"keydown\");\n this.keycharm.bind(\"num+\", () => {this.bindToRedraw(\"_zoomIn\") ;}, \"keydown\");\n this.keycharm.bind(\"num-\", () => {this.bindToRedraw(\"_zoomOut\") ;}, \"keydown\");\n this.keycharm.bind(\"-\", () => {this.bindToRedraw(\"_zoomOut\") ;}, \"keydown\");\n this.keycharm.bind(\"[\", () => {this.bindToRedraw(\"_zoomOut\") ;}, \"keydown\");\n this.keycharm.bind(\"]\", () => {this.bindToRedraw(\"_zoomIn\") ;}, \"keydown\");\n this.keycharm.bind(\"pageup\", () => {this.bindToRedraw(\"_zoomIn\") ;}, \"keydown\");\n this.keycharm.bind(\"pagedown\", () => {this.bindToRedraw(\"_zoomOut\") ;}, \"keydown\");\n\n this.keycharm.bind(\"up\", () => {this.unbindFromRedraw(\"_moveUp\") ;}, \"keyup\");\n this.keycharm.bind(\"down\", () => {this.unbindFromRedraw(\"_moveDown\") ;}, \"keyup\");\n this.keycharm.bind(\"left\", () => {this.unbindFromRedraw(\"_moveLeft\") ;}, \"keyup\");\n this.keycharm.bind(\"right\", () => {this.unbindFromRedraw(\"_moveRight\");}, \"keyup\");\n this.keycharm.bind(\"=\", () => {this.unbindFromRedraw(\"_zoomIn\") ;}, \"keyup\");\n this.keycharm.bind(\"num+\", () => {this.unbindFromRedraw(\"_zoomIn\") ;}, \"keyup\");\n this.keycharm.bind(\"num-\", () => {this.unbindFromRedraw(\"_zoomOut\") ;}, \"keyup\");\n this.keycharm.bind(\"-\", () => {this.unbindFromRedraw(\"_zoomOut\") ;}, \"keyup\");\n this.keycharm.bind(\"[\", () => {this.unbindFromRedraw(\"_zoomOut\") ;}, \"keyup\");\n this.keycharm.bind(\"]\", () => {this.unbindFromRedraw(\"_zoomIn\") ;}, \"keyup\");\n this.keycharm.bind(\"pageup\", () => {this.unbindFromRedraw(\"_zoomIn\") ;}, \"keyup\");\n this.keycharm.bind(\"pagedown\", () => {this.unbindFromRedraw(\"_zoomOut\") ;}, \"keyup\");\n }\n }\n }\n}\n\n\nexport default NavigationHandler;\n","import './Popup.css';\n\n/**\n * Popup is a class to create a popup window with some text\n */\nclass Popup {\n /**\n * @param {Element} container The container object.\n * @param {string} overflowMethod How the popup should act to overflowing ('flip' or 'cap')\n */\n constructor(container, overflowMethod) {\n this.container = container;\n this.overflowMethod = overflowMethod || 'cap';\n\n this.x = 0;\n this.y = 0;\n this.padding = 5;\n this.hidden = false;\n\n // create the frame\n this.frame = document.createElement('div');\n this.frame.className = 'vis-tooltip';\n this.container.appendChild(this.frame);\n }\n\n /**\n * @param {number} x Horizontal position of the popup window\n * @param {number} y Vertical position of the popup window\n */\n setPosition(x, y) {\n this.x = parseInt(x);\n this.y = parseInt(y);\n }\n\n /**\n * Set the content for the popup window. This can be HTML code or text.\n * @param {string | Element} content\n */\n setText(content) {\n if (content instanceof Element) {\n this.frame.innerHTML = '';\n this.frame.appendChild(content);\n }\n else {\n this.frame.innerHTML = content; // string containing text or HTML\n }\n }\n\n /**\n * Show the popup window\n * @param {boolean} [doShow] Show or hide the window\n */\n show(doShow) {\n if (doShow === undefined) {\n doShow = true;\n }\n\n if (doShow === true) {\n var height = this.frame.clientHeight;\n var width = this.frame.clientWidth;\n var maxHeight = this.frame.parentNode.clientHeight;\n var maxWidth = this.frame.parentNode.clientWidth;\n\n var left = 0, top = 0;\n\n if (this.overflowMethod == 'flip') {\n var isLeft = false, isTop = true; // Where around the position it's located\n\n if (this.y - height < this.padding) {\n isTop = false;\n }\n\n if (this.x + width > maxWidth - this.padding) {\n isLeft = true;\n }\n\n if (isLeft) {\n left = this.x - width;\n } else {\n left = this.x;\n }\n\n if (isTop) {\n top = this.y - height;\n } else {\n top = this.y;\n }\n } else {\n top = (this.y - height);\n if (top + height + this.padding > maxHeight) {\n top = maxHeight - height - this.padding;\n }\n if (top < this.padding) {\n top = this.padding;\n }\n\n left = this.x;\n if (left + width + this.padding > maxWidth) {\n left = maxWidth - width - this.padding;\n }\n if (left < this.padding) {\n left = this.padding;\n }\n }\n\n this.frame.style.left = left + \"px\";\n this.frame.style.top = top + \"px\";\n this.frame.style.visibility = \"visible\";\n this.hidden = false;\n }\n else {\n this.hide();\n }\n }\n\n /**\n * Hide the popup window\n */\n hide() {\n this.hidden = true;\n this.frame.style.left = \"0\";\n this.frame.style.top = \"0\";\n this.frame.style.visibility = \"hidden\";\n }\n\n /**\n * Remove the popup window\n */\n destroy() {\n this.frame.parentNode.removeChild(this.frame); // Remove element from DOM\n }\n}\n\nexport default Popup;\n","import util from 'vis-util';\nimport NavigationHandler from './components/NavigationHandler';\nimport Popup from './../../shared/Popup';\n\n\n/**\n * Handler for interactions\n */\nclass InteractionHandler {\n /**\n * @param {Object} body\n * @param {Canvas} canvas\n * @param {SelectionHandler} selectionHandler\n */\n constructor(body, canvas, selectionHandler) {\n this.body = body;\n this.canvas = canvas;\n this.selectionHandler = selectionHandler;\n this.navigationHandler = new NavigationHandler(body,canvas);\n\n // bind the events from hammer to functions in this object\n this.body.eventListeners.onTap = this.onTap.bind(this);\n this.body.eventListeners.onTouch = this.onTouch.bind(this);\n this.body.eventListeners.onDoubleTap = this.onDoubleTap.bind(this);\n this.body.eventListeners.onHold = this.onHold.bind(this);\n this.body.eventListeners.onDragStart = this.onDragStart.bind(this);\n this.body.eventListeners.onDrag = this.onDrag.bind(this);\n this.body.eventListeners.onDragEnd = this.onDragEnd.bind(this);\n this.body.eventListeners.onMouseWheel = this.onMouseWheel.bind(this);\n this.body.eventListeners.onPinch = this.onPinch.bind(this);\n this.body.eventListeners.onMouseMove = this.onMouseMove.bind(this);\n this.body.eventListeners.onRelease = this.onRelease.bind(this);\n this.body.eventListeners.onContext = this.onContext.bind(this);\n\n this.touchTime = 0;\n this.drag = {};\n this.pinch = {};\n this.popup = undefined;\n this.popupObj = undefined;\n this.popupTimer = undefined;\n\n this.body.functions.getPointer = this.getPointer.bind(this);\n\n this.options = {};\n this.defaultOptions = {\n dragNodes:true,\n dragView: true,\n hover: false,\n keyboard: {\n enabled: false,\n speed: {x: 10, y: 10, zoom: 0.02},\n bindToWindow: true\n },\n navigationButtons: false,\n tooltipDelay: 300,\n zoomView: true,\n zoomSpeed: 1\n };\n util.extend(this.options,this.defaultOptions);\n\n this.bindEventListeners()\n }\n\n /**\n * Binds event listeners\n */\n bindEventListeners() {\n this.body.emitter.on('destroy', () => {\n clearTimeout(this.popupTimer);\n delete this.body.functions.getPointer;\n })\n }\n\n /**\n *\n * @param {Object} options\n */\n setOptions(options) {\n if (options !== undefined) {\n // extend all but the values in fields\n let fields = ['hideEdgesOnDrag', 'hideEdgesOnZoom', 'hideNodesOnDrag','keyboard','multiselect','selectable','selectConnectedEdges'];\n util.selectiveNotDeepExtend(fields, this.options, options);\n\n // merge the keyboard options in.\n util.mergeOptions(this.options, options, 'keyboard');\n\n if (options.tooltip) {\n util.extend(this.options.tooltip, options.tooltip);\n if (options.tooltip.color) {\n this.options.tooltip.color = util.parseColor(options.tooltip.color);\n }\n }\n }\n\n this.navigationHandler.setOptions(this.options);\n }\n\n\n /**\n * Get the pointer location from a touch location\n * @param {{x: number, y: number}} touch\n * @return {{x: number, y: number}} pointer\n * @private\n */\n getPointer(touch) {\n return {\n x: touch.x - util.getAbsoluteLeft(this.canvas.frame.canvas),\n y: touch.y - util.getAbsoluteTop(this.canvas.frame.canvas)\n };\n }\n\n\n /**\n * On start of a touch gesture, store the pointer\n * @param {Event} event The event\n * @private\n */\n onTouch(event) {\n if (new Date().valueOf() - this.touchTime > 50) {\n this.drag.pointer = this.getPointer(event.center);\n this.drag.pinched = false;\n this.pinch.scale = this.body.view.scale;\n // to avoid double fireing of this event because we have two hammer instances. (on canvas and on frame)\n this.touchTime = new Date().valueOf();\n }\n }\n\n\n /**\n * handle tap/click event: select/unselect a node\n * @param {Event} event\n * @private\n */\n onTap(event) {\n let pointer = this.getPointer(event.center);\n let multiselect = this.selectionHandler.options.multiselect &&\n (event.changedPointers[0].ctrlKey || event.changedPointers[0].metaKey);\n\n this.checkSelectionChanges(pointer, event, multiselect);\n this.selectionHandler._generateClickEvent('click', event, pointer);\n }\n\n\n /**\n * handle doubletap event\n * @param {Event} event\n * @private\n */\n onDoubleTap(event) {\n let pointer = this.getPointer(event.center);\n this.selectionHandler._generateClickEvent('doubleClick', event, pointer);\n }\n\n\n /**\n * handle long tap event: multi select nodes\n * @param {Event} event\n * @private\n */\n onHold(event) {\n let pointer = this.getPointer(event.center);\n let multiselect = this.selectionHandler.options.multiselect;\n\n this.checkSelectionChanges(pointer, event, multiselect);\n\n this.selectionHandler._generateClickEvent('click', event, pointer);\n this.selectionHandler._generateClickEvent('hold', event, pointer);\n }\n\n\n /**\n * handle the release of the screen\n *\n * @param {Event} event\n * @private\n */\n onRelease(event) {\n if (new Date().valueOf() - this.touchTime > 10) {\n let pointer = this.getPointer(event.center);\n this.selectionHandler._generateClickEvent('release', event, pointer);\n // to avoid double fireing of this event because we have two hammer instances. (on canvas and on frame)\n this.touchTime = new Date().valueOf();\n }\n }\n\n /**\n *\n * @param {Event} event\n */\n onContext(event) {\n let pointer = this.getPointer({x:event.clientX, y:event.clientY});\n this.selectionHandler._generateClickEvent('oncontext', event, pointer);\n }\n\n\n /**\n * Select and deselect nodes depending current selection change.\n *\n * For changing nodes, select/deselect events are fired.\n *\n * NOTE: For a given edge, if one connecting node is deselected and with the same\n * click the other node is selected, no events for the edge will fire.\n * It was selected and it will remain selected.\n *\n * TODO: This is all SelectionHandler calls; the method should be moved to there.\n *\n * @param {{x: number, y: number}} pointer\n * @param {Event} event\n * @param {boolean} [add=false]\n */\n checkSelectionChanges(pointer, event, add = false) {\n let previousSelection = this.selectionHandler.getSelection();\n let selected = false;\n if (add === true) {\n selected = this.selectionHandler.selectAdditionalOnPoint(pointer);\n }\n else {\n selected = this.selectionHandler.selectOnPoint(pointer);\n }\n let currentSelection = this.selectionHandler.getSelection();\n\n // See NOTE in method comment for the reason to do it like this\n let deselectedItems = this._determineDifference(previousSelection, currentSelection);\n let selectedItems = this._determineDifference(currentSelection , previousSelection);\n\n if (deselectedItems.edges.length > 0) {\n this.selectionHandler._generateClickEvent('deselectEdge', event, pointer, previousSelection);\n selected = true;\n }\n\n if (deselectedItems.nodes.length > 0) {\n this.selectionHandler._generateClickEvent('deselectNode', event, pointer, previousSelection);\n selected = true;\n }\n\n if (selectedItems.nodes.length > 0) {\n this.selectionHandler._generateClickEvent('selectNode', event, pointer);\n selected = true;\n }\n\n if (selectedItems.edges.length > 0) {\n this.selectionHandler._generateClickEvent('selectEdge', event, pointer);\n selected = true;\n }\n\n // fire the select event if anything has been selected or deselected\n if (selected === true) { // select or unselect\n this.selectionHandler._generateClickEvent('select', event, pointer);\n }\n }\n\n\n /**\n * Remove all node and edge id's from the first set that are present in the second one.\n *\n * @param {{nodes: Array., edges: Array.}} firstSet\n * @param {{nodes: Array., edges: Array.}} secondSet\n * @returns {{nodes: Array., edges: Array.}}\n * @private\n */\n _determineDifference(firstSet, secondSet) {\n let arrayDiff = function(firstArr, secondArr) {\n let result = [];\n\n for (let i = 0; i < firstArr.length; i++) {\n let value = firstArr[i];\n if (secondArr.indexOf(value) === -1) {\n result.push(value);\n }\n }\n\n return result;\n };\n\n return {\n nodes: arrayDiff(firstSet.nodes, secondSet.nodes),\n edges: arrayDiff(firstSet.edges, secondSet.edges)\n };\n }\n\n\n /**\n * This function is called by onDragStart.\n * It is separated out because we can then overload it for the datamanipulation system.\n *\n * @param {Event} event\n * @private\n */\n onDragStart(event) {\n //in case the touch event was triggered on an external div, do the initial touch now.\n if (this.drag.pointer === undefined) {\n this.onTouch(event);\n }\n\n // note: drag.pointer is set in onTouch to get the initial touch location\n let node = this.selectionHandler.getNodeAt(this.drag.pointer);\n\n this.drag.dragging = true;\n this.drag.selection = [];\n this.drag.translation = util.extend({},this.body.view.translation); // copy the object\n this.drag.nodeId = undefined;\n\n if (node !== undefined && this.options.dragNodes === true) {\n this.drag.nodeId = node.id;\n // select the clicked node if not yet selected\n if (node.isSelected() === false) {\n this.selectionHandler.unselectAll();\n this.selectionHandler.selectObject(node);\n }\n\n // after select to contain the node\n this.selectionHandler._generateClickEvent('dragStart', event, this.drag.pointer);\n\n let selection = this.selectionHandler.selectionObj.nodes;\n // create an array with the selected nodes and their original location and status\n for (let nodeId in selection) {\n if (selection.hasOwnProperty(nodeId)) {\n let object = selection[nodeId];\n let s = {\n id: object.id,\n node: object,\n\n // store original x, y, xFixed and yFixed, make the node temporarily Fixed\n x: object.x,\n y: object.y,\n xFixed: object.options.fixed.x,\n yFixed: object.options.fixed.y\n };\n\n object.options.fixed.x = true;\n object.options.fixed.y = true;\n\n this.drag.selection.push(s);\n }\n }\n }\n else {\n // fallback if no node is selected and thus the view is dragged.\n this.selectionHandler._generateClickEvent('dragStart', event, this.drag.pointer, undefined, true);\n }\n }\n\n\n /**\n * handle drag event\n * @param {Event} event\n * @private\n */\n onDrag(event) {\n if (this.drag.pinched === true) {\n return;\n }\n\n // remove the focus on node if it is focussed on by the focusOnNode\n this.body.emitter.emit('unlockNode');\n\n let pointer = this.getPointer(event.center);\n\n let selection = this.drag.selection;\n if (selection && selection.length && this.options.dragNodes === true) {\n this.selectionHandler._generateClickEvent('dragging', event, pointer);\n\n // calculate delta's and new location\n let deltaX = pointer.x - this.drag.pointer.x;\n let deltaY = pointer.y - this.drag.pointer.y;\n\n // update position of all selected nodes\n selection.forEach((selection) => {\n let node = selection.node;\n // only move the node if it was not fixed initially\n if (selection.xFixed === false) {\n node.x = this.canvas._XconvertDOMtoCanvas(this.canvas._XconvertCanvasToDOM(selection.x) + deltaX);\n }\n // only move the node if it was not fixed initially\n if (selection.yFixed === false) {\n node.y = this.canvas._YconvertDOMtoCanvas(this.canvas._YconvertCanvasToDOM(selection.y) + deltaY);\n }\n });\n\n // start the simulation of the physics\n this.body.emitter.emit('startSimulation');\n }\n else {\n // move the network\n if (this.options.dragView === true) {\n this.selectionHandler._generateClickEvent('dragging', event, pointer, undefined, true);\n\n // if the drag was not started properly because the click started outside the network div, start it now.\n if (this.drag.pointer === undefined) {\n this.onDragStart(event);\n return;\n }\n let diffX = pointer.x - this.drag.pointer.x;\n let diffY = pointer.y - this.drag.pointer.y;\n\n this.body.view.translation = {x:this.drag.translation.x + diffX, y:this.drag.translation.y + diffY};\n this.body.emitter.emit('_requestRedraw');\n }\n }\n }\n\n\n /**\n * handle drag start event\n * @param {Event} event\n * @private\n */\n onDragEnd(event) {\n this.drag.dragging = false;\n let selection = this.drag.selection;\n if (selection && selection.length) {\n selection.forEach(function (s) {\n // restore original xFixed and yFixed\n s.node.options.fixed.x = s.xFixed;\n s.node.options.fixed.y = s.yFixed;\n });\n this.selectionHandler._generateClickEvent('dragEnd', event, this.getPointer(event.center));\n this.body.emitter.emit('startSimulation');\n }\n else {\n this.selectionHandler._generateClickEvent('dragEnd', event, this.getPointer(event.center), undefined, true);\n this.body.emitter.emit('_requestRedraw');\n }\n }\n\n\n\n /**\n * Handle pinch event\n * @param {Event} event The event\n * @private\n */\n onPinch(event) {\n let pointer = this.getPointer(event.center);\n\n this.drag.pinched = true;\n if (this.pinch['scale'] === undefined) {\n this.pinch.scale = 1;\n }\n\n // TODO: enabled moving while pinching?\n let scale = this.pinch.scale * event.scale;\n this.zoom(scale, pointer)\n }\n\n\n /**\n * Zoom the network in or out\n * @param {number} scale a number around 1, and between 0.01 and 10\n * @param {{x: number, y: number}} pointer Position on screen\n * @private\n */\n zoom(scale, pointer) {\n if (this.options.zoomView === true) {\n let scaleOld = this.body.view.scale;\n if (scale < 0.00001) {\n scale = 0.00001;\n }\n if (scale > 10) {\n scale = 10;\n }\n\n let preScaleDragPointer = undefined;\n if (this.drag !== undefined) {\n if (this.drag.dragging === true) {\n preScaleDragPointer = this.canvas.DOMtoCanvas(this.drag.pointer);\n }\n }\n // + this.canvas.frame.canvas.clientHeight / 2\n let translation = this.body.view.translation;\n\n let scaleFrac = scale / scaleOld;\n let tx = (1 - scaleFrac) * pointer.x + translation.x * scaleFrac;\n let ty = (1 - scaleFrac) * pointer.y + translation.y * scaleFrac;\n\n this.body.view.scale = scale;\n this.body.view.translation = {x:tx, y:ty};\n\n if (preScaleDragPointer != undefined) {\n let postScaleDragPointer = this.canvas.canvasToDOM(preScaleDragPointer);\n this.drag.pointer.x = postScaleDragPointer.x;\n this.drag.pointer.y = postScaleDragPointer.y;\n }\n\n this.body.emitter.emit('_requestRedraw');\n\n if (scaleOld < scale) {\n this.body.emitter.emit('zoom', {direction: '+', scale: this.body.view.scale, pointer: pointer});\n }\n else {\n this.body.emitter.emit('zoom', {direction: '-', scale: this.body.view.scale, pointer: pointer});\n }\n }\n }\n\n\n /**\n * Event handler for mouse wheel event, used to zoom the timeline\n * See http://adomas.org/javascript-mouse-wheel/\n * https://github.com/EightMedia/hammer.js/issues/256\n * @param {MouseEvent} event\n * @private\n */\n onMouseWheel(event) {\n if (this.options.zoomView === true) {\n // retrieve delta\n let delta = 0;\n if (event.wheelDelta) { /* IE/Opera. */\n delta = event.wheelDelta / 120;\n }\n else if (event.detail) { /* Mozilla case. */\n // In Mozilla, sign of delta is different than in IE.\n // Also, delta is multiple of 3.\n delta = -event.detail / 3;\n }\n\n // If delta is nonzero, handle it.\n // Basically, delta is now positive if wheel was scrolled up,\n // and negative, if wheel was scrolled down.\n if (delta !== 0) {\n\n // calculate the new scale\n let scale = this.body.view.scale;\n let zoom = delta * (this.options.zoomSpeed / 10);\n if (delta < 0) {\n zoom = zoom / (1 - zoom);\n }\n scale *= (1 + zoom);\n\n // calculate the pointer location\n let pointer = this.getPointer({x: event.clientX, y: event.clientY});\n\n // apply the new scale\n this.zoom(scale, pointer);\n }\n\n // Prevent default actions caused by mouse wheel.\n event.preventDefault();\n }\n }\n\n\n /**\n * Mouse move handler for checking whether the title moves over a node with a title.\n * @param {Event} event\n * @private\n */\n onMouseMove(event) {\n let pointer = this.getPointer({x:event.clientX, y:event.clientY});\n let popupVisible = false;\n\n // check if the previously selected node is still selected\n if (this.popup !== undefined) {\n if (this.popup.hidden === false) {\n this._checkHidePopup(pointer);\n }\n\n // if the popup was not hidden above\n if (this.popup.hidden === false) {\n popupVisible = true;\n this.popup.setPosition(pointer.x + 3, pointer.y - 5);\n this.popup.show();\n }\n }\n\n // if we bind the keyboard to the div, we have to highlight it to use it. This highlights it on mouse over.\n if (this.options.keyboard.bindToWindow === false && this.options.keyboard.enabled === true) {\n this.canvas.frame.focus();\n }\n\n // start a timeout that will check if the mouse is positioned above an element\n if (popupVisible === false) {\n if (this.popupTimer !== undefined) {\n clearInterval(this.popupTimer); // stop any running calculationTimer\n this.popupTimer = undefined;\n }\n if (!this.drag.dragging) {\n this.popupTimer = setTimeout(() => this._checkShowPopup(pointer), this.options.tooltipDelay);\n }\n }\n\n // adding hover highlights\n if (this.options.hover === true) {\n this.selectionHandler.hoverObject(event, pointer);\n }\n }\n\n\n\n /**\n * Check if there is an element on the given position in the network\n * (a node or edge). If so, and if this element has a title,\n * show a popup window with its title.\n *\n * @param {{x:number, y:number}} pointer\n * @private\n */\n _checkShowPopup(pointer) {\n let x = this.canvas._XconvertDOMtoCanvas(pointer.x);\n let y = this.canvas._YconvertDOMtoCanvas(pointer.y);\n let pointerObj = {\n left: x,\n top: y,\n right: x,\n bottom: y\n };\n\n let previousPopupObjId = this.popupObj === undefined ? undefined : this.popupObj.id;\n let nodeUnderCursor = false;\n let popupType = 'node';\n\n // check if a node is under the cursor.\n if (this.popupObj === undefined) {\n // search the nodes for overlap, select the top one in case of multiple nodes\n let nodeIndices = this.body.nodeIndices;\n let nodes = this.body.nodes;\n let node;\n let overlappingNodes = [];\n for (let i = 0; i < nodeIndices.length; i++) {\n node = nodes[nodeIndices[i]];\n if (node.isOverlappingWith(pointerObj) === true) {\n nodeUnderCursor = true;\n if (node.getTitle() !== undefined) {\n overlappingNodes.push(nodeIndices[i]);\n }\n }\n }\n\n if (overlappingNodes.length > 0) {\n // if there are overlapping nodes, select the last one, this is the one which is drawn on top of the others\n this.popupObj = nodes[overlappingNodes[overlappingNodes.length - 1]];\n // if you hover over a node, the title of the edge is not supposed to be shown.\n nodeUnderCursor = true;\n }\n }\n\n if (this.popupObj === undefined && nodeUnderCursor === false) {\n // search the edges for overlap\n let edgeIndices = this.body.edgeIndices;\n let edges = this.body.edges;\n let edge;\n let overlappingEdges = [];\n for (let i = 0; i < edgeIndices.length; i++) {\n edge = edges[edgeIndices[i]];\n if (edge.isOverlappingWith(pointerObj) === true) {\n if (edge.connected === true && edge.getTitle() !== undefined) {\n overlappingEdges.push(edgeIndices[i]);\n }\n }\n }\n\n if (overlappingEdges.length > 0) {\n this.popupObj = edges[overlappingEdges[overlappingEdges.length - 1]];\n popupType = 'edge';\n }\n }\n\n if (this.popupObj !== undefined) {\n // show popup message window\n if (this.popupObj.id !== previousPopupObjId) {\n if (this.popup === undefined) {\n this.popup = new Popup(this.canvas.frame);\n }\n\n this.popup.popupTargetType = popupType;\n this.popup.popupTargetId = this.popupObj.id;\n\n // adjust a small offset such that the mouse cursor is located in the\n // bottom left location of the popup, and you can easily move over the\n // popup area\n this.popup.setPosition(pointer.x + 3, pointer.y - 5);\n this.popup.setText(this.popupObj.getTitle());\n this.popup.show();\n this.body.emitter.emit('showPopup',this.popupObj.id);\n }\n }\n else {\n if (this.popup !== undefined) {\n this.popup.hide();\n this.body.emitter.emit('hidePopup');\n }\n }\n }\n\n\n /**\n * Check if the popup must be hidden, which is the case when the mouse is no\n * longer hovering on the object\n * @param {{x:number, y:number}} pointer\n * @private\n */\n _checkHidePopup(pointer) {\n let pointerObj = this.selectionHandler._pointerToPositionObject(pointer);\n\n let stillOnObj = false;\n if (this.popup.popupTargetType === 'node') {\n if (this.body.nodes[this.popup.popupTargetId] !== undefined) {\n stillOnObj = this.body.nodes[this.popup.popupTargetId].isOverlappingWith(pointerObj);\n\n // if the mouse is still one the node, we have to check if it is not also on one that is drawn on top of it.\n // we initially only check stillOnObj because this is much faster.\n if (stillOnObj === true) {\n let overNode = this.selectionHandler.getNodeAt(pointer);\n stillOnObj = overNode === undefined ? false : overNode.id === this.popup.popupTargetId;\n }\n }\n }\n else {\n if (this.selectionHandler.getNodeAt(pointer) === undefined) {\n if (this.body.edges[this.popup.popupTargetId] !== undefined) {\n stillOnObj = this.body.edges[this.popup.popupTargetId].isOverlappingWith(pointerObj);\n }\n }\n }\n\n\n if (stillOnObj === false) {\n this.popupObj = undefined;\n this.popup.hide();\n this.body.emitter.emit('hidePopup');\n }\n }\n}\n\nexport default InteractionHandler;\n","import Node from './components/Node';\nimport Edge from './components/Edge';\n\nimport util from 'vis-util';\n\n/**\n * The handler for selections\n */\nclass SelectionHandler {\n /**\n * @param {Object} body\n * @param {Canvas} canvas\n */\n constructor(body, canvas) {\n this.body = body;\n this.canvas = canvas;\n this.selectionObj = { nodes: [], edges: [] };\n this.hoverObj = { nodes: {}, edges: {} };\n\n this.options = {};\n this.defaultOptions = {\n multiselect: false,\n selectable: true,\n selectConnectedEdges: true,\n hoverConnectedEdges: true\n };\n util.extend(this.options, this.defaultOptions);\n\n this.body.emitter.on(\"_dataChanged\", () => {\n this.updateSelection()\n });\n }\n\n\n /**\n *\n * @param {Object} [options]\n */\n setOptions(options) {\n if (options !== undefined) {\n let fields = ['multiselect', 'hoverConnectedEdges', 'selectable', 'selectConnectedEdges'];\n util.selectiveDeepExtend(fields, this.options, options);\n }\n }\n\n\n /**\n * handles the selection part of the tap;\n *\n * @param {{x: number, y: number}} pointer\n * @returns {boolean}\n */\n selectOnPoint(pointer) {\n let selected = false;\n if (this.options.selectable === true) {\n let obj = this.getNodeAt(pointer) || this.getEdgeAt(pointer);\n\n // unselect after getting the objects in order to restore width and height.\n this.unselectAll();\n\n if (obj !== undefined) {\n selected = this.selectObject(obj);\n }\n this.body.emitter.emit(\"_requestRedraw\");\n }\n return selected;\n }\n\n /**\n *\n * @param {{x: number, y: number}} pointer\n * @returns {boolean}\n */\n selectAdditionalOnPoint(pointer) {\n let selectionChanged = false;\n if (this.options.selectable === true) {\n let obj = this.getNodeAt(pointer) || this.getEdgeAt(pointer);\n\n if (obj !== undefined) {\n selectionChanged = true;\n if (obj.isSelected() === true) {\n this.deselectObject(obj);\n }\n else {\n this.selectObject(obj);\n }\n\n this.body.emitter.emit(\"_requestRedraw\");\n }\n }\n return selectionChanged;\n }\n\n\n /**\n * Create an object containing the standard fields for an event.\n *\n * @param {Event} event\n * @param {{x: number, y: number}} pointer Object with the x and y screen coordinates of the mouse\n * @returns {{}}\n * @private\n */\n _initBaseEvent(event, pointer) {\n let properties = {};\n\n properties['pointer'] = {\n DOM: { x: pointer.x, y: pointer.y },\n canvas: this.canvas.DOMtoCanvas(pointer)\n };\n properties['event'] = event;\n\n return properties;\n }\n\n\n /**\n * Generate an event which the user can catch.\n *\n * This adds some extra data to the event with respect to cursor position and\n * selected nodes and edges.\n *\n * @param {string} eventType Name of event to send\n * @param {Event} event\n * @param {{x: number, y: number}} pointer Object with the x and y screen coordinates of the mouse\n * @param {Object|undefined} oldSelection If present, selection state before event occured\n * @param {boolean|undefined} [emptySelection=false] Indicate if selection data should be passed\n */\n _generateClickEvent(eventType, event, pointer, oldSelection, emptySelection = false) {\n let properties = this._initBaseEvent(event, pointer);\n\n if (emptySelection === true) {\n properties.nodes = [];\n properties.edges = [];\n }\n else {\n let tmp = this.getSelection();\n properties.nodes = tmp.nodes;\n properties.edges = tmp.edges;\n }\n\n if (oldSelection !== undefined) {\n properties['previousSelection'] = oldSelection;\n }\n\n if (eventType == 'click') {\n // For the time being, restrict this functionality to\n // just the click event.\n properties.items = this.getClickedItems(pointer);\n }\n\n if (event.controlEdge !== undefined) {\n properties.controlEdge = event.controlEdge;\n }\n\n this.body.emitter.emit(eventType, properties);\n }\n\n /**\n *\n * @param {Object} obj\n * @param {boolean} [highlightEdges=this.options.selectConnectedEdges]\n * @returns {boolean}\n */\n selectObject(obj, highlightEdges = this.options.selectConnectedEdges) {\n if (obj !== undefined) {\n if (obj instanceof Node) {\n if (highlightEdges === true) {\n this._selectConnectedEdges(obj);\n }\n }\n obj.select();\n this._addToSelection(obj);\n return true;\n }\n return false;\n }\n\n /**\n *\n * @param {Object} obj\n */\n deselectObject(obj) {\n if (obj.isSelected() === true) {\n obj.selected = false;\n this._removeFromSelection(obj);\n }\n }\n\n\n\n /**\n * retrieve all nodes overlapping with given object\n * @param {Object} object An object with parameters left, top, right, bottom\n * @return {number[]} An array with id's of the overlapping nodes\n * @private\n */\n _getAllNodesOverlappingWith(object) {\n let overlappingNodes = [];\n let nodes = this.body.nodes;\n for (let i = 0; i < this.body.nodeIndices.length; i++) {\n let nodeId = this.body.nodeIndices[i];\n if (nodes[nodeId].isOverlappingWith(object)) {\n overlappingNodes.push(nodeId);\n }\n }\n return overlappingNodes;\n }\n\n\n /**\n * Return a position object in canvasspace from a single point in screenspace\n *\n * @param {{x: number, y: number}} pointer\n * @returns {{left: number, top: number, right: number, bottom: number}}\n * @private\n */\n _pointerToPositionObject(pointer) {\n let canvasPos = this.canvas.DOMtoCanvas(pointer);\n return {\n left: canvasPos.x - 1,\n top: canvasPos.y + 1,\n right: canvasPos.x + 1,\n bottom: canvasPos.y - 1\n };\n }\n\n\n /**\n * Get the top node at the passed point (like a click)\n *\n * @param {{x: number, y: number}} pointer\n * @param {boolean} [returnNode=true]\n * @return {Node | undefined} node\n */\n getNodeAt(pointer, returnNode = true) {\n // we first check if this is an navigation controls element\n let positionObject = this._pointerToPositionObject(pointer);\n let overlappingNodes = this._getAllNodesOverlappingWith(positionObject);\n // if there are overlapping nodes, select the last one, this is the\n // one which is drawn on top of the others\n if (overlappingNodes.length > 0) {\n if (returnNode === true) {\n return this.body.nodes[overlappingNodes[overlappingNodes.length - 1]];\n }\n else {\n return overlappingNodes[overlappingNodes.length - 1];\n }\n }\n else {\n return undefined;\n }\n }\n\n\n /**\n * retrieve all edges overlapping with given object, selector is around center\n * @param {Object} object An object with parameters left, top, right, bottom\n * @param {number[]} overlappingEdges An array with id's of the overlapping nodes\n * @private\n */\n _getEdgesOverlappingWith(object, overlappingEdges) {\n let edges = this.body.edges;\n for (let i = 0; i < this.body.edgeIndices.length; i++) {\n let edgeId = this.body.edgeIndices[i];\n if (edges[edgeId].isOverlappingWith(object)) {\n overlappingEdges.push(edgeId);\n }\n }\n }\n\n\n /**\n * retrieve all nodes overlapping with given object\n * @param {Object} object An object with parameters left, top, right, bottom\n * @return {number[]} An array with id's of the overlapping nodes\n * @private\n */\n _getAllEdgesOverlappingWith(object) {\n let overlappingEdges = [];\n this._getEdgesOverlappingWith(object, overlappingEdges);\n return overlappingEdges;\n }\n\n\n /**\n * Get the edges nearest to the passed point (like a click)\n *\n * @param {{x: number, y: number}} pointer\n * @param {boolean} [returnEdge=true]\n * @return {Edge | undefined} node\n */\n getEdgeAt(pointer, returnEdge = true) {\n // Iterate over edges, pick closest within 10\n var canvasPos = this.canvas.DOMtoCanvas(pointer);\n var mindist = 10;\n var overlappingEdge = null;\n var edges = this.body.edges;\n for (var i = 0; i < this.body.edgeIndices.length; i++) {\n var edgeId = this.body.edgeIndices[i];\n var edge = edges[edgeId];\n if (edge.connected) {\n var xFrom = edge.from.x;\n var yFrom = edge.from.y;\n var xTo = edge.to.x;\n var yTo = edge.to.y;\n var dist = edge.edgeType.getDistanceToEdge(xFrom, yFrom, xTo, yTo, canvasPos.x, canvasPos.y);\n if (dist < mindist) {\n overlappingEdge = edgeId;\n mindist = dist;\n }\n }\n }\n if (overlappingEdge !== null) {\n if (returnEdge === true) {\n return this.body.edges[overlappingEdge];\n }\n else {\n return overlappingEdge;\n }\n }\n else {\n return undefined;\n }\n }\n\n\n /**\n * Add object to the selection array.\n *\n * @param {Object} obj\n * @private\n */\n _addToSelection(obj) {\n if (obj instanceof Node) {\n this.selectionObj.nodes[obj.id] = obj;\n }\n else {\n this.selectionObj.edges[obj.id] = obj;\n }\n }\n\n /**\n * Add object to the selection array.\n *\n * @param {Object} obj\n * @private\n */\n _addToHover(obj) {\n if (obj instanceof Node) {\n this.hoverObj.nodes[obj.id] = obj;\n }\n else {\n this.hoverObj.edges[obj.id] = obj;\n }\n }\n\n\n /**\n * Remove a single option from selection.\n *\n * @param {Object} obj\n * @private\n */\n _removeFromSelection(obj) {\n if (obj instanceof Node) {\n delete this.selectionObj.nodes[obj.id];\n this._unselectConnectedEdges(obj);\n }\n else {\n delete this.selectionObj.edges[obj.id];\n }\n }\n\n /**\n * Unselect all. The selectionObj is useful for this.\n */\n unselectAll() {\n for (let nodeId in this.selectionObj.nodes) {\n if (this.selectionObj.nodes.hasOwnProperty(nodeId)) {\n this.selectionObj.nodes[nodeId].unselect();\n }\n }\n for (let edgeId in this.selectionObj.edges) {\n if (this.selectionObj.edges.hasOwnProperty(edgeId)) {\n this.selectionObj.edges[edgeId].unselect();\n }\n }\n\n this.selectionObj = { nodes: {}, edges: {} };\n }\n\n\n /**\n * return the number of selected nodes\n *\n * @returns {number}\n * @private\n */\n _getSelectedNodeCount() {\n let count = 0;\n for (let nodeId in this.selectionObj.nodes) {\n if (this.selectionObj.nodes.hasOwnProperty(nodeId)) {\n count += 1;\n }\n }\n return count;\n }\n\n /**\n * return the selected node\n *\n * @returns {number}\n * @private\n */\n _getSelectedNode() {\n for (let nodeId in this.selectionObj.nodes) {\n if (this.selectionObj.nodes.hasOwnProperty(nodeId)) {\n return this.selectionObj.nodes[nodeId];\n }\n }\n return undefined;\n }\n\n /**\n * return the selected edge\n *\n * @returns {number}\n * @private\n */\n _getSelectedEdge() {\n for (let edgeId in this.selectionObj.edges) {\n if (this.selectionObj.edges.hasOwnProperty(edgeId)) {\n return this.selectionObj.edges[edgeId];\n }\n }\n return undefined;\n }\n\n\n /**\n * return the number of selected edges\n *\n * @returns {number}\n * @private\n */\n _getSelectedEdgeCount() {\n let count = 0;\n for (let edgeId in this.selectionObj.edges) {\n if (this.selectionObj.edges.hasOwnProperty(edgeId)) {\n count += 1;\n }\n }\n return count;\n }\n\n\n /**\n * return the number of selected objects.\n *\n * @returns {number}\n * @private\n */\n _getSelectedObjectCount() {\n let count = 0;\n for (let nodeId in this.selectionObj.nodes) {\n if (this.selectionObj.nodes.hasOwnProperty(nodeId)) {\n count += 1;\n }\n }\n for (let edgeId in this.selectionObj.edges) {\n if (this.selectionObj.edges.hasOwnProperty(edgeId)) {\n count += 1;\n }\n }\n return count;\n }\n\n /**\n * Check if anything is selected\n *\n * @returns {boolean}\n * @private\n */\n _selectionIsEmpty() {\n for (let nodeId in this.selectionObj.nodes) {\n if (this.selectionObj.nodes.hasOwnProperty(nodeId)) {\n return false;\n }\n }\n for (let edgeId in this.selectionObj.edges) {\n if (this.selectionObj.edges.hasOwnProperty(edgeId)) {\n return false;\n }\n }\n return true;\n }\n\n\n /**\n * check if one of the selected nodes is a cluster.\n *\n * @returns {boolean}\n * @private\n */\n _clusterInSelection() {\n for (let nodeId in this.selectionObj.nodes) {\n if (this.selectionObj.nodes.hasOwnProperty(nodeId)) {\n if (this.selectionObj.nodes[nodeId].clusterSize > 1) {\n return true;\n }\n }\n }\n return false;\n }\n\n /**\n * select the edges connected to the node that is being selected\n *\n * @param {Node} node\n * @private\n */\n _selectConnectedEdges(node) {\n for (let i = 0; i < node.edges.length; i++) {\n let edge = node.edges[i];\n edge.select();\n this._addToSelection(edge);\n }\n }\n\n /**\n * select the edges connected to the node that is being selected\n *\n * @param {Node} node\n * @private\n */\n _hoverConnectedEdges(node) {\n for (let i = 0; i < node.edges.length; i++) {\n let edge = node.edges[i];\n edge.hover = true;\n this._addToHover(edge);\n }\n }\n\n\n /**\n * unselect the edges connected to the node that is being selected\n *\n * @param {Node} node\n * @private\n */\n _unselectConnectedEdges(node) {\n for (let i = 0; i < node.edges.length; i++) {\n let edge = node.edges[i];\n edge.unselect();\n this._removeFromSelection(edge);\n }\n }\n\n\n /**\n * Remove the highlight from a node or edge, in response to mouse movement\n *\n * @param {Event} event\n * @param {{x: number, y: number}} pointer object with the x and y screen coordinates of the mouse\n * @param {Node|vis.Edge} object\n * @private\n */\n emitBlurEvent(event, pointer, object) {\n let properties = this._initBaseEvent(event, pointer);\n\n if (object.hover === true) {\n object.hover = false;\n if (object instanceof Node) {\n properties.node = object.id;\n this.body.emitter.emit(\"blurNode\", properties);\n }\n else {\n properties.edge = object.id;\n this.body.emitter.emit(\"blurEdge\", properties);\n }\n }\n }\n\n\n /**\n * Create the highlight for a node or edge, in response to mouse movement\n *\n * @param {Event} event\n * @param {{x: number, y: number}} pointer object with the x and y screen coordinates of the mouse\n * @param {Node|vis.Edge} object\n * @returns {boolean} hoverChanged\n * @private\n */\n emitHoverEvent(event, pointer, object) {\n let properties = this._initBaseEvent(event, pointer);\n let hoverChanged = false;\n\n if (object.hover === false) {\n object.hover = true;\n this._addToHover(object);\n hoverChanged = true;\n if (object instanceof Node) {\n properties.node = object.id;\n this.body.emitter.emit(\"hoverNode\", properties);\n }\n else {\n properties.edge = object.id;\n this.body.emitter.emit(\"hoverEdge\", properties);\n }\n }\n\n return hoverChanged;\n }\n\n\n /**\n * Perform actions in response to a mouse movement.\n *\n * @param {Event} event\n * @param {{x: number, y: number}} pointer | object with the x and y screen coordinates of the mouse\n */\n hoverObject(event, pointer) {\n let object = this.getNodeAt(pointer);\n if (object === undefined) {\n object = this.getEdgeAt(pointer);\n }\n\n let hoverChanged = false;\n // remove all node hover highlights\n for (let nodeId in this.hoverObj.nodes) {\n if (this.hoverObj.nodes.hasOwnProperty(nodeId)) {\n if (object === undefined || (object instanceof Node && object.id != nodeId) || object instanceof Edge) {\n this.emitBlurEvent(event, pointer, this.hoverObj.nodes[nodeId]);\n delete this.hoverObj.nodes[nodeId];\n hoverChanged = true;\n }\n }\n }\n\n // removing all edge hover highlights\n for (let edgeId in this.hoverObj.edges) {\n if (this.hoverObj.edges.hasOwnProperty(edgeId)) {\n // if the hover has been changed here it means that the node has been hovered over or off\n // we then do not use the emitBlurEvent method here.\n if (hoverChanged === true) {\n this.hoverObj.edges[edgeId].hover = false;\n delete this.hoverObj.edges[edgeId];\n }\n // if the blur remains the same and the object is undefined (mouse off) or another\n // edge has been hovered, or another node has been hovered we blur the edge.\n else if (object === undefined || (object instanceof Edge && object.id != edgeId) || (object instanceof Node && !object.hover)) {\n this.emitBlurEvent(event, pointer, this.hoverObj.edges[edgeId]);\n delete this.hoverObj.edges[edgeId];\n hoverChanged = true;\n }\n }\n }\n\n if (object !== undefined) {\n const hoveredEdgesCount = Object.keys(this.hoverObj.edges).length;\n const hoveredNodesCount = Object.keys(this.hoverObj.nodes).length;\n const newOnlyHoveredEdge = object instanceof Edge && hoveredEdgesCount === 0 && hoveredNodesCount === 0;\n const newOnlyHoveredNode = object instanceof Node && hoveredEdgesCount === 0 && hoveredNodesCount === 0;\n\n if (hoverChanged || newOnlyHoveredEdge || newOnlyHoveredNode) {\n hoverChanged = this.emitHoverEvent(event, pointer, object);\n }\n\n if (object instanceof Node && this.options.hoverConnectedEdges === true) {\n this._hoverConnectedEdges(object);\n }\n }\n\n if (hoverChanged === true) {\n this.body.emitter.emit('_requestRedraw');\n }\n }\n\n\n\n\n /**\n *\n * retrieve the currently selected objects\n * @return {{nodes: Array., edges: Array.}} selection\n */\n getSelection() {\n let nodeIds = this.getSelectedNodes();\n let edgeIds = this.getSelectedEdges();\n return { nodes: nodeIds, edges: edgeIds };\n }\n\n /**\n *\n * retrieve the currently selected nodes\n * @return {string[]} selection An array with the ids of the\n * selected nodes.\n */\n getSelectedNodes() {\n let idArray = [];\n if (this.options.selectable === true) {\n for (let nodeId in this.selectionObj.nodes) {\n if (this.selectionObj.nodes.hasOwnProperty(nodeId)) {\n idArray.push(this.selectionObj.nodes[nodeId].id);\n }\n }\n }\n return idArray;\n }\n\n /**\n *\n * retrieve the currently selected edges\n * @return {Array} selection An array with the ids of the\n * selected nodes.\n */\n getSelectedEdges() {\n let idArray = [];\n if (this.options.selectable === true) {\n for (let edgeId in this.selectionObj.edges) {\n if (this.selectionObj.edges.hasOwnProperty(edgeId)) {\n idArray.push(this.selectionObj.edges[edgeId].id);\n }\n }\n }\n return idArray;\n }\n\n /**\n * Updates the current selection\n * @param {{nodes: Array., edges: Array.}} selection\n * @param {Object} options Options\n */\n setSelection(selection, options = {}) {\n let i, id;\n\n if (!selection || (!selection.nodes && !selection.edges))\n throw 'Selection must be an object with nodes and/or edges properties';\n // first unselect any selected node, if option is true or undefined\n if (options.unselectAll || options.unselectAll === undefined) {\n this.unselectAll();\n }\n if (selection.nodes) {\n for (i = 0; i < selection.nodes.length; i++) {\n id = selection.nodes[i];\n\n let node = this.body.nodes[id];\n if (!node) {\n throw new RangeError('Node with id \"' + id + '\" not found');\n }\n // don't select edges with it\n this.selectObject(node, options.highlightEdges);\n }\n }\n\n if (selection.edges) {\n for (i = 0; i < selection.edges.length; i++) {\n id = selection.edges[i];\n\n let edge = this.body.edges[id];\n if (!edge) {\n throw new RangeError('Edge with id \"' + id + '\" not found');\n }\n this.selectObject(edge);\n }\n }\n this.body.emitter.emit('_requestRedraw');\n }\n\n\n /**\n * select zero or more nodes with the option to highlight edges\n * @param {number[] | string[]} selection An array with the ids of the\n * selected nodes.\n * @param {boolean} [highlightEdges]\n */\n selectNodes(selection, highlightEdges = true) {\n if (!selection || (selection.length === undefined))\n throw 'Selection must be an array with ids';\n\n this.setSelection({ nodes: selection }, { highlightEdges: highlightEdges });\n }\n\n\n /**\n * select zero or more edges\n * @param {number[] | string[]} selection An array with the ids of the\n * selected nodes.\n */\n selectEdges(selection) {\n if (!selection || (selection.length === undefined))\n throw 'Selection must be an array with ids';\n\n this.setSelection({ edges: selection });\n }\n\n /**\n * Validate the selection: remove ids of nodes which no longer exist\n * @private\n */\n updateSelection() {\n for (let nodeId in this.selectionObj.nodes) {\n if (this.selectionObj.nodes.hasOwnProperty(nodeId)) {\n if (!this.body.nodes.hasOwnProperty(nodeId)) {\n delete this.selectionObj.nodes[nodeId];\n }\n }\n }\n for (let edgeId in this.selectionObj.edges) {\n if (this.selectionObj.edges.hasOwnProperty(edgeId)) {\n if (!this.body.edges.hasOwnProperty(edgeId)) {\n delete this.selectionObj.edges[edgeId];\n }\n }\n }\n }\n\n\n /**\n * Determine all the visual elements clicked which are on the given point.\n *\n * All elements are returned; this includes nodes, edges and their labels.\n * The order returned is from highest to lowest, i.e. element 0 of the return\n * value is the topmost item clicked on.\n *\n * The return value consists of an array of the following possible elements:\n *\n * - `{nodeId:number}` - node with given id clicked on\n * - `{nodeId:number, labelId:0}` - label of node with given id clicked on\n * - `{edgeId:number}` - edge with given id clicked on\n * - `{edge:number, labelId:0}` - label of edge with given id clicked on\n *\n * ## NOTES\n *\n * - Currently, there is only one label associated with a node or an edge,\n * but this is expected to change somewhere in the future.\n * - Since there is no z-indexing yet, it is not really possible to set the nodes and\n * edges in the correct order. For the time being, nodes come first.\n *\n * @param {point} pointer mouse position in screen coordinates\n * @returns {Array.}\n * @private\n */\n getClickedItems(pointer) {\n let point = this.canvas.DOMtoCanvas(pointer);\n var items = [];\n\n // Note reverse order; we want the topmost clicked items to be first in the array\n // Also note that selected nodes are disregarded here; these normally display on top\n let nodeIndices = this.body.nodeIndices;\n let nodes = this.body.nodes;\n for (let i = nodeIndices.length - 1; i >= 0; i--) {\n let node = nodes[nodeIndices[i]];\n let ret = node.getItemsOnPoint(point);\n items.push.apply(items, ret); // Append the return value to the running list.\n }\n\n let edgeIndices = this.body.edgeIndices;\n let edges = this.body.edges;\n for (let i = edgeIndices.length - 1; i >= 0; i--) {\n let edge = edges[edgeIndices[i]];\n let ret = edge.getItemsOnPoint(point);\n items.push.apply(items, ret); // Append the return value to the running list.\n }\n\n return items;\n }\n}\n\nexport default SelectionHandler;\n","/****\n * The MIT License\n *\n * Copyright (c) 2015 Marco Ziccardi\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n *\n ****/\n(function (global, factory) {\n if (typeof define === 'function' && define.amd) {\n define('timsort', ['exports'], factory);\n } else if (typeof exports !== 'undefined') {\n factory(exports);\n } else {\n var mod = {\n exports: {}\n };\n factory(mod.exports);\n global.timsort = mod.exports;\n }\n})(this, function (exports) {\n 'use strict';\n\n exports.__esModule = true;\n exports.sort = sort;\n\n function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError('Cannot call a class as a function');\n }\n }\n\n var DEFAULT_MIN_MERGE = 32;\n\n var DEFAULT_MIN_GALLOPING = 7;\n\n var DEFAULT_TMP_STORAGE_LENGTH = 256;\n\n var POWERS_OF_TEN = [1e0, 1e1, 1e2, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9];\n\n function log10(x) {\n if (x < 1e5) {\n if (x < 1e2) {\n return x < 1e1 ? 0 : 1;\n }\n\n if (x < 1e4) {\n return x < 1e3 ? 2 : 3;\n }\n\n return 4;\n }\n\n if (x < 1e7) {\n return x < 1e6 ? 5 : 6;\n }\n\n if (x < 1e9) {\n return x < 1e8 ? 7 : 8;\n }\n\n return 9;\n }\n\n function alphabeticalCompare(a, b) {\n if (a === b) {\n return 0;\n }\n\n if (~ ~a === a && ~ ~b === b) {\n if (a === 0 || b === 0) {\n return a < b ? -1 : 1;\n }\n\n if (a < 0 || b < 0) {\n if (b >= 0) {\n return -1;\n }\n\n if (a >= 0) {\n return 1;\n }\n\n a = -a;\n b = -b;\n }\n\n var al = log10(a);\n var bl = log10(b);\n\n var t = 0;\n\n if (al < bl) {\n a *= POWERS_OF_TEN[bl - al - 1];\n b /= 10;\n t = -1;\n } else if (al > bl) {\n b *= POWERS_OF_TEN[al - bl - 1];\n a /= 10;\n t = 1;\n }\n\n if (a === b) {\n return t;\n }\n\n return a < b ? -1 : 1;\n }\n\n var aStr = String(a);\n var bStr = String(b);\n\n if (aStr === bStr) {\n return 0;\n }\n\n return aStr < bStr ? -1 : 1;\n }\n\n function minRunLength(n) {\n var r = 0;\n\n while (n >= DEFAULT_MIN_MERGE) {\n r |= n & 1;\n n >>= 1;\n }\n\n return n + r;\n }\n\n function makeAscendingRun(array, lo, hi, compare) {\n var runHi = lo + 1;\n\n if (runHi === hi) {\n return 1;\n }\n\n if (compare(array[runHi++], array[lo]) < 0) {\n while (runHi < hi && compare(array[runHi], array[runHi - 1]) < 0) {\n runHi++;\n }\n\n reverseRun(array, lo, runHi);\n } else {\n while (runHi < hi && compare(array[runHi], array[runHi - 1]) >= 0) {\n runHi++;\n }\n }\n\n return runHi - lo;\n }\n\n function reverseRun(array, lo, hi) {\n hi--;\n\n while (lo < hi) {\n var t = array[lo];\n array[lo++] = array[hi];\n array[hi--] = t;\n }\n }\n\n function binaryInsertionSort(array, lo, hi, start, compare) {\n if (start === lo) {\n start++;\n }\n\n for (; start < hi; start++) {\n var pivot = array[start];\n\n var left = lo;\n var right = start;\n\n while (left < right) {\n var mid = left + right >>> 1;\n\n if (compare(pivot, array[mid]) < 0) {\n right = mid;\n } else {\n left = mid + 1;\n }\n }\n\n var n = start - left;\n\n switch (n) {\n case 3:\n array[left + 3] = array[left + 2];\n\n case 2:\n array[left + 2] = array[left + 1];\n\n case 1:\n array[left + 1] = array[left];\n break;\n default:\n while (n > 0) {\n array[left + n] = array[left + n - 1];\n n--;\n }\n }\n\n array[left] = pivot;\n }\n }\n\n function gallopLeft(value, array, start, length, hint, compare) {\n var lastOffset = 0;\n var maxOffset = 0;\n var offset = 1;\n\n if (compare(value, array[start + hint]) > 0) {\n maxOffset = length - hint;\n\n while (offset < maxOffset && compare(value, array[start + hint + offset]) > 0) {\n lastOffset = offset;\n offset = (offset << 1) + 1;\n\n if (offset <= 0) {\n offset = maxOffset;\n }\n }\n\n if (offset > maxOffset) {\n offset = maxOffset;\n }\n\n lastOffset += hint;\n offset += hint;\n } else {\n maxOffset = hint + 1;\n while (offset < maxOffset && compare(value, array[start + hint - offset]) <= 0) {\n lastOffset = offset;\n offset = (offset << 1) + 1;\n\n if (offset <= 0) {\n offset = maxOffset;\n }\n }\n if (offset > maxOffset) {\n offset = maxOffset;\n }\n\n var tmp = lastOffset;\n lastOffset = hint - offset;\n offset = hint - tmp;\n }\n\n lastOffset++;\n while (lastOffset < offset) {\n var m = lastOffset + (offset - lastOffset >>> 1);\n\n if (compare(value, array[start + m]) > 0) {\n lastOffset = m + 1;\n } else {\n offset = m;\n }\n }\n return offset;\n }\n\n function gallopRight(value, array, start, length, hint, compare) {\n var lastOffset = 0;\n var maxOffset = 0;\n var offset = 1;\n\n if (compare(value, array[start + hint]) < 0) {\n maxOffset = hint + 1;\n\n while (offset < maxOffset && compare(value, array[start + hint - offset]) < 0) {\n lastOffset = offset;\n offset = (offset << 1) + 1;\n\n if (offset <= 0) {\n offset = maxOffset;\n }\n }\n\n if (offset > maxOffset) {\n offset = maxOffset;\n }\n\n var tmp = lastOffset;\n lastOffset = hint - offset;\n offset = hint - tmp;\n } else {\n maxOffset = length - hint;\n\n while (offset < maxOffset && compare(value, array[start + hint + offset]) >= 0) {\n lastOffset = offset;\n offset = (offset << 1) + 1;\n\n if (offset <= 0) {\n offset = maxOffset;\n }\n }\n\n if (offset > maxOffset) {\n offset = maxOffset;\n }\n\n lastOffset += hint;\n offset += hint;\n }\n\n lastOffset++;\n\n while (lastOffset < offset) {\n var m = lastOffset + (offset - lastOffset >>> 1);\n\n if (compare(value, array[start + m]) < 0) {\n offset = m;\n } else {\n lastOffset = m + 1;\n }\n }\n\n return offset;\n }\n\n var TimSort = (function () {\n function TimSort(array, compare) {\n _classCallCheck(this, TimSort);\n\n this.array = null;\n this.compare = null;\n this.minGallop = DEFAULT_MIN_GALLOPING;\n this.length = 0;\n this.tmpStorageLength = DEFAULT_TMP_STORAGE_LENGTH;\n this.stackLength = 0;\n this.runStart = null;\n this.runLength = null;\n this.stackSize = 0;\n\n this.array = array;\n this.compare = compare;\n\n this.length = array.length;\n\n if (this.length < 2 * DEFAULT_TMP_STORAGE_LENGTH) {\n this.tmpStorageLength = this.length >>> 1;\n }\n\n this.tmp = new Array(this.tmpStorageLength);\n\n this.stackLength = this.length < 120 ? 5 : this.length < 1542 ? 10 : this.length < 119151 ? 19 : 40;\n\n this.runStart = new Array(this.stackLength);\n this.runLength = new Array(this.stackLength);\n }\n\n TimSort.prototype.pushRun = function pushRun(runStart, runLength) {\n this.runStart[this.stackSize] = runStart;\n this.runLength[this.stackSize] = runLength;\n this.stackSize += 1;\n };\n\n TimSort.prototype.mergeRuns = function mergeRuns() {\n while (this.stackSize > 1) {\n var n = this.stackSize - 2;\n\n if (n >= 1 && this.runLength[n - 1] <= this.runLength[n] + this.runLength[n + 1] || n >= 2 && this.runLength[n - 2] <= this.runLength[n] + this.runLength[n - 1]) {\n\n if (this.runLength[n - 1] < this.runLength[n + 1]) {\n n--;\n }\n } else if (this.runLength[n] > this.runLength[n + 1]) {\n break;\n }\n this.mergeAt(n);\n }\n };\n\n TimSort.prototype.forceMergeRuns = function forceMergeRuns() {\n while (this.stackSize > 1) {\n var n = this.stackSize - 2;\n\n if (n > 0 && this.runLength[n - 1] < this.runLength[n + 1]) {\n n--;\n }\n\n this.mergeAt(n);\n }\n };\n\n TimSort.prototype.mergeAt = function mergeAt(i) {\n var compare = this.compare;\n var array = this.array;\n\n var start1 = this.runStart[i];\n var length1 = this.runLength[i];\n var start2 = this.runStart[i + 1];\n var length2 = this.runLength[i + 1];\n\n this.runLength[i] = length1 + length2;\n\n if (i === this.stackSize - 3) {\n this.runStart[i + 1] = this.runStart[i + 2];\n this.runLength[i + 1] = this.runLength[i + 2];\n }\n\n this.stackSize--;\n\n var k = gallopRight(array[start2], array, start1, length1, 0, compare);\n start1 += k;\n length1 -= k;\n\n if (length1 === 0) {\n return;\n }\n\n length2 = gallopLeft(array[start1 + length1 - 1], array, start2, length2, length2 - 1, compare);\n\n if (length2 === 0) {\n return;\n }\n\n if (length1 <= length2) {\n this.mergeLow(start1, length1, start2, length2);\n } else {\n this.mergeHigh(start1, length1, start2, length2);\n }\n };\n\n TimSort.prototype.mergeLow = function mergeLow(start1, length1, start2, length2) {\n\n var compare = this.compare;\n var array = this.array;\n var tmp = this.tmp;\n var i = 0;\n\n for (i = 0; i < length1; i++) {\n tmp[i] = array[start1 + i];\n }\n\n var cursor1 = 0;\n var cursor2 = start2;\n var dest = start1;\n\n array[dest++] = array[cursor2++];\n\n if (--length2 === 0) {\n for (i = 0; i < length1; i++) {\n array[dest + i] = tmp[cursor1 + i];\n }\n return;\n }\n\n if (length1 === 1) {\n for (i = 0; i < length2; i++) {\n array[dest + i] = array[cursor2 + i];\n }\n array[dest + length2] = tmp[cursor1];\n return;\n }\n\n var minGallop = this.minGallop;\n\n while (true) {\n var count1 = 0;\n var count2 = 0;\n var exit = false;\n\n do {\n if (compare(array[cursor2], tmp[cursor1]) < 0) {\n array[dest++] = array[cursor2++];\n count2++;\n count1 = 0;\n\n if (--length2 === 0) {\n exit = true;\n break;\n }\n } else {\n array[dest++] = tmp[cursor1++];\n count1++;\n count2 = 0;\n if (--length1 === 1) {\n exit = true;\n break;\n }\n }\n } while ((count1 | count2) < minGallop);\n\n if (exit) {\n break;\n }\n\n do {\n count1 = gallopRight(array[cursor2], tmp, cursor1, length1, 0, compare);\n\n if (count1 !== 0) {\n for (i = 0; i < count1; i++) {\n array[dest + i] = tmp[cursor1 + i];\n }\n\n dest += count1;\n cursor1 += count1;\n length1 -= count1;\n if (length1 <= 1) {\n exit = true;\n break;\n }\n }\n\n array[dest++] = array[cursor2++];\n\n if (--length2 === 0) {\n exit = true;\n break;\n }\n\n count2 = gallopLeft(tmp[cursor1], array, cursor2, length2, 0, compare);\n\n if (count2 !== 0) {\n for (i = 0; i < count2; i++) {\n array[dest + i] = array[cursor2 + i];\n }\n\n dest += count2;\n cursor2 += count2;\n length2 -= count2;\n\n if (length2 === 0) {\n exit = true;\n break;\n }\n }\n array[dest++] = tmp[cursor1++];\n\n if (--length1 === 1) {\n exit = true;\n break;\n }\n\n minGallop--;\n } while (count1 >= DEFAULT_MIN_GALLOPING || count2 >= DEFAULT_MIN_GALLOPING);\n\n if (exit) {\n break;\n }\n\n if (minGallop < 0) {\n minGallop = 0;\n }\n\n minGallop += 2;\n }\n\n this.minGallop = minGallop;\n\n if (minGallop < 1) {\n this.minGallop = 1;\n }\n\n if (length1 === 1) {\n for (i = 0; i < length2; i++) {\n array[dest + i] = array[cursor2 + i];\n }\n array[dest + length2] = tmp[cursor1];\n } else if (length1 === 0) {\n throw new Error('mergeLow preconditions were not respected');\n } else {\n for (i = 0; i < length1; i++) {\n array[dest + i] = tmp[cursor1 + i];\n }\n }\n };\n\n TimSort.prototype.mergeHigh = function mergeHigh(start1, length1, start2, length2) {\n var compare = this.compare;\n var array = this.array;\n var tmp = this.tmp;\n var i = 0;\n\n for (i = 0; i < length2; i++) {\n tmp[i] = array[start2 + i];\n }\n\n var cursor1 = start1 + length1 - 1;\n var cursor2 = length2 - 1;\n var dest = start2 + length2 - 1;\n var customCursor = 0;\n var customDest = 0;\n\n array[dest--] = array[cursor1--];\n\n if (--length1 === 0) {\n customCursor = dest - (length2 - 1);\n\n for (i = 0; i < length2; i++) {\n array[customCursor + i] = tmp[i];\n }\n\n return;\n }\n\n if (length2 === 1) {\n dest -= length1;\n cursor1 -= length1;\n customDest = dest + 1;\n customCursor = cursor1 + 1;\n\n for (i = length1 - 1; i >= 0; i--) {\n array[customDest + i] = array[customCursor + i];\n }\n\n array[dest] = tmp[cursor2];\n return;\n }\n\n var minGallop = this.minGallop;\n\n while (true) {\n var count1 = 0;\n var count2 = 0;\n var exit = false;\n\n do {\n if (compare(tmp[cursor2], array[cursor1]) < 0) {\n array[dest--] = array[cursor1--];\n count1++;\n count2 = 0;\n if (--length1 === 0) {\n exit = true;\n break;\n }\n } else {\n array[dest--] = tmp[cursor2--];\n count2++;\n count1 = 0;\n if (--length2 === 1) {\n exit = true;\n break;\n }\n }\n } while ((count1 | count2) < minGallop);\n\n if (exit) {\n break;\n }\n\n do {\n count1 = length1 - gallopRight(tmp[cursor2], array, start1, length1, length1 - 1, compare);\n\n if (count1 !== 0) {\n dest -= count1;\n cursor1 -= count1;\n length1 -= count1;\n customDest = dest + 1;\n customCursor = cursor1 + 1;\n\n for (i = count1 - 1; i >= 0; i--) {\n array[customDest + i] = array[customCursor + i];\n }\n\n if (length1 === 0) {\n exit = true;\n break;\n }\n }\n\n array[dest--] = tmp[cursor2--];\n\n if (--length2 === 1) {\n exit = true;\n break;\n }\n\n count2 = length2 - gallopLeft(array[cursor1], tmp, 0, length2, length2 - 1, compare);\n\n if (count2 !== 0) {\n dest -= count2;\n cursor2 -= count2;\n length2 -= count2;\n customDest = dest + 1;\n customCursor = cursor2 + 1;\n\n for (i = 0; i < count2; i++) {\n array[customDest + i] = tmp[customCursor + i];\n }\n\n if (length2 <= 1) {\n exit = true;\n break;\n }\n }\n\n array[dest--] = array[cursor1--];\n\n if (--length1 === 0) {\n exit = true;\n break;\n }\n\n minGallop--;\n } while (count1 >= DEFAULT_MIN_GALLOPING || count2 >= DEFAULT_MIN_GALLOPING);\n\n if (exit) {\n break;\n }\n\n if (minGallop < 0) {\n minGallop = 0;\n }\n\n minGallop += 2;\n }\n\n this.minGallop = minGallop;\n\n if (minGallop < 1) {\n this.minGallop = 1;\n }\n\n if (length2 === 1) {\n dest -= length1;\n cursor1 -= length1;\n customDest = dest + 1;\n customCursor = cursor1 + 1;\n\n for (i = length1 - 1; i >= 0; i--) {\n array[customDest + i] = array[customCursor + i];\n }\n\n array[dest] = tmp[cursor2];\n } else if (length2 === 0) {\n throw new Error('mergeHigh preconditions were not respected');\n } else {\n customCursor = dest - (length2 - 1);\n for (i = 0; i < length2; i++) {\n array[customCursor + i] = tmp[i];\n }\n }\n };\n\n return TimSort;\n })();\n\n function sort(array, compare, lo, hi) {\n if (!Array.isArray(array)) {\n throw new TypeError('Can only sort arrays');\n }\n\n if (!compare) {\n compare = alphabeticalCompare;\n } else if (typeof compare !== 'function') {\n hi = lo;\n lo = compare;\n compare = alphabeticalCompare;\n }\n\n if (!lo) {\n lo = 0;\n }\n if (!hi) {\n hi = array.length;\n }\n\n var remaining = hi - lo;\n\n if (remaining < 2) {\n return;\n }\n\n var runLength = 0;\n\n if (remaining < DEFAULT_MIN_MERGE) {\n runLength = makeAscendingRun(array, lo, hi, compare);\n binaryInsertionSort(array, lo, hi, lo + runLength, compare);\n return;\n }\n\n var ts = new TimSort(array, compare);\n\n var minRun = minRunLength(remaining);\n\n do {\n runLength = makeAscendingRun(array, lo, hi, compare);\n if (runLength < minRun) {\n var force = remaining;\n if (force > minRun) {\n force = minRun;\n }\n\n binaryInsertionSort(array, lo, lo + force, lo + runLength, compare);\n runLength = force;\n }\n\n ts.pushRun(lo, runLength);\n ts.mergeRuns();\n\n remaining -= runLength;\n lo += runLength;\n } while (remaining !== 0);\n\n ts.forceMergeRuns();\n }\n});\n","module.exports = require('./build/timsort.js');","/**\n * Helper classes for LayoutEngine.\n *\n * Strategy pattern for usage of direction methods for hierarchical layouts.\n */\nimport TimSort from 'timsort';\n\n\n/**\n * Interface definition for direction strategy classes.\n *\n * This class describes the interface for the Strategy\n * pattern classes used to differentiate horizontal and vertical\n * direction of hierarchical results.\n *\n * For a given direction, one coordinate will be 'fixed', meaning that it is\n * determined by level.\n * The other coordinate is 'unfixed', meaning that the nodes on a given level\n * can still move along that coordinate. So:\n *\n * - `vertical` layout: `x` unfixed, `y` fixed per level\n * - `horizontal` layout: `x` fixed per level, `y` unfixed\n *\n * The local methods are stubs and should be regarded as abstract.\n * Derived classes **must** implement all the methods themselves.\n *\n * @private\n */\nclass DirectionInterface {\n /** @ignore **/\n abstract() {\n throw new Error(\"Can't instantiate abstract class!\");\n }\n\n /**\n * This is a dummy call which is used to suppress the jsdoc errors of type:\n *\n * \"'param' is assigned a value but never used\"\n *\n * @ignore\n **/\n fake_use() {\n // Do nothing special\n }\n\n /**\n * Type to use to translate dynamic curves to, in the case of hierarchical layout.\n * Dynamic curves do not work for these.\n *\n * The value should be perpendicular to the actual direction of the layout.\n *\n * @return {string} Direction, either 'vertical' or 'horizontal'\n */\n curveType() { return this.abstract(); }\n\n\n /**\n * Return the value of the coordinate that is not fixed for this direction.\n *\n * @param {Node} node The node to read\n * @return {number} Value of the unfixed coordinate\n */\n getPosition(node) { this.fake_use(node); return this.abstract(); }\n\n\n /**\n * Set the value of the coordinate that is not fixed for this direction.\n *\n * @param {Node} node The node to adjust\n * @param {number} position\n * @param {number} [level] if specified, the hierarchy level that this node should be fixed to\n */\n setPosition(node, position, level = undefined) { this.fake_use(node, position, level); this.abstract(); }\n\n\n /**\n * Get the width of a tree.\n *\n * A `tree` here is a subset of nodes within the network which are not connected to other nodes,\n * only among themselves. In essence, it is a sub-network.\n *\n * @param {number} index The index number of a tree\n * @return {number} the width of a tree in the view coordinates\n */\n getTreeSize(index) { this.fake_use(index); return this.abstract(); }\n\n\n /**\n * Sort array of nodes on the unfixed coordinates.\n *\n * **Note:** chrome has non-stable sorting implementation, which\n * has a tendency to change the order of the array items,\n * even if the custom sort function returns 0.\n *\n * For this reason, an external sort implementation is used,\n * which has the added benefit of being faster than the standard\n * platforms implementation. This has been verified on `node.js`,\n * `firefox` and `chrome` (all linux).\n *\n * @param {Array.} nodeArray array of nodes to sort\n */\n sort(nodeArray) { this.fake_use(nodeArray); this.abstract(); }\n\n\n /**\n * Assign the fixed coordinate of the node to the given level\n *\n * @param {Node} node The node to adjust\n * @param {number} level The level to fix to\n */\n fix(node, level) { this.fake_use(node, level); this.abstract(); }\n\n\n /**\n * Add an offset to the unfixed coordinate of the given node. \n *\n * @param {NodeId} nodeId Id of the node to adjust\n * @param {number} diff Offset to add to the unfixed coordinate\n */\n shift(nodeId, diff) { this.fake_use(nodeId, diff); this.abstract(); }\n}\n\n\n/**\n * Vertical Strategy\n *\n * Coordinate `y` is fixed on levels, coordinate `x` is unfixed.\n *\n * @extends DirectionInterface\n * @private\n */\nclass VerticalStrategy extends DirectionInterface {\n /**\n * Constructor\n *\n * @param {Object} layout reference to the parent LayoutEngine instance.\n */\n constructor(layout) {\n super();\n this.layout = layout;\n }\n\n /** @inheritdoc */\n curveType() {\n return 'horizontal';\n }\n\n /** @inheritdoc */\n getPosition(node) {\n return node.x;\n }\n\n /** @inheritdoc */\n setPosition(node, position, level = undefined) {\n if (level !== undefined) {\n this.layout.hierarchical.addToOrdering(node, level);\n }\n node.x = position;\n }\n\n /** @inheritdoc */\n getTreeSize(index) {\n let res = this.layout.hierarchical.getTreeSize(this.layout.body.nodes, index);\n return {min: res.min_x, max: res.max_x};\n }\n\n /** @inheritdoc */\n sort(nodeArray) {\n TimSort.sort(nodeArray, function(a, b) {\n return a.x - b.x;\n });\n }\n\n /** @inheritdoc */\n fix(node, level) {\n node.y = this.layout.options.hierarchical.levelSeparation * level;\n node.options.fixed.y = true;\n }\n\n /** @inheritdoc */\n shift(nodeId, diff) {\n this.layout.body.nodes[nodeId].x += diff;\n }\n}\n\n\n/**\n * Horizontal Strategy\n *\n * Coordinate `x` is fixed on levels, coordinate `y` is unfixed.\n *\n * @extends DirectionInterface\n * @private\n */\nclass HorizontalStrategy extends DirectionInterface {\n /**\n * Constructor\n *\n * @param {Object} layout reference to the parent LayoutEngine instance.\n */\n constructor(layout) {\n super();\n this.layout = layout;\n }\n\n /** @inheritdoc */\n curveType() {\n return 'vertical';\n }\n\n /** @inheritdoc */\n getPosition(node) {\n return node.y;\n }\n\n /** @inheritdoc */\n setPosition(node, position, level = undefined) {\n if (level !== undefined) {\n this.layout.hierarchical.addToOrdering(node, level);\n }\n node.y = position;\n }\n\n /** @inheritdoc */\n getTreeSize(index) {\n let res = this.layout.hierarchical.getTreeSize(this.layout.body.nodes, index);\n return {min: res.min_y, max: res.max_y};\n }\n\n /** @inheritdoc */\n sort(nodeArray) {\n TimSort.sort(nodeArray, function(a, b) {\n return a.y - b.y;\n });\n }\n\n /** @inheritdoc */\n fix(node, level) {\n node.x = this.layout.options.hierarchical.levelSeparation * level;\n node.options.fixed.x = true;\n }\n\n /** @inheritdoc */\n shift(nodeId, diff) {\n this.layout.body.nodes[nodeId].y += diff;\n }\n}\n\n\nexport {HorizontalStrategy, VerticalStrategy};\n","/**\n * There's a mix-up with terms in the code. Following are the formal definitions:\n *\n * tree - a strict hierarchical network, i.e. every node has at most one parent\n * forest - a collection of trees. These distinct trees are thus not connected.\n *\n * So:\n * - in a network that is not a tree, there exist nodes with multiple parents.\n * - a network consisting of unconnected sub-networks, of which at least one\n * is not a tree, is not a forest.\n *\n * In the code, the definitions are:\n *\n * tree - any disconnected sub-network, strict hierarchical or not.\n * forest - a bunch of these sub-networks\n *\n * The difference between tree and not-tree is important in the code, notably within\n * to the block-shifting algorithm. The algorithm assumes formal trees and fails\n * for not-trees, often in a spectacular manner (search for 'exploding network' in the issues).\n *\n * In order to distinguish the definitions in the following code, the adjective 'formal' is\n * used. If 'formal' is absent, you must assume the non-formal definition.\n *\n * ----------------------------------------------------------------------------------\n * NOTES\n * =====\n *\n * A hierarchical layout is a different thing from a hierarchical network.\n * The layout is a way to arrange the nodes in the view; this can be done\n * on non-hierarchical networks as well. The converse is also possible.\n */\n'use strict';\nimport TimSort from 'timsort';\nimport util from 'vis-util';\nimport NetworkUtil from '../NetworkUtil';\nimport { HorizontalStrategy, VerticalStrategy } from './components/DirectionStrategy.js';\n\n\n/**\n * Container for derived data on current network, relating to hierarchy.\n *\n * @private\n */\nclass HierarchicalStatus {\n /**\n * @ignore\n */\n constructor() {\n this.childrenReference = {}; // child id's per node id\n this.parentReference = {}; // parent id's per node id\n this.trees = {}; // tree id per node id; i.e. to which tree does given node id belong\n\n this.distributionOrdering = {}; // The nodes per level, in the display order\n this.levels = {}; // hierarchy level per node id\n this.distributionIndex = {}; // The position of the node in the level sorting order, per node id.\n\n this.isTree = false; // True if current network is a formal tree \n this.treeIndex = -1; // Highest tree id in current network.\n }\n\n /**\n * Add the relation between given nodes to the current state.\n *\n * @param {Node.id} parentNodeId\n * @param {Node.id} childNodeId\n */\n addRelation(parentNodeId, childNodeId) {\n if (this.childrenReference[parentNodeId] === undefined) {\n this.childrenReference[parentNodeId] = [];\n }\n this.childrenReference[parentNodeId].push(childNodeId);\n\n if (this.parentReference[childNodeId] === undefined) {\n this.parentReference[childNodeId] = [];\n }\n this.parentReference[childNodeId].push(parentNodeId);\n }\n\n\n /**\n * Check if the current state is for a formal tree or formal forest.\n *\n * This is the case if every node has at most one parent.\n *\n * Pre: parentReference init'ed properly for current network\n */\n checkIfTree() {\n for (let i in this.parentReference) {\n if (this.parentReference[i].length > 1) {\n this.isTree = false;\n return;\n }\n }\n\n this.isTree = true;\n }\n\n\n /**\n * Return the number of separate trees in the current network.\n * @returns {number}\n */\n numTrees() {\n return (this.treeIndex + 1); // This assumes the indexes are assigned consecitively\n }\n\n\n /**\n * Assign a tree id to a node\n * @param {Node} node\n * @param {string|number} treeId\n */\n setTreeIndex(node, treeId) {\n if (treeId === undefined) return; // Don't bother\n\n if (this.trees[node.id] === undefined) {\n this.trees[node.id] = treeId;\n this.treeIndex = Math.max(treeId, this.treeIndex);\n }\n }\n\n\n /**\n * Ensure level for given id is defined.\n *\n * Sets level to zero for given node id if not already present\n *\n * @param {Node.id} nodeId\n */\n ensureLevel(nodeId) {\n if (this.levels[nodeId] === undefined) {\n this.levels[nodeId] = 0;\n }\n }\n\n\n /**\n * get the maximum level of a branch.\n *\n * TODO: Never entered; find a test case to test this!\n * @param {Node.id} nodeId\n * @returns {number}\n */\n getMaxLevel(nodeId) {\n let accumulator = {};\n\n let _getMaxLevel = (nodeId) => {\n if (accumulator[nodeId] !== undefined) {\n return accumulator[nodeId];\n }\n let level = this.levels[nodeId];\n if (this.childrenReference[nodeId]) {\n let children = this.childrenReference[nodeId];\n if (children.length > 0) {\n for (let i = 0; i < children.length; i++) {\n level = Math.max(level,_getMaxLevel(children[i]));\n }\n }\n }\n accumulator[nodeId] = level;\n return level;\n };\n\n return _getMaxLevel(nodeId);\n }\n\n\n /**\n *\n * @param {Node} nodeA\n * @param {Node} nodeB\n */\n levelDownstream(nodeA, nodeB) {\n if (this.levels[nodeB.id] === undefined) {\n // set initial level\n if (this.levels[nodeA.id] === undefined) {\n this.levels[nodeA.id] = 0;\n }\n // set level\n this.levels[nodeB.id] = this.levels[nodeA.id] + 1;\n }\n }\n\n\n /**\n * Small util method to set the minimum levels of the nodes to zero.\n *\n * @param {Array.} nodes\n */\n setMinLevelToZero(nodes) {\n let minLevel = 1e9;\n // get the minimum level\n for (let nodeId in nodes) {\n if (nodes.hasOwnProperty(nodeId)) {\n if (this.levels[nodeId] !== undefined) {\n minLevel = Math.min(this.levels[nodeId], minLevel);\n }\n }\n }\n\n // subtract the minimum from the set so we have a range starting from 0\n for (let nodeId in nodes) {\n if (nodes.hasOwnProperty(nodeId)) {\n if (this.levels[nodeId] !== undefined) {\n this.levels[nodeId] -= minLevel;\n }\n }\n }\n }\n\n\n /**\n * Get the min and max xy-coordinates of a given tree\n *\n * @param {Array.} nodes\n * @param {number} index\n * @returns {{min_x: number, max_x: number, min_y: number, max_y: number}}\n */\n getTreeSize(nodes, index) {\n let min_x = 1e9;\n let max_x = -1e9;\n let min_y = 1e9;\n let max_y = -1e9;\n\n for (let nodeId in this.trees) {\n if (this.trees.hasOwnProperty(nodeId)) {\n if (this.trees[nodeId] === index) {\n let node = nodes[nodeId];\n min_x = Math.min(node.x, min_x);\n max_x = Math.max(node.x, max_x);\n min_y = Math.min(node.y, min_y);\n max_y = Math.max(node.y, max_y);\n }\n }\n }\n\n return {\n min_x: min_x,\n max_x: max_x,\n min_y: min_y,\n max_y: max_y\n };\n }\n\n\n /**\n * Check if two nodes have the same parent(s)\n *\n * @param {Node} node1\n * @param {Node} node2\n * @return {boolean} true if the two nodes have a same ancestor node, false otherwise\n */\n hasSameParent(node1, node2) {\n let parents1 = this.parentReference[node1.id];\n let parents2 = this.parentReference[node2.id];\n if (parents1 === undefined || parents2 === undefined) {\n return false;\n }\n\n for (let i = 0; i < parents1.length; i++) {\n for (let j = 0; j < parents2.length; j++) {\n if (parents1[i] == parents2[j]) {\n return true;\n }\n }\n }\n return false;\n }\n\n\n /**\n * Check if two nodes are in the same tree.\n *\n * @param {Node} node1\n * @param {Node} node2\n * @return {Boolean} true if this is so, false otherwise\n */\n inSameSubNetwork(node1, node2) {\n return (this.trees[node1.id] === this.trees[node2.id]);\n }\n\n\n /**\n * Get a list of the distinct levels in the current network\n *\n * @returns {Array}\n */\n getLevels() {\n return Object.keys(this.distributionOrdering);\n }\n\n\n /**\n * Add a node to the ordering per level\n *\n * @param {Node} node\n * @param {number} level\n */\n addToOrdering(node, level) {\n if (this.distributionOrdering[level] === undefined) {\n this.distributionOrdering[level] = [];\n }\n\n var isPresent = false;\n var curLevel = this.distributionOrdering[level];\n for (var n in curLevel) {\n //if (curLevel[n].id === node.id) {\n if (curLevel[n] === node) {\n isPresent = true;\n break;\n }\n }\n\n if (!isPresent) {\n this.distributionOrdering[level].push(node);\n this.distributionIndex[node.id] = this.distributionOrdering[level].length - 1;\n }\n }\n}\n\n/**\n * The Layout Engine\n */\nclass LayoutEngine {\n /**\n * @param {Object} body\n */\n constructor(body) {\n this.body = body;\n\n this.initialRandomSeed = Math.round(Math.random() * 1000000);\n this.randomSeed = this.initialRandomSeed;\n this.setPhysics = false;\n this.options = {};\n this.optionsBackup = {physics:{}};\n\n this.defaultOptions = {\n randomSeed: undefined,\n improvedLayout: true,\n hierarchical: {\n enabled:false,\n levelSeparation: 150,\n nodeSpacing: 100,\n treeSpacing: 200,\n blockShifting: true,\n edgeMinimization: true,\n parentCentralization: true,\n direction: 'UD', // UD, DU, LR, RL\n sortMethod: 'hubsize' // hubsize, directed\n }\n };\n util.extend(this.options, this.defaultOptions);\n this.bindEventListeners();\n }\n\n /**\n * Binds event listeners\n */\n bindEventListeners() {\n this.body.emitter.on('_dataChanged', () => {\n this.setupHierarchicalLayout();\n });\n this.body.emitter.on('_dataLoaded', () => {\n this.layoutNetwork();\n });\n this.body.emitter.on('_resetHierarchicalLayout', () => {\n this.setupHierarchicalLayout();\n });\n this.body.emitter.on('_adjustEdgesForHierarchicalLayout', () => {\n if (this.options.hierarchical.enabled !== true) {\n return;\n }\n // get the type of static smooth curve in case it is required\n let type = this.direction.curveType();\n\n // force all edges into static smooth curves.\n this.body.emitter.emit('_forceDisableDynamicCurves', type, false);\n });\n }\n\n /**\n *\n * @param {Object} options\n * @param {Object} allOptions\n * @returns {Object}\n */\n setOptions(options, allOptions) {\n if (options !== undefined) {\n let hierarchical = this.options.hierarchical;\n let prevHierarchicalState = hierarchical.enabled;\n util.selectiveDeepExtend([\"randomSeed\", \"improvedLayout\"],this.options, options);\n util.mergeOptions(this.options, options, 'hierarchical');\n if (options.randomSeed !== undefined) {this.initialRandomSeed = options.randomSeed;}\n\n if (hierarchical.enabled === true) {\n if (prevHierarchicalState === true) {\n // refresh the overridden options for nodes and edges.\n this.body.emitter.emit('refresh', true);\n }\n\n // make sure the level separation is the right way up\n if (hierarchical.direction === 'RL' || hierarchical.direction === 'DU') {\n if (hierarchical.levelSeparation > 0) {\n hierarchical.levelSeparation *= -1;\n }\n }\n else {\n if (hierarchical.levelSeparation < 0) {\n hierarchical.levelSeparation *= -1;\n }\n }\n\n this.setDirectionStrategy();\n\n this.body.emitter.emit('_resetHierarchicalLayout');\n // because the hierarchical system needs it's own physics and smooth curve settings,\n // we adapt the other options if needed.\n return this.adaptAllOptionsForHierarchicalLayout(allOptions);\n }\n else {\n if (prevHierarchicalState === true) {\n // refresh the overridden options for nodes and edges.\n this.body.emitter.emit('refresh');\n return util.deepExtend(allOptions,this.optionsBackup);\n }\n }\n }\n return allOptions;\n }\n\n /**\n *\n * @param {Object} allOptions\n * @returns {Object}\n */\n adaptAllOptionsForHierarchicalLayout(allOptions) {\n if (this.options.hierarchical.enabled === true) {\n let backupPhysics = this.optionsBackup.physics;\n\n // set the physics\n if (allOptions.physics === undefined || allOptions.physics === true) {\n allOptions.physics = {\n enabled: backupPhysics.enabled === undefined ? true : backupPhysics.enabled,\n solver :'hierarchicalRepulsion'\n };\n backupPhysics.enabled = backupPhysics.enabled === undefined ? true : backupPhysics.enabled;\n backupPhysics.solver = backupPhysics.solver || 'barnesHut';\n }\n else if (typeof allOptions.physics === 'object') {\n backupPhysics.enabled = allOptions.physics.enabled === undefined ? true : allOptions.physics.enabled;\n backupPhysics.solver = allOptions.physics.solver || 'barnesHut';\n allOptions.physics.solver = 'hierarchicalRepulsion';\n }\n else if (allOptions.physics !== false) {\n backupPhysics.solver ='barnesHut';\n allOptions.physics = {solver:'hierarchicalRepulsion'};\n }\n\n // get the type of static smooth curve in case it is required\n let type = this.direction.curveType();\n\n // disable smooth curves if nothing is defined. If smooth curves have been turned on,\n // turn them into static smooth curves.\n if (allOptions.edges === undefined) {\n this.optionsBackup.edges = {smooth:{enabled:true, type:'dynamic'}};\n allOptions.edges = {smooth: false};\n }\n else if (allOptions.edges.smooth === undefined) {\n this.optionsBackup.edges = {smooth:{enabled:true, type:'dynamic'}};\n allOptions.edges.smooth = false;\n }\n else {\n if (typeof allOptions.edges.smooth === 'boolean') {\n this.optionsBackup.edges = {smooth:allOptions.edges.smooth};\n allOptions.edges.smooth = {enabled: allOptions.edges.smooth, type:type}\n }\n else {\n let smooth = allOptions.edges.smooth;\n\n // allow custom types except for dynamic\n if (smooth.type !== undefined && smooth.type !== 'dynamic') {\n type = smooth.type;\n }\n\n // TODO: this is options merging; see if the standard routines can be used here.\n this.optionsBackup.edges = {\n smooth : smooth.enabled === undefined ? true : smooth.enabled,\n type : smooth.type === undefined ? 'dynamic': smooth.type,\n roundness : smooth.roundness === undefined ? 0.5 : smooth.roundness,\n forceDirection: smooth.forceDirection === undefined ? false : smooth.forceDirection\n };\n\n\n // NOTE: Copying an object to self; this is basically setting defaults for undefined variables\n allOptions.edges.smooth = {\n enabled : smooth.enabled === undefined ? true : smooth.enabled,\n type : type,\n roundness : smooth.roundness === undefined ? 0.5 : smooth.roundness,\n forceDirection: smooth.forceDirection === undefined ? false: smooth.forceDirection\n }\n }\n }\n\n // Force all edges into static smooth curves.\n // Only applies to edges that do not use the global options for smooth.\n this.body.emitter.emit('_forceDisableDynamicCurves', type);\n }\n\n return allOptions;\n }\n\n /**\n *\n * @returns {number}\n */\n seededRandom() {\n let x = Math.sin(this.randomSeed++) * 10000;\n return x - Math.floor(x);\n }\n\n /**\n *\n * @param {Array.} nodesArray\n */\n positionInitially(nodesArray) {\n if (this.options.hierarchical.enabled !== true) {\n this.randomSeed = this.initialRandomSeed;\n let radius = nodesArray.length + 50;\n for (let i = 0; i < nodesArray.length; i++) {\n let node = nodesArray[i];\n let angle = 2 * Math.PI * this.seededRandom();\n if (node.x === undefined) {\n node.x = radius * Math.cos(angle);\n }\n if (node.y === undefined) {\n node.y = radius * Math.sin(angle);\n }\n }\n }\n }\n\n\n /**\n * Use Kamada Kawai to position nodes. This is quite a heavy algorithm so if there are a lot of nodes we\n * cluster them first to reduce the amount.\n */\n layoutNetwork() {\n if (this.options.hierarchical.enabled !== true && this.options.improvedLayout === true) {\n let indices = this.body.nodeIndices;\n\n // first check if we should Kamada Kawai to layout. The threshold is if less than half of the visible\n // nodes have predefined positions we use this.\n let positionDefined = 0;\n for (let i = 0; i < indices.length; i++) {\n let node = this.body.nodes[indices[i]];\n if (node.predefinedPosition === true) {\n positionDefined += 1;\n }\n }\n\n // if less than half of the nodes have a predefined position we continue\n if (positionDefined < 0.5 * indices.length) {\n let MAX_LEVELS = 10;\n let level = 0;\n let clusterThreshold = 150; // TODO add this to options\n\n //\n // Define the options for the hidden cluster nodes\n // These options don't propagate outside the clustering phase.\n //\n // Some options are explicitly disabled, because they may be set in group or default node options.\n // The clusters are never displayed, so most explicit settings here serve as performance optimizations.\n //\n // The explicit setting of 'shape' is to avoid `shape: 'image'`; images are not passed to the hidden\n // cluster nodes, leading to an exception on creation.\n //\n // All settings here are performance related, except when noted otherwise.\n //\n let clusterOptions = {\n clusterNodeProperties:{\n shape: 'ellipse', // Bugfix: avoid type 'image', no images supplied\n label: '', // avoid label handling\n group: '', // avoid group handling\n font: {multi: false}, // avoid font propagation\n },\n clusterEdgeProperties:{\n label: '', // avoid label handling\n font: {multi: false}, // avoid font propagation\n smooth: {\n enabled: false // avoid drawing penalty for complex edges\n }\n }\n };\n\n // if there are a lot of nodes, we cluster before we run the algorithm.\n // NOTE: this part fails to find clusters for large scale-free networks, which should\n // be easily clusterable.\n // TODO: examine why this is so\n if (indices.length > clusterThreshold) {\n let startLength = indices.length;\n while (indices.length > clusterThreshold && level <= MAX_LEVELS) {\n //console.time(\"clustering\")\n level += 1;\n let before = indices.length;\n // if there are many nodes we do a hubsize cluster\n if (level % 3 === 0) {\n this.body.modules.clustering.clusterBridges(clusterOptions);\n }\n else {\n this.body.modules.clustering.clusterOutliers(clusterOptions);\n }\n let after = indices.length;\n if (before == after && level % 3 !== 0) {\n this._declusterAll();\n this.body.emitter.emit(\"_layoutFailed\");\n console.info(\"This network could not be positioned by this version of the improved layout algorithm.\"\n + \" Please disable improvedLayout for better performance.\");\n return;\n }\n //console.timeEnd(\"clustering\")\n //console.log(before,level,after);\n }\n // increase the size of the edges\n this.body.modules.kamadaKawai.setOptions({springLength: Math.max(150, 2 * startLength)})\n }\n if (level > MAX_LEVELS){\n console.info(\"The clustering didn't succeed within the amount of interations allowed,\"\n + \" progressing with partial result.\");\n }\n\n // position the system for these nodes and edges\n this.body.modules.kamadaKawai.solve(indices, this.body.edgeIndices, true);\n\n // shift to center point\n this._shiftToCenter();\n\n // perturb the nodes a little bit to force the physics to kick in\n let offset = 70;\n for (let i = 0; i < indices.length; i++) {\n // Only perturb the nodes that aren't fixed\n let node = this.body.nodes[indices[i]];\n if (node.predefinedPosition === false) {\n node.x += (0.5 - this.seededRandom())*offset;\n node.y += (0.5 - this.seededRandom())*offset;\n }\n }\n\n // uncluster all clusters\n this._declusterAll();\n\n // reposition all bezier nodes.\n this.body.emitter.emit(\"_repositionBezierNodes\");\n }\n }\n }\n\n /**\n * Move all the nodes towards to the center so gravitational pull wil not move the nodes away from view\n * @private\n */\n _shiftToCenter() {\n let range = NetworkUtil.getRangeCore(this.body.nodes, this.body.nodeIndices);\n let center = NetworkUtil.findCenter(range);\n for (let i = 0; i < this.body.nodeIndices.length; i++) {\n let node = this.body.nodes[this.body.nodeIndices[i]];\n node.x -= center.x;\n node.y -= center.y;\n }\n }\n\n /**\n * Expands all clusters\n * @private\n */\n _declusterAll() {\n let clustersPresent = true;\n while (clustersPresent === true) {\n clustersPresent = false;\n for (let i = 0; i < this.body.nodeIndices.length; i++) {\n if (this.body.nodes[this.body.nodeIndices[i]].isCluster === true) {\n clustersPresent = true;\n this.body.modules.clustering.openCluster(this.body.nodeIndices[i], {}, false);\n }\n }\n if (clustersPresent === true) {\n this.body.emitter.emit('_dataChanged');\n }\n }\n }\n\n /**\n *\n * @returns {number|*}\n */\n getSeed() {\n return this.initialRandomSeed;\n }\n\n /**\n * This is the main function to layout the nodes in a hierarchical way.\n * It checks if the node details are supplied correctly\n *\n * @private\n */\n setupHierarchicalLayout() {\n if (this.options.hierarchical.enabled === true && this.body.nodeIndices.length > 0) {\n // get the size of the largest hubs and check if the user has defined a level for a node.\n let node, nodeId;\n let definedLevel = false;\n let undefinedLevel = false;\n this.lastNodeOnLevel = {};\n this.hierarchical = new HierarchicalStatus();\n\n for (nodeId in this.body.nodes) {\n if (this.body.nodes.hasOwnProperty(nodeId)) {\n node = this.body.nodes[nodeId];\n if (node.options.level !== undefined) {\n definedLevel = true;\n this.hierarchical.levels[nodeId] = node.options.level;\n }\n else {\n undefinedLevel = true;\n }\n }\n }\n\n // if the user defined some levels but not all, alert and run without hierarchical layout\n if (undefinedLevel === true && definedLevel === true) {\n throw new Error('To use the hierarchical layout, nodes require either no predefined levels'\n + ' or levels have to be defined for all nodes.');\n }\n else {\n // define levels if undefined by the users. Based on hubsize.\n if (undefinedLevel === true) {\n let sortMethod = this.options.hierarchical.sortMethod;\n if (sortMethod === 'hubsize') {\n this._determineLevelsByHubsize();\n }\n else if (sortMethod === 'directed') {\n this._determineLevelsDirected();\n }\n else if (sortMethod === 'custom') {\n this._determineLevelsCustomCallback();\n }\n }\n\n\n // fallback for cases where there are nodes but no edges\n for (let nodeId in this.body.nodes) {\n if (this.body.nodes.hasOwnProperty(nodeId)) {\n this.hierarchical.ensureLevel(nodeId);\n }\n }\n // check the distribution of the nodes per level.\n let distribution = this._getDistribution();\n\n // get the parent children relations.\n this._generateMap();\n\n // place the nodes on the canvas.\n this._placeNodesByHierarchy(distribution);\n\n // condense the whitespace.\n this._condenseHierarchy();\n\n // shift to center so gravity does not have to do much\n this._shiftToCenter();\n }\n }\n }\n\n /**\n * @private\n */\n _condenseHierarchy() {\n // Global var in this scope to define when the movement has stopped.\n let stillShifting = false;\n let branches = {};\n // first we have some methods to help shifting trees around.\n // the main method to shift the trees\n let shiftTrees = () => {\n let treeSizes = getTreeSizes();\n let shiftBy = 0;\n for (let i = 0; i < treeSizes.length - 1; i++) {\n let diff = treeSizes[i].max - treeSizes[i+1].min;\n shiftBy += diff + this.options.hierarchical.treeSpacing;\n shiftTree(i + 1, shiftBy);\n }\n };\n\n // shift a single tree by an offset\n let shiftTree = (index, offset) => {\n let trees = this.hierarchical.trees;\n\n for (let nodeId in trees) {\n if (trees.hasOwnProperty(nodeId)) {\n if (trees[nodeId] === index) {\n this.direction.shift(nodeId, offset);\n }\n }\n }\n };\n\n // get the width of all trees\n let getTreeSizes = () => {\n let treeWidths = [];\n for (let i = 0; i < this.hierarchical.numTrees(); i++) {\n treeWidths.push(this.direction.getTreeSize(i));\n }\n return treeWidths;\n };\n\n\n // get a map of all nodes in this branch\n let getBranchNodes = (source, map) => {\n if (map[source.id]) {\n return;\n }\n map[source.id] = true;\n if (this.hierarchical.childrenReference[source.id]) {\n let children = this.hierarchical.childrenReference[source.id];\n if (children.length > 0) {\n for (let i = 0; i < children.length; i++) {\n getBranchNodes(this.body.nodes[children[i]], map);\n }\n }\n }\n };\n\n // get a min max width as well as the maximum movement space it has on either sides\n // we use min max terminology because width and height can interchange depending on the direction of the layout\n let getBranchBoundary = (branchMap, maxLevel = 1e9) => {\n let minSpace = 1e9;\n let maxSpace = 1e9;\n let min = 1e9;\n let max = -1e9;\n for (let branchNode in branchMap) {\n if (branchMap.hasOwnProperty(branchNode)) {\n let node = this.body.nodes[branchNode];\n let level = this.hierarchical.levels[node.id];\n let position = this.direction.getPosition(node);\n\n // get the space around the node.\n let [minSpaceNode, maxSpaceNode] = this._getSpaceAroundNode(node,branchMap);\n minSpace = Math.min(minSpaceNode, minSpace);\n maxSpace = Math.min(maxSpaceNode, maxSpace);\n\n // the width is only relevant for the levels two nodes have in common. This is why we filter on this.\n if (level <= maxLevel) {\n min = Math.min(position, min);\n max = Math.max(position, max);\n }\n }\n }\n\n return [min, max, minSpace, maxSpace];\n }\n\n\n // check what the maximum level is these nodes have in common.\n let getCollisionLevel = (node1, node2) => {\n let maxLevel1 = this.hierarchical.getMaxLevel(node1.id);\n let maxLevel2 = this.hierarchical.getMaxLevel(node2.id);\n return Math.min(maxLevel1, maxLevel2);\n };\n\n\n /**\n * Condense elements. These can be nodes or branches depending on the callback.\n *\n * @param {function} callback\n * @param {Array.} levels\n * @param {*} centerParents\n */\n let shiftElementsCloser = (callback, levels, centerParents) => {\n let hier = this.hierarchical;\n\n for (let i = 0; i < levels.length; i++) {\n let level = levels[i];\n let levelNodes = hier.distributionOrdering[level];\n if (levelNodes.length > 1) {\n for (let j = 0; j < levelNodes.length - 1; j++) {\n let node1 = levelNodes[j];\n let node2 = levelNodes[j+1];\n\n // NOTE: logic maintained as it was; if nodes have same ancestor,\n // then of course they are in the same sub-network.\n if (hier.hasSameParent(node1, node2) && hier.inSameSubNetwork(node1, node2) ) {\n callback(node1, node2, centerParents);\n }\n }\n }\n }\n };\n\n\n // callback for shifting branches\n let branchShiftCallback = (node1, node2, centerParent = false) => {\n //window.CALLBACKS.push(() => {\n let pos1 = this.direction.getPosition(node1);\n let pos2 = this.direction.getPosition(node2);\n let diffAbs = Math.abs(pos2 - pos1);\n let nodeSpacing = this.options.hierarchical.nodeSpacing;\n //console.log(\"NOW CHECKING:\", node1.id, node2.id, diffAbs);\n if (diffAbs > nodeSpacing) {\n let branchNodes1 = {};\n let branchNodes2 = {};\n\n getBranchNodes(node1, branchNodes1);\n getBranchNodes(node2, branchNodes2);\n\n // check the largest distance between the branches\n let maxLevel = getCollisionLevel(node1, node2);\n let branchNodeBoundary1 = getBranchBoundary(branchNodes1, maxLevel);\n let branchNodeBoundary2 = getBranchBoundary(branchNodes2, maxLevel);\n let max1 = branchNodeBoundary1[1];\n let min2 = branchNodeBoundary2[0];\n let minSpace2 = branchNodeBoundary2[2];\n\n //console.log(node1.id, getBranchBoundary(branchNodes1, maxLevel), node2.id,\n // getBranchBoundary(branchNodes2, maxLevel), maxLevel);\n let diffBranch = Math.abs(max1 - min2);\n if (diffBranch > nodeSpacing) {\n let offset = max1 - min2 + nodeSpacing;\n if (offset < -minSpace2 + nodeSpacing) {\n offset = -minSpace2 + nodeSpacing;\n //console.log(\"RESETTING OFFSET\", max1 - min2 + this.options.hierarchical.nodeSpacing, -minSpace2, offset);\n }\n if (offset < 0) {\n //console.log(\"SHIFTING\", node2.id, offset);\n this._shiftBlock(node2.id, offset);\n stillShifting = true;\n\n if (centerParent === true)\n this._centerParent(node2);\n }\n }\n\n }\n //this.body.emitter.emit(\"_redraw\");})\n };\n\n let minimizeEdgeLength = (iterations, node) => {\n //window.CALLBACKS.push(() => {\n // console.log(\"ts\",node.id);\n let nodeId = node.id;\n let allEdges = node.edges;\n let nodeLevel = this.hierarchical.levels[node.id];\n\n // gather constants\n let C2 = this.options.hierarchical.levelSeparation * this.options.hierarchical.levelSeparation;\n let referenceNodes = {};\n let aboveEdges = [];\n for (let i = 0; i < allEdges.length; i++) {\n let edge = allEdges[i];\n if (edge.toId != edge.fromId) {\n let otherNode = edge.toId == nodeId ? edge.from : edge.to;\n referenceNodes[allEdges[i].id] = otherNode;\n if (this.hierarchical.levels[otherNode.id] < nodeLevel) {\n aboveEdges.push(edge);\n }\n }\n }\n\n // differentiated sum of lengths based on only moving one node over one axis\n let getFx = (point, edges) => {\n let sum = 0;\n for (let i = 0; i < edges.length; i++) {\n if (referenceNodes[edges[i].id] !== undefined) {\n let a = this.direction.getPosition(referenceNodes[edges[i].id]) - point;\n sum += a / Math.sqrt(a * a + C2);\n }\n }\n return sum;\n };\n\n // doubly differentiated sum of lengths based on only moving one node over one axis\n let getDFx = (point, edges) => {\n let sum = 0;\n for (let i = 0; i < edges.length; i++) {\n if (referenceNodes[edges[i].id] !== undefined) {\n let a = this.direction.getPosition(referenceNodes[edges[i].id]) - point;\n sum -= (C2 * Math.pow(a * a + C2, -1.5));\n }\n }\n return sum;\n };\n\n let getGuess = (iterations, edges) => {\n let guess = this.direction.getPosition(node);\n // Newton's method for optimization\n let guessMap = {};\n for (let i = 0; i < iterations; i++) {\n let fx = getFx(guess, edges);\n let dfx = getDFx(guess, edges);\n\n // we limit the movement to avoid instability.\n let limit = 40;\n let ratio = Math.max(-limit, Math.min(limit, Math.round(fx/dfx)));\n guess = guess - ratio;\n // reduce duplicates\n if (guessMap[guess] !== undefined) {\n break;\n }\n guessMap[guess] = i;\n }\n return guess;\n };\n\n let moveBranch = (guess) => {\n // position node if there is space\n let nodePosition = this.direction.getPosition(node);\n\n // check movable area of the branch\n if (branches[node.id] === undefined) {\n let branchNodes = {};\n getBranchNodes(node, branchNodes);\n branches[node.id] = branchNodes;\n }\n let branchBoundary = getBranchBoundary(branches[node.id]);\n let minSpaceBranch = branchBoundary[2];\n let maxSpaceBranch = branchBoundary[3];\n\n let diff = guess - nodePosition;\n\n // check if we are allowed to move the node:\n let branchOffset = 0;\n if (diff > 0) {\n branchOffset = Math.min(diff, maxSpaceBranch - this.options.hierarchical.nodeSpacing);\n }\n else if (diff < 0) {\n branchOffset = -Math.min(-diff, minSpaceBranch - this.options.hierarchical.nodeSpacing);\n }\n\n if (branchOffset != 0) {\n //console.log(\"moving branch:\",branchOffset, maxSpaceBranch, minSpaceBranch)\n this._shiftBlock(node.id, branchOffset);\n //this.body.emitter.emit(\"_redraw\");\n stillShifting = true;\n }\n };\n\n let moveNode = (guess) => {\n let nodePosition = this.direction.getPosition(node);\n\n // position node if there is space\n let [minSpace, maxSpace] = this._getSpaceAroundNode(node);\n let diff = guess - nodePosition;\n // check if we are allowed to move the node:\n let newPosition = nodePosition;\n if (diff > 0) {\n newPosition = Math.min(nodePosition + (maxSpace - this.options.hierarchical.nodeSpacing), guess);\n }\n else if (diff < 0) {\n newPosition = Math.max(nodePosition - (minSpace - this.options.hierarchical.nodeSpacing), guess);\n }\n\n if (newPosition !== nodePosition) {\n //console.log(\"moving Node:\",diff, minSpace, maxSpace);\n this.direction.setPosition(node, newPosition);\n //this.body.emitter.emit(\"_redraw\");\n stillShifting = true;\n }\n };\n\n let guess = getGuess(iterations, aboveEdges);\n moveBranch(guess);\n guess = getGuess(iterations, allEdges);\n moveNode(guess);\n //})\n };\n\n // method to remove whitespace between branches. Because we do bottom up, we can center the parents.\n let minimizeEdgeLengthBottomUp = (iterations) => {\n let levels = this.hierarchical.getLevels();\n levels = levels.reverse();\n for (let i = 0; i < iterations; i++) {\n stillShifting = false;\n for (let j = 0; j < levels.length; j++) {\n let level = levels[j];\n let levelNodes = this.hierarchical.distributionOrdering[level];\n for (let k = 0; k < levelNodes.length; k++) {\n minimizeEdgeLength(1000, levelNodes[k]);\n }\n }\n if (stillShifting !== true) {\n //console.log(\"FINISHED minimizeEdgeLengthBottomUp IN \" + i);\n break;\n }\n }\n };\n\n // method to remove whitespace between branches. Because we do bottom up, we can center the parents.\n let shiftBranchesCloserBottomUp = (iterations) => {\n let levels = this.hierarchical.getLevels();\n levels = levels.reverse();\n for (let i = 0; i < iterations; i++) {\n stillShifting = false;\n shiftElementsCloser(branchShiftCallback, levels, true);\n if (stillShifting !== true) {\n //console.log(\"FINISHED shiftBranchesCloserBottomUp IN \" + (i+1));\n break;\n }\n }\n };\n\n // center all parents\n let centerAllParents = () => {\n for (let nodeId in this.body.nodes) {\n if (this.body.nodes.hasOwnProperty(nodeId))\n this._centerParent(this.body.nodes[nodeId]);\n }\n };\n\n // center all parents\n let centerAllParentsBottomUp = () => {\n let levels = this.hierarchical.getLevels();\n levels = levels.reverse();\n for (let i = 0; i < levels.length; i++) {\n let level = levels[i];\n let levelNodes = this.hierarchical.distributionOrdering[level];\n for (let j = 0; j < levelNodes.length; j++) {\n this._centerParent(levelNodes[j]);\n }\n }\n };\n\n // the actual work is done here.\n if (this.options.hierarchical.blockShifting === true) {\n shiftBranchesCloserBottomUp(5);\n centerAllParents();\n }\n\n // minimize edge length\n if (this.options.hierarchical.edgeMinimization === true) {\n minimizeEdgeLengthBottomUp(20);\n }\n\n if (this.options.hierarchical.parentCentralization === true) {\n centerAllParentsBottomUp()\n }\n\n shiftTrees();\n }\n\n /**\n * This gives the space around the node. IF a map is supplied, it will only check against nodes NOT in the map.\n * This is used to only get the distances to nodes outside of a branch.\n * @param {Node} node\n * @param {{Node.id: vis.Node}} map\n * @returns {number[]}\n * @private\n */\n _getSpaceAroundNode(node, map) {\n let useMap = true;\n if (map === undefined) {\n useMap = false;\n }\n let level = this.hierarchical.levels[node.id];\n if (level !== undefined) {\n let index = this.hierarchical.distributionIndex[node.id];\n let position = this.direction.getPosition(node);\n let ordering = this.hierarchical.distributionOrdering[level];\n let minSpace = 1e9;\n let maxSpace = 1e9;\n if (index !== 0) {\n let prevNode = ordering[index - 1];\n if ((useMap === true && map[prevNode.id] === undefined) || useMap === false) {\n let prevPos = this.direction.getPosition(prevNode);\n minSpace = position - prevPos;\n }\n }\n\n if (index != ordering.length - 1) {\n let nextNode = ordering[index + 1];\n if ((useMap === true && map[nextNode.id] === undefined) || useMap === false) {\n let nextPos = this.direction.getPosition(nextNode);\n maxSpace = Math.min(maxSpace, nextPos - position);\n }\n }\n\n return [minSpace, maxSpace];\n }\n else {\n return [0, 0];\n }\n }\n\n\n /**\n * We use this method to center a parent node and check if it does not cross other nodes when it does.\n * @param {Node} node\n * @private\n */\n _centerParent(node) {\n if (this.hierarchical.parentReference[node.id]) {\n let parents = this.hierarchical.parentReference[node.id];\n for (var i = 0; i < parents.length; i++) {\n let parentId = parents[i];\n let parentNode = this.body.nodes[parentId];\n let children = this.hierarchical.childrenReference[parentId];\n\n if (children !== undefined) {\n // get the range of the children\n let newPosition = this._getCenterPosition(children);\n\n let position = this.direction.getPosition(parentNode);\n let [minSpace, maxSpace] = this._getSpaceAroundNode(parentNode);\n let diff = position - newPosition;\n if ((diff < 0 && Math.abs(diff) < maxSpace - this.options.hierarchical.nodeSpacing) ||\n (diff > 0 && Math.abs(diff) < minSpace - this.options.hierarchical.nodeSpacing)) {\n this.direction.setPosition(parentNode, newPosition);\n }\n }\n }\n }\n }\n\n\n /**\n * This function places the nodes on the canvas based on the hierarchial distribution.\n *\n * @param {Object} distribution | obtained by the function this._getDistribution()\n * @private\n */\n _placeNodesByHierarchy(distribution) {\n this.positionedNodes = {};\n // start placing all the level 0 nodes first. Then recursively position their branches.\n for (let level in distribution) {\n if (distribution.hasOwnProperty(level)) {\n // sort nodes in level by position:\n let nodeArray = Object.keys(distribution[level]);\n nodeArray = this._indexArrayToNodes(nodeArray);\n this.direction.sort(nodeArray);\n let handledNodeCount = 0;\n\n for (let i = 0; i < nodeArray.length; i++) {\n let node = nodeArray[i];\n if (this.positionedNodes[node.id] === undefined) {\n let spacing = this.options.hierarchical.nodeSpacing;\n let pos = spacing * handledNodeCount;\n // We get the X or Y values we need and store them in pos and previousPos.\n // The get and set make sure we get X or Y\n if (handledNodeCount > 0) {\n pos = this.direction.getPosition(nodeArray[i-1]) + spacing;\n }\n this.direction.setPosition(node, pos, level);\n this._validatePositionAndContinue(node, level, pos);\n\n handledNodeCount++;\n }\n }\n }\n }\n }\n\n\n /**\n * This is a recursively called function to enumerate the branches from the largest hubs and place the nodes\n * on a X position that ensures there will be no overlap.\n *\n * @param {Node.id} parentId\n * @param {number} parentLevel\n * @private\n */\n _placeBranchNodes(parentId, parentLevel) {\n let childRef = this.hierarchical.childrenReference[parentId];\n\n // if this is not a parent, cancel the placing. This can happen with multiple parents to one child.\n if (childRef === undefined) {\n return;\n }\n\n // get a list of childNodes\n let childNodes = [];\n for (let i = 0; i < childRef.length; i++) {\n childNodes.push(this.body.nodes[childRef[i]]);\n }\n\n // use the positions to order the nodes.\n this.direction.sort(childNodes);\n\n // position the childNodes\n for (let i = 0; i < childNodes.length; i++) {\n let childNode = childNodes[i];\n let childNodeLevel = this.hierarchical.levels[childNode.id];\n // check if the child node is below the parent node and if it has already been positioned.\n if (childNodeLevel > parentLevel && this.positionedNodes[childNode.id] === undefined) {\n // get the amount of space required for this node. If parent the width is based on the amount of children.\n let spacing = this.options.hierarchical.nodeSpacing;\n let pos;\n\n // we get the X or Y values we need and store them in pos and previousPos.\n // The get and set make sure we get X or Y\n if (i === 0) {\n pos = this.direction.getPosition(this.body.nodes[parentId]);\n } else {\n pos = this.direction.getPosition(childNodes[i-1]) + spacing;\n }\n this.direction.setPosition(childNode, pos, childNodeLevel);\n this._validatePositionAndContinue(childNode, childNodeLevel, pos);\n }\n else {\n return;\n }\n }\n\n // center the parent nodes.\n let center = this._getCenterPosition(childNodes);\n this.direction.setPosition(this.body.nodes[parentId], center, parentLevel);\n }\n\n\n /**\n * This method checks for overlap and if required shifts the branch. It also keeps records of positioned nodes.\n * Finally it will call _placeBranchNodes to place the branch nodes.\n * @param {Node} node\n * @param {number} level\n * @param {number} pos\n * @private\n */\n _validatePositionAndContinue(node, level, pos) {\n // This method only works for formal trees and formal forests\n // Early exit if this is not the case\n if (!this.hierarchical.isTree) return;\n\n // if overlap has been detected, we shift the branch\n if (this.lastNodeOnLevel[level] !== undefined) {\n let previousPos = this.direction.getPosition(this.body.nodes[this.lastNodeOnLevel[level]]);\n if (pos - previousPos < this.options.hierarchical.nodeSpacing) {\n let diff = (previousPos + this.options.hierarchical.nodeSpacing) - pos;\n let sharedParent = this._findCommonParent(this.lastNodeOnLevel[level], node.id);\n this._shiftBlock(sharedParent.withChild, diff);\n }\n }\n\n this.lastNodeOnLevel[level] = node.id; // store change in position.\n this.positionedNodes[node.id] = true;\n this._placeBranchNodes(node.id, level);\n }\n\n /**\n * Receives an array with node indices and returns an array with the actual node references.\n * Used for sorting based on node properties.\n * @param {Array.} idArray\n * @returns {Array.}\n */\n _indexArrayToNodes(idArray) {\n let array = [];\n for (let i = 0; i < idArray.length; i++) {\n array.push(this.body.nodes[idArray[i]])\n }\n return array;\n }\n\n /**\n * This function get the distribution of levels based on hubsize\n *\n * @returns {Object}\n * @private\n */\n _getDistribution() {\n let distribution = {};\n let nodeId, node;\n\n // we fix Y because the hierarchy is vertical,\n // we fix X so we do not give a node an x position for a second time.\n // the fix of X is removed after the x value has been set.\n for (nodeId in this.body.nodes) {\n if (this.body.nodes.hasOwnProperty(nodeId)) {\n node = this.body.nodes[nodeId];\n let level = this.hierarchical.levels[nodeId] === undefined ? 0 : this.hierarchical.levels[nodeId];\n this.direction.fix(node, level);\n if (distribution[level] === undefined) {\n distribution[level] = {};\n }\n distribution[level][nodeId] = node;\n }\n }\n return distribution;\n }\n\n\n /**\n * Return the active (i.e. visible) edges for this node\n *\n * @param {Node} node\n * @returns {Array.} Array of edge instances\n * @private\n */\n _getActiveEdges(node) {\n let result = [];\n\n util.forEach(node.edges, (edge) => { \n if (this.body.edgeIndices.indexOf(edge.id) !== -1) {\n result.push(edge);\n }\n });\n\n return result;\n }\n\n\n /**\n * Get the hubsizes for all active nodes.\n *\n * @returns {number}\n * @private\n */\n _getHubSizes() {\n let hubSizes = {};\n let nodeIds = this.body.nodeIndices;\n\n util.forEach(nodeIds, (nodeId) => { \n let node = this.body.nodes[nodeId];\n let hubSize = this._getActiveEdges(node).length;\n hubSizes[hubSize] = true;\n });\n\n // Make an array of the size sorted descending\n let result = [];\n util.forEach(hubSizes, (size) => { \n result.push(Number(size));\n });\n\n TimSort.sort(result, function(a, b) {\n return b - a;\n });\n\n return result;\n }\n\n\n /**\n * this function allocates nodes in levels based on the recursive branching from the largest hubs.\n *\n * @private\n */\n _determineLevelsByHubsize() {\n let levelDownstream = (nodeA, nodeB) => {\n this.hierarchical.levelDownstream(nodeA, nodeB);\n }\n\n let hubSizes = this._getHubSizes();\n\n for (let i = 0; i < hubSizes.length; ++i ) {\n let hubSize = hubSizes[i];\n if (hubSize === 0) break;\n\n util.forEach(this.body.nodeIndices, (nodeId) => { \n let node = this.body.nodes[nodeId];\n\n if (hubSize === this._getActiveEdges(node).length) {\n this._crawlNetwork(levelDownstream, nodeId);\n }\n });\n }\n }\n\n\n /**\n * TODO: release feature\n * TODO: Determine if this feature is needed at all\n *\n * @private\n */\n _determineLevelsCustomCallback() {\n let minLevel = 100000;\n\n // TODO: this should come from options.\n let customCallback = function(nodeA, nodeB, edge) { // eslint-disable-line no-unused-vars\n\n };\n\n // TODO: perhaps move to HierarchicalStatus.\n // But I currently don't see the point, this method is not used.\n let levelByDirection = (nodeA, nodeB, edge) => {\n let levelA = this.hierarchical.levels[nodeA.id];\n // set initial level\n if (levelA === undefined) { levelA = this.hierarchical.levels[nodeA.id] = minLevel;}\n\n let diff = customCallback(\n NetworkUtil.cloneOptions(nodeA,'node'),\n NetworkUtil.cloneOptions(nodeB,'node'),\n NetworkUtil.cloneOptions(edge,'edge')\n );\n\n this.hierarchical.levels[nodeB.id] = levelA + diff;\n };\n\n this._crawlNetwork(levelByDirection);\n this.hierarchical.setMinLevelToZero(this.body.nodes);\n }\n\n /**\n * Allocate nodes in levels based on the direction of the edges.\n *\n * @private\n */\n _determineLevelsDirected() {\n let minLevel = 10000;\n\n /**\n * Check if there is an edge going the opposite direction for given edge\n *\n * @param {Edge} edge edge to check\n * @returns {boolean} true if there's another edge going into the opposite direction\n */\n let isBidirectional = (edge) => {\n util.forEach(this.body.edges, (otherEdge) => {\n if (otherEdge.toId === edge.fromId && otherEdge.fromId === edge.toId) {\n return true;\n }\n });\n\n return false;\n };\n\n\n let levelByDirection = (nodeA, nodeB, edge) => {\n let levelA = this.hierarchical.levels[nodeA.id];\n let levelB = this.hierarchical.levels[nodeB.id];\n\n if (isBidirectional(edge) && levelA !== undefined && levelB !== undefined) {\n // Don't redo the level determination if already done in this case.\n return;\n }\n\n // set initial level\n if (levelA === undefined) { levelA = this.hierarchical.levels[nodeA.id] = minLevel;}\n if (edge.toId == nodeB.id) {\n this.hierarchical.levels[nodeB.id] = levelA + 1;\n }\n else {\n this.hierarchical.levels[nodeB.id] = levelA - 1;\n }\n };\n\n this._crawlNetwork(levelByDirection);\n this.hierarchical.setMinLevelToZero(this.body.nodes);\n }\n\n\n /**\n * Update the bookkeeping of parent and child.\n * @private\n */\n _generateMap() {\n let fillInRelations = (parentNode, childNode) => {\n if (this.hierarchical.levels[childNode.id] > this.hierarchical.levels[parentNode.id]) {\n this.hierarchical.addRelation(parentNode.id, childNode.id);\n }\n };\n\n this._crawlNetwork(fillInRelations);\n this.hierarchical.checkIfTree();\n }\n\n\n /**\n * Crawl over the entire network and use a callback on each node couple that is connected to each other.\n * @param {function} [callback=function(){}] | will receive nodeA, nodeB and the connecting edge. A and B are distinct.\n * @param {Node.id} startingNodeId\n * @private\n */\n _crawlNetwork(callback = function() {}, startingNodeId) {\n let progress = {};\n\n let crawler = (node, tree) => {\n if (progress[node.id] === undefined) {\n this.hierarchical.setTreeIndex(node, tree);\n\n progress[node.id] = true;\n let childNode;\n let edges = this._getActiveEdges(node);\n for (let i = 0; i < edges.length; i++) {\n let edge = edges[i];\n if (edge.connected === true) {\n if (edge.toId == node.id) { // Not '===' because id's can be string and numeric\n childNode = edge.from;\n }\n else {\n childNode = edge.to;\n }\n\n if (node.id != childNode.id) { // Not '!==' because id's can be string and numeric\n callback(node, childNode, edge);\n crawler(childNode, tree);\n }\n }\n }\n }\n };\n\n\n if (startingNodeId === undefined) {\n // Crawl over all nodes\n let treeIndex = 0; // Serves to pass a unique id for the current distinct tree\n\n for (let i = 0; i < this.body.nodeIndices.length; i++) {\n let nodeId = this.body.nodeIndices[i];\n\n if (progress[nodeId] === undefined) {\n let node = this.body.nodes[nodeId];\n crawler(node, treeIndex);\n treeIndex += 1;\n }\n }\n }\n else {\n // Crawl from the given starting node\n let node = this.body.nodes[startingNodeId];\n if (node === undefined) {\n console.error(\"Node not found:\", startingNodeId);\n return;\n }\n crawler(node);\n }\n }\n\n\n /**\n * Shift a branch a certain distance\n * @param {Node.id} parentId\n * @param {number} diff\n * @private\n */\n _shiftBlock(parentId, diff) {\n let progress = {};\n let shifter = (parentId) => {\n if (progress[parentId]) {\n return;\n }\n progress[parentId] = true;\n this.direction.shift(parentId, diff);\n\n let childRef = this.hierarchical.childrenReference[parentId];\n if (childRef !== undefined) {\n for (let i = 0; i < childRef.length; i++) {\n shifter(childRef[i]);\n }\n }\n };\n shifter(parentId);\n }\n\n\n /**\n * Find a common parent between branches.\n * @param {Node.id} childA\n * @param {Node.id} childB\n * @returns {{foundParent, withChild}}\n * @private\n */\n _findCommonParent(childA,childB) {\n let parents = {};\n let iterateParents = (parents,child) => {\n let parentRef = this.hierarchical.parentReference[child];\n if (parentRef !== undefined) {\n for (let i = 0; i < parentRef.length; i++) {\n let parent = parentRef[i];\n parents[parent] = true;\n iterateParents(parents, parent)\n }\n }\n };\n let findParent = (parents, child) => {\n let parentRef = this.hierarchical.parentReference[child];\n if (parentRef !== undefined) {\n for (let i = 0; i < parentRef.length; i++) {\n let parent = parentRef[i];\n if (parents[parent] !== undefined) {\n return {foundParent:parent, withChild:child};\n }\n let branch = findParent(parents, parent);\n if (branch.foundParent !== null) {\n return branch;\n }\n }\n }\n return {foundParent:null, withChild:child};\n };\n\n iterateParents(parents, childA);\n return findParent(parents, childB);\n }\n\n\n /**\n * Set the strategy pattern for handling the coordinates given the current direction.\n *\n * The individual instances contain all the operations and data specific to a layout direction.\n *\n * @param {Node} node\n * @param {{x: number, y: number}} position\n * @param {number} level\n * @param {boolean} [doNotUpdate=false]\n * @private\n */\n setDirectionStrategy() {\n var isVertical = (this.options.hierarchical.direction === 'UD'\n || this.options.hierarchical.direction === 'DU');\n\n if(isVertical) {\n this.direction = new VerticalStrategy(this); \n } else {\n this.direction = new HorizontalStrategy(this); \n }\n }\n\n\n /**\n * Determine the center position of a branch from the passed list of child nodes\n *\n * This takes into account the positions of all the child nodes.\n * @param {Array.} childNodes Array of either child nodes or node id's\n * @return {number}\n * @private\n */\n _getCenterPosition(childNodes) {\n let minPos = 1e9;\n let maxPos = -1e9;\n\n for (let i = 0; i < childNodes.length; i++) {\n let childNode;\n if (childNodes[i].id !== undefined) {\n childNode = childNodes[i];\n } else {\n let childNodeId = childNodes[i];\n childNode = this.body.nodes[childNodeId];\n }\n\n let position = this.direction.getPosition(childNode);\n minPos = Math.min(minPos, position);\n maxPos = Math.max(maxPos, position);\n }\n\n return 0.5 * (minPos + maxPos);\n }\n}\n\nexport default LayoutEngine;\n","import './ManipulationSystem.css';\n\nimport util from 'vis-util';\nimport Hammer from '../../module/hammer';\nimport hammerUtil from '../../hammerUtil';\n\n/**\n * Clears the toolbar div element of children\n *\n * @private\n */\nclass ManipulationSystem {\n /**\n * @param {Object} body\n * @param {Canvas} canvas\n * @param {SelectionHandler} selectionHandler\n */\n constructor(body, canvas, selectionHandler) {\n this.body = body;\n this.canvas = canvas;\n this.selectionHandler = selectionHandler;\n\n this.editMode = false;\n this.manipulationDiv = undefined;\n this.editModeDiv = undefined;\n this.closeDiv = undefined;\n\n this.manipulationHammers = [];\n this.temporaryUIFunctions = {};\n this.temporaryEventFunctions = [];\n\n this.touchTime = 0;\n this.temporaryIds = {nodes: [], edges:[]};\n this.guiEnabled = false;\n this.inMode = false;\n this.selectedControlNode = undefined;\n\n this.options = {};\n this.defaultOptions = {\n enabled: false,\n initiallyActive: false,\n addNode: true,\n addEdge: true,\n editNode: undefined,\n editEdge: true,\n deleteNode: true,\n deleteEdge: true,\n controlNodeStyle:{\n shape:'dot',\n size:6,\n color: {background: '#ff0000', border: '#3c3c3c', highlight: {background: '#07f968', border: '#3c3c3c'}},\n borderWidth: 2,\n borderWidthSelected: 2\n }\n };\n util.extend(this.options, this.defaultOptions);\n\n this.body.emitter.on('destroy', () => {this._clean();});\n this.body.emitter.on('_dataChanged',this._restore.bind(this));\n this.body.emitter.on('_resetData', this._restore.bind(this));\n }\n\n\n /**\n * If something changes in the data during editing, switch back to the initial datamanipulation state and close all edit modes.\n * @private\n */\n _restore() {\n if (this.inMode !== false) {\n if (this.options.initiallyActive === true) {\n this.enableEditMode();\n }\n else {\n this.disableEditMode();\n }\n }\n }\n\n /**\n * Set the Options\n *\n * @param {Object} options\n * @param {Object} allOptions\n * @param {Object} globalOptions\n */\n setOptions(options, allOptions, globalOptions) {\n if (allOptions !== undefined) {\n if (allOptions.locale !== undefined) {this.options.locale = allOptions.locale} else {this.options.locale = globalOptions.locale;}\n if (allOptions.locales !== undefined) {this.options.locales = allOptions.locales} else {this.options.locales = globalOptions.locales;}\n }\n\n if (options !== undefined) {\n if (typeof options === 'boolean') {\n this.options.enabled = options;\n }\n else {\n this.options.enabled = true;\n util.deepExtend(this.options, options);\n }\n if (this.options.initiallyActive === true) {\n this.editMode = true;\n }\n this._setup();\n }\n }\n\n\n /**\n * Enable or disable edit-mode. Draws the DOM required and cleans up after itself.\n *\n * @private\n */\n toggleEditMode() {\n if (this.editMode === true) {\n this.disableEditMode();\n }\n else {\n this.enableEditMode();\n }\n }\n\n\n /**\n * Enables Edit Mode\n */\n enableEditMode() {\n this.editMode = true;\n\n this._clean();\n if (this.guiEnabled === true) {\n this.manipulationDiv.style.display = 'block';\n this.closeDiv.style.display = 'block';\n this.editModeDiv.style.display = 'none';\n this.showManipulatorToolbar();\n }\n }\n\n /**\n * Disables Edit Mode\n */\n disableEditMode() {\n this.editMode = false;\n\n this._clean();\n if (this.guiEnabled === true) {\n this.manipulationDiv.style.display = 'none';\n this.closeDiv.style.display = 'none';\n this.editModeDiv.style.display = 'block';\n this._createEditButton();\n }\n }\n\n /**\n * Creates the main toolbar. Removes functions bound to the select event. Binds all the buttons of the toolbar.\n *\n * @private\n */\n showManipulatorToolbar() {\n // restore the state of any bound functions or events, remove control nodes, restore physics\n this._clean();\n\n // reset global variables\n this.manipulationDOM = {};\n\n // if the gui is enabled, draw all elements.\n if (this.guiEnabled === true) {\n // a _restore will hide these menus\n this.editMode = true;\n this.manipulationDiv.style.display = 'block';\n this.closeDiv.style.display = 'block';\n\n let selectedNodeCount = this.selectionHandler._getSelectedNodeCount();\n let selectedEdgeCount = this.selectionHandler._getSelectedEdgeCount();\n let selectedTotalCount = selectedNodeCount + selectedEdgeCount;\n let locale = this.options.locales[this.options.locale];\n let needSeperator = false;\n\n\n if (this.options.addNode !== false) {\n this._createAddNodeButton(locale);\n needSeperator = true;\n }\n if (this.options.addEdge !== false) {\n if (needSeperator === true) {\n this._createSeperator(1);\n } else {\n needSeperator = true;\n }\n this._createAddEdgeButton(locale);\n }\n\n if (selectedNodeCount === 1 && typeof this.options.editNode === 'function') {\n if (needSeperator === true) {\n this._createSeperator(2);\n } else {\n needSeperator = true;\n }\n this._createEditNodeButton(locale);\n }\n else if (selectedEdgeCount === 1 && selectedNodeCount === 0 && this.options.editEdge !== false) {\n if (needSeperator === true) {\n this._createSeperator(3);\n } else {\n needSeperator = true;\n }\n this._createEditEdgeButton(locale);\n }\n\n // remove buttons\n if (selectedTotalCount !== 0) {\n if (selectedNodeCount > 0 && this.options.deleteNode !== false) {\n if (needSeperator === true) {\n this._createSeperator(4);\n }\n this._createDeleteButton(locale);\n }\n else if (selectedNodeCount === 0 && this.options.deleteEdge !== false) {\n if (needSeperator === true) {\n this._createSeperator(4);\n }\n this._createDeleteButton(locale);\n }\n }\n\n // bind the close button\n this._bindHammerToDiv(this.closeDiv, this.toggleEditMode.bind(this));\n\n // refresh this bar based on what has been selected\n this._temporaryBindEvent('select', this.showManipulatorToolbar.bind(this));\n }\n\n // redraw to show any possible changes\n this.body.emitter.emit('_redraw');\n\n }\n\n\n /**\n * Create the toolbar for adding Nodes\n */\n addNodeMode() {\n // when using the gui, enable edit mode if it wasnt already.\n if (this.editMode !== true) {\n this.enableEditMode();\n }\n\n // restore the state of any bound functions or events, remove control nodes, restore physics\n this._clean();\n\n this.inMode = 'addNode';\n if (this.guiEnabled === true) {\n let locale = this.options.locales[this.options.locale];\n this.manipulationDOM = {};\n this._createBackButton(locale);\n this._createSeperator();\n this._createDescription(locale['addDescription'] || this.options.locales['en']['addDescription']);\n\n // bind the close button\n this._bindHammerToDiv(this.closeDiv, this.toggleEditMode.bind(this));\n }\n\n this._temporaryBindEvent('click', this._performAddNode.bind(this));\n }\n\n /**\n * call the bound function to handle the editing of the node. The node has to be selected.\n */\n editNode() {\n // when using the gui, enable edit mode if it wasnt already.\n if (this.editMode !== true) {\n this.enableEditMode();\n }\n\n // restore the state of any bound functions or events, remove control nodes, restore physics\n this._clean();\n let node = this.selectionHandler._getSelectedNode();\n if (node !== undefined) {\n this.inMode = 'editNode';\n if (typeof this.options.editNode === 'function') {\n if (node.isCluster !== true) {\n let data = util.deepExtend({}, node.options, false);\n data.x = node.x;\n data.y = node.y;\n\n if (this.options.editNode.length === 2) {\n this.options.editNode(data, (finalizedData) => {\n if (finalizedData !== null && finalizedData !== undefined && this.inMode === 'editNode') { // if for whatever reason the mode has changes (due to dataset change) disregard the callback) {\n this.body.data.nodes.getDataSet().update(finalizedData);\n }\n this.showManipulatorToolbar();\n });\n }\n else {\n throw new Error('The function for edit does not support two arguments (data, callback)');\n }\n }\n else {\n alert(this.options.locales[this.options.locale]['editClusterError'] || this.options.locales['en']['editClusterError']);\n }\n }\n else {\n throw new Error('No function has been configured to handle the editing of nodes.');\n }\n }\n else {\n this.showManipulatorToolbar();\n }\n }\n\n\n /**\n * create the toolbar to connect nodes\n */\n addEdgeMode() {\n // when using the gui, enable edit mode if it wasnt already.\n if (this.editMode !== true) {\n this.enableEditMode();\n }\n\n // restore the state of any bound functions or events, remove control nodes, restore physics\n this._clean();\n\n this.inMode = 'addEdge';\n if (this.guiEnabled === true) {\n let locale = this.options.locales[this.options.locale];\n this.manipulationDOM = {};\n this._createBackButton(locale);\n this._createSeperator();\n this._createDescription(locale['edgeDescription'] || this.options.locales['en']['edgeDescription']);\n\n // bind the close button\n this._bindHammerToDiv(this.closeDiv, this.toggleEditMode.bind(this));\n }\n\n // temporarily overload functions\n this._temporaryBindUI('onTouch', this._handleConnect.bind(this));\n this._temporaryBindUI('onDragEnd', this._finishConnect.bind(this));\n this._temporaryBindUI('onDrag', this._dragControlNode.bind(this));\n this._temporaryBindUI('onRelease', this._finishConnect.bind(this));\n this._temporaryBindUI('onDragStart',this._dragStartEdge.bind(this));\n this._temporaryBindUI('onHold', () => {});\n }\n\n /**\n * create the toolbar to edit edges\n */\n editEdgeMode() {\n // when using the gui, enable edit mode if it wasn't already.\n if (this.editMode !== true) {\n this.enableEditMode();\n }\n\n // restore the state of any bound functions or events, remove control nodes, restore physics\n this._clean();\n\n this.inMode = 'editEdge';\n if (typeof this.options.editEdge === 'object' && typeof this.options.editEdge.editWithoutDrag === \"function\") {\n this.edgeBeingEditedId = this.selectionHandler.getSelectedEdges()[0];\n if (this.edgeBeingEditedId !== undefined) {\n var edge = this.body.edges[this.edgeBeingEditedId];\n this._performEditEdge(edge.from, edge.to);\n return;\n }\n }\n if (this.guiEnabled === true) {\n let locale = this.options.locales[this.options.locale];\n this.manipulationDOM = {};\n this._createBackButton(locale);\n this._createSeperator();\n this._createDescription(locale['editEdgeDescription'] || this.options.locales['en']['editEdgeDescription']);\n\n // bind the close button\n this._bindHammerToDiv(this.closeDiv, this.toggleEditMode.bind(this));\n }\n\n this.edgeBeingEditedId = this.selectionHandler.getSelectedEdges()[0];\n if (this.edgeBeingEditedId !== undefined) {\n let edge = this.body.edges[this.edgeBeingEditedId];\n\n // create control nodes\n let controlNodeFrom = this._getNewTargetNode(edge.from.x, edge.from.y);\n let controlNodeTo = this._getNewTargetNode(edge.to.x, edge.to.y);\n\n this.temporaryIds.nodes.push(controlNodeFrom.id);\n this.temporaryIds.nodes.push(controlNodeTo.id);\n\n this.body.nodes[controlNodeFrom.id] = controlNodeFrom;\n this.body.nodeIndices.push(controlNodeFrom.id);\n this.body.nodes[controlNodeTo.id] = controlNodeTo;\n this.body.nodeIndices.push(controlNodeTo.id);\n\n // temporarily overload UI functions, cleaned up automatically because of _temporaryBindUI\n this._temporaryBindUI('onTouch', this._controlNodeTouch.bind(this)); // used to get the position\n this._temporaryBindUI('onTap', () => {}); // disabled\n this._temporaryBindUI('onHold', () => {}); // disabled\n this._temporaryBindUI('onDragStart', this._controlNodeDragStart.bind(this));// used to select control node\n this._temporaryBindUI('onDrag', this._controlNodeDrag.bind(this)); // used to drag control node\n this._temporaryBindUI('onDragEnd', this._controlNodeDragEnd.bind(this)); // used to connect or revert control nodes\n this._temporaryBindUI('onMouseMove', () => {}); // disabled\n\n // create function to position control nodes correctly on movement\n // automatically cleaned up because we use the temporary bind\n this._temporaryBindEvent('beforeDrawing', (ctx) => {\n let positions = edge.edgeType.findBorderPositions(ctx);\n if (controlNodeFrom.selected === false) {\n controlNodeFrom.x = positions.from.x;\n controlNodeFrom.y = positions.from.y;\n }\n if (controlNodeTo.selected === false) {\n controlNodeTo.x = positions.to.x;\n controlNodeTo.y = positions.to.y;\n }\n });\n\n this.body.emitter.emit('_redraw');\n }\n else {\n this.showManipulatorToolbar();\n }\n }\n\n /**\n * delete everything in the selection\n */\n deleteSelected() {\n // when using the gui, enable edit mode if it wasnt already.\n if (this.editMode !== true) {\n this.enableEditMode();\n }\n\n // restore the state of any bound functions or events, remove control nodes, restore physics\n this._clean();\n\n this.inMode = 'delete';\n let selectedNodes = this.selectionHandler.getSelectedNodes();\n let selectedEdges = this.selectionHandler.getSelectedEdges();\n let deleteFunction = undefined;\n if (selectedNodes.length > 0) {\n for (let i = 0; i < selectedNodes.length; i++) {\n if (this.body.nodes[selectedNodes[i]].isCluster === true) {\n alert(this.options.locales[this.options.locale]['deleteClusterError'] || this.options.locales['en']['deleteClusterError']);\n return;\n }\n }\n\n if (typeof this.options.deleteNode === 'function') {\n deleteFunction = this.options.deleteNode;\n }\n }\n else if (selectedEdges.length > 0) {\n if (typeof this.options.deleteEdge === 'function') {\n deleteFunction = this.options.deleteEdge;\n }\n }\n\n if (typeof deleteFunction === 'function') {\n let data = {nodes: selectedNodes, edges: selectedEdges};\n if (deleteFunction.length === 2) {\n deleteFunction(data, (finalizedData) => {\n if (finalizedData !== null && finalizedData !== undefined && this.inMode === 'delete') { // if for whatever reason the mode has changes (due to dataset change) disregard the callback) {\n this.body.data.edges.getDataSet().remove(finalizedData.edges);\n this.body.data.nodes.getDataSet().remove(finalizedData.nodes);\n this.body.emitter.emit('startSimulation');\n this.showManipulatorToolbar();\n }\n else {\n this.body.emitter.emit('startSimulation');\n this.showManipulatorToolbar();\n }\n });\n }\n else {\n throw new Error('The function for delete does not support two arguments (data, callback)')\n }\n }\n else {\n this.body.data.edges.getDataSet().remove(selectedEdges);\n this.body.data.nodes.getDataSet().remove(selectedNodes);\n this.body.emitter.emit('startSimulation');\n this.showManipulatorToolbar();\n }\n }\n\n\n\n\n //********************************************** PRIVATE ***************************************//\n\n /**\n * draw or remove the DOM\n * @private\n */\n _setup() {\n if (this.options.enabled === true) {\n // Enable the GUI\n this.guiEnabled = true;\n\n this._createWrappers();\n if (this.editMode === false) {\n this._createEditButton();\n }\n else {\n this.showManipulatorToolbar();\n }\n }\n else {\n this._removeManipulationDOM();\n\n // disable the gui\n this.guiEnabled = false;\n }\n }\n\n\n /**\n * create the div overlays that contain the DOM\n * @private\n */\n _createWrappers() {\n // load the manipulator HTML elements. All styling done in css.\n if (this.manipulationDiv === undefined) {\n this.manipulationDiv = document.createElement('div');\n this.manipulationDiv.className = 'vis-manipulation';\n if (this.editMode === true) {\n this.manipulationDiv.style.display = 'block';\n }\n else {\n this.manipulationDiv.style.display = 'none';\n }\n this.canvas.frame.appendChild(this.manipulationDiv);\n }\n\n // container for the edit button.\n if (this.editModeDiv === undefined) {\n this.editModeDiv = document.createElement('div');\n this.editModeDiv.className = 'vis-edit-mode';\n if (this.editMode === true) {\n this.editModeDiv.style.display = 'none';\n }\n else {\n this.editModeDiv.style.display = 'block';\n }\n this.canvas.frame.appendChild(this.editModeDiv);\n }\n\n\n // container for the close div button\n if (this.closeDiv === undefined) {\n this.closeDiv = document.createElement('div');\n this.closeDiv.className = 'vis-close';\n this.closeDiv.style.display = this.manipulationDiv.style.display;\n this.canvas.frame.appendChild(this.closeDiv);\n }\n }\n\n\n /**\n * generate a new target node. Used for creating new edges and editing edges\n *\n * @param {number} x\n * @param {number} y\n * @returns {Node}\n * @private\n */\n _getNewTargetNode(x,y) {\n let controlNodeStyle = util.deepExtend({}, this.options.controlNodeStyle);\n\n controlNodeStyle.id = 'targetNode' + util.randomUUID();\n controlNodeStyle.hidden = false;\n controlNodeStyle.physics = false;\n controlNodeStyle.x = x;\n controlNodeStyle.y = y;\n\n // we have to define the bounding box in order for the nodes to be drawn immediately\n let node = this.body.functions.createNode(controlNodeStyle);\n node.shape.boundingBox = {left: x, right:x, top:y, bottom:y};\n\n return node;\n }\n\n\n /**\n * Create the edit button\n */\n _createEditButton() {\n // restore everything to it's original state (if applicable)\n this._clean();\n\n // reset the manipulationDOM\n this.manipulationDOM = {};\n\n // empty the editModeDiv\n util.recursiveDOMDelete(this.editModeDiv);\n\n\n // create the contents for the editMode button\n let locale = this.options.locales[this.options.locale];\n let button = this._createButton('editMode', 'vis-button vis-edit vis-edit-mode', locale['edit'] || this.options.locales['en']['edit']);\n this.editModeDiv.appendChild(button);\n\n // bind a hammer listener to the button, calling the function toggleEditMode.\n this._bindHammerToDiv(button, this.toggleEditMode.bind(this));\n }\n\n\n /**\n * this function cleans up after everything this module does. Temporary elements, functions and events are removed, physics restored, hammers removed.\n * @private\n */\n _clean() {\n // not in mode\n this.inMode = false;\n\n // _clean the divs\n if (this.guiEnabled === true) {\n util.recursiveDOMDelete(this.editModeDiv);\n util.recursiveDOMDelete(this.manipulationDiv);\n\n // removes all the bindings and overloads\n this._cleanManipulatorHammers();\n }\n\n // remove temporary nodes and edges\n this._cleanupTemporaryNodesAndEdges();\n\n // restore overloaded UI functions\n this._unbindTemporaryUIs();\n\n // remove the temporaryEventFunctions\n this._unbindTemporaryEvents();\n\n // restore the physics if required\n this.body.emitter.emit('restorePhysics');\n }\n\n\n /**\n * Each dom element has it's own hammer. They are stored in this.manipulationHammers. This cleans them up.\n * @private\n */\n _cleanManipulatorHammers() {\n // _clean hammer bindings\n if (this.manipulationHammers.length != 0) {\n for (let i = 0; i < this.manipulationHammers.length; i++) {\n this.manipulationHammers[i].destroy();\n }\n this.manipulationHammers = [];\n }\n }\n\n\n /**\n * Remove all DOM elements created by this module.\n * @private\n */\n _removeManipulationDOM() {\n // removes all the bindings and overloads\n this._clean();\n\n // empty the manipulation divs\n util.recursiveDOMDelete(this.manipulationDiv);\n util.recursiveDOMDelete(this.editModeDiv);\n util.recursiveDOMDelete(this.closeDiv);\n\n // remove the manipulation divs\n if (this.manipulationDiv) {this.canvas.frame.removeChild(this.manipulationDiv);}\n if (this.editModeDiv) {this.canvas.frame.removeChild(this.editModeDiv);}\n if (this.closeDiv) {this.canvas.frame.removeChild(this.closeDiv);}\n\n // set the references to undefined\n this.manipulationDiv = undefined;\n this.editModeDiv = undefined;\n this.closeDiv = undefined;\n }\n\n\n /**\n * create a seperator line. the index is to differentiate in the manipulation dom\n * @param {number} [index=1]\n * @private\n */\n _createSeperator(index = 1) {\n this.manipulationDOM['seperatorLineDiv' + index] = document.createElement('div');\n this.manipulationDOM['seperatorLineDiv' + index].className = 'vis-separator-line';\n this.manipulationDiv.appendChild(this.manipulationDOM['seperatorLineDiv' + index]);\n }\n\n // ---------------------- DOM functions for buttons --------------------------//\n\n /**\n *\n * @param {Locale} locale\n * @private\n */\n _createAddNodeButton(locale) {\n let button = this._createButton('addNode', 'vis-button vis-add', locale['addNode'] || this.options.locales['en']['addNode']);\n this.manipulationDiv.appendChild(button);\n this._bindHammerToDiv(button, this.addNodeMode.bind(this));\n }\n\n /**\n *\n * @param {Locale} locale\n * @private\n */\n _createAddEdgeButton(locale) {\n let button = this._createButton('addEdge', 'vis-button vis-connect', locale['addEdge'] || this.options.locales['en']['addEdge']);\n this.manipulationDiv.appendChild(button);\n this._bindHammerToDiv(button, this.addEdgeMode.bind(this));\n }\n\n /**\n *\n * @param {Locale} locale\n * @private\n */\n _createEditNodeButton(locale) {\n let button = this._createButton('editNode', 'vis-button vis-edit', locale['editNode'] || this.options.locales['en']['editNode']);\n this.manipulationDiv.appendChild(button);\n this._bindHammerToDiv(button, this.editNode.bind(this));\n }\n\n /**\n *\n * @param {Locale} locale\n * @private\n */\n _createEditEdgeButton(locale) {\n let button = this._createButton('editEdge', 'vis-button vis-edit', locale['editEdge'] || this.options.locales['en']['editEdge']);\n this.manipulationDiv.appendChild(button);\n this._bindHammerToDiv(button, this.editEdgeMode.bind(this));\n }\n\n /**\n *\n * @param {Locale} locale\n * @private\n */\n _createDeleteButton(locale) {\n var deleteBtnClass;\n if (this.options.rtl) {\n deleteBtnClass = 'vis-button vis-delete-rtl';\n } else {\n deleteBtnClass = 'vis-button vis-delete';\n }\n let button = this._createButton('delete', deleteBtnClass, locale['del'] || this.options.locales['en']['del']);\n this.manipulationDiv.appendChild(button);\n this._bindHammerToDiv(button, this.deleteSelected.bind(this));\n }\n\n /**\n *\n * @param {Locale} locale\n * @private\n */\n _createBackButton(locale) {\n let button = this._createButton('back', 'vis-button vis-back', locale['back'] || this.options.locales['en']['back']);\n this.manipulationDiv.appendChild(button);\n this._bindHammerToDiv(button, this.showManipulatorToolbar.bind(this));\n }\n\n /**\n *\n * @param {number|string} id\n * @param {string} className\n * @param {label} label\n * @param {string} labelClassName\n * @returns {HTMLElement}\n * @private\n */\n _createButton(id, className, label, labelClassName = 'vis-label') {\n\n this.manipulationDOM[id+'Div'] = document.createElement('div');\n this.manipulationDOM[id+'Div'].className = className;\n this.manipulationDOM[id+'Label'] = document.createElement('div');\n this.manipulationDOM[id+'Label'].className = labelClassName;\n this.manipulationDOM[id+'Label'].innerHTML = label;\n this.manipulationDOM[id+'Div'].appendChild(this.manipulationDOM[id+'Label']);\n return this.manipulationDOM[id+'Div'];\n }\n\n /**\n *\n * @param {Label} label\n * @private\n */\n _createDescription(label) {\n this.manipulationDiv.appendChild(\n this._createButton('description', 'vis-button vis-none', label)\n );\n }\n\n // -------------------------- End of DOM functions for buttons ------------------------------//\n\n /**\n * this binds an event until cleanup by the clean functions.\n * @param {Event} event The event\n * @param {function} newFunction\n * @private\n */\n _temporaryBindEvent(event, newFunction) {\n this.temporaryEventFunctions.push({event:event, boundFunction:newFunction});\n this.body.emitter.on(event, newFunction);\n }\n\n /**\n * this overrides an UI function until cleanup by the clean function\n * @param {string} UIfunctionName\n * @param {function} newFunction\n * @private\n */\n _temporaryBindUI(UIfunctionName, newFunction) {\n if (this.body.eventListeners[UIfunctionName] !== undefined) {\n this.temporaryUIFunctions[UIfunctionName] = this.body.eventListeners[UIfunctionName];\n this.body.eventListeners[UIfunctionName] = newFunction;\n }\n else {\n throw new Error('This UI function does not exist. Typo? You tried: ' + UIfunctionName + ' possible are: ' + JSON.stringify(Object.keys(this.body.eventListeners)));\n }\n }\n\n /**\n * Restore the overridden UI functions to their original state.\n *\n * @private\n */\n _unbindTemporaryUIs() {\n for (let functionName in this.temporaryUIFunctions) {\n if (this.temporaryUIFunctions.hasOwnProperty(functionName)) {\n this.body.eventListeners[functionName] = this.temporaryUIFunctions[functionName];\n delete this.temporaryUIFunctions[functionName];\n }\n }\n this.temporaryUIFunctions = {};\n }\n\n /**\n * Unbind the events created by _temporaryBindEvent\n * @private\n */\n _unbindTemporaryEvents() {\n for (let i = 0; i < this.temporaryEventFunctions.length; i++) {\n let eventName = this.temporaryEventFunctions[i].event;\n let boundFunction = this.temporaryEventFunctions[i].boundFunction;\n this.body.emitter.off(eventName, boundFunction);\n }\n this.temporaryEventFunctions = [];\n }\n\n /**\n * Bind an hammer instance to a DOM element.\n *\n * @param {Element} domElement\n * @param {function} boundFunction\n */\n _bindHammerToDiv(domElement, boundFunction) {\n let hammer = new Hammer(domElement, {});\n hammerUtil.onTouch(hammer, boundFunction);\n this.manipulationHammers.push(hammer);\n }\n\n\n /**\n * Neatly clean up temporary edges and nodes\n * @private\n */\n _cleanupTemporaryNodesAndEdges() {\n // _clean temporary edges\n for (let i = 0; i < this.temporaryIds.edges.length; i++) {\n this.body.edges[this.temporaryIds.edges[i]].disconnect();\n delete this.body.edges[this.temporaryIds.edges[i]];\n let indexTempEdge = this.body.edgeIndices.indexOf(this.temporaryIds.edges[i]);\n if (indexTempEdge !== -1) {this.body.edgeIndices.splice(indexTempEdge,1);}\n }\n\n // _clean temporary nodes\n for (let i = 0; i < this.temporaryIds.nodes.length; i++) {\n delete this.body.nodes[this.temporaryIds.nodes[i]];\n let indexTempNode = this.body.nodeIndices.indexOf(this.temporaryIds.nodes[i]);\n if (indexTempNode !== -1) {this.body.nodeIndices.splice(indexTempNode,1);}\n }\n\n this.temporaryIds = {nodes: [], edges: []};\n }\n\n // ------------------------------------------ EDIT EDGE FUNCTIONS -----------------------------------------//\n\n /**\n * the touch is used to get the position of the initial click\n * @param {Event} event The event\n * @private\n */\n _controlNodeTouch(event) {\n this.selectionHandler.unselectAll();\n this.lastTouch = this.body.functions.getPointer(event.center);\n this.lastTouch.translation = util.extend({},this.body.view.translation); // copy the object\n }\n\n\n /**\n * the drag start is used to mark one of the control nodes as selected.\n * @param {Event} event The event\n * @private\n */\n _controlNodeDragStart(event) { // eslint-disable-line no-unused-vars\n let pointer = this.lastTouch;\n let pointerObj = this.selectionHandler._pointerToPositionObject(pointer);\n let from = this.body.nodes[this.temporaryIds.nodes[0]];\n let to = this.body.nodes[this.temporaryIds.nodes[1]];\n let edge = this.body.edges[this.edgeBeingEditedId];\n this.selectedControlNode = undefined;\n\n let fromSelect = from.isOverlappingWith(pointerObj);\n let toSelect = to.isOverlappingWith(pointerObj);\n\n if (fromSelect === true) {\n this.selectedControlNode = from;\n edge.edgeType.from = from;\n }\n else if (toSelect === true) {\n this.selectedControlNode = to;\n edge.edgeType.to = to;\n }\n\n // we use the selection to find the node that is being dragged. We explicitly select it here.\n if (this.selectedControlNode !== undefined) {\n this.selectionHandler.selectObject(this.selectedControlNode)\n }\n\n this.body.emitter.emit('_redraw');\n }\n\n /**\n * dragging the control nodes or the canvas\n * @param {Event} event The event\n * @private\n */\n _controlNodeDrag(event) {\n this.body.emitter.emit('disablePhysics');\n let pointer = this.body.functions.getPointer(event.center);\n let pos = this.canvas.DOMtoCanvas(pointer);\n if (this.selectedControlNode !== undefined) {\n this.selectedControlNode.x = pos.x;\n this.selectedControlNode.y = pos.y;\n }\n else {\n // if the drag was not started properly because the click started outside the network div, start it now.\n let diffX = pointer.x - this.lastTouch.x;\n let diffY = pointer.y - this.lastTouch.y;\n this.body.view.translation = {x:this.lastTouch.translation.x + diffX, y:this.lastTouch.translation.y + diffY};\n }\n this.body.emitter.emit('_redraw');\n }\n\n\n /**\n * connecting or restoring the control nodes.\n * @param {Event} event The event\n * @private\n */\n _controlNodeDragEnd(event) {\n let pointer = this.body.functions.getPointer(event.center);\n let pointerObj = this.selectionHandler._pointerToPositionObject(pointer);\n let edge = this.body.edges[this.edgeBeingEditedId];\n // if the node that was dragged is not a control node, return\n if (this.selectedControlNode === undefined) {\n return;\n }\n\n // we use the selection to find the node that is being dragged. We explicitly DEselect the control node here.\n this.selectionHandler.unselectAll();\n let overlappingNodeIds = this.selectionHandler._getAllNodesOverlappingWith(pointerObj);\n let node = undefined;\n for (let i = overlappingNodeIds.length-1; i >= 0; i--) {\n if (overlappingNodeIds[i] !== this.selectedControlNode.id) {\n node = this.body.nodes[overlappingNodeIds[i]];\n break;\n }\n }\n // perform the connection\n if (node !== undefined && this.selectedControlNode !== undefined) {\n if (node.isCluster === true) {\n alert(this.options.locales[this.options.locale]['createEdgeError'] || this.options.locales['en']['createEdgeError'])\n }\n else {\n let from = this.body.nodes[this.temporaryIds.nodes[0]];\n if (this.selectedControlNode.id === from.id) {\n this._performEditEdge(node.id, edge.to.id);\n }\n else {\n this._performEditEdge(edge.from.id, node.id);\n }\n }\n }\n else {\n edge.updateEdgeType();\n this.body.emitter.emit('restorePhysics');\n }\n\n this.body.emitter.emit('_redraw');\n }\n\n // ------------------------------------ END OF EDIT EDGE FUNCTIONS -----------------------------------------//\n\n\n\n // ------------------------------------------- ADD EDGE FUNCTIONS -----------------------------------------//\n /**\n * the function bound to the selection event. It checks if you want to connect a cluster and changes the description\n * to walk the user through the process.\n *\n * @param {Event} event\n * @private\n */\n _handleConnect(event) {\n // check to avoid double fireing of this function.\n if (new Date().valueOf() - this.touchTime > 100) {\n this.lastTouch = this.body.functions.getPointer(event.center);\n this.lastTouch.translation = util.extend({},this.body.view.translation); // copy the object\n\n let pointer = this.lastTouch;\n let node = this.selectionHandler.getNodeAt(pointer);\n\n if (node !== undefined) {\n if (node.isCluster === true) {\n alert(this.options.locales[this.options.locale]['createEdgeError'] || this.options.locales['en']['createEdgeError'])\n }\n else {\n // create a node the temporary line can look at\n let targetNode = this._getNewTargetNode(node.x,node.y);\n this.body.nodes[targetNode.id] = targetNode;\n this.body.nodeIndices.push(targetNode.id);\n\n // create a temporary edge\n let connectionEdge = this.body.functions.createEdge({\n id: 'connectionEdge' + util.randomUUID(),\n from: node.id,\n to: targetNode.id,\n physics: false,\n smooth: {\n enabled: true,\n type: 'continuous',\n roundness: 0.5\n }\n });\n this.body.edges[connectionEdge.id] = connectionEdge;\n this.body.edgeIndices.push(connectionEdge.id);\n\n this.temporaryIds.nodes.push(targetNode.id);\n this.temporaryIds.edges.push(connectionEdge.id);\n }\n }\n this.touchTime = new Date().valueOf();\n }\n }\n\n /**\n *\n * @param {Event} event\n * @private\n */\n _dragControlNode(event) {\n let pointer = this.body.functions.getPointer(event.center);\n\n var pointerObj = this.selectionHandler._pointerToPositionObject(pointer);\n // remember the edge id\n var connectFromId = undefined;\n if (this.temporaryIds.edges[0] !== undefined) {\n connectFromId = this.body.edges[this.temporaryIds.edges[0]].fromId;\n }\n\n // get the overlapping node but NOT the temporary node;\n var overlappingNodeIds = this.selectionHandler._getAllNodesOverlappingWith(pointerObj);\n var node = undefined;\n for (var i = overlappingNodeIds.length - 1; i >= 0; i--) {\n // if the node id is NOT a temporary node, accept the node.\n if (this.temporaryIds.nodes.indexOf(overlappingNodeIds[i]) === -1) {\n node = this.body.nodes[overlappingNodeIds[i]];\n break;\n }\n }\n \n event.controlEdge = { from: connectFromId, to: node ? node.id : undefined };\n this.selectionHandler._generateClickEvent('controlNodeDragging', event, pointer);\n\n if (this.temporaryIds.nodes[0] !== undefined) {\n let targetNode = this.body.nodes[this.temporaryIds.nodes[0]]; // there is only one temp node in the add edge mode.\n targetNode.x = this.canvas._XconvertDOMtoCanvas(pointer.x);\n targetNode.y = this.canvas._YconvertDOMtoCanvas(pointer.y);\n this.body.emitter.emit('_redraw');\n }\n else {\n let diffX = pointer.x - this.lastTouch.x;\n let diffY = pointer.y - this.lastTouch.y;\n this.body.view.translation = {x:this.lastTouch.translation.x + diffX, y:this.lastTouch.translation.y + diffY};\n }\n\n }\n\n\n /**\n * Connect the new edge to the target if one exists, otherwise remove temp line\n * @param {Event} event The event\n * @private\n */\n _finishConnect(event) {\n let pointer = this.body.functions.getPointer(event.center);\n let pointerObj = this.selectionHandler._pointerToPositionObject(pointer);\n\n // remember the edge id\n let connectFromId = undefined;\n if (this.temporaryIds.edges[0] !== undefined) {\n connectFromId = this.body.edges[this.temporaryIds.edges[0]].fromId;\n }\n\n // get the overlapping node but NOT the temporary node;\n let overlappingNodeIds = this.selectionHandler._getAllNodesOverlappingWith(pointerObj);\n let node = undefined;\n for (let i = overlappingNodeIds.length-1; i >= 0; i--) {\n // if the node id is NOT a temporary node, accept the node.\n if (this.temporaryIds.nodes.indexOf(overlappingNodeIds[i]) === -1) {\n node = this.body.nodes[overlappingNodeIds[i]];\n break;\n }\n }\n\n // clean temporary nodes and edges.\n this._cleanupTemporaryNodesAndEdges();\n\n // perform the connection\n if (node !== undefined) {\n if (node.isCluster === true) {\n alert(this.options.locales[this.options.locale]['createEdgeError'] || this.options.locales['en']['createEdgeError']);\n }\n else {\n if (this.body.nodes[connectFromId] !== undefined && this.body.nodes[node.id] !== undefined) {\n this._performAddEdge(connectFromId, node.id);\n }\n }\n }\n\n event.controlEdge = { from: connectFromId, to: node ? node.id : undefined };\n this.selectionHandler._generateClickEvent('controlNodeDragEnd', event, pointer);\n\n // No need to do _generateclickevent('dragEnd') here, the regular dragEnd event fires.\n this.body.emitter.emit('_redraw');\n }\n\n\n /**\n *\n * @param {Event} event\n * @private\n */\n _dragStartEdge(event) {\n let pointer = this.lastTouch;\n this.selectionHandler._generateClickEvent('dragStart', event, pointer, undefined, true);\n }\n\n // --------------------------------------- END OF ADD EDGE FUNCTIONS -------------------------------------//\n\n\n // ------------------------------ Performing all the actual data manipulation ------------------------//\n\n /**\n * Adds a node on the specified location\n *\n * @param {Object} clickData\n * @private\n */\n _performAddNode(clickData) {\n let defaultData = {\n id: util.randomUUID(),\n x: clickData.pointer.canvas.x,\n y: clickData.pointer.canvas.y,\n label: 'new'\n };\n\n if (typeof this.options.addNode === 'function') {\n if (this.options.addNode.length === 2) {\n this.options.addNode(defaultData, (finalizedData) => {\n if (finalizedData !== null && finalizedData !== undefined && this.inMode === 'addNode') { // if for whatever reason the mode has changes (due to dataset change) disregard the callback\n this.body.data.nodes.getDataSet().add(finalizedData);\n }\n this.showManipulatorToolbar();\n });\n }\n else {\n this.showManipulatorToolbar();\n throw new Error('The function for add does not support two arguments (data,callback)');\n }\n }\n else {\n this.body.data.nodes.getDataSet().add(defaultData);\n this.showManipulatorToolbar();\n }\n }\n\n\n /**\n * connect two nodes with a new edge.\n *\n * @param {Node.id} sourceNodeId\n * @param {Node.id} targetNodeId\n * @private\n */\n _performAddEdge(sourceNodeId, targetNodeId) {\n let defaultData = {from: sourceNodeId, to: targetNodeId};\n if (typeof this.options.addEdge === 'function') {\n if (this.options.addEdge.length === 2) {\n this.options.addEdge(defaultData, (finalizedData) => {\n if (finalizedData !== null && finalizedData !== undefined && this.inMode === 'addEdge') { // if for whatever reason the mode has changes (due to dataset change) disregard the callback\n this.body.data.edges.getDataSet().add(finalizedData);\n this.selectionHandler.unselectAll();\n this.showManipulatorToolbar();\n }\n });\n }\n else {\n throw new Error('The function for connect does not support two arguments (data,callback)');\n }\n }\n else {\n this.body.data.edges.getDataSet().add(defaultData);\n this.selectionHandler.unselectAll();\n this.showManipulatorToolbar();\n }\n }\n\n /**\n * connect two nodes with a new edge.\n *\n * @param {Node.id} sourceNodeId\n * @param {Node.id} targetNodeId\n * @private\n */\n _performEditEdge(sourceNodeId, targetNodeId) {\n let defaultData = {id: this.edgeBeingEditedId, from: sourceNodeId, to: targetNodeId, label: this.body.data.edges._data[this.edgeBeingEditedId].label };\n let eeFunct = this.options.editEdge;\n if (typeof eeFunct === 'object') {\n eeFunct = eeFunct.editWithoutDrag;\n }\n if (typeof eeFunct === 'function') {\n if (eeFunct.length === 2) {\n eeFunct(defaultData, (finalizedData) => {\n if (finalizedData === null || finalizedData === undefined || this.inMode !== 'editEdge') { // if for whatever reason the mode has changes (due to dataset change) disregard the callback) {\n this.body.edges[defaultData.id].updateEdgeType();\n this.body.emitter.emit('_redraw');\n this.showManipulatorToolbar();\n }\n else {\n this.body.data.edges.getDataSet().update(finalizedData);\n this.selectionHandler.unselectAll();\n this.showManipulatorToolbar();\n }\n });\n }\n else {\n throw new Error('The function for edit does not support two arguments (data, callback)');\n }\n }\n else {\n this.body.data.edges.getDataSet().update(defaultData);\n this.selectionHandler.unselectAll();\n this.showManipulatorToolbar();\n }\n }\n\n\n}\n\nexport default ManipulationSystem;\n","import './ColorPicker.css';\n\nimport Hammer from '../module/hammer';\nimport hammerUtil from '../hammerUtil';\nimport util from 'vis-util';\n\n\nvar htmlColors = {black: '#000000', navy: '#000080', darkblue: '#00008B', mediumblue: '#0000CD', blue: '#0000FF', darkgreen: '#006400', green: '#008000', teal: '#008080', darkcyan: '#008B8B', deepskyblue: '#00BFFF', darkturquoise: '#00CED1', mediumspringgreen: '#00FA9A', lime: '#00FF00', springgreen: '#00FF7F', aqua: '#00FFFF', cyan: '#00FFFF', midnightblue: '#191970', dodgerblue: '#1E90FF', lightseagreen: '#20B2AA', forestgreen: '#228B22', seagreen: '#2E8B57', darkslategray: '#2F4F4F', limegreen: '#32CD32', mediumseagreen: '#3CB371', turquoise: '#40E0D0', royalblue: '#4169E1', steelblue: '#4682B4', darkslateblue: '#483D8B', mediumturquoise: '#48D1CC', indigo: '#4B0082', darkolivegreen: '#556B2F', cadetblue: '#5F9EA0', cornflowerblue: '#6495ED', mediumaquamarine: '#66CDAA', dimgray: '#696969', slateblue: '#6A5ACD', olivedrab: '#6B8E23', slategray: '#708090', lightslategray: '#778899', mediumslateblue: '#7B68EE', lawngreen: '#7CFC00', chartreuse: '#7FFF00', aquamarine: '#7FFFD4', maroon: '#800000', purple: '#800080', olive: '#808000', gray: '#808080', skyblue: '#87CEEB', lightskyblue: '#87CEFA', blueviolet: '#8A2BE2', darkred: '#8B0000', darkmagenta: '#8B008B', saddlebrown: '#8B4513', darkseagreen: '#8FBC8F', lightgreen: '#90EE90', mediumpurple: '#9370D8', darkviolet: '#9400D3', palegreen: '#98FB98', darkorchid: '#9932CC', yellowgreen: '#9ACD32', sienna: '#A0522D', brown: '#A52A2A', darkgray: '#A9A9A9', lightblue: '#ADD8E6', greenyellow: '#ADFF2F', paleturquoise: '#AFEEEE', lightsteelblue: '#B0C4DE', powderblue: '#B0E0E6', firebrick: '#B22222', darkgoldenrod: '#B8860B', mediumorchid: '#BA55D3', rosybrown: '#BC8F8F', darkkhaki: '#BDB76B', silver: '#C0C0C0', mediumvioletred: '#C71585', indianred: '#CD5C5C', peru: '#CD853F', chocolate: '#D2691E', tan: '#D2B48C', lightgrey: '#D3D3D3', palevioletred: '#D87093', thistle: '#D8BFD8', orchid: '#DA70D6', goldenrod: '#DAA520', crimson: '#DC143C', gainsboro: '#DCDCDC', plum: '#DDA0DD', burlywood: '#DEB887', lightcyan: '#E0FFFF', lavender: '#E6E6FA', darksalmon: '#E9967A', violet: '#EE82EE', palegoldenrod: '#EEE8AA', lightcoral: '#F08080', khaki: '#F0E68C', aliceblue: '#F0F8FF', honeydew: '#F0FFF0', azure: '#F0FFFF', sandybrown: '#F4A460', wheat: '#F5DEB3', beige: '#F5F5DC', whitesmoke: '#F5F5F5', mintcream: '#F5FFFA', ghostwhite: '#F8F8FF', salmon: '#FA8072', antiquewhite: '#FAEBD7', linen: '#FAF0E6', lightgoldenrodyellow: '#FAFAD2', oldlace: '#FDF5E6', red: '#FF0000', fuchsia: '#FF00FF', magenta: '#FF00FF', deeppink: '#FF1493', orangered: '#FF4500', tomato: '#FF6347', hotpink: '#FF69B4', coral: '#FF7F50', darkorange: '#FF8C00', lightsalmon: '#FFA07A', orange: '#FFA500', lightpink: '#FFB6C1', pink: '#FFC0CB', gold: '#FFD700', peachpuff: '#FFDAB9', navajowhite: '#FFDEAD', moccasin: '#FFE4B5', bisque: '#FFE4C4', mistyrose: '#FFE4E1', blanchedalmond: '#FFEBCD', papayawhip: '#FFEFD5', lavenderblush: '#FFF0F5', seashell: '#FFF5EE', cornsilk: '#FFF8DC', lemonchiffon: '#FFFACD', floralwhite: '#FFFAF0', snow: '#FFFAFA', yellow: '#FFFF00', lightyellow: '#FFFFE0', ivory: '#FFFFF0', white: '#FFFFFF'};\n\n/**\n * @param {number} [pixelRatio=1]\n */\nclass ColorPicker {\n /**\n * @param {number} [pixelRatio=1]\n */\n constructor(pixelRatio = 1) {\n this.pixelRatio = pixelRatio;\n this.generated = false;\n this.centerCoordinates = {x:289/2, y:289/2};\n this.r = 289 * 0.49;\n this.color = {r:255,g:255,b:255,a:1.0};\n this.hueCircle = undefined;\n this.initialColor = {r:255,g:255,b:255,a:1.0};\n this.previousColor= undefined;\n this.applied = false;\n\n // bound by\n this.updateCallback = () => {};\n this.closeCallback = () => {};\n\n // create all DOM elements\n this._create();\n }\n\n\n /**\n * this inserts the colorPicker into a div from the DOM\n * @param {Element} container\n */\n insertTo(container) {\n if (this.hammer !== undefined) {\n this.hammer.destroy();\n this.hammer = undefined;\n }\n this.container = container;\n this.container.appendChild(this.frame);\n this._bindHammer();\n\n this._setSize();\n }\n\n /**\n * the callback is executed on apply and save. Bind it to the application\n * @param {function} callback\n */\n setUpdateCallback(callback) {\n if (typeof callback === 'function') {\n this.updateCallback = callback;\n }\n else {\n throw new Error(\"Function attempted to set as colorPicker update callback is not a function.\");\n }\n }\n\n /**\n * the callback is executed on apply and save. Bind it to the application\n * @param {function} callback\n */\n setCloseCallback(callback) {\n if (typeof callback === 'function') {\n this.closeCallback = callback;\n }\n else {\n throw new Error(\"Function attempted to set as colorPicker closing callback is not a function.\");\n }\n }\n\n /**\n *\n * @param {string} color\n * @returns {String}\n * @private\n */\n _isColorString(color) {\n if (typeof color === 'string') {\n return htmlColors[color];\n }\n }\n\n\n /**\n * Set the color of the colorPicker\n * Supported formats:\n * 'red' --> HTML color string\n * '#ffffff' --> hex string\n * 'rgb(255,255,255)' --> rgb string\n * 'rgba(255,255,255,1.0)' --> rgba string\n * {r:255,g:255,b:255} --> rgb object\n * {r:255,g:255,b:255,a:1.0} --> rgba object\n * @param {string|Object} color\n * @param {boolean} [setInitial=true]\n */\n setColor(color, setInitial = true) {\n if (color === 'none') {\n return;\n }\n\n let rgba;\n\n // if a html color shorthand is used, convert to hex\n var htmlColor = this._isColorString(color);\n if (htmlColor !== undefined) {\n color = htmlColor;\n }\n\n // check format\n if (util.isString(color) === true) {\n if (util.isValidRGB(color) === true) {\n let rgbaArray = color.substr(4).substr(0, color.length - 5).split(',');\n rgba = {r:rgbaArray[0], g:rgbaArray[1], b:rgbaArray[2], a:1.0};\n }\n else if (util.isValidRGBA(color) === true) {\n let rgbaArray = color.substr(5).substr(0, color.length - 6).split(',');\n rgba = {r:rgbaArray[0], g:rgbaArray[1], b:rgbaArray[2], a:rgbaArray[3]};\n }\n else if (util.isValidHex(color) === true) {\n let rgbObj = util.hexToRGB(color);\n rgba = {r:rgbObj.r, g:rgbObj.g, b:rgbObj.b, a:1.0};\n }\n }\n else {\n if (color instanceof Object) {\n if (color.r !== undefined && color.g !== undefined && color.b !== undefined) {\n let alpha = color.a !== undefined ? color.a : '1.0';\n rgba = {r:color.r, g:color.g, b:color.b, a:alpha};\n }\n }\n }\n\n // set color\n if (rgba === undefined) {\n throw new Error(\"Unknown color passed to the colorPicker. Supported are strings: rgb, hex, rgba. Object: rgb ({r:r,g:g,b:b,[a:a]}). Supplied: \" + JSON.stringify(color));\n }\n else {\n this._setColor(rgba, setInitial);\n }\n }\n\n\n /**\n * this shows the color picker.\n * The hue circle is constructed once and stored.\n */\n show() {\n if (this.closeCallback !== undefined) {\n this.closeCallback();\n this.closeCallback = undefined;\n }\n\n this.applied = false;\n this.frame.style.display = 'block';\n this._generateHueCircle();\n }\n\n // ------------------------------------------ PRIVATE ----------------------------- //\n\n /**\n * Hide the picker. Is called by the cancel button.\n * Optional boolean to store the previous color for easy access later on.\n * @param {boolean} [storePrevious=true]\n * @private\n */\n _hide(storePrevious = true) {\n // store the previous color for next time;\n if (storePrevious === true) {\n this.previousColor = util.extend({}, this.color);\n }\n\n if (this.applied === true) {\n this.updateCallback(this.initialColor);\n }\n\n this.frame.style.display = 'none';\n\n // call the closing callback, restoring the onclick method.\n // this is in a setTimeout because it will trigger the show again before the click is done.\n setTimeout(() => {\n if (this.closeCallback !== undefined) {\n this.closeCallback();\n this.closeCallback = undefined;\n }\n },0);\n }\n\n\n /**\n * bound to the save button. Saves and hides.\n * @private\n */\n _save() {\n this.updateCallback(this.color);\n this.applied = false;\n this._hide();\n }\n\n\n /**\n * Bound to apply button. Saves but does not close. Is undone by the cancel button.\n * @private\n */\n _apply() {\n this.applied = true;\n this.updateCallback(this.color);\n this._updatePicker(this.color);\n }\n\n\n /**\n * load the color from the previous session.\n * @private\n */\n _loadLast() {\n if (this.previousColor !== undefined) {\n this.setColor(this.previousColor, false);\n }\n else {\n alert(\"There is no last color to load...\");\n }\n }\n\n\n /**\n * set the color, place the picker\n * @param {Object} rgba\n * @param {boolean} [setInitial=true]\n * @private\n */\n _setColor(rgba, setInitial = true) {\n // store the initial color\n if (setInitial === true) {\n this.initialColor = util.extend({}, rgba);\n }\n\n this.color = rgba;\n let hsv = util.RGBToHSV(rgba.r, rgba.g, rgba.b);\n\n let angleConvert = 2 * Math.PI;\n let radius = this.r * hsv.s;\n let x = this.centerCoordinates.x + radius * Math.sin(angleConvert * hsv.h);\n let y = this.centerCoordinates.y + radius * Math.cos(angleConvert * hsv.h);\n\n this.colorPickerSelector.style.left = x - 0.5 * this.colorPickerSelector.clientWidth + 'px';\n this.colorPickerSelector.style.top = y - 0.5 * this.colorPickerSelector.clientHeight + 'px';\n\n this._updatePicker(rgba);\n }\n\n\n /**\n * bound to opacity control\n * @param {number} value\n * @private\n */\n _setOpacity(value) {\n this.color.a = value / 100;\n this._updatePicker(this.color);\n }\n\n\n /**\n * bound to brightness control\n * @param {number} value\n * @private\n */\n _setBrightness(value) {\n let hsv = util.RGBToHSV(this.color.r, this.color.g, this.color.b);\n hsv.v = value / 100;\n let rgba = util.HSVToRGB(hsv.h, hsv.s, hsv.v);\n rgba['a'] = this.color.a;\n this.color = rgba;\n this._updatePicker();\n }\n\n\n /**\n * update the color picker. A black circle overlays the hue circle to mimic the brightness decreasing.\n * @param {Object} rgba\n * @private\n */\n _updatePicker(rgba = this.color) {\n let hsv = util.RGBToHSV(rgba.r, rgba.g, rgba.b);\n let ctx = this.colorPickerCanvas.getContext('2d');\n if (this.pixelRation === undefined) {\n this.pixelRatio = (window.devicePixelRatio || 1) / (ctx.webkitBackingStorePixelRatio ||\n ctx.mozBackingStorePixelRatio ||\n ctx.msBackingStorePixelRatio ||\n ctx.oBackingStorePixelRatio ||\n ctx.backingStorePixelRatio || 1);\n }\n ctx.setTransform(this.pixelRatio, 0, 0, this.pixelRatio, 0, 0);\n\n // clear the canvas\n let w = this.colorPickerCanvas.clientWidth;\n let h = this.colorPickerCanvas.clientHeight;\n ctx.clearRect(0, 0, w, h);\n\n ctx.putImageData(this.hueCircle, 0,0);\n ctx.fillStyle = 'rgba(0,0,0,' + (1- hsv.v) + ')';\n ctx.circle(this.centerCoordinates.x, this.centerCoordinates.y, this.r);\n ctx.fill();\n\n this.brightnessRange.value = 100 * hsv.v;\n this.opacityRange.value = 100 * rgba.a;\n\n this.initialColorDiv.style.backgroundColor = 'rgba(' + this.initialColor.r + ',' + this.initialColor.g + ',' + this.initialColor.b + ',' + this.initialColor.a + ')';\n this.newColorDiv.style.backgroundColor = 'rgba(' + this.color.r + ',' + this.color.g + ',' + this.color.b + ',' + this.color.a + ')';\n }\n\n\n /**\n * used by create to set the size of the canvas.\n * @private\n */\n _setSize() {\n this.colorPickerCanvas.style.width = '100%';\n this.colorPickerCanvas.style.height = '100%';\n\n this.colorPickerCanvas.width = 289 * this.pixelRatio;\n this.colorPickerCanvas.height = 289 * this.pixelRatio;\n }\n\n\n /**\n * create all dom elements\n * TODO: cleanup, lots of similar dom elements\n * @private\n */\n _create() {\n this.frame = document.createElement('div');\n this.frame.className = 'vis-color-picker';\n\n this.colorPickerDiv = document.createElement('div');\n this.colorPickerSelector = document.createElement('div');\n this.colorPickerSelector.className = 'vis-selector';\n this.colorPickerDiv.appendChild(this.colorPickerSelector);\n\n this.colorPickerCanvas = document.createElement('canvas');\n this.colorPickerDiv.appendChild(this.colorPickerCanvas);\n\n if (!this.colorPickerCanvas.getContext) {\n let noCanvas = document.createElement( 'DIV' );\n noCanvas.style.color = 'red';\n noCanvas.style.fontWeight = 'bold' ;\n noCanvas.style.padding = '10px';\n noCanvas.innerHTML = 'Error: your browser does not support HTML canvas';\n this.colorPickerCanvas.appendChild(noCanvas);\n }\n else {\n let ctx = this.colorPickerCanvas.getContext(\"2d\");\n this.pixelRatio = (window.devicePixelRatio || 1) / (ctx.webkitBackingStorePixelRatio ||\n ctx.mozBackingStorePixelRatio ||\n ctx.msBackingStorePixelRatio ||\n ctx.oBackingStorePixelRatio ||\n ctx.backingStorePixelRatio || 1);\n this.colorPickerCanvas.getContext(\"2d\").setTransform(this.pixelRatio, 0, 0, this.pixelRatio, 0, 0);\n }\n\n this.colorPickerDiv.className = 'vis-color';\n\n this.opacityDiv = document.createElement('div');\n this.opacityDiv.className = 'vis-opacity';\n\n this.brightnessDiv = document.createElement('div');\n this.brightnessDiv.className = 'vis-brightness';\n\n this.arrowDiv = document.createElement('div');\n this.arrowDiv.className = 'vis-arrow';\n\n this.opacityRange = document.createElement('input');\n try {\n this.opacityRange.type = 'range'; // Not supported on IE9\n this.opacityRange.min = '0';\n this.opacityRange.max = '100';\n }\n // TODO: Add some error handling and remove this lint exception\n catch (err) {} // eslint-disable-line no-empty\n this.opacityRange.value = '100';\n this.opacityRange.className = 'vis-range';\n\n this.brightnessRange = document.createElement('input');\n try {\n this.brightnessRange.type = 'range'; // Not supported on IE9\n this.brightnessRange.min = '0';\n this.brightnessRange.max = '100';\n }\n // TODO: Add some error handling and remove this lint exception\n catch (err) {} // eslint-disable-line no-empty\n this.brightnessRange.value = '100';\n this.brightnessRange.className = 'vis-range';\n\n this.opacityDiv.appendChild(this.opacityRange);\n this.brightnessDiv.appendChild(this.brightnessRange);\n\n var me = this;\n this.opacityRange.onchange = function () {me._setOpacity(this.value);};\n this.opacityRange.oninput = function () {me._setOpacity(this.value);};\n this.brightnessRange.onchange = function () {me._setBrightness(this.value);};\n this.brightnessRange.oninput = function () {me._setBrightness(this.value);};\n\n this.brightnessLabel = document.createElement(\"div\");\n this.brightnessLabel.className = \"vis-label vis-brightness\";\n this.brightnessLabel.innerHTML = 'brightness:';\n\n this.opacityLabel = document.createElement(\"div\");\n this.opacityLabel.className = \"vis-label vis-opacity\";\n this.opacityLabel.innerHTML = 'opacity:';\n\n this.newColorDiv = document.createElement(\"div\");\n this.newColorDiv.className = \"vis-new-color\";\n this.newColorDiv.innerHTML = 'new';\n\n this.initialColorDiv = document.createElement(\"div\");\n this.initialColorDiv.className = \"vis-initial-color\";\n this.initialColorDiv.innerHTML = 'initial';\n\n this.cancelButton = document.createElement(\"div\");\n this.cancelButton.className = \"vis-button vis-cancel\";\n this.cancelButton.innerHTML = 'cancel';\n this.cancelButton.onclick = this._hide.bind(this, false);\n\n this.applyButton = document.createElement(\"div\");\n this.applyButton.className = \"vis-button vis-apply\";\n this.applyButton.innerHTML = 'apply';\n this.applyButton.onclick = this._apply.bind(this);\n\n this.saveButton = document.createElement(\"div\");\n this.saveButton.className = \"vis-button vis-save\";\n this.saveButton.innerHTML = 'save';\n this.saveButton.onclick = this._save.bind(this);\n\n this.loadButton = document.createElement(\"div\");\n this.loadButton.className = \"vis-button vis-load\";\n this.loadButton.innerHTML = 'load last';\n this.loadButton.onclick = this._loadLast.bind(this);\n\n this.frame.appendChild(this.colorPickerDiv);\n this.frame.appendChild(this.arrowDiv);\n this.frame.appendChild(this.brightnessLabel);\n this.frame.appendChild(this.brightnessDiv);\n this.frame.appendChild(this.opacityLabel);\n this.frame.appendChild(this.opacityDiv);\n this.frame.appendChild(this.newColorDiv);\n this.frame.appendChild(this.initialColorDiv);\n\n this.frame.appendChild(this.cancelButton);\n this.frame.appendChild(this.applyButton);\n this.frame.appendChild(this.saveButton);\n this.frame.appendChild(this.loadButton);\n }\n\n\n /**\n * bind hammer to the color picker\n * @private\n */\n _bindHammer() {\n this.drag = {};\n this.pinch = {};\n this.hammer = new Hammer(this.colorPickerCanvas);\n this.hammer.get('pinch').set({enable: true});\n\n hammerUtil.onTouch(this.hammer, (event) => {this._moveSelector(event)});\n this.hammer.on('tap', (event) => {this._moveSelector(event)});\n this.hammer.on('panstart', (event) => {this._moveSelector(event)});\n this.hammer.on('panmove', (event) => {this._moveSelector(event)});\n this.hammer.on('panend', (event) => {this._moveSelector(event)});\n }\n\n\n /**\n * generate the hue circle. This is relatively heavy (200ms) and is done only once on the first time it is shown.\n * @private\n */\n _generateHueCircle() {\n if (this.generated === false) {\n let ctx = this.colorPickerCanvas.getContext('2d');\n if (this.pixelRation === undefined) {\n this.pixelRatio = (window.devicePixelRatio || 1) / (ctx.webkitBackingStorePixelRatio ||\n ctx.mozBackingStorePixelRatio ||\n ctx.msBackingStorePixelRatio ||\n ctx.oBackingStorePixelRatio ||\n ctx.backingStorePixelRatio || 1);\n }\n ctx.setTransform(this.pixelRatio, 0, 0, this.pixelRatio, 0, 0);\n\n // clear the canvas\n let w = this.colorPickerCanvas.clientWidth;\n let h = this.colorPickerCanvas.clientHeight;\n ctx.clearRect(0, 0, w, h);\n\n\n // draw hue circle\n let x, y, hue, sat;\n this.centerCoordinates = {x: w * 0.5, y: h * 0.5};\n this.r = 0.49 * w;\n let angleConvert = (2 * Math.PI) / 360;\n let hfac = 1 / 360;\n let sfac = 1 / this.r;\n let rgb;\n for (hue = 0; hue < 360; hue++) {\n for (sat = 0; sat < this.r; sat++) {\n x = this.centerCoordinates.x + sat * Math.sin(angleConvert * hue);\n y = this.centerCoordinates.y + sat * Math.cos(angleConvert * hue);\n rgb = util.HSVToRGB(hue * hfac, sat * sfac, 1);\n ctx.fillStyle = 'rgb(' + rgb.r + ',' + rgb.g + ',' + rgb.b + ')';\n ctx.fillRect(x - 0.5, y - 0.5, 2, 2);\n }\n }\n ctx.strokeStyle = 'rgba(0,0,0,1)';\n ctx.circle(this.centerCoordinates.x, this.centerCoordinates.y, this.r);\n ctx.stroke();\n\n this.hueCircle = ctx.getImageData(0,0,w,h);\n }\n this.generated = true;\n }\n\n\n /**\n * move the selector. This is called by hammer functions.\n *\n * @param {Event} event The event\n * @private\n */\n _moveSelector(event) {\n let rect = this.colorPickerDiv.getBoundingClientRect();\n let left = event.center.x - rect.left;\n let top = event.center.y - rect.top;\n\n let centerY = 0.5 * this.colorPickerDiv.clientHeight;\n let centerX = 0.5 * this.colorPickerDiv.clientWidth;\n\n let x = left - centerX;\n let y = top - centerY;\n\n let angle = Math.atan2(x,y);\n let radius = 0.98 * Math.min(Math.sqrt(x * x + y * y), centerX);\n\n let newTop = Math.cos(angle) * radius + centerY;\n let newLeft = Math.sin(angle) * radius + centerX;\n\n this.colorPickerSelector.style.top = newTop - 0.5 * this.colorPickerSelector.clientHeight + 'px';\n this.colorPickerSelector.style.left = newLeft - 0.5 * this.colorPickerSelector.clientWidth + 'px';\n\n // set color\n let h = angle / (2 * Math.PI);\n h = h < 0 ? h + 1 : h;\n let s = radius / this.r;\n let hsv = util.RGBToHSV(this.color.r, this.color.g, this.color.b);\n hsv.h = h;\n hsv.s = s;\n let rgba = util.HSVToRGB(hsv.h, hsv.s, hsv.v);\n rgba['a'] = this.color.a;\n this.color = rgba;\n\n // update previews\n this.initialColorDiv.style.backgroundColor = 'rgba(' + this.initialColor.r + ',' + this.initialColor.g + ',' + this.initialColor.b + ',' + this.initialColor.a + ')';\n this.newColorDiv.style.backgroundColor = 'rgba(' + this.color.r + ',' + this.color.g + ',' + this.color.b + ',' + this.color.a + ')';\n }\n}\n\nexport default ColorPicker;\n","import './Configurator.css';\n\nimport util from 'vis-util';\n\nimport ColorPicker from './ColorPicker';\n\n/**\n * The way this works is for all properties of this.possible options, you can supply the property name in any form to list the options.\n * Boolean options are recognised as Boolean\n * Number options should be written as array: [default value, min value, max value, stepsize]\n * Colors should be written as array: ['color', '#ffffff']\n * Strings with should be written as array: [option1, option2, option3, ..]\n *\n * The options are matched with their counterparts in each of the modules and the values used in the configuration are\n */\nclass Configurator {\n /**\n * @param {Object} parentModule | the location where parentModule.setOptions() can be called\n * @param {Object} defaultContainer | the default container of the module\n * @param {Object} configureOptions | the fully configured and predefined options set found in allOptions.js\n * @param {number} pixelRatio | canvas pixel ratio\n */\n constructor(parentModule, defaultContainer, configureOptions, pixelRatio = 1) {\n this.parent = parentModule;\n this.changedOptions = [];\n this.container = defaultContainer;\n this.allowCreation = false;\n\n this.options = {};\n this.initialized = false;\n this.popupCounter = 0;\n this.defaultOptions = {\n enabled: false,\n filter: true,\n container: undefined,\n showButton: true\n };\n util.extend(this.options, this.defaultOptions);\n\n this.configureOptions = configureOptions;\n this.moduleOptions = {};\n this.domElements = [];\n this.popupDiv = {};\n this.popupLimit = 5;\n this.popupHistory = {};\n this.colorPicker = new ColorPicker(pixelRatio);\n this.wrapper = undefined;\n }\n\n\n /**\n * refresh all options.\n * Because all modules parse their options by themselves, we just use their options. We copy them here.\n *\n * @param {Object} options\n */\n setOptions(options) {\n if (options !== undefined) {\n // reset the popup history because the indices may have been changed.\n this.popupHistory = {};\n this._removePopup();\n\n let enabled = true;\n if (typeof options === 'string') {\n this.options.filter = options;\n }\n else if (options instanceof Array) {\n this.options.filter = options.join();\n }\n else if (typeof options === 'object') {\n if (options == null) {\n throw new TypeError('options cannot be null');\n }\n if (options.container !== undefined) {\n this.options.container = options.container;\n }\n if (options.filter !== undefined) {\n this.options.filter = options.filter;\n }\n if (options.showButton !== undefined) {\n this.options.showButton = options.showButton;\n }\n if (options.enabled !== undefined) {\n enabled = options.enabled;\n }\n }\n else if (typeof options === 'boolean') {\n this.options.filter = true;\n enabled = options;\n }\n else if (typeof options === 'function') {\n this.options.filter = options;\n enabled = true;\n }\n if (this.options.filter === false) {\n enabled = false;\n }\n\n this.options.enabled = enabled;\n }\n this._clean();\n }\n\n /**\n *\n * @param {Object} moduleOptions\n */\n setModuleOptions(moduleOptions) {\n this.moduleOptions = moduleOptions;\n if (this.options.enabled === true) {\n this._clean();\n if (this.options.container !== undefined) {\n this.container = this.options.container;\n }\n this._create();\n }\n }\n\n /**\n * Create all DOM elements\n * @private\n */\n _create() {\n this._clean();\n this.changedOptions = [];\n\n let filter = this.options.filter;\n let counter = 0;\n let show = false;\n for (let option in this.configureOptions) {\n if (this.configureOptions.hasOwnProperty(option)) {\n this.allowCreation = false;\n show = false;\n if (typeof filter === 'function') {\n show = filter(option,[]);\n show = show || this._handleObject(this.configureOptions[option], [option], true);\n }\n else if (filter === true || filter.indexOf(option) !== -1) {\n show = true;\n }\n\n if (show !== false) {\n this.allowCreation = true;\n\n // linebreak between categories\n if (counter > 0) {\n this._makeItem([]);\n }\n // a header for the category\n this._makeHeader(option);\n\n // get the sub options\n this._handleObject(this.configureOptions[option], [option]);\n }\n counter++;\n }\n }\n this._makeButton();\n this._push();\n //~ this.colorPicker.insertTo(this.container);\n }\n\n\n /**\n * draw all DOM elements on the screen\n * @private\n */\n _push() {\n this.wrapper = document.createElement('div');\n this.wrapper.className = 'vis-configuration-wrapper';\n this.container.appendChild(this.wrapper);\n for (var i = 0; i < this.domElements.length; i++) {\n this.wrapper.appendChild(this.domElements[i]);\n }\n\n this._showPopupIfNeeded()\n }\n\n\n /**\n * delete all DOM elements\n * @private\n */\n _clean() {\n for (var i = 0; i < this.domElements.length; i++) {\n this.wrapper.removeChild(this.domElements[i]);\n }\n\n if (this.wrapper !== undefined) {\n this.container.removeChild(this.wrapper);\n this.wrapper = undefined;\n }\n this.domElements = [];\n\n this._removePopup();\n }\n\n\n /**\n * get the value from the actualOptions if it exists\n * @param {array} path | where to look for the actual option\n * @returns {*}\n * @private\n */\n _getValue(path) {\n let base = this.moduleOptions;\n for (let i = 0; i < path.length; i++) {\n if (base[path[i]] !== undefined) {\n base = base[path[i]];\n }\n else {\n base = undefined;\n break;\n }\n }\n return base;\n }\n\n\n /**\n * all option elements are wrapped in an item\n * @param {Array} path | where to look for the actual option\n * @param {Array.} domElements\n * @returns {number}\n * @private\n */\n _makeItem(path, ...domElements) {\n if (this.allowCreation === true) {\n let item = document.createElement('div');\n item.className = 'vis-configuration vis-config-item vis-config-s' + path.length;\n domElements.forEach((element) => {\n item.appendChild(element);\n });\n this.domElements.push(item);\n return this.domElements.length;\n }\n return 0;\n }\n\n\n /**\n * header for major subjects\n * @param {string} name\n * @private\n */\n _makeHeader(name) {\n let div = document.createElement('div');\n div.className = 'vis-configuration vis-config-header';\n div.innerHTML = name;\n this._makeItem([],div);\n }\n\n\n /**\n * make a label, if it is an object label, it gets different styling.\n * @param {string} name\n * @param {array} path | where to look for the actual option\n * @param {string} objectLabel\n * @returns {HTMLElement}\n * @private\n */\n _makeLabel(name, path, objectLabel = false) {\n let div = document.createElement('div');\n div.className = 'vis-configuration vis-config-label vis-config-s' + path.length;\n if (objectLabel === true) {\n div.innerHTML = '' + name + ':';\n }\n else {\n div.innerHTML = name + ':';\n }\n return div;\n }\n\n\n /**\n * make a dropdown list for multiple possible string optoins\n * @param {Array.} arr\n * @param {number} value\n * @param {array} path | where to look for the actual option\n * @private\n */\n _makeDropdown(arr, value, path) {\n let select = document.createElement('select');\n select.className = 'vis-configuration vis-config-select';\n let selectedValue = 0;\n if (value !== undefined) {\n if (arr.indexOf(value) !== -1) {\n selectedValue = arr.indexOf(value);\n }\n }\n\n for (let i = 0; i < arr.length; i++) {\n let option = document.createElement('option');\n option.value = arr[i];\n if (i === selectedValue) {\n option.selected = 'selected';\n }\n option.innerHTML = arr[i];\n select.appendChild(option);\n }\n\n let me = this;\n select.onchange = function () {me._update(this.value, path);};\n\n let label = this._makeLabel(path[path.length-1], path);\n this._makeItem(path, label, select);\n }\n\n\n /**\n * make a range object for numeric options\n * @param {Array.} arr\n * @param {number} value\n * @param {array} path | where to look for the actual option\n * @private\n */\n _makeRange(arr, value, path) {\n let defaultValue = arr[0];\n let min = arr[1];\n let max = arr[2];\n let step = arr[3];\n let range = document.createElement('input');\n range.className = 'vis-configuration vis-config-range';\n try {\n range.type = 'range'; // not supported on IE9\n range.min = min;\n range.max = max;\n }\n // TODO: Add some error handling and remove this lint exception\n catch (err) {} // eslint-disable-line no-empty\n range.step = step;\n\n // set up the popup settings in case they are needed.\n let popupString = '';\n let popupValue = 0;\n\n if (value !== undefined) {\n let factor = 1.20;\n if (value < 0 && value * factor < min) {\n range.min = Math.ceil(value * factor);\n popupValue = range.min;\n popupString = 'range increased';\n }\n else if (value / factor < min) {\n range.min = Math.ceil(value / factor);\n popupValue = range.min;\n popupString = 'range increased';\n }\n if (value * factor > max && max !== 1) {\n range.max = Math.ceil(value * factor);\n popupValue = range.max;\n popupString = 'range increased';\n }\n range.value = value;\n }\n else {\n range.value = defaultValue;\n }\n\n let input = document.createElement('input');\n input.className = 'vis-configuration vis-config-rangeinput';\n input.value = range.value;\n\n var me = this;\n range.onchange = function () {input.value = this.value; me._update(Number(this.value), path);};\n range.oninput = function () {input.value = this.value; };\n\n let label = this._makeLabel(path[path.length-1], path);\n let itemIndex = this._makeItem(path, label, range, input);\n\n // if a popup is needed AND it has not been shown for this value, show it.\n if (popupString !== '' && this.popupHistory[itemIndex] !== popupValue) {\n this.popupHistory[itemIndex] = popupValue;\n this._setupPopup(popupString, itemIndex);\n }\n }\n\n /**\n * make a button object\n * @private\n */\n _makeButton() {\n if (this.options.showButton === true) {\n let generateButton = document.createElement('div');\n generateButton.className = 'vis-configuration vis-config-button';\n generateButton.innerHTML = 'generate options';\n generateButton.onclick = () => {this._printOptions();};\n generateButton.onmouseover = () => {generateButton.className = 'vis-configuration vis-config-button hover';};\n generateButton.onmouseout = () => {generateButton.className = 'vis-configuration vis-config-button';};\n\n this.optionsContainer = document.createElement('div');\n this.optionsContainer.className = 'vis-configuration vis-config-option-container';\n\n this.domElements.push(this.optionsContainer);\n this.domElements.push(generateButton);\n }\n }\n\n\n /**\n * prepare the popup\n * @param {string} string\n * @param {number} index\n * @private\n */\n _setupPopup(string, index) {\n if (this.initialized === true && this.allowCreation === true && this.popupCounter < this.popupLimit) {\n let div = document.createElement(\"div\");\n div.id = \"vis-configuration-popup\";\n div.className = \"vis-configuration-popup\";\n div.innerHTML = string;\n div.onclick = () => {this._removePopup()};\n this.popupCounter += 1;\n this.popupDiv = {html:div, index:index};\n }\n }\n\n\n /**\n * remove the popup from the dom\n * @private\n */\n _removePopup() {\n if (this.popupDiv.html !== undefined) {\n this.popupDiv.html.parentNode.removeChild(this.popupDiv.html);\n clearTimeout(this.popupDiv.hideTimeout);\n clearTimeout(this.popupDiv.deleteTimeout);\n this.popupDiv = {};\n }\n }\n\n\n /**\n * Show the popup if it is needed.\n * @private\n */\n _showPopupIfNeeded() {\n if (this.popupDiv.html !== undefined) {\n let correspondingElement = this.domElements[this.popupDiv.index];\n let rect = correspondingElement.getBoundingClientRect();\n this.popupDiv.html.style.left = rect.left + \"px\";\n this.popupDiv.html.style.top = rect.top - 30 + \"px\"; // 30 is the height;\n document.body.appendChild(this.popupDiv.html)\n this.popupDiv.hideTimeout = setTimeout(() => {\n this.popupDiv.html.style.opacity = 0;\n },1500);\n this.popupDiv.deleteTimeout = setTimeout(() => {\n this._removePopup();\n },1800)\n }\n }\n\n /**\n * make a checkbox for boolean options.\n * @param {number} defaultValue\n * @param {number} value\n * @param {array} path | where to look for the actual option\n * @private\n */\n _makeCheckbox(defaultValue, value, path) {\n var checkbox = document.createElement('input');\n checkbox.type = 'checkbox';\n checkbox.className = 'vis-configuration vis-config-checkbox';\n checkbox.checked = defaultValue;\n if (value !== undefined) {\n checkbox.checked = value;\n if (value !== defaultValue) {\n if (typeof defaultValue === 'object') {\n if (value !== defaultValue.enabled) {\n this.changedOptions.push({path:path, value:value});\n }\n }\n else {\n this.changedOptions.push({path:path, value:value});\n }\n }\n }\n\n let me = this;\n checkbox.onchange = function() {me._update(this.checked, path)};\n\n let label = this._makeLabel(path[path.length-1], path);\n this._makeItem(path, label, checkbox);\n }\n\n /**\n * make a text input field for string options.\n * @param {number} defaultValue\n * @param {number} value\n * @param {array} path | where to look for the actual option\n * @private\n */\n _makeTextInput(defaultValue, value, path) {\n var checkbox = document.createElement('input');\n checkbox.type = 'text';\n checkbox.className = 'vis-configuration vis-config-text';\n checkbox.value = value;\n if (value !== defaultValue) {\n this.changedOptions.push({path:path, value:value});\n }\n\n let me = this;\n checkbox.onchange = function() {me._update(this.value, path)};\n\n let label = this._makeLabel(path[path.length-1], path);\n this._makeItem(path, label, checkbox);\n }\n\n\n /**\n * make a color field with a color picker for color fields\n * @param {Array.} arr\n * @param {number} value\n * @param {array} path | where to look for the actual option\n * @private\n */\n _makeColorField(arr, value, path) {\n let defaultColor = arr[1];\n let div = document.createElement('div');\n value = value === undefined ? defaultColor : value;\n\n if (value !== 'none') {\n div.className = 'vis-configuration vis-config-colorBlock';\n div.style.backgroundColor = value;\n }\n else {\n div.className = 'vis-configuration vis-config-colorBlock none';\n }\n\n value = value === undefined ? defaultColor : value;\n div.onclick = () => {\n this._showColorPicker(value,div,path);\n };\n\n let label = this._makeLabel(path[path.length-1], path);\n this._makeItem(path,label, div);\n }\n\n\n /**\n * used by the color buttons to call the color picker.\n * @param {number} value\n * @param {HTMLElement} div\n * @param {array} path | where to look for the actual option\n * @private\n */\n _showColorPicker(value, div, path) {\n // clear the callback from this div\n div.onclick = function() {};\n\n this.colorPicker.insertTo(div);\n this.colorPicker.show();\n\n this.colorPicker.setColor(value);\n this.colorPicker.setUpdateCallback((color) => {\n let colorString = 'rgba(' + color.r + ',' + color.g + ',' + color.b + ',' + color.a + ')';\n div.style.backgroundColor = colorString;\n this._update(colorString,path);\n });\n\n // on close of the colorpicker, restore the callback.\n this.colorPicker.setCloseCallback(() => {\n div.onclick = () => {\n this._showColorPicker(value,div,path);\n };\n });\n }\n\n\n /**\n * parse an object and draw the correct items\n * @param {Object} obj\n * @param {array} [path=[]] | where to look for the actual option\n * @param {boolean} [checkOnly=false]\n * @returns {boolean}\n * @private\n */\n _handleObject(obj, path = [], checkOnly = false) {\n let show = false;\n let filter = this.options.filter;\n let visibleInSet = false;\n for (let subObj in obj) {\n if (obj.hasOwnProperty(subObj)) {\n show = true;\n let item = obj[subObj];\n let newPath = util.copyAndExtendArray(path, subObj);\n if (typeof filter === 'function') {\n show = filter(subObj,path);\n\n // if needed we must go deeper into the object.\n if (show === false) {\n if (!(item instanceof Array) && typeof item !== 'string' && typeof item !== 'boolean' && item instanceof Object) {\n this.allowCreation = false;\n show = this._handleObject(item, newPath, true);\n this.allowCreation = checkOnly === false;\n }\n }\n }\n\n if (show !== false) {\n visibleInSet = true;\n let value = this._getValue(newPath);\n\n if (item instanceof Array) {\n this._handleArray(item, value, newPath);\n }\n else if (typeof item === 'string') {\n this._makeTextInput(item, value, newPath);\n }\n else if (typeof item === 'boolean') {\n this._makeCheckbox(item, value, newPath);\n }\n else if (item instanceof Object) {\n // collapse the physics options that are not enabled\n let draw = true;\n if (path.indexOf('physics') !== -1) {\n if (this.moduleOptions.physics.solver !== subObj) {\n draw = false;\n }\n }\n\n if (draw === true) {\n // initially collapse options with an disabled enabled option.\n if (item.enabled !== undefined) {\n let enabledPath = util.copyAndExtendArray(newPath, 'enabled');\n let enabledValue = this._getValue(enabledPath);\n if (enabledValue === true) {\n let label = this._makeLabel(subObj, newPath, true);\n this._makeItem(newPath, label);\n visibleInSet = this._handleObject(item, newPath) || visibleInSet;\n }\n else {\n this._makeCheckbox(item, enabledValue, newPath);\n }\n }\n else {\n let label = this._makeLabel(subObj, newPath, true);\n this._makeItem(newPath, label);\n visibleInSet = this._handleObject(item, newPath) || visibleInSet;\n }\n }\n }\n else {\n console.error('dont know how to handle', item, subObj, newPath);\n }\n }\n }\n }\n return visibleInSet;\n }\n\n\n /**\n * handle the array type of option\n * @param {Array.} arr\n * @param {number} value\n * @param {array} path | where to look for the actual option\n * @private\n */\n _handleArray(arr, value, path) {\n if (typeof arr[0] === 'string' && arr[0] === 'color') {\n this._makeColorField(arr, value, path);\n if (arr[1] !== value) {this.changedOptions.push({path:path, value:value});}\n }\n else if (typeof arr[0] === 'string') {\n this._makeDropdown(arr, value, path);\n if (arr[0] !== value) {this.changedOptions.push({path:path, value:value});}\n }\n else if (typeof arr[0] === 'number') {\n this._makeRange(arr, value, path);\n if (arr[0] !== value) {this.changedOptions.push({path:path, value:Number(value)});}\n }\n }\n\n\n\n /**\n * called to update the network with the new settings.\n * @param {number} value\n * @param {array} path | where to look for the actual option\n * @private\n */\n _update(value, path) {\n let options = this._constructOptions(value,path);\n\n if (this.parent.body && this.parent.body.emitter && this.parent.body.emitter.emit) {\n this.parent.body.emitter.emit(\"configChange\", options);\n }\n this.initialized = true;\n this.parent.setOptions(options);\n }\n\n\n /**\n *\n * @param {string|Boolean} value\n * @param {Array.} path\n * @param {{}} optionsObj\n * @returns {{}}\n * @private\n */\n _constructOptions(value, path, optionsObj = {}) {\n let pointer = optionsObj;\n\n // when dropdown boxes can be string or boolean, we typecast it into correct types\n value = value === 'true' ? true : value;\n value = value === 'false' ? false : value;\n\n for (let i = 0; i < path.length; i++) {\n if (path[i] !== 'global') {\n if (pointer[path[i]] === undefined) {\n pointer[path[i]] = {};\n }\n if (i !== path.length - 1) {\n pointer = pointer[path[i]];\n }\n else {\n pointer[path[i]] = value;\n }\n }\n }\n return optionsObj;\n }\n\n /**\n * @private\n */\n _printOptions() {\n let options = this.getOptions();\n this.optionsContainer.innerHTML = '
var options = ' + JSON.stringify(options, null, 2) + '
';\n }\n\n /**\n *\n * @returns {{}} options\n */\n getOptions() {\n let options = {};\n for (var i = 0; i < this.changedOptions.length; i++) {\n this._constructOptions(this.changedOptions[i].value, this.changedOptions[i].path, options)\n }\n return options;\n }\n}\n\n\nexport default Configurator;\n","/**\n * This object contains all possible options. It will check if the types are correct, if required if the option is one\n * of the allowed values.\n *\n * __any__ means that the name of the property does not matter.\n * __type__ is a required field for all objects and contains the allowed types of all objects\n */\nlet string = 'string';\nlet bool = 'boolean';\nlet number = 'number';\nlet array = 'array';\nlet object = 'object'; // should only be in a __type__ property\nlet dom = 'dom';\nlet any = 'any';\n\n// List of endpoints\nlet endPoints = ['arrow', 'circle', 'bar'];\n\nlet allOptions = {\n configure: {\n enabled: { boolean: bool },\n filter: { boolean: bool, string, array, 'function': 'function' },\n container: { dom },\n showButton: { boolean: bool },\n __type__: { object, boolean: bool, string, array, 'function': 'function' }\n },\n edges: {\n arrows: {\n to: { enabled: { boolean: bool }, scaleFactor: { number }, type: { string: endPoints }, __type__: { object, boolean: bool } },\n middle: { enabled: { boolean: bool }, scaleFactor: { number }, type: { string: endPoints }, __type__: { object, boolean: bool } },\n from: { enabled: { boolean: bool }, scaleFactor: { number }, type: { string: endPoints }, __type__: { object, boolean: bool } },\n __type__: { string: ['from', 'to', 'middle'], object }\n },\n arrowStrikethrough: { boolean: bool },\n background: {\n enabled: { boolean: bool },\n color: { string },\n size: { number },\n dashes: { boolean: bool, array },\n __type__: { object, boolean: bool }\n },\n chosen: {\n label: { boolean: bool, 'function': 'function' },\n edge: { boolean: bool, 'function': 'function' },\n __type__: { object, boolean: bool }\n },\n color: {\n color: { string },\n highlight: { string },\n hover: { string },\n inherit: { string: ['from', 'to', 'both'], boolean: bool },\n opacity: { number },\n __type__: { object, string }\n },\n dashes: { boolean: bool, array },\n font: {\n color: { string },\n size: { number }, // px\n face: { string },\n background: { string },\n strokeWidth: { number }, // px\n strokeColor: { string },\n align: { string: ['horizontal', 'top', 'middle', 'bottom'] },\n vadjust: { number },\n multi: { boolean: bool, string },\n bold: {\n color: { string },\n size: { number }, // px\n face: { string },\n mod: { string },\n vadjust: { number },\n __type__: { object, string }\n },\n boldital: {\n color: { string },\n size: { number }, // px\n face: { string },\n mod: { string },\n vadjust: { number },\n __type__: { object, string }\n },\n ital: {\n color: { string },\n size: { number }, // px\n face: { string },\n mod: { string },\n vadjust: { number },\n __type__: { object, string }\n },\n mono: {\n color: { string },\n size: { number }, // px\n face: { string },\n mod: { string },\n vadjust: { number },\n __type__: { object, string }\n },\n __type__: { object, string }\n },\n hidden: { boolean: bool },\n hoverWidth: { 'function': 'function', number },\n label: { string, 'undefined': 'undefined' },\n labelHighlightBold: { boolean: bool },\n length: { number, 'undefined': 'undefined' },\n physics: { boolean: bool },\n scaling: {\n min: { number },\n max: { number },\n label: {\n enabled: { boolean: bool },\n min: { number },\n max: { number },\n maxVisible: { number },\n drawThreshold: { number },\n __type__: { object, boolean: bool }\n },\n customScalingFunction: { 'function': 'function' },\n __type__: { object }\n },\n selectionWidth: { 'function': 'function', number },\n selfReferenceSize: { number },\n shadow: {\n enabled: { boolean: bool },\n color: { string },\n size: { number },\n x: { number },\n y: { number },\n __type__: { object, boolean: bool }\n },\n smooth: {\n enabled: { boolean: bool },\n type: { string: ['dynamic', 'continuous', 'discrete', 'diagonalCross', 'straightCross', 'horizontal', 'vertical', 'curvedCW', 'curvedCCW', 'cubicBezier'] },\n roundness: { number },\n forceDirection: { string: ['horizontal', 'vertical', 'none'], boolean: bool },\n __type__: { object, boolean: bool }\n },\n title: { string, 'undefined': 'undefined' },\n width: { number },\n widthConstraint: {\n maximum: { number },\n __type__: { object, boolean: bool, number }\n },\n value: { number, 'undefined': 'undefined' },\n __type__: { object }\n },\n groups: {\n useDefaultGroups: { boolean: bool },\n __any__: 'get from nodes, will be overwritten below',\n __type__: { object }\n },\n interaction: {\n dragNodes: { boolean: bool },\n dragView: { boolean: bool },\n hideEdgesOnDrag: { boolean: bool },\n hideEdgesOnZoom: { boolean: bool },\n hideNodesOnDrag: { boolean: bool },\n hover: { boolean: bool },\n keyboard: {\n enabled: { boolean: bool },\n speed: { x: { number }, y: { number }, zoom: { number }, __type__: { object } },\n bindToWindow: { boolean: bool },\n __type__: { object, boolean: bool }\n },\n multiselect: { boolean: bool },\n navigationButtons: { boolean: bool },\n selectable: { boolean: bool },\n selectConnectedEdges: { boolean: bool },\n hoverConnectedEdges: { boolean: bool },\n tooltipDelay: { number },\n zoomView: { boolean: bool },\n zoomSpeed: { number },\n __type__: { object }\n },\n layout: {\n randomSeed: { 'undefined': 'undefined', number },\n improvedLayout: { boolean: bool },\n hierarchical: {\n enabled: { boolean: bool },\n levelSeparation: { number },\n nodeSpacing: { number },\n treeSpacing: { number },\n blockShifting: { boolean: bool },\n edgeMinimization: { boolean: bool },\n parentCentralization: { boolean: bool },\n direction: { string: ['UD', 'DU', 'LR', 'RL'] }, // UD, DU, LR, RL\n sortMethod: { string: ['hubsize', 'directed'] }, // hubsize, directed\n __type__: { object, boolean: bool }\n },\n __type__: { object }\n },\n manipulation: {\n enabled: { boolean: bool },\n initiallyActive: { boolean: bool },\n addNode: { boolean: bool, 'function': 'function' },\n addEdge: { boolean: bool, 'function': 'function' },\n editNode: { 'function': 'function' },\n editEdge: {\n editWithoutDrag: { 'function' : 'function' },\n __type__: {object, boolean: bool, 'function': 'function' }\n },\n deleteNode: { boolean: bool, 'function': 'function' },\n deleteEdge: { boolean: bool, 'function': 'function' },\n controlNodeStyle: 'get from nodes, will be overwritten below',\n __type__: { object, boolean: bool }\n },\n nodes: {\n borderWidth: { number },\n borderWidthSelected: { number, 'undefined': 'undefined' },\n brokenImage: { string, 'undefined': 'undefined' },\n chosen: {\n label: { boolean: bool, 'function': 'function' },\n node: { boolean: bool, 'function': 'function' },\n __type__: { object, boolean: bool }\n },\n color: {\n border: { string },\n background: { string },\n highlight: {\n border: { string },\n background: { string },\n __type__: { object, string }\n },\n hover: {\n border: { string },\n background: { string },\n __type__: { object, string }\n },\n __type__: { object, string }\n },\n fixed: {\n x: { boolean: bool },\n y: { boolean: bool },\n __type__: { object, boolean: bool }\n },\n font: {\n align: { string },\n color: { string },\n size: { number }, // px\n face: { string },\n background: { string },\n strokeWidth: { number }, // px\n strokeColor: { string },\n vadjust: { number },\n multi: { boolean: bool, string },\n bold: {\n color: { string },\n size: { number }, // px\n face: { string },\n mod: { string },\n vadjust: { number },\n __type__: { object, string }\n },\n boldital: {\n color: { string },\n size: { number }, // px\n face: { string },\n mod: { string },\n vadjust: { number },\n __type__: { object, string }\n },\n ital: {\n color: { string },\n size: { number }, // px\n face: { string },\n mod: { string },\n vadjust: { number },\n __type__: { object, string }\n },\n mono: {\n color: { string },\n size: { number }, // px\n face: { string },\n mod: { string },\n vadjust: { number },\n __type__: { object, string }\n },\n __type__: { object, string }\n },\n group: { string, number, 'undefined': 'undefined' },\n heightConstraint: {\n minimum: { number },\n valign: { string },\n __type__: { object, boolean: bool, number }\n },\n hidden: { boolean: bool },\n icon: {\n face: { string },\n code: { string }, //'\\uf007',\n size: { number }, //50,\n color: { string },\n __type__: { object }\n },\n id: { string, number },\n image: {\n selected: { string, 'undefined': 'undefined' }, // --> URL\n unselected: { string, 'undefined': 'undefined' }, // --> URL\n __type__: { object, string }\n },\n label: { string, 'undefined': 'undefined' },\n labelHighlightBold: { boolean: bool },\n level: { number, 'undefined': 'undefined' },\n margin: {\n top: { number },\n right: { number },\n bottom: { number },\n left: { number },\n __type__: { object, number }\n },\n mass: { number },\n physics: { boolean: bool },\n scaling: {\n min: { number },\n max: { number },\n label: {\n enabled: { boolean: bool },\n min: { number },\n max: { number },\n maxVisible: { number },\n drawThreshold: { number },\n __type__: { object, boolean: bool }\n },\n customScalingFunction: { 'function': 'function' },\n __type__: { object }\n },\n shadow: {\n enabled: { boolean: bool },\n color: { string },\n size: { number },\n x: { number },\n y: { number },\n __type__: { object, boolean: bool }\n },\n shape: { string: ['ellipse', 'circle', 'database', 'box', 'text', 'image', 'circularImage', 'diamond', 'dot', 'star', 'triangle', 'triangleDown', 'square', 'icon', 'hexagon'] },\n shapeProperties: {\n borderDashes: { boolean: bool, array },\n borderRadius: { number },\n interpolation: { boolean: bool },\n useImageSize: { boolean: bool },\n useBorderWithImage: { boolean: bool },\n __type__: { object }\n },\n size: { number },\n title: { string, dom, 'undefined': 'undefined' },\n value: { number, 'undefined': 'undefined' },\n widthConstraint: {\n minimum: { number },\n maximum: { number },\n __type__: { object, boolean: bool, number }\n },\n x: { number },\n y: { number },\n __type__: { object }\n },\n physics: {\n enabled: { boolean: bool },\n barnesHut: {\n gravitationalConstant: { number },\n centralGravity: { number },\n springLength: { number },\n springConstant: { number },\n damping: { number },\n avoidOverlap: { number },\n __type__: { object }\n },\n forceAtlas2Based: {\n gravitationalConstant: { number },\n centralGravity: { number },\n springLength: { number },\n springConstant: { number },\n damping: { number },\n avoidOverlap: { number },\n __type__: { object }\n },\n repulsion: {\n centralGravity: { number },\n springLength: { number },\n springConstant: { number },\n nodeDistance: { number },\n damping: { number },\n __type__: { object }\n },\n hierarchicalRepulsion: {\n centralGravity: { number },\n springLength: { number },\n springConstant: { number },\n nodeDistance: { number },\n damping: { number },\n __type__: { object }\n },\n maxVelocity: { number },\n minVelocity: { number }, // px/s\n solver: { string: ['barnesHut', 'repulsion', 'hierarchicalRepulsion', 'forceAtlas2Based'] },\n stabilization: {\n enabled: { boolean: bool },\n iterations: { number }, // maximum number of iteration to stabilize\n updateInterval: { number },\n onlyDynamicEdges: { boolean: bool },\n fit: { boolean: bool },\n __type__: { object, boolean: bool }\n },\n timestep: { number },\n adaptiveTimestep: { boolean: bool },\n __type__: { object, boolean: bool }\n },\n\n //globals :\n autoResize: { boolean: bool },\n clickToUse: { boolean: bool },\n locale: { string },\n locales: {\n __any__: { any },\n __type__: { object }\n },\n height: { string },\n width: { string },\n __type__: { object }\n};\n\nallOptions.groups.__any__ = allOptions.nodes;\nallOptions.manipulation.controlNodeStyle = allOptions.nodes;\n\n\nlet configureOptions = {\n nodes: {\n borderWidth: [1, 0, 10, 1],\n borderWidthSelected: [2, 0, 10, 1],\n color: {\n border: ['color', '#2B7CE9'],\n background: ['color', '#97C2FC'],\n highlight: {\n border: ['color', '#2B7CE9'],\n background: ['color', '#D2E5FF']\n },\n hover: {\n border: ['color', '#2B7CE9'],\n background: ['color', '#D2E5FF']\n }\n },\n fixed: {\n x: false,\n y: false\n },\n font: {\n color: ['color', '#343434'],\n size: [14, 0, 100, 1], // px\n face: ['arial', 'verdana', 'tahoma'],\n background: ['color', 'none'],\n strokeWidth: [0, 0, 50, 1], // px\n strokeColor: ['color', '#ffffff']\n },\n //group: 'string',\n hidden: false,\n labelHighlightBold: true,\n //icon: {\n // face: 'string', //'FontAwesome',\n // code: 'string', //'\\uf007',\n // size: [50, 0, 200, 1], //50,\n // color: ['color','#2B7CE9'] //'#aa00ff'\n //},\n //image: 'string', // --> URL\n physics: true,\n scaling: {\n min: [10, 0, 200, 1],\n max: [30, 0, 200, 1],\n label: {\n enabled: false,\n min: [14, 0, 200, 1],\n max: [30, 0, 200, 1],\n maxVisible: [30, 0, 200, 1],\n drawThreshold: [5, 0, 20, 1]\n }\n },\n shadow: {\n enabled: false,\n color: 'rgba(0,0,0,0.5)',\n size: [10, 0, 20, 1],\n x: [5, -30, 30, 1],\n y: [5, -30, 30, 1]\n },\n shape: ['ellipse', 'box', 'circle', 'database', 'diamond', 'dot', 'square', 'star', 'text', 'triangle', 'triangleDown','hexagon'],\n shapeProperties: {\n borderDashes: false,\n borderRadius: [6, 0, 20, 1],\n interpolation: true,\n useImageSize: false\n },\n size: [25, 0, 200, 1]\n },\n edges: {\n arrows: {\n to: { enabled: false, scaleFactor: [1, 0, 3, 0.05], type: 'arrow' },\n middle: { enabled: false, scaleFactor: [1, 0, 3, 0.05], type: 'arrow' },\n from: { enabled: false, scaleFactor: [1, 0, 3, 0.05], type: 'arrow' }\n },\n arrowStrikethrough: true,\n color: {\n color: ['color', '#848484'],\n highlight: ['color', '#848484'],\n hover: ['color', '#848484'],\n inherit: ['from', 'to', 'both', true, false],\n opacity: [1, 0, 1, 0.05]\n },\n dashes: false,\n font: {\n color: ['color', '#343434'],\n size: [14, 0, 100, 1], // px\n face: ['arial', 'verdana', 'tahoma'],\n background: ['color', 'none'],\n strokeWidth: [2, 0, 50, 1], // px\n strokeColor: ['color', '#ffffff'],\n align: ['horizontal', 'top', 'middle', 'bottom']\n },\n hidden: false,\n hoverWidth: [1.5, 0, 5, 0.1],\n labelHighlightBold: true,\n physics: true,\n scaling: {\n min: [1, 0, 100, 1],\n max: [15, 0, 100, 1],\n label: {\n enabled: true,\n min: [14, 0, 200, 1],\n max: [30, 0, 200, 1],\n maxVisible: [30, 0, 200, 1],\n drawThreshold: [5, 0, 20, 1]\n }\n },\n selectionWidth: [1.5, 0, 5, 0.1],\n selfReferenceSize: [20, 0, 200, 1],\n shadow: {\n enabled: false,\n color: 'rgba(0,0,0,0.5)',\n size: [10, 0, 20, 1],\n x: [5, -30, 30, 1],\n y: [5, -30, 30, 1]\n },\n smooth: {\n enabled: true,\n type: ['dynamic', 'continuous', 'discrete', 'diagonalCross', 'straightCross', 'horizontal', 'vertical', 'curvedCW', 'curvedCCW', 'cubicBezier'],\n forceDirection: ['horizontal', 'vertical', 'none'],\n roundness: [0.5, 0, 1, 0.05]\n },\n width: [1, 0, 30, 1]\n },\n layout: {\n //randomSeed: [0, 0, 500, 1],\n //improvedLayout: true,\n hierarchical: {\n enabled: false,\n levelSeparation: [150, 20, 500, 5],\n nodeSpacing: [100, 20, 500, 5],\n treeSpacing: [200, 20, 500, 5],\n blockShifting: true,\n edgeMinimization: true,\n parentCentralization: true,\n direction: ['UD', 'DU', 'LR', 'RL'], // UD, DU, LR, RL\n sortMethod: ['hubsize', 'directed'] // hubsize, directed\n }\n },\n interaction: {\n dragNodes: true,\n dragView: true,\n hideEdgesOnDrag: false,\n hideEdgesOnZoom: false,\n hideNodesOnDrag: false,\n hover: false,\n keyboard: {\n enabled: false,\n speed: { x: [10, 0, 40, 1], y: [10, 0, 40, 1], zoom: [0.02, 0, 0.1, 0.005] },\n bindToWindow: true\n },\n multiselect: false,\n navigationButtons: false,\n selectable: true,\n selectConnectedEdges: true,\n hoverConnectedEdges: true,\n tooltipDelay: [300, 0, 1000, 25],\n zoomView: true,\n zoomSpeed: [1, 1, 1, 1]\n },\n manipulation: {\n enabled: false,\n initiallyActive: false\n },\n physics: {\n enabled: true,\n barnesHut: {\n //theta: [0.5, 0.1, 1, 0.05],\n gravitationalConstant: [-2000, -30000, 0, 50],\n centralGravity: [0.3, 0, 10, 0.05],\n springLength: [95, 0, 500, 5],\n springConstant: [0.04, 0, 1.2, 0.005],\n damping: [0.09, 0, 1, 0.01],\n avoidOverlap: [0, 0, 1, 0.01]\n },\n forceAtlas2Based: {\n //theta: [0.5, 0.1, 1, 0.05],\n gravitationalConstant: [-50, -500, 0, 1],\n centralGravity: [0.01, 0, 1, 0.005],\n springLength: [95, 0, 500, 5],\n springConstant: [0.08, 0, 1.2, 0.005],\n damping: [0.4, 0, 1, 0.01],\n avoidOverlap: [0, 0, 1, 0.01]\n },\n repulsion: {\n centralGravity: [0.2, 0, 10, 0.05],\n springLength: [200, 0, 500, 5],\n springConstant: [0.05, 0, 1.2, 0.005],\n nodeDistance: [100, 0, 500, 5],\n damping: [0.09, 0, 1, 0.01]\n },\n hierarchicalRepulsion: {\n centralGravity: [0.2, 0, 10, 0.05],\n springLength: [100, 0, 500, 5],\n springConstant: [0.01, 0, 1.2, 0.005],\n nodeDistance: [120, 0, 500, 5],\n damping: [0.09, 0, 1, 0.01]\n },\n maxVelocity: [50, 0, 150, 1],\n minVelocity: [0.1, 0.01, 0.5, 0.01],\n solver: ['barnesHut', 'forceAtlas2Based', 'repulsion', 'hierarchicalRepulsion'],\n timestep: [0.5, 0.01, 1, 0.01],\n //adaptiveTimestep: true\n }\n};\n\nexport {allOptions, configureOptions};\n","/**\n * The Floyd–Warshall algorithm is an algorithm for finding shortest paths in\n * a weighted graph with positive or negative edge weights (but with no negative\n * cycles). - https://en.wikipedia.org/wiki/Floyd–Warshall_algorithm\n */\nclass FloydWarshall {\n /**\n * @ignore\n */\n constructor() {\n }\n\n /**\n *\n * @param {Object} body\n * @param {Array.} nodesArray\n * @param {Array.} edgesArray\n * @returns {{}}\n */\n getDistances(body, nodesArray, edgesArray) {\n let D_matrix = {};\n let edges = body.edges;\n\n // prepare matrix with large numbers\n for (let i = 0; i < nodesArray.length; i++) {\n let node = nodesArray[i];\n let cell = {};\n D_matrix[node] = cell;\n for (let j = 0; j < nodesArray.length; j++) {\n cell[nodesArray[j]] = (i == j ? 0 : 1e9);\n }\n }\n\n // put the weights for the edges in. This assumes unidirectionality.\n for (let i = 0; i < edgesArray.length; i++) {\n let edge = edges[edgesArray[i]];\n // edge has to be connected if it counts to the distances. If it is connected to inner clusters it will crash so we also check if it is in the D_matrix\n if (edge.connected === true && D_matrix[edge.fromId] !== undefined && D_matrix[edge.toId] !== undefined) {\n D_matrix[edge.fromId][edge.toId] = 1;\n D_matrix[edge.toId][edge.fromId] = 1;\n }\n }\n\n let nodeCount = nodesArray.length;\n\n // Adapted FloydWarshall based on unidirectionality to greatly reduce complexity.\n for (let k = 0; k < nodeCount; k++) {\n let knode = nodesArray[k];\n let kcolm = D_matrix[knode];\n for (let i = 0; i < nodeCount - 1; i++) {\n let inode = nodesArray[i];\n let icolm = D_matrix[inode];\n for (let j = i + 1; j < nodeCount; j++) {\n let jnode = nodesArray[j];\n let jcolm = D_matrix[jnode];\n\n let val = Math.min(icolm[jnode], icolm[knode] + kcolm[jnode]);\n icolm[jnode] = val;\n jcolm[inode] = val;\n }\n }\n }\n\n return D_matrix;\n }\n}\n\nexport default FloydWarshall;","// distance finding algorithm\nimport FloydWarshall from \"./components/algorithms/FloydWarshall.js\"\n\n\n/**\n * KamadaKawai positions the nodes initially based on\n *\n * \"AN ALGORITHM FOR DRAWING GENERAL UNDIRECTED GRAPHS\"\n * -- Tomihisa KAMADA and Satoru KAWAI in 1989\n *\n * Possible optimizations in the distance calculation can be implemented.\n */\nclass KamadaKawai {\n /**\n * @param {Object} body\n * @param {number} edgeLength\n * @param {number} edgeStrength\n */\n constructor(body, edgeLength, edgeStrength) {\n this.body = body;\n this.springLength = edgeLength;\n this.springConstant = edgeStrength;\n this.distanceSolver = new FloydWarshall();\n }\n\n /**\n * Not sure if needed but can be used to update the spring length and spring constant\n * @param {Object} options\n */\n setOptions(options) {\n if (options) {\n if (options.springLength) {\n this.springLength = options.springLength;\n }\n if (options.springConstant) {\n this.springConstant = options.springConstant;\n }\n }\n }\n\n\n /**\n * Position the system\n * @param {Array.} nodesArray\n * @param {Array.} edgesArray\n * @param {boolean} [ignoreClusters=false]\n */\n solve(nodesArray, edgesArray, ignoreClusters = false) {\n // get distance matrix\n let D_matrix = this.distanceSolver.getDistances(this.body, nodesArray, edgesArray); // distance matrix\n\n // get the L Matrix\n this._createL_matrix(D_matrix);\n\n // get the K Matrix\n this._createK_matrix(D_matrix);\n\n // initial E Matrix\n this._createE_matrix();\n\n // calculate positions\n let threshold = 0.01;\n let innerThreshold = 1;\n let iterations = 0;\n let maxIterations = Math.max(1000, Math.min(10 * this.body.nodeIndices.length, 6000));\n let maxInnerIterations = 5;\n\n let maxEnergy = 1e9;\n let highE_nodeId = 0, dE_dx = 0, dE_dy = 0, delta_m = 0, subIterations = 0;\n\n while (maxEnergy > threshold && iterations < maxIterations) {\n iterations += 1;\n [highE_nodeId, maxEnergy, dE_dx, dE_dy] = this._getHighestEnergyNode(ignoreClusters);\n delta_m = maxEnergy;\n subIterations = 0;\n while (delta_m > innerThreshold && subIterations < maxInnerIterations) {\n subIterations += 1;\n this._moveNode(highE_nodeId, dE_dx, dE_dy);\n [delta_m, dE_dx, dE_dy] = this._getEnergy(highE_nodeId);\n }\n }\n }\n\n /**\n * get the node with the highest energy\n * @param {boolean} ignoreClusters\n * @returns {number[]}\n * @private\n */\n _getHighestEnergyNode(ignoreClusters) {\n let nodesArray = this.body.nodeIndices;\n let nodes = this.body.nodes;\n let maxEnergy = 0;\n let maxEnergyNodeId = nodesArray[0];\n let dE_dx_max = 0, dE_dy_max = 0;\n\n for (let nodeIdx = 0; nodeIdx < nodesArray.length; nodeIdx++) {\n let m = nodesArray[nodeIdx];\n // by not evaluating nodes with predefined positions we should only move nodes that have no positions.\n if ((nodes[m].predefinedPosition === false || nodes[m].isCluster === true && ignoreClusters === true) || nodes[m].options.fixed.x === true || nodes[m].options.fixed.y === true) {\n let [delta_m,dE_dx,dE_dy] = this._getEnergy(m);\n if (maxEnergy < delta_m) {\n maxEnergy = delta_m;\n maxEnergyNodeId = m;\n dE_dx_max = dE_dx;\n dE_dy_max = dE_dy;\n }\n }\n }\n\n return [maxEnergyNodeId, maxEnergy, dE_dx_max, dE_dy_max];\n }\n\n /**\n * calculate the energy of a single node\n * @param {Node.id} m\n * @returns {number[]}\n * @private\n */\n _getEnergy(m) {\n let [dE_dx,dE_dy] = this.E_sums[m];\n let delta_m = Math.sqrt(Math.pow(dE_dx, 2) + Math.pow(dE_dy, 2));\n return [delta_m, dE_dx, dE_dy];\n }\n\n /**\n * move the node based on it's energy\n * the dx and dy are calculated from the linear system proposed by Kamada and Kawai\n * @param {number} m\n * @param {number} dE_dx\n * @param {number} dE_dy\n * @private\n */\n _moveNode(m, dE_dx, dE_dy) {\n let nodesArray = this.body.nodeIndices;\n let nodes = this.body.nodes;\n let d2E_dx2 = 0;\n let d2E_dxdy = 0;\n let d2E_dy2 = 0;\n\n let x_m = nodes[m].x;\n let y_m = nodes[m].y;\n let km = this.K_matrix[m];\n let lm = this.L_matrix[m];\n\n for (let iIdx = 0; iIdx < nodesArray.length; iIdx++) {\n let i = nodesArray[iIdx];\n if (i !== m) {\n let x_i = nodes[i].x;\n let y_i = nodes[i].y;\n let kmat = km[i];\n let lmat = lm[i];\n let denominator = 1.0 / Math.pow(Math.pow(x_m - x_i, 2) + Math.pow(y_m - y_i, 2), 1.5);\n d2E_dx2 += kmat * (1 - lmat * Math.pow(y_m - y_i, 2) * denominator);\n d2E_dxdy += kmat * (lmat * (x_m - x_i) * (y_m - y_i) * denominator);\n d2E_dy2 += kmat * (1 - lmat * Math.pow(x_m - x_i, 2) * denominator);\n }\n }\n // make the variable names easier to make the solving of the linear system easier to read\n let A = d2E_dx2, B = d2E_dxdy, C = dE_dx, D = d2E_dy2, E = dE_dy;\n\n // solve the linear system for dx and dy\n let dy = (C / A + E / B) / (B / A - D / B);\n let dx = -(B * dy + C) / A;\n\n // move the node\n nodes[m].x += dx;\n nodes[m].y += dy;\n\n // Recalculate E_matrix (should be incremental)\n this._updateE_matrix(m);\n }\n\n\n /**\n * Create the L matrix: edge length times shortest path\n * @param {Object} D_matrix\n * @private\n */\n _createL_matrix(D_matrix) {\n let nodesArray = this.body.nodeIndices;\n let edgeLength = this.springLength;\n\n this.L_matrix = [];\n for (let i = 0; i < nodesArray.length; i++) {\n this.L_matrix[nodesArray[i]] = {};\n for (let j = 0; j < nodesArray.length; j++) {\n this.L_matrix[nodesArray[i]][nodesArray[j]] = edgeLength * D_matrix[nodesArray[i]][nodesArray[j]];\n }\n }\n }\n\n\n /**\n * Create the K matrix: spring constants times shortest path\n * @param {Object} D_matrix\n * @private\n */\n _createK_matrix(D_matrix) {\n let nodesArray = this.body.nodeIndices;\n let edgeStrength = this.springConstant;\n\n this.K_matrix = [];\n for (let i = 0; i < nodesArray.length; i++) {\n this.K_matrix[nodesArray[i]] = {};\n for (let j = 0; j < nodesArray.length; j++) {\n this.K_matrix[nodesArray[i]][nodesArray[j]] = edgeStrength * Math.pow(D_matrix[nodesArray[i]][nodesArray[j]], -2);\n }\n }\n }\n\n /**\n * Create matrix with all energies between nodes\n * @private\n */\n _createE_matrix() {\n let nodesArray = this.body.nodeIndices;\n let nodes = this.body.nodes;\n this.E_matrix = {};\n this.E_sums = {};\n for (let mIdx = 0; mIdx < nodesArray.length; mIdx++) {\n this.E_matrix[nodesArray[mIdx]] = [];\n }\n for (let mIdx = 0; mIdx < nodesArray.length; mIdx++) {\n let m = nodesArray[mIdx];\n let x_m = nodes[m].x;\n let y_m = nodes[m].y;\n let dE_dx = 0;\n let dE_dy = 0;\n for (let iIdx = mIdx; iIdx < nodesArray.length; iIdx++) {\n let i = nodesArray[iIdx];\n if (i !== m) {\n let x_i = nodes[i].x;\n let y_i = nodes[i].y;\n let denominator = 1.0 / Math.sqrt(Math.pow(x_m - x_i, 2) + Math.pow(y_m - y_i, 2));\n this.E_matrix[m][iIdx] = [\n this.K_matrix[m][i] * ((x_m - x_i) - this.L_matrix[m][i] * (x_m - x_i) * denominator),\n this.K_matrix[m][i] * ((y_m - y_i) - this.L_matrix[m][i] * (y_m - y_i) * denominator)\n ];\n this.E_matrix[i][mIdx] = this.E_matrix[m][iIdx];\n dE_dx += this.E_matrix[m][iIdx][0];\n dE_dy += this.E_matrix[m][iIdx][1];\n }\n }\n //Store sum\n this.E_sums[m] = [dE_dx, dE_dy];\n }\n }\n\n /**\n * Update method, just doing single column (rows are auto-updated) (update all sums)\n *\n * @param {number} m\n * @private\n */\n _updateE_matrix(m) {\n let nodesArray = this.body.nodeIndices;\n let nodes = this.body.nodes;\n let colm = this.E_matrix[m];\n let kcolm = this.K_matrix[m];\n let lcolm = this.L_matrix[m];\n let x_m = nodes[m].x;\n let y_m = nodes[m].y;\n let dE_dx = 0;\n let dE_dy = 0;\n for (let iIdx = 0; iIdx < nodesArray.length; iIdx++) {\n let i = nodesArray[iIdx];\n if (i !== m) {\n //Keep old energy value for sum modification below\n let cell = colm[iIdx];\n let oldDx = cell[0];\n let oldDy = cell[1];\n\n //Calc new energy:\n let x_i = nodes[i].x;\n let y_i = nodes[i].y;\n let denominator = 1.0 / Math.sqrt(Math.pow(x_m - x_i, 2) + Math.pow(y_m - y_i, 2));\n let dx = kcolm[i] * ((x_m - x_i) - lcolm[i] * (x_m - x_i) * denominator);\n let dy = kcolm[i] * ((y_m - y_i) - lcolm[i] * (y_m - y_i) * denominator);\n colm[iIdx] = [dx, dy];\n dE_dx += dx;\n dE_dy += dy;\n\n //add new energy to sum of each column\n let sum = this.E_sums[i];\n sum[0] += (dx-oldDx);\n sum[1] += (dy-oldDy);\n }\n }\n //Store sum at -1 index\n this.E_sums[m] = [dE_dx, dE_dy];\n }\n}\n\nexport default KamadaKawai;","// DOM utility methods\n\n/**\n * this prepares the JSON container for allocating SVG elements\n * @param {Object} JSONcontainer\n * @private\n */\nexports.prepareElements = function(JSONcontainer) {\n // cleanup the redundant svgElements;\n for (var elementType in JSONcontainer) {\n if (JSONcontainer.hasOwnProperty(elementType)) {\n JSONcontainer[elementType].redundant = JSONcontainer[elementType].used;\n JSONcontainer[elementType].used = [];\n }\n }\n};\n\n/**\n * this cleans up all the unused SVG elements. By asking for the parentNode, we only need to supply the JSON container from\n * which to remove the redundant elements.\n *\n * @param {Object} JSONcontainer\n * @private\n */\nexports.cleanupElements = function(JSONcontainer) {\n // cleanup the redundant svgElements;\n for (var elementType in JSONcontainer) {\n if (JSONcontainer.hasOwnProperty(elementType)) {\n if (JSONcontainer[elementType].redundant) {\n for (var i = 0; i < JSONcontainer[elementType].redundant.length; i++) {\n JSONcontainer[elementType].redundant[i].parentNode.removeChild(JSONcontainer[elementType].redundant[i]);\n }\n JSONcontainer[elementType].redundant = [];\n }\n }\n }\n};\n\n/**\n * Ensures that all elements are removed first up so they can be recreated cleanly\n * @param {Object} JSONcontainer\n */\nexports.resetElements = function(JSONcontainer) {\n exports.prepareElements(JSONcontainer);\n exports.cleanupElements(JSONcontainer);\n exports.prepareElements(JSONcontainer);\n};\n\n/**\n * Allocate or generate an SVG element if needed. Store a reference to it in the JSON container and draw it in the svgContainer\n * the JSON container and the SVG container have to be supplied so other svg containers (like the legend) can use this.\n *\n * @param {string} elementType\n * @param {Object} JSONcontainer\n * @param {Object} svgContainer\n * @returns {Element}\n * @private\n */\nexports.getSVGElement = function (elementType, JSONcontainer, svgContainer) {\n var element;\n // allocate SVG element, if it doesnt yet exist, create one.\n if (JSONcontainer.hasOwnProperty(elementType)) { // this element has been created before\n // check if there is an redundant element\n if (JSONcontainer[elementType].redundant.length > 0) {\n element = JSONcontainer[elementType].redundant[0];\n JSONcontainer[elementType].redundant.shift();\n }\n else {\n // create a new element and add it to the SVG\n element = document.createElementNS('http://www.w3.org/2000/svg', elementType);\n svgContainer.appendChild(element);\n }\n }\n else {\n // create a new element and add it to the SVG, also create a new object in the svgElements to keep track of it.\n element = document.createElementNS('http://www.w3.org/2000/svg', elementType);\n JSONcontainer[elementType] = {used: [], redundant: []};\n svgContainer.appendChild(element);\n }\n JSONcontainer[elementType].used.push(element);\n return element;\n};\n\n\n/**\n * Allocate or generate an SVG element if needed. Store a reference to it in the JSON container and draw it in the svgContainer\n * the JSON container and the SVG container have to be supplied so other svg containers (like the legend) can use this.\n *\n * @param {string} elementType\n * @param {Object} JSONcontainer\n * @param {Element} DOMContainer\n * @param {Element} insertBefore\n * @returns {*}\n */\nexports.getDOMElement = function (elementType, JSONcontainer, DOMContainer, insertBefore) {\n var element;\n // allocate DOM element, if it doesnt yet exist, create one.\n if (JSONcontainer.hasOwnProperty(elementType)) { // this element has been created before\n // check if there is an redundant element\n if (JSONcontainer[elementType].redundant.length > 0) {\n element = JSONcontainer[elementType].redundant[0];\n JSONcontainer[elementType].redundant.shift();\n }\n else {\n // create a new element and add it to the SVG\n element = document.createElement(elementType);\n if (insertBefore !== undefined) {\n DOMContainer.insertBefore(element, insertBefore);\n }\n else {\n DOMContainer.appendChild(element);\n }\n }\n }\n else {\n // create a new element and add it to the SVG, also create a new object in the svgElements to keep track of it.\n element = document.createElement(elementType);\n JSONcontainer[elementType] = {used: [], redundant: []};\n if (insertBefore !== undefined) {\n DOMContainer.insertBefore(element, insertBefore);\n }\n else {\n DOMContainer.appendChild(element);\n }\n }\n JSONcontainer[elementType].used.push(element);\n return element;\n};\n\n\n\n\n/**\n * Draw a point object. This is a separate function because it can also be called by the legend.\n * The reason the JSONcontainer and the target SVG svgContainer have to be supplied is so the legend can use these functions\n * as well.\n *\n * @param {number} x\n * @param {number} y\n * @param {Object} groupTemplate: A template containing the necessary information to draw the datapoint e.g., {style: 'circle', size: 5, className: 'className' }\n * @param {Object} JSONcontainer\n * @param {Object} svgContainer\n * @param {Object} labelObj\n * @returns {vis.PointItem}\n */\nexports.drawPoint = function(x, y, groupTemplate, JSONcontainer, svgContainer, labelObj) {\n var point;\n if (groupTemplate.style == 'circle') {\n point = exports.getSVGElement('circle', JSONcontainer, svgContainer);\n point.setAttributeNS(null, \"cx\", x);\n point.setAttributeNS(null, \"cy\", y);\n point.setAttributeNS(null, \"r\", 0.5 * groupTemplate.size);\n }\n else {\n point = exports.getSVGElement('rect', JSONcontainer, svgContainer);\n point.setAttributeNS(null, \"x\", x - 0.5 * groupTemplate.size);\n point.setAttributeNS(null, \"y\", y - 0.5 * groupTemplate.size);\n point.setAttributeNS(null, \"width\", groupTemplate.size);\n point.setAttributeNS(null, \"height\", groupTemplate.size);\n }\n\n if (groupTemplate.styles !== undefined) {\n point.setAttributeNS(null, \"style\", groupTemplate.styles);\n }\n point.setAttributeNS(null, \"class\", groupTemplate.className + \" vis-point\");\n //handle label\n\n\n if (labelObj) {\n var label = exports.getSVGElement('text', JSONcontainer, svgContainer);\n if (labelObj.xOffset) {\n x = x + labelObj.xOffset;\n }\n\n if (labelObj.yOffset) {\n y = y + labelObj.yOffset;\n }\n if (labelObj.content) {\n label.textContent = labelObj.content;\n }\n\n if (labelObj.className) {\n label.setAttributeNS(null, \"class\", labelObj.className + \" vis-label\");\n }\n label.setAttributeNS(null, \"x\", x);\n label.setAttributeNS(null, \"y\", y);\n }\n\n return point;\n};\n\n/**\n * draw a bar SVG element centered on the X coordinate\n *\n * @param {number} x\n * @param {number} y\n * @param {number} width\n * @param {number} height\n * @param {string} className\n * @param {Object} JSONcontainer\n * @param {Object} svgContainer\n * @param {string} style\n */\nexports.drawBar = function (x, y, width, height, className, JSONcontainer, svgContainer, style) {\n if (height != 0) {\n if (height < 0) {\n height *= -1;\n y -= height;\n }\n var rect = exports.getSVGElement('rect',JSONcontainer, svgContainer);\n rect.setAttributeNS(null, \"x\", x - 0.5 * width);\n rect.setAttributeNS(null, \"y\", y);\n rect.setAttributeNS(null, \"width\", width);\n rect.setAttributeNS(null, \"height\", height);\n rect.setAttributeNS(null, \"class\", className);\n if (style) {\n rect.setAttributeNS(null, \"style\", style);\n }\n }\n};","//! moment.js\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n typeof define === 'function' && define.amd ? define(factory) :\n global.moment = factory()\n}(this, (function () { 'use strict';\n\n var hookCallback;\n\n function hooks () {\n return hookCallback.apply(null, arguments);\n }\n\n // This is done to register the method called with moment()\n // without creating circular dependencies.\n function setHookCallback (callback) {\n hookCallback = callback;\n }\n\n function isArray(input) {\n return input instanceof Array || Object.prototype.toString.call(input) === '[object Array]';\n }\n\n function isObject(input) {\n // IE8 will treat undefined and null as object if it wasn't for\n // input != null\n return input != null && Object.prototype.toString.call(input) === '[object Object]';\n }\n\n function isObjectEmpty(obj) {\n if (Object.getOwnPropertyNames) {\n return (Object.getOwnPropertyNames(obj).length === 0);\n } else {\n var k;\n for (k in obj) {\n if (obj.hasOwnProperty(k)) {\n return false;\n }\n }\n return true;\n }\n }\n\n function isUndefined(input) {\n return input === void 0;\n }\n\n function isNumber(input) {\n return typeof input === 'number' || Object.prototype.toString.call(input) === '[object Number]';\n }\n\n function isDate(input) {\n return input instanceof Date || Object.prototype.toString.call(input) === '[object Date]';\n }\n\n function map(arr, fn) {\n var res = [], i;\n for (i = 0; i < arr.length; ++i) {\n res.push(fn(arr[i], i));\n }\n return res;\n }\n\n function hasOwnProp(a, b) {\n return Object.prototype.hasOwnProperty.call(a, b);\n }\n\n function extend(a, b) {\n for (var i in b) {\n if (hasOwnProp(b, i)) {\n a[i] = b[i];\n }\n }\n\n if (hasOwnProp(b, 'toString')) {\n a.toString = b.toString;\n }\n\n if (hasOwnProp(b, 'valueOf')) {\n a.valueOf = b.valueOf;\n }\n\n return a;\n }\n\n function createUTC (input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, true).utc();\n }\n\n function defaultParsingFlags() {\n // We need to deep clone this object.\n return {\n empty : false,\n unusedTokens : [],\n unusedInput : [],\n overflow : -2,\n charsLeftOver : 0,\n nullInput : false,\n invalidMonth : null,\n invalidFormat : false,\n userInvalidated : false,\n iso : false,\n parsedDateParts : [],\n meridiem : null,\n rfc2822 : false,\n weekdayMismatch : false\n };\n }\n\n function getParsingFlags(m) {\n if (m._pf == null) {\n m._pf = defaultParsingFlags();\n }\n return m._pf;\n }\n\n var some;\n if (Array.prototype.some) {\n some = Array.prototype.some;\n } else {\n some = function (fun) {\n var t = Object(this);\n var len = t.length >>> 0;\n\n for (var i = 0; i < len; i++) {\n if (i in t && fun.call(this, t[i], i, t)) {\n return true;\n }\n }\n\n return false;\n };\n }\n\n function isValid(m) {\n if (m._isValid == null) {\n var flags = getParsingFlags(m);\n var parsedParts = some.call(flags.parsedDateParts, function (i) {\n return i != null;\n });\n var isNowValid = !isNaN(m._d.getTime()) &&\n flags.overflow < 0 &&\n !flags.empty &&\n !flags.invalidMonth &&\n !flags.invalidWeekday &&\n !flags.weekdayMismatch &&\n !flags.nullInput &&\n !flags.invalidFormat &&\n !flags.userInvalidated &&\n (!flags.meridiem || (flags.meridiem && parsedParts));\n\n if (m._strict) {\n isNowValid = isNowValid &&\n flags.charsLeftOver === 0 &&\n flags.unusedTokens.length === 0 &&\n flags.bigHour === undefined;\n }\n\n if (Object.isFrozen == null || !Object.isFrozen(m)) {\n m._isValid = isNowValid;\n }\n else {\n return isNowValid;\n }\n }\n return m._isValid;\n }\n\n function createInvalid (flags) {\n var m = createUTC(NaN);\n if (flags != null) {\n extend(getParsingFlags(m), flags);\n }\n else {\n getParsingFlags(m).userInvalidated = true;\n }\n\n return m;\n }\n\n // Plugins that add properties should also add the key here (null value),\n // so we can properly clone ourselves.\n var momentProperties = hooks.momentProperties = [];\n\n function copyConfig(to, from) {\n var i, prop, val;\n\n if (!isUndefined(from._isAMomentObject)) {\n to._isAMomentObject = from._isAMomentObject;\n }\n if (!isUndefined(from._i)) {\n to._i = from._i;\n }\n if (!isUndefined(from._f)) {\n to._f = from._f;\n }\n if (!isUndefined(from._l)) {\n to._l = from._l;\n }\n if (!isUndefined(from._strict)) {\n to._strict = from._strict;\n }\n if (!isUndefined(from._tzm)) {\n to._tzm = from._tzm;\n }\n if (!isUndefined(from._isUTC)) {\n to._isUTC = from._isUTC;\n }\n if (!isUndefined(from._offset)) {\n to._offset = from._offset;\n }\n if (!isUndefined(from._pf)) {\n to._pf = getParsingFlags(from);\n }\n if (!isUndefined(from._locale)) {\n to._locale = from._locale;\n }\n\n if (momentProperties.length > 0) {\n for (i = 0; i < momentProperties.length; i++) {\n prop = momentProperties[i];\n val = from[prop];\n if (!isUndefined(val)) {\n to[prop] = val;\n }\n }\n }\n\n return to;\n }\n\n var updateInProgress = false;\n\n // Moment prototype object\n function Moment(config) {\n copyConfig(this, config);\n this._d = new Date(config._d != null ? config._d.getTime() : NaN);\n if (!this.isValid()) {\n this._d = new Date(NaN);\n }\n // Prevent infinite loop in case updateOffset creates new moment\n // objects.\n if (updateInProgress === false) {\n updateInProgress = true;\n hooks.updateOffset(this);\n updateInProgress = false;\n }\n }\n\n function isMoment (obj) {\n return obj instanceof Moment || (obj != null && obj._isAMomentObject != null);\n }\n\n function absFloor (number) {\n if (number < 0) {\n // -0 -> 0\n return Math.ceil(number) || 0;\n } else {\n return Math.floor(number);\n }\n }\n\n function toInt(argumentForCoercion) {\n var coercedNumber = +argumentForCoercion,\n value = 0;\n\n if (coercedNumber !== 0 && isFinite(coercedNumber)) {\n value = absFloor(coercedNumber);\n }\n\n return value;\n }\n\n // compare two arrays, return the number of differences\n function compareArrays(array1, array2, dontConvert) {\n var len = Math.min(array1.length, array2.length),\n lengthDiff = Math.abs(array1.length - array2.length),\n diffs = 0,\n i;\n for (i = 0; i < len; i++) {\n if ((dontConvert && array1[i] !== array2[i]) ||\n (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {\n diffs++;\n }\n }\n return diffs + lengthDiff;\n }\n\n function warn(msg) {\n if (hooks.suppressDeprecationWarnings === false &&\n (typeof console !== 'undefined') && console.warn) {\n console.warn('Deprecation warning: ' + msg);\n }\n }\n\n function deprecate(msg, fn) {\n var firstTime = true;\n\n return extend(function () {\n if (hooks.deprecationHandler != null) {\n hooks.deprecationHandler(null, msg);\n }\n if (firstTime) {\n var args = [];\n var arg;\n for (var i = 0; i < arguments.length; i++) {\n arg = '';\n if (typeof arguments[i] === 'object') {\n arg += '\\n[' + i + '] ';\n for (var key in arguments[0]) {\n arg += key + ': ' + arguments[0][key] + ', ';\n }\n arg = arg.slice(0, -2); // Remove trailing comma and space\n } else {\n arg = arguments[i];\n }\n args.push(arg);\n }\n warn(msg + '\\nArguments: ' + Array.prototype.slice.call(args).join('') + '\\n' + (new Error()).stack);\n firstTime = false;\n }\n return fn.apply(this, arguments);\n }, fn);\n }\n\n var deprecations = {};\n\n function deprecateSimple(name, msg) {\n if (hooks.deprecationHandler != null) {\n hooks.deprecationHandler(name, msg);\n }\n if (!deprecations[name]) {\n warn(msg);\n deprecations[name] = true;\n }\n }\n\n hooks.suppressDeprecationWarnings = false;\n hooks.deprecationHandler = null;\n\n function isFunction(input) {\n return input instanceof Function || Object.prototype.toString.call(input) === '[object Function]';\n }\n\n function set (config) {\n var prop, i;\n for (i in config) {\n prop = config[i];\n if (isFunction(prop)) {\n this[i] = prop;\n } else {\n this['_' + i] = prop;\n }\n }\n this._config = config;\n // Lenient ordinal parsing accepts just a number in addition to\n // number + (possibly) stuff coming from _dayOfMonthOrdinalParse.\n // TODO: Remove \"ordinalParse\" fallback in next major release.\n this._dayOfMonthOrdinalParseLenient = new RegExp(\n (this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) +\n '|' + (/\\d{1,2}/).source);\n }\n\n function mergeConfigs(parentConfig, childConfig) {\n var res = extend({}, parentConfig), prop;\n for (prop in childConfig) {\n if (hasOwnProp(childConfig, prop)) {\n if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) {\n res[prop] = {};\n extend(res[prop], parentConfig[prop]);\n extend(res[prop], childConfig[prop]);\n } else if (childConfig[prop] != null) {\n res[prop] = childConfig[prop];\n } else {\n delete res[prop];\n }\n }\n }\n for (prop in parentConfig) {\n if (hasOwnProp(parentConfig, prop) &&\n !hasOwnProp(childConfig, prop) &&\n isObject(parentConfig[prop])) {\n // make sure changes to properties don't modify parent config\n res[prop] = extend({}, res[prop]);\n }\n }\n return res;\n }\n\n function Locale(config) {\n if (config != null) {\n this.set(config);\n }\n }\n\n var keys;\n\n if (Object.keys) {\n keys = Object.keys;\n } else {\n keys = function (obj) {\n var i, res = [];\n for (i in obj) {\n if (hasOwnProp(obj, i)) {\n res.push(i);\n }\n }\n return res;\n };\n }\n\n var defaultCalendar = {\n sameDay : '[Today at] LT',\n nextDay : '[Tomorrow at] LT',\n nextWeek : 'dddd [at] LT',\n lastDay : '[Yesterday at] LT',\n lastWeek : '[Last] dddd [at] LT',\n sameElse : 'L'\n };\n\n function calendar (key, mom, now) {\n var output = this._calendar[key] || this._calendar['sameElse'];\n return isFunction(output) ? output.call(mom, now) : output;\n }\n\n var defaultLongDateFormat = {\n LTS : 'h:mm:ss A',\n LT : 'h:mm A',\n L : 'MM/DD/YYYY',\n LL : 'MMMM D, YYYY',\n LLL : 'MMMM D, YYYY h:mm A',\n LLLL : 'dddd, MMMM D, YYYY h:mm A'\n };\n\n function longDateFormat (key) {\n var format = this._longDateFormat[key],\n formatUpper = this._longDateFormat[key.toUpperCase()];\n\n if (format || !formatUpper) {\n return format;\n }\n\n this._longDateFormat[key] = formatUpper.replace(/MMMM|MM|DD|dddd/g, function (val) {\n return val.slice(1);\n });\n\n return this._longDateFormat[key];\n }\n\n var defaultInvalidDate = 'Invalid date';\n\n function invalidDate () {\n return this._invalidDate;\n }\n\n var defaultOrdinal = '%d';\n var defaultDayOfMonthOrdinalParse = /\\d{1,2}/;\n\n function ordinal (number) {\n return this._ordinal.replace('%d', number);\n }\n\n var defaultRelativeTime = {\n future : 'in %s',\n past : '%s ago',\n s : 'a few seconds',\n ss : '%d seconds',\n m : 'a minute',\n mm : '%d minutes',\n h : 'an hour',\n hh : '%d hours',\n d : 'a day',\n dd : '%d days',\n M : 'a month',\n MM : '%d months',\n y : 'a year',\n yy : '%d years'\n };\n\n function relativeTime (number, withoutSuffix, string, isFuture) {\n var output = this._relativeTime[string];\n return (isFunction(output)) ?\n output(number, withoutSuffix, string, isFuture) :\n output.replace(/%d/i, number);\n }\n\n function pastFuture (diff, output) {\n var format = this._relativeTime[diff > 0 ? 'future' : 'past'];\n return isFunction(format) ? format(output) : format.replace(/%s/i, output);\n }\n\n var aliases = {};\n\n function addUnitAlias (unit, shorthand) {\n var lowerCase = unit.toLowerCase();\n aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit;\n }\n\n function normalizeUnits(units) {\n return typeof units === 'string' ? aliases[units] || aliases[units.toLowerCase()] : undefined;\n }\n\n function normalizeObjectUnits(inputObject) {\n var normalizedInput = {},\n normalizedProp,\n prop;\n\n for (prop in inputObject) {\n if (hasOwnProp(inputObject, prop)) {\n normalizedProp = normalizeUnits(prop);\n if (normalizedProp) {\n normalizedInput[normalizedProp] = inputObject[prop];\n }\n }\n }\n\n return normalizedInput;\n }\n\n var priorities = {};\n\n function addUnitPriority(unit, priority) {\n priorities[unit] = priority;\n }\n\n function getPrioritizedUnits(unitsObj) {\n var units = [];\n for (var u in unitsObj) {\n units.push({unit: u, priority: priorities[u]});\n }\n units.sort(function (a, b) {\n return a.priority - b.priority;\n });\n return units;\n }\n\n function zeroFill(number, targetLength, forceSign) {\n var absNumber = '' + Math.abs(number),\n zerosToFill = targetLength - absNumber.length,\n sign = number >= 0;\n return (sign ? (forceSign ? '+' : '') : '-') +\n Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) + absNumber;\n }\n\n var formattingTokens = /(\\[[^\\[]*\\])|(\\\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g;\n\n var localFormattingTokens = /(\\[[^\\[]*\\])|(\\\\)?(LTS|LT|LL?L?L?|l{1,4})/g;\n\n var formatFunctions = {};\n\n var formatTokenFunctions = {};\n\n // token: 'M'\n // padded: ['MM', 2]\n // ordinal: 'Mo'\n // callback: function () { this.month() + 1 }\n function addFormatToken (token, padded, ordinal, callback) {\n var func = callback;\n if (typeof callback === 'string') {\n func = function () {\n return this[callback]();\n };\n }\n if (token) {\n formatTokenFunctions[token] = func;\n }\n if (padded) {\n formatTokenFunctions[padded[0]] = function () {\n return zeroFill(func.apply(this, arguments), padded[1], padded[2]);\n };\n }\n if (ordinal) {\n formatTokenFunctions[ordinal] = function () {\n return this.localeData().ordinal(func.apply(this, arguments), token);\n };\n }\n }\n\n function removeFormattingTokens(input) {\n if (input.match(/\\[[\\s\\S]/)) {\n return input.replace(/^\\[|\\]$/g, '');\n }\n return input.replace(/\\\\/g, '');\n }\n\n function makeFormatFunction(format) {\n var array = format.match(formattingTokens), i, length;\n\n for (i = 0, length = array.length; i < length; i++) {\n if (formatTokenFunctions[array[i]]) {\n array[i] = formatTokenFunctions[array[i]];\n } else {\n array[i] = removeFormattingTokens(array[i]);\n }\n }\n\n return function (mom) {\n var output = '', i;\n for (i = 0; i < length; i++) {\n output += isFunction(array[i]) ? array[i].call(mom, format) : array[i];\n }\n return output;\n };\n }\n\n // format date using native date object\n function formatMoment(m, format) {\n if (!m.isValid()) {\n return m.localeData().invalidDate();\n }\n\n format = expandFormat(format, m.localeData());\n formatFunctions[format] = formatFunctions[format] || makeFormatFunction(format);\n\n return formatFunctions[format](m);\n }\n\n function expandFormat(format, locale) {\n var i = 5;\n\n function replaceLongDateFormatTokens(input) {\n return locale.longDateFormat(input) || input;\n }\n\n localFormattingTokens.lastIndex = 0;\n while (i >= 0 && localFormattingTokens.test(format)) {\n format = format.replace(localFormattingTokens, replaceLongDateFormatTokens);\n localFormattingTokens.lastIndex = 0;\n i -= 1;\n }\n\n return format;\n }\n\n var match1 = /\\d/; // 0 - 9\n var match2 = /\\d\\d/; // 00 - 99\n var match3 = /\\d{3}/; // 000 - 999\n var match4 = /\\d{4}/; // 0000 - 9999\n var match6 = /[+-]?\\d{6}/; // -999999 - 999999\n var match1to2 = /\\d\\d?/; // 0 - 99\n var match3to4 = /\\d\\d\\d\\d?/; // 999 - 9999\n var match5to6 = /\\d\\d\\d\\d\\d\\d?/; // 99999 - 999999\n var match1to3 = /\\d{1,3}/; // 0 - 999\n var match1to4 = /\\d{1,4}/; // 0 - 9999\n var match1to6 = /[+-]?\\d{1,6}/; // -999999 - 999999\n\n var matchUnsigned = /\\d+/; // 0 - inf\n var matchSigned = /[+-]?\\d+/; // -inf - inf\n\n var matchOffset = /Z|[+-]\\d\\d:?\\d\\d/gi; // +00:00 -00:00 +0000 -0000 or Z\n var matchShortOffset = /Z|[+-]\\d\\d(?::?\\d\\d)?/gi; // +00 -00 +00:00 -00:00 +0000 -0000 or Z\n\n var matchTimestamp = /[+-]?\\d+(\\.\\d{1,3})?/; // 123456789 123456789.123\n\n // any word (or two) characters or numbers including two/three word month in arabic.\n // includes scottish gaelic two word and hyphenated months\n var matchWord = /[0-9]{0,256}['a-z\\u00A0-\\u05FF\\u0700-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFF07\\uFF10-\\uFFEF]{1,256}|[\\u0600-\\u06FF\\/]{1,256}(\\s*?[\\u0600-\\u06FF]{1,256}){1,2}/i;\n\n var regexes = {};\n\n function addRegexToken (token, regex, strictRegex) {\n regexes[token] = isFunction(regex) ? regex : function (isStrict, localeData) {\n return (isStrict && strictRegex) ? strictRegex : regex;\n };\n }\n\n function getParseRegexForToken (token, config) {\n if (!hasOwnProp(regexes, token)) {\n return new RegExp(unescapeFormat(token));\n }\n\n return regexes[token](config._strict, config._locale);\n }\n\n // Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript\n function unescapeFormat(s) {\n return regexEscape(s.replace('\\\\', '').replace(/\\\\(\\[)|\\\\(\\])|\\[([^\\]\\[]*)\\]|\\\\(.)/g, function (matched, p1, p2, p3, p4) {\n return p1 || p2 || p3 || p4;\n }));\n }\n\n function regexEscape(s) {\n return s.replace(/[-\\/\\\\^$*+?.()|[\\]{}]/g, '\\\\$&');\n }\n\n var tokens = {};\n\n function addParseToken (token, callback) {\n var i, func = callback;\n if (typeof token === 'string') {\n token = [token];\n }\n if (isNumber(callback)) {\n func = function (input, array) {\n array[callback] = toInt(input);\n };\n }\n for (i = 0; i < token.length; i++) {\n tokens[token[i]] = func;\n }\n }\n\n function addWeekParseToken (token, callback) {\n addParseToken(token, function (input, array, config, token) {\n config._w = config._w || {};\n callback(input, config._w, config, token);\n });\n }\n\n function addTimeToArrayFromToken(token, input, config) {\n if (input != null && hasOwnProp(tokens, token)) {\n tokens[token](input, config._a, config, token);\n }\n }\n\n var YEAR = 0;\n var MONTH = 1;\n var DATE = 2;\n var HOUR = 3;\n var MINUTE = 4;\n var SECOND = 5;\n var MILLISECOND = 6;\n var WEEK = 7;\n var WEEKDAY = 8;\n\n // FORMATTING\n\n addFormatToken('Y', 0, 0, function () {\n var y = this.year();\n return y <= 9999 ? '' + y : '+' + y;\n });\n\n addFormatToken(0, ['YY', 2], 0, function () {\n return this.year() % 100;\n });\n\n addFormatToken(0, ['YYYY', 4], 0, 'year');\n addFormatToken(0, ['YYYYY', 5], 0, 'year');\n addFormatToken(0, ['YYYYYY', 6, true], 0, 'year');\n\n // ALIASES\n\n addUnitAlias('year', 'y');\n\n // PRIORITIES\n\n addUnitPriority('year', 1);\n\n // PARSING\n\n addRegexToken('Y', matchSigned);\n addRegexToken('YY', match1to2, match2);\n addRegexToken('YYYY', match1to4, match4);\n addRegexToken('YYYYY', match1to6, match6);\n addRegexToken('YYYYYY', match1to6, match6);\n\n addParseToken(['YYYYY', 'YYYYYY'], YEAR);\n addParseToken('YYYY', function (input, array) {\n array[YEAR] = input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input);\n });\n addParseToken('YY', function (input, array) {\n array[YEAR] = hooks.parseTwoDigitYear(input);\n });\n addParseToken('Y', function (input, array) {\n array[YEAR] = parseInt(input, 10);\n });\n\n // HELPERS\n\n function daysInYear(year) {\n return isLeapYear(year) ? 366 : 365;\n }\n\n function isLeapYear(year) {\n return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;\n }\n\n // HOOKS\n\n hooks.parseTwoDigitYear = function (input) {\n return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);\n };\n\n // MOMENTS\n\n var getSetYear = makeGetSet('FullYear', true);\n\n function getIsLeapYear () {\n return isLeapYear(this.year());\n }\n\n function makeGetSet (unit, keepTime) {\n return function (value) {\n if (value != null) {\n set$1(this, unit, value);\n hooks.updateOffset(this, keepTime);\n return this;\n } else {\n return get(this, unit);\n }\n };\n }\n\n function get (mom, unit) {\n return mom.isValid() ?\n mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]() : NaN;\n }\n\n function set$1 (mom, unit, value) {\n if (mom.isValid() && !isNaN(value)) {\n if (unit === 'FullYear' && isLeapYear(mom.year()) && mom.month() === 1 && mom.date() === 29) {\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value, mom.month(), daysInMonth(value, mom.month()));\n }\n else {\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value);\n }\n }\n }\n\n // MOMENTS\n\n function stringGet (units) {\n units = normalizeUnits(units);\n if (isFunction(this[units])) {\n return this[units]();\n }\n return this;\n }\n\n\n function stringSet (units, value) {\n if (typeof units === 'object') {\n units = normalizeObjectUnits(units);\n var prioritized = getPrioritizedUnits(units);\n for (var i = 0; i < prioritized.length; i++) {\n this[prioritized[i].unit](units[prioritized[i].unit]);\n }\n } else {\n units = normalizeUnits(units);\n if (isFunction(this[units])) {\n return this[units](value);\n }\n }\n return this;\n }\n\n function mod(n, x) {\n return ((n % x) + x) % x;\n }\n\n var indexOf;\n\n if (Array.prototype.indexOf) {\n indexOf = Array.prototype.indexOf;\n } else {\n indexOf = function (o) {\n // I know\n var i;\n for (i = 0; i < this.length; ++i) {\n if (this[i] === o) {\n return i;\n }\n }\n return -1;\n };\n }\n\n function daysInMonth(year, month) {\n if (isNaN(year) || isNaN(month)) {\n return NaN;\n }\n var modMonth = mod(month, 12);\n year += (month - modMonth) / 12;\n return modMonth === 1 ? (isLeapYear(year) ? 29 : 28) : (31 - modMonth % 7 % 2);\n }\n\n // FORMATTING\n\n addFormatToken('M', ['MM', 2], 'Mo', function () {\n return this.month() + 1;\n });\n\n addFormatToken('MMM', 0, 0, function (format) {\n return this.localeData().monthsShort(this, format);\n });\n\n addFormatToken('MMMM', 0, 0, function (format) {\n return this.localeData().months(this, format);\n });\n\n // ALIASES\n\n addUnitAlias('month', 'M');\n\n // PRIORITY\n\n addUnitPriority('month', 8);\n\n // PARSING\n\n addRegexToken('M', match1to2);\n addRegexToken('MM', match1to2, match2);\n addRegexToken('MMM', function (isStrict, locale) {\n return locale.monthsShortRegex(isStrict);\n });\n addRegexToken('MMMM', function (isStrict, locale) {\n return locale.monthsRegex(isStrict);\n });\n\n addParseToken(['M', 'MM'], function (input, array) {\n array[MONTH] = toInt(input) - 1;\n });\n\n addParseToken(['MMM', 'MMMM'], function (input, array, config, token) {\n var month = config._locale.monthsParse(input, token, config._strict);\n // if we didn't find a month name, mark the date as invalid.\n if (month != null) {\n array[MONTH] = month;\n } else {\n getParsingFlags(config).invalidMonth = input;\n }\n });\n\n // LOCALES\n\n var MONTHS_IN_FORMAT = /D[oD]?(\\[[^\\[\\]]*\\]|\\s)+MMMM?/;\n var defaultLocaleMonths = 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_');\n function localeMonths (m, format) {\n if (!m) {\n return isArray(this._months) ? this._months :\n this._months['standalone'];\n }\n return isArray(this._months) ? this._months[m.month()] :\n this._months[(this._months.isFormat || MONTHS_IN_FORMAT).test(format) ? 'format' : 'standalone'][m.month()];\n }\n\n var defaultLocaleMonthsShort = 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_');\n function localeMonthsShort (m, format) {\n if (!m) {\n return isArray(this._monthsShort) ? this._monthsShort :\n this._monthsShort['standalone'];\n }\n return isArray(this._monthsShort) ? this._monthsShort[m.month()] :\n this._monthsShort[MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'][m.month()];\n }\n\n function handleStrictParse(monthName, format, strict) {\n var i, ii, mom, llc = monthName.toLocaleLowerCase();\n if (!this._monthsParse) {\n // this is not used\n this._monthsParse = [];\n this._longMonthsParse = [];\n this._shortMonthsParse = [];\n for (i = 0; i < 12; ++i) {\n mom = createUTC([2000, i]);\n this._shortMonthsParse[i] = this.monthsShort(mom, '').toLocaleLowerCase();\n this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase();\n }\n }\n\n if (strict) {\n if (format === 'MMM') {\n ii = indexOf.call(this._shortMonthsParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._longMonthsParse, llc);\n return ii !== -1 ? ii : null;\n }\n } else {\n if (format === 'MMM') {\n ii = indexOf.call(this._shortMonthsParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._longMonthsParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._longMonthsParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortMonthsParse, llc);\n return ii !== -1 ? ii : null;\n }\n }\n }\n\n function localeMonthsParse (monthName, format, strict) {\n var i, mom, regex;\n\n if (this._monthsParseExact) {\n return handleStrictParse.call(this, monthName, format, strict);\n }\n\n if (!this._monthsParse) {\n this._monthsParse = [];\n this._longMonthsParse = [];\n this._shortMonthsParse = [];\n }\n\n // TODO: add sorting\n // Sorting makes sure if one month (or abbr) is a prefix of another\n // see sorting in computeMonthsParse\n for (i = 0; i < 12; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, i]);\n if (strict && !this._longMonthsParse[i]) {\n this._longMonthsParse[i] = new RegExp('^' + this.months(mom, '').replace('.', '') + '$', 'i');\n this._shortMonthsParse[i] = new RegExp('^' + this.monthsShort(mom, '').replace('.', '') + '$', 'i');\n }\n if (!strict && !this._monthsParse[i]) {\n regex = '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, '');\n this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i');\n }\n // test the regex\n if (strict && format === 'MMMM' && this._longMonthsParse[i].test(monthName)) {\n return i;\n } else if (strict && format === 'MMM' && this._shortMonthsParse[i].test(monthName)) {\n return i;\n } else if (!strict && this._monthsParse[i].test(monthName)) {\n return i;\n }\n }\n }\n\n // MOMENTS\n\n function setMonth (mom, value) {\n var dayOfMonth;\n\n if (!mom.isValid()) {\n // No op\n return mom;\n }\n\n if (typeof value === 'string') {\n if (/^\\d+$/.test(value)) {\n value = toInt(value);\n } else {\n value = mom.localeData().monthsParse(value);\n // TODO: Another silent failure?\n if (!isNumber(value)) {\n return mom;\n }\n }\n }\n\n dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value));\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth);\n return mom;\n }\n\n function getSetMonth (value) {\n if (value != null) {\n setMonth(this, value);\n hooks.updateOffset(this, true);\n return this;\n } else {\n return get(this, 'Month');\n }\n }\n\n function getDaysInMonth () {\n return daysInMonth(this.year(), this.month());\n }\n\n var defaultMonthsShortRegex = matchWord;\n function monthsShortRegex (isStrict) {\n if (this._monthsParseExact) {\n if (!hasOwnProp(this, '_monthsRegex')) {\n computeMonthsParse.call(this);\n }\n if (isStrict) {\n return this._monthsShortStrictRegex;\n } else {\n return this._monthsShortRegex;\n }\n } else {\n if (!hasOwnProp(this, '_monthsShortRegex')) {\n this._monthsShortRegex = defaultMonthsShortRegex;\n }\n return this._monthsShortStrictRegex && isStrict ?\n this._monthsShortStrictRegex : this._monthsShortRegex;\n }\n }\n\n var defaultMonthsRegex = matchWord;\n function monthsRegex (isStrict) {\n if (this._monthsParseExact) {\n if (!hasOwnProp(this, '_monthsRegex')) {\n computeMonthsParse.call(this);\n }\n if (isStrict) {\n return this._monthsStrictRegex;\n } else {\n return this._monthsRegex;\n }\n } else {\n if (!hasOwnProp(this, '_monthsRegex')) {\n this._monthsRegex = defaultMonthsRegex;\n }\n return this._monthsStrictRegex && isStrict ?\n this._monthsStrictRegex : this._monthsRegex;\n }\n }\n\n function computeMonthsParse () {\n function cmpLenRev(a, b) {\n return b.length - a.length;\n }\n\n var shortPieces = [], longPieces = [], mixedPieces = [],\n i, mom;\n for (i = 0; i < 12; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, i]);\n shortPieces.push(this.monthsShort(mom, ''));\n longPieces.push(this.months(mom, ''));\n mixedPieces.push(this.months(mom, ''));\n mixedPieces.push(this.monthsShort(mom, ''));\n }\n // Sorting makes sure if one month (or abbr) is a prefix of another it\n // will match the longer piece.\n shortPieces.sort(cmpLenRev);\n longPieces.sort(cmpLenRev);\n mixedPieces.sort(cmpLenRev);\n for (i = 0; i < 12; i++) {\n shortPieces[i] = regexEscape(shortPieces[i]);\n longPieces[i] = regexEscape(longPieces[i]);\n }\n for (i = 0; i < 24; i++) {\n mixedPieces[i] = regexEscape(mixedPieces[i]);\n }\n\n this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._monthsShortRegex = this._monthsRegex;\n this._monthsStrictRegex = new RegExp('^(' + longPieces.join('|') + ')', 'i');\n this._monthsShortStrictRegex = new RegExp('^(' + shortPieces.join('|') + ')', 'i');\n }\n\n function createDate (y, m, d, h, M, s, ms) {\n // can't just apply() to create a date:\n // https://stackoverflow.com/q/181348\n var date;\n // the date constructor remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n date = new Date(y + 400, m, d, h, M, s, ms);\n if (isFinite(date.getFullYear())) {\n date.setFullYear(y);\n }\n } else {\n date = new Date(y, m, d, h, M, s, ms);\n }\n\n return date;\n }\n\n function createUTCDate (y) {\n var date;\n // the Date.UTC function remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n var args = Array.prototype.slice.call(arguments);\n // preserve leap years using a full 400 year cycle, then reset\n args[0] = y + 400;\n date = new Date(Date.UTC.apply(null, args));\n if (isFinite(date.getUTCFullYear())) {\n date.setUTCFullYear(y);\n }\n } else {\n date = new Date(Date.UTC.apply(null, arguments));\n }\n\n return date;\n }\n\n // start-of-first-week - start-of-year\n function firstWeekOffset(year, dow, doy) {\n var // first-week day -- which january is always in the first week (4 for iso, 1 for other)\n fwd = 7 + dow - doy,\n // first-week day local weekday -- which local weekday is fwd\n fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7;\n\n return -fwdlw + fwd - 1;\n }\n\n // https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday\n function dayOfYearFromWeeks(year, week, weekday, dow, doy) {\n var localWeekday = (7 + weekday - dow) % 7,\n weekOffset = firstWeekOffset(year, dow, doy),\n dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset,\n resYear, resDayOfYear;\n\n if (dayOfYear <= 0) {\n resYear = year - 1;\n resDayOfYear = daysInYear(resYear) + dayOfYear;\n } else if (dayOfYear > daysInYear(year)) {\n resYear = year + 1;\n resDayOfYear = dayOfYear - daysInYear(year);\n } else {\n resYear = year;\n resDayOfYear = dayOfYear;\n }\n\n return {\n year: resYear,\n dayOfYear: resDayOfYear\n };\n }\n\n function weekOfYear(mom, dow, doy) {\n var weekOffset = firstWeekOffset(mom.year(), dow, doy),\n week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1,\n resWeek, resYear;\n\n if (week < 1) {\n resYear = mom.year() - 1;\n resWeek = week + weeksInYear(resYear, dow, doy);\n } else if (week > weeksInYear(mom.year(), dow, doy)) {\n resWeek = week - weeksInYear(mom.year(), dow, doy);\n resYear = mom.year() + 1;\n } else {\n resYear = mom.year();\n resWeek = week;\n }\n\n return {\n week: resWeek,\n year: resYear\n };\n }\n\n function weeksInYear(year, dow, doy) {\n var weekOffset = firstWeekOffset(year, dow, doy),\n weekOffsetNext = firstWeekOffset(year + 1, dow, doy);\n return (daysInYear(year) - weekOffset + weekOffsetNext) / 7;\n }\n\n // FORMATTING\n\n addFormatToken('w', ['ww', 2], 'wo', 'week');\n addFormatToken('W', ['WW', 2], 'Wo', 'isoWeek');\n\n // ALIASES\n\n addUnitAlias('week', 'w');\n addUnitAlias('isoWeek', 'W');\n\n // PRIORITIES\n\n addUnitPriority('week', 5);\n addUnitPriority('isoWeek', 5);\n\n // PARSING\n\n addRegexToken('w', match1to2);\n addRegexToken('ww', match1to2, match2);\n addRegexToken('W', match1to2);\n addRegexToken('WW', match1to2, match2);\n\n addWeekParseToken(['w', 'ww', 'W', 'WW'], function (input, week, config, token) {\n week[token.substr(0, 1)] = toInt(input);\n });\n\n // HELPERS\n\n // LOCALES\n\n function localeWeek (mom) {\n return weekOfYear(mom, this._week.dow, this._week.doy).week;\n }\n\n var defaultLocaleWeek = {\n dow : 0, // Sunday is the first day of the week.\n doy : 6 // The week that contains Jan 6th is the first week of the year.\n };\n\n function localeFirstDayOfWeek () {\n return this._week.dow;\n }\n\n function localeFirstDayOfYear () {\n return this._week.doy;\n }\n\n // MOMENTS\n\n function getSetWeek (input) {\n var week = this.localeData().week(this);\n return input == null ? week : this.add((input - week) * 7, 'd');\n }\n\n function getSetISOWeek (input) {\n var week = weekOfYear(this, 1, 4).week;\n return input == null ? week : this.add((input - week) * 7, 'd');\n }\n\n // FORMATTING\n\n addFormatToken('d', 0, 'do', 'day');\n\n addFormatToken('dd', 0, 0, function (format) {\n return this.localeData().weekdaysMin(this, format);\n });\n\n addFormatToken('ddd', 0, 0, function (format) {\n return this.localeData().weekdaysShort(this, format);\n });\n\n addFormatToken('dddd', 0, 0, function (format) {\n return this.localeData().weekdays(this, format);\n });\n\n addFormatToken('e', 0, 0, 'weekday');\n addFormatToken('E', 0, 0, 'isoWeekday');\n\n // ALIASES\n\n addUnitAlias('day', 'd');\n addUnitAlias('weekday', 'e');\n addUnitAlias('isoWeekday', 'E');\n\n // PRIORITY\n addUnitPriority('day', 11);\n addUnitPriority('weekday', 11);\n addUnitPriority('isoWeekday', 11);\n\n // PARSING\n\n addRegexToken('d', match1to2);\n addRegexToken('e', match1to2);\n addRegexToken('E', match1to2);\n addRegexToken('dd', function (isStrict, locale) {\n return locale.weekdaysMinRegex(isStrict);\n });\n addRegexToken('ddd', function (isStrict, locale) {\n return locale.weekdaysShortRegex(isStrict);\n });\n addRegexToken('dddd', function (isStrict, locale) {\n return locale.weekdaysRegex(isStrict);\n });\n\n addWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) {\n var weekday = config._locale.weekdaysParse(input, token, config._strict);\n // if we didn't get a weekday name, mark the date as invalid\n if (weekday != null) {\n week.d = weekday;\n } else {\n getParsingFlags(config).invalidWeekday = input;\n }\n });\n\n addWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) {\n week[token] = toInt(input);\n });\n\n // HELPERS\n\n function parseWeekday(input, locale) {\n if (typeof input !== 'string') {\n return input;\n }\n\n if (!isNaN(input)) {\n return parseInt(input, 10);\n }\n\n input = locale.weekdaysParse(input);\n if (typeof input === 'number') {\n return input;\n }\n\n return null;\n }\n\n function parseIsoWeekday(input, locale) {\n if (typeof input === 'string') {\n return locale.weekdaysParse(input) % 7 || 7;\n }\n return isNaN(input) ? null : input;\n }\n\n // LOCALES\n function shiftWeekdays (ws, n) {\n return ws.slice(n, 7).concat(ws.slice(0, n));\n }\n\n var defaultLocaleWeekdays = 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_');\n function localeWeekdays (m, format) {\n var weekdays = isArray(this._weekdays) ? this._weekdays :\n this._weekdays[(m && m !== true && this._weekdays.isFormat.test(format)) ? 'format' : 'standalone'];\n return (m === true) ? shiftWeekdays(weekdays, this._week.dow)\n : (m) ? weekdays[m.day()] : weekdays;\n }\n\n var defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_');\n function localeWeekdaysShort (m) {\n return (m === true) ? shiftWeekdays(this._weekdaysShort, this._week.dow)\n : (m) ? this._weekdaysShort[m.day()] : this._weekdaysShort;\n }\n\n var defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_');\n function localeWeekdaysMin (m) {\n return (m === true) ? shiftWeekdays(this._weekdaysMin, this._week.dow)\n : (m) ? this._weekdaysMin[m.day()] : this._weekdaysMin;\n }\n\n function handleStrictParse$1(weekdayName, format, strict) {\n var i, ii, mom, llc = weekdayName.toLocaleLowerCase();\n if (!this._weekdaysParse) {\n this._weekdaysParse = [];\n this._shortWeekdaysParse = [];\n this._minWeekdaysParse = [];\n\n for (i = 0; i < 7; ++i) {\n mom = createUTC([2000, 1]).day(i);\n this._minWeekdaysParse[i] = this.weekdaysMin(mom, '').toLocaleLowerCase();\n this._shortWeekdaysParse[i] = this.weekdaysShort(mom, '').toLocaleLowerCase();\n this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase();\n }\n }\n\n if (strict) {\n if (format === 'dddd') {\n ii = indexOf.call(this._weekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else if (format === 'ddd') {\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n }\n } else {\n if (format === 'dddd') {\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else if (format === 'ddd') {\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._minWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n }\n }\n }\n\n function localeWeekdaysParse (weekdayName, format, strict) {\n var i, mom, regex;\n\n if (this._weekdaysParseExact) {\n return handleStrictParse$1.call(this, weekdayName, format, strict);\n }\n\n if (!this._weekdaysParse) {\n this._weekdaysParse = [];\n this._minWeekdaysParse = [];\n this._shortWeekdaysParse = [];\n this._fullWeekdaysParse = [];\n }\n\n for (i = 0; i < 7; i++) {\n // make the regex if we don't have it already\n\n mom = createUTC([2000, 1]).day(i);\n if (strict && !this._fullWeekdaysParse[i]) {\n this._fullWeekdaysParse[i] = new RegExp('^' + this.weekdays(mom, '').replace('.', '\\\\.?') + '$', 'i');\n this._shortWeekdaysParse[i] = new RegExp('^' + this.weekdaysShort(mom, '').replace('.', '\\\\.?') + '$', 'i');\n this._minWeekdaysParse[i] = new RegExp('^' + this.weekdaysMin(mom, '').replace('.', '\\\\.?') + '$', 'i');\n }\n if (!this._weekdaysParse[i]) {\n regex = '^' + this.weekdays(mom, '') + '|^' + this.weekdaysShort(mom, '') + '|^' + this.weekdaysMin(mom, '');\n this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i');\n }\n // test the regex\n if (strict && format === 'dddd' && this._fullWeekdaysParse[i].test(weekdayName)) {\n return i;\n } else if (strict && format === 'ddd' && this._shortWeekdaysParse[i].test(weekdayName)) {\n return i;\n } else if (strict && format === 'dd' && this._minWeekdaysParse[i].test(weekdayName)) {\n return i;\n } else if (!strict && this._weekdaysParse[i].test(weekdayName)) {\n return i;\n }\n }\n }\n\n // MOMENTS\n\n function getSetDayOfWeek (input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay();\n if (input != null) {\n input = parseWeekday(input, this.localeData());\n return this.add(input - day, 'd');\n } else {\n return day;\n }\n }\n\n function getSetLocaleDayOfWeek (input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7;\n return input == null ? weekday : this.add(input - weekday, 'd');\n }\n\n function getSetISODayOfWeek (input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n\n // behaves the same as moment#day except\n // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)\n // as a setter, sunday should belong to the previous week.\n\n if (input != null) {\n var weekday = parseIsoWeekday(input, this.localeData());\n return this.day(this.day() % 7 ? weekday : weekday - 7);\n } else {\n return this.day() || 7;\n }\n }\n\n var defaultWeekdaysRegex = matchWord;\n function weekdaysRegex (isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysStrictRegex;\n } else {\n return this._weekdaysRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n this._weekdaysRegex = defaultWeekdaysRegex;\n }\n return this._weekdaysStrictRegex && isStrict ?\n this._weekdaysStrictRegex : this._weekdaysRegex;\n }\n }\n\n var defaultWeekdaysShortRegex = matchWord;\n function weekdaysShortRegex (isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysShortStrictRegex;\n } else {\n return this._weekdaysShortRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysShortRegex')) {\n this._weekdaysShortRegex = defaultWeekdaysShortRegex;\n }\n return this._weekdaysShortStrictRegex && isStrict ?\n this._weekdaysShortStrictRegex : this._weekdaysShortRegex;\n }\n }\n\n var defaultWeekdaysMinRegex = matchWord;\n function weekdaysMinRegex (isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysMinStrictRegex;\n } else {\n return this._weekdaysMinRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysMinRegex')) {\n this._weekdaysMinRegex = defaultWeekdaysMinRegex;\n }\n return this._weekdaysMinStrictRegex && isStrict ?\n this._weekdaysMinStrictRegex : this._weekdaysMinRegex;\n }\n }\n\n\n function computeWeekdaysParse () {\n function cmpLenRev(a, b) {\n return b.length - a.length;\n }\n\n var minPieces = [], shortPieces = [], longPieces = [], mixedPieces = [],\n i, mom, minp, shortp, longp;\n for (i = 0; i < 7; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, 1]).day(i);\n minp = this.weekdaysMin(mom, '');\n shortp = this.weekdaysShort(mom, '');\n longp = this.weekdays(mom, '');\n minPieces.push(minp);\n shortPieces.push(shortp);\n longPieces.push(longp);\n mixedPieces.push(minp);\n mixedPieces.push(shortp);\n mixedPieces.push(longp);\n }\n // Sorting makes sure if one weekday (or abbr) is a prefix of another it\n // will match the longer piece.\n minPieces.sort(cmpLenRev);\n shortPieces.sort(cmpLenRev);\n longPieces.sort(cmpLenRev);\n mixedPieces.sort(cmpLenRev);\n for (i = 0; i < 7; i++) {\n shortPieces[i] = regexEscape(shortPieces[i]);\n longPieces[i] = regexEscape(longPieces[i]);\n mixedPieces[i] = regexEscape(mixedPieces[i]);\n }\n\n this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._weekdaysShortRegex = this._weekdaysRegex;\n this._weekdaysMinRegex = this._weekdaysRegex;\n\n this._weekdaysStrictRegex = new RegExp('^(' + longPieces.join('|') + ')', 'i');\n this._weekdaysShortStrictRegex = new RegExp('^(' + shortPieces.join('|') + ')', 'i');\n this._weekdaysMinStrictRegex = new RegExp('^(' + minPieces.join('|') + ')', 'i');\n }\n\n // FORMATTING\n\n function hFormat() {\n return this.hours() % 12 || 12;\n }\n\n function kFormat() {\n return this.hours() || 24;\n }\n\n addFormatToken('H', ['HH', 2], 0, 'hour');\n addFormatToken('h', ['hh', 2], 0, hFormat);\n addFormatToken('k', ['kk', 2], 0, kFormat);\n\n addFormatToken('hmm', 0, 0, function () {\n return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2);\n });\n\n addFormatToken('hmmss', 0, 0, function () {\n return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2) +\n zeroFill(this.seconds(), 2);\n });\n\n addFormatToken('Hmm', 0, 0, function () {\n return '' + this.hours() + zeroFill(this.minutes(), 2);\n });\n\n addFormatToken('Hmmss', 0, 0, function () {\n return '' + this.hours() + zeroFill(this.minutes(), 2) +\n zeroFill(this.seconds(), 2);\n });\n\n function meridiem (token, lowercase) {\n addFormatToken(token, 0, 0, function () {\n return this.localeData().meridiem(this.hours(), this.minutes(), lowercase);\n });\n }\n\n meridiem('a', true);\n meridiem('A', false);\n\n // ALIASES\n\n addUnitAlias('hour', 'h');\n\n // PRIORITY\n addUnitPriority('hour', 13);\n\n // PARSING\n\n function matchMeridiem (isStrict, locale) {\n return locale._meridiemParse;\n }\n\n addRegexToken('a', matchMeridiem);\n addRegexToken('A', matchMeridiem);\n addRegexToken('H', match1to2);\n addRegexToken('h', match1to2);\n addRegexToken('k', match1to2);\n addRegexToken('HH', match1to2, match2);\n addRegexToken('hh', match1to2, match2);\n addRegexToken('kk', match1to2, match2);\n\n addRegexToken('hmm', match3to4);\n addRegexToken('hmmss', match5to6);\n addRegexToken('Hmm', match3to4);\n addRegexToken('Hmmss', match5to6);\n\n addParseToken(['H', 'HH'], HOUR);\n addParseToken(['k', 'kk'], function (input, array, config) {\n var kInput = toInt(input);\n array[HOUR] = kInput === 24 ? 0 : kInput;\n });\n addParseToken(['a', 'A'], function (input, array, config) {\n config._isPm = config._locale.isPM(input);\n config._meridiem = input;\n });\n addParseToken(['h', 'hh'], function (input, array, config) {\n array[HOUR] = toInt(input);\n getParsingFlags(config).bigHour = true;\n });\n addParseToken('hmm', function (input, array, config) {\n var pos = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos));\n array[MINUTE] = toInt(input.substr(pos));\n getParsingFlags(config).bigHour = true;\n });\n addParseToken('hmmss', function (input, array, config) {\n var pos1 = input.length - 4;\n var pos2 = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos1));\n array[MINUTE] = toInt(input.substr(pos1, 2));\n array[SECOND] = toInt(input.substr(pos2));\n getParsingFlags(config).bigHour = true;\n });\n addParseToken('Hmm', function (input, array, config) {\n var pos = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos));\n array[MINUTE] = toInt(input.substr(pos));\n });\n addParseToken('Hmmss', function (input, array, config) {\n var pos1 = input.length - 4;\n var pos2 = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos1));\n array[MINUTE] = toInt(input.substr(pos1, 2));\n array[SECOND] = toInt(input.substr(pos2));\n });\n\n // LOCALES\n\n function localeIsPM (input) {\n // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays\n // Using charAt should be more compatible.\n return ((input + '').toLowerCase().charAt(0) === 'p');\n }\n\n var defaultLocaleMeridiemParse = /[ap]\\.?m?\\.?/i;\n function localeMeridiem (hours, minutes, isLower) {\n if (hours > 11) {\n return isLower ? 'pm' : 'PM';\n } else {\n return isLower ? 'am' : 'AM';\n }\n }\n\n\n // MOMENTS\n\n // Setting the hour should keep the time, because the user explicitly\n // specified which hour they want. So trying to maintain the same hour (in\n // a new timezone) makes sense. Adding/subtracting hours does not follow\n // this rule.\n var getSetHour = makeGetSet('Hours', true);\n\n var baseConfig = {\n calendar: defaultCalendar,\n longDateFormat: defaultLongDateFormat,\n invalidDate: defaultInvalidDate,\n ordinal: defaultOrdinal,\n dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse,\n relativeTime: defaultRelativeTime,\n\n months: defaultLocaleMonths,\n monthsShort: defaultLocaleMonthsShort,\n\n week: defaultLocaleWeek,\n\n weekdays: defaultLocaleWeekdays,\n weekdaysMin: defaultLocaleWeekdaysMin,\n weekdaysShort: defaultLocaleWeekdaysShort,\n\n meridiemParse: defaultLocaleMeridiemParse\n };\n\n // internal storage for locale config files\n var locales = {};\n var localeFamilies = {};\n var globalLocale;\n\n function normalizeLocale(key) {\n return key ? key.toLowerCase().replace('_', '-') : key;\n }\n\n // pick the locale from the array\n // try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each\n // substring from most specific to least, but move to the next array item if it's a more specific variant than the current root\n function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return globalLocale;\n }\n\n function loadLocale(name) {\n var oldLocale = null;\n // TODO: Find a better way to register and load all the locales in Node\n if (!locales[name] && (typeof module !== 'undefined') &&\n module && module.exports) {\n try {\n oldLocale = globalLocale._abbr;\n var aliasedRequire = require;\n aliasedRequire('./locale/' + name);\n getSetGlobalLocale(oldLocale);\n } catch (e) {}\n }\n return locales[name];\n }\n\n // This function will load locale and then set the global locale. If\n // no arguments are passed in, it will simply return the current global\n // locale key.\n function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n }\n\n function defineLocale (name, config) {\n if (config !== null) {\n var locale, parentConfig = baseConfig;\n config.abbr = name;\n if (locales[name] != null) {\n deprecateSimple('defineLocaleOverride',\n 'use moment.updateLocale(localeName, config) to change ' +\n 'an existing locale. moment.defineLocale(localeName, ' +\n 'config) should only be used for creating a new locale ' +\n 'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.');\n parentConfig = locales[name]._config;\n } else if (config.parentLocale != null) {\n if (locales[config.parentLocale] != null) {\n parentConfig = locales[config.parentLocale]._config;\n } else {\n locale = loadLocale(config.parentLocale);\n if (locale != null) {\n parentConfig = locale._config;\n } else {\n if (!localeFamilies[config.parentLocale]) {\n localeFamilies[config.parentLocale] = [];\n }\n localeFamilies[config.parentLocale].push({\n name: name,\n config: config\n });\n return null;\n }\n }\n }\n locales[name] = new Locale(mergeConfigs(parentConfig, config));\n\n if (localeFamilies[name]) {\n localeFamilies[name].forEach(function (x) {\n defineLocale(x.name, x.config);\n });\n }\n\n // backwards compat for now: also set the locale\n // make sure we set the locale AFTER all child locales have been\n // created, so we won't end up with the child locale set.\n getSetGlobalLocale(name);\n\n\n return locales[name];\n } else {\n // useful for testing\n delete locales[name];\n return null;\n }\n }\n\n function updateLocale(name, config) {\n if (config != null) {\n var locale, tmpLocale, parentConfig = baseConfig;\n // MERGE\n tmpLocale = loadLocale(name);\n if (tmpLocale != null) {\n parentConfig = tmpLocale._config;\n }\n config = mergeConfigs(parentConfig, config);\n locale = new Locale(config);\n locale.parentLocale = locales[name];\n locales[name] = locale;\n\n // backwards compat for now: also set the locale\n getSetGlobalLocale(name);\n } else {\n // pass null for config to unupdate, useful for tests\n if (locales[name] != null) {\n if (locales[name].parentLocale != null) {\n locales[name] = locales[name].parentLocale;\n } else if (locales[name] != null) {\n delete locales[name];\n }\n }\n }\n return locales[name];\n }\n\n // returns locale data\n function getLocale (key) {\n var locale;\n\n if (key && key._locale && key._locale._abbr) {\n key = key._locale._abbr;\n }\n\n if (!key) {\n return globalLocale;\n }\n\n if (!isArray(key)) {\n //short-circuit everything else\n locale = loadLocale(key);\n if (locale) {\n return locale;\n }\n key = [key];\n }\n\n return chooseLocale(key);\n }\n\n function listLocales() {\n return keys(locales);\n }\n\n function checkOverflow (m) {\n var overflow;\n var a = m._a;\n\n if (a && getParsingFlags(m).overflow === -2) {\n overflow =\n a[MONTH] < 0 || a[MONTH] > 11 ? MONTH :\n a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH]) ? DATE :\n a[HOUR] < 0 || a[HOUR] > 24 || (a[HOUR] === 24 && (a[MINUTE] !== 0 || a[SECOND] !== 0 || a[MILLISECOND] !== 0)) ? HOUR :\n a[MINUTE] < 0 || a[MINUTE] > 59 ? MINUTE :\n a[SECOND] < 0 || a[SECOND] > 59 ? SECOND :\n a[MILLISECOND] < 0 || a[MILLISECOND] > 999 ? MILLISECOND :\n -1;\n\n if (getParsingFlags(m)._overflowDayOfYear && (overflow < YEAR || overflow > DATE)) {\n overflow = DATE;\n }\n if (getParsingFlags(m)._overflowWeeks && overflow === -1) {\n overflow = WEEK;\n }\n if (getParsingFlags(m)._overflowWeekday && overflow === -1) {\n overflow = WEEKDAY;\n }\n\n getParsingFlags(m).overflow = overflow;\n }\n\n return m;\n }\n\n // Pick the first defined of two or three arguments.\n function defaults(a, b, c) {\n if (a != null) {\n return a;\n }\n if (b != null) {\n return b;\n }\n return c;\n }\n\n function currentDateArray(config) {\n // hooks is actually the exported moment object\n var nowValue = new Date(hooks.now());\n if (config._useUTC) {\n return [nowValue.getUTCFullYear(), nowValue.getUTCMonth(), nowValue.getUTCDate()];\n }\n return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()];\n }\n\n // convert an array to a date.\n // the array should mirror the parameters below\n // note: all values past the year are optional and will default to the lowest possible value.\n // [year, month, day , hour, minute, second, millisecond]\n function configFromArray (config) {\n var i, date, input = [], currentDate, expectedWeekday, yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear != null) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse) || config._dayOfYear === 0) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n expectedWeekday = config._useUTC ? config._d.getUTCDay() : config._d.getDay();\n\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n\n // check for mismatching day of week\n if (config._w && typeof config._w.d !== 'undefined' && config._w.d !== expectedWeekday) {\n getParsingFlags(config).weekdayMismatch = true;\n }\n }\n\n function dayOfYearFromWeekInfo(config) {\n var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow;\n\n w = config._w;\n if (w.GG != null || w.W != null || w.E != null) {\n dow = 1;\n doy = 4;\n\n // TODO: We need to take the current isoWeekYear, but that depends on\n // how we interpret now (local, utc, fixed offset). So create\n // a now version of current config (take local/utc/offset flags, and\n // create now).\n weekYear = defaults(w.GG, config._a[YEAR], weekOfYear(createLocal(), 1, 4).year);\n week = defaults(w.W, 1);\n weekday = defaults(w.E, 1);\n if (weekday < 1 || weekday > 7) {\n weekdayOverflow = true;\n }\n } else {\n dow = config._locale._week.dow;\n doy = config._locale._week.doy;\n\n var curWeek = weekOfYear(createLocal(), dow, doy);\n\n weekYear = defaults(w.gg, config._a[YEAR], curWeek.year);\n\n // Default to current week.\n week = defaults(w.w, curWeek.week);\n\n if (w.d != null) {\n // weekday -- low day numbers are considered next week\n weekday = w.d;\n if (weekday < 0 || weekday > 6) {\n weekdayOverflow = true;\n }\n } else if (w.e != null) {\n // local weekday -- counting starts from beginning of week\n weekday = w.e + dow;\n if (w.e < 0 || w.e > 6) {\n weekdayOverflow = true;\n }\n } else {\n // default to beginning of week\n weekday = dow;\n }\n }\n if (week < 1 || week > weeksInYear(weekYear, dow, doy)) {\n getParsingFlags(config)._overflowWeeks = true;\n } else if (weekdayOverflow != null) {\n getParsingFlags(config)._overflowWeekday = true;\n } else {\n temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy);\n config._a[YEAR] = temp.year;\n config._dayOfYear = temp.dayOfYear;\n }\n }\n\n // iso 8601 regex\n // 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00)\n var extendedIsoRegex = /^\\s*((?:[+-]\\d{6}|\\d{4})-(?:\\d\\d-\\d\\d|W\\d\\d-\\d|W\\d\\d|\\d\\d\\d|\\d\\d))(?:(T| )(\\d\\d(?::\\d\\d(?::\\d\\d(?:[.,]\\d+)?)?)?)([\\+\\-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/;\n var basicIsoRegex = /^\\s*((?:[+-]\\d{6}|\\d{4})(?:\\d\\d\\d\\d|W\\d\\d\\d|W\\d\\d|\\d\\d\\d|\\d\\d))(?:(T| )(\\d\\d(?:\\d\\d(?:\\d\\d(?:[.,]\\d+)?)?)?)([\\+\\-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/;\n\n var tzRegex = /Z|[+-]\\d\\d(?::?\\d\\d)?/;\n\n var isoDates = [\n ['YYYYYY-MM-DD', /[+-]\\d{6}-\\d\\d-\\d\\d/],\n ['YYYY-MM-DD', /\\d{4}-\\d\\d-\\d\\d/],\n ['GGGG-[W]WW-E', /\\d{4}-W\\d\\d-\\d/],\n ['GGGG-[W]WW', /\\d{4}-W\\d\\d/, false],\n ['YYYY-DDD', /\\d{4}-\\d{3}/],\n ['YYYY-MM', /\\d{4}-\\d\\d/, false],\n ['YYYYYYMMDD', /[+-]\\d{10}/],\n ['YYYYMMDD', /\\d{8}/],\n // YYYYMM is NOT allowed by the standard\n ['GGGG[W]WWE', /\\d{4}W\\d{3}/],\n ['GGGG[W]WW', /\\d{4}W\\d{2}/, false],\n ['YYYYDDD', /\\d{7}/]\n ];\n\n // iso time formats and regexes\n var isoTimes = [\n ['HH:mm:ss.SSSS', /\\d\\d:\\d\\d:\\d\\d\\.\\d+/],\n ['HH:mm:ss,SSSS', /\\d\\d:\\d\\d:\\d\\d,\\d+/],\n ['HH:mm:ss', /\\d\\d:\\d\\d:\\d\\d/],\n ['HH:mm', /\\d\\d:\\d\\d/],\n ['HHmmss.SSSS', /\\d\\d\\d\\d\\d\\d\\.\\d+/],\n ['HHmmss,SSSS', /\\d\\d\\d\\d\\d\\d,\\d+/],\n ['HHmmss', /\\d\\d\\d\\d\\d\\d/],\n ['HHmm', /\\d\\d\\d\\d/],\n ['HH', /\\d\\d/]\n ];\n\n var aspNetJsonRegex = /^\\/?Date\\((\\-?\\d+)/i;\n\n // date from iso format\n function configFromISO(config) {\n var i, l,\n string = config._i,\n match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string),\n allowTime, dateFormat, timeFormat, tzFormat;\n\n if (match) {\n getParsingFlags(config).iso = true;\n\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(match[1])) {\n dateFormat = isoDates[i][0];\n allowTime = isoDates[i][2] !== false;\n break;\n }\n }\n if (dateFormat == null) {\n config._isValid = false;\n return;\n }\n if (match[3]) {\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(match[3])) {\n // match[2] should be 'T' or space\n timeFormat = (match[2] || ' ') + isoTimes[i][0];\n break;\n }\n }\n if (timeFormat == null) {\n config._isValid = false;\n return;\n }\n }\n if (!allowTime && timeFormat != null) {\n config._isValid = false;\n return;\n }\n if (match[4]) {\n if (tzRegex.exec(match[4])) {\n tzFormat = 'Z';\n } else {\n config._isValid = false;\n return;\n }\n }\n config._f = dateFormat + (timeFormat || '') + (tzFormat || '');\n configFromStringAndFormat(config);\n } else {\n config._isValid = false;\n }\n }\n\n // RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3\n var rfc2822 = /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\\s)?(\\d{1,2})\\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\\s(\\d{2,4})\\s(\\d\\d):(\\d\\d)(?::(\\d\\d))?\\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\\d{4}))$/;\n\n function extractFromRFC2822Strings(yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr) {\n var result = [\n untruncateYear(yearStr),\n defaultLocaleMonthsShort.indexOf(monthStr),\n parseInt(dayStr, 10),\n parseInt(hourStr, 10),\n parseInt(minuteStr, 10)\n ];\n\n if (secondStr) {\n result.push(parseInt(secondStr, 10));\n }\n\n return result;\n }\n\n function untruncateYear(yearStr) {\n var year = parseInt(yearStr, 10);\n if (year <= 49) {\n return 2000 + year;\n } else if (year <= 999) {\n return 1900 + year;\n }\n return year;\n }\n\n function preprocessRFC2822(s) {\n // Remove comments and folding whitespace and replace multiple-spaces with a single space\n return s.replace(/\\([^)]*\\)|[\\n\\t]/g, ' ').replace(/(\\s\\s+)/g, ' ').replace(/^\\s\\s*/, '').replace(/\\s\\s*$/, '');\n }\n\n function checkWeekday(weekdayStr, parsedInput, config) {\n if (weekdayStr) {\n // TODO: Replace the vanilla JS Date object with an indepentent day-of-week check.\n var weekdayProvided = defaultLocaleWeekdaysShort.indexOf(weekdayStr),\n weekdayActual = new Date(parsedInput[0], parsedInput[1], parsedInput[2]).getDay();\n if (weekdayProvided !== weekdayActual) {\n getParsingFlags(config).weekdayMismatch = true;\n config._isValid = false;\n return false;\n }\n }\n return true;\n }\n\n var obsOffsets = {\n UT: 0,\n GMT: 0,\n EDT: -4 * 60,\n EST: -5 * 60,\n CDT: -5 * 60,\n CST: -6 * 60,\n MDT: -6 * 60,\n MST: -7 * 60,\n PDT: -7 * 60,\n PST: -8 * 60\n };\n\n function calculateOffset(obsOffset, militaryOffset, numOffset) {\n if (obsOffset) {\n return obsOffsets[obsOffset];\n } else if (militaryOffset) {\n // the only allowed military tz is Z\n return 0;\n } else {\n var hm = parseInt(numOffset, 10);\n var m = hm % 100, h = (hm - m) / 100;\n return h * 60 + m;\n }\n }\n\n // date and time from ref 2822 format\n function configFromRFC2822(config) {\n var match = rfc2822.exec(preprocessRFC2822(config._i));\n if (match) {\n var parsedArray = extractFromRFC2822Strings(match[4], match[3], match[2], match[5], match[6], match[7]);\n if (!checkWeekday(match[1], parsedArray, config)) {\n return;\n }\n\n config._a = parsedArray;\n config._tzm = calculateOffset(match[8], match[9], match[10]);\n\n config._d = createUTCDate.apply(null, config._a);\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n\n getParsingFlags(config).rfc2822 = true;\n } else {\n config._isValid = false;\n }\n }\n\n // date from iso format or fallback\n function configFromString(config) {\n var matched = aspNetJsonRegex.exec(config._i);\n\n if (matched !== null) {\n config._d = new Date(+matched[1]);\n return;\n }\n\n configFromISO(config);\n if (config._isValid === false) {\n delete config._isValid;\n } else {\n return;\n }\n\n configFromRFC2822(config);\n if (config._isValid === false) {\n delete config._isValid;\n } else {\n return;\n }\n\n // Final attempt, use Input Fallback\n hooks.createFromInputFallback(config);\n }\n\n hooks.createFromInputFallback = deprecate(\n 'value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), ' +\n 'which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are ' +\n 'discouraged and will be removed in an upcoming major release. Please refer to ' +\n 'http://momentjs.com/guides/#/warnings/js-date/ for more info.',\n function (config) {\n config._d = new Date(config._i + (config._useUTC ? ' UTC' : ''));\n }\n );\n\n // constant that refers to the ISO standard\n hooks.ISO_8601 = function () {};\n\n // constant that refers to the RFC 2822 form\n hooks.RFC_2822 = function () {};\n\n // date from string and format string\n function configFromStringAndFormat(config) {\n // TODO: Move this to another part of the creation flow to prevent circular deps\n if (config._f === hooks.ISO_8601) {\n configFromISO(config);\n return;\n }\n if (config._f === hooks.RFC_2822) {\n configFromRFC2822(config);\n return;\n }\n config._a = [];\n getParsingFlags(config).empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n // console.log('token', token, 'parsedInput', parsedInput,\n // 'regex', getParseRegexForToken(token, config));\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n getParsingFlags(config).unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n getParsingFlags(config).empty = false;\n }\n else {\n getParsingFlags(config).unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n getParsingFlags(config).unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n getParsingFlags(config).charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n getParsingFlags(config).unusedInput.push(string);\n }\n\n // clear _12h flag if hour is <= 12\n if (config._a[HOUR] <= 12 &&\n getParsingFlags(config).bigHour === true &&\n config._a[HOUR] > 0) {\n getParsingFlags(config).bigHour = undefined;\n }\n\n getParsingFlags(config).parsedDateParts = config._a.slice(0);\n getParsingFlags(config).meridiem = config._meridiem;\n // handle meridiem\n config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR], config._meridiem);\n\n configFromArray(config);\n checkOverflow(config);\n }\n\n\n function meridiemFixWrap (locale, hour, meridiem) {\n var isPm;\n\n if (meridiem == null) {\n // nothing to do\n return hour;\n }\n if (locale.meridiemHour != null) {\n return locale.meridiemHour(hour, meridiem);\n } else if (locale.isPM != null) {\n // Fallback\n isPm = locale.isPM(meridiem);\n if (isPm && hour < 12) {\n hour += 12;\n }\n if (!isPm && hour === 12) {\n hour = 0;\n }\n return hour;\n } else {\n // this is not supposed to happen\n return hour;\n }\n }\n\n // date from string and array of format strings\n function configFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n\n scoreToBeat,\n i,\n currentScore;\n\n if (config._f.length === 0) {\n getParsingFlags(config).invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < config._f.length; i++) {\n currentScore = 0;\n tempConfig = copyConfig({}, config);\n if (config._useUTC != null) {\n tempConfig._useUTC = config._useUTC;\n }\n tempConfig._f = config._f[i];\n configFromStringAndFormat(tempConfig);\n\n if (!isValid(tempConfig)) {\n continue;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += getParsingFlags(tempConfig).charsLeftOver;\n\n //or tokens\n currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10;\n\n getParsingFlags(tempConfig).score = currentScore;\n\n if (scoreToBeat == null || currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n\n extend(config, bestMoment || tempConfig);\n }\n\n function configFromObject(config) {\n if (config._d) {\n return;\n }\n\n var i = normalizeObjectUnits(config._i);\n config._a = map([i.year, i.month, i.day || i.date, i.hour, i.minute, i.second, i.millisecond], function (obj) {\n return obj && parseInt(obj, 10);\n });\n\n configFromArray(config);\n }\n\n function createFromConfig (config) {\n var res = new Moment(checkOverflow(prepareConfig(config)));\n if (res._nextDay) {\n // Adding is smart enough around DST\n res.add(1, 'd');\n res._nextDay = undefined;\n }\n\n return res;\n }\n\n function prepareConfig (config) {\n var input = config._i,\n format = config._f;\n\n config._locale = config._locale || getLocale(config._l);\n\n if (input === null || (format === undefined && input === '')) {\n return createInvalid({nullInput: true});\n }\n\n if (typeof input === 'string') {\n config._i = input = config._locale.preparse(input);\n }\n\n if (isMoment(input)) {\n return new Moment(checkOverflow(input));\n } else if (isDate(input)) {\n config._d = input;\n } else if (isArray(format)) {\n configFromStringAndArray(config);\n } else if (format) {\n configFromStringAndFormat(config);\n } else {\n configFromInput(config);\n }\n\n if (!isValid(config)) {\n config._d = null;\n }\n\n return config;\n }\n\n function configFromInput(config) {\n var input = config._i;\n if (isUndefined(input)) {\n config._d = new Date(hooks.now());\n } else if (isDate(input)) {\n config._d = new Date(input.valueOf());\n } else if (typeof input === 'string') {\n configFromString(config);\n } else if (isArray(input)) {\n config._a = map(input.slice(0), function (obj) {\n return parseInt(obj, 10);\n });\n configFromArray(config);\n } else if (isObject(input)) {\n configFromObject(config);\n } else if (isNumber(input)) {\n // from milliseconds\n config._d = new Date(input);\n } else {\n hooks.createFromInputFallback(config);\n }\n }\n\n function createLocalOrUTC (input, format, locale, strict, isUTC) {\n var c = {};\n\n if (locale === true || locale === false) {\n strict = locale;\n locale = undefined;\n }\n\n if ((isObject(input) && isObjectEmpty(input)) ||\n (isArray(input) && input.length === 0)) {\n input = undefined;\n }\n // object construction must be done this way.\n // https://github.com/moment/moment/issues/1423\n c._isAMomentObject = true;\n c._useUTC = c._isUTC = isUTC;\n c._l = locale;\n c._i = input;\n c._f = format;\n c._strict = strict;\n\n return createFromConfig(c);\n }\n\n function createLocal (input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, false);\n }\n\n var prototypeMin = deprecate(\n 'moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/',\n function () {\n var other = createLocal.apply(null, arguments);\n if (this.isValid() && other.isValid()) {\n return other < this ? this : other;\n } else {\n return createInvalid();\n }\n }\n );\n\n var prototypeMax = deprecate(\n 'moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/',\n function () {\n var other = createLocal.apply(null, arguments);\n if (this.isValid() && other.isValid()) {\n return other > this ? this : other;\n } else {\n return createInvalid();\n }\n }\n );\n\n // Pick a moment m from moments so that m[fn](other) is true for all\n // other. This relies on the function fn to be transitive.\n //\n // moments should either be an array of moment objects or an array, whose\n // first element is an array of moment objects.\n function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return createLocal();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }\n\n // TODO: Use [].sort instead?\n function min () {\n var args = [].slice.call(arguments, 0);\n\n return pickBy('isBefore', args);\n }\n\n function max () {\n var args = [].slice.call(arguments, 0);\n\n return pickBy('isAfter', args);\n }\n\n var now = function () {\n return Date.now ? Date.now() : +(new Date());\n };\n\n var ordering = ['year', 'quarter', 'month', 'week', 'day', 'hour', 'minute', 'second', 'millisecond'];\n\n function isDurationValid(m) {\n for (var key in m) {\n if (!(indexOf.call(ordering, key) !== -1 && (m[key] == null || !isNaN(m[key])))) {\n return false;\n }\n }\n\n var unitHasDecimal = false;\n for (var i = 0; i < ordering.length; ++i) {\n if (m[ordering[i]]) {\n if (unitHasDecimal) {\n return false; // only allow non-integers for smallest unit\n }\n if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) {\n unitHasDecimal = true;\n }\n }\n }\n\n return true;\n }\n\n function isValid$1() {\n return this._isValid;\n }\n\n function createInvalid$1() {\n return createDuration(NaN);\n }\n\n function Duration (duration) {\n var normalizedInput = normalizeObjectUnits(duration),\n years = normalizedInput.year || 0,\n quarters = normalizedInput.quarter || 0,\n months = normalizedInput.month || 0,\n weeks = normalizedInput.week || normalizedInput.isoWeek || 0,\n days = normalizedInput.day || 0,\n hours = normalizedInput.hour || 0,\n minutes = normalizedInput.minute || 0,\n seconds = normalizedInput.second || 0,\n milliseconds = normalizedInput.millisecond || 0;\n\n this._isValid = isDurationValid(normalizedInput);\n\n // representation for dateAddRemove\n this._milliseconds = +milliseconds +\n seconds * 1e3 + // 1000\n minutes * 6e4 + // 1000 * 60\n hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978\n // Because of dateAddRemove treats 24 hours as different from a\n // day when working around DST, we need to store them separately\n this._days = +days +\n weeks * 7;\n // It is impossible to translate months into days without knowing\n // which months you are are talking about, so we have to store\n // it separately.\n this._months = +months +\n quarters * 3 +\n years * 12;\n\n this._data = {};\n\n this._locale = getLocale();\n\n this._bubble();\n }\n\n function isDuration (obj) {\n return obj instanceof Duration;\n }\n\n function absRound (number) {\n if (number < 0) {\n return Math.round(-1 * number) * -1;\n } else {\n return Math.round(number);\n }\n }\n\n // FORMATTING\n\n function offset (token, separator) {\n addFormatToken(token, 0, 0, function () {\n var offset = this.utcOffset();\n var sign = '+';\n if (offset < 0) {\n offset = -offset;\n sign = '-';\n }\n return sign + zeroFill(~~(offset / 60), 2) + separator + zeroFill(~~(offset) % 60, 2);\n });\n }\n\n offset('Z', ':');\n offset('ZZ', '');\n\n // PARSING\n\n addRegexToken('Z', matchShortOffset);\n addRegexToken('ZZ', matchShortOffset);\n addParseToken(['Z', 'ZZ'], function (input, array, config) {\n config._useUTC = true;\n config._tzm = offsetFromString(matchShortOffset, input);\n });\n\n // HELPERS\n\n // timezone chunker\n // '+10:00' > ['10', '00']\n // '-1530' > ['-15', '30']\n var chunkOffset = /([\\+\\-]|\\d\\d)/gi;\n\n function offsetFromString(matcher, string) {\n var matches = (string || '').match(matcher);\n\n if (matches === null) {\n return null;\n }\n\n var chunk = matches[matches.length - 1] || [];\n var parts = (chunk + '').match(chunkOffset) || ['-', 0, 0];\n var minutes = +(parts[1] * 60) + toInt(parts[2]);\n\n return minutes === 0 ?\n 0 :\n parts[0] === '+' ? minutes : -minutes;\n }\n\n // Return a moment from input, that is local/utc/zone equivalent to model.\n function cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? input.valueOf() : createLocal(input).valueOf()) - res.valueOf();\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(res._d.valueOf() + diff);\n hooks.updateOffset(res, false);\n return res;\n } else {\n return createLocal(input).local();\n }\n }\n\n function getDateOffset (m) {\n // On Firefox.24 Date#getTimezoneOffset returns a floating point.\n // https://github.com/moment/moment/pull/1871\n return -Math.round(m._d.getTimezoneOffset() / 15) * 15;\n }\n\n // HOOKS\n\n // This function will be called whenever a moment is mutated.\n // It is intended to keep the offset in sync with the timezone.\n hooks.updateOffset = function () {};\n\n // MOMENTS\n\n // keepLocalTime = true means only change the timezone, without\n // affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]-->\n // 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset\n // +0200, so we adjust the time as needed, to be valid.\n //\n // Keeping the time actually adds/subtracts (one hour)\n // from the actual represented time. That is why we call updateOffset\n // a second time. In case it wants us to change the offset again\n // _changeInProgress == true case, then we have to adjust, because\n // there is no such time in the given timezone.\n function getSetOffset (input, keepLocalTime, keepMinutes) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n if (input === null) {\n return this;\n }\n } else if (Math.abs(input) < 16 && !keepMinutes) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n addSubtract(this, createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }\n\n function getSetZone (input, keepLocalTime) {\n if (input != null) {\n if (typeof input !== 'string') {\n input = -input;\n }\n\n this.utcOffset(input, keepLocalTime);\n\n return this;\n } else {\n return -this.utcOffset();\n }\n }\n\n function setOffsetToUTC (keepLocalTime) {\n return this.utcOffset(0, keepLocalTime);\n }\n\n function setOffsetToLocal (keepLocalTime) {\n if (this._isUTC) {\n this.utcOffset(0, keepLocalTime);\n this._isUTC = false;\n\n if (keepLocalTime) {\n this.subtract(getDateOffset(this), 'm');\n }\n }\n return this;\n }\n\n function setOffsetToParsedOffset () {\n if (this._tzm != null) {\n this.utcOffset(this._tzm, false, true);\n } else if (typeof this._i === 'string') {\n var tZone = offsetFromString(matchOffset, this._i);\n if (tZone != null) {\n this.utcOffset(tZone);\n }\n else {\n this.utcOffset(0, true);\n }\n }\n return this;\n }\n\n function hasAlignedHourOffset (input) {\n if (!this.isValid()) {\n return false;\n }\n input = input ? createLocal(input).utcOffset() : 0;\n\n return (this.utcOffset() - input) % 60 === 0;\n }\n\n function isDaylightSavingTime () {\n return (\n this.utcOffset() > this.clone().month(0).utcOffset() ||\n this.utcOffset() > this.clone().month(5).utcOffset()\n );\n }\n\n function isDaylightSavingTimeShifted () {\n if (!isUndefined(this._isDSTShifted)) {\n return this._isDSTShifted;\n }\n\n var c = {};\n\n copyConfig(c, this);\n c = prepareConfig(c);\n\n if (c._a) {\n var other = c._isUTC ? createUTC(c._a) : createLocal(c._a);\n this._isDSTShifted = this.isValid() &&\n compareArrays(c._a, other.toArray()) > 0;\n } else {\n this._isDSTShifted = false;\n }\n\n return this._isDSTShifted;\n }\n\n function isLocal () {\n return this.isValid() ? !this._isUTC : false;\n }\n\n function isUtcOffset () {\n return this.isValid() ? this._isUTC : false;\n }\n\n function isUtc () {\n return this.isValid() ? this._isUTC && this._offset === 0 : false;\n }\n\n // ASP.NET json date format regex\n var aspNetRegex = /^(\\-|\\+)?(?:(\\d*)[. ])?(\\d+)\\:(\\d+)(?:\\:(\\d+)(\\.\\d*)?)?$/;\n\n // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html\n // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere\n // and further modified to allow for strings containing both week and day\n var isoRegex = /^(-|\\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;\n\n function createDuration (input, key) {\n var duration = input,\n // matching against regexp is expensive, do it on demand\n match = null,\n sign,\n ret,\n diffRes;\n\n if (isDuration(input)) {\n duration = {\n ms : input._milliseconds,\n d : input._days,\n M : input._months\n };\n } else if (isNumber(input)) {\n duration = {};\n if (key) {\n duration[key] = input;\n } else {\n duration.milliseconds = input;\n }\n } else if (!!(match = aspNetRegex.exec(input))) {\n sign = (match[1] === '-') ? -1 : 1;\n duration = {\n y : 0,\n d : toInt(match[DATE]) * sign,\n h : toInt(match[HOUR]) * sign,\n m : toInt(match[MINUTE]) * sign,\n s : toInt(match[SECOND]) * sign,\n ms : toInt(absRound(match[MILLISECOND] * 1000)) * sign // the millisecond decimal point is included in the match\n };\n } else if (!!(match = isoRegex.exec(input))) {\n sign = (match[1] === '-') ? -1 : 1;\n duration = {\n y : parseIso(match[2], sign),\n M : parseIso(match[3], sign),\n w : parseIso(match[4], sign),\n d : parseIso(match[5], sign),\n h : parseIso(match[6], sign),\n m : parseIso(match[7], sign),\n s : parseIso(match[8], sign)\n };\n } else if (duration == null) {// checks for null or undefined\n duration = {};\n } else if (typeof duration === 'object' && ('from' in duration || 'to' in duration)) {\n diffRes = momentsDifference(createLocal(duration.from), createLocal(duration.to));\n\n duration = {};\n duration.ms = diffRes.milliseconds;\n duration.M = diffRes.months;\n }\n\n ret = new Duration(duration);\n\n if (isDuration(input) && hasOwnProp(input, '_locale')) {\n ret._locale = input._locale;\n }\n\n return ret;\n }\n\n createDuration.fn = Duration.prototype;\n createDuration.invalid = createInvalid$1;\n\n function parseIso (inp, sign) {\n // We'd normally use ~~inp for this, but unfortunately it also\n // converts floats to ints.\n // inp may be undefined, so careful calling replace on it.\n var res = inp && parseFloat(inp.replace(',', '.'));\n // apply sign while we're at it\n return (isNaN(res) ? 0 : res) * sign;\n }\n\n function positiveMomentsDifference(base, other) {\n var res = {};\n\n res.months = other.month() - base.month() +\n (other.year() - base.year()) * 12;\n if (base.clone().add(res.months, 'M').isAfter(other)) {\n --res.months;\n }\n\n res.milliseconds = +other - +(base.clone().add(res.months, 'M'));\n\n return res;\n }\n\n function momentsDifference(base, other) {\n var res;\n if (!(base.isValid() && other.isValid())) {\n return {milliseconds: 0, months: 0};\n }\n\n other = cloneWithOffset(other, base);\n if (base.isBefore(other)) {\n res = positiveMomentsDifference(base, other);\n } else {\n res = positiveMomentsDifference(other, base);\n res.milliseconds = -res.milliseconds;\n res.months = -res.months;\n }\n\n return res;\n }\n\n // TODO: remove 'name' arg after deprecation is removed\n function createAdder(direction, name) {\n return function (val, period) {\n var dur, tmp;\n //invert the arguments, but complain about it\n if (period !== null && !isNaN(+period)) {\n deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' +\n 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.');\n tmp = val; val = period; period = tmp;\n }\n\n val = typeof val === 'string' ? +val : val;\n dur = createDuration(val, period);\n addSubtract(this, dur, direction);\n return this;\n };\n }\n\n function addSubtract (mom, duration, isAdding, updateOffset) {\n var milliseconds = duration._milliseconds,\n days = absRound(duration._days),\n months = absRound(duration._months);\n\n if (!mom.isValid()) {\n // No op\n return;\n }\n\n updateOffset = updateOffset == null ? true : updateOffset;\n\n if (months) {\n setMonth(mom, get(mom, 'Month') + months * isAdding);\n }\n if (days) {\n set$1(mom, 'Date', get(mom, 'Date') + days * isAdding);\n }\n if (milliseconds) {\n mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding);\n }\n if (updateOffset) {\n hooks.updateOffset(mom, days || months);\n }\n }\n\n var add = createAdder(1, 'add');\n var subtract = createAdder(-1, 'subtract');\n\n function getCalendarFormat(myMoment, now) {\n var diff = myMoment.diff(now, 'days', true);\n return diff < -6 ? 'sameElse' :\n diff < -1 ? 'lastWeek' :\n diff < 0 ? 'lastDay' :\n diff < 1 ? 'sameDay' :\n diff < 2 ? 'nextDay' :\n diff < 7 ? 'nextWeek' : 'sameElse';\n }\n\n function calendar$1 (time, formats) {\n // We want to compare the start of today, vs this.\n // Getting start-of-today depends on whether we're local/utc/offset or not.\n var now = time || createLocal(),\n sod = cloneWithOffset(now, this).startOf('day'),\n format = hooks.calendarFormat(this, sod) || 'sameElse';\n\n var output = formats && (isFunction(formats[format]) ? formats[format].call(this, now) : formats[format]);\n\n return this.format(output || this.localeData().calendar(format, this, createLocal(now)));\n }\n\n function clone () {\n return new Moment(this);\n }\n\n function isAfter (input, units) {\n var localInput = isMoment(input) ? input : createLocal(input);\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() > localInput.valueOf();\n } else {\n return localInput.valueOf() < this.clone().startOf(units).valueOf();\n }\n }\n\n function isBefore (input, units) {\n var localInput = isMoment(input) ? input : createLocal(input);\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() < localInput.valueOf();\n } else {\n return this.clone().endOf(units).valueOf() < localInput.valueOf();\n }\n }\n\n function isBetween (from, to, units, inclusivity) {\n var localFrom = isMoment(from) ? from : createLocal(from),\n localTo = isMoment(to) ? to : createLocal(to);\n if (!(this.isValid() && localFrom.isValid() && localTo.isValid())) {\n return false;\n }\n inclusivity = inclusivity || '()';\n return (inclusivity[0] === '(' ? this.isAfter(localFrom, units) : !this.isBefore(localFrom, units)) &&\n (inclusivity[1] === ')' ? this.isBefore(localTo, units) : !this.isAfter(localTo, units));\n }\n\n function isSame (input, units) {\n var localInput = isMoment(input) ? input : createLocal(input),\n inputMs;\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() === localInput.valueOf();\n } else {\n inputMs = localInput.valueOf();\n return this.clone().startOf(units).valueOf() <= inputMs && inputMs <= this.clone().endOf(units).valueOf();\n }\n }\n\n function isSameOrAfter (input, units) {\n return this.isSame(input, units) || this.isAfter(input, units);\n }\n\n function isSameOrBefore (input, units) {\n return this.isSame(input, units) || this.isBefore(input, units);\n }\n\n function diff (input, units, asFloat) {\n var that,\n zoneDelta,\n output;\n\n if (!this.isValid()) {\n return NaN;\n }\n\n that = cloneWithOffset(input, this);\n\n if (!that.isValid()) {\n return NaN;\n }\n\n zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4;\n\n units = normalizeUnits(units);\n\n switch (units) {\n case 'year': output = monthDiff(this, that) / 12; break;\n case 'month': output = monthDiff(this, that); break;\n case 'quarter': output = monthDiff(this, that) / 3; break;\n case 'second': output = (this - that) / 1e3; break; // 1000\n case 'minute': output = (this - that) / 6e4; break; // 1000 * 60\n case 'hour': output = (this - that) / 36e5; break; // 1000 * 60 * 60\n case 'day': output = (this - that - zoneDelta) / 864e5; break; // 1000 * 60 * 60 * 24, negate dst\n case 'week': output = (this - that - zoneDelta) / 6048e5; break; // 1000 * 60 * 60 * 24 * 7, negate dst\n default: output = this - that;\n }\n\n return asFloat ? output : absFloor(output);\n }\n\n function monthDiff (a, b) {\n // difference in months\n var wholeMonthDiff = ((b.year() - a.year()) * 12) + (b.month() - a.month()),\n // b is in (anchor - 1 month, anchor + 1 month)\n anchor = a.clone().add(wholeMonthDiff, 'months'),\n anchor2, adjust;\n\n if (b - anchor < 0) {\n anchor2 = a.clone().add(wholeMonthDiff - 1, 'months');\n // linear across the month\n adjust = (b - anchor) / (anchor - anchor2);\n } else {\n anchor2 = a.clone().add(wholeMonthDiff + 1, 'months');\n // linear across the month\n adjust = (b - anchor) / (anchor2 - anchor);\n }\n\n //check for negative zero, return zero if negative zero\n return -(wholeMonthDiff + adjust) || 0;\n }\n\n hooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ';\n hooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]';\n\n function toString () {\n return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ');\n }\n\n function toISOString(keepOffset) {\n if (!this.isValid()) {\n return null;\n }\n var utc = keepOffset !== true;\n var m = utc ? this.clone().utc() : this;\n if (m.year() < 0 || m.year() > 9999) {\n return formatMoment(m, utc ? 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYYYY-MM-DD[T]HH:mm:ss.SSSZ');\n }\n if (isFunction(Date.prototype.toISOString)) {\n // native implementation is ~50x faster, use it when we can\n if (utc) {\n return this.toDate().toISOString();\n } else {\n return new Date(this.valueOf() + this.utcOffset() * 60 * 1000).toISOString().replace('Z', formatMoment(m, 'Z'));\n }\n }\n return formatMoment(m, utc ? 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYY-MM-DD[T]HH:mm:ss.SSSZ');\n }\n\n /**\n * Return a human readable representation of a moment that can\n * also be evaluated to get a new moment which is the same\n *\n * @link https://nodejs.org/dist/latest/docs/api/util.html#util_custom_inspect_function_on_objects\n */\n function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n }\n\n function format (inputString) {\n if (!inputString) {\n inputString = this.isUtc() ? hooks.defaultFormatUtc : hooks.defaultFormat;\n }\n var output = formatMoment(this, inputString);\n return this.localeData().postformat(output);\n }\n\n function from (time, withoutSuffix) {\n if (this.isValid() &&\n ((isMoment(time) && time.isValid()) ||\n createLocal(time).isValid())) {\n return createDuration({to: this, from: time}).locale(this.locale()).humanize(!withoutSuffix);\n } else {\n return this.localeData().invalidDate();\n }\n }\n\n function fromNow (withoutSuffix) {\n return this.from(createLocal(), withoutSuffix);\n }\n\n function to (time, withoutSuffix) {\n if (this.isValid() &&\n ((isMoment(time) && time.isValid()) ||\n createLocal(time).isValid())) {\n return createDuration({from: this, to: time}).locale(this.locale()).humanize(!withoutSuffix);\n } else {\n return this.localeData().invalidDate();\n }\n }\n\n function toNow (withoutSuffix) {\n return this.to(createLocal(), withoutSuffix);\n }\n\n // If passed a locale key, it will set the locale for this\n // instance. Otherwise, it will return the locale configuration\n // variables for this instance.\n function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n }\n\n var lang = deprecate(\n 'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.',\n function (key) {\n if (key === undefined) {\n return this.localeData();\n } else {\n return this.locale(key);\n }\n }\n );\n\n function localeData () {\n return this._locale;\n }\n\n var MS_PER_SECOND = 1000;\n var MS_PER_MINUTE = 60 * MS_PER_SECOND;\n var MS_PER_HOUR = 60 * MS_PER_MINUTE;\n var MS_PER_400_YEARS = (365 * 400 + 97) * 24 * MS_PER_HOUR;\n\n // actual modulo - handles negative numbers (for dates before 1970):\n function mod$1(dividend, divisor) {\n return (dividend % divisor + divisor) % divisor;\n }\n\n function localStartOfDate(y, m, d) {\n // the date constructor remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n return new Date(y + 400, m, d) - MS_PER_400_YEARS;\n } else {\n return new Date(y, m, d).valueOf();\n }\n }\n\n function utcStartOfDate(y, m, d) {\n // Date.UTC remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n return Date.UTC(y + 400, m, d) - MS_PER_400_YEARS;\n } else {\n return Date.UTC(y, m, d);\n }\n }\n\n function startOf (units) {\n var time;\n units = normalizeUnits(units);\n if (units === undefined || units === 'millisecond' || !this.isValid()) {\n return this;\n }\n\n var startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;\n\n switch (units) {\n case 'year':\n time = startOfDate(this.year(), 0, 1);\n break;\n case 'quarter':\n time = startOfDate(this.year(), this.month() - this.month() % 3, 1);\n break;\n case 'month':\n time = startOfDate(this.year(), this.month(), 1);\n break;\n case 'week':\n time = startOfDate(this.year(), this.month(), this.date() - this.weekday());\n break;\n case 'isoWeek':\n time = startOfDate(this.year(), this.month(), this.date() - (this.isoWeekday() - 1));\n break;\n case 'day':\n case 'date':\n time = startOfDate(this.year(), this.month(), this.date());\n break;\n case 'hour':\n time = this._d.valueOf();\n time -= mod$1(time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE), MS_PER_HOUR);\n break;\n case 'minute':\n time = this._d.valueOf();\n time -= mod$1(time, MS_PER_MINUTE);\n break;\n case 'second':\n time = this._d.valueOf();\n time -= mod$1(time, MS_PER_SECOND);\n break;\n }\n\n this._d.setTime(time);\n hooks.updateOffset(this, true);\n return this;\n }\n\n function endOf (units) {\n var time;\n units = normalizeUnits(units);\n if (units === undefined || units === 'millisecond' || !this.isValid()) {\n return this;\n }\n\n var startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;\n\n switch (units) {\n case 'year':\n time = startOfDate(this.year() + 1, 0, 1) - 1;\n break;\n case 'quarter':\n time = startOfDate(this.year(), this.month() - this.month() % 3 + 3, 1) - 1;\n break;\n case 'month':\n time = startOfDate(this.year(), this.month() + 1, 1) - 1;\n break;\n case 'week':\n time = startOfDate(this.year(), this.month(), this.date() - this.weekday() + 7) - 1;\n break;\n case 'isoWeek':\n time = startOfDate(this.year(), this.month(), this.date() - (this.isoWeekday() - 1) + 7) - 1;\n break;\n case 'day':\n case 'date':\n time = startOfDate(this.year(), this.month(), this.date() + 1) - 1;\n break;\n case 'hour':\n time = this._d.valueOf();\n time += MS_PER_HOUR - mod$1(time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE), MS_PER_HOUR) - 1;\n break;\n case 'minute':\n time = this._d.valueOf();\n time += MS_PER_MINUTE - mod$1(time, MS_PER_MINUTE) - 1;\n break;\n case 'second':\n time = this._d.valueOf();\n time += MS_PER_SECOND - mod$1(time, MS_PER_SECOND) - 1;\n break;\n }\n\n this._d.setTime(time);\n hooks.updateOffset(this, true);\n return this;\n }\n\n function valueOf () {\n return this._d.valueOf() - ((this._offset || 0) * 60000);\n }\n\n function unix () {\n return Math.floor(this.valueOf() / 1000);\n }\n\n function toDate () {\n return new Date(this.valueOf());\n }\n\n function toArray () {\n var m = this;\n return [m.year(), m.month(), m.date(), m.hour(), m.minute(), m.second(), m.millisecond()];\n }\n\n function toObject () {\n var m = this;\n return {\n years: m.year(),\n months: m.month(),\n date: m.date(),\n hours: m.hours(),\n minutes: m.minutes(),\n seconds: m.seconds(),\n milliseconds: m.milliseconds()\n };\n }\n\n function toJSON () {\n // new Date(NaN).toJSON() === null\n return this.isValid() ? this.toISOString() : null;\n }\n\n function isValid$2 () {\n return isValid(this);\n }\n\n function parsingFlags () {\n return extend({}, getParsingFlags(this));\n }\n\n function invalidAt () {\n return getParsingFlags(this).overflow;\n }\n\n function creationData() {\n return {\n input: this._i,\n format: this._f,\n locale: this._locale,\n isUTC: this._isUTC,\n strict: this._strict\n };\n }\n\n // FORMATTING\n\n addFormatToken(0, ['gg', 2], 0, function () {\n return this.weekYear() % 100;\n });\n\n addFormatToken(0, ['GG', 2], 0, function () {\n return this.isoWeekYear() % 100;\n });\n\n function addWeekYearFormatToken (token, getter) {\n addFormatToken(0, [token, token.length], 0, getter);\n }\n\n addWeekYearFormatToken('gggg', 'weekYear');\n addWeekYearFormatToken('ggggg', 'weekYear');\n addWeekYearFormatToken('GGGG', 'isoWeekYear');\n addWeekYearFormatToken('GGGGG', 'isoWeekYear');\n\n // ALIASES\n\n addUnitAlias('weekYear', 'gg');\n addUnitAlias('isoWeekYear', 'GG');\n\n // PRIORITY\n\n addUnitPriority('weekYear', 1);\n addUnitPriority('isoWeekYear', 1);\n\n\n // PARSING\n\n addRegexToken('G', matchSigned);\n addRegexToken('g', matchSigned);\n addRegexToken('GG', match1to2, match2);\n addRegexToken('gg', match1to2, match2);\n addRegexToken('GGGG', match1to4, match4);\n addRegexToken('gggg', match1to4, match4);\n addRegexToken('GGGGG', match1to6, match6);\n addRegexToken('ggggg', match1to6, match6);\n\n addWeekParseToken(['gggg', 'ggggg', 'GGGG', 'GGGGG'], function (input, week, config, token) {\n week[token.substr(0, 2)] = toInt(input);\n });\n\n addWeekParseToken(['gg', 'GG'], function (input, week, config, token) {\n week[token] = hooks.parseTwoDigitYear(input);\n });\n\n // MOMENTS\n\n function getSetWeekYear (input) {\n return getSetWeekYearHelper.call(this,\n input,\n this.week(),\n this.weekday(),\n this.localeData()._week.dow,\n this.localeData()._week.doy);\n }\n\n function getSetISOWeekYear (input) {\n return getSetWeekYearHelper.call(this,\n input, this.isoWeek(), this.isoWeekday(), 1, 4);\n }\n\n function getISOWeeksInYear () {\n return weeksInYear(this.year(), 1, 4);\n }\n\n function getWeeksInYear () {\n var weekInfo = this.localeData()._week;\n return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy);\n }\n\n function getSetWeekYearHelper(input, week, weekday, dow, doy) {\n var weeksTarget;\n if (input == null) {\n return weekOfYear(this, dow, doy).year;\n } else {\n weeksTarget = weeksInYear(input, dow, doy);\n if (week > weeksTarget) {\n week = weeksTarget;\n }\n return setWeekAll.call(this, input, week, weekday, dow, doy);\n }\n }\n\n function setWeekAll(weekYear, week, weekday, dow, doy) {\n var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy),\n date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear);\n\n this.year(date.getUTCFullYear());\n this.month(date.getUTCMonth());\n this.date(date.getUTCDate());\n return this;\n }\n\n // FORMATTING\n\n addFormatToken('Q', 0, 'Qo', 'quarter');\n\n // ALIASES\n\n addUnitAlias('quarter', 'Q');\n\n // PRIORITY\n\n addUnitPriority('quarter', 7);\n\n // PARSING\n\n addRegexToken('Q', match1);\n addParseToken('Q', function (input, array) {\n array[MONTH] = (toInt(input) - 1) * 3;\n });\n\n // MOMENTS\n\n function getSetQuarter (input) {\n return input == null ? Math.ceil((this.month() + 1) / 3) : this.month((input - 1) * 3 + this.month() % 3);\n }\n\n // FORMATTING\n\n addFormatToken('D', ['DD', 2], 'Do', 'date');\n\n // ALIASES\n\n addUnitAlias('date', 'D');\n\n // PRIORITY\n addUnitPriority('date', 9);\n\n // PARSING\n\n addRegexToken('D', match1to2);\n addRegexToken('DD', match1to2, match2);\n addRegexToken('Do', function (isStrict, locale) {\n // TODO: Remove \"ordinalParse\" fallback in next major release.\n return isStrict ?\n (locale._dayOfMonthOrdinalParse || locale._ordinalParse) :\n locale._dayOfMonthOrdinalParseLenient;\n });\n\n addParseToken(['D', 'DD'], DATE);\n addParseToken('Do', function (input, array) {\n array[DATE] = toInt(input.match(match1to2)[0]);\n });\n\n // MOMENTS\n\n var getSetDayOfMonth = makeGetSet('Date', true);\n\n // FORMATTING\n\n addFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear');\n\n // ALIASES\n\n addUnitAlias('dayOfYear', 'DDD');\n\n // PRIORITY\n addUnitPriority('dayOfYear', 4);\n\n // PARSING\n\n addRegexToken('DDD', match1to3);\n addRegexToken('DDDD', match3);\n addParseToken(['DDD', 'DDDD'], function (input, array, config) {\n config._dayOfYear = toInt(input);\n });\n\n // HELPERS\n\n // MOMENTS\n\n function getSetDayOfYear (input) {\n var dayOfYear = Math.round((this.clone().startOf('day') - this.clone().startOf('year')) / 864e5) + 1;\n return input == null ? dayOfYear : this.add((input - dayOfYear), 'd');\n }\n\n // FORMATTING\n\n addFormatToken('m', ['mm', 2], 0, 'minute');\n\n // ALIASES\n\n addUnitAlias('minute', 'm');\n\n // PRIORITY\n\n addUnitPriority('minute', 14);\n\n // PARSING\n\n addRegexToken('m', match1to2);\n addRegexToken('mm', match1to2, match2);\n addParseToken(['m', 'mm'], MINUTE);\n\n // MOMENTS\n\n var getSetMinute = makeGetSet('Minutes', false);\n\n // FORMATTING\n\n addFormatToken('s', ['ss', 2], 0, 'second');\n\n // ALIASES\n\n addUnitAlias('second', 's');\n\n // PRIORITY\n\n addUnitPriority('second', 15);\n\n // PARSING\n\n addRegexToken('s', match1to2);\n addRegexToken('ss', match1to2, match2);\n addParseToken(['s', 'ss'], SECOND);\n\n // MOMENTS\n\n var getSetSecond = makeGetSet('Seconds', false);\n\n // FORMATTING\n\n addFormatToken('S', 0, 0, function () {\n return ~~(this.millisecond() / 100);\n });\n\n addFormatToken(0, ['SS', 2], 0, function () {\n return ~~(this.millisecond() / 10);\n });\n\n addFormatToken(0, ['SSS', 3], 0, 'millisecond');\n addFormatToken(0, ['SSSS', 4], 0, function () {\n return this.millisecond() * 10;\n });\n addFormatToken(0, ['SSSSS', 5], 0, function () {\n return this.millisecond() * 100;\n });\n addFormatToken(0, ['SSSSSS', 6], 0, function () {\n return this.millisecond() * 1000;\n });\n addFormatToken(0, ['SSSSSSS', 7], 0, function () {\n return this.millisecond() * 10000;\n });\n addFormatToken(0, ['SSSSSSSS', 8], 0, function () {\n return this.millisecond() * 100000;\n });\n addFormatToken(0, ['SSSSSSSSS', 9], 0, function () {\n return this.millisecond() * 1000000;\n });\n\n\n // ALIASES\n\n addUnitAlias('millisecond', 'ms');\n\n // PRIORITY\n\n addUnitPriority('millisecond', 16);\n\n // PARSING\n\n addRegexToken('S', match1to3, match1);\n addRegexToken('SS', match1to3, match2);\n addRegexToken('SSS', match1to3, match3);\n\n var token;\n for (token = 'SSSS'; token.length <= 9; token += 'S') {\n addRegexToken(token, matchUnsigned);\n }\n\n function parseMs(input, array) {\n array[MILLISECOND] = toInt(('0.' + input) * 1000);\n }\n\n for (token = 'S'; token.length <= 9; token += 'S') {\n addParseToken(token, parseMs);\n }\n // MOMENTS\n\n var getSetMillisecond = makeGetSet('Milliseconds', false);\n\n // FORMATTING\n\n addFormatToken('z', 0, 0, 'zoneAbbr');\n addFormatToken('zz', 0, 0, 'zoneName');\n\n // MOMENTS\n\n function getZoneAbbr () {\n return this._isUTC ? 'UTC' : '';\n }\n\n function getZoneName () {\n return this._isUTC ? 'Coordinated Universal Time' : '';\n }\n\n var proto = Moment.prototype;\n\n proto.add = add;\n proto.calendar = calendar$1;\n proto.clone = clone;\n proto.diff = diff;\n proto.endOf = endOf;\n proto.format = format;\n proto.from = from;\n proto.fromNow = fromNow;\n proto.to = to;\n proto.toNow = toNow;\n proto.get = stringGet;\n proto.invalidAt = invalidAt;\n proto.isAfter = isAfter;\n proto.isBefore = isBefore;\n proto.isBetween = isBetween;\n proto.isSame = isSame;\n proto.isSameOrAfter = isSameOrAfter;\n proto.isSameOrBefore = isSameOrBefore;\n proto.isValid = isValid$2;\n proto.lang = lang;\n proto.locale = locale;\n proto.localeData = localeData;\n proto.max = prototypeMax;\n proto.min = prototypeMin;\n proto.parsingFlags = parsingFlags;\n proto.set = stringSet;\n proto.startOf = startOf;\n proto.subtract = subtract;\n proto.toArray = toArray;\n proto.toObject = toObject;\n proto.toDate = toDate;\n proto.toISOString = toISOString;\n proto.inspect = inspect;\n proto.toJSON = toJSON;\n proto.toString = toString;\n proto.unix = unix;\n proto.valueOf = valueOf;\n proto.creationData = creationData;\n proto.year = getSetYear;\n proto.isLeapYear = getIsLeapYear;\n proto.weekYear = getSetWeekYear;\n proto.isoWeekYear = getSetISOWeekYear;\n proto.quarter = proto.quarters = getSetQuarter;\n proto.month = getSetMonth;\n proto.daysInMonth = getDaysInMonth;\n proto.week = proto.weeks = getSetWeek;\n proto.isoWeek = proto.isoWeeks = getSetISOWeek;\n proto.weeksInYear = getWeeksInYear;\n proto.isoWeeksInYear = getISOWeeksInYear;\n proto.date = getSetDayOfMonth;\n proto.day = proto.days = getSetDayOfWeek;\n proto.weekday = getSetLocaleDayOfWeek;\n proto.isoWeekday = getSetISODayOfWeek;\n proto.dayOfYear = getSetDayOfYear;\n proto.hour = proto.hours = getSetHour;\n proto.minute = proto.minutes = getSetMinute;\n proto.second = proto.seconds = getSetSecond;\n proto.millisecond = proto.milliseconds = getSetMillisecond;\n proto.utcOffset = getSetOffset;\n proto.utc = setOffsetToUTC;\n proto.local = setOffsetToLocal;\n proto.parseZone = setOffsetToParsedOffset;\n proto.hasAlignedHourOffset = hasAlignedHourOffset;\n proto.isDST = isDaylightSavingTime;\n proto.isLocal = isLocal;\n proto.isUtcOffset = isUtcOffset;\n proto.isUtc = isUtc;\n proto.isUTC = isUtc;\n proto.zoneAbbr = getZoneAbbr;\n proto.zoneName = getZoneName;\n proto.dates = deprecate('dates accessor is deprecated. Use date instead.', getSetDayOfMonth);\n proto.months = deprecate('months accessor is deprecated. Use month instead', getSetMonth);\n proto.years = deprecate('years accessor is deprecated. Use year instead', getSetYear);\n proto.zone = deprecate('moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/', getSetZone);\n proto.isDSTShifted = deprecate('isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information', isDaylightSavingTimeShifted);\n\n function createUnix (input) {\n return createLocal(input * 1000);\n }\n\n function createInZone () {\n return createLocal.apply(null, arguments).parseZone();\n }\n\n function preParsePostFormat (string) {\n return string;\n }\n\n var proto$1 = Locale.prototype;\n\n proto$1.calendar = calendar;\n proto$1.longDateFormat = longDateFormat;\n proto$1.invalidDate = invalidDate;\n proto$1.ordinal = ordinal;\n proto$1.preparse = preParsePostFormat;\n proto$1.postformat = preParsePostFormat;\n proto$1.relativeTime = relativeTime;\n proto$1.pastFuture = pastFuture;\n proto$1.set = set;\n\n proto$1.months = localeMonths;\n proto$1.monthsShort = localeMonthsShort;\n proto$1.monthsParse = localeMonthsParse;\n proto$1.monthsRegex = monthsRegex;\n proto$1.monthsShortRegex = monthsShortRegex;\n proto$1.week = localeWeek;\n proto$1.firstDayOfYear = localeFirstDayOfYear;\n proto$1.firstDayOfWeek = localeFirstDayOfWeek;\n\n proto$1.weekdays = localeWeekdays;\n proto$1.weekdaysMin = localeWeekdaysMin;\n proto$1.weekdaysShort = localeWeekdaysShort;\n proto$1.weekdaysParse = localeWeekdaysParse;\n\n proto$1.weekdaysRegex = weekdaysRegex;\n proto$1.weekdaysShortRegex = weekdaysShortRegex;\n proto$1.weekdaysMinRegex = weekdaysMinRegex;\n\n proto$1.isPM = localeIsPM;\n proto$1.meridiem = localeMeridiem;\n\n function get$1 (format, index, field, setter) {\n var locale = getLocale();\n var utc = createUTC().set(setter, index);\n return locale[field](utc, format);\n }\n\n function listMonthsImpl (format, index, field) {\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n\n if (index != null) {\n return get$1(format, index, field, 'month');\n }\n\n var i;\n var out = [];\n for (i = 0; i < 12; i++) {\n out[i] = get$1(format, i, field, 'month');\n }\n return out;\n }\n\n // ()\n // (5)\n // (fmt, 5)\n // (fmt)\n // (true)\n // (true, 5)\n // (true, fmt, 5)\n // (true, fmt)\n function listWeekdaysImpl (localeSorted, format, index, field) {\n if (typeof localeSorted === 'boolean') {\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n } else {\n format = localeSorted;\n index = format;\n localeSorted = false;\n\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n }\n\n var locale = getLocale(),\n shift = localeSorted ? locale._week.dow : 0;\n\n if (index != null) {\n return get$1(format, (index + shift) % 7, field, 'day');\n }\n\n var i;\n var out = [];\n for (i = 0; i < 7; i++) {\n out[i] = get$1(format, (i + shift) % 7, field, 'day');\n }\n return out;\n }\n\n function listMonths (format, index) {\n return listMonthsImpl(format, index, 'months');\n }\n\n function listMonthsShort (format, index) {\n return listMonthsImpl(format, index, 'monthsShort');\n }\n\n function listWeekdays (localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdays');\n }\n\n function listWeekdaysShort (localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort');\n }\n\n function listWeekdaysMin (localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin');\n }\n\n getSetGlobalLocale('en', {\n dayOfMonthOrdinalParse: /\\d{1,2}(th|st|nd|rd)/,\n ordinal : function (number) {\n var b = number % 10,\n output = (toInt(number % 100 / 10) === 1) ? 'th' :\n (b === 1) ? 'st' :\n (b === 2) ? 'nd' :\n (b === 3) ? 'rd' : 'th';\n return number + output;\n }\n });\n\n // Side effect imports\n\n hooks.lang = deprecate('moment.lang is deprecated. Use moment.locale instead.', getSetGlobalLocale);\n hooks.langData = deprecate('moment.langData is deprecated. Use moment.localeData instead.', getLocale);\n\n var mathAbs = Math.abs;\n\n function abs () {\n var data = this._data;\n\n this._milliseconds = mathAbs(this._milliseconds);\n this._days = mathAbs(this._days);\n this._months = mathAbs(this._months);\n\n data.milliseconds = mathAbs(data.milliseconds);\n data.seconds = mathAbs(data.seconds);\n data.minutes = mathAbs(data.minutes);\n data.hours = mathAbs(data.hours);\n data.months = mathAbs(data.months);\n data.years = mathAbs(data.years);\n\n return this;\n }\n\n function addSubtract$1 (duration, input, value, direction) {\n var other = createDuration(input, value);\n\n duration._milliseconds += direction * other._milliseconds;\n duration._days += direction * other._days;\n duration._months += direction * other._months;\n\n return duration._bubble();\n }\n\n // supports only 2.0-style add(1, 's') or add(duration)\n function add$1 (input, value) {\n return addSubtract$1(this, input, value, 1);\n }\n\n // supports only 2.0-style subtract(1, 's') or subtract(duration)\n function subtract$1 (input, value) {\n return addSubtract$1(this, input, value, -1);\n }\n\n function absCeil (number) {\n if (number < 0) {\n return Math.floor(number);\n } else {\n return Math.ceil(number);\n }\n }\n\n function bubble () {\n var milliseconds = this._milliseconds;\n var days = this._days;\n var months = this._months;\n var data = this._data;\n var seconds, minutes, hours, years, monthsFromDays;\n\n // if we have a mix of positive and negative values, bubble down first\n // check: https://github.com/moment/moment/issues/2166\n if (!((milliseconds >= 0 && days >= 0 && months >= 0) ||\n (milliseconds <= 0 && days <= 0 && months <= 0))) {\n milliseconds += absCeil(monthsToDays(months) + days) * 864e5;\n days = 0;\n months = 0;\n }\n\n // The following code bubbles up values, see the tests for\n // examples of what that means.\n data.milliseconds = milliseconds % 1000;\n\n seconds = absFloor(milliseconds / 1000);\n data.seconds = seconds % 60;\n\n minutes = absFloor(seconds / 60);\n data.minutes = minutes % 60;\n\n hours = absFloor(minutes / 60);\n data.hours = hours % 24;\n\n days += absFloor(hours / 24);\n\n // convert days to months\n monthsFromDays = absFloor(daysToMonths(days));\n months += monthsFromDays;\n days -= absCeil(monthsToDays(monthsFromDays));\n\n // 12 months -> 1 year\n years = absFloor(months / 12);\n months %= 12;\n\n data.days = days;\n data.months = months;\n data.years = years;\n\n return this;\n }\n\n function daysToMonths (days) {\n // 400 years have 146097 days (taking into account leap year rules)\n // 400 years have 12 months === 4800\n return days * 4800 / 146097;\n }\n\n function monthsToDays (months) {\n // the reverse of daysToMonths\n return months * 146097 / 4800;\n }\n\n function as (units) {\n if (!this.isValid()) {\n return NaN;\n }\n var days;\n var months;\n var milliseconds = this._milliseconds;\n\n units = normalizeUnits(units);\n\n if (units === 'month' || units === 'quarter' || units === 'year') {\n days = this._days + milliseconds / 864e5;\n months = this._months + daysToMonths(days);\n switch (units) {\n case 'month': return months;\n case 'quarter': return months / 3;\n case 'year': return months / 12;\n }\n } else {\n // handle milliseconds separately because of floating point math errors (issue #1867)\n days = this._days + Math.round(monthsToDays(this._months));\n switch (units) {\n case 'week' : return days / 7 + milliseconds / 6048e5;\n case 'day' : return days + milliseconds / 864e5;\n case 'hour' : return days * 24 + milliseconds / 36e5;\n case 'minute' : return days * 1440 + milliseconds / 6e4;\n case 'second' : return days * 86400 + milliseconds / 1000;\n // Math.floor prevents floating point math errors here\n case 'millisecond': return Math.floor(days * 864e5) + milliseconds;\n default: throw new Error('Unknown unit ' + units);\n }\n }\n }\n\n // TODO: Use this.as('ms')?\n function valueOf$1 () {\n if (!this.isValid()) {\n return NaN;\n }\n return (\n this._milliseconds +\n this._days * 864e5 +\n (this._months % 12) * 2592e6 +\n toInt(this._months / 12) * 31536e6\n );\n }\n\n function makeAs (alias) {\n return function () {\n return this.as(alias);\n };\n }\n\n var asMilliseconds = makeAs('ms');\n var asSeconds = makeAs('s');\n var asMinutes = makeAs('m');\n var asHours = makeAs('h');\n var asDays = makeAs('d');\n var asWeeks = makeAs('w');\n var asMonths = makeAs('M');\n var asQuarters = makeAs('Q');\n var asYears = makeAs('y');\n\n function clone$1 () {\n return createDuration(this);\n }\n\n function get$2 (units) {\n units = normalizeUnits(units);\n return this.isValid() ? this[units + 's']() : NaN;\n }\n\n function makeGetter(name) {\n return function () {\n return this.isValid() ? this._data[name] : NaN;\n };\n }\n\n var milliseconds = makeGetter('milliseconds');\n var seconds = makeGetter('seconds');\n var minutes = makeGetter('minutes');\n var hours = makeGetter('hours');\n var days = makeGetter('days');\n var months = makeGetter('months');\n var years = makeGetter('years');\n\n function weeks () {\n return absFloor(this.days() / 7);\n }\n\n var round = Math.round;\n var thresholds = {\n ss: 44, // a few seconds to seconds\n s : 45, // seconds to minute\n m : 45, // minutes to hour\n h : 22, // hours to day\n d : 26, // days to month\n M : 11 // months to year\n };\n\n // helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize\n function substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) {\n return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture);\n }\n\n function relativeTime$1 (posNegDuration, withoutSuffix, locale) {\n var duration = createDuration(posNegDuration).abs();\n var seconds = round(duration.as('s'));\n var minutes = round(duration.as('m'));\n var hours = round(duration.as('h'));\n var days = round(duration.as('d'));\n var months = round(duration.as('M'));\n var years = round(duration.as('y'));\n\n var a = seconds <= thresholds.ss && ['s', seconds] ||\n seconds < thresholds.s && ['ss', seconds] ||\n minutes <= 1 && ['m'] ||\n minutes < thresholds.m && ['mm', minutes] ||\n hours <= 1 && ['h'] ||\n hours < thresholds.h && ['hh', hours] ||\n days <= 1 && ['d'] ||\n days < thresholds.d && ['dd', days] ||\n months <= 1 && ['M'] ||\n months < thresholds.M && ['MM', months] ||\n years <= 1 && ['y'] || ['yy', years];\n\n a[2] = withoutSuffix;\n a[3] = +posNegDuration > 0;\n a[4] = locale;\n return substituteTimeAgo.apply(null, a);\n }\n\n // This function allows you to set the rounding function for relative time strings\n function getSetRelativeTimeRounding (roundingFunction) {\n if (roundingFunction === undefined) {\n return round;\n }\n if (typeof(roundingFunction) === 'function') {\n round = roundingFunction;\n return true;\n }\n return false;\n }\n\n // This function allows you to set a threshold for relative time strings\n function getSetRelativeTimeThreshold (threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n return true;\n }\n\n function humanize (withSuffix) {\n if (!this.isValid()) {\n return this.localeData().invalidDate();\n }\n\n var locale = this.localeData();\n var output = relativeTime$1(this, !withSuffix, locale);\n\n if (withSuffix) {\n output = locale.pastFuture(+this, output);\n }\n\n return locale.postformat(output);\n }\n\n var abs$1 = Math.abs;\n\n function sign(x) {\n return ((x > 0) - (x < 0)) || +x;\n }\n\n function toISOString$1() {\n // for ISO strings we do not use the normal bubbling rules:\n // * milliseconds bubble up until they become hours\n // * days do not bubble at all\n // * months bubble up until they become years\n // This is because there is no context-free conversion between hours and days\n // (think of clock changes)\n // and also not between days and months (28-31 days per month)\n if (!this.isValid()) {\n return this.localeData().invalidDate();\n }\n\n var seconds = abs$1(this._milliseconds) / 1000;\n var days = abs$1(this._days);\n var months = abs$1(this._months);\n var minutes, hours, years;\n\n // 3600 seconds -> 60 minutes -> 1 hour\n minutes = absFloor(seconds / 60);\n hours = absFloor(minutes / 60);\n seconds %= 60;\n minutes %= 60;\n\n // 12 months -> 1 year\n years = absFloor(months / 12);\n months %= 12;\n\n\n // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js\n var Y = years;\n var M = months;\n var D = days;\n var h = hours;\n var m = minutes;\n var s = seconds ? seconds.toFixed(3).replace(/\\.?0+$/, '') : '';\n var total = this.asSeconds();\n\n if (!total) {\n // this is the same as C#'s (Noda) and python (isodate)...\n // but not other JS (goog.date)\n return 'P0D';\n }\n\n var totalSign = total < 0 ? '-' : '';\n var ymSign = sign(this._months) !== sign(total) ? '-' : '';\n var daysSign = sign(this._days) !== sign(total) ? '-' : '';\n var hmsSign = sign(this._milliseconds) !== sign(total) ? '-' : '';\n\n return totalSign + 'P' +\n (Y ? ymSign + Y + 'Y' : '') +\n (M ? ymSign + M + 'M' : '') +\n (D ? daysSign + D + 'D' : '') +\n ((h || m || s) ? 'T' : '') +\n (h ? hmsSign + h + 'H' : '') +\n (m ? hmsSign + m + 'M' : '') +\n (s ? hmsSign + s + 'S' : '');\n }\n\n var proto$2 = Duration.prototype;\n\n proto$2.isValid = isValid$1;\n proto$2.abs = abs;\n proto$2.add = add$1;\n proto$2.subtract = subtract$1;\n proto$2.as = as;\n proto$2.asMilliseconds = asMilliseconds;\n proto$2.asSeconds = asSeconds;\n proto$2.asMinutes = asMinutes;\n proto$2.asHours = asHours;\n proto$2.asDays = asDays;\n proto$2.asWeeks = asWeeks;\n proto$2.asMonths = asMonths;\n proto$2.asQuarters = asQuarters;\n proto$2.asYears = asYears;\n proto$2.valueOf = valueOf$1;\n proto$2._bubble = bubble;\n proto$2.clone = clone$1;\n proto$2.get = get$2;\n proto$2.milliseconds = milliseconds;\n proto$2.seconds = seconds;\n proto$2.minutes = minutes;\n proto$2.hours = hours;\n proto$2.days = days;\n proto$2.weeks = weeks;\n proto$2.months = months;\n proto$2.years = years;\n proto$2.humanize = humanize;\n proto$2.toISOString = toISOString$1;\n proto$2.toString = toISOString$1;\n proto$2.toJSON = toISOString$1;\n proto$2.locale = locale;\n proto$2.localeData = localeData;\n\n proto$2.toIsoString = deprecate('toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)', toISOString$1);\n proto$2.lang = lang;\n\n // Side effect imports\n\n // FORMATTING\n\n addFormatToken('X', 0, 0, 'unix');\n addFormatToken('x', 0, 0, 'valueOf');\n\n // PARSING\n\n addRegexToken('x', matchSigned);\n addRegexToken('X', matchTimestamp);\n addParseToken('X', function (input, array, config) {\n config._d = new Date(parseFloat(input, 10) * 1000);\n });\n addParseToken('x', function (input, array, config) {\n config._d = new Date(toInt(input));\n });\n\n // Side effect imports\n\n\n hooks.version = '2.24.0';\n\n setHookCallback(createLocal);\n\n hooks.fn = proto;\n hooks.min = min;\n hooks.max = max;\n hooks.now = now;\n hooks.utc = createUTC;\n hooks.unix = createUnix;\n hooks.months = listMonths;\n hooks.isDate = isDate;\n hooks.locale = getSetGlobalLocale;\n hooks.invalid = createInvalid;\n hooks.duration = createDuration;\n hooks.isMoment = isMoment;\n hooks.weekdays = listWeekdays;\n hooks.parseZone = createInZone;\n hooks.localeData = getLocale;\n hooks.isDuration = isDuration;\n hooks.monthsShort = listMonthsShort;\n hooks.weekdaysMin = listWeekdaysMin;\n hooks.defineLocale = defineLocale;\n hooks.updateLocale = updateLocale;\n hooks.locales = listLocales;\n hooks.weekdaysShort = listWeekdaysShort;\n hooks.normalizeUnits = normalizeUnits;\n hooks.relativeTimeRounding = getSetRelativeTimeRounding;\n hooks.relativeTimeThreshold = getSetRelativeTimeThreshold;\n hooks.calendarFormat = getCalendarFormat;\n hooks.prototype = proto;\n\n // currently HTML5 input type only supports 24-hour formats\n hooks.HTML5_FMT = {\n DATETIME_LOCAL: 'YYYY-MM-DDTHH:mm', // \n DATETIME_LOCAL_SECONDS: 'YYYY-MM-DDTHH:mm:ss', // \n DATETIME_LOCAL_MS: 'YYYY-MM-DDTHH:mm:ss.SSS', // \n DATE: 'YYYY-MM-DD', // \n TIME: 'HH:mm', // \n TIME_SECONDS: 'HH:mm:ss', // \n TIME_MS: 'HH:mm:ss.SSS', // \n WEEK: 'GGGG-[W]WW', // \n MONTH: 'YYYY-MM' // \n };\n\n return hooks;\n\n})));\n","// first check if moment.js is already loaded in the browser window, if so,\n// use this instance. Else, load via commonjs.\nmodule.exports = (typeof window !== 'undefined') && window['moment'] || require('moment');\n","// vis-util\nimport * as util from 'vis-util'\nexport { util }\n\n// vis-data\nimport * as data from 'vis-data'\nexport { data }\nexport { DataSet, DataView, Queue } from 'vis-data'\n\n// Network.\nexport * from './network/Network'\n\nimport Images from './network/Images'\nimport * as dotparser from './network/dotparser'\nimport * as gephiParser from './network/gephiParser'\nimport { parseGephi } from './network/gephiParser'\nimport * as allOptions from './network/options'\nexport const network = {\n Images,\n dotparser,\n gephiParser,\n allOptions,\n convertDot: dotparser.DOTToGraph,\n convertGephi: parseGephi,\n}\n\n// utils\nimport * as DOMutil from './DOMutil'\nexport { DOMutil }\n\n// bundled external libraries\nimport * as moment from './module/moment'\nexport { moment }\nimport * as Hammer from './module/hammer'\nexport { Hammer }\nimport * as keycharm from 'keycharm'\nexport { keycharm }\n"],"names":["Math","cos","sin","round","pow","String","prototype","ceil","floor","max","min","commonjsRequire","Error","createCommonjsModule","fn","module","exports","_typeof","obj","Symbol","iterator","constructor","_defineProperty","key","value","Object","defineProperty","enumerable","configurable","writable","ownKeys","object","enumerableOnly","keys","getOwnPropertySymbols","push","apply","filter","sym","getOwnPropertyDescriptor","_objectSpread2","target","i","source","arguments","length","forEach","getOwnPropertyDescriptors","defineProperties","_toConsumableArray","arr","_arrayWithoutHoles","_iterableToArray","_nonIterableSpread","Array","isArray","arr2","iter","toString","call","from","TypeError","stringifyUUID","buf","offset","bth","byteToHex","uuid4","options","rnds","random","rng","ii","isNumber","Number","recursiveDOMDelete","DOMobject","hasChildNodes","child","firstChild","removeChild","isString","isObject","isDate","Date","match","ASPDateRegex","exec","isNaN","parse","isMoment","moment","copyOrDelete","a","b","prop","allowDeletion","doDeletion","fillIfDefined","aProp","bProp","selectiveExtend","props","_len","others","_key","_i","_others","other","p","hasOwnProperty","selectiveDeepExtend","deepExtend","selectiveNotDeepExtend","propsToExclude","indexOf","protoExtend","getPrototypeOf","slice","equalArray","len","convert","type","valueOf","toDate","getType","toISOString","format","_value","concat","Boolean","copyAndExtendArray","newValue","copyArray","getAbsoluteLeft","elem","getBoundingClientRect","left","getAbsoluteRight","right","getAbsoluteTop","top","addClassName","classNames","classes","className","split","newClasses","join","removeClassName","oldClasses","callback","_key2","updateProperty","throttle","scheduled","requestAnimationFrame","addEventListener","element","action","listener","useCapture","navigator","userAgent","attachEvent","removeEventListener","detachEvent","preventDefault","event","window","returnValue","getTarget","srcElement","Element","nodeType","parentNode","hasParent","parent","hexToRGB","hex","result","shortHexRE","r","parseInt","g","fullHexRE","overrideOpacity","color","opacity","rgb","substr","replace","_rgb","RGBToHex","red","green","blue","parseColor","inputColor","defaultColor","colorStr","isValidRGB","map","isValidHex","hsv","hexToHSV","lighterColorHSV","h","s","v","darkerColorHSV","darkerColorHex","HSVToHex","lighterColorHex","background","border","highlight","hover","_color","RGBToHSV","minRGB","maxRGB","d","addCssText","cssText","currentStyles","cssUtil","style","newStyles","styles","removeCssText","removeStyles","_key4","HSVToRGB","f","q","t","isOk","test","rgbRE","isValidRGBA","rgba","rgbaRE","selectiveBridgeObject","fields","referenceObject","objectTo","create","bridgeObject","insertSort","compare","k","j","mergeOptions","mergeTarget","option","globalOptions","isPresent","doMerge","src","dst","srcOption","globalPassed","x","isEmpty","globalOption","globalEnabled","enabled","binarySearchCustom","orderedItems","comparator","field","field2","iteration","low","high","middle","item","_value3","searchResult","binarySearchValue","sidePreference","prevValue","nextValue","getScrollBarWidth","inner","document","createElement","width","height","outer","position","visibility","overflow","appendChild","body","w1","offsetWidth","w2","clientWidth","topMost","pile","accessors","candidate","_iteratorNormalCompletion","_didIteratorError","_iteratorError","_iterator","_step","member","next","done","err","return","_classCallCheck","instance","Constructor","_defineProperties","descriptor","_createClass","protoProps","staticProps","_assertThisInitialized","self","ReferenceError","_possibleConstructorReturn","_typeof_1","assertThisInitialized","_inherits","subClass","superClass","setPrototypeOf","createCommonjsModule$1","isId","_objectSpread","parseDOT","data","dot","parseGraph","first","index","c","charAt","nextPreview","isAlphaNumeric","regexAlphaNumeric","merge","name","setValue","path","o","shift","addNode","graph","node","current","graphs","root","nodes","id","attr","addEdge","edge","edges","createEdge","to","arrows","getToken","tokenType","TOKENTYPE","NULL","token","isComment","DELIMITER","c2","DELIMITERS","IDENTIFIER","newSyntaxError","UNKNOWN","SyntaxError","chop","strict","parseStatements","parseStatement","subgraph","parseSubgraph","parseEdge","parseAttributeStatement","parseNodeStatement","subgraphs","parseAttributeList","edgeStyles","arrowTypes","box","crow","curve","icurve","normal","inv","diamond","tee","vee","attr_list","attr_names","arrowType","includes","idx","dir","dir_type","from_type","to_type","splice","idx_arrow","nof_attr_list","tmp_attr_list","message","text","maxLength","forEach2","array1","array2","elem1","elem2","setProp","names","pop","convertAttr","mapping","converted","visProp","visPropI","parseGephi","gephiJSON","optionsObj","inheritColor","fixed","gEdges","vEdges","gEdge","vEdge","attributes","label","title","vNodes","gNode","vNode","y","size","Activator","container","active","dom","overlay","hammer","Hammer","on","_onTapOverlay","bind","me","events","stopPropagation","onClick","_hasParent","deactivate","keycharm","destroy","escListener","_iterableToArrayLimit","_arr","_n","_d","_e","_s","_slicedToArray","arrayWithHoles","iterableToArrayLimit","nonIterableRest","_initRequestAnimationFrame","func","mozRequestAnimationFrame","webkitRequestAnimationFrame","msRequestAnimationFrame","Network","defaultOptions","locale","locales","clickToUse","util","extend","nodeIndices","edgeIndices","emitter","off","emit","once","eventListeners","onTap","onTouch","onDoubleTap","onHold","onDragStart","onDrag","onDragEnd","onMouseWheel","onPinch","onMouseMove","onRelease","onContext","functions","createNode","getPointer","modules","view","scale","translation","bindEventListeners","images","Images","_this","groups","Groups","canvas","Canvas","selectionHandler","SelectionHandler","interactionHandler","InteractionHandler","View","renderer","CanvasRenderer","physics","PhysicsEngine","layoutEngine","LayoutEngine","clustering","ClusterEngine","manipulation","ManipulationSystem","nodesHandler","NodesHandler","edgesHandler","EdgesHandler","KamadaKawai","_create","setOptions","setData","commonjsGlobal","globalThis","global","_global","Function","__g","_core","core","version","__e","_core_1","_shared","store","mode","copyright","px","_uid","_wks","USE_SYMBOL","$exports","_wksExt","_isObject","it","_anObject","_fails","e","_descriptors","get","document$1","is","_domCreate","_ie8DomDefine","_toPrimitive","S","val","dP","f$1","O","P","Attributes","_objectDp","_wksDefine","$Symbol","_has","_propertyDesc","bitmap","_hide","_functionToString","_redefine","SRC","TO_STRING","TPL","inspectSource","safe","isFunction","_aFunction","_ctx","that","PROTOTYPE","$export","IS_FORCED","F","IS_GLOBAL","G","IS_STATIC","IS_PROTO","IS_BIND","B","expProto","own","out","exp","U","W","R","_export","_meta","META","setDesc","isExtensible","FREEZE","preventExtensions","setMeta","w","meta","KEY","NEED","fastKey","getWeak","onFreeze","_meta_1","_meta_2","_meta_3","_meta_4","_meta_5","def","TAG","_setToStringTag","tag","stat","_cof","_iobject","propertyIsEnumerable","_defined","_toIobject","_toInteger","_toLength","_toAbsoluteIndex","min$1","shared","_sharedKey","arrayIndexOf","IS_INCLUDES","$this","el","fromIndex","_arrayIncludes","IE_PROTO","_objectKeysInternal","_enumBugKeys","_objectKeys","f$2","_objectGops","f$3","_objectPie","_enumKeys","getSymbols","symbols","isEnum","_isArray","arg","_toObject","_objectDps","Properties","document$2","_html","documentElement","IE_PROTO$1","Empty","PROTOTYPE$1","createDict","iframe","lt","gt","iframeDocument","display","contentWindow","open","write","close","_objectCreate","hiddenKeys","f$4","getOwnPropertyNames","_objectGopn","gOPN","toString$1","windowNames","getWindowNames","_objectGopnExt","gOPD","f$6","_objectGopd","gOPD$1","dP$1","gOPN$1","$JSON","JSON","_stringify","stringify","PROTOTYPE$2","HIDDEN","TO_PRIMITIVE","SymbolRegistry","AllSymbols","OPSymbols","ObjectProto","USE_NATIVE","QObject","setter","findChild","setSymbolDesc","D","protoDesc","wrap","_k","isSymbol","$defineProperty","$defineProperties","l","$propertyIsEnumerable","E","$getOwnPropertyDescriptor","$getOwnPropertyNames","$getOwnPropertySymbols","IS_OP","$set","set","es6Symbols","wellKnownSymbols","keyFor","useSetter","useSimple","FAILS_ON_PRIMITIVES","args","replacer","$replacer","_objectSap","_flags","ignoreCase","multiline","unicode","sticky","flags","RegExp","$toString","define","at","pos","charCodeAt","_stringAt","_advanceStringIndex","TAG$1","ARG","tryGet","_classof","T","callee","builtinExec","_regexpExecAbstract","nativeExec","nativeReplace","patchedExec","LAST_INDEX","UPDATES_LAST_INDEX_WRONG","re1","re2","NPCG_INCLUDED","str","re","lastIndex","reCopy","_regexpExec","proto","forced","SPECIES","REPLACE_SUPPORTS_NAMED_GROUPS","SPLIT_WORKS_WITH_OVERWRITTEN_EXEC","originalExec","_fixReWks","SYMBOL","DELEGATES_TO_SYMBOL","DELEGATES_TO_EXEC","execCalled","nativeRegExpMethod","fns","nativeMethod","regexp","arg2","forceStringMethod","strfn","rxfn","string","SUBSTITUTION_SYMBOLS","SUBSTITUTION_SYMBOLS_NO_NAMED","maybeToString","defined","REPLACE","$replace","maybeCallNative","getSubstitution","matched","captures","namedCaptures","replacement","tailPos","m","ch","capture","n","floor$1","searchValue","replaceValue","res","rx","functionalReplace","fullUnicode","results","matchStr","accumulatedResult","nextSourcePosition","max$1","min$2","replacerArgs","UNSCOPABLES","ArrayProto","_addToUnscopables","_iterStep","_iterators","IteratorPrototype","_iterCreate","NAME","IE_PROTO$2","ObjectProto$1","_objectGpo","ITERATOR","BUGGY","KEYS","VALUES","returnThis","_iterDefine","Base","DEFAULT","IS_SET","FORCED","getMethod","kind","DEF_VALUES","VALUES_BUG","$native","$default","$entries","$anyNative","entries","methods","values","es6_array_iterator","iterated","_t","Arguments","ITERATOR$1","TO_STRING_TAG","ArrayValues","DOMIterables","CSSRuleList","CSSStyleDeclaration","CSSValueList","ClientRectList","DOMRectList","DOMStringList","DOMTokenList","DataTransferItemList","FileList","HTMLAllCollection","HTMLCollection","HTMLFormElement","HTMLSelectElement","MediaList","MimeTypeArray","NamedNodeMap","NodeList","PaintRequestList","Plugin","PluginArray","SVGLengthList","SVGNumberList","SVGPathSegList","SVGPointList","SVGStringList","SVGTransformList","SourceBufferList","StyleSheetList","TextTrackCueList","TextTrackList","TouchList","collections","explicit","Collection","isEnum$1","$values","isEntries","_objectToArray","MATCH","_isRegexp","isRegExp","SPECIES$1","_speciesConstructor","C","$push","$SPLIT","LENGTH","LAST_INDEX$1","MAX_UINT32","SUPPORTS_Y","SPLIT","$split","internalSplit","separator","limit","output","lastLastIndex","splitLimit","separatorCopy","lastLength","splitter","unicodeMatching","lim","A","z","$min","$assign","assign","_objectAssign","K","aLen","check","_setProto","buggy","__proto__","_inheritIfRequired","_stringWs","space","non","ltrim","rtrim","exporter","ALIAS","FORCE","trim","TYPE","gOPN$2","gOPD$2","dP$2","$trim","_stringTrim","NUMBER","$Number","proto$1","BROKEN_COF","TRIM","toNumber","argument","third","radix","maxCode","NaN","digits","code","j$1","key$1","factory","hooks","hookCallback","input","isObjectEmpty","isUndefined","hasOwnProp","createUTC","createLocalOrUTC","utc","defaultParsingFlags","empty","unusedTokens","unusedInput","charsLeftOver","nullInput","invalidMonth","invalidFormat","userInvalidated","iso","parsedDateParts","meridiem","rfc2822","weekdayMismatch","getParsingFlags","_pf","isValid","_isValid","parsedParts","some","isNowValid","getTime","invalidWeekday","_strict","bigHour","isFrozen","createInvalid","copyConfig","_isAMomentObject","_f","_l","_tzm","_isUTC","_offset","_locale","momentProperties","Moment","config","updateInProgress","updateOffset","absFloor","number","toInt","argumentForCoercion","coercedNumber","isFinite","compareArrays","dontConvert","lengthDiff","diffs","warn","msg","suppressDeprecationWarnings","console","deprecate","firstTime","deprecationHandler","stack","deprecateSimple","deprecations","_config","_dayOfMonthOrdinalParseLenient","_dayOfMonthOrdinalParse","_ordinalParse","mergeConfigs","parentConfig","childConfig","Locale","calendar","mom","now","_calendar","longDateFormat","_longDateFormat","formatUpper","toUpperCase","addUnitAlias","unit","shorthand","lowerCase","toLowerCase","aliases","normalizeUnits","units","normalizeObjectUnits","inputObject","normalizedInput","normalizedProp","addUnitPriority","priority","priorities","getPrioritizedUnits","unitsObj","u","sort","zeroFill","targetLength","forceSign","absNumber","zerosToFill","sign","addFormatToken","padded","ordinal","formatTokenFunctions","localeData","removeFormattingTokens","makeFormatFunction","array","formattingTokens","formatMoment","expandFormat","formatFunctions","invalidDate","replaceLongDateFormatTokens","localFormattingTokens","addRegexToken","regex","strictRegex","regexes","isStrict","getParseRegexForToken","unescapeFormat","regexEscape","p1","p2","p3","p4","addParseToken","tokens","addWeekParseToken","_w","addTimeToArrayFromToken","_a","daysInYear","year","isLeapYear","makeGetSet","keepTime","set$1","month","date","daysInMonth","stringSet","prioritized","mod","modMonth","handleStrictParse","monthName","llc","toLocaleLowerCase","_monthsParse","_longMonthsParse","_shortMonthsParse","monthsShort","months","localeMonthsParse","_monthsParseExact","setMonth","dayOfMonth","monthsParse","getSetMonth","computeMonthsParse","cmpLenRev","shortPieces","longPieces","mixedPieces","_monthsRegex","_monthsShortRegex","_monthsStrictRegex","_monthsShortStrictRegex","createDate","M","ms","getFullYear","setFullYear","createUTCDate","UTC","getUTCFullYear","setUTCFullYear","firstWeekOffset","dow","doy","fwd","fwdlw","getUTCDay","dayOfYearFromWeeks","week","weekday","weekOffset","dayOfYear","resYear","resDayOfYear","weekOfYear","resWeek","weeksInYear","weekOffsetNext","parseWeekday","weekdaysParse","parseIsoWeekday","shiftWeekdays","ws","handleStrictParse$1","weekdayName","_weekdaysParse","_shortWeekdaysParse","_minWeekdaysParse","day","weekdaysMin","weekdaysShort","weekdays","localeWeekdaysParse","_weekdaysParseExact","_fullWeekdaysParse","computeWeekdaysParse","minPieces","minp","shortp","longp","_weekdaysRegex","_weekdaysShortRegex","_weekdaysMinRegex","_weekdaysStrictRegex","_weekdaysShortStrictRegex","_weekdaysMinStrictRegex","hFormat","hours","lowercase","minutes","matchMeridiem","_meridiemParse","normalizeLocale","chooseLocale","loadLocale","globalLocale","oldLocale","_abbr","aliasedRequire","getSetGlobalLocale","getLocale","defineLocale","baseConfig","abbr","parentLocale","localeFamilies","listLocales","checkOverflow","_overflowDayOfYear","_overflowWeeks","_overflowWeekday","defaults","currentDateArray","nowValue","_useUTC","getUTCMonth","getUTCDate","getMonth","getDate","configFromArray","currentDate","expectedWeekday","yearToUse","dayOfYearFromWeekInfo","_dayOfYear","_nextDay","getDay","setUTCMinutes","getUTCMinutes","weekYear","temp","weekdayOverflow","GG","createLocal","_week","curWeek","gg","configFromISO","extendedIsoRegex","basicIsoRegex","allowTime","dateFormat","timeFormat","tzFormat","isoDates","isoTimes","tzRegex","configFromStringAndFormat","extractFromRFC2822Strings","yearStr","monthStr","dayStr","hourStr","minuteStr","secondStr","untruncateYear","defaultLocaleMonthsShort","preprocessRFC2822","checkWeekday","weekdayStr","parsedInput","weekdayProvided","defaultLocaleWeekdaysShort","weekdayActual","calculateOffset","obsOffset","militaryOffset","numOffset","obsOffsets","hm","configFromRFC2822","parsedArray","configFromString","aspNetJsonRegex","createFromInputFallback","ISO_8601","RFC_2822","stringLength","totalParsedInputLength","skipped","_meridiem","meridiemFixWrap","hour","isPm","meridiemHour","isPM","configFromStringAndArray","tempConfig","bestMoment","scoreToBeat","currentScore","score","configFromObject","minute","second","millisecond","createFromConfig","prepareConfig","add","preparse","configFromInput","isUTC","pickBy","moments","isDurationValid","ordering","unitHasDecimal","parseFloat","Duration","duration","years","quarters","quarter","weeks","isoWeek","days","seconds","milliseconds","_milliseconds","_days","_months","_data","_bubble","isDuration","absRound","utcOffset","offsetFromString","matcher","matches","chunk","parts","chunkOffset","cloneWithOffset","model","diff","clone","setTime","local","getDateOffset","getTimezoneOffset","isDaylightSavingTimeShifted","_isDSTShifted","toArray","isUtc","createDuration","ret","diffRes","aspNetRegex","isoRegex","parseIso","momentsDifference","inp","positiveMomentsDifference","base","isAfter","isBefore","createAdder","direction","period","dur","tmp","addSubtract","isAdding","monthDiff","wholeMonthDiff","anchor","anchor2","adjust","newLocaleData","mod$1","dividend","divisor","localStartOfDate","utcStartOfDate","addWeekYearFormatToken","getter","getSetWeekYearHelper","weeksTarget","setWeekAll","dayOfYearData","parseMs","preParsePostFormat","get$1","listMonthsImpl","listWeekdaysImpl","localeSorted","addSubtract$1","absCeil","daysToMonths","monthsToDays","makeAs","alias","as","makeGetter","substituteTimeAgo","withoutSuffix","isFuture","relativeTime","relativeTime$1","posNegDuration","abs","thresholds","ss","getSetRelativeTimeRounding","roundingFunction","toISOString$1","abs$1","Y","toFixed","total","asSeconds","totalSign","ymSign","daysSign","hmsSign","fun","defaultDayOfMonthOrdinalParse","match1","match2","match3","match4","match6","match1to2","match3to4","match5to6","match1to3","match1to4","match1to6","matchUnsigned","matchSigned","matchOffset","matchShortOffset","matchTimestamp","matchWord","YEAR","MONTH","DATE","HOUR","MINUTE","SECOND","parseTwoDigitYear","getSetYear","monthsShortRegex","monthsRegex","MONTHS_IN_FORMAT","weekdaysMinRegex","weekdaysShortRegex","weekdaysRegex","kInput","_isPm","pos1","pos2","defaultLocaleMeridiemParse","getSetHour","sameDay","nextDay","nextWeek","lastDay","lastWeek","sameElse","LTS","LT","L","LL","LLL","LLLL","dayOfMonthOrdinalParse","future","past","mm","hh","dd","MM","yy","meridiemParse","UT","GMT","EDT","EST","CDT","CST","MDT","MST","PDT","PST","prototypeMin","prototypeMax","invalid","subtract","defaultFormat","defaultFormatUtc","lang","isoWeekYear","getSetDayOfMonth","getSetMinute","getSetSecond","getSetMillisecond","time","formats","sod","startOf","calendarFormat","asFloat","zoneDelta","endOf","startOfDate","isoWeekday","MS_PER_HOUR","MS_PER_MINUTE","MS_PER_SECOND","inputString","postformat","humanize","fromNow","toNow","invalidAt","localInput","isBetween","inclusivity","localFrom","localTo","isSame","inputMs","isSameOrAfter","isSameOrBefore","parsingFlags","toObject","keepOffset","inspect","zone","isLocal","prefix","suffix","toJSON","unix","creationData","isoWeeks","weekInfo","isoWeeksInYear","keepLocalTime","keepMinutes","localAdjust","_changeInProgress","parseZone","tZone","hasAlignedHourOffset","isDST","isUtcOffset","zoneAbbr","zoneName","dates","isDSTShifted","_invalidDate","_ordinal","_relativeTime","pastFuture","isFormat","_monthsShort","firstDayOfYear","firstDayOfWeek","_weekdays","_weekdaysMin","_weekdaysShort","isLower","langData","mathAbs","asMilliseconds","asMinutes","asHours","asDays","asWeeks","asMonths","asQuarters","asYears","proto$2","monthsFromDays","withSuffix","toIsoString","setHookCallback","updateLocale","tmpLocale","relativeTimeRounding","relativeTimeThreshold","threshold","myMoment","HTML5_FMT","DATETIME_LOCAL","DATETIME_LOCAL_SECONDS","DATETIME_LOCAL_MS","TIME","TIME_SECONDS","TIME_MS","WEEK","i$1","crypto","getRandomValues","_rnds8","Uint8Array","_rnds","byteToHex$1","i$1$1","seedBytes","defaultNodeId","defaultClockseq","asBoolean","defaultValue","asNumber","asString","asSize","asElement","_key3","_value2","easingFunctions","linear","easeInQuad","easeOutQuad","easeInOutQuad","easeInCubic","easeOutCubic","easeInOutCubic","easeInQuart","easeOutQuart","easeInOutQuart","easeInQuint","easeOutQuint","easeInOutQuint","freeze","randomUUID","_typeof2","classCallCheck","createClass","possibleConstructorReturn","_getPrototypeOf","_setPrototypeOf","inherits","byteToHex$2","i$2","random$1","byteToHex$1$1","seedBytes$1","defaultNodeId$1","defaultClockseq$1","Queue","_queue","_timeout","_extended","delay","_flushIfNeeded","flush","method","original","queue","context","entry","clearTimeout","setTimeout","nonIterableSpread","toConsumableArray","arrayWithoutHoles","iterableToArray","DataSetPart","_subscribers","remove","update","subscribe","unsubscribe","payload","senderId","subscribers","subscriber","DataSet","_DataSetPart","_options","_idProp","fieldId","_type","addedIds","_addItem","_trigger","items","_this2","updatedIds","oldData","updatedData","idProp","addOrUpdate","origId","fullItem","oldItem","_updateItem","_id","ids","returnType","itemIds","itemId","_getItem","order","_sort","_filterFields","_i2","_len2","_i3","_len3","resultant","_id2","_i4","_len4","_i5","_len5","_id3","_i6","_len6","_id4","_i7","_len7","_i8","_len8","_id5","_i9","_len9","_id6","_item","mappedItems","reduce","filteredItem","av","bv","removedIds","removedItems","_remove","ident","maxField","itemField","minField","fieldType","count","exists","_i10","_len10","types","raw","DataView","_ids","_onEvent","getIds","oldIds","newIds","error","viewOptions","thisFilter","optionsFilter","defaultFilter","getDataSet","params","oldItems","updatedItems","CanvasRenderingContext2D","circle","beginPath","arc","closePath","square","rect","triangle","s2","ir","moveTo","lineTo","triangleDown","star","radius","roundRect","r2d","ellipse_vis","kappa","ox","oy","xe","ye","xm","ym","bezierCurveTo","database","wEllipse","hEllipse","ymb","yeb","dashedLine","x2","y2","pattern","patternLength","dx","dy","slope","distRemaining","patternIndex","draw","xStep","dashLength","hexagon","Emitter","mixin","_callbacks","removeListener","removeAllListeners","callbacks","cb","listeners","hasListeners","NODE_ATTR_MAPPING","EDGE_ATTR_MAPPING","dotData","graphData","dotNode","graphNode","image","shape","convertEdge","dotEdge","graphEdge","subEdge","this","fromCharCode","_exportFunctions","_bound","keydown","keyup","_keys","down","handleEvent","up","keyCode","bound","shiftKey","bindAll","getKey","unbind","newBindings","reset","nextKey","assign$1","hammerMock","noop","require$$0","activate","edit","del","back","editNode","editEdge","addDescription","edgeDescription","editEdgeDescription","createEdgeError","deleteClusterError","editClusterError","CachedImage","NUM_ITERATIONS","Image","initialized","h2","h4","h8","h16","w4","w8","w16","coordinates","_fillMipMap","ctx","getContext","drawImage","iterations","factor","imageBroken","url","brokenUrl","imageToLoadBrokenUrlOn","onerror","imageToRedrawWith","cachedImage","img","onload","_fixImageCoordinates","init","_redrawWithImage","_tryloadBrokenUrl","imageToCache","offsetHeight","clear","defaultIndex","groupsArray","groupIndex","defaultGroups","useDefaultGroups","optionFields","groupName","group","groupname","shouldCreate","ComponentUtil","subOption","allowed","chosen","chosenEdge","point","rotationPoint","angle","tmp2","bottom","LabelAccumulator","measureText","lines","blocks","tmpText","block","line","_add","tmpLines","tmpLine","firstEmptyBlock","tmpBlocks","determineLineHeights","determineLabelSize","removeEmptyBlocks","tagPattern","MarkupAccumulator","bold","ital","mono","spacing","buffer","modStack","modName","tagName","emitBlock","unshift","setTag","advance","prepareRegExp","regExp","nextTag","checkTag","unsetTag","prepared","LabelSplitter","selected","getFormattingValues","measure","isValidLabel","finalize","font","fontOptions","nlLines","lineCount","multi","splitBlocks","newLine","maxWdt","splitStringIntoLines","append","markupSystem","system","parseEntities","parsed","parseWS","parseStartTag","parseEndTag","beginable","parseOverride","decodeMarkupSystem","splitMarkdownBlocks","splitHtmlBlocks","curWidth","words","pre","newText","overMaxWidth","appendLast","getLongestFit","word","getLongestFitWord","newW","multiFontStyle","Label","edgelabel","pointToSelf","baseSize","yLine","isEdgeLabel","elementOptions","initFontOptions","labelDirty","newFontOptions","parseFontString","vadjust","constrainWidth","minWdt","constrainHeight","minHgt","valign","widthConstraint","widthConstraintMaximum","widthConstraintMinimum","heightConstraint","heightConstraintMinimum","heightConstraintValign","propagateFonts","constrain","chooser","choosify","margins","widthBias","heightBias","dstPile","srcPile","addFontToPile","tmpShorthand","opt","multiName","multiFont","optionNames","getFontOption","fontPile","addFontOptionsToPile","getBasicOptions","modOptions","tmpMultiFontOptions","getFontOptions","baseline","viewFontSize","scaling","drawThreshold","maxVisible","calculateLabelSize","_drawBackground","_drawText","fillStyle","getSize","fillRect","_setAlignment","textAlign","labelHeight","align","_getColor","strokeColor","fontColor","strokeWidth","lineWidth","strokeStyle","lineJoin","strokeText","fillText","textBaseline","initialStrokeColor","_processLabel","getValue","face","labelHighlightBold","fontString","selectedState","hoverState","inText","process","differentState","state","_processLabelText","outOptions","inOptions","newOptionsArray","NodeBase","labelModule","margin","refreshNeeded","boundingBox","adjustSizes","borderWidth","resize","shadow","shadowColor","shadowBlur","shadowSize","shadowOffsetX","shadowX","shadowOffsetY","shadowY","borderDashes","setLineDash","dashes","shapeProperties","borderColor","save","enableBorderDashes","stroke","disableBorderDashes","restore","enableShadow","fill","disableShadow","performStroke","_updateBoundingBox","textSize","getTextSize","DEFAULT_SIZE","Box","_setMargins","needsRefresh","dimensions","getDimensionsFromLabel","initContextForDraw","borderRadius","performFill","updateBoundingBox","_addBoundingBoxMargin","CircleImageBase","labelOffset","imageObj","imageObjAlt","setImages","selection_changed","imageTmp","useImageSize","ratio_width","ratio_height","globalAlpha","interpolation","drawImageAtPosition","yLabel","labelDimensions","Circle","diameter","_drawRawCircle","CircularImage","imageAbsent","_resizeImage","switchImages","clip","_drawImageAtPosition","_drawImageLabel","Database","_distanceToBorder","ShapeBase","sizeMultiplier","icon","Diamond","_drawShape","Dot","Ellipse","Icon","iconSize","_icon","side","useBorderWithImage","neutralborderWidth","selectionLineWidth","borderWidthSelected","Square","Hexagon","Star","Text","Triangle","TriangleDown","errorFound","printStyle","Validator","referenceOptions","subObject","allOptions","usedOptions","__any__","getSuggestion","referenceOption","is_object","refOptionObj","__type__","checkFields","log","printLocation","optionType","refOptionType","print","localSearch","findInOptions","globalSearch","indexMatch","distance","closestMatch","recursive","closestMatchPath","lowerCaseOption","op","levenshteinDistance","matrix","Node","imagelist","grouplist","baseFontSize","predefinedPosition","currentShape","checkMass","parseOptions","_load_images","updateLabelModule","updateShape","hidden","load","brokenImage","unselected","updateGroupOptions","currentGroup","distanceToBorder","customScalingFunction","sizeDiff","fontDiff","visible","pointInRect","nodeId","labelId","parentOptions","newOptions","groupList","groupObj","skipProperties","parsedColor","mass","strId","nodesListeners","boldital","level","refresh","doNotEmit","oldNodesData","newNodes","properties","positionInitially","changedData","dataChanged","oldValue","constructorClass","clearPositions","_this3","dataArray","dataset","nodeList","nodeObj","toId","fromId","edgeList","_this4","EndPoint","points","arrowData","xt","yt","Arrow","transform","drawPath","Crow","Curve","pi","start_angle","end_angle","InvertedCurve","InvertedTriangle","Bar","Vee","EndPoints","EdgeBase","colorDirty","selectionWidth","hoverWidth","fromPoint","toPoint","viaNode","getColor","_drawLine","_drawDashedLine","_line","_getCircleData","_circle","lineCap","lineDashOffset","nearNode","_findBorderPositionCircle","_findBorderPosition","selfReferenceSize","percentage","distanceToPoint","difference","_pointOnCircle","inheritsColor","grd","createLinearGradient","fromColor","toColor","addColorStop","x1","y1","x3","y3","via","_getDistanceToEdge","py","arrowPoint","node1","node2","guideOffset","scaleFactor","fromArrowScale","fromArrowType","toArrowScale","toArrowType","middleArrowScale","middleArrowType","findBorderPosition","getPoint","smooth","guidePos","xi","yi","attrs","origCtxAttr","attrname","backgroundColor","backgroundSize","setStrokeDashed","backgroundDashes","BezierEdgeBase","_getViaCoordinates","minDistance","lastX","lastY","_getDistanceToLine","viaNode1","viaNode2","hasNode1","hasNode2","quadraticCurveTo","drawBackground","CubicBezierEdgeBase","via1","via2","vec","CubicBezierEdge","viaNodes","_bezierCurve","roundness","forceDirection","_findBorderPositionBezier","_getDistanceToBezierEdge","BezierEdgeDynamic","_boundFunction","positionBezierNode","physicsChange","setupSupportNode","connect","parentEdgeId","cx","cy","cr","BezierEdgeStatic","xVia","yVia","stepX","stepY","originalAngle","myAngle","StraightEdge","edgeSegmentLength","toBorderDist","toBorderPoint","borderPos","Edge","baseWidth","edgeType","connected","oldHidden","updateEdgeType","_setInteractionWidths","newHidden","toArrow","fromArrow","middleArrow","inherit","arrowStrikethrough","selectedWidth","changeInType","cleanup","disconnect","attachEdge","detachEdge","widthDiff","getViaNode","getArrowData","drawLine","drawArrows","drawLabel","drawArrowHead","_getRotation","translate","rotate","edgeId","isOverlappingWith","xFrom","yFrom","xTo","yTo","xObj","yObj","dist","getDistanceToEdge","copyFromGlobals","colorsDefined","edgesListeners","edgeData","smoothOptions","reconnectEdges","oldEdgesData","edgesData","oldEdge","_addMissingEdges","_removeInvalidEdges","edgesToDelete","toNode","_this5","fromNode","isCluster","addIds","BarnesHutSolver","physicsBody","barnesHutTree","randomSeed","thetaInversed","theta","overlapAvoidanceFactor","avoidOverlap","gravitationalConstant","physicsNodeIndices","nodeCount","_formBarnesHutTree","_getForceContributions","parentBranch","_getForceContribution","children","NW","NE","SW","SE","childrenCount","centerOfMass","calcSize","_calculateForces","gravityForce","fx","forces","minX","minY","maxX","maxY","rootSize","halfRootSize","centerX","centerY","range","maxWidth","_splitBranch","_placeInTree","totalMass","totalMassInv","biggestSize","skipMassUpdate","_updateBranchMass","region","_placeInRegion","seededRandom","containedNode","_insertRegion","childSize","_drawBranch","branch","RepulsionSolver","nodeDistance","fy","repulsingForce","HierarchicalRepulsionSolver","steepness","SpringSolver","physicsEdgeIndices","edgeLength","node3","springLength","_calculateSpringForce","springForce","springConstant","HierarchicalSpringSolver","springFx","springFy","totalFx","totalFy","correctionFx","correctionFy","CentralGravitySolver","centralGravity","ForceAtlas2BasedRepulsionSolver","degree","ForceAtlas2BasedCentralGravitySolver","velocities","physicsEnabled","simulationInterval","requiresTimeout","previousStates","referenceState","freezeCache","renderTimer","adaptiveTimestep","adaptiveTimestepEnabled","adaptiveCounter","adaptiveInterval","stabilized","startedStabilization","stabilizationIterations","ready","barnesHut","damping","forceAtlas2Based","repulsion","hierarchicalRepulsion","maxVelocity","minVelocity","solver","stabilization","updateInterval","onlyDynamicEdges","fit","timestep","layoutFailed","initPhysics","stopSimulation","startSimulation","updatePhysicsData","nodesSolver","edgesSolver","gravitySolver","Repulsion","HierarchicalRepulsion","modelOptions","stabilize","viewFunction","simulationStep","_emitStabilized","startTime","physicsTick","physicsTime","runDoubleSpeed","amountOfIterations","solve","moveNodes","_evaluateStepQuality","_startStabilizing","doAdaptive","physicsStep","revert","adjustTimeStep","nodeIds","positions","vx","vy","reference","dpos","maxNodeVelocity","averageNodeVelocity","velocityAdaptiveThreshold","nodeVelocity","_performStep","df","maxV","force","velocity","calculateComponentVelocity","totalVelocity","targetIterations","_freezeNodes","_stabilizationBatch","running","sendProgress","_finalizeStabilization","_restoreFrozenNodes","forceSize","colorFactor","NetworkUtil","allNodes","specificNodes","clonedOptions","amountOfConnections","Cluster","containedNodes","containedEdges","childClusterId","childCluster","clusterEdge","parentClusterEdge","clusteringEdgeReplacingIds","srcId","edgeReplacedById","clusteredNodes","clusteredEdges","hubsize","_getHubSize","_checkOptions","nodesToCluster","clusterByConnection","refreshData","joinCondition","childNodesObj","childEdgesObj","_cluster","edgeCount","clusters","usedNodes","relevantEdgeCount","checkJoinCondition","cloneOptions","gatheringSuccessful","childNodeId","_getConnectedId","findClusterData","foundCluster","clusterByEdgeCount","clusterNodeProperties","parentNodeId","parentClonedOptions","childClonedOptions","childNodeIDs","childNode","childEdge","clusterEdgeProperties","childKeys","createEdges","otherNodeId","newEdges","getNewEdge","createdEdge","newEdge","matchToDirection","matchFromDirection","_createClusteredEdge","_backupEdgeOptions","tmpNodesToRemove","allowSingleNodeCluster","processProperties","childNodesOptions","childEdgesOptions","clusterId","_getClusterPosition","clusterNode","_clusterEdges","originalOptions","clusterNodeId","findNode","parentIndex","parentClusterNodeId","parentClusterNode","_openChildCluster","releaseFunction","clusterPosition","newPositions","edgesToBeDeleted","otherNode","transferId","transferEdge","otherCluster","_restoreEdge","nodesArray","counter","reverse","clusteredNodeId","startEdgeId","allEdgeIds","getClusteredEdges","clusteredEdgeId","getBaseEdges","IdsToHandle","doneIds","foundIds","nextId","nextEdge","replacingIds","replacingId","average","averageSquared","hubCounter","largestHub","variance","standardDeviation","hubThreshold","baseEdge","extraOptions","childNodes","childEdges","_createClusterEdges","clusteredNode","deletedNodeIds","deletedEdgeIds","eachClusterNode","endPointsValid","replacedIds","numValid","containedEdgeId","containedEdge","deletedEdgeId","_filter","shouldBeClustered","_isClusteredNode","_isClusteredEdge","clusterFrom","_getClusterNodeForNode","clusterTo","changed","continueLoop","clustersToOpen","numNodes","allowSingle","openCluster","_updateState","redrawRequested","renderingActive","renderRequests","allowRedraw","dragging","zooming","hideEdgesOnDrag","hideEdgesOnZoom","hideNodesOnDrag","_determineBrowserMethod","zoomTimeoutId","_requestRedraw","_resizeNodes","_redraw","_startRendering","cancelAnimationFrame","myWindow","timer","_requestNextFrame","_renderStep","frame","setSize","setTransform","clientHeight","clearRect","_drawEdges","_drawNodes","alwaysShow","topLeft","DOMtoCanvas","bottomRight","viewableArea","isSelected","isBoundingBoxOverlappingWith","browserType","inputHandler","isFirst","isFinal","offTouch","pinchRecognizer","getTouchAction","pixelRatio","resizeTimer","resizeFunction","_onResize","cameraState","canvasViewCenter","autoResize","hammerFrame","_cleanUp","setInterval","clearInterval","previousWidth","previousHeight","widthRatio","heightRatio","newScale","currentViewCenter","distanceFromCenter","tabIndex","noCanvas","fontWeight","padding","innerHTML","_setPixelRatio","_bindHammer","drag","pinch","enable","DIRECTION_ALL","hammerUtil","_prepareValue","emitEvent","oldWidth","oldHeight","previousRatio","_getCameraState","newWidth","newHeight","_setCameraState","numerator","devicePixelRatio","denominator","webkitBackingStorePixelRatio","mozBackingStorePixelRatio","msBackingStorePixelRatio","oBackingStorePixelRatio","backingStorePixelRatio","_determinePixelRatio","_XconvertCanvasToDOM","_YconvertCanvasToDOM","_XconvertDOMtoCanvas","_YconvertDOMtoCanvas","animationSpeed","renderRefreshRate","animationEasingFunction","easingTime","sourceScale","targetScale","sourceTranslation","targetTranslation","lockedOnNodeId","lockedOnNodeOffset","touchTime","releaseNode","initialZoom","zoomLevel","positionDefined","getRange","numberOfNodes","xDistance","yDistance","xZoomLevel","yZoomLevel","center","findCenter","animationOptions","animation","nodePosition","lockedOnNode","getViewPosition","easingFunction","animateView","locked","_transitionRedraw","viewCenter","_lockedRedraw","finished","progress","NavigationHandler","iconsCreated","navigationHammers","boundFunctions","activated","configureKeyboardBindings","navigationButtons","loadNavigationElements","cleanNavigation","navigationDOM","navigationDivs","navigationDivActions","_fit","bindToRedraw","_stopMovement","boundAction","keyboard","speed","scaleOld","zoom","scaleFrac","tx","ty","pointer","bindToWindow","unbindFromRedraw","Popup","overflowMethod","content","doShow","maxHeight","isLeft","isTop","hide","navigationHandler","popup","popupObj","popupTimer","dragNodes","dragView","tooltipDelay","zoomView","zoomSpeed","tooltip","touch","pinched","multiselect","changedPointers","ctrlKey","metaKey","checkSelectionChanges","_generateClickEvent","clientX","clientY","previousSelection","getSelection","selectAdditionalOnPoint","selectOnPoint","currentSelection","deselectedItems","_determineDifference","selectedItems","firstSet","secondSet","arrayDiff","firstArr","secondArr","getNodeAt","selection","unselectAll","selectObject","selectionObj","xFixed","yFixed","deltaX","deltaY","diffX","diffY","preScaleDragPointer","postScaleDragPointer","canvasToDOM","delta","wheelDelta","detail","popupVisible","_checkHidePopup","setPosition","show","focus","_checkShowPopup","hoverObject","pointerObj","previousPopupObjId","nodeUnderCursor","popupType","overlappingNodes","getTitle","overlappingEdges","popupTargetType","popupTargetId","setText","_pointerToPositionObject","stillOnObj","overNode","hoverObj","selectable","selectConnectedEdges","hoverConnectedEdges","updateSelection","getEdgeAt","selectionChanged","deselectObject","DOM","eventType","oldSelection","emptySelection","_initBaseEvent","getClickedItems","controlEdge","highlightEdges","_selectConnectedEdges","select","_addToSelection","_removeFromSelection","canvasPos","returnNode","positionObject","_getAllNodesOverlappingWith","_getEdgesOverlappingWith","returnEdge","mindist","overlappingEdge","_unselectConnectedEdges","unselect","clusterSize","_addToHover","hoverChanged","emitBlurEvent","hoveredEdgesCount","hoveredNodesCount","newOnlyHoveredEdge","newOnlyHoveredNode","emitHoverEvent","_hoverConnectedEdges","getSelectedNodes","edgeIds","getSelectedEdges","idArray","RangeError","setSelection","getItemsOnPoint","log10","alphabeticalCompare","al","bl","POWERS_OF_TEN","aStr","bStr","minRunLength","makeAscendingRun","lo","hi","runHi","reverseRun","binaryInsertionSort","start","pivot","mid","gallopLeft","hint","lastOffset","maxOffset","gallopRight","__esModule","remaining","runLength","ts","TimSort","minRun","pushRun","mergeRuns","forceMergeRuns","DEFAULT_MIN_GALLOPING","DEFAULT_TMP_STORAGE_LENGTH","minGallop","tmpStorageLength","stackLength","runStart","stackSize","mergeAt","start1","length1","start2","length2","mergeLow","mergeHigh","cursor1","cursor2","dest","count1","count2","exit","customCursor","customDest","DirectionInterface","abstract","fake_use","nodeArray","VerticalStrategy","layout","hierarchical","addToOrdering","getTreeSize","min_x","max_x","levelSeparation","HorizontalStrategy","min_y","max_y","HierarchicalStatus","childrenReference","parentReference","trees","distributionOrdering","levels","distributionIndex","isTree","treeIndex","treeId","accumulator","_getMaxLevel","nodeA","nodeB","minLevel","parents1","parents2","curLevel","initialRandomSeed","setPhysics","optionsBackup","improvedLayout","nodeSpacing","treeSpacing","blockShifting","edgeMinimization","parentCentralization","sortMethod","setupHierarchicalLayout","layoutNetwork","curveType","prevHierarchicalState","setDirectionStrategy","adaptAllOptionsForHierarchicalLayout","backupPhysics","indices","clusterThreshold","clusterOptions","startLength","before","clusterBridges","clusterOutliers","after","_declusterAll","info","kamadaKawai","_shiftToCenter","getRangeCore","clustersPresent","definedLevel","undefinedLevel","lastNodeOnLevel","_determineLevelsByHubsize","_determineLevelsDirected","_determineLevelsCustomCallback","ensureLevel","distribution","_getDistribution","_generateMap","_placeNodesByHierarchy","_condenseHierarchy","stillShifting","branches","shiftTrees","treeSizes","getTreeSizes","shiftBy","shiftTree","treeWidths","numTrees","getBranchNodes","getBranchBoundary","branchMap","maxLevel","minSpace","maxSpace","branchNode","getPosition","_getSpaceAroundNode","minSpaceNode","maxSpaceNode","getCollisionLevel","maxLevel1","getMaxLevel","maxLevel2","shiftElementsCloser","centerParents","hier","levelNodes","hasSameParent","inSameSubNetwork","branchShiftCallback","centerParent","diffAbs","branchNodes1","branchNodes2","branchNodeBoundary1","branchNodeBoundary2","max1","min2","minSpace2","diffBranch","_shiftBlock","_centerParent","minimizeEdgeLength","allEdges","nodeLevel","C2","referenceNodes","aboveEdges","getFx","sum","getDFx","getGuess","guess","guessMap","dfx","ratio","moveBranch","branchNodes","branchBoundary","minSpaceBranch","maxSpaceBranch","branchOffset","moveNode","newPosition","minimizeEdgeLengthBottomUp","getLevels","shiftBranchesCloserBottomUp","centerAllParentsBottomUp","centerAllParents","useMap","prevNode","prevPos","nextNode","nextPos","parents","parentId","_getCenterPosition","positionedNodes","_indexArrayToNodes","handledNodeCount","_validatePositionAndContinue","parentLevel","childRef","childNodeLevel","previousPos","sharedParent","_findCommonParent","withChild","_placeBranchNodes","fix","hubSizes","hubSize","_getActiveEdges","levelDownstream","_this6","_getHubSizes","_crawlNetwork","customCallback","levelA","_this7","setMinLevelToZero","isBidirectional","_this8","otherEdge","levelB","_this9","addRelation","checkIfTree","startingNodeId","crawler","tree","_this10","setTreeIndex","shifter","_this11","childA","childB","iterateParents","parentRef","_this12","findParent","foundParent","isVertical","minPos","maxPos","editMode","manipulationDiv","editModeDiv","closeDiv","manipulationHammers","temporaryUIFunctions","temporaryEventFunctions","temporaryIds","guiEnabled","inMode","selectedControlNode","initiallyActive","deleteNode","deleteEdge","controlNodeStyle","_clean","_restore","enableEditMode","disableEditMode","_setup","showManipulatorToolbar","_createEditButton","manipulationDOM","selectedNodeCount","_getSelectedNodeCount","selectedEdgeCount","_getSelectedEdgeCount","needSeperator","_createAddNodeButton","_createSeperator","_createAddEdgeButton","_createEditNodeButton","_createEditEdgeButton","selectedTotalCount","_createDeleteButton","_bindHammerToDiv","toggleEditMode","_temporaryBindEvent","_createBackButton","_createDescription","_performAddNode","_getSelectedNode","finalizedData","alert","_temporaryBindUI","_handleConnect","_finishConnect","_dragControlNode","_dragStartEdge","editWithoutDrag","edgeBeingEditedId","_performEditEdge","controlNodeFrom","_getNewTargetNode","controlNodeTo","_controlNodeTouch","_controlNodeDragStart","_controlNodeDrag","_controlNodeDragEnd","findBorderPositions","selectedNodes","selectedEdges","deleteFunction","_createWrappers","_removeManipulationDOM","button","_createButton","_cleanManipulatorHammers","_cleanupTemporaryNodesAndEdges","_unbindTemporaryUIs","_unbindTemporaryEvents","addNodeMode","addEdgeMode","editEdgeMode","deleteBtnClass","rtl","deleteSelected","labelClassName","newFunction","boundFunction","UIfunctionName","functionName","eventName","domElement","indexTempEdge","indexTempNode","lastTouch","fromSelect","toSelect","overlappingNodeIds","targetNode","connectionEdge","connectFromId","_performAddEdge","clickData","defaultData","sourceNodeId","targetNodeId","eeFunct","htmlColors","black","navy","darkblue","mediumblue","darkgreen","teal","darkcyan","deepskyblue","darkturquoise","mediumspringgreen","lime","springgreen","aqua","cyan","midnightblue","dodgerblue","lightseagreen","forestgreen","seagreen","darkslategray","limegreen","mediumseagreen","turquoise","royalblue","steelblue","darkslateblue","mediumturquoise","indigo","darkolivegreen","cadetblue","cornflowerblue","mediumaquamarine","dimgray","slateblue","olivedrab","slategray","lightslategray","mediumslateblue","lawngreen","chartreuse","aquamarine","maroon","purple","olive","gray","skyblue","lightskyblue","blueviolet","darkred","darkmagenta","saddlebrown","darkseagreen","lightgreen","mediumpurple","darkviolet","palegreen","darkorchid","yellowgreen","sienna","brown","darkgray","lightblue","greenyellow","paleturquoise","lightsteelblue","powderblue","firebrick","darkgoldenrod","mediumorchid","rosybrown","darkkhaki","silver","mediumvioletred","indianred","peru","chocolate","tan","lightgrey","palevioletred","thistle","orchid","goldenrod","crimson","gainsboro","plum","burlywood","lightcyan","lavender","darksalmon","violet","palegoldenrod","lightcoral","khaki","aliceblue","honeydew","azure","sandybrown","wheat","beige","whitesmoke","mintcream","ghostwhite","salmon","antiquewhite","linen","lightgoldenrodyellow","oldlace","fuchsia","magenta","deeppink","orangered","tomato","hotpink","coral","darkorange","lightsalmon","orange","lightpink","pink","gold","peachpuff","navajowhite","moccasin","bisque","mistyrose","blanchedalmond","papayawhip","lavenderblush","seashell","cornsilk","lemonchiffon","floralwhite","snow","yellow","lightyellow","ivory","white","ColorPicker","generated","centerCoordinates","hueCircle","initialColor","previousColor","applied","updateCallback","closeCallback","_setSize","setInitial","htmlColor","_isColorString","rgbaArray","rgbObj","alpha","_setColor","_generateHueCircle","storePrevious","_updatePicker","setColor","angleConvert","colorPickerSelector","colorPickerCanvas","pixelRation","putImageData","brightnessRange","opacityRange","initialColorDiv","newColorDiv","colorPickerDiv","opacityDiv","brightnessDiv","arrowDiv","onchange","_setOpacity","oninput","_setBrightness","brightnessLabel","opacityLabel","cancelButton","onclick","applyButton","_apply","saveButton","_save","loadButton","_loadLast","_moveSelector","hue","sat","sfac","getImageData","newTop","newLeft","Configurator","parentModule","defaultContainer","configureOptions","changedOptions","allowCreation","popupCounter","showButton","moduleOptions","domElements","popupDiv","popupLimit","popupHistory","colorPicker","wrapper","_removePopup","_handleObject","_makeItem","_makeHeader","_makeButton","_push","_showPopupIfNeeded","div","objectLabel","selectedValue","_update","_makeLabel","step","popupString","popupValue","itemIndex","_setupPopup","generateButton","_printOptions","onmouseover","onmouseout","optionsContainer","html","hideTimeout","deleteTimeout","correspondingElement","checkbox","checked","_showColorPicker","insertTo","setUpdateCallback","colorString","setCloseCallback","checkOnly","visibleInSet","subObj","newPath","_getValue","_handleArray","_makeTextInput","_makeCheckbox","enabledPath","enabledValue","_makeColorField","_makeDropdown","_makeRange","_constructOptions","getOptions","bool","endPoints","configure","boolean","maximum","interaction","minimum","any","FloydWarshall","edgesArray","D_matrix","cell","knode","kcolm","inode","icolm","jnode","jcolm","edgeStrength","distanceSolver","ignoreClusters","getDistances","_createL_matrix","_createK_matrix","_createE_matrix","maxIterations","maxEnergy","highE_nodeId","dE_dx","dE_dy","delta_m","subIterations","_getHighestEnergyNode","_moveNode","_getEnergy","maxEnergyNodeId","dE_dx_max","dE_dy_max","nodeIdx","E_sums","d2E_dx2","d2E_dxdy","d2E_dy2","x_m","y_m","km","K_matrix","lm","L_matrix","iIdx","x_i","y_i","kmat","lmat","_updateE_matrix","E_matrix","mIdx","colm","lcolm","oldDx","oldDy","validate","configurator","networkOptions","setModuleOptions","activator","_updateVisibleIndices","isVisible","_updateValueRange","dotparser","DOTToGraph","gephi","gephiData","gephiParser","valueMin","valueMax","valueTotal","setValueRange","isActive","cluster","getNodesInCluster","clusterByHubsize","getSeed","editNodeMode","getPositions","storePositions","getBoundingBox","getConnectedNodes","objectId","getConnectedEdges","selectNodes","selectEdges","redraw","getScale","getOptionsFromConfigurator","JSONcontainer","elementType","redundant","used","prepareElements","cleanupElements","svgContainer","createElementNS","DOMContainer","insertBefore","groupTemplate","labelObj","getSVGElement","setAttributeNS","xOffset","yOffset","textContent","require","network","convertDot","convertGephi"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;oNAuGqBA,IAAI,CAACC,OADLD,IAAI,CAACE,OCkiJXF,IAAI,CAACG,SA1sE+BH,IAAI,CAACI,OAp5CpCC,MAAM,CAACC,aAtqBhBN,IAAI,CAACO,0DAu0ONP,IAAI,CAACQ,SA/FcR,IAAI,CAACS,OA/FvBT,IAAI,CAACU,IA3gPhB,QAASC,CAAAA,CAAT,EAA4B,MACrB,IAAIC,CAAA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B,CACd0nB,cAAc,CAAE,kBADF,CAEdC,sBAAsB,CAAE,qBAFV,CAGdC,iBAAiB,CAAE,yBAHL,CAIdxJ,IAAI,CAAE,YAJQ,CAKdyJ,IAAI,CAAE,OALQ,CAMdC,YAAY,CAAE,UANA,CAOdC,OAAO,CAAE,cAPK,CAQdC,IAAI,CAAE,YARQ,CASd7J,KAAK,CAAE,SATO,EAYXne,CAr/IT,OCAY,CAAsB,WAAlB,QAAOlzB,CAAAA,MAAP,EAAkCA,MAAM,OAAxC,EAAsD8qD,qDCe3D41D,EAAO,CAAG,CACrB9qG,MAAM,CAANA,EADqB,CAErBkoG,SAAS,CAATA,EAFqB,CAGrBI,WAAW,CAAXA,EAHqB,CAIrBh/C,UAAU,CAAVA,EAJqB,CAKrByhD,UAAU,CAAE7C,EALS,CAMrB8C,YAAY,CAAEtwG,EANO"} \ No newline at end of file diff --git a/node_modules/vis-network/docs/css/bootstrap-theme.css b/node_modules/vis-network/docs/css/bootstrap-theme.css deleted file mode 100644 index c4cadf15ea7b6525f34b16385276441328b00d3d..0000000000000000000000000000000000000000 --- a/node_modules/vis-network/docs/css/bootstrap-theme.css +++ /dev/null @@ -1,470 +0,0 @@ -/*! - * Bootstrap v3.3.1 (http://getbootstrap.com) - * Copyright 2011-2014 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - */ - -.btn-default, -.btn-primary, -.btn-success, -.btn-info, -.btn-warning, -.btn-danger { - text-shadow: 0 -1px 0 rgba(0, 0, 0, .2); - -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 1px rgba(0, 0, 0, .075); - box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 1px rgba(0, 0, 0, .075); -} -.btn-default:active, -.btn-primary:active, -.btn-success:active, -.btn-info:active, -.btn-warning:active, -.btn-danger:active, -.btn-default.active, -.btn-primary.active, -.btn-success.active, -.btn-info.active, -.btn-warning.active, -.btn-danger.active { - -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125); - box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125); -} -.btn-default .badge, -.btn-primary .badge, -.btn-success .badge, -.btn-info .badge, -.btn-warning .badge, -.btn-danger .badge { - text-shadow: none; -} -.btn:active, -.btn.active { - background-image: none; -} -.btn-default { - text-shadow: 0 1px 0 #fff; - background-image: -webkit-linear-gradient(top, #fff 0%, #e0e0e0 100%); - background-image: -o-linear-gradient(top, #fff 0%, #e0e0e0 100%); - background-image: -webkit-gradient(linear, left top, left bottom, from(#fff), to(#e0e0e0)); - background-image: linear-gradient(to bottom, #fff 0%, #e0e0e0 100%); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe0e0e0', GradientType=0); - filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); - background-repeat: repeat-x; - border-color: #dbdbdb; - border-color: #ccc; -} -.btn-default:hover, -.btn-default:focus { - background-color: #e0e0e0; - background-position: 0 -15px; -} -.btn-default:active, -.btn-default.active { - background-color: #e0e0e0; - border-color: #dbdbdb; -} -.btn-default:disabled, -.btn-default[disabled] { - background-color: #e0e0e0; - background-image: none; -} -.btn-primary { - background-image: -webkit-linear-gradient(top, #337ab7 0%, #265a88 100%); - background-image: -o-linear-gradient(top, #337ab7 0%, #265a88 100%); - background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#265a88)); - background-image: linear-gradient(to bottom, #337ab7 0%, #265a88 100%); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff265a88', GradientType=0); - filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); - background-repeat: repeat-x; - border-color: #245580; -} -.btn-primary:hover, -.btn-primary:focus { - background-color: #265a88; - background-position: 0 -15px; -} -.btn-primary:active, -.btn-primary.active { - background-color: #265a88; - border-color: #245580; -} -.btn-primary:disabled, -.btn-primary[disabled] { - background-color: #265a88; - background-image: none; -} -.btn-success { - background-image: -webkit-linear-gradient(top, #5cb85c 0%, #419641 100%); - background-image: -o-linear-gradient(top, #5cb85c 0%, #419641 100%); - background-image: -webkit-gradient(linear, left top, left bottom, from(#5cb85c), to(#419641)); - background-image: linear-gradient(to bottom, #5cb85c 0%, #419641 100%); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff419641', GradientType=0); - filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); - background-repeat: repeat-x; - border-color: #3e8f3e; -} -.btn-success:hover, -.btn-success:focus { - background-color: #419641; - background-position: 0 -15px; -} -.btn-success:active, -.btn-success.active { - background-color: #419641; - border-color: #3e8f3e; -} -.btn-success:disabled, -.btn-success[disabled] { - background-color: #419641; - background-image: none; -} -.btn-info { - background-image: -webkit-linear-gradient(top, #5bc0de 0%, #2aabd2 100%); - background-image: -o-linear-gradient(top, #5bc0de 0%, #2aabd2 100%); - background-image: -webkit-gradient(linear, left top, left bottom, from(#5bc0de), to(#2aabd2)); - background-image: linear-gradient(to bottom, #5bc0de 0%, #2aabd2 100%); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2aabd2', GradientType=0); - filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); - background-repeat: repeat-x; - border-color: #28a4c9; -} -.btn-info:hover, -.btn-info:focus { - background-color: #2aabd2; - background-position: 0 -15px; -} -.btn-info:active, -.btn-info.active { - background-color: #2aabd2; - border-color: #28a4c9; -} -.btn-info:disabled, -.btn-info[disabled] { - background-color: #2aabd2; - background-image: none; -} -.btn-warning { - background-image: -webkit-linear-gradient(top, #f0ad4e 0%, #eb9316 100%); - background-image: -o-linear-gradient(top, #f0ad4e 0%, #eb9316 100%); - background-image: -webkit-gradient(linear, left top, left bottom, from(#f0ad4e), to(#eb9316)); - background-image: linear-gradient(to bottom, #f0ad4e 0%, #eb9316 100%); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffeb9316', GradientType=0); - filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); - background-repeat: repeat-x; - border-color: #e38d13; -} -.btn-warning:hover, -.btn-warning:focus { - background-color: #eb9316; - background-position: 0 -15px; -} -.btn-warning:active, -.btn-warning.active { - background-color: #eb9316; - border-color: #e38d13; -} -.btn-warning:disabled, -.btn-warning[disabled] { - background-color: #eb9316; - background-image: none; -} -.btn-danger { - background-image: -webkit-linear-gradient(top, #d9534f 0%, #c12e2a 100%); - background-image: -o-linear-gradient(top, #d9534f 0%, #c12e2a 100%); - background-image: -webkit-gradient(linear, left top, left bottom, from(#d9534f), to(#c12e2a)); - background-image: linear-gradient(to bottom, #d9534f 0%, #c12e2a 100%); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc12e2a', GradientType=0); - filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); - background-repeat: repeat-x; - border-color: #b92c28; -} -.btn-danger:hover, -.btn-danger:focus { - background-color: #c12e2a; - background-position: 0 -15px; -} -.btn-danger:active, -.btn-danger.active { - background-color: #c12e2a; - border-color: #b92c28; -} -.btn-danger:disabled, -.btn-danger[disabled] { - background-color: #c12e2a; - background-image: none; -} -.thumbnail, -.img-thumbnail { - -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .075); - box-shadow: 0 1px 2px rgba(0, 0, 0, .075); -} -.dropdown-menu > li > a:hover, -.dropdown-menu > li > a:focus { - background-color: #e8e8e8; - background-image: -webkit-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%); - background-image: -o-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%); - background-image: -webkit-gradient(linear, left top, left bottom, from(#f5f5f5), to(#e8e8e8)); - background-image: linear-gradient(to bottom, #f5f5f5 0%, #e8e8e8 100%); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0); - background-repeat: repeat-x; -} -.dropdown-menu > .active > a, -.dropdown-menu > .active > a:hover, -.dropdown-menu > .active > a:focus { - background-color: #2e6da4; - background-image: -webkit-linear-gradient(top, #337ab7 0%, #2e6da4 100%); - background-image: -o-linear-gradient(top, #337ab7 0%, #2e6da4 100%); - background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#2e6da4)); - background-image: linear-gradient(to bottom, #337ab7 0%, #2e6da4 100%); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0); - background-repeat: repeat-x; -} -.navbar-default { - background-image: -webkit-linear-gradient(top, #fff 0%, #f8f8f8 100%); - background-image: -o-linear-gradient(top, #fff 0%, #f8f8f8 100%); - background-image: -webkit-gradient(linear, left top, left bottom, from(#fff), to(#f8f8f8)); - background-image: linear-gradient(to bottom, #fff 0%, #f8f8f8 100%); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff8f8f8', GradientType=0); - filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); - background-repeat: repeat-x; - border-radius: 4px; - -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 5px rgba(0, 0, 0, .075); - box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 5px rgba(0, 0, 0, .075); -} -.navbar-default .navbar-nav > .open > a, -.navbar-default .navbar-nav > .active > a { - background-image: -webkit-linear-gradient(top, #dbdbdb 0%, #e2e2e2 100%); - background-image: -o-linear-gradient(top, #dbdbdb 0%, #e2e2e2 100%); - background-image: -webkit-gradient(linear, left top, left bottom, from(#dbdbdb), to(#e2e2e2)); - background-image: linear-gradient(to bottom, #dbdbdb 0%, #e2e2e2 100%); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdbdbdb', endColorstr='#ffe2e2e2', GradientType=0); - background-repeat: repeat-x; - -webkit-box-shadow: inset 0 3px 9px rgba(0, 0, 0, .075); - box-shadow: inset 0 3px 9px rgba(0, 0, 0, .075); -} -.navbar-brand, -.navbar-nav > li > a { - text-shadow: 0 1px 0 rgba(255, 255, 255, .25); -} -.navbar-inverse { - background-image: -webkit-linear-gradient(top, #3c3c3c 0%, #222 100%); - background-image: -o-linear-gradient(top, #3c3c3c 0%, #222 100%); - background-image: -webkit-gradient(linear, left top, left bottom, from(#3c3c3c), to(#222)); - background-image: linear-gradient(to bottom, #3c3c3c 0%, #222 100%); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff3c3c3c', endColorstr='#ff222222', GradientType=0); - filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); - background-repeat: repeat-x; -} -.navbar-inverse .navbar-nav > .open > a, -.navbar-inverse .navbar-nav > .active > a { - background-image: -webkit-linear-gradient(top, #080808 0%, #0f0f0f 100%); - background-image: -o-linear-gradient(top, #080808 0%, #0f0f0f 100%); - background-image: -webkit-gradient(linear, left top, left bottom, from(#080808), to(#0f0f0f)); - background-image: linear-gradient(to bottom, #080808 0%, #0f0f0f 100%); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff080808', endColorstr='#ff0f0f0f', GradientType=0); - background-repeat: repeat-x; - -webkit-box-shadow: inset 0 3px 9px rgba(0, 0, 0, .25); - box-shadow: inset 0 3px 9px rgba(0, 0, 0, .25); -} -.navbar-inverse .navbar-brand, -.navbar-inverse .navbar-nav > li > a { - text-shadow: 0 -1px 0 rgba(0, 0, 0, .25); -} -.navbar-static-top, -.navbar-fixed-top, -.navbar-fixed-bottom { - border-radius: 0; -} -@media (max-width: 767px) { - .navbar .navbar-nav .open .dropdown-menu > .active > a, - .navbar .navbar-nav .open .dropdown-menu > .active > a:hover, - .navbar .navbar-nav .open .dropdown-menu > .active > a:focus { - color: #fff; - background-image: -webkit-linear-gradient(top, #337ab7 0%, #2e6da4 100%); - background-image: -o-linear-gradient(top, #337ab7 0%, #2e6da4 100%); - background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#2e6da4)); - background-image: linear-gradient(to bottom, #337ab7 0%, #2e6da4 100%); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0); - background-repeat: repeat-x; - } -} -.alert { - text-shadow: 0 1px 0 rgba(255, 255, 255, .2); - -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 1px 2px rgba(0, 0, 0, .05); - box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 1px 2px rgba(0, 0, 0, .05); -} -.alert-success { - background-image: -webkit-linear-gradient(top, #dff0d8 0%, #c8e5bc 100%); - background-image: -o-linear-gradient(top, #dff0d8 0%, #c8e5bc 100%); - background-image: -webkit-gradient(linear, left top, left bottom, from(#dff0d8), to(#c8e5bc)); - background-image: linear-gradient(to bottom, #dff0d8 0%, #c8e5bc 100%); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffc8e5bc', GradientType=0); - background-repeat: repeat-x; - border-color: #b2dba1; -} -.alert-info { - background-image: -webkit-linear-gradient(top, #d9edf7 0%, #b9def0 100%); - background-image: -o-linear-gradient(top, #d9edf7 0%, #b9def0 100%); - background-image: -webkit-gradient(linear, left top, left bottom, from(#d9edf7), to(#b9def0)); - background-image: linear-gradient(to bottom, #d9edf7 0%, #b9def0 100%); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffb9def0', GradientType=0); - background-repeat: repeat-x; - border-color: #9acfea; -} -.alert-warning { - background-image: -webkit-linear-gradient(top, #fcf8e3 0%, #f8efc0 100%); - background-image: -o-linear-gradient(top, #fcf8e3 0%, #f8efc0 100%); - background-image: -webkit-gradient(linear, left top, left bottom, from(#fcf8e3), to(#f8efc0)); - background-image: linear-gradient(to bottom, #fcf8e3 0%, #f8efc0 100%); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fff8efc0', GradientType=0); - background-repeat: repeat-x; - border-color: #f5e79e; -} -.alert-danger { - background-image: -webkit-linear-gradient(top, #f2dede 0%, #e7c3c3 100%); - background-image: -o-linear-gradient(top, #f2dede 0%, #e7c3c3 100%); - background-image: -webkit-gradient(linear, left top, left bottom, from(#f2dede), to(#e7c3c3)); - background-image: linear-gradient(to bottom, #f2dede 0%, #e7c3c3 100%); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffe7c3c3', GradientType=0); - background-repeat: repeat-x; - border-color: #dca7a7; -} -.progress { - background-image: -webkit-linear-gradient(top, #ebebeb 0%, #f5f5f5 100%); - background-image: -o-linear-gradient(top, #ebebeb 0%, #f5f5f5 100%); - background-image: -webkit-gradient(linear, left top, left bottom, from(#ebebeb), to(#f5f5f5)); - background-image: linear-gradient(to bottom, #ebebeb 0%, #f5f5f5 100%); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffebebeb', endColorstr='#fff5f5f5', GradientType=0); - background-repeat: repeat-x; -} -.progress-bar { - background-image: -webkit-linear-gradient(top, #337ab7 0%, #286090 100%); - background-image: -o-linear-gradient(top, #337ab7 0%, #286090 100%); - background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#286090)); - background-image: linear-gradient(to bottom, #337ab7 0%, #286090 100%); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff286090', GradientType=0); - background-repeat: repeat-x; -} -.progress-bar-success { - background-image: -webkit-linear-gradient(top, #5cb85c 0%, #449d44 100%); - background-image: -o-linear-gradient(top, #5cb85c 0%, #449d44 100%); - background-image: -webkit-gradient(linear, left top, left bottom, from(#5cb85c), to(#449d44)); - background-image: linear-gradient(to bottom, #5cb85c 0%, #449d44 100%); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff449d44', GradientType=0); - background-repeat: repeat-x; -} -.progress-bar-info { - background-image: -webkit-linear-gradient(top, #5bc0de 0%, #31b0d5 100%); - background-image: -o-linear-gradient(top, #5bc0de 0%, #31b0d5 100%); - background-image: -webkit-gradient(linear, left top, left bottom, from(#5bc0de), to(#31b0d5)); - background-image: linear-gradient(to bottom, #5bc0de 0%, #31b0d5 100%); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff31b0d5', GradientType=0); - background-repeat: repeat-x; -} -.progress-bar-warning { - background-image: -webkit-linear-gradient(top, #f0ad4e 0%, #ec971f 100%); - background-image: -o-linear-gradient(top, #f0ad4e 0%, #ec971f 100%); - background-image: -webkit-gradient(linear, left top, left bottom, from(#f0ad4e), to(#ec971f)); - background-image: linear-gradient(to bottom, #f0ad4e 0%, #ec971f 100%); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffec971f', GradientType=0); - background-repeat: repeat-x; -} -.progress-bar-danger { - background-image: -webkit-linear-gradient(top, #d9534f 0%, #c9302c 100%); - background-image: -o-linear-gradient(top, #d9534f 0%, #c9302c 100%); - background-image: -webkit-gradient(linear, left top, left bottom, from(#d9534f), to(#c9302c)); - background-image: linear-gradient(to bottom, #d9534f 0%, #c9302c 100%); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc9302c', GradientType=0); - background-repeat: repeat-x; -} -.progress-bar-striped { - background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); - background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); - background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); -} -.list-group { - border-radius: 4px; - -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .075); - box-shadow: 0 1px 2px rgba(0, 0, 0, .075); -} -.list-group-item.active, -.list-group-item.active:hover, -.list-group-item.active:focus { - text-shadow: 0 -1px 0 #286090; - background-image: -webkit-linear-gradient(top, #337ab7 0%, #2b669a 100%); - background-image: -o-linear-gradient(top, #337ab7 0%, #2b669a 100%); - background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#2b669a)); - background-image: linear-gradient(to bottom, #337ab7 0%, #2b669a 100%); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2b669a', GradientType=0); - background-repeat: repeat-x; - border-color: #2b669a; -} -.list-group-item.active .badge, -.list-group-item.active:hover .badge, -.list-group-item.active:focus .badge { - text-shadow: none; -} -.panel { - -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .05); - box-shadow: 0 1px 2px rgba(0, 0, 0, .05); -} -.panel-default > .panel-heading { - background-image: -webkit-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%); - background-image: -o-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%); - background-image: -webkit-gradient(linear, left top, left bottom, from(#f5f5f5), to(#e8e8e8)); - background-image: linear-gradient(to bottom, #f5f5f5 0%, #e8e8e8 100%); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0); - background-repeat: repeat-x; -} -.panel-primary > .panel-heading { - background-image: -webkit-linear-gradient(top, #337ab7 0%, #2e6da4 100%); - background-image: -o-linear-gradient(top, #337ab7 0%, #2e6da4 100%); - background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#2e6da4)); - background-image: linear-gradient(to bottom, #337ab7 0%, #2e6da4 100%); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0); - background-repeat: repeat-x; -} -.panel-success > .panel-heading { - background-image: -webkit-linear-gradient(top, #dff0d8 0%, #d0e9c6 100%); - background-image: -o-linear-gradient(top, #dff0d8 0%, #d0e9c6 100%); - background-image: -webkit-gradient(linear, left top, left bottom, from(#dff0d8), to(#d0e9c6)); - background-image: linear-gradient(to bottom, #dff0d8 0%, #d0e9c6 100%); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffd0e9c6', GradientType=0); - background-repeat: repeat-x; -} -.panel-info > .panel-heading { - background-image: -webkit-linear-gradient(top, #d9edf7 0%, #c4e3f3 100%); - background-image: -o-linear-gradient(top, #d9edf7 0%, #c4e3f3 100%); - background-image: -webkit-gradient(linear, left top, left bottom, from(#d9edf7), to(#c4e3f3)); - background-image: linear-gradient(to bottom, #d9edf7 0%, #c4e3f3 100%); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffc4e3f3', GradientType=0); - background-repeat: repeat-x; -} -.panel-warning > .panel-heading { - background-image: -webkit-linear-gradient(top, #fcf8e3 0%, #faf2cc 100%); - background-image: -o-linear-gradient(top, #fcf8e3 0%, #faf2cc 100%); - background-image: -webkit-gradient(linear, left top, left bottom, from(#fcf8e3), to(#faf2cc)); - background-image: linear-gradient(to bottom, #fcf8e3 0%, #faf2cc 100%); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fffaf2cc', GradientType=0); - background-repeat: repeat-x; -} -.panel-danger > .panel-heading { - background-image: -webkit-linear-gradient(top, #f2dede 0%, #ebcccc 100%); - background-image: -o-linear-gradient(top, #f2dede 0%, #ebcccc 100%); - background-image: -webkit-gradient(linear, left top, left bottom, from(#f2dede), to(#ebcccc)); - background-image: linear-gradient(to bottom, #f2dede 0%, #ebcccc 100%); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffebcccc', GradientType=0); - background-repeat: repeat-x; -} -.well { - background-image: -webkit-linear-gradient(top, #e8e8e8 0%, #f5f5f5 100%); - background-image: -o-linear-gradient(top, #e8e8e8 0%, #f5f5f5 100%); - background-image: -webkit-gradient(linear, left top, left bottom, from(#e8e8e8), to(#f5f5f5)); - background-image: linear-gradient(to bottom, #e8e8e8 0%, #f5f5f5 100%); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe8e8e8', endColorstr='#fff5f5f5', GradientType=0); - background-repeat: repeat-x; - border-color: #dcdcdc; - -webkit-box-shadow: inset 0 1px 3px rgba(0, 0, 0, .05), 0 1px 0 rgba(255, 255, 255, .1); - box-shadow: inset 0 1px 3px rgba(0, 0, 0, .05), 0 1px 0 rgba(255, 255, 255, .1); -} -/*# sourceMappingURL=bootstrap-theme.css.map */ diff --git a/node_modules/vis-network/docs/css/bootstrap-theme.css.map b/node_modules/vis-network/docs/css/bootstrap-theme.css.map deleted file mode 100644 index 016a8dabc448d83afc1bd12818684a5e1e2434ee..0000000000000000000000000000000000000000 --- a/node_modules/vis-network/docs/css/bootstrap-theme.css.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["less/theme.less","less/mixins/vendor-prefixes.less","bootstrap-theme.css","less/mixins/gradients.less","less/mixins/reset-filter.less"],"names":[],"mappings":"AAcA;;;;;;EAME,0CAAA;ECgDA,6FAAA;EACQ,qFAAA;EC5DT;AFgBC;;;;;;;;;;;;EC2CA,0DAAA;EACQ,kDAAA;EC7CT;AFVD;;;;;;EAiBI,mBAAA;EECH;AFgCC;;EAEE,wBAAA;EE9BH;AFmCD;EGlDI,0EAAA;EACA,qEAAA;EACA,+FAAA;EAAA,wEAAA;EAEA,wHAAA;ECnBF,qEAAA;EJiCA,6BAAA;EACA,uBAAA;EA+B2C,2BAAA;EAA2B,oBAAA;EExBvE;AFLC;;EAEE,2BAAA;EACA,8BAAA;EEOH;AFJC;;EAEE,2BAAA;EACA,uBAAA;EEMH;AFHC;;EAEE,2BAAA;EACA,wBAAA;EEKH;AFUD;EGnDI,0EAAA;EACA,qEAAA;EACA,+FAAA;EAAA,wEAAA;EAEA,wHAAA;ECnBF,qEAAA;EJiCA,6BAAA;EACA,uBAAA;EE+BD;AF7BC;;EAEE,2BAAA;EACA,8BAAA;EE+BH;AF5BC;;EAEE,2BAAA;EACA,uBAAA;EE8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AA;EACA,wHAAA;EDqYH;AF3JD;EG9OI,0EAAA;EACA,qEAAA;EACA,+FAAA;EAAA,wEAAA;EACA,6BAAA;EACA,wHAAA;ED4YH;AF3JD;EGrPI,0EAAA;EACA,qEAAA;EACA,+FAAA;EAAA,wEAAA;EACA,6BAAA;EACA,wHAAA;EHmPF,uBAAA;ECxMA,2FAAA;EACQ,mFAAA;EC0WT","file":"bootstrap-theme.css","sourcesContent":["\n//\n// Load core variables and mixins\n// --------------------------------------------------\n\n@import \"variables.less\";\n@import \"mixins.less\";\n\n\n//\n// Buttons\n// --------------------------------------------------\n\n// Common styles\n.btn-default,\n.btn-primary,\n.btn-success,\n.btn-info,\n.btn-warning,\n.btn-danger {\n text-shadow: 0 -1px 0 rgba(0,0,0,.2);\n @shadow: inset 0 1px 0 rgba(255,255,255,.15), 0 1px 1px rgba(0,0,0,.075);\n .box-shadow(@shadow);\n\n // Reset the shadow\n &:active,\n &.active {\n .box-shadow(inset 0 3px 5px rgba(0,0,0,.125));\n }\n\n .badge {\n text-shadow: none;\n }\n}\n\n// Mixin for generating new styles\n.btn-styles(@btn-color: #555) {\n #gradient > .vertical(@start-color: @btn-color; @end-color: darken(@btn-color, 12%));\n .reset-filter(); // Disable gradients for IE9 because filter bleeds through rounded corners\n background-repeat: repeat-x;\n border-color: darken(@btn-color, 14%);\n\n &:hover,\n &:focus {\n background-color: darken(@btn-color, 12%);\n background-position: 0 -15px;\n }\n\n &:active,\n &.active {\n background-color: darken(@btn-color, 12%);\n border-color: darken(@btn-color, 14%);\n }\n\n &:disabled,\n &[disabled] {\n background-color: darken(@btn-color, 12%);\n background-image: none;\n }\n}\n\n// Common styles\n.btn {\n // Remove the gradient for the pressed/active state\n &:active,\n &.active {\n background-image: none;\n }\n}\n\n// Apply the mixin to the buttons\n.btn-default { .btn-styles(@btn-default-bg); text-shadow: 0 1px 0 #fff; border-color: #ccc; }\n.btn-primary { .btn-styles(@btn-primary-bg); }\n.btn-success { .btn-styles(@btn-success-bg); }\n.btn-info { .btn-styles(@btn-info-bg); }\n.btn-warning { .btn-styles(@btn-warning-bg); }\n.btn-danger { .btn-styles(@btn-danger-bg); }\n\n\n//\n// Images\n// --------------------------------------------------\n\n.thumbnail,\n.img-thumbnail {\n .box-shadow(0 1px 2px rgba(0,0,0,.075));\n}\n\n\n//\n// Dropdowns\n// --------------------------------------------------\n\n.dropdown-menu > li > a:hover,\n.dropdown-menu > li > a:focus {\n #gradient > .vertical(@start-color: @dropdown-link-hover-bg; @end-color: darken(@dropdown-link-hover-bg, 5%));\n background-color: darken(@dropdown-link-hover-bg, 5%);\n}\n.dropdown-menu > .active > a,\n.dropdown-menu > .active > a:hover,\n.dropdown-menu > .active > a:focus {\n #gradient > .vertical(@start-color: @dropdown-link-active-bg; @end-color: darken(@dropdown-link-active-bg, 5%));\n background-color: darken(@dropdown-link-active-bg, 5%);\n}\n\n\n//\n// Navbar\n// --------------------------------------------------\n\n// Default navbar\n.navbar-default {\n #gradient > .vertical(@start-color: lighten(@navbar-default-bg, 10%); @end-color: @navbar-default-bg);\n .reset-filter(); // Remove gradient in IE<10 to fix bug where dropdowns don't get triggered\n border-radius: @navbar-border-radius;\n @shadow: inset 0 1px 0 rgba(255,255,255,.15), 0 1px 5px rgba(0,0,0,.075);\n .box-shadow(@shadow);\n\n .navbar-nav > .open > a,\n .navbar-nav > .active > a {\n #gradient > .vertical(@start-color: darken(@navbar-default-link-active-bg, 5%); @end-color: darken(@navbar-default-link-active-bg, 2%));\n .box-shadow(inset 0 3px 9px rgba(0,0,0,.075));\n }\n}\n.navbar-brand,\n.navbar-nav > li > a {\n text-shadow: 0 1px 0 rgba(255,255,255,.25);\n}\n\n// Inverted navbar\n.navbar-inverse {\n #gradient > .vertical(@start-color: lighten(@navbar-inverse-bg, 10%); @end-color: @navbar-inverse-bg);\n .reset-filter(); // Remove gradient in IE<10 to fix bug where dropdowns don't get triggered\n\n .navbar-nav > .open > a,\n .navbar-nav > .active > a {\n #gradient > .vertical(@start-color: @navbar-inverse-link-active-bg; @end-color: lighten(@navbar-inverse-link-active-bg, 2.5%));\n .box-shadow(inset 0 3px 9px rgba(0,0,0,.25));\n }\n\n .navbar-brand,\n .navbar-nav > li > a {\n text-shadow: 0 -1px 0 rgba(0,0,0,.25);\n }\n}\n\n// Undo rounded corners in static and fixed navbars\n.navbar-static-top,\n.navbar-fixed-top,\n.navbar-fixed-bottom {\n border-radius: 0;\n}\n\n// Fix active state of dropdown items in collapsed mode\n@media (max-width: @grid-float-breakpoint-max) {\n .navbar .navbar-nav .open .dropdown-menu > .active > a {\n &,\n &:hover,\n &:focus {\n color: #fff;\n #gradient > .vertical(@start-color: @dropdown-link-active-bg; @end-color: darken(@dropdown-link-active-bg, 5%));\n }\n }\n}\n\n\n//\n// Alerts\n// --------------------------------------------------\n\n// Common styles\n.alert {\n text-shadow: 0 1px 0 rgba(255,255,255,.2);\n @shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 1px 2px rgba(0,0,0,.05);\n .box-shadow(@shadow);\n}\n\n// Mixin for generating new styles\n.alert-styles(@color) {\n #gradient > .vertical(@start-color: @color; @end-color: darken(@color, 7.5%));\n border-color: darken(@color, 15%);\n}\n\n// Apply the mixin to the alerts\n.alert-success { .alert-styles(@alert-success-bg); }\n.alert-info { .alert-styles(@alert-info-bg); }\n.alert-warning { .alert-styles(@alert-warning-bg); }\n.alert-danger { .alert-styles(@alert-danger-bg); }\n\n\n//\n// Progress bars\n// --------------------------------------------------\n\n// Give the progress background some depth\n.progress {\n #gradient > .vertical(@start-color: darken(@progress-bg, 4%); @end-color: @progress-bg)\n}\n\n// Mixin for generating new styles\n.progress-bar-styles(@color) {\n #gradient > .vertical(@start-color: @color; @end-color: darken(@color, 10%));\n}\n\n// Apply the mixin to the progress bars\n.progress-bar { .progress-bar-styles(@progress-bar-bg); }\n.progress-bar-success { .progress-bar-styles(@progress-bar-success-bg); }\n.progress-bar-info { .progress-bar-styles(@progress-bar-info-bg); }\n.progress-bar-warning { .progress-bar-styles(@progress-bar-warning-bg); }\n.progress-bar-danger { .progress-bar-styles(@progress-bar-danger-bg); }\n\n// Reset the striped class because our mixins don't do multiple gradients and\n// the above custom styles override the new `.progress-bar-striped` in v3.2.0.\n.progress-bar-striped {\n #gradient > .striped();\n}\n\n\n//\n// List groups\n// --------------------------------------------------\n\n.list-group {\n border-radius: @border-radius-base;\n .box-shadow(0 1px 2px rgba(0,0,0,.075));\n}\n.list-group-item.active,\n.list-group-item.active:hover,\n.list-group-item.active:focus {\n text-shadow: 0 -1px 0 darken(@list-group-active-bg, 10%);\n #gradient > .vertical(@start-color: @list-group-active-bg; @end-color: darken(@list-group-active-bg, 7.5%));\n border-color: darken(@list-group-active-border, 7.5%);\n\n .badge {\n text-shadow: none;\n }\n}\n\n\n//\n// Panels\n// --------------------------------------------------\n\n// Common styles\n.panel {\n .box-shadow(0 1px 2px rgba(0,0,0,.05));\n}\n\n// Mixin for generating new styles\n.panel-heading-styles(@color) {\n #gradient > .vertical(@start-color: @color; @end-color: darken(@color, 5%));\n}\n\n// Apply the mixin to the panel headings only\n.panel-default > .panel-heading { .panel-heading-styles(@panel-default-heading-bg); }\n.panel-primary > .panel-heading { .panel-heading-styles(@panel-primary-heading-bg); }\n.panel-success > .panel-heading { .panel-heading-styles(@panel-success-heading-bg); }\n.panel-info > .panel-heading { .panel-heading-styles(@panel-info-heading-bg); }\n.panel-warning > .panel-heading { .panel-heading-styles(@panel-warning-heading-bg); }\n.panel-danger > .panel-heading { .panel-heading-styles(@panel-danger-heading-bg); }\n\n\n//\n// Wells\n// --------------------------------------------------\n\n.well {\n #gradient > .vertical(@start-color: darken(@well-bg, 5%); @end-color: @well-bg);\n border-color: darken(@well-bg, 10%);\n @shadow: inset 0 1px 3px rgba(0,0,0,.05), 0 1px 0 rgba(255,255,255,.1);\n .box-shadow(@shadow);\n}\n","// Vendor Prefixes\n//\n// All vendor mixins are deprecated as of v3.2.0 due to the introduction of\n// Autoprefixer in our Gruntfile. They will be removed in v4.\n\n// - Animations\n// - Backface visibility\n// - Box shadow\n// - Box sizing\n// - Content columns\n// - Hyphens\n// - Placeholder text\n// - Transformations\n// - Transitions\n// - User Select\n\n\n// Animations\n.animation(@animation) {\n -webkit-animation: @animation;\n -o-animation: @animation;\n animation: @animation;\n}\n.animation-name(@name) {\n -webkit-animation-name: @name;\n animation-name: @name;\n}\n.animation-duration(@duration) {\n -webkit-animation-duration: @duration;\n animation-duration: @duration;\n}\n.animation-timing-function(@timing-function) {\n -webkit-animation-timing-function: @timing-function;\n animation-timing-function: @timing-function;\n}\n.animation-delay(@delay) {\n -webkit-animation-delay: @delay;\n animation-delay: @delay;\n}\n.animation-iteration-count(@iteration-count) {\n -webkit-animation-iteration-count: @iteration-count;\n animation-iteration-count: @iteration-count;\n}\n.animation-direction(@direction) {\n -webkit-animation-direction: @direction;\n animation-direction: @direction;\n}\n.animation-fill-mode(@fill-mode) {\n -webkit-animation-fill-mode: @fill-mode;\n animation-fill-mode: @fill-mode;\n}\n\n// Backface visibility\n// Prevent browsers from flickering when using CSS 3D transforms.\n// Default value is `visible`, but can be changed to `hidden`\n\n.backface-visibility(@visibility){\n -webkit-backface-visibility: @visibility;\n -moz-backface-visibility: @visibility;\n backface-visibility: @visibility;\n}\n\n// Drop shadows\n//\n// Note: Deprecated `.box-shadow()` as of v3.1.0 since all of Bootstrap's\n// supported browsers that have box shadow capabilities now support it.\n\n.box-shadow(@shadow) {\n -webkit-box-shadow: @shadow; // iOS <4.3 & Android <4.1\n box-shadow: @shadow;\n}\n\n// Box sizing\n.box-sizing(@boxmodel) {\n -webkit-box-sizing: @boxmodel;\n -moz-box-sizing: @boxmodel;\n box-sizing: @boxmodel;\n}\n\n// CSS3 Content Columns\n.content-columns(@column-count; @column-gap: @grid-gutter-width) {\n -webkit-column-count: @column-count;\n -moz-column-count: @column-count;\n column-count: @column-count;\n -webkit-column-gap: @column-gap;\n -moz-column-gap: @column-gap;\n column-gap: @column-gap;\n}\n\n// Optional hyphenation\n.hyphens(@mode: auto) {\n word-wrap: break-word;\n -webkit-hyphens: @mode;\n -moz-hyphens: @mode;\n -ms-hyphens: @mode; // IE10+\n -o-hyphens: @mode;\n hyphens: @mode;\n}\n\n// Placeholder text\n.placeholder(@color: @input-color-placeholder) {\n // Firefox\n &::-moz-placeholder {\n color: @color;\n opacity: 1; // See https://github.com/twbs/bootstrap/pull/11526\n }\n &:-ms-input-placeholder { color: @color; } // Internet Explorer 10+\n &::-webkit-input-placeholder { color: @color; } // Safari and Chrome\n}\n\n// Transformations\n.scale(@ratio) {\n -webkit-transform: scale(@ratio);\n -ms-transform: scale(@ratio); // IE9 only\n -o-transform: scale(@ratio);\n transform: scale(@ratio);\n}\n.scale(@ratioX; @ratioY) {\n -webkit-transform: scale(@ratioX, @ratioY);\n -ms-transform: scale(@ratioX, @ratioY); // IE9 only\n -o-transform: scale(@ratioX, @ratioY);\n transform: scale(@ratioX, @ratioY);\n}\n.scaleX(@ratio) {\n -webkit-transform: scaleX(@ratio);\n -ms-transform: scaleX(@ratio); // IE9 only\n -o-transform: scaleX(@ratio);\n transform: scaleX(@ratio);\n}\n.scaleY(@ratio) {\n -webkit-transform: scaleY(@ratio);\n -ms-transform: scaleY(@ratio); // IE9 only\n -o-transform: scaleY(@ratio);\n transform: scaleY(@ratio);\n}\n.skew(@x; @y) {\n -webkit-transform: skewX(@x) skewY(@y);\n -ms-transform: skewX(@x) skewY(@y); // See https://github.com/twbs/bootstrap/issues/4885; IE9+\n -o-transform: skewX(@x) skewY(@y);\n transform: skewX(@x) skewY(@y);\n}\n.translate(@x; @y) {\n -webkit-transform: translate(@x, @y);\n -ms-transform: translate(@x, @y); // IE9 only\n -o-transform: translate(@x, @y);\n transform: translate(@x, @y);\n}\n.translate3d(@x; @y; @z) {\n -webkit-transform: translate3d(@x, @y, @z);\n transform: translate3d(@x, @y, @z);\n}\n.rotate(@degrees) {\n -webkit-transform: rotate(@degrees);\n -ms-transform: rotate(@degrees); // IE9 only\n -o-transform: rotate(@degrees);\n transform: rotate(@degrees);\n}\n.rotateX(@degrees) {\n -webkit-transform: rotateX(@degrees);\n -ms-transform: rotateX(@degrees); // IE9 only\n -o-transform: rotateX(@degrees);\n transform: rotateX(@degrees);\n}\n.rotateY(@degrees) {\n -webkit-transform: rotateY(@degrees);\n -ms-transform: rotateY(@degrees); // IE9 only\n -o-transform: rotateY(@degrees);\n transform: rotateY(@degrees);\n}\n.perspective(@perspective) {\n -webkit-perspective: @perspective;\n -moz-perspective: @perspective;\n perspective: @perspective;\n}\n.perspective-origin(@perspective) {\n -webkit-perspective-origin: @perspective;\n -moz-perspective-origin: @perspective;\n perspective-origin: @perspective;\n}\n.transform-origin(@origin) {\n -webkit-transform-origin: @origin;\n -moz-transform-origin: @origin;\n -ms-transform-origin: @origin; // IE9 only\n transform-origin: @origin;\n}\n\n\n// Transitions\n\n.transition(@transition) {\n -webkit-transition: @transition;\n -o-transition: @transition;\n transition: @transition;\n}\n.transition-property(@transition-property) {\n -webkit-transition-property: @transition-property;\n transition-property: @transition-property;\n}\n.transition-delay(@transition-delay) {\n -webkit-transition-delay: @transition-delay;\n transition-delay: @transition-delay;\n}\n.transition-duration(@transition-duration) {\n -webkit-transition-duration: @transition-duration;\n transition-duration: @transition-duration;\n}\n.transition-timing-function(@timing-function) {\n -webkit-transition-timing-function: @timing-function;\n transition-timing-function: @timing-function;\n}\n.transition-transform(@transition) {\n -webkit-transition: -webkit-transform @transition;\n -moz-transition: -moz-transform @transition;\n -o-transition: -o-transform @transition;\n transition: transform @transition;\n}\n\n\n// User select\n// For selecting text on the page\n\n.user-select(@select) {\n -webkit-user-select: @select;\n -moz-user-select: @select;\n -ms-user-select: @select; // IE10+\n user-select: @select;\n}\n",".btn-default,\n.btn-primary,\n.btn-success,\n.btn-info,\n.btn-warning,\n.btn-danger {\n text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.2);\n -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 1px rgba(0, 0, 0, 0.075);\n box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 1px rgba(0, 0, 0, 0.075);\n}\n.btn-default:active,\n.btn-primary:active,\n.btn-success:active,\n.btn-info:active,\n.btn-warning:active,\n.btn-danger:active,\n.btn-default.active,\n.btn-primary.active,\n.btn-success.active,\n.btn-info.active,\n.btn-warning.active,\n.btn-danger.active {\n -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);\n box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);\n}\n.btn-default .badge,\n.btn-primary .badge,\n.btn-success .badge,\n.btn-info .badge,\n.btn-warning .badge,\n.btn-danger .badge {\n text-shadow: none;\n}\n.btn:active,\n.btn.active {\n background-image: none;\n}\n.btn-default {\n background-image: -webkit-linear-gradient(top, #ffffff 0%, #e0e0e0 100%);\n background-image: -o-linear-gradient(top, #ffffff 0%, #e0e0e0 100%);\n background-image: linear-gradient(to bottom, #ffffff 0%, #e0e0e0 100%);\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe0e0e0', GradientType=0);\n filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n background-repeat: repeat-x;\n border-color: #dbdbdb;\n text-shadow: 0 1px 0 #fff;\n border-color: #ccc;\n}\n.btn-default:hover,\n.btn-default:focus {\n background-color: #e0e0e0;\n background-position: 0 -15px;\n}\n.btn-default:active,\n.btn-default.active {\n background-color: #e0e0e0;\n border-color: #dbdbdb;\n}\n.btn-default:disabled,\n.btn-default[disabled] {\n background-color: #e0e0e0;\n background-image: none;\n}\n.btn-primary {\n background-image: -webkit-linear-gradient(top, #337ab7 0%, #265a88 100%);\n background-image: -o-linear-gradient(top, #337ab7 0%, #265a88 100%);\n background-image: linear-gradient(to bottom, #337ab7 0%, #265a88 100%);\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff265a88', GradientType=0);\n filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n background-repeat: repeat-x;\n border-color: #245580;\n}\n.btn-primary:hover,\n.btn-primary:focus {\n background-color: #265a88;\n background-position: 0 -15px;\n}\n.btn-primary:active,\n.btn-primary.active {\n background-color: #265a88;\n border-color: #245580;\n}\n.btn-primary:disabled,\n.btn-primary[disabled] {\n background-color: #265a88;\n background-image: none;\n}\n.btn-success {\n background-image: -webkit-linear-gradient(top, #5cb85c 0%, #419641 100%);\n background-image: -o-linear-gradient(top, #5cb85c 0%, #419641 100%);\n background-image: linear-gradient(to bottom, #5cb85c 0%, #419641 100%);\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff419641', GradientType=0);\n filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n background-repeat: repeat-x;\n border-color: #3e8f3e;\n}\n.btn-success:hover,\n.btn-success:focus {\n background-color: #419641;\n background-position: 0 -15px;\n}\n.btn-success:active,\n.btn-success.active {\n background-color: #419641;\n border-color: #3e8f3e;\n}\n.btn-success:disabled,\n.btn-success[disabled] {\n background-color: #419641;\n background-image: none;\n}\n.btn-info {\n background-image: -webkit-linear-gradient(top, #5bc0de 0%, #2aabd2 100%);\n background-image: -o-linear-gradient(top, #5bc0de 0%, #2aabd2 100%);\n background-image: linear-gradient(to bottom, #5bc0de 0%, #2aabd2 100%);\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2aabd2', GradientType=0);\n filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n background-repeat: repeat-x;\n border-color: #28a4c9;\n}\n.btn-info:hover,\n.btn-info:focus {\n background-color: #2aabd2;\n background-position: 0 -15px;\n}\n.btn-info:active,\n.btn-info.active {\n background-color: #2aabd2;\n border-color: #28a4c9;\n}\n.btn-info:disabled,\n.btn-info[disabled] {\n background-color: #2aabd2;\n background-image: none;\n}\n.btn-warning {\n background-image: -webkit-linear-gradient(top, #f0ad4e 0%, #eb9316 100%);\n background-image: -o-linear-gradient(top, #f0ad4e 0%, #eb9316 100%);\n background-image: linear-gradient(to bottom, #f0ad4e 0%, #eb9316 100%);\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffeb9316', GradientType=0);\n filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n background-repeat: repeat-x;\n border-color: #e38d13;\n}\n.btn-warning:hover,\n.btn-warning:focus {\n background-color: #eb9316;\n background-position: 0 -15px;\n}\n.btn-warning:active,\n.btn-warning.active {\n background-color: #eb9316;\n border-color: #e38d13;\n}\n.btn-warning:disabled,\n.btn-warning[disabled] {\n background-color: #eb9316;\n background-image: none;\n}\n.btn-danger {\n background-image: -webkit-linear-gradient(top, #d9534f 0%, #c12e2a 100%);\n background-image: -o-linear-gradient(top, #d9534f 0%, #c12e2a 100%);\n background-image: linear-gradient(to bottom, #d9534f 0%, #c12e2a 100%);\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc12e2a', GradientType=0);\n filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n background-repeat: repeat-x;\n border-color: #b92c28;\n}\n.btn-danger:hover,\n.btn-danger:focus {\n background-color: #c12e2a;\n background-position: 0 -15px;\n}\n.btn-danger:active,\n.btn-danger.active {\n background-color: #c12e2a;\n border-color: #b92c28;\n}\n.btn-danger:disabled,\n.btn-danger[disabled] {\n background-color: #c12e2a;\n background-image: none;\n}\n.thumbnail,\n.img-thumbnail {\n -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.075);\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.075);\n}\n.dropdown-menu > li > a:hover,\n.dropdown-menu > li > a:focus {\n background-image: -webkit-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);\n background-image: -o-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);\n background-image: linear-gradient(to bottom, #f5f5f5 0%, #e8e8e8 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);\n background-color: #e8e8e8;\n}\n.dropdown-menu > .active > a,\n.dropdown-menu > .active > a:hover,\n.dropdown-menu > .active > a:focus {\n background-image: -webkit-linear-gradient(top, #337ab7 0%, #2e6da4 100%);\n background-image: -o-linear-gradient(top, #337ab7 0%, #2e6da4 100%);\n background-image: linear-gradient(to bottom, #337ab7 0%, #2e6da4 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);\n background-color: #2e6da4;\n}\n.navbar-default {\n background-image: -webkit-linear-gradient(top, #ffffff 0%, #f8f8f8 100%);\n background-image: -o-linear-gradient(top, #ffffff 0%, #f8f8f8 100%);\n background-image: linear-gradient(to bottom, #ffffff 0%, #f8f8f8 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff8f8f8', GradientType=0);\n filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n border-radius: 4px;\n -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 5px rgba(0, 0, 0, 0.075);\n box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 5px rgba(0, 0, 0, 0.075);\n}\n.navbar-default .navbar-nav > .open > a,\n.navbar-default .navbar-nav > .active > a {\n background-image: -webkit-linear-gradient(top, #dbdbdb 0%, #e2e2e2 100%);\n background-image: -o-linear-gradient(top, #dbdbdb 0%, #e2e2e2 100%);\n background-image: linear-gradient(to bottom, #dbdbdb 0%, #e2e2e2 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdbdbdb', endColorstr='#ffe2e2e2', GradientType=0);\n -webkit-box-shadow: inset 0 3px 9px rgba(0, 0, 0, 0.075);\n box-shadow: inset 0 3px 9px rgba(0, 0, 0, 0.075);\n}\n.navbar-brand,\n.navbar-nav > li > a {\n text-shadow: 0 1px 0 rgba(255, 255, 255, 0.25);\n}\n.navbar-inverse {\n background-image: -webkit-linear-gradient(top, #3c3c3c 0%, #222222 100%);\n background-image: -o-linear-gradient(top, #3c3c3c 0%, #222222 100%);\n background-image: linear-gradient(to bottom, #3c3c3c 0%, #222222 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff3c3c3c', endColorstr='#ff222222', GradientType=0);\n filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n}\n.navbar-inverse .navbar-nav > .open > a,\n.navbar-inverse .navbar-nav > .active > a {\n background-image: -webkit-linear-gradient(top, #080808 0%, #0f0f0f 100%);\n background-image: -o-linear-gradient(top, #080808 0%, #0f0f0f 100%);\n background-image: linear-gradient(to bottom, #080808 0%, #0f0f0f 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff080808', endColorstr='#ff0f0f0f', GradientType=0);\n -webkit-box-shadow: inset 0 3px 9px rgba(0, 0, 0, 0.25);\n box-shadow: inset 0 3px 9px rgba(0, 0, 0, 0.25);\n}\n.navbar-inverse .navbar-brand,\n.navbar-inverse .navbar-nav > li > a {\n text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);\n}\n.navbar-static-top,\n.navbar-fixed-top,\n.navbar-fixed-bottom {\n border-radius: 0;\n}\n@media (max-width: 767px) {\n .navbar .navbar-nav .open .dropdown-menu > .active > a,\n .navbar .navbar-nav .open .dropdown-menu > .active > a:hover,\n .navbar .navbar-nav .open .dropdown-menu > .active > a:focus {\n color: #fff;\n background-image: -webkit-linear-gradient(top, #337ab7 0%, #2e6da4 100%);\n background-image: -o-linear-gradient(top, #337ab7 0%, #2e6da4 100%);\n background-image: linear-gradient(to bottom, #337ab7 0%, #2e6da4 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);\n }\n}\n.alert {\n text-shadow: 0 1px 0 rgba(255, 255, 255, 0.2);\n -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 1px 2px rgba(0, 0, 0, 0.05);\n box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 1px 2px rgba(0, 0, 0, 0.05);\n}\n.alert-success {\n background-image: -webkit-linear-gradient(top, #dff0d8 0%, #c8e5bc 100%);\n background-image: -o-linear-gradient(top, #dff0d8 0%, #c8e5bc 100%);\n background-image: linear-gradient(to bottom, #dff0d8 0%, #c8e5bc 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffc8e5bc', GradientType=0);\n border-color: #b2dba1;\n}\n.alert-info {\n background-image: -webkit-linear-gradient(top, #d9edf7 0%, #b9def0 100%);\n background-image: -o-linear-gradient(top, #d9edf7 0%, #b9def0 100%);\n background-image: linear-gradient(to bottom, #d9edf7 0%, #b9def0 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffb9def0', GradientType=0);\n border-color: #9acfea;\n}\n.alert-warning {\n background-image: -webkit-linear-gradient(top, #fcf8e3 0%, #f8efc0 100%);\n background-image: -o-linear-gradient(top, #fcf8e3 0%, #f8efc0 100%);\n background-image: linear-gradient(to bottom, #fcf8e3 0%, #f8efc0 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fff8efc0', GradientType=0);\n border-color: #f5e79e;\n}\n.alert-danger {\n background-image: -webkit-linear-gradient(top, #f2dede 0%, #e7c3c3 100%);\n background-image: -o-linear-gradient(top, #f2dede 0%, #e7c3c3 100%);\n background-image: linear-gradient(to bottom, #f2dede 0%, #e7c3c3 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffe7c3c3', GradientType=0);\n border-color: #dca7a7;\n}\n.progress {\n background-image: -webkit-linear-gradient(top, #ebebeb 0%, #f5f5f5 100%);\n background-image: -o-linear-gradient(top, #ebebeb 0%, #f5f5f5 100%);\n background-image: linear-gradient(to bottom, #ebebeb 0%, #f5f5f5 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffebebeb', endColorstr='#fff5f5f5', GradientType=0);\n}\n.progress-bar {\n background-image: -webkit-linear-gradient(top, #337ab7 0%, #286090 100%);\n background-image: -o-linear-gradient(top, #337ab7 0%, #286090 100%);\n background-image: linear-gradient(to bottom, #337ab7 0%, #286090 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff286090', GradientType=0);\n}\n.progress-bar-success {\n background-image: -webkit-linear-gradient(top, #5cb85c 0%, #449d44 100%);\n background-image: -o-linear-gradient(top, #5cb85c 0%, #449d44 100%);\n background-image: linear-gradient(to bottom, #5cb85c 0%, #449d44 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff449d44', GradientType=0);\n}\n.progress-bar-info {\n background-image: -webkit-linear-gradient(top, #5bc0de 0%, #31b0d5 100%);\n background-image: -o-linear-gradient(top, #5bc0de 0%, #31b0d5 100%);\n background-image: linear-gradient(to bottom, #5bc0de 0%, #31b0d5 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff31b0d5', GradientType=0);\n}\n.progress-bar-warning {\n background-image: -webkit-linear-gradient(top, #f0ad4e 0%, #ec971f 100%);\n background-image: -o-linear-gradient(top, #f0ad4e 0%, #ec971f 100%);\n background-image: linear-gradient(to bottom, #f0ad4e 0%, #ec971f 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffec971f', GradientType=0);\n}\n.progress-bar-danger {\n background-image: -webkit-linear-gradient(top, #d9534f 0%, #c9302c 100%);\n background-image: -o-linear-gradient(top, #d9534f 0%, #c9302c 100%);\n background-image: linear-gradient(to bottom, #d9534f 0%, #c9302c 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc9302c', GradientType=0);\n}\n.progress-bar-striped {\n background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n}\n.list-group {\n border-radius: 4px;\n -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.075);\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.075);\n}\n.list-group-item.active,\n.list-group-item.active:hover,\n.list-group-item.active:focus {\n text-shadow: 0 -1px 0 #286090;\n background-image: -webkit-linear-gradient(top, #337ab7 0%, #2b669a 100%);\n background-image: -o-linear-gradient(top, #337ab7 0%, #2b669a 100%);\n background-image: linear-gradient(to bottom, #337ab7 0%, #2b669a 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2b669a', GradientType=0);\n border-color: #2b669a;\n}\n.list-group-item.active .badge,\n.list-group-item.active:hover .badge,\n.list-group-item.active:focus .badge {\n text-shadow: none;\n}\n.panel {\n -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);\n}\n.panel-default > .panel-heading {\n background-image: -webkit-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);\n background-image: -o-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);\n background-image: linear-gradient(to bottom, #f5f5f5 0%, #e8e8e8 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);\n}\n.panel-primary > .panel-heading {\n background-image: -webkit-linear-gradient(top, #337ab7 0%, #2e6da4 100%);\n background-image: -o-linear-gradient(top, #337ab7 0%, #2e6da4 100%);\n background-image: linear-gradient(to bottom, #337ab7 0%, #2e6da4 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);\n}\n.panel-success > .panel-heading {\n background-image: -webkit-linear-gradient(top, #dff0d8 0%, #d0e9c6 100%);\n background-image: -o-linear-gradient(top, #dff0d8 0%, #d0e9c6 100%);\n background-image: linear-gradient(to bottom, #dff0d8 0%, #d0e9c6 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffd0e9c6', GradientType=0);\n}\n.panel-info > .panel-heading {\n background-image: -webkit-linear-gradient(top, #d9edf7 0%, #c4e3f3 100%);\n background-image: -o-linear-gradient(top, #d9edf7 0%, #c4e3f3 100%);\n background-image: linear-gradient(to bottom, #d9edf7 0%, #c4e3f3 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffc4e3f3', GradientType=0);\n}\n.panel-warning > .panel-heading {\n background-image: -webkit-linear-gradient(top, #fcf8e3 0%, #faf2cc 100%);\n background-image: -o-linear-gradient(top, #fcf8e3 0%, #faf2cc 100%);\n background-image: linear-gradient(to bottom, #fcf8e3 0%, #faf2cc 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fffaf2cc', GradientType=0);\n}\n.panel-danger > .panel-heading {\n background-image: -webkit-linear-gradient(top, #f2dede 0%, #ebcccc 100%);\n background-image: -o-linear-gradient(top, #f2dede 0%, #ebcccc 100%);\n background-image: linear-gradient(to bottom, #f2dede 0%, #ebcccc 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffebcccc', GradientType=0);\n}\n.well {\n background-image: -webkit-linear-gradient(top, #e8e8e8 0%, #f5f5f5 100%);\n background-image: -o-linear-gradient(top, #e8e8e8 0%, #f5f5f5 100%);\n background-image: linear-gradient(to bottom, #e8e8e8 0%, #f5f5f5 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe8e8e8', endColorstr='#fff5f5f5', GradientType=0);\n border-color: #dcdcdc;\n -webkit-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 0 rgba(255, 255, 255, 0.1);\n box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 0 rgba(255, 255, 255, 0.1);\n}\n/*# sourceMappingURL=bootstrap-theme.css.map */","// Gradients\n\n#gradient {\n\n // Horizontal gradient, from left to right\n //\n // Creates two color stops, start and end, by specifying a color and position for each color stop.\n // Color stops are not available in IE9 and below.\n .horizontal(@start-color: #555; @end-color: #333; @start-percent: 0%; @end-percent: 100%) {\n background-image: -webkit-linear-gradient(left, @start-color @start-percent, @end-color @end-percent); // Safari 5.1-6, Chrome 10+\n background-image: -o-linear-gradient(left, @start-color @start-percent, @end-color @end-percent); // Opera 12\n background-image: linear-gradient(to right, @start-color @start-percent, @end-color @end-percent); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+\n background-repeat: repeat-x;\n filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)\",argb(@start-color),argb(@end-color))); // IE9 and down\n }\n\n // Vertical gradient, from top to bottom\n //\n // Creates two color stops, start and end, by specifying a color and position for each color stop.\n // Color stops are not available in IE9 and below.\n .vertical(@start-color: #555; @end-color: #333; @start-percent: 0%; @end-percent: 100%) {\n background-image: -webkit-linear-gradient(top, @start-color @start-percent, @end-color @end-percent); // Safari 5.1-6, Chrome 10+\n background-image: -o-linear-gradient(top, @start-color @start-percent, @end-color @end-percent); // Opera 12\n background-image: linear-gradient(to bottom, @start-color @start-percent, @end-color @end-percent); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+\n background-repeat: repeat-x;\n filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)\",argb(@start-color),argb(@end-color))); // IE9 and down\n }\n\n .directional(@start-color: #555; @end-color: #333; @deg: 45deg) {\n background-repeat: repeat-x;\n background-image: -webkit-linear-gradient(@deg, @start-color, @end-color); // Safari 5.1-6, Chrome 10+\n background-image: -o-linear-gradient(@deg, @start-color, @end-color); // Opera 12\n background-image: linear-gradient(@deg, @start-color, @end-color); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+\n }\n .horizontal-three-colors(@start-color: #00b3ee; @mid-color: #7a43b6; @color-stop: 50%; @end-color: #c3325f) {\n background-image: -webkit-linear-gradient(left, @start-color, @mid-color @color-stop, @end-color);\n background-image: -o-linear-gradient(left, @start-color, @mid-color @color-stop, @end-color);\n background-image: linear-gradient(to right, @start-color, @mid-color @color-stop, @end-color);\n background-repeat: no-repeat;\n filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)\",argb(@start-color),argb(@end-color))); // IE9 and down, gets no color-stop at all for proper fallback\n }\n .vertical-three-colors(@start-color: #00b3ee; @mid-color: #7a43b6; @color-stop: 50%; @end-color: #c3325f) {\n background-image: -webkit-linear-gradient(@start-color, @mid-color @color-stop, @end-color);\n background-image: -o-linear-gradient(@start-color, @mid-color @color-stop, @end-color);\n background-image: linear-gradient(@start-color, @mid-color @color-stop, @end-color);\n background-repeat: no-repeat;\n filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)\",argb(@start-color),argb(@end-color))); // IE9 and down, gets no color-stop at all for proper fallback\n }\n .radial(@inner-color: #555; @outer-color: #333) {\n background-image: -webkit-radial-gradient(circle, @inner-color, @outer-color);\n background-image: radial-gradient(circle, @inner-color, @outer-color);\n background-repeat: no-repeat;\n }\n .striped(@color: rgba(255,255,255,.15); @angle: 45deg) {\n background-image: -webkit-linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent);\n background-image: -o-linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent);\n background-image: linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent);\n }\n}\n","// Reset filters for IE\n//\n// When you need to remove a gradient background, do not forget to use this to reset\n// the IE filter for IE9 and below.\n\n.reset-filter() {\n filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(enabled = false)\"));\n}\n"]} \ No newline at end of file diff --git a/node_modules/vis-network/docs/css/bootstrap-theme.min.css b/node_modules/vis-network/docs/css/bootstrap-theme.min.css deleted file mode 100644 index 4c3e7bad7c7eb6eadf7eccad91ed4ec39a7ab958..0000000000000000000000000000000000000000 --- a/node_modules/vis-network/docs/css/bootstrap-theme.min.css +++ /dev/null @@ -1,5 +0,0 @@ -/*! - * Bootstrap v3.3.1 (http://getbootstrap.com) - * Copyright 2011-2014 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - */.btn-default,.btn-primary,.btn-success,.btn-info,.btn-warning,.btn-danger{text-shadow:0 -1px 0 rgba(0,0,0,.2);-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 1px rgba(0,0,0,.075)}.btn-default:active,.btn-primary:active,.btn-success:active,.btn-info:active,.btn-warning:active,.btn-danger:active,.btn-default.active,.btn-primary.active,.btn-success.active,.btn-info.active,.btn-warning.active,.btn-danger.active{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn-default .badge,.btn-primary .badge,.btn-success .badge,.btn-info .badge,.btn-warning .badge,.btn-danger .badge{text-shadow:none}.btn:active,.btn.active{background-image:none}.btn-default{text-shadow:0 1px 0 #fff;background-image:-webkit-linear-gradient(top,#fff 0,#e0e0e0 100%);background-image:-o-linear-gradient(top,#fff 0,#e0e0e0 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#fff),to(#e0e0e0));background-image:linear-gradient(to bottom,#fff 0,#e0e0e0 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe0e0e0', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#dbdbdb;border-color:#ccc}.btn-default:hover,.btn-default:focus{background-color:#e0e0e0;background-position:0 -15px}.btn-default:active,.btn-default.active{background-color:#e0e0e0;border-color:#dbdbdb}.btn-default:disabled,.btn-default[disabled]{background-color:#e0e0e0;background-image:none}.btn-primary{background-image:-webkit-linear-gradient(top,#337ab7 0,#265a88 100%);background-image:-o-linear-gradient(top,#337ab7 0,#265a88 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#265a88));background-image:linear-gradient(to bottom,#337ab7 0,#265a88 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff265a88', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#245580}.btn-primary:hover,.btn-primary:focus{background-color:#265a88;background-position:0 -15px}.btn-primary:active,.btn-primary.active{background-color:#265a88;border-color:#245580}.btn-primary:disabled,.btn-primary[disabled]{background-color:#265a88;background-image:none}.btn-success{background-image:-webkit-linear-gradient(top,#5cb85c 0,#419641 100%);background-image:-o-linear-gradient(top,#5cb85c 0,#419641 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#5cb85c),to(#419641));background-image:linear-gradient(to bottom,#5cb85c 0,#419641 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff419641', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#3e8f3e}.btn-success:hover,.btn-success:focus{background-color:#419641;background-position:0 -15px}.btn-success:active,.btn-success.active{background-color:#419641;border-color:#3e8f3e}.btn-success:disabled,.btn-success[disabled]{background-color:#419641;background-image:none}.btn-info{background-image:-webkit-linear-gradient(top,#5bc0de 0,#2aabd2 100%);background-image:-o-linear-gradient(top,#5bc0de 0,#2aabd2 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#5bc0de),to(#2aabd2));background-image:linear-gradient(to bottom,#5bc0de 0,#2aabd2 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2aabd2', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#28a4c9}.btn-info:hover,.btn-info:focus{background-color:#2aabd2;background-position:0 -15px}.btn-info:active,.btn-info.active{background-color:#2aabd2;border-color:#28a4c9}.btn-info:disabled,.btn-info[disabled]{background-color:#2aabd2;background-image:none}.btn-warning{background-image:-webkit-linear-gradient(top,#f0ad4e 0,#eb9316 100%);background-image:-o-linear-gradient(top,#f0ad4e 0,#eb9316 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f0ad4e),to(#eb9316));background-image:linear-gradient(to bottom,#f0ad4e 0,#eb9316 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffeb9316', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#e38d13}.btn-warning:hover,.btn-warning:focus{background-color:#eb9316;background-position:0 -15px}.btn-warning:active,.btn-warning.active{background-color:#eb9316;border-color:#e38d13}.btn-warning:disabled,.btn-warning[disabled]{background-color:#eb9316;background-image:none}.btn-danger{background-image:-webkit-linear-gradient(top,#d9534f 0,#c12e2a 100%);background-image:-o-linear-gradient(top,#d9534f 0,#c12e2a 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#d9534f),to(#c12e2a));background-image:linear-gradient(to bottom,#d9534f 0,#c12e2a 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc12e2a', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#b92c28}.btn-danger:hover,.btn-danger:focus{background-color:#c12e2a;background-position:0 -15px}.btn-danger:active,.btn-danger.active{background-color:#c12e2a;border-color:#b92c28}.btn-danger:disabled,.btn-danger[disabled]{background-color:#c12e2a;background-image:none}.thumbnail,.img-thumbnail{-webkit-box-shadow:0 1px 2px rgba(0,0,0,.075);box-shadow:0 1px 2px rgba(0,0,0,.075)}.dropdown-menu>li>a:hover,.dropdown-menu>li>a:focus{background-color:#e8e8e8;background-image:-webkit-linear-gradient(top,#f5f5f5 0,#e8e8e8 100%);background-image:-o-linear-gradient(top,#f5f5f5 0,#e8e8e8 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f5f5f5),to(#e8e8e8));background-image:linear-gradient(to bottom,#f5f5f5 0,#e8e8e8 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);background-repeat:repeat-x}.dropdown-menu>.active>a,.dropdown-menu>.active>a:hover,.dropdown-menu>.active>a:focus{background-color:#2e6da4;background-image:-webkit-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-o-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#2e6da4));background-image:linear-gradient(to bottom,#337ab7 0,#2e6da4 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);background-repeat:repeat-x}.navbar-default{background-image:-webkit-linear-gradient(top,#fff 0,#f8f8f8 100%);background-image:-o-linear-gradient(top,#fff 0,#f8f8f8 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#fff),to(#f8f8f8));background-image:linear-gradient(to bottom,#fff 0,#f8f8f8 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff8f8f8', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-radius:4px;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 5px rgba(0,0,0,.075);box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 5px rgba(0,0,0,.075)}.navbar-default .navbar-nav>.open>a,.navbar-default .navbar-nav>.active>a{background-image:-webkit-linear-gradient(top,#dbdbdb 0,#e2e2e2 100%);background-image:-o-linear-gradient(top,#dbdbdb 0,#e2e2e2 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#dbdbdb),to(#e2e2e2));background-image:linear-gradient(to bottom,#dbdbdb 0,#e2e2e2 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdbdbdb', endColorstr='#ffe2e2e2', GradientType=0);background-repeat:repeat-x;-webkit-box-shadow:inset 0 3px 9px rgba(0,0,0,.075);box-shadow:inset 0 3px 9px rgba(0,0,0,.075)}.navbar-brand,.navbar-nav>li>a{text-shadow:0 1px 0 rgba(255,255,255,.25)}.navbar-inverse{background-image:-webkit-linear-gradient(top,#3c3c3c 0,#222 100%);background-image:-o-linear-gradient(top,#3c3c3c 0,#222 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#3c3c3c),to(#222));background-image:linear-gradient(to bottom,#3c3c3c 0,#222 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff3c3c3c', endColorstr='#ff222222', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x}.navbar-inverse .navbar-nav>.open>a,.navbar-inverse .navbar-nav>.active>a{background-image:-webkit-linear-gradient(top,#080808 0,#0f0f0f 100%);background-image:-o-linear-gradient(top,#080808 0,#0f0f0f 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#080808),to(#0f0f0f));background-image:linear-gradient(to bottom,#080808 0,#0f0f0f 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff080808', endColorstr='#ff0f0f0f', GradientType=0);background-repeat:repeat-x;-webkit-box-shadow:inset 0 3px 9px rgba(0,0,0,.25);box-shadow:inset 0 3px 9px rgba(0,0,0,.25)}.navbar-inverse .navbar-brand,.navbar-inverse .navbar-nav>li>a{text-shadow:0 -1px 0 rgba(0,0,0,.25)}.navbar-static-top,.navbar-fixed-top,.navbar-fixed-bottom{border-radius:0}@media (max-width:767px){.navbar .navbar-nav .open .dropdown-menu>.active>a,.navbar .navbar-nav .open .dropdown-menu>.active>a:hover,.navbar .navbar-nav .open .dropdown-menu>.active>a:focus{color:#fff;background-image:-webkit-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-o-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#2e6da4));background-image:linear-gradient(to bottom,#337ab7 0,#2e6da4 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);background-repeat:repeat-x}}.alert{text-shadow:0 1px 0 rgba(255,255,255,.2);-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 2px rgba(0,0,0,.05)}.alert-success{background-image:-webkit-linear-gradient(top,#dff0d8 0,#c8e5bc 100%);background-image:-o-linear-gradient(top,#dff0d8 0,#c8e5bc 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#dff0d8),to(#c8e5bc));background-image:linear-gradient(to bottom,#dff0d8 0,#c8e5bc 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffc8e5bc', GradientType=0);background-repeat:repeat-x;border-color:#b2dba1}.alert-info{background-image:-webkit-linear-gradient(top,#d9edf7 0,#b9def0 100%);background-image:-o-linear-gradient(top,#d9edf7 0,#b9def0 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#d9edf7),to(#b9def0));background-image:linear-gradient(to bottom,#d9edf7 0,#b9def0 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffb9def0', GradientType=0);background-repeat:repeat-x;border-color:#9acfea}.alert-warning{background-image:-webkit-linear-gradient(top,#fcf8e3 0,#f8efc0 100%);background-image:-o-linear-gradient(top,#fcf8e3 0,#f8efc0 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#fcf8e3),to(#f8efc0));background-image:linear-gradient(to bottom,#fcf8e3 0,#f8efc0 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fff8efc0', GradientType=0);background-repeat:repeat-x;border-color:#f5e79e}.alert-danger{background-image:-webkit-linear-gradient(top,#f2dede 0,#e7c3c3 100%);background-image:-o-linear-gradient(top,#f2dede 0,#e7c3c3 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f2dede),to(#e7c3c3));background-image:linear-gradient(to bottom,#f2dede 0,#e7c3c3 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffe7c3c3', GradientType=0);background-repeat:repeat-x;border-color:#dca7a7}.progress{background-image:-webkit-linear-gradient(top,#ebebeb 0,#f5f5f5 100%);background-image:-o-linear-gradient(top,#ebebeb 0,#f5f5f5 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#ebebeb),to(#f5f5f5));background-image:linear-gradient(to bottom,#ebebeb 0,#f5f5f5 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffebebeb', endColorstr='#fff5f5f5', GradientType=0);background-repeat:repeat-x}.progress-bar{background-image:-webkit-linear-gradient(top,#337ab7 0,#286090 100%);background-image:-o-linear-gradient(top,#337ab7 0,#286090 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#286090));background-image:linear-gradient(to bottom,#337ab7 0,#286090 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff286090', GradientType=0);background-repeat:repeat-x}.progress-bar-success{background-image:-webkit-linear-gradient(top,#5cb85c 0,#449d44 100%);background-image:-o-linear-gradient(top,#5cb85c 0,#449d44 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#5cb85c),to(#449d44));background-image:linear-gradient(to bottom,#5cb85c 0,#449d44 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff449d44', GradientType=0);background-repeat:repeat-x}.progress-bar-info{background-image:-webkit-linear-gradient(top,#5bc0de 0,#31b0d5 100%);background-image:-o-linear-gradient(top,#5bc0de 0,#31b0d5 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#5bc0de),to(#31b0d5));background-image:linear-gradient(to bottom,#5bc0de 0,#31b0d5 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff31b0d5', GradientType=0);background-repeat:repeat-x}.progress-bar-warning{background-image:-webkit-linear-gradient(top,#f0ad4e 0,#ec971f 100%);background-image:-o-linear-gradient(top,#f0ad4e 0,#ec971f 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f0ad4e),to(#ec971f));background-image:linear-gradient(to bottom,#f0ad4e 0,#ec971f 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffec971f', GradientType=0);background-repeat:repeat-x}.progress-bar-danger{background-image:-webkit-linear-gradient(top,#d9534f 0,#c9302c 100%);background-image:-o-linear-gradient(top,#d9534f 0,#c9302c 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#d9534f),to(#c9302c));background-image:linear-gradient(to bottom,#d9534f 0,#c9302c 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc9302c', GradientType=0);background-repeat:repeat-x}.progress-bar-striped{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.list-group{border-radius:4px;-webkit-box-shadow:0 1px 2px rgba(0,0,0,.075);box-shadow:0 1px 2px rgba(0,0,0,.075)}.list-group-item.active,.list-group-item.active:hover,.list-group-item.active:focus{text-shadow:0 -1px 0 #286090;background-image:-webkit-linear-gradient(top,#337ab7 0,#2b669a 100%);background-image:-o-linear-gradient(top,#337ab7 0,#2b669a 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#2b669a));background-image:linear-gradient(to bottom,#337ab7 0,#2b669a 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2b669a', GradientType=0);background-repeat:repeat-x;border-color:#2b669a}.list-group-item.active .badge,.list-group-item.active:hover .badge,.list-group-item.active:focus .badge{text-shadow:none}.panel{-webkit-box-shadow:0 1px 2px rgba(0,0,0,.05);box-shadow:0 1px 2px rgba(0,0,0,.05)}.panel-default>.panel-heading{background-image:-webkit-linear-gradient(top,#f5f5f5 0,#e8e8e8 100%);background-image:-o-linear-gradient(top,#f5f5f5 0,#e8e8e8 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f5f5f5),to(#e8e8e8));background-image:linear-gradient(to bottom,#f5f5f5 0,#e8e8e8 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);background-repeat:repeat-x}.panel-primary>.panel-heading{background-image:-webkit-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-o-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#2e6da4));background-image:linear-gradient(to bottom,#337ab7 0,#2e6da4 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);background-repeat:repeat-x}.panel-success>.panel-heading{background-image:-webkit-linear-gradient(top,#dff0d8 0,#d0e9c6 100%);background-image:-o-linear-gradient(top,#dff0d8 0,#d0e9c6 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#dff0d8),to(#d0e9c6));background-image:linear-gradient(to bottom,#dff0d8 0,#d0e9c6 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffd0e9c6', GradientType=0);background-repeat:repeat-x}.panel-info>.panel-heading{background-image:-webkit-linear-gradient(top,#d9edf7 0,#c4e3f3 100%);background-image:-o-linear-gradient(top,#d9edf7 0,#c4e3f3 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#d9edf7),to(#c4e3f3));background-image:linear-gradient(to bottom,#d9edf7 0,#c4e3f3 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffc4e3f3', GradientType=0);background-repeat:repeat-x}.panel-warning>.panel-heading{background-image:-webkit-linear-gradient(top,#fcf8e3 0,#faf2cc 100%);background-image:-o-linear-gradient(top,#fcf8e3 0,#faf2cc 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#fcf8e3),to(#faf2cc));background-image:linear-gradient(to bottom,#fcf8e3 0,#faf2cc 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fffaf2cc', GradientType=0);background-repeat:repeat-x}.panel-danger>.panel-heading{background-image:-webkit-linear-gradient(top,#f2dede 0,#ebcccc 100%);background-image:-o-linear-gradient(top,#f2dede 0,#ebcccc 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f2dede),to(#ebcccc));background-image:linear-gradient(to bottom,#f2dede 0,#ebcccc 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffebcccc', GradientType=0);background-repeat:repeat-x}.well{background-image:-webkit-linear-gradient(top,#e8e8e8 0,#f5f5f5 100%);background-image:-o-linear-gradient(top,#e8e8e8 0,#f5f5f5 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#e8e8e8),to(#f5f5f5));background-image:linear-gradient(to bottom,#e8e8e8 0,#f5f5f5 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe8e8e8', endColorstr='#fff5f5f5', GradientType=0);background-repeat:repeat-x;border-color:#dcdcdc;-webkit-box-shadow:inset 0 1px 3px rgba(0,0,0,.05),0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 3px rgba(0,0,0,.05),0 1px 0 rgba(255,255,255,.1)} \ No newline at end of file diff --git a/node_modules/vis-network/docs/css/bootstrap.css b/node_modules/vis-network/docs/css/bootstrap.css deleted file mode 100644 index 622a61abc330a9d542d9fecfa651640cce4c80a5..0000000000000000000000000000000000000000 --- a/node_modules/vis-network/docs/css/bootstrap.css +++ /dev/null @@ -1,6332 +0,0 @@ -/*! - * Bootstrap v3.3.1 (http://getbootstrap.com) - * Copyright 2011-2014 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - */ - -/*! normalize.css v3.0.2 | MIT License | git.io/normalize */ -html { - font-family: sans-serif; - -webkit-text-size-adjust: 100%; - -ms-text-size-adjust: 100%; -} -body { - margin: 0; -} -article, -aside, -details, -figcaption, -figure, -footer, -header, -hgroup, -main, -menu, -nav, -section, -summary { - display: block; -} -audio, -canvas, -progress, -video { - display: inline-block; - vertical-align: baseline; -} -audio:not([controls]) { - display: none; - height: 0; -} -[hidden], -template { - display: none; -} -a { - background-color: transparent; -} -a:active, -a:hover { - outline: 0; -} -abbr[title] { - border-bottom: 1px dotted; -} -b, -strong { - font-weight: bold; -} -dfn { - font-style: italic; -} -h1 { - margin: .67em 0; - font-size: 2em; -} -mark { - color: #000; - background: #ff0; -} -small { - font-size: 80%; -} -sub, -sup { - position: relative; - font-size: 75%; - line-height: 0; - vertical-align: baseline; -} -sup { - top: -.5em; -} -sub { - bottom: -.25em; -} -img { - border: 0; -} -svg:not(:root) { - overflow: hidden; -} -figure { - margin: 1em 40px; -} -hr { - height: 0; - -webkit-box-sizing: content-box; - -moz-box-sizing: content-box; - box-sizing: content-box; -} -pre { - overflow: auto; -} -code, -kbd, -pre, -samp { - font-family: monospace, monospace; - font-size: 1em; -} -button, -input, -optgroup, -select, -textarea { - margin: 0; - font: inherit; - color: inherit; -} -button { - overflow: visible; -} -button, -select { - text-transform: none; -} -button, -html input[type="button"], -input[type="reset"], -input[type="submit"] { - -webkit-appearance: button; - cursor: pointer; -} -button[disabled], -html input[disabled] { - cursor: default; -} -button::-moz-focus-inner, -input::-moz-focus-inner { - padding: 0; - border: 0; -} -input { - line-height: normal; -} -input[type="checkbox"], -input[type="radio"] { - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; - padding: 0; -} -input[type="number"]::-webkit-inner-spin-button, -input[type="number"]::-webkit-outer-spin-button { - height: auto; -} -input[type="search"] { - -webkit-box-sizing: content-box; - -moz-box-sizing: content-box; - box-sizing: content-box; - -webkit-appearance: textfield; -} -input[type="search"]::-webkit-search-cancel-button, -input[type="search"]::-webkit-search-decoration { - -webkit-appearance: none; -} -fieldset { - padding: .35em .625em .75em; - margin: 0 2px; - border: 1px solid #c0c0c0; -} -legend { - padding: 0; - border: 0; -} -textarea { - overflow: auto; -} -optgroup { - font-weight: bold; -} -table { - border-spacing: 0; - border-collapse: collapse; -} -td, -th { - padding: 0; -} -/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */ -@media print { - *, - *:before, - *:after { - color: #000 !important; - text-shadow: none !important; - background: transparent !important; - -webkit-box-shadow: none !important; - box-shadow: none !important; - } - a, - a:visited { - text-decoration: underline; - } - a[href]:after { - content: " (" attr(href) ")"; - } - abbr[title]:after { - content: " (" attr(title) ")"; - } - a[href^="#"]:after, - a[href^="javascript:"]:after { - content: ""; - } - pre, - blockquote { - border: 1px solid #999; - - page-break-inside: avoid; - } - thead { - display: table-header-group; - } - tr, - img { - page-break-inside: avoid; - } - img { - max-width: 100% !important; - } - p, - h2, - h3 { - orphans: 3; - widows: 3; - } - h2, - h3 { - page-break-after: avoid; - } - select { - background: #fff !important; - } - .navbar { - display: none; - } - .btn > .caret, - .dropup > .btn > .caret { - border-top-color: #000 !important; - } - .label { - border: 1px solid #000; - } - .table { - border-collapse: collapse !important; - } - .table td, - .table th { - background-color: #fff !important; - } - .table-bordered th, - .table-bordered td { - border: 1px solid #ddd !important; - } -} -@font-face { - font-family: 'Glyphicons Halflings'; - - src: url('../fonts/glyphicons-halflings-regular.eot'); - src: url('../fonts/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'), url('../fonts/glyphicons-halflings-regular.woff') format('woff'), url('../fonts/glyphicons-halflings-regular.ttf') format('truetype'), url('../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular') format('svg'); -} -.glyphicon { - position: relative; - top: 1px; - display: inline-block; - font-family: 'Glyphicons Halflings'; - font-style: normal; - font-weight: normal; - line-height: 1; - - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; -} -.glyphicon-asterisk:before { - content: "\2a"; -} -.glyphicon-plus:before { - content: "\2b"; -} -.glyphicon-euro:before, -.glyphicon-eur:before { - content: "\20ac"; -} -.glyphicon-minus:before { - content: "\2212"; -} -.glyphicon-cloud:before { - content: "\2601"; -} -.glyphicon-envelope:before { - content: "\2709"; -} -.glyphicon-pencil:before { - content: "\270f"; -} -.glyphicon-glass:before { - content: "\e001"; -} -.glyphicon-music:before { - content: "\e002"; -} -.glyphicon-search:before { - content: "\e003"; -} -.glyphicon-heart:before { - content: "\e005"; -} -.glyphicon-star:before { - content: "\e006"; -} -.glyphicon-star-empty:before { - content: "\e007"; -} -.glyphicon-user:before { - content: "\e008"; -} -.glyphicon-film:before { - content: "\e009"; -} -.glyphicon-th-large:before { - content: "\e010"; -} -.glyphicon-th:before { - content: "\e011"; -} -.glyphicon-th-list:before { - content: "\e012"; -} -.glyphicon-ok:before { - content: "\e013"; -} -.glyphicon-remove:before { - content: "\e014"; -} -.glyphicon-zoom-in:before { - content: "\e015"; -} -.glyphicon-zoom-out:before { - content: "\e016"; -} -.glyphicon-off:before { - content: "\e017"; -} -.glyphicon-signal:before { - content: "\e018"; -} -.glyphicon-cog:before { - content: "\e019"; -} -.glyphicon-trash:before { - content: "\e020"; -} -.glyphicon-home:before { - content: "\e021"; -} -.glyphicon-file:before { - content: "\e022"; -} -.glyphicon-time:before { - content: "\e023"; -} -.glyphicon-road:before { - content: "\e024"; -} -.glyphicon-download-alt:before { - content: "\e025"; -} -.glyphicon-download:before { - content: "\e026"; -} -.glyphicon-upload:before { - content: "\e027"; -} -.glyphicon-inbox:before { - content: "\e028"; -} -.glyphicon-play-circle:before { - content: "\e029"; -} -.glyphicon-repeat:before { - content: "\e030"; -} -.glyphicon-refresh:before { - content: "\e031"; -} -.glyphicon-list-alt:before { - content: "\e032"; -} -.glyphicon-lock:before { - content: "\e033"; -} -.glyphicon-flag:before { - content: "\e034"; -} -.glyphicon-headphones:before { - content: "\e035"; -} -.glyphicon-volume-off:before { - content: "\e036"; -} -.glyphicon-volume-down:before { - content: "\e037"; -} -.glyphicon-volume-up:before { - content: "\e038"; -} -.glyphicon-qrcode:before { - content: "\e039"; -} -.glyphicon-barcode:before { - content: "\e040"; -} -.glyphicon-tag:before { - content: "\e041"; -} -.glyphicon-tags:before { - content: "\e042"; -} -.glyphicon-book:before { - content: "\e043"; -} -.glyphicon-bookmark:before { - content: "\e044"; -} -.glyphicon-print:before { - content: "\e045"; -} -.glyphicon-camera:before { - content: "\e046"; -} -.glyphicon-font:before { - content: "\e047"; -} -.glyphicon-bold:before { - content: "\e048"; -} -.glyphicon-italic:before { - content: "\e049"; -} -.glyphicon-text-height:before { - content: "\e050"; -} -.glyphicon-text-width:before { - content: "\e051"; -} -.glyphicon-align-left:before { - content: "\e052"; -} -.glyphicon-align-center:before { - content: "\e053"; -} -.glyphicon-align-right:before { - content: "\e054"; -} -.glyphicon-align-justify:before { - content: "\e055"; -} -.glyphicon-list:before { - content: "\e056"; -} -.glyphicon-indent-left:before { - content: "\e057"; -} -.glyphicon-indent-right:before { - content: "\e058"; -} -.glyphicon-facetime-video:before { - content: "\e059"; -} -.glyphicon-picture:before { - content: "\e060"; -} -.glyphicon-map-marker:before { - content: "\e062"; -} -.glyphicon-adjust:before { - content: "\e063"; -} -.glyphicon-tint:before { - content: "\e064"; -} -.glyphicon-edit:before { - content: "\e065"; -} -.glyphicon-share:before { - content: "\e066"; -} -.glyphicon-check:before { - content: "\e067"; -} -.glyphicon-move:before { - content: "\e068"; -} -.glyphicon-step-backward:before { - content: "\e069"; -} -.glyphicon-fast-backward:before { - content: "\e070"; -} -.glyphicon-backward:before { - content: "\e071"; -} -.glyphicon-play:before { - content: "\e072"; -} -.glyphicon-pause:before { - content: "\e073"; -} -.glyphicon-stop:before { - content: "\e074"; -} -.glyphicon-forward:before { - content: "\e075"; -} -.glyphicon-fast-forward:before { - content: "\e076"; -} -.glyphicon-step-forward:before { - content: "\e077"; -} -.glyphicon-eject:before { - content: "\e078"; -} -.glyphicon-chevron-left:before { - content: "\e079"; -} -.glyphicon-chevron-right:before { - content: "\e080"; -} -.glyphicon-plus-sign:before { - content: "\e081"; -} -.glyphicon-minus-sign:before { - content: "\e082"; -} -.glyphicon-remove-sign:before { - content: "\e083"; -} -.glyphicon-ok-sign:before { - content: "\e084"; -} -.glyphicon-question-sign:before { - content: "\e085"; -} -.glyphicon-info-sign:before { - content: "\e086"; -} -.glyphicon-screenshot:before { - content: "\e087"; -} -.glyphicon-remove-circle:before { - content: "\e088"; -} -.glyphicon-ok-circle:before { - content: "\e089"; -} -.glyphicon-ban-circle:before { - content: "\e090"; -} -.glyphicon-arrow-left:before { - content: "\e091"; -} -.glyphicon-arrow-right:before { - content: "\e092"; -} -.glyphicon-arrow-up:before { - content: "\e093"; -} -.glyphicon-arrow-down:before { - content: "\e094"; -} -.glyphicon-share-alt:before { - content: "\e095"; -} -.glyphicon-resize-full:before { - content: "\e096"; -} -.glyphicon-resize-small:before { - content: "\e097"; -} -.glyphicon-exclamation-sign:before { - content: "\e101"; -} -.glyphicon-gift:before { - content: "\e102"; -} -.glyphicon-leaf:before { - content: "\e103"; -} -.glyphicon-fire:before { - content: "\e104"; -} -.glyphicon-eye-open:before { - content: "\e105"; -} -.glyphicon-eye-close:before { - content: "\e106"; -} -.glyphicon-warning-sign:before { - content: "\e107"; -} -.glyphicon-plane:before { - content: "\e108"; -} -.glyphicon-calendar:before { - content: "\e109"; -} -.glyphicon-random:before { - content: "\e110"; -} -.glyphicon-comment:before { - content: "\e111"; -} -.glyphicon-magnet:before { - content: "\e112"; -} -.glyphicon-chevron-up:before { - content: "\e113"; -} -.glyphicon-chevron-down:before { - content: "\e114"; -} -.glyphicon-retweet:before { - content: "\e115"; -} -.glyphicon-shopping-cart:before { - content: "\e116"; -} -.glyphicon-folder-close:before { - content: "\e117"; -} -.glyphicon-folder-open:before { - content: "\e118"; -} -.glyphicon-resize-vertical:before { - content: "\e119"; -} -.glyphicon-resize-horizontal:before { - content: "\e120"; -} -.glyphicon-hdd:before { - content: "\e121"; -} -.glyphicon-bullhorn:before { - content: "\e122"; -} -.glyphicon-bell:before { - content: "\e123"; -} -.glyphicon-certificate:before { - content: "\e124"; -} -.glyphicon-thumbs-up:before { - content: "\e125"; -} -.glyphicon-thumbs-down:before { - content: "\e126"; -} -.glyphicon-hand-right:before { - content: "\e127"; -} -.glyphicon-hand-left:before { - content: "\e128"; -} -.glyphicon-hand-up:before { - content: "\e129"; -} -.glyphicon-hand-down:before { - content: "\e130"; -} -.glyphicon-circle-arrow-right:before { - content: "\e131"; -} -.glyphicon-circle-arrow-left:before { - content: "\e132"; -} -.glyphicon-circle-arrow-up:before { - content: "\e133"; -} -.glyphicon-circle-arrow-down:before { - content: "\e134"; -} -.glyphicon-globe:before { - content: "\e135"; -} -.glyphicon-wrench:before { - content: "\e136"; -} -.glyphicon-tasks:before { - content: "\e137"; -} -.glyphicon-filter:before { - content: "\e138"; -} -.glyphicon-briefcase:before { - content: "\e139"; -} -.glyphicon-fullscreen:before { - content: "\e140"; -} -.glyphicon-dashboard:before { - content: "\e141"; -} -.glyphicon-paperclip:before { - content: "\e142"; -} -.glyphicon-heart-empty:before { - content: "\e143"; -} -.glyphicon-link:before { - content: "\e144"; -} -.glyphicon-phone:before { - content: "\e145"; -} -.glyphicon-pushpin:before { - content: "\e146"; -} -.glyphicon-usd:before { - content: "\e148"; -} -.glyphicon-gbp:before { - content: "\e149"; -} -.glyphicon-sort:before { - content: "\e150"; -} -.glyphicon-sort-by-alphabet:before { - content: "\e151"; -} -.glyphicon-sort-by-alphabet-alt:before { - content: "\e152"; -} -.glyphicon-sort-by-order:before { - content: "\e153"; -} -.glyphicon-sort-by-order-alt:before { - content: "\e154"; -} -.glyphicon-sort-by-attributes:before { - content: "\e155"; -} -.glyphicon-sort-by-attributes-alt:before { - content: "\e156"; -} -.glyphicon-unchecked:before { - content: "\e157"; -} -.glyphicon-expand:before { - content: "\e158"; -} -.glyphicon-collapse-down:before { - content: "\e159"; -} -.glyphicon-collapse-up:before { - content: "\e160"; -} -.glyphicon-log-in:before { - content: "\e161"; -} -.glyphicon-flash:before { - content: "\e162"; -} -.glyphicon-log-out:before { - content: "\e163"; -} -.glyphicon-new-window:before { - content: "\e164"; -} -.glyphicon-record:before { - content: "\e165"; -} -.glyphicon-save:before { - content: "\e166"; -} -.glyphicon-open:before { - content: "\e167"; -} -.glyphicon-saved:before { - content: "\e168"; -} -.glyphicon-import:before { - content: "\e169"; -} -.glyphicon-export:before { - content: "\e170"; -} -.glyphicon-send:before { - content: "\e171"; -} -.glyphicon-floppy-disk:before { - content: "\e172"; -} -.glyphicon-floppy-saved:before { - content: "\e173"; -} -.glyphicon-floppy-remove:before { - content: "\e174"; -} -.glyphicon-floppy-save:before { - content: "\e175"; -} -.glyphicon-floppy-open:before { - content: "\e176"; -} -.glyphicon-credit-card:before { - content: "\e177"; -} -.glyphicon-transfer:before { - content: "\e178"; -} -.glyphicon-cutlery:before { - content: "\e179"; -} -.glyphicon-header:before { - content: "\e180"; -} -.glyphicon-compressed:before { - content: "\e181"; -} -.glyphicon-earphone:before { - content: "\e182"; -} -.glyphicon-phone-alt:before { - content: "\e183"; -} -.glyphicon-tower:before { - content: "\e184"; -} -.glyphicon-stats:before { - content: "\e185"; -} -.glyphicon-sd-video:before { - content: "\e186"; -} -.glyphicon-hd-video:before { - content: "\e187"; -} -.glyphicon-subtitles:before { - content: "\e188"; -} -.glyphicon-sound-stereo:before { - content: "\e189"; -} -.glyphicon-sound-dolby:before { - content: "\e190"; -} -.glyphicon-sound-5-1:before { - content: "\e191"; -} -.glyphicon-sound-6-1:before { - content: "\e192"; -} -.glyphicon-sound-7-1:before { - content: "\e193"; -} -.glyphicon-copyright-mark:before { - content: "\e194"; -} -.glyphicon-registration-mark:before { - content: "\e195"; -} -.glyphicon-cloud-download:before { - content: "\e197"; -} -.glyphicon-cloud-upload:before { - content: "\e198"; -} -.glyphicon-tree-conifer:before { - content: "\e199"; -} -.glyphicon-tree-deciduous:before { - content: "\e200"; -} -* { - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; -} -*:before, -*:after { - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; -} -html { - font-size: 10px; - - -webkit-tap-highlight-color: rgba(0, 0, 0, 0); -} -body { - font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; - font-size: 14px; - line-height: 1.42857143; - color: #333; - background-color: #fff; -} -input, -button, -select, -textarea { - font-family: inherit; - font-size: inherit; - line-height: inherit; -} -a { - color: #337ab7; - text-decoration: none; -} -a:hover, -a:focus { - color: #23527c; - text-decoration: underline; -} -a:focus { - outline: thin dotted; - outline: 5px auto -webkit-focus-ring-color; - outline-offset: -2px; -} -figure { - margin: 0; -} -img { - vertical-align: middle; -} -.img-responsive, -.thumbnail > img, -.thumbnail a > img, -.carousel-inner > .item > img, -.carousel-inner > .item > a > img { - display: block; - max-width: 100%; - height: auto; -} -.img-rounded { - border-radius: 6px; -} -.img-thumbnail { - display: inline-block; - max-width: 100%; - height: auto; - padding: 4px; - line-height: 1.42857143; - background-color: #fff; - border: 1px solid #ddd; - border-radius: 4px; - -webkit-transition: all .2s ease-in-out; - -o-transition: all .2s ease-in-out; - transition: all .2s ease-in-out; -} -.img-circle { - border-radius: 50%; -} -hr { - margin-top: 20px; - margin-bottom: 20px; - border: 0; - border-top: 1px solid #eee; -} -.sr-only { - position: absolute; - width: 1px; - height: 1px; - padding: 0; - margin: -1px; - overflow: hidden; - clip: rect(0, 0, 0, 0); - border: 0; -} -.sr-only-focusable:active, -.sr-only-focusable:focus { - position: static; - width: auto; - height: auto; - margin: 0; - overflow: visible; - clip: auto; -} -h1, -h2, -h3, -h4, -h5, -h6, -.h1, -.h2, -.h3, -.h4, -.h5, -.h6 { - font-family: inherit; - font-weight: 500; - line-height: 1.1; - color: inherit; -} -h1 small, -h2 small, -h3 small, -h4 small, -h5 small, -h6 small, -.h1 small, -.h2 small, -.h3 small, -.h4 small, -.h5 small, -.h6 small, -h1 .small, -h2 .small, -h3 .small, -h4 .small, -h5 .small, -h6 .small, -.h1 .small, -.h2 .small, -.h3 .small, -.h4 .small, -.h5 .small, -.h6 .small { - font-weight: normal; - line-height: 1; - color: #777; -} -h1, -.h1, -h2, -.h2, -h3, -.h3 { - margin-top: 20px; - margin-bottom: 10px; -} -h1 small, -.h1 small, -h2 small, -.h2 small, -h3 small, -.h3 small, -h1 .small, -.h1 .small, -h2 .small, -.h2 .small, -h3 .small, -.h3 .small { - font-size: 65%; -} -h4, -.h4, -h5, -.h5, -h6, -.h6 { - margin-top: 10px; - margin-bottom: 10px; -} -h4 small, -.h4 small, -h5 small, -.h5 small, -h6 small, -.h6 small, -h4 .small, -.h4 .small, -h5 .small, -.h5 .small, -h6 .small, -.h6 .small { - font-size: 75%; -} -h1, -.h1 { - font-size: 36px; -} -h2, -.h2 { - font-size: 30px; -} -h3, -.h3 { - font-size: 24px; -} -h4, -.h4 { - font-size: 18px; -} -h5, -.h5 { - font-size: 14px; -} -h6, -.h6 { - font-size: 12px; -} -p { - margin: 0 0 10px; -} -.lead { - margin-bottom: 20px; - font-size: 16px; - font-weight: 300; - line-height: 1.4; -} -@media (min-width: 768px) { - .lead { - font-size: 21px; - } -} -small, -.small { - font-size: 85%; -} -mark, -.mark { - padding: .2em; - background-color: #fcf8e3; -} -.text-left { - text-align: left; -} -.text-right { - text-align: right; -} -.text-center { - text-align: center; -} -.text-justify { - text-align: justify; -} -.text-nowrap { - white-space: nowrap; -} -.text-lowercase { - text-transform: lowercase; -} -.text-uppercase { - text-transform: uppercase; -} -.text-capitalize { - text-transform: capitalize; -} -.text-muted { - color: #777; -} -.text-primary { - color: #337ab7; -} -a.text-primary:hover { - color: #286090; -} -.text-success { - color: #3c763d; -} -a.text-success:hover { - color: #2b542c; -} -.text-info { - color: #31708f; -} -a.text-info:hover { - color: #245269; -} -.text-warning { - color: #8a6d3b; -} -a.text-warning:hover { - color: #66512c; -} -.text-danger { - color: #a94442; -} -a.text-danger:hover { - color: #843534; -} -.bg-primary { - color: #fff; - background-color: #337ab7; -} -a.bg-primary:hover { - background-color: #286090; -} -.bg-success { - background-color: #dff0d8; -} -a.bg-success:hover { - background-color: #c1e2b3; -} -.bg-info { - background-color: #d9edf7; -} -a.bg-info:hover { - background-color: #afd9ee; -} -.bg-warning { - background-color: #fcf8e3; -} -a.bg-warning:hover { - background-color: #f7ecb5; -} -.bg-danger { - background-color: #f2dede; -} -a.bg-danger:hover { - background-color: #e4b9b9; -} -.page-header { - padding-bottom: 9px; - margin: 40px 0 20px; - border-bottom: 1px solid #eee; -} -ul, -ol { - margin-top: 0; - margin-bottom: 10px; -} -ul ul, -ol ul, -ul ol, -ol ol { - margin-bottom: 0; -} -.list-unstyled { - padding-left: 0; - list-style: none; -} -.list-inline { - padding-left: 0; - margin-left: -5px; - list-style: none; -} -.list-inline > li { - display: inline-block; - padding-right: 5px; - padding-left: 5px; -} -dl { - margin-top: 0; - margin-bottom: 20px; -} -dt, -dd { - line-height: 1.42857143; -} -dt { - font-weight: bold; -} -dd { - margin-left: 0; -} -@media (min-width: 768px) { - .dl-horizontal dt { - float: left; - width: 160px; - overflow: hidden; - clear: left; - text-align: right; - text-overflow: ellipsis; - white-space: nowrap; - } - .dl-horizontal dd { - margin-left: 180px; - } -} -abbr[title], -abbr[data-original-title] { - cursor: help; - border-bottom: 1px dotted #777; -} -.initialism { - font-size: 90%; - text-transform: uppercase; -} -blockquote { - padding: 10px 20px; - margin: 0 0 20px; - font-size: 17.5px; - border-left: 5px solid #eee; -} -blockquote p:last-child, -blockquote ul:last-child, -blockquote ol:last-child { - margin-bottom: 0; -} -blockquote footer, -blockquote small, -blockquote .small { - display: block; - font-size: 80%; - line-height: 1.42857143; - color: #777; -} -blockquote footer:before, -blockquote small:before, -blockquote .small:before { - content: '\2014 \00A0'; -} -.blockquote-reverse, -blockquote.pull-right { - padding-right: 15px; - padding-left: 0; - text-align: right; - border-right: 5px solid #eee; - border-left: 0; -} -.blockquote-reverse footer:before, -blockquote.pull-right footer:before, -.blockquote-reverse small:before, -blockquote.pull-right small:before, -.blockquote-reverse .small:before, -blockquote.pull-right .small:before { - content: ''; -} -.blockquote-reverse footer:after, -blockquote.pull-right footer:after, -.blockquote-reverse small:after, -blockquote.pull-right small:after, -.blockquote-reverse .small:after, -blockquote.pull-right .small:after { - content: '\00A0 \2014'; -} -address { - margin-bottom: 20px; - font-style: normal; - line-height: 1.42857143; -} -code, -kbd, -pre, -samp { - font-family: Menlo, Monaco, Consolas, "Courier New", monospace; -} -code { - padding: 2px 4px; - font-size: 90%; - color: #c7254e; - background-color: #f9f2f4; - border-radius: 4px; -} -kbd { - padding: 2px 4px; - font-size: 90%; - color: #fff; - background-color: #333; - border-radius: 3px; - -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .25); - box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .25); -} -kbd kbd { - padding: 0; - font-size: 100%; - font-weight: bold; - -webkit-box-shadow: none; - box-shadow: none; -} -pre { - display: block; - padding: 9.5px; - margin: 0 0 10px; - font-size: 13px; - line-height: 1.42857143; - color: #333; - word-break: break-all; - word-wrap: break-word; - background-color: #f5f5f5; - border: 1px solid #ccc; - border-radius: 4px; -} -pre code { - padding: 0; - font-size: inherit; - color: inherit; - white-space: pre-wrap; - background-color: transparent; - border-radius: 0; -} -.pre-scrollable { - max-height: 340px; - overflow-y: scroll; -} -.container { - padding-right: 15px; - padding-left: 15px; - margin-right: auto; - margin-left: auto; -} -@media (min-width: 768px) { - .container { - width: 750px; - } -} -@media (min-width: 992px) { - .container { - width: 970px; - } -} -@media (min-width: 1200px) { - .container { - width: 1170px; - } -} -.container-fluid { - padding-right: 15px; - padding-left: 15px; - margin-right: auto; - margin-left: auto; -} -.row { - margin-right: -15px; - margin-left: -15px; -} -.col-xs-1, .col-sm-1, .col-md-1, .col-lg-1, .col-xs-2, .col-sm-2, .col-md-2, .col-lg-2, .col-xs-3, .col-sm-3, .col-md-3, .col-lg-3, .col-xs-4, .col-sm-4, .col-md-4, .col-lg-4, .col-xs-5, .col-sm-5, .col-md-5, .col-lg-5, .col-xs-6, .col-sm-6, .col-md-6, .col-lg-6, .col-xs-7, .col-sm-7, .col-md-7, .col-lg-7, .col-xs-8, .col-sm-8, .col-md-8, .col-lg-8, .col-xs-9, .col-sm-9, .col-md-9, .col-lg-9, .col-xs-10, .col-sm-10, .col-md-10, .col-lg-10, .col-xs-11, .col-sm-11, .col-md-11, .col-lg-11, .col-xs-12, .col-sm-12, .col-md-12, .col-lg-12 { - position: relative; - min-height: 1px; - padding-right: 15px; - padding-left: 15px; -} -.col-xs-1, .col-xs-2, .col-xs-3, .col-xs-4, .col-xs-5, .col-xs-6, .col-xs-7, .col-xs-8, .col-xs-9, .col-xs-10, .col-xs-11, .col-xs-12 { - float: left; -} -.col-xs-12 { - width: 100%; -} -.col-xs-11 { - width: 91.66666667%; -} -.col-xs-10 { - width: 83.33333333%; -} -.col-xs-9 { - width: 75%; -} -.col-xs-8 { - width: 66.66666667%; -} -.col-xs-7 { - width: 58.33333333%; -} -.col-xs-6 { - width: 50%; -} -.col-xs-5 { - width: 41.66666667%; -} -.col-xs-4 { - width: 33.33333333%; -} -.col-xs-3 { - width: 25%; -} -.col-xs-2 { - width: 16.66666667%; -} -.col-xs-1 { - width: 8.33333333%; -} -.col-xs-pull-12 { - right: 100%; -} -.col-xs-pull-11 { - right: 91.66666667%; -} -.col-xs-pull-10 { - right: 83.33333333%; -} -.col-xs-pull-9 { - right: 75%; -} -.col-xs-pull-8 { - right: 66.66666667%; -} -.col-xs-pull-7 { - right: 58.33333333%; -} -.col-xs-pull-6 { - right: 50%; -} -.col-xs-pull-5 { - right: 41.66666667%; -} -.col-xs-pull-4 { - right: 33.33333333%; -} -.col-xs-pull-3 { - right: 25%; -} -.col-xs-pull-2 { - right: 16.66666667%; -} -.col-xs-pull-1 { - right: 8.33333333%; -} -.col-xs-pull-0 { - right: auto; -} -.col-xs-push-12 { - left: 100%; -} -.col-xs-push-11 { - left: 91.66666667%; -} -.col-xs-push-10 { - left: 83.33333333%; -} -.col-xs-push-9 { - left: 75%; -} -.col-xs-push-8 { - left: 66.66666667%; -} -.col-xs-push-7 { - left: 58.33333333%; -} -.col-xs-push-6 { - left: 50%; -} -.col-xs-push-5 { - left: 41.66666667%; -} -.col-xs-push-4 { - left: 33.33333333%; -} -.col-xs-push-3 { - left: 25%; -} -.col-xs-push-2 { - left: 16.66666667%; -} -.col-xs-push-1 { - left: 8.33333333%; -} -.col-xs-push-0 { - left: auto; -} -.col-xs-offset-12 { - margin-left: 100%; -} -.col-xs-offset-11 { - margin-left: 91.66666667%; -} -.col-xs-offset-10 { - margin-left: 83.33333333%; -} -.col-xs-offset-9 { - margin-left: 75%; -} -.col-xs-offset-8 { - margin-left: 66.66666667%; -} -.col-xs-offset-7 { - margin-left: 58.33333333%; -} -.col-xs-offset-6 { - margin-left: 50%; -} -.col-xs-offset-5 { - margin-left: 41.66666667%; -} -.col-xs-offset-4 { - margin-left: 33.33333333%; -} -.col-xs-offset-3 { - margin-left: 25%; -} -.col-xs-offset-2 { - margin-left: 16.66666667%; -} -.col-xs-offset-1 { - margin-left: 8.33333333%; -} -.col-xs-offset-0 { - margin-left: 0; -} -@media (min-width: 768px) { - .col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-11, .col-sm-12 { - float: left; - } - .col-sm-12 { - width: 100%; - } - .col-sm-11 { - width: 91.66666667%; - } - .col-sm-10 { - width: 83.33333333%; - } - .col-sm-9 { - width: 75%; - } - .col-sm-8 { - width: 66.66666667%; - } - .col-sm-7 { - width: 58.33333333%; - } - .col-sm-6 { - width: 50%; - } - .col-sm-5 { - width: 41.66666667%; - } - .col-sm-4 { - width: 33.33333333%; - } - .col-sm-3 { - width: 25%; - } - .col-sm-2 { - width: 16.66666667%; - } - .col-sm-1 { - width: 8.33333333%; - } - .col-sm-pull-12 { - right: 100%; - } - .col-sm-pull-11 { - right: 91.66666667%; - } - .col-sm-pull-10 { - right: 83.33333333%; - } - .col-sm-pull-9 { - right: 75%; - } - .col-sm-pull-8 { - right: 66.66666667%; - } - .col-sm-pull-7 { - right: 58.33333333%; - } - .col-sm-pull-6 { - right: 50%; - } - .col-sm-pull-5 { - right: 41.66666667%; - } - .col-sm-pull-4 { - right: 33.33333333%; - } - .col-sm-pull-3 { - right: 25%; - } - .col-sm-pull-2 { - right: 16.66666667%; - } - .col-sm-pull-1 { - right: 8.33333333%; - } - .col-sm-pull-0 { - right: auto; - } - .col-sm-push-12 { - left: 100%; - } - .col-sm-push-11 { - left: 91.66666667%; - } - .col-sm-push-10 { - left: 83.33333333%; - } - .col-sm-push-9 { - left: 75%; - } - .col-sm-push-8 { - left: 66.66666667%; - } - .col-sm-push-7 { - left: 58.33333333%; - } - .col-sm-push-6 { - left: 50%; - } - .col-sm-push-5 { - left: 41.66666667%; - } - .col-sm-push-4 { - left: 33.33333333%; - } - .col-sm-push-3 { - left: 25%; - } - .col-sm-push-2 { - left: 16.66666667%; - } - .col-sm-push-1 { - left: 8.33333333%; - } - .col-sm-push-0 { - left: auto; - } - .col-sm-offset-12 { - margin-left: 100%; - } - .col-sm-offset-11 { - margin-left: 91.66666667%; - } - .col-sm-offset-10 { - margin-left: 83.33333333%; - } - .col-sm-offset-9 { - margin-left: 75%; - } - .col-sm-offset-8 { - margin-left: 66.66666667%; - } - .col-sm-offset-7 { - margin-left: 58.33333333%; - } - .col-sm-offset-6 { - margin-left: 50%; - } - .col-sm-offset-5 { - margin-left: 41.66666667%; - } - .col-sm-offset-4 { - margin-left: 33.33333333%; - } - .col-sm-offset-3 { - margin-left: 25%; - } - .col-sm-offset-2 { - margin-left: 16.66666667%; - } - .col-sm-offset-1 { - margin-left: 8.33333333%; - } - .col-sm-offset-0 { - margin-left: 0; - } -} -@media (min-width: 992px) { - .col-md-1, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-md-9, .col-md-10, .col-md-11, .col-md-12 { - float: left; - } - .col-md-12 { - width: 100%; - } - .col-md-11 { - width: 91.66666667%; - } - .col-md-10 { - width: 83.33333333%; - } - .col-md-9 { - width: 75%; - } - .col-md-8 { - width: 66.66666667%; - } - .col-md-7 { - width: 58.33333333%; - } - .col-md-6 { - width: 50%; - } - .col-md-5 { - width: 41.66666667%; - } - .col-md-4 { - width: 33.33333333%; - } - .col-md-3 { - width: 25%; - } - .col-md-2 { - width: 16.66666667%; - } - .col-md-1 { - width: 8.33333333%; - } - .col-md-pull-12 { - right: 100%; - } - .col-md-pull-11 { - right: 91.66666667%; - } - .col-md-pull-10 { - right: 83.33333333%; - } - .col-md-pull-9 { - right: 75%; - } - .col-md-pull-8 { - right: 66.66666667%; - } - .col-md-pull-7 { - right: 58.33333333%; - } - .col-md-pull-6 { - right: 50%; - } - .col-md-pull-5 { - right: 41.66666667%; - } - .col-md-pull-4 { - right: 33.33333333%; - } - .col-md-pull-3 { - right: 25%; - } - .col-md-pull-2 { - right: 16.66666667%; - } - .col-md-pull-1 { - right: 8.33333333%; - } - .col-md-pull-0 { - right: auto; - } - .col-md-push-12 { - left: 100%; - } - .col-md-push-11 { - left: 91.66666667%; - } - .col-md-push-10 { - left: 83.33333333%; - } - .col-md-push-9 { - left: 75%; - } - .col-md-push-8 { - left: 66.66666667%; - } - .col-md-push-7 { - left: 58.33333333%; - } - .col-md-push-6 { - left: 50%; - } - .col-md-push-5 { - left: 41.66666667%; - } - .col-md-push-4 { - left: 33.33333333%; - } - .col-md-push-3 { - left: 25%; - } - .col-md-push-2 { - left: 16.66666667%; - } - .col-md-push-1 { - left: 8.33333333%; - } - .col-md-push-0 { - left: auto; - } - .col-md-offset-12 { - margin-left: 100%; - } - .col-md-offset-11 { - margin-left: 91.66666667%; - } - .col-md-offset-10 { - margin-left: 83.33333333%; - } - .col-md-offset-9 { - margin-left: 75%; - } - .col-md-offset-8 { - margin-left: 66.66666667%; - } - .col-md-offset-7 { - margin-left: 58.33333333%; - } - .col-md-offset-6 { - margin-left: 50%; - } - .col-md-offset-5 { - margin-left: 41.66666667%; - } - .col-md-offset-4 { - margin-left: 33.33333333%; - } - .col-md-offset-3 { - margin-left: 25%; - } - .col-md-offset-2 { - margin-left: 16.66666667%; - } - .col-md-offset-1 { - margin-left: 8.33333333%; - } - .col-md-offset-0 { - margin-left: 0; - } -} -@media (min-width: 1200px) { - .col-lg-1, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8, .col-lg-9, .col-lg-10, .col-lg-11, .col-lg-12 { - float: left; - } - .col-lg-12 { - width: 100%; - } - .col-lg-11 { - width: 91.66666667%; - } - .col-lg-10 { - width: 83.33333333%; - } - .col-lg-9 { - width: 75%; - } - .col-lg-8 { - width: 66.66666667%; - } - .col-lg-7 { - width: 58.33333333%; - } - .col-lg-6 { - width: 50%; - } - .col-lg-5 { - width: 41.66666667%; - } - .col-lg-4 { - width: 33.33333333%; - } - .col-lg-3 { - width: 25%; - } - .col-lg-2 { - width: 16.66666667%; - } - .col-lg-1 { - width: 8.33333333%; - } - .col-lg-pull-12 { - right: 100%; - } - .col-lg-pull-11 { - right: 91.66666667%; - } - .col-lg-pull-10 { - right: 83.33333333%; - } - .col-lg-pull-9 { - right: 75%; - } - .col-lg-pull-8 { - right: 66.66666667%; - } - .col-lg-pull-7 { - right: 58.33333333%; - } - .col-lg-pull-6 { - right: 50%; - } - .col-lg-pull-5 { - right: 41.66666667%; - } - .col-lg-pull-4 { - right: 33.33333333%; - } - .col-lg-pull-3 { - right: 25%; - } - .col-lg-pull-2 { - right: 16.66666667%; - } - .col-lg-pull-1 { - right: 8.33333333%; - } - .col-lg-pull-0 { - right: auto; - } - .col-lg-push-12 { - left: 100%; - } - .col-lg-push-11 { - left: 91.66666667%; - } - .col-lg-push-10 { - left: 83.33333333%; - } - .col-lg-push-9 { - left: 75%; - } - .col-lg-push-8 { - left: 66.66666667%; - } - .col-lg-push-7 { - left: 58.33333333%; - } - .col-lg-push-6 { - left: 50%; - } - .col-lg-push-5 { - left: 41.66666667%; - } - .col-lg-push-4 { - left: 33.33333333%; - } - .col-lg-push-3 { - left: 25%; - } - .col-lg-push-2 { - left: 16.66666667%; - } - .col-lg-push-1 { - left: 8.33333333%; - } - .col-lg-push-0 { - left: auto; - } - .col-lg-offset-12 { - margin-left: 100%; - } - .col-lg-offset-11 { - margin-left: 91.66666667%; - } - .col-lg-offset-10 { - margin-left: 83.33333333%; - } - .col-lg-offset-9 { - margin-left: 75%; - } - .col-lg-offset-8 { - margin-left: 66.66666667%; - } - .col-lg-offset-7 { - margin-left: 58.33333333%; - } - .col-lg-offset-6 { - margin-left: 50%; - } - .col-lg-offset-5 { - margin-left: 41.66666667%; - } - .col-lg-offset-4 { - margin-left: 33.33333333%; - } - .col-lg-offset-3 { - margin-left: 25%; - } - .col-lg-offset-2 { - margin-left: 16.66666667%; - } - .col-lg-offset-1 { - margin-left: 8.33333333%; - } - .col-lg-offset-0 { - margin-left: 0; - } -} -table { - background-color: transparent; -} -caption { - padding-top: 8px; - padding-bottom: 8px; - color: #777; - text-align: left; -} -th { - text-align: left; -} -.table { - width: 100%; - max-width: 100%; - margin-bottom: 20px; -} -.table > thead > tr > th, -.table > tbody > tr > th, -.table > tfoot > tr > th, -.table > thead > tr > td, -.table > tbody > tr > td, -.table > tfoot > tr > td { - padding: 8px; - line-height: 1.42857143; - vertical-align: top; - border-top: 1px solid #ddd; -} -.table > thead > tr > th { - vertical-align: bottom; - border-bottom: 2px solid #ddd; -} -.table > caption + thead > tr:first-child > th, -.table > colgroup + thead > tr:first-child > th, -.table > thead:first-child > tr:first-child > th, -.table > caption + thead > tr:first-child > td, -.table > colgroup + thead > tr:first-child > td, -.table > thead:first-child > tr:first-child > td { - border-top: 0; -} -.table > tbody + tbody { - border-top: 2px solid #ddd; -} -.table .table { - background-color: #fff; -} -.table-condensed > thead > tr > th, -.table-condensed > tbody > tr > th, -.table-condensed > tfoot > tr > th, -.table-condensed > thead > tr > td, -.table-condensed > tbody > tr > td, -.table-condensed > tfoot > tr > td { - padding: 5px; -} -.table-bordered { - border: 1px solid #ddd; -} -.table-bordered > thead > tr > th, -.table-bordered > tbody > tr > th, -.table-bordered > tfoot > tr > th, -.table-bordered > thead > tr > td, -.table-bordered > tbody > tr > td, -.table-bordered > tfoot > tr > td { - border: 1px solid #ddd; -} -.table-bordered > thead > tr > th, -.table-bordered > thead > tr > td { - border-bottom-width: 2px; -} -.table-striped > tbody > tr:nth-child(odd) { - background-color: #f9f9f9; -} -.table-hover > tbody > tr:hover { - background-color: #f5f5f5; -} -table col[class*="col-"] { - position: static; - display: table-column; - float: none; -} -table td[class*="col-"], -table th[class*="col-"] { - position: static; - display: table-cell; - float: none; -} -.table > thead > tr > td.active, -.table > tbody > tr > td.active, -.table > tfoot > tr > td.active, -.table > thead > tr > th.active, -.table > tbody > tr > th.active, -.table > tfoot > tr > th.active, -.table > thead > tr.active > td, -.table > tbody > tr.active > td, -.table > tfoot > tr.active > td, -.table > thead > tr.active > th, -.table > tbody > tr.active > th, -.table > tfoot > tr.active > th { - background-color: #f5f5f5; -} -.table-hover > tbody > tr > td.active:hover, -.table-hover > tbody > tr > th.active:hover, -.table-hover > tbody > tr.active:hover > td, -.table-hover > tbody > tr:hover > .active, -.table-hover > tbody > tr.active:hover > th { - background-color: #e8e8e8; -} -.table > thead > tr > td.success, -.table > tbody > tr > td.success, -.table > tfoot > tr > td.success, -.table > thead > tr > th.success, -.table > tbody > tr > th.success, -.table > tfoot > tr > th.success, -.table > thead > tr.success > td, -.table > tbody > tr.success > td, -.table > tfoot > tr.success > td, -.table > thead > tr.success > th, -.table > tbody > tr.success > th, -.table > tfoot > tr.success > th { - background-color: #dff0d8; -} -.table-hover > tbody > tr > td.success:hover, -.table-hover > tbody > tr > th.success:hover, -.table-hover > tbody > tr.success:hover > td, -.table-hover > tbody > tr:hover > .success, -.table-hover > tbody > tr.success:hover > th { - background-color: #d0e9c6; -} -.table > thead > tr > td.info, -.table > tbody > tr > td.info, -.table > tfoot > tr > td.info, -.table > thead > tr > th.info, -.table > tbody > tr > th.info, -.table > tfoot > tr > th.info, -.table > thead > tr.info > td, -.table > tbody > tr.info > td, -.table > tfoot > tr.info > td, -.table > thead > tr.info > th, -.table > tbody > tr.info > th, -.table > tfoot > tr.info > th { - background-color: #d9edf7; -} -.table-hover > tbody > tr > td.info:hover, -.table-hover > tbody > tr > th.info:hover, -.table-hover > tbody > tr.info:hover > td, -.table-hover > tbody > tr:hover > .info, -.table-hover > tbody > tr.info:hover > th { - background-color: #c4e3f3; -} -.table > thead > tr > td.warning, -.table > tbody > tr > td.warning, -.table > tfoot > tr > td.warning, -.table > thead > tr > th.warning, -.table > tbody > tr > th.warning, -.table > tfoot > tr > th.warning, -.table > thead > tr.warning > td, -.table > tbody > tr.warning > td, -.table > tfoot > tr.warning > td, -.table > thead > tr.warning > th, -.table > tbody > tr.warning > th, -.table > tfoot > tr.warning > th { - background-color: #fcf8e3; -} -.table-hover > tbody > tr > td.warning:hover, -.table-hover > tbody > tr > th.warning:hover, -.table-hover > tbody > tr.warning:hover > td, -.table-hover > tbody > tr:hover > .warning, -.table-hover > tbody > tr.warning:hover > th { - background-color: #faf2cc; -} -.table > thead > tr > td.danger, -.table > tbody > tr > td.danger, -.table > tfoot > tr > td.danger, -.table > thead > tr > th.danger, -.table > tbody > tr > th.danger, -.table > tfoot > tr > th.danger, -.table > thead > tr.danger > td, -.table > tbody > tr.danger > td, -.table > tfoot > tr.danger > td, -.table > thead > tr.danger > th, -.table > tbody > tr.danger > th, -.table > tfoot > tr.danger > th { - background-color: #f2dede; -} -.table-hover > tbody > tr > td.danger:hover, -.table-hover > tbody > tr > th.danger:hover, -.table-hover > tbody > tr.danger:hover > td, -.table-hover > tbody > tr:hover > .danger, -.table-hover > tbody > tr.danger:hover > th { - background-color: #ebcccc; -} -.table-responsive { - min-height: .01%; - overflow-x: auto; -} -@media screen and (max-width: 767px) { - .table-responsive { - width: 100%; - margin-bottom: 15px; - overflow-y: hidden; - -ms-overflow-style: -ms-autohiding-scrollbar; - border: 1px solid #ddd; - } - .table-responsive > .table { - margin-bottom: 0; - } - .table-responsive > .table > thead > tr > th, - .table-responsive > .table > tbody > tr > th, - .table-responsive > .table > tfoot > tr > th, - .table-responsive > .table > thead > tr > td, - .table-responsive > .table > tbody > tr > td, - .table-responsive > .table > tfoot > tr > td { - white-space: nowrap; - } - .table-responsive > .table-bordered { - border: 0; - } - .table-responsive > .table-bordered > thead > tr > th:first-child, - .table-responsive > .table-bordered > tbody > tr > th:first-child, - .table-responsive > .table-bordered > tfoot > tr > th:first-child, - .table-responsive > .table-bordered > thead > tr > td:first-child, - .table-responsive > .table-bordered > tbody > tr > td:first-child, - .table-responsive > .table-bordered > tfoot > tr > td:first-child { - border-left: 0; - } - .table-responsive > .table-bordered > thead > tr > th:last-child, - .table-responsive > .table-bordered > tbody > tr > th:last-child, - .table-responsive > .table-bordered > tfoot > tr > th:last-child, - .table-responsive > .table-bordered > thead > tr > td:last-child, - .table-responsive > .table-bordered > tbody > tr > td:last-child, - .table-responsive > .table-bordered > tfoot > tr > td:last-child { - border-right: 0; - } - .table-responsive > .table-bordered > tbody > tr:last-child > th, - .table-responsive > .table-bordered > tfoot > tr:last-child > th, - .table-responsive > .table-bordered > tbody > tr:last-child > td, - .table-responsive > .table-bordered > tfoot > tr:last-child > td { - border-bottom: 0; - } -} -fieldset { - min-width: 0; - padding: 0; - margin: 0; - border: 0; -} -legend { - display: block; - width: 100%; - padding: 0; - margin-bottom: 20px; - font-size: 21px; - line-height: inherit; - color: #333; - border: 0; - border-bottom: 1px solid #e5e5e5; -} -label { - display: inline-block; - max-width: 100%; - margin-bottom: 5px; - font-weight: bold; -} -input[type="search"] { - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; -} -input[type="radio"], -input[type="checkbox"] { - margin: 4px 0 0; - margin-top: 1px \9; - line-height: normal; -} -input[type="file"] { - display: block; -} -input[type="range"] { - display: block; - width: 100%; -} -select[multiple], -select[size] { - height: auto; -} -input[type="file"]:focus, -input[type="radio"]:focus, -input[type="checkbox"]:focus { - outline: thin dotted; - outline: 5px auto -webkit-focus-ring-color; - outline-offset: -2px; -} -output { - display: block; - padding-top: 7px; - font-size: 14px; - line-height: 1.42857143; - color: #555; -} -.form-control { - display: block; - width: 100%; - height: 34px; - padding: 6px 12px; - font-size: 14px; - line-height: 1.42857143; - color: #555; - background-color: #fff; - background-image: none; - border: 1px solid #ccc; - border-radius: 4px; - -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); - box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); - -webkit-transition: border-color ease-in-out .15s, -webkit-box-shadow ease-in-out .15s; - -o-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s; - transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s; -} -.form-control:focus { - border-color: #66afe9; - outline: 0; - -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, .6); - box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, .6); -} -.form-control::-moz-placeholder { - color: #999; - opacity: 1; -} -.form-control:-ms-input-placeholder { - color: #999; -} -.form-control::-webkit-input-placeholder { - color: #999; -} -.form-control[disabled], -.form-control[readonly], -fieldset[disabled] .form-control { - cursor: not-allowed; - background-color: #eee; - opacity: 1; -} -textarea.form-control { - height: auto; -} -input[type="search"] { - -webkit-appearance: none; -} -@media screen and (-webkit-min-device-pixel-ratio: 0) { - input[type="date"], - input[type="time"], - input[type="datetime-local"], - input[type="month"] { - line-height: 34px; - } - input[type="date"].input-sm, - input[type="time"].input-sm, - input[type="datetime-local"].input-sm, - input[type="month"].input-sm { - line-height: 30px; - } - input[type="date"].input-lg, - input[type="time"].input-lg, - input[type="datetime-local"].input-lg, - input[type="month"].input-lg { - line-height: 46px; - } -} -.form-group { - margin-bottom: 15px; -} -.radio, -.checkbox { - position: relative; - display: block; - margin-top: 10px; - margin-bottom: 10px; -} -.radio label, -.checkbox label { - min-height: 20px; - padding-left: 20px; - margin-bottom: 0; - font-weight: normal; - cursor: pointer; -} -.radio input[type="radio"], -.radio-inline input[type="radio"], -.checkbox input[type="checkbox"], -.checkbox-inline input[type="checkbox"] { - position: absolute; - margin-top: 4px \9; - margin-left: -20px; -} -.radio + .radio, -.checkbox + .checkbox { - margin-top: -5px; -} -.radio-inline, -.checkbox-inline { - display: inline-block; - padding-left: 20px; - margin-bottom: 0; - font-weight: normal; - vertical-align: middle; - cursor: pointer; -} -.radio-inline + .radio-inline, -.checkbox-inline + .checkbox-inline { - margin-top: 0; - margin-left: 10px; -} -input[type="radio"][disabled], -input[type="checkbox"][disabled], -input[type="radio"].disabled, -input[type="checkbox"].disabled, -fieldset[disabled] input[type="radio"], -fieldset[disabled] input[type="checkbox"] { - cursor: not-allowed; -} -.radio-inline.disabled, -.checkbox-inline.disabled, -fieldset[disabled] .radio-inline, -fieldset[disabled] .checkbox-inline { - cursor: not-allowed; -} -.radio.disabled label, -.checkbox.disabled label, -fieldset[disabled] .radio label, -fieldset[disabled] .checkbox label { - cursor: not-allowed; -} -.form-control-static { - padding-top: 7px; - padding-bottom: 7px; - margin-bottom: 0; -} -.form-control-static.input-lg, -.form-control-static.input-sm { - padding-right: 0; - padding-left: 0; -} -.input-sm, -.form-group-sm .form-control { - height: 30px; - padding: 5px 10px; - font-size: 12px; - line-height: 1.5; - border-radius: 3px; -} -select.input-sm, -select.form-group-sm .form-control { - height: 30px; - line-height: 30px; -} -textarea.input-sm, -textarea.form-group-sm .form-control, -select[multiple].input-sm, -select[multiple].form-group-sm .form-control { - height: auto; -} -.input-lg, -.form-group-lg .form-control { - height: 46px; - padding: 10px 16px; - font-size: 18px; - line-height: 1.33; - border-radius: 6px; -} -select.input-lg, -select.form-group-lg .form-control { - height: 46px; - line-height: 46px; -} -textarea.input-lg, -textarea.form-group-lg .form-control, -select[multiple].input-lg, -select[multiple].form-group-lg .form-control { - height: auto; -} -.has-feedback { - position: relative; -} -.has-feedback .form-control { - padding-right: 42.5px; -} -.form-control-feedback { - position: absolute; - top: 0; - right: 0; - z-index: 2; - display: block; - width: 34px; - height: 34px; - line-height: 34px; - text-align: center; - pointer-events: none; -} -.input-lg + .form-control-feedback { - width: 46px; - height: 46px; - line-height: 46px; -} -.input-sm + .form-control-feedback { - width: 30px; - height: 30px; - line-height: 30px; -} -.has-success .help-block, -.has-success .control-label, -.has-success .radio, -.has-success .checkbox, -.has-success .radio-inline, -.has-success .checkbox-inline, -.has-success.radio label, -.has-success.checkbox label, -.has-success.radio-inline label, -.has-success.checkbox-inline label { - color: #3c763d; -} -.has-success .form-control { - border-color: #3c763d; - -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); - box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); -} -.has-success .form-control:focus { - border-color: #2b542c; - -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #67b168; - box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #67b168; -} -.has-success .input-group-addon { - color: #3c763d; - background-color: #dff0d8; - border-color: #3c763d; -} -.has-success .form-control-feedback { - color: #3c763d; -} -.has-warning .help-block, -.has-warning .control-label, -.has-warning .radio, -.has-warning .checkbox, -.has-warning .radio-inline, -.has-warning .checkbox-inline, -.has-warning.radio label, -.has-warning.checkbox label, -.has-warning.radio-inline label, -.has-warning.checkbox-inline label { - color: #8a6d3b; -} -.has-warning .form-control { - border-color: #8a6d3b; - -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); - box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); -} -.has-warning .form-control:focus { - border-color: #66512c; - -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #c0a16b; - box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #c0a16b; -} -.has-warning .input-group-addon { - color: #8a6d3b; - background-color: #fcf8e3; - border-color: #8a6d3b; -} -.has-warning .form-control-feedback { - color: #8a6d3b; -} -.has-error .help-block, -.has-error .control-label, -.has-error .radio, -.has-error .checkbox, -.has-error .radio-inline, -.has-error .checkbox-inline, -.has-error.radio label, -.has-error.checkbox label, -.has-error.radio-inline label, -.has-error.checkbox-inline label { - color: #a94442; -} -.has-error .form-control { - border-color: #a94442; - -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); - box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); -} -.has-error .form-control:focus { - border-color: #843534; - -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #ce8483; - box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #ce8483; -} -.has-error .input-group-addon { - color: #a94442; - background-color: #f2dede; - border-color: #a94442; -} -.has-error .form-control-feedback { - color: #a94442; -} -.has-feedback label ~ .form-control-feedback { - top: 25px; -} -.has-feedback label.sr-only ~ .form-control-feedback { - top: 0; -} -.help-block { - display: block; - margin-top: 5px; - margin-bottom: 10px; - color: #737373; -} -@media (min-width: 768px) { - .form-inline .form-group { - display: inline-block; - margin-bottom: 0; - vertical-align: middle; - } - .form-inline .form-control { - display: inline-block; - width: auto; - vertical-align: middle; - } - .form-inline .form-control-static { - display: inline-block; - } - .form-inline .input-group { - display: inline-table; - vertical-align: middle; - } - .form-inline .input-group .input-group-addon, - .form-inline .input-group .input-group-btn, - .form-inline .input-group .form-control { - width: auto; - } - .form-inline .input-group > .form-control { - width: 100%; - } - .form-inline .control-label { - margin-bottom: 0; - vertical-align: middle; - } - .form-inline .radio, - .form-inline .checkbox { - display: inline-block; - margin-top: 0; - margin-bottom: 0; - vertical-align: middle; - } - .form-inline .radio label, - .form-inline .checkbox label { - padding-left: 0; - } - .form-inline .radio input[type="radio"], - .form-inline .checkbox input[type="checkbox"] { - position: relative; - margin-left: 0; - } - .form-inline .has-feedback .form-control-feedback { - top: 0; - } -} -.form-horizontal .radio, -.form-horizontal .checkbox, -.form-horizontal .radio-inline, -.form-horizontal .checkbox-inline { - padding-top: 7px; - margin-top: 0; - margin-bottom: 0; -} -.form-horizontal .radio, -.form-horizontal .checkbox { - min-height: 27px; -} -.form-horizontal .form-group { - margin-right: -15px; - margin-left: -15px; -} -@media (min-width: 768px) { - .form-horizontal .control-label { - padding-top: 7px; - margin-bottom: 0; - text-align: right; - } -} -.form-horizontal .has-feedback .form-control-feedback { - right: 15px; -} -@media (min-width: 768px) { - .form-horizontal .form-group-lg .control-label { - padding-top: 14.3px; - } -} -@media (min-width: 768px) { - .form-horizontal .form-group-sm .control-label { - padding-top: 6px; - } -} -.btn { - display: inline-block; - padding: 6px 12px; - margin-bottom: 0; - font-size: 14px; - font-weight: normal; - line-height: 1.42857143; - text-align: center; - white-space: nowrap; - vertical-align: middle; - -ms-touch-action: manipulation; - touch-action: manipulation; - cursor: pointer; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; - background-image: none; - border: 1px solid transparent; - border-radius: 4px; -} -.btn:focus, -.btn:active:focus, -.btn.active:focus, -.btn.focus, -.btn:active.focus, -.btn.active.focus { - outline: thin dotted; - outline: 5px auto -webkit-focus-ring-color; - outline-offset: -2px; -} -.btn:hover, -.btn:focus, -.btn.focus { - color: #333; - text-decoration: none; -} -.btn:active, -.btn.active { - background-image: none; - outline: 0; - -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125); - box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125); -} -.btn.disabled, -.btn[disabled], -fieldset[disabled] .btn { - pointer-events: none; - cursor: not-allowed; - filter: alpha(opacity=65); - -webkit-box-shadow: none; - box-shadow: none; - opacity: .65; -} -.btn-default { - color: #333; - background-color: #fff; - border-color: #ccc; -} -.btn-default:hover, -.btn-default:focus, -.btn-default.focus, -.btn-default:active, -.btn-default.active, -.open > .dropdown-toggle.btn-default { - color: #333; - background-color: #e6e6e6; - border-color: #adadad; -} -.btn-default:active, -.btn-default.active, -.open > .dropdown-toggle.btn-default { - background-image: none; -} -.btn-default.disabled, -.btn-default[disabled], -fieldset[disabled] .btn-default, -.btn-default.disabled:hover, -.btn-default[disabled]:hover, -fieldset[disabled] .btn-default:hover, -.btn-default.disabled:focus, -.btn-default[disabled]:focus, -fieldset[disabled] .btn-default:focus, -.btn-default.disabled.focus, -.btn-default[disabled].focus, -fieldset[disabled] .btn-default.focus, -.btn-default.disabled:active, -.btn-default[disabled]:active, -fieldset[disabled] .btn-default:active, -.btn-default.disabled.active, -.btn-default[disabled].active, -fieldset[disabled] .btn-default.active { - background-color: #fff; - border-color: #ccc; -} -.btn-default .badge { - color: #fff; - background-color: #333; -} -.btn-primary { - color: #fff; - background-color: #337ab7; - border-color: #2e6da4; -} -.btn-primary:hover, -.btn-primary:focus, -.btn-primary.focus, -.btn-primary:active, -.btn-primary.active, -.open > .dropdown-toggle.btn-primary { - color: #fff; - background-color: #286090; - border-color: #204d74; -} -.btn-primary:active, -.btn-primary.active, -.open > .dropdown-toggle.btn-primary { - background-image: none; -} -.btn-primary.disabled, -.btn-primary[disabled], -fieldset[disabled] .btn-primary, -.btn-primary.disabled:hover, -.btn-primary[disabled]:hover, -fieldset[disabled] .btn-primary:hover, -.btn-primary.disabled:focus, -.btn-primary[disabled]:focus, -fieldset[disabled] .btn-primary:focus, -.btn-primary.disabled.focus, -.btn-primary[disabled].focus, -fieldset[disabled] .btn-primary.focus, -.btn-primary.disabled:active, -.btn-primary[disabled]:active, -fieldset[disabled] .btn-primary:active, -.btn-primary.disabled.active, -.btn-primary[disabled].active, -fieldset[disabled] .btn-primary.active { - background-color: #337ab7; - border-color: #2e6da4; -} -.btn-primary .badge { - color: #337ab7; - background-color: #fff; -} -.btn-success { - color: #fff; - background-color: #5cb85c; - border-color: #4cae4c; -} -.btn-success:hover, -.btn-success:focus, -.btn-success.focus, -.btn-success:active, -.btn-success.active, -.open > .dropdown-toggle.btn-success { - color: #fff; - background-color: #449d44; - border-color: #398439; -} -.btn-success:active, -.btn-success.active, -.open > .dropdown-toggle.btn-success { - background-image: none; -} -.btn-success.disabled, -.btn-success[disabled], -fieldset[disabled] .btn-success, -.btn-success.disabled:hover, -.btn-success[disabled]:hover, -fieldset[disabled] .btn-success:hover, -.btn-success.disabled:focus, -.btn-success[disabled]:focus, -fieldset[disabled] .btn-success:focus, -.btn-success.disabled.focus, -.btn-success[disabled].focus, -fieldset[disabled] .btn-success.focus, -.btn-success.disabled:active, -.btn-success[disabled]:active, -fieldset[disabled] .btn-success:active, -.btn-success.disabled.active, -.btn-success[disabled].active, -fieldset[disabled] .btn-success.active { - background-color: #5cb85c; - border-color: #4cae4c; -} -.btn-success .badge { - color: #5cb85c; - background-color: #fff; -} -.btn-info { - color: #fff; - background-color: #5bc0de; - border-color: #46b8da; -} -.btn-info:hover, -.btn-info:focus, -.btn-info.focus, -.btn-info:active, -.btn-info.active, -.open > .dropdown-toggle.btn-info { - color: #fff; - background-color: #31b0d5; - border-color: #269abc; -} -.btn-info:active, -.btn-info.active, -.open > .dropdown-toggle.btn-info { - background-image: none; -} -.btn-info.disabled, -.btn-info[disabled], -fieldset[disabled] .btn-info, -.btn-info.disabled:hover, -.btn-info[disabled]:hover, -fieldset[disabled] .btn-info:hover, -.btn-info.disabled:focus, -.btn-info[disabled]:focus, -fieldset[disabled] .btn-info:focus, -.btn-info.disabled.focus, -.btn-info[disabled].focus, -fieldset[disabled] .btn-info.focus, -.btn-info.disabled:active, -.btn-info[disabled]:active, -fieldset[disabled] .btn-info:active, -.btn-info.disabled.active, -.btn-info[disabled].active, -fieldset[disabled] .btn-info.active { - background-color: #5bc0de; - border-color: #46b8da; -} -.btn-info .badge { - color: #5bc0de; - background-color: #fff; -} -.btn-warning { - color: #fff; - background-color: #f0ad4e; - border-color: #eea236; -} -.btn-warning:hover, -.btn-warning:focus, -.btn-warning.focus, -.btn-warning:active, -.btn-warning.active, -.open > .dropdown-toggle.btn-warning { - color: #fff; - background-color: #ec971f; - border-color: #d58512; -} -.btn-warning:active, -.btn-warning.active, -.open > .dropdown-toggle.btn-warning { - background-image: none; -} -.btn-warning.disabled, -.btn-warning[disabled], -fieldset[disabled] .btn-warning, -.btn-warning.disabled:hover, -.btn-warning[disabled]:hover, -fieldset[disabled] .btn-warning:hover, -.btn-warning.disabled:focus, -.btn-warning[disabled]:focus, -fieldset[disabled] .btn-warning:focus, -.btn-warning.disabled.focus, -.btn-warning[disabled].focus, -fieldset[disabled] .btn-warning.focus, -.btn-warning.disabled:active, -.btn-warning[disabled]:active, -fieldset[disabled] .btn-warning:active, -.btn-warning.disabled.active, -.btn-warning[disabled].active, -fieldset[disabled] .btn-warning.active { - background-color: #f0ad4e; - border-color: #eea236; -} -.btn-warning .badge { - color: #f0ad4e; - background-color: #fff; -} -.btn-danger { - color: #fff; - background-color: #d9534f; - border-color: #d43f3a; -} -.btn-danger:hover, -.btn-danger:focus, -.btn-danger.focus, -.btn-danger:active, -.btn-danger.active, -.open > .dropdown-toggle.btn-danger { - color: #fff; - background-color: #c9302c; - border-color: #ac2925; -} -.btn-danger:active, -.btn-danger.active, -.open > .dropdown-toggle.btn-danger { - background-image: none; -} -.btn-danger.disabled, -.btn-danger[disabled], -fieldset[disabled] .btn-danger, -.btn-danger.disabled:hover, -.btn-danger[disabled]:hover, -fieldset[disabled] .btn-danger:hover, -.btn-danger.disabled:focus, -.btn-danger[disabled]:focus, -fieldset[disabled] .btn-danger:focus, -.btn-danger.disabled.focus, -.btn-danger[disabled].focus, -fieldset[disabled] .btn-danger.focus, -.btn-danger.disabled:active, -.btn-danger[disabled]:active, -fieldset[disabled] .btn-danger:active, -.btn-danger.disabled.active, -.btn-danger[disabled].active, -fieldset[disabled] .btn-danger.active { - background-color: #d9534f; - border-color: #d43f3a; -} -.btn-danger .badge { - color: #d9534f; - background-color: #fff; -} -.btn-link { - font-weight: normal; - color: #337ab7; - border-radius: 0; -} -.btn-link, -.btn-link:active, -.btn-link.active, -.btn-link[disabled], -fieldset[disabled] .btn-link { - background-color: transparent; - -webkit-box-shadow: none; - box-shadow: none; -} -.btn-link, -.btn-link:hover, -.btn-link:focus, -.btn-link:active { - border-color: transparent; -} -.btn-link:hover, -.btn-link:focus { - color: #23527c; - text-decoration: underline; - background-color: transparent; -} -.btn-link[disabled]:hover, -fieldset[disabled] .btn-link:hover, -.btn-link[disabled]:focus, -fieldset[disabled] .btn-link:focus { - color: #777; - text-decoration: none; -} -.btn-lg, -.btn-group-lg > .btn { - padding: 10px 16px; - font-size: 18px; - line-height: 1.33; - border-radius: 6px; -} -.btn-sm, -.btn-group-sm > .btn { - padding: 5px 10px; - font-size: 12px; - line-height: 1.5; - border-radius: 3px; -} -.btn-xs, -.btn-group-xs > .btn { - padding: 1px 5px; - font-size: 12px; - line-height: 1.5; - border-radius: 3px; -} -.btn-block { - display: block; - width: 100%; -} -.btn-block + .btn-block { - margin-top: 5px; -} -input[type="submit"].btn-block, -input[type="reset"].btn-block, -input[type="button"].btn-block { - width: 100%; -} -.fade { - opacity: 0; - -webkit-transition: opacity .15s linear; - -o-transition: opacity .15s linear; - transition: opacity .15s linear; -} -.fade.in { - opacity: 1; -} -.collapse { - display: none; - visibility: hidden; -} -.collapse.in { - display: block; - visibility: visible; -} -tr.collapse.in { - display: table-row; -} -tbody.collapse.in { - display: table-row-group; -} -.collapsing { - position: relative; - height: 0; - overflow: hidden; - -webkit-transition-timing-function: ease; - -o-transition-timing-function: ease; - transition-timing-function: ease; - -webkit-transition-duration: .35s; - -o-transition-duration: .35s; - transition-duration: .35s; - -webkit-transition-property: height, visibility; - -o-transition-property: height, visibility; - transition-property: height, visibility; -} -.caret { - display: inline-block; - width: 0; - height: 0; - margin-left: 2px; - vertical-align: middle; - border-top: 4px solid; - border-right: 4px solid transparent; - border-left: 4px solid transparent; -} -.dropdown { - position: relative; -} -.dropdown-toggle:focus { - outline: 0; -} -.dropdown-menu { - position: absolute; - top: 100%; - left: 0; - z-index: 1000; - display: none; - float: left; - min-width: 160px; - padding: 5px 0; - margin: 2px 0 0; - font-size: 14px; - text-align: left; - list-style: none; - background-color: #fff; - -webkit-background-clip: padding-box; - background-clip: padding-box; - border: 1px solid #ccc; - border: 1px solid rgba(0, 0, 0, .15); - border-radius: 4px; - -webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, .175); - box-shadow: 0 6px 12px rgba(0, 0, 0, .175); -} -.dropdown-menu.pull-right { - right: 0; - left: auto; -} -.dropdown-menu .divider { - height: 1px; - margin: 9px 0; - overflow: hidden; - background-color: #e5e5e5; -} -.dropdown-menu > li > a { - display: block; - padding: 3px 20px; - clear: both; - font-weight: normal; - line-height: 1.42857143; - color: #333; - white-space: nowrap; -} -.dropdown-menu > li > a:hover, -.dropdown-menu > li > a:focus { - color: #262626; - text-decoration: none; - background-color: #f5f5f5; -} -.dropdown-menu > .active > a, -.dropdown-menu > .active > a:hover, -.dropdown-menu > .active > a:focus { - color: #fff; - text-decoration: none; - background-color: #337ab7; - outline: 0; -} -.dropdown-menu > .disabled > a, -.dropdown-menu > .disabled > a:hover, -.dropdown-menu > .disabled > a:focus { - color: #777; -} -.dropdown-menu > .disabled > a:hover, -.dropdown-menu > .disabled > a:focus { - text-decoration: none; - cursor: not-allowed; - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); -} -.open > .dropdown-menu { - display: block; -} -.open > a { - outline: 0; -} -.dropdown-menu-right { - right: 0; - left: auto; -} -.dropdown-menu-left { - right: auto; - left: 0; -} -.dropdown-header { - display: block; - padding: 3px 20px; - font-size: 12px; - line-height: 1.42857143; - color: #777; - white-space: nowrap; -} -.dropdown-backdrop { - position: fixed; - top: 0; - right: 0; - bottom: 0; - left: 0; - z-index: 990; -} -.pull-right > .dropdown-menu { - right: 0; - left: auto; -} -.dropup .caret, -.navbar-fixed-bottom .dropdown .caret { - content: ""; - border-top: 0; - border-bottom: 4px solid; -} -.dropup .dropdown-menu, -.navbar-fixed-bottom .dropdown .dropdown-menu { - top: auto; - bottom: 100%; - margin-bottom: 1px; -} -@media (min-width: 768px) { - .navbar-right .dropdown-menu { - right: 0; - left: auto; - } - .navbar-right .dropdown-menu-left { - right: auto; - left: 0; - } -} -.btn-group, -.btn-group-vertical { - position: relative; - display: inline-block; - vertical-align: middle; -} -.btn-group > .btn, -.btn-group-vertical > .btn { - position: relative; - float: left; -} -.btn-group > .btn:hover, -.btn-group-vertical > .btn:hover, -.btn-group > .btn:focus, -.btn-group-vertical > .btn:focus, -.btn-group > .btn:active, -.btn-group-vertical > .btn:active, -.btn-group > .btn.active, -.btn-group-vertical > .btn.active { - z-index: 2; -} -.btn-group .btn + .btn, -.btn-group .btn + .btn-group, -.btn-group .btn-group + .btn, -.btn-group .btn-group + .btn-group { - margin-left: -1px; -} -.btn-toolbar { - margin-left: -5px; -} -.btn-toolbar .btn-group, -.btn-toolbar .input-group { - float: left; -} -.btn-toolbar > .btn, -.btn-toolbar > .btn-group, -.btn-toolbar > .input-group { - margin-left: 5px; -} -.btn-group > .btn:not(:first-child):not(:last-child):not(.dropdown-toggle) { - border-radius: 0; -} -.btn-group > .btn:first-child { - margin-left: 0; -} -.btn-group > .btn:first-child:not(:last-child):not(.dropdown-toggle) { - border-top-right-radius: 0; - border-bottom-right-radius: 0; -} -.btn-group > .btn:last-child:not(:first-child), -.btn-group > .dropdown-toggle:not(:first-child) { - border-top-left-radius: 0; - border-bottom-left-radius: 0; -} -.btn-group > .btn-group { - float: left; -} -.btn-group > .btn-group:not(:first-child):not(:last-child) > .btn { - border-radius: 0; -} -.btn-group > .btn-group:first-child > .btn:last-child, -.btn-group > .btn-group:first-child > .dropdown-toggle { - border-top-right-radius: 0; - border-bottom-right-radius: 0; -} -.btn-group > .btn-group:last-child > .btn:first-child { - border-top-left-radius: 0; - border-bottom-left-radius: 0; -} -.btn-group .dropdown-toggle:active, -.btn-group.open .dropdown-toggle { - outline: 0; -} -.btn-group > .btn + .dropdown-toggle { - padding-right: 8px; - padding-left: 8px; -} -.btn-group > .btn-lg + .dropdown-toggle { - padding-right: 12px; - padding-left: 12px; -} -.btn-group.open .dropdown-toggle { - -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125); - box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125); -} -.btn-group.open .dropdown-toggle.btn-link { - -webkit-box-shadow: none; - box-shadow: none; -} -.btn .caret { - margin-left: 0; -} -.btn-lg .caret { - border-width: 5px 5px 0; - border-bottom-width: 0; -} -.dropup .btn-lg .caret { - border-width: 0 5px 5px; -} -.btn-group-vertical > .btn, -.btn-group-vertical > .btn-group, -.btn-group-vertical > .btn-group > .btn { - display: block; - float: none; - width: 100%; - max-width: 100%; -} -.btn-group-vertical > .btn-group > .btn { - float: none; -} -.btn-group-vertical > .btn + .btn, -.btn-group-vertical > .btn + .btn-group, -.btn-group-vertical > .btn-group + .btn, -.btn-group-vertical > .btn-group + .btn-group { - margin-top: -1px; - margin-left: 0; -} -.btn-group-vertical > .btn:not(:first-child):not(:last-child) { - border-radius: 0; -} -.btn-group-vertical > .btn:first-child:not(:last-child) { - border-top-right-radius: 4px; - border-bottom-right-radius: 0; - border-bottom-left-radius: 0; -} -.btn-group-vertical > .btn:last-child:not(:first-child) { - border-top-left-radius: 0; - border-top-right-radius: 0; - border-bottom-left-radius: 4px; -} -.btn-group-vertical > .btn-group:not(:first-child):not(:last-child) > .btn { - border-radius: 0; -} -.btn-group-vertical > .btn-group:first-child:not(:last-child) > .btn:last-child, -.btn-group-vertical > .btn-group:first-child:not(:last-child) > .dropdown-toggle { - border-bottom-right-radius: 0; - border-bottom-left-radius: 0; -} -.btn-group-vertical > .btn-group:last-child:not(:first-child) > .btn:first-child { - border-top-left-radius: 0; - border-top-right-radius: 0; -} -.btn-group-justified { - display: table; - width: 100%; - table-layout: fixed; - border-collapse: separate; -} -.btn-group-justified > .btn, -.btn-group-justified > .btn-group { - display: table-cell; - float: none; - width: 1%; -} -.btn-group-justified > .btn-group .btn { - width: 100%; -} -.btn-group-justified > .btn-group .dropdown-menu { - left: auto; -} -[data-toggle="buttons"] > .btn input[type="radio"], -[data-toggle="buttons"] > .btn-group > .btn input[type="radio"], -[data-toggle="buttons"] > .btn input[type="checkbox"], -[data-toggle="buttons"] > .btn-group > .btn input[type="checkbox"] { - position: absolute; - clip: rect(0, 0, 0, 0); - pointer-events: none; -} -.input-group { - position: relative; - display: table; - border-collapse: separate; -} -.input-group[class*="col-"] { - float: none; - padding-right: 0; - padding-left: 0; -} -.input-group .form-control { - position: relative; - z-index: 2; - float: left; - width: 100%; - margin-bottom: 0; -} -.input-group-lg > .form-control, -.input-group-lg > .input-group-addon, -.input-group-lg > .input-group-btn > .btn { - height: 46px; - padding: 10px 16px; - font-size: 18px; - line-height: 1.33; - border-radius: 6px; -} -select.input-group-lg > .form-control, -select.input-group-lg > .input-group-addon, -select.input-group-lg > .input-group-btn > .btn { - height: 46px; - line-height: 46px; -} -textarea.input-group-lg > .form-control, -textarea.input-group-lg > .input-group-addon, -textarea.input-group-lg > .input-group-btn > .btn, -select[multiple].input-group-lg > .form-control, -select[multiple].input-group-lg > .input-group-addon, -select[multiple].input-group-lg > .input-group-btn > .btn { - height: auto; -} -.input-group-sm > .form-control, -.input-group-sm > .input-group-addon, -.input-group-sm > .input-group-btn > .btn { - height: 30px; - padding: 5px 10px; - font-size: 12px; - line-height: 1.5; - border-radius: 3px; -} -select.input-group-sm > .form-control, -select.input-group-sm > .input-group-addon, -select.input-group-sm > .input-group-btn > .btn { - height: 30px; - line-height: 30px; -} -textarea.input-group-sm > .form-control, -textarea.input-group-sm > .input-group-addon, -textarea.input-group-sm > .input-group-btn > .btn, -select[multiple].input-group-sm > .form-control, -select[multiple].input-group-sm > .input-group-addon, -select[multiple].input-group-sm > .input-group-btn > .btn { - height: auto; -} -.input-group-addon, -.input-group-btn, -.input-group .form-control { - display: table-cell; -} -.input-group-addon:not(:first-child):not(:last-child), -.input-group-btn:not(:first-child):not(:last-child), -.input-group .form-control:not(:first-child):not(:last-child) { - border-radius: 0; -} -.input-group-addon, -.input-group-btn { - width: 1%; - white-space: nowrap; - vertical-align: middle; -} -.input-group-addon { - padding: 6px 12px; - font-size: 14px; - font-weight: normal; - line-height: 1; - color: #555; - text-align: center; - background-color: #eee; - border: 1px solid #ccc; - border-radius: 4px; -} -.input-group-addon.input-sm { - padding: 5px 10px; - font-size: 12px; - border-radius: 3px; -} -.input-group-addon.input-lg { - padding: 10px 16px; - font-size: 18px; - border-radius: 6px; -} -.input-group-addon input[type="radio"], -.input-group-addon input[type="checkbox"] { - margin-top: 0; -} -.input-group .form-control:first-child, -.input-group-addon:first-child, -.input-group-btn:first-child > .btn, -.input-group-btn:first-child > .btn-group > .btn, -.input-group-btn:first-child > .dropdown-toggle, -.input-group-btn:last-child > .btn:not(:last-child):not(.dropdown-toggle), -.input-group-btn:last-child > .btn-group:not(:last-child) > .btn { - border-top-right-radius: 0; - border-bottom-right-radius: 0; -} -.input-group-addon:first-child { - border-right: 0; -} -.input-group .form-control:last-child, -.input-group-addon:last-child, -.input-group-btn:last-child > .btn, -.input-group-btn:last-child > .btn-group > .btn, -.input-group-btn:last-child > .dropdown-toggle, -.input-group-btn:first-child > .btn:not(:first-child), -.input-group-btn:first-child > .btn-group:not(:first-child) > .btn { - border-top-left-radius: 0; - border-bottom-left-radius: 0; -} -.input-group-addon:last-child { - border-left: 0; -} -.input-group-btn { - position: relative; - font-size: 0; - white-space: nowrap; -} -.input-group-btn > .btn { - position: relative; -} -.input-group-btn > .btn + .btn { - margin-left: -1px; -} -.input-group-btn > .btn:hover, -.input-group-btn > .btn:focus, -.input-group-btn > .btn:active { - z-index: 2; -} -.input-group-btn:first-child > .btn, -.input-group-btn:first-child > .btn-group { - margin-right: -1px; -} -.input-group-btn:last-child > .btn, -.input-group-btn:last-child > .btn-group { - margin-left: -1px; -} -.nav { - padding-left: 0; - margin-bottom: 0; - list-style: none; -} -.nav > li { - position: relative; - display: block; -} -.nav > li > a { - position: relative; - display: block; - padding: 10px 15px; -} -.nav > li > a:hover, -.nav > li > a:focus { - text-decoration: none; - background-color: #eee; -} -.nav > li.disabled > a { - color: #777; -} -.nav > li.disabled > a:hover, -.nav > li.disabled > a:focus { - color: #777; - text-decoration: none; - cursor: not-allowed; - background-color: transparent; -} -.nav .open > a, -.nav .open > a:hover, -.nav .open > a:focus { - background-color: #eee; - border-color: #337ab7; -} -.nav .nav-divider { - height: 1px; - margin: 9px 0; - overflow: hidden; - background-color: #e5e5e5; -} -.nav > li > a > img { - max-width: none; -} -.nav-tabs { - border-bottom: 1px solid #ddd; -} -.nav-tabs > li { - float: left; - margin-bottom: -1px; -} -.nav-tabs > li > a { - margin-right: 2px; - line-height: 1.42857143; - border: 1px solid transparent; - border-radius: 4px 4px 0 0; -} -.nav-tabs > li > a:hover { - border-color: #eee #eee #ddd; -} -.nav-tabs > li.active > a, -.nav-tabs > li.active > a:hover, -.nav-tabs > li.active > a:focus { - color: #555; - cursor: default; - background-color: #fff; - border: 1px solid #ddd; - border-bottom-color: transparent; -} -.nav-tabs.nav-justified { - width: 100%; - border-bottom: 0; -} -.nav-tabs.nav-justified > li { - float: none; -} -.nav-tabs.nav-justified > li > a { - margin-bottom: 5px; - text-align: center; -} -.nav-tabs.nav-justified > .dropdown .dropdown-menu { - top: auto; - left: auto; -} -@media (min-width: 768px) { - .nav-tabs.nav-justified > li { - display: table-cell; - width: 1%; - } - .nav-tabs.nav-justified > li > a { - margin-bottom: 0; - } -} -.nav-tabs.nav-justified > li > a { - margin-right: 0; - border-radius: 4px; -} -.nav-tabs.nav-justified > .active > a, -.nav-tabs.nav-justified > .active > a:hover, -.nav-tabs.nav-justified > .active > a:focus { - border: 1px solid #ddd; -} -@media (min-width: 768px) { - .nav-tabs.nav-justified > li > a { - border-bottom: 1px solid #ddd; - border-radius: 4px 4px 0 0; - } - .nav-tabs.nav-justified > .active > a, - .nav-tabs.nav-justified > .active > a:hover, - .nav-tabs.nav-justified > .active > a:focus { - border-bottom-color: #fff; - } -} -.nav-pills > li { - float: left; -} -.nav-pills > li > a { - border-radius: 4px; -} -.nav-pills > li + li { - margin-left: 2px; -} -.nav-pills > li.active > a, -.nav-pills > li.active > a:hover, -.nav-pills > li.active > a:focus { - color: #fff; - background-color: #337ab7; -} -.nav-stacked > li { - float: none; -} -.nav-stacked > li + li { - margin-top: 2px; - margin-left: 0; -} -.nav-justified { - width: 100%; -} -.nav-justified > li { - float: none; -} -.nav-justified > li > a { - margin-bottom: 5px; - text-align: center; -} -.nav-justified > .dropdown .dropdown-menu { - top: auto; - left: auto; -} -@media (min-width: 768px) { - .nav-justified > li { - display: table-cell; - width: 1%; - } - .nav-justified > li > a { - margin-bottom: 0; - } -} -.nav-tabs-justified { - border-bottom: 0; -} -.nav-tabs-justified > li > a { - margin-right: 0; - border-radius: 4px; -} -.nav-tabs-justified > .active > a, -.nav-tabs-justified > .active > a:hover, -.nav-tabs-justified > .active > a:focus { - border: 1px solid #ddd; -} -@media (min-width: 768px) { - .nav-tabs-justified > li > a { - border-bottom: 1px solid #ddd; - border-radius: 4px 4px 0 0; - } - .nav-tabs-justified > .active > a, - .nav-tabs-justified > .active > a:hover, - .nav-tabs-justified > .active > a:focus { - border-bottom-color: #fff; - } -} -.tab-content > .tab-pane { - display: none; - visibility: hidden; -} -.tab-content > .active { - display: block; - visibility: visible; -} -.nav-tabs .dropdown-menu { - margin-top: -1px; - border-top-left-radius: 0; - border-top-right-radius: 0; -} -.navbar { - position: relative; - min-height: 50px; - /*margin-bottom: 20px;*/ - /*border: 1px solid transparent;*/ -} -@media (min-width: 768px) { - .navbar { - border-radius: 4px; - } -} -@media (min-width: 768px) { - .navbar-header { - float: left; - } -} -.navbar-collapse { - padding-right: 15px; - padding-left: 15px; - overflow-x: visible; - -webkit-overflow-scrolling: touch; - border-top: 1px solid transparent; - -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1); - box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1); -} -.navbar-collapse.in { - overflow-y: auto; -} -@media (min-width: 768px) { - .navbar-collapse { - width: auto; - border-top: 0; - -webkit-box-shadow: none; - box-shadow: none; - } - .navbar-collapse.collapse { - display: block !important; - height: auto !important; - padding-bottom: 0; - overflow: visible !important; - visibility: visible !important; - } - .navbar-collapse.in { - overflow-y: visible; - } - .navbar-fixed-top .navbar-collapse, - .navbar-static-top .navbar-collapse, - .navbar-fixed-bottom .navbar-collapse { - padding-right: 0; - padding-left: 0; - } -} -.navbar-fixed-top .navbar-collapse, -.navbar-fixed-bottom .navbar-collapse { - max-height: 340px; -} -@media (max-device-width: 480px) and (orientation: landscape) { - .navbar-fixed-top .navbar-collapse, - .navbar-fixed-bottom .navbar-collapse { - max-height: 200px; - } -} -.container > .navbar-header, -.container-fluid > .navbar-header, -.container > .navbar-collapse, -.container-fluid > .navbar-collapse { - margin-right: -15px; - margin-left: -15px; -} -@media (min-width: 768px) { - .container > .navbar-header, - .container-fluid > .navbar-header, - .container > .navbar-collapse, - .container-fluid > .navbar-collapse { - margin-right: 0; - margin-left: 0; - } -} -.navbar-static-top { - z-index: 1000; - border-width: 0 0 1px; -} -@media (min-width: 768px) { - .navbar-static-top { - border-radius: 0; - } -} -.navbar-fixed-top, -.navbar-fixed-bottom { - position: fixed; - right: 0; - left: 0; - z-index: 1030; -} -@media (min-width: 768px) { - .navbar-fixed-top, - .navbar-fixed-bottom { - border-radius: 0; - } -} -.navbar-fixed-top { - top: 0; - border-width: 0 0 1px; -} -.navbar-fixed-bottom { - bottom: 0; - margin-bottom: 0; - border-width: 1px 0 0; -} -.navbar-brand { - float: left; - height: 50px; - padding: 15px 15px; - font-size: 18px; - line-height: 20px; -} -.navbar-brand:hover, -.navbar-brand:focus { - text-decoration: none; -} -.navbar-brand > img { - display: block; -} -@media (min-width: 768px) { - .navbar > .container .navbar-brand, - .navbar > .container-fluid .navbar-brand { - margin-left: -15px; - } -} -.navbar-toggle { - position: relative; - float: right; - padding: 9px 10px; - margin-top: 8px; - margin-right: 15px; - margin-bottom: 8px; - background-color: transparent; - background-image: none; - border: 1px solid transparent; - border-radius: 4px; -} -.navbar-toggle:focus { - outline: 0; -} -.navbar-toggle .icon-bar { - display: block; - width: 22px; - height: 2px; - border-radius: 1px; -} -.navbar-toggle .icon-bar + .icon-bar { - margin-top: 4px; -} -@media (min-width: 768px) { - .navbar-toggle { - display: none; - } -} -.navbar-nav { - margin: 7.5px -15px; -} -.navbar-nav > li > a { - padding-top: 10px; - padding-bottom: 10px; - line-height: 20px; -} -@media (max-width: 767px) { - .navbar-nav .open .dropdown-menu { - position: static; - float: none; - width: auto; - margin-top: 0; - background-color: transparent; - border: 0; - -webkit-box-shadow: none; - box-shadow: none; - } - .navbar-nav .open .dropdown-menu > li > a, - .navbar-nav .open .dropdown-menu .dropdown-header { - padding: 5px 15px 5px 25px; - } - .navbar-nav .open .dropdown-menu > li > a { - line-height: 20px; - } - .navbar-nav .open .dropdown-menu > li > a:hover, - .navbar-nav .open .dropdown-menu > li > a:focus { - background-image: none; - } -} -@media (min-width: 768px) { - .navbar-nav { - float: left; - margin: 0; - } - .navbar-nav > li { - float: left; - } - .navbar-nav > li > a { - padding-top: 15px; - padding-bottom: 15px; - } -} -.navbar-form { - padding: 10px 15px; - margin-top: 8px; - margin-right: -15px; - margin-bottom: 8px; - margin-left: -15px; - border-top: 1px solid transparent; - border-bottom: 1px solid transparent; - -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 1px 0 rgba(255, 255, 255, .1); - box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 1px 0 rgba(255, 255, 255, .1); -} -@media (min-width: 768px) { - .navbar-form .form-group { - display: inline-block; - margin-bottom: 0; - vertical-align: middle; - } - .navbar-form .form-control { - display: inline-block; - width: auto; - vertical-align: middle; - } - .navbar-form .form-control-static { - display: inline-block; - } - .navbar-form .input-group { - display: inline-table; - vertical-align: middle; - } - .navbar-form .input-group .input-group-addon, - .navbar-form .input-group .input-group-btn, - .navbar-form .input-group .form-control { - width: auto; - } - .navbar-form .input-group > .form-control { - width: 100%; - } - .navbar-form .control-label { - margin-bottom: 0; - vertical-align: middle; - } - .navbar-form .radio, - .navbar-form .checkbox { - display: inline-block; - margin-top: 0; - margin-bottom: 0; - vertical-align: middle; - } - .navbar-form .radio label, - .navbar-form .checkbox label { - padding-left: 0; - } - .navbar-form .radio input[type="radio"], - .navbar-form .checkbox input[type="checkbox"] { - position: relative; - margin-left: 0; - } - .navbar-form .has-feedback .form-control-feedback { - top: 0; - } -} -@media (max-width: 767px) { - .navbar-form .form-group { - margin-bottom: 5px; - } - .navbar-form .form-group:last-child { - margin-bottom: 0; - } -} -@media (min-width: 768px) { - .navbar-form { - width: auto; - padding-top: 0; - padding-bottom: 0; - margin-right: 0; - margin-left: 0; - border: 0; - -webkit-box-shadow: none; - box-shadow: none; - } -} -.navbar-nav > li > .dropdown-menu { - margin-top: 0; - border-top-left-radius: 0; - border-top-right-radius: 0; -} -.navbar-fixed-bottom .navbar-nav > li > .dropdown-menu { - border-top-left-radius: 4px; - border-top-right-radius: 4px; - border-bottom-right-radius: 0; - border-bottom-left-radius: 0; -} -.navbar-btn { - margin-top: 8px; - margin-bottom: 8px; -} -.navbar-btn.btn-sm { - margin-top: 10px; - margin-bottom: 10px; -} -.navbar-btn.btn-xs { - margin-top: 14px; - margin-bottom: 14px; -} -.navbar-text { - margin-top: 15px; - margin-bottom: 15px; -} -@media (min-width: 768px) { - .navbar-text { - float: left; - margin-right: 15px; - margin-left: 15px; - } -} -@media (min-width: 768px) { - .navbar-left { - float: left !important; - } - .navbar-right { - float: right !important; - margin-right: -15px; - } - .navbar-right ~ .navbar-right { - margin-right: 0; - } -} -.navbar-default { - background-color: #f8f8f8; - border-color: #e7e7e7; -} -.navbar-default .navbar-brand { - color: #777; -} -.navbar-default .navbar-brand:hover, -.navbar-default .navbar-brand:focus { - color: #5e5e5e; - background-color: transparent; -} -.navbar-default .navbar-text { - color: #777; -} -.navbar-default .navbar-nav > li > a { - color: #777; -} -.navbar-default .navbar-nav > li > a:hover, -.navbar-default .navbar-nav > li > a:focus { - color: #333; - background-color: transparent; -} -.navbar-default .navbar-nav > .active > a, -.navbar-default .navbar-nav > .active > a:hover, -.navbar-default .navbar-nav > .active > a:focus { - color: #555; - background-color: #e7e7e7; -} -.navbar-default .navbar-nav > .disabled > a, -.navbar-default .navbar-nav > .disabled > a:hover, -.navbar-default .navbar-nav > .disabled > a:focus { - color: #ccc; - background-color: transparent; -} -.navbar-default .navbar-toggle { - border-color: #ddd; -} -.navbar-default .navbar-toggle:hover, -.navbar-default .navbar-toggle:focus { - background-color: #ddd; -} -.navbar-default .navbar-toggle .icon-bar { - background-color: #888; -} -.navbar-default .navbar-collapse, -.navbar-default .navbar-form { - border-color: #e7e7e7; -} -.navbar-default .navbar-nav > .open > a, -.navbar-default .navbar-nav > .open > a:hover, -.navbar-default .navbar-nav > .open > a:focus { - color: #555; - background-color: #e7e7e7; -} -@media (max-width: 767px) { - .navbar-default .navbar-nav .open .dropdown-menu > li > a { - color: #777; - } - .navbar-default .navbar-nav .open .dropdown-menu > li > a:hover, - .navbar-default .navbar-nav .open .dropdown-menu > li > a:focus { - color: #333; - background-color: transparent; - } - .navbar-default .navbar-nav .open .dropdown-menu > .active > a, - .navbar-default .navbar-nav .open .dropdown-menu > .active > a:hover, - .navbar-default .navbar-nav .open .dropdown-menu > .active > a:focus { - color: #555; - background-color: #e7e7e7; - } - .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a, - .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a:hover, - .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a:focus { - color: #ccc; - background-color: transparent; - } -} -.navbar-default .navbar-link { - color: #777; -} -.navbar-default .navbar-link:hover { - color: #333; -} -.navbar-default .btn-link { - color: #777; -} -.navbar-default .btn-link:hover, -.navbar-default .btn-link:focus { - color: #333; -} -.navbar-default .btn-link[disabled]:hover, -fieldset[disabled] .navbar-default .btn-link:hover, -.navbar-default .btn-link[disabled]:focus, -fieldset[disabled] .navbar-default .btn-link:focus { - color: #ccc; -} -.navbar-inverse { - /*background-color: #193053;*/ - /*border-color: #ffffff;*/ -} -.navbar-inverse .navbar-brand { - color: #ffffff; -} -.navbar-inverse .navbar-brand:hover, -.navbar-inverse .navbar-brand:focus { - color: #fff; - background-color: transparent; -} -.navbar-inverse .navbar-text { - color: #ffffff; -} -.navbar-inverse .navbar-nav > li > a { - color: #ffffff; -} -.navbar-inverse .navbar-nav > li > a:hover, -.navbar-inverse .navbar-nav > li > a:focus { - color: #fff; - background-color: transparent; -} -.navbar-inverse .navbar-nav > .active > a, -.navbar-inverse .navbar-nav > .active > a:hover, -.navbar-inverse .navbar-nav > .active > a:focus { - color: #fff; - background-color: #080808; -} -.navbar-inverse .navbar-nav > .disabled > a, -.navbar-inverse .navbar-nav > .disabled > a:hover, -.navbar-inverse .navbar-nav > .disabled > a:focus { - color: #444; - background-color: transparent; -} -.navbar-inverse .navbar-toggle { - border-color: #333; -} -.navbar-inverse .navbar-toggle:hover, -.navbar-inverse .navbar-toggle:focus { - background-color: #333; -} -.navbar-inverse .navbar-toggle .icon-bar { - background-color: #fff; -} -.navbar-inverse .navbar-collapse, -.navbar-inverse .navbar-form { - border-color: #101010; -} -.navbar-inverse .navbar-nav > .open > a, -.navbar-inverse .navbar-nav > .open > a:hover, -.navbar-inverse .navbar-nav > .open > a:focus { - color: #fff; - background-color: #080808; -} -@media (max-width: 767px) { - .navbar-inverse .navbar-nav .open .dropdown-menu > .dropdown-header { - border-color: #080808; - } - .navbar-inverse .navbar-nav .open .dropdown-menu .divider { - background-color: #080808; - } - .navbar-inverse .navbar-nav .open .dropdown-menu > li > a { - color: #9d9d9d; - } - .navbar-inverse .navbar-nav .open .dropdown-menu > li > a:hover, - .navbar-inverse .navbar-nav .open .dropdown-menu > li > a:focus { - color: #fff; - background-color: transparent; - } - .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a, - .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a:hover, - .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a:focus { - color: #fff; - background-color: #080808; - } - .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a, - .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a:hover, - .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a:focus { - color: #444; - background-color: transparent; - } -} -.navbar-inverse .navbar-link { - color: #9d9d9d; -} -.navbar-inverse .navbar-link:hover { - color: #fff; -} -.navbar-inverse .btn-link { - color: #9d9d9d; -} -.navbar-inverse .btn-link:hover, -.navbar-inverse .btn-link:focus { - color: #fff; -} -.navbar-inverse .btn-link[disabled]:hover, -fieldset[disabled] .navbar-inverse .btn-link:hover, -.navbar-inverse .btn-link[disabled]:focus, -fieldset[disabled] .navbar-inverse .btn-link:focus { - color: #444; -} -.breadcrumb { - padding: 8px 15px; - margin-bottom: 20px; - list-style: none; - background-color: #f5f5f5; - border-radius: 4px; -} -.breadcrumb > li { - display: inline-block; -} -.breadcrumb > li + li:before { - padding: 0 5px; - color: #ccc; - content: "/\00a0"; -} -.breadcrumb > .active { - color: #777; -} -.pagination { - display: inline-block; - padding-left: 0; - margin: 20px 0; - border-radius: 4px; -} -.pagination > li { - display: inline; -} -.pagination > li > a, -.pagination > li > span { - position: relative; - float: left; - padding: 6px 12px; - margin-left: -1px; - line-height: 1.42857143; - color: #337ab7; - text-decoration: none; - background-color: #fff; - border: 1px solid #ddd; -} -.pagination > li:first-child > a, -.pagination > li:first-child > span { - margin-left: 0; - border-top-left-radius: 4px; - border-bottom-left-radius: 4px; -} -.pagination > li:last-child > a, -.pagination > li:last-child > span { - border-top-right-radius: 4px; - border-bottom-right-radius: 4px; -} -.pagination > li > a:hover, -.pagination > li > span:hover, -.pagination > li > a:focus, -.pagination > li > span:focus { - color: #23527c; - background-color: #eee; - border-color: #ddd; -} -.pagination > .active > a, -.pagination > .active > span, -.pagination > .active > a:hover, -.pagination > .active > span:hover, -.pagination > .active > a:focus, -.pagination > .active > span:focus { - z-index: 2; - color: #fff; - cursor: default; - background-color: #337ab7; - border-color: #337ab7; -} -.pagination > .disabled > span, -.pagination > .disabled > span:hover, -.pagination > .disabled > span:focus, -.pagination > .disabled > a, -.pagination > .disabled > a:hover, -.pagination > .disabled > a:focus { - color: #777; - cursor: not-allowed; - background-color: #fff; - border-color: #ddd; -} -.pagination-lg > li > a, -.pagination-lg > li > span { - padding: 10px 16px; - font-size: 18px; -} -.pagination-lg > li:first-child > a, -.pagination-lg > li:first-child > span { - border-top-left-radius: 6px; - border-bottom-left-radius: 6px; -} -.pagination-lg > li:last-child > a, -.pagination-lg > li:last-child > span { - border-top-right-radius: 6px; - border-bottom-right-radius: 6px; -} -.pagination-sm > li > a, -.pagination-sm > li > span { - padding: 5px 10px; - font-size: 12px; -} -.pagination-sm > li:first-child > a, -.pagination-sm > li:first-child > span { - border-top-left-radius: 3px; - border-bottom-left-radius: 3px; -} -.pagination-sm > li:last-child > a, -.pagination-sm > li:last-child > span { - border-top-right-radius: 3px; - border-bottom-right-radius: 3px; -} -.pager { - padding-left: 0; - margin: 20px 0; - text-align: center; - list-style: none; -} -.pager li { - display: inline; -} -.pager li > a, -.pager li > span { - display: inline-block; - padding: 5px 14px; - background-color: #fff; - border: 1px solid #ddd; - border-radius: 15px; -} -.pager li > a:hover, -.pager li > a:focus { - text-decoration: none; - background-color: #eee; -} -.pager .next > a, -.pager .next > span { - float: right; -} -.pager .previous > a, -.pager .previous > span { - float: left; -} -.pager .disabled > a, -.pager .disabled > a:hover, -.pager .disabled > a:focus, -.pager .disabled > span { - color: #777; - cursor: not-allowed; - background-color: #fff; -} -.label { - display: inline; - padding: .2em .6em .3em; - font-size: 75%; - font-weight: bold; - line-height: 1; - color: #fff; - text-align: center; - white-space: nowrap; - vertical-align: baseline; - border-radius: .25em; -} -a.label:hover, -a.label:focus { - color: #fff; - text-decoration: none; - cursor: pointer; -} -.label:empty { - display: none; -} -.btn .label { - position: relative; - top: -1px; -} -.label-default { - background-color: #777; -} -.label-default[href]:hover, -.label-default[href]:focus { - background-color: #5e5e5e; -} -.label-primary { - background-color: #337ab7; -} -.label-primary[href]:hover, -.label-primary[href]:focus { - background-color: #286090; -} -.label-success { - background-color: #5cb85c; -} -.label-success[href]:hover, -.label-success[href]:focus { - background-color: #449d44; -} -.label-info { - background-color: #5bc0de; -} -.label-info[href]:hover, -.label-info[href]:focus { - background-color: #31b0d5; -} -.label-warning { - background-color: #f0ad4e; -} -.label-warning[href]:hover, -.label-warning[href]:focus { - background-color: #ec971f; -} -.label-danger { - background-color: #d9534f; -} -.label-danger[href]:hover, -.label-danger[href]:focus { - background-color: #c9302c; -} -.badge { - display: inline-block; - min-width: 10px; - padding: 3px 7px; - font-size: 12px; - font-weight: bold; - line-height: 1; - color: #fff; - text-align: center; - white-space: nowrap; - vertical-align: baseline; - background-color: #777; - border-radius: 10px; -} -.badge:empty { - display: none; -} -.btn .badge { - position: relative; - top: -1px; -} -.btn-xs .badge { - top: 0; - padding: 1px 5px; -} -a.badge:hover, -a.badge:focus { - color: #fff; - text-decoration: none; - cursor: pointer; -} -.list-group-item.active > .badge, -.nav-pills > .active > a > .badge { - color: #337ab7; - background-color: #fff; -} -.list-group-item > .badge { - float: right; -} -.list-group-item > .badge + .badge { - margin-right: 5px; -} -.nav-pills > li > a > .badge { - margin-left: 3px; -} -.jumbotron { - padding: 30px 15px; - margin-bottom: 30px; - color: inherit; - background-color: #eee; -} -.jumbotron h1, -.jumbotron .h1 { - color: inherit; -} -.jumbotron p { - margin-bottom: 15px; - font-size: 21px; - font-weight: 200; -} -.jumbotron > hr { - border-top-color: #d5d5d5; -} -.container .jumbotron, -.container-fluid .jumbotron { - border-radius: 6px; -} -.jumbotron .container { - max-width: 100%; -} -@media screen and (min-width: 768px) { - .jumbotron { - padding: 48px 0; - } - .container .jumbotron, - .container-fluid .jumbotron { - padding-right: 60px; - padding-left: 60px; - } - .jumbotron h1, - .jumbotron .h1 { - font-size: 63px; - } -} -.thumbnail { - display: block; - padding: 4px; - margin-bottom: 20px; - line-height: 1.42857143; - background-color: #fff; - border: 1px solid #ddd; - border-radius: 4px; - -webkit-transition: border .2s ease-in-out; - -o-transition: border .2s ease-in-out; - transition: border .2s ease-in-out; -} -.thumbnail > img, -.thumbnail a > img { - margin-right: auto; - margin-left: auto; -} -a.thumbnail:hover, -a.thumbnail:focus, -a.thumbnail.active { - border-color: #337ab7; -} -.thumbnail .caption { - padding: 9px; - color: #333; -} -.alert { - padding: 15px; - margin-bottom: 20px; - border: 1px solid transparent; - border-radius: 4px; -} -.alert h4 { - margin-top: 0; - color: inherit; -} -.alert .alert-link { - font-weight: bold; -} -.alert > p, -.alert > ul { - margin-bottom: 0; -} -.alert > p + p { - margin-top: 5px; -} -.alert-dismissable, -.alert-dismissible { - padding-right: 35px; -} -.alert-dismissable .close, -.alert-dismissible .close { - position: relative; - top: -2px; - right: -21px; - color: inherit; -} -.alert-success { - color: #3c763d; - background-color: #dff0d8; - border-color: #d6e9c6; -} -.alert-success hr { - border-top-color: #c9e2b3; -} -.alert-success .alert-link { - color: #2b542c; -} -.alert-info { - color: #31708f; - background-color: #d9edf7; - border-color: #bce8f1; -} -.alert-info hr { - border-top-color: #a6e1ec; -} -.alert-info .alert-link { - color: #245269; -} -.alert-warning { - color: #8a6d3b; - background-color: #fcf8e3; - border-color: #faebcc; -} -.alert-warning hr { - border-top-color: #f7e1b5; -} -.alert-warning .alert-link { - color: #66512c; -} -.alert-danger { - color: #a94442; - background-color: #f2dede; - border-color: #ebccd1; -} -.alert-danger hr { - border-top-color: #e4b9c0; -} -.alert-danger .alert-link { - color: #843534; -} -@-webkit-keyframes progress-bar-stripes { - from { - background-position: 40px 0; - } - to { - background-position: 0 0; - } -} -@-o-keyframes progress-bar-stripes { - from { - background-position: 40px 0; - } - to { - background-position: 0 0; - } -} -@keyframes progress-bar-stripes { - from { - background-position: 40px 0; - } - to { - background-position: 0 0; - } -} -.progress { - height: 20px; - margin-bottom: 20px; - overflow: hidden; - background-color: #f5f5f5; - border-radius: 4px; - -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, .1); - box-shadow: inset 0 1px 2px rgba(0, 0, 0, .1); -} -.progress-bar { - float: left; - width: 0; - height: 100%; - font-size: 12px; - line-height: 20px; - color: #fff; - text-align: center; - background-color: #337ab7; - -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .15); - box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .15); - -webkit-transition: width .6s ease; - -o-transition: width .6s ease; - transition: width .6s ease; -} -.progress-striped .progress-bar, -.progress-bar-striped { - background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); - background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); - background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); - -webkit-background-size: 40px 40px; - background-size: 40px 40px; -} -.progress.active .progress-bar, -.progress-bar.active { - -webkit-animation: progress-bar-stripes 2s linear infinite; - -o-animation: progress-bar-stripes 2s linear infinite; - animation: progress-bar-stripes 2s linear infinite; -} -.progress-bar-success { - background-color: #5cb85c; -} -.progress-striped .progress-bar-success { - background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); - background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); - background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); -} -.progress-bar-info { - background-color: #5bc0de; -} -.progress-striped .progress-bar-info { - background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); - background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); - background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); -} -.progress-bar-warning { - background-color: #f0ad4e; -} -.progress-striped .progress-bar-warning { - background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); - background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); - background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); -} -.progress-bar-danger { - background-color: #d9534f; -} -.progress-striped .progress-bar-danger { - background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); - background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); - background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); -} -.media { - margin-top: 15px; -} -.media:first-child { - margin-top: 0; -} -.media-right, -.media > .pull-right { - padding-left: 10px; -} -.media-left, -.media > .pull-left { - padding-right: 10px; -} -.media-left, -.media-right, -.media-body { - display: table-cell; - vertical-align: top; -} -.media-middle { - vertical-align: middle; -} -.media-bottom { - vertical-align: bottom; -} -.media-heading { - margin-top: 0; - margin-bottom: 5px; -} -.media-list { - padding-left: 0; - list-style: none; -} -.list-group { - padding-left: 0; - margin-bottom: 20px; -} -.list-group-item { - position: relative; - display: block; - padding: 10px 15px; - margin-bottom: -1px; - background-color: #fff; - border: 1px solid #ddd; -} -.list-group-item:first-child { - border-top-left-radius: 4px; - border-top-right-radius: 4px; -} -.list-group-item:last-child { - margin-bottom: 0; - border-bottom-right-radius: 4px; - border-bottom-left-radius: 4px; -} -a.list-group-item { - color: #555; -} -a.list-group-item .list-group-item-heading { - color: #333; -} -a.list-group-item:hover, -a.list-group-item:focus { - color: #555; - text-decoration: none; - background-color: #f5f5f5; -} -.list-group-item.disabled, -.list-group-item.disabled:hover, -.list-group-item.disabled:focus { - color: #777; - cursor: not-allowed; - background-color: #eee; -} -.list-group-item.disabled .list-group-item-heading, -.list-group-item.disabled:hover .list-group-item-heading, -.list-group-item.disabled:focus .list-group-item-heading { - color: inherit; -} -.list-group-item.disabled .list-group-item-text, -.list-group-item.disabled:hover .list-group-item-text, -.list-group-item.disabled:focus .list-group-item-text { - color: #777; -} -.list-group-item.active, -.list-group-item.active:hover, -.list-group-item.active:focus { - z-index: 2; - color: #fff; - background-color: #337ab7; - border-color: #337ab7; -} -.list-group-item.active .list-group-item-heading, -.list-group-item.active:hover .list-group-item-heading, -.list-group-item.active:focus .list-group-item-heading, -.list-group-item.active .list-group-item-heading > small, -.list-group-item.active:hover .list-group-item-heading > small, -.list-group-item.active:focus .list-group-item-heading > small, -.list-group-item.active .list-group-item-heading > .small, -.list-group-item.active:hover .list-group-item-heading > .small, -.list-group-item.active:focus .list-group-item-heading > .small { - color: inherit; -} -.list-group-item.active .list-group-item-text, -.list-group-item.active:hover .list-group-item-text, -.list-group-item.active:focus .list-group-item-text { - color: #c7ddef; -} -.list-group-item-success { - color: #3c763d; - background-color: #dff0d8; -} -a.list-group-item-success { - color: #3c763d; -} -a.list-group-item-success .list-group-item-heading { - color: inherit; -} -a.list-group-item-success:hover, -a.list-group-item-success:focus { - color: #3c763d; - background-color: #d0e9c6; -} -a.list-group-item-success.active, -a.list-group-item-success.active:hover, -a.list-group-item-success.active:focus { - color: #fff; - background-color: #3c763d; - border-color: #3c763d; -} -.list-group-item-info { - color: #31708f; - background-color: #d9edf7; -} -a.list-group-item-info { - color: #31708f; -} -a.list-group-item-info .list-group-item-heading { - color: inherit; -} -a.list-group-item-info:hover, -a.list-group-item-info:focus { - color: #31708f; - background-color: #c4e3f3; -} -a.list-group-item-info.active, -a.list-group-item-info.active:hover, -a.list-group-item-info.active:focus { - color: #fff; - background-color: #31708f; - border-color: #31708f; -} -.list-group-item-warning { - color: #8a6d3b; - background-color: #fcf8e3; -} -a.list-group-item-warning { - color: #8a6d3b; -} -a.list-group-item-warning .list-group-item-heading { - color: inherit; -} -a.list-group-item-warning:hover, -a.list-group-item-warning:focus { - color: #8a6d3b; - background-color: #faf2cc; -} -a.list-group-item-warning.active, -a.list-group-item-warning.active:hover, -a.list-group-item-warning.active:focus { - color: #fff; - background-color: #8a6d3b; - border-color: #8a6d3b; -} -.list-group-item-danger { - color: #a94442; - background-color: #f2dede; -} -a.list-group-item-danger { - color: #a94442; -} -a.list-group-item-danger .list-group-item-heading { - color: inherit; -} -a.list-group-item-danger:hover, -a.list-group-item-danger:focus { - color: #a94442; - background-color: #ebcccc; -} -a.list-group-item-danger.active, -a.list-group-item-danger.active:hover, -a.list-group-item-danger.active:focus { - color: #fff; - background-color: #a94442; - border-color: #a94442; -} -.list-group-item-heading { - margin-top: 0; - margin-bottom: 5px; -} -.list-group-item-text { - margin-bottom: 0; - line-height: 1.3; -} -.panel { - margin-bottom: 20px; - background-color: #fff; - border: 1px solid transparent; - border-radius: 4px; - -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, .05); - box-shadow: 0 1px 1px rgba(0, 0, 0, .05); -} -.panel-body { - padding: 15px; -} -.panel-heading { - padding: 10px 15px; - border-bottom: 1px solid transparent; - border-top-left-radius: 3px; - border-top-right-radius: 3px; -} -.panel-heading > .dropdown .dropdown-toggle { - color: inherit; -} -.panel-title { - margin-top: 0; - margin-bottom: 0; - font-size: 16px; - color: inherit; -} -.panel-title > a { - color: inherit; -} -.panel-footer { - padding: 10px 15px; - background-color: #f5f5f5; - border-top: 1px solid #ddd; - border-bottom-right-radius: 3px; - border-bottom-left-radius: 3px; -} -.panel > .list-group, -.panel > .panel-collapse > .list-group { - margin-bottom: 0; -} -.panel > .list-group .list-group-item, -.panel > .panel-collapse > .list-group .list-group-item { - border-width: 1px 0; - border-radius: 0; -} -.panel > .list-group:first-child .list-group-item:first-child, -.panel > .panel-collapse > .list-group:first-child .list-group-item:first-child { - border-top: 0; - border-top-left-radius: 3px; - border-top-right-radius: 3px; -} -.panel > .list-group:last-child .list-group-item:last-child, -.panel > .panel-collapse > .list-group:last-child .list-group-item:last-child { - border-bottom: 0; - border-bottom-right-radius: 3px; - border-bottom-left-radius: 3px; -} -.panel-heading + .list-group .list-group-item:first-child { - border-top-width: 0; -} -.list-group + .panel-footer { - border-top-width: 0; -} -.panel > .table, -.panel > .table-responsive > .table, -.panel > .panel-collapse > .table { - margin-bottom: 0; -} -.panel > .table caption, -.panel > .table-responsive > .table caption, -.panel > .panel-collapse > .table caption { - padding-right: 15px; - padding-left: 15px; -} -.panel > .table:first-child, -.panel > .table-responsive:first-child > .table:first-child { - border-top-left-radius: 3px; - border-top-right-radius: 3px; -} -.panel > .table:first-child > thead:first-child > tr:first-child, -.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child, -.panel > .table:first-child > tbody:first-child > tr:first-child, -.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child { - border-top-left-radius: 3px; - border-top-right-radius: 3px; -} -.panel > .table:first-child > thead:first-child > tr:first-child td:first-child, -.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child td:first-child, -.panel > .table:first-child > tbody:first-child > tr:first-child td:first-child, -.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child td:first-child, -.panel > .table:first-child > thead:first-child > tr:first-child th:first-child, -.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child th:first-child, -.panel > .table:first-child > tbody:first-child > tr:first-child th:first-child, -.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child th:first-child { - border-top-left-radius: 3px; -} -.panel > .table:first-child > thead:first-child > tr:first-child td:last-child, -.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child td:last-child, -.panel > .table:first-child > tbody:first-child > tr:first-child td:last-child, -.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child td:last-child, -.panel > .table:first-child > thead:first-child > tr:first-child th:last-child, -.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child th:last-child, -.panel > .table:first-child > tbody:first-child > tr:first-child th:last-child, -.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child th:last-child { - border-top-right-radius: 3px; -} -.panel > .table:last-child, -.panel > .table-responsive:last-child > .table:last-child { - border-bottom-right-radius: 3px; - border-bottom-left-radius: 3px; -} -.panel > .table:last-child > tbody:last-child > tr:last-child, -.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child, -.panel > .table:last-child > tfoot:last-child > tr:last-child, -.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child { - border-bottom-right-radius: 3px; - border-bottom-left-radius: 3px; -} -.panel > .table:last-child > tbody:last-child > tr:last-child td:first-child, -.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child td:first-child, -.panel > .table:last-child > tfoot:last-child > tr:last-child td:first-child, -.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child td:first-child, -.panel > .table:last-child > tbody:last-child > tr:last-child th:first-child, -.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child th:first-child, -.panel > .table:last-child > tfoot:last-child > tr:last-child th:first-child, -.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child th:first-child { - border-bottom-left-radius: 3px; -} -.panel > .table:last-child > tbody:last-child > tr:last-child td:last-child, -.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child td:last-child, -.panel > .table:last-child > tfoot:last-child > tr:last-child td:last-child, -.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child td:last-child, -.panel > .table:last-child > tbody:last-child > tr:last-child th:last-child, -.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child th:last-child, -.panel > .table:last-child > tfoot:last-child > tr:last-child th:last-child, -.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child th:last-child { - border-bottom-right-radius: 3px; -} -.panel > .panel-body + .table, -.panel > .panel-body + .table-responsive, -.panel > .table + .panel-body, -.panel > .table-responsive + .panel-body { - border-top: 1px solid #ddd; -} -.panel > .table > tbody:first-child > tr:first-child th, -.panel > .table > tbody:first-child > tr:first-child td { - border-top: 0; -} -.panel > .table-bordered, -.panel > .table-responsive > .table-bordered { - border: 0; -} -.panel > .table-bordered > thead > tr > th:first-child, -.panel > .table-responsive > .table-bordered > thead > tr > th:first-child, -.panel > .table-bordered > tbody > tr > th:first-child, -.panel > .table-responsive > .table-bordered > tbody > tr > th:first-child, -.panel > .table-bordered > tfoot > tr > th:first-child, -.panel > .table-responsive > .table-bordered > tfoot > tr > th:first-child, -.panel > .table-bordered > thead > tr > td:first-child, -.panel > .table-responsive > .table-bordered > thead > tr > td:first-child, -.panel > .table-bordered > tbody > tr > td:first-child, -.panel > .table-responsive > .table-bordered > tbody > tr > td:first-child, -.panel > .table-bordered > tfoot > tr > td:first-child, -.panel > .table-responsive > .table-bordered > tfoot > tr > td:first-child { - border-left: 0; -} -.panel > .table-bordered > thead > tr > th:last-child, -.panel > .table-responsive > .table-bordered > thead > tr > th:last-child, -.panel > .table-bordered > tbody > tr > th:last-child, -.panel > .table-responsive > .table-bordered > tbody > tr > th:last-child, -.panel > .table-bordered > tfoot > tr > th:last-child, -.panel > .table-responsive > .table-bordered > tfoot > tr > th:last-child, -.panel > .table-bordered > thead > tr > td:last-child, -.panel > .table-responsive > .table-bordered > thead > tr > td:last-child, -.panel > .table-bordered > tbody > tr > td:last-child, -.panel > .table-responsive > .table-bordered > tbody > tr > td:last-child, -.panel > .table-bordered > tfoot > tr > td:last-child, -.panel > .table-responsive > .table-bordered > tfoot > tr > td:last-child { - border-right: 0; -} -.panel > .table-bordered > thead > tr:first-child > td, -.panel > .table-responsive > .table-bordered > thead > tr:first-child > td, -.panel > .table-bordered > tbody > tr:first-child > td, -.panel > .table-responsive > .table-bordered > tbody > tr:first-child > td, -.panel > .table-bordered > thead > tr:first-child > th, -.panel > .table-responsive > .table-bordered > thead > tr:first-child > th, -.panel > .table-bordered > tbody > tr:first-child > th, -.panel > .table-responsive > .table-bordered > tbody > tr:first-child > th { - border-bottom: 0; -} -.panel > .table-bordered > tbody > tr:last-child > td, -.panel > .table-responsive > .table-bordered > tbody > tr:last-child > td, -.panel > .table-bordered > tfoot > tr:last-child > td, -.panel > .table-responsive > .table-bordered > tfoot > tr:last-child > td, -.panel > .table-bordered > tbody > tr:last-child > th, -.panel > .table-responsive > .table-bordered > tbody > tr:last-child > th, -.panel > .table-bordered > tfoot > tr:last-child > th, -.panel > .table-responsive > .table-bordered > tfoot > tr:last-child > th { - border-bottom: 0; -} -.panel > .table-responsive { - margin-bottom: 0; - border: 0; -} -.panel-group { - margin-bottom: 20px; -} -.panel-group .panel { - margin-bottom: 0; - border-radius: 4px; -} -.panel-group .panel + .panel { - margin-top: 5px; -} -.panel-group .panel-heading { - border-bottom: 0; -} -.panel-group .panel-heading + .panel-collapse > .panel-body, -.panel-group .panel-heading + .panel-collapse > .list-group { - border-top: 1px solid #ddd; -} -.panel-group .panel-footer { - border-top: 0; -} -.panel-group .panel-footer + .panel-collapse .panel-body { - border-bottom: 1px solid #ddd; -} -.panel-default { - border-color: #ddd; -} -.panel-default > .panel-heading { - color: #333; - background-color: #f5f5f5; - border-color: #ddd; -} -.panel-default > .panel-heading + .panel-collapse > .panel-body { - border-top-color: #ddd; -} -.panel-default > .panel-heading .badge { - color: #f5f5f5; - background-color: #333; -} -.panel-default > .panel-footer + .panel-collapse > .panel-body { - border-bottom-color: #ddd; -} -.panel-primary { - border-color: #337ab7; -} -.panel-primary > .panel-heading { - color: #fff; - background-color: #337ab7; - border-color: #337ab7; -} -.panel-primary > .panel-heading + .panel-collapse > .panel-body { - border-top-color: #337ab7; -} -.panel-primary > .panel-heading .badge { - color: #337ab7; - background-color: #fff; -} -.panel-primary > .panel-footer + .panel-collapse > .panel-body { - border-bottom-color: #337ab7; -} -.panel-success { - border-color: #d6e9c6; -} -.panel-success > .panel-heading { - color: #3c763d; - background-color: #dff0d8; - border-color: #d6e9c6; -} -.panel-success > .panel-heading + .panel-collapse > .panel-body { - border-top-color: #d6e9c6; -} -.panel-success > .panel-heading .badge { - color: #dff0d8; - background-color: #3c763d; -} -.panel-success > .panel-footer + .panel-collapse > .panel-body { - border-bottom-color: #d6e9c6; -} -.panel-info { - border-color: #bce8f1; -} -.panel-info > .panel-heading { - color: #31708f; - background-color: #d9edf7; - border-color: #bce8f1; -} -.panel-info > .panel-heading + .panel-collapse > .panel-body { - border-top-color: #bce8f1; -} -.panel-info > .panel-heading .badge { - color: #d9edf7; - background-color: #31708f; -} -.panel-info > .panel-footer + .panel-collapse > .panel-body { - border-bottom-color: #bce8f1; -} -.panel-warning { - border-color: #faebcc; -} -.panel-warning > .panel-heading { - color: #8a6d3b; - background-color: #fcf8e3; - border-color: #faebcc; -} -.panel-warning > .panel-heading + .panel-collapse > .panel-body { - border-top-color: #faebcc; -} -.panel-warning > .panel-heading .badge { - color: #fcf8e3; - background-color: #8a6d3b; -} -.panel-warning > .panel-footer + .panel-collapse > .panel-body { - border-bottom-color: #faebcc; -} -.panel-danger { - border-color: #ebccd1; -} -.panel-danger > .panel-heading { - color: #a94442; - background-color: #f2dede; - border-color: #ebccd1; -} -.panel-danger > .panel-heading + .panel-collapse > .panel-body { - border-top-color: #ebccd1; -} -.panel-danger > .panel-heading .badge { - color: #f2dede; - background-color: #a94442; -} -.panel-danger > .panel-footer + .panel-collapse > .panel-body { - border-bottom-color: #ebccd1; -} -.embed-responsive { - position: relative; - display: block; - height: 0; - padding: 0; - overflow: hidden; -} -.embed-responsive .embed-responsive-item, -.embed-responsive iframe, -.embed-responsive embed, -.embed-responsive object, -.embed-responsive video { - position: absolute; - top: 0; - bottom: 0; - left: 0; - width: 100%; - height: 100%; - border: 0; -} -.embed-responsive.embed-responsive-16by9 { - padding-bottom: 56.25%; -} -.embed-responsive.embed-responsive-4by3 { - padding-bottom: 75%; -} -.well { - min-height: 20px; - padding: 19px; - margin-bottom: 20px; - background-color: #f5f5f5; - border: 1px solid #e3e3e3; - border-radius: 4px; - -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .05); - box-shadow: inset 0 1px 1px rgba(0, 0, 0, .05); -} -.well blockquote { - border-color: #ddd; - border-color: rgba(0, 0, 0, .15); -} -.well-lg { - padding: 24px; - border-radius: 6px; -} -.well-sm { - padding: 9px; - border-radius: 3px; -} -.close { - float: right; - font-size: 21px; - font-weight: bold; - line-height: 1; - color: #000; - text-shadow: 0 1px 0 #fff; - filter: alpha(opacity=20); - opacity: .2; -} -.close:hover, -.close:focus { - color: #000; - text-decoration: none; - cursor: pointer; - filter: alpha(opacity=50); - opacity: .5; -} -button.close { - -webkit-appearance: none; - padding: 0; - cursor: pointer; - background: transparent; - border: 0; -} -.modal-open { - overflow: hidden; -} -.modal { - position: fixed; - top: 0; - right: 0; - bottom: 0; - left: 0; - z-index: 1040; - display: none; - overflow: hidden; - -webkit-overflow-scrolling: touch; - outline: 0; -} -.modal.fade .modal-dialog { - -webkit-transition: -webkit-transform .3s ease-out; - -o-transition: -o-transform .3s ease-out; - transition: transform .3s ease-out; - -webkit-transform: translate(0, -25%); - -ms-transform: translate(0, -25%); - -o-transform: translate(0, -25%); - transform: translate(0, -25%); -} -.modal.in .modal-dialog { - -webkit-transform: translate(0, 0); - -ms-transform: translate(0, 0); - -o-transform: translate(0, 0); - transform: translate(0, 0); -} -.modal-open .modal { - overflow-x: hidden; - overflow-y: auto; -} -.modal-dialog { - position: relative; - width: auto; - margin: 10px; -} -.modal-content { - position: relative; - background-color: #fff; - -webkit-background-clip: padding-box; - background-clip: padding-box; - border: 1px solid #999; - border: 1px solid rgba(0, 0, 0, .2); - border-radius: 6px; - outline: 0; - -webkit-box-shadow: 0 3px 9px rgba(0, 0, 0, .5); - box-shadow: 0 3px 9px rgba(0, 0, 0, .5); -} -.modal-backdrop { - position: absolute; - top: 0; - right: 0; - left: 0; - background-color: #000; -} -.modal-backdrop.fade { - filter: alpha(opacity=0); - opacity: 0; -} -.modal-backdrop.in { - filter: alpha(opacity=50); - opacity: .5; -} -.modal-header { - min-height: 16.42857143px; - padding: 15px; - border-bottom: 1px solid #e5e5e5; -} -.modal-header .close { - margin-top: -2px; -} -.modal-title { - margin: 0; - line-height: 1.42857143; -} -.modal-body { - position: relative; - padding: 15px; -} -.modal-footer { - padding: 15px; - text-align: right; - border-top: 1px solid #e5e5e5; -} -.modal-footer .btn + .btn { - margin-bottom: 0; - margin-left: 5px; -} -.modal-footer .btn-group .btn + .btn { - margin-left: -1px; -} -.modal-footer .btn-block + .btn-block { - margin-left: 0; -} -.modal-scrollbar-measure { - position: absolute; - top: -9999px; - width: 50px; - height: 50px; - overflow: scroll; -} -@media (min-width: 768px) { - .modal-dialog { - width: 600px; - margin: 30px auto; - } - .modal-content { - -webkit-box-shadow: 0 5px 15px rgba(0, 0, 0, .5); - box-shadow: 0 5px 15px rgba(0, 0, 0, .5); - } - .modal-sm { - width: 300px; - } -} -@media (min-width: 992px) { - .modal-lg { - width: 900px; - } -} -.tooltip { - position: absolute; - z-index: 1070; - display: block; - font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; - font-size: 12px; - font-weight: normal; - line-height: 1.4; - visibility: visible; - filter: alpha(opacity=0); - opacity: 0; -} -.tooltip.in { - filter: alpha(opacity=90); - opacity: .9; -} -.tooltip.top { - padding: 5px 0; - margin-top: -3px; -} -.tooltip.right { - padding: 0 5px; - margin-left: 3px; -} -.tooltip.bottom { - padding: 5px 0; - margin-top: 3px; -} -.tooltip.left { - padding: 0 5px; - margin-left: -3px; -} -.tooltip-inner { - max-width: 200px; - padding: 3px 8px; - color: #fff; - text-align: center; - text-decoration: none; - background-color: #000; - border-radius: 4px; -} -.tooltip-arrow { - position: absolute; - width: 0; - height: 0; - border-color: transparent; - border-style: solid; -} -.tooltip.top .tooltip-arrow { - bottom: 0; - left: 50%; - margin-left: -5px; - border-width: 5px 5px 0; - border-top-color: #000; -} -.tooltip.top-left .tooltip-arrow { - right: 5px; - bottom: 0; - margin-bottom: -5px; - border-width: 5px 5px 0; - border-top-color: #000; -} -.tooltip.top-right .tooltip-arrow { - bottom: 0; - left: 5px; - margin-bottom: -5px; - border-width: 5px 5px 0; - border-top-color: #000; -} -.tooltip.right .tooltip-arrow { - top: 50%; - left: 0; - margin-top: -5px; - border-width: 5px 5px 5px 0; - border-right-color: #000; -} -.tooltip.left .tooltip-arrow { - top: 50%; - right: 0; - margin-top: -5px; - border-width: 5px 0 5px 5px; - border-left-color: #000; -} -.tooltip.bottom .tooltip-arrow { - top: 0; - left: 50%; - margin-left: -5px; - border-width: 0 5px 5px; - border-bottom-color: #000; -} -.tooltip.bottom-left .tooltip-arrow { - top: 0; - right: 5px; - margin-top: -5px; - border-width: 0 5px 5px; - border-bottom-color: #000; -} -.tooltip.bottom-right .tooltip-arrow { - top: 0; - left: 5px; - margin-top: -5px; - border-width: 0 5px 5px; - border-bottom-color: #000; -} -.popover { - position: absolute; - top: 0; - left: 0; - z-index: 1060; - display: none; - max-width: 276px; - padding: 1px; - font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; - font-size: 14px; - font-weight: normal; - line-height: 1.42857143; - text-align: left; - white-space: normal; - background-color: #fff; - -webkit-background-clip: padding-box; - background-clip: padding-box; - border: 1px solid #ccc; - border: 1px solid rgba(0, 0, 0, .2); - border-radius: 6px; - -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, .2); - box-shadow: 0 5px 10px rgba(0, 0, 0, .2); -} -.popover.top { - margin-top: -10px; -} -.popover.right { - margin-left: 10px; -} -.popover.bottom { - margin-top: 10px; -} -.popover.left { - margin-left: -10px; -} -.popover-title { - padding: 8px 14px; - margin: 0; - font-size: 14px; - background-color: #f7f7f7; - border-bottom: 1px solid #ebebeb; - border-radius: 5px 5px 0 0; -} -.popover-content { - padding: 9px 14px; -} -.popover > .arrow, -.popover > .arrow:after { - position: absolute; - display: block; - width: 0; - height: 0; - border-color: transparent; - border-style: solid; -} -.popover > .arrow { - border-width: 11px; -} -.popover > .arrow:after { - content: ""; - border-width: 10px; -} -.popover.top > .arrow { - bottom: -11px; - left: 50%; - margin-left: -11px; - border-top-color: #999; - border-top-color: rgba(0, 0, 0, .25); - border-bottom-width: 0; -} -.popover.top > .arrow:after { - bottom: 1px; - margin-left: -10px; - content: " "; - border-top-color: #fff; - border-bottom-width: 0; -} -.popover.right > .arrow { - top: 50%; - left: -11px; - margin-top: -11px; - border-right-color: #999; - border-right-color: rgba(0, 0, 0, .25); - border-left-width: 0; -} -.popover.right > .arrow:after { - bottom: -10px; - left: 1px; - content: " "; - border-right-color: #fff; - border-left-width: 0; -} -.popover.bottom > .arrow { - top: -11px; - left: 50%; - margin-left: -11px; - border-top-width: 0; - border-bottom-color: #999; - border-bottom-color: rgba(0, 0, 0, .25); -} -.popover.bottom > .arrow:after { - top: 1px; - margin-left: -10px; - content: " "; - border-top-width: 0; - border-bottom-color: #fff; -} -.popover.left > .arrow { - top: 50%; - right: -11px; - margin-top: -11px; - border-right-width: 0; - border-left-color: #999; - border-left-color: rgba(0, 0, 0, .25); -} -.popover.left > .arrow:after { - right: 1px; - bottom: -10px; - content: " "; - border-right-width: 0; - border-left-color: #fff; -} -.carousel { - position: relative; -} -.carousel-inner { - position: relative; - width: 100%; - overflow: hidden; -} -.carousel-inner > .item { - position: relative; - display: none; - -webkit-transition: .6s ease-in-out left; - -o-transition: .6s ease-in-out left; - transition: .6s ease-in-out left; -} -.carousel-inner > .item > img, -.carousel-inner > .item > a > img { - line-height: 1; -} -@media all and (transform-3d), (-webkit-transform-3d) { - .carousel-inner > .item { - -webkit-transition: -webkit-transform .6s ease-in-out; - -o-transition: -o-transform .6s ease-in-out; - transition: transform .6s ease-in-out; - - -webkit-backface-visibility: hidden; - backface-visibility: hidden; - -webkit-perspective: 1000; - perspective: 1000; - } - .carousel-inner > .item.next, - .carousel-inner > .item.active.right { - left: 0; - -webkit-transform: translate3d(100%, 0, 0); - transform: translate3d(100%, 0, 0); - } - .carousel-inner > .item.prev, - .carousel-inner > .item.active.left { - left: 0; - -webkit-transform: translate3d(-100%, 0, 0); - transform: translate3d(-100%, 0, 0); - } - .carousel-inner > .item.next.left, - .carousel-inner > .item.prev.right, - .carousel-inner > .item.active { - left: 0; - -webkit-transform: translate3d(0, 0, 0); - transform: translate3d(0, 0, 0); - } -} -.carousel-inner > .active, -.carousel-inner > .next, -.carousel-inner > .prev { - display: block; -} -.carousel-inner > .active { - left: 0; -} -.carousel-inner > .next, -.carousel-inner > .prev { - position: absolute; - top: 0; - width: 100%; -} -.carousel-inner > .next { - left: 100%; -} -.carousel-inner > .prev { - left: -100%; -} -.carousel-inner > .next.left, -.carousel-inner > .prev.right { - left: 0; -} -.carousel-inner > .active.left { - left: -100%; -} -.carousel-inner > .active.right { - left: 100%; -} -.carousel-control { - position: absolute; - top: 0; - bottom: 0; - left: 0; - width: 15%; - font-size: 20px; - color: #fff; - text-align: center; - text-shadow: 0 1px 2px rgba(0, 0, 0, .6); - filter: alpha(opacity=50); - opacity: .5; -} -.carousel-control.left { - background-image: -webkit-linear-gradient(left, rgba(0, 0, 0, .5) 0%, rgba(0, 0, 0, .0001) 100%); - background-image: -o-linear-gradient(left, rgba(0, 0, 0, .5) 0%, rgba(0, 0, 0, .0001) 100%); - background-image: -webkit-gradient(linear, left top, right top, from(rgba(0, 0, 0, .5)), to(rgba(0, 0, 0, .0001))); - background-image: linear-gradient(to right, rgba(0, 0, 0, .5) 0%, rgba(0, 0, 0, .0001) 100%); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1); - background-repeat: repeat-x; -} -.carousel-control.right { - right: 0; - left: auto; - background-image: -webkit-linear-gradient(left, rgba(0, 0, 0, .0001) 0%, rgba(0, 0, 0, .5) 100%); - background-image: -o-linear-gradient(left, rgba(0, 0, 0, .0001) 0%, rgba(0, 0, 0, .5) 100%); - background-image: -webkit-gradient(linear, left top, right top, from(rgba(0, 0, 0, .0001)), to(rgba(0, 0, 0, .5))); - background-image: linear-gradient(to right, rgba(0, 0, 0, .0001) 0%, rgba(0, 0, 0, .5) 100%); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1); - background-repeat: repeat-x; -} -.carousel-control:hover, -.carousel-control:focus { - color: #fff; - text-decoration: none; - filter: alpha(opacity=90); - outline: 0; - opacity: .9; -} -.carousel-control .icon-prev, -.carousel-control .icon-next, -.carousel-control .glyphicon-chevron-left, -.carousel-control .glyphicon-chevron-right { - position: absolute; - top: 50%; - z-index: 5; - display: inline-block; -} -.carousel-control .icon-prev, -.carousel-control .glyphicon-chevron-left { - left: 50%; - margin-left: -10px; -} -.carousel-control .icon-next, -.carousel-control .glyphicon-chevron-right { - right: 50%; - margin-right: -10px; -} -.carousel-control .icon-prev, -.carousel-control .icon-next { - width: 20px; - height: 20px; - margin-top: -10px; - font-family: serif; -} -.carousel-control .icon-prev:before { - content: '\2039'; -} -.carousel-control .icon-next:before { - content: '\203a'; -} -.carousel-indicators { - position: absolute; - bottom: 10px; - left: 50%; - z-index: 15; - width: 60%; - padding-left: 0; - margin-left: -30%; - text-align: center; - list-style: none; -} -.carousel-indicators li { - display: inline-block; - width: 10px; - height: 10px; - margin: 1px; - text-indent: -999px; - cursor: pointer; - background-color: #000 \9; - background-color: rgba(0, 0, 0, 0); - border: 1px solid #fff; - border-radius: 10px; -} -.carousel-indicators .active { - width: 12px; - height: 12px; - margin: 0; - background-color: #fff; -} -.carousel-caption { - position: absolute; - right: 15%; - bottom: 20px; - left: 15%; - z-index: 10; - padding-top: 20px; - padding-bottom: 20px; - color: #fff; - text-align: center; - text-shadow: 0 1px 2px rgba(0, 0, 0, .6); -} -.carousel-caption .btn { - text-shadow: none; -} -@media screen and (min-width: 768px) { - .carousel-control .glyphicon-chevron-left, - .carousel-control .glyphicon-chevron-right, - .carousel-control .icon-prev, - .carousel-control .icon-next { - width: 30px; - height: 30px; - margin-top: -15px; - font-size: 30px; - } - .carousel-control .glyphicon-chevron-left, - .carousel-control .icon-prev { - margin-left: -15px; - } - .carousel-control .glyphicon-chevron-right, - .carousel-control .icon-next { - margin-right: -15px; - } - .carousel-caption { - right: 20%; - left: 20%; - padding-bottom: 30px; - } - .carousel-indicators { - bottom: 20px; - } -} -.clearfix:before, -.clearfix:after, -.dl-horizontal dd:before, -.dl-horizontal dd:after, -.container:before, -.container:after, -.container-fluid:before, -.container-fluid:after, -.row:before, -.row:after, -.form-horizontal .form-group:before, -.form-horizontal .form-group:after, -.btn-toolbar:before, -.btn-toolbar:after, -.btn-group-vertical > .btn-group:before, -.btn-group-vertical > .btn-group:after, -.nav:before, -.nav:after, -.navbar:before, -.navbar:after, -.navbar-header:before, -.navbar-header:after, -.navbar-collapse:before, -.navbar-collapse:after, -.pager:before, -.pager:after, -.panel-body:before, -.panel-body:after, -.modal-footer:before, -.modal-footer:after { - display: table; - content: " "; -} -.clearfix:after, -.dl-horizontal dd:after, -.container:after, -.container-fluid:after, -.row:after, -.form-horizontal .form-group:after, -.btn-toolbar:after, -.btn-group-vertical > .btn-group:after, -.nav:after, -.navbar:after, -.navbar-header:after, -.navbar-collapse:after, -.pager:after, -.panel-body:after, -.modal-footer:after { - clear: both; -} -.center-block { - display: block; - margin-right: auto; - margin-left: auto; -} -.pull-right { - float: right !important; -} -.pull-left { - float: left !important; -} -.hide { - display: none !important; -} -.show { - display: block !important; -} -.invisible { - visibility: hidden; -} -.text-hide { - font: 0/0 a; - color: transparent; - text-shadow: none; - background-color: transparent; - border: 0; -} -.hidden { - display: none !important; - visibility: hidden !important; -} -.affix { - position: fixed; -} -@-ms-viewport { - width: device-width; -} -.visible-xs, -.visible-sm, -.visible-md, -.visible-lg { - display: none !important; -} -.visible-xs-block, -.visible-xs-inline, -.visible-xs-inline-block, -.visible-sm-block, -.visible-sm-inline, -.visible-sm-inline-block, -.visible-md-block, -.visible-md-inline, -.visible-md-inline-block, -.visible-lg-block, -.visible-lg-inline, -.visible-lg-inline-block { - display: none !important; -} -@media (max-width: 767px) { - .visible-xs { - display: block !important; - } - table.visible-xs { - display: table; - } - tr.visible-xs { - display: table-row !important; - } - th.visible-xs, - td.visible-xs { - display: table-cell !important; - } -} -@media (max-width: 767px) { - .visible-xs-block { - display: block !important; - } -} -@media (max-width: 767px) { - .visible-xs-inline { - display: inline !important; - } -} -@media (max-width: 767px) { - .visible-xs-inline-block { - display: inline-block !important; - } -} -@media (min-width: 768px) and (max-width: 991px) { - .visible-sm { - display: block !important; - } - table.visible-sm { - display: table; - } - tr.visible-sm { - display: table-row !important; - } - th.visible-sm, - td.visible-sm { - display: table-cell !important; - } -} -@media (min-width: 768px) and (max-width: 991px) { - .visible-sm-block { - display: block !important; - } -} -@media (min-width: 768px) and (max-width: 991px) { - .visible-sm-inline { - display: inline !important; - } -} -@media (min-width: 768px) and (max-width: 991px) { - .visible-sm-inline-block { - display: inline-block !important; - } -} -@media (min-width: 992px) and (max-width: 1199px) { - .visible-md { - display: block !important; - } - table.visible-md { - display: table; - } - tr.visible-md { - display: table-row !important; - } - th.visible-md, - td.visible-md { - display: table-cell !important; - } -} -@media (min-width: 992px) and (max-width: 1199px) { - .visible-md-block { - display: block !important; - } -} -@media (min-width: 992px) and (max-width: 1199px) { - .visible-md-inline { - display: inline !important; - } -} -@media (min-width: 992px) and (max-width: 1199px) { - .visible-md-inline-block { - display: inline-block !important; - } -} -@media (min-width: 1200px) { - .visible-lg { - display: block !important; - } - table.visible-lg { - display: table; - } - tr.visible-lg { - display: table-row !important; - } - th.visible-lg, - td.visible-lg { - display: table-cell !important; - } -} -@media (min-width: 1200px) { - .visible-lg-block { - display: block !important; - } -} -@media (min-width: 1200px) { - .visible-lg-inline { - display: inline !important; - } -} -@media (min-width: 1200px) { - .visible-lg-inline-block { - display: inline-block !important; - } -} -@media (max-width: 767px) { - .hidden-xs { - display: none !important; - } -} -@media (min-width: 768px) and (max-width: 991px) { - .hidden-sm { - display: none !important; - } -} -@media (min-width: 992px) and (max-width: 1199px) { - .hidden-md { - display: none !important; - } -} -@media (min-width: 1200px) { - .hidden-lg { - display: none !important; - } -} -.visible-print { - display: none !important; -} -@media print { - .visible-print { - display: block !important; - } - table.visible-print { - display: table; - } - tr.visible-print { - display: table-row !important; - } - th.visible-print, - td.visible-print { - display: table-cell !important; - } -} -.visible-print-block { - display: none !important; -} -@media print { - .visible-print-block { - display: block !important; - } -} -.visible-print-inline { - display: none !important; -} -@media print { - .visible-print-inline { - display: inline !important; - } -} -.visible-print-inline-block { - display: none !important; -} -@media print { - .visible-print-inline-block { - display: inline-block !important; - } -} -@media print { - .hidden-print { - display: none !important; - } -} -/*# sourceMappingURL=bootstrap.css.map */ diff --git a/node_modules/vis-network/docs/css/bootstrap.css.map b/node_modules/vis-network/docs/css/bootstrap.css.map deleted file mode 100644 index a02f6ba0a9602e353cf4a07f5ab7ad20a6dd7c96..0000000000000000000000000000000000000000 --- a/node_modules/vis-network/docs/css/bootstrap.css.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["bootstrap.css","less/normalize.less","less/print.less","less/glyphicons.less","less/scaffolding.less","less/mixins/vendor-prefixes.less","less/mixins/tab-focus.less","less/mixins/image.less","less/type.less","less/mixins/text-emphasis.less","less/mixins/background-variant.less","less/mixins/text-overflow.less","less/code.less","less/grid.less","less/mixins/grid.less","less/mixins/grid-framework.less","less/tables.less","less/mixins/table-row.less","less/forms.less","less/mixins/forms.less","less/buttons.less","less/mixins/buttons.less","less/mixins/opacity.less","less/component-animations.less","less/dropdowns.less","less/mixins/nav-divider.less","less/mixins/reset-filter.less","less/button-groups.less","less/mixins/border-radius.less","less/input-groups.less","less/navs.less","less/navbar.less","less/mixins/nav-vertical-align.less","less/utilities.less","less/breadcrumbs.less","less/pagination.less","less/mixins/pagination.less","less/pager.less","less/labels.less","less/mixins/labels.less","less/badges.less","less/jumbotron.less","less/thumbnails.less","less/alerts.less","less/mixins/alerts.less","less/progress-bars.less","less/mixins/gradients.less","less/mixins/progress-bar.less","less/media.less","less/list-group.less","less/mixins/list-group.less","less/panels.less","less/mixins/panels.less","less/responsive-embed.less","less/wells.less","less/close.less","less/modals.less","less/tooltip.less","less/popovers.less","less/carousel.less","less/mixins/clearfix.less","less/mixins/center-block.less","less/mixins/hide-text.less","less/responsive-utilities.less","less/mixins/responsive-visibility.less"],"names":[],"mappings":"AAAA,6DAA4D;ACQ5D;EACE,yBAAA;EACA,4BAAA;EACA,gCAAA;EDND;ACaD;EACE,WAAA;EDXD;ACwBD;;;;;;;;;;;;;EAaE,gBAAA;EDtBD;AC8BD;;;;EAIE,uBAAA;EACA,0BAAA;ED5BD;ACoCD;EACE,eAAA;EACA,WAAA;EDlCD;AC0CD;;EAEE,eAAA;EDxCD;ACkDD;EACE,+BAAA;EDhDD;ACuDD;;EAEE,YAAA;EDrDD;AC+DD;EACE,2BAAA;ED7DD;ACoED;;EAEE,mBAAA;EDlED;ACyED;EACE,oBAAA;EDvED;AC+ED;EACE,gBAAA;EACA,kBAAA;ED7ED;ACoFD;EACE,kBAAA;EACA,aAAA;EDlFD;ACyFD;EACE,gBAAA;EDvFD;AC8FD;;EAEE,gBAAA;EACA,gBAAA;EACA,oBAAA;EACA,0BAAA;ED5FD;AC+FD;EACE,aAAA;ED7FD;ACgGD;EACE,iBAAA;ED9FD;ACwGD;EAC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;EACE,0BAAA;E/D48LD;A+Dv8LD;EAAA;IAFI,2BAAA;I/D68LD;EACF;A+D38LD;EACE,0BAAA;E/D68LD;A+Dx8LD;EAAA;IAFI,4BAAA;I/D88LD;EACF;A+D58LD;EACE,0BAAA;E/D88LD;A+Dz8LD;EAAA;IAFI,kCAAA;I/D+8LD;EACF;A+Dx8LD;EAAA;ICpLE,0BAAA;IhEgoMC;EACF","file":"bootstrap.css","sourcesContent":["/*! normalize.css v3.0.2 | MIT License | git.io/normalize */\nhtml {\n font-family: sans-serif;\n -ms-text-size-adjust: 100%;\n -webkit-text-size-adjust: 100%;\n}\nbody {\n margin: 0;\n}\narticle,\naside,\ndetails,\nfigcaption,\nfigure,\nfooter,\nheader,\nhgroup,\nmain,\nmenu,\nnav,\nsection,\nsummary {\n display: block;\n}\naudio,\ncanvas,\nprogress,\nvideo {\n display: inline-block;\n vertical-align: baseline;\n}\naudio:not([controls]) {\n display: none;\n height: 0;\n}\n[hidden],\ntemplate {\n display: none;\n}\na {\n background-color: transparent;\n}\na:active,\na:hover {\n outline: 0;\n}\nabbr[title] {\n border-bottom: 1px dotted;\n}\nb,\nstrong {\n font-weight: bold;\n}\ndfn {\n font-style: italic;\n}\nh1 {\n font-size: 2em;\n margin: 0.67em 0;\n}\nmark {\n background: #ff0;\n color: #000;\n}\nsmall {\n font-size: 80%;\n}\nsub,\nsup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n}\nsup {\n top: -0.5em;\n}\nsub {\n bottom: -0.25em;\n}\nimg {\n border: 0;\n}\nsvg:not(:root) {\n overflow: hidden;\n}\nfigure {\n margin: 1em 40px;\n}\nhr {\n -moz-box-sizing: content-box;\n box-sizing: content-box;\n height: 0;\n}\npre {\n overflow: auto;\n}\ncode,\nkbd,\npre,\nsamp {\n font-family: monospace, monospace;\n font-size: 1em;\n}\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n color: inherit;\n font: inherit;\n margin: 0;\n}\nbutton {\n overflow: visible;\n}\nbutton,\nselect {\n text-transform: none;\n}\nbutton,\nhtml input[type=\"button\"],\ninput[type=\"reset\"],\ninput[type=\"submit\"] {\n -webkit-appearance: button;\n cursor: pointer;\n}\nbutton[disabled],\nhtml input[disabled] {\n cursor: default;\n}\nbutton::-moz-focus-inner,\ninput::-moz-focus-inner {\n border: 0;\n padding: 0;\n}\ninput {\n line-height: normal;\n}\ninput[type=\"checkbox\"],\ninput[type=\"radio\"] {\n box-sizing: border-box;\n padding: 0;\n}\ninput[type=\"number\"]::-webkit-inner-spin-button,\ninput[type=\"number\"]::-webkit-outer-spin-button {\n height: auto;\n}\ninput[type=\"search\"] {\n -webkit-appearance: textfield;\n -moz-box-sizing: content-box;\n -webkit-box-sizing: content-box;\n box-sizing: content-box;\n}\ninput[type=\"search\"]::-webkit-search-cancel-button,\ninput[type=\"search\"]::-webkit-search-decoration {\n -webkit-appearance: none;\n}\nfieldset {\n border: 1px solid #c0c0c0;\n margin: 0 2px;\n padding: 0.35em 0.625em 0.75em;\n}\nlegend {\n border: 0;\n padding: 0;\n}\ntextarea {\n overflow: auto;\n}\noptgroup {\n font-weight: bold;\n}\ntable {\n border-collapse: collapse;\n border-spacing: 0;\n}\ntd,\nth {\n padding: 0;\n}\n/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */\n@media print {\n *,\n *:before,\n *:after {\n background: transparent !important;\n color: #000 !important;\n box-shadow: none !important;\n text-shadow: none !important;\n }\n a,\n a:visited {\n text-decoration: underline;\n }\n a[href]:after {\n content: \" (\" attr(href) \")\";\n }\n abbr[title]:after {\n content: \" (\" attr(title) \")\";\n }\n a[href^=\"#\"]:after,\n a[href^=\"javascript:\"]:after {\n content: \"\";\n }\n pre,\n blockquote {\n border: 1px solid #999;\n page-break-inside: avoid;\n }\n thead {\n display: table-header-group;\n }\n tr,\n img {\n page-break-inside: avoid;\n }\n img {\n max-width: 100% !important;\n }\n p,\n h2,\n h3 {\n orphans: 3;\n widows: 3;\n }\n h2,\n h3 {\n page-break-after: avoid;\n }\n select {\n background: #fff !important;\n }\n .navbar {\n display: none;\n }\n .btn > .caret,\n .dropup > .btn > .caret {\n border-top-color: #000 !important;\n }\n .label {\n border: 1px solid #000;\n }\n .table {\n border-collapse: collapse !important;\n }\n .table td,\n .table th {\n background-color: #fff !important;\n }\n .table-bordered th,\n .table-bordered td {\n border: 1px solid #ddd !important;\n }\n}\n@font-face {\n font-family: 'Glyphicons Halflings';\n src: url('../fonts/glyphicons-halflings-regular.eot');\n src: url('../fonts/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'), url('../fonts/glyphicons-halflings-regular.woff') format('woff'), url('../fonts/glyphicons-halflings-regular.ttf') format('truetype'), url('../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular') format('svg');\n}\n.glyphicon {\n position: relative;\n top: 1px;\n display: inline-block;\n font-family: 'Glyphicons Halflings';\n font-style: normal;\n font-weight: normal;\n line-height: 1;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n.glyphicon-asterisk:before {\n content: \"\\2a\";\n}\n.glyphicon-plus:before {\n content: \"\\2b\";\n}\n.glyphicon-euro:before,\n.glyphicon-eur:before {\n content: \"\\20ac\";\n}\n.glyphicon-minus:before {\n content: \"\\2212\";\n}\n.glyphicon-cloud:before {\n content: \"\\2601\";\n}\n.glyphicon-envelope:before {\n content: \"\\2709\";\n}\n.glyphicon-pencil:before {\n content: \"\\270f\";\n}\n.glyphicon-glass:before {\n content: \"\\e001\";\n}\n.glyphicon-music:before {\n content: \"\\e002\";\n}\n.glyphicon-search:before {\n content: \"\\e003\";\n}\n.glyphicon-heart:before {\n content: \"\\e005\";\n}\n.glyphicon-star:before {\n content: \"\\e006\";\n}\n.glyphicon-star-empty:before {\n content: \"\\e007\";\n}\n.glyphicon-user:before {\n content: \"\\e008\";\n}\n.glyphicon-film:before {\n content: \"\\e009\";\n}\n.glyphicon-th-large:before {\n content: \"\\e010\";\n}\n.glyphicon-th:before {\n content: \"\\e011\";\n}\n.glyphicon-th-list:before {\n content: \"\\e012\";\n}\n.glyphicon-ok:before {\n content: \"\\e013\";\n}\n.glyphicon-remove:before {\n content: \"\\e014\";\n}\n.glyphicon-zoom-in:before {\n content: \"\\e015\";\n}\n.glyphicon-zoom-out:before {\n content: \"\\e016\";\n}\n.glyphicon-off:before {\n content: \"\\e017\";\n}\n.glyphicon-signal:before {\n content: \"\\e018\";\n}\n.glyphicon-cog:before {\n content: \"\\e019\";\n}\n.glyphicon-trash:before {\n content: \"\\e020\";\n}\n.glyphicon-home:before {\n content: \"\\e021\";\n}\n.glyphicon-file:before {\n content: \"\\e022\";\n}\n.glyphicon-time:before {\n content: \"\\e023\";\n}\n.glyphicon-road:before {\n content: \"\\e024\";\n}\n.glyphicon-download-alt:before {\n content: \"\\e025\";\n}\n.glyphicon-download:before {\n content: \"\\e026\";\n}\n.glyphicon-upload:before {\n content: \"\\e027\";\n}\n.glyphicon-inbox:before {\n content: \"\\e028\";\n}\n.glyphicon-play-circle:before {\n content: \"\\e029\";\n}\n.glyphicon-repeat:before {\n content: \"\\e030\";\n}\n.glyphicon-refresh:before {\n content: \"\\e031\";\n}\n.glyphicon-list-alt:before {\n content: \"\\e032\";\n}\n.glyphicon-lock:before {\n content: \"\\e033\";\n}\n.glyphicon-flag:before {\n content: \"\\e034\";\n}\n.glyphicon-headphones:before {\n content: \"\\e035\";\n}\n.glyphicon-volume-off:before {\n content: \"\\e036\";\n}\n.glyphicon-volume-down:before {\n content: \"\\e037\";\n}\n.glyphicon-volume-up:before {\n content: \"\\e038\";\n}\n.glyphicon-qrcode:before {\n content: \"\\e039\";\n}\n.glyphicon-barcode:before {\n content: \"\\e040\";\n}\n.glyphicon-tag:before {\n content: \"\\e041\";\n}\n.glyphicon-tags:before {\n content: \"\\e042\";\n}\n.glyphicon-book:before {\n content: \"\\e043\";\n}\n.glyphicon-bookmark:before {\n content: \"\\e044\";\n}\n.glyphicon-print:before {\n content: \"\\e045\";\n}\n.glyphicon-camera:before {\n content: \"\\e046\";\n}\n.glyphicon-font:before {\n content: \"\\e047\";\n}\n.glyphicon-bold:before {\n content: \"\\e048\";\n}\n.glyphicon-italic:before {\n content: \"\\e049\";\n}\n.glyphicon-text-height:before {\n content: \"\\e050\";\n}\n.glyphicon-text-width:before {\n content: \"\\e051\";\n}\n.glyphicon-align-left:before {\n content: \"\\e052\";\n}\n.glyphicon-align-center:before {\n content: \"\\e053\";\n}\n.glyphicon-align-right:before {\n content: \"\\e054\";\n}\n.glyphicon-align-justify:before {\n content: \"\\e055\";\n}\n.glyphicon-list:before {\n content: \"\\e056\";\n}\n.glyphicon-indent-left:before {\n content: \"\\e057\";\n}\n.glyphicon-indent-right:before {\n content: \"\\e058\";\n}\n.glyphicon-facetime-video:before {\n content: \"\\e059\";\n}\n.glyphicon-picture:before {\n content: \"\\e060\";\n}\n.glyphicon-map-marker:before {\n content: \"\\e062\";\n}\n.glyphicon-adjust:before {\n content: \"\\e063\";\n}\n.glyphicon-tint:before {\n content: \"\\e064\";\n}\n.glyphicon-edit:before {\n content: \"\\e065\";\n}\n.glyphicon-share:before {\n content: \"\\e066\";\n}\n.glyphicon-check:before {\n content: \"\\e067\";\n}\n.glyphicon-move:before {\n content: \"\\e068\";\n}\n.glyphicon-step-backward:before {\n content: \"\\e069\";\n}\n.glyphicon-fast-backward:before {\n content: \"\\e070\";\n}\n.glyphicon-backward:before {\n content: \"\\e071\";\n}\n.glyphicon-play:before {\n content: \"\\e072\";\n}\n.glyphicon-pause:before {\n content: \"\\e073\";\n}\n.glyphicon-stop:before {\n content: \"\\e074\";\n}\n.glyphicon-forward:before {\n content: \"\\e075\";\n}\n.glyphicon-fast-forward:before {\n content: \"\\e076\";\n}\n.glyphicon-step-forward:before {\n content: \"\\e077\";\n}\n.glyphicon-eject:before {\n content: \"\\e078\";\n}\n.glyphicon-chevron-left:before {\n content: \"\\e079\";\n}\n.glyphicon-chevron-right:before {\n content: \"\\e080\";\n}\n.glyphicon-plus-sign:before {\n content: \"\\e081\";\n}\n.glyphicon-minus-sign:before {\n content: \"\\e082\";\n}\n.glyphicon-remove-sign:before {\n content: \"\\e083\";\n}\n.glyphicon-ok-sign:before {\n content: \"\\e084\";\n}\n.glyphicon-question-sign:before {\n content: \"\\e085\";\n}\n.glyphicon-info-sign:before {\n content: \"\\e086\";\n}\n.glyphicon-screenshot:before {\n content: \"\\e087\";\n}\n.glyphicon-remove-circle:before {\n content: \"\\e088\";\n}\n.glyphicon-ok-circle:before {\n content: \"\\e089\";\n}\n.glyphicon-ban-circle:before {\n content: \"\\e090\";\n}\n.glyphicon-arrow-left:before {\n content: \"\\e091\";\n}\n.glyphicon-arrow-right:before {\n content: \"\\e092\";\n}\n.glyphicon-arrow-up:before {\n content: \"\\e093\";\n}\n.glyphicon-arrow-down:before {\n content: \"\\e094\";\n}\n.glyphicon-share-alt:before {\n content: \"\\e095\";\n}\n.glyphicon-resize-full:before {\n content: \"\\e096\";\n}\n.glyphicon-resize-small:before {\n content: \"\\e097\";\n}\n.glyphicon-exclamation-sign:before {\n content: \"\\e101\";\n}\n.glyphicon-gift:before {\n content: \"\\e102\";\n}\n.glyphicon-leaf:before {\n content: \"\\e103\";\n}\n.glyphicon-fire:before {\n content: \"\\e104\";\n}\n.glyphicon-eye-open:before {\n content: \"\\e105\";\n}\n.glyphicon-eye-close:before {\n content: \"\\e106\";\n}\n.glyphicon-warning-sign:before {\n content: \"\\e107\";\n}\n.glyphicon-plane:before {\n content: \"\\e108\";\n}\n.glyphicon-calendar:before {\n content: \"\\e109\";\n}\n.glyphicon-random:before {\n content: \"\\e110\";\n}\n.glyphicon-comment:before {\n content: \"\\e111\";\n}\n.glyphicon-magnet:before {\n content: \"\\e112\";\n}\n.glyphicon-chevron-up:before {\n content: \"\\e113\";\n}\n.glyphicon-chevron-down:before {\n content: \"\\e114\";\n}\n.glyphicon-retweet:before {\n content: \"\\e115\";\n}\n.glyphicon-shopping-cart:before {\n content: \"\\e116\";\n}\n.glyphicon-folder-close:before {\n content: \"\\e117\";\n}\n.glyphicon-folder-open:before {\n content: \"\\e118\";\n}\n.glyphicon-resize-vertical:before {\n content: \"\\e119\";\n}\n.glyphicon-resize-horizontal:before {\n content: \"\\e120\";\n}\n.glyphicon-hdd:before {\n content: \"\\e121\";\n}\n.glyphicon-bullhorn:before {\n content: \"\\e122\";\n}\n.glyphicon-bell:before {\n content: \"\\e123\";\n}\n.glyphicon-certificate:before {\n content: \"\\e124\";\n}\n.glyphicon-thumbs-up:before {\n content: \"\\e125\";\n}\n.glyphicon-thumbs-down:before {\n content: \"\\e126\";\n}\n.glyphicon-hand-right:before {\n content: \"\\e127\";\n}\n.glyphicon-hand-left:before {\n content: \"\\e128\";\n}\n.glyphicon-hand-up:before {\n content: \"\\e129\";\n}\n.glyphicon-hand-down:before {\n content: \"\\e130\";\n}\n.glyphicon-circle-arrow-right:before {\n content: \"\\e131\";\n}\n.glyphicon-circle-arrow-left:before {\n content: \"\\e132\";\n}\n.glyphicon-circle-arrow-up:before {\n content: \"\\e133\";\n}\n.glyphicon-circle-arrow-down:before {\n content: \"\\e134\";\n}\n.glyphicon-globe:before {\n content: \"\\e135\";\n}\n.glyphicon-wrench:before {\n content: \"\\e136\";\n}\n.glyphicon-tasks:before {\n content: \"\\e137\";\n}\n.glyphicon-filter:before {\n content: \"\\e138\";\n}\n.glyphicon-briefcase:before {\n content: \"\\e139\";\n}\n.glyphicon-fullscreen:before {\n content: \"\\e140\";\n}\n.glyphicon-dashboard:before {\n content: \"\\e141\";\n}\n.glyphicon-paperclip:before {\n content: \"\\e142\";\n}\n.glyphicon-heart-empty:before {\n content: \"\\e143\";\n}\n.glyphicon-link:before {\n content: \"\\e144\";\n}\n.glyphicon-phone:before {\n content: \"\\e145\";\n}\n.glyphicon-pushpin:before {\n content: \"\\e146\";\n}\n.glyphicon-usd:before {\n content: \"\\e148\";\n}\n.glyphicon-gbp:before {\n content: \"\\e149\";\n}\n.glyphicon-sort:before {\n content: \"\\e150\";\n}\n.glyphicon-sort-by-alphabet:before {\n content: \"\\e151\";\n}\n.glyphicon-sort-by-alphabet-alt:before {\n content: \"\\e152\";\n}\n.glyphicon-sort-by-order:before {\n content: \"\\e153\";\n}\n.glyphicon-sort-by-order-alt:before {\n content: \"\\e154\";\n}\n.glyphicon-sort-by-attributes:before {\n content: \"\\e155\";\n}\n.glyphicon-sort-by-attributes-alt:before {\n content: \"\\e156\";\n}\n.glyphicon-unchecked:before {\n content: \"\\e157\";\n}\n.glyphicon-expand:before {\n content: \"\\e158\";\n}\n.glyphicon-collapse-down:before {\n content: \"\\e159\";\n}\n.glyphicon-collapse-up:before {\n content: \"\\e160\";\n}\n.glyphicon-log-in:before {\n content: \"\\e161\";\n}\n.glyphicon-flash:before {\n content: \"\\e162\";\n}\n.glyphicon-log-out:before {\n content: \"\\e163\";\n}\n.glyphicon-new-window:before {\n content: \"\\e164\";\n}\n.glyphicon-record:before {\n content: \"\\e165\";\n}\n.glyphicon-save:before {\n content: \"\\e166\";\n}\n.glyphicon-open:before {\n content: \"\\e167\";\n}\n.glyphicon-saved:before {\n content: \"\\e168\";\n}\n.glyphicon-import:before {\n content: \"\\e169\";\n}\n.glyphicon-export:before {\n content: \"\\e170\";\n}\n.glyphicon-send:before {\n content: \"\\e171\";\n}\n.glyphicon-floppy-disk:before {\n content: \"\\e172\";\n}\n.glyphicon-floppy-saved:before {\n content: \"\\e173\";\n}\n.glyphicon-floppy-remove:before {\n content: \"\\e174\";\n}\n.glyphicon-floppy-save:before {\n content: \"\\e175\";\n}\n.glyphicon-floppy-open:before {\n content: \"\\e176\";\n}\n.glyphicon-credit-card:before {\n content: \"\\e177\";\n}\n.glyphicon-transfer:before {\n content: \"\\e178\";\n}\n.glyphicon-cutlery:before {\n content: \"\\e179\";\n}\n.glyphicon-header:before {\n content: \"\\e180\";\n}\n.glyphicon-compressed:before {\n content: \"\\e181\";\n}\n.glyphicon-earphone:before {\n content: \"\\e182\";\n}\n.glyphicon-phone-alt:before {\n content: \"\\e183\";\n}\n.glyphicon-tower:before {\n content: \"\\e184\";\n}\n.glyphicon-stats:before {\n content: \"\\e185\";\n}\n.glyphicon-sd-video:before {\n content: \"\\e186\";\n}\n.glyphicon-hd-video:before {\n content: \"\\e187\";\n}\n.glyphicon-subtitles:before {\n content: \"\\e188\";\n}\n.glyphicon-sound-stereo:before {\n content: \"\\e189\";\n}\n.glyphicon-sound-dolby:before {\n content: \"\\e190\";\n}\n.glyphicon-sound-5-1:before {\n content: \"\\e191\";\n}\n.glyphicon-sound-6-1:before {\n content: \"\\e192\";\n}\n.glyphicon-sound-7-1:before {\n content: \"\\e193\";\n}\n.glyphicon-copyright-mark:before {\n content: \"\\e194\";\n}\n.glyphicon-registration-mark:before {\n content: \"\\e195\";\n}\n.glyphicon-cloud-download:before {\n content: \"\\e197\";\n}\n.glyphicon-cloud-upload:before {\n content: \"\\e198\";\n}\n.glyphicon-tree-conifer:before {\n content: \"\\e199\";\n}\n.glyphicon-tree-deciduous:before {\n content: \"\\e200\";\n}\n* {\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n}\n*:before,\n*:after {\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n}\nhtml {\n font-size: 10px;\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n}\nbody {\n font-family: \"Helvetica Neue\", Helvetica, Arial, sans-serif;\n font-size: 14px;\n line-height: 1.42857143;\n color: #333333;\n background-color: #ffffff;\n}\ninput,\nbutton,\nselect,\ntextarea {\n font-family: inherit;\n font-size: inherit;\n line-height: inherit;\n}\na {\n color: #337ab7;\n text-decoration: none;\n}\na:hover,\na:focus {\n color: #23527c;\n text-decoration: underline;\n}\na:focus {\n outline: thin dotted;\n outline: 5px auto -webkit-focus-ring-color;\n outline-offset: -2px;\n}\nfigure {\n margin: 0;\n}\nimg {\n vertical-align: middle;\n}\n.img-responsive,\n.thumbnail > img,\n.thumbnail a > img,\n.carousel-inner > .item > img,\n.carousel-inner > .item > a > img {\n display: block;\n max-width: 100%;\n height: auto;\n}\n.img-rounded {\n border-radius: 6px;\n}\n.img-thumbnail {\n padding: 4px;\n line-height: 1.42857143;\n background-color: #ffffff;\n border: 1px solid #dddddd;\n border-radius: 4px;\n -webkit-transition: all 0.2s ease-in-out;\n -o-transition: all 0.2s ease-in-out;\n transition: all 0.2s ease-in-out;\n display: inline-block;\n max-width: 100%;\n height: auto;\n}\n.img-circle {\n border-radius: 50%;\n}\nhr {\n margin-top: 20px;\n margin-bottom: 20px;\n border: 0;\n border-top: 1px solid #eeeeee;\n}\n.sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n margin: -1px;\n padding: 0;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n border: 0;\n}\n.sr-only-focusable:active,\n.sr-only-focusable:focus {\n position: static;\n width: auto;\n height: auto;\n margin: 0;\n overflow: visible;\n clip: auto;\n}\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\n.h1,\n.h2,\n.h3,\n.h4,\n.h5,\n.h6 {\n font-family: inherit;\n font-weight: 500;\n line-height: 1.1;\n color: inherit;\n}\nh1 small,\nh2 small,\nh3 small,\nh4 small,\nh5 small,\nh6 small,\n.h1 small,\n.h2 small,\n.h3 small,\n.h4 small,\n.h5 small,\n.h6 small,\nh1 .small,\nh2 .small,\nh3 .small,\nh4 .small,\nh5 .small,\nh6 .small,\n.h1 .small,\n.h2 .small,\n.h3 .small,\n.h4 .small,\n.h5 .small,\n.h6 .small {\n font-weight: normal;\n line-height: 1;\n color: #777777;\n}\nh1,\n.h1,\nh2,\n.h2,\nh3,\n.h3 {\n margin-top: 20px;\n margin-bottom: 10px;\n}\nh1 small,\n.h1 small,\nh2 small,\n.h2 small,\nh3 small,\n.h3 small,\nh1 .small,\n.h1 .small,\nh2 .small,\n.h2 .small,\nh3 .small,\n.h3 .small {\n font-size: 65%;\n}\nh4,\n.h4,\nh5,\n.h5,\nh6,\n.h6 {\n margin-top: 10px;\n margin-bottom: 10px;\n}\nh4 small,\n.h4 small,\nh5 small,\n.h5 small,\nh6 small,\n.h6 small,\nh4 .small,\n.h4 .small,\nh5 .small,\n.h5 .small,\nh6 .small,\n.h6 .small {\n font-size: 75%;\n}\nh1,\n.h1 {\n font-size: 36px;\n}\nh2,\n.h2 {\n font-size: 30px;\n}\nh3,\n.h3 {\n font-size: 24px;\n}\nh4,\n.h4 {\n font-size: 18px;\n}\nh5,\n.h5 {\n font-size: 14px;\n}\nh6,\n.h6 {\n font-size: 12px;\n}\np {\n margin: 0 0 10px;\n}\n.lead {\n margin-bottom: 20px;\n font-size: 16px;\n font-weight: 300;\n line-height: 1.4;\n}\n@media (min-width: 768px) {\n .lead {\n font-size: 21px;\n }\n}\nsmall,\n.small {\n font-size: 85%;\n}\nmark,\n.mark {\n background-color: #fcf8e3;\n padding: .2em;\n}\n.text-left {\n text-align: left;\n}\n.text-right {\n text-align: right;\n}\n.text-center {\n text-align: center;\n}\n.text-justify {\n text-align: justify;\n}\n.text-nowrap {\n white-space: nowrap;\n}\n.text-lowercase {\n text-transform: lowercase;\n}\n.text-uppercase {\n text-transform: uppercase;\n}\n.text-capitalize {\n text-transform: capitalize;\n}\n.text-muted {\n color: #777777;\n}\n.text-primary {\n color: #337ab7;\n}\na.text-primary:hover {\n color: #286090;\n}\n.text-success {\n color: #3c763d;\n}\na.text-success:hover {\n color: #2b542c;\n}\n.text-info {\n color: #31708f;\n}\na.text-info:hover {\n color: #245269;\n}\n.text-warning {\n color: #8a6d3b;\n}\na.text-warning:hover {\n color: #66512c;\n}\n.text-danger {\n color: #a94442;\n}\na.text-danger:hover {\n color: #843534;\n}\n.bg-primary {\n color: #fff;\n background-color: #337ab7;\n}\na.bg-primary:hover {\n background-color: #286090;\n}\n.bg-success {\n background-color: #dff0d8;\n}\na.bg-success:hover {\n background-color: #c1e2b3;\n}\n.bg-info {\n background-color: #d9edf7;\n}\na.bg-info:hover {\n background-color: #afd9ee;\n}\n.bg-warning {\n background-color: #fcf8e3;\n}\na.bg-warning:hover {\n background-color: #f7ecb5;\n}\n.bg-danger {\n background-color: #f2dede;\n}\na.bg-danger:hover {\n background-color: #e4b9b9;\n}\n.page-header {\n padding-bottom: 9px;\n margin: 40px 0 20px;\n border-bottom: 1px solid #eeeeee;\n}\nul,\nol {\n margin-top: 0;\n margin-bottom: 10px;\n}\nul ul,\nol ul,\nul ol,\nol ol {\n margin-bottom: 0;\n}\n.list-unstyled {\n padding-left: 0;\n list-style: none;\n}\n.list-inline {\n padding-left: 0;\n list-style: none;\n margin-left: -5px;\n}\n.list-inline > li {\n display: inline-block;\n padding-left: 5px;\n padding-right: 5px;\n}\ndl {\n margin-top: 0;\n margin-bottom: 20px;\n}\ndt,\ndd {\n line-height: 1.42857143;\n}\ndt {\n font-weight: bold;\n}\ndd {\n margin-left: 0;\n}\n@media (min-width: 768px) {\n .dl-horizontal dt {\n float: left;\n width: 160px;\n clear: left;\n text-align: right;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n .dl-horizontal dd {\n margin-left: 180px;\n }\n}\nabbr[title],\nabbr[data-original-title] {\n cursor: help;\n border-bottom: 1px dotted #777777;\n}\n.initialism {\n font-size: 90%;\n text-transform: uppercase;\n}\nblockquote {\n padding: 10px 20px;\n margin: 0 0 20px;\n font-size: 17.5px;\n border-left: 5px solid #eeeeee;\n}\nblockquote p:last-child,\nblockquote ul:last-child,\nblockquote ol:last-child {\n margin-bottom: 0;\n}\nblockquote footer,\nblockquote small,\nblockquote .small {\n display: block;\n font-size: 80%;\n line-height: 1.42857143;\n color: #777777;\n}\nblockquote footer:before,\nblockquote small:before,\nblockquote .small:before {\n content: '\\2014 \\00A0';\n}\n.blockquote-reverse,\nblockquote.pull-right {\n padding-right: 15px;\n padding-left: 0;\n border-right: 5px solid #eeeeee;\n border-left: 0;\n text-align: right;\n}\n.blockquote-reverse footer:before,\nblockquote.pull-right footer:before,\n.blockquote-reverse small:before,\nblockquote.pull-right small:before,\n.blockquote-reverse .small:before,\nblockquote.pull-right .small:before {\n content: '';\n}\n.blockquote-reverse footer:after,\nblockquote.pull-right footer:after,\n.blockquote-reverse small:after,\nblockquote.pull-right small:after,\n.blockquote-reverse .small:after,\nblockquote.pull-right .small:after {\n content: '\\00A0 \\2014';\n}\naddress {\n margin-bottom: 20px;\n font-style: normal;\n line-height: 1.42857143;\n}\ncode,\nkbd,\npre,\nsamp {\n font-family: Menlo, Monaco, Consolas, \"Courier New\", monospace;\n}\ncode {\n padding: 2px 4px;\n font-size: 90%;\n color: #c7254e;\n background-color: #f9f2f4;\n border-radius: 4px;\n}\nkbd {\n padding: 2px 4px;\n font-size: 90%;\n color: #ffffff;\n background-color: #333333;\n border-radius: 3px;\n box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.25);\n}\nkbd kbd {\n padding: 0;\n font-size: 100%;\n font-weight: bold;\n box-shadow: none;\n}\npre {\n display: block;\n padding: 9.5px;\n margin: 0 0 10px;\n font-size: 13px;\n line-height: 1.42857143;\n word-break: break-all;\n word-wrap: break-word;\n color: #333333;\n background-color: #f5f5f5;\n border: 1px solid #cccccc;\n border-radius: 4px;\n}\npre code {\n padding: 0;\n font-size: inherit;\n color: inherit;\n white-space: pre-wrap;\n background-color: transparent;\n border-radius: 0;\n}\n.pre-scrollable {\n max-height: 340px;\n overflow-y: scroll;\n}\n.container {\n margin-right: auto;\n margin-left: auto;\n padding-left: 15px;\n padding-right: 15px;\n}\n@media (min-width: 768px) {\n .container {\n width: 750px;\n }\n}\n@media (min-width: 992px) {\n .container {\n width: 970px;\n }\n}\n@media (min-width: 1200px) {\n .container {\n width: 1170px;\n }\n}\n.container-fluid {\n margin-right: auto;\n margin-left: auto;\n padding-left: 15px;\n padding-right: 15px;\n}\n.row {\n margin-left: -15px;\n margin-right: -15px;\n}\n.col-xs-1, .col-sm-1, .col-md-1, .col-lg-1, .col-xs-2, .col-sm-2, .col-md-2, .col-lg-2, .col-xs-3, .col-sm-3, .col-md-3, .col-lg-3, .col-xs-4, .col-sm-4, .col-md-4, .col-lg-4, .col-xs-5, .col-sm-5, .col-md-5, .col-lg-5, .col-xs-6, .col-sm-6, .col-md-6, .col-lg-6, .col-xs-7, .col-sm-7, .col-md-7, .col-lg-7, .col-xs-8, .col-sm-8, .col-md-8, .col-lg-8, .col-xs-9, .col-sm-9, .col-md-9, .col-lg-9, .col-xs-10, .col-sm-10, .col-md-10, .col-lg-10, .col-xs-11, .col-sm-11, .col-md-11, .col-lg-11, .col-xs-12, .col-sm-12, .col-md-12, .col-lg-12 {\n position: relative;\n min-height: 1px;\n padding-left: 15px;\n padding-right: 15px;\n}\n.col-xs-1, .col-xs-2, .col-xs-3, .col-xs-4, .col-xs-5, .col-xs-6, .col-xs-7, .col-xs-8, .col-xs-9, .col-xs-10, .col-xs-11, .col-xs-12 {\n float: left;\n}\n.col-xs-12 {\n width: 100%;\n}\n.col-xs-11 {\n width: 91.66666667%;\n}\n.col-xs-10 {\n width: 83.33333333%;\n}\n.col-xs-9 {\n width: 75%;\n}\n.col-xs-8 {\n width: 66.66666667%;\n}\n.col-xs-7 {\n width: 58.33333333%;\n}\n.col-xs-6 {\n width: 50%;\n}\n.col-xs-5 {\n width: 41.66666667%;\n}\n.col-xs-4 {\n width: 33.33333333%;\n}\n.col-xs-3 {\n width: 25%;\n}\n.col-xs-2 {\n width: 16.66666667%;\n}\n.col-xs-1 {\n width: 8.33333333%;\n}\n.col-xs-pull-12 {\n right: 100%;\n}\n.col-xs-pull-11 {\n right: 91.66666667%;\n}\n.col-xs-pull-10 {\n right: 83.33333333%;\n}\n.col-xs-pull-9 {\n right: 75%;\n}\n.col-xs-pull-8 {\n right: 66.66666667%;\n}\n.col-xs-pull-7 {\n right: 58.33333333%;\n}\n.col-xs-pull-6 {\n right: 50%;\n}\n.col-xs-pull-5 {\n right: 41.66666667%;\n}\n.col-xs-pull-4 {\n right: 33.33333333%;\n}\n.col-xs-pull-3 {\n right: 25%;\n}\n.col-xs-pull-2 {\n right: 16.66666667%;\n}\n.col-xs-pull-1 {\n right: 8.33333333%;\n}\n.col-xs-pull-0 {\n right: auto;\n}\n.col-xs-push-12 {\n left: 100%;\n}\n.col-xs-push-11 {\n left: 91.66666667%;\n}\n.col-xs-push-10 {\n left: 83.33333333%;\n}\n.col-xs-push-9 {\n left: 75%;\n}\n.col-xs-push-8 {\n left: 66.66666667%;\n}\n.col-xs-push-7 {\n left: 58.33333333%;\n}\n.col-xs-push-6 {\n left: 50%;\n}\n.col-xs-push-5 {\n left: 41.66666667%;\n}\n.col-xs-push-4 {\n left: 33.33333333%;\n}\n.col-xs-push-3 {\n left: 25%;\n}\n.col-xs-push-2 {\n left: 16.66666667%;\n}\n.col-xs-push-1 {\n left: 8.33333333%;\n}\n.col-xs-push-0 {\n left: auto;\n}\n.col-xs-offset-12 {\n margin-left: 100%;\n}\n.col-xs-offset-11 {\n margin-left: 91.66666667%;\n}\n.col-xs-offset-10 {\n margin-left: 83.33333333%;\n}\n.col-xs-offset-9 {\n margin-left: 75%;\n}\n.col-xs-offset-8 {\n margin-left: 66.66666667%;\n}\n.col-xs-offset-7 {\n margin-left: 58.33333333%;\n}\n.col-xs-offset-6 {\n margin-left: 50%;\n}\n.col-xs-offset-5 {\n margin-left: 41.66666667%;\n}\n.col-xs-offset-4 {\n margin-left: 33.33333333%;\n}\n.col-xs-offset-3 {\n margin-left: 25%;\n}\n.col-xs-offset-2 {\n margin-left: 16.66666667%;\n}\n.col-xs-offset-1 {\n margin-left: 8.33333333%;\n}\n.col-xs-offset-0 {\n margin-left: 0%;\n}\n@media (min-width: 768px) {\n .col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-11, .col-sm-12 {\n float: left;\n }\n .col-sm-12 {\n width: 100%;\n }\n .col-sm-11 {\n width: 91.66666667%;\n }\n .col-sm-10 {\n width: 83.33333333%;\n }\n .col-sm-9 {\n width: 75%;\n }\n .col-sm-8 {\n width: 66.66666667%;\n }\n .col-sm-7 {\n width: 58.33333333%;\n }\n .col-sm-6 {\n width: 50%;\n }\n .col-sm-5 {\n width: 41.66666667%;\n }\n .col-sm-4 {\n width: 33.33333333%;\n }\n .col-sm-3 {\n width: 25%;\n }\n .col-sm-2 {\n width: 16.66666667%;\n }\n .col-sm-1 {\n width: 8.33333333%;\n }\n .col-sm-pull-12 {\n right: 100%;\n }\n .col-sm-pull-11 {\n right: 91.66666667%;\n }\n .col-sm-pull-10 {\n right: 83.33333333%;\n }\n .col-sm-pull-9 {\n right: 75%;\n }\n .col-sm-pull-8 {\n right: 66.66666667%;\n }\n .col-sm-pull-7 {\n right: 58.33333333%;\n }\n .col-sm-pull-6 {\n right: 50%;\n }\n .col-sm-pull-5 {\n right: 41.66666667%;\n }\n .col-sm-pull-4 {\n right: 33.33333333%;\n }\n .col-sm-pull-3 {\n right: 25%;\n }\n .col-sm-pull-2 {\n right: 16.66666667%;\n }\n .col-sm-pull-1 {\n right: 8.33333333%;\n }\n .col-sm-pull-0 {\n right: auto;\n }\n .col-sm-push-12 {\n left: 100%;\n }\n .col-sm-push-11 {\n left: 91.66666667%;\n }\n .col-sm-push-10 {\n left: 83.33333333%;\n }\n .col-sm-push-9 {\n left: 75%;\n }\n .col-sm-push-8 {\n left: 66.66666667%;\n }\n .col-sm-push-7 {\n left: 58.33333333%;\n }\n .col-sm-push-6 {\n left: 50%;\n }\n .col-sm-push-5 {\n left: 41.66666667%;\n }\n .col-sm-push-4 {\n left: 33.33333333%;\n }\n .col-sm-push-3 {\n left: 25%;\n }\n .col-sm-push-2 {\n left: 16.66666667%;\n }\n .col-sm-push-1 {\n left: 8.33333333%;\n }\n .col-sm-push-0 {\n left: auto;\n }\n .col-sm-offset-12 {\n margin-left: 100%;\n }\n .col-sm-offset-11 {\n margin-left: 91.66666667%;\n }\n .col-sm-offset-10 {\n margin-left: 83.33333333%;\n }\n .col-sm-offset-9 {\n margin-left: 75%;\n }\n .col-sm-offset-8 {\n margin-left: 66.66666667%;\n }\n .col-sm-offset-7 {\n margin-left: 58.33333333%;\n }\n .col-sm-offset-6 {\n margin-left: 50%;\n }\n .col-sm-offset-5 {\n margin-left: 41.66666667%;\n }\n .col-sm-offset-4 {\n margin-left: 33.33333333%;\n }\n .col-sm-offset-3 {\n margin-left: 25%;\n }\n .col-sm-offset-2 {\n margin-left: 16.66666667%;\n }\n .col-sm-offset-1 {\n margin-left: 8.33333333%;\n }\n .col-sm-offset-0 {\n margin-left: 0%;\n }\n}\n@media (min-width: 992px) {\n .col-md-1, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-md-9, .col-md-10, .col-md-11, .col-md-12 {\n float: left;\n }\n .col-md-12 {\n width: 100%;\n }\n .col-md-11 {\n width: 91.66666667%;\n }\n .col-md-10 {\n width: 83.33333333%;\n }\n .col-md-9 {\n width: 75%;\n }\n .col-md-8 {\n width: 66.66666667%;\n }\n .col-md-7 {\n width: 58.33333333%;\n }\n .col-md-6 {\n width: 50%;\n }\n .col-md-5 {\n width: 41.66666667%;\n }\n .col-md-4 {\n width: 33.33333333%;\n }\n .col-md-3 {\n width: 25%;\n }\n .col-md-2 {\n width: 16.66666667%;\n }\n .col-md-1 {\n width: 8.33333333%;\n }\n .col-md-pull-12 {\n right: 100%;\n }\n .col-md-pull-11 {\n right: 91.66666667%;\n }\n .col-md-pull-10 {\n right: 83.33333333%;\n }\n .col-md-pull-9 {\n right: 75%;\n }\n .col-md-pull-8 {\n right: 66.66666667%;\n }\n .col-md-pull-7 {\n right: 58.33333333%;\n }\n .col-md-pull-6 {\n right: 50%;\n }\n .col-md-pull-5 {\n right: 41.66666667%;\n }\n .col-md-pull-4 {\n right: 33.33333333%;\n }\n .col-md-pull-3 {\n right: 25%;\n }\n .col-md-pull-2 {\n right: 16.66666667%;\n }\n .col-md-pull-1 {\n right: 8.33333333%;\n }\n .col-md-pull-0 {\n right: auto;\n }\n .col-md-push-12 {\n left: 100%;\n }\n .col-md-push-11 {\n left: 91.66666667%;\n }\n .col-md-push-10 {\n left: 83.33333333%;\n }\n .col-md-push-9 {\n left: 75%;\n }\n .col-md-push-8 {\n left: 66.66666667%;\n }\n .col-md-push-7 {\n left: 58.33333333%;\n }\n .col-md-push-6 {\n left: 50%;\n }\n .col-md-push-5 {\n left: 41.66666667%;\n }\n .col-md-push-4 {\n left: 33.33333333%;\n }\n .col-md-push-3 {\n left: 25%;\n }\n .col-md-push-2 {\n left: 16.66666667%;\n }\n .col-md-push-1 {\n left: 8.33333333%;\n }\n .col-md-push-0 {\n left: auto;\n }\n .col-md-offset-12 {\n margin-left: 100%;\n }\n .col-md-offset-11 {\n margin-left: 91.66666667%;\n }\n .col-md-offset-10 {\n margin-left: 83.33333333%;\n }\n .col-md-offset-9 {\n margin-left: 75%;\n }\n .col-md-offset-8 {\n margin-left: 66.66666667%;\n }\n .col-md-offset-7 {\n margin-left: 58.33333333%;\n }\n .col-md-offset-6 {\n margin-left: 50%;\n }\n .col-md-offset-5 {\n margin-left: 41.66666667%;\n }\n .col-md-offset-4 {\n margin-left: 33.33333333%;\n }\n .col-md-offset-3 {\n margin-left: 25%;\n }\n .col-md-offset-2 {\n margin-left: 16.66666667%;\n }\n .col-md-offset-1 {\n margin-left: 8.33333333%;\n }\n .col-md-offset-0 {\n margin-left: 0%;\n }\n}\n@media (min-width: 1200px) {\n .col-lg-1, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8, .col-lg-9, .col-lg-10, .col-lg-11, .col-lg-12 {\n float: left;\n }\n .col-lg-12 {\n width: 100%;\n }\n .col-lg-11 {\n width: 91.66666667%;\n }\n .col-lg-10 {\n width: 83.33333333%;\n }\n .col-lg-9 {\n width: 75%;\n }\n .col-lg-8 {\n width: 66.66666667%;\n }\n .col-lg-7 {\n width: 58.33333333%;\n }\n .col-lg-6 {\n width: 50%;\n }\n .col-lg-5 {\n width: 41.66666667%;\n }\n .col-lg-4 {\n width: 33.33333333%;\n }\n .col-lg-3 {\n width: 25%;\n }\n .col-lg-2 {\n width: 16.66666667%;\n }\n .col-lg-1 {\n width: 8.33333333%;\n }\n .col-lg-pull-12 {\n right: 100%;\n }\n .col-lg-pull-11 {\n right: 91.66666667%;\n }\n .col-lg-pull-10 {\n right: 83.33333333%;\n }\n .col-lg-pull-9 {\n right: 75%;\n }\n .col-lg-pull-8 {\n right: 66.66666667%;\n }\n .col-lg-pull-7 {\n right: 58.33333333%;\n }\n .col-lg-pull-6 {\n right: 50%;\n }\n .col-lg-pull-5 {\n right: 41.66666667%;\n }\n .col-lg-pull-4 {\n right: 33.33333333%;\n }\n .col-lg-pull-3 {\n right: 25%;\n }\n .col-lg-pull-2 {\n right: 16.66666667%;\n }\n .col-lg-pull-1 {\n right: 8.33333333%;\n }\n .col-lg-pull-0 {\n right: auto;\n }\n .col-lg-push-12 {\n left: 100%;\n }\n .col-lg-push-11 {\n left: 91.66666667%;\n }\n .col-lg-push-10 {\n left: 83.33333333%;\n }\n .col-lg-push-9 {\n left: 75%;\n }\n .col-lg-push-8 {\n left: 66.66666667%;\n }\n .col-lg-push-7 {\n left: 58.33333333%;\n }\n .col-lg-push-6 {\n left: 50%;\n }\n .col-lg-push-5 {\n left: 41.66666667%;\n }\n .col-lg-push-4 {\n left: 33.33333333%;\n }\n .col-lg-push-3 {\n left: 25%;\n }\n .col-lg-push-2 {\n left: 16.66666667%;\n }\n .col-lg-push-1 {\n left: 8.33333333%;\n }\n .col-lg-push-0 {\n left: auto;\n }\n .col-lg-offset-12 {\n margin-left: 100%;\n }\n .col-lg-offset-11 {\n margin-left: 91.66666667%;\n }\n .col-lg-offset-10 {\n margin-left: 83.33333333%;\n }\n .col-lg-offset-9 {\n margin-left: 75%;\n }\n .col-lg-offset-8 {\n margin-left: 66.66666667%;\n }\n .col-lg-offset-7 {\n margin-left: 58.33333333%;\n }\n .col-lg-offset-6 {\n margin-left: 50%;\n }\n .col-lg-offset-5 {\n margin-left: 41.66666667%;\n }\n .col-lg-offset-4 {\n margin-left: 33.33333333%;\n }\n .col-lg-offset-3 {\n margin-left: 25%;\n }\n .col-lg-offset-2 {\n margin-left: 16.66666667%;\n }\n .col-lg-offset-1 {\n margin-left: 8.33333333%;\n }\n .col-lg-offset-0 {\n margin-left: 0%;\n }\n}\ntable {\n background-color: transparent;\n}\ncaption {\n padding-top: 8px;\n padding-bottom: 8px;\n color: #777777;\n text-align: left;\n}\nth {\n text-align: left;\n}\n.table {\n width: 100%;\n max-width: 100%;\n margin-bottom: 20px;\n}\n.table > thead > tr > th,\n.table > tbody > tr > th,\n.table > tfoot > tr > th,\n.table > thead > tr > td,\n.table > tbody > tr > td,\n.table > tfoot > tr > td {\n padding: 8px;\n line-height: 1.42857143;\n vertical-align: top;\n border-top: 1px solid #dddddd;\n}\n.table > thead > tr > th {\n vertical-align: bottom;\n border-bottom: 2px solid #dddddd;\n}\n.table > caption + thead > tr:first-child > th,\n.table > colgroup + thead > tr:first-child > th,\n.table > thead:first-child > tr:first-child > th,\n.table > caption + thead > tr:first-child > td,\n.table > colgroup + thead > tr:first-child > td,\n.table > thead:first-child > tr:first-child > td {\n border-top: 0;\n}\n.table > tbody + tbody {\n border-top: 2px solid #dddddd;\n}\n.table .table {\n background-color: #ffffff;\n}\n.table-condensed > thead > tr > th,\n.table-condensed > tbody > tr > th,\n.table-condensed > tfoot > tr > th,\n.table-condensed > thead > tr > td,\n.table-condensed > tbody > tr > td,\n.table-condensed > tfoot > tr > td {\n padding: 5px;\n}\n.table-bordered {\n border: 1px solid #dddddd;\n}\n.table-bordered > thead > tr > th,\n.table-bordered > tbody > tr > th,\n.table-bordered > tfoot > tr > th,\n.table-bordered > thead > tr > td,\n.table-bordered > tbody > tr > td,\n.table-bordered > tfoot > tr > td {\n border: 1px solid #dddddd;\n}\n.table-bordered > thead > tr > th,\n.table-bordered > thead > tr > td {\n border-bottom-width: 2px;\n}\n.table-striped > tbody > tr:nth-child(odd) {\n background-color: #f9f9f9;\n}\n.table-hover > tbody > tr:hover {\n background-color: #f5f5f5;\n}\ntable col[class*=\"col-\"] {\n position: static;\n float: none;\n display: table-column;\n}\ntable td[class*=\"col-\"],\ntable th[class*=\"col-\"] {\n position: static;\n float: none;\n display: table-cell;\n}\n.table > thead > tr > td.active,\n.table > tbody > tr > td.active,\n.table > tfoot > tr > td.active,\n.table > thead > tr > th.active,\n.table > tbody > tr > th.active,\n.table > tfoot > tr > th.active,\n.table > thead > tr.active > td,\n.table > tbody > tr.active > td,\n.table > tfoot > tr.active > td,\n.table > thead > tr.active > th,\n.table > tbody > tr.active > th,\n.table > tfoot > tr.active > th {\n background-color: #f5f5f5;\n}\n.table-hover > tbody > tr > td.active:hover,\n.table-hover > tbody > tr > th.active:hover,\n.table-hover > tbody > tr.active:hover > td,\n.table-hover > tbody > tr:hover > .active,\n.table-hover > tbody > tr.active:hover > th {\n background-color: #e8e8e8;\n}\n.table > thead > tr > td.success,\n.table > tbody > tr > td.success,\n.table > tfoot > tr > td.success,\n.table > thead > tr > th.success,\n.table > tbody > tr > th.success,\n.table > tfoot > tr > th.success,\n.table > thead > tr.success > td,\n.table > tbody > tr.success > td,\n.table > tfoot > tr.success > td,\n.table > thead > tr.success > th,\n.table > tbody > tr.success > th,\n.table > tfoot > tr.success > th {\n background-color: #dff0d8;\n}\n.table-hover > tbody > tr > td.success:hover,\n.table-hover > tbody > tr > th.success:hover,\n.table-hover > tbody > tr.success:hover > td,\n.table-hover > tbody > tr:hover > .success,\n.table-hover > tbody > tr.success:hover > th {\n background-color: #d0e9c6;\n}\n.table > thead > tr > td.info,\n.table > tbody > tr > td.info,\n.table > tfoot > tr > td.info,\n.table > thead > tr > th.info,\n.table > tbody > tr > th.info,\n.table > tfoot > tr > th.info,\n.table > thead > tr.info > td,\n.table > tbody > tr.info > td,\n.table > tfoot > tr.info > td,\n.table > thead > tr.info > th,\n.table > tbody > tr.info > th,\n.table > tfoot > tr.info > th {\n background-color: #d9edf7;\n}\n.table-hover > tbody > tr > td.info:hover,\n.table-hover > tbody > tr > th.info:hover,\n.table-hover > tbody > tr.info:hover > td,\n.table-hover > tbody > tr:hover > .info,\n.table-hover > tbody > tr.info:hover > th {\n background-color: #c4e3f3;\n}\n.table > thead > tr > td.warning,\n.table > tbody > tr > td.warning,\n.table > tfoot > tr > td.warning,\n.table > thead > tr > th.warning,\n.table > tbody > tr > th.warning,\n.table > tfoot > tr > th.warning,\n.table > thead > tr.warning > td,\n.table > tbody > tr.warning > td,\n.table > tfoot > tr.warning > td,\n.table > thead > tr.warning > th,\n.table > tbody > tr.warning > th,\n.table > tfoot > tr.warning > th {\n background-color: #fcf8e3;\n}\n.table-hover > tbody > tr > td.warning:hover,\n.table-hover > tbody > tr > th.warning:hover,\n.table-hover > tbody > tr.warning:hover > td,\n.table-hover > tbody > tr:hover > .warning,\n.table-hover > tbody > tr.warning:hover > th {\n background-color: #faf2cc;\n}\n.table > thead > tr > td.danger,\n.table > tbody > tr > td.danger,\n.table > tfoot > tr > td.danger,\n.table > thead > tr > th.danger,\n.table > tbody > tr > th.danger,\n.table > tfoot > tr > th.danger,\n.table > thead > tr.danger > td,\n.table > tbody > tr.danger > td,\n.table > tfoot > tr.danger > td,\n.table > thead > tr.danger > th,\n.table > tbody > tr.danger > th,\n.table > tfoot > tr.danger > th {\n background-color: #f2dede;\n}\n.table-hover > tbody > tr > td.danger:hover,\n.table-hover > tbody > tr > th.danger:hover,\n.table-hover > tbody > tr.danger:hover > td,\n.table-hover > tbody > tr:hover > .danger,\n.table-hover > tbody > tr.danger:hover > th {\n background-color: #ebcccc;\n}\n.table-responsive {\n overflow-x: auto;\n min-height: 0.01%;\n}\n@media screen and (max-width: 767px) {\n .table-responsive {\n width: 100%;\n margin-bottom: 15px;\n overflow-y: hidden;\n -ms-overflow-style: -ms-autohiding-scrollbar;\n border: 1px solid #dddddd;\n }\n .table-responsive > .table {\n margin-bottom: 0;\n }\n .table-responsive > .table > thead > tr > th,\n .table-responsive > .table > tbody > tr > th,\n .table-responsive > .table > tfoot > tr > th,\n .table-responsive > .table > thead > tr > td,\n .table-responsive > .table > tbody > tr > td,\n .table-responsive > .table > tfoot > tr > td {\n white-space: nowrap;\n }\n .table-responsive > .table-bordered {\n border: 0;\n }\n .table-responsive > .table-bordered > thead > tr > th:first-child,\n .table-responsive > .table-bordered > tbody > tr > th:first-child,\n .table-responsive > .table-bordered > tfoot > tr > th:first-child,\n .table-responsive > .table-bordered > thead > tr > td:first-child,\n .table-responsive > .table-bordered > tbody > tr > td:first-child,\n .table-responsive > .table-bordered > tfoot > tr > td:first-child {\n border-left: 0;\n }\n .table-responsive > .table-bordered > thead > tr > th:last-child,\n .table-responsive > .table-bordered > tbody > tr > th:last-child,\n .table-responsive > .table-bordered > tfoot > tr > th:last-child,\n .table-responsive > .table-bordered > thead > tr > td:last-child,\n .table-responsive > .table-bordered > tbody > tr > td:last-child,\n .table-responsive > .table-bordered > tfoot > tr > td:last-child {\n border-right: 0;\n }\n .table-responsive > .table-bordered > tbody > tr:last-child > th,\n .table-responsive > .table-bordered > tfoot > tr:last-child > th,\n .table-responsive > .table-bordered > tbody > tr:last-child > td,\n .table-responsive > .table-bordered > tfoot > tr:last-child > td {\n border-bottom: 0;\n }\n}\nfieldset {\n padding: 0;\n margin: 0;\n border: 0;\n min-width: 0;\n}\nlegend {\n display: block;\n width: 100%;\n padding: 0;\n margin-bottom: 20px;\n font-size: 21px;\n line-height: inherit;\n color: #333333;\n border: 0;\n border-bottom: 1px solid #e5e5e5;\n}\nlabel {\n display: inline-block;\n max-width: 100%;\n margin-bottom: 5px;\n font-weight: bold;\n}\ninput[type=\"search\"] {\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n}\ninput[type=\"radio\"],\ninput[type=\"checkbox\"] {\n margin: 4px 0 0;\n margin-top: 1px \\9;\n line-height: normal;\n}\ninput[type=\"file\"] {\n display: block;\n}\ninput[type=\"range\"] {\n display: block;\n width: 100%;\n}\nselect[multiple],\nselect[size] {\n height: auto;\n}\ninput[type=\"file\"]:focus,\ninput[type=\"radio\"]:focus,\ninput[type=\"checkbox\"]:focus {\n outline: thin dotted;\n outline: 5px auto -webkit-focus-ring-color;\n outline-offset: -2px;\n}\noutput {\n display: block;\n padding-top: 7px;\n font-size: 14px;\n line-height: 1.42857143;\n color: #555555;\n}\n.form-control {\n display: block;\n width: 100%;\n height: 34px;\n padding: 6px 12px;\n font-size: 14px;\n line-height: 1.42857143;\n color: #555555;\n background-color: #ffffff;\n background-image: none;\n border: 1px solid #cccccc;\n border-radius: 4px;\n -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n -webkit-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;\n -o-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;\n transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;\n}\n.form-control:focus {\n border-color: #66afe9;\n outline: 0;\n -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6);\n box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6);\n}\n.form-control::-moz-placeholder {\n color: #999999;\n opacity: 1;\n}\n.form-control:-ms-input-placeholder {\n color: #999999;\n}\n.form-control::-webkit-input-placeholder {\n color: #999999;\n}\n.form-control[disabled],\n.form-control[readonly],\nfieldset[disabled] .form-control {\n cursor: not-allowed;\n background-color: #eeeeee;\n opacity: 1;\n}\ntextarea.form-control {\n height: auto;\n}\ninput[type=\"search\"] {\n -webkit-appearance: none;\n}\n@media screen and (-webkit-min-device-pixel-ratio: 0) {\n input[type=\"date\"],\n input[type=\"time\"],\n input[type=\"datetime-local\"],\n input[type=\"month\"] {\n line-height: 34px;\n }\n input[type=\"date\"].input-sm,\n input[type=\"time\"].input-sm,\n input[type=\"datetime-local\"].input-sm,\n input[type=\"month\"].input-sm {\n line-height: 30px;\n }\n input[type=\"date\"].input-lg,\n input[type=\"time\"].input-lg,\n input[type=\"datetime-local\"].input-lg,\n input[type=\"month\"].input-lg {\n line-height: 46px;\n }\n}\n.form-group {\n margin-bottom: 15px;\n}\n.radio,\n.checkbox {\n position: relative;\n display: block;\n margin-top: 10px;\n margin-bottom: 10px;\n}\n.radio label,\n.checkbox label {\n min-height: 20px;\n padding-left: 20px;\n margin-bottom: 0;\n font-weight: normal;\n cursor: pointer;\n}\n.radio input[type=\"radio\"],\n.radio-inline input[type=\"radio\"],\n.checkbox input[type=\"checkbox\"],\n.checkbox-inline input[type=\"checkbox\"] {\n position: absolute;\n margin-left: -20px;\n margin-top: 4px \\9;\n}\n.radio + .radio,\n.checkbox + .checkbox {\n margin-top: -5px;\n}\n.radio-inline,\n.checkbox-inline {\n display: inline-block;\n padding-left: 20px;\n margin-bottom: 0;\n vertical-align: middle;\n font-weight: normal;\n cursor: pointer;\n}\n.radio-inline + .radio-inline,\n.checkbox-inline + .checkbox-inline {\n margin-top: 0;\n margin-left: 10px;\n}\ninput[type=\"radio\"][disabled],\ninput[type=\"checkbox\"][disabled],\ninput[type=\"radio\"].disabled,\ninput[type=\"checkbox\"].disabled,\nfieldset[disabled] input[type=\"radio\"],\nfieldset[disabled] input[type=\"checkbox\"] {\n cursor: not-allowed;\n}\n.radio-inline.disabled,\n.checkbox-inline.disabled,\nfieldset[disabled] .radio-inline,\nfieldset[disabled] .checkbox-inline {\n cursor: not-allowed;\n}\n.radio.disabled label,\n.checkbox.disabled label,\nfieldset[disabled] .radio label,\nfieldset[disabled] .checkbox label {\n cursor: not-allowed;\n}\n.form-control-static {\n padding-top: 7px;\n padding-bottom: 7px;\n margin-bottom: 0;\n}\n.form-control-static.input-lg,\n.form-control-static.input-sm {\n padding-left: 0;\n padding-right: 0;\n}\n.input-sm,\n.form-group-sm .form-control {\n height: 30px;\n padding: 5px 10px;\n font-size: 12px;\n line-height: 1.5;\n border-radius: 3px;\n}\nselect.input-sm,\nselect.form-group-sm .form-control {\n height: 30px;\n line-height: 30px;\n}\ntextarea.input-sm,\ntextarea.form-group-sm .form-control,\nselect[multiple].input-sm,\nselect[multiple].form-group-sm .form-control {\n height: auto;\n}\n.input-lg,\n.form-group-lg .form-control {\n height: 46px;\n padding: 10px 16px;\n font-size: 18px;\n line-height: 1.33;\n border-radius: 6px;\n}\nselect.input-lg,\nselect.form-group-lg .form-control {\n height: 46px;\n line-height: 46px;\n}\ntextarea.input-lg,\ntextarea.form-group-lg .form-control,\nselect[multiple].input-lg,\nselect[multiple].form-group-lg .form-control {\n height: auto;\n}\n.has-feedback {\n position: relative;\n}\n.has-feedback .form-control {\n padding-right: 42.5px;\n}\n.form-control-feedback {\n position: absolute;\n top: 0;\n right: 0;\n z-index: 2;\n display: block;\n width: 34px;\n height: 34px;\n line-height: 34px;\n text-align: center;\n pointer-events: none;\n}\n.input-lg + .form-control-feedback {\n width: 46px;\n height: 46px;\n line-height: 46px;\n}\n.input-sm + .form-control-feedback {\n width: 30px;\n height: 30px;\n line-height: 30px;\n}\n.has-success .help-block,\n.has-success .control-label,\n.has-success .radio,\n.has-success .checkbox,\n.has-success .radio-inline,\n.has-success .checkbox-inline,\n.has-success.radio label,\n.has-success.checkbox label,\n.has-success.radio-inline label,\n.has-success.checkbox-inline label {\n color: #3c763d;\n}\n.has-success .form-control {\n border-color: #3c763d;\n -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n}\n.has-success .form-control:focus {\n border-color: #2b542c;\n -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #67b168;\n box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #67b168;\n}\n.has-success .input-group-addon {\n color: #3c763d;\n border-color: #3c763d;\n background-color: #dff0d8;\n}\n.has-success .form-control-feedback {\n color: #3c763d;\n}\n.has-warning .help-block,\n.has-warning .control-label,\n.has-warning .radio,\n.has-warning .checkbox,\n.has-warning .radio-inline,\n.has-warning .checkbox-inline,\n.has-warning.radio label,\n.has-warning.checkbox label,\n.has-warning.radio-inline label,\n.has-warning.checkbox-inline label {\n color: #8a6d3b;\n}\n.has-warning .form-control {\n border-color: #8a6d3b;\n -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n}\n.has-warning .form-control:focus {\n border-color: #66512c;\n -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #c0a16b;\n box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #c0a16b;\n}\n.has-warning .input-group-addon {\n color: #8a6d3b;\n border-color: #8a6d3b;\n background-color: #fcf8e3;\n}\n.has-warning .form-control-feedback {\n color: #8a6d3b;\n}\n.has-error .help-block,\n.has-error .control-label,\n.has-error .radio,\n.has-error .checkbox,\n.has-error .radio-inline,\n.has-error .checkbox-inline,\n.has-error.radio label,\n.has-error.checkbox label,\n.has-error.radio-inline label,\n.has-error.checkbox-inline label {\n color: #a94442;\n}\n.has-error .form-control {\n border-color: #a94442;\n -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n}\n.has-error .form-control:focus {\n border-color: #843534;\n -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #ce8483;\n box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #ce8483;\n}\n.has-error .input-group-addon {\n color: #a94442;\n border-color: #a94442;\n background-color: #f2dede;\n}\n.has-error .form-control-feedback {\n color: #a94442;\n}\n.has-feedback label ~ .form-control-feedback {\n top: 25px;\n}\n.has-feedback label.sr-only ~ .form-control-feedback {\n top: 0;\n}\n.help-block {\n display: block;\n margin-top: 5px;\n margin-bottom: 10px;\n color: #737373;\n}\n@media (min-width: 768px) {\n .form-inline .form-group {\n display: inline-block;\n margin-bottom: 0;\n vertical-align: middle;\n }\n .form-inline .form-control {\n display: inline-block;\n width: auto;\n vertical-align: middle;\n }\n .form-inline .form-control-static {\n display: inline-block;\n }\n .form-inline .input-group {\n display: inline-table;\n vertical-align: middle;\n }\n .form-inline .input-group .input-group-addon,\n .form-inline .input-group .input-group-btn,\n .form-inline .input-group .form-control {\n width: auto;\n }\n .form-inline .input-group > .form-control {\n width: 100%;\n }\n .form-inline .control-label {\n margin-bottom: 0;\n vertical-align: middle;\n }\n .form-inline .radio,\n .form-inline .checkbox {\n display: inline-block;\n margin-top: 0;\n margin-bottom: 0;\n vertical-align: middle;\n }\n .form-inline .radio label,\n .form-inline .checkbox label {\n padding-left: 0;\n }\n .form-inline .radio input[type=\"radio\"],\n .form-inline .checkbox input[type=\"checkbox\"] {\n position: relative;\n margin-left: 0;\n }\n .form-inline .has-feedback .form-control-feedback {\n top: 0;\n }\n}\n.form-horizontal .radio,\n.form-horizontal .checkbox,\n.form-horizontal .radio-inline,\n.form-horizontal .checkbox-inline {\n margin-top: 0;\n margin-bottom: 0;\n padding-top: 7px;\n}\n.form-horizontal .radio,\n.form-horizontal .checkbox {\n min-height: 27px;\n}\n.form-horizontal .form-group {\n margin-left: -15px;\n margin-right: -15px;\n}\n@media (min-width: 768px) {\n .form-horizontal .control-label {\n text-align: right;\n margin-bottom: 0;\n padding-top: 7px;\n }\n}\n.form-horizontal .has-feedback .form-control-feedback {\n right: 15px;\n}\n@media (min-width: 768px) {\n .form-horizontal .form-group-lg .control-label {\n padding-top: 14.3px;\n }\n}\n@media (min-width: 768px) {\n .form-horizontal .form-group-sm .control-label {\n padding-top: 6px;\n }\n}\n.btn {\n display: inline-block;\n margin-bottom: 0;\n font-weight: normal;\n text-align: center;\n vertical-align: middle;\n touch-action: manipulation;\n cursor: pointer;\n background-image: none;\n border: 1px solid transparent;\n white-space: nowrap;\n padding: 6px 12px;\n font-size: 14px;\n line-height: 1.42857143;\n border-radius: 4px;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n.btn:focus,\n.btn:active:focus,\n.btn.active:focus,\n.btn.focus,\n.btn:active.focus,\n.btn.active.focus {\n outline: thin dotted;\n outline: 5px auto -webkit-focus-ring-color;\n outline-offset: -2px;\n}\n.btn:hover,\n.btn:focus,\n.btn.focus {\n color: #333333;\n text-decoration: none;\n}\n.btn:active,\n.btn.active {\n outline: 0;\n background-image: none;\n -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);\n box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);\n}\n.btn.disabled,\n.btn[disabled],\nfieldset[disabled] .btn {\n cursor: not-allowed;\n pointer-events: none;\n opacity: 0.65;\n filter: alpha(opacity=65);\n -webkit-box-shadow: none;\n box-shadow: none;\n}\n.btn-default {\n color: #333333;\n background-color: #ffffff;\n border-color: #cccccc;\n}\n.btn-default:hover,\n.btn-default:focus,\n.btn-default.focus,\n.btn-default:active,\n.btn-default.active,\n.open > .dropdown-toggle.btn-default {\n color: #333333;\n background-color: #e6e6e6;\n border-color: #adadad;\n}\n.btn-default:active,\n.btn-default.active,\n.open > .dropdown-toggle.btn-default {\n background-image: none;\n}\n.btn-default.disabled,\n.btn-default[disabled],\nfieldset[disabled] .btn-default,\n.btn-default.disabled:hover,\n.btn-default[disabled]:hover,\nfieldset[disabled] .btn-default:hover,\n.btn-default.disabled:focus,\n.btn-default[disabled]:focus,\nfieldset[disabled] .btn-default:focus,\n.btn-default.disabled.focus,\n.btn-default[disabled].focus,\nfieldset[disabled] .btn-default.focus,\n.btn-default.disabled:active,\n.btn-default[disabled]:active,\nfieldset[disabled] .btn-default:active,\n.btn-default.disabled.active,\n.btn-default[disabled].active,\nfieldset[disabled] .btn-default.active {\n background-color: #ffffff;\n border-color: #cccccc;\n}\n.btn-default .badge {\n color: #ffffff;\n background-color: #333333;\n}\n.btn-primary {\n color: #ffffff;\n background-color: #337ab7;\n border-color: #2e6da4;\n}\n.btn-primary:hover,\n.btn-primary:focus,\n.btn-primary.focus,\n.btn-primary:active,\n.btn-primary.active,\n.open > .dropdown-toggle.btn-primary {\n color: #ffffff;\n background-color: #286090;\n border-color: #204d74;\n}\n.btn-primary:active,\n.btn-primary.active,\n.open > .dropdown-toggle.btn-primary {\n background-image: none;\n}\n.btn-primary.disabled,\n.btn-primary[disabled],\nfieldset[disabled] .btn-primary,\n.btn-primary.disabled:hover,\n.btn-primary[disabled]:hover,\nfieldset[disabled] .btn-primary:hover,\n.btn-primary.disabled:focus,\n.btn-primary[disabled]:focus,\nfieldset[disabled] .btn-primary:focus,\n.btn-primary.disabled.focus,\n.btn-primary[disabled].focus,\nfieldset[disabled] .btn-primary.focus,\n.btn-primary.disabled:active,\n.btn-primary[disabled]:active,\nfieldset[disabled] .btn-primary:active,\n.btn-primary.disabled.active,\n.btn-primary[disabled].active,\nfieldset[disabled] .btn-primary.active {\n background-color: #337ab7;\n border-color: #2e6da4;\n}\n.btn-primary .badge {\n color: #337ab7;\n background-color: #ffffff;\n}\n.btn-success {\n color: #ffffff;\n background-color: #5cb85c;\n border-color: #4cae4c;\n}\n.btn-success:hover,\n.btn-success:focus,\n.btn-success.focus,\n.btn-success:active,\n.btn-success.active,\n.open > .dropdown-toggle.btn-success {\n color: #ffffff;\n background-color: #449d44;\n border-color: #398439;\n}\n.btn-success:active,\n.btn-success.active,\n.open > .dropdown-toggle.btn-success {\n background-image: none;\n}\n.btn-success.disabled,\n.btn-success[disabled],\nfieldset[disabled] .btn-success,\n.btn-success.disabled:hover,\n.btn-success[disabled]:hover,\nfieldset[disabled] .btn-success:hover,\n.btn-success.disabled:focus,\n.btn-success[disabled]:focus,\nfieldset[disabled] .btn-success:focus,\n.btn-success.disabled.focus,\n.btn-success[disabled].focus,\nfieldset[disabled] .btn-success.focus,\n.btn-success.disabled:active,\n.btn-success[disabled]:active,\nfieldset[disabled] .btn-success:active,\n.btn-success.disabled.active,\n.btn-success[disabled].active,\nfieldset[disabled] .btn-success.active {\n background-color: #5cb85c;\n border-color: #4cae4c;\n}\n.btn-success .badge {\n color: #5cb85c;\n background-color: #ffffff;\n}\n.btn-info {\n color: #ffffff;\n background-color: #5bc0de;\n border-color: #46b8da;\n}\n.btn-info:hover,\n.btn-info:focus,\n.btn-info.focus,\n.btn-info:active,\n.btn-info.active,\n.open > .dropdown-toggle.btn-info {\n color: #ffffff;\n background-color: #31b0d5;\n border-color: #269abc;\n}\n.btn-info:active,\n.btn-info.active,\n.open > .dropdown-toggle.btn-info {\n background-image: none;\n}\n.btn-info.disabled,\n.btn-info[disabled],\nfieldset[disabled] .btn-info,\n.btn-info.disabled:hover,\n.btn-info[disabled]:hover,\nfieldset[disabled] .btn-info:hover,\n.btn-info.disabled:focus,\n.btn-info[disabled]:focus,\nfieldset[disabled] .btn-info:focus,\n.btn-info.disabled.focus,\n.btn-info[disabled].focus,\nfieldset[disabled] .btn-info.focus,\n.btn-info.disabled:active,\n.btn-info[disabled]:active,\nfieldset[disabled] .btn-info:active,\n.btn-info.disabled.active,\n.btn-info[disabled].active,\nfieldset[disabled] .btn-info.active {\n background-color: #5bc0de;\n border-color: #46b8da;\n}\n.btn-info .badge {\n color: #5bc0de;\n background-color: #ffffff;\n}\n.btn-warning {\n color: #ffffff;\n background-color: #f0ad4e;\n border-color: #eea236;\n}\n.btn-warning:hover,\n.btn-warning:focus,\n.btn-warning.focus,\n.btn-warning:active,\n.btn-warning.active,\n.open > .dropdown-toggle.btn-warning {\n color: #ffffff;\n background-color: #ec971f;\n border-color: #d58512;\n}\n.btn-warning:active,\n.btn-warning.active,\n.open > .dropdown-toggle.btn-warning {\n background-image: none;\n}\n.btn-warning.disabled,\n.btn-warning[disabled],\nfieldset[disabled] .btn-warning,\n.btn-warning.disabled:hover,\n.btn-warning[disabled]:hover,\nfieldset[disabled] .btn-warning:hover,\n.btn-warning.disabled:focus,\n.btn-warning[disabled]:focus,\nfieldset[disabled] .btn-warning:focus,\n.btn-warning.disabled.focus,\n.btn-warning[disabled].focus,\nfieldset[disabled] .btn-warning.focus,\n.btn-warning.disabled:active,\n.btn-warning[disabled]:active,\nfieldset[disabled] .btn-warning:active,\n.btn-warning.disabled.active,\n.btn-warning[disabled].active,\nfieldset[disabled] .btn-warning.active {\n background-color: #f0ad4e;\n border-color: #eea236;\n}\n.btn-warning .badge {\n color: #f0ad4e;\n background-color: #ffffff;\n}\n.btn-danger {\n color: #ffffff;\n background-color: #d9534f;\n border-color: #d43f3a;\n}\n.btn-danger:hover,\n.btn-danger:focus,\n.btn-danger.focus,\n.btn-danger:active,\n.btn-danger.active,\n.open > .dropdown-toggle.btn-danger {\n color: #ffffff;\n background-color: #c9302c;\n border-color: #ac2925;\n}\n.btn-danger:active,\n.btn-danger.active,\n.open > .dropdown-toggle.btn-danger {\n background-image: none;\n}\n.btn-danger.disabled,\n.btn-danger[disabled],\nfieldset[disabled] .btn-danger,\n.btn-danger.disabled:hover,\n.btn-danger[disabled]:hover,\nfieldset[disabled] .btn-danger:hover,\n.btn-danger.disabled:focus,\n.btn-danger[disabled]:focus,\nfieldset[disabled] .btn-danger:focus,\n.btn-danger.disabled.focus,\n.btn-danger[disabled].focus,\nfieldset[disabled] .btn-danger.focus,\n.btn-danger.disabled:active,\n.btn-danger[disabled]:active,\nfieldset[disabled] .btn-danger:active,\n.btn-danger.disabled.active,\n.btn-danger[disabled].active,\nfieldset[disabled] .btn-danger.active {\n background-color: #d9534f;\n border-color: #d43f3a;\n}\n.btn-danger .badge {\n color: #d9534f;\n background-color: #ffffff;\n}\n.btn-link {\n color: #337ab7;\n font-weight: normal;\n border-radius: 0;\n}\n.btn-link,\n.btn-link:active,\n.btn-link.active,\n.btn-link[disabled],\nfieldset[disabled] .btn-link {\n background-color: transparent;\n -webkit-box-shadow: none;\n box-shadow: none;\n}\n.btn-link,\n.btn-link:hover,\n.btn-link:focus,\n.btn-link:active {\n border-color: transparent;\n}\n.btn-link:hover,\n.btn-link:focus {\n color: #23527c;\n text-decoration: underline;\n background-color: transparent;\n}\n.btn-link[disabled]:hover,\nfieldset[disabled] .btn-link:hover,\n.btn-link[disabled]:focus,\nfieldset[disabled] .btn-link:focus {\n color: #777777;\n text-decoration: none;\n}\n.btn-lg,\n.btn-group-lg > .btn {\n padding: 10px 16px;\n font-size: 18px;\n line-height: 1.33;\n border-radius: 6px;\n}\n.btn-sm,\n.btn-group-sm > .btn {\n padding: 5px 10px;\n font-size: 12px;\n line-height: 1.5;\n border-radius: 3px;\n}\n.btn-xs,\n.btn-group-xs > .btn {\n padding: 1px 5px;\n font-size: 12px;\n line-height: 1.5;\n border-radius: 3px;\n}\n.btn-block {\n display: block;\n width: 100%;\n}\n.btn-block + .btn-block {\n margin-top: 5px;\n}\ninput[type=\"submit\"].btn-block,\ninput[type=\"reset\"].btn-block,\ninput[type=\"button\"].btn-block {\n width: 100%;\n}\n.fade {\n opacity: 0;\n -webkit-transition: opacity 0.15s linear;\n -o-transition: opacity 0.15s linear;\n transition: opacity 0.15s linear;\n}\n.fade.in {\n opacity: 1;\n}\n.collapse {\n display: none;\n visibility: hidden;\n}\n.collapse.in {\n display: block;\n visibility: visible;\n}\ntr.collapse.in {\n display: table-row;\n}\ntbody.collapse.in {\n display: table-row-group;\n}\n.collapsing {\n position: relative;\n height: 0;\n overflow: hidden;\n -webkit-transition-property: height, visibility;\n transition-property: height, visibility;\n -webkit-transition-duration: 0.35s;\n transition-duration: 0.35s;\n -webkit-transition-timing-function: ease;\n transition-timing-function: ease;\n}\n.caret {\n display: inline-block;\n width: 0;\n height: 0;\n margin-left: 2px;\n vertical-align: middle;\n border-top: 4px solid;\n border-right: 4px solid transparent;\n border-left: 4px solid transparent;\n}\n.dropdown {\n position: relative;\n}\n.dropdown-toggle:focus {\n outline: 0;\n}\n.dropdown-menu {\n position: absolute;\n top: 100%;\n left: 0;\n z-index: 1000;\n display: none;\n float: left;\n min-width: 160px;\n padding: 5px 0;\n margin: 2px 0 0;\n list-style: none;\n font-size: 14px;\n text-align: left;\n background-color: #ffffff;\n border: 1px solid #cccccc;\n border: 1px solid rgba(0, 0, 0, 0.15);\n border-radius: 4px;\n -webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);\n box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);\n background-clip: padding-box;\n}\n.dropdown-menu.pull-right {\n right: 0;\n left: auto;\n}\n.dropdown-menu .divider {\n height: 1px;\n margin: 9px 0;\n overflow: hidden;\n background-color: #e5e5e5;\n}\n.dropdown-menu > li > a {\n display: block;\n padding: 3px 20px;\n clear: both;\n font-weight: normal;\n line-height: 1.42857143;\n color: #333333;\n white-space: nowrap;\n}\n.dropdown-menu > li > a:hover,\n.dropdown-menu > li > a:focus {\n text-decoration: none;\n color: #262626;\n background-color: #f5f5f5;\n}\n.dropdown-menu > .active > a,\n.dropdown-menu > .active > a:hover,\n.dropdown-menu > .active > a:focus {\n color: #ffffff;\n text-decoration: none;\n outline: 0;\n background-color: #337ab7;\n}\n.dropdown-menu > .disabled > a,\n.dropdown-menu > .disabled > a:hover,\n.dropdown-menu > .disabled > a:focus {\n color: #777777;\n}\n.dropdown-menu > .disabled > a:hover,\n.dropdown-menu > .disabled > a:focus {\n text-decoration: none;\n background-color: transparent;\n background-image: none;\n filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n cursor: not-allowed;\n}\n.open > .dropdown-menu {\n display: block;\n}\n.open > a {\n outline: 0;\n}\n.dropdown-menu-right {\n left: auto;\n right: 0;\n}\n.dropdown-menu-left {\n left: 0;\n right: auto;\n}\n.dropdown-header {\n display: block;\n padding: 3px 20px;\n font-size: 12px;\n line-height: 1.42857143;\n color: #777777;\n white-space: nowrap;\n}\n.dropdown-backdrop {\n position: fixed;\n left: 0;\n right: 0;\n bottom: 0;\n top: 0;\n z-index: 990;\n}\n.pull-right > .dropdown-menu {\n right: 0;\n left: auto;\n}\n.dropup .caret,\n.navbar-fixed-bottom .dropdown .caret {\n border-top: 0;\n border-bottom: 4px solid;\n content: \"\";\n}\n.dropup .dropdown-menu,\n.navbar-fixed-bottom .dropdown .dropdown-menu {\n top: auto;\n bottom: 100%;\n margin-bottom: 1px;\n}\n@media (min-width: 768px) {\n .navbar-right .dropdown-menu {\n left: auto;\n right: 0;\n }\n .navbar-right .dropdown-menu-left {\n left: 0;\n right: auto;\n }\n}\n.btn-group,\n.btn-group-vertical {\n position: relative;\n display: inline-block;\n vertical-align: middle;\n}\n.btn-group > .btn,\n.btn-group-vertical > .btn {\n position: relative;\n float: left;\n}\n.btn-group > .btn:hover,\n.btn-group-vertical > .btn:hover,\n.btn-group > .btn:focus,\n.btn-group-vertical > .btn:focus,\n.btn-group > .btn:active,\n.btn-group-vertical > .btn:active,\n.btn-group > .btn.active,\n.btn-group-vertical > .btn.active {\n z-index: 2;\n}\n.btn-group .btn + .btn,\n.btn-group .btn + .btn-group,\n.btn-group .btn-group + .btn,\n.btn-group .btn-group + .btn-group {\n margin-left: -1px;\n}\n.btn-toolbar {\n margin-left: -5px;\n}\n.btn-toolbar .btn-group,\n.btn-toolbar .input-group {\n float: left;\n}\n.btn-toolbar > .btn,\n.btn-toolbar > .btn-group,\n.btn-toolbar > .input-group {\n margin-left: 5px;\n}\n.btn-group > .btn:not(:first-child):not(:last-child):not(.dropdown-toggle) {\n border-radius: 0;\n}\n.btn-group > .btn:first-child {\n margin-left: 0;\n}\n.btn-group > .btn:first-child:not(:last-child):not(.dropdown-toggle) {\n border-bottom-right-radius: 0;\n border-top-right-radius: 0;\n}\n.btn-group > .btn:last-child:not(:first-child),\n.btn-group > .dropdown-toggle:not(:first-child) {\n border-bottom-left-radius: 0;\n border-top-left-radius: 0;\n}\n.btn-group > .btn-group {\n float: left;\n}\n.btn-group > .btn-group:not(:first-child):not(:last-child) > .btn {\n border-radius: 0;\n}\n.btn-group > .btn-group:first-child > .btn:last-child,\n.btn-group > .btn-group:first-child > .dropdown-toggle {\n border-bottom-right-radius: 0;\n border-top-right-radius: 0;\n}\n.btn-group > .btn-group:last-child > .btn:first-child {\n border-bottom-left-radius: 0;\n border-top-left-radius: 0;\n}\n.btn-group .dropdown-toggle:active,\n.btn-group.open .dropdown-toggle {\n outline: 0;\n}\n.btn-group > .btn + .dropdown-toggle {\n padding-left: 8px;\n padding-right: 8px;\n}\n.btn-group > .btn-lg + .dropdown-toggle {\n padding-left: 12px;\n padding-right: 12px;\n}\n.btn-group.open .dropdown-toggle {\n -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);\n box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);\n}\n.btn-group.open .dropdown-toggle.btn-link {\n -webkit-box-shadow: none;\n box-shadow: none;\n}\n.btn .caret {\n margin-left: 0;\n}\n.btn-lg .caret {\n border-width: 5px 5px 0;\n border-bottom-width: 0;\n}\n.dropup .btn-lg .caret {\n border-width: 0 5px 5px;\n}\n.btn-group-vertical > .btn,\n.btn-group-vertical > .btn-group,\n.btn-group-vertical > .btn-group > .btn {\n display: block;\n float: none;\n width: 100%;\n max-width: 100%;\n}\n.btn-group-vertical > .btn-group > .btn {\n float: none;\n}\n.btn-group-vertical > .btn + .btn,\n.btn-group-vertical > .btn + .btn-group,\n.btn-group-vertical > .btn-group + .btn,\n.btn-group-vertical > .btn-group + .btn-group {\n margin-top: -1px;\n margin-left: 0;\n}\n.btn-group-vertical > .btn:not(:first-child):not(:last-child) {\n border-radius: 0;\n}\n.btn-group-vertical > .btn:first-child:not(:last-child) {\n border-top-right-radius: 4px;\n border-bottom-right-radius: 0;\n border-bottom-left-radius: 0;\n}\n.btn-group-vertical > .btn:last-child:not(:first-child) {\n border-bottom-left-radius: 4px;\n border-top-right-radius: 0;\n border-top-left-radius: 0;\n}\n.btn-group-vertical > .btn-group:not(:first-child):not(:last-child) > .btn {\n border-radius: 0;\n}\n.btn-group-vertical > .btn-group:first-child:not(:last-child) > .btn:last-child,\n.btn-group-vertical > .btn-group:first-child:not(:last-child) > .dropdown-toggle {\n border-bottom-right-radius: 0;\n border-bottom-left-radius: 0;\n}\n.btn-group-vertical > .btn-group:last-child:not(:first-child) > .btn:first-child {\n border-top-right-radius: 0;\n border-top-left-radius: 0;\n}\n.btn-group-justified {\n display: table;\n width: 100%;\n table-layout: fixed;\n border-collapse: separate;\n}\n.btn-group-justified > .btn,\n.btn-group-justified > .btn-group {\n float: none;\n display: table-cell;\n width: 1%;\n}\n.btn-group-justified > .btn-group .btn {\n width: 100%;\n}\n.btn-group-justified > .btn-group .dropdown-menu {\n left: auto;\n}\n[data-toggle=\"buttons\"] > .btn input[type=\"radio\"],\n[data-toggle=\"buttons\"] > .btn-group > .btn input[type=\"radio\"],\n[data-toggle=\"buttons\"] > .btn input[type=\"checkbox\"],\n[data-toggle=\"buttons\"] > .btn-group > .btn input[type=\"checkbox\"] {\n position: absolute;\n clip: rect(0, 0, 0, 0);\n pointer-events: none;\n}\n.input-group {\n position: relative;\n display: table;\n border-collapse: separate;\n}\n.input-group[class*=\"col-\"] {\n float: none;\n padding-left: 0;\n padding-right: 0;\n}\n.input-group .form-control {\n position: relative;\n z-index: 2;\n float: left;\n width: 100%;\n margin-bottom: 0;\n}\n.input-group-lg > .form-control,\n.input-group-lg > .input-group-addon,\n.input-group-lg > .input-group-btn > .btn {\n height: 46px;\n padding: 10px 16px;\n font-size: 18px;\n line-height: 1.33;\n border-radius: 6px;\n}\nselect.input-group-lg > .form-control,\nselect.input-group-lg > .input-group-addon,\nselect.input-group-lg > .input-group-btn > .btn {\n height: 46px;\n line-height: 46px;\n}\ntextarea.input-group-lg > .form-control,\ntextarea.input-group-lg > .input-group-addon,\ntextarea.input-group-lg > .input-group-btn > .btn,\nselect[multiple].input-group-lg > .form-control,\nselect[multiple].input-group-lg > .input-group-addon,\nselect[multiple].input-group-lg > .input-group-btn > .btn {\n height: auto;\n}\n.input-group-sm > .form-control,\n.input-group-sm > .input-group-addon,\n.input-group-sm > .input-group-btn > .btn {\n height: 30px;\n padding: 5px 10px;\n font-size: 12px;\n line-height: 1.5;\n border-radius: 3px;\n}\nselect.input-group-sm > .form-control,\nselect.input-group-sm > .input-group-addon,\nselect.input-group-sm > .input-group-btn > .btn {\n height: 30px;\n line-height: 30px;\n}\ntextarea.input-group-sm > .form-control,\ntextarea.input-group-sm > .input-group-addon,\ntextarea.input-group-sm > .input-group-btn > .btn,\nselect[multiple].input-group-sm > .form-control,\nselect[multiple].input-group-sm > .input-group-addon,\nselect[multiple].input-group-sm > .input-group-btn > .btn {\n height: auto;\n}\n.input-group-addon,\n.input-group-btn,\n.input-group .form-control {\n display: table-cell;\n}\n.input-group-addon:not(:first-child):not(:last-child),\n.input-group-btn:not(:first-child):not(:last-child),\n.input-group .form-control:not(:first-child):not(:last-child) {\n border-radius: 0;\n}\n.input-group-addon,\n.input-group-btn {\n width: 1%;\n white-space: nowrap;\n vertical-align: middle;\n}\n.input-group-addon {\n padding: 6px 12px;\n font-size: 14px;\n font-weight: normal;\n line-height: 1;\n color: #555555;\n text-align: center;\n background-color: #eeeeee;\n border: 1px solid #cccccc;\n border-radius: 4px;\n}\n.input-group-addon.input-sm {\n padding: 5px 10px;\n font-size: 12px;\n border-radius: 3px;\n}\n.input-group-addon.input-lg {\n padding: 10px 16px;\n font-size: 18px;\n border-radius: 6px;\n}\n.input-group-addon input[type=\"radio\"],\n.input-group-addon input[type=\"checkbox\"] {\n margin-top: 0;\n}\n.input-group .form-control:first-child,\n.input-group-addon:first-child,\n.input-group-btn:first-child > .btn,\n.input-group-btn:first-child > .btn-group > .btn,\n.input-group-btn:first-child > .dropdown-toggle,\n.input-group-btn:last-child > .btn:not(:last-child):not(.dropdown-toggle),\n.input-group-btn:last-child > .btn-group:not(:last-child) > .btn {\n border-bottom-right-radius: 0;\n border-top-right-radius: 0;\n}\n.input-group-addon:first-child {\n border-right: 0;\n}\n.input-group .form-control:last-child,\n.input-group-addon:last-child,\n.input-group-btn:last-child > .btn,\n.input-group-btn:last-child > .btn-group > .btn,\n.input-group-btn:last-child > .dropdown-toggle,\n.input-group-btn:first-child > .btn:not(:first-child),\n.input-group-btn:first-child > .btn-group:not(:first-child) > .btn {\n border-bottom-left-radius: 0;\n border-top-left-radius: 0;\n}\n.input-group-addon:last-child {\n border-left: 0;\n}\n.input-group-btn {\n position: relative;\n font-size: 0;\n white-space: nowrap;\n}\n.input-group-btn > .btn {\n position: relative;\n}\n.input-group-btn > .btn + .btn {\n margin-left: -1px;\n}\n.input-group-btn > .btn:hover,\n.input-group-btn > .btn:focus,\n.input-group-btn > .btn:active {\n z-index: 2;\n}\n.input-group-btn:first-child > .btn,\n.input-group-btn:first-child > .btn-group {\n margin-right: -1px;\n}\n.input-group-btn:last-child > .btn,\n.input-group-btn:last-child > .btn-group {\n margin-left: -1px;\n}\n.nav {\n margin-bottom: 0;\n padding-left: 0;\n list-style: none;\n}\n.nav > li {\n position: relative;\n display: block;\n}\n.nav > li > a {\n position: relative;\n display: block;\n padding: 10px 15px;\n}\n.nav > li > a:hover,\n.nav > li > a:focus {\n text-decoration: none;\n background-color: #eeeeee;\n}\n.nav > li.disabled > a {\n color: #777777;\n}\n.nav > li.disabled > a:hover,\n.nav > li.disabled > a:focus {\n color: #777777;\n text-decoration: none;\n background-color: transparent;\n cursor: not-allowed;\n}\n.nav .open > a,\n.nav .open > a:hover,\n.nav .open > a:focus {\n background-color: #eeeeee;\n border-color: #337ab7;\n}\n.nav .nav-divider {\n height: 1px;\n margin: 9px 0;\n overflow: hidden;\n background-color: #e5e5e5;\n}\n.nav > li > a > img {\n max-width: none;\n}\n.nav-tabs {\n border-bottom: 1px solid #dddddd;\n}\n.nav-tabs > li {\n float: left;\n margin-bottom: -1px;\n}\n.nav-tabs > li > a {\n margin-right: 2px;\n line-height: 1.42857143;\n border: 1px solid transparent;\n border-radius: 4px 4px 0 0;\n}\n.nav-tabs > li > a:hover {\n border-color: #eeeeee #eeeeee #dddddd;\n}\n.nav-tabs > li.active > a,\n.nav-tabs > li.active > a:hover,\n.nav-tabs > li.active > a:focus {\n color: #555555;\n background-color: #ffffff;\n border: 1px solid #dddddd;\n border-bottom-color: transparent;\n cursor: default;\n}\n.nav-tabs.nav-justified {\n width: 100%;\n border-bottom: 0;\n}\n.nav-tabs.nav-justified > li {\n float: none;\n}\n.nav-tabs.nav-justified > li > a {\n text-align: center;\n margin-bottom: 5px;\n}\n.nav-tabs.nav-justified > .dropdown .dropdown-menu {\n top: auto;\n left: auto;\n}\n@media (min-width: 768px) {\n .nav-tabs.nav-justified > li {\n display: table-cell;\n width: 1%;\n }\n .nav-tabs.nav-justified > li > a {\n margin-bottom: 0;\n }\n}\n.nav-tabs.nav-justified > li > a {\n margin-right: 0;\n border-radius: 4px;\n}\n.nav-tabs.nav-justified > .active > a,\n.nav-tabs.nav-justified > .active > a:hover,\n.nav-tabs.nav-justified > .active > a:focus {\n border: 1px solid #dddddd;\n}\n@media (min-width: 768px) {\n .nav-tabs.nav-justified > li > a {\n border-bottom: 1px solid #dddddd;\n border-radius: 4px 4px 0 0;\n }\n .nav-tabs.nav-justified > .active > a,\n .nav-tabs.nav-justified > .active > a:hover,\n .nav-tabs.nav-justified > .active > a:focus {\n border-bottom-color: #ffffff;\n }\n}\n.nav-pills > li {\n float: left;\n}\n.nav-pills > li > a {\n border-radius: 4px;\n}\n.nav-pills > li + li {\n margin-left: 2px;\n}\n.nav-pills > li.active > a,\n.nav-pills > li.active > a:hover,\n.nav-pills > li.active > a:focus {\n color: #ffffff;\n background-color: #337ab7;\n}\n.nav-stacked > li {\n float: none;\n}\n.nav-stacked > li + li {\n margin-top: 2px;\n margin-left: 0;\n}\n.nav-justified {\n width: 100%;\n}\n.nav-justified > li {\n float: none;\n}\n.nav-justified > li > a {\n text-align: center;\n margin-bottom: 5px;\n}\n.nav-justified > .dropdown .dropdown-menu {\n top: auto;\n left: auto;\n}\n@media (min-width: 768px) {\n .nav-justified > li {\n display: table-cell;\n width: 1%;\n }\n .nav-justified > li > a {\n margin-bottom: 0;\n }\n}\n.nav-tabs-justified {\n border-bottom: 0;\n}\n.nav-tabs-justified > li > a {\n margin-right: 0;\n border-radius: 4px;\n}\n.nav-tabs-justified > .active > a,\n.nav-tabs-justified > .active > a:hover,\n.nav-tabs-justified > .active > a:focus {\n border: 1px solid #dddddd;\n}\n@media (min-width: 768px) {\n .nav-tabs-justified > li > a {\n border-bottom: 1px solid #dddddd;\n border-radius: 4px 4px 0 0;\n }\n .nav-tabs-justified > .active > a,\n .nav-tabs-justified > .active > a:hover,\n .nav-tabs-justified > .active > a:focus {\n border-bottom-color: #ffffff;\n }\n}\n.tab-content > .tab-pane {\n display: none;\n visibility: hidden;\n}\n.tab-content > .active {\n display: block;\n visibility: visible;\n}\n.nav-tabs .dropdown-menu {\n margin-top: -1px;\n border-top-right-radius: 0;\n border-top-left-radius: 0;\n}\n.navbar {\n position: relative;\n min-height: 50px;\n margin-bottom: 20px;\n border: 1px solid transparent;\n}\n@media (min-width: 768px) {\n .navbar {\n border-radius: 4px;\n }\n}\n@media (min-width: 768px) {\n .navbar-header {\n float: left;\n }\n}\n.navbar-collapse {\n overflow-x: visible;\n padding-right: 15px;\n padding-left: 15px;\n border-top: 1px solid transparent;\n box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);\n -webkit-overflow-scrolling: touch;\n}\n.navbar-collapse.in {\n overflow-y: auto;\n}\n@media (min-width: 768px) {\n .navbar-collapse {\n width: auto;\n border-top: 0;\n box-shadow: none;\n }\n .navbar-collapse.collapse {\n display: block !important;\n visibility: visible !important;\n height: auto !important;\n padding-bottom: 0;\n overflow: visible !important;\n }\n .navbar-collapse.in {\n overflow-y: visible;\n }\n .navbar-fixed-top .navbar-collapse,\n .navbar-static-top .navbar-collapse,\n .navbar-fixed-bottom .navbar-collapse {\n padding-left: 0;\n padding-right: 0;\n }\n}\n.navbar-fixed-top .navbar-collapse,\n.navbar-fixed-bottom .navbar-collapse {\n max-height: 340px;\n}\n@media (max-device-width: 480px) and (orientation: landscape) {\n .navbar-fixed-top .navbar-collapse,\n .navbar-fixed-bottom .navbar-collapse {\n max-height: 200px;\n }\n}\n.container > .navbar-header,\n.container-fluid > .navbar-header,\n.container > .navbar-collapse,\n.container-fluid > .navbar-collapse {\n margin-right: -15px;\n margin-left: -15px;\n}\n@media (min-width: 768px) {\n .container > .navbar-header,\n .container-fluid > .navbar-header,\n .container > .navbar-collapse,\n .container-fluid > .navbar-collapse {\n margin-right: 0;\n margin-left: 0;\n }\n}\n.navbar-static-top {\n z-index: 1000;\n border-width: 0 0 1px;\n}\n@media (min-width: 768px) {\n .navbar-static-top {\n border-radius: 0;\n }\n}\n.navbar-fixed-top,\n.navbar-fixed-bottom {\n position: fixed;\n right: 0;\n left: 0;\n z-index: 1030;\n}\n@media (min-width: 768px) {\n .navbar-fixed-top,\n .navbar-fixed-bottom {\n border-radius: 0;\n }\n}\n.navbar-fixed-top {\n top: 0;\n border-width: 0 0 1px;\n}\n.navbar-fixed-bottom {\n bottom: 0;\n margin-bottom: 0;\n border-width: 1px 0 0;\n}\n.navbar-brand {\n float: left;\n padding: 15px 15px;\n font-size: 18px;\n line-height: 20px;\n height: 50px;\n}\n.navbar-brand:hover,\n.navbar-brand:focus {\n text-decoration: none;\n}\n.navbar-brand > img {\n display: block;\n}\n@media (min-width: 768px) {\n .navbar > .container .navbar-brand,\n .navbar > .container-fluid .navbar-brand {\n margin-left: -15px;\n }\n}\n.navbar-toggle {\n position: relative;\n float: right;\n margin-right: 15px;\n padding: 9px 10px;\n margin-top: 8px;\n margin-bottom: 8px;\n background-color: transparent;\n background-image: none;\n border: 1px solid transparent;\n border-radius: 4px;\n}\n.navbar-toggle:focus {\n outline: 0;\n}\n.navbar-toggle .icon-bar {\n display: block;\n width: 22px;\n height: 2px;\n border-radius: 1px;\n}\n.navbar-toggle .icon-bar + .icon-bar {\n margin-top: 4px;\n}\n@media (min-width: 768px) {\n .navbar-toggle {\n display: none;\n }\n}\n.navbar-nav {\n margin: 7.5px -15px;\n}\n.navbar-nav > li > a {\n padding-top: 10px;\n padding-bottom: 10px;\n line-height: 20px;\n}\n@media (max-width: 767px) {\n .navbar-nav .open .dropdown-menu {\n position: static;\n float: none;\n width: auto;\n margin-top: 0;\n background-color: transparent;\n border: 0;\n box-shadow: none;\n }\n .navbar-nav .open .dropdown-menu > li > a,\n .navbar-nav .open .dropdown-menu .dropdown-header {\n padding: 5px 15px 5px 25px;\n }\n .navbar-nav .open .dropdown-menu > li > a {\n line-height: 20px;\n }\n .navbar-nav .open .dropdown-menu > li > a:hover,\n .navbar-nav .open .dropdown-menu > li > a:focus {\n background-image: none;\n }\n}\n@media (min-width: 768px) {\n .navbar-nav {\n float: left;\n margin: 0;\n }\n .navbar-nav > li {\n float: left;\n }\n .navbar-nav > li > a {\n padding-top: 15px;\n padding-bottom: 15px;\n }\n}\n.navbar-form {\n margin-left: -15px;\n margin-right: -15px;\n padding: 10px 15px;\n border-top: 1px solid transparent;\n border-bottom: 1px solid transparent;\n -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1);\n box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1);\n margin-top: 8px;\n margin-bottom: 8px;\n}\n@media (min-width: 768px) {\n .navbar-form .form-group {\n display: inline-block;\n margin-bottom: 0;\n vertical-align: middle;\n }\n .navbar-form .form-control {\n display: inline-block;\n width: auto;\n vertical-align: middle;\n }\n .navbar-form .form-control-static {\n display: inline-block;\n }\n .navbar-form .input-group {\n display: inline-table;\n vertical-align: middle;\n }\n .navbar-form .input-group .input-group-addon,\n .navbar-form .input-group .input-group-btn,\n .navbar-form .input-group .form-control {\n width: auto;\n }\n .navbar-form .input-group > .form-control {\n width: 100%;\n }\n .navbar-form .control-label {\n margin-bottom: 0;\n vertical-align: middle;\n }\n .navbar-form .radio,\n .navbar-form .checkbox {\n display: inline-block;\n margin-top: 0;\n margin-bottom: 0;\n vertical-align: middle;\n }\n .navbar-form .radio label,\n .navbar-form .checkbox label {\n padding-left: 0;\n }\n .navbar-form .radio input[type=\"radio\"],\n .navbar-form .checkbox input[type=\"checkbox\"] {\n position: relative;\n margin-left: 0;\n }\n .navbar-form .has-feedback .form-control-feedback {\n top: 0;\n }\n}\n@media (max-width: 767px) {\n .navbar-form .form-group {\n margin-bottom: 5px;\n }\n .navbar-form .form-group:last-child {\n margin-bottom: 0;\n }\n}\n@media (min-width: 768px) {\n .navbar-form {\n width: auto;\n border: 0;\n margin-left: 0;\n margin-right: 0;\n padding-top: 0;\n padding-bottom: 0;\n -webkit-box-shadow: none;\n box-shadow: none;\n }\n}\n.navbar-nav > li > .dropdown-menu {\n margin-top: 0;\n border-top-right-radius: 0;\n border-top-left-radius: 0;\n}\n.navbar-fixed-bottom .navbar-nav > li > .dropdown-menu {\n border-top-right-radius: 4px;\n border-top-left-radius: 4px;\n border-bottom-right-radius: 0;\n border-bottom-left-radius: 0;\n}\n.navbar-btn {\n margin-top: 8px;\n margin-bottom: 8px;\n}\n.navbar-btn.btn-sm {\n margin-top: 10px;\n margin-bottom: 10px;\n}\n.navbar-btn.btn-xs {\n margin-top: 14px;\n margin-bottom: 14px;\n}\n.navbar-text {\n margin-top: 15px;\n margin-bottom: 15px;\n}\n@media (min-width: 768px) {\n .navbar-text {\n float: left;\n margin-left: 15px;\n margin-right: 15px;\n }\n}\n@media (min-width: 768px) {\n .navbar-left {\n float: left !important;\n }\n .navbar-right {\n float: right !important;\n margin-right: -15px;\n }\n .navbar-right ~ .navbar-right {\n margin-right: 0;\n }\n}\n.navbar-default {\n background-color: #f8f8f8;\n border-color: #e7e7e7;\n}\n.navbar-default .navbar-brand {\n color: #777777;\n}\n.navbar-default .navbar-brand:hover,\n.navbar-default .navbar-brand:focus {\n color: #5e5e5e;\n background-color: transparent;\n}\n.navbar-default .navbar-text {\n color: #777777;\n}\n.navbar-default .navbar-nav > li > a {\n color: #777777;\n}\n.navbar-default .navbar-nav > li > a:hover,\n.navbar-default .navbar-nav > li > a:focus {\n color: #333333;\n background-color: transparent;\n}\n.navbar-default .navbar-nav > .active > a,\n.navbar-default .navbar-nav > .active > a:hover,\n.navbar-default .navbar-nav > .active > a:focus {\n color: #555555;\n background-color: #e7e7e7;\n}\n.navbar-default .navbar-nav > .disabled > a,\n.navbar-default .navbar-nav > .disabled > a:hover,\n.navbar-default .navbar-nav > .disabled > a:focus {\n color: #cccccc;\n background-color: transparent;\n}\n.navbar-default .navbar-toggle {\n border-color: #dddddd;\n}\n.navbar-default .navbar-toggle:hover,\n.navbar-default .navbar-toggle:focus {\n background-color: #dddddd;\n}\n.navbar-default .navbar-toggle .icon-bar {\n background-color: #888888;\n}\n.navbar-default .navbar-collapse,\n.navbar-default .navbar-form {\n border-color: #e7e7e7;\n}\n.navbar-default .navbar-nav > .open > a,\n.navbar-default .navbar-nav > .open > a:hover,\n.navbar-default .navbar-nav > .open > a:focus {\n background-color: #e7e7e7;\n color: #555555;\n}\n@media (max-width: 767px) {\n .navbar-default .navbar-nav .open .dropdown-menu > li > a {\n color: #777777;\n }\n .navbar-default .navbar-nav .open .dropdown-menu > li > a:hover,\n .navbar-default .navbar-nav .open .dropdown-menu > li > a:focus {\n color: #333333;\n background-color: transparent;\n }\n .navbar-default .navbar-nav .open .dropdown-menu > .active > a,\n .navbar-default .navbar-nav .open .dropdown-menu > .active > a:hover,\n .navbar-default .navbar-nav .open .dropdown-menu > .active > a:focus {\n color: #555555;\n background-color: #e7e7e7;\n }\n .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a,\n .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a:hover,\n .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a:focus {\n color: #cccccc;\n background-color: transparent;\n }\n}\n.navbar-default .navbar-link {\n color: #777777;\n}\n.navbar-default .navbar-link:hover {\n color: #333333;\n}\n.navbar-default .btn-link {\n color: #777777;\n}\n.navbar-default .btn-link:hover,\n.navbar-default .btn-link:focus {\n color: #333333;\n}\n.navbar-default .btn-link[disabled]:hover,\nfieldset[disabled] .navbar-default .btn-link:hover,\n.navbar-default .btn-link[disabled]:focus,\nfieldset[disabled] .navbar-default .btn-link:focus {\n color: #cccccc;\n}\n.navbar-inverse {\n background-color: #222222;\n border-color: #080808;\n}\n.navbar-inverse .navbar-brand {\n color: #9d9d9d;\n}\n.navbar-inverse .navbar-brand:hover,\n.navbar-inverse .navbar-brand:focus {\n color: #ffffff;\n background-color: transparent;\n}\n.navbar-inverse .navbar-text {\n color: #9d9d9d;\n}\n.navbar-inverse .navbar-nav > li > a {\n color: #9d9d9d;\n}\n.navbar-inverse .navbar-nav > li > a:hover,\n.navbar-inverse .navbar-nav > li > a:focus {\n color: #ffffff;\n background-color: transparent;\n}\n.navbar-inverse .navbar-nav > .active > a,\n.navbar-inverse .navbar-nav > .active > a:hover,\n.navbar-inverse .navbar-nav > .active > a:focus {\n color: #ffffff;\n background-color: #080808;\n}\n.navbar-inverse .navbar-nav > .disabled > a,\n.navbar-inverse .navbar-nav > .disabled > a:hover,\n.navbar-inverse .navbar-nav > .disabled > a:focus {\n color: #444444;\n background-color: transparent;\n}\n.navbar-inverse .navbar-toggle {\n border-color: #333333;\n}\n.navbar-inverse .navbar-toggle:hover,\n.navbar-inverse .navbar-toggle:focus {\n background-color: #333333;\n}\n.navbar-inverse .navbar-toggle .icon-bar {\n background-color: #ffffff;\n}\n.navbar-inverse .navbar-collapse,\n.navbar-inverse .navbar-form {\n border-color: #101010;\n}\n.navbar-inverse .navbar-nav > .open > a,\n.navbar-inverse .navbar-nav > .open > a:hover,\n.navbar-inverse .navbar-nav > .open > a:focus {\n background-color: #080808;\n color: #ffffff;\n}\n@media (max-width: 767px) {\n .navbar-inverse .navbar-nav .open .dropdown-menu > .dropdown-header {\n border-color: #080808;\n }\n .navbar-inverse .navbar-nav .open .dropdown-menu .divider {\n background-color: #080808;\n }\n .navbar-inverse .navbar-nav .open .dropdown-menu > li > a {\n color: #9d9d9d;\n }\n .navbar-inverse .navbar-nav .open .dropdown-menu > li > a:hover,\n .navbar-inverse .navbar-nav .open .dropdown-menu > li > a:focus {\n color: #ffffff;\n background-color: transparent;\n }\n .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a,\n .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a:hover,\n .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a:focus {\n color: #ffffff;\n background-color: #080808;\n }\n .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a,\n .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a:hover,\n .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a:focus {\n color: #444444;\n background-color: transparent;\n }\n}\n.navbar-inverse .navbar-link {\n color: #9d9d9d;\n}\n.navbar-inverse .navbar-link:hover {\n color: #ffffff;\n}\n.navbar-inverse .btn-link {\n color: #9d9d9d;\n}\n.navbar-inverse .btn-link:hover,\n.navbar-inverse .btn-link:focus {\n color: #ffffff;\n}\n.navbar-inverse .btn-link[disabled]:hover,\nfieldset[disabled] .navbar-inverse .btn-link:hover,\n.navbar-inverse .btn-link[disabled]:focus,\nfieldset[disabled] .navbar-inverse .btn-link:focus {\n color: #444444;\n}\n.breadcrumb {\n padding: 8px 15px;\n margin-bottom: 20px;\n list-style: none;\n background-color: #f5f5f5;\n border-radius: 4px;\n}\n.breadcrumb > li {\n display: inline-block;\n}\n.breadcrumb > li + li:before {\n content: \"/\\00a0\";\n padding: 0 5px;\n color: #cccccc;\n}\n.breadcrumb > .active {\n color: #777777;\n}\n.pagination {\n display: inline-block;\n padding-left: 0;\n margin: 20px 0;\n border-radius: 4px;\n}\n.pagination > li {\n display: inline;\n}\n.pagination > li > a,\n.pagination > li > span {\n position: relative;\n float: left;\n padding: 6px 12px;\n line-height: 1.42857143;\n text-decoration: none;\n color: #337ab7;\n background-color: #ffffff;\n border: 1px solid #dddddd;\n margin-left: -1px;\n}\n.pagination > li:first-child > a,\n.pagination > li:first-child > span {\n margin-left: 0;\n border-bottom-left-radius: 4px;\n border-top-left-radius: 4px;\n}\n.pagination > li:last-child > a,\n.pagination > li:last-child > span {\n border-bottom-right-radius: 4px;\n border-top-right-radius: 4px;\n}\n.pagination > li > a:hover,\n.pagination > li > span:hover,\n.pagination > li > a:focus,\n.pagination > li > span:focus {\n color: #23527c;\n background-color: #eeeeee;\n border-color: #dddddd;\n}\n.pagination > .active > a,\n.pagination > .active > span,\n.pagination > .active > a:hover,\n.pagination > .active > span:hover,\n.pagination > .active > a:focus,\n.pagination > .active > span:focus {\n z-index: 2;\n color: #ffffff;\n background-color: #337ab7;\n border-color: #337ab7;\n cursor: default;\n}\n.pagination > .disabled > span,\n.pagination > .disabled > span:hover,\n.pagination > .disabled > span:focus,\n.pagination > .disabled > a,\n.pagination > .disabled > a:hover,\n.pagination > .disabled > a:focus {\n color: #777777;\n background-color: #ffffff;\n border-color: #dddddd;\n cursor: not-allowed;\n}\n.pagination-lg > li > a,\n.pagination-lg > li > span {\n padding: 10px 16px;\n font-size: 18px;\n}\n.pagination-lg > li:first-child > a,\n.pagination-lg > li:first-child > span {\n border-bottom-left-radius: 6px;\n border-top-left-radius: 6px;\n}\n.pagination-lg > li:last-child > a,\n.pagination-lg > li:last-child > span {\n border-bottom-right-radius: 6px;\n border-top-right-radius: 6px;\n}\n.pagination-sm > li > a,\n.pagination-sm > li > span {\n padding: 5px 10px;\n font-size: 12px;\n}\n.pagination-sm > li:first-child > a,\n.pagination-sm > li:first-child > span {\n border-bottom-left-radius: 3px;\n border-top-left-radius: 3px;\n}\n.pagination-sm > li:last-child > a,\n.pagination-sm > li:last-child > span {\n border-bottom-right-radius: 3px;\n border-top-right-radius: 3px;\n}\n.pager {\n padding-left: 0;\n margin: 20px 0;\n list-style: none;\n text-align: center;\n}\n.pager li {\n display: inline;\n}\n.pager li > a,\n.pager li > span {\n display: inline-block;\n padding: 5px 14px;\n background-color: #ffffff;\n border: 1px solid #dddddd;\n border-radius: 15px;\n}\n.pager li > a:hover,\n.pager li > a:focus {\n text-decoration: none;\n background-color: #eeeeee;\n}\n.pager .next > a,\n.pager .next > span {\n float: right;\n}\n.pager .previous > a,\n.pager .previous > span {\n float: left;\n}\n.pager .disabled > a,\n.pager .disabled > a:hover,\n.pager .disabled > a:focus,\n.pager .disabled > span {\n color: #777777;\n background-color: #ffffff;\n cursor: not-allowed;\n}\n.label {\n display: inline;\n padding: .2em .6em .3em;\n font-size: 75%;\n font-weight: bold;\n line-height: 1;\n color: #ffffff;\n text-align: center;\n white-space: nowrap;\n vertical-align: baseline;\n border-radius: .25em;\n}\na.label:hover,\na.label:focus {\n color: #ffffff;\n text-decoration: none;\n cursor: pointer;\n}\n.label:empty {\n display: none;\n}\n.btn .label {\n position: relative;\n top: -1px;\n}\n.label-default {\n background-color: #777777;\n}\n.label-default[href]:hover,\n.label-default[href]:focus {\n background-color: #5e5e5e;\n}\n.label-primary {\n background-color: #337ab7;\n}\n.label-primary[href]:hover,\n.label-primary[href]:focus {\n background-color: #286090;\n}\n.label-success {\n background-color: #5cb85c;\n}\n.label-success[href]:hover,\n.label-success[href]:focus {\n background-color: #449d44;\n}\n.label-info {\n background-color: #5bc0de;\n}\n.label-info[href]:hover,\n.label-info[href]:focus {\n background-color: #31b0d5;\n}\n.label-warning {\n background-color: #f0ad4e;\n}\n.label-warning[href]:hover,\n.label-warning[href]:focus {\n background-color: #ec971f;\n}\n.label-danger {\n background-color: #d9534f;\n}\n.label-danger[href]:hover,\n.label-danger[href]:focus {\n background-color: #c9302c;\n}\n.badge {\n display: inline-block;\n min-width: 10px;\n padding: 3px 7px;\n font-size: 12px;\n font-weight: bold;\n color: #ffffff;\n line-height: 1;\n vertical-align: baseline;\n white-space: nowrap;\n text-align: center;\n background-color: #777777;\n border-radius: 10px;\n}\n.badge:empty {\n display: none;\n}\n.btn .badge {\n position: relative;\n top: -1px;\n}\n.btn-xs .badge {\n top: 0;\n padding: 1px 5px;\n}\na.badge:hover,\na.badge:focus {\n color: #ffffff;\n text-decoration: none;\n cursor: pointer;\n}\n.list-group-item.active > .badge,\n.nav-pills > .active > a > .badge {\n color: #337ab7;\n background-color: #ffffff;\n}\n.list-group-item > .badge {\n float: right;\n}\n.list-group-item > .badge + .badge {\n margin-right: 5px;\n}\n.nav-pills > li > a > .badge {\n margin-left: 3px;\n}\n.jumbotron {\n padding: 30px 15px;\n margin-bottom: 30px;\n color: inherit;\n background-color: #eeeeee;\n}\n.jumbotron h1,\n.jumbotron .h1 {\n color: inherit;\n}\n.jumbotron p {\n margin-bottom: 15px;\n font-size: 21px;\n font-weight: 200;\n}\n.jumbotron > hr {\n border-top-color: #d5d5d5;\n}\n.container .jumbotron,\n.container-fluid .jumbotron {\n border-radius: 6px;\n}\n.jumbotron .container {\n max-width: 100%;\n}\n@media screen and (min-width: 768px) {\n .jumbotron {\n padding: 48px 0;\n }\n .container .jumbotron,\n .container-fluid .jumbotron {\n padding-left: 60px;\n padding-right: 60px;\n }\n .jumbotron h1,\n .jumbotron .h1 {\n font-size: 63px;\n }\n}\n.thumbnail {\n display: block;\n padding: 4px;\n margin-bottom: 20px;\n line-height: 1.42857143;\n background-color: #ffffff;\n border: 1px solid #dddddd;\n border-radius: 4px;\n -webkit-transition: border 0.2s ease-in-out;\n -o-transition: border 0.2s ease-in-out;\n transition: border 0.2s ease-in-out;\n}\n.thumbnail > img,\n.thumbnail a > img {\n margin-left: auto;\n margin-right: auto;\n}\na.thumbnail:hover,\na.thumbnail:focus,\na.thumbnail.active {\n border-color: #337ab7;\n}\n.thumbnail .caption {\n padding: 9px;\n color: #333333;\n}\n.alert {\n padding: 15px;\n margin-bottom: 20px;\n border: 1px solid transparent;\n border-radius: 4px;\n}\n.alert h4 {\n margin-top: 0;\n color: inherit;\n}\n.alert .alert-link {\n font-weight: bold;\n}\n.alert > p,\n.alert > ul {\n margin-bottom: 0;\n}\n.alert > p + p {\n margin-top: 5px;\n}\n.alert-dismissable,\n.alert-dismissible {\n padding-right: 35px;\n}\n.alert-dismissable .close,\n.alert-dismissible .close {\n position: relative;\n top: -2px;\n right: -21px;\n color: inherit;\n}\n.alert-success {\n background-color: #dff0d8;\n border-color: #d6e9c6;\n color: #3c763d;\n}\n.alert-success hr {\n border-top-color: #c9e2b3;\n}\n.alert-success .alert-link {\n color: #2b542c;\n}\n.alert-info {\n background-color: #d9edf7;\n border-color: #bce8f1;\n color: #31708f;\n}\n.alert-info hr {\n border-top-color: #a6e1ec;\n}\n.alert-info .alert-link {\n color: #245269;\n}\n.alert-warning {\n background-color: #fcf8e3;\n border-color: #faebcc;\n color: #8a6d3b;\n}\n.alert-warning hr {\n border-top-color: #f7e1b5;\n}\n.alert-warning .alert-link {\n color: #66512c;\n}\n.alert-danger {\n background-color: #f2dede;\n border-color: #ebccd1;\n color: #a94442;\n}\n.alert-danger hr {\n border-top-color: #e4b9c0;\n}\n.alert-danger .alert-link {\n color: #843534;\n}\n@-webkit-keyframes progress-bar-stripes {\n from {\n background-position: 40px 0;\n }\n to {\n background-position: 0 0;\n }\n}\n@keyframes progress-bar-stripes {\n from {\n background-position: 40px 0;\n }\n to {\n background-position: 0 0;\n }\n}\n.progress {\n overflow: hidden;\n height: 20px;\n margin-bottom: 20px;\n background-color: #f5f5f5;\n border-radius: 4px;\n -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);\n box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);\n}\n.progress-bar {\n float: left;\n width: 0%;\n height: 100%;\n font-size: 12px;\n line-height: 20px;\n color: #ffffff;\n text-align: center;\n background-color: #337ab7;\n -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15);\n box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15);\n -webkit-transition: width 0.6s ease;\n -o-transition: width 0.6s ease;\n transition: width 0.6s ease;\n}\n.progress-striped .progress-bar,\n.progress-bar-striped {\n background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-size: 40px 40px;\n}\n.progress.active .progress-bar,\n.progress-bar.active {\n -webkit-animation: progress-bar-stripes 2s linear infinite;\n -o-animation: progress-bar-stripes 2s linear infinite;\n animation: progress-bar-stripes 2s linear infinite;\n}\n.progress-bar-success {\n background-color: #5cb85c;\n}\n.progress-striped .progress-bar-success {\n background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n}\n.progress-bar-info {\n background-color: #5bc0de;\n}\n.progress-striped .progress-bar-info {\n background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n}\n.progress-bar-warning {\n background-color: #f0ad4e;\n}\n.progress-striped .progress-bar-warning {\n background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n}\n.progress-bar-danger {\n background-color: #d9534f;\n}\n.progress-striped .progress-bar-danger {\n background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n}\n.media {\n margin-top: 15px;\n}\n.media:first-child {\n margin-top: 0;\n}\n.media-right,\n.media > .pull-right {\n padding-left: 10px;\n}\n.media-left,\n.media > .pull-left {\n padding-right: 10px;\n}\n.media-left,\n.media-right,\n.media-body {\n display: table-cell;\n vertical-align: top;\n}\n.media-middle {\n vertical-align: middle;\n}\n.media-bottom {\n vertical-align: bottom;\n}\n.media-heading {\n margin-top: 0;\n margin-bottom: 5px;\n}\n.media-list {\n padding-left: 0;\n list-style: none;\n}\n.list-group {\n margin-bottom: 20px;\n padding-left: 0;\n}\n.list-group-item {\n position: relative;\n display: block;\n padding: 10px 15px;\n margin-bottom: -1px;\n background-color: #ffffff;\n border: 1px solid #dddddd;\n}\n.list-group-item:first-child {\n border-top-right-radius: 4px;\n border-top-left-radius: 4px;\n}\n.list-group-item:last-child {\n margin-bottom: 0;\n border-bottom-right-radius: 4px;\n border-bottom-left-radius: 4px;\n}\na.list-group-item {\n color: #555555;\n}\na.list-group-item .list-group-item-heading {\n color: #333333;\n}\na.list-group-item:hover,\na.list-group-item:focus {\n text-decoration: none;\n color: #555555;\n background-color: #f5f5f5;\n}\n.list-group-item.disabled,\n.list-group-item.disabled:hover,\n.list-group-item.disabled:focus {\n background-color: #eeeeee;\n color: #777777;\n cursor: not-allowed;\n}\n.list-group-item.disabled .list-group-item-heading,\n.list-group-item.disabled:hover .list-group-item-heading,\n.list-group-item.disabled:focus .list-group-item-heading {\n color: inherit;\n}\n.list-group-item.disabled .list-group-item-text,\n.list-group-item.disabled:hover .list-group-item-text,\n.list-group-item.disabled:focus .list-group-item-text {\n color: #777777;\n}\n.list-group-item.active,\n.list-group-item.active:hover,\n.list-group-item.active:focus {\n z-index: 2;\n color: #ffffff;\n background-color: #337ab7;\n border-color: #337ab7;\n}\n.list-group-item.active .list-group-item-heading,\n.list-group-item.active:hover .list-group-item-heading,\n.list-group-item.active:focus .list-group-item-heading,\n.list-group-item.active .list-group-item-heading > small,\n.list-group-item.active:hover .list-group-item-heading > small,\n.list-group-item.active:focus .list-group-item-heading > small,\n.list-group-item.active .list-group-item-heading > .small,\n.list-group-item.active:hover .list-group-item-heading > .small,\n.list-group-item.active:focus .list-group-item-heading > .small {\n color: inherit;\n}\n.list-group-item.active .list-group-item-text,\n.list-group-item.active:hover .list-group-item-text,\n.list-group-item.active:focus .list-group-item-text {\n color: #c7ddef;\n}\n.list-group-item-success {\n color: #3c763d;\n background-color: #dff0d8;\n}\na.list-group-item-success {\n color: #3c763d;\n}\na.list-group-item-success .list-group-item-heading {\n color: inherit;\n}\na.list-group-item-success:hover,\na.list-group-item-success:focus {\n color: #3c763d;\n background-color: #d0e9c6;\n}\na.list-group-item-success.active,\na.list-group-item-success.active:hover,\na.list-group-item-success.active:focus {\n color: #fff;\n background-color: #3c763d;\n border-color: #3c763d;\n}\n.list-group-item-info {\n color: #31708f;\n background-color: #d9edf7;\n}\na.list-group-item-info {\n color: #31708f;\n}\na.list-group-item-info .list-group-item-heading {\n color: inherit;\n}\na.list-group-item-info:hover,\na.list-group-item-info:focus {\n color: #31708f;\n background-color: #c4e3f3;\n}\na.list-group-item-info.active,\na.list-group-item-info.active:hover,\na.list-group-item-info.active:focus {\n color: #fff;\n background-color: #31708f;\n border-color: #31708f;\n}\n.list-group-item-warning {\n color: #8a6d3b;\n background-color: #fcf8e3;\n}\na.list-group-item-warning {\n color: #8a6d3b;\n}\na.list-group-item-warning .list-group-item-heading {\n color: inherit;\n}\na.list-group-item-warning:hover,\na.list-group-item-warning:focus {\n color: #8a6d3b;\n background-color: #faf2cc;\n}\na.list-group-item-warning.active,\na.list-group-item-warning.active:hover,\na.list-group-item-warning.active:focus {\n color: #fff;\n background-color: #8a6d3b;\n border-color: #8a6d3b;\n}\n.list-group-item-danger {\n color: #a94442;\n background-color: #f2dede;\n}\na.list-group-item-danger {\n color: #a94442;\n}\na.list-group-item-danger .list-group-item-heading {\n color: inherit;\n}\na.list-group-item-danger:hover,\na.list-group-item-danger:focus {\n color: #a94442;\n background-color: #ebcccc;\n}\na.list-group-item-danger.active,\na.list-group-item-danger.active:hover,\na.list-group-item-danger.active:focus {\n color: #fff;\n background-color: #a94442;\n border-color: #a94442;\n}\n.list-group-item-heading {\n margin-top: 0;\n margin-bottom: 5px;\n}\n.list-group-item-text {\n margin-bottom: 0;\n line-height: 1.3;\n}\n.panel {\n margin-bottom: 20px;\n background-color: #ffffff;\n border: 1px solid transparent;\n border-radius: 4px;\n -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);\n box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);\n}\n.panel-body {\n padding: 15px;\n}\n.panel-heading {\n padding: 10px 15px;\n border-bottom: 1px solid transparent;\n border-top-right-radius: 3px;\n border-top-left-radius: 3px;\n}\n.panel-heading > .dropdown .dropdown-toggle {\n color: inherit;\n}\n.panel-title {\n margin-top: 0;\n margin-bottom: 0;\n font-size: 16px;\n color: inherit;\n}\n.panel-title > a {\n color: inherit;\n}\n.panel-footer {\n padding: 10px 15px;\n background-color: #f5f5f5;\n border-top: 1px solid #dddddd;\n border-bottom-right-radius: 3px;\n border-bottom-left-radius: 3px;\n}\n.panel > .list-group,\n.panel > .panel-collapse > .list-group {\n margin-bottom: 0;\n}\n.panel > .list-group .list-group-item,\n.panel > .panel-collapse > .list-group .list-group-item {\n border-width: 1px 0;\n border-radius: 0;\n}\n.panel > .list-group:first-child .list-group-item:first-child,\n.panel > .panel-collapse > .list-group:first-child .list-group-item:first-child {\n border-top: 0;\n border-top-right-radius: 3px;\n border-top-left-radius: 3px;\n}\n.panel > .list-group:last-child .list-group-item:last-child,\n.panel > .panel-collapse > .list-group:last-child .list-group-item:last-child {\n border-bottom: 0;\n border-bottom-right-radius: 3px;\n border-bottom-left-radius: 3px;\n}\n.panel-heading + .list-group .list-group-item:first-child {\n border-top-width: 0;\n}\n.list-group + .panel-footer {\n border-top-width: 0;\n}\n.panel > .table,\n.panel > .table-responsive > .table,\n.panel > .panel-collapse > .table {\n margin-bottom: 0;\n}\n.panel > .table caption,\n.panel > .table-responsive > .table caption,\n.panel > .panel-collapse > .table caption {\n padding-left: 15px;\n padding-right: 15px;\n}\n.panel > .table:first-child,\n.panel > .table-responsive:first-child > .table:first-child {\n border-top-right-radius: 3px;\n border-top-left-radius: 3px;\n}\n.panel > .table:first-child > thead:first-child > tr:first-child,\n.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child,\n.panel > .table:first-child > tbody:first-child > tr:first-child,\n.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child {\n border-top-left-radius: 3px;\n border-top-right-radius: 3px;\n}\n.panel > .table:first-child > thead:first-child > tr:first-child td:first-child,\n.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child td:first-child,\n.panel > .table:first-child > tbody:first-child > tr:first-child td:first-child,\n.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child td:first-child,\n.panel > .table:first-child > thead:first-child > tr:first-child th:first-child,\n.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child th:first-child,\n.panel > .table:first-child > tbody:first-child > tr:first-child th:first-child,\n.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child th:first-child {\n border-top-left-radius: 3px;\n}\n.panel > .table:first-child > thead:first-child > tr:first-child td:last-child,\n.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child td:last-child,\n.panel > .table:first-child > tbody:first-child > tr:first-child td:last-child,\n.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child td:last-child,\n.panel > .table:first-child > thead:first-child > tr:first-child th:last-child,\n.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child th:last-child,\n.panel > .table:first-child > tbody:first-child > tr:first-child th:last-child,\n.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child th:last-child {\n border-top-right-radius: 3px;\n}\n.panel > .table:last-child,\n.panel > .table-responsive:last-child > .table:last-child {\n border-bottom-right-radius: 3px;\n border-bottom-left-radius: 3px;\n}\n.panel > .table:last-child > tbody:last-child > tr:last-child,\n.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child,\n.panel > .table:last-child > tfoot:last-child > tr:last-child,\n.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child {\n border-bottom-left-radius: 3px;\n border-bottom-right-radius: 3px;\n}\n.panel > .table:last-child > tbody:last-child > tr:last-child td:first-child,\n.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child td:first-child,\n.panel > .table:last-child > tfoot:last-child > tr:last-child td:first-child,\n.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child td:first-child,\n.panel > .table:last-child > tbody:last-child > tr:last-child th:first-child,\n.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child th:first-child,\n.panel > .table:last-child > tfoot:last-child > tr:last-child th:first-child,\n.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child th:first-child {\n border-bottom-left-radius: 3px;\n}\n.panel > .table:last-child > tbody:last-child > tr:last-child td:last-child,\n.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child td:last-child,\n.panel > .table:last-child > tfoot:last-child > tr:last-child td:last-child,\n.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child td:last-child,\n.panel > .table:last-child > tbody:last-child > tr:last-child th:last-child,\n.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child th:last-child,\n.panel > .table:last-child > tfoot:last-child > tr:last-child th:last-child,\n.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child th:last-child {\n border-bottom-right-radius: 3px;\n}\n.panel > .panel-body + .table,\n.panel > .panel-body + .table-responsive,\n.panel > .table + .panel-body,\n.panel > .table-responsive + .panel-body {\n border-top: 1px solid #dddddd;\n}\n.panel > .table > tbody:first-child > tr:first-child th,\n.panel > .table > tbody:first-child > tr:first-child td {\n border-top: 0;\n}\n.panel > .table-bordered,\n.panel > .table-responsive > .table-bordered {\n border: 0;\n}\n.panel > .table-bordered > thead > tr > th:first-child,\n.panel > .table-responsive > .table-bordered > thead > tr > th:first-child,\n.panel > .table-bordered > tbody > tr > th:first-child,\n.panel > .table-responsive > .table-bordered > tbody > tr > th:first-child,\n.panel > .table-bordered > tfoot > tr > th:first-child,\n.panel > .table-responsive > .table-bordered > tfoot > tr > th:first-child,\n.panel > .table-bordered > thead > tr > td:first-child,\n.panel > .table-responsive > .table-bordered > thead > tr > td:first-child,\n.panel > .table-bordered > tbody > tr > td:first-child,\n.panel > .table-responsive > .table-bordered > tbody > tr > td:first-child,\n.panel > .table-bordered > tfoot > tr > td:first-child,\n.panel > .table-responsive > .table-bordered > tfoot > tr > td:first-child {\n border-left: 0;\n}\n.panel > .table-bordered > thead > tr > th:last-child,\n.panel > .table-responsive > .table-bordered > thead > tr > th:last-child,\n.panel > .table-bordered > tbody > tr > th:last-child,\n.panel > .table-responsive > .table-bordered > tbody > tr > th:last-child,\n.panel > .table-bordered > tfoot > tr > th:last-child,\n.panel > .table-responsive > .table-bordered > tfoot > tr > th:last-child,\n.panel > .table-bordered > thead > tr > td:last-child,\n.panel > .table-responsive > .table-bordered > thead > tr > td:last-child,\n.panel > .table-bordered > tbody > tr > td:last-child,\n.panel > .table-responsive > .table-bordered > tbody > tr > td:last-child,\n.panel > .table-bordered > tfoot > tr > td:last-child,\n.panel > .table-responsive > .table-bordered > tfoot > tr > td:last-child {\n border-right: 0;\n}\n.panel > .table-bordered > thead > tr:first-child > td,\n.panel > .table-responsive > .table-bordered > thead > tr:first-child > td,\n.panel > .table-bordered > tbody > tr:first-child > td,\n.panel > .table-responsive > .table-bordered > tbody > tr:first-child > td,\n.panel > .table-bordered > thead > tr:first-child > th,\n.panel > .table-responsive > .table-bordered > thead > tr:first-child > th,\n.panel > .table-bordered > tbody > tr:first-child > th,\n.panel > .table-responsive > .table-bordered > tbody > tr:first-child > th {\n border-bottom: 0;\n}\n.panel > .table-bordered > tbody > tr:last-child > td,\n.panel > .table-responsive > .table-bordered > tbody > tr:last-child > td,\n.panel > .table-bordered > tfoot > tr:last-child > td,\n.panel > .table-responsive > .table-bordered > tfoot > tr:last-child > td,\n.panel > .table-bordered > tbody > tr:last-child > th,\n.panel > .table-responsive > .table-bordered > tbody > tr:last-child > th,\n.panel > .table-bordered > tfoot > tr:last-child > th,\n.panel > .table-responsive > .table-bordered > tfoot > tr:last-child > th {\n border-bottom: 0;\n}\n.panel > .table-responsive {\n border: 0;\n margin-bottom: 0;\n}\n.panel-group {\n margin-bottom: 20px;\n}\n.panel-group .panel {\n margin-bottom: 0;\n border-radius: 4px;\n}\n.panel-group .panel + .panel {\n margin-top: 5px;\n}\n.panel-group .panel-heading {\n border-bottom: 0;\n}\n.panel-group .panel-heading + .panel-collapse > .panel-body,\n.panel-group .panel-heading + .panel-collapse > .list-group {\n border-top: 1px solid #dddddd;\n}\n.panel-group .panel-footer {\n border-top: 0;\n}\n.panel-group .panel-footer + .panel-collapse .panel-body {\n border-bottom: 1px solid #dddddd;\n}\n.panel-default {\n border-color: #dddddd;\n}\n.panel-default > .panel-heading {\n color: #333333;\n background-color: #f5f5f5;\n border-color: #dddddd;\n}\n.panel-default > .panel-heading + .panel-collapse > .panel-body {\n border-top-color: #dddddd;\n}\n.panel-default > .panel-heading .badge {\n color: #f5f5f5;\n background-color: #333333;\n}\n.panel-default > .panel-footer + .panel-collapse > .panel-body {\n border-bottom-color: #dddddd;\n}\n.panel-primary {\n border-color: #337ab7;\n}\n.panel-primary > .panel-heading {\n color: #ffffff;\n background-color: #337ab7;\n border-color: #337ab7;\n}\n.panel-primary > .panel-heading + .panel-collapse > .panel-body {\n border-top-color: #337ab7;\n}\n.panel-primary > .panel-heading .badge {\n color: #337ab7;\n background-color: #ffffff;\n}\n.panel-primary > .panel-footer + .panel-collapse > .panel-body {\n border-bottom-color: #337ab7;\n}\n.panel-success {\n border-color: #d6e9c6;\n}\n.panel-success > .panel-heading {\n color: #3c763d;\n background-color: #dff0d8;\n border-color: #d6e9c6;\n}\n.panel-success > .panel-heading + .panel-collapse > .panel-body {\n border-top-color: #d6e9c6;\n}\n.panel-success > .panel-heading .badge {\n color: #dff0d8;\n background-color: #3c763d;\n}\n.panel-success > .panel-footer + .panel-collapse > .panel-body {\n border-bottom-color: #d6e9c6;\n}\n.panel-info {\n border-color: #bce8f1;\n}\n.panel-info > .panel-heading {\n color: #31708f;\n background-color: #d9edf7;\n border-color: #bce8f1;\n}\n.panel-info > .panel-heading + .panel-collapse > .panel-body {\n border-top-color: #bce8f1;\n}\n.panel-info > .panel-heading .badge {\n color: #d9edf7;\n background-color: #31708f;\n}\n.panel-info > .panel-footer + .panel-collapse > .panel-body {\n border-bottom-color: #bce8f1;\n}\n.panel-warning {\n border-color: #faebcc;\n}\n.panel-warning > .panel-heading {\n color: #8a6d3b;\n background-color: #fcf8e3;\n border-color: #faebcc;\n}\n.panel-warning > .panel-heading + .panel-collapse > .panel-body {\n border-top-color: #faebcc;\n}\n.panel-warning > .panel-heading .badge {\n color: #fcf8e3;\n background-color: #8a6d3b;\n}\n.panel-warning > .panel-footer + .panel-collapse > .panel-body {\n border-bottom-color: #faebcc;\n}\n.panel-danger {\n border-color: #ebccd1;\n}\n.panel-danger > .panel-heading {\n color: #a94442;\n background-color: #f2dede;\n border-color: #ebccd1;\n}\n.panel-danger > .panel-heading + .panel-collapse > .panel-body {\n border-top-color: #ebccd1;\n}\n.panel-danger > .panel-heading .badge {\n color: #f2dede;\n background-color: #a94442;\n}\n.panel-danger > .panel-footer + .panel-collapse > .panel-body {\n border-bottom-color: #ebccd1;\n}\n.embed-responsive {\n position: relative;\n display: block;\n height: 0;\n padding: 0;\n overflow: hidden;\n}\n.embed-responsive .embed-responsive-item,\n.embed-responsive iframe,\n.embed-responsive embed,\n.embed-responsive object,\n.embed-responsive video {\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n height: 100%;\n width: 100%;\n border: 0;\n}\n.embed-responsive.embed-responsive-16by9 {\n padding-bottom: 56.25%;\n}\n.embed-responsive.embed-responsive-4by3 {\n padding-bottom: 75%;\n}\n.well {\n min-height: 20px;\n padding: 19px;\n margin-bottom: 20px;\n background-color: #f5f5f5;\n border: 1px solid #e3e3e3;\n border-radius: 4px;\n -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);\n box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);\n}\n.well blockquote {\n border-color: #ddd;\n border-color: rgba(0, 0, 0, 0.15);\n}\n.well-lg {\n padding: 24px;\n border-radius: 6px;\n}\n.well-sm {\n padding: 9px;\n border-radius: 3px;\n}\n.close {\n float: right;\n font-size: 21px;\n font-weight: bold;\n line-height: 1;\n color: #000000;\n text-shadow: 0 1px 0 #ffffff;\n opacity: 0.2;\n filter: alpha(opacity=20);\n}\n.close:hover,\n.close:focus {\n color: #000000;\n text-decoration: none;\n cursor: pointer;\n opacity: 0.5;\n filter: alpha(opacity=50);\n}\nbutton.close {\n padding: 0;\n cursor: pointer;\n background: transparent;\n border: 0;\n -webkit-appearance: none;\n}\n.modal-open {\n overflow: hidden;\n}\n.modal {\n display: none;\n overflow: hidden;\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: 1040;\n -webkit-overflow-scrolling: touch;\n outline: 0;\n}\n.modal.fade .modal-dialog {\n -webkit-transform: translate(0, -25%);\n -ms-transform: translate(0, -25%);\n -o-transform: translate(0, -25%);\n transform: translate(0, -25%);\n -webkit-transition: -webkit-transform 0.3s ease-out;\n -moz-transition: -moz-transform 0.3s ease-out;\n -o-transition: -o-transform 0.3s ease-out;\n transition: transform 0.3s ease-out;\n}\n.modal.in .modal-dialog {\n -webkit-transform: translate(0, 0);\n -ms-transform: translate(0, 0);\n -o-transform: translate(0, 0);\n transform: translate(0, 0);\n}\n.modal-open .modal {\n overflow-x: hidden;\n overflow-y: auto;\n}\n.modal-dialog {\n position: relative;\n width: auto;\n margin: 10px;\n}\n.modal-content {\n position: relative;\n background-color: #ffffff;\n border: 1px solid #999999;\n border: 1px solid rgba(0, 0, 0, 0.2);\n border-radius: 6px;\n -webkit-box-shadow: 0 3px 9px rgba(0, 0, 0, 0.5);\n box-shadow: 0 3px 9px rgba(0, 0, 0, 0.5);\n background-clip: padding-box;\n outline: 0;\n}\n.modal-backdrop {\n position: absolute;\n top: 0;\n right: 0;\n left: 0;\n background-color: #000000;\n}\n.modal-backdrop.fade {\n opacity: 0;\n filter: alpha(opacity=0);\n}\n.modal-backdrop.in {\n opacity: 0.5;\n filter: alpha(opacity=50);\n}\n.modal-header {\n padding: 15px;\n border-bottom: 1px solid #e5e5e5;\n min-height: 16.42857143px;\n}\n.modal-header .close {\n margin-top: -2px;\n}\n.modal-title {\n margin: 0;\n line-height: 1.42857143;\n}\n.modal-body {\n position: relative;\n padding: 15px;\n}\n.modal-footer {\n padding: 15px;\n text-align: right;\n border-top: 1px solid #e5e5e5;\n}\n.modal-footer .btn + .btn {\n margin-left: 5px;\n margin-bottom: 0;\n}\n.modal-footer .btn-group .btn + .btn {\n margin-left: -1px;\n}\n.modal-footer .btn-block + .btn-block {\n margin-left: 0;\n}\n.modal-scrollbar-measure {\n position: absolute;\n top: -9999px;\n width: 50px;\n height: 50px;\n overflow: scroll;\n}\n@media (min-width: 768px) {\n .modal-dialog {\n width: 600px;\n margin: 30px auto;\n }\n .modal-content {\n -webkit-box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);\n box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);\n }\n .modal-sm {\n width: 300px;\n }\n}\n@media (min-width: 992px) {\n .modal-lg {\n width: 900px;\n }\n}\n.tooltip {\n position: absolute;\n z-index: 1070;\n display: block;\n visibility: visible;\n font-family: \"Helvetica Neue\", Helvetica, Arial, sans-serif;\n font-size: 12px;\n font-weight: normal;\n line-height: 1.4;\n opacity: 0;\n filter: alpha(opacity=0);\n}\n.tooltip.in {\n opacity: 0.9;\n filter: alpha(opacity=90);\n}\n.tooltip.top {\n margin-top: -3px;\n padding: 5px 0;\n}\n.tooltip.right {\n margin-left: 3px;\n padding: 0 5px;\n}\n.tooltip.bottom {\n margin-top: 3px;\n padding: 5px 0;\n}\n.tooltip.left {\n margin-left: -3px;\n padding: 0 5px;\n}\n.tooltip-inner {\n max-width: 200px;\n padding: 3px 8px;\n color: #ffffff;\n text-align: center;\n text-decoration: none;\n background-color: #000000;\n border-radius: 4px;\n}\n.tooltip-arrow {\n position: absolute;\n width: 0;\n height: 0;\n border-color: transparent;\n border-style: solid;\n}\n.tooltip.top .tooltip-arrow {\n bottom: 0;\n left: 50%;\n margin-left: -5px;\n border-width: 5px 5px 0;\n border-top-color: #000000;\n}\n.tooltip.top-left .tooltip-arrow {\n bottom: 0;\n right: 5px;\n margin-bottom: -5px;\n border-width: 5px 5px 0;\n border-top-color: #000000;\n}\n.tooltip.top-right .tooltip-arrow {\n bottom: 0;\n left: 5px;\n margin-bottom: -5px;\n border-width: 5px 5px 0;\n border-top-color: #000000;\n}\n.tooltip.right .tooltip-arrow {\n top: 50%;\n left: 0;\n margin-top: -5px;\n border-width: 5px 5px 5px 0;\n border-right-color: #000000;\n}\n.tooltip.left .tooltip-arrow {\n top: 50%;\n right: 0;\n margin-top: -5px;\n border-width: 5px 0 5px 5px;\n border-left-color: #000000;\n}\n.tooltip.bottom .tooltip-arrow {\n top: 0;\n left: 50%;\n margin-left: -5px;\n border-width: 0 5px 5px;\n border-bottom-color: #000000;\n}\n.tooltip.bottom-left .tooltip-arrow {\n top: 0;\n right: 5px;\n margin-top: -5px;\n border-width: 0 5px 5px;\n border-bottom-color: #000000;\n}\n.tooltip.bottom-right .tooltip-arrow {\n top: 0;\n left: 5px;\n margin-top: -5px;\n border-width: 0 5px 5px;\n border-bottom-color: #000000;\n}\n.popover {\n position: absolute;\n top: 0;\n left: 0;\n z-index: 1060;\n display: none;\n max-width: 276px;\n padding: 1px;\n font-family: \"Helvetica Neue\", Helvetica, Arial, sans-serif;\n font-size: 14px;\n font-weight: normal;\n line-height: 1.42857143;\n text-align: left;\n background-color: #ffffff;\n background-clip: padding-box;\n border: 1px solid #cccccc;\n border: 1px solid rgba(0, 0, 0, 0.2);\n border-radius: 6px;\n -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);\n box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);\n white-space: normal;\n}\n.popover.top {\n margin-top: -10px;\n}\n.popover.right {\n margin-left: 10px;\n}\n.popover.bottom {\n margin-top: 10px;\n}\n.popover.left {\n margin-left: -10px;\n}\n.popover-title {\n margin: 0;\n padding: 8px 14px;\n font-size: 14px;\n background-color: #f7f7f7;\n border-bottom: 1px solid #ebebeb;\n border-radius: 5px 5px 0 0;\n}\n.popover-content {\n padding: 9px 14px;\n}\n.popover > .arrow,\n.popover > .arrow:after {\n position: absolute;\n display: block;\n width: 0;\n height: 0;\n border-color: transparent;\n border-style: solid;\n}\n.popover > .arrow {\n border-width: 11px;\n}\n.popover > .arrow:after {\n border-width: 10px;\n content: \"\";\n}\n.popover.top > .arrow {\n left: 50%;\n margin-left: -11px;\n border-bottom-width: 0;\n border-top-color: #999999;\n border-top-color: rgba(0, 0, 0, 0.25);\n bottom: -11px;\n}\n.popover.top > .arrow:after {\n content: \" \";\n bottom: 1px;\n margin-left: -10px;\n border-bottom-width: 0;\n border-top-color: #ffffff;\n}\n.popover.right > .arrow {\n top: 50%;\n left: -11px;\n margin-top: -11px;\n border-left-width: 0;\n border-right-color: #999999;\n border-right-color: rgba(0, 0, 0, 0.25);\n}\n.popover.right > .arrow:after {\n content: \" \";\n left: 1px;\n bottom: -10px;\n border-left-width: 0;\n border-right-color: #ffffff;\n}\n.popover.bottom > .arrow {\n left: 50%;\n margin-left: -11px;\n border-top-width: 0;\n border-bottom-color: #999999;\n border-bottom-color: rgba(0, 0, 0, 0.25);\n top: -11px;\n}\n.popover.bottom > .arrow:after {\n content: \" \";\n top: 1px;\n margin-left: -10px;\n border-top-width: 0;\n border-bottom-color: #ffffff;\n}\n.popover.left > .arrow {\n top: 50%;\n right: -11px;\n margin-top: -11px;\n border-right-width: 0;\n border-left-color: #999999;\n border-left-color: rgba(0, 0, 0, 0.25);\n}\n.popover.left > .arrow:after {\n content: \" \";\n right: 1px;\n border-right-width: 0;\n border-left-color: #ffffff;\n bottom: -10px;\n}\n.carousel {\n position: relative;\n}\n.carousel-inner {\n position: relative;\n overflow: hidden;\n width: 100%;\n}\n.carousel-inner > .item {\n display: none;\n position: relative;\n -webkit-transition: 0.6s ease-in-out left;\n -o-transition: 0.6s ease-in-out left;\n transition: 0.6s ease-in-out left;\n}\n.carousel-inner > .item > img,\n.carousel-inner > .item > a > img {\n line-height: 1;\n}\n@media all and (transform-3d), (-webkit-transform-3d) {\n .carousel-inner > .item {\n transition: transform 0.6s ease-in-out;\n backface-visibility: hidden;\n perspective: 1000;\n }\n .carousel-inner > .item.next,\n .carousel-inner > .item.active.right {\n transform: translate3d(100%, 0, 0);\n left: 0;\n }\n .carousel-inner > .item.prev,\n .carousel-inner > .item.active.left {\n transform: translate3d(-100%, 0, 0);\n left: 0;\n }\n .carousel-inner > .item.next.left,\n .carousel-inner > .item.prev.right,\n .carousel-inner > .item.active {\n transform: translate3d(0, 0, 0);\n left: 0;\n }\n}\n.carousel-inner > .active,\n.carousel-inner > .next,\n.carousel-inner > .prev {\n display: block;\n}\n.carousel-inner > .active {\n left: 0;\n}\n.carousel-inner > .next,\n.carousel-inner > .prev {\n position: absolute;\n top: 0;\n width: 100%;\n}\n.carousel-inner > .next {\n left: 100%;\n}\n.carousel-inner > .prev {\n left: -100%;\n}\n.carousel-inner > .next.left,\n.carousel-inner > .prev.right {\n left: 0;\n}\n.carousel-inner > .active.left {\n left: -100%;\n}\n.carousel-inner > .active.right {\n left: 100%;\n}\n.carousel-control {\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n width: 15%;\n opacity: 0.5;\n filter: alpha(opacity=50);\n font-size: 20px;\n color: #ffffff;\n text-align: center;\n text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);\n}\n.carousel-control.left {\n background-image: -webkit-linear-gradient(left, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.0001) 100%);\n background-image: -o-linear-gradient(left, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.0001) 100%);\n background-image: linear-gradient(to right, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.0001) 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1);\n}\n.carousel-control.right {\n left: auto;\n right: 0;\n background-image: -webkit-linear-gradient(left, rgba(0, 0, 0, 0.0001) 0%, rgba(0, 0, 0, 0.5) 100%);\n background-image: -o-linear-gradient(left, rgba(0, 0, 0, 0.0001) 0%, rgba(0, 0, 0, 0.5) 100%);\n background-image: linear-gradient(to right, rgba(0, 0, 0, 0.0001) 0%, rgba(0, 0, 0, 0.5) 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1);\n}\n.carousel-control:hover,\n.carousel-control:focus {\n outline: 0;\n color: #ffffff;\n text-decoration: none;\n opacity: 0.9;\n filter: alpha(opacity=90);\n}\n.carousel-control .icon-prev,\n.carousel-control .icon-next,\n.carousel-control .glyphicon-chevron-left,\n.carousel-control .glyphicon-chevron-right {\n position: absolute;\n top: 50%;\n z-index: 5;\n display: inline-block;\n}\n.carousel-control .icon-prev,\n.carousel-control .glyphicon-chevron-left {\n left: 50%;\n margin-left: -10px;\n}\n.carousel-control .icon-next,\n.carousel-control .glyphicon-chevron-right {\n right: 50%;\n margin-right: -10px;\n}\n.carousel-control .icon-prev,\n.carousel-control .icon-next {\n width: 20px;\n height: 20px;\n margin-top: -10px;\n font-family: serif;\n}\n.carousel-control .icon-prev:before {\n content: '\\2039';\n}\n.carousel-control .icon-next:before {\n content: '\\203a';\n}\n.carousel-indicators {\n position: absolute;\n bottom: 10px;\n left: 50%;\n z-index: 15;\n width: 60%;\n margin-left: -30%;\n padding-left: 0;\n list-style: none;\n text-align: center;\n}\n.carousel-indicators li {\n display: inline-block;\n width: 10px;\n height: 10px;\n margin: 1px;\n text-indent: -999px;\n border: 1px solid #ffffff;\n border-radius: 10px;\n cursor: pointer;\n background-color: #000 \\9;\n background-color: rgba(0, 0, 0, 0);\n}\n.carousel-indicators .active {\n margin: 0;\n width: 12px;\n height: 12px;\n background-color: #ffffff;\n}\n.carousel-caption {\n position: absolute;\n left: 15%;\n right: 15%;\n bottom: 20px;\n z-index: 10;\n padding-top: 20px;\n padding-bottom: 20px;\n color: #ffffff;\n text-align: center;\n text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);\n}\n.carousel-caption .btn {\n text-shadow: none;\n}\n@media screen and (min-width: 768px) {\n .carousel-control .glyphicon-chevron-left,\n .carousel-control .glyphicon-chevron-right,\n .carousel-control .icon-prev,\n .carousel-control .icon-next {\n width: 30px;\n height: 30px;\n margin-top: -15px;\n font-size: 30px;\n }\n .carousel-control .glyphicon-chevron-left,\n .carousel-control .icon-prev {\n margin-left: -15px;\n }\n .carousel-control .glyphicon-chevron-right,\n .carousel-control .icon-next {\n margin-right: -15px;\n }\n .carousel-caption {\n left: 20%;\n right: 20%;\n padding-bottom: 30px;\n }\n .carousel-indicators {\n bottom: 20px;\n }\n}\n.clearfix:before,\n.clearfix:after,\n.dl-horizontal dd:before,\n.dl-horizontal dd:after,\n.container:before,\n.container:after,\n.container-fluid:before,\n.container-fluid:after,\n.row:before,\n.row:after,\n.form-horizontal .form-group:before,\n.form-horizontal .form-group:after,\n.btn-toolbar:before,\n.btn-toolbar:after,\n.btn-group-vertical > .btn-group:before,\n.btn-group-vertical > .btn-group:after,\n.nav:before,\n.nav:after,\n.navbar:before,\n.navbar:after,\n.navbar-header:before,\n.navbar-header:after,\n.navbar-collapse:before,\n.navbar-collapse:after,\n.pager:before,\n.pager:after,\n.panel-body:before,\n.panel-body:after,\n.modal-footer:before,\n.modal-footer:after {\n content: \" \";\n display: table;\n}\n.clearfix:after,\n.dl-horizontal dd:after,\n.container:after,\n.container-fluid:after,\n.row:after,\n.form-horizontal .form-group:after,\n.btn-toolbar:after,\n.btn-group-vertical > .btn-group:after,\n.nav:after,\n.navbar:after,\n.navbar-header:after,\n.navbar-collapse:after,\n.pager:after,\n.panel-body:after,\n.modal-footer:after {\n clear: both;\n}\n.center-block {\n display: block;\n margin-left: auto;\n margin-right: auto;\n}\n.pull-right {\n float: right !important;\n}\n.pull-left {\n float: left !important;\n}\n.hide {\n display: none !important;\n}\n.show {\n display: block !important;\n}\n.invisible {\n visibility: hidden;\n}\n.text-hide {\n font: 0/0 a;\n color: transparent;\n text-shadow: none;\n background-color: transparent;\n border: 0;\n}\n.hidden {\n display: none !important;\n visibility: hidden !important;\n}\n.affix {\n position: fixed;\n}\n@-ms-viewport {\n width: device-width;\n}\n.visible-xs,\n.visible-sm,\n.visible-md,\n.visible-lg {\n display: none !important;\n}\n.visible-xs-block,\n.visible-xs-inline,\n.visible-xs-inline-block,\n.visible-sm-block,\n.visible-sm-inline,\n.visible-sm-inline-block,\n.visible-md-block,\n.visible-md-inline,\n.visible-md-inline-block,\n.visible-lg-block,\n.visible-lg-inline,\n.visible-lg-inline-block {\n display: none !important;\n}\n@media (max-width: 767px) {\n .visible-xs {\n display: block !important;\n }\n table.visible-xs {\n display: table;\n }\n tr.visible-xs {\n display: table-row !important;\n }\n th.visible-xs,\n td.visible-xs {\n display: table-cell !important;\n }\n}\n@media (max-width: 767px) {\n .visible-xs-block {\n display: block !important;\n }\n}\n@media (max-width: 767px) {\n .visible-xs-inline {\n display: inline !important;\n }\n}\n@media (max-width: 767px) {\n .visible-xs-inline-block {\n display: inline-block !important;\n }\n}\n@media (min-width: 768px) and (max-width: 991px) {\n .visible-sm {\n display: block !important;\n }\n table.visible-sm {\n display: table;\n }\n tr.visible-sm {\n display: table-row !important;\n }\n th.visible-sm,\n td.visible-sm {\n display: table-cell !important;\n }\n}\n@media (min-width: 768px) and (max-width: 991px) {\n .visible-sm-block {\n display: block !important;\n }\n}\n@media (min-width: 768px) and (max-width: 991px) {\n .visible-sm-inline {\n display: inline !important;\n }\n}\n@media (min-width: 768px) and (max-width: 991px) {\n .visible-sm-inline-block {\n display: inline-block !important;\n }\n}\n@media (min-width: 992px) and (max-width: 1199px) {\n .visible-md {\n display: block !important;\n }\n table.visible-md {\n display: table;\n }\n tr.visible-md {\n display: table-row !important;\n }\n th.visible-md,\n td.visible-md {\n display: table-cell !important;\n }\n}\n@media (min-width: 992px) and (max-width: 1199px) {\n .visible-md-block {\n display: block !important;\n }\n}\n@media (min-width: 992px) and (max-width: 1199px) {\n .visible-md-inline {\n display: inline !important;\n }\n}\n@media (min-width: 992px) and (max-width: 1199px) {\n .visible-md-inline-block {\n display: inline-block !important;\n }\n}\n@media (min-width: 1200px) {\n .visible-lg {\n display: block !important;\n }\n table.visible-lg {\n display: table;\n }\n tr.visible-lg {\n display: table-row !important;\n }\n th.visible-lg,\n td.visible-lg {\n display: table-cell !important;\n }\n}\n@media (min-width: 1200px) {\n .visible-lg-block {\n display: block !important;\n }\n}\n@media (min-width: 1200px) {\n .visible-lg-inline {\n display: inline !important;\n }\n}\n@media (min-width: 1200px) {\n .visible-lg-inline-block {\n display: inline-block !important;\n }\n}\n@media (max-width: 767px) {\n .hidden-xs {\n display: none !important;\n }\n}\n@media (min-width: 768px) and (max-width: 991px) {\n .hidden-sm {\n display: none !important;\n }\n}\n@media (min-width: 992px) and (max-width: 1199px) {\n .hidden-md {\n display: none !important;\n }\n}\n@media (min-width: 1200px) {\n .hidden-lg {\n display: none !important;\n }\n}\n.visible-print {\n display: none !important;\n}\n@media print {\n .visible-print {\n display: block !important;\n }\n table.visible-print {\n display: table;\n }\n tr.visible-print {\n display: table-row !important;\n }\n th.visible-print,\n td.visible-print {\n display: table-cell !important;\n }\n}\n.visible-print-block {\n display: none !important;\n}\n@media print {\n .visible-print-block {\n display: block !important;\n }\n}\n.visible-print-inline {\n display: none !important;\n}\n@media print {\n .visible-print-inline {\n display: inline !important;\n }\n}\n.visible-print-inline-block {\n display: none !important;\n}\n@media print {\n .visible-print-inline-block {\n display: inline-block !important;\n }\n}\n@media print {\n .hidden-print {\n display: none !important;\n }\n}\n/*# sourceMappingURL=bootstrap.css.map */","/*! normalize.css v3.0.2 | MIT License | git.io/normalize */\n\n//\n// 1. Set default font family to sans-serif.\n// 2. Prevent iOS text size adjust after orientation change, without disabling\n// user zoom.\n//\n\nhtml {\n font-family: sans-serif; // 1\n -ms-text-size-adjust: 100%; // 2\n -webkit-text-size-adjust: 100%; // 2\n}\n\n//\n// Remove default margin.\n//\n\nbody {\n margin: 0;\n}\n\n// HTML5 display definitions\n// ==========================================================================\n\n//\n// Correct `block` display not defined for any HTML5 element in IE 8/9.\n// Correct `block` display not defined for `details` or `summary` in IE 10/11\n// and Firefox.\n// Correct `block` display not defined for `main` in IE 11.\n//\n\narticle,\naside,\ndetails,\nfigcaption,\nfigure,\nfooter,\nheader,\nhgroup,\nmain,\nmenu,\nnav,\nsection,\nsummary {\n display: block;\n}\n\n//\n// 1. Correct `inline-block` display not defined in IE 8/9.\n// 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera.\n//\n\naudio,\ncanvas,\nprogress,\nvideo {\n display: inline-block; // 1\n vertical-align: baseline; // 2\n}\n\n//\n// Prevent modern browsers from displaying `audio` without controls.\n// Remove excess height in iOS 5 devices.\n//\n\naudio:not([controls]) {\n display: none;\n height: 0;\n}\n\n//\n// Address `[hidden]` styling not present in IE 8/9/10.\n// Hide the `template` element in IE 8/9/11, Safari, and Firefox < 22.\n//\n\n[hidden],\ntemplate {\n display: none;\n}\n\n// Links\n// ==========================================================================\n\n//\n// Remove the gray background color from active links in IE 10.\n//\n\na {\n background-color: transparent;\n}\n\n//\n// Improve readability when focused and also mouse hovered in all browsers.\n//\n\na:active,\na:hover {\n outline: 0;\n}\n\n// Text-level semantics\n// ==========================================================================\n\n//\n// Address styling not present in IE 8/9/10/11, Safari, and Chrome.\n//\n\nabbr[title] {\n border-bottom: 1px dotted;\n}\n\n//\n// Address style set to `bolder` in Firefox 4+, Safari, and Chrome.\n//\n\nb,\nstrong {\n font-weight: bold;\n}\n\n//\n// Address styling not present in Safari and Chrome.\n//\n\ndfn {\n font-style: italic;\n}\n\n//\n// Address variable `h1` font-size and margin within `section` and `article`\n// contexts in Firefox 4+, Safari, and Chrome.\n//\n\nh1 {\n font-size: 2em;\n margin: 0.67em 0;\n}\n\n//\n// Address styling not present in IE 8/9.\n//\n\nmark {\n background: #ff0;\n color: #000;\n}\n\n//\n// Address inconsistent and variable font size in all browsers.\n//\n\nsmall {\n font-size: 80%;\n}\n\n//\n// Prevent `sub` and `sup` affecting `line-height` in all browsers.\n//\n\nsub,\nsup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n}\n\nsup {\n top: -0.5em;\n}\n\nsub {\n bottom: -0.25em;\n}\n\n// Embedded content\n// ==========================================================================\n\n//\n// Remove border when inside `a` element in IE 8/9/10.\n//\n\nimg {\n border: 0;\n}\n\n//\n// Correct overflow not hidden in IE 9/10/11.\n//\n\nsvg:not(:root) {\n overflow: hidden;\n}\n\n// Grouping content\n// ==========================================================================\n\n//\n// Address margin not present in IE 8/9 and Safari.\n//\n\nfigure {\n margin: 1em 40px;\n}\n\n//\n// Address differences between Firefox and other browsers.\n//\n\nhr {\n -moz-box-sizing: content-box;\n box-sizing: content-box;\n height: 0;\n}\n\n//\n// Contain overflow in all browsers.\n//\n\npre {\n overflow: auto;\n}\n\n//\n// Address odd `em`-unit font size rendering in all browsers.\n//\n\ncode,\nkbd,\npre,\nsamp {\n font-family: monospace, monospace;\n font-size: 1em;\n}\n\n// Forms\n// ==========================================================================\n\n//\n// Known limitation: by default, Chrome and Safari on OS X allow very limited\n// styling of `select`, unless a `border` property is set.\n//\n\n//\n// 1. Correct color not being inherited.\n// Known issue: affects color of disabled elements.\n// 2. Correct font properties not being inherited.\n// 3. Address margins set differently in Firefox 4+, Safari, and Chrome.\n//\n\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n color: inherit; // 1\n font: inherit; // 2\n margin: 0; // 3\n}\n\n//\n// Address `overflow` set to `hidden` in IE 8/9/10/11.\n//\n\nbutton {\n overflow: visible;\n}\n\n//\n// Address inconsistent `text-transform` inheritance for `button` and `select`.\n// All other form control elements do not inherit `text-transform` values.\n// Correct `button` style inheritance in Firefox, IE 8/9/10/11, and Opera.\n// Correct `select` style inheritance in Firefox.\n//\n\nbutton,\nselect {\n text-transform: none;\n}\n\n//\n// 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`\n// and `video` controls.\n// 2. Correct inability to style clickable `input` types in iOS.\n// 3. Improve usability and consistency of cursor style between image-type\n// `input` and others.\n//\n\nbutton,\nhtml input[type=\"button\"], // 1\ninput[type=\"reset\"],\ninput[type=\"submit\"] {\n -webkit-appearance: button; // 2\n cursor: pointer; // 3\n}\n\n//\n// Re-set default cursor for disabled elements.\n//\n\nbutton[disabled],\nhtml input[disabled] {\n cursor: default;\n}\n\n//\n// Remove inner padding and border in Firefox 4+.\n//\n\nbutton::-moz-focus-inner,\ninput::-moz-focus-inner {\n border: 0;\n padding: 0;\n}\n\n//\n// Address Firefox 4+ setting `line-height` on `input` using `!important` in\n// the UA stylesheet.\n//\n\ninput {\n line-height: normal;\n}\n\n//\n// It's recommended that you don't attempt to style these elements.\n// Firefox's implementation doesn't respect box-sizing, padding, or width.\n//\n// 1. Address box sizing set to `content-box` in IE 8/9/10.\n// 2. Remove excess padding in IE 8/9/10.\n//\n\ninput[type=\"checkbox\"],\ninput[type=\"radio\"] {\n box-sizing: border-box; // 1\n padding: 0; // 2\n}\n\n//\n// Fix the cursor style for Chrome's increment/decrement buttons. For certain\n// `font-size` values of the `input`, it causes the cursor style of the\n// decrement button to change from `default` to `text`.\n//\n\ninput[type=\"number\"]::-webkit-inner-spin-button,\ninput[type=\"number\"]::-webkit-outer-spin-button {\n height: auto;\n}\n\n//\n// 1. Address `appearance` set to `searchfield` in Safari and Chrome.\n// 2. Address `box-sizing` set to `border-box` in Safari and Chrome\n// (include `-moz` to future-proof).\n//\n\ninput[type=\"search\"] {\n -webkit-appearance: textfield; // 1\n -moz-box-sizing: content-box;\n -webkit-box-sizing: content-box; // 2\n box-sizing: content-box;\n}\n\n//\n// Remove inner padding and search cancel button in Safari and Chrome on OS X.\n// Safari (but not Chrome) clips the cancel button when the search input has\n// padding (and `textfield` appearance).\n//\n\ninput[type=\"search\"]::-webkit-search-cancel-button,\ninput[type=\"search\"]::-webkit-search-decoration {\n -webkit-appearance: none;\n}\n\n//\n// Define consistent border, margin, and padding.\n//\n\nfieldset {\n border: 1px solid #c0c0c0;\n margin: 0 2px;\n padding: 0.35em 0.625em 0.75em;\n}\n\n//\n// 1. Correct `color` not being inherited in IE 8/9/10/11.\n// 2. Remove padding so people aren't caught out if they zero out fieldsets.\n//\n\nlegend {\n border: 0; // 1\n padding: 0; // 2\n}\n\n//\n// Remove default vertical scrollbar in IE 8/9/10/11.\n//\n\ntextarea {\n overflow: auto;\n}\n\n//\n// Don't inherit the `font-weight` (applied by a rule above).\n// NOTE: the default cannot safely be changed in Chrome and Safari on OS X.\n//\n\noptgroup {\n font-weight: bold;\n}\n\n// Tables\n// ==========================================================================\n\n//\n// Remove most spacing between table cells.\n//\n\ntable {\n border-collapse: collapse;\n border-spacing: 0;\n}\n\ntd,\nth {\n padding: 0;\n}\n","/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */\n\n// ==========================================================================\n// Print styles.\n// Inlined to avoid the additional HTTP request: h5bp.com/r\n// ==========================================================================\n\n@media print {\n *,\n *:before,\n *:after {\n background: transparent !important;\n color: #000 !important; // Black prints faster: h5bp.com/s\n box-shadow: none !important;\n text-shadow: none !important;\n }\n\n a,\n a:visited {\n text-decoration: underline;\n }\n\n a[href]:after {\n content: \" (\" attr(href) \")\";\n }\n\n abbr[title]:after {\n content: \" (\" attr(title) \")\";\n }\n\n // Don't show links that are fragment identifiers,\n // or use the `javascript:` pseudo protocol\n a[href^=\"#\"]:after,\n a[href^=\"javascript:\"]:after {\n content: \"\";\n }\n\n pre,\n blockquote {\n border: 1px solid #999;\n page-break-inside: avoid;\n }\n\n thead {\n display: table-header-group; // h5bp.com/t\n }\n\n tr,\n img {\n page-break-inside: avoid;\n }\n\n img {\n max-width: 100% !important;\n }\n\n p,\n h2,\n h3 {\n orphans: 3;\n widows: 3;\n }\n\n h2,\n h3 {\n page-break-after: avoid;\n }\n\n // Bootstrap specific changes start\n //\n // Chrome (OSX) fix for https://github.com/twbs/bootstrap/issues/11245\n // Once fixed, we can just straight up remove this.\n select {\n background: #fff !important;\n }\n\n // Bootstrap components\n .navbar {\n display: none;\n }\n .btn,\n .dropup > .btn {\n > .caret {\n border-top-color: #000 !important;\n }\n }\n .label {\n border: 1px solid #000;\n }\n\n .table {\n border-collapse: collapse !important;\n\n td,\n th {\n background-color: #fff !important;\n }\n }\n .table-bordered {\n th,\n td {\n border: 1px solid #ddd !important;\n }\n }\n\n // Bootstrap specific changes end\n}\n","//\n// Glyphicons for Bootstrap\n//\n// Since icons are fonts, they can be placed anywhere text is placed and are\n// thus automatically sized to match the surrounding child. To use, create an\n// inline element with the appropriate classes, like so:\n//\n// Star\n\n// Import the fonts\n@font-face {\n font-family: 'Glyphicons Halflings';\n src: url('@{icon-font-path}@{icon-font-name}.eot');\n src: url('@{icon-font-path}@{icon-font-name}.eot?#iefix') format('embedded-opentype'),\n url('@{icon-font-path}@{icon-font-name}.woff') format('woff'),\n url('@{icon-font-path}@{icon-font-name}.ttf') format('truetype'),\n url('@{icon-font-path}@{icon-font-name}.svg#@{icon-font-svg-id}') format('svg');\n}\n\n// Catchall baseclass\n.glyphicon {\n position: relative;\n top: 1px;\n display: inline-block;\n font-family: 'Glyphicons Halflings';\n font-style: normal;\n font-weight: normal;\n line-height: 1;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\n// Individual icons\n.glyphicon-asterisk { &:before { content: \"\\2a\"; } }\n.glyphicon-plus { &:before { content: \"\\2b\"; } }\n.glyphicon-euro,\n.glyphicon-eur { &:before { content: \"\\20ac\"; } }\n.glyphicon-minus { &:before { content: \"\\2212\"; } }\n.glyphicon-cloud { &:before { content: \"\\2601\"; } }\n.glyphicon-envelope { &:before { content: \"\\2709\"; } }\n.glyphicon-pencil { &:before { content: \"\\270f\"; } }\n.glyphicon-glass { &:before { content: \"\\e001\"; } }\n.glyphicon-music { &:before { content: \"\\e002\"; } }\n.glyphicon-search { &:before { content: \"\\e003\"; } }\n.glyphicon-heart { &:before { content: \"\\e005\"; } }\n.glyphicon-star { &:before { content: \"\\e006\"; } }\n.glyphicon-star-empty { &:before { content: \"\\e007\"; } }\n.glyphicon-user { &:before { content: \"\\e008\"; } }\n.glyphicon-film { &:before { content: \"\\e009\"; } }\n.glyphicon-th-large { &:before { content: \"\\e010\"; } }\n.glyphicon-th { &:before { content: \"\\e011\"; } }\n.glyphicon-th-list { &:before { content: \"\\e012\"; } }\n.glyphicon-ok { &:before { content: \"\\e013\"; } }\n.glyphicon-remove { &:before { content: \"\\e014\"; } }\n.glyphicon-zoom-in { &:before { content: \"\\e015\"; } }\n.glyphicon-zoom-out { &:before { content: \"\\e016\"; } }\n.glyphicon-off { &:before { content: \"\\e017\"; } }\n.glyphicon-signal { &:before { content: \"\\e018\"; } }\n.glyphicon-cog { &:before { content: \"\\e019\"; } }\n.glyphicon-trash { &:before { content: \"\\e020\"; } }\n.glyphicon-home { &:before { content: \"\\e021\"; } }\n.glyphicon-file { &:before { content: \"\\e022\"; } }\n.glyphicon-time { &:before { content: \"\\e023\"; } }\n.glyphicon-road { &:before { content: \"\\e024\"; } }\n.glyphicon-download-alt { &:before { content: \"\\e025\"; } }\n.glyphicon-download { &:before { content: \"\\e026\"; } }\n.glyphicon-upload { &:before { content: \"\\e027\"; } }\n.glyphicon-inbox { &:before { content: \"\\e028\"; } }\n.glyphicon-play-circle { &:before { content: \"\\e029\"; } }\n.glyphicon-repeat { &:before { content: \"\\e030\"; } }\n.glyphicon-refresh { &:before { content: \"\\e031\"; } }\n.glyphicon-list-alt { &:before { content: \"\\e032\"; } }\n.glyphicon-lock { &:before { content: \"\\e033\"; } }\n.glyphicon-flag { &:before { content: \"\\e034\"; } }\n.glyphicon-headphones { &:before { content: \"\\e035\"; } }\n.glyphicon-volume-off { &:before { content: \"\\e036\"; } }\n.glyphicon-volume-down { &:before { content: \"\\e037\"; } }\n.glyphicon-volume-up { &:before { content: \"\\e038\"; } }\n.glyphicon-qrcode { &:before { content: \"\\e039\"; } }\n.glyphicon-barcode { &:before { content: \"\\e040\"; } }\n.glyphicon-tag { &:before { content: \"\\e041\"; } }\n.glyphicon-tags { &:before { content: \"\\e042\"; } }\n.glyphicon-book { &:before { content: \"\\e043\"; } }\n.glyphicon-bookmark { &:before { content: \"\\e044\"; } }\n.glyphicon-print { &:before { content: \"\\e045\"; } }\n.glyphicon-camera { &:before { content: \"\\e046\"; } }\n.glyphicon-font { &:before { content: \"\\e047\"; } }\n.glyphicon-bold { &:before { content: \"\\e048\"; } }\n.glyphicon-italic { &:before { content: \"\\e049\"; } }\n.glyphicon-text-height { &:before { content: \"\\e050\"; } }\n.glyphicon-text-width { &:before { content: \"\\e051\"; } }\n.glyphicon-align-left { &:before { content: \"\\e052\"; } }\n.glyphicon-align-center { &:before { content: \"\\e053\"; } }\n.glyphicon-align-right { &:before { content: \"\\e054\"; } }\n.glyphicon-align-justify { &:before { content: \"\\e055\"; } }\n.glyphicon-list { &:before { content: \"\\e056\"; } }\n.glyphicon-indent-left { &:before { content: \"\\e057\"; } }\n.glyphicon-indent-right { &:before { content: \"\\e058\"; } }\n.glyphicon-facetime-video { &:before { content: \"\\e059\"; } }\n.glyphicon-picture { &:before { content: \"\\e060\"; } }\n.glyphicon-map-marker { &:before { content: \"\\e062\"; } }\n.glyphicon-adjust { &:before { content: \"\\e063\"; } }\n.glyphicon-tint { &:before { content: \"\\e064\"; } }\n.glyphicon-edit { &:before { content: \"\\e065\"; } }\n.glyphicon-share { &:before { content: \"\\e066\"; } }\n.glyphicon-check { &:before { content: \"\\e067\"; } }\n.glyphicon-move { &:before { content: \"\\e068\"; } }\n.glyphicon-step-backward { &:before { content: \"\\e069\"; } }\n.glyphicon-fast-backward { &:before { content: \"\\e070\"; } }\n.glyphicon-backward { &:before { content: \"\\e071\"; } }\n.glyphicon-play { &:before { content: \"\\e072\"; } }\n.glyphicon-pause { &:before { content: \"\\e073\"; } }\n.glyphicon-stop { &:before { content: \"\\e074\"; } }\n.glyphicon-forward { &:before { content: \"\\e075\"; } }\n.glyphicon-fast-forward { &:before { content: \"\\e076\"; } }\n.glyphicon-step-forward { &:before { content: \"\\e077\"; } }\n.glyphicon-eject { &:before { content: \"\\e078\"; } }\n.glyphicon-chevron-left { &:before { content: \"\\e079\"; } }\n.glyphicon-chevron-right { &:before { content: \"\\e080\"; } }\n.glyphicon-plus-sign { &:before { content: \"\\e081\"; } }\n.glyphicon-minus-sign { &:before { content: \"\\e082\"; } }\n.glyphicon-remove-sign { &:before { content: \"\\e083\"; } }\n.glyphicon-ok-sign { &:before { content: \"\\e084\"; } }\n.glyphicon-question-sign { &:before { content: \"\\e085\"; } }\n.glyphicon-info-sign { &:before { content: \"\\e086\"; } }\n.glyphicon-screenshot { &:before { content: \"\\e087\"; } }\n.glyphicon-remove-circle { &:before { content: \"\\e088\"; } }\n.glyphicon-ok-circle { &:before { content: \"\\e089\"; } }\n.glyphicon-ban-circle { &:before { content: \"\\e090\"; } }\n.glyphicon-arrow-left { &:before { content: \"\\e091\"; } }\n.glyphicon-arrow-right { &:before { content: \"\\e092\"; } }\n.glyphicon-arrow-up { &:before { content: \"\\e093\"; } }\n.glyphicon-arrow-down { &:before { content: \"\\e094\"; } }\n.glyphicon-share-alt { &:before { content: \"\\e095\"; } }\n.glyphicon-resize-full { &:before { content: \"\\e096\"; } }\n.glyphicon-resize-small { &:before { content: \"\\e097\"; } }\n.glyphicon-exclamation-sign { &:before { content: \"\\e101\"; } }\n.glyphicon-gift { &:before { content: \"\\e102\"; } }\n.glyphicon-leaf { &:before { content: \"\\e103\"; } }\n.glyphicon-fire { &:before { content: \"\\e104\"; } }\n.glyphicon-eye-open { &:before { content: \"\\e105\"; } }\n.glyphicon-eye-close { &:before { content: \"\\e106\"; } }\n.glyphicon-warning-sign { &:before { content: \"\\e107\"; } }\n.glyphicon-plane { &:before { content: \"\\e108\"; } }\n.glyphicon-calendar { &:before { content: \"\\e109\"; } }\n.glyphicon-random { &:before { content: \"\\e110\"; } }\n.glyphicon-comment { &:before { content: \"\\e111\"; } }\n.glyphicon-magnet { &:before { content: \"\\e112\"; } }\n.glyphicon-chevron-up { &:before { content: \"\\e113\"; } }\n.glyphicon-chevron-down { &:before { content: \"\\e114\"; } }\n.glyphicon-retweet { &:before { content: \"\\e115\"; } }\n.glyphicon-shopping-cart { &:before { content: \"\\e116\"; } }\n.glyphicon-folder-close { &:before { content: \"\\e117\"; } }\n.glyphicon-folder-open { &:before { content: \"\\e118\"; } }\n.glyphicon-resize-vertical { &:before { content: \"\\e119\"; } }\n.glyphicon-resize-horizontal { &:before { content: \"\\e120\"; } }\n.glyphicon-hdd { &:before { content: \"\\e121\"; } }\n.glyphicon-bullhorn { &:before { content: \"\\e122\"; } }\n.glyphicon-bell { &:before { content: \"\\e123\"; } }\n.glyphicon-certificate { &:before { content: \"\\e124\"; } }\n.glyphicon-thumbs-up { &:before { content: \"\\e125\"; } }\n.glyphicon-thumbs-down { &:before { content: \"\\e126\"; } }\n.glyphicon-hand-right { &:before { content: \"\\e127\"; } }\n.glyphicon-hand-left { &:before { content: \"\\e128\"; } }\n.glyphicon-hand-up { &:before { content: \"\\e129\"; } }\n.glyphicon-hand-down { &:before { content: \"\\e130\"; } }\n.glyphicon-circle-arrow-right { &:before { content: \"\\e131\"; } }\n.glyphicon-circle-arrow-left { &:before { content: \"\\e132\"; } }\n.glyphicon-circle-arrow-up { &:before { content: \"\\e133\"; } }\n.glyphicon-circle-arrow-down { &:before { content: \"\\e134\"; } }\n.glyphicon-globe { &:before { content: \"\\e135\"; } }\n.glyphicon-wrench { &:before { content: \"\\e136\"; } }\n.glyphicon-tasks { &:before { content: \"\\e137\"; } }\n.glyphicon-filter { &:before { content: \"\\e138\"; } }\n.glyphicon-briefcase { &:before { content: \"\\e139\"; } }\n.glyphicon-fullscreen { &:before { content: \"\\e140\"; } }\n.glyphicon-dashboard { &:before { content: \"\\e141\"; } }\n.glyphicon-paperclip { &:before { content: \"\\e142\"; } }\n.glyphicon-heart-empty { &:before { content: \"\\e143\"; } }\n.glyphicon-link { &:before { content: \"\\e144\"; } }\n.glyphicon-phone { &:before { content: \"\\e145\"; } }\n.glyphicon-pushpin { &:before { content: \"\\e146\"; } }\n.glyphicon-usd { &:before { content: \"\\e148\"; } }\n.glyphicon-gbp { &:before { content: \"\\e149\"; } }\n.glyphicon-sort { &:before { content: \"\\e150\"; } }\n.glyphicon-sort-by-alphabet { &:before { content: \"\\e151\"; } }\n.glyphicon-sort-by-alphabet-alt { &:before { content: \"\\e152\"; } }\n.glyphicon-sort-by-order { &:before { content: \"\\e153\"; } }\n.glyphicon-sort-by-order-alt { &:before { content: \"\\e154\"; } }\n.glyphicon-sort-by-attributes { &:before { content: \"\\e155\"; } }\n.glyphicon-sort-by-attributes-alt { &:before { content: \"\\e156\"; } }\n.glyphicon-unchecked { &:before { content: \"\\e157\"; } }\n.glyphicon-expand { &:before { content: \"\\e158\"; } }\n.glyphicon-collapse-down { &:before { content: \"\\e159\"; } }\n.glyphicon-collapse-up { &:before { content: \"\\e160\"; } }\n.glyphicon-log-in { &:before { content: \"\\e161\"; } }\n.glyphicon-flash { &:before { content: \"\\e162\"; } }\n.glyphicon-log-out { &:before { content: \"\\e163\"; } }\n.glyphicon-new-window { &:before { content: \"\\e164\"; } }\n.glyphicon-record { &:before { content: \"\\e165\"; } }\n.glyphicon-save { &:before { content: \"\\e166\"; } }\n.glyphicon-open { &:before { content: \"\\e167\"; } }\n.glyphicon-saved { &:before { content: \"\\e168\"; } }\n.glyphicon-import { &:before { content: \"\\e169\"; } }\n.glyphicon-export { &:before { content: \"\\e170\"; } }\n.glyphicon-send { &:before { content: \"\\e171\"; } }\n.glyphicon-floppy-disk { &:before { content: \"\\e172\"; } }\n.glyphicon-floppy-saved { &:before { content: \"\\e173\"; } }\n.glyphicon-floppy-remove { &:before { content: \"\\e174\"; } }\n.glyphicon-floppy-save { &:before { content: \"\\e175\"; } }\n.glyphicon-floppy-open { &:before { content: \"\\e176\"; } }\n.glyphicon-credit-card { &:before { content: \"\\e177\"; } }\n.glyphicon-transfer { &:before { content: \"\\e178\"; } }\n.glyphicon-cutlery { &:before { content: \"\\e179\"; } }\n.glyphicon-header { &:before { content: \"\\e180\"; } }\n.glyphicon-compressed { &:before { content: \"\\e181\"; } }\n.glyphicon-earphone { &:before { content: \"\\e182\"; } }\n.glyphicon-phone-alt { &:before { content: \"\\e183\"; } }\n.glyphicon-tower { &:before { content: \"\\e184\"; } }\n.glyphicon-stats { &:before { content: \"\\e185\"; } }\n.glyphicon-sd-video { &:before { content: \"\\e186\"; } }\n.glyphicon-hd-video { &:before { content: \"\\e187\"; } }\n.glyphicon-subtitles { &:before { content: \"\\e188\"; } }\n.glyphicon-sound-stereo { &:before { content: \"\\e189\"; } }\n.glyphicon-sound-dolby { &:before { content: \"\\e190\"; } }\n.glyphicon-sound-5-1 { &:before { content: \"\\e191\"; } }\n.glyphicon-sound-6-1 { &:before { content: \"\\e192\"; } }\n.glyphicon-sound-7-1 { &:before { content: \"\\e193\"; } }\n.glyphicon-copyright-mark { &:before { content: \"\\e194\"; } }\n.glyphicon-registration-mark { &:before { content: \"\\e195\"; } }\n.glyphicon-cloud-download { &:before { content: \"\\e197\"; } }\n.glyphicon-cloud-upload { &:before { content: \"\\e198\"; } }\n.glyphicon-tree-conifer { &:before { content: \"\\e199\"; } }\n.glyphicon-tree-deciduous { &:before { content: \"\\e200\"; } }\n","//\n// Scaffolding\n// --------------------------------------------------\n\n\n// Reset the box-sizing\n//\n// Heads up! This reset may cause conflicts with some third-party widgets.\n// For recommendations on resolving such conflicts, see\n// http://getbootstrap.com/getting-started/#third-box-sizing\n* {\n .box-sizing(border-box);\n}\n*:before,\n*:after {\n .box-sizing(border-box);\n}\n\n\n// Body reset\n\nhtml {\n font-size: 10px;\n -webkit-tap-highlight-color: rgba(0,0,0,0);\n}\n\nbody {\n font-family: @font-family-base;\n font-size: @font-size-base;\n line-height: @line-height-base;\n color: @text-color;\n background-color: @body-bg;\n}\n\n// Reset fonts for relevant elements\ninput,\nbutton,\nselect,\ntextarea {\n font-family: inherit;\n font-size: inherit;\n line-height: inherit;\n}\n\n\n// Links\n\na {\n color: @link-color;\n text-decoration: none;\n\n &:hover,\n &:focus {\n color: @link-hover-color;\n text-decoration: @link-hover-decoration;\n }\n\n &:focus {\n .tab-focus();\n }\n}\n\n\n// Figures\n//\n// We reset this here because previously Normalize had no `figure` margins. This\n// ensures we don't break anyone's use of the element.\n\nfigure {\n margin: 0;\n}\n\n\n// Images\n\nimg {\n vertical-align: middle;\n}\n\n// Responsive images (ensure images don't scale beyond their parents)\n.img-responsive {\n .img-responsive();\n}\n\n// Rounded corners\n.img-rounded {\n border-radius: @border-radius-large;\n}\n\n// Image thumbnails\n//\n// Heads up! This is mixin-ed into thumbnails.less for `.thumbnail`.\n.img-thumbnail {\n padding: @thumbnail-padding;\n line-height: @line-height-base;\n background-color: @thumbnail-bg;\n border: 1px solid @thumbnail-border;\n border-radius: @thumbnail-border-radius;\n .transition(all .2s ease-in-out);\n\n // Keep them at most 100% wide\n .img-responsive(inline-block);\n}\n\n// Perfect circle\n.img-circle {\n border-radius: 50%; // set radius in percents\n}\n\n\n// Horizontal rules\n\nhr {\n margin-top: @line-height-computed;\n margin-bottom: @line-height-computed;\n border: 0;\n border-top: 1px solid @hr-border;\n}\n\n\n// Only display content to screen readers\n//\n// See: http://a11yproject.com/posts/how-to-hide-content/\n\n.sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n margin: -1px;\n padding: 0;\n overflow: hidden;\n clip: rect(0,0,0,0);\n border: 0;\n}\n\n// Use in conjunction with .sr-only to only display content when it's focused.\n// Useful for \"Skip to main content\" links; see http://www.w3.org/TR/2013/NOTE-WCAG20-TECHS-20130905/G1\n// Credit: HTML5 Boilerplate\n\n.sr-only-focusable {\n &:active,\n &:focus {\n position: static;\n width: auto;\n height: auto;\n margin: 0;\n overflow: visible;\n clip: auto;\n }\n}\n","// Vendor Prefixes\n//\n// All vendor mixins are deprecated as of v3.2.0 due to the introduction of\n// Autoprefixer in our Gruntfile. They will be removed in v4.\n\n// - Animations\n// - Backface visibility\n// - Box shadow\n// - Box sizing\n// - Content columns\n// - Hyphens\n// - Placeholder text\n// - Transformations\n// - Transitions\n// - User Select\n\n\n// Animations\n.animation(@animation) {\n -webkit-animation: @animation;\n -o-animation: @animation;\n animation: @animation;\n}\n.animation-name(@name) {\n -webkit-animation-name: @name;\n animation-name: @name;\n}\n.animation-duration(@duration) {\n -webkit-animation-duration: @duration;\n animation-duration: @duration;\n}\n.animation-timing-function(@timing-function) {\n -webkit-animation-timing-function: @timing-function;\n animation-timing-function: @timing-function;\n}\n.animation-delay(@delay) {\n -webkit-animation-delay: @delay;\n animation-delay: @delay;\n}\n.animation-iteration-count(@iteration-count) {\n -webkit-animation-iteration-count: @iteration-count;\n animation-iteration-count: @iteration-count;\n}\n.animation-direction(@direction) {\n -webkit-animation-direction: @direction;\n animation-direction: @direction;\n}\n.animation-fill-mode(@fill-mode) {\n -webkit-animation-fill-mode: @fill-mode;\n animation-fill-mode: @fill-mode;\n}\n\n// Backface visibility\n// Prevent browsers from flickering when using CSS 3D transforms.\n// Default value is `visible`, but can be changed to `hidden`\n\n.backface-visibility(@visibility){\n -webkit-backface-visibility: @visibility;\n -moz-backface-visibility: @visibility;\n backface-visibility: @visibility;\n}\n\n// Drop shadows\n//\n// Note: Deprecated `.box-shadow()` as of v3.1.0 since all of Bootstrap's\n// supported browsers that have box shadow capabilities now support it.\n\n.box-shadow(@shadow) {\n -webkit-box-shadow: @shadow; // iOS <4.3 & Android <4.1\n box-shadow: @shadow;\n}\n\n// Box sizing\n.box-sizing(@boxmodel) {\n -webkit-box-sizing: @boxmodel;\n -moz-box-sizing: @boxmodel;\n box-sizing: @boxmodel;\n}\n\n// CSS3 Content Columns\n.content-columns(@column-count; @column-gap: @grid-gutter-width) {\n -webkit-column-count: @column-count;\n -moz-column-count: @column-count;\n column-count: @column-count;\n -webkit-column-gap: @column-gap;\n -moz-column-gap: @column-gap;\n column-gap: @column-gap;\n}\n\n// Optional hyphenation\n.hyphens(@mode: auto) {\n word-wrap: break-word;\n -webkit-hyphens: @mode;\n -moz-hyphens: @mode;\n -ms-hyphens: @mode; // IE10+\n -o-hyphens: @mode;\n hyphens: @mode;\n}\n\n// Placeholder text\n.placeholder(@color: @input-color-placeholder) {\n // Firefox\n &::-moz-placeholder {\n color: @color;\n opacity: 1; // See https://github.com/twbs/bootstrap/pull/11526\n }\n &:-ms-input-placeholder { color: @color; } // Internet Explorer 10+\n &::-webkit-input-placeholder { color: @color; } // Safari and Chrome\n}\n\n// Transformations\n.scale(@ratio) {\n -webkit-transform: scale(@ratio);\n -ms-transform: scale(@ratio); // IE9 only\n -o-transform: scale(@ratio);\n transform: scale(@ratio);\n}\n.scale(@ratioX; @ratioY) {\n -webkit-transform: scale(@ratioX, @ratioY);\n -ms-transform: scale(@ratioX, @ratioY); // IE9 only\n -o-transform: scale(@ratioX, @ratioY);\n transform: scale(@ratioX, @ratioY);\n}\n.scaleX(@ratio) {\n -webkit-transform: scaleX(@ratio);\n -ms-transform: scaleX(@ratio); // IE9 only\n -o-transform: scaleX(@ratio);\n transform: scaleX(@ratio);\n}\n.scaleY(@ratio) {\n -webkit-transform: scaleY(@ratio);\n -ms-transform: scaleY(@ratio); // IE9 only\n -o-transform: scaleY(@ratio);\n transform: scaleY(@ratio);\n}\n.skew(@x; @y) {\n -webkit-transform: skewX(@x) skewY(@y);\n -ms-transform: skewX(@x) skewY(@y); // See https://github.com/twbs/bootstrap/issues/4885; IE9+\n -o-transform: skewX(@x) skewY(@y);\n transform: skewX(@x) skewY(@y);\n}\n.translate(@x; @y) {\n -webkit-transform: translate(@x, @y);\n -ms-transform: translate(@x, @y); // IE9 only\n -o-transform: translate(@x, @y);\n transform: translate(@x, @y);\n}\n.translate3d(@x; @y; @z) {\n -webkit-transform: translate3d(@x, @y, @z);\n transform: translate3d(@x, @y, @z);\n}\n.rotate(@degrees) {\n -webkit-transform: rotate(@degrees);\n -ms-transform: rotate(@degrees); // IE9 only\n -o-transform: rotate(@degrees);\n transform: rotate(@degrees);\n}\n.rotateX(@degrees) {\n -webkit-transform: rotateX(@degrees);\n -ms-transform: rotateX(@degrees); // IE9 only\n -o-transform: rotateX(@degrees);\n transform: rotateX(@degrees);\n}\n.rotateY(@degrees) {\n -webkit-transform: rotateY(@degrees);\n -ms-transform: rotateY(@degrees); // IE9 only\n -o-transform: rotateY(@degrees);\n transform: rotateY(@degrees);\n}\n.perspective(@perspective) {\n -webkit-perspective: @perspective;\n -moz-perspective: @perspective;\n perspective: @perspective;\n}\n.perspective-origin(@perspective) {\n -webkit-perspective-origin: @perspective;\n -moz-perspective-origin: @perspective;\n perspective-origin: @perspective;\n}\n.transform-origin(@origin) {\n -webkit-transform-origin: @origin;\n -moz-transform-origin: @origin;\n -ms-transform-origin: @origin; // IE9 only\n transform-origin: @origin;\n}\n\n\n// Transitions\n\n.transition(@transition) {\n -webkit-transition: @transition;\n -o-transition: @transition;\n transition: @transition;\n}\n.transition-property(@transition-property) {\n -webkit-transition-property: @transition-property;\n transition-property: @transition-property;\n}\n.transition-delay(@transition-delay) {\n -webkit-transition-delay: @transition-delay;\n transition-delay: @transition-delay;\n}\n.transition-duration(@transition-duration) {\n -webkit-transition-duration: @transition-duration;\n transition-duration: @transition-duration;\n}\n.transition-timing-function(@timing-function) {\n -webkit-transition-timing-function: @timing-function;\n transition-timing-function: @timing-function;\n}\n.transition-transform(@transition) {\n -webkit-transition: -webkit-transform @transition;\n -moz-transition: -moz-transform @transition;\n -o-transition: -o-transform @transition;\n transition: transform @transition;\n}\n\n\n// User select\n// For selecting text on the page\n\n.user-select(@select) {\n -webkit-user-select: @select;\n -moz-user-select: @select;\n -ms-user-select: @select; // IE10+\n user-select: @select;\n}\n","// WebKit-style focus\n\n.tab-focus() {\n // Default\n outline: thin dotted;\n // WebKit\n outline: 5px auto -webkit-focus-ring-color;\n outline-offset: -2px;\n}\n","// Image Mixins\n// - Responsive image\n// - Retina image\n\n\n// Responsive image\n//\n// Keep images from scaling beyond the width of their parents.\n.img-responsive(@display: block) {\n display: @display;\n max-width: 100%; // Part 1: Set a maximum relative to the parent\n height: auto; // Part 2: Scale the height according to the width, otherwise you get stretching\n}\n\n\n// Retina image\n//\n// Short retina mixin for setting background-image and -size. Note that the\n// spelling of `min--moz-device-pixel-ratio` is intentional.\n.img-retina(@file-1x; @file-2x; @width-1x; @height-1x) {\n background-image: url(\"@{file-1x}\");\n\n @media\n only screen and (-webkit-min-device-pixel-ratio: 2),\n only screen and ( min--moz-device-pixel-ratio: 2),\n only screen and ( -o-min-device-pixel-ratio: 2/1),\n only screen and ( min-device-pixel-ratio: 2),\n only screen and ( min-resolution: 192dpi),\n only screen and ( min-resolution: 2dppx) {\n background-image: url(\"@{file-2x}\");\n background-size: @width-1x @height-1x;\n }\n}\n","//\n// Typography\n// --------------------------------------------------\n\n\n// Headings\n// -------------------------\n\nh1, h2, h3, h4, h5, h6,\n.h1, .h2, .h3, .h4, .h5, .h6 {\n font-family: @headings-font-family;\n font-weight: @headings-font-weight;\n line-height: @headings-line-height;\n color: @headings-color;\n\n small,\n .small {\n font-weight: normal;\n line-height: 1;\n color: @headings-small-color;\n }\n}\n\nh1, .h1,\nh2, .h2,\nh3, .h3 {\n margin-top: @line-height-computed;\n margin-bottom: (@line-height-computed / 2);\n\n small,\n .small {\n font-size: 65%;\n }\n}\nh4, .h4,\nh5, .h5,\nh6, .h6 {\n margin-top: (@line-height-computed / 2);\n margin-bottom: (@line-height-computed / 2);\n\n small,\n .small {\n font-size: 75%;\n }\n}\n\nh1, .h1 { font-size: @font-size-h1; }\nh2, .h2 { font-size: @font-size-h2; }\nh3, .h3 { font-size: @font-size-h3; }\nh4, .h4 { font-size: @font-size-h4; }\nh5, .h5 { font-size: @font-size-h5; }\nh6, .h6 { font-size: @font-size-h6; }\n\n\n// Body text\n// -------------------------\n\np {\n margin: 0 0 (@line-height-computed / 2);\n}\n\n.lead {\n margin-bottom: @line-height-computed;\n font-size: floor((@font-size-base * 1.15));\n font-weight: 300;\n line-height: 1.4;\n\n @media (min-width: @screen-sm-min) {\n font-size: (@font-size-base * 1.5);\n }\n}\n\n\n// Emphasis & misc\n// -------------------------\n\n// Ex: (12px small font / 14px base font) * 100% = about 85%\nsmall,\n.small {\n font-size: floor((100% * @font-size-small / @font-size-base));\n}\n\nmark,\n.mark {\n background-color: @state-warning-bg;\n padding: .2em;\n}\n\n// Alignment\n.text-left { text-align: left; }\n.text-right { text-align: right; }\n.text-center { text-align: center; }\n.text-justify { text-align: justify; }\n.text-nowrap { white-space: nowrap; }\n\n// Transformation\n.text-lowercase { text-transform: lowercase; }\n.text-uppercase { text-transform: uppercase; }\n.text-capitalize { text-transform: capitalize; }\n\n// Contextual colors\n.text-muted {\n color: @text-muted;\n}\n.text-primary {\n .text-emphasis-variant(@brand-primary);\n}\n.text-success {\n .text-emphasis-variant(@state-success-text);\n}\n.text-info {\n .text-emphasis-variant(@state-info-text);\n}\n.text-warning {\n .text-emphasis-variant(@state-warning-text);\n}\n.text-danger {\n .text-emphasis-variant(@state-danger-text);\n}\n\n// Contextual backgrounds\n// For now we'll leave these alongside the text classes until v4 when we can\n// safely shift things around (per SemVer rules).\n.bg-primary {\n // Given the contrast here, this is the only class to have its color inverted\n // automatically.\n color: #fff;\n .bg-variant(@brand-primary);\n}\n.bg-success {\n .bg-variant(@state-success-bg);\n}\n.bg-info {\n .bg-variant(@state-info-bg);\n}\n.bg-warning {\n .bg-variant(@state-warning-bg);\n}\n.bg-danger {\n .bg-variant(@state-danger-bg);\n}\n\n\n// Page header\n// -------------------------\n\n.page-header {\n padding-bottom: ((@line-height-computed / 2) - 1);\n margin: (@line-height-computed * 2) 0 @line-height-computed;\n border-bottom: 1px solid @page-header-border-color;\n}\n\n\n// Lists\n// -------------------------\n\n// Unordered and Ordered lists\nul,\nol {\n margin-top: 0;\n margin-bottom: (@line-height-computed / 2);\n ul,\n ol {\n margin-bottom: 0;\n }\n}\n\n// List options\n\n// Unstyled keeps list items block level, just removes default browser padding and list-style\n.list-unstyled {\n padding-left: 0;\n list-style: none;\n}\n\n// Inline turns list items into inline-block\n.list-inline {\n .list-unstyled();\n margin-left: -5px;\n\n > li {\n display: inline-block;\n padding-left: 5px;\n padding-right: 5px;\n }\n}\n\n// Description Lists\ndl {\n margin-top: 0; // Remove browser default\n margin-bottom: @line-height-computed;\n}\ndt,\ndd {\n line-height: @line-height-base;\n}\ndt {\n font-weight: bold;\n}\ndd {\n margin-left: 0; // Undo browser default\n}\n\n// Horizontal description lists\n//\n// Defaults to being stacked without any of the below styles applied, until the\n// grid breakpoint is reached (default of ~768px).\n\n.dl-horizontal {\n dd {\n &:extend(.clearfix all); // Clear the floated `dt` if an empty `dd` is present\n }\n\n @media (min-width: @grid-float-breakpoint) {\n dt {\n float: left;\n width: (@dl-horizontal-offset - 20);\n clear: left;\n text-align: right;\n .text-overflow();\n }\n dd {\n margin-left: @dl-horizontal-offset;\n }\n }\n}\n\n\n// Misc\n// -------------------------\n\n// Abbreviations and acronyms\nabbr[title],\n// Add data-* attribute to help out our tooltip plugin, per https://github.com/twbs/bootstrap/issues/5257\nabbr[data-original-title] {\n cursor: help;\n border-bottom: 1px dotted @abbr-border-color;\n}\n.initialism {\n font-size: 90%;\n text-transform: uppercase;\n}\n\n// Blockquotes\nblockquote {\n padding: (@line-height-computed / 2) @line-height-computed;\n margin: 0 0 @line-height-computed;\n font-size: @blockquote-font-size;\n border-left: 5px solid @blockquote-border-color;\n\n p,\n ul,\n ol {\n &:last-child {\n margin-bottom: 0;\n }\n }\n\n // Note: Deprecated small and .small as of v3.1.0\n // Context: https://github.com/twbs/bootstrap/issues/11660\n footer,\n small,\n .small {\n display: block;\n font-size: 80%; // back to default font-size\n line-height: @line-height-base;\n color: @blockquote-small-color;\n\n &:before {\n content: '\\2014 \\00A0'; // em dash, nbsp\n }\n }\n}\n\n// Opposite alignment of blockquote\n//\n// Heads up: `blockquote.pull-right` has been deprecated as of v3.1.0.\n.blockquote-reverse,\nblockquote.pull-right {\n padding-right: 15px;\n padding-left: 0;\n border-right: 5px solid @blockquote-border-color;\n border-left: 0;\n text-align: right;\n\n // Account for citation\n footer,\n small,\n .small {\n &:before { content: ''; }\n &:after {\n content: '\\00A0 \\2014'; // nbsp, em dash\n }\n }\n}\n\n// Addresses\naddress {\n margin-bottom: @line-height-computed;\n font-style: normal;\n line-height: @line-height-base;\n}\n","// Typography\n\n.text-emphasis-variant(@color) {\n color: @color;\n a&:hover {\n color: darken(@color, 10%);\n }\n}\n","// Contextual backgrounds\n\n.bg-variant(@color) {\n background-color: @color;\n a&:hover {\n background-color: darken(@color, 10%);\n }\n}\n","// Text overflow\n// Requires inline-block or block for proper styling\n\n.text-overflow() {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n","//\n// Code (inline and block)\n// --------------------------------------------------\n\n\n// Inline and block code styles\ncode,\nkbd,\npre,\nsamp {\n font-family: @font-family-monospace;\n}\n\n// Inline code\ncode {\n padding: 2px 4px;\n font-size: 90%;\n color: @code-color;\n background-color: @code-bg;\n border-radius: @border-radius-base;\n}\n\n// User input typically entered via keyboard\nkbd {\n padding: 2px 4px;\n font-size: 90%;\n color: @kbd-color;\n background-color: @kbd-bg;\n border-radius: @border-radius-small;\n box-shadow: inset 0 -1px 0 rgba(0,0,0,.25);\n\n kbd {\n padding: 0;\n font-size: 100%;\n font-weight: bold;\n box-shadow: none;\n }\n}\n\n// Blocks of code\npre {\n display: block;\n padding: ((@line-height-computed - 1) / 2);\n margin: 0 0 (@line-height-computed / 2);\n font-size: (@font-size-base - 1); // 14px to 13px\n line-height: @line-height-base;\n word-break: break-all;\n word-wrap: break-word;\n color: @pre-color;\n background-color: @pre-bg;\n border: 1px solid @pre-border-color;\n border-radius: @border-radius-base;\n\n // Account for some code outputs that place code tags in pre tags\n code {\n padding: 0;\n font-size: inherit;\n color: inherit;\n white-space: pre-wrap;\n background-color: transparent;\n border-radius: 0;\n }\n}\n\n// Enable scrollable blocks of code\n.pre-scrollable {\n max-height: @pre-scrollable-max-height;\n overflow-y: scroll;\n}\n","//\n// Grid system\n// --------------------------------------------------\n\n\n// Container widths\n//\n// Set the container width, and override it for fixed navbars in media queries.\n\n.container {\n .container-fixed();\n\n @media (min-width: @screen-sm-min) {\n width: @container-sm;\n }\n @media (min-width: @screen-md-min) {\n width: @container-md;\n }\n @media (min-width: @screen-lg-min) {\n width: @container-lg;\n }\n}\n\n\n// Fluid container\n//\n// Utilizes the mixin meant for fixed width containers, but without any defined\n// width for fluid, full width layouts.\n\n.container-fluid {\n .container-fixed();\n}\n\n\n// Row\n//\n// Rows contain and clear the floats of your columns.\n\n.row {\n .make-row();\n}\n\n\n// Columns\n//\n// Common styles for small and large grid columns\n\n.make-grid-columns();\n\n\n// Extra small grid\n//\n// Columns, offsets, pushes, and pulls for extra small devices like\n// smartphones.\n\n.make-grid(xs);\n\n\n// Small grid\n//\n// Columns, offsets, pushes, and pulls for the small device range, from phones\n// to tablets.\n\n@media (min-width: @screen-sm-min) {\n .make-grid(sm);\n}\n\n\n// Medium grid\n//\n// Columns, offsets, pushes, and pulls for the desktop device range.\n\n@media (min-width: @screen-md-min) {\n .make-grid(md);\n}\n\n\n// Large grid\n//\n// Columns, offsets, pushes, and pulls for the large desktop device range.\n\n@media (min-width: @screen-lg-min) {\n .make-grid(lg);\n}\n","// Grid system\n//\n// Generate semantic grid columns with these mixins.\n\n// Centered container element\n.container-fixed(@gutter: @grid-gutter-width) {\n margin-right: auto;\n margin-left: auto;\n padding-left: (@gutter / 2);\n padding-right: (@gutter / 2);\n &:extend(.clearfix all);\n}\n\n// Creates a wrapper for a series of columns\n.make-row(@gutter: @grid-gutter-width) {\n margin-left: (@gutter / -2);\n margin-right: (@gutter / -2);\n &:extend(.clearfix all);\n}\n\n// Generate the extra small columns\n.make-xs-column(@columns; @gutter: @grid-gutter-width) {\n position: relative;\n float: left;\n width: percentage((@columns / @grid-columns));\n min-height: 1px;\n padding-left: (@gutter / 2);\n padding-right: (@gutter / 2);\n}\n.make-xs-column-offset(@columns) {\n margin-left: percentage((@columns / @grid-columns));\n}\n.make-xs-column-push(@columns) {\n left: percentage((@columns / @grid-columns));\n}\n.make-xs-column-pull(@columns) {\n right: percentage((@columns / @grid-columns));\n}\n\n// Generate the small columns\n.make-sm-column(@columns; @gutter: @grid-gutter-width) {\n position: relative;\n min-height: 1px;\n padding-left: (@gutter / 2);\n padding-right: (@gutter / 2);\n\n @media (min-width: @screen-sm-min) {\n float: left;\n width: percentage((@columns / @grid-columns));\n }\n}\n.make-sm-column-offset(@columns) {\n @media (min-width: @screen-sm-min) {\n margin-left: percentage((@columns / @grid-columns));\n }\n}\n.make-sm-column-push(@columns) {\n @media (min-width: @screen-sm-min) {\n left: percentage((@columns / @grid-columns));\n }\n}\n.make-sm-column-pull(@columns) {\n @media (min-width: @screen-sm-min) {\n right: percentage((@columns / @grid-columns));\n }\n}\n\n// Generate the medium columns\n.make-md-column(@columns; @gutter: @grid-gutter-width) {\n position: relative;\n min-height: 1px;\n padding-left: (@gutter / 2);\n padding-right: (@gutter / 2);\n\n @media (min-width: @screen-md-min) {\n float: left;\n width: percentage((@columns / @grid-columns));\n }\n}\n.make-md-column-offset(@columns) {\n @media (min-width: @screen-md-min) {\n margin-left: percentage((@columns / @grid-columns));\n }\n}\n.make-md-column-push(@columns) {\n @media (min-width: @screen-md-min) {\n left: percentage((@columns / @grid-columns));\n }\n}\n.make-md-column-pull(@columns) {\n @media (min-width: @screen-md-min) {\n right: percentage((@columns / @grid-columns));\n }\n}\n\n// Generate the large columns\n.make-lg-column(@columns; @gutter: @grid-gutter-width) {\n position: relative;\n min-height: 1px;\n padding-left: (@gutter / 2);\n padding-right: (@gutter / 2);\n\n @media (min-width: @screen-lg-min) {\n float: left;\n width: percentage((@columns / @grid-columns));\n }\n}\n.make-lg-column-offset(@columns) {\n @media (min-width: @screen-lg-min) {\n margin-left: percentage((@columns / @grid-columns));\n }\n}\n.make-lg-column-push(@columns) {\n @media (min-width: @screen-lg-min) {\n left: percentage((@columns / @grid-columns));\n }\n}\n.make-lg-column-pull(@columns) {\n @media (min-width: @screen-lg-min) {\n right: percentage((@columns / @grid-columns));\n }\n}\n","// Framework grid generation\n//\n// Used only by Bootstrap to generate the correct number of grid classes given\n// any value of `@grid-columns`.\n\n.make-grid-columns() {\n // Common styles for all sizes of grid columns, widths 1-12\n .col(@index) { // initial\n @item: ~\".col-xs-@{index}, .col-sm-@{index}, .col-md-@{index}, .col-lg-@{index}\";\n .col((@index + 1), @item);\n }\n .col(@index, @list) when (@index =< @grid-columns) { // general; \"=<\" isn't a typo\n @item: ~\".col-xs-@{index}, .col-sm-@{index}, .col-md-@{index}, .col-lg-@{index}\";\n .col((@index + 1), ~\"@{list}, @{item}\");\n }\n .col(@index, @list) when (@index > @grid-columns) { // terminal\n @{list} {\n position: relative;\n // Prevent columns from collapsing when empty\n min-height: 1px;\n // Inner gutter via padding\n padding-left: (@grid-gutter-width / 2);\n padding-right: (@grid-gutter-width / 2);\n }\n }\n .col(1); // kickstart it\n}\n\n.float-grid-columns(@class) {\n .col(@index) { // initial\n @item: ~\".col-@{class}-@{index}\";\n .col((@index + 1), @item);\n }\n .col(@index, @list) when (@index =< @grid-columns) { // general\n @item: ~\".col-@{class}-@{index}\";\n .col((@index + 1), ~\"@{list}, @{item}\");\n }\n .col(@index, @list) when (@index > @grid-columns) { // terminal\n @{list} {\n float: left;\n }\n }\n .col(1); // kickstart it\n}\n\n.calc-grid-column(@index, @class, @type) when (@type = width) and (@index > 0) {\n .col-@{class}-@{index} {\n width: percentage((@index / @grid-columns));\n }\n}\n.calc-grid-column(@index, @class, @type) when (@type = push) and (@index > 0) {\n .col-@{class}-push-@{index} {\n left: percentage((@index / @grid-columns));\n }\n}\n.calc-grid-column(@index, @class, @type) when (@type = push) and (@index = 0) {\n .col-@{class}-push-0 {\n left: auto;\n }\n}\n.calc-grid-column(@index, @class, @type) when (@type = pull) and (@index > 0) {\n .col-@{class}-pull-@{index} {\n right: percentage((@index / @grid-columns));\n }\n}\n.calc-grid-column(@index, @class, @type) when (@type = pull) and (@index = 0) {\n .col-@{class}-pull-0 {\n right: auto;\n }\n}\n.calc-grid-column(@index, @class, @type) when (@type = offset) {\n .col-@{class}-offset-@{index} {\n margin-left: percentage((@index / @grid-columns));\n }\n}\n\n// Basic looping in LESS\n.loop-grid-columns(@index, @class, @type) when (@index >= 0) {\n .calc-grid-column(@index, @class, @type);\n // next iteration\n .loop-grid-columns((@index - 1), @class, @type);\n}\n\n// Create grid for specific class\n.make-grid(@class) {\n .float-grid-columns(@class);\n .loop-grid-columns(@grid-columns, @class, width);\n .loop-grid-columns(@grid-columns, @class, pull);\n .loop-grid-columns(@grid-columns, @class, push);\n .loop-grid-columns(@grid-columns, @class, offset);\n}\n","//\n// Tables\n// --------------------------------------------------\n\n\ntable {\n background-color: @table-bg;\n}\ncaption {\n padding-top: @table-cell-padding;\n padding-bottom: @table-cell-padding;\n color: @text-muted;\n text-align: left;\n}\nth {\n text-align: left;\n}\n\n\n// Baseline styles\n\n.table {\n width: 100%;\n max-width: 100%;\n margin-bottom: @line-height-computed;\n // Cells\n > thead,\n > tbody,\n > tfoot {\n > tr {\n > th,\n > td {\n padding: @table-cell-padding;\n line-height: @line-height-base;\n vertical-align: top;\n border-top: 1px solid @table-border-color;\n }\n }\n }\n // Bottom align for column headings\n > thead > tr > th {\n vertical-align: bottom;\n border-bottom: 2px solid @table-border-color;\n }\n // Remove top border from thead by default\n > caption + thead,\n > colgroup + thead,\n > thead:first-child {\n > tr:first-child {\n > th,\n > td {\n border-top: 0;\n }\n }\n }\n // Account for multiple tbody instances\n > tbody + tbody {\n border-top: 2px solid @table-border-color;\n }\n\n // Nesting\n .table {\n background-color: @body-bg;\n }\n}\n\n\n// Condensed table w/ half padding\n\n.table-condensed {\n > thead,\n > tbody,\n > tfoot {\n > tr {\n > th,\n > td {\n padding: @table-condensed-cell-padding;\n }\n }\n }\n}\n\n\n// Bordered version\n//\n// Add borders all around the table and between all the columns.\n\n.table-bordered {\n border: 1px solid @table-border-color;\n > thead,\n > tbody,\n > tfoot {\n > tr {\n > th,\n > td {\n border: 1px solid @table-border-color;\n }\n }\n }\n > thead > tr {\n > th,\n > td {\n border-bottom-width: 2px;\n }\n }\n}\n\n\n// Zebra-striping\n//\n// Default zebra-stripe styles (alternating gray and transparent backgrounds)\n\n.table-striped {\n > tbody > tr:nth-child(odd) {\n background-color: @table-bg-accent;\n }\n}\n\n\n// Hover effect\n//\n// Placed here since it has to come after the potential zebra striping\n\n.table-hover {\n > tbody > tr:hover {\n background-color: @table-bg-hover;\n }\n}\n\n\n// Table cell sizing\n//\n// Reset default table behavior\n\ntable col[class*=\"col-\"] {\n position: static; // Prevent border hiding in Firefox and IE9/10 (see https://github.com/twbs/bootstrap/issues/11623)\n float: none;\n display: table-column;\n}\ntable {\n td,\n th {\n &[class*=\"col-\"] {\n position: static; // Prevent border hiding in Firefox and IE9/10 (see https://github.com/twbs/bootstrap/issues/11623)\n float: none;\n display: table-cell;\n }\n }\n}\n\n\n// Table backgrounds\n//\n// Exact selectors below required to override `.table-striped` and prevent\n// inheritance to nested tables.\n\n// Generate the contextual variants\n.table-row-variant(active; @table-bg-active);\n.table-row-variant(success; @state-success-bg);\n.table-row-variant(info; @state-info-bg);\n.table-row-variant(warning; @state-warning-bg);\n.table-row-variant(danger; @state-danger-bg);\n\n\n// Responsive tables\n//\n// Wrap your tables in `.table-responsive` and we'll make them mobile friendly\n// by enabling horizontal scrolling. Only applies <768px. Everything above that\n// will display normally.\n\n.table-responsive {\n overflow-x: auto;\n min-height: 0.01%; // Workaround for IE9 bug (see https://github.com/twbs/bootstrap/issues/14837)\n\n @media screen and (max-width: @screen-xs-max) {\n width: 100%;\n margin-bottom: (@line-height-computed * 0.75);\n overflow-y: hidden;\n -ms-overflow-style: -ms-autohiding-scrollbar;\n border: 1px solid @table-border-color;\n\n // Tighten up spacing\n > .table {\n margin-bottom: 0;\n\n // Ensure the content doesn't wrap\n > thead,\n > tbody,\n > tfoot {\n > tr {\n > th,\n > td {\n white-space: nowrap;\n }\n }\n }\n }\n\n // Special overrides for the bordered tables\n > .table-bordered {\n border: 0;\n\n // Nuke the appropriate borders so that the parent can handle them\n > thead,\n > tbody,\n > tfoot {\n > tr {\n > th:first-child,\n > td:first-child {\n border-left: 0;\n }\n > th:last-child,\n > td:last-child {\n border-right: 0;\n }\n }\n }\n\n // Only nuke the last row's bottom-border in `tbody` and `tfoot` since\n // chances are there will be only one `tr` in a `thead` and that would\n // remove the border altogether.\n > tbody,\n > tfoot {\n > tr:last-child {\n > th,\n > td {\n border-bottom: 0;\n }\n }\n }\n\n }\n }\n}\n","// Tables\n\n.table-row-variant(@state; @background) {\n // Exact selectors below required to override `.table-striped` and prevent\n // inheritance to nested tables.\n .table > thead > tr,\n .table > tbody > tr,\n .table > tfoot > tr {\n > td.@{state},\n > th.@{state},\n &.@{state} > td,\n &.@{state} > th {\n background-color: @background;\n }\n }\n\n // Hover states for `.table-hover`\n // Note: this is not available for cells or rows within `thead` or `tfoot`.\n .table-hover > tbody > tr {\n > td.@{state}:hover,\n > th.@{state}:hover,\n &.@{state}:hover > td,\n &:hover > .@{state},\n &.@{state}:hover > th {\n background-color: darken(@background, 5%);\n }\n }\n}\n","//\n// Forms\n// --------------------------------------------------\n\n\n// Normalize non-controls\n//\n// Restyle and baseline non-control form elements.\n\nfieldset {\n padding: 0;\n margin: 0;\n border: 0;\n // Chrome and Firefox set a `min-width: min-content;` on fieldsets,\n // so we reset that to ensure it behaves more like a standard block element.\n // See https://github.com/twbs/bootstrap/issues/12359.\n min-width: 0;\n}\n\nlegend {\n display: block;\n width: 100%;\n padding: 0;\n margin-bottom: @line-height-computed;\n font-size: (@font-size-base * 1.5);\n line-height: inherit;\n color: @legend-color;\n border: 0;\n border-bottom: 1px solid @legend-border-color;\n}\n\nlabel {\n display: inline-block;\n max-width: 100%; // Force IE8 to wrap long content (see https://github.com/twbs/bootstrap/issues/13141)\n margin-bottom: 5px;\n font-weight: bold;\n}\n\n\n// Normalize form controls\n//\n// While most of our form styles require extra classes, some basic normalization\n// is required to ensure optimum display with or without those classes to better\n// address browser inconsistencies.\n\n// Override content-box in Normalize (* isn't specific enough)\ninput[type=\"search\"] {\n .box-sizing(border-box);\n}\n\n// Position radios and checkboxes better\ninput[type=\"radio\"],\ninput[type=\"checkbox\"] {\n margin: 4px 0 0;\n margin-top: 1px \\9; // IE8-9\n line-height: normal;\n}\n\n// Set the height of file controls to match text inputs\ninput[type=\"file\"] {\n display: block;\n}\n\n// Make range inputs behave like textual form controls\ninput[type=\"range\"] {\n display: block;\n width: 100%;\n}\n\n// Make multiple select elements height not fixed\nselect[multiple],\nselect[size] {\n height: auto;\n}\n\n// Focus for file, radio, and checkbox\ninput[type=\"file\"]:focus,\ninput[type=\"radio\"]:focus,\ninput[type=\"checkbox\"]:focus {\n .tab-focus();\n}\n\n// Adjust output element\noutput {\n display: block;\n padding-top: (@padding-base-vertical + 1);\n font-size: @font-size-base;\n line-height: @line-height-base;\n color: @input-color;\n}\n\n\n// Common form controls\n//\n// Shared size and type resets for form controls. Apply `.form-control` to any\n// of the following form controls:\n//\n// select\n// textarea\n// input[type=\"text\"]\n// input[type=\"password\"]\n// input[type=\"datetime\"]\n// input[type=\"datetime-local\"]\n// input[type=\"date\"]\n// input[type=\"month\"]\n// input[type=\"time\"]\n// input[type=\"week\"]\n// input[type=\"number\"]\n// input[type=\"email\"]\n// input[type=\"url\"]\n// input[type=\"search\"]\n// input[type=\"tel\"]\n// input[type=\"color\"]\n\n.form-control {\n display: block;\n width: 100%;\n height: @input-height-base; // Make inputs at least the height of their button counterpart (base line-height + padding + border)\n padding: @padding-base-vertical @padding-base-horizontal;\n font-size: @font-size-base;\n line-height: @line-height-base;\n color: @input-color;\n background-color: @input-bg;\n background-image: none; // Reset unusual Firefox-on-Android default style; see https://github.com/necolas/normalize.css/issues/214\n border: 1px solid @input-border;\n border-radius: @input-border-radius;\n .box-shadow(inset 0 1px 1px rgba(0,0,0,.075));\n .transition(~\"border-color ease-in-out .15s, box-shadow ease-in-out .15s\");\n\n // Customize the `:focus` state to imitate native WebKit styles.\n .form-control-focus();\n\n // Placeholder\n .placeholder();\n\n // Disabled and read-only inputs\n //\n // HTML5 says that controls under a fieldset > legend:first-child won't be\n // disabled if the fieldset is disabled. Due to implementation difficulty, we\n // don't honor that edge case; we style them as disabled anyway.\n &[disabled],\n &[readonly],\n fieldset[disabled] & {\n cursor: @cursor-disabled;\n background-color: @input-bg-disabled;\n opacity: 1; // iOS fix for unreadable disabled content\n }\n\n // Reset height for `textarea`s\n textarea& {\n height: auto;\n }\n}\n\n\n// Search inputs in iOS\n//\n// This overrides the extra rounded corners on search inputs in iOS so that our\n// `.form-control` class can properly style them. Note that this cannot simply\n// be added to `.form-control` as it's not specific enough. For details, see\n// https://github.com/twbs/bootstrap/issues/11586.\n\ninput[type=\"search\"] {\n -webkit-appearance: none;\n}\n\n\n// Special styles for iOS temporal inputs\n//\n// In Mobile Safari, setting `display: block` on temporal inputs causes the\n// text within the input to become vertically misaligned. As a workaround, we\n// set a pixel line-height that matches the given height of the input, but only\n// for Safari.\n\n@media screen and (-webkit-min-device-pixel-ratio: 0) {\n input[type=\"date\"],\n input[type=\"time\"],\n input[type=\"datetime-local\"],\n input[type=\"month\"] {\n line-height: @input-height-base;\n }\n input[type=\"date\"].input-sm,\n input[type=\"time\"].input-sm,\n input[type=\"datetime-local\"].input-sm,\n input[type=\"month\"].input-sm {\n line-height: @input-height-small;\n }\n input[type=\"date\"].input-lg,\n input[type=\"time\"].input-lg,\n input[type=\"datetime-local\"].input-lg,\n input[type=\"month\"].input-lg {\n line-height: @input-height-large;\n }\n}\n\n\n// Form groups\n//\n// Designed to help with the organization and spacing of vertical forms. For\n// horizontal forms, use the predefined grid classes.\n\n.form-group {\n margin-bottom: 15px;\n}\n\n\n// Checkboxes and radios\n//\n// Indent the labels to position radios/checkboxes as hanging controls.\n\n.radio,\n.checkbox {\n position: relative;\n display: block;\n margin-top: 10px;\n margin-bottom: 10px;\n\n label {\n min-height: @line-height-computed; // Ensure the input doesn't jump when there is no text\n padding-left: 20px;\n margin-bottom: 0;\n font-weight: normal;\n cursor: pointer;\n }\n}\n.radio input[type=\"radio\"],\n.radio-inline input[type=\"radio\"],\n.checkbox input[type=\"checkbox\"],\n.checkbox-inline input[type=\"checkbox\"] {\n position: absolute;\n margin-left: -20px;\n margin-top: 4px \\9;\n}\n\n.radio + .radio,\n.checkbox + .checkbox {\n margin-top: -5px; // Move up sibling radios or checkboxes for tighter spacing\n}\n\n// Radios and checkboxes on same line\n.radio-inline,\n.checkbox-inline {\n display: inline-block;\n padding-left: 20px;\n margin-bottom: 0;\n vertical-align: middle;\n font-weight: normal;\n cursor: pointer;\n}\n.radio-inline + .radio-inline,\n.checkbox-inline + .checkbox-inline {\n margin-top: 0;\n margin-left: 10px; // space out consecutive inline controls\n}\n\n// Apply same disabled cursor tweak as for inputs\n// Some special care is needed because